diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md deleted file mode 100644 index 79f3fbf3799aa..0000000000000 --- a/.github/ISSUE_TEMPLATE/bug.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: New issue for Reproducible Bug -about: "If you're sure it's reproducible and not just your machine: 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. - -- [ ] 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? - - - -## What you were trying to do (and why) - - - -## What happened (include command output) - - - -
- 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..4dc77ad5894a2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,47 @@ +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 gist-logs ` link OR `brew config` AND `brew doctor` output" + 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 + - 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 index 2319d1cec9b32..445cfe3b61749 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,15 +1,15 @@ blank_issues_enabled: false contact_links: -- name: Get help on Discourse - url: https://discourse.brew.sh - about: Have a question? Not sure if your issue affects everyone reproducibly? The quickest way to get help is on Homebrew's Discourse! -- 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 `brew cask` problem? Report it to Homebrew/homebrew-cask (the cask tap/repository) -- name: New issue on Homebrew/linuxbrew-core - url: https://github.com/Homebrew/linuxbrew-core/issues/new/choose - about: On Linux? Having a `brew` problem with a `brew install` or `brew upgrade` of a single formula/package? Report it to Homebrew/linuxbrew-core (the Linux core tap/repository). + - 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 eea0731d26f47..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/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/autobump.txt b/.github/autobump.txt new file mode 100644 index 0000000000000..4ce4a13eff644 --- /dev/null +++ b/.github/autobump.txt @@ -0,0 +1,4093 @@ +a2ps +aarch64-elf-gcc +ab-av1 +abcmidi +abi3audit +abseil +abyss +ack +acl2 +acme.sh +acronym +act +action-validator +actionlint +activemq +ad +ada-url +adapterremoval +adaptivecpp +adb-enhanced +adios2 +adns +adplug +adr-viewer +adwaita-icon-theme +aerc +aerleon +aespipe +afflib +afl++ +aftman +agda +age +age-plugin-se +age-plugin-yubikey +agg +ahoy +aichat +aide +ain +aiven-client +akamai +alda +alembic +algernon +algol68g +algolia +aliae +aliddns +aliyun-cli +aliyunpan +all-repos +allegro +allure +alluxio +alp +alpscore +alsa-lib +amber +ammonite-repl +amp +ampl-asl +ampl-mp +amqp-cpp +amtterm +ancient +angle-grinder +angular-cli +animdl +ansible +ansible-creator +ansible-lint +ansible@10 +ansifilter +ansilove +ant +antidote +antlr +antlr4-cpp-runtime +anubis +anycable-go +anyquery +aom +apache-drill +apache-flink +apache-flink-cdc +apache-geode +apache-opennlp +apache-pulsar +apache-spark +apachetop +api-linter +apibuilder-cli +apkleaks +apko +apktool +appium +apprise +appstream +apptainer +appwrite +apr +apt +aptly +aqtinstall +aqua +aravis +arcade-learning-environment +archi-steam-farm +arduino-cli +arelo +argc +argo +argocd +argocd-autopilot +argocd-vault-plugin +argparse +argus +argus-clients +argyll-cms +arjun +arkade +arm-none-eabi-gcc +armadillo +arp-scan +arping +arrayfire +artillery +arttime +arturo +arxiv_latex_cleaner +asak +ascii +asciidoctor +asciidoctorj +asdf +asio +ask-cli +asm6809 +asn +asnmap +aspell +assh +assimp +ast-grep +astgen +astro +astrometry-net +astroterm +astyle +asuka +asymptote +asyncplusplus +at-spi2-core +atac +atf +atlantis +atlas +atomicparsley +atop +atuin +audacious +auditbeat +auditwheel +austin +autobrr +autoconf-archive +autodiff +autoenv +automake +autopep8 +autorest +autorestic +autotrace +avfs +avrdude +avro-c +avro-cpp +avro-tools +awk +aws-amplify +aws-c-auth +aws-c-cal +aws-c-common +aws-c-compression +aws-c-event-stream +aws-c-http +aws-c-io +aws-c-mqtt +aws-c-s3 +aws-c-sdkutils +aws-cdk +aws-checksums +aws-console +aws-crt-cpp +aws-elasticbeanstalk +aws-es-proxy +aws-iam-authenticator +aws-nuke +aws-rotate-key +aws-sam-cli +aws-sdk-cpp +aws-sso-cli +aws-sso-util +awscli +awscli@1 +awscurl +awsdac +awslogs +axel +azcopy +azqr +azure-core-cpp +azure-storage-common-cpp +azurehound +b2-tools +b3sum +babel +babl +bacon +bacon-ls +bacula-fd +badkeys +bagels +bagit +baidupcs-go +balena-cli +ballerburg +ballerina +bandicoot +bandit +bandwhich +bao +baobab +bareos-client +baresip +bartib +bartycrouch +base16384 +basedpyright +bash_unit +bash-completion@2 +bash-language-server +bashunit +basti +bat +bat-extras +batik +bats-core +batt +bazarr +bazel +bazel-diff +bazel-remote +bazel@7 +bazelisk +bbot +bbtools +bc +bc-gh +bcoin +bcpp +bde +bdftopcf +bdw-gc +beagle +beakerlib +beancount +beancount-language-server +beanquery +bear +beautysh +bed +bee +behaviortree.cpp +bench +bender +benthos +berglas +bettercap +bfs +bgpq3 +bgpq4 +biber +bibtex-tidy +bibtexconv +bigloo +bigquery-emulator +bilix +binaryen +bind +bindfs +bindgen +bingrep +binocle +binsider +biodiff +biome +biosig +bitcoin +bitrise +bittwist +bitwarden-cli +bk +bkcrack +bkmr +bkt +black +blades +blake3 +blast +blis +blisp +block-goose-cli +blocky +bluepill +blueutil +bluez +bmake +bnd +bob +bochs +bold +bombardier +bomber +bore-cli +borgbackup +borgmatic +boringtun +bosh-cli +botan +bottom +bounceback +bowtie2 +box2d +boxes +bpftop +bpmnlint +braid +breezy +brev +brew-php-switcher +brogue +brook +broot +brotli +brpc +bruno-cli +btfs +btop +btrfs-progs +bubblewrap +buf +buffrs +buildifier +buildkit +buildozer +buildpulse-test-reporter +buku +bulk_extractor +bump-my-version +bundletool +bup +bupstash +busted +butane +bwa +bwfmetaedit +bwidget +byacc +byobu +byteman +bzip3 +bzt +c-ares +c-blosc +c-blosc2 +c2048 +c2patool +c2rust +c3c +c4core +c7n +ca-certificates +cabin +cadaver +caddy +cadence +cadence-workflow +cadical +caf +cahute +caire +cairo +cake +calc +calceph +calcurse +calicoctl +camlp5 +canfigger +capnp +capstone +carapace +cargo-about +cargo-audit +cargo-auditable +cargo-binstall +cargo-bloat +cargo-bundle +cargo-c +cargo-cache +cargo-chef +cargo-crev +cargo-cyclonedx +cargo-deny +cargo-depgraph +cargo-dist +cargo-edit +cargo-expand +cargo-flamegraph +cargo-generate +cargo-hack +cargo-instruments +cargo-llvm-cov +cargo-llvm-lines +cargo-make +cargo-msrv +cargo-nextest +cargo-outdated +cargo-public-api +cargo-release +cargo-run-bin +cargo-shuttle +cargo-sort +cargo-spellcheck +cargo-udeps +cargo-update +cargo-zigbuild +cariddi +carla +carrot2 +cask +cassandra +cassandra-cpp-driver +cassandra-reaper +cassowary +castxml +cataclysm +catch2 +cava +cbc +cbfmt +cbindgen +ccache +ccls +cctz +cdebug +cdecl +cdk +cdk8s +cdktf +cdncheck +cdogs-sdl +cdsclient +cdxgen +cekit +censys +cern-ndiff +certifi +certigo +cf +cf-terraforming +cf2tf +cfengine +cffi +cfitsio +cfn-format +cfn-lint +cfnctl +cfonts +cfr-decompiler +cfripper +cfssl +cfv +cgal +cgif +cgl +cglm +cgns +cgrep +chafa +chain-bench +chainhook +chainloop-cli +chainsaw +chamber +changie +chaos-client +chaoskube +charm-tools +charmcraft +chars +chart-testing +chatblade +chdig +cheat +check-jsonschema +checkbashisms +checkmake +checkov +checkstyle +cherrytree +chezmoi +chezscheme +chibi-scheme +chicken +chiko +chisel-tunnel +chkbit +chkrootkit +choose-gui +choose-rust +chroma +chromaprint +chrome-cli +chronograf +chrony +chsrc +chuck +cidr +cilium-cli +cimg +circleci +circumflex +citus +cjson +ckan +clac +clair +clamav +clang-build-analyzer +clang-format +clang-uml +clangql +clarinet +claws-mail +clazy +clblast +clearlooks-phenix +clhep +cli11 +cli53 +clib +clickhouse-cpp +clickhouse-sql-parser +cliclick +clifm +clinfo +cling +clingo +clipboard +cljfmt +cloc +clojure +clojurescript +closure-compiler +cloud-nuke +cloud-provider-kind +cloud-sql-proxy +cloudflare-cli4 +cloudflare-quiche +cloudflare-wrangler +cloudflared +cloudformation-cli +cloudformation-guard +cloudfoundry-cli +cloudfox +cloudlist +cloudprober +cloudquery +cloudsplaining +clozure-cl +clp +clusterawsadm +clusterctl +clzip +cmake-language-server +cmake-lint +cmark +cmctl +cminpack +cmu-pocketsphinx +cmus +cnats +cntb +coal +cobalt +cobo-cli +coccinelle +cocoapods +cocogitto +coconut +code-cli +code-minimap +code-server +code2prompt +codeberg-cli +codec2 +codelimit +coder +codesnap +codespell +codevis +codex +cog +coin3d +coinutils +colima +colmap +commandbox +commitizen +commitlint +compiledb +composer +comrak +comtrya +conan +conan@1 +concurrencykit +conda-lock +conda-zsh-completion +conduit +conftest +conmon +consul-template +container-structure-test +contentful-cli +convco +convmv +convox +cookcli +cookiecutter +copa +copier +copilot +coq +core-lightning +coredns +coreutils +corral +corrosion +corsixth +cortex +cosign +cot +cotila +cotp +coturn +couchbase-shell +couchdb +countdown +counterfeiter +coursier +cp2k +cpanminus +cpi +cpm +cpp-gsl +cpp-httplib +cpp-peglib +cppad +cppcheck +cppinsights +cpplint +cppman +cpr +cproto +cpu_features +cpufetch +cpuid +cql-proxy +crabz +cracklib +crane +crates-tui +cri-tools +crispy-doom +croaring +croc +cromwell +crossplane +crosstool-ng +crow +crowdin +crun +cryfs +cryptography +cryptol +cryptominisat +crystal +crystalline +crytic-compile +csfml +cspell +csprecon +css-crush +csview +csvkit +csvlens +csvq +csvtk +ctlptl +cubejs-cli +cucumber-ruby +cue +cups +curl +curlie +cvs-fast-export +cweb +cxgo +cxxopts +cyclonedx-gomod +cyclonedx-python +cycode +cyctl +cyme +cypher-shell +cyphernetes +cyrus-sasl +cython +czg +czkawka +d2 +daemon +dagger +daktilo +dante +daq +dar +darcs +darkhttpd +darkice +darklua +darkstat +dart-sdk +dartsim +datafusion +datalad +datamash +datasette +datatype99 +dav1d +dblab +dbml-cli +dbus +dbus-glib +dcd +dcm2niix +ddclient +ddcutil +ddns-go +ddrescue +deadfinder +deark +debianutils +decasify +decompose +define +dehydrated +delve +demumble +deno +dep-tree +dependabot +dependency-check +deployer +der-ascii +derby +descope +desktop-file-utils +detect-secrets +detekt +detox +devcontainer +devspace +dex2jar +dezoomify-rs +dfmt +dfu-programmer +dhall +dhall-bash +dhall-json +dhall-lsp-server +dhall-toml +dhall-yaml +di +dialog +diamond +dicebear +diceware +dict +diesel +diffoci +diffoscope +diffstat +difftastic +diffutils +digdag +dillo +directx-headers +direnv +direvent +dish +diskus +dislocker +displayplacer +dissent +distrobox +dive +django-completion +djhtml +djl-serving +djlint +dlib +dmenu +dnscontrol +dnscrypt-proxy +dnsdist +dnsgen +dnsmasq +dnsperf +dnsrobocert +dnstwist +dnsx +doc8 +docfx +dockcheck +docker-buildx +docker-compose +docker-credential-helper +docker-credential-helper-ecr +docker-gen +docker-machine +docker-machine-driver-vultr +docker-squash +dockerfile-language-server +dockerfilegraph +dockerfmt +dockerize +dockly +dockviz +doctest +doctl +docutils +docuum +doggo +dolt +doltgres +dooit +doppler +dosbox-staging +dosbox-x +dotbot +dotenv-linter +dotnet +dotnet@8 +dotslash +dotter +double-conversion +dovi_tool +doxygen +dpkg +dpp +dprint +dra +draco +draft +dragonbox +driftctl +drill +drogon +drone-cli +dropbear +druid +dry +dscanner +dsda-doom +dsq +dssim +dstack +dstask +dtc +dtm +dtsroll +dua-cli +dub +duck +duckdb +ducker +duckscript +dufs +dug +dum +dumpling +dunamai +dune +duo_unix +duplicity +duply +dust +dvc +dwarfs +dwarfutils +dwm +dxpy +dyff +dyld-headers +dynaconf +dynare +dynein +dysk +dzr +e2fsprogs +e2tools +earthly +easeprobe +easy-rsa +easyengine +eccodes +ecflow-ui +echidna +ecl +ecs-deploy +ed +edbrowse +edencommon +edgevpn +editorconfig +editorconfig-checker +efl +efm-langserver +eg-examples +egctl +eget +ehco +eigenpy +ejabberd +ejdb +eksctl +elan-init +eleventy +elfutils +elfx86exts +elixir +elixir-ls +elvis +elvish +emacs +emacs-dracula +embree +emqx +emscripten +enchant +energy +enet +enpass-cli +ensmallen +entr +envchain +envd +envelope +envio +envoy +enzyme +ephemeralpg +epic5 +epoll-shim +epr +eprover +epubcheck +eralchemy +erdtree +erg +erlang +erlang_ls +erlang@25 +erlang@26 +erofs-utils +esbuild +eslint +eslint_d +espeak-ng +espflash +esphome +esptool +etcd +etcd-cpp-apiv3 +ethereum +eva +evans +evil-helix +evince +evtx +excalidraw-converter +exempi +exercism +exiftool +exim +exiv2 +exodriver +exploitdb +extra-cmake-modules +exult +eza +f2 +f3 +f3d +faac +faad2 +faas-cli +fabio +fabric +fabric-ai +fabric-installer +facad +fail2ban +faircamp +faiss +fakeroot +falco +falcoctl +fancy-cat +fantom +fanyi +fast_float +fastapi +fastd +fastfetch +fastlane +fastly +fastnetmon +fastp +fastqc +fatal +faudio +fauna-shell +faust +favirecon +fb303 +fblog +fbthrift +fcft +fcgi +fclones +fd +fdk-aac-encoder +fdroidcl +fdroidserver +fdupes +fedify +feh +feishu2md +felinks +feluda +fend +fennel +fern-api +feroxbuster +fetchmail +ffmpeg +ffmpeg@4 +ffmpeg@5 +ffmpeg@6 +ffmpegthumbnailer +ffms2 +ffsend +ffuf +fgbio +fheroes2 +fierce +fig2dev +file-roller +filebeat +fileql +findent +findomain +findutils +fio +fiona +firebase-cli +firefly +firefoxpwa +fisher +fizz +flac +flake8 +flang +flank +flann +flarectl +flashrom +flatbuffers +flawz +fleet-cli +flexiblas +flint +flit +flix +flowpipe +fltk +fltk@1.3 +fluent-bit +fluid-synth +flume +flux +flyctl +flyscrape +flyway +fmt +fn +fnlfmt +fnm +fnt +fobis +folderify +folly +fontconfig +fontforge +fonts-encodings +fonttools +foot +fop +forbidden +forcecli +ford +foreman +forgit +fork-cleaner +fortio +fortitude +fortls +fossil +fourmolu +fourstore +fox +fpart +fping +fplll +fq +fred +freebayes +freeciv +freeglut +freeipmi +freerdp +freeswitch +freetds +freetype +freexl +frei0r +fribidi +frizbee +frotz +frozen +frpc +frps +fselect +fsql +fswatch +ftnchek +fuc +fuego-firestore +func-e +functionalplus +funzzy +fuse-overlayfs +fuseki +futhark +fw +fwup +fwupd +fx +fzf +fzf-make +g-ls +g2o +gabo +gallery-dl +gama +gambit +gamdl +game-music-emu +gammaray +garble +garnet +gat +gateway-go +gator +gatsby-cli +gau +gauge +gawk +gaze +gcalcli +gcem +gci +gcovr +gcr +gcsfuse +gdal +gdbm +gdcm +gdk-pixbuf +gdown +gdu +geeqie +geesefs +gegl +genact +geni +gensio +geogram +geoip2fast +geoipupdate +geos +geoserver +geph4 +gersemi +getmail6 +gettext +gexiv2 +gf +gfold +ggshield +gh-ost +ghcup +ghex +ghorg +ghostunnel +ghq +ghr +ghz +ghz-web +gickup +gifski +gimme +ginac +gismo +git-absorb +git-annex +git-bug +git-cinnabar +git-cliff +git-codereview +git-cola +git-credential-oauth +git-delete-merged-branches +git-delta +git-extras +git-filter-repo +git-grab +git-ignore +git-interactive-rebase-tool +git-lfs +git-machete +git-mob +git-quick-stats +git-remote-hg +git-review +git-split-diffs +git-subrepo +git-sync +git-town +git-who +git-xargs +gitbackup +gitbucket +gitea +github-keygen +github-markdown-toc +github-mcp-server +gitlab-ci-local +gitlab-gem +gitlab-runner +gitleaks +gitmoji +gitoxide +gitql +gitsign +gittuf +gitu +giza +gjs +gkrellm +glances +glassfish +glasskube +glaze +glbinding +gleam +glfw +glib +glib-networking +glibmm +glibmm@2.66 +glider +glm +global +globstar +glooctl +glow +glslang +glyph +gmailctl +gmic +gmime +gmsh +gnmic +gnome-autoar +gnome-builder +gnu-apl +gnu-chess +gnu-getopt +gnu-typist +gnu-units +gnu-which +gnumeric +gnunet +gnupg +gnupg-pkcs11-scd +gnuplot +gnuradio +gnutls +go +go-blueprint +go-camo +go-critic +go-feature-flag-relay-proxy +go-md2man +go-parquet-tools +go-size-analyzer +go-task +go@1.23 +goaccess +goawk +gobject-introspection +gocloc +gocryptfs +goctl +godap +goffice +gofumpt +goimports +gojq +gokey +goku +golang-migrate +golangci-lint +golangci-lint-langserver +gollama +gomi +gomplate +google-authenticator-libpam +google-benchmark +google-java-format +googletest +goose +gopass +gopass-jsonapi +gopeed +gopls +goplus +gor +goread +goredo +goreleaser +goreman +goresym +gorilla-cli +gosec +gossip +gostatic +gosu +got +gotestsum +gotestwaf +gotify +gotpm +gotz +gource +govc +govulncheck +gowall +gowsdl +gpa +gpac +gpatch +gperf +gperftools +gpg-tui +gpgme +gprof2dot +gpsim +gptme +gptscript +gql +gradle +gradle-completion +gradle-profiler +grafana +grafana-agent +grafana-alloy +grails +grap +graph-tool +graphicsmagick +graphql-inspector +graphqurl +graphqxl +graphviz +grayskull +greenmask +grep +grex +grin +grin-wallet +grizzly +groestlcoin +grokj2k +grokmirror +gromacs +groonga +groovy +groovysdk +grpc +grpcui +grype +gsan +gsettings-desktop-schemas +gsl +gsmartcontrol +gsoap +gspell +gstreamer +gtk-gnutella +gtk-mac-integration +gtk+3 +gtk4 +gtkmm3 +gtkmm4 +gtksourceview5 +gtranslator +gtree +gucharmap +guile +guile-fibers +gulp-cli +gum +gumbo-parser +gupnp +gupnp-av +gupnp-tools +gurk +gut +gwt +gwyddion +gxml +gyb +gzip +h26forge +h3 +hackrf +hadoop +haiti +halide +halp +hamlib +hapi-fhir-cli +haproxy +haproxy@2.8 +harfbuzz +harper +harsh +haskell-language-server +haskell-stack +hatari +hatch +havener +havn +hawkeye +haxe +hbase +hblock +hck +hcl2json +hcledit +hcloud +hcxtools +heartbeat +hebcal +helix +hellwal +helm +helm-docs +helm-ls +helmfile +helmify +helmsman +hercules +hermit +heroku +hevi +hexo +hexyl +hfstospell +hg-fast-export +hgrep +hickory-dns +hidapi +highlight +highs +himalaya +hishtory +hive +hivemind +hivex +hjson +hk +hl +hledger +hlint +hof +homebank +hopenpgp-tools +hoverfly +howard-hinnant-date +hpack +hr +hsd +html-xml-utils +html2markdown +htmldoc +htmlq +htmltest +htop +htpdate +httm +httpd +httpie +httping +httpx +httpyac +hub-tool +hubble +huggingface-cli +hugo +humanlog +hurl +hut +hwatch +hwloc +hy +hyperfine +hypre +hysteria +hyx +hz +i2p +i2pd +i2util +i686-elf-gcc +iamb +iamy +ibazel +icann-rdap +icbirc +icloudpd +icon +identme +ifacemaker +ignite +igraph +iguana +igv +iir1 +ijq +imagemagick +imagemagick@6 +imap-backup +imapsync +imath +imessage-exporter +imgdiet +imgp +imgproxy +imlib2 +immich-cli +immich-go +immortal +immudb +imposm3 +inchi +include-what-you-use +inetutils +infat +infisical +influxdb +influxdb-cli +influxdb@1 +inform6 +inframap +ingress2gateway +inih +iniparser +inko +inlyne +inspircd +install-peerdeps +instaloader +instead +interface99 +internetarchive +inxi +ioctl +ios-webkit-debug-proxy +iowow +ipatool +iperf +iperf3 +ipfs +ipget +ipinfo-cli +ipmiutil +ipopt +iproute2 +ipsw +iptables +iputils +ipv6calc +ipython +ircd-hybrid +ircii +iredis +is-fast +isa-l +isl +iso-codes +isort +ispc +istioctl +isync +itk +ittapi +ivtools +ivy +ivykis +jabba +jackett +jadx +jaguar +janet +jaq +jasper +jbang +jbig2dec +jbig2enc +jc +jd +jdnssec-tools +jena +jenkins +jenkins-cli +jenkins-job-builder +jenkins-lts +jerryscript +jet +jetty +jetty-runner +jfrog-cli +jhipster +jikken +jimtcl +jing-trang +jira-cli +jj +jlog +jmeter +jnethack +jnv +joern +johnnydep +joker +jolie +joplin-cli +jose +jove +jp2a +jpeg-turbo +jpeg-xl +jprq +jql +jr +jreleaser +jrnl +jruby +js-beautify +jsbeautifier +jscpd +jsdoc3 +jsign +json-fortran +json-glib +json2hcl +json2ts +json2tsv +jsoncpp +jsonnet +jsonnet-bundler +jsonrpc-glib +jsrepo +jsvc +jtbl +juicefs +juju +julia +jupyterlab +jupytext +just +jwt-cli +jxl-oxide +jython +k2tf +k3d +k3sup +k6 +k8sgpt +k9s +kafka +kafkactl +kahip +kakoune +kalker +kallisto +kamal-proxy +kamel +kanata +kapacitor +kapp +karchive +karmadactl +kaskade +katago +katana +kbld +kcat +kcgi +kcov +kcptun +kdoctools +kea +keep-sorted +keeper-commander +keploy +kepubify +kerl +kew +keychain +keydb +keyring +kfr +khal +ki +ki18n +kickstart +kics +killport +kim-api +kin +kind +kiota +kirimase +kitchen-sync +kitex +klee +kmod +kn +knot +knot-resolver +ko +koji +kompose +kool +kops +kor +kotlin +kotlin-language-server +kpcli +kraftkit +krakend +krb5 +krep +krew +ksh93 +ksops +ktexttemplate +ktfmt +ktor +kty +kube-bench +kube-linter +kube-ps1 +kube-score +kubebuilder +kubecfg +kubecm +kubecolor +kubeconform +kubectl-cnpg +kubectl-rook-ceph +kubefirst +kubehound +kubekey +kubelogin +kubent +kubeone +kubergrunt +kubernetes-cli +kubernetes-cli@1.30 +kubernetes-cli@1.31 +kubescape +kubeseal +kubeshark +kubespy +kubetail +kubetrim +kubetui +kubevela +kubevious +kubevpn +kubie +kumactl +kustomize +kuto +kuttl +kvazaar +kwctl +kwok +kyma-cli +kyverno +lacework-cli +lando-cli +langgraph-cli +languagetool +languagetool-rust +lanraragi +lapack +largetifftools +lastpass-cli +lastz +laszip +latex2html +latexdiff +latexindent +latexml +latino +lazydocker +lazyjj +lazyjournal +lazysql +lbdb +lc0 +lcm +lcov +ld-find-code-refs +ldc +ldns +leaf-proxy +leakcanary-shark +lean-cli +leapp-cli +ledit +leetcode-cli +leetgo +leetup +legba +legitify +lego +leiningen +leptonica +lerna +less +lesspipe +lexbor +lexicon +lexido +lf +lfe +lftp +lgogdownloader +libabigail +libadwaita +libaec +libansilove +libarchive +libass +libassuan +libavif +libblastrampoline +libbpf +libbsd +libcap +libcap-ng +libcbor +libcdr +libcec +libcerf +libchewing +libclc +libcoap +libcotp +libcouchbase +libcpuid +libcss +libcyaml +libdap +libdeflate +libdex +libdicom +libdivide +libdmtx +libdnet +libdom +libdpp +libdrm +libedit +libepoxy +libesedb +libetonyek +libewf +libexif +libfabric +libffcall +libffi +libfido2 +libfishsound +libfixbuf +libfontenc +libformfactor +libfreenect +libfs +libgedit-amtk +libgedit-gfls +libgedit-gtksourceview +libgedit-tepl +libgee +libgeotiff +libgetdata +libgit2 +libgit2-glib +libgit2@1.8 +libgpg-error +libgr +libgsf +libgudev +libgusb +libgweather +libhandy +libharu +libheif +libheinz +libhubbub +libical +libice +libiconv +libidn +libidn2 +libimagequant +libimobiledevice-glue +libint +libirecovery +libjcat +libjuice +libjwt +libkeccak +libksba +liblc3 +liblinear +liblouis +liblqr +liblxi +libmaa +libmapper +libmatio +libmaxminddb +libmicrohttpd +libmikmod +libmobi +libmodbus +libmonome +libmsquic +libmtp +libmxml +libnetfilter_conntrack +libnfs +libnftnl +libnghttp3 +libnotify +libntlm +libobjc2 +libomemo-c +libomp +libopenmpt +liboqs +liborigin +libosinfo +libosmium +libp11 +libpaho-mqtt +libpanel +libpano +libpaper +libpcap +libpeas +libphonenumber +libpinyin +libpipeline +libplacebo +libplctag +libplist +libpng +libpq +libpqxx +libproxy +libpulsar +libraqm +libraw +librdkafka +libre +librealsense +librespot +libressl +librime +librist +librsvg +librtlsdr +libsail +libsais +libscfg +libseccomp +libsecret +libserialport +libshumate +libsidplayfp +libsigsegv +libsixel +libslirp +libsm +libsndfile +libsolv +libsoundio +libsoup +libspelling +libspiro +libspnav +libsql +libssh +libssh2 +libstrophe +libsvgtiny +libsvm +libtasn1 +libtensorflow +libtickit +libtiff +libtirpc +libtommath +libtool +libtorrent-rakshasa +libtorrent-rasterbar +libtrace +libtrng +libucl +libultrahdr +libunibreak +libunicode +libuninameslist +libunistring +libunwind +libupnp +liburing +libusb +libusbmuxd +libuv +libva +libvatek +libvirt +libvirt-python +libvisio +libvncserver +libvpx +libwbxml +libwebsockets +libwpe +libx11 +libxau +libxaw3d +libxc +libxcrypt +libxcursor +libxcvt +libxdmcp +libxext +libxi +libxkbcommon +libxkbfile +libxls +libxlsxwriter +libxml++@4 +libxml2 +libxmlb +libxmlsec1 +libxmp +libxmp-lite +libxmu +libxo +libxrender +libxshmfence +libxslt +libxt +libxv +libxvmc +libxxf86vm +libzim +libzzip +license-eye +licensed +licensefinder +licenseplist +lightgbm +lighthouse +lightning +lighttpd +lilv +lima +limbo +link-grammar +linkerd +links +linode-cli +linux-headers@5.15 +linux-pam +liqoctl +liquid-dsp +liquidctl +liquidprompt +lit +litecli +literate-git +litmusctl +little-cms2 +livekit +livekit-cli +lizard +lizard-analyzer +lla +llama.cpp +lld +lldpd +llgo +llm +llvm +lmdb +lmod +lnav +lndir +localai +localstack +locust +log4cplus +log4cxx +logcli +logdy +logrotate +logstash +logswan +loki +lol-html +lout +ls-lint +lsd +lsix +lsof +ltex-ls-plus +lttng-ust +lua +luacheck +luajit-openresty +luanti +luarocks +luau +lucky-commit +ludusavi +luit +lume +lunar-date +lune +lunzip +lutok +luv +lux +lwtools +lxc +lxi-tools +lychee +lynis +lz4 +lzip +lziprecover +lzlib +m4 +m68k-elf-gcc +macchina +mackup +macmon +mactop +mafft +mage +magic_enum +magic-wormhole +magic-wormhole.rs +mago +mailcatcher +mailpit +mailsy +mailutils +makedepend +makensis +makepkg +mako +malcontent +man-db +mandown +mani +manifest-tool +manim +manticoresearch +mantra +mapcidr +mapnik +mapproxy +mapserver +marcli +mariadb +mariadb-connector-c +mariadb-connector-odbc +mariadb@10.11 +mariadb@10.5 +mariadb@10.6 +mariadb@11.4 +markdown-oxide +markdownlint-cli +markdownlint-cli2 +marked +marksman +marmite +marp-cli +martin +massdriver +massren +mat2 +matplotplusplus +matterbridge +maturin +maven +mavsdk +mawk +maxwell +mbedtls +mbt +mcap +mcfly +mcpm +md2pdf +md4c +mdbook +mdbtools +mdds +mdformat +mdless +mdq +mdsh +mdz +mdzk +mediaconch +mediamtx +mednafen +medusa +megatools +meilisearch +melange +meli +melody +memcached +memtester +menhir +mercurial +mergiraf +meson +meta-package-manager +metabase +metals +metricbeat +mfem +mgba +mgis +micro +micromamba +micronaut +microplane +micropython +microsocks +midnight-commander +mighttpd2 +mihomo +mikmod +mill +miller +millet +mimalloc +mimirtool +minder +minica +minicom +minigraph +minijinja-cli +minikube +minimal-racket +minimap2 +minio +minio-warp +minipro +miniserve +minisign +miniupnpc +minizinc +minizip +minizip-ng +mintoolkit +minuit2 +mist-cli +mk-configure +mkdocs +mkdocs-material +mkfontscale +mkvtoolnix +mlkit +mlpack +mlt +mlton +mlx +mmark +mmctl +mmdbctl +mmseqs2 +mmv +mockery +mockolo +mockserver +moco +mods +modsecurity +modules +moe +mold +molecule +monero +mongo-c-driver +mongo-cxx-driver +mongo-orchestration +mongocli +mongodb-atlas-cli +mongoose +monika +monit +monitoring-plugins +monolith +moon +morpheus +morse +mosquitto +moto +mox +mpc +mpd +mpdecimal +mpg123 +mpi4py +mpich +mpop +mprocs +mpv +mqttui +mrboom +mruby +msgpack +msgpack-cxx +msitools +msktutil +msmtp +mtbl +mtoc +mtools +mu +mubeng +muffet +mujs +multi-git-status +multi-gitter +multitail +muon +muparser +mupdf +mupdf-tools +murex +musikcube +mutt +mvfst +mvnvm +mvt +mvtools +mx +mycli +mycorrhiza +mydumper +mypy +mysql-connector-c++ +mysql-search-replace +mysqltuner +n +naabu +naga-cli +nagios +nagios-plugins +nak +nano +nanobind +nanoflann +nanopb +nasm +nats-server +nats-streaming-server +naturaldocs +nave +navi +navidrome +nbdime +ncc +ncdc +ncdu +ncftp +ncmdump +ncmpc +ncmpcpp +ncnn +nco +ncspot +ncview +ne +neatvi +nebula +needle +nelm +neo4j +neocmakelsp +neomutt +neon +neonctl +neosync +neovide +neovim-qt +nerdctl +nerdfetch +nerdfix +nerdlog +nest +nestopia-ue +netaddr +netcdf +netcdf-fortran +netdata +netfetch +nethogs +netlify-cli +nettle +neverest +newman +newrelic-cli +newrelic-infra-agent +newsboat +newsraft +newt +nextdns +nexttrace +nfdump +nfpm +nftables +nginx +ngs +ngt +nickel +nickle +nifi +nifi-registry +nim +ninja +nixpacks +nlopt +nmail +nmap +nmrpflash +nmstatectl +nng +nnn +node +node_exporter +node-build +node-sass +node@18 +node@20 +node@22 +nodeenv +nom +nomino +nopoll +noseyparker +notation +notcurses +noti +notifiers +notify +nox +nping +npm-check-updates +npth +nq +nrm +nrpe +ns-3 +nsd +nspr +nsq +nsync +ntfy +nuclei +nudoku +nuget +nuitka +numactl +numbat +numcpp +numpy +nuraft +nushell +nuspell +nut +nvc +nvchecker +nvimpager +nvm +nvtop +nzbget +oasdiff +oath-toolkit +oauth2_proxy +oauth2c +oauth2l +objfw +observerward +ocaml-findlib +ocaml-zarith +ocamlbuild +oci-cli +ocicl +ocl-icd +ocm +ocp +ocrmypdf +octave +octomap +octosql +odbc2parquet +ode +odo-dev +odpi +oggz +oh-my-posh +oha +oil +oils-for-unix +oj +oksh +okta-aws-cli +okta-awscli +okteto +ol +ollama +omake +omega +omniorb +ompl +onednn +onedpl +onedrive +onion-location +onionprobe +onnxruntime +ooniprobe +opa +opam +open-adventure +open-image-denoise +open-mesh +open-mpi +open62541 +openal-soft +openapi-diff +openapi-tui +openbao +openblas +opencl-clhpp-headers +opencl-headers +opencl-icd-loader +opencolorio +opencsg +opendetex +opendht +openexr +openfa +openfast +openfga +openfortivpn +openfpgaloader +openfst +openh264 +openiked +openimageio +openiothub-server +openj9 +openjazz +openjdk +openjdk@11 +openjdk@17 +openjdk@21 +openjdk@8 +openjpeg +openjph +openldap +openliberty-jakartaee8 +openliberty-microprofile4 +openliberty-webprofile8 +openlibm +openrct2 +openrtsp +opensaml +opensc +opensearch +openshift-cli +openssl@3 +openssl@3.0 +openstackclient +opentelemetry-cpp +opentofu +openttd +openvdb +openvpn +operator-sdk +opkssh +optipng +opus +or-tools +oranda +oras +orbiton +orbuculum +orc +orc-tools +ord +org-formation +orgalorg +orientdb +ormolu +orocos-kdl +ory-hydra +osc +osctrl-cli +osi +osinfo-db +osinfo-db-tools +osm2pgsql +osmcoastline +osmium-tool +ospray +osslsigncode +osv-scanner +otel-cli +otf2 +otree +ots +ott +ouch +ov +overarch +overmind +overtls +ox +oxipng +oxker +oxlint +p11-kit +p7zip +pacapt +packcc +packetbeat +packetq +packmol +pacparser +pagmo +pam-u2f +pan +pandoc +pandoc-crossref +pandoc-plot +pandocomatic +pango +pangomm +papilo +parallel +parallel-disk-usage +parallel-hashmap +parca +pari +parlay +parliament +parquet-cli +parsedmarc +partio +pass-git-helper +passenger +passt +pastel +patat +patchelf +payara +payload-dumper-go +pc6001vx +pcapplusplus +pcaudiolib +pciutils +pcl +pcre2 +pcsc-lite +pdal +pdfalyzer +pdfcpu +pdfgrep +pdfly +pdftk-java +pdm +pdns +pdnsrec +pedump +pegtl +percona-toolkit +percona-xtrabackup +percona-xtrabackup@8.0 +periscope +perl +perl-dbd-mysql +perltidy +peru +petsc +petsc-complex +pferd +pfetch-rs +pg_cron +pg_partman +pgbadger +pgbouncer +pgcli +pgformatter +pgpool-ii +pgrok +pgroonga +pgrouting +pgrx +pgweb +phive +phoronix-test-suite +php +php-code-sniffer +php-cs-fixer +php@8.1 +php@8.2 +php@8.3 +phpmyadmin +phpunit +phylum-cli +pianobar +pianod +picard-tools +picotool +pidgin +pie +pig +pike +piknik +pillow +pinact +pinboard-notes-backup +pinentry +pinocchio +pinot +pint +pioneer +pip-audit +pip-tools +pipdeptree +pipelight +pipenv +pipet +pipgrip +pipx +pivit +pivy +pixi +pixi-pack +pixie +pixman +pjproject +pkg-config-wrapper +pkgconf +pkgdiff +pkgx +pkl +pkl-lsp +plantuml +planus +platformio +plow +pluto +plzip +pmd +pmix +pmtiles +pnetcdf +pngquant +pnpm +pnpm@8 +pnpm@9 +po4a +pocketbase +pocl +poco +pocsuite3 +pod2man +podlet +podman +podman-compose +podofo +podsync +poetry +poke +policy_sentry +policy-engine +polkit +polynote +ponyc +popeye +portablegl +porter +poselib +postgis +postgresql@13 +postgresql@14 +postgresql@15 +postgresql@16 +postgresql@17 +postgrest +posting +poutine +powerline-go +powerman +powerman-dockerize +pqiv +pre-commit +precious +preevy +premake +presenterm +prestd +prestodb +prettier +prettierd +primecount +primesieve +principalmapper +prism-cli +privoxy +probe-rs-tools +procps +procs +profanity +proftpd +prog8 +proj +projectable +prometheus +prometheus-cpp +promptfoo +promtail +proper +proselint +proteinortho +proto +protobuf +protobuf-c +protobuf@29 +protoc-gen-doc +protoc-gen-go +protoc-gen-go-grpc +protoc-gen-grpc-java +protoc-gen-grpc-swift +protoc-gen-grpc-web +protolint +prowler +proxify +proxsuite +proxygen +proxytunnel +prqlc +prr +prs +psalm +pscale +pspg +psutils +psysh +pter +ptex +ptpython +pueue +pug +pugixml +pulsarctl +pumba +punktf +pure +pure-ftpd +purescript +purescript-language-server +pushpin +putty +pv +pwned +pwntools +py-spy +py3cairo +pybind11 +pycodestyle +pycparser +pyenv +pyenv-virtualenv +pygit2 +pygments +pygobject3 +pyinstaller +pylint +pylyzer +pymol +pymupdf +pyoxidizer +pypy +pypy3.10 +pyqt +pyqt-builder +pyright +pyside +pyside@2 +pytest +python-argcomplete +python-build +python-launcher +python-lsp-server +python-markdown +python-matplotlib +python-packaging +python-setuptools +python-yq +pythran +pyupgrade +qbe +qbec +qbittorrent-cli +qbs +qca +qcachegrind +qcli +qd +qdmr +qemu +qjackctl +qmmp +qpdf +qpid-proton +qrcp +qrtool +qshell +qsv +qthreads +qtkeychain +quantlib +quantum++ +quasi88 +quazip +questdb +quick-lint-js +quicktype +quictls +quill +quilt +quilt-installer +quotatool +qxmpp +r +rabbitmq +rabbitmq-c +radamsa +radare2 +rage +railway +rain +rainfrog +rakudo-star +ramalama +rancher-cli +ranger +rapidfuzz-cpp +rapidyaml +rasterio +ratarmount +ratchet +ratfor +ratify +rattler-build +rattler-index +rav1e +raven +raxml-ng +raylib +rbenv +rbw +rclone +rcs +rdb +rdfind +re-flex +re2c +readpe +rebar3 +recc +recode +recoverpy +redict +redis +redka +redocly-cli +redress +redwax-tool +regal +regclient +regina-rexx +regipy +rekor-cli +release-it +remarshal +remind +render +renovate +replxx +repo +repomix +reposurgeon +repren +reproc +restic +restish +restview +resvg +retire +reuse +reveal-md +revive +rex +rgbds +rhai +rhash +rhino +rhit +riemann +riemann-client +rio +rip2 +ripgrep-all +ripsecrets +riscv64-elf-gcc +risor +river +rizin +rke +rlwrap +rmlint +rmw +rnr +roadrunner +roapi +robin-map +roblox-ts +robot-framework +rocksdb +rogcat +rojo +rollup +ronn-ng +root +rosa-cli +rospo +roswell +rover +roxctl +rp +rpds-py +rpg-cli +rpki-client +rpl +rpmspectool +rqlite +rrdtool +rsgain +rshijack +rsnapshot +rswift +rsync +rsyncy +rsyslog +rtags +rtl_433 +rtorrent +rubberband +ruby +ruby-install +ruby-lsp +ruby@3.2 +ruby@3.3 +ruff +ruff-lsp +rune +runit +runitor +rure +rush +rush-parallel +rust +rust-analyzer +rust-parallel +rustcat +rustls-ffi +rustscan +rustup +rustywind +rye +ryelang +s-nail +s-search +s2geometry +s2n +s3-backer +s3fs +s3ql +s3scanner +s6 +sad +saf-cli +safety +sagittarius-scheme +samba +saml2aws +sbcl +sbom-tool +sbt +sby +sc-im +scala +scala@2.12 +scala@2.13 +scala@3.3 +scalapack +scalingo +scamper +scarb +scc +sccache +sceptre +schema-evolution-manager +schemathesis +scheme48 +scikit-image +scilla +scip +scipy +scm-manager +scnlib +scons +scooter +scorecard +scotch +scrapy +scrcpy +screen +screenfetch +scriptisto +scrypt +scs +scummvm +scummvm-tools +scw +sdb +sdcc +sdl2 +sdl2_image +sdl2_mixer +sdl2_sound +sdl2_ttf +sdl3 +sdl3_image +sdl3_ttf +sdlpop +sdns +seal +seam +seaweedfs +sec +secp256k1 +securefs +selene +selenium-server +semgrep +semver +sendme +senpai +sentencepiece +sentry-cli +sentry-native +seqkit +sequin +sequoia-sq +sequoia-sqv +ser2net +serd +serf +serialosc +serie +serpl +service-weaver +sesh +sextractor +sf +sfcgal +sfk +sfml +sh4d0wup +shaderc +shadowenv +shadowsocks-rust +shairport-sync +shallow-backup +shapelib +sheldon +shell2http +shellcheck +shellharden +shellz +shepherd +sherlock +shfmt +showcert +showkey +shtools +shub +shuffledns +shush +shuttle +siege +sigi +sigma-cli +signal-cli +signmykey +sigstore +sigsum-go +sile +silicon +silk +simde +simdjson +simdutf +simg2img +simgrid +simple-scan +sing-box +singular +sip +sipp +siril +sispmctl +sitefetch +six +sjk +sk +skaffold +skate +skeema +ski +skopeo +skylighting +slackcat +slackdump +sleef +slepc +slepc-complex +sleuthkit +slides +slirp4netns +sloc +sloth +slsa-verifier +slumber +slurm +smake +smartdns +smimesign +smug +sn0int +snakefmt +snakemake +snakeviz +snap +snapcast +snapcraft +snapraid +sng +sngrep +sniffer +sniffglue +sniffnet +snort +snowflake +snowflake-cli +snyk-cli +soapyremote +socat +soci +socket_vmnet +soft-serve +solargraph +solarus +solc-select +solhint +sollya +solr +solr@8.11 +sonar-scanner +sonic +sonobuoy +sophus +soplex +sops +sord +souffle +sound-touch +source-to-image +sourcekitten +sourcery +spacer +spack +spades +spatialindex +spawn-fcgi +spdlog +spectra +spectral-cli +spglib +sphinx-doc +spicetify-cli +spidermonkey +spidermonkey@115 +spiped +spirv-llvm-translator +sponge +spoofdpi +spot +spotbugs +spotify_player +spr +spytrap-adb +sq +sql-formatter +sql-migrate +sqlancer +sqlboiler +sqlc +sqlcipher +sqlcmd +sqlfluff +sqlite-utils +sqlmap +sqlpage +sqlparse +sqlx-cli +squashfuse +squealer +squid +squiid +sratom +sratoolkit +src +srgn +srt +srtp +sse2neon +ssh-audit +ssh-mitm +sshs +sshuttle +sshx +ssldump +sslh +sslscan +ssocr +stackql +stanc3 +stanford-corenlp +star +starlark-rust +statesmith +static-web-server +staticcheck +statix +stdman +steamguard-cli +steampipe +stellar-cli +stellar-core +stencil +step +stepci +stern +stgit +stockfish +storj-uplink +storm +stormlib +stow +stp +strace +streamlink +streamrip +streamvbyte +stress-ng +stripe-cli +stripe-mock +strongswan +structurizr-cli +sttr +stunnel +stylelint +stylish-haskell +subfinder +subliminal +subnetcalc +subversion +sui +suil +suite-sparse +sundials +superfile +superhtml +superlu +surfer +suricata +sv2v +svgbob +svgo +svlint +svls +svt-av1 +svtplay-dl +swagger-codegen +swagger-codegen@2 +swagger2markup-cli +swc +swctl +swi-prolog +swift-format +swift-protobuf +swift-sh +swiftformat +swiftplantuml +swig +swtpm +syft +symengine +symfony-cli +synchrony +syncthing +sysaidmin +sysdig +syslog-ng +sysprof +sysstat +systemc +systemd +t-completion +ta-lib +tabiew +tach +taglib +tailscale +tailspin +tailwindcss +tailwindcss-language-server +talhelper +talisman +talloc +talosctl +tanka +taplo +tarantool +tarlz +tarsnap +tartufo +task +taskopen +tbb +tbls +tbox +tccutil +tcl-tk +tcl-tk@8 +tcpdump +tcpreplay +tcpsplit +tcsh +tdb +tealdeer +tectonic +teensy_loader_cli +teip +tektoncd-cli +teku +telegraf +teleport +television +teller +telnet +telnetd +templ +template-glib +temporal +tendermint +tenere +tengo +tenv +tere +termbg +terminator +termscp +terracognita +terraform-cleaner +terraform-iam-policy-validator +terraform-inventory +terraform-local +terraform-ls +terraform-module-versions +terraform-provider-libvirt +terraformer +terragrunt +terragrunt-atlantis-config +terrahash +terramaid +terramate +terrascan +tesseract +testkube +testscript +testssl +tetra +tevent +tex-fmt +texinfo +texlab +texmath +text-embeddings-inference +texttest +tf-profile +tf-summarize +tfautomv +tfcmt +tfel +tfmigrate +tfmv +tfprovidercheck +tfproviderlint +tfschema +tfsec +tfsort +tfupdate +tgenv +tgpt +tgui +thanos +the-way +theharvester +threadweaver +threatcl +thrift +thriftgo +tig +tiger-vnc +tika +tile38 +timewarrior +timg +tin +tintin +tiny +tinymist +tinyproxy +tinysparql +tinyxml2 +tio +tippecanoe +titlecase +tkey-ssh-agent +tlsx +tmex +tml +tmpmail +tmpreaper +tmt +tmux-mem-cpu-load +tmux-sessionizer +tmux-xpanes +tmuxai +tmuxp +tmx +toast +todoist +todoman +tofuenv +toipe +tomcat +tomcat-native +tomcat@10 +tomcat@9 +tomee-plume +tomee-plus +tomee-webprofile +toml-test +toml11 +toot +topfew +topgit +topgrade +topiary +tor +torsocks +totp-cli +tox +toxcore +toxiproxy +tproxy +tracy +trader +traefik +traefik@2 +trafficserver +trafilatura +transcrypt +translate-toolkit +transmission-cli +trash-cli +travis +trdsql +tree +tree-sitter +treefmt +treefrog +triangle +trino +trippy +trivy +trojan-go +trufflehog +trurl +tsduck +tt +ttdl +tty-share +tty-solitaire +ttyd +ttyplot +tuisky +tup +twine +twitch-cli +txr +tygo +typescript +typescript-language-server +typeshare +typewritten +typical +typioca +typos-cli +typos-lsp +typst +typstyle +tz +tzdb +tzdiff +u-boot-tools +uade +ubi +ucloud +uffizzi +uftrace +ugit +ugrep +uhd +umka-lang +unar +unbound +uncover +undercutf1 +ungit +uni +uni-algo +uni2ascii +unibilium +unicorn +unison +unisonlang +universal-ctags +unoserver +unshield +unxip +uptimed +urdfdom +urdfdom_headers +uriparser +urlscan +urlwatch +usb.ids +usbredir +usbutils +userspace-rcu +utf8cpp +utf8proc +util-linux +util-macros +uutils-coreutils +uutils-diffutils +uutils-findutils +uuu +uv +uvg266 +uvicorn +uwsgi +v2ray +vala +valabind +vale +valgrind +valijson +valkey +vals +vapor +vapoursynth +varnish +vault-cli +vc +vcluster +vcsh +vdirsyncer +veclibfort +vedic +vegeta +veilid +velero +verapdf +vercel-cli +verilator +verovio +versitygw +veryfasttree +vet +vexctl +vfkit +vfox +vgmstream +vgrep +vgt +vhs +victorialogs +victoriametrics +viddy +video-compare +vifm +vile +vim +vineyard +vips +virtctl +virtualenv +virtualenvwrapper +virtualfish +virtuoso +virustotal-cli +vis +visidata +vit +vite +vitess +viu +vivid +vlang +vnstat +vnu +volk +volta +vorbis-tools +votca +vpn-slice +vrc-get +vsce +vscli +vscode-langservers-extracted +vsearch +vsh +vtclock +vte3 +vtk +vue-language-server +vulkan-extensionlayer +vulkan-headers +vulkan-loader +vulkan-profiles +vulkan-tools +vulkan-utility-libraries +vulkan-validationlayers +vulkan-volk +vulsio-gost +vultr +vulture +vunnel +vvdec +vvenc +wabt +waffle +wails +wakatime-cli +walk +wallpaper +wangle +wartremover +wasi-runtimes +wasm-component-ld +wasm-micro-runtime +wasm-pack +wasm-tools +wasmedge +wasmer +wasmtime +watch +watcher +watchexec +watchman +wavpack +wayland +wayland-protocols +wazero +wcslib +wcurl +weasyprint +weaver +weaviate +weaviate-cli +web-ext +webarchiver +webdis +webhook +webkitgtk +webp +webpack +websocat +webtorrent-cli +weechat +wego +weighttp +werf +west +wfa2-lib +wgcf +wget2 +wgo +whatmp3 +whisper-cpp +whistle +whois +widelands +wikibase-cli +wildfly-as +wildmidi +wimlib +winetricks +wiredtiger +wireguard-go +wiremock-standalone +wireshark +witness +wolfmqtt +wolfssl +woob +woodpecker-cli +woof-doom +wormhole-william +wpebackend-fdo +wrkflw +wstunnel +wtfis +wthrr +wumpus +wush +wxmaxima +wxpython +wxwidgets +x-cmd +x265 +x3270 +x86_64-elf-gcc +xa +xan +xapian +xauth +xbyak +xc +xcb-util-cursor +xcbeautify +xcdiff +xclogparser +xcodegen +xcresultparser +xctesthtmlreport +xdg-ninja +xdpyinfo +xeol +xerces-c +xfig +xgboost +xh +xinit +xk6 +xkbcomp +xkeyboard-config +xlsxio +xmake +xmlrpc-c +xmlsectool +xmount +xmq +xmrig +xnvme +xonsh +xorg-server +xorgproto +xplr +xq +xray +xroar +xrootd +xsimd +xtensor +xterm +xtrans +xurls +xwin +xxhash +xz +yadm +yaegi +yaf +yalantinglibs +yamale +yaml-language-server +yamlfix +yamlfmt +yamllint +yara +yara-x +yash +yaws +yaz +yazi +ydiff +yeet +yewtube +yices2 +ykman +yle-dl +yo +yoke +yor +yorkie +yosys +you-get +youplot +youtubedr +youtubeuploader +yozefu +yq +yt-dlp +ytt +yubico-piv-tool +yutu +yyjson +z.lua +z3 +zabbix +zabbix-cli +zbctl +zchunk +zeek +zellij +zenith +zenity +zeromq +zet +zf +zfind +zig +zigmod +zile +zim +zint +zipkin +zix +zizmor +zk +zlib +zlib-ng +zlib-ng-compat +zlib-rs +zlint +zlog +zls +zmap +znapzend +znc +zola +zookeeper +zoro +zoxide +zpaqfranz +zsh-autocomplete +zsh-autosuggestions +zsh-lovers +zsh-vi-mode +zsh-you-should-use +zshdb +zstd +zx +zydis diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000000..e1325ffe6515c --- /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 +updates: +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + day: monday + time: '08:00' + allow: + - dependency-type: all + ignore: + - dependency-name: actions/stale + groups: + artifacts: + patterns: + - actions/*-artifact + diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 0d0b1c994dd62..0000000000000 --- a/.github/stale.yml +++ /dev/null @@ -1 +0,0 @@ -_extends: .github diff --git a/.github/support.yml b/.github/support.yml deleted file mode 100644 index 0d0b1c994dd62..0000000000000 --- a/.github/support.yml +++ /dev/null @@ -1 +0,0 @@ -_extends: .github diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000000000..e1b1221a45c16 --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,93 @@ +name: actionlint + +on: + push: + branches: + - master + paths: + - '.github/workflows/*.ya?ml' + - 'Formula/a/actionlint.rb' + - 'Formula/s/shellcheck.rb' + - 'Formula/z/zizmor.rb' + pull_request: + paths: + - '.github/workflows/*.ya?ml' + +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: {} + +# FIXME: The `Install tools` step fails inside the Docker container for some reason. +jobs: + workflow_syntax: + if: github.repository_owner == 'Homebrew' + runs-on: ubuntu-latest + steps: + - name: Set up Homebrew + id: setup-homebrew + uses: Homebrew/actions/setup-homebrew@master + with: + core: true + cask: false + test-bot: false + + - name: Install tools + run: brew install actionlint shellcheck zizmor + + - name: Set up GITHUB_WORKSPACE + env: + HOMEBREW_TAP_REPOSITORY: ${{ steps.setup-homebrew.outputs.repository-path }} + run: | + # Annotations work only relative to GITHUB_WORKSPACE + (shopt -s dotglob; rm -rf "${GITHUB_WORKSPACE:?}"/*; mv "${HOMEBREW_TAP_REPOSITORY:?}"/* "$GITHUB_WORKSPACE") + rmdir "$HOMEBREW_TAP_REPOSITORY" + ln -vs "$GITHUB_WORKSPACE" "$HOMEBREW_TAP_REPOSITORY" + + - run: zizmor --format sarif . > results.sarif + + - name: Upload SARIF file + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: results.sarif + path: results.sarif + + - name: Set up actionlint + run: | + # Setting `shell: /bin/bash` prevents shellcheck from running on + # those steps, so let's change them to `shell: bash` for linting. + sed -i 's|shell: /bin/bash -x|shell: bash -x|' .github/workflows/*.y*ml + # 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 + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + steps: + - name: Download SARIF file + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + with: + name: results.sarif + path: results.sarif + + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17 + 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..03f07a8852faa --- /dev/null +++ b/.github/workflows/autobump.yml @@ -0,0 +1,65 @@ +name: Bump formulae on schedule or request + +on: + push: + branches: + - 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:master + env: + GNUPGHOME: /tmp/gnupghome + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + with: + core: true + cask: false + test-bot: false + + - name: Configure Git user + uses: Homebrew/actions/git-user-config@master + with: + username: ${{ (github.event_name == 'workflow_dispatch' && github.actor) || 'BrewTestBot' }} + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@master + 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 "${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..5f4dadb33dfc6 --- /dev/null +++ b/.github/workflows/automerge-from-merge-queue.yml @@ -0,0 +1,270 @@ +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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + 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:master + permissions: + contents: read + pull-requests: read + actions: write # to dispatch publish workflow + steps: + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master + with: + core: false + cask: false + test-bot: false + + - run: brew pr-publish "$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..52c95e75b534b --- /dev/null +++ b/.github/workflows/automerge-triggers.yml @@ -0,0 +1,25 @@ +name: Trigger automerge + +on: + pull_request_review: + types: + - submitted + pull_request_target: + types: + - unlabeled + - ready_for_review + +defaults: + run: + shell: bash -xeuo pipefail {0} + +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..79f6199ff811a --- /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@master + with: + run-id: ${{ github.event.workflow_run.id }} + workflow-name: Triage tasks + + - name: Download `event_payload` artifact + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.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" = "automerge-skip" ]] || + [[ "$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' + ) + 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:master + permissions: + contents: read + pull-requests: read + actions: write # to dispatch publish workflow + steps: + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master + with: + core: false + cask: false + test-bot: false + + - run: brew pr-publish "$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..2fd3e41a573ca --- /dev/null +++ b/.github/workflows/cache.yml @@ -0,0 +1,97 @@ +name: Populate gem cache + +on: + pull_request: + paths: + - .github/workflows/cache.yml + push: + paths: + - .github/workflows/cache.yml + branches: + - 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:master + outputs: + runners: ${{ steps.determine-runners.outputs.runners }} + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + with: + core: false + cask: false + test-bot: 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@master + with: + core: false + cask: false + test-bot: true + + - 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@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 + 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..5411d5f69d89d --- /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 + 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:master + 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@master + with: + core: false + cask: false + test-bot: 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..bd75b1be78698 --- /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:master + 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@master + 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@master + with: + core: true + cask: false + test-bot: 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" + )" + + reviewers="$(jq --compact-output '[.[].user.login]' <<< "$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@master + 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/master' || '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@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + pr: ${{ env.PR }} + message: Replacement PR dispatched + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@master + 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@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.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@master + 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@master + 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@master + 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..de006a7644734 --- /dev/null +++ b/.github/workflows/dispatch-build-bottle.yml @@ -0,0 +1,359 @@ +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:master + outputs: + runners: ${{steps.runner-matrix.outputs.result}} + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + with: + core: true + cask: false + test-bot: false + + - name: Prepare runner matrix + id: runner-matrix + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + 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:master", + 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, '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("https://github.com/HOMEBREW_RUNNER_MATRIX")) + formula_name = ENV.fetch("https://github.com/HOMEBREW_DISPATCHED_FORMULA") + formula = Formulary.factory(formula_name) + exit_code = 0 + + matrix.each do |entry| + runner = entry.fetch("https://github.com/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@master + 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@master + 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:master + 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@master + with: + core: true + cask: false + test-bot: false + + - name: Download bottles from GitHub Actions + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.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@master + with: + username: ${{ (github.actor != 'github-actions[bot]' && github.actor) || 'BrewTestBot' }} + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@master + with: + signing_key: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} + + - name: Generate build provenance + uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.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/master + + - 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@master + 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@master + 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@master + 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..d7296211efcdd --- /dev/null +++ b/.github/workflows/dispatch-rebottle.yml @@ -0,0 +1,299 @@ +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:master + outputs: + runners: ${{steps.determine-runners.outputs.runners}} + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + with: + core: true + cask: false + test-bot: 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@master + 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@master + 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:master + 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@master + with: + core: true + cask: false + test-bot: false + + - name: Download bottles from GitHub Actions + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + with: + pattern: bottles_* + path: ${{ env.BOTTLES_DIR }} + merge-multiple: true + + - name: Setup git + id: git-user-config + uses: Homebrew/actions/git-user-config@master + with: + username: ${{ (github.actor != 'github-actions[bot]' && github.actor) || 'BrewTestBot' }} + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@master + with: + signing_key: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} + + - name: Generate build provenance + uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.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/master + + - 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@master + 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@master + 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@master + 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..755ea199a470d --- /dev/null +++ b/.github/workflows/manage-pull-request-labels.yml @@ -0,0 +1,35 @@ +name: Manage pull request labels + +on: + pull_request_target: + types: + - 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 + PR: ${{ github.event.number }} + +jobs: + label: + permissions: + pull-requests: write # for `gh pr edit` + runs-on: ubuntu-latest + if: > + github.repository_owner == 'Homebrew' && + 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 }} diff --git a/.github/workflows/publish-commit-bottles.yml b/.github/workflows/publish-commit-bottles.yml index e8213ab687b13..27224fc2a274c 100644 --- a/.github/workflows/publish-commit-bottles.yml +++ b/.github/workflows/publish-commit-bottles.yml @@ -1,64 +1,497 @@ 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: - repository_dispatch: - types: - - 'Publish *' + 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: >- + 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: - upload: + check: runs-on: ubuntu-latest - env: - HOMEBREW_DEVELOPER: 1 - HOMEBREW_FORCE_HOMEBREW_ON_LINUX: 1 - HOMEBREW_NO_ANALYTICS: 1 - HOMEBREW_NO_AUTO_UPDATE: 1 + 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: Post comment once started + - 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")" + 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 "$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 + + 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" = "master" ]] + then + branch="$head_repo_owner/master" + remote_branch="master" + 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@master with: - token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}} - issue: ${{github.event.client_payload.pull_request}} - body: ':shipit: @${{github.actor}} has [triggered a merge](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}}).' - bot_body: ':robot: A scheduled task has [triggered a merge](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}}).' - bot: BrewTestBot - - name: Update Homebrew + 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: | - brew update-reset $(brew --repository) - - name: Checkout tap - uses: actions/checkout@v2 + # 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:master + 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@master with: - token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}} - fetch-depth: 0 - - name: Setup tap - run: | - rm -rf $(brew --repository ${{github.repository}}) - ln -s $GITHUB_WORKSPACE $(brew --repository ${{github.repository}}) - - name: Setup git + 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@master + with: + core: true + cask: false + test-bot: false + + - name: Configure Git user + id: git-user-config uses: Homebrew/actions/git-user-config@master - - name: Pull bottles + with: + username: ${{ (github.actor != 'github-actions[bot]' && github.actor) || 'BrewTestBot' }} + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@master + 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@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.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: - HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}} - HOMEBREW_BINTRAY_USER: brewtestbot - HOMEBREW_BINTRAY_KEY: ${{secrets.HOMEBREW_BINTRAY_KEY}} + 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: | - brew pr-pull --verbose ${{github.event.client_payload.pull_request}} + # 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@master + 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: ${{!success()}} + if: failure() uses: Homebrew/actions/post-comment@master with: - token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}} - issue: ${{github.event.client_payload.pull_request}} - body: ':warning: @${{github.actor}} bottle publish [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}}).' - bot_body: ':warning: Bottle publish [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}}).' - bot: BrewTestBot - - name: Dismiss approvals on failure - if: ${{!success()}} - uses: Homebrew/actions/dismiss-approvals@master - with: - token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}} - pr: ${{github.event.client_payload.pull_request}} - message: 'bottle publish failed' + 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@master + 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..4b0d0898f3213 --- /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@master + 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@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.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@master + 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@master + 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..0d96feec678dd --- /dev/null +++ b/.github/workflows/remove-disabled-packages.yml @@ -0,0 +1,105 @@ +name: Remove disabled packages + +on: + push: + branches: + - 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:master + 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@master + with: + core: true + cask: false + test-bot: false + + - name: Configure Git user + id: git-user-config + uses: Homebrew/actions/git-user-config@master + with: + username: BrewTestBot + + - name: Set up commit signing + uses: Homebrew/actions/setup-commit-signing@master + with: + signing_key: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} + + - name: Checkout removal branch + run: git checkout -b "$REMOVAL_BRANCH" origin/master + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} + + - name: Remove disabled packages + id: remove_disabled + uses: Homebrew/actions/remove-disabled-packages@master + env: + HOMEBREW_EVAL_ALL: 1 + + - name: Push commits + if: fromJson(steps.remove_disabled.outputs.packages-removed) + uses: Homebrew/actions/git-try-push@master + 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@master + with: + token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}} + base: master + 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@master + 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/scheduled.yml b/.github/workflows/scheduled.yml index b25b6d62c9c5b..3d23c61d7aa60 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -1,23 +1,177 @@ -name: Scheduled tasks +name: Scheduled online check on: + push: + branches: + - master + paths: + - .github/workflows/scheduled.yml schedule: - # Once every hour - - cron: '*/60 * * * *' + # 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: - autopublish: - if: github.repository == 'Homebrew/homebrew-core' + create_matrix: + if: startsWith( github.repository, 'Homebrew/' ) runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/ubuntu22.04:master + outputs: + json: ${{ steps.matrix.outputs.json }} env: - HOMEBREW_NO_ANALYTICS: 1 - HOMEBREW_NO_AUTO_UPDATE: 1 + TEST_COUNT: 50 steps: - - name: Update Homebrew + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + with: + core: true + cask: false + test-bot: false + + - name: Generate matrix + id: matrix + working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} run: | - brew update-reset $(brew --repo) - - name: Run automerge - env: - HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}} + # 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: | - brew pr-automerge --verbose --publish + 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:master + 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@master + with: + core: true + cask: false + test-bot: 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..d55a6ac6bdb5b --- /dev/null +++ b/.github/workflows/scripts/check-labels.js @@ -0,0 +1,141 @@ +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-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..608d2e65e9c5d --- /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@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.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@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.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/tests.yml b/.github/workflows/tests.yml index 03ee1719597d8..6ccfc7ee389a1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,174 +1,454 @@ -name: GitHub Actions CI +name: CI + on: push: - branches: master - pull_request: [] + branches: + - 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 == 'Homebrew/homebrew-core' - runs-on: ${{ matrix.os }} + if: github.repository_owner == 'Homebrew' strategy: matrix: - os: [ubuntu-latest, macOS-latest] + stable: [false, true] + name: tap_syntax${{ matrix.stable && ' (stable)' || '' }} + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.stable }} + container: + image: ghcr.io/homebrew/ubuntu22.04:${{ matrix.stable && 'latest' || 'master'}} + env: + HOMEBREW_SIMULATE_MACOS_ON_LINUX: 1 steps: - - name: Set up Homebrew - id: set-up-homebrew - run: | - if which brew &>/dev/null; then - HOMEBREW_PREFIX="$(brew --prefix)" - HOMEBREW_REPOSITORY="$HOMEBREW_PREFIX/Homebrew" - brew update-reset "$HOMEBREW_REPOSITORY" - - HOMEBREW_CORE_REPOSITORY="$HOMEBREW_REPOSITORY/Library/Taps/homebrew/homebrew-core" - git -C "$HOMEBREW_CORE_REPOSITORY" remote set-url origin "https://github.com/$GITHUB_REPOSITORY" - else - HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew - HOMEBREW_REPOSITORY="$HOMEBREW_PREFIX/Homebrew" - sudo mkdir -p "$HOMEBREW_PREFIX" - sudo git clone --depth=1 https://github.com/Homebrew/brew "$HOMEBREW_REPOSITORY" - - HOMEBREW_CORE_REPOSITORY="$HOMEBREW_REPOSITORY/Library/Taps/homebrew/homebrew-core" - sudo mkdir -p "$HOMEBREW_CORE_REPOSITORY" - git -C "$HOMEBREW_CORE_REPOSITORY" init - git -C "$HOMEBREW_CORE_REPOSITORY" remote add origin "https://github.com/$GITHUB_REPOSITORY" - - cd "$HOMEBREW_PREFIX" - sudo mkdir -p bin etc include lib opt sbin share var/homebrew/linked Cellar - sudo ln -sf ../Homebrew/bin/brew "$HOMEBREW_PREFIX/bin/" - cd - - fi - - export PATH="$HOMEBREW_PREFIX/bin:$PATH" - echo "::add-path::$HOMEBREW_PREFIX/bin" - - GEMS_PATH="$HOMEBREW_REPOSITORY/Library/Homebrew/vendor/bundle/ruby/" - echo "::set-output name=gems-path::$GEMS_PATH" - GEMS_HASH=$(shasum -a 256 "$HOMEBREW_REPOSITORY/Library/Homebrew/Gemfile.lock" | cut -f1 -d' ') - echo "::set-output name=gems-hash::$GEMS_HASH" - - cd "$HOMEBREW_CORE_REPOSITORY" - rm -rf "$GITHUB_WORKSPACE" - ln -s "$HOMEBREW_CORE_REPOSITORY" "$GITHUB_WORKSPACE" - git fetch origin "${{github.sha}}" - git checkout --force -B master FETCH_HEAD - cd - - - if [ "$RUNNER_OS" = "Linux" ]; then - sudo chown -R "$USER" "$HOMEBREW_PREFIX" - sudo chmod -R g-w,o-w "$HOMEBREW_CORE_REPOSITORY" - fi - - - name: Set up Ruby - if: matrix.os == 'ubuntu-latest' - uses: actions/setup-ruby@master - with: - ruby-version: '2.6' - - - name: Cache Bundler RubyGems - id: cache - uses: actions/cache@v1 - with: - path: ${{ steps.set-up-homebrew.outputs.gems-path }} - key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} - restore-keys: ${{ runner.os }}-rubygems- - - - name: Install Bundler RubyGems - if: steps.cache.outputs.cache-hit != 'true' - run: brew install-bundler-gems - - - name: Install taps - run: | - export HOMEBREW_NO_AUTO_UPDATE=1 - brew tap homebrew/test-bot - - - name: Run brew test-bot --only-tap-syntax - run: brew test-bot --only-tap-syntax + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + with: + core: true + cask: false + test-bot: true + stable: ${{ matrix.stable }} + + - name: Cache style cache + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 + with: + path: /home/linuxbrew/.cache/Homebrew/style + key: style-cache-${{ matrix.stable && 'stable-' || 'master-' }}${{ github.sha }} + restore-keys: style-cache-${{ matrix.stable && 'stable-' || 'master-' }} + + - 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:master + 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@master + with: + core: true + cask: false + test-bot: true + + - 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') + 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + + - name: Check for CI labels + id: check-labels + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + 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:master + 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@master + with: + core: true + cask: false + test-bot: 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 - if: github.event_name == 'pull_request' + 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: - version: [10.15, 10.14, 10.13] - fail-fast: false - runs-on: ${{ matrix.version }} - timeout-minutes: 4320 + 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: - HOMEBREW_GIT_NAME: BrewTestBot - HOMEBREW_GIT_EMAIL: 'homebrew-test-bot@lists.sfconservancy.org' - PATH: '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin' - HOMEBREW_DEVELOPER: 1 - HOMEBREW_NO_ANALYTICS: 1 - HOMEBREW_NO_AUTO_UPDATE: 1 - GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED: 1 GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + HOMEBREW_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} + BOTTLES_DIR: ${{matrix.workdir || github.workspace}}/bottles steps: - - name: Update Homebrew - run: brew update-reset + - name: Pre-test steps + uses: Homebrew/actions/pre-build@master + with: + bottles-directory: ${{ env.BOTTLES_DIR }} + cleanup: ${{ matrix.cleanup }} - - name: Set up Git repository + - name: Test formulae + id: brew-test-bot-formulae run: | - cd $(brew --repo ${{github.repository}}) - git clean -ffdx - git fetch --prune --force origin master - git fetch --prune --force origin ${{github.sha}} - git checkout --force ${{github.sha}} - git log -1 + # shellcheck disable=SC2086 + brew test-bot $TEST_BOT_FORMULAE_ARGS \ + --testing-formulae="$TESTING_FORMULAE" \ + --added-formulae="$ADDED_FORMULAE" \ + --deleted-formulae="$DELETED_FORMULAE" + 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: Run brew test-bot --only-cleanup-before - run: brew test-bot --only-cleanup-before + - name: Post-build steps + if: always() + uses: Homebrew/actions/post-build@master + with: + runner: ${{ matrix.runner }} + cleanup: ${{ matrix.cleanup }} + bottles-directory: ${{ env.BOTTLES_DIR }} + logs-directory: ${{ format('{0}/logs', env.BOTTLES_DIR) }} - - name: Run brew test-bot --only-setup - run: brew test-bot --only-setup + 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false - - name: Run brew test-bot --only-formulae - run: | - rm -rf bottles - mkdir bottles - cd bottles - brew test-bot --only-formulae + - name: Check for CI labels + id: check-labels + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + 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`)) - - name: Output brew test-bot --only-formulae failures - if: always() - run: | - cat bottles/steps_output.txt - rm bottles/steps_output.txt + const formulae_detect = { + testing_formulae: `${process.env.TESTING_FORMULAE}`, + added_formulae: `${process.env.ADDED_FORMULAE}`, + deleted_formulae: `${process.env.DELETED_FORMULAE}` + } - - name: Upload logs - if: failure() - uses: actions/upload-artifact@v2 + 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:master + 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@master with: - name: logs (${{ matrix.version }}) - path: bottles/logs + core: true + cask: false + test-bot: false - - name: Delete logs and home - if: always() - run: | - rm -rf bottles/logs - rm -rf bottles/home + - name: Determine runners to use for test_deps job + id: determine-dependent-runners + run: brew determine-test-runners --dependents --eval-all "$TESTING_FORMULAE" - - name: Count bottles - id: bottles - if: always() - run: | - cd bottles - count=$(ls *.json | wc -l | xargs echo -n) - echo "$count bottles" - echo "::set-output name=count::$count" - - - name: Upload bottles - if: always() && steps.bottles.outputs.count > 0 - uses: actions/upload-artifact@v2 + 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@master with: - name: bottles - path: bottles + bottles-directory: ${{ env.BOTTLES_DIR }} + cleanup: ${{ matrix.cleanup }} + download-bottles: true - - name: Run brew test-bot --only-cleanup-after - if: always() - run: brew test-bot --only-cleanup-after + - name: Test dependents + run: | + # shellcheck disable=SC2086 + brew test-bot $TEST_BOT_DEPENDENTS_ARGS \ + --testing-formulae="$TESTING_FORMULAE" \ + --tested-formulae="$TESTED_FORMULAE" + 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: Cleanup + - name: Steps summary and cleanup if: always() + uses: Homebrew/actions/post-build@master + 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: | - find . - rm -rf * + 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..1355cee72477b --- /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@master + with: + run-id: ${{ github.event.workflow_run.id }} + workflow-name: Triage tasks + + - name: Download `event_payload` artifact + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.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..cf9715b23db7f --- /dev/null +++ b/.github/workflows/triage.yml @@ -0,0 +1,378 @@ +name: Triage tasks + +on: pull_request_target + +env: + GH_REPO: ${{ github.repository }} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: event_payload + path: ${{ github.event_path }} + + workflows-label: + permissions: + contents: read + issues: write + pull-requests: write + if: always() && github.repository_owner == 'Homebrew' + runs-on: ubuntu-latest + steps: + - name: Check pull request changed files + id: files + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ github.event.number }} + 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 }} + PR: ${{ github.event.number }} + run: gh pr edit --add-label workflows "$PR" --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@master + with: + token: ${{secrets.GITHUB_TOKEN}} + + - name: Label pull request + uses: Homebrew/actions/label-pull-requests@master + 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@17.rb + - Formula/p/python@3.13.rb + - Formula/p/python-gdbm@3.13.rb + - Formula/p/python-tk@3.13.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|\ + mame|\ + metashell|\ + mlkit|\ + mpich|\ + node|\ + octave|\ + opencascade|\ + openfast|\ + openvino|\ + pcl|\ + percona-server|\ + ponyc|\ + pytorch|\ + qt|\ + 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|\ + dav1d|\ + freetype|\ + 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|\ + p11-kit|\ + pango|\ + pcre2|\ + python@3.13|\ + rav1e|\ + rust|\ + sdl2|\ + shared-mime-info|\ + suite-sparse|\ + qt|\ + 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|curl|gettext|openssl@3|sqlite|systemd).rb + keep_if_no_match: true + + - label: CI-linux-self-hosted + path: "Formula/.+/(\ + dart-sdk|\ + envoy|\ + qt(@5)?|\ + 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|\ + python@3.13|\ + wayland-protocols|\ + zlib|\ + ).rb" + keep_if_no_match: true + allow_any_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: autobump + path: \.github/autobump\.txt + allow_any_match: true + + - label: alias + path: Aliases/.+ + allow_any_match: true diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 0000000000000..37fe3fad5699a --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,5 @@ +rules: + unpinned-uses: + config: + policies: + Homebrew/actions/*: ref-pin diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000000000..7644694bd654e --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,230 @@ +# 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/{dsl,gems}/**/*.rbi + - Homebrew/sorbet/rbi/parser*.rbi + - Homebrew/bin/* + - Homebrew/vendor/**/* + - Taps/*/*/vendor/**/* + - "**/vendor/**/*" + SuggestExtensions: + rubocop-minitest: false +Layout/ArgumentAlignment: + Exclude: + - Taps/*/*/*.rb + - "/**/Formula/**/*.rb" + - "**/Formula/**/*.rb" +Layout/CaseIndentation: + EnforcedStyle: end +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/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..6cb9d3dd0d6d6 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.4.3 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/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@11 b/Aliases/ansible@11 new file mode 120000 index 0000000000000..f450e2c00ab37 --- /dev/null +++ b/Aliases/ansible@11 @@ -0,0 +1 @@ +../Formula/a/ansible.rb \ No newline at end of file diff --git a/Aliases/ansible@2.9 b/Aliases/ansible@2.9 deleted file mode 120000 index 875b454391541..0000000000000 --- a/Aliases/ansible@2.9 +++ /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/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-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 index 8171358cac588..cdfa7f7a563af 120000 --- a/Aliases/awscli@2 +++ b/Aliases/awscli@2 @@ -1 +1 @@ -../Formula/awscli.rb \ No newline at end of file +../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.6 b/Aliases/bison@3.6 deleted file mode 120000 index 152bb4efd35cd..0000000000000 --- a/Aliases/bison@3.6 +++ /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.72 b/Aliases/boost-python@1.72 deleted file mode 120000 index 3146c5214b7d8..0000000000000 --- a/Aliases/boost-python@1.72 +++ /dev/null @@ -1 +0,0 @@ -../Formula/boost-python.rb \ No newline at end of file diff --git a/Aliases/boost@1.72 b/Aliases/boost@1.72 deleted file mode 120000 index 5a8467daa6ed4..0000000000000 --- a/Aliases/boost@1.72 +++ /dev/null @@ -1 +0,0 @@ -../Formula/boost.rb \ No newline at end of file diff --git a/Aliases/boost@1.88 b/Aliases/boost@1.88 new file mode 120000 index 0000000000000..402bbeb4503ca --- /dev/null +++ b/Aliases/boost@1.88 @@ -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 index 401fae7d6094a..433f8f2e8dc2c 120000 --- a/Aliases/ck +++ b/Aliases/ck @@ -1 +1 @@ -../Formula/concurrencykit.rb \ No newline at end of file +../Formula/c/concurrencykit.rb \ No newline at end of file diff --git a/Aliases/clang-format@20 b/Aliases/clang-format@20 new file mode 120000 index 0000000000000..3df5956deb298 --- /dev/null +++ b/Aliases/clang-format@20 @@ -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/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@7.6 b/Aliases/elasticsearch@7.6 deleted file mode 120000 index e54cdefb60c65..0000000000000 --- a/Aliases/elasticsearch@7.6 +++ /dev/null @@ -1 +0,0 @@ -../Formula/elasticsearch.rb \ No newline at end of file diff --git a/Aliases/erlang@23 b/Aliases/erlang@23 deleted file mode 120000 index 14434d7c387c6..0000000000000 --- a/Aliases/erlang@23 +++ /dev/null @@ -1 +0,0 @@ -../Formula/erlang.rb \ No newline at end of file diff --git a/Aliases/erlang@27 b/Aliases/erlang@27 new file mode 120000 index 0000000000000..3d5032c1a06ae --- /dev/null +++ b/Aliases/erlang@27 @@ -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@7 b/Aliases/ffmpeg@7 new file mode 120000 index 0000000000000..79a0f0e744d56 --- /dev/null +++ b/Aliases/ffmpeg@7 @@ -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/freetype2 b/Aliases/freetype2 index 8ab03957f78fc..2acd6d240ec17 120000 --- a/Aliases/freetype2 +++ b/Aliases/freetype2 @@ -1 +1 @@ -../Formula/freetype.rb \ No newline at end of file +../Formula/f/freetype.rb \ No newline at end of file diff --git a/Aliases/gcc@10 b/Aliases/gcc@10 deleted file mode 120000 index f4c8842b0a913..0000000000000 --- a/Aliases/gcc@10 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gcc.rb \ No newline at end of file diff --git a/Aliases/gcc@14 b/Aliases/gcc@14 new file mode 120000 index 0000000000000..fb3d3f537b00b --- /dev/null +++ b/Aliases/gcc@14 @@ -0,0 +1 @@ +../Formula/g/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.10 b/Aliases/ghc@8.10 deleted file mode 120000 index d00ca34b11178..0000000000000 --- a/Aliases/ghc@8.10 +++ /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.84 b/Aliases/glibmm@2.84 new file mode 120000 index 0000000000000..9a1261d105f30 --- /dev/null +++ b/Aliases/glibmm@2.84 @@ -0,0 +1 @@ +../Formula/g/glibmm.rb \ No newline at end of file diff --git a/Aliases/gmt@6 b/Aliases/gmt@6 deleted file mode 120000 index fd26522330cfc..0000000000000 --- a/Aliases/gmt@6 +++ /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.14 b/Aliases/go@1.14 deleted file mode 120000 index 5547ea3f3f8a6..0000000000000 --- a/Aliases/go@1.14 +++ /dev/null @@ -1 +0,0 @@ -../Formula/go.rb \ No newline at end of file diff --git a/Aliases/go@1.24 b/Aliases/go@1.24 new file mode 120000 index 0000000000000..3dda9a799d7b7 --- /dev/null +++ b/Aliases/go@1.24 @@ -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@6 b/Aliases/gradle@6 deleted file mode 120000 index 84fdfdcfee505..0000000000000 --- a/Aliases/gradle@6 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gradle.rb \ No newline at end of file diff --git a/Aliases/gradle@8 b/Aliases/gradle@8 new file mode 120000 index 0000000000000..5fff19e6e5a51 --- /dev/null +++ b/Aliases/gradle@8 @@ -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.72 b/Aliases/grpc@1.72 new file mode 120000 index 0000000000000..76feb7444debd --- /dev/null +++ b/Aliases/grpc@1.72 @@ -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@3 b/Aliases/guile@3 index 593d0f9c103b1..b37c387266ac6 120000 --- a/Aliases/guile@3 +++ b/Aliases/guile@3 @@ -1 +1 @@ -../Formula/guile.rb \ No newline at end of file +../Formula/g/guile.rb \ No newline at end of file diff --git a/Aliases/haproxy@3.1 b/Aliases/haproxy@3.1 new file mode 120000 index 0000000000000..c70c2a801f359 --- /dev/null +++ b/Aliases/haproxy@3.1 @@ -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.12 b/Aliases/hdf5@1.12 deleted file mode 120000 index c216ee9544a12..0000000000000 --- a/Aliases/hdf5@1.12 +++ /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/helm@3 b/Aliases/helm@3 deleted file mode 120000 index 2becc60bacb54..0000000000000 --- a/Aliases/helm@3 +++ /dev/null @@ -1 +0,0 @@ -../Formula/helm.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@2 b/Aliases/influxdb@2 new file mode 120000 index 0000000000000..e76a478e4a968 --- /dev/null +++ b/Aliases/influxdb@2 @@ -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 index 1be37a520b9a3..722b08365db6b 120000 --- a/Aliases/iwyu +++ b/Aliases/iwyu @@ -1 +1 @@ -../Formula/include-what-you-use.rb \ No newline at end of file +../Formula/i/include-what-you-use.rb \ No newline at end of file diff --git a/Aliases/java b/Aliases/java index a823cf208c0f5..25d05e0c38ade 120000 --- a/Aliases/java +++ b/Aliases/java @@ -1 +1 @@ -../Formula/openjdk.rb \ No newline at end of file +../Formula/o/openjdk.rb \ No newline at end of file diff --git a/Aliases/java11 b/Aliases/java11 index 7f4aee39d51b1..497169f869379 120000 --- a/Aliases/java11 +++ b/Aliases/java11 @@ -1 +1 @@ -../Formula/openjdk@11.rb \ No newline at end of file +../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/karchive b/Aliases/karchive deleted file mode 120000 index 4abb4debdb685..0000000000000 --- a/Aliases/karchive +++ /dev/null @@ -1 +0,0 @@ -../Formula/kde-karchive.rb \ No newline at end of file diff --git a/Aliases/kdoctools b/Aliases/kdoctools deleted file mode 120000 index fd16d6f991062..0000000000000 --- a/Aliases/kdoctools +++ /dev/null @@ -1 +0,0 @@ -../Formula/kde-kdoctools.rb \ No newline at end of file diff --git a/Aliases/ki18n b/Aliases/ki18n deleted file mode 120000 index 432f181a53da6..0000000000000 --- a/Aliases/ki18n +++ /dev/null @@ -1 +0,0 @@ -../Formula/kde-ki18n.rb \ No newline at end of file diff --git a/Aliases/kibana@7.6 b/Aliases/kibana@7.6 deleted file mode 120000 index 8d9eaa880c8cd..0000000000000 --- a/Aliases/kibana@7.6 +++ /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.33 b/Aliases/kubernetes-cli@1.33 new file mode 120000 index 0000000000000..0df591bc589c6 --- /dev/null +++ b/Aliases/kubernetes-cli@1.33 @@ -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 index 45926c0e546d3..b06ab3f95d583 120000 --- a/Aliases/libcouchbase@3 +++ b/Aliases/libcouchbase@3 @@ -1 +1 @@ -../Formula/libcouchbase.rb \ No newline at end of file +../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/libpqxx@7 b/Aliases/libpqxx@7 deleted file mode 120000 index c01841e167f8f..0000000000000 --- a/Aliases/libpqxx@7 +++ /dev/null @@ -1 +0,0 @@ -../Formula/libpqxx.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 index 552915ac2db0d..bb34e9a4483b3 120000 --- a/Aliases/libsigc++@3 +++ b/Aliases/libsigc++@3 @@ -1 +1 @@ -../Formula/libsigc++.rb \ No newline at end of file +../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/libtensorflow@2 b/Aliases/libtensorflow@2 deleted file mode 120000 index 19bbc51f20427..0000000000000 --- a/Aliases/libtensorflow@2 +++ /dev/null @@ -1 +0,0 @@ -../Formula/libtensorflow.rb \ No newline at end of file diff --git a/Aliases/libvips b/Aliases/libvips index c06ab07bd40bc..5b403ec37a4ae 120000 --- a/Aliases/libvips +++ b/Aliases/libvips @@ -1 +1 @@ -../Formula/vips.rb \ No newline at end of file +../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@20 b/Aliases/lld@20 new file mode 120000 index 0000000000000..789ca30241210 --- /dev/null +++ b/Aliases/lld@20 @@ -0,0 +1 @@ +../Formula/l/lld.rb \ No newline at end of file diff --git a/Aliases/llvm@10 b/Aliases/llvm@10 deleted file mode 120000 index 08e217ab6049a..0000000000000 --- a/Aliases/llvm@10 +++ /dev/null @@ -1 +0,0 @@ -../Formula/llvm.rb \ No newline at end of file diff --git a/Aliases/llvm@20 b/Aliases/llvm@20 new file mode 120000 index 0000000000000..5251b0d981566 --- /dev/null +++ b/Aliases/llvm@20 @@ -0,0 +1 @@ +../Formula/l/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.4 b/Aliases/mariadb@10.4 deleted file mode 120000 index e4a1665ba58c4..0000000000000 --- a/Aliases/mariadb@10.4 +++ /dev/null @@ -1 +0,0 @@ -../Formula/mariadb.rb \ No newline at end of file diff --git a/Aliases/mariadb@11.7 b/Aliases/mariadb@11.7 new file mode 120000 index 0000000000000..286d10f60dc80 --- /dev/null +++ b/Aliases/mariadb@11.7 @@ -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-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/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/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@8.0 b/Aliases/mysql-client@8.0 deleted file mode 120000 index af16725c79c6e..0000000000000 --- a/Aliases/mysql-client@8.0 +++ /dev/null @@ -1 +0,0 @@ -../Formula/mysql-client.rb \ No newline at end of file diff --git a/Aliases/mysql-client@9.3 b/Aliases/mysql-client@9.3 new file mode 120000 index 0000000000000..0486f754ef8c7 --- /dev/null +++ b/Aliases/mysql-client@9.3 @@ -0,0 +1 @@ +../Formula/m/mysql-client.rb \ No newline at end of file diff --git a/Aliases/mysql-connector-c++@8.0 b/Aliases/mysql-connector-c++@8.0 deleted file mode 120000 index e3dff3bfbd9f2..0000000000000 --- a/Aliases/mysql-connector-c++@8.0 +++ /dev/null @@ -1 +0,0 @@ -../Formula/mysql-connector-c++.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.3 b/Aliases/mysql@9.3 new file mode 120000 index 0000000000000..4f2ad1d91f9ae --- /dev/null +++ b/Aliases/mysql@9.3 @@ -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@14 b/Aliases/node@14 deleted file mode 120000 index 3acecf25b5c15..0000000000000 --- a/Aliases/node@14 +++ /dev/null @@ -1 +0,0 @@ -../Formula/node.rb \ No newline at end of file diff --git a/Aliases/node@23 b/Aliases/node@23 new file mode 120000 index 0000000000000..0b6ed0e182659 --- /dev/null +++ b/Aliases/node@23 @@ -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/numpy@1.19 b/Aliases/numpy@1.19 deleted file mode 120000 index 13f6b92b79c69..0000000000000 --- a/Aliases/numpy@1.19 +++ /dev/null @@ -1 +0,0 @@ -../Formula/numpy.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 index 884a3655ec77e..37d1681c7393f 120000 --- a/Aliases/o-make +++ b/Aliases/o-make @@ -1 +1 @@ -../Formula/omake.rb \ No newline at end of file +../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@14 b/Aliases/openjdk@14 deleted file mode 120000 index a823cf208c0f5..0000000000000 --- a/Aliases/openjdk@14 +++ /dev/null @@ -1 +0,0 @@ -../Formula/openjdk.rb \ No newline at end of file diff --git a/Aliases/openjdk@23 b/Aliases/openjdk@23 new file mode 120000 index 0000000000000..25d05e0c38ade --- /dev/null +++ b/Aliases/openjdk@23 @@ -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 index 0aa8df3d2acd7..96ca3b908887d 120000 --- a/Aliases/openssl +++ b/Aliases/openssl @@ -1 +1 @@ -../Formula/openssl@1.1.rb \ No newline at end of file +../Formula/o/openssl@3.rb \ No newline at end of file diff --git a/Aliases/openssl@3.5 b/Aliases/openssl@3.5 new file mode 120000 index 0000000000000..96ca3b908887d --- /dev/null +++ b/Aliases/openssl@3.5 @@ -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@8.0 b/Aliases/percona-server@8.0 deleted file mode 120000 index 00b678d36f3fd..0000000000000 --- a/Aliases/percona-server@8.0 +++ /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.32 b/Aliases/perl@5.32 deleted file mode 120000 index fc0ae6a3542eb..0000000000000 --- a/Aliases/perl@5.32 +++ /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.4 b/Aliases/php@7.4 deleted file mode 120000 index 5ec1a2cc804ef..0000000000000 --- a/Aliases/php@7.4 +++ /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@12 b/Aliases/postgresql@12 deleted file mode 120000 index 0e4f62d343485..0000000000000 --- a/Aliases/postgresql@12 +++ /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.12 b/Aliases/protobuf@3.12 deleted file mode 120000 index a449c83f02f07..0000000000000 --- a/Aliases/protobuf@3.12 +++ /dev/null @@ -1 +0,0 @@ -../Formula/protobuf.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/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/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 index e4fdffb6ddd77..0442a879a6808 120000 --- a/Aliases/python +++ b/Aliases/python @@ -1 +1 @@ -../Formula/python@3.8.rb \ No newline at end of file +../Formula/p/python@3.13.rb \ No newline at end of file diff --git a/Aliases/python-gdbm b/Aliases/python-gdbm new file mode 120000 index 0000000000000..0f2a8346ac2ba --- /dev/null +++ b/Aliases/python-gdbm @@ -0,0 +1 @@ +../Formula/p/python-gdbm@3.13.rb \ No newline at end of file diff --git a/Aliases/python-tk b/Aliases/python-tk new file mode 120000 index 0000000000000..4315b0957beec --- /dev/null +++ b/Aliases/python-tk @@ -0,0 +1 @@ +../Formula/p/python-tk@3.13.rb \ No newline at end of file diff --git a/Aliases/python3 b/Aliases/python3 index e4fdffb6ddd77..0442a879a6808 120000 --- a/Aliases/python3 +++ b/Aliases/python3 @@ -1 +1 @@ -../Formula/python@3.8.rb \ No newline at end of file +../Formula/p/python@3.13.rb \ No newline at end of file diff --git a/Aliases/python@3 b/Aliases/python@3 index e4fdffb6ddd77..0442a879a6808 120000 --- a/Aliases/python@3 +++ b/Aliases/python@3 @@ -1 +1 @@ -../Formula/python@3.8.rb \ No newline at end of file +../Formula/p/python@3.13.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@6.0 b/Aliases/redis@6.0 deleted file mode 120000 index aa595fa34cd43..0000000000000 --- a/Aliases/redis@6.0 +++ /dev/null @@ -1 +0,0 @@ -../Formula/redis.rb \ No newline at end of file diff --git a/Aliases/redis@8.0 b/Aliases/redis@8.0 new file mode 120000 index 0000000000000..ffacee2e43761 --- /dev/null +++ b/Aliases/redis@8.0 @@ -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 index be84ca04cc592..f6b2a9c0d6398 120000 --- a/Aliases/rga +++ b/Aliases/rga @@ -1 +1 @@ -../Formula/ripgrep-all.rb \ No newline at end of file +../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 b/Aliases/ruby@2 new file mode 120000 index 0000000000000..369908ec4cc5b --- /dev/null +++ b/Aliases/ruby@2 @@ -0,0 +1 @@ +../Formula/r/ruby@2.7.rb \ No newline at end of file diff --git a/Aliases/ruby@2.7 b/Aliases/ruby@2.7 deleted file mode 120000 index c725ef9048af8..0000000000000 --- a/Aliases/ruby@2.7 +++ /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.13 b/Aliases/scala@2.13 deleted file mode 120000 index b28057a0efde9..0000000000000 --- a/Aliases/scala@2.13 +++ /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@8.5 b/Aliases/solr@8.5 deleted file mode 120000 index cceb22ad842ef..0000000000000 --- a/Aliases/solr@8.5 +++ /dev/null @@ -1 +0,0 @@ -../Formula/solr.rb \ No newline at end of file diff --git a/Aliases/solr@9.8 b/Aliases/solr@9.8 new file mode 120000 index 0000000000000..5c36691464f21 --- /dev/null +++ b/Aliases/solr@9.8 @@ -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@128 b/Aliases/spidermonkey@128 new file mode 120000 index 0000000000000..b401a72ee8edb --- /dev/null +++ b/Aliases/spidermonkey@128 @@ -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.14 b/Aliases/subversion@1.14 deleted file mode 120000 index 5a000aa104c22..0000000000000 --- a/Aliases/subversion@1.14 +++ /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 index a151db38e9f8b..c9829763bc382 120000 --- a/Aliases/swagger-codegen@3 +++ b/Aliases/swagger-codegen@3 @@ -1 +1 @@ -../Formula/swagger-codegen.rb \ No newline at end of file +../Formula/s/swagger-codegen.rb \ No newline at end of file diff --git a/Aliases/swig@4 b/Aliases/swig@4 deleted file mode 120000 index 0d1a33d7ad9fa..0000000000000 --- a/Aliases/swig@4 +++ /dev/null @@ -1 +0,0 @@ -../Formula/swig.rb \ No newline at end of file diff --git a/Aliases/swig@4.0 b/Aliases/swig@4.0 deleted file mode 120000 index 0d1a33d7ad9fa..0000000000000 --- a/Aliases/swig@4.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/terraform@0.12 b/Aliases/terraform@0.12 deleted file mode 120000 index c96e1ed7d6521..0000000000000 --- a/Aliases/terraform@0.12 +++ /dev/null @@ -1 +0,0 @@ -../Formula/terraform.rb \ No newline at end of file diff --git a/Aliases/thrift@0.13 b/Aliases/thrift@0.13 deleted file mode 120000 index 5973f36cd4848..0000000000000 --- a/Aliases/thrift@0.13 +++ /dev/null @@ -1 +0,0 @@ -../Formula/thrift.rb \ No newline at end of file diff --git a/Aliases/thrift@0.21 b/Aliases/thrift@0.21 new file mode 120000 index 0000000000000..7d65993396a0a --- /dev/null +++ b/Aliases/thrift@0.21 @@ -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@2 b/Aliases/traefik@2 deleted file mode 120000 index 43cc529f3ff28..0000000000000 --- a/Aliases/traefik@2 +++ /dev/null @@ -1 +0,0 @@ -../Formula/traefik.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/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 64a13fa03ac31..fff0f2f856ec6 120000 --- a/Aliases/usb-multiplex-daemon +++ b/Aliases/usb-multiplex-daemon @@ -1 +1 @@ -../Formula/libusbmuxd.rb \ No newline at end of file +../Formula/lib/libusbmuxd.rb \ No newline at end of file diff --git a/Aliases/v8@8.3 b/Aliases/v8@8.3 deleted file mode 120000 index c08cedfb44694..0000000000000 --- a/Aliases/v8@8.3 +++ /dev/null @@ -1 +0,0 @@ -../Formula/v8.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/vimcat b/Aliases/vimcat index 71a74b516241b..8925970fd50cb 120000 --- a/Aliases/vimcat +++ b/Aliases/vimcat @@ -1 +1 @@ -../Formula/vimpager.rb \ No newline at end of file +../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.2 b/Aliases/wxwidgets@3.2 new file mode 120000 index 0000000000000..403c799954602 --- /dev/null +++ b/Aliases/wxwidgets@3.2 @@ -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 index ad23fa9572d44..9d811bfd0af98 120000 --- a/Aliases/yubico-pam +++ b/Aliases/yubico-pam @@ -1 +1 @@ -../Formula/pam_yubico.rb \ No newline at end of file +../Formula/p/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/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 index 0244a52d4aaa8..cfc6a7370463e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,17 +1,24 @@ # 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 be notified of changes to these -# files. +# people with write-access to this repository (i.e. @Homebrew/core) who wish to approve changes to these files. # -# Their review is not required to merge PRs that change these files but just an indication that they wish to follow -# along changes to these files without having to "watch" this repository on GitHub. +# 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 @MikeMcQuaid -CONTRIBUTING.md @MikeMcQuaid -tap_migrations.json @MikeMcQuaid -.github/ @MikeMcQuaid -cmd/ @MikeMcQuaid +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 -LICENSE.txt @Homebrew/plc @MikeMcQuaid +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/universal_binary_allowlist.json @Homebrew/tsc @carlocab +audit_exceptions/versioned_formula_dependent_conflicts_allowlist.json @Homebrew/tsc @MikeMcQuaid diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9251d7174eeb1..06ab7bdce2979 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,10 @@ First time contributing to Homebrew? Read our [Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct). +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) @@ -12,13 +16,17 @@ First time contributing to Homebrew? Read our [Code of Conduct](https://github.c ### 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=...` ### 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 @@ -26,16 +34,18 @@ Once you've addressed any potential feedback and a member of the Homebrew org ha ### To contribute a fix to the `foo` formula -If you are already well versed in the use of `git`, then you can find the local -copy of the `homebrew-core` repository in this directory -(`$(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/`), modify the formula there +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 -brew install --build-from-source foo +HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source foo brew test foo brew audit --strict foo brew style foo @@ -50,6 +60,7 @@ 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 @@ -58,4 +69,31 @@ follows: 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. -Thanks! +### 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 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 +``` + +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..db5e8e8f94acd --- /dev/null +++ b/Formula/a/a2ps.rb @@ -0,0 +1,42 @@ +class A2ps < Formula + desc "Any-to-PostScript filter" + homepage "https://www.gnu.org/software/a2ps/" + url "https://ftp.gnu.org/gnu/a2ps/a2ps-4.15.6.tar.gz" + mirror "https://ftpmirror.gnu.org/a2ps/a2ps-4.15.6.tar.gz" + sha256 "87ff9d801cb11969181d5b8cf8b65e65e5b24bb0c76a1b825e8098f2906fbdf4" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "7effcbad404640b62723336fc0d1024f04f3cf98e4e40d595243512422897f4f" + sha256 arm64_sonoma: "65b376bbaea1ccebe7b46ed808d280c966c0e24fb22f6e92e86dd6eb9d769b75" + sha256 arm64_ventura: "3e182ba99072bc793eaa3e93761288026df7fec9520a39f3f51f1436fe7f5230" + sha256 arm64_monterey: "1e6ab666ea444efe10b8892b9923264b8dc0d5961674b3a0937a9cd94397542b" + sha256 sonoma: "010728f54b885a9c8697a81b3602427ccabb10da153d0d74a25526a8144a0e1c" + sha256 ventura: "4b2439ff98f5db6e8c4e3894ba0ab09a4e38e7404a7db950b42de46afeddc62a" + sha256 monterey: "361d7e19f0811037af034bb5a7e582c0cea350cc5a9754f0d05e0094faadf5bb" + sha256 arm64_linux: "67d56e9aed857b4f5d4110820aa4ba50d0d5c6378157ee3a791a5a3a1781947c" + sha256 x86_64_linux: "6df41a07d6bd52713e700a83a2994c5955b305ee068b73c50e4786cbb8213dae" + 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..94b4fca6eb229 --- /dev/null +++ b/Formula/a/a52dec.rb @@ -0,0 +1,41 @@ +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 + + bottle do + 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..5c220fb06b039 --- /dev/null +++ b/Formula/a/aalib.rb @@ -0,0 +1,78 @@ +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 + + bottle do + 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, mojave: "46feeea3fc331a6982fa1960645e1851d3f395f36fbd99cbf92a7406030d9511" + 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/formula-patches/4cd6785/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..40e6c68e4cfd4 --- /dev/null +++ b/Formula/a/aamath.rb @@ -0,0 +1,59 @@ +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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c62dab89088d46d52193768e3dd863939963ca8fbcf2eb67ecfd52c928117dfd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "38e8b1fcd51f2be7c3b27818ffddf2b4fbf3de14da75b884e57bdbc8b4a3819b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0fdc50f0e8165ff7de731e092ddfa57149185bd1c1e1cf463e819645364d25ee" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e823e4d89ae67660af61746c7472d80f0eb2ea70503471ac1190f9c0c691faf0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "eec6c9dd0ae3b32b3d2b22ac4cf926c6b3084a41623361762a4c0a297dc05286" + sha256 cellar: :any_skip_relocation, sonoma: "35be127036f118e9d0842c7cf9cf93bb306a51b9ce06a87e586805b7fa2b714c" + sha256 cellar: :any_skip_relocation, ventura: "1edd59508421089d629ab153c03d9db3c5e0e3cad0a75d3baea36b533a5b1d0a" + sha256 cellar: :any_skip_relocation, monterey: "58065a231153b1971495d1d07c7d68740a1e7ca51ff95d8c8684ab511aaa4ab7" + sha256 cellar: :any_skip_relocation, big_sur: "588a5ccb517b6d41a4f323f7a376cd9a34e4d0d447baf15179c05fbbf2c0e588" + sha256 cellar: :any_skip_relocation, catalina: "1ac1413ef0322b280ae5bd5663373ed959ee54d28dbdd3261fc4da6e57abf44c" + sha256 cellar: :any_skip_relocation, mojave: "79ef03b1d334136b693131b133944109545b07aca2dfd9165531016e4250444c" + sha256 cellar: :any_skip_relocation, high_sierra: "41223cb51bc006abfba33b6af77b665c28de4155d19e5f43d0561b885b73368f" + sha256 cellar: :any_skip_relocation, sierra: "d537cb11d2dcbac9b5d5356c471775699312e83450635ba7676083f381a531cd" + sha256 cellar: :any_skip_relocation, el_capitan: "8b805e37fd5f4536b4fbf7f3ae6251b645b4b132027d56ccd015a6036c304744" + sha256 cellar: :any_skip_relocation, arm64_linux: "720220ff8348613058bb9d4ef1cf87bea850c513e721906a37a406136e6d2327" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f803d33b088e251eba9820706307616a771dea7d2994818a8fc36aca85af0541" + end + + uses_from_macos "bison" => :build # for yacc + uses_from_macos "flex" => :build + + on_linux do + depends_on "readline" + end + + # Fix build on clang; patch by Homebrew team + # https://github.com/Homebrew/homebrew/issues/23872 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/aamath/0.3.patch" + sha256 "9443881d7950ac8d2da217a23ae3f2c936fbd6880f34dceba717f1246d8608f1" + end + + 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, 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..531926a80f6ab --- /dev/null +++ b/Formula/a/aarch64-elf-binutils.rb @@ -0,0 +1,59 @@ +class Aarch64ElfBinutils < Formula + desc "GNU Binutils for aarch64-elf cross development" + homepage "https://www.gnu.org/software/binutils/" + url "https://ftp.gnu.org/gnu/binutils/binutils-2.44.tar.bz2" + mirror "https://ftpmirror.gnu.org/binutils/binutils-2.44.tar.bz2" + sha256 "f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_sequoia: "ff613c2c092e98c1ed1fab397d4f31c02d4d011bf45fdddad77f42f40ea8aa17" + sha256 arm64_sonoma: "04d64d11771d85fc9b94fe1b998f7093f80ef073a80b60a49459db90ab5ef727" + sha256 arm64_ventura: "f07ba9c20e29cbdd0265f5d2e42a2c3b1b34b89a3e72b8fd216ffc10cb058db2" + sha256 sonoma: "dc0f415bbc8f9616257585e972cc38f9a1ae073501365c302003d804a3b0a71e" + sha256 ventura: "e42b87f4f25e29420ed63aebfd7044bfbfab0ee39a19c11eea6ad2b62679a7ae" + sha256 arm64_linux: "efc69b3597a1dc09bb39e029a41d0f90994cfb068d13a5367e323f89f1057423" + sha256 x86_64_linux: "8215c2ae409305a49eef2577a37c49b78a7db9f0b66d113c4f74b5cf4ae2ce63" + 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..1b9051dcd6774 --- /dev/null +++ b/Formula/a/aarch64-elf-gcc.rb @@ -0,0 +1,70 @@ +class Aarch64ElfGcc < Formula + desc "GNU compiler collection for aarch64-elf" + homepage "https://gcc.gnu.org/" + url "https://ftp.gnu.org/gnu/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + mirror "https://ftpmirror.gnu.org/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + sha256 "e2b09ec21660f01fecffb715e0120265216943f038d0e48a9868713e54f06cea" + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + + livecheck do + formula "gcc" + end + + bottle do + sha256 arm64_sequoia: "2775914b08cd4cb33eb23aa380ed5d5ec3044ff654978b5e5a5d3410aba267a8" + sha256 arm64_sonoma: "ea7af2549d31919b0cae18067e4e3e6804ff52b1135a84f7a21f0da3130ecb26" + sha256 arm64_ventura: "2764387f82ee47f63134da77db38050dea5e1c2c44bb60d3acea9a03c7beaec2" + sha256 sonoma: "efd8112ddb6777583c4af5abc2cc9ea192cde2bad02e60e84e420d830803e369" + sha256 ventura: "ddda9fcf0d64276c5cb34493ffcda10f76c43daef986a959cd6799f6c9d1a152" + sha256 arm64_linux: "8e63a1b5044f6649d568113ca763cc890540d3e94bb3be9151b918a1e0d3b7f1" + sha256 x86_64_linux: "fd7dea08552fe7b3f9405632d1f29c3e0dc07010a895ab22ed4a7401879ec795" + 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..c7645e2cebbdd --- /dev/null +++ b/Formula/a/aarch64-elf-gdb.rb @@ -0,0 +1,84 @@ +class Aarch64ElfGdb < Formula + desc "GNU debugger for aarch64-elf cross development" + homepage "https://www.gnu.org/software/gdb/" + url "https://ftp.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + mirror "https://ftpmirror.gnu.org/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 + + bottle do + sha256 arm64_sequoia: "0a926fe5dc3bc4e539f41c646716b31f5d1286edb897298b01f32134cbb3abef" + sha256 arm64_sonoma: "f521ba77ba54ff94b1bed1e5cd0b42a57d9854922dfff195f71e8eb7e55dcd6b" + sha256 arm64_ventura: "4cf29fad518c942bd1310ba0bfd38c0ecbcdf30b7e36312d129719278da7175b" + sha256 sonoma: "bb07e3cc246b3668c6cc918fc3ba3702b155b11674533d75e02dbe4664c4c2b6" + sha256 ventura: "763a0c51b03e2e614429e0a5598e6cf242ebea2be8f5c94fa5a23cc511dfd101" + sha256 arm64_linux: "05c39d0fccad36e0b46a99eeb08c129bf61744522aac5e9fde1cfff57454cbc3" + sha256 x86_64_linux: "09ad9bdbf4e7cce7979fa2fed88e9b31ee1a06cc82e5f625dd6dae9d1ab2e9a9" + end + + depends_on "pkgconf" => :build + depends_on "aarch64-elf-gcc" => :test + depends_on "gmp" + depends_on "mpfr" + depends_on "python@3.13" + 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 "ncurses" + 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} + --enable-tui + --with-curses + --with-expat + --with-lzma + --with-python=#{which("python3.13")} + --with-system-readline + --with-system-zlib + --with-zstd + --disable-binutils + --disable-nls + ] + + 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..b5b37e0858f7b --- /dev/null +++ b/Formula/a/ab-av1.rb @@ -0,0 +1,39 @@ +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.0.tar.gz" + sha256 "39f952847a7b57b0ad02f8c479ffcdc6de3fb86155375d2b0c3b5a14a212159f" + license "MIT" + head "https://github.com/alexheretic/ab-av1.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "060f38701c12fb3076daa6c3650b5f076a0a791cccdd8e2f918e782309107bb2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "963a43238b7e963d22df60b7ca760d7d83e4f9458a4d004d5555845ae457be7f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "57cc5515ec491fedb516b354bad3f922ce88d650f75859f55c0feb1686f5221d" + sha256 cellar: :any_skip_relocation, sonoma: "1ed32713e6a9fb378df42d26926080019a48247b51aa94079012b085d6bd3581" + sha256 cellar: :any_skip_relocation, ventura: "4f8320d095c6c437a01250cca9c25d90282ca14a58e7bb16da779aba41c2104e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c1656f532d63538b01625323b25e6c511e496d70af2ea51d4c0a0b5812eb0187" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d1e08da32e54b4834d8983cd04761f47fed58302d278001ff0b718009ac7dc8" + 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", shells: [:bash, :zsh]) + 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..f0e42a6bb02a0 --- /dev/null +++ b/Formula/a/abcde.rb @@ -0,0 +1,79 @@ +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 + + bottle do + 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, mojave: "c2ef29d1b906767727d858047ddab9516f14c70073b30174a6222b1300446432" + sha256 cellar: :any, high_sierra: "2a81af2921befb14f0a96e66ebc3884bd33f8bab156f7dc27e2816a956d033cb" + 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..30d910ddede7d --- /dev/null +++ b/Formula/a/abcl.rb @@ -0,0 +1,50 @@ +class Abcl < Formula + desc "Armed Bear Common Lisp: a full implementation of Common Lisp" + homepage "https://abcl.org/" + url "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 :homepage + regex(/href=.*?abcl-src[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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..b27d3f921d146 --- /dev/null +++ b/Formula/a/abcm2ps.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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..c405913273258 --- /dev/null +++ b/Formula/a/abcmidi.rb @@ -0,0 +1,50 @@ +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.02.16.zip" + sha256 "2bbe8a6305d3708e874d3e211c831a52433ea4970bbc81d2d1ce92491c4fee5f" + 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_sequoia: "bc75ed523724b685d67e814ed27c69da334091ff1d3e93ec066e116b293b5ef7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "77e419fa750fcb77a3b4a271c86043d2b2f6acee718790918be223672aeab4bf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "19a638c4f1e1a81e6263c69bb4e1b79a5d6cdb100ba042284a5605b269a4a3a0" + sha256 cellar: :any_skip_relocation, sonoma: "f4adaa01ffef2c90fe3d9beab0469172cdcc99d3dd3c94d8dc371ef3bf69b45a" + sha256 cellar: :any_skip_relocation, ventura: "85de1f953827ee80b9f86eb0a85785a299d60b9ae291e0c675262e5d5324ad35" + sha256 cellar: :any_skip_relocation, arm64_linux: "2c277663417ce625cf781e21f8028073f66d97bb38277d0118836677c854d05f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "847d9f72f899f7e0191094654cfed70506e61d328c978063cd1474bb1564ffb7" + 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..45edc4cd966d6 --- /dev/null +++ b/Formula/a/abduco.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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, mojave: "b3c5d87a9da3f70e3fd16fdf7a3d2327b41c96ab74d62e2a6efa2e3733ec78f3" + sha256 cellar: :any_skip_relocation, high_sierra: "8ca092b6fd5a6ad39e3c91186421bca2943af6bfdbae4ea95254b36d1e109a78" + sha256 cellar: :any_skip_relocation, sierra: "9367a86666aad4d14cecf2d7c20f897d3eb92d5cd913af43081d80b9452e19fd" + sha256 cellar: :any_skip_relocation, el_capitan: "62b4673f4fba1d3c5b201b972e220a2736ec053e0c83b1369bb4e5641a71f8e4" + 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..e8d8535d4cccc --- /dev/null +++ b/Formula/a/abi-compliance-checker.rb @@ -0,0 +1,66 @@ +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 + + 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..632da6e6bb526 --- /dev/null +++ b/Formula/a/abi-dumper.rb @@ -0,0 +1,35 @@ +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 + + 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..a410d5319aa69 --- /dev/null +++ b/Formula/a/abi3audit.rb @@ -0,0 +1,136 @@ +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/df/83/c2ba9ad764c3f432651ce396468b99995fb3fe97c29f7549d1c3cfb05112/abi3audit-0.0.21.tar.gz" + sha256 "78f6155dfcf089657764bf194ddeac987111a5648eba54fcd6b486968db4d3fa" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1e36f27017e8e199df79a1601d4139d5278c3329347233a853e4c8922c7cecc7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e36f27017e8e199df79a1601d4139d5278c3329347233a853e4c8922c7cecc7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1e36f27017e8e199df79a1601d4139d5278c3329347233a853e4c8922c7cecc7" + sha256 cellar: :any_skip_relocation, sonoma: "6d59ab072d0a24b00430eaadf44bcf606989b2ac6c46a9311180c1e90b5f6878" + sha256 cellar: :any_skip_relocation, ventura: "6d59ab072d0a24b00430eaadf44bcf606989b2ac6c46a9311180c1e90b5f6878" + sha256 cellar: :any_skip_relocation, arm64_linux: "663c72ba6c49dbb8d7e36f59f03bc2b9d89d70c08bb41e800106fb68a90ac0ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2422391df386ced3511227fa44a6057b608610c9198ac35f05cf99f687705afb" + end + + depends_on "cmake" => :build + depends_on "python@3.13" + + on_linux do + depends_on "pkgconf" => :build + depends_on "rust" => :build + end + + resource "abi3info" do + url "https://files.pythonhosted.org/packages/f2/50/3ade9c5354a3bb2134fec8fc56004fc935ae1df473681b8199172848bf7a/abi3info-2025.1.9.tar.gz" + sha256 "8a2c3aff803164e763ccba11ef35067b684e9ceba876f00410bb054f58e02345" + end + + 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 "certifi" do + url "https://files.pythonhosted.org/packages/0f/bd/1d41ee578ce09523c81a15426705dd20969f5abf006d1afe8aeff0dd776a/certifi-2024.12.14.tar.gz" + sha256 "b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz" + sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + end + + resource "pyelftools" do + url "https://files.pythonhosted.org/packages/88/56/0f2d69ed9a0060da009f672ddec8a71c041d098a66f6b1d80264bf6bbdc0/pyelftools-0.31.tar.gz" + sha256 "c774416b10310156879443b81187d182d8d9ee499660380e645918b50bc88f99" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/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 "url-normalize" do + url "https://files.pythonhosted.org/packages/ec/ea/780a38c99fef750897158c0afb83b979def3b379aaac28b31538d24c4e8f/url-normalize-1.4.3.tar.gz" + sha256 "d23d3a070ac52a67b83a1c59a0e68f8608d1cd538783b401bc9de2c0fac999b2" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..1f509c42017ac --- /dev/null +++ b/Formula/a/abnfgen.rb @@ -0,0 +1,38 @@ +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 + + bottle do + 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..61016c6c59d9c --- /dev/null +++ b/Formula/a/abook.rb @@ -0,0 +1,66 @@ +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 + + bottle do + 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/abricate.rb b/Formula/a/abricate.rb new file mode 100644 index 0000000000000..586a263b07b6d --- /dev/null +++ b/Formula/a/abricate.rb @@ -0,0 +1,179 @@ +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" + + bottle do + 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..fd73e5ab7c7f9 --- /dev/null +++ b/Formula/a/abseil.rb @@ -0,0 +1,87 @@ +class Abseil < Formula + desc "C++ Common Libraries" + homepage "https://abseil.io/" + url "https://github.com/abseil/abseil-cpp/archive/refs/tags/20240722.1.tar.gz" + sha256 "40cee67604060a7c8794d931538cb55f4d444073e556980c88b6c49bb9b19bb7" + license "Apache-2.0" + head "https://github.com/abseil/abseil-cpp.git", branch: "master" + + bottle do + rebuild 1 + sha256 arm64_sequoia: "7e5a0a8ef391c005cb154d461e76ee997ad0d3c0176f09757d85027c01a14392" + sha256 arm64_sonoma: "77fe46423b43ca37df6acc3867c4c1206b2afd28ff511aab7a3d70515ce70856" + sha256 arm64_ventura: "bdcb35636c6cd1c570a15a15dedf77e2e671945d55e28fcba50e2c62bf67a410" + sha256 cellar: :any, sonoma: "f59d69e8c777caaa48de0e78bd35d7437c3848be3c85952684075bfb6df10312" + sha256 cellar: :any, ventura: "a534872a681524cd15c94713f9f2fa3ee48d71e585cdb1cb7b11c677607c62b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "700f81a3eb4942d1f8e87feabb6cbb5655d07fcc86efea65e514cc9d2865eb47" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ffaa8c163b9b3ee6de502d076c148e0f64395f4d30e3eccbb0bb4d6f3c44400" + end + + depends_on "cmake" => [:build, :test] + + on_macos do + depends_on "googletest" => :build # For test helpers + end + + # Fix shell option group handling in pkgconfig files + # https://github.com/abseil/abseil-cpp/pull/1738 + patch do + url "https://github.com/abseil/abseil-cpp/commit/9dfde0e30a2ce41077758e9c0bb3ff736d7c4e00.patch?full_index=1" + sha256 "94a9b4dc980794b3fba0a5e4ae88ef52261240da59a787e35b207102ba4ebfcd" + end + + def install + ENV.runtime_cpu_detection + + # Install test helpers. Doing this on Linux requires rebuilding `googltest` with `-fPIC`. + extra_cmake_args = if OS.mac? + %w[ABSL_BUILD_TEST_HELPERS ABSL_USE_EXTERNAL_GOOGLETEST ABSL_FIND_GOOGLETEST].map do |arg| + "-D#{arg}=ON" + end + end.to_a + + 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..f8645bb813169 --- /dev/null +++ b/Formula/a/abyss.rb @@ -0,0 +1,83 @@ +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"] + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + bottle do + sha256 cellar: :any, arm64_sequoia: "c4c97608ca2bb86304b77b4fddd3abee125f25971ba51495e95e6658b1ad5d1a" + sha256 cellar: :any, arm64_sonoma: "f4bdcdb91f2004e514df06e02f91d6341cb8d3f3ce32a9acf3958d37f1983f80" + sha256 cellar: :any, arm64_ventura: "22819d8dfedb879c1f0742ec3f07e9090d99385b533bfc54158beddbe1eefadc" + sha256 cellar: :any, sonoma: "6bd97e0afea52bf21f3c0f01d10b2643c22c4aed6bf3e36cece3545d6ad6e9d1" + sha256 cellar: :any, ventura: "d81fe789736077b682ba6cbc7c62d89333ee560a7c2c02a0b3e936810e3cac1a" + sha256 cellar: :any_skip_relocation, arm64_linux: "fbd181f4720f2c4e8f15d120f49bb2016a72e1eb7017dd8e046be245c424384a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7cb253b94acc90a0619ef05ba23a178f9a28e8ee0395ffea66abbeb13500726f" + 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 "cmake" => :build # For btllib + depends_on "google-sparsehash" => :build + depends_on "meson" => :build # For btllib + depends_on "ninja" => :build # For btllib + depends_on "python@3.13" => :build # For btllib + depends_on "gcc" + depends_on "open-mpi" + + uses_from_macos "sqlite" + + fails_with :clang # no OpenMP support + + resource "btllib" do + url "https://github.com/bcgsc/btllib/releases/download/v1.7.3/btllib-1.7.3.tar.gz" + sha256 "31e7124e1cda9eea6f27b654258a7f8d3dea83c828f0b2e8e847faf1c5296aa3" + end + + def install + python3 = "python3.13" + + (buildpath/"btllib").install resource("btllib") + cd "btllib" do + inreplace "compile", '"python3-config"', "\"#{python3}-config\"" + system "./compile" + end + + system "./autogen.sh" if build.head? + system "./configure", "--disable-silent-rules", + "--enable-maxk=128", + "--with-boost=#{Formula["boost"].include}", + "--with-btllib=#{buildpath}/btllib/install", + "--with-mpi=#{Formula["open-mpi"].prefix}", + "--with-sparsehash=#{Formula["google-sparsehash"].prefix}", + *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..bac974094baee --- /dev/null +++ b/Formula/a/access.rb @@ -0,0 +1,47 @@ +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 + + 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..5f45bb536edcf --- /dev/null +++ b/Formula/a/ace.rb @@ -0,0 +1,54 @@ +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_3/ACE+TAO-8.0.3.tar.bz2" + sha256 "aec961417e5b894a44de9b361fa45966b3267a79a01de1e813a5a4bc021b48bb" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "beab881a5b7e15b2ed1864cd2f7a67614efa23bd9bedfead91d39b9295961b06" + sha256 cellar: :any, arm64_sonoma: "b435bbae4181e2546fdc9ad94921c2410f1e4074ca8429e312d6272583df3d30" + sha256 cellar: :any, arm64_ventura: "a5838652c10aff691c4fb61bd40a51b0c148b468cf99b86bfa819fdb6bd6d072" + sha256 cellar: :any, sonoma: "0760f394c21ddea1fc54966c8ec4985efb9f97a2d28cecdee06f9a0b59971428" + sha256 cellar: :any, ventura: "6d57e6d354cb890dd008d36a5557b1e13454cd5a15b54c8ed7c9fc8ce544798d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9bd5b17c2db2b7928732d6c8fc7444ac2e781d1021fa714ed5695e96d88d482c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "848d8135c3004cde97ef40b6fe4aca6a40b226c99d6c54499fc597caa5b76ee6" + 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..7911a26dab37f --- /dev/null +++ b/Formula/a/aces_container.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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, mojave: "5f2c4a76a3a1082e3d969143455c8a47b8d05d7251424b7e8d821b4e73f46a9e" + sha256 cellar: :any, high_sierra: "4297afa069f1cd305e93038ed43260b3643f0bd27f39e33355061fc111fb7f6f" + sha256 cellar: :any, sierra: "6b276491297d4052538bd2fd22d5129389f27d90a98f831987236a5b90511b98" + sha256 cellar: :any, el_capitan: "16cf230afdfcb6306c208d169549cf8773c831c8653d2c852315a048960d7e72" + 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 + 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 "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..b16fed4529b02 --- /dev/null +++ b/Formula/a/ack.rb @@ -0,0 +1,58 @@ +class Ack < Formula + desc "Search tool like grep, but optimized for programmers" + homepage "https://beyondgrep.com/" + url "https://beyondgrep.com/ack-v3.8.1" + sha256 "ab0fe23f02bb602088a1ce41c0ed728bf4b00d57eb3e1b4e5d51e320cab253d3" + license "Artistic-2.0" + + livecheck do + url "https://beyondgrep.com/install/" + regex(/href=.*?ack[._-]v?(\d+(?:\.\d+)+)["' >]/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "5d4e0402d6f880fe439cc7721b712f263f63f36af3e98458903a078d2e936c31" + 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 + + 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..dc7213ced6c85 --- /dev/null +++ b/Formula/a/acl.rb @@ -0,0 +1,76 @@ +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 + + 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..3e828c195a1eb --- /dev/null +++ b/Formula/a/acl2.rb @@ -0,0 +1,65 @@ +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 7 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "b4e715bd27a3bfbe79024c9362b5cac6be195b2511d45c1e34054485cec4f261" + sha256 arm64_sonoma: "eca593ac2fe12c49e64988eab32d820baaaecbd0812a71447723e264e73c521f" + sha256 arm64_ventura: "29fb63dc3b90fde0a84abffaf73cf8e098ca6931a0d5400c02986e2703b09b91" + sha256 sonoma: "83a28e85fd5bb5c6b8aa02192a1b19e252fda21aaba6786e88e7a0ecc53f6950" + sha256 ventura: "245590005c90665786cd0359be8538de7d80d1f3067849eb8172c25a3d393dd2" + sha256 x86_64_linux: "560ef0f80b025d2a7811ec84df7bb73af75c137076494db8a3224d31b7871ddf" + end + + depends_on "sbcl" + + def install + # Remove prebuilt binaries + [ + "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", + ].each do |f| + (buildpath/f).unlink + end + + system "make", + "LISP=#{HOMEBREW_PREFIX}/bin/sbcl", + "ACL2=#{buildpath}/saved_acl2", + "USE_QUICKLISP=0", + "all", "basic" + system "make", + "LISP=#{HOMEBREW_PREFIX}/bin/sbcl", + "ACL2_PAR=p", + "ACL2=#{buildpath}/saved_acl2p", + "USE_QUICKLISP=0", + "all", "basic" + libexec.install Dir["*"] + + (bin/"acl2").write <<~EOF + #!/bin/sh + export ACL2_SYSTEM_BOOKS='#{libexec}/books' + #{Formula["sbcl"].opt_bin}/sbcl --core '#{libexec}/saved_acl2.core' --userinit /dev/null --eval '(acl2::sbcl-restart)' + EOF + (bin/"acl2p").write <<~EOF + #!/bin/sh + export ACL2_SYSTEM_BOOKS='#{libexec}/books' + #{Formula["sbcl"].opt_bin}/sbcl --core '#{libexec}/saved_acl2p.core' --userinit /dev/null --eval '(acl2::sbcl-restart)' + EOF + 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..9becc87d8e1a6 --- /dev/null +++ b/Formula/a/acme.rb @@ -0,0 +1,48 @@ +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 + + bottle do + 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, mojave: "53ddd3c05dea30a12436e997a68ab50670bd9dbe771e3c3a6d7216c0240c6e07" + sha256 cellar: :any_skip_relocation, high_sierra: "8ed3df0ed73b3f995ca33b357c00f54b03f16ec2effd61eca985b04a82eb40b6" + 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..0e6de22b77e39 --- /dev/null +++ b/Formula/a/acme.sh.rb @@ -0,0 +1,39 @@ +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_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..d6933844ae50b --- /dev/null +++ b/Formula/a/acpica.rb @@ -0,0 +1,38 @@ +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/R2025_04_04/acpica-unix2-20250404.tar.gz" + sha256 "2abeef0b11d208aa9607d8acde07f3e5cee8cc7a43fc354701efa8075b2e5a9f" + 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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ea322ed5e903610d9264f0a46378ab8cd867dba115ef74782dce02bcfd51c80" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc4284d256259dcb212c0151422a3689136ba2fc7c706196c4913128644b621f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3b05e09052930c392a5faebd81fdcf4ac304eb0a52ae04914f0a6f2581396518" + sha256 cellar: :any_skip_relocation, sonoma: "140b8b8f802f2ab3e279d54f6f8fe6d0ab267630576d01485bf26dde264f27d8" + sha256 cellar: :any_skip_relocation, ventura: "68c95840000e3a84257a8e9f8d6ef67619e22a468cb53651a9c67579fc95a439" + sha256 cellar: :any_skip_relocation, arm64_linux: "b86f20efa2264f377f9b690e5624a0758a7b43219fe1f1fc323d774745a97af9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dae5dceec9bd03b975f711f49017095a38102f7dfa995906842dc0023fa602bf" + 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..4ea534a13183a --- /dev/null +++ b/Formula/a/acronym.rb @@ -0,0 +1,87 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4c7cb3115315d3bc254dada1a5030e33a37ede3a80bdbe082b6097c2eec20ee0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e164772ca27412e1e6faba57caa009673a9768cac8c88f8950c28c3f54fa3d36" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a9922d0d98b7d6c4cbf7ff733ef09ccdc1595d5ab090a3aa5e7d9b9efd55d619" + sha256 cellar: :any_skip_relocation, sonoma: "5c4b6fa56893b22d19f3189c316b6e736bb5aed554d4e7472fd16577535fc4db" + sha256 cellar: :any_skip_relocation, ventura: "fd5b9c42b331781383f581337714397641a7460d0feb9551f43140270cbc4131" + sha256 cellar: :any_skip_relocation, arm64_linux: "df388cebc69a5ca13936bb25528ce1616a88bdf68bdc16bb9656173fe8c5c3c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c82f232fd2694e72f0deccba03d1dcd152115df7f306f5e2043f8c104c0b37f" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "numpy" + depends_on "python@3.13" + + on_linux do + depends_on "patchelf" => :build + end + + 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 "THERMOS", 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..14c60911e5b5d --- /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.77.tar.gz" + sha256 "f0e43fe9416ad796035ad3b435dc6d8f6db6997d569f3e793d25f9ed7635f08d" + license "MIT" + head "https://github.com/nektos/act.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "10e4a9debd5171a0594078b426ebf51224e8daddecdd4c5e17c7ed9243489c79" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91ee09eb60be6ff814a890a16210153379bf658ba06f8677372c79eaa5a501c6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e6cbe0f56364ece21eaad866ab610b92b054e62e94c23ef1f3bc0765b674d899" + sha256 cellar: :any_skip_relocation, sonoma: "fc2eee9223f4ebc9f460637cb6434af15c8e267988f92d4d28858f42c1170033" + sha256 cellar: :any_skip_relocation, ventura: "a9901a43735ff91b5f924173b51ea2dc5b23e5b587779e26c3ee9962a219969e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4956aa4146f211db41174fbe88409d2bae380e8ee2985cf2d6037f5b4786a692" + 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/action-docs.rb b/Formula/a/action-docs.rb new file mode 100644 index 0000000000000..d91d61a7d5d12 --- /dev/null +++ b/Formula/a/action-docs.rb @@ -0,0 +1,43 @@ +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" + + 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..279d2e914563b --- /dev/null +++ b/Formula/a/action-validator.rb @@ -0,0 +1,89 @@ +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.6.0.tar.gz" + sha256 "bdec75f6383a887986192685538a736c88be365505e950aab262977c8845aa88" + + # always pull the HEAD commit hash + resource "schemastore" do + url "https://github.com/SchemaStore/schemastore.git", + revision: "7bf746bd90d7e88cd11f0a9dc4bc34c91fbbf7b4" + end + + # shell completion and manpage support, upstream pr ref, https://github.com/mpalmer/action-validator/pull/82 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/ffcaead14f73c08531313dcb7c300918db576c3b/action-validator/0.6.0-completion-manpage.patch" + sha256 "91b0f5170e52537f78e4b196e3b3dd580e3e56e6479f14ba59cdfcff556f4680" + end + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e2648c46a07251127841f4f96faf5cf42abf24d46346190aa7d7469f410fe107" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b9ea08105457a87d1571d8f8ab8c0309f198cbb1d39961fb4b6091f14f08239" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b19fed4dbbcd2f0b0e6b702a10a26a3dbd1ca84040008e26a733076adba004a0" + sha256 cellar: :any_skip_relocation, sonoma: "f065ef1e7dda660200a3f90f8c369dc60e36c5c4e9d2d2823373807440e62eb9" + sha256 cellar: :any_skip_relocation, ventura: "f162d3f6739bf01635bf4ca4287cae32c5b73da5a039bcf27a73e6a006ad81ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "36f73c23f728058252e3f23614d34da1488470a4af9261d4718f7edb4b6fad18" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07824bb882abb54d58d5ad90fa6987a363cfe474b2a5f5647153284244e232a1" + 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 + + bash_completion.install "completions/action-validator.bash" => "action-validator" + fish_completion.install "completions/action-validator.fish" + zsh_completion.install "completions/_action-validator" + man1.install "man/action-validator.1" + 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..b5f57c30b2f32 --- /dev/null +++ b/Formula/a/actionlint.rb @@ -0,0 +1,47 @@ +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.7.tar.gz" + sha256 "237aec651a903bf4e9f9c8eb638da6aa4d89d07c484f45f11cfb89c2dbf277a5" + license "MIT" + head "https://github.com/rhysd/actionlint.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d94522b3eefa067708c2ffe00f95a3b7ea39180a5399ec2f570f021228fabe2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8d94522b3eefa067708c2ffe00f95a3b7ea39180a5399ec2f570f021228fabe2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8d94522b3eefa067708c2ffe00f95a3b7ea39180a5399ec2f570f021228fabe2" + sha256 cellar: :any_skip_relocation, sonoma: "1059f386ad492562782f7286b73a94c3cdab1a2b52e28ffc2962edd051058b8c" + sha256 cellar: :any_skip_relocation, ventura: "1059f386ad492562782f7286b73a94c3cdab1a2b52e28ffc2962edd051058b8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04830cca2357b8cb8cf30a297bbbe5e1e347f5c0320ca67f621805e6f4843a87" + end + + depends_on "go" => :build + depends_on "ronn" => :build + depends_on "shellcheck" + + def install + ldflags = "-s -w -X github.com/rhysd/actionlint.version=#{version}" + 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..682c22653b848 --- /dev/null +++ b/Formula/a/actions-batch.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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, 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 "POST https://api.github.com/user/repos: 401 Bad credentials", output + end +end diff --git a/Formula/a/activemq-cpp.rb b/Formula/a/activemq-cpp.rb new file mode 100644 index 0000000000000..6866fc34e09a5 --- /dev/null +++ b/Formula/a/activemq-cpp.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..5b7af5d700155 --- /dev/null +++ b/Formula/a/activemq.rb @@ -0,0 +1,56 @@ +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.6/apache-activemq-6.1.6-bin.tar.gz" + mirror "https://archive.apache.org/dist/activemq/6.1.6/apache-activemq-6.1.6-bin.tar.gz" + sha256 "32ac692da486d7e82819586dd3c5661bbbb5d6d42599832a494797058608f0a4" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7e821df7e834c39b56b15ed0cb9f98bfc472720fdad3cdbbe20f80f966964707" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c21bd6e87749ad70246e46c12e8773feeeacf4ea119a55ebcc6e098f887adf3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2aea4834f9c0175822102d8e8c4029f3af0345a536f66e67234e3e997077fd32" + sha256 cellar: :any_skip_relocation, sonoma: "8a1d7e1b0ecb2f26c6eed93b479b18d20e4a9471d200ccdad309770577431cff" + sha256 cellar: :any_skip_relocation, ventura: "806867bc7cbff9079f42e885d8765b4869ed257ea9f066d857c2303c4b910430" + sha256 cellar: :any_skip_relocation, arm64_linux: "8b95a03e459a9190375bd22a7806fac2372aa1c7893a61c38cb6acb91e8bf3c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec9ab276b52229846bc56192b0fd45ad573e57738818b880c3a9149eedfd306c" + 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..29d45f434c7eb --- /dev/null +++ b/Formula/a/ad.rb @@ -0,0 +1,48 @@ +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_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..c702c80acf2b6 --- /dev/null +++ b/Formula/a/ada-url.rb @@ -0,0 +1,64 @@ +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.2.4.tar.gz" + sha256 "ce79b8fb0f6be6af3762a16c5488cbcd38c31d0655313a7030972a7eb2bda9e5" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/ada-url/ada.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "888a54a0561d8d7df2d92ee25552177c7f1145b6ca8606389284b313d7808f45" + sha256 cellar: :any, arm64_sonoma: "5e41211a52b56f862011aedd58db319d1296928584ac450175f6d690283102cd" + sha256 cellar: :any, arm64_ventura: "46c45697c40bae733701646a8496174268663721622865d65a0289f2135747e8" + sha256 cellar: :any, sonoma: "0c034aa863f191ba9552202711d1dd6265223f6993e9cf39c4d057ee40580d24" + sha256 cellar: :any, ventura: "2d82d7336972b9bf78964bde91c5dd863d96f95e59fe758f881986357353952f" + sha256 cellar: :any_skip_relocation, arm64_linux: "107755dc326c42bc1e82f909f15ae7b8e25fcb6ef453c563caf7e39c677842a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8bdbaddff93b1b3957c223fd1d713736c949d8c088bb2707e6b5870ba1028184" + end + + depends_on "cmake" => :build + + 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 + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + ENV["CXX"] = Formula["llvm"].opt_bin/"clang++" if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + + (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 + end +end diff --git a/Formula/a/adamstark-audiofile.rb b/Formula/a/adamstark-audiofile.rb new file mode 100644 index 0000000000000..510f7577c5744 --- /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.2.tar.gz" + sha256 "d090282207421e27be57c3df1199a9893e0321ea7c971585361a3fc862bb8c16" + license "MIT" + head "https://github.com/adamstark/AudioFile.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ab031793961063448870b09b5bd997671df66cd2eeeb98d4daebeb389fadeb59" + 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..251ada0491cd0 --- /dev/null +++ b/Formula/a/adapterremoval.rb @@ -0,0 +1,37 @@ +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_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..c751700883454 --- /dev/null +++ b/Formula/a/adaptivecpp.rb @@ -0,0 +1,62 @@ +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/v24.10.0.tar.gz" + sha256 "3bcd94eee41adea3ccc58390498ec9fd30e1548af5330a319be8ce3e034a6a0b" + license "BSD-2-Clause" + revision 1 + head "https://github.com/AdaptiveCpp/AdaptiveCpp.git", branch: "develop" + + bottle do + sha256 arm64_sequoia: "8cb6f094a3fbf0f910601703c6d7e65831b8e568967e5a66ebfa950a98b0a968" + sha256 arm64_sonoma: "8d9a08397ebf84cbbd09d37aca3b75464e3ee888a01d509aa8271dedf4dfbcbc" + sha256 arm64_ventura: "3c6e4a92536c76c3b791a5c905d37d5f1d61e392f0dce155cf9720ece150aa83" + sha256 sonoma: "28388ca4a208e7e7d116bbbb4fb91458fa6217632db3579e9d3cf2ae2d4c4485" + sha256 ventura: "3571494508ad1edb0f2f7636613b6c200725befa53190239d95a6b2cc5579a36" + sha256 arm64_linux: "dd452feb307577a151f2132bc2c3508c26c44249d57a1445970dc7ee850591cc" + sha256 x86_64_linux: "fbd4be61d9ad7377b5a54884ad1feeb4b4bf0e12df662d81ba0387100ce586c5" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "llvm@19" + uses_from_macos "python" + + on_macos do + depends_on "libomp" + end + + def install + args = [] + if OS.mac? + libomp_root = Formula["libomp"].opt_prefix + args << "-DOpenMP_ROOT=#{libomp_root}" + 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 + return unless 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 " + 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" + end +end diff --git a/Formula/a/adb-enhanced.rb b/Formula/a/adb-enhanced.rb new file mode 100644 index 0000000000000..55e902ef9fd63 --- /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/c4/a5/9066bb8c0dd47025aafbb3388b87f68df02f2cf64a83933feee0b3c7c259/adb_enhanced-2.6.0.tar.gz" + sha256 "ead467df4e0e4fc964007c62b0b55801a5f158793bd551ec4b25154801fc3f5a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5acfb19069d8d153e2e299d880d17c94ebedf2aeddda6a11447978a615eb8a3f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "be8f29d3429a042f03692f57e5ba81d29274bb90d3b4dc5a5f4ba23a595d1e76" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3b6d507e23a98bcf245172a6141eb5af9865f56ec5961c0b592f160c7267bea0" + sha256 cellar: :any_skip_relocation, sonoma: "7ac54642e1b66b5237cb6092b4e354407a5a2c8e58cc9a7fb9ecfdcc68e80f94" + sha256 cellar: :any_skip_relocation, ventura: "f1c7d11dbaa3543c3265673c5e5920e61bcfe71d284419d2a60d39ebafd79c30" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8fc53e7dcbc88fd7cfb3bfe50e5313ede172aeee9bde7f8408204f3f7aae6db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3a552e117835c2e8d9935f73c7fae1ad107bd298598ccf5d4f0a7bbc939270b" + end + + depends_on "python@3.13" + + 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..7a2441e5deda9 --- /dev/null +++ b/Formula/a/add-determinism.rb @@ -0,0 +1,33 @@ +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.6.0.tar.gz" + sha256 "289e3586bc9234fc3612a7f7c521b75511fa27f5dcba8b04825249ca03880f80" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "3cc67f0631eb00dd69bf152dfc64d4d97d690c1f164eb821af61b3e22864212c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e31f9976fa0c9dcb2d0606af4d84512a9b65392d4f66d208590f2a3c1e4c8ec" + end + + depends_on "rust" => :build + depends_on :linux + depends_on "zlib" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.html").write <<~EOS + + + EOS + + ENV["SOURCE_DATE_EPOCH"] = "0" + system bin/"add-determinism", 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/adios2.rb b/Formula/a/adios2.rb new file mode 100644 index 0000000000000..9c7b7c562fb92 --- /dev/null +++ b/Formula/a/adios2.rb @@ -0,0 +1,110 @@ +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 + sha256 arm64_sequoia: "502983bb973c584e61ea4325857019308d37ed7876149ca8b692e462a7350e96" + sha256 arm64_sonoma: "f85ec0a3210c79e1730d3f7f71c88de5f75fe6a4a9ca9449935ebd2e97145044" + sha256 arm64_ventura: "e75a203fbaa7987772e61ba24b66419ae5a5e1b69d8f29524d431330accb9caf" + sha256 sonoma: "5caafa5a27988407eb69e25b2a1f03a61d584af7d152efbc90b2f197586a6f2e" + sha256 ventura: "f22fdaa080f998c8ecd24b826c148ad60bc587a7acc3f0c49171e8d61ddcb7a3" + sha256 arm64_linux: "411a036e81100ec289c17b95296b8665dddc42b41ba01660bdd1dab70ae1e723" + sha256 x86_64_linux: "6eccf49dc0677c2e62f0a5fdc69872e35552137b6339ebccca057795480be4bf" + end + + depends_on "cmake" => :build + depends_on "nlohmann-json" => :build + depends_on "c-blosc" + 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 "pybind11" + 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 + 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_Blosc=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 + system "mpic++", 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..e6fd8230314e4 --- /dev/null +++ b/Formula/a/admesh.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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..047dc5b9b0aec --- /dev/null +++ b/Formula/a/adns.rb @@ -0,0 +1,37 @@ +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_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..dedee9a643fee --- /dev/null +++ b/Formula/a/adplug.rb @@ -0,0 +1,53 @@ +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_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..6ac6c0509fbbe --- /dev/null +++ b/Formula/a/adr-tools.rb @@ -0,0 +1,34 @@ +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" + + 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..66e874066ce11 --- /dev/null +++ b/Formula/a/adr-viewer.rb @@ -0,0 +1,92 @@ +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 3 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c1efd8ef88f39d6598004615184612871efc040d1d7b05aeb306a5732e0770bb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3cca20e479818c98d5fe2a005af51a1fdd742a7d914e6f44f5dffc32ee2f972e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c8b5d19a206d65635a9da6eacd09b232a7ef73c560049cc63a28e03f1f8b0b41" + sha256 cellar: :any_skip_relocation, sonoma: "58674e3fb84c3e62f1aba6a501abd1c856b6807c8bcaf7df74eb4d04ef81f1e4" + sha256 cellar: :any_skip_relocation, ventura: "880572d016d57566ee09ba653c09b78b0a668d423eba6661c788e09b65436c66" + sha256 cellar: :any_skip_relocation, arm64_linux: "f97231985140d38128b767f86821bfb9a825def6170ed0cb901cd15b49a9361a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3f3e22f63e93ae52d53b8a07b3ccef467d8b213b5a55fb66118fa1681681525" + end + + depends_on "python@3.13" + + 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", shells: [:fish, :zsh], 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..1d864edd0c028 --- /dev/null +++ b/Formula/a/advancecomp.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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..2c08a3b0866d4 --- /dev/null +++ b/Formula/a/advancescan.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, mojave: "3aa20db4c47b16166b385d3e7e0c7af903833333757af7b1e0909dec00824ce2" + sha256 cellar: :any_skip_relocation, high_sierra: "d0a8416434aa03573dcbadebd135fbcfa6f4829934622ab8afe68aa496ec5e48" + sha256 cellar: :any_skip_relocation, sierra: "0bc4290c65271b84aec455adbaf85795857b19102e6efb152a64623420ae5757" + sha256 cellar: :any_skip_relocation, el_capitan: "e4295866cda2370aa37cb1144ff1269ada4df6b76145a25efaf072d7a6b09b5c" + 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..51a64912b4d02 --- /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/48/adwaita-icon-theme-48.0.tar.xz" + sha256 "847068888650d9673115be6dbf2bfdc31a46aebc528a6a9db4420e60e656b8d4" + license any_of: ["LGPL-3.0-or-later", "CC-BY-SA-3.0"] + + bottle do + sha256 cellar: :any_skip_relocation, all: "e14b79a34a4434fee1b94788985410ede2fd9f93b00a7c62a800fde4dfb6b39a" + 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..aea182d655197 --- /dev/null +++ b/Formula/a/aerc.rb @@ -0,0 +1,30 @@ +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.20.1.tar.gz" + mirror "https://github.com/rjarry/aerc/archive/refs/tags/0.20.1.tar.gz" + sha256 "fbfbf2cc4f6e251731698d6d1b7be4e88835b4e089d55e3254d37d450700db07" + license "MIT" + head "https://git.sr.ht/~rjarry/aerc", branch: "master" + + bottle do + sha256 arm64_sequoia: "2cd6028c68dc0e5aeb8e82bc07aa4c5b7a925bf7d278d78f827c55a208356664" + sha256 arm64_sonoma: "6a7dd569bd087a878888764dbe231530e859bfa177dfe04173a9c244cc3a4490" + sha256 arm64_ventura: "dec8d978d3efcb21fc615bf145daff38474ff032d22572b03906398366349f59" + sha256 sonoma: "d9a7ebee7208939165429112a6acdeabd22095078acdf26d36a32c5202e58b20" + sha256 ventura: "3cdfcc6ef2b5e6d2461a5727c187790b955ec79dab57b953101602fb9c7aaa8e" + sha256 x86_64_linux: "15fe42751917e3f22f595cc4d67a3e2e573e6c9fe84a154fb222c50e70bb9d2a" + end + + depends_on "go" => :build + depends_on "scdoc" => :build + + def install + system "make", "PREFIX=#{prefix}", "VERSION=#{version}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"aerc", "-v" + end +end diff --git a/Formula/a/aerleon.rb b/Formula/a/aerleon.rb new file mode 100644 index 0000000000000..b9353089d0d39 --- /dev/null +++ b/Formula/a/aerleon.rb @@ -0,0 +1,113 @@ +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/ca/bd/87869c1cb33a2b4d269c6f66056c44453e643925731cb85e6861d1121be8/aerleon-1.9.0.tar.gz" + sha256 "850cd621dda750263db313d4473302b48b82adaaa9220e6fd0677cb7900f95f6" + license "Apache-2.0" + head "https://github.com/aerleon/aerleon.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "389212deb7cf910a91832ac58ed041b870a18c871de006e282b257447cb21842" + sha256 cellar: :any, arm64_sonoma: "5b9ba1c8e6fa33c3bec7ecf9ef3b41a0ec4491fe6b2b09b8f1d9fc221134b2bd" + sha256 cellar: :any, arm64_ventura: "6ab075ded353df9f5208e34509754c9859d5da633be8a3f81874394dfd690727" + sha256 cellar: :any, sonoma: "028b7db26b68aa61e4ec40bb436f57ee24f7b12e22d3ebd73dd36797052e2f48" + sha256 cellar: :any, ventura: "05c7771b35e78f9e4d9bfd64259ac0436499e8a625f7fafc17f57aa135139304" + sha256 cellar: :any_skip_relocation, arm64_linux: "614d39a66e33e98f5cbf88981d40e3eb81530b39af63c15f5875c7aeafc7272d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "36eea78c33c7e127e0111415873ff23e282a1c25218a3ed4522901f67017de37" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + 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..02c0c820e9bb7 --- /dev/null +++ b/Formula/a/aescrypt-packetizer.rb @@ -0,0 +1,69 @@ +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_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..c9b648ce80c13 --- /dev/null +++ b/Formula/a/aescrypt.rb @@ -0,0 +1,53 @@ +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 + + bottle do + 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, mojave: "55bc9c5be0263f1659ab389b22e1e5f594b037a87d49aa5ed94ab5ccce3af3da" + sha256 cellar: :any_skip_relocation, high_sierra: "1b2326e6dbc73d394cb5d4d7bf655b026fa77a7d66d02da386bff16b84e84d83" + sha256 cellar: :any_skip_relocation, sierra: "2250bd07f689721287269dc70c504b4f08ac2a02b5550ad9f0a51dca60ed6f9a" + sha256 cellar: :any_skip_relocation, el_capitan: "0cd940c7c9e59104746a8f83f92a06e703e7f98195a202d20516c03b588fd63f" + 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..ae04f7072ce21 --- /dev/null +++ b/Formula/a/aespipe.rb @@ -0,0 +1,36 @@ +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.4i.tar.bz2" + sha256 "b41c7aaac2542e59d8ff58c1ff9d87b52d4a8c1847b799c8afec91d94517c75e" + 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_sequoia: "86bae4aeca9e193fe463440c99bbe947fc476179522d842fb78e656a803afce0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "33cf76b4cc0d896ed2e642550fca9d0cead87e57db484d3abaccf242bd598397" + sha256 cellar: :any_skip_relocation, arm64_ventura: "223a7bb4dfc437072680e60971c420fc35894e3b722945b2c6abb06ca142a8a8" + sha256 cellar: :any_skip_relocation, sonoma: "e3d143adfbdda4223863a2987725c57e57d2a74b6625379b193ec11541667cfb" + sha256 cellar: :any_skip_relocation, ventura: "16ccce0c36c521aa20a54b3aa450219d1afd242a64f710e27dc674448e9dce75" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e4fda06f8e7156dd281dbe7de2598d07208021bcf01e59f2437a4005169caef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e75357d2a1fb758220a6eceafb99b8800ffce2c08fd96a003bcfc96568d0646" + 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..9743182385033 --- /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.21.tar.gz" + sha256 "047fce790d69c234dde1d23ad9e1f0cf868ac51b2ad9a76560d01e80f2f1c452" + license all_of: [ + "BSD-4-Clause", # AFFLIB 2.0a14 and before + :public_domain, # contributions after 2.0a14 + ] + + bottle do + sha256 cellar: :any, arm64_sequoia: "415198525cd476abc0821e74c603ed01181276a3dd535ab18040cbe069195581" + sha256 cellar: :any, arm64_sonoma: "5f03dcc0b3c684a789bf81d700e7ddfe0a14093915c2872634424b55652a1389" + sha256 cellar: :any, arm64_ventura: "6e8bbe1340c8f6b0c0b4e171ce27e0bb58fc7dd4c582dd55ca22cc78f5738599" + sha256 cellar: :any, sonoma: "dd9226742b7b0c22ec05712fe074202a59af8d6734062ae86080843c8bfa71d1" + sha256 cellar: :any, ventura: "79daeac53f022c937b8f637b1be92b5b710b9aad7d2072225bacd85516229df9" + sha256 cellar: :any_skip_relocation, arm64_linux: "11e7390f80f0cec23e526eebc6347ec8632dd5c1e0fd7e209c0db7cc330e8acb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7fad4c5a290b821683ac96da984b2dd64a3c7b09277e58d8a6cf571825069d8c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => [: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.13") + 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..f68dd3b955cb3 --- /dev/null +++ b/Formula/a/afio.rb @@ -0,0 +1,53 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "733a4169a7be82dc173cc302994ad205493a9085580634b92faa38c96c84608b" + sha256 cellar: :any_skip_relocation, high_sierra: "53dbb826f2c3e050bd70078945d92772a4c434b0aa75e1a71cb29e56ed8e62fa" + 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..0c1bf1cf17a67 --- /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.32c.tar.gz" + version "4.32c" + sha256 "dc7f59a11ce8cf67a3ed09a5ac78028c6f793b239b21fd83e5b2370cea166926" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+c)$/i) + end + + bottle do + sha256 arm64_sequoia: "d3981003e70e3748b65bfd413bd1034d6f95a4bc962128e7555bab38db762c1f" + sha256 arm64_sonoma: "ce9015f31f08176bca50eb207fa89ea7970df962a8afb887d5597c94c97bba60" + sha256 arm64_ventura: "ef8a3dc7bba864eece4e9ee56f4c9f15cdbe03652ff2c830e0eaca58b6125629" + sha256 sonoma: "5afe8218e6fe35e02438154c46ce0dafbd97a04444e451b407974bd9da2db50c" + sha256 ventura: "ccf6081f157cac6dda19f4057bc6d061f8dea6faed0259ba4be279b1228fae94" + sha256 arm64_linux: "92d91deeb4540da360c8886d2b79014db02678586d50349fcfc16412d509eda7" + sha256 x86_64_linux: "048eb774523b3319f185d2f89d95ab831525d8d3cf3c0bf2c530d63a9597be39" + end + + depends_on "coreutils" => :build + depends_on "llvm" + depends_on "python@3.13" + + 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..ab8b61874e0f3 --- /dev/null +++ b/Formula/a/afsctool.rb @@ -0,0 +1,54 @@ +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" + + bottle do + rebuild 1 + 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") + system "cmake", "-S", ".", "-B", "build", *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..39a67ab4e4416 --- /dev/null +++ b/Formula/a/aften.rb @@ -0,0 +1,83 @@ +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 + + bottle do + 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, mojave: "07e80303cd84483b9e86b880feb3885814644b115f161ad10582c6ce99cf192d" + sha256 cellar: :any, high_sierra: "b1b8facf243da3872f4ddf2fbefb4879228cb5b390f883794b8b115d06e4c6a6" + sha256 cellar: :any, sierra: "535ef47b08163c8d1d7a66ffda7d3f280c0569a74d9feedbcfc93cd3c55194ca" + sha256 cellar: :any, el_capitan: "68b4983cc843e2d57854a263038a965a2dd6c473c98111f482ec1c69d09ace83" + 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 + 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..7cc1503e88432 --- /dev/null +++ b/Formula/a/aftman.rb @@ -0,0 +1,49 @@ +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_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 + + 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..986ee56dcd066 --- /dev/null +++ b/Formula/a/afuse.rb @@ -0,0 +1,29 @@ +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" + + 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..252a51c8dfb11 --- /dev/null +++ b/Formula/a/agda.rb @@ -0,0 +1,318 @@ +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"] + revision 1 + + stable do + url "https://github.com/agda/agda/archive/refs/tags/v2.7.0.1.tar.gz" + sha256 "4a2c0a76c55368e1b70b157b3d35a82e073a0df8f587efa1e9aa8be3f89235be" + + resource "stdlib" do + url "https://github.com/agda/agda-stdlib/archive/refs/tags/v2.2.tar.gz" + sha256 "588f94af7fedd5aa1a6a1f0afdfb602d3e4615c7a17e6a0ae9dff326583b7a12" + + # Backport support for building with GHC 9.12 + patch do + url "https://github.com/agda/agda-stdlib/commit/a78700653de116b1043ce5d80bbe99482a705ecc.patch?full_index=1" + sha256 "547af4793368a7b37d7b707cc25d0b87bab674233ed69d38d4d685c28e574a58" + end + end + + resource "cubical" do + url "https://github.com/agda/cubical/archive/refs/tags/v0.7.tar.gz" + sha256 "25a0d1a0a01ba81888a74dfe864883547dbc1b06fa89ac842db13796b7389641" + + # Bump Agda compat + patch do + url "https://github.com/agda/cubical/commit/6220641fc7c297a84c5e2c49614fae518cf6307d.patch?full_index=1" + sha256 "c6919e394ac9dc6efa016fa6b4e9163ce58142d48f7100b6bc354678fc982986" + 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.2.0", + revision: "aee4189dd86889ee14338875ff7f6a81f35379c2" + + # Backport support for stdlib 2.1 + patch do + url "https://github.com/agda/agda-categories/commit/ac0d9d27a402305f6774a6343f7a21a229822168.patch?full_index=1" + sha256 "50dc97c97898c825dd4c85fffc8452dc3e61a7871aa907d65b1711e5642c05fc" + end + end + + resource "agda2hs" do + url "https://github.com/agda/agda2hs/archive/refs/tags/v1.3.tar.gz" + sha256 "0e2c11eae0af459d4c78c24efadb9a4725d12c951f9d94da4adda5a0bcb1b6f6" + 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_sequoia: "490a11d0bbcbd3f24f5f93b9bb3e3ddafd5eb12f146102947f694f7beef4f265" + sha256 arm64_sonoma: "82eeeadbf9509eb0aa895ae08816a0e44360be3d37446bfb7d43e9314d81e9fc" + sha256 arm64_ventura: "36482626ec686b45ccbdd4b3687a9712b9e6536289aa9ca837800ef7c412a94f" + sha256 sonoma: "4fc274813a4bd8253be86441068fe9d9839ec63f9b0e2054353363924c93afda" + sha256 ventura: "a308ed26bc07c352ddc0dcaca281fe4071394dafe727634df199dbce741b9df9" + sha256 arm64_linux: "71576e2ceb209a3c7ffeb5d81893b0cd6467ce31a1fa3f72fec9541701d5058b" + sha256 x86_64_linux: "5f40483798d6b0f2bee203693b81ff5c500c1bd8ebf93386e0fb2ca6bee803d4" + 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" + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + agda2hs = buildpath/"agda2hs" + agdalib = pkgshare # for write permissions needed to re-generate .agdai when using different options + cubicallib = agdalib/"cubical" + categorieslib = agdalib/"categories" + + # Add a backwards compatibility symlink. Can consider removing in a future release + lib.install_symlink pkgshare + + resource("agda2hs").stage agda2hs + resource("stdlib").stage agdalib + resource("cubical").stage cubicallib + resource("categories").stage categorieslib + + # Remove strict stdlib version check in categories + inreplace categorieslib/"agda-categories.agda-lib", /(standard-library)-2\.1$/, "\\1", audit_result: build.stable? + + (buildpath/"cabal.project.local").write <<~HASKELL + packages: . #{agda2hs} + package Agda + flags: +optimise-heavily + -- Workaround for GHC 9.12 until official supported, https://github.com/agda/agda/issues/7574 + allow-newer: Agda:base, agda2hs:base, agda2hs:filepath + 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] + + system "cabal", "v2-update" + system "cabal", "--store-dir=#{libexec}", "v2-install", *exposed_packages, "--lib", *cabal_args + system "cabal", "--store-dir=#{libexec}", "v2-install", ".", agda2hs, *cabal_args + + # Allow build scripts to find stdlib and just built agda binary + Pathname("#{Dir.home}/.config/agda/libraries").write "#{agdalib}/standard-library.agda-lib" + ENV.prepend_path "PATH", bin + + # 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", agdalib, "listings", "AGDA_OPTIONS=" + system "make", "-C", cubicallib, "gen-everythings", "listings", "AGDA_FLAGS=" + system "make", "-C", categorieslib, "html", "OTHEROPTS=" + + # Clean up references to Homebrew shims and temporary generated files + rm_r("#{agdalib}/dist-newstyle") + + # Move the agda2hs support library into place + (agdalib/"agda2hs").install agda2hs/"lib", agda2hs/"agda2hs.agda-lib" + + # Workaround to generate interface files for agda2hs based on + # https://github.com/agda/agda2hs/blob/master/nix/default.nix#L12-L16 + agda2hs_imports = Dir.glob("**/*.agda", base: agdalib/"agda2hs/lib").map do |path| + "import #{path.delete_suffix(".agda").tr("/", ".")}" + end + (agdalib/"agda2hs/Everything.agda").write <<~AGDA + {-# OPTIONS --sized-types #-} + module Everything where + #{agda2hs_imports.join("\n")} + AGDA + cd agdalib/"agda2hs" do + system bin/"agda", "--include-path=.", "Everything.agda" + end + + # write out the example libraries and defaults files for users to copy + (agdalib/"example-libraries").write <<~TEXT + #{opt_pkgshare}/standard-library.agda-lib + #{opt_pkgshare}/doc/standard-library-doc.agda-lib + #{opt_pkgshare}/tests/standard-library-tests.agda-lib + #{opt_pkgshare}/cubical/cubical.agda-lib + #{opt_pkgshare}/categories/agda-categories.agda-lib + #{opt_pkgshare}/agda2hs/agda2hs.agda-lib + TEXT + (agdalib/"example-defaults").write <<~TEXT + standard-library + cubical + agda-categories + agda2hs + 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. + 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 #-} + 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 diff --git a/Formula/a/age-plugin-se.rb b/Formula/a/age-plugin-se.rb new file mode 100644 index 0000000000000..22b2a11b42068 --- /dev/null +++ b/Formula/a/age-plugin-se.rb @@ -0,0 +1,37 @@ +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_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..92eed730086fc --- /dev/null +++ b/Formula/a/age-plugin-yubikey.rb @@ -0,0 +1,38 @@ +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_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 "rust" => :build + + uses_from_macos "pcsc-lite" + + on_linux do + depends_on "pkgconf" => :build + end + + 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..a3a4cca6d54b6 --- /dev/null +++ b/Formula/a/age.rb @@ -0,0 +1,34 @@ +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_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, 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..f85b39788f758 --- /dev/null +++ b/Formula/a/agedu.rb @@ -0,0 +1,37 @@ +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 + + bottle do + 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..fba5ab930b30a --- /dev/null +++ b/Formula/a/agg.rb @@ -0,0 +1,36 @@ +class Agg < Formula + desc "Asciicast to GIF converter" + homepage "https://github.com/asciinema/agg" + url "https://github.com/asciinema/agg/archive/refs/tags/v1.5.0.tar.gz" + sha256 "4bfbd0cc02f416ce868f0209b659a87e333de8f0b5edad19810e152ac6e7fc55" + license "Apache-2.0" + head "https://github.com/asciinema/agg.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b8c244e06f37cc4b715320c197295f7be7d2883a15c71640df0459f6cb5e121" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b4c2f55063edd0c4de7ebc69aa0ff5e3885903aa361de0bc266512c72fc474a3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "75543a62f058deb8b394320b1230ed751b6b5fefa8460ff9ad3dd66a6cfe9b6a" + sha256 cellar: :any_skip_relocation, sonoma: "275a937214296eac98fe68e0201b94fae1a84c98cbc6cbd341abd16ad90a14ab" + sha256 cellar: :any_skip_relocation, ventura: "ba9d2505d3c305eba7b863b70d45439fd93371bb1175077a364e23f1f480cd5c" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc08101777ee80ab9b360d5beeb84a6f4c2f1f11b5b94e272288854cb8bc3546" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0286d23d264406256b83e4cc63414ec5eb84e648354fedb9bc36922bc008b1e1" + 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..e75ec46916a0a --- /dev/null +++ b/Formula/a/aggregate.rb @@ -0,0 +1,72 @@ +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, mojave: "231a7cce3160591eff39c8f70a9324dd0329a6a21355d49747c74308527cc946" + sha256 cellar: :any_skip_relocation, high_sierra: "6dc7626282f519003e1d559ac42a983f4a571494ac04e5b61858fdf16d1ca924" + sha256 cellar: :any_skip_relocation, sierra: "ebe7aa16c7cf36684463292995c60fdde12cdac889de551d8f85b89e6b77416c" + sha256 cellar: :any_skip_relocation, el_capitan: "87507a739f2bd5ba57ccd23b34f2b7c41d68a897c128231dbbc32ba23b869ed5" + 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..f01796d85fb0c --- /dev/null +++ b/Formula/a/aha.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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, mojave: "b8def8fe2809928ffbf3ae5746f1157bacfef12e720d0eef798b4d77902d8f4f" + sha256 cellar: :any_skip_relocation, high_sierra: "9de609b23501a93b6fc39422bc51f4b79c31eba3c39272a06f2710aa7e2d6a3f" + 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..1318295f91961 --- /dev/null +++ b/Formula/a/ahcpd.rb @@ -0,0 +1,91 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "22a512b076e972064d6b0af3eb696a5d2ee62c06aadd2aea01a0bec886d28379" + 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..ad5cd054fd6d0 --- /dev/null +++ b/Formula/a/ahoy.rb @@ -0,0 +1,38 @@ +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.4.0.tar.gz" + sha256 "934456f62143eb6dd92507e0144abbc3e3c0aa8a23955f89704f366b5df260f9" + license "MIT" + head "https://github.com/ahoy-cli/ahoy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c30c730a0e5e1e318913a11f22d2b0f93a2ec1805f3904c52880b8ca97f91e91" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c30c730a0e5e1e318913a11f22d2b0f93a2ec1805f3904c52880b8ca97f91e91" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c30c730a0e5e1e318913a11f22d2b0f93a2ec1805f3904c52880b8ca97f91e91" + sha256 cellar: :any_skip_relocation, sonoma: "64e28243d18ab18c1e06bf60d62813ccfcdcacba549f43554b073cae907504ef" + sha256 cellar: :any_skip_relocation, ventura: "64e28243d18ab18c1e06bf60d62813ccfcdcacba549f43554b073cae907504ef" + sha256 cellar: :any_skip_relocation, arm64_linux: "270832559acf6ca425aa07773609b8abd84f5e02bbf3fa8f7835a94076480eec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2235499bed48ad1d1f2b57fef7fd9f83367dee64c64e4c603dea1f3063fe8962" + 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/aichat.rb b/Formula/a/aichat.rb new file mode 100644 index 0000000000000..3fdb893927007 --- /dev/null +++ b/Formula/a/aichat.rb @@ -0,0 +1,34 @@ +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.29.0.tar.gz" + sha256 "0b586419ce4e29e02eb165e0ab668e0661fac305840348467ab5f45e42551a5a" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/sigoden/aichat.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "75ff892e2de7a3d752e65b088e483ebd3371fdf5e82c1302d1016206459bc0c0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6c760cf616b5c113ce306e7d19c6a39a12ed54dd4dcf03f41f57f9012bb1b3a9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b593e7b7f291b81e3e7a1ba521aa48fcb9e313ef221f66253b4edddae6c07f15" + sha256 cellar: :any_skip_relocation, sonoma: "19aa8acf1e3bfdb7e730473d74ccfcbb4ae872fa1d91e8ee6456e66dc0d193f0" + sha256 cellar: :any_skip_relocation, ventura: "6f3f4043a3ba73665ed4a84a34bc6891bb7af630d21f8ab0dfe8de7900ce7324" + sha256 cellar: :any_skip_relocation, arm64_linux: "a9ec159830d1c07c15a06e9b7e8e395b4bc9b1c797e6e578eee612ab18131290" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45476f83ef63ae2df06366d5822de1746d285bc9d26b82e93841235ba959c3c0" + 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..d2c28692255f1 --- /dev/null +++ b/Formula/a/aicommit.rb @@ -0,0 +1,30 @@ +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" + + bottle do + 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, 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/aicommits.rb b/Formula/a/aicommits.rb new file mode 100644 index 0000000000000..96997dff6782e --- /dev/null +++ b/Formula/a/aicommits.rb @@ -0,0 +1,31 @@ +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" + + 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..89654a67bf1ae --- /dev/null +++ b/Formula/a/aide.rb @@ -0,0 +1,85 @@ +class Aide < Formula + desc "File and directory integrity checker" + homepage "https://aide.github.io/" + license "GPL-2.0-or-later" + + stable do + url "https://github.com/aide/aide/releases/download/v0.19/aide-0.19.tar.gz" + sha256 "e7fba0214be01299d76359bff2975233ed241332e4cfcfff59cd1b6a89aba5e4" + + # Fix to missing MAGIC Constants for linux, remove in next release + # Issue ref: https://github.com/aide/aide/issues/192 + patch do + url "https://github.com/aide/aide/commit/3a218b2a3affe034bb51506fd0b770eab723ca95.patch?full_index=1" + sha256 "6136c77d4242664a9df9ae9daa62a96809aadb21875655b705b4f2ea1e6cead8" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "758e74004bbc5c324e8d762b0bdec6632d817125346c092126784efc5195a503" + sha256 cellar: :any, arm64_sonoma: "996cfa72645cfd7cbf3e543e9dd2b562d33f6809f66f795e9d52f1747f49b27e" + sha256 cellar: :any, arm64_ventura: "2eabc4523a770502710a4cc759fa9b1f21dfef43616c38fa7f8076c2ae679963" + sha256 cellar: :any, sonoma: "fd0f7276bedd9c50e33b07770656dc69cc9a408d0acf499b27c85d2ab42ad06a" + sha256 cellar: :any, ventura: "b84e1f1c9b88e3fc1a9588ce0d59e11dc9af323b2c54454511ec8022ed2357ed" + sha256 cellar: :any_skip_relocation, arm64_linux: "d2fb38a54ef59390ca2b5161a839983818eea34f11d50c4909b66eba395ee96f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "020f57203ee46e492a1a3a8e2fbc207757aba784dc14118ffb85f04c98d371ce" + 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..da347e277c7bb --- /dev/null +++ b/Formula/a/aider.rb @@ -0,0 +1,501 @@ +class Aider < Formula + include Language::Python::Virtualenv + + desc "AI pair programming in your terminal" + homepage "https://aider.chat/" + url "https://files.pythonhosted.org/packages/70/4d/72c96cb1c66a1e1fe098b0750d52dc63a7efe14cad40bb456114aa21e213/aider_chat-0.82.2.tar.gz" + sha256 "fb725d4b5c7874a76b113bee3ab49e1a4c7daeae6f30accc6fd36960aa4f5928" + license "Apache-2.0" + head "https://github.com/paul-gauthier/aider.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a19d88b61f657410fa3b6a6e6d44579a5ed36db53b0c550df6fd8e0d6fd82efb" + sha256 cellar: :any, arm64_sonoma: "123f8622fe915d3d7f1d91fd979fd30b13afb209110e5288fd8b9bc5ccee15fe" + sha256 cellar: :any, arm64_ventura: "a1a175ae776a64860bed0ad3ce5095ec99a123ab618c81779abeecb13dd95ffd" + sha256 cellar: :any, sonoma: "1bec9b03bf7702d7025e683d9ad805368fe161f1e487c141ebaa594ea04cb642" + sha256 cellar: :any, ventura: "8ed23816a741753cdf5baf5169df8e84fc68f79052744b408d233db1c1c8b872" + sha256 cellar: :any_skip_relocation, arm64_linux: "004a372bf29909a60405d6a48273712c34f9a9d633f5d50f8caf987b98dc9bff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48d1e6146cfcbcd6e4d08900b6f6b55dd6fcced82d8a6e0e6a805acba112dde1" + end + + depends_on "rust" => :build # for pydantic_core + depends_on "certifi" + depends_on "cffi" + depends_on "libyaml" + depends_on "numpy" + depends_on "pillow" + depends_on "python@3.12" # py3.13 support issue, https://github.com/Aider-AI/aider/issues/3037 + depends_on "scipy" + + # 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/f1/d9/1c4721d143e14af753f2bf5e3b681883e1f24b592c0482df6fa6e33597fa/aiohttp-3.11.16.tar.gz" + sha256 "16f8a2c9538c14a557b4d309ed4d0a7c60f0253e8ed7b6c9a2859a7582f8b1b8" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + 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/f0/3c/adaf39ce1fb4afdd21b611e3d530b183bb7759c9b673d60db0e347fd4439/beautifulsoup4-4.13.3.tar.gz" + sha256 "1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/70/8a/73f1008adfad01cb923255b924b1528727b8270e67cb4ef41eabdc7d783e/ConfigArgParse-1.7.tar.gz" + sha256 "e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1" + 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/e7/c4/5842fc9fc94584c455543540af62fd9900faade32511fab650e9891ec225/flake8-7.2.0.tar.gz" + sha256 "fa558ae3f6f7dbf2b4f22663e5343b6b6023620461f8d4ff2019ef4b5ee70426" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + end + + resource "fsspec" do + url "https://files.pythonhosted.org/packages/45/d8/8425e6ba5fcec61a1d16e41b1b71d2bf9344f1fe48012c2b48b9620feae5/fsspec-2025.3.2.tar.gz" + sha256 "e52c77ef398680bbd6a98c0e628fbc469491282981209907bbc8aea76a04fdc6" + 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 "grep-ast" do + url "https://files.pythonhosted.org/packages/33/c8/2b6e6f6967a4310989b743f635f297cb1e7e5f9d6750ec213412a65c4fc2/grep_ast-0.8.1.tar.gz" + sha256 "8faf285f44042af47dc6a45f1e1f8029866048563d758a719b0539cad264187f" + 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/9f/45/ad3e1b4d448f22c0cff4f5692f5ed0666658578e358b8d58a19846048059/httpcore-1.0.8.tar.gz" + sha256 "86e94505ed24ea06514883fd44d2bc02d90e77e7979c8eb71b90f41d364a1bad" + 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/df/22/8eb91736b1dcb83d879bd49050a09df29a57cc5cd9f38e48a4b1c45ee890/huggingface_hub-0.30.2.tar.gz" + sha256 "9a7897c5b6fd9dad3168a794a8998d6378210f5b9688d0dfc180b1a228dc2466" + 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/1e/c2/e4562507f52f0af7036da125bb699602ead37a2332af0788f8e0a3417f36/jiter-0.9.0.tar.gz" + sha256 "aadba0964deb424daa24492abc3d229c60c4a31bfee205aedbf1acc7639d7893" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + end + + resource "litellm" do + url "https://files.pythonhosted.org/packages/7b/b2/847d00916c2961fa15a452fdfa17461ec4a969712b0144996c6fcbfa4406/litellm-1.65.7.tar.gz" + sha256 "e5ea827cc006be32f8ad977b5f8296eeed2ed42bdbff5539bb6814db068fae84" + 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 "monotonic" do + url "https://files.pythonhosted.org/packages/ea/ca/8e91948b782ddfbd194f323e7e7d9ba12e5877addf04fb2bf8fca38e86ac/monotonic-1.6.tar.gz" + sha256 "3a55207bcfed53ddd5c5bae174524062935efed17792e9de2ad0205ce9ad63f7" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/c4/80/a84676339aaae2f1cfdf9f418701dd634aef9cc76f708ef55c36ff39c3ca/networkx-3.2.1.tar.gz" + sha256 "9f1bb5cf3409bf324e0a722c20bdb4c20ee39bf1c30ce8ae499c8502b0b5e0c6" + end + + resource "openai" do + url "https://files.pythonhosted.org/packages/1c/69/d476383a79f323df084cc8ce980e7852eccf994594feabca8219eea40b79/openai-1.73.0.tar.gz" + sha256 "b58ea39ba589de07db85c9905557ac12d2fc77600dcd2b92a08b99c9a3dce9e0" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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 "posthog" do + url "https://files.pythonhosted.org/packages/4b/e6/071d5dbfe65ef1ac7f7d5a987e2bfab8d9007b0aef4247060c32c3197579/posthog-3.24.1.tar.gz" + sha256 "1b854b1d70b26d9add1fd3755b4f72acb565db32722cc5d076d9db799187753e" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/e1/bd15cb8ffdcfeeb2bdc215de3c3cffca11408d829e4b8416dcfe71ba8854/prompt_toolkit-3.0.50.tar.gz" + sha256 "544748f3860a2623ca5cd6d2795e7a14f3d0e1c3c9728359013f79877fc89bab" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + 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 "pycodestyle" do + url "https://files.pythonhosted.org/packages/04/6e/1f4a62078e4d95d82367f24e685aef3a672abfd27d1a868068fed4ed2254/pycodestyle-2.13.0.tar.gz" + sha256 "c8415bf09abe81d9c7f872502a6eee881fbe85d8763dd5b9924bb0a01d67efae" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + 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/af/cc/1df338bd7ed1fa7c317081dcf29bf2f01266603b301e6858856d346a12b3/pyflakes-3.3.2.tar.gz" + sha256 "6dfd61d87b97fba5dcfaaf781171ac16be16453be6d816147989e7f6e6a9576b" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pypandoc" do + url "https://files.pythonhosted.org/packages/e1/88/26e650d053df5f3874aa3c05901a14166ce3271f58bfe114fd776987efbd/pypandoc-1.15.tar.gz" + sha256 "ea25beebe712ae41d63f7410c08741a3cab0e420f6703f95bc9b3a749192ce13" + 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/88/2c/7bb1416c5620485aa793f2de31d3df393d3686aa8a8506d11e10e13c5baf/python_dotenv-1.1.0.tar.gz" + sha256 "41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5" + 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/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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/80/2d/b04ae180312b81dbb694504bee170eada5372242e186f6298139fd3a0513/sounddevice-0.5.1.tar.gz" + sha256 "09ca991daeda8ce4be9ac91e15a9a81c8f81efa6b695a348c9171ea0c16cb041" + 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/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + end + + resource "tiktoken" do + url "https://files.pythonhosted.org/packages/ea/cf/756fedf6981e82897f2d570dd25fa597eb3f4459068ae0572d7e888cfd6f/tiktoken-0.9.0.tar.gz" + sha256 "d02a5ca6a938e0490e1ff957bc48c8b078c88cb83977be1625b1fd8aac792c5d" + end + + resource "tokenizers" do + url "https://files.pythonhosted.org/packages/92/76/5ac0c97f1117b91b7eb7323dcd61af80d72f790b4df71249a7850c195f30/tokenizers-0.21.1.tar.gz" + sha256 "a1bb04dc5b448985f86ecd4b05407f5a8d97cb2c0532199b2a302a604a0165ab" + 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/1b/d6/d9120dd60db977534ee1dea1459fa8695bfd220d003f2b7b9b74e9df19e0/tree_sitter_language_pack-0.6.1.tar.gz" + sha256 "a4635f5b6b9b642562d901e4eaa25fc82949d660c88b94753e6d467d963402b9" + end + + resource "tree-sitter-yaml" do + url "https://github.com/tree-sitter-grammars/tree-sitter-yaml/archive/refs/tags/v0.7.0.tar.gz" + sha256 "8182760587f14d5131161dee3605613ccebe86062909f0879edf63b4bdd99d44" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "watchfiles" do + url "https://files.pythonhosted.org/packages/03/e2/8ed598c42057de7aa5d97c472254af4906ff0a59a66699d426fc9ef795d7/watchfiles-1.0.5.tar.gz" + sha256 "b7529b5dcc114679d43827d8c35a07c493ad6f083633d573d81c660abc5979e9" + 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/fc/4d/8a8f57caccce49573e567744926f88c6ab3ca0b47a257806d1cf88584c5f/yarl-1.19.0.tar.gz" + sha256 "01e02bb80ae0dbed44273c304095295106e1d9470460e773268a27d11e594892" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + end + + def python3 + "python3.12" + end + + def install + virtualenv_install_with_resources + end + + test do + ENV["AIDER_DRY_RUN"] = "true" + ENV["AIDER_GUI"] = "false" + ENV["AIDER_CHECK_UPDATE"] = "false" + 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/ain.rb b/Formula/a/ain.rb new file mode 100644 index 0000000000000..e9162118c179e --- /dev/null +++ b/Formula/a/ain.rb @@ -0,0 +1,38 @@ +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_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/aircrack-ng.rb b/Formula/a/aircrack-ng.rb new file mode 100644 index 0000000000000..c4b7391c2a1f7 --- /dev/null +++ b/Formula/a/aircrack-ng.rb @@ -0,0 +1,104 @@ +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 + + bottle do + 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..0507c0c0a8680 --- /dev/null +++ b/Formula/a/airshare.rb @@ -0,0 +1,153 @@ +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 15 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4b550bf1cf350929dcc4c64edd0df91db3b9b800ee418721d1705e33d33215a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e1b5324e495b815efe00ec0c09090671c2eaca5ba646765f7fe32e69b19397da" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c288eec063472c2d29405feada5730445b2a53ddaed3e99d38a539bde78ec242" + sha256 cellar: :any_skip_relocation, sonoma: "6bf6cc80923dfeb6076056bdefde98cdedd59f02ccaf733b9c8af04369f9280b" + sha256 cellar: :any_skip_relocation, ventura: "c78c8e76814a75b1d0804179773455dc97094e762315ef8a830094c3c584aa18" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0db9e226d715c89d276a8ba05284219008504ad30e01d6ef51672eec8fe455a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9a6df81c0528040a14037b6b41f1430cac158b3c4972d629fd67ae234019f6c" + end + + depends_on "python@3.13" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/bc/69/2f6d5a019bd02e920a3417689a89887b39ad1e350b562f9955693d900c40/aiohappyeyeballs-2.4.3.tar.gz" + sha256 "75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/4b/cb/f9bb10e0cf6f01730b27d370b10cc15822bea4395acd687abc8cc5fed3ed/aiohttp-3.11.7.tar.gz" + sha256 "01a8aca4af3da85cea5c90141d23f4b0eee3cbecfd33b029a45a80f28c66c668" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ae/67/0952ed97a9793b4958e5736f6d2b346b414a2cd63e82d05940032f45b32f/aiosignal-1.3.1.tar.gz" + sha256 "54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc" + end + + resource "asyncio" do + url "https://files.pythonhosted.org/packages/da/54/054bafaf2c0fb8473d423743e191fcdf49b2c1fd5e9af3524efbe097bafd/asyncio-3.4.3.tar.gz" + sha256 "83360ff8bc97980e4ff25c964c7bd3923d333d177aa4f7fb736b019f26c7cb41" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" + sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/b0/ee/9b19140fe824b367c04c5e1b369942dd754c4c5462d5674002f75c4dedc1/certifi-2024.8.30.tar.gz" + sha256 "bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9" + 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 "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 "frozenlist" do + url "https://files.pythonhosted.org/packages/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/6a/40/64a912b9330786df25e58127194d4a5a7441f818b400b155e748a270f924/humanize-4.11.0.tar.gz" + sha256 "e66f36020a2d5a974c504bd2555cf770621dbdbb6d82f94a6857c0b1ea2608be" + 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/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/a9/4d/5e5a60b78dbc1d464f8a7bbaeb30957257afdc8512cbb9dfd5659304f5cd/propcache-0.2.0.tar.gz" + sha256 "df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/37/72/88311445fd44c455c7d553e61f95412cf89054308a1aa2434ab835075fc5/termcolor-2.5.0.tar.gz" + sha256 "998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/e8/4f/0153c21dc5779a49a0598c445b1978126b1344bab9ee71e53e44877e14e0/tqdm-4.67.0.tar.gz" + sha256 "fe5a6f95e6fe0b9755e9469b77b9c3cf850048224ecaa8293d7d2d31f97d869a" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/5e/4b/53db4ecad4d54535aff3dfda1f00d6363d79455f62b11b8ca97b82746bd2/yarl-1.18.0.tar.gz" + sha256 "20d95535e7d833889982bfe7cc321b7f63bf8879788fee982c76ae2b24cfb715" + end + + resource "zeroconf" do + url "https://files.pythonhosted.org/packages/89/e0/cddc7e2272799e11ea172810fd2f6da58fc7290f9bd3102d6cf2c385cca3/zeroconf-0.136.2.tar.gz" + sha256 "37d223febad4569f0d14563eb8e80a9742be35d0419847b45d84c37fc4224bb4" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"airshare", shells: [:fish, :zsh], 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..e1b592e0d24cb --- /dev/null +++ b/Formula/a/airspy.rb @@ -0,0 +1,58 @@ +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" + + bottle do + 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 mojave: "28e8a9afd6a78a3c091e70d0326431a68738ec26e08448d88d62974374a08a42" + 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 + 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() { + 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..a68e3823c3e7d --- /dev/null +++ b/Formula/a/airspyhf.rb @@ -0,0 +1,55 @@ +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" + + bottle do + 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, mojave: "bf9f1a8213e873c37f1ebae5b6d986774abcf882c272932badffbf3e23cacddb" + 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 + 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() { + 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/aiven-client.rb b/Formula/a/aiven-client.rb new file mode 100644 index 0000000000000..75968afa5f119 --- /dev/null +++ b/Formula/a/aiven-client.rb @@ -0,0 +1,51 @@ +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/7f/a4/69f54a86b576cba4331ca6ecd34f7c5a4167b8040f623dc8b810daf8561f/aiven_client-4.7.1.tar.gz" + sha256 "a9ea25eab4888d35fe47de90e66b4e2bba172cc419c022bf56b6b8f4607e29c4" + license "Apache-2.0" + head "https://github.com/aiven/aiven-client.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d3773dd54f682aa0af8bbbd1668ac7a5d6b0a3331b8e58dcd2bebbdee623ea41" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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..5d5fb80d3313a --- /dev/null +++ b/Formula/a/akamai.rb @@ -0,0 +1,32 @@ +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.1.tar.gz" + sha256 "c9fad288ac1c45946f9ebe8de28c0bd47646d0033ae15d4cafc5f9bb472d6b94" + license "Apache-2.0" + head "https://github.com/akamai/cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3b915d193b1283f0ad602de2d6b8b1803841801b8ef437f2946e44f3b68208f0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3b915d193b1283f0ad602de2d6b8b1803841801b8ef437f2946e44f3b68208f0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3b915d193b1283f0ad602de2d6b8b1803841801b8ef437f2946e44f3b68208f0" + sha256 cellar: :any_skip_relocation, sonoma: "6c58192af7a10223a6a0d2ac49bbe2b44ba8b77b780677263cdf6f7c111e2117" + sha256 cellar: :any_skip_relocation, ventura: "6c58192af7a10223a6a0d2ac49bbe2b44ba8b77b780677263cdf6f7c111e2117" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce4711c42cbe0383cac485f7bb0e83c75c73b23a36e38d562d882578302f21d3" + 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..bc0cba7b6bc3e --- /dev/null +++ b/Formula/a/akku.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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..4728ac8b2f8d0 --- /dev/null +++ b/Formula/a/alac.rb @@ -0,0 +1,37 @@ +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, mojave: "ffc34867982b3a942be2bfa1c9a561bc85270871b029c45a16fc11ffae899603" + sha256 cellar: :any_skip_relocation, high_sierra: "17bffb09018ddf7d96258b99860d75fb9a203037a356cb0f2e4c6c4520cdc4c3" + sha256 cellar: :any_skip_relocation, sierra: "3c833c71834ea65498c761d4fe444a26e97e107433de526ab55ad1fb0d36a2ba" + sha256 cellar: :any_skip_relocation, el_capitan: "4cb85c125553c6c2a49576790c5be5e0b89096569131df3b8576f3499e65ef5a" + 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..38d75f8aa44f1 --- /dev/null +++ b/Formula/a/alass.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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..328c07b0dd1b9 --- /dev/null +++ b/Formula/a/alda.rb @@ -0,0 +1,42 @@ +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.1.tar.gz" + sha256 "8136f4fe1c74344ad8b27d23329e23620fdea76fe8892565ff308bda3ceac8cd" + license "EPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "09d4341cecac9531dd44b96b2f52a32775469737eb6df9ec7861db1f8253942d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f8569e28905afb0cbce78c191bed4a4f82919a5a4c33dbf90d1d1501f9c039b2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0ce57b03fecb0b4155c55b19281fabb971f3132b90e7a4bdb9323465d27b09a3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e870439ad6cdb59433ea8b3983a38b56aae62c83c4897b9d00f32098eb09bf3b" + sha256 cellar: :any_skip_relocation, sonoma: "449cecf972dca30dee2e236c608b70f32c99071d792597e703bf21247f580b3b" + sha256 cellar: :any_skip_relocation, ventura: "60bd98f1ca49d93de8feb9a7034951e5c8351011fe2ff78d76fd33bb0eb20eb4" + sha256 cellar: :any_skip_relocation, monterey: "77bff4c2e20242de41cdb57f9b794f013d2f3a797bd474f36a5da289dfefbc3f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "666e3c967b722e5433d5c9a24f0efa73289af18ea5700042f2e275b09eb8f741" + end + + depends_on "go" => :build + depends_on "gradle" => :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..71e3e8918c402 --- /dev/null +++ b/Formula/a/aldo.rb @@ -0,0 +1,50 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "4c510b7da186be5d55c990d97265952de8fad51079ad2fa18058b8a57d8eeebb" + sha256 cellar: :any, high_sierra: "d30e5e60defc2e2d2110cf52a60898d94ae3331a679f1c228e0d598421a594d9" + sha256 cellar: :any, sierra: "ad5216c04fce4d1f4da63af2fa4d298a3414073db186991ec4389a942799ddd1" + sha256 cellar: :any, el_capitan: "0691c4b9b7ae5b6f104c5b5205f731d4348563b8a9a8c3631395f619ce00aabf" + 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/formula-patches/85fa66a9/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/alembic.rb b/Formula/a/alembic.rb new file mode 100644 index 0000000000000..3cdb0a80c716f --- /dev/null +++ b/Formula/a/alembic.rb @@ -0,0 +1,44 @@ +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.8.tar.gz" + sha256 "ba1f34544608ef7d3f68cafea946ec9cc84792ddf9cda3e8d5590821df71f6c6" + license "BSD-3-Clause" + head "https://github.com/alembic/alembic.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6a69e3e7fe9ed8794cfb70d95e5a90d4edd03fb37870d318cc2772f3d887dc57" + sha256 cellar: :any, arm64_sonoma: "a0de5bbd49ecae579210057e2fd9623bfcd5c8751ebb33638b9c498a8e896cfd" + sha256 cellar: :any, arm64_ventura: "805fdb868569c1d52f0014d0fe5c33ec94351295713cabd827d6604ec59b931a" + sha256 cellar: :any, sonoma: "9b999957a0cd7bb166cbaab35e65c2b29fa7571366d7140548469cb416fa0a7e" + sha256 cellar: :any, ventura: "b0156c9b787c034db3f133800446abae92cb2d9ad778cc28e76c8e2794b9a72f" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf3154912b2a9e4e2bdb3c8b96774ac964729107d0696c8edda544444693b849" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fef41d868f2c1ab7bfe69219612f1958056e6396dd5055d8320a6a952dca4e2d" + 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..e7f52cfc5b396 --- /dev/null +++ b/Formula/a/alexjs.rb @@ -0,0 +1,30 @@ +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" + + bottle do + rebuild 1 + 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..6503783695d3a --- /dev/null +++ b/Formula/a/algernon.rb @@ -0,0 +1,45 @@ +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.3.tar.gz" + sha256 "fa65d1f42719b23309259af4c5b02b1ae435771ea7ecb39c44ba27974d1431c6" + 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_sequoia: "f45cc8bc25c0e58336d003756bb56fd64e7fd0ccd4632092c669f7c9dd84d425" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6fcc88380fdbe56754e03780462af0b6bed267bc208a6605464eeafaf25f1e8b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a2e43bb0117c0506fc5380ade27f49e0291c4d3321ebef4c180fd3ad267fa4c4" + sha256 cellar: :any_skip_relocation, sonoma: "dafb99f1425261d43809009f66dc86eb5496d12255358f22ab62e131845e5877" + sha256 cellar: :any_skip_relocation, ventura: "afe85eae1aa3f78180566e9d0764b3d3d362af421754494cc023015ebf894336" + sha256 cellar: :any_skip_relocation, arm64_linux: "98d16ba48aea3c81bd73432a4f3732b66b1cd63f6df6c6d7c56a23fbc0610e9e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30ab869540b7d63439b0bc438f3309b90eeaf9f80915089e5ba072083afa0301" + 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..c526015ad4aa5 --- /dev/null +++ b/Formula/a/algol68g.rb @@ -0,0 +1,42 @@ +class Algol68g < Formula + desc "Algol 68 compiler-interpreter" + homepage "https://jmvdveer.home.xs4all.nl/algol.html" + url "https://jmvdveer.home.xs4all.nl/algol68g-3.5.14.tar.gz" + sha256 "b88cbcac88548e8862409fcae44a6bb082125cc031d70dbb237706a3ff47f569" + 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_sequoia: "8da3e482e79ee7e61157578716bd5a1079adbc50a693a1ab9ca5b9e8a875c428" + sha256 arm64_sonoma: "a1faeb97e6a316b8bf4e54513fe93504cd036990b3e4c144d82430fd19ba0f03" + sha256 arm64_ventura: "00e86e6a1049d307c35c2f129680bbf2172ee4aede3ef35ae90b50d236fb2843" + sha256 sonoma: "3bb454cf07b1aaaa4910c9833ac65f295c7fc06990b5ed1c887bb8c5515915ab" + sha256 ventura: "e9e8041ff2fb6786a0def289a776a2b159f4bf6285105f3e3432f3a03513a819" + sha256 arm64_linux: "244c2ac6c5998c1216ca18848b2d16a1bad8d1d42a3e93752bc9aa6d3a5d251c" + sha256 x86_64_linux: "47a93c8a312a2bfe6c57b98d13e155b0fa0eab4fa8e48167ef0b4b0664844c70" + 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..744594e73c911 --- /dev/null +++ b/Formula/a/algolia.rb @@ -0,0 +1,33 @@ +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.6.11.tar.gz" + sha256 "0965dadab1519128130532141701efbf56310f7cb9735c1da596cf6f2aad4657" + license "MIT" + head "https://github.com/algolia/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e3838d70240aaee37f970111e75b7bcaf0f6f072dd7f6c38b74d802abf192c76" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e3838d70240aaee37f970111e75b7bcaf0f6f072dd7f6c38b74d802abf192c76" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e3838d70240aaee37f970111e75b7bcaf0f6f072dd7f6c38b74d802abf192c76" + sha256 cellar: :any_skip_relocation, sonoma: "7f9f58f1756da53c7323aeafc4e571ab02f581233f2de04de9f06239b77e6e50" + sha256 cellar: :any_skip_relocation, ventura: "7f9f58f1756da53c7323aeafc4e571ab02f581233f2de04de9f06239b77e6e50" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d96519f4745556eb24812382b9ca4682bd8196af3f648a2895240b13937ae61d" + 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..6fc568e76924b --- /dev/null +++ b/Formula/a/ali.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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, 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..7811a3caebc75 --- /dev/null +++ b/Formula/a/aliae.rb @@ -0,0 +1,49 @@ +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.5.tar.gz" + sha256 "fae24264ba59214a657f0e4022e527ecd9459e66eb7bf3fdab1484a2fef78276" + license "MIT" + head "https://github.com/jandedobbeleer/aliae.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "893962f0bc61841a44fb822e3c73b61579b7547f99d5ddd957ac65cad761bb85" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bd2ea50e4ed2466e2b5a85376f6b03f664d76ba31fd4f7860a3e253ebc5147a8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5dea9ce9501d131f2400499794562a1c35499557c72ce3710aa28f6a6edff30c" + sha256 cellar: :any_skip_relocation, sonoma: "6b057fb7d3f910025e0297ac4029248611d90eb68dae4991f2eadbd5941415b2" + sha256 cellar: :any_skip_relocation, ventura: "aa29d6f7f2c54751786bbf7881f5f97d44408f85e55c069c3ea0e43e5850497f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f1b7a1febbe233213e950e1e3766786170543e8ce9f0a6c509af2bd61aeffb2" + 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..d569c7f7f7465 --- /dev/null +++ b/Formula/a/aliddns.rb @@ -0,0 +1,41 @@ +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_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, 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..261231881be1f --- /dev/null +++ b/Formula/a/align.rb @@ -0,0 +1,27 @@ +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 + + 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..35127213fc6a4 --- /dev/null +++ b/Formula/a/alive2.rb @@ -0,0 +1,50 @@ +class Alive2 < Formula + desc "Automatic verification of LLVM optimizations" + homepage "https://github.com/AliveToolkit/alive2" + url "https://github.com/AliveToolkit/alive2.git", + tag: "v20.0", + revision: "c0f5434f402ad91714ee0952f686cd0f524920ad" + license "MIT" + revision 2 + head "https://github.com/AliveToolkit/alive2.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c2e52c9df83cf4759cdc53761aec5cf533bdc24fc9812241c18f494a9e7bc836" + sha256 cellar: :any, arm64_sonoma: "d12f24a623fe6a7ae194b546ed2076cb9b71b7f2b2ffc8abacf6f004db446720" + sha256 cellar: :any, arm64_ventura: "7226a45ac96be7b39e0e46ae592be043787bf4965438046c42f8268e54abac6a" + sha256 cellar: :any, sonoma: "08df28b20a2c4561764372987bb7c3a6bed76ec8dc0fa73545ada659ed6c940e" + sha256 cellar: :any, ventura: "5191a7a9eead8da3646a9f14a0fee799a34169c08f81305654f2548866a4e274" + sha256 cellar: :any_skip_relocation, arm64_linux: "3114b328118b8ad425d287974aba4102603651a8bbfd3fa230e053e999e9bf18" + sha256 cellar: :any_skip_relocation, x86_64_linux: "705c815f0a0f02d812d19373f57777172297964a2a265bbd1631d4c82fb9309f" + 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' + ENV.llvm_clang if OS.mac? && MacOS.version <= :ventura + + 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..66c2f2a07cd02 --- /dev/null +++ b/Formula/a/aliyun-cli.rb @@ -0,0 +1,40 @@ +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.0.277", + revision: "adfed63c333440b23888237e22142550c1fb8087" + license "Apache-2.0" + head "https://github.com/aliyun/aliyun-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8b1f1bb0e1b6d5a0f86ce7fd5d41bcb55f71e777f5fdb79bddc178a32043e2a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b1f1bb0e1b6d5a0f86ce7fd5d41bcb55f71e777f5fdb79bddc178a32043e2a4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b1f1bb0e1b6d5a0f86ce7fd5d41bcb55f71e777f5fdb79bddc178a32043e2a4" + sha256 cellar: :any_skip_relocation, sonoma: "2b01d19dd83a831ee5b49bbc2588aeecde702e026f69434ecd25c25b1989ff85" + sha256 cellar: :any_skip_relocation, ventura: "2b01d19dd83a831ee5b49bbc2588aeecde702e026f69434ecd25c25b1989ff85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d622ad569653d58a93461d6a959ebc9d13a09cbd23de17fae40ef7fb169b22e" + 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..801ac35cba5d5 --- /dev/null +++ b/Formula/a/aliyunpan.rb @@ -0,0 +1,28 @@ +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_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, 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..2545bcaf82fbc --- /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/e6/16/9c4a52a5274d6b0e0526aeab9e6a562583f46feb941093842849b44717c4/all_repos-1.29.0.tar.gz" + sha256 "5b85bd259819f5e7d1dd6a06f0f4730d1ea822b95f496edcdbafd328110547f0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "670a510cc3937a676372a13afaf9764a568152cad4f6466f308261c7f89dc508" + end + + depends_on "python@3.13" + + resource "identify" do + url "https://files.pythonhosted.org/packages/82/bf/c68c46601bacd4c6fb4dd751a42b6e7087240eaabc6487f2ef7a48e0e8fc/identify-2.6.6.tar.gz" + sha256 "7bec12768ed44ea4761efb47806f0a41f86e7c0a5fdf5950d4648c90eca7e251" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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..ed32db0c8d464 --- /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 1 + head "https://github.com/liballeg/allegro5.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "db24d012cd88b23d8587898aceab3203169a995e7bc874e0db849942459ececa" + sha256 cellar: :any, arm64_sonoma: "871af04f1451b1064666dc3b696f810cb105fa4f0245125a61007d11d3210442" + sha256 cellar: :any, arm64_ventura: "cc0ab101b41137fa5ea75ca65427c21e51164ad3ddd0af841816d068e932de97" + sha256 cellar: :any, sonoma: "0285e3c404d3351c218ed93958d982001a32092a6be106454772e5b981eebddb" + sha256 cellar: :any, ventura: "4b0d776e4d1539a4826a9e6eb721a9c769110cd33d20657d5ca1c870ff47c4da" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b00b980e261ff3cab81d54a8952e7e46868c55c03bce69da9a38b0314d21298" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77d8fa148090e9335b24c1bcd37d711c5206657ac0124c6dc7275e7c8f3e8da2" + 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.rb b/Formula/a/alloy.rb new file mode 100644 index 0000000000000..f18d97927500d --- /dev/null +++ b/Formula/a/alloy.rb @@ -0,0 +1,32 @@ +class Alloy < 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 + + bottle do + sha256 cellar: :any_skip_relocation, all: "e82b9d3a9c9882398cf30d603d668cfd94b774ddc19ba83e627529e611d64c5d" + 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..f538d3895d9cd --- /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.34.0/allure-commandline-2.34.0.zip" + sha256 "b0554db20cc0472cba2474733560a89805bfaa29c81f65b66763af2ecf80436c" + 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: "5a1d8d7db1fcd72d2efb93abb3c38a2537f8c7f3ac5badfe62d65923c4aae04f" + 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..13663e11d1b86 --- /dev/null +++ b/Formula/a/allureofthestars.rb @@ -0,0 +1,69 @@ +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" + + bottle do + 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..e922289b93386 --- /dev/null +++ b/Formula/a/alluxio.rb @@ -0,0 +1,71 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93b9cc8998810d417c0b5524006f19802f6e0cf1abe6872ea7da8953f454c96c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3d18718fb624fd2db394d87aaca2d4a35b81530e6c78f85970a08fc8c8cb9f74" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3d18718fb624fd2db394d87aaca2d4a35b81530e6c78f85970a08fc8c8cb9f74" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3d18718fb624fd2db394d87aaca2d4a35b81530e6c78f85970a08fc8c8cb9f74" + sha256 cellar: :any_skip_relocation, sonoma: "3a6e404c0c07fc013a139a7ac6e4020b82b15ed3a0d162e3ad2ebddbd3810979" + sha256 cellar: :any_skip_relocation, ventura: "3a6e404c0c07fc013a139a7ac6e4020b82b15ed3a0d162e3ad2ebddbd3810979" + sha256 cellar: :any_skip_relocation, monterey: "3a6e404c0c07fc013a139a7ac6e4020b82b15ed3a0d162e3ad2ebddbd3810979" + sha256 cellar: :any_skip_relocation, arm64_linux: "f408c93e59fd520b8f94f9dbe73270ecd44207dffe1ac253d696044908b6cfd3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13898f6e04b21f80fe62ce9bdeff3b46b13e855324870471b1810255ec37b520" + 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" + 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..acc58922322a8 --- /dev/null +++ b/Formula/a/alot.rb @@ -0,0 +1,157 @@ +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_formula_mappings.json + # 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 1 + head "https://github.com/pazz/alot.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0b0b23d34625ee35bdf19c6f5092d08aacd2e664df666c6fe4ddde34cde674a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5ba913b1ac4fc69ef4228a90031f24237a6a831b0fa3a749c2f30b0216be481c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae3093b552e4356af46b534412c2aaeac27921b04d7b79ba80d58d712dca1be3" + sha256 cellar: :any_skip_relocation, sonoma: "b227c60e1cc403080fa8c14f5b97ab1634fd0e54f31f696fd61fbfa9b8ee84b7" + sha256 cellar: :any_skip_relocation, ventura: "435c5020ea65a79b2d3f016cd82d2c63c65302dad9f3a946e2f1b82cde02852c" + sha256 cellar: :any_skip_relocation, arm64_linux: "dbedea413b1240a740111e09751bd30f3accfa52951214658ba71fcfb105e849" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7e1d080cafcf5344a658d854bafd8f0b44483568a9f39301b23f5179048ab8d" + end + + depends_on "sphinx-doc" => :build + depends_on "swig" => :build + depends_on "gpgme" + depends_on "libmagic" + depends_on "notmuch" + depends_on "python@3.13" + + 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/8d/2d/ede4ad7fc34ab4482389fa3369d304f2fa22e50770af706678f6a332fa82/automat-24.8.1.tar.gz" + sha256 "b34227cf63f6325b8ad2399ede780675083e439b20c323d376373d8ee6306d88" + 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/4c/f4/aa8d364f0dc1f33b2718938648c31202e2db5cd6479a73f0a9ca5a88372d/setuptools-78.0.2.tar.gz" + sha256 "137525e6afb9022f019d6e884a319017f9bf879a0d8783985d32cbc8683cab93" + 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/77/1c/e07af0df31229250ab58a943077e4adbd5e227d9f2ac826920416b3e5fa2/twisted-24.11.0.tar.gz" + sha256 "695d0556d5ec579dcc464d2856b634880ed1319f45b10d19043f2b57eb0115b5" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urwid" do + url "https://files.pythonhosted.org/packages/98/21/ad23c9e961b2d36d57c63686a6f86768dd945d406323fb58c84f09478530/urwid-2.6.16.tar.gz" + sha256 "93ad239939e44c385e64aa00027878b9e5c486d59e855ec8ab5b1e1adcdb32a2" + 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/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "zope-interface" do + url "https://files.pythonhosted.org/packages/30/93/9210e7606be57a2dfc6277ac97dcc864fd8d39f142ca194fdc186d596fda/zope.interface-7.2.tar.gz" + sha256 "8b49f1a3d1ee4cdaf5b32d2e738362c7f5e40ac8b46dd7d1a65e82a4872728fe" + 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..33ca2c063e2e5 --- /dev/null +++ b/Formula/a/alp.rb @@ -0,0 +1,49 @@ +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_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, 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..c351e01be5418 --- /dev/null +++ b/Formula/a/alpine.rb @@ -0,0 +1,143 @@ +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 + + bottle do + rebuild 2 + 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 "imap-uw", because: "both install `mailutil` binaries" + 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..3bf9d58d108eb --- /dev/null +++ b/Formula/a/alpscore.rb @@ -0,0 +1,94 @@ +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" + head "https://github.com/ALPSCore/ALPSCore.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d32af432da55d533b24bd30a60f8e2845ae2bfe97a3b00d5f53e0d58282eeafe" + sha256 cellar: :any, arm64_sonoma: "d8e1ec2c2f445c059c8a6097f6900c4b3366b61f17bb4e985a047dfc71545cb5" + sha256 cellar: :any, arm64_ventura: "7c51b1fafed3d6683f0a7711239ae8dfb960a3f9242e98d04889397112a0bbed" + sha256 cellar: :any, sonoma: "ded6b4a5102bf72ee89b709f48c7363e592435dbf8cab002ec173c7d392ccf47" + sha256 cellar: :any, ventura: "5bb961582c752e10a6d731ccbd7d546c1c2d4193af2c0f5cc1254e193d4568b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "99b0e57c0f9b7695869872b039c3d3723a86f4cf85a25eb44cbca47830a90d21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "992bb58ad888c4accb8a6758f3ec2b4b378af7523626efa5d6785de54c32bf3b" + end + + depends_on "cmake" => [:build, :test] + depends_on "boost" + depends_on "eigen" + depends_on "hdf5" + depends_on "open-mpi" + + 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..f7261d1d40404 --- /dev/null +++ b/Formula/a/alure.rb @@ -0,0 +1,55 @@ +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, mojave: "f2ae4fbf2822241975e66574e41070b298523e6321280bc83aff70d559db149c" + sha256 cellar: :any, high_sierra: "031b2eb61f6206879b76a7276298f1db9875fa996467327b519ccc6d1622a158" + 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_high_sierra :or_newer do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/eed63e836e/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..b9a086a262808 --- /dev/null +++ b/Formula/a/amass.rb @@ -0,0 +1,30 @@ +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/v4.2.0.tar.gz" + sha256 "cc6b88593972e7078b73f07a0cef2cd0cd3702694cbc1f727829340a3d33425c" + license "Apache-2.0" + head "https://github.com/owasp-amass/amass.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "db5368b64cf5b63604ae151e8a4e0c115c3901ae1ca3d9adf859da46dcbb494c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f50a72e211dbd6ad730f2b288656f74ae46e25c07448c3c37dceceb2b45edc4c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d71b584ce13afc60ad62a25a9f2df1fecaa43b30ecd914557374e61c146b4ece" + sha256 cellar: :any_skip_relocation, arm64_monterey: "84dbad75673b4a7fe5b50eacb186f995cced136874ca05a9a9d2d32788991276" + sha256 cellar: :any_skip_relocation, sonoma: "d7ac1d640f491125d3c20fb4d9478a98c5e832fb84d483ebebf3bcd4dcb79e28" + sha256 cellar: :any_skip_relocation, ventura: "3a9b971b823bec3ebd1408d1ac16cd33bd3a6a3fc711a13be734ac6c54e08c4d" + sha256 cellar: :any_skip_relocation, monterey: "ff9b09adf0a93790379a6ef01864d633153a8d57601817ef26d6a7f1fbb58abe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea781b89ff2a7b5bb0035161e5e80466a65d9d1801169452fa7abf5ce35a1f46" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/amass" + end + + test do + assert_match "github.com", shell_output("#{bin}/amass intel -asn 36459 -include Google") + assert_match version.to_s, shell_output("#{bin}/amass --version 2>&1") + end +end diff --git a/Formula/a/amazon-ecs-cli.rb b/Formula/a/amazon-ecs-cli.rb new file mode 100644 index 0000000000000..73be175537ffc --- /dev/null +++ b/Formula/a/amazon-ecs-cli.rb @@ -0,0 +1,41 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "ac8ff57a4b7de517c767f53626f19d134732c9b3a9d68143cac9d4440f01cc2a" + 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..dde48a9044e73 --- /dev/null +++ b/Formula/a/amber.rb @@ -0,0 +1,60 @@ +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_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..69937224ab377 --- /dev/null +++ b/Formula/a/amdatu-bootstrap.rb @@ -0,0 +1,36 @@ +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 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0094a50b87c8bf6f25f9fc0e68bcb95a2c46923a240eb83210748a280ee8cd27" + end + + depends_on "openjdk@8" + + 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..480fc57aa5838 --- /dev/null +++ b/Formula/a/amfora.rb @@ -0,0 +1,52 @@ +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.10.0.tar.gz" + sha256 "0bc9964ccefb3ea0d66944231492f66c3b0009ab0040e19cc115d0b4cd9b8078" + license all_of: [ + "GPL-3.0-only", + any_of: ["GPL-3.0-only", "MIT"], # rr + ] + head "https://github.com/makew0rld/amfora.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d5ca2d3a6e2ceff7b959b5dbcb46fce4ae8fc906ad17d6ae3c56dca81c52cf44" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5ec84d2286802f8cb76b710ced58fe9d19569a77e52f42390fac1d1ecc89b48" + sha256 cellar: :any_skip_relocation, arm64_ventura: "97625ffb788e518429183d5c525d8229fa85c2f1bc266d4532505734a378bcba" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c656b1fe13604e4109727095549cf411fdad31957c2ffe7d134f41495fec011f" + sha256 cellar: :any_skip_relocation, sonoma: "f65bdde1720c9119b9977cde1811d6af3b8cfc879d5189f6693bb87e998341e5" + sha256 cellar: :any_skip_relocation, ventura: "714e7f2580f209650fa0a9f5002708dc84493bae28a4239156d3ff7108fe5fe3" + sha256 cellar: :any_skip_relocation, monterey: "9f519ca531d13326ca451a7f8fca211522102223192f7f3427ba4d94ca29f34f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f2bc8d37b87dd964a2a4c8fe0c9b79406d2adc593edf7a565473190e59929f97" + 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..7d5efd001e565 --- /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.2/3.3-3.0.2" + version "3.0.2" + sha256 "3353e0f87b164a493ad0d5333505f13a28e77c5c57e628daa3be8f85acfbca44" + 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: "a78817794763be017ec9dc58b4fa4956658265675094f317219b57594e50c7be" + 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..9ccf37f4cc997 --- /dev/null +++ b/Formula/a/amp.rb @@ -0,0 +1,60 @@ +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_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..96b7dc5aa7035 --- /dev/null +++ b/Formula/a/ampl-asl.rb @@ -0,0 +1,46 @@ +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_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..2a7f25d0c8357 --- /dev/null +++ b/Formula/a/ampl-mp.rb @@ -0,0 +1,54 @@ +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.3.tar.gz" + sha256 "229c2e82110a8a1c1a845b14e5faa960785c07e2df673bd366f755aca431c1a9" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "72d3f332e77de2e5b258bf56fdaec683156df0ea50bd69183472ecd3406b2f8e" + sha256 cellar: :any, arm64_sonoma: "2a002c99e2dd2fc455f9f020441173b578c990a6c2ed1cddb5ad6ba66e06c9aa" + sha256 cellar: :any, arm64_ventura: "ba31187ed3d38c63fa5ce3147a1585da4dfba58c3ffc963e96b9b62bec3a51eb" + sha256 cellar: :any, sonoma: "688d982bcba62f0093d30a4a13a687bb82d2af614be4c13a38e9c5b30b9e01bd" + sha256 cellar: :any, ventura: "d3b8e2cb8821b8c3d707b873397ebdc414113380feb8d0f3c96009234a8c9234" + sha256 cellar: :any_skip_relocation, arm64_linux: "93c41c2792707a2fcc66dda70e71dfab73c2e719360b44b54dc2fe5930b4b8b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1589822e026ea8029f3b8d187c37979188a056aef87dde9c30f0414a0738e436" + 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..104b6db375420 --- /dev/null +++ b/Formula/a/amqp-cpp.rb @@ -0,0 +1,49 @@ +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_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" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DAMQP-CPP_BUILD_SHARED=ON", + "-DAMQP-CPP_LINUX_TCP=ON", + "-DCMAKE_MACOSX_RPATH=1", + *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..350e44fc881da --- /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://git.kraxel.org/git/amtterm/", branch: "master", using: :git + + 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..44e95e3706a11 --- /dev/null +++ b/Formula/a/analog.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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/ancient.rb b/Formula/a/ancient.rb new file mode 100644 index 0000000000000..c72846f99bb93 --- /dev/null +++ b/Formula/a/ancient.rb @@ -0,0 +1,46 @@ +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.2.0.tar.gz" + sha256 "d814b0a1f2c08cb7e8dc94506c096f21471719a6f9d3d2f93ab9416f1ea98712" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6f1107e987a8027289e5c8e7c95b71e85b75a94d0219df48eac31504bbb427b4" + sha256 cellar: :any, arm64_sonoma: "1dd610a8f47fb9887ed822f63899eb3cbadcad4d0be848aac8e4dd2bd12105ee" + sha256 cellar: :any, arm64_ventura: "cb400c604791468287b32dbb9d5f44b591f0ab9ca2cfccf4b12204eb7f1029ae" + sha256 cellar: :any, arm64_monterey: "038e7397ac6c20fa7a424bf5565504fc669e986bda08600379c297c9e15bffc4" + sha256 cellar: :any, sonoma: "63a480cf9de0421b71aa903cb413749468b3fb6d6d7298566512fae532218d17" + sha256 cellar: :any, ventura: "a449ffd0b1f136e18e93f8c9f7e12a41c06f8e3fc29096f8b17a356cff43fe64" + sha256 cellar: :any, monterey: "c4f2396ffc6013ba685be7a0193afac0a7fa5563471829bf97c5241ca9146cdd" + sha256 cellar: :any_skip_relocation, arm64_linux: "7e45905a5086151609dbd4a69d503f98c5abbc11578f29bd83be8e53d6e4eef5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd132df16f6c1a05eb3eda0807ba65ec02deb30aa03d5b7ca39ee4172b725321" + 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..df95a1a850c5d --- /dev/null +++ b/Formula/a/angband.rb @@ -0,0 +1,81 @@ +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 + + bottle do + rebuild 1 + 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..c1e253c8c3569 --- /dev/null +++ b/Formula/a/angle-grinder.rb @@ -0,0 +1,29 @@ +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_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..86fc52b258b4a --- /dev/null +++ b/Formula/a/angular-cli.rb @@ -0,0 +1,29 @@ +class AngularCli < Formula + desc "CLI tool for Angular" + homepage "https://angular.dev/cli/" + url "https://registry.npmjs.org/@angular/cli/-/cli-19.2.12.tgz" + sha256 "9683cb35af52d1908ac4e5f6b20b174d115dbe68d043251535a3ea9bae9eed2c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "133681b5ed2bdeb65a921565e754b9b8c1783ac3caadf9901de8ff12686ab970" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "133681b5ed2bdeb65a921565e754b9b8c1783ac3caadf9901de8ff12686ab970" + sha256 cellar: :any_skip_relocation, arm64_ventura: "133681b5ed2bdeb65a921565e754b9b8c1783ac3caadf9901de8ff12686ab970" + sha256 cellar: :any_skip_relocation, sonoma: "48d59d0f390a1008e9ad2c07a6ef7fb32c4d98cb0cba97cab065e6bf4dd05093" + sha256 cellar: :any_skip_relocation, ventura: "48d59d0f390a1008e9ad2c07a6ef7fb32c4d98cb0cba97cab065e6bf4dd05093" + sha256 cellar: :any_skip_relocation, arm64_linux: "133681b5ed2bdeb65a921565e754b9b8c1783ac3caadf9901de8ff12686ab970" + sha256 cellar: :any_skip_relocation, x86_64_linux: "133681b5ed2bdeb65a921565e754b9b8c1783ac3caadf9901de8ff12686ab970" + 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..b838a2c23d92c --- /dev/null +++ b/Formula/a/animdl.rb @@ -0,0 +1,201 @@ +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 1 + sha256 cellar: :any, arm64_sequoia: "5aaa37e63ae5e8b1e9fb2fd0412373e8c5bcceb7eb79380ca0fc3f34b047f20c" + sha256 cellar: :any, arm64_sonoma: "efaaca845d0eecd8bf4bc5eb17c608b8e160981f435ece7ef7f1c2974e7ff014" + sha256 cellar: :any, arm64_ventura: "9525f12cfd47300b58e2d8dd1fe726b5271e5efc88c7df3d5ad1d5ff8b7751e4" + sha256 cellar: :any, sonoma: "0f4968fcb2a2aad6e52bd1660a4397e9a4f07ae2fec2d3ca3bdc1dda09e9c82a" + sha256 cellar: :any, ventura: "f5d300f45f9da97629c76e70689d90ce818e328701774b1cb6cb034bb9a19518" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f23fb533affd1c176c1e76f379d12127da98c7b6f084ec7819bc13527beac93" + sha256 cellar: :any_skip_relocation, x86_64_linux: "165920e2f9da447e3b0ef0877851af4f38b339c145fe2d27bcb7a1e57148e714" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + 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/78/49/f3f17ec11c4a91fe79275c426658e509b07547f874b14c1a526d86a83fc8/anyio-4.6.0.tar.gz" + sha256 "137b4559cbb034c477165047febb6ff83f390fc3b20bf181c1fc0a728cb8beeb" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + 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/6f/c3/4f625ca754f4063200216658463a73106bf725dc27a66b84df35ebe7468c/pkginfo-1.11.2.tar.gz" + sha256 "c6bc916b8298d159e31f2c216e35ee5b86da7da18874f879798d0a1983537c86" + 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/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + test_config = testpath/"config.yml" + test_config.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/anime-downloader.rb b/Formula/a/anime-downloader.rb new file mode 100644 index 0000000000000..b07907343ba8e --- /dev/null +++ b/Formula/a/anime-downloader.rb @@ -0,0 +1,147 @@ +class AnimeDownloader < Formula + include Language::Python::Virtualenv + + desc "Download your favourite anime" + homepage "https://github.com/anime-dl/anime-downloader" + url "https://files.pythonhosted.org/packages/00/8b/2f354c0c2e56f1fe45e805698bd6a81c472473a48b814c44aaed2d41016d/anime-downloader-5.0.9.tar.gz" + sha256 "40eaded9508a30f35993b2fc0f436c357d9939d58625a10bd595bfc11816ead4" + license "Unlicense" + revision 3 + head "https://github.com/anime-dl/anime-downloader.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7258b2045bc048226c995e5a38991a34711fbab809c2f79295d842d31dc1932d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6e0bf613d53b1c8e6c403734bfdf9eaba94b4a17d3219dfcc863973b8ae0c506" + sha256 cellar: :any_skip_relocation, arm64_monterey: "99b135c2d0bda9cd5a6fa8832ae42dc83f4c4d361733d05b02d4c6a3af04ea6a" + sha256 cellar: :any_skip_relocation, sonoma: "14f9c7c46d6786a37fbb8747b067078d5459eb7dbae8eb49f38d6a1a811cee0c" + sha256 cellar: :any_skip_relocation, ventura: "dd5758a6e02820cdbe05b8e490da60c5f0704512189a39d874c255e1061d288f" + sha256 cellar: :any_skip_relocation, monterey: "5bbdf50e7863f1d4cdad66e3e54055698633ab37e4ba4ce1a6760886c2374c7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c126737d5947b2854408fceb070a68ad5178b12efdcfa2c637864084679b7255" + end + + # https://github.com/anime-dl/anime-downloader/commit/24de83d + disable! date: "2024-09-09", because: :unmaintained + + depends_on "aria2" + depends_on "certifi" + depends_on "node" + depends_on "python@3.11" + + 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/1a/cb/c4ffeb41e7137b23755a45e1bfec9cbb76ecf51874c6f1d113984ecaa32c/attrs-22.1.0.tar.gz" + sha256 "29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/e8/b0/cd2b968000577ec5ce6c741a54d846dfa402372369b8b6861720aa9ecea7/beautifulsoup4-4.11.1.tar.gz" + sha256 "ad9aa55b65ef2808eb405f46cf74df7fcb7044d5cbc26487f96eb2ef2e436693" + end + + resource "cattrs" do + url "https://files.pythonhosted.org/packages/fc/da/ff3239eb4241cbc6f8b69f53d4ca27a178d51f9e5a954f1a3588c8227dc5/cattrs-22.2.0.tar.gz" + sha256 "f0eed5642399423cf656e7b66ce92cdc5b963ecafd041d1b24d136fdde7acf6d" + end + + resource "cfscrape" do + url "https://files.pythonhosted.org/packages/a6/3d/12044a9a927559b2fe09d60b1cd6cd4ed1e062b7a28f15c91367b9ec78f1/cfscrape-2.1.1.tar.gz" + sha256 "7c5ef94554e0d6ee7de7cd0d42051526e716ce6c0357679ee0b82c49e189e2ef" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/a1/34/44964211e5410b051e4b8d2869c470ae8a68ae274953b1c7de6d98bbcf94/charset-normalizer-2.1.1.tar.gz" + sha256 "5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/59/87/84326af34517fca8c58418d148f2403df25303e02736832403587318e9e8/click-8.1.3.tar.gz" + sha256 "7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e" + end + + resource "coloredlogs" do + url "https://files.pythonhosted.org/packages/cc/c7/eed8f27100517e8c0e6b923d5f0845d0cb99763da6fdee00478f91db7325/coloredlogs-15.0.1.tar.gz" + sha256 "7c991aa71a4577af2f82600d8f8f3a89f936baeaf9b50a9c197da014e5bf16b0" + end + + resource "fuzzywuzzy" do + url "https://files.pythonhosted.org/packages/11/4b/0a002eea91be6048a2b5d53c5f1b4dafd57ba2e36eea961d05086d7c28ce/fuzzywuzzy-0.18.0.tar.gz" + sha256 "45016e92264780e58972dca1b3d939ac864b78437422beecebb3095f8efd00e8" + 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/8b/e1/43beb3d38dba6cb420cefa297822eac205a277ab43e5ba5d5c46faf96438/idna-3.4.tar.gz" + sha256 "814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/0d/66/5e4a14e91ffeac819e6888037771286bc1b86869f25d74d60bc4a61d2c1e/pycryptodome-3.16.0.tar.gz" + sha256 "0e45d2d852a66ecfb904f090c3f87dc0dfb89a499570abad8590f10d9cffb350" + end + + resource "pysmartdl" do + url "https://files.pythonhosted.org/packages/5a/4c/ed073b2373f115094a4a612431abe25b58e542bebd951557dcc881999ef9/pySmartDL-1.3.4.tar.gz" + sha256 "35275d1694f3474d33bdca93b27d3608265ffd42f5aeb28e56f38b906c0c35f4" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/a5/61/a867851fd5ab77277495a8709ddda0861b28163c4613b011bc00228cc724/requests-2.28.1.tar.gz" + sha256 "7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983" + end + + resource "requests-cache" do + url "https://files.pythonhosted.org/packages/66/02/40737a22e3c006830433d6dc9e9d6debb52d9e9e412bab16d82c50d7be14/requests_cache-0.9.7.tar.gz" + sha256 "b7c26ea98143bac7058fad6e773d56c3442eabc0da9ea7480af5edfc134ff515" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/f3/03/bac179d539362319b4779a00764e95f7542f4920084163db6b0fd4742d38/soupsieve-2.3.2.post1.tar.gz" + sha256 "fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "url-normalize" do + url "https://files.pythonhosted.org/packages/ec/ea/780a38c99fef750897158c0afb83b979def3b379aaac28b31538d24c4e8f/url-normalize-1.4.3.tar.gz" + sha256 "d23d3a070ac52a67b83a1c59a0e68f8608d1cd538783b401bc9de2c0fac999b2" + + # Switch build-system to poetry-core to avoid rust dependency on Linux. + # Remove in the next release of url-normalize + patch do + url "https://github.com/niksite/url-normalize/commit/b8557b10c977b191cc9d37e6337afe874a24ad08.patch?full_index=1" + sha256 "b24bf01ec8d6c163a6d3c97672beba761d35006922d4ad930dbeca79b6c52bfe" + end + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/c2/51/32da03cf19d17d46cce5c731967bf58de9bd71db3a379932f53b094deda4/urllib3-1.26.13.tar.gz" + sha256 "c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "Download or watch your favourite anime", shell_output("#{bin}/anime --help 2>&1") + + assert_equal "anime, version #{version}", shell_output("#{bin}/anime --version").chomp + end +end diff --git a/Formula/a/ansible-builder.rb b/Formula/a/ansible-builder.rb new file mode 100644 index 0000000000000..6c57341c22d5a --- /dev/null +++ b/Formula/a/ansible-builder.rb @@ -0,0 +1,102 @@ +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/3c/d5/c94e86098107209a82de9401ec31413fabd4236af0be9427c57a5bdbf855/ansible_builder-3.1.0.tar.gz" + sha256 "d2dc573e26a7bd5095e98aeb37ee9b00bc9f5005abea7147d74229c0f3426fcb" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "579c9ad083782a2e50605b47820f573e1f7ae3d74f78ae7ef6fdfdb752581e22" + sha256 cellar: :any, arm64_sonoma: "c92bc3474f4736687413164573d5c0ac47ddaf1824634ec1e7877caab3877dea" + sha256 cellar: :any, arm64_ventura: "c6db94ad4366fdd83e81ea63d924905b1e2e3c3cccdd6fb00d1eebe69fe70480" + sha256 cellar: :any, sonoma: "5f40359c7bf70ef62925b8632fa7272a48f9943ff1766ac853a05002a8c137ee" + sha256 cellar: :any, ventura: "ccff1f1d43e692707c0c447f0b7ec919e219d4e00a1717831bdbf0f79f7d92fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "e8d6873f39fbf5ed2a27bb80b9ed107909793a1f975f56346ef1f55338b92c5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "512ffc543e0e70b2aa4312be8d2704f36ec2cf436c025a3d56b3e5d830d89345" + end + + depends_on "rust" => :build + depends_on "libyaml" + depends_on "python@3.13" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" + sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" + end + + resource "bindep" do + url "https://files.pythonhosted.org/packages/8e/89/689d7f17c559dea2849d27365f53bd40f134056392db9e88a2590eb3dc29/bindep-2.11.0.tar.gz" + sha256 "acb2f259bce1fd1508873479609bbde5b9aae508378476a68d6b6a19002e7e2f" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + 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/b2/35/80cf8f6a4f34017a7fe28242dc45161a1baa55c41563c354d8147e8358b2/pbr-6.1.0.tar.gz" + sha256 "788183e382e3d1d7707db08978239965e8b9e4e5ed42669bf4758186734d5f24" + 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/99/5b/73ca1f8e72fff6fa52119dbd185f73a907b1989428917b24cff660129b6d/referencing-0.35.1.tar.gz" + sha256 "25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/55/64/b693f262791b818880d17268f3f8181ef799b0d187f6f731b1772e05a29a/rpds_py-0.20.0.tar.gz" + sha256 "d72a210824facfdaf8768cf2d7ca25a042c30320b3020de2fa04640920d4e121" + 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..1841e851bbcc3 --- /dev/null +++ b/Formula/a/ansible-cmdb.rb @@ -0,0 +1,73 @@ +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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "1273a6462f8b5745a2b1c297020a609de08c88703908deea3d3276a9af8e5a51" + sha256 cellar: :any, arm64_sonoma: "1fe8dcbaadd7a83a63b6d2e9e7c33baf6eebcc7e6653f9a57ba7837759858a0c" + sha256 cellar: :any, arm64_ventura: "6f14fe8987e3919f7352c24eb57c59129a453047c0e759a1e265289c52f74092" + sha256 cellar: :any, sonoma: "ebccc3b4a0ce69d9ac06c7dd8fcb922b0513031e6531010b4e80e01b3a94d942" + sha256 cellar: :any, ventura: "3e171c3d264163e93fe3ad96ce5113d49f560d8c596f1dd6460c8a950b626240" + sha256 cellar: :any_skip_relocation, arm64_linux: "166c728e271581dadf1c2764ab910b85b44ebffe41c3822b5748311184242beb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a142934b4b440e622a1e6958818e4588103c5a4511ac97fff5cb639a75323444" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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..8bdb6a9d2e642 --- /dev/null +++ b/Formula/a/ansible-creator.rb @@ -0,0 +1,50 @@ +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/26/1d/413ab25deb3559ba6644664c4f2d2a75992bf39ac90706a38a0a64e5ced9/ansible_creator-25.4.1.tar.gz" + sha256 "eaf957414e278c85dcd622544011b20aec61f689c94d574c2358e4115b1b92e7" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "eb6b030e1d839a64a473552f59ec9074c4261477c3e59f38af462b3db7515a4e" + sha256 cellar: :any, arm64_sonoma: "9577e1f0a89cd77e1105c260337f71d84945d43d0ef939a126fd4efcac492526" + sha256 cellar: :any, arm64_ventura: "14093f0949a3eb22ace5e4b79ef23655a3bcac0daa251d7d0262a3e79bb8bf79" + sha256 cellar: :any, sonoma: "f92bc2b07383ed8c947abad4fffbd36187ee8738f29d0c0acb5ee189bc16c052" + sha256 cellar: :any, ventura: "7251a8e425b5418f5131ad3dad76c7741a7a275729783b47dc96c03148aa3a09" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2ca0538203293e85c13aa4ebbb4b5573227520ab649534027035ff672bc9a22" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66ede365818875d4ed853fa7d9177c156101c4828d70028ea280fd6705d9141c" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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 "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 + 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..4ea7aa024d1d5 --- /dev/null +++ b/Formula/a/ansible-language-server.rb @@ -0,0 +1,48 @@ +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" + + bottle do + 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..a9fb6ed59fc32 --- /dev/null +++ b/Formula/a/ansible-lint.rb @@ -0,0 +1,179 @@ +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/24/50/3d0bb7e77aed2a66fce4b87aec249adb11070ef2025db1215b1c0fb14b51/ansible_lint-25.4.0.tar.gz" + sha256 "f2f2b31ad199925b2343f660552fb9468970f16c2c5d57da9feae70ec4eeca7d" + license all_of: ["MIT", "GPL-3.0-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "e78f7047afc69e4234e1b82f06ffcdb0ac82e4375e3177b9f4a7f04b6168acb5" + sha256 cellar: :any, arm64_sonoma: "0f757a0380a8fadf06a0634e952db675c7d8ebc6d2642761bced4f402482ad6a" + sha256 cellar: :any, arm64_ventura: "4c6e73ebeaacd110132bbf9f3a426565e27238e945795e64ac132a4230350833" + sha256 cellar: :any, sonoma: "7c848f1ffac3b268c96684f9a842dfd443e16d9154b2e08e9cd748ffd30470b0" + sha256 cellar: :any, ventura: "3c9d66d561688d23013b0978cfbbddddcf897b9c2c9329c0102358075f739584" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c3ece44555a9f52e1d7c257d70813cc437d17d8e0b9fe6d54480bf9918b198b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "734ddca2b55e1cbf87d66420aaa789e0bca3a18c084e921e7e82aaacf80ea6cf" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build # for rpds-py + depends_on "ansible" => :test + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + resource "ansible-compat" do + url "https://files.pythonhosted.org/packages/66/79/198116bddfa79a05b02f64d617865e5cf1b982f7f25be993ec6efd95d174/ansible_compat-25.1.5.tar.gz" + sha256 "1dd35c21ba0301c93b19fe2bb3aa2caa2a630a05373a103adcc2621465f8da6a" + end + + resource "ansible-core" do + url "https://files.pythonhosted.org/packages/32/54/0d859184549efa339b2e370930a7741b42030cc357e107863cbadc3e72d8/ansible_core-2.18.5.tar.gz" + sha256 "319304d161770a8a891c07dec8a22c528548a948a7097eaf1a79939395105535" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "black" do + url "https://files.pythonhosted.org/packages/94/49/26a7b0f3f35da4b5a65f081943b7bcd22d7002f5f0fb8098ec1ff21cb6ef/black-25.1.0.tar.gz" + sha256 "33496d5cd1222ad73391352b4ae8da15253c5de89b93a80b3e2c8d9a19ec2666" + end + + resource "bracex" do + url "https://files.pythonhosted.org/packages/d6/6c/57418c4404cd22fe6275b8301ca2b46a8cdaa8157938017a9ae0b3edf363/bracex-2.5.post1.tar.gz" + sha256 "12c50952415bfa773d2d9ccb8e79651b8cdb1f31a42f6091b804f6ba2b4a66b6" + 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/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + 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 "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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 "resolvelib" do + url "https://files.pythonhosted.org/packages/ce/10/f699366ce577423cbc3df3280063099054c23df70856465080798c6ebad6/resolvelib-1.0.1.tar.gz" + sha256 "04ce76cbd63fded2078ce224785da6ecd42b9564b1390793f64ddecbe997b309" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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 "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/41/ab/b3a52228538ccb983653c446c1656eddf1d5303b9cb8b9aef6a91299f862/wcmatch-10.0.tar.gz" + sha256 "e72f0de09bba6a04e0de70937b0cf06e55f36f37b3deb422dfaf854b867b840a" + end + + resource "yamllint" do + url "https://files.pythonhosted.org/packages/4e/82/b2b6fa4c3e24df501d14eff23100b37e6d9f80cbed80644de4d1260ff402/yamllint-1.37.0.tar.gz" + sha256 "ead81921d4d87216b2528b7a055664708f9fb8267beb0c427cb706ac6ab93580" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + 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..e9a1a3d2a2cfa --- /dev/null +++ b/Formula/a/ansible.rb @@ -0,0 +1,596 @@ +class Ansible < Formula + include Language::Python::Virtualenv + + desc "Automate deployment, configuration, and upgrading" + homepage "https://www.ansible.com/" + url "https://files.pythonhosted.org/packages/ce/67/600d142f895a5387679c676170431bd84a9a640b794d05b3689f847afad4/ansible-11.5.0.tar.gz" + sha256 "18a3fc73120a49ade9a9a67eb8f9d4f5009d2106c34ffeb9663ad928b76ed59b" + license "GPL-3.0-or-later" + head "https://github.com/ansible/ansible.git", branch: "devel" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6283089e27056275119d4e4678c2cfe886123e1bfa6e05865b24b643666adb6b" + sha256 cellar: :any, arm64_sonoma: "f63129fa8de6d912dbaf6041222f4979357a778c3e1b25d0b28c1e3ae79e9238" + sha256 cellar: :any, arm64_ventura: "2222f6ebe8943771243ecfa8327dba35c6d341e6822f1211312615a046078383" + sha256 cellar: :any, sonoma: "1f267324678c2c36f50158ce25b49e22742149f7c0dac489909b1b17a9ac611e" + sha256 cellar: :any, ventura: "e906679b64919b7bc4bc3a6e709b930fceebdfa8a06bc6f4ad9f636e4394dbe2" + sha256 cellar: :any_skip_relocation, arm64_linux: "be5814baaa8e634ae546f0d512da6bee60f7e9f242bfc4720eccac2742110763" + sha256 cellar: :any_skip_relocation, x86_64_linux: "224469653ff191dba105babe5a775839735030d7bb7ec9ec6e5f038acb22fdeb" + 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" + + uses_from_macos "krb5" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + # 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/32/54/0d859184549efa339b2e370930a7741b42030cc357e107863cbadc3e72d8/ansible_core-2.18.5.tar.gz" + sha256 "319304d161770a8a891c07dec8a22c528548a948a7097eaf1a79939395105535" + end + + resource "ansible-pylibssh" do + url "https://files.pythonhosted.org/packages/93/50/38298568fbd517dcb7b08c06f4fbfc0481ab9eae1e4b01920495dacf672a/ansible-pylibssh-1.2.2.tar.gz" + sha256 "753e570dcdceb6ab8e362e91cc0d5993beebc93d287b88178db55509f6423ab5" + 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/0d/b5/d1c2e8c484cea43891629bbab6ca90ce9ca932586750bc0e786c8f096ccf/boto3-1.37.38.tar.gz" + sha256 "88c02910933ab7777597d1ca7c62375f52822e0aa1a8e0c51b2598a547af42b2" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/34/79/4e072e614339727f79afef704e5993b5b4d2667c1671c757cc4deb954744/botocore-1.37.38.tar.gz" + sha256 "c3ea386177171f2259b284db6afc971c959ec103fa2115911c4368bea7cbbc5d" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "cliff" do + url "https://files.pythonhosted.org/packages/62/74/c7fb720990b17da636064a7993506c230f7a913b752f0116ad2a2e39d621/cliff-4.9.1.tar.gz" + sha256 "5b392198293c0b9225d459be8ba710cf8248f1ee33006bdeb3d92fb0012592b4" + end + + resource "cmd2" do + url "https://files.pythonhosted.org/packages/f7/2a/018fe937e25e1db0cafeb358c117644a58cdba24f5bbee69c003faf0b454/cmd2-2.5.11.tar.gz" + sha256 "30a0d385021fbe4a4116672845e5695bbe56eb682f9096066776394f954a7429" + 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/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/cb/b7/2fa37f52b4f38bc8eb6d4923163dd822ca6f9e2f817378478a5de73b239e/dogpile_cache-1.3.4.tar.gz" + sha256 "4f0295575f5fdd3f7e13c84ba8e36656971d1869a2081b4737ec99ede378a8c0" + 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/cb/8e/8f45c9a32f73e786e954b8f9761c61422955d23c45d1e8c347f9b4b59e8e/google_auth-2.39.0.tar.gz" + sha256 "73222d43cdc35a3aeacbfdcaf73142a97839f10de930550d89ebfe1d0a00cde7" + 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 "junos-eznc" do + url "https://files.pythonhosted.org/packages/ce/85/963a0e6c344775b3e993d50f4d6d65b2e9796ca1a4e53c1eba5901cad0a5/junos-eznc-2.7.3.tar.gz" + sha256 "15a9aff9da4bf25dc3c7e54fdf98f3eff5dc4fe8edb79075f54039bcf7a71bd1" + 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/59/f8/39aa1ac0c7fb9e7c8849f17e663eac208262689b7b9db02861b5e1093500/keystoneauth1-5.10.0.tar.gz" + sha256 "34b870dbbcf806cdb5aec98483b62820a6568d364eca7b1174ca6a8b5a9c77ed" + end + + resource "kubernetes" do + url "https://files.pythonhosted.org/packages/b7/e8/0598f0e8b4af37cd9b10d8b87386cf3173cb8045d834ab5f6ec347a758b3/kubernetes-32.0.1.tar.gz" + sha256 "42f43d49abd437ada79a79a16bd48a604d3471a117a8347e87db693f2ba0ba28" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/80/61/d3dc048cd6c7be6fe45b80cedcbdd4326ba4d550375f266d9f4246d0f4bc/lxml-5.3.2.tar.gz" + sha256 "773947d0ed809ddad824b7b14467e1a481b8976e87278ac4a730c2f7c7fcddc1" + 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 "ntc-templates" do + url "https://files.pythonhosted.org/packages/66/0f/b7167c3923373a409893721a68e6383dc6503d667611efdcfd46c957849c/ntc_templates-7.8.0.tar.gz" + sha256 "693536d228de466e0ce895226586f090eb91fcd4e209aeb12527391b4340fc62" + 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/b8/72/0b7fe12a18f871dc57119651dba1a9c9976b8adcdfbad95b2e7224b06849/openstacksdk-4.5.0.tar.gz" + sha256 "ab7a1240207a6969ba09ceee8f16653805730677b4497a806cd956733651fe68" + 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/47/84/ecd798d1aee59b5501de21e8e69f98f5ba275464053be62309a4d4a4b85b/osc_lib-4.0.0.tar.gz" + sha256 "1dd15dd64c2b62101487a0f774821839df6b2baa5abc1a572c8e6c53314ee3e7" + end + + resource "oslo-config" do + url "https://files.pythonhosted.org/packages/3c/ac/aa17577d353a8c90b758a0edb1a94de7fffa24283c7f82cd2c485cb0a740/oslo_config-9.7.1.tar.gz" + sha256 "5558b34bcc2b52f2208e80fcad955a4f7b2c41bb245b6451d43a621ad1263bbd" + end + + resource "oslo-context" do + url "https://files.pythonhosted.org/packages/a3/65/17722b5f616aa129cee9b5f4a34952ffac7845f7a2cb842472b27c990caa/oslo_context-5.7.1.tar.gz" + sha256 "0c511fe153732aff0c1b3b44abd2f51008a83c707bb929bee01e1255ac964889" + end + + resource "oslo-i18n" do + url "https://files.pythonhosted.org/packages/cc/94/8ab2746a3251e805be8f7fd5243df44fe6289269ce9f7105bdbe418be90d/oslo_i18n-6.5.1.tar.gz" + sha256 "ea856a70c5af7c76efb6590994231289deabe23be8477159d37901cef33b109d" + end + + resource "oslo-log" do + url "https://files.pythonhosted.org/packages/72/e9/ed065144ab6dec839fe7bafebfa803b775eb2149db33878ca5ff613f6b11/oslo_log-7.1.0.tar.gz" + sha256 "9a2b3c18be6f59152dfe25f34deabe71343db7fb8248a633967fb6a04707629d" + end + + resource "oslo-serialization" do + url "https://files.pythonhosted.org/packages/a7/44/e7f2aaef66d7a02c74ce425f2bad8c4aaf11f39bb02fea98eeb7452a0910/oslo_serialization-5.7.0.tar.gz" + sha256 "bdc4d3dd97b80639b3505e46d9aa439fc95028814177f30b91743e81366c3be7" + end + + resource "oslo-utils" do + url "https://files.pythonhosted.org/packages/f1/98/0c74172604f4ea9db117933fa9794e82a66438481a1e5a538584479c92f8/oslo_utils-8.2.0.tar.gz" + sha256 "dcf78d14b968fb7b14263c77278b2b930a7861d3caa887d3a58b2890f6659835" + 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/7d/15/ad6ce226e8138315f2451c2aeea985bf35ee910afb477bae7477dc3a8f3b/paramiko-3.5.1.tar.gz" + sha256 "b2c665bc45b2b215bd7d7f039901b14b067da00f3a11e6640995fd58f2664822" + 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/01/d2/510cc0d218e753ba62a1bc1434651db3cd797a9716a0a66cc714cb4f0935/pbr-6.1.1.tar.gz" + sha256 "93ea72ce6989eb2eed99d0f75721474f69ad88128afdef5ac377eb797c4bf76b" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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/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 "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "pynetbox" do + url "https://files.pythonhosted.org/packages/1a/f9/e6c524e5ddc4c2788ab2f5ee1ab2d9afad49cad9c7cd3a372cf5b8433ed3/pynetbox-7.4.1.tar.gz" + sha256 "3f82b5964ca77a608aef6cc2fc48a3961f7667fbbdbb60646655373e3dae00c3" + 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 "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/6b/f8/53f1fc851dab776a183ffc9f29ebde244fbb467f5237f3ea809519fc4b2e/pyspnego-0.11.2.tar.gz" + sha256 "994388d308fb06e4498365ce78d222bf4f3570b6df4ec95738431f61510c971b" + 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/91/d9/e6b430abdd77caccfc0f47005f7ff2125d143b16bd6f9aaa46ceaac75b90/python_keystoneclient-5.6.0.tar.gz" + sha256 "721de2aec7710076389c674ee27b6712e97d86c7e0ff487b0b4409c8fcee10e7" + end + + resource "python-neutronclient" do + url "https://files.pythonhosted.org/packages/62/f5/43ac046c8bc32068faccd4d0b79e44c08ec96b7104a0ac70974c2a17ac76/python-neutronclient-11.4.0.tar.gz" + sha256 "8741219362e4bf9c2e43f2e6cae4d4991ed8f9df9063f43408a0b658b03d62e2" + 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/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/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz" + sha256 "e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/c4/2b/5c9562795c2eb2b5f63536961754760c25bf0f34af93d36aa28dea2fb303/s3transfer-0.11.5.tar.gz" + sha256 "8c8aad92784779ab8688a61aefff3e28e9ebdce43142808eaa3f0b0f402f68b7" + 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/7d/19/fecb7e2825616270f34512b3394cdcf6f45a79b5b6d94fdbd86a509e67b5/setuptools-79.0.0.tar.gz" + sha256 "9828422e7541213b0aacb6e10bbf9dd8febeaa45a48570e09b6d100e063fc9f9" + 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/28/3f/13cacea96900bbd31bb05c6b74135f85d15564fc583802be56976c940470/stevedore-5.4.1.tar.gz" + sha256 "3135b5ae50fe12816ef291baff420acb727fcd356106e3e9cbfa9e5985cd6f4b" + 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 "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + 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 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..a1de2a5c3b52b --- /dev/null +++ b/Formula/a/ansible@10.rb @@ -0,0 +1,610 @@ +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 2 + + 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_sequoia: "eb35c6587563894c9c47c992eba095fd00c6ce48ff8a55cf21cdfcc24ce36d53" + sha256 cellar: :any, arm64_sonoma: "6fc1fd2c5a4873b4c1d235917d476f9fbb1ead387710486389bdf39a4325cbf6" + sha256 cellar: :any, arm64_ventura: "7dcae55d5cb95c8a65fa6613021032ea72ac9eb4e046c781362d2df62fbf072a" + sha256 cellar: :any, sonoma: "666e98a3739b8fdcfb528a5dc00fdbd0bfeaeac66f98f8bfb3b1bfb45f8050fe" + sha256 cellar: :any, ventura: "a61275ac9c5607c0d2beed46c00eab2c5f3ddf25336d5d9a055e992a77d083a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc37d9aebc2cbdd484c41913f475226c22643a2c31872795f50174b1b39d9ff4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b032d1d41e0e0f5d7e4d2adf57d02b0adc09cf0ea032932fd548620a806e1ac" + 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 + + # `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.12" # ansible-core 2.17.6 only supports py3.12 + + uses_from_macos "krb5" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + # 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/14/f2/0453c53a66145b10edf3aa64ee9fb18896a9ee93f7f741ef8ab6ddfa42b0/ansible_core-2.17.9.tar.gz" + sha256 "c24cdc2bab19b910bbdb4a1074af5745e16c78c618f15829e7ddcf699f69a510" + end + + resource "ansible-pylibssh" do + url "https://files.pythonhosted.org/packages/93/50/38298568fbd517dcb7b08c06f4fbfc0481ab9eae1e4b01920495dacf672a/ansible-pylibssh-1.2.2.tar.gz" + sha256 "753e570dcdceb6ab8e362e91cc0d5993beebc93d287b88178db55509f6423ab5" + 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/6b/e6/40f8c1fb52c02adad1c104c4c4ac0488bf8f2b1397f24db07779322e420b/boto3-1.37.7.tar.gz" + sha256 "ac2e022edcd6a94a2adbb21f0ad373a16557ec14a8910366bee0bbc7138fc72a" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/53/4b/096b2fac3ba92ace94f69f238eea9948af568b487c3898e9a8881bfe506b/botocore-1.37.7.tar.gz" + sha256 "2faeac11766db912bc444669b04359080b7b83b2f57a3906c77c8105b70ce1e8" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "cliff" do + url "https://files.pythonhosted.org/packages/62/74/c7fb720990b17da636064a7993506c230f7a913b752f0116ad2a2e39d621/cliff-4.9.1.tar.gz" + sha256 "5b392198293c0b9225d459be8ba710cf8248f1ee33006bdeb3d92fb0012592b4" + end + + resource "cmd2" do + url "https://files.pythonhosted.org/packages/f7/2a/018fe937e25e1db0cafeb358c117644a58cdba24f5bbee69c003faf0b454/cmd2-2.5.11.tar.gz" + sha256 "30a0d385021fbe4a4116672845e5695bbe56eb682f9096066776394f954a7429" + 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/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/cb/b7/2fa37f52b4f38bc8eb6d4923163dd822ca6f9e2f817378478a5de73b239e/dogpile_cache-1.3.4.tar.gz" + sha256 "4f0295575f5fdd3f7e13c84ba8e36656971d1869a2081b4737ec99ede378a8c0" + 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/c6/eb/d504ba1daf190af6b204a9d4714d457462b486043744901a6eeea711f913/google_auth-2.38.0.tar.gz" + sha256 "8285113607d3b80a3f1543b75962447ba8a09fe85783432a784fdeef6ac094c4" + 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 "junos-eznc" do + url "https://files.pythonhosted.org/packages/ce/85/963a0e6c344775b3e993d50f4d6d65b2e9796ca1a4e53c1eba5901cad0a5/junos-eznc-2.7.3.tar.gz" + sha256 "15a9aff9da4bf25dc3c7e54fdf98f3eff5dc4fe8edb79075f54039bcf7a71bd1" + 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/59/f8/39aa1ac0c7fb9e7c8849f17e663eac208262689b7b9db02861b5e1093500/keystoneauth1-5.10.0.tar.gz" + sha256 "34b870dbbcf806cdb5aec98483b62820a6568d364eca7b1174ca6a8b5a9c77ed" + end + + resource "kubernetes" do + url "https://files.pythonhosted.org/packages/b7/e8/0598f0e8b4af37cd9b10d8b87386cf3173cb8045d834ab5f6ec347a758b3/kubernetes-32.0.1.tar.gz" + sha256 "42f43d49abd437ada79a79a16bd48a604d3471a117a8347e87db693f2ba0ba28" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/ef/f6/c15ca8e5646e937c148e147244817672cf920b56ac0bf2cc1512ae674be8/lxml-5.3.1.tar.gz" + sha256 "106b7b5d2977b339f1e97efe2778e2ab20e99994cbb0ec5e55771ed0795920c8" + 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 "ntc-templates" do + url "https://files.pythonhosted.org/packages/33/59/0d359a88a9d037bbf4383a123a692c22a10e281f2dd4a6ab7224b8f7908c/ntc_templates-7.7.0.tar.gz" + sha256 "c7b9c2f8306ff6ff1133b5a1614f9627b520bc27c3c514c4e95bf27e221f2a2d" + 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/c2/9e/dc50e3821ba3dda7e94071a25f8daa34575d92752e94e0d3e8583064856e/openstacksdk-4.4.0.tar.gz" + sha256 "157437563d64f3f6feec1796fbd8552d56277332461778c4dbe76d1828fd31e0" + 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/dc/db/0a907d200719f755f00579f116526abea404a8a7961d8cd4019f1e1235ed/osc-lib-3.2.0.tar.gz" + sha256 "5f706be145daf0e58068e3763ec56bde2f43ed229a738628e4c0fb1defb4ed9e" + end + + resource "oslo-config" do + url "https://files.pythonhosted.org/packages/3c/ac/aa17577d353a8c90b758a0edb1a94de7fffa24283c7f82cd2c485cb0a740/oslo_config-9.7.1.tar.gz" + sha256 "5558b34bcc2b52f2208e80fcad955a4f7b2c41bb245b6451d43a621ad1263bbd" + end + + resource "oslo-context" do + url "https://files.pythonhosted.org/packages/a3/65/17722b5f616aa129cee9b5f4a34952ffac7845f7a2cb842472b27c990caa/oslo_context-5.7.1.tar.gz" + sha256 "0c511fe153732aff0c1b3b44abd2f51008a83c707bb929bee01e1255ac964889" + end + + resource "oslo-i18n" do + url "https://files.pythonhosted.org/packages/cc/94/8ab2746a3251e805be8f7fd5243df44fe6289269ce9f7105bdbe418be90d/oslo_i18n-6.5.1.tar.gz" + sha256 "ea856a70c5af7c76efb6590994231289deabe23be8477159d37901cef33b109d" + end + + resource "oslo-log" do + url "https://files.pythonhosted.org/packages/72/e9/ed065144ab6dec839fe7bafebfa803b775eb2149db33878ca5ff613f6b11/oslo_log-7.1.0.tar.gz" + sha256 "9a2b3c18be6f59152dfe25f34deabe71343db7fb8248a633967fb6a04707629d" + end + + resource "oslo-serialization" do + url "https://files.pythonhosted.org/packages/a7/44/e7f2aaef66d7a02c74ce425f2bad8c4aaf11f39bb02fea98eeb7452a0910/oslo_serialization-5.7.0.tar.gz" + sha256 "bdc4d3dd97b80639b3505e46d9aa439fc95028814177f30b91743e81366c3be7" + end + + resource "oslo-utils" do + url "https://files.pythonhosted.org/packages/f1/98/0c74172604f4ea9db117933fa9794e82a66438481a1e5a538584479c92f8/oslo_utils-8.2.0.tar.gz" + sha256 "dcf78d14b968fb7b14263c77278b2b930a7861d3caa887d3a58b2890f6659835" + 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/7d/15/ad6ce226e8138315f2451c2aeea985bf35ee910afb477bae7477dc3a8f3b/paramiko-3.5.1.tar.gz" + sha256 "b2c665bc45b2b215bd7d7f039901b14b067da00f3a11e6640995fd58f2664822" + 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/01/d2/510cc0d218e753ba62a1bc1434651db3cd797a9716a0a66cc714cb4f0935/pbr-6.1.1.tar.gz" + sha256 "93ea72ce6989eb2eed99d0f75721474f69ad88128afdef5ac377eb797c4bf76b" + 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/38/95/78080e58efbdde46cda8d4498737bf9687839ed4a9744b068cc730a073ed/prettytable-3.15.1.tar.gz" + sha256 "f0edb38060cb9161b2417939bfd5cd9877da73388fb19d1e8bf7987e8558896e" + 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/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/1d/67/6afbf0d507f73c32d21084a79946bfcfca5fbc62a72057e9c23797a737c9/pyasn1_modules-0.4.1.tar.gz" + sha256 "c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "pynetbox" do + url "https://files.pythonhosted.org/packages/1a/f9/e6c524e5ddc4c2788ab2f5ee1ab2d9afad49cad9c7cd3a372cf5b8433ed3/pynetbox-7.4.1.tar.gz" + sha256 "3f82b5964ca77a608aef6cc2fc48a3961f7667fbbdbb60646655373e3dae00c3" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/8b/1a/3544f4f299a47911c2ab3710f534e52fea62a633c96806995da5d25be4b2/pyparsing-3.2.1.tar.gz" + sha256 "61980854fd66de3a90028d679a954d5f2623e83144b5afe5ee86f43d762e5f0a" + 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/6b/f8/53f1fc851dab776a183ffc9f29ebde244fbb467f5237f3ea809519fc4b2e/pyspnego-0.11.2.tar.gz" + sha256 "994388d308fb06e4498365ce78d222bf4f3570b6df4ec95738431f61510c971b" + 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/91/d9/e6b430abdd77caccfc0f47005f7ff2125d143b16bd6f9aaa46ceaac75b90/python_keystoneclient-5.6.0.tar.gz" + sha256 "721de2aec7710076389c674ee27b6712e97d86c7e0ff487b0b4409c8fcee10e7" + end + + resource "python-neutronclient" do + url "https://files.pythonhosted.org/packages/62/f5/43ac046c8bc32068faccd4d0b79e44c08ec96b7104a0ac70974c2a17ac76/python-neutronclient-11.4.0.tar.gz" + sha256 "8741219362e4bf9c2e43f2e6cae4d4991ed8f9df9063f43408a0b658b03d62e2" + 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/5f/57/df1c9157c8d5a05117e455d66fd7cf6dbc46974f832b1058ed4856785d8a/pytz-2025.1.tar.gz" + sha256 "c2db42be2a2518b28e65f9207c4d05e6ff547d1efa4086469ef855e4ab70178e" + 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/0f/ec/aa1a215e5c126fe5decbee2e107468f51d9ce190b9763cb649f76bb45938/s3transfer-0.11.4.tar.gz" + sha256 "559f161658e1cf0a911f45940552c696735f5c74e64362e515f333ebed87d679" + 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/d1/53/43d99d7687e8cdef5ab5f9ec5eaf2c0423c2b35133a2b7e7bc276fc32b21/setuptools-75.8.2.tar.gz" + sha256 "4880473a969e5f23f2a2be3646b2dfd84af9028716d398e46192f84bc36900d2" + 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/28/3f/13cacea96900bbd31bb05c6b74135f85d15564fc583802be56976c940470/stevedore-5.4.1.tar.gz" + sha256 "3135b5ae50fe12816ef291baff420acb727fcd356106e3e9cbfa9e5985cd6f4b" + 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 "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/43/0f/fa4723f22942480be4ca9527bbde8d43f6c3f2fe8412f00e7f5f6746bc8b/tzdata-2025.1.tar.gz" + sha256 "24894909e88cdb28bd1636c6887801df64cb485bd593f2fd83ef29075a81d694" + 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/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/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + 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 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..7cc3ee7c72b8b --- /dev/null +++ b/Formula/a/ansible@8.rb @@ -0,0 +1,586 @@ +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" + + 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..33ffb5c9040db --- /dev/null +++ b/Formula/a/ansible@9.rb @@ -0,0 +1,605 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c012d30879a0e1dcf6a004fbd4c5e8d8ef2a084c84b34a71ee2ab3056551f88c" + sha256 cellar: :any, arm64_sonoma: "0564af7e55f39d80d8baa623a49ae3a377a935bb1e390e51a86d97e0b1ad488e" + sha256 cellar: :any, arm64_ventura: "d8eadf2aeaf60993f490210e225f19c6a0a7490434d47a15978c9fb7bb1022a3" + sha256 cellar: :any, sonoma: "285d0bf9d99011996da135b3b1aa8e48a172552854d67a2d8ba3289d26ee5d11" + sha256 cellar: :any, ventura: "57a8fdb4346d739444f5799480c9ce0d7b7dd364d274968dd9103d3f051446ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "e45d22caa74bc699b3bb776e2e77d4f651b3c0a02c7182c777571b8336271342" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00f6850d17d9fcfd5ba2ce658fcc34eb2e353f72a22fc71837aaaf8f13739b7f" + 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 "cryptography" + depends_on "libsodium" # for pynacl + depends_on "libssh" + depends_on "libyaml" + 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" + + # 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/93/50/38298568fbd517dcb7b08c06f4fbfc0481ab9eae1e4b01920495dacf672a/ansible-pylibssh-1.2.2.tar.gz" + sha256 "753e570dcdceb6ab8e362e91cc0d5993beebc93d287b88178db55509f6423ab5" + 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/56/8c/dd696962612e4cd83c40a9e6b3db77bfe65a830f4b9af44098708584686c/bcrypt-4.2.1.tar.gz" + sha256 "6765386e3ab87f569b276988742039baab087b2cdb01e809d74e74503c2faafe" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/d1/b3/146636e2e20421b94e85ee1deffa59448d713664df794f83686ae162ea0b/boto3-1.35.75.tar.gz" + sha256 "a30b7ef273fbcb41390d6495f3b3e95c6fae496366447238095b00825cb5a52a" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/1d/76/07c65844c2c87a0ffc279e40d0eb668732fd54081adb3f7887933258ee25/botocore-1.35.75.tar.gz" + sha256 "7c7d272d9794d07f0c40caa110a266e910103559340b5a5d252857928e920a4a" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/c3/38/a0f315319737ecf45b4319a8cd1f3a908e29d9277b46942263292115eee7/cachetools-5.5.0.tar.gz" + sha256 "2cc24fb4cbe39633fb7badd9db9ca6295d766d9c2995f245725a46715d050f2a" + 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/62/44/e9073c882c9765074a1043f5004f31fd97c5c6571836e59987fa28781805/cliff-4.8.0.tar.gz" + sha256 "23eff502e603cf0aa841eaea6662a42cd3064169162b3e596b20226400e34dfd" + end + + resource "cmd2" do + url "https://files.pythonhosted.org/packages/2a/8a/42bfec2be9da0fe22519404329da302c1ca4e0d2a01a5cdf8b8785a91926/cmd2-2.5.7.tar.gz" + sha256 "0219e2bb75075fa16deffb88edf86efdd2a87439d1fa7b94fdea4b929a3dc914" + 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/6a/71/4c5387d8a3e46e3526a8190ae396659484377a73b33030614dd3b28e7ded/google_auth-2.36.0.tar.gz" + sha256 "545e9618f2df0bcbb7dcbc45a546485b1212624716975a1ea5ae8149ce769ab1" + 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/81/90/4057a98c59f5634c7404c09b849e030c528ed65924eea4cd4e01e43634ff/keystoneauth1-5.9.1.tar.gz" + sha256 "fb0c66d842d5b964752264fff20b3b4ab73610d66d9b8d20d0dcf796ba09dc43" + 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/8d/48/34dfcabb7cd60f006166f7a7162bc12399391f7d4863071d02880faad2af/ntc_templates-7.4.0.tar.gz" + sha256 "898948948983237a0cc739b55d19890148badc0f6521f85245bca9e7d953f4e2" + 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/dc/db/0a907d200719f755f00579f116526abea404a8a7961d8cd4019f1e1235ed/osc-lib-3.2.0.tar.gz" + sha256 "5f706be145daf0e58068e3763ec56bde2f43ed229a738628e4c0fb1defb4ed9e" + end + + resource "oslo-config" do + url "https://files.pythonhosted.org/packages/2e/e9/2cac91d42e8fb86b17ef8f350b523f70282fbc9f3a0785884e455b132e50/oslo.config-9.7.0.tar.gz" + sha256 "b371ebf3f9a63e92b81d5c72b84d2f96f40553532699c68e1c5cd8ca9eca088b" + end + + resource "oslo-context" do + url "https://files.pythonhosted.org/packages/99/f3/1a7fa94ca9d7807f193c83ea403f8526e19301f0cecbf20bd6f35c29fcfb/oslo.context-5.7.0.tar.gz" + sha256 "398c460b9cf7cb397ede7962223e4b88078fb2fbc53665a47a34e1b28890f4ce" + end + + resource "oslo-i18n" do + url "https://files.pythonhosted.org/packages/ca/a5/9ecdc0b2620efae576a7688283d34a2c273989e6e850ee9be8116296b7d5/oslo.i18n-6.5.0.tar.gz" + sha256 "9393bcae92eadc5f771132d1c6ab239b19896ff6d885e3afc21a9faa4de924d3" + end + + resource "oslo-log" do + url "https://files.pythonhosted.org/packages/2b/62/e06b206d07a5761fbe40b1538c0163ae58b29955606b682ed3611e64ab98/oslo.log-6.2.0.tar.gz" + sha256 "2b151d9c3f2b2ecc12c06d0fb7dbf2e9047afdaec3644827fa1e10b354369563" + end + + resource "oslo-serialization" do + url "https://files.pythonhosted.org/packages/1e/4e/54d2fc3c2a9620a9a7572bb89ca7bc2b02a1e0e511004f27eced4c613759/oslo.serialization-5.6.0.tar.gz" + sha256 "4c7d4e12da853cc4f04b9123041134e886e8c9ff57ab57c1962d3ad4a87b7f7c" + end + + resource "oslo-utils" do + url "https://files.pythonhosted.org/packages/11/c0/c78c13a54bd920baf2e756e9b8f92be320b311e83c3998b69f7b84da29f9/oslo.utils-8.0.0.tar.gz" + sha256 "906fcf1c86f671f224c1925b2a8d375a0539143fb6158b13e202a79dd8e6c694" + 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/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 "psutil" do + url "https://files.pythonhosted.org/packages/26/10/2a30b13c61e7cf937f4adf90710776b7918ed0a9c434e2c38224732af310/psutil-6.1.0.tar.gz" + sha256 "353815f59a7f64cdaca1c0307ee13558a0512f6db064e92fe833784f08539c7a" + 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 "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "pynetbox" do + url "https://files.pythonhosted.org/packages/1a/f9/e6c524e5ddc4c2788ab2f5ee1ab2d9afad49cad9c7cd3a372cf5b8433ed3/pynetbox-7.4.1.tar.gz" + sha256 "3f82b5964ca77a608aef6cc2fc48a3961f7667fbbdbb60646655373e3dae00c3" + 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/6b/f8/53f1fc851dab776a183ffc9f29ebde244fbb467f5237f3ea809519fc4b2e/pyspnego-0.11.2.tar.gz" + sha256 "994388d308fb06e4498365ce78d222bf4f3570b6df4ec95738431f61510c971b" + 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 "pytz" do + url "https://files.pythonhosted.org/packages/3a/31/3c70bf7603cc2dca0f19bdc53b4537a797747a58875b552c8c413d963a3f/pytz-2024.2.tar.gz" + sha256 "2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a" + 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/c0/0a/1cdbabf9edd0ea7747efdf6c9ab4e7061b085aa7f9bfc36bb1601563b069/s3transfer-0.10.4.tar.gz" + sha256 "29edc09801743c21eb5ecbc617a152df41d3c287f67b615f73e5f750583666a7" + 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/43/54/292f26c208734e9a7f067aea4a7e282c080750c4546559b58e2e45413ca0/setuptools-75.6.0.tar.gz" + sha256 "8199222558df7c86216af4f84c30e9b34a61d8ba19366cc914424cdbd28252f6" + 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/4a/e9/4eedccff8332cc40cc60ddd3b28d4c3e255ee7e9c65679fa4533ab98f598/stevedore-5.4.0.tar.gz" + sha256 "79e92235ecb828fe952b6b8b0c6c87863248631922c8e8e0fa5b17b232c4514d" + 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 "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + 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/24/a1/fc03dca9b0432725c2e8cdbf91a349d2194cf03d8523c124faebe581de09/wrapt-1.17.0.tar.gz" + sha256 "16187aa2317c731170a88ef35e8937ae0f533c402872c1ee5e6d079fcf320801" + 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 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..fa6f5db590f25 --- /dev/null +++ b/Formula/a/ansifilter.rb @@ -0,0 +1,36 @@ +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.21.tar.bz2" + sha256 "5ea7cfdfd0752d5a169259da005c18b9037628036fd89d8b82624bacec9c1390" + 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_sequoia: "fcb7f2e73f24c718d2052596c1b55621866d07024214cd85ff0618c09e251196" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b005d0dc197d223fc17b249a946c051950cb78fb5271116bbbb44d68020c1a8e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "45508d26fccad940ef36579ab3087faeb66b4517edff212abc336493bce7d479" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d2b328545637725b5a6b0d187b1c51ac6491fb70ad8a5953e2af2729d3920a20" + sha256 cellar: :any_skip_relocation, sonoma: "f652f4bc0010ac275be8642c627e481f133e46745398033789226295dbe76905" + sha256 cellar: :any_skip_relocation, ventura: "4ae4488407625a92d4970bc8660cba23d99b551794fb03337d9531017c4da887" + sha256 cellar: :any_skip_relocation, monterey: "5e655b5ebd6f12c66b9f7ced9187d99f352d08496e1c9f0f5c211ac99396173d" + sha256 cellar: :any_skip_relocation, arm64_linux: "24194a4db72f85bf77086d3c4c975547f5e9c7a0455def0d3e20e40f2aa73187" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce8f6d387558594379f46240e0536e36cb2df2f1562e981901c4b65af73eb090" + 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..f6e0306a0eea8 --- /dev/null +++ b/Formula/a/ansilove.rb @@ -0,0 +1,36 @@ +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_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..7f4366b68a342 --- /dev/null +++ b/Formula/a/ansiweather.rb @@ -0,0 +1,26 @@ +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" + + 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..17b62b89ebf20 --- /dev/null +++ b/Formula/a/ant-contrib.rb @@ -0,0 +1,41 @@ +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 + + 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..0b091555c93c1 --- /dev/null +++ b/Formula/a/ant@1.9.rb @@ -0,0 +1,57 @@ +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 + + 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.com-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..b2283c61f994a --- /dev/null +++ b/Formula/a/antigen.rb @@ -0,0 +1,31 @@ +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" + + 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..500e2f652bce4 --- /dev/null +++ b/Formula/a/antiword.rb @@ -0,0 +1,76 @@ +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 mojave: "63b4aa9e31936c405039161b1ae728d76472bb9932a7b460e1fdd7a1276ee5ad" + sha256 high_sierra: "cacd3e8a83231fd139a5b845f17fb99a34f728d10df2eb6289457037ee8c827f" + sha256 sierra: "6456be83a3f867a0df1121b7c7b6c413d94d1e38bc920c9c5fda73851265fb2e" + sha256 el_capitan: "ffc3b61781ffb2ae04537e34b28a19a4fe33683c534dd2d1504d2ec8d5ef4bef" + sha256 arm64_linux: "80b3df205c403d29dc8f09ddfd181a3418b2ad6b84f7f54029717d1326896a48" + sha256 x86_64_linux: "12935daff8ed3ffc2a68b8be542ea190bff6d7d2a2d46c854080d4023346d526" + end + + deprecate! date: "2024-06-19", 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..43d11074eafb5 --- /dev/null +++ b/Formula/a/antlr4-cpp-runtime.rb @@ -0,0 +1,59 @@ +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_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 + + on_linux do + depends_on "pkgconf" => :build + 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..00231bba7157a --- /dev/null +++ b/Formula/a/anubis.rb @@ -0,0 +1,54 @@ +class Anubis < Formula + desc "Protect resources from scraper bots" + homepage "https://anubis.techaro.lol/" + url "https://github.com/TecharoHQ/anubis/archive/refs/tags/v1.18.0.tar.gz" + sha256 "b543f3c4af32a71994f4290b901b5670ce3cc7756b9db2c86d2569286d6dd6ef" + 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_sequoia: "b162bd9c43dedbe24fbfff3667d5df2cf433d34c698b286a894ff2dbba8ee9ba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7387ba7dd8e716f47bc486ca499dc40a02484ed5284186c591032f61c2f5241e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "774a900e165f381bbebc6dcbb55cdde962cad597968a9c1912f20e1c0418b28e" + sha256 cellar: :any_skip_relocation, sonoma: "2328432dc08c377c0f4ef8641e3806856785c2bfb7e26d388abd0e53daadfa9e" + sha256 cellar: :any_skip_relocation, ventura: "2608708e94511311a6b6f5e363bc98aaadc9c11358c1a05231161acc871f1384" + sha256 cellar: :any_skip_relocation, x86_64_linux: "655f3a50f4db66e85fa0a866d146de7cc0bd2165b9692513b3314aec5185c414" + end + + depends_on "go" => :build + depends_on "webify" => :test + + def install + 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..5c56e8acd1669 --- /dev/null +++ b/Formula/a/anycable-go.rb @@ -0,0 +1,49 @@ +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.1.tar.gz" + sha256 "3d0324493b1c7733b75c2875308771914f99ad7621fa9ad1228323e2497406e1" + 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_sequoia: "d5b9e19039640c3d2bbb44eda6278ba158b22e47bb0f66c7e26e73dacc74c4cb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d5b9e19039640c3d2bbb44eda6278ba158b22e47bb0f66c7e26e73dacc74c4cb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d5b9e19039640c3d2bbb44eda6278ba158b22e47bb0f66c7e26e73dacc74c4cb" + sha256 cellar: :any_skip_relocation, sonoma: "94e7201424ccfdbc9e4c74ed5f10eeb48b3a2e14cc6ae57d26fdb2349c3d1d0a" + sha256 cellar: :any_skip_relocation, ventura: "94e7201424ccfdbc9e4c74ed5f10eeb48b3a2e14cc6ae57d26fdb2349c3d1d0a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07f7d973c6fd613deb6c1a9960d2a2fd7fd158700ba67e8071f77f88cfb750b2" + 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 + 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..6efe9b9d22019 --- /dev/null +++ b/Formula/a/anyenv.rb @@ -0,0 +1,36 @@ +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" + + 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..8bd334b991203 --- /dev/null +++ b/Formula/a/anyquery.rb @@ -0,0 +1,43 @@ +class Anyquery < Formula + desc "Query anything with SQL" + homepage "https://anyquery.dev/" + url "https://github.com/julien040/anyquery/archive/refs/tags/0.4.1.tar.gz" + sha256 "31b3fa6506aadabda9b53c977964d7548602a7311acacb6f407f09a78d6005ca" + license "AGPL-3.0-only" + head "https://github.com/julien040/anyquery.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b363cd009398d2392c99117f66858a2e4c8a4500d45cfe3625ead058cb09bea9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7c9394f9d0e66ed4b3ad67b3ca08a632c41233d4b4fa04131c38697c4be76214" + sha256 cellar: :any_skip_relocation, arm64_ventura: "44bbaf4e254068d5e88da2bfefff78fd29e45fa7311a51282bee8ab42ebaa03b" + sha256 cellar: :any_skip_relocation, sonoma: "627ac11a9ad4c6c243e4a6306ff5f53b6f1d37355c23a4fae3e7fcccf1ea3636" + sha256 cellar: :any_skip_relocation, ventura: "83bccaa1b8a214c6e371bef27b982757f21d9c1bad4cf59bf010b80c74749ed8" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1c6b705f45ce8dee3bd1a1c0dc01b22768a462e71ab3f4d8539471c8772715e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1bc174f34b9a509d9876d2d4902b2f5ea3ca5643b29af184f73fdcb5bd280a9a" + 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/aoeui.rb b/Formula/a/aoeui.rb new file mode 100644 index 0000000000000..038921de52dd5 --- /dev/null +++ b/Formula/a/aoeui.rb @@ -0,0 +1,32 @@ +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" + + bottle do + 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, mojave: "c1e5c83add4ecaae6e45f5bed048045a0b2e81794244daf93028161bdd71e031" + sha256 cellar: :any_skip_relocation, high_sierra: "946acae5b1b88cb67bf805e6b8a8d591e3267d799c9d1a924e60217218166e78" + sha256 cellar: :any_skip_relocation, sierra: "1b04b93c490895121fed315f685d60cb96551b971ca1433a5240425cfa31dfcd" + sha256 cellar: :any_skip_relocation, el_capitan: "62a04ac0fd27e76f4f77da95e7d5aaf75488765f98b02574ae7dff0508cd9f13" + 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..88010a406b970 --- /dev/null +++ b/Formula/a/aom.rb @@ -0,0 +1,65 @@ +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.12.1", + revision: "10aece4157eb79315da205f39e19bf6ab3ee30d0" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7187a5accf9da7614d96b6fb07df1c0b144cfb096d920e9936fa78b6fba18c4a" + sha256 cellar: :any, arm64_sonoma: "0578655f1cb179f198fc868609ed7f9131cc2d7c31f76c993f6cc4843d8bfa11" + sha256 cellar: :any, arm64_ventura: "cf9e2b2e861a14756ce2fd7c527bf54003a0b0af8838cc87d428e6e5579320a1" + sha256 cellar: :any, sonoma: "8ddd7ac9825cb9b13af09e3adbd3b14c260d9d76e7d9e76c50e0a11f71e9b25b" + sha256 cellar: :any, ventura: "44aa92db669a867a7727f24da664757ae5363d32ab9f8071c61551a0db93e6e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "9cede9e7b34be52308ead8946d50c38145649d352b437395291eb2b6044fe713" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db186588bf0e900cdd1cdc1e42eb27f5da7ceed34aeff55ec22c069c530103e4" + 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..5c32dc6f27772 --- /dev/null +++ b/Formula/a/apache-arrow-glib.rb @@ -0,0 +1,51 @@ +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-19.0.1/apache-arrow-19.0.1.tar.gz" + mirror "https://archive.apache.org/dist/arrow/arrow-19.0.1/apache-arrow-19.0.1.tar.gz" + sha256 "acb76266e8b0c2fbb7eb15d542fbb462a73b3fd1e32b80fad6c2fafd95a51160" + 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_sequoia: "8358dd7648c6dd2077b0a38a705fc66100d9f73f76df365b32d20fa2895cd8ad" + sha256 cellar: :any, arm64_sonoma: "552a212f5b31f7148b84b9b7d608fea7aa81169959f414a908eaab14aeddbf10" + sha256 cellar: :any, arm64_ventura: "c14735c1e5bf66ad3cdbefd5eb0d94529c4e1525684c6bb59a56b6bd9c73e928" + sha256 cellar: :any, sonoma: "c8b1852c876c2b0ebd49d70f29e2ece594d3b9e6987a7b20969114b7cb8663ee" + sha256 cellar: :any, ventura: "543ca4c13245ec92239a913bab4ebfba44d3e0c8069db9773801ddda6ceb8d42" + sha256 arm64_linux: "1366efe6189e58917cc6e1afe1eb67d4e66a55658b841bc5ed3db873daca8201" + sha256 x86_64_linux: "4582ac91ab357cd8bed148c3293eb85be84fcc24d867a1f43b1f1531a5188444" + 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..6e5220a0b0049 --- /dev/null +++ b/Formula/a/apache-arrow.rb @@ -0,0 +1,125 @@ +class ApacheArrow < Formula + desc "Columnar in-memory analytics layer designed to accelerate big data" + homepage "https://arrow.apache.org/" + license "Apache-2.0" + revision 4 + head "https://github.com/apache/arrow.git", branch: "main" + + stable do + url "https://www.apache.org/dyn/closer.lua?path=arrow/arrow-19.0.1/apache-arrow-19.0.1.tar.gz" + mirror "https://archive.apache.org/dist/arrow/arrow-19.0.1/apache-arrow-19.0.1.tar.gz" + sha256 "acb76266e8b0c2fbb7eb15d542fbb462a73b3fd1e32b80fad6c2fafd95a51160" + + # Backport support for LLVM 20 + patch do + url "https://github.com/apache/arrow/commit/c124bb55d993daca93742ce896869ab3101dccbb.patch?full_index=1" + sha256 "249ec9d7bf33136080992cda4d47790d3b00cdf24caa3b0e3f95d4a4bb9fba3e" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0bb2de8f6fa8682c3f3eb0be78f5c3a81f2b59303d2b23068cef97fd038efc95" + sha256 cellar: :any, arm64_sonoma: "6eb32046a7e8b7fe28a1b49ee28029e6fdfeca3261f15078dad69019eb6af253" + sha256 cellar: :any, arm64_ventura: "64a818e21d7f9d4cff3e6acda1cf6f8562c08523a8a04a21d4579c480f194f01" + sha256 cellar: :any, sonoma: "fb20d95aef830402f36dacf5e44cf0d1bc350527d96171c06032a89a4495e803" + sha256 cellar: :any, ventura: "1618799329bcd8dc5020bafd8815725479e2d67db35202a9c5f8af1d19c745d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "602e4f1a0b19af559b54c4d991dc12e8c058281b3fcc26c988a6f572d428fccd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e2fe1adb7d7f785d5a6a973defe86f12ec2a1ebc25d18d86be3befe46b20c5e6" + 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" + + # Issue ref: https://github.com/protocolbuffers/protobuf/issues/19447 + fails_with :gcc do + version "12" + cause "Protobuf 29+ generated code with visibility and deprecated attributes needs GCC 13+" + end + + def install + ENV.llvm_clang if OS.linux? + + # upstream pr ref, https://github.com/apache/arrow/pull/44989 + odie "Remove CMAKE_POLICY_VERSION_MINIMUM workaround!" if build.stable? && version > "19.0.1" + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + # 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 + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + args << "-DARROW_MIMALLOC=ON" unless Hardware::CPU.arm? + # Reduce overlinking. Can remove on Linux if GCC 11 issue is fixed + args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,#{OS.mac? ? "-dead_strip_dylibs" : "--as-needed"}" + # 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 + ENV.method(DevelopmentTools.default_compiler).call if OS.linux? + + (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..62f6f324f02f7 --- /dev/null +++ b/Formula/a/apache-brooklyn-cli.rb @@ -0,0 +1,58 @@ +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 + + bottle do + 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, 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..41155fea9cfba --- /dev/null +++ b/Formula/a/apache-drill.rb @@ -0,0 +1,57 @@ +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.21.2/apache-drill-1.21.2.tar.gz" + mirror "https://dlcdn.apache.org/drill/1.21.2/apache-drill-1.21.2.tar.gz" + sha256 "77e2e7438f1b4605409828eaa86690f1e84b038465778a04585bd8fb21d68e3b" + license "Apache-2.0" + + livecheck do + url "https://drill.apache.org/download/" + regex(/href=.*?apache-drill[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "1fdc04dff9efe56387a375149ae2d30249bf790dd6a821f3410439b92bc51dd0" + 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..19d3db1c33bf1 --- /dev/null +++ b/Formula/a/apache-flink-cdc.rb @@ -0,0 +1,101 @@ +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.3.0/flink-cdc-3.3.0-bin.tar.gz" + mirror "https://archive.apache.org/dist/flink/flink-cdc-3.3.0/flink-cdc-3.3.0-bin.tar.gz" + sha256 "efb6a5e36bcb85550c367cb39104ee7fcbacfd8124190a2fc3e547ca19446719" + license "Apache-2.0" + revision 1 + head "https://github.com/apache/flink-cdc.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1cef7a93c789288ae90f0be233b2891a553f12bdee58bdd2e7ccaedf38da477e" + 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.3.0/flink-cdc-pipeline-connector-mysql-3.3.0.jar" + sha256 "6e1af3675279e11c3e0240ca0475910c13bf75ecfd1ab23c0077a5fabc65c44a" + end + resource "oceanbase-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-oceanbase/3.3.0/flink-cdc-pipeline-connector-oceanbase-3.3.0.jar" + sha256 "1de0ca47dc3f495b585e5f8f63c182f9e2f6c5bb6ed895392a65b2255d7c3c8f" + end + resource "paimon-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-paimon/3.3.0/flink-cdc-pipeline-connector-paimon-3.3.0.jar" + sha256 "aff379b173bbde7383ef703211f63cf4e0e1eaac8bba7af1757ccf60fc2b2126" + end + resource "kafka-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-kafka/3.3.0/flink-cdc-pipeline-connector-kafka-3.3.0.jar" + sha256 "988af808ba3c2b1bc2ac7c4e79388615ecd2d0614b5ccba48362b526ae1b98e9" + end + resource "maxcompute-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-maxcompute/3.3.0/flink-cdc-pipeline-connector-maxcompute-3.3.0.jar" + sha256 "f2388915ace24911cb56f32c31e5cc387d968283cfb06333c8e43651108e35a6" + end + resource "doris-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-doris/3.3.0/flink-cdc-pipeline-connector-doris-3.3.0.jar" + sha256 "112981b8bb216fa08928c12abc0a7ce3d2772f22c06d417e2426884e4f880304" + end + resource "elasticsearch-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-elasticsearch/3.3.0/flink-cdc-pipeline-connector-elasticsearch-3.3.0.jar" + sha256 "41ca15269df57a57576740fb75e3a00a62bc7e0733b021f3844c50a05bf9610c" + end + resource "starrocks-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-starrocks/3.3.0/flink-cdc-pipeline-connector-starrocks-3.3.0.jar" + sha256 "3bf443e4f339dc1532a2fb3870d014be4f40fb82ac58edbb09dde284a64886c0" + end + resource "values-connector" do + url "https://search.maven.org/remotecontent?filepath=org/apache/flink/flink-cdc-pipeline-connector-values/3.3.0/flink-cdc-pipeline-connector-values-3.3.0.jar" + sha256 "0854e61ba6016df5c13ae99fe78aabc278a5bbf4bcb3c029402a6bf7de96a93b" + 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..29f4765f961cd --- /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.0.0/flink-2.0.0-bin-scala_2.12.tgz" + mirror "https://archive.apache.org/dist/flink/flink-2.0.0/flink-2.0.0-bin-scala_2.12.tgz" + version "2.0.0" + sha256 "04fe5be9841a10d30e0e1cd682ec4d015a86603f710f2f857c43c75beae97aad" + 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: "ab20a5e33f83e6aa4d71d256529eefcc5345def0b8c8a1a7de77b177511c1afc" + 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..bb24898ba3302 --- /dev/null +++ b/Formula/a/apache-flink@1.rb @@ -0,0 +1,46 @@ +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.1/flink-1.20.1-bin-scala_2.12.tgz" + mirror "https://archive.apache.org/dist/flink/flink-1.20.1/flink-1.20.1-bin-scala_2.12.tgz" + version "1.20.1" + sha256 "5fc4551cd11aee83a9569392339c43fb32a60847db456e1cb4fa64c8daae0186" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "99384bed6ba14959e8215e2eb0ca41df3597021c0b5f1bdac4a952b4d7f74ecb" + 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..1ef0501ef6db5 --- /dev/null +++ b/Formula/a/apache-geode.rb @@ -0,0 +1,50 @@ +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.1/apache-geode-1.15.1.tgz" + mirror "https://archive.apache.org/dist/geode/1.15.1/apache-geode-1.15.1.tgz" + mirror "https://downloads.apache.org/geode/1.15.1/apache-geode-1.15.1.tgz" + sha256 "2668970982d373ef42cff5076e7073b03e82c8e2fcd7757d5799b2506e265d57" + license "Apache-2.0" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "36121f60a1dd6f9a614219b11e6f4d3e9fd91e76dc91af213b54af1cbeab0ae0" + 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..c167688df559b --- /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.4/apache-opennlp-2.5.4-bin.tar.gz" + mirror "https://archive.apache.org/dist/opennlp/opennlp-2.5.4/apache-opennlp-2.5.4-bin.tar.gz" + sha256 "54452c85a38b74b1a04ba51531be6f221b825630288c05d1c76ba974afc5279a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f63d4c84abf5f6bbc727dbd8d5ecc4120b1cc60cee10bc10674d0a7c4e78cdb2" + 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-pulsar.rb b/Formula/a/apache-pulsar.rb new file mode 100644 index 0000000000000..936b4c3e257cf --- /dev/null +++ b/Formula/a/apache-pulsar.rb @@ -0,0 +1,80 @@ +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.0.4/apache-pulsar-4.0.4-src.tar.gz" + mirror "https://archive.apache.org/dist/pulsar/pulsar-4.0.4/apache-pulsar-4.0.4-src.tar.gz" + sha256 "9afe7736d3678d2e22bb44b46b1a47ee5e880bb7025f3e84f2df3d448688e15d" + license "Apache-2.0" + head "https://github.com/apache/pulsar.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a3f52208fa1f971e4cfa8e1f3205855a2dfcc469339188291953d56342db5e75" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "debaf2c0836910ae3c968f8084b0c55eb33340ed31bb3896a7ffbb46d3ccb5ce" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5a9ff2aa1f00d0a8aca6ada7eebd19704dd3e2f120aaa7bf4d6912a891359ce2" + sha256 cellar: :any_skip_relocation, sonoma: "a9c5f80fff77e2a799ef8bdd6a804c8faf228f3202e5841034bd1f5a0c52c30b" + sha256 cellar: :any_skip_relocation, ventura: "6582f4eaa59efc16c9aee4a031d7e3c45a010100a1be8cb861dcbac95677fdb0" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f8462e2a26f796400ed76b82b3fc0b6c5ee9b93cb02a16e0e747a2145c697a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81b8430ceec8e7e98023909fd3628b17dbcdaa145bdb19f7ec0dcd72ef9f645d" + end + + depends_on "maven" => :build + depends_on "protoc-gen-grpc-java" => :build + depends_on "openjdk@21" + + def install + # 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..3e1b8cad612e9 --- /dev/null +++ b/Formula/a/apache-spark.rb @@ -0,0 +1,40 @@ +class ApacheSpark < Formula + desc "Engine for large-scale data processing" + homepage "https://spark.apache.org/" + url "https://dlcdn.apache.org/spark/spark-3.5.5/spark-3.5.5-bin-hadoop3.tgz" + mirror "https://archive.apache.org/dist/spark/spark-3.5.5/spark-3.5.5-bin-hadoop3.tgz" + version "3.5.5" + sha256 "8daa3f7fb0af2670fe11beb8a2ac79d908a534d7298353ec4746025b102d5e31" + license "Apache-2.0" + 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: "ee6cf6111d441cd77534189b45edf345a560aff75a2a547ea223d3ccb613f2af" + end + + depends_on "openjdk@17" + + 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("17")[:JAVA_HOME]) + end + + test do + command = "#{bin}/spark-shell --conf spark.driver.bindAddress=127.0.0.1" + trivial_attribute_name = "jdk.incubator.foreign.FunctionDescriptor.TRIVIAL_ATTRIBUTE_NAME" + assert_match "Long = 1000", pipe_output(command, "sc.parallelize(1 to 1000).count()", 0) + assert_match "String = abi/trivial", pipe_output(command, trivial_attribute_name, 0) + end +end diff --git a/Formula/a/apachetop.rb b/Formula/a/apachetop.rb new file mode 100644 index 0000000000000..3bef175d2c563 --- /dev/null +++ b/Formula/a/apachetop.rb @@ -0,0 +1,48 @@ +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_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..862ddf7ef40a4 --- /dev/null +++ b/Formula/a/apcupsd.rb @@ -0,0 +1,116 @@ +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 + + bottle do + rebuild 4 + 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 mojave: "7c87a398311314a0f789cabb5956932962800297e2ba4890f07ac60c13cc3f68" + 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: 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. + + 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..1878c6b96fd4e --- /dev/null +++ b/Formula/a/apgdiff.rb @@ -0,0 +1,63 @@ +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 + + 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..195b8d43719cd --- /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/v1.69.2.tar.gz" + sha256 "a6c10a8d0b9a9186db3419075adae497f5fa169113a22a742c05444e711dbaf0" + license "Apache-2.0" + head "https://github.com/googleapis/api-linter.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "562e32b91b590f63e4b84a890fa0c85f186c538393b4831fa83687fdaf37740e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "562e32b91b590f63e4b84a890fa0c85f186c538393b4831fa83687fdaf37740e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "562e32b91b590f63e4b84a890fa0c85f186c538393b4831fa83687fdaf37740e" + sha256 cellar: :any_skip_relocation, sonoma: "1853e3420fed61d571b911d032fc4987d718da146bada34285c75a9f43af3dba" + sha256 cellar: :any_skip_relocation, ventura: "1853e3420fed61d571b911d032fc4987d718da146bada34285c75a9f43af3dba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "05821db020cab71b0d94325d43bb8e912e900a575443237ca1ecacb6f854ec3c" + 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..4a751d23a72bd --- /dev/null +++ b/Formula/a/apib.rb @@ -0,0 +1,38 @@ +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" + + bottle do + rebuild 1 + 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 + system "cmake", "-S", ".", "-B", "build", *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..11f980aca74d1 --- /dev/null +++ b/Formula/a/apidoc.rb @@ -0,0 +1,55 @@ +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 + + 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..772472105caf5 --- /dev/null +++ b/Formula/a/apify-cli.rb @@ -0,0 +1,32 @@ +class ApifyCli < Formula + desc "Apify command-line interface" + homepage "https://docs.apify.com/cli/" + url "https://registry.npmjs.org/apify-cli/-/apify-cli-0.21.7.tgz" + sha256 "bc5e57ace3d23f5f3b0943be63da7d064f8b6f69b86c5fe91d531b51cf35684c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ae581a2de5d04f71ed21bff741bab73f275def98521c4646589f394442e14d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5ae581a2de5d04f71ed21bff741bab73f275def98521c4646589f394442e14d9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5ae581a2de5d04f71ed21bff741bab73f275def98521c4646589f394442e14d9" + sha256 cellar: :any_skip_relocation, sonoma: "edc91262c7350a16c35917ac43cf9be41c5e869d828c65c57c58c63421943845" + sha256 cellar: :any_skip_relocation, ventura: "edc91262c7350a16c35917ac43cf9be41c5e869d828c65c57c58c63421943845" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd63568b6c772830d022c8b1cd47369e6aa6bf965dd4f3b3aea3cc795cd0a98c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd63568b6c772830d022c8b1cd47369e6aa6bf965dd4f3b3aea3cc795cd0a98c" + 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/apkleaks.rb b/Formula/a/apkleaks.rb new file mode 100644 index 0000000000000..846120a0c9a40 --- /dev/null +++ b/Formula/a/apkleaks.rb @@ -0,0 +1,64 @@ +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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "53409d176d6c3ea2efa1575ac9a466f74dd8a5a7426be952b02787780f4ff858" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b7377ef49f14020db31a4e72f6592c98af1ed270a530eb26e9e9de9cac21b72b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d1391422b4037f72e36b3b38901e0bc279e9c5770fc63cb00c674aff9dddc43a" + sha256 cellar: :any_skip_relocation, sonoma: "8b9948be0cb74507608a58e1b99a5bc62bb745dc3b4b2d3a88a4785c670d708f" + sha256 cellar: :any_skip_relocation, ventura: "2bc351029f9c9e53004fcf6cbdb2fc3a772c771dccc3052dd3a3dcedab122c59" + sha256 cellar: :any_skip_relocation, arm64_linux: "441aff0993a838898a4695386c48a20fbdf7024389739176017d17cdd3d236d7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63fdbb67007a469a23eb740eb1bfbc39e84abc92e04d706b79cf40b19d95dc95" + end + + depends_on "jadx" + depends_on "python@3.13" + + 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/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/e7/6b/20c3a4b24751377aaa6307eb230b66701024012c29dd374999cc92983269/lxml-5.3.0.tar.gz" + sha256 "4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f" + 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..6ef88cd21e62d --- /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.27.6.tar.gz" + sha256 "19339f3063a383b0128f3d9cf8db2542c244f6331cdcfd6b255d8dead0977572" + 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_sequoia: "6a3ff35f5314526d46db5a91e940254a50d91d9de9f639665f6b15954302122f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6a3ff35f5314526d46db5a91e940254a50d91d9de9f639665f6b15954302122f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a3ff35f5314526d46db5a91e940254a50d91d9de9f639665f6b15954302122f" + sha256 cellar: :any_skip_relocation, sonoma: "06aa47c2e0f39da8048593bcc6a0379db0b30584514d63ecf671242813069b5d" + sha256 cellar: :any_skip_relocation, ventura: "06aa47c2e0f39da8048593bcc6a0379db0b30584514d63ecf671242813069b5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "563cc122af84609074adc2a889aa70e7100b0a40c0dd256bb705081f3f44ac9d" + 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: + - alpine-base + + 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..9d3e5e1b99134 --- /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.11.1/apktool_2.11.1.jar" + sha256 "56d59c524fc764263ba8d345754d8daf55b1887818b15cd3b594f555d249e2db" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "89932937bf5504a8032cdf2d55f816f517c05767bd5f372228b1faffd5de8410" + end + + depends_on "openjdk" + + resource "homebrew-test.apk" do + url "https://raw.githubusercontent.com/facebook/redex/fa32d542d4074dbd485584413d69ea0c9c3cbc98/test/instr/redex-test.apk" + sha256 "7851cf2a15230ea6ff076639c2273bc4ca4c3d81917d2e13c05edcc4d537cc04" + end + + def install + libexec.install "apktool_#{version}.jar" + bin.write_jar_script libexec/"apktool_#{version}.jar", "apktool" + end + + test do + 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..704c63651b635 --- /dev/null +++ b/Formula/a/apng2gif.rb @@ -0,0 +1,40 @@ +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"] + + bottle do + rebuild 1 + 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, mojave: "f0f18d7ae3beaaac092bc06bccc3f5fdcd0c7de11df6ded61e8fde151d3e2276" + sha256 cellar: :any, high_sierra: "810005bcbc32c60c7084b248eef3d007e756180842051f64385fb90cfac66c63" + sha256 cellar: :any, sierra: "fa18274f18fb0d3a2b3f5c360c24587b805db3f4734972c350643c35b8677174" + sha256 cellar: :any, el_capitan: "42d033ae0a661d75b588af8d7c0cdb67a81bfc481aa88665973d95d3e4fb64ec" + 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..4eb7ea28cee4b --- /dev/null +++ b/Formula/a/apngasm.rb @@ -0,0 +1,50 @@ +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 17 + head "https://github.com/apngasm/apngasm.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "9f9562c52caf37166d3771a0e370250319750ce9fa016ca099ee231ba4ae88d3" + sha256 arm64_sonoma: "f0791efcfc25b7001706e2e2bdcb1f9120d8cf5fd1c34a1fefdfb09056b492dc" + sha256 arm64_ventura: "3d82122ccb48a72935372aac4a7952a4a078b8e1918704e3f68ed4feb50bc225" + sha256 sonoma: "fc995725850b2752e9f442bf63eee3cffd43a4454a48429edd57cbeab2b4356c" + sha256 ventura: "c37625e57630e64210b78c4621173c635fc6fe567c2a334fcce25b5c0723017e" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b9da2361fb8475de751ce0eadc113311b992916637e11fd1e70c00d579b4ec9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7176fba311bf1861d06e2f5cab3172ec487c50aa1aaaa8ca84d7adf14d52f5cb" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "icu4c@77" + depends_on "libpng" + depends_on "lzlib" + depends_on macos: :catalina + + uses_from_macos "zlib" + + fails_with :gcc do + version "7" + cause "Requires C++17 filesystem" + 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..56d401f0919aa --- /dev/null +++ b/Formula/a/apophenia.rb @@ -0,0 +1,71 @@ +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 + + bottle do + 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/formula-patches/9aaa7da2cc8dab92f16744724797739088742a29/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..e2521f3a00f32 --- /dev/null +++ b/Formula/a/apparix.rb @@ -0,0 +1,44 @@ +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_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, mojave: "5b26fe074f048cdf1ba973e21e91bd51eb7f275ba05928ffaaf2e56c15671bbd" + sha256 cellar: :any_skip_relocation, high_sierra: "1170198d8bafd2b2a6795257dec1e4c15cb1c92d1af7eea44ee816c0a58ac8a1" + sha256 cellar: :any_skip_relocation, sierra: "889da718a73f128fa8baaca4a66ae80316ef6cb00ccc03937ea191c8eb781930" + sha256 cellar: :any_skip_relocation, el_capitan: "89d7d52f9f2e76f1dd6b91075f407fa71000be0b09bd4548c11a6fd820b87ab3" + 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..561680652f900 --- /dev/null +++ b/Formula/a/appium.rb @@ -0,0 +1,51 @@ +class Appium < Formula + desc "Automation for Apps" + homepage "https://appium.io/" + url "https://registry.npmjs.org/appium/-/appium-2.18.0.tgz" + sha256 "a71d89265478e46082d313314296e5285d3cf35a47ac5f189303f2341e882540" + license "Apache-2.0" + head "https://github.com/appium/appium.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d9f51b6873ea1f0a238086d1dce9618f0270c959ebb206bddcf64c4f4cea3b9a" + sha256 cellar: :any, arm64_sonoma: "d9f51b6873ea1f0a238086d1dce9618f0270c959ebb206bddcf64c4f4cea3b9a" + sha256 cellar: :any, arm64_ventura: "d9f51b6873ea1f0a238086d1dce9618f0270c959ebb206bddcf64c4f4cea3b9a" + sha256 sonoma: "ada43312361db2dbe53846eb7043b5f74057bca45c685322d47cb86aa8aef605" + sha256 ventura: "ada43312361db2dbe53846eb7043b5f74057bca45c685322d47cb86aa8aef605" + sha256 cellar: :any_skip_relocation, arm64_linux: "20406e44f2db15b318f348e9bbb4c5804db91ddf3e42ec05af3633256d64e405" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8e036d97e585075cae1bd0f22829f244d8324a29768735ccade67183d1eadb6" + 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..0219834ed0f99 --- /dev/null +++ b/Formula/a/apprise.rb @@ -0,0 +1,95 @@ +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/f8/1e/fe19c88c3e1ff96f4ea757bae9f6350060ac28be523507053347aa5d67db/apprise-1.9.3.tar.gz" + sha256 "f583667ea35b8899cd46318c6cb26f0faf6a4605b119174c2523a012590c65a6" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "354b28f0fb23363894667645c28ca9901a14ef20542ed7e1f217008b9060e30e" + sha256 cellar: :any, arm64_sonoma: "ce7f87a5e4b166890f249446033ffccd2f75240a9a7756c5d09e9b6105241812" + sha256 cellar: :any, arm64_ventura: "05c8c0fd8290b6ad5d60a606270857a0c1c6a5812248e7cd7a7fad426e996fe9" + sha256 cellar: :any, sonoma: "ada7b48bcb889febea70f31b506ab1357ee00109815c2f72e2262d784c4409db" + sha256 cellar: :any, ventura: "0ff02200c042ed717c0202f4088055e0d611a21dba4620727177cc654384fd51" + sha256 cellar: :any_skip_relocation, arm64_linux: "f554695504727b87700262ef6cc6fe87040bffb8c1d6d059d69fbdd6984188d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c761465aba70b06dd7757c62c301daac2dc273c3d53feec956b4d3502633d030" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/54/28/3af612670f82f4c056911fbbbb42760255801b3068c48de792d354ff4472/markdown-3.7.tar.gz" + sha256 "2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + 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-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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"apprise", shells: [:fish, :zsh], 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..bddb8f8e49fd8 --- /dev/null +++ b/Formula/a/appstream-glib.rb @@ -0,0 +1,85 @@ +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" + + bottle do + 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..b87c632663cc3 --- /dev/null +++ b/Formula/a/appstream.rb @@ -0,0 +1,104 @@ +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.0.5.tar.gz" + sha256 "dd33b1375ba4221ffee060e2778c478e8150d7b1108c6309148f5fb1ca6e90c0" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_sequoia: "62af458e208bcd4469e9ecd149cbcc0ae6775fd3e42e61d3f75526e4340c8d3c" + sha256 arm64_sonoma: "b802060c9d3ee181badb15af8c0167368f4639600d4a97a1b44a1cfd54061e12" + sha256 arm64_ventura: "d4ff9bd76af846d0f5bd81ac3520303b22f0702e207ab2b2bffcd1a713eaf84f" + sha256 sonoma: "5ab8381af28d0b7872f445423ed5a42050f1a60df427e62c4836e9bf46131557" + sha256 ventura: "d17ed0a5700fb7550edc54185e1735dac8cca1150ade8b7da78a005eac347818" + sha256 arm64_linux: "c138a6b9a40af6fbfe764c0c76af622aa03853fd28aac2a42f1a3af06de64a49" + sha256 x86_64_linux: "17ffe5258052484fdf85a3038b6df1ac21a2bf4f13eb3367dfe4480959182f88" + 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 "libxmlb" + depends_on "libyaml" + 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..95047a736b069 --- /dev/null +++ b/Formula/a/apptainer.rb @@ -0,0 +1,45 @@ +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.1/apptainer-1.4.1.tar.gz" + sha256 "77f25c756397a0886baf462ffdde0e21fe528063505c67a51460c165094d166d" + license "BSD-3-Clause" + head "https://github.com/apptainer/apptainer.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "7506eb9581c9ca055851a97871a54acb06a9308613eff3186436f01596c8d18b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc9346a5becebae7299aaed1e5f531e955370af58b418f7f953857541f01b677" + 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 + 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..9db1cf308af9c --- /dev/null +++ b/Formula/a/appwrite.rb @@ -0,0 +1,27 @@ +class Appwrite < Formula + desc "Command-line tool for Appwrite" + homepage "https://appwrite.io/" + url "https://registry.npmjs.org/appwrite-cli/-/appwrite-cli-6.2.3.tgz" + sha256 "5ee405540c42103d2815df21b16c75a62bbe9175092186d397b7ad09098dca9d" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "66f05e2d4313f2e1336329e49e6b823dbcb33882e68ea688404c542c2930ea2e" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + inreplace libexec/"lib/node_modules/appwrite-cli/install.sh", "/usr/local", "@@HOMEBREW_PREFIX@@" + inreplace libexec/"lib/node_modules/appwrite-cli/ldid/Makefile", "/usr/local", "@@HOMEBREW_PREFIX@@" + bin.install_symlink Dir["#{libexec}/bin/*"] + 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..c6bcf4892ff24 --- /dev/null +++ b/Formula/a/apr-util.rb @@ -0,0 +1,61 @@ +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 + + bottle do + 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..ec3a17fd72ff7 --- /dev/null +++ b/Formula/a/apr.rb @@ -0,0 +1,59 @@ +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.5.tar.bz2" + mirror "https://archive.apache.org/dist/apr/apr-1.7.5.tar.bz2" + sha256 "cd0f5d52b9ab1704c72160c5ee3ed5d3d4ca2df4a7f8ab564e3cb352b67232f2" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "aa4997bb5769c8a7438cc204cc7b6a366ca96e32649855e1cc3a81fbe2b1f6c3" + sha256 cellar: :any, arm64_sonoma: "d4ddf068fd1c071ac911af823e5b7b6de2a4506a1812e95bc9505c844b5524fe" + sha256 cellar: :any, arm64_ventura: "bed002cafeb67dbf1cfe8a20691cdc8ca251ae3e7404caa9e839b92cf9cfe7b2" + sha256 cellar: :any, arm64_monterey: "1272fcd1a362d19f3d57340ff356e9d3f6f332d8c28ca3f95dc184736d2b2d94" + sha256 cellar: :any, sonoma: "427b76fa372c2a89e40aeadbe559aabc39eabee537e785ac824309de2d53074d" + sha256 cellar: :any, ventura: "49cd82349f0bd06675d4eca2ccfa12c61f990e58063582faaca94ae93b4dc598" + sha256 cellar: :any, monterey: "ee20045b0546f5e70efa396f21e49c3354e2bbe5a6c7397f8cbe7638537aae2b" + sha256 cellar: :any_skip_relocation, arm64_linux: "8bf82c4ca4ab3fdf3f6ac7c0579de6b330633231dc649b5797ecc376ebd47ebc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dffbdbc595b875e62f84d705af046b4c95d4287fc61f2f0cc71e5480b6633a98" + 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..4496c10ed9297 --- /dev/null +++ b/Formula/a/apt-dater.rb @@ -0,0 +1,58 @@ +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 + + bottle do + rebuild 1 + 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..377f0e45b5292 --- /dev/null +++ b/Formula/a/apt.rb @@ -0,0 +1,82 @@ +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.0.1/apt-3.0.1.tar.bz2" + sha256 "eb7737c109821e9e213e32da3402effada9d1f0d1d01ab411265cf4d23841761" + 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: "d30a0716835fd3f76a2d0e78261aef40495e919a6808f6aaf0035428aafcfdb3" + sha256 x86_64_linux: "ee8745185308f394d3a16bbb7403295d252cace4a629953cbe6c6841f98cb161" + end + + keg_only "not linked to prevent 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 "llvm" => :build if DevelopmentTools.gcc_version("/usr/bin/gcc") < 13 + 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" + + fails_with :gcc do + version "12" + cause "error: static assertion failed: Cannot construct map for key type" + end + + resource "triehash" do + url "https://github.com/julian-klode/triehash/archive/refs/tags/v0.3.tar.gz" + sha256 "289a0966c02c2008cd263d3913a8e3c84c97b8ded3e08373d63a382c71d2199c" + end + + def install + # Find our docbook catalog + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + ENV.llvm_clang if DevelopmentTools.gcc_version("/usr/bin/gcc") < 13 + 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 diff --git a/Formula/a/aptly.rb b/Formula/a/aptly.rb new file mode 100644 index 0000000000000..8622b6633e14c --- /dev/null +++ b/Formula/a/aptly.rb @@ -0,0 +1,42 @@ +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.1.tar.gz" + sha256 "0488bc0717a1becda77fe1094a5eb4972ef1b6cd335f4108ddbbf89c6f917410" + 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_sequoia: "135fdf1a0b34d87659f430d7be2f552062cd15982bba236d1741bee4ba5a4675" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "135fdf1a0b34d87659f430d7be2f552062cd15982bba236d1741bee4ba5a4675" + sha256 cellar: :any_skip_relocation, arm64_ventura: "135fdf1a0b34d87659f430d7be2f552062cd15982bba236d1741bee4ba5a4675" + sha256 cellar: :any_skip_relocation, sonoma: "f762cd5fa3143bcf4cb16bb8495b5a007d88335b117eaa537676bb23ee41d3fe" + sha256 cellar: :any_skip_relocation, ventura: "f762cd5fa3143bcf4cb16bb8495b5a007d88335b117eaa537676bb23ee41d3fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1bcf9a9430011265aaa5b98175f8dc1c3cf2d73e3034f719d175567bcf549126" + 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..77ac0700467b6 --- /dev/null +++ b/Formula/a/aptos.rb @@ -0,0 +1,53 @@ +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.2.0.tar.gz" + sha256 "135e0c1799cc6bfe4e570d40817f8548c8e89ddb06c690ed4737e56824334222" + 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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d0206105fff368a299a90a564d3bc2721310ebe7c73d45a3d8535263cc318028" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "50a2913aef29c7bbfce6b09ccff72c0d688fe68023a556dbed2374cb815d2451" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c902ffbdb542944f9c8f41cb82eddf6caed2a0f4590b1d6838d91c39a50de28e" + sha256 cellar: :any_skip_relocation, sonoma: "82ec06f8000c62227eb01550487a8e3be5cc0204683a579c44018013ecd5168a" + sha256 cellar: :any_skip_relocation, ventura: "61551d586996b1b498087bc323cee13c2885a8102566633e8c48a804428664bc" + sha256 cellar: :any_skip_relocation, arm64_linux: "8c75d81c3c08217ec4ee7473c429ac545d48e9a0a1a2a9574829aff9f265ddab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc1f7c0851ecd2c3d0acfee0572bfd39eb83f2ae35655ad6366e2b56b9bfbd4a" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + uses_from_macos "llvm" => :build + + on_linux do + depends_on "pkgconf" => :build + depends_on "zip" => :build + depends_on "elfutils" + depends_on "openssl@3" + depends_on "systemd" + end + + # rust 1.80.0 build patch, upstream pr ref, https://github.com/aptos-labs/aptos-core/pull/14272 + patch do + url "https://github.com/aptos-labs/aptos-core/commit/72b9657316c699cfbef75216f578a0bd99e0be46.patch?full_index=1" + sha256 "f93b4f8b0a61d245e13d6776834cec9ecdd3b0103d53b43dcc79cda3e3f787ed" + end + + def install + # FIXME: Look into a different way to specify extra RUSTFLAGS in superenv as they override .cargo/config.toml + # Ref: https://github.com/Homebrew/brew/blob/master/Library/Homebrew/extend/ENV/super.rb#L65 + ENV.append "RUSTFLAGS", "--cfg tokio_unstable -C force-frame-pointers=yes -C force-unwind-tables=yes" + 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..6a8563f33cd95 --- /dev/null +++ b/Formula/a/aqbanking.rb @@ -0,0 +1,76 @@ +class Aqbanking < Formula + desc "Generic online banking interface" + homepage "https://www.aquamaniac.de/rdm/projects/aqbanking" + url "https://www.aquamaniac.de/rdm/attachments/download/531/aqbanking-6.6.0.tar.gz" + sha256 "37634487b95bad72b1b21397bce08cb4b15e13cb253886767c98f31712e40bfb" + 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 + + bottle do + sha256 arm64_sequoia: "867da1207bd6888e0ccaff9e5a590a550496c75a3c108268eb735a72d88f4b63" + sha256 arm64_sonoma: "09eac4af03579d4a5a3a337abb3084181421c3900d4b48634ae49b40c8bf372e" + sha256 arm64_ventura: "06bb730e2245dc7397488e452cdd1a7f1016929fd17cddbfec4bb823c1a796b4" + sha256 sonoma: "b6a29a9a12754837f0ded814578872416c787c6035e4903bd24f3cd74bfaa423" + sha256 ventura: "959125b55e5ed7918812874fd42281191a7ce553dadfe0f7d0e2db42b97eb971" + sha256 x86_64_linux: "f864757758e63cc53a8ad042903e7ec7a24634c3e2d635e058b20f95b43f21eb" + 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..5da11602c4616 --- /dev/null +++ b/Formula/a/aqtinstall.rb @@ -0,0 +1,145 @@ +class Aqtinstall < Formula + include Language::Python::Virtualenv + + desc "Another unofficial Qt installer" + homepage "https://github.com/miurahr/aqtinstall" + url "https://files.pythonhosted.org/packages/de/c6/4e122b226120407b76b473433b24a7628853ce4c4405ed3d56d52f8e6a9e/aqtinstall-3.2.1.tar.gz" + sha256 "80005d4f8eebd50487a87fec2de4d4f808bb72fc923026eef9e3575795f801bf" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6bae085ca061fadbcbf0d15c6e1fc5a36776dd51e62161bd89e0a2b05e786b2e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "18587357a412fa3e04beb885a50eda950ff5346e682ac082612548a35b7a5ca9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "602f0515af58cced1f36ac5e133172e40f7c8a19df70dd544cf5c224f607410d" + sha256 cellar: :any_skip_relocation, sonoma: "25dbc8e783e9558de958fca4a5b88ed4d00be16633762117ab966d5c78a9918d" + sha256 cellar: :any_skip_relocation, ventura: "d404a32e21f3a5e5bdc86f316afc0577e21605db9fa4af30a6d26dc28ccf4e21" + sha256 cellar: :any_skip_relocation, arm64_linux: "aff64375ab227d6ce03b552d0cf448d8fd5c6bdb422832788b5534fc652ff9db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ebd32bd548797fff9f1d3d66d72941a6bf61fead384f965fded846449fd490f" + end + + depends_on "python@3.13" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/f0/3c/adaf39ce1fb4afdd21b611e3d530b183bb7759c9b673d60db0e347fd4439/beautifulsoup4-4.13.3.tar.gz" + sha256 "1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b" + 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 "certifi" do + url "https://files.pythonhosted.org/packages/1c/ab/c9f1e32b7b1bf505bf26f0ef697775960db7932abeb7b516de930ba2705f/certifi-2025.1.31.tar.gz" + sha256 "3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/5b/8c/4f2f0784d08a383b5de3d3b1d65a6f204cc5dc487621c91c550388d756af/humanize-4.12.1.tar.gz" + sha256 "1338ba97415c96556758a6e2f65977ed406dddf4620d4c6db9bbdfd07f0f1232" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/ee/c0/53a2f017ac5b5397a7064c2654b73c3334ac8461315707cbede6c12199eb/patch-ng-1.18.1.tar.gz" + sha256 "52fd46ee46f6c8667692682c1fd7134edc65a2d2d084ebec1d295a6087fc0291" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + resource "py7zr" do + url "https://files.pythonhosted.org/packages/26/c3/0e05c711c16af0b9c47f3f77323303b338b9a871ba020d95d2b8dd6605ae/py7zr-0.22.0.tar.gz" + sha256 "c6c7aea5913535184003b73938490f9a4d8418598e533f9ca991d3b8e45a139e" + end + + resource "pybcj" do + url "https://files.pythonhosted.org/packages/bf/69/3f4ce9d4c79f6ddf6bf60af873f65605123a0e8cd13159f8531a9cb81710/pybcj-1.0.3.tar.gz" + sha256 "b8873637f0be00ceaa372d0fb81693604b4bbc8decdb2b1ae5f9b84d196788d9" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/ba/d5/861a7daada160fcf6b0393fb741eeb0d0910b039ad7f0cd56c39afdd4a20/pycryptodomex-3.22.0.tar.gz" + sha256 "a1da61bacc22f93a91cbe690e3eb2022a03ab4123690ab16c46abb693a9df63d" + end + + resource "pyppmd" do + url "https://files.pythonhosted.org/packages/42/8e/06581a619ad31cd28fd897bd55aff2ea945d3d566969b8b3f682599e6dee/pyppmd-1.1.1.tar.gz" + sha256 "f1a812f1e7628f4c26d05de340b91b72165d7b62778c27d322b82ce2e8ff00cb" + end + + resource "pyzstd" do + url "https://files.pythonhosted.org/packages/62/14/878fee4072cecb1cc6e061c7d0d933e481389c27de939538c9cc3f18894a/pyzstd-0.16.2.tar.gz" + sha256 "179c1a2ea1565abf09c5f2fd72f9ce7c54b2764cf7369e05c0bfd8f1f67f63d2" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + virtualenv_install_with_resources + 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..fbbf185e4b6d0 --- /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.51.2.tar.gz" + sha256 "00c8750d56000555a489b97d073077bfaaade18ac2c308a28b7b336e242f065e" + 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_sequoia: "41f94149f7b10784db9f353a2faa2d680c93cafa344e1a24bf686be8c39bee17" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "41f94149f7b10784db9f353a2faa2d680c93cafa344e1a24bf686be8c39bee17" + sha256 cellar: :any_skip_relocation, arm64_ventura: "41f94149f7b10784db9f353a2faa2d680c93cafa344e1a24bf686be8c39bee17" + sha256 cellar: :any_skip_relocation, sonoma: "39140c57a91682d020ca3365b7425d68d00a66659e5da70ca4e1e90323136b44" + sha256 cellar: :any_skip_relocation, ventura: "39140c57a91682d020ca3365b7425d68d00a66659e5da70ca4e1e90323136b44" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b52321eec81612465a3c72ea0e541787125af69c3ae78f27aefd2adc47e3f897" + 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..81a71586b9830 --- /dev/null +++ b/Formula/a/arabica.rb @@ -0,0 +1,58 @@ +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 + + bottle do + 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, mojave: "acc299016dbd644658880e9fa29af6d3f0b9f8e226b16ccd3fcaea8dae23febf" + sha256 cellar: :any, high_sierra: "62920d4f26c2da71c6abf60c90c1322457e340df8142d7133a9ee1f7c2b46745" + 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/arangodb.rb b/Formula/a/arangodb.rb new file mode 100644 index 0000000000000..029f3e77a125f --- /dev/null +++ b/Formula/a/arangodb.rb @@ -0,0 +1,162 @@ +class Arangodb < Formula + desc "Multi-Model NoSQL Database" + homepage "https://arangodb.com/" + url "https://download.arangodb.com/Source/ArangoDB-3.10.4.tar.bz2" + sha256 "bc9cfaac5747995a6185d2cfea452b9fea8461bf91d2996dd75af75eef3cfddd" + license "Apache-2.0" + head "https://github.com/arangodb/arangodb.git", branch: "devel" + + bottle do + sha256 arm64_ventura: "53afa49b9a2e4848ca33ea0933a521b50a43b36849d2c5fea08443034dd8d778" + sha256 arm64_monterey: "7cd65f1950e1f3a469a0978fec85f76ff2de404b17abca40d55945806e7de59d" + sha256 arm64_big_sur: "c9249d113644c8c19d4fe4a94631a9dcc3c41d4130ec7d1aa16caf8b25574e33" + sha256 ventura: "5f4b3a814c2a756c42c711b272c36aa8a651dd6bc2b4adbfae5a568962b582eb" + sha256 monterey: "a2a85d8865eaee4b53a58de0698fad4ef52639dbad12527f212390a865b1e034" + sha256 big_sur: "1e869c623de4995794d0da8c759300cb6df35d5f12160d4aece1bbe31dfcf56d" + sha256 x86_64_linux: "7c80cd9f061e99a34be19691bb039015a10c231892c3e13e6af7e0d2377c0fa6" + end + + # Vendors deps, has a low download count, build always breaks + # https://github.com/Homebrew/homebrew-core/pull/135487#issuecomment-1616018628 + disable! date: "2024-07-05", because: :does_not_build + + depends_on "cmake" => :build + depends_on "go" => :build + depends_on "python@3.11" => :build + depends_on macos: :mojave + depends_on "openssl@1.1" + + on_macos do + depends_on "llvm" => :build + end + + on_linux do + depends_on "gcc@10" => :build + end + + fails_with :clang do + cause <<~EOS + .../arangod/IResearch/AqlHelper.h:563:40: error: no matching constructor + for initialization of 'std::string_view' (aka 'basic_string_view') + std::forward(visitor)(std::string_view{prev, begin}); + ^ ~~~~~~~~~~~~~ + EOS + end + + # https://github.com/arangodb/arangodb/issues/17454 + # https://github.com/arangodb/arangodb/issues/17454 + fails_with gcc: "11" + + # https://www.arangodb.com/docs/stable/installation-compiling-debian.html + fails_with :gcc do + version "8" + cause "requires at least g++ 9.2 as compiler since v3.7" + end + + # the ArangoStarter is in a separate github repository; + # it is used to easily start single server and clusters + # with a unified CLI + resource "starter" do + url "https://github.com/arangodb-helper/arangodb.git", + tag: "0.15.7", + revision: "0cd043932e6c6f2bd9dc0391ea0313c304b3ca9d" + end + + def install + arch = if Hardware::CPU.arm? + "neon" + elsif !build.bottle? + # Allow local source builds to optimize for host hardware. + # We don't set this on ARM since auto-detection isn't supported. + "auto" + elsif Hardware.oldest_cpu == :core2 + # Closest options to Homebrew's core2 are `core`, `merom`, and `penryn`. + # `core` only enables up to SSE3 so we use `merom` which enables up to SSSE3. + # As -march=merom doesn't exist in GCC/LLVM, build will fall back to -march=core2 + "merom" + else + Hardware.oldest_cpu + end + + cmake_args = std_cmake_args + %W[ + -DHOMEBREW=ON + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DCMAKE_INSTALL_LOCALSTATEDIR=#{var} + -DCMAKE_INSTALL_SYSCONFDIR=#{etc} + -DOPENSSL_ROOT_DIR=#{Formula["openssl@1.1"].opt_prefix} + -DTARGET_ARCHITECTURE=#{arch} + -DUSE_GOOGLE_TESTS=OFF + -DUSE_JEMALLOC=OFF + -DUSE_MAINTAINER_MODE=OFF + ] + + if OS.mac? + ENV.llvm_clang + + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version + cmake_args << "-DCMAKE_OSX_DEPLOYMENT_TARGET=#{MacOS.version}" + + # Fix building bundled boost with newer LLVM by avoiding removed `std::unary_function`. + # .../boost/1.78.0/boost/container_hash/hash.hpp:132:33: error: no template named + # 'unary_function' in namespace 'std'; did you mean '__unary_function'? + ENV.append "CXXFLAGS", "-DBOOST_NO_CXX98_FUNCTION_BASE=1" + end + + resource("starter").stage do + ldflags = %W[ + -s -w + -X main.projectVersion=#{resource("starter").version} + -X main.projectBuild=#{Utils.git_head} + ] + system "go", "build", *std_go_args(ldflags:) + end + + system "cmake", "-S", ".", "-B", "build", *cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def post_install + (var/"lib/arangodb3").mkpath + (var/"log/arangodb3").mkpath + end + + def caveats + <<~EOS + An empty password has been set. Please change it by executing + #{opt_sbin}/arango-secure-installation + EOS + end + + service do + run opt_sbin/"arangod" + keep_alive true + end + + test do + require "pty" + + testcase = "require('@arangodb').print('it works!')" + output = shell_output("#{bin}/arangosh --server.password \"\" --javascript.execute-string \"#{testcase}\"") + assert_equal "it works!", output.chomp + + ohai "#{bin}/arangodb --starter.instance-up-timeout 1m --starter.mode single" + PTY.spawn(bin/"arangodb", "--starter.instance-up-timeout", "1m", + "--starter.mode", "single", "--starter.disable-ipv6", + "--server.arangod", "#{sbin}/arangod", + "--server.js-dir", "#{share}/arangodb3/js") do |r, _, pid| + loop do + available = r.wait_readable(60) + refute_equal available, nil + + line = r.readline.strip + ohai line + + break if line.include?("Your single server can now be accessed") + end + ensure + Process.kill "SIGINT", pid + ohai "shutting down #{pid}" + end + end +end diff --git a/Formula/a/aravis.rb b/Formula/a/aravis.rb new file mode 100644 index 0000000000000..a8c708a771505 --- /dev/null +++ b/Formula/a/aravis.rb @@ -0,0 +1,80 @@ +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_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..49044570ea326 --- /dev/null +++ b/Formula/a/arcade-learning-environment.rb @@ -0,0 +1,115 @@ +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.0.tar.gz" + sha256 "300717009d18c784bf4b407f608e269d7c87e40769c277206230011352e65b97" + license "GPL-2.0-only" + head "https://github.com/Farama-Foundation/Arcade-Learning-Environment.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sonoma: "191b6685efed5b2ba30b0d6202cc72c587baf4d634f574282af9938c1bf91c23" + sha256 cellar: :any, arm64_ventura: "b5a2ca6b560a54dabeb2007590d593d909c6f0b06f58bd9f8d4beda70f49b27e" + sha256 cellar: :any, sonoma: "869f084d4552b4eeea0a87c7dfbf170c2ba0a44f6a7d21efbfc78f8c539c4e7b" + sha256 cellar: :any, ventura: "ff92a17a39e49b0b9e52d65b6e691a48d5ff37d5aac4b4949566a7b6dc627456" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61ae2d9e4d3527b8ef0f8dd070b00cd09aaddb1d5eebe2ae8296ee33266eecaf" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "pybind11" => :build + depends_on "python-packaging" => :build + depends_on "python-setuptools" => :build + depends_on macos: :catalina # requires std::filesystem + depends_on "numpy" + depends_on "opencv" + depends_on "python@3.13" + depends_on "sdl2" + + uses_from_macos "zlib" + + # 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 "gymnasium" do + url "https://files.pythonhosted.org/packages/90/69/70cd29e9fc4953d013b15981ee71d4c9ef4d8b2183e6ef2fe89756746dce/gymnasium-1.1.1.tar.gz" + sha256 "8bd9ea9bdef32c950a444ff36afc785e1d81051ec32d30435058953c20d2456d" + end + + def python3 + "python3.13" + end + + def install + resource("gymnasium").stage do + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + + 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 + + # error: no member named 'signbit' in the global namespace + inreplace "setup.py", "cmake_args = [", "\\0\"-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_path}\"," if OS.mac? + system python3, "-m", "pip", "install", *std_pip_args, "." + + # Replace vendored `libSDL2` with a symlink to our own. + libsdl2 = Formula["sdl2"].opt_lib/shared_library("libSDL2") + vendored_libsdl2_dir = prefix/Language::Python.site_packages(python3)/"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..a5018291a467b --- /dev/null +++ b/Formula/a/archey4.rb @@ -0,0 +1,41 @@ +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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "67a20d46c2fe1dbb51cb872d3d4ebb5342aabfda48a7cfbe915c17ad948969e4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "51d8ab649cfb4d5dfeb23231753d9262cfa033f2c1643f0a219564a3f9832d5c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2744766739856ebe780fc7388965edc612d51923c3c765033cf87ace0b0b12e4" + sha256 cellar: :any_skip_relocation, sonoma: "4154cfde5e161ec534f03d72f49537da940a41ef4009fce5172f07acc3ee88b5" + sha256 cellar: :any_skip_relocation, ventura: "cd489ed03f68abd8a88be37ea82d00cc426d3d5feabaf0b68eeda977b7da3d88" + sha256 cellar: :any_skip_relocation, arm64_linux: "9477e1961d10803b128e9685f28fb196d08d2bcebff10b558d6ebda403e25d25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "970c7db826029c191477ba09e3a7b3288e80aee797ababba472b22d9b3a483ac" + end + + depends_on "python@3.13" + + 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/archi-steam-farm.rb b/Formula/a/archi-steam-farm.rb new file mode 100644 index 0000000000000..cf5dc148faa0c --- /dev/null +++ b/Formula/a/archi-steam-farm.rb @@ -0,0 +1,72 @@ +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.1.5.2", + revision: "868d593c5c6115b8484771a9eb5c4ff2b5840719" + 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_sequoia: "d5ed61828efd8fe97c2ba8061315ea8d21f5ca98008b6c8c965e5452d5057f25" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bd9bb90ddac74429a62a2ec86e5387f77e1085b1e000f29dbe0392df0b6f85d1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "66634a8d7e971b0c0f156a024d934ad374761a4b87b8ca5c2b7deb8281cd14f6" + sha256 cellar: :any_skip_relocation, ventura: "a4d1b79b195ba95e7d6dea52b666b8e8ce8f8c2ff952a89aac97036ee9fd8f2e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a933d5860142aad96c86565b30319191d085b79f499e1588a2dc884421a689c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1894fe0667f2c19dece079ef2895830e4dfdee6ab7f15651d0d6d0e36a014b78" + 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..66d9d8b625c47 --- /dev/null +++ b/Formula/a/archivemount.rb @@ -0,0 +1,32 @@ +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 + + 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..eee8415855691 --- /dev/null +++ b/Formula/a/archiver.rb @@ -0,0 +1,53 @@ +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_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, 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..a25cf8e9687d7 --- /dev/null +++ b/Formula/a/arduino-cli.rb @@ -0,0 +1,43 @@ +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.2.2.tar.gz" + sha256 "c999f61e23c253d567f49c20ac4dc5d4e3187515dc7e1a42ac0482cb7124730a" + 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_sequoia: "2a608c9576803a752c6fad9769438ac81746dc5c7ebb57e374f90e85ee324ff7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7118a669115eff71a26d4e1b7606e3675aa20e08341005e161f468a1c8d118a9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4c9fd8b3d73e37dc19802dac51184600a87e076765e3d992a670c4ac6bd6c1e2" + sha256 cellar: :any_skip_relocation, sonoma: "ace58a00634d583f8c3f4935325920681fbcf046bd0f1e2da3983d66aa33a666" + sha256 cellar: :any_skip_relocation, ventura: "6f85fe13dbaa8d27f391c537f8db32b037788e4ba03cd64118898f36355406fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d364c4c804b7798d8540289ac5872b157c958762e1feca8f5d83b04c2cba4681" + 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..9629b9891e150 --- /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.2.tar.gz" + sha256 "9b2f0013ccb00667b79e7ef65e8d0e97fb996cc1a3d0b98489dccbc97e003f0f" + license "MIT" + head "https://github.com/makiuchi-d/arelo.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8998f272c4bf308c307d4437077ea5a524eaa0f6e13415f95033fa4f9d8a1da5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8998f272c4bf308c307d4437077ea5a524eaa0f6e13415f95033fa4f9d8a1da5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8998f272c4bf308c307d4437077ea5a524eaa0f6e13415f95033fa4f9d8a1da5" + sha256 cellar: :any_skip_relocation, sonoma: "7cf59394f7a1b29624a3ce23622b25f9343467b738b3086f580c66ca50f3985c" + sha256 cellar: :any_skip_relocation, ventura: "7cf59394f7a1b29624a3ce23622b25f9343467b738b3086f580c66ca50f3985c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb4876ce285bfd79b2e75ffd5ffbcab215566d42afa135294bfd6ef2b5f21e06" + 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..3b000be746c1b --- /dev/null +++ b/Formula/a/ares.rb @@ -0,0 +1,39 @@ +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/v0.10.0.tar.gz" + sha256 "d951302b572ed0786c366762b430d0d37479be8649b16122548ece1ea0a28900" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6b698cc90e5f474391cb7a574b84ba9a3c9d4e70f4de900676375856a58408a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3d2827a8036416c4adba83c9a6fd43eeddf76f6bd7902107ab728cf3369d3d90" + sha256 cellar: :any_skip_relocation, arm64_ventura: "97a85bf81a02c6a8264a4ea153adc2190d2da0d88920a6f789e38605ffd3cee4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c2bcc31382c5987f72cc62f942178fd2048d7d4acc71e94b36e15f9e77fc2e8d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9bc8074875bad6f69b3a3caa03a53c42639905b9d755b58d3c9d81519c5c1b49" + sha256 cellar: :any_skip_relocation, sonoma: "64ff6858a4170c60665df77f5d3b7ef643a4c91f7e870da9cbfb3599cb196514" + sha256 cellar: :any_skip_relocation, ventura: "2ef2937082a01200c25fc1d61f1fdc91029bd443dbc8ee44f0b1b843f8c3adee" + sha256 cellar: :any_skip_relocation, monterey: "38bdef4ea6190bb5107cc2f42924b9b5aafcfbf0a7d8b1af0f68088076c58c66" + sha256 cellar: :any_skip_relocation, big_sur: "148415168b096df8c5c39e14f6f68727331a3793073a122992e020568d5d87a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "d44d38b5f09547f5ef9891e76a883ed8a9dc1ab1a55b688a7ce34993c4550fac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d8628ee2e4ccb9ff40faedc01fff88f8ab4e7154d3a8573ba4d8b7dc7bb106e" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + input_string = "U0dWc2JHOGdabkp2YlNCSWIyMWxZbkpsZHc9PQ==" + expected_text = "Hello from Homebrew" + assert_includes shell_output("#{bin}/ares -d -t #{input_string}"), expected_text + end +end diff --git a/Formula/a/argc.rb b/Formula/a/argc.rb new file mode 100644 index 0000000000000..80f53ed286eed --- /dev/null +++ b/Formula/a/argc.rb @@ -0,0 +1,31 @@ +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.22.0.tar.gz" + sha256 "b073e531baad204abf432b53c4f94633c80a791337f141d2daba96fe58d81af8" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "406229470a3119b585dd79be1641eb76728a7798b1c2ac99c9665002ef8991ce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ab377dc8d4d29efc0e8cc6b31b9dcc68d75eb8675b2874203655d29988f76726" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d1cb6bcf3f4fc8e1605a0a0168540c1c479e74438fb7ce06042d03c95db13513" + sha256 cellar: :any_skip_relocation, sonoma: "1082016dc1b5cd67f53e9f0f8d229af480589ebee30cfaf39ed60356b4d9a53b" + sha256 cellar: :any_skip_relocation, ventura: "3703333faaf342d97acfbbb967b2c200ef04596e067ed11073d7bdbc82084140" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7d3ef416c74007a1b825942b6e49506cbcd02f5d72fee60c1eab75e63b8c3b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca825947ca8c6727d761495478f176069057a41ce6a8cae4a3de3bb279fd73a1" + 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..0220eb5bfe977 --- /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.6.7", + revision: "8d7dae690e152d19fb40f7affbb68fb783b32172" + license "Apache-2.0" + head "https://github.com/argoproj/argo-workflows.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ae0badfaa2569725227a209bd8d816ecaac709964b1cee11ad6a8bc5b35b4645" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "db320d07bcae2511f368d9e414a4913d546b5f148db218fb2c6c0c0e631153de" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fbe8b52bf7397c4126cbcf1336fd2c5f7dc709dd7dae09ae2b64b96c34111899" + sha256 cellar: :any_skip_relocation, sonoma: "f7e0991e5c6bb4ef7ae9a9702f998efcb1b530c6378862bc42f7edd5ad5bf63f" + sha256 cellar: :any_skip_relocation, ventura: "844517c65d733d6ddaba2e41705137e20cf3be6f382d473f98efb9a3d7faedad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "31355ca96b8e750bf985c6c265ccaed458399ba22ac67b2c1f140e729aaf4838" + 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..3b146288409bd --- /dev/null +++ b/Formula/a/argocd-autopilot.rb @@ -0,0 +1,35 @@ +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.19", + revision: "5219caa2c688061b88ea5eee0aef9f97e3f62f25" + license "Apache-2.0" + head "https://github.com/argoproj-labs/argocd-autopilot.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b8f1cb49d25c8f73c078698833d5462a9162ce5233ce3795cf951b1e800976e9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c18e73d1d74fc4408d3a1f22889710c4c470cab2f46435db86713d25dfea79a2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "86ecca72b084f402b6d72f5f659ae0bf100f1a8506dae55363f09ff809e2b65d" + sha256 cellar: :any_skip_relocation, sonoma: "58b12c996a20911d6174f8fc99fe919554a134f85e43d76f93c8791233dba4c3" + sha256 cellar: :any_skip_relocation, ventura: "5772f0f301054b0b0c204ead7da928d6788f7578e4c10e093899ba08489d9352" + sha256 cellar: :any_skip_relocation, arm64_linux: "edddade7e4b925030eec21764ec57a5728ea3af1ffa51bc973e4e10ccb2ae71b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c5886967e8b28bff08bf56c4d7d251ff2c7a7ac7dac38fa74561db77777ae93" + 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..c524e5774952e --- /dev/null +++ b/Formula/a/argocd-vault-plugin.rb @@ -0,0 +1,46 @@ +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_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..9e2109e71a65c --- /dev/null +++ b/Formula/a/argocd.rb @@ -0,0 +1,58 @@ +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.0.1", + revision: "2bcef4877285db808e47b862567b278c3793d056" + 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_sequoia: "6ae7912d85c319c7527bcb0656776ba920673b0b97f07338403f3451fec2ff43" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26c40b390482c38621fe1ccf00f59958fc5130b5dc42cd8d8c337cabce4171b0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "31d5978a7a74d9f41c28df8f9935fbaee44e71dcce95f29a92069b0e5750b24c" + sha256 cellar: :any_skip_relocation, sonoma: "8866aeb60be6ee0a02d6c140f47a62bb189c99856b17188c54d86c46d5e633d9" + sha256 cellar: :any_skip_relocation, ventura: "7472ed08c49c647bf8357d38d0515445a0135a0e35ec50768dca17d38ab7d261" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b4405d472692d404ff08d064d962f32b55396a97e27ddcc5e32703f13cfcc7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9b66620c7be3a2d460ce2bf21c88b9cd5d7dea6f10d5fcdb6197f6c3c945f92" + 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..7efc9187c66e7 --- /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" + + bottle do + 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, mojave: "a76192a41826619fc399e7f6de5e6cb1c8a5fbe6bea4f2c1554daa830fa0e296" + sha256 cellar: :any, high_sierra: "830016982e60870f50b3f6fc9a215d8cc4bda6061595f4883f7c11ab19ecba39" + sha256 cellar: :any, sierra: "21889ac6ed40c792f1b372b5aa0d6b3be1be86577a4c1b06b08569124d2d0da2" + 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..39d680ce56ac3 --- /dev/null +++ b/Formula/a/argp-standalone.rb @@ -0,0 +1,45 @@ +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 + ] + + bottle do + 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..8c1ca918b443a --- /dev/null +++ b/Formula/a/argtable.rb @@ -0,0 +1,71 @@ +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" + + bottle do + 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, mojave: "61ec2ac4b9e65f7965931dfd983848fae06130686c4f800eb9341f96a6f6d398" + sha256 cellar: :any, high_sierra: "e68b3df66d638a024c3b57b069bcdebfbdabb230a9c851de886321c2b3df7099" + sha256 cellar: :any, sierra: "9485d1e045ed40c0145eb867f9d24425ccedd53b4f0cb0ec949139b0c99507c7" + sha256 cellar: :any, el_capitan: "0a720e738557215bf1b58fa642ec2fc51971da38e98b987862fcd05cc54756f7" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..c384c1324ed3b --- /dev/null +++ b/Formula/a/argtable3.rb @@ -0,0 +1,62 @@ +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.2.2.f25c624.tar.gz" + version "3.2.2" + sha256 "a5c66d819fa0be0435f37ed2fb3f23e371091722ff74219de97b65f6b9914e51" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "977cc6d2b39d50551e00be1cb664891ba886e3e63779769713815ab5c830d4f7" + sha256 cellar: :any, arm64_sonoma: "59140a12791b4cd3733fd383bbd91373d517ed6a22dded4ae9e74b8fd2039844" + sha256 cellar: :any, arm64_ventura: "baa86eebd002149a8653eb04d365be6b4526551c7ae43cbf9753642093bad9e7" + sha256 cellar: :any, sonoma: "ab5266a8ad714236feda7b450da27138538019d765fd7311d613596cd9a82140" + sha256 cellar: :any, ventura: "b88c3b8acd8fe222ddadd092036daabe726784c2583e2665da98188af700b669" + sha256 cellar: :any_skip_relocation, arm64_linux: "6651b1d66020b8752956e2d278c447bbbee872f09db99828c81dbd75817c08c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1582d82a062451b9b81bd1739f541876e41b2c821b274aba6a51f9d3009ac7a5" + 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..f35070db0004f --- /dev/null +++ b/Formula/a/argus-clients.rb @@ -0,0 +1,62 @@ +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_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..50ae5be6c2991 --- /dev/null +++ b/Formula/a/argus.rb @@ -0,0 +1,44 @@ +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_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..5e9a31621cd86 --- /dev/null +++ b/Formula/a/argyll-cms.rb @@ -0,0 +1,123 @@ +class ArgyllCms < Formula + desc "ICC compatible color management system" + homepage "https://www.argyllcms.com/" + url "https://www.argyllcms.com/Argyll_V3.3.0_src.zip" + sha256 "69db1c9ef66f8cacbbbab4ed9910147de6100c3afd17a0a8c12e6525b778e8ce" + 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 + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "c6eaa8f9f20129203c4ad4f8e536c0f8046a8c1f8376ecc2eb3e5ac4cd230b21" + sha256 cellar: :any, arm64_sonoma: "6144869b77d490945df7d2e207baa71dbb7034a3dc914f00a71733f00956e58d" + sha256 cellar: :any, arm64_ventura: "c2a6ef0092b8b2ace04571ded3efee5e4fd39bdef7aaa2762deb1651de3389c0" + sha256 cellar: :any, sonoma: "6836561552f12daecbe3f808ac50e58588d402036c242d0b5b21ac7620773118" + sha256 cellar: :any, ventura: "e85f428eeb690ac25daf20b991f3b9c3fbeb3f53cc276fb2b7a031cff835c5ac" + sha256 arm64_linux: "03a6e4bd49c1a92adf66999ac471f5c014cab3cf4792c43e57832115f4a5487a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "76bf52c81646502007e8bb73fb1d247c0789d2d2aad4ffff41023f060f000fb1" + 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/formula-patches/cf70f015e7398796660da57212ff0ab90c609acf/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" + 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..ade5d2ff4c4f5 --- /dev/null +++ b/Formula/a/aria2.rb @@ -0,0 +1,61 @@ +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" + + bottle do + 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..23ff41ec7d229 --- /dev/null +++ b/Formula/a/aribb24.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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..e80b14d314311 --- /dev/null +++ b/Formula/a/arjun.rb @@ -0,0 +1,60 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, all: "3c27e0658509ce22d7f7b8cd626c203f2b024f2228bdf476891d9bf987101630" + end + + depends_on "certifi" + depends_on "python@3.13" + + def python3 + "python3.13" + 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 "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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..e71ee6e9da2c0 --- /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.38.tar.gz" + sha256 "92ba8fb2553c7e822935d1a12c2a0fda35440c061838a42bcd400b820ef2336e" + 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_sequoia: "3a452f0267606c8bac21d1e24b4c31b0d8ebf1579abfc109a4f7b93ad757ba0d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3a452f0267606c8bac21d1e24b4c31b0d8ebf1579abfc109a4f7b93ad757ba0d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3a452f0267606c8bac21d1e24b4c31b0d8ebf1579abfc109a4f7b93ad757ba0d" + sha256 cellar: :any_skip_relocation, sonoma: "b0113b92887eb011bc8cf7f865f2bdc81cd7593971af00874b25fab1fb18d11b" + sha256 cellar: :any_skip_relocation, ventura: "b0113b92887eb011bc8cf7f865f2bdc81cd7593971af00874b25fab1fb18d11b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a39722e9eb5c0b9fafc0d3c8eb83f87077b7bea1263dc977adf43cf5174375b" + 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..b540b35f7176a --- /dev/null +++ b/Formula/a/arm-linux-gnueabihf-binutils.rb @@ -0,0 +1,61 @@ +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.44.tar.bz2" + mirror "https://ftpmirror.gnu.org/binutils/binutils-2.44.tar.bz2" + sha256 "f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_sequoia: "efa4af7fe2a1f1af0532a7eba01be51b606d532428364e57abefa1e0c5251b05" + sha256 arm64_sonoma: "f8c07d9d101a620317cf2b25f6544a9faa9e59756645dd1a252dd4f3b404e492" + sha256 arm64_ventura: "85c571a268fffa11b63163d14d3531e226c30a012e9dfeaf05cd0f0702528617" + sha256 sonoma: "a5122cdafdf344088a2a34974e209a9c87a54c99f17bee9ae84119b0a6e31a82" + sha256 ventura: "b5d1a4cacf725353dd20a829c3f79a41803b1d680d58b7db77c3ae526a0ed7e0" + sha256 arm64_linux: "4ae1d9653da02773fb59e33fea7fefc3071fcc35bae702b4c906ef8031d49362" + sha256 x86_64_linux: "3af94c9946af90084949b00786c4273721977bc466bc69a24c515b4b18d15d50" + 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..ccf44b3590fb7 --- /dev/null +++ b/Formula/a/arm-none-eabi-binutils.rb @@ -0,0 +1,61 @@ +class ArmNoneEabiBinutils < Formula + desc "GNU Binutils for arm-none-eabi cross development" + homepage "https://www.gnu.org/software/binutils/" + url "https://ftp.gnu.org/gnu/binutils/binutils-2.44.tar.bz2" + mirror "https://ftpmirror.gnu.org/binutils/binutils-2.44.tar.bz2" + sha256 "f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_sequoia: "06af07de6ca093b334bd87f2de88a263448611f253d0d0c31bd557ec386bec36" + sha256 arm64_sonoma: "932c45d6ec8c2449242f9b32f4cc75ec90b295c1af2cdc02d3a2bfa1a79e7156" + sha256 arm64_ventura: "2d2236dc183c21ce0adcfaf0abae65bc05edc5583c7c48b3fad228fd69202652" + sha256 sonoma: "cf3bfab0f48125c69f6c2166ac1bd69c2c045c163bda75115b1da0ca13d7750a" + sha256 ventura: "7862fb7e8858483cbbb8b11d5ba4e513f89e978ac595314ce2a70dfdbb15d1de" + sha256 arm64_linux: "7d5f1e23b43b2d56be4ecc2901ad686bcfc1cf71fdb40c8e0c9a43df2a896219" + sha256 x86_64_linux: "0eec589c7c132355e1a5c1ce1a033cad808510ff880d5be743e1d762a1fc77fd" + 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..1ae810ff0e2e7 --- /dev/null +++ b/Formula/a/arm-none-eabi-gcc.rb @@ -0,0 +1,72 @@ +class ArmNoneEabiGcc < Formula + desc "GNU compiler collection for arm-none-eabi" + homepage "https://gcc.gnu.org/" + url "https://ftp.gnu.org/gnu/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + mirror "https://ftpmirror.gnu.org/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + sha256 "e2b09ec21660f01fecffb715e0120265216943f038d0e48a9868713e54f06cea" + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + + livecheck do + formula "gcc" + end + + bottle do + sha256 arm64_sequoia: "950ae88a2bb16979dfa0139e7476eb2fc80bc692ad880bbf092d0d6bcf0cc3a9" + sha256 arm64_sonoma: "47b7f8ed2c0cd6acc7ee8d1366a52a607a632e80a477cd6da44b10e7cf5a8fcd" + sha256 arm64_ventura: "05bc9cc7feae5565e586d4325c7bc6ca13dee9b19c1bcf4f5ba4f8a818156154" + sha256 sonoma: "8102ba85c7ceb1e6f605148f68669bd81236a82b08606a6da7dd2d69ec931295" + sha256 ventura: "b8e540b02d053d17c6e1352e51fb8aa5e54b11d0058ae8a6ef7a8806a1e09614" + sha256 arm64_linux: "cb6c669ab813b488687953d87444b9058865ab06104bf8414a6ad5658058618d" + sha256 x86_64_linux: "d3de23e3829393072a929e402287b15ad48bf56962ebbdf57a933d288781e6da" + 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..20ca922afc748 --- /dev/null +++ b/Formula/a/arm-none-eabi-gdb.rb @@ -0,0 +1,75 @@ +class ArmNoneEabiGdb < Formula + desc "GNU debugger for arm-none-eabi cross development" + homepage "https://www.gnu.org/software/gdb/" + url "https://ftp.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + mirror "https://ftpmirror.gnu.org/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 + + bottle do + sha256 arm64_sequoia: "54bb4fd38fdd0c2e6b322d6ea7f05a9e101509e774b906a2048cc5a0a6df5b84" + sha256 arm64_sonoma: "fb92c479ff811cc52de43c83059cbfddbcdc397e39c6e79bcdafd8ac3034ef34" + sha256 arm64_ventura: "86d36e5462f353f30a107d3e8ad067018573559d1cf6194c54826ea90d72400f" + sha256 sonoma: "ffddd2a96ef21bca9ca6064924f3a447a8b6eb663572bb57e587f1e772fd2cf9" + sha256 ventura: "bcd01adedff4f680b76b82704de6f09eb1e299c26fd4e45ab3deb377a50088cc" + sha256 arm64_linux: "ad9c74395a546cbe50b8bed7aa3382218326b3e1cfaa8c486d50b7de76c6f27d" + sha256 x86_64_linux: "9152a2b777ee25f0aace40a118467eccaed53cfdf8ba171d304c6751606812a9" + end + + depends_on "arm-none-eabi-gcc" => :test + depends_on "gmp" + depends_on "mpfr" + depends_on "python@3.13" + depends_on "xz" # required for lzma support + + uses_from_macos "expat", since: :sequoia # minimum macOS due to python + uses_from_macos "ncurses" + 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} + --with-lzma + --with-python=#{Formula["python@3.13"].opt_bin}/python3.13 + --with-system-zlib + --disable-binutils + ] + + 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..0e9dc2fa6e5b0 --- /dev/null +++ b/Formula/a/armadillo.rb @@ -0,0 +1,46 @@ +class Armadillo < Formula + desc "C++ linear algebra library" + homepage "https://arma.sourceforge.net/" + url "https://downloads.sourceforge.net/project/arma/armadillo-14.4.2.tar.xz" + sha256 "6dfddcfbd91e70679d7c11e94a5963a7efda002fec351e6f4875ac8e245c5117" + license "Apache-2.0" + + livecheck do + url :stable + regex(%r{url=.*?/armadillo[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5a4c62a61f6c9ebf9d6df1aed9299c9ac496f67d22fa801021580a98f18a757f" + sha256 cellar: :any, arm64_sonoma: "12abd91318b767e5b3f06a086a7fa5bd0ebb8627382b6783cd750be987239175" + sha256 cellar: :any, arm64_ventura: "ee00d2190e28f52f572645cd698bff73690f44a05d124610f53c3b4c0fe9a201" + sha256 cellar: :any, sonoma: "fce7394c80252b4026300a498090df74c31c166907fcfa0d99ac6e36f90ee991" + sha256 cellar: :any, ventura: "79a8e27963c3123e2fde50be489263b6222eff42b930e68238857b824d8116a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "9253e78f3ac7ef9e5a21c33857cfd1ba3ec1e6c18826da5a12947eec3074da63" + sha256 cellar: :any_skip_relocation, x86_64_linux: "635b61051983a0c1dfb3e4463c4ba34f511ee5ca35638531c5845f0514c55cec" + 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++11", "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.rb b/Formula/a/arp-scan.rb new file mode 100644 index 0000000000000..d7d93090c4d91 --- /dev/null +++ b/Formula/a/arp-scan.rb @@ -0,0 +1,40 @@ +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_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" + + 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..9e305cf67644e --- /dev/null +++ b/Formula/a/arp-sk.rb @@ -0,0 +1,45 @@ +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, mojave: "cbe02395698a24f9f835b7cba4128a308a15beefda6ad7e79cfd38d73823cdc2" + sha256 cellar: :any, high_sierra: "67666cd80446c78b49deac3b8f2589ccbd140f32b739b662556a6dc7bda7b453" + 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..f6202e7edd014 --- /dev/null +++ b/Formula/a/arpack.rb @@ -0,0 +1,55 @@ +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" + + bottle do + 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 + ENV.fortran + args = (OS.mac? && MacOS.version >= :sequoia) ? ["-O2"] : [] + system ENV.fc, *args, "-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..b9fc116f19f92 --- /dev/null +++ b/Formula/a/arping.rb @@ -0,0 +1,36 @@ +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.25.tar.gz" + sha256 "96f86d0d317c9d09eda183c2f1b7590102ee1798264241377c26bed8bdc0c623" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "73cb4e287549fd6085cdb4e8d3804ee4e0a9559f1cfd64ad54e53f74eaf63937" + sha256 cellar: :any, arm64_sonoma: "3d35ded0256f623d42b3f2e38bc998211432b1b779a60d6f4433de1398c9600b" + sha256 cellar: :any, arm64_ventura: "87d1d118843ce11929fa19841c739b1e0191f435d08d7583c9a7115942afc454" + sha256 cellar: :any, arm64_monterey: "537f0fbf6282e143e13cecb4180d3e62450609c53d4ff0eac8e178ae37a2517b" + sha256 cellar: :any, sonoma: "9188b61bf686f9d25a1fe4739546e390295a0661b0e73c0814a3f12c0f87d757" + sha256 cellar: :any, ventura: "6922379c216cdadc1f19d9943b0beda7700eb84c19adafd56da4beb81638feb4" + sha256 cellar: :any, monterey: "496990ab37463fcdfe46e5c357778e0f0a2e1372e2f535a490184bb98a225bdc" + sha256 cellar: :any_skip_relocation, arm64_linux: "d7f801c3f13f8601ebc226f2e13162c0341cbb49cf1de0c80f2705254a6f0e2e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b42edfbfddb3f8595b4ac04addda06675ed0390350e6f70dc990cd59aa847d1" + 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..115be113e7c0e --- /dev/null +++ b/Formula/a/arpoison.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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, mojave: "c97bb55590119dbda338a24e634f9089bb3e43889a810a7bece231d6304b7bcf" + sha256 cellar: :any, high_sierra: "ee2eedf6780546bcf4610984d36a773300c5528122d08b7873b640a51f76ee56" + 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..7affd6ec89be4 --- /dev/null +++ b/Formula/a/arrayfire.rb @@ -0,0 +1,159 @@ +class Arrayfire < Formula + desc "General purpose GPU library" + homepage "https://arrayfire.com/" + url "https://github.com/arrayfire/arrayfire/releases/download/v3.9.0/arrayfire-full-3.9.0.tar.bz2" + sha256 "8356c52bf3b5243e28297f4b56822191355216f002f3e301d83c9310a4b22348" + license "BSD-3-Clause" + revision 4 + + bottle do + sha256 cellar: :any, arm64_sequoia: "bdc90c11320a6266ef4de580089a04b8c4b2b3dab9ae984c910d631a8c1eea15" + sha256 cellar: :any, arm64_sonoma: "149b7225e5e5c90272b2a85b530ebc8f70a3c05b8c55af6c14f352d03846400c" + sha256 cellar: :any, arm64_ventura: "22a13f617fea6ec5e17cd2caa9c95712c6721a594a5a7d80ba4740a35564aadc" + sha256 cellar: :any, sonoma: "ef92a75a71d09d7f9912e91a39ec319fb5b34ab7361b4d0f4c85c874de3d7cf4" + sha256 cellar: :any, ventura: "6a38a6cba73cf3e95c639d4763081c1bedf867a0e817982cefbbac4ae1e00465" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "fftw" + depends_on "fmt" + depends_on "freeimage" + depends_on "openblas" + depends_on "spdlog" + + on_linux do + depends_on "opencl-headers" => :build + depends_on "opencl-icd-loader" + depends_on "pocl" + end + + # fmt 11 compatibility + # https://github.com/arrayfire/arrayfire/issues/3596 + patch :DATA + + def install + # 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"), + ] + + if OS.mac? + # 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)" + else + # Work around missing include for climits header + # Issue ref: https://github.com/arrayfire/arrayfire/issues/3543 + ENV.append "CXXFLAGS", "-include climits" + end + + system "cmake", "-S", ".", "-B", "build", + "-DAF_BUILD_CUDA=OFF", + "-DAF_COMPUTE_LIBRARY=FFTW/LAPACK/BLAS", + "-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 + 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 && (ver.minor() == -1) && (ver.patch() == -1)) { + return format_to(ctx.out(), "{}", ver.major()); + } +- if (show_major && show_minor && !show_patch) { ++ if (show_major && (ver.minor() != -1) && (ver.patch() == -1)) { + return format_to(ctx.out(), "{}.{}", ver.major(), ver.minor()); + } +- if (show_major && show_minor && show_patch) { ++ if (show_major && (ver.minor() != -1) && (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..b4b0fe5c582a6 --- /dev/null +++ b/Formula/a/arss.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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, mojave: "891cda5121a3ea035215f0113d5291fa9afd468e68cc3dc9238b203985fcfe96" + sha256 cellar: :any, high_sierra: "b848efa3abde7c5fffd18289c1ab51a842cd93e0e97d6af32329acf869909d38" + sha256 cellar: :any, sierra: "2311c31ae2e80905dfc41c8adb9639314664103352540b198f24c54e0c102550" + sha256 cellar: :any, el_capitan: "5da45934b19d0cab02c809932fb8c5da3fd76d2f781bc9e2e7a98fa1825989eb" + 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 + # 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..93e57ad525fbc --- /dev/null +++ b/Formula/a/artillery.rb @@ -0,0 +1,53 @@ +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.23.tgz" + sha256 "56fee81d5f5fd831fcc1e89c6134b2294095ed0c07c225578ae932b0e82b272b" + 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_sequoia: "5c9b0f3df6e260876a412bf1439011cc80e7c0c53d6f583dab10a9d7e96de656" + sha256 arm64_sonoma: "2debcd213bc15422e7d14a865e60882d91f3647e1b73dbb4d6f05dab7ba3dd38" + sha256 arm64_ventura: "5abfad7cb7e2c4665c742813dcc84eb3d97a1732f067378514326a1f9da9c972" + sha256 sonoma: "5fd036f5003839c2e56a884c1adeac468ecdf4adaf5e742ad1e15391de14067c" + sha256 ventura: "58c94545760f40d8856ca78829adf823f50735e64e5e0cc69c584da30188d149" + sha256 cellar: :any_skip_relocation, arm64_linux: "559a04c716334c1cfafaa3038976de4c00b9ff9c3a80f7d3a90dbc38e5fc6091" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3b97f42ebe125135855f1a17bd2d408f7d30a6aeb6be1a68475ecbfa480d49f" + end + + depends_on "node" + + on_macos do + depends_on "macos-term-size" + end + + 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..d2ed28d3a669e --- /dev/null +++ b/Formula/a/arttime.rb @@ -0,0 +1,39 @@ +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.3.4.tar.gz" + sha256 "c6a45fe6053d14745be33da577e7209e63cc48123df41abb7397278887de8c3b" + license "GPL-3.0-only" + head "https://github.com/poetaman/arttime.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "43985c6cd993f1bd61ef7e392e923b2f9a296dda090156677671cc121cfe67da" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a002dd260415fe51b3081fddd4abb65768af8bd3e0d88033a85401c87571abc2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a002dd260415fe51b3081fddd4abb65768af8bd3e0d88033a85401c87571abc2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a002dd260415fe51b3081fddd4abb65768af8bd3e0d88033a85401c87571abc2" + sha256 cellar: :any_skip_relocation, sonoma: "844c38065113abb83934b48df9931113ac1ed289245d94a6f329a4afdeb5690f" + sha256 cellar: :any_skip_relocation, ventura: "844c38065113abb83934b48df9931113ac1ed289245d94a6f329a4afdeb5690f" + sha256 cellar: :any_skip_relocation, monterey: "844c38065113abb83934b48df9931113ac1ed289245d94a6f329a4afdeb5690f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "970e94cdf754fdf21c8e6d05a7281eb9d8b04ac18d7f14282d3fc4356c6da193" + 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 + system bin/"arttime", "--version" + end +end diff --git a/Formula/a/arturo.rb b/Formula/a/arturo.rb new file mode 100644 index 0000000000000..18a9ae9e3d4af --- /dev/null +++ b/Formula/a/arturo.rb @@ -0,0 +1,77 @@ +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_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..4ac5400641b3a --- /dev/null +++ b/Formula/a/arx-libertatis.rb @@ -0,0 +1,86 @@ +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 + + bottle do + 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..0792326200997 --- /dev/null +++ b/Formula/a/arxiv_latex_cleaner.rb @@ -0,0 +1,56 @@ +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 1 + sha256 cellar: :any, arm64_sequoia: "997cbbeeb1ce449be8bba1670259cc32c7ecfc695f5ae180934a337e9b2838ad" + sha256 cellar: :any, arm64_sonoma: "78d0cd82ce9bd8cbea655d761488bd02c4a3104f8778ae41dc714d36b7dbf07e" + sha256 cellar: :any, arm64_ventura: "48cbd0caca0dc51f270ba3a24c4b210af0b4f357f4c3e55a4d94d0cf1938ff1d" + sha256 cellar: :any, sonoma: "68c37e6f15ae97a4d6f6b73b0909f5125e8e9008ecf232b64ed361f3cecc57fd" + sha256 cellar: :any, ventura: "cf9077ef07516d834c831390842e96d99557782f2b325882ef49f47047588668" + sha256 cellar: :any_skip_relocation, arm64_linux: "19f637752ba528e9997985db1838ea731916f459f907ee6b55ca031dbde41a5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f4640b0c29323b9ae3aa92fc30eb65137ca20d51ccc578f51d51b1f52cf7da29" + end + + depends_on "libyaml" + depends_on "pillow" + depends_on "python@3.13" + + resource "absl-py" do + url "https://files.pythonhosted.org/packages/7a/8f/fc001b92ecc467cc32ab38398bd0bfb45df46e7523bf33c2ad22a505f06e/absl-py-2.1.0.tar.gz" + sha256 "7820790efbb316739cde8b4e19357243fc3608a152024288513dd968d7d959ff" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f9/38/148df33b4dbca3bd069b963acab5e0fa1a9dbd6820f8c322d0dd6faeff96/regex-2024.9.11.tar.gz" + sha256 "6c188c307e8433bcb63dc1915022deb553b4203a70722fc542c363bf120a01fd" + 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..ae86bd57bc65c --- /dev/null +++ b/Formula/a/as-tree.rb @@ -0,0 +1,33 @@ +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" + + bottle do + rebuild 1 + 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..fdb55e20a9d59 --- /dev/null +++ b/Formula/a/asak.rb @@ -0,0 +1,43 @@ +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_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..2e6880c7a0e12 --- /dev/null +++ b/Formula/a/ascii.rb @@ -0,0 +1,41 @@ +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" + + livecheck do + url :homepage + regex(/ascii[._-]v?(\d+(?:\.\d+)+)/i) + end + + bottle do + 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..5fd6d574c9fb2 --- /dev/null +++ b/Formula/a/ascii2binary.rb @@ -0,0 +1,49 @@ +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 + + bottle do + 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..b1e35cad147fd --- /dev/null +++ b/Formula/a/asciidoc.rb @@ -0,0 +1,50 @@ +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" + head "https://github.com/asciidoc-py/asciidoc-py.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ec67acbcd8040ec963e8d3c2cab2427254d2b8b411b65db720347518ab341559" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ec67acbcd8040ec963e8d3c2cab2427254d2b8b411b65db720347518ab341559" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ec67acbcd8040ec963e8d3c2cab2427254d2b8b411b65db720347518ab341559" + sha256 cellar: :any_skip_relocation, sonoma: "ec67acbcd8040ec963e8d3c2cab2427254d2b8b411b65db720347518ab341559" + sha256 cellar: :any_skip_relocation, ventura: "ec67acbcd8040ec963e8d3c2cab2427254d2b8b411b65db720347518ab341559" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a96f1dae62e892080b2da1d5d284af5978ba48edda0e76e04b30e309e8e4aaf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "51190b8ffe36e536f0208a5d0f420ed9be8c119051241188801d181a12bfd83a" + end + + depends_on "docbook" + depends_on "python@3.13" + depends_on "source-highlight" + + 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..04a710b36693d --- /dev/null +++ b/Formula/a/asciidoctor.rb @@ -0,0 +1,197 @@ +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.23.tar.gz" + sha256 "72d271de1fccd3610e6f12bba29be1a3b6c8c813c5b2f3a12491ffc423090518" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0e22867759dbac0647abe6e8a89fbc85ff2abdfc8feca72b04a354e43ec82dd8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "98d673578b71fc61fcfbae82914b8836d7cb8cf00943c453d1734412e76522ae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b633e081e4ac8c4f30ac1166c7ab756307724c788209b7b7981e0ebc4d2cf54a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4f1cd991e0e82b564540e53b37037c666e066ddeed28d32d7b178ee04ba59c41" + sha256 cellar: :any_skip_relocation, sonoma: "522247415d5dca5d39056e6a6c2598c15f16d2e9a5c17cf6dd5bf807f9d971ae" + sha256 cellar: :any_skip_relocation, ventura: "153aa583433922871932d0a9546f98f2ae71933e46dc0eaf120fb7c664c157d6" + sha256 cellar: :any_skip_relocation, monterey: "aa9fef3b8866426e0aac8f523dc488b90eee4d6ef6fefa9a49eac92c224dfb5f" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9095c205167b06a773ec25415de933c6472e21c41bc98089d59fca197aaad83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3b2cc8dd6df0643b5fffbec0c01a69cc80a249b6ee62677169d51c3e1df7697" + 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..1eacee2469e10 --- /dev/null +++ b/Formula/a/asciinema.rb @@ -0,0 +1,33 @@ +class Asciinema < Formula + include Language::Python::Virtualenv + + desc "Record and share terminal sessions" + homepage "https://asciinema.org/" + url "https://files.pythonhosted.org/packages/f1/19/45b405438e90ad5b9618f3df62e9b3edaa2b115b530e60bd4b363465c704/asciinema-2.4.0.tar.gz" + sha256 "828e04c36ba622a7b8f8f912c8f0c1329538b6c7ed1c0d1b131bbbfe3a221707" + license "GPL-3.0-only" + head "https://github.com/asciinema/asciinema.git", branch: "develop" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0f5ecbcebc62f27a2078b240921060282cef4507a007db5aabfc850c36aea51a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0f5ecbcebc62f27a2078b240921060282cef4507a007db5aabfc850c36aea51a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0f5ecbcebc62f27a2078b240921060282cef4507a007db5aabfc850c36aea51a" + sha256 cellar: :any_skip_relocation, sonoma: "1c106a9e92ab1af2710d651a1453d8abc70d1a677507e2d28c0b11a277da3180" + sha256 cellar: :any_skip_relocation, ventura: "1c106a9e92ab1af2710d651a1453d8abc70d1a677507e2d28c0b11a277da3180" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee91d0aae8818e3fe011ebd01134f75f180eee8e3332a49d2aef719295e85a9d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0f5ecbcebc62f27a2078b240921060282cef4507a007db5aabfc850c36aea51a" + end + + depends_on "python@3.13" + + def install + virtualenv_install_with_resources + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + output = shell_output("#{bin}/asciinema auth 2>&1") + assert_match "Open the following URL in a web browser to link your install ID", output + end +end diff --git a/Formula/a/asciiquarium.rb b/Formula/a/asciiquarium.rb new file mode 100644 index 0000000000000..2f06133285b3d --- /dev/null +++ b/Formula/a/asciiquarium.rb @@ -0,0 +1,81 @@ +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 + + bottle do + rebuild 1 + 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..8c3080a2c8670 --- /dev/null +++ b/Formula/a/asciitex.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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, mojave: "d5f864f9e6722d36da2e0412d4523a4977599c1229e3fb122bf4a0b29421c082" + sha256 cellar: :any_skip_relocation, high_sierra: "28a1327d58e05b74df8382ce37595d8d80decaf5cdbac4739995bc53d9f30ef7" + sha256 cellar: :any_skip_relocation, sierra: "9828783530514218f99ea7eabfad2031caeac979fac90cc9e049de4b4622fb80" + sha256 cellar: :any_skip_relocation, el_capitan: "0ae267d7ffcf17769da97275af047dc2a4ba9e5086acdb53dd11ca41f3d40ddb" + 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..f41999bc7a952 --- /dev/null +++ b/Formula/a/asdf.rb @@ -0,0 +1,40 @@ +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.16.7.tar.gz" + sha256 "095b95ec198b53a5240b41475e7dc423a055e57ee3490e325b8af11f22f03bd8" + 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_sequoia: "1b11cb41bc93a3cebef6569e49be6f5d0e10ab5ec73a9d2ace497051be47d86f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1b11cb41bc93a3cebef6569e49be6f5d0e10ab5ec73a9d2ace497051be47d86f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1b11cb41bc93a3cebef6569e49be6f5d0e10ab5ec73a9d2ace497051be47d86f" + sha256 cellar: :any_skip_relocation, sonoma: "adbd7a982debcdc997738056fdcc6660e374b827f5343de7718a71dd23328426" + sha256 cellar: :any_skip_relocation, ventura: "adbd7a982debcdc997738056fdcc6660e374b827f5343de7718a71dd23328426" + sha256 cellar: :any_skip_relocation, arm64_linux: "556fbd603b7a063de705436994807f5312f507b25df48db43245c3c4351081f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8faea147297d8c56864d414580966e398edf447b47a21d125c7accddb886fed" + end + + depends_on "go" => :build + + 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..f276f8fc00db4 --- /dev/null +++ b/Formula/a/asimov.rb @@ -0,0 +1,30 @@ +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" + + 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..64ebd50ac34bf --- /dev/null +++ b/Formula/a/asio.rb @@ -0,0 +1,62 @@ +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.34.2%20%28Stable%29/asio-1.34.2.tar.bz2" + sha256 "9cbe5e8abefcde3cb2705672210548a3e9e82b13682a3d2828bc34d3fe1b5583" + 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_sequoia: "c0fd0028dff865ae4e273649efbe66a58c4ffd855921afd1b785fbd38edc1cde" + sha256 cellar: :any, arm64_sonoma: "5f74987c52a3a1421b1b8a34e5e47dd6d3503c622fd6ec0c034a49b84a80f2ed" + sha256 cellar: :any, arm64_ventura: "377cba01eeb059795fc12a050252d7eb162b83111ccd00524ab6ae7202747589" + sha256 cellar: :any, sonoma: "9ea1ed483f0d26028a0f0b47b76c6895bec9c46efc43e40dd45d9122e948223d" + sha256 cellar: :any, ventura: "538de15b7a51d592382ab09eb7f0841254920888d67501b46d5cf07496c7378b" + sha256 cellar: :any_skip_relocation, arm64_linux: "542054da8a5f17cf65ffa78c35cc4a3e3163086fe380e2021fc6bd1639b132dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d415a556ecfdaf641d8cfb8a5dfe6a6453f0a016f03af7362e1b6573a4557cd2" + 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..48b214458aad5 --- /dev/null +++ b/Formula/a/asitop.rb @@ -0,0 +1,57 @@ +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 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9c1e7fc9030b7f6c0d68368093a95b6eb04a5aea4da0cf482ff7fd0929907dad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a7e47b9f4b8cddd211162e0c6f6f3df826c24af7c5af20fac83e4cbda1a00495" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a7aa18d47f90cffa03a4854dc5317182544dbe09b4e0bead5134a53a8593488d" + end + + depends_on arch: :arm64 + depends_on :macos + depends_on "python@3.13" + + resource "blessed" do + url "https://files.pythonhosted.org/packages/25/ae/92e9968ad23205389ec6bd82e2d4fca3817f1cdef34e10aa8d529ef8b1d7/blessed-1.20.0.tar.gz" + sha256 "2cdd67f8746e048f00df47a2880f4d6acbcdb399031b604e34ba8f71d5787680" + 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/18/c7/8c6872f7372eb6a6b2e4708b88419fb46b857f7a2e1892966b851cc79fc9/psutil-6.0.0.tar.gz" + sha256 "8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..304c0ea755065 --- /dev/null +++ b/Formula/a/ask-cli.rb @@ -0,0 +1,31 @@ +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_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/asm6809.rb b/Formula/a/asm6809.rb new file mode 100644 index 0000000000000..ba7612b4b427b --- /dev/null +++ b/Formula/a/asm6809.rb @@ -0,0 +1,56 @@ +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.16.tar.gz" + sha256 "6051624597d94d69a68a08e194cfe18cbdb12f829c80d92b84f641794b8b09bb" + 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_sequoia: "53a922bce5c9ecde31b6f3a8e387f1db2d31649b8e0ddccdfc3d8825b5743eb7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6589664a9e6e8ca18926cc88dd3afa2fd0c493126351e78acde2a5d48be1307" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a0a0771b53895adaede7849139df909fab2ac61dc1ebdc5d3b0f805cdff43cd0" + sha256 cellar: :any_skip_relocation, sonoma: "59b89cdd10721a6e83b487022edeefc95433f089ed6778110a96a032b893d7a6" + sha256 cellar: :any_skip_relocation, ventura: "53e5901547c33f9d32dfff01cbee8a14267320b40ad99dc01d206df3ccbdf0a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d0ec076c8403a105d75e020c8bdc9118bd40320122c66c5e430a88fe9e2ea53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dbf6e55fa95c5e75aa42a332602abde9188dbb7700ae2758b556f30884addb4e" + 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..e790766d520a4 --- /dev/null +++ b/Formula/a/asmfmt.rb @@ -0,0 +1,32 @@ +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" + + bottle do + 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..4642864f147ff --- /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.78.3.tar.gz" + sha256 "3c0b15e2fb9d31e1dc2fb58822635810882b12c0b6ebeb7b98f41f1108fa0ca3" + license "MIT" + head "https://github.com/nitefood/asn.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f9f355774478d080cd50c2bdde2a61d24bf87024e31e6c6df6408218eeda6685" + 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..329b21a9d09aa --- /dev/null +++ b/Formula/a/asn1c.rb @@ -0,0 +1,63 @@ +class Asn1c < Formula + desc "Compile ASN.1 specifications into C source code" + homepage "https://lionet.info/asn1c/" + url "https://github.com/vlm/asn1c/releases/download/v0.9.28/asn1c-0.9.28.tar.gz" + sha256 "8007440b647ef2dd9fb73d931c33ac11764e6afb2437dbe638bb4e5fc82386b9" + license "BSD-2-Clause" + + bottle do + rebuild 1 + 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..bb2f14c7ecd65 --- /dev/null +++ b/Formula/a/asnmap.rb @@ -0,0 +1,35 @@ +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_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, 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..e27630e3e0d8a --- /dev/null +++ b/Formula/a/aspcud.rb @@ -0,0 +1,48 @@ +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" + + bottle do + 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 + ] + + 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..0698d2c81c533 --- /dev/null +++ b/Formula/a/aspectj.rb @@ -0,0 +1,63 @@ +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_24/aspectj-1.9.24.jar" + sha256 "a7e50eb6e3fc84dca67ef98bfd23e0f7d62b854ee6e460ee76d2c84aa2f94d64" + 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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4152ef5f5cc3d500f07eb15b473664514ec526236023f09f264c611116b5c0a3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d67b498eb0695a39fe6433b26b1596133b6ea96b7447b0c87faaf52d01449d7d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2e3655d41292a397894c42224ebad82a8f8b148c37412df585101d990c33ef11" + sha256 cellar: :any_skip_relocation, sonoma: "8e7e80a023967b28d4e59ac2e6d0759d0694c172caada43e71433bcec1818b47" + sha256 cellar: :any_skip_relocation, ventura: "cb48488f8ba0912d61e0898bfcb8bc35e1db6de0a5305c8b8fbcaf37fad36445" + sha256 cellar: :any_skip_relocation, arm64_linux: "28007c75d40b247529b233d673cc9d77b267b3df1941d907610f21d3a42cf021" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4df2c89c71fc6de62f39915e5e38b5b2d60019bf6c249475ee09e3f84475681d" + 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/aspell.rb b/Formula/a/aspell.rb similarity index 94% rename from Formula/aspell.rb rename to Formula/a/aspell.rb index 748de8ec7551b..bf580be273195 100644 --- a/Formula/aspell.rb +++ b/Formula/a/aspell.rb @@ -1,43 +1,26 @@ 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.8.tar.gz" - mirror "https://ftpmirror.gnu.org/aspell/aspell-0.60.8.tar.gz" - sha256 "f9b77e515334a751b2e60daab5db23499e26c9209f5e7b7443b05235ad0226f2" - license "LGPL-2.1" + url "https://ftp.gnu.org/gnu/aspell/aspell-0.60.8.1.tar.gz" + mirror "https://ftpmirror.gnu.org/aspell/aspell-0.60.8.1.tar.gz" + sha256 "d6da12b34d42d457fa604e435ad484a74b2effcd120ff40acd6bb3fb2887d21b" + license "LGPL-2.1-only" + revision 1 bottle do - sha256 "f34a5b53fa80f6f0ea3cef83d04eceed93f918153463e0b77a596374a842249d" => :catalina - sha256 "756d2f24409150b932043544af99bc1c2ea242299174ab89a2d06c7878812af8" => :mojave - sha256 "9bbb8be505d953395bcccde4712cf85792c6bf03af535cc553783361476ddddb" => :high_sierra + 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 "en" do - url "https://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-2018.04.16-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/en/aspell6-en-2018.04.16-0.tar.bz2" - sha256 "f11071e74b0c0753f4afabf024941a5c3a96bafe3879211ebd47bc34e76fbd2f" - end - - resource "de" do - url "https://ftp.gnu.org/gnu/aspell/dict/de/aspell6-de-20161207-7-0.tar.bz2" - mirror "https://ftpmirror.gnu.org/aspell/dict/de/aspell6-de-20161207-7-0.tar.bz2" - sha256 "c2125d1fafb1d4effbe6c88d4e9127db59da9ed92639c7cbaeae1b7337655571" - end - - 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 - - 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 - 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" @@ -122,6 +105,12 @@ class Aspell < Formula sha256 "dbc6cbceaa7a4528f3756f0b5cce5c3d0615c2103d3899b47e9df2ed9582e2f7" end + resource "de" do + url "https://ftp.gnu.org/gnu/aspell/dict/de/aspell6-de-20161207-7-0.tar.bz2" + mirror "https://ftpmirror.gnu.org/aspell/dict/de/aspell6-de-20161207-7-0.tar.bz2" + sha256 "c2125d1fafb1d4effbe6c88d4e9127db59da9ed92639c7cbaeae1b7337655571" + end + 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" @@ -134,12 +123,24 @@ class Aspell < Formula sha256 "4af60f1a8adf8b1899680deefdf49288d7406a2c591658f880628bf7c1604cd2" end + resource "en" do + url "https://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-2020.12.07-0.tar.bz2" + mirror "https://ftpmirror.gnu.org/aspell/dict/en/aspell6-en-2020.12.07-0.tar.bz2" + sha256 "4c8f734a28a088b88bb6481fcf972d0b2c3dc8da944f7673283ce487eac49fb3" + end + 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 + 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 + 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" @@ -164,6 +165,12 @@ class Aspell < Formula sha256 "f7e0ddc039bb4f5c142d39dab72d9dfcb951f5e46779f6e3cf1d084a69f95e08" end + 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 + 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" @@ -548,8 +555,6 @@ class Aspell < Formula sha256 "3fa255cd0b20e6229a53df972fd3c5ed8481db11cfd0347dd3da629bbb7a6796" end - uses_from_macos "ncurses" - # const problems with llvm: https://www.freebsd.org/cgi/query-pr.cgi?pr=180565&cat= patch :DATA @@ -568,8 +573,7 @@ def install end test do - assert_equal shell_output("echo \"misspell worrd\" | #{bin}/aspell list -d en_US").strip, - "worrd" + assert_equal "worrd", pipe_output("#{bin}/aspell list -d en_US", "misspell worrd", 0).strip end end diff --git a/Formula/a/asroute.rb b/Formula/a/asroute.rb new file mode 100644 index 0000000000000..9035a27af22e7 --- /dev/null +++ b/Formula/a/asroute.rb @@ -0,0 +1,35 @@ +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" + + bottle do + rebuild 1 + 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..53572cf47b372 --- /dev/null +++ b/Formula/a/assh.rb @@ -0,0 +1,40 @@ +class Assh < Formula + desc "Advanced SSH config - Regex, aliases, gateways, includes and dynamic hosts" + homepage "https://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_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, 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..6d7b0e248ee35 --- /dev/null +++ b/Formula/a/assimp.rb @@ -0,0 +1,91 @@ +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/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 + ] + head "https://github.com/assimp/assimp.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3617c461f17de42a22ab7090b1b056b16f854f767bcbd9f46e3df1d1c2374b0b" + sha256 cellar: :any, arm64_sonoma: "6e0aead723a0156775a0e547d7c38da9893f0db854e32932e168f09b9f33df1d" + sha256 cellar: :any, arm64_ventura: "7ced67d760a444e794361406950f9cf559448bb1820ed27f151c8026df25109e" + sha256 cellar: :any, arm64_monterey: "e37e55230c1dadd42cc118a8cc7b1ede59226d833731c4da7c7edd2a7f7e89e8" + sha256 cellar: :any, sonoma: "97806c9287013e10f6cd45d131e2936639c714048393699d607189f302d4b457" + sha256 cellar: :any, ventura: "fdee9585eca259f83b827a0b7f7161599a914150cf3ded457e8d9c51eed5a6a7" + sha256 cellar: :any, monterey: "6b2af335f9c9c4a0706e9a111d45e33a1feaf78aaffa00d8c8361e0e2f5bd1cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "882b3c50f9882e2f2b2ee67d7a5bb949979c0da89c343fb7caca913bad65649e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "46b2c127678c024d31c2e873fb39739a65ce04718439d1e6661a8dc7aacdd4ec" + 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/ast-grep.rb b/Formula/a/ast-grep.rb new file mode 100644 index 0000000000000..1691d50deafa4 --- /dev/null +++ b/Formula/a/ast-grep.rb @@ -0,0 +1,33 @@ +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.38.1.tar.gz" + sha256 "e1378aef969fbedd450f52eb85bf56a0389acdfd09316c130b28ade920a59cb3" + license "MIT" + head "https://github.com/ast-grep/ast-grep.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "53fa646ebfe63b5c030a6f03c72b358eee97e68106056c95832855dc04e9bd4b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f96a95439fdd92ebfb50ac22084d29a2b391ffaeb1ab5fd31e5c14c9c2c559d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2dcffa2e091ba3251b5950262acec52c4cd3d1b6871b5de87ceb7526a4c4cd06" + sha256 cellar: :any_skip_relocation, sonoma: "1e8c73bbf61767004d0ad8a0d7774b73d832a3305254fc90c0645a784e2a0983" + sha256 cellar: :any_skip_relocation, ventura: "ffcb33c2383d76067c4e1f47bf03a9d74be962453d3d068acc1b512fcf7cb3ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "28ae8692020ba9755cf3700809ab63e3dbff7145456615de32e180ee5c7d3def" + sha256 cellar: :any_skip_relocation, x86_64_linux: "828848a6417695418375227a00f2d4f0a643e4764a8793895c2644caa56c8f57" + 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..2b8feb44ccd0e --- /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.25.0.tar.gz" + sha256 "5ca3a55af9cfd04b1654c4dd90b4ae041d8c1c490bf65333a46090fecd29972c" + license "Apache-2.0" + head "https://github.com/joernio/astgen.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "43e54d726f4cb8c38336b62564d8dc64d55e440c1e73eeba8849fcd45921d346" + 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":"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..7b786783eb160 --- /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.34.0.tar.gz" + sha256 "da97c76d2ec1b97f2ae0851272620245e31897bc70d14ec1f52fc3cbf5e0f92d" + 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_sequoia: "ba1f098d190ca3120adfb44e32b782725b39997ff5929334124b7078def4622a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3fba3d7660cb36fb32c7ccb5f9dd2b9d4558fea82d0b5c6b250050c83a4d7409" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f9f39ec0089ec198e75e1bef7fe4210c4ddf11870758e969479cb21aa2d240da" + sha256 cellar: :any_skip_relocation, sonoma: "61b5b97b069faf325b55fca1a2d742bceff4930c2ab4c032151adfb042368e18" + sha256 cellar: :any_skip_relocation, ventura: "b6b8c4fe5d182a68f972a3f41ead1192abdc53d4de98860d8f2d4d33216deae9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77aed66b4fe51975220c383daaa9ec86ee99e6abda27b20721e67e8f747e4b09" + 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..804c428a55f47 --- /dev/null +++ b/Formula/a/astrometry-net.rb @@ -0,0 +1,89 @@ +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 + sha256 cellar: :any, arm64_sequoia: "757f3c12578d021709e8332caa87e0d3ca1bcc28f39a675946d83cca07bc214e" + sha256 cellar: :any, arm64_sonoma: "8e37742770e1efe10c744f4a908c002af489a59e8aa2bf6c5cb4dbad74b02d74" + sha256 cellar: :any, arm64_ventura: "12ea115da7ff9e7976e71bcb7e3f6ee7420f633a1c2295d24df6c95568aa28ba" + sha256 cellar: :any, sonoma: "f4115527d39d5d12b687a44b02556072ad48e0d982b445193e1ccb3fb2f42eb8" + sha256 cellar: :any, ventura: "acfb3cb5d86b8127c99a3ad33b874e3496e12bca06bf84252a70d49e33bf76df" + sha256 cellar: :any_skip_relocation, arm64_linux: "8fd9bce936b958783eed600b61cc2490a719aabbf631dc1f6624d058a5b7f6c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e92de421cb2c9161b9cc6a25bd364988041831bece5de023e55684350b0a03b3" + 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.13" + depends_on "wcslib" + + resource "fitsio" do + url "https://files.pythonhosted.org/packages/6a/94/edcf29d321985d565f8365e3349aa2283431d45913b909d69d648645f931/fitsio-1.2.4.tar.gz" + sha256 "d57fe347c7657dc1f78c7969a55ecb4fddb717ae1c66d9d22046c171203ff678" + 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.13") + + 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..1768ff672551f --- /dev/null +++ b/Formula/a/astroterm.rb @@ -0,0 +1,46 @@ +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.7.tar.gz" + sha256 "3b8b1597afb31d1cb8ad54030b5766652b4d3f42f0a3d510bbc3191c0c6a4aa5" + license "MIT" + head "https://github.com/da-luce/astroterm.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "91761c77d2816c3ed68f269657e1ff8234ba3391f4e56db01d1b0730ccdbfc10" + sha256 cellar: :any, arm64_sonoma: "cf6d3db88af6cead0e19c79763bc24d87e9d8a57be5fc78d8d81e934a4185275" + sha256 cellar: :any, arm64_ventura: "ff0eae541a834f232688fd1a64be1d4959da0a683648fc2406813ab77c07bd9a" + sha256 cellar: :any, sonoma: "dcff897a85fb13ab2b7341577849de53bd4158c2384f60ce09ac39f3a0c764e1" + sha256 cellar: :any, ventura: "c48bcaf9ef3af7dd55969efe833400bd5711f4c5b2882929ccd6d65ae71195fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "97560d671623bd96285f2eae104209c7d95b5718eefddf6cfc61d247fb60ca8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f841a9d3d79cf04ed5f6b03c83ae86c3a859f87930e2652d9b1e895353c51d04" + 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..dbe8bdad0ff9e --- /dev/null +++ b/Formula/a/astyle.rb @@ -0,0 +1,44 @@ +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.9.tar.bz2" + sha256 "b644597654df5b40087be4a46723c65040f7ce59f3369f1b8f690f9c10cababc" + 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_sequoia: "1924b800e0762b97092a054f71a0b4a00000a46fbce445bbc1b08e80b834380b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b140cafb548eb0f68bf568638739a79394dbb00e86978e0ebe77c4929b30504d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2d380184cc9ed5666da4da07ac65deff0c31636299016f2590d81c301b747561" + sha256 cellar: :any_skip_relocation, sonoma: "2a148a2a2d9fad398a2bf2f665d4248afd6fc8ed9c14b6aec384306e2b1e4661" + sha256 cellar: :any_skip_relocation, ventura: "127b30426d5873fc619831935328f3f52763e0bf6e8959fa91b8922b65f550d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8676bc30e1c62d74c38b79a8d675a310f609890c148b5f45444b66c128615fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e193b2a1b876b905a9bcc3c4487de747d26c2eaab0a87b4d2309d7d1f6a7540" + 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..bee5c88c7ba93 --- /dev/null +++ b/Formula/a/asuka.rb @@ -0,0 +1,59 @@ +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_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 "rust" => :build + + uses_from_macos "ncurses" + + on_linux do + depends_on "pkgconf" => :build + 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..1fc8b816459c5 --- /dev/null +++ b/Formula/a/asymptote.rb @@ -0,0 +1,77 @@ +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.03/asymptote-3.03.src.tgz" + sha256 "3c8a4e6988b533d3d58650aa9cbd5566f9f786a9ab0e5fd0a0370f38750e4fbd" + license "LGPL-3.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/asymptote[._-]v?(\d+(?:\.\d+)+)\.src\.t}i) + end + + bottle do + sha256 arm64_sequoia: "0f44efa2b77ba2a37e39201dc4e7c5e66a72cad31ce1a084a1f965f216e5631b" + sha256 arm64_sonoma: "b86dbae74deda3128abd84da31fc4343407e778379e569d742bde42cb5cbd854" + sha256 arm64_ventura: "a779939f5a010187830e000e9068ea2c18fed522da98f6750766d01bdd347204" + sha256 sonoma: "5822b3bcb86256d00dd3d2b65e6d75df07bcc7e5914df9c287bf8cc259d4de68" + sha256 ventura: "7eeba78fa5c23d5485b4d8efa65e79e4b603f5ab415043a88588eaa87c1ce0ba" + sha256 arm64_linux: "1f4f6f30d1cd456dc8f0f7d0d9c03662cebf33aea448d162881b806d6881eba6" + sha256 x86_64_linux: "4004e2418e853c20a3375db06e1562a0c283a5e6e1f6590a4fcd2258d8cf180d" + 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.03/asymptote.pdf" + sha256 "4ddb5bfee1e00f56e5872130155020cc4372d9bc5a463661547aa08145bbba85" + + 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..b2913fc36486f --- /dev/null +++ b/Formula/a/async_simple.rb @@ -0,0 +1,62 @@ +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/v1.3.tar.gz" + sha256 "0ba0dc3397882611b538d04b8ee6668b1a04ce046128599205184c598b718743" + license "Apache-2.0" + head "https://github.com/alibaba/async_simple.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "755cd0582500b20090528bb4192041eb7a57e2b1ba4fb87ecfe1082926c77415" + sha256 cellar: :any, arm64_sonoma: "e89443db479ff1e8aabc39e482f1c4cb72b3214a485588c0d461a21342fa9197" + sha256 cellar: :any, arm64_ventura: "9563803b43de1611be1f4f38083535f9ea944907a4b07808e67400448096a52e" + sha256 cellar: :any, sonoma: "3e19085474250b8f93b361127483b8fa68e509d0c1e4132976090279bf746429" + sha256 cellar: :any, ventura: "4b9d30e6cc11876a60fe9180ae43ef4de77b21c3d49c789b2f5a6d73be8048be" + sha256 cellar: :any_skip_relocation, arm64_linux: "0892f76a0d09c6b8651a4ad677516adbb942bf9b376a867f63b3a5d7c23d0d12" + sha256 cellar: :any_skip_relocation, x86_64_linux: "31cccc38ea016889db7f4a52700115a22d5eb7432e403c6939ef8bafb12bdd8e" + 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..272b3353b2622 --- /dev/null +++ b/Formula/a/asyncapi.rb @@ -0,0 +1,36 @@ +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-3.1.1.tgz" + sha256 "7156fdd3ab24df4aaf513fa7fec736e3b7297417d5156db8a4dfce7edb1789c9" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "198a12f3799fb1d2e8477b8b48898eb42a8048a7c71a800eac8b3c97810f2fe8" + sha256 cellar: :any, arm64_sonoma: "198a12f3799fb1d2e8477b8b48898eb42a8048a7c71a800eac8b3c97810f2fe8" + sha256 cellar: :any, arm64_ventura: "198a12f3799fb1d2e8477b8b48898eb42a8048a7c71a800eac8b3c97810f2fe8" + sha256 cellar: :any, sonoma: "47ee08e3f36f98384a161d34f3d8eea341269da2016a07a1b214a8c76e857c67" + sha256 cellar: :any, ventura: "47ee08e3f36f98384a161d34f3d8eea341269da2016a07a1b214a8c76e857c67" + sha256 cellar: :any_skip_relocation, arm64_linux: "100636a8514bb785ac9359a45fcc4168f10e4c7c4e42bd9354afe5b78d6da078" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34ffbb83acc1bdf4b85a990e9dc74945d4d1574aa4026be94e7b18e4a1748a48" + 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..077f72ac7e660 --- /dev/null +++ b/Formula/a/asyncplusplus.rb @@ -0,0 +1,75 @@ +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_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 + 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() + { + 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..598fe3eb7fda9 --- /dev/null +++ b/Formula/a/at-spi2-core.rb @@ -0,0 +1,80 @@ +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.56/at-spi2-core-2.56.2.tar.xz" + sha256 "e1b1c9836a8947852f7440c32e23179234c76bd98cd9cc4001f376405f8b783b" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_sequoia: "1d42a8160a64d9e494c2cf98ab3cb7c976df17b88ed8bbf4f77926de4b4492a2" + sha256 arm64_sonoma: "b182a1bd6305638f82352d23984b7e540d7b1be23a9afee3e0d6f60eb80b2a24" + sha256 arm64_ventura: "cc16230760a9d1c2f05467c775ebf2e2c8bf19b88bb55656a839c7125a6699e3" + sha256 sonoma: "4ebbfb490a8492db0547a53b5f138b46912c13c6cd7de495a3462451a6392007" + sha256 ventura: "fddc5565ddaabc2ee8bf8c432b1100a23faa1260e1c7bc01ecbfc17e5b7ac8b0" + sha256 arm64_linux: "aa63615ce117a467355493b1b7f42390314d2af04651949e2834043d1765b5d0" + sha256 x86_64_linux: "45cd2ef761364c1331d819db3730efecf3e6734f09fb34a1cf2699685be25445" + 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 "dbus" + depends_on "glib" + depends_on "libx11" + depends_on "libxi" + depends_on "libxtst" + depends_on "xorgproto" + + 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", "--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..9f848604c0481 --- /dev/null +++ b/Formula/a/ata.rb @@ -0,0 +1,51 @@ +class Ata < Formula + desc "ChatGPT in the terminal" + homepage "https://github.com/rikhuijzer/ata" + url "https://github.com/rikhuijzer/ata/archive/refs/tags/v2.0.4.tar.gz" + sha256 "a70498492fce7b46a2a62175886a801f61f9f530c5c6d01b664af2750d3af555" + license "MIT" + + bottle do + 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..4c8ec66769daa --- /dev/null +++ b/Formula/a/atac.rb @@ -0,0 +1,50 @@ +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.20.0.tar.gz" + sha256 "2f1b7cb1eae7aac4e5fd39a9d87eeb27d3c3167695c9e4af1dae3906172d0f57" + license "MIT" + head "https://github.com/Julien-cpsn/ATAC.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "59bc7fab0781c4deb73356174db8a139394f2b5cfec0bb5b3a039b901885f224" + sha256 cellar: :any, arm64_sonoma: "9e69fed7b6b3752986523b6dbf31f2f3ca4e377881a682ed28147fa5c72a3217" + sha256 cellar: :any, arm64_ventura: "7436aceca7891c5f421e2b7c0619038a2248fbdd237f3a77feea08df246b364b" + sha256 cellar: :any, sonoma: "8f1fd657ca6c5ebfaa02b1dca032cc049a930b8b390811721976ba051ccd88ee" + sha256 cellar: :any, ventura: "9e69a9fdfd01701af363a43715e1e2431746064f9f07feae807fc957d19018c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e0653d5ad931c62d9a7dbe6419f68446e29b2e7481d1e782afd06b635b6e15f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5c8ad00161a566c3fcc3d7fb40460c430147324e874b313c4c1091226ee055c" + 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 + + # Completions and manpage are generated as files, not printed to stdout + system bin/"atac", "completions", "bash" + system bin/"atac", "completions", "fish" + system bin/"atac", "completions", "zsh" + bash_completion.install "atac.bash" => "atac" + fish_completion.install "atac.fish" + zsh_completion.install "_atac" + + 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..bf39730c232e3 --- /dev/null +++ b/Formula/a/atari800.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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..a61ba34f18239 --- /dev/null +++ b/Formula/a/atasm.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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, mojave: "0f123b8ac337d96f5f528bdcd31fdd44b1cde57227c5f3451b83a15918b5cc79" + 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..5a62f139990cc --- /dev/null +++ b/Formula/a/atf.rb @@ -0,0 +1,48 @@ +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_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..60874a439d22c --- /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 6 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "24bd2caf184bd92d6750107fd8e234adf75aa78bedc755972c488ba76f8daae4" + end + + depends_on "python@3.13" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/80/8b/31845869fb935b93d1f1a846d2a8e13dc91af4cf03ba701e2068c08b99af/boto3-1.35.37.tar.gz" + sha256 "470d981583885859fed2fd1c185eeb01cc03e60272d499bafe41b12625b158c8" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/57/a4/bc96ba621c869f723ce4cb4dadb53fdbb821d64ef1146f0749098ef342cf/botocore-1.35.37.tar.gz" + sha256 "b2b4d29bafd95b698344f2f0577bb67064adbf1735d8a0e3c7473daa59c23ba6" + end + + resource "cli-helpers" do + url "https://files.pythonhosted.org/packages/ab/de/79529bd31c1664415d9554c0c5029f2137afe9808f35637bbcca977d9022/cli_helpers-2.3.1.tar.gz" + sha256 "b82a8983ceee21f180e6fd0ddb7ca8dae43c40e920951e3817f996ab204dae6a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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/62/7c/12b0943011daaaa9c35c2a2e22e5eb929ac90002f08f1259d69aedad84de/fsspec-2024.9.0.tar.gz" + sha256 "4b0afb90c2f21832df142f292649035d80b421f60a9e1c027802e5a0da2b04e8" + 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/2d/4f/feb5e137aff82f7c7f3248267b97451da3644f6cdc218edfe549fb354127/prompt_toolkit-3.0.48.tar.gz" + sha256 "d6623ab0477a80df74e646bdbc93621143f5caf104206aa29294d53de1a03d90" + end + + resource "pyathena" do + url "https://files.pythonhosted.org/packages/8a/1b/4de841c95c9ed0e6e6eeabe82fc169b354d101396aa432f2bed35cc4a8d0/pyathena-3.9.0.tar.gz" + sha256 "4b11d49df03255c556e11f63d0e346cc25ea19675a7ac78ffd0537bcd84cb48f" + 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/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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/cd/94/91fccdb4b8110642462e653d5dcb27e7b674742ad68efd146367da7bdb10/tenacity-9.0.0.tar.gz" + sha256 "807f37ca97d62aa361264d497b0e31e92b8027044942bfa756160d908320d73b" + 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 + + 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..b949dc86cf8b3 --- /dev/null +++ b/Formula/a/atkmm.rb @@ -0,0 +1,53 @@ +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" + + bottle do + 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..40c1ff3c777d5 --- /dev/null +++ b/Formula/a/atkmm@2.28.rb @@ -0,0 +1,59 @@ +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 + + bottle do + 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..e4df81abde9fa --- /dev/null +++ b/Formula/a/atlantis.rb @@ -0,0 +1,60 @@ +class Atlantis < Formula + desc "Terraform Pull Request Automation tool" + homepage "https://www.runatlantis.io/" + url "https://github.com/runatlantis/atlantis/archive/refs/tags/v0.34.0.tar.gz" + sha256 "b5985c7d8fb6b42b5995175ab1b761f23e8879f95ddc0acc44a5af4c706c528f" + 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 + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d8ca407cd145a50b557c01c069fb0616f17df02a06a3a5729dfff34c54e98246" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d8ca407cd145a50b557c01c069fb0616f17df02a06a3a5729dfff34c54e98246" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d8ca407cd145a50b557c01c069fb0616f17df02a06a3a5729dfff34c54e98246" + sha256 cellar: :any_skip_relocation, sonoma: "ff96e80c18e57f55e6be966d4ef62c8b0d0565b209dec0485bd51e805a172582" + sha256 cellar: :any_skip_relocation, ventura: "ff96e80c18e57f55e6be966d4ef62c8b0d0565b209dec0485bd51e805a172582" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d60c3d551d569050ac1ea9d7ac02a86aa22e22936381feeb4342cfed293527bb" + 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..015e5f046624c --- /dev/null +++ b/Formula/a/atlas.rb @@ -0,0 +1,43 @@ +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.33.0.tar.gz" + sha256 "abec6e325122e4ad3c8df75b71265de56a584f30126650b3d976cdb1976fd736" + license "Apache-2.0" + head "https://github.com/ariga/atlas.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fec845948808c427e76400861c96b081e073c22261f0276c71703cfa3df5275a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3737fc1be1e2d01e9231ede75345cf4c29c43bda88017229a95b039a7af66682" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6287e20d6a36f742a98f659ef00f09b471c9b5804c81c02cdef22a2009a575f5" + sha256 cellar: :any_skip_relocation, sonoma: "6ca3ea148c2f93590fbea6873f824bb5feaafe16a8a7875d5840d6e3dc67c17b" + sha256 cellar: :any_skip_relocation, ventura: "cf9b4b67fa8561ddd40eadc48b7cbeca4dfb85fa5b5ecc7d0c1b12a07fb475bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "37f7fc55f7e070019e2b178e233d467658c373f16d4e5393d267c079fe3a2bdc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42a7fe502963f23f059c2e1c2458a118cbaea7edbf4b196d0257914185abed78" + 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..02ece9df8258c --- /dev/null +++ b/Formula/a/atmos.rb @@ -0,0 +1,115 @@ +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.175.0.tar.gz" + sha256 "e5d60a8d5aa36872be7cba2c00e63635f1e12a6d6d831c62f131706413633da9" + license "Apache-2.0" + head "https://github.com/cloudposse/atmos.git", branch: "main" + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7af99b982904d587c2544f0b6e23ead363006af3e52a68caba075b1dfe3c8f1d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "00f8c26ae71d03180d1fa4108a00f108853f2087bf97d507112b583a58d44809" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c054b229603a0731133ab49f796a1127e172296691d25a8816c6716fd228141a" + sha256 cellar: :any_skip_relocation, sonoma: "0c4441b7123c0740dee7e0c9cda8019f91663581a6a1423fb42fb225adcc9f76" + sha256 cellar: :any_skip_relocation, ventura: "1039b459d857e9aa575fdb78c06d0c4cba87c4e744551ee7e5a18d72ceb2865f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a3150e3d8616ece424559aafc517c69ef1e430b53b3e18b58557063f55deb84" + end + + depends_on "go" => :build + + conflicts_with "tenv", because: "tenv symlinks atmos binaries" + + def install + 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/atomicparsley.rb b/Formula/a/atomicparsley.rb new file mode 100644 index 0000000000000..7c1548aede5d5 --- /dev/null +++ b/Formula/a/atomicparsley.rb @@ -0,0 +1,40 @@ +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_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..4c4e80922f84c --- /dev/null +++ b/Formula/a/atomist-cli.rb @@ -0,0 +1,63 @@ +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_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 + + 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..ef1e8cba791e0 --- /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 + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c90268b9621aa25c6cae07db4313c857cc3e4a6ece918a9d55753e1b8055fef1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c90268b9621aa25c6cae07db4313c857cc3e4a6ece918a9d55753e1b8055fef1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c90268b9621aa25c6cae07db4313c857cc3e4a6ece918a9d55753e1b8055fef1" + sha256 cellar: :any_skip_relocation, sonoma: "32ab886a03969d9890dc6867a45164535fd1f9e66956d8d29b8bff7c70b8ddc2" + sha256 cellar: :any_skip_relocation, ventura: "32ab886a03969d9890dc6867a45164535fd1f9e66956d8d29b8bff7c70b8ddc2" + sha256 cellar: :any_skip_relocation, arm64_linux: "a6b9b7f3b9432817b9a5bfdc5b5875ca2cda6c417811628086a06d1b11ae7e92" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c90268b9621aa25c6cae07db4313c857cc3e4a6ece918a9d55753e1b8055fef1" + end + + def install + 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..d65137876076e --- /dev/null +++ b/Formula/a/atop.rb @@ -0,0 +1,43 @@ +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.11.1.tar.gz" + sha256 "72b39a6f9afd917cf6b92e544b28e9a65942da1b97bdee4ca7eafeea9d169a76" + license "GPL-2.0-or-later" + head "https://github.com/Atoptool/atop.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "8e9f07f76fd12d19988646ce63af2569a594f8dc63feecb73f3e2c18615d6c48" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d52b4a792db5bd610cdbd776da9cb33f092734d0250b4d43f7116567605ba516" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on :linux + depends_on "linux-headers@5.15" + 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..a9e80332e6680 --- /dev/null +++ b/Formula/a/ats2-postiats.rb @@ -0,0 +1,47 @@ +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 + + bottle do + 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/attr.rb b/Formula/a/attr.rb new file mode 100644 index 0000000000000..ab0be98e2b117 --- /dev/null +++ b/Formula/a/attr.rb @@ -0,0 +1,34 @@ +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 + + 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..83da6499ac61d --- /dev/null +++ b/Formula/a/atuin.rb @@ -0,0 +1,40 @@ +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.6.1.tar.gz" + sha256 "aba26698471ef7ad2757416d01fcc327d3bd800c58cc3fcae638e625524e1b40" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0d5178502a1427a080827cf3b18c724afa3151658910e4596b33bb425789ce21" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "48b16b97bed2dea1fdda46ce7416e2ada8af0fd6044a4911bbb46457f936fab0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e4d6d6af87adbf1ff6120766e30fdd4992dea765a7109f3d4ae83e9376e538bb" + sha256 cellar: :any_skip_relocation, sonoma: "5c77f1e90366dd27311260f015f5d28f03e73a4be2d3401b20c77d489f5c9bf9" + sha256 cellar: :any_skip_relocation, ventura: "0d03abd8e58b7903113101ae29229d7b0537329519811034fd50f9e2c4fbfd94" + sha256 cellar: :any_skip_relocation, arm64_linux: "fcec8d144f1c8570dfe3f4625988f355292f440efc5dd3fcbdcd4c5335db282b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "566e883860b1640f49f8cf6e642d2cd80611dcba9c6ac2821cc09a219139b73c" + 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..2350514d968c7 --- /dev/null +++ b/Formula/a/aubio.rb @@ -0,0 +1,81 @@ +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 + + bottle do + rebuild 1 + sha256 arm64_sequoia: "cdd72e2e045a52832a9050ce2695b6f922813854df1dd410c38c7ed8d0b94882" + sha256 arm64_sonoma: "0b3b530218db7a25081e82bdf9c235d9bd57ec656a1d4c9a1abc028c907c2eb9" + sha256 arm64_ventura: "a05d35bae538b86c68e4712bb7b86212083fe5cac88189bbd3248ae7c189dbad" + sha256 sonoma: "843089029aa243aa70475e2a268378c3d90c427fa6f0e8227ce01f90ce510543" + sha256 ventura: "2cc8e8d50e223e7f42509148a31cb3684c64fd3941544d395229ecb2fffc83a6" + sha256 arm64_linux: "c32187d4a3dcd0a28643973ec32b14971a328393f5568303adfbc0898435ae8d" + sha256 x86_64_linux: "c4fd40654cf66d58978c3aea90360c621bfb758aaa8eb94adaa187f9cee4583a" + end + + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "libsndfile" + depends_on "numpy" + depends_on "python@3.13" + + # 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.13" + 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..8f7104f45a767 --- /dev/null +++ b/Formula/a/audacious.rb @@ -0,0 +1,122 @@ +class Audacious < Formula + desc "Lightweight and versatile audio player" + homepage "https://audacious-media-player.org/" + license "BSD-2-Clause" + revision 2 + + stable do + url "https://distfiles.audacious-media-player.org/audacious-4.4.2.tar.bz2" + sha256 "34509504f8c93b370420d827703519f0681136672e42d56335f26f7baec95005" + + resource "plugins" do + url "https://distfiles.audacious-media-player.org/audacious-plugins-4.4.2.tar.bz2" + sha256 "50f494693b6b316380fa718c667c128aa353c01e954cd77a65c9d8aedf18d4bd" + + 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 + sha256 arm64_sonoma: "cac4d1f849ee19b7bfd0de7cfb48ecee2aec4cdf0fbf782ca7caf85280570823" + sha256 arm64_ventura: "b791cb67d00edaec9df4af4a0155b8bd3eeb00331b07456835e9a8666eb7aa48" + sha256 sonoma: "2e4cad501e1e08303255d352bd8b85fb0b70f2f8970d59a978c95c4a5e188e0a" + sha256 ventura: "e2d8457f43e841fcfcf839b057c6709e5623c841cea200a4c9c760ef1599bdf1" + sha256 x86_64_linux: "f4581ac86d2dde9eafb54d1a743f9bef362362d700468259c8267e5a870d40a8" + 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 "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 "qt" + depends_on "sdl2" + depends_on "wavpack" + + uses_from_macos "curl" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "opus" + 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/auditbeat.rb b/Formula/a/auditbeat.rb new file mode 100644 index 0000000000000..24934f55c27aa --- /dev/null +++ b/Formula/a/auditbeat.rb @@ -0,0 +1,90 @@ +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.0.1", + revision: "bce373f7dcd56a5575ad2c0ec40159722607e801" + license "Apache-2.0" + head "https://github.com/elastic/beats.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d822de8cab572027463209e5fa78238501386683c3fef621a3f84bf4535b2df2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "632ea9d9e45e8b94d2e9bb56716ff4c0c7556c920c191e99af7ed3b5bf2c5b45" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ff998cef6bcd82f473ddfc79b2ecfe0c73c7a841b177f15b41ed368cd835ed4c" + sha256 cellar: :any_skip_relocation, sonoma: "3f67d3d9d871489609b2f8898be9dd35cb69030940995a4a4faac220148d5b14" + sha256 cellar: :any_skip_relocation, ventura: "d9be3f87a36dc42bb8b3b615df5b3b96bd20e54f5f41d5e0fdfd85e11fdc8b21" + sha256 cellar: :any_skip_relocation, arm64_linux: "1803b42e30d15f205f37ff90ba4004defff329cf33374f31bd3961427783704f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a8dc9fb21a382e4032a633b67dc405b6728372af46afdaea80e1b0b5798f9e1" + end + + depends_on "go" => :build + depends_on "mage" => :build + + def install + # 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..ee50d719ef81e --- /dev/null +++ b/Formula/a/auditwheel.rb @@ -0,0 +1,56 @@ +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/e4/6a/9582a6a14bdde843f57ef34a4a92197e80fd3a1dab64f8d3c10f96fa9fb4/auditwheel-6.3.0.tar.gz" + sha256 "05c70a234fa14c140aa6d9076135d9550962d95849911b8d5d0419a3add09f00" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "516000f5c56e30d727203afd6bfae0b1a4816a8c47ab80fe17106ce40c081661" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7255376045ab11d4661892684a730b0074bc2e9f562b80c8d42830123a69c3aa" + end + + depends_on :linux + depends_on "python@3.13" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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 = "linux_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 = "linux_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..107820278fc48 --- /dev/null +++ b/Formula/a/augeas.rb @@ -0,0 +1,93 @@ +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 + + bottle do + rebuild 1 + 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..b8e0212940895 --- /dev/null +++ b/Formula/a/augustus.rb @@ -0,0 +1,60 @@ +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 9 + head "https://github.com/Gaius-Augustus/Augustus.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2ddf6c680cfc4d37f2f5f7b4b9b5faa71538d97ab71f44b2b97893bb8233cc4e" + sha256 cellar: :any, arm64_sonoma: "53540ba4b764ca176dcc661c80a1a3e70c4bd5aad113c1cddaa9cc56d99edf41" + sha256 cellar: :any, arm64_ventura: "bb619314f3d0aeacc0e8f6ae9c733ecf3e02b72765113d7ea306567f1df069ba" + sha256 cellar: :any, sonoma: "81e82f22d4d7e5de19ba30f8491d48e03f9d9a410773d07fdf40afd0252f9bbb" + sha256 cellar: :any, ventura: "69aa5e235f2462f35c8c4da01acc565e0121ecd0b1c4bbba41943ff5f12f1a23" + sha256 cellar: :any_skip_relocation, arm64_linux: "307e210b3938c6979d15dc96851ec826ce66a2f519d2ba397da4a914998cbd3d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a272bbb973215e5a8b4167bc31fe5c039664d118514370761b2a92cf7cdd6a2" + end + + depends_on "bamtools" + depends_on "boost" + depends_on "htslib" + + uses_from_macos "python" => :build, since: :catalina + 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..cd5663a3d3534 --- /dev/null +++ b/Formula/a/aurora.rb @@ -0,0 +1,35 @@ +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" + + bottle do + rebuild 2 + 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, mojave: "21abebb582fbac2ebb400328b455c890206f78ae0910f75ded8019bfc6a40c1f" + sha256 cellar: :any_skip_relocation, high_sierra: "e3e9b06b4b9053afb4b75b48d90555d00fcc8404309d8b2b2b336538810746cb" + 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..fdf50f7155251 --- /dev/null +++ b/Formula/a/austin.rb @@ -0,0 +1,42 @@ +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/v3.7.0.tar.gz" + sha256 "225968a4302529b62d212db07fa692446a6df58049f2f444011ef4866604339e" + license "GPL-3.0-or-later" + head "https://github.com/P403n1x87/austin.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3e3d0412250ee9d07be534682f9dc585ca5300a1baf6d6fbf5430f0458fa6bdc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e015dcfe89db3a0a8f0a25d3758caf576601f2afe606c68dd0e4e1cda0615b44" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cafa89876000e876f272da9f9fbcffd00a163a698163e63d68a47974198f0c3b" + sha256 cellar: :any_skip_relocation, sonoma: "a9605282d9c525276e6fce34fd10b2aef37b4b8acffffdaf79d1862e3bac22ab" + sha256 cellar: :any_skip_relocation, ventura: "cf403c1e23f28ca7ac25153fefe8ea3459b50828a036bea52bd89783648177fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "55ad016d651f53868112221d8bc3945322c218e8e1138f00e94ce0115ee1cdf3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23f61750c13e6ad73505a47841f627c537eb23ce2259fcc7efb723e6aeb4396f" + 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 + if OS.mac? + assert_match "Insufficient permissions. Austin requires the use of sudo", + shell_output(bin/"austin --gc 2>&1", 37) + else + assert_match "need either a command to run or a PID to attach to", + shell_output(bin/"austin --gc 2>&1", 255) + 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..1d8739e3352e2 --- /dev/null +++ b/Formula/a/authoscope.rb @@ -0,0 +1,50 @@ +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" + + bottle do + rebuild 1 + 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..bcbc5a29d50e2 --- /dev/null +++ b/Formula/a/authz0.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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, 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..60113809bf017 --- /dev/null +++ b/Formula/a/autobench.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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, mojave: "7306e126fae18f469488e3c3952ff8bd67af967510ffd6a021914a59556e0419" + sha256 cellar: :any_skip_relocation, high_sierra: "02e3a2a6aa7c3e2d6d0a4500445c7b08bd0804dac28d863944dfd48d41f025d9" + sha256 cellar: :any_skip_relocation, sierra: "daecaaf9c3a733c7667c5414371ba948896b0c0eb47dfd1b1ce876921c829390" + sha256 cellar: :any_skip_relocation, el_capitan: "37bb6f40825953f9ba176522bc64d74a6375304d7963331aee937417e339964f" + 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..808d243200c98 --- /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.62.0.tar.gz" + sha256 "efecb61c01a9531154c2ce5ded664c869614f5c166692c469f64e845ccc1ffff" + license "GPL-2.0-or-later" + head "https://github.com/autobrr/autobrr.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ac01e053dcc2b3e510940182d40cf63701549e594c40a5c7280531bf58521bd6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cbb807765b922c2c342d75650a923751627fe0b4cc9faef23efb92cdeaffe45c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5d12c71899afc1e6741938e29d98327d4138f5efb5f80ab805353a2a6aa93b22" + sha256 cellar: :any_skip_relocation, sonoma: "830cb20e08cf00eb7699c11548d707edd005e498c75b1354e81a9d15e6b95800" + sha256 cellar: :any_skip_relocation, ventura: "a1bd482f7859a4b0dec6f0ad880c2a591f564f19e3358de81b9d9043c4ab0ba1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09a0c1f580eceecf7bbc46ef173104e5a87cc2ca6a1e9550831853236ecd6068" + 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..962d66bb9a837 --- /dev/null +++ b/Formula/a/autocannon.rb @@ -0,0 +1,25 @@ +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" + + 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..533a7012bcc42 --- /dev/null +++ b/Formula/a/autocode.rb @@ -0,0 +1,48 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "44742d0ccc3af3f27590445dbf2e89dffd8e684ff81521b5dc421449507879cd" + sha256 cellar: :any_skip_relocation, high_sierra: "a11f1fbbbf04052b9885a00abc88e7539a6c1992e35a62c6776df7ea32daf890" + sha256 cellar: :any_skip_relocation, sierra: "f369819b2f33327071a68455a14f66855286c7614977f06704f21c38e2df5f89" + sha256 cellar: :any_skip_relocation, el_capitan: "c321c73e1662332392c5949467c544e18db30849019555086ad14eeb097656d2" + 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..8ab01732d0b12 --- /dev/null +++ b/Formula/a/autoconf-archive.rb @@ -0,0 +1,46 @@ +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-2024.10.16.tar.xz" + mirror "https://ftpmirror.gnu.org/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_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..1ad2988a1bbbe --- /dev/null +++ b/Formula/a/autoconf.rb @@ -0,0 +1,62 @@ +class Autoconf < Formula + desc "Automatic configure script builder" + homepage "https://www.gnu.org/software/autoconf/" + url "https://ftp.gnu.org/gnu/autoconf/autoconf-2.72.tar.gz" + mirror "https://ftpmirror.gnu.org/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" }, + ] + + bottle do + rebuild 1 + 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, 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..827ef9c2c0e30 --- /dev/null +++ b/Formula/a/autoconf@2.13.rb @@ -0,0 +1,44 @@ +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" + 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, mojave: "5257ef101823cbf8d20693e27bf4505aec149c7d588459fedc2791a7906eb444" + sha256 cellar: :any_skip_relocation, high_sierra: "5257ef101823cbf8d20693e27bf4505aec149c7d588459fedc2791a7906eb444" + 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..5edf10bd65a04 --- /dev/null +++ b/Formula/a/autoconf@2.69.rb @@ -0,0 +1,67 @@ +class AutoconfAT269 < 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" + 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, mojave: "f91f5a4d756aa9f3f73b725578568f5310c40adf702338b656876a5016cca401" + 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..8720585b6a83a --- /dev/null +++ b/Formula/a/autocorrect.rb @@ -0,0 +1,32 @@ +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.14.0.tar.gz" + sha256 "10efdbaf2bf3e5e1ac672598608ebb434b91aefaf97cd53795f4dcc4e681237b" + license "MIT" + head "https://github.com/huacnlee/autocorrect.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ca7f521e32cb23ddce0780b9ad08ffbb282cb0fb397ae8b90f39ac6804464992" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "beda25be453e44c6e9bccfba0b39488e022ecb14c5525770378e33496db74fd1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "97fb6ad180d0a28c8eb11a0696aff25cb246e70b3527d56eb37ad69c1cbb967d" + sha256 cellar: :any_skip_relocation, sonoma: "e46a5c150623cb6efed58754f2537c268a432ed3fd378048b3ae4db89517756c" + sha256 cellar: :any_skip_relocation, ventura: "65cdd1a7e76e4c1df017d988998f0d430638c63a368a6d6cef6d03da2b4a888a" + sha256 cellar: :any_skip_relocation, arm64_linux: "401c6718327d1773c5f5e04013d5d9b6aed38ca95f6ba226ca95e2af76001b40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e450c33c1d53e9f7b6ca6a3e24d70d12fd0d9ba5c0b9348f901c439630bbe9a9" + 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/autodiff.rb b/Formula/a/autodiff.rb new file mode 100644 index 0000000000000..fa7b29b7999c5 --- /dev/null +++ b/Formula/a/autodiff.rb @@ -0,0 +1,52 @@ +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" + head "https://github.com/autodiff/autodiff.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e35fef20edd7f2dc9b18d7f1a7f37d7cde1bb6d9154d7a2992c283baf111855b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ffd7fdaf5ddf5ed5729344e6a1e8065a71aa29ab6c2038d51d0e2c0e3655c0a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "11282c10e5cee0cf915621a24c511a87a5721ceef2f659e2adbdd458c787bf74" + sha256 cellar: :any_skip_relocation, sonoma: "2534cac50c7135f77ee140e68802bb0751cd40e5e6f6950ba11115b18eb2b755" + sha256 cellar: :any_skip_relocation, ventura: "70ba0bf70fe3212bcdf215f1210b44b3e093da1eb06140a397335d3cfd37ae14" + sha256 cellar: :any_skip_relocation, arm64_linux: "8200c3f1ef1a2bfe0f357b02ba8d63de6d89094623729b5e33ef7affd2f1d342" + sha256 cellar: :any_skip_relocation, x86_64_linux: "123363de8b59cbc789b655d7ed2fca5acb59dc9d39b5690df5d874a7e8bba85c" + end + + depends_on "cmake" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "eigen" + depends_on "pybind11" + + def python3 + "python3.13" + 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"].opt_include}/eigen3", "-o", "forward" + system ENV.cxx, pkgshare/"test/reverse.cpp", "--std=c++17", + "-I#{include}", "-I#{Formula["eigen"].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..4fc17ca479b6c --- /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: "master" + + 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..e26cd0f57483e --- /dev/null +++ b/Formula/a/autogen.rb @@ -0,0 +1,103 @@ +class Autogen < Formula + desc "Automated text file generator" + homepage "https://autogen.sourceforge.net/" + url "https://ftp.gnu.org/gnu/autogen/rel5.18.16/autogen-5.18.16.tar.xz" + mirror "https://ftpmirror.gnu.org/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 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..c24ab83808b1d --- /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 6 + sha256 cellar: :any_skip_relocation, all: "b172a04f1d109b558ed126cc14250e41e804adecbdcf9f1ef68941825613b283" + end + + depends_on "python@3.13" + + def install + python_bin = Formula["python@3.13"].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..ea4f5fd89998d --- /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://ftp.gnu.org/gnu/automake/automake-1.17.tar.xz" + mirror "https://ftpmirror.gnu.org/automake/automake-1.17.tar.xz" + sha256 "8920c1fc411e13b90bf704ef9db6f29d540e76d232cb3b2c9f4dc4cc599bd990" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7e4b29a71b7f3b192f6dcc3bcf5b794a4548786c66df2f2ef71cf097099c6825" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aaf3cb57d50c48af4886c0cd24340aa6ca5628feac4a566254a878f378aaa2e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aaf3cb57d50c48af4886c0cd24340aa6ca5628feac4a566254a878f378aaa2e5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "aaf3cb57d50c48af4886c0cd24340aa6ca5628feac4a566254a878f378aaa2e5" + sha256 cellar: :any_skip_relocation, sequoia: "3b8ba6298652b182425648330075f40f7fa6e55296a7463accc47884ecd26c67" + sha256 cellar: :any_skip_relocation, sonoma: "5548bc61f131a45a0aad86b38f044530a51b10243a95188101438e42842f10d9" + sha256 cellar: :any_skip_relocation, ventura: "5548bc61f131a45a0aad86b38f044530a51b10243a95188101438e42842f10d9" + sha256 cellar: :any_skip_relocation, monterey: "5548bc61f131a45a0aad86b38f044530a51b10243a95188101438e42842f10d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "560980404766bba3c998179b0055afd67cfbab0ce09d8f001530fe31988b7565" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca591433edbdc896db26cea86f61dfbacea15e794828e7280482de2126d89e3e" + 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..5d4621421aaef --- /dev/null +++ b/Formula/a/automysqlbackup.rb @@ -0,0 +1,59 @@ +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 + + bottle do + rebuild 2 + 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..0c734ccdb7c85 --- /dev/null +++ b/Formula/a/autopep8.rb @@ -0,0 +1,29 @@ +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 + sha256 cellar: :any_skip_relocation, all: "39c0c9c5772b9e788f36085b19638b0259fbf528267f56694e0b92a367941c16" + end + + depends_on "python@3.13" + + resource "pycodestyle" do + url "https://files.pythonhosted.org/packages/43/aa/210b2c9aedd8c1cbeea31a50e42050ad56187754b34eb214c46709445801/pycodestyle-2.12.1.tar.gz" + sha256 "6838eae08bbce4f6accd5d5572075c63626a15ee3e6f842df996bf62f6d73521" + 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..0fd6d6afef14c --- /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, mojave: "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 + + 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..9233179a12341 --- /dev/null +++ b/Formula/a/autorest.rb @@ -0,0 +1,39 @@ +class Autorest < Formula + desc "Swagger (OpenAPI) Specification code generator" + homepage "https://github.com/Azure/autorest" + url "https://registry.npmjs.org/autorest/-/autorest-3.7.1.tgz" + sha256 "fe148defacd8f859b6f1fb9284e4ff685b242a7581452a1c1b432b5d8c528ee9" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e83b47baa0ca32e782bee30fb9370448ffc422da79bc9e908456cf1703e1e80e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e83b47baa0ca32e782bee30fb9370448ffc422da79bc9e908456cf1703e1e80e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e83b47baa0ca32e782bee30fb9370448ffc422da79bc9e908456cf1703e1e80e" + sha256 cellar: :any_skip_relocation, sonoma: "a723686fd868adf61661dc45f12e286dac112866af987abb041ad828aad82988" + sha256 cellar: :any_skip_relocation, ventura: "a723686fd868adf61661dc45f12e286dac112866af987abb041ad828aad82988" + sha256 cellar: :any_skip_relocation, arm64_linux: "64ffb4481a753a24a50ec78c9ce070b516f7ebdce473b829be961c172b763370" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e83b47baa0ca32e782bee30fb9370448ffc422da79bc9e908456cf1703e1e80e" + end + + depends_on "node" + + resource "homebrew-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", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + 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..6f9d13efc380a --- /dev/null +++ b/Formula/a/autorestic.rb @@ -0,0 +1,46 @@ +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_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, 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..7f810ae31a396 --- /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 + + bottle do + 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, mojave: "2674ee43690b5d99490a0979359fdefa52033650b935547a6353de726f916275" + sha256 cellar: :any_skip_relocation, high_sierra: "f88fcb32499fff8aa2899c85fc39dc6678ebed2849791a4312d427d9073b6b98" + sha256 cellar: :any_skip_relocation, sierra: "78d258f52bc14a2539da8c6d3ce69db5c062bb70e95130d9f22113720f853c67" + 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..a740072f0f3ca --- /dev/null +++ b/Formula/a/autotrace.rb @@ -0,0 +1,69 @@ +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_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..9b907755e052e --- /dev/null +++ b/Formula/a/avanor.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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 mojave: "ca4aef9b5bceb8f3dddd89f58846f4d9cfbddf2f108a7e8e39d262e92ea9bac4" + sha256 high_sierra: "d99615cac684c32894df532e78452b2542ba857ce69fa58d39e54bcc2fe4ca4a" + sha256 sierra: "848e96ed26b258042b77a3c2139398b8e6f62722719263c082fb4c6655ffd4bc" + sha256 el_capitan: "a66b436a645cafa77a5bd79d22f314ff2b9331526f5efeaf79d38346647cad66" + 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..79a67defc1b8a --- /dev/null +++ b/Formula/a/avce00.rb @@ -0,0 +1,45 @@ +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 + + bottle do + 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, mojave: "285b4eb74ff189689097df36f62fa4c2a48b68ece7442156a5700b6c36feb743" + sha256 cellar: :any_skip_relocation, high_sierra: "40b26638adfaf290bc07ae792da49106b493ea3109a97c1fac775723a0463ac4" + sha256 cellar: :any_skip_relocation, sierra: "576b5ea62376b42733d56e7bd862522588c16160ac1abb5f382c1c12055248e1" + sha256 cellar: :any_skip_relocation, el_capitan: "45f18e289431af4de0d1e96c1fadd6a056e80907a1650654f8ee0dd1dafab401" + 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..9e81e6ee31ed4 --- /dev/null +++ b/Formula/a/aview.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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, mojave: "fe70cf7dbd1d2e1473da3818b96d3a94d811e93d52ecbb6ecfc1c1e1ccb8b12a" + sha256 cellar: :any_skip_relocation, high_sierra: "4f5fa09318475fca46c584b52e5d5b845cd4d331df04744ca41d6789575b32ec" + sha256 cellar: :any_skip_relocation, sierra: "95cbb14a2a5cb4d8d11d9ca3621e81705df77f47d85f89383913e3a02da56041" + sha256 cellar: :any_skip_relocation, el_capitan: "cb20b8513b3b7d2977943d7ba14f2627892697e9a6b69c4366563786810ca95c" + 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/formula-patches/85fa66a9/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..2172ed7d2f39a --- /dev/null +++ b/Formula/a/avimetaedit.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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, mojave: "2ee42355aa90d5bc5ca8c61dc0c02274edd9c723b8a5b65595285319e9b7dda6" + sha256 cellar: :any_skip_relocation, high_sierra: "323673de85bd3c8f272d5f8d0b32d34304faaa02f88c2ce44f08c697266e889e" + sha256 cellar: :any_skip_relocation, sierra: "75d65e8ef1ecf31ebb016aa7e1a940bdaac33042af895729a230b6ee4beab3f0" + sha256 cellar: :any_skip_relocation, el_capitan: "41873fc416d070f417f1387e50515ffa099018c2f8ef27a2b8ce8b8a94b5c43f" + 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..31b2b94ad06db --- /dev/null +++ b/Formula/a/avra.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, mojave: "cedf5547712134c47d3659e1cddde7d506643448eca98fb428734165fbb5afc7" + sha256 cellar: :any_skip_relocation, high_sierra: "f380ed5ddc18ece7b83f4c32290f56dfcc8a27065cc1a39423debfc482d369d2" + 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..1ea65192646b5 --- /dev/null +++ b/Formula/a/avrdude.rb @@ -0,0 +1,59 @@ +class Avrdude < Formula + desc "Atmel AVR MCU programmer" + homepage "https://www.nongnu.org/avrdude/" + url "https://github.com/avrdudes/avrdude/archive/refs/tags/v8.0.tar.gz" + sha256 "a689d70a826e2aa91538342c46c77be1987ba5feb9f7dab2606b8dae5d2a52d5" + license "GPL-2.0-or-later" + head "https://github.com/avrdudes/avrdude.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "5f07f2d83f042eb50e5c8deb859da2ea9311e1e64d85f019447812c5d2b8502b" + sha256 arm64_sonoma: "486585890c5ab7dc3c57e3be076e65d4a050c34cc3becbbe74cf257e3f8b0ad0" + sha256 arm64_ventura: "b2076d454725e67bda7bda9c14273372bc75b58cc8d8ca05402d7e05127a9997" + sha256 arm64_monterey: "2f5a803452cacd443bdbfb32acf4c9e25f43222518db5bf2cad81712dde50da2" + sha256 sonoma: "b3da9285a6b2c4d0a490362f3536e95e7364bc8ba95112b2eab123c69c3bc393" + sha256 ventura: "97d2a1fb9eab66186bb32320c0a4be603e22dc79271cc92f8c858ce818651120" + sha256 monterey: "d7f62c95f739d8fbeb35d45db9f3b49732e68df5d5bb99ddb19a156ed1e6971f" + sha256 arm64_linux: "9985c193d4ab02a2cda981313bf94228b7668a3e5c508cf7bcf5c8539def4127" + sha256 x86_64_linux: "6a89480ec589d1823abcb3496619bca89e257b914815b32f00b225e45beea62a" + 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..4c185f4ca6b14 --- /dev/null +++ b/Formula/a/avro-c.rb @@ -0,0 +1,48 @@ +class AvroC < Formula + desc "Data serialization system" + homepage "https://avro.apache.org/" + # Upstreams tar.gz can't be opened by bsdtar on macOS + # https://github.com/Homebrew/homebrew-core/pull/146296#issuecomment-1737945877 + # https://apple.stackexchange.com/questions/197839/why-is-extracting-this-tgz-throwing-an-error-on-my-mac-but-not-on-linux + url "https://github.com/apache/avro.git", + tag: "release-1.11.3", + revision: "35ff8b997738e4d983871902d47bfb67b3250734" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5b573d22c1090a79e1fbca6318cbdaa497d7114d02cf69aac9fc4aad77b8489f" + sha256 cellar: :any, arm64_sonoma: "486572382a8323c7816b6244588ecbd2dbf4d39fb1deea0c12600abe86df2f29" + sha256 cellar: :any, arm64_ventura: "753a5f373fb25d3d992539750fa36b68a981d7529fee9eb6b702090e61dc5939" + sha256 cellar: :any, arm64_monterey: "a67d4adccc1ab3face3d67c7fbfcd85701eefd48d200f6897e4ad05aa91b0b26" + sha256 cellar: :any, sonoma: "9b78764d59ba53b7472c07367e63f04b3168ddbb0dac230216e4188165285b10" + sha256 cellar: :any, ventura: "21ab5db9c56aeda49e97fd561116d8e554b7bba66d2d3cb7d19db4cb40fc1852" + sha256 cellar: :any, monterey: "fe874bc1b1f28d006e362b10543cb63b06ceb99baaa90b1d4ac9c87b33d24ffe" + sha256 cellar: :any_skip_relocation, arm64_linux: "856002dd51c19c19e61cab28f5d6990a9b4f1e923f1bab94f3096b8136eb2dce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0385f75fb76a3c8bf9cb71e85a0db0c5b1563481ec19afdb6f985a58065c4141" + 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", "lang/c", "-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" + system "./test", ">> /dev/null" + end +end diff --git a/Formula/a/avro-cpp.rb b/Formula/a/avro-cpp.rb new file mode 100644 index 0000000000000..b737d008bf347 --- /dev/null +++ b/Formula/a/avro-cpp.rb @@ -0,0 +1,60 @@ +class AvroCpp < Formula + desc "Data serialization system" + homepage "https://avro.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.11.3/cpp/avro-cpp-1.11.3.tar.gz" + sha256 "fba242aef77ec819d07561fcba93751721956de8d0cae8e1f2f300b54b331bae" + license "Apache-2.0" + revision 6 + + bottle do + sha256 cellar: :any, arm64_sequoia: "82b1a0dea57a3a31212c4276544e531efba46f7d19b45a9fc0b99a0b4a68c9d0" + sha256 cellar: :any, arm64_sonoma: "ea66a997dbb67c668b2efeefc6c55d99bb18eba228107a80ca62eab4c0e6d616" + sha256 cellar: :any, arm64_ventura: "cb8df69dec1f3fd1fc81b92439e5f790f5d0b9b15c813c09fd67d2bce97faea8" + sha256 cellar: :any, sonoma: "1e6a8d749991317610e3b6ea1138a8e4d76d900a3aa705b5367cae864b2ee5b4" + sha256 cellar: :any, ventura: "bff702fbaa5e5d3804c890b944ae5f89466adab8cc589b6d69242f128bd9680f" + sha256 cellar: :any_skip_relocation, arm64_linux: "9031c2d1bff4c0f2ceb59ae01efd28e0a983fd7d49eb8ab7a0e0dfbb4f8e1293" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b869f1c4d9cb66d3cc15dbdb24ca17ad431d457807bfc7dab3aca7fe3015831" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "boost" + + # Backport cmake_minimum_required update + patch :p3 do + url "https://github.com/apache/avro/commit/3aec6f413e3c47536b33631af5c18e685df0b608.patch?full_index=1" + sha256 "c3f7ec1915e63c0ad08f277cf3392217e31eb11b6b2822f3a21d241901f461c7" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_CXX_STANDARD=14", *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++14", "-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..e0f5316d7631b --- /dev/null +++ b/Formula/a/avro-tools.rb @@ -0,0 +1,31 @@ +class AvroTools < Formula + desc "Avro command-line tools and utilities" + homepage "https://avro.apache.org/" + # Upstreams tar.gz can't be opened by bsdtar on macOS + # https://github.com/Homebrew/homebrew-core/pull/146296#issuecomment-1737945877 + # https://apple.stackexchange.com/questions/197839/why-is-extracting-this-tgz-throwing-an-error-on-my-mac-but-not-on-linux + url "https://github.com/apache/avro.git", + tag: "release-1.11.3", + revision: "35ff8b997738e4d983871902d47bfb67b3250734" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0c9a211ec08bf395ec8ee998b5ba200da009d31918e1046b8fc4560d8c6fb57a" + end + + depends_on "maven" => :build + depends_on "openjdk" + + def install + cd "lang/java" do + system "mvn", "clean", "--projects", "tools", "package", "-DskipTests" + libexec.install "#{buildpath}/lang/java/tools/target/avro-tools-#{version}.jar" + bin.write_jar_script libexec/"avro-tools-#{version}.jar", "avro-tools" + end + 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..9a6ff89b6b8a5 --- /dev/null +++ b/Formula/a/awk.rb @@ -0,0 +1,34 @@ +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_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..acf651378e5da --- /dev/null +++ b/Formula/a/aws-amplify.rb @@ -0,0 +1,55 @@ +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-13.0.1.tgz" + sha256 "fe7b1b6a7aa426612031a8712a0ae70ab94b24f6072a8866e92c12fe2598cc68" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "489dbddaaaa5293c2fc43c1e8f367aec51630d4979f8e9f1557a868a336398dd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "489dbddaaaa5293c2fc43c1e8f367aec51630d4979f8e9f1557a868a336398dd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "489dbddaaaa5293c2fc43c1e8f367aec51630d4979f8e9f1557a868a336398dd" + sha256 cellar: :any_skip_relocation, sonoma: "1120ac36e1da8e1521001928f952de2da94dfbf66ea059df558f6be80df9556f" + sha256 cellar: :any_skip_relocation, ventura: "1120ac36e1da8e1521001928f952de2da94dfbf66ea059df558f6be80df9556f" + sha256 cellar: :any_skip_relocation, arm64_linux: "489dbddaaaa5293c2fc43c1e8f367aec51630d4979f8e9f1557a868a336398dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "14ac446d69172e164ece46c26cdf0ea866e0d1c2e57991e4aee0e3157776e4de" + 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..d50bdb816d8b5 --- /dev/null +++ b/Formula/a/aws-auth.rb @@ -0,0 +1,34 @@ +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 + + 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..802949031d59e --- /dev/null +++ b/Formula/a/aws-c-auth.rb @@ -0,0 +1,59 @@ +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.0.tar.gz" + sha256 "aa6e98864fefb95c249c100da4ae7aed36ba13a8a91415791ec6fad20bec0427" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "06df88080fcfaf6fe91a2c540b871a0c77a141ae1dbe8b73668e03eb55d0b67e" + sha256 cellar: :any, arm64_sonoma: "0c3c13ae6687460c5f29617c7c486260d3bc39cc7a496cde5daa2f3c36e42dd4" + sha256 cellar: :any, arm64_ventura: "cf5e60be0f03a5525711c583ffd9c493a04a98e4826761cfd5ff14545ab8b69e" + sha256 cellar: :any, sonoma: "49dfff5ac5771443df5b68926932e75f0a40a16843b4178ffcbac5112321142c" + sha256 cellar: :any, ventura: "c317c5c9f21dfac42f85f26189bae9b63dc40930e013c18a56eb9b50318ce2b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "75e6ac9faec17da32024b9facb7f1ff8ab418e069d3657ee98c3e73a96202384" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ad423d2062cee09491d1c0fcdbf1f9699bdaa65ec2072552108fa0ce2070f3f" + 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..10c91ec3a69de --- /dev/null +++ b/Formula/a/aws-c-cal.rb @@ -0,0 +1,79 @@ +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.0.tar.gz" + sha256 "516ff370a45bfc49fd6d34a9bd2b1b3e753221046a9e2fbd117341d6f9d39edc" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "805db23f20f56165982128815270e0d3d7569586ffded08cf68a00963b8ee28b" + sha256 cellar: :any, arm64_sonoma: "be94a8aaeebd6b19862d159fb337ab434c7c941214b80ee689b7106c75aee5ae" + sha256 cellar: :any, arm64_ventura: "52ea1d565cba9ec99425c7ade3467106ce3d43738b215fa71763b3a78bfa7a3c" + sha256 cellar: :any, sonoma: "fa872ac3994aaf19acf3a0f35a2da052f28e9ec756b727ad13e981024430e133" + sha256 cellar: :any, ventura: "c9e9057029659df7cd6fa49d928de060e4d7388eeeed78c4dcbab3f86677ffec" + sha256 cellar: :any_skip_relocation, arm64_linux: "241f6e37d440e972c7cd08c5bd447fdc1e587fc24669fabec0107f4c458f2ac9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6a9a426ca086dc2bddd15b51b7d3fddcf23142b9854a00711bdd07290918e00" + 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..941346dba67dc --- /dev/null +++ b/Formula/a/aws-c-common.rb @@ -0,0 +1,52 @@ +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.3.tar.gz" + sha256 "a4e7ac6c6f840cb6ab56b8ee0bcd94a61c59d68ca42570bca518432da4c94273" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "62216a819dc3fc7e4534b1aa90bf5ceadd0b3ab12e90c3286755e7eeef3e1f28" + sha256 cellar: :any, arm64_sonoma: "735111272de4dbc4d9c0a95a867841a78288e3f4ea87464916c2929c180b9bcf" + sha256 cellar: :any, arm64_ventura: "7b5aeb2235e34c57c7cf649b99a96f41ef422d97a4a835d2df0f7979130f7ff1" + sha256 cellar: :any, sonoma: "0bcccffc3df99c0bc4714af8c5991c49b849e063b0db11542f11956987966c09" + sha256 cellar: :any, ventura: "3788ae3a3386b973dded01eb568b2c44aa587ef064aecdee5b14091d3ac1eef5" + sha256 cellar: :any_skip_relocation, arm64_linux: "bace9eb894ecc5047c4e2d617c4650a2f00aea7fec4372d1b9fb3a089b51b5e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "59b1efeeb051f62759b0fac6fe18fc0bd34caab96b2be74ebf4925325207db30" + 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..20acf9fdf521a --- /dev/null +++ b/Formula/a/aws-c-compression.rb @@ -0,0 +1,53 @@ +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_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..fc06c772f557a --- /dev/null +++ b/Formula/a/aws-c-event-stream.rb @@ -0,0 +1,61 @@ +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.4.tar.gz" + sha256 "cef8b78e362836d15514110fb43a0a0c7a86b0a210d5fe25fd248a82027a7272" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7bb1c234fc76207143274392938efa1c7912b82db36c2d7bd3e1ff31c2b21a97" + sha256 cellar: :any, arm64_sonoma: "22adf47866d7f196b5296469044723b94223a3c536590517605930a8c76461ec" + sha256 cellar: :any, arm64_ventura: "fea45020a2341c46d9671671bc59bc788c4301615d5365e44cde87fca734f0f6" + sha256 cellar: :any, sonoma: "50ab76b1c74f6639a8af58478426de6e91201d1f0a32a81d3d20b63c6da44de1" + sha256 cellar: :any, ventura: "7cb1403ff68bd39da60c9051539cb3b9f88447baf5e199e6805bcdb8ec2a2ea2" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2903ade590868a253d877b9c85684fa1a128d263141a3360833ea67692bf3d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4bd0d80ba4c490b1e0548caad95670e5c6937e5056b8945e11c2f58bde41d36" + 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..aba789244d12c --- /dev/null +++ b/Formula/a/aws-c-http.rb @@ -0,0 +1,65 @@ +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.1.tar.gz" + sha256 "1550f7bf9666bb8f86514db9e623f07249e3c53e868d2f36ff69b83bd3eadfec" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9c62bac1870464c899f51ea35594c42b899c984ca0ef024ff8b940accd47208a" + sha256 cellar: :any, arm64_sonoma: "3ef352a205052d81964cb755837485467b4d38f7919f3311e540002fbb8749b7" + sha256 cellar: :any, arm64_ventura: "94fffcd8914b2d240343ec248aa2570d67616a5da55410f7db9db5bf2f18112f" + sha256 cellar: :any, sonoma: "583fd37b1b5d315e0762cf09d6d7c7914497fc689bf18871e91d30615b33e871" + sha256 cellar: :any, ventura: "3f63fd6f3350754cecf0b8b49c29163ff6b15cebc1c7faab73b6ff5bb14d94e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "1fcd2423f617f91732e80d125bbed04c661a655fcd3676f515d509c63c83ead7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6fad1d2a8092a5ce2edf330aceba0be19fe4005f439db68f683e2089f4ad50de" + 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..375ce22432528 --- /dev/null +++ b/Formula/a/aws-c-io.rb @@ -0,0 +1,60 @@ +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.19.0.tar.gz" + sha256 "356733a0d66f13a3f33fca709a693049615ec908ed3737b99d2f138055ebcbaa" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "22c280480457b84d92ddbf544956ccf5026d1c45465a8c192ea8eb0c4f2263cd" + sha256 cellar: :any, arm64_sonoma: "d5cf901b045a61abf071501cc8f5d0caa8f4741f00f628dc3761ec77efbc0534" + sha256 cellar: :any, arm64_ventura: "fd78138cef5bbf6f6ba9a958592c7659dfd82889bcc794038bf6ab5175b9a456" + sha256 cellar: :any, sonoma: "a399517cf41b75f7a3e6d658e36b8559310c51691b7663925d9970448191f092" + sha256 cellar: :any, ventura: "0dd749486084ad43622f060a726626c8978cf45c09b6a04b715adc7c96058c38" + sha256 cellar: :any_skip_relocation, arm64_linux: "327c94b8e58318294038871eda54393d75065081ac3d27b4d5842426140b6d50" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12f0ea2e9cd3385ed9943521d90adfd3b33f451661602da22869951c51265a7d" + 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..4f630e800854a --- /dev/null +++ b/Formula/a/aws-c-mqtt.rb @@ -0,0 +1,49 @@ +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.0.tar.gz" + sha256 "8aa9e5b8f90a6aecdb85e83786b3543afa2a414738049447fd3ba5d1afef519b" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "67dd4fb63aaa44517a0cd5e239fd735812ab09b611a12ab7346278ea578615a6" + sha256 cellar: :any, arm64_sonoma: "d7bfff91cb2a3462dd93531265b2e7a95119cd5f623db95e6942ca16a85c89cd" + sha256 cellar: :any, arm64_ventura: "6525b026355512b3fe07e8c46cffa03c2d06c00cd228446a288398f750028119" + sha256 cellar: :any, sonoma: "aa0e9510b7481c84a7d029a527e872accd48054962ce9a40e65dd4f5eb034fe0" + sha256 cellar: :any, ventura: "7adc49880f296aadde444b76aece62e0b2889b2db932e3102f8ae65d43d0b06c" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d6446660156fede7509431a1d735df39f870f4a79251a727dd263e807f69567" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7288c750bf652b87b4a78638fa09835ff355dd40e053b4216b08a5445dc202cd" + 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..16edb9dbad0d6 --- /dev/null +++ b/Formula/a/aws-c-s3.rb @@ -0,0 +1,70 @@ +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.7.18.tar.gz" + sha256 "89cf4a4906ebfd761c85acd161664c5cc640606a90daf8f06f681d4d939454fc" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "64590908af6def4cbf06a5c3ad0cdccbc3bd25ea8f7630492268e70b9bd53527" + sha256 cellar: :any, arm64_sonoma: "0114a8034444ea1b6215fcf3f1ed71a1674a98481013ce0ed786bc3e687a3fe7" + sha256 cellar: :any, arm64_ventura: "90d58e0e9bfb36c75a00f41e579ea3a474c7d5dba4445261472ed86c16ad3d5f" + sha256 cellar: :any, sonoma: "b430b587aef555d2347817995a4ae2b54bf849d6e6c2f78f559ec516cdf6b6f5" + sha256 cellar: :any, ventura: "3da375777698b64bb3a9810e5922d86affda4b43d4a80baa0f7059f72a56fb49" + sha256 cellar: :any_skip_relocation, arm64_linux: "cdb2667ffcc1f926644fb66dc3214137d4ae196cd4eac6cc4218029990fb7fa4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f55da7ebe36fc95007339f8ecbb38f3dc32bc73dd3f4bcfc66a376bf4d57aa6" + 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..54f0d4c32b183 --- /dev/null +++ b/Formula/a/aws-c-sdkutils.rb @@ -0,0 +1,63 @@ +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_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..ab469dfaecb59 --- /dev/null +++ b/Formula/a/aws-cdk.rb @@ -0,0 +1,29 @@ +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.1015.0.tgz" + sha256 "c16af1c011aabcdc696ef5ce00deb11d351b8c6fd6145639e26eccf58e322669" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d4e1ca9f2be81f08be86412791251d12b0b0492cfb3338a2ca61924baefb49e7" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + 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..baf42091bc7d2 --- /dev/null +++ b/Formula/a/aws-checksums.rb @@ -0,0 +1,51 @@ +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_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..29c9bf032eb72 --- /dev/null +++ b/Formula/a/aws-console.rb @@ -0,0 +1,33 @@ +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.0.tar.gz" + sha256 "820724a0cde1066345982b81b42921af86906966d0e51151ed24a6e3c1f08740" + 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_sequoia: "624c2e9a156e183546ca612af7e293d44ba60e29267e8b288c85defc3bb6a505" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "624c2e9a156e183546ca612af7e293d44ba60e29267e8b288c85defc3bb6a505" + sha256 cellar: :any_skip_relocation, arm64_ventura: "624c2e9a156e183546ca612af7e293d44ba60e29267e8b288c85defc3bb6a505" + sha256 cellar: :any_skip_relocation, sonoma: "0f4b7f1b4ae0bbfd1eba137db3e02f61b582f0abac18a8354f96f5bcd2c52d47" + sha256 cellar: :any_skip_relocation, ventura: "0f4b7f1b4ae0bbfd1eba137db3e02f61b582f0abac18a8354f96f5bcd2c52d47" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0f2fc520617b2f25edbfa951b4aa501796e845683688a8d0127e3f0be438415d" + 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..7da6716edecee --- /dev/null +++ b/Formula/a/aws-crt-cpp.rb @@ -0,0 +1,62 @@ +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.32.5.tar.gz" + sha256 "45d281d39ea1f70bd3310b2345395d3e5b414da325424938e095dde38d44cccd" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "89cb5502d8e5852eb61769fdd1343f2ae9936c42ec1e2b2060a5ceac210895e2" + sha256 cellar: :any, arm64_sonoma: "004c8107e2674de9f445684221ceb3cec0851deade28b5e1f44ffac1ff07cf4c" + sha256 cellar: :any, arm64_ventura: "1abe12583f934acd6b35e3ee0193a3d12ecdbcdb717e50c5da90ac0a2adfe86c" + sha256 cellar: :any, sonoma: "d9f11af6eab0c14283432a28b6070bcdd71bf9fb22e5aba6980333605e6d2f8d" + sha256 cellar: :any, ventura: "8ba5a989aa8f1bb916a0168974980b0ee41c8545819a40fdc2fde3c939a191f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "d11baa040300a7b63590038ad9cbbae74befb9764310d658881120b1fa26e885" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ccc23710ee558886064065445a77f3007a79ae9bc592e2085da4f543dd331f41" + 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..e0fcae8da34c3 --- /dev/null +++ b/Formula/a/aws-elasticbeanstalk.rb @@ -0,0 +1,124 @@ +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/6b/8b/b03f194f96b0b80112829a604a69d0dcd16a56fd6ee08c07aa8162db3e72/awsebcli-3.23.3.tar.gz" + sha256 "9fe174f19882cb345e412feb8916c3202cc07e05766317bf7f4aa3b1f5f0e5cb" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bff1328c9966afdd7455088015e5f83bb4e3a231e35c8b3bf887425fb7f21e12" + sha256 cellar: :any, arm64_sonoma: "707f8b6734dcd067d451e26957197fab206f6cc316364d44efe2d37c16164c38" + sha256 cellar: :any, arm64_ventura: "d4dd4143491dd1ca1b0199096bcbbcd96131c4b0f5b244e6e7f3c647e517d8fc" + sha256 cellar: :any, sonoma: "910c7bf96f41bead6a7a0df1f5adf13f179431a6c76c09825e8b7a90cdbbbc17" + sha256 cellar: :any, ventura: "09f5966b9a410f9fa0b8dddd030cdd8931cbacb8cf621739063c8b18b5a1bb73" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab37c62254f1d8c6b4a49bffaae1ded14cd98b3f9ea75b2d41f773f3573b0a36" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a36feb727c012195aeead4589036464e60a64b9c9da0c905b6661c2455eaba3" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libffi" + + resource "blessed" do + url "https://files.pythonhosted.org/packages/0c/5e/3cada2f7514ee2a76bb8168c71f9b65d056840ebb711962e1ec08eeaa7b0/blessed-1.21.0.tar.gz" + sha256 "ece8bbc4758ab9176452f4e3a719d70088eb5739798cd5582c9e05f2a28337ec" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/44/c7/e290008036749e43f615adada8b7e73bf2405d4b1913de375b5c8f01daa1/botocore-1.38.7.tar.gz" + sha256 "5c6df7171390437683072aadc0d2dfbcbfa72df52a134a5d4bed811ed214c3df" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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 "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 "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/aa/b2/bd26ed086b842b68c8fe9aac380ad7e5118cf84fa7abd45bb059a88368a8/setuptools-80.1.0.tar.gz" + sha256 "2e308396e1d83de287ada2c2fd6e64286008fe6aca5008e0b6a8cb0e2c86eedd" + 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/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + 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..2856c33583868 --- /dev/null +++ b/Formula/a/aws-es-proxy.rb @@ -0,0 +1,53 @@ +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_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, 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..cc1c648dac66d --- /dev/null +++ b/Formula/a/aws-google-auth.rb @@ -0,0 +1,179 @@ +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 12 + head "https://github.com/cevoaustralia/aws-google-auth.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7d83df21489d783dd82daf5a8d34af0e370808d8fc6181850f68b4f518408b19" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1460955a61fb67dce62f5ce57824d605d3fed8d09bdce625d8e566a8d6cf3346" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7cbe808517b2acea5c6687547dec8ff6eb1c3b243d0527d0bf295f2e406d6f5d" + sha256 cellar: :any_skip_relocation, sonoma: "030b5fb22e8e19ba9c92bfa4355d34e3fd4faa44240cb1d41717e16d4a398c95" + sha256 cellar: :any_skip_relocation, ventura: "91450b77c9258af6395013fe8d9dbae84a23e3201264aa2341cf76ff01210865" + sha256 cellar: :any_skip_relocation, arm64_linux: "8335c8318f352b095f814cd58de9173d60ffb690833edf8dd3ec01d8120952d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9467bf78368ce2444a0ef687e7e00c765b15b54fa67438e105f394a5c6b46b4" + end + + depends_on "certifi" + depends_on "pillow" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + on_linux do + depends_on "cryptography" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/b3/ca/824b1195773ce6166d388573fc106ce56d4a805bd7427b624e063596ec58/beautifulsoup4-4.12.3.tar.gz" + sha256 "74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b8/29/10988ceaa300ddc628cb899875d85d9998e3da4803226398e002d95b2741/boto3-1.35.39.tar.gz" + sha256 "670f811c65e3c5fe4ed8c8d69be0b44b1d649e992c0fc16de43816d1188f88f1" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/28/d83dbd69d7015892b53ada4fded79a5bc1b7d77259361eb8302f88c2da81/botocore-1.35.39.tar.gz" + sha256 "cb7f851933b5ccc2fba4f0a8b846252410aa0efac5bfbe93b82d10801f5f8e90" + 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 "configparser" do + url "https://files.pythonhosted.org/packages/a5/2e/a8d83652990ecb5df54680baa0c53d182051d9e164a25baa0582363841d1/configparser-7.1.0.tar.gz" + sha256 "eb82646c892dbdf773dae19c633044d163c3129971ae09b49410a303b8e0a5f7" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/9d/db/3ef5bb276dae18d6ec2124224403d1d67bccdbefc17af4cc8f553e341ab1/filelock-3.16.1.tar.gz" + sha256 "c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + 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/a5/1c/2bdbcfd5d59dc6274ffb175bc29aa07ecbfab196830e0cfbde7bd861a2ea/keyring-25.4.1.tar.gz" + sha256 "b07ebc55f3e8ed86ac81dd31ef14e81ace9dd9c3d4b5d77a6e9a2016d0d71a1b" + 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/e7/6b/20c3a4b24751377aaa6307eb230b66701024012c29dd374999cc92983269/lxml-5.3.0.tar.gz" + sha256 "4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/51/78/65922308c4248e0eb08ebcbe67c95d48615cc6f27854b6f2e57143e9178f/more-itertools-10.5.0.tar.gz" + sha256 "5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + 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/04/d3/c19d65ae67636fe63953b20c2e4a8ced4497ea232c43ff8d01db16de8dc0/tzlocal-5.2.tar.gz" + sha256 "8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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 + auth_process = IO.popen bin/"aws-google-auth" + sleep 10 + Process.kill "TERM", auth_process.pid + assert_match "AWS Region:", auth_process.read + end +end diff --git a/Formula/a/aws-iam-authenticator.rb b/Formula/a/aws-iam-authenticator.rb new file mode 100644 index 0000000000000..95399b1028d9e --- /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.2.tar.gz" + sha256 "6be693e219de64db593d96dd0f42db0940ddb1ebfb2b289b2f07215f33360d66" + 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_sequoia: "70ea63e77b5ed06c007d944fb266f502a8cd965cc2c1c560b145ef6106bdee20" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "195ffcafa2b4271d800d0e5174348808febe5e0444d36a0ff764c4d36bc332d6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2d0203aeaa13849a36d73c3563efeb52399402e12a3fd4fd53187cdbda93278d" + sha256 cellar: :any_skip_relocation, sonoma: "7d2ce9899159f308d0f1fbd3864dced5c9af2e3d0ccfa4d1d8e44b7f1cf4e890" + sha256 cellar: :any_skip_relocation, ventura: "9f76869fd8416254e40c8e4cca0a112d6332921b9eece446f6b9f7fde94f00ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e36ddf678067611a030fa642d63e00c449764421ba9eeb831ef244419c604993" + 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..b16bbb17333e3 --- /dev/null +++ b/Formula/a/aws-keychain.rb @@ -0,0 +1,24 @@ +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" + + 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-nuke.rb b/Formula/a/aws-nuke.rb new file mode 100644 index 0000000000000..6aa502648a3fe --- /dev/null +++ b/Formula/a/aws-nuke.rb @@ -0,0 +1,43 @@ +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.54.0.tar.gz" + sha256 "c47178ca467934bec1dd86a931aa0f8b88898678a14e717368be87c048800b8c" + license "MIT" + head "https://github.com/ekristen/aws-nuke.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b38e863cfcb050b0dee7d60cb2ada5952326f971dbb5d58def79e35e4681cda8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b38e863cfcb050b0dee7d60cb2ada5952326f971dbb5d58def79e35e4681cda8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b38e863cfcb050b0dee7d60cb2ada5952326f971dbb5d58def79e35e4681cda8" + sha256 cellar: :any_skip_relocation, sonoma: "ff5e801ce22aafb674f033b34c96491389c0bdbc899e6a92da24e1572e57ac25" + sha256 cellar: :any_skip_relocation, ventura: "ff5e801ce22aafb674f033b34c96491389c0bdbc899e6a92da24e1572e57ac25" + sha256 cellar: :any_skip_relocation, arm64_linux: "2210f87dfeab151389a482c31ec69035505119fbc64812844e16a30ae60fb83d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "daca788780ee8282910fe6902303896d21968ac234726a40ef4501f1777f6735" + 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..868e89f5e802d --- /dev/null +++ b/Formula/a/aws-rotate-key.rb @@ -0,0 +1,34 @@ +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: "master" + + bottle do + rebuild 1 + 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, 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..6eb73057ad4c6 --- /dev/null +++ b/Formula/a/aws-sam-cli.rb @@ -0,0 +1,427 @@ +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/16/be/7f78c36d95549e2173fd16fe5ecd1957cbdf4cc6c96f40839193ccf30223/aws_sam_cli-1.138.0.tar.gz" + sha256 "bdc9ef12830926cc6391c287f65a96a2f7bf1a0049933ad83f76d43f601342c1" + license "Apache-2.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "afbc6e8d51c4440da27a7f6fd5fbf7556c0e8e2e55ee4dd36650ef2dc0f3d5c5" + sha256 cellar: :any, arm64_sonoma: "e4641ebf924eaa75049d3231b31a1857d6edbc5bbc33f908c384e56b05c0c616" + sha256 cellar: :any, arm64_ventura: "3952c37892c1d1b62f42a6c020e9b6b9262609e800e883b9d6d74aea88934a1c" + sha256 cellar: :any, sonoma: "9ab49d3453a0b55197de4d6585495ddad3b967ef13d78b7cdd0562bd4b548782" + sha256 cellar: :any, ventura: "73a92d11af18182759bd9d4d7f0abcea7545cf2321e5aa7ea6562052dbd7dd07" + sha256 cellar: :any_skip_relocation, arm64_linux: "6aeeaf5b7e0a189127c8bc5b1841c2ed31f75612e9de2163c201d617e0cbdf26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac0582adfbf88affe20cfcba18cdca4c1c5fa6f41ffa8393c174d62f501fdb61" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libffi" + + 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/2e/00/0f6e8fcdb23ea632c866620cc872729ff43ed91d284c866b515c6342b173/arrow-1.3.0.tar.gz" + sha256 "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "aws-lambda-builders" do + url "https://files.pythonhosted.org/packages/d0/dc/8272ad7a2db5676eb1b1e2c9c12afa79f29bf315ccc85bfb22dcdbf04562/aws_lambda_builders-1.54.0.tar.gz" + sha256 "c74353b6f4dfda981f3b01aa1e39180a492cbd323852122b6f6451faeb4d15f0" + end + + resource "aws-sam-translator" do + url "https://files.pythonhosted.org/packages/13/01/3a9a3fea6ed942239f22c4fa9b3cd9d8b69545607f257fbb47d28d115dde/aws_sam_translator-1.97.0.tar.gz" + sha256 "6f7ec94de0a9b220dd1f1a0bf7e2df95dd44a85592301ee830744da2f209b7e6" + 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/e2/b5/f2cdcc4f909bd4a3b545571da9e7faa69a7ecc54bc5cc103f39dac53d115/boto3-1.38.15.tar.gz" + sha256 "dca60f7a3ead91c05cf471f7750e54d63b92bfc0e61fa122e2e3f5140e020a8d" + end + + resource "boto3-stubs" do + url "https://files.pythonhosted.org/packages/9f/85/86243ad2792f8506b567c645d97ece548258203c55bcc165fd5801f4372f/boto3_stubs-1.35.71.tar.gz" + sha256 "50e20fa74248c96b3e3498b2d81388585583e38b9f0609d2fa58257e49c986a5" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/00/35/0591b8cda1af4f308a0c073b838b02618547ae306504dc5a165a0ee88fd8/botocore-1.38.15.tar.gz" + sha256 "6adb3b1b0739153d5dc9758e5e06f7596290999c07ed8f9167ca62a1f97c6592" + end + + resource "botocore-stubs" do + url "https://files.pythonhosted.org/packages/34/f1/2c164e940453418f2ed19ad37d66290871e0e40e04d426ea84c6903a5bb4/botocore_stubs-1.38.15.tar.gz" + sha256 "f84a6efc7b9554fecdf4d875909a28bc8bd63a7def23dd5ceadb5b7759ea0524" + end + + resource "cfn-lint" do + url "https://files.pythonhosted.org/packages/73/42/5dd6fdad1382d37143a2c84dd2143c7dd3d065a64e55b51e23e20b8f8b14/cfn_lint-1.34.2.tar.gz" + sha256 "d340a6f816676489fac6f2fae3609e266c48d031abed04b978b07db7adf05f75" + 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/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + 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/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + 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/bd/3f/d3207a05f5b6a78c66d86631e60bfba5af163738a599a5b9aa2c2737a09e/dateparser-1.2.1.tar.gz" + sha256 "7e4919aeb48481dbfc01ac9683c8e20bfe95bb715a38c1e9f6af889f4f30ccc3" + 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/c0/de/e47735752347f4128bcf354e0da07ef311a78244eba9e3dc1d4a5ab21a98/flask-3.1.1.tar.gz" + sha256 "284c7b8f2f58cb737f0cf1c30fd7eaf0ccfcde196099d24ecede3fc2005aa59e" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + 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 "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 "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/e0/3d/c5dc7a750d9fdba2bf704d3d963be9ad4ed617fe5bb98e5c88374a3d8d69/mypy_boto3_apigateway-1.35.93.tar.gz" + sha256 "df90957c5f2c219663f825b905cb53b9f53fd7982e01bb21da65f5757c3d5d41" + end + + resource "mypy-boto3-cloudformation" do + url "https://files.pythonhosted.org/packages/f3/26/e59425e30fb1783aa718f1a8ac93cdc415e279e175c953ee0a72310f7490/mypy_boto3_cloudformation-1.35.93.tar.gz" + sha256 "57dc112ff3e2ddc1e9e621e428490b904c0da8c1532d30e9fa2a19aefde9f719" + end + + resource "mypy-boto3-ecr" do + url "https://files.pythonhosted.org/packages/92/ae/1598bf3dc7069f0e48a60a482dffa71885e1558aa076243375820de2792f/mypy_boto3_ecr-1.35.93.tar.gz" + sha256 "57295a72a9473b8542578ab15eb0a4909cad6f2cee1da41ce6a8a40ab7051438" + end + + resource "mypy-boto3-iam" do + url "https://files.pythonhosted.org/packages/c7/24/7cb0b26c3af8207496880155441cfd7f5d8c5404d4669e39385eb307672d/mypy_boto3_iam-1.35.93.tar.gz" + sha256 "2595c8dac406e4e771d3b7d7835faacb936d20449b9cdd17a53f076219cc7712" + end + + resource "mypy-boto3-kinesis" do + url "https://files.pythonhosted.org/packages/7d/c3/eb9f1aeaf42ea55c473b0281fe5813aafe3283733ad84fbd27c370416753/mypy_boto3_kinesis-1.35.93.tar.gz" + sha256 "f0718f5b54b955761790b4b33bdcab8d0c779bd50cc671c6862a8e0554515bda" + end + + resource "mypy-boto3-lambda" do + url "https://files.pythonhosted.org/packages/f0/ef/b90e51be87b5c226005c765a7109a26b5ce39cf349f2603336bd5c365863/mypy_boto3_lambda-1.35.93.tar.gz" + sha256 "c11b047743c7635ea8385abffaf97788a108b71479612e9b5e7d0bb19029d7a4" + end + + resource "mypy-boto3-s3" do + url "https://files.pythonhosted.org/packages/15/53/99667aad21b236612ecb50eee09fdc4de6fbe39c3a75a6bad387d108ed1f/mypy_boto3_s3-1.35.93.tar.gz" + sha256 "b4529e57a8d5f21d4c61fe650fa6764fee2ba7ab524a455a34ba2698ef6d27a8" + end + + resource "mypy-boto3-schemas" do + url "https://files.pythonhosted.org/packages/c9/f7/63c5b0db122b99265a14f179f41ab01566610c78abe14e63a4df3ebca7fa/mypy_boto3_schemas-1.35.93.tar.gz" + sha256 "7f2255ddd6d531101ec67fbd1afca8be02568f4e5787d1631199aa25b58a480f" + end + + resource "mypy-boto3-secretsmanager" do + url "https://files.pythonhosted.org/packages/d8/c6/1c69c3ac9fadeb6cc01da5a90edd5f36cbf09a4fa66e8cef638917eba4d1/mypy_boto3_secretsmanager-1.35.93.tar.gz" + sha256 "b6c4bc88a5fe4143124272728d41342e01c778b406db9d647a20dad0de7d6f47" + end + + resource "mypy-boto3-signer" do + url "https://files.pythonhosted.org/packages/d1/00/954104765b3414b0221cf18efebcee656f7b8be603866682a0dcf9e00ecf/mypy_boto3_signer-1.35.93.tar.gz" + sha256 "f12c7c7025cc25804146431f639f3eb9db664a4695bf28d2a87f58111fc7f888" + end + + resource "mypy-boto3-sqs" do + url "https://files.pythonhosted.org/packages/29/5b/040ba82c53d5edf578ad0aafcac501b91a259b40f296ef6662db975b6595/mypy_boto3_sqs-1.35.93.tar.gz" + sha256 "8ea7f63e0878544705c31996ae4c064095fbb4f780f8323a84f7a75281d643fe" + end + + resource "mypy-boto3-stepfunctions" do + url "https://files.pythonhosted.org/packages/ec/f9/44a59a6c84edfd94477e5427befcbecdb4f92ae34d897536671dc4994e23/mypy_boto3_stepfunctions-1.35.93.tar.gz" + sha256 "20230615c42e7aabbd43b62657ca3534e96767245705d12d42672ac87cd1b59c" + end + + resource "mypy-boto3-sts" do + url "https://files.pythonhosted.org/packages/9f/fc/652992367bad0bae7d1c8d8bd5fa455570de77337f8d0c2021263dc4e695/mypy_boto3_sts-1.35.97.tar.gz" + sha256 "6df698f6a400a82ebcc2f10adb43557f66278467200e0f75588e7de3e4a1622d" + end + + resource "mypy-boto3-xray" do + url "https://files.pythonhosted.org/packages/b6/98/1ffe456cf073fe6ee1826f053943793d4082fe02412a109c72c0f414a66c/mypy_boto3_xray-1.35.93.tar.gz" + sha256 "7e0af9474f06da1923aa37c8639b051042cc3a56d1a36b0141124d9de7be6709" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz" + sha256 "307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/c1/d4/1067b82c4fc674d6f6e9e8d26b3dff978da46d351ca3bac171544693e085/pyopenssl-24.3.0.tar.gz" + sha256 "49f7a019577d834746bc55c5fce6ecbcec0f2b4ec5ce1cf43a9a173b8138bb36" + 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/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/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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/fc/9e/73b14aed38ee1f62cd30ab93cd0072dec7fb01f3033d116875ae3e7b8b44/s3transfer-0.12.0.tar.gz" + sha256 "8ac58bc1989a3fdb7c7f3ee0918a66b160d038a147c7b5db1500930a607e9a1c" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/95/32/0cc40fe41fd2adb80a2f388987f4f8db3c866c69e33e0b4c8b093fdf700e/setuptools-80.4.0.tar.gz" + sha256 "5a78f61820bc088c8e4add52932ae6b8cf423da2aff268c23f813cfbb13b4006" + 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/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + resource "types-awscrt" do + url "https://files.pythonhosted.org/packages/f9/21/4d519305ec33f9bcd3c317e76aa860a1962fa40ded99c39ec49e1d5cdebe/types_awscrt-0.27.1.tar.gz" + sha256 "3c2bee52ee45022daaf4f106d5d1b5f0ff0a8e3e6093dda65f5315b7669bc418" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/a9/60/47d92293d9bc521cd2301e423a358abfac0ad409b3a1606d8fbae1321961/types_python_dateutil-2.9.0.20241206.tar.gz" + sha256 "18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb" + end + + resource "types-s3transfer" do + url "https://files.pythonhosted.org/packages/fb/d5/830e9efe91a26601a2bebde6f299239d2d26e542f5d4b3bc7e8c23c81a3f/types_s3transfer-0.12.0.tar.gz" + sha256 "f8f59201481e904362873bf0be3267f259d60ad946ebdfcb847d092a1fa26f98" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/04/d3/c19d65ae67636fe63953b20c2e4a8ced4497ea232c43ff8d01db16de8dc0/tzlocal-5.2.tar.gz" + sha256 "8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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", shells: [:fish, :zsh], 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..c59351ef4efe6 --- /dev/null +++ b/Formula/a/aws-sdk-cpp.rb @@ -0,0 +1,68 @@ +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.555.tar.gz" + sha256 "a8c1401f040e38b0bd9a526805199135cb98be7f7aef682c7545c7b55c48166a" + license "Apache-2.0" + head "https://github.com/aws/aws-sdk-cpp.git", branch: "main" + + livecheck do + throttle 15 + end + + bottle do + sha256 arm64_sequoia: "6edaa7527cae4358640d36a7eeaee33479685d9e3814c2ef7d4f2f38ed0371d8" + sha256 arm64_sonoma: "60bdc8439c1062e30e43fa90f2f6eec5f08b686e02fe8cf3d98a9be19730be37" + sha256 arm64_ventura: "0dead493f566a52343b631236f4b88c4aab14cac38bfce14efcc091a82d45e09" + sha256 cellar: :any, sonoma: "e6a4050542be4f2a99b3fc050a0dff6b14a4167ff060151442a2c2e483e0c466" + sha256 cellar: :any, ventura: "7fbaead8ba8dac4007116a117db5bdf31f2d737f3942a9723945dabbdf9270f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "f952a01c8cc6a8fff41cd818ea92c1e654d02ffb8d85bb8421ff5d6366725018" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d57d5d7460c3110097f88844518cc6401643a5eddeca4d00caa135f516c3fc3" + 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..9d8f8886378c7 --- /dev/null +++ b/Formula/a/aws-shell.rb @@ -0,0 +1,117 @@ +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 6 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "68343e37f8a6d94ee2178cccbee3c5a3112c38cf65f9d03d3232dabcc87ff7fa" + sha256 cellar: :any, arm64_sonoma: "2a1e001d90c41624037deceac47a2cda6192e26172804407aa73cdf68466fbce" + sha256 cellar: :any, arm64_ventura: "c1d6c487c01fe878e670c7d5e42b6187e752e4b9eba67ce9dace722dc94eb68f" + sha256 cellar: :any, sonoma: "7790b68854fcecf340b2c70c1b655efde0e03c9cc8d209b8aa875bf7b124d6d7" + sha256 cellar: :any, ventura: "9ffc3d8ff317f7b9b5968daad25611ae574d524ea5d5c31cfbefe513dab3143c" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9075338185a1be1b9a4a3d28c60c934c2af5dc87e143c0b614f9b89a7971815" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29913454d0b272eada94bd168a55f7e14fada5059bc072b69a65de8735ebe3ea" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "awscli" do + url "https://files.pythonhosted.org/packages/8d/b4/1fba68759bb17a353e5ecc04ffb40dbc65d64e8ea56b119c956ea606f108/awscli-1.35.5.tar.gz" + sha256 "e3a1801bbb5772423549dfce2bd55395292fc84dcfaf115a7268463462a6c3af" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b8/29/10988ceaa300ddc628cb899875d85d9998e3da4803226398e002d95b2741/boto3-1.35.39.tar.gz" + sha256 "670f811c65e3c5fe4ed8c8d69be0b44b1d649e992c0fc16de43816d1188f88f1" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/28/d83dbd69d7015892b53ada4fded79a5bc1b7d77259361eb8302f88c2da81/botocore-1.35.39.tar.gz" + sha256 "cb7f851933b5ccc2fba4f0a8b846252410aa0efac5bfbe93b82d10801f5f8e90" + 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/2f/e0/3d435b34abd2d62e8206171892f174b180cd37b09d57b924ca5c2ef2219d/docutils-0.16.tar.gz" + sha256 "c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc" + 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/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 "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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 + + 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..1bf177b2a9488 --- /dev/null +++ b/Formula/a/aws-sso-cli.rb @@ -0,0 +1,36 @@ +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.0.0.tar.gz" + sha256 "8a994f14daf5284fcbe6112c0d224e033b8e737c1dfcbef234017a2abe1ac4d7" + license "GPL-3.0-only" + head "https://github.com/synfinatic/aws-sso-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4b9fd58bc39c986a20efc08e5df37994681bf3dac203ffb46f1f339259380879" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d492eace65bc2fb63751ac9295d23deb58b069c839c4a9bd4ae34a365296785" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a05fc92c44cfecbf666d53eece42ca995f7843172557622c450d4f7faadc15f8" + sha256 cellar: :any_skip_relocation, sonoma: "11bc8478f9d2ac373265949e2b55fb3e8178fe40ee55386d4b2d07b19e16edd5" + sha256 cellar: :any_skip_relocation, ventura: "0c7d6289c62d9ecd13374c0a8aa89c05d59e0bc2a3400a4c4d21d2139b8bcac0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42866f0177ad09637c6fd11c92e9035a35ecdb25e949de3a73e2e6ac63e52e80" + 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..4dfb55df7c714 --- /dev/null +++ b/Formula/a/aws-sso-util.rb @@ -0,0 +1,152 @@ +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 1 + head "https://github.com/benkehoe/aws-sso-util.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "9903e41ae7e257555039f86152b41d0a6f7b27955a2744cf2f1f2c997191c9dd" + sha256 cellar: :any, arm64_sonoma: "ad43abbb7a0a7c3ba61dce0b6af56eb92f83430be36df384f9ef7ac4864e8eed" + sha256 cellar: :any, arm64_ventura: "efb299f6b966cb9e1a499c3bd713e90dbddd4b807cd3c9879c457d1c7926c47a" + sha256 cellar: :any, sonoma: "7805d4f7f3d2ea04b5f1cfef139aa3f031c4072386b2023942b29120c92c8204" + sha256 cellar: :any, ventura: "801c69f860d2be4906b323f4799b894bb7946d96dc279bdf0f5099b0ee5b6b6e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1aa8bc4fbcfbef80e0ea2fd10bed7dc83a3ca1334be0a4eb40fbd7b538a9b46" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3273d21f75eb5bd2de2a7d52e46260752499e052ec13b18e7cb83c1597fa5b5d" + end + + depends_on "rust" => :build # for rpds-py + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" + sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" + 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/b8/29/10988ceaa300ddc628cb899875d85d9998e3da4803226398e002d95b2741/boto3-1.35.39.tar.gz" + sha256 "670f811c65e3c5fe4ed8c8d69be0b44b1d649e992c0fc16de43816d1188f88f1" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/28/d83dbd69d7015892b53ada4fded79a5bc1b7d77259361eb8302f88c2da81/botocore-1.35.39.tar.gz" + sha256 "cb7f851933b5ccc2fba4f0a8b846252410aa0efac5bfbe93b82d10801f5f8e90" + 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 "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + 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 "referencing" do + url "https://files.pythonhosted.org/packages/99/5b/73ca1f8e72fff6fa52119dbd185f73a907b1989428917b24cff660129b6d/referencing-0.35.1.tar.gz" + sha256 "25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/55/64/b693f262791b818880d17268f3f8181ef799b0d187f6f731b1772e05a29a/rpds_py-0.20.0.tar.gz" + sha256 "d72a210824facfdaf8768cf2d7ca25a042c30320b3020de2fa04640920d4e121" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"aws-sso-util", shells: [:fish, :zsh], 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..6c83ab765ee17 --- /dev/null +++ b/Formula/a/aws-vault.rb @@ -0,0 +1,47 @@ +class AwsVault < Formula + desc "Securely store and access AWS credentials in development environments" + homepage "https://github.com/99designs/aws-vault" + url "https://github.com/99designs/aws-vault/archive/refs/tags/v7.2.0.tar.gz" + sha256 "3f2f1d0ec06eb0873f9b96b59dc70f9fcc832dc97b927af3dbab6cdc87477b0e" + license "MIT" + head "https://github.com/99designs/aws-vault.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d977e625b3ac401635b1d95b4b18e4fc0b058f251f425c102b7b965e08b2ecf6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e85192e42b17524b0a1321b1d69beebfd2c0a10baf961e514bce2914eace59f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "578a68527779690f0f37b655af958895f8b6d854a34767a263dcf5a7e7a14e1d" + sha256 cellar: :any_skip_relocation, sonoma: "02d404644b13dc1667c7ccf0912be79ea2788cb339773f2e350b0cdda9d1f7d5" + sha256 cellar: :any_skip_relocation, ventura: "a1eb3f660e906283eb1d48d6c96b1f81a10060f7d0367735b219f3c103191921" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61114565f6c9bf24fb99520e20f46494517ff949805299d178861e8e24b59d58" + 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: argument 'profile' not provided, nor any AWS env vars found. Try --help", + 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..07679c79540ae --- /dev/null +++ b/Formula/a/aws2-wrap.rb @@ -0,0 +1,39 @@ +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 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d80eae08463ca93b1d39861c28412fb9547db8a86d5041e338a72da501f969fd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d862292e6dead768c28d279476e634381d6a27c3efe256600efaace68faaf65" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c98df6972dc8b0cd6fa2faf431f3f39316b5dd86e40b6406600c9bf9369aba08" + sha256 cellar: :any_skip_relocation, sonoma: "42988b57040c6a9174d83c312d76336a7f293bf92fe1e727ad5bd7c661d9524f" + sha256 cellar: :any_skip_relocation, ventura: "433bad07f827a41b9e9712c7c71cc90fc98c980d4cea9a75feeb1ca7b538a90e" + sha256 cellar: :any_skip_relocation, arm64_linux: "7dc1013b4756e0a79e525367725c0218edde1e9c2ce7850c120728afca5e8bee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18b0b56d7d195178f4c4e53c5171e0ec0fcecbea18537a4c2692854d38559098" + end + + depends_on "python@3.13" + + resource "psutil" do + url "https://files.pythonhosted.org/packages/18/c7/8c6872f7372eb6a6b2e4708b88419fb46b857f7a2e1892966b851cc79fc9/psutil-6.0.0.tar.gz" + sha256 "8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2" + 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..ba115b180b5a6 --- /dev/null +++ b/Formula/a/awscli-local.rb @@ -0,0 +1,73 @@ +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/25/f9/023c80ea27d67b0930f116597fd55a93f84de9b05d18b38c7d2d5d75c1c9/awscli-local-0.22.0.tar.gz" + sha256 "3807cf2ee4bbdd4df4dfc8bef027f25bde523dcaf8119720f677ed95ebba66a4" + license "Apache-2.0" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5809a256a92eec1365a7c9f071656a6893295fccf3160a00b29b284bd58b27b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b5809a256a92eec1365a7c9f071656a6893295fccf3160a00b29b284bd58b27b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b5809a256a92eec1365a7c9f071656a6893295fccf3160a00b29b284bd58b27b" + sha256 cellar: :any_skip_relocation, sonoma: "7c1b34601976db26914738467119a50373a1d81f13eb915c4ec9364b95223ef2" + sha256 cellar: :any_skip_relocation, ventura: "7c1b34601976db26914738467119a50373a1d81f13eb915c4ec9364b95223ef2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5809a256a92eec1365a7c9f071656a6893295fccf3160a00b29b284bd58b27b" + end + + depends_on "awscli" => :test # awscli-local can work with any version of awscli + depends_on "localstack" + depends_on "python@3.13" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b8/29/10988ceaa300ddc628cb899875d85d9998e3da4803226398e002d95b2741/boto3-1.35.39.tar.gz" + sha256 "670f811c65e3c5fe4ed8c8d69be0b44b1d649e992c0fc16de43816d1188f88f1" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/28/d83dbd69d7015892b53ada4fded79a5bc1b7d77259361eb8302f88c2da81/botocore-1.35.39.tar.gz" + sha256 "cb7f851933b5ccc2fba4f0a8b846252410aa0efac5bfbe93b82d10801f5f8e90" + 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/c4/40/6858a5fe70654ef4878188e0c330c8a22ce4dfc457e09231cb82228de075/localstack_client-2.7.tar.gz" + sha256 "14993119901a4bcbef7c32d899b24f4a58a875a6765693edf1064d66b8a68408" + 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/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..509610d764f98 --- /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.27.16.tar.gz" + sha256 "87c56fae8879f91fdb25ee77357ce03165408958338e761d00f6906145883c22" + license "Apache-2.0" + head "https://github.com/aws/aws-cli.git", branch: "v2" + + bottle do + sha256 cellar: :any, arm64_sequoia: "79b3c86470bb6246a8cc24fb0bb6ef0b81f7f3ccc047cb33c090a019515c57e9" + sha256 cellar: :any, arm64_sonoma: "ae714dfca3ffbf9fb5d982577d26ec16eda93338ff74083379576737f27be749" + sha256 cellar: :any, arm64_ventura: "a45d3f63e50e031d3ef79d9a222b4dafcaaf54caa289db9c7fcf3517b4a24092" + sha256 cellar: :any, sonoma: "bd99199390c76caff4e60c53bb0e8a5d7beee4781d05fc769a0f9976d550155e" + sha256 cellar: :any, ventura: "d1d75ef1f5f5bee2a4cdea04cd93e1c0dc55a4e0bbe04f02e2ea25d81749d279" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b70080809c5e43ad68d5636e5654d1e4e178f3a517f593cdcbd0aa723cde97c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92b58e7593cc6043c959727a60744c5ff5842d5a151ee56158b170204bbf6368" + end + + depends_on "cmake" => :build + depends_on "cryptography" + depends_on "openssl@3" + depends_on "python@3.13" + + uses_from_macos "libffi" + uses_from_macos "mandoc" + + resource "awscrt" do + url "https://files.pythonhosted.org/packages/42/db/72989a426cdf2b9f38454b1cdba246b2d2e95a77397ad3df18d1d9d4f5b3/awscrt-0.26.1.tar.gz" + sha256 "a8d63a7dcc6484c5c1675b31a8d1b6726c3dc85b13796fb143dfb0072260935e" + 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/4b/bb/75cdcd356f57d17b295aba121494c2333d26bfff1a837e6199b8b83c415a/prompt_toolkit-3.0.38.tar.gz" + sha256 "23ac5d50538a9a38c8bde05fecb47d0b403ecd0662857a86f886f798563d5b9b" + 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/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..41cb26618b533 --- /dev/null +++ b/Formula/a/awscli@1.rb @@ -0,0 +1,116 @@ +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/59/45/76d3fbf5d0f2df3e27420621156603731e71312275dab69f8fe7b66a22cb/awscli-1.40.10.tar.gz" + sha256 "c55420f9b95b731104de9837b86021e73391c899a250fb16a2763c47094918de" + 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_sequoia: "ea30036f53245a11daa161115b73d343abada76adba7e138aeb6dc28271288a3" + sha256 cellar: :any, arm64_sonoma: "eb7753bf144746a9a9bfd87feaf443fcb1702f76085e093021b76ffe36357fa0" + sha256 cellar: :any, arm64_ventura: "94dca4b69837b640b529b670663ffc4b5748482a72db9b36cf2952a9c6810cd9" + sha256 cellar: :any, sonoma: "1345cd7f2eec74159ff99fbfc70cc1de1c8a5aecaaa228fb4f1f4d767aef29eb" + sha256 cellar: :any, ventura: "b2a3597eee02acc39ff7c45690954e83de4fab98227dbc9aa609f5e972f150f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "5f50f59a25f8118839861021e5c467c69f4eac2257752da176ad427c7e4ce06c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99de1380f426892dda12bdae739e623f662ac185b80638d91b0e0b4adac2dc3c" + end + + keg_only :versioned_formula + + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "mandoc" + + resource "botocore" do + url "https://files.pythonhosted.org/packages/22/5d/96ec53163bb60f16777af91f5412df73beb79675d264fd3f1cd57dcea2fe/botocore-1.38.11.tar.gz" + sha256 "44c5cb042fefedbe0b0ae4c3f96aed03f4cab6973d4317410c8d7c6d32807aef" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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/fc/9e/73b14aed38ee1f62cd30ab93cd0072dec7fb01f3033d116875ae3e7b8b44/s3transfer-0.12.0.tar.gz" + sha256 "8ac58bc1989a3fdb7c7f3ee0918a66b160d038a147c7b5db1500930a607e9a1c" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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..f830f94e8f3cb --- /dev/null +++ b/Formula/a/awscurl.rb @@ -0,0 +1,85 @@ +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" + head "https://github.com/okigan/awscurl.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f13670bbd5d0dd632377a14b891c024656917d4e22994d9262d887c9b176d670" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + uses_from_macos "libffi" + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/28/d83dbd69d7015892b53ada4fded79a5bc1b7d77259361eb8302f88c2da81/botocore-1.35.39.tar.gz" + sha256 "cb7f851933b5ccc2fba4f0a8b846252410aa0efac5bfbe93b82d10801f5f8e90" + 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 "configargparse" do + url "https://files.pythonhosted.org/packages/70/8a/73f1008adfad01cb923255b924b1528727b8270e67cb4ef41eabdc7d783e/ConfigArgParse-1.7.tar.gz" + sha256 "e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1" + end + + resource "configparser" do + url "https://files.pythonhosted.org/packages/a5/2e/a8d83652990ecb5df54680baa0c53d182051d9e164a25baa0582363841d1/configparser-7.1.0.tar.gz" + sha256 "eb82646c892dbdf773dae19c633044d163c3129971ae09b49410a303b8e0a5f7" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..79e1792dc1155 --- /dev/null +++ b/Formula/a/awsdac.rb @@ -0,0 +1,34 @@ +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.21.11.tar.gz" + sha256 "7e95c3a28f2827c5a78764fad5c61934f94f1361e62ea52fb52a9e100107c6fc" + license "Apache-2.0" + head "https://github.com/awslabs/diagram-as-code.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86e74ee27562f37c22ed2faf5d6acdc7a72a1f99785aa1892be3a3b1866568dc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "86e74ee27562f37c22ed2faf5d6acdc7a72a1f99785aa1892be3a3b1866568dc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "86e74ee27562f37c22ed2faf5d6acdc7a72a1f99785aa1892be3a3b1866568dc" + sha256 cellar: :any_skip_relocation, sonoma: "8d1e613c9b52c4d6d55049e3744275e6925361ac300f587f3a52d5fe042c4b7f" + sha256 cellar: :any_skip_relocation, ventura: "8d1e613c9b52c4d6d55049e3744275e6925361ac300f587f3a52d5fe042c4b7f" + 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" + end + + test do + (testpath/"test.yaml").write <<~YAML + Diagram: + Resources: + Canvas: + Type: AWS::Diagram::Canvas + YAML + assert_equal "[Completed] AWS infrastructure diagram generated: output.png", + shell_output("#{bin}/awsdac test.yaml").strip + end +end diff --git a/Formula/a/awslogs.rb b/Formula/a/awslogs.rb new file mode 100644 index 0000000000000..70bbe95896213 --- /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 1 + head "https://github.com/jorgebastida/awslogs.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "c602aa4c060bd801847ba3c57c3c13294d4db1aa3864b51166d1ee2ef8f19f6b" + end + + depends_on "python@3.13" + + uses_from_macos "zlib" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/80/8b/31845869fb935b93d1f1a846d2a8e13dc91af4cf03ba701e2068c08b99af/boto3-1.35.37.tar.gz" + sha256 "470d981583885859fed2fd1c185eeb01cc03e60272d499bafe41b12625b158c8" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/57/a4/bc96ba621c869f723ce4cb4dadb53fdbb821d64ef1146f0749098ef342cf/botocore-1.35.37.tar.gz" + sha256 "b2b4d29bafd95b698344f2f0577bb67064adbf1735d8a0e3c7473daa59c23ba6" + 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/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..5788db88d808a --- /dev/null +++ b/Formula/a/awsume.rb @@ -0,0 +1,97 @@ +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 1 + head "https://github.com/trek10inc/awsume.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "ab01aea5f6d99ac21764de55e673902787fc14ec96fada280a0c360bec574d4a" + sha256 cellar: :any, arm64_sonoma: "b06023bea38dacbd5357be513bd216f43f4d5fe3972f024cd8d51761553032eb" + sha256 cellar: :any, arm64_ventura: "8d9db8a716aabe192870e491a0d94225231bbb1ab4a5093bd5462f7e60c8c036" + sha256 cellar: :any, sonoma: "2bf690210a7c40da2e7106dfcb689afee281bcf26b1e40339d75f749dd227364" + sha256 cellar: :any, ventura: "8fc54d5c65ee7e395dd2769036940187e04725c46ae89f010bec64c6537f6595" + sha256 cellar: :any_skip_relocation, arm64_linux: "46de6558e11715bea82a933bc59b3cdce76b5a726aee4faf239688b0ea04c7d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f2fbc4bce74d218a3e42fa282d7b7e5d1033b47bac6c16f4c97bedf24469cfa0" + end + + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "sqlite" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b8/29/10988ceaa300ddc628cb899875d85d9998e3da4803226398e002d95b2741/boto3-1.35.39.tar.gz" + sha256 "670f811c65e3c5fe4ed8c8d69be0b44b1d649e992c0fc16de43816d1188f88f1" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/28/d83dbd69d7015892b53ada4fded79a5bc1b7d77259361eb8302f88c2da81/botocore-1.35.39.tar.gz" + sha256 "cb7f851933b5ccc2fba4f0a8b846252410aa0efac5bfbe93b82d10801f5f8e90" + 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/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/18/c7/8c6872f7372eb6a6b2e4708b88419fb46b857f7a2e1892966b851cc79fc9/psutil-6.0.0.tar.gz" + sha256 "8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2" + 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 "s3transfer" do + url "https://files.pythonhosted.org/packages/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..e074ccd60f7a6 --- /dev/null +++ b/Formula/a/awsweeper.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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, 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..ea28615a430e4 --- /dev/null +++ b/Formula/a/axel.rb @@ -0,0 +1,52 @@ +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_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/azcopy.rb b/Formula/a/azcopy.rb new file mode 100644 index 0000000000000..f41b062ff4dfc --- /dev/null +++ b/Formula/a/azcopy.rb @@ -0,0 +1,36 @@ +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.29.0.tar.gz" + sha256 "a42daadd5aaf24303113b5cf62b57271f813575a14ec5bb19e39ddbaf767c429" + 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_sequoia: "de23aa2f05916e80a52b7fde3e359d48d481c734efad4cc9b76d916342b8b84f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c5898e3ffd03628c174f0e719eb11c8ed1d01762eedc954a51a27ac2e705713" + sha256 cellar: :any_skip_relocation, arm64_ventura: "329c99acdbd95391135b2f360194d7005d78e09fa1c42a6f7575538cedc2fecd" + sha256 cellar: :any_skip_relocation, sonoma: "e6af842aada5e4e3ca49384e99eae0b08d685cbda89d99909d221a0ffac00926" + sha256 cellar: :any_skip_relocation, ventura: "0dc9b44c5ca981b2ce93905bbfcf84c437feb39b3e43e3360d4a1345b9a5e989" + sha256 cellar: :any_skip_relocation, arm64_linux: "8960e06231bda0735b59bcda9a65b6386b2e916d4fe0e1cfb1c51e96049f5a79" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fdc7018a7ca23a940a9a0395872d2d382988e4dcd225d746c93d3687e42a66ee" + 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..259f2eca6f0af --- /dev/null +++ b/Formula/a/azion.rb @@ -0,0 +1,37 @@ +class Azion < Formula + desc "CLI for the Azion service" + homepage "https://github.com/aziontech/azion" + url "https://github.com/aziontech/azion/archive/refs/tags/3.1.0.tar.gz" + sha256 "6049eb1ac66ca7338f4883a2a5da5200248d032be89473f3ec70615cd525d655" + license "MIT" + head "https://github.com/aziontech/azion.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bb0a4e4d0d1dd55cd50195405dd5c291265a93ef4747a1b497eae0c522cb72ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb0a4e4d0d1dd55cd50195405dd5c291265a93ef4747a1b497eae0c522cb72ed" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bb0a4e4d0d1dd55cd50195405dd5c291265a93ef4747a1b497eae0c522cb72ed" + sha256 cellar: :any_skip_relocation, sonoma: "97e0ab169727b0b3c3c8e69d39be162325ac945b0f533bd82559df74afd6324b" + sha256 cellar: :any_skip_relocation, ventura: "97e0ab169727b0b3c3c8e69d39be162325ac945b0f533bd82559df74afd6324b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "03af792f1be0f6aee18c8be338af08a0f7b05af16375304c35c052c5e3122c6f" + 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 + -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 + ] + 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..ddd98e6a86d2b --- /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.4.6", + revision: "551b1b787fcb838840785f6d4f289f4a2b46232a" + license "MIT" + head "https://github.com/Azure/azqr.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d829e1f2103f30449c954c50bbedf34ff1fcb28a6578e214737f1956d6cdc4c5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d829e1f2103f30449c954c50bbedf34ff1fcb28a6578e214737f1956d6cdc4c5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d829e1f2103f30449c954c50bbedf34ff1fcb28a6578e214737f1956d6cdc4c5" + sha256 cellar: :any_skip_relocation, sonoma: "be7bc031429270ed7d21c266aaf8507c3e807840605151b29bab9224508ffead" + sha256 cellar: :any_skip_relocation, ventura: "be7bc031429270ed7d21c266aaf8507c3e807840605151b29bab9224508ffead" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d8b0d8a49ba4051f5b388eaa978473d7f1a756ebaf54693fa972b0352342273" + 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..28640776fe45c --- /dev/null +++ b/Formula/a/aztfexport.rb @@ -0,0 +1,36 @@ +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.17.1", + revision: "aa75416cc3159a277f2e54cc2044ddea7122bc98" + license "MPL-2.0" + head "https://github.com/Azure/aztfexport.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "494fd1d33cf38dae763505225a477cfe42730434250c67aeb314d1c5283948c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "494fd1d33cf38dae763505225a477cfe42730434250c67aeb314d1c5283948c8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "494fd1d33cf38dae763505225a477cfe42730434250c67aeb314d1c5283948c8" + sha256 cellar: :any_skip_relocation, sonoma: "ff3e1fb1e23a62f75599e01e3a5330d3a5aedd11993183b27f3c5e47def155d0" + sha256 cellar: :any_skip_relocation, ventura: "ff3e1fb1e23a62f75599e01e3a5330d3a5aedd11993183b27f3c5e47def155d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "acdd35577a41cf46edf936c43c431e984ded8c05860f1af490afcc4d2bdd191c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b3c53c15e3bb6b3ad58789f9d95c18f3b7f04201e963a23272655fabec4bdfb" + 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..9ec8177df0358 --- /dev/null +++ b/Formula/a/azure-cli.rb @@ -0,0 +1,770 @@ +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.72.0.tar.gz" + sha256 "f2c9d7e25c7826c5c75126d2c87fcc1d6cfd8b1bfd27ae08f37b97e63eb5a0cc" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "3129bc0d140ba5d0bdee7282986e90cca7cacf43af4c01c4b4e218e1265719fc" + sha256 cellar: :any, arm64_sonoma: "d7d6482f0130148e381ace7da8f543111b60d32c6a99097e2cfbd612be16ae5b" + sha256 cellar: :any, arm64_ventura: "b47a04430e286c06d8aa308291891a84e7fcbf78e9410029dd31b64161a21b94" + sha256 cellar: :any, sonoma: "0b499936e96f8e880504b0a43e01cb69d00e9bd6162ba73df47377c1aeaf15c4" + sha256 cellar: :any, ventura: "2d830e7924cd7af190dc07e2c6127201676c6d31e8c0065d183ac5754625f9ef" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c4f54dfd5b4bb04491348c687791c634210dd4f1d53cf9d06a9714277212338" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7109e1df4670934bcdaf5de9e047542129979e9f819bc8a3ebe55225141988a2" + 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.12" + + 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 "adal" do + url "https://files.pythonhosted.org/packages/90/d7/a829bc5e8ff28f82f9e2dc9b363f3b7b9c1194766d5a75105e3885bfa9a8/adal-1.2.7.tar.gz" + sha256 "d74f45b81317454d96e982fd1c50e6fb5c99ac2223728aea8764433a39f566f1" + 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/07/fe/e4aa2ca52bcd3fcc2231c02e216d97010b4345cbd963e10eb49539c59cbd/azure-appconfiguration-1.7.0.tar.gz" + sha256 "9eb079d061f05738ad3b42fe1d53da73fc6076dd7178a52df3e631f131d4ed1f" + 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/03/7a/f79ad135a276a37e61168495697c14ba1721a52c3eab4dae2941929c79f8/azure_core-1.31.0.tar.gz" + sha256 "656a0dd61e1869b1506b7c6a3b31d62f15984b1a573d6326f6aa2f3e4123284b" + 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/f7/8b/adfe6c43c71d53eeafa98ee0eb798170d857beb3d78f42fdedb21f8f8f1c/azure_datalake_store-1.0.0a0.tar.gz" + sha256 "310ff34ad830feb5d42f452900aad6eabfce4cc8ae20736dbba75c585b743b59" + end + + resource "azure-keyvault-administration" do + url "https://files.pythonhosted.org/packages/80/4f/b0d62738a6e3c8e27c3cc33400e8deb14d6490042180fc872c1cdbe891ac/azure-keyvault-administration-4.4.0b2.tar.gz" + sha256 "8d0edefad78024c3a97b071fa5cf50daf923085e9d4379259f7237d911e66810" + 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/50/f0/cc544f2ea8dc1a7ea9a1159ffb5b2b56b3fb86694fc565c87e5444a98718/azure-keyvault-keys-4.9.0b3.tar.gz" + sha256 "aa8b1ec9fe96a81106f2f3dcd61175ecae3a01693c05af15f4a45e77894e946a" + 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-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/ac/38/8916327a19b106916ed950461eed816c53a7d8736990ddc6167a5738f161/azure_mgmt_appconfiguration-3.1.0.tar.gz" + sha256 "0596f09e7e7841be91dde1c818134100bbfa124486e06889d239dd587744b47c" + 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/9e/ab/e79874f166eed24f4456ce4d532b29a926fb4c798c2c609eefd916a3f73d/azure-mgmt-authorization-4.0.0.zip" + sha256 "69b85abc09ae64fc72975bd43431170d8c7eb5d166754b98aac5f3845de57dc4" + 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/86/8f31cf3709ad612f5e0f17810d97124193468eb5f1e3b36d37227715a2df/azure-mgmt-cognitiveservices-13.5.0.zip" + sha256 "44af0b19b1f827e9cdea09c6054c1e66092a51c32bc1ef5a56dbd9b40bc57815" + 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/43/a0/be41acff20fdb2ad8f5fa9107e1698284843cb2f8b4f17bd770f0f1ffa7c/azure_mgmt_containerregistry-11.0.0.tar.gz" + sha256 "a76e3a06791cd4138acf064bb25f6ed266ce4a370e1cc113eb8d488d34b7ba77" + end + + resource "azure-mgmt-containerservice" do + url "https://files.pythonhosted.org/packages/35/09/a640bfdb168a42bb23b588f65a4eba363334c6a8c63b7355dfc13ac539cf/azure_mgmt_containerservice-35.0.0.tar.gz" + sha256 "71a149b3d65c2bc5c9c9c7843a11f81c3a1fb61ea187326feaa94ad3cee3dc74" + end + + resource "azure-mgmt-core" do + url "https://files.pythonhosted.org/packages/ae/18/6f79cfddbf08f233de5a51961323c0b1b2174e06ae9460988091fd012043/azure-mgmt-core-1.3.2.zip" + sha256 "07f4afe823a55d704b048d61edfdc1318c051ed59f244032126350be95e9d501" + 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-databoxedge" do + url "https://files.pythonhosted.org/packages/bc/97/e6f9041c0e22cdf3fa8f5ccfec70daf0d1c15740bc5f36e8e9694ff98a98/azure-mgmt-databoxedge-1.0.0.zip" + sha256 "04090062bc1e8f00c2f45315a3bceb0fb3b3479ec1474d71b88342e13499b087" + 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-dns" do + url "https://files.pythonhosted.org/packages/58/04/a2849bf2e2a5e115666dfa50e7ca551e75fa39d0f9bfe83f0bdb7d7e4765/azure-mgmt-dns-8.0.0.zip" + sha256 "407c2dacb33513ffbe9ca4be5addb5e9d4bae0cb7efa613c3f7d531ef7bf8de8" + 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/20/dc/5e2ff08ecff52df3a767b62bd92eef43c94ebd7e8dccd8127df863ce2712/azure-mgmt-eventhub-10.1.0.zip" + sha256 "319aa1481930ca9bc479f86811610fb0150589d5980fba805fa79d7010c34920" + 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/89/3c/04ce6c779c28d95a13e37cf00854a31472ef4b563d98361c50200180b8f2/azure-mgmt-hdinsight-9.0.0b3.tar.gz" + sha256 "72549e08ff3eed3d6e23835e73ece1cc32bdf340bdf8919e78916c352c200f64" + 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/e8/99/145453e748480be1d7abf17ab56f45f295679bde00b3edf7a4199494cd74/azure-mgmt-iothub-3.0.0.tar.gz" + sha256 "daf21fc98c68a353ec616318c0e62be04c8d6899960be8c2cbf991673ac8b722" + 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/9f/d3/9e8d31aaedfb37efd20c8a9ac420b07cdb5c3d2f19c3452c9cdcb082dad6/azure_mgmt_keyvault-11.0.0.tar.gz" + sha256 "fcfb1366852926f2a311e1bc6e6a786eb8a8a1fd46e6025d4c114ede2cb4642e" + 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/75/34/5acd343743ba66e06107f323d06844faa51900380143992b4a9ec3554883/azure-mgmt-monitor-5.0.0.zip" + sha256 "78bf4a268c314c5ee164941040234967b97eaca3c533cc0fe6f12282ddd91461" + 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/fa/52/bb554f77c7e73f4ddf9833abfbc183a073f26a20453034c54798c0c9bb44/azure-mgmt-recoveryservices-3.0.0.tar.gz" + sha256 "df212dfadfbcc659c31231c3e170aab7c21144d172b0f88268ab0f5ad8e95882" + end + + resource "azure-mgmt-recoveryservicesbackup" do + url "https://files.pythonhosted.org/packages/d1/10/e3d49f12842a84de410f8ed9831d6dcf6ee04e993f79fe4eb33adf1a9265/azure-mgmt-recoveryservicesbackup-9.1.0.tar.gz" + sha256 "1e9fd406c0c9ee2627f5a371f012f877342f7fc6f33b2564fcd14d6f0663cd0f" + 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/89/60/19471f7f2499888da9d5abc7ff8c470a6d620fbf35657fff31df9eeb483d/azure-mgmt-resource-23.1.1.tar.gz" + sha256 "20b6b006b544fdb19607f3f6a381105625e0bb60fbf3036f39885c4646d3343e" + 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/f9/fa/88014c3bd2fe34694184e9ced1b8230de495bcf2eb368c0bfc82db36dc12/azure-mgmt-servicebus-8.2.0.zip" + sha256 "8be9208f141d9a789f68db8d219754ff78069fd8f9390e9f7644bb95a3be9ec2" + 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/f3/16/3d39ef63b655ad47fe35aea5d9e0884cf36c84d794d5b2effc71758cd0de/azure_mgmt_sql-4.0.0b21.tar.gz" + sha256 "4ad3a68025363b34792ac0d9b7ec605d0bff8ff198a664ce09c9bb2afb62d831" + 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/ca/d2/f06af604fe54231f049c861dd1556495c95ad95620ed3b14337c3e164913/azure_mgmt_storage-22.1.0.tar.gz" + sha256 "727b8c8be4aca4551a9b921cdf76bb92b1e988d009de3b983ce72b7343b749e9" + 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/7f/a4/a47081049ae17378b920518db566587c5691ed52c15802a2b418912081ad/azure-mgmt-web-7.3.1.tar.gz" + sha256 "87b771436bc99a7a8df59d0ad185b96879a06dce14764a06b3fc3dafa8fcb56b" + 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/38/98/cc60dc8b0efcf828555c2cffe6a097184782b1a7be35aeec82eb78b4fe1a/azure-multiapi-storage-1.4.0.tar.gz" + sha256 "45f15dfb5c4bda8b9627734b5cc72c45f436d796e2e216be88239c6178cd0f71" + 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/be/9a/32e71b8f048d0e7cf5b6df3d652c102368de40180834956fcc968fe0c1ff/azure_synapse_artifacts-0.20.0.tar.gz" + sha256 "3ed6c142faf62d3191a943b3222547f7730d4cbc10355d17d64fa77e0421644a" + 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/68/ce/95b0bae7968c65473e1298efb042e10cafc7bafc14d9e4f154008241c91d/cffi-1.16.0.tar.gz" + sha256 "bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/3f/90/81dcc50f0be11a8c4dcbae1a9f761a26e5f905231330a7cacc9f04ec4c61/msal-1.32.3.tar.gz" + sha256 "5eea038689c78a5a70ca8ecbe1245458b55a857bd096efb6989c69ba15985d35" + 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 "msrestazure" do + url "https://files.pythonhosted.org/packages/48/fc/5c2940301a83f18884a8e3aead2b2ff177a1a373f75c7b17e2e404199b2a/msrestazure-0.6.4.tar.gz" + sha256 "a06f0dabc9a6f5efe3b6add4bd8fb623aeadacf816b7a35b0f89107e0544d189" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + 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/d8/6b/6287745054dbcccf75903630346be77d4715c594402cec7c2518032416c2/PyJWT-2.4.0.tar.gz" + sha256 "d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba" + 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/79/67/c06f625e2968c417052b3a4a0eef40656d5d4d44033e57b40ec474af1d28/pip-25.1.tar.gz" + sha256 "272bdd1289f80165e9070a4f881e8f9e1001bbb50378561d1af20e49bf5a2200" + 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/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-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/31/a9/b61190916030ee9af83de342e101f192bbb436c59be20a4cb0cdb7256ece/semver-2.13.0.tar.gz" + sha256 "fa0fe2722ee1c3f57eac478820c3a5ae2f624af8264cbdf9000c980ff7f75e3f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/44/80/97e25f0f1e4067677806084b7382a6ff9979f3d15119375c475c288db9d7/setuptools-80.0.0.tar.gz" + sha256 "c40a5b3729d58dd749c0f08f1a07d134fb8a0a3d7f87dc33e7c5e1f762138650" + 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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/c8/93/65e479b023bbc46dab3e092bda6b0005424ea3217d711964ccdede3f9b1b/urllib3-1.26.19.tar.gz" + sha256 "3e3d753a8618b86d7de333b4223005f68720bcd6a7d2bcb9fbd2229ec7c1e429" + 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/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + 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.12", 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..29049a4993d98 --- /dev/null +++ b/Formula/a/azure-core-cpp.rb @@ -0,0 +1,52 @@ +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.15.0.tar.gz" + sha256 "f13b41b1cf5ae8618909b2d30387cc83d9bbbf8fb7746e9d35196a524efcd3d9" + license "MIT" + + livecheck do + url :stable + regex(/^azure-core[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "30d61ea370900ba8294a01d9070d3bbd46fb590b36fe9f6c6d7d041048401223" + sha256 cellar: :any, arm64_sonoma: "c3da323ef6fb292758a5f11d7cc1e98ce61c8d229ab12dafa6a20d775e8569de" + sha256 cellar: :any, arm64_ventura: "06c8fa36794a1efb84c6f1ac3c095b544f0af4ad0124785f804d4d7e6d3eed7d" + sha256 cellar: :any, sonoma: "a10a1c92d8dd81f47708e322b87e3d6d280bec8e6acd2b1e70db8170772c6b2c" + sha256 cellar: :any, ventura: "3105f2e4c4ce2a5c186b3afe51aec44aa53e134d01a3fa5fbb91e82f7fdd5ce9" + sha256 cellar: :any_skip_relocation, arm64_linux: "7cee82d15aa5ecdcae5f66152ad32496e481f032d6a225fc0940bb386ae71eb7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e1dfb2f1d8c34f60ef00962b733c50b583e2c9114f0c913b9ed082dd2a1dd513" + 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..f5283d1051414 --- /dev/null +++ b/Formula/a/azure-storage-blobs-cpp.rb @@ -0,0 +1,66 @@ +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.13.0.tar.gz" + sha256 "300bbd1d6bc50b8988b3dda29d6d627574a4f3e25a7e00a6986da5d3965f679a" + license "MIT" + revision 2 + + livecheck do + url :stable + regex(/^azure-storage-blobs[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "03efdfcab8216711665119c6d285eb344fa2dabcf5414e59108f857b0d6ce636" + sha256 cellar: :any, arm64_sonoma: "6ab8bc412b7a2c671305f6d8b000f03ba93587e7857b202d8f042718b74964a2" + sha256 cellar: :any, arm64_ventura: "c10115c7de9b2c9965de045ed149cfdfcc7927eb9445c5195b11335c92813637" + sha256 cellar: :any, sonoma: "f8464e90a2e115ca726ed759df416a96575ea11aee471c4c9d4aa8efe11e7b99" + sha256 cellar: :any, ventura: "9c34e948570ad58b1838f052c34239e9ca75acd0ade38c4ea1a742ad05f9400c" + sha256 cellar: :any_skip_relocation, arm64_linux: "ebcaa4eec2d79199bc6cfaeb000828472b7ad0e7c9bf0e3b8ca9c7e146a1eb43" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d63a09a4848a221ad75c3fe84ae5db7c7ef2b4f0e07617189b562eef175a242" + 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..5b91cfd20f301 --- /dev/null +++ b/Formula/a/azure-storage-common-cpp.rb @@ -0,0 +1,60 @@ +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.10.0.tar.gz" + sha256 "84e165267995b8d10060abe1c2b65b3238eccea3f11222b5ae36042a1d1ae07f" + license "MIT" + + livecheck do + url :stable + regex(/^azure-storage-common[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e3e595864a4e6e78be91cd69b3f3a924cd2308c4411ab31b5872a0582f280dfc" + sha256 cellar: :any, arm64_sonoma: "dd768e2e9d449d65e3a7464dba91a3ccdbf6c54d5e6ea03cce8265e5002697bc" + sha256 cellar: :any, arm64_ventura: "dc2dc8eababf52d0ab281def32b86a9ce85b9fbb59fe04c2f086b45a19a3d259" + sha256 cellar: :any, sonoma: "5b682a27014f02949b583a560543dab0e120b96d80ddb18a07e85106cd7a8154" + sha256 cellar: :any, ventura: "0763d2ae9a0627a0d4aa85a796aa8caa1e1bc15f42effe4f06c6e6d90d23ff80" + sha256 cellar: :any_skip_relocation, arm64_linux: "867c5706223bb8d2346753f25df15b65cd40e70a4b728c557b8108e5d9095049" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8f5735cd592ecffff5bb6bb5cc447a4134b80bf7256df2e47c3298a721b347e" + 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..230ca3d2ed904 --- /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.4.1.tar.gz" + sha256 "600db24b942669b215dc08758590c01b5587728cce814eea2f519b6d3d19857c" + 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_sequoia: "5e021792cbfbd5388acd8a13a02cc9e49238e1899ef4a5547f10724a340c6521" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5e021792cbfbd5388acd8a13a02cc9e49238e1899ef4a5547f10724a340c6521" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5e021792cbfbd5388acd8a13a02cc9e49238e1899ef4a5547f10724a340c6521" + sha256 cellar: :any_skip_relocation, sonoma: "78ccf787672cc083601d91b193b4bcc4f96b572410bbd121ba0428dbd29fef23" + sha256 cellar: :any_skip_relocation, ventura: "78ccf787672cc083601d91b193b4bcc4f96b572410bbd121ba0428dbd29fef23" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4d75fd44efb739dbc8e25698934b337f4daebaebdc805ac0a33a63dc05e8838" + 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 f863bf18531a1..0000000000000 --- a/Formula/a2ps.rb +++ /dev/null @@ -1,53 +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" - license "GPL-3.0" - - bottle do - rebuild 3 - sha256 "98a293e2d83134c9a1c35026f68207d9fc2ac1bde9d7d15dd29849d7d9c5b237" => :catalina - 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 - - on_linux do - depends_on "gperf" - 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 1d4d31941ee5c..0000000000000 --- a/Formula/a52dec.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "a40e7384a64c5d4e22209088af424eeb4a9de3eba4c5451f95a2a1b6732969f6" => :catalina - sha256 "5186add25fb7aae66c80139b56ea81fb3aff1f87e74354c2cebe022374532286" => :mojave - sha256 "c7485fae127d02a6628186b821d72fc40bc82019ae30ddee0abfacf2b63701dc" => :high_sierra - sha256 "150123fdf33421b85f4625d73c015a660300db698a82fd0165475fe8e7081d0b" => :sierra - sha256 "2feac8f578fd1aa43385ce8714b059c90f4aaf3a0401d8ba825939e8e8ab7b1b" => :el_capitan - sha256 "cfe0ddcf275b03d9ad0c626174962601ae18d3f77fa35266228425b818ce4a7f" => :yosemite - sha256 "cb40eed81300fa32069bac07244cf7f56363cc04af853ddb75bada292e8d9912" => :mavericks - 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 50bf8acb23939..0000000000000 --- a/Formula/aacgain.rb +++ /dev/null @@ -1,40 +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" - - livecheck do - url "https://aacgain.altosdesign.com/alvarez/" - regex(/href=.*?aacgain[._-]v?(\d+(?:\.\d+)+)\.t/i) - end - - bottle do - cellar :any_skip_relocation - sha256 "a8ec07d22279b4bdd471ee7a307e6d365a906432ef49533afeca2de53add8d55" => :catalina - 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 5084df6eca5bb..0000000000000 --- a/Formula/aalib.rb +++ /dev/null @@ -1,41 +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 "306da4a8cb39ef81eed8b81a7d1c1c7bd47405d8270d036dde9c07c630fa4ea3" => :catalina - 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 ec63bb75dc940..0000000000000 --- a/Formula/aamath.rb +++ /dev/null @@ -1,42 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "1ac1413ef0322b280ae5bd5663373ed959ee54d28dbdd3261fc4da6e57abf44c" => :catalina - sha256 "79ef03b1d334136b693131b133944109545b07aca2dfd9165531016e4250444c" => :mojave - sha256 "41223cb51bc006abfba33b6af77b665c28de4155d19e5f43d0561b885b73368f" => :high_sierra - sha256 "d537cb11d2dcbac9b5d5356c471775699312e83450635ba7676083f381a531cd" => :sierra - sha256 "8b805e37fd5f4536b4fbf7f3ae6251b645b4b132027d56ccd015a6036c304744" => :el_capitan - sha256 "1e22022e621e7d2337edf4a80ae2c1618a89089132656d85cc141774565e34d7" => :yosemite - sha256 "0212e0b5844ea1a491bc7d4fcab2b590921042b28bc50e79c36cd9e15d08e2aa" => :mavericks - end - - uses_from_macos "bison" => :build # for yacc - uses_from_macos "flex" => :build - - # Fix build on clang; patch by Homebrew team - # https://github.com/Homebrew/homebrew/issues/23872 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/aamath/0.3.patch" - sha256 "9443881d7950ac8d2da217a23ae3f2c936fbd6880f34dceba717f1246d8608f1" - end - - 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 diff --git a/Formula/aardvark_shell_utils.rb b/Formula/aardvark_shell_utils.rb deleted file mode 100644 index f6a5ce1b8ee63..0000000000000 --- a/Formula/aardvark_shell_utils.rb +++ /dev/null @@ -1,36 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "df44cfc6ab0cf9b275f806ab72b47ab47475e35ca3faabbcbbe2054d65f6aa4e" => :catalina - 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" - conflicts_with "uutils-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 74a847d56e429..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.3.tar.gz" - sha256 "046cd0bba78dd4bbdcbcf82fe625865c60df35a005482de13a6699c5a3b83124" - license "GPL-2.0" - head "https://git.einval.com/git/abcde.git" - - bottle do - cellar :any_skip_relocation - sha256 "6994f8e32417a1630b2680c96bcae3de5c430976de0dc66056e5687070473f19" => :mojave - sha256 "6994f8e32417a1630b2680c96bcae3de5c430976de0dc66056e5687070473f19" => :high_sierra - sha256 "7fbfff0c184bef38f29580ec587d5edb473699eaad29bb15e686d2634c070737" => :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 d87d1c9319ee4..0000000000000 --- a/Formula/abcl.rb +++ /dev/null @@ -1,34 +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.7.0/abcl-src-1.7.0.tar.gz" - sha256 "a5537243a0f9110bf23b058c152445c20021cc7989c99fc134f3f92f842e765d" - head "https://abcl.org/svn/trunk/abcl/", :using => :svn - - bottle do - cellar :any_skip_relocation - sha256 "01dc891257763b86376f4103cac1696f3614d5a066ecdf6665f6ac3b4a1cce4a" => :catalina - sha256 "fc0dc598a3ddfdf3da5cebb18dd554df41306bcba0bbc60a9e5a0f51e5c4b653" => :mojave - sha256 "eb1906d87ae88108910d59bae0146fccab67220ae99f9161b88502f6863e5ee2" => :high_sierra - end - - depends_on "ant" - depends_on :java => "1.8" - depends_on "rlwrap" - - def install - ENV["JAVA_HOME"] = Language::Java.java_home("1.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("1.8") - 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 06f4ac5ea8178..0000000000000 --- a/Formula/abcm2ps.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Abcm2ps < Formula - desc "ABC music notation software" - homepage "http://moinejf.free.fr/" - url "https://github.com/leesavide/abcm2ps/archive/v8.14.9.tar.gz" - sha256 "9d91c215d59bb3704fe174ba0729f634e656ab42210cfabf02f0c5c4e0c9d877" - license "GPL-3.0" - - bottle do - sha256 "c67da1ca155904d0794fc458add9bd5cd4a446a212e3aef790083c68e9aef252" => :catalina - sha256 "2d592b6fae0b8b94a63cc297f0e29e6c155019f17a830151c341376dcc9d7f6e" => :mojave - sha256 "c11af5280e03a986554b9eafa4f2cd0dc91cb725dd35e81228eaf8d126c9660f" => :high_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 373a020a45c92..0000000000000 --- a/Formula/abcmidi.rb +++ /dev/null @@ -1,48 +0,0 @@ -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-2020.07.06.zip" - sha256 "ad90cf36e01ca08558c40c2bfadc223013969f47070683a5c5f92bc8c51679ae" - - bottle do - cellar :any_skip_relocation - sha256 "1aeee29402bb1fbfdee9530fc92cd76472671e627d6170292b51ae69aa65e79c" => :catalina - sha256 "d980dd1179157a3132ae2fcb95e829654d9d90b7c1862e241cfeefe27aeb8d79" => :mojave - sha256 "0d256af1fe2342ebaffa7d689044d27aff85109c9392c03dded35eb26d78de8a" => :high_sierra - 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 27a70955a0df7..0000000000000 --- a/Formula/abduco.rb +++ /dev/null @@ -1,30 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "6d78f6c36e0933f3c55bc96d4ca5c0e4e24030598702423ed752130721e7b8dc" => :catalina - 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 7354c43b5d6b4..0000000000000 --- a/Formula/abnfgen.rb +++ /dev/null @@ -1,27 +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 "c1531bab58a352221fca0cc5b73db2d9f206e1b98272ff06a90d72aa9e991925" => :catalina - 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 2992dcdfc7eaa..0000000000000 --- a/Formula/abook.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Abook < Formula - desc "Address book with mutt support" - homepage "https://abook.sourceforge.io/" - url "http://abook.sourceforge.net/devel/abook-0.6.1.tar.gz" - sha256 "f0a90df8694fb34685ecdd45d97db28b88046c15c95e7b0700596028bd8bc0f9" - license "GPL-2.0" - head "https://git.code.sf.net/p/abook/git.git" - - bottle do - sha256 "09e77aa3db2cf8a702effbebbbf83f7a2f860b0d5db6bcf37549edb7db5438a7" => :catalina - sha256 "a6ab99c751a03e11e2ace660ad9325a9fe4262598f284c0fb87626778383e29d" => :mojave - sha256 "a0461ecc678e5cb65a901bd39dbd7f0f8015a29ed605e6cf28f1315d5c347ecb" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" - depends_on "readline" - - def install - # fix "undefined symbols" error caused by C89 inline behaviour - inreplace "database.c", "inline int", "int" - - system "autoreconf", "-ivf" - 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/abseil.rb b/Formula/abseil.rb deleted file mode 100644 index e507d16dedbf4..0000000000000 --- a/Formula/abseil.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Abseil < Formula - desc "C++ Common Libraries" - homepage "https://abseil.io/" - url "https://github.com/abseil/abseil-cpp/archive/20200225.2.tar.gz" - sha256 "f41868f7a938605c92936230081175d1eae87f6ea2c248f41077c8f88316f111" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "43368dc236c3e6371d904edda75e5a8dae8127ded5b2f9ff9a0a15b4ddf103d0" => :catalina - sha256 "68ed0a482bd727a10fc0cf2e2e76c0307dc2d5eba8c9e4a2c0990a1dc68825b9" => :mojave - sha256 "bed9e2b638d6c044d31fe88bd04b225eb33548650890084ebb0657a574f7fcee" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.cc").write <<~EOS - #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"; - } - EOS - system ENV.cxx, "-std=c++11", "-I#{include}", "-L#{lib}", "-labsl_strings", - "test.cc", "-o", "test" - assert_equal "Joined string: foo-bar-baz\n", shell_output("#{testpath}/test") - end -end diff --git a/Formula/abuse.rb b/Formula/abuse.rb deleted file mode 100644 index e409ff227fda0..0000000000000 --- a/Formula/abuse.rb +++ /dev/null @@ -1,85 +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 "669679d60bb64b08d940f9f7c4b29faf340ff081d62b66f1764087db466fffe2" => :catalina - 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 947cf759835c8..0000000000000 --- a/Formula/abyss.rb +++ /dev/null @@ -1,53 +0,0 @@ -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.2.4/abyss-2.2.4.tar.gz" - sha256 "f064a8c5ad152a37963d9001df6c89d744370f7ec5a387307747c4647360a47c" - revision 1 - - bottle do - cellar :any - sha256 "0fa7a8feaadb399933d3322c5df54136f47681481a26ec68ad535ff13cbd1f81" => :catalina - sha256 "54adf813fa79009c9e6f942dfbd0bc4f0e4d76f04bd140fc1a9649df2ad23d6f" => :mojave - sha256 "56eeaa001afb778129143c25566bf17f33e49099e2a1a08748444a6a77fed168" => :high_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 "https://www.bcgsc.ca/sites/default/files/bioinformatics/software/abyss/releases/1.3.4/test-data.tar.gz" - sha256 "28f8592203daf2d7c3b90887f9344ea54fda39451464a306ef0226224e5f4f0e" - end - - def install - ENV.delete("HOMEBREW_SDKROOT") if MacOS.version >= :mojave && MacOS::CLT.installed? - 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 d9219d6911920..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_10/ACE-6.5.10.tar.bz2" - sha256 "90de437926928e98e9fd9132c7c3e886ca79f25567adeccbc24a5996f230d8e2" - - bottle do - cellar :any - sha256 "b927c8d220e8bae7f821842f12918913ff39fbf42d8dd19ac0f304fcaf7c726f" => :catalina - sha256 "b25da938944f8204721e41a580321d3fd61576aac0d62b542deae5a3b23478d8" => :mojave - sha256 "6f41f8fa3975be36a2263e8e49ebd3d9a7ab0b1e575035434353b5be0f1ff1ff" => :high_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 658ebe5aeb0f3..0000000000000 --- a/Formula/aces_container.rb +++ /dev/null @@ -1,38 +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 "26cfdcca70d0fb62834376bfbda89af0acd57f0173a4a3c9bd0f77adf748c8b9" => :catalina - 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 8234f02714b6e..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-v3.4.0" - sha256 "e048c5e6144f5932d8672c2fade81d9073d5b3ca1517b84df006de3d25414fc1" - - 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 - - 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-v#{version.to_s.tr("-", "_")}" => "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 6432b5e94db93..0000000000000 --- a/Formula/acme.rb +++ /dev/null @@ -1,31 +0,0 @@ -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 => "121" - version "0.96.5" - - bottle do - cellar :any_skip_relocation - sha256 "fcf29880657324af51e378076ea9db3759aca5b443e84c77a81e91f56dc3bc78" => :catalina - sha256 "484c4e81c9bd8e8440cf1eac1e704985b261fe2b08007cc25b482c528afff427" => :mojave - sha256 "5adddcafac8c43eb3b287dc33f132e44e8c4e953a786fbb0b35343c4a9c0aa5d" => :high_sierra - 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 489da3fef20c4..0000000000000 --- a/Formula/acmetool.rb +++ /dev/null @@ -1,193 +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 - cellar :any_skip_relocation - rebuild 1 - sha256 "859ddcc717399c6724283beece51c0a93497e00be685d3f1cfb7153506cbd9bb" => :catalina - sha256 "fd6d5e67865a1038fef6f4b183c255e42e4eb6470d5847e804639197f226da6b" => :mojave - sha256 "62ec2c87880494488a50d78c36104f75eb97bb160ddf316387ab116e51ace2fd" => :high_sierra - end - - depends_on "go" => :build - - uses_from_macos "libpcap" - - 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/HEAD/_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.safe_popen_read("#{buildpath}/src/github.com/hlandau/buildinfo/gen")} - ] - system "go", "build", "-o", bin/"acmetool", "-ldflags", ldflags.join(" ") - end - - (man8/"acmetool.8").write Utils.safe_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 3e2035be20ea4..0000000000000 --- a/Formula/acpica.rb +++ /dev/null @@ -1,28 +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-20200528.tar.gz" - sha256 "e69f81c6924c8d30f9b9005bb002307f07b5a1538e13c909bea2f8a44e0d8610" - head "https://github.com/acpica/acpica.git" - - bottle do - cellar :any_skip_relocation - sha256 "cd77c7ab262dccd3cb56bb5685ef94aabb63a0f3bffb1834504a12fb910bf0ed" => :catalina - sha256 "d5be4c0ca5c62d26063618cd358b552f13bde291c68792016b8d3ec3e74579ef" => :mojave - sha256 "b6b6ae7b98a9450ac248d85bee082743f749a95320550028198af6f2c6e0681f" => :high_sierra - end - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - uses_from_macos "m4" => :build - - 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 1de7030319868..0000000000000 --- a/Formula/activemq-cpp.rb +++ /dev/null @@ -1,30 +0,0 @@ -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" - revision 1 - - bottle do - cellar :any - sha256 "c06d4253f9496b49b63c224637a97525b13ecb834884a3548adbdafe4dde0a73" => :catalina - sha256 "024bf1c2c3ef8e612180b9f82c98f854235e8e371e01210c142304a762a30b3c" => :mojave - sha256 "21855925e7e9ecfe125c959c84a6bce710ca409a2a33f4f8d396f45cc52a4ab9" => :high_sierra - sha256 "c994de229e86fb7e80c846d6f2b44acba306014f334ba65550c15102214dbcb8" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "apr" - depends_on "openssl@1.1" - - 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 771446aabbc89..0000000000000 --- a/Formula/activemq.rb +++ /dev/null @@ -1,48 +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.lua?path=activemq/5.16.0/apache-activemq-5.16.0-bin.tar.gz" - mirror "https://archive.apache.org/dist/activemq/5.16.0/apache-activemq-5.16.0-bin.tar.gz" - sha256 "d399f51a34944a48b49153ffbeb50cef42666185efbec6d5aa588a0d2ca1c874" - - bottle :unneeded - - depends_on "openjdk" - - def install - rm_rf Dir["bin/linux-x86-*"] - libexec.install Dir["*"] - (bin/"activemq").write_env_script libexec/"bin/activemq", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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/adios2.rb b/Formula/adios2.rb deleted file mode 100644 index 5f02a3de1097f..0000000000000 --- a/Formula/adios2.rb +++ /dev/null @@ -1,87 +0,0 @@ -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/v2.6.0.tar.gz" - sha256 "45b41889065f8b840725928db092848b8a8b8d1bfae1b92e72f8868d1c76216c" - revision 1 - head "https://github.com/ornladios/ADIOS2.git", :branch => "master" - - bottle do - sha256 "52714e697f707e1292d16d0ab1a2454d0e2ddb5640856fa717b2494cbaaedfc1" => :catalina - sha256 "623afa19d1733ce0c593277625b7ea07d8b970a6d824d37f3b7cbbea0cda1f6c" => :mojave - sha256 "48c44768666c1fb7b4e288dec85c5e6bd45911fb72e5d77d0c0ce3099d782dec" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "gcc" => :build - depends_on "c-blosc" - depends_on "libfabric" - depends_on "libpng" - depends_on "mpi4py" - depends_on "numpy" - depends_on "open-mpi" - depends_on "python@3.8" - depends_on "zeromq" - uses_from_macos "bzip2" - - # macOS 10.13 configuration-time issue detecting float types - # reference: https://github.com/ornladios/ADIOS2/pull/2305 - # can be removed after v2.6.0 - patch do - url "https://github.com/ornladios/ADIOS2/pull/2305.patch?full_index=1" - sha256 "6d0b84af71d6ccf4cf1cdad5e064cca837d505334316e7e78d18fa30a959666a" - end - - def install - # fix `include/adios2/common/ADIOSConfig.h` file audit failure - inreplace "source/adios2/common/ADIOSConfig.h.in" do |s| - s.gsub! ": @CMAKE_C_COMPILER@", ": /usr/bin/clang" - s.gsub! ": @CMAKE_CXX_COMPILER@", ": /usr/bin/clang++" - end - - args = std_cmake_args + %W[ - -DADIOS2_USE_Blosc=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=#{Formula["python@3.8"].opt_bin}/python3 - -DADIOS2_BUILD_TESTING=OFF - -DADIOS2_BUILD_EXAMPLES=OFF - ] - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - rm_rf Dir[prefix/"bin/bp4dbg"] # https://github.com/ornladios/ADIOS2/pull/1846 - end - - (pkgshare/"test").install "examples/hello/bpWriter/helloBPWriter.cpp" - (pkgshare/"test").install "examples/hello/bpWriter/helloBPWriter.py" - end - - test do - adios2_config_flags = `adios2-config --cxx`.chomp.split - system "mpic++", - (pkgshare/"test/helloBPWriter.cpp"), - *adios2_config_flags - system "./a.out" - assert_predicate testpath/"myVector_cpp.bp", :exist? - - system Formula["python@3.8"].opt_bin/"python3", "-c", "import adios2" - system Formula["python@3.8"].opt_bin/"python3", (pkgshare/"test/helloBPWriter.py") - assert_predicate testpath/"npArray.bp", :exist? - end -end diff --git a/Formula/admesh.rb b/Formula/admesh.rb deleted file mode 100644 index b03c086ab32f3..0000000000000 --- a/Formula/admesh.rb +++ /dev/null @@ -1,37 +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.4/admesh-0.98.4.tar.gz" - sha256 "1c441591f2223034fed2fe536cf73e996062cac840423c3abe5342f898a819bb" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "d877dfc78d057e2124d06b4826e9044b2686f19de3e84fbab1cd19c07524e6df" => :catalina - sha256 "86f1775a6dbca0e6309cdfed9fb83d068873f5e8183204f02cc871d013290f62" => :mojave - sha256 "2f0fd4e6cda35b4e14f6c8ba627ad7d22ee93507875b6943ea5677c857c4ab36" => :high_sierra - 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 1a8be33a2ab0a..0000000000000 --- a/Formula/adns.rb +++ /dev/null @@ -1,27 +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.6.0.tar.gz" - sha256 "fb427265a981e033d1548f2b117cc021073dc8be2eaf2c45fd64ab7b00ed20de" - license "GPL-3.0" - head "git://git.chiark.greenend.org.uk/~ianmdlvl/adns.git" - - bottle do - cellar :any_skip_relocation - sha256 "d9cc50eec8ac243148a121049c236cba06af4a0b1156ab397d0a2850aa79c137" => :catalina - sha256 "7cf73e25044783cd93ecd28e2e8bfb84f0b2fff3343acf39dff3c5fe68d1c5be" => :mojave - sha256 "6cbe64a32b077c9abd61337c51c4e17a2286f9bee04b33f24a5dd762125798d1" => :high_sierra - 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/adplug.rb b/Formula/adplug.rb deleted file mode 100644 index 4c18e45e42774..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.3/adplug-2.3.3.tar.bz2" - sha256 "a0f3c1b18fb49dea7ac3e8f820e091a663afa5410d3443612bf416cff29fa928" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "1698e0290de585761d85501881c22826662a4e1a04d5818a1a45d00a98f306ef" => :catalina - sha256 "9dc95d2cd84290b55285581c4214234afe13c009be2a67f3ceeb5de39ffe0729" => :mojave - sha256 "d9be8ef57f38e700c36e0f00563f5d31256112e1d2a870a97c3ac4d75ae138f2" => :high_sierra - 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 da9ae88348ca7..0000000000000 --- a/Formula/advancecomp.rb +++ /dev/null @@ -1,40 +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" - license "GPL-3.0" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "fccdb14eb1a620c824c08e748db390d788ad797c30654cb6434205fb16c78784" => :catalina - sha256 "798de4490c97283280259ffc1dc39159bd0ded85edb47f3212ad5ec9a174289e" => :mojave - sha256 "fdb2a72157445c33a462388f05580489c427f4f0d2a3d4cdc1b7867ef69e7e53" => :high_sierra - sha256 "4ef3590e26c5ac96d64dc985b035ec7055f215c84d31dfb09542d958f6ec4e77" => :sierra - 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", "-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 70fe9288c21df..0000000000000 --- a/Formula/advancemame.rb +++ /dev/null @@ -1,33 +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" - license "GPL-2.0" - - bottle do - sha256 "7530ca2e37ac45b53164ae54ab6669f1796ea0af88541a85a93a74c155fb0029" => :catalina - sha256 "95f2cdff91ff98c3c9f65a0751d7948cefb3829d96e1977b5b8869163eba0790" => :mojave - sha256 "9c5e0a9f81f43ec02eb951b82b4930639dafcdbacbeadf7bcc5e74f2e2ec7c45" => :high_sierra - sha256 "6ba2c02db07a9ef7ddf561dbc2cde3904abe0b1b0ab9c9469020fdeced72e011" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "sdl" - - uses_from_macos "expat" - uses_from_macos "ncurses" - - 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 9aa9ff7800eb0..0000000000000 --- a/Formula/advancemenu.rb +++ /dev/null @@ -1,30 +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/v3.9/advancemame-3.9.tar.gz" - sha256 "3e4628e1577e70a1dbe104f17b1b746745b8eda80837f53fbf7b091c88be8c2b" - license "GPL-2.0" - - bottle do - sha256 "07f9a82231936429257190078d28ec7313b39dfe9ecf3ed9e82b15fbe1615366" => :catalina - sha256 "36ebf0c6727172fa909b933f801986e483892d5cb10c0a2fb27314880d906bd1" => :mojave - sha256 "fda952fe67d2c39e57d621b6a1392493a95c8ef62f510f63534f962a97252d26" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "sdl" - - uses_from_macos "expat" - uses_from_macos "zlib" - - 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 - assert_match "Creating AdvanceMENU standard configuration file", shell_output("#{bin}/advmenu --default 2>&1") - end -end diff --git a/Formula/advancescan.rb b/Formula/advancescan.rb deleted file mode 100644 index e67b93937cb83..0000000000000 --- a/Formula/advancescan.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a2858248da2aa75092ab3511c6f9922bc85227e07c27444371e8d75931668bee" => :catalina - sha256 "3aa20db4c47b16166b385d3e7e0c7af903833333757af7b1e0909dec00824ce2" => :mojave - sha256 "d0a8416434aa03573dcbadebd135fbcfa6f4829934622ab8afe68aa496ec5e48" => :high_sierra - sha256 "0bc4290c65271b84aec455adbaf85795857b19102e6efb152a64623420ae5757" => :sierra - sha256 "e4295866cda2370aa37cb1144ff1269ada4df6b76145a25efaf072d7a6b09b5c" => :el_capitan - sha256 "f91cbe31c7c8072fffffcd0cc8766e20df6f728abc73f66140f97c0a49d6f6c8" => :yosemite - end - - uses_from_macos "zlib" - - 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 2e260e5cd5c3b..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.36/adwaita-icon-theme-3.36.1.tar.xz" - sha256 "e498518627044dfd7db7d79a5b3d437848caf1991ef4ef036a2d3a2ac2c1f14d" - - bottle do - cellar :any_skip_relocation - sha256 "68833a3f5aff79bdf75c2e761a8451750b93e8a955e49356a78a2a3f0e1fbcd8" => :catalina - sha256 "68833a3f5aff79bdf75c2e761a8451750b93e8a955e49356a78a2a3f0e1fbcd8" => :mojave - sha256 "68833a3f5aff79bdf75c2e761a8451750b93e8a955e49356a78a2a3f0e1fbcd8" => :high_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 08ddaba1754fb..0000000000000 --- a/Formula/aescrypt-packetizer.rb +++ /dev/null @@ -1,65 +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.14.tgz" - sha256 "5051394529bf3f99c42b57f755b2269e6abaae8b0e3fd90869c4b0bb58f5f1c7" - - bottle do - cellar :any_skip_relocation - sha256 "1615637765b9c2c4aa26bb5c858962d2b5614d7098aa45ebb8154c839fcde13a" => :catalina - sha256 "063038d7a6789ce5052fa1f7bf1be43ab9cd5c4157d5f9d1d37a91382b007958" => :mojave - sha256 "ad36c0bff9d673c364b18795669f51329d8e7c5ea862af2ef3614051976cf601" => :high_sierra - sha256 "39463bd2c693eaa4060f10e8d663346189ff1ebcc9bfa20971158e9e265b7b1c" => :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 - 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 f78548b93a93d..0000000000000 --- a/Formula/aescrypt.rb +++ /dev/null @@ -1,32 +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 "c5dac9eb7f3ce8509c766d82ef5f972c8a41984284ae3e01651c6f308164c5bd" => :catalina - 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 9eece41952438..0000000000000 --- a/Formula/aespipe.rb +++ /dev/null @@ -1,26 +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.4f.tar.bz2" - sha256 "b135e1659f58dc9be5e3c88923cd03d2a936096ab8cd7f2b3af4cb7a844cef96" - - bottle do - cellar :any_skip_relocation - sha256 "c96c3f1ba5bcd7672630d7c9d693cb5d9333e3473ecdca6771290a68ac54db2e" => :catalina - sha256 "f52e6c3afc951ca588522d8073b62300113a30cb6d3927a25de643cc10622d74" => :mojave - sha256 "00d7cb8240e8e1beb4b8cf701bf38961531df8a9f2d497c4ff5a95747ac3dbae" => :high_sierra - 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 095634a42e24b..0000000000000 --- a/Formula/afflib.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Afflib < Formula - desc "Advanced Forensic Format" - homepage "https://github.com/sshock/AFFLIBv3" - url "https://github.com/sshock/AFFLIBv3/archive/v3.7.19.tar.gz" - sha256 "d358b07153dd08df3f35376bab0202c6103808686bab5e8486c78a18b24e2665" - - bottle do - cellar :any - sha256 "4cc737d25010d916fee5998d5409ac803e2051876008602af9e4df5446b820c8" => :catalina - sha256 "3e533865a44b9cbea70f9e5268fa48828abeb2b8ad864b8b1e3ab8e16c44ce13" => :mojave - sha256 "09ee4859a479fb096ffa391a21f3e0db65ae16b5953f4a5749ed49219bf51449" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "curl" - uses_from_macos "expat" - - def install - ENV["PYTHON"] = Formula["python@3.8"].opt_bin/"python3" - - args = %w[ - --enable-s3 - --enable-python - --disable-fuse - ] - - 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 02d78f0fecf50..0000000000000 --- a/Formula/afio.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Afio < Formula - desc "Creates cpio-format archives" - homepage "https://github.com/kholtman/afio" - url "https://github.com/kholtman/afio/archive/v2.5.2.tar.gz" - sha256 "c64ca14109df547e25702c9f3a9ca877881cd4bf38dcbe90fbd09c8d294f42b9" - head "https://github.com/kholtman/afio.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "28494133d10acea2c1a298fe858d26889ba8567422b9f431710b156a4a8ac858" => :catalina - sha256 "733a4169a7be82dc173cc302994ad205493a9085580634b92faa38c96c84608b" => :mojave - sha256 "53dbb826f2c3e050bd70078945d92772a4c434b0aa75e1a71cb29e56ed8e62fa" => :high_sierra - 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 c659b3facc9cb..0000000000000 --- a/Formula/afl-fuzz.rb +++ /dev/null @@ -1,33 +0,0 @@ -class AflFuzz < Formula - desc "American fuzzy lop: Security-oriented fuzzer" - homepage "https://github.com/google/AFL" - url "https://github.com/google/AFL/archive/v2.57b.tar.gz" - version "2.57b" - sha256 "a6416350ef40e042085337b0cbc12ac95d312f124d11f37076672f511fe31608" - license "Apache-2.0" - - bottle do - sha256 "958368e0937e051e3330ffa78f93481f8c729a104b87fd24c04ff067fb8780ec" => :catalina - sha256 "82fb4d89ca48bc6a48c6d583497fcb48aa8e1fe7c00db57f0391881ab4a851c0" => :mojave - sha256 "2fea83e82eca377b8adaf58a3b7f4577336db1a00f931170e0abc94a5c431529" => :high_sierra - 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 11dfefa427e64..0000000000000 --- a/Formula/afsctool.rb +++ /dev/null @@ -1,58 +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 "f418e15be4bafdcb1a85e14c3148c8d4af1b300bd6ed3e4a30eca3725459ac48" => :catalina - 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 ada17d0b82b6b..0000000000000 --- a/Formula/aften.rb +++ /dev/null @@ -1,37 +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" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "c1f3497bae95d7cd92f28b1a22d2dcfc06c0c7342c6c2993b6f564110f6e8f99" => :catalina - 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 2232393e1c7bf..0000000000000 --- a/Formula/afuse.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "cf5a7aeba0e2504ea5bf7bf691ed2d0f8245cbac069b089359588e7df04140e0" => :catalina - 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 1cbbaaa4d87c6..0000000000000 --- a/Formula/agda.rb +++ /dev/null @@ -1,163 +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.6.1/Agda-2.6.1.tar.gz" - sha256 "678f416af8f30d017825309f15fac41d239b07f66a4c40497e8435a6bdb7c129" - - resource "stdlib" do - # version needed to build with ghc-8.10.1 - url "https://github.com/agda/agda-stdlib.git", - :revision => "b859bd363a96bc862ead0509bdf5869837651896" - end - end - - bottle do - rebuild 1 - sha256 "a7a95a514b445fcb561ac0ed5be267327c111507f367add5d726c0a6b96afa7b" => :catalina - sha256 "b617423569007baea1876abe6c34f4c5524ad050a8c93185f815f62e968d1750" => :mojave - sha256 "7808d30de9683ed16057e9c5508587db60e7fbcd5a7d7674afc51016c5f68327" => :high_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" - depends_on "emacs" - depends_on "ghc@8.8" - - uses_from_macos "zlib" - - 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 - - {-# COMPILE GHC 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 "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 c2f2f88d88373..0000000000000 --- a/Formula/agedu.rb +++ /dev/null @@ -1,30 +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-20200705.2a7d4a2.tar.gz" - version "20200705" - sha256 "432dd9602df326088956b3e4f5efe656ad09777873d38695e0d68810899941c2" - head "https://git.tartarus.org/simon/agedu.git" - - bottle do - cellar :any_skip_relocation - sha256 "d5b1ceb8b45632543c913d12641cb820335b0e99fd823c9404222f0e087edef4" => :catalina - sha256 "bb054128df68140a5cf8b7359a7d7c6357b13c08aa393b9481ff89124e614544" => :mojave - sha256 "64a0584a579b71db75866548df7fef3eb7eb460023f3959aaf5e1c4d9e23bca8" => :high_sierra - 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 18f6146c0cb98..0000000000000 --- a/Formula/aggregate.rb +++ /dev/null @@ -1,59 +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 "3e22a340761b031b33e9f4a48f39edd98c18f7ea7c77abd02d95f816e7fe7245" => :catalina - 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: 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/aha.rb b/Formula/aha.rb deleted file mode 100644 index a33e6ec66ab36..0000000000000 --- a/Formula/aha.rb +++ /dev/null @@ -1,24 +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 "6492a70a68055bd7034820fc1a8dd951797ebde44515ffcd9d4416da732eeeb6" => :catalina - 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 e8fc4dbd2a173..0000000000000 --- a/Formula/ahcpd.rb +++ /dev/null @@ -1,75 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "7440676cc30eed4de9c2cb3ad3c9a9691ba0da6636e4d38a33722ca54d168c9d" => :catalina - 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/ahoy.rb b/Formula/ahoy.rb deleted file mode 100644 index 1f66b4ef7d0ab..0000000000000 --- a/Formula/ahoy.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Ahoy < Formula - desc "Creates self documenting CLI programs from commands in YAML files" - homepage "https://ahoy-cli.readthedocs.io/" - url "https://github.com/ahoy-cli/ahoy/archive/2.0.0.tar.gz" - sha256 "cc3e426083bf7b7309e484fa69ed53b33c9b00adf9be879cbe74c19bdaef027c" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "fb8e03826f9109edc8bb5b1e0c7c9d8054d76e364bca13e0afdf7a23b022a817" => :catalina - sha256 "eabaf2c0faa64d878f3fd552823b9d5103e0755ba5f3120628e605964fc93257" => :mojave - sha256 "93db889b646270f7a92d32f649c9e256e4e90cfa006a04c614334f28557ce7ca" => :high_sierra - sha256 "5743854a4e6553adb3318a2facfd941bcf4d95a7ab3c2399400c7818c6e19c6f" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - bin_path = buildpath/"src/github.com/ahoy-cli/ahoy" - bin_path.install Dir["*"] - cd bin_path do - system "go", "build", "-o", bin/"ahoy", "-ldflags", "-X main.version=#{version}", "." - end - end - - def caveats - <<~EOS - ===== UPGRADING FROM 1.x TO 2.x ===== - - If you are upgrading from ahoy 1.x, note that you'll - need to upgrade your ahoyapi settings in your .ahoy.yml - files to 'v2' instead of 'v1'. - - See other changes at: - - https://github.com/ahoy-cli/ahoy - - EOS - end - - test do - (testpath/".ahoy.yml").write <<~EOS - ahoyapi: v2 - commands: - hello: - cmd: echo "Hello Homebrew!" - EOS - assert_equal "Hello Homebrew!\n", `#{bin}/ahoy hello` - end -end diff --git a/Formula/aide.rb b/Formula/aide.rb deleted file mode 100644 index 26fc90407e413..0000000000000 --- a/Formula/aide.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Aide < Formula - desc "File and directory integrity checker" - homepage "https://aide.github.io/" - url "https://github.com/aide/aide/releases/download/v0.16.2/aide-0.16.2.tar.gz" - sha256 "17f998ae6ae5afb9c83578e4953115ab8a2705efc50dee5c6461cef3f521b797" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "8cf98b716cfdc2e06e059b5c0f780db5940c4fda116c3b0543f8e19bd76a9817" => :catalina - sha256 "bb68fa349609a0221b2138e3596ceb803242862b771bb0b76440057e31201050" => :mojave - sha256 "fff1a3e469346d9181f73d8c3d734801b900c765308f3c36495b1801fb3ad897" => :high_sierra - sha256 "77aef168355fa73b01b0967d80058582f7387997ba2c7f7b7aad0eb335939488" => :sierra - end - - head do - url "https://github.com/aide/aide.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "libgcrypt" - depends_on "libgpg-error" - depends_on "pcre" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - uses_from_macos "curl" - - 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 c8286ffc0f12f..0000000000000 --- a/Formula/aircrack-ng.rb +++ /dev/null @@ -1,73 +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.6.tar.gz" - sha256 "4f0bfd486efc6ea7229f7fbc54340ff8b2094a0d73e9f617e0a39f878999a247" - license "GPL-2.0" - - bottle do - sha256 "1b5ecf42ef840c108536eac5107cf63c514ca2f3d7e8c4f32e5b301f088729c1" => :catalina - sha256 "e6bbba9c16ac26aaacaad5ac4935100a79cf702ab8fcb35fa9797e806ec003fe" => :mojave - sha256 "fad333ea8e2792d88305c22b62549f63900ea32aa3f856de57d6e8d70740cd49" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - 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/airshare.rb b/Formula/airshare.rb deleted file mode 100644 index 6ea8b93228e23..0000000000000 --- a/Formula/airshare.rb +++ /dev/null @@ -1,140 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "b8afd2390f12c0edf645a7483d4d5865aff9f90fe9764ada5ff5da75672ee978" => :catalina - sha256 "5d14e6b2ec9d1a64cd8f2148c81865c0992c3a8547841b37f996056fd58b0048" => :mojave - sha256 "4bfcf320c69005e2be499bb6e19d5fe1243354d72132e1e1935e5ce563e2aac8" => :high_sierra - end - - depends_on "python@3.8" - - resource "aiohttp" do - url "https://files.pythonhosted.org/packages/00/94/f9fa18e8d7124d7850a5715a0b9c0584f7b9375d331d35e157cee50f27cc/aiohttp-3.6.2.tar.gz" - sha256 "259ab809ff0727d0e834ac5e8a283dc5e3e0ecc30c4d80b3cd17a4139ce1f326" - end - - resource "async-timeout" do - url "https://files.pythonhosted.org/packages/a1/78/aae1545aba6e87e23ecab8d212b58bb70e72164b67eb090b81bb17ad38e3/async-timeout-3.0.1.tar.gz" - sha256 "0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f" - end - - resource "asyncio" do - url "https://files.pythonhosted.org/packages/da/54/054bafaf2c0fb8473d423743e191fcdf49b2c1fd5e9af3524efbe097bafd/asyncio-3.4.3.tar.gz" - sha256 "83360ff8bc97980e4ff25c964c7bd3923d333d177aa4f7fb736b019f26c7cb41" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b4/19/53433f37a31543364c8676f30b291d128cdf4cd5b31b755b7890f8e89ac8/certifi-2020.4.5.2.tar.gz" - sha256 "5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1" - 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/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" - sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "humanize" do - url "https://files.pythonhosted.org/packages/8c/ca/93575e1d884cc33d20843c62449ea55bbdb792fe7156fc53009758a5aa2b/humanize-2.4.0.tar.gz" - sha256 "42ae7d54b398c01bd100847f6cb0fc9e381c21be8ad3f8e2929135e48dbff026" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "idna_ssl" do - url "https://files.pythonhosted.org/packages/46/03/07c4894aae38b0de52b52586b24bf189bb83e4ddabfe2e2c8f2419eec6f4/idna-ssl-1.1.0.tar.gz" - sha256 "a933e3bb13da54383f9e8f35dc4f9cb9eb9b3b78c6b36f311254d6d0d92c6c7c" - end - - resource "ifaddr" do - url "https://files.pythonhosted.org/packages/3d/fc/4ce147e3997cd0ea470ad27112087545cf83bf85015ddb3054673cb471bb/ifaddr-0.1.7.tar.gz" - sha256 "1f9e8a6ca6f16db5a37d3356f07b6e52344f6f9f7e806d618537731669eb1a94" - end - - resource "multidict" do - url "https://files.pythonhosted.org/packages/65/d4/fabdcc5ee4451c8a8e177e27ddfd131a53a82ecc5a3b68468b7e9f8d70b4/multidict-4.7.6.tar.gz" - sha256 "fbb77a75e529021e7c4a8d4e823d88ef4d23674a202be4f5addffc72cbb91430" - end - - resource "pyperclip" do - url "https://files.pythonhosted.org/packages/f6/5b/55866e1cde0f86f5eec59dab5de8a66628cb0d53da74b8dbc15ad8dabda3/pyperclip-1.8.0.tar.gz" - sha256 "b75b975160428d84608c26edba2dec146e7799566aea42c1fe1b32e72b6028f2" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "requests-toolbelt" do - url "https://files.pythonhosted.org/packages/28/30/7bf7e5071081f761766d46820e52f4b16c8a08fef02d2eb4682ca7534310/requests-toolbelt-0.9.1.tar.gz" - sha256 "968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0" - end - - resource "termcolor" do - url "https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz" - sha256 "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b" - end - - resource "tqdm" do - url "https://files.pythonhosted.org/packages/a9/03/df1d77e852dd697c0ff7b7b1b9888739517e5f97dfbd2cf7ebd13234084c/tqdm-4.46.1.tar.gz" - sha256 "cd140979c2bebd2311dfb14781d8f19bd5a9debb92dcab9f6ef899c987fcf71f" - end - - resource "typing-extensions" do - url "https://files.pythonhosted.org/packages/6a/28/d32852f2af6b5ead85d396249d5bdf450833f3a69896d76eb480d9c5e406/typing_extensions-3.7.4.2.tar.gz" - sha256 "79ee589a3caca649a9bfd2a8de4709837400dfa00b6cc81962a1e6a1815969ae" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "yarl" do - url "https://files.pythonhosted.org/packages/d6/67/6e2507586eb1cfa6d55540845b0cd05b4b77c414f6bca8b00b45483b976e/yarl-1.4.2.tar.gz" - sha256 "58cd9c469eced558cd81aa3f484b2924e8897049e06889e8ff2510435b7ef74b" - end - - resource "zeroconf" do - url "https://files.pythonhosted.org/packages/9b/6e/4ee8219d80b62b24728860434ad30e467a4a957fae2b4386da47f69168ed/zeroconf-0.27.1.tar.gz" - sha256 "51a8bc581036cabcf82523c81b72f6a11b2c7913eb7eb418b6dad60cd40f9ef2" - end - - def install - virtualenv_install_with_resources - end - - test do - port = free_port - _, _, wait_thr = Open3.popen2 bin/"airshare", "-p", port.to_s, "homebrew-demo", "-t", "Hello Homebrew!" - sleep 5 - output = shell_output("#{bin}/airshare -p #{port} homebrew-demo") - assert_equal "Received: Hello Homebrew!\n", output.lines.last - Process.kill("TERM", wait_thr.pid) - end -end diff --git a/Formula/airspy.rb b/Formula/airspy.rb deleted file mode 100644 index b346ee102352e..0000000000000 --- a/Formula/airspy.rb +++ /dev/null @@ -1,37 +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 "17cb281bc432bcb77c33c38be4550be3a786225252b99d69db7a003daf74ef8b" => :catalina - 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 264e8fe6feffb..0000000000000 --- a/Formula/akamai.rb +++ /dev/null @@ -1,35 +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.5.tar.gz" - sha256 "759c3c3bc59c2623fc8a5f91907f55d870f77aef1839f2ecc703db5c469b852a" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a986f3bfc261227cd44447d5ff9cdfb461c50c002118d36caed068f5859432e1" => :catalina - sha256 "ce3ea6b8dba89d48bfec3be3bbf5701e7b1dcdde7a2f76a97dd668752b1e95fb" => :mojave - sha256 "2b6d07c4926858e1be33bef070a925a6746f396fa27566aaa313d5a2673cb25f" => :high_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 12d4ef9c47e03..0000000000000 --- a/Formula/akka.rb +++ /dev/null @@ -1,99 +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.20.zip" - sha256 "6f6af368672640512f8e0099a5d88277f4ac64de7d4edd151411e6a80cc78d0f" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - 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 Dir["#{libexec}/bin/*"] - bin.env_script_all_files libexec/"bin", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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 "#{Formula["openjdk"].bin}/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 "#{Formula["openjdk"].bin}/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 84a0db937c6b7..0000000000000 --- a/Formula/alac.rb +++ /dev/null @@ -1,27 +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 "0cb8439e4028ea823fb442559c12365bae08499a142ad46d0c89f010f9eb7e5d" => :catalina - 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 cf1666fe06b23..0000000000000 --- a/Formula/aldo.rb +++ /dev/null @@ -1,37 +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" - license "GPL-3.0" - - bottle do - cellar :any - rebuild 1 - sha256 "2a574bfd1a76ef4733d941234df142dfc87b05cefefaf58d0617113d7af85999" => :catalina - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/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") - end -end diff --git a/Formula/alexjs.rb b/Formula/alexjs.rb deleted file mode 100644 index 2f5997603c3b8..0000000000000 --- a/Formula/alexjs.rb +++ /dev/null @@ -1,28 +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/8.1.1.tar.gz" - sha256 "eb9b7b29f1c4dcd660da35e79bcca63bdfb8cab6eab2a7c28e77345bb6348f5b" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "7243b8eff6ed19d7bd0e1a4de718b2d1402a29550f0bd86b44089d56c9351ce9" => :catalina - sha256 "c9ea2efc68c6fd108fe37e679973dbf6e2f698a31a70c32c01ab7870a9d9dc50" => :mojave - sha256 "5ee3fd2c0c5e56bdb56fd7de0e717af9a7998a66e8a2b14374fc6cc2b36bfd86" => :high_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 a783185bc19d0..0000000000000 --- a/Formula/algernon.rb +++ /dev/null @@ -1,38 +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/archive/1.12.8.tar.gz" - sha256 "562d6f1145980d5e4c8eaefc2780801b163d228720599f22165135182018d6bf" - license "MIT" - version_scheme 1 - head "https://github.com/xyproto/algernon.git" - - bottle do - cellar :any_skip_relocation - sha256 "19d76d366a23558e40e5dc37cb8be6807afafebc2b85549bd61df488b4b8ace7" => :catalina - sha256 "2f7d73a7d99ea6ca4d406388ea7475f53ac022ca11f9df7ce5e7ff6bf629a634" => :mojave - sha256 "fcc2b783a77662cc1831dec57d1895cc078746ecaf4dc618b7df1e165254979d" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-trimpath", "-mod=vendor", "-o", bin/"algernon" - - bin.install "desktop/mdview" - prefix.install_metafiles - 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/algol68g.rb b/Formula/algol68g.rb deleted file mode 100644 index 1571435b3a6fe..0000000000000 --- a/Formula/algol68g.rb +++ /dev/null @@ -1,31 +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.5.tar.gz" - sha256 "0f757c64a8342fe38ec501bde68b61d26d051dffd45742ca58b7288a99c7e2d8" - license "GPL-3.0" - - bottle do - sha256 "046ba5e9ec0d0856557085fdf1acde227cd829d9955da28046e98c9a5ee84c09" => :catalina - sha256 "7e1acd53615ebc407aaae64eb23af6047dbbd42f967e422b3fcfa0c6d01307b6" => :mojave - sha256 "18013401e3eed914022e0a34c6b9b1ed415ec679113de78970d74aa52b0a35e8" => :high_sierra - end - - on_linux do - depends_on "postgresql" - 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 d18d6c318a654..0000000000000 --- a/Formula/align.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "cca0be9634d92fe10b845b98f26ee953f59482e0436806484a907f487e76d093" => :catalina - 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/aliyun-cli.rb b/Formula/aliyun-cli.rb deleted file mode 100644 index 0f09f7d2edffd..0000000000000 --- a/Formula/aliyun-cli.rb +++ /dev/null @@ -1,44 +0,0 @@ -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/archive/v3.0.50.tar.gz" - sha256 "e68aaf89cfedd4ce4e496d59e4ac399ae587c476d6c5f4b548423140f25bd282" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "073dfd3d9939561b6d8d99c8ee1ed5d63601a6a1e89197e08d95d6a04714a600" => :catalina - sha256 "1b172fcddd39aac84e168d53629b502ea4fc550f137a520c732c987209a15bf7" => :mojave - sha256 "26132757cd88c4a96cb724173351b8025b7647b6299de323db073fc67230d917" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GO111MODULE"] = "off" - ENV["GOPATH"] = buildpath - ENV["PATH"] = "#{ENV["PATH"]}:#{buildpath}/bin" - (buildpath/"src/github.com/aliyun/aliyun-cli").install buildpath.children - cd "src/github.com/aliyun/aliyun-cli" do - system "make", "metas" - system "go", "build", "-o", bin/"aliyun", "-ldflags", - "-X 'github.com/aliyun/aliyun-cli/cli.Version=#{version}'", "main/main.go" - prefix.install_metafiles - end - 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/allegro.rb b/Formula/allegro.rb deleted file mode 100644 index 876172bd9acc9..0000000000000 --- a/Formula/allegro.rb +++ /dev/null @@ -1,50 +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.6.0/allegro-5.2.6.0.tar.gz" - sha256 "5de8189ec051e1865f359654f86ec68e2a12a94edd00ad06d1106caa5ff27763" - head "https://github.com/liballeg/allegro5.git" - - bottle do - cellar :any - sha256 "9e71511f6c8faa8449dd06bc30bd74497ee832e3e0ca7f3eb02bcef263ab4b3f" => :catalina - sha256 "ead9f69a2af4720ad8a9e020657b1db71e49cb3e83d9d8477d425de9d948ce07" => :mojave - sha256 "4ab4367b267e257a1aeee6cd65301922cf38cb37e8c11865edecedac5960f96e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "dumb" - 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 a08d0f197f208..0000000000000 --- a/Formula/allure.rb +++ /dev/null @@ -1,49 +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.13.5/allure-commandline-2.13.5.zip" - sha256 "60f9ca89c5523c9431c13f5a22165fe67164e2f484f0718f993de9ab87896cd0" - - bottle :unneeded - - depends_on "openjdk" - - def install - # Remove all windows files - rm_f Dir["bin/*.bat"] - - prefix.install_metafiles - 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 <<~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/allureofthestars.rb b/Formula/allureofthestars.rb deleted file mode 100644 index 0d0f7274191e8..0000000000000 --- a/Formula/allureofthestars.rb +++ /dev/null @@ -1,38 +0,0 @@ -require "language/haskell" - -class Allureofthestars < Formula - include Language::Haskell::Cabal - - desc "Near-future Sci-Fi roguelike and tactical squad combat game" - homepage "https://www.allureofthestars.com/" - url "https://hackage.haskell.org/package/Allure-0.9.5.0/Allure-0.9.5.0.tar.gz" - sha256 "8180fe070633bfa5515de8f7443421044e7ad4ee050f0a92c048cec5f2c88132" - license "AGPL-3.0" - head "https://github.com/AllureOfTheStars/Allure.git" - - bottle do - rebuild 3 - sha256 "cdcc579293d895e65bdfd907c2ab4d66db89e0389f78df9acaf1ea556ea47c63" => :catalina - sha256 "4b18f47a9ade6d260030488503b5bb3021ae523cf3b54960c8092495f0ffd47c" => :mojave - sha256 "2a056d85e8a4794158435ca324f7bc81d8dcb098770ec1d3d288dfcc77553c47" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.8" => :build - depends_on "pkg-config" => :build - depends_on "gmp" - depends_on "sdl2_ttf" - - def install - install_cabal_package :using => ["happy", "alex"] - end - - test do - assert_equal "", - shell_output("#{bin}/Allure --dbgMsgSer --dbgMsgCli --logPriority 0 --newGame 3 --maxFps 100000 " \ - "--stopAfterFrames 50 --automateAll --keepAutomated --gameMode battle " \ - "--setDungeonRng 7 --setMainRng 7") - assert_equal "", shell_output("cat ~/.Allure/stderr.txt") - assert_match "UI client FactionId 1 stopped", shell_output("cat ~/.Allure/stdout.txt") - end -end diff --git a/Formula/alluxio.rb b/Formula/alluxio.rb deleted file mode 100644 index c33994ca0bded..0000000000000 --- a/Formula/alluxio.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Alluxio < Formula - desc "Open Source Memory Speed Virtual Distributed Storage" - homepage "https://www.alluxio.io/" - url "https://downloads.alluxio.io/downloads/files/1.8.2/alluxio-1.8.2-bin.tar.gz" - sha256 "e927f80aabf80ac0b47d4491a4320058bcd15f554fccec1375e8f6dcf243ebb4" - - bottle :unneeded - - def default_alluxio_conf - <<~EOS - alluxio.master.hostname=localhost - EOS - end - - def install - doc.install Dir["docs/*"] - libexec.install Dir["*"] - bin.write_exec_script Dir["#{libexec}/bin/*"] - - rm_rf 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" - end - - def caveats - <<~EOS - To configure alluxio, edit - #{etc}/alluxio/alluxio-env.sh - #{etc}/alluxio/alluxio-site.properties - 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 f046e80f00588..0000000000000 --- a/Formula/alot.rb +++ /dev/null @@ -1,129 +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.9.1.tar.gz" - sha256 "ee2c1ab1b43d022a8fe2078820ed57d8d72aec260a7d750776dac4ee841d1de4" - license "GPL-3.0" - head "https://github.com/pazz/alot.git" - - bottle do - cellar :any_skip_relocation - sha256 "cca5bf15902a29f1160c3b8b9e6f9735332ee6d7a104af00b30c607854e2c9a4" => :catalina - sha256 "393a400bace4c3b8b40ec6cf0dd05c40ad5951d0058ed0a4ac28a15ecd1cfb56" => :mojave - sha256 "eac11abd553dd7f75db76aba7edf0875c35b2f30b4a23d6e761e7cd3f0f88487" => :high_sierra - end - - depends_on "sphinx-doc" => :build - depends_on "swig" => :build - depends_on "gpgme" - depends_on "libmagic" - depends_on "notmuch" - depends_on "python@3.8" - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "Automat" do - url "https://files.pythonhosted.org/packages/80/c5/82c63bad570f4ef745cc5c2f0713c8eddcd07153b4bee7f72a8dc9f9384b/Automat-20.2.0.tar.gz" - sha256 "7979803c74610e11ef0c0d68a2942b152df52da55336e0c9d58daf1831cbdf33" - 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 "hyperlink" do - url "https://files.pythonhosted.org/packages/e0/46/1451027b513a75edf676d25a47f601ca00b06a6a7a109e5644d921e7462d/hyperlink-19.0.0.tar.gz" - sha256 "4288e34705da077fada1111a24a0aa08bb1e76699c9ce49876af722441845654" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "incremental" do - url "https://files.pythonhosted.org/packages/8f/26/02c4016aa95f45479eea37c90c34f8fab6775732ae62587a874b619ca097/incremental-17.5.0.tar.gz" - sha256 "7b751696aaf36eebfab537e458929e194460051ccad279c72b755a167eebd4b3" - end - - resource "PyHamcrest" do - url "https://files.pythonhosted.org/packages/58/05/7b993fabb44ff0b52a90916d96bfd91a65ecf90b8248e72bba325ba8e438/PyHamcrest-2.0.2.tar.gz" - sha256 "412e00137858f04bde0729913874a48485665f2d36fe9ee449f26be864af9316" - 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/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "Twisted" do - url "https://files.pythonhosted.org/packages/4a/b4/4973c7ccb5be2ec0abc779b7d5f9d5f24b17b0349e23240cfc9dc3bd83cc/Twisted-20.3.0.tar.bz2" - sha256 "d72c55b5d56e176563b91d11952d13b01af8725c623e498db5507b6614fc1e10" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/45/dd/d57924f77b0914f8a61c81222647888fbb583f89168a376ffeb5613b02a6/urwid-2.1.0.tar.gz" - sha256 "0896f36060beb6bf3801cb554303fef336a79661401797551ba106d23ab4cd86" - 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/af/d2/9675302d7ced7ec721481f4bbecd28a390a8db4ff753d28c64057b975396/zope.interface-5.1.0.tar.gz" - sha256 "40e4c42bd27ed3c11b2c983fecfb03356fae1209de10686d03c02c8696a1d90e" - 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/alp.rb b/Formula/alp.rb deleted file mode 100644 index 45f39f3b0f053..0000000000000 --- a/Formula/alp.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Alp < Formula - desc "Access Log Profiler" - homepage "https://github.com/tkuchiki/alp" - url "https://github.com/tkuchiki/alp/archive/v1.0.3.tar.gz" - sha256 "3bc3284d007eb9a3904ca9f36e244a31576c7e219c0cea7758eee1439c49701c" - license "MIT" - head "https://github.com/tkuchiki/alp.git" - - bottle do - cellar :any_skip_relocation - sha256 "755f952f59a31722a849a195b1cc9aaab82d427e104ece552088f322477f1e73" => :catalina - sha256 "bda205a8a157441a4a9aebe3c1881575d8a801bf8f8edc3cccdba9607163661e" => :mojave - sha256 "2b8f514b8c7540a6db9fc6a70a4b803dbf864e35eb1410e6cc874915485fbbfb" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"alp", "cli/alp/main.go" - prefix.install_metafiles - 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_predicate testpath/"dump.yml", :exist? - end -end diff --git a/Formula/alpine.rb b/Formula/alpine.rb deleted file mode 100644 index 179469d1ab935..0000000000000 --- a/Formula/alpine.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Alpine < Formula - desc "News and email agent" - homepage "http://alpine.x10host.com/alpine/release/" - url "http://alpine.x10host.com/alpine/release/src/alpine-2.23.tar.xz" - sha256 "793a61215c005b5fcffb48f642f125915276b7ec7827508dd9e83d4c4da91f7b" - license "Apache-2.0" - head "https://repo.or.cz/alpine.git" - - bottle do - sha256 "3e775bad34dc730ad9c15e3df30e753842ee542695172362cc648ead05e4d151" => :catalina - sha256 "5492f86a14779b434ebb069bcef8ae551c93dc8835106d6144699e54191de3bd" => :mojave - sha256 "f7b9f13b015de8e08ec73b1e4784abc64e5cf01785ef722ffa3d80441248a640" => :high_sierra - end - - depends_on "openssl@1.1" - - uses_from_macos "ncurses" - - def install - ENV.deparallelize - - args = %W[ - --disable-debug - --with-ssl-dir=#{Formula["openssl@1.1"].opt_prefix} - --with-ssl-certs-dir=#{etc}/openssl@1.1 - --prefix=#{prefix} - --with-bundled-tools - ] - - system "./configure", *args - system "make", "install" - end - - test do - system "#{bin}/alpine", "-conf" - end -end diff --git a/Formula/alure.rb b/Formula/alure.rb deleted file mode 100644 index 8358fabc72c75..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" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "3701d2ac280fd8ef5476343c348fec853397241cb2bdcaeb25e8a53b203d292c" => :catalina - sha256 "f2ae4fbf2822241975e66574e41070b298523e6321280bc83aff70d559db149c" => :mojave - sha256 "031b2eb61f6206879b76a7276298f1db9875fa996467327b519ccc6d1622a158" => :high_sierra - 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 e522b26cd7cc7..0000000000000 --- a/Formula/amap.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Amap < Formula - desc "Perform application protocol detection" - homepage "https://github.com/vanhauser-thc/THC-Archive" - url "https://github.com/vanhauser-thc/THC-Archive/raw/master/Tools/amap-5.4.tar.gz" - mirror "https://downloads.sourceforge.net/project/slackbuildsdirectlinks/amap/amap-5.4.tar.gz" - sha256 "a75ea58de75034de6b10b0de0065ec88e32f9e9af11c7d69edbffc4da9a5b059" - revision 3 - - bottle do - cellar :any - sha256 "48480e1e415d4003efdfac48d4f5ae75c2dbfa1d53d9e742ca400cffa04dc231" => :catalina - sha256 "ede3ed735b1041b7bb99595ffdbb49e392dbb84065383e32c0e270f8bea22da4" => :mojave - sha256 "6266dd3178e2ed39f7a48e6c9fc19fbb073f4e7d71686d5ef3ce0ee660ccb982" => :high_sierra - sha256 "1361e89caf2590146c5872907f90ad67ac9b99d2198320691e9f6df0cfdbe16c" => :sierra - end - - depends_on "openssl@1.1" - - def install - # Last release was 2011 & there's nowhere supported to report this. - openssl = Formula["openssl@1.1"] - 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@1.1"].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 032002a3fbdfb..0000000000000 --- a/Formula/amazon-ecs-cli.rb +++ /dev/null @@ -1,30 +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.20.0.tar.gz" - sha256 "67a9db1d32e5cf42cf6e8ab5b746e23af60120fdd0d0fe38c9fa3b214cd7fcd1" - head "https://github.com/aws/amazon-ecs-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "b0f0e3d37c75477cefbc53567e788a348b582c3d27143fab2fcb2c249946cff6" => :catalina - sha256 "e8fae3c0310d8313ab091892fbebef49215f282f60372b15460e0726b892cb1f" => :mojave - sha256 "d5d67c5dd5fa49c3899e664e593c81f60ee49b8fa8c5c63d2515babf9abfc5aa" => :high_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 c72d19099ac87..0000000000000 --- a/Formula/amdatu-bootstrap.rb +++ /dev/null @@ -1,21 +0,0 @@ -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" - - 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 4959de14e3cc1..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://ammonite.io/" - url "https://github.com/lihaoyi/Ammonite/releases/download/2.1.4/2.13-2.1.4" - sha256 "0702f6f5eb8b5326605d7894593d3ab42634c4a0b85599bcd9ddf8909dd866eb" - - bottle :unneeded - - depends_on "openjdk" - - def install - (libexec/"bin").install Dir["*"].first => "amm" - chmod 0755, libexec/"bin/amm" - (bin/"amm").write_env_script libexec/"bin/amm", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - 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/amp.rb b/Formula/amp.rb deleted file mode 100644 index 432c873c13b55..0000000000000 --- a/Formula/amp.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Amp < Formula - desc "Text editor for your terminal" - homepage "https://amp.rs/" - url "https://github.com/jmacdonald/amp/archive/0.6.2.tar.gz" - sha256 "9279efcecdb743b8987fbedf281f569d84eaf42a0eee556c3447f3dc9c9dfe3b" - head "https://github.com/jmacdonald/amp.git" - - bottle do - cellar :any_skip_relocation - sha256 "6d91e4902ead60e50e7dd5b7faed62a4f41999433b321e2b48682d8e8f057f2c" => :catalina - sha256 "59f96770d9e4e166c6eabfb359ada98c41edece8b2fbb877b4e855977445aaa2" => :mojave - sha256 "96ed5e0a0ba3d05358c840ee0ca157d75ca5f4613fc0e152465806d9950bfa9e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "rust" => :build - - uses_from_macos "libiconv" - - def install - system "cargo", "install", *std_cargo_args - end - - test do - input, _, wait_thr = Open3.popen2 "script -q /dev/null" - input.puts "stty rows 80 cols 43 && #{bin}/amp test.txt" - sleep 1 - # switch to insert mode and add data - input.putc "i" - sleep 1 - input.puts "test data" - # escape to normal mode, save the file, and quit - input.putc "\e" - sleep 1 - input.putc "s" - sleep 1 - input.putc "Q" - - assert_match "test data\n", (testpath/"test.txt").read - ensure - Process.kill("TERM", wait_thr.pid) - end -end diff --git a/Formula/ampl-mp.rb b/Formula/ampl-mp.rb deleted file mode 100644 index a382d20605d30..0000000000000 --- a/Formula/ampl-mp.rb +++ /dev/null @@ -1,55 +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 3 - - bottle do - cellar :any - sha256 "c111c501330b3ff8e3bde1a7e679f162bea1038df07de96810ea5cbe34775740" => :catalina - sha256 "bf329d7a40c3a21cb745d9d86bc0cf4add18397aedd6b36eb8e27feab822f1e3" => :mojave - sha256 "835aea5e86e3780681cb38ebe0f0dcd522ed21f80ed4711ad10e66b6c0814d03" => :high_sierra - end - - depends_on "cmake" => :build - - resource "miniampl" do - url "https://github.com/dpo/miniampl/archive/v1.0.tar.gz" - sha256 "b836dbf1208426f4bd93d6d79d632c6f5619054279ac33453825e036a915c675" - end - - # Removes Google Benchmark - as already done so upstream - # All it did was conflict with the google-benchmark formula - patch do - url "https://github.com/ampl/mp/commit/96e332bb8cb7ba925e3ac947d6df515496027eed.patch?full_index=1" - sha256 "1a4ef4cd1f4e8b959c20518f8f00994ef577e74e05824b2d1b241b1c3c1f84eb" - 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 c116403c40ae3..0000000000000 --- a/Formula/amqp-cpp.rb +++ /dev/null @@ -1,42 +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.1.7.tar.gz" - sha256 "71b504f21f62b69c76b371fe7044e0dfc6d42650a15c267431c5084badb0ade7" - license "Apache-2.0" - head "https://github.com/CopernicaMarketingSoftware/AMQP-CPP.git" - - bottle do - cellar :any_skip_relocation - sha256 "1bc7470b4ede09d2c270b3581f0e0c791943f050be7c2695dfc6f983a5dfc93a" => :catalina - sha256 "dc608777daa46c2b4ac309992b6e958446e812efcd511f4670cef9dc9cf10aeb" => :mojave - sha256 "2e4c08dc2967f679c6dc9179dd6d1513309843bf40ab56fee369f863a44e3912" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - 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 b4039d8329459..0000000000000 --- a/Formula/amtk.rb +++ /dev/null @@ -1,95 +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.2.tar.xz" - sha256 "71cc891fbaaa3d0cb87eeef9a2f7e1a2acab62f738d09ea922fb4b9ea2f84f86" - license "LGPL-2.1" - revision 1 - - bottle do - sha256 "539876f4666d5338b21594ab5e2de55cf8d13813cd5525713cc08e46f2e42a90" => :catalina - sha256 "dba9b06ac527c556fca194606ed68ebad20d3fdf7d6b809d547f9edec00c99cd" => :mojave - sha256 "5ca2f1ec7a77b82e1e02dcc3e3a603f83247f9235c376ebf955608c27d8a6397" => :high_sierra - 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 0bb92759be5b6..0000000000000 --- a/Formula/amtterm.rb +++ /dev/null @@ -1,40 +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" - license "GPL-2.0" - head "https://www.kraxel.org/cgit/amtterm", :using => :git - - bottle do - cellar :any_skip_relocation - sha256 "21db28f850cc553e66e71cf419cf7a975e18e73b6185b3fc1a1f244944d21706" => :catalina - 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 990afff3026bf..0000000000000 --- a/Formula/analog.rb +++ /dev/null @@ -1,44 +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 "bcfaa87aae0fd274b47855a212ee5d806a37f6c677582b0f2ddaf2f71fd29cb0" => :catalina - 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" - - uses_from_macos "zlib" - - 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 3a306b9d769d1..0000000000000 --- a/Formula/angband.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Angband < Formula - desc "Dungeon exploration game" - homepage "https://rephial.org/" - url "https://rephial.org/downloads/4.2/angband-4.2.1.tar.gz" - sha256 "acd735c9d46bf86ee14337c71c56f743ad13ec2a95d62e7115604621e7560d0f" - head "https://github.com/angband/angband.git" - - bottle do - sha256 "b59aedacab5c3588719bfc1ebc17b936ffe5105ed8e7edd19caccc340a81271f" => :catalina - sha256 "96f6f2e31023c69aba44c4ccc40acf652d5a76bbd1b9cd6a7ebead33a0a2161e" => :mojave - sha256 "95463908fbefe4988a9ab3dcc031cd1c7d6767ed6557d1baca813446e5ca6b9c" => :high_sierra - end - - 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" - 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 cb183c19427d6..0000000000000 --- a/Formula/angle-grinder.rb +++ /dev/null @@ -1,32 +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.13.0.tar.gz" - sha256 "b257b9869f5350bc75754ecdd883341a7ede74bde05dd1e934dfd3b40d962d7c" - license "MIT" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "ab4027c863beaa9da3593844c89465ec95ba88d829ef76b4eb0b6c648d01af9a" => :catalina - sha256 "5d1c7560b7a8e0437d7534253ad360d9d5d0560d2d8f2e092461691faf0e30fa" => :mojave - sha256 "4aedebd2abddc24893f849fd86830efc1247739782fdf239ea04ef6cf25fcd2b" => :high_sierra - end - - depends_on "rust" => :build - - on_linux do - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - end - - 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/angular-cli.rb b/Formula/angular-cli.rb deleted file mode 100644 index 6c57d4b420dae..0000000000000 --- a/Formula/angular-cli.rb +++ /dev/null @@ -1,28 +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-10.0.1.tgz" - sha256 "8aee30fc3b5eaa6cf0afd46b0111ad109ebc91d4234b2af9ba9aa7fad7011ba3" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "ede8fed7e7c3d2a41171003d1fa25b3a787c2f4f6f3f2140c6fc98f6d1926907" => :catalina - sha256 "d94c9d2117029882d1985ff2fcf2124762cc802aaafd8d77685229377e9a7caa" => :mojave - sha256 "b12141cb6497722a1a162e006870f321391784d6b1af23cf90ab250c20bb039c" => :high_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/anime-downloader.rb b/Formula/anime-downloader.rb deleted file mode 100644 index 33ad2cbe5fa68..0000000000000 --- a/Formula/anime-downloader.rb +++ /dev/null @@ -1,122 +0,0 @@ -class AnimeDownloader < Formula - include Language::Python::Virtualenv - - desc "Download your favourite anime" - homepage "https://github.com/vn-ki/anime-downloader" - url "https://files.pythonhosted.org/packages/f5/61/feb32904b5fa1d1e36908bb781f722e924402e329dbb538ce5cb5eb8c44c/anime-downloader-4.3.0.tar.gz" - sha256 "761a0be674a63438b0bce680eebba651fbb8624f14d9c84390d63515e033aff7" - license "Unlicense" - head "https://github.com/vn-ki/anime-downloader.git" - - bottle do - cellar :any_skip_relocation - sha256 "afabaec3f49758f2d6c802a3f6cc732d359bc1aa4f96102d5bbb5db7cb28851f" => :catalina - sha256 "7c10ffe30e521687890945769fe95f9d3f08262e8d9a3055072a63b749d9cb26" => :mojave - sha256 "842d8ee3c6fc388e9bfb18f9d05f3c07bdeb9aa6b77a218fb05b0803036cd942" => :high_sierra - end - - depends_on "aria2" - depends_on "node" - depends_on "python@3.8" - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/52/ba/0e121661f529e7f456e903bf5c4d255b8051d8ce2b5e629c5212efe4c3f1/beautifulsoup4-4.8.2.tar.gz" - sha256 "05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/bf/9d214a5af07debc6acf7f3f257265618f1db242a3f8e49a9b516f24523a6/certifi-2019.11.28.tar.gz" - sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" - end - - resource "cfscrape" do - url "https://files.pythonhosted.org/packages/a6/3d/12044a9a927559b2fe09d60b1cd6cd4ed1e062b7a28f15c91367b9ec78f1/cfscrape-2.1.1.tar.gz" - sha256 "7c5ef94554e0d6ee7de7cd0d42051526e716ce6c0357679ee0b82c49e189e2ef" - 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/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - end - - resource "coloredlogs" do - url "https://files.pythonhosted.org/packages/84/1b/1ecdd371fa68839cfbda15cc671d0f6c92d2c42688df995a9bf6e36f3511/coloredlogs-14.0.tar.gz" - sha256 "a1fab193d2053aa6c0a97608c4342d031f1f93a3d1218432c59322441d31a505" - end - - resource "fuzzywuzzy" do - url "https://files.pythonhosted.org/packages/11/4b/0a002eea91be6048a2b5d53c5f1b4dafd57ba2e36eea961d05086d7c28ce/fuzzywuzzy-0.18.0.tar.gz" - sha256 "45016e92264780e58972dca1b3d939ac864b78437422beecebb3095f8efd00e8" - end - - resource "humanfriendly" do - url "https://files.pythonhosted.org/packages/2e/d1/e0d8db85b71fc6e7d5be7d78bb5db64c63790aec45acef6578190d66c666/humanfriendly-8.1.tar.gz" - sha256 "25c2108a45cfd1e8fbe9cdb30b825d34ef5d5675c8e11e4775c9aedbfb0bdee2" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "pycryptodome" do - url "https://files.pythonhosted.org/packages/69/2a/298b2689bee8e88c502c7e85ba1c9f07c7e182ea91c705c449f693056c9f/pycryptodome-3.9.7.tar.gz" - sha256 "f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - 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 "soupsieve" do - url "https://files.pythonhosted.org/packages/15/53/3692c565aea19f7d9dd696fee3d0062782e9ad5bf9535267180511a15967/soupsieve-2.0.tar.gz" - sha256 "e914534802d7ffd233242b785229d5ba0766a7f487385e3f714446a07bf540ae" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/c4/41/523f6a05e6dc3329a5660f6a81254c6cd87e5cfb5b7482bae3391d86ec3a/tabulate-0.8.6.tar.gz" - sha256 "5470cc6687a091c7042cee89b2946d9235fe9f6d49c193a4ae2ac7bf386737c8" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - end - - def install - venv = virtualenv_create(libexec, "python3") - venv.pip_install "beautifulsoup4" - venv.pip_install "certifi" - venv.pip_install "cfscrape" - venv.pip_install "chardet" - venv.pip_install "Click" - venv.pip_install "coloredlogs" - venv.pip_install "fuzzywuzzy" - venv.pip_install "humanfriendly" - venv.pip_install "idna" - venv.pip_install "pycryptodome" - venv.pip_install "requests" - venv.pip_install "requests-cache" - venv.pip_install "soupsieve" - venv.pip_install "tabulate" - venv.pip_install "urllib3" - venv.pip_install_and_link buildpath - end - - test do - assert_match "anime, version #{version}", shell_output("#{bin}/anime --version") - - assert_match "Watch is deprecated in favour of adl", shell_output("#{bin}/anime watch 2>&1") - end -end diff --git a/Formula/anjuta.rb b/Formula/anjuta.rb deleted file mode 100644 index 527f7829dd1b3..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.34/anjuta-3.34.0.tar.xz" - sha256 "42a93130ed3ee02d064a7094e94e1ffae2032b3f35a87bf441e37fc3bb3a148f" - revision 3 - - bottle do - sha256 "05830ff66d220192bfbe20dab94d811c3214ff10bd558188c366cbc217f14925" => :catalina - sha256 "e8fa87f3a3cf6e9bacda5796029462c31efacc0e9ccd2890d36e5a549321e688" => :mojave - sha256 "27181dd2e3c4a31c7ec552385d9c4036bb22ae9ac4428d1c52a4c8ccda70ee5a" => :high_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@3.8" - 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 Formula["python@3.8"].opt_bin/"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 a042ead8cab61..0000000000000 --- a/Formula/annie.rb +++ /dev/null @@ -1,24 +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.10.2.tar.gz" - sha256 "62ce7ecad18b09970048537fc62be2ad75e1936d57710b3058c9c8a866675aae" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "e6d397938206bdc5b5db0106e9cff7de75e0220035ac704729e6b9af676edd9d" => :catalina - sha256 "70801555e212940e2dff9619a1df446a0b2b0b45a57f401d62a4b878b7102108" => :mojave - sha256 "2187d4d3e865b8a24eb03c7c4c893d48e020791f2901bbc4782344f01647307f" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args - 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 c995b53f9a8ec..0000000000000 --- a/Formula/ansible-cmdb.rb +++ /dev/null @@ -1,22 +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" - license "GPL-3.0" - - 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 7e0ba0e002b42..0000000000000 --- a/Formula/ansible-lint.rb +++ /dev/null @@ -1,114 +0,0 @@ -class AnsibleLint < Formula - include Language::Python::Virtualenv - - desc "Checks ansible playbooks for practices and behaviour" - homepage "https://github.com/ansible/ansible-lint/" - url "https://files.pythonhosted.org/packages/fc/e6/e3cf96cb73b1920584cdcc8579164a70b7e8aab276b198f2130a7939efcc/ansible-lint-4.2.0.tar.gz" - sha256 "eb925d8682d70563ccb80e2aca7b3edf84fb0b768cea3edc6846aac7abdc414a" - revision 2 - - bottle do - cellar :any - sha256 "3426e9ec96b4e938f4f0004d1323db89737f1f526fecee081771cf30e1689dd7" => :catalina - sha256 "6558f69553bf09ebdef982f05a57492c9fd14a9a0baaed61151d8d054e652e73" => :mojave - sha256 "83a905c6fedaabb38d7a53692d892ea9e2bd429d5a39b1c338dc2e26ea0d352f" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "gmp" - end - - resource "ansible" do - url "https://files.pythonhosted.org/packages/f3/0d/ee54843308769f2c78be849d9e9f65dc8d63781941dc880f68507aae33ba/ansible-2.9.2.tar.gz" - sha256 "2f83f8ccc50640aa41a24f6e7757ac06b0ee6189fdcaacab68851771d3b42f3a" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz" - sha256 "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/2d/bf/960e5a422db3ac1a5e612cb35ca436c3fc985ed4b7ed13a1b4879006f450/cffi-1.13.2.tar.gz" - sha256 "599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz" - sha256 "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/7b/db/1d037ccd626d05a7a47a1b81ea73775614af83c2b3e53d86a0bb41d8d799/Jinja2-2.10.3.tar.gz" - sha256 "9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/d1/60/eec646bd557c9b0ae74f9559c44e470ae0cc70565a0008266785eca8e1be/paramiko-2.7.0.tar.gz" - sha256 "fba9c46340e3d690ad5a9d0dbf06677cd91425de3afa7e9c0c187298ee4ddd0d" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/a4/db/fffec68299e6d7bad3d504147f9094830b704527a7fc098b721d38cc7fa7/pyasn1-0.4.8.tar.gz" - sha256 "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - 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/8d/c9/e5be955a117a1ac548cdd31e37e8fd7b02ce987f9655f5c7563c656d5dcb/PyYAML-5.2.tar.gz" - sha256 "c0ee8eca2c582d29c3c2ec6e2c4f703d1b7f1fb10bc72317355a746057e7346c" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/de/76/cf97d739365eff258e2af0457a150bf2818f3eaa460328610eafeed0894a/ruamel.yaml-0.16.5.tar.gz" - sha256 "412a6f5cfdc0525dee6a27c08f5415c7fd832a7afcb7a0ed7319628aed23d408" - end - - resource "ruamel.yaml.clib" do - url "https://files.pythonhosted.org/packages/92/28/612085de3fae9f82d62d80255d9f4cf05b1b341db1e180adcf28c1bf748d/ruamel.yaml.clib-0.2.0.tar.gz" - sha256 "b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - 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 34ce218ef70fd..0000000000000 --- a/Formula/ansible.rb +++ /dev/null @@ -1,676 +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.9.10.tar.gz" - sha256 "0866f1432db1698758ca5753f2c1c2a8048823cc6f9ab4b7d03162c44febcacd" - license "GPL-3.0" - head "https://github.com/ansible/ansible.git", :branch => "devel" - - bottle do - cellar :any - sha256 "263c0ddb504922e2037d22589a7673b8fce2e1076074cdd2545ade0b79c64fe7" => :catalina - sha256 "bb18de7615d014c115c00aabe77dda20848a1ccd61c58b19e531578152cf5818" => :mojave - sha256 "60c6261e0fa19f70c9f6ade9f8ebc3c2ab2290aecffc47ae3d411f56beaffabb" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "libffi" - uses_from_macos "libxslt" - - # 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) - # requests-credssp (CredSSP support for windows hosts) - # openshift (k8s module support) - # pexpect (expect module support) - - ### setup_requires dependencies - resource "pbr" do - url "https://files.pythonhosted.org/packages/8a/a8/bb34d7997eb360bc3e98d201a20b5ef44e54098bb2b8e978ae620d933002/pbr-5.4.5.tar.gz" - sha256 "07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - ### end - - ### extras for requests[security] - resource "cryptography" do - url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/0d/1d/6cc4bd4e79f78be6640fab268555a11af48474fac9df187c3361a1d1d2f0/pyOpenSSL-19.1.0.tar.gz" - sha256 "9a24494b2602aaf402be5c9e30a0b82d4a5c67528fe8fb475e3f3bc00dd69507" - 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/34/18/8706cfa5b2c73f5a549fdc0ef2e24db71812a2685959cff31cbdfc010136/Babel-2.8.0.tar.gz" - sha256 "1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - 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/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "apache-libcloud" do - url "https://files.pythonhosted.org/packages/15/f0/dcb99cba726642d38884973efdfe7071ccc06919fac034a8925bb4e0c16f/apache-libcloud-3.0.0.tar.gz" - sha256 "b9eef1a61383fd401a537cf0796a1067a265288b7ab89be93f5571961a8a2902" - end - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" - sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/9f/3d/8beae739ed8c1c8f00ceac0ab6b0e97299b42da869e24cf82851b27a9123/asn1crypto-1.3.0.tar.gz" - sha256 "5a215cb8dc12f892244e3a113fe05397ee23c5c4ca7a69cd6e69811755efc42d" - end - - resource "backports.ssl_match_hostname" do - url "https://files.pythonhosted.org/packages/ff/2b/8265224812912bc5b7a607c44bf7b027554e1b9775e9ee0de8032e3de4b2/backports.ssl_match_hostname-3.7.0.1.tar.gz" - sha256 "bb82e60f9fbf4c080eabd957c39f0641f0fc247d9a16e31e26d594d8f42b9fd2" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz" - sha256 "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42" - 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/e9/0a/7a512c839cf5c67f38571db41d2a68e12e577b346e7e87328490d4a2cbc3/boto3-1.13.12.tar.gz" - sha256 "c46f31f085de660b95162c66057bae9ebb1658a245c9210162cee9671b0ff678" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/67/61/360e71652ce2596af042e7f2310373c653ec75a3e77dd11f5044bced9870/botocore-1.16.12.tar.gz" - sha256 "b75a5dc97f9ac795139ea2c651c07a8522e31dc280db17243e2b20e5c210547b" - end - - resource "cachetools" do - url "https://files.pythonhosted.org/packages/30/62/88fda08df9053141647b6941141b71b4c2a23d0fabab485feb917428ab46/cachetools-4.1.0.tar.gz" - sha256 "1d057645db16ca7fe1f3bd953558897603d6f0b9c51ed9d11eb4d071ec4e2aab" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/21/4e/0edfaf74a40cffe66de8ae8b9704420696ed37238dd57ce0935c9a341077/cliff-3.1.0.tar.gz" - sha256 "529b0ee0d2d38c7cbbababbbe3472b43b667a5c36025ef1b6cd00851c4313849" - end - - resource "cmd2" do - url "https://files.pythonhosted.org/packages/21/48/d48fe56f794e9a3feef440e4fb5c80dd4309575e13e132265fc160e82033/cmd2-0.8.9.tar.gz" - sha256 "145cb677ebd0e3cae546ab81c30f6c25e0b08ba0f1071df854d53707ea792633" - end - - resource "contextlib2" do - url "https://files.pythonhosted.org/packages/02/54/669207eb72e3d8ae8b38aa1f0703ee87a0e9f88f30d3c0a47bebdb6de242/contextlib2-0.6.0.post1.tar.gz" - sha256 "01f490098c18b19d2bd5bb5dc445b2054d2fa97f09a4280ba2c5f3c394c8162e" - end - - resource "debtcollector" do - url "https://files.pythonhosted.org/packages/19/65/837ebcd2a157c62b0708cfcbebbfbf1018fa477f8013d1b0055ff609f403/debtcollector-2.0.1.tar.gz" - sha256 "36dfe3e691e7e66f650273ae3bd1670b4c1668a10b16e118b2e6ec9ad3a74309" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "deprecation" do - url "https://files.pythonhosted.org/packages/5a/d3/8ae2869247df154b64c1884d7346d412fed0c49df84db635aab2d1c40e62/deprecation-2.1.0.tar.gz" - sha256 "72b3bde64e5d778694b0cf68178aed03d15e15477116add3fb773e581f9518ff" - end - - resource "dictdiffer" do - url "https://files.pythonhosted.org/packages/08/bf/9e878ffc50cbe57b63b46dee9f7689c8e1d6fa1c6b65f18a582c3e1a5ebd/dictdiffer-0.8.1.tar.gz" - sha256 "1adec0d67cdf6166bda96ae2934ddb5e54433998ceab63c984574d187cc563d2" - end - - resource "dnspython" do - url "https://files.pythonhosted.org/packages/ec/c5/14bcd63cb6d06092a004793399ec395405edf97c2301dfdc146dfbd5beed/dnspython-1.16.0.zip" - sha256 "36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01" - 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/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "dogpile.cache" do - url "https://files.pythonhosted.org/packages/b5/02/9692c82808341747afc87a7c2b701c8eed76c05ec6bc98844c102a537de7/dogpile.cache-0.9.2.tar.gz" - sha256 "bc9dde1ffa5de0179efbcdc73773ef0553921130ad01955422f2932be35c059e" - end - - resource "funcsigs" do - url "https://files.pythonhosted.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz" - sha256 "a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50" - end - - resource "google-auth" do - url "https://files.pythonhosted.org/packages/06/c1/54ebb8fe45524c0f84ff56a772e80b7a65975ff3825139ab604182da01be/google-auth-1.15.0.tar.gz" - sha256 "fbf25fee328c0828ef293459d9c649ef84ee44c0b932bb999d19df0ead1b40cf" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/b9/9a/3e9da40ea28b8210dd6504d3fe9fe7e013b62bf45902b458d1cdc3c34ed9/ipaddress-1.0.23.tar.gz" - sha256 "b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2" - end - - resource "iso8601" do - url "https://files.pythonhosted.org/packages/45/13/3db24895497345fb44c4248c08b16da34a9eb02643cea2754b21b5ed08b0/iso8601-0.1.12.tar.gz" - sha256 "49c4b20e1f38aa5cf109ddcd39647ac419f928512c869dc01d5c7098eddede82" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz" - sha256 "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9" - end - - resource "jsonpatch" do - url "https://files.pythonhosted.org/packages/70/9f/6f0bfbb4cc1401ce994d336bcb4ed2aa924f395e7fd1926511c04a52eee1/jsonpatch-1.25.tar.gz" - sha256 "ddc0f7628b8bfdd62e3cbfbc24ca6671b0b6265b50d186c2cf3659dc0f78fd6a" - 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/a6/96/16230c56d98c9c6cc1df0151ac32b1f90c0115d7ebf5403f1029d3a4663f/junos-eznc-2.4.1.tar.gz" - sha256 "8f3ecf06ab4d630f27e7ed7a7b605122ee5c5e5386b1f5186f6cb52810750b18" - 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/ba/b4/f9d85343fb7b268048bba893c20b9eaddcfe57b230a8169505cbe48107e9/keystoneauth1-4.0.0.tar.gz" - sha256 "02b283a662552cba65c1e6b5e89c06acfa242ff96355f59ab7def861e765a695" - end - - resource "kubernetes" do - url "https://files.pythonhosted.org/packages/60/3f/2fef94fb65e8f94d768356e5fb9be222d18027e6167ccc65e2090917a771/kubernetes-11.0.0.tar.gz" - sha256 "1a2472f8b01bc6aa87e3a34781f859bded5a5c8ff791a53d889a8bd6cc550430" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" - sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" - 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/e4/4f/057549afbd12fdd5d9aae9df19a6773a3d91988afe7be45b277e8cee2f4d/msgpack-1.0.0.tar.gz" - sha256 "9534d5cc480d4aff720233411a1f765be90885750b07df772380b34c10ecb5c0" - end - - resource "munch" do - url "https://files.pythonhosted.org/packages/43/a1/ec48010724eedfe2add68eb7592a0d238590e14e08b95a4ffb3c7b2f0808/munch-2.5.0.tar.gz" - sha256 "2d735f6f24d4dba3417fa448cae40c6e896ec1fdab6cdb5e6510999758a4dbd2" - end - - resource "ncclient" do - url "https://files.pythonhosted.org/packages/dd/7f/700ffea36c4c1c72d7581ef3dc3f40ec9756fd161816cd258cd303cd9f39/ncclient-0.6.7.tar.gz" - sha256 "efdf3c868cd9f104d4e9fe4c233df78bfbbed4b3d78ba19dc27cec3cf6a63680" - 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/0d/18/fd6e9c71a35b67a73160ec80a49da63d1eed2d2055054cc2995714949132/netifaces-0.10.9.tar.gz" - sha256 "2dee9ffdd16292878336a58d04a20f0ffe95555465fee7c9bd23b3490ef2abf3" - end - - resource "ntc-templates" do - url "https://files.pythonhosted.org/packages/ec/0e/5a7c453b9e743905c91dbd0fc4d0e62c7c2923c7cf0303b0a206d97e7500/ntc_templates-1.4.1.tar.gz" - sha256 "d04f859f3db2abbb1b594b4507b14551ea5d1a7724b9f4f5843326c4277f5382" - end - - resource "ntlm-auth" do - url "https://files.pythonhosted.org/packages/12/8c/b7b286360a0876c1a4d0a1651eb3c57f471661e126f5c5f097fbad735f40/ntlm-auth-1.4.0.tar.gz" - sha256 "350f2389c8ee5517f47db55a36ac2f8efc9742a60a678d6e2caa92385bdcaa9a" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/fc/c7/829c73c64d3749da7811c06319458e47f3461944da9d98bb4df1cb1598c2/oauthlib-3.1.0.tar.gz" - sha256 "bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889" - end - - resource "openshift" do - url "https://files.pythonhosted.org/packages/d7/d2/5a01233200669465800dba3599af34f1611d20b5d5da0859670ac5c63675/openshift-0.11.0.tar.gz" - sha256 "bfc398aac8ad9d903b520e473290ebc35d9c9a739c8e083fde55d93288c7f67d" - end - - resource "openstacksdk" do - url "https://files.pythonhosted.org/packages/90/99/3f72e506b12ae63e3a6e12eb320247783c95a93d0ab4751b42c160fadf1a/openstacksdk-0.46.0.tar.gz" - sha256 "a1617f00810a0ec1353e66e7da9fe9b4f926a830bb14b48643b6461b8808ef29" - 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/a7/d3/00d5b716ca5e5de8ef43a9eb78e8a9793e8497545e6ab9788e5817dfb8a7/osc-lib-2.0.0.tar.gz" - sha256 "b1cd4467b72a73f7a4de51789581f63de6b93f0e0d15e916191aa26234b01ffa" - end - - resource "oslo.config" do - url "https://files.pythonhosted.org/packages/bb/57/8d3a644582d20a3f8e9963bf7a45514fe90210ee23457ea7d8c7c0ceff0e/oslo.config-8.0.2.tar.gz" - sha256 "44452960969a526c1d6ea8d36bafcbe137fbf6c3101bc41d5804814c9190dd22" - end - - resource "oslo.context" do - url "https://files.pythonhosted.org/packages/61/4b/601417c286d0a93c509035772025b20e226a3c7a857b98fed141233d5920/oslo.context-3.0.2.tar.gz" - sha256 "ee05a37829ec797e371a4a25cfebbce42c2ec1bb63ed40028761ff7b83958627" - end - - resource "oslo.i18n" do - url "https://files.pythonhosted.org/packages/45/03/1414ca24321408483b6bb2cbd916e08fac2bda2edc28b56b80e133e76f9c/oslo.i18n-4.0.1.tar.gz" - sha256 "d0f1116399079e8f20e5017e6ea911881f78b12ef858abe65f2b5974b5a7f1ac" - end - - resource "oslo.log" do - url "https://files.pythonhosted.org/packages/90/47/2afbaa179b1ce562a7e11f63924ebc1ba11f6c61fd3f330b8d5e06d01354/oslo.log-4.1.1.tar.gz" - sha256 "22bf26492222de2a2ee346ab62701fd12cd01bba733fb14e6c070300c3f96da8" - end - - resource "oslo.serialization" do - url "https://files.pythonhosted.org/packages/76/f5/972f45dc3365a98b5d9d1e1982e82e8eb8305d5fbd02f5217d5e1d97aafc/oslo.serialization-3.1.1.tar.gz" - sha256 "146470f7b079930d7a15ac47463c12cee61a03a77050ed46b3ffc142753ecca1" - end - - resource "oslo.utils" do - url "https://files.pythonhosted.org/packages/b1/1a/bd6f4abec402bd5d77899bd0f19a36a977c56c1b8a1a5b64f7d85c430a1a/oslo.utils-4.1.1.tar.gz" - sha256 "a272f4a665dac902a3f6ca8b2962302648a4e0e2193b47a57a22416b906d3c0b" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/65/37/83e3f492eb52d771e2820e88105f605335553fe10422cba9d256faeb1702/packaging-20.3.tar.gz" - sha256 "3c292b474fda1671ec57d46d739d072bfd495a4f51ad01a055121d81e952b7a3" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/ac/15/4351003352e11300b9f44a13576bff52dcdc6e4a911129c07447bda0a358/paramiko-2.7.1.tar.gz" - sha256 "920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f" - end - - resource "passlib" do - url "https://files.pythonhosted.org/packages/6d/6b/4bfca0c13506535289b58f9c9761d20f56ed89439bfe6b8e07416ce58ee1/passlib-1.7.2.tar.gz" - sha256 "8d666cef936198bc2ab47ee9b0410c94adf2ba798e5a84bf220be079ae7ab6a8" - end - - resource "pexpect" do - url "https://files.pythonhosted.org/packages/e5/9b/ff402e0e930e70467a7178abb7c128709a30dfb22d8777c043e501bc1b10/pexpect-4.8.0.tar.gz" - sha256 "fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" - end - - resource "ptyprocess" do - url "https://files.pythonhosted.org/packages/7d/2d/e4b8733cf79b7309d84c9081a4ab558c89d8c89da5961bf4ddb050ca1ce0/ptyprocess-0.6.0.tar.gz" - sha256 "923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0" - 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/88/87/72eb9ccf8a58021c542de2588a867dbefc7556e14b2866d1e40e9e2b587e/pyasn1-modules-0.2.8.tar.gz" - sha256 "905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "pycrypto" do - url "https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz" - sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c" - - # Fix warnings "SyntaxWarning: "is" with a literal. Did you mean "=="?" for python 3.8 - patch do - url "https://github.com/dlitz/pycrypto/commit/4e4cc0beefbb316db2a8750e747e697df0b754d7.patch?full_index=1" - sha256 "f82fedee6cf73c868b55af3ab2b7d2d029b84960be0dc3baf85bb4bf541e1451" - end - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "pyperclip" do - url "https://files.pythonhosted.org/packages/f6/5b/55866e1cde0f86f5eec59dab5de8a66628cb0d53da74b8dbc15ad8dabda3/pyperclip-1.8.0.tar.gz" - sha256 "b75b975160428d84608c26edba2dec146e7799566aea42c1fe1b32e72b6028f2" - 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/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - 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/c9/ec/5cce3af48ac2bd891e1ff7dcaffa2d7322b4438f2324fc3c1d0125c6cd10/python-keystoneclient-4.0.0.tar.gz" - sha256 "6d93efd494b43d8b4cd8a62281c82d3f02aa531c5523e6bbe7d696e37bc77ba8" - end - - resource "python-neutronclient" do - url "https://files.pythonhosted.org/packages/c8/cb/5ac3d57e9f482dd7372c1126f973344854a7295b52ecc40c2363fdc4e7ca/python-neutronclient-7.1.1.tar.gz" - sha256 "48c14576c907e7aca111e3354798ed1a169016fddfdbab9e68243fb75a04b22c" - 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/fc/88/be0ea1af44c3bcc54e4c41e4056986743551693c77dfe50b48a3f4ba1bf7/pywinrm-0.4.1.tar.gz" - sha256 "4ede5c6c85b53780ad0dbf9abef2fa2ea58f44c82256a84a63eae5f1205cea81" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "requests-credssp" do - url "https://files.pythonhosted.org/packages/d3/19/3f8cd9319717d66a0147185bd750fe25f7d85cb669f0316a44f26e071eab/requests-credssp-1.1.1.tar.gz" - sha256 "39910218561df398adca166e2f145ba6cb4a21450009cad96d1afb1c7e1741c3" - end - - resource "requests-oauthlib" do - url "https://files.pythonhosted.org/packages/23/eb/68fc8fa86e0f5789832f275c8289257d8dc44dbe93fce7ff819112b9df8f/requests-oauthlib-1.3.0.tar.gz" - sha256 "b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a" - 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/70/e2/1344681ad04a0971e8884b9a9856e5a13cc4824d15c047f8b0bbcc0b2029/rfc3986-1.4.0.tar.gz" - sha256 "112398da31a3344dc25dbf477d8df6cb34f9278a94fee2625d89e4514be8bb9d" - end - - resource "rsa" do - url "https://files.pythonhosted.org/packages/cb/d0/8f99b91432a60ca4b1cd478fd0bdf28c1901c58e3a9f14f4ba3dba86b57f/rsa-4.0.tar.gz" - sha256 "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/16/8b/54a26c1031595e5edd0e616028b922d78d8ffba8bc775f0a4faeada846cc/ruamel.yaml-0.16.10.tar.gz" - sha256 "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954" - end - - resource "ruamel.yaml.clib" do - url "https://files.pythonhosted.org/packages/92/28/612085de3fae9f82d62d80255d9f4cf05b1b341db1e180adcf28c1bf748d/ruamel.yaml.clib-0.2.0.tar.gz" - sha256 "b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/50/de/2b688c062107942486c81a739383b1432a72717d9a85a6a1a692f003c70c/s3transfer-0.3.3.tar.gz" - sha256 "921a37e2aefc64145e7b73d50c71bb4f26f46e4c9f414dc648c6245ff92cf7db" - end - - resource "scp" do - url "https://files.pythonhosted.org/packages/05/e0/ac4169e773e12a08d941ca3c006cb8c91bee9d6d80328a15af850b5e7480/scp-0.13.2.tar.gz" - sha256 "ef9d6e67c0331485d3db146bf9ee9baff8a48f3eb0e6c08276a8584b13bf34b3" - end - - resource "shade" do - url "https://files.pythonhosted.org/packages/b0/a6/a83f14eca6f7223319d9d564030bd322ca52c910c34943f38a59ad2a6549/shade-1.33.0.tar.gz" - sha256 "36f6936da93723f34bf99d00bae24aa4cc36125d597392ead8319720035d21e8" - end - - resource "simplejson" do - url "https://files.pythonhosted.org/packages/98/87/a7b98aa9256c8843f92878966dc3d8d914c14aad97e2c5ce4798d5743e07/simplejson-3.17.0.tar.gz" - sha256 "2b4b2b738b3b99819a17feaf118265d0753d5536049ea570b3c43b51c4701e81" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "stevedore" do - url "https://files.pythonhosted.org/packages/be/19/83fd12828f879f53b85fe820925776aecda710944279e47a2dac53444adc/stevedore-1.32.0.tar.gz" - sha256 "18afaf1d623af5950cc0f7e75e70f917784c73b652a34a12d90b309451b5500b" - end - - resource "subprocess32" do - url "https://files.pythonhosted.org/packages/32/c8/564be4d12629b912ea431f1a50eb8b3b9d00f1a0b1ceff17f266be190007/subprocess32-3.5.4.tar.gz" - sha256 "eb2937c80497978d181efa1b839ec2d9622cf9600a039a79d0e108d1f9aec79d" - end - - resource "textfsm" do - url "https://github.com/google/textfsm/archive/v1.1.0.tar.gz" - sha256 "b750de2986ef78696e686b510a96aa23206a575580daf2b1eb7e17525ed33045" - end - - resource "transitions" do - url "https://files.pythonhosted.org/packages/88/24/bf995852b5752f6b2ea433fb3fbe5c4fed64d2c2bd319888575915f3b2a1/transitions-0.8.1.tar.gz" - sha256 "2b8cf2078ed189ffbb0f29421798d7a63ff0d7823682a0d69c01bd8240363cac" - 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/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" - sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" - end - - resource "websocket_client" do - url "https://files.pythonhosted.org/packages/8b/0f/52de51b9b450ed52694208ab952d5af6ebbcbce7f166a48784095d930d8c/websocket_client-0.57.0.tar.gz" - sha256 "d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010" - end - - resource "wrapt" do - url "https://files.pythonhosted.org/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz" - sha256 "b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" - end - - resource "xmltodict" do - url "https://files.pythonhosted.org/packages/58/40/0d783e14112e064127063fbf5d1fe1351723e5dfe9d6daad346a305f6c49/xmltodict-0.12.0.tar.gz" - sha256 "50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21" - end - - resource "yamlordereddictloader" do - url "https://files.pythonhosted.org/packages/56/e1/1ca77da64cc355f0de483095e841d96f2366f93b095b83869440a296c21d/yamlordereddictloader-0.4.0.tar.gz" - sha256 "7f30f0b99ea3f877f7cb340c570921fa9d639b7f69cba18be051e27f8de2080e" - end - - resource "zabbix-api" do - url "https://files.pythonhosted.org/packages/e3/ed/2092731880f0de5b07067fc446dc0fc5166f2ee98018b6d524cd3e28a69d/zabbix-api-0.5.4.tar.gz" - sha256 "2d6c62001cb79a7de6fe286424967276edaca09d3833b72fb04f7863f29fce4b" - end - - def install - ENV.prepend_path "PATH", Formula["python@3.8"].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 - - # Work around Xcode 11 clang bug - # https://code.videolan.org/videolan/libbluray/issues/20 - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - # 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@2.8.rb b/Formula/ansible@2.8.rb deleted file mode 100644 index fc3ea3685bde5..0000000000000 --- a/Formula/ansible@2.8.rb +++ /dev/null @@ -1,642 +0,0 @@ -class AnsibleAT28 < Formula - include Language::Python::Virtualenv - - desc "Automate deployment, configuration, and upgrading" - homepage "https://www.ansible.com/" - url "https://releases.ansible.com/ansible/ansible-2.8.12.tar.gz" - sha256 "2a4ce2a3f387d2595ee3f968c3ea50d6db0ab2d8306f0e81ab96c2a15a683124" - revision 1 - - bottle do - cellar :any - sha256 "78e2bc6439239c8a1dd960558df7565246642c71f49f20e2e9e1aa83ce1b30e2" => :catalina - sha256 "1daeb90eb6ea03adc320805db8a81321ebbd17903b8ccdb7b6d0c6cdfbc8bd76" => :mojave - sha256 "91434f6f6f6981720243ae6a8af0c1cc373bc4f1b33fd83552e33513c57a5a05" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl@1.1" - depends_on "python" - # Ansible 2.8 would probably never work with Python > 3.7 - # https://github.com/ansible/ansible/issues/63973 - - uses_from_macos "libffi" - uses_from_macos "libxslt" - - # 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) - # requests-credssp (CredSSP support for windows hosts) - # openshift (k8s module support) - - ### setup_requires dependencies - resource "pbr" do - url "https://files.pythonhosted.org/packages/8a/a8/bb34d7997eb360bc3e98d201a20b5ef44e54098bb2b8e978ae620d933002/pbr-5.4.5.tar.gz" - sha256 "07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - ### end - - ### extras for requests[security] - resource "cryptography" do - url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/0d/1d/6cc4bd4e79f78be6640fab268555a11af48474fac9df187c3361a1d1d2f0/pyOpenSSL-19.1.0.tar.gz" - sha256 "9a24494b2602aaf402be5c9e30a0b82d4a5c67528fe8fb475e3f3bc00dd69507" - 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/34/18/8706cfa5b2c73f5a549fdc0ef2e24db71812a2685959cff31cbdfc010136/Babel-2.8.0.tar.gz" - sha256 "1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - 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/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "apache-libcloud" do - url "https://files.pythonhosted.org/packages/15/f0/dcb99cba726642d38884973efdfe7071ccc06919fac034a8925bb4e0c16f/apache-libcloud-3.0.0.tar.gz" - sha256 "b9eef1a61383fd401a537cf0796a1067a265288b7ab89be93f5571961a8a2902" - 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/9f/3d/8beae739ed8c1c8f00ceac0ab6b0e97299b42da869e24cf82851b27a9123/asn1crypto-1.3.0.tar.gz" - sha256 "5a215cb8dc12f892244e3a113fe05397ee23c5c4ca7a69cd6e69811755efc42d" - end - - resource "backports.ssl_match_hostname" do - url "https://files.pythonhosted.org/packages/ff/2b/8265224812912bc5b7a607c44bf7b027554e1b9775e9ee0de8032e3de4b2/backports.ssl_match_hostname-3.7.0.1.tar.gz" - sha256 "bb82e60f9fbf4c080eabd957c39f0641f0fc247d9a16e31e26d594d8f42b9fd2" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz" - sha256 "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42" - 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/0e/1c/c0cdc12631144f4b3dded59d5506eaeff1ff318a4e0abb1d3fd9367885c7/boto3-1.12.48.tar.gz" - sha256 "39ef75f1351d9dce9542c71602bbe4dbae001df1aa5c75bdacea933d60cc1e7f" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/20/3b/b436f8510e2a815cd2009964e7142611e0edb4e953f7dfee3921fc41a8c2/botocore-1.15.48.tar.gz" - sha256 "ef4fa3055421cb95a7bf559e715f8c5f656aca30fafef070eca21b13ca3f0f81" - end - - resource "cachetools" do - url "https://files.pythonhosted.org/packages/30/62/88fda08df9053141647b6941141b71b4c2a23d0fabab485feb917428ab46/cachetools-4.1.0.tar.gz" - sha256 "1d057645db16ca7fe1f3bd953558897603d6f0b9c51ed9d11eb4d071ec4e2aab" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/21/4e/0edfaf74a40cffe66de8ae8b9704420696ed37238dd57ce0935c9a341077/cliff-3.1.0.tar.gz" - sha256 "529b0ee0d2d38c7cbbababbbe3472b43b667a5c36025ef1b6cd00851c4313849" - end - - resource "cmd2" do - url "https://files.pythonhosted.org/packages/ba/b4/95e99237786d15572c9f80a279799964c5e910fc8c7d40c82dd5b4053108/cmd2-1.0.2.tar.gz" - sha256 "42ebf468bd457d99b8d2fd9573a8fba8519f625ca20d2d8185dbfbc416bd28b8" - end - - resource "contextlib2" do - url "https://files.pythonhosted.org/packages/02/54/669207eb72e3d8ae8b38aa1f0703ee87a0e9f88f30d3c0a47bebdb6de242/contextlib2-0.6.0.post1.tar.gz" - sha256 "01f490098c18b19d2bd5bb5dc445b2054d2fa97f09a4280ba2c5f3c394c8162e" - end - - resource "debtcollector" do - url "https://files.pythonhosted.org/packages/19/65/837ebcd2a157c62b0708cfcbebbfbf1018fa477f8013d1b0055ff609f403/debtcollector-2.0.1.tar.gz" - sha256 "36dfe3e691e7e66f650273ae3bd1670b4c1668a10b16e118b2e6ec9ad3a74309" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "deprecation" do - url "https://files.pythonhosted.org/packages/5a/d3/8ae2869247df154b64c1884d7346d412fed0c49df84db635aab2d1c40e62/deprecation-2.1.0.tar.gz" - sha256 "72b3bde64e5d778694b0cf68178aed03d15e15477116add3fb773e581f9518ff" - end - - resource "dictdiffer" do - url "https://files.pythonhosted.org/packages/08/bf/9e878ffc50cbe57b63b46dee9f7689c8e1d6fa1c6b65f18a582c3e1a5ebd/dictdiffer-0.8.1.tar.gz" - sha256 "1adec0d67cdf6166bda96ae2934ddb5e54433998ceab63c984574d187cc563d2" - end - - resource "dnspython" do - url "https://files.pythonhosted.org/packages/ec/c5/14bcd63cb6d06092a004793399ec395405edf97c2301dfdc146dfbd5beed/dnspython-1.16.0.zip" - sha256 "36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01" - 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/2f/e0/3d435b34abd2d62e8206171892f174b180cd37b09d57b924ca5c2ef2219d/docutils-0.16.tar.gz" - sha256 "c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc" - end - - resource "dogpile.cache" do - url "https://files.pythonhosted.org/packages/e6/65/fa4a947926034cb4af5f469c376a21728b7fd8de4668fed757c3586f0eef/dogpile.cache-0.9.1.tar.gz" - sha256 "a9822f466ec740ed8945ed561a138441d54018f0667aa19df6d1c8f54086b32e" - end - - resource "funcsigs" do - url "https://files.pythonhosted.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz" - sha256 "a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50" - end - - resource "google-auth" do - url "https://files.pythonhosted.org/packages/d8/47/0b6f9d832fe0699c8daf8b645408752e995f5afbb466cfa76d9954fcf8e1/google-auth-1.14.1.tar.gz" - sha256 "e63b2210e03c4ed829063b72c4af0c4b867c2788efb3210b6b9439b488bd3afd" - end - - resource "ipaddress" do - url "https://files.pythonhosted.org/packages/b9/9a/3e9da40ea28b8210dd6504d3fe9fe7e013b62bf45902b458d1cdc3c34ed9/ipaddress-1.0.23.tar.gz" - sha256 "b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2" - end - - resource "iso8601" do - url "https://files.pythonhosted.org/packages/45/13/3db24895497345fb44c4248c08b16da34a9eb02643cea2754b21b5ed08b0/iso8601-0.1.12.tar.gz" - sha256 "49c4b20e1f38aa5cf109ddcd39647ac419f928512c869dc01d5c7098eddede82" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/5c/40/3bed01fc17e2bb1b02633efc29878dfa25da479ad19a69cfb11d2b88ea8e/jmespath-0.9.5.tar.gz" - sha256 "cca55c8d153173e21baa59983015ad0daf603f9cb799904ff057bfb8ff8dc2d9" - end - - resource "jsonpatch" do - url "https://files.pythonhosted.org/packages/70/9f/6f0bfbb4cc1401ce994d336bcb4ed2aa924f395e7fd1926511c04a52eee1/jsonpatch-1.25.tar.gz" - sha256 "ddc0f7628b8bfdd62e3cbfbc24ca6671b0b6265b50d186c2cf3659dc0f78fd6a" - 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/a6/96/16230c56d98c9c6cc1df0151ac32b1f90c0115d7ebf5403f1029d3a4663f/junos-eznc-2.4.1.tar.gz" - sha256 "8f3ecf06ab4d630f27e7ed7a7b605122ee5c5e5386b1f5186f6cb52810750b18" - 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/ba/b4/f9d85343fb7b268048bba893c20b9eaddcfe57b230a8169505cbe48107e9/keystoneauth1-4.0.0.tar.gz" - sha256 "02b283a662552cba65c1e6b5e89c06acfa242ff96355f59ab7def861e765a695" - end - - resource "kubernetes" do - url "https://files.pythonhosted.org/packages/60/3f/2fef94fb65e8f94d768356e5fb9be222d18027e6167ccc65e2090917a771/kubernetes-11.0.0.tar.gz" - sha256 "1a2472f8b01bc6aa87e3a34781f859bded5a5c8ff791a53d889a8bd6cc550430" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" - sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" - 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/e4/4f/057549afbd12fdd5d9aae9df19a6773a3d91988afe7be45b277e8cee2f4d/msgpack-1.0.0.tar.gz" - sha256 "9534d5cc480d4aff720233411a1f765be90885750b07df772380b34c10ecb5c0" - end - - resource "munch" do - url "https://files.pythonhosted.org/packages/43/a1/ec48010724eedfe2add68eb7592a0d238590e14e08b95a4ffb3c7b2f0808/munch-2.5.0.tar.gz" - sha256 "2d735f6f24d4dba3417fa448cae40c6e896ec1fdab6cdb5e6510999758a4dbd2" - end - - resource "ncclient" do - url "https://files.pythonhosted.org/packages/dd/7f/700ffea36c4c1c72d7581ef3dc3f40ec9756fd161816cd258cd303cd9f39/ncclient-0.6.7.tar.gz" - sha256 "efdf3c868cd9f104d4e9fe4c233df78bfbbed4b3d78ba19dc27cec3cf6a63680" - 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/0d/18/fd6e9c71a35b67a73160ec80a49da63d1eed2d2055054cc2995714949132/netifaces-0.10.9.tar.gz" - sha256 "2dee9ffdd16292878336a58d04a20f0ffe95555465fee7c9bd23b3490ef2abf3" - end - - resource "ntlm-auth" do - url "https://files.pythonhosted.org/packages/12/8c/b7b286360a0876c1a4d0a1651eb3c57f471661e126f5c5f097fbad735f40/ntlm-auth-1.4.0.tar.gz" - sha256 "350f2389c8ee5517f47db55a36ac2f8efc9742a60a678d6e2caa92385bdcaa9a" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/fc/c7/829c73c64d3749da7811c06319458e47f3461944da9d98bb4df1cb1598c2/oauthlib-3.1.0.tar.gz" - sha256 "bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889" - end - - resource "openshift" do - url "https://files.pythonhosted.org/packages/d7/d2/5a01233200669465800dba3599af34f1611d20b5d5da0859670ac5c63675/openshift-0.11.0.tar.gz" - sha256 "bfc398aac8ad9d903b520e473290ebc35d9c9a739c8e083fde55d93288c7f67d" - end - - resource "openstacksdk" do - url "https://files.pythonhosted.org/packages/90/99/3f72e506b12ae63e3a6e12eb320247783c95a93d0ab4751b42c160fadf1a/openstacksdk-0.46.0.tar.gz" - sha256 "a1617f00810a0ec1353e66e7da9fe9b4f926a830bb14b48643b6461b8808ef29" - 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/a7/d3/00d5b716ca5e5de8ef43a9eb78e8a9793e8497545e6ab9788e5817dfb8a7/osc-lib-2.0.0.tar.gz" - sha256 "b1cd4467b72a73f7a4de51789581f63de6b93f0e0d15e916191aa26234b01ffa" - end - - resource "oslo.config" do - url "https://files.pythonhosted.org/packages/bb/57/8d3a644582d20a3f8e9963bf7a45514fe90210ee23457ea7d8c7c0ceff0e/oslo.config-8.0.2.tar.gz" - sha256 "44452960969a526c1d6ea8d36bafcbe137fbf6c3101bc41d5804814c9190dd22" - end - - resource "oslo.context" do - url "https://files.pythonhosted.org/packages/61/4b/601417c286d0a93c509035772025b20e226a3c7a857b98fed141233d5920/oslo.context-3.0.2.tar.gz" - sha256 "ee05a37829ec797e371a4a25cfebbce42c2ec1bb63ed40028761ff7b83958627" - end - - resource "oslo.i18n" do - url "https://files.pythonhosted.org/packages/45/03/1414ca24321408483b6bb2cbd916e08fac2bda2edc28b56b80e133e76f9c/oslo.i18n-4.0.1.tar.gz" - sha256 "d0f1116399079e8f20e5017e6ea911881f78b12ef858abe65f2b5974b5a7f1ac" - end - - resource "oslo.log" do - url "https://files.pythonhosted.org/packages/90/47/2afbaa179b1ce562a7e11f63924ebc1ba11f6c61fd3f330b8d5e06d01354/oslo.log-4.1.1.tar.gz" - sha256 "22bf26492222de2a2ee346ab62701fd12cd01bba733fb14e6c070300c3f96da8" - end - - resource "oslo.serialization" do - url "https://files.pythonhosted.org/packages/76/f5/972f45dc3365a98b5d9d1e1982e82e8eb8305d5fbd02f5217d5e1d97aafc/oslo.serialization-3.1.1.tar.gz" - sha256 "146470f7b079930d7a15ac47463c12cee61a03a77050ed46b3ffc142753ecca1" - end - - resource "oslo.utils" do - url "https://files.pythonhosted.org/packages/b1/1a/bd6f4abec402bd5d77899bd0f19a36a977c56c1b8a1a5b64f7d85c430a1a/oslo.utils-4.1.1.tar.gz" - sha256 "a272f4a665dac902a3f6ca8b2962302648a4e0e2193b47a57a22416b906d3c0b" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/65/37/83e3f492eb52d771e2820e88105f605335553fe10422cba9d256faeb1702/packaging-20.3.tar.gz" - sha256 "3c292b474fda1671ec57d46d739d072bfd495a4f51ad01a055121d81e952b7a3" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/ac/15/4351003352e11300b9f44a13576bff52dcdc6e4a911129c07447bda0a358/paramiko-2.7.1.tar.gz" - sha256 "920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f" - end - - resource "passlib" do - url "https://files.pythonhosted.org/packages/6d/6b/4bfca0c13506535289b58f9c9761d20f56ed89439bfe6b8e07416ce58ee1/passlib-1.7.2.tar.gz" - sha256 "8d666cef936198bc2ab47ee9b0410c94adf2ba798e5a84bf220be079ae7ab6a8" - 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/88/87/72eb9ccf8a58021c542de2588a867dbefc7556e14b2866d1e40e9e2b587e/pyasn1-modules-0.2.8.tar.gz" - sha256 "905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - 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/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "pyperclip" do - url "https://files.pythonhosted.org/packages/f6/5b/55866e1cde0f86f5eec59dab5de8a66628cb0d53da74b8dbc15ad8dabda3/pyperclip-1.8.0.tar.gz" - sha256 "b75b975160428d84608c26edba2dec146e7799566aea42c1fe1b32e72b6028f2" - 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/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - 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/c9/ec/5cce3af48ac2bd891e1ff7dcaffa2d7322b4438f2324fc3c1d0125c6cd10/python-keystoneclient-4.0.0.tar.gz" - sha256 "6d93efd494b43d8b4cd8a62281c82d3f02aa531c5523e6bbe7d696e37bc77ba8" - end - - resource "python-neutronclient" do - url "https://files.pythonhosted.org/packages/c8/cb/5ac3d57e9f482dd7372c1126f973344854a7295b52ecc40c2363fdc4e7ca/python-neutronclient-7.1.1.tar.gz" - sha256 "48c14576c907e7aca111e3354798ed1a169016fddfdbab9e68243fb75a04b22c" - 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/fc/88/be0ea1af44c3bcc54e4c41e4056986743551693c77dfe50b48a3f4ba1bf7/pywinrm-0.4.1.tar.gz" - sha256 "4ede5c6c85b53780ad0dbf9abef2fa2ea58f44c82256a84a63eae5f1205cea81" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "requests-credssp" do - url "https://files.pythonhosted.org/packages/d3/19/3f8cd9319717d66a0147185bd750fe25f7d85cb669f0316a44f26e071eab/requests-credssp-1.1.1.tar.gz" - sha256 "39910218561df398adca166e2f145ba6cb4a21450009cad96d1afb1c7e1741c3" - end - - resource "requests-oauthlib" do - url "https://files.pythonhosted.org/packages/23/eb/68fc8fa86e0f5789832f275c8289257d8dc44dbe93fce7ff819112b9df8f/requests-oauthlib-1.3.0.tar.gz" - sha256 "b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a" - 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/70/e2/1344681ad04a0971e8884b9a9856e5a13cc4824d15c047f8b0bbcc0b2029/rfc3986-1.4.0.tar.gz" - sha256 "112398da31a3344dc25dbf477d8df6cb34f9278a94fee2625d89e4514be8bb9d" - end - - resource "rsa" do - url "https://files.pythonhosted.org/packages/cb/d0/8f99b91432a60ca4b1cd478fd0bdf28c1901c58e3a9f14f4ba3dba86b57f/rsa-4.0.tar.gz" - sha256 "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/16/8b/54a26c1031595e5edd0e616028b922d78d8ffba8bc775f0a4faeada846cc/ruamel.yaml-0.16.10.tar.gz" - sha256 "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954" - end - - resource "ruamel.yaml.clib" do - url "https://files.pythonhosted.org/packages/92/28/612085de3fae9f82d62d80255d9f4cf05b1b341db1e180adcf28c1bf748d/ruamel.yaml.clib-0.2.0.tar.gz" - sha256 "b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/50/de/2b688c062107942486c81a739383b1432a72717d9a85a6a1a692f003c70c/s3transfer-0.3.3.tar.gz" - sha256 "921a37e2aefc64145e7b73d50c71bb4f26f46e4c9f414dc648c6245ff92cf7db" - end - - resource "scp" do - url "https://files.pythonhosted.org/packages/05/e0/ac4169e773e12a08d941ca3c006cb8c91bee9d6d80328a15af850b5e7480/scp-0.13.2.tar.gz" - sha256 "ef9d6e67c0331485d3db146bf9ee9baff8a48f3eb0e6c08276a8584b13bf34b3" - end - - resource "shade" do - url "https://files.pythonhosted.org/packages/b0/a6/a83f14eca6f7223319d9d564030bd322ca52c910c34943f38a59ad2a6549/shade-1.33.0.tar.gz" - sha256 "36f6936da93723f34bf99d00bae24aa4cc36125d597392ead8319720035d21e8" - end - - resource "simplejson" do - url "https://files.pythonhosted.org/packages/98/87/a7b98aa9256c8843f92878966dc3d8d914c14aad97e2c5ce4798d5743e07/simplejson-3.17.0.tar.gz" - sha256 "2b4b2b738b3b99819a17feaf118265d0753d5536049ea570b3c43b51c4701e81" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "stevedore" do - url "https://files.pythonhosted.org/packages/be/19/83fd12828f879f53b85fe820925776aecda710944279e47a2dac53444adc/stevedore-1.32.0.tar.gz" - sha256 "18afaf1d623af5950cc0f7e75e70f917784c73b652a34a12d90b309451b5500b" - end - - resource "subprocess32" do - url "https://files.pythonhosted.org/packages/32/c8/564be4d12629b912ea431f1a50eb8b3b9d00f1a0b1ceff17f266be190007/subprocess32-3.5.4.tar.gz" - sha256 "eb2937c80497978d181efa1b839ec2d9622cf9600a039a79d0e108d1f9aec79d" - 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/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" - sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" - end - - resource "websocket_client" do - url "https://files.pythonhosted.org/packages/8b/0f/52de51b9b450ed52694208ab952d5af6ebbcbce7f166a48784095d930d8c/websocket_client-0.57.0.tar.gz" - sha256 "d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010" - end - - resource "wrapt" do - url "https://files.pythonhosted.org/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz" - sha256 "b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" - end - - resource "xmltodict" do - url "https://files.pythonhosted.org/packages/58/40/0d783e14112e064127063fbf5d1fe1351723e5dfe9d6daad346a305f6c49/xmltodict-0.12.0.tar.gz" - sha256 "50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21" - end - - resource "zabbix-api" do - url "https://files.pythonhosted.org/packages/e3/ed/2092731880f0de5b07067fc446dc0fc5166f2ee98018b6d524cd3e28a69d/zabbix-api-0.5.4.tar.gz" - sha256 "2d6c62001cb79a7de6fe286424967276edaca09d3833b72fb04f7863f29fce4b" - 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 - - # Work around Xcode 11 clang bug - # https://code.videolan.org/videolan/libbluray/issues/20 - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - # 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/ansifilter.rb b/Formula/ansifilter.rb deleted file mode 100644 index a1eecee6982c8..0000000000000 --- a/Formula/ansifilter.rb +++ /dev/null @@ -1,26 +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.16.tar.bz2" - sha256 "7fcd2fa3520bce2bd3834c299f533cbfb43a29a095c83e8fea372a383dfbbaf2" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "29cf09137837f8830ba67d6e8aed9fc2e21192edbdc68531e8c33e5f75b14209" => :catalina - sha256 "8498a78c79a4e22b9d644a957508f9641443e10ed00177cb75d8aa9377f7e940" => :mojave - sha256 "0e28ecd7fccb6753e0f2b056f553f1434661cbda4972a82b253e3f696762247e" => :high_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 cb3d29f2c8c4f..0000000000000 --- a/Formula/ansiweather.rb +++ /dev/null @@ -1,20 +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.17.0.tar.gz" - sha256 "eabc5ad709e2a459d59402b190511b44542eafce293205a29fb2b73c3e075ee7" - license "BSD-2-Clause" - 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 18c210da86e70..0000000000000 --- a/Formula/ant-contrib.rb +++ /dev/null @@ -1,32 +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" - 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 7548dc4f1e5b6..0000000000000 --- a/Formula/ant.rb +++ /dev/null @@ -1,68 +0,0 @@ -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.8-bin.tar.xz" - mirror "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.8-bin.tar.xz" - sha256 "8be685aacf2bfe8515a1249fbebb0ccd861dfe05ee2c027c89fd7912c1ce2c2a" - revision 1 - head "https://git-wip-us.apache.org/repos/asf/ant.git" - - bottle :unneeded - - depends_on "openjdk" - - resource "ivy" do - url "https://www.apache.org/dyn/closer.lua?path=ant/ivy/2.4.0/apache-ivy-2.4.0-bin.tar.gz" - mirror "https://archive.apache.org/dist/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.lua?path=commons/bcel/binaries/bcel-6.4.1-bin.tar.gz" - mirror "https://archive.apache.org/dist/commons/bcel/binaries/bcel-6.4.1-bin.tar.gz" - sha256 "1621dfa6418c6c2df83ea4da5eda9eb84955a3332c8e2580dd96e2db95fd8085" - 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/bash - JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" exec "#{libexec}/bin/ant" -lib #{HOMEBREW_PREFIX}/share/ant "$@" - EOS - - resource("ivy").stage do - (libexec/"lib").install Dir["ivy-*.jar"] - end - - resource("bcel").stage do - (libexec/"lib").install "bcel-#{resource("bcel").version}.jar" - 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 a942fc9b05fda..0000000000000 --- a/Formula/ant@1.9.rb +++ /dev/null @@ -1,46 +0,0 @@ -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.15-bin.tar.bz2" - mirror "https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.15-bin.tar.bz2" - sha256 "b91eb0c7412f7d4d7c205ea189cf3bfede4bed6a168144b2a222bcbc352edd79" - - 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/antibody.rb b/Formula/antibody.rb deleted file mode 100644 index fe79860ea5f07..0000000000000 --- a/Formula/antibody.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Antibody < Formula - desc "The fastest shell plugin manager" - homepage "https://getantibody.github.io/" - url "https://github.com/getantibody/antibody/archive/v6.0.1.tar.gz" - sha256 "dad02a91cbf5715209ca2958dfeb29127f674a00615f80254efc87c33930dbe0" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "5c3ec35f32bb0ba5a254c7ea09675251dfa73ec5c0066a3a28a7fd637065e026" => :catalina - sha256 "44120733359210252f9b57d7d4d96ab46acb13828a3b65fdb001e639cc46a31a" => :mojave - sha256 "ccea6fb02d1df23fc2438993b2434a8826904d3be4779d5efc5310ae2fbddfb2" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", "-trimpath", "-o", bin/"antibody" - end - - test do - # See if antibody can install a bundle correctly - system "#{bin}/antibody", "bundle", "rupa/z" - assert_match("rupa/z", shell_output("#{bin}/antibody list")) - end -end diff --git a/Formula/antigen.rb b/Formula/antigen.rb deleted file mode 100644 index ca1813029f6d7..0000000000000 --- a/Formula/antigen.rb +++ /dev/null @@ -1,26 +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" - license "MIT" - 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 f622c54ee9fa5..0000000000000 --- a/Formula/antiword.rb +++ /dev/null @@ -1,46 +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 "7f62624bf238ba077370f6e8e223704b57eee461f2bbaddc47de8e4b5c5a4eda" => :catalina - 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 2bb80fea07dd6..0000000000000 --- a/Formula/antlr.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Antlr < Formula - desc "ANother Tool for Language Recognition" - homepage "https://www.antlr.org/" - url "https://www.antlr.org/download/antlr-4.8-complete.jar" - sha256 "73a49d6810d903aa4827ee32126937b85d3bebec0a8e679b0dd963cbcc49ba5a" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - prefix.install "antlr-#{version}-complete.jar" - - (bin/"antlr").write <<~EOS - #!/bin/bash - CLASSPATH="#{prefix}/antlr-#{version}-complete.jar:." exec "#{Formula["openjdk"].opt_bin}/java" -jar #{prefix}/antlr-#{version}-complete.jar "$@" - EOS - - (bin/"grun").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/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 "#{Formula["openjdk"].bin}/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 21c6787277f78..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.8-source.zip" - sha256 "58c9c8f83ed2b2224a047a2ca8af8c7ca2f45bc13ff30bd8777ce65ba81d6d11" - - bottle do - cellar :any - sha256 "e1d273ddfa0ec6d39e6ec23765d4d91951c3089e125bfc65446826be88d534a8" => :catalina - sha256 "842bcfe3342c504c3beac893f279c9636a6416d7fa45e2335c5d23189543a459" => :mojave - sha256 "6a20c7dde2c45917fcdc158bfafd6b732c0431045125270b4e651e3f36ac3f39" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", "-DANTLR4_INSTALL=ON", *std_cmake_args - system "cmake", "--build", ".", "--target", "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 e1a9f02268d5e..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 3 - - bottle do - cellar :any_skip_relocation - sha256 "39b73c18b82c8f0ca76a7245b7b5a9af55da9ac10b8e722cbaafd10febf9e18a" => :catalina - sha256 "bc4b117c432d2bb29ca76463209ce38d3233ea435ea14666fe76ff8058dda0b8" => :mojave - sha256 "d8013efcd3b9cf2b53140801125e9b20c6cc10712c80fada68b8fd472e7338d3" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "openjdk" - - 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 - exec "#{Formula["openjdk"].opt_bin}/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 44906bd3db39a..0000000000000 --- a/Formula/anttweakbar.rb +++ /dev/null @@ -1,54 +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 "38b3f17cf22401dd83d9f2ea375b14b31fbd011e0e2b6cbb8b5be894ac49db0b" => :catalina - 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.version >= "8.0") - ENV.delete("SDKROOT") - ENV.delete("HOMEBREW_SDKROOT") - end - - system "make", "-C", "src", "-f", "Makefile.osx" - lib.install "lib/libAntTweakBar.dylib", "lib/libAntTweakBar.a" - include.install "include/AntTweakBar.h" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - TwBar *bar; // TwBar is an internal structure of AntTweakBar - return 0; - } - EOS - system ENV.cc, "test.cpp", "-L#{lib}", "-anttweakbar", "-o", "test" - system "./test" - end -end diff --git a/Formula/anycable-go.rb b/Formula/anycable-go.rb deleted file mode 100644 index 0baae2318e389..0000000000000 --- a/Formula/anycable-go.rb +++ /dev/null @@ -1,43 +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/v1.0.0.tar.gz" - sha256 "66c6039ad96433cb0a4851f30c917050a1062d269594259bb1665ee03c23e7e9" - license "MIT" - head "https://github.com/anycable/anycable-go.git" - - bottle do - cellar :any_skip_relocation - sha256 "158a7e9917bcdc099b664996e081dd2b020d2036a22e92f351bc9df43a33995d" => :catalina - sha256 "698707ba2032a713055be8a35b6c8ea2baa3df3d90502ac2458996150940716f" => :mojave - sha256 "d16176f21d70123a5c709b1a69214acdeb2825dfd50d038e8db815afe62d6a11" => :high_sierra - end - - depends_on "go" => :build - - def install - ldflags = %w[ - -s -w - ] - ldflags << if build.head? - "-X github.com/anycable/anycable-go/utils.sha=#{version.commit}" - else - "-X github.com/anycable/anycable-go/utils.version=#{version}" - end - - system "go", "build", "-mod=vendor", "-ldflags", ldflags.join(" "), *std_go_args, - "-v", "github.com/anycable/anycable-go/cmd/anycable-go" - end - - test do - port = free_port - pid = fork do - exec "#{bin}/anycable-go --port=#{port}" - end - sleep 1 - 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/anyenv.rb b/Formula/anyenv.rb deleted file mode 100644 index 27d2ae0ac88c3..0000000000000 --- a/Formula/anyenv.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Anyenv < Formula - desc "All in one for **env" - homepage "https://anyenv.github.io/" - url "https://github.com/anyenv/anyenv/archive/v1.1.1.tar.gz" - sha256 "d7f386f74d5fd40ded51b4e83f05490493fc6b63d22eb3d502836020548b0137" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "6d2ce77ba521894c567d8ef6c95def07eff48d38680f259d2f8f5b5c3654ac16" => :catalina - sha256 "0bc3795db6ae8df4151de4fb15be7122a7c0c416d4bc553976e61b23cb9e3c61" => :mojave - sha256 "0bc3795db6ae8df4151de4fb15be7122a7c0c416d4bc553976e61b23cb9e3c61" => :high_sierra - sha256 "c4073892fe99575a1f23eb24714392f098c2980eaaf465a9a8641d955da08306" => :sierra - end - - def install - prefix.install %w[bin completions libexec] - end - - test do - Dir.mktmpdir do |dir| - profile = "#{dir}/.profile" - File.open(profile, "w") do |f| - content = <<~EOS - export ANYENV_ROOT=#{dir}/anyenv - export ANYENV_DEFINITION_ROOT=#{dir}/anyenv-install - eval "$(anyenv init -)" - EOS - f.write(content) - end - - cmds = <<~EOS - anyenv install --force-init - anyenv install --list - anyenv install rbenv - rbenv install --list - EOS - cmds.split("\n").each do |cmd| - shell_output("source #{profile} && #{cmd}") - end - end - end -end diff --git a/Formula/aoeui.rb b/Formula/aoeui.rb deleted file mode 100644 index 86fc7c86667ae..0000000000000 --- a/Formula/aoeui.rb +++ /dev/null @@ -1,21 +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 "79a6d037053bc2b3fcd21870ccc274ad02f8e47bde5c9755b8665c25609ddd3a" => :catalina - 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 b675b2992f782..0000000000000 --- a/Formula/aom.rb +++ /dev/null @@ -1,54 +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 => "v2.0.0", - :revision => "bb35ba9148543f22ba7d8642e4fbd29ae301f5dc" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "acbd463a00751edc0ce704bd14f493442541f4d5a2207225e9497ba4e1ce87a4" => :catalina - sha256 "df98cc962553615767b033086833ef6f004c9b2d47062ae23d75f93013b4fba1" => :mojave - sha256 "036d2a82eab972d1111020dddf892f94969fc39eaa0c3a1897e20b6d8b1f535b" => :high_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 - # Work around Xcode 11 clang bug - # https://bitbucket.org/multicoreware/x265/issues/514/wrong-code-generated-on-macos-1015 - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - 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 69f8190caf598..0000000000000 --- a/Formula/apache-archiva.rb +++ /dev/null @@ -1,61 +0,0 @@ -class ApacheArchiva < Formula - desc "The Build Artifact Repository Manager" - homepage "https://archiva.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=archiva/2.2.5/binaries/apache-archiva-2.2.5-bin.tar.gz" - mirror "https://archive.apache.org/dist/archiva/2.2.5/binaries/apache-archiva-2.2.5-bin.tar.gz" - sha256 "01119af2d9950eacbcce0b7f8db5067b166ad26c1e1701bef829105441bb6e29" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"] - (bin/"archiva").write_env_script libexec/"bin/archiva", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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 f0201dbc58039..0000000000000 --- a/Formula/apache-arrow-glib.rb +++ /dev/null @@ -1,58 +0,0 @@ -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-0.17.1/apache-arrow-0.17.1.tar.gz" - mirror "https://archive.apache.org/dist/arrow/arrow-0.17.1/apache-arrow-0.17.1.tar.gz" - sha256 "cbc51c343bca08b10f7f1b2ef15cb15057c30e5e9017cfcee18337b7e2da9ea2" - license "Apache-2.0" - head "https://github.com/apache/arrow.git" - - bottle do - sha256 "e21d3b56afd84a1987c187911ef181bc55a40553ef431c249903641e921ce686" => :catalina - sha256 "6947d273ccb270e39f191da00cb267248b667392f64a14eea7c3f7fb79218a29" => :mojave - sha256 "75cf8ec68ad7b86de7333cd2355cdbf0ace4610a8cdaff2f1309d79851b62dc2" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "apache-arrow" - 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 <<~SOURCE - #include - int main(void) { - GArrowNullArray *array = garrow_null_array_new(10); - g_object_unref(array); - return 0; - } - SOURCE - 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 25c43c656798a..0000000000000 --- a/Formula/apache-arrow.rb +++ /dev/null @@ -1,72 +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.lua?path=arrow/arrow-0.17.1/apache-arrow-0.17.1.tar.gz" - mirror "https://archive.apache.org/dist/arrow/arrow-0.17.1/apache-arrow-0.17.1.tar.gz" - sha256 "cbc51c343bca08b10f7f1b2ef15cb15057c30e5e9017cfcee18337b7e2da9ea2" - license "Apache-2.0" - revision 1 - head "https://github.com/apache/arrow.git" - - bottle do - cellar :any - sha256 "f233da1f2e43a5a98f178cdaa6fe371f74255d3fec4943125d7cfaa219cafc40" => :catalina - sha256 "35fbe889ef3e548a2d55a91d75eb846a72d5fdd408993c1d85e93f354a6e44fb" => :mojave - sha256 "9af939cc5656770894b4fe2766125584df1fb67487e7000c52c995c1e9067cea" => :high_sierra - end - - depends_on "boost" => :build - depends_on "cmake" => :build - depends_on "brotli" - depends_on "glog" - depends_on "grpc" - depends_on "lz4" - depends_on "numpy" - depends_on "openssl@1.1" - depends_on "protobuf" - depends_on "python@3.8" - depends_on "rapidjson" - depends_on "snappy" - depends_on "thrift" - depends_on "zstd" - - def install - ENV.cxx11 - args = %W[ - -DARROW_FLIGHT=ON - -DARROW_JEMALLOC=OFF - -DARROW_ORC=ON - -DARROW_PARQUET=ON - -DARROW_PLASMA=ON - -DARROW_PROTOBUF_USE_SHARED=ON - -DARROW_PYTHON=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_INSTALL_NAME_RPATH=OFF - -DPYTHON_EXECUTABLE=#{Formula["python@3.8"].bin/"python3"} - ] - - mkdir "build" - cd "build" do - system "cmake", "../cpp", *std_cmake_args, *args - system "make" - 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 28ef9c83a82ed..0000000000000 --- a/Formula/apache-brooklyn-cli.rb +++ /dev/null @@ -1,51 +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-1.0.0.tar.gz" - sha256 "9eb52ac3cd76adf219b66eb8b5a7899c86e25736294bca666a5b4e24d34e911b" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "7769a15fc55f1a6943165e78c0cc3c9677815686b935a888c3db708fbaf2b8dd" => :catalina - sha256 "1b73cb46bdd10be0d426298ec972fd37362352b28fadb484374e701619d3a1dc" => :mojave - sha256 "b64f20e59f179c2a359d180be65931e06743aea8c62295f58d1afdbd967871d9" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/apache/brooklyn-client").install "cli" - cd "src/github.com/apache/brooklyn-client/cli" do - system "go", "build", "-o", bin/"br", ".../br" - prefix.install_metafiles - 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/apache-ctakes.rb b/Formula/apache-ctakes.rb deleted file mode 100644 index d50a04e802484..0000000000000 --- a/Formula/apache-ctakes.rb +++ /dev/null @@ -1,27 +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" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - rm Dir["**/*.{bat,cmd}"] + ["bin/ctakes.profile"] - libexec.install %w[bin config desc lib resources] - pkgshare.install_symlink libexec/"resources/org/apache/ctakes/examples" - - bin.install Dir["#{libexec}/bin/*.sh"] - bin.env_script_all_files libexec/"bin", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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 cf89dc8a11fe6..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.lua?path=drill/drill-1.17.0/apache-drill-1.17.0.tar.gz" - mirror "https://archive.apache.org/dist/drill/drill-1.17.0/apache-drill-1.17.0.tar.gz" - sha256 "a3d2d544bcc32b915fb53fced0f982670bd6fe2abd764423e566a5f6b54debf1" - - 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 830a0114d09eb..0000000000000 --- a/Formula/apache-flink.rb +++ /dev/null @@ -1,42 +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.10.1/flink-1.10.1-bin-scala_2.12.tgz" - mirror "https://archive.apache.org/dist/flink/flink-1.10.1/flink-1.10.1-bin-scala_2.12.tgz" - version "1.10.1" - sha256 "cd3159a6d288349768787a1b57968e108e28e7d31c06d44c6ed241c102f56deb" - license "Apache-2.0" - 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")) - (libexec/"bin").install Dir["#{libexec}/libexec/*.jar"] - 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 773562d0c8e1d..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.lua?path=forrest/apache-forrest-0.9-sources.tar.gz" - mirror "https://archive.apache.org/dist/forrest/apache-forrest-0.9-sources.tar.gz" - sha256 "c6ac758db2eb0d4d91bd1733bbbc2dec4fdb33603895c464bcb47a34490fb64d" - revision 1 - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "53aed268e732c00ae5d57d4b98287c59f12c124f5a1b925d02aefacdc6dc5132" => :catalina - sha256 "53aed268e732c00ae5d57d4b98287c59f12c124f5a1b925d02aefacdc6dc5132" => :mojave - sha256 "53aed268e732c00ae5d57d4b98287c59f12c124f5a1b925d02aefacdc6dc5132" => :high_sierra - end - - depends_on "openjdk" - - resource "deps" do - url "https://www.apache.org/dyn/closer.lua?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", :JAVA_HOME => Formula["openjdk"].opt_prefix - - 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 4d4e04d71fdc6..0000000000000 --- a/Formula/apache-geode.rb +++ /dev/null @@ -1,27 +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.lua?path=geode/1.12.0/apache-geode-1.12.0.tgz" - mirror "https://archive.apache.org/dist/geode/1.12.0/apache-geode-1.12.0.tgz" - mirror "https://www.apache.org/dist/geode/1.12.0/apache-geode-1.12.0.tgz" - sha256 "063b473dac914aca53c09326487cc96c63ef84eecc8b053c8cc3d5110e82f179" - - bottle :unneeded - - 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 - 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 diff --git a/Formula/apache-opennlp.rb b/Formula/apache-opennlp.rb deleted file mode 100644 index 07c097a476025..0000000000000 --- a/Formula/apache-opennlp.rb +++ /dev/null @@ -1,18 +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.lua?path=opennlp/opennlp-1.9.2/apache-opennlp-1.9.2-bin.tar.gz" - mirror "https://archive.apache.org/dist/opennlp/opennlp-1.9.2/apache-opennlp-1.9.2-bin.tar.gz" - sha256 "26b55416a6c330e9c91bf9ad31183f3ed3104643b3d74ad2ee6e16b0c0e44f3b" - - 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 8908e28e4617b..0000000000000 --- a/Formula/apache-spark.rb +++ /dev/null @@ -1,30 +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-3.0.0/spark-3.0.0-bin-hadoop3.2.tgz" - mirror "https://archive.apache.org/dist/spark/spark-3.0.0/spark-3.0.0-bin-hadoop3.2.tgz" - version "3.0.0" - sha256 "3c9bef2d002d706b5331415884d3f890ecfdd7c6a692f36ed7a981ad120b2482" - license "Apache-2.0" - head "https://github.com/apache/spark.git" - - bottle :unneeded - - depends_on "openjdk@11" - - 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", :JAVA_HOME => Formula["openjdk@11"].opt_prefix) - 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/apachetop.rb b/Formula/apachetop.rb deleted file mode 100644 index 9ecf74c425c71..0000000000000 --- a/Formula/apachetop.rb +++ /dev/null @@ -1,37 +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.19.7.orig.tar.gz" - sha256 "88abf58ee5d7882e4cc3fa2462865ebbf0e8f872fdcec5186abe16e7bff3d4a5" - - bottle do - cellar :any - sha256 "da48ab193d519f9a3ce1f90d1f6b4f4b9adee43a6a57435329d7a04e2a27e154" => :catalina - sha256 "a71dffc1d92dad7331f5e935395a20bb3ba953889f5083e92bcd7e4388a71ab5" => :mojave - sha256 "1bab24050249ddcf4f69b48b6568cf8e0464722d1a91cf3c1b6a21da0fdf4462" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "adns" - depends_on "ncurses" - depends_on "pcre" - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--disable-debug", - "--disable-dependency-tracking", - "--with-logfile=/var/log/apache2/access_log", - "--with-adns=#{Formula["adns"].opt_prefix}", - "--with-pcre=#{Formula["pcre"].opt_prefix}" - 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/apcupsd.rb b/Formula/apcupsd.rb deleted file mode 100644 index 284f634f062d2..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" - license "GPL-2.0" - - bottle do - rebuild 3 - sha256 "6bdbc101891e5c10b8aead1e1c86ce8ed1560f38b4de96a6c804c73953ad3ac0" => :catalina - sha256 "f9e745573abb55d0194e958d48256ace18a8116fc2c7577617de915746e6c18b" => :mojave - sha256 "8e604286ac22168ede829d3dff95ac782b458316c3389827c6d6c5168a2552e4" => :high_sierra - 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", "#{lib}/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}/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 - - 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 26fbfdf396a86..0000000000000 --- a/Formula/ape.rb +++ /dev/null @@ -1,35 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "54387a0a2a38314a0def581f67c517d9ff7f82efd431e9811cf774cf235850a3" => :high_sierra - sha256 "dd095fa1465e0a20613481720e26a5917c08882b340a18ab4d351a95e5eb3a3e" => :sierra - sha256 "259b19e211ff6d6ffc376db0b3696a912a6ac48dca83cbcbe525c78e56755c82" => :el_capitan - sha256 "3859216e566e6faaccc7183d737527dd4785260a698c8344520e7951baebca76" => :yosemite - sha256 "83c7ef23309dec2e7bd4bec3ae75b6f0e04fcfecbda489c90810b6948eb3bb28" => :mavericks - 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/apgdiff.rb b/Formula/apgdiff.rb deleted file mode 100644 index 82ad060487535..0000000000000 --- a/Formula/apgdiff.rb +++ /dev/null @@ -1,58 +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" - license "MIT" - - 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 996c2f4396996..0000000000000 --- a/Formula/apib.rb +++ /dev/null @@ -1,30 +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_2_1.tar.gz" - sha256 "e47f639aa6ffc14a2e5b03bf95e8b0edc390fa0bb2594a521f779d6e17afc14c" - license "Apache-2.0" - head "https://github.com/apigee/apib.git" - - bottle do - cellar :any - sha256 "b925a48cd3a9047184b5373e4718e4142117a487467cea95be9f43f6c9951712" => :catalina - sha256 "fd1f74b58c7a51240d463c8ec1203bce33677409aca81ba0ffba9ea718471433" => :mojave - sha256 "aee416aff5715b96b81cfeda0be036a2510ffe760187e396c143a64bae2c25c2" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libev" - depends_on "openssl@1.1" - - def install - system "cmake", ".", *std_cmake_args - system "make", "apib", "apibmon" - - bin.install "apib/apib", "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 be69e6a427f0e..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.35.tar.gz" - sha256 "0f074860057cf59bd470a7b813ad45249d07c19c73688ada4b204b96125ce43b" - - 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 daf4de1c9f3c2..0000000000000 --- a/Formula/apktool.rb +++ /dev/null @@ -1,26 +0,0 @@ -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.4.1/apktool_2.4.1.jar" - sha256 "bdeb66211d1dc1c71f138003ce35f6d0cd19af6f8de7ffbdd5b118d02d825a52" - license "Apache-2.0" - - 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/apng2gif.rb b/Formula/apng2gif.rb deleted file mode 100644 index 686a10fdd2fa1..0000000000000 --- a/Formula/apng2gif.rb +++ /dev/null @@ -1,35 +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 "e602a9876003067007cdd579101e1fafa937e7a2ca328a0406e872d6be4f5705" => :catalina - 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 a25992cdfb4a4..0000000000000 --- a/Formula/apngasm.rb +++ /dev/null @@ -1,36 +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 "48dfe150da3c6f5992d771f4581d39a6a4a9750ae4835d959f6bbc23c03923da" => :catalina - 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-cli.rb b/Formula/apollo-cli.rb deleted file mode 100644 index b87af1293703e..0000000000000 --- a/Formula/apollo-cli.rb +++ /dev/null @@ -1,32 +0,0 @@ -require "language/node" - -class ApolloCli < Formula - desc "Command-line tool for Apollo GraphQL" - homepage "https://apollographql.com/" - url "https://registry.npmjs.org/apollo/-/apollo-2.28.3.tgz" - sha256 "648334e38f9b8d45ceb59e216b5352d8edd60301b81d035084f823480b7136a7" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "73000a5bd181568ffe0c979d8800c6048fe611954c3b68a68034037aee39689a" => :catalina - sha256 "a8e3edf77278ae0c757dfcef93e5ce337add91954f89ed73256c91f5c28c8e8d" => :mojave - sha256 "b1ec91bec2690160acdd33b5ba70922ced9d087c99039344038eda1a1f7386d9" => :high_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_match "apollo/#{version}", shell_output("#{bin}/apollo --version") - - assert_match "Missing required flag:", shell_output("#{bin}/apollo codegen:generate 2>&1", 2) - - error_output = shell_output("#{bin}/apollo codegen:generate --target typescript 2>&1", 2) - assert_match "Please add either a client or service config", error_output - end -end diff --git a/Formula/apollo.rb b/Formula/apollo.rb deleted file mode 100644 index f6b1c813c553b..0000000000000 --- a/Formula/apollo.rb +++ /dev/null @@ -1,80 +0,0 @@ -class Apollo < Formula - desc "Multi-protocol messaging broker based on ActiveMQ" - homepage "https://activemq.apache.org/apollo" - url "https://www.apache.org/dyn/closer.lua?path=activemq/activemq-apollo/1.7.1/apache-apollo-1.7.1-unix-distro.tar.gz" - mirror "https://archive.apache.org/dist/activemq/activemq-apollo/1.7.1/apache-apollo-1.7.1-unix-distro.tar.gz" - sha256 "74577339a1843995a5128d14c68b21fb8f229d80d8ce1341dd3134f250ab689d" - revision 1 - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "81b2a6a1110da6cf58c6725eb6e2c331668fa39d01644e0a754a2eb9241fdccd" => :catalina - sha256 "81b2a6a1110da6cf58c6725eb6e2c331668fa39d01644e0a754a2eb9241fdccd" => :mojave - sha256 "81b2a6a1110da6cf58c6725eb6e2c331668fa39d01644e0a754a2eb9241fdccd" => :high_sierra - end - - depends_on "openjdk" - - # 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", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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 734c0735646bb..0000000000000 --- a/Formula/app-engine-java.rb +++ /dev/null @@ -1,36 +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.72.zip" - sha256 "66af92c909c0403730aba7c4b9fbdc6d7ceb0f5310e7c2f1a653622dfa76c6fb" - - 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| - until $LAST_READ_LINE == "INFO: Dev App Server is now running\n" - assert_not_nil io.gets, "Dev App Server terminated prematurely" - end - 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 492bd1c7acfa3..0000000000000 --- a/Formula/app-engine-python.rb +++ /dev/null @@ -1,66 +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.86.zip" - sha256 "8a1d57f8819792a4c18bc337762f73f3bf207da986fd6028e3e591f24cfde9f2" - - 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 - - port = free_port - begin - pid = fork do - exec "#{pkgshare}/dev_appserver.py app.yaml --skip_sdk_update_check --port #{port}" - end - sleep 5 - output = shell_output("curl -s http://localhost:#{port}/") - 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 6dd9aeaaac9db..0000000000000 --- a/Formula/apparix.rb +++ /dev/null @@ -1,31 +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 "27524421291472bcc5ef8dc6a19d7b6cb7aab1d6a7dffd326c4594a11f3ce4e8" => :catalina - 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/appium.rb b/Formula/appium.rb deleted file mode 100644 index d80f437c2540c..0000000000000 --- a/Formula/appium.rb +++ /dev/null @@ -1,42 +0,0 @@ -require "language/node" - -class Appium < Formula - desc "Automation for Apps" - homepage "https://appium.io/" - url "https://registry.npmjs.org/appium/-/appium-1.17.1.tgz" - sha256 "967aac00940015e17807d227a37fbee62c569a7b770b408a558944a2bbe27c5f" - license "Apache-2.0" - head "https://github.com/appium/appium.git" - - bottle do - cellar :any - sha256 "f0e2cae44d7c89c105ff256f34786ecc53d133fbbc74f21a93dca51ae28dc811" => :catalina - sha256 "d45524677747716facf1fc8ff483b34051300fe9ee3ec37797cee98ca91bf810" => :mojave - sha256 "086ddbbdae4a0b17e4dec8197f1efd53d5f80b011ffde0d3389260f599238223" => :high_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}/appium --show-config 2>&1") - assert_match version.to_str, output - - port = free_port - begin - pid = fork do - exec bin/"appium --port #{port} &>appium-start.out" - end - sleep 3 - - assert_match "The URL '/' did not map to a valid resource", shell_output("curl -s 127.0.0.1:#{port}") - ensure - Process.kill("TERM", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/appledoc.rb b/Formula/appledoc.rb deleted file mode 100644 index 6b2ac1e5770b3..0000000000000 --- a/Formula/appledoc.rb +++ /dev/null @@ -1,60 +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 - rebuild 1 - sha256 "35ced2445cb6f9744a2b8ef09d1f5d504aefe4995a8463639bf4fa8b5271e5f8" => :catalina - sha256 "dd27c7222d181acb351bf33921ef203fcafc4df3e06618ad99b16cf069dd646c" => :mojave - sha256 "ccae984913f4bcd3c0ff8f9d527a3330445c432af0bf98da315edbea83ccd0a5" => :high_sierra - end - - depends_on :xcode => :build - - 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 3d8fa591b78a0..0000000000000 --- a/Formula/appscale-tools.rb +++ /dev/null @@ -1,341 +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" - revision 3 - head "https://github.com/AppScale/appscale-tools.git" - - bottle do - cellar :any - sha256 "dc2f20c3743a21aa5f06b3068faadf0f00c5da34728ca55af936439213b9f7ad" => :catalina - sha256 "eb5e13b06c11ecb6a29eb79e0bcd474ee8320c5ce4d223427809b03f899aebbf" => :mojave - sha256 "70e89498336894ae025118e51e418528d8d73da9b1e2786559b6bcbe6055f55b" => :high_sierra - end - - depends_on "libyaml" - depends_on :macos # Due to Python 2 (Uses SOAPPy, which does not support Python 3) - depends_on "openssl@1.1" - - uses_from_macos "libffi" - uses_from_macos "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/c1/a9/86bfedaf41ca590747b4c9075bc470d0b2ec44fb5db5d378bc61447b3b6b/asn1crypto-1.2.0.tar.gz" - sha256 "87620880a477123e01177a1f73d0f327210b43a3cdbd714efcd2fa49a8d7b384" - 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/appstream-glib.rb b/Formula/appstream-glib.rb deleted file mode 100644 index 37f0318e8a5b7..0000000000000 --- a/Formula/appstream-glib.rb +++ /dev/null @@ -1,91 +0,0 @@ -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/appstream_glib_0_7_17.tar.gz" - sha256 "cb612c9e634275e574fa639737cf63711358cd10b9d0d377f70025653fefdd16" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "de7a46f58e307acdfded481babf14370554a37a8f502f8122fa1f789946b04b4" => :catalina - sha256 "5086642d95908eedcc2e6e1433f43398cf127fa3745ee40ccd6c9c9e081e30ef" => :mojave - sha256 "5c8dfa2d33a90c0b574aa3f4943a74b665019d165cc7493380775addb2cc6545" => :high_sierra - 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 "pkg-config" => :build - depends_on "gdk-pixbuf" - depends_on "glib" - depends_on "json-glib" - depends_on "libarchive" - depends_on "libsoup" - depends_on "util-linux" - - # see https://github.com/hughsie/appstream-glib/issues/258 - patch :DATA - - def install - # Find our docbook catalog - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - mkdir "build" do - system "meson", *std_meson_args, "-Dbuilder=false", "-Drpm=false", "-Ddep11=false", "-Dstemmer=false", ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - AsScreenshot *screen_shot = as_screenshot_new(); - g_assert_nonnull(screen_shot); - return 0; - } - EOS - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - flags = %W[ - -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#{include}/libappstream-glib - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lappstream-glib - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - ] - 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/apr-util.rb b/Formula/apr-util.rb deleted file mode 100644 index 1abba2ce7f4ab..0000000000000 --- a/Formula/apr-util.rb +++ /dev/null @@ -1,51 +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.lua?path=apr/apr-util-1.6.1.tar.bz2" - mirror "https://archive.apache.org/dist/apr/apr-util-1.6.1.tar.bz2" - sha256 "d3e12f7b6ad12687572a3a39475545a072608f4ba03a6ce8a3778f607dd0035b" - revision 3 - - bottle do - sha256 "425955a21c3fec8e78f365cd7fc4c6c4ec95d074f720a9b24e8237af90cc4dcc" => :catalina - sha256 "b3b8376d8f481164a34b891b926ab22acdc2903e77c4cfbc04c0ba6363ca7597" => :mojave - sha256 "20688bea4981567848393aeeb1964f2200847f63ee52eb8c68d8fff0e4dd8b45" => :high_sierra - sha256 "16e812e4be2247d8e8f4f8a68ba6765ceb5a98e22a08dda288eb99dff2e41ae0" => :sierra - end - - keg_only :shadowed_by_macos, "Apple's CLT provides apr (but not apr-util)" - - depends_on "apr" - depends_on "openssl@1.1" - - uses_from_macos "expat" - uses_from_macos "sqlite" - - on_linux do - depends_on "mawk" - depends_on "unixodbc" - end - - 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@1.1"].opt_prefix}", - "--without-pgsql" - - 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 ac49cdd92c4eb..0000000000000 --- a/Formula/apr.rb +++ /dev/null @@ -1,56 +0,0 @@ -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.0.tar.bz2" - mirror "https://archive.apache.org/dist/apr/apr-1.7.0.tar.bz2" - sha256 "e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "277c42fcf2f5ca298a14279d1325f58da89ee4ec2132b3ccca9bf8dfdc354c48" => :catalina - sha256 "3a245185ed7280d1a19e7c639786b4c21dd0088878be8ac87ca58510eb5c9cc1" => :mojave - sha256 "4d01f24009ea389e2c8771c5c0bc069ae09c0f5812d7fdb0d0079106c3fc0838" => :high_sierra - sha256 "a49a1725c76754297c0f9a268423ee9a1772d23d264360504cc3401a21d2aa7e" => :sierra - end - - keg_only :provided_by_macos, "Apple's CLT provides apr" - - depends_on "autoconf" => :build - - on_linux do - depends_on "util-linux" - end - - # Apply r1871981 which fixes a compile error on macOS 11.0. - # Remove with the next release, along with the autoconf call & dependency. - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/7e2246542543bbd3111a4ec29f801e6e4d538f88/apr/r1871981-macos11.patch" - sha256 "8754b8089d0eb53a7c4fd435c9a9300560b675a8ff2c32315a5e9303408447fe" - end - - 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 - - # Needed to apply the patch. - system "autoconf" - - # 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 011b15474eb2e..0000000000000 --- a/Formula/apt-dater.rb +++ /dev/null @@ -1,40 +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/v1.0.4.tar.gz" - sha256 "a4bd5f70a199b844a34a3b4c4677ea56780c055db7c557ff5bd8f2772378a4d6" - license "GPL-2.0" - revision 1 - version_scheme 1 - - bottle do - sha256 "5fe58574f889c5e29bd2f4c492848281450da398cace807a33c5100b44090665" => :catalina - sha256 "d736fdabb393e90e6895b9d5694cc0a78f592bd363483e7e935d044fd0331d41" => :mojave - sha256 "f6b5f606925ac38d24ef56fc52e93c3f5a4e8f1ab2d687ebb376c78d4f91f366" => :high_sierra - sha256 "66d81a3bf524ab635a34803119837ef26704011b2d362ab7f41aba0d40b54ea3" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "popt" - - uses_from_macos "libxml2" - - def install - system "autoreconf", "-ivf" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - # Global config overrides local config, so delete global config to prioritize the - # config in $HOME/.config/apt-dater - (prefix/"etc").rmtree - 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 b12964dc215fa..0000000000000 --- a/Formula/aptly.rb +++ /dev/null @@ -1,37 +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.4.0.tar.gz" - sha256 "4172d54613139f6c34d5a17396adc9675d7ed002e517db8381731d105351fbe5" - license "MIT" - revision 1 - head "https://github.com/aptly-dev/aptly.git" - - bottle do - cellar :any_skip_relocation - sha256 "d14f3a2e0589a69b545078f4408a7ff804f727769f9ac0f66b0e08cbed96a7de" => :catalina - sha256 "4a164a193db58e11d6e7b18f7e911a8d7a96e8b40201160b822d8ade95181f65" => :mojave - sha256 "53301cc0bf47b4eeadf784856ee71bc72c9be5db62ad0462ded0f843aed49b42" => :high_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 f2acf1b590473..0000000000000 --- a/Formula/aqbanking.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Aqbanking < Formula - desc "Generic online banking interface" - homepage "https://www.aquamaniac.de/sites/aqbanking/" - url "https://www.aquamaniac.de/rdm/attachments/download/328/aqbanking-6.2.1.tar.gz" - sha256 "bab601bf7c3402912438aa2919cd84d498a65749238214fcf881d2a2cfea1fd4" - - bottle do - sha256 "c5579a6f5aada2c6738e09338c5cededdeacbc0d3dd0cc3a3e0fd4c8f71d8678" => :catalina - sha256 "3127e76e64ce70f7ceb4a42b125afe38f7176ab58a539ace3689152fa50fbf6e" => :mojave - sha256 "f6e3e9685094ba9e507c5947825579f092a2c1b0d2f46b09d479bf59afe362a8" => :high_sierra - 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 "gettext" - depends_on "gmp" - depends_on "gwenhywfar" - depends_on "ktoblzcheck" - depends_on "libxml2" - depends_on "libxmlsec1" - depends_on "libxslt" - depends_on "pkg-config" # aqbanking-config needs pkg-config for execution - - def install - ENV.deparallelize - inreplace "aqbanking-config.in.in", "@PKG_CONFIG@", "pkg-config" - system "autoreconf", "-fiv" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-cli" - 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/arabica.rb b/Formula/arabica.rb deleted file mode 100644 index d90bb5fac00f5..0000000000000 --- a/Formula/arabica.rb +++ /dev/null @@ -1,35 +0,0 @@ -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/2020-April.tar.gz" - version "20200425" - sha256 "b00c7b8afd2c3f17b5a22171248136ecadf0223b598fd9631c23f875a5ce87fe" - head "https://github.com/jezhiggins/arabica.git" - - bottle do - cellar :any - sha256 "4fbf676c46941de213b095ab74f0b4973e5984c2bbaa7679757b0db4b369480a" => :catalina - sha256 "acc299016dbd644658880e9fa29af6d3f0b9f8e226b16ccd3fcaea8dae23febf" => :mojave - sha256 "62920d4f26c2da71c6abf60c90c1322457e340df8142d7133a9ee1f7c2b46745" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "boost" - - uses_from_macos "expat" - - 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 54ca1b77f0248..0000000000000 --- a/Formula/arangodb.rb +++ /dev/null @@ -1,127 +0,0 @@ -class Arangodb < Formula - desc "The Multi-Model NoSQL Database" - homepage "https://www.arangodb.com/" - url "https://download.arangodb.com/Source/ArangoDB-3.6.4.tar.gz" - sha256 "e2755fc3576edc0531ca2dd43c6edb690494bc7b44426c9236b1edb575be8aa9" - license "Apache-2.0" - head "https://github.com/arangodb/arangodb.git", :branch => "devel" - - bottle do - sha256 "4bf7f43c396ee8273591232f880a7c33f2207c521efe591aaa9ace900ca03696" => :catalina - sha256 "251c7b9442a8da3a4d62f487a159ebc3089ef5398c399aec5c47c4deb9ea5729" => :mojave - end - - depends_on "ccache" => :build - depends_on "cmake" => :build - depends_on "go@1.13" => :build - depends_on :macos => :mojave - depends_on "openssl@1.1" - - # the ArangoStarter is in a separate github repository; - # it is used to easily start single server and clusters - # with a unified CLI - resource "starter" do - url "https://github.com/arangodb-helper/arangodb.git", - :revision => "598e7d7794ad4a98024548dd9061e03782542ecd" - end - - def install - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version - - resource("starter").stage do - ENV.append "GOPATH", Dir.pwd + "/.gobuild" - ENV.append "DOCKERCLI", "" - system "make", "deps" - # use commit-id as projectBuild - commit = `git rev-parse HEAD`.chomp - system "go", "build", "-ldflags", "-X main.projectVersion=0.14.14 -X main.projectBuild=#{commit}", - "-o", "arangodb", - "github.com/arangodb-helper/arangodb" - bin.install "arangodb" - end - - mkdir "build" do - openssl = Formula["openssl@1.1"] - args = std_cmake_args + %W[ - -DHOMEBREW=ON - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DUSE_MAINTAINER_MODE=Off - -DUSE_JEMALLOC=Off - -DCMAKE_SKIP_RPATH=On - -DOPENSSL_USE_STATIC_LIBS=On - -DCMAKE_LIBRARY_PATH=#{openssl.opt_lib} - -DOPENSSL_ROOT_DIR=#{openssl.opt_lib} - -DCMAKE_OSX_DEPLOYMENT_TARGET=#{MacOS.version} - -DTARGET_ARCHITECTURE=nehalem - -DUSE_CATCH_TESTS=Off - -DUSE_GOOGLE_TESTS=Off - -DCMAKE_INSTALL_LOCALSTATEDIR=#{var} - ] - - ENV.append "V8_CXXFLAGS", "-O3 -g -fno-delete-null-pointer-checks" if ENV.compiler == "gcc-6" - - system "cmake", "..", *args - system "make", "install" - end - end - - def post_install - (var/"lib/arangodb3").mkpath - (var/"log/arangodb3").mkpath - end - - def caveats - <<~EOS - An empty password has been set. Please change it by executing - #{opt_sbin}/arango-secure-installation - EOS - 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 - require "pty" - - testcase = "require('@arangodb').print('it works!')" - output = shell_output("#{bin}/arangosh --server.password \"\" --javascript.execute-string \"#{testcase}\"") - assert_equal "it works!", output.chomp - - ohai "#{bin}/arangodb --starter.instance-up-timeout 1m --starter.mode single" - PTY.spawn("#{bin}/arangodb", "--starter.instance-up-timeout", "1m", - "--starter.mode", "single", "--starter.disable-ipv6", - "--server.arangod", "#{sbin}/arangod", - "--server.js-dir", "#{share}/arangodb3/js") do |r, _, pid| - loop do - available = IO.select([r], [], [], 60) - assert_not_equal available, nil - - line = r.readline.strip - ohai line - - break if line.include?("Your single server can now be accessed") - end - ensure - Process.kill "SIGINT", pid - ohai "shuting down #{pid}" - end - end -end diff --git a/Formula/aravis.rb b/Formula/aravis.rb deleted file mode 100644 index f6c579d93c982..0000000000000 --- a/Formula/aravis.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Aravis < Formula - desc "Vision library for genicam based cameras" - homepage "https://wiki.gnome.org/Projects/Aravis" - url "https://download.gnome.org/sources/aravis/0.6/aravis-0.6.4.tar.xz" - sha256 "b595a4724da51d0fdb71f2b6e2f1e12f328e423155c3e84607ee2ce704f516bd" - - bottle do - sha256 "1bd9c1847561b56ca3f5298e9a48f2347548387d6a677e31905df4c455cddd5a" => :catalina - sha256 "b851c3d06486230de2a79a57d82455029cb07890749e4525dc929a075cce1c70" => :mojave - sha256 "948909cbf756dc510beff0d8bb88d31f49b8d335d637b260592dff29608939f6" => :high_sierra - sha256 "b97fa0af26f27a4a7ff3f56b6e24b300199ad7f208343a431e8ea90a806a9d9c" => :sierra - 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 "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "glib" - depends_on "gst-plugins-bad" - depends_on "gst-plugins-base" - depends_on "gst-plugins-good" - depends_on "gstreamer" - depends_on "gtk+3" - depends_on "intltool" - depends_on "libnotify" - depends_on "libusb" - - def install - # icon cache update must happen in post_install - inreplace "viewer/Makefile.am", "install-data-hook: install-update-icon-cache", "" - - system "autoreconf", "-fi" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--enable-introspection", - "--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 - 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 92bb46c532fdc..0000000000000 --- a/Formula/arcade-learning-environment.rb +++ /dev/null @@ -1,41 +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.1.tar.gz" - sha256 "8059a4087680da03878c1648a8ceb0413a341032ecaa44bef4ef1f9f829b6dde" - license "GPL-2.0" - revision 1 - head "https://github.com/mgbellemare/Arcade-Learning-Environment.git" - - bottle do - cellar :any - sha256 "dc3acdec1e0fa77c0989f669df73ac9260611e3542db9cd371d27260276037a9" => :catalina - sha256 "9fbb8f0997a3ca959a1e2a6e972c4100069b88bbf0450d3ed099a6b344238ca0" => :mojave - sha256 "bb28107f88fe1615bd737c5fa76d195e27625e5d9139fd7e9168045952926d22" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "numpy" - depends_on "python@3.8" - 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 Formula["python@3.8"].opt_bin/"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("#{Formula["python@3.8"].opt_bin}/python3 test.py 2>&1") - end -end diff --git a/Formula/archey.rb b/Formula/archey.rb deleted file mode 100644 index 3744a485e56ff..0000000000000 --- a/Formula/archey.rb +++ /dev/null @@ -1,27 +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" - license "GPL-2.0" - 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 cc34738e6a322..0000000000000 --- a/Formula/archi-steam-farm.rb +++ /dev/null @@ -1,31 +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/archivemount.rb b/Formula/archivemount.rb deleted file mode 100644 index 0910e56a03240..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.9.1.tar.gz" - sha256 "c529b981cacb19541b48ddafdafb2ede47a40fcaf16c677c1e2cd198b159c5b3" - - bottle do - cellar :any - sha256 "68c3994948be590e8ee5e9a9de00182162135a76b0a5dd780c7d8b067a480062" => :catalina - sha256 "439cdd8d7c962cf9a5144e20206ddaeaabc15c1752c58acd059e31976e254f6a" => :mojave - sha256 "428113b60673b6bb8be9467587f1d82bf4c9447c7f0bbdea47749bed3ec86798" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libarchive" - depends_on :osxfuse - - def install - ENV.append_to_cflags "-I/usr/local/include/osxfuse" - 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/archiver.rb b/Formula/archiver.rb deleted file mode 100644 index 02e17889b3393..0000000000000 --- a/Formula/archiver.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Archiver < Formula - desc "Cross-platform, multi-format archive utility" - homepage "https://github.com/mholt/archiver" - url "https://github.com/mholt/archiver/archive/v3.3.0.tar.gz" - sha256 "c8e88340e80b428c1a1c9734084395b473c9458fcea8b8b5126a9db96ae45844" - license "MIT" - head "https://github.com/mholt/archiver.git" - - bottle do - cellar :any_skip_relocation - sha256 "f7e2687f04f044894475e29cfb986f9e40658878b52675ef87e8059676629a6d" => :catalina - sha256 "0afa338b4f42fb7314d8b5f557a7310824dad082ff85f3940bfa70b39f3c48a9" => :mojave - sha256 "3622a493e750f8aaeebe1f807adb002a8d00297a8f69f5b44ad0ce1c961d1851" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-trimpath", "-o", bin/"arc", "cmd/arc/main.go" - 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_predicate testpath/"test.zip", :exist? - assert_match "application/zip", - shell_output("file -bI #{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/arduino-cli.rb b/Formula/arduino-cli.rb deleted file mode 100644 index 2eefa68b7ecb0..0000000000000 --- a/Formula/arduino-cli.rb +++ /dev/null @@ -1,45 +0,0 @@ -class ArduinoCli < Formula - desc "Arduino command-line interface" - homepage "https://github.com/arduino/arduino-cli" - url "https://github.com/arduino/arduino-cli.git", - :tag => "0.11.0", - :revision => "0296f4df116385f868b67c5ffa7393936c3345c9" - revision 2 - head "https://github.com/arduino/arduino-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "7d6e6a081632c6cb89e60636c3a7e6989375d10f8ab0f350927f68ea8957ed42" => :catalina - sha256 "878390cd1048b3370de84200bf37e718b37252ae9daa437cac543635ba3bf482" => :mojave - sha256 "b84292063439746cbaf314a60172e94659f90a6b80eaaab8f138b2ec4c128c43" => :high_sierra - end - - depends_on "go" => :build - - def install - commit = Utils.safe_popen_read("git", "rev-parse", "HEAD").chomp - ldflags = %W[ - -s -w - -X github.com/arduino/arduino-cli/version.versionString=#{version} - -X github.com/arduino/arduino-cli/version.commit=#{commit} - ] - system "go", "build", *std_go_args, "-ldflags", ldflags.join(" ") - - output = Utils.safe_popen_read({ "SHELL" => "bash" }, "#{bin}/arduino-cli", "completion", "bash") - (bash_completion/"arduino-cli").write output - - output = Utils.safe_popen_read({ "SHELL" => "zsh" }, "#{bin}/arduino-cli", "completion", "zsh") - (zsh_completion/"_arduino-cli").write output - - output = Utils.safe_popen_read({ "SHELL" => "fish" }, "#{bin}/arduino-cli", "completion", "fish") - (fish_completion/"arduino-cli.fish").write output - end - - test do - system "#{bin}/arduino-cli", "sketch", "new", "test_sketch" - assert File.directory?("#{testpath}/test_sketch") - - version_output = shell_output("#{bin}/arduino-cli version 2>&1") - assert_match "arduino-cli Version: #{version}", version_output - end -end diff --git a/Formula/argon2.rb b/Formula/argon2.rb deleted file mode 100644 index c5fe2becce9f7..0000000000000 --- a/Formula/argon2.rb +++ /dev/null @@ -1,28 +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/20190702.tar.gz" - sha256 "daf972a89577f8772602bf2eb38b6a3dd3d922bf5724d45e7f9589b5e830442c" - revision 1 - head "https://github.com/P-H-C/phc-winner-argon2.git" - - bottle do - cellar :any - sha256 "f8e550c8597728bb9edc5a548497fd7b1219203932cd0f93ecc97a4fbf0bdad8" => :catalina - sha256 "a76192a41826619fc399e7f6de5e6cb1c8a5fbe6bea4f2c1554daa830fa0e296" => :mojave - sha256 "830016982e60870f50b3f6fc9a215d8cc4bda6061595f4883f7c11ab19ecba39" => :high_sierra - sha256 "21889ac6ed40c792f1b372b5aa0d6b3be1be86577a4c1b06b08569124d2d0da2" => :sierra - end - - def install - system "make", "PREFIX=#{prefix}", "ARGON2_VERSION=#{version}" - system "make", "test" - system "make", "install", "PREFIX=#{prefix}", "ARGON2_VERSION=#{version}" - 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 4bcd12d7fb525..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 "560e1829dce7113479d755380e0e65318a996f0d04d8e0761f24810e9e019e7d" => :catalina - sha256 "fb60d10ba68efda61d1dfdb161bcf9bfa0474c82b03e0579517cb10608aa9aea" => :mojave - sha256 "92532fafd8c2cc86b33de0f347496746d8049bb4d1a6ce0948148e0f3c4bca5a" => :high_sierra - sha256 "10627e72c0e0eb66cbd03a2beb767c06b8edad4bef01914de7f7c6c1be33a356" => :sierra - sha256 "798e6ddb78957f9ad33662287b5971aaf3a43f3646e84691d56b3b85ca06d47f" => :el_capitan - sha256 "c926ac0ad3b8dbb8c3e08299ade556470f81d3a88eb51dc60e7cfe107da533e8" => :yosemite - sha256 "789a73a54793c058ee419824d76d603562d56fe6c2bce37c6b5b47f8f0ddce2a" => :mavericks - 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 31c163e45e62b..0000000000000 --- a/Formula/argtable.rb +++ /dev/null @@ -1,50 +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 "29bfa5bfd7e897512347ecf664c3e3a9bbe7ec585115c09167ca8b6c312be9d6" => :catalina - 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 3aefe6c199e48..0000000000000 --- a/Formula/argus-clients.rb +++ /dev/null @@ -1,30 +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 4 - - bottle do - cellar :any - sha256 "579d10c6b410d1fe18fb653c6413a30ea04f8826f441094bcb944244e9dfdfd5" => :catalina - sha256 "ed00932e81d23c0a2cb872190088994a190967f4bbe8dc08e9f04212e6ede2e0" => :mojave - sha256 "3c231bbc8dccff67f8eadb490bb128bbf063e9200993d53d0306e1730ea0bc5e" => :high_sierra - sha256 "edfae9718df8bd3d4fe6225cca8170513638b1581234fffa8deaa5f9e228593d" => :sierra - end - - depends_on "geoip" - 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 6799e28b680d9..0000000000000 --- a/Formula/argus.rb +++ /dev/null @@ -1,27 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "8deffdef21a05cf61e3b134532439173966ec8748f1988c4048c3173d6788d2e" => :catalina - 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 c1f33dcd6cfb5..0000000000000 --- a/Formula/argyll-cms.rb +++ /dev/null @@ -1,53 +0,0 @@ -class ArgyllCms < Formula - desc "ICC compatible color management system" - homepage "https://www.argyllcms.com/" - url "https://www.argyllcms.com/Argyll_V2.1.2_src.zip" - sha256 "be378ca836b17b8684db05e9feaab138d711835ef00a04a76ac0ceacd386a3e3" - license "AGPL-3.0" - - bottle do - cellar :any - sha256 "242a8a56d37402e681d630d1df0702088df5555e367afb65469679aa96ee9f29" => :catalina - sha256 "6edcbef10d3f93d7f527cc875a35cb9c6bf636da03d6a1c548f560fcbca83866" => :mojave - sha256 "4b7bcbe2cd555d9606812afc676cab750c6f8bc4be54db0551bb2becefd176e0" => :high_sierra - end - - depends_on "jam" => :build - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - - conflicts_with "num-utils", :because => "both install `average` binaries" - - # Fixes calls to obj_msgSend, whose signature changed in macOS 10.15. - # Follows the advice in this blog post, which should be compatible - # with both older and newer versions of macOS. - # https://www.mikeash.com/pyblog/objc_msgsends-new-prototype.html - # Submitted upstream: https://www.freelists.org/post/argyllcms/Patch-Fix-macOS-build-failures-from-obj-msgSend-definition-change - patch do - url "https://www.freelists.org/archives/argyllcms/02-2020/bin7VecLntD2x.bin" - sha256 "fa86f5f21ed38bec6a20a79cefb78ef7254f6185ef33cac23e50bb1de87507a4" - end - - 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.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 11fe404b4b2b9..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.35.0/aria2-1.35.0.tar.xz" - sha256 "1e2b7fd08d6af228856e51c07173cfcf987528f1ac97e04c5af4a47642617dfd" - - bottle do - cellar :any - sha256 "9cc5e04be8b0a58d1f2b60b8abfc636168edbf23e7018003c40f1dd6952aab0c" => :catalina - sha256 "761836ac608eb0a59d4a6f6065860c0e809ce454692e0937d9d0d89ad47f3ce4" => :mojave - sha256 "70cc7566a23c283015368f92dfeaa0d119e53cfc7c1b2276a73ff9f6167b529d" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libssh2" - - uses_from_macos "libxml2" - uses_from_macos "zlib" - - on_linux do - depends_on "openssl@1.1" - end - - def install - ENV.cxx11 - - 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/arm-linux-gnueabihf-binutils.rb b/Formula/arm-linux-gnueabihf-binutils.rb deleted file mode 100644 index 4b5b1aa3850d6..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.34.tar.gz" - mirror "https://ftpmirror.gnu.org/binutils/binutils-2.34.tar.gz" - sha256 "53537d334820be13eeb8acb326d01c7c81418772d626715c7ae927a7d401cab3" - license "GPL-2.0" - - bottle do - sha256 "207a781d7d5cd45c18138b48c9187ba4315ef78f17d47aec5cf5438841920d6c" => :catalina - sha256 "347965a02495f6a03b2b3cd35c969c125e58b7cb0a81f7db64cb0ae296471281" => :mojave - sha256 "247a0b582523ad5a3af119b223ef17a04ed4cdcf37cee118d3a0971944f63e17" => :high_sierra - 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 28738eda88012..0000000000000 --- a/Formula/armadillo.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Armadillo < Formula - desc "C++ linear algebra library" - homepage "https://arma.sourceforge.io/" - url "https://downloads.sourceforge.net/project/arma/armadillo-9.900.1.tar.xz" - sha256 "53d7ad6124d06fdede8d839c091c649c794dae204666f1be0d30d7931737d635" - license "Apache-2.0" - revision 1 - - bottle do - cellar :any - sha256 "7156e7a27e68f66f8094ef8eaefa313fb1ad5e5502049cde144cc7769f947382" => :catalina - sha256 "2e25365969120174213486b48831df5c4983010f7c54e930fd1ba161290c8e7f" => :mojave - sha256 "a1d623dad547df9d07e01a48143b7922249a71a9b233d532ee8b7cefb7507d7d" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "arpack" - depends_on "hdf5" - depends_on "szip" - - def install - ENV.prepend "CXXFLAGS", "-DH5_USE_110_API -DH5Ovisit_vers=1" - - 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 shell_output("./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 6ccccbc39ebfc..0000000000000 --- a/Formula/armor.rb +++ /dev/null @@ -1,32 +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.14.tar.gz" - sha256 "bcaee0eaa1ef29ef439d5235b955516871c88d67c3ec5191e3421f65e364e4b8" - license "MIT" - head "https://github.com/labstack/armor.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d0bbf39148c0dabb28f777b951492814a708dc64610106587b1315fcd6a08559" => :catalina - sha256 "538f2c340ec151aa7c22847a61d3c8e1d255d121a2b2a75fe2fe7d22f5067347" => :mojave - sha256 "8fc3b2ebb6d8bc978f6dd04c92e2a43573b052e51d69398deb4f5a2b04e0f87d" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args, "-ldflags", "-s -w", "cmd/armor/main.go" - prefix.install_metafiles - end - - test do - port = free_port - fork do - exec "#{bin}/armor --port #{port}" - end - sleep 1 - assert_match /200 OK/, shell_output("curl -sI http://localhost:#{port}") - end -end diff --git a/Formula/arp-scan.rb b/Formula/arp-scan.rb deleted file mode 100644 index 361d7bff4f599..0000000000000 --- a/Formula/arp-scan.rb +++ /dev/null @@ -1,29 +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.7.tar.gz" - sha256 "e03c36e4933c655bd0e4a841272554a347cd0136faf42c4a6564059e0761c039" - license "GPL-3.0" - head "https://github.com/royhills/arp-scan.git" - - bottle do - sha256 "763b615392ea20ab1900bbc4a21fb0a9a978bbf50d3bbd8d5ff490437defc6f8" => :catalina - sha256 "178196ab4312319611ad02c8e086e56fec2217981f9d91d9e7df8cddfeacda4e" => :mojave - sha256 "f72f46496eecff4c1a86dbdbf3a295e195310827ef50cdc0b007bd7b6311495d" => :high_sierra - 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 053d2a6db89cf..0000000000000 --- a/Formula/arp-sk.rb +++ /dev/null @@ -1,33 +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" - revision 1 - - bottle do - cellar :any - sha256 "bc28c6d58a3838fac59ab625ab26a917b3b0282ac54a8f37a95034efd0740007" => :catalina - sha256 "cbe02395698a24f9f835b7cba4128a308a15beefda6ad7e79cfd38d73823cdc2" => :mojave - sha256 "67666cd80446c78b49deac3b8f2589ccbd140f32b739b662556a6dc7bda7b453" => :high_sierra - end - - 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.2" - - 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 bececb6a50c35..0000000000000 --- a/Formula/arpack.rb +++ /dev/null @@ -1,60 +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.7.0.tar.gz" - sha256 "972e3fc3cd0b9d6b5a737c9bf6fd07515c0d6549319d4ffb06970e64fa3cc2d6" - revision 5 - head "https://github.com/opencollab/arpack-ng.git" - - bottle do - cellar :any - sha256 "c4d53dfa06e56a05dfe6c53020a8c5d867b6cf9d0cc37de9b6debc80d1af0d44" => :catalina - sha256 "a5b2d5d34b7c9650d54b7985a4edf979e9c43ddc29830676f042c112f4025967" => :mojave - sha256 "152d4a439d8309460a8d2da947eb611aa5c6dd9fa77bba9afa2db60c09f807f4" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - depends_on "eigen" - depends_on "gcc" # for gfortran - depends_on "open-mpi" - depends_on "openblas" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{libexec} - --with-blas=-L#{Formula["openblas"].opt_lib}\ -lopenblas - F77=mpif77 - --enable-mpi - --enable-icb - --enable-icb-exmm - ] - - # Fix for GCC 10, remove with next version - # https://github.com/opencollab/arpack-ng/commit/ad82dcbc - args << "FFLAGS=-fallow-argument-mismatch" - - 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" - end - - test do - ENV.fortran - system ENV.fc, "-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/arping.rb b/Formula/arping.rb deleted file mode 100644 index a570525450455..0000000000000 --- a/Formula/arping.rb +++ /dev/null @@ -1,32 +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.21.tar.gz" - sha256 "7bf550571aa1d4a2b00878bb2f6fb857a09d30bf65411c90d62afcd86755bd81" - license "GPL-2.0" - revision 1 - - bottle do - cellar :any - sha256 "24cb6f161d06e9f2bc38d819a7d724d3f0d337f322cbb6e5b685118829e6cd32" => :catalina - sha256 "19a737592d390d0bdf06e03c1a49e22a2d9860e065153e1b84bd325fcfa7640c" => :mojave - sha256 "5019bb51a8cf372fd070b0b2686a3bbb2b7c262e2d39c8cae83d0c384971a82c" => :high_sierra - 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/arpoison.rb b/Formula/arpoison.rb deleted file mode 100644 index b80280d29394c..0000000000000 --- a/Formula/arpoison.rb +++ /dev/null @@ -1,27 +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" - revision 1 - - bottle do - cellar :any - sha256 "550588e02ce0eb78b47d2d2f9e8b863c29761667aca72e4ad0c0810b13682d9b" => :catalina - sha256 "c97bb55590119dbda338a24e634f9089bb3e43889a810a7bece231d6304b7bcf" => :mojave - sha256 "ee2eedf6780546bcf4610984d36a773300c5528122d08b7873b640a51f76ee56" => :high_sierra - 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 d461771e15766..0000000000000 --- a/Formula/arss.rb +++ /dev/null @@ -1,31 +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 "d84220ffc41768520239228b13a8466493682fa30a670163041caa0b06f449a2" => :catalina - 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 39f23dfc19297..0000000000000 --- a/Formula/artifactory.rb +++ /dev/null @@ -1,68 +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.20.1.zip" - sha256 "377b08e030b2cf2dc0fda594e5f20421176a4f0fea0785cc36bb0aade89a624a" - - bottle :unneeded - - depends_on "openjdk" - - 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 libexec/"bin/artifactory.sh" - # Memory Options - bin.install libexec/"bin/artifactory.default" - - bin.env_script_all_files libexec/"bin", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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 24f09ca864d9c..0000000000000 --- a/Formula/arx-libertatis.rb +++ /dev/null @@ -1,90 +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/ascii.rb b/Formula/ascii.rb deleted file mode 100644 index 1efc81b823014..0000000000000 --- a/Formula/ascii.rb +++ /dev/null @@ -1,33 +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 "2c106e2d3ce3534f09a5ce147f6fc0778e884d06f15e7c272ee99ccabaf947bd" => :catalina - sha256 "d5f4c8fe4ad1467c1708e49268a42f0d201f8c18ed912cf3de330bdf1f219cc1" => :mojave - sha256 "858e5bd8f55367349f936f47346a7d4dc2afed7c8f3d9fca16c42071f537f644" => :high_sierra - sha256 "52fb2a78a1409f4f6db0b59589f773c4427c87a84a7fee1809e5f0a4d50e4d65" => :sierra - sha256 "bbb5f365f96e42dfaa8af31f21daa8809b0a628451599fab7bc7509ceeb0d14f" => :el_capitan - sha256 "ab520ebbe64a946a0ac0466537a0e207e49cd85979e41582ab542dcaef9db3ff" => :yosemite - end - - head do - url "https://gitlab.com/esr/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 98a5fb76ac4a4..0000000000000 --- a/Formula/asciidoc.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Asciidoc < Formula - include Language::Python::Shebang - - desc "Formatter/translator for text files to numerous formats. Includes a2x" - homepage "https://asciidoc.org/" - url "https://github.com/asciidoc/asciidoc-py3/archive/9.0.1.tar.gz" - sha256 "73af9ee590b050e9f46ef85eb7756944dffdc9b3333e3e60c153a6e1f1de0ba5" - head "https://github.com/asciidoc/asciidoc-py3.git" - - bottle do - cellar :any_skip_relocation - sha256 "273f9046ed7f52aef9e2e858b785b66a79b3bd341c939c3d413d51c39915f66c" => :catalina - sha256 "273f9046ed7f52aef9e2e858b785b66a79b3bd341c939c3d413d51c39915f66c" => :mojave - sha256 "273f9046ed7f52aef9e2e858b785b66a79b3bd341c939c3d413d51c39915f66c" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "docbook-xsl" => :build - depends_on "docbook" - depends_on "python@3.8" - depends_on "source-highlight" - - uses_from_macos "libxml2" => :build - uses_from_macos "libxslt" => :build - - on_linux do - depends_on "xmlto" => :build - end - - def install - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" - - system "autoconf" - system "./configure", "--prefix=#{prefix}" - - %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 - ].map { |f| rewrite_shebang detected_python_shebang, f } - - # 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 a2e6b3aaee473..0000000000000 --- a/Formula/asciidoctor.rb +++ /dev/null @@ -1,175 +0,0 @@ -class Asciidoctor < Formula - desc "Text processor and publishing toolchain for AsciiDoc" - homepage "https://asciidoctor.org/" - url "https://github.com/asciidoctor/asciidoctor/archive/v2.0.10.tar.gz" - sha256 "afca74837e6d4b339535e8ba0b79f2ad00bd1eef78bf391cc36995ca2e31630a" - revision 1 - - depends_on "ruby" if MacOS.version <= :sierra - - bottle do - cellar :any_skip_relocation - sha256 "0a76a0014e0f52d35446749f04aa65e28cb148c689e148d412992e6e82adf8ac" => :catalina - sha256 "70d93211cdad629b023bd2aa74bfc6736378fc7740f9c2ccfc31ac327977f001" => :mojave - sha256 "a5bce7d4fc26dd7a56a80fc10a65f74966e294f2db2e2754f9bfabe95ffa605a" => :high_sierra - end - - resource "concurrent-ruby" do - url "https://rubygems.org/gems/concurrent-ruby-1.1.6.gem" - sha256 "14da21d5cfe9ccb02e9359b01cb7291e0167ded0ec805d4f3a4b2b4ffa418324" - end - - resource "pdf-core" do - url "https://rubygems.org/gems/pdf-core-0.7.0.gem" - sha256 "c1afdbb79edaf7c9fea69fd4b8d3b2c68eeb7203ce4db0e80be5392e20e394a6" - end - - resource "ttfunk" do - url "https://rubygems.org/downloads/ttfunk-1.5.1.gem" - sha256 "8da1c20cc9e010a4b083376e6ae6996c4aa517558420bb23d9a1d8a228b6f9d5" - end - - resource "prawn" do - url "https://rubygems.org/gems/prawn-2.2.2.gem" - sha256 "95284b761f0ea99334ef840ab85f577cfe2cc9448f769cc723843a6d7670b2e1" - end - - resource "prawn-icon" do - url "https://rubygems.org/gems/prawn-icon-2.5.0.gem" - sha256 "dc88129676707c983e914ca2d2f066fb244e946075ed933c8422b996916b73c7" - end - - resource "public_suffix" do - url "https://rubygems.org/gems/public_suffix-4.0.3.gem" - sha256 "87a9b64575e6d04a2e83882a2610470ea47132828c96650610b4c511b4c1d3b0" - end - - resource "addressable" do - url "https://rubygems.org/gems/addressable-2.7.0.gem" - sha256 "5e9b62fe1239091ea9b2893cd00ffe1bcbdd9371f4e1d35fac595c98c5856cbb" - end - - resource "css_parser" do - url "https://rubygems.org/gems/css_parser-1.7.1.gem" - sha256 "dc35cf9ea61daac68007b0ffb0d84fd3159013f546e13441c93297ca106d8411" - end - - resource "prawn-svg" do - url "https://rubygems.org/gems/prawn-svg-0.30.0.gem" - sha256 "e7d85c2b7c05427cfe9860c29db99ce9c935bd88158eb340e4b70fcf12a1c335" - end - - resource "prawn-table" do - url "https://rubygems.org/gems/prawn-table-0.2.2.gem" - sha256 "336d46e39e003f77bf973337a958af6a68300b941c85cb22288872dc2b36addb" - end - - resource "afm" do - url "https://rubygems.org/gems/afm-0.2.2.gem" - sha256 "c83e698e759ab0063331ff84ca39c4673b03318f4ddcbe8e90177dd01e4c721a" - end - - resource "Ascii85" do - url "https://rubygems.org/gems/Ascii85-1.0.3.gem" - sha256 "7ae3f2eb83ef5962016802caf0ce7db500c1cc25f385877f6ec64a29cfa8a818" - 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 "pdf-reader" do - url "https://rubygems.org/gems/pdf-reader-2.4.0.gem" - sha256 "de3968992d64c3fefe4e3976191cb4ab6d8a07e6926c67b684e50843aac86fbc" - end - - resource "prawn-templates" do - url "https://rubygems.org/gems/prawn-templates-0.1.2.gem" - sha256 "117aa03db570147cb86fcd7de4fd896994f702eada1d699848a9529a87cd31f1" - end - - resource "safe_yaml" do - url "https://rubygems.org/gems/safe_yaml-1.0.5.gem" - sha256 "a6ac2d64b7eb027bdeeca1851fe7e7af0d668e133e8a88066a0c6f7087d9f848" - end - - resource "thread_safe" do - url "https://rubygems.org/gems/thread_safe-0.3.6.gem" - sha256 "9ed7072821b51c57e8d6b7011a8e282e25aeea3a4065eab326e43f66f063b05a" - 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 - - resource "asciidoctor-pdf" do - url "https://rubygems.org/gems/asciidoctor-pdf-1.5.3.gem" - sha256 "3e70d0e513f4d631a4b667fed634700d93b104e0d3b4c33f993979df6a67d3f1" - end - - resource "coderay" do - url "https://rubygems.org/gems/coderay-1.1.2.gem" - sha256 "9efc1b3663fa561ccffada890bd1eec3a5466808ebc711ab1c5d300617d96a97" - end - - resource "rouge" do - url "https://rubygems.org/gems/rouge-3.17.0.gem" - sha256 "f98a2702deb1110a3603f9ff06e948ce1b348972965478f529d718a76e998776" - 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", "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 - (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/"asciidoctor", "-b", "html5", "-o", "test.html", "test.adoc" - assert_match "

AsciiDoc is Writing Zen

", 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 diff --git a/Formula/asciidoctorj.rb b/Formula/asciidoctorj.rb deleted file mode 100644 index fd53883b4c9e6..0000000000000 --- a/Formula/asciidoctorj.rb +++ /dev/null @@ -1,45 +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/2.3.1/asciidoctorj-2.3.1-bin.zip" - sha256 "8b5aa912d9106771359a3fa45ee35308ab538953c1db327394f4936ed609c386" - - bottle :unneeded - - depends_on "openjdk" - - def install - rm_rf 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/asciinema.rb b/Formula/asciinema.rb deleted file mode 100644 index 3dd3908c54ab6..0000000000000 --- a/Formula/asciinema.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Asciinema < Formula - include Language::Python::Virtualenv - - desc "Record and share terminal sessions" - homepage "https://asciinema.org/" - url "https://files.pythonhosted.org/packages/a7/71/771c859795e02c71c187546f34f7535487b97425bc1dad1e5f6ad2651357/asciinema-2.0.2.tar.gz" - sha256 "32f2c1a046564e030708e596f67e0405425d1eca9d5ec83cd917ef8da06bc423" - license "GPL-3.0" - revision 2 - head "https://github.com/asciinema/asciinema.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "4ac59de631594cea60621b45d85214e39a90a0ba8ddf4eeec5cba34bd6145711" => :catalina - sha256 "b395128b1d0825a1b0ab81c4238d0acf38f6edc2df2a1bcfcaf6658ba191900d" => :mojave - sha256 "1a941e2c0594a7c0a07c66f02c411e121ed2b3e869f3f015c6e69cb4fd92daba" => :high_sierra - end - - depends_on "python@3.8" - - def install - virtualenv_install_with_resources - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - output = shell_output("#{bin}/asciinema auth") - assert_match "Open the following URL in a web browser to link your install ID", output - end -end diff --git a/Formula/asciiquarium.rb b/Formula/asciiquarium.rb deleted file mode 100644 index ff0294dd9aceb..0000000000000 --- a/Formula/asciiquarium.rb +++ /dev/null @@ -1,69 +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 "9bf092861aad33c28e8f753d79032eb9af48521508dbee0a5ec6dc3646e6cc89" => :catalina - 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 afa301a2e7701..0000000000000 --- a/Formula/asciitex.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "4899775d92a5f26e4b8530823593e5819b8578c44a4537c949ee4e0f6f3d5614" => :catalina - sha256 "d5f864f9e6722d36da2e0412d4523a4977599c1229e3fb122bf4a0b29421c082" => :mojave - sha256 "28a1327d58e05b74df8382ce37595d8d80decaf5cdbac4739995bc53d9f30ef7" => :high_sierra - sha256 "9828783530514218f99ea7eabfad2031caeac979fac90cc9e049de4b4622fb80" => :sierra - sha256 "0ae267d7ffcf17769da97275af047dc2a4ba9e5086acdb53dd11ca41f3d40ddb" => :el_capitan - sha256 "e9eadc960e449db67f305c3e1cc8d4f025288967bb8b6a37f5ba4bf5ad58493d" => :yosemite - sha256 "31518a63d9b06f8e47ff57c5d6d22ca838abc2c1366d59db2bb8967971134d52" => :mavericks - 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 cc4f599aa5bff..0000000000000 --- a/Formula/asdf.rb +++ /dev/null @@ -1,35 +0,0 @@ -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/v0.7.8.tar.gz" - sha256 "6225d822a189ab02f88e2afa9f46c52cb876885ea21b56827e564f73c99369d3" - license "MIT" - 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@1.1" - depends_on "readline" - depends_on "unixodbc" - - conflicts_with "homeshick", - :because => "asdf and homeshick both install files in lib/commands" - - def install - bash_completion.install "completions/asdf.bash" - fish_completion.install "completions/asdf.fish" - zsh_completion.install "completions/_asdf" - libexec.install "bin/private" - prefix.install Dir["*"] - 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/asimov.rb b/Formula/asimov.rb deleted file mode 100644 index e2f6f5740ac82..0000000000000 --- a/Formula/asimov.rb +++ /dev/null @@ -1,40 +0,0 @@ -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/v0.3.0.tar.gz" - sha256 "77a0ef09c86d9d6ff146547902c749c43bc054f331a12ecb9992db9673469fab" - license "MIT" - head "https://github.com/stevegrunwell/asimov.git", :branch => "develop" - - bottle :unneeded - - def install - bin.install buildpath/"asimov" - end - - plist_options :startup => true, :manual => "asimov" - - # Asimov will run in the background on a daily basis - def plist - <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/asimov - StartInterval - - 86400 - - - EOS - end - - test do - assert_match "Finding dependency directories with corresponding definition files…", - shell_output("#{bin}/asimov") - end -end diff --git a/Formula/asio.rb b/Formula/asio.rb deleted file mode 100644 index 694a647d9c18e..0000000000000 --- a/Formula/asio.rb +++ /dev/null @@ -1,53 +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.16.1%20%28Stable%29/asio-1.16.1.tar.bz2" - sha256 "e271db76dbbcda9835ed1c9c94deb2ba3f4589c3ebcaa71d99ac694b8d62638c" - head "https://github.com/chriskohlhoff/asio.git" - - bottle do - cellar :any - sha256 "1c2a224aa3c62fdf4d6f80b54c3297e38992c53a25f977b2492c4de37848c34f" => :catalina - sha256 "aac238cdd1c834dace440c7dd42cd410bfc1908a62b0710ec54ef4e3b1100a40" => :mojave - sha256 "a25de24a946f9e0a28a4ed33271bb577a356997052ece5eaa46036f7f5863c1a" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "openssl@1.1" - - 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 = 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 1 - begin - assert_match /404 Not Found/, shell_output("curl http://127.0.0.1:#{port}") - 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 2db2dab5bf1aa..0000000000000 --- a/Formula/ask-cli.rb +++ /dev/null @@ -1,28 +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-2.11.2.tgz" - sha256 "57b9a94a63c1b2d2be63e2a374ee84f3e4bc5547e4430e14c47e72ec81f0ff76" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "475e6b8c27a3e451554884fe73148f0107409c034202fa85fbd0c9eb355198c8" => :catalina - sha256 "64d3f6577a7247cff4a0cbe9123f2e966f8dfddcf4e0b58b0b925642d6953ea6" => :mojave - sha256 "d4b5c2f5efd7b4093a41d6699a3baba81484ae1b728e3bc86d79b16c7b96056c" => :high_sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.write_exec_script libexec/"bin/ask" - end - - test do - output = shell_output("#{bin}/ask deploy 2>&1", 1) - assert_match "[Error]: CliFileNotFoundError: File #{testpath}/.ask/cli_config not exists.", output - end -end diff --git a/Formula/asn1c.rb b/Formula/asn1c.rb deleted file mode 100644 index 50b0cb0c5e879..0000000000000 --- a/Formula/asn1c.rb +++ /dev/null @@ -1,52 +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 "3a3f6f82a118d66043522ec62a31b34c9074193e43b7cda483c13b98aab35d2a" => :catalina - 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 a6267854f3865..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" - license "MIT" - revision 1 - - bottle do - sha256 "0196b40592cf41eee37dded4519dbf4fea99df6f1eee4a93922a6dfde7e9eedd" => :catalina - 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" - - 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 7a19be4e2c5b7..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.5.jar" - sha256 "335820a6772587873dfdcc614a772ecbb4731b4ffb99eb8ad953cde39f9cf825" - - 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/assh.rb b/Formula/assh.rb deleted file mode 100644 index 0bcd742557c22..0000000000000 --- a/Formula/assh.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Assh < Formula - desc "Advanced SSH config - Regex, aliases, gateways, includes and dynamic hosts" - homepage "https://manfred.life/assh" - url "https://github.com/moul/assh/archive/v2.10.0.tar.gz" - sha256 "7cc2ff54c5fc04d2b5cbe0b073ef2fef112e5b3ef9185408b708625e572c83c1" - license "MIT" - head "https://github.com/moul/assh.git" - - bottle do - cellar :any_skip_relocation - sha256 "e12956db15a33133390f2317143315710f6692aad3e5b36fafa3934e43ab3241" => :catalina - sha256 "2507b79a656698c02c1fb678ebe280ba44326a9f8ec17d4fd355a3843b60253b" => :mojave - sha256 "359270a9985af3faba8cfe637027d2a4d44ed3b0ce129bd5eb22354eb000bf45" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"assh" - prefix.install_metafiles - end - - test do - assh_config = testpath/"assh.yml" - assh_config.write <<~EOS - hosts: - hosta: - Hostname: 127.0.0.1 - asshknownhostfile: /dev/null - EOS - - 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/assimp.rb b/Formula/assimp.rb deleted file mode 100644 index 43596275fefbc..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 "https://www.assimp.org/" - url "https://github.com/assimp/assimp/archive/v5.0.1.tar.gz" - sha256 "11310ec1f2ad2cd46b95ba88faca8f7aaa1efe9aa12605c55e3de2b977b3dbfc" - head "https://github.com/assimp/assimp.git" - - bottle do - cellar :any - sha256 "f049baf0e3bc3941e8449dbfbc997d0448b0a1722bfdceadb69b2eacc48e3464" => :catalina - sha256 "620f5f399783c487ae78077da65b65f6a0c81dce23768ae56eb1edd383a57daa" => :mojave - sha256 "6dffc67ca984f5870bdc09a1c0adbb3c0d2209c7fb8169e2204c4c2d2d44aebe" => :high_sierra - end - - depends_on "cmake" => :build - - uses_from_macos "zlib" - - # 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, "-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/astrometry-net.rb b/Formula/astrometry-net.rb deleted file mode 100644 index fd61ddf69444d..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.80/astrometry.net-0.80.tar.gz" - sha256 "6eb73c2371df30324d6532955c46d5f324f2aad87f1af67c12f9354cfd4a7864" - license "BSD-3-Clause" - revision 3 - - bottle do - cellar :any - sha256 "570d6f95597ff292819943648ce9fe2c23b93cb48b6cb91546269a50e0a8456e" => :catalina - sha256 "c1bb1942e65902e00ba2cf4ecc155bdc822efe3fd14f3c7ec1067c599af1236e" => :mojave - sha256 "214f90c3dba8b41f7a947c3386d97a9d09d751f1f3bf34595f1cfb0660a300ad" => :high_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@3.8" - depends_on "wcslib" - - resource "fitsio" do - url "https://files.pythonhosted.org/packages/5e/d7/58ef112ec42a23a866351b09f802e1b1fa6967ac01df0c9f3ea5ee8223ce/fitsio-1.1.2.tar.gz" - sha256 "20e689bdbb8cbf5fc6c4a1f7154e7407ed1aa68e2d045e3e2cd814f57d85002f" - 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"] = Formula["python@3.8"].opt_bin/"python3" - - venv = virtualenv_create(libexec, Formula["python@3.8"].opt_bin/"python3") - venv.pip_install resources - - ENV["INSTALL_DIR"] = prefix - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV["PY_BASE_INSTALL_DIR"] = libexec/"lib/python#{xy}/site-packages/astrometry" - ENV["PY_BASE_LINK_DIR"] = libexec/"lib/python#{xy}/site-packages/astrometry" - ENV["PYTHON_SCRIPT"] = libexec/"bin/python3" - - 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", "." - 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 3ee796bde520a..0000000000000 --- a/Formula/astyle.rb +++ /dev/null @@ -1,36 +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" - license "MIT" - head "https://svn.code.sf.net/p/astyle/code/trunk/AStyle" - - bottle do - cellar :any_skip_relocation - sha256 "8bffda383a58eb65c458e00a9cc7dcb3b852a1b5e89a830df7e6eeb594a92f3c" => :catalina - 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/asuka.rb b/Formula/asuka.rb deleted file mode 100644 index f4ed76609c83c..0000000000000 --- a/Formula/asuka.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Asuka < Formula - desc "Gemini Project client written in Rust with NCurses" - homepage "https://git.sr.ht/~julienxx/asuka" - url "https://git.sr.ht/~julienxx/asuka/archive/0.8.1.tar.gz" - sha256 "06b03e9595b5b84e46e860ea2cf1103b244b3908fabf30337fcdf1db2a06281e" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "6c71e20910385795758563119bf66206b6507fc83a6ed70f39872e45acc47415" => :catalina - sha256 "8143fc7187b559648f9c7e1f8c53a6f6c9dcee316ba623480abbe1fa6ccef90d" => :mojave - sha256 "1b483ae24e861978bcc9487794ffb27a79edbbcb0a1821b24b9e62b5ee3c9c0e" => :high_sierra - end - - depends_on "rust" => :build - - uses_from_macos "ncurses" - - on_linux do - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - 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 = (testpath/"screenlog.txt").read - assert_match /# Project Gemini/, screenlog - assert_match /Gemini is a new internet protocol/, screenlog - ensure - Process.kill("TERM", wait_thr.pid) - end -end diff --git a/Formula/asymptote.rb b/Formula/asymptote.rb deleted file mode 100644 index d59a3f86d2a93..0000000000000 --- a/Formula/asymptote.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Asymptote < Formula - desc "Powerful descriptive vector graphics language" - homepage "https://asymptote.sourceforge.io/" - url "https://downloads.sourceforge.net/project/asymptote/2.66/asymptote-2.66.src.tgz" - sha256 "a2605bdec8cbf3f87b84f51860abeb7e5c1073572a54f5489d124b8786d84cd0" - license "GPL-3.0" - - bottle do - sha256 "dc6d4f13df8030bb0cd0040cd6372af6f0bd7b94cb369821b73d5cb3d996b91f" => :catalina - sha256 "1c2d88dfbe123512db773d1499a8e21d4c759ce72099ce02c30f7f46be8a3b41" => :mojave - sha256 "2314a6f120bdeef1e01083c501edc4d5519cf6e0e4ebe805bb3dc6f17bc7c66c" => :high_sierra - end - - depends_on "glm" => :build - depends_on "fftw" - depends_on "ghostscript" - depends_on "gsl" - - resource "manual" do - url "https://downloads.sourceforge.net/project/asymptote/2.65/asymptote.pdf" - sha256 "9a3aafacab8e09ca677972321d04c3fe9a335adad960e5f22ab30ab5fb82b705" - end - - def install - system "./configure", "--prefix=#{prefix}" - - # Avoid use of MacTeX with these commands - # (instead of `make all && make install`) - touch buildpath/"doc/asy-latex.pdf" - system "make", "asy" - system "make", "asy-keywords.el" - system "make", "install-asy" - - doc.install resource("manual") - (share/"emacs/site-lisp").install_symlink pkgshare - 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_predicate testpath/"line.pdf", :exist? - end -end diff --git a/Formula/asyncplusplus.rb b/Formula/asyncplusplus.rb deleted file mode 100644 index 7df38680dfbda..0000000000000 --- a/Formula/asyncplusplus.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Asyncplusplus < Formula - desc "Concurrency framework for C++11" - homepage "https://github.com/Amanieu/asyncplusplus" - url "https://github.com/Amanieu/asyncplusplus/archive/v1.1.tar.gz" - sha256 "d160d3a433a1e08f51c785742843182c2b81a7bc872766f57bf5f3108377b858" - license "MIT" - - bottle do - cellar :any - sha256 "8116d1e5d9aefd7de88cb70633fdc91181460f7f0279bcc356f8d020a590510b" => :catalina - sha256 "805297c643ba0c1fe0d774ea606f6e0925112b1a364b74122c877d51f1e729fb" => :mojave - sha256 "ac6212a38c5aa391ee1eb547879615437a830967444deb15674e748c63f0b5b1" => :high_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 - #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 " << r << std::endl; - } - EOS - system ENV.cxx, "-I#{include}", "-L#{lib}", "-lasync++", "--std=c++11", "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/atari800.rb b/Formula/atari800.rb deleted file mode 100644 index 34e78cde3e211..0000000000000 --- a/Formula/atari800.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Atari800 < Formula - desc "Atari 8-bit machine emulator" - homepage "https://atari800.github.io/" - url "https://github.com/atari800/atari800/releases/download/ATARI800_4_2_0/atari800-4.2.0-src.tgz" - sha256 "55cb5568229c415f1782130afd11df88c03bb6d81fa4aa60a4ac8a2f151f1359" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "5bc2d96418e21a76809abfa2513f630cb207848b0894f27cda34b2f55bace81c" => :catalina - sha256 "f5508c8a0021a0fcbd1e35d7a4313d8c9ba52ab937d0fde59ccc5f81e3c49ac0" => :mojave - sha256 "497ce17afc99e76180b94b76b08c1aca973eab554ee3ccecfd14818c71e97035" => :high_sierra - end - - depends_on "libpng" - depends_on "sdl" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-sdltest", - "--disable-riodevice" - 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/atasm.rb b/Formula/atasm.rb deleted file mode 100644 index a23220b54c45b..0000000000000 --- a/Formula/atasm.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Atasm < Formula - desc "Atari MAC/65 compatible assembler for Unix" - homepage "https://atari.miribilist.com/atasm/" - url "https://atari.miribilist.com/atasm/atasm107d.zip" - version "1.07d" - sha256 "24a165506346029fbe05ed99b22900ae50f91f5a8c5d38ebad6a92a5c53f3d99" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "8f142806b05036e541ef3fec3009d481423f451cbcd99e6be68ae5095cfa205e" => :catalina - sha256 "7a2437b5a0adf8047fc75a20fb669d2d80b15d261eab0ec0ad5c7d74b9123a2b" => :mojave - sha256 "b9eb26201949590ab8fce80ee3feabe7f0be2f611e7c60b6b456c8d78480680c" => :high_sierra - end - - uses_from_macos "zlib" - - def install - cd "src" do - system "make", "prog" - bin.install "atasm" - system "sed -e 's,%%DOCDIR%%,/usr/local/share/doc/atasm,g' < atasm.1.in > atasm.1" - man1.install "atasm.1" - end - doc.install "examples" - end - - test do - cd "#{doc}/examples" do - system "#{bin}/atasm", "-v", "test.m65", "-o/tmp/test.bin" - end - end -end diff --git a/Formula/atdtool.rb b/Formula/atdtool.rb deleted file mode 100644 index 42ed59943eb85..0000000000000 --- a/Formula/atdtool.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Atdtool < Formula - include Language::Python::Virtualenv - - desc "Command-line interface for After the Deadline language checker" - homepage "https://github.com/lpenz/atdtool" - url "https://files.pythonhosted.org/packages/83/d1/55150f2dd9afda92e2f0dcb697d6f555f8b1f578f1df4d685371e8b81089/atdtool-1.3.3.tar.gz" - sha256 "a83f50e7705c65e7ba5bc339f1a0624151bba9f7cdec7fb1460bb23e9a02dab9" - revision 3 - - bottle do - cellar :any_skip_relocation - sha256 "f02a78aa9dbb19e8ca8670a6890f3d51949d014e6890ba5039fd9695bc1f46ce" => :catalina - sha256 "17b2ed63f8b4f8aa53e367572b53344fa3e6fa8569e5a9fb48f3a0d5257d04cc" => :mojave - sha256 "0f301757a596e02344c15171a834557e19e4c4145fd440cd9e960b72993e459a" => :high_sierra - end - - depends_on "python@3.8" - - def install - virtualenv_install_with_resources - end - - test do - system "#{bin}/atdtool", "--help" - end -end diff --git a/Formula/aterm.rb b/Formula/aterm.rb deleted file mode 100644 index 2f03ab05c4d25..0000000000000 --- a/Formula/aterm.rb +++ /dev/null @@ -1,40 +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 "9327ff2d137e5b01bc82a936c99bd844d29b03dc1043f9f241846564b2c78a96" => :catalina - 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 68579525ffc46..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 "39570850845a8c01f2ce167fec23284fc6172c816a9d5806b9c9034448d5a0a3" => :catalina - sha256 "c8e2c7b3d06d8c84409ef21b12201803113244d668eb092decf073fc5066fdab" => :mojave - sha256 "034a9f29ce63bd5cd019b957bc544a3129df7ec3872453f57f24914dce1f2da8" => :high_sierra - sha256 "a58333135e72fa1817c0411f3801615780c4346347d73d25ddec6eca6b213c41" => :sierra - sha256 "74493d4b4868628a7a84338eb28ecfce8afdd896962f3ba632b1e785def48737" => :el_capitan - sha256 "e4caa0498d0caf2e99e0eea9ae9269240e4f4a49a41f712cf6a730fab8d72672" => :yosemite - sha256 "240443a1a96ba8ed51ac7b263749f69013f05d42eb84018824791e419a6d5e81" => :mavericks - 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 2510b911e6ee4..0000000000000 --- a/Formula/atk.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Atk < Formula - desc "GNOME accessibility toolkit" - homepage "https://library.gnome.org/devel/atk/" - url "https://download.gnome.org/sources/atk/2.36/atk-2.36.0.tar.xz" - sha256 "fb76247e369402be23f1f5c65d38a9639c1164d934e40f6a9cf3c9e96b652788" - - bottle do - cellar :any - sha256 "1065293046ab2984940dfa0b9c9e724439838e63f685c932d508ccd74bcf921b" => :catalina - sha256 "68c7b621339c03964036877987db69806f663612ba275e68554a97d218a2b5b4" => :mojave - sha256 "fa8f525bfeacab676f795bac37f622fc100e63c9e9661fbd6ddd3e1725ebd097" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "glib" - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - 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 diff --git a/Formula/atkmm.rb b/Formula/atkmm.rb deleted file mode 100644 index 0de2ec1aa09fd..0000000000000 --- a/Formula/atkmm.rb +++ /dev/null @@ -1,68 +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.28/atkmm-2.28.0.tar.xz" - sha256 "4c4cfc917fd42d3879ce997b463428d6982affa0fb660cafcc0bc2d9afcedd3a" - revision 2 - - bottle do - cellar :any - sha256 "65dca5000702ffcabc191ed84c33cef365056f4c853c8630a094c6e917b5e6c7" => :catalina - sha256 "41fa55c1a359635acac27990de9ef7d4c84c6e45f43b54b4fecd0c85010d5ed0" => :mojave - sha256 "cc4325eb5abdb8248ea4d4ec36f5ab37abfce03459034c700b92cfaa757392e8" => :high_sierra - sha256 "918691593ee2144c7aae041f3f83a3f961af0408329b69907a893669f267f5b1" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "atk" - depends_on "glibmm" - - 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++@2"] - 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/atlantis.rb b/Formula/atlantis.rb deleted file mode 100644 index ebc28c50f1303..0000000000000 --- a/Formula/atlantis.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Atlantis < Formula - desc "Terraform Pull Request Automation tool" - homepage "https://www.runatlantis.io/" - url "https://github.com/runatlantis/atlantis/archive/v0.14.0.tar.gz" - sha256 "32e24f4d341be578137f74385c9c97dd10461d260e23c77ed84298c578ec39e6" - - bottle do - cellar :any_skip_relocation - sha256 "f7ffb292c19d036fe0d8768b2e7954d7d4b7b3511065bb1673db626c0fe06107" => :catalina - sha256 "5e4c66b514ff450a0161a5e3792b4a1ba0498b29c4fcaf9422f246f454955030" => :mojave - sha256 "b8d781f0ae4913a2a7b84ffc01c524528c536547bc219fd55a11b4db49ffe898" => :high_sierra - end - - depends_on "go" => :build - depends_on "terraform" - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"atlantis" - end - - test do - system bin/"atlantis", "version" - port = free_port - loglevel = "info" - gh_args = "--gh-user INVALID --gh-token INVALID --gh-webhook-secret INVALID --repo-whitelist INVALID" - command = bin/"atlantis server --atlantis-url http://invalid/ --port #{port} #{gh_args} --log-level #{loglevel}" - pid = Process.spawn(command) - system "sleep", "5" - output = `curl -vk# 'http://localhost/#{port}/' 2>&1` - assert_match %r{HTTP/1.1 200 OK}m, output - assert_match "atlantis", output - Process.kill("TERM", pid) - end -end diff --git a/Formula/atlassian-cli.rb b/Formula/atlassian-cli.rb deleted file mode 100644 index d2a9c18997b23..0000000000000 --- a/Formula/atlassian-cli.rb +++ /dev/null @@ -1,23 +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-9.3.0-distribution.zip" - sha256 "5d6c3fd45b9ea25c8826c0d3dbeae51ab914ffae2fc38325b8ef15d3f36fbb83" - - bottle :unneeded - - depends_on "openjdk" - - def install - inreplace "acli.sh" do |s| - s.sub! "`find \"$directory/lib\" -name acli-*.jar`", "'#{share}/lib/acli-#{version}.jar'" - s.sub! "java", "'#{Formula["openjdk"].opt_bin}/java'" - end - bin.install "acli.sh" => "acli" - share.install "lib", "license" - end - - test do - assert_match "Welcome to the Bob Swift Atlassian CLI", shell_output("#{bin}/acli --help 2>&1 | head") - end -end diff --git a/Formula/atomicparsley.rb b/Formula/atomicparsley.rb deleted file mode 100644 index dc6bc72f94a9c..0000000000000 --- a/Formula/atomicparsley.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Atomicparsley < Formula - desc "MPEG-4 command-line tool" - homepage "https://github.com/wez/atomicparsley" - url "https://github.com/wez/atomicparsley/archive/20200701.154658.b0d6223.tar.gz" - version "20200701.154658.b0d6223" - sha256 "52f11dc0cbd8964fcdaf019bfada2102f9ee716a1d480cd43ae5925b4361c834" - version_scheme 1 - head "https://github.com/wez/atomicparsley.git" - - bottle do - cellar :any_skip_relocation - sha256 "6bc22e04f5d2863e73010606d823eb0768d637165d190d3889db3780bbbb724c" => :catalina - sha256 "204e206047f48cdffef4fa91f81dbce6db370f002dd883000798d91f2916c391" => :mojave - sha256 "ce2509fe2cc72c18b6b82c9df5e802e2503f61ebf841833618a974ac21fc92c3" => :high_sierra - end - - depends_on "cmake" => :build - uses_from_macos "zlib" - - def install - system "cmake", ".", *std_cmake_args - system "cmake", "--build", ".", "--config", "Release" - bin.install "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/atomist-cli.rb b/Formula/atomist-cli.rb deleted file mode 100644 index 1e643c2cf6fc6..0000000000000 --- a/Formula/atomist-cli.rb +++ /dev/null @@ -1,44 +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.8.0.tgz" - sha256 "64bcc7484fa2f1b7172984c278ae928450149fb02b750f79454b1a6683d17f62" - license "Apache-2.0" - - bottle do - sha256 "9682c4b3bcc11581ade4335bf5c4d4b4d2c1fbd141f8677aee8b399d5573ab0a" => :catalina - sha256 "a1f611e6f70a5dbdf886c6cf0a2aec9d6024a12e2e768e1f0230087babe7b3d6" => :mojave - sha256 "f109033a8fa80bcf777e053dfae07b84fd134c40d1ed356dbedddfad1e7b85f8" => :high_sierra - sha256 "314c7129a7b8f2e37ab46324dba4423c8c7712b99f1bd8f0dd5eb5904d9d3e3e" => :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", 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 05762ef6db31e..0000000000000 --- a/Formula/atool.rb +++ /dev/null @@ -1,36 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "78769c7244232e9ba4b403f0dae560e61bc69d08d76936e9797c3f9b18b778f3" => :catalina - 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 5f8d3548d8b3d..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.4.0/ATS2-Postiats-0.4.0.tgz" - sha256 "a749b62d429eda45ec304075f1743e1a2638c4772d37b579839d7797470869c0" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "e4b7bf748d9ad11c38273dd2fc11d273c8f02a1702778ef368307c57f1b4f402" => :catalina - sha256 "d86462909117de7a2a09d0816df8909c5d0b6cba14f24932612f4c3c54734453" => :mojave - sha256 "c787afdba7391ce0aa745938259f3dc79e8b97d0842daa378de854def8c4a9bd" => :high_sierra - 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 b606c5b968e77..0000000000000 --- a/Formula/aubio.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Aubio < Formula - desc "Extract annotations from audio signals" - homepage "https://aubio.org/" - url "https://aubio.org/pub/aubio-0.4.9.tar.bz2" - sha256 "d48282ae4dab83b3dc94c16cf011bcb63835c1c02b515490e1883049c3d1f3da" - revision 1 - - bottle do - cellar :any - sha256 "933eeaef88547341ec684e7aa422dc92e6864a06caa211d8d988608da577a4b1" => :catalina - sha256 "0680687b55f8de23fde5c71d0dd1767552ef87642dba588ce572de441029c493" => :mojave - sha256 "e98d68d3cb9a8576990b5c3ba75a2b7acb71e4f3196365a0c560878ab5258141" => :high_sierra - end - - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "numpy" - depends_on "python@3.8" - - def install - # Needed due to issue with recent clang (-fno-fused-madd)) - ENV.refurbish_args - - system Formula["python@3.8"].opt_bin/"python3", "./waf", "configure", "--prefix=#{prefix}" - system Formula["python@3.8"].opt_bin/"python3", "./waf", "build" - system Formula["python@3.8"].opt_bin/"python3", "./waf", "install" - - system Formula["python@3.8"].opt_bin/"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 95654dd0de244..0000000000000 --- a/Formula/audacious.rb +++ /dev/null @@ -1,99 +0,0 @@ -class Audacious < Formula - desc "Free and advanced audio player based on GTK+" - homepage "https://audacious-media-player.org/" - - stable do - url "https://distfiles.audacious-media-player.org/audacious-4.0.4.tar.bz2" - sha256 "27fae151760cc65193f31224d5ba08fe9f52d2c31b9a688e8a5468b97f7c95bf" - - resource "plugins" do - url "https://distfiles.audacious-media-player.org/audacious-plugins-4.0.3.tar.bz2" - sha256 "e2a88f5cac3efe03eedbb8d320ca1bb9300788ce66056d2ceba60eb00f8aef97" - end - end - - bottle do - sha256 "d2fd050bf99b329e07760de55c5bdc6d6ff9d6d6f10d1db38eff53ea8185afe3" => :catalina - sha256 "3ccfca8a0ed60497ea19d8d489a83b83f590e8808adf9adf9a025736f43658ee" => :mojave - sha256 "668b915f68a967ba75194c532d558a197903494ebf48170c96ece4783d7cdf08" => :high_sierra - 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 "libmodplug" - depends_on "libnotify" - depends_on "libopenmpt" - depends_on "libsamplerate" - depends_on "libsoxr" - depends_on "libvorbis" - depends_on :macos # Due to Python 2 - depends_on "mpg123" - depends_on "neon" - depends_on "qt" - depends_on "sdl2" - depends_on "wavpack" - - def install - args = %W[ - --prefix=#{prefix} - --disable-dbus - --disable-gtk - --enable-qt - ] - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make" - system "make", "install" - - resource("plugins").stage do - args += %w[ - --disable-coreaudio - --disable-mpris2 - --enable-mac-media-keys - ] - inreplace "src/glspectrum/gl-spectrum.cc", "#include :catalina - sha256 "b3f405c20f331ae6ded75f702bd68e45994c3c81eaf23abf650233859a830769" => :mojave - sha256 "daf0e362bb9e6c4fb3e6e04b0309a975d94893e5240bf394038693b9b1a2a024" => :high_sierra - 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-5.debian.tar.xz" - sha256 "7ae94516b5bfea75031c5bab1e9cccf6a25dd438f1eda40bb601b8ee85a07daa" - 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 8947874a906a4..0000000000000 --- a/Formula/auditbeat.rb +++ /dev/null @@ -1,118 +0,0 @@ -class Auditbeat < Formula - desc "Lightweight Shipper for Audit Data" - homepage "https://www.elastic.co/products/beats/auditbeat" - url "https://github.com/elastic/beats.git", - :tag => "v7.8.0", - :revision => "f79387d32717d79f689d94fda1ec80b2cf285d30" - head "https://github.com/elastic/beats.git" - - bottle do - cellar :any_skip_relocation - sha256 "2d5cb46d59d32b2f4302867d504933c401c1ddd2787d89bda5d385cea5bd8263" => :catalina - sha256 "55b5055876ee109beabeb715a8dcb41b3e4d8f399aadea0c72054bde3f707c18" => :mojave - sha256 "269436cb630bcfc3a43ca0556e7e46250d58e3bc37e37858b9c16d2e70736ba0" => :high_sierra - end - - depends_on "go" => :build - depends_on "python@3.8" => :build - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz" - sha256 "02f8102c2436bb03b3ee6dede1919d1dac8a427541652e5ec95171ec8adbc93a" - end - - def install - # remove non open source files - rm_rf "x-pack" - - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/elastic/beats").install buildpath.children - - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python#{xy}/site-packages" - - resource("virtualenv").stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(buildpath/"vendor") - end - - ENV.prepend_path "PATH", buildpath/"vendor/bin" # for virtualenv - ENV.prepend_path "PATH", buildpath/"bin" # for mage (build tool) - - cd "src/github.com/elastic/beats/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 "make", "mage" - # prevent downloading binary wheels during python setup - system "make", "PIP_INSTALL_COMMANDS=--no-binary :all", "python-env" - system "mage", "-v", "build" - system "mage", "-v", "update" - - (etc/"auditbeat").install Dir["auditbeat.*", "fields.yml"] - (libexec/"bin").install "auditbeat" - prefix.install "build/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 - fork do - exec "#{bin}/auditbeat", "-path.config", testpath/"config", "-path.data", testpath/"data" - end - sleep 5 - touch testpath/"files/touch" - sleep 30 - s = IO.readlines(testpath/"auditbeat/auditbeat").last(1)[0] - assert_match /"action":\["(initial_scan|created)"\]/, s - realdirpath = File.realdirpath(testpath) - assert_match "\"path\":\"#{realdirpath}/files/touch\"", s - end -end diff --git a/Formula/augeas.rb b/Formula/augeas.rb deleted file mode 100644 index 5744b49ec4fac..0000000000000 --- a/Formula/augeas.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Augeas < Formula - desc "Configuration editing tool and API" - homepage "https://augeas.net/" - url "http://download.augeas.net/augeas-1.12.0.tar.gz" - sha256 "321942c9cc32185e2e9cb72d0a70eea106635b50269075aca6714e3ec282cb87" - license "LGPL-2.1" - - bottle do - sha256 "00a45b8b446df0a95c2c45cbe608410df2d7be7787247f4b3a8fc1c2c19b41b6" => :catalina - sha256 "9a561491e3574dfe2cfe7da2a618c12d02218f88f760de46722d9b603e4f27ba" => :mojave - sha256 "0e1477f692cf67442dfcaf7c20a24733838df072ec867f59322070a7eaf3f925" => :high_sierra - sha256 "55b3fab93f2ec4a703dc2bb3b3d58c47375456bdb5f0308e0856b231d309c02d" => :sierra - 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" - - uses_from_macos "libxml2" - - 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 2ed13a7342aeb..0000000000000 --- a/Formula/augustus.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Augustus < Formula - desc "Predict genes in eukaryotic genomic sequences" - homepage "https://bioinf.uni-greifswald.de/augustus/" - url "https://github.com/Gaius-Augustus/Augustus/releases/download/v3.3.3/augustus-3.3.3.tar.gz" - sha256 "4cc4d32074b18a8b7f853ebaa7c9bef80083b38277f8afb4d33c755be66b7140" - revision 1 - head "https://github.com/Gaius-Augustus/Augustus.git" - - bottle do - cellar :any - sha256 "9e6fc1d57f48cf314fa418059a9d619a8451d7e65ed8234225e52f311673cf6d" => :catalina - sha256 "476eeca3de3f98c4e539cee89078a3f37f667ae7f47ef375115439154bc23e3c" => :mojave - sha256 "b5077e94d1ee68864ed0d89bfc892ad80dcd37b89e149b23733bd9280d54771b" => :high_sierra - end - - depends_on "boost" => :build - depends_on "bamtools" - depends_on "gcc" - - 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" - - # Clang breaks proteinprofile on macOS. This issue has been first reported - # to upstream in 2016 (see https://github.com/nextgenusfs/funannotate/issues/3). - # See also https://github.com/Gaius-Augustus/Augustus/issues/64 - cd "src" do - with_env("HOMEBREW_CC" => Formula["gcc"].opt_bin/"gcc-#{Formula["gcc"].version_suffix}") do - system "make" - end - end - - system "make" - system "make", "install", "INSTALLDIR=#{prefix}" - 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/aurora-cli.rb b/Formula/aurora-cli.rb deleted file mode 100644 index b2fb8ee42df31..0000000000000 --- a/Formula/aurora-cli.rb +++ /dev/null @@ -1,46 +0,0 @@ -class AuroraCli < Formula - desc "Apache Aurora Scheduler Client" - homepage "https://aurora.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=aurora/0.22.0/apache-aurora-0.22.0.tar.gz" - mirror "https://archive.apache.org/dist/aurora/0.22.0/apache-aurora-0.22.0.tar.gz" - sha256 "d3c20a09dcc62cac98cb83889099e845ce48a1727ca562d80b9a9274da2cfa12" - - bottle do - cellar :any_skip_relocation - sha256 "b3b61ca0da323c10be32bfb19af28a48b7cf393729076c3ce6608c69d79bff7d" => :catalina - sha256 "4aec30f08b06a40ec584c4c570181e5e04909009e4bc8ce2d18f84a0e282629d" => :mojave - sha256 "0a1b506e5d75c9fa8d587bfc9945e78c9cb5342c17a4062d18aafb942e111eca" => :high_sierra - end - - depends_on "python@3.7" - - # Does not build on catalina anymore - # Has been moved to the appache attic: https://github.com/apache/attic-aurora - disable! - - 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 e2d86805ea635..0000000000000 --- a/Formula/aurora.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Aurora < Formula - desc "Beanstalkd queue server console" - homepage "https://xuri.me/aurora" - url "https://github.com/xuri/aurora/archive/2.2.tar.gz" - sha256 "90ac08b7c960aa24ee0c8e60759e398ef205f5b48c2293dd81d9c2f17b24ca42" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "f3b45006b5b5c6f15166d11d1a740fb14f3b22c1d64b3b64397ed2958e9c882d" => :catalina - sha256 "21abebb582fbac2ebb400328b455c890206f78ae0910f75ded8019bfc6a40c1f" => :mojave - sha256 "e3e9b06b4b9053afb4b75b48d90555d00fcc8404309d8b2b2b336538810746cb" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"aurora" - prefix.install_metafiles - end - - test do - assert_match version.to_s, shell_output("#{bin}/aurora -v") - end -end diff --git a/Formula/austin.rb b/Formula/austin.rb deleted file mode 100644 index 05b66f2108e87..0000000000000 --- a/Formula/austin.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Austin < Formula - desc "Python frame stack sampler for CPython" - homepage "https://github.com/P403n1x87/austin" - url "https://github.com/P403n1x87/austin/archive/v1.0.1.tar.gz" - sha256 "f86804f777f2f466ddede5d530d3ca67582b2a1467d000662d81272d6e9c5639" - - head "https://github.com/P403n1x87/austin.git" - - bottle do - cellar :any_skip_relocation - sha256 "d54d25854d57ba21937ee4cf57bf9948f084e38afb19723150c787e2742697c2" => :catalina - sha256 "7e87587953588d5f50dbdaa09d731653f1fa354913da4bcc43a34b505cfde2fa" => :mojave - sha256 "700f3399a63c70da0b0ee0a3be9d64a886ea503a7ea9192062998a63d8a7f23b" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "python@3.8" => :test - - def install - system "autoreconf", "--install" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - man1.install "debian/austin.1" - end - - test do - shell_output("#{bin}/austin #{Formula["python@3.8"].opt_bin}/python3 -c \"print('Test')\"", 33) - end -end diff --git a/Formula/autobench.rb b/Formula/autobench.rb deleted file mode 100644 index e827b4114a3de..0000000000000 --- a/Formula/autobench.rb +++ /dev/null @@ -1,34 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "02476e73b18bf8ed02b18fa66b1c90133e21ad28223f528532a427060860dbe9" => :catalina - sha256 "7306e126fae18f469488e3c3952ff8bd67af967510ffd6a021914a59556e0419" => :mojave - sha256 "02e3a2a6aa7c3e2d6d0a4500445c7b08bd0804dac28d863944dfd48d41f025d9" => :high_sierra - sha256 "daecaaf9c3a733c7667c5414371ba948896b0c0eb47dfd1b1ce876921c829390" => :sierra - sha256 "37bb6f40825953f9ba176522bc64d74a6375304d7963331aee937417e339964f" => :el_capitan - sha256 "9884556bd5f7ab7c29a0aa199328cbe609e04437b1ddce4703214ba65f15d40a" => :yosemite - sha256 "d31d3625f06d036af97b6cc80d62856b9d3eecadb4ed9fe7a0cb9b96f8d9f9a0" => :mavericks - 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 eb64e7a782105..0000000000000 --- a/Formula/autocode.rb +++ /dev/null @@ -1,41 +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 "451224479d19854f4f802b0ec63077080df91196917ad14d16e4a2308f247527" => :catalina - 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 69b7ea868d6f0..0000000000000 --- a/Formula/autoconf-archive.rb +++ /dev/null @@ -1,43 +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-2019.01.06.tar.xz" - mirror "https://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-2019.01.06.tar.xz" - sha256 "17195c833098da79de5778ee90948f4c5d90ed1a0cf8391b4ab348e2ec511e3f" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "f793582f781bede0afc9b807ceaefe811114fb2248cf7fb87d770b8ded1bfdff" => :catalina - sha256 "37d5baf229236e25cc249934f6e052f3c99fe2b2c0fbf799c35e3b46ae861520" => :mojave - sha256 "37d5baf229236e25cc249934f6e052f3c99fe2b2c0fbf799c35e3b46ae861520" => :high_sierra - sha256 "73d531bc05f0eb0e5bb6ced9782bd2920157d89fd72ab42ee2e81b36f783fe98" => :sierra - 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 6c9a4de5f43f9..0000000000000 --- a/Formula/autoconf.rb +++ /dev/null @@ -1,42 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 4 - sha256 "ca510b350e941fb9395522a03f9d2fb5df276085d806ceead763acb95889a368" => :catalina - sha256 "9724736d34773b6e41e2434ffa28fe79feccccf7b7786e54671441ca75115cdb" => :mojave - sha256 "63957a3952b7af5496012b3819c9956822fd7d895d63339c23fdc65c502e1a40" => :high_sierra - sha256 "a76fca79a00f733c1c9f75600b906de4755dd3fbb595b1b55ded1347ac141607" => :sierra - sha256 "ded69c7dac4bc8747e52dca37d6d561e55e3162649d3805572db0dc2f940a4b8" => :el_capitan - sha256 "daf70656aa9ff8b2fb612324222aa6b5e900e2705c9f555198bcd8cd798d7dd0" => :yosemite - sha256 "d153b3318754731ff5e91b45b2518c75880993fa9d1f312a03696e2c1de0c9d5" => :mavericks - end - - uses_from_macos "m4" - uses_from_macos "perl" - - 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 46b4154537e71..0000000000000 --- a/Formula/autoconf@2.13.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d3b4d6e06ae6749fc60fa437f1f5c2ae85a91f6979ca897e08b854f920c222a0" => :catalina - sha256 "5257ef101823cbf8d20693e27bf4505aec149c7d588459fedc2791a7906eb444" => :mojave - sha256 "5257ef101823cbf8d20693e27bf4505aec149c7d588459fedc2791a7906eb444" => :high_sierra - 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/autodiff.rb b/Formula/autodiff.rb deleted file mode 100644 index 1b461736d1895..0000000000000 --- a/Formula/autodiff.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Autodiff < Formula - desc "Automatic differentiation made easier for C++" - homepage "https://autodiff.github.io/" - url "https://github.com/autodiff/autodiff/archive/v0.5.10.tar.gz" - sha256 "d0e62994b7984014b2944d13f6ce9a75fc6b681d2d81f9051ec44410912dc5d7" - license "MIT" - head "https://github.com/autodiff/autodiff.git" - - bottle do - cellar :any_skip_relocation - sha256 "0be7da5b5c8cb88296037137126dc4530f23559509b6a93d33485db8ae74446c" => :catalina - sha256 "a8a8c129b51be0a90a7f683b52010d42a56439c869beeac44ed77e16a8d406b0" => :mojave - sha256 "464905e7e857c916c85a3c60757ae1ab21834e0187161185043fd52c29fa7fb7" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "eigen" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - (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"].opt_include}", "-o", "forward" - system ENV.cxx, pkgshare/"test/reverse.cpp", "--std=c++17", - "-I#{include}", "-I#{Formula["eigen"].opt_include}", "-o", "reverse" - assert_match shell_output(testpath/"forward"), shell_output(testpath/"reverse") - end -end diff --git a/Formula/autoenv.rb b/Formula/autoenv.rb deleted file mode 100644 index 6ccef80708e80..0000000000000 --- a/Formula/autoenv.rb +++ /dev/null @@ -1,26 +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 7820d1fa19031..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.16/autogen-5.18.16.tar.xz" - mirror "https://ftpmirror.gnu.org/autogen/rel5.18.16/autogen-5.18.16.tar.xz" - sha256 "f8a13466b48faa3ba99fe17a069e71c9ab006d9b1cfabe699f8c60a47d5bb49a" - revision 1 - - bottle do - sha256 "fa3818d518a214d9798a514e90c461d3a6be2c6fc0758c85ad4ad6b134a28851" => :catalina - sha256 "76df021218eb1d338cb8ee2a18c04e1d120166991c94ba64055537beac0e68fb" => :mojave - sha256 "45fb9e222b8c21729659821aa5565010df9c3f347fae4bc2f0e5fc01680a2c1a" => :high_sierra - end - - depends_on "coreutils" => :build - depends_on "pkg-config" => :build - depends_on "guile@2" - - uses_from_macos "libxml2" - - 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-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 4deeef97b9521..0000000000000 --- a/Formula/autojump.rb +++ /dev/null @@ -1,51 +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.3.tar.gz" - sha256 "00daf3698e17ac3ac788d529877c03ee80c3790472a85d0ed063ac3a354c37b1" - head "https://github.com/wting/autojump.git" - - bottle do - cellar :any_skip_relocation - sha256 "11ab5e57c200bd21825899a7f2a7792afd0c19f8c065729e56673f5f949a97e7" => :catalina - sha256 "5576b3f2b9fcb2a236d6ac22b163af03994edb98b69c997ed5a88db85c8d0a15" => :mojave - sha256 "5576b3f2b9fcb2a236d6ac22b163af03994edb98b69c997ed5a88db85c8d0a15" => :high_sierra - sha256 "c95107719bd784e0e348be6dbfb3a780240d96f8d76710271c3642335babbd8f" => :sierra - end - - depends_on :macos # Due to Python 2 - - 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 766a68031cc55..0000000000000 --- a/Formula/automake.rb +++ /dev/null @@ -1,54 +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.2.tar.xz" - mirror "https://ftpmirror.gnu.org/automake/automake-1.16.2.tar.xz" - sha256 "ccc459de3d710e066ab9e12d2f119bd164a08c9341ca24ba22c9adaa179eedd0" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "fe26d4df57481b6a7ca0a6915c37c53648c27ffb41926b3570c45f80fdd8888e" => :catalina - sha256 "fe26d4df57481b6a7ca0a6915c37c53648c27ffb41926b3570c45f80fdd8888e" => :mojave - sha256 "fe26d4df57481b6a7ca0a6915c37c53648c27ffb41926b3570c45f80fdd8888e" => :high_sierra - end - - depends_on "autoconf" - - 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 d1852db8a9d40..0000000000000 --- a/Formula/automysqlbackup.rb +++ /dev/null @@ -1,67 +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 40bdfac033d5d..0000000000000 --- a/Formula/autopano-sift-c.rb +++ /dev/null @@ -1,29 +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 "6c95b627cbba417827b7955d6292a9c74d3993ccbcd60be4999765b2be4ac17e" => :catalina - 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 65f705fe4efe2..0000000000000 --- a/Formula/autopep8.rb +++ /dev/null @@ -1,37 +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/33/9e/69587808c3f77088c96a99a2a4bd8e4a17e8ddbbc2ab1495b5df4c2cd37e/autopep8-1.5.3.tar.gz" - sha256 "60fd8c4341bab59963dafd5d2a566e94f547e660b9b396f772afe67d8481dbf0" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "79f648b311983b7ce858f88fff0d313502b052b077792db504409a8868181498" => :catalina - sha256 "4ae421fc461c433ce9dc26c3e9bb1280e468c0a7e2fdcc15abd6c4bcdd5731c1" => :mojave - sha256 "0c8ee3e0d4202ea2e0a9a438291e7821a22e4046fa5d89a8572adb7823491fc1" => :high_sierra - end - - depends_on "python@3.8" - - resource "pycodestyle" do - url "https://files.pythonhosted.org/packages/bb/82/0df047a5347d607be504ad5faa255caa7919562962b934f9372b157e8a70/pycodestyle-2.6.0.tar.gz" - sha256 "c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e" - end - - resource "toml" do - url "https://files.pythonhosted.org/packages/da/24/84d5c108e818ca294efe7c1ce237b42118643ce58a14d2462b3b2e3800d5/toml-0.10.1.tar.gz" - sha256 "926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f" - end - - def install - virtualenv_install_with_resources - 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 cb51083fddf50..0000000000000 --- a/Formula/autopsy.rb +++ /dev/null @@ -1,80 +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 4dbd3355e2aee..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-3.0.6187.tgz" - sha256 "57b243a0dc543d55085503d33679f662a3cc3ea050ec502f155381d9cf61163f" - - bottle do - cellar :any_skip_relocation - sha256 "57c6f4f501c99c24ca7b35a09ef21663ab437470386c1c90033f0ef9e0612500" => :catalina - sha256 "c94c2dca6cb5bf911f854b3f0f104096cdebb85f7ae481c480354d7f2ca01308" => :mojave - sha256 "e875bf8bee3b62577f260233d0a5c841c2f83f9ca770f2070e4ace0e07a0062f" => :high_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 d589115ba12c4..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.4g.tgz" - mirror "https://deb.debian.org/debian/pool/main/a/autossh/autossh_1.4g.orig.tar.gz" - sha256 "5fc3cee3361ca1615af862364c480593171d0c54ec156de79fc421e31ae21277" - - bottle do - cellar :any_skip_relocation - sha256 "48e2beb06564ae4715df08b98577b10d01a25750e720b188b863ea8f195278ef" => :catalina - sha256 "2674ee43690b5d99490a0979359fdefa52033650b935547a6353de726f916275" => :mojave - sha256 "f88fcb32499fff8aa2899c85fc39dc6678ebed2849791a4312d427d9073b6b98" => :high_sierra - sha256 "78d258f52bc14a2539da8c6d3ce69db5c062bb70e95130d9f22113720f853c67" => :sierra - 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 1565fdb127123..0000000000000 --- a/Formula/avanor.rb +++ /dev/null @@ -1,41 +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" - license "GPL-2.0" - - bottle do - sha256 "ecaf9be2ed4f7fac2f5cff16be121214bbbfd44477a5f3f5287ce26da94fed3e" => :catalina - 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 c10017bd4d13d..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 "db71ee14a03d041413530c0974ce7703100dc3259fc0d2ea5a32fadcf7180133" => :catalina - sha256 "285b4eb74ff189689097df36f62fa4c2a48b68ece7442156a5700b6c36feb743" => :mojave - sha256 "40b26638adfaf290bc07ae792da49106b493ea3109a97c1fac775723a0463ac4" => :high_sierra - sha256 "576b5ea62376b42733d56e7bd862522588c16160ac1abb5f382c1c12055248e1" => :sierra - sha256 "45f18e289431af4de0d1e96c1fadd6a056e80907a1650654f8ee0dd1dafab401" => :el_capitan - sha256 "56e15b29411b2947d9a842d91ae713e16566aa59e297e06f7d4de4b301847e66" => :yosemite - sha256 "55990b93f7fe4639c6fdf29c4cc6c5791c6178c8661e22ef9e0dd64606532f56" => :mavericks - 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 630394a11def7..0000000000000 --- a/Formula/avfs.rb +++ /dev/null @@ -1,39 +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.1.1/avfs-1.1.1.tar.bz2" - sha256 "c83eef7f8676db6fed0a18373c433e0ff55af1651246303ebe1181e8ef8bbf3b" - revision 1 - - bottle do - sha256 "f060170581f703385397ce01f126fb01edf74f97fc3a5a2d889ecfb6464f403c" => :catalina - sha256 "e9f048f1f3f156b62c0650d07b51e82020a896538a51fdffd2ae06bf2d661380" => :mojave - sha256 "4ca7d845c2b2e3c066c2441490b7e9588ef727ab0815aee57c5321ad826435df" => :high_sierra - sha256 "9dd4c35adcc1c1350b48f0a37130414370b38c63a886a0b1824838da34a16c97" => :sierra - end - - depends_on "pkg-config" => :build - depends_on :macos => :sierra # needs clock_gettime - depends_on "openssl@1.1" - depends_on :osxfuse - depends_on "xz" - - def install - args = %W[ - --prefix=#{prefix} - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --enable-fuse - --enable-library - --with-ssl=#{Formula["openssl@1.1"].opt_prefix} - ] - - system "./configure", *args - system "make", "install" - end - - test do - system bin/"avfsd", "--version" - end -end diff --git a/Formula/avian.rb b/Formula/avian.rb deleted file mode 100644 index 190c79eb0b57d..0000000000000 --- a/Formula/avian.rb +++ /dev/null @@ -1,40 +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" - - uses_from_macos "zlib" - - 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 7f2f251946d2e..0000000000000 --- a/Formula/aview.rb +++ /dev/null @@ -1,37 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ad92a0e964ccbebe685edf9c595efd420475490d255caed072985cb128a8230b" => :catalina - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/aview/1.3.0rc1.patch" - sha256 "72a979eff325056f709cee49f5836a425635bd72078515a5949a812aa68741aa" - end - - 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 diff --git a/Formula/avimetaedit.rb b/Formula/avimetaedit.rb deleted file mode 100644 index f09febc1f884c..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" - sha256 "e0b83e17460d0202a54f637cb673a0c03460704e6c2cff0c2e34222efb2c11ca" - - bottle do - cellar :any_skip_relocation - sha256 "f3b1bacfbd6b2c53421e97c37eaeee7783c1cda0e614e9a27ba34ae048bbb5c5" => :catalina - 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==".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/avra.rb b/Formula/avra.rb deleted file mode 100644 index bfd5a77d96b43..0000000000000 --- a/Formula/avra.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Avra < Formula - desc "Assember for the Atmel AVR microcontroller family" - homepage "https://github.com/hsoft/avra" - url "https://github.com/hsoft/avra/archive/1.4.1.tar.gz" - sha256 "0b92f3a2709d72b903fd95afee2c985ed3847440ad12cd651738afffa14ec69e" - - bottle do - cellar :any_skip_relocation - sha256 "97a934f11ada79ed1b37a74a6e726445150edb713f2520c2d0c5131fca2f36b6" => :catalina - sha256 "8d75188d31649e471e5851df65c723016924a08307b6560cfa855379a7169b1c" => :mojave - sha256 "401635c4cf252ba0d19ed77866748d3d3deb05a6f024f3aa3c8bfbba69eba8f3" => :high_sierra - sha256 "0c349d7192c3eb3b3ba63fc26efb3ea2ca58de6160747804da51ee85c7cc98b5" => :sierra - 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_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 547b6aca1e2ac..0000000000000 --- a/Formula/avrdude.rb +++ /dev/null @@ -1,45 +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 "d3f4c82170fa37bacd6e1bc3276ba27e7a8ed2ea781b101b7899e7602393a15b" => :catalina - 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 ac53976fd4674..0000000000000 --- a/Formula/avro-c.rb +++ /dev/null @@ -1,32 +0,0 @@ -class AvroC < Formula - desc "Data serialization system" - homepage "https://avro.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.10.0/c/avro-c-1.10.0.tar.gz" - mirror "https://archive.apache.org/dist/avro/avro-1.10.0/c/avro-c-1.10.0.tar.gz" - sha256 "3ee583d4c370ca6176e9d74f8a6f51ce97edff9b9c7146a8e23bfae31f33051e" - license "Apache-2.0" - - bottle do - sha256 "44708472b87d7d9375ed156ad510f1884b050d4cc345bfef49e6e9f2bc7a756c" => :catalina - sha256 "971102fc6b294cb8b98759edba3e390d376d7660eb49c6ed9063e03cf0cf2067" => :mojave - sha256 "6aec75d7260ab6eb56a7c7b6bceb03f547947a2b1c0eba579ad21a7b048b0367" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "jansson" - depends_on "snappy" - depends_on "xz" - - uses_from_macos "zlib" - - 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 1452eadf43fd5..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.lua?path=avro/avro-1.10.0/cpp/avro-cpp-1.10.0.tar.gz" - mirror "https://archive.apache.org/dist/avro/avro-1.10.0/cpp/avro-cpp-1.10.0.tar.gz" - sha256 "ab016fa07c5759dc5ab8464214fc942833537f3419659a5df53ab7e3f1e809ec" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "901250460aa31156d6ce19869652e02f0e50611d140a5e27481a46fd960b263d" => :catalina - sha256 "a19b21f30750357841d9878346de2ea08a423e095e018c5db3df30109973d230" => :mojave - sha256 "15922816ec925ce88947d027d6abb1a5b250ece5d66ef6696fe0bafc33240fb7" => :high_sierra - 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 28a63c25f3bd5..0000000000000 --- a/Formula/avro-tools.rb +++ /dev/null @@ -1,18 +0,0 @@ -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.10.0/java/avro-tools-1.10.0.jar" - mirror "https://archive.apache.org/dist/avro/avro-1.10.0/java/avro-tools-1.10.0.jar" - sha256 "74c037354ba1bb43e07d336d46d95d54bc347f2d8073d7cf1087d447b5978a56" - - 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 162b5592caf3c..0000000000000 --- a/Formula/awf.rb +++ /dev/null @@ -1,40 +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" - license "GPL-3.0" - revision 2 - head "https://github.com/valr/awf.git" - - bottle do - cellar :any - sha256 "cb84883afc611eacadc474b10407dee6b7177758054fbc2eaa65f21ba7d96f9f" => :catalina - sha256 "b0290ffc5c750f924cbf96a2a5398215a41137a69211d262387789e399aba9d8" => :mojave - sha256 "090ec40bbd96bea15714d411b9c89e6b06ca9723050252f00623b49c61da1497" => :high_sierra - sha256 "417806f1ab0aa5d1c2e2e0302dd2c3c4cdaaf2957ac18fbfe1f9a2ced72947bd" => :sierra - 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 789dee8d7e9a2..0000000000000 --- a/Formula/awk.rb +++ /dev/null @@ -1,35 +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 "2920fef8c3a7f5c3e45480b002968a860b0fbe36408cd0c0f1edb94a9b3c67b5" => :catalina - sha256 "da17e7e893d2a2fb4ab267fb9ead8785ef9417dead77d6c84204d2151330bf47" => :mojave - sha256 "3e7c18b44cd1f1783a28c34edbc2215a2b975021ec42ccaa0f792243d3cb320b" => :high_sierra - sha256 "2c55499ad7ed357a30d643430dd00d426fd3cfa2f5705c772f5a3dd8c8cd020c" => :sierra - sha256 "a844637c334c68f7d7079a1ef6bc45c4df242c93cf6ed891b6d551269518c9c7" => :el_capitan - end - - conflicts_with "gawk", - :because => "both install an `awk` executable" - - 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 3a6b4aabc1f91..0000000000000 --- a/Formula/aws-apigateway-importer.rb +++ /dev/null @@ -1,37 +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" - license "Apache-2.0" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "3a837a89af7bfd9454b2e12924323e82ab6cb6ab09f4088e47b672a6a79aedd2" => :catalina - 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-cdk.rb b/Formula/aws-cdk.rb deleted file mode 100644 index 12e07a3b29445..0000000000000 --- a/Formula/aws-cdk.rb +++ /dev/null @@ -1,33 +0,0 @@ -require "language/node" - -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-1.50.0.tgz" - sha256 "8fd8e8c30b45e2e2f00b0e855f0381d8320bcfa347d7800bce81fa215d97ae55" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "5a0e02e8242cb77e0c3e1a7cddbe6806d8f8fe7bcb2e8b5f378828e2504f361f" => :catalina - sha256 "a389abe0ae35d3f63179e62c571ccbb71c5588eadc6a553af40ecd4c56a0a316" => :mojave - sha256 "583db8c46dc5ccb41f5d5091a661437a065336ef6696136b2a92d9b417142419" => :high_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 - mkdir "testapp" - cd testpath/"testapp" - 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 diff --git a/Formula/aws-cfn-tools.rb b/Formula/aws-cfn-tools.rb deleted file mode 100644 index 294e2bc2c8ec4..0000000000000 --- a/Formula/aws-cfn-tools.rb +++ /dev/null @@ -1,40 +0,0 @@ -class AwsCfnTools < Formula - desc "Client for Amazon CloudFormation web service" - homepage "https://aws.amazon.com/developertools/AWS-CloudFormation/2555753788650372" - url "https://cloudformation-cli.s3.amazonaws.com/AWSCloudFormation-cli.zip" - version "1.0.12" - sha256 "382e3e951833fd77235fae41c1742224d68bdf165e1ace4200ee88c01ac29a90" - revision 1 - - bottle :unneeded - - depends_on "ec2-api-tools" - depends_on "openjdk" - - def install - env = { :JAVA_HOME => Formula["openjdk"].opt_prefix, :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-elasticbeanstalk.rb b/Formula/aws-elasticbeanstalk.rb deleted file mode 100644 index ac4d32fc5bd9f..0000000000000 --- a/Formula/aws-elasticbeanstalk.rb +++ /dev/null @@ -1,218 +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/13/c4/fbdbb9a6d0fb3f268240d0506c5b48bc31ee1bf0303f3f90fda81b149824/awsebcli-3.18.1.tar.gz" - sha256 "a44fb91b3f6b35ea1166200df1954f8dde2228e0e1b37267b2ca6b8fa66809b5" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "d14253acd05c343f517faa6d1f24a7ca4fa6290dd4ab28fd5a67769508dbd1fc" => :catalina - sha256 "52baaf0d0f9d339358d8b6241ae5b0f0b0d7f9b5bd870c986eeee9c2badddabd" => :mojave - sha256 "42cb725eb85274070418f47eb1300f010e79222da68f010840ec6b6831ce2517" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz" - sha256 "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42" - end - - resource "blessed" do - url "https://files.pythonhosted.org/packages/e1/53/38b2da489d31a111c85d5040a65eee3ef001c8d80f78bd45bfd1816652e1/blessed-1.17.5.tar.gz" - sha256 "926916492220af741657ec4668aba95f54a8c32445e765cfa38c7ccd3343cc6f" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/1b/aa/2a4ab9f8a2b4a87d3dc3451b0df9aa695707549d9d5206fefcefb31e8224/botocore-1.15.41.tar.gz" - sha256 "a45a65ba036bc980decfc3ce6c2688a2d5fffd76e4b02ea4d59e63ff0f6896d4" - 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/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "docker" do - url "https://files.pythonhosted.org/packages/96/62/cd321bff4c55532e46f2824df8981fba9ac793d148d410bbdd4b8a98bd3c/docker-4.2.0.tar.gz" - sha256 "ddae66620ab5f4bce769f64bcd7934f880c8abe6aa50986298db56735d0f722e" - end - - resource "docker-compose" do - url "https://files.pythonhosted.org/packages/0a/43/e71f087c308f7d7566449212ecaf3e02323e6dd0f5b9b6b0fb64cbfd4df6/docker-compose-1.25.5.tar.gz" - sha256 "7a2eb6d8173fdf408e505e6f7d497ac0b777388719542be9e49a0efd477a50c6" - 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 "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/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - 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 "ipaddress" do - url "https://files.pythonhosted.org/packages/b9/9a/3e9da40ea28b8210dd6504d3fe9fe7e013b62bf45902b458d1cdc3c34ed9/ipaddress-1.0.23.tar.gz" - sha256 "b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/5c/40/3bed01fc17e2bb1b02633efc29878dfa25da479ad19a69cfb11d2b88ea8e/jmespath-0.9.5.tar.gz" - sha256 "cca55c8d153173e21baa59983015ad0daf603f9cb799904ff057bfb8ff8dc2d9" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" - sha256 "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/ac/15/4351003352e11300b9f44a13576bff52dcdc6e4a911129c07447bda0a358/paramiko-2.7.1.tar.gz" - sha256 "920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f" - end - - resource "pathspec" do - url "https://files.pythonhosted.org/packages/84/2a/bfee636b1e2f7d6e30dd74f49201ccfa5c3cf322d44929ecc6c137c486c5/pathspec-0.5.9.tar.gz" - sha256 "54a5eab895d89f342b52ba2bffe70930ef9f8d96e398cccf530d21fa0516a873" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz" - sha256 "0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c" - end - - resource "pyrsistent" do - url "https://files.pythonhosted.org/packages/9f/0d/cbca4d0bbc5671822a59f270e4ce3f2195f8a899c97d0d5abb81b191efb5/pyrsistent-0.16.0.tar.gz" - sha256 "28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" - 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/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/40/35/298c36d839547b50822985a2cf0611b3b978a5ab7a5af5562b8ebe3e1369/requests-2.20.1.tar.gz" - sha256 "ea881206e59f41dbd0bd445437d792e43906703fff75ca8ff43ccdb11f33f263" - 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/82/a8/60df592e3a100a1f83928795aca210414d72cebdc6e4e0c95a6d8ac632fe/texttable-1.6.2.tar.gz" - sha256 "eff3703781fbc7750125f50e10f001195174f13825a92a45e9403037d539b4f4" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/8a/3c/1bb7ef6c435dea026f06ed9f3ba16aa93f9f4f5d3857a51a35dfa00882f1/urllib3-1.24.3.tar.gz" - sha256 "2393a695cd12afedd0dcb26fe5d50d0cf248e5a66f75dbd89a3d4eb333a61af4" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" - sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" - end - - resource "websocket_client" do - url "https://files.pythonhosted.org/packages/8b/0f/52de51b9b450ed52694208ab952d5af6ebbcbce7f166a48784095d930d8c/websocket_client-0.57.0.tar.gz" - sha256 "d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010" - end - - def install - 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/aws-es-proxy.rb b/Formula/aws-es-proxy.rb deleted file mode 100644 index 217735a6b8d82..0000000000000 --- a/Formula/aws-es-proxy.rb +++ /dev/null @@ -1,42 +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/1.1.tar.gz" - sha256 "290ec4ef5186b94e1f416550fe8a842fce04ed10937fd0d5580470e1552d5be8" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "dc7b61f5e22fb14108c697fd16d8e10f1dc7c25ba4e198aea9048d5a1ab49380" => :catalina - sha256 "04072658dc075c931b5090ed0fc8a7d918388f3352c2752e03eb22f8cda48cb6" => :mojave - sha256 "12e316705d1c4730b83f9a7a31559b7968f4c3bace93569902db6a57da0b6966" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args - prefix.install_metafiles - 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 endpoint, output - assert_match "no such host", output - end -end diff --git a/Formula/aws-google-auth.rb b/Formula/aws-google-auth.rb deleted file mode 100644 index 7760f1c0cc0cf..0000000000000 --- a/Formula/aws-google-auth.rb +++ /dev/null @@ -1,198 +0,0 @@ -class AwsGoogleAuth < Formula - include Language::Python::Virtualenv - - desc "Acquire AWS credentials using Google Apps" - homepage "https://github.com/cevoaustralia/aws-google-auth" - url "https://github.com/cevoaustralia/aws-google-auth/archive/0.0.36.tar.gz" - sha256 "c880633b2813b3fd2312fd1301a8927ebc7b13c3405932bd0ec760cecfb7c780" - license "MIT" - head "https://github.com/cevoaustralia/aws-google-auth.git" - - bottle do - cellar :any - sha256 "1d6890e0d3fd5e514d91db206c47b798ee5c5411a25cf2cd2eda8cf4abfc4806" => :catalina - sha256 "a1da781b800a1a533e2b6afd3443f77b04a952da872320732c16b1bab858a4a5" => :mojave - sha256 "371f6acaf6ce534b1a7d6569ea5fb02d05a0da5818b6f0e7097edb91ebdc5a66" => :high_sierra - end - - depends_on "freetype" - depends_on "jpeg" - depends_on "python@3.8" - - uses_from_macos "libffi" - uses_from_macos "libxml2" - uses_from_macos "libxslt" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "soupsieve" do - url "https://files.pythonhosted.org/packages/15/53/3692c565aea19f7d9dd696fee3d0062782e9ad5bf9535267180511a15967/soupsieve-2.0.tar.gz" - sha256 "e914534802d7ffd233242b785229d5ba0766a7f487385e3f714446a07bf540ae" - end - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/3b/e4/7cfc641f11e0eef60123912611a5c9ee7d4638da7325878b695b9ae4bb6f/beautifulsoup4-4.9.0.tar.gz" - sha256 "594ca51a10d2b3443cbac41214e12dbb2a1cd57e1a7344659849e2e20ba6a8d8" - end - - resource "Pillow" do - url "https://files.pythonhosted.org/packages/81/1a/6b2971adc1bca55b9a53ed1efa372acff7e8b9913982a396f3fa046efaf8/Pillow-6.0.0.tar.gz" - sha256 "809c0a2ce9032cbcd7b5313f71af4bdc5c8c771cb86eb7559afd954cab82ebb5" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/5c/40/3bed01fc17e2bb1b02633efc29878dfa25da479ad19a69cfb11d2b88ea8e/jmespath-0.9.5.tar.gz" - sha256 "cca55c8d153173e21baa59983015ad0daf603f9cb799904ff057bfb8ff8dc2d9" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/1b/aa/2a4ab9f8a2b4a87d3dc3451b0df9aa695707549d9d5206fefcefb31e8224/botocore-1.15.41.tar.gz" - sha256 "a45a65ba036bc980decfc3ce6c2688a2d5fffd76e4b02ea4d59e63ff0f6896d4" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/50/de/2b688c062107942486c81a739383b1432a72717d9a85a6a1a692f003c70c/s3transfer-0.3.3.tar.gz" - sha256 "921a37e2aefc64145e7b73d50c71bb4f26f46e4c9f414dc648c6245ff92cf7db" - end - - resource "boto3" do - url "https://files.pythonhosted.org/packages/2b/5a/b54170621b5ab51a1661863bc37dae681b9e16c14b33aa5fa62822e53098/boto3-1.12.41.tar.gz" - sha256 "c2c1ee703cb0fa03c5df84b7f00eaa462c808be477dc9014c1e8eef269122770" - end - - resource "configparser" do - url "https://files.pythonhosted.org/packages/e5/7c/d4ccbcde76b4eea8cbd73b67b88c72578e8b4944d1270021596e80b13deb/configparser-5.0.0.tar.gz" - sha256 "2ca44140ee259b5e3d8aaf47c79c36a7ab0d5e94d70bd4105c03ede7a20ea5a1" - end - - resource "entrypoints" do - url "https://files.pythonhosted.org/packages/b4/ef/063484f1f9ba3081e920ec9972c96664e2edb9fdc3d8669b0e3b8fc0ad7c/entrypoints-0.3.tar.gz#sha256=c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451" - sha256 "c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451" - end - - resource "keyring" do - url "https://files.pythonhosted.org/packages/0b/2a/4abe0beccb37d125d77fd716d18c1a5cde509faa60a1b0d2e9bba13ec572/keyring-21.2.0.tar.gz" - sha256 "197fd5903901030ef7b82fe247f43cfed2c157a28e7747d1cfcf4bc5e699dd03" - end - - resource "keyrings.alt" do - url "https://files.pythonhosted.org/packages/de/95/b127128917fef9ace8d8bfa66f3e3a81915d3dfa295d5f06784bca0c9854/keyrings.alt-3.4.0.tar.gz" - sha256 "91328ac4229e70b1d0061d21bf61d36b031a6b4828f2682e38c741812f6eb23d" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" - sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz#sha256=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/57/6f/213d075ad03c84991d44e63b6516dd7d185091df5e1d02a660874f8f7e1e/tabulate-0.8.7.tar.gz" - sha256 "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/82/c3/534ddba230bd4fbbd3b7a3d35f3341d014cca213f369a9940925e7e5f691/pytz-2019.3.tar.gz" - sha256 "b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be" - end - - resource "tzlocal" do - url "https://files.pythonhosted.org/packages/c6/52/5ec375d4efcbe4e31805f3c4b301bdfcff9dcbdb3605d4b79e117a16b38d/tzlocal-2.0.0.tar.gz" - sha256 "949b9dd5ba4be17190a80c0268167d7e6c92c62b30026cf9764caf3e308e5590" - end - - resource "filelock" do - url "https://files.pythonhosted.org/packages/14/ec/6ee2168387ce0154632f856d5cc5592328e9cf93127c5c9aeca92c8c16cb/filelock-3.0.12.tar.gz" - sha256 "18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59" - 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 - - venv = virtualenv_create(libexec, "python3") - - resource("entrypoints").stage do - # Without removing this file, `pip` will ignore the `setup.py` file and - # attempt to download the [`flit`](https://github.com/takluyver/flit) - # build system. - rm_f "pyproject.toml" - - venv.pip_install Pathname.pwd - end - - 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 - 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 - end - - res = resources.map(&:name).to_set - ["entrypoints", "Pillow"] - - res.each do |r| - venv.pip_install resource(r) - end - - venv.pip_install_and_link buildpath - end - - test do - assert_match /Invalid username or password/, - shell_output("echo 'foobar' | #{bin}/aws-google-auth -u foo -I C01111111 -S 111111111111 2>&1", 1) - end -end diff --git a/Formula/aws-iam-authenticator.rb b/Formula/aws-iam-authenticator.rb deleted file mode 100644 index 83f66cfa5dfc2..0000000000000 --- a/Formula/aws-iam-authenticator.rb +++ /dev/null @@ -1,43 +0,0 @@ -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.git", - :tag => "v0.5.1", - :revision => "d7c0b2e9131faabb2b09dd804a35ee03822f8447" - sha256 "d077ce973e5917fab7cbad46bc2d19264e8d0ae23321afd97b1bc481075a31fa" - license "Apache-2.0" - head "https://github.com/kubernetes-sigs/aws-iam-authenticator.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "82bd2279cb53c5343d73da2db1ec715b991f805bf67e76bbb2c2958a926f17a5" => :catalina - sha256 "c754eb2b9da4ec648a9f3d33a480387438d4216fd191118ee932222087fc0198" => :mojave - sha256 "16400cd25292b76959d9636b34afaf15d3c3e71ad21ae1409a110925efc6d058" => :high_sierra - end - - depends_on "go" => :build - - def install - # project = "github.com/kubernetes-sigs/aws-iam-authenticator" - revision = Utils.safe_popen_read("git", "rev-parse", "HEAD").strip - version = Utils.safe_popen_read("git", "describe", "--tags").strip - ldflags = ["-s", "-w", - "-X main.version=#{version}", - "-X main.commit=#{revision}"] - system "go", "build", "-ldflags", ldflags.join(" "), "-trimpath", - "-o", bin/"aws-iam-authenticator", "./cmd/aws-iam-authenticator" - prefix.install_metafiles - end - - test do - output = shell_output("#{bin}/aws-iam-authenticator version") - assert_match "\"Version\":\"v#{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_include contents, created - end - 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 1ba527f0eeff4..0000000000000 --- a/Formula/aws-okta.rb +++ /dev/null @@ -1,51 +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/v1.0.2.tar.gz" - sha256 "bc2b2ff383f3b7e63acbea6b0dc9131bb30ac101885101a6d274997d5c3716da" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "8647c8a1715974a8a1cc46a5b8a09a6075a0d209e6d65615c8b0443df8556010" => :catalina - sha256 "8cf8eea3db470ccd75831e98107b0689b40e3f4212f11bea3d038d3e94c9b197" => :mojave - sha256 "898f8d08ba4aa093b782fc52d119f02a4e679b1991d97dd0e787e62b3a062d96" => :high_sierra - end - - depends_on "go" => :build - - on_linux do - depends_on "pkg-config" => :build - depends_on "libusb" - end - - def install - system "go", "build", "-ldflags", "-s -w -X main.Version=#{version}", "-trimpath", "-o", bin/"aws-okta" - prefix.install_metafiles - 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 "us\n" - input.gets - output.puts "fakedomain.okta.com\n" - input.gets - output.puts "username\n" - input.gets - output.puts "password\n" - input.gets - input.gets - input.gets - input.gets - input.gets - 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 eae01a71adb8f..0000000000000 --- a/Formula/aws-sdk-cpp.rb +++ /dev/null @@ -1,44 +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.8.1.tar.gz" - sha256 "cfe718405fcc8a7268927a143174677f9cea4a779ab39c5f0862a1b193ea1f18" - license "Apache-2.0" - head "https://github.com/aws/aws-sdk-cpp.git" - - bottle do - sha256 "c03d8fc638156a10d777e83b0ef58541faacc135d7621991a91139c90b6fc9a2" => :catalina - sha256 "f8c1a4774c442183976bac5527cac22de93c110704ee76f03d96670fe2fb4e2d" => :mojave - sha256 "090a8cbf6763256bdad2c7f79bee8de6239312630d1a8d644ffb75d80bc2daee" => :high_sierra - end - - depends_on "cmake" => :build - - uses_from_macos "curl" - - 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 97d8b9cec684a..0000000000000 --- a/Formula/aws-shell.rb +++ /dev/null @@ -1,111 +0,0 @@ -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/46/5a/c01bbff96fcbe8051e0b59e6191e07f5917f7f2cf667557c7dcbb85f62c3/aws-shell-0.2.1.tar.gz" - sha256 "2044b0ef78c7542c392f2cee4b74a4439545c63dda0a3e28b712fff53e8e5823" - revision 2 - - bottle do - cellar :any - sha256 "80649fd9dfb5ef9c0506db4f74e0a4ff275617a718249cbc12d2c62efb46657f" => :catalina - sha256 "174cce4bc60dfa38babc3bae1dd3b1ab8614c2339340eaaf438012724ebc3646" => :mojave - sha256 "e59a26cea8549c99c0f6586db2f85d9400b53911902ec9ebdac1e6379d2518ac" => :high_sierra - end - - depends_on "python@3.8" - - resource "awscli" do - url "https://files.pythonhosted.org/packages/71/2f/8f9a58eac96d48bb1496596e64bebada636b0178b8f117498d313b13b0a2/awscli-1.16.313.tar.gz" - sha256 "a2b26db6afea30ce3a4b6706515b5342294eea28ed5888430986256324f95fe4" - end - - resource "boto3" do - url "https://files.pythonhosted.org/packages/60/43/960fa147d3c2b700350ed1dae385d96cc3adfc1ee2dfafc13fb69f907554/boto3-1.10.49.tar.gz" - sha256 "a2e40aecbda5ebf669089851f67962baf70fc6a1745c28ea157e4463cbee2a0d" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/70/c9/b8a18dcd6e444ff6b198dd09e733b446404de4d3d0d2cad628e85f744264/botocore-1.13.49.tar.gz" - sha256 "9b060954865fbad2f143253eef3cf38b1b68eb0675212413b8f0b1342026310c" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/76/53/e785891dce0e2f2b9f4b4ff5bc6062a53332ed28833c7afede841f46a5db/colorama-0.4.1.tar.gz" - sha256 "05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d" - 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/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/2c/30/f0162d3d83e398c7a3b70c91eef61d409dea205fb4dc2b47d335f429de32/jmespath-0.9.4.tar.gz" - sha256 "bde2aef6f44302dfb30320115b17d030798de8c4110e28d5cf6cf91a7a31074c" - 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/a4/db/fffec68299e6d7bad3d504147f9094830b704527a7fc098b721d38cc7fa7/pyasn1-0.4.8.tar.gz" - sha256 "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/cb/9f/27d4844ac5bf158a33900dbad7985951e2910397998e85712da03ce125f0/Pygments-2.5.2.tar.gz" - sha256 "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/8d/c9/e5be955a117a1ac548cdd31e37e8fd7b02ce987f9655f5c7563c656d5dcb/PyYAML-5.2.tar.gz" - sha256 "c0ee8eca2c582d29c3c2ec6e2c4f703d1b7f1fb10bc72317355a746057e7346c" - 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/39/12/150cd55c606ebca6725683642a8e7068cd6af10f837ce5419a9f16b7fb55/s3transfer-0.2.1.tar.gz" - sha256 "6efc926738a3cd576c2a79725fed9afde92378aa5c6a957e3af010cb019fac9d" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ad/fc/54d62fa4fc6e675678f9519e677dfc29b8964278d75333cf142892caf015/urllib3-1.25.7.tar.gz" - sha256 "f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/5e/33/92333eb80be0c96385dee338f30b53e24a8b415d5785e225d789b3f90feb/wcwidth-0.1.8.tar.gz" - sha256 "f28b3e8a6483e5d49e7f8949ac1a78314e740333ae305b4ba5defd3e74fb37a8" - end - - def install - virtualenv_install_with_resources - end - - test do - system "#{bin}/aws-shell", "--help" - end -end diff --git a/Formula/awscli.rb b/Formula/awscli.rb deleted file mode 100644 index 455996da76b1e..0000000000000 --- a/Formula/awscli.rb +++ /dev/null @@ -1,61 +0,0 @@ -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/2.0.29.tar.gz" - sha256 "3d073b97034070a218ccde4c6cd33b29f96f32344b535e75564ee0b52fa5fc2c" - head "https://github.com/aws/aws-cli.git", :branch => "v2" - - bottle do - sha256 "b38dab3562270529c5e57d34b151ac0b31da89aa1ca8316682da6e34ff243fc5" => :catalina - sha256 "50bfad8bd4a17d193a7c9e3de5143900842ce0193ff3e842f2d2f7a2a311ec29" => :mojave - sha256 "c11341c9f3500080869c4c5f4a31163d527da5bb90f8068a92403c1c543c7643" => :high_sierra - end - - # Some AWS APIs require TLS1.2, which system Python doesn't have before High - # Sierra - depends_on "python@3.8" - - uses_from_macos "groff" - - on_linux do - depends_on "libyaml" - end - - def install - venv = virtualenv_create(libexec, "python3") - system libexec/"bin/pip", "install", "-v", "-r", "requirements.txt", - "--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 - - system libexec/"bin/python3", "scripts/gen-ac-index", "--include-builtin-index" - 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") - assert_include Dir["#{libexec}/lib/python3.8/site-packages/awscli/data/*"], - "#{libexec}/lib/python3.8/site-packages/awscli/data/ac.index" - end -end diff --git a/Formula/awscli@1.rb b/Formula/awscli@1.rb deleted file mode 100644 index d3a591828cc17..0000000000000 --- a/Formula/awscli@1.rb +++ /dev/null @@ -1,56 +0,0 @@ -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://github.com/aws/aws-cli/archive/1.18.90.tar.gz" - sha256 "590a52374079c459d6a67ab4cf94db6fdbc0311baf1f5a5688f460bc73ca0853" - - bottle do - cellar :any_skip_relocation - sha256 "8a7a9bfd08ca249226988cb0945e69386d750a10401befd9b134817b60f762bc" => :catalina - sha256 "b037edaad8cccdc7962c11d69b47df3efddf284bbe1c8f1fccaaf1e3afcb72c5" => :mojave - sha256 "37ca4ba85490ca5b7e78e2b15a29a6fa61b747d67aa03e6aa7c3e3ba58905ab7" => :high_sierra - end - - keg_only :versioned_formula - - # Some AWS APIs require TLS1.2, which system Python doesn't have before High - # Sierra - depends_on "python@3.8" - - uses_from_macos "groff" - - 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/awscurl.rb b/Formula/awscurl.rb deleted file mode 100644 index f9c73e80a86a7..0000000000000 --- a/Formula/awscurl.rb +++ /dev/null @@ -1,97 +0,0 @@ -class Awscurl < Formula - include Language::Python::Virtualenv - - desc "Curl like simplicity to access AWS resources" - homepage "https://github.com/okigan/awscurl" - url "https://github.com/okigan/awscurl/archive/v0.20.tar.gz" - sha256 "3ce06d105067b42398cf0bb6696742b790258e16487d5e5afa025b7c3ca983e4" - license "MIT" - revision 1 - head "https://github.com/okigan/awscurl.git" - - bottle do - cellar :any - sha256 "b6eb9274da3699bce4675068f5476e63c900b9e1aaecaaf3a7d80845143ff919" => :catalina - sha256 "2de296f8d1c89e5532526017faba23cdb36ec34bae668308c671d4a56a252995" => :mojave - sha256 "38ad9e69f5e0d14d4c8007d059b8faf61cec1f6a6ec9f61cf2e25fc19ba3d005" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/bf/9d214a5af07debc6acf7f3f257265618f1db242a3f8e49a9b516f24523a6/certifi-2019.11.28.tar.gz" - sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/2d/bf/960e5a422db3ac1a5e612cb35ca436c3fc985ed4b7ed13a1b4879006f450/cffi-1.13.2.tar.gz" - sha256 "599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346" - 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/ee/e2/d392af39dfe241e9fa5e9830ea1f00c077c7ae1dd6ede97cba06404c66fb/ConfigArgParse-0.15.2.tar.gz" - sha256 "558738aff623d6667aa5b85df6093ad3828867de8a82b66a6d458fb42567beb3" - end - - resource "configparser" do - url "https://files.pythonhosted.org/packages/16/4f/48975536bd488d3a272549eb795ac4a13a5f7fcdc8995def77fbef3532ee/configparser-4.0.2.tar.gz" - sha256 "c7d282687a5308319bf3d2e7706e575c635b0a470342641c93bea0ea3b5331df" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz" - sha256 "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - 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/0d/1d/6cc4bd4e79f78be6640fab268555a11af48474fac9df187c3361a1d1d2f0/pyOpenSSL-19.1.0.tar.gz" - sha256 "9a24494b2602aaf402be5c9e30a0b82d4a5c67528fe8fb475e3f3bc00dd69507" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz" - sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ad/fc/54d62fa4fc6e675678f9519e677dfc29b8964278d75333cf142892caf015/urllib3-1.25.7.tar.gz" - sha256 "f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match "Curl", shell_output("#{bin}/awscurl --help") - - assert_match "No access key is available", - shell_output("#{bin}/awscurl --service s3 https://homebrew-test-none-existant-bucket.s3.amazonaws.com 2>&1", 1) - end -end diff --git a/Formula/awslogs.rb b/Formula/awslogs.rb deleted file mode 100644 index 4676b8f4641e5..0000000000000 --- a/Formula/awslogs.rb +++ /dev/null @@ -1,108 +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" - revision 2 - head "https://github.com/jorgebastida/awslogs.git" - - bottle do - cellar :any_skip_relocation - sha256 "7918feeb3d8bd6ff0944c55afae7864eaf5cea516029b33647aa2ce87288ce86" => :catalina - sha256 "5079a8ee7893316f2febeb41caf7afe6a0a2efad9f553f04dcfb80be9109e1d0" => :mojave - sha256 "04e319b2b99b8c62ce50d8c4cce6804aac585d063ac4da9ec8459dc9a8719512" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "zlib" - - on_linux do - depends_on "openssl@1.1" - end - - 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/awsume.rb b/Formula/awsume.rb deleted file mode 100644 index 287b6699729a6..0000000000000 --- a/Formula/awsume.rb +++ /dev/null @@ -1,95 +0,0 @@ -class Awsume < Formula - include Language::Python::Virtualenv - - desc "Utility for easily assuming AWS IAM roles from the command-line" - homepage "https://www.trek10.com/blog/awsume-aws-assume-made-awesome" - url "https://github.com/trek10inc/awsume/archive/4.4.1.tar.gz" - sha256 "66d698b4716a1dc7c927778a8fe124a6ac2d99334aff2be5dac6b13598b4e08f" - license "MIT" - revision 1 - head "https://github.com/trek10inc/awsume.git" - - bottle do - cellar :any_skip_relocation - sha256 "09170cb98ec4947ddb04623d32745624623fc054f1c82edfa7f4c89442da9c7a" => :catalina - sha256 "503d4ddd068d70a0a5e2f7f4ea54584b551e8bb52f5c07f05801527bf5d750b3" => :mojave - sha256 "33c1bd0d60b93b7de79359a971d7abb9182cb33065036b8ece6d75a8bc437552" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "python@3.8" - uses_from_macos "sqlite" - - resource "boto3" do - url "https://files.pythonhosted.org/packages/6d/e3/bdd48e60b6ec83e77c4f5e300aff9999f0eac97f92b468cc69bd0871f096/boto3-1.13.25.tar.gz" - sha256 "1c37c727e0e6f872f5262a893a1ed5422ef0f1ed6075d35b809e20c3072dad5b" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/7c/b4/fd5f0e872c910db2685737c50797db273e6d8de706d9131aef4e8f0f04a5/botocore-1.16.25.tar.gz" - sha256 "b55b3acab42b58c24481a9fbb33d53fb7d8d03dfc0338af0132f6c5010006d0d" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz" - sha256 "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9" - end - - resource "pluggy" do - url "https://files.pythonhosted.org/packages/f8/04/7a8542bed4b16a65c2714bf76cf5a0b026157da7f75e87cc88774aa10b14/pluggy-0.13.1.tar.gz" - sha256 "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0" - end - - resource "psutil" do - url "https://files.pythonhosted.org/packages/c4/b8/3512f0e93e0db23a71d82485ba256071ebef99b227351f0f5540f744af41/psutil-5.7.0.tar.gz" - sha256 "685ec16ca14d079455892f25bd124df26ff9137664af445563c1bd36629b5e0e" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/50/de/2b688c062107942486c81a739383b1432a72717d9a85a6a1a692f003c70c/s3transfer-0.3.3.tar.gz" - sha256 "921a37e2aefc64145e7b73d50c71bb4f26f46e4c9f414dc648c6245ff92cf7db" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_includes "4.0.0", shell_output("#{bin}/awsume -v") - - file_path = File.expand_path("~/.awsume/config.yaml") - shell_output(File.exist?(file_path)) - - assert_match "PROFILE TYPE SOURCE MFA? REGION ACCOUNT", shell_output("#{bin}/awsume --list-profiles 2>&1") - end -end diff --git a/Formula/awsweeper.rb b/Formula/awsweeper.rb deleted file mode 100644 index 95ea1e7ba4b9e..0000000000000 --- a/Formula/awsweeper.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Awsweeper < Formula - desc "CLI tool for cleaning your AWS account" - homepage "https://github.com/jckuester/awsweeper/" - url "https://github.com/jckuester/awsweeper/archive/v0.10.1.tar.gz" - sha256 "0b97b127312d65ef4d08972a0f337d8ceb1550940160b50ada0d1aaa3c723d9c" - license "MPL-2.0" - head "https://github.com/jckuester/awsweeper.git" - - bottle do - cellar :any_skip_relocation - sha256 "e0b61214e9db15dea9a6a87a7ec434a0ffe3e86c75c80fe6aaa6d436483a5cad" => :catalina - sha256 "5f781a42c16de3ce223e02b5e31fc7714970a9528badc86457648e00b14f4ef7" => :mojave - sha256 "cbb4f2723713a9c3a0623dd703ce121408ac7470977f691f6fb331f8c99eda64" => :high_sierra - 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=#{Date.today} - ] - - system "go", "build", *std_go_args, "-ldflags", ldflags.join(" ") - end - - test do - (testpath/"filter.yml").write <<~EOS - aws_autoscaling_group: - aws_instance: - - tags: - Name: foo - EOS - - assert_match "failed to initialize Terraform AWS Providers", - shell_output("#{bin}/awsweeper --dry-run #{testpath}/filter.yml 2>&1", 1) - - assert_match "Delete AWS resources via a YAML filter", shell_output("#{bin}/awsweeper --help 2>&1", 2) - end -end diff --git a/Formula/axel.rb b/Formula/axel.rb deleted file mode 100644 index 0cabd4f7df098..0000000000000 --- a/Formula/axel.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Axel < Formula - desc "Light UNIX download accelerator" - homepage "https://github.com/eribertomota/axel" - url "https://github.com/axel-download-accelerator/axel/releases/download/v2.17.9/axel-2.17.9.tar.xz" - sha256 "f1364d9b55d435efc6d32218097a50a63be7b1300138e698133cf19ad3aa3a54" - license "GPL-2.0" - head "https://github.com/eribertomota/axel.git" - - bottle do - cellar :any - sha256 "8c4c87ce64a4aaa3691e965a7c5843503f80d348f5d17b0e9d1840c45bbc1aaf" => :catalina - sha256 "e1ab7026adcf06373662caad04dbc1d93b5fcabb40ff79b6bbba466e0f6d8da4" => :mojave - sha256 "d27855f8ffa19450a2ba4b54a6338105004f342e85527efaa074d67d245af943" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "autoconf-archive" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "openssl@1.1" - - def install - 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/azcopy.rb b/Formula/azcopy.rb deleted file mode 100644 index deabd32693ff8..0000000000000 --- a/Formula/azcopy.rb +++ /dev/null @@ -1,25 +0,0 @@ -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/v10.4.3.tar.gz" - sha256 "c363d22db83bd3549494c5e922918b245aeb29db024ab5b904d26b498292457d" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "009ce3db54395bb07c8938f63178495b39d933ffea7fb805023bab16e40361dd" => :catalina - sha256 "3cf64d1335193e4083b9c430d9bdb4b611390a3e72df9f6ec62017860e888a01" => :mojave - sha256 "975f0f8d7d078c307b95541882aebbe3d63240d140702b52594be021022cebf0" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args - end - - test do - assert_match "failed to obtain credential info", - shell_output("#{bin}/azcopy list https://storageaccountname.blob.core.windows.net/containername/", 1) - end -end diff --git a/Formula/azure-cli.rb b/Formula/azure-cli.rb deleted file mode 100644 index 3568823aad8a4..0000000000000 --- a/Formula/azure-cli.rb +++ /dev/null @@ -1,717 +0,0 @@ -class AzureCli < Formula - include Language::Python::Virtualenv - - desc "Microsoft Azure CLI 2.0" - homepage "https://docs.microsoft.com/cli/azure/overview" - url "https://codeload.github.com/Azure/azure-cli/legacy.tar.gz/95ebcc9c10b5d27015c9c63810c582dd6769b701" - version "2.8.0" - sha256 "d57746606ae27a0247bcc93cb1ce4ac6e13136cc9ce533a482db817889a5276d" - license "MIT" - head "https://github.com/Azure/azure-cli.git" - - bottle do - cellar :any - sha256 "598ab7a63b33b28358d77eeeab9da803e5d60c2e75c28732dcff62b7da4c851d" => :catalina - sha256 "40a648dc3718f8c688c8ff97a185df2184717cf0e135b79b89da7833cf684c1f" => :mojave - sha256 "48f14aa020e67d7788e3ec6c9df8bdc5c559987f385e3dc323dfc0cd9b702462" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "adal" do - url "https://files.pythonhosted.org/packages/37/4d/c6a49a32b377dfc6cc48b837e34b7c9f967cfd117b1f77e59b61b6578d23/adal-1.2.3.tar.gz" - sha256 "2ae7e02cea4552349fed6d8c9912da400f7e643fc30098defe0dcd01945e7c54" - 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/f5/02/b831bf3281723b81eb6b041d91d2c219123366f975ec0a73556620773417/applicationinsights-0.11.9.tar.gz" - sha256 "30a11aafacea34f8b160fbdc35254c9029c7e325267874e3c68f6bdbcd6ed2c3" - end - - resource "argcomplete" do - url "https://files.pythonhosted.org/packages/43/61/345856864a72ccc004bea5f74183c58bfd6675f9eab931ff9ce21a8fe06b/argcomplete-1.11.1.tar.gz" - sha256 "5ae7b601be17bf38a749ec06aa07fb04e7b6b5fc17906948dc1866e7facf3740" - end - - resource "azure-batch" do - url "https://files.pythonhosted.org/packages/76/eb/dfd058cad009024cfbb8b22c1f6e75d5f9c035a9f04db50a4360d59130d2/azure-batch-9.0.0.zip" - sha256 "47ca6f50a640915e1cdc5ce3c1307abe5fa3a636236e561119cf62d9df384d84" - 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/94/f3/d633865d2b2dd743116e934371d75907e89966f2e5034d3a220c9d220369/azure-core-1.6.0.zip" - sha256 "d10b74e783cff90d56360e61162afdd22276d62dc9467e657ae866449eae7648" - end - - resource "azure-cosmos" do - url "https://files.pythonhosted.org/packages/5d/24/d7dca6df234404d8a11c9df59533d79331e8ba20c471cb2e7d73efbaf0d2/azure-cosmos-3.1.0.tar.gz" - sha256 "f4a718cc4d26e90ad22abbd0d208f43040cbb4b7768144632dd3042fec9da5a4" - end - - resource "azure-datalake-store" do - url "https://files.pythonhosted.org/packages/15/00/8bfe15183eadaecd8d7a53db58b1a4a085ed509630757423ece1649716bd/azure-datalake-store-0.0.48.tar.gz" - sha256 "d27c335783d4add00b3a5f709341e4a8009857440209e15a739a9a96b52386f7" - end - - resource "azure-functions-devops-build" do - url "https://files.pythonhosted.org/packages/d5/96/59ca26c8d9985df8a092cf5974e54b6c3e11208833ea1c0163d7fb763c94/azure-functions-devops-build-0.0.22.tar.gz" - sha256 "c6341abda6098813f8fa625acd1e925410a17a8a1c7aaabdf975bb7cecb14edf" - end - - resource "azure-graphrbac" do - url "https://files.pythonhosted.org/packages/3e/4e/4598ea52efc2654b0c865243bd60625d4ffa4df874e7e5dcb76a9a4ddbbc/azure-graphrbac-0.60.0.zip" - sha256 "d0bb62d8bf8e196b903f3971ba4afa448e4fe14e8394ebfcdd941d84d62ecafe" - 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-loganalytics" do - url "https://files.pythonhosted.org/packages/7a/37/6d296ee71319f49a93ea87698da2c5326105d005267d58fb00cb9ec0c3f8/azure-loganalytics-0.1.0.zip" - sha256 "3ceb350def677a351f34b0a0d1637df6be0c6fe87ff32a5270b17f540f6da06e" - 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-apimanagement" do - url "https://files.pythonhosted.org/packages/ec/bf/8b960e78095793b60f4c56e0f9979436250e22e12fca95344a319f1a593e/azure-mgmt-apimanagement-0.1.0.zip" - sha256 "5d45d3438c6a11bae6bb8d4d5173cdb44b85683695f9f3433f22f45aecc47819" - end - - resource "azure-mgmt-appconfiguration" do - url "https://files.pythonhosted.org/packages/78/51/0d34dff29c8b2814ca35ac7b2eb79fe7ff22a02fae9ef549ae12b5a129d9/azure-mgmt-appconfiguration-0.4.0.zip" - sha256 "85f6202ba235fde6be274f3dec1578b90235cf31979abea3fcfa476d0b2ac5b6" - end - - resource "azure-mgmt-applicationinsights" do - url "https://files.pythonhosted.org/packages/83/ad/27c3e2c618c08ea451a80d6a0dc5b73b8c8c2392706909f297c37389766f/azure-mgmt-applicationinsights-0.1.1.zip" - sha256 "f10229eb9e3e9d0ad20188b8d14d67055e86f3815b43b75eedf96b654bee2a9b" - end - - resource "azure-mgmt-authorization" do - url "https://files.pythonhosted.org/packages/14/d2/9a6cf1dd65feaddf43f30ddd89bce7da74ced856d459b11a6a1d5ada0f4e/azure-mgmt-authorization-0.52.0.zip" - sha256 "16a618c4357c11e96de376856c396f09e76a56473920cdf7a66735fabaa2a70c" - end - - resource "azure-mgmt-batch" do - url "https://files.pythonhosted.org/packages/a3/f8/a91baa48ef5097d89cf4c7381b76657931fe525fad4d912bd6ac62386ac6/azure-mgmt-batch-9.0.0.zip" - sha256 "03417eecfa1fac906e674cb1cb43ed7da27a96277277b091d7c389ba39f6c3fe" - 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/eb/8e/f523bf5c10abd10c945d0911a6988b9ee347464939d8b9cf769721bdbcb3/azure-mgmt-botservice-0.2.0.zip" - sha256 "b21d8858e69aa16d25b908c40116a1f773c127ec4dd602cbb8542ebf39a55d83" - end - - resource "azure-mgmt-cdn" do - url "https://files.pythonhosted.org/packages/04/27/73a2b2ea8470056d5c0cb4ff63ddf2a7945aad4bda46fa12dd8607b0388f/azure-mgmt-cdn-4.1.0rc1.zip" - sha256 "853c73d612f5d97387e079c5841a9f1a05702173d0c7c0c59ba7b0fd86380503" - end - - resource "azure-mgmt-cognitiveservices" do - url "https://files.pythonhosted.org/packages/e7/60/42010ab991a9e9ae7fb9f8fba883f7f9e0a51549eb4aea2ff757b74a9733/azure-mgmt-cognitiveservices-6.2.0.zip" - sha256 "93503507ba87c18fe24cd3dfcd54e6e69a4daf7636f38b7537e09cee9a4c13ce" - end - - resource "azure-mgmt-compute" do - url "https://files.pythonhosted.org/packages/84/eb/9badfde9c80b462331ca0c567fd892108120374815f0217928f1f02ee811/azure-mgmt-compute-12.0.0.zip" - sha256 "187dd375211ac9fd498d701ff41785760adc431a63cee93391d15e27de48f86f" - 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/95/3b/513362470b6b61fe2a5067e5426351a40fe8d6bd7197a5355d2957928b4d/azure-mgmt-containerinstance-1.5.0.zip" - sha256 "b055386f04ba8433112b0df7fcbc260b5208828d7bb8c057e760fe596aa7a8cd" - end - - resource "azure-mgmt-containerregistry" do - url "https://files.pythonhosted.org/packages/5e/1e/37a7ac4416951c12322713b7c9aff3cf3eed97d93b96250ad2995a7d8ed2/azure-mgmt-containerregistry-3.0.0rc13.zip" - sha256 "9ff2e68f93f5772f63a0d3efbe11a4f87d7c3e163cd1b2930ccf6137d293b2c6" - end - - resource "azure-mgmt-containerservice" do - url "https://files.pythonhosted.org/packages/80/bf/e5c3fae434b8bc9ef8c01a2c41937eee5a28f3c5c690086cc371019bd538/azure-mgmt-containerservice-9.0.1.zip" - sha256 "7e4459679bdba4aa67a4b5848e63d94e965a304a7418ef7607eb7a9ce295d886" - end - - resource "azure-mgmt-core" do - url "https://files.pythonhosted.org/packages/9f/db/8dd2b44f840b68ebfe83f600eeb91dde9302d10a88863540de72defbd710/azure-mgmt-core-1.0.0.zip" - sha256 "510faf49a10daec8346cc086143d8e667ef3b4f8c8022a8e710091027631a55e" - end - - resource "azure-mgmt-cosmosdb" do - url "https://files.pythonhosted.org/packages/5f/cd/ddc4b14f0a5968127dd32ca459d34441c96dde979ef4625ac406231d33bc/azure-mgmt-cosmosdb-0.14.0.zip" - sha256 "692544dd2fa6276a7a4b4e094e2a5e0915d29b7829e266c6ade2b17a5fdcc2a9" - end - - resource "azure-mgmt-datalake-analytics" do - url "https://files.pythonhosted.org/packages/f4/c6/6b273e3b7bc17c13ef85c0ebc6bf7bbd8289a46892ee5bef1f0859aff11d/azure-mgmt-datalake-analytics-0.2.1.zip" - sha256 "4c7960d094f5847d9a456c18b8a3c8e60c428e3080a3905f1c943d81ba6351a4" - 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-deploymentmanager" do - url "https://files.pythonhosted.org/packages/9d/21/548a9b6b85814fd73f61531f555230d846213a95f4612d0811ff916b71f8/azure-mgmt-deploymentmanager-0.2.0.zip" - sha256 "46e342227993fc9acab1dda42f2eb566b522a8c945ab9d0eea56276b46f6d730" - end - - resource "azure-mgmt-devtestlabs" do - url "https://files.pythonhosted.org/packages/f0/18/ef3217b4ef0acc25d1ed20f5e873f6ad3fe80dafaf8b9c17349063bb1d98/azure-mgmt-devtestlabs-4.0.0.zip" - sha256 "59549c4c4068f26466b1097b574a8e5099fb2cd6c8be0a00395b06d3b29e278d" - 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/8d/e6/f805cd9731bdf21e4dba9a1b341b6ff3cd69747bdbd954164d8187af6deb/azure-mgmt-eventgrid-2.2.0.zip" - sha256 "c62058923ed20db35b04491cd1ad6a692f337244d05c377ecc14a53c06651cc3" - end - - resource "azure-mgmt-eventhub" do - url "https://files.pythonhosted.org/packages/44/6c/5cfde3068936b2faf584fe57a7ba191b590ab01e9b56321b96dceb1d7ebf/azure-mgmt-eventhub-4.0.0.zip" - sha256 "65223196cf132899656c2f9cb71a14c972d99e5ecd815ee050dae1072cb73ae2" - end - - resource "azure-mgmt-hdinsight" do - url "https://files.pythonhosted.org/packages/e4/ea/f13b7b9ea9f4fb39c84829d2c0d5fda8c11a0c9fc51432bc0712bba85510/azure-mgmt-hdinsight-1.4.0.zip" - sha256 "9bf9cf9213acf028a0332fd4ee9f15ed90cad7b06c79ccb1f42afff08f74b57e" - end - - resource "azure-mgmt-imagebuilder" do - url "https://files.pythonhosted.org/packages/25/37/63e5eca05f58b7d9d9f0525f389f1938afe0f593e4216679fb8af4a5bc6b/azure-mgmt-imagebuilder-0.4.0.zip" - sha256 "4c9291bf16b40b043637e5e4f15650f71418ac237393e62219cab478a7951733" - end - - resource "azure-mgmt-iotcentral" do - url "https://files.pythonhosted.org/packages/66/51/aab8a442dca004f4e2d71c33e15a9d7a15149a0bdb382a7409912c998e19/azure-mgmt-iotcentral-3.0.0.zip" - sha256 "f6dacf442ccae2f18f1082e80bcbdcaa8c0efa2ba92b48c5db6ee01d37240047" - end - - resource "azure-mgmt-iothub" do - url "https://files.pythonhosted.org/packages/28/d2/6868d49c45ddc6bdd8b85d45044ce7ba7373d4524981413c806aada18955/azure-mgmt-iothub-0.12.0.zip" - sha256 "da20ee2b9b9a2c2f89be9037c3ee5421152e7f6d718eafbf50a91dbf0a07ffa0" - 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/b7/4f/b546ce6eb5b6ac38a4f0efb61a24156b05a0eb9df7ed250bfc774f1b668d/azure-mgmt-keyvault-2.2.0.zip" - sha256 "1883e12eeb5819064dc52bf3a3ade05c791f4b66e4aeec948bda28df6ce2bce4" - end - - resource "azure-mgmt-kusto" do - url "https://files.pythonhosted.org/packages/0d/79/887c8f71d7ebd87e4f2359f6726a0a881f1c9369167bf075bf22ba39751c/azure-mgmt-kusto-0.3.0.zip" - sha256 "9eb8b7781fd4410ee9e207cd0c3983baf9e58414b5b4a18849d09856e36bacde" - end - - resource "azure-mgmt-loganalytics" do - url "https://files.pythonhosted.org/packages/a5/fa/4ab21d84921e8ba30869c23c82f79c3e22a953cb5cb8c0f469e4c74f64df/azure-mgmt-loganalytics-0.6.0.zip" - sha256 "a1527fe8b1e8a47558bfa03bd6c587706d8fb9213142aea42da07397daa2d039" - end - - resource "azure-mgmt-managedservices" do - url "https://files.pythonhosted.org/packages/f8/db/faab14079c628202d771a2bc33016326de6d194d1460fd8e531a59664371/azure-mgmt-managedservices-1.0.0.zip" - sha256 "fed8399fc6773aada37c1d0496a46f59410d77c9494d0ca5967c531c3376ad19" - end - - resource "azure-mgmt-managementgroups" do - url "https://files.pythonhosted.org/packages/f2/03/30442b6025da7a730b24b5d208119740382e2c5135ec0b96a1003b3c86fe/azure-mgmt-managementgroups-0.2.0.zip" - sha256 "3d5237947458dc94b4a392141174b1c1258d26611241ee104e9006d1d798f682" - 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/e9/90/1bf9d50614acee60ba5447bc9db6d63930f1559182fa8266ccac60a96dd3/azure-mgmt-marketplaceordering-0.2.1.zip" - sha256 "dc765cde7ec03efe456438c85c6207c2f77775a8ce8a7adb19b0df5c5dc513c2" - end - - resource "azure-mgmt-media" do - url "https://files.pythonhosted.org/packages/0a/1e/cd988525891597f650b3f0706bb9dc7f5b568293e0f33655fbfb2276582b/azure-mgmt-media-2.1.0.zip" - sha256 "f5198c867c0fa32f1affb3ba0165b25f583ac13d3ae7f655771f3e0e2083c0df" - end - - resource "azure-mgmt-monitor" do - url "https://files.pythonhosted.org/packages/45/32/8767fc3bb64e49acf5b5cc3c15cca3da89b17398069adf0a6a209af3a6c7/azure-mgmt-monitor-0.9.0.zip" - sha256 "68e9e1305f2792f865188de916c6ab987af9316ae5e9ec612c1bf28f43f6129c" - 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-netapp" do - url "https://files.pythonhosted.org/packages/53/4d/47af63891c6d19e7567d6af6c082a40412f48d408d7eeee4f568017ced21/azure-mgmt-netapp-0.8.0.zip" - sha256 "67df7c7391c2179423a95927a639492c3a177bff8f3a80e4b2d666a86e2d6f6d" - end - - resource "azure-mgmt-network" do - url "https://files.pythonhosted.org/packages/e7/65/b75d8d1fb8a520e6f522107a72629fb145a998d53e2d09c54d96718438e5/azure-mgmt-network-10.2.0.zip" - sha256 "d50c74cdc1c9be6861ddef9adffd3b05afc5a5092baf0209eea30f4439cba2d9" - 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/a8/39/eadd30f1b319682e0377f95c5113398b50576fe4bc2a342e10d465eca014/azure-mgmt-policyinsights-0.4.0.zip" - sha256 "cff0fe9e04242b5fcd9db9f31e8a7eeaa13e8681678dbe49615b82cad3cfc9ac" - end - - resource "azure-mgmt-privatedns" do - url "https://files.pythonhosted.org/packages/1b/88/bd382d401e58b87df086f0218af94e7defd78f7cb300427eee3d25a9d7a1/azure-mgmt-privatedns-0.1.0.zip" - sha256 "d29cfd8cec806e06673d9382d3f5766fc65d9a9de75b424705094a34a7db8d23" - end - - resource "azure-mgmt-rdbms" do - url "https://files.pythonhosted.org/packages/33/c7/c50fa3c7fda5d58b313b247580a59dc78f6fb16ed50f843e355eb85bfe5a/azure-mgmt-rdbms-2.2.0.zip" - sha256 "f93344897a9bfa6ebc57dd0c10ad79602ff7965c322c65115e3f4b8584bbe1c7" - end - - resource "azure-mgmt-recoveryservices" do - url "https://files.pythonhosted.org/packages/7c/67/9857c8741d0ccbc4bd22af3350df974631c2b04a62e4fcbdb704bc05dae3/azure-mgmt-recoveryservices-0.4.0.zip" - sha256 "e1e794760232239f8a9328d5de1740565ff70d1612a2921c9609746ba5671e6c" - end - - resource "azure-mgmt-recoveryservicesbackup" do - url "https://files.pythonhosted.org/packages/07/dc/f7609a3d6adbd6f4f79029ff16f23e9cc3853924e8a87d548fda59968023/azure-mgmt-recoveryservicesbackup-0.6.0.zip" - sha256 "4df62479c90a6f93e7689f9d58e0a139899f0407f5e3298d5ce014442599428f" - end - - resource "azure-mgmt-redhatopenshift" do - url "https://files.pythonhosted.org/packages/28/9c/e93323b264196847b41e08dc7cfadfc91a7c1b4df1c5eb532261eaa717aa/azure-mgmt-redhatopenshift-0.1.0.zip" - sha256 "565afbc63f5283f37c76135174f2ca20dd417da3e24b3fb1e132c4a0e2a2c5bc" - end - - resource "azure-mgmt-redis" do - url "https://files.pythonhosted.org/packages/df/28/f2a864d6f24db21afdcdd18d72d668cd342d0e47fcca9fef87d4f459cef3/azure-mgmt-redis-7.0.0rc1.zip" - sha256 "d3cc259c507b79962495ed00d0a3432a45e4e90a0fb48b49e80d51cdc398dc20" - 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/97/0a/eb194a08fd35bda1e6b27ef227241ac36c8abb3bf3a201772c2777a74caf/azure-mgmt-reservations-0.6.0.zip" - sha256 "83a9a70d6fd78b8b3e92ca64bbc1fde8d1bc5e2efea54076052c51c946b4cc9b" - end - - resource "azure-mgmt-resource" do - url "https://files.pythonhosted.org/packages/cc/1b/bfe8d07b4ae62296aa91fbb828a7e2e0f932026ea7643faa54c680b4cf55/azure-mgmt-resource-10.0.0.zip" - sha256 "bd9a3938f5423741329436d2da09693845c2fad96c35fadbd7c5ae5213208345" - end - - resource "azure-mgmt-search" do - url "https://files.pythonhosted.org/packages/e7/9d/6aae72f83c1a30d6b0fb9b7892ddf150b8e6bc0f01a82e53c675877944aa/azure-mgmt-search-2.1.0.zip" - sha256 "92a40a1a7a9e3a82b6fa302042799e8d5a67d3996c20835af72afc14f1610501" - end - - resource "azure-mgmt-security" do - url "https://files.pythonhosted.org/packages/17/0b/2cbe5e7acde4d8bd234ebe9dff49dddaeb9a18ba369c6a56b81aabc77c33/azure-mgmt-security-0.4.1.zip" - sha256 "391c8df5400485049a6c19d50e536304c186bb64fd569eec0c6d01d20220ee21" - end - - resource "azure-mgmt-servicebus" do - url "https://files.pythonhosted.org/packages/8f/bd/fdb9db085a1590ef13e683f3aa6462c6fe70fb1e61e69212017abe58b419/azure-mgmt-servicebus-0.6.0.zip" - sha256 "f20920b8fb119ef4abeda4d2dac765a4fc48cd0bcf30c27f8c4cc6d890bc08b1" - end - - resource "azure-mgmt-servicefabric" do - url "https://files.pythonhosted.org/packages/b3/70/c56151be8560b525d9df9771e57c8ff8982ec946b28244d81b4a52609794/azure-mgmt-servicefabric-0.4.0.zip" - sha256 "a2cbd2797e796a550a93d37229b2ded22765f50166730a63c8e20a27677e28f4" - end - - resource "azure-mgmt-signalr" do - url "https://files.pythonhosted.org/packages/6b/70/26d29a7a31a4c95ac2de05358c2beec0c033033de23bc0ef6452af3fb626/azure-mgmt-signalr-0.3.0.zip" - sha256 "0a6c876434f1a51bfbf1c4cea3f7167329f4ea86c12ba8ce8123d8f4b9896221" - end - - resource "azure-mgmt-sql" do - url "https://files.pythonhosted.org/packages/30/10/4c8bbf2307201652110882768fa32503d220e3ad5a509ff5cd76e5385294/azure-mgmt-sql-0.18.0.zip" - sha256 "99ca085eb523a5c27933060ccb04d7a6b60864f98d87bf5b63ac17d419b43445" - end - - resource "azure-mgmt-sqlvirtualmachine" do - url "https://files.pythonhosted.org/packages/f6/03/efe8f2ea66d51a23d908ab08c6a7b5f55b43c16bafb8d703f69594c635cf/azure-mgmt-sqlvirtualmachine-0.5.0.zip" - sha256 "b5a9423512a7b12844ac014366a1d53c81017a14f39676beedf004a532aa2aad" - end - - resource "azure-mgmt-storage" do - url "https://files.pythonhosted.org/packages/c9/5c/be65bfd6ccae0da4fd5331ff3b3058150ddd71410733845d895ab51febf4/azure-mgmt-storage-11.0.0.zip" - sha256 "f9791c2a84eee0a55bbf757632a2a4d1e102db958e75422d5e0e7306041129b8" - end - - resource "azure-mgmt-trafficmanager" do - url "https://files.pythonhosted.org/packages/14/98/6fb3bc67bb862b7bac2ea43108aa1648f72c8fa63de22ab1e58278224c43/azure-mgmt-trafficmanager-0.51.0.zip" - sha256 "fc8ae77022cfe52fda4379a2f31e0b857574d536e41291a7b569b5c0f4104186" - end - - resource "azure-mgmt-web" do - url "https://files.pythonhosted.org/packages/bd/c2/b6ef2087292a0d9f50ef30ed162aee23360164953989e1f3d1e4a95efd20/azure-mgmt-web-0.46.0.zip" - sha256 "e1988aa2b91e6b5aa84e48ac02d5546945bdc2d8331744869e923ba15066c4a6" - end - - resource "azure-multiapi-storage" do - url "https://files.pythonhosted.org/packages/55/25/30837f08287ef51b12aefaeb4f064c5e16ac2fe9b5c39a987c95ad389386/azure-multiapi-storage-0.3.2.tar.gz" - sha256 "c403a47e40e4a80d9c42c854993f5c07f12c2a75bd9a85ba8225985493a9b792" - 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/52/2e/21691005508ab03b88b99ad13b52275543623be9acfc96f4ce162b6a35e3/azure-storage-blob-1.5.0.tar.gz" - sha256 "f187a878e7a191f4e098159904f72b4146cf70e1aabaf6484ab4ba72fc6f252c" - 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 "bcrypt" do - url "https://files.pythonhosted.org/packages/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz" - sha256 "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/c5/67/5d0548226bcc34468e23a0333978f0e23d28d0b3f0c71a151aef9c3f7680/certifi-2019.6.16.tar.gz" - sha256 "945e3ba63a0b9f577b1395204e13c3a231f9bc0223888be653286534e5873695" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz" - sha256 "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651" - end - - resource "fabric" do - url "https://files.pythonhosted.org/packages/cf/3c/19f930f9e74c417e2c617055ceb2be6aee439ac68e07b7d3b3119a417191/fabric-2.4.0.tar.gz" - sha256 "93684ceaac92e0b78faae551297e29c48370cede12ff0f853cdebf67d4b87068" - end - - resource "humanfriendly" do - url "https://files.pythonhosted.org/packages/53/1e/cde1153172d0d2bdf68845b8a52f8dd1bdd509f506d123a32a751a1bb0bd/humanfriendly-8.0.tar.gz" - sha256 "2f79aaa2965c0fc3d79452e64ec2c7601d70d67e51ea2e99cb40afe3fe2824c5" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "importlib-metadata" do - url "https://files.pythonhosted.org/packages/aa/9a/8483b77e2decd95963d7e34bc9bc91a26e71fd89b57d8cf978ca24747c7f/importlib_metadata-1.6.1.tar.gz" - sha256 "0505dd08068cfec00f53a74a0ad927676d7757da81b7436a6eefe4c7cf75c545" - end - - resource "invoke" do - url "https://files.pythonhosted.org/packages/ef/80/cef14194e2dd62582cc0a4f5f2db78fb00de3ba5d1bc0e50897b398ea984/invoke-1.2.0.tar.gz" - sha256 "dc492f8f17a0746e92081aec3f86ae0b4750bf41607ea2ad87e5a7b5705121b7" - end - - resource "isodate" do - url "https://files.pythonhosted.org/packages/b1/80/fb8c13a4cd38eb5021dc3741a9e588e4d1de88d895c1910c6fc8a08b7a70/isodate-0.6.0.tar.gz" - sha256 "2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8" - end - - resource "javaproperties" do - url "https://files.pythonhosted.org/packages/db/43/58b89453727acdcf07298fe0f037e45b3988e5dcc78af5dce6881d0d2c5e/javaproperties-0.5.1.tar.gz" - sha256 "2b0237b054af4d24c74f54734b7d997ca040209a1820e96fb4a82625f7bd40cf" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/93/ea/d884a06f8c7f9b7afbc8138b762e80479fb17aedbbe2b06515a12de9378d/Jinja2-2.10.1.tar.gz" - sha256 "065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/5c/40/3bed01fc17e2bb1b02633efc29878dfa25da479ad19a69cfb11d2b88ea8e/jmespath-0.9.5.tar.gz" - sha256 "cca55c8d153173e21baa59983015ad0daf603f9cb799904ff057bfb8ff8dc2d9" - end - - resource "jsmin" do - url "https://files.pythonhosted.org/packages/17/73/615d1267a82ed26cd7c124108c3c61169d8e40c36d393883eaee3a561852/jsmin-2.2.2.tar.gz" - sha256 "b6df99b2cd1c75d9d342e4335b535789b8da9107ec748212706ef7bbe5c2553b" - end - - resource "jsondiff" do - url "https://files.pythonhosted.org/packages/64/5c/2b4b0ae4d42cb1b0b1a89ab1c4d9fe02c72461e33a5d02009aa700574943/jsondiff-1.2.0.tar.gz" - sha256 "34941bc431d10aa15828afe1cbb644977a114e75eef6cc74fb58951312326303" - end - - resource "knack" do - url "https://files.pythonhosted.org/packages/c8/10/e82a2ec2cddb1aff137892d5a86b7204e58eb735f7924fc288ac0072d61d/knack-0.7.1.tar.gz" - sha256 "fcef6040164ebe7d69629e4e089b398c9b980791446496301befcf8381dba0fc" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "mock" do - url "https://files.pythonhosted.org/packages/2e/35/594f501b2a0fb3732c8190ca885dfdf60af72d678cd5fa8169c358717567/mock-4.0.2.tar.gz" - sha256 "dd33eb70232b6118298d516bbcecd26704689c386594f0f3c4f13867b2c56f72" - end - - resource "msal-extensions" do - url "https://files.pythonhosted.org/packages/7c/9d/a0294d164cdba0098846dcd4d6c2b880d768d0fc013d82378a9f291ff1f9/msal-extensions-0.1.3.tar.gz" - sha256 "59e171a9a4baacdbf001c66915efeaef372fb424421f1a4397115a3ddd6205dc" - end - - resource "msal" do - url "https://files.pythonhosted.org/packages/5c/9e/f34e9823b1dcb8fef1828d52e348761d4d0ac5a0a50b04a1f3e605aea4a4/msal-1.0.0.tar.gz" - sha256 "ecbe3f5ac77facad16abf08eb9d8562af3bc7184be5d4d90c9ef4db5bde26340" - end - - resource "msrest" do - url "https://files.pythonhosted.org/packages/20/f8/3866540838ddfe1d8e703f1c4fcd0e80e47e78bf79104b060e2b836bc1dc/msrest-0.6.16.tar.gz" - sha256 "214c5be98954cb45feb6a6a858a7ae6d41a664e80294b65db225bbaa33d9ca3c" - end - - resource "msrestazure" do - url "https://files.pythonhosted.org/packages/33/09/3e739919833155dfa6126bcd00a406fb9beab7ca002022c65b7e7e9cd1eb/msrestazure-0.6.3.tar.gz" - sha256 "0ec9db93eeea6a6cf1240624a04f49cd8bbb26b98d84a63a8220cfda858c2a96" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/ec/90/882f43232719f2ebfbdbe8b7c57fc9642a25b3df30cb70a3701ea22622de/oauthlib-3.0.1.tar.gz" - sha256 "0ce32c5d989a1827e3f1148f98b9085ed2370fc939bf524c9c851d8714797298" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/54/68/dde7919279d4ecdd1607a7eb425a2874ccd49a73a5a71f8aa4f0102d3eb8/paramiko-2.6.0.tar.gz" - sha256 "f4b2edfa0d226b70bd4ca31ea7e389325990283da23465d572ed1f70a7583041" - end - - resource "portalocker" do - url "https://files.pythonhosted.org/packages/64/9f/cdf0db3a74307d9a000ec049f34a122c889f25224518d516519a2d8a7fba/portalocker-1.4.0.tar.gz" - sha256 "3fb35648a9e03f267e54c6186513abbd1cdd321c305502545a3550eea8b2923f" - 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/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - 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 "pkginfo" do - url "https://files.pythonhosted.org/packages/6c/04/fd6683d24581894be8b25bc8c68ac7a0a73bf0c4d74b888ac5fe9a28e77f/pkginfo-1.5.0.1.tar.gz" - sha256 "7424f2c8511c186cd5424bbf31045b77435b37a8d604990b79d4e70d741148bb" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/40/d0/8efd61531f338a89b4efa48fcf1972d870d2b67a7aea9dcf70783c8464dc/pyOpenSSL-19.0.0.tar.gz" - sha256 "aeca66338f6de19d1aa46ed634c3b9ae519a64b458f8468aec688e7e3c20f200" - 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/df/d5/3e3ff673e8f3096921b3f1b79ce04b832e0100b4741573154b72b756a681/pytz-2019.1.tar.gz" - sha256 "d747dd3d23d77ef44c6a3526e274af6efeb0a6f1afd5a69ba4d5be4098c8e141" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz" - sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4" - 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 "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - 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/c2/fd/202954b3f0eb896c53b7b6f07390851b1fd2ca84aa95880d7ae4f434c4ac/tabulate-0.8.3.tar.gz" - sha256 "8af07a39377cee1103a5c8b3330a421c2d99b9141e9cc5ddd2e3263fea416943" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/4c/13/2386233f7ee40aa8444b47f7463338f3cbdf00c316627558784e3f542f07/urllib3-1.25.3.tar.gz" - sha256 "dbe59173209418ae49d485b87d1681aefa36252ee85884c31346debd19463232" - end - - resource "vsts" do - url "https://files.pythonhosted.org/packages/ce/fa/4405cdb2a6b0476a94b24254cdfb1df7ff43138a91ccc79cd6fc877177af/vsts-0.1.25.tar.gz" - sha256 "da179160121f5b38be061dbff29cd2b60d5d029b2207102454d77a7114e64f97" - 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 "websocket_client" do - url "https://files.pythonhosted.org/packages/c5/01/8c9c7de6c46f88e70b5a3276c791a2be82ae83d8e0d0cc030525ee2866fd/websocket_client-0.56.0.tar.gz" - sha256 "1fd5520878b68b84b5748bb30e592b10d0a91529d5383f74f4964e72b297fd3a" - end - - resource "xmltodict" do - url "https://files.pythonhosted.org/packages/58/40/0d783e14112e064127063fbf5d1fe1351723e5dfe9d6daad346a305f6c49/xmltodict-0.12.0.tar.gz" - sha256 "50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21" - end - - resource "zipp" do - url "https://files.pythonhosted.org/packages/ce/8c/2c5f7dc1b418f659d36c04dec9446612fc7b45c8095cc7369dd772513055/zipp-3.1.0.tar.gz" - sha256 "c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96" - end - - def install - # Work around Xcode 11 clang bug - # https://code.videolan.org/videolan/libbluray/issues/20 - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - venv = virtualenv_create(libexec, "python3") - 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", - buildpath/"src/azure-cli-nspkg", - buildpath/"src/azure-cli-command_modules-nspkg", - ] - - # Install CLI - components.each do |item| - cd item do - venv.pip_install item - end - end - - (bin/"az").write <<~EOS - #!/usr/bin/env bash - AZ_INSTALLER=HOMEBREW #{libexec}/bin/python -m azure.cli \"$@\" - 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 47d8dc2d1dbd9..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/v7.5.0.tar.gz" - sha256 "446a821d115949f6511b7eb01e6a0e4f014b17bfeba0f3dc33a51750a9d5eca5" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "cca19a55ebebdfbc2f38b1a358868b66238d3e0ac748019ad2ec82ec2475170f" => :catalina - sha256 "7d6e3641f5a0ac840b508f83209f63bc511639112439017bab30afbd3d98611f" => :mojave - sha256 "0513ca4194954b2e69a741c49068f27c043f3cc88535c288cce9f04048b3477b" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "cpprestsdk" - depends_on "gettext" - depends_on "openssl@1.1" - - 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@1.1"].include}", - "-I#{Formula["cpprestsdk"].include}", - "-L#{Formula["boost"].lib}", - "-L#{Formula["cpprestsdk"].lib}", - "-L#{Formula["openssl@1.1"].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..007fabe428418 --- /dev/null +++ b/Formula/b/b2-tools.rb @@ -0,0 +1,129 @@ +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/b0/56/7f75c6f64b617f2e4cf71079b21b7fdd440fc90038c8cd367c0b7b5e51ba/b2-4.3.2.tar.gz" + sha256 "6c05cfec087c4be88446337689b10f7c61bf164567b1b48dd298f745d053e1e2" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3b9de31799689402a421b419e2e25b49cfbb86c6397661f2fa3e379072f5adbb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3b9de31799689402a421b419e2e25b49cfbb86c6397661f2fa3e379072f5adbb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3b9de31799689402a421b419e2e25b49cfbb86c6397661f2fa3e379072f5adbb" + sha256 cellar: :any_skip_relocation, sonoma: "ba1e790a6b2da932e52e28dae95571c3ad74895c34eea62329292b03cc90b05a" + sha256 cellar: :any_skip_relocation, ventura: "ba1e790a6b2da932e52e28dae95571c3ad74895c34eea62329292b03cc90b05a" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae170835b13e87a0a8b32556be68810f3b0564dbae417756744d23a996118963" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae170835b13e87a0a8b32556be68810f3b0564dbae417756744d23a996118963" + end + + depends_on "certifi" + depends_on "python@3.13" + + conflicts_with "boost-build", because: "both install `b2` binaries" + + 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/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + resource "arrow" do + url "https://files.pythonhosted.org/packages/2e/00/0f6e8fcdb23ea632c866620cc872729ff43ed91d284c866b515c6342b173/arrow-1.3.0.tar.gz" + sha256 "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" + end + + resource "b2sdk" do + url "https://files.pythonhosted.org/packages/7e/22/efb0f884c880c715becc52588dc8ed29578d0aaaa31ac94f3160c972beb7/b2sdk-2.8.1.tar.gz" + sha256 "f75d9980259a42915228c3deee475b2b7d5bc252d8c3228a8c3727ad9c68a343" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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 "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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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 "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/a9/60/47d92293d9bc521cd2301e423a358abfac0ad409b3a1606d8fbae1321961/types_python_dateutil-2.9.0.20241206.tar.gz" + sha256 "18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + def install + virtualenv_install_with_resources + + system bin/"b2", "install-autocomplete", "--shell", "bash" + bash_completion.install "#{Dir.home}/.bash_completion.d/b2" + 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..90926f9f74019 --- /dev/null +++ b/Formula/b/b2sum.rb @@ -0,0 +1,40 @@ +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"] + + bottle do + 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, mojave: "905b975371fd88632649e08f732ff25277cd1fd4b584dbc3e4914bcb08f85cd8" + sha256 cellar: :any_skip_relocation, high_sierra: "129dbe4d91bf7843a40399b392b3ddc2448e56c249a45567bd9193e4fb722b37" + 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..5c193257e3dde --- /dev/null +++ b/Formula/b/b3sum.rb @@ -0,0 +1,34 @@ +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_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/b43-fwcutter.rb b/Formula/b/b43-fwcutter.rb new file mode 100644 index 0000000000000..91a5c2ffd47be --- /dev/null +++ b/Formula/b/b43-fwcutter.rb @@ -0,0 +1,46 @@ +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 + + bottle do + rebuild 2 + 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, mojave: "244e2363a7eff64ea8708724a386796d8fbf6d49677519a4132a2296faa0c411" + 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..cabe5e9c4ce50 --- /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.27.2.tgz" + sha256 "e8e435effda89bd5337945a5ecaae4aaeb8701859f30d8c07ca3ada094b586fe" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "14e1121e6cddd8c3be65a3734f55b26031b54a3bc6b6e1be34371329947b44a4" + 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..76756d4b66401 --- /dev/null +++ b/Formula/b/babeld.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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..d524f08d68c8f --- /dev/null +++ b/Formula/b/babelfish.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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..5cfd7f02836aa --- /dev/null +++ b/Formula/b/babl.rb @@ -0,0 +1,63 @@ +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.114.tar.xz" + sha256 "bcbb7786c1e447703db3bc7fa34d62d0d2d117b22f04d8834c7b2d5ded456487" + 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_sequoia: "5ce954090d32baf2105b51b9181fc0033dd948598929f5391b17d3f64d89d6fb" + sha256 arm64_sonoma: "ebea9657244533795a3b5244acff93bdb0c68394e3f337b513fe10fa31e82ac2" + sha256 arm64_ventura: "d69c75d99f6b01bb19b7e575bc05f2a105b5d16e6122c106c013163eb0afa63f" + sha256 sonoma: "711bcc1ca2003825471449a9d759f71c34e971909e6b5d46285c0bbc04d37198" + sha256 ventura: "80fac3c8153b352e4cae06c647461c1eccb8caa0295c5472354fd25719240178" + sha256 arm64_linux: "a6b592bfd886d0c851e52d4d58698b4b0f141a7e6c469fde635ba320444c6d48" + sha256 x86_64_linux: "3da3985cdc276fdfed64fce9fffdbbe174f5bd66ba2a9592619b80cc92b95a78" + 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/backupninja.rb b/Formula/b/backupninja.rb new file mode 100644 index 0000000000000..537fa186bd99a --- /dev/null +++ b/Formula/b/backupninja.rb @@ -0,0 +1,49 @@ +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 + + bottle do + 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..af2eedcb0a09c --- /dev/null +++ b/Formula/b/bacon-ls.rb @@ -0,0 +1,54 @@ +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.21.0.tar.gz" + sha256 "85435d98030c54ef52598827018f9df587d60ff7a8dff3915198778546ca7c93" + license "MIT" + head "https://github.com/crisidev/bacon-ls.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9b82dd97acdfd53d0dc57a7fe745f259b15d790423031b040adb6df4a404d0ba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2aa0aedfa2e59d69864ce7d7168dfcd48d70ce020670ece905eee32829b5d696" + sha256 cellar: :any_skip_relocation, arm64_ventura: "35df93544835de2c3c8a48cb79b0c3378c92621e290caf885ab1cec5e2781f59" + sha256 cellar: :any_skip_relocation, sonoma: "5fcf90e18aab7226fe5ed3de68a7a61e3765a89ee726a580d04040033bd400df" + sha256 cellar: :any_skip_relocation, ventura: "57328026d6c8a343cb2ca2d2b463eabb615f6b5481e383e8020a24ea9ec908ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "3a258ecb0f26c3ce44cf31cdb67a1cf931233c2eaf16c60b45d291383f3493b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f301ef0cef24db40b1a2a3c644a7867965713c6440d1893d37a78182dd5872e" + 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..2c7da61f3d412 --- /dev/null +++ b/Formula/b/bacon.rb @@ -0,0 +1,63 @@ +class Bacon < Formula + desc "Background rust code check" + homepage "https://dystroy.org/bacon/" + url "https://github.com/Canop/bacon/archive/refs/tags/v3.13.0.tar.gz" + sha256 "016a980181d90f38b7bc2227997a68afd0144c0cf2004dbfdf6dc165147dfcc5" + license "AGPL-3.0-or-later" + head "https://github.com/Canop/bacon.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "22465bcf695cb7aadae179165fc3bd3a063b0940d193f30dd61ab65bc9b99ba8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af4bdb76a9b73a75cb3c239e541706a1f89e08e28fa912a9d62998f0d4c861e2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6fac6bac88b34924e61df7b230863490a8d6e2dd3fe65d649de4632510949ed4" + sha256 cellar: :any_skip_relocation, sonoma: "eb3ac0bf72bf3f24195c5ec7d9e1bd336e6a367bc4d8a39e6a3858de91077e19" + sha256 cellar: :any_skip_relocation, ventura: "3e06862328aa759b5f85ff1f2f6cb0b62dbdcbaa8f47f14f0e5f5a74b484000f" + sha256 cellar: :any_skip_relocation, arm64_linux: "b1e5fa783e642cb874e8acf99d1c757ad220db88739569be5d24a7383a655332" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e232a179a601ea7b9e37cacfa2af5286723ed78670aacfc482f4c83da7d50e49" + 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..de1e64d102593 --- /dev/null +++ b/Formula/b/bacula-fd.rb @@ -0,0 +1,75 @@ +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 + sha256 arm64_sequoia: "5865d13599bead592dd24ba7ad6b630f1aeb33adadf8a204f63b2778d9f89bee" + sha256 arm64_sonoma: "bbe8baa1d28de02cf1da748963a63c79f7a6a8730af1d43c314809e7f835e649" + sha256 arm64_ventura: "952b7913ffd831cc691731c74aa73976197958187d71cf544755bd8536640ffa" + sha256 sonoma: "9e3fe3200227872cc89e6f9606edc904fbc8e416b87349bb40a6b1faa774c56f" + sha256 ventura: "e16028347bfe77bcd7ac5f511440225b545d256bcd8e53b510a90c1ea5306a24" + sha256 arm64_linux: "7b13e3aead69c44d4ee74e7781414a2aaa4b273710837d5a623c4076f25cbb5e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9427205610275599c958920ccf09b076528aa2ad5e73118260cdae55e15b964" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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 + end + + def post_install + (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..44c0da0b47593 --- /dev/null +++ b/Formula/b/badkeys.rb @@ -0,0 +1,55 @@ +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/8b/fe/01e4617b44bbb352023bc1ee7e2eef4358d59d0bab9677f52698dbff44b1/badkeys-0.0.13.tar.gz" + sha256 "6013a2496221993d726ab624170108b82ed188bf2b03eb032cfaaee17354530e" + license "MIT" + head "https://github.com/badkeys/badkeys.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "091903ae93eaf73bcd25d6af039458e5df16e2802638fdf8d40179f0b993a4ff" + sha256 cellar: :any, arm64_sonoma: "f4d06958f60fdf734839d289015e378324dd38668446312437244db26db0e570" + sha256 cellar: :any, arm64_ventura: "b3e77db1e77edb273e6022bea8440e651fa300263c47b2f8d4045114ad658bfd" + sha256 cellar: :any, sonoma: "4b23d32e958d853a341359f6c2627387e1628cbf72abf3f8edfe749976db58e8" + sha256 cellar: :any, ventura: "71564d54d9739f33b60db86b68761a7f0414a2837df84f2ec8b62f1258701cf4" + sha256 cellar: :any_skip_relocation, arm64_linux: "4bc3a6bf8c1a8cedf53f5725d98e84de9987494b1503f69f2fe18174458b2a1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "336a1ff4d2f198153a7c2ebaea51bc0dc33cb651fff3cf60a36b235477990645" + end + + depends_on "cryptography" + depends_on "gmp" + depends_on "libmpc" + depends_on "mpfr" + depends_on "python@3.13" + + 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/bagels.rb b/Formula/b/bagels.rb new file mode 100644 index 0000000000000..b809c78d9f7f0 --- /dev/null +++ b/Formula/b/bagels.rb @@ -0,0 +1,258 @@ +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/83/3a/67fef626e22bce29970a5666702a7b2664541753abeaed653a0a694dd295/bagels-0.3.9.tar.gz" + sha256 "fbb3bb64d7f6909864004866b00e112917738a6fdf470871ea77b4e2f67d2d28" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3965ab39ce8b7928c55b3e775f9f3eb80a762a8d0389d06494f5c5b7783332f5" + sha256 cellar: :any, arm64_sonoma: "e7808dfef3745bed95d0054bd070d4b626b4a24b2e035db91a72f01d750d289c" + sha256 cellar: :any, arm64_ventura: "41cd8e74fd710b299efc54a6db869cf10522f8411136f8ace9e14294d28877b7" + sha256 cellar: :any, sonoma: "4a73292e823da0ecb9d193eac8a066529f0c32438fdff4f8837e8342f60edad9" + sha256 cellar: :any, ventura: "e157f0c22756bc01974c28d0b6141af3453234ea5b4bf5800c39324b5d0e31f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0c520b26268b807954fa581c1820910a4266df65f0c3ad59973f3acc85aee52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69a2e7e185700ea158cf81c4c825e0f7854750e421eb360caa5cad9a7f720b79" + end + + depends_on "rust" => :build # for pydantic_core + depends_on "libyaml" + depends_on "numpy" + depends_on "python@3.13" + + 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/63/e7/fa1a8c00e2c54b05dc8cb5d1439f627f7c267874e3f7bb047146116020f9/aiohttp-3.11.18.tar.gz" + sha256 "ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a" + 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/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + 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 "certifi" do + url "https://files.pythonhosted.org/packages/e8/9e/c05b3920a3b7d20d3d3310465f50348e5b3694f4f88c6daf736eef3024c4/certifi-2025.4.26.tar.gz" + sha256 "0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6" + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/ee/f4/d744cba2da59b5c1d88823cf9e8a6c74e4659e2b27604ed973be2a0bf5ab/frozenlist-1.6.0.tar.gz" + sha256 "b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68" + end + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/34/c1/a82edae11d46c0d83481aacaa1e578fea21d94a1ef400afd734d47ad95ad/greenlet-3.2.2.tar.gz" + sha256 "ad053d34421a2debba45aa3cc39acf454acbcd025b3fc1a9f8a0dee237abd485" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/19/03/a2ecab526543b152300717cf232bb4bb8605b6edb946c845016fa9c9c9fd/mdit_py_plugins-0.4.2.tar.gz" + sha256 "5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5" + 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/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + 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/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + 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/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/68/c3/3f2bfa5e4dcd9938405fe2fab5b6ab94a9248a4f9536ea2fd497da20525f/sqlalchemy-2.0.40.tar.gz" + sha256 "d827099289c64589418ebbcaead0145cd19f4e3e8a93919a0100247af245fa00" + 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/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz" + sha256 "cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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/62/51/c0edba5219027f6eab262e139f73e2417b0f4efffa23bf562f6e18f76ca5/yarl-1.20.0.tar.gz" + sha256 "686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307" + 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..cee186d4521ac --- /dev/null +++ b/Formula/b/bagit.rb @@ -0,0 +1,40 @@ +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/e5/99/927b704237a1286f1022ea02a2fdfd82d5567cfbca97a4c343e2de7e37c4/bagit-1.8.1.tar.gz" + sha256 "37df1330d2e8640c8dee8ab6d0073ac701f0614d25f5252f9e05263409cee60c" + license "CC0-1.0" + revision 1 + version_scheme 1 + head "https://github.com/LibraryOfCongress/bagit-python.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "c52968f9d307a0525271426a777174e9c488c3a062ea6756a68fbf671ab320d3" + end + + depends_on "python@3.13" + + # Replace pkg_resources with importlib + # https://github.com/LibraryOfCongress/bagit-python/pull/170 + patch do + url "https://github.com/LibraryOfCongress/bagit-python/commit/de842aad182c74de21d09d108050740affb94f2e.patch?full_index=1" + sha256 "f7fab3dead0089f44e6e65930a267f6d69f2589845e9ea4c1d6bbb3847f5ff3a" + end + + 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..9910ca30cfe65 --- /dev/null +++ b/Formula/b/baidupcs-go.rb @@ -0,0 +1,28 @@ +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/v3.9.7.tar.gz" + sha256 "a2dc89951ffb4421eacc992e248ae84e8ba9a971989b47707ed9faf53cc7a519" + license "Apache-2.0" + head "https://github.com/qjfoidnh/BaiduPCS-Go.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e16c4c3187374f9874bf0fc7c67363e62d21710665d4724dd7397a9ca9360ed9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e16c4c3187374f9874bf0fc7c67363e62d21710665d4724dd7397a9ca9360ed9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e16c4c3187374f9874bf0fc7c67363e62d21710665d4724dd7397a9ca9360ed9" + sha256 cellar: :any_skip_relocation, sonoma: "c4242f6ae0c1e2484069223aebfd992f07eafddd44e77252a42a1734ed99e1c0" + sha256 cellar: :any_skip_relocation, ventura: "c4242f6ae0c1e2484069223aebfd992f07eafddd44e77252a42a1734ed99e1c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9f03fe4dae8654f3365f0bdfbe2841097272c827b5cebe577ccd615901cb6ef" + 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..1883791409dcd --- /dev/null +++ b/Formula/b/balena-cli.rb @@ -0,0 +1,58 @@ +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-21.1.11.tgz" + sha256 "ff288f10cfb0c63d1e9d6806f33c23d6ac7380b053446d391d78d9776ba73afe" + 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_sequoia: "9668661e8c6b237bbe1b972dbc9b6b52f0bbd20b90e7087048293119717f6a5a" + sha256 arm64_sonoma: "0c05b50c8f05e5b4c176a6dbdbfee51777056dc4c1b7b5457dfd57e0c4efb2a4" + sha256 arm64_ventura: "46426a67847423b5dba17b2a7df4ab89afb5a16e4cc3e541426dbec4f4249f1c" + sha256 sonoma: "d55319ef9e86deeea97c58c99544fcbc19e00979e4014a06de4c3c7a13cb1eac" + sha256 ventura: "ae7149d58471aab4f68daf7429b8cfd0df0e91cb9bb2baf0765f883e8295f8d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab2fdbf6c3d3d1c7df0deb30cf9880936c2d19abbc68faaaa4553e32890dc446" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a45cdb268b771a7d751cb4c0b0f38311dd5ed2b5266f256159715d41c82d0ed" + end + + # need node@20, and also align with upstream, https://github.com/balena-io/balena-cli/blob/master/.github/actions/publish/action.yml#L21 + depends_on "node@20" + + 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("{ffi-napi,ref-napi}/prebuilds/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + + 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..97277da2fd668 --- /dev/null +++ b/Formula/b/ballerburg.rb @@ -0,0 +1,27 @@ +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_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..9670c57621982 --- /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.3/ballerina-2201.12.3-swan-lake.zip" + sha256 "d70ac8479809e0ad326fdc88de0670d76038d64bebcbf57fadd98bddd405fa53" + 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: "bc11d797ee0c6cdfd8d3ec5bca8aee20553c792209690cdc07d0194ce46c33a1" + 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..1d69f41add10a --- /dev/null +++ b/Formula/b/bam.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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, mojave: "195777b4263d8e5d84e91123ab1c47a362a5d92aa2c5c1cf7ac5c45b7728eb1d" + sha256 cellar: :any_skip_relocation, high_sierra: "59aebec505aba51189ccedb1872affd1c48ca84598caa591c2e0c955817e7cd7" + sha256 cellar: :any_skip_relocation, sierra: "f237da39dd743732f3cfa0a5029b3cce4b332fb08e4326183eece8fd50dcf789" + sha256 cellar: :any_skip_relocation, el_capitan: "4ded8f152aa05211053796e77b9b7a9e5671b9d5871c374a85ee74e6b9cb8e50" + 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..ea5543e9cb2aa --- /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.2.tar.gz" + sha256 "4d8b84bd07b673d0ed41031348f10ca98dd6fa6a4460f9b9668d6f1d4084dfc8" + license "MIT" + revision 2 + head "https://github.com/pezmaster31/bamtools.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "195840857da6e5e0c020ce41c66ad701845977133164ad6717fcde1bc7484ef6" + sha256 cellar: :any, arm64_sonoma: "27089259ae4ea2993a81c7e635b5fbdd37a9e21623ace3dba86a75d967bf3ab3" + sha256 cellar: :any, arm64_ventura: "0104d42510158aced69f6108ab3de5c363e32ca9fc4b6eec8acb7f3858d3f5d7" + sha256 cellar: :any, sonoma: "aa7b96819c55b2e59c375501932eee2e32d091bc64b9a5be8cdad68c18a071b3" + sha256 cellar: :any, ventura: "90df0038551d0a60a82e5f9b43438d5e7731bbeb2a73f0054fe79fb9c97c594c" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc024aec0c01995edd1a1a0450cc4dd94d05498b22dd5a1ec7b600c3e118b32a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "696b432ed15581f9ddc4dd262c03e0b7cdee1ba19b387a86f10e88650740fbf0" + 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..18e28bd562b39 --- /dev/null +++ b/Formula/b/bandcamp-dl.rb @@ -0,0 +1,90 @@ +class BandcampDl < Formula + include Language::Python::Virtualenv + + desc "Simple python script to download Bandcamp albums" + homepage "https://github.com/iheanyi/bandcamp-dl" + url "https://files.pythonhosted.org/packages/78/c2/2c11878a494ceef38ed5ac51dede216547cb14ef40a30f8f009fca0ceab6/bandcamp_downloader-0.0.17.tar.gz" + sha256 "d5e47777d0b1a14e49ba72d78ffa9b150e72af51d28e981231a0bd32c1c2e159" + license "Unlicense" + head "https://github.com/iheanyi/bandcamp-dl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d9efd68207c36b160b6c6baa3aa4d86c8058c7b55c06e59bcddee0d17a977715" + end + + depends_on "certifi" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/f0/3c/adaf39ce1fb4afdd21b611e3d530b183bb7759c9b673d60db0e347fd4439/beautifulsoup4-4.13.3.tar.gz" + sha256 "1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/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 "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/0e/3e/b00a62db91a83fff600de219b6ea9908e6918664899a2d85db222f4fbf19/typing_extensions-4.13.0.tar.gz" + sha256 "0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b" + 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/f7/89/19151076a006b9ac0dd37b1354e031f5297891ee507eb624755e58e10d3e/Unidecode-1.3.8.tar.gz" + sha256 "cfdb349d46ed3873ece4586b96aa75258726e2fa8ec21d6f00a591d98806c2f4" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..6df5367d1786c --- /dev/null +++ b/Formula/b/bandicoot.rb @@ -0,0 +1,55 @@ +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_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..56e4a2a5e9701 --- /dev/null +++ b/Formula/b/bandit.rb @@ -0,0 +1,73 @@ +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/1a/a5/144a45f8e67df9d66c3bc3f7e69a39537db8bff1189ab7cff4e9459215da/bandit-1.8.3.tar.gz" + sha256 "f5847beb654d309422985c36644649924e0ea4425c76dec2e89110b87506193a" + license "Apache-2.0" + head "https://github.com/PyCQA/bandit.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5edf7453bbba24200a63d47d696de34b29593cb3caa4605857b3784eba3341b0" + sha256 cellar: :any, arm64_sonoma: "b700080db1ad11542ba34e8cc6740a49dda5a262bb1570569a4adc68d5694689" + sha256 cellar: :any, arm64_ventura: "f0df06af03e5c5d4fa664e5cc0be6e20078a6269e1d23f3db7240e41d31201dc" + sha256 cellar: :any, sonoma: "092350c2312631dee3f6dff891eca1a3656012118b5bf30e2d524858fb1072e9" + sha256 cellar: :any, ventura: "f889a061f551474f3b718557a08b95996eff92ab2da98109d18898dde8bbb1cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec0fee9adf94beb73649de9d903434a59cc2ced0463594f3f59c81aaa60d1e82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42b6f1eab386584966d9494c3a59d96327e3462889597af88b826a3be2dadbf0" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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 "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/01/d2/510cc0d218e753ba62a1bc1434651db3cd797a9716a0a66cc714cb4f0935/pbr-6.1.1.tar.gz" + sha256 "93ea72ce6989eb2eed99d0f75721474f69ad88128afdef5ac377eb797c4bf76b" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/92/ec/089608b791d210aec4e7f97488e67ab0d33add3efccb83a056cbafe3a2a6/setuptools-75.8.0.tar.gz" + sha256 "c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/4a/e9/4eedccff8332cc40cc60ddd3b28d4c3e255ee7e9c65679fa4533ab98f598/stevedore-5.4.0.tar.gz" + sha256 "79e92235ecb828fe952b6b8b0c6c87863248631922c8e8e0fa5b17b232c4514d" + 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..e7e0ece7cd80d --- /dev/null +++ b/Formula/b/bandwhich.rb @@ -0,0 +1,36 @@ +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_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..82913ec069a09 --- /dev/null +++ b/Formula/b/bao.rb @@ -0,0 +1,35 @@ +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_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..b1f2ba64be829 --- /dev/null +++ b/Formula/b/baobab.rb @@ -0,0 +1,60 @@ +class Baobab < Formula + desc "Gnome disk usage analyzer" + homepage "https://apps.gnome.org/Baobab/" + url "https://download.gnome.org/sources/baobab/48/baobab-48.0.tar.xz" + sha256 "54592504d49d807f23591be7e7eef10c6c9dfcb7ac527b81c3acd58787b26fda" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_sequoia: "80378d77f74e4164ade7e7544e8b2e51aa3dc204919bff16427ae1a620f88d29" + sha256 arm64_sonoma: "f837bbc3a3f8d1185383d148a15899d3826addf90da09386213927ea6b9b694a" + sha256 arm64_ventura: "47e23d24e4c49ba8f2c76242e4c2c390ae0b1e0b768bd54f92ed14cf79cc77ce" + sha256 sonoma: "f7b366f966ca320df98ced77afe68a69053c1e2ff0b2441d0b3f53899a5d9617" + sha256 ventura: "1f6c2a5c773468e35139918a620e569607566b10ec6ee066537eec7c1a78bc05" + sha256 arm64_linux: "3f39c11e4a91021ba34908f1c5ee64ef45ceb5ed39e26f914047fabc54293252" + sha256 x86_64_linux: "55ec8b4e2e83bfaf90340312772aae33aead8e268f68caab0a845af626e0a64c" + 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..72a1bcf26f57c --- /dev/null +++ b/Formula/b/bar.rb @@ -0,0 +1,27 @@ +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 + + 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..b1958388a6795 --- /dev/null +++ b/Formula/b/bareos-client.rb @@ -0,0 +1,113 @@ +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.2.tar.gz" + sha256 "eaed6c4456e19eaeda7143caa73c167885b05f34f2ae39242b8c7f0a0d13f7c5" + license "AGPL-3.0-only" + + livecheck do + url :stable + regex(%r{^Release/(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 arm64_sequoia: "ec44466352baadaee81f531905db44f97347f94f5f6d3582c16dc7044ffb5d46" + sha256 arm64_sonoma: "fdf345fbd3a064dcbf00e3141bad5c8ff6e77eaf895498a9ab586b734bb732dd" + sha256 arm64_ventura: "f7cf406c090fa0d4ec4a56e4fd1b53427b667245da512e071e70b71b67fded37" + sha256 sonoma: "134027b83701c11d997d09d7d2bdeb844608f7cf0221d726c38125f5fa8f3c1c" + sha256 ventura: "0ed7c3796917441c54d20f8f30bd8902bc5313afd92606d35c784a1d0ca443b2" + sha256 arm64_linux: "fa54ef1fa244f5e4b2e93509ab2b1bfac6892c909a939745c84efa1532176797" + sha256 x86_64_linux: "ebf9c2185457ce2fa622eccd2b2c9abddea79da300fdfe5566105ca216e3f028" + 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..87c647556148c --- /dev/null +++ b/Formula/b/baresip.rb @@ -0,0 +1,40 @@ +class Baresip < Formula + desc "Modular SIP useragent" + homepage "https://github.com/baresip/baresip" + url "https://github.com/baresip/baresip/archive/refs/tags/v3.22.0.tar.gz" + sha256 "a9e7884fa796f47640fe0854485229a0357eb9a6913fa7909bc92bab6148fe04" + license "BSD-3-Clause" + revision 1 + + bottle do + sha256 arm64_sequoia: "5ceaa071913d0d3fc53253c33c8e108b18cb61d2a2e7d7bca8591638234810f9" + sha256 arm64_sonoma: "0ac329d132fc17565506d32546232a381abaa4738b636fbd35430c402d8a065d" + sha256 arm64_ventura: "69046a45077cbdeb61b6a34c4b54721b749a1fe2cc9731411ea0cfa989fc96d7" + sha256 sonoma: "3a92e4a38a530f636283b8109caa66a2d812f00349441f1a922ee4f67b722d49" + sha256 ventura: "5e713fb7d5a28e199ce2d92f8d41665fe8d7fb067dcc1cf326e468c444f43657" + sha256 arm64_linux: "8f87bc63ae6a6f72197982bed3cb5285f2018dba774c669a9eb9a8812be939a3" + sha256 x86_64_linux: "e552113a1671d38c0cba89cec6cd68a9e1d802ba4e95b0d3d83d5f926ad7020a" + 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..e44beae570bd5 --- /dev/null +++ b/Formula/b/bartib.rb @@ -0,0 +1,42 @@ +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_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..d39753604e71c --- /dev/null +++ b/Formula/b/bartycrouch.rb @@ -0,0 +1,47 @@ +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_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..5632951be3774 --- /dev/null +++ b/Formula/b/bas55.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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..1da55b465ad1b --- /dev/null +++ b/Formula/b/base16384.rb @@ -0,0 +1,33 @@ +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.1.tar.gz" + sha256 "71ee39510c8c687254315ccc1aa5de601a5e2a2554b6db843f3874c12415a77a" + license "GPL-3.0-or-later" + head "https://github.com/fumiama/base16384.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9c046b845fe6857efb4263bc958ae54f86716c14999710d91451727eab219719" + sha256 cellar: :any, arm64_sonoma: "71adec1b444f7b121e2cc126a876d3ca84df3a8cbe2dad781eac1b7c1c8c0736" + sha256 cellar: :any, arm64_ventura: "581c0cb53c4ec53655015c1477a749ae53f63c18ea5b4c56cd28ac4c42fcaf97" + sha256 cellar: :any, arm64_monterey: "870a9f826384af1e7958de7cc4577c4a7bc536f25b27c70d377685a3616df453" + sha256 cellar: :any, sonoma: "aa4c9cacb0c6cbeb386a0b04470c4f184b281f32ab9356e0067897b6153a71f2" + sha256 cellar: :any, ventura: "39b4895bba7a1ae5b3b50ff3fa88297e77085ab97f8f4a45bf623d7264e70644" + sha256 cellar: :any, monterey: "bb6d45b3c3102d73a79fa28b0ee7345eda0b64f9663d0e0046f434266797831d" + sha256 cellar: :any_skip_relocation, arm64_linux: "13607155b317eedcb9ebbc6f5a3ed1c962899f8eb0e9e87fb5dde3163217f7ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8df8dffe60c9b43d5192bc163037d3ebdc9cb4bb7020651aa380d8838db92d5f" + 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..6b6fa1c2bb811 --- /dev/null +++ b/Formula/b/base64.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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, mojave: "790e40a7ee037b0b99cc63d2085b121893ba80dfb43465c380568e7bacf3f83a" + sha256 cellar: :any_skip_relocation, high_sierra: "c3a8113c031b07426e6eda7da7604db9308999f456eeca5f3f2d5c8d85ba3a0d" + sha256 cellar: :any_skip_relocation, sierra: "3cd13d14c225413a5bc3b24f8f5dab48c2a942b64bf9162ad3a8ea8320a74bd1" + sha256 cellar: :any_skip_relocation, el_capitan: "0ab522634adf5c9eefb08c11d51d2b6e0477d8ea607afdb8eefe204de764f180" + 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..b90ab6122042c --- /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" + + bottle do + 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, mojave: "fca64b5013c75658646a7d758365a624aa5f3a89488573222f2bbb867b04cc49" + sha256 cellar: :any_skip_relocation, high_sierra: "3b9c972390a56bc2ea0be9943558018cc271802369b5b36ff0fa10391aaf1f57" + sha256 cellar: :any_skip_relocation, sierra: "7d43d307ad7fb92e10b21696e4f3d5880979f12b465db614f7ecaf9e4c9d4904" + 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..a40d4e0f04d6e --- /dev/null +++ b/Formula/b/basedpyright.rb @@ -0,0 +1,34 @@ +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.29.1.tgz" + sha256 "97859fe21af1d8601fe5f1cbd7d68f0db156524e4b3bc8306730ab22533cec81" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c08d5edd65107b8429513c225383d3296711b7834ac54ec7c643c6ff35c57af9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c08d5edd65107b8429513c225383d3296711b7834ac54ec7c643c6ff35c57af9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c08d5edd65107b8429513c225383d3296711b7834ac54ec7c643c6ff35c57af9" + sha256 cellar: :any_skip_relocation, sonoma: "55028a5193fe2169d4229d2cc0670af5e52298869064d624cb93a1592c639b06" + sha256 cellar: :any_skip_relocation, ventura: "55028a5193fe2169d4229d2cc0670af5e52298869064d624cb93a1592c639b06" + sha256 cellar: :any_skip_relocation, arm64_linux: "c08d5edd65107b8429513c225383d3296711b7834ac54ec7c643c6ff35c57af9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c08d5edd65107b8429513c225383d3296711b7834ac54ec7c643c6ff35c57af9" + 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..e2ddfee067327 --- /dev/null +++ b/Formula/b/basex.rb @@ -0,0 +1,34 @@ +class Basex < Formula + desc "Light-weight XML database and XPath/XQuery processor" + homepage "https://basex.org/" + url "https://files.basex.org/releases/11.9/BaseX119.zip" + version "11.9" + sha256 "e796d92ffa20343e3f5fccac3140baec2f0056fdde0564e6de229fc91edb3d53" + license "BSD-3-Clause" + + livecheck do + url "https://basex.org/download/" + regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/BaseX[._-]?v?(\d+(?:\.\d+)*)\.zip}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "0682571302879f8041fa70fda9e44cbdc6d785bedc1f1d69a8a6da5c3884a2c8" + 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..5874fa9ef7a05 --- /dev/null +++ b/Formula/b/bash-completion.rb @@ -0,0 +1,97 @@ +# 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_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, mojave: "9219c2b46362677e9ae6e19b344b774c3e9f163ae6bf6cf2686da06419aaec89" + sha256 cellar: :any_skip_relocation, high_sierra: "b069be5574bdf6d12fd1fda17c3162467b68165541166d95d1a9474653a63abc" + sha256 cellar: :any_skip_relocation, sierra: "58be92ef01d5068f37b1c00af8e9b202bdb409c93121bb0e07dcbb5e55dc3be2" + sha256 cellar: :any_skip_relocation, el_capitan: "58be92ef01d5068f37b1c00af8e9b202bdb409c93121bb0e07dcbb5e55dc3be2" + 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/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 + s = <<~EOS + Add the following line to your ~/.bash_profile: + [[ -r "#{etc}/profile.d/bash_completion.sh" ]] && . "#{etc}/profile.d/bash_completion.sh" + EOS + version_caveat = <<~EOS + + 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 + if Formula["bash"].any_version_installed? + s += version_caveat + else + on_linux do + s += version_caveat + end + end + s + 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..c24cb1ce54c07 --- /dev/null +++ b/Formula/b/bash-completion@2.rb @@ -0,0 +1,60 @@ +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.16.0/bash-completion-2.16.0.tar.xz" + sha256 "3369bd5e418a75fb990863925aed5b420398acebb320ec4c0306b3eae23f107a" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7696534939d76665695a0bc12c1bab0a9cd0729264b16585bc5bc44a0bae5cfe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7696534939d76665695a0bc12c1bab0a9cd0729264b16585bc5bc44a0bae5cfe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7696534939d76665695a0bc12c1bab0a9cd0729264b16585bc5bc44a0bae5cfe" + sha256 cellar: :any_skip_relocation, sonoma: "eae0306c63a1d8dec18b5762d0d33689ec876f85c7e3fc30602103e2a03de498" + sha256 cellar: :any_skip_relocation, ventura: "eae0306c63a1d8dec18b5762d0d33689ec876f85c7e3fc30602103e2a03de498" + sha256 cellar: :any_skip_relocation, arm64_linux: "7696534939d76665695a0bc12c1bab0a9cd0729264b16585bc5bc44a0bae5cfe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7696534939d76665695a0bc12c1bab0a9cd0729264b16585bc5bc44a0bae5cfe" + end + + head do + url "https://github.com/scop/bash-completion.git", branch: "master" + + 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..0793098203182 --- /dev/null +++ b/Formula/b/bash-git-prompt.rb @@ -0,0 +1,37 @@ +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" + + 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..98220190f7e2f --- /dev/null +++ b/Formula/b/bash-preexec.rb @@ -0,0 +1,29 @@ +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.5.0.tar.gz" + sha256 "23c589cd1da209c0598f92fac8d81bb11632ba1b2e68ccaf4ad2c4f3204b877c" + license "MIT" + head "https://github.com/rcaloras/bash-preexec.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "be667c2452738ea09d539b67880bca9655a60c9d6e586e7088420e214b310382" + 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..9dbc7a8a5583a --- /dev/null +++ b/Formula/b/bash-snippets.rb @@ -0,0 +1,34 @@ +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" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3d9c146c0d2b5d4e6ec135939558a9a61f40f416c9087be9bcc968f09a156998" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3d9c146c0d2b5d4e6ec135939558a9a61f40f416c9087be9bcc968f09a156998" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3d9c146c0d2b5d4e6ec135939558a9a61f40f416c9087be9bcc968f09a156998" + sha256 cellar: :any_skip_relocation, sonoma: "dd3fba704985cfdaef3cb86ca549b505e4ea7eecd3635c9acc3061f78acfa293" + sha256 cellar: :any_skip_relocation, ventura: "dd3fba704985cfdaef3cb86ca549b505e4ea7eecd3635c9acc3061f78acfa293" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d9c146c0d2b5d4e6ec135939558a9a61f40f416c9087be9bcc968f09a156998" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d9c146c0d2b5d4e6ec135939558a9a61f40f416c9087be9bcc968f09a156998" + end + + conflicts_with "cheat", because: "both install a `cheat` executable" + 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 Paramus").lines.first.chomp + assert_equal "Weather report: Paramus", 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..254bf09846c14 --- /dev/null +++ b/Formula/b/bash.rb @@ -0,0 +1,140 @@ +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://ftp.gnu.org/gnu/bash/bash-5.2.tar.gz" + mirror "https://ftpmirror.gnu.org/bash/bash-5.2.tar.gz" + mirror "https://mirrors.kernel.org/gnu/bash/bash-5.2.tar.gz" + mirror "https://mirrors.ocf.berkeley.edu/gnu/bash/bash-5.2.tar.gz" + sha256 "a139c166df7ff4471c5e0733051642ee5556c1cc8a4a78f145583c5c81ab32fb" + version "5.2.37" + + %w[ + 001 f42f2fee923bc2209f406a1892772121c467f44533bedfe00a176139da5d310a + 002 45cc5e1b876550eee96f95bffb36c41b6cb7c07d33f671db5634405cd00fd7b8 + 003 6a090cdbd334306fceacd0e4a1b9e0b0678efdbbdedbd1f5842035990c8abaff + 004 38827724bba908cf5721bd8d4e595d80f02c05c35f3dd7dbc4cd3c5678a42512 + 005 ece0eb544368b3b4359fb8464caa9d89c7a6743c8ed070be1c7d599c3675d357 + 006 d1e0566a257d149a0d99d450ce2885123f9995e9c01d0a5ef6df7044a72a468c + 007 2500a3fc21cb08133f06648a017cebfa27f30ea19c8cbe8dfefdf16227cfd490 + 008 6b4bd92fd0099d1bab436b941875e99e0cb3c320997587182d6267af1844b1e8 + 009 f95a817882eaeb0cb78bce82859a86bbb297a308ced730ebe449cd504211d3cd + 010 c7705e029f752507310ecd7270aef437e8043a9959e4d0c6065a82517996c1cd + 011 831b5f25bf3e88625f3ab315043be7498907c551f86041fa3b914123d79eb6f4 + 012 2fb107ce1fb8e93f36997c8b0b2743fc1ca98a454c7cc5a3fcabec533f67d42c + 013 094b4fd81bc488a26febba5d799689b64d52a5505b63e8ee854f48d356bc7ce6 + 014 3ef9246f2906ef1e487a0a3f4c647ae1c289cbd8459caa7db5ce118ef136e624 + 015 ef73905169db67399a728e238a9413e0d689462cb9b72ab17a05dba51221358a + 016 155853bc5bd10e40a9bea369fb6f50a203a7d0358e9e32321be0d9fa21585915 + 017 1c48cecbc9b7b4217990580203b7e1de19c4979d0bd2c0e310167df748df2c89 + 018 4641dd49dd923b454dd0a346277907090410f5d60a29a2de3b82c98e49aaaa80 + 019 325c26860ad4bba8558356c4ab914ac57e7b415dac6f5aae86b9b05ccb7ed282 + 020 b6fc252aeb95ce67c9b017d29d81e8a5e285db4bf20d4ec8cdca35892be5c01d + 021 8334b88117ad047598f23581aeb0c66c0248cdd77abc3b4e259133aa307650cd + 022 78b5230a49594ec30811e72dcd0f56d1089710ec7828621022d08507aa57e470 + 023 af905502e2106c8510ba2085aa2b56e64830fc0fdf6ee67ebb459ac11696dcd3 + 024 971534490117eb05d97d7fd81f5f9d8daf927b4d581231844ffae485651b02c3 + 025 5138f487e7cf71a6323dc81d22419906f1535b89835cc2ff68847e1a35613075 + 026 96ee1f549aa0b530521e36bdc0ba7661602cfaee409f7023cac744dd42852eac + 027 e12a890a2e4f0d9c6ec1ce65b73da4fe116c8e4209bac8ac9dc4cd96f486ab39 + 028 6042780ba2893daca4a3f0f9b65728592cd7bb6d4cebe073855a6aad4d63aac1 + 029 125cacb37e625471924b3ee06c54cb1bf21b3b7fe0e569d24a681b0ec4a29987 + 030 c3ff73230e123acdb5ac216921a386df8f74340459533d776d02811a1f76698f + 031 c2d1b7be2df771126105020af7fafa00fffd4deff4a4e45d60fc6a235bcba795 + 032 7b9c77daeca93ff711781d7537234166e83ed9835ce1ee7dcd5742319c372a16 + 033 013ec6cc10ad98060a7c34ed5c11187bcc5bf4510f32de0d545db89a9a52a2e2 + 034 899fbb3b338048fe52a9c8252bf65ef1194cdff4f7a3fb3316f5f2396143232e + 035 821a0a47fa692bb0a39482728b1b396bf951e2912768fea6f3026c813c1913e5 + 036 15c93f4936a5e5b88301f3ede767a23d3dd19635af2f3a91fb4cc0e560ca9057 + 037 8a2c1c3b5125d9ae5b47882f7d2ddf9648805f8c67c13aa5ea7efeac475cda94 + ].each_slice(2) do |p, checksum| + patch :p0 do + url "https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-#{p}" + mirror "https://ftpmirror.gnu.org/bash/bash-5.2-patches/bash52-#{p}" + mirror "https://mirrors.kernel.org/gnu/bash/bash-5.2-patches/bash52-#{p}" + mirror "https://mirrors.ocf.berkeley.edu/gnu/bash/bash-5.2-patches/bash52-#{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://ftp.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 + + bottle do + rebuild 2 + sha256 arm64_sequoia: "e77d408d550e8e9f6669abf16759e35d0b867fe2126121eaa1ff39a94921cd86" + sha256 arm64_sonoma: "c447b3c18e307ab9e3e6a5c28ebb09c1e76a51a505ab89948ade6abe8f859bf0" + sha256 arm64_ventura: "60bd00499cc9a01361143f2ffe15fcc0aa274db1de4b298dedd10fa2533d7e69" + sha256 sonoma: "1f0af2a4eb5fddcecdd1d02a841e285dc8302a029f975571fddd4100af79ad67" + sha256 ventura: "05a18ddf9001e3fe63f8c972aa24b73df39f6517eb0b5b913ccaf3478c6fa914" + sha256 arm64_linux: "925a4ad99d47b25e8dfdd554312acf5f50c0251f7ab003d1d694740f214f8ef1" + sha256 x86_64_linux: "0f188fcf662add592183d2b4647ea94bdd1fc001ed9a06920ab4bbc2b62bb9f9" + end + + # System ncurses lacks functionality + # https://github.com/Homebrew/homebrew-core/issues/158667 + depends_on "ncurses" + + 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" + + # Allow bash to find loadable modules in lib/bash. + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath(target: lib/"bash")}" + # FIXME: Setting `-rpath` flags don't seem to work on Linux. + ENV.prepend_path "HOMEBREW_RPATH_PATHS", rpath(target: lib/"bash") if OS.linux? + + system "./configure", "--prefix=#{prefix}", "--with-curses" + system "make", "install" + + (include/"bash/builtins").install lib/"bash/loadables.h" + pkgshare.install lib.glob("bash/Makefile*") + end + + test do + assert_equal "hello", shell_output("#{bin}/bash -c 'echo -n hello'") + assert_equal "csv is a shell builtin\n", shell_output("#{bin}/bash -c 'enable csv; type csv'") + end +end diff --git a/Formula/b/bash_unit.rb b/Formula/b/bash_unit.rb new file mode 100644 index 0000000000000..3dfb10c920545 --- /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/pgrange/bash_unit" + url "https://github.com/pgrange/bash_unit/archive/refs/tags/v2.3.2.tar.gz" + sha256 "368d1712d4c265909a5039ea91180dba1db5b15b5a02cf24cfb3b7547c0e9150" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2d5f3bacff684950c7a12a1ba1eb01c63368461d46994f9cfd4209150b73bc8d" + 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..5c3e17f3bb450 --- /dev/null +++ b/Formula/b/bashate.rb @@ -0,0 +1,44 @@ +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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "007ce884bf1ba757929d119f792b3b414b4ce3d46b842c43e270941cf1fb7b3c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "007ce884bf1ba757929d119f792b3b414b4ce3d46b842c43e270941cf1fb7b3c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "007ce884bf1ba757929d119f792b3b414b4ce3d46b842c43e270941cf1fb7b3c" + sha256 cellar: :any_skip_relocation, sonoma: "1903d84db5712fa94b88bd6adafe8efd3686665cb0dc17db3d5ed63a41bdd0f6" + sha256 cellar: :any_skip_relocation, ventura: "1903d84db5712fa94b88bd6adafe8efd3686665cb0dc17db3d5ed63a41bdd0f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa99b757bdae56d1db08f94e6b9fe4056dda2d9800aa0354191bb1edfd79c58b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "007ce884bf1ba757929d119f792b3b414b4ce3d46b842c43e270941cf1fb7b3c" + end + + depends_on "python@3.13" + + resource "pbr" do + url "https://files.pythonhosted.org/packages/b2/35/80cf8f6a4f34017a7fe28242dc45161a1baa55c41563c354d8147e8358b2/pbr-6.1.0.tar.gz" + sha256 "788183e382e3d1d7707db08978239965e8b9e4e5ed42669bf4758186734d5f24" + end + + def install + virtualenv_install_with_resources + end + + test do + (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") + + assert_match version.to_s, shell_output("#{bin}/bashate --version") + end +end diff --git a/Formula/b/bashdb.rb b/Formula/b/bashdb.rb new file mode 100644 index 0000000000000..319417c10ecf8 --- /dev/null +++ b/Formula/b/bashdb.rb @@ -0,0 +1,69 @@ +class Bashdb < Formula + desc "Bash shell debugger" + homepage "https://bashdb.sourceforge.net/" + url "https://downloads.sourceforge.net/project/bashdb/bashdb/5.0-1.1.2/bashdb-5.0-1.1.2.tar.bz2" + version "5.0-1.1.2" + sha256 "30176d2ad28c5b00b2e2d21c5ea1aef8fbaf40a8f9d9f723c67c60531f3b7330" + 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 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8f2ec4abf07b97ccf17dd28f503864ff00ea05049a9b844de637612b85478aa7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f2ec4abf07b97ccf17dd28f503864ff00ea05049a9b844de637612b85478aa7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f2ec4abf07b97ccf17dd28f503864ff00ea05049a9b844de637612b85478aa7" + sha256 cellar: :any_skip_relocation, sonoma: "a66264c4831ecc61cf6ea6fbebfa335cf2152742017132ca9309068a0870b8ac" + sha256 cellar: :any_skip_relocation, ventura: "a66264c4831ecc61cf6ea6fbebfa335cf2152742017132ca9309068a0870b8ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c3880ed9494d5dbe3a1dbebf971e66fbdf4edabdad128cc44ece337d906c28c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f2ec4abf07b97ccf17dd28f503864ff00ea05049a9b844de637612b85478aa7" + end + + depends_on "autoconf" => :build # due to patch + depends_on "automake" => :build # due to patch + depends_on "bash" + + # Bypass error with Bash 5.1: "error: This package is only known to work with Bash 5.0" + # Upstream ref: https://sourceforge.net/p/bashdb/code/ci/6daffb5c7337620b429f5e94c282b75a0777fc82/ + patch :DATA + + def install + system "autoreconf", "--force", "--install", "--verbose" + 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 + +__END__ +--- a/configure.ac ++++ b/configure.ac +@@ -107,7 +107,7 @@ + [bash_minor=`$SH_PROG -c 'echo ${BASH_VERSINFO[1]}'`] + bash_5_or_greater=no + case "${bash_major}.${bash_minor}" in +- 'OK_BASH_VERS' | '5.0') ++ 'OK_BASH_VERS' | '5.0' | '5.1' | '5.2') + bash_5_or_greater=yes + ;; + *) +@@ -118,7 +118,8 @@ + + AC_ARG_WITH(dbg-main, AC_HELP_STRING([--with-dbg-main], + [location of dbg-main.sh]), +- DBGR_MAIN=$withval) ++ [DBGR_MAIN=$withval] ++ [DBGR_MAIN=${ac_default_prefix/prefix}/bashdb/bashdb-main.inc]) + AC_SUBST(DBGR_MAIN) + + mydir=$(dirname $0) diff --git a/Formula/b/bashish.rb b/Formula/b/bashish.rb new file mode 100644 index 0000000000000..1d160212e6da2 --- /dev/null +++ b/Formula/b/bashish.rb @@ -0,0 +1,38 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "59c20f75c252012ce33ccf199fdd626e569343d5af03a9ccd890b43d760e04cf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6c3b9d7c65a09230d87d35fbc141576dc991932032e990ebdfec261ecf6c8c94" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9de9a34d40236aa4fc76c38f69fa2b30b6d66bb1d6289a7552b543300abc753c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9de9a34d40236aa4fc76c38f69fa2b30b6d66bb1d6289a7552b543300abc753c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c18a9d6903c20ae676bfdae2152d8c71b86d2a918298fa9276878002e4ed3320" + sha256 cellar: :any_skip_relocation, sonoma: "b7ad93c2b7484d3d62fd39a8606446b4c998380548a4719d0ab0092212d29874" + sha256 cellar: :any_skip_relocation, ventura: "571da7c657359ce294d6cd556ef076cfcb8e80fdb44d7b9e494fd5207cb70afb" + sha256 cellar: :any_skip_relocation, monterey: "571da7c657359ce294d6cd556ef076cfcb8e80fdb44d7b9e494fd5207cb70afb" + sha256 cellar: :any_skip_relocation, big_sur: "19831ed9c970ba6d8fa4308ac70aa83148902f8057a029025f0bc6f3bad83900" + sha256 cellar: :any_skip_relocation, catalina: "19031477c5b06b25b69fb33d3c00e6cffccaaf578234e492ccc67ff187f8cbdc" + sha256 cellar: :any_skip_relocation, mojave: "7f2b297190ede9e55c0def858e37b25682268e6f0bc3df2c507e347e7ac353a5" + sha256 cellar: :any_skip_relocation, high_sierra: "b7caabd1274134f33dd458ac444bbe14a139de76b91f8bebb56349377b840a5e" + sha256 cellar: :any_skip_relocation, sierra: "31134b56c7ad43b04ef186485af8581dbf8d8d8fcf615d259554d9c5adc7233f" + sha256 cellar: :any_skip_relocation, el_capitan: "114d2ce95e530c6850bc36a52a1053ecf05185d774ed499bd1725811b3c1b88c" + sha256 cellar: :any_skip_relocation, arm64_linux: "09c7fcb6f64362de6b30a0e4f6655e91e1f348c2418d9db264c3beb0220cb19b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9de9a34d40236aa4fc76c38f69fa2b30b6d66bb1d6289a7552b543300abc753c" + 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/b/bashunit.rb b/Formula/b/bashunit.rb new file mode 100644 index 0000000000000..b1c388648f26c --- /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.19.0/bashunit" + sha256 "1579cd17f6b82131888366467ee266ed0aaffa7f2dbdbba917f904fbc91ba216" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "7432159a56d3ebc5b4dbb3b48f1b842405964ad29b2b2d968547886a7c5f5e46" + 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..5d55ab946b25d --- /dev/null +++ b/Formula/b/basis_universal.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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..08c3d6f18625b --- /dev/null +++ b/Formula/b/bastet.rb @@ -0,0 +1,55 @@ +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 11 + + bottle do + sha256 arm64_sequoia: "4f2a75e89523a611c43e835885e8a88ce1969c829d53285815338ee3b6870274" + sha256 arm64_sonoma: "36d7d9ed8c1661e91989775501e2fb37f93e7293adaed83b10d816ab85a8d6dd" + sha256 arm64_ventura: "f35791ce54bddbda1f3812bff67957693fe791ca4c9c023f8afeb868bb74c73e" + sha256 sonoma: "36f49100437319373f0c97a0f2e6a04f314e5a6e7fe70e19f4a10a92157399a7" + sha256 ventura: "bf1b93563715abc343a11e63a351ad9a3c9f8d5348a4f4742636a116ceb4b72f" + sha256 arm64_linux: "a8785e6b7bf3304eb37a4550cd19ba6715a9d8b77babbf5e1308bbe81cc0de72" + sha256 x86_64_linux: "a07a23ef63af7763e40f927c8deb51effc415fe71ee3c7baadebc716fab9dd58" + 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..3276a2184985f --- /dev/null +++ b/Formula/b/basti.rb @@ -0,0 +1,43 @@ +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.1.tgz" + sha256 "a3105943b1ca2efd2f756f2e381725a3668ea30fe2edb3d2436d8c2fb2df81a5" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0549ae3e2472e1e53c820caf50872ed6d3f124c05ccfbd7a8a98386406ecbbe8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0549ae3e2472e1e53c820caf50872ed6d3f124c05ccfbd7a8a98386406ecbbe8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0549ae3e2472e1e53c820caf50872ed6d3f124c05ccfbd7a8a98386406ecbbe8" + sha256 cellar: :any_skip_relocation, sonoma: "2da4b1374a33cfb194b65260ca559b7a93f75b21a081d0643764597351b6b2cc" + sha256 cellar: :any_skip_relocation, ventura: "2da4b1374a33cfb194b65260ca559b7a93f75b21a081d0643764597351b6b2cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "a0e04e4ab6509d397dff2273c18f8fb28d71fa5e60a5f1c27fabfb7a1d2fc7e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2d31d3a8cf98a28daf71345f66b0730740f606b5397af215bcde8d3e9bc57a25" + 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..35e07c30988f1 --- /dev/null +++ b/Formula/b/bat-extras.rb @@ -0,0 +1,37 @@ +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_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..39e6162bb9d1a --- /dev/null +++ b/Formula/b/bat.rb @@ -0,0 +1,61 @@ +class Bat < Formula + desc "Clone of cat(1) with syntax highlighting and Git integration" + homepage "https://github.com/sharkdp/bat" + license any_of: ["Apache-2.0", "MIT"] + revision 1 + head "https://github.com/sharkdp/bat.git", branch: "master" + + stable do + url "https://github.com/sharkdp/bat/archive/refs/tags/v0.25.0.tar.gz" + sha256 "4433403785ebb61d1e5d4940a8196d020019ce11a6f7d4553ea1d324331d8924" + + # git2 bump to use libgit2 1.9, upstream pr ref, https://github.com/sharkdp/bat/pull/3169 + patch do + url "https://github.com/sharkdp/bat/commit/01680e444ba4273b17d2d6d85a19f7a5e7046820.patch?full_index=1" + sha256 "ad450b12f6a4a8332bf1e249a239518c7edfe94ccc6abbbeb705cf22620c5619" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "63e99dea5bc85d0e9c3c76c41c7324933d05b791c86cbdb47bf173bbb4f25afd" + sha256 cellar: :any, arm64_sonoma: "53705be5ee2484a8e2254437e0197b763a27b4e3a88e2c9aa7f43c739ecc48c6" + sha256 cellar: :any, arm64_ventura: "a058d53d4156ae1ea72b9d153533f253b57fcbd273d704e7f9f867c0e6b05562" + sha256 cellar: :any, sonoma: "c9dc4cc4d679e32223eec006c4b52c46fcee17e67fdb762dd494f839ba8a199e" + sha256 cellar: :any, ventura: "0ed6d0e85d9af4020f4eb0f41efc2e8f1e7ca5d8deb2bfe82cb8d4a24591cdca" + sha256 cellar: :any_skip_relocation, arm64_linux: "b0a32aac15c2338597b6faf190ea1ffa7e3f77a85470e9612c3da9cb9b85b7d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68f6c503b8895e4390935142c771030aca2d70b7fb3fc72449df664e05af1680" + 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..f5b5ee583db54 --- /dev/null +++ b/Formula/b/batik.rb @@ -0,0 +1,33 @@ +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? + font_name = (MacOS.version >= :catalina) ? "Arial Unicode.ttf" : "Arial.ttf" + "/Library/Fonts/#{font_name}" + 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..36354cf425520 --- /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.11.1.tar.gz" + sha256 "5c57ed9616b78f7fd8c553b9bae3c7c9870119edd727ec17dbd1185c599f79d9" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "28949c0596b90bc8604d4f530e2e4a1e3c81c63b5a92ce2ecf187abb06169723" + 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..1acbd4eb0179d --- /dev/null +++ b/Formula/b/batt.rb @@ -0,0 +1,61 @@ +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.3.7", + revision: "0292e5913c404f5d752f72bd340e161e3030c28c" + 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_sequoia: "008521f2df77754004109ef2d318eab3af3351c204d83addf63fb1485560ca29" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b29f928fe61350786cffdcaa5906ae073627f4e64a07508829bb29793ccd9d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d33cb6398e7770d820998dca111e79c471275ad2c45bc86ddd0f7a12278abf36" + 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 + # NB: assumes first run of batt, with no previous config. + assert_match "config file #{etc}/batt.json does not exist, using default config", + shell_output("#{bin}/batt daemon --config=#{etc}/batt.json 2>&1", 1) # Non-root daemon exits with 1 + assert_match "failed to connect to unix socket.", + 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..69514f030b51a --- /dev/null +++ b/Formula/b/bazarr.rb @@ -0,0 +1,134 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8a970f6f5dc0730e20ca59176874c7ec1abe7a8433a897bd0e642eba8a951c00" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "203e8edb199ebd6050879d45b5dca2e37baa282b8e48dbcf6f3c1b8269ec05ba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "12bf4455d2154c9fcc5f719a321bda609ee2610a5a897384230ba8918865e024" + sha256 cellar: :any_skip_relocation, sonoma: "e7bd2789e41974a78525fb2ed9e4f384b9c337977652375b22b9cc87b974f7ca" + sha256 cellar: :any_skip_relocation, ventura: "2d822e4808509bc37dfc0ec0ef20dbd49bbc9d74eda582b31b1beeac80f2a9e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b43a4b85eaa37c9e87a5d5ac1b0b4ff729aff6d4bd3c583958056c5fba741a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61178b07eb006f26c6a92ebad8daf2da402070d91d0dd54a54705dd592674d3b" + end + + depends_on "node" => :build + depends_on "ffmpeg" + depends_on "gcc" + depends_on "numpy" + depends_on "pillow" + depends_on "python@3.12" # Python 3.13 issue (closed w/o fix): https://github.com/morpheus65535/bazarr/issues/2803 + depends_on "unar" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + uses_from_macos "zlib" + + resource "lxml" do + url "https://files.pythonhosted.org/packages/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/95/32/0cc40fe41fd2adb80a2f388987f4f8db3c866c69e33e0b4c8b093fdf700e/setuptools-80.4.0.tar.gz" + sha256 "5a78f61820bc088c8e4add52932ae6b8cf423da2aff268c23f813cfbb13b4006" + 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.12") + 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" + end + + def post_install + pkgvar = var/"bazarr" + + config_file = pkgetc/"config.ini" + unless config_file.exist? + config_file.write <<~INI + [backup] + folder = #{pkgvar}/backup + INI + end + 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..d262913542c06 --- /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/9.0.3/bazel-diff_deploy.jar" + sha256 "4a7dd64c7b1fb1219b825138c62c206d2ace7470aa5d3a07a554532e74048893" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8e16f516a376286f2a86ae079cfa297dec7030f62202bb2bbf92b5af8db3ac68" + 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..43d96e2dbdde5 --- /dev/null +++ b/Formula/b/bazel-remote.rb @@ -0,0 +1,39 @@ +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.5.1.tar.gz" + sha256 "ec2d5fa65fa15e571347627cbd0a104a95ff66479e694e534257e703fa580d66" + license "Apache-2.0" + head "https://github.com/buchgr/bazel-remote.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7e42f5b3e1d951c49b40b8b60ce2df83ce1cf6a21e8ecfecf8cc5e2cfd7d087a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f2d903c8c87c763476299b3b39404ef6781a1749a0ab7296d691f675f36a986b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "836a4e71d3cdd9d82b331f60f77fc8ef7b6a12f45a2c3056395f62b9399c0adc" + sha256 cellar: :any_skip_relocation, sonoma: "f6685a17ca98be8653c9f5e4e8f6bc4c9d606d10eee3b827c8dbc7db3cdddf9f" + sha256 cellar: :any_skip_relocation, ventura: "f5b02293e474d05f3734c188edb9fa925d01f91baff1c4f006717d595e1235fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "049efc5f440e85bdc3c985d7b4cf341b75a047a9555f8696dd8d75f49ea472ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c31a68807911ee688a0648a85652831d2d77bde81b806e2ebec9d5fd452c7890" + 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..0cd622b8dc2d7 --- /dev/null +++ b/Formula/b/bazel.rb @@ -0,0 +1,145 @@ +class Bazel < Formula + desc "Google's own build tool" + homepage "https://bazel.build/" + url "https://github.com/bazelbuild/bazel/releases/download/8.2.1/bazel-8.2.1-dist.zip" + sha256 "b12b95cc02cc5ee19ff7a6a7f71f9496631f937c8e13a8f53ee0ff7b7700bc16" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8224a8feb8a996ee168e3ea0827a3c3b03f7548f073ac999c7492bec90083542" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cafc46ac731d4813486d8f2dcca404bd4c26b1a9dd1a7d5e3c969a91c9ec4cca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bf0164c7b1827eddeae7a5836b7cef7c7190bf4effaaa8200b4c112376d8b7e3" + sha256 cellar: :any_skip_relocation, sonoma: "741ea67f934716218cccab3f2ef504afc224a7e9ddc8e71eb2b86dcdbbcd934b" + sha256 cellar: :any_skip_relocation, ventura: "413a2f767535186f8111dcd0f99fe45a50d26b9ced44c448d2c37e67b9d3d007" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a59f868eeb3da45fa932b604f195ee68280a943355f62a22faf1a3f4c5d76c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "50aaa13f1ad8ae797ba2eb663c5e1d0a92e3321973cedf1f1e62a56fcb0dd265" + end + + depends_on "python@3.13" => :build + depends_on "openjdk@21" + + uses_from_macos "unzip" + uses_from_macos "zip" + + on_linux do + on_intel 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 + 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 + 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 + + 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/bazel@7.rb b/Formula/b/bazel@7.rb new file mode 100644 index 0000000000000..fe6875e24d178 --- /dev/null +++ b/Formula/b/bazel@7.rb @@ -0,0 +1,140 @@ +class BazelAT7 < Formula + desc "Google's own build tool" + homepage "https://bazel.build/" + url "https://github.com/bazelbuild/bazel/releases/download/7.6.1/bazel-7.6.1-dist.zip" + sha256 "c1106db93eb8a719a6e2e1e9327f41b003b6d7f7e9d04f206057990775a7760e" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(7(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7dae7266441ab2beedf3182e5f6a8d2a19ffa7ac14af31c0133abb11f36738f6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "966ae2fc6bc711139718ce063e31c48c2b627b474d222a25568233ff07298929" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ff70d65599bbce115caa90cba8efbe7351b6e1341b69c2ae2c18f57059064f02" + sha256 cellar: :any_skip_relocation, sonoma: "52a50ec6c4761251949a723da9b4146e341b2dabe323ebc64fd5f3924cf88936" + sha256 cellar: :any_skip_relocation, ventura: "075b8150e956c31d49b5b5743677020b1406e71b7e5fd839de14b17582ab7ada" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe1c1785992432c380719918b12391ab48f006c67ce072dcf36f82f1e9e6d038" + sha256 cellar: :any_skip_relocation, x86_64_linux: "54038042ac48134b90dc9b711b5e8dda20618817db58b900763547523ff28968" + end + + keg_only :versioned_formula + + # https://bazel.build/release#support-matrix + deprecate! date: "2027-01-01", because: :unsupported + + depends_on "python@3.13" => :build + depends_on "openjdk@21" + + uses_from_macos "unzip" + uses_from_macos "zip" + + on_linux do + on_intel 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 + 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" + # 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..3010e772b0231 --- /dev/null +++ b/Formula/b/bazelisk.rb @@ -0,0 +1,56 @@ +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.26.0.tar.gz" + sha256 "d55ea90acb6da4cacdfad0eeecf55e58da9d3fd4b88d58502ddd34e48bb28f70" + license "Apache-2.0" + head "https://github.com/bazelbuild/bazelisk.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f621485fb73f8d1d0be774a8b42cd341f375f7809a4eaa596f94d273b5addd05" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f621485fb73f8d1d0be774a8b42cd341f375f7809a4eaa596f94d273b5addd05" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f621485fb73f8d1d0be774a8b42cd341f375f7809a4eaa596f94d273b5addd05" + sha256 cellar: :any_skip_relocation, sonoma: "ceedc4d98977cbf4171f09365f98efb665766b83806c86988138172ee6adea45" + sha256 cellar: :any_skip_relocation, ventura: "ceedc4d98977cbf4171f09365f98efb665766b83806c86988138172ee6adea45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "720bcd0f66df7982dcd2408e298a2f1f49302a511e69150b3ff77b560d5368ec" + 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 + + # bump go to 1.23.0, upstream pr ref, https://github.com/bazelbuild/bazelisk/pull/680 + patch do + url "https://github.com/bazelbuild/bazelisk/commit/160cdf5e1387a74e7f31f988f4ebe20c617e85fc.patch?full_index=1" + sha256 "0a83579d9f108727bdbbb073dfab000b5c817659fd044812cb3651bc6ec58c42" + end + + def install + 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"] = Formula["bazel"].version + output = shell_output("#{bin}/bazelisk version") + assert_match "Bazelisk version: #{version}", output + assert_match "Build label: #{Formula["bazel"].version}", output + + # This is an older than current version, so that we can test that bazelisk + # will target an explicit version we specify. This version shouldn't need to + # be bumped. + bazel_version = Hardware::CPU.arm? ? "7.1.0" : "7.0.0" + ENV["USE_BAZEL_VERSION"] = bazel_version + assert_match "Build label: #{bazel_version}", shell_output("#{bin}/bazelisk version") + end +end diff --git a/Formula/b/bbe.rb b/Formula/b/bbe.rb new file mode 100644 index 0000000000000..00fe9592bb634 --- /dev/null +++ b/Formula/b/bbe.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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, mojave: "f1c5c6884c5e1740d5f649ac1caa4bb42df1a5ab6bba13970497f7c94454d346" + sha256 cellar: :any_skip_relocation, high_sierra: "95cef154264d814bcdb543da64b8947ed8219411c3da20d854f30bd0aeb1332a" + sha256 cellar: :any_skip_relocation, sierra: "4f533ae33e0c46a01bc11f1c8b99ef6baba62a376ddee1000de1fa199f18545a" + sha256 cellar: :any_skip_relocation, el_capitan: "d9c63d7b9657e6f1c0e53048564f275283177e3513e202a7a9cfc69571bb5008" + 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..47c6c32038774 --- /dev/null +++ b/Formula/b/bbftp-client.rb @@ -0,0 +1,49 @@ +class BbftpClient < Formula + desc "Secure file transfer software, optimized for large files" + homepage "http://software.in2p3.fr/bbftp/" + url "http://software.in2p3.fr/bbftp/dist/bbftp-client-3.2.1.tar.gz" + sha256 "4000009804d90926ad3c0e770099874084fb49013e8b0770b82678462304456d" + license "GPL-2.0-or-later" + revision 3 + + livecheck do + url "http://software.in2p3.fr/bbftp/download.html" + regex(/href=.*?bbftp-client[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + 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, mojave: "bdb7c899dab18816b4cc1d573291ba4691f365c9ed1c9951e73f9225810a8557" + 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..cee17d9d132d1 --- /dev/null +++ b/Formula/b/bbot.rb @@ -0,0 +1,328 @@ +class Bbot < Formula + include Language::Python::Virtualenv + + desc "OSINT automation tool" + homepage "https://github.com/blacklanternsecurity/bbot" + url "https://files.pythonhosted.org/packages/2d/ab/5eb57a9bf484f844a57d4bf9d38484ee24cd01ad3214b0c16cb0cbf21a03/bbot-2.4.2.tar.gz" + sha256 "08f4960c8b954aae6a3713137e31755acbd52faf020fdf7740c2d914c42817d7" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e537be9deb58feb2599511526fa4efc0c2c8a9199fc5c3669f6ee7e46c989816" + sha256 cellar: :any, arm64_sonoma: "c948d1b21c3a7d82b2cf045ec6c8ccd6887f21f48d8beb21072325db0028647a" + sha256 cellar: :any, arm64_ventura: "f84081b8fb8884c35fc5a38e52b628390012d7e9dbf514cd7d98d4a43b03c45a" + sha256 cellar: :any, sonoma: "e83786b29810ac5c72e0899ffa832fd8aa81d5926f1eb368698c706f0510a230" + sha256 cellar: :any, ventura: "c5812aa4267cb54aa3a58c75089358e22c42b9041e00dbbdae3baea989d1425c" + sha256 cellar: :any_skip_relocation, arm64_linux: "825d594dce963177f7a68f576aa9126c28cf9242bbd3ae861080de8fcf5822f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8cd377598fd60beaefb70306108c10c7669adbe21b7d255058f3fa88c27c412" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "openjdk" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "python@3.13" + depends_on "zeromq" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + 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/32/54/0d859184549efa339b2e370930a7741b42030cc357e107863cbadc3e72d8/ansible_core-2.18.5.tar.gz" + sha256 "319304d161770a8a891c07dec8a22c528548a948a7097eaf1a79939395105535" + end + + resource "ansible-runner" do + url "https://files.pythonhosted.org/packages/06/89/9426e3353829ab0c2f0277a14a6bc4d99d301b74533b0c901e7636794e45/ansible_runner-2.4.1.tar.gz" + sha256 "11d717da4dd8d93d56703a4a98e5f2154026a7ed1b46d9930902b8298dc67d09" + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + 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 "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "cloudcheck" do + url "https://files.pythonhosted.org/packages/bf/8a/58f1df20c4e59936df7a3bb62a6ea1eeae7ffe87996224b64b4e531b7d90/cloudcheck-7.0.47.tar.gz" + sha256 "61c4a3b70dcd86349c72e3179e427e7db6ee046cc88ba0d76ada1bea84223242" + end + + resource "deepdiff" do + url "https://files.pythonhosted.org/packages/7f/2f/232a9f6d88a59526347cb483ec601d878ad41ab30ee4f2fba4aca1d5a10e/deepdiff-8.4.2.tar.gz" + sha256 "5c741c0867ebc7fcb83950ad5ed958369c17f424e14dee32a11c56073f4ee92a" + 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/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + 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 "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/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "mmh3" do + url "https://files.pythonhosted.org/packages/47/1b/1fc6888c74cbd8abad1292dde2ddfcf8fc059e114c97dd6bf16d12f36293/mmh3-5.1.0.tar.gz" + sha256 "136e1e670500f177f49ec106a4ebf0adf20d18d96990cc36ea492c651d2b406c" + 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/e4/20/6afbd546526c8b97ca1f53cfef395c59c403bb7f1e9fd54cbfae141c9d77/orderly_set-5.4.0.tar.gz" + sha256 "c8ff5ba824abe4eebcbbdd3f646ff3648ad0dd52239319d90056d8d30b6cccdd" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/98/c7/03913cc4332174071950acf5b0735463e3f63760c80585ef369270c2b372/orjson-3.10.16.tar.gz" + sha256 "d2aaa5c495e11d17b9b93205f5fa196737ee3202f000aaebf028dc9a73750f10" + 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/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 "puremagic" do + url "https://files.pythonhosted.org/packages/09/2d/40599f25667733e41bbc3d7e4c7c36d5e7860874aa5fe9c584e90b34954d/puremagic-1.28.tar.gz" + sha256 "195893fc129657f611b86b959aab337207d6df7f25372209269ed9e303c1a8c0" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/44/e6/099310419df5ada522ff34ffc2f1a48a11b37fc6a76f51a6854c182dbd3e/pycryptodome-3.22.0.tar.gz" + sha256 "fd7ab568b3ad7b77c908d7c3f7e167ec5a8f035c64ff74f10d47a4edd043d723" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "pyzmq" do + url "https://files.pythonhosted.org/packages/b1/11/b9213d25230ac18a71b39b3723494e57adebe36e066397b961657b3b41c1/pyzmq-26.4.0.tar.gz" + sha256 "4bd13f85f80962f91a651a7356fe0472791a5f7a92f227822b5acf44795c626d" + 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/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 "resolvelib" do + url "https://files.pythonhosted.org/packages/ce/10/f699366ce577423cbc3df3280063099054c23df70856465080798c6ebad6/resolvelib-1.0.1.tar.gz" + sha256 "04ce76cbd63fded2078ce224785da6ecd42b9564b1390793f64ddecbe997b309" + end + + resource "setproctitle" do + url "https://files.pythonhosted.org/packages/c4/4d/6a840c8d2baa07b57329490e7094f90aac177a1d5226bc919046f1106860/setproctitle-1.3.5.tar.gz" + sha256 "1e6eaeaf8a734d428a95d8c104643b39af7d247d604f40a7bebcf3960a853c5e" + 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 "soupsieve" do + url "https://files.pythonhosted.org/packages/3f/f4/4a80cd6ef364b2e8b65b15816a843c0980f7a5a2b4dc701fc574952aa19f/soupsieve-2.7.tar.gz" + sha256 "ad282f9b6926286d2ead4750552c8a6142bc4c783fd66b0293547c8fe6ae126a" + 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-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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 "yara-python" do + url "https://files.pythonhosted.org/packages/2f/3a/0d2970e76215ab7a835ebf06ba0015f98a9d8e11b9969e60f1ca63f04ba5/yara_python-4.5.1.tar.gz" + sha256 "52ab24422b021ae648be3de25090cbf9e6c6caa20488f498860d07f7be397930" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + 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..33e924ddfe10b --- /dev/null +++ b/Formula/b/bbtools.rb @@ -0,0 +1,47 @@ +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.25.tar.gz" + sha256 "3d4b78435a8838eea8d5765622f2d251a81183ca5d0113a980d31ebf30a8f082" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9e77dab213a6fbcfddd387d2550c7a2e4de9e155d2866e4c7669a8bd1686a790" + sha256 cellar: :any, arm64_sonoma: "baecc8010ec5c53717a4810aef1e2bf0009afaee999c60a5c5f856bb5a37ed45" + sha256 cellar: :any, arm64_ventura: "1565c2f42e4d2995b1b8c4e29831b9e695d3df55bb394bfb35ecd47f28a87f1c" + sha256 cellar: :any, sonoma: "3ded91807fd14676cb990fa519f81c23bf6ba2d4755680cecca233c924159e6e" + sha256 cellar: :any, ventura: "4a849562d71ffd59ac664ff5a59e517a893a1af23537d9e78760d4565ff349fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "976bcab19197bc8eb750d12c8dee131ce385179803579ba6e8e4c7474ad44f7d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "794c49de78ad5448dbcac779065d7f6cf96d27dc07dadee259cc11bcc05ea7e0" + 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..75a25d88464a2 --- /dev/null +++ b/Formula/b/bc-gh.rb @@ -0,0 +1,49 @@ +class BcGh < Formula + desc "Implementation of Unix dc and POSIX bc with GNU and BSD extensions" + # The homepage is https://git.gavinhoward.com/gavin/bc but the Linux CI runner + # has issues fetching the Gitea urls so we use the official GitHub mirror instead + 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" + + bottle do + 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://git.gavinhoward.com/gavin/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..715b3d6d85596 --- /dev/null +++ b/Formula/b/bc.rb @@ -0,0 +1,50 @@ +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.08.1.tar.gz" + mirror "https://ftpmirror.gnu.org/bc/bc-1.08.1.tar.gz" + sha256 "b71457ffeb210d7ea61825ff72b3e49dc8f2c1a04102bbe23591d783d1bfe996" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e2c49cd3539bc92c81ae5ce1dffe677845e88a4607060bfb929e17615f94922c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3dad88ebb19c3b2f3ff45b61ce9e0136de0d311a7ccecbb7095cfc247e4cfe51" + sha256 cellar: :any_skip_relocation, arm64_ventura: "82e07f26adbb9832430fd707a1dcf1ae7901bcef2928e84720b3c55c7a3ffd34" + sha256 cellar: :any_skip_relocation, sonoma: "25027ce1482683837e17972623a1baa472d55ec68e665f303dba8bb3d7275668" + sha256 cellar: :any_skip_relocation, ventura: "2ca58c90ac248548f14591b4c43e8925cef592b43839f4c46847cdcf1ed2cc13" + sha256 cellar: :any_skip_relocation, arm64_linux: "315d2ef3d29f405e68d4090309f21fc00d1480ec3b29ddf48afb4b27f9b4c179" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d605e214ec69bd5b1c7331fdade1048f6f580eccc67ffff9f4f7ee30a4163eb5" + 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..5005d2ca3a900 --- /dev/null +++ b/Formula/b/bcal.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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..7ed1723fec9ea --- /dev/null +++ b/Formula/b/bcftools.rb @@ -0,0 +1,43 @@ +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.21/bcftools-1.21.tar.bz2" + sha256 "528a4cc1d3555368db75a700b22a3c95da893fd1827f6d304716dfd45ea4e282" + # 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_sequoia: "24923a0c1f5695cebd051f338ae43f532183f086afb5be6284a2a28b26aa3296" + sha256 arm64_sonoma: "c3f336afc9026b9b782a955e4105d208bab0ec6f8f1701171d3093bff70487e0" + sha256 arm64_ventura: "f380f5a44355aa36e14234551ef6cadd5c8cae4889af33acaa12f3759309e04b" + sha256 arm64_monterey: "a59a1531f579d313e6d4650a47e75d93b5a978758a67b0dd417aabd507994e00" + sha256 sonoma: "ed2ea3659a829947e39e6a9fc8c295f483052a7e54f7b369682a1dc4574d52cf" + sha256 ventura: "a0dea566d19deacb5b1d6886c2f7b21a49a01cfb554efbe2d4462e1a0edbfc81" + sha256 monterey: "49ed253ef4ddfeaa96b1a96c4b51c60992cf1248f087ab8bd534c82facdb6a44" + sha256 arm64_linux: "4582498f2464536ab620d6356fc64a5057b611da880c4a86a064dea155597dc0" + sha256 x86_64_linux: "d0b13624d5d87f0b28715e7ce74b3c78daf2f6a3db7f025a6b9fd434f0aff2f8" + 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..0a1ed4a66d3de --- /dev/null +++ b/Formula/b/bchunk.rb @@ -0,0 +1,51 @@ +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 + + bottle do + 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, mojave: "232935a7e7291016af594df742848d851ceca12ff9c06e183485c6a184c1df38" + sha256 cellar: :any_skip_relocation, high_sierra: "d6183607b5b987345ee3380263819f1d5e12f2f3cc9f6fd55accfbf92c26d5ef" + sha256 cellar: :any_skip_relocation, sierra: "95ef5fddc2234902187dde834690fb5957bd99ce11403e3d0f8881a705bb8f27" + sha256 cellar: :any_skip_relocation, el_capitan: "665af973709071e982939f37ba39c79c6e41f7f18277d65670475ba9d8315f94" + 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..92c522fcecf20 --- /dev/null +++ b/Formula/b/bcoin.rb @@ -0,0 +1,54 @@ +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_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..a53aab1fe84e6 --- /dev/null +++ b/Formula/b/bcpp.rb @@ -0,0 +1,40 @@ +class Bcpp < Formula + desc "C(++) beautifier" + homepage "https://invisible-island.net/bcpp/" + url "https://invisible-mirror.net/archives/bcpp/bcpp-20240917.tgz" + sha256 "f13c2e0ae9034b64e8a30f7a0228344b68c76a0215e0c12a9650852a4cec91ce" + 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_sequoia: "0d543a71f77b6a9ef7ae4497c5114153a5fbe35cb5d610a8b3b8c472b2709b20" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "415b0a2c2f3a201a6382957c0ccca9d79fc4733a0ed4f335f782c45861de7845" + sha256 cellar: :any_skip_relocation, arm64_ventura: "76e722eee04aac5c5ce137cba0c031e42581003f5b27e0e9eefd45011e8c5bc6" + sha256 cellar: :any_skip_relocation, sonoma: "3790cb06332cdc0c857a1e780d4edd9ac899d69d4a1a08047b61249ad40456c6" + sha256 cellar: :any_skip_relocation, ventura: "2b082e9a692aa8e77fea3c96eb48a25ca75b45a6599207a4ecc2b2e10b1c91b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "15cd7515cfbe19bfc6cef04b30a3f4bc56104fbbd790c1eeab2d59d487078491" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e99e6dc868a2b3bd6fcf189124cccaccdd1322ee18a51dc23055e8579d2e28e8" + 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..7e81656328539 --- /dev/null +++ b/Formula/b/bcrypt.rb @@ -0,0 +1,48 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "bb843c3b04f9adf57df1c2d07e30303626eedb0f45695dcaf38d0835ea3e35fd" + sha256 cellar: :any_skip_relocation, high_sierra: "883a4a97b7275e91cd90ab9d1ca69fa2a3c0db3544a2d77863a37bda16c51667" + 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..f037bdd5f2696 --- /dev/null +++ b/Formula/b/bde.rb @@ -0,0 +1,77 @@ +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.24.0.0.tar.gz" + sha256 "52eee2f753108d5dbea6f05b11a08dc3ae90923379208705a7e5f686bf2c7faa" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d3e591173e29d21043c0e93209d39e9b0c832d2577e01afab0b11a0cb5fb4abc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6b3e442804969707bd0c7a9491865e8c5f97664d33e6312a29a0b98c5cad56ef" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5908a2ccc520b05a5a1315fd2ad8b9738503d63c96fcaf31ff864cc10a313355" + sha256 cellar: :any_skip_relocation, sonoma: "84fb57fa5d81941643b84942907cf383aef5582a11f8d4f1976172cadaf5ddd1" + sha256 cellar: :any_skip_relocation, ventura: "fccdadf682135e3b8cb3901d4f9c4edb8f777cd67eb131dffb84782fdb9e04cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc98fb664f4467eca2cce4b12591d155a12ecc62ecea73f224ec57ace5ef444a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8b2767daf6e305140a0e66d87ddac865187937ff57929fe640764e2d6ab79b3" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :build + depends_on "pcre2" + + resource "bde-tools" do + url "https://github.com/bloomberg/bde-tools/archive/refs/tags/4.24.0.0.tar.gz" + sha256 "0907c0019a90a7cd0000f92c093ab0de5c7750ea749766701555bbb47521472f" + + livecheck do + formula :parent + 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.13")} + -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..dbd48260b0cfb --- /dev/null +++ b/Formula/b/bdftopcf.rb @@ -0,0 +1,67 @@ +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_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..8b6ae50a829b2 --- /dev/null +++ b/Formula/b/bdw-gc.rb @@ -0,0 +1,82 @@ +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.2.8/gc-8.2.8.tar.gz" + sha256 "7649020621cb26325e1fb5c8742590d92fb48ce5c259b502faf7d9fb5dabb160" + license "MIT" + head "https://github.com/ivmai/bdwgc.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "58c2b5cf58c6ea30fc56a34aacfe36f774bed4cee1dca9808ef58d154a5ec965" + sha256 cellar: :any, arm64_sonoma: "26862c04a22c24bbbe25d7fd1a2fa4d499d5a7216101625115be645123ea0445" + sha256 cellar: :any, arm64_ventura: "55890248e3f2624e882660e38695e9090a8be1bff6c9a829ef35b0a30a890fee" + sha256 cellar: :any, arm64_monterey: "013ffdfc107f8ec5d5382af87412bdfd4cb3503e866555fbe3252c3d7dcdcc10" + sha256 cellar: :any, sonoma: "54cd5df410fb01fc0f7a9b212b5ef40e8160e360e597b5d20e6e489df306ce37" + sha256 cellar: :any, ventura: "71c1beb334094059de83c81be4f1239e4ece22a1f7baf5c98d9682a2243b13bb" + sha256 cellar: :any, monterey: "33e2046794356d765327d03b638c8449e38a69055f801542ee4abd2ea6329f49" + sha256 cellar: :any_skip_relocation, arm64_linux: "050c231beec4610f2d0a3c7bcc5cf8a7c7c6f93317fb8f990db26ba1c8950b66" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f666fdf55ce3b41704f5869120ddfd3e973051d1fc0dc32a80733f20ba15ea0c" + 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" + if OS.linux? || Hardware::CPU.arm? || MacOS.version > :monterey + # Fails on 12-x86_64. + system "ctest", "--test-dir", "build", + "--parallel", ENV.make_jobs, + "--rerun-failed", + "--output-on-failure" + end + 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..7db232acc08dd --- /dev/null +++ b/Formula/b/beagle.rb @@ -0,0 +1,66 @@ +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_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..7d6a4c959fb3c --- /dev/null +++ b/Formula/b/beakerlib.rb @@ -0,0 +1,50 @@ +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.4.tar.gz" + sha256 "1c1a5a376e71332e350c56f3ac0433d6b7570b4583400ee1e7a4c7d9cdc5f4cd" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9623f5cfcf093eced2c4e1c3695812ecf0a7db6a3896cdbf255f8b6ba44c3fad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "09decd75f0914c2e34fbe97963d238a74f079e8d1ef27e82ef2e7ba41da1f9fb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b6fa04c4d94639a37919652667280c6eb8e85ce78defc76e2af94450fc7ec255" + sha256 cellar: :any_skip_relocation, sonoma: "7d3475bfc5406195fc15d3cf9a88f3324ad027efb50f4381799d9c36a86d872f" + sha256 cellar: :any_skip_relocation, ventura: "8ed2d0956f6ac062e613ccb3914feff88f125b3dbd8e84caa5955dec414a965f" + sha256 cellar: :any_skip_relocation, arm64_linux: "35add5b650f5e9beee810810748f3721a2bbdeb5bb7b167b227b8dbbffd74a48" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e485dc5c3d91552a8fabf34c64dbde80caf20090009b789ded07851dfd6adc2" + 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..3b6feeaac6210 --- /dev/null +++ b/Formula/b/beancount-language-server.rb @@ -0,0 +1,47 @@ +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.3.7.tar.gz" + sha256 "d1da21e518815514ebb1d69e863dc414ce6480ab0eb81e113edb91fca4a5d999" + license "MIT" + head "https://github.com/polarmutex/beancount-language-server.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0e0c99b2f1dcb24b04cd4698c3518d3cecd0546aa374dbb6c6cc5887fdcd2896" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "648544219f5a5e8c470f7ff408b855d1fce73e2755b99126d3d097d6638bb638" + sha256 cellar: :any_skip_relocation, arm64_ventura: "556f325fb38bf9bffdc52b3b9e7fd88daac37560b78ceeb28efe389b2df9fd9e" + sha256 cellar: :any_skip_relocation, sonoma: "d97d0cc203492c1a4a1f23b5b511ce7201866c9ac85a33c1801903549a7ef358" + sha256 cellar: :any_skip_relocation, ventura: "a30e3c99c240779b2f31ddce88ef5e7ab090998b27d33b565802266f0e7db114" + sha256 cellar: :any_skip_relocation, arm64_linux: "de3ffe95aa88c9d22d101033c5c890c960e3c758bce8f19850f1a7180018e0bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b1e6d556a63559ec5d98de3cc85ce144fbd5f9d4509fc8020bee4d69a995a4f" + 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..04f816c6aa226 --- /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/93/a6/973010277d08f95ba3c6f4685010fe00c6858a136ed357c7e797a0ccbc04/beancount-3.1.0.tar.gz" + sha256 "1e70aba21fae648bc069452999d62c94c91edd7567f41697395c951be791ee0b" + license "GPL-2.0-only" + head "https://github.com/beancount/beancount.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8dc1fcd7f2317ea72784d7fbf2f76c54e2db0326d7526f22a1b9a9c291efc222" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9a4c201840e45d79de983afd1068d188f3bc8d55d6d45f7cb2bb3434920f1e77" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ea4e49c721b56ee17b5c3cb7adbf37427f73beb5feb9dba8b96319f2c15e6a00" + sha256 cellar: :any_skip_relocation, sonoma: "c87741dafbf02e62986b0fa4b485542bb2f1e8cbc2d8f967475e94d46058c6a9" + sha256 cellar: :any_skip_relocation, ventura: "0417cdbffbbb58e14ed1f6496f390da38ffddf7f43483206ae61ceb97dff809b" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b9d0b7dd0cbb81adba41b95cf6f87bd7810d5236d087c884c2398fdfffefba3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f61124a05787d02519432086cbbbafef2b979e40747d7e9801559d81b0b1003f" + end + + depends_on "bison" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "certifi" + depends_on "python@3.13" + + uses_from_macos "flex" => :build + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + on_linux do + depends_on "patchelf" => :build + 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 + + def install + virtualenv_install_with_resources + + bin.glob("bean-*") do |executable| + generate_completions_from_executable(executable, shells: [:fish, :zsh], 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..a38348e62fac7 --- /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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ad89c13a41f3bdc16fa426ba7eebb808e4da0a45ffe551ea6783c7f7843117e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "374503a428b9d2045e122d01d6a3117270cea9381c8eb71dfa0843d19b7328f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ed4a1c6dbf258526c55a81d1d727336cd8d0e6230926a74e84d6f6a3dd66e162" + sha256 cellar: :any_skip_relocation, sonoma: "fb197601ec1c54d9812177b46f8ed7bae8cf0f5ed90a231fe5078f2e5f2aa536" + sha256 cellar: :any_skip_relocation, ventura: "ae876669e91355b0f653c58c4c4770bdf84f4781737896b2c6b311a1f6ec04ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce5374e8a539cadaf0109a8640b886c1b4a0a25c2c8b8d225ed16eadf51540e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3852ca60b6b08b51a8cc60f9e35c3139183c4d8531d22e3f9977026edbcb0c99" + end + + depends_on "bison" => :build # for beancount + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "python@3.13" + + 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..1460c3fa92608 --- /dev/null +++ b/Formula/b/beanstalkd.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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..f64a5ee4188bb --- /dev/null +++ b/Formula/b/bear.rb @@ -0,0 +1,67 @@ +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 1 + head "https://github.com/rizsotto/Bear.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "d972c82724c1d6aeb3c7d345027fff6f46a39901eb91efe3caed45a476130987" + sha256 arm64_sonoma: "53abace5e60be878c36336a8524cf3dae8d2ca641ff724351efa07afa5f8012b" + sha256 arm64_ventura: "00e58ae4430c5abc7fb8f8daf05e7e77f0f6a4fffd599d4b592864be7c09e4a4" + sha256 sonoma: "de0bbb65470f5b6481979ec3a885041e0ba07fbd88263bc391c3c7ca963f1dc6" + sha256 ventura: "210733da953a8fefca62c17e1a5e7af54aa9271d25ebe4bfbf2c3f582d1464a4" + sha256 arm64_linux: "f390959ee3aacdbf2ca776ca4a918f28b32fc096667e076818f8322a2def2468" + sha256 x86_64_linux: "6e8206f6f977d625d90225f9da4190c7c707726a1e9fa31efe1da485b8227e2f" + 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..ed8e5c9bdf619 --- /dev/null +++ b/Formula/b/beast.rb @@ -0,0 +1,73 @@ +class Beast < Formula + desc "Bayesian Evolutionary Analysis Sampling Trees" + homepage "https://beast.community/" + license "LGPL-2.1-or-later" + revision 1 + head "https://github.com/beast-dev/beast-mcmc.git", branch: "master" + + stable do + url "https://github.com/beast-dev/beast-mcmc/archive/refs/tags/v1.10.4.tar.gz" + sha256 "6e28e2df680364867e088acd181877a5d6a1d664f70abc6eccc2ce3a34f3c54a" + + # Backport support for building on newer OpenJDK + patch do + url "https://github.com/beast-dev/beast-mcmc/commit/3b91c1d391daf350c92f84c5900b58ff72a889af.patch?full_index=1" + sha256 "64511255b4cd3339ad9be5a6b1cb98283cb279cab5a60913b9a1619433b702f7" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1ec7cd636c5eb6427da2a75bb75976143fbae45c8d91e572d6dadb98913ac181" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "28cab0636b496492f69e99401ef9ab308380020d757534983109f09d6a2237ae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dc1635820e1fc7927203e32b9889e9a40046347d41da139a5242732b69113003" + sha256 cellar: :any_skip_relocation, sonoma: "bb2c0e36ea56bc4da5acd32fc8b94d3790b4941ae0a96c329edc09bdcda964f5" + sha256 cellar: :any_skip_relocation, ventura: "addf828a1d4ee838921507d1c937a9ca17ea2b4666193461237fc218a1b1bddc" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5cb0610f7b28b36cb020c8d6075523e4e73aee036b928823361059e4e86ce29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8974bcba1ac12db8bad1ccdd47976f468ea9f7739eb0d43fe120bb93e1cef388" + 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/BEASTv*/*"] + 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..9ce8edda3b436 --- /dev/null +++ b/Formula/b/beautysh.rb @@ -0,0 +1,65 @@ +class Beautysh < Formula + include Language::Python::Virtualenv + + desc "Bash beautifier" + homepage "https://github.com/lovesegfault/beautysh" + url "https://files.pythonhosted.org/packages/20/96/0b7545646b036d7fa8c27fa6239ad6aeed4e83e22c1d3e408a036fb3d430/beautysh-6.2.1.tar.gz" + sha256 "423e0c87cccf2af21cae9a75e04e0a42bc6ce28469c001ee8730242e10a45acd" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "db3fc03fcc098082ae52debdee0bc7f353b793207d1cff2c05ea98f9d991bc83" + end + + depends_on "python@3.13" + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "types-colorama" do + url "https://files.pythonhosted.org/packages/59/73/0fb0b9fe4964b45b2a06ed41b60c352752626db46aa0fb70a49a9e283a75/types-colorama-0.4.15.20240311.tar.gz" + sha256 "a28e7f98d17d2b14fb9565d32388e419f4108f557a7d939a66319969b2b99c7a" + end + + resource "types-setuptools" do + url "https://files.pythonhosted.org/packages/13/5e/3d46cd143913bd51dde973cd23b1d412de9662b08a3b8c213f26b265e6f1/types-setuptools-57.4.18.tar.gz" + sha256 "8ee03d823fe7fda0bd35faeae33d35cb5c25b497263e6a58b34c4cfd05f40bcf" + end + + # Switch build-system to poetry-core to avoid rust dependency on Linux + # https://github.com/lovesegfault/beautysh/pull/247 + patch do + url "https://github.com/lovesegfault/beautysh/commit/5f4fcac083fa68568a50f3c2bcee3ead0f3ca7c5.patch?full_index=1" + sha256 "26264ebaa3b4f3d65ea382fb126e77b64974a1eb26fda297558c5aad7620cb1b" + end + + # Replace setuptools for python 3.12+: https://github.com/lovesegfault/beautysh/pull/251 + patch do + url "https://github.com/lovesegfault/beautysh/commit/2d0486cd4751d828ee0ba70c9c78c8d8f778b6fa.patch?full_index=1" + sha256 "2836af4805504339c1aa3bab1c14678e35d6eaaf2310c462b097b736d277b2be" + 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..eb37abd237194 --- /dev/null +++ b/Formula/b/bed.rb @@ -0,0 +1,29 @@ +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_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, 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..0f5c2397501d5 --- /dev/null +++ b/Formula/b/bedops.rb @@ -0,0 +1,62 @@ +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.41.tar.gz" + sha256 "3b868c820d59dd38372417efc31e9be3fbdca8cf0a6b39f13fb2b822607d6194" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "f662fcab9ba091a7ffcf39bd47ea5e41f870905a14e789a77d5024a6430281a3" + sha256 cellar: :any, arm64_sonoma: "dd564d3cdff0027c493485c2ff35c9e5d5bda6456877dcbbba375eaac4d51d5f" + sha256 cellar: :any, arm64_ventura: "dc32a609274e337d4372a480187edbef851a031ab654f7ed96d4063bc2b568dd" + sha256 cellar: :any, arm64_monterey: "3db503b39d5c54fe63767b5904538ffe0e656706bf0d575d5b4aa3fbf710d491" + sha256 cellar: :any, sonoma: "971e7b2619817f1ee848298cb8520e8c5f04bf5cb312cf822bf398a9f533353f" + sha256 cellar: :any, ventura: "1b6e6b69ae7a9893e81ff2f90f2b9e395f4d49cf9480b919597597054438c9b7" + sha256 cellar: :any, monterey: "dc2dfc7bfc8d29e1591a73b7c9697de4b8161a312acc1c1fcc0c9a311c1bc055" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a929b6dda707a961601eb95a14fce9fd6c629ba4bf1161aeec5ace4cdd5373e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7df0184574d41dcc2f66a7ec2c762c7e142475f5557631de50883e4f0556d421" + 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://sources.debian.org/data/main/b/bedops/2.4.41%2Bdfsg-1/debian/patches/use_debian_libs" + sha256 "e9ec0c4603a6978af2eb2fc998091de855e397a456da240169140ad4dcbeae64" + 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/bedtools.rb b/Formula/b/bedtools.rb new file mode 100644 index 0000000000000..0d902fa8b236e --- /dev/null +++ b/Formula/b/bedtools.rb @@ -0,0 +1,39 @@ +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_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 + # Remove on the next release which has commit try both python and python3 + # Ref: https://github.com/arq5x/bedtools2/commit/ffbc4e18d100ccb488e4a9e7e64146ec5d3af849 + inreplace "Makefile", "python", "python3" if !OS.mac? || MacOS.version >= :catalina + + 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..4a808c4f16d39 --- /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.107/bee-1.107.zip" + sha256 "e73c17b6c28d343d9e53d11ea8c3274a0f4efd7247e446d9544a5e5ba568ff46" + license "MPL-1.1" + + bottle do + sha256 cellar: :any_skip_relocation, all: "aeec7d4184e245f4f567dcc86e8df481bbb0c345fe2aa10f4d489cab451c9b60" + 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..8a6d7115119e3 --- /dev/null +++ b/Formula/b/beecrypt.rb @@ -0,0 +1,84 @@ +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 + + bottle do + 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, mojave: "d4b8e542e1d0c6b805ced58ccf5342a29c29342631d0b180ef8b7268ca745d68" + sha256 cellar: :any, high_sierra: "75381fee700b8a6659dad5de0ea92df8d2e0bed0e1cd34755c8b3bfc39f99b89" + sha256 cellar: :any, sierra: "9bb192a3b891680eedbacb38cd9a2daa694cbef4d1db7b844d1809fb5504d660" + sha256 cellar: :any, el_capitan: "aafed63c6eb816d71151cf20830d76375ef872d2502babfe20f94683b3fcbf33" + 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..7f57efbec3339 --- /dev/null +++ b/Formula/b/befunge93.rb @@ -0,0 +1,42 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "23dd470caf59b04ffb652e46061760701269a8a79ce93c3afd71318da000112d" + sha256 cellar: :any_skip_relocation, high_sierra: "c8a1e2085413dd0da3036462eeffed2f01198da92f128f4951c0885bf69a0149" + 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..dcd24c2bc63e8 --- /dev/null +++ b/Formula/b/behaviortree.cpp.rb @@ -0,0 +1,41 @@ +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.7.1.tar.gz" + sha256 "7fccfad1bbe6fd0b3dffff0e439fcd508ca2983deec1b7447a5c8d66540dd91c" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d4c88258807c03dfa42972d969926a0ca73e47cfb4255f2671899530d5f5b697" + sha256 cellar: :any, arm64_sonoma: "d966f3f5496bbf6dd1e5814f0efb80692046c9e88ec5be3cae349b8a2f51bcc4" + sha256 cellar: :any, arm64_ventura: "762a8cf30054ceac0d39c0fc660619a1293a6c1d93d2bd79a5dab2f65a09e701" + sha256 cellar: :any, sonoma: "d29e1b0f4dc31024d23c858c0dc398b92b7e81699685bcbb2925dfcd53d9c14c" + sha256 cellar: :any, ventura: "33194549fe30d82462d9544ee3d337c3561c9ebb0297c0f0904ce5f72c78bae8" + sha256 cellar: :any_skip_relocation, arm64_linux: "daada1bfe756c6bb71bcdf3f0f7090ae2436172c1f7bdb6d6890937771722410" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9709dc54ea399939a8ebf959cb9d10b8766f6a05f0284fb3de1e3e037818b7b0" + 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..1e40562f4b783 --- /dev/null +++ b/Formula/b/bench.rb @@ -0,0 +1,49 @@ +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_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/bender.rb b/Formula/b/bender.rb new file mode 100644 index 0000000000000..5a77a260cd7bb --- /dev/null +++ b/Formula/b/bender.rb @@ -0,0 +1,31 @@ +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_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..cf38375e97340 --- /dev/null +++ b/Formula/b/benerator.rb @@ -0,0 +1,100 @@ +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" + + 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..bb542addd7f19 --- /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.51.0.tar.gz" + sha256 "8233ea6296a1230e388cda29d9f4d4daca631f9c7baf3cc8df484f15a3503b7a" + license "MIT" + head "https://github.com/redpanda-data/benthos.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a07cd20972e93a62a7ae6362922a2cec2c0692ede4ff0d5afcf7b6fd38f484c3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a07cd20972e93a62a7ae6362922a2cec2c0692ede4ff0d5afcf7b6fd38f484c3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a07cd20972e93a62a7ae6362922a2cec2c0692ede4ff0d5afcf7b6fd38f484c3" + sha256 cellar: :any_skip_relocation, sonoma: "4347d23bc899aa3e0a5cca434bc7117452d024a4477d574e50e342b880f92fbb" + sha256 cellar: :any_skip_relocation, ventura: "4347d23bc899aa3e0a5cca434bc7117452d024a4477d574e50e342b880f92fbb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d13641fcfc18e519db083c9ef2172c448d3cd1903a15e339543e4b27ac0eb934" + 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/bento4.rb b/Formula/b/bento4.rb new file mode 100644 index 0000000000000..3b7fc3eeeb4f4 --- /dev/null +++ b/Formula/b/bento4.rb @@ -0,0 +1,46 @@ +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" + + livecheck do + url "https://www.bok.net/Bento4/source/" + regex(/href=.*?Bento4-SRC[._-]v?(\d+(?:[.-]\d+)+)\.zip/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d7eb7ebefa4071ee7a67625f7fcbd85d47551ba51028f89ae1d97fbf59830d98" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d60460f56f54ce560cc79cc02dcfefc11e7f8a16dace21b3816e3076206debc2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cc230cd8ae1f04cde434c3b74783a1d1ca7d9ec67c36bea84ff7429e7a3197ff" + sha256 cellar: :any_skip_relocation, sonoma: "8d40c01a5f94bcc32d4a7476e7517ed85a19a95b8f51311246475c1fde2ad432" + sha256 cellar: :any_skip_relocation, ventura: "b6cdf83e994059b63c281f1af930101efe7cf9a004d56b4b8964136dddd09679" + sha256 cellar: :any_skip_relocation, arm64_linux: "a92753cbbc9cb5493602ec41aeeed8c2b9588921cf76465f1cb4a915492da680" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf92475fac85e78bbf5ead0e87492ee452bb21a70c0c2a270e332c61d12c5f51" + end + + depends_on "cmake" => :build + depends_on "python@3.13" + + 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..7d2aafdc5e309 --- /dev/null +++ b/Formula/b/berglas.rb @@ -0,0 +1,37 @@ +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_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, 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..0d5f47d7db73e --- /dev/null +++ b/Formula/b/berkeley-db.rb @@ -0,0 +1,103 @@ +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 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..3741e4aea62ac --- /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, mojave: "06af286b14463aec20a0bc9560a6c4081fb392325a8bb8403dd7f02ac4076711" + 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 + + # Fix build with recent clang + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/4c55b1/berkeley-db%404/clang.diff" + sha256 "86111b0965762f2c2611b302e4a95ac8df46ad24925bbb95a1961542a1542e40" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..82a91d44e7f38 --- /dev/null +++ b/Formula/b/berkeley-db@5.rb @@ -0,0 +1,125 @@ +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 + + bottle do + 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://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz" + mirror "https://ftpmirror.gnu.org/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/formula-patches/4c55b1/berkeley-db%404/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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..589ac58e7b038 --- /dev/null +++ b/Formula/b/bettercap.rb @@ -0,0 +1,55 @@ +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.0.tar.gz" + sha256 "6c2161acb85599a066bea2d28805f72cde68c13fefb8e67c5c72f3c31c3372c1" + license "GPL-3.0-only" + head "https://github.com/bettercap/bettercap.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "601b640cb814873f4bc494568d8e6bac3e0437d7e0f9b2dcae10050428c28285" + sha256 cellar: :any, arm64_sonoma: "6614522833be6dfbc677602367365feffb179216512c0d1ffd9e486003ee91ff" + sha256 cellar: :any, arm64_ventura: "eafe12346381ada74b4731575c798968bb578c17b83f872ed83da548d0503780" + sha256 cellar: :any, sonoma: "e52b66aca3679d41baead4ba4dae3f239ad4f83c6387aa48bbfddf6f6b5e2959" + sha256 cellar: :any, ventura: "6d62416e253212a3d212fd0f904cf429782bcda5aa138da4ba0383f54cf51d75" + sha256 cellar: :any_skip_relocation, arm64_linux: "289ba4d5fafb3902334b73fa4a6ceaf9f1879d5f1eb1c13a2d82b2ff813c3227" + sha256 cellar: :any_skip_relocation, x86_64_linux: "682d2dad8463513c60ff7eb7918b4f561d28d6dfdd8c7471ac136cdbb5935bf9" + 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..27edd5b98e74d --- /dev/null +++ b/Formula/b/betty.rb @@ -0,0 +1,25 @@ +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 + + 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..ba609869cf232 --- /dev/null +++ b/Formula/b/bfg.rb @@ -0,0 +1,27 @@ +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 + + 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/bfgminer.rb b/Formula/b/bfgminer.rb new file mode 100644 index 0000000000000..2ff0022cc0906 --- /dev/null +++ b/Formula/b/bfgminer.rb @@ -0,0 +1,55 @@ +class Bfgminer < Formula + desc "Modular CPU/GPU/ASIC/FPGA miner written in C" + homepage "https://web.archive.org/web/20221230131107/http://bfgminer.org/" + url "https://web.archive.org/web/20190824104403/http://bfgminer.org/files/latest/bfgminer-5.5.0.txz" + sha256 "ac254da9a40db375cb25cacdd2f84f95ffd7f442e31d2b9a7f357a48d32cc681" + license "GPL-3.0-or-later" + head "https://github.com/luke-jr/bfgminer.git", branch: "bfgminer" + + bottle do + sha256 arm64_sonoma: "e3d88bfc64abc6a6e41f8d96d5d6b099b7c93c5829f17f1ec134a3b0e0aad44d" + sha256 arm64_ventura: "b45669226e0d2a3155e437d643ef700ff143ce071dd3c4affce7a80ef24ab568" + sha256 arm64_monterey: "2179e3de8ffd1c871a9b3a7fa539e569d62ba42b67d0c12ed609098cb9214e6d" + sha256 arm64_big_sur: "f397c2b4428a3c96239d86edf75efb444ba7b1cc79f6d2550ba04960e40308e2" + sha256 sonoma: "dd8db416717d33317ea08df28bf38dc497bef8044161067a44ffa16d32df254a" + sha256 ventura: "90867fc9aba1b6844de5403e3e3bc71a01b01686c28b06e574759c44d541ed06" + sha256 monterey: "5548f25bdbecdca56951bcc0d0d44b5fc509bb86c525c02c64599fd826928eab" + sha256 big_sur: "0ae6dafd587a2dd9d20d57b34d96ddcea07d570c251db4d0b9e4397ebd6ca0ec" + sha256 catalina: "c0a7446badb4b9c392d616a73e48035632a28f4f34adb45052ab022b6856d9ec" + sha256 x86_64_linux: "9f81c9ed9c2d32a0296fb74aa46b592b02e60fc08224d103c9c6ba73bedff86b" + end + + # Upstream website is gone, cannot build from GitHub source, last release 6+ years ago + disable! date: "2024-09-05", because: :unmaintained + + depends_on "hidapi" => :build + depends_on "libgcrypt" => :build + depends_on "libscrypt" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "uthash" => :build + depends_on "jansson" + depends_on "libevent" + depends_on "libusb" + uses_from_macos "curl" + + def install + args = %w[ + --without-system-libbase58 + --enable-cpumining + --enable-opencl + --enable-scrypt + --enable-keccak + --enable-bitmain + --enable-alchemist + ] + args << "--with-udevrulesdir=#{lib}/udev" if OS.linux? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + assert_match "Work items generated", shell_output("bash -c \"#{bin}/bfgminer --benchmark 2>/dev/null <<< q\"") + end +end diff --git a/Formula/b/bfs.rb b/Formula/b/bfs.rb new file mode 100644 index 0000000000000..5deb7bbcb7c1c --- /dev/null +++ b/Formula/b/bfs.rb @@ -0,0 +1,43 @@ +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.0.6.tar.gz" + sha256 "446a0a1a5bcbf8d026aab2b0f70f3d99c08e5fe18d3c564a8b7d9acde0792112" + license "0BSD" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "541eb3e80f111ffbe3cce64f99d86cd806e94fd94635052dd92fcbe34b7c4b7b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "56bf0b3dff7830ad54fed7cc0dffa27f285f5b4f541c9abe17c202308ed55288" + sha256 cellar: :any_skip_relocation, arm64_ventura: "363fe54480b06f1295595614ce3132867baaa27e6b9f956590d0dd6a86c562e3" + sha256 cellar: :any_skip_relocation, sonoma: "91b95a911f42b6b95745b4ac48b9c9a687164eb9955b955bd85118bf7210ee41" + sha256 cellar: :any_skip_relocation, ventura: "6331cec89c8342f88c7230eddb2ea3d0d79b27a3d10acad159b2794905268dab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95da5b6d24d640a1285bfdd20ad22aa9c5f3ba3de94e27bd95c0cecd09bf247d" + end + + 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*' -depth 1").chomp + end +end diff --git a/Formula/b/bgpdump.rb b/Formula/b/bgpdump.rb new file mode 100644 index 0000000000000..ac7604f138959 --- /dev/null +++ b/Formula/b/bgpdump.rb @@ -0,0 +1,48 @@ +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 + + bottle do + 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, mojave: "271ccd88799103255a673c6eafba9ec39320a8eb1a5a80bc8eef25ec508c31a6" + sha256 cellar: :any, high_sierra: "441599b105e925cf6875f3e1d1a380cf94ec1069b214872173cd08736cd8671c" + 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..f597e850f2aef --- /dev/null +++ b/Formula/b/bgpq3.rb @@ -0,0 +1,52 @@ +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_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..489e7eae2efde --- /dev/null +++ b/Formula/b/bgpq4.rb @@ -0,0 +1,45 @@ +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_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..ae72590d68c25 --- /dev/null +++ b/Formula/b/bgpstream.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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..ffb9d03de8cab --- /dev/null +++ b/Formula/b/bgrep.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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, mojave: "8a3633a884feda24b875005550fddbd613987c89edc9418dd23783b4c2f7e8af" + sha256 cellar: :any_skip_relocation, high_sierra: "c2357ea00756425fec65d8367e7b8653a4d6845b6aa044106b8952d8b8ead0ca" + sha256 cellar: :any_skip_relocation, sierra: "eaed7c05fd07c77cd5aeb6f1232abcf5c9678b86fdaf7e7daf5049476acc690c" + sha256 cellar: :any_skip_relocation, el_capitan: "29f0b2d7ab307eae228a03d4f42f677d9ff0884edc5c96771da36182cb592cd2" + 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..be349c1b24ba4 --- /dev/null +++ b/Formula/b/bib-tool.rb @@ -0,0 +1,53 @@ +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 + + bottle do + 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 cellar: :any_skip_relocation, mojave: "d75a1a60204b002cc06acc025cfdc74db76a563b9bb508876d0e45d771f61dc8" + sha256 cellar: :any_skip_relocation, high_sierra: "0d92e3fead68380fc84cbf5517d2ed2eecdfcbfc1fc14c6343f51ee60d43f948" + 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..9a8cb81fb4042 --- /dev/null +++ b/Formula/b/bibclean.rb @@ -0,0 +1,63 @@ +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 + + bottle do + 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..5dd7e8c154ee8 --- /dev/null +++ b/Formula/b/biber.rb @@ -0,0 +1,708 @@ +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.20.tar.gz" + sha256 "19f0312e59bf2f5711b8d69b3585a0ca894c36574f086fbb8d53ccd5c0a45ff9" + license "Artistic-2.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "e5ce10fe7c4cfaf687e9ceca4c47dfe981c247c8b5d06744f52ca4e403119d3c" + sha256 cellar: :any, arm64_sonoma: "a06294eb6ba71edfb34846ec60205ad9315c5b6da2d2884da0e56b662c4ad64c" + sha256 cellar: :any, arm64_ventura: "b80c954f868b87585d8c3b91494b3a9549d58a6df88d9b7028b4091d6882c230" + sha256 cellar: :any, sonoma: "f5667829fe7fe597422cbaf2ab17c11fc4a130c6579551908639aec9539bb15d" + sha256 cellar: :any, ventura: "83dd4a86705a0730f1bb52cb8a0556533efdd03b673d24737c16deabc17cc5d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "002218b381d6dab70c5ccfa0ff7bf89e8a7a22dc178e922c2469a01a47b89373" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4038ee28a6d598309e506acc878f6f3554e1af17ab02851282c993e51db8a0cd" + 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.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 "Module::Build::Tiny" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-0.047.tar.gz" + sha256 "71260e9421b93c33dd1b3e7d0cf15f759c0ca7c753fa840279ec3be70f8f8c9d" + end + + resource "YAML::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/YAML-Tiny-1.74.tar.gz" + sha256 "7b38ca9f5d3ce24230a6b8bdc1f47f5b2db348e7f7f9666c26f5955636e33d6c" + end + + resource "Module::ScanDeps" do + url "https://cpan.metacpan.org/authors/id/R/RS/RSCHUPP/Module-ScanDeps-1.35.tar.gz" + sha256 "e5beb3adf55be3dab71f9a1416d4bad57b14e5e05c96370741b9d8f96a51b612" + 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-20240321.001.tar.gz" + sha256 "8a307ce5e161a6197501f1d96704da01107ef8ed5b7b290d96152a9ba3e1cfdd" + end + + resource "Business::ISBN" do + url "https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY/Business-ISBN-3.009.tar.gz" + sha256 "d2ec1970454af1b2c099dd34caa7a348ca6fd323bb7ddbfad55389bd7f96789b" + end + + resource "Tie::Cycle" do + url "https://cpan.metacpan.org/authors/id/B/BD/BDFOY/Tie-Cycle-1.228.tar.gz" + sha256 "875651be1c657d85bcac056a76be22888395412c8e5af3d84d4c37b8fbb5b448" + end + + resource "Business::ISMN" do + url "https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY/Business-ISMN-1.204.tar.gz" + sha256 "14e14599bd6e231b722297f84d4e8a5c695c79ada79ea0b50693d5f04ded3689" + end + + resource "Business::ISSN" do + url "https://cpan.metacpan.org/authors/id/B/BD/BDFOY/Business-ISSN-1.005.tar.gz" + sha256 "3b09b0267f0a6660fb92b6f50c4c7796ef6a263b62ad3bbeaa07189a0c7c39b3" + 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.48.tar.gz" + sha256 "6c23113e87bad393308c90a207013e505f659274736638d8c79bac9c67cc3e19" + 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.34.tar.gz" + sha256 "7e6f16cc33eb1f29ff25bee51d513f4b8a84947bbfa18edb2d3cc40a2d64cafe" + 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/G/GA/GARU/Clone-0.46.tar.gz" + sha256 "aadeed5e4c8bd6bbdf68c0dd0066cb513e16ab9e5b4382dc4a0aafd55890697b" + 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.31.tar.gz" + sha256 "3300d31d8a4075b26d8f46ce864a1d913e0e8467ceeba6655d5d2b2e206c11be" + 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/Z/ZE/ZEFRAM/Module-Runtime-0.016.tar.gz" + sha256 "68302ec646833547d410be28e09676db75006f4aa58a11f3bdb44ffe99f0f024" + 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.29.tar.gz" + sha256 "45ebd8e64a54a86f88d8e01ae55212967c8aa8fed57e814085def7608ac65804" + 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.09.tar.gz" + sha256 "44088d6e90712e187b8a5b050ca5b1c70efe2baa32ae123e9bd8f59f29f06e4d" + 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.48.tar.gz" + sha256 "0c85793580f1274ef08173079131d101f77b22accea7afa8255202f0811682b2" + 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.144.tar.gz" + sha256 "f6ea094ece845c952a02c2789332579354de8d410a707f9b7045bd241206487d" + end + + resource "DateTime::Locale" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Locale-1.40.tar.gz" + sha256 "7490b4194b5d23a4e144976dedb3bdbcc6d3364b5d139cc922a86d41fdb87afb" + 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.63.tar.gz" + sha256 "cafbdf212f6827dc9a0dd3b57b6ee50e860586d7198228a33262d55c559eb2a9" + 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.62.tar.gz" + sha256 "6214f9c9c8dfa2000bae912ef2b8ebc5b163a83a0b5b2a82705162dad63466fa" + end + + resource "DateTime" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-1.65.tar.gz" + sha256 "0bfda7ff0253fb3d88cf4bdb5a14afb8cea24d147975d5bdf3c88b40e7ab140e" + 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.08.tar.gz" + sha256 "c51171e06de53039f0bca1d97a6471ec37941ff59e8a3d1cb170ebdd2573b5d2" + 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-20240313.tar.gz" + sha256 "624873939e309833894f881464a95dfe74ab77cab5d557308c010487161698e7" + 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.27.tar.gz" + sha256 "11962d8a8a8496906e5d34774affc235a1c95c112d390c0b4171f3e91e9e2a97" + end + + resource "IO::Socket::SSL" do + url "https://cpan.metacpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-2.085.tar.gz" + sha256 "95b2f7c0628a7e246a159665fbf0620d0d7835e3a940f22d3fdd47c3aa799c2e" + 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-6.45.tar.gz" + sha256 "01cb8406612a3f738842d1e97313ae4d874870d1b8d6d66331f16000943d4cbe" + end + + resource "HTML::Parser" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTML-Parser-3.82.tar.gz" + sha256 "5b1f20dd0e471a049c13a53d0fcd0442f58518889180536c6f337112c9a430d8" + 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.77.tar.gz" + sha256 "94a907d6b3ea8d966ef43deffd4fa31f5500142b4c00489bfd403860a5f060e4" + end + + resource "LWP" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.77.tar.gz" + sha256 "94a907d6b3ea8d966ef43deffd4fa31f5500142b4c00489bfd403860a5f060e4" + 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-2017060201.tar.gz" + sha256 "ee07853aee06f310e040b6bf1a0199a18d81896d3219b9b35c9630d0eb69089b" + 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.89.tar.gz" + sha256 "88a78ebf088ec7502f401c5a2b138c862cf5458534b773223bbf3aaf41224196" + end + + resource "Text::CSV" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/Text-CSV-2.04.tar.gz" + sha256 "4f80122e4ea0b05079cad493e386564030f18c8d7b1f9af561df86985a653fe3" + end + + resource "Text::CSV_XS" do + url "https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.53.tgz" + sha256 "ba3231610fc755a69e14eb4a3c6d8cce46cc4fd32853777a6c9ce485a8878b42" + 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.80.tar.gz" + sha256 "d9edc936b06705bb5cb5ee5a2ea8bcf6111a3e8815914f177e15e3c0fed301f3" + end + + resource "Alien::Libxml2" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/Alien-Libxml2-0.19.tar.gz" + sha256 "f4a674099bbd5747c0c3b75ead841f3b244935d9ef42ba35368024bd611174c9" + 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.002001.tar.gz" + sha256 "df8927c4ff1949f62580d1c1e6f00f0cd56b53d3a957ee4b171b59bffa63b2c0" + 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 + + 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..76e8aabb99f00 --- /dev/null +++ b/Formula/b/bibtex2html.rb @@ -0,0 +1,66 @@ +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 + + bottle do + rebuild 2 + 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, mojave: "1a56c6ff9929a75570f231a4fd8b1a4e367d82a8a632c4a45f126b1845ff8ff3" + sha256 cellar: :any_skip_relocation, high_sierra: "e2b32aea9dcfb51cff11b8014425975198b73b3a74f48c2f7103e01ef2ec7a9b" + 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..d87a8a1c448e2 --- /dev/null +++ b/Formula/b/bibtexconv.rb @@ -0,0 +1,47 @@ +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.2.tar.gz" + sha256 "c9c01c3cd973a773af0b9854f08df31c34c64e6c118b3400db31b4d7fc2ae235" + license "GPL-3.0-or-later" + head "https://github.com/dreibh/bibtexconv.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fbc4cb16c766ea1a4de4122bfb71200e73c05f52a0be544caaf2744d4a8eee51" + sha256 cellar: :any, arm64_sonoma: "6647b330cce25a922b9a5208e760fef00487d8b7d6046450292bbcb2f1d6bd0d" + sha256 cellar: :any, arm64_ventura: "1834aeedf88c98f331c08e4f2e0f1e83b48e5a7e5525b16456396705b0d4c139" + sha256 cellar: :any, sonoma: "b3eb3ed7dc704e829491462fe927a41b61d3d96fd5e56333220410fe428ab014" + sha256 cellar: :any, ventura: "3d68a045124eddc823b08c7d256aecda7267963c95b5ace61d1c95e10e4a1dd2" + sha256 cellar: :any_skip_relocation, arm64_linux: "91d5174a92ecde399224489caf3d9d853a6ab40598c2868331bce68d4fcaa906" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29113580365e674fa8ab9cda06930f95ce61c103e22c6ea33257b9bd61919079" + 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..82eb9ce5a3806 --- /dev/null +++ b/Formula/b/bibutils.rb @@ -0,0 +1,48 @@ +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 + + bottle do + 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..27cc11ff25549 --- /dev/null +++ b/Formula/b/bic.rb @@ -0,0 +1,67 @@ +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 + depends_on arch: :x86_64 + end + + # Backport fix for error: call to undeclared function '__gmp_fprintf' + patch do + url "https://github.com/hexagonal-sun/bic/commit/77f2993cd5b41bfa21fb21636588e459c6aaf45c.patch?full_index=1" + sha256 "c7037e4f3b05be997744ccdea0f51786e5eafaddebc131763d5f45745e90cf00" + end + end + + bottle do + sha256 cellar: :any, sonoma: "4f122a009440f01cdaa97ac0fdf69e7aa8a0b31082e7fc8fb7d08b5c8ecf2307" + sha256 cellar: :any, ventura: "b2949645cf730b7d5b1a9286c5134775190c8353a9e8dbc28af7414b97f63253" + sha256 cellar: :any, monterey: "cfa83a9ccd1d192b77af48d3198acf0f082d9f929a6256bb978f293543210940" + sha256 cellar: :any, big_sur: "36f71fa3f987da036e8bf8cefd3e640479868f2eb033f307848679b41d7ee393" + sha256 cellar: :any, catalina: "41d1871d125642f8437b5bb7b74f205b0eee956be0ad46b7677680b76764c0cb" + sha256 cellar: :any, mojave: "36575a3c3444985140e94eba8fe8f6711fff5433eb7f17141c4b4ae30e1f2bf7" + sha256 cellar: :any, high_sierra: "23f308f2bfda3b9ee498680e08565997818570d74d1280137ef940f70801b8d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1eed9e3fd17cead07b28471dc8cfd46754b81e0db2ff0ecf631223e1e08dfb8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2744bafd1615ee75b148b2b4ef18a3acdb0cf7a33c71014b541cb3f820c1b38f" + 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 + + uses_from_macos "flex" => :build + uses_from_macos "libffi" + end + + depends_on "gmp" + + on_linux do + depends_on "readline" + 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/"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..f65cb319d1659 --- /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 "9705ec3de00cc1c51ee7699894841a3770c06a874215b45635b8844ae6daf0a6" + 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 1 + sha256 arm64_sequoia: "9e898912750ff4524755d1523733824a82dfec9f4767f516a1cb0df291d02f6a" + sha256 arm64_sonoma: "fc56675d3c2d9dc400d02d0ba451fd0890e0af8530fddb01ae2f7a0b0e7732d5" + sha256 arm64_ventura: "863ef84f5fe7ecde18164f1fd2b39a89d578aa6e5bee1d174441c455e9ff4dd1" + sha256 sonoma: "e8530b989fb53f9b92bc7de0e67291c8b74b10f615de0ba3afc6f2c2d806be77" + sha256 ventura: "0c5e0237240777f5e8471f3c0fbe471638fdf56d3308ddf021273b14ae88df6e" + sha256 x86_64_linux: "26df19d7509a28fdc224f29265138d5c4c7644e02256bda6c272614ef41ba09b" + 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..fccef0fcc3f74 --- /dev/null +++ b/Formula/b/bigquery-emulator.rb @@ -0,0 +1,74 @@ +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_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, x86_64_linux: "b53e2bd32bf44be1c5ad737c1f4058d855faf4b82530aeebdecf5e9e690bdab2" + end + + depends_on "go" => :build + + uses_from_macos "llvm" => :build + + fails_with :gcc + + def install + ENV["CGO_ENABLED"] = "1" + + 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..85ca47bc4a6c1 --- /dev/null +++ b/Formula/b/bilix.rb @@ -0,0 +1,208 @@ +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 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "1dd56aa673779552702e7b3ba922baa236b1dc60b95bda90e517ed23ef5ebcfe" + sha256 cellar: :any, arm64_sonoma: "c19e2cf1d361d4571b433fd84ed35c1b05ace1b5f1d6568f3b362817af2681af" + sha256 cellar: :any, arm64_ventura: "16892feaa8f59fb5fa7f2b0ff773b854a86fcf1e9d5a38e104e5456df924abfb" + sha256 cellar: :any, sonoma: "3a1230687830512a35d13447d61e450c607bff0f5dbb77640035c72702ff471a" + sha256 cellar: :any, ventura: "d4f8e9d254f14626660a4244cf2d876c43be085ee48f64a0e53bc112ba70a348" + sha256 cellar: :any_skip_relocation, arm64_linux: "e765a9bd9f88112c7580d028941a47243ee874b35a449b9cd164e19e6638908b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b8ad25f6e080a60a8526b5f4d6feda7a8e049c655685b0ab949399eb268b540" + end + + depends_on "rust" => :build # for pydantic_core + depends_on "certifi" + depends_on "python@3.13" + + resource "aiofiles" do + url "https://files.pythonhosted.org/packages/0b/03/a88171e277e8caa88a4c77808c20ebb04ba74cc4681bf1e9416c862de237/aiofiles-24.1.0.tar.gz" + sha256 "22a075c9e5a3810f0c2e48f3008c94d68c65d763b9b03857924c99e57355166c" + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/d8/e4/0c4c39e18fd76d6a628d4dd8da40543d136ce2d1752bd6eeeab0791f4d6b/beautifulsoup4-4.13.4.tar.gz" + sha256 "dbb3c4e1ceae6aefebdaf2423247260cd062430a410e38c66f2baa50a8437195" + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/1b/38/d7f80fd13e6582fb8e0df8c9a653dcc02b03ca34f4d72f34869298c5baf8/h2-4.2.0.tar.gz" + sha256 "c8a52129695e88b1a0578d8d2cc6842bbd79128ac685463b887ee278126ad01f" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "json5" do + url "https://files.pythonhosted.org/packages/12/be/c6c745ec4c4539b25a278b70e29793f10382947df0d9efba2fa09120895d/json5-0.12.0.tar.gz" + sha256 "0b4b6ff56801a1c7dc817b0241bca4ce474a0e6a163bfef3fc594d3fd263ff3a" + 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/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz" + sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" + 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/c8/8c/cf2ac658216eebe49eaedf1e06bc06cbf6a143469236294a1171a51357c3/protobuf-6.30.2.tar.gz" + sha256 "35c859ae076d8c56054c25b59e5e59638d86545ed6e2b6efac6be0b6ea3ba048" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/44/e6/099310419df5ada522ff34ffc2f1a48a11b37fc6a76f51a6854c182dbd3e/pycryptodome-3.22.0.tar.gz" + sha256 "fd7ab568b3ad7b77c908d7c3f7e167ec5a8f035c64ff74f10d47a4edd043d723" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/ba/d5/861a7daada160fcf6b0393fb741eeb0d0910b039ad7f0cd56c39afdd4a20/pycryptodomex-3.22.0.tar.gz" + sha256 "a1da61bacc22f93a91cbe690e3eb2022a03ab4123690ab16c46abb693a9df63d" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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/3f/f4/4a80cd6ef364b2e8b65b15816a843c0980f7a5a2b4dc701fc574952aa19f/soupsieve-2.7.tar.gz" + sha256 "ad282f9b6926286d2ead4750552c8a6142bc4c783fd66b0293547c8fe6ae126a" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + 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", shells: [:fish, :zsh], 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..517d82e65f332 --- /dev/null +++ b/Formula/b/binaryen.rb @@ -0,0 +1,38 @@ +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_123.tar.gz" + sha256 "a1e1caf250cab3a83938713594e55b6762591208e82087e3337f793e8c8eb7ab" + 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_sequoia: "cae7c7240852ade709aa96ba6be8277dcd252c342d1f75413f5de61a7fe5b7ec" + sha256 cellar: :any, arm64_sonoma: "1a5b35f988f3f9695a6aca0186da2bdd74a59a4ff6b87bcaaf0930a8899ba6bf" + sha256 cellar: :any, arm64_ventura: "e788038e064c5b7eaf470c7a5af2508d937c8aa31cb97139f8fcb27356cc0fc6" + sha256 cellar: :any, sonoma: "4395563fd2278982a88fa7e943c0aeab191e7f6fc4376fe1813d59ec30b3c071" + sha256 cellar: :any, ventura: "d7156e63442c27fd4f6c990b1bfb4588d6e8dff4cd95a3860ea1e784eccc2fd3" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ed954b4d562431745bf2b1afaa96d2a4f655718c83b71ad1af3021ff83fceaa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8511e6e135f18fa2cc5920273fa964c05a8e80d305b1f5f61e97c04f4691d6a1" + 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..863d39d0ea450 --- /dev/null +++ b/Formula/b/bind.rb @@ -0,0 +1,167 @@ +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. + + # TODO: Uncomment below when patch is no longer needed. + # url "https://downloads.isc.org/isc/bind9/9.20.8/bind-9.20.8.tar.xz" + # sha256 "3004d99c476beab49a986c2d49f902e2cd7766c9ab18b261e8b353cabf3a04b5" + license "MPL-2.0" + version_scheme 1 + head "https://gitlab.isc.org/isc-projects/bind9.git", branch: "main" + + # TODO: Remove `stable` block when patch is no longer needed. + stable do + url "https://downloads.isc.org/isc/bind9/9.20.8/bind-9.20.8.tar.xz" + sha256 "3004d99c476beab49a986c2d49f902e2cd7766c9ab18b261e8b353cabf3a04b5" + + patch :DATA + end + + # 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_sequoia: "d3f84ac0a1a2a1e7f3face1b1c1ec3d529d33b5e4477216a8d7bfe7d21dea66e" + sha256 arm64_sonoma: "02169088713697145cf3f3a04a250bb2f2e90a88da201aa7b3d9131cc618309a" + sha256 arm64_ventura: "622abc3a20a9e7760d745d5b39737aba57c835434c6acb56e521c68f63857016" + sha256 sonoma: "5726d8c7f91d12494ee9cd4ee6595fca956586afc6cb6902fbb27b15b5ab8c89" + sha256 ventura: "675797d13ab4fb8c98d06aa88876307fa83242d03f61c815e811a8c6436dcadd" + sha256 arm64_linux: "10be3b0abd42b95f82cf5f428bfdbd66068dadff4dd8bf8150a589261fd2e9c0" + sha256 x86_64_linux: "dc15ca3128f17a61609b0464bae2f092204c0483116c19a3f6de3bd22d256aff" + 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 + 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 + +__END__ +diff --git i/lib/isc/xml.c w/lib/isc/xml.c +index 7dd9424..af08a50 100644 +--- i/lib/isc/xml.c ++++ w/lib/isc/xml.c +@@ -19,6 +19,7 @@ + #include + #include + ++#ifndef __APPLE__ + static isc_mem_t *isc__xml_mctx = NULL; + + static void * +@@ -44,17 +45,20 @@ isc__xml_free(void *ptr) { + isc_mem_free(isc__xml_mctx, ptr); + } + ++#endif /* !__APPLE__ */ + #endif /* HAVE_LIBXML2 */ + + void + isc__xml_initialize(void) { + #ifdef HAVE_LIBXML2 ++#ifndef __APPLE__ + isc_mem_create(&isc__xml_mctx); + isc_mem_setname(isc__xml_mctx, "libxml2"); + isc_mem_setdestroycheck(isc__xml_mctx, false); + + RUNTIME_CHECK(xmlMemSetup(isc__xml_free, isc__xml_malloc, + isc__xml_realloc, isc__xml_strdup) == 0); ++#endif /* !__APPLE__ */ + + xmlInitParser(); + #endif /* HAVE_LIBXML2 */ +@@ -64,13 +68,15 @@ void + isc__xml_shutdown(void) { + #ifdef HAVE_LIBXML2 + xmlCleanupParser(); ++#ifndef __APPLE__ + isc_mem_destroy(&isc__xml_mctx); ++#endif /* !__APPLE__ */ + #endif /* HAVE_LIBXML2 */ + } + + void + isc__xml_setdestroycheck(bool check) { +-#if HAVE_LIBXML2 ++#if defined(HAVE_LIBXML2) && !defined(__APPLE__) + isc_mem_setdestroycheck(isc__xml_mctx, check); + #else + UNUSED(check); diff --git a/Formula/b/bindfs.rb b/Formula/b/bindfs.rb new file mode 100644 index 0000000000000..08f9c4292c3e2 --- /dev/null +++ b/Formula/b/bindfs.rb @@ -0,0 +1,40 @@ +class Bindfs < Formula + desc "FUSE file system for mounting to another location" + homepage "https://bindfs.org/" + url "https://bindfs.org/downloads/bindfs-1.18.0.tar.gz" + sha256 "46fcf95b871109265e93cd42e5ae282c722716488ad9f0da1e1f98535be37f7a" + license "GPL-2.0-or-later" + revision 1 + + 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: "af02d31cc5f0a29f9844104f3862f36d2f9bf8c67fc350ff9023c2079010f819" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec8d0ea83f32a075faba5255b6e70d0547f563c24d4a526de403db96f79b7f30" + 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..a5f7695b72100 --- /dev/null +++ b/Formula/b/bindgen.rb @@ -0,0 +1,44 @@ +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.71.1.tar.gz" + sha256 "620d80c32b6aaf42d12d85de86fc56950c86b2a13a5b943c10c29d30c4f3efb0" + license "BSD-3-Clause" + head "https://github.com/rust-lang/rust-bindgen.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ca49bd90c74ef16524752b0f0f0ddab98724b6e5a4efff80a87306cfa1bdd435" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d0816e866afb30c80ac13d1f99009fc31407167e56ea5dbd77c16220a9be45f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a704b4131af2a7b3b89584a7999816a9d39e7fc0efc062085bca77993e9fe3a0" + sha256 cellar: :any_skip_relocation, sonoma: "be5a61b23b1deaeb288a04b23e2f950bb8a52ab3c2278e5c2b9a74102ff71d2f" + sha256 cellar: :any_skip_relocation, ventura: "4d0759fa388a37917a70afa38c2020e6c9d3bfde4a24d446d84284efe308e7b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "cea4dc5af2f263bbb02726b1111fc0275058c2e888dd2f9bc7a889daa7c8c04b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "41b1a9322bcec771b42a3ebf07ee63d91fdaf66751f06deecf1e921b4f8da23f" + 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..a9e25327b934f --- /dev/null +++ b/Formula/b/bingrep.rb @@ -0,0 +1,40 @@ +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_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..e97cef896bd0f --- /dev/null +++ b/Formula/b/binkd.rb @@ -0,0 +1,44 @@ +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 + + bottle do + rebuild 2 + 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..c3722823f4c86 --- /dev/null +++ b/Formula/b/binocle.rb @@ -0,0 +1,46 @@ +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_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..124aff68fd5d5 --- /dev/null +++ b/Formula/b/binsider.rb @@ -0,0 +1,39 @@ +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_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..b58cfae1de27b --- /dev/null +++ b/Formula/b/binutils.rb @@ -0,0 +1,69 @@ +class Binutils < Formula + desc "GNU binary tools for native development" + homepage "https://www.gnu.org/software/binutils/binutils.html" + url "https://ftp.gnu.org/gnu/binutils/binutils-2.44.tar.bz2" + mirror "https://ftpmirror.gnu.org/binutils/binutils-2.44.tar.bz2" + sha256 "f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a" + license all_of: ["GPL-2.0-or-later", "GPL-3.0-or-later", "LGPL-2.0-or-later", "LGPL-3.0-only"] + + bottle do + sha256 arm64_sequoia: "d536a93de1561cffb928d198ac1fb48a786baa6ed61cc8e2d0fdc6af5bf72801" + sha256 arm64_sonoma: "72cfbc33daaba41277600107997beb41274f2725ee06e1d335c42209d000aa63" + sha256 arm64_ventura: "4101f3e3a14a52f49d9bc7c351b39b906acf62d37dc3d572ed810959a0bfa192" + sha256 sonoma: "70c843be6cdcc54590c4e5a7f27ea5cd2604bfc0cb60eba86e519b9b7420bcf5" + sha256 ventura: "268c62a8bffcb217e0756adf307af666911ab3d9596e660652680363057dc2da" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e0554ddadbcca0412f3ee09b452c4fb9c01f6ad0ef3bdc3d28e15b6249c3b5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ea2efa458ca43f31bb2ce2588b8c095849e6145791a2212cec7df1ae873684c" + end + + keg_only "it shadows the host toolchain" + + depends_on "pkgconf" => :build + depends_on "zstd" + + uses_from_macos "bison" => :build + uses_from_macos "zlib" + + 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 + end + + test do + assert_match "Usage:", shell_output("#{bin}/strings #{bin}/strings") + end +end diff --git a/Formula/b/binwalk.rb b/Formula/b/binwalk.rb new file mode 100644 index 0000000000000..194b030cfa1d1 --- /dev/null +++ b/Formula/b/binwalk.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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 + + 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..51cbb733e263b --- /dev/null +++ b/Formula/b/bioawk.rb @@ -0,0 +1,48 @@ +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" + + bottle do + 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, mojave: "7082d4073e07ba3dfa849f95eb126d966a45f9fceb1d197595119a216e465727" + sha256 cellar: :any_skip_relocation, high_sierra: "023f5cafaa31404e68b8fc6bcfbeee27e63eb5fbcab897d2f406fceda90ec9ff" + sha256 cellar: :any_skip_relocation, sierra: "154d44dd9ea56db8170127711e991950d487e379ae12df76332e4b7512f79fe8" + sha256 cellar: :any_skip_relocation, el_capitan: "df0810bc087f924cdddcdb73f00faf9772de9475e0e698c7af8a7d036b3a4c91" + 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..18d3f76f64fd0 --- /dev/null +++ b/Formula/b/biodiff.rb @@ -0,0 +1,49 @@ +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_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..ec994e733627b --- /dev/null +++ b/Formula/b/biome.rb @@ -0,0 +1,38 @@ +class Biome < Formula + desc "Toolchain of the web" + homepage "https://biomejs.dev/" + url "https://github.com/biomejs/biome/archive/refs/tags/cli/v1.9.4.tar.gz" + sha256 "fc06a89e1b925e8b1dfaca98f7af1d8e04d27acdcaeff786e2806f8bc26283f9" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/biomejs/biome.git", branch: "main" + + livecheck do + url :stable + regex(%r{^cli/v(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8646b6bdf4f2b0996e739aee80668eb17d32a7aad4a356986521d812cc984cc2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "43540d1b4f59a61da1b7baca7cfa5db8a1aeb06e9a0f0673e49dfcf214a31af8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cb13597637d0123db60acc9e97cc4f08075f6734689d5e0a270a8a1ff419c756" + sha256 cellar: :any_skip_relocation, sonoma: "9c37ee00fd5771d88747a57e6957b8c7a2df6901f8f58a1883b8a77e909b6d9c" + sha256 cellar: :any_skip_relocation, ventura: "b6c80a4f53293569e04d7c6b25b27535521ac75ce858b128f7c0070023bf5648" + sha256 cellar: :any_skip_relocation, arm64_linux: "6373f7fa396319db672562c2581c2af4951a065c9c7a2465e963ca3e79f0152d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9fa4e736896fa3289074b6eec6accff439ed4484e1d8ef909e03945a93a3a60f" + 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..f1dabbd4a55ed --- /dev/null +++ b/Formula/b/bioperl.rb @@ -0,0 +1,53 @@ +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 + + bottle do + 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..a23448c86de04 --- /dev/null +++ b/Formula/b/biosig.rb @@ -0,0 +1,46 @@ +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_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" + + # 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..60cb9e37154c6 --- /dev/null +++ b/Formula/b/bison.rb @@ -0,0 +1,67 @@ +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://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.xz" + mirror "https://ftpmirror.gnu.org/bison/bison-3.8.2.tar.xz" + sha256 "9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2" + license "GPL-3.0-or-later" + version_scheme 1 + + bottle do + 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, mojave: "4b51739abc4ac54df710147848eb0cd12ff32bc0b86b9112d0de378a74273328" + 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..5deac5c4f7602 --- /dev/null +++ b/Formula/b/bison@2.7.rb @@ -0,0 +1,75 @@ +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" + 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 mojave: "125fdf2eb737cdb8a3e795234f8e1fb5ec477f8590c534f7895497a6af82e04b" + sha256 high_sierra: "ee0e758aa798809aaa3e94f1e3659c9d33497a577c25cfc03ecfe18c25862837" + sha256 sierra: "7f1f717becaf0a818b154d3706b88f6c61a102b4f909e030005aaa5433abc34e" + sha256 el_capitan: "3b49ff1a76807438bfb6805e513d372fba8d49c0259fe4f28e1587d47e42bf5c" + 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_high_sierra :or_newer 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..8695bce70545d --- /dev/null +++ b/Formula/b/bit-git.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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, mojave: "d30223745868e73a5e35a00fbc77810fe5b3b1b1055e546dce34e3d6b6c27325" + 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..b05f06aa4a199 --- /dev/null +++ b/Formula/b/bit.rb @@ -0,0 +1,63 @@ +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" + + bottle do + rebuild 1 + 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..380cce9091098 --- /dev/null +++ b/Formula/b/bitchx.rb @@ -0,0 +1,117 @@ +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/formula-patches/7a83dbb5d8e3a3070ff80a28d396868cdd6b23ac/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 + + bottle do + rebuild 1 + 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..ee912687f4412 --- /dev/null +++ b/Formula/b/bitcoin.rb @@ -0,0 +1,121 @@ +class Bitcoin < Formula + desc "Decentralized, peer to peer payment network" + homepage "https://bitcoincore.org/" + url "https://bitcoincore.org/bin/bitcoin-core-29.0/bitcoin-29.0.tar.gz" + sha256 "882c782c34a3bf2eacd1fae5cdc58b35b869883512f197f7d6dc8f195decfdaa" + license all_of: [ + "MIT", + "BSD-3-Clause", # src/crc32c, src/leveldb + "BSL-1.0", # src/tinyformat.h + "Sleepycat", # resource("bdb") + ] + 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_sequoia: "8fa8fcf7ccb91a577436dcacdc6ff4140b960518466de5c6086788c5b705e737" + sha256 cellar: :any, arm64_sonoma: "dc06414451b6958961bbb761c30596111a1108b90553990b2c23e4583c59cced" + sha256 cellar: :any, arm64_ventura: "b44e261cc593181a6d7911747ceb9fcac26ef45e2c464539133291032226a050" + sha256 cellar: :any, sonoma: "060611cfbfba123b4c61cb4622d292ba56995184581a466d7967eb6263dce0c3" + sha256 cellar: :any, ventura: "4ad32aea3bf5f4f2f0cab5e1d25a2a6ae8e7cdec9322fa8f3942f0968cd2bfa8" + sha256 arm64_linux: "70752d59e92fe46e0942521e9d05c02ae73e0003258c7ec0da481e30fd8a6c09" + sha256 x86_64_linux: "a1dfba272b3381616eec1ea655b2cf320070b48985272517fb36277917188efe" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on macos: :big_sur + depends_on "zeromq" + + uses_from_macos "sqlite" + + fails_with :gcc do + version "10" + cause "Requires C++ 20" + end + + # berkeley db should be kept at version 4 + # https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md + # https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md + resource "bdb" do + url "https://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz" + sha256 "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef" + + # Fix build with recent clang + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/4c55b1/berkeley-db%404/clang.diff" + sha256 "86111b0965762f2c2611b302e4a95ac8df46ad24925bbb95a1961542a1542e40" + end + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + directory "dist" + end + end + + # Skip two tests that currently fail in the brew CI + patch do + url "https://github.com/fanquake/bitcoin/commit/9b03fb7603709395faaf0fac409465660bbd7d81.patch?full_index=1" + sha256 "1d56308672024260e127fbb77f630b54a0509c145e397ff708956188c96bbfb3" + end + + def install + # https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md#berkeley-db + # https://github.com/bitcoin/bitcoin/blob/master/depends/packages/bdb.mk + resource("bdb").stage do + with_env(CFLAGS: ENV.cflags) do + # Fix compile with newer Clang + ENV.append "CFLAGS", "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + # Fix linking with static libdb + ENV.append "CFLAGS", "-fPIC" if OS.linux? + + args = ["--disable-replication", "--disable-shared", "--enable-cxx"] + 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, *std_configure_args(prefix: buildpath/"bdb") + system "make", "libdb_cxx-4.8.a", "libdb-4.8.a" + system "make", "install_lib", "install_include" + end + end + end + + ENV.runtime_cpu_detection + args = %W[ + -DWITH_BDB=ON + -DBerkeleyDB_INCLUDE_DIR:PATH=#{buildpath}/bdb/include + -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/"test_bitcoin" + + # Test that we're using the right version of `berkeley-db`. + port = free_port + bitcoind = spawn bin/"bitcoind", "-regtest", "-rpcport=#{port}", "-listen=0", "-datadir=#{testpath}", + "-deprecatedrpc=create_bdb" + sleep 15 + # This command will fail if we have too new a version. + system bin/"bitcoin-cli", "-regtest", "-datadir=#{testpath}", "-rpcport=#{port}", + "createwallet", "test-wallet", "false", "false", "", "false", "false" + ensure + Process.kill "TERM", bitcoind + end +end diff --git a/Formula/b/bitlbee.rb b/Formula/b/bitlbee.rb new file mode 100644 index 0000000000000..25b5f82f62e36 --- /dev/null +++ b/Formula/b/bitlbee.rb @@ -0,0 +1,76 @@ +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 + + bottle do + rebuild 1 + 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..f6cd6ac68ae52 --- /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.31.1.tar.gz" + sha256 "d7205338c9138b6488a57c3198426ef19392fdf6d800876f5c182de7e3ec2994" + 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_sequoia: "9887100ba13ac69b18ee55a59c881ba43a867bffac7e2e206f691fec068feb89" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9887100ba13ac69b18ee55a59c881ba43a867bffac7e2e206f691fec068feb89" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9887100ba13ac69b18ee55a59c881ba43a867bffac7e2e206f691fec068feb89" + sha256 cellar: :any_skip_relocation, sonoma: "357ffa4ae44cf74c35e195723d0f0d5a9bda87f9a9817c40a0ddc5ef703db5e0" + sha256 cellar: :any_skip_relocation, ventura: "357ffa4ae44cf74c35e195723d0f0d5a9bda87f9a9817c40a0ddc5ef703db5e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b58bc3456dc50deafb3751b847b68139a2ced6da6d23988f2cd8d26c5a8fa537" + 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..735e10eb291c1 --- /dev/null +++ b/Formula/b/bittwist.rb @@ -0,0 +1,29 @@ +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_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..308feae74411a --- /dev/null +++ b/Formula/b/bitwarden-cli.rb @@ -0,0 +1,54 @@ +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.2.0.tar.gz" + sha256 "2c31f8f66e197d5bcbc656c258d4556c97e49a940cabad3ec76ff3742b5252c7" + license "GPL-3.0-only" + + livecheck do + url :stable + regex(/^cli[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "8135a07ebdcea3d1f7ded32a9c3c3f2e44d36149a28ebbfaa3f1a36f9442a9b6" + sha256 arm64_sonoma: "b3e3d00aead0feb9093f8824643bb3bd386bd514bf353744557570d0c1112acf" + sha256 arm64_ventura: "081a5a6d709da2f18ead6b1f72a40157016b0e7053ed5d702a20f459dc02319f" + sha256 sonoma: "85b5bf952cf8bc3af074eb591ac3aa23cec31fc51b04fd0e0e89713c6a2a28bc" + sha256 ventura: "a636e9b2000aa701f0458536699da75198acdc202ebab30708285553939b2667" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3ab609bea3ee40e18d0886a20d622791afa6de1bcb48f463f3017f665ef16af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db9064f3684fe40c5090a3e47cec50fdc6f6418581d26cdd4da3065d93e28013" + end + + depends_on "node" + + def install + system "npm", "ci", "--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" + cd "./build" do + system "npm", "install", *std_npm_args + bin.install_symlink Dir[libexec/"bin/*"] + end + end + + # Remove incompatible pre-built `argon2` binaries + os = OS.kernel_name.downcase + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + node_modules = libexec/"lib/node_modules/@bitwarden/cli/node_modules" + (node_modules/"argon2/prebuilds/linux-arm64/argon2.armv8.musl.node").unlink + (node_modules/"argon2/prebuilds/linux-x64/argon2.musl.node").unlink + (node_modules/"argon2/prebuilds").each_child { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + + generate_completions_from_executable(bin/"bw", "completion", shells: [:zsh], shell_parameter_format: :arg) + 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/b/bitwise.rb b/Formula/b/bitwise.rb new file mode 100644 index 0000000000000..c912365e0ca22 --- /dev/null +++ b/Formula/b/bitwise.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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..cc92207285e46 --- /dev/null +++ b/Formula/b/bk.rb @@ -0,0 +1,32 @@ +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_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..27d0dcfd6093f --- /dev/null +++ b/Formula/b/bkcrack.rb @@ -0,0 +1,35 @@ +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.7.1.tar.gz" + sha256 "1ed073f9640baac4ba0156a00359e5a08e784cacd9f7de0bd07e2f49616c7a6a" + license "Zlib" + head "https://github.com/kimci86/bkcrack.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1cf8f38ed5f045a6215830602e84b069661264da4cdb2cebafa03049aece3daa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b8ccdd54ac621e9de415133a75eb11375ae5109c0b4bab3e093204a8b569042e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "555519835883a84e9db5ee8b3df8129a14c350fadc9e702aa7b5d468e2858747" + sha256 cellar: :any_skip_relocation, sonoma: "6e34eec5c871650ccc49dbd2ef379247110072a02792480c177c1960a1de8250" + sha256 cellar: :any_skip_relocation, ventura: "83907162b233475143ce2438896568a3ea217ffe51144657665324806eabcbe2" + sha256 cellar: :any_skip_relocation, arm64_linux: "30be411154c4b6f3768156272c3c9df5873d95fe83fce31467a6ef5b3a3dd24e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fbbc5a49024a5f69aacff16c41914e828999ab73cda787682dde3443a504dbba" + 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..ea6965e95c1f7 --- /dev/null +++ b/Formula/b/bkmr.rb @@ -0,0 +1,43 @@ +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/v4.22.1.tar.gz" + sha256 "9e43df28b7f447ae55534a7621e216293015cc0a626a9dcc89d3e9f4edb51beb" + license "BSD-3-Clause" + head "https://github.com/sysid/bkmr.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6d786be0518a1a3e1983d6ac8bf45efb0b56efaabdbc260bc8ff7ccd8344734c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "74667f04641b12ff057f84d94b78ce1b6e3116789e71e61d6c1e6554f0da9cc3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5f86fe92160ecef2ce827b8b9dff26a67ff329c3decd8fe378c105116877f135" + sha256 cellar: :any_skip_relocation, sonoma: "c897e4f546732eac0e06bdb5ce4f2e822b4081a5714e73167c78289b735850f2" + sha256 cellar: :any_skip_relocation, ventura: "476f9cfddb8a3f425259ecaa1dd7e2177806aea9998befe35fc40b22a227fce0" + sha256 cellar: :any_skip_relocation, arm64_linux: "e9b738cda96d7f09a465bd9c560f9c52b0faaf1574fa551359d11bae57eb6e0c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a14a68d59e62bd12ab7564e8224e58546c5bda3a92c5df755815f58d3d6033a" + 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 + + generate_completions_from_executable(bin/"bkmr", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/bkmr --version") + + output = shell_output("#{bin}/bkmr info") + assert_match "Database URL: #{testpath}/.config/bkmr/bkmr.db", output + assert_match "Database Statistics", output + end +end diff --git a/Formula/b/bkt.rb b/Formula/b/bkt.rb new file mode 100644 index 0000000000000..5b74e459f768a --- /dev/null +++ b/Formula/b/bkt.rb @@ -0,0 +1,30 @@ +class Bkt < Formula + desc "CLI utility for caching the output of subprocesses" + homepage "https://www.bkt.rs/" + 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_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..7a1483b5b36d9 --- /dev/null +++ b/Formula/b/black.rb @@ -0,0 +1,126 @@ +class Black < Formula + include Language::Python::Virtualenv + + desc "Python code formatter" + homepage "https://black.readthedocs.io/en/stable/" + url "https://files.pythonhosted.org/packages/94/49/26a7b0f3f35da4b5a65f081943b7bcd22d7002f5f0fb8098ec1ff21cb6ef/black-25.1.0.tar.gz" + sha256 "33496d5cd1222ad73391352b4ae8da15253c5de89b93a80b3e2c8d9a19ec2666" + license "MIT" + head "https://github.com/psf/black.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46c64691bb6258ab24509fee79523f5ff62cc09219ad325fe2872d3b8c2005ab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "32faab47d3445dcf22eb782211f9959b38dd2933817b710b3c69774eb54270d2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5c78a437c2d5cb0cc4c2452be34a125b05e7d1bafc6d931f7fe337451cce67f6" + sha256 cellar: :any_skip_relocation, sonoma: "d647d07c26cb7d24012d24054f40be1e4e9cb93a4918b12090a7cd81b44c7b42" + sha256 cellar: :any_skip_relocation, ventura: "57156446b37bee3a2f9c804793842a60b340dc97000d55e5ccf717dcaf5e4add" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5f1df22ab3d5b31ef5880f270873a9ed89d5ef8c397b174935a9d997b839f5e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fdf2182bd82d22039120cff8bd9eb9546e89231b241fd2f15701f36ed7009315" + end + + depends_on "python@3.13" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/7f/55/e4373e888fdacb15563ef6fa9fa8c8252476ea071e96fb46defac9f18bf2/aiohappyeyeballs-2.4.4.tar.gz" + sha256 "5fdd7d87889c63183afc18ce9271f9b0a7d32c2303e394468dd45d514a757745" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/fe/ed/f26db39d29cd3cb2f5a3374304c713fe5ab5a0e4c8ee25a0c45cc6adf844/aiohttp-3.11.11.tar.gz" + sha256 "bb49c7f1e6ebf3821a42d81d494f538107610c3a705987f53068546b0e90303e" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/49/7c/fdf464bcc51d23881d110abd74b512a42b3d5d376a55a831b44c603ae17f/attrs-25.1.0.tar.gz" + sha256 "1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e" + 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/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + 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/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + end + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz" + sha256 "75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/20/c8/2a13f78d82211490855b2fb303b6721348d0787fdd9a12ac46d99d3acde1/propcache-0.2.1.tar.gz" + sha256 "3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/b7/9d/4b94a8e6d2b51b599516a5cb88e5bc99b4d8d4583e468057eaa29d5f0918/yarl-1.18.3.tar.gz" + sha256 "ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1" + end + + def install + ENV["HATCH_BUILD_HOOK_ENABLE_MYPYC"] = "1" + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"black", shells: [:fish, :zsh], 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..886b3594e4cf5 --- /dev/null +++ b/Formula/b/blackbox.rb @@ -0,0 +1,50 @@ +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 + + 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..83d1b048fea91 --- /dev/null +++ b/Formula/b/blades.rb @@ -0,0 +1,44 @@ +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_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..5f1a82e95f9ed --- /dev/null +++ b/Formula/b/blahtexml.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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 + # Boost is only used for unit tests. + args = %W[ + --prefix=#{prefix} + --with-bin-release + --with-mt + --without-strip + --with-experimental=Int8GI + --without-debug + --without-boost + ] + + if OS.mac? + # Allow SSE4.2 on some platforms. The --with-bin-release sets --without-sse42 + args << "--with-sse42" if Hardware::CPU.intel? && OS.mac? && 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..8bbbcadf61158 --- /dev/null +++ b/Formula/b/blastem.rb @@ -0,0 +1,82 @@ +class Blastem < Formula + desc "Fast and accurate Genesis emulator" + homepage "https://www.retrodev.com/blastem/" + url "https://www.retrodev.com/repos/blastem/archive/v0.6.2.tar.gz" + sha256 "d460632eff7e2753a0048f6bd18e97b9d7c415580c358365ff35ac64af30a452" + license "GPL-3.0-or-later" + revision 2 + head "https://www.retrodev.com/repos/blastem", using: :hg + + 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 + + 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.13" => :build + depends_on arch: :x86_64 + depends_on "glew" + depends_on "sdl2" + + uses_from_macos "zlib" + + on_linux do + depends_on "mesa" + end + + resource "vasm" do + url "http://phoenix.owl.de/tags/vasm1_8i.tar.gz" + sha256 "9ae0b37bca11cae5cf00e4d47e7225737bdaec4028e4db2a501b4eca7df8639d" + end + + # 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 + + 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 $< $@" + + 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..6bf272775c298 --- /dev/null +++ b/Formula/b/blaze.rb @@ -0,0 +1,63 @@ +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" + + bottle do + 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..afdc9e36457a1 --- /dev/null +++ b/Formula/b/blazeblogger.rb @@ -0,0 +1,41 @@ +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" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0045a7f2db5667ef5e70880950ca3b04ab2f0d0cb0525e4b11e14d4107af7443" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "87ca82760016e36f3dfc234df48a695e62a81479c799c54a5e7500014584fa69" + sha256 cellar: :any_skip_relocation, arm64_ventura: "971cf089545d50d6b751253a1ffe63b4bc3cb10c55287bf5f43cabcee9088afa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "971cf089545d50d6b751253a1ffe63b4bc3cb10c55287bf5f43cabcee9088afa" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d7c1a4c1663a7da5774e534eec48e6ab245f22d20f1f98a3186b7877f8bc4bcf" + sha256 cellar: :any_skip_relocation, sonoma: "888c1f54a7c89c767f28127d6d0ae7c6eb93312e1b4c44b40378d2bb6d149d84" + sha256 cellar: :any_skip_relocation, ventura: "6cbe0fa6acb72e64523b98192c50de16a12c919e91a7467136876d25c60372fe" + sha256 cellar: :any_skip_relocation, monterey: "6cbe0fa6acb72e64523b98192c50de16a12c919e91a7467136876d25c60372fe" + sha256 cellar: :any_skip_relocation, big_sur: "595702af4db6b12264bffdfa430b29c55474e15fcb9fc95cf7dec509dbe1bce5" + sha256 cellar: :any_skip_relocation, catalina: "cb9f78c2ae445f20f90c62b634fa4ee32ac282fc0a005099dcb5593b5008f99e" + sha256 cellar: :any_skip_relocation, mojave: "c7350b4fc7cb74eb436f431aed0e54160bb2da31593f623573b6396287342148" + sha256 cellar: :any_skip_relocation, high_sierra: "7cb9d122a9c892a89d36a886c2be63536ca339def18d2766fde8f96e87c0d0cd" + sha256 cellar: :any_skip_relocation, sierra: "8e6e405d5b586a95006ab1f47d2f5cef961a2dbdaa9759fb4427663edcd12adf" + sha256 cellar: :any_skip_relocation, el_capitan: "0d6bf439fa6f880cb9457581da66082f49f514f8b0fd4b57ac81180948aaa5e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8dc5296ef25d1c5289d74505f6db5c963263054ae78624b237321844e7b3aa5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "534e43639b7ee566bbc9f675f94043e4579b0e01ba1b8b5651dcd308f640a182" + 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_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..77a1346f04b02 --- /dev/null +++ b/Formula/b/blazegraph.rb @@ -0,0 +1,43 @@ +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 + + # 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..8c22fcbf7bfd3 --- /dev/null +++ b/Formula/b/blink.rb @@ -0,0 +1,42 @@ +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" + + bottle do + rebuild 1 + 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..1f2b87d155dea --- /dev/null +++ b/Formula/b/blink1.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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..e658f915f2031 --- /dev/null +++ b/Formula/b/blis.rb @@ -0,0 +1,65 @@ +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/1.1.tar.gz" + sha256 "847c035809b8994c077ade737a4813601db96c4cf0d903d08ba6a9b8ee0fe03e" + license "BSD-3-Clause" + head "https://github.com/flame/blis.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7b54027b039fa551a50e4fb6e99c79f732a5b34aff78092d733e22c823450ad9" + sha256 cellar: :any, arm64_sonoma: "0709aa01695e7ce672d9d8a0780d28fa3465f2cba5b49f976bd3c96f498c1448" + sha256 cellar: :any, arm64_ventura: "9630f05d848259bc7ffc9df96102b9655a0cd3284057dd77a5e59256b81a32ec" + sha256 cellar: :any, sonoma: "eb365f3d3d6fc8eb1df33f83f72b88ee33984438392b78bdc58e4657f7cec66b" + sha256 cellar: :any, ventura: "996841f0627e6a5f43d4f272bb0698e7fecb9f958fe05915c85b0814a6be34ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9a2bf0a115a4af35026be884519a3b23e97535f5ffcedff0ae7a7a8582914b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db5d4aed1ccf53d93eb65d37dd22cda09f5049e7c5fe4bd2f7db556ccaa57ad3" + end + + uses_from_macos "python" => :build + + 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", 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 diff --git a/Formula/b/blisp.rb b/Formula/b/blisp.rb new file mode 100644 index 0000000000000..f630736c62b70 --- /dev/null +++ b/Formula/b/blisp.rb @@ -0,0 +1,45 @@ +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.4.tar.gz" + sha256 "288a8165f7dce604657f79ee8eea895cc2fa4e4676de5df9853177defd77cf78" + license "MIT" + head "https://github.com/pine64/blisp.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "41b508789c6bce007f07aaa0c76f46dbfba9a02e1fdf2a5920985affce135519" + sha256 cellar: :any, arm64_sonoma: "378b9e0bf8a8de264749eb7f5b45ca41b6606363854cea6e61fbad3b7ef0d865" + sha256 cellar: :any, arm64_ventura: "5fcae89834fc473691f68efb1d465286ebf9286367709eff247e28ecc0898e18" + sha256 cellar: :any, sonoma: "1b58e07e26693499bf1364127f5bc68c735a38953087319d4f5daf236071c778" + sha256 cellar: :any, ventura: "7e442f53b23b4c1c216fc5a91e4ef6f9a09dffddd00601f9664bd5cca83bdee8" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b361198695ac6822882d99ae26212b3e9ca7cf5c19c13e311ab79b3073d3a79" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5a4ed852cd606d9477c96a101081eee8e928a14ca30c24dab41e293b90512278" + 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", 3) + assert_match "Device not found", 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..84976b0655e4a --- /dev/null +++ b/Formula/b/blitz.rb @@ -0,0 +1,58 @@ +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: "master" + + bottle do + 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, mojave: "a06052c039592fe7b41face9c72d715ba0602456a9df07a40a472d3ceba02c00" + sha256 cellar: :any, high_sierra: "79901f790ea3583942a72ababfba3dc6569169f228b0428c047da52f1f99c02d" + 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 + system "cmake", "-S", ".", "-B", "build", *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..c95acb932ed82 --- /dev/null +++ b/Formula/b/blitzwave.rb @@ -0,0 +1,55 @@ +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" + + bottle do + 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, mojave: "7bd4d442c43a1f5c2a6fbfbf77faa3d90096873a65d90317fa0dad223908b498" + sha256 cellar: :any, high_sierra: "5ad4f6c2447b6efdad752ffc05c2d31be8ad1abbe0c6654f77f33141edaf300e" + sha256 cellar: :any, sierra: "1722c7dfacc458ca54d05dcc06a5281bbe48935f66eaaf7374c2551ad50298a8" + sha256 cellar: :any, el_capitan: "be9ba4deb07a468b23f430fe2f0896206b120f70e07f94d48267448c0524d3bc" + 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..d215f69800481 --- /dev/null +++ b/Formula/b/bloaty.rb @@ -0,0 +1,51 @@ +class Bloaty < Formula + desc "Size profiler for binaries" + homepage "https://github.com/google/bloaty" + url "https://github.com/google/bloaty/releases/download/v1.1/bloaty-1.1.tar.bz2" + sha256 "a308d8369d5812aba45982e55e7c3db2ea4780b7496a5455792fb3dcba9abd6f" + license "Apache-2.0" + revision 36 + + bottle do + sha256 cellar: :any, arm64_sequoia: "dd24996db87e0756384539d8c2598aa55d0349c12b5b6147fd247dee1be37af5" + sha256 cellar: :any, arm64_sonoma: "d53ee453c66dac7c2224878716db04dd061042d6db76d8677805500adb2ac1a3" + sha256 cellar: :any, arm64_ventura: "a5cafe2334eacd9edbbf40e50b70f7edeaa8d9353f1c265ce191093d2a0436f4" + sha256 cellar: :any, sonoma: "3e7feff675fb3fb19547ca13cbd574e75858f2beff4cc0dae5cf0c34c9077d22" + sha256 cellar: :any, ventura: "133138d221950a08502d2fe07503dac2e4e91bfc57ffa189a77caf09e7410a80" + sha256 cellar: :any_skip_relocation, arm64_linux: "bd894c5366b869c0f04cd0c7b070179cf7ba2df99be977a03f0a740c75b8ee8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f41cb1f19e27ec162ed15777401528db2e4b3806f4d941ef099506b5066407df" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "abseil" + depends_on "capstone" + depends_on "protobuf" + depends_on "re2" + + # Support system Abseil. Needed for Protobuf 22+. + # Backport of: https://github.com/google/bloaty/pull/347 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/86c6fb2837e5b96e073e1ee5a51172131d2612d9/bloaty/system-abseil.patch" + sha256 "d200e08c96985539795e13d69673ba48deadfb61a262bdf49a226863c65525a7" + end + + 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 + inreplace "CMakeLists.txt", "CMAKE_CXX_STANDARD 11", "CMAKE_CXX_STANDARD #{abseil_cxx_standard}" + inreplace "CMakeLists.txt", "-std=c++11", "-std=c++17" + + 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..f50a933d3897f --- /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.0.24.tar.gz" + sha256 "e7d3a29e171adbc81aa6bcacaf4448114c31bf8f1bdea20ef2fde3827837cf1e" + 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_sequoia: "e2b6deac5208959b3f1bfa9f21acc3b680377ddd7bc3907c96de261720c0bb3e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "813f4eef52e9bfe53a7489e67d995466058a1553b6f8e177f236403b0e1399c5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "acae77d6a4e081062635daeeb40d397c8b2b9b41a8715ee43c95864f85cc6b79" + sha256 cellar: :any_skip_relocation, sonoma: "e69259acb8a1cdab32b50d6f79bc88f101c2b8bb2c184be3bc27885d16ca758c" + sha256 cellar: :any_skip_relocation, ventura: "d8e94e7aaaa27fd338c7789481381fa0721e8430dc7d1c78d0d99aaf365c84b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec83d77b15e8e0d93e2243c2f549c3b1a6e9991062e2075b66361d4efc2f7e25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00949f4d09748b08901feb07e6428edff38e50583f0f808dd6e8c4380e62dbdf" + end + + depends_on "pkgconf" => :build + 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..01d5360563d32 --- /dev/null +++ b/Formula/b/blockhash.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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 + + resource "homebrew-testdata" do + url "https://raw.githubusercontent.com/commonsmachinery/blockhash/ce08b465b658c4e886d49ec33361cee767f86db6/testdata/clipper_ship.jpg" + sha256 "a9f6858876adadc83c8551b664632a9cf669c2aea4fec0c09d81171cc3b8a97f" + end + + 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").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..5f457144ae1e5 --- /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.25.tar.gz" + sha256 "856f09cd5df5dc20a44067113dd200a3e74465c3ded2b5dcd473188b3c764b11" + license "Apache-2.0" + head "https://github.com/0xerr0r/blocky.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3f13867d7f062db877b46e6bdba815ef8c44a813142c5f4f30adadf1e2968da8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3f13867d7f062db877b46e6bdba815ef8c44a813142c5f4f30adadf1e2968da8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3f13867d7f062db877b46e6bdba815ef8c44a813142c5f4f30adadf1e2968da8" + sha256 cellar: :any_skip_relocation, sonoma: "3d909115c5c25eee7f855d5642a55dceda1812202cec3ba97fbb422b9f29af02" + sha256 cellar: :any_skip_relocation, ventura: "3d909115c5c25eee7f855d5642a55dceda1812202cec3ba97fbb422b9f29af02" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0f9546d8772ae5b23c4e3f6eb1ff39a31436c7a0995fffed893e2387312e4a5" + 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..bf31a026a012a --- /dev/null +++ b/Formula/b/blogc.rb @@ -0,0 +1,76 @@ +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" + + bottle do + 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, mojave: "f1409e887cc77c191a561e71c497d95dffd281cdf673a5b474003902aaa44099" + 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/bltool.rb b/Formula/b/bltool.rb similarity index 76% rename from Formula/bltool.rb rename to Formula/b/bltool.rb index b3e76d4458b3f..17842d2b481bf 100644 --- a/Formula/bltool.rb +++ b/Formula/b/bltool.rb @@ -5,12 +5,17 @@ class Bltool < Formula sha256 "5bef751aac7140f8a705b29edd35a7bfa9f87c36039d84d4001f16a307b64ef6" license "Apache-2.0" + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "9b12a8b49ad485d5a67f12b7f8e228d2ebaa06344c653638d362804b6e416410" + end + head do - url "https://github.com/ToxicFrog/bltool.git" + url "https://github.com/ToxicFrog/bltool.git", branch: "master" depends_on "leiningen" => :build end - bottle :unneeded + depends_on "openjdk" def install if build.head? @@ -37,6 +42,6 @@ def install "--input", "test.edn", "--output", "test.txt" - assert_match /12527736\s+360\s+unfinished\s+Assassin/, File.read("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..dec008e1268b4 --- /dev/null +++ b/Formula/b/bluepill.rb @@ -0,0 +1,48 @@ +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_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/bluetoothconnector.rb b/Formula/b/bluetoothconnector.rb new file mode 100644 index 0000000000000..6f97a03b30364 --- /dev/null +++ b/Formula/b/bluetoothconnector.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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..b90e8a36cf34e --- /dev/null +++ b/Formula/b/blueutil.rb @@ -0,0 +1,35 @@ +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.12.0.tar.gz" + sha256 "944d5d1a3003a453e5c6eb05e860185763f4898c6e419a3858d981743f88afcd" + license "MIT" + head "https://github.com/toy/blueutil.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aed3c4cc18a795d9b00d44c727e304e95a30d779adf1a3f5516c5ef919d2222d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c3194c8488aadf7c368c147dfd1123f6079ce1a355f749fc985661e14d9655d5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "df4282fa2f6747837f20f66be1d38f3347544f4a17a5322beceff985febe1a59" + sha256 cellar: :any_skip_relocation, sonoma: "851da7f3bef7af931468e91562285943c756c851bf2692cd1df4d20e444f0e66" + sha256 cellar: :any_skip_relocation, ventura: "cf1441c45a6e73cf3476a342a6c9e376d7a7024916269e69ee7c67500b5e36ed" + 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..49034cf202d3d --- /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.82.tar.xz" + sha256 "0739fa608a837967ee6d5572b43fb89946a938d1c6c26127158aaefd743a790b" + 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: "8676eb5e356f69b6eb39d1a839c01ca00cd9969dc99a2957a43c8d6bc1ced249" + sha256 x86_64_linux: "f599c75ecc8768c1116110e1f8513395e0a461055c94a66a78415b066a2e7c8a" + 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..60bffd7d8a159 --- /dev/null +++ b/Formula/b/bmake.rb @@ -0,0 +1,47 @@ +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-20250414.tar.gz" + sha256 "43258a0b819f3e362dd66c05b8212ea977606945f3887ba1b6ad612affabc9aa" + 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_sequoia: "bcb77e6358390c80463b999d8979ceae3e69a3e5e3cf8d05a44a98a96d05f57a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "230aae790cc684473ea54bd90bd7933214a41de7b4ced82083b19da564470b58" + sha256 cellar: :any_skip_relocation, arm64_ventura: "170947e3fff8897d4dc593e4f9f7b14adc58cd1e0d926b711602c109f062a49d" + sha256 sonoma: "a0c140bba308f37cf40fe5fe83e9a377e71a084649a302cc8a494eb6876395c5" + sha256 ventura: "3963568a17f0874afc6b8681c17f670528bc69fa059704afc3259e2d52db7b88" + sha256 arm64_linux: "9efc697537e519aaf95d3207b689301142729ad7ca26c8a8e792eea15e535b1a" + sha256 x86_64_linux: "5aaa87b011f69dc54471377b0014bc8f2e9ffb4030d454862446d09dbe6262ee" + 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..758160ea492e0 --- /dev/null +++ b/Formula/b/bmon.rb @@ -0,0 +1,54 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "54c90f958df855b99cc0b6fa4cbabd4b135e7913b844d774e607fb6d14045dcf" + 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..c9368c19b77b9 --- /dev/null +++ b/Formula/b/bnfc.rb @@ -0,0 +1,141 @@ +class Bnfc < Formula + desc "BNF Converter" + homepage "https://github.com/BNFC/bnfc" + url "https://github.com/BNFC/bnfc/archive/refs/tags/v2.9.5.tar.gz" + sha256 "32a6293b95e10cf1192f348ec79f3c125b52a56350caa4f67087feb3642eef77" + license "BSD-3-Clause" + revision 1 + head "https://github.com/BNFC/bnfc.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d9baadeda06fc25d982632ced8e240e3d92d27c3d1668f00334138cdaf527f7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5cceadcfc8705ca28116c10045b955c99d9f6d85490fbd4d533691db314c143" + sha256 cellar: :any_skip_relocation, arm64_ventura: "60af864f3a925d506214ea0caeb50df915dae976dfbb320f9adbb8801375c58b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "70fbff20aeb4526eee3da488f081c17660bbf390d598190687020cb6a0ebba04" + sha256 cellar: :any_skip_relocation, sonoma: "f70febbdc989129871dae2ad9ac254c8a68e137921854a1e9728a301f4bba2f8" + sha256 cellar: :any_skip_relocation, ventura: "d645135dfed8bd688b12de81f12c3496d69dc58b1c6c523b48752c44df64cebe" + sha256 cellar: :any_skip_relocation, monterey: "efe525933e08206d108405241096da7f5e4b55c00c5cda02fae546b14e94d7cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a0f394ee5a67102753f9ba868bfa1763195f44a71d1992980a1409c7da6063a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "428910364e4bb5f3fb7f79e578298b97d429b75793ed2dd3c91052209a130e2e" + 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/bob.rb b/Formula/b/bob.rb new file mode 100644 index 0000000000000..c2c30055fa10a --- /dev/null +++ b/Formula/b/bob.rb @@ -0,0 +1,44 @@ +class Bob < Formula + desc "Version manager for neovim" + homepage "https://github.com/MordechaiHadad/bob" + url "https://github.com/MordechaiHadad/bob/archive/refs/tags/v4.0.3.tar.gz" + sha256 "cb0b084ca0454fc17c387d9662b420764b2aa1152dfe035238b1d08bb7ab34f1" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "197aedb1360b5288d62570a28d4ab2799db3b23c5a66b7825d70b006a4eab70c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "abb9e82fa156473bf7477165601ce06461d34131dcedd97456341b8f24bec3e8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "59d937fb5ca0b8f8e360a4685be621be76f843583bcb1711b3cf6b79007b1b6f" + sha256 cellar: :any_skip_relocation, sonoma: "37a0ae66998c2dcec0a690d1a3c56e2ee3c5ec6ebe4345a28a43858e80910d25" + sha256 cellar: :any_skip_relocation, ventura: "ec91b851216fb3b9489a1f58279f4290662bb7cb6ba2b74c49305b9ab61ba1ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "a9ab71e83cf296494c2fdcdefca38822f5cad293a94afdf13dba5c4a7afcfaee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "771d6922ebbff58d6c998d5c5217816d8f439a9c8462a4ce32886e7c183d0cce" + 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 + system bin/"bob", "erase" + end +end diff --git a/Formula/b/bochs.rb b/Formula/b/bochs.rb new file mode 100644 index 0000000000000..0434c5f98d55a --- /dev/null +++ b/Formula/b/bochs.rb @@ -0,0 +1,117 @@ +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_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..b275a9e917138 --- /dev/null +++ b/Formula/b/bogofilter.rb @@ -0,0 +1,37 @@ +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 + + bottle do + rebuild 1 + 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..7740f92f0f858 --- /dev/null +++ b/Formula/b/bold.rb @@ -0,0 +1,52 @@ +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_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" => :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 <<~EOS + #include + int main() { + printf("Hello from Bold\\n"); + return 0; + } + EOS + + 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\n", shell_output("./test") + end +end diff --git a/Formula/b/bombadillo.rb b/Formula/b/bombadillo.rb new file mode 100644 index 0000000000000..bb958cc2c83ff --- /dev/null +++ b/Formula/b/bombadillo.rb @@ -0,0 +1,50 @@ +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" + + bottle do + 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, 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..9aa3e36098f63 --- /dev/null +++ b/Formula/b/bombardier.rb @@ -0,0 +1,31 @@ +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_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, 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..ea928d34e14c4 --- /dev/null +++ b/Formula/b/bomber.rb @@ -0,0 +1,35 @@ +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_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, 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..d247a81584a6e --- /dev/null +++ b/Formula/b/bonnie++.rb @@ -0,0 +1,49 @@ +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 + + bottle do + 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, mojave: "c503806d5f1ad449a6943275fa93a3930fbbd7cd63b31ee873590d0219ded5b9" + 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/formula-patches/913b5a25087d2c64d3b6459635d5d64012b83042/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..4569be0f8db92 --- /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 + + bottle do + 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, mojave: "f5e7f38cfa342d15025f798e9476a7091d3dbd60a15a6635d9fd784033dd531c" + sha256 cellar: :any, high_sierra: "8cade7bb36828e32d7be412d29404748198079745defd97ed2ec533ff91f5645" + sha256 cellar: :any, sierra: "564cdae8b088da04903efd886b33ed12e5673a64866679f67b37acdb68bf539c" + 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..b8d55cc792899 --- /dev/null +++ b/Formula/b/boolector.rb @@ -0,0 +1,76 @@ +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 + + 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..450ad32e190c4 --- /dev/null +++ b/Formula/b/boom-completion.rb @@ -0,0 +1,23 @@ +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" + + 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..bc023f6060b5a --- /dev/null +++ b/Formula/b/boost-bcp.rb @@ -0,0 +1,36 @@ +class BoostBcp < Formula + desc "Utility for extracting subsets of the Boost library" + homepage "https://www.boost.org/doc/tools/bcp/" + url "https://github.com/boostorg/boost/releases/download/boost-1.88.0/boost-1.88.0-b2-nodocs.tar.xz" + sha256 "ad9ce2c91bc0977a7adc92d51558f3b9c53596bb88246a280175ebb475da1762" + license "BSL-1.0" + head "https://github.com/boostorg/boost.git", branch: "master" + + livecheck do + formula "boost" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a8e002a55974a472bc3a578fbaa1fd915d7a13f0065444ebcf153b6fe479320a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3ddbe2024ec99f3d5a53ff5f98cbc6773b5d3eb5421d8683739cdc6d95300a00" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8a42346d9849a8625053c04bf7b4443f004a542dddfea91ed794e1d6dcfbe4ec" + sha256 cellar: :any_skip_relocation, sonoma: "2dd736a775c362230f19fc186c9cfdd7d012829639e54fda96eb3e9445cbd809" + sha256 cellar: :any_skip_relocation, ventura: "50c827f9e992ff5dfb2fa2df38dd51601abe142ce4098afdcac4b736207c3856" + sha256 cellar: :any_skip_relocation, arm64_linux: "d48c4acb2a107f58c300c64142dc162837d40ef6862cb9b711db6b408c19c582" + sha256 cellar: :any_skip_relocation, x86_64_linux: "333766f7346ac77c9d28122f7798ee112dc7ef6a34696259e7ca1117a493e92e" + 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..953901effb641 --- /dev/null +++ b/Formula/b/boost-build.rb @@ -0,0 +1,46 @@ +class BoostBuild < Formula + desc "C++ build system" + homepage "https://www.boost.org/build/" + url "https://github.com/boostorg/build/archive/refs/tags/boost-1.88.0.tar.gz" + sha256 "a131c25bfe7c1b1e20da89a4c6e90a58a4bc55b361ae8c10199bb68b280aab96" + 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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ad72a5f9a660259b97a0165a5df1e1a37a1cf5bc9c66ce453629711ab47df7db" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ecfcbe45e2a501634fe259f01668ba5f05f1910a8ff1e726cb752ffc725136b8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ea7e80e6680e5edddd3db83659379ffbed349b0e7792c1253449ce290558d80c" + sha256 cellar: :any_skip_relocation, sonoma: "a1c2d51929b85f8d3800d040b160658fa6d822c552991e8acb8a968dbea818ce" + sha256 cellar: :any_skip_relocation, ventura: "3cd1353dbe93c2a68fa46a71512f0506565eb4fa8be74a0ef2c346effea128b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0f1946985cf4ce1b85052efa4d8bf16295d20594e2ffdbf6caa6f6697b64e3c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ff1ab4441869e2303895ec3d41be52978a335676fff986d1c581133cc3d0022" + 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..cc6792574a781 --- /dev/null +++ b/Formula/b/boost-mpi.rb @@ -0,0 +1,128 @@ +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.88.0/boost-1.88.0-b2-nodocs.tar.xz" + sha256 "ad9ce2c91bc0977a7adc92d51558f3b9c53596bb88246a280175ebb475da1762" + license "BSL-1.0" + head "https://github.com/boostorg/boost.git", branch: "master" + + livecheck do + formula "boost" + end + + bottle do + sha256 arm64_sequoia: "c214ac20967386a38a1de487e0c20bbdc466e459065b970887eaf35371e54402" + sha256 arm64_sonoma: "ed980f9505b4403dc52d9a091f07cc0e118f4185dc1d9ef17cd2b8ae542a5429" + sha256 arm64_ventura: "98cc35fc6851d822f0c026e86131d97e83575722063c5552b814406331f8bf14" + sha256 sonoma: "2fdef3897c4ac951086aeef0f1701b4896dc1781bca6c596096d52bb6121e5c3" + sha256 ventura: "50b09f6f2800a5044c57074f945dd7b9af1424e165e3911e2f9036e2741d9348" + sha256 cellar: :any_skip_relocation, arm64_linux: "a5186de020b7743b4a0cdc320fe447e28b37b80a945c4c693868c4653c51ce42" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f97a0a0b5d9388d97948a3a2c02005b935770f968de76d7a2ce626ab5f57888" + 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..f3540f810252e --- /dev/null +++ b/Formula/b/boost-python3.rb @@ -0,0 +1,120 @@ +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.88.0/boost-1.88.0-b2-nodocs.tar.xz" + sha256 "ad9ce2c91bc0977a7adc92d51558f3b9c53596bb88246a280175ebb475da1762" + license "BSL-1.0" + head "https://github.com/boostorg/boost.git", branch: "master" + + livecheck do + formula "boost" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c14fd4a92ecf59b0cd310d2b40ac374861acda10acc91bf22a60f561eef32327" + sha256 cellar: :any, arm64_sonoma: "2a65824b7aa95da392fa6a720bd08ccf7290979f8c93c82de2788e063c9fdb7c" + sha256 arm64_ventura: "9a543bda37bf34385df7652f441f37d617473c673b176395e59bfacd26961139" + sha256 cellar: :any, sonoma: "69721dd8b8966e727b9d3472aea41dea558d918c608e1707f5263a1389199000" + sha256 cellar: :any, ventura: "98156d65dfdaa46babec13139575e95a6746287ceff3888a70b7479c728c7da7" + sha256 cellar: :any_skip_relocation, arm64_linux: "eed54059107d80bdef3c5c82293b088c36cba0a4e47c8f4149c565cf78778158" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0f69d09d2cd72ccaeb2a1cf21280759993ca31090736f55e4b79d07678445b7" + end + + depends_on "numpy" => :build + depends_on "boost" + depends_on "python@3.13" + + def python3 + "python3.13" + 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..bb88bd26ec6fd --- /dev/null +++ b/Formula/b/boost.rb @@ -0,0 +1,144 @@ +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.88.0/boost-1.88.0-b2-nodocs.tar.xz" + sha256 "ad9ce2c91bc0977a7adc92d51558f3b9c53596bb88246a280175ebb475da1762" + 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 + + bottle do + sha256 arm64_sequoia: "40110dc77bd85db9b7bfc5c23d1cbd58f8ef501ba355484419f9d11ccabaefc1" + sha256 arm64_sonoma: "446d5acbee94708f31ed1dc16b877a33467c981ff471aa11896db9434524b3d7" + sha256 arm64_ventura: "65d89e7f5967afe2c313b99fc201b23ec8a73150f36275d5e4a0fec8335585b8" + sha256 cellar: :any, sonoma: "373c36b25cc300e2c6810828ec70fc62a93d71974bff942933b4393daa362f23" + sha256 cellar: :any, ventura: "88a3652fee2834c1442a2ad84e0592a7ba9765a2e09bc95f7b0f15d869def01f" + sha256 cellar: :any_skip_relocation, arm64_linux: "b267d0f250bf5087207ef37b6b5e7b04e7f111c64c8af87fe00d2156d32b61f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02268bb361c2145e96cc8337600e38f3cab9cfdde57d91a671e319aac010dc7f" + 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..655eb30f09205 --- /dev/null +++ b/Formula/b/boost@1.85.rb @@ -0,0 +1,140 @@ +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_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..431a2cc55a2a8 --- /dev/null +++ b/Formula/b/boot-clj.rb @@ -0,0 +1,29 @@ +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 + + 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..117791e87e556 --- /dev/null +++ b/Formula/b/bootloadhid.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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, mojave: "36032498ab37f82f538d6aa037dac2b2f1c90f552ab5403f3e87c184bc47e75b" + sha256 cellar: :any, high_sierra: "59d545d65c052c2a62f171d4b6e92098a2725cb7c44997051e96863e30d26a03" + 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..69a1019383dd6 --- /dev/null +++ b/Formula/b/bootterm.rb @@ -0,0 +1,28 @@ +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" + + bottle do + 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..9da6f1b6f64f8 --- /dev/null +++ b/Formula/b/bore-cli.rb @@ -0,0 +1,33 @@ +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.5.3.tar.gz" + sha256 "286e2f6fee4928912bfd17f9805e0da250ddcec2200cedbe7056697790bd3914" + license "MIT" + head "https://github.com/ekzhang/bore.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "88a9473dd1533097677e95287b01988e3482e729c11936c0da964dd9982a0f67" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6ed4f1f198466c0e7bf5303fe3c59a896f468dc6f7df5500b8a53686263d0c85" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0fa3583059981011d5992aafc1ccc443d91c4be3b416f774191329b23904c71c" + sha256 cellar: :any_skip_relocation, sonoma: "d54801caf21a2a64b64c705f65b7af8414da32ba63b52a93b32033ea17825810" + sha256 cellar: :any_skip_relocation, ventura: "a14f20e407fcf270edd729d3ab661a62ece9dde4488fccc2d21378d7801bdc42" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b6d1ae1df57064b69b50fac50825f6e4b0f225c4f0ecb404b50fa9fdbbd8174" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b25e14702328c566532243a2eb102ed4f8f6d9112bedf05f8925c56c284e59ad" + 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..8811f9996f847 --- /dev/null +++ b/Formula/b/borgbackup.rb @@ -0,0 +1,72 @@ +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/d3/8b/f24d8ab37b8d8cd85a55fa6cfaf98754bb7b6c7534c03ffe087506080a53/borgbackup-1.4.1.tar.gz" + sha256 "b8fbf8f1c19d900b6b32a5a1dc131c5d8665a7c7eea409e9095209100b903839" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9c79fdc448cb708b9508b0860965a57921a1698f951efd0eea11272509949085" + sha256 cellar: :any, arm64_sonoma: "6cf7a454cf9b38e348594a6965c07c21947cbb2d7f9cc737a4289032898d2d7e" + sha256 cellar: :any, arm64_ventura: "c1a05f137139afdb6252f12d3408a6f8b6924bded32c81c21fd913b5a00352d6" + sha256 cellar: :any, sonoma: "efa12e14fae859240c6b9c6878246d757e8ee756a0bac43ce22bc1f8c21b5ba9" + sha256 cellar: :any, ventura: "cd24f51bf718fd2d4b2ff427972b35ec6c40c946e544f5884aaafee30fe9c5ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8f9a96fb57c0342d32dc41591d53b22342ac0086a67d4ed6aaaf80451ec301f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a1de924be5f22308b7414f2a70173315d2d33f116564d734ec9ae5b75741fdec" + end + + depends_on "pkgconf" => :build + depends_on "libb2" + depends_on "lz4" + depends_on "openssl@3" + depends_on "python@3.13" + depends_on "xxhash" + depends_on "zstd" + + on_linux do + depends_on "acl" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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 + + Dir.chdir(testpath) do + system bin/"borg", "init", "-e", "none", "test-repo" + system bin/"borg", "create", "--compression", "zstd", "test-repo::test-archive", "test.pdf" + end + 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..c0a9afaaab740 --- /dev/null +++ b/Formula/b/borgmatic.rb @@ -0,0 +1,200 @@ +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/86/8c/0a80f219d9ca4c70cf345489b55a9c3e5c859c4d7bc99675ac1bc09eadb7/borgmatic-2.0.6.tar.gz" + sha256 "cb102d0fbb0a3a8d2fa04f01bdf2f41c6b273f42f6b1cd5fd1481704db7f6905" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4955b8d13f39ea0860c1d9adf9fe5124abca2188a3ceae2cc71b00bc72666473" + sha256 cellar: :any, arm64_sonoma: "318aa7cd47a7ab9b0137f2382eb5d3109978fc788390000f8f31ec35f21c7ff5" + sha256 cellar: :any, arm64_ventura: "093568962c6a132bfbc48769e216e60471182562a1413a49bcde7fd7a900da33" + sha256 cellar: :any, sonoma: "a5299c9dbb9f6abcbf2557bb5117e9a91a3fd7ef5d08a35468bfbd899c1761a6" + sha256 cellar: :any, ventura: "2878db66e946d8792c77970ce0f992fd010e13cb02d09074126e5308120873a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "398e2afda5ca89c526da068b58191882e1a6d99f28fc6bd661cdda35b8f6ef0b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4a4d48220d8d13853fe9dd47850f022e3e62ae781f8d3146a7f4b5218c0e042" + end + + depends_on "rust" => :build # for rpds-py + depends_on "certifi" + depends_on "python@3.13" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + 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 "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" + sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" + 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/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz" + sha256 "df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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 "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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 + system bin/"borgmatic", "config", "generate", "--destination", config_path + + # Replace defaults values + inreplace config_path do |s| + s.gsub! "- /var/log/syslog*", "" + s.gsub! "- /home/user/path with spaces", "" + s.gsub! "- path: ssh://user@backupserver/./sourcehostname.borg", "- path: #{repo_path}" + s.gsub!(/# ?local_path: borg1/, "local_path: #{borg}") + end + + # 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} + 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} --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..a32c33a5f835b --- /dev/null +++ b/Formula/b/boring.rb @@ -0,0 +1,55 @@ +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/0.11.2.tar.gz" + sha256 "d583878608549fcefa4fbe469d37a2e839c4d69a4167bc6a1a8babb31d594c98" + license "MIT" + head "https://github.com/alebeck/boring.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9c5129cfdcd553feb66d99dea071355a2da7780b791484138fd6266941456046" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c5129cfdcd553feb66d99dea071355a2da7780b791484138fd6266941456046" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9c5129cfdcd553feb66d99dea071355a2da7780b791484138fd6266941456046" + sha256 cellar: :any_skip_relocation, sonoma: "1fc79b3983465481774760be3e7aaa4006ebdd67d953f41125b013eb51fcc0f6" + sha256 cellar: :any_skip_relocation, ventura: "1fc79b3983465481774760be3e7aaa4006ebdd67d953f41125b013eb51fcc0f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1b5bc0c35384e727d57d6c6e83e8ca1d77f8db478f4c33df5b009fa1a2d13d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09d6dc5f307e18e7947b4f72ede1744ae436f6aff9b4e38d5abf5a7198adb5c4" + 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..4ae8145d678a5 --- /dev/null +++ b/Formula/b/boringtun.rb @@ -0,0 +1,40 @@ +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_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..262441376b9a4 --- /dev/null +++ b/Formula/b/bork.rb @@ -0,0 +1,33 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "148ee08c6e94140e1469ad74f46f8991ec6b843508011de9c73bd6a80200e089" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5706b3111e2ee682f2386893cf26773bd71e49cc636ef3e84b137b6108dac5db" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5706b3111e2ee682f2386893cf26773bd71e49cc636ef3e84b137b6108dac5db" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5706b3111e2ee682f2386893cf26773bd71e49cc636ef3e84b137b6108dac5db" + sha256 cellar: :any_skip_relocation, sonoma: "e015811e97fecd12d69160b30f0feaf725770162d333f4364f2e62bd0f5a55d1" + sha256 cellar: :any_skip_relocation, ventura: "e015811e97fecd12d69160b30f0feaf725770162d333f4364f2e62bd0f5a55d1" + sha256 cellar: :any_skip_relocation, monterey: "e015811e97fecd12d69160b30f0feaf725770162d333f4364f2e62bd0f5a55d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e94ffed31a6f82901865acc743d741b2bfabd153f6f8717acc3a323249ac753" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5706b3111e2ee682f2386893cf26773bd71e49cc636ef3e84b137b6108dac5db" + end + + def install + man1.install "docs/bork.1" + prefix.install %w[bin lib test types] + end + + test do + 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..832a37c63cdb4 --- /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.5.tar.gz" + sha256 "f893c11aae8705188c71e3d15bb2013f0c4ad50df84e6cf7f502ccca6095804a" + license "Apache-2.0" + head "https://github.com/cloudfoundry/bosh-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "04ac207be9ba6cfb58b5d3fa90807a835df402edd3ea68a3a44c307183842f4d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "04ac207be9ba6cfb58b5d3fa90807a835df402edd3ea68a3a44c307183842f4d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "04ac207be9ba6cfb58b5d3fa90807a835df402edd3ea68a3a44c307183842f4d" + sha256 cellar: :any_skip_relocation, sonoma: "2e1e8126475cf91f4ffa3edb6a8ec0d01b10cd0e5f7a38cdfd6136fb61101fb0" + sha256 cellar: :any_skip_relocation, ventura: "2e1e8126475cf91f4ffa3edb6a8ec0d01b10cd0e5f7a38cdfd6136fb61101fb0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "adfe7c3bf209c2bf460a42534ee15f58694e1f5962b34370366264dd27d920d4" + 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..1c40d110ad85f --- /dev/null +++ b/Formula/b/bossa.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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..3cdc2f57f8363 --- /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.8.1.tar.xz" + sha256 "b039681d4b861a2f5853746d8ba806f553e23869ed72d89edbfa3c3dbfa17e68" + license "BSD-2-Clause" + head "https://github.com/randombit/botan.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?Botan[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "a967bbee75aacedb40abbea69a039efeb6d3747f60f78d7df3c990389f4bb4ee" + sha256 arm64_sonoma: "363aac39d5a069ded0ffad86a0d924fdeba5da34b541c47de8a91a2b8ff37a55" + sha256 arm64_ventura: "d8bcc4c1e2fe8db29e38d6fc6420b03b9addba885332dcf37ecbde13dd1dad00" + sha256 sonoma: "fb26ebacd465ecc8efe8978a8b0a7a7b2b1fa9b19f5838c71e1c0b02488610f8" + sha256 ventura: "54669a30e929a073ae91d196a9a0929b9a4b77a05da4e026fb97f58da9ece15b" + sha256 arm64_linux: "13c3d6c959ea7e723868b616eddbbafe0d9d705d015e975e7e53f2dca18bc50b" + sha256 x86_64_linux: "3fb558f2f23a738424a0b1593e1541bf02ff454be11a1ceafadc05f30215a772" + end + + depends_on "pkgconf" => :build + depends_on "ca-certificates" + depends_on "python@3.13" + 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.13") + 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 + (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/botan@2.rb b/Formula/b/botan@2.rb new file mode 100644 index 0000000000000..9bb7f5f92fda1 --- /dev/null +++ b/Formula/b/botan@2.rb @@ -0,0 +1,57 @@ +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 1 + sha256 arm64_sequoia: "1104641a2c34fa2c1212ad9002fc1a2089a75be4c9fb66ad655a1680c8428ad0" + sha256 arm64_sonoma: "c65820f897ce8748cc5b74e9537a7bcbc4842f161f36557f5b6858b409b32c63" + sha256 arm64_ventura: "31a49478cd103522bee1b3e216145c3ba149f93e586a824b9d1b4ed4a2a196ae" + sha256 sonoma: "2bb57c57173cd293cc738dda60c02bcd2d7ddffad9f6e5d0b170245c03feaeff" + sha256 ventura: "51ecbd410373905c81df9ab8cf43b39076c77d255bd00e797a09c0a8243422bd" + sha256 arm64_linux: "7a3bb2490765aa9f96884caf3d476001baa5d2ad8cf2fb400db87e6e6e8d413a" + sha256 x86_64_linux: "9fd91b5d569739ca97a8130d374d0d289a1d5f6a4b7e9cea90014ec714b52181" + 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.13" + depends_on "sqlite" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def python3 + which("python3.13") + 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..415a8b10f9ee0 --- /dev/null +++ b/Formula/b/bottom.rb @@ -0,0 +1,49 @@ +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.10.2.tar.gz" + sha256 "1db45fe9bc1fabb62d67bf8a1ea50c96e78ff4d2a5e25bf8ae8880e3ad5af80a" + 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 + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "293b085af54d7e69f159e9b6a1a317ea380d52cc2996bbf74203971cb2fa6347" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c90acf12752aa008cb245f0f5e6982ba391b4129b0f1372d2f651b367768f90" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fc76f47d4eaef7e6eac3cda67cbb06805b049ed83b0c7d7f3121a0ef3f9486dc" + sha256 cellar: :any_skip_relocation, sonoma: "a50cf59e7195ba6cc6c24778047b1681e1932625222c4a3d19f386e315366737" + sha256 cellar: :any_skip_relocation, ventura: "eb73f6318589bc6be3e01d7eefd8a1cb4e19726be7f2f14cd8e574d2d86333d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9dabacfbd8ccf889af78707abb7c5dd70dbfcde0a1b2501e9a67f0a9e1f14a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f438b63dce811a4d60b306a712385942acec74e726101dc8ab78b910ced3a2e" + 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..45b11a7ebdfe7 --- /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.1.tar.gz" + sha256 "6d65d82fc702728aecab608fff8437f4920c4deeea18351e9978f0f400e64ca7" + license "MIT" + head "https://github.com/D00Movenok/BounceBack.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c204ee25c401ffe9a3755ed131a84fa34b65aa08fcebb6438ac2102893a38f72" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0376b68002fbcfdc2dfed3fa9cab94cfaa8c81fa6e4fbe81964cd51ae99f428c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "07be63668fea95277e1dfc474dfda6f49645bcb1e024bcebc22995ba60ae2491" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8b4d186fe33acd339d8782897a16bcdef1677296c9fc8e0dd517f7ac1455de68" + sha256 cellar: :any_skip_relocation, sonoma: "6ff969438b2dbf80d762d79d9be4d5d3057a6fd16501aa3a9d64525863350386" + sha256 cellar: :any_skip_relocation, ventura: "489f7fbe868db0acbeb2ba5a655174a1c73edcb3a350d8bba163e3a54276f438" + sha256 cellar: :any_skip_relocation, monterey: "b349939b90fc5ca637cfbb9780e3cfc48179f5a86ab5794f0b3fa9cd7beb08c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "834127906e053cf93616455abd4489179cd434a50377278575d1344d07c74dff" + 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.rb b/Formula/b/bower.rb new file mode 100644 index 0000000000000..8e2d8709cb38d --- /dev/null +++ b/Formula/b/bower.rb @@ -0,0 +1,32 @@ +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" + + bottle do + rebuild 1 + 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" + + 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..eb395794a1685 --- /dev/null +++ b/Formula/b/bowtie2.rb @@ -0,0 +1,38 @@ +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_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", since: :catalina + 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..8170086d37fe4 --- /dev/null +++ b/Formula/b/box2d.rb @@ -0,0 +1,51 @@ +class Box2d < Formula + desc "2D physics engine for games" + homepage "https://box2d.org/" + url "https://github.com/erincatto/box2d/archive/refs/tags/v3.1.0.tar.gz" + sha256 "7fac19801485efb31ee3745b2284d9d4601f9e8138a3383a7b0df6d788ea5785" + license "MIT" + head "https://github.com/erincatto/Box2D.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ca167fdad8578916d77f274b8a83b3b1eb09c651cd28b4fddc37ae35082a683f" + sha256 cellar: :any, arm64_sonoma: "55a7a318fbb28367b04a41ae6321e17a230ee4e0ec2ab87693d14b630c7a9718" + sha256 cellar: :any, arm64_ventura: "168cca17b58980ed81cee2a9221a347f38c65d1e39555918e0f6c16c166be08f" + sha256 cellar: :any, sonoma: "e9c5c96016ece85eafd692cc058a1170ce8e50acb199e061eacba77209e41af7" + sha256 cellar: :any, ventura: "4402f7762cf3d7cf97bd0a45e5276818d448818e74fe8266f016bfe465d852ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "555b3df11035a1d7f5106fa381c79536cfaf5475143112fde68275d5bcc1ae6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d587630b9e3b860821d03f88fcbb9e673531815ddaa615a55ef20ec64faec9c2" + 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..1c4525643286f --- /dev/null +++ b/Formula/b/boxes.rb @@ -0,0 +1,40 @@ +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_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..8f17de6816dee --- /dev/null +++ b/Formula/b/bozohttpd.rb @@ -0,0 +1,54 @@ +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 + + bottle do + 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..e5ebe25ee762a --- /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.6.0.tar.gz" + sha256 "a73718d8cfa5f6698e36c4b87ad7e93210a0aafd2a170e741eb8c84bb226b23b" + license "Apache-2.0" + head "https://github.com/Netflix/bpftop.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "2978c26c98733eded956b048fd099f2e9d72c07a04dc910022165d3459d6a4e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1edc84489ef9ff4167955890083dd06d3e5f979fb7abca844f3fd4eb13310e72" + 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..90f9c2be36241 --- /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 + + bottle do + rebuild 2 + 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, mojave: "56e3a889338b82d5b477c1564506e23549d9651b08260d9c9a38b5e6bd1555ab" + sha256 cellar: :any_skip_relocation, high_sierra: "422342ce8dd8a50853e8289ccc936747f4a77a20803850e6481498cf8c4a12c5" + sha256 cellar: :any_skip_relocation, sierra: "f1219d522f61e89606f3e607a636e406faf5f954846b48965e37cc25dbb29b87" + 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..1a6d7f489d0d1 --- /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.4.4.tgz" + sha256 "efca47edc702a41274474e148a4f468b4d3fb44e70cb0da2576a737f2cb0aaf1" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "84e343e738a156a461d7fc74edafbd3750d6be040a9ff3071b8f6b23b1fa8d93" + 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..558fb13bb6b43 --- /dev/null +++ b/Formula/b/bpython.rb @@ -0,0 +1,96 @@ +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/ba/dd/cc02bf66f342a4673867fdf6c1f9fce90ec1e91e651b21bc4af4890101da/bpython-0.25.tar.gz" + sha256 "c246fc909ef6dcc26e9d8cb4615b0e6b1613f3543d12269b19ffd0782166c65b" + license "MIT" + head "https://github.com/bpython/bpython.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "06bf6629f26910b0566487146288f2bfb1a22f2d4475fd8edfa40b846f999a70" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c859efd5a00b94aa9a44b5220ef48454b6f8ec2144334f56c04613bac6ad5471" + sha256 cellar: :any_skip_relocation, arm64_ventura: "40ded59a27e86ff42fe70298d5c2599ac2a87fcfa9f816e1bcbad96371c2e91f" + sha256 cellar: :any_skip_relocation, sonoma: "688b211f53cd9632034f46c4337bc1840c15e38c14ea430027e80e53204e36e5" + sha256 cellar: :any_skip_relocation, ventura: "c9d34b976f66b6d5519f209703ac1248a16136db2a644f6ffca3485019784f26" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed3ce49336e167299dd2f293d67a290fc4054cca82bcc4f0dff25460e0416240" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7632a46277b96ead7b36d94f1b19d43cd05d96c1e7e5c6f8230f126c436343e9" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "blessed" do + url "https://files.pythonhosted.org/packages/25/ae/92e9968ad23205389ec6bd82e2d4fca3817f1cdef34e10aa8d529ef8b1d7/blessed-1.20.0.tar.gz" + sha256 "2cdd67f8746e048f00df47a2880f4d6acbcdb399031b604e34ba8f71d5787680" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "curtsies" do + url "https://files.pythonhosted.org/packages/53/d2/ea91db929b5dcded637382235f9f1b7d06ef64b7f2af7fe1be1369e1f0d2/curtsies-0.4.2.tar.gz" + sha256 "6ebe33215bd7c92851a506049c720cca4cf5c192c1665c1d7a98a04c4702760e" + end + + resource "cwcwidth" do + url "https://files.pythonhosted.org/packages/95/e3/275e359662052888bbb262b947d3f157aaf685aaeef4efc8393e4f36d8aa/cwcwidth-0.1.9.tar.gz" + sha256 "f19d11a0148d4a8cacd064c96e93bca8ce3415a186ae8204038f45e108db76b8" + end + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/2f/ff/df5fede753cc10f6a5be0931204ea30c35fa2f2ea7a35b25bdaf4fe40e46/greenlet-3.1.1.tar.gz" + sha256 "4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467" + 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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def python3 + which("python3.13") + 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..4c677fddcbaa4 --- /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" + + bottle do + rebuild 5 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5c219f70ea941a5ba7c779f632de5aa2f19d80fc330ab0edd7eca6beffd62886" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bcd0764b30ca7c0eed88852fbc8bd223cfbc4314255e59cc7f7cceb5e508c60d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "224c99a490aef1e9b24842a83cf954885018e291b323a13de2ce184190df9e51" + sha256 cellar: :any_skip_relocation, sonoma: "1a548dc894e54ba4df4b522e769c1e5f2ca169045a3ac9005e5a4495262ae787" + sha256 cellar: :any_skip_relocation, ventura: "01228ad504d5e1e41895ec90fb6aea5dc89bee6eb4097623e797f599dc918907" + sha256 cellar: :any_skip_relocation, arm64_linux: "c74cab2fc6db04c3439c06e4938e669fea04203c67956b4fcabd046f7b231a0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77c98ef152d8a32a13e5dded91db1efd998925ffffbab5456062d67f358d7394" + end + + depends_on "python@3.13" + + 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.13") + 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 5 + 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..d133a9bded378 --- /dev/null +++ b/Formula/b/brag.rb @@ -0,0 +1,30 @@ +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 + + 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..ede8a16db5b67 --- /dev/null +++ b/Formula/b/braid.rb @@ -0,0 +1,94 @@ +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_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? && MacOS.version >= :high_sierra + + 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..e9167c7f4aeb4 --- /dev/null +++ b/Formula/b/brainfuck.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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..f796c6c249c01 --- /dev/null +++ b/Formula/b/breezy.rb @@ -0,0 +1,95 @@ +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" + url "https://files.pythonhosted.org/packages/d6/47/165a8967701fb047b46879db7d2fa50b80fd3e7da22fb54ba131b823081c/breezy-3.3.11.tar.gz" + sha256 "11cb9c5e2fac2038630e863088f047eade4653cbf2b995f732322f6c143bbb3b" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "18de1e46e39cc1fffd09957e8ad4e0540888ae0dced13ed845215e48df3be1d5" + sha256 cellar: :any, arm64_sonoma: "90af0ddd36f5145ec511a2a7f08ffd0b401ac803239b68ccda6b077971c7e328" + sha256 cellar: :any, arm64_ventura: "91a651789c915c683c12e12de61c32acb1c3e717ab3c30b76cabad8ed3736c1e" + sha256 cellar: :any, sonoma: "afd4d74f45956b3a17cd28d50ebb2d64dbbc88d0ef7ff71ef7f1235fc9bc45e1" + sha256 cellar: :any, ventura: "f293746961a03e4daba8041edf6a69228b029f29289ab065e4cca1761e3b170b" + sha256 cellar: :any_skip_relocation, arm64_linux: "62669cf5622f684b2602b79687f4cd8b87581ea2f3dbb596609f669f1a0a7457" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87623611f90764d2b2d56f9aab33335efa3987776e606bf02c81f7315ea54bdb" + end + + depends_on "gettext" => :build + depends_on "rust" => :build + depends_on "libyaml" + depends_on "python@3.13" + + 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/d4/8b/0f2de00c0c0d5881dc39be147ec2918725fb3628deeeb1f27d1c6cf6d9f4/dulwich-0.22.8.tar.gz" + sha256 "701547310415de300269331abe29cb5717aa1ea377af826bf513d0adfb1c209b" + end + + resource "fastbencode" do + url "https://files.pythonhosted.org/packages/5c/15/98e1cbac7871d9b12823c5869d942715b022c9091ce19a3ff6eb29dbff2b/fastbencode-0.3.1.tar.gz" + sha256 "5fe0cb7d1736891af61d2ade40ce948941d46e908b16f5383f55f127848da197" + end + + resource "merge3" do + url "https://files.pythonhosted.org/packages/91/e1/fe09c161f80b5a8d8ede3270eadedac7e59a64ea1c313b97c386234480c1/merge3-0.0.15.tar.gz" + sha256 "d3eac213d84d56dfc9e39552ac8246c7860a940964ebeed8a8be4422f6492baf" + end + + resource "patiencediff" do + url "https://files.pythonhosted.org/packages/19/51/828577f3b7199fc098d6f440d9af41fbef27067ddd1b60892ad0f9a2d943/patiencediff-0.2.15.tar.gz" + sha256 "d00911efd32e3bc886c222c3a650291440313ee94ac857031da6cc3be7935204" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..85175b72c97c8 --- /dev/null +++ b/Formula/b/brename.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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, 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/brev.rb b/Formula/b/brev.rb new file mode 100644 index 0000000000000..2e8e11b223ad9 --- /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.310.tar.gz" + sha256 "d7d8a58878c037372022f0c1d8fa58e15eb3d198498b521332d05def84cff351" + 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_sequoia: "040bcd8eb795a256abcabd045288da3a641eb82115b610c1050cfe1403689f71" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "040bcd8eb795a256abcabd045288da3a641eb82115b610c1050cfe1403689f71" + sha256 cellar: :any_skip_relocation, arm64_ventura: "040bcd8eb795a256abcabd045288da3a641eb82115b610c1050cfe1403689f71" + sha256 cellar: :any_skip_relocation, sonoma: "d493d3aa98b9cd85ee1ddbd85c832bff44b965795c197179046520a9187f5775" + sha256 cellar: :any_skip_relocation, ventura: "d493d3aa98b9cd85ee1ddbd85c832bff44b965795c197179046520a9187f5775" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de3caa7e2d6f717e621d7d7a83f3739e07f256951bd963e2c311d4fff9bfbcc0" + 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..fc562008e0793 --- /dev/null +++ b/Formula/b/brew-cask-completion.rb @@ -0,0 +1,33 @@ +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_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, mojave: "a5256bbd0456fc15083d843e7cc3778fd45dfd3562b14bf076e0a08bcc04948a" + sha256 cellar: :any_skip_relocation, arm64_linux: "cfa441fcc60e4cab5a4005009c18f286d160b9e515462ab3938d8a15509d5195" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3225d50a5098677d66fd4179c7fb07460129e158fc7f3ba4f1a35adb6bd8901e" + end + + 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..8a5c79b260271 --- /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.2.1.tar.gz" + sha256 "522e6db649f67950e78850a371c53fb974aee1636bc21da4310905b2b28cc122" + 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 + + bottle do + sha256 cellar: :any_skip_relocation, all: "e11e8436e3bc9f8580b2e29da9b07e023ab594b1c928bf600fac5274a35e543d" + end + + uses_from_macos "ruby" + + def install + inreplace "lib/brew/gem/formula.rb.erb", "/usr/local", HOMEBREW_PREFIX + + 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..119a3695302fc --- /dev/null +++ b/Formula/b/brigade-cli.rb @@ -0,0 +1,53 @@ +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 + + bottle do + 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..c1a55e4f532fa --- /dev/null +++ b/Formula/b/brightness.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "de0ebf57bf951ab4e90a8bb90eeb0ec659a696a7c2f10a5c32d269cceee44dce" + sha256 cellar: :any_skip_relocation, high_sierra: "08b29843308b1cd3603aba3f2e5e3d2e7dec34dbe62bdb5e506b7bacdcff8df5" + sha256 cellar: :any_skip_relocation, sierra: "edd4123953a961e94ce78b076b116c987f668ca73e0a67339e908ead6ded8441" + sha256 cellar: :any_skip_relocation, el_capitan: "675d9a1b7e39b75d2b569fa4f148fbc2342dbcd4a1b23045763c0103058ecc26" + 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..be827c42b795f --- /dev/null +++ b/Formula/b/briss.rb @@ -0,0 +1,25 @@ +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" + + 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..f3ac7ae1e5a22 --- /dev/null +++ b/Formula/b/brogue.rb @@ -0,0 +1,57 @@ +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_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..2e27b62ac670a --- /dev/null +++ b/Formula/b/brook.rb @@ -0,0 +1,35 @@ +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/v20250202.tar.gz" + sha256 "2ee6bf43345b2cbf883eeaa8350da161352610e4fee82c29b0d3411a3e761f1f" + license "GPL-3.0-only" + head "https://github.com/txthinking/brook.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "04547e268b88935b2c6101b9324126819adb599e795cabaa740e5fb04325c17f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "04547e268b88935b2c6101b9324126819adb599e795cabaa740e5fb04325c17f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "04547e268b88935b2c6101b9324126819adb599e795cabaa740e5fb04325c17f" + sha256 cellar: :any_skip_relocation, sonoma: "0a05d9d3eada57f63ca111712d411068bb691fd17ac588cf7444b26f386fa58d" + sha256 cellar: :any_skip_relocation, ventura: "0a05d9d3eada57f63ca111712d411068bb691fd17ac588cf7444b26f386fa58d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3686e17eb912d009421511ea22337970205595adc821891ffdee034d8d97642e" + 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..2e7badab2bb5a --- /dev/null +++ b/Formula/b/broot.rb @@ -0,0 +1,66 @@ +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.46.4.tar.gz" + sha256 "d0080fb6f959ca8978b3930513f72df7a6ef6bc9c204ff499458961c5671c67b" + license "MIT" + head "https://github.com/Canop/broot.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9d8324d2661d6c3791e69333b4ca5f618d7f72c7e2d3d2723f68a4a5097a0665" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0ee27a0462ca030af2e2a8940e72d221eded464ee4d993a5b9bbcb5b35c6911e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "750006211ada3176625e538cca4b92f2aa74caad64a6b990ce9db3343cb29873" + sha256 cellar: :any_skip_relocation, sonoma: "13735bdfac1c9db94b50f610096ee53a1e2048671fba8f18f6483447be0c2159" + sha256 cellar: :any_skip_relocation, ventura: "16f07c0b4136a8ad52d4fd470c3f7e06a32f69a6266490d69466724c26233651" + sha256 cellar: :any_skip_relocation, arm64_linux: "66b73baa6992bc8f5561836a930300e89b48acd7410b3879b61bdfb1181a2574" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6feeaa0dee66af7c6e0b00dda4e5b808a7ee9354c86c565ce0f2537029fb5711" + 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..f791fcf0c7716 --- /dev/null +++ b/Formula/b/brotli.rb @@ -0,0 +1,40 @@ +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.1.0.tar.gz" + mirror "http://fresh-center.net/linux/misc/brotli-1.1.0.tar.gz" + mirror "http://fresh-center.net/linux/misc/legacy/brotli-1.1.0.tar.gz" + sha256 "e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff" + license "MIT" + head "https://github.com/google/brotli.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "64750425b7578860d8b6a75fdb187408667f7d6523169e8dc29528bbc15309f0" + sha256 cellar: :any, arm64_sonoma: "e75e7d3e86aba0f1a48f59bab9d819dbdd52c22259fb893ff1e796ca4dc9be75" + sha256 cellar: :any, arm64_ventura: "531d7745ef045b6fe35a32f852d377a9bed6ea8a2c26828d8e18ce8388c1346e" + sha256 cellar: :any, sonoma: "8934e84777d1c6f63d6e4c07213731c9af1b7a66d5f0a6b3ef0bb6d56bb63a86" + sha256 cellar: :any, ventura: "59cbd7977b1e037c70d43e339dec2a8631d1360ceb4aa1f4a7780e2c4fef3540" + sha256 cellar: :any_skip_relocation, arm64_linux: "72028690302ef20e9dcf10cd6405a8d8b736688ebd4ad7203078ee57be0f92fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e1502cc6efe4e7b2835b1a8cb34536acee19d3c48ea3a440b57d88e5cab2ca81" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *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..aa6ff25db2ec4 --- /dev/null +++ b/Formula/b/brpc.rb @@ -0,0 +1,108 @@ +class Brpc < Formula + desc "Better RPC framework" + homepage "https://brpc.apache.org/" + url "https://dlcdn.apache.org/brpc/1.12.1/apache-brpc-1.12.1-src.tar.gz" + sha256 "6b315b33ae264e17e4f84bebbd4c3b7c313f5a64de7b398764c68a1dbb4a9e8e" + license "Apache-2.0" + revision 2 + head "https://github.com/apache/brpc.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c86f26c1c38a819ae9875ae8e9c985cc898461826bc6adca275b0cd2074cdaa2" + sha256 cellar: :any, arm64_sonoma: "a6913c404c189bd9907f5cf38dfe0599bca55fcf3bf27f7493d383b13e28e166" + sha256 cellar: :any, arm64_ventura: "10938cab9c5c7dbc3b4ba444546ac0afc70ec2ddd0bf764c6a544a9cc8a51501" + sha256 cellar: :any, sonoma: "933b746de19593b12e478e0b22de6fc99dc4ebb44b93720af8d2e033676b600b" + sha256 cellar: :any, ventura: "8b4af33b95c69d36cdb59c377ee5fd9642133efc74b5bbe1c5a290f7c4593258" + sha256 cellar: :any_skip_relocation, arm64_linux: "49563320f5d47eb394dd41fada916724e072402727186632a79a759913d7a52e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1520d89eae11d459791a62b4e2ea0864523e3cc08bc349666bda81faf31cc025" + end + + depends_on "cmake" => :build + depends_on "abseil" + depends_on "gflags" + depends_on "gperftools" + depends_on "leveldb" + depends_on "openssl@3" + depends_on "protobuf@29" + + on_linux do + depends_on "pkgconf" => :test + end + + # `GFLAGS_NS` build patch, upstream pr ref, https://github.com/apache/brpc/pull/2878 + patch do + url "https://github.com/apache/brpc/commit/cf6b81f9f7ab31626e942c2ef1b56432a242d1a1.patch?full_index=1" + sha256 "12c062d417e32a1810a8b223d5582748c2f3c4521864a2dd74575b4a10c4484d" + end + + def install + inreplace "CMakeLists.txt", "/usr/local/opt/openssl", + Formula["openssl@3"].opt_prefix + + # `leveldb` links with `tcmalloc`, so should `brpc` and its dependents. + # Fixes: src/tcmalloc.cc:300] Attempt to free invalid pointer 0x143e0d610 + inreplace "CMakeLists.txt", "-DNO_TCMALLOC", "" + tcmalloc_ldflags = "-L#{Formula["gperftools"].opt_lib} -ltcmalloc" + ENV.append "LDFLAGS", tcmalloc_ldflags + inreplace "cmake/brpc.pc.in", /^Libs:(.*)$/, "Libs:\\1 #{tcmalloc_ldflags}" + + args = %w[ + -DBUILD_SHARED_LIBS=ON + -DBUILD_UNIT_TESTS=OFF + -DDOWNLOAD_GTEST=OFF + -DWITH_DEBUG_SYMBOLS=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 + #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"] + gperftools = Formula["gperftools"] + flags = %W[ + -I#{include} + -I#{protobuf.opt_include} + -L#{lib} + -L#{protobuf.opt_lib} + -L#{gperftools.opt_lib} + -lbrpc + -lprotobuf + -ltcmalloc + ] + # 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..d181974f86699 --- /dev/null +++ b/Formula/b/bruno-cli.rb @@ -0,0 +1,30 @@ +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.3.0.tgz" + sha256 "c7e6aa0ab54a344ac4da106cbeb49b7ab9c85878902c983ed2882e8450922c7f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "65f7119eea1e8e383a59d99ce89c8bb3ba91f0282981a337d5491ef86590f153" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "65f7119eea1e8e383a59d99ce89c8bb3ba91f0282981a337d5491ef86590f153" + sha256 cellar: :any_skip_relocation, arm64_ventura: "65f7119eea1e8e383a59d99ce89c8bb3ba91f0282981a337d5491ef86590f153" + sha256 cellar: :any_skip_relocation, sonoma: "b365db60f801d4f83ac0a38ae2f870e5d2fb1ab2ac128e8ee1d46691d099fedf" + sha256 cellar: :any_skip_relocation, ventura: "b365db60f801d4f83ac0a38ae2f870e5d2fb1ab2ac128e8ee1d46691d099fedf" + sha256 cellar: :any_skip_relocation, arm64_linux: "65f7119eea1e8e383a59d99ce89c8bb3ba91f0282981a337d5491ef86590f153" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65f7119eea1e8e383a59d99ce89c8bb3ba91f0282981a337d5491ef86590f153" + 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/bsdconv.rb b/Formula/b/bsdconv.rb new file mode 100644 index 0000000000000..334f4ae9201e2 --- /dev/null +++ b/Formula/b/bsdconv.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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 mojave: "8ae3048037104e7a91ffd76ff6ef1910c8252d050e98b03e4083841525d19a0c" + 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..6403def733d5b --- /dev/null +++ b/Formula/b/bsdiff.rb @@ -0,0 +1,62 @@ +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 + + bottle do + 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 cellar: :any_skip_relocation, mojave: "bca20f48516a5fe4afed7ed045a787e6976ff665b483ffe5719a652555f3be22" + sha256 cellar: :any_skip_relocation, high_sierra: "3624be48c026da2a0ade8316548296ec4b2b100a0b9914acb77124374c9be0d2" + sha256 cellar: :any_skip_relocation, sierra: "c21cd31202c096b99788346b22a3aeaddd72b397b2ae6cbd971926ba93d9f541" + sha256 cellar: :any_skip_relocation, el_capitan: "4b4e2e68dc5ffa9a5fc02b6c59c4d8201d8d6df8d5e6aef5bd70854ecbe917b7" + 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/b/bsdmake.rb b/Formula/b/bsdmake.rb new file mode 100644 index 0000000000000..6d2fe98ca3e34 --- /dev/null +++ b/Formula/b/bsdmake.rb @@ -0,0 +1,83 @@ +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"] + + bottle do + rebuild 2 + 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/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 + 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..346ef63b32edf --- /dev/null +++ b/Formula/b/bsdsfv.rb @@ -0,0 +1,55 @@ +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" + + bottle do + 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, mojave: "e500396c1a26993727df9ccc8d878e0a4fbc353326206dffcbd18b9fc8071247" + sha256 cellar: :any_skip_relocation, high_sierra: "28bee35fbc8c0be9e1182287c58340898d29d9ba0f910109974af6efcb5cd61f" + sha256 cellar: :any_skip_relocation, sierra: "38b9d278b430e250b384c5ba2baf3e74dfe0771c5ceea45686022ecb01616ee2" + sha256 cellar: :any_skip_relocation, el_capitan: "404ec03e044a019a487adfab90012a29a6655fe67b907d9b4e9a46d4f6c57a9b" + 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/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/btop.rb b/Formula/b/btop.rb new file mode 100644 index 0000000000000..f2c4459874ada --- /dev/null +++ b/Formula/b/btop.rb @@ -0,0 +1,83 @@ +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.3.tar.gz" + sha256 "81b133e59699a7fd89c5c54806e16452232f6452be9c14b3a634122e3ebed592" + license "Apache-2.0" + head "https://github.com/aristocratos/btop.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "489cced3f7450b6cea1f2261a91ecfbdf1bac5d34345a048493eb3dddeacc851" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b96231c24642d19ff74812f602d6bc01c968feb68bd02cdd5e2989ef757fd0c0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f915571ec57b88e6cf019b23f29bddb8dbe4826cfac1f5497936bbca0d1d4b15" + sha256 cellar: :any_skip_relocation, sonoma: "807770d8ad61da28c1383494f66c464d003d3cf78cb0cc0caa84d34c5b384582" + sha256 cellar: :any_skip_relocation, ventura: "9c59b21f9b75682d4643d9d3feddc7c0d3e22f64bbca95ffa350520242246e1d" + sha256 cellar: :any_skip_relocation, arm64_linux: "1affce02155f1b2919633db263d0e3e4934148a514c7bcece6c1289da20d2a23" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97214938f020732369eb717dd8f967519d2131903f3cc10dd0041e6d1c0e1773" + 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..aa34fc7df5a44 --- /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" + + bottle do + 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, mojave: "d69b814282b1205eb311f2b8f1f2d0077e2adeef72c2a010084eec34ffef7b71" + sha256 cellar: :any, high_sierra: "92fe826bfbaed8583343dbae8d2cf51d6161658e8ecd44a4bf7a308ab1f06d61" + sha256 cellar: :any, sierra: "b31041f88e5253fd880d38190b4828f8c9cee34f141352d5c3b70b33e18d824f" + 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..9f17de282ece9 --- /dev/null +++ b/Formula/b/btpd.rb @@ -0,0 +1,39 @@ +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 + + bottle do + rebuild 1 + 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" + + 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..cf22c0683c45a --- /dev/null +++ b/Formula/b/btrfs-progs.rb @@ -0,0 +1,88 @@ +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.14.tar.xz" + sha256 "df5ab804fcb36e291c42ad8361f801ad1e10241b43bd304fe50ce3df9e7e3da1" + 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 + sha256 cellar: :any_skip_relocation, arm64_linux: "ea074d46c9fd6b3b35240ed9e3ad45026a0eed804941a491bb9245d59b46dc4f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6ba4dc9e3f31fe8b913337314c86f491211e2a46c36169e6644df1a68c8843f" + end + + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.13" => [: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.13") + 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..d3df10dbf99aa --- /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.54.0.tar.gz" + sha256 "e64786bd2f17dc3731dd30280cf1ba24e0781300ea0f781251ce98ce13142f49" + 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_sequoia: "9b49a6a017dba4db9f6afe82ad272d35060fd38b85530adf4d2f85879dfdac0e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b49a6a017dba4db9f6afe82ad272d35060fd38b85530adf4d2f85879dfdac0e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9b49a6a017dba4db9f6afe82ad272d35060fd38b85530adf4d2f85879dfdac0e" + sha256 cellar: :any_skip_relocation, sonoma: "8c0908117e694085d6800479432366e88b7c56d2f7f056906dc25d6cb8e6de54" + sha256 cellar: :any_skip_relocation, ventura: "8c0908117e694085d6800479432366e88b7c56d2f7f056906dc25d6cb8e6de54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a5d872ca116f3c62602eb1d2e6eef3f10814cb2c70c386724b2398e146df6e8" + 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..79bcba7dcbbba --- /dev/null +++ b/Formula/b/buffrs.rb @@ -0,0 +1,33 @@ +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.10.0.tar.gz" + sha256 "984d2097529ca9cdb24c6553cf55e1001275864462dd06a8de4f338c339a0fff" + license "Apache-2.0" + head "https://github.com/helsing-ai/buffrs.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d9dcd2934f709d778a9a12fe6501a4841458815d17c2742d2f26a23318b19018" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3f474f9b9da2353a86cdf6f03ef2303a27375c3e087a60bde11731d0636a754d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eac1b4cc09a3c34d2d01ec190bdb078c5131921b848d32705e9f9732046b51c4" + sha256 cellar: :any_skip_relocation, sonoma: "e0335f7c9a2f6355f7e3e641065364d41d00c8cdc0ca3be607b2d8cb6ab40388" + sha256 cellar: :any_skip_relocation, ventura: "876f21408b2551e6897802245642bd7d2e64f2d6481a059a38a4a37af20e663a" + sha256 cellar: :any_skip_relocation, arm64_linux: "c6ff45ce008244d621f237f1471d76def4c00d9c637e284f46128fc6b008dfe0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e43054ff1385d4a6fda830232e0d07b448bd2f2b577f6378c9f3cd7e6994558" + 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..7b8842fa1e096 --- /dev/null +++ b/Formula/b/build2.rb @@ -0,0 +1,90 @@ +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 + + bottle do + 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..8f0263aa8c668 --- /dev/null +++ b/Formula/b/buildapp.rb @@ -0,0 +1,39 @@ +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" + + bottle do + rebuild 2 + sha256 arm64_sequoia: "25eba8ba9388bbf422a7a5f14e2db9f1ea8d9e9add5cd58aecb3ea6a97f7eb83" + sha256 arm64_sonoma: "4cd0afa49db04a858b694e03cb247d5fc67b5c73b082725032364102b6e24973" + sha256 arm64_ventura: "41ce31edf3763b06c08acd06abfcfaecec13bfa0487d876ca37019f2aea85ead" + sha256 arm64_monterey: "071a97e829ed1ca27927b7bb4539a552cc1a26f671f83d23cad621ad13b3cb4a" + sha256 sonoma: "d54e9bdbef32deb80e6dcf9ad7089ae433e9594fd3fc8df6e1ae50065a8e2857" + sha256 ventura: "e74370d3c6b1367de4d8edcee76878f8a380d7728f43f18cf4e2b28d6acb609e" + sha256 monterey: "8c4d8793f2467b30a89079fd58099a79d331794d3667949736b91542279d1b6c" + sha256 arm64_linux: "2c2711b913dccab60c2f0273493426a2e98c007b736711685387a4b33423cf65" + sha256 x86_64_linux: "4642b29de810bdc8d7c9d5e1ea678c5f366dee7a3dd6ca48523dd36af4f559ea" + end + + depends_on "sbcl" + depends_on "zstd" + + def install + bin.mkpath + system "make", "install", "DESTDIR=#{prefix}" + end + + test do + # Fails in Linux CI with "Can't find sbcl.core" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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/b/buildifier.rb b/Formula/b/buildifier.rb new file mode 100644 index 0000000000000..01d8dea8aca32 --- /dev/null +++ b/Formula/b/buildifier.rb @@ -0,0 +1,29 @@ +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.0.tar.gz" + sha256 "444a9e93e77a45f290a96cc09f42681d3c780cfbf4ac9dbf2939b095daeb6d7d" + license "Apache-2.0" + head "https://github.com/bazelbuild/buildtools.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ece401b5a05fcfcfaa9d21658073e77464fa5ba226c8178b20828a78ffd9b3a3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ece401b5a05fcfcfaa9d21658073e77464fa5ba226c8178b20828a78ffd9b3a3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ece401b5a05fcfcfaa9d21658073e77464fa5ba226c8178b20828a78ffd9b3a3" + sha256 cellar: :any_skip_relocation, sonoma: "2c9a649a7e9f846df6da90a4d8fc6800a65d4f823055339e0eab46cca8561910" + sha256 cellar: :any_skip_relocation, ventura: "2c9a649a7e9f846df6da90a4d8fc6800a65d4f823055339e0eab46cca8561910" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7d7da0da0ea5b3d1cbb096c4061cb2af6d90eb166b33861face64521952d598" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0e93bb630101ed773b7440636a87f26b8132c8c17f4ca2a36b240f17ebffc5f" + 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..38410434dade0 --- /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.21.1", + revision: "66735c67040bc80e6ed104f451683e094030a4e1" + 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_sequoia: "731554175e0f92a73a1ac88f324089e3db7bb869d8dc8aaa7a133e97ad8c9224" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "731554175e0f92a73a1ac88f324089e3db7bb869d8dc8aaa7a133e97ad8c9224" + sha256 cellar: :any_skip_relocation, arm64_ventura: "731554175e0f92a73a1ac88f324089e3db7bb869d8dc8aaa7a133e97ad8c9224" + sha256 cellar: :any_skip_relocation, sonoma: "727039dd62444969ecbcc39b73e8c4fd3776e95f8124dfc4a42c98934391ae01" + sha256 cellar: :any_skip_relocation, ventura: "727039dd62444969ecbcc39b73e8c4fd3776e95f8124dfc4a42c98934391ae01" + sha256 cellar: :any_skip_relocation, x86_64_linux: "433a2fc97d48936e550a4851422676ed470c4c400f1e836fbe5e1235313f8165" + 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..5bf78ac062e9a --- /dev/null +++ b/Formula/b/buildozer.rb @@ -0,0 +1,33 @@ +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.0.tar.gz" + sha256 "444a9e93e77a45f290a96cc09f42681d3c780cfbf4ac9dbf2939b095daeb6d7d" + license "Apache-2.0" + head "https://github.com/bazelbuild/buildtools.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0909649729dafea5fd0ccb91e8b3590f6a63558f24be5632bfcddc22ebba445c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0909649729dafea5fd0ccb91e8b3590f6a63558f24be5632bfcddc22ebba445c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0909649729dafea5fd0ccb91e8b3590f6a63558f24be5632bfcddc22ebba445c" + sha256 cellar: :any_skip_relocation, sonoma: "5b9ee400118b5281b8ec095d934d8ebc18c167d186091919307b304bc6a33717" + sha256 cellar: :any_skip_relocation, ventura: "5b9ee400118b5281b8ec095d934d8ebc18c167d186091919307b304bc6a33717" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab44ac0ff398a7fe9b123b9adb8b7bb0c8986f87e6a4969323894e317b510946" + sha256 cellar: :any_skip_relocation, x86_64_linux: "808243719a5649c11847ba0da7d12263b12be182f7b1a1163c18a1e4bf106e7e" + 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..1e381dbd478e4 --- /dev/null +++ b/Formula/b/buildpulse-test-reporter.rb @@ -0,0 +1,41 @@ +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 "4235de52b6068f9f3d2d04f3b43ca8d2de1d1e421ae3cfbcdbcef2629d9b8263" + license "MIT" + head "https://github.com/buildpulse/test-reporter.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cb3e526cd4bab198e54e8c9fe74f399236a7acd7e367e3cd256bc76d9b32682d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb3e526cd4bab198e54e8c9fe74f399236a7acd7e367e3cd256bc76d9b32682d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cb3e526cd4bab198e54e8c9fe74f399236a7acd7e367e3cd256bc76d9b32682d" + sha256 cellar: :any_skip_relocation, sonoma: "ce5fac61ab3bdf6a12a4e4f6bebea5c28b84af09d9669b8179cf9562b8181f98" + sha256 cellar: :any_skip_relocation, ventura: "ce5fac61ab3bdf6a12a4e4f6bebea5c28b84af09d9669b8179cf9562b8181f98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81c223352eed836b439d1ab44e7f3d807f738a1f762d095e7f51f7644a53fa1a" + 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..45f557b2830df --- /dev/null +++ b/Formula/b/buku.rb @@ -0,0 +1,237 @@ +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/refs/tags/v5.0.tar.gz" + sha256 "87e226b0062a17cb10bf02a6cefea08e859d74985e373b76496150ecda92d73e" + license "GPL-3.0-or-later" + revision 1 + head "https://github.com/jarun/buku.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9596441b80dedb61bc7cd57743e861cf781966c4530e15731def2e8d223f0e65" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "032d6166f20300d2e6e3e9cf28080b76c3ee563ba93eeeabdf95380df4bbd3a6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d69cb7fb9ff02fba5712ba14a70a60713ea36a3ca9879754bf424b8bb11f7a4d" + sha256 cellar: :any_skip_relocation, sonoma: "6449b6131564ab87bba0e55613b8a8522ddce74558c6d8145365998004a3daf5" + sha256 cellar: :any_skip_relocation, ventura: "725dacb1ff25d9d8035b19907b816d79407354f5d8269e463214fe81411f393f" + sha256 cellar: :any_skip_relocation, arm64_linux: "7c8acec3e9ff92fb5fbc6e5202494ac09b0626880d043a83986c7c170bac9664" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e803486c3a74df43a88a09df4d631a2b853dc3bfc4a8ac6ce78fa34fb5935f2" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + uses_from_macos "libffi" + + 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/d8/e4/0c4c39e18fd76d6a628d4dd8da40543d136ce2d1752bd6eeeab0791f4d6b/beautifulsoup4-4.13.4.tar.gz" + sha256 "dbb3c4e1ceae6aefebdaf2423247260cd062430a410e38c66f2baa50a8437195" + 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/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + end + + resource "flask" do + url "https://files.pythonhosted.org/packages/c0/de/e47735752347f4128bcf354e0da07ef311a78244eba9e3dc1d4a5ab21a98/flask-3.1.1.tar.gz" + sha256 "284c7b8f2f58cb737f0cf1c30fd7eaf0ccfcde196099d24ecede3fc2005aa59e" + 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" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/3f/f4/4a80cd6ef364b2e8b65b15816a843c0980f7a5a2b4dc701fc574952aa19f/soupsieve-2.7.tar.gz" + sha256 "ad282f9b6926286d2ead4750552c8a6142bc4c783fd66b0293547c8fe6ae126a" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/a9/60/47d92293d9bc521cd2301e423a358abfac0ad409b3a1606d8fbae1321961/types_python_dateutil-2.9.0.20241206.tar.gz" + sha256 "18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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..a875b239af997 --- /dev/null +++ b/Formula/b/bulk_extractor.rb @@ -0,0 +1,64 @@ +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 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1193b1587c9351fb7c3339252cc5962de2b0c7488cb03a77d16483227deafb49" + sha256 cellar: :any, arm64_sonoma: "d076c3c6ce906ef9136700601f34b51f720d3fc50d96ad04b578dcafa041c4d9" + sha256 cellar: :any, arm64_ventura: "90bd56b74f11074cc420af7df33a15435cd46071eabaad0c7c081b7a225b83ae" + sha256 cellar: :any, arm64_monterey: "2bc48e662bd411bdaf258a34e214b00b6ee80f60904c8d846472610b798cbe67" + sha256 cellar: :any, sonoma: "fa9d38135e6b10cdfeec2a55a259a936ba7fb8468ec91ab952edef37d46fdec2" + sha256 cellar: :any, ventura: "e0d758881ed2de967484c0ab5ddf5bf815af8beed5c7cb52b5d434b1e762ee18" + sha256 cellar: :any, monterey: "c68a03087991b70830a1d0fe79fdb7886767841335aebbee7060d8faf6e7f7ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "94609cf0c6e13e921c0a8237a992ba1ed6ea556a0e3a5db7ce6c306da807f092" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce9af040a2bc16c10f0752d4d78261753b076986d4b5a7ee420a8cca72b46cd1" + 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 + depends_on "openssl@3" + depends_on "re2" + + uses_from_macos "flex" => :build + uses_from_macos "expat" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + 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..8464c636be016 --- /dev/null +++ b/Formula/b/bullet.rb @@ -0,0 +1,114 @@ +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" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_sequoia: "97aeccf39592bcf03e7dd07b5339ec03b11345137a8e0872288bb8deff702c6b" + sha256 cellar: :any, arm64_sonoma: "367a1f5cdab325d50b7c6ef7b46782d578bb7c0f0dac9f233e2b1779c91feb4a" + sha256 cellar: :any, arm64_ventura: "c69182f86bc7b5a3407cbee2b2fae2ed2a4959b766d1fb22408d3acf30e1400c" + sha256 cellar: :any, sonoma: "6e4a848bf66030dac19ff6dd0677df1ed6f9d46e55d3a6ed3ce14ba63a97404f" + sha256 cellar: :any, ventura: "c039c3d01c76f8871b82a55ecc4ab41598e14fae12819f74f9544d2b80a1a904" + sha256 cellar: :any_skip_relocation, arm64_linux: "81e0edf216d5e0d24934cbb44c7becb7a3c1b7bef8d220496b7e4d5f0b754148" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a755ae748428c5dfff82e6a4d57b81fbb4759fd494837d07b4535c0e88f3a16" + end + + depends_on "cmake" => :build + depends_on "numpy" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "python@3.13" => [:build, :test] + + def python3 + "python3.13" + 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") + + 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..282087e89c648 --- /dev/null +++ b/Formula/b/bump-my-version.rb @@ -0,0 +1,174 @@ +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/13/0a/544e8eb6d46baa99bf16d180b4ddb4509631fa8476e686c8e6c47681afb4/bump_my_version-1.1.2.tar.gz" + sha256 "0122845a78502b5a5a635ca17c1efb3e1ec05e77d72d13b2314186b9806882fb" + license "MIT" + revision 1 + head "https://github.com/callowayproject/bump-my-version.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "dabd1f3b541b3761f0346c9dcaf84699edfcf370d8f4b2cf62c50f9b67e2b739" + sha256 cellar: :any, arm64_sonoma: "9c418bef1d864dd40c41c4071cb6296db118d749f3dc8aa9249a30301d2deeb6" + sha256 cellar: :any, arm64_ventura: "236ad9f0bcad213d13b242fb4aedcea8053c7ad27133ab87b00a237d4ec339ff" + sha256 cellar: :any, sonoma: "d1f62da5dd32593c58a715ddba2f8d0a6308d0cdea80493f5ce67b2c031d7285" + sha256 cellar: :any, ventura: "2df17298f6344743445d007d1fbcfc9bf2da1904e796e1659709399483fb3190" + sha256 cellar: :any_skip_relocation, arm64_linux: "337a0f0e726a151055c3ded41e4cd878f5dab8ca07a0196dc06b82ba2f2f82b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e4a1f0c3d51ef8a235791514b92c2f2f24c142ffc52c8f151099f6bb5441b24" + end + + depends_on "rust" => :build # for pydantic_core + depends_on "python@3.13" + + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "bracex" do + url "https://files.pythonhosted.org/packages/d6/6c/57418c4404cd22fe6275b8301ca2b46a8cdaa8157938017a9ae0b3edf363/bracex-2.5.post1.tar.gz" + sha256 "12c50952415bfa773d2d9ccb8e79651b8cdb1f31a42f6091b804f6ba2b4a66b6" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/e8/9e/c05b3920a3b7d20d3d3310465f50348e5b3694f4f88c6daf736eef3024c4/certifi-2025.4.26.tar.gz" + sha256 "0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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 "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 "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/bb/6e/9d084c929dfe9e3bfe0c6a47e31f78a25c54627d64a66e884a8bf5474f1c/prompt_toolkit-3.0.51.tar.gz" + sha256 "931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + 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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/88/2c/7bb1416c5620485aa793f2de31d3df393d3686aa8a8506d11e10e13c5baf/python_dotenv-1.1.0.tar.gz" + sha256 "41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5" + end + + resource "questionary" do + url "https://files.pythonhosted.org/packages/a8/b8/d16eb579277f3de9e56e5ad25280fab52fc5774117fb70362e8c2e016559/questionary-2.1.0.tar.gz" + sha256 "6302cdd645b19667d8f6e6634774e9538bfcd1aad9be287e743d96cacaf95587" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "rich-click" do + url "https://files.pythonhosted.org/packages/a6/7a/4b78c5997f2a799a8c5c07f3b2145bbcda40115c4d35c76fbadd418a3c89/rich_click-1.8.8.tar.gz" + sha256 "547c618dea916620af05d4a6456da797fbde904c97901f44d2f32f89d85d6c84" + 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/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "wcmatch" do + url "https://files.pythonhosted.org/packages/41/ab/b3a52228538ccb983653c446c1656eddf1d5303b9cb8b9aef6a91299f862/wcmatch-10.0.tar.gz" + sha256 "e72f0de09bba6a04e0de70937b0cf06e55f36f37b3deb422dfaf854b867b840a" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"bump-my-version", shells: [:fish, :zsh], 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" + version_file.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..21a06e8382a3e --- /dev/null +++ b/Formula/b/bumpversion.rb @@ -0,0 +1,47 @@ +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" + + 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..b1c07cac84093 --- /dev/null +++ b/Formula/b/bundler-completion.rb @@ -0,0 +1,26 @@ +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 + + 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..b558339d9a410 --- /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.1/bundletool-all-1.18.1.jar" + sha256 "675786493983787ffa11550bdb7c0715679a44e1643f3ff980a529e9c822595c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "843b903ef2ad7ef567cab88ed40b77e51309afa188a8d0a6b48a93683cffa16d" + 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/bup.rb b/Formula/b/bup.rb new file mode 100644 index 0000000000000..a3e4613dec612 --- /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.7.tar.gz" + sha256 "03bf3c02ee6912d9f2e017e488625948818efc8538bbc6a7d6a993fbdee709a4" + license all_of: ["BSD-2-Clause", "LGPL-2.0-only"] + head "https://github.com/bup/bup.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "190deba7059ec4e0fabef2a19d2e505538f19d72c8e7b0b7e19c640d02cc07b4" + sha256 cellar: :any, arm64_sonoma: "7c0fcc1869f7bbbd04817e038c93bf112343e2c350899eb42e5c7f1cb76a1738" + sha256 cellar: :any, arm64_ventura: "bf776628703118c1778d0d65a7e63d916afd13db57645d65747933e33c3f2390" + sha256 cellar: :any, sonoma: "75c558710f3d49f210a251824ffd22ff52c786bcea59cb95849b10ec1263f201" + sha256 cellar: :any, ventura: "2f88d8a0073a46e7ae72300251ef2c504823f09a96ac7cb353d97b4ccb2dbd96" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a403d35dc2c5d4d5f466bcbc45e9d302f7727ee089efa324f347ffb29cf5892" + sha256 cellar: :any_skip_relocation, x86_64_linux: "31d618a8be5d4085a9e72e429e9e3156e1467944be7a49f83e491e258b9d9f0f" + end + + depends_on "pandoc" => :build + depends_on "pkgconf" => :build + + depends_on "python@3.13" + depends_on "readline" + + on_linux do + depends_on "acl" + end + + def python3 + which("python3.13") + 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..37c8d8356d70b --- /dev/null +++ b/Formula/b/bupstash.rb @@ -0,0 +1,49 @@ +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_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..d1328b50e9400 --- /dev/null +++ b/Formula/b/burp.rb @@ -0,0 +1,101 @@ +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 + + bottle do + 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/burst.rb b/Formula/b/burst.rb new file mode 100644 index 0000000000000..f06088a6babd8 --- /dev/null +++ b/Formula/b/burst.rb @@ -0,0 +1,61 @@ +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" + + 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..9847158ce8891 --- /dev/null +++ b/Formula/b/busted.rb @@ -0,0 +1,46 @@ +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_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..35cface9c6189 --- /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.23.0.tar.gz" + sha256 "f47c15f605736aaeee20fab290a4f727c8296e4c514ca2d18c0d938ad6c1960d" + 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_sequoia: "b67439526a0cb6bf11b8229ba2f897823e5743d2608ce2aa180279cb806b636f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b67439526a0cb6bf11b8229ba2f897823e5743d2608ce2aa180279cb806b636f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b67439526a0cb6bf11b8229ba2f897823e5743d2608ce2aa180279cb806b636f" + sha256 cellar: :any_skip_relocation, sonoma: "2629f827357fa868400dd45037a9ef92aeca40c8b2f160916e2aa44175cb9c53" + sha256 cellar: :any_skip_relocation, ventura: "2629f827357fa868400dd45037a9ef92aeca40c8b2f160916e2aa44175cb9c53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38a63ec4b5ece62c1a27435f06232ebf6e6c118dec2e6ea96fbbaf5d7625e877" + 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..6f19fe677ddc7 --- /dev/null +++ b/Formula/b/bvi.rb @@ -0,0 +1,37 @@ +class Bvi < Formula + desc "Vi-like binary file (hex) editor" + homepage "https://bvi.sourceforge.net/" + url "https://downloads.sourceforge.net/project/bvi/bvi/1.4.2/bvi-1.4.2.src.tar.gz" + sha256 "4bba16c2b496963a9b939336c0abcc8d488664492080ae43a86da18cf4ce94f2" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "155c163fed69d7c9468c119e2714fbf9cf0ddaa1a6af01efb6932127ce08ec11" + sha256 arm64_sonoma: "72f5bcbe7c2d3b197378232499cb50417317569deaa681cc4d96bb470c5e4bc4" + sha256 arm64_ventura: "9ecba9b40b9d8684f4f0e60ec9a75b25b4eae26064a1eabf44d23d6a1476f17d" + sha256 arm64_monterey: "a429b07fde21a16b3fb9352affee6ff4f8687f791e552e8fb1555ff762e620d0" + sha256 arm64_big_sur: "a00ec7c79ca7cf4e51681b426345a49a9ea94496086535e4a6e561a06a74af3f" + sha256 sonoma: "93b63e12ae36f866a493746a75f3087c3b936e47e0cb23032388470a94b355a3" + sha256 ventura: "e364c299057027e146cf7cd1679636ad001baf22f0eef95af5522508015ffb7e" + sha256 monterey: "36075283de952bc4eed2c3a24e8836352356c89d2d9ca4626c05b7ad8b4e8c1a" + sha256 big_sur: "e3862607efcfcf5a04da6b8bccfe6ad539866ceed49bb186e6d345c3e77d353f" + sha256 arm64_linux: "86cf2dff41dbd3be743b94df63db9cb7488bb6f7bb03e8104ab238e8c7e3c44e" + sha256 x86_64_linux: "77dc1f016b3d7d4ac604688521fe4f49938af1a7c0fd783181e6199deb2af0d7" + 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..b63d173206fe0 --- /dev/null +++ b/Formula/b/bwa.rb @@ -0,0 +1,39 @@ +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_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..03051ab60574e --- /dev/null +++ b/Formula/b/bwfmetaedit.rb @@ -0,0 +1,37 @@ +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/BWFMetaEdit_CLI_25.04_GNU_FromSource.tar.xz" + sha256 "4e7f4606bc83829a9ac1742c10d0e5d730da2189cfcb8cab9b739211e094ce75" + 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_sequoia: "ada25a119a8c8c7e44971889d228b77bc2f09062eb5dcdc6671dbb8cd0ee5a8c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f1d559f8aa1a0134eb6be9263845ca2ce2e0e1b5be84d8eb99a3bb684a74b4be" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b46ff3c597d15626a9b43b0e7ee92426e9cb4e9c68422f98d6ad7f8e8f35e071" + sha256 cellar: :any_skip_relocation, sonoma: "d39509378a55eb0278668436faaac2274a9d702488180300c8ed17880335f362" + sha256 cellar: :any_skip_relocation, ventura: "f7e1e0fe0fd5c8982325e0208d55b0cb2f68235d4ed4cf01c47ecb93b138dfad" + sha256 cellar: :any_skip_relocation, arm64_linux: "8abba81e78de3d8dc5512552bec11d7d5fead6598266f7f8a4f9a3469343999b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66f8c9ff2de246093fd6829c4a80d56ad06e6d3e5ef5381949b50f1248fd36d7" + 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..7dc3fc3257abc --- /dev/null +++ b/Formula/b/bwm-ng.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, mojave: "34ce809be16ab1eef9106643f22ff223a8da78a6c8336bd86e14dd41dccbec09" + 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..e558fbe4a36a6 --- /dev/null +++ b/Formula/b/byacc.rb @@ -0,0 +1,32 @@ +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_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..17965667d9f85 --- /dev/null +++ b/Formula/b/byobu.rb @@ -0,0 +1,53 @@ +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" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "cf3d8aef3bbd52b3dadb87d50cfb8962d46c1bef4381b9260e65b0783c2618fd" + 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..e9a887230b213 --- /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.25/byteman-download-4.0.25-bin.zip" + sha256 "9c76a2f7024c6be951a5d3ec2856171cbefa63310a295309b2e8332e3d5b595f" + 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: "9d0503439e03b0c8fa1116d1dd3d259add898833d8b6a5a97f5a3a44048f71f1" + 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..cea52375a047d --- /dev/null +++ b/Formula/b/bzip2.rb @@ -0,0 +1,71 @@ +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 + + bottle do + rebuild 2 + 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..1782bfcd3b3cc --- /dev/null +++ b/Formula/b/bzip3.rb @@ -0,0 +1,34 @@ +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.2/bzip3-1.5.2.tar.gz" + sha256 "9d10092a3842378e6d0b16992ee49f711304d88eb4efac80440338184d4b6276" + license "LGPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ad8bae59027a6b9d3a3d8aa759c6586a43204e66e23938a51f1ff7f66587b3c7" + sha256 cellar: :any, arm64_sonoma: "e2380b06a3a38d6a312d8abbf70ade17cd7127c357055756552213d25195709c" + sha256 cellar: :any, arm64_ventura: "d20858e93f7d71dbd465b49c25c29b9bd59c3a572846599df1253ee7e7e1729a" + sha256 cellar: :any, sonoma: "d2a113243e5510ae45b8080250b844847f1fde3bb1df66373a1cdd658be56cac" + sha256 cellar: :any, ventura: "4ab6f2e55319729e67acaf179395228ec7cc191f87d2e78886c0753fc1725880" + sha256 cellar: :any_skip_relocation, arm64_linux: "b63f8228410a4cf5ae10f594eec3f18d5697b1bfa5f70b57254b8944d9eb79d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1703e4aa6739acac3188b2d7f3c5881f9fd2562351ee6752f16af96c2efd82cc" + 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..bc0b6adc4498e --- /dev/null +++ b/Formula/b/bzt.rb @@ -0,0 +1,292 @@ +class Bzt < Formula + include Language::Python::Virtualenv + + desc "BlazeMeter Taurus" + homepage "https://gettaurus.org/" + url "https://files.pythonhosted.org/packages/89/68/79ef0e906c3b97405e98facacf49b71d445334480dec0ef99a9d54901837/bzt-1.16.42.tar.gz" + sha256 "b7458646f20ee46f0195622bbdadffc2f791df7b39c68a6fdb04febb2ba39a19" + license "Apache-2.0" + head "https://github.com/Blazemeter/taurus.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c9067847d79ec0f6077e60b5d4e663fc4536d5ff00d82103ccb49b3e01524d0c" + sha256 cellar: :any, arm64_sonoma: "e195b17db08ebe5883027a4dd597ad70e47e381838eb3a000997939f73af635d" + sha256 cellar: :any, arm64_ventura: "d9ded46afdacec1f5caf288f45663fcd7e4455f7f7c0ec502a269189538f2bb9" + sha256 cellar: :any, sonoma: "6e99a620103918529c737c403e4c1fbb71a804b3a6c45f4333e5a52f0c5c4584" + sha256 cellar: :any, ventura: "496953ee3f6b86b5e37153b6f9af8701fdefc85cb45dac544184cd7481c26d25" + sha256 cellar: :any_skip_relocation, arm64_linux: "cdc512e6d32bc0a059e7be4b6bf7b85692b51f35cce349dedd16fbf66a8ba1e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fbf3af0d0459a2927e972fd27340f396b36f8228fe901d279d51fa972fadce9c" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "certifi" + depends_on "libyaml" + depends_on "numpy" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + # setuptools resource must be manually bumped to a current version until it is no longer pinned upstream: + # https://github.com/Blazemeter/taurus/blob/7e511f0869f3170779aad3ae54fa177493335abb/requirements.txt#L21-L23 + 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/63/e7/fa1a8c00e2c54b05dc8cb5d1439f627f7c267874e3f7bb047146116020f9/aiohttp-3.11.18.tar.gz" + sha256 "ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + 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/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "colorlog" do + url "https://files.pythonhosted.org/packages/d3/7a/359f4d5df2353f26172b3cc39ea32daa39af8de522205f512f458923e677/colorlog-6.9.0.tar.gz" + sha256 "bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2" + 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/cf/f7/db37a613aec5abcd51c8000a386a701ac32e94659aa03fa69c3e5c19b149/cython-3.1.0.tar.gz" + sha256 "1097dd60d43ad0fff614a57524bfd531b35c13a907d13bee2cc2ec152e6bf4a1" + 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/ee/f4/d744cba2da59b5c1d88823cf9e8a6c74e4659e2b27604ed973be2a0bf5ab/frozenlist-1.6.0.tar.gz" + sha256 "b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68" + 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/22/d1/bbc4d251187a43f69844f7fd8941426549bbe4723e8ff0a7441796b0789f/humanize-4.12.3.tar.gz" + sha256 "8430be3a615106fdfceb0b2c1b41c4c98c6b0fc5cc59663a5539b111dd325fb0" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + 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/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + 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/bb/6e/9d084c929dfe9e3bfe0c6a47e31f78a25c54627d64a66e884a8bf5474f1c/prompt_toolkit-3.0.51.tar.gz" + sha256 "931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + 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/3c/9d/8492fbde3d4cb0e052de8a91a09754f222b5093f0342ef2dac92d60c751f/python_engineio-4.12.1.tar.gz" + sha256 "9f2b5a645c416208a9c727254316d487252493de52bee0ff70dc29ca9210397e" + end + + resource "python-socketio" do + url "https://files.pythonhosted.org/packages/21/1a/396d50ccf06ee539fa758ce5623b59a9cb27637fc4b2dc07ed08bf495e77/python_socketio-5.13.0.tar.gz" + sha256 "ac4e19a0302ae812e23b712ec8b6427ca0521f7c582d6abb096e36e24a263029" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "rapidfuzz" do + url "https://files.pythonhosted.org/packages/ed/f6/6895abc3a3d056b9698da3199b04c0e56226d530ae44a470edabf8b664f0/rapidfuzz-3.13.0.tar.gz" + sha256 "d2eaf3839e52cbcc0accbe9817a67b4b0fcf70aaeb229cfddc1c28061f9ce5d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/9e/8b/dc1773e8e5d07fd27c1632c45c1de856ac3dbf09c0147f782ca6d990cf15/setuptools-80.7.1.tar.gz" + sha256 "f6ffc5f0142b1bd8d0ca94ee91b30c0ca862ffd50826da1ea85258a06fd94552" + 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 "terminaltables" do + url "https://files.pythonhosted.org/packages/f5/fc/0b73d782f5ab7feba8d007573a3773c58255f223c5940a7b7085f02153c3/terminaltables-3.1.10.tar.gz" + sha256 "ba6eca5cb5ba02bba4c9f4f985af80c54ec3dccf94cfcd190154386255e47543" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/dd/19/9e5c8b813a8bddbfb035fa2b0c29077836ae7c4def1a55ae4632167b3511/urllib3-1.26.17.tar.gz" + sha256 "24d6a242c28d29af46c3fae832c36db3bbebcc533dd1bb549172cd739c82df21" + end + + resource "urwid" do + url "https://files.pythonhosted.org/packages/98/21/ad23c9e961b2d36d57c63686a6f86768dd945d406323fb58c84f09478530/urwid-2.6.16.tar.gz" + sha256 "93ad239939e44c385e64aa00027878b9e5c486d59e855ec8ab5b1e1adcdb32a2" + 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 "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/62/51/c0edba5219027f6eab262e139f73e2417b0f4efffa23bf562f6e18f76ca5/yarl-1.20.0.tar.gz" + sha256 "686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307" + 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 + 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 226d8364700d1..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/v2.0.0.tar.gz" - sha256 "c7ebc5650e7d5d8945fc004056bffea06e8278e54053b3dacd2d2daaac242565" - - bottle do - cellar :any_skip_relocation - sha256 "12f9cb755703e43d3cd9a0cb0fe180f523957f938a9ad2230ce4b331055ef131" => :catalina - sha256 "eb1b00f5b35be71648ba4ad3c5aac6d4e784e198995a2fc2b0f65541e249a3d7" => :mojave - sha256 "7ecf4f59a02475ac05c13a3d2354c1253ca09367d4d007b639b06640a432dc79" => :high_sierra - end - - depends_on "python@3.8" - - conflicts_with "boost-build", :because => "both install `b2` binaries" - - def install - venv = virtualenv_create(libexec, Formula["python@3.8"].opt_bin/"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 0fff94cf8cd40..0000000000000 --- a/Formula/b2sum.rb +++ /dev/null @@ -1,31 +0,0 @@ -class B2sum < Formula - desc "BLAKE2 b2sum reference binary" - homepage "https://github.com/BLAKE2/BLAKE2" - url "https://github.com/BLAKE2/BLAKE2/archive/20190724.tar.gz" - sha256 "7f2c72859d462d604ab3c9b568c03e97b50a4052092205ad18733d254070ddc2" - - bottle do - cellar :any_skip_relocation - sha256 "339b959eb5c2cbc8c26a39022937ea27b7911ff1c9f0611c3f2ac1595f5b0e50" => :catalina - sha256 "905b975371fd88632649e08f732ff25277cd1fd4b584dbc3e4914bcb08f85cd8" => :mojave - sha256 "129dbe4d91bf7843a40399b392b3ddc2448e56c249a45567bd9193e4fb722b37" => :high_sierra - end - - conflicts_with "coreutils", :because => "both install `b2sum` binaries" - - 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/b3sum.rb b/Formula/b3sum.rb deleted file mode 100644 index eadead172e07a..0000000000000 --- a/Formula/b3sum.rb +++ /dev/null @@ -1,30 +0,0 @@ -class B3sum < Formula - desc "The BLAKE3 cryptographic hash function" - homepage "https://github.com/BLAKE3-team/BLAKE3" - url "https://github.com/BLAKE3-team/BLAKE3/archive/0.3.4.tar.gz" - sha256 "64028224507b568a677919ef6577debe30c959a147c66cd94cdf84f7f6b33e5d" - - bottle do - cellar :any_skip_relocation - sha256 "ca1b6befbfcc0f9b29988734eb9e7f4a4733f93eaad4fd044979dd92b6e7db27" => :catalina - sha256 "ffa534e58550dd15036ab9cffc692b1d1fac2fe8cd2f69edda255e056169c927" => :mojave - sha256 "1b12778aa33337ea2212e925fb0779a15b0eac8d939a5c402e8271ea91e12815" => :high_sierra - 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/b43-fwcutter.rb b/Formula/b43-fwcutter.rb deleted file mode 100644 index 4d2c668265f2b..0000000000000 --- a/Formula/b43-fwcutter.rb +++ /dev/null @@ -1,31 +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 - rebuild 1 - sha256 "ba4d98184260e69c16c721c905e281f8638a34f8785ce43216093afb55305f22" => :catalina - sha256 "0f3c2998b168c9f614f5b28e1e219acada8cdd86018706fe30c46a9b0850d73e" => :mojave - sha256 "59c187f34c0f3e3eb99e7da175fcec4bc69cd4baea62e053898c985bef63ecf5" => :high_sierra - 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 3d70308b22084..0000000000000 --- a/Formula/babel.rb +++ /dev/null @@ -1,46 +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/core/-/core-7.10.4.tgz" - sha256 "42c048a0ed1f597472f539153f339da0963324925c1131770caad9896577b1d6" - license "MIT" - - bottle do - sha256 "a91bf9298747d0b3a067094627f6ba514a5ba49813edd83e81e649609434f5ec" => :catalina - sha256 "96141bc2ca574f0400c9f2c5ab1984e908efa3c827a8dfe5330d434fb732d7b8" => :mojave - sha256 "bc5b854a5f7d651d3265f094ecbbfbfc695bfd0248207a689362a4421a0ba49c" => :high_sierra - end - - depends_on "node" - - resource "babel-cli" do - url "https://registry.npmjs.org/@babel/cli/-/cli-7.10.4.tgz" - sha256 "753506f198fda9a521b40d9ed45e6aa954a123f51e63b0f6f01c364c8acd9781" - end - - def install - (buildpath/"node_modules/@babel/core").install Dir["*"] - buildpath.install resource("babel-cli") - - # declare babel-core as a bundledDependency of babel-cli - pkg_json = JSON.parse(IO.read("package.json")) - pkg_json["dependencies"]["@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" - end -end diff --git a/Formula/babeld.rb b/Formula/babeld.rb deleted file mode 100644 index d504cc43a5113..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.fr/~jch/software/babel/" - url "https://www.irif.fr/~jch/software/files/babeld-1.9.2.tar.gz" - sha256 "154f00e0a8bf35d6ea9028886c3dc5c3c342dd1a367df55ef29a547b75867f07" - license "MIT" - head "https://github.com/jech/babeld.git" - - bottle do - cellar :any_skip_relocation - sha256 "d65c7dd41ac16cb2f791a80f3cbebdb6616321e106874504644b0ab5cd37da24" => :catalina - sha256 "14f512383b868d8c9752414328fd4681de70d6aa37992cdcb55be61406bcb08a" => :mojave - sha256 "6b920612afb160b31950f28dad5b38880689cb3f52a23be723e8dd680370fca8" => :high_sierra - 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 41b1b3f85ada1..0000000000000 --- a/Formula/babl.rb +++ /dev/null @@ -1,47 +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.78.tar.xz" - sha256 "17d5493633bff5585d9f375bc4df5925157cd1c70ccd7c22a635be75c172523a" - license "LGPL-3.0" - # Use GitHub instead of GNOME's git. The latter is unreliable. - head "https://github.com/GNOME/babl.git" - - bottle do - sha256 "d163bc0d4cd1f816df3ec00ed7facadbf95946f1650bf9aa4dce2f37c2ef815c" => :catalina - sha256 "50a1461b22dcef2951014ac2b5162c90a97b784d8f03310e35dac0ba60c3c4cf" => :mojave - sha256 "d6b0c2274b044725b9a4fa63c9264f16077407fe9b424277399837e539e2386a" => :high_sierra - end - - depends_on "glib" => :build # for gobject-introspection - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "little-cms2" - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Dwith-docs=false", ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - 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 e5bce45f72f63..0000000000000 --- a/Formula/backupninja.rb +++ /dev/null @@ -1,38 +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.1.0.orig.tar.gz" - mirror "https://debian.ethz.ch/ubuntu/ubuntu/pool/universe/b/backupninja/backupninja_1.1.0.orig.tar.gz" - sha256 "abe444d0c7520ede7847b9497da4b1253a49579f59293b043c47b1dd9833280a" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "10006896f517296c2a62d1f510d3795afa2777f24d401206cfb69ce06bdf5d3c" => :catalina - sha256 "39df0693351a58ac9f406d6c16ab9c15ddb5d96ddf7ac9e98cf94061ccffe9a8" => :mojave - sha256 "39df0693351a58ac9f406d6c16ab9c15ddb5d96ddf7ac9e98cf94061ccffe9a8" => :high_sierra - sha256 "071ac37b853475ae44c4b3dde995d694a5fce322e68d7eeb39eb52a85c781cea" => :sierra - end - - depends_on "bash" - 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 8655f3b3724d1..0000000000000 --- a/Formula/bacula-fd.rb +++ /dev/null @@ -1,78 +0,0 @@ -class BaculaFd < Formula - desc "Network backup solution" - homepage "https://www.bacula.org/" - url "https://downloads.sourceforge.net/project/bacula/bacula/9.6.5/bacula-9.6.5.tar.gz" - sha256 "510f35b86138472abe6c559caded7bc773bf5eb1b9ee10905ee8f4f827c7c77a" - - bottle do - sha256 "9f60d58bc6f3709d3ed3fabb03a82d9197a76a4f8bea6f0b4d5cef24bec5e5ea" => :catalina - sha256 "af55545e264e8fb2b7b0ce417194d7d27ddb17d41d28e9664c8e9371164958d0" => :mojave - sha256 "a615488f494959d4d19cee5d863c4c306a2180ceab548742c93cef68fe8b688c" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "zlib" - - conflicts_with "bareos-client", - :because => "both install a `bconsole` executable" - - 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 Dir[prefix/"etc/bacula_config"], - HOMEBREW_SHIMS_PATH/"mac/super/", "" - - (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 bd1f3667d7221..0000000000000 --- a/Formula/badtouch.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Badtouch < Formula - desc "Scriptable network authentication cracker" - homepage "https://github.com/kpcyrd/badtouch" - url "https://github.com/kpcyrd/badtouch/archive/v0.7.1.tar.gz" - sha256 "c188bb1df106761a436fd25d3530323a47633c4c937d186e82c00981ffc94b5f" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "f6294a3dc8e19096623409df112ed32d30005d7ea9539529b39d374b21c6d4ac" => :catalina - sha256 "4ac7d4d570c30b3f024a276f50aa39429350a852efd5c29e4941d66dbe7227f6" => :mojave - sha256 "e4f2eb394ebc2c5f2b674d577ef2263b6580927d1b0eb15ee38384fbfb6565f4" => :high_sierra - end - - depends_on "rust" => :build - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - # Ensure that the `openssl` crate picks up the intended library. - # https://crates.io/crates/openssl#manual-configuration - ENV["OPENSSL_DIR"] = Formula["openssl@1.1"].opt_prefix - - system "cargo", "install", *std_cargo_args - 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 f5c3de1fcf2b9..0000000000000 --- a/Formula/bagit.rb +++ /dev/null @@ -1,33 +0,0 @@ -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/ee/11/7a7fa81c0d43fb4d449d418eba57fc6c77959754c5c2259a215152810555/bagit-1.7.0.tar.gz" - sha256 "f248a3dad06fd3e5d329217baace6ade79d106579696b13e2c0bbc583101ded4" - version_scheme 1 - head "https://github.com/LibraryOfCongress/bagit-python.git" - - bottle do - cellar :any_skip_relocation - sha256 "e0be67c1d5a4b305daacc9589d5230ecebc106ccbd74ad668ce5b10d4a600039" => :catalina - sha256 "94a987817d26843f859a1f238b6f943576bc2a2a8f36c0f01c5309c4d2cecf02" => :mojave - sha256 "8b4295b73d506186e90b656331c1fc653ae52dd3be666b7f2695259b040b0a0e" => :high_sierra - end - - depends_on "python@3.8" - - def install - virtualenv_install_with_resources - end - - test do - system "#{bin}/bagit.py", "--source-organization", "Library of Congress", testpath.to_s - assert_predicate testpath/"bag-info.txt", :exist? - assert_predicate testpath/"bagit.txt", :exist? - 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/balance.rb b/Formula/balance.rb deleted file mode 100644 index 31cb18e03973c..0000000000000 --- a/Formula/balance.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "4b170d08a0e4d13fe80d1d7574945e56d5a7d78507c6b880f60950ce98d7ffea" => :catalina - sha256 "1b572db3df89cacc7d1fc1f26d9247900f5bada4efe14ba48051900c70d1dece" => :mojave - sha256 "77589c441e2c89d6fb3df19b51487fb4684327fe63c5fe768224d10f81868d3c" => :high_sierra - sha256 "02b241cd5085873f6f2e78c99c01b1be6c89a3a2ff9fc12e17600035096dc44e" => :sierra - sha256 "c6af3ec64f795a6ba24400e83b3ab3753564a57f8546f0137368860bd2605421" => :el_capitan - sha256 "07f517fc19b99e5d52f6a90576ccd718650bd6a291d7c808f0d8b8193bce7779" => :yosemite - sha256 "ee916620a28cde87c90824125bf418b61eea80bc99e3aa32936e39af8acf0432" => :mavericks - 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/balena-cli.rb b/Formula/balena-cli.rb deleted file mode 100644 index 11f98572bf550..0000000000000 --- a/Formula/balena-cli.rb +++ /dev/null @@ -1,28 +0,0 @@ -require "language/node" - -class BalenaCli < Formula - desc "The official balena CLI tool" - homepage "https://www.balena.io/docs/reference/cli/" - # balena-cli should only be updated every 10 releases on multiples of 10 - url "https://registry.npmjs.org/balena-cli/-/balena-cli-12.5.0.tgz" - sha256 "dc22fea3c0c78cb6d48d3ab06ac0c54228ef68f7d6b0ef299dc2d58178105ddc" - license "Apache-2.0" - - bottle do - sha256 "0af85f0035318f5cbc461354bf1a44318c15e4639bc9194a0eb1ab2cfdd71290" => :catalina - sha256 "2f3fcd48f888eac4b5fd89deb1df56160a91bbf6795963250a3e2631811318f5" => :mojave - sha256 "7b04be954e821a2956d826bb35cdd029fc59d0b66f0d8b06a75e8adb43ca3e98" => :high_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_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/ballerburg.rb b/Formula/ballerburg.rb deleted file mode 100644 index 4b774feea2766..0000000000000 --- a/Formula/ballerburg.rb +++ /dev/null @@ -1,26 +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" - license "GPL-3.0" - head "https://git.tuxfamily.org/baller/baller.git" - - bottle do - cellar :any - sha256 "5459d5bc2baba43a0ad3a32dde1c3e6adbd02dfdce1f43bcb4c1d9ebf8f73b01" => :catalina - 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 6025a3b3ea489..0000000000000 --- a/Formula/ballerina.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ballerina < Formula - desc "Programming Language for Network Distributed Applications" - homepage "https://ballerina.io/" - url "https://dist.ballerina.io/downloads/1.2.5/ballerina-1.2.5.zip" - sha256 "de2b9d3062d15d49a0dfff04790b3c4b8001d484af7f62cf70a9eb661ac7c320" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - # Remove Windows files - rm Dir["bin/*.bat"] - - chmod 0755, "bin/ballerina" - - bin.install "bin/ballerina" - libexec.install Dir["*"] - 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() { - 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 34f1306278e0b..0000000000000 --- a/Formula/bam.rb +++ /dev/null @@ -1,40 +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 "de24826592ac3d7a97f2ea0372d6a002e67e39bc1f10dc5d2e54563f84953690" => :catalina - 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 7a505bb094051..0000000000000 --- a/Formula/bamtools.rb +++ /dev/null @@ -1,41 +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" - license "MIT" - head "https://github.com/pezmaster31/bamtools.git" - - bottle do - cellar :any_skip_relocation - sha256 "e06e5350260683c40d522ea80415d67bad57be49c30e5b534256aeac0bc5e3d8" => :catalina - sha256 "5c1195094d84ce0e5ec63660597029dad111639e7212537c1d083444714ac294" => :mojave - sha256 "cd3886cfb77b71ef9924d5475e4dbae2d42c4c66ef3880de33ca202855ce92b0" => :high_sierra - sha256 "5e72d5b1b5b18551bbd91c7f3b7a2dd6e763b13add38b9a3a798bb5a450be64e" => :sierra - sha256 "920e533776328d79f47bb562af5cfa00d855223818916e00614ee81d821f211c" => :el_capitan - end - - depends_on "cmake" => :build - uses_from_macos "zlib" - - 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 f1d4e08d322bd..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" - license "Unlicense" - revision 3 - head "https://github.com/iheanyi/bandcamp-dl.git" - - bottle do - cellar :any_skip_relocation - sha256 "7906dfa2016495c4e0aeca69d9aa2b7e9bcc2ac4742ba2900f3e4b6a942a3053" => :catalina - sha256 "5bce4baa9ae47a78a43206aad853a0a202395dc335d41756050af358967f035f" => :mojave - sha256 "9c8c311b18dad230648661c3b981583ece5e647285239c6024efa2f2598f439e" => :high_sierra - end - - depends_on "python@3.8" - - 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/bandwhich.rb b/Formula/bandwhich.rb deleted file mode 100644 index 11561cce733e0..0000000000000 --- a/Formula/bandwhich.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Bandwhich < Formula - desc "Terminal bandwidth utilization tool" - homepage "https://github.com/imsnif/bandwhich" - url "https://github.com/imsnif/bandwhich/archive/0.15.0.tar.gz" - sha256 "c4922734bbb3ec17c8a0c9fbff4096ee3e28b4efa7dbca9abbd92e0ad6ff3483" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "fb83c727c5291d983c43865d1b6f6ce27c173ad883e24f1d9ff61909fe159580" => :catalina - sha256 "e84c13bce1bf2e21052fbc23f8f77ffb18fa61840af4881895df8164e2bb1c09" => :mojave - sha256 "247f4d7303f2053bbb920b260b39e017ab2cc8140862edfebcabdb5c2464c0e5" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - output = shell_output "#{bin}/bandwhich --interface bandwhich", 2 - assert_match output, "Error: Cannot find interface bandwhich" - end -end diff --git a/Formula/baobab.rb b/Formula/baobab.rb deleted file mode 100644 index be4f9eba927b1..0000000000000 --- a/Formula/baobab.rb +++ /dev/null @@ -1,41 +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.34/baobab-3.34.1.tar.xz" - sha256 "7f981d4f135e4f80fba3f66e86b0eeedc94a2434649262ff01a5f0cb027b20c5" - revision 1 - - bottle do - sha256 "8724ad2149b4e8d51b5de9268a3a7cdd99855736478bac1dcf97b3ea6d741ac6" => :catalina - sha256 "21588b8f71e80696d785cbbe33284214c38f73b2a72a62f537de4e3393ed2bfa" => :mojave - sha256 "922b36653952a0c8e4c44678faf7d042a1e89c3b455ac1d3e46a4292606f26d9" => :high_sierra - end - - depends_on "itstool" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :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", *std_meson_args, ".." - 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 c9c3054c67ca0..0000000000000 --- a/Formula/bareos-client.rb +++ /dev/null @@ -1,83 +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/19.2.7.tar.gz" - sha256 "283c1fa9cb6a96b1f09b402cd507ecd8bf798458bafcbfad867da08d33d12653" - - bottle do - sha256 "c398b94b0cd74715b26a53369d6b8fdabe6c4c9cf876c27bbf3394801d2d1fb6" => :catalina - sha256 "91276e1c2e1e35c2ee7c00b8c7b4b56647c15290e4ae402ca42557a675cc14aa" => :mojave - sha256 "95c59dc77b15fed9cc99aa41328d745192b7b03a3b77f1d343f81cd724ecd65a" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "gettext" - depends_on "openssl@1.1" - depends_on "readline" - - conflicts_with "bacula-fd", - :because => "both install a `bconsole` executable" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-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" - system "make" - system "make", "install" - end - 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 4083fe2b07963..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.6.5.tar.gz" - sha256 "2b035bd8b2121c72bec674768579a3bdcc5d1d567ecb0a84125864d69807b18d" - - bottle do - sha256 "dd71d2ba58f82dd58b4da6c350b2d52ff4e04fe64679a446778615550dfb95b8" => :catalina - sha256 "ec2fb4cba298c281b40a0929c227b563508ecaf5564e9381872c14469fb73ef9" => :mojave - sha256 "b99e262d153eb3414c2a6fe813be98e78f71da205d66ede0ec799d1e07f0341a" => :high_sierra - end - - depends_on "libre" - depends_on "librem" - - def install - # baresip doesn't like the 10.11 SDK when on Yosemite - if 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", - "HAVE_GETOPT=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 ec4e74404f562..0000000000000 --- a/Formula/bartycrouch.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Bartycrouch < Formula - desc "Incrementally update/translate your Strings files" - homepage "https://github.com/Flinesoft/BartyCrouch" - url "https://github.com/Flinesoft/BartyCrouch.git", - :tag => "4.2.0", - :revision => "49b4cf27d5b521abf615d4ccb7754d642205f802" - license "MIT" - head "https://github.com/Flinesoft/BartyCrouch.git" - - bottle do - cellar :any_skip_relocation - sha256 "86f4e9f2e99b0e6c34756e73365228833f3ea39251cb082eff4f37b7a38dc42e" => :catalina - end - - depends_on :xcode => ["11.4", :build] - - def install - system "make", "install", "prefix=#{prefix}" - 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", "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/base64.rb b/Formula/base64.rb deleted file mode 100644 index 654483d63276c..0000000000000 --- a/Formula/base64.rb +++ /dev/null @@ -1,30 +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 "f883e1602433f3a921fd1892747d76cf4548f75ac2e572be9eb0cfe0ced7290c" => :catalina - 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/base91.rb b/Formula/base91.rb deleted file mode 100644 index 75d01a4bd2910..0000000000000 --- a/Formula/base91.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Base91 < Formula - desc "Utility to encode and decode base91 files" - homepage "https://base91.sourceforge.io/" - url "https://downloads.sourceforge.net/base91/base91-0.6.0.tar.gz" - sha256 "02cfae7322c1f865ca6ce8f2e0bb8d38c8513e76aed67bf1c94eab1343c6c651" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "239a9f51f67e7b1de09d10c838dffd2c34ce0f6f58641269e2278d6478b36542" => :catalina - sha256 "fca64b5013c75658646a7d758365a624aa5f3a89488573222f2bbb867b04cc49" => :mojave - sha256 "3b9c972390a56bc2ea0be9943558018cc271802369b5b36ff0fa10391aaf1f57" => :high_sierra - sha256 "7d43d307ad7fb92e10b21696e4f3d5880979f12b465db614f7ecaf9e4c9d4904" => :sierra - 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") - assert_equal "Hello world", pipe_output("#{bin}/b91dec", ">OwJh>Io2Tv!lE") - end -end diff --git a/Formula/basex.rb b/Formula/basex.rb deleted file mode 100644 index 642c5bd8557a1..0000000000000 --- a/Formula/basex.rb +++ /dev/null @@ -1,26 +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.3.3/BaseX933.zip" - version "9.3.3" - sha256 "fc176cad855ededc34ef72c05b9afd3f168a0a501b8e79ae360dcc34247659bc" - - bottle :unneeded - - depends_on "openjdk" - - def install - rm Dir["bin/*.bat"] - rm_rf "repo" - rm_rf "data" - rm_rf "etc" - prefix.install_metafiles - 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/bash-completion.rb b/Formula/bash-completion.rb deleted file mode 100644 index b10c9339254d0..0000000000000 --- a/Formula/bash-completion.rb +++ /dev/null @@ -1,65 +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 "bd0c84cc6df9d3ff06ac081d85fdcc052b9e63136f4e2aa5fd2f2a0b7f654c84" => :catalina - sha256 "9219c2b46362677e9ae6e19b344b774c3e9f163ae6bf6cf2686da06419aaec89" => :mojave - sha256 "b069be5574bdf6d12fd1fda17c3162467b68165541166d95d1a9474653a63abc" => :high_sierra - sha256 "58be92ef01d5068f37b1c00af8e9b202bdb409c93121bb0e07dcbb5e55dc3be2" => :sierra - sha256 "58be92ef01d5068f37b1c00af8e9b202bdb409c93121bb0e07dcbb5e55dc3be2" => :el_capitan - sha256 "58be92ef01d5068f37b1c00af8e9b202bdb409c93121bb0e07dcbb5e55dc3be2" => :yosemite - end - - conflicts_with "bash-completion@2", - :because => "each are different versions of the 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: - [[ -r "#{etc}/profile.d/bash_completion.sh" ]] && . "#{etc}/profile.d/bash_completion.sh" - 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 f5c66b77b3004..0000000000000 --- a/Formula/bash-completion@2.rb +++ /dev/null @@ -1,51 +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.10/bash-completion-2.10.tar.xz" - sha256 "123c17998e34b937ce57bb1b111cd817bc369309e9a8047c0bcf06ead4a3ec92" - license "GPL-2.0" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "b162bc315662861c84f428b262c9883d34ff7eab80ddff09148f81aef4d5d7ff" => :catalina - sha256 "b162bc315662861c84f428b262c9883d34ff7eab80ddff09148f81aef4d5d7ff" => :mojave - sha256 "b162bc315662861c84f428b262c9883d34ff7eab80ddff09148f81aef4d5d7ff" => :high_sierra - 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 => "each are different versions of the same formula" - - def install - inreplace "bash_completion" do |s| - s.gsub! "readlink -f", "readlink" - # Automatically read Homebrew's existing v1 completions - s.gsub! ":-/etc/bash_completion.d", ":-#{etc}/bash_completion.d" - end - - system "autoreconf", "-i" if build.head? - system "./configure", "--prefix=#{prefix}" - 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/bash-git-prompt.rb b/Formula/bash-git-prompt.rb deleted file mode 100644 index 6479be049880a..0000000000000 --- a/Formula/bash-git-prompt.rb +++ /dev/null @@ -1,34 +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" - license "BSD-2-Clause" - 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 ff4c1e52cd33e..0000000000000 --- a/Formula/bash-preexec.rb +++ /dev/null @@ -1,26 +0,0 @@ -class BashPreexec < Formula - desc "Bash preexec and precmd functions (like Zsh)" - homepage "https://github.com/rcaloras/bash-preexec" - url "https://github.com/rcaloras/bash-preexec/archive/0.3.7.tar.gz" - sha256 "56c33779763f9960dee863f4d87bc58f8da0ad9120b2c60dd12ba61c71c72da4" - license "MIT" - 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 7adb2c8ee2fbe..0000000000000 --- a/Formula/bash-snippets.rb +++ /dev/null @@ -1,23 +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.23.0.tar.gz" - sha256 "59b784e714ba34a847b6a6844ae1703f46db6f0a804c3e5f2de994bbe8ebe146" - license "MIT" - - 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", output - output = shell_output("#{bin}/qrify This is a test") - assert_match "████ ▄▄▄▄▄ █▀ █▀▄█ ▄▄▄▄▄ ████", output - assert_match "Apple Inc. -- Stock Information", shell_output("#{bin}/stocks Apple") - end -end diff --git a/Formula/bash.rb b/Formula/bash.rb deleted file mode 100644 index a503221319c2a..0000000000000 --- a/Formula/bash.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Bash < Formula - desc "Bourne-Again SHell, a UNIX command interpreter" - homepage "https://www.gnu.org/software/bash/" - license "GPL-3.0" - head "https://git.savannah.gnu.org/git/bash.git" - - stable do - url "https://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz" - mirror "https://ftpmirror.gnu.org/bash/bash-5.0.tar.gz" - mirror "https://mirrors.kernel.org/gnu/bash/bash-5.0.tar.gz" - mirror "https://mirrors.ocf.berkeley.edu/gnu/bash/bash-5.0.tar.gz" - sha256 "b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d" - version "5.0.17" - - %w[ - 001 f2fe9e1f0faddf14ab9bfa88d450a75e5d028fedafad23b88716bd657c737289 - 002 87e87d3542e598799adb3e7e01c8165bc743e136a400ed0de015845f7ff68707 - 003 4eebcdc37b13793a232c5f2f498a5fcbf7da0ecb3da2059391c096db620ec85b - 004 14447ad832add8ecfafdce5384badd933697b559c4688d6b9e3d36ff36c62f08 - 005 5bf54dd9bd2c211d2bfb34a49e2c741f2ed5e338767e9ce9f4d41254bf9f8276 - 006 d68529a6ff201b6ff5915318ab12fc16b8a0ebb77fda3308303fcc1e13398420 - 007 17b41e7ee3673d8887dd25992417a398677533ab8827938aa41fad70df19af9b - 008 eec64588622a82a5029b2776e218a75a3640bef4953f09d6ee1f4199670ad7e3 - 009 ed3ca21767303fc3de93934aa524c2e920787c506b601cc40a4897d4b094d903 - 010 d6fbc325f0b5dc54ddbe8ee43020bced8bd589ddffea59d128db14b2e52a8a11 - 011 2c4de332b91eaf797abbbd6c79709690b5cbd48b12e8dfe748096dbd7bf474ea - 012 2943ee19688018296f2a04dbfe30b7138b889700efa8ff1c0524af271e0ee233 - 013 f5d7178d8da30799e01b83a0802018d913d6aa972dd2ddad3b927f3f3eb7099a - 014 5d6eee6514ee6e22a87bba8d22be0a8621a0ae119246f1c5a9a35db1f72af589 - 015 a517df2dda93b26d5cbf00effefea93e3a4ccd6652f152f4109170544ebfa05e - 016 ffd1d7a54a99fa7f5b1825e4f7e95d8c8876bc2ca151f150e751d429c650b06d - 017 4cf3b9fafb8a66d411dd5fc9120032533a4012df1dc6ee024c7833373e2ddc31 - ].each_slice(2) do |p, checksum| - patch :p0 do - url "https://ftp.gnu.org/gnu/bash/bash-5.0-patches/bash50-#{p}" - mirror "https://ftpmirror.gnu.org/bash/bash-5.0-patches/bash50-#{p}" - mirror "https://mirrors.ocf.berkeley.edu/gnu/bash/bash-5.0-patches/bash50-#{p}" - mirror "https://mirrors.kernel.org/gnu/bash/bash-5.0-patches/bash50-#{p}" - sha256 checksum - end - end - end - - bottle do - sha256 "ce9312721ce3700e3b95d3e2f663ee51c16423cea9e54a867ad17a1f9676aa68" => :catalina - sha256 "0a002b85e82af9ada464528e5e34180897cde3f26f77b04944cc45d4f6bff9d8" => :mojave - sha256 "7711a176d742d4df6c92930da1b56e45b44075ab6839f5e7ea8eefa4227701d4" => :high_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 - - 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 1e28b80b4fb18..0000000000000 --- a/Formula/bashdb.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Bashdb < Formula - desc "Bash shell debugger" - homepage "https://bashdb.sourceforge.io/" - url "https://downloads.sourceforge.net/project/bashdb/bashdb/5.0-1.1.2/bashdb-5.0-1.1.2.tar.bz2" - version "5.0-1.1.2" - sha256 "30176d2ad28c5b00b2e2d21c5ea1aef8fbaf40a8f9d9f723c67c60531f3b7330" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "0ab6de48ce871bc7b6abc582154b425350a70b7f2ecadd3b303c7a91dafc3c41" => :catalina - sha256 "0ab6de48ce871bc7b6abc582154b425350a70b7f2ecadd3b303c7a91dafc3c41" => :mojave - sha256 "0ab6de48ce871bc7b6abc582154b425350a70b7f2ecadd3b303c7a91dafc3c41" => :high_sierra - end - - depends_on "bash" - - 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 e0f087085b674..0000000000000 --- a/Formula/bashish.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - 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 7d13a605240d5..0000000000000 --- a/Formula/bastet.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Bastet < Formula - desc "Bastard Tetris" - homepage "https://fph.altervista.org/prog/bastet.html" - url "https://github.com/fph/bastet/archive/0.43.2.tar.gz" - sha256 "f219510afc1d83e4651fbffd5921b1e0b926d5311da4f8fa7df103dc7f2c403f" - license "GPL-3.0" - - bottle do - rebuild 1 - sha256 "0dfeabb0071431e426ac18b366ff5d065067075e7d3f4572e55a281e6702e215" => :catalina - 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 - - test do - pid = fork do - exec bin/"bastet" - end - sleep 3 - - assert_predicate bin/"bastet", :exist? - assert_predicate bin/"bastet", :executable? - ensure - Process.kill("TERM", pid) - Process.wait(pid) - end -end diff --git a/Formula/bat.rb b/Formula/bat.rb deleted file mode 100644 index ab38b000394e7..0000000000000 --- a/Formula/bat.rb +++ /dev/null @@ -1,33 +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.15.4.tar.gz" - sha256 "03b7c8ad6221ca87cecd71f9e3e2167f04f750401e2d3dcc574183aabeb76a8b" - - bottle do - cellar :any_skip_relocation - sha256 "ae2c26d25a0dac35bd839a091f89201b5d9eee32ef613325426c7e8b8812d1a9" => :catalina - sha256 "40dea8577c06a08d3e3bd20a949245ff02ea85153d25f72a65cee03c1b1e1cf9" => :mojave - sha256 "59bed16f8a4741a9d92f62cb7c9965d1abe40dc5dd2323bc4f37e71330b1abf2" => :high_sierra - end - - depends_on "rust" => :build - - uses_from_macos "zlib" - - def install - ENV["SHELL_COMPLETIONS_DIR"] = buildpath - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - system "cargo", "install", *std_cargo_args - - assets_dir = Dir["target/release/build/bat-*/out/assets"].first - man1.install "#{assets_dir}/manual/bat.1" - fish_completion.install "#{assets_dir}/completions/bat.fish" - 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 8e74d1df49527..0000000000000 --- a/Formula/batik.rb +++ /dev/null @@ -1,24 +0,0 @@ -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.13.tar.gz" - mirror "https://archive.apache.org/dist/xmlgraphics/batik/binaries/batik-bin-1.13.tar.gz" - sha256 "7c565899e4377a72edee216ffdf168d7b6928d5e1a8cdf477dfa1abd2c48589b" - revision 1 - - bottle :unneeded - - 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_name = (MacOS.version >= :catalina) ? "Arial Unicode.ttf" : "Arial.ttf" - system bin/"batik-ttf2svg", "/Library/Fonts/#{font_name}", "-autorange", - "-o", "Arial.svg", "-testcard" - assert_match "abcdefghijklmnopqrstuvwxyz", File.read("Arial.svg") - end -end diff --git a/Formula/bats-core.rb b/Formula/bats-core.rb deleted file mode 100644 index 039da854a7abf..0000000000000 --- a/Formula/bats-core.rb +++ /dev/null @@ -1,26 +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.2.1.tar.gz" - sha256 "91c49b1fe6f0656c46491929ed728f8dfa9a96df0cce294963e8c6082bff87a2" - - bottle :unneeded - - depends_on "coreutils" - - 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 0be403357e8cd..0000000000000 --- a/Formula/bats.rb +++ /dev/null @@ -1,29 +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" - license "MIT" - 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 0929ee781223d..0000000000000 --- a/Formula/bazaar.rb +++ /dev/null @@ -1,56 +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 - rebuild 1 - sha256 "c9ab575e1e27fe8e550690c760464c37890ca5c1fa8ea111c74d0172d0fa1453" => :catalina - sha256 "32411a9e28eb27b3637bc915150581524897a18ba223313e5bc2f776785aae9b" => :mojave - sha256 "cb1c0c8b5f19abef4043195d8cbd19f363a78581596de1ddcc763621964335b3" => :high_sierra - end - - depends_on :macos # Due to Python 2 - - # CVE-2017-14176 - # https://bugs.launchpad.net/brz/+bug/1710979 - patch do - url "https://deb.debian.org/debian/pool/main/b/bzr/bzr_2.7.0+bzr6622-15.debian.tar.xz" - sha256 "d2198b93059cc9d37c551f7bfda19a199c18f4c9c6104a8c40ccd6d0c65e6fd3" - 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 80528277a262f..0000000000000 --- a/Formula/bazel.rb +++ /dev/null @@ -1,88 +0,0 @@ -class Bazel < Formula - desc "Google's own build tool" - homepage "https://bazel.build/" - url "https://github.com/bazelbuild/bazel/releases/download/3.3.1/bazel-3.3.1-dist.zip" - sha256 "e0f1f43c65c4e0a38522b37e81f6129d8a1f7cd3d8884847be306544a7492747" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e45fbf3cbc76f7776c133e08ab2e16e105732b9c0bfeba1ee0095e7c7bb5ef57" => :catalina - sha256 "81f37ac92266bdbb1cb7265a57ae99765f9a4acb46cc41db74f256b75203b7f5" => :mojave - sha256 "afc851e9b37ba1ffe6df0a7dade13b50eeec652f2e1801b13ce6bbbbac64c4a9" => :high_sierra - end - - depends_on "python@3.8" => :build - depends_on "openjdk@11" - - uses_from_macos "zip" - - def install - 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 openjdk@11 - ENV["JAVA_HOME"] = Formula["openjdk@11"].opt_libexec/"openjdk.jdk/Contents/Home" - ENV["EXTRA_BAZEL_ARGS"] = "--host_javabase=@local_jdk//:jdk" - - (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" - - bin.install "scripts/packages/bazel.sh" => "bazel" - ln_s libexec/"bin/bazel-real", bin/"bazel-#{version}" - (libexec/"bin").install "output/bazel" => "bazel-real" - bin.env_script_all_files(libexec/"bin", - :JAVA_HOME => Formula["openjdk@11"].opt_libexec/"openjdk.jdk/Contents/Home") - - 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", - "//:bazel-test" - assert_equal "Hi!\n", pipe_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 <<~EOS - #!/bin/bash - echo "stub-wrapper" - exit 1 - EOS - (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/bazelisk.rb b/Formula/bazelisk.rb deleted file mode 100644 index 0c01ff4113b68..0000000000000 --- a/Formula/bazelisk.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Bazelisk < Formula - desc "User-friendly launcher for Bazel" - homepage "https://github.com/bazelbuild/bazelisk/" - url "https://github.com/bazelbuild/bazelisk.git", - :tag => "v1.5.0", - :revision => "9f7127db3c137e32a21484f9345bbc0da8301135" - license "Apache-2.0" - head "https://github.com/bazelbuild/bazelisk.git" - - bottle do - cellar :any_skip_relocation - sha256 "9c189bca9ddac7acaab8da42f451a8707320c52b4b233ab9b42cbfefc94310d9" => :catalina - sha256 "9c189bca9ddac7acaab8da42f451a8707320c52b4b233ab9b42cbfefc94310d9" => :mojave - sha256 "9c189bca9ddac7acaab8da42f451a8707320c52b4b233ab9b42cbfefc94310d9" => :high_sierra - end - - depends_on "bazel" => :build - - def install - rm_f ".bazelversion" # Homebrew uses the latest bazel - system "bazel", "build", "--config=release", "//:bazelisk-darwin" - - bin.install "bazel-bin/bazelisk-darwin_amd64" => "bazelisk" - end - - test do - ENV["USE_BAZEL_VERSION"] = Formula["bazel"].version - assert_match /v#{version}/, shell_output("#{bin}/bazelisk version") - - # This is an older than current version, so that we can test that bazelisk - # will target an explicit version we specify. This version shouldn't need to - # be bumped. - ENV["USE_BAZEL_VERSION"] = "0.28.0" - assert_match /Build label: 0.28.0/, shell_output("#{bin}/bazelisk version") - end -end diff --git a/Formula/bbcolors.rb b/Formula/bbcolors.rb deleted file mode 100644 index 29f6263715d42..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 "eccd746ed946749acadc63ef4e6ff652f2c1372459f1bf586acce1590729cc75" => :catalina - sha256 "3eb2e91111f491b315d5bb077dacdf9dd03fa74a585ba780c59bdc071c104fe2" => :mojave - sha256 "b54a89cbcfcb6a0fb0b3c1279884f1fa54196e2c22a19424ea95827f419030d9" => :high_sierra - sha256 "cdc81c86b829ba9e051d693bccdb821ed78a8dc3a5df644fc156bfcd700d5686" => :sierra - sha256 "2a713dae009e44685d1ef02b01d5202a24087129dab70366d2e30800b7dfb9cb" => :el_capitan - sha256 "506d7f82fa38e1f694550be30a29554b8ecc8b303d47e9bb4fcadfc534ac55c7" => :yosemite - sha256 "68b63b5913be9e20b8ebc726c5272e030f7572aeb6baab709a70725f632c69b1" => :mavericks - 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 4e6b9470694ab..0000000000000 --- a/Formula/bbe.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "16ec8602703755894016b9ecd47ca9875a97c66ba259cdb8d7fa8902a17dd8d3" => :catalina - 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 ef9cd52697168..0000000000000 --- a/Formula/bbftp-client.rb +++ /dev/null @@ -1,33 +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 3 - - bottle do - cellar :any_skip_relocation - sha256 "3adb6837d00aae2dd6425d06aa6ccf9450e8d6eaac66d4be597a7d97866d30a2" => :catalina - sha256 "bbb282078bb4f4390bf219a319a1d20020a76e14fb853afc473e7f59f3f71a01" => :mojave - sha256 "33ccc8c932f462488401f3963c1c5aff2ab489e16c1df067c619c5b6a791ced7" => :high_sierra - sha256 "535b7b8db22c9ef92ba7ecf8fea093c3d0c9bc5c01d99277fb2ff04d9272b843" => :sierra - end - - 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", - "--without-ssl", - "--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 57ef813caa7cb..0000000000000 --- a/Formula/bc.rb +++ /dev/null @@ -1,45 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "9fdbf6f45737082f911073b3c291399487bc3a3cfd1285e0da389436064c438f" => :catalina - sha256 "78372f9830096b6d63fa7278e141924869a9aaee250b2ac1135594e67ba76c09" => :mojave - sha256 "0baf2e31191d80258636186bf9adcdf6b3f554f213d36cb3054213f736e52bf1" => :high_sierra - sha256 "1d8f0459c0b67aae275c43e01e5312146be72163acadd3d6c8f2bc440181508c" => :sierra - sha256 "e5c4b3fa712d705c3cc9bfae12242c9b4dc429e329c61d12aa01b65c1623a11f" => :el_capitan - end - - keg_only :provided_by_macos - - uses_from_macos "bison" => :build - uses_from_macos "ed" => :build - uses_from_macos "flex" - - 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 5b1d116393d8c..0000000000000 --- a/Formula/bcal.rb +++ /dev/null @@ -1,22 +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.2.tar.gz" - sha256 "506d17d6df35fad636d3ced425afee5921cd2b21242099b78b369cfcb5716e23" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "68c94f34b56865694b7229d0211f8c8c97c3ec809a260cf0c8764524cb76b8fa" => :catalina - sha256 "d6e4bac5e11d3eb1815d370fc3a8890906833104c8e3b8c9865376bf36f1e90e" => :mojave - sha256 "4c32b10db17857b3e7c553e3accf24e0cc6fefc54361ede1790c6e46c72fbaf1" => :high_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 ff37ffa19afb1..0000000000000 --- a/Formula/bcftools.rb +++ /dev/null @@ -1,30 +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.10.2/bcftools-1.10.2.tar.bz2" - sha256 "f57301869d0055ce3b8e26d8ad880c0c1989bf25eaec8ea5db99b60e31354e2c" - - bottle do - sha256 "6d232b149d6f1edc21116002d675d1f62ab0bf73158e67802ecb94091fa1ceaa" => :catalina - sha256 "deb19fb24a4a943cf577b31b53f6aecf55e195fb62133e6b613d5e657e5dbbe0" => :mojave - sha256 "af4d6172e2cdd40aaa8c49c6e4e8fde3cb90bf7f04f516bd1d1673e3e1659c73" => :high_sierra - 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 8b84a72283f22..0000000000000 --- a/Formula/bchunk.rb +++ /dev/null @@ -1,36 +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" - license "GPL-2.0" - head "https://github.com/hessu/bchunk.git" - - bottle do - cellar :any_skip_relocation - sha256 "b9f7bc758711585d7a016b7b3ddefe3256a368c00b21c51691481c7fbfc2823a" => :catalina - 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/bcoin.rb b/Formula/bcoin.rb deleted file mode 100644 index 005e8bb8e48b6..0000000000000 --- a/Formula/bcoin.rb +++ /dev/null @@ -1,41 +0,0 @@ -require "language/node" - -class Bcoin < Formula - desc "Javascript bitcoin library for node.js and browsers" - homepage "https://bcoin.io/" - url "https://github.com/bcoin-org/bcoin/archive/v2.1.2.tar.gz" - sha256 "b4c63598ee1efc17e4622ef88c1dff972692da1157e8daf7da5ea8abc3d234df" - head "https://github.com/bcoin-org/bcoin.git" - - bottle do - sha256 "108903ff8f06a500be27e4108b65c4462c469f778a23b41b697f21c99d19df5f" => :catalina - sha256 "c8bec139df5f6b3e8b40179dab802dee9b7480d80c5503f620d8ac843479e274" => :mojave - sha256 "aaaccce8be6e2c06276627d4ce705039530ba228b378b5f670bc83124f649b32" => :high_sierra - end - - depends_on "python@3.8" => :build - depends_on "node" - - def install - system "#{Formula["node"].libexec}/bin/npm", "install", *Language::Node.std_npm_install_args(libexec) - (bin/"bcoin").write_env_script libexec/"bin/bcoin", :PATH => "#{Formula["node"].opt_bin}:$PATH" - end - - test do - (testpath/"script.js").write <<~EOS - 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(); - })(); - EOS - system "#{Formula["node"].bin}/node", testpath/"script.js" - assert_true File.directory?("#{testpath}/.bcoin") - end -end diff --git a/Formula/bcpp.rb b/Formula/bcpp.rb deleted file mode 100644 index 87775c6f4f58c..0000000000000 --- a/Formula/bcpp.rb +++ /dev/null @@ -1,34 +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 "cc81540bae3c797979fdd5246a97479b685683ed4ec611f5e9a1f691147356af" => :catalina - 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 b8304125a5cd2..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 "1e9d946fdf6761cf3ef623ac4646f5d77107aca427ae5d986a25f5ef7de6ceea" => :catalina - sha256 "ef0fbaf77cad63f0450bde11bd6ba89fe2217ecb0f95b1952dd93c56730f615e" => :mojave - sha256 "70235a007382bbbaeddbfc52b503e86b6cadcb7d07b752d97c8ce0861bccd3a8" => :high_sierra - sha256 "913cfce96b6de1fce20ee1ff771ef22e3663f3da6c7529d7efc3a43b0e1d92b8" => :sierra - sha256 "d674203ce681f17519eee1ce7a3258615b2de5a8a12460d7de284af09028d7da" => :el_capitan - sha256 "dbd530bd84a1e92120aacf07f60e3b6131c92421702ab8b9f9e02d3b72a00ad6" => :yosemite - sha256 "2a0a662d778677d75222745b30e6c5e825078855d303cf853609f50b1ceca4a6" => :mavericks - 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 6dbf54cef52c2..0000000000000 --- a/Formula/bde.rb +++ /dev/null @@ -1,48 +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/3.57.0.0.tar.gz" - sha256 "68b456aebb6f0c532db221932a26730b01db5badca8dce99e10e3978930cafc2" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "03d49625918969176051584cda6d6b23e6a3049878dc946247360ab746b39c9e" => :catalina - sha256 "16179163a52bd6dabf06e7709208496fdf3a7b845a679ebe44b7e492f8a772e3" => :mojave - sha256 "1cbc01b6d179c35b560b8e2475cb2d7904f8b925cd3677988a9c3c2aaaa36492" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "ninja" => :build - - resource "bde-tools" do - url "https://github.com/bloomberg/bde-tools/archive/v1.1.tar.gz" - sha256 "c5d77d5e811e79f824816ee06dbf92a2a7e3eb0b6d9f27088bcac8c06d930fd5" - end - - def install - buildpath.install resource("bde-tools") - - ENV.cxx11 - - 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/bdw-gc.rb b/Formula/bdw-gc.rb deleted file mode 100644 index 72d72a7993447..0000000000000 --- a/Formula/bdw-gc.rb +++ /dev/null @@ -1,62 +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.4/gc-8.0.4.tar.gz" - sha256 "436a0ddc67b1ac0b0405b61a9675bca9e075c8156f4debd1d06f3a56c7cd289d" - - bottle do - cellar :any - sha256 "3c8765da91b046c3ab3f73fb00f885608dc4d8415071ca0170f4aa7b1048a6bf" => :catalina - sha256 "05219d7d030791e3c3e3751b36a603a710cce86dc63c97cc64ea6743b8828406" => :mojave - sha256 "280e51afa899236777022c30b756fb4b87e034b9e23a5526c183fe3d0e24731c" => :high_sierra - sha256 "6a4132230171a8bff236796655c87f453d9f711ea1d22a9e0d61ac05dc624394" => :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", - "--enable-static" - 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 7c195efbc846c..0000000000000 --- a/Formula/beagle.rb +++ /dev/null @@ -1,48 +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" - revision 1 - - bottle do - cellar :any - sha256 "de8fe667e01d1e204c669980753cf9ef84b4d2406ab52c0882d6d9108d2dc7eb" => :catalina - sha256 "fe9ae7aaa01df98d34b5cbd7dce8abd9ac840f2bb54797851b42a056ee258e01" => :mojave - sha256 "d2a42acc06fa4bf26c25b4d63a96c0d6bf46f7b1a21bacf91ef70fbff58e77b4" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "doxygen" => :build - depends_on "libtool" => :build - depends_on "openjdk" => [:build, :test] - - 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 "#{Formula["openjdk"].bin}/javac", "T.java" - system "#{Formula["openjdk"].bin}/java", "-Djava.library.path=#{lib}", "T" - end -end diff --git a/Formula/beancount.rb b/Formula/beancount.rb deleted file mode 100644 index 43ceb62115ca2..0000000000000 --- a/Formula/beancount.rb +++ /dev/null @@ -1,198 +0,0 @@ -class Beancount < Formula - include Language::Python::Virtualenv - - desc "Double-entry accounting tool that works on plain text files" - homepage "http://furius.ca/beancount/" - url "https://files.pythonhosted.org/packages/26/d6/9cb23ad3af828ebba10deda85dc28c0985acfbfdce3fb6c4b76ec69389d3/beancount-2.3.0.tar.gz" - sha256 "9a6d9692435007195aae29a20328fb11d0126ff03db66322a79a894b1f422712" - license "GPL-2.0" - head "https://github.com/beancount/beancount.git" - - bottle do - cellar :any_skip_relocation - sha256 "fdbee946d5e84f6cc98d3cc42d3a12bf2abf162e0e468dc4b2c1844a3cb38263" => :catalina - sha256 "3e2becab77f71130cbce35a7433dc9e6ef521be288277ac56a7d341c86819bc3" => :mojave - sha256 "4544a14a9ac451d02194b9b3b329d64f6e32dc52f65eb19f27f7b70a4ddc92c2" => :high_sierra - end - - depends_on "python@3.8" - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/c6/62/8a2bef01214eeaa5a4489eca7104e152968729512ee33cb5fbbc37a896b7/beautifulsoup4-4.9.1.tar.gz" - sha256 "73cc4d115b96f79c7d77c1c7f7a0a8d4c57860d1041df407dd1aae7f07a77fd7" - end - - resource "bottle" do - url "https://files.pythonhosted.org/packages/d9/4f/57887a07944140dae0d039d8bc270c249fc7fc4a00744effd73ae2cde0a9/bottle-0.12.18.tar.gz" - sha256 "0819b74b145a7def225c0e83b16a4d5711fde751cd92bae467a69efce720f69e" - end - - resource "cachetools" do - url "https://files.pythonhosted.org/packages/30/62/88fda08df9053141647b6941141b71b4c2a23d0fabab485feb917428ab46/cachetools-4.1.0.tar.gz" - sha256 "1d057645db16ca7fe1f3bd953558897603d6f0b9c51ed9d11eb4d071ec4e2aab" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b4/19/53433f37a31543364c8676f30b291d128cdf4cd5b31b755b7890f8e89ac8/certifi-2020.4.5.2.tar.gz" - sha256 "5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "google-api-core" do - url "https://files.pythonhosted.org/packages/ca/b5/76ac5bca094f6896974206ce2a6608126cd6286e52846c6f78bb32d336d5/google-api-core-1.20.0.tar.gz" - sha256 "eec2c302b50e6db0c713fb84b71b8d75cfad5dc6d4dffc78e9f69ba0008f5ede" - end - - resource "google-api-python-client" do - url "https://files.pythonhosted.org/packages/86/a3/24e22a8e43839e6759ed6eec0dc37ec62b1a6be3a40f7145f6d79155cbce/google-api-python-client-1.9.2.tar.gz" - sha256 "6b24022c75b38a1b323a74129d09af1131078b7c0d337ac8fa6461d5f8b2b0e9" - end - - resource "google-auth" do - url "https://files.pythonhosted.org/packages/ea/a9/295c9a8604f8707d77e92a8e5d765da33e49648dfd156bc0e13efa4233da/google-auth-1.16.1.tar.gz" - sha256 "2f1a6bc3031fc7cd0c1aeb225ad34febcb60268f71f5df75d5976dd20a52c002" - end - - resource "google-auth-httplib2" do - url "https://files.pythonhosted.org/packages/e7/32/ac7f30b742276b4911a1439c5291abab1b797ccfd30bc923c5ad67892b13/google-auth-httplib2-0.0.3.tar.gz" - sha256 "098fade613c25b4527b2c08fa42d11f3c2037dda8995d86de0745228e965d445" - end - - resource "googleapis-common-protos" do - url "https://files.pythonhosted.org/packages/95/3f/a1282d82def57e0c28bab597d25785774a4e64433aac9cc136e65c500da8/googleapis-common-protos-1.52.0.tar.gz" - sha256 "560716c807117394da12cecb0a54da5a451b5cf9866f1d37e9a5e2329a665351" - end - - resource "httplib2" do - url "https://files.pythonhosted.org/packages/98/3f/0769a851fbb0ecc458260055da67d550d3015ebe6b8b861c79ad00147bb9/httplib2-0.18.1.tar.gz" - sha256 "8af66c1c52c7ffe1aa5dc4bcd7c769885254b0756e6e69f953c7f0ab49a70ba3" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/03/a8/73d795778143be51d8b86750b371b3efcd7139987f71618ad9f4b8b65543/lxml-4.5.1.tar.gz" - sha256 "27ee0faf8077c7c1a589573b1450743011117f1aa1a91d5ae776bbc5ca6070f2" - end - - resource "more-itertools" do - url "https://files.pythonhosted.org/packages/16/e8/b371710ad458e56b6c74b82352fdf1625e75c03511c66a75314f1084f057/more-itertools-8.3.0.tar.gz" - sha256 "558bb897a2232f5e4f8e2399089e35aecb746e1f9191b6584a151647e89267be" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/55/fd/fc1aca9cf51ed2f2c11748fa797370027babd82f87829c7a8e6dbe720145/packaging-20.4.tar.gz" - sha256 "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8" - end - - resource "pluggy" do - url "https://files.pythonhosted.org/packages/f8/04/7a8542bed4b16a65c2714bf76cf5a0b026157da7f75e87cc88774aa10b14/pluggy-0.13.1.tar.gz" - sha256 "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0" - end - - resource "ply" do - url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" - sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" - end - - resource "protobuf" do - url "https://files.pythonhosted.org/packages/ab/e7/8001b5fc971078a15f57cb56e15b699cb0c0f43b1dffaa2fae39961d80da/protobuf-3.12.2.tar.gz" - sha256 "49ef8ab4c27812a89a76fa894fe7a08f42f2147078392c0dee51d4a444ef6df5" - end - - resource "py" do - url "https://files.pythonhosted.org/packages/bd/8f/169d08dcac7d6e311333c96b63cbe92e7947778475e1a619b674989ba1ed/py-1.8.1.tar.gz" - sha256 "5e27081401262157467ad6e7f851b7aa402c5852dbcb3dae06768434de5752aa" - 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/88/87/72eb9ccf8a58021c542de2588a867dbefc7556e14b2866d1e40e9e2b587e/pyasn1-modules-0.2.8.tar.gz" - sha256 "905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "pytest" do - url "https://files.pythonhosted.org/packages/8f/c4/e4a645f8a3d6c6993cb3934ee593e705947dfafad4ca5148b9a0fde7359c/pytest-5.4.3.tar.gz" - sha256 "7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "python-magic" do - url "https://files.pythonhosted.org/packages/e3/85/1aff76b966622868a73717abd8b501a3c91890e23a65e5f574ff6df1970f/python-magic-0.4.18.tar.gz" - sha256 "b757db2a5289ea3f1ced9e60f072965243ea43a2221430048fd8cacab17be0ce" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "rsa" do - url "https://files.pythonhosted.org/packages/cb/d0/8f99b91432a60ca4b1cd478fd0bdf28c1901c58e3a9f14f4ba3dba86b57f/rsa-4.0.tar.gz" - sha256 "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "soupsieve" do - url "https://files.pythonhosted.org/packages/3e/db/5ba900920642414333bdc3cb397075381d63eafc7e75c2373bbc560a9fa1/soupsieve-2.0.1.tar.gz" - sha256 "a59dc181727e95d25f781f0eb4fd1825ff45590ec8ff49eadfd7f1a537cc0232" - end - - resource "uritemplate" do - url "https://files.pythonhosted.org/packages/42/da/fa9aca2d866f932f17703b3b5edb7b17114bb261122b6e535ef0d9f618f8/uritemplate-3.0.1.tar.gz" - sha256 "5af8ad10cec94f215e3f48112de2022e1d5a37ed427fbd88652fa908f2ab7cae" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/2e/30/268d9d3ed18439b6983a8e630cd52d81fd7460a152d6e801d1b8394e51a1/wcwidth-0.2.4.tar.gz" - sha256 "8c6b5b6ee1360b842645f336d9e5d68c55817c26d3050f46b235ef2bc650e48f" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"example.ledger").write shell_output("#{bin}/bean-example").strip - assert_equal "", shell_output("#{bin}/bean-check #{testpath}/example.ledger").strip - end -end diff --git a/Formula/beansdb.rb b/Formula/beansdb.rb deleted file mode 100644 index dd60c9a73220a..0000000000000 --- a/Formula/beansdb.rb +++ /dev/null @@ -1,73 +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 "9838cb03ef9bdaa895e5ceddeb32be9d3895d8f2d055394cce822e6c44262ee7" => :catalina - 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 9aeeff42c0e80..0000000000000 --- a/Formula/beanstalkd.rb +++ /dev/null @@ -1,52 +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.12.tar.gz" - sha256 "f43a7ea7f71db896338224b32f5e534951a976f13b7ef7a4fb5f5aed9f57883f" - - bottle do - cellar :any_skip_relocation - sha256 "eb308ce225c6f335a5a27518b63f8ce70caa263e94afbb7d9c2bb9000c12d974" => :catalina - sha256 "da06f9b4142a163f26de89e5d67c729fd4edd9fbd2dcf3ada91507f92f45ec93" => :mojave - sha256 "d57a1db5de295181c1f5596951160cc65b7f27645806fb35834f6409cbc57a6e" => :high_sierra - 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 eb3343f74abac..0000000000000 --- a/Formula/bear.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Bear < Formula - include Language::Python::Shebang - - desc "Generate compilation database for clang tooling" - homepage "https://github.com/rizsotto/Bear" - url "https://github.com/rizsotto/Bear/archive/2.4.3.tar.gz" - sha256 "74057678642080d193a9f65a804612e1d5b87da5a1f82ee487bbc44eb34993f2" - license "GPL-3.0" - revision 1 - head "https://github.com/rizsotto/Bear.git" - - bottle do - cellar :any - sha256 "9eb44bc5187c1986a1e1650315df5e1632af4ea0333a39fa8c8a2a320c87b072" => :catalina - sha256 "07a6d7a49a420177a0b4abeffc91bdb578527a2c6e16e7807ef35dbb1cd8cc69" => :mojave - sha256 "d7c87944b1c2ada8378c85b7123f026524166bc8629332beb294c1ce83fc180a" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "python@3.8" - - def install - args = std_cmake_args + %W[ - -DPYTHON_EXECUTABLE=#{Formula["python@3.8"].opt_bin}/python3 - ] - system "cmake", ".", *args - system "make", "install" - - rewrite_shebang detected_python_shebang, bin/"bear" - 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 1c6074e1bd535..0000000000000 --- a/Formula/beast.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Beast < Formula - desc "Bayesian Evolutionary Analysis Sampling Trees" - homepage "https://beast.community/" - url "https://github.com/beast-dev/beast-mcmc/archive/v1.10.4.tar.gz" - sha256 "6e28e2df680364867e088acd181877a5d6a1d664f70abc6eccc2ce3a34f3c54a" - license "LGPL-2.1" - revision 1 - head "https://github.com/beast-dev/beast-mcmc.git" - - bottle do - cellar :any_skip_relocation - sha256 "5f4b312595410d83df9099dc15657241dc4cb758d58a5836565127275a6fb912" => :catalina - sha256 "d441fd3733557c8de6c227663566e9ac668562a7ecf113504a8c604490752763" => :mojave - sha256 "2c157d2d74ef17b3fcf8f5cf11d62d1b7ba939f0d7d48872d83706cbeb2b2908" => :high_sierra - end - - depends_on "ant" => :build - depends_on "beagle" - depends_on "openjdk@11" - - def install - ENV["JAVA_HOME"] = Formula["openjdk@11"].opt_prefix - system "ant", "linux" - libexec.install Dir["release/Linux/BEASTv*/*"] - pkgshare.install_symlink libexec/"examples" - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files libexec/"bin", :JAVA_HOME => ENV["JAVA_HOME"] - 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 3e6b765a67ac2..0000000000000 --- a/Formula/bedops.rb +++ /dev/null @@ -1,30 +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.39.tar.gz" - sha256 "f8bae10c6e1ccfb873be13446c67fc3a54658515fb5071663883f788fc0e4912" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "067fa5b0cf0288e60ec7378b07b622218ff385dfc7cadd19ac6fe92ef087aff3" => :catalina - sha256 "a3e404afc30d1f77ebfd5c713933a36fed137ab2086da3d7a07ff08d2cd36fb6" => :mojave - sha256 "d30e93e415036d271dd424feebc451de8de2e6ed195f950ff6682623c2969dab" => :high_sierra - end - - 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 a8fa112d18cc2..0000000000000 --- a/Formula/bedtools.rb +++ /dev/null @@ -1,32 +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.29.2.tar.gz" - sha256 "bc2f36b5d4fc9890c69f607d54da873032628462e88c545dd633d2c787a544a5" - license "MIT" - - bottle do - cellar :any - sha256 "4cdd660e64c7d78876a2ccf60eec8891f484cdd24e2c40ce36800828dffcce1c" => :catalina - sha256 "5c40ac3daf8ba6022cd5229aac50458d80b14920ddd513f2e165b233c9e95e72" => :mojave - sha256 "2f534f9efbdd387764924f2a9e3a08b435cab0ff0a0edabd6bafe8fa4123af6a" => :high_sierra - end - - depends_on "python@3.8" => :build - depends_on "xz" - - uses_from_macos "bzip2" - uses_from_macos "zlib" - - def install - inreplace "Makefile", "python", "python3" - - 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/bee.rb b/Formula/bee.rb deleted file mode 100644 index 0ae2d8725981c..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.80/bee-1.80.zip" - sha256 "42441cd6e48f1dc491b33384e4c80e72425bca660f4fb1c6e830840c3a397e7d" - - 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", "-d", testpath/"bee", "dbchange:create", "new-file" - end -end diff --git a/Formula/beecrypt.rb b/Formula/beecrypt.rb deleted file mode 100644 index 2fc24e1940f2a..0000000000000 --- a/Formula/beecrypt.rb +++ /dev/null @@ -1,77 +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 "977150a0ff6d0a8739539ad4865bcea9fe68d603d22b86d85d6fdef794d66611" => :catalina - 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 3255abc3421a0..0000000000000 --- a/Formula/befunge93.rb +++ /dev/null @@ -1,26 +0,0 @@ -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" - head "https://github.com/catseye/Befunge-93.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "190fa82b0fef31f096a102f3b33205112cb206f578813f7ac78f78617c7d73d3" => :catalina - sha256 "23dd470caf59b04ffb652e46061760701269a8a79ce93c3afd71318da000112d" => :mojave - sha256 "c8a1e2085413dd0da3036462eeffed2f01198da92f128f4951c0885bf69a0149" => :high_sierra - 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 26202e99b1f04..0000000000000 --- a/Formula/bench.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Bench < Formula - desc "Command-line benchmark tool" - homepage "https://github.com/Gabriel439/bench" - license "BSD-3-Clause" - revision 1 - head "https://github.com/Gabriel439/bench.git" - - stable do - url "https://hackage.haskell.org/package/bench-1.0.12/bench-1.0.12.tar.gz" - sha256 "a6376f4741588201ab6e5195efb1e9921bc0a899f77a5d9ac84a5db32f3ec9eb" - - # Compatibility with GHC 8.8. Remove with the next release. - patch do - url "https://github.com/Gabriel439/bench/commit/846dea7caeb0aee81870898b80345b9d71484f86.patch?full_index=1" - sha256 "fac63cd1ddb0af3bda78900df3ac5a4e6b6d2bb8a3d4d94c2f55d3f21dc681d1" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "b1eccbf77a04e4de1a59a0eed5c0f6e2d8b6b191736ee9ad4fdea9a173010651" => :catalina - sha256 "493de8888b6fe1745a887cda10a421448a08943496124b1cb49cc02453002638" => :mojave - sha256 "cd0e9ae0bc13d3db0330ae839689d9b2d129bc0bf0c1b7165033968a9e6a0f22" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.8" => :build - - 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/benthos.rb b/Formula/benthos.rb deleted file mode 100644 index fd5bf43bfbb39..0000000000000 --- a/Formula/benthos.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Benthos < Formula - desc "Stream processor for mundane tasks written in Go" - homepage "https://www.benthos.dev/" - url "https://github.com/Jeffail/benthos/archive/v3.20.0.tar.gz" - sha256 "2765b49c8ea364e9085b5f6b484b21d8bb4b1974715e164a92d543098df6fdd5" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "90dc8a58e7b02e75ecb587a639a9f4c246700c87086eadfbb6ea83c8645faeac" => :catalina - sha256 "ee9dcf0b3820ef7241ddad29fda38114abd3dd3bb8009c81291b3cad08991a0a" => :mojave - sha256 "aaeb4398e590ae40409e626b79bde87be24527f532178d2e2cffa7bca2f5e83e" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "VERSION=#{version}" - bin.install "target/bin/benthos" - end - - test do - (testpath/"sample.txt").write <<~EOS - QmVudGhvcyByb2NrcyE= - EOS - - (testpath/"test_pipeline.yaml").write <<~EOS - --- - logger: - level: ERROR - input: - type: file - file: - path: ./sample.txt - pipeline: - threads: 1 - processors: - - type: decode - decode: - scheme: base64 - output: - type: stdout - EOS - output = shell_output("#{bin}/benthos -c test_pipeline.yaml") - assert_match "Benthos rocks!", output.strip - end -end diff --git a/Formula/bento4.rb b/Formula/bento4.rb deleted file mode 100644 index 40092de20ff4c..0000000000000 --- a/Formula/bento4.rb +++ /dev/null @@ -1,46 +0,0 @@ -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-632.zip" - version "1.6.0-632" - sha256 "faa3a406dc24c3d34d29661bbbe94b42c7f7deee9a5c624696a055bb9b7da6ad" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "c2a563a7f037d33921334541e706a3f98ae0556ff08ba3e33992d4c26342de19" => :catalina - sha256 "f74dc8941419a6fffe52606dd40e2f612a8b8713ea6249fc6d20b6f3656e1859" => :mojave - sha256 "39cf05c54bc595fa014196b8f0fa0847e2d39d25e720bf9c6b581a578a77631b" => :high_sierra - end - - depends_on :xcode => :build - depends_on "python@3.8" - - 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/berglas.rb b/Formula/berglas.rb deleted file mode 100644 index 09936c6cb71e7..0000000000000 --- a/Formula/berglas.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Berglas < Formula - desc "Tool for managing secrets on Google Cloud" - homepage "https://github.com/GoogleCloudPlatform/berglas" - url "https://github.com/GoogleCloudPlatform/berglas/archive/v0.5.3.tar.gz" - sha256 "d85cf4b049346b8e643f0870c37c4ea7dee147f10c7f001c828071c13df2fa70" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "d895f86692ef19159a769e2c30742f694ffbd54dbe272f58a9c755a097bbb3a8" => :catalina - sha256 "56c43d970f6af85431a1a40b6c249de56c2e22f74c385919118351de749a4a7a" => :mojave - sha256 "cde26510e8ea539500c5b76a3b7130a4f29d03c1776eb36e4e1043f065f52dbb" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-mod=vendor", *std_go_args - end - - test do - out = shell_output("#{bin}/berglas list homebrewtest 2>&1", 61) - assert_match "could not find default credentials.", out - end -end diff --git a/Formula/berkeley-db.rb b/Formula/berkeley-db.rb deleted file mode 100644 index cb109b211795a..0000000000000 --- a/Formula/berkeley-db.rb +++ /dev/null @@ -1,80 +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.32.tar.gz" - mirror "https://fossies.org/linux/misc/db-18.1.32.tar.gz" - sha256 "fa1fe7de9ba91ad472c25d026f931802597c29f28ae951960685cde487c8d654" - revision 1 - - bottle do - cellar :any - sha256 "f2fc006ecf0cddfeaf94af43572ca4cebc6654d8a87f3ebfdb55329174596887" => :catalina - sha256 "eb5d0a59cec0fab48a0539f96195b1890599603577ca1792f831085418b19707" => :mojave - sha256 "fa53aeeca3bef551d9f604b5eafb6b94bf1f14b95530a8d16e243fb7c2ad790e" => :high_sierra - sha256 "1b3c06f6d3b1f45180068cb7127508072ed661e981e922dd273d6faef0030bc1" => :sierra - end - - depends_on "openssl@1.1" - - 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 - ] - - # 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 1ee0bb2684702..0000000000000 --- a/Formula/berkeley-db@4.rb +++ /dev/null @@ -1,77 +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 "dd3b7576ecc1a56ebf51c5104eba8fd129d26efd6cd47adeeeb1ec203bbab712" => :catalina - 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 ffbe093eef6ac..0000000000000 --- a/Formula/bettercap.rb +++ /dev/null @@ -1,37 +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.28.tar.gz" - sha256 "5bde85117679c6ed8b5469a5271cdd5f7e541bd9187b8d0f26dee790c37e36e9" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "0614862741982083f1629e32b87d84116917e218cac936a078061b898a1e3f04" => :catalina - sha256 "805fbdc7281828c316c6fc91454c7f101ab7be69b235b1e32aa78dbaf55da8d3" => :mojave - sha256 "6709b0ce6657bc3732dee9079d7635dbab2450d233c57f82e5758e2d0978a38e" => :high_sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - depends_on "pkg-config" => :build - depends_on "libusb" - - uses_from_macos "libpcap" - - def install - 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 - 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 5be6ba5de642a..0000000000000 --- a/Formula/betty.rb +++ /dev/null @@ -1,19 +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 - - 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 0894329c40119..0000000000000 --- a/Formula/bfg.rb +++ /dev/null @@ -1,23 +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" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "bfg-#{version}.jar" - (bin/"bfg").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/bfg-#{version}.jar" "$@" - EOS - end - - test do - system "#{bin}/bfg" - end -end diff --git a/Formula/bgpdump.rb b/Formula/bgpdump.rb deleted file mode 100644 index 6972a196a8674..0000000000000 --- a/Formula/bgpdump.rb +++ /dev/null @@ -1,29 +0,0 @@ -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/v1.6.2.tar.gz" - sha256 "415692c173a84c48b1e927a6423a4f8fd3e6359bc3008c06b7702fe143a76223" - - bottle do - cellar :any - sha256 "f7c93574ccb3a6eaa05910009e26068f99f14082df78d3b2b0b84166488657e5" => :catalina - sha256 "271ccd88799103255a673c6eafba9ec39320a8eb1a5a80bc8eef25ec508c31a6" => :mojave - sha256 "441599b105e925cf6875f3e1d1a380cf94ec1069b214872173cd08736cd8671c" => :high_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", "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 eee0986d64781..0000000000000 --- a/Formula/bgpq3.rb +++ /dev/null @@ -1,48 +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 "428a0dcb0af2876c03374236ee10b2385ab993dc54cc12e080198d7e552bbdea" => :catalina - 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 1517957ae796d..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.2.3.tar.gz" - sha256 "2c1affec8d38a9f750029e48b77a46064937d3e41f6c10dfac72777fa934cd74" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "26f6a06267aa23f01fa2b625b1d5ae61d54a9f792707227892c38e30999bb456" => :catalina - sha256 "23ffe0dcc9ba7fbc1b497b955b81a6515d269f93be06356dd00e531ac8d8d96d" => :mojave - sha256 "8110166953d43112cd014092d0dc58005ceae09983156b73dd7ec7ada7af33af" => :high_sierra - sha256 "d1541897010832dee6be24eb2e37ebe59899653f2277da1b34d29c6953754b6e" => :sierra - 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 2c0fca5052738..0000000000000 --- a/Formula/bgrep.rb +++ /dev/null @@ -1,32 +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 "444a8dd0c2190e3a75574f8bee287895aee1d070d3e72e72fd7cda4c9cb77211" => :catalina - 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 3cda5c0b0bb75..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_68/BibTool-2.68.tar.gz" - sha256 "e1964d199b0726f431f9a1dc4ff7257bb3dba879b9fa221803e0aa7840dee0e0" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "26f2121d720fa6ffc20547b0bfc6754930f6b8660b51f634c686279dae7e73ce" => :catalina - sha256 "d75a1a60204b002cc06acc025cfdc74db76a563b9bb508876d0e45d771f61dc8" => :mojave - sha256 "0d92e3fead68380fc84cbf5517d2ed2eecdfcbfc1fc14c6343f51ee60d43f948" => :high_sierra - 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 4fbdbddaefff5..0000000000000 --- a/Formula/bibclean.rb +++ /dev/null @@ -1,51 +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-3.04.tar.xz" - mirror "https://dl.bintray.com/homebrew/mirror/bibclean-3.04.tar.xz" - sha256 "4fa68bfd97611b0bb27b44a82df0984b300267583a313669c1217983b859b258" - license "GPL-2.0" - - bottle do - sha256 "15dbbabace79aafd93546976d8a899a393c6489d7951ce2bd2bb148a45f262a3" => :catalina - sha256 "82a7919c9d5054012b54d53eacf5a9c0785105071c4c65c83bc2ff428642b3e5" => :mojave - sha256 "9a2beadc688b6b12a22359890a6a85f20f3c79af561b5d4268e86069b806f585" => :high_sierra - 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 <<~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 a8fb2b8ba7988..0000000000000 --- a/Formula/bibtex2html.rb +++ /dev/null @@ -1,43 +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 - rebuild 2 - sha256 "e9c4f95aaae6ddb40473a8c4349dbd9455c58e71ea4f580c8aa268292578464d" => :catalina - sha256 "1a56c6ff9929a75570f231a4fd8b1a4e367d82a8a632c4a45f126b1845ff8ff3" => :mojave - sha256 "e2b32aea9dcfb51cff11b8014425975198b73b3a74f48c2f7103e01ef2ec7a9b" => :high_sierra - 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 "./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 036616ae992f1..0000000000000 --- a/Formula/bibtexconv.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Bibtexconv < Formula - desc "BibTeX file converter" - homepage "https://www.uni-due.de/~be0001/bibtexconv/" - url "https://github.com/dreibh/bibtexconv/archive/bibtexconv-1.1.20.tar.gz" - sha256 "5fbc14d0181ec7eeb024a628af070ce7286f2cb92147c3ffa8504201cfcc3f8b" - license "GPL-3.0" - head "https://github.com/dreibh/bibtexconv.git" - - bottle do - cellar :any - sha256 "bd1a809b90e1092407e7a81fe30aca8f8df52791fa701afc7b65c4dc74f6f5d0" => :catalina - sha256 "b8f6412efed90b19aff5945ab58113ae7849f338527a801e48f531a31e289bc5" => :mojave - sha256 "294bfcaa004f25eee6806d01d80dce51a3e88e172034b2696247aa2c8776196b" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - uses_from_macos "curl" - - def install - system "cmake", *std_cmake_args, - "-DCRYPTO_LIBRARY=#{Formula["openssl@1.1"].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 26c5256dd5c8e..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.10_src.tgz" - sha256 "8656c042fa1371443aa4e1a58bcab5fcea0b236eb39182e4004fc348ce56e496" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "eeb586f94730c9030e089a45e4360c5cb3171c6e41ba738744fe4e5a30e31cb7" => :catalina - sha256 "f420f3882e82a0bf4441c804ed065b5272ce1e5d03812392534d91b29814cd13" => :mojave - sha256 "4fb4ed2978195afedc30fff98661e2663120bd956633845b7e41967dd7a28621" => :high_sierra - 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/bic.rb b/Formula/bic.rb deleted file mode 100644 index 35f51252783b7..0000000000000 --- a/Formula/bic.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Bic < Formula - desc "C interpreter and API explorer" - homepage "https://github.com/hexagonal-sun/bic" - url "https://github.com/hexagonal-sun/bic/releases/download/v1.0.0/bic-v1.0.0.tar.gz" - sha256 "553324e39d87df59930d093a264c14176d5e3aaa24cd8bff276531fb94775100" - license "GPL-2.0" - bottle do - cellar :any - sha256 "41d1871d125642f8437b5bb7b74f205b0eee956be0ad46b7677680b76764c0cb" => :catalina - sha256 "36575a3c3444985140e94eba8fe8f6711fff5433eb7f17141c4b4ae30e1f2bf7" => :mojave - sha256 "23f308f2bfda3b9ee498680e08565997818570d74d1280137ef940f70801b8d9" => :high_sierra - end - - head do - url "https://github.com/hexagonal-sun/bic.git" - - 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 if build.head? - - uses_from_macos "flex" => :build - end - - depends_on "gmp" - - on_linux do - depends_on "readline" - end - - def install - system "autoreconf", "-fi" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"hello.c").write <<~EOS - #include - int main () { - puts("Hello Homebrew!"); - } - EOS - assert_equal "Hello Homebrew!", shell_output("#{bin}/bic -s hello.c").strip - end -end diff --git a/Formula/bigloo.rb b/Formula/bigloo.rb deleted file mode 100644 index 8c63248e0adef..0000000000000 --- a/Formula/bigloo.rb +++ /dev/null @@ -1,67 +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.3e.tar.gz" - version "4.3e" - sha256 "43363cb968c57925f402117ff8ec4b47189e2747b02350805a34fa617d9f618a" - revision 1 - - bottle do - sha256 "06c2d3728e778db36954a6fca8ecc8cb663d90122a884cfb0fc96ce1de36663a" => :catalina - sha256 "5de69de8a1afee85a7b6af5d024c80ff3ceb7acc8e391c20fd24398122cfad9a" => :mojave - sha256 "26a5f98ee71f7794ced067f64a695f040ef271413ac58b0e0cbfa883ab44ee73" => :high_sierra - sha256 "2844e66dfeecc9cfe4ad85558f2d2be450b5aea3acad7461402e9fcb7fb5bbdd" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - depends_on "gmp" - depends_on "openssl@1.1" - - 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 - --jvm=yes - ] - - 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 517f2d0339387..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_94.tar.gz" - sha256 "af7d9d66cb3d8667ee8b3f92927cf94599ce4fcf308fc919853c11197f28b03d" - license "Apache-2.0" - head "https://github.com/WebAssembly/binaryen.git" - - bottle do - cellar :any - sha256 "016c25e72286a54427742ca4ceac4d23cd24c0e6bf6397096924dd20ca3b776b" => :catalina - sha256 "cdea2ab19518998a3f9799a8ec28169547cc92726c5103df85926ca187cfe4b1" => :mojave - sha256 "2fcd8ab42c28422fb1be1b83e3eed243b0b7093c4b137f7fcdf4e4ca1d3190b5" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "python@3.8" => :build - depends_on :macos => :el_capitan # needs thread-local storage - - 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 faae2340e3b93..0000000000000 --- a/Formula/bind.rb +++ /dev/null @@ -1,199 +0,0 @@ -class Bind < Formula - desc "Implementation of the DNS protocols" - homepage "https://www.isc.org/downloads/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.16.4/bind-9.16.4.tar.xz" - sha256 "7522088d3daac8bcabaae37998178e09139ef5ccae6631cb1d8a625b770f370a" - revision 1 - version_scheme 1 - head "https://gitlab.isc.org/isc-projects/bind9.git" - - bottle do - sha256 "32c69f20da6f24f400e5b61898c1815aea58422590e5b4261a29778770359a80" => :catalina - sha256 "50b199ff7da9221a4bde549bff8e2ae736ebe857db5275b762c3dca2e909a4ff" => :mojave - sha256 "18de1ce65e54f8deb367a45f9c34c57a90bc1595c4e2268d59903ce178b028fe" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "json-c" - depends_on "libuv" - depends_on "openssl@1.1" - depends_on "python@3.8" - - resource "ply" do - url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" - sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" - end - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - vendor_site_packages = libexec/"vendor/lib/python#{xy}/site-packages" - ENV.prepend_create_path "PYTHONPATH", vendor_site_packages - resources.each do |r| - r.stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - # Fix "configure: error: xml2-config returns badness" - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra || MacOS.version == :el_capitan - - system "./configure", "--prefix=#{prefix}", - "--with-json-c", - "--with-openssl=#{Formula["openssl@1.1"].opt_prefix}", - "--with-libjson=#{Formula["json-c"].opt_prefix}", - "--with-python-install-dir=#{vendor_site_packages}", - "--with-python=#{Formula["python@3.8"].opt_bin}/python3", - "--without-lmdb" - - 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 7f28c441f09ad..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.14.7.tar.gz" - sha256 "2826e7c01928c9c260e7d1fc20ce8e820432b2de1a0f0c6c0193bdbb13f378d1" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "1b6004bba2060be73c1bb139ce3ebd5edf33fbb542a91672b5e98ac149126775" => :catalina - sha256 "eba7a033496208341d5ce0fb59e3871cbb7503b7d2f6c73922bb9764f539b3b2" => :mojave - sha256 "b18a684fe8e4bff83e37e1a36eefd66ea24e1a8ebf31bcc2f0c3c5b7e4348402" => :high_sierra - 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/bingrep.rb b/Formula/bingrep.rb deleted file mode 100644 index bb49a7f21b55e..0000000000000 --- a/Formula/bingrep.rb +++ /dev/null @@ -1,24 +0,0 @@ -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/v0.8.2.tar.gz" - sha256 "5647d78166a2d768b98ae03bd40427f2263b28b81213882d42f638c5b96619e2" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "38cb293ea71d8d11e422838e378cb67b09334590ed501e45b9a0f6da7d70f3ac" => :catalina - sha256 "cef323546a1e6978ca5a67f9f18333819e318bbe136d9ba210c1fbd89f4af82f" => :mojave - sha256 "d63ae62eff912723629b9d991fb77771f700ee306cf3b3cc40a934e3f2f13dd1" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - system bin/"bingrep", bin/"bingrep" - end -end diff --git a/Formula/binkd.rb b/Formula/binkd.rb deleted file mode 100644 index 3e11dabe47097..0000000000000 --- a/Formula/binkd.rb +++ /dev/null @@ -1,34 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "263219b174c193cd86454770d838013daa797994d8d21cdca45493a59d8a5a79" => :catalina - 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 840118e7f2e03..0000000000000 --- a/Formula/binutils.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Binutils < Formula - desc "GNU binary tools for native development" - homepage "https://www.gnu.org/software/binutils/binutils.html" - url "https://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.xz" - mirror "https://ftpmirror.gnu.org/binutils/binutils-2.34.tar.xz" - sha256 "f00b0e8803dc9bab1e2165bd568528135be734df3fabf8d0161828cd56028952" - license "GPL-2.0" - - bottle do - sha256 "1e21593a927df65e405f9d3bdc8f86fe83b1236c5c945641a2de775c99327953" => :catalina - sha256 "142e380448ac77bc0f7974ff9b9ddae6a90c4ef5f182cac0c2b029baa8460173" => :mojave - sha256 "87bda0c909a5bd2043d35b073f2268cac7aed074a89d903973e4909d68dfdf46" => :high_sierra - end - - keg_only :shadowed_by_macos, "Apple's CLT provides the same tools" - - uses_from_macos "zlib" - - 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 92b8f7b3b4c40..0000000000000 --- a/Formula/binwalk.rb +++ /dev/null @@ -1,81 +0,0 @@ -class Binwalk < Formula - include Language::Python::Virtualenv - - 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.2.0.tar.gz" - sha256 "f5495f0e4c5575023d593f7c087c367675df6aeb7f4d9a2966e49763924daa27" - license "MIT" - revision 2 - head "https://github.com/ReFirmLabs/binwalk.git" - - bottle do - cellar :any - sha256 "d412322a98c5207c19bdf2d0b7d6abcb6133f875fc48d6227c4c69213e761852" => :catalina - sha256 "0edd480cef965ccd9d112aa0f2699e53420aab5a9c9d7397856d6dc0c476cae8" => :mojave - sha256 "8ce1ff5841406677da86e5b0976dd7230ae814616a3b368eb8020c467b2e4235" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "swig" => :build - depends_on "freetype" - depends_on "libpng" - depends_on "p7zip" - depends_on "python@3.8" - depends_on "ssdeep" - depends_on "xz" - - resource "capstone" do - url "https://files.pythonhosted.org/packages/2a/a2/026cc921a6ac7e4fcd0c2ba740edce4c37c56af63a79e570bebaf3bd7c50/capstone-4.0.1.tar.gz" - sha256 "5857accc0de1e769b0ec0a0ca985715bfa96e5a66a2ebb3aaed43a8e3655377f" - end - - resource "Cycler" do - url "https://files.pythonhosted.org/packages/c2/4b/137dea450d6e1e3d474e1d873cd1d4f7d3beed7e0dc973b06e8e10d32488/cycler-0.10.0.tar.gz" - sha256 "cd7b2d1018258d7247a71425e9f26463dfb444d411c39569972f4ce586b0c9d8" - end - - resource "kiwisolver" do - url "https://files.pythonhosted.org/packages/62/b8/db619d97819afb52a3ff5ff6ad3f7de408cc83a8ec2dfb31a1731c0a97c2/kiwisolver-1.2.0.tar.gz" - sha256 "247800260cd38160c362d211dcaf4ed0f7816afb5efe56544748b21d6ad6d17f" - end - - resource "matplotlib" do - url "https://files.pythonhosted.org/packages/4a/30/eb8e7dd8e3609f05c6920fa82f189302c832e5a0f6667aa96f952056bc0c/matplotlib-3.2.1.tar.gz" - sha256 "ffe2f9cdcea1086fc414e82f42271ecf1976700b8edd16ca9d376189c6d93aee" - end - - resource "numpy" do - url "https://files.pythonhosted.org/packages/84/1e/ff467ac56bfeaea51d4a2e72d315c1fe440b20192fea7e460f0f248acac8/numpy-1.18.2.zip" - sha256 "e7894793e6e8540dbeac77c87b489e331947813511108ae097f1715c018b8f3d" - 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/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - def install - virtualenv_install_with_resources - 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 fdeded37414ff..0000000000000 --- a/Formula/bioawk.rb +++ /dev/null @@ -1,37 +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 "c7377ef6e226404f71d52c04715ea0bb8456e1c90493e93e78101dfb3ed2190e" => :catalina - sha256 "7082d4073e07ba3dfa849f95eb126d966a45f9fceb1d197595119a216e465727" => :mojave - sha256 "023f5cafaa31404e68b8fc6bcfbeee27e63eb5fbcab897d2f406fceda90ec9ff" => :high_sierra - sha256 "154d44dd9ea56db8170127711e991950d487e379ae12df76332e4b7512f79fe8" => :sierra - sha256 "df0810bc087f924cdddcdb73f00faf9772de9475e0e698c7af8a7d036b3a4c91" => :el_capitan - 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/biosig.rb b/Formula/biosig.rb deleted file mode 100644 index 7a393e1087523..0000000000000 --- a/Formula/biosig.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Biosig < Formula - desc "Tools for biomedical signal processing and data conversion" - homepage "https://biosig.sourceforge.io/" - url "https://downloads.sourceforge.net/project/biosig/BioSig%20for%20C_C%2B%2B/src/biosig-2.0.4.src.tar.gz" - sha256 "2b2b5d0cdb7a886b7c390d000bb9210b9b6e03f790c6443730dab96496926928" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "7faee142a4545ee3bcfcd393b9c748b3cfa788a35a410e0299e562a58a026426" => :catalina - sha256 "4560a057f36948b31ceb176ca1edc978e8b1b5ac5f5a5a9b4ccafe9c32b7c787" => :mojave - sha256 "95e1c70220b78441a73db60830eb00dc380810e6b0aab5209cc00c51eaa36612" => :high_sierra - end - - depends_on "gawk" => :build - depends_on "gnu-sed" => :build - depends_on "gnu-tar" => :build - depends_on "pkg-config" => :build - depends_on "dcmtk" - depends_on "libb64" - depends_on "suite-sparse" - depends_on "tinyxml" - - resource "test" do - url "https://pub.ist.ac.at/~schloegl/download/TEST_44x86_e1.GDF" - sha256 "75df4a79b8d3d785942cbfd125ce45de49c3e7fa2cd19adb70caf8c4e30e13f0" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - 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 - testpath.install resource("test") - assert_match "NumberOfChannels", shell_output("#{bin}/save2gdf -json TEST_44x86_e1.GDF").strip - assert_match "NumberOfChannels", shell_output("#{bin}/biosig_fhir TEST_44x86_e1.GDF").strip - end -end diff --git a/Formula/bison.rb b/Formula/bison.rb deleted file mode 100644 index a8accd413113d..0000000000000 --- a/Formula/bison.rb +++ /dev/null @@ -1,54 +0,0 @@ -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://ftp.gnu.org/gnu/bison/bison-3.6.4.tar.xz" - mirror "https://ftpmirror.gnu.org/bison/bison-3.6.4.tar.xz" - sha256 "8b13473b31ca7fcf65e5e8a74224368ffd5df19275602a9c9567ba393f18577d" - license "GPL-3.0" - version_scheme 1 - - bottle do - sha256 "fa08dd0a1dba7bfa9ed18da2ffb499ebcc937e6cbc5a1f6acef3d21100809488" => :catalina - sha256 "63bf0bf94d33d9c54626574815748ad614ebe8e9bdcf157a4053c98fcecde837" => :mojave - sha256 "6d3c4120535bafcb81ef4539d6cf7422a03a158192bf2c2555e52850673e8047" => :high_sierra - end - - keg_only :provided_by_macos - - uses_from_macos "m4" - - 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 153062e6bc7e2..0000000000000 --- a/Formula/bison@2.7.rb +++ /dev/null @@ -1,59 +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 "b9af668b0da3e89f4a2d7b7e4d42009965780d1f7cd1541df85f758c2b7af55a" => :catalina - 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 a3605e65d52c2..0000000000000 --- a/Formula/bit.rb +++ /dev/null @@ -1,30 +0,0 @@ -require "language/node" - -class Bit < Formula - desc "Distributed Code Component Manager" - homepage "https://bit.dev/" - url "https://registry.npmjs.org/bit-bin/-/bit-bin-14.8.7.tgz" - sha256 "04acda3824a0dc67e92e5fb6e9d65f28e7635148b9dc270297cc8ee3c64e106a" - head "https://github.com/teambit/bit.git" - - bottle do - sha256 "cf2becd23de2a545f593d4af6bba25880d862408364a8badb37d90981b854d55" => :catalina - sha256 "86942f8c8c0781ab5d36571960bbbff81314e749e6b861fd62ed5365bd4280aa" => :mojave - sha256 "6ce2e9e3513bb66d823c893023bd50e4c702c6310edc0b55ee1673bcbaf0b92e" => :high_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/"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 3bd243317384d..0000000000000 --- a/Formula/bitchx.rb +++ /dev/null @@ -1,36 +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" - revision 1 - - bottle do - sha256 "9e24f64d188be8be36054aad67ead05bffd2f1b5a7c6bef6bc9f98f7ea92fb87" => :catalina - sha256 "52939d589b5697402b6b5c658ab065651ac1943e8c7c7c9798aca5f76790be00" => :mojave - sha256 "0a021e6d01b7f7d4ee9d048459ab7367b48da791896b2edeb96e270b196ff202" => :high_sierra - sha256 "0c9e7fcf39a8fb0c80f867495cf1d6776fbe4aec6010a1986edbca820ed7a6f0" => :sierra - end - - depends_on "openssl@1.1" - - def install - # 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" - - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--enable-ipv6", - "--with-plugins=acro,aim,arcfour,amp,autocycle,blowfish,cavlink,encrypt,fserv," \ - "hint,identd,nap,pkga,possum,qbx,qmail", - "--with-ssl" - system "make" - system "make", "install" - end - - test do - system bin/"BitchX", "-v" - end -end diff --git a/Formula/bitcoin.rb b/Formula/bitcoin.rb deleted file mode 100644 index ea6f1150514f2..0000000000000 --- a/Formula/bitcoin.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Bitcoin < Formula - desc "Decentralized, peer to peer payment network" - homepage "https://bitcoin.org/" - url "https://bitcoin.org/bin/bitcoin-core-0.20.0/bitcoin-0.20.0.tar.gz" - sha256 "ec5a2358ee868d845115dc4fc3ed631ff063c57d5e0a713562d083c5c45efb28" - license "MIT" - head "https://github.com/bitcoin/bitcoin.git" - - bottle do - cellar :any - sha256 "bd973d1a270840ac5d1e2832c557117563ddeeb0a2bb80376ece027faf712d8e" => :catalina - sha256 "edbe7d600b27737c0dfe002a6c447e1f17910746aecb2f7724af256253b60eb2" => :mojave - sha256 "32bab1fc1ea25e3881570088aecce050c10f46f57601981db797ec66c6b94ad4" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "berkeley-db@4" - depends_on "boost" - depends_on "libevent" - depends_on "miniupnpc" - depends_on "zeromq" - - def install - ENV.delete("SDKROOT") if MacOS.version == :el_capitan && MacOS::Xcode.version >= "8.0" - - system "./autogen.sh" - 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 9b07a38a078c9..0000000000000 --- a/Formula/bitlbee.rb +++ /dev/null @@ -1,99 +0,0 @@ -class Bitlbee < Formula - desc "IRC to other chat networks gateway" - homepage "https://www.bitlbee.org/" - license "GPL-2.0" - head "https://github.com/bitlbee/bitlbee.git" - - stable do - url "https://get.bitlbee.org/src/bitlbee-3.6.tar.gz" - sha256 "9f15de46f29b46bf1e39fc50bdf4515e71b17f551f3955094c5da792d962107e" - end - - bottle do - sha256 "52da03d26df7e96ae71125343859b754e24146c8ad5e6c58bc33eb634862ef40" => :catalina - sha256 "d6f39cdbf633e779a47d625e8c62393d75fe1656d4d1d8cbe342940fb65cba53" => :mojave - sha256 "cefcf70546bf4746913b64ee8c282deb9ca15ffb61a0e564f3f1dc8da09fb447" => :high_sierra - 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 dec550ca6bea9..0000000000000 --- a/Formula/bitrise.rb +++ /dev/null @@ -1,47 +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.42.0.tar.gz" - sha256 "adf7c3697689d1088f08a3e5e685caba47b47eac631ecda7e79cdcf8c37bae6c" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "be12010efef572c81e44f103fed0667d5e0919f04693360730cc3a23c783b9ac" => :catalina - sha256 "2376e5b982ba2714a22d76d8605aebd5e5e668e66d79e79266c2e74ec7958161" => :mojave - sha256 "120bd8f30c634d9667552feb74a5b1263b70fd06299537406a9f2dcde5ec13ac" => :high_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 f0ed184786400..0000000000000 --- a/Formula/bittwist.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "784d96d15ae2ba653dcf4289cfbc58d16359e32bbb9e178a346d2dd6ee62c18a" => :catalina - 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 7c0b8a77abcef..0000000000000 --- a/Formula/bitwarden-cli.rb +++ /dev/null @@ -1,30 +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.11.0.tgz" - sha256 "05b8e98100b4b09cbe9947b590f287c23096ba2aa1cc7ee471d707de951a8982" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "51e8383bae9b679aab1fa6074bd937c5809217ef54ad08912cc6f1e35a6624c6" => :catalina - sha256 "3bec10843b5e7ec281406da08716010e506b2d1735eb92c2e8bf9e08f7f7b31f" => :mojave - sha256 "9de5e68d590ac2a541940afa618b03b1c1c00f207d7b41f3c3da64d127f3674b" => :high_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/bitwise.rb b/Formula/bitwise.rb deleted file mode 100644 index 190937093f3d8..0000000000000 --- a/Formula/bitwise.rb +++ /dev/null @@ -1,31 +0,0 @@ -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.41/bitwise-v0.41.tar.gz" - sha256 "33ce934fb99dadf7652224152cc135a0abf6a211adde53d96e9be7067567749c" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "d7d90a1402b7b87e1989b2504e6c55ea5bea27282f4bf909b6248aac2d5263cd" => :catalina - sha256 "95674ac94d09b5502765956cc94b5f1a9687f22f145e2757bd708f7f7613f913" => :mojave - sha256 "e5e76e2ec3f762a6c79b52552fb5513bc891e55831aa75806f61b75834369d6d" => :high_sierra - 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/black.rb b/Formula/black.rb deleted file mode 100644 index c016fffe5c1d4..0000000000000 --- a/Formula/black.rb +++ /dev/null @@ -1,106 +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/b0/dc/ecd83b973fb7b82c34d828aad621a6e5865764d52375b8ac1d7a45e23c8d/black-19.10b0.tar.gz" - sha256 "c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539" - revision 3 - - bottle do - cellar :any_skip_relocation - sha256 "868f4480634c6571a0d958fee56dce581a51e491f91b759667b9425033a496dd" => :catalina - sha256 "1cb2be65eab785311661e4ad488d4019e15c59ffb5d7495c518118728c72e933" => :mojave - sha256 "7ac913822922277b632cbd5b88cac2898a31db3d17745840280e14060fc653b2" => :high_sierra - end - - depends_on "python@3.8" - - 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/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" - sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" - end - - resource "pathspec" do - url "https://files.pythonhosted.org/packages/93/9c/4bb0a33b0ec07d2076f0b3d7c6aae4dad0a99f9a7a14f7f7ff6f4ed7fa38/pathspec-0.8.0.tar.gz" - sha256 "da45173eb3a6f2a5a487efba21f050af2b41948be6ab52b6a1e3ff22bb8b7061" - end - - resource "regex" do - url "https://files.pythonhosted.org/packages/b8/7b/01510a6229c2176425bda54d15fba05a4b3df169b87265b008480261d2f9/regex-2020.6.8.tar.gz" - sha256 "e9b64e609d37438f7d6e68c2546d2cb8062f3adb27e6336bc129b51be20773ac" - end - - resource "toml" do - url "https://files.pythonhosted.org/packages/da/24/84d5c108e818ca294efe7c1ce237b42118643ce58a14d2462b3b2e3800d5/toml-0.10.1.tar.gz" - sha256 "926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f" - end - - resource "typed-ast" do - url "https://files.pythonhosted.org/packages/18/09/b6a6b14bb8c5ec4a24fe0cf0160aa0b784fd55a6fd7f8da602197c5c461e/typed_ast-1.4.1.tar.gz" - sha256 "8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b" - end - - resource "aiohttp" do - url "https://files.pythonhosted.org/packages/00/94/f9fa18e8d7124d7850a5715a0b9c0584f7b9375d331d35e157cee50f27cc/aiohttp-3.6.2.tar.gz" - sha256 "259ab809ff0727d0e834ac5e8a283dc5e3e0ecc30c4d80b3cd17a4139ce1f326" - end - - resource "aiohttp-cors" do - url "https://files.pythonhosted.org/packages/44/9e/6cdce7c3f346d8fd487adf68761728ad8cd5fbc296a7b07b92518350d31f/aiohttp-cors-0.7.0.tar.gz" - sha256 "4d39c6d7100fd9764ed1caf8cebf0eb01bf5e3f24e2e073fda6234bc48b19f5d" - end - - resource "async-timeout" do - url "https://files.pythonhosted.org/packages/a1/78/aae1545aba6e87e23ecab8d212b58bb70e72164b67eb090b81bb17ad38e3/async-timeout-3.0.1.tar.gz" - sha256 "0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f" - end - - resource "yarl" do - url "https://files.pythonhosted.org/packages/d6/67/6e2507586eb1cfa6d55540845b0cd05b4b77c414f6bca8b00b45483b976e/yarl-1.4.2.tar.gz" - sha256 "58cd9c469eced558cd81aa3f484b2924e8897049e06889e8ff2510435b7ef74b" - end - - resource "multidict" do - url "https://files.pythonhosted.org/packages/65/d4/fabdcc5ee4451c8a8e177e27ddfd131a53a82ecc5a3b68468b7e9f8d70b4/multidict-4.7.6.tar.gz" - sha256 "fbb77a75e529021e7c4a8d4e823d88ef4d23674a202be4f5addffc72cbb91430" - 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/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - 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 - port = free_port - fork { exec "#{bin}/blackd --bind-port #{port}" } - sleep 10 - assert_match "print(\"valid\")", shell_output("curl -s -XPOST localhost:#{port} -d \"print('valid')\"").strip - end -end diff --git a/Formula/blackbox.rb b/Formula/blackbox.rb deleted file mode 100644 index 21532289ea21e..0000000000000 --- a/Formula/blackbox.rb +++ /dev/null @@ -1,41 +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.20200429.tar.gz" - sha256 "7a355bb4f44d43989a21f74b927fc2a5063a54c17539d5e5fa74e93e64c261ac" - license "MIT" - - 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 9fadb8ff444f7..0000000000000 --- a/Formula/blahtexml.rb +++ /dev/null @@ -1,44 +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 "3f883672f92e2039c22bb278ca50ece210c2c01e58f4c230c3ab1e3101eeb74f" => :catalina - 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 - - 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 :catalina - sha256 "b544b1e6e510c0c72b82b581a17eb8704ad53e46e9574d4dfd24bef8f5044148" => :mojave - sha256 "9dd8d68f78e3825fc33064bc3b79d6474d56593e7260d39ab5f6408ad2e1e939" => :high_sierra - end - - depends_on "lmdb" - - uses_from_macos "bzip2" - uses_from_macos "zlib" - - 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 - 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/blastem.rb b/Formula/blastem.rb deleted file mode 100644 index f7806cf5dd0ba..0000000000000 --- a/Formula/blastem.rb +++ /dev/null @@ -1,104 +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/v0.6.2.tar.gz" - sha256 "d460632eff7e2753a0048f6bd18e97b9d7c415580c358365ff35ac64af30a452" - license "GPL-3.0" - head "https://www.retrodev.com/repos/blastem", :using => :hg - - bottle do - cellar :any - sha256 "6de87547192f1037defe587f9ee30ff32b2b5686067e330276163c700e1668ca" => :catalina - sha256 "14193d951f4f115e618acbc95cb20e625c6fcc74ccb241f1f960c12f0655484c" => :mojave - sha256 "841dc46c59d53256aeb619279b4bd8e4997810dc2832ee86fed9a41e056196b5" => :high_sierra - 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 :macos # Due to Python 2 - depends_on "sdl2" - - resource "Pillow" do - url "https://files.pythonhosted.org/packages/5b/bb/cdc8086db1f15d0664dd22a62c69613cdc00f1dd430b5b19df1bea83f2a3/Pillow-6.2.1.tar.gz" - sha256 "bf4e972a88f8841d8fdc6db1a75e0f8d763e66e3754b03006cbc3854d89f1cb1" - end - - resource "vasm" do - url "https://server.owl.de/~frank/tags/vasm1_8f.tar.gz" - sha256 "9a97952951912b070a1b9118a466a3cd8024775be45266ede3f78b2f99ecc1f2" - 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" - unless MacOS::CLT.installed? - ENV.append "CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" - end - 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 e08f785834bd4..0000000000000 --- a/Formula/blazeblogger.rb +++ /dev/null @@ -1,33 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "cb9f78c2ae445f20f90c62b634fa4ee32ac282fc0a005099dcb5593b5008f99e" => :catalina - 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 2c432f0c7a566..0000000000000 --- a/Formula/blazegraph.rb +++ /dev/null @@ -1,50 +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.5/blazegraph.jar" - sha256 "fbaeae7e1b3af71f57cfc4da58b9c52a9ae40502d431c76bafa5d5570d737610" - - bottle :unneeded - - # dependnecy can be lifted in the upcoming release, > 2.1.5 - depends_on :java => "1.8" - - def install - libexec.install "blazegraph.jar" - bin.write_jar_script libexec/"blazegraph.jar", "blazegraph", :java_version => "1.8" - 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 - ENV.prepend "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}" - - 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 b8296e1ee60e6..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.1.0", - :revision => "6aed8b1c334edcbcff04951db4bba7816ef336f7" - head "https://github.com/todbot/blink1-tool.git" - - bottle do - cellar :any - sha256 "fe997b4328928968cb091e9d748213160a1a0f7f4644621b14cc1a4bf7e06680" => :catalina - sha256 "4168f9d980daf9f4864426a4447ba004efb492289d9fc8893b49f99d581a8e00" => :mojave - sha256 "646191cfd60d1a6d332c536bf3e50914a2434d72afee888c40568eebd7617d35" => :high_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/blis.rb b/Formula/blis.rb deleted file mode 100644 index c9bc23294ba27..0000000000000 --- a/Formula/blis.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Blis < Formula - desc "BLAS-like Library Instantiation Software Framework" - homepage "https://github.com/flame/blis" - url "https://github.com/flame/blis/archive/0.7.0.tar.gz" - sha256 "7e345d666799e15bba570bd125f97042f17bf752a61dcf314486a6cd096d5f68" - head "https://github.com/flame/blis.git" - - bottle do - cellar :any - sha256 "8ac1fb34cdaad5dfdac2e3ac454de08e7ff2a165571554f0bfd665ab2e5f2a71" => :catalina - sha256 "2ab25f7e90a115e604a5233420b190c7ab60c73642f6eedc3b519f96d20c7bc2" => :mojave - sha256 "4f19883538758550e8a0ce958d661e186b42cd8af66d6671e3589c30a6e96e14" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}", "--enable-cblas", "auto" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #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; - } - EOS - system ENV.cc, "-o", "test", "test.c", "-I#{include}", "-L#{lib}", "-lblis", "-lm" - system "./test" - end -end diff --git a/Formula/blitz.rb b/Formula/blitz.rb deleted file mode 100644 index 1f46874e36a01..0000000000000 --- a/Formula/blitz.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Blitz < Formula - desc "Multi-dimensional array library for C++" - homepage "https://github.com/blitzpp/blitz/wiki" - url "https://github.com/blitzpp/blitz/archive/1.0.2.tar.gz" - sha256 "500db9c3b2617e1f03d0e548977aec10d36811ba1c43bb5ef250c0e3853ae1c2" - head "https://github.com/blitzpp/blitz.git" - - bottle do - cellar :any - sha256 "2bfa3e5a52f0f51e9e02c84f10f804093b7080c158b3376f330dd51c0f9e3d23" => :catalina - sha256 "a06052c039592fe7b41face9c72d715ba0602456a9df07a40a472d3ceba02c00" => :mojave - sha256 "79901f790ea3583942a72ababfba3dc6569169f228b0428c047da52f1f99c02d" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "lib" - system "make", "install" - end - 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 5c43526beee2b..0000000000000 --- a/Formula/blitzwave.rb +++ /dev/null @@ -1,48 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "c048a4c11493ddfd5222bbfd25934fe4e7981fb7d689eddaef38ac06fa0d5b2d" => :catalina - 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 c87f7794aba02..0000000000000 --- a/Formula/bloaty.rb +++ /dev/null @@ -1,30 +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.1/bloaty-1.1.tar.bz2" - sha256 "a308d8369d5812aba45982e55e7c3db2ea4780b7496a5455792fb3dcba9abd6f" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "5be88b30573e9dfe1beaa3b5d7ee0f6114b23a07ff9a6cc539e3a962a2a45783" => :catalina - sha256 "fde9f093c351e8ef57e6b8df5f6b0a2faade0eee0cdddfaf3ebf5927e8fd52c1" => :mojave - sha256 "c54b0712732e3943c2ea3ca2e0eb9b7dcfce2a9b4793a353315b7142af8c156d" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "capstone" - depends_on "protobuf" - depends_on "re2" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - 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/blockhash.rb b/Formula/blockhash.rb deleted file mode 100644 index 08dce57a121d3..0000000000000 --- a/Formula/blockhash.rb +++ /dev/null @@ -1,41 +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" - license "MIT" - revision 1 - head "https://github.com/commonsmachinery/blockhash.git" - - bottle do - cellar :any - sha256 "e5b78f0c14faf009da78d00c1b31700837bd14c42be49d5609cf2f584678006a" => :catalina - sha256 "d9580b0bade98b0d083d3838b1b7078894b6d3d56e758628a050345a1ddf526b" => :mojave - sha256 "fdba183a92f5cfea8db07f626ccf13993bc59dec11ee2e402b063133da33f2eb" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "imagemagick" - depends_on :macos # Due to Python 2 - - 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}" - # 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 "./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/blogc.rb b/Formula/blogc.rb deleted file mode 100644 index 258d008590c57..0000000000000 --- a/Formula/blogc.rb +++ /dev/null @@ -1,67 +0,0 @@ -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.19.0/blogc-0.19.0.tar.xz" - sha256 "b409deede82513448fac460c27dbfa96093c6974cf324eaf8e6ab21dc53924ef" - license "BSD-3-Clause" - head "https://github.com/blogc/blogc.git" - - bottle do - cellar :any_skip_relocation - sha256 "118c986799974ccef116ab3b0d2cf192c0f7cdef07fceb74e3ab7b90e86b1bea" => :catalina - sha256 "415db1c2d7555a0047940c1e7f208f1f2a9a3710bcad8a7500ba4e75b829b7ed" => :mojave - sha256 "654dc424fae6c319b824ee1ab7beb95982ce85439ed1a90e267c2ce909aaa290" => :high_sierra - 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/bluepill.rb b/Formula/bluepill.rb deleted file mode 100644 index 4aa36f9d95ab1..0000000000000 --- a/Formula/bluepill.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Bluepill < Formula - desc "Testing tool for iOS that runs UI tests using multiple simulators" - homepage "https://github.com/linkedin/bluepill" - url "https://github.com/linkedin/bluepill.git", - :tag => "v5.2.4.1", - :revision => "b9e87eff54470fc6dc290cfefe80fc3486a06a1a" - license "BSD-2-Clause" - head "https://github.com/linkedin/bluepill.git" - - bottle do - cellar :any_skip_relocation - sha256 "f026badf5c5ded4b903de74382012e9b90a7b8fc1c5745ad2552fd937714b763" => :catalina - sha256 "6782b815d7d64190194460589adc6d790ebf4265ceeab8f869ff915a658d0aad" => :mojave - end - - depends_on :xcode => ["11.2", :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/bluetoothconnector.rb b/Formula/bluetoothconnector.rb deleted file mode 100644 index 48a66c1c84508..0000000000000 --- a/Formula/bluetoothconnector.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Bluetoothconnector < Formula - desc "Connect and disconnect Bluetooth devices" - homepage "https://github.com/lapfelix/BluetoothConnector" - url "https://github.com/lapfelix/BluetoothConnector/archive/2.0.0.tar.gz" - sha256 "41474f185fd40602fb197e79df5cd4783ff57b92c1dfe2b8e2c4661af038ed9b" - license "MIT" - head "https://github.com/lapfelix/BluetoothConnector.git" - - bottle do - cellar :any_skip_relocation - sha256 "38d8b5c89fd8fee4a746eadaceb399d5b7e1148db2cee896381b6e093aef56e3" => :catalina - sha256 "1a0c1e83b5640a35c48ba982f1b7cf5b1bebdda6fd4957368262c3e001c740e3" => :mojave - end - - depends_on :xcode => ["11.0", :build] - - def install - system "swift", "build", "--disable-sandbox", "-c", "release", "--static-swift-stdlib" - bin.install ".build/release/BluetoothConnector" - end - - test do - 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 diff --git a/Formula/blueutil.rb b/Formula/blueutil.rb deleted file mode 100644 index ca12a2cc4c9ec..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.6.0.tar.gz" - sha256 "5ba90cdedd886566e1304813891c0f9f6139db67aaf2829a8294973ee3d0b66c" - head "https://github.com/toy/blueutil.git" - - bottle do - cellar :any_skip_relocation - sha256 "9e82b1bcb5a3737fb75474f4f1e793f1954d6cc2ebf8cde4c538efc046998dbf" => :catalina - sha256 "151d723172aaf7acd9b23cf2a0b41f0fe5100357f511fea170cf34bc05093bb5" => :mojave - sha256 "afceca3182b5a43540b44c2b61bb0d510888f0744e924468ee3208d8ab612a4a" => :high_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 6add87463fa01..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-20200704.tar.gz" - sha256 "d85f25fcb335ca4618480f48f4969a841ea073054d52b16d6fe47765dda3c51c" - - bottle do - sha256 "c38faae30ac15a10eb003a9f73b97505b6b05da99e740c09d5d246d88e18581b" => :catalina - sha256 "24630b2df6309d587373d73d2f08edc0a63b7d08015eb3a82f1a4b0f9de1bfa9" => :mojave - sha256 "da7078544237d564c67a05ce966c0d32adf53532072cfb5e5b224c06b2c942e8" => :high_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 57f4960837baf..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/5.1.1/biz.aQute.bnd-5.1.1.jar" - sha256 "edec6f9681c0a3e3f9803da1f188aca8d1d793c51b77fca9836713ecf893c921" - - 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 /BUNDLES\s+#{test_bsn};version='\[#{test_version},#{test_version_next}\)'/, output - end -end diff --git a/Formula/bnfc.rb b/Formula/bnfc.rb deleted file mode 100644 index cb1b6de26fad7..0000000000000 --- a/Formula/bnfc.rb +++ /dev/null @@ -1,141 +0,0 @@ -class Bnfc < Formula - desc "BNF Converter" - homepage "https://bnfc.digitalgrammars.com/" - url "https://github.com/BNFC/bnfc/archive/v2.8.3.tar.gz" - sha256 "ba0b6ab36954a0891b4ad3125cefdd6d441d2c73d174cd8eff344e68ae2fd203" - revision 1 - head "https://github.com/BNFC/bnfc.git" - - bottle do - cellar :any_skip_relocation - sha256 "a56684b9fecdf25ef5c77f9124c8c8c3cdbf5f21405a6135eaf47680c387d231" => :catalina - sha256 "47cbd943179d46b54c4ff614d613662a4db766ed6f80ec980060acdf6a1c0812" => :mojave - sha256 "a92f1907cedabddf2a10a994de224cb15221786742beeb1cde87ac47dc17ff76" => :high_sierra - end - - depends_on "cabal-install" => [:build, :test] - depends_on "ghc" => [:build, :test] - depends_on "sphinx-doc" => :build - depends_on "antlr" => :test - depends_on "openjdk" => :test - - uses_from_macos "bison" => :test - uses_from_macos "flex" => :test - - on_linux do - depends_on "make" => [:build, :test] - end - - def install - cd "source" do - system "cabal", "v2-update" - system "cabal", "v2-install", *std_cabal_v2_args - doc.install "changelog" - doc.install "src/BNF.cf" => "BNF.cf" - end - cd "docs" do - system "make", "text", "man", "SPHINXBUILD=#{Formula["sphinx-doc"].bin/"sphinx-build"}" - cd "_build" do - doc.install "text" => "manual" - man1.install "man/bnfc.1" => "bnfc.1" - end - end - doc.install %w[README.md examples] - end - - test do - ENV.prepend_create_path "PATH", 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 - (testpath/"test.calc").write "14 * (# Parsing is fun! #) (3 + 2 / 5 - 8)" - treespace = if build.head? - " " - else - "" - end - check_out = <<~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)#{treespace} - - EOS - - mktemp "c-test" do - system bin/"bnfc", "-m", "-o.", "--c", testpath/"calc.cf" - system "make", "CC=#{ENV.cc}", "CCFLAGS=#{ENV.cflags}" - test_out = shell_output("./Testcalc #{testpath}/test.calc") - assert_equal check_out, test_out - end - - mktemp "cxx-test" do - system bin/"bnfc", "-m", "-o.", "--cpp", testpath/"calc.cf" - system "make", "CC=#{ENV.cxx}", "CCFLAGS=#{ENV.cxxflags}" - test_out = shell_output("./Testcalc #{testpath}/test.calc") - assert_equal check_out, test_out - end - - mktemp "haskell-test" do - system "cabal", "v2-update" - system "cabal", "v2-install", - "--jobs=#{ENV.make_jobs}", "--max-backjumps=100000", - "--install-method=copy", "--installdir=#{testpath/"tools-bin"}", - "alex", "happy" - system bin/"bnfc", "-m", "-o.", "--haskell", "--ghc", "-d", testpath/"calc.cf" - system "make" - test_out = shell_output("./Calc/Test #{testpath/"test.calc"}") - check_out_hs = <<~EOS - #{testpath/"test.calc"} - - 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) - EOS - assert_equal check_out_hs, test_out - end - - mktemp "java-test" do - ENV.deparallelize # only the Java test needs this - jdk_dir = Formula["openjdk"].bin - antlr_bin = Formula["antlr"].bin/"antlr" - antlr_jar = Dir[Formula["antlr"].prefix/"antlr-*-complete.jar"][0] - 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}" - test_out = shell_output("#{jdk_dir}/java calc.Test #{testpath}/test.calc") - space = " " - check_out_j = <<~EOS - - Parse Succesful! - - [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 - assert_equal check_out_j, test_out - end - end -end diff --git a/Formula/bochs.rb b/Formula/bochs.rb deleted file mode 100644 index 9d5b4a3d3ab42..0000000000000 --- a/Formula/bochs.rb +++ /dev/null @@ -1,92 +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.11/bochs-2.6.11.tar.gz" - sha256 "63897b41fbbbdfb1c492d3c4dee1edb4224282a07bbdf442a4a68c19bcc18862" - - bottle do - sha256 "b6d43a6a60360e0d84ebd2ad9ae7724c413a1f2332c59065fb09c2004d76b723" => :catalina - sha256 "74fb37178645c4d2b52eec5684931ca215dc2f75794e1cf45b3f6e2b85263819" => :mojave - sha256 "f8c79923292849eebece21d9c5ed1028db729d4d25dc1e045a7c8e0f0dcf450b" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libtool" - depends_on "sdl2" - - uses_from_macos "ncurses" - - # 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-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 diff --git a/Formula/bogofilter.rb b/Formula/bogofilter.rb deleted file mode 100644 index 69a764b244f98..0000000000000 --- a/Formula/bogofilter.rb +++ /dev/null @@ -1,25 +0,0 @@ -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" - - bottle do - cellar :any - sha256 "2f2d4c414683f922e687d054e71619a0455560aac2522484132099fbddcc6a77" => :catalina - sha256 "d7df5e0d29f4fcbc9eafc129ddfd993dc785ee3a4bf79b70b0dce9b5f31f7be4" => :mojave - sha256 "c7998fa1651590e6aaf27f8fe014a7b0e305a48a02de4cdcb9ba53f1c84bd1e7" => :high_sierra - 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/bombadillo.rb b/Formula/bombadillo.rb deleted file mode 100644 index 7cc08b520e0af..0000000000000 --- a/Formula/bombadillo.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Bombadillo < Formula - desc "Non-web browser, designed for a growing list of protocols" - homepage "http://bombadillo.colorfield.space/" - url "https://tildegit.org/sloum/bombadillo/archive/2.3.1.tar.gz" - sha256 "e8076493e924bd5860d3e17884b0675ea514eea75e7b4e96da1c79ab9805731f" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "e28036e78119313b05947c16b65c5d512a97b96c1a096470c2c38877bd396954" => :catalina - sha256 "dc47ed396c8a8c988d82b0a87f5c5c368d604f535ae5cc932ad941c22376073f" => :mojave - sha256 "e45a0bec0801f7719539f0ccda6ce7cfc76dccd346d6a09bb65a04f2c2238cd9" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - require "pty" - - cmd = bin/"bombadillo gopher://bombadillo.colorfield.space" - config = testpath/".config" - r, w, pid = PTY.spawn("stty rows 80 cols 43 && XDG_CONFIG_HOME=#{config} #{cmd}") - sleep 1 - w.write "q" - assert_match /Bombadillo is a non-web browser/, r.read - - status = PTY.check(pid) - assert_not_nil status - assert_true status.success? - end -end diff --git a/Formula/bonnie++.rb b/Formula/bonnie++.rb deleted file mode 100644 index 84fc2ceca2529..0000000000000 --- a/Formula/bonnie++.rb +++ /dev/null @@ -1,33 +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.98.tgz" - sha256 "6e0bcbc08b78856fd998dd7bcb352d4615a99c26c2dc83d5b8345b102bad0b04" - - bottle do - cellar :any_skip_relocation - sha256 "d6efac6fef771ca5d88fd4f8157e185e120c5e6935f9d940f2c6c3d5c9564ce0" => :catalina - sha256 "af6277fc9f23e9665b134aa2790dc30ebdaba386492c1832bf88a1f67280c63c" => :mojave - sha256 "50872a4a0cbca4eecb515214f23efe7eb5e421dbbbe406a5e95a7bd62e4f9d34" => :high_sierra - 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/913b5a25087d2c64d3b6459635d5d64012b83042/bonnie%2B%2B/remove-large-file-support-macros.diff" - sha256 "368a7ea0cf202a169467efb81cb6649c1b6306999ccd54b85641fd4b458a46b7" - 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 4a29bb15a0aed..0000000000000 --- a/Formula/bookloupe.rb +++ /dev/null @@ -1,39 +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" - revision 1 - - bottle do - cellar :any - sha256 "83e920e882a00717b094b14477917ed477fa3ab9ae02433d79bf4d374d5723a6" => :catalina - sha256 "f5e7f38cfa342d15025f798e9476a7091d3dbd60a15a6635d9fd784033dd531c" => :mojave - sha256 "8cade7bb36828e32d7be412d29404748198079745defd97ed2ec533ff91f5645" => :high_sierra - sha256 "564cdae8b088da04903efd886b33ed12e5673a64866679f67b37acdb68bf539c" => :sierra - 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 35db93e2f0989..0000000000000 --- a/Formula/boom-completion.rb +++ /dev/null @@ -1,20 +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" - license "MIT" - 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 c790d59ef688e..0000000000000 --- a/Formula/boost-bcp.rb +++ /dev/null @@ -1,29 +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.72.0/source/boost_1_72_0.tar.bz2" - mirror "https://dl.bintray.com/homebrew/mirror/boost_1_72_0.tar.bz2" - sha256 "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722" - license "BSL-1.0" - head "https://github.com/boostorg/boost.git" - - bottle do - cellar :any_skip_relocation - sha256 "206a46348fb75f752b6a7166c4a549888208f62b1d57d4aedc0abacb71e51e3d" => :catalina - sha256 "2d4b85c52ab0dceed07984c4c6f9e35c0f7dbcbb73528a5993177c3a94457ebc" => :mojave - sha256 "fde3e6baae64ff2297e6babed41147071065c4ac0f37c2ea5dd6530f49865582" => :high_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 4660b811f5a2b..0000000000000 --- a/Formula/boost-build.rb +++ /dev/null @@ -1,44 +0,0 @@ -class BoostBuild < Formula - desc "C++ build system" - homepage "https://www.boost.org/build/" - url "https://github.com/boostorg/build/archive/boost-1.73.0.tar.gz" - sha256 "3490f9859a08cf46d963f0cfb834d30cd2c9f4cf5e0738dc19287b5849a316c2" - license "BSL-1.0" - version_scheme 1 - head "https://github.com/boostorg/build.git" - - bottle do - cellar :any_skip_relocation - sha256 "f6bb502b7848e98f4b184c2bf2604cc005e4bad599b1078a35119c2e8a2dccf1" => :catalina - sha256 "68b1dea12cdbab911e66842020a3f66690b85612ccf539e337ed71129747ed89" => :mojave - sha256 "2422cb690b00b75fa6dd4bfe63e7a775abd7659a537a627aec33115af051907e" => :high_sierra - end - - conflicts_with "b2-tools", :because => "both install `b2` binaries" - - # Fix Xcode 11.4 compatibility. - # Remove with the next release. - patch do - url "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1" - sha256 "04a4df38ed9c5a4346fbb50ae4ccc948a1440328beac03cb3586c8e2e241be08" - end - - 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 d44c286bb3134..0000000000000 --- a/Formula/boost-mpi.rb +++ /dev/null @@ -1,100 +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.72.0/source/boost_1_72_0.tar.bz2" - mirror "https://dl.bintray.com/homebrew/mirror/boost_1_72_0.tar.bz2" - sha256 "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722" - license "BSL-1.0" - head "https://github.com/boostorg/boost.git" - - bottle do - sha256 "85d4a3e20c2b6c3383a6fc6bb2829a08284bd23dfed1ddfe23c95b042ab6a73d" => :catalina - sha256 "76a3472fb7d69bd52c36f936d932dc70b800108c8ecedf1c11c132ce094af595" => :mojave - sha256 "9f6879e54a786105e9a2d4cc7275a31f22d4aea0f62417b8eed45e7f82d80449" => :high_sierra - end - - depends_on "boost" - depends_on "open-mpi" - - # Fix build on Xcode 11.4 - patch do - url "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1" - sha256 "04a4df38ed9c5a4346fbb50ae4ccc948a1440328beac03cb3586c8e2e241be08" - directory "tools/build" - end - - def install - # "layout" should be synchronized with boost - args = %W[ - -d2 - -j#{ENV.make_jobs} - --layout=tagged-1.66 - --user-config=user-config.jam - install - 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" - args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" if ENV.compiler == :clang - - 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", - "--prefix=install-mpi", - "--libdir=install-mpi/lib", - *args - - lib.install Dir["install-mpi/lib/*mpi*"] - (lib/"cmake").install Dir["install-mpi/lib/cmake/*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 9be1a10c4df7a..0000000000000 --- a/Formula/boost-python.rb +++ /dev/null @@ -1,96 +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.72.0/source/boost_1_72_0.tar.bz2" - mirror "https://dl.bintray.com/homebrew/mirror/boost_1_72_0.tar.bz2" - sha256 "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722" - license "BSL-1.0" - head "https://github.com/boostorg/boost.git" - - bottle do - cellar :any - sha256 "c15c8bf03d5ca454c93782648f700c1149c164bec8334561ef3727eee0f0435a" => :catalina - sha256 "12e538b3468eff6e1afe41cbe595a389473ad37972fbc1ea69a5abc37ead890e" => :mojave - sha256 "d0ff391db5f8864d6025e654708a84629aba54d59bdf7b366a6eb7cdca808918" => :high_sierra - end - - depends_on "boost" - depends_on :macos # Due to Python 2 - - # Fix build on Xcode 11.4 - patch do - url "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1" - sha256 "04a4df38ed9c5a4346fbb50ae4ccc948a1440328beac03cb3586c8e2e241be08" - directory "tools/build" - end - - def install - # "layout" should be synchronized with boost - args = %W[ - -d2 - -j#{ENV.make_jobs} - --layout=tagged-1.66 - 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 - - 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", - "--libdir=install-python/lib", - "--prefix=install-python", - "python=#{pyver}", - *args - - lib.install Dir["install-python/lib/*.*"] - lib.install Dir["stage-python/lib/*py*"] - doc.install Dir["libs/python/doc/*"] - end - - def caveats - <<~EOS - This formula provides Boost.Python for Python 2. Due to a - collision with boost-python3, the CMake Config files are not - available. Please use -DBoost_NO_BOOST_CMAKE=ON when building - with CMake or switch to Python 3. - EOS - 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 91262e4fd45d3..0000000000000 --- a/Formula/boost-python3.rb +++ /dev/null @@ -1,105 +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.72.0/source/boost_1_72_0.tar.bz2" - mirror "https://dl.bintray.com/homebrew/mirror/boost_1_72_0.tar.bz2" - sha256 "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722" - license "BSL-1.0" - revision 1 - head "https://github.com/boostorg/boost.git" - - bottle do - cellar :any - sha256 "dbb68300aafb7dc618ed08e91ba34d07e8d2e80a28988a68ebb9fccba4e0e11e" => :catalina - sha256 "3c02bc31d2de7b3df8379ee24f70b9740c9fcd07f0d7ea5fcbf8de59be9edb1e" => :mojave - sha256 "ba57a38cc8bd70c95bc62b0c41dea57a931fbf4ee1b3601e4406f8f537129006" => :high_sierra - end - - depends_on "numpy" => :build - depends_on "boost" - depends_on "python@3.8" - - # Fix build on Xcode 11.4 - patch do - url "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1" - sha256 "04a4df38ed9c5a4346fbb50ae4ccc948a1440328beac03cb3586c8e2e241be08" - directory "tools/build" - end - - def install - # "layout" should be synchronized with boost - args = %W[ - -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++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 - - # 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 Formula["python@3.8"].opt_bin/"python3" - py_prefix = Formula["python@3.8"].opt_frameworks/"Python.framework/Versions/#{pyver}" - - # 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} - : #{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 Dir["install-python3/lib/*.*"] - (lib/"cmake").install Dir["install-python3/lib/cmake/boost_python*"] - (lib/"cmake").install Dir["install-python3/lib/cmake/boost_numpy*"] - 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 = shell_output("#{Formula["python@3.8"].opt_bin}/python3-config --includes").chomp.split(" ") - pylib = shell_output("#{Formula["python@3.8"].opt_bin}/python3-config --ldflags --embed").chomp.split(" ") - pyver = Language::Python.major_minor_version(Formula["python@3.8"].opt_bin/"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(Formula["python@3.8"].opt_bin/"python3", output, 0) - end -end diff --git a/Formula/boost.rb b/Formula/boost.rb deleted file mode 100644 index 40a118aa4312e..0000000000000 --- a/Formula/boost.rb +++ /dev/null @@ -1,126 +0,0 @@ -class Boost < Formula - desc "Collection of portable C++ source libraries" - homepage "https://www.boost.org/" - license "BSL-1.0" - revision 3 - head "https://github.com/boostorg/boost.git" - - stable do - url "https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.bz2" - mirror "https://dl.bintray.com/homebrew/mirror/boost_1_72_0.tar.bz2" - sha256 "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722" - - # Fixes significant library search issues in the CMake scripts - # where it mixes single-threaded and multithreaded libraries. - # Remove with Boost 1.73.0. - patch do - url "https://github.com/boostorg/boost_install/compare/52ab9149544bae82e54f600303f5d6d1dda9a4f5...a1b5a477470ff9dc2e00f30be4ec4285583b33b6.patch?full_index=1" - sha256 "fb168dd2ddfa20983b565ead86d4355c6d6e3e49bce9c2c6ab7f6e9cd9350bd4" - directory "tools/boost_install" - end - end - - bottle do - cellar :any - sha256 "2e0d985997503d0f069ca63a7bcd1bc516d81341754de984f1953390d5540b76" => :catalina - sha256 "3a89882d5d2bb7ab3bd55f99f07020f8cc880df3e8f01a1996b6288df05bf93f" => :mojave - sha256 "9527177a4b362d9090526ab4b6c934a17a39ecbd2fe1349a00f352f41be82a91" => :high_sierra - end - - depends_on "icu4c" - - uses_from_macos "bzip2" - uses_from_macos "zlib" - - # Fix build on Xcode 11.4 - patch do - url "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1" - sha256 "04a4df38ed9c5a4346fbb50ae4ccc948a1440328beac03cb3586c8e2e241be08" - directory "tools/build" - 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 - 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-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 - - 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++14", "-stdlib=libc++", "-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 f6c3468da503c..0000000000000 --- a/Formula/boost@1.55.rb +++ /dev/null @@ -1,127 +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 "2db1cc42c4810d7fdbe7dd7778fc51d37b829d8d39a8e5dc34a9867f7f619445" => :catalina - 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 - - # Fix build on Xcode 11.4 - patch :p2 do - url "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1" - sha256 "04a4df38ed9c5a4346fbb50ae4ccc948a1440328beac03cb3586c8e2e241be08" - directory "tools/build/v2" - 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 d35db34d1c957..0000000000000 --- a/Formula/boost@1.57.rb +++ /dev/null @@ -1,103 +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 "1023f6d97a7feec1c4f4d48fece91f3943f1cb3fb55cf909b0cf919742fc8e1b" => :catalina - sha256 "662ca2c70c493d0ad0715f93daedf518dfda501bc55de18bc6f393f2e541c075" => :mojave - sha256 "a9eab1fbd081d88a4ee1d8102a038784b46ef98d77f11943793f8445341871ae" => :high_sierra - sha256 "2a5722e316d528b2ee1b290c2bda772c19c426f32c8bcb6609c250d68c59d6cb" => :sierra - sha256 "1c2b58d63f0d0f24a07cb60653cf1e674b78f4529c5e7b89ea4208d4db8fb494" => :el_capitan - sha256 "993b2b875755b7a1b0b7bbb97269545705fa3b30df3e4a03868c0e53a1dc7599" => :yosemite - end - - keg_only :versioned_formula - - # Fix build on Xcode 11.4 - patch do - url "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1" - sha256 "04a4df38ed9c5a4346fbb50ae4ccc948a1440328beac03cb3586c8e2e241be08" - directory "tools/build" - 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 - 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 2386f3e78f921..0000000000000 --- a/Formula/boost@1.59.rb +++ /dev/null @@ -1,119 +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 "d4d7fd4f07b4bc4603649551b9b2658419417675530b2eabea9c392abc4e741f" => :catalina - 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/2ccb6715b3727a5ec4d2582dc8931cd46cbefbf1/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/2ccb6715b3727a5ec4d2582dc8931cd46cbefbf1/boost/boost159-missing-symbols.patch" - sha256 "2c3a3bae1691df5f8fce8fbd4e5727d57bd4dd813748b70d7471c855c4f19d1c" - end - - # Fix build on Xcode 11.4 - patch do - url "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1" - sha256 "04a4df38ed9c5a4346fbb50ae4ccc948a1440328beac03cb3586c8e2e241be08" - directory "tools/build" - 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 6b14a2059fc2b..0000000000000 --- a/Formula/boost@1.60.rb +++ /dev/null @@ -1,134 +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 "bc4447b1ead8d28fb311244e7358484baecd5ee249d6348ba8d1adc5413eb54c" => :catalina - sha256 "7a94d461c3b8a3859ad52e87ad82c7fc18f36b53a3a85dea88faa733a5c9f000" => :mojave - sha256 "50568fe023b32cf9664b023d65d43d7f8e79bfa73415186f63a3faf0b4ae7cc8" => :high_sierra - sha256 "8ab5b0be67a534c2340b488d27ebc51ccb088c49735949da4c0099359c6ef9f1" => :sierra - sha256 "f6ef8ae275a8d0c03969eceb248235dbeafd4316d1c97f6a9b79d8aa4ef71027" => :el_capitan - sha256 "489a6420dc137a356ad300cb10a519073adbf99573515601f6bb87ff5a6622b3" => :yosemite - end - - keg_only :versioned_formula - - uses_from_macos "bzip2" - uses_from_macos "zlib" - - # 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/9e56b450f3f5fd8095540e43184b13ab2824f911/boost/boost1_60_0_python_class_metadata.diff" - sha256 "1a470c3a2738af409f68e3301eaecd8d07f27a8965824baf8aee0adef463b844" - end - - # Fix build on Xcode 11.4 - patch do - url "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1" - sha256 "04a4df38ed9c5a4346fbb50ae4ccc948a1440328beac03cb3586c8e2e241be08" - directory "tools/build" - 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 6e999a7089dae..0000000000000 --- a/Formula/boot-clj.rb +++ /dev/null @@ -1,26 +0,0 @@ -class BootClj < Formula - desc "Build tooling for Clojure" - homepage "https://boot-clj.com/" - url "https://github.com/boot-clj/boot/releases/download/2.8.3/boot.jar" - sha256 "31f001988f580456b55a9462d95a8bf8b439956906c8aca65d3656206aa42ec7" - license "EPL-1.0" - revision 2 - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "boot.jar" - (bin/"boot").write <<~EOS - #!/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" "$@" - EOS - end - - test do - system "#{bin}/boot", "repl", "-e", "(System/exit 0)" - end -end diff --git a/Formula/bootloadhid.rb b/Formula/bootloadhid.rb deleted file mode 100644 index 558de387a286f..0000000000000 --- a/Formula/bootloadhid.rb +++ /dev/null @@ -1,27 +0,0 @@ -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" - version "2012-12-08" - sha256 "154e7e38629a3a2eec2df666edfa1ee2f2e9a57018f17d9f0f8f064cc20d8754" - - bottle do - cellar :any - sha256 "aa0bc95a39610d6b5951d064d781d85b898ca2ebf230acbc60aa2f4e1f51e573" => :catalina - sha256 "36032498ab37f82f538d6aa037dac2b2f1c90f552ab5403f3e87c184bc47e75b" => :mojave - sha256 "59d545d65c052c2a62f171d4b6e92098a2725cb7c44997051e96863e30d26a03" => :high_sierra - 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.", pipe_output("#{bin}/bootloadHID -r test.hex 2>&1").strip - end -end diff --git a/Formula/borgmatic.rb b/Formula/borgmatic.rb deleted file mode 100644 index d02a4001b3e2d..0000000000000 --- a/Formula/borgmatic.rb +++ /dev/null @@ -1,139 +0,0 @@ -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/16/72/905a5da1da114f1f4fa3bc6ed31f23fcc8ccea90a705817131a3042b0394/borgmatic-1.5.8.tar.gz" - sha256 "707ed1bdffd6b8bec2d74dca36cc2665081c8db8590241bf6a72a3378928dd65" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "92a8d415fef3a38640687100b75664f2b33574423fd2cd3fbafa9cffffdfb222" => :catalina - sha256 "ed8e8d561034a2fc506779242acc024bc0102b1548cf729ad24f81316fde40e5" => :mojave - sha256 "aef581f30c8f25d458784de1ce610c572a0cfb172cd30de06c4e6d75c10f8e17" => :high_sierra - end - - depends_on "libyaml" - depends_on "python@3.8" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - 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/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - 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/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz" - sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6" - end - - resource "pykwalify" do - url "https://files.pythonhosted.org/packages/53/6a/c7394df238816085de6a630f1817805639e844ea7980108f19261cd44c12/pykwalify-1.7.0.tar.gz" - sha256 "7e8b39c5a3a10bc176682b3bd9a7422c39ca247482df198b402e8015defcceb2" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/16/8b/54a26c1031595e5edd0e616028b922d78d8ffba8bc775f0a4faeada846cc/ruamel.yaml-0.16.10.tar.gz" - sha256 "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954" - end - - resource "ruamel.yaml.clib" do - url "https://files.pythonhosted.org/packages/92/28/612085de3fae9f82d62d80255d9f4cf05b1b341db1e180adcf28c1bf748d/ruamel.yaml.clib-0.2.0.tar.gz" - sha256 "b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - end - - test do - borg = (testpath/"borg") - config_path = testpath/"config.yml" - repo_path = testpath/"repo" - log_path = testpath/"borg.log" - - # Create a fake borg executable to log requested commands - borg.write <<~EOS - #!/bin/sh - echo $@ >> #{log_path} - - # Return error on info so we force an init to occur - if [ "$1" = "info" ]; then - exit 2 - fi - EOS - borg.chmod 0755 - - # Generate a config - system bin/"generate-borgmatic-config", "--destination", config_path - - # Replace defaults values - config_content = File.read(config_path) - .gsub(/# ?local_path: borg1/, "local_path: #{borg}") - .gsub(/user@backupserver:sourcehostname.borg/, repo_path) - .gsub("- /var/log/syslog*", "") - File.open(config_path, "w") { |file| file.puts config_content } - - # 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, "--list", "--json" - - # Read in stored log - log_content = File.read(log_path) - - # Assert that the proper borg commands were executed - assert_equal <<~EOS, log_content - info --debug #{repo_path} - init --encryption repokey --debug #{repo_path} - prune --keep-daily 7 --prefix {hostname}- #{repo_path} - create #{repo_path}::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} /etc /home - check --prefix {hostname}- #{repo_path} - list --json #{repo_path} - EOS - end -end diff --git a/Formula/boringtun.rb b/Formula/boringtun.rb deleted file mode 100644 index 94dd86bc6f543..0000000000000 --- a/Formula/boringtun.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Boringtun < Formula - desc "Userspace WireGuard implementation in Rust" - homepage "https://github.com/cloudflare/boringtun" - url "https://github.com/cloudflare/boringtun/archive/v0.3.0.tar.gz" - sha256 "1107b0170a33769db36876334261924edc71dfc1eb00f9b464c7d2ad6d5743d3" - license "BSD-3-Clause" - head "https://github.com/cloudflare/boringtun.git" - - bottle do - cellar :any_skip_relocation - sha256 "dd119327645c4905c39a4b0e6f65472690d619e127088e62573b5a0c454cbb01" => :catalina - sha256 "c871b547c950e928ee065ce5dbe1442a41d65213b840654bb9e6922b7dedae0f" => :mojave - sha256 "7e6fc1a3b6458d9df1b0c15ee53d14f0ea04e85494f306034fd8531d2ff4277c" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - system "#{bin}/boringtun", "--help" - assert_match "boringtun " + version.to_s, shell_output("#{bin}/boringtun -V").chomp - shell_output("#{bin}/boringtun utun -v --log #{testpath}/boringtun.log", 1) - assert_predicate testpath/"boringtun.log", :exist? - boringtun_log = File.read(testpath/"boringtun.log") - assert_match /Success, daemonized/, boringtun_log.split("/n").first - 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 2f7741535a35b..0000000000000 --- a/Formula/botan.rb +++ /dev/null @@ -1,46 +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.15.0.tar.xz" - sha256 "d88af1307f1fefac79aa4f2f524699478d69ce15a857cf2d0a90ac6bf2a50009" - license "BSD-2-Clause" - revision 1 - head "https://github.com/randombit/botan.git" - - bottle do - sha256 "eadcaecf6012c8e8a79f867ae1f71dbf25064b1134034c132b359677fbcf85ee" => :catalina - sha256 "a0974f73218cea782cab67f747ed4d355790d99ea8abba58ccdc651a2f755ca1" => :mojave - sha256 "3ac585173960885e4dabb36db032e0d651e6a2b567575b27e24b01ec352ff055" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "python@3.8" - depends_on "sqlite" - - uses_from_macos "bzip2" - uses_from_macos "zlib" - - def install - ENV.cxx11 - - args = %W[ - --prefix=#{prefix} - --docdir=share/doc - --cc=#{ENV.compiler} - --os=darwin - --with-zlib - --with-bzip2 - --with-sqlite3 - --with-python-versions=3.8 - ] - - system "./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/bower.rb b/Formula/bower.rb deleted file mode 100644 index b43b9d48fb545..0000000000000 --- a/Formula/bower.rb +++ /dev/null @@ -1,30 +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.8.tar.gz" - sha256 "3faf6c6ba0f96a8ee7ca7329911e683131198cbdd9a25ee4976b46f90357d481" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "a93aa8f191f1c92fd1ff913baa979ba8f05c151ee488019e54179b38b7568888" => :catalina - sha256 "82494967ba46ded634fb761e4fb166ab1d27605ba7514c4248ada0a00b1ce0cd" => :mojave - sha256 "077291dbebb25e070a3387fb9e38f3400a35d1551fbf97936643061be4d522b3" => :high_sierra - sha256 "2a5689573d8841a0ce8be340aea74f0585c3537340f9d53746fefd21cada43f5" => :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 1a716d7b6e7ad..0000000000000 --- a/Formula/bowtie2.rb +++ /dev/null @@ -1,28 +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.4.1.tar.gz" - sha256 "9fb25513886bf294217dd9c5ca26d18dd5e02e0ae999935ac7ba5700befc492e" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "fd107ab602165eac36dc748124cc6688f8eccf63ff9a64ebcf82fa4db45b5788" => :catalina - sha256 "ca70730942c77835fc3ee267dd6c284d51351af0f59db282876ca9ada2ce4672" => :mojave - sha256 "61597b46c1e6bd55d74c89e107342c4bdb5014d3a7ea37628d544b6f429bef9c" => :high_sierra - end - - depends_on "tbb" - - 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_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 fc99a81265352..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.3.tar.gz" - sha256 "cbb46b3b0ef2c016f9ebcebea5acf6c2bfec39dfb6696dc8f4427a3f844cd567" - license "GPL-2.0" - head "https://github.com/ascii-boxes/boxes.git" - - bottle do - sha256 "48a3b6d9b8c23a3ab1f366f6f085361cc8db8cd341dfe9474665d87c4c23bbf8" => :catalina - sha256 "84b135ad528536233546dbf8d36e0be4a21a89050910e45a4f8e2796c99b7c3f" => :mojave - sha256 "ca1c4e0e76f03ee4a60789f30093d2eee3794ff54b989da1a8a3ae555228f081" => :high_sierra - sha256 "d31462128d1f55cd3014ae942b4620f1ec4d06e72e8a47cae5ef56afcf65e791" => :sierra - 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 66c6f543c0af8..0000000000000 --- a/Formula/bpm-tools.rb +++ /dev/null @@ -1,23 +0,0 @@ -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" - head "https://www.pogo.org.uk/~mark/bpm-tools.git" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "694afec7c21549badc5c2bf55ac3f3da588370affbaa78f1087e3bb204137f61" => :catalina - sha256 "56e3a889338b82d5b477c1564506e23549d9651b08260d9c9a38b5e6bd1555ab" => :mojave - sha256 "422342ce8dd8a50853e8289ccc936747f4a77a20803850e6481498cf8c4a12c5" => :high_sierra - sha256 "f1219d522f61e89606f3e607a636e406faf5f954846b48965e37cc25dbb29b87" => :sierra - end - - def install - system "make" - bin.install "bpm" - bin.install "bpm-tag" - 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 b0a81c0acbd29..0000000000000 --- a/Formula/braid.rb +++ /dev/null @@ -1,74 +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.3", - :revision => "74bde1426c2a2713f8a56a879e5ff2e1e4213ad8" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "ce0e9998210922c07060f09c2eaa814f6b0ad43d3493d830b4a763af5b37857e" => :catalina - sha256 "9aa11522728149a3adb93ddbf19bcf52d105599377bca4724005d9529ae35683" => :mojave - sha256 "6fa201d3849284c3e8c04bad3b530b2a478547b5e41acb9ed9203e2d7b39f343" => :high_sierra - sha256 "dfc5dbab04d6fd62ac13cbc8ba2dcd6ebe87c3fcc1d1645fbf844dbcfb651cea" => :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.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 35543064edaf4..0000000000000 --- a/Formula/brainfuck.rb +++ /dev/null @@ -1,30 +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" - license "Apache-2.0" - head "https://github.com/fabianishere/brainfuck.git" - - bottle do - cellar :any - sha256 "bf49cdb2f3515c537a9ced6a5697be843489b2bf37b3ea732527077e96347f04" => :catalina - 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/breezy.rb b/Formula/breezy.rb deleted file mode 100644 index 48cde3e018205..0000000000000 --- a/Formula/breezy.rb +++ /dev/null @@ -1,85 +0,0 @@ -class Breezy < Formula - include Language::Python::Virtualenv - - desc "Version control system implemented in Python with multi-format support" - homepage "https://www.breezy-vcs.org/" - url "https://files.pythonhosted.org/packages/bf/52/2639c0653b0e64e49a6cae3a6b6f115e277ccbae47779af798fd903be6cb/breezy-3.1.0.tar.gz" - sha256 "1eff207403f48898fa3b3ffa7a4275197c6c58fec105ef267caf1f5fd5a6c7be" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "62d9eebeddd2d53cc2fd55a8279ef68569432e9efafd808c80b32960221d4591" => :catalina - sha256 "351b1dd293f3be714605174c0f1cd4d2baade3679a6f57b00c97b4f085d2291d" => :mojave - sha256 "3e8d6bc11b32867e0243b9459981358cdf3628314e89e3927b3cfb9fb1f767f8" => :high_sierra - end - - depends_on "cython" => :build - depends_on "gettext" => :build - depends_on "openssl@1.1" - depends_on "python@3.8" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - end - - resource "configobj" do - url "https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz" - sha256 "a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902" - end - - resource "dulwich" do - url "https://files.pythonhosted.org/packages/b3/34/adcd6646c5ed59a1206216d4a418121be57df3406f7a46570112db57ba6c/dulwich-0.20.5.tar.gz" - sha256 "98484ede022da663c96b54bc8dcdb4407072cb50efd5d20d58ca4e7779931305" - end - - resource "fastimport" do - url "https://files.pythonhosted.org/packages/aa/65/47a579aae80fbd8b89cfbdffcde8dff68d57e3148b99da6a326673021455/fastimport-0.9.8.tar.gz" - sha256 "b2f2e8eb97000256e1aab83d2a0a053fc7b93c3aa4f7e9b971a5703dfc5963b9" - end - - resource "patiencediff" do - url "https://files.pythonhosted.org/packages/73/b7/31e0cfe41c63ceb9b745a998eeaf60b350c5265704c54d4f5d7960364107/patiencediff-0.2.0.tar.gz" - sha256 "d828c8dca0db860b26d441097e866a75f3ded8ea45244d3ba5f691a62928537a" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - end - - test do - brz = "#{bin}/brz" - whoami = "Homebrew" - system brz, "whoami", whoami - assert_match whoami, shell_output("#{bin}/brz whoami") - - # Test bazaar compatibility - system brz, "init-repo", "sample" - system brz, "init", "sample/trunk" - touch testpath/"sample/trunk/test.txt" - cd "sample/trunk" do - system brz, "add", "test.txt" - system brz, "commit", "-m", "test" - end - - # Test git compatibility - system brz, "init", "--git", "sample2" - touch testpath/"sample2/test.txt" - cd "sample2" do - system brz, "add", "test.txt" - system brz, "commit", "-m", "test" - end - 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 3a4f8a150d303..0000000000000 --- a/Formula/brew-gem.rb +++ /dev/null @@ -1,19 +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/v1.0.0.tar.gz" - sha256 "bc321722746e82243be50bc999d02f3d0754d40e7e40552ed2d61103191c82cf" - license "MIT" - 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 a0c823c36848d..0000000000000 --- a/Formula/brew-php-switcher.rb +++ /dev/null @@ -1,22 +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.2.tar.gz" - sha256 "505bc355cd725cacd048e44b60eadb5ad88c31f3c9d311e4b250c274aa78c14c" - license "MIT" - 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 8e053f7237545..0000000000000 --- a/Formula/brew-pip.rb +++ /dev/null @@ -1,17 +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" - license "MIT" - - 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 2204d4f33bf3f..0000000000000 --- a/Formula/brightness.rb +++ /dev/null @@ -1,27 +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" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "d9a033e343696c88863a7d231197d27be9611a2c8c56c83b4fd2747e2a2e5a7e" => :catalina - 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/brogue.rb b/Formula/brogue.rb deleted file mode 100644 index 2508cda2e4a39..0000000000000 --- a/Formula/brogue.rb +++ /dev/null @@ -1,54 +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 "942d5ca5002a3df398ada3879071d924cf14487e6c4acace5a7645b0799cc679" => :catalina - sha256 "62d88540558c2f014403686898cf68d9a44c62e0095e285e77958b66e5c1ff3a" => :mojave - sha256 "864ae48cf80e2f1f3dc2a31a2ea4811177906eda30b11d12d5e3018ca4f1f3b8" => :high_sierra - sha256 "b5f6a25670f2eeb737bcde972b78801892971e2af4e3f7df1bbaa237eb4db50f" => :sierra - end - - uses_from_macos "ncurses" - - # 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/broot.rb b/Formula/broot.rb deleted file mode 100644 index f8d60c6e68647..0000000000000 --- a/Formula/broot.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Broot < Formula - desc "New way to see and navigate directory trees" - homepage "https://dystroy.org/broot" - url "https://github.com/Canop/broot/archive/v0.18.5.tar.gz" - sha256 "ec63f8223dcf7039cc9921ee9cc4a5b3196abb8df2b25a9c3dad3307db662770" - license "MIT" - head "https://github.com/Canop/broot.git" - - bottle do - cellar :any_skip_relocation - sha256 "cb5654980ae7ebb65d316f4575b5c6cfe2b772f2761314f242d83a626b71ea94" => :catalina - sha256 "036afbc552a76e9139cc9adbfe5033aa869e6e2a2ac417a5add1afdcb60f3118" => :mojave - sha256 "9eceac344c308c1ce36d880cd8a78f7bda0a837679719de16d34a48e5ec60655" => :high_sierra - end - - depends_on "rust" => :build - - uses_from_macos "zlib" - - def install - system "cargo", "install", *std_cargo_args - end - - test do - assert_match "A tree explorer and a customizable launcher", shell_output("#{bin}/broot --help 2>&1") - - require "pty" - require "io/console" - PTY.spawn(bin/"broot", "--cmd", ":pt", "--no-style", "--out", testpath/"output.txt", :err => :out) do |r, w, pid| - r.winsize = [20, 80] # broot dependency termimad requires width > 2 - w.write "n\r" - assert_match "New Configuration file written in", r.read - Process.wait(pid) - end - assert_equal 0, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/brotli.rb b/Formula/brotli.rb deleted file mode 100644 index 0eda88cad6ee5..0000000000000 --- a/Formula/brotli.rb +++ /dev/null @@ -1,32 +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" - license "MIT" - head "https://github.com/google/brotli.git" - - bottle do - cellar :any - sha256 "81be7d1d110787a534cd57cc1ec6bb5032d81e3928d9103ce1e654560c6848ca" => :catalina - 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 a700acf4706d9..0000000000000 --- a/Formula/bsdconv.rb +++ /dev/null @@ -1,27 +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 "ea7dbfdeede5b0144d00533798f4b76a4af216b12c37a5e5ecaeaac030eab507" => :catalina - 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 94db0199eb764..0000000000000 --- a/Formula/bsdiff.rb +++ /dev/null @@ -1,48 +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 "648a52a8af8e8f17feb9e34168dd0f00abfc98e9f0f3aa7fd88fb1458a782098" => :catalina - 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 fe1f55f623ec3..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 "85bdfdf2ca2e5761195c4781e52232e4fb1258c99bf79f46cf82f66338197df3" => :catalina - sha256 "acee008d57c2ebe6ad2ee5932d1521a254e16453c61cdd517da2c675f60c1eb4" => :mojave - sha256 "fa009c31c9fa5fc71f774cfe146f1338ca856158a606b796c3a1e7dbd64f3895" => :high_sierra - sha256 "3d5b8c21cf86cd6bb9eb28d1e8cbec434b370aa15e19540e366d045ea807c8c8" => :sierra - sha256 "b4052277ac6cf79ed579107fb73da96954c350d7bf29a124c55d87a0df8940b0" => :el_capitan - sha256 "18d7cb56f14eb2e404cf3abb163a354f57c5e45b72991efdd6566a15fcffe90f" => :yosemite - sha256 "5807a64aab8f81720718a4327d303d7955a09739b079aefd72a4f216519f0de7" => :mavericks - 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 e73fd0b12f714..0000000000000 --- a/Formula/bsdsfv.rb +++ /dev/null @@ -1,46 +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 "3abfd33001c44edc6b03905559f8565f923001aa1ccc3a3247ebd073d226ccaa" => :catalina - 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 d2783b2f1e914..0000000000000 --- a/Formula/bsponmpi.rb +++ /dev/null @@ -1,26 +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 "f9500519011600313f772afec98331291ce2f90ccb9d6d12bf61ddd05560aace" => :catalina - 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 04ab68f610ba6..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.21.tar.gz" - sha256 "b170d01e362f34038a9bacf75f63eaab85093c1fd296c4f9ed17092f5ca2ccfa" - license "GPL-3.0" - head "https://github.com/johang/btfs.git" - - bottle do - cellar :any - sha256 "6a3bfd9986dbb880ebbaf773ee60888e3473454abb359dcd020225ff0f400a21" => :catalina - sha256 "e7fe05d4c76e29b94cb3c91efa5769913a712dd14e6775379416f6f725e742ba" => :mojave - sha256 "dd76719f3c295e8750f1698519599384deda75a1598957dffaf1fd92384ef6dc" => :high_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 0f7b70666af6a..0000000000000 --- a/Formula/btparse.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Btparse < Formula - desc "BibTeX utility libraries" - homepage "https://metacpan.org/pod/distribution/Text-BibTeX/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" - - bottle do - cellar :any - sha256 "6ce6b4e17c2559540007f3e15e38ee5f4eff1cc5dd6782e87089abf824a94e90" => :catalina - sha256 "d69b814282b1205eb311f2b8f1f2d0077e2adeef72c2a010084eec34ffef7b71" => :mojave - sha256 "92fe826bfbaed8583343dbae8d2cf51d6161658e8ecd44a4bf7a308ab1f06d61" => :high_sierra - sha256 "b31041f88e5253fd880d38190b4828f8c9cee34f141352d5c3b70b33e18d824f" => :sierra - 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 e499a7e9e5997..0000000000000 --- a/Formula/btpd.rb +++ /dev/null @@ -1,27 +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 2 - - bottle do - cellar :any - sha256 "777f217d1d4cb87a8f4dae2bb1fdf3d62037561bd72f93fbb753674516870b0c" => :catalina - sha256 "0b479e7b812055a0ebbbae40c63624258044d74cb11a2d698392792a5b543e4d" => :mojave - sha256 "35042eba57182babbaff9f4a2eb1cbe891ebd82d2427a14926fd3617475da363" => :high_sierra - sha256 "6951afbf4af1e9d0df95f5d9260ef04eeb7e558cd2d58c3a429a99ad93c2dddc" => :sierra - end - - depends_on "openssl@1.1" - - 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/buildapp.rb b/Formula/buildapp.rb deleted file mode 100644 index e4263c1cc45bf..0000000000000 --- a/Formula/buildapp.rb +++ /dev/null @@ -1,31 +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 "7954a9008618ee64fbf2b93b1b2f503e25e979efaf5f10afee916d455ac3e231" => :catalina - 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 84d8ca4455df1..0000000000000 --- a/Formula/buildifier.rb +++ /dev/null @@ -1,26 +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 => "3.3.0", - :revision => "ce0cf814cb03dddf546ea92b3d6bafddb0b9eaf8" - - bottle do - cellar :any_skip_relocation - sha256 "05b148b61585416549120d37cc24be33b4852af2baa7a60785ab2a6df62ceb0c" => :catalina - sha256 "05b148b61585416549120d37cc24be33b4852af2baa7a60785ab2a6df62ceb0c" => :mojave - sha256 "05b148b61585416549120d37cc24be33b4852af2baa7a60785ab2a6df62ceb0c" => :high_sierra - end - - depends_on "bazelisk" => :build - - def install - system "bazelisk", "build", "--config=release", "buildifier:buildifier" - bin.install "bazel-bin/buildifier/darwin_amd64_stripped/buildifier" - end - - test do - touch testpath/"BUILD" - system "#{bin}/buildifier", "-mode=check", "BUILD" - end -end diff --git a/Formula/buildkit.rb b/Formula/buildkit.rb deleted file mode 100644 index b1e3f45f59b72..0000000000000 --- a/Formula/buildkit.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Buildkit < Formula - desc "Сoncurrent, cache-efficient, and Dockerfile-agnostic builder toolkit" - homepage "https://github.com/moby/buildkit" - url "https://github.com/moby/buildkit.git", - :tag => "v0.7.1", - :revision => "ddd175c5a2cc24530ea8ff427887c22939ca4289" - license "Apache-2.0" - head "https://github.com/moby/buildkit.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "58adec179c6d2f4467ecf67d5d3766e2bbce610b0ce69a2a36459fa5c067c183" => :catalina - sha256 "8ccea54a8f06cf3048da19403c362b5a9965e76728aa23ce4666f1846e7bd745" => :mojave - sha256 "86255f3dd127dd0cafdfeb46d777f7c1faa2864ae1162ba79261ddee0a142f9b" => :high_sierra - end - - depends_on "go" => :build - - def install - revision = Utils.safe_popen_read("git", "rev-parse", "HEAD").chomp - 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", "-trimpath", - "-ldflags", ldflags.join(" "), "-o", bin/"buildctl", "./cmd/buildctl" - - doc.install Dir["docs/*.md"] - end - - test do - shell_output("#{bin}/buildctl --addr unix://dev/null --timeout 0 du 2>&1", 1) - end -end diff --git a/Formula/buildozer.rb b/Formula/buildozer.rb deleted file mode 100644 index 90f0453af768f..0000000000000 --- a/Formula/buildozer.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Buildozer < Formula - desc "Rewrite bazel BUILD files using standard commands" - homepage "https://github.com/bazelbuild/buildtools" - url "https://github.com/bazelbuild/buildtools.git", - :tag => "3.3.0", - :revision => "ce0cf814cb03dddf546ea92b3d6bafddb0b9eaf8" - head "https://github.com/bazelbuild/buildtools.git" - - bottle do - cellar :any_skip_relocation - sha256 "394ee9a737ae1961fc4a9b64077b34ebbf62ed61466b0445a859e3277b9d3b43" => :catalina - sha256 "394ee9a737ae1961fc4a9b64077b34ebbf62ed61466b0445a859e3277b9d3b43" => :mojave - sha256 "394ee9a737ae1961fc4a9b64077b34ebbf62ed61466b0445a859e3277b9d3b43" => :high_sierra - end - - depends_on "bazelisk" => :build - - def install - system "bazelisk", "build", "--config=release", "buildozer:buildozer" - bin.install "bazel-bin/buildozer/darwin_amd64_stripped/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/buku.rb b/Formula/buku.rb deleted file mode 100644 index 5b13d5adef54e..0000000000000 --- a/Formula/buku.rb +++ /dev/null @@ -1,155 +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.4.tar.gz" - sha256 "c7d755569117ceb85fdda734dcca657e01f6d5252d7d3b9f757faeedfdcac741" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "eddbed7b65e27d075deac0c14aaad86714085e02fa8e565a9f34524049c9a9b9" => :catalina - sha256 "211a2ba97cba060b7820a7def2d2956224ea21ae56ac9c2a97ee233f055ec4ec" => :mojave - sha256 "663b219a77e3005f067e4030633ed9ffbdf9d89213b66b8d1d07ab54df23c078" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "expect" => :test - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/c6/62/8a2bef01214eeaa5a4489eca7104e152968729512ee33cb5fbbc37a896b7/beautifulsoup4-4.9.1.tar.gz" - sha256 "73cc4d115b96f79c7d77c1c7f7a0a8d4c57860d1041df407dd1aae7f07a77fd7" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b4/19/53433f37a31543364c8676f30b291d128cdf4cd5b31b755b7890f8e89ac8/certifi-2020.4.5.2.tar.gz" - sha256 "5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - 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/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "soupsieve" do - url "https://files.pythonhosted.org/packages/3e/db/5ba900920642414333bdc3cb397075381d63eafc7e75c2373bbc560a9fa1/soupsieve-2.0.1.tar.gz" - sha256 "a59dc181727e95d25f781f0eb4fd1825ff45590ec8ff49eadfd7f1a537cc0232" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - 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 - 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 "Generate auto-tag (YYYYMonDD)? (y/n): " - send "y\r" - 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 missing package manager for macOS", result - end -end diff --git a/Formula/bulk_extractor.rb b/Formula/bulk_extractor.rb deleted file mode 100644 index 9efcf3892434d..0000000000000 --- a/Formula/bulk_extractor.rb +++ /dev/null @@ -1,62 +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 3 - - bottle do - sha256 "6acada1995761f484993f407f33014260f8c16596381172b405fe84eef206e06" => :catalina - sha256 "da01b2d5208c362fa10baa1a3b1d7fd018f4886eddb068107b9786c36bbff480" => :mojave - sha256 "621af8efc0671cd2905f4f077c9cfef8ac2493cf65421fb2973228c2b651c24e" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "boost" - depends_on "openssl@1.1" - - # Upstream commits for OpenSSL 1.1 compatibility in dfxm: - # https://github.com/simsong/dfxml/commits/master/src/hash_t.h - # Three commits are picked: - # - https://github.com/simsong/dfxml/commit/8198685d - # - https://github.com/simsong/dfxml/commit/f2482de7 - # - https://github.com/simsong/dfxml/commit/c3122462 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/78bb67a8/bulk_extractor/openssl-1.1.diff" - sha256 "996fd9b3a8d1d77a1b22f2dbb9d0e5c501298d2fd95ad84a7ea3234d51e3ebe2" - end - - def install - # Source contains to copies of dfxml, keep them in sync - # (because of the patch). Remove in next version. - rm_rf "plugins/dfxml" - cp_r "src/dfxml", "plugins" - - # Regenerate configure after applying the patch. - # Remove in next version. - system "autoreconf", "-f" - - 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 0e48cae4589b2..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.89.tar.gz" - sha256 "621b36e91c0371933f3c2156db22c083383164881d2a6b84636759dc4cbb0bb8" - head "https://github.com/bulletphysics/bullet3.git" - - bottle do - sha256 "38cdb6c948cb2c75ad2d6640629f1cf72b7901b54483f9bc25ba0fd307b90b55" => :catalina - sha256 "e4a628878c9358b5a986ffddc682795f13a0a3d04f11f8bbf753e98827d4fdbf" => :mojave - sha256 "ddfb705ac9e42845d9d357131add82eea36bdceee95118a970cf4830a4be1878" => :high_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/bumpversion.rb b/Formula/bumpversion.rb deleted file mode 100644 index 7bbb7500792dd..0000000000000 --- a/Formula/bumpversion.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Bumpversion < Formula - include Language::Python::Virtualenv - - desc "Increase version numbers with SemVer terms" - homepage "https://pypi.python.org/pypi/bumpversion" - # maintained fork for the project - # Ongoing maintenance discussion for the project, https://github.com/c4urself/bump2version/issues/86 - url "https://github.com/c4urself/bump2version/archive/v1.0.0.tar.gz" - sha256 "06a7cb0fb7155b9283c4d10180e477f658754595b4dedb249f1e143e899d0e6c" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "a379a5aa089128d51f39a585e3465520b4a109a7b98e0237dc5b4478ce050001" => :catalina - sha256 "dea282fd874f598a1099885ee821f1f45662844724e9650362848de637e421d0" => :mojave - sha256 "0ef3a9a86d8504dc510d4ccff21d71b832335abb7d7c739b5e514ef654b3900c" => :high_sierra - end - - depends_on "python@3.8" - - def install - virtualenv_install_with_resources - end - - test do - ENV["COLUMNS"] = "80" - assert_includes shell_output("script -q /dev/null #{bin}/bumpversion --help"), "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/bundler-completion.rb b/Formula/bundler-completion.rb deleted file mode 100644 index 8f9014fc7c1cc..0000000000000 --- a/Formula/bundler-completion.rb +++ /dev/null @@ -1,20 +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" - license "MIT" - 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 09ff4ff51fd3c..0000000000000 --- a/Formula/bundletool.rb +++ /dev/null @@ -1,38 +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/1.0.0/bundletool-all-1.0.0.jar" - sha256 "b40142e1e04e1e2fbf1588495082fafedb629c6c78dab0e193d2ebd6ec75f655" - license "Apache-2.0" - - bottle :unneeded - - depends_on "openjdk" - - resource "bundle" do - url "https://gist.githubusercontent.com/raw/ca85ede7ac072a44f48c658be55ff0d3/sample.aab" - sha256 "aac71ad62e1f20dd19b80eba5da5cb5e589df40922f288fb6a4b37a62eba27ef" - end - - def install - libexec.install "bundletool-all-#{version}.jar" => "bundletool-all.jar" - (bin/"bundletool").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/bundletool-all.jar" "$@" - EOS - end - - test do - resource("bundle").stage do - expected = <<~EOS - App Bundle information - ------------ - Feature modules: - Feature 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 2691be89929a1..0000000000000 --- a/Formula/bup.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Bup < Formula - desc "Backup tool" - homepage "https://bup.github.io/" - url "https://github.com/bup/bup/archive/0.30.1.tar.gz" - sha256 "11cfc63525a27559462116ed583874c9624e8c65027d0c8f9700a8afc77691e6" - head "https://github.com/bup/bup.git" - - bottle do - cellar :any_skip_relocation - sha256 "b3fdc5a3246004c995fe3df6036b1591999a9678f9e54b851cbdbd3a7a1824d4" => :catalina - sha256 "0aae81e8b0b51bfd243ea1cc40d540042ba8b9431473c9c916c8d34a168c3f92" => :mojave - sha256 "4616a9f3da047dd34aada7cbc9536f007aa4be01f0529abcb24e1ac4dba3fcc1" => :high_sierra - end - - depends_on "pandoc" => :build - depends_on :macos # Due to Python 2 - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/95/84/119a46d494f008969bf0c775cb2c6b3579d3c4cc1bb1b41a022aa93ee242/tornado-6.0.4.tar.gz" - sha256 "0fe2d45ba43b00a41cd73f8be321a44936dc1aba233dee979f17a042b83eb6dc" - 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(https://github.com/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 0fef869de40cd..0000000000000 --- a/Formula/burp.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Burp < Formula - desc "Network backup and restore" - homepage "https://burp.grke.org/" - revision 1 - - stable do - url "https://downloads.sourceforge.net/project/burp/burp-2.2.18/burp-2.2.18.tar.bz2" - sha256 "9c0c5298d8c2995d30d4e1a63d2882662e7056ce2b0cee1f65d7d0a6775c0f81" - - resource "uthash" do - url "https://github.com/troydhanson/uthash.git", - :revision => "8b214aefcb81df86a7e5e0d4fa20e59a6c18bc02" - end - end - - bottle do - sha256 "a028ea604ba4bbb5abe2d9985e94ece9f673cf33e35191063eb91e356923e982" => :catalina - sha256 "f45062f56a6cc3bc9ba09b84d9f44e599015387d6d31b0ae8a289fa74a904021" => :mojave - sha256 "1855c5623a4d7ec1ed397f2646772d807a127f80f196c41dcae0efe7615afd8d" => :high_sierra - sha256 "157aa6cc33291ec50b8597b3bd97b08e0a92f79e634ec122eb0911e86bc395c9" => :sierra - 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@1.1" - uses_from_macos "zlib" - - 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 e358b300eb275..0000000000000 --- a/Formula/bvi.rb +++ /dev/null @@ -1,24 +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.1.src.tar.gz" - sha256 "3035255ca79e0464567d255baa5544f7794e2b7eb791dcc60cc339cf1aa01e28" - license "GPL-3.0" - - bottle do - sha256 "83cfa7a1fe8848d8eab7f01da94a32e75eb7c57221854a3f3f06a05417975977" => :catalina - sha256 "567e9512dfd4fcf7768c442a6e609f7b798b887e4cdd59c1b38970940b9c528f" => :mojave - sha256 "28ba5db61217dfe797423fd55b5fce06def1d5760aa466685759f1e315459777" => :high_sierra - end - - uses_from_macos "ncurses" - - 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 fe2bbdc30a918..0000000000000 --- a/Formula/bwa.rb +++ /dev/null @@ -1,33 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "59b821b80f729fef923c3edb048478836c72d6aea34b245d1b292b2c3f893432" => :catalina - sha256 "6b07cef5ea1955d8a83e7b59ef8458a7604998f735f0eab85889fa3aedc7e953" => :mojave - sha256 "02da3eecd6569c193a55436f705c8d351d052e44b79a43d6afc50f7308603a73" => :high_sierra - sha256 "4db97125930b495fc34b6d161bea57171ac4bf2a5bf48ca1088a69a594874710" => :sierra - sha256 "bee09d138e9d8f45c12d6c99b48a3e6891b6e4d3f5c6a6847bfeaa28afc2f362" => :el_capitan - end - - uses_from_macos "zlib" - - 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 94c5691b39594..0000000000000 --- a/Formula/bwctl.rb +++ /dev/null @@ -1,39 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "125c3592d5a34d3913dde26356ee894136716f6b224ab1d8bc14ab487fbd2633" => :catalina - sha256 "b4e91dbfca063d51a0280dffde519e9d4e5d66d0e0a301936dbbe86239e295a3" => :mojave - sha256 "2d326aaaa5c9031fd668569cbd68627d84884389b4883282d82259af152b12c3" => :high_sierra - end - - # https://software.internet2.edu/bwctl/ - # The use of BWCTL became deprecated with the release of pScheduler in perfSONAR 4.0 in April, 2017. - deprecate! :date => "2017-04-01" - - 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 29b0d12c6df2c..0000000000000 --- a/Formula/bwfmetaedit.rb +++ /dev/null @@ -1,24 +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/20.05/BWFMetaEdit_CLI_20.05_GNU_FromSource.tar.bz2" - sha256 "3eab6955aad9df5c6ab193492ea7d90709eb9214e9581cd190188a0933e4f1fe" - - bottle do - cellar :any_skip_relocation - sha256 "72cdfdf26527d3a82cac945c81a9a53097dd4831f3a315fdbd1dc67e0f1a01d0" => :catalina - sha256 "3afb53dc8f46493cc50dbce9d6369b84385110b908a847d2ab84eca9c06ff8cb" => :mojave - sha256 "332b5ad0e217e6433f51d25135f98036120f6444820dcece627228c1fdfe881c" => :high_sierra - 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 4875c4ec1e772..0000000000000 --- a/Formula/bwm-ng.rb +++ /dev/null @@ -1,32 +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/archive/v0.6.2.tar.gz" - sha256 "906a2d561f2ec9e0dd68b7f51b302908e99515ea1216d0ecaf14d873ef54ae70" - license "GPL-2.0" - head "https://github.com/vgropp/bwm-ng.git" - - bottle do - cellar :any_skip_relocation - sha256 "99d28681821e0c8114f4d1ea8db15ff088beb61d755e657c4a43684292cf556d" => :catalina - sha256 "4126db28facbbd0c0575d166a4c30968c4449b8094430022d3c8455ec7481809" => :mojave - sha256 "4a8ffbfe0bc2c9bf93bd516cff8916e9ea1d9554d939f21c4f7e9bfbd02ab04f" => :high_sierra - sha256 "0c663c3fedbcdc690b553ccb88b6f69b94a4a70dea67e3d152dbaaa741973ba8" => :sierra - 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/byacc.rb b/Formula/byacc.rb deleted file mode 100644 index 477a151487d0c..0000000000000 --- a/Formula/byacc.rb +++ /dev/null @@ -1,23 +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-20200330.tgz" - sha256 "e099e2dd8a684d739ac6b9a0e43d468314a5bc34fd21466502d120b18df51fb0" - - bottle do - cellar :any_skip_relocation - sha256 "720be331b73d9d96ab6132e804413990c6ce224322071972634b4175d2289188" => :catalina - sha256 "06a2014523f5c2efedefa5463275a441ada57a50d61a4f801d8c503d0406bde8" => :mojave - sha256 "37c98bb69ca30ceee1ed62383b98ae1ca639f2b52e224baf0b71d5616244c638" => :high_sierra - 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 a855dab553c4e..0000000000000 --- a/Formula/byobu.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Byobu < Formula - desc "Text-based window manager and terminal multiplexer" - homepage "https://launchpad.net/byobu" - url "https://launchpad.net/byobu/trunk/5.133/+download/byobu_5.133.orig.tar.gz" - sha256 "4d8ea48f8c059e56f7174df89b04a08c32286bae5a21562c5c6f61be6dab7563" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "39b468dabc1497338b4511f9f565f9adcdd058a99207de345da28b18a0826ae6" => :catalina - sha256 "39b468dabc1497338b4511f9f565f9adcdd058a99207de345da28b18a0826ae6" => :mojave - sha256 "39b468dabc1497338b4511f9f565f9adcdd058a99207de345da28b18a0826ae6" => :high_sierra - 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 7934a22840bec..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.11/byteman-download-4.0.11-bin.zip" - sha256 "33e2e305cf313edfce72fd00c1e8183850ca2dfb5c595ca4a57bf19e1af7166a" - - bottle :unneeded - depends_on "openjdk" - - def install - rm_rf 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 <<~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 25103fa087347..0000000000000 --- a/Formula/bzip2.rb +++ /dev/null @@ -1,34 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "b4fd6d4e72285e422d385623273ccd7967f4a3f475335cd49aa61e22c3e7d3d6" => :catalina - sha256 "b8683b824f4cc702d06031c3762ba079e8bc1ea27413f6d08f10e93c539d89fd" => :mojave - sha256 "c7f2266c2d354c706de5163c23bb7b7204f1f15a85027ea486877a0c5d253336" => :high_sierra - sha256 "1f11350ccb9a3bd1dd250b5e440d68a5ea65408d4b91f9eae2aa7628e899b7c5" => :sierra - 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-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 f8385b8696f2a..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://deb.debian.org/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 60e95962f279c..0000000000000 --- a/Formula/bzt.rb +++ /dev/null @@ -1,241 +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.14.2.tar.gz" - sha256 "b79298e80516e42997c68951d15bce772d366eed2d23d1d42ac7f24b06345837" - license "Apache-2.0" - revision 1 - head "https://github.com/Blazemeter/taurus.git" - - bottle do - cellar :any_skip_relocation - sha256 "22ed44ba23cb8dec0defad0c8c4f8055769ddd8ce8db66b9c3d7317b5f78d6b9" => :catalina - sha256 "0181e2b001b08f8e0baa534a272738a15b7db65ca6cd26b3a441fc30a41e0063" => :mojave - sha256 "598bc69dcb152689464f0dfe8249de3ac2afbbe5629d722a8a9b863e9ac1d736" => :high_sierra - end - - # can only run with python 3.7 due to this issue, https://github.com/simonpercivall/astunparse/issues/43 - depends_on "python@3.7" - - resource "apiritif" do - url "https://files.pythonhosted.org/packages/96/23/78c03e12b2d1b12b3e4451b7bcf432befc81568eed90e7629aa5620a1bc3/apiritif-0.9.2.tar.gz" - sha256 "27d9cf195dec00988d7bde7832fa0b8485bd0d0138afe99eef08f4a323b4aead" - end - - resource "Appium-Python-Client" do - url "https://files.pythonhosted.org/packages/f2/02/930b04d430cd404856e6eaaf80b01b4c3066375fcb21ac811f1f30f6666d/Appium-Python-Client-0.51.tar.gz" - sha256 "ee5689ca5d1971dd81c4d056d634058d1205b4702e546795b595edb3fd0f6a7f" - 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/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "colorlog" do - url "https://files.pythonhosted.org/packages/a5/51/c6e1f2c7e6d7524b580d5a8d7691fd4530f894ae8a23ba66a065291ceba2/colorlog-4.1.0.tar.gz" - sha256 "30aaef5ab2a1873dec5da38fd6ba568fa761c9fa10b40241027fa3edea47f3d2" - end - - resource "cssselect" do - url "https://files.pythonhosted.org/packages/70/54/37630f6eb2c214cdee2ae56b7287394c8aa2f3bafb8b4eb8c3791aae7a14/cssselect-1.1.0.tar.gz" - sha256 "f95f8dedd925fd8f54edb3d2dfb44c190d9d18512377d3c1e2388d16126879bc" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "EasyProcess" do - url "https://files.pythonhosted.org/packages/0b/1b/87836fe6bfc157fac6d0356c5d7752dabb5097980e40c0123464acd9324b/EasyProcess-0.2.10.tar.gz" - sha256 "636b5e30222cde1e881fafc0112b35d516bce41ddee83ecbac656dec9befea1b" - end - - resource "fuzzyset" do - url "https://files.pythonhosted.org/packages/2e/78/7509f3efbb6acbcf842d7bdbd9a919ca8c0ed248123bdd8c57f08497e0dd/fuzzyset-0.0.19.tar.gz" - sha256 "2bf5a3de20f107124a4842d875e5005ee523719f97ab731caf4121e86ec8ccbc" - 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/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "importlib-metadata" do - url "https://files.pythonhosted.org/packages/b4/1b/baab42e3cd64c9d5caac25a9d6c054f8324cdc38975a44d600569f1f7158/importlib_metadata-1.6.0.tar.gz" - sha256 "34513a8a0c4962bc66d35b359558fd8a5e10cd472d37aec5f66858addef32c1e" - 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/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" - sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" - end - - resource "more-itertools" do - url "https://files.pythonhosted.org/packages/a0/47/6ff6d07d84c67e3462c50fa33bf649cda859a8773b53dc73842e84455c05/more-itertools-8.2.0.tar.gz" - sha256 "b1ddb932186d8a6ac451e1d95844b382f55e12686d51ca0c68b6f61f2ab7a507" - 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/84/1e/ff467ac56bfeaea51d4a2e72d315c1fe440b20192fea7e460f0f248acac8/numpy-1.18.2.zip" - sha256 "e7894793e6e8540dbeac77c87b489e331947813511108ae097f1715c018b8f3d" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/65/37/83e3f492eb52d771e2820e88105f605335553fe10422cba9d256faeb1702/packaging-20.3.tar.gz" - sha256 "3c292b474fda1671ec57d46d739d072bfd495a4f51ad01a055121d81e952b7a3" - end - - resource "pluggy" do - url "https://files.pythonhosted.org/packages/f8/04/7a8542bed4b16a65c2714bf76cf5a0b026157da7f75e87cc88774aa10b14/pluggy-0.13.1.tar.gz" - sha256 "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0" - 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/c4/b8/3512f0e93e0db23a71d82485ba256071ebef99b227351f0f5540f744af41/psutil-5.7.0.tar.gz" - sha256 "685ec16ca14d079455892f25bd124df26ff9137664af445563c1bd36629b5e0e" - end - - resource "py" do - url "https://files.pythonhosted.org/packages/bd/8f/169d08dcac7d6e311333c96b63cbe92e7947778475e1a619b674989ba1ed/py-1.8.1.tar.gz" - sha256 "5e27081401262157467ad6e7f851b7aa402c5852dbcb3dae06768434de5752aa" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "pytest" do - url "https://files.pythonhosted.org/packages/6d/4e/572aed20422dee7fa2bd27995b2a53a32de90c1826e5531c9df6d3ea77ed/pytest-5.4.1.tar.gz" - sha256 "84dde37075b8805f3d1f392cc47e38a0e59518fb46a431cfdaf7cf1ce805f970" - 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/1e/7c/28b48481c8992727ac90526bb4395b76081b6df8265835a6d6a478c7e2c9/PyVirtualDisplay-0.2.5.tar.gz" - sha256 "5b267c8ffc98fcbd084ba852ab4caef3f22e9362bc5d117e1697e767553eaf41" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - 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/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - 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/82/a8/60df592e3a100a1f83928795aca210414d72cebdc6e4e0c95a6d8ac632fe/texttable-1.6.2.tar.gz" - sha256 "eff3703781fbc7750125f50e10f001195174f13825a92a45e9403037d539b4f4" - 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/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - end - - # pinned at 2.0.1 version - resource "urwid" do - url "https://files.pythonhosted.org/packages/c7/90/415728875c230fafd13d118512bde3184d810d7bf798a631abc05fac09d0/urwid-2.0.1.tar.gz" - sha256 "644d3e3900867161a2fc9287a9762753d66bd194754679adb26aede559bcccbc" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" - sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" - end - - resource "wheel" do - url "https://files.pythonhosted.org/packages/75/28/521c6dc7fef23a68368efefdcd682f5b3d1d58c2b90b06dc1d0b805b51ae/wheel-0.34.2.tar.gz" - sha256 "8788e9155fe14f54164c1b9eb0a319d98ef02c160725587ad60f14ddc57b6f96" - end - - # pinned at 2.2.0 version - resource "zipp" do - url "https://files.pythonhosted.org/packages/60/85/668bca4a9ef474ca634c993e768f12bd99af1f06bb90bb2655bc538a967e/zipp-2.2.0.tar.gz" - sha256 "5c56e330306215cd3553342cfafc73dda2c60792384117893f3a83f8a1209f50" - 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 -v -o execution.executor=apiritif -o execution.iterations=1 -o execution.scenario.requests.0=https://gettaurus.org/" - # assert_match /INFO: Samples count: 1, .*% failures/, shell_output(cmd) - system(cmd) - end -end diff --git a/Formula/c-ares.rb b/Formula/c-ares.rb deleted file mode 100644 index b37c61f9051a9..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.16.1.tar.gz" - sha256 "d08312d0ecc3bd48eee0a4cc0d2137c9f194e0a28de2028928c0f6cae85f86ce" - - bottle do - cellar :any - sha256 "0ba43741f90d2529cf03785faf077ee38898124474bd147718ed8a9ccf0f68a5" => :catalina - sha256 "5c144152a0ea9ce016043fc37b6f456f9a8270298432d5283c52ec3676c70b3c" => :mojave - sha256 "a2761fa50d7e565997a8c1f5fffdad4ad439b5f5245852b5bf6c431b85fe447a" => :high_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 1c13de303f585..0000000000000 --- a/Formula/c-blosc.rb +++ /dev/null @@ -1,32 +0,0 @@ -class CBlosc < Formula - desc "Blocking, shuffling and loss-less compression library" - homepage "https://blosc.org/" - url "https://github.com/Blosc/c-blosc/archive/v1.19.0.tar.gz" - sha256 "cf3d6193fece9becddb62248b9981bf78cf1c7faf58150fd520d4755cd622488" - - bottle do - cellar :any - sha256 "3f0bd48f8086cb7ea76dfca4b61d702b91badee76faf05ceff514f795537c5af" => :catalina - sha256 "da10033ade2963d8903182fe9f7b5f98f9064d0fcba9fd1b0ca00bacc23efb8f" => :mojave - sha256 "83492ba1473b33ebbd54b0369bc67a904293e345a15f89ad7ba2a59039933b56" => :high_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 b705e509d72d5..0000000000000 --- a/Formula/c-kermit.rb +++ /dev/null @@ -1,34 +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 "fea40d461340389165bcaf8ce5fa074d703baef9a44252d25b3a0f96c29660cf" => :catalina - 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..bbc86eb5adbb6 --- /dev/null +++ b/Formula/c/c-ares.rb @@ -0,0 +1,56 @@ +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_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..0d4ccbf4a60fb --- /dev/null +++ b/Formula/c/c-blosc.rb @@ -0,0 +1,39 @@ +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_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 + + 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..42d9a9f99998a --- /dev/null +++ b/Formula/c/c-blosc2.rb @@ -0,0 +1,49 @@ +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.17.1.tar.gz" + sha256 "53c6ed1167683502f5db69d212106e782180548ca5495745eb580e796b7f7505" + license "BSD-3-Clause" + head "https://github.com/Blosc/c-blosc2.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "58beb2b79bb984d4e73c71b84614cfbba11e85c68575202d5b3a5cc81d8f5221" + sha256 cellar: :any, arm64_sonoma: "b5f40feddf8a2f2e39825db956b8cf1974d884ffdde312b7e7afae86a69bcfa4" + sha256 cellar: :any, arm64_ventura: "5feb28dd5e0f6d0aa40d616b8658e3978bb5da8b4bf381d62b1b3c03f72f5e4d" + sha256 cellar: :any, sonoma: "797bb0441a67fa5d52ba8cc46eee6f14a2b87acda45fd0e52f0cd2fa1cf7d68f" + sha256 cellar: :any, ventura: "503723663a9800963f7a0b3521dd05014771d84945b79d9395a368d7e2762264" + sha256 cellar: :any_skip_relocation, arm64_linux: "23d52dea4d4b15f3daeee5f2f7099734e151700531831e2cd13e03200ceb0180" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d252ebf05d445af884824d32ab6c6622588c1c200bd3d3aa9285f9579bf5436" + 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 + + args = %w[ + -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..e28110fe9c20d --- /dev/null +++ b/Formula/c/c-kermit.rb @@ -0,0 +1,191 @@ +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 + + bottle do + rebuild 2 + 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..71fda6626ff6d --- /dev/null +++ b/Formula/c/c.rb @@ -0,0 +1,22 @@ +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.14.tar.gz" + sha256 "2b66d79d0d5c60b8e6760dac734b8ec9a7d6a5e57f033b97086821b1985a870b" + license "MIT" + head "https://github.com/ryanmjacobs/c.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "eebb1128fae6df85637e7549c813991361c29fe62b02d4b003ebf2b5d37404ca" + 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..518c5599617f1 --- /dev/null +++ b/Formula/c/c10t.rb @@ -0,0 +1,162 @@ +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 11 + + bottle do + sha256 cellar: :any, arm64_sequoia: "b9cdeef70745ce25fb83a076585191b65f44a937075ed8f165e092c974550f96" + sha256 cellar: :any, arm64_sonoma: "56bce6a79dc3ee8b07a0441e2b299dcb8ce0ba98d86e37af244519b8617914bc" + sha256 cellar: :any, arm64_ventura: "ba333295a388f76a8626f6c68548a02efa8262552aa9e88b4c66c6e1be556e67" + sha256 cellar: :any, sonoma: "603ba928df95c77be7960e908145afb1a432174f953e366cacb584721b76158c" + sha256 cellar: :any, ventura: "22ae09c19e427bfc4aa514a0de60dc3b6fb1013f6b862422539357e118b3f4e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "de79ed48a54bef77ca5a116f2adce08f91af261900d11fc4a38250b014ed1cac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c4e4c6894ab5e4ab909a70fb123f6b788730806b1d388a59577ba8e2111e8e3" + 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 + 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/Formula/c/c2048.rb b/Formula/c/c2048.rb new file mode 100644 index 0000000000000..24107e5032080 --- /dev/null +++ b/Formula/c/c2048.rb @@ -0,0 +1,28 @@ +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_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..13e9827ce8f7a --- /dev/null +++ b/Formula/c/c2patool.rb @@ -0,0 +1,54 @@ +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.16.5.tar.gz" + sha256 "9e593ffe7f27ab760fb17caf3143ca7e445158d702f035ab9a839c4c465dd83b" + 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_sequoia: "e1fda9e446b1765c2f10eb3fcaaf967f3c705aaee390e29ecf58603e0341a05b" + sha256 cellar: :any, arm64_sonoma: "5e4c1836850836365e9723eee40879a3f5d6b06838ecd1920ee0f4fd8ecd36f7" + sha256 cellar: :any, arm64_ventura: "796b7bcbcd05b1a31a1793a0aac9b49cb3e9a0a6c2f429d872d1948aca00e02f" + sha256 cellar: :any, sonoma: "0f81244ee65ec25a7fd1a0c0e78bd36d784ab93357c2305c4e556f4174115d66" + sha256 cellar: :any, ventura: "d293283a0de4334004e5ad2377071eb6871c8c0b63cb5ddcc49f9596929d759b" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b74e969d72ff3039f61a8f7bd34f3abbe1b456c9e1ff8f4cffa0d3cd1361216" + sha256 cellar: :any_skip_relocation, x86_64_linux: "83b08d092a1dd277cbede2d51420987e63936f4e3dd6716564d093dcccd18f97" + 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..efbfd5ed75375 --- /dev/null +++ b/Formula/c/c2rust.rb @@ -0,0 +1,42 @@ +class C2rust < Formula + desc "Migrate C code to Rust" + homepage "https://c2rust.com/" + url "https://github.com/immunant/c2rust/archive/refs/tags/v0.20.0.tar.gz" + sha256 "482330d3f27cfe85deea207e490bebbbe9c709b4bc054e3135498b3bbb585bec" + license "BSD-3-Clause" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "905499716b48b54ad1eea09ff40e229e2056536e72098b7605dc2ddb145117c4" + sha256 cellar: :any, arm64_sonoma: "7ad4256baed5d1869cce80b57a863c9ef20c7b73632b574a8b4d40d35f4c6fd4" + sha256 cellar: :any, arm64_ventura: "60df9dd74e927f4dcbd82409a1e09036602b5de922e53b1cf8377cf6b199d069" + sha256 cellar: :any, sonoma: "8575b649a3f0faa7ee46b1f1bc38435f284973ef02b8ad24afcea5477eb60e40" + sha256 cellar: :any, ventura: "dd757588e38c35414c4a47feb0d0b40b2aeb39bd4f94f001c2479253fd433ce6" + sha256 cellar: :any_skip_relocation, arm64_linux: "20c31538b457c35efdf00988833dcd68df79d82e6ddabe188fe479b1f4fc2376" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8150aa61370a613f5df88413c96cafc937fe817e0f80cff2134132270323feb7" + end + + depends_on "cmake" => [:build, :test] + depends_on "rust" => :build + depends_on "llvm@19" + + # cmake 4.0 build patch, upstream pr ref, https://github.com/immunant/c2rust/pull/1214 + patch do + url "https://github.com/immunant/c2rust/commit/c96c1c0e49d8be452d97b3e13c741324befd7b77.patch?full_index=1" + sha256 "9670a043ffade24eb014e6fee69707ab69df81ea76f9973fd7d4a68499362013" + 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..71b5d61a85d1e --- /dev/null +++ b/Formula/c/c3c.rb @@ -0,0 +1,82 @@ +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.1.tar.gz" + sha256 "bb18f76afdd13b3696c8acf53465eb0e1fc175ec6323cf9a3e61dc6634ad3ca0" + 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_sequoia: "b50a1d354a416ac73ab60c0c0295d93172c567dbbecb8a042e489a4124ac6233" + sha256 cellar: :any, arm64_sonoma: "882a8f0bf00107ce4851a2da6feadc26e29f6d0c25c942aff3f2df0ca67f3b36" + sha256 cellar: :any, arm64_ventura: "3882662dfda73d09456a78627736015d2c6b515831cbea8834b2c5b07f6d4581" + sha256 cellar: :any, sonoma: "c0ac025e9145794d3b05bdfd1ff89a98e83775d4a4e338ebc873060a08a9647b" + sha256 cellar: :any, ventura: "4628e5f125da94851cdc8362df8532c4a33b0113b74d75df9503c1cec06782fb" + sha256 arm64_linux: "d260271c0e5b7037e94aed1a3bcafbe0aecbaf8139f9a6b0e0b726c450dd2fdd" + sha256 x86_64_linux: "30d98cbbe0e8e66ca6cb619934feca8a915bdf780bcfcd839bf4d242a7e1f4ec" + end + + depends_on "cmake" => :build + depends_on "lld" + depends_on "llvm" + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "zlib" + + # Linking dynamically with LLVM fails with GCC. + fails_with :gcc + + def install + args = [ + "-DC3_LINK_DYNAMIC=ON", + "-DC3_USE_MIMALLOC=OFF", + "-DC3_USE_TB=OFF", + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + "-DLLVM=#{Formula["llvm"].opt_lib/shared_library("libLLVM")}", + "-DLLD_COFF=#{Formula["lld"].opt_lib/shared_library("liblldCOFF")}", + "-DLLD_COMMON=#{Formula["lld"].opt_lib/shared_library("liblldCommon")}", + "-DLLD_ELF=#{Formula["lld"].opt_lib/shared_library("liblldELF")}", + "-DLLD_MACHO=#{Formula["lld"].opt_lib/shared_library("liblldMachO")}", + "-DLLD_MINGW=#{Formula["lld"].opt_lib/shared_library("liblldMinGW")}", + "-DLLD_WASM=#{Formula["lld"].opt_lib/shared_library("liblldWasm")}", + ] + + ENV.append "LDFLAGS", "-lzstd -lz" + 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" + llvm = Formula["llvm"] + 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..1ba337ca5a6cc --- /dev/null +++ b/Formula/c/c4core.rb @@ -0,0 +1,71 @@ +class C4core < Formula + desc "C++ utilities" + homepage "https://github.com/biojppm/c4core" + url "https://github.com/biojppm/c4core/releases/download/v0.2.6/c4core-0.2.6-src.tgz" + sha256 "203a8dbd156b1b5062959627b7757f8953d03ab05a992ecc471fcefe7274194b" + license all_of: ["MIT", "BSL-1.0"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "5f2518dbe8f273c8320bcd8f2a632c747578c0f7638cb733aa884e0ae6827eca" + sha256 cellar: :any, arm64_sonoma: "a392aee67ab2432ce106b4631661ac9565407a74f380523d1cc2f3cd4539850d" + sha256 cellar: :any, arm64_ventura: "4bc536148a179f28a9b4bd28f81821084d0fdce24f3aa5e39c75093d0dc7d8f1" + sha256 cellar: :any, sonoma: "7799e77cad48cbc3d89bb3ac6f7e908264df34254d496912b8d739ced5aa0386" + sha256 cellar: :any, ventura: "05cf45edbe989806426ac81fb605084e5b832f9dddf5f86953885c8708f6b69a" + sha256 cellar: :any_skip_relocation, arm64_linux: "94e1da9372dd27bf1c64965212c79ae01acf0b3dbd344209f1042b2ab2fff357" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f6260a2a167adcd57264516af9b9119b06b6d03b6dde21572e8d49e04c23e188" + 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..b99d143e51bef --- /dev/null +++ b/Formula/c/c7n.rb @@ -0,0 +1,169 @@ +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.44.0.tar.gz" + sha256 "479d93f60d30df09ab395b4d0b3357671e5a99083ad32be733db3a5199302afd" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "3069f270b1211906f2123878f6749125fb45ff0fec682a3b6029a33cae5ba069" + sha256 cellar: :any, arm64_sonoma: "2964d0c5db3629cc9258956640768d0985fc90cbe091ce7e5f7d103fbcb14052" + sha256 cellar: :any, arm64_ventura: "ade9f869c63c4f164b8f0cb9c9498987755b1d6b0df3b0a91d3419c3fb79e0fa" + sha256 cellar: :any, sonoma: "2aea33e6fc65dc3e9012ba1e134716ed987a71399f2ad23bcbb099531da2755e" + sha256 cellar: :any, ventura: "6e85a3d196c7c0272dc2801d05cf8254b3d3a145766117ed37a7f37c77e38de9" + sha256 cellar: :any_skip_relocation, arm64_linux: "688e5aa081ea0ad131f45bac9a85ec0071de45ce12bad2003ac667b764a1a31b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5755eb2c6b43db3e73c220b5c19a83abeb434c7727480c7220e401963a99b18b" + end + + depends_on "rust" => :build # for rpds-py + depends_on "libyaml" + depends_on "python@3.13" + + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/ee/be/0cb6a7253e0a7041bbd5928a8d10e4327ffaf2b4cdcc3b34f2985c1b05ba/boto3-1.38.1.tar.gz" + sha256 "988e7fae7fd4d59798f84604d73a3a019c07b048f746c7c40258c0e656473887" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/7e/49/02f87fd4371662d590f9c4178615e18316e451ba82b214780c06a0be79d7/botocore-1.38.1.tar.gz" + sha256 "c2eb42eeaa502f236ba894a65ea7f7241711150cc450b9d59fbbad41e741adc0" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/33/08/c1395a292bb23fd03bdf572a1357c5a733d3eecbab877641ceacab23db6e/importlib_metadata-8.6.1.tar.gz" + sha256 "310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580" + 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/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" + sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" + 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 "referencing" do + url "https://files.pythonhosted.org/packages/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz" + sha256 "df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/fc/9e/73b14aed38ee1f62cd30ab93cd0072dec7fb01f3033d116875ae3e7b8b44/s3transfer-0.12.0.tar.gz" + sha256 "8ac58bc1989a3fdb7c7f3ee0918a66b160d038a147c7b5db1500930a607e9a1c" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + 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..6ef225e2b78c4 --- /dev/null +++ b/Formula/c/ca-certificates.rb @@ -0,0 +1,134 @@ +class CaCertificates < Formula + desc "Mozilla CA certificate store" + homepage "https://curl.se/docs/caextract.html" + url "https://curl.se/ca/cacert-2025-02-25.pem" + sha256 "50a6277ec69113f00c5fd45f09e8b97a4b3e32daa35d3a95ab30137a55386cef" + 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: "8f46fb05f753f80f2bc398c0a24b10d680bd77d496e2b931de0b61998e37aebc" + 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 + ] + + certs_list = Utils.safe_popen_read("/usr/bin/security", "find-certificate", "-a", "-p", *keychains) + certs = certs_list.scan( + /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m, + ) + + # Check that the certificate has not expired + valid_certs = certs.select do |cert| + begin + Utils.safe_popen_write("/usr/bin/openssl", "x509", "-inform", "pem", + "-checkend", "0", + "-noout") do |openssl_io| + openssl_io.write(cert) + end + rescue ErrorDuringExecution + # Expired likely. + next + end + + # Only include certs that have 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(cert) + end + purpose.include?("SSL server CA : Yes") + end + + # Check that the certificate is trusted in keychain + trusted_certs = begin + tmpfile = Tempfile.new + + verify_args = %W[ + -l -L + -c #{tmpfile.path} + -p ssl + ] + on_high_sierra :or_newer do + verify_args << "-R" << "offline" + end + + valid_certs.select do |cert| + tmpfile.rewind + tmpfile.write cert + tmpfile.truncate cert.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 certs + fingerprints = trusted_certs.to_set do |cert| + Utils.safe_popen_write("/usr/bin/openssl", "x509", "-inform", "pem", + "-fingerprint", + "-sha256", + "-noout") do |openssl_io| + openssl_io.write(cert) + end + end + + # Now process Mozilla certs we downloaded. + pem_certs_list = File.read(pkgshare/"cacert.pem") + pem_certs = pem_certs_list.scan( + /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m, + ) + + # Append anything new. + trusted_certs += pem_certs.select do |cert| + fingerprint = Utils.safe_popen_write("/usr/bin/openssl", "x509", "-inform", "pem", + "-fingerprint", + "-sha256", + "-noout") do |openssl_io| + openssl_io.write(cert) + end + fingerprints.add?(fingerprint) + end + + pkgetc.mkpath + (pkgetc/"cert.pem").atomic_write(trusted_certs.join("\n") << "\n") + end + + def linux_post_install + rm(pkgetc/"cert.pem") if (pkgetc/"cert.pem").exist? + pkgetc.mkpath + cp pkgshare/"cacert.pem", pkgetc/"cert.pem" + end + + test do + assert_path_exists pkgshare/"cacert.pem" + assert_path_exists pkgetc/"cert.pem" + assert compare_file(pkgshare/"cacert.pem", pkgetc/"cert.pem") if OS.linux? + end +end diff --git a/Formula/c/cabal-install.rb b/Formula/c/cabal-install.rb new file mode 100644 index 0000000000000..0b83bc28b33f4 --- /dev/null +++ b/Formula/c/cabal-install.rb @@ -0,0 +1,63 @@ +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.14.2.0/cabal-install-3.14.2.0.tar.gz" + sha256 "e8a13d7542040aad321465a576514267a753d02808a98ab17751243c131c7bdb" + license "BSD-3-Clause" + head "https://github.com/haskell/cabal.git", branch: "3.14" + + bottle do + sha256 cellar: :any, arm64_sequoia: "cb4c5b451162c33c333592e952278831d2db5f4dbf62658d5860c1745a2ad710" + sha256 cellar: :any, arm64_sonoma: "d01fea15c88a36df7f7d0212160718d1ccf4edaee43ce7d813e886dc5ab6dc1d" + sha256 cellar: :any, arm64_ventura: "eb1eee51d48816906c4ac3372812c89d9bbcaee36c66fb0dd2f18c5c694dfccf" + sha256 cellar: :any, sonoma: "e98155ea810622b58914f45f36e85fcba01698c29b0cc53132d9b7032ad3e4f8" + sha256 cellar: :any, ventura: "06509d41498a8a811293a1eb4adb22363543ab521d58b3f92aeb536fb512bcdd" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec83150f7dbbfe3b257c679dd8357800bedb9ce65961306c088a020969b04298" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eede6ad6ceac8c6b92a84e5930ec78533b89fac6b7b98999a54bbfd6623c9f5d" + 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..c70af505e014b --- /dev/null +++ b/Formula/c/cabextract.rb @@ -0,0 +1,45 @@ +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 + + bottle do + 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..4a426b6c038b3 --- /dev/null +++ b/Formula/c/cabin.rb @@ -0,0 +1,66 @@ +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.12.1.tar.gz" + sha256 "a8e038452b28880a464885dcbfe515441e0a066e673d3cce5df46871ad4fa38f" + license "Apache-2.0" + head "https://github.com/cabinpkg/cabin.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f38e629c4c0d3fd5460f41643ce97d2fdeffe237112eaf72937f9570406fa60f" + sha256 cellar: :any, arm64_sonoma: "63ed7a7e983261f5db9e8c52e53fc0e1ea6c55cdb4a5b1e78c30e1319682918b" + sha256 cellar: :any, arm64_ventura: "faed095c05cd1332b7cc9457a043349184796a8a2be912f53f645c7756c5106b" + sha256 cellar: :any, sonoma: "80b6c8f156f7e1e2439a7c67bc645c97e162215a447035244795df6bba5cb43a" + sha256 cellar: :any, ventura: "b36772a8e55457d84da02116e8cd33afd1a845496784998d9f8a830a2cad9b70" + sha256 cellar: :any_skip_relocation, arm64_linux: "7324557007b8078bd0fe5e0733ece75338ad4e63806c426b3f9d423ac477cdec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d53bf646f306baf6e06a3b84e4f560d1b6e7da5694eb39ad2ebb827a0d79b312" + 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 + + on_linux do + depends_on "gcc" # C++20 + end + + fails_with :clang do + build 1499 + cause "Requires C++20" + end + + fails_with :gcc do + version "11" + cause "Requires C++20" + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1499 || MacOS.version == :ventura) + # Avoid cloning `toml11` at build-time. + (buildpath/"build/DEPS/toml11").install_symlink Formula["toml11"].opt_include + system "make", "RELEASE=1", "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..23769fff33098 --- /dev/null +++ b/Formula/c/cabocha.rb @@ -0,0 +1,61 @@ +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"] + + bottle do + rebuild 1 + 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 mojave: "34825bb06bd8cbdb2fe082471044168cccdafc7414eac37eb6550f8a12e0dbe2" + 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..4bb1c75794393 --- /dev/null +++ b/Formula/c/cadaver.rb @@ -0,0 +1,57 @@ +class Cadaver < Formula + desc "Command-line client for DAV" + homepage "https://notroj.github.io/cadaver/" + url "https://notroj.github.io/cadaver/cadaver-0.26.tar.gz" + sha256 "9236e43cdf3505d9ef06185fda43252840105c0c02d9370b6e1077d866357b55" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?cadaver[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "1865f65bd09a67eab16c71888453b96c58b83d5ee053cb8b0afaf9ce632b3149" + sha256 arm64_sonoma: "2da179616e40cf56092cde66d44281e7f7f1031507642299f13702031f650d31" + sha256 arm64_ventura: "dbfd46990bd7f0da5555531fe05b453ed720ef200c000d4e72bcb2e6a0acd506" + sha256 sonoma: "abfa76ac943d4031ba46c0147e83dbb13cdc6f5049d1c66eba7396572e0bc437" + sha256 ventura: "a5369a2c7d4c1b21b64035be3c3a899872fb7e55c10374343386aee3a82d6fa6" + sha256 arm64_linux: "279521b28588a76695e693ce6397e2641d117a9b217a2c06337501f599fd430e" + sha256 x86_64_linux: "aca16f2c07fb756b65f35d3b6ed8f53f7f07226bb7657a6ec009629eb014732b" + 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..5ce6b5c7cf022 --- /dev/null +++ b/Formula/c/caddy.rb @@ -0,0 +1,81 @@ +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.0.tar.gz" + sha256 "e07e2747c394a6549751950ec8f7457ed346496f131ee38538ae39cf89ebcc68" + license "Apache-2.0" + head "https://github.com/caddyserver/caddy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ec2d892dd02a4b25ce7a0fb81a7d212938de43cdbb48135586e9aefb7dfbe40" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ec2d892dd02a4b25ce7a0fb81a7d212938de43cdbb48135586e9aefb7dfbe40" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9ec2d892dd02a4b25ce7a0fb81a7d212938de43cdbb48135586e9aefb7dfbe40" + sha256 cellar: :any_skip_relocation, sonoma: "591abcce17e69cdc1977ce6a40b088e4d26ce39056eef3b02f47582b0fdb1a86" + sha256 cellar: :any_skip_relocation, ventura: "591abcce17e69cdc1977ce6a40b088e4d26ce39056eef3b02f47582b0fdb1a86" + sha256 cellar: :any_skip_relocation, arm64_linux: "b0a9f327848ce83808e0ce71b49481b7310c4fea5f500f6cd1266dbc2728e51a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d751c862bc8581712b570bfffd0cd21197a0071e5318abd4028fa6af4f90d412" + end + + depends_on "go" => :build + + resource "xcaddy" do + url "https://github.com/caddyserver/xcaddy/archive/refs/tags/v0.4.4.tar.gz" + sha256 "5ba32eec2388638cebbe1df861ea223c35074528af6a0424f07e436f07adce72" + 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" + 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..06b744c7f7f0d --- /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.0", + revision: "4134777c293b07e0df867f5a8f68bc2e6dcae3e8" + license "MIT" + 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_sequoia: "2a057edc4d4e294e9f868f0949208658da81865a7e33e79c5e5d523c7be90205" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f334d5a15e41d04e07e24cd13d1394b3cc0cb02abe1d6fd0d2cf43d895c3ffd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9b4ce71c795476fa278a46d0c3d825eae6651eba6a1cbfd6367b7f6114e5f9b1" + sha256 cellar: :any_skip_relocation, sonoma: "b309158aa47a4729246b49c5c6f23e666322c67e60ee06e7a5b53010414b1ded" + sha256 cellar: :any_skip_relocation, ventura: "ac5c4906807fa8a4db6ae845565f33e75ed476c385aa124635a187bcee6fd084" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6bc7b05e63831241f86e8064e26a9187dd8bf2f51f0fd9cb97390a235dd5abb8" + 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..c98e48c11f4e9 --- /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.4.0.tar.gz" + sha256 "254eac4effc940cd285b1399960ec3d61618eb9241a039e7d5eeb37fc671ca57" + 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_sequoia: "4abdc7603278eed737a4c145eda48cbff5f55f7ebb3c55d9a4b2ad698a155fb5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4abdc7603278eed737a4c145eda48cbff5f55f7ebb3c55d9a4b2ad698a155fb5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4abdc7603278eed737a4c145eda48cbff5f55f7ebb3c55d9a4b2ad698a155fb5" + sha256 cellar: :any_skip_relocation, sonoma: "d355e65ff50026cc7026f49159a9b73eb8415aac5982b86deb71ad379ebf0c6d" + sha256 cellar: :any_skip_relocation, ventura: "d355e65ff50026cc7026f49159a9b73eb8415aac5982b86deb71ad379ebf0c6d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f99332bc1a054f054628f3ee0fb650828e183471f229ae478bbbf123179c72d4" + 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..6e938637a28be --- /dev/null +++ b/Formula/c/cadical.rb @@ -0,0 +1,65 @@ +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_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..b6422dc8e7f9f --- /dev/null +++ b/Formula/c/cadubi.rb @@ -0,0 +1,23 @@ +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" + + 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/caf.rb b/Formula/c/caf.rb new file mode 100644 index 0000000000000..609d433b5f94e --- /dev/null +++ b/Formula/c/caf.rb @@ -0,0 +1,49 @@ +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.0.2.tar.gz" + sha256 "ef4dd00ca7c59cd61dc336b6a8efbd6150ca85c404d213ecb61f6bcee4094ffc" + license "BSD-3-Clause" + head "https://github.com/actor-framework/actor-framework.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9537e004e941d95aac0be101fdb15af8482210717eec4ff76dcb467837cbbe18" + sha256 cellar: :any, arm64_sonoma: "4b8e61e0a9dba95d2b2894b31a370cddacfc030bd1ac9d8876fa3c80e9ed88c6" + sha256 cellar: :any, arm64_ventura: "acbf088b4337573a0710635d25ae8bb4828a8913b552443206b1c92ed0a555cc" + sha256 cellar: :any, sonoma: "418ac2c0d3b64145b22f801ba4868490d9306babce62ce2e315da9ccf4b8228d" + sha256 cellar: :any, ventura: "0d94e1fd5b0d827b48ae36871873a7f574635ca36256616912bfc1a3f02b390a" + sha256 cellar: :any_skip_relocation, arm64_linux: "678ca206b7bbb125aaf83dd4cacc878c720379a8a38a6372cb6a3b5834e2cf34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "891cd444eefd7ff0c2ca32273b9d7734a43a33f6758b343a126dfb99a8006b3d" + 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..f5bd843437a1a --- /dev/null +++ b/Formula/c/cafeobj.rb @@ -0,0 +1,44 @@ +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 + + bottle do + sha256 arm64_sequoia: "91c9ae231c3b44acf6923ac1c9131fc8cbe7edf2f992a617ce791289971dea73" + sha256 arm64_sonoma: "01e514ed674dceb8795c1803057a00efc3eb29b69dc250bee9f843a5c67d7de1" + sha256 arm64_ventura: "d965be913974b99253cb094994af1e82bcb6c8736d8658d4e4d80deae69dac93" + sha256 sonoma: "775c475b5a3af142c817148e402fa6de72dd767a537e1d7e5d2892472b5f5059" + sha256 ventura: "b711614790294d992198d166691e66e9e9e78abb1c039fc7e5b30eab1e26183f" + sha256 x86_64_linux: "779108ed08023bc358ac5276e28d7d7f0f4febc0dc99ea67ef04da3ac8d56ae2" + end + + depends_on "sbcl" + depends_on "zstd" + + def install + # Exclude unrecognized options + args = std_configure_args.reject { |s| s["--disable-debug"] || s["--disable-dependency-tracking"] } + + system "./configure", "--with-lisp=sbcl", "--with-lispdir=#{share}/emacs/site-lisp/cafeobj", *args + system "make", "install" + end + + test do + # Fails in Linux CI with "Can't find sbcl.core" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"cafeobj", "-batch" + end +end diff --git a/Formula/c/cahute.rb b/Formula/c/cahute.rb new file mode 100644 index 0000000000000..1c72357c61580 --- /dev/null +++ b/Formula/c/cahute.rb @@ -0,0 +1,120 @@ +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/cahuteproject/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_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.13" => :build + depends_on "libusb" + depends_on "sdl2" + + resource "toml" do + url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" + sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + end + + def python3 + "python3.13" + 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/caire.rb b/Formula/c/caire.rb new file mode 100644 index 0000000000000..7919f2184e3e7 --- /dev/null +++ b/Formula/c/caire.rb @@ -0,0 +1,46 @@ +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_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, 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 + 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..10b589e851eb0 --- /dev/null +++ b/Formula/c/cairo.rb @@ -0,0 +1,80 @@ +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 + sha256 cellar: :any, arm64_sequoia: "6b2d148a34a670430a459c374376ebed890b61eb7573e8aa952a4b909f443cee" + sha256 cellar: :any, arm64_sonoma: "1fd50d14699ddc03d348baeda1e3a2c98bce8fa74b248481559c3afa17b7784b" + sha256 cellar: :any, arm64_ventura: "8ea2169c9cc4391f1a06be0b97413d11e5db2c845c65627ea122407b463c6b16" + sha256 cellar: :any, sonoma: "76a88eab178ee0ada4fa05270834be6808e0f6480f68002d9f21bc41ee2e1cb6" + sha256 cellar: :any, ventura: "44424dbd81d5e1c591c60243921fb0aea4a3bfd919d24883cd86e74d82d3bfcd" + sha256 arm64_linux: "af87041f90f6c3a453baa6752055b67c0f9b6419f4f3f55c8639bd131417a44d" + sha256 x86_64_linux: "ad2f527ee5910160b725637d97e64bea8cbfebebf6ffa8720a49c2de73763a48" + 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[ + -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..518ff82d1248d --- /dev/null +++ b/Formula/c/cairomm.rb @@ -0,0 +1,54 @@ +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 + + bottle do + 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..39d2dd96d78cd --- /dev/null +++ b/Formula/c/cairomm@1.14.rb @@ -0,0 +1,54 @@ +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 + + bottle do + 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..c1bf9e4dd1323 --- /dev/null +++ b/Formula/c/cake.rb @@ -0,0 +1,50 @@ +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.0.0.tar.gz" + sha256 "0c77a4a8626b1f6aa886e542026f33e2645bda7177e66c6ca1f60a6cf80b9bf0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "78c022a53d5c794a02cb245365a20e68101ff498636aa9d9b0d5791df21e6946" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "39611171d03f29228d6c0f1402647d20a7ada16eff8a8c9fcd25c57d8ce5b7b1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "37df34c69614dea7ac08ea390a065de5765df3117ab8b7bf4d76135d9ec3ab3e" + sha256 cellar: :any_skip_relocation, ventura: "9d076394489c1d9004fb0749b3723dde1fd951a1cb4f7f81672e83c82680fd02" + sha256 cellar: :any_skip_relocation, arm64_linux: "3c28f268ba6ef8a1f944a6f722b47cf0b210b7c46dba41ecff0e85b83ce55f5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9790da9b120af327c140e99edb3d8bd88fe07016045863938915193f376494b2" + end + + depends_on "dotnet" + + conflicts_with "coffeescript", because: "both install `cake` binaries" + + def install + 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..b64ec255d9685 --- /dev/null +++ b/Formula/c/calabash.rb @@ -0,0 +1,48 @@ +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 + + 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..e0f62fdba1780 --- /dev/null +++ b/Formula/c/calc.rb @@ -0,0 +1,50 @@ +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" + + bottle do + 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..0f23547a27b99 --- /dev/null +++ b/Formula/c/calceph.rb @@ -0,0 +1,58 @@ +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.4.tar.gz" + sha256 "20c9f0bd720c5cfe99a7b342babda3ff91428adfec9d55357b380b4a13205d60" + 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_sequoia: "8052ae633e2e434f92a58297a7d95b7abf31c6df27a4f150f04acd90c458b24d" + sha256 cellar: :any, arm64_sonoma: "bccdf7dd4f4b833f7382eafad36ab00cc3e886f2193013fcf01f8c3edeab93f1" + sha256 cellar: :any, arm64_ventura: "ed3e3aa4f63ba31eb8b56a313e7695c2bc1a1ec3f76b91de087ba1ba4c89c477" + sha256 cellar: :any, sonoma: "71acfca39979f054472b0f287a256e3ef51548f77e6e20410a3c669403a1b63a" + sha256 cellar: :any, ventura: "4527dfd754d1f940f46eca0af7000e6cb8f8c801521810288325c5e189eab35b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ffc8336653268c6346b19ddab898e85adbe911d54c784a41a9867a28e7e617ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3cac5e4fa043c89c765556ecde72dfea4199b1f59f814840916c8c97eacc633f" + 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..4c2a624075d54 --- /dev/null +++ b/Formula/c/calcurse.rb @@ -0,0 +1,54 @@ +class Calcurse < Formula + desc "Text-based personal organizer" + homepage "https://calcurse.org/" + url "https://calcurse.org/files/calcurse-4.8.1.tar.gz" + sha256 "d86bb37014fd69b8d83ccb904ac979c6b8ddf59ee3dbc80f5a274525e4d5830a" + license "BSD-2-Clause" + + livecheck do + url "https://calcurse.org/downloads/" + regex(/href=.*?calcurse[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "22c2e293ade2672fe101d3ce0d0c1522b5b5123ec5fc9675c44c196b43c9ea80" + sha256 arm64_sonoma: "a65cd721971bc53914ae926c110cdea2da1a07e56cc39d27baa927c36f6f4934" + sha256 arm64_ventura: "06aed9c114caf7eb4c2d9377053a1ad7c38068668073392471776041005fad65" + sha256 arm64_monterey: "6fa82c03f449fac7c9ac5147bfec928eafc4fb954e8b83237f7dd12ec841ca0f" + sha256 arm64_big_sur: "bd80dc2cdaa60bc7c2179ddb040ac4d637e629a62c7e6808cf72d55065c1f38b" + sha256 sonoma: "84805e4841bbd1bca3f1a0f940121aeb9545696f634a90addef6dafd21c05f70" + sha256 ventura: "42caeb4b9974e324489abd0b2de0b79f32135040d748ef840b14c9d17e3671ff" + sha256 monterey: "71ac54ec9a310cb2e1cb76dba48a1805f3d4da56810851b4c1ed01ed5a028905" + sha256 big_sur: "34a9d866e4c0a83809187cf84a3248343580ee08c9566a3052e07e61d536fd65" + sha256 arm64_linux: "3a8496625aee8af8e440c8f529563d2ddf10b496314d6f5967d4159af4b450e9" + sha256 x86_64_linux: "e4b432bb1f32873d100d03212fb03d1a282e3c7a77dc905031ff05513fe0f76a" + end + + head do + url "https://git.calcurse.org/calcurse.git" + + depends_on "asciidoc" => :build + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + 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..ae9119e0b7bd8 --- /dev/null +++ b/Formula/c/calicoctl.rb @@ -0,0 +1,40 @@ +class Calicoctl < Formula + desc "Calico CLI tool" + homepage "https://www.projectcalico.org/" + url "https://github.com/projectcalico/calico.git", + tag: "v3.30.0", + revision: "572a32dd9b2f9784d66d74712d5ec2e703d25083" + license "Apache-2.0" + head "https://github.com/projectcalico/calico.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "684dc23bb8f8a9ee58242484b430d590653d3d82af0d438a94ebf00b1932da1a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "684dc23bb8f8a9ee58242484b430d590653d3d82af0d438a94ebf00b1932da1a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "684dc23bb8f8a9ee58242484b430d590653d3d82af0d438a94ebf00b1932da1a" + sha256 cellar: :any_skip_relocation, sonoma: "0ebe618e09a0bb695d5bc21dd446e04f27eca70ec93130dd5b059fe8cca8c229" + sha256 cellar: :any_skip_relocation, ventura: "0ebe618e09a0bb695d5bc21dd446e04f27eca70ec93130dd5b059fe8cca8c229" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a605d4efe02cf53f67fb8197ae57e84fdfce07d664e262fb6e7c444d5bf4bbb0" + end + + depends_on "go" => :build + + def install + commands = "github.com/projectcalico/calico/calicoctl/calicoctl/commands" + ldflags = "-X #{commands}.VERSION=#{version} " \ + "-X #{commands}.GIT_REVISION=#{Utils.git_short_head} " \ + "-s -w" + 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..e9e273d24fa05 --- /dev/null +++ b/Formula/c/camellia.rb @@ -0,0 +1,61 @@ +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 + + bottle do + 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, mojave: "347284dc085d1cd6acad286e8797ba3e001190e7cb04934b1f96d1e67481f302" + sha256 cellar: :any, high_sierra: "fc8cb8a0f24226fd1f93b32192f290107d44283196e1edb48458b184597aa729" + sha256 cellar: :any, sierra: "b4783ca8cf782a63d09daa1ff363c2fb4c4ea6dd4e75b8beb29167f536227730" + sha256 cellar: :any, el_capitan: "a80b2f52fd6811c5c4017bceac418d241c30342c93c1e9ae8911ed5274630e9c" + 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..102ada4bc1e31 --- /dev/null +++ b/Formula/c/camlp-streams.rb @@ -0,0 +1,41 @@ +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 3 + + bottle do + sha256 cellar: :any, arm64_sequoia: "9c01e19dbc10f3a4af763dc523057b9d9ed8a228bfe112f95750b9c8b3bfc2e4" + sha256 cellar: :any, arm64_sonoma: "8c5b166642bda73a4b0cec82e26841cf04037cb1b95c491e2a38d32e3655e823" + sha256 cellar: :any, arm64_ventura: "6e875ba06b206710fb758931b43acb200e772281009d97c04958a146da7279ec" + sha256 cellar: :any, sonoma: "84d5d716b9e0f96a7089aa19016f73ed7bbac5d57c5d1021ab60651bd59f565c" + sha256 cellar: :any, ventura: "9d289d1670bedb77b8584e5c4415aee97d234d3ae68be690e716919c4205bd28" + sha256 cellar: :any_skip_relocation, arm64_linux: "73528fbe83c95610b483969a7e22cd21591a66d65db021c9029e0a1d60adc615" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ad5e7c5397bb03af1cc538b43fda7e20169c35e1ff987489253aeb012ad8497b" + 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..70acd90e9987e --- /dev/null +++ b/Formula/c/camlp5.rb @@ -0,0 +1,58 @@ +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.03.01.tar.gz" + sha256 "057b8e06590cf29a1bd22b6c83aa5daa816d5cbb2ba2548409d474d7dc10c5b8" + license "BSD-3-Clause" + head "https://github.com/camlp5/camlp5.git", branch: "master" + + livecheck do + url :stable + regex(/^(?:rel[._-]?)?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "8eb1bd182dff1a1f93c7cad292a550a0ff6a7700dd383d344e605661413b1f73" + sha256 arm64_sonoma: "2b7feece68d3595e22218a9532a50cad7a835bf55555b8ae2acbe0aa001b206a" + sha256 arm64_ventura: "baac175d9fc1d95967bbd534fe163ed06461993f1fffa2a601c5a2daeb960942" + sha256 sonoma: "32bedf850db730633846714e007e702464370f6bfe5018bc387ee3e55744466e" + sha256 ventura: "b42b8272468115f0bc0fc793937a41f965dd09bf2cabd548d7fcbd974433042c" + sha256 arm64_linux: "a14a8a05c46c73c75f98bac84679db564a38f59d064401aebed5a8bf6d4e5299" + sha256 x86_64_linux: "40fdc0d4a01d13250fc2dfa8b8c1d7feaac99894e6deecd74b662d0dca58b812" + end + + depends_on "ocaml-findlib" => :build + depends_on "opam" => :build + depends_on "camlp-streams" + depends_on "ocaml" + + uses_from_macos "m4" => :build + + def install + opamroot = buildpath/".opam" + ENV["OPAMROOT"] = opamroot + ENV["OPAMYES"] = "1" + + system "opam", "init", "--no-setup", "--disable-sandboxing" + system "opam", "exec", "--", "opam", "install", ".", "--deps-only", "-y", "--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" + 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..0ce7215c6e053 --- /dev/null +++ b/Formula/c/camlpdf.rb @@ -0,0 +1,54 @@ +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" } + + bottle do + sha256 cellar: :any, arm64_sequoia: "34f2db85bff44fd2a7b00704e099a76106d85431dcb8f122a74ad530e585407d" + sha256 cellar: :any, arm64_sonoma: "22e65fe30f42615d8711c07c4d9df5fe61942f4e315575725d274d9572b13bd3" + sha256 cellar: :any, arm64_ventura: "5b4993442c060aba6405e5518b9246e72d4c6369f31dc5632d58398fa9456c44" + sha256 cellar: :any, sonoma: "804e849272f9ed7d58a318a199bae0a46169b46366ed87c136d7a6142b83bad0" + sha256 cellar: :any, ventura: "0f9d1b46f0389a342fa7305efe0393526860c2e6704537ae5d66e4456619adbb" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ce0aeb1507e9dfc7d1061644db37159269e094c72306989f01658744e8dd04a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae56e872f83e5c2e5087e75108baa31c90171fe2de3c14495b6fb41d6dd7feb8" + 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..0ac10389ef5e7 --- /dev/null +++ b/Formula/c/canfigger.rb @@ -0,0 +1,81 @@ +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_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..764af39c1ac19 --- /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.1.0.tar.gz" + sha256 "07167580e563f5e821e3b2af1c238c16ec7181612650c5901330fa9a0da50939" + license "MIT" + revision 1 + 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_sequoia: "da943b772529cbb7c2440eb94cd2f10f46c6c8581ff71955c91eb525f02ef77c" + sha256 arm64_sonoma: "65f9b719ce1f34ad4ecf701c4746a8171373f6823cb49092240a72873a236e26" + sha256 arm64_ventura: "a189e48e415f6c948dc65316273d4e3ef61c382afc8e87b3e0f9ff39de1a756b" + sha256 sonoma: "b10e583f8c1e19e55799c99976bdcf1a72525159d1dafbbf34ce81e0e23e27f6" + sha256 ventura: "5b7db9d3f90102f106d9fb4c4f9a940d6c3f41ec88d37b43448935e98cd0d8c8" + sha256 arm64_linux: "c1e25a52e5c2c575e99556aaf4f201e62ee6bda6f9c4ad126e6f92a1a4949a0d" + sha256 x86_64_linux: "565ef7ec4280086a04817c3b66eacff9fb21bb572e83a29a9aba77535bce0d8b" + 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..f565035d317e3 --- /dev/null +++ b/Formula/c/capstone.rb @@ -0,0 +1,66 @@ +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_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..f93e2fed2f8a9 --- /dev/null +++ b/Formula/c/caracal.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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..e05db20107315 --- /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.3.1.tar.gz" + sha256 "135e51b0cb2bab633de7c82c8e7999d0c2d95e25d5226b2b7db3b10a6ce3dc28" + license "MIT" + head "https://github.com/carapace-sh/carapace-bin.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "03d7a445b8832a5aee95eb471bbbed7a8af9e166eb7f6cd674e48b2d544b05d7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f763ff7b87e7ea24dcfd50a41c092f2be03d0c274b2be21d32ff808cc3d65409" + sha256 cellar: :any_skip_relocation, arm64_ventura: "656bc0552265aa928535d4ca80996d01e0d66e68f202220306b37888245b31f1" + sha256 cellar: :any_skip_relocation, sonoma: "190c6238545b8b2aed0d68860f931423e1059822f7d48bebdb133953d477e623" + sha256 cellar: :any_skip_relocation, ventura: "c41711df004ef8bc179e76f810df5363ef03d1df8e9c061c3e73425d2320d5ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e55b78f161f80eee7c0a69a82a0d37c448e0a05359a75c0eb8e9bbf6eddab577" + 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..7c5aabd5b45c9 --- /dev/null +++ b/Formula/c/cargo-about.rb @@ -0,0 +1,66 @@ +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.7.1.tar.gz" + sha256 "5b090871bda2c2cf645de826c219b41486c36ffe0b474ad9f6ecba7e21d279a0" + 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_sequoia: "8755083c1b4ab12dd0334783541f0e9b7fff6e2b9edb2017a49dd4c6af18d7d0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ee06157afe725b88b4795b809cb08abb926b8adc6bddee438d1514b771fc4c2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d64e4117ec95d2a2ddd8d511c63241b3950265229bdb991cc5e642f12497540c" + sha256 cellar: :any_skip_relocation, sonoma: "ba17839b1dfea081458b2d89cd291f18cfaf2294b6500eab076158682fb82906" + sha256 cellar: :any_skip_relocation, ventura: "3adc4e0a65a778755958727f8f1240d97be68bf9ffb64abcbba43aaa7ed9a49d" + sha256 cellar: :any_skip_relocation, arm64_linux: "e4f8960efed03ccbbb12f52eb3cd13b57f47ee41507b7f5871899651c722c75a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb409aaea449ed566e5c8bb9c0d6868375bb95761621dee4cea426a86cd3a394" + 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..28c1c44427645 --- /dev/null +++ b/Formula/c/cargo-all-features.rb @@ -0,0 +1,58 @@ +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.10.0.tar.gz" + sha256 "07ea7112bf358e124ecaae45a7eed4de64beeacfb18e4bc8aec1a8d2a5db428c" + 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_sequoia: "a3230194ce2a1aaf67cf633477a254f8bea2e1661c6849598c31e1e9dee4866a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b12a3968ae8ee10062526525c6cc07c5d288529204b51696e9f3ea104dffb1f3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d72b4b7f454143ec36fbaa284c2564c60c97ed8eb0de568e634c18dc485284c8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d399885e0cc2a32003b98de866fc80c9c74b3aeac8a8254ad9c40d1d617a36fd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "50e52b0f7d74b369aebb9809cb318cf03a13c2161b95059810c53bab6698ed4c" + sha256 cellar: :any_skip_relocation, sonoma: "482a7cfad0c83737225ad19497e41ff876434fd9c2ebcf05a9f7c7f452931ebb" + sha256 cellar: :any_skip_relocation, ventura: "39177b01645bfdf19d6d9757c863e96bdd711170d8e87a1f5b2c7d9720f0a33a" + sha256 cellar: :any_skip_relocation, monterey: "912aeeaf3ae966f434cacda0b8e5c5c904f8ad83d33ff3334724c3022e151185" + sha256 cellar: :any_skip_relocation, big_sur: "680c7a563c12800a68c8e24afbad0b5c8ca8380c7e16e5e2a4f045af3bae7406" + sha256 cellar: :any_skip_relocation, arm64_linux: "25a0b7ead12f5cabf7889eb7aa847fe12aa3ee7c0c6110e93e7e35b9d1633035" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b948efbbe607b8dd394c6051416e698544960ece99c29c67909228214e3f1c17" + 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 "Building 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..01132ec2ab8ab --- /dev/null +++ b/Formula/c/cargo-audit.rb @@ -0,0 +1,48 @@ +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_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 "rust" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + end + + 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..47907ed311129 --- /dev/null +++ b/Formula/c/cargo-auditable.rb @@ -0,0 +1,54 @@ +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.6.7.tar.gz" + sha256 "07641dab34429b7d31ee29bd4f0b426fa486e0be81fce2234d5936d0ba240ee8" + 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_sequoia: "011083c3216ae803425418622996fdf56d6a4980ea9f4bd58f95a99f1fa45545" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "249dc6cc3871a65ba5495113f07aaf93678f1b7f5a1a111346a58247e9a0c49a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "50b0446cbb2238d6b8af7cdbe25181603fb4c2038c34b7b1cdf5a9e9728a1797" + sha256 cellar: :any_skip_relocation, sonoma: "0a5be4751c172d07db6cf2d9ccb595ebfce44fe9c36791d4267ae66e236a2b3d" + sha256 cellar: :any_skip_relocation, ventura: "faacb064be243871bbfd6ea717347d61742d790d4277f40707fdcfc47d72b682" + sha256 cellar: :any_skip_relocation, arm64_linux: "869f19acaf0d3f4ec49c0e34ab32328bbe8b2b38d34fde20a71698deae48bd8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "965e1d851e9dccf7b695a28e732ddb5778709f2a6c402de961387ac656963ab0" + 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..f914d3c6a746d --- /dev/null +++ b/Formula/c/cargo-binstall.rb @@ -0,0 +1,39 @@ +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.12.4.tar.gz" + sha256 "f7dde9a0299c38073bc7a8fdb9a200885584ea0a97e1110f439948d11c955077" + 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_sequoia: "383c23c37d669f05e190056d63f1434fd26f92b5e6223461273e3aa56c845514" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8ae41307b02150eb726282b54c8f2c75fab48877d602883fb849de56708909e2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "76d84b2a9f8dbc469ad323762e807a68f544c54e88db8fb49f89301e0a76cb99" + sha256 cellar: :any_skip_relocation, sonoma: "da678704285a3319fbfccc308f58bab7f7966e9c7c9650e90b8b42e2fd3062c6" + sha256 cellar: :any_skip_relocation, ventura: "4fbaab703a634f5ef0269d314447c71581753a3b72d564db2fdbc43f5c70c903" + sha256 cellar: :any_skip_relocation, arm64_linux: "c6f284faeaabdde88e82a96889b87546945459e20e70b569e170f0a017607720" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ebb5f83a3b761633f053fcc22c42113f4634174175c3f9d398d86e10f2678ce" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/bin") + end + + test do + 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..ab813fc89eaa8 --- /dev/null +++ b/Formula/c/cargo-binutils.rb @@ -0,0 +1,71 @@ +class CargoBinutils < Formula + desc "Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain" + homepage "https://github.com/rust-embedded/cargo-binutils" + url "https://github.com/rust-embedded/cargo-binutils/archive/refs/tags/v0.3.6.tar.gz" + sha256 "431fb12a47fafcb7047d41bdf4a4c9b77bea56856e0ef65c12c40f5fcb15f98f" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/rust-embedded/cargo-binutils.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6367b34d9c10ac1d5172697f7b34ce9b448960084c1584ad1d6b0f19e40b8ee6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "54c3cd2a10fc84faf03c3dfe9ca8ffeef01811c0a264473430c202b624672539" + sha256 cellar: :any_skip_relocation, arm64_ventura: "73469ea42c9f0ee96fbd51f1b08f356104a0a3114a7a8428c9cb659fd636654f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c9440dcd36d4c6335d6503aa36766cd83692203b16c36ff184ef8337bb360b65" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ea6191a3486774767591b8da025736c7911618aa5d825fc93372bad6a15f4d41" + sha256 cellar: :any_skip_relocation, sonoma: "346badf808aff5c0a49a830a8fe2169ad509c9ea10869d94ed513b7e4626d9fa" + sha256 cellar: :any_skip_relocation, ventura: "06566f6a3668b2ee04e4caada6d092c2be827d17c94d4e3d9dc78b860ae66f24" + sha256 cellar: :any_skip_relocation, monterey: "f723cc7c2965cf903f9bb3e0eb825b4d07fcb343f1c4ab13fd8b9042708dd82d" + sha256 cellar: :any_skip_relocation, big_sur: "bbffb949c95924792a8467de511a274b2f0243087ebc3caed26f8fce8ae536d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "624b219c67114ced98abffdaa7d13c8e27722bfce6d8255a220a1ee3f59cbcaa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "573501160232330f4511aa8928446522801ade98223b640b3202c8ec0871217c" + 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..4973b4ec0cee2 --- /dev/null +++ b/Formula/c/cargo-bloat.rb @@ -0,0 +1,43 @@ +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_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..5dd5dff80de47 --- /dev/null +++ b/Formula/c/cargo-bundle.rb @@ -0,0 +1,72 @@ +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.6.1.tar.gz" + sha256 "18270c983636582c7723b2b6447c76330d8372feb53140eec693f6c2db5e7e81" + 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_sequoia: "97cee1a83c22efbcaac2b88f29faf09ff8f70957ae9150c3ac6bf645151f7081" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8d7d7fd8160402ae2884ef7e88e95cdaa56e163b62150e325c306ca1a2879927" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aed77abf521dcc180bb87fe548ea79961d328c5443753aab5e982e46d0667a65" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fa10b2892b2f4e59f8e5fb24921a07b70fcedadecc3e83c266e4c0da7de1b6d3" + sha256 cellar: :any_skip_relocation, sonoma: "bfbb27620b4052f85a3e950fde37d646c8946f3f99f221026f7432b04806b606" + sha256 cellar: :any_skip_relocation, ventura: "dca1765993664c75a803ad7570df1743e5c97b2d6d22db5a765ce6965f05a747" + sha256 cellar: :any_skip_relocation, monterey: "f5cf9c786583b5bdae6755e9b44610a13c16a3d27b88a4b69829936a2bb9f702" + sha256 cellar: :any_skip_relocation, arm64_linux: "63b58b43f66237882c46634aaa2bd5315d549f0c76507594c74c1198915a0159" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65d1c04a423a5f9d8c17dc4cd83d7a2673c45f23f727e64a45f50dde0cdd0aa4" + 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" + + # `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..0966778317e00 --- /dev/null +++ b/Formula/c/cargo-c.rb @@ -0,0 +1,62 @@ +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.12.tar.gz" + sha256 "ae118882067e1e7dcd8106933329cf018ddc6ea56cabfea7642a7699d6ce700f" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "93eabec8c07314b2ffa10da04e1c5a8680811b52746cc003d1f692c369f68363" + sha256 cellar: :any, arm64_sonoma: "f6a450122898ab833029022d1304918e8d5e8ed0776f662b1e2b56d467080d3f" + sha256 cellar: :any, arm64_ventura: "81448628a286cc6b30d9374103706490600e50fb2500316d8e1aafb5eb5805a3" + sha256 cellar: :any, sonoma: "61ce2d2c5cb0a8072cc4258b09f4b8d3a8864d3c8c1a6c64c2e750b6d2c9164a" + sha256 cellar: :any, ventura: "29dded3c27c5c6e011f9fe530b63e6c1aa539ec62a948cccc467610d3c17ddeb" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7ad0460d3c55f96057e1560cfcb58a1596b9b23eedfa5ae250bffaf550b4768" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b6e540ac5f80fc34832486811dc88991bd5d59e181f20c3d76220dfcba1333d3" + 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..c03327884a598 --- /dev/null +++ b/Formula/c/cargo-cache.rb @@ -0,0 +1,40 @@ +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_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-chef.rb b/Formula/c/cargo-chef.rb new file mode 100644 index 0000000000000..bf15d2dd72b08 --- /dev/null +++ b/Formula/c/cargo-chef.rb @@ -0,0 +1,51 @@ +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.71.tar.gz" + sha256 "788efbe963f932eba64892841025e8c22ad3831ec4d7adfaab6817903da7706b" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "637818a618e5efb0b8417b77e4e96c7d9123f54464cb9fe4c7e11199d2ba67f0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3202657821902cf5a88ddfc5605d4d7ec3793fe5d794541d2d96a6b167b75124" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2ad84d474218a8bef3060b73a016e3dd7167616f496bcc9c3b9072311c4d84bc" + sha256 cellar: :any_skip_relocation, sonoma: "dfdbb72bf46604cd5f0f35bd8e6b7d5dcd67c14c6233eb186a62a18c1e35cbf4" + sha256 cellar: :any_skip_relocation, ventura: "10c7510f672ed91552e10e702ab9f67014470e3375076552804c2666fd827fe0" + sha256 cellar: :any_skip_relocation, arm64_linux: "e57a158b14024ae12126747d3ccf13b000b1269a15c69d52e42d8280f00baba4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a3b2ee0048b5f03c09967054afd7be85182404094bea559326b4ea44aa8d5d0" + 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-crev.rb b/Formula/c/cargo-crev.rb new file mode 100644 index 0000000000000..3d72f200aae34 --- /dev/null +++ b/Formula/c/cargo-crev.rb @@ -0,0 +1,54 @@ +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.4.tar.gz" + sha256 "f8413baf3dc420d7cd217f8330dc6665e3e8ed87312c1d75fde3e6afbe84b6a3" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "671bd59aa7ba7b26c97bb92291efac3af6775805a740784835bd12ddd3da7470" + sha256 cellar: :any, arm64_sonoma: "406250d272333d83e333a46cebf84c8034f040ad2e92f61d35a78c96d5318a9f" + sha256 cellar: :any, arm64_ventura: "d0b52c1a4e60afbb399f0e738fbd5d8fca6b264c8880ee827c3a259704df3d93" + sha256 cellar: :any, sonoma: "cba6a81b8a29019eb6565cf7ce2e6a61a5bc6d0f3b8c0af43866336e9925fdb0" + sha256 cellar: :any, ventura: "df63b875bbb49ccac73ca8d79a61e8e0139f66303a9452bd73d8eb5eb05404e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "7cc8cd11eca881f6fff9fb90d2d822b861f5f20b455f2b17c0cbe5e77c8d4ccb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8edf4997d166ebc6a7f7dce1fb259500603ed7e2f54365c653f209b974da5005" + 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..42c9a170b127a --- /dev/null +++ b/Formula/c/cargo-cyclonedx.rb @@ -0,0 +1,56 @@ +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_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..b362190cd98d9 --- /dev/null +++ b/Formula/c/cargo-deny.rb @@ -0,0 +1,55 @@ +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.2.tar.gz" + sha256 "bb47741fada886c166e2a697a87fe93fca38ec083db489d404c73bcb0b9d7445" + 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_sequoia: "b58b03df4f5fdbaa5aadd5a840e112a920b444ef7ede092a95583d23867d5d26" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b42252981d9c034ed4f0aa004cb0e9a6ca83b0b03e8148312a5a201aa1172dd7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a87d18e34310a815fd7f12c5d39874eb8dc6a03d37af667c25448c6ba21fc482" + sha256 cellar: :any_skip_relocation, sonoma: "d55af9d3e6093b95525a237b4f76a70b230226af9acc5ecc5b4c5b973ad034fd" + sha256 cellar: :any_skip_relocation, ventura: "e4f6cc0ec3260e4f9a49bb5a395e1093df47c636c2afd7ad4bb36f41a8b2aeb9" + sha256 cellar: :any_skip_relocation, arm64_linux: "21df9e3645598ac9e4dd81e3ba0ea64f6a9ae816d33a839f428f2049234e7bf6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4360a2d46ba202c18da251705e8152ea52f752723d3f087fbe9cf7c0329994a3" + 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..42ddfba2b8a12 --- /dev/null +++ b/Formula/c/cargo-depgraph.rb @@ -0,0 +1,62 @@ +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_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..f8586f43949e8 --- /dev/null +++ b/Formula/c/cargo-dist.rb @@ -0,0 +1,46 @@ +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.28.0.tar.gz" + sha256 "ef9b7cd1eba124fce752d1bd8414bfa123e06074d370066cb2621992c67d0af4" + 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_sequoia: "dba42eaa1e5a3b845739624a819a46263e85a5bf7f85055380d1066a11f0c138" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fc2d4878c888c7b3459858acde0c615c082e075e710fddd69fe9ef26ad1b147e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "968f7daeffb1d13273e3c787ee8168f288e336b4e76e7ac400e9c9ee4b7e3cf2" + sha256 cellar: :any_skip_relocation, sonoma: "6e73ea41b52d557c939429b8ce4a46cc485857ea79c3365ed25452d0efc61246" + sha256 cellar: :any_skip_relocation, ventura: "2a539f976a6e3c321a4270276641e4dbba0897322f12a0cad104480e5a4697e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "511eebd1ea06491adf087514050e59eeb315465b5740df25ca0f1b24b3b73e5c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec7152a262e3edfce50cd61d60fc7d3d2b7105b4ef82c9aab41970738c08114e" + 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..307abf344f895 --- /dev/null +++ b/Formula/c/cargo-docset.rb @@ -0,0 +1,57 @@ +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" + + bottle do + 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..213e0103aeb0e --- /dev/null +++ b/Formula/c/cargo-edit.rb @@ -0,0 +1,52 @@ +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.4.tar.gz" + sha256 "afcf319c43bc1ca025c7607e7a2ddd429ff8fd65026acc4e1864c7853ccefb5b" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fc75aa0aea555ef185487163cadf6be4866fd70070f082196d3b2ea3a9a3e2f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5a0c502eb246b65d9b03044c10d81322ab2620c3a079aaee41f140f60eb58116" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b663208ea57a084f3639e4c86ed88eeadc025d9f36567abbc95c982ff839be24" + sha256 cellar: :any_skip_relocation, sonoma: "c65290bb99961818bd4d171286ffb3c2139662fc1ab41a0e3537eb55a24908bf" + sha256 cellar: :any_skip_relocation, ventura: "bf751186034030f204157b263a7635d003e9cec188c46680c4a2f52f2b04df29" + sha256 cellar: :any_skip_relocation, arm64_linux: "757345eb13f3bbcb8308def799492ffbff4dc41dd49739c35e27c7524a3e4313" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ef9f1924afcba2ba4591ee5954a3994abfa51e044f1f28695754447e96a3eab" + 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..57f7040402d79 --- /dev/null +++ b/Formula/c/cargo-expand.rb @@ -0,0 +1,37 @@ +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.106.tar.gz" + sha256 "3917f35b54b4186ac5697648a673a70ab58567bebbee926d5d60cbea5f342471" + 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_sequoia: "1446baec0e867d5bf0dcf9297cf0ca4376d31d967b9a7f61ba425f3327e3d44d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3add3bb71dadde1dd3ddf53030876f25c9be442c99539b0413eccb0a6fa0cf9b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d1ec2ba62a11b75d8cbe4bbac17feb1025e12e2f249ba6949ea27c11cbfb888c" + sha256 cellar: :any_skip_relocation, sonoma: "468861d35afd0b0064541cadbc06a7bef61f45fd2f895438125f190eb526cbec" + sha256 cellar: :any_skip_relocation, ventura: "3e112c2726e3ef0b76aced248b37a2e439be4d7978d4cece9e0c671af671d400" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4e271c5d2e81464db6e4780ea330c2c06ecc0643fcc44ed120bddd6821098ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbea3854e20f659df2d26baa5cd2dc092733b10a89212d0a1485dedfa091fab2" + 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..4ddf61795c858 --- /dev/null +++ b/Formula/c/cargo-flamegraph.rb @@ -0,0 +1,50 @@ +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.8.tar.gz" + sha256 "2673a04bd4de142220d42706e0c25a4dea08aee52cdffbf87cca5738cec649ff" + 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_sequoia: "740ef8f614bf69783f1d25c138bc5eb7e57f0318d05ecb87c1de8796a84c6190" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "933b50f514c63ed78874e8443330c4e01fa0284c33f3b4dd2739d19233e5118e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "745ed3bedef3ac3b3a17a589edfe3321bd2731e4b1036cfaadfab9e7a5b37aee" + sha256 cellar: :any_skip_relocation, sonoma: "3d5c2847b5ec9787c6b4ca4b71dfd959c6171e283d0bd5752cef352e6417d1f4" + sha256 cellar: :any_skip_relocation, ventura: "f2af510d43d381717f9ef3b1b8a631a9ce37a1b3c87d35126bb2e3e593e73254" + sha256 cellar: :any_skip_relocation, arm64_linux: "53d4cd9e5880a2a350ab626769520f62c130060ab69a1c60f6b14f015583e695" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f1a3f5a80fb194e66fe415e19881ecc18ebda99abac0a049988fc9d54954780" + 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..3c056efad5b8f --- /dev/null +++ b/Formula/c/cargo-fuzz.rb @@ -0,0 +1,38 @@ +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.12.0.tar.gz" + sha256 "d7c5a4589b8b5db3d49113e733553c286ed8b50800cbdb327b71a1c1f7c648f0" + license all_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a235fde06fab9e783557067a97c7703cdcbe6e8cbca04202c59552807b10aed7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d200bc751221a19ccf9146ba1a3f8e4e32a01586a937a509244219771a6b133" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3dcb9c76b5715c04e78455be823a80a816d82a57cd2330edba5cd3627727a5ef" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ea92ed46cdb5a202dc759e529514b1d0a0a4b8bce42ce436e4f9137796e8aaef" + sha256 cellar: :any_skip_relocation, sonoma: "b6b6e017d751dd370d4f98e16fd3a9fea647ce99e16e71a560bf368271fd10cf" + sha256 cellar: :any_skip_relocation, ventura: "098b4b3525481f35a10fdc625f57f08177773a14df00330570f8b97480f41b23" + sha256 cellar: :any_skip_relocation, monterey: "291ec71452d89adefcb52625dcf0ba73e1cc041ebb29e0751fd10f585eba9296" + sha256 cellar: :any_skip_relocation, arm64_linux: "44ea2bed2e3c5df7e1e9246ea1a741a074d19d6c3e5f02fc5d3cefe9d44100ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "043555cc3d67be54754e137f497d35560a354ccfa357837484ce18a155b976f5" + 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-generate.rb b/Formula/c/cargo-generate.rb new file mode 100644 index 0000000000000..4d35eb62e45d6 --- /dev/null +++ b/Formula/c/cargo-generate.rb @@ -0,0 +1,56 @@ +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.3.tar.gz" + sha256 "c12af31c60b7ea53e138e4028a23934873e1385b311f35b46413697bdfdc4e8a" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/cargo-generate/cargo-generate.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9588d9f3bd24dda034e41947200ee436c009c6b49154fe1a6a57f0926eb539ef" + sha256 cellar: :any, arm64_sonoma: "e75aae49736fbab569feee8109226f1ec05bc546b3798676dffa1e0c513a076d" + sha256 cellar: :any, arm64_ventura: "deec2fcd437ff10b21a1062f7486dc80dace4af4b26a8a074d917d291e0d5fc2" + sha256 cellar: :any, sonoma: "ee7ab36f1f870e3d6244e42f351b5fa9e0d4029d75597ccef016f7080c88a78e" + sha256 cellar: :any, ventura: "78d637fd0809ac44f4741f22c63bdcfdbca7be78e47fcac3ddab1d86b31ac13a" + sha256 cellar: :any_skip_relocation, arm64_linux: "fecca9166bb2c1f7242c43df8dec05883eff4749e8da1edfa88b2bc710c804bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0fbe1554f9bd727d311497fe00a1a5f0af0efb3422ada09ad0727bdee3ff2eb" + 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..80747deffa31d --- /dev/null +++ b/Formula/c/cargo-hack.rb @@ -0,0 +1,38 @@ +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.36.tar.gz" + sha256 "c3784af50b23a663bc3ac9afe65171125fce9d4931e69fd5ba10baf76fa49068" + 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_sequoia: "e4bd553ea805fb772f3aa506811760f5a15e7acf5b87a9cd39d1fdf8c56c34fa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e97b220b791be3cea8ec86801bf6db1b678e6c5d148cacd576aede989e58f612" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c88cd8ad026b6e2bd690d82a147bf23ea074a88cd8ff25fd7df8a303a8dec1d4" + sha256 cellar: :any_skip_relocation, sonoma: "06592c25f6e885999c3090091141b72b19eaa828784f3c6cc1e892824e1847b3" + sha256 cellar: :any_skip_relocation, ventura: "6ed0eb2501acfa6b52fa08e11f03bb5111105fe31086a2dc3c8cf3c3c55cf8e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff05b215de8c94c0b5cc88b0a23a36fe3b458a82c85b9ff6d862c1562925a7b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a092965a4541f529dd573b6e5f4f5ec0770c656660b5cfdb196deabae800ab7" + 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..1c3bc50673ef0 --- /dev/null +++ b/Formula/c/cargo-instruments.rb @@ -0,0 +1,28 @@ +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_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..34cf0af5000ba --- /dev/null +++ b/Formula/c/cargo-llvm-cov.rb @@ -0,0 +1,40 @@ +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.16.crate" + sha256 "c33091bb8baaf21eb24807559ece8ee6d4a37ef42509958d863b66f53557fc73" + 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_sequoia: "a465bc46685f523216eb07b016a5d2cdc8c8cc357a23a49d0b716b1818187a0e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e0a286c1ff4770c00bd44b784248bfed632e2518841afccb3608d8a1d179dcc3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0046a18ff5aae5d7d9ec91991dfeb17072299c46d57b0f367101f6a624243a6d" + sha256 cellar: :any_skip_relocation, sonoma: "c50bed8fc9bb29e7f3689089da9b5cb567f924b4e4a815d06eebd7894dba8869" + sha256 cellar: :any_skip_relocation, ventura: "c0bce3c5bd2ead0aa124ae024895518f57e2ced449268a8a7ac17a1c578fcc30" + sha256 cellar: :any_skip_relocation, arm64_linux: "9926751cadacb34fb6bfdcb5cd3cf23570ae579255df7b7a3a0fa5b638dc8708" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a111d607f6169e0411b85f6646b6259b1f7e3d32448c1b9753e5d26308b1d3e3" + 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..cf20829366066 --- /dev/null +++ b/Formula/c/cargo-llvm-lines.rb @@ -0,0 +1,39 @@ +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.42.tar.gz" + sha256 "758cfc5e2b30578912e5d0e3faabf4ffe0e4ed316bb6bd464a4c81c45f5e25c9" + 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_sequoia: "8d0066a18e73fb045e80ef304423215bfd0a029e0180ecab07289a1478f22c39" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "551d3123cb0200c3cd26a2ea51c41c766d571832337fb08b7431fd383b2f776f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4e29b368f5bc237d886ec8d44a9788e6636e1d59cea25aa16fa3dad032eb926" + sha256 cellar: :any_skip_relocation, sonoma: "d60b6dde261ed8fc0c23e7edaa63d2ac5cb2b04227ae93be718b0b14048c5621" + sha256 cellar: :any_skip_relocation, ventura: "f9d6b6dfe250bd19ae2c018839f4cbccf7e7ddfda01c5fb60038b1017a31f44a" + sha256 cellar: :any_skip_relocation, arm64_linux: "95078ff0ad5744cb5e3974e752c244961fdd3c14a1d1fbe29d655a9e4a484efc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13717c12b7d492991231ef8124dd961eaf091a5eb1faa0a8e68cbfd57766ed4e" + 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..fa32e65ce7710 --- /dev/null +++ b/Formula/c/cargo-make.rb @@ -0,0 +1,43 @@ +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_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..fbda4a6deba42 --- /dev/null +++ b/Formula/c/cargo-msrv.rb @@ -0,0 +1,53 @@ +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_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..c5b39abe58faa --- /dev/null +++ b/Formula/c/cargo-nextest.rb @@ -0,0 +1,59 @@ +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.96.tar.gz" + sha256 "791e42ea5a5fe6c42713f68e7dab8a9bb769c7e38336262b9ae8d226631d95fe" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^cargo-nextest[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1df24128be0538c2c92a37c49659221b5e5e6a8e00c0435b9cbe9cc130802038" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bc3577773a71290304c818acf2336edfdce9d795adb7c2f87df15f2183246543" + sha256 cellar: :any_skip_relocation, arm64_ventura: "58b329265f415c35f41491a160e14c20bcf1573009d8217d93570f61ac70413c" + sha256 cellar: :any_skip_relocation, sonoma: "e9525c10ccb3f00e11c8a89d8c7d0f0c4cfe48c734a6196ab4ec2a87a76474f5" + sha256 cellar: :any_skip_relocation, ventura: "30f1ad4d3a71b68ae6e555ded63f2a1904bbfc693e077c6f31b6142721837bc2" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d7380109a6afd95e56a6dd84556cc339f08f69dcb4c298eebcf7874276baf60" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da88a7d5d7c14fca9424ca38651dedc85f3dec4005ce331f9c64ded9daa17ba2" + 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..56777eb216c3d --- /dev/null +++ b/Formula/c/cargo-outdated.rb @@ -0,0 +1,86 @@ +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.17.0.tar.gz" + sha256 "6c1c6914f34d3c0d9ebf26b74224fa6744a374e876b35f9836193c2b03858fa4" + license "MIT" + revision 1 + head "https://github.com/kbknapp/cargo-outdated.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "acdcb7ecd3db5e0b5a0d279d33f3f308d9180a9f434ff4f01f2ad2dd075db7d0" + sha256 cellar: :any, arm64_sonoma: "d54403dea4e7474a13d95f37c4df3cf620391e920c72ddc814b614abc15e31d3" + sha256 cellar: :any, arm64_ventura: "63f180c145002e1906a6cb979b706167b51ad49d1a5d04aa4e9b47722a2ca306" + sha256 cellar: :any, sonoma: "fe719091f6604bb307a67e5dc40a1834a2c6c00be1d709d0b39e608e34eb62f9" + sha256 cellar: :any, ventura: "9969c6842f7ada5d69bbd34cf5922b4ae2b5d43814234b0b9c6c29401977bed8" + sha256 cellar: :any_skip_relocation, arm64_linux: "394f86740d2621697b1bcf853741e7d35f37934dbec121896e139fe5ca1a897b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16e44c82524d478341c722f1837ebb9d82807fb556e2074a0675e44bfff7b79f" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "rustup" => :test + depends_on "libgit2" + depends_on "openssl@3" + + uses_from_macos "zlib" + + # libgit2 1.9 patch, upstream pr ref, https://github.com/kbknapp/cargo-outdated/pull/417 + patch do + url "https://github.com/kbknapp/cargo-outdated/commit/67213eb08b60f402d543d4b2aeb79f813f1ade5e.patch?full_index=1" + sha256 "712df30c8293327848e5156df8524f60fb425c9d397f954d88c5d31c36189a79" + end + # cargo 0.87 update + patch do + url "https://github.com/kbknapp/cargo-outdated/commit/9c766bf49d37fc2d3fc19ee6b06c4b022c7138a1.patch?full_index=1" + sha256 "5d3d1361804eb64272eb8d88110eeafbf998eff4262687989164b0d32e0c2225" + end + + 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..c6e6e17d70528 --- /dev/null +++ b/Formula/c/cargo-public-api.rb @@ -0,0 +1,61 @@ +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.47.0.tar.gz" + sha256 "4557a2d1017e2cb83cb9afc65654fd9d4602a8e92abfaa6f99a1f40ff80c00aa" + license "MIT" + head "https://github.com/cargo-public-api/cargo-public-api.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f894595937a3cf35b508d3d023a9bdca1bba15f0ec3f454544a3632b7d7748b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3847e7ea0cfa8c6b9196c9d482119ceacbe3f2be395a3aa2959f6c4eba512d8d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d5d75ef2bf46ae33f55a11547019adb1fa58bfd471937df4e4d795181cf6a708" + sha256 cellar: :any_skip_relocation, sonoma: "93833eb1c063d0c8d84ccdd7719203d41db707b7f582ba3d067b567cfae17a11" + sha256 cellar: :any_skip_relocation, ventura: "a9c8c826519f8fe57e22787c8c74ac26bd1ed806a3d464ef42196ade2965bade" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd8187f8fcac703d34d602757c3fadc5efeaa469e9fd8457d862f8391f66e2e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f3705d706ea068f436c3839daf51fdbd3fa8645c6850b95e69cb7cb84dc650b" + 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..c42f4fffdd30c --- /dev/null +++ b/Formula/c/cargo-release.rb @@ -0,0 +1,51 @@ +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.18.tar.gz" + sha256 "a212d974db4cf46e580cf41e1f0bcf81ff30aac1dfe9e31cd0dc89c0b5eb3586" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/crate-ci/cargo-release.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1b9ef97a22b96c2855ff78669f71a2262e3d021e490f63a0846ef1822f5ab1e8" + sha256 cellar: :any, arm64_sonoma: "3938cbec73223f3399ba771d6a2d64067a3c8783120e69bcfd51ac0f148b66c2" + sha256 cellar: :any, arm64_ventura: "6978e3f6f0830214570a66544466c79ebf9d5aa06ca9dc482713422aa7a7e43e" + sha256 cellar: :any, sonoma: "112c6f6dd8f26537171a283851da6f236cb0cb5f9001a09deb188f40e79364f4" + sha256 cellar: :any, ventura: "3808557d4a75b9a295c60f887c0c67163c130bf1065b21b946842bbbc29cfa80" + sha256 cellar: :any_skip_relocation, arm64_linux: "d02b46b6b026b5b87c6434da3c840ce18d3227d256607c9df0dd67ec8877d732" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39931a7937cfbad8a1460122044fd01d78e2472af66d95d2a09f2b7970c673f8" + 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..8955334008f39 --- /dev/null +++ b/Formula/c/cargo-run-bin.rb @@ -0,0 +1,65 @@ +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_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..1f785d165de98 --- /dev/null +++ b/Formula/c/cargo-shear.rb @@ -0,0 +1,58 @@ +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.2.7.tar.gz" + sha256 "2abab1cba4ce8dfec5b25a2bf04d4767ab3e70a8445e0b20cf8542c400c7d566" + license "MIT" + head "https://github.com/Boshen/cargo-shear.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0d75f921272eacd38d46c1699ab884958beb17cfd347c78e9cc0d9549c2ba0b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7d6c282c6318f06660cd1de6182d8d3c8467777f56264bc8d97eacac986b7dd3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a75d0b029b5406f364ebe59a34a7ab64f635c6090ef9db0134ad118f20708a67" + sha256 cellar: :any_skip_relocation, sonoma: "04608c7f42bd44ce0fa54da28fc4793d9fd1593ca806a7f4f02d56b740cfc988" + sha256 cellar: :any_skip_relocation, ventura: "3e0e298d5d55ca409c0b36838436e18baf6b9144823845b3a3fd71a2b3e69624" + sha256 cellar: :any_skip_relocation, arm64_linux: "53992fa491f6a7a582beeb66944db7057e7a338c59857b55e0f7e895fb52d44c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "390dc990b4f6fdc4c4989cfb10093c8054902f47fc9521b7b9da127ac8ac1217" + 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..85beed9c02cc4 --- /dev/null +++ b/Formula/c/cargo-shuttle.rb @@ -0,0 +1,45 @@ +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.54.0.tar.gz" + sha256 "469e08c0a168cf26347a9ca5fa746154a4887ae748e1809ba54fd342f64cfa82" + license "Apache-2.0" + head "https://github.com/shuttle-hq/shuttle.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1d8a79e772cadc92aa068942893197405b905080894351408be9e919dbb5f58e" + sha256 cellar: :any, arm64_sonoma: "fee93017ecccbce60465e5535dbd4ec255a62c1a63077ce124135ef0b1a63013" + sha256 cellar: :any, arm64_ventura: "3de03d91bf65d8681ab1c4944431104ac39e56575dc14ec97ad1cb9f74c8cccf" + sha256 cellar: :any, sonoma: "2525c6c0cfe6ffd5c17358db32337b297064988aefcff5ad5293c422ea4fcc90" + sha256 cellar: :any, ventura: "ede971d32cee736d3c7e8e2d8bf1f9f1201efce2dff909901d681751c342d846" + sha256 cellar: :any_skip_relocation, arm64_linux: "44f0cab56ac4f063240b24a72cb381b263a70df203f5926175614caa615d7771" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa7bae036f97a2c3b7ee866c9965aa0a283857538f0376d4cdc8251450ac2536" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "libgit2" + + uses_from_macos "bzip2" + + conflicts_with "shuttle", 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 "ailed to find a Rust project in this directory.", output + end +end diff --git a/Formula/c/cargo-sort.rb b/Formula/c/cargo-sort.rb new file mode 100644 index 0000000000000..ccc457b097b6f --- /dev/null +++ b/Formula/c/cargo-sort.rb @@ -0,0 +1,52 @@ +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/v1.1.0.tar.gz" + sha256 "2add0719d3309e868e8e305ce33bfbbd59554853e1cef2866af6745b750a689a" + 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_sequoia: "f705b9d2acf22f9d3a938c0a6fcfd91542216c3c5708ca9b925b6306335cad00" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "50433c453c2b06805d430060ab93af25bf7c357a6561d7ecdb5f20b005b5ee2e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cce8f602feae89f057f651943a59cb19054ac9dfd795b55ec036c83c0e6277e5" + sha256 cellar: :any_skip_relocation, sonoma: "0d07ea46096df39b7e931785beff09de82825d8312599c62d2768c9809b53e70" + sha256 cellar: :any_skip_relocation, ventura: "8f7d7d7098162924d7b52634dcc6b8e79c488340a440a414884ccfd61dac769c" + sha256 cellar: :any_skip_relocation, arm64_linux: "854534758b149b5c0d7258e12ce22ed0dc04edfa3f5c2cd306c93d10288562f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4dca60b315658ddd7aecbddae66691dc439fcdf620325e5cb367df4c754f4a1" + 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..4e95a4850c331 --- /dev/null +++ b/Formula/c/cargo-spellcheck.rb @@ -0,0 +1,54 @@ +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_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..96ec1aafa4c50 --- /dev/null +++ b/Formula/c/cargo-sweep.rb @@ -0,0 +1,55 @@ +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.7.0.tar.gz" + sha256 "21004272ffacbe19b5e2b6c521a021eb55abd24e96599fc5049c650abb708af2" + license "MIT" + head "https://github.com/holmgr/cargo-sweep.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "477189d7f3a6a53e8866b74d466a8bb7312f680b3b72c6dd83dafc610799a2fe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d93a4d29347ff53114bfa71000c0bd6f1975601572eea35a167e14c2790110a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "814b71182a6ab0d4e6b9cca7541ee64c18b5998b2434ce09dccc1a48b4e04040" + sha256 cellar: :any_skip_relocation, arm64_monterey: "82ea5d4efa1f73c845d1562ea2f3c342131859a4c9dbe28e23750d9047369f52" + sha256 cellar: :any_skip_relocation, sonoma: "ea14e4235dd9b900432dd67ad6e93d2095e8614075e305180cd618e9d42fe1e0" + sha256 cellar: :any_skip_relocation, ventura: "0ac87cfde988a3e31fe62049c492dfdb1d8c814a0a8dd215cc77779b4866d084" + sha256 cellar: :any_skip_relocation, monterey: "6a4cea26d73505209cebb58aa3cfd5b9a169066fdec47c537a5fd11e60b56611" + sha256 cellar: :any_skip_relocation, arm64_linux: "1840fa37945500e2fd39bb554262420cac49d39e68954156a3b7587b8b927c88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc2bacae4a814c7ee19750fc5b7961206c2f83277fe848a58e07427eda09ee3f" + 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..6ad2b0c48ac56 --- /dev/null +++ b/Formula/c/cargo-udeps.rb @@ -0,0 +1,84 @@ +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.55.tar.gz" + sha256 "bc84beb17213c69fd452d240a85697b96b167e45f43207e8f9202b5bd4277926" + license any_of: ["Apache-2.0", "MIT"] + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "3560b35fd8924f4ec6302fa0ea7b863d6c414c3c0b3aa4e6e298492ed0ec8624" + sha256 cellar: :any, arm64_sonoma: "606e4b2328d76762bd073eeab96270944674ce07434b3fae9443559a4fe2d9a8" + sha256 cellar: :any, arm64_ventura: "129f68ff4fe461ab23c956c0f3e51b67bc1b262ae7546d9c2c061ebc95a21f97" + sha256 cellar: :any, sonoma: "2da242eca94859097a7baa91d471d939e64e21b111a90b9653af0b32a5a0315a" + sha256 cellar: :any, ventura: "4a494ab4fef41d74b00be5c5d6346a46aed3c88a2c22951c7e7736e18a278bbc" + sha256 cellar: :any_skip_relocation, arm64_linux: "2530630d9bc5f7c7a08eb4c16c47c5a86ea709ace3a7db541f7482d2e0bc293e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f50c44c0c93396485ab604ebf9c953afa7a83ef222c41caa1a1d53e9dec89250" + 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" + + # patch to use libgit2 1.9, upstream pr ref, https://github.com/est31/cargo-udeps/pull/305 + patch do + url "https://github.com/est31/cargo-udeps/commit/adede771b25ce753ca223cc1c5f36ff0951e5032.patch?full_index=1" + sha256 "e8119b2c2d6aada2b7f48c8011a0aec494abb516a443950fd8de1496497aefe2" + end + # cargo 0.87 fix + patch do + url "https://github.com/est31/cargo-udeps/commit/401859a2ea50a72e2764c997cf39ca805d3e7c5d.patch?full_index=1" + sha256 "f9be0d2587084c0d6e5ddb71b2a0b8a63271b7205a3871af1a32c9933ca4ddd8" + end + + 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..5cf2a9d457017 --- /dev/null +++ b/Formula/c/cargo-update.rb @@ -0,0 +1,52 @@ +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/v16.3.0.tar.gz" + sha256 "f6a87615d72db3f1068aef2ad383813a96238c4963f6498c675c555a32e95bd3" + license "MIT" + head "https://github.com/nabijaczleweli/cargo-update.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fac5a0bbdabd219af1a3b8362a4d923258cb7ed8854fc3ee6024ea010ecdd071" + sha256 cellar: :any, arm64_sonoma: "25c2875557d1656e2e5c99d23d0582a84de3631733c582064028e8348d7224b4" + sha256 cellar: :any, arm64_ventura: "62375ed3e54f4d5a1d9f8dfc1abaf0d5e5b9a839f4a7f5bc3223bd6d38ef714f" + sha256 cellar: :any, sonoma: "7a2a23e55a4f684351c19f13ac8b965ac0854fc9686e6bacc13de5ab958460fa" + sha256 cellar: :any, ventura: "f57d7c2c979d343bb5e725c50de39026f8644e55eed9f00f3126761d502f4ca4" + sha256 cellar: :any_skip_relocation, arm64_linux: "4c96a062dcaac5f63296612da05613264362545c7c4e7f47fd697f36a88d03f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e23607c021b9163f0f903a3eac5f3545379fb1ed745d65a161477aae1e27dc2a" + 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..1dc30dea475fb --- /dev/null +++ b/Formula/c/cargo-watch.rb @@ -0,0 +1,40 @@ +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: "main" + + bottle do + 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..32bd7619bfba8 --- /dev/null +++ b/Formula/c/cargo-zigbuild.rb @@ -0,0 +1,43 @@ +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.0.tar.gz" + sha256 "515fc1e815b21132fa82abfd5d9c8a0ee24fa18a1b63b454976a2cec2768836f" + license "MIT" + head "https://github.com/rust-cross/cargo-zigbuild.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "11124f1b7bc4089f1918c1f68a8fb0c6b224ac7ccbd2938aab80c4455cb4ef46" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "285a2f10af384726336effed66e13b5067e886ae028b3d81e1134ff8d7b5c2f7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5a344763915c8778a85d5499e99c7c76f235cb32ff7f4e2634198d48bb50d639" + sha256 cellar: :any_skip_relocation, sonoma: "473ecf36aca0dd4eedb0a72ef5119c29f695413ad06849c6ff9a5ddf03886429" + sha256 cellar: :any_skip_relocation, ventura: "0170524446d1a27fa6adcfba79a119fde3142e16ee858808d1b43262820e62cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "e78355307ef2f77e73215a2d72e945b06c36ab13f6fb4327c85d111f010ab06f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "535ea9d8f507e5e53e33423ebc1d7ac351f630a119e47c5f8911bd0f4e2f4725" + 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..9c3f6e103dcbe --- /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.1.tar.gz" + sha256 "d5870e294b7d9831fd95c19592bc5e5b615a6e07e9bba1139e288b42ddf5005f" + license "GPL-3.0-or-later" + head "https://github.com/edoardottt/cariddi.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "555e2c1c4a8822693a892cd12864a14287d573c0763d9ce1118bdfbb5dededd8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "555e2c1c4a8822693a892cd12864a14287d573c0763d9ce1118bdfbb5dededd8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "555e2c1c4a8822693a892cd12864a14287d573c0763d9ce1118bdfbb5dededd8" + sha256 cellar: :any_skip_relocation, sonoma: "14b27df41f87d2aeae0921217024e697a8393ff819aca20a3398f5cc6c20f7f0" + sha256 cellar: :any_skip_relocation, ventura: "14b27df41f87d2aeae0921217024e697a8393ff819aca20a3398f5cc6c20f7f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c6f84faaaf6a4c14858e01f31d05e27436aa3745d64ebfb544fa9eed54e160d" + 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..8426eda1af22f --- /dev/null +++ b/Formula/c/carla.rb @@ -0,0 +1,68 @@ +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.9.tar.gz" + sha256 "226fb5d646b7541b82035080190e7440df1f92372fb798b4ad49289570e5ad81" + + # TODO: Remove in 2.6.0 + depends_on maximum_macos: [:sonoma, :build] + + # 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_sonoma: "ce72afa1076fbddeea49955b0317e5b68f6edf4977820f2a5b70f8901c38b7a7" + sha256 cellar: :any, arm64_ventura: "f9ff117b161827d6cb4baa2dfacbe278f352d2de9f9155065e739dee6bbd07a6" + sha256 cellar: :any, sonoma: "f1c5e24d843962ef91ea7e4ccf820f829ffe55249fa2ac578cd921d28813ec89" + sha256 cellar: :any, ventura: "ad08054b961096e4f34b9fb839cdd23d590199c110a8e8b99d1668a2512a86b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f29b248df9d099efa03eb0a3d8ba9276e508e9e72a5ea428b58bc5df4024b176" + end + + head do + url "https://github.com/falkTX/Carla.git", branch: "main" + + depends_on "pyqt" + depends_on "qt" + end + + depends_on "pkgconf" => :build + + depends_on "fluid-synth" + depends_on "liblo" + depends_on "libmagic" + depends_on "libsndfile" + depends_on "python@3.13" + + 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 + system "make" + system "make", "install", "PREFIX=#{prefix}" + + inreplace bin/"carla", "PYTHON=$(which python3 2>/dev/null)", + "PYTHON=#{which("python3.13")}" + 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..c4d69c791b710 --- /dev/null +++ b/Formula/c/carrot2.rb @@ -0,0 +1,66 @@ +class Carrot2 < Formula + desc "Search results clustering engine" + homepage "https://search.carrot2.org/" + url "https://github.com/carrot2/carrot2.git", + tag: "release/4.7.0", + revision: "fd0b5a95214679f919746ab5abd710bc900d38ec" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8505f9e8705f5ea76bc89b97c5bd60ffddef803b264a5b8cab3bfb5ae8003b04" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0bd1dbc9d3f30887969ce843f247f57b46bb61dae183a5cfe3309e423785aea1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa5490737cffb2ae8488638366d36492fe627c66b5fd8bd809dd3691b0abeb4e" + sha256 cellar: :any_skip_relocation, sonoma: "65ea6538108151a266a7d5340dc9dc35e4d9b4be2ea6d5606eb12ec61da48056" + sha256 cellar: :any_skip_relocation, ventura: "75cd64e09c6fd8ab640ac384fa164b3ef73966841f8cf92c3cf7f3c6a4f001f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "88dbb18f8c9e2982352181b661aa5a4152a9684ce23138ac45e709cd6fbd11e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e3ab954cc93844a645a59d5ff4840c69dcd915d1c13e5812a26645ec57faae0" + end + + depends_on "gradle" => :build + depends_on "node@22" => :build + depends_on "yarn" => :build + depends_on "openjdk@21" + + 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/validation/check-environment.gradle", + /expectedGradleVersion = '[^']+'/, + "expectedGradleVersion = '#{Formula["gradle"].version}'" + + # Use yarn and node from Homebrew + inreplace "gradle/node/yarn-projects.gradle", "download = true", "download = false" + inreplace "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@21"].opt_bin}/java'", + SCRIPT_HOME: libexec/"dcs" + end + + service do + run opt_bin/"carrot2" + working_dir opt_libexec + end + + test do + port = free_port + fork { exec 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..6a8699569720e --- /dev/null +++ b/Formula/c/carthage.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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..b7802caac6603 --- /dev/null +++ b/Formula/c/carton.rb @@ -0,0 +1,189 @@ +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" + + bottle do + 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..774c861458715 --- /dev/null +++ b/Formula/c/cartridge-cli.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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, 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..a1135e777e535 --- /dev/null +++ b/Formula/c/cascadia.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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, 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..8f3855aed11c6 --- /dev/null +++ b/Formula/c/cask.rb @@ -0,0 +1,37 @@ +class Cask < Formula + desc "Emacs dependency management" + homepage "https://cask.readthedocs.io/" + url "https://github.com/cask/cask/archive/refs/tags/v0.9.0.tar.gz" + sha256 "5db17efe3a91d36f457e70f097cba5ed5de505971894bf2ec839c38d8c2dd120" + license "GPL-3.0-or-later" + head "https://github.com/cask/cask.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ca4c6e166929ce3044439e96d9730b41f205e1f751216443094da00def0c8959" + 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..74c99e171f215 --- /dev/null +++ b/Formula/c/cassandra-cpp-driver.rb @@ -0,0 +1,73 @@ +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_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 + system "cmake", "-S", ".", "-B", "build", + "-DLIBUV_ROOT_DIR=#{Formula["libuv"].opt_prefix}", + *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..a98d753afeb16 --- /dev/null +++ b/Formula/c/cassandra-reaper.rb @@ -0,0 +1,50 @@ +class CassandraReaper < Formula + desc "Management interface for Cassandra" + homepage "https://cassandra-reaper.io/" + url "https://github.com/thelastpickle/cassandra-reaper/releases/download/3.8.0/cassandra-reaper-3.8.0-release.tar.gz" + sha256 "5474d60e006a853c52d932f4acbbe0c602184b51bd0a8d177c83b4c807d31e3b" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a3b94b283a4b06b17c6c38dd31937863bd69b68e6396eb0f9a64b402ec9fef06" + end + + depends_on "openjdk@11" # OpenJDK 17/21 issue: https://github.com/thelastpickle/cassandra-reaper/issues/1437 + + 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("11") + 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 + 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 + + fork do + exec bin/"cassandra-reaper", testpath/"cassandra-reaper.yaml" + end + 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..4a2bc89b75636 --- /dev/null +++ b/Formula/c/cassandra.rb @@ -0,0 +1,152 @@ +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.4/apache-cassandra-5.0.4-bin.tar.gz" + mirror "https://archive.apache.org/dist/cassandra/5.0.4/apache-cassandra-5.0.4-bin.tar.gz" + sha256 "d3056b75f35c2bd2abbdf7b0bf9f5f816a61328ca136c5580a8fb0c9f57c5e30" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "29475946c5427925812bf775798604bf579e38114216f3f72d92155119614f27" + sha256 cellar: :any, arm64_sonoma: "938e64bd5fac77de94e4052069b983607b3500dc7674d5c313d8288235b4e65d" + sha256 cellar: :any, arm64_ventura: "4b914a05ea2fd59ba9718a18edc1ddc36480c72460577f585d3ca530a11e0956" + sha256 cellar: :any, sonoma: "c9972b85feb6d2ebf1be400e8a2dd6bd483dc734c1227a987c344aca021414e6" + sha256 cellar: :any, ventura: "051fc59c3aa2739ad3cd2594e9184ed1a3a2b70a74a7bb65a45af6e79d4ca344" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c6d368d114ce336647e325c30f2c9f684a05f6038f32baa582e42f708e3f1d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ef738122eed736cfb35c09d542ab939c1b5a9f35c5c8e7bd115ac0c624d3001" + 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" + + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "geomet" do + url "https://files.pythonhosted.org/packages/cf/21/58251b3de99e0b5ba649ff511f7f9e8399c3059dd52a643774106e929afa/geomet-0.2.1.post1.tar.gz" + sha256 "91d754f7c298cbfcabd3befdb69c641c27fe75e808b27aa55028605761d17e95" + 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/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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/*"] + (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..82bd1fc650a3b --- /dev/null +++ b/Formula/c/cassowary.rb @@ -0,0 +1,30 @@ +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.18.0.tar.gz" + sha256 "28b02f314295ebdfc4577f8c06f23fc3d48ed195ddfebc95d5f42343b37b9e52" + license "MIT" + head "https://github.com/rogerwelin/cassowary.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7e2eb51373cef3390b372210eef8c12d5bf8f15d3fc04877e6fbde07921f1744" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7e2eb51373cef3390b372210eef8c12d5bf8f15d3fc04877e6fbde07921f1744" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7e2eb51373cef3390b372210eef8c12d5bf8f15d3fc04877e6fbde07921f1744" + sha256 cellar: :any_skip_relocation, sonoma: "5d0bce4e9a3d9eba906c6b360c30633c8425ef78a472341bfb939c9e920bfcef" + sha256 cellar: :any_skip_relocation, ventura: "5d0bce4e9a3d9eba906c6b360c30633c8425ef78a472341bfb939c9e920bfcef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc23f86df8f47a7d4f755acd9dadab662e16b39c70008fdd10e89a8b1314c093" + 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..bd1b6617f8b09 --- /dev/null +++ b/Formula/c/castget.rb @@ -0,0 +1,71 @@ +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 + + bottle do + 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, mojave: "fedc8c680b948b9f87cfd3f63f90bd6cb02143120a9c74d5b1bc5a04e84290d9" + sha256 cellar: :any, high_sierra: "4d1f21bb31abc39d28110a76608493423f96a1f19c4b67c1cb651887f3848675" + 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..fac29f711c4fc --- /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.11.tar.gz" + sha256 "fc5b49f802b67f98ecea10564bc171c660020836a48cecefc416681a2d2e1d3d" + license "Apache-2.0" + revision 1 + 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_sequoia: "81fba162f54969e92f8b6e80e1c25f8883b6c577af305bec352cfe160ca6fe1e" + sha256 cellar: :any, arm64_sonoma: "f3df454737770552357bfc15b5184b83f995b6eebec8670d200250b626ae2125" + sha256 cellar: :any, arm64_ventura: "ba53c6ba447c654f0bdf437c776556d36410ff148c956438dfeda34c6f70fed9" + sha256 cellar: :any, sonoma: "5d39704e7e6792b2f433184eb3c69697f69bd8f1307f3ed00e1d7f3265a074f7" + sha256 cellar: :any, ventura: "d8d9635e8f3cd6d01c59d85d64c49c02b818400a1c22437d82c7bc9779363452" + sha256 cellar: :any_skip_relocation, arm64_linux: "49df8d03d192b404f5be478204549916b1bb9e9496075d1515c2c3376b10c0c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c773dc8de63b455db2dc6f4dd5c3a28cb6042fa82adb8c1282b1fbfbdf815413" + 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..ad2a10853bd24 --- /dev/null +++ b/Formula/c/cataclysm.rb @@ -0,0 +1,92 @@ +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_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..b532ab749b79d --- /dev/null +++ b/Formula/c/catch2.rb @@ -0,0 +1,44 @@ +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.8.1.tar.gz" + sha256 "18b3f70ac80fccc340d8c6ff0f339b2ae64944782f8d2fca2bd705cf47cadb79" + license "BSL-1.0" + head "https://github.com/catchorg/Catch2.git", branch: "devel" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "79e132019cd20543b609b41c78bda19576adc6de2f523f5d50528813209daa78" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b89254a957d82d388a96a3d3217182c767cfab788d86b704055dd7afd3f57ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f279dc10ab81e414fb9590ffe74e149f3731cb5b835df69069fd7a5f7b555c79" + sha256 cellar: :any_skip_relocation, sonoma: "8d819d75133e26e6c58ea5c34e4aff0968841d7e6e977c7f2fc89ed25417d794" + sha256 cellar: :any_skip_relocation, ventura: "05e195d8f2ccead1f25d72fe8642a5dcab8b36d2be7c820eb43d745375139cb0" + sha256 cellar: :any_skip_relocation, arm64_linux: "17138f43947287169ce009e66619625eafc831962754788404b33de42984672f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "945bdaaab135af5a8646c2099c4a3f7cc8848e2d837b2dec89434106a2ddd0dd" + 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..a5b600f2802a0 --- /dev/null +++ b/Formula/c/catgirl.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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..35e9377052eab --- /dev/null +++ b/Formula/c/catimg.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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, mojave: "f680ca7c613325854b5d93185ec4db42a94341d8c4556b9e76adefe90d63eaf9" + sha256 cellar: :any_skip_relocation, high_sierra: "83a6bf89d47c2347c30872201ea5a77c8af18ada90b1992b28838d10882c0c6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "22f06dfc593637fd0debc35c95cc80079c1e09cfde561ae5e8b8ce3644f0f6af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e8886c59a991514ea519ba43376028fab0c809f5a914afd623063b133af7f05" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DMAN_OUTPUT_PATH=#{man1}", *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..258fce015a57f --- /dev/null +++ b/Formula/c/cattle.rb @@ -0,0 +1,85 @@ +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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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 + + bottle do + 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 mojave: "7ce0b67200025300e8e326dc890c79b94be12b627ebc4bbf230ae64437aa286d" + sha256 high_sierra: "43b809e209b52621c0ac66810b751a22f43d1718f75f41c9c0364d6ecb762b83" + 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..7e8b186271182 --- /dev/null +++ b/Formula/c/cava.rb @@ -0,0 +1,77 @@ +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.4.tar.gz" + sha256 "5a2efedf2d809d70770f49349f28a5c056f1ba9b3f5476e78744291a468e206a" + license "MIT" + head "https://github.com/karlstav/cava.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fc71ed1ee831644035fdce90d1a95ec22e6b628cf8272fe021a96c541915a5a3" + sha256 cellar: :any, arm64_sonoma: "5dbaed52f9b4450cda2ee03f98538d49f9d8a071a637a4ec583a1f112d86e404" + sha256 cellar: :any, arm64_ventura: "9a28fd6da1772968860f7e90e7f4de6d3f733e9f8131d4cc35ea0d089207b681" + sha256 cellar: :any, sonoma: "4195486bcc4c14f0c9dfa0f229ef4a2f17a577132b50e402af480df0263ed5bd" + sha256 cellar: :any, ventura: "fc4e24b6e06d3c7b6839fe7c9ddf089cb874e2cf3b2b69ae98fa21ca21c9cf2e" + sha256 arm64_linux: "a47b2f16fb7660eea601173a303838c4b7d56f317f152afef4369fa9b5d96c84" + sha256 x86_64_linux: "e85e6e26804aff07eb2d748904dd810a1427d2cbd3e328e912356fcace9102e1" + 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..def9b3d867efd --- /dev/null +++ b/Formula/c/cayley.rb @@ -0,0 +1,84 @@ +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" + + bottle do + rebuild 2 + 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, mojave: "7084bd5b3b7dc66c9c50266f2831951f995901f2a326905c760646ebe66a3b96" + sha256 cellar: :any_skip_relocation, high_sierra: "0dc598decbc9c70660d22fc670f71581e7fec09e5c9d9bc13ccee4c88c758338" + 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..c7e81bfcf4b84 --- /dev/null +++ b/Formula/c/cbc.rb @@ -0,0 +1,59 @@ +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_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..25a25b65129a5 --- /dev/null +++ b/Formula/c/cbfmt.rb @@ -0,0 +1,54 @@ +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_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..5a8667453873e --- /dev/null +++ b/Formula/c/cbindgen.rb @@ -0,0 +1,38 @@ +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.28.0.tar.gz" + sha256 "b0ed39dda089cafba583e407183e43de151d2ae9d945d74fb4870db7e4ca858e" + 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_sequoia: "0df66e4cab38006433238decb3fe8fd5eaa4a77c76981310e82c1229ee4a8ced" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f7f83495c72708ad9815b2e06f663b723f5e0c4e5a20b223cd84769dbe3926b2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8dab680300f1ee305201074750750b01c9d52c5f433d060f95bdb370bdd4f872" + sha256 cellar: :any_skip_relocation, sonoma: "7be18e30d681d36db517850dbaf464fa075d2241d70b0440c537a2e5ad9eed35" + sha256 cellar: :any_skip_relocation, ventura: "7ea8cc561d6dc567fde59dda56db68960fa6c53c4834101771be6126b41cfc3b" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2be9e6d1272833620392ca72228d40e47fb07e6fe18ea282be05d3e68edb194" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdc85b8b19a708a8ab78b4650398ad16c6b4e3faf949a8e2164e9d3eeba70f93" + 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..e2a4cfef04ed9 --- /dev/null +++ b/Formula/c/cbmbasic.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, mojave: "c922c6bd9691307444d7c28ebe9d09299aa43efc7987e30f23bad572f990c81d" + sha256 cellar: :any_skip_relocation, high_sierra: "99490e603e86319b7c4307657bf58511dacb801dddb30ed7c4269feaa19eb6bc" + sha256 cellar: :any_skip_relocation, sierra: "018c1d1fa3050bdbd88c092f19c1ca787098ea1183e1227671507af3fca07b52" + sha256 cellar: :any_skip_relocation, el_capitan: "92762d9b7f5f21190b98d23e7fedf787cccc14e1c82699b60036948beaf1e7d1" + 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..68796f69c1c51 --- /dev/null +++ b/Formula/c/cbmc.rb @@ -0,0 +1,53 @@ +class Cbmc < Formula + desc "C Bounded Model Checker" + homepage "https://www.cprover.org/cbmc/" + url "https://github.com/diffblue/cbmc.git", + tag: "cbmc-6.6.0", + revision: "3c915ebe35448a20555c1ef55d51540b52c5c34a" + license "BSD-4-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "619e622f250caa0d40ca68371a7d7316275b705a823f43e3cabc89863bf8e34b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "81fd93129dad62a45ee0816001956f822358ca8b80af50ef8265c78563e953d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "990dbaefff6e71286ed2409705c511aa0dbc2ba51aebbd064ca7720140014d8e" + sha256 cellar: :any_skip_relocation, sonoma: "69fb5b4876132ce6980a2801faf5d5b6e7a32071ea539feedb9840179856053c" + sha256 cellar: :any_skip_relocation, ventura: "b27e1306aa88d98c38077a6457fa5debaaaeaa0de0747b93a3fa24d3173e5a0d" + sha256 cellar: :any_skip_relocation, arm64_linux: "26d417c3c3b654e02ccbe0a272b45c48f4195befaa37367b64b16c7a743e7907" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea0a38ee6db636d7f1867eb0b26f2a475b936767c63d425311698d837cda9369" + 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..2972063a789c6 --- /dev/null +++ b/Formula/c/cbonsai.rb @@ -0,0 +1,33 @@ +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.3.1/cbonsai-v1.3.1.tar.gz" + sha256 "62aa7e0eaf3098b7a6a2787146bd2531437df6ad0e604b0f9176128797efd8f9" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b7f0d998d2d9d8c57df4af660020fad67ca426ad8ede10842301f0cdf4ced6e2" + sha256 cellar: :any, arm64_sonoma: "d751d0aff3de34a8d5f64a063a16d632fcf4aeb3decd78eccc89e50de7363057" + sha256 cellar: :any, arm64_ventura: "5606c2d1882991d15e4e0e6457b258d2580caff4af08ff15f9019a9375d9d0af" + sha256 cellar: :any, arm64_monterey: "29f707c8334b23505e9f1963f9bc408038357402602df228ef1697a2e02ef16e" + sha256 cellar: :any, arm64_big_sur: "fa7453507eea38ba79fcfa206508a405db0d5f3d38498e90e7bd63200d16c7b8" + sha256 cellar: :any, sonoma: "f54742a3e343c6989e25f3ca484b24a798654b514e64505a1d2fb4e1fca3af5d" + sha256 cellar: :any, ventura: "7d51969cb0c181d86ddb3fccb770efdfcf2f438e1a2cefc758fcc2dc166219c0" + sha256 cellar: :any, monterey: "559b47b52fd88c4755a176832ad90b86499807aa91fb23919b0b529734dd8a39" + sha256 cellar: :any, big_sur: "f09aa06b6ea26cd7053de48b25c11a2a517d05fc7f40b61a024164868f42bedd" + sha256 cellar: :any_skip_relocation, arm64_linux: "f88dc991a65cfc6b31775e38ad0e4043443e4bce345ac6691e3fa116d9bc5dc6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "adab516beb445c4f2f03666bef052c660e3484c1f9e252d27c0741f91b2f40fb" + 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..76c5e1e186fa1 --- /dev/null +++ b/Formula/c/cc65.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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 mojave: "bd750ae3470b736a6b7260723ead51d6e871edc8d8607f53b670f03c84932a00" + 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..f79cd4404e98f --- /dev/null +++ b/Formula/c/ccache.rb @@ -0,0 +1,127 @@ +class Ccache < Formula + desc "Object-file caching compiler wrapper" + homepage "https://ccache.dev/" + url "https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3.tar.xz" + sha256 "d5a340e199977b7b1e89c0add794132c977fdc2ecc7ca5451e03d43627a1b1be" + license "GPL-3.0-or-later" + head "https://github.com/ccache/ccache.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "b0150ab64610ce9048d6a1e546890969ca5275eace8ab165cedb554566cd2086" + sha256 cellar: :any, arm64_sonoma: "7ff1f6c9d9f827479c2fd28e132d81a92fec384264b5b912033dba8163b3832e" + sha256 arm64_ventura: "254e15d0b3c459251a14fbed5d131afb5bd7713156834776d99a08478eb6f78c" + sha256 cellar: :any, sonoma: "e87ac5aeba2bb3eac30df9f11e3db06df741be895ac9e88c62b148752dc18718" + sha256 cellar: :any, ventura: "e1618c259a9dc5f954d73cc8ab936a32dc5c5c27b3e22a021c6a9aa9e219ce39" + sha256 arm64_linux: "2854130bf7727dbe7f1b68b5fb7acd5e1d31886de381733174dd78f83c3c40d9" + sha256 x86_64_linux: "1371745bdec3e4799b66d2c11c7bd212cdda3175843b682ab52062191aea4004" + 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 + 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 + 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 + 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..c4862e58df9f2 --- /dev/null +++ b/Formula/c/ccal.rb @@ -0,0 +1,39 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "c3a4bead8506e0234e878727e6d7827925e600bcee3857859fd575d4bbb185cc" + sha256 cellar: :any_skip_relocation, high_sierra: "cd9bd38878cee9658e312142edfca7cf35e5223ef30b3a3effc9e4108ccf3d51" + 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..5d0ec067cf7d0 --- /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" + + bottle do + 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, mojave: "0170dc610f0561cd562a2614f5bb0139cad5d37133a4181318a0edc08b3182c9" + sha256 cellar: :any_skip_relocation, high_sierra: "895c26dc74369ef72990fd79447e654f5266dda9c662d3bed2926caab7180678" + sha256 cellar: :any_skip_relocation, sierra: "aab86cfae41d1f4f9c93ad3a1680f21a5a0e9fad61190101582235174e4e214c" + sha256 cellar: :any_skip_relocation, el_capitan: "10eb7df98a05c968f006bbda2c6f690bd7d5053e4bb6d2c9c4a043616648a23b" + 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..384e86198f9c5 --- /dev/null +++ b/Formula/c/ccd2iso.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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, mojave: "710ddc04aac005477e9aaa73e882bc1d8cbe96412ac949ff4a7501c6a53ca018" + sha256 cellar: :any_skip_relocation, high_sierra: "9d33b636be5f43c1e40955323c2f5d4a02d603c990aab2c89e98b5cb16a5cf93" + sha256 cellar: :any_skip_relocation, sierra: "c855496f0265a8f806228cddc1c15d5a1d6e7186f4bb43c0a317a6256d8e8e85" + sha256 cellar: :any_skip_relocation, el_capitan: "e74b2779ef3d832bc899422285c2d03ea33aa6ab979ca835914343999b444671" + 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..f19d6d625b0d8 --- /dev/null +++ b/Formula/c/ccfits.rb @@ -0,0 +1,54 @@ +class Ccfits < Formula + desc "Object oriented interface to the cfitsio library" + homepage "https://heasarc.gsfc.nasa.gov/fitsio/CCfits/" + url "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/ccfits/CCfits-2.7.tar.gz" + sha256 "f63546d2feecbf732cc08aaaa80a2eb5334ada37fb2530181b7363a5dbdeb01a" + license "CFITSIO" + + livecheck do + url :homepage + regex(/href=.*?CCfits[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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..460708d433087 --- /dev/null +++ b/Formula/c/ccheck.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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, mojave: "4afea0fa685001ecf5777cb37975074cc382f2282bfe7fbaf9543c3b520272df" + sha256 cellar: :any_skip_relocation, high_sierra: "564171a220f9f031bd04044319b1e99e0a294208b3e804513ee0fe607525fe81" + 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..6478db745bd67 --- /dev/null +++ b/Formula/c/ccls.rb @@ -0,0 +1,60 @@ +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 + license "Apache-2.0" + revision 1 + head "https://github.com/MaskRay/ccls.git", branch: "master" + + stable do + url "https://github.com/MaskRay/ccls/archive/refs/tags/0.20241108.tar.gz" + sha256 "76224663c3554eef9102dca66d804874d0252312d7c7d02941c615c87dcb68af" + + # Backport support for LLVM 20 + patch do + url "https://github.com/MaskRay/ccls/commit/4331c8958698d42933bf4e132f8a7d61f3cedb8c.patch?full_index=1" + sha256 "5420b53cf912268688953a2863e86f6b88334ed548852eaedb9f8ce4871ee034" + end + end + + bottle do + sha256 arm64_sequoia: "c27b908fad0df43a31ab3773116b623a5fbf118a6952fe107cf1b1ec74298fb9" + sha256 arm64_sonoma: "c3f51b9b966652326d52e4f70ac9f76679e0f26cdbc217970869017f2496c389" + sha256 arm64_ventura: "d822534f47862b7b9bac59b251e365ff713bb236931a5a91f3d92f8e5a006d49" + sha256 sonoma: "c55e6b6a3cb802ebc90911280ecc01729aa347818d854e2c2bb7d6fc73e8b7cf" + sha256 ventura: "2821feb82b94d31af308fb656ac5354a720cf3faccc5aeae4efff119663932a2" + sha256 arm64_linux: "76bba92dad7dd21c8fb560f4f41f5215043ef1ef8610ed34626a9f7bcdd5521b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8aa50bc118e9e35d8840052839456fb362a603d5e04e210a6b8ae2df9da31423" + end + + depends_on "cmake" => :build + depends_on "rapidjson" => :build + depends_on "llvm" + depends_on macos: :high_sierra # C++ 17 is required + + 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..377f5c2a107e4 --- /dev/null +++ b/Formula/c/ccm.rb @@ -0,0 +1,63 @@ +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 4 + head "https://github.com/apache/cassandra-ccm.git", branch: "trunk" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "e036ab0817d4b65085d1c2cb6c2edf0a9e55b6340b9bbe99d6f90abc16e36e1f" + sha256 cellar: :any, arm64_sonoma: "33a2184cc7764d6ee186071d78e743b0c152cb0ac37ec5dcfe77ee3eae97ab01" + sha256 cellar: :any, arm64_ventura: "a8231ecd1b2f906259979cc35186be52000c4b7786dbb55c8c3cd13c52b5402a" + sha256 cellar: :any, sonoma: "528a3299799df8daf15b07e0a0670df132ae046f0f52466defe58e968bc54a11" + sha256 cellar: :any, ventura: "9912048114592dbd5fd7be13ab693bd12c6dabe896f2b953802c383c3483e7c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a04076ec09207028fa744de13afaa744462f24fde634d9308147952e1855d07" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7cf8010b7799a42307a71b081fdb9afa505ecc13b7ad8fa4fb826f257eafc364" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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..f7eb1518f65d0 --- /dev/null +++ b/Formula/c/cconv.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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, mojave: "ffaf8b5cab0618e52cfedff14a5084cfe54e0b1b6480433e2ffb4beee8e47ec9" + sha256 cellar: :any, high_sierra: "c4d197f979340a89d5a87e05eae6a39db38863f89b6ddda42f924472d87a5b0d" + sha256 cellar: :any, sierra: "2e885b9571a8814f2b23b088f3f0d45f47b1fe762f040c3e66b1a81f84673646" + sha256 cellar: :any, el_capitan: "bda78602260276dd3e5187a5a9d6bbcfb95ff40aa513840569e490d5dc96aab2" + 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..2594b8cbf561a --- /dev/null +++ b/Formula/c/ccrypt.rb @@ -0,0 +1,48 @@ +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" + + bottle do + 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 mojave: "49054d9d502ab13e65ab873cc9d355ab75438372a7770c38c4c7c35c84c31e3a" + sha256 high_sierra: "a4d270d5b5f467870f0b265f6f2d1861762d853df46756a34ac7e6a6d83e2121" + sha256 sierra: "048295cb4f95c9f0f3c5f1a619141e08c0326b6d8252c62c97608fb028cb48f7" + sha256 el_capitan: "a98ea0f3dbee5e9086bea342ac8291303970b1d8a85344be2b4d91330a919ae9" + 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..2bf10783afa29 --- /dev/null +++ b/Formula/c/cctz.rb @@ -0,0 +1,64 @@ +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.4.tar.gz" + sha256 "e1a00957d472044808a24a26f1ba020f36dc26949a69c214562d96b74093adb3" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "43ec1e3404f1eb3f05f967649c764aa06a7e4a8c32902214343a72676ffda5c7" + sha256 cellar: :any, arm64_sonoma: "eba6f2dc7740b64f07d96b4f408c51ed5adb7b948f7c6261155ee5da4e43c991" + sha256 cellar: :any, arm64_ventura: "dc5b93076b8c9637ebd074539ed68f79a967234d1ed59451e80b708aa438a499" + sha256 cellar: :any, arm64_monterey: "2279fd2c826ddff71e1162f8b67829b34295a21f271352c0640b6f44c3e331c6" + sha256 cellar: :any, sonoma: "0ab1b384f0a647a473f481323cfa13164494affa91cbffc5dfa6b41ebc97da72" + sha256 cellar: :any, ventura: "160d4ac726f11db6d03d917e0a1acb9d61bb5a45a24b120b8f094a5000d7d127" + sha256 cellar: :any, monterey: "a8256df066d659ca817adab5b1054633547514c650248f479ec6e31a3c12732e" + sha256 cellar: :any_skip_relocation, arm64_linux: "00dfb51dc8e380ed0679b4ca65ce010f5cbc33ac0f7bb4acb3910eb8fed1fea4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "897ed11efc1b5804873b9c64315d78f99cb4e242f3ceb554dfc8d760ac65b03e" + 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/cd-discid.rb b/Formula/c/cd-discid.rb new file mode 100644 index 0000000000000..981c20d863b10 --- /dev/null +++ b/Formula/c/cd-discid.rb @@ -0,0 +1,54 @@ +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/formula-patches/85fa66a9/cd-discid/1.4.patch" + sha256 "f53b660ae70e91174ab86453888dbc3b9637ba7fcaae4ea790855b7c3d3fe8e6" + end + end + + livecheck do + url :homepage + regex(/href=.*?cd-discid[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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, mojave: "158d91563b2e79574c0a336f775b49033d85ce3b290f122dae853dea45841f5b" + sha256 cellar: :any_skip_relocation, high_sierra: "26b88be0312f960484625161d94adf9a44aa88ef5817ba28b61af520a6e17e03" + sha256 cellar: :any_skip_relocation, sierra: "6b0d9c55a1adfce8a2c6e9eabd00c37118a05b60678564e7a9695d876bca117b" + sha256 cellar: :any_skip_relocation, el_capitan: "f0c17cfc3c345c661104a6f29562b766cac2a80747feea0c26cda04ece3c8326" + sha256 cellar: :any_skip_relocation, arm64_linux: "92144152a7fa53e3cbe4c6eced912ab7a569079a1d40fb9a72c73635f70027c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6e37cc61545d58bebb66ffffada804ca5e39e47e503684c7ed84cfa856dbb14" + 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 diff --git a/Formula/c/cdargs.rb b/Formula/c/cdargs.rb new file mode 100644 index 0000000000000..367954a401c89 --- /dev/null +++ b/Formula/c/cdargs.rb @@ -0,0 +1,59 @@ +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" + + bottle do + 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 cellar: :any_skip_relocation, mojave: "e78325dae8b29e9f7f5764537edf24d188be18ab27684392db9ebdbde1c9011b" + sha256 cellar: :any_skip_relocation, high_sierra: "fc93b68d48a7ae82eaf0816b6952bb1a6c7cc038c6439232cf01ea1b39bea3b0" + 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/formula-patches/85fa66a9/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..b58be31f1417c --- /dev/null +++ b/Formula/c/cdb.rb @@ -0,0 +1,54 @@ +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 + + bottle do + rebuild 2 + 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, mojave: "49748511d9e05e7ae4158ca4e4bbf14af858686f0104c85240de06b2acfe9b9c" + sha256 cellar: :any_skip_relocation, high_sierra: "f187d9ff7ddb1a1532e83924d32d02521afc943738e4b21c79da5712340b0bbb" + sha256 cellar: :any_skip_relocation, sierra: "16b08929c8c42feeb2df4eaed5b46967eca487aaa20585dc5869ba44a28f0fe8" + sha256 cellar: :any_skip_relocation, el_capitan: "ac5a34c222875d86113275127632fe02ccc15c0332c7719cdac8321aa0f83bc4" + 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/formula-patches/515bc4f1322a1eb128d0e7a3a3db6544b94fc82a/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..0bbf958d23947 --- /dev/null +++ b/Formula/c/cddlib.rb @@ -0,0 +1,96 @@ +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.94m/cddlib-0.94m.tar.gz" + sha256 "70dffdb3369b8704dc75428a1b3c42ab9047b81ce039f12f427e2eb2b1b0dee2" + license "GPL-2.0-or-later" + version_scheme 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "2660439f6e26917107af0a3e236d4ca2a9985b93f07dab226edcf7c2b16d5f01" + sha256 cellar: :any, arm64_sonoma: "b0eb2d856bc499714e6eba84ef8d853d4d4d422513a8b877e4419405fee643d1" + sha256 cellar: :any, arm64_ventura: "768fd3254daf99ec710427f4f36f42ebcce984d14168684a633e5a86fe4c8c92" + sha256 cellar: :any, arm64_monterey: "dc6b3a52efe03676d1d97d2c70b3bb7d7f09bff623f13f259c2afb2f0d247704" + sha256 cellar: :any, arm64_big_sur: "a6cc39c5866ef92484b20b3e4fa71916e4fe02f91314f5a90e64a8ac6d477f5e" + sha256 cellar: :any, sonoma: "d58144c6bb3e8e274974b59e95abcf354b79c5c9710d7334f1a0867d8850be26" + sha256 cellar: :any, ventura: "d58420dfada364570f86deb3f6aca808f9de5ffd905e67f51473fd7e653ec570" + sha256 cellar: :any, monterey: "06ea555e6166ee528da1ebb86ba65dabf584d472ee7ebcdb5abb59f5dfe2381a" + sha256 cellar: :any, big_sur: "2d9ded9039be48632f55065ccc0cac90ee53bb41e9a900bd955997ae113eabd8" + sha256 cellar: :any, catalina: "3e3369de96b6c33641ec2c5a3e490afb72ad94b6fb913385f574089ec4b2b0be" + sha256 cellar: :any, mojave: "362934e5d50dc994ce268a690706d6950f17e1b191f315617adc0eeacc0b51b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "33da5b21d2756dd83ac0dcb5d83c8334f98d0376ffdec597cc2edaf7657e63bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0cbfdb16a069a1c098e379da5b3f12c461f639f09f36addc65e5f07f27e1f1e9" + 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..436c878ab58af --- /dev/null +++ b/Formula/c/cdebug.rb @@ -0,0 +1,45 @@ +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_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, 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..bfc26c7d4b43f --- /dev/null +++ b/Formula/c/cdecl.rb @@ -0,0 +1,39 @@ +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.4.2/cdecl-18.4.2.tar.gz" + sha256 "7ab5a9241734153d7d81b29787914b3120d23fdfa5c3a2e2fdde26208a35435c" + 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_sequoia: "c25c9e112ed54c6205af2b721b3c7d2b7600c4d4ab5e9f830033ff0027d2bedc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0a737e9c4b991c2900a4a924e3435fa7df7ce14d86c690d06a6f92c9c0d6bc4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9cead9212974aac9593bbfaec7272e7ef26a5fdb440384886a73ca798a2e898e" + sha256 cellar: :any_skip_relocation, sonoma: "300d38832467679da4a92dd30c498cbf177a7c6652ab9820ed92fbc61db05178" + sha256 cellar: :any_skip_relocation, ventura: "105709a44e508390c8d875ed41d6c5347585e3a7208d69e1b6f765c9a185f2a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "264ace3c40f8362d9dc6a2f4b91f4d046b40dac1d225c900cf39994116b14434" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7cb1131967b202a71025d739f17275b0d516be1b235e15b54489fd1c23126cd" + 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..f4d62f37d22a1 --- /dev/null +++ b/Formula/c/cdi.rb @@ -0,0 +1,63 @@ +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/29871/cdi-2.5.1.1.tar.gz" + sha256 "a78c577324eb99ef461e90f717b75a1843304ac6613ebd168fdad12f84d78539" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "8ba79bdfd5b3ae2ee2c1761091adec216dd87fcd07dfd50cfebaa4eb95ff5cc5" + sha256 cellar: :any, arm64_sonoma: "7c4791aa173ee41b0f3769d41252379a538cc4eb815adfe455f2371411a07cb0" + sha256 cellar: :any, arm64_ventura: "672518b37e775349dd80650bf633d3fe0c38c0929cec798ba382a120be8b02f0" + sha256 cellar: :any, sonoma: "fd7bd1151d508897c5ab9b2e610af65e6b1741cff84dab549d8068c2502581e3" + sha256 cellar: :any, ventura: "cf645ed409a66f613ee7ee117e1b90e806fc6557f82dabaff414c298e9f5b787" + sha256 cellar: :any_skip_relocation, arm64_linux: "341ebba037f6dfc1b38692328d8eea830da74611f85ecf17b0607031072214c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "330cd470852be10e82afd99a977270252a46eb9ee67fe543334715861b5304aa" + 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..cef32de002a93 --- /dev/null +++ b/Formula/c/cdk.rb @@ -0,0 +1,33 @@ +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-20250116.tgz" + sha256 "1500d41224d50b72728ccafe23c4ee096bc8535fd6fdb9e876da4cdeeddadc83" + 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_sequoia: "37c2fa00f2063a7ba61733a6ec514717782466e6b8a811cb036ddb727f149c3d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "59549c5e8a296ffef736c269b98d386ddeb1c358740cd5b49b3bd50bd4543b69" + sha256 cellar: :any_skip_relocation, arm64_ventura: "628ee30b6aecd244ca816a1dd314b7dcf2b3e483a2a03395464b4c4b1aa19793" + sha256 cellar: :any_skip_relocation, sonoma: "c6a330d5624273363729084fb7cfe703f85c26c0f38d6fb882497f43cf59614f" + sha256 cellar: :any_skip_relocation, ventura: "e60ad33c06a155538e2f1713150c303893b3f77d5b930c1e126a390fc77f73fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a020afff86107c179aeb9d6fb0d4eccc5e909243a53995c4ffb0a5fe037e9d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "317ee8c5ae7ba4069672d9b89b2c22ad07432b5e071133118405444d48b6f003" + 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..5d1cb21f6e653 --- /dev/null +++ b/Formula/c/cdk8s.rb @@ -0,0 +1,29 @@ +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.200.72.tgz" + sha256 "b23b29f5b9c38e4535dbfa9ae40b3bdb4287d61bcad1a8112340aa4ed1ef80f5" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "92ccb1d785d06b5d268681ec7ab158c24d2e7741cc1c7f1be0dad2e8bb8b77a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "92ccb1d785d06b5d268681ec7ab158c24d2e7741cc1c7f1be0dad2e8bb8b77a4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "92ccb1d785d06b5d268681ec7ab158c24d2e7741cc1c7f1be0dad2e8bb8b77a4" + sha256 cellar: :any_skip_relocation, sonoma: "b896f35723502e294fa2c53a6fb9754fc7ffd12140d2d59032281618eb2ea37a" + sha256 cellar: :any_skip_relocation, ventura: "b896f35723502e294fa2c53a6fb9754fc7ffd12140d2d59032281618eb2ea37a" + sha256 cellar: :any_skip_relocation, arm64_linux: "92ccb1d785d06b5d268681ec7ab158c24d2e7741cc1c7f1be0dad2e8bb8b77a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92ccb1d785d06b5d268681ec7ab158c24d2e7741cc1c7f1be0dad2e8bb8b77a4" + 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..1c941f2db047b --- /dev/null +++ b/Formula/c/cdktf.rb @@ -0,0 +1,43 @@ +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.20.12.tgz" + sha256 "90bb30b7eae861d2a7ab21d1fe4ddbf71c8f74e7b2c31052c9b9265ff69d4c6e" + license "MPL-2.0" + + bottle do + sha256 arm64_sequoia: "c1f18f63b582964297038bb4b67726fdd4f3679da303fe3db743bc50f8415b31" + sha256 arm64_sonoma: "e69789750019da67bc16c2e137228306528a18f2bf92499c027f40cc98749980" + sha256 arm64_ventura: "44219e68aa1993c579b5f973322703f64209ed42b9bb4bbce4ad49a5d82a7bbc" + sha256 sonoma: "3219484a717ff464e6bce5bf60688d37dda8a1544f80235ec15e5325bf1c8f6e" + sha256 ventura: "055c2f47d7e4ed2fb81f2c978a9281e49dbfb802b7aa23a0efdd4092028a7840" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bd71b277d96e93d200479006af9ee8987034fc8e3706a9f2e6cd88619ee6cac9" + end + + depends_on "opentofu" => :test + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + # 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/"linux-x64").glob("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..24a4087109872 --- /dev/null +++ b/Formula/c/cdlabelgen.rb @@ -0,0 +1,41 @@ +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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b29161d97190eea5c2afc549dbc0cf1511db27b0c48e00ff225373c135d678b1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ac1cd2a6a78abdd5adff5ac90d8eb311ca1113f9a673097ae25d8619dd24eb4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1ba8549a259b725eb231f8ae136a290a24156dc267050796bbff796f6135c9f8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1ba8549a259b725eb231f8ae136a290a24156dc267050796bbff796f6135c9f8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1ba8549a259b725eb231f8ae136a290a24156dc267050796bbff796f6135c9f8" + sha256 cellar: :any_skip_relocation, sonoma: "6017838a534fbaa5f33c5905867926df9160c33e25bb4b78302708f1f73ea157" + sha256 cellar: :any_skip_relocation, ventura: "584f58b2a0815c049eef3b967afe1563fe3fb6251224b69b7b1622407aeda35c" + sha256 cellar: :any_skip_relocation, monterey: "584f58b2a0815c049eef3b967afe1563fe3fb6251224b69b7b1622407aeda35c" + sha256 cellar: :any_skip_relocation, big_sur: "8c1096a23f2ce2b8db912fcb9786c2f9d76b7ece60d2269512e90fa9505d0d9e" + sha256 cellar: :any_skip_relocation, catalina: "5facce52a8f22279160a388513b2a9406f427f3ab231e119fbc0b074dc7028f9" + sha256 cellar: :any_skip_relocation, mojave: "5162ba8c34a6aeef369b5004d1608fa2b8de5a33350f1d7629f08eed8b18d5d9" + sha256 cellar: :any_skip_relocation, high_sierra: "ece93bae3d8b9e6e5c37b347849836dc970183efcea603d7d3b6f8f0dbaebd4a" + sha256 cellar: :any_skip_relocation, sierra: "a874e660972a4ac722e56e13749a17f3c76c5fa61691f44d70afb13c88e4e65f" + sha256 cellar: :any_skip_relocation, el_capitan: "34758541efaf3e124ff531d09cdf3f511651be8602f179de1e5ecd606b0aa60b" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb17ad7e1c031428b9df3ade55d9f89ac1cace0cbf720a8123bc5c5f479f4d42" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ba8549a259b725eb231f8ae136a290a24156dc267050796bbff796f6135c9f8" + end + + def install + man1.mkpath + system "make", "install", "BASE_DIR=#{prefix}" + end + + test do + system bin/"cdlabelgen", "-c", "TestTitle", "-t", pkgshare/"template.ps", "--output-file", "testout.eps" + File.file?("testout.eps") + end +end diff --git a/Formula/c/cdncheck.rb b/Formula/c/cdncheck.rb new file mode 100644 index 0000000000000..6df75830dc528 --- /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.1.17.tar.gz" + sha256 "87216de7e623a293d405a90d0769a014eeb169a64a471c2e117c07ac303b7fda" + 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_sequoia: "d89d18dd3e2961adee82e6047392a200846d8663c2f1ac5807da1d52d4fd807d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f289a97f36b26a9e5ca0678391f3833c690c103855dde9bf6119e3d9650a094d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "753e51b7a35e63bf79e15c2357cca0048d7fb3f5ca29dec8e3d122486a239828" + sha256 cellar: :any_skip_relocation, sonoma: "d3c9b2cda2aad799828030d9d039249286a48bd2e11c32a5984629174932a5c4" + sha256 cellar: :any_skip_relocation, ventura: "4159a1e6aa00d8e56bf0455c5c39f885ec52b15049d8b37a81380055f41b899c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a02a3048d6a23bb256c4d3fbe7c66d80793e6c0f367c94a1ea5dd3a9a98e15c9" + 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..2beb63c6c60b0 --- /dev/null +++ b/Formula/c/cdo.rb @@ -0,0 +1,66 @@ +class Cdo < Formula + desc "Climate Data Operators" + homepage "https://code.mpimet.mpg.de/projects/cdo" + url "https://code.mpimet.mpg.de/attachments/download/29864/cdo-2.5.1.tar.gz" + sha256 "418bf91e864cbfe547c3c8e150d31419cfa715e7d345508c5591b1abda5457d1" + license "GPL-2.0-only" + + livecheck do + url "https://code.mpimet.mpg.de/projects/cdo/news" + regex(/Version (\d+(?:\.\d+)+) released/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "dd1d32211a82e1cf891757e379a638b80e7eb672fd2a8d2f611372af12c743ff" + sha256 cellar: :any, arm64_sonoma: "1ff8f37ffcba186f20ec2d6227a929754b11595a77213e141c5f634bf13b5925" + sha256 cellar: :any, arm64_ventura: "4b0080c57a505533e5563817b1fffa4786dc3583bf21176a411173a864e0888e" + sha256 cellar: :any, sonoma: "4ad6cb5b6a951f679f64b5013969e9f136b7566ca7f0d8e266dc2f2e86be6846" + sha256 cellar: :any, ventura: "9bf4288a75ee0b7162592c8d0ec79b33217076480734e1de2753fc9d34f35c0f" + sha256 cellar: :any_skip_relocation, arm64_linux: "d5483f4f41ad3427a1f4111517912b39a8f7b29e4da5d1542bdf8937a763d777" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b62558687a81c8b989d7885d6128f3b1c3f40fdaf12d6ee966021ef80dbf685" + 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..04bec48fa035e --- /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.0.tar.gz" + sha256 "6ea66e058503a5c160dbeccc25072061c87e190ced6876ae5b63a3e4d1ed0044" + 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 + sha256 arm64_sequoia: "08a30a5c543e87a3124a15c907b73060fe443820bbd6565569f49fb33541639d" + sha256 arm64_sonoma: "c5a53c5b4fb1d8872f8df040958878bf133c7ef335111e31782c353a0b846c07" + sha256 arm64_ventura: "9d525e0b2132b29d012dd04fa065bf67a0424dba356c112e80370cc65e4fa446" + sha256 sonoma: "f49ea1edd7342d5645cf54b49c0a07f4116df52c86d357c966d304615f4afc90" + sha256 ventura: "1a60efaeb8e6680ff86ba951abf2ff25078a0e4fc6c6dcada978f547b85694e3" + sha256 arm64_linux: "bf9707f098bb504f6ce1bb5d0b597e6325a68229a5e9fc8de9e6fe634f9d44eb" + sha256 x86_64_linux: "6eed5b0c3979d10ba041c7755640461247e63979d6287fde09554dd712ec151e" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "protobuf" => :build + depends_on "python@3.13" + 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..69ac546f19c26 --- /dev/null +++ b/Formula/c/cdpr.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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, mojave: "ae75b31d4fb195d0735784d7fb86924821ad07dfc5c5b4ff91597f6e0ceb5fba" + sha256 cellar: :any_skip_relocation, high_sierra: "ce836a4189c94a1441cb417f36699fca01e3cf30b69bcc5a3ec8307c51d0f66e" + sha256 cellar: :any_skip_relocation, sierra: "c6603372329fd2dc0c60266b3f3eb6c9f7cc5c0ce7f351b05977ab39a18cde7c" + sha256 cellar: :any_skip_relocation, el_capitan: "0bdc868c9b11510e2d9e6551dee970c20406215153906d8bc42790d8510ac429" + 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..d2f429dd0ac33 --- /dev/null +++ b/Formula/c/cdrdao.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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..189bd48dc821e --- /dev/null +++ b/Formula/c/cdrtools.rb @@ -0,0 +1,73 @@ +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 + + bottle do + 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 mojave: "4669f544745a05b8ef4ffd9bc1ea446ef7cda4c98f32b26279c81af803f1ab7e" + 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..f9c8357980285 --- /dev/null +++ b/Formula/c/cdsclient.rb @@ -0,0 +1,39 @@ +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_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..90c8cf44ade89 --- /dev/null +++ b/Formula/c/cdxgen.rb @@ -0,0 +1,97 @@ +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.2.7.tgz" + sha256 "77e8870801527f734278a82fd9f63e9a77914bbfa59288de5d4e729baad0e35b" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3330eb31410632149b453519d767342eb1808103381686977d38caefe4c3d12e" + sha256 cellar: :any, arm64_sonoma: "bcadcab319805a62b176420821f24b19dfb5f95a65582bdcaf40dd2e3e4a1daa" + sha256 cellar: :any, arm64_ventura: "4b3d7fb23a902c2f0d82448e73d47ca83f80333d48c24e06d7881b8121e028e2" + sha256 cellar: :any, ventura: "f451cbb2969f30a3c283446a0c476d07b552a0d44b7f723e7d84ee181b88d22a" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ae1f74a4aaf5b33dba94aa66fe5508fe7e391a69a2c2c57f35db6326f6bff14" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b69b7639a317be13a87ed4fc5b9044ff4a54f7a1fd3e35444defba15815473c8" + 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/v1.0.2.tar.gz" + sha256 "8dee3b328f58c75b62be9acbc26e00d6932599985c47588feb323c900fba6688" + 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 + + # Ignore specific Ruby patch version and reinstall for native dependencies + inreplace node_modules/"@appthreat/atom/rbastgen.js", /(RUBY_VERSION_NEEDED = ")[\d.]+"/, "\\1\"" + cd node_modules/"@appthreat/atom/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..2116308492bec --- /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 + sha256 cellar: :any, arm64_sequoia: "b8b3f0bbe83f0c8a5aa1074e8d0c0eb203b9984cca78a2c33d131a23d55344e5" + sha256 cellar: :any, arm64_sonoma: "edd7964819caef1448222ace74fcd6662bfaaa86b217f6d4a2ea375d68743819" + sha256 cellar: :any, arm64_ventura: "11b5a994c414eb5da1d067ceff2d0e39e9283ac76c483aefca3e0e28a6e930e3" + sha256 cellar: :any, sonoma: "3bbd6a4ccd41e14f74656f9955f6a1e9e35a4fe6e5149d524be0acd7f1839e03" + sha256 cellar: :any, ventura: "7f260afdeb6c019731fad22987af4f1d58669b7d9148dccc501766a05c09c150" + sha256 cellar: :any_skip_relocation, arm64_linux: "0ce6285077882bc971758f48c71d22202d3bcdf105cc923daea26f1ad5037d82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "071761f34a39ecb8ce7b7a806b5cd29b47a01402bf57c29ad376d3835d294d6d" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "colorlog" do + url "https://files.pythonhosted.org/packages/d3/7a/359f4d5df2353f26172b3cc39ea32daa39af8de522205f512f458923e677/colorlog-6.9.0.tar.gz" + sha256 "bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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 "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", shells: [:fish, :zsh], 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..49133d1110020 --- /dev/null +++ b/Formula/c/celero.rb @@ -0,0 +1,57 @@ +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.0.tar.gz" + sha256 "d59df84696e0dd58022d2c42837362c06eba6d1e29bac61f7b3143bc73d779e5" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "8df764c6550e49e740ac10d19e1dcfa18708fac66695b00ffeb724eaf2d798d4" + sha256 cellar: :any, arm64_sonoma: "a623447721e67bc374800d2c048c9c65fdba7fe06a21ea497a5adba2905157ff" + sha256 cellar: :any, arm64_ventura: "6c5aa0d8b749c0ae1a99501d00026676de190997457820798992145237268783" + sha256 cellar: :any, arm64_monterey: "f3c479a0f6ab3d2d366bae855864122e04cf21627b000a395fbb68fb1f44366c" + sha256 cellar: :any, arm64_big_sur: "d6566ee0ac67ff7c0970df553b971fc626c02e70ad106dc2d44e88905562af4f" + sha256 cellar: :any, sonoma: "dffd38a438568728d366fe4b5ddc943c6023c247742f146c3afc7d492b94153b" + sha256 cellar: :any, ventura: "42ef19078dce4acd6d50aa076308fff7910e06355c0a8eea600e1832fd86a87d" + sha256 cellar: :any, monterey: "6011c0b09373fb45f77460bb8b3019f4124748f53007dae89421e0c801d9b6b1" + sha256 cellar: :any, big_sur: "5092b4825085f08851008b0f776942ad17629900a485e825778a97599b5793c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "4ae2832039586621fe1078a485472891b063590d0dab431c85f1eb3ec4b37b85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d360871cfd166555c2d16b0841b4669c0755532da2970bab216f7f9524596a5" + 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..cc281587c5a17 --- /dev/null +++ b/Formula/c/censys.rb @@ -0,0 +1,84 @@ +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/f3/db/89a2a0709deeca690bee2bc77cb330c87f8bd2c41b7d8dfa2e5880048da6/censys-2.2.17.tar.gz" + sha256 "da07d8589fc98b8878eec5772d275d199dda89a3340ce69cd6ab2dc5567e887f" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "038bfb0acdfbd0fef5a26dadbba5ceb7f44f4af277f8e8ed3a29ac534ec55100" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "038bfb0acdfbd0fef5a26dadbba5ceb7f44f4af277f8e8ed3a29ac534ec55100" + sha256 cellar: :any_skip_relocation, arm64_ventura: "038bfb0acdfbd0fef5a26dadbba5ceb7f44f4af277f8e8ed3a29ac534ec55100" + sha256 cellar: :any_skip_relocation, sonoma: "6f4ba8c73927c025e5866e419871e66194940829c4599935200d983bff221d5a" + sha256 cellar: :any_skip_relocation, ventura: "6f4ba8c73927c025e5866e419871e66194940829c4599935200d983bff221d5a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a845233194bd8740aad99d915578ef34a7c8fa9f543c1c2f587082a6c7700ff0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a845233194bd8740aad99d915578ef34a7c8fa9f543c1c2f587082a6c7700ff0" + end + + depends_on "certifi" + depends_on "python@3.13" + + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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 "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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", "censys", + shell_parameter_format: :arg) + 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..d3b8312add8de --- /dev/null +++ b/Formula/c/center-im.rb @@ -0,0 +1,65 @@ +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 + + bottle do + 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 "pidgin" # for libpurple + + uses_from_macos "ncurses", since: :sonoma + + 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", *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..7515d19c7f070 --- /dev/null +++ b/Formula/c/cereal.rb @@ -0,0 +1,76 @@ +class Cereal < Formula + desc "C++11 library for serialization" + homepage "https://uscilab.github.io/cereal/" + url "https://github.com/USCiLab/cereal/archive/refs/tags/v1.3.2.tar.gz" + sha256 "16a7ad9b31ba5880dac55d62b5d6f243c3ebc8d46a3514149e56b5e7ea81f85f" + license "BSD-3-Clause" + head "https://github.com/USCiLab/cereal.git", branch: "develop" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "dd568ffbaa2689d64040eea49404b91b65a33657ea8a6567255fb738185c1199" + 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..8b088c5a1f3ad --- /dev/null +++ b/Formula/c/ceres-solver.rb @@ -0,0 +1,61 @@ +class CeresSolver < Formula + desc "C++ library for large-scale optimization" + homepage "http://ceres-solver.org/" + url "http://ceres-solver.org/ceres-solver-2.2.0.tar.gz" + sha256 "48b2302a7986ece172898477c3bcd6deb8fb5cf19b3327bc49969aad4cede82d" + license "BSD-3-Clause" + revision 1 + head "https://ceres-solver.googlesource.com/ceres-solver.git", branch: "master" + + livecheck do + url "http://ceres-solver.org/installation.html" + regex(/href=.*?ceres-solver[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "988b6c630059fd2c89f693ae791b329123e8edf5e1135f57b3a23434ef4fd6e2" + sha256 cellar: :any, arm64_sonoma: "82321500433aa189b94707782c92b280d9f370c2da70d81f337c33e7d3ce0924" + sha256 cellar: :any, arm64_ventura: "7b298b5e784c97df200a87e5ecb612c6a8a3feaff2b7906a47254822c697ddfa" + sha256 cellar: :any, arm64_monterey: "3de5b3e4c7e884954abc07b9456ec86e08cc98dc172194b2ab7781d354ccc412" + sha256 cellar: :any, sonoma: "f949ae21f99855aa96d25e8cb2a30cf7d001b8af8193a9b0ab4032969c5ab6a9" + sha256 cellar: :any, ventura: "0fb671f15c3b25e771ebeacb0bd8cfe5f3b47535c766091e24adc6f50e7e4e23" + sha256 cellar: :any, monterey: "c3dce08c0c5c4c239c60fad44ebe52333428f4925fd3f69faa30d1ad34d11f65" + sha256 cellar: :any_skip_relocation, arm64_linux: "a81bb14618a9bb0c8e3bace126d01e4d0e1c643aa10bc3bd6ce00f93a03ae3b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68107edf1952d270ebdad753857acf97e253956b48cd115047d89b6364c3f903" + 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 diff --git a/Formula/c/cern-ndiff.rb b/Formula/c/cern-ndiff.rb new file mode 100644 index 0000000000000..849fac19d69cb --- /dev/null +++ b/Formula/c/cern-ndiff.rb @@ -0,0 +1,49 @@ +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_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 + system "cmake", "-S", "tools/numdiff", "-B", "build", *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..a9aa188f3928e --- /dev/null +++ b/Formula/c/certbot.rb @@ -0,0 +1,134 @@ +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/00/91/a7acb7a9f7f065bf7f4aa356ecae039f229798eeceed205f397f329cd666/certbot-4.0.0.tar.gz" + sha256 "a867bfbb5126516c12d4c8a93909ef1e4d5309fc4e9f5b97b2d987b0ffd4bbe3" + license "Apache-2.0" + head "https://github.com/certbot/certbot.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ebb58721365d9eb126a45edb91c53793adf27cb07eeb1bf96cb39af4e7e122cb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ebb58721365d9eb126a45edb91c53793adf27cb07eeb1bf96cb39af4e7e122cb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ebb58721365d9eb126a45edb91c53793adf27cb07eeb1bf96cb39af4e7e122cb" + sha256 cellar: :any_skip_relocation, sonoma: "bca6a25dd14a0bd3b8fda4c5ec90b88e7d048193e9b3ffcc9349f0c08117ce1e" + sha256 cellar: :any_skip_relocation, ventura: "bca6a25dd14a0bd3b8fda4c5ec90b88e7d048193e9b3ffcc9349f0c08117ce1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "ebb58721365d9eb126a45edb91c53793adf27cb07eeb1bf96cb39af4e7e122cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ebb58721365d9eb126a45edb91c53793adf27cb07eeb1bf96cb39af4e7e122cb" + end + + depends_on "augeas" + depends_on "certifi" + depends_on "cryptography" + depends_on "dialog" + depends_on "python@3.13" + + uses_from_macos "libffi" + + resource "acme" do + url "https://files.pythonhosted.org/packages/c6/aa/8d598e7338fb9677a9084c27d86e51f3732c541be161d77a24e28f23b6f2/acme-4.0.0.tar.gz" + sha256 "972d6e0b160000ae833aaa9619901896336e5dc7ca82003fa6ff465bafcbdf52" + end + + resource "certbot-apache" do + url "https://files.pythonhosted.org/packages/0a/93/6136841f9550fcfa7d7fee47854e359fc906e12446617b31c277c3e02dfc/certbot_apache-4.0.0.tar.gz" + sha256 "507f9a336bd95c25548f449d8307eead6f875186a13049de173d6833371910a2" + end + + resource "certbot-nginx" do + url "https://files.pythonhosted.org/packages/06/a8/4ab3316ded812c91521c926ea3887ee6698cb656febd4e0f3ccc18dea64f/certbot_nginx-4.0.0.tar.gz" + sha256 "4478c3e13e04b49f95675d83adaacdcf1356f8fac0824e236f893f2f5a1d991c" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/70/8a/73f1008adfad01cb923255b924b1528727b8270e67cb4ef41eabdc7d783e/ConfigArgParse-1.7.tar.gz" + sha256 "e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1" + 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/a9/29/e7c14150f200c5cd49d1a71b413f61b97406f57872ad693857982c0869c9/josepy-2.0.0.tar.gz" + sha256 "e7d7acd2fe77435cda76092abe4950bb47b597243a8fb733088615fa6de9ec40" + 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/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + end + + resource "pyrfc3339" do + url "https://files.pythonhosted.org/packages/f0/d2/6587e8ec3951cbd97c56333d11e0f8a3a4cb64c0d6ed101882b7b31c431f/pyrfc3339-2.0.1.tar.gz" + sha256 "e47843379ea35c1296c3b6c67a948a1a490ae0584edfcbdea0eaffb5dd29960b" + end + + resource "python-augeas" do + url "https://files.pythonhosted.org/packages/af/cc/5064a3c25721cd863e6982b87f10fdd91d8bcc62b6f7f36f5231f20d6376/python-augeas-1.1.0.tar.gz" + sha256 "5194a49e86b40ffc57055f73d833f87e39dce6fce934683e7d0d5bbb8eff3b8c" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + if build.head? + head_packages = %w[acme certbot certbot-apache certbot-nginx] + venv = virtualenv_create(libexec, "python3.13") + 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..03fec0efe0593 --- /dev/null +++ b/Formula/c/certgraph.rb @@ -0,0 +1,34 @@ +class Certgraph < Formula + desc "Crawl the graph of certificate Alternate Names" + homepage "https://lanrat.github.io/certgraph/" + url "https://github.com/lanrat/certgraph/archive/refs/tags/20220513.tar.gz" + sha256 "739c7a7d29de354814a8799d6c5ce4ba2236aee16ab7be980203bc7780769b47" + license "GPL-2.0-or-later" + head "https://github.com/lanrat/certgraph.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bb875c3150d6b112b81aa2e8fdec0393f8d1c62a052ccd53b4349550559307c0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "87984362d6fa214b3adad55d4ee28ecf6f102e5fc3dc62f0f85b186210824518" + sha256 cellar: :any_skip_relocation, arm64_ventura: "303c6039381a5d9dfe1865103a5242c8ce6260a9391d02238c1a52051707538e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f7b5fee234dd83f986f53ea5a8491b82fa6a7eeaa9d2f598e26aef1023395c99" + sha256 cellar: :any_skip_relocation, sonoma: "36aa352a0a7ae8f8abaaa9507371211218cb4d81762a063e31502fae2f50444f" + sha256 cellar: :any_skip_relocation, ventura: "50ffe0bc271d347b26e0fbabe4ce36403c50a275eb020254940db32557d26c88" + sha256 cellar: :any_skip_relocation, monterey: "4d76930426da0cadfd8bef3e8e60c26ab291dd5aa83512fe336f7461d6ffb3bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9651e81f791eeeedca90abb0cb4330fd8a22b77a1649e143d665071c7916d6ca" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.gitDate=#{Time.now.iso8601} -X main.gitHash=#{version}" + system "go", "build", *std_go_args(ldflags:) + 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..b29c0bf82d9b2 --- /dev/null +++ b/Formula/c/certifi.rb @@ -0,0 +1,45 @@ +class Certifi < Formula + desc "Mozilla CA bundle for Python" + homepage "https://github.com/certifi/python-certifi" + url "https://files.pythonhosted.org/packages/e8/9e/c05b3920a3b7d20d3d3310465f50348e5b3694f4f88c6daf736eef3024c4/certifi-2025.4.26.tar.gz" + sha256 "0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "dcfa5f1e36c7a81a60eed0accdde0afe0f37be1af5021a2aa4493735d78a6d40" + end + + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + depends_on "ca-certificates" + + def pythons + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("python@") } + end + + def install + # Avoid difference in generated METADATA files across bottles + inreplace "README.rst", "/usr/local", HOMEBREW_PREFIX + + pythons.each do |python| + 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 = Language::Python.site_packages("python#{python.version.major_minor}") + rm prefix/site_packages/"certifi/cacert.pem" + (prefix/site_packages/"certifi").install_symlink Formula["ca-certificates"].pkgetc/"cert.pem" => "cacert.pem" + end + + # Revert first inreplace to avoid difference in README.rst across bottles + inreplace "README.rst", HOMEBREW_PREFIX, "/usr/local" + 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..35a19d83cddc3 --- /dev/null +++ b/Formula/c/certigo.rb @@ -0,0 +1,62 @@ +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.16.0.tar.gz" + sha256 "a6ce89964ca2fbe7d45d2e2019b06a21984f133c4f1f110eee12a67dd60c4145" + 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_sequoia: "bedd60c233d5c81a9a6b79cd90d02570948d21d65e81bfbf356a0d49d4767467" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b5b86dcb9c261113bc75c507822f26c1774ee29a16886471ffc72121218ff20" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7030162d50a9cc7a151ef7e5bb30c6ec6de9717c5ed71c56fc207548334142a0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a663a86882876335dfd364332494270957a0b6778975aa0f9e8ba2fd83f8aa52" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8c632fa6622d2cd6f5899c3f1682f6646803e9d33efb56b4bc39417d09b55a72" + sha256 cellar: :any_skip_relocation, sonoma: "99c723ecb99e039fbf7c3146e5c19a9271a405c76f2b8d7d00868e1dc0d79677" + sha256 cellar: :any_skip_relocation, ventura: "30402885e7dd0a6a968f324ad7da21682b494977c18f8d0ee8ae10fe3b8c471d" + sha256 cellar: :any_skip_relocation, monterey: "f923b26c0f5b4115434a770994e0c791d192a482121840bf82323ae14b1627d5" + sha256 cellar: :any_skip_relocation, big_sur: "a69ecd639ae8ae13f627bfb182a1fc29467b6ca58b917863d5d01d09731f98ff" + sha256 cellar: :any_skip_relocation, catalina: "e3f412c147bc0a3b42167d3b0c349b4d6bd175bb4a89fe4603cb68400630c471" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10522c5a7fcd8524a1a0ce6755c2ffba1a6e76e63249f77d24326400c9ddc243" + 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..562cca58d77fe --- /dev/null +++ b/Formula/c/certstrap.rb @@ -0,0 +1,38 @@ +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 + + bottle do + 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, 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..6286e829bb53a --- /dev/null +++ b/Formula/c/certsync.rb @@ -0,0 +1,193 @@ +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" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d38c1280c4ffa266263cf6dea0afd81658364172868df8fb342242f9438547c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c0fa23ebc0fc9d92c3583dce167b6620c4560a2c86730debb0d4a69fae60a1d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e294b4d99fd96c068963d13c0d66891f408c7e10df4a80a2027423338ce14e7f" + sha256 cellar: :any_skip_relocation, sonoma: "a2224c46485fc6adec9af07d0170d04185ad3d9cc26a721b3fab445659041007" + sha256 cellar: :any_skip_relocation, ventura: "9d797e826af6d62ae8218f879def10660e59c7edf7083829badcf730694225c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa4cd398386f2229ff3b14e4ed8c6a81d2b242dfa7acb450f2ddabb4b3cf9a08" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45804c56f0f9901374f4b4a545706524aa0d0966c003526eba836c4e3f26a169" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + uses_from_macos "libffi" + + 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/1e/57/a6a1721eff09598fb01f3c7cda070c1b6a0f12d63c83236edf79a440abcc/blinker-1.8.2.tar.gz" + sha256 "8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83" + 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 "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 "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + 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/41/e1/d104c83026f8d35dfd2c261df7d64738341067526406b40190bc063e829a/flask-3.0.3.tar.gz" + sha256 "ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842" + end + + resource "future" do + url "https://files.pythonhosted.org/packages/a7/b2/4140c69c6a66432916b26158687e821ba631a4c9273c474343badf84d3ba/future-1.0.0.tar.gz" + sha256 "bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz" + sha256 "4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369" + 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/ac/7c/16f9d8a257bd82de90bd5963556a9a17f8105596f181dee5777437ef8900/ldapdomaindump-0.9.4.tar.gz" + sha256 "99dcda17050a96549966e53bc89e71da670094d53d9542b3b0d0197d035e6f52" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b4/d2/38ff920762f2247c3af5cbbbbc40756f575d9692d381d7c520f45deb9b8f/markupsafe-3.0.1.tar.gz" + sha256 "3e683ee4f5d0fa2dde4db77ed8dd8a876686e3fc417655c2ece9a90576905344" + 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 "pycparser" do + url "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/13/52/13b9db4a913eee948152a079fe58d035bd3d1a519584155da8e786f767e6/pycryptodome-3.21.0.tar.gz" + sha256 "f7787e0d469bdae763b876174cf2e6c0f7be79808af26b1da96f1a64bcf47297" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/11/dc/e66551683ade663b5f07d7b3bc46434bf703491dbd22ee12d1f979ca828f/pycryptodomex-3.21.0.tar.gz" + sha256 "222d0bd05381dd25c32dd6065c071ebf084212ab79bab4599ba9e6a3e0009e6c" + 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/46/f5/1f938a781742d18475ac43a101ec8a9499e1655da0984e08b59e20012c04/pyspnego-0.11.1.tar.gz" + sha256 "e92ed8b0a62765b9d6abbb86a48cf871228ddb97678598dc01c9c39a626823f6" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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 "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/58/83/6ba9844a41128c62e810fddddd72473201f3eacde02046066142a2d96cc5/tqdm-4.66.5.tar.gz" + sha256 "e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad" + end + + # pypi artifact request, https://github.com/skelsec/unicrypto/issues/7 + resource "unicrypto" do + url "https://github.com/skelsec/unicrypto/archive/refs/tags/0.0.10.tar.gz" + sha256 "3daefcdf8e71f9300032393ad85d7f22fc08d07dc05cf7776019b9480bd8506a" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/0f/e2/6dbcaab07560909ff8f654d3a2e5a60552d937c909455211b1b36d7101dc/werkzeug-3.0.4.tar.gz" + sha256 "34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306" + 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..d774619511c1a --- /dev/null +++ b/Formula/c/cf-terraforming.rb @@ -0,0 +1,33 @@ +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.23.3.tar.gz" + sha256 "a60037470a637b7bb81e5b345a182d8907aafdbf8ab7836d8817b5e2e6496228" + license "MPL-2.0" + head "https://github.com/cloudflare/cf-terraforming.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8b864912ec138ee9ef2ae649ef429a9fa0130ecba6fa19916bf6354e1154c847" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b864912ec138ee9ef2ae649ef429a9fa0130ecba6fa19916bf6354e1154c847" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b864912ec138ee9ef2ae649ef429a9fa0130ecba6fa19916bf6354e1154c847" + sha256 cellar: :any_skip_relocation, sonoma: "98e33f9481a4d829903e8ca9599a386d156783e78b23d6a7389ca6f4a08e536f" + sha256 cellar: :any_skip_relocation, ventura: "98e33f9481a4d829903e8ca9599a386d156783e78b23d6a7389ca6f4a08e536f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8d0585cbbfd30b0f028b16611fccb5d3fcc741fe88a37c6618dd2fa8db9fb7e" + 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..efbf36881a75e --- /dev/null +++ b/Formula/c/cf.rb @@ -0,0 +1,39 @@ +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_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..568280118103c --- /dev/null +++ b/Formula/c/cf2tf.rb @@ -0,0 +1,147 @@ +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" + head "https://github.com/DontShaveTheYak/cf2tf.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "9484c90240dd27b16aaa154443d3f9004fd6cf3c5f0f90d1bd9bafeb1d0e8a3e" + sha256 cellar: :any, arm64_sonoma: "96c44f6db8e583cada2c0eb0f4f633768701febb1963cef35d95fc01dbcae232" + sha256 cellar: :any, arm64_ventura: "2443965de239f1418ee045b96292132b9f8db08d7e43bdae45dfbe34914ee111" + sha256 cellar: :any, sonoma: "a47edb766183a195086eb42c08a9e430138a94dde90a85676f238b95e7cb2e33" + sha256 cellar: :any, ventura: "95781872e0f5985c51cf6f83aea2838e6a3e0f6ff296fec2ecd446b8bea9c75f" + sha256 cellar: :any_skip_relocation, arm64_linux: "3139a1bcc40d3c0126f344447499af8a4f1c23f3b28138ee170fb7887151f057" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ade866bb2254c75d5cace101298f1b7480b1d5c19933f648fa3dd9644badefc9" + end + + depends_on "cmake" => :build + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/c0/89/37df0b71473153574a5cdef8f242de422a0f5d26d7a9e231e6f169b4ad14/gitpython-3.1.44.tar.gz" + sha256 "c87e30b26253bf5418b01b0660f818967f3c503193838337fe5e573331249269" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/ae/3c/c9d525a414d506893f0cd8a8d0de7706446213181570cdbd766691164e40/pytest-8.3.5.tar.gz" + sha256 "f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "rapidfuzz" do + url "https://files.pythonhosted.org/packages/ed/f6/6895abc3a3d056b9698da3199b04c0e56226d530ae44a470edabf8b664f0/rapidfuzz-3.13.0.tar.gz" + sha256 "d2eaf3839e52cbcc0accbe9817a67b4b0fcf70aaeb229cfddc1c28061f9ce5d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cf2tf", shells: [:fish, :zsh], 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..545b04bc4d7b4 --- /dev/null +++ b/Formula/c/cfengine.rb @@ -0,0 +1,84 @@ +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.25.0.tar.gz" + sha256 "5d43f7e75f6197b6cee305bee27b9a41af80a2a17416dbd3b04c538898b88b83" + 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_sequoia: "93ebb9d05d50ee73b9a596c732d93810734155ea7f5889ed6bec14a6cf9bd158" + sha256 arm64_sonoma: "9f6fab1d37d4dcc579c085b85a62aae9fa6f0ace3492ad3457213db9aaa2c326" + sha256 arm64_ventura: "515f6ff9b8088c289c9884b222fed773e859c001da5b246848156abd80955682" + sha256 sonoma: "3a5f4caf4491c5d7bd9b52a741a668159bac45b2e305a3bce1715f093c2b1848" + sha256 ventura: "3a50ed243032041f7104fb32a151e9e2a1111df187bb6f3f2c9c07ef5e718a7f" + sha256 arm64_linux: "05bc03b878665ed9b7438ff23945518a1e4521ffe05509de5f04e29e274b8c9f" + sha256 x86_64_linux: "51c514abe7c902c1acfb373e3dd028d1786c8877f2b20d77b13618571c117de8" + 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.25.0.tar.gz" + sha256 "bbc69bb2d9924feaaeac19ccc1b280a92f010a011b5925ade0357b96ce0074d9" + + 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..656971f952903 --- /dev/null +++ b/Formula/c/cffi.rb @@ -0,0 +1,63 @@ +class Cffi < Formula + desc "C Foreign Function Interface for Python" + homepage "https://cffi.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz" + sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "908333c6c31b4da4876ccb707cdf2b1ec52aee3d83fc3c4a1b8b52f148883512" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7818f620936fb017c68eb02c8985dfecd297349b97e67550d4915cef440dd2fe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b143786bb8ede8b8ad7230b6be8c004f276dacccbd4647a3f169099a536fd3a6" + sha256 cellar: :any_skip_relocation, sonoma: "8e1c24e4e78f041f98e0394a6a07ef560ea84d980f0f3c3dd3ea7fb6c3f91aa4" + sha256 cellar: :any_skip_relocation, ventura: "7c8eea38ba0103ddbb0243d0ed9f74a79875f1f0dfe9d8421f3e2f45dca69da5" + sha256 arm64_linux: "8001ef146f7ab75ab198ec20c59f6383ecf439feb687c76b8ee5f3279a00c30f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a49b146e624fa887497252f89c76d8e7cfcdc4d9a4ec444a5b8db856324198cf" + end + + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + depends_on "pycparser" + + uses_from_macos "libffi" + + 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..803fdaf49ded8 --- /dev/null +++ b/Formula/c/cfitsio.rb @@ -0,0 +1,59 @@ +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.2.tar.gz" + sha256 "66fd078cc0bea896b0d44b120d46d6805421a5361d3a5ad84d9f397b1b5de2cb" + license "CFITSIO" + + livecheck do + url :homepage + regex(/href=.*?cfitsio[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5211e3ed2c5d20c27a80a1a60392a0a40ba1124795fcb9a8969dbfc536bf75cc" + sha256 cellar: :any, arm64_sonoma: "99f6c0c152eed90cfc797714394de1428abc1e5bc056699bc9f227124fe537e1" + sha256 cellar: :any, arm64_ventura: "8b92cc30cc355bb0522c74bd91481fedb21e31867812475e867fcb704b1336f6" + sha256 cellar: :any, sonoma: "95f8da6e88ef0f411fd4f0769e0ac1651a98760d02ea70e8f3e5df97c2f645e9" + sha256 cellar: :any, ventura: "65fb50a8957f974a68ced585b4742f42bc7684d80035499362571d425ccc6edd" + sha256 cellar: :any_skip_relocation, arm64_linux: "f9cfb371e8d8f3a17bbed2f50db40636c85bc22012725cd8f9a680474fba16e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5028bfb3c616cfec720d946007f9fe30f0284ad7b348800acb7d8cb9d516cffb" + 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 + ] + 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..15aaf9ccec6b8 --- /dev/null +++ b/Formula/c/cflow.rb @@ -0,0 +1,72 @@ +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.7.tar.bz2" + mirror "https://ftpmirror.gnu.org/cflow/cflow-1.7.tar.bz2" + sha256 "d01146caf9001e266133417c2a8258a64b5fc16fcb082a14f6528204d0c97086" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "751d7b1a86af9855a051cffe36b2569ce962146f5f56c09529ea4276140fa500" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f30589e4b49dc5e2bfa37e58a614977d6ac4f8afb11615e4e2a6ad3b9519705e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0b089cc4f286019f77084983af011c3776db86c9abc400e6b9d3415667809bea" + sha256 cellar: :any_skip_relocation, arm64_monterey: "775aa08b6d73ae6aa6eaeef7e1b187acc8b78daf87c7be6771914213d3907b4d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c243b38883f723c09ea4ebadc5cca19ede2f3210fd75379f4636fa7320fb0e0e" + sha256 cellar: :any_skip_relocation, sonoma: "87d787c9e87c647c9c6f87886fd6411ee5b6c38760309d3f66f53d9bf2e43679" + sha256 cellar: :any_skip_relocation, ventura: "b684918ee8c5640d80e51cfce6f9b7c5dcf787f573350197a62ab877fbd92005" + sha256 cellar: :any_skip_relocation, monterey: "3631370161b2fe088572eb63e1653c9d591184870cbf5e6ec31187f919082cd8" + sha256 cellar: :any_skip_relocation, big_sur: "ca4cbcfa33c53ff166dced09c73683076a112b6053ae4667abf3f97fd0aaf1be" + sha256 cellar: :any_skip_relocation, catalina: "aa461817268ac09391a88903ab13a8a13852c943a4d38dfe5342c202f1daf5d6" + sha256 arm64_linux: "41446ba1bebd0eeb2af0c59c4d65b81622049296e6b43bfcab0ee02ed26eb06f" + sha256 x86_64_linux: "62e41fe118da0de3ee5bbf3a85273d53aec1ada3b389f2e4b7876f4aa9f9ee0a" + 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 <<~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..74f50313e4fd6 --- /dev/null +++ b/Formula/c/cfn-flip.rb @@ -0,0 +1,72 @@ +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 2 + sha256 cellar: :any, arm64_sequoia: "07d7a01e5e4b2cf04a12cf05b6255c452326347afc72cf22c755f11eee638fac" + sha256 cellar: :any, arm64_sonoma: "a30142eaa1b55eacf35e1c2573e38e516779882086ddb7c417e7bee97e556f5c" + sha256 cellar: :any, arm64_ventura: "21a22fd0985168ca5c0ac5836ca4a85928d159833fdd4e75553e9295b8e74514" + sha256 cellar: :any, sonoma: "c1497cca44686eab9b0031d34deab63258a1d891c7f8854e39558c7c60f01f96" + sha256 cellar: :any, ventura: "92e08c7a0fb66b3c691bf141fac782213907d85989945519e1dc1aa55bb686a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "b828fc938febf9080fe045b0d8d185c3286172b5ee8b664604f2a7e992ad2e48" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a009e9b1951f2f55ff9891c6e3366a2a66a2599f211f75ee420274f7b1ed811" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cfn-flip", shells: [:fish, :zsh], 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..804b2dd9123bd --- /dev/null +++ b/Formula/c/cfn-format.rb @@ -0,0 +1,36 @@ +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.0.tar.gz" + sha256 "820724a0cde1066345982b81b42921af86906966d0e51151ed24a6e3c1f08740" + 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_sequoia: "bb031518510da595fc6b288c746f5bdd0a596165263ec1a31fc6d6c32af06e4c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb031518510da595fc6b288c746f5bdd0a596165263ec1a31fc6d6c32af06e4c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bb031518510da595fc6b288c746f5bdd0a596165263ec1a31fc6d6c32af06e4c" + sha256 cellar: :any_skip_relocation, sonoma: "4cb0a1b65f14bde6c80049d1199e42595cc7048a2d0c56952c157ece444ec2ee" + sha256 cellar: :any_skip_relocation, ventura: "4cb0a1b65f14bde6c80049d1199e42595cc7048a2d0c56952c157ece444ec2ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef702e496fa4266fa1128612eb4ba705fb92dee528462993a9fcf9d044cb603e" + 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..c2d0ccb40580a --- /dev/null +++ b/Formula/c/cfn-lint.rb @@ -0,0 +1,171 @@ +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/e5/11/d52bf891ec937b75a640996d84ba34abf55a59c80857968ccc5b51491957/cfn_lint-1.35.1.tar.gz" + sha256 "0a564819088c95ba88c5dca23ba1fb3c6cdb86b2f6a40219f1abf2134c5b47d7" + license "MIT-0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9b7e1fe164de4647b1bcac6785a8fb460a19376f4134fd759c11e3173672eb30" + sha256 cellar: :any, arm64_sonoma: "3438786655e8c0a651ae865e9534f0f81b3fdcbaf973dc0ba45931038976398e" + sha256 cellar: :any, arm64_ventura: "ea32a3ee21feeb4c5a4d1ad4736f1eb33fa9f7f1242f6775a3181b9b93f6b05e" + sha256 cellar: :any, sonoma: "db5a9d505b5d9fe358dba805ec621e87ae6db0b59df029a9d2137aef2b00ad9d" + sha256 cellar: :any, ventura: "9195bb7d4b53908e82cd2b4aaa2fa5debcd338ffa7049b3f6e160fd360579f4b" + sha256 cellar: :any_skip_relocation, arm64_linux: "e89a35b9eb20b3c9bfcb28767697614703d8450c084fcd3a17eeb9e7bcb02615" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ddc9e3ccd167f28194fc8f54f98affd7bd8dc8041e058b4192d973b2515972f" + end + + depends_on "rust" => :build + depends_on "libyaml" + depends_on "python@3.13" + + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "aws-sam-translator" do + url "https://files.pythonhosted.org/packages/13/01/3a9a3fea6ed942239f22c4fa9b3cd9d8b69545607f257fbb47d28d115dde/aws_sam_translator-1.97.0.tar.gz" + sha256 "6f7ec94de0a9b220dd1f1a0bf7e2df95dd44a85592301ee830744da2f209b7e6" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/c8/73/14f9b57b764d9a8d998a4127bdc1f35adfb9d625f0cbe8814eb0d6bd6ff2/boto3-1.38.12.tar.gz" + sha256 "ca06315fdb20821fc1084a7b08557556eed97cb917a30ff19d8524b495383889" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/41/5a/37274d8510d4ad86bc8349e716d62c6b95c20e48403de3b34bc53cd7708c/botocore-1.38.12.tar.gz" + sha256 "86c459de3e39b418f4eb81e88c23fba02995496141db73816e7f65cb8b04408b" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + 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 "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/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz" + sha256 "307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "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 "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/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/fc/9e/73b14aed38ee1f62cd30ab93cd0072dec7fb01f3033d116875ae3e7b8b44/s3transfer-0.12.0.tar.gz" + sha256 "8ac58bc1989a3fdb7c7f3ee0918a66b160d038a147c7b5db1500930a607e9a1c" + 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-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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..56b2047dbf42b --- /dev/null +++ b/Formula/c/cfnctl.rb @@ -0,0 +1,40 @@ +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_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, 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..9ce5209b4e535 --- /dev/null +++ b/Formula/c/cfonts.rb @@ -0,0 +1,50 @@ +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.2.0rust.tar.gz" + sha256 "8337423201558b43ae48e0749058a58623700cfb777288f3a520dcdb0d723a6f" + 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_sequoia: "0820bec21514d04c1f5195a1cd072eb0bebde76762c6684938610253886122dd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "378d7e5f0548372945a13f72f2caf4deafbf2a27bfb3d9b8f26bcc01bde8d52f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7844d07086770b7ff3d8103dfe7c150370b857cf3dcee5d6812fc34bdb350b4a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5a2d0be69dedd298b3217ca427c0dc2c429a911a82f847e4e37da811a0f20d43" + sha256 cellar: :any_skip_relocation, sonoma: "270fc6508128e7972125b2342f1b0da0d7d9af02dced036b4033b734aea0711a" + sha256 cellar: :any_skip_relocation, ventura: "3ac4832acea4e04ab4cf44fe47c07cbbadc961caef1320bbf5783e98b3be14da" + sha256 cellar: :any_skip_relocation, monterey: "a64c35cd812bb2118c8cb47a6f5c47b3fd0ccaf1cd26e7603feb7f050da0b260" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d35bfc15fdc33a29ba0f4f1c095addba0cb466bc28e0c494260409d23e8622c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4324fb2da4a6d701d32cf3ed3c2bda2e9e9508f17443edfd5252f55516e48325" + 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..1d236290cb7f0 --- /dev/null +++ b/Formula/c/cfr-decompiler.rb @@ -0,0 +1,84 @@ +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_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..40c7e5b635271 --- /dev/null +++ b/Formula/c/cfripper.rb @@ -0,0 +1,154 @@ +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/5b/5f/a6b15acb08f9c9d95786c5c38e5f8421027cf8ec6f0ce49c4765f7013c69/cfripper-1.17.2.tar.gz" + sha256 "cc46bede7651eaac793e022065ff7dad7676e940184e245d81c40424657fde7a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b6315e804b913dde40a39f1457bccab096ffe93c3b306ab8441e5025b8478026" + sha256 cellar: :any, arm64_sonoma: "8d13f9f5c5ce466ab9ddc4a4b8ec5856c5f26c6aa04441657ffd723d142cdcc8" + sha256 cellar: :any, arm64_ventura: "32d1aac0572458428097ce30330d030f60d8963c16c4176aff29bae57142e15d" + sha256 cellar: :any, sonoma: "9272f2be2b198dd61f4218df52ac6f5c5fcc32548a0becbba8a728ac9496d3ba" + sha256 cellar: :any, ventura: "1309b356f3523067219f5217dcc88a4d0f33042fa27adc1c0425497334b81fee" + sha256 cellar: :any_skip_relocation, arm64_linux: "89f2d638ff2cc3a84af7c8ad91ad66ecaa99e661ae47a4993185a5be477391ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13edb3cc6a89ad2e5f56b8b33d2b85d931b451b03bbc6c3cc5c7ea19f41bf169" + end + + depends_on "rust" => :build # for pydantic_core + depends_on "libyaml" + depends_on "python@3.13" + + 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/e2/b5/f2cdcc4f909bd4a3b545571da9e7faa69a7ecc54bc5cc103f39dac53d115/boto3-1.38.15.tar.gz" + sha256 "dca60f7a3ead91c05cf471f7750e54d63b92bfc0e61fa122e2e3f5140e020a8d" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/00/35/0591b8cda1af4f308a0c073b838b02618547ae306504dc5a165a0ee88fd8/botocore-1.38.15.tar.gz" + sha256 "6adb3b1b0739153d5dc9758e5e06f7596290999c07ed8f9167ca62a1f97c6592" + 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/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + 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/f8/04/7a8542bed4b16a65c2714bf76cf5a0b026157da7f75e87cc88774aa10b14/pluggy-0.13.1.tar.gz" + sha256 "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0" + end + + resource "pycfmodel" do + url "https://files.pythonhosted.org/packages/fc/7f/bb9775014e12f8b77a6671945534e31a1f1984eaedfe6d94ce224cb28a9a/pycfmodel-1.1.0.tar.gz" + sha256 "cdf83900ea5f7d3082c42defbae0f88b5317bfa96c8cd6414b96111b0e5e633f" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/fc/9e/73b14aed38ee1f62cd30ab93cd0072dec7fb01f3033d116875ae3e7b8b44/s3transfer-0.12.0.tar.gz" + sha256 "8ac58bc1989a3fdb7c7f3ee0918a66b160d038a147c7b5db1500930a607e9a1c" + 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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cfripper", shells: [:fish, :zsh], 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..dc8c76ef21544 --- /dev/null +++ b/Formula/c/cfssl.rb @@ -0,0 +1,68 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e8989411cf61dac106b1fc275da274f0c07b58c16ce08f0fd194835679f495bd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d2805f5ff4362d940159c5578dcf8eb8fdcd102a99f92b6a795c8c47f706967" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d9b9efc3ba89015abe77d10049ef07445204a054d5e7c18ebed89eb210b137af" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4b6e5105534c9c4c2e3da0319af682127c9f77e63f929e157d59c2e97a946fd9" + sha256 cellar: :any_skip_relocation, sonoma: "989ba2b7f104eacbca8168890d255b59918ca2e3247a19aaf721c2835de34b38" + sha256 cellar: :any_skip_relocation, ventura: "ec170c030c163a3bee7b0f136fd22f043d93a74917c1acd29d68a5fae228a1fd" + sha256 cellar: :any_skip_relocation, monterey: "a25c632a1fe68e2afb9a2ac8cb38fbadf026f2ff15c190a7941d8c02d962d5cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bde98d987b9a50e4fc9f2fd32a4f85dadcea1bd1b94fa792e0554fae1c183c5b" + end + + depends_on "go" => :build + depends_on "libtool" + + def install + ldflags = "-s -w -X github.com/cloudflare/cfssl/cli/version.version=#{version}" + + system "go", "build", *std_go_args(ldflags:, output: bin/"cfssl"), "./cmd/cfssl" + system "go", "build", *std_go_args(ldflags:, output: bin/"cfssljson"), "./cmd/cfssljson" + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"mkbundle"), "./cmd/mkbundle" + 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 + 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 + 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/c/cfv.rb b/Formula/c/cfv.rb new file mode 100644 index 0000000000000..ff4166b251a44 --- /dev/null +++ b/Formula/c/cfv.rb @@ -0,0 +1,36 @@ +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/29/ca/91cca3d1799d0e74b672e30c41f82a8135fe8d5baf7e6a8af2fdea282449/cfv-3.1.0.tar.gz" + sha256 "8f352fe4e99837720face2a339ac793f348dd967bacf2a0ff0f5e771340261e3" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4364889501244abb0dec42000034cbb135f74ed15f6bdd7ac2ad21e580297997" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4364889501244abb0dec42000034cbb135f74ed15f6bdd7ac2ad21e580297997" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4364889501244abb0dec42000034cbb135f74ed15f6bdd7ac2ad21e580297997" + sha256 cellar: :any_skip_relocation, sonoma: "b166757b27f5ba3c246536507dee3c460909e17a5329a897c9280ee81f424d66" + sha256 cellar: :any_skip_relocation, ventura: "b166757b27f5ba3c246536507dee3c460909e17a5329a897c9280ee81f424d66" + sha256 cellar: :any_skip_relocation, arm64_linux: "67503e1767bc34de8448c8dc3468a483a7e6a1f9bff13768b08ff3cdc46c86b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4364889501244abb0dec42000034cbb135f74ed15f6bdd7ac2ad21e580297997" + end + + depends_on "python@3.13" + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test/test.txt").write "Homebrew!" + + cd "test" do + 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..fa9f57992ca65 --- /dev/null +++ b/Formula/c/cgal.rb @@ -0,0 +1,96 @@ +class Cgal < Formula + desc "Computational Geometry Algorithms Library" + homepage "https://www.cgal.org/" + url "https://github.com/CGAL/cgal/releases/download/v6.0.1/CGAL-6.0.1.tar.xz" + sha256 "0acdfbf317c556630dd526f3253780f29b6ec9713ee92903e81b5c93c0f59b7f" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f423b392b99b69eff16bdad8309eebfa1e01ef6e569c6c2b50fd20e2fafeab7d" + end + + depends_on "cmake" => [:build, :test] + depends_on "qt" => :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" + + # Ensure that the various `Find*` modules look in HOMEBREW_PREFIX. + # This also helps guarantee uniform bottles. + inreplace_files = %w[ + CGAL_Common.cmake + FindESBTL.cmake + FindGLPK.cmake + FindIPE.cmake + FindLASLIB.cmake + FindMKL.cmake + FindOSQP.cmake + FindSuiteSparse.cmake + ] + inreplace inreplace_files.map { |file| lib/"cmake/CGAL"/file }, "/usr/local", HOMEBREW_PREFIX + + # 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 and 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.1...3.15) + find_package(CGAL COMPONENTS Qt6) + add_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS) + include_directories(surprise BEFORE SYSTEM #{Formula["qt"].opt_include}) + add_executable(surprise surprise.cpp) + target_include_directories(surprise BEFORE PUBLIC #{Formula["qt"].opt_include}) + target_link_libraries(surprise PUBLIC CGAL::CGAL_Qt6) + CMAKE + system "cmake", "-L", "-DQt6_DIR=#{Formula["qt"].opt_lib}/cmake/Qt6", + "-DCMAKE_PREFIX_PATH=#{Formula["qt"].opt_lib}", + "-DCMAKE_BUILD_RPATH=#{HOMEBREW_PREFIX}/lib", "-DCMAKE_PREFIX_PATH=#{prefix}", "." + system "cmake", "--build", ".", "-v" + assert_equal "15\n15", shell_output("./surprise").chomp + end +end diff --git a/Formula/c/cgdb.rb b/Formula/c/cgdb.rb new file mode 100644 index 0000000000000..032903f162d83 --- /dev/null +++ b/Formula/c/cgdb.rb @@ -0,0 +1,74 @@ +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 + + bottle do + 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..70d5217727faf --- /dev/null +++ b/Formula/c/cgif.rb @@ -0,0 +1,42 @@ +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_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..3c72369869eb8 --- /dev/null +++ b/Formula/c/cgit.rb @@ -0,0 +1,75 @@ +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 + + bottle do + 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/formula-patches/5decb544ec505d0868ef79f03707fafb0e85e47c/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..4b5c523ec6a17 --- /dev/null +++ b/Formula/c/cgl.rb @@ -0,0 +1,56 @@ +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_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..8832921d6a1d9 --- /dev/null +++ b/Formula/c/cglm.rb @@ -0,0 +1,47 @@ +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_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..25a9fa96fc1bd --- /dev/null +++ b/Formula/c/cgns.rb @@ -0,0 +1,63 @@ +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_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..93db4f3135f3f --- /dev/null +++ b/Formula/c/cgoban.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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, mojave: "65a58482e8da31098a71ed49467b069bff5a6172df8304bb1bccd579301abca2" + sha256 cellar: :any, high_sierra: "4fc05de2c69a98f7c1dbd55303a508ac50e6bb3a3b6297ebd43ec4bf5a79c14d" + 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..9e6ef8dcf4b4b --- /dev/null +++ b/Formula/c/cgrep.rb @@ -0,0 +1,66 @@ +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.1.2.tar.gz" + sha256 "1b705013a432e6ea90247f03e4cfeceb5a37f795d879178e4bf0085ce6191316" + license "GPL-2.0-or-later" + head "https://github.com/awgn/cgrep.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "14884acd8a23ddf400ccaa633088d6b49f9e19a3c672f17df7063b153a89dfa2" + sha256 cellar: :any, arm64_sonoma: "7d9998fa1119f6dbada06ff9e7a544ba62a0e55dd455f637beb5463c86ed8080" + sha256 cellar: :any, arm64_ventura: "620fc98eb3a8596902a0632b542940779bbed8225a9bf68e5dd9372d38f6cc8c" + sha256 cellar: :any, arm64_monterey: "c1ede6c9dcc6b50b2d10b3d4f5e86dc51866be430c63ec606fa9128b1f212e03" + sha256 cellar: :any, sonoma: "1a60833abff334e0d92f43dfe74a5a4b3d745bf755d4335feb56d40305c1242e" + sha256 cellar: :any, ventura: "354598dcb310983dda7c625c91f2f9b532cd31a1f92b82071572abbae078dd59" + sha256 cellar: :any, monterey: "fcc050e01c4883a5c11197faf5ca543ed7af19be66ffb0dbfa0130d10467508f" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a2bf84dfda4c56160e518799f9697229c85b0c89bf7eeec50fbd9976b07d8cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "329810d6cd7634ba9d6ceb65dc15bcb8b6771f52862a6dd574b901cc963b6368" + 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 + + 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 diff --git a/Formula/c/cgvg.rb b/Formula/c/cgvg.rb new file mode 100644 index 0000000000000..4184c49baea08 --- /dev/null +++ b/Formula/c/cgvg.rb @@ -0,0 +1,27 @@ +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 + + 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/c/chadwick.rb b/Formula/c/chadwick.rb new file mode 100644 index 0000000000000..eb2623e6beb5f --- /dev/null +++ b/Formula/c/chadwick.rb @@ -0,0 +1,163 @@ +class Chadwick < Formula + desc "Tools for parsing Retrosheet MLB play-by-play files" + homepage "https://chadwick.sourceforge.net/doc/index.html" + url "https://downloads.sourceforge.net/project/chadwick/chadwick-0.7/chadwick-0.7.2/chadwick-0.7.2.tar.gz" + sha256 "f7b3af15281106e101e2ccc4cb182a3f15dbdc3327f2bcb045bfc486a8fda46e" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/chadwick[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "ea8f3deb32e7ade5b361904026269eab8b02b7fd47a85f68742949a28b33c9bb" + sha256 cellar: :any, arm64_sonoma: "855a048e94a4e914cede20351ea1984f9d70dbfeddcd8e91977c7258e3a320ce" + sha256 cellar: :any, arm64_ventura: "0686220c29d180a3aa51a536564ae3289dca57e26fc74b15076a7b00af5121dc" + sha256 cellar: :any, arm64_monterey: "38685dff8c84293981d24cb109e29e7daab5054c8b643e5d4f4345a6ca5b68ab" + sha256 cellar: :any, arm64_big_sur: "3feae6163c485d40c22f4dcbd0f2772245e8010e7beb4b9f9c399bd93d46f475" + sha256 cellar: :any, sonoma: "186b043a9bdda11c13c24427a4cf164037e065ee9e7820fc5f1c50f138ff1e5a" + sha256 cellar: :any, ventura: "d1038d6d2b346cd1569b3150c8fdef655d9fd8f26634481b7283b382fafc6273" + sha256 cellar: :any, monterey: "12a233aaf2854a5ab2d7561581465d51f014f9622e2231b5e3da98f4041937be" + sha256 cellar: :any, big_sur: "d03f388d1a56550fdc5b9832bf0a952c35a5b7d38f0661885c0dc4b7ee01d718" + sha256 cellar: :any, catalina: "693c6ee0980401936a83453bdbc398aeb0eb06ba9bb8e101046508b14edfdc98" + sha256 cellar: :any, mojave: "a068fd25b1e8b3d6f9a56a8a1d4ac18a49f07f82450b1ab3f3766b86fb0a362a" + sha256 cellar: :any, high_sierra: "427b5c0fca10b23b66c56bda3537080df2ba467edea59a9dfd2f0fba56f50f9b" + sha256 cellar: :any_skip_relocation, arm64_linux: "816b2b8f0ed7a14dc13048bb104ff9b13d2e03aff240fe35407e8ba51b08f098" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a384612258d503ddcdf39abc98c60e3cfdad289aaaad89169ee18f6f4e596639" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" + system "make" + system "make", "install" + end + + test do + date_d = 24 + date_m = 10 + date_y = 2000 + date_m_d_y = "#{date_m}/#{date_d}/#{date_y}" # chadwick's standard output + date_xml = "#{date_y}/#{date_m}/#{date_d}" # chadwick's xml output + 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" } + + # retrosheet "event file" name, chadwick's xml name?, our value + attr_map_info = [ + [:visteam, :visitor, attr[:visitor]], [:hometeam, :home, attr[:home]], + [:site, :site, "ATL02"], [:date, :date, date_xml], [:number, nil, "0"], + [:starttime, :start_time, "8:00PM"], [:daynight, :day_night, "night"], + [:umphome, :umpire_hp, "barkl901"], [:umphp, :umpire_hp, "barkl901"], + [:ump1b, :umpire_1b, "rippm901"], [:ump2b, :umpire_2b, "cedeg901"], + [:ump3b, :umpire_3b, "danlk901"], [:temp, :temperature, "60"], + [:winddir, :wind_direction, "ltor"], [:windspeed, :wind_speed, "8"], + [:timeofgame, :time_of_game, "187"], [:attendance, :attendance, "8"] + ] + + # 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_innings_cnt = exp_ing_ln_score.values[0].size + exp_tmplayers_cnt = 9 # expected player count for each team + + evn_file = testpath/"#{attr[:home]}#{date_y}.EVN" # retrosheet "event file" + evn_file.write "id,#{attr[:game_id]}\nversion,2\n" + + evn_file.open("a") do |f| # info,...,... + attr_map_info.each { |a, _, v| f.puts ["info", a, v].join(",") } + end + + evn_file.append_lines <<~EOS + start,youne003,"Eric Young",0,1,7\nstart,murpd006,"Daniel Murphy",0,2,4 + start,wrigd002,"David Wright",0,3,5\nstart,granc001,"Curtis Granderson",0,4,9 + start,dudal001,"Lucas Duda",0,5,3\nstart,lagaj001,"Juan Lagares",0,6,8 + start,darnt001,"Travis d'Arnaud",0,7,2\nstart,tejar001,"Ruben Tejada",0,8,6 + start,colob001,"Bartolo Colon",0,9,1\nstart,heywj001,"Jason Heyward",1,1,9 + start,uptob001,"B.J. Upton",1,2,8\nstart,freef001,"Freddie Freeman",1,3,3 + start,johnc003,"Chris Johnson",1,4,5\nstart,uptoj001,"Justin Upton",1,5,7 + start,uggld001,"Dan Uggla",1,6,4\nstart,gatte001,"Evan Gattis",1,7,2 + start,simma001,"Andrelton Simmons",1,8,6\nstart,haraa001,"Aaron Harang",1,9,1 + play,1,0,youne003,01,CX,S8/L\nplay,1,0,murpd006,22,C*BBS1FF1>FS,K + play,1,0,wrigd002,00,>B,SB2\nplay,1,0,wrigd002,31,>B.FBBX,63/G + play,1,0,granc001,11,*BCX,3/L\nplay,1,1,heywj001,22,BCFBC,K + play,1,1,uptob001,02,SST,K\nplay,1,1,freef001,01,FX,D8/L + play,1,1,johnc003,10,BX,9/F\nplay,2,0,dudal001,21,BBCX,2/P2F + play,2,0,lagaj001,32,BBSBSS,K\nplay,2,0,darnt001,12,BFCX,9/F + play,2,1,uptoj001,12,CCFBX,8/F\nplay,2,1,uggld001,32,TBFBBX,53/G + play,2,1,gatte001,01,CX,S9/G\nplay,2,1,simma001,02,CCX,9/F + play,3,0,tejar001,31,BBBCB,W\nplay,3,0,colob001,02,LLL,K/BF + play,3,0,youne003,30,B1BBB,W.1-2\nplay,3,0,murpd006,01,CX,9/F.2-3 + play,3,0,wrigd002,00,>C,SB2\nplay,3,0,wrigd002,22,>C.F*B*BB,WP.3-H;2-3 + play,3,0,wrigd002,32,>C.F*B*BB.X,8/F\nplay,3,1,haraa001,02,CSS,K + play,3,1,heywj001,31,BBBCX,7/F\nplay,3,1,uptob001,11,FBX,S7/G + play,3,1,freef001,20,111BB1X,3/L + EOS + + team_file = testpath/"TEAM#{date_y}" # retrosheet "team file" + team_file.write <<~EOS + #{attr[:home]},N,#{attr[:home_city]},#{attr[:home_name]} + #{attr[:visitor]},N,#{attr[:visitor_city]},#{attr[:visitor_name]} + EOS + + ros_file_h = testpath/"#{attr[:home]}#{date_y}.ROS" # retrosheet "roster" + ros_file_h.write <<~EOS + freef001,Freeman,Freddie,L,R,ATL,1B\ngatte001,Gattis,Evan,R,R,ATL,C + haraa001,Harang,Aaron,R,R,ATL,P\nheywj001,Heyward,Jason,L,L,ATL,OF + simma001,Simmons,Andrelton,R,R,ATL,SS\nuggld001,Uggla,Dan,R,R,ATL,2B + uptob001,Upton,B.J.,R,R,ATL,OF\nuptoj001,Upton,Justin,R,R,ATL,OF + johnc003,Johnson,Chris,R,R,ATL,3B + EOS + + ros_file_v = testpath/"#{attr[:visitor]}#{date_y}.ROS" # retrosheet "roster" + ros_file_v.write <<~EOS + colob001,Colon,Bartolo,R,R,NYN,P\ndarnt001,d'Arnaud,Travis,R,R,NYN,C + dudal001,Duda,Lucas,L,R,NYN,OF\ngranc001,Granderson,Curtis,L,R,NYN,RF + lagaj001,Lagares,Juan,R,R,NYN,OF\nmurpd006,Murphy,Daniel,L,R,NYN,3B + tejar001,Tejada,Ruben,R,R,NYN,SS\nwrigd002,Wright,David,R,R,NYN,3B + youne003,Yong,Eric,B,R,NYN,OF + EOS + + # check chadwick's standard output + exec_str = "#{bin}/cwbox -X -q -i #{attr[:game_id]} -y #{date_y} #{evn_file}" + out = shell_output(exec_str.sub("-X", "")) + assert_match "Game of #{date_m_d_y} -- #{attr[:visitor_city]} at #{attr[:home_city]}", out + + # check chadwick's xml output + out_xml = shell_output(exec_str) + require "rexml/document" + doc = REXML::Document.new(out_xml) + assert root = doc.root + + # check the root attributes + attr_map_info.each { |_, ch_at, v| assert v == root.attributes[ch_at.to_s] if ch_at } + attr.each { |ch_at, v| assert v == root.attributes[ch_at.to_s] } + + # check the computed scores + exp_linescore.each { |k, v| assert v == root.elements["linescore"].attributes[k.to_s] } + assert root.elements.to_a("linescore/inning_line_score").size == exp_innings_cnt + + root.elements.to_a("linescore/inning_line_score").each_with_index do |ing_line_score, idx| + exp_ing_ln_score.each do |k, values| + assert ing_line_score.attributes[k.to_s] == values[idx.to_i] + end + end + + # check the player count and that their full names have been fetched from the roster files + assert root.elements["players[@team='#{attr[:visitor]}']"].elements.size == exp_tmplayers_cnt + assert root.elements["players[@team='#{attr[:home]}']"].elements.size == exp_tmplayers_cnt + root.elements.each("players/player") do |e| + assert (!e.attributes["fname"].empty? && !e.attributes["lname"].empty?) + end + end +end diff --git a/Formula/c/chafa.rb b/Formula/c/chafa.rb new file mode 100644 index 0000000000000..4206a47b7b0d4 --- /dev/null +++ b/Formula/c/chafa.rb @@ -0,0 +1,51 @@ +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.14.5.tar.xz" + sha256 "7b5b384d5fb76a641d00af0626ed2115fb255ea371d9bef11f8500286a7b09e5" + 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 + sha256 cellar: :any, arm64_sequoia: "ea6049848cb7fd6d0f094877c2a451f3c04abc24fc32c1e6cf9fe4b9dc1381e7" + sha256 cellar: :any, arm64_sonoma: "718bad199de13187fdff368cb98f7163162bf76d57c0a6ba1cb2c151ec98a4df" + sha256 cellar: :any, arm64_ventura: "5af1c494a1b7daceb2e8d10cc895fe6e59fa3f10fbd493150cdc24cee1ee1150" + sha256 cellar: :any, sonoma: "e83b7e5f17bcb3b0698797f5b50f952a5ca09cf9f0489bb4842ae21d0d066b12" + sha256 cellar: :any, ventura: "b36b0aa9e21626083a0e6e86d33e3a96f935f7c47640292f202823b3c8fc402b" + sha256 cellar: :any_skip_relocation, arm64_linux: "a18bdb4424e04b4319bd6f7b99153dcb7c231b778ae21d64484cd88408deae75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7bc49d8207b352f3adf9b570363b0a40986addfc14deedab6181c55594e6d18a" + 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 + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + man1.install "docs/chafa.1" + 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..8d78a37f76c92 --- /dev/null +++ b/Formula/c/chain-bench.rb @@ -0,0 +1,42 @@ +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_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, 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..f433027785b19 --- /dev/null +++ b/Formula/c/chainhook.rb @@ -0,0 +1,45 @@ +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.8.0.tar.gz" + sha256 "5d1ea1ad91585d440cf56d0293541593294b70cbf59172957ff53b5598be874d" + 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_sequoia: "ee1d70019ceef4495f0921b1344b12b092846010ba7d831cfbae5f3639e682c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d84022e09a8266a52686ed6c8ecda900051f13a4cc848daa0f6c518337cbb3ed" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0a30eb3a6b72c2c0cdd41d65f55f8b4317d1261b07fbcceca6363b39bef1ed7f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a0e6da7d2520a8954d52270dda75248be81de3ff667ce6489b76a75d94d20ee7" + sha256 cellar: :any_skip_relocation, sonoma: "2e99210c74407049e8ea75816c0fb3b1ca111ca056c2f95ee923c8202dedb7cc" + sha256 cellar: :any_skip_relocation, ventura: "2d5f0d818bd4abb96efa88b7200ea9f3532169eca622e07f61d50a9fc7e4f92a" + sha256 cellar: :any_skip_relocation, monterey: "213dea4d00349141619d2682bee6191d18aaeeb5aa99340599f54dab75abb521" + sha256 cellar: :any_skip_relocation, arm64_linux: "10d4381a6b4bc83b5f1ef41fd88c6c1d9da90e820e95d9f86c2a25b87c1a9666" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1baa3948cbd9735f9249af29ff40e21d005185c70dd0f2a023cc733e298505f3" + end + + depends_on "rust" => :build + + uses_from_macos "llvm" => :build # for libclang + + # rust 1.80 build patch, upstream pr ref, https://github.com/hirosystems/chainhook/pull/631 + patch do + url "https://github.com/hirosystems/chainhook/commit/e98fc6093e30c41aec55a3391b917ff92de6df1f.patch?full_index=1" + sha256 "9b1b48a9a5be5ae0ceb3661c7e61f08ca6806ee49fd684dd1dc29cc3a3abb242" + end + + 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..fc653a706fb76 --- /dev/null +++ b/Formula/c/chainloop-cli.rb @@ -0,0 +1,37 @@ +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.3.0.tar.gz" + sha256 "3ced4e97ca8a087216849f9a1dece75c2779c41b12d5d465247d0c512e055430" + license "Apache-2.0" + head "https://github.com/chainloop-dev/chainloop.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a36a883d7eda8f1db8d8815fb5d79b7ce24c752afed84e884aea4f8919bd7dcd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a209df719870e724ffb12ccd9e619a0375beda86c75c2c36f83efad46dc04029" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bb0b33318da34e85820ee8c5b094a4f5406a631982bae14ecd0c3d47d28662ec" + sha256 cellar: :any_skip_relocation, sonoma: "8aafe938dcbaface4f6e8b4ea720c825de688b506c9d776a6e8d2d888e906513" + sha256 cellar: :any_skip_relocation, ventura: "ab17fd0570cf27ee2846db04106d83e536b4eb7b06e0975388f58228af2836ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8100b74a48ab0ff87ef69c5da588d44718673b6f93b7d875002d325f7e52ed0c" + 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 "authentication required, please 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..03ddce5805708 --- /dev/null +++ b/Formula/c/chainsaw.rb @@ -0,0 +1,36 @@ +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.11.0.tar.gz" + sha256 "87a66e39fd6417dfd53d026e72bf2ea9cffc72f3ab5e7b65e633bd4ab95d2a87" + license "GPL-3.0-only" + head "https://github.com/WithSecureLabs/chainsaw.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "28ccaff92d365b6b4820a32ef76f9c90e24c3b819ecbeccf8b1473ca33d9c422" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e7bac7270712cb90a101409f4e0d5e60e896727c158d30225575e0d2ac54e0e1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "61310609af62c08441e2afcfdb3650cfb1cf354d4ac1c8c5fdbfdadbdd9adfaa" + sha256 cellar: :any_skip_relocation, sonoma: "b8ed32ee23dbf0478f2c592d01bce6217248a316f38ac9661b449525cc57128d" + sha256 cellar: :any_skip_relocation, ventura: "aa3f408a060ef71fe4fbe5756b7b25cc09557d06fc5abab52b09b3c67fe0d5cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c8322f7ab580df1865da9ace9537d4d1bd19d680cdec4e43c08b9970aafd6fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f192090857775783e2a9c9a1b492685fbf17b0f5ddc140196ffaa5b17d1969e0" + 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..aead3635ccf37 --- /dev/null +++ b/Formula/c/chaiscript.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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, mojave: "37f73c985ecbb3d1050f73c5020080fd6b8632780b3cacdc635c6198d9afd7d8" + sha256 cellar: :any_skip_relocation, high_sierra: "905850906c705182fe0c3011314d52b852585121f91c91a03ad20cc1b4a1a830" + sha256 cellar: :any_skip_relocation, sierra: "ce45ec71bbf6917d01c5d3ac872b31637189b90216848166ec91df5c65a82d07" + sha256 cellar: :any_skip_relocation, el_capitan: "18a4b79b3b413b01d2801e0a49b054137c3307bc0fc930353b63e0746e43c16d" + sha256 cellar: :any_skip_relocation, arm64_linux: "48c885b02e7e02084d00622d66b9348f78a108ac315106752a19d5a0a58e65c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34af5a03731cb336dad74d83505e8c9485092a275b632da30ca2d34a73d31461" + 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() { + 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..4f87131f4ca58 --- /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/formula-patches/204ce95fb69a2cd523ccb0f392b7cce4f791273a/chakra/clang10.patch" + sha256 "5337b8d5de2e9b58f6908645d9e1deb8364d426628c415e0e37aa3288fae3de7" + end + + # Support Python 3. + # Remove with 1.12. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/308bb29254605f0c207ea4ed67f049fdfe5ec92c/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..33417f3ad726d --- /dev/null +++ b/Formula/c/chalk-cli.rb @@ -0,0 +1,22 @@ +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" + + 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..bc6370a63089e --- /dev/null +++ b/Formula/c/chamber.rb @@ -0,0 +1,38 @@ +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.2.tar.gz" + sha256 "cda68ed5f795d717d2debb4704739daad5f68fd3c2d1300b4c37160d05e1f5bb" + 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_sequoia: "1134d316f305554bffad0c48d0448a62820996b9b5651529c6e867ab84bf0794" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1134d316f305554bffad0c48d0448a62820996b9b5651529c6e867ab84bf0794" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1134d316f305554bffad0c48d0448a62820996b9b5651529c6e867ab84bf0794" + sha256 cellar: :any_skip_relocation, sonoma: "985fe2b9ffe12b1717cd95dbd1f9dc7fafc55b9ec16c0d7f11004592302d8b55" + sha256 cellar: :any_skip_relocation, ventura: "985fe2b9ffe12b1717cd95dbd1f9dc7fafc55b9ec16c0d7f11004592302d8b55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58cb6639b183193dbfa865a8730df0c10493c269efb13c6923715d71e8485119" + 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/changie.rb b/Formula/c/changie.rb new file mode 100644 index 0000000000000..c2638a7b29a82 --- /dev/null +++ b/Formula/c/changie.rb @@ -0,0 +1,33 @@ +class Changie < Formula + desc "Automated changelog tool for preparing releases" + homepage "https://changie.dev/" + url "https://github.com/miniscruff/changie/archive/refs/tags/v1.21.1.tar.gz" + sha256 "734d1f42a12b645170925cc1855626dc82a386b4250558baffe416517a9aa710" + license "MIT" + head "https://github.com/miniscruff/changie.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "25e98c7a599a54bc71fe36e2373d3ca16c34064e77c4f964183978747bbad8a8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "25e98c7a599a54bc71fe36e2373d3ca16c34064e77c4f964183978747bbad8a8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "25e98c7a599a54bc71fe36e2373d3ca16c34064e77c4f964183978747bbad8a8" + sha256 cellar: :any_skip_relocation, sonoma: "249be5b876c374cbb18e8acfea9f660041786ad2c2b17a1c7fdf0689c1dd29e5" + sha256 cellar: :any_skip_relocation, ventura: "249be5b876c374cbb18e8acfea9f660041786ad2c2b17a1c7fdf0689c1dd29e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d4142b0e9ff351cd7595b85f9256f76277041456bb0578e88d83e9dd1a4c8b7" + 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..e8fd2293b0eea --- /dev/null +++ b/Formula/c/chaos-client.rb @@ -0,0 +1,29 @@ +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_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, 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..be329697e2c4b --- /dev/null +++ b/Formula/c/chaoskube.rb @@ -0,0 +1,32 @@ +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.35.0.tar.gz" + sha256 "bc032ac1ce1abfe75f4cea17f23f15a1ac36b6669c99f123e7c1d4fbb6709921" + license "MIT" + head "https://github.com/linki/chaoskube.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "175ff90eee624e0fe6bb640a4645133925935cda6f0de21380af7c91bc5153e1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "72495e8d18d66656fad0d18f29a88e8f55d3ef37e89aa56bac24eafda7cf7f14" + sha256 cellar: :any_skip_relocation, arm64_ventura: "082ddd52530610338e1eb7f3f8fb0bac9ca5ca8c97e5f286a02d604a6a2a1d12" + sha256 cellar: :any_skip_relocation, sonoma: "74a0d120558a46523562a4faba1f824bb5d3779039afb5e615290a2e7ac02bb0" + sha256 cellar: :any_skip_relocation, ventura: "4e0f59315741696979c5145c7558e350e30f18748a870a2888fdfaf60a2a9119" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b23892e6e8ecfc587e7a7cbf8d974f4b8f05006312b4845eb07d97c5eeab3b63" + 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..535ea92703e7c --- /dev/null +++ b/Formula/c/chapel.rb @@ -0,0 +1,127 @@ +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.4.0/chapel-2.4.0.tar.gz" + sha256 "a51a472488290df12d1657db2e7118ab519743094f33650f910d92b54c56f315" + license "Apache-2.0" + revision 2 + head "https://github.com/chapel-lang/chapel.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "ae45c935d3a083686ffc20b62e84b0faae9d5a9701322f338ff29bcb6e377c68" + sha256 arm64_sonoma: "386cffb16177a8d299f5f4bff38e15a90c2fa7c076c92fb9fc258ecc968b0a43" + sha256 arm64_ventura: "f7e776bdf704ff263140b01842811bcee6d553876243be35f3d12cc169b2088b" + sha256 sonoma: "9ea3c09df45a048ea89d80eef45631a30c9075f1f325c6d2485893304f8e60bc" + sha256 ventura: "31436bc68ae8d8ba2efe0326cfcf36f42f291be14249163bbedef1b6f9363154" + sha256 arm64_linux: "acf21794e41a00f9b1e0073c5ce8eb2a00bcf5f57266345d06d8fc7aa467ce5e" + sha256 x86_64_linux: "04c1f4dab972ad1296acf69e8a68e8f85d6b43f3c1e5a940dd0894c4613dc53f" + end + + depends_on "cmake" + depends_on "gmp" + depends_on "hwloc" + depends_on "jemalloc" + depends_on "llvm@19" + depends_on "pkgconf" + depends_on "python@3.13" + + def llvm + deps.map(&:to_formula).find { |f| f.name.match? "^llvm" } + end + + def install + # Always detect Python used as dependency rather than needing aliased Python formula + python = "python3.13" + # It should be noted that this will expand to: 'for cmd in python3.13 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 + + # 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_CONFIG=#{llvm.opt_bin}/llvm-config + CHPL_LLVM_GCC_PREFIX=none + EOS + + # 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" + with_env(CHPL_LLVM: "none") do + system "make" + end + with_env(CHPL_LLVM: "system") 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/") + 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 + man1.install_symlink libexec.glob("man/man1/*.1") + end + + test do + ENV["CHPL_HOME"] = libexec + ENV["CHPL_INCLUDE_PATH"] = HOMEBREW_PREFIX/"include" + ENV["CHPL_LIB_PATH"] = HOMEBREW_PREFIX/"lib" + cd libexec do + with_env(CHPL_LLVM: "system") do + system "util/test/checkChplInstall" + system "util/test/checkChplDoc" + end + with_env(CHPL_LLVM: "none") do + system "util/test/checkChplInstall" + system "util/test/checkChplDoc" + end + end + system bin/"chpl", "--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..79bafb4508ea7 --- /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 2 + sha256 cellar: :any_skip_relocation, all: "5abd9f3f6191b67dd5c0a9912225873d1aea2371883c7aee8fcc3077e414dc96" + end + + depends_on "python@3.13" + + 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/charge.rb b/Formula/c/charge.rb new file mode 100644 index 0000000000000..c87de69ec5f5b --- /dev/null +++ b/Formula/c/charge.rb @@ -0,0 +1,56 @@ +class Charge < Formula + desc "Opinionated, zero-config static site generator" + homepage "https://charge.js.org/" + url "https://registry.npmjs.org/@static/charge/-/charge-1.7.0.tgz" + sha256 "477e6eb2a5d99854b4640017d85ee5f4ea09431a2ff046113047764f64d21ab5" + license "MIT" + head "https://github.com/brandonweiss/charge.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f26cdaf761fc50ccd7782b3cc3912d0a8dc93e0acf0bc24da2c7d842ceea4121" + sha256 cellar: :any_skip_relocation, arm64_ventura: "83bf10a43c6321be09aecf20dcc0c80daa76f96847840edef4964eea9fcac492" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ed6f9833cb67b677f2131e681ec50ceccdb95261bbeb071a64c301c4800e7bfa" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cfacd98af0f9c2293eef24cb7610a5d2cf60ff237cf790b1ad5ff6cad018a855" + sha256 cellar: :any_skip_relocation, sonoma: "a5b8e71865af91b528a3e46a4bc8457b26c5e760b62c0b9ed208dfede79d769c" + sha256 cellar: :any_skip_relocation, ventura: "f480ebb1cf027fe833c46835e13ce69ee6488138bfdc7df66a9bba3dbce3ec88" + sha256 cellar: :any_skip_relocation, monterey: "686efa2b941ac91dfd02a60df15223b3b887b791a2226ea4cd6fbeff9287f912" + sha256 cellar: :any_skip_relocation, big_sur: "3d23d1330af8394dc65fd857829da237d45ffabe57f2e59019f0564a0b2c7d95" + sha256 cellar: :any_skip_relocation, catalina: "b6b02c7658ca9d8c8211554a74d399f5a9188f516e152fb7eee5a2b879d050d3" + sha256 cellar: :any_skip_relocation, mojave: "f2d73159f3331a3c7a6126eb7054fb987abf89598521fad3dece201f06cbf79d" + sha256 cellar: :any_skip_relocation, high_sierra: "2dcccfe026217c62a72db3ff501ee56c1c8216e5f00e567ca12706aaddb6ea8b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "624762292729f409a6f737af99495aff8c24340d4b9b6e93c8e155dfa12cff6e" + end + + # Does not work with supported Node versions + # Last release on 2020-03-12 + disable! date: "2024-09-09", because: :unmaintained + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + # Replace universal binaries with their native slices. + deuniversalize_machos + end + + test do + (testpath/"src/index.html.jsx").write <<~JS + import Component from "./component.html.jsx" + + export default () => { + return + } + JS + + (testpath/"src/component.html.jsx").write <<~JS + export default (props) => { + return

{props.message}

+ } + JS + + system bin/"charge", "build", "src", "out" + assert_path_exists testpath/"out/index.html" + end +end diff --git a/Formula/c/charls.rb b/Formula/c/charls.rb new file mode 100644 index 0000000000000..7d499e9fb0697 --- /dev/null +++ b/Formula/c/charls.rb @@ -0,0 +1,53 @@ +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" + + bottle do + 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..cbec1ef8e5145 --- /dev/null +++ b/Formula/c/charm-tools.rb @@ -0,0 +1,230 @@ +class CharmTools < Formula + include Language::Python::Virtualenv + + desc "Tools for authoring and maintaining juju charms" + homepage "https://github.com/juju/charm-tools" + # TODO: Remove pip==22.3.1 from pypi_formula_mappings.json when charm-tools is + # compatible with latest pip. Currently, charm-tools requires pip < 23.0 + url "https://files.pythonhosted.org/packages/da/8c/26dcc9b99c6fbacd989f5d54b7a3a976cfa5b8ac26f6992d134091add085/charm_tools-3.0.8.tar.gz" + sha256 "ad1e8aaf8f6aece19f3f7db1d45010b471be998b54a0b2861f24b62912f24b9d" + license "GPL-3.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "c858441c7c259692a12f561b8d35c623400e176376bcfaa96898433cb64fbcb1" + sha256 cellar: :any, arm64_sonoma: "d4c7cdc7c34a59b3e872e83947e4f151c08a6f7f753a1e9f1c4a1716a3f1067d" + sha256 cellar: :any, arm64_ventura: "2aa33d96d081f354a2f6a6774640905a32cfc3c1254a04dedb13f70826605d0f" + sha256 cellar: :any, sonoma: "079f0bd68f936365f0c8a1f175b3ac74f563f951cf7534603b4d1278a2c3d694" + sha256 cellar: :any, ventura: "dce9b0d7d4433745e7a0767f7516af0d91385f084ab54475bf3caf38a65fda32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dcf0756d13ffbca4b73712b5efe34667de5bed2c944c2c02e3660a5992f68858" + end + + depends_on "certifi" + depends_on "charm" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + on_linux do + depends_on "gmp" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" + sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" + 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/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + # Using unreleased version for python 3.13 compatibility. + resource "cheetah3" do + url "https://github.com/CheetahTemplate3/cheetah3/archive/8d82736c0e760ca9bcd01ffcdf95fbb424af116d.tar.gz" + sha256 "9d4782ec56b110891634370a19691b50d75d220649a51492b2cb96ad965a13b4" + end + + resource "colander" do + url "https://files.pythonhosted.org/packages/fa/3c/592bbb25f6199234167d713c220044473e2e57906d7ad7a34e13b7dc1144/colander-1.8.3.tar.gz" + sha256 "259592a0d6a89cbe63c0c5771f9c0c2522387415af8d715f599583eac659f7d4" + 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/0d/dd/1bec4c5ddb504ca60fc29472f3d27e8d4da1257a854e1d96742f15c1d02d/distlib-0.3.9.tar.gz" + sha256 "a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/9d/db/3ef5bb276dae18d6ec2124224403d1d67bccdbefc17af4cc8f553e341ab1/filelock-3.16.1.tar.gz" + sha256 "c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435" + 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 "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/d6/f4/154cf374c2daf2020e05c3c6a03c91348d59b23c5366e968feb198306fdf/jeepney-0.8.0.tar.gz" + sha256 "5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806" + 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/51/78/65922308c4248e0eb08ebcbe67c95d48615cc6f27854b6f2e57143e9178f/more-itertools-10.5.0.tar.gz" + sha256 "5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6" + 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 "pip" do + url "https://files.pythonhosted.org/packages/a3/50/c4d2727b99052780aad92c7297465af5fe6eec2dbae490aa9763273ffdc1/pip-22.3.1.tar.gz" + sha256 "65fd48317359f3af8e593943e6ae1506b66325085ea64b706a998c6e83eeaf38" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + 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/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 "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/d1/d6/eb2833ccba5ea36f8f4de4bcfa0d1a91eb618f832d430b70e3086821f251/ruamel.yaml-0.17.40.tar.gz" + sha256 "6024b986f06765d482b5b07e086cc4b4cd05dd22ddcbc758fa23d54873cf313d" + 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/43/54/292f26c208734e9a7f067aea4a7e282c080750c4546559b58e2e45413ca0/setuptools-75.6.0.tar.gz" + sha256 "8199222558df7c86216af4f84c30e9b34a61d8ba19366cc914424cdbd28252f6" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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/c2/d2/15ede73bc3faf647af2c7bfefa90dde563a4b6bb580b1199f6255463c272/types_setuptools-75.6.0.20241126.tar.gz" + sha256 "7bf25ad4be39740e469f9268b6beddda6e088891fa5a27e985c6ce68bf62ace0" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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/bf/75/53316a5a8050069228a2f6d11f32046cfa94fbb6cc3f08703f59b873de2e/virtualenv-20.28.0.tar.gz" + sha256 "2c9c3262bb8e7b87ea801d715fae4495e6032450c71d2309be9550e7364049aa" + end + + def install + venv = virtualenv_install_with_resources without: "cheetah3" + resource("cheetah3").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..cb4d88ed95361 --- /dev/null +++ b/Formula/c/charm.rb @@ -0,0 +1,35 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e6863b87f5141d695d361b1b0b7c68d9ab4edf710935a82d1839e0d7890cd2e3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "76693903d37a9dc93095fd09c496c21d0651a71f39b1abbce782519ea2859f6c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2235de1789688bdc50e5e8443b4748a52dd36c7887e4d6b20d9e41417c5cdad0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3f0cac05e7c2c0990fd6c186405a13c832ff84b47fb77c2928aab7c29548b670" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "406f7bc14f44bd5462dde85da36d37cf5218ba7db06f7e27121ca2cc504d4eb8" + sha256 cellar: :any_skip_relocation, sonoma: "537c03caa99579d5141651ef25365ee5f0af06840beb5c72926cef99826d4039" + sha256 cellar: :any_skip_relocation, ventura: "f7ed8885d301a9b4bba15d657de9ee132dbb2603de8367523b0d9d41750bb0ab" + sha256 cellar: :any_skip_relocation, monterey: "117bca978b5d65dc38f4e63d54ca0ef24f3b3e8cc808c97488854afb3a48a2ba" + sha256 cellar: :any_skip_relocation, big_sur: "6c5e1f0af81ab86774fe87eb7c793c390386cc45b255348dc6467ad030f740d8" + sha256 cellar: :any_skip_relocation, catalina: "2cfca124d8f2bdc973797c2a290b36f87e4d8d4d39e7ebb4358b552e12ac89eb" + sha256 cellar: :any_skip_relocation, mojave: "a50370e9787fc797efc1b7c0dcc45fff5fd2ee02fea66e2d7db5d132c2153665" + sha256 cellar: :any_skip_relocation, x86_64_linux: "623e2d62e1dc1210de466ff4e4ea1d8e0c8ea059dbdc491ff5b8f3ec1cc9603e" + end + + depends_on "go" => :build + + def install + 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..db95a32ff41a4 --- /dev/null +++ b/Formula/c/charmcraft.rb @@ -0,0 +1,378 @@ +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/96/c1/54c4193113f9a340c60acff29bb22ac310668219bf0aac59004bafde5d95/charmcraft-3.4.3.tar.gz" + sha256 "ef398a210cad0cb78cc176beed4459de52c966c5d28ca16544a4639d3c1d2fce" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e9f95647bc1d61edc32a21da78025d955edb51c36f0857d7009e15a1da47e56a" + sha256 cellar: :any, arm64_sonoma: "3d1375f7b58904a387a3ce63892f76e7247c285ab1ff52c7033d0919519747c8" + sha256 cellar: :any, arm64_ventura: "a23f438380c0b9f32b9536cfc2ae22ac3ac42e02619550858b6aab336812fe54" + sha256 cellar: :any, sonoma: "6f7208c9f49cb9107a98668bdf6bb14b77fba8bac1735bc7489f5c9c584ad1ac" + sha256 cellar: :any, ventura: "163524a7407f3546f80159f5bcd70ffc448a9b88e214e951264bee11897cf1f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab78ee3cfb622dc7fc39fbe7c6018c479ada374c9c3515641983ebbce80bfccf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0badbc40365b8d02acc2dfcd8a826f1fd7416e69ef319e5fedeba19b61059ca2" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "libsodium" + depends_on "libyaml" + depends_on "pygit2" + depends_on "python@3.13" + + 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/a3/73/199a98fc2dae33535d6b8e8e6ec01f8c1d76c9adb096c6b7d64823038cde/anyio-4.8.0.tar.gz" + sha256 "1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/49/7c/fdf464bcc51d23881d110abd74b512a42b3d5d376a55a831b44c603ae17f/attrs-25.1.0.tar.gz" + sha256 "1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e" + end + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/a2/d9/b6e56a303d221fc0bdff2c775e4eef7fedd58194aa5a96fa89fb71634cc9/boolean.py-4.0.tar.gz" + sha256 "17b9a181630e43dde1851d42bef546d616d5d9b4480357514597e78b203d06e4" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "craft-application" do + url "https://files.pythonhosted.org/packages/d8/c5/0e7e7f712e5024c106641ef7b0b77e40964a3f79747ea0d5308e0e97d3f2/craft_application-4.9.1.tar.gz" + sha256 "71e674c89cb492e16011741ee9d423dde9d851aa895c8073a2925c583a2d505b" + end + + resource "craft-archives" do + url "https://files.pythonhosted.org/packages/8b/8e/efd531838ceb591d4aaa4d032807131082bf20e39112472be33346cc9267/craft-archives-2.0.2.tar.gz" + sha256 "8dfc0a78ba0bf1e63891975463e2a15c0028b9697b2282d6e9fe05bd6477960d" + end + + resource "craft-cli" do + url "https://files.pythonhosted.org/packages/9e/a7/32b8170deaefb28a8ec4cbccbaa0fbc4fac019cf3edf3682079af271ffa9/craft_cli-2.15.0.tar.gz" + sha256 "83c94e521c597c0836eb4a649c68105827006731d2032ca925cf1aea27d9fc9c" + end + + resource "craft-grammar" do + url "https://files.pythonhosted.org/packages/02/d6/073514a6dd3f79fd82f73b0532df0f5dfc39c5ba548795a8c1406851e914/craft_grammar-2.0.1.tar.gz" + sha256 "fd6d90b49f3dc1705d9a745192d61192f2eeb42ecb316d7a2b921083d7601c5a" + end + + resource "craft-parts" do + url "https://files.pythonhosted.org/packages/fb/d7/f8d6c8aca83d1c751b0ed30c7e5b70f119f5d020569ae91626c37347caa9/craft_parts-2.6.2.tar.gz" + sha256 "937ac0f5a4abc7b2a1c9b236652b95a7d39de95bb76c380e0fb1249a8b4df0ea" + end + + resource "craft-platforms" do + url "https://files.pythonhosted.org/packages/ab/7e/a9a54ac2025f5399689027fd317273f477c7c15478b2c59791aa48f34262/craft_platforms-0.6.0.tar.gz" + sha256 "7aa153bfff5a28cf4f8c8a7b3da29c259da3a9d9a2f9a2e7c52e118e5735a927" + end + + resource "craft-providers" do + url "https://files.pythonhosted.org/packages/16/92/93e3f7adff46a338ae7087ffedab34dd116b329917735677f3205369b931/craft_providers-2.2.0.tar.gz" + sha256 "dda4df4f777fbc6fbb4fd72cb85ccd237d07875b80a5c95bc70ace3c22d26b07" + end + + resource "craft-store" do + url "https://files.pythonhosted.org/packages/78/80/edc3cf128f1e3302f0c591539a278b4bd6a09ad23e959f620494ce8cb285/craft_store-3.2.1.tar.gz" + sha256 "0c8ae8870362e6e670c0766026849683f6f4563d108a7acca800d4db024a3a21" + 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/f5/38/3af3d3633a34a3316095b39c8e8fb4853a28a536e55d347bd8d8e9a14b03/h11-0.14.0.tar.gz" + sha256 "8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/6a/41/d7d0a89eb493922c37d343b607bc1b5da7f5be7e383740b4753ad8943e90/httpcore-1.0.7.tar.gz" + sha256 "8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c" + 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 "humanize" do + url "https://files.pythonhosted.org/packages/5b/8c/4f2f0784d08a383b5de3d3b1d65a6f204cc5dc487621c91c550388d756af/humanize-4.12.1.tar.gz" + sha256 "1338ba97415c96556758a6e2f65977ed406dddf4620d4c6db9bbdfd07f0f1232" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/d6/f4/154cf374c2daf2020e05c3c6a03c91348d59b23c5366e968feb198306fdf/jeepney-0.8.0.tar.gz" + sha256 "5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/af/92/b3130cbbf5591acf9ade8708c365f3238046ac7cb8ccba6e81abccb0ccff/jinja2-3.1.5.tar.gz" + sha256 "8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb" + 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/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + 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/74/6f/8709031ea6e0573e6075d24ea34507b0eb32f83f10e1420f2e34606bf0da/license_expression-30.4.1.tar.gz" + sha256 "9f02105f9e0fcecba6a85dfbbed7d94ea1c3a70cf23ddbfb5adf3438a6f6fce0" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/88/3b/7fa1fe835e2e93fd6d7b52b2f95ae810cf5ba133e1845f726f5a992d62c2/more-itertools-10.6.0.tar.gz" + sha256 "2cd7fad1009c31cc9fb6a035108509e6547547a7a738374f10bd49a09eb3ee3b" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/f7/d1/e0a911544ca9993e0f17ce6d3cc0932752356c1b0a834397f28e63479344/protobuf-5.29.3.tar.gz" + sha256 "5da0f41edaf117bde316404bad1a486cb4ededf8e4a54891296f648e8e076620" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/a9/b7/d9e3f12af310e1120c21603644a1cd86f59060e040ec5c3a80b8f05fae30/pydantic-2.9.2.tar.gz" + sha256 "d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/e2/aa/6b6a9b9f8537b872f552ddd46dd3da230367754b6f707b8e1e963f515ea3/pydantic_core-2.23.4.tar.gz" + sha256 "2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863" + 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/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/8b/1a/3544f4f299a47911c2ab3710f534e52fea62a633c96806995da5d25be4b2/pyparsing-3.2.1.tar.gz" + sha256 "61980854fd66de3a90028d679a954d5f2623e83144b5afe5ee86f43d762e5f0a" + 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/ce/8d/2ebc549adf1f623d4044b108b30ff5cdac5756b0384cd9dddac63fe53eae/python-debian-0.1.49.tar.gz" + sha256 "8cf677a30dbcb4be7a99536c17e11308a827a4d22028dc59a67f6c6dd3f0f58c" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/5f/57/df1c9157c8d5a05117e455d66fd7cf6dbc46974f832b1058ed4856785d8a/pytz-2025.1.tar.gz" + sha256 "c2db42be2a2518b28e65f9207c4d05e6ff547d1efa4086469ef855e4ab70178e" + 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/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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/14/66/88737c8720685f44e6a1c04cb2185301a6ec4538ac82324f0f33c9dc5fd5/requests_unixsocket2-0.4.2.tar.gz" + sha256 "929c58ecc5981f3d127661ceb9ec8c76e0f08d31c52e44ab1462ac0dcd55b5f5" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0a/79/2ce611b18c4fd83d9e3aecb5cba93e1917c050f556db39842889fa69b79f/rpds_py-0.23.1.tar.gz" + sha256 "7f3240dcfa14d198dba24b8b9cb3b108c06b68d45b7babd9eefc1038fdf7e707" + 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/92/ec/089608b791d210aec4e7f97488e67ab0d33add3efccb83a056cbafe3a2a6/setuptools-75.8.0.tar.gz" + sha256 "c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6" + 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-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "wadllib" do + url "https://files.pythonhosted.org/packages/da/54/82866d8c2bf602ed9df52c8f8b7a45e94f8c2441b3d1e9e46d34f0e3270f/wadllib-2.0.0.tar.gz" + sha256 "1edbaf23e4fa34fea70c9b380baa2a139b1086ae489ebcccc4b3b65fc9737427" + 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..9ffacde7e0852 --- /dev/null +++ b/Formula/c/chars.rb @@ -0,0 +1,37 @@ +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_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-testing.rb b/Formula/c/chart-testing.rb new file mode 100644 index 0000000000000..958e7f2c31605 --- /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.12.0", + revision: "d6991035017d7ac0e3dec3d1b5ad2e5f18674b32" + license "Apache-2.0" + head "https://github.com/helm/chart-testing.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f2138869a05cf42de24e10d8512bc26070ac19169d3bb41f061c226a67ac7aaa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f2138869a05cf42de24e10d8512bc26070ac19169d3bb41f061c226a67ac7aaa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f2138869a05cf42de24e10d8512bc26070ac19169d3bb41f061c226a67ac7aaa" + sha256 cellar: :any_skip_relocation, sonoma: "aaaa3bcedb8fae176cd2ba889ebe715f11b3592ee61be0917c3ed8b232b4081e" + sha256 cellar: :any_skip_relocation, ventura: "aaaa3bcedb8fae176cd2ba889ebe715f11b3592ee61be0917c3ed8b232b4081e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc2bea119cc70298682e2b83e5ab7df72f962ce06068a8548c4f643a77aea1ce" + 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..a65afff52b96d --- /dev/null +++ b/Formula/c/chatblade.rb @@ -0,0 +1,163 @@ +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 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "48c207e91e7634bec0e99ae575e8400f2bae03a3a54f2a3b1dfde1b30fc163fa" + sha256 cellar: :any, arm64_sonoma: "0934833346a0ba2b4499b1e210fd763851754c6cc5f46b41fc9e2935583ff20e" + sha256 cellar: :any, arm64_ventura: "6740bca5fd14099ae0cf7a978811fc037abf33c391e015de674a54abac49e7ba" + sha256 cellar: :any, sonoma: "84af1dabb21944fd6e03622826bff07e90d8dbf0edfdd528e275d6d0acbf2e37" + sha256 cellar: :any, ventura: "093a051a0a4de63090639552cd23e377abd3eda0f49b0fb01ef328cbadc38d04" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b32f894de86ba78cd65e8c306686b3c9b1cca74c867f6f76b6773b0f233aebe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "80e1bdf9bc920247c208c9a53dc59685236872e7ffa6dc7f73a32ac2097eed5d" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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 "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/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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/chdig.rb b/Formula/c/chdig.rb new file mode 100644 index 0000000000000..e0834eacd35fd --- /dev/null +++ b/Formula/c/chdig.rb @@ -0,0 +1,36 @@ +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.4.1.tar.gz" + sha256 "5956bccc99f5c86eef6095ee03dde53590dd03370b06cd04348074ea223f2297" + license "MIT" + head "https://github.com/azat/chdig.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4b983bd8086b13f4c9b8656678f01a517c9a1dea76ce4c90d6c0931eab195beb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8c0609d8c5284a2e7b717123e71036ec434fa4aa311c4cedf9fbec31b3d348e7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1b39d50f8782ae0b1c20a35254aac710c8705020189337fb98b859fca647582c" + sha256 cellar: :any_skip_relocation, sonoma: "3ac80eca9b7d94b9d9d1a1570fcd1494f0ac96bc1ea25dc4e6979703ad67a7fb" + sha256 cellar: :any_skip_relocation, ventura: "fc41f28455ef3bdd91b01f10994c1878917d8f4c8584e9442d4da8e83e4f18b9" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d110d05f6b19f1d5db298a2b979e67f9df13e7b276254ce49fad2e18694c99f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3a9dc13cd1c5fa758858c77cd83d169d98b382a6254cca0facc75c5e3330251" + 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..499bdf6fed2e9 --- /dev/null +++ b/Formula/c/cheapglk.rb @@ -0,0 +1,64 @@ +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" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?cheapglk[._-]v?(?:\d+(?:\.\d+)*)\.t[^>]+?>\s*?CheapGlk library v?(\d+(?:\.\d+)+)/im) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "06c024dbe07b8308e89bb36c08b5de6013ba39ce41cc49446894032ab58b4caa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0650047fb219451a53de59e89821939cf571d8c0ba9227e48c22f0112b3c0f1c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "46c6748a4f62fe0b8f62a0f0a8ed01351b3057624bb0bf4a62edb51575e631dd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7f34227be66c2d76ee900dd6cfcbe1263bab3c706ef05b348314944711bc1de4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "73f43be61554255b8b1bb6f2e185b567eca2c868f0c65ddf8a53020fddd8e35a" + sha256 cellar: :any_skip_relocation, sonoma: "b01e82e79b66c1d902ce76a51b4848e088e0ead6a1f5ca21717e7d3026356bc4" + sha256 cellar: :any_skip_relocation, ventura: "b7c1ecbddaa051401144361b5231f77990f7862be8618de1d711493c32aac368" + sha256 cellar: :any_skip_relocation, monterey: "16e6658829ca0f23ea49cfcdbee978c19e61b9eb1adfa26b5ffae7bb9c07f688" + sha256 cellar: :any_skip_relocation, big_sur: "9b3b09b201d58788157377de21147fc1dab74635912c3592626e9575905d9061" + sha256 cellar: :any_skip_relocation, catalina: "91d3c4e89b0750585d52206bf25054eb2db72af798e0d4e1c33021177b92ae13" + sha256 cellar: :any_skip_relocation, mojave: "d57b00a86e3d1c76f43d8f034c1dfe77d23da3d34637449040fdedd21f6a4a63" + sha256 cellar: :any_skip_relocation, high_sierra: "47c6f59d902a306b30c6255f65fd7626e32d5c39800fd80daeada852e95994f2" + sha256 cellar: :any_skip_relocation, sierra: "d76d29db8ea0201fcef949e02cbddb1c06311dece796a263192ffef487a3aa2c" + sha256 cellar: :any_skip_relocation, el_capitan: "497a5399738c026d318d3213b764f20fb80ccea94181919fad2e80eb75086055" + sha256 cellar: :any_skip_relocation, arm64_linux: "974eb82901452583a12e12149b6691d5925426d35204fb5a7ea82f5fbecf7cbd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af305413ea03f3b67064c61be1f26be3860370d87e774d4fc6c014ca66cdd380" + 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..51c8ce81d5cf9 --- /dev/null +++ b/Formula/c/cheat.rb @@ -0,0 +1,38 @@ +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_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, 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..2405b22af0588 --- /dev/null +++ b/Formula/c/check-jsonschema.rb @@ -0,0 +1,171 @@ +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/51/8e/67e40a319334f5beed9943a4f28de527e27599e07600e10063fb5f18f8b0/check_jsonschema-0.33.0.tar.gz" + sha256 "504fe09f268d2d25d58381d1ed1d5ae8f6e80e7f300e8b155317b40f9f6db8f6" + license "Apache-2.0" + head "https://github.com/python-jsonschema/check-jsonschema.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "62376f3d6cd7b8250e63574c08b3f32e79eb80cd6e8f13f462c0ea965a6f8c83" + sha256 cellar: :any, arm64_sonoma: "d69ad03adf04c4de3a8354813bb20bbf4e1af50339dd82d19308ac683b0b70a2" + sha256 cellar: :any, arm64_ventura: "735aec80abb71204e40a9847e1fd2d2c7288bd6f565b1a17c91ca1222a25c512" + sha256 cellar: :any, sonoma: "37676ef79cfa1ec2f28b5bebaaa607f046e6c5cd307d843665082a72444d914c" + sha256 cellar: :any, ventura: "12931d84537107a715d8689bbc1eb329c80bb6efa27586d7cb3144a2199ba0be" + sha256 cellar: :any_skip_relocation, arm64_linux: "a785b9213c02d67d27bc7bb20e33d426a41a958a58bc3f0cb958cf1675e7da1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d35015abcc6e577b40c7ea1d6b77cfecc22acd90d04e65fb5ab8bf75e59e7f4e" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "python@3.13" + + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + 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/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz" + sha256 "df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa" + end + + resource "regress" do + url "https://files.pythonhosted.org/packages/69/d0/db85f957d8e738557f9d37ebc5792ea0e8552170b99feb27213d5b1f7bd1/regress-2025.3.1.tar.gz" + sha256 "c7ba8d16e5053d773f488664c10180989e77f24228b446ec985ed76e3ac05901" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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 "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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 "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/a9/60/47d92293d9bc521cd2301e423a358abfac0ad409b3a1606d8fbae1321961/types_python_dateutil-2.9.0.20241206.tar.gz" + sha256 "18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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", + shells: [:fish, :zsh], + 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..f9482f9a1a82b --- /dev/null +++ b/Formula/c/check.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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, mojave: "a54f974e1f874c0912d97d91b61b4ec411d6c9f74417a5c541a7fa1b4bdf7705" + sha256 cellar: :any, high_sierra: "9613aefb32a1efad74a6ea90d58dfe7d68c2767a0e155d0afed3b3d5b8d40206" + 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..1fcc723b4eb04 --- /dev/null +++ b/Formula/c/check_postgres.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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..292e659ce1307 --- /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.12.tar.xz" + sha256 "a667faa37c625232106d6d4141d5aa9a1b78ab261a7fb787f80d02d8ccb2dd2a" + 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: "d4f5974e9b9df0af56e38caee495459682305020fc08be1b6fcafabb9162bc67" + 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..b3d7f1d677519 --- /dev/null +++ b/Formula/c/checkdmarc.rb @@ -0,0 +1,93 @@ +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/f7/e6/813515c22640d19be3abf40ba6e1c7390b540f11249fe6d928d9ed22577e/checkdmarc-5.8.2.tar.gz" + sha256 "f7775bf19d2841b412e5b954c9f543fc735c83d3a872eb3fb2324e87f0005c92" + license "Apache-2.0" + head "https://github.com/domainaware/checkdmarc.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1e4b05d56b7c8033e7f24df7199c7d9a76e8dfd43cc1eb7316e32ec1b316561c" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/42/52/4d2fe190c785fd8930917bb1412b4c1eff11564e835a63495cf946630236/publicsuffixlist-1.0.2.20250509.tar.gz" + sha256 "4fa37440456e71989ee079144ae279068dcb1cc5625d126affcc8bbc012fda5d" + 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/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/50/05/51dcca9a9bf5e1bce52582683ce50980bcadbc4fa5143b9f2b19ab99958f/xmltodict-0.14.2.tar.gz" + sha256 "201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553" + 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..0ffe96cc3fd6b --- /dev/null +++ b/Formula/c/checkmake.rb @@ -0,0 +1,56 @@ +class Checkmake < Formula + desc "Linter/analyzer for Makefiles" + homepage "https://github.com/mrtazz/checkmake" + url "https://github.com/mrtazz/checkmake/archive/refs/tags/0.2.2.tar.gz" + sha256 "4e5914f1ee3e5f384d605406f30799bf556a06b9785d5b0e555fd88b43daf19c" + license "MIT" + head "https://github.com/mrtazz/checkmake.git", branch: "main" + + bottle do + 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..986e61494b10a --- /dev/null +++ b/Formula/c/checkov.rb @@ -0,0 +1,534 @@ +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/9e/2f/b7803e6c34e5ce9b5e516983f49b7b10b3d7bfe21676d74791abedf5ff28/checkov-3.2.420.tar.gz" + sha256 "2d31fc673ab4ecddf452f60c7f14852d1efd05efaac840a458676a7f51ec01f2" + 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 + sha256 cellar: :any, arm64_sequoia: "9f822cb268769eb36dd022b0d7bbb863b786d0df7123efdb892104199ae00973" + sha256 cellar: :any, arm64_sonoma: "84023eb93fd8128489141ddf66be73b62472197519e7bcf4d3d5cbd75865aada" + sha256 cellar: :any, arm64_ventura: "1798af904e6d7fa5277641c69f38cd7779336c3080cc89ae526b4d015c16372c" + sha256 cellar: :any, sonoma: "4864d2c331a891d96ba88d24ebd221bdafb3e80b453a0a80430d60947b19e84a" + sha256 cellar: :any, ventura: "844f5f804d12488ae39462794a3d73bed14d7e790473203b83a84827b7a6f5ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "61ba314461088f02d2485d8434d782e452342510d8ee492f50fc3ed5eb370e80" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9e9cef7753cbc19ab2380e4213949c2185455a13011887656d2241bdd3795a3" + end + + depends_on "cmake" => :build # for igraph + depends_on "rust" => :build # for rpds-py + depends_on "certifi" + depends_on "libyaml" + depends_on "numpy" + depends_on "python@3.13" + + uses_from_macos "libffi" + + resource "aiodns" do + url "https://files.pythonhosted.org/packages/92/9b/e96226eed7568ddfd075b03695e3e1298d9de48724128a3a2957f5ee6ec8/aiodns-3.4.0.tar.gz" + sha256 "24b0ae58410530367f21234d0c848e4de52c1f16fbddc111726a4ab536ec1b2f" + 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/63/e7/fa1a8c00e2c54b05dc8cb5d1439f627f7c267874e3f7bb047146116020f9/aiohttp-3.11.18.tar.gz" + sha256 "ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a" + 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/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + 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/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "bc-detect-secrets" do + url "https://files.pythonhosted.org/packages/e8/0e/ec19b2e64d15b181fc03691d0236ddf5837fd9e59261a6b65e03468432dc/bc_detect_secrets-1.5.41.tar.gz" + sha256 "4bd08292a975bfc9b95771e118dd1131e1afbd479610eb29e4e0c15bd33677fc" + 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/d8/9a/1cb1e4c65a75dcc304438d1f941345d5dd5e8819f1a8b7b17991a21a22b3/bc-python-hcl2-0.4.2.tar.gz" + sha256 "ac8ff59fb9bd437ea29b89a7d7c507fd0a1e957845bae9aeac69f2892b8d681e" + end + + resource "beartype" do + url "https://files.pythonhosted.org/packages/8a/99/eaf0847301a6ca2042927c83f8cc72a29c153132ce49d9a720fe121440ba/beartype-0.20.2.tar.gz" + sha256 "38c60c065ad99364a8c767e8a0e71ba8263d467b91414ed5dcffb7758a2e8079" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/d8/e4/0c4c39e18fd76d6a628d4dd8da40543d136ce2d1752bd6eeeab0791f4d6b/beautifulsoup4-4.13.4.tar.gz" + sha256 "dbb3c4e1ceae6aefebdaf2423247260cd062430a410e38c66f2baa50a8437195" + 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/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/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + end + + resource "click-option-group" do + url "https://files.pythonhosted.org/packages/b9/9f/1f917934da4e07ae7715a982347e3c2179556d8a58d1108c5da3e8f09c76/click_option_group-0.5.7.tar.gz" + sha256 "8dc780be038712fc12c9fecb3db4fe49e0d0723f9c171d7cda85c20369be693c" + 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/70/8a/73f1008adfad01cb923255b924b1528727b8270e67cb4ef41eabdc7d783e/ConfigArgParse-1.7.tar.gz" + sha256 "e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1" + 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/ee/f4/d744cba2da59b5c1d88823cf9e8a6c74e4659e2b27604ed973be2a0bf5ab/frozenlist-1.6.0.tar.gz" + sha256 "b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68" + 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 "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 "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/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" + sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" + 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/af/60/bc7622aefb2aee1c0b4ba23c1446d3e30225c8770b38d7aedbfb65ca9d5a/lark-1.2.2.tar.gz" + sha256 "ca807d0162cd16cef15a8feecb862d7319e7a09bdb13aef927968e45040fed80" + end + + resource "license-expression" do + url "https://files.pythonhosted.org/packages/74/6f/8709031ea6e0573e6075d24ea34507b0eb32f83f10e1420f2e34606bf0da/license_expression-30.4.1.tar.gz" + sha256 "9f02105f9e0fcecba6a85dfbbed7d94ea1c3a70cf23ddbfb5adf3438a6f6fce0" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/2f/15/222b423b0b88689c266d9eac4e61396fe2cc53464459d6a37618ac863b24/markdown-3.8.tar.gz" + sha256 "7df81e63f0df5c4b24b7d156eb81e4690595239b7d70937d0409f1b0de319c6f" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + 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/81/0b/fea456a3ffe74e70ba30e01ec183a9b26bec4d497f61dcfce1b601059c60/orjson-3.10.18.tar.gz" + sha256 "e8da3947d92123eda795b68228cafe2724815621fe35e8e320a9e9593a4bcd53" + 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/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + 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/19/7a/01ef7ce35fc1312d6c1c07f3b87f329ad6daf41bb9cd57c8f017e0b653fa/pycares-4.8.0.tar.gz" + sha256 "2fc2ebfab960f654b3e3cf08a732486950da99393a657f8b44618ad3ed2d39c1" + 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/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "pyparsing" do + url "https://files.pythonhosted.org/packages/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + 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 "rdflib" do + url "https://files.pythonhosted.org/packages/e8/7e/cb2d74466bd8495051ebe2d241b1cb1d4acf9740d481126aef19ef2697f5/rdflib-7.1.4.tar.gz" + sha256 "fed46e24f26a788e2ab8e445f7077f00edcf95abb73bcef4b86cefa8b62dd174" + 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/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + end + + resource "rustworkx" do + url "https://files.pythonhosted.org/packages/a5/c4/6d6ef39e57610d54c5f106dc3dece9eebce8b9d52d561ae092e3aede1b66/rustworkx-0.16.0.tar.gz" + sha256 "9f0dcb83f38d5ca2c3a683eb9b6951c8aec3262fbfe5141946a7ee5ba37e0bb6" + 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/3f/f4/4a80cd6ef364b2e8b65b15816a843c0980f7a5a2b4dc701fc574952aa19f/soupsieve-2.7.tar.gz" + sha256 "ad282f9b6926286d2ead4750552c8a6142bc4c783fd66b0293547c8fe6ae126a" + 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-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/50/05/51dcca9a9bf5e1bce52582683ce50980bcadbc4fa5143b9f2b19ab99958f/xmltodict-0.14.2.tar.gz" + sha256 "201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/62/51/c0edba5219027f6eab262e139f73e2417b0f4efffa23bf562f6e18f76ca5/yarl-1.20.0.tar.gz" + sha256 "686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + 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..48f3966b67cd7 --- /dev/null +++ b/Formula/c/checkstyle.rb @@ -0,0 +1,28 @@ +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-10.23.1/checkstyle-10.23.1-all.jar" + sha256 "6c5d14f922e356808b4d92db76d172f7c1d9b582bbbb0d337b0da01ae8ac747f" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "fe7568b385b80129c673b8793a7157fe6a7c1ea5f2cbbf819e139d31c6e9a5b8" + 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..28414b9d7e3f8 --- /dev/null +++ b/Formula/c/cheops.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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, mojave: "27251202d9707a3b1687094971a644aa5d34c163bb62bea0eec85373b58922c0" + sha256 cellar: :any_skip_relocation, high_sierra: "a7028a380957e407304abae6f3f8d056c6363681e91792e19bbf1cde19aa44cf" + sha256 cellar: :any_skip_relocation, sierra: "f6087558b906474548d121bf3e745a7291dbc307d0c9ef16b3b6edd92d9dc830" + sha256 cellar: :any_skip_relocation, el_capitan: "3ed8f3d4920c6c44b4d25f16402564db5639acb1e3f104329f244cd52051a9f6" + 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/cherrybomb.rb b/Formula/c/cherrybomb.rb new file mode 100644 index 0000000000000..7fdefa830df0b --- /dev/null +++ b/Formula/c/cherrybomb.rb @@ -0,0 +1,50 @@ +class Cherrybomb < Formula + desc "Tool designed to validate your spec" + # Original homepage taken over: https://github.com/blst-security/cherrybomb/issues/158 + homepage "https://github.com/blst-security/cherrybomb" + url "https://github.com/blst-security/cherrybomb/archive/refs/tags/v1.0.1.tar.gz" + sha256 "1cbea9046f2a6fb7264d82e1695661e93a759d1d536c6d1e742032e4689efe9f" + license "Apache-2.0" + head "https://github.com/blst-security/cherrybomb.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd0341b2c6a53b6c4e0f42a79e3f1e5bf5a25e2d0c00f317b8fc18254de72951" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d3ccf56d17a1d0c267ee4d674bc3106f6693a27ed618768ba85f2390e1d4cfc0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1a288c2801a7149be6a9b63d3e29115e49446898b457579a9ff46a320ebdd54b" + sha256 cellar: :any_skip_relocation, sonoma: "d83874129a6e38b7dcd593342ff466671a40c90d3bf0a48a1a6f9657a15169c9" + sha256 cellar: :any_skip_relocation, ventura: "991adbf0625913d6b6b5a24973ccc26155160e3bfc67f86f7b6909bc714f6556" + sha256 cellar: :any_skip_relocation, monterey: "790c2d511642f7d35ae2815d1d466067b3ea275f59e9ea5c4f11fcf2ff7c4cbb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c267814c22eb06a91e7029572694a158b1de67d986e76ebd36973b42f4e840a1" + end + + # https://github.com/blst-security/cherrybomb/issues/156 + disable! date: "2024-09-16", because: "needs a service that is no longer available" + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + resource "homebrew-testconfig" do + url "https://raw.githubusercontent.com/blst-security/cherrybomb/9e704e1cadd90c8a8a5be4e99e847dd144c68b0a/images/api-with-examples.yaml" + sha256 "f7dc3d69f69ca11ae3e7e6ee702aff13fee3faca565033058d9fd073a15d9d45" + end + + testpath.install resource("homebrew-testconfig") + test_config = testpath/"api-with-examples.yaml" + output = shell_output("#{bin}/cherrybomb --file=#{test_config} --format json") + assert_match <<~EOS, output + Starting Cherrybomb... + Opening OAS file... + Reading OAS file... + Parsing OAS file... + Running passive scan... + Running active scan... + No servers supplied + EOS + + assert_match version.to_s, shell_output("#{bin}/cherrybomb --version") + end +end diff --git a/Formula/c/cherrytree.rb b/Formula/c/cherrytree.rb new file mode 100644 index 0000000000000..90072ef1cff02 --- /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.4.0.tar.xz" + sha256 "3ab77aa7de62a0285ea9d227e640b0b20afc2f0b5b0dd1dbacde8bfe4791e8ab" + license "GPL-3.0-or-later" + 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_sequoia: "cdd548683777d14b185e4f60d2a4337fda25754b4f8fc9eabbdec6e3ea89106a" + sha256 arm64_sonoma: "d8653e2a55d6efd5745f87ce983e80cbaf4635e8e3509e41f01700173c88133f" + sha256 arm64_ventura: "e03d39eb6764bf96846ab34a01ff85475f7575ff3c0dc564e1f07f1d41a4ea26" + sha256 sonoma: "1c8c218312899191f0cc05b99b85be07d210b21e54f383f56a88b08402de3d07" + sha256 ventura: "d0c0125118e201a163a06c6b22ed70a73359659becf77c87d0a62f2108b526db" + sha256 arm64_linux: "0668d760e7a35fdd3521a5f6eebb90bbaa2ae90fd3203bcb1eb1e6951680b8e3" + sha256 x86_64_linux: "deb1306276cf94028307e484688644a0e419a9723ad2169a83a64e00957d193b" + 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..631834e888f98 --- /dev/null +++ b/Formula/c/chezmoi.rb @@ -0,0 +1,52 @@ +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.62.4/chezmoi-2.62.4.tar.gz" + sha256 "bad72affd6ae99a8f4b1b54d939aa5193bd16bf1e76f11e3e84ba64f7fa142fd" + 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_sequoia: "973b48f4e2275ef5b2a7df01c7b56daeaa8a1fe1d9f9ddf5a49ed3e929926c7f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d5a43612434f2b0025e917c96590e75db3ab5437f19466b421fb005af971317e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f1672cb681908904884a102504839d7229e6d66a703eee7de3269b1dc728f787" + sha256 cellar: :any_skip_relocation, sonoma: "4748001c098015e9ee4182707521a002e6df5f719a22f5bbe1d4915528bc7e3b" + sha256 cellar: :any_skip_relocation, ventura: "8b2e05ff0f046be315e149a1ca1573d9d5ea0ff943ba0cce27990e77c15c8162" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4df22e5d9b93ceec50b9af01e08206b8ed32157f4cc54707a03574bbaabd792" + sha256 cellar: :any_skip_relocation, x86_64_linux: "991abb5170839754b65cb099f41bbf48ede386bf086af2500e220a85dae4bb7c" + 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..4fdc595bf9cf4 --- /dev/null +++ b/Formula/c/chezscheme.rb @@ -0,0 +1,45 @@ +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.2.0/csv10.2.0.tar.gz" + sha256 "b795916d4cfed59240c5f44b1b507a8657efd28e62e72e134d03486e9f3e374a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa0a0ef4b2e725411f40e15699d1cf6c98afd33553114c03290b5d448d386376" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "376de0a80c223e324d01d3fa9178e0109a51e9774eb0db7d24045e37646c2955" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c1ebe98f204674543ece35ceb221fefe2c6ea54da1a93823efc3efaa2fa9c39a" + sha256 cellar: :any_skip_relocation, sonoma: "ccc44b15027ae267266b1621f54acfcba730a2ede1a69bc3432b2fcb85f4ee93" + sha256 cellar: :any_skip_relocation, ventura: "3eaf4e4baf01394ebf43b74f722253ec4775bc801c3d1872a9577d1518467e70" + sha256 cellar: :any_skip_relocation, arm64_linux: "62a4f91d4e71185b6ba659800c09cb543e1d88a905e30638a8c2e72ea769a4f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ef79b89094ed46426bcfffa39786d547523ebbe711f68eec3d6b935c4e53240" + 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..e93de96232883 --- /dev/null +++ b/Formula/c/chibi-scheme.rb @@ -0,0 +1,34 @@ +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_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..6c4d893f23862 --- /dev/null +++ b/Formula/c/chicken.rb @@ -0,0 +1,54 @@ +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_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..afdb6360cf6af --- /dev/null +++ b/Formula/c/chiko.rb @@ -0,0 +1,36 @@ +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.1.tar.gz" + sha256 "054151d8c8c05ff2ccf0283328221b8143ea17146ef4dde4d63d7f1d31b11748" + license "MIT" + head "https://github.com/felangga/chiko.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2229abf255f4cf1d7edceeb7cbb7716cec4b20481961a1763d89396400df9fa9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2229abf255f4cf1d7edceeb7cbb7716cec4b20481961a1763d89396400df9fa9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2229abf255f4cf1d7edceeb7cbb7716cec4b20481961a1763d89396400df9fa9" + sha256 cellar: :any_skip_relocation, sonoma: "6f4b24bea33c35b4030520703ed9342b359e88f33812f405104ec7013ed8bce4" + sha256 cellar: :any_skip_relocation, ventura: "6f4b24bea33c35b4030520703ed9342b359e88f33812f405104ec7013ed8bce4" + sha256 cellar: :any_skip_relocation, arm64_linux: "40b295024b26e9f4d4542a88f7ef38f99c7620f1e4efd0ba734d962ff19bf8b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d6db73f2ae1ae61da75af4e9678b15709a6bafa752f46655e7bf7d4702d4e02" + 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..4c34a32bf2944 --- /dev/null +++ b/Formula/c/chinadns-c.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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, mojave: "61ccebe523d9e2417385c911beca6a01ee7d2810f1a665fca9a4f6a0e7b81623" + sha256 cellar: :any_skip_relocation, high_sierra: "5b0b51abe8a40dee4b1296e81da179aff05ba42befc869e06e081d7e6fc4e726" + sha256 cellar: :any_skip_relocation, sierra: "fa51351f3cdfb63fa672d2011c08ac8a1f9a260bcfaacb13e4657f39e721b96f" + sha256 cellar: :any_skip_relocation, el_capitan: "a620bce8421a9773233c51886c6845995569a1fda80e252efa86f6271c1d274c" + 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.rb b/Formula/c/chipmunk.rb new file mode 100644 index 0000000000000..47f4ed0f3fbe9 --- /dev/null +++ b/Formula/c/chipmunk.rb @@ -0,0 +1,63 @@ +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.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..f18e6875d482f --- /dev/null +++ b/Formula/c/chisel-tunnel.rb @@ -0,0 +1,46 @@ +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.10.1.tar.gz" + sha256 "85d121087ea3e1139f63eaa389642bd6d8c2584728ec80d16315b17410844269" + license "MIT" + head "https://github.com/jpillora/chisel.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "05ab3b695c06c0f9228bfd895ef79863a8e78a6b68e96b06774e703ac9075bd5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "05ab3b695c06c0f9228bfd895ef79863a8e78a6b68e96b06774e703ac9075bd5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "05ab3b695c06c0f9228bfd895ef79863a8e78a6b68e96b06774e703ac9075bd5" + sha256 cellar: :any_skip_relocation, sonoma: "6320979297527ca632fa428271fa3519e3382e90c6d02a6bc1fd8c0886d23ae8" + sha256 cellar: :any_skip_relocation, ventura: "6320979297527ca632fa428271fa3519e3382e90c6d02a6bc1fd8c0886d23ae8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7957fcca28005c5d81736033b68312872485b673a1e01ec53d1c7e98b11050b" + 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..4381308017d12 --- /dev/null +++ b/Formula/c/chisel.rb @@ -0,0 +1,63 @@ +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: "master" + + bottle do + 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" + sha256 cellar: :any, mojave: "70b49b0ba45571db3341adf586e1498a041492745cfa2130b2ef95b81d14fb85" + sha256 cellar: :any, high_sierra: "41797386262e226cf471995eac8ec50dffbf622140634254c6a7dab8a9471b48" + 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..fc0bf290d48a4 --- /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.4.0.tar.gz" + sha256 "99a69e05172ed27f0cf60d4aa967bc3f00a34f49c0d6529f6df41242cab789f8" + license "MIT" + head "https://github.com/laktak/chkbit.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa3de15f0dd07551bfcd3e36a3b228cf66332893fca929b4dd37869b03ab8f37" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa3de15f0dd07551bfcd3e36a3b228cf66332893fca929b4dd37869b03ab8f37" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa3de15f0dd07551bfcd3e36a3b228cf66332893fca929b4dd37869b03ab8f37" + sha256 cellar: :any_skip_relocation, sonoma: "45d20ff4444e1f13ebdd46bf0f85397c7c49abc79e9a54d99549bd960b0c5e85" + sha256 cellar: :any_skip_relocation, ventura: "45d20ff4444e1f13ebdd46bf0f85397c7c49abc79e9a54d99549bd960b0c5e85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1be986d6bf7eb3637f5d9afdf6ddc904cbd21d4c67af7e76df8bb4edcb4bf7d9" + 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..50dc84fb9df53 --- /dev/null +++ b/Formula/c/chkrootkit.rb @@ -0,0 +1,41 @@ +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_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..30ef719ce1300 --- /dev/null +++ b/Formula/c/chmlib.rb @@ -0,0 +1,108 @@ +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 + + bottle do + rebuild 2 + 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, mojave: "1718a0a9343788718b4207596ebff457f5214879319292cc1608254374720944" + sha256 cellar: :any, high_sierra: "426b95744d071ad76399ee240400ab74bcec9057735cbfeb2d433501105060ef" + sha256 cellar: :any, sierra: "9781c76f933beca002df542d2db0644e51766568d9399f9e73dc39b9e896f539" + sha256 cellar: :any, el_capitan: "6b834a6ae6e95f8daaa726fd6ae1a2d3e60335f98862fea9e790c24e5a6411d1" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..bd1e7368deb53 --- /dev/null +++ b/Formula/c/chocolate-doom.rb @@ -0,0 +1,64 @@ +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.0.tar.gz" + sha256 "f2c64843dcec312032b180c3b2f34b4cb26c4dcdaa7375a1601a3b1df11ef84d" + 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_sequoia: "4f000383f25ecf073d230153d43208298586091496c89fffe550b1ac3ceec679" + sha256 cellar: :any, arm64_sonoma: "d48d6cab180c6b15c33208fb7147b3f60b8817d81d8cd3a02da366f84b04d9fe" + sha256 cellar: :any, arm64_ventura: "307ee7d5f7aac248e236f8235c0de58d303693d9767f62d981dbb2de2b6dbab6" + sha256 cellar: :any, arm64_monterey: "3414e9cd11236891dfd66811b14a329b63b9ccf83f24f7564ddc589d170cf501" + sha256 cellar: :any, sonoma: "d0685590e292ca4f4901e523e5a1a2e77031e05da7cc21fd88ff1251bb10e981" + sha256 cellar: :any, ventura: "5722f18c1e6dfe86f4875ea77ca7c2e8cf70dc8e58ee8a4cfcdc6ad992c75b6f" + sha256 cellar: :any, monterey: "b47085bdb5cba8a81af6889d21fb725baba8108711428e708cbce4fa10bacacb" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e33543d04e8b2f62c7d2b728797db416a1dae9ec69d60d9b8c7dc70079558ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d314bee173f047d52b928d7865e8d8fd10ef6635b34cc89a50259ab9766e2efc" + 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..9741eb836ab74 --- /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_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", because: "both install a `choose` binary" + 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..e5441e987ca73 --- /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.6.tar.gz" + sha256 "3d28dc39339dbf5c6197eb803b199661d6d261bc827c194b31b19d1afad01487" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ad17bcef06080d2bfb71bb181c458c30e52d9d7286984e773f19421549090901" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c3a242fc57b9ead20e8eb5d1d60d14b3f3a53512a6bfd4765dc4fe08655a812d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8bf5781d97c33bfbff80f26fe6816e931b3e3e95517f827f67946fcc02325321" + sha256 cellar: :any_skip_relocation, sonoma: "a95a7d6cd3898ea70ce60d04af20ede743fd8a77cb200ae68616dd5fbe82b300" + sha256 cellar: :any_skip_relocation, ventura: "1843f24e22d57a1eb64fb96ce845cdad40e9c84d5199cee8002c3aa2ca0fe11a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a64165c7881c9583a85b19fc3074d2209fd0a1db3e27cb1a2a84971760aeeccc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e95d29a0116297a407d108626121d3be663f3c856345a279f3e5a0f17887834d" + end + + depends_on "rust" => :build + + conflicts_with "choose", because: "both install a `choose` binary" + 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..90ddea289b15e --- /dev/null +++ b/Formula/c/choose.rb @@ -0,0 +1,56 @@ +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 + + depends_on "python@3.13" + + conflicts_with "choose-gui", because: "both install a `choose` binary" + conflicts_with "choose-rust", because: "both install a `choose` binary" + + 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..dd099dd420ee6 --- /dev/null +++ b/Formula/c/chordii.rb @@ -0,0 +1,51 @@ +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 + + bottle do + 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, mojave: "def6b665fba55dfb8fa30269966e059b0a827f62a2338f73ea89c47a42fa7de7" + sha256 cellar: :any_skip_relocation, high_sierra: "1901080a06bb4728ec9858e4e548f68e044534b9d65dee1996f0590b56abc1a9" + 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..4059f71e715af --- /dev/null +++ b/Formula/c/chroma.rb @@ -0,0 +1,30 @@ +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.17.2.tar.gz" + sha256 "731fc4ee95095156e8f84684eb7bb9543ce41bdb4a6459a0387b78ef223ed1e8" + license "MIT" + head "https://github.com/alecthomas/chroma.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe4077b698556a4189b14bedbdd6db1c32c89dc9cbe527ac85144d4e7d3d6b99" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe4077b698556a4189b14bedbdd6db1c32c89dc9cbe527ac85144d4e7d3d6b99" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fe4077b698556a4189b14bedbdd6db1c32c89dc9cbe527ac85144d4e7d3d6b99" + sha256 cellar: :any_skip_relocation, sonoma: "9dce961501e8f3b80dabdd38d6d00a36cfa300cb5f318e3bd889b4ef9e04a85e" + sha256 cellar: :any_skip_relocation, ventura: "9dce961501e8f3b80dabdd38d6d00a36cfa300cb5f318e3bd889b4ef9e04a85e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac754dad4d1cd43333a5cb0e243e58980d502ff2819a7a5c10f415b456760dae" + 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..4000a28578411 --- /dev/null +++ b/Formula/c/chromaprint.rb @@ -0,0 +1,51 @@ +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.5.1/chromaprint-1.5.1.tar.gz" + sha256 "a1aad8fa3b8b18b78d3755b3767faff9abb67242e01b478ec9a64e190f335e1c" + license "LGPL-2.1-or-later" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "ecb32f5039c199a8f9f81329c5a09390f3c5307c3c012e10849aedadc835cf4a" + sha256 cellar: :any, arm64_sonoma: "e7f17d4e0a9d74e817a74187aafba610b424ac935ad9292df6cee1a46dc1f52f" + sha256 cellar: :any, arm64_ventura: "0230fecdaa48f58457d80c654a1ca214234ed4cc0d3cdc424aa204c3bd59741a" + sha256 cellar: :any, arm64_monterey: "89c3ed17fb7d5310008a89e76328d1bc4a91216d4d9a5031ac2bd6ffaaa70afa" + sha256 cellar: :any, sonoma: "fa5ea59aa76dde0b837ae13d1bf433a54e45d109e07a61131f8da7cdcc658e33" + sha256 cellar: :any, ventura: "55a6af3551894017729941b114a1011b30c14bc524a4cd6323c42fe6fa5c8968" + sha256 cellar: :any, monterey: "d6d20851c92be78865b588a89579a87ca1dfa178c6bc845b4a741670c8acb503" + sha256 cellar: :any_skip_relocation, arm64_linux: "6749d2ec540c676697f0052743987d5ee8a0e226bd2823abaf236894b5f6aab6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66ae2d2c38e63316a2a33ffbbdf601fd3145c2a13f5ac708180ca859613d8481" + end + + depends_on "cmake" => :build + depends_on "ffmpeg" + + # Backport support for FFmpeg 5+. Remove in the next release + patch do + url "https://github.com/acoustid/chromaprint/commit/584960fbf785f899d757ccf67222e3cf3f95a963.patch?full_index=1" + sha256 "b9db11db3589c5f4a2999c1a782bd41f614d438f18a6ed3b5167165d0863f9c2" + end + patch do + url "https://github.com/acoustid/chromaprint/commit/8ccad6937177b1b92e40ab8f4447ea27bac009a7.patch?full_index=1" + sha256 "47c9cc257c6e5d46840e9b64ba5f1bcee2705eac3d7f5b23ca0fb4aefc6b8189" + end + patch do + url "https://github.com/acoustid/chromaprint/commit/aa67c95b9e486884a6d3ee8b0c91207d8c2b0551.patch?full_index=1" + sha256 "f90f5f13a95f1d086dbf98cd3da072d1754299987ee1734a6d62fcda2139b55d" + end + + 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..bc1643466ac51 --- /dev/null +++ b/Formula/c/chrome-cli.rb @@ -0,0 +1,37 @@ +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.10.2.tar.gz" + sha256 "05684ef64ee1c9cc9f53e4da83aee6c72e4ba67e913af36e959e48e1e39fe74f" + license "MIT" + head "https://github.com/prasmussen/chrome-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b742b1edd9b7ea6de7197882e75c63530e68cc21434be76614e11aba76f335bd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0a0b0479359ba08144c0f56607a2097b04218051807cc0ae60bc73a60e46574f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5499c8160724eda14b5498f411971ec8c216f319c580a43a2a00d7f0fe9ab687" + sha256 cellar: :any_skip_relocation, sonoma: "87d2ad8690168f33d50b18c00022f96cddc5d1de38c4ecb65ea0d3a093d91f6e" + sha256 cellar: :any_skip_relocation, ventura: "9eb66895d46bdd9c55ad13c23c4a53ceecf4ad93e7cf766f7dd786765dbd7fb7" + 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-export.rb b/Formula/c/chrome-export.rb new file mode 100644 index 0000000000000..8b7a27cf50f46 --- /dev/null +++ b/Formula/c/chrome-export.rb @@ -0,0 +1,38 @@ +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 + + 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..4d1497a1b632f --- /dev/null +++ b/Formula/c/chronograf.rb @@ -0,0 +1,53 @@ +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.7.tar.gz" + sha256 "1b88a6a1d7eb36d8b6b5ac1506d9647c978bc9bd466cba37c45bed2d86bd20e5" + license "AGPL-3.0-or-later" + head "https://github.com/influxdata/chronograf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "51f35a21cae93b46a86a08c5c5332b89eb7404cd6787795c8a8f1692774d3476" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e2fd137ebfb0cce98c94a3d37b5d783a280845052c8c54f75c422e14c5f0674" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e8cc046d7259a5ee5e1323781b3f0bec179880e4c4212bae48deb24111eae83f" + sha256 cellar: :any_skip_relocation, sonoma: "8a66a4feaee1f1fc2fffc98f9d041158db45707c63c17555c18ddb04f8ff9e48" + sha256 cellar: :any_skip_relocation, ventura: "c33e782ad82a70043529faee89384568ce7e29a1361eadd5c0ebb59bc2c686c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e759876413c0d7824dce27426b7dc96ccf9efd097872569210da0dcb8c8ff58" + end + + depends_on "go" => :build + depends_on "node" => :build + depends_on "yarn" => :build + depends_on "influxdb" + depends_on "kapacitor" + + def install + # Fix build with latest node: https://github.com/influxdata/chronograf/issues/6040 + system "yarn", "upgrade", "nan@^2.13.2", "--dev", "--ignore-scripts" + 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..5f2027ced227b --- /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.6.1.tar.gz" + sha256 "571ff73fbf0ae3097f0604eca2e00b1d8bb2e91affe1a3494785ff21d6199c5c" + 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 + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "bd8606bc58d44abfff04e9574cf0264e5c5ee9f75f64374aadae9096004b55b4" + sha256 cellar: :any, arm64_sonoma: "4d47ecab5d75443490dcd062d0b185dcb2fa3c7ac2bc30f4fbcdfdc61736ea6d" + sha256 cellar: :any, arm64_ventura: "e0785f59cb7309e691469fdeb7ce2a976b8bc49a112125957331ae47c2b95225" + sha256 cellar: :any, sonoma: "5e8db7aab33dd0786c52743172f8c0a7a115633d8585da1081c4db87849d0c5d" + sha256 cellar: :any, ventura: "201f73994bf3599b53d7512dfad1dac1ab40e998ca4d2ed50bcdc9df6a66d725" + sha256 cellar: :any_skip_relocation, arm64_linux: "67fbf006d3a4971f0ba3e42be0eed2ea3454b82df07a7b9c7ae1f450574a6cab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ddc87ece74b77897ffacfefd6c66defc4196c7d7e4a55dbe702479224bc693d" + 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..0035b48f0b7ed --- /dev/null +++ b/Formula/c/chruby-fish.rb @@ -0,0 +1,24 @@ +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" + + 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..0d837a3243037 --- /dev/null +++ b/Formula/c/chruby.rb @@ -0,0 +1,32 @@ +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" + + 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..273f239524209 --- /dev/null +++ b/Formula/c/chsrc.rb @@ -0,0 +1,28 @@ +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.1.tar.gz" + sha256 "74210e232f15bb23b4c222d69077bfa6d6fc84c2f4043b86757c160038c4d96f" + license "GPL-3.0-or-later" + head "https://github.com/RubyMetric/chsrc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e482ca9c0bf03e90ecbe263217099fe1b0b8d61a6feb4296432000653ab3aae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a36af7d620a98399b8dc0f55fd70c99837054c4940376320cb8f3b115bb0e57f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5028dfde26ffeabfd7286ada46fae7e87df33993791e0f77489f520ea820fcce" + sha256 cellar: :any_skip_relocation, sonoma: "9e9a849604e7067862b86325a87171c764f6ac214bc1f130b3cedd1ad794d20e" + sha256 cellar: :any_skip_relocation, ventura: "a74e2292800322a63a90de0074a19aae4b6d2adc696822bb29d62730b6fce318" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ad23100e6283e788157bc1fea0564ad677ab807d970ed608558c241c638d783" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef3bc293723b69d4e77c0a93df587d1398b931cbab53c63b41abb58be235ccfa" + 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..70fdb36b2254d --- /dev/null +++ b/Formula/c/chuck.rb @@ -0,0 +1,44 @@ +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.0.tgz" + mirror "https://chuck.stanford.edu/release/files/chuck-1.5.5.0.tgz" + sha256 "8e35810ad4c1c9b172e7e61980f449694396fc0400bb56628faf4fc787f8ea06" + 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_sequoia: "15f98a95a0bf7f5f26a8ec9e2931f75aab7fa17197dfed7841f904e6572700d1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c90b4b2b59d928c661da269ecb1ec62545c1e2c71c9d1866506d8a6a60ef899" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b8e37a648a05e866e47cb5bbe4b1f1a4dfcd33e8ea10ee48d76418a8da479444" + sha256 cellar: :any_skip_relocation, sonoma: "2a90e85d99574ef5a786832aae043f15eb01246c5ce9bd3b4a4dd7718b394b9e" + sha256 cellar: :any_skip_relocation, ventura: "d601b642482546d029f603fdf96732429130c1de8b8551db68fb2c2b69a9289f" + sha256 cellar: :any_skip_relocation, arm64_linux: "70e71224d00fe5adc9d80ef4452d3871341ecb4b9115c538548e2aab8203b4d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7598ed9db4c8a52610575233f746dce77087ae8b32714cf7f6320ff3d4ddb686" + 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..b0b44571204d3 --- /dev/null +++ b/Formula/c/cidr.rb @@ -0,0 +1,36 @@ +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.2.0.tar.gz" + sha256 "caee614f119ec7383bc9a9dc04a688b4b058d15106f70f523d04c8773d2fa086" + license "MIT" + head "https://github.com/bschaatsbergen/cidr.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f92c6bdc12d20451f4b3d33a119c6d446945034759e752fa265594b92b8a3c0e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eab28e7e3430c08a756a465845307c350e54665c082faef4d0cfcc9d1718537c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "09b43bb3087a8b2967efeb81e55e589054bf9d72b9418816db0491399d1baf5a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8a052f10efcf19df9e0a41c035a0c9af03a908d515ba713f3c978da1e9c5daf9" + sha256 cellar: :any_skip_relocation, sonoma: "3f2df01b413b882817f5b975553fd0043f7fd6e48167ea2ae680ebb905562006" + sha256 cellar: :any_skip_relocation, ventura: "58cc2209eb5323798a67011f41433ce5f4641b2b4f2cdb2013b5ec1eb7d873f8" + sha256 cellar: :any_skip_relocation, monterey: "63c22da52ab9c5b7e7ffc35821ad1cb76596e071f1e412971a4efa60a0f9e9ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bebb8b71e94081655b343967ec6d56e78daeee550a60dd75bbcbc50d45a3f9ee" + end + + depends_on "go" => :build + + def install + 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..24dcd30f528cd --- /dev/null +++ b/Formula/c/cidr2range.rb @@ -0,0 +1,40 @@ +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 + + bottle do + 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, mojave: "4ce46a0ca3a2e66f47689ca41a2ba81b6700da689198c025cb724411b35e2fee" + 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..60ba051e835e3 --- /dev/null +++ b/Formula/c/cidrmerge.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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, mojave: "aa994dfc09a72377c001b0f94a0d8674034fe626e2d1a8bba0d6d514e849564b" + sha256 cellar: :any_skip_relocation, high_sierra: "61d2b647e77f706f53ef22dcb1ad362d39bed01f2bed08270bc6110824233146" + sha256 cellar: :any_skip_relocation, sierra: "8f2cf233141b0ea465c05d3487718176bb40023a05ecf7c275fdae9c36a5eef1" + sha256 cellar: :any_skip_relocation, el_capitan: "7e607252679cd1648e6c9f48ebbeaa2379ce089ad87815bd6636e65dcedebc7b" + 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..d926c121b60c6 --- /dev/null +++ b/Formula/c/cifer.rb @@ -0,0 +1,58 @@ +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" + + bottle do + 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, mojave: "ed647fac83a0f0605c4fbf0492be1568199a60473e20ac455feb4ff1abea1946" + sha256 cellar: :any_skip_relocation, high_sierra: "04d95a6448d38450079196139c6e6d5b5811265444c9abf8fe93b7424181a222" + sha256 cellar: :any_skip_relocation, sierra: "875e676d7866fd3ba2c8b70806838068775ffbc1102c56ca52d041155b2ade43" + sha256 cellar: :any_skip_relocation, el_capitan: "86cbc00f11a5818f48ee67bdc0fa5f2692cc7f37ae6c2c5eb237338c7dc6919b" + 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..ddd27d852fa93 --- /dev/null +++ b/Formula/c/cig.rb @@ -0,0 +1,48 @@ +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" + + bottle do + rebuild 3 + 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, mojave: "9cf50d9418885990bed7e23b0c2987918d63bef3e7f3e27589c521b6b73160bf" + 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..440fd00f2dd83 --- /dev/null +++ b/Formula/c/cilium-cli.rb @@ -0,0 +1,48 @@ +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.3.tar.gz" + sha256 "f66a555a1b55af77c61d9a38621316b84d574d9a621efd04bbbde410f99b4ae0" + 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_sequoia: "73e74d6ea9956e95d89e3384682679af1b96e0358ab05f4aaabf93a2d75164c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2990e6ef7a9c49562409c766eb881ec5facf007d0096e34bccc06ad66e497b14" + sha256 cellar: :any_skip_relocation, arm64_ventura: "89b46b628eed28e362be48dbf29fa2154f2073cd31dfe9f9f7e8bdb8d482cad8" + sha256 cellar: :any_skip_relocation, sonoma: "dfcb89cf4ab90049871bbe6938c6b8eb48517e8a207a949211ff5f29442e808a" + sha256 cellar: :any_skip_relocation, ventura: "38b4ccc078a072a8d2d5b0a29b024ea544a3e327b3a48b93e29b2dd70bbc8ad9" + sha256 cellar: :any_skip_relocation, arm64_linux: "94cca51653b4a338b8e81b6129d00dd9464c8a1b35873551619d51aad590020b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9fc5dd25ff5e099e77e85c8923c9138f22751ae545027fe80876bc40fd731d24" + 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..338d5544aea2b --- /dev/null +++ b/Formula/c/cimg.rb @@ -0,0 +1,36 @@ +class Cimg < Formula + desc "C++ toolkit for image processing" + homepage "https://cimg.eu/" + url "https://cimg.eu/files/CImg_3.5.4.zip" + sha256 "0f397a10402b9710e1c6a9db2b77a922a8d399a51efa6e7bffba73e3bbe5ba48" + 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, arm64_sequoia: "df665899139ebb624be6d695e0c8b4799fcb51bd94edc0d42a7601715b4a8d4e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "df665899139ebb624be6d695e0c8b4799fcb51bd94edc0d42a7601715b4a8d4e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "df665899139ebb624be6d695e0c8b4799fcb51bd94edc0d42a7601715b4a8d4e" + sha256 cellar: :any_skip_relocation, sonoma: "ecc32fd4e5b99acd02277ba09180409c4d8d910e5553f4cbf6261bf01bc0d3ee" + sha256 cellar: :any_skip_relocation, ventura: "ecc32fd4e5b99acd02277ba09180409c4d8d910e5553f4cbf6261bf01bc0d3ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "df665899139ebb624be6d695e0c8b4799fcb51bd94edc0d42a7601715b4a8d4e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df665899139ebb624be6d695e0c8b4799fcb51bd94edc0d42a7601715b4a8d4e" + 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..8b48d872f7758 --- /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/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.31687", + revision: "83b96d30cb8e66c3c57539b7cbaf4ae6fe6d6760" + license "MIT" + head "https://github.com/CircleCI-Public/circleci-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "32c3b5fe4cfa643bd67cde6f535e24dec8a10cf99ead1498e783b7a538090e7f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "32c3b5fe4cfa643bd67cde6f535e24dec8a10cf99ead1498e783b7a538090e7f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "32c3b5fe4cfa643bd67cde6f535e24dec8a10cf99ead1498e783b7a538090e7f" + sha256 cellar: :any_skip_relocation, sonoma: "30972352c3cb9a8e65d5e92be5b001216ba18d800c19cf6a8bae94419c7379aa" + sha256 cellar: :any_skip_relocation, ventura: "30972352c3cb9a8e65d5e92be5b001216ba18d800c19cf6a8bae94419c7379aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f1416f2b5e761d20fa5792ed5c8d91dfbd536ab81d939153fa6490e46e3422f" + 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..8c631ba77947e --- /dev/null +++ b/Formula/c/circumflex.rb @@ -0,0 +1,32 @@ +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_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, 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..6c0707283df8f --- /dev/null +++ b/Formula/c/citus.rb @@ -0,0 +1,79 @@ +class Citus < Formula + desc "PostgreSQL-based distributed RDBMS" + homepage "https://www.citusdata.com/" + license "AGPL-3.0-only" + head "https://github.com/citusdata/citus.git", branch: "main" + + stable do + url "https://github.com/citusdata/citus/archive/refs/tags/v13.0.1.tar.gz" + sha256 "b7fdc3ad6eca9dd6a1066e897a249fdca289e96d81921d4c7bf98cb4302ce817" + + # Backport DLSUFFIX usage to fix extension on macOS + patch do + url "https://github.com/citusdata/citus/commit/0f28a69f12418d211ffba5f7ddd222fd0c47daeb.patch?full_index=1" + sha256 "b8a350538d75523ecc171ea8f10fc1d0a2f97bd7ac6116169d773b0b5714215e" + end + end + + # 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_sequoia: "49acd5a24baed73f5b367d97fbba89285cfa515fa359d6176cc3850a92f56e6f" + sha256 cellar: :any, arm64_sonoma: "44ec4f915050291b58f02e8423a2306d5c24a67ef1fa66cce65aec913d0489df" + sha256 cellar: :any, arm64_ventura: "87853877c161b9c1f533871c4948d8e9df5018d4f9cda31ad4dafa60972e3e51" + sha256 cellar: :any, sonoma: "68a85ce9faf1bd1adbf6745daacedbb320cc691001740750d92e10c8b92198c7" + sha256 cellar: :any, ventura: "a6fbe35a9813c2b2bcc8eb7b05487bc1a20c5e02c41d7e7813b57b78fcdd7cbe" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9071869ac5660e49bd27acc7e2dfdcf3d258749c4575b13f0b4f703bb48811f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42694cb8148e29b50a36b8ce0b48853be1d0a46b9f59a1dca1cee7b5b80b55df" + 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..6c894befa1208 --- /dev/null +++ b/Formula/c/cityhash.rb @@ -0,0 +1,64 @@ +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" + + bottle do + 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, mojave: "4d7f25360b715d36177c70f06f7c21f39d38b6b8aa9f8a5befe80818baa3545f" + sha256 cellar: :any, high_sierra: "37e8244399c42c6f3bdb2fad91562607e96bc3380378d318ceecbc16ec8d52be" + sha256 cellar: :any, sierra: "62d8d1409dfe744d4de7a1727824b06c5a80b248433c2d8bd8a4efcd444346cb" + sha256 cellar: :any, el_capitan: "b09962ca43b3bb3321e1e57bf74a0936142ec5c94e198113ac3aa14e669e4d28" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..82ceb27220512 --- /dev/null +++ b/Formula/c/civl.rb @@ -0,0 +1,52 @@ +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 + + 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..f56b8837ab593 --- /dev/null +++ b/Formula/c/cjdns.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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 + + 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..29e13dfe8a1d2 --- /dev/null +++ b/Formula/c/cjson.rb @@ -0,0 +1,55 @@ +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.18.tar.gz" + sha256 "3aa806844a03442c00769b83e99970be70fbef03735ff898f4811dd03b9f5ee5" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "369cf21b89c82a4f1834fb3c8a128f5bf970f22bbb13376652448fbde998dad9" + sha256 cellar: :any, arm64_sonoma: "6deee0399f8b92240122c7cb8dee5a3f3e7b26f9cec147b9d0baffb3c6a804dc" + sha256 cellar: :any, arm64_ventura: "f8cd3c29957ec2a1007c52197f924e7f5262da5809bf928a451b25ea95df5203" + sha256 cellar: :any, arm64_monterey: "8dbfc2c100bf1710e3cbc477526e3ba5694f0b1162452252932d4c6ed2ea8a9f" + sha256 cellar: :any, sonoma: "1b0c17ed9045b0feb0ba140a31ab247876055ac753cd1fe1d55c0e9fc334e332" + sha256 cellar: :any, ventura: "d9587b4d465d2fb40c4cfc6a7c843a97fc9f0aef817b036ffd7418b10cbdd6d1" + sha256 cellar: :any, monterey: "5173b927f124a5e5f1cdc8c9625e41b91d489f779837e59e245b9fae38b36cc2" + sha256 cellar: :any_skip_relocation, arm64_linux: "57ba06b3ad967e32a2ce13c1b63d908624e377ac1679b323800ffa7d9ef84613" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ad376a8e59ceadee7ca6ec2ba000a8d1b5359a38e964afb3ca05fed166294da" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DENABLE_CJSON_UTILS=ON", + "-DENABLE_CJSON_TEST=Off", + "-DBUILD_SHARED_AND_STATIC_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *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..c0ddee7c1e6e9 --- /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..784a7d3287eb3 --- /dev/null +++ b/Formula/c/cksfv.rb @@ -0,0 +1,41 @@ +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 + + bottle do + 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, mojave: "6110de963cf29500583d02ac6629abc215ec85ce13de8855b251e2aaa67bf6d7" + sha256 cellar: :any_skip_relocation, high_sierra: "309816a8249a73a40760807ce0e5801a3ad223b21eb2a2e4b4a1d4d99859ff8a" + 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..d84c887abc753 --- /dev/null +++ b/Formula/c/clac.rb @@ -0,0 +1,25 @@ +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_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..da4b2dc8dba5e --- /dev/null +++ b/Formula/c/clair.rb @@ -0,0 +1,53 @@ +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_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, 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..4e3f6c02ecbfa --- /dev/null +++ b/Formula/c/clamav.rb @@ -0,0 +1,86 @@ +class Clamav < Formula + desc "Anti-virus software" + homepage "https://www.clamav.net/" + url "https://github.com/Cisco-Talos/clamav/releases/download/clamav-1.4.2/clamav-1.4.2.tar.gz" + mirror "https://www.clamav.net/downloads/production/clamav-1.4.2.tar.gz" + sha256 "8c92f8ade2a8f2c9d6688d1d63ee57f6caf965d74dce06d0971c6709c8e6c04c" + 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_sequoia: "4905fe4fabf8a82b668f3459579bbe866411e11e40b67186954e4e04a3bf24d3" + sha256 arm64_sonoma: "57e3cb64b82dbdbed45b7ca09772d0386a8d87d0841805af72e18ee2b10092dd" + sha256 arm64_ventura: "0d04eec631abc4cefba76b84d0ff19370e9cd9784f5d02e9eeceb06f92aae4c5" + sha256 sonoma: "555d9306b8715927159cd870985253cd1ca04b6c1e4ecea7bf189edafbe21ec4" + sha256 ventura: "538e09f3f9d312667e9f8fc75092f7a66e4776cdd329941787d1101b15761b38" + sha256 arm64_linux: "67030a88aa5aba70d7aa0d5026a18e6d8f7c8696178fbdd15c35a92190bf828d" + sha256 x86_64_linux: "94b058838c51f394fbe71a74bb68a77b6e5f50909f7d34c7419b48a233dea6eb" + 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..8281a76b4a7da --- /dev/null +++ b/Formula/c/clamz.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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, mojave: "031520225192a8498bc21a4e69c539ea0811ed2773b7085ecf1e10b502f648de" + sha256 cellar: :any, high_sierra: "0a0d293bb616f176c756c402b9d5d7528e42caa1767374d45b721b5a2e82094d" + sha256 cellar: :any, sierra: "fd35e22d601781e32cf9c5264f351c989d732d0a516617e3431522fef55bde61" + sha256 cellar: :any, el_capitan: "b960106e00e01e4dd8ff259feab6e0a1e399d373aa79d2b5d622f2ccf6f1e41b" + 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..5f600eea3f016 --- /dev/null +++ b/Formula/c/clang-build-analyzer.rb @@ -0,0 +1,38 @@ +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_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..2b04986c3f497 --- /dev/null +++ b/Formula/c/clang-format.rb @@ -0,0 +1,113 @@ +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-20.1.5/llvm-20.1.5.src.tar.xz" + sha256 "9a9a80ca4c0d902531f2b43e9e4d6c36b57cdd5702430e0b54567bf273bd32c1" + + resource "clang" do + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.5/clang-20.1.5.src.tar.xz" + sha256 "97025772b25c6694db049d3c4be5a72d926299aa1a9b861f490d66750e31c9dd" + + livecheck do + formula :parent + end + end + + resource "cmake" do + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.5/cmake-20.1.5.src.tar.xz" + sha256 "1b5abaa2686c6c0e1f394113d0b2e026ff3cb9e11b6a2294c4f3883f1b02c89c" + + livecheck do + formula :parent + end + end + + resource "third-party" do + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.5/third-party-20.1.5.src.tar.xz" + sha256 "8667f47185bee07f7c7988ead7161b0d9e41a1a01d5d7afd8f325c607641470c" + + 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_sequoia: "ea669b1bfb5882ed0983327b2808ea0a9be3258e21e6c25ea6fb989521966fc1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e44a44ce9a155549523b34b37a7fab2bea7a711393f7874693fefa10ed29095" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9cc18f4d3574af2dd57a91326db1025aaf6b141cd6d9b55999539ebbe94bdad0" + sha256 cellar: :any_skip_relocation, sonoma: "4952d4eca5df3f7d37a5a397f6588b9bd88a282af5bdcfe097d7690720e6f9fc" + sha256 cellar: :any_skip_relocation, ventura: "04ade8931d414633ed449ad04e2e972ff1f0acf2881ead258425ffaca6481f7a" + sha256 cellar: :any_skip_relocation, arm64_linux: "70164ec17f614c57c393aaaf6641e87dc18cd185a0d3d8a8299e05df751fb57e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "963701e8f374fb9669526ded749e8a6481cb73ab74f99f4eecb3e4cee42fbb61" + end + + depends_on "cmake" => :build + + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "python", since: :catalina + uses_from_macos "zlib" + + 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..f6d129033f604 --- /dev/null +++ b/Formula/c/clang-format@11.rb @@ -0,0 +1,53 @@ +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" + + bottle do + 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-uml.rb b/Formula/c/clang-uml.rb new file mode 100644 index 0000000000000..411b593f911fd --- /dev/null +++ b/Formula/c/clang-uml.rb @@ -0,0 +1,100 @@ +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.1.tar.gz" + sha256 "a64c3cae87a282be207e4c5faf47534dca21b06cb6f463bb7b04de979dccf17e" + license "Apache-2.0" + revision 1 + head "https://github.com/bkryza/clang-uml.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "78792810ae5fa540819d95061fd4c16a3acce6570c191267ea7a31a5c40c4a13" + sha256 cellar: :any, arm64_sonoma: "a145222bb207e95e0102386b1911148d7ea1be0db1051d20e4a18a7a1f1bf4dc" + sha256 cellar: :any, arm64_ventura: "3cf910c698552bcf4b322ea3588dd3b952773616e30d6feff364a6c9d1b7e42e" + sha256 cellar: :any, sonoma: "b12708defd94eeb41e5c1af4b8e397483d7444e704b652263949bc41fc00d686" + sha256 cellar: :any, ventura: "105421cec43a3418a3f46a83cab33805e671014b8be86c8ca83468dcc6ba1ebe" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f92f71cc357fabc60d14b08b60cf17807c12339eea355e590c77156e070f205" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57b66ce132290a5e67e4741d710ea35edee791b9379ae43aacb9c7f403fe3351" + 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..af223d166b006 --- /dev/null +++ b/Formula/c/clangql.rb @@ -0,0 +1,37 @@ +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_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..629b9870de5ec --- /dev/null +++ b/Formula/c/clarinet.rb @@ -0,0 +1,35 @@ +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.0.2.tar.gz" + sha256 "5af2a139214e832a8e00cf017439d782a8927939ed1b42b2642315e317076da4" + 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_sequoia: "9144a6664f831f9c73471a23c46c25b9bac30947b522e82934af99dce3309908" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "480507ea6fd6a9b5423e85110771261854b0b8f6a47a5c2553a7469086936fb5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "53739b6da1e966aa060c5d06c0b3eb3d847ccb511122bc0c2de160967d4f094b" + sha256 cellar: :any_skip_relocation, sonoma: "a9e4822a6f43e6d78c3d284e819da874fb640cefa2de260d82816a80541e9a17" + sha256 cellar: :any_skip_relocation, ventura: "6d15c2314a51d508fab91353a54f41d8aa196e4607fe7cbea9c352383efdf1b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "90f25b1588fb618a303982815aa195aaa1881fb473bd61062da3bcf5fcce2ca7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fccaec5eba5c0a4c4f020ea11da6bfe508a64b500732b4200df1be1128b810e3" + 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/clash.rb b/Formula/c/clash.rb new file mode 100644 index 0000000000000..76c16bc7b1d4c --- /dev/null +++ b/Formula/c/clash.rb @@ -0,0 +1,81 @@ +class Clash < Formula + desc "Rule-based tunnel in Go" + homepage "https://github.com/Dreamacro/clash" + url "https://github.com/Dreamacro/clash/archive/refs/tags/v1.18.0.tar.gz" + sha256 "139794f50d3d94f438bab31a993cf25d7cbdf8ca8e034f3071e0dd0014069692" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b1c44c3dbd296cdcbe3b6d0a579244bea03111e8d6c4e9f509f513a6482bb082" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cdc16caed4749ba51377dcc1862b5d78fde86c93e1d5b03d9930855a8e419d12" + sha256 cellar: :any_skip_relocation, arm64_monterey: "eee5031299250c21619a266efcbae83c135e10c0c1ac4c60f8cbecef43bc8ab1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4bd2b278309f408490a2a28ccda720a8903d5613fa7359a02e8444a770a07f20" + sha256 cellar: :any_skip_relocation, sonoma: "3e67a503cded3f6b9a88562d824be83d91cace7941525ad2e1ff857dc8d5105e" + sha256 cellar: :any_skip_relocation, ventura: "75a182e42bee3e4c146ae0fc82053d8c1e86e51916ca36c505f7aa01f64dbfd5" + sha256 cellar: :any_skip_relocation, monterey: "46f01fd74f2eb4d274bfe0c01b9c0b928dc15e7ef8be8ac42813ef3e8569faf0" + sha256 cellar: :any_skip_relocation, big_sur: "7309c342768d0d058c1115a72b123f1a806441452e17308896961a183872b925" + sha256 cellar: :any_skip_relocation, x86_64_linux: "edb29d947930fd06526bd829940a3acd5cad459d9f4005dee6233e35b010f4bc" + end + + disable! date: "2024-09-09", because: :repo_removed + + depends_on "go" => :build + depends_on "shadowsocks-libev" => :test + + def install + ldflags = %W[ + -s -w -buildid= + -X "github.com/Dreamacro/clash/constant.Version=#{version}" + -X "github.com/Dreamacro/clash/constant.BuildTime=#{time.iso8601}" + ] + system "go", "build", *std_go_args(ldflags:) + end + + service do + run opt_bin/"clash" + keep_alive true + error_log_path var/"log/clash.log" + log_path var/"log/clash.log" + end + + test do + assert_match version.to_s, shell_output("#{bin}/clash -v") + + ss_port = free_port + (testpath/"shadowsocks-libev.json").write <<~JSON + { + "server":"127.0.0.1", + "server_port":#{ss_port}, + "password":"test", + "timeout":600, + "method":"chacha20-ietf-poly1305" + } + JSON + server = fork { exec "ss-server", "-c", testpath/"shadowsocks-libev.json" } + + clash_port = free_port + (testpath/"config.yaml").write <<~YAML + mixed-port: #{clash_port} + mode: global + proxies: + - name: "server" + type: ss + server: 127.0.0.1 + port: #{ss_port} + password: "test" + cipher: chacha20-ietf-poly1305 + YAML + system bin/"clash", "-t", "-d", testpath # test config && download Country.mmdb + client = fork { exec bin/"clash", "-d", testpath } + + sleep 3 + begin + system "curl", "--socks5", "127.0.0.1:#{clash_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/c/classads.rb b/Formula/c/classads.rb new file mode 100644 index 0000000000000..fc74769866656 --- /dev/null +++ b/Formula/c/classads.rb @@ -0,0 +1,67 @@ +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 + + bottle do + rebuild 2 + 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/claws-mail.rb b/Formula/c/claws-mail.rb new file mode 100644 index 0000000000000..a2f0b5bfd7f6b --- /dev/null +++ b/Formula/c/claws-mail.rb @@ -0,0 +1,62 @@ +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_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..4fad9f49a2329 --- /dev/null +++ b/Formula/c/clazy.rb @@ -0,0 +1,76 @@ +class Clazy < Formula + desc "Qt oriented static code analyzer" + homepage "https://www.kdab.com/" + url "https://download.kde.org/stable/clazy/1.14/src/clazy-1.14.tar.xz" + sha256 "993f786dac668c29c4f357cb95c8a6ddca555ebbb94854efb9b570f683ad4d43" + license "LGPL-2.0-or-later" + 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_sequoia: "f77da44dd6c29e34637aa0d1ffe5bd4c208a769191592e7e883e2640788b4276" + sha256 cellar: :any, arm64_sonoma: "d0f0990494babab458cbc91cee206598fbe98e303761c49e43a8924fe9f4fff0" + sha256 cellar: :any, arm64_ventura: "9cbecaf7b22a02e178294518a281bfbf87be09a2de877144a6b273759f4e32ca" + sha256 cellar: :any, sonoma: "2a822345e7ca596102229fe92e6352e1595749ad1ac3a5822f647b18b70d027c" + sha256 cellar: :any, ventura: "8dd499299e6a778461782447004253825cea74c4702858946ae986c1ff120ffa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c73a9e02fd2c35ad10d89ca686830fef3e25af2b0aa2d0fdde508eb69217454e" + end + + depends_on "cmake" => [:build, :test] + depends_on "qt" => :test + depends_on "coreutils" + depends_on "llvm@19" # LLVM 20 issue: https://invent.kde.org/sdk/clazy/-/issues/27 + + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + 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..489b9e3561434 --- /dev/null +++ b/Formula/c/clblas.rb @@ -0,0 +1,60 @@ +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 + + bottle do + 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 + system "cmake", "src", *std_cmake_args, + "-DBUILD_CLIENT=OFF", + "-DBUILD_KTEST=OFF", + "-DBUILD_TEST=OFF", + "-DCMAKE_MACOSX_RPATH:BOOL=ON", + "-DPYTHON_EXECUTABLE=#{which("python3") || which("python")}", + "-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") + 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..cf61ed614332b --- /dev/null +++ b/Formula/c/clblast.rb @@ -0,0 +1,41 @@ +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_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 + 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..f5469b9f34476 --- /dev/null +++ b/Formula/c/clean.rb @@ -0,0 +1,41 @@ +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 + + bottle do + 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, mojave: "e715ac664f19bed88572c18765770713b8483bcf9fd0617e6739ada3fa8d68d7" + sha256 cellar: :any_skip_relocation, high_sierra: "d2f22ecaf65e902d6e0f878ec9585dd915f05d58121e95cfb5cff53d7905fad8" + sha256 cellar: :any_skip_relocation, sierra: "925b26f91800733aeda229bdaee74ecf4a70e1c94cb4e1b33ac3fc4f3948186d" + sha256 cellar: :any_skip_relocation, el_capitan: "7a433c07eb3c8a3846d352ddf27a6ac32fdc6528b6b2e6212f78318ff0f04a6a" + 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..e10d9151165e1 --- /dev/null +++ b/Formula/c/clens.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, mojave: "3550adf8f1e9eb8e62ac6c64f3b3c8cae0fba0d0f958f6e6da99e74f4e4d5e19" + sha256 cellar: :any_skip_relocation, high_sierra: "e9dfe6e9228a928f9cb1a4048d92ec576be5f89f48408401b7f3020c1482a7c6" + sha256 cellar: :any_skip_relocation, sierra: "f034c79bf5a16265db249c673b2d2a3e6850676dba739adeb6e90394d8f77475" + sha256 cellar: :any_skip_relocation, el_capitan: "f6c68d7dce9d824274e16e3867926528cc79d161418fac0a0052e37dc6604668" + 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..3c237e87b52a1 --- /dev/null +++ b/Formula/c/clhep.rb @@ -0,0 +1,53 @@ +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/dist1/clhep-2.4.7.1.tgz" + sha256 "1c8304a7772ac6b99195f1300378c6e3ddf4ad07c85d64a04505652abb8a55f9" + license "GPL-3.0-only" + head "https://gitlab.cern.ch/CLHEP/CLHEP.git", branch: "develop" + + livecheck do + url :homepage + regex(%r{atest release.*?v?(\d+(?:\.\d+)+)}im) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8e9dd4065ed1dfa0f4542454189540d428093451a913bd59ccfda465c51ffd47" + sha256 cellar: :any, arm64_sonoma: "0e69dfb6c076d3b6c87ff2fa67018eabf9e2d33ecfcc60505e614958a8baa748" + sha256 cellar: :any, arm64_ventura: "7394489e65b6b3b4eb7af0878e70fa4d77a93ff343093594cb591022cf193239" + sha256 cellar: :any, arm64_monterey: "f46bbb06f3914fe69fa4e59c1eba50702765c0143f3f0b5fbc974ca1e53fae20" + sha256 cellar: :any, sonoma: "cbcacb7078f9300077e8f44c0dc740e9fd61e3b4605459f46c5fba0839896375" + sha256 cellar: :any, ventura: "970da332b593e58aa660a15ace387d67cc281dcf9acaf06282902bb3086e13fc" + sha256 cellar: :any, monterey: "d2fffe1750260f11c55af6d2c5d8aac74721ef309f0d8d475e38f48200489619" + sha256 cellar: :any_skip_relocation, arm64_linux: "122fc5a8546dd1f571eb0f687962c74adf74c8f4593e388a19293a6b7e19f496" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb0cb80110d08ad05f90f16b7186651d15288c3ab770121ae1edfa45ce9b88c9" + end + + depends_on "cmake" => :build + + def install + (buildpath/"CLHEP").install buildpath.children if build.head? + 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..92b72a0ced80c --- /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.5.0.tar.gz" + sha256 "17e02b4cddc2fa348e5dbdbb582c59a3486fa2b2433e70a0c3bacb871334fd55" + license "BSD-3-Clause" + head "https://github.com/CLIUtils/CLI11.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2e33f4138edb61fd28013e3b07a676073c521bf6004d3313f3bb07a7a824315b" + 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..b6f6c417f9adf --- /dev/null +++ b/Formula/c/cli53.rb @@ -0,0 +1,27 @@ +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.24.tar.gz" + sha256 "1886c5ef32882ed3389bbd15226f1bb9d0c3c411eebefdaef0c3941ae1c2bcf9" + license "MIT" + head "https://github.com/barnybug/cli53.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5cbf53595fb96420c262541ac11ef60f88a90cb965b86a08d698759879f31f12" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5cbf53595fb96420c262541ac11ef60f88a90cb965b86a08d698759879f31f12" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5cbf53595fb96420c262541ac11ef60f88a90cb965b86a08d698759879f31f12" + sha256 cellar: :any_skip_relocation, sonoma: "29505b49a794c9b121fdca56bc0d4f823d4ed6b334e9463be158eaed1fb72f75" + sha256 cellar: :any_skip_relocation, ventura: "29505b49a794c9b121fdca56bc0d4f823d4ed6b334e9463be158eaed1fb72f75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f680ca15bb30e5a668529f526d6242ee392a7e3fa5601624d7cc9816d95f4e8f" + 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..903b58fec2ab0 --- /dev/null +++ b/Formula/c/cliam.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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, 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..547f7c968286d --- /dev/null +++ b/Formula/c/clib.rb @@ -0,0 +1,38 @@ +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_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..ed16db595b736 --- /dev/null +++ b/Formula/c/click.rb @@ -0,0 +1,77 @@ +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 + + bottle do + 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 "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + 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..39fd0c17e7011 --- /dev/null +++ b/Formula/c/clickhouse-cpp.rb @@ -0,0 +1,100 @@ +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.5.1.tar.gz" + sha256 "8942fc702eca1f656e59c680c7e464205bffea038b62c1a0ad1f794ee01e7266" + license "Apache-2.0" + head "https://github.com/ClickHouse/clickhouse-cpp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3cda0223506dcc56518dbd70b371ef6757853d01e67ca55c68d2551e9a32b7f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb116ae767d8a4c24d40b04e8839ac3829fe8ec91e35b95e6fc57240ed7ee460" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cd89dba1b35ec393371df54f97b29e8634f1269a9882bcde8d4cc69e723e4de3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "65b02be3ff3f7ce09709380bace6cf7a0d2df5d01e701e1b251479092c99cf82" + sha256 cellar: :any_skip_relocation, sonoma: "09ce8d0fb952b3bda5572045ad18c6ed25020cbce2e083a2b60b2f98e73a064c" + sha256 cellar: :any_skip_relocation, ventura: "e9b636ce43a3b54279a63e4d1c791fa557ca353d420a96ff016cd1acd24279aa" + sha256 cellar: :any_skip_relocation, monterey: "dbcf8a1e4018cf0af46745531ac710a174105e89e661eaff6d18ce77ba6c1e17" + sha256 cellar: :any_skip_relocation, arm64_linux: "68c376c8e6d79e7521cd33619dcf015855f7e8967f0746cb246fc6021a91e2a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90fc7c7a8549c0bd752ee992ea04c1cd44d75721a95bd488cb4bf644a55dca28" + end + + depends_on "cmake" => :build + depends_on "abseil" + depends_on "lz4" + depends_on "openssl@3" + + 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 + args = %W[ + -DWITH_OPENSSL=ON + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DWITH_SYSTEM_ABSEIL=ON + -DWITH_SYSTEM_CITYHASH=OFF + -DWITH_SYSTEM_LZ4=ON + ] + 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" + 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#{libexec}/lib + -lcityhash + -L#{Formula["openssl@3"].opt_lib} + -lcrypto -lssl + -L#{Formula["lz4"].opt_lib} + -llz4 + ] + 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..3fd2219e71248 --- /dev/null +++ b/Formula/c/clickhouse-odbc.rb @@ -0,0 +1,126 @@ +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 + + bottle do + 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/formula-patches/c76519fcbfa664cd37a8901deb76403b1af1bec1/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..67bf106ed2e38 --- /dev/null +++ b/Formula/c/clickhouse-sql-parser.rb @@ -0,0 +1,29 @@ +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.9.tar.gz" + sha256 "4432b7d415c21249df05909c5f682dc503233aff78550c83c0ce64ccd0ae9afd" + license "MIT" + head "https://github.com/AfterShip/clickhouse-sql-parser.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "386b26d4f173d87aca01be01e3617f35175c4f472e86b1dd4a7b473ef7dcb9f4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "386b26d4f173d87aca01be01e3617f35175c4f472e86b1dd4a7b473ef7dcb9f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "386b26d4f173d87aca01be01e3617f35175c4f472e86b1dd4a7b473ef7dcb9f4" + sha256 cellar: :any_skip_relocation, sonoma: "ed0cf23a7e7c2cd45a050ded92753696ebb39b27276206332a2605b641ef6d3e" + sha256 cellar: :any_skip_relocation, ventura: "ed0cf23a7e7c2cd45a050ded92753696ebb39b27276206332a2605b641ef6d3e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e218b79aedd7ba522b563d75497b4607c4e0d30800aa4d5f56fc948c91afee6c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f2309430e4831e8674411a759386f8f9da146b2eda4872f22186163ffa8697b" + 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..a5d17127983b6 --- /dev/null +++ b/Formula/c/cliclick.rb @@ -0,0 +1,32 @@ +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_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 maximum_macos: [:sonoma, :build] # https://github.com/BlueM/cliclick/issues/178 + depends_on :macos + + def install + 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..7793dac8c2169 --- /dev/null +++ b/Formula/c/clifm.rb @@ -0,0 +1,55 @@ +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.25.tar.gz" + sha256 "ac9156753338f6027d05551b1d02bcb6f3044348108b00b9cefd97f125fc95ee" + 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_sequoia: "36b5b6e72954845322fef4c352eb46ed4b73a14f1933d6ec355c1e2b3e986e93" + sha256 arm64_sonoma: "ab5b40d9dcb14253eafa522456927c3c267237652245df532afccadfd4718889" + sha256 arm64_ventura: "565bda150a46b1a93b744e8127b6846dd07771aa889354d20e4a2ff981c55faa" + sha256 sonoma: "db7baa0c7727d78e7e6df1a8462cc6f59592755de74b801d99e5698b9aac2bb8" + sha256 ventura: "6efa30ac11ef6bc2bc490deba1a77488dad16a66d7a0ea4a9e454f6c84ab7751" + sha256 arm64_linux: "6ab562f2545c7a06f528368551c5755c9f5cacb382a4e4c5c053e376368077d9" + sha256 x86_64_linux: "0870af884cbb6934324c77df03b867c7ca10a2602a0ff926212cd418194f898e" + 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..30afd947208c4 --- /dev/null +++ b/Formula/c/clinfo.rb @@ -0,0 +1,42 @@ +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_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..a433d6d920a9c --- /dev/null +++ b/Formula/c/cling.rb @@ -0,0 +1,74 @@ +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_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, since: :catalina + 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..6c20d88a0c2b3 --- /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 + sha256 cellar: :any, arm64_sequoia: "35d24c0f73cd44d4c42517ba3621df5d6a400ff7f4fd8306cc2f4622d40b008f" + sha256 cellar: :any, arm64_sonoma: "e76e8773450698143ffdacc0bfc1d489caada722d4b2bd5714b66b4a5d0c59fe" + sha256 cellar: :any, arm64_ventura: "2db3b04fe55e9957addd3bbc2e7a211a9b1be4d114b3b5b04795f1a0576659ed" + sha256 cellar: :any, sonoma: "ee580dd3486d3a83a0b71d5a3a9f0c3853862004079e3cb36e5c03226ff7f74a" + sha256 cellar: :any, ventura: "acf4bec16f8de6c2f8c5d3c9139dc607a2d9ebfbb44da8777bfd4f84af449f9a" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b945753340a64e78a96e4aa1f030e9f5734937c33111c948be3e25cac089d5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bcb0aa794aab95ff9376eaf61ecd30a803bdde61cf061998881b734687bdaedf" + 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.13" + + # 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.13") + 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..bde827cf06411 --- /dev/null +++ b/Formula/c/clip.rb @@ -0,0 +1,69 @@ +class Clip < Formula + desc "Create high-quality charts from the command-line" + homepage "https://github.com/asmuth/clip" + license "Apache-2.0" + revision 4 + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "4e2ca7b930f87658ba6450ad93a84b92b8d22c807f23eb8161c6c0cf3bd4fe88" + sha256 cellar: :any, arm64_sonoma: "3113e6da1b2952a1fb192798702a682bb4a1b15528deef855728cb7747e73a6e" + sha256 cellar: :any, arm64_ventura: "35c0b71a4027266682fc887c730d90da8ed7a70376e676f083ccb77080aa487a" + sha256 cellar: :any, arm64_monterey: "1eac839633823737b47b9908706b6e4fc71d868db0317505b5ced38c3bc18004" + sha256 cellar: :any, sonoma: "704a966e9cde6a3d7ec3fb7f89001951ec21c6c17ea19c949d40525b5ee99993" + sha256 cellar: :any, ventura: "b9d9581c495fd0de481bdd29e90c83a2d754728bae91cbce79d33b203f49f234" + sha256 cellar: :any, monterey: "1727420363dd11f068d983246bc72c1984989a317d7469a559aca8362aa2b546" + sha256 cellar: :any_skip_relocation, arm64_linux: "56e3709cdc2847f1fe4596de4a6f22d5ece7685eb0556016c84d33e978af7bc4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ec83f22a9c5a10603172933fb1de5ae5f261e30891e0ecf4b800094eab60ce8" + 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..03697b515eb6f --- /dev/null +++ b/Formula/c/clipboard.rb @@ -0,0 +1,64 @@ +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_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..30d50acc8ff07 --- /dev/null +++ b/Formula/c/clipper.rb @@ -0,0 +1,53 @@ +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" + + bottle do + 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/clipsafe.rb b/Formula/c/clipsafe.rb new file mode 100644 index 0000000000000..096abd3e9fe2f --- /dev/null +++ b/Formula/c/clipsafe.rb @@ -0,0 +1,197 @@ +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 + + bottle do + 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..98932ac14e4ca --- /dev/null +++ b/Formula/c/clisp.rb @@ -0,0 +1,73 @@ +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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "a01927a4f8f0c88f8aca8aa3ca0d52745d17bd352239651719042e414f5c8f90" + sha256 cellar: :any, arm64_sonoma: "e94752975afb5181821d2eff44c22247d224fabf1961ada3e0091cca6352d067" + sha256 cellar: :any, arm64_ventura: "2be9e60ec5595599b60733d43ade1ea29007214d3c05837d58cffc43bfb6e412" + sha256 cellar: :any, arm64_monterey: "bfad1c6c3b4787711bc126ed360647a6ad6458dd24ff4cd9e3be5252b897ed82" + sha256 cellar: :any, arm64_big_sur: "8108810c5af0ce990d9052ca96f6aa75af1f59589a103e21a86f8b1f2e801956" + sha256 cellar: :any, sonoma: "00920ed9b13c34a10e199cbea5703ed30e1e2bf2aa9047fc07b4bc406f98050c" + sha256 cellar: :any, ventura: "16c062ce5c0d6ff467fe082d36bc22a0455972c19a34e37520eb0134f77b24ec" + sha256 cellar: :any, monterey: "b2fc7c67341df7f9766f66054445e342bd61acc22c7260bac3589266ba78f8a3" + sha256 cellar: :any, big_sur: "4b81399840c98918cda6447d86852ffcb96294f228cb26f6c289f22d90df5a7a" + sha256 cellar: :any, catalina: "de714225b132ed2cdf971fd31befd890f336a3a917a5fd56832d6989b6c28a58" + sha256 arm64_linux: "2198c38ef80827473a8ee4ae64ea538a142b99fb70caa5f00ec6685535f7d4c6" + sha256 x86_64_linux: "c62c710ca923611df8d28202e49b0ca27eba36a4d0736a01e482b453d53769e1" + end + + 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..26def47a056d4 --- /dev/null +++ b/Formula/c/clitest.rb @@ -0,0 +1,29 @@ +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" + + 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..a0a7e1964f00c --- /dev/null +++ b/Formula/c/clive.rb @@ -0,0 +1,34 @@ +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.9.tar.gz" + sha256 "39f7c33a05ea1e608c4fa4918bb615b1f75eabbbb848c129436c43484967b74d" + license "MIT" + head "https://github.com/koki-develop/clive.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d1018d56e8435e55660cddbd5d663eb1842334c7fa1a57f621ef1c12c3290a0e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2cb3ffc2a6c8cbff5315e13924888eccc9698666454cdc5a231709b699a67a21" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fc7de9e0c5ef2285ca5f5eaee9d73a9275421d9c4504ecadffda72248cdbfb65" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bb85d61873f4e0f3fae6fd901dbac6cb75af53f6d78b6ed885fe394ea41518e7" + sha256 cellar: :any_skip_relocation, sonoma: "cefacc34490a7858b4bf11b5eed811b9af1e793f9cbe7dfc6126b4e7402a3ffa" + sha256 cellar: :any_skip_relocation, ventura: "541994648e535ea2a1de637cfa6c4ccae5116306c3aeae814f476bb24e9a6cbc" + sha256 cellar: :any_skip_relocation, monterey: "a5708e73b0d5a14278f9ce4a872067f21227ea7a35979b9fc6457fa7616ff6b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed55adca064e41f0d8c3f9794d9d4b208812f5b3d810a1e98f02b495196c0a3a" + 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..b1a6c60760617 --- /dev/null +++ b/Formula/c/cljfmt.rb @@ -0,0 +1,47 @@ +class Cljfmt < Formula + desc "Formatting Clojure code" + homepage "https://github.com/weavejester/cljfmt" + url "https://github.com/weavejester/cljfmt/archive/refs/tags/0.13.1.tar.gz" + sha256 "d9deca44683cbb8b81153ea596d1cffe2451ff59b39fcf654971bded96641000" + license "EPL-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b964ad8d5e233c888edc770ca27528ea6f697059abda7af11f74ac32677b04b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "811039897680bffd757c679d3f2183be7a35041fb9d4f891d4439053c8c997ad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d1552894debdafa2fdadf2e0e8ec9f8a64a90e82a50f54100677d820960eb6d0" + sha256 cellar: :any_skip_relocation, sonoma: "36896f538789940b786ff5120e6ea81bae30578d9263075f9b79b79897b540af" + sha256 cellar: :any_skip_relocation, ventura: "345222cf55c7aed887feb228db0aae01a59a08404463de0f37543b3f85993fbd" + sha256 cellar: :any_skip_relocation, arm64_linux: "ac4bfd96142ef6b39f323bda62f39d6e9fde7fb7669d6ddf1c852a9dfdeca030" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa05bf1d4d121ac459123480eb198022e50af5ef98b8ac25c54692ca1cce43a3" + 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..006d2e5f712e5 --- /dev/null +++ b/Formula/c/cln.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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..7fa7e553ab957 --- /dev/null +++ b/Formula/c/cloc.rb @@ -0,0 +1,100 @@ +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.04.tar.gz" + sha256 "3e6f25000d920fdee1a57575c185236286ab5e05fda7b6ab2e36c34f1bb6afbc" + license "GPL-2.0-or-later" + head "https://github.com/AlDanial/cloc.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b8283f66cc2a29eb0503f0d6ec5da6d032f8333d6792e969aaebd34149983292" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b8283f66cc2a29eb0503f0d6ec5da6d032f8333d6792e969aaebd34149983292" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ddc04e8018a88a4506d58d5e1024da139c7e228584aba582dfc14e6a1afb12ab" + sha256 cellar: :any_skip_relocation, sonoma: "c20ebdf0cc4416b16cfbf89cda60ea4fd9b094ef4fd0aea3f61819248f589e9d" + sha256 cellar: :any_skip_relocation, ventura: "cabab725242716b2f3d908c0fe861d9175870305d9c5ab1d86d1ebfe0f584ea5" + sha256 cellar: :any_skip_relocation, arm64_linux: "273d53ef9f8f29740f74ed543e2a1d5ccfe1248483bd7ff2454e90f07fcd9624" + sha256 cellar: :any_skip_relocation, x86_64_linux: "91b5211f50ed444d66a1de4f851af9d180c7add1c443c3f7b294b8eddc55a5f6" + 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..528421880a742 --- /dev/null +++ b/Formula/c/clog.rb @@ -0,0 +1,58 @@ +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: "1.4.0" + + livecheck do + url "https://gothenburgbitfactory.org/" + regex(/href=.*?clog[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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, mojave: "ec11a01ddd6a6ad70a655c74f569af9a6b56cf66f87ea448e296a1e208449ba4" + sha256 cellar: :any_skip_relocation, high_sierra: "b5309f9e692f111a0b68599ff465da02783d2f28a4b10d958c19e616177eb37a" + sha256 cellar: :any_skip_relocation, sierra: "97e07b94ea058c766f4d036cc503fc6ec08ca64cddced33d63723e4611534595" + sha256 cellar: :any_skip_relocation, el_capitan: "8f42168b8e165c4c1f1265b410ef62087b370075cc27269f1908eb0f373645c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d94d1596bb077ec7890f1bee8650ecf592c75c9415e310eb55f541df1d52c13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74b571a8740f2d0d8798ed8ee046d9239404ec6789987b98eb48b25c122c00e3" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *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..75139d8aa9607 --- /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.04.23-18.16.46/clojure-lsp-standalone.jar" + version "2025.04.23-18.16.46" + sha256 "6b16cec5eb1bbd85d884fbf772ca147becced5d4b006b9ac4ba98519ea2b8481" + 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: "fb8aa7c4f7cf409885b79b3ae076d99b81564354c8ca612503a39f96316f031c" + 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..9938b84e9c9c5 --- /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.0.1530/clojure-tools-1.12.0.1530.tar.gz" + mirror "https://download.clojure.org/install/clojure-tools-1.12.0.1530.tar.gz" + sha256 "0ff24b8a8126ba39d32de784a08767c5df259384cb76c6ee3db4d6102705ed49" + 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: "0fc3596a554a6564507fa6cdc5d7b802c0eb907e90f77d919040f1cfb3ae2ab0" + 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..5420ce3cb1c2f --- /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.11.132/cljs.jar" + sha256 "7c227c807ca9493fe442b4da1c94d1aec0910c067f2716d2beb0cc7b6e5028c8" + 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: "1ffb43adb1800fbf4dae1c3bc4c1f858c5aa7188497ee564307e156a151405b5" + 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..07e8e5bc3c499 --- /dev/null +++ b/Formula/c/cloog.rb @@ -0,0 +1,59 @@ +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" + + bottle do + 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..d0c6275290e28 --- /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/v20250407/closure-compiler-v20250407.jar" + sha256 "4fda9905d8de57ea5ae5dfb0446480c263f52a7ee56994ee16e0cec6a69d8554" + 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: "b647c9adfc7beae1cb8345f79780b2719da16a564874d32232dc1858934d67da" + 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..a9a6bc2d00b55 --- /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.40.0.tar.gz" + sha256 "6b03dc2949f48b431fa05f17481b1dd708754f658aca568f1df8f54cc616c73d" + 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_sequoia: "aca960e1b4c5ca336141935436e9f0377d77e28e1c1acf3fc7585d1d27e0673e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aca960e1b4c5ca336141935436e9f0377d77e28e1c1acf3fc7585d1d27e0673e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aca960e1b4c5ca336141935436e9f0377d77e28e1c1acf3fc7585d1d27e0673e" + sha256 cellar: :any_skip_relocation, sonoma: "eb15fd28bbc36b164cc447b494afab568f36a0373d5d002cc5b184404a3b17a6" + sha256 cellar: :any_skip_relocation, ventura: "eb15fd28bbc36b164cc447b494afab568f36a0373d5d002cc5b184404a3b17a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1da2326254501b214919ccdfe3707d3cf73f1b5021c74627e9c3da4c05cc2880" + 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..47c5fee171af8 --- /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.6.0.tar.gz" + sha256 "61f7efdd17f2b1100f153c162494eba240f4bace459ec3d76fc5348d829e5f78" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/cloud-provider-kind.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "596d1ff6c56251c8fb41e89ad8220dd476808b04e7e87fc7c98eeb6f278a4757" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a83dda7961b6246015d269cb7f3090b8f9010648d78c3ecd1dd2ef570a349029" + sha256 cellar: :any_skip_relocation, arm64_ventura: "38654267338cd317e2ac0d5eee6dafcbe16b5c6788f2a9293e3cbcdf26e8ae7e" + sha256 cellar: :any_skip_relocation, sonoma: "00597c278dbbf8e47c1b9312126f579d101daef091ca7f07903c2ccc32fd5c86" + sha256 cellar: :any_skip_relocation, ventura: "5882ef85ba5cb771df59a6f2b18d3ecef31c1464cf76d46f8af03a231e31aaae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5600f3b4a6051d1db96676692611da07417b677a30b8b6b94606a2fa57680af7" + 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..5c61484619bf4 --- /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.16.0.tar.gz" + sha256 "d8ea9e4d34d63b589b894902ed9f6300a5f08dcab113194e74990d3ca3b35787" + license "Apache-2.0" + head "https://github.com/GoogleCloudPlatform/cloud-sql-proxy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4cf4dd85cde657b9c8b741beb23040f5d72b1854108bac81cc0589b7eaf3fac0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4cf4dd85cde657b9c8b741beb23040f5d72b1854108bac81cc0589b7eaf3fac0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4cf4dd85cde657b9c8b741beb23040f5d72b1854108bac81cc0589b7eaf3fac0" + sha256 cellar: :any_skip_relocation, sonoma: "b59d50515260afe491e2411389db1b09c2bfce6d69c01e400f4a2010c0da594e" + sha256 cellar: :any_skip_relocation, ventura: "b59d50515260afe491e2411389db1b09c2bfce6d69c01e400f4a2010c0da594e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1edb81fec6116582918247d3b04a11f093af99a25e6202fb088a259b970a9213" + 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..ace126f6856fa --- /dev/null +++ b/Formula/c/cloudflare-cli4.rb @@ -0,0 +1,82 @@ +class CloudflareCli4 < Formula + include Language::Python::Virtualenv + + desc "CLI for Cloudflare API v4" + homepage "https://github.com/cloudflare/python-cloudflare-cli4" + url "https://github.com/cloudflare/python-cloudflare-cli4/archive/refs/tags/2.19.4.tar.gz" + sha256 "7a3e9b71cad0a995d59b0c3e285e1cf16bd08d9998509f44d7c321abe803d22b" + license "MIT" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "5e3b3f0b3816446cc8ce5ba4558cc29e6aaa28e0d5816267340a235af4f26f2b" + sha256 cellar: :any, arm64_sonoma: "7c3959d7853fcc15e1ab6b3b055f2165f531d8540e5db2d9a2592b87184924d0" + sha256 cellar: :any, arm64_ventura: "e407c2dd794757e3860066d77732f6998fac507b1860362af1baaa8b5e9acf98" + sha256 cellar: :any, sonoma: "3856f20ad9c9183111715003cd046a7250909518bac616441801e94308cfcba0" + sha256 cellar: :any, ventura: "2ff0125a6ac66224dbecb0a9e7f2921ebcdf888c236b60825bbef75b1d886e55" + sha256 cellar: :any_skip_relocation, arm64_linux: "5791a57b441f2058584a87371c09681e707592905781d1ddd80001db17db313f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9e7aa34877ea255544a9ae76e7935509fd89ba1bfde53698aca816747fd1e76" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" + sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/b0/ee/9b19140fe824b367c04c5e1b369942dd754c4c5462d5674002f75c4dedc1/certifi-2024.8.30.tar.gz" + sha256 "bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9" + 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 "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/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 "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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.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..332dad13c29ea --- /dev/null +++ b/Formula/c/cloudflare-quiche.rb @@ -0,0 +1,70 @@ +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.2", + revision: "28cb72b7c6a1f134f4d2e2f36ed04a81e113a0a6" + 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_sequoia: "324c6c5f60ef9e19e18555a94b15d76645b0348e6222c81790b7a8033cf1c122" + sha256 cellar: :any, arm64_sonoma: "ce46532106028067d8aac3979abf679093363c53c2f4ea4eed8a36efad2d556d" + sha256 cellar: :any, arm64_ventura: "b75d581d95be7fec1a274c2d9bc29068a6338d4359e6a5f772500aa99af1706b" + sha256 cellar: :any, sonoma: "e9cfbcf26a86579bc0458d16e97f4349df02698a394bb58f416b3c71e24d8ca7" + sha256 cellar: :any, ventura: "d365dedaf43b07242df7251495cfe241c0cb0b3791be130b26e6cf5c017329d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f3d1f486469db34a48a4054b4ae80641737551791990720eddd1e5c891fc1f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f02d9c5eee232278edf74c2da0c8e828c5693f3aac1bc618d75945822e41d04" + 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", "-j", "1", "--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 + lib.install "target/release/#{shared_library("libquiche")}" + if OS.mac? + mv "#{lib}/libquiche.dylib", "#{lib}/libquiche.#{version.major_minor_patch}.dylib" + lib.install_symlink "#{lib}/libquiche.#{version.major_minor_patch}.dylib" => "#{lib}/libquiche.dylib" + else + mv "#{lib}/libquiche.so", "#{lib}/libquiche.so.#{version.major_minor_patch}" + lib.install_symlink "#{lib}/libquiche.so.#{version.major_minor_patch}" => "#{lib}/libquiche.so.#{version.major}" + lib.install_symlink "#{lib}/libquiche.so.#{version.major_minor_patch}" => "#{lib}/libquiche.so" + end + + # 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..fbfda01ce7b63 --- /dev/null +++ b/Formula/c/cloudflare-wrangler.rb @@ -0,0 +1,29 @@ +class CloudflareWrangler < Formula + desc "CLI tool for Cloudflare Workers" + homepage "https://github.com/cloudflare/workers-sdk" + url "https://registry.npmjs.org/wrangler/-/wrangler-4.15.2.tgz" + sha256 "66548ce6af18f898258496be306c4a769e69aa7cf0ee954fc586d1027ba67749" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "681b179918dbf1e06690c305a50d36046beb9c5a1f2f831bdcb554815225ed9d" + sha256 cellar: :any, arm64_sonoma: "681b179918dbf1e06690c305a50d36046beb9c5a1f2f831bdcb554815225ed9d" + sha256 cellar: :any, arm64_ventura: "681b179918dbf1e06690c305a50d36046beb9c5a1f2f831bdcb554815225ed9d" + sha256 sonoma: "573211fee0fec2a960ad367d7800da8b259fb64055492ddde949d10c9b3935ac" + sha256 ventura: "573211fee0fec2a960ad367d7800da8b259fb64055492ddde949d10c9b3935ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "b626809d065175895a4ba6d5b204bf22ed9505bc00c5b952b8c628019c352bec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ae6224c4078cc29df701ad97fb1c7c6699ac0358358cedda83c0dc7a451ea93" + 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..fc45ca8d6461a --- /dev/null +++ b/Formula/c/cloudflared.rb @@ -0,0 +1,44 @@ +class Cloudflared < Formula + desc "Cloudflare Tunnel client (formerly Argo Tunnel)" + homepage "https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide" + url "https://github.com/cloudflare/cloudflared/archive/refs/tags/2025.5.0.tar.gz" + sha256 "956e9cf01b5f3735a7f032eb1c7f1977345b4bca5997ce6c8fb7daf5f15d8fe8" + license "Apache-2.0" + head "https://github.com/cloudflare/cloudflared.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "974bf7430857d1dd6daaa5400c373cae875f464a9c2a9fb3e0608913fb0bbeec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d4f60667540f577b82784c6a674ea8cbadb3a1629627fc019a7f075ba1042e0a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cdf16454ecc2fcc285ec76f683c10e9fa0d62b45afee18d470b8771b4889e03b" + sha256 cellar: :any_skip_relocation, sonoma: "85b16789b560619f53fd2cffc5e20fea285ebd95f96b829b9aba7edba40e6ad6" + sha256 cellar: :any_skip_relocation, ventura: "a35bf2b0750e6278855a2b929959df8e1f5c09d007c1f1aff7e33955686a1feb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a67987f86336cdc31764f3b30fa46a54914e1db4c26acc022da5ca0c3c58f57" + end + + depends_on "go" => :build + + def install + system "make", "install", + "VERSION=#{version}", + "DATE=#{time.iso8601}", + "PACKAGE_MANAGER=#{tap.user}", + "PREFIX=#{prefix}" + 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") + end +end diff --git a/Formula/c/cloudformation-cli.rb b/Formula/c/cloudformation-cli.rb new file mode 100644 index 0000000000000..4375f9a779977 --- /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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ba79f959879ed5aab895484307930ff3299f3642ccd62b2533e3ab3a5d3aa9c7" + sha256 cellar: :any, arm64_sonoma: "a4cad543270d232e1f72f7e1e8adedf530a2d691eb493b57af68cdf0c14080d4" + sha256 cellar: :any, arm64_ventura: "8151e881a695810c7ee4b336302bb3f945584df750b9ac8c8861cd7d0e9f0f17" + sha256 cellar: :any, sonoma: "f5fa412f4167c7870c6ac1545b6e29c72a846fb749f58d971e647bd44863b1ff" + sha256 cellar: :any, ventura: "8238dceaedfdf1356cc47d3bad9080e213c47e1939bf50408a4050bb4d03a069" + sha256 cellar: :any_skip_relocation, arm64_linux: "6685fc8f3baddad9e65afdec02d7bcf266c55b3ac21fbf71b94a5e121c98abca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e2a0b1703d5a14a5c328eae34d86d6e74934f2252c9d07853b4d39aea25424a4" + end + + depends_on "rust" => :build # for pydantic + depends_on "go" => :test + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "aws-sam-translator" do + url "https://files.pythonhosted.org/packages/61/8c/4ea1c5fafdec02f2b3a91d60889219a42c18f5c3dd93ec13ef985e4249f6/aws_sam_translator-1.95.0.tar.gz" + sha256 "fd2b891fc4cbdde1e06130eaf2710de5cc74442a656b7859b3840691144494cf" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/f9/1c/3901ff3ea6a9ddc7de17aade70b4ee2c25edd91f0a772bdb3419b58014a2/boto3-1.37.24.tar.gz" + sha256 "1d3c6fc63a9efba0af8b531ec6b7f7c6b0ef197bf3dcd875f03c9097ac68b58f" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/39/a3/b42468ef87f3282059a7a4b5533437d1f3d364120e724304d6ddf89004ce/botocore-1.37.24.tar.gz" + sha256 "a0bcc3c376a371f2c11afcbcc9917010c1c0a701d0e45d1ea3ec3bddeb06a8ff" + 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/ab/e5/155cad94f2162268cb5acd56e164bb2f9e146a490b5f68ae881686cd3819/cfn_lint-1.32.1.tar.gz" + sha256 "10282c0ec7fc6391da4877d9381a6b954f3c54ddcc0d3c97ee86f4783b5ae680" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/1e/e6/6f7b3aea60930b03545dfc5030a8046d18f5f0f1bafcf3c32a7229d0981f/cloudformation-cli-java-plugin-2.1.1.tar.gz" + sha256 "e783370ab32dddcd6257df959c440253a9084208e3ef915ae8edb95fa7875910" + 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/82/26/01514ec525bbeb2cd166347e5c33e2aa5ec39406fcf24d91a884a6d72e96/hypothesis-6.130.6.tar.gz" + sha256 "994abd048924e365dbb8c21e3ea44c2ac576e02fa3d34b04288281768ae83b53" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz" + sha256 "3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz" + sha256 "307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/93/a3/698b87a4d4d303d7c5f62ea5fbf7a79cab236ccfbd0a17847b7f77f8163e/pydantic-2.11.1.tar.gz" + sha256 "442557d2910e75c991c39f4b4ab18963d57b9b55122c8b2a9cd176d8c29ce968" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/b9/05/91ce14dfd5a3a99555fce436318cc0fd1f08c4daa32b3248ad63669ea8b4/pydantic_core-2.33.0.tar.gz" + sha256 "40eb8af662ba409c3cbf4a8150ad32ae73514cd7cb1f1a2113af39763dd616b3" + 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/ae/3c/c9d525a414d506893f0cd8a8d0de7706446213181570cdbd766691164e40/pytest-8.3.5.tar.gz" + sha256 "f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" + 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/93/e5/89654b4354b10e89969a74130f391b017dbdc113ce27f0e8ff9fa23e44e1/pytest-random-order-1.1.1.tar.gz" + sha256 "4472d7d34f1f1c5f3a359c4ffc5c13ed065232f31eca19c8844c1ab406e79080" + 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 "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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/0f/ec/aa1a215e5c126fe5decbee2e107468f51d9ce190b9763cb649f76bb45938/s3transfer-0.11.4.tar.gz" + sha256 "559f161658e1cf0a911f45940552c696735f5c74e64362e515f333ebed87d679" + 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/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + 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/11/8a/5a7fd6284fa8caac23a26c9ddf9c30485a48169344b4bd3b0f02fef1890f/sympy-1.13.3.tar.gz" + sha256 "b27fd2c6530e0ab39e275fc9b683895367e51d5da91baa8d3d64db2565fec4d9" + 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-extensions" do + url "https://files.pythonhosted.org/packages/0e/3e/b00a62db91a83fff600de219b6ea9908e6918664899a2d85db222f4fbf19/typing_extensions-4.13.0.tar.gz" + sha256 "0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..33b695b0b212f --- /dev/null +++ b/Formula/c/cloudformation-guard.rb @@ -0,0 +1,52 @@ +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_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 + + 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..bfffd73f51606 --- /dev/null +++ b/Formula/c/cloudfoundry-cli.rb @@ -0,0 +1,43 @@ +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.0.tar.gz" + sha256 "44abf756a7ced0fd6dc12d6cb87c26aac5b79a5c6a6871b7f57aa1864521d437" + 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_sequoia: "979ed2b67372ecf27e871ca4ba989d276337b4eb42e0469f6f165031d376b79d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "979ed2b67372ecf27e871ca4ba989d276337b4eb42e0469f6f165031d376b79d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "979ed2b67372ecf27e871ca4ba989d276337b4eb42e0469f6f165031d376b79d" + sha256 cellar: :any_skip_relocation, sonoma: "096615d910f2d95af59cea9df2bda5a8c330e96685fce9361e3fcd992675f973" + sha256 cellar: :any_skip_relocation, ventura: "096615d910f2d95af59cea9df2bda5a8c330e96685fce9361e3fcd992675f973" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13f87f8c6ed6cb74bc5c049ddd6364113ef9fbcc5b0bc8759d44d40a33b36c53" + 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..ed5cba731e733 --- /dev/null +++ b/Formula/c/cloudfox.rb @@ -0,0 +1,34 @@ +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_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, 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..9509eeb9ab69e --- /dev/null +++ b/Formula/c/cloudiscovery.rb @@ -0,0 +1,123 @@ +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 3 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "166757c19b4069447bbb1a41e60be7e734d61f845cb0f951fe7410a099a87e57" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "064a3e7e97a886909f4fb368dcebef7707e3f8ecce081af90e096c01792fd6d1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9bf4aff37f693f03a1c5487cb10091b711d2da575107da81db51d5cafdce814b" + sha256 cellar: :any_skip_relocation, sonoma: "078273ecd102d192d38ded37f8f768467b592302c8b58b7b0d9e5097ee41e158" + sha256 cellar: :any_skip_relocation, ventura: "3e3e859e0ad0cfcf0ce7fa5a0063304194345ecb6c47c03c560b35fddb02c41c" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3895cb0a39abcd9fdf74f527894fbe09dad23464b0356884abee1ff81f146ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d88b7b392ea5615d256ec973cd48d482570d6a8b6d3fc2f703a72443c042fa3" + end + + deprecate! date: "2024-10-11", because: :unmaintained + + depends_on "python@3.12" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b8/29/10988ceaa300ddc628cb899875d85d9998e3da4803226398e002d95b2741/boto3-1.35.39.tar.gz" + sha256 "670f811c65e3c5fe4ed8c8d69be0b44b1d649e992c0fc16de43816d1188f88f1" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/28/d83dbd69d7015892b53ada4fded79a5bc1b7d77259361eb8302f88c2da81/botocore-1.35.39.tar.gz" + sha256 "cb7f851933b5ccc2fba4f0a8b846252410aa0efac5bfbe93b82d10801f5f8e90" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/c3/38/a0f315319737ecf45b4319a8cd1f3a908e29d9277b46942263292115eee7/cachetools-5.5.0.tar.gz" + sha256 "2cc24fb4cbe39633fb7badd9db9ca6295d766d9c2995f245725a46715d050f2a" + 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 "graphviz" do + url "https://files.pythonhosted.org/packages/fa/83/5a40d19b8347f017e417710907f824915fba411a9befd092e52746b63e9f/graphviz-0.20.3.zip" + sha256 "09d6bc81e6a9fa392e7ba52135a9d49f1ed62526f96499325930e87ca1b5925d" + 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 "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 "s3transfer" do + url "https://files.pythonhosted.org/packages/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "typed-ast" do + url "https://files.pythonhosted.org/packages/f9/7e/a424029f350aa8078b75fd0d360a787a273ca753a678d1104c5fa4f3072a/typed_ast-1.5.5.tar.gz" + sha256 "94282f7a354f36ef5dbce0ef3467ebf6a258e370ab33d5b40c249fa996e590dd" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..a67c700523e5f --- /dev/null +++ b/Formula/c/cloudlist.rb @@ -0,0 +1,30 @@ +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: "main" + + bottle do + 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, 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..28ec294be582e --- /dev/null +++ b/Formula/c/cloudpan189-go.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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, 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..99163e080f4de --- /dev/null +++ b/Formula/c/cloudprober.rb @@ -0,0 +1,32 @@ +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.0.tar.gz" + sha256 "332e6c68cf007e2d8b7d36f20f81480cf3846f8b398c97afdcbc033c8794a2a2" + license "Apache-2.0" + head "https://github.com/cloudprober/cloudprober.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46096a2c51f49716dc8c1a1daec8974a5c99b75c641e7fa777d696ddd10c019a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "96f8fe2b7d757a7702779658e9fed166a2d713c680e4856073a079dff03a7dbc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f5de765c5e288a798a494c96e5d867cccfba6fbcc00c7497fa2781055b2c696e" + sha256 cellar: :any_skip_relocation, sonoma: "820b6cc5d4db79a33cee6eb2ae21f17dae2280a70e19f0f92d5d75ca08c6d003" + sha256 cellar: :any_skip_relocation, ventura: "f411a7bf8fb63032aaa7326184b9656dea5b618407a4d986848d0744c356d26e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8fb1446b3138b9b3e4d476c37b833baf1a09246b34554d275262fe02983c294" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d96d68e2739e4bcfb1d7ae807e39f250cec137528fcb6d6df661aeda2a62629" + 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..580fb65a0b0d0 --- /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.19.2.tar.gz" + sha256 "d72abae4e4c47f4ea0bf206a8baf64103865b0115df7f60b6f49759ec82b328e" + 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_sequoia: "7aaab23f208cf29ee769f9d8731561640af1a3c56579428af2d69c946f4650b7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7aaab23f208cf29ee769f9d8731561640af1a3c56579428af2d69c946f4650b7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7aaab23f208cf29ee769f9d8731561640af1a3c56579428af2d69c946f4650b7" + sha256 cellar: :any_skip_relocation, sonoma: "f6d5e98690c92e9eeea4545a7adff6031dc005d38a37295a5b8d242ac8fcbce4" + sha256 cellar: :any_skip_relocation, ventura: "f6d5e98690c92e9eeea4545a7adff6031dc005d38a37295a5b8d242ac8fcbce4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1734538381b62d4e8b66bd1f76b0af95c438cb18443cbe6deae9be585d63c2c1" + 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..156bb4bcfcbf1 --- /dev/null +++ b/Formula/c/cloudsplaining.rb @@ -0,0 +1,154 @@ +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/6e/09/acb8e088d1c6cc6fc9d6d42c1e61168f36339f13b1ea8e54f9a7e93949d1/cloudsplaining-0.8.0.tar.gz" + sha256 "02029432316a56551e58296496bc80e4778a58468273dbcd61df4ed2c369ede4" + license "BSD-3-Clause" + revision 1 + head "https://github.com/salesforce/cloudsplaining.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "8d331007516b613d7f7a231074cf0257118633f54b4bb7c8d1d2ec0d03002405" + sha256 cellar: :any, arm64_sonoma: "6fa57b086927081a75e498a65082e30dd0c6d6d7a0fefcb14e7c8cb00b82222f" + sha256 cellar: :any, arm64_ventura: "381a418455895081eb5e694e96c0a52ba755172b254e87eebce767c4f7e61d36" + sha256 cellar: :any, sonoma: "87dd8d687bfdb6714586ada1b1d637720fddd7029dd33c8a45950bd534afcb4a" + sha256 cellar: :any, ventura: "188ab93171b1699f76b75612fb9b65a96aeecd1b9115475d82a28e262a7d4859" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a54202a7963306a9712deb09d015f899bca13310094c6e2d12e57e3ae7231c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c31e3539fac24555e4dd1c6f419c043068c6c666dec7272546066bc25858977" + end + + depends_on "rust" => :build # for orjson + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/f0/3c/adaf39ce1fb4afdd21b611e3d530b183bb7759c9b673d60db0e347fd4439/beautifulsoup4-4.13.3.tar.gz" + sha256 "1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/6b/e6/40f8c1fb52c02adad1c104c4c4ac0488bf8f2b1397f24db07779322e420b/boto3-1.37.7.tar.gz" + sha256 "ac2e022edcd6a94a2adbb21f0ad373a16557ec14a8910366bee0bbc7138fc72a" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/53/4b/096b2fac3ba92ace94f69f238eea9948af568b487c3898e9a8881bfe506b/botocore-1.37.7.tar.gz" + sha256 "2faeac11766db912bc444669b04359080b7b83b2f57a3906c77c8105b70ce1e8" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/e7/b8/91054601a2e05fd9060cb1baf56be5b24145817b059e078669e1099529c7/click-option-group-0.5.6.tar.gz" + sha256 "97d06703873518cc5038509443742b25069a3c7562d1ea72ff08bfadde1ce777" + 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 "markdown" do + url "https://files.pythonhosted.org/packages/54/28/3af612670f82f4c056911fbbbb42760255801b3068c48de792d354ff4472/markdown-3.7.tar.gz" + sha256 "2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/ae/f9/5dea21763eeff8c1590076918a446ea3d6140743e0e36f58f369928ed0f4/orjson-3.10.15.tar.gz" + sha256 "05ca7fe452a2e9d8d9d706a2984c95b9c2ebc5db417ce0b7a49b91d50642a23e" + end + + resource "policy-sentry" do + url "https://files.pythonhosted.org/packages/bc/4b/e03bbe626379bfee06c944a01ef25ad14ce30bc9dd86988dfda1cf343347/policy_sentry-0.14.0.tar.gz" + sha256 "5c52cebebad26e2360393f34af523c1685541d67b0dfd721b0779dbe9e327f1a" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/0f/ec/aa1a215e5c126fe5decbee2e107468f51d9ce190b9763cb649f76bb45938/s3transfer-0.11.4.tar.gz" + sha256 "559f161658e1cf0a911f45940552c696735f5c74e64362e515f333ebed87d679" + end + + resource "schema" do + url "https://files.pythonhosted.org/packages/d4/01/0ea2e66bad2f13271e93b729c653747614784d3ebde219679e41ccdceecd/schema-0.7.7.tar.gz" + sha256 "7da553abd2958a19dc2547c388cde53398b39196175a9be59ea1caf5ab0a1807" + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cloudsplaining", shells: [:fish, :zsh], 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..81bdd3ea9b8b2 --- /dev/null +++ b/Formula/c/clozure-cl.rb @@ -0,0 +1,82 @@ +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 + depends_on macos: :catalina # The GNU assembler frontend which ships macOS 10.14 is incompatible with clozure-ccl: https://github.com/Clozure/ccl/issues/271 + + 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..dc4adb8cd8f89 --- /dev/null +++ b/Formula/c/clp.rb @@ -0,0 +1,70 @@ +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_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..b8e0e0171ed13 --- /dev/null +++ b/Formula/c/clpbar.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, mojave: "6d00ea5044914b14d7e7c901eac63641085496b6fd474c9491e46109c6599709" + sha256 cellar: :any_skip_relocation, high_sierra: "eb3648e3cc14ab0712c6a71d3df6eab53bd66bad86a402df1716df3db09c0358" + sha256 cellar: :any_skip_relocation, sierra: "769dbb64e877ab1f52a496063bbfdac32911f38e6e25b4fc70a5cfe937923f5f" + sha256 cellar: :any_skip_relocation, el_capitan: "b54fa0ce24de6dda141e3fc025b67f2e0216b01a3664ec5992a98f8087881ddd" + 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..4db02afb38962 --- /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/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 + # 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..3b505030df922 --- /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.8.2", + revision: "79ae3d046454586dc5ababd1f45c9791fdb5bbc8" + 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_sequoia: "522691a47f0259553b8efbe3e4d9eaed15b3b494d11891b1bc146b5e94317e66" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4c7ded21106ff04a7acccb9bdfa5116c3baf79b157eb0010f0d847d3b9c118fa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3d72d4a2b48214e15e9fb7129af75dcdcec1a237d91c6dbbde6151ba12a027c8" + sha256 cellar: :any_skip_relocation, sonoma: "b51bf4f7a8bb7154ae0ac8ed24b554c8d1bd684a0bfe386201807dd56767d6ea" + sha256 cellar: :any_skip_relocation, ventura: "b4ee0e75527edf221443ebfb53a500d538ecae60d4b06959339657963ef44893" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da73b7cf561faedfb17ec642a0adde6ab5dddedf4e289bfa663069e7875be537" + 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..74b37e9f9261b --- /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.10.1.tar.gz" + sha256 "2d4049d72657d9f3fcf9a938389356888dd193994b63f3bb26c4543620bdc18e" + 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_sequoia: "d725b2fd5a3156a1901f7ff972bc1af38a37db7ac0166e6ae93e527f7edf759a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d725b2fd5a3156a1901f7ff972bc1af38a37db7ac0166e6ae93e527f7edf759a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d725b2fd5a3156a1901f7ff972bc1af38a37db7ac0166e6ae93e527f7edf759a" + sha256 cellar: :any_skip_relocation, sonoma: "d8748795326aedba70f298c68be2dddea7d57420837693db0d35c13f716cbe3c" + sha256 cellar: :any_skip_relocation, ventura: "d8748795326aedba70f298c68be2dddea7d57420837693db0d35c13f716cbe3c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3907ff21bb74397156f0b0ac2737ff492579ba535d90ab6171baae5247a1b0a" + 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..8b30289515f95 --- /dev/null +++ b/Formula/c/clzip.rb @@ -0,0 +1,37 @@ +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_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..c0effc47fa298 --- /dev/null +++ b/Formula/c/cmake-docs.rb @@ -0,0 +1,42 @@ +class CmakeDocs < Formula + desc "Documentation for CMake" + homepage "https://www.cmake.org/" + url "https://github.com/Kitware/CMake/releases/download/v4.0.2/cmake-4.0.2.tar.gz" + mirror "http://fresh-center.net/linux/misc/cmake-4.0.2.tar.gz" + mirror "http://fresh-center.net/linux/misc/legacy/cmake-4.0.2.tar.gz" + sha256 "1c3a82c8ca7cf12e0b17178f9d0c32f7ac773bd5651a98fcfd80fbf4977f8d48" + 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, arm64_sequoia: "18befc0d468df5072a1cacd64d34e0a8ec2ab515e3c7303712d50819538af840" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "18befc0d468df5072a1cacd64d34e0a8ec2ab515e3c7303712d50819538af840" + sha256 cellar: :any_skip_relocation, arm64_ventura: "18befc0d468df5072a1cacd64d34e0a8ec2ab515e3c7303712d50819538af840" + sha256 cellar: :any_skip_relocation, sonoma: "01011f228e4eee6a204848b92e7e148143020695407919e6137dfd21f0f05cd2" + sha256 cellar: :any_skip_relocation, ventura: "01011f228e4eee6a204848b92e7e148143020695407919e6137dfd21f0f05cd2" + sha256 cellar: :any_skip_relocation, arm64_linux: "18befc0d468df5072a1cacd64d34e0a8ec2ab515e3c7303712d50819538af840" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18befc0d468df5072a1cacd64d34e0a8ec2ab515e3c7303712d50819538af840" + end + + depends_on "cmake" => :build + depends_on "sphinx-doc" => :build + + def install + system "cmake", "-S", "Utilities/Sphinx", "-B", "build", *std_cmake_args, + "-DCMAKE_DOC_DIR=share/doc/cmake", + "-DCMAKE_MAN_DIR=share/man", + "-DSPHINX_MAN=ON", + "-DSPHINX_HTML=ON" + 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..4508a1242cf60 --- /dev/null +++ b/Formula/c/cmake-language-server.rb @@ -0,0 +1,55 @@ +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 + sha256 cellar: :any_skip_relocation, all: "196609d5f168161292e11fb6799acd9b4c907e1a81a9c476848e981aae23e4a4" + end + + depends_on "python@3.13" + + 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 + virtualenv_install_with_resources + 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" + + output = pipe_output(bin/"cmake-language-server", input) + + assert_match(/^Content-Length: \d+/i, output) + + assert_match version.to_s, shell_output("#{bin}/cmake-language-server --version") + end +end diff --git a/Formula/c/cmake-lint.rb b/Formula/c/cmake-lint.rb new file mode 100644 index 0000000000000..3a765d60964dd --- /dev/null +++ b/Formula/c/cmake-lint.rb @@ -0,0 +1,31 @@ +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 + sha256 cellar: :any_skip_relocation, all: "53b0db3fb46846816cfea2d2fcf2e24bb981b4dd383d160b273461456c9bbd25" + end + + depends_on "python@3.13" + + 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..4b689ab5c1a13 --- /dev/null +++ b/Formula/c/cmake.rb @@ -0,0 +1,90 @@ +class Cmake < Formula + desc "Cross-platform make" + homepage "https://www.cmake.org/" + url "https://github.com/Kitware/CMake/releases/download/v4.0.2/cmake-4.0.2.tar.gz" + mirror "http://fresh-center.net/linux/misc/cmake-4.0.2.tar.gz" + mirror "http://fresh-center.net/linux/misc/legacy/cmake-4.0.2.tar.gz" + sha256 "1c3a82c8ca7cf12e0b17178f9d0c32f7ac773bd5651a98fcfd80fbf4977f8d48" + 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_sequoia: "7bd4605b03b0dbf10d547e2ffa34166acd8e77f8f76dac0485d5376715829130" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0fd627884d0c2819a5c1c100ca7352247c40ca0bd811237139fb50606d78db23" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f4182d37a97d4c4979c9ad22ab7036faa4d965210b9285c0a20144be02578ee6" + sha256 cellar: :any_skip_relocation, sequoia: "91841ca89f8807fe911dfc60d8d72775119dfbe0c105fe4f4793fc59ec281954" + sha256 cellar: :any_skip_relocation, sonoma: "a5999889dd5a97f189fd7ff78b9036cf60c10dc72905c7384f743722d214c460" + sha256 cellar: :any_skip_relocation, ventura: "5b5d12bb69a5bae6ea3ea7ddf0c7356db688959337cdb52f7bb66dc7ca2a1807" + sha256 cellar: :any_skip_relocation, arm64_linux: "9248442ee82a1b3fac2e9b067b0bbe618e400c90947663e706d0d1a1a122133f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23429f1cc5f10a318bc8ad42eeb32396b09e0a4f56f28535eb06b606bbde987c" + end + + uses_from_macos "ncurses" + + on_linux do + depends_on "openssl@3" + end + + conflicts_with cask: "cmake" + + # 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 + # Work around "error: no member named 'signbit' in the global namespace" + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? && MacOS.version == :high_sierra + + 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..536340685b7cf --- /dev/null +++ b/Formula/c/cmark-gfm.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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 + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *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..ad658fe8f5415 --- /dev/null +++ b/Formula/c/cmark.rb @@ -0,0 +1,32 @@ +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_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..a1af16e532464 --- /dev/null +++ b/Formula/c/cmatrix.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, mojave: "1b3d3155c87c8f2b788fe18c3e72f04af4e79c609030e3447c3e17f9d3870c7b" + sha256 cellar: :any_skip_relocation, high_sierra: "2c3b0ce73a2f89ece3783885e44aba5f584268768283e650d8b6552bc00f058d" + 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..09cc71d854d0b --- /dev/null +++ b/Formula/c/cmctl.rb @@ -0,0 +1,74 @@ +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.2.0.tar.gz" + sha256 "b4c6c88c798f9e8b8b06c6fbeb64fc11eb946b08828a994a44b7e630ffbdaa7b" + license "Apache-2.0" + head "https://github.com/cert-manager/cmctl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d55363e9112d7eb0669d0afd9bebaed6aaa4531e332201f8fff5bf007bd21e71" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e399616de9badc5575d22baaf20d5c5452c1a3427ba0e5526b6265907e3e58cb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ea9f09d98bf6dd0d66609a131b1011266ba2d24c23124d311ef51482502b111b" + sha256 cellar: :any_skip_relocation, sonoma: "2408e81e4faafa8b520ae42a11df5fb348b1bdd539819f269ab7d166e6e36d2a" + sha256 cellar: :any_skip_relocation, ventura: "2a462c18fc1abe0da3d2095387eb10bf42aafddda80d80c4a1a19bdde52eb8bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "61a962f1faf16288d67bdb0c09ae8597bc813a020537cdd1f6c6d3cdd1003006" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ca89dccfcce132bdbe4d4ddf38f76bc1175e9c9897e4bcd43abd5abb1ae3a18" + 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..84fac44cc0656 --- /dev/null +++ b/Formula/c/cmdshelf.rb @@ -0,0 +1,32 @@ +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"] + + bottle do + rebuild 4 + 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..c23617c05f39a --- /dev/null +++ b/Formula/c/cmigemo.rb @@ -0,0 +1,69 @@ +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 + + bottle do + 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, mojave: "28db47c1cedcff4dc6ee2d48bd07a147ae18f400e035e6a583d6b8e6cb36dfa1" + sha256 cellar: :any, high_sierra: "a56e9422e30145d388649e9c85bf814adb58688c2c5e374385f4260b8daa049a" + sha256 cellar: :any, sierra: "612544771bde1676044d35e8cb1f64134788580b76c59ced3b651e8996d46b51" + sha256 cellar: :any, el_capitan: "866dfa4f493c088c1b2eb3cff23ed04e33862f7bc5dcff0976ce5b7cb4835dd2" + 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..fb260fbf1cb93 --- /dev/null +++ b/Formula/c/cminpack.rb @@ -0,0 +1,74 @@ +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_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..6d53e9347f2c8 --- /dev/null +++ b/Formula/c/cmix.rb @@ -0,0 +1,31 @@ +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" + + bottle do + 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..d03bd50b424a1 --- /dev/null +++ b/Formula/c/cmocka.rb @@ -0,0 +1,58 @@ +class Cmocka < Formula + desc "Unit testing framework for C" + homepage "https://cmocka.org/" + url "https://cmocka.org/files/1.1/cmocka-1.1.7.tar.xz" + sha256 "810570eb0b8d64804331f82b29ff47c790ce9cd6b163e98d47a4807047ecad82" + license "Apache-2.0" + head "https://git.cryptomilk.org/projects/cmocka.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f59c0f3dcb57570a55bc13e96ac8d5b7710dd61289c9b75d1bf038d0866648ed" + sha256 cellar: :any, arm64_sonoma: "9fe186aa7c700963f6f86149365ef35b0791545ba2e831149d553f08fb830306" + sha256 cellar: :any, arm64_ventura: "59ce3786b76ea0bad5cf63974c4c341a967f562f6beeebac2714b9a6cdb8ee69" + sha256 cellar: :any, arm64_monterey: "655c370c95261b0a2497884db61e2d93e016b3ac12c895bd177c4937fe8382b9" + sha256 cellar: :any, arm64_big_sur: "f834bde77c929e72148871eb2ebb902b6f746fc5c80581027ac3e2c8eba4e695" + sha256 cellar: :any, sonoma: "bcdc681ebb540775ab065058b124df1d9c9549642cf25da0439e80abe3e17027" + sha256 cellar: :any, ventura: "1af6df21cc146d414b8c6b03b995cb99e18ee020efcf34c6be4f2724684797ad" + sha256 cellar: :any, monterey: "b5120aab3d6d5daf7a4166c0bd95b622d057bdc519ce9d8792ac3174effcec26" + sha256 cellar: :any, big_sur: "4bdc48b2707b15f13d671f193de414f70a905e4a6e62e7f3ad823c0e01ec9f13" + sha256 cellar: :any_skip_relocation, arm64_linux: "de5b9bb0f9c9aa825c52953ca9c36ff81ab88a05b5cd0dcbe1a1ada6cfeadb07" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3ac6a9be93cbd9ff420c38ff86c3c5559fe2ab584423f8bddd04c77f7235ab3" + 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..3280dd14446ed --- /dev/null +++ b/Formula/c/cmockery.rb @@ -0,0 +1,55 @@ +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 + + 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/formula-patches/85fa66a9/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..40f9885918179 --- /dev/null +++ b/Formula/c/cmockery2.rb @@ -0,0 +1,48 @@ +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, mojave: "a36cbb449fcca235226fcfa94439f2370f22d3d6f1986c710c1e640959f8a271" + sha256 cellar: :any, high_sierra: "3651caa0ed8c5e2ec5dc0fe8932a53e20c2af28d3887161d1cdfe9c46fb9f220" + sha256 cellar: :any, sierra: "661b4a8751a4dbe7e52b19cd9452d8b7dd61c929d73da27ac4fca5623a0dff6c" + sha256 cellar: :any, el_capitan: "61b64aeaf89d205742bbb254148502cd2df83bcf05d20377bdce8637f275bee5" + 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 + + 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..8124af4aae049 --- /dev/null +++ b/Formula/c/cmrc.rb @@ -0,0 +1,46 @@ +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 + + 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..5a5c9155b8ca8 --- /dev/null +++ b/Formula/c/cmt.rb @@ -0,0 +1,57 @@ +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, mojave: "ee763541c32889f0840a7c143972ba194eeafdbbbfa38008a8dd2e851f2382b8" + 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..8194110fe523e --- /dev/null +++ b/Formula/c/cmu-pocketsphinx.rb @@ -0,0 +1,33 @@ +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: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + 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..5dbab8ba13388 --- /dev/null +++ b/Formula/c/cmuclmtk.rb @@ -0,0 +1,122 @@ +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 + + bottle do + 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, mojave: "5c71a1746a8ca516dc5d11858a7d0d85341cafeea31797b926eba3a9ed83d9ea" + sha256 cellar: :any, high_sierra: "85a6d2a8fcad4e2b6e7d9d22ec74dd5e5f463dabc5b2f01373d3a48178b2ce6e" + sha256 cellar: :any, sierra: "716c78af6b276392a20fb02d58ff60e705509117da932d62d3ff8c6e4dd0bf5d" + sha256 cellar: :any, el_capitan: "c647327d709c3b4a93d5541f8b340d2726540c9efdcbc53d1124043c8c4989bd" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..2b2d0fc4b8b28 --- /dev/null +++ b/Formula/c/cmus.rb @@ -0,0 +1,54 @@ +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 1 + head "https://github.com/cmus/cmus.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "4074540115754218e8bf925e834c5a69c2951eb19493ac063e5c627b4d753de5" + sha256 arm64_sonoma: "b314cf008fbeff9ad8a760b195fd401664ce032569a2956178d3e9446b22d24f" + sha256 arm64_ventura: "abe20a3b224fbd98f698e7131208fd298a6aced10336f5f55a1156ecf1654e2e" + sha256 sonoma: "d9601411a0b749a5e379620985ac1f24d8ce566e744a7f24302964b1987b765e" + sha256 ventura: "9aac948ad9fab4826655c220590ac1f37fc0afb0d38c77bff081a6b0c104038e" + sha256 arm64_linux: "692eb54461a2b22de154ddbdd3507ca32ac2e4d249424cf246444bc66797d763" + sha256 x86_64_linux: "5ae15aefbec0e9633280d83a5d9eacbf5fb9682f18df4cf63a45584a75870f28" + end + + depends_on "pkgconf" => :build + depends_on "faad2" + depends_on "ffmpeg" + 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") + assert_match "ao", plugins + end +end diff --git a/Formula/c/cmusfm.rb b/Formula/c/cmusfm.rb new file mode 100644 index 0000000000000..4927e13b9281f --- /dev/null +++ b/Formula/c/cmusfm.rb @@ -0,0 +1,92 @@ +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" + + bottle do + 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..da7fb5ea19798 --- /dev/null +++ b/Formula/c/cnats.rb @@ -0,0 +1,42 @@ +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.10.1.tar.gz" + sha256 "1765533bbc1270ab7c89e3481b4778db7d1e7b4db2fa906b6602cd5c02846222" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "311bab357bd42525c9091898188dd7f31affbe0181281a7f8d1f4c04f1060283" + sha256 cellar: :any, arm64_sonoma: "e10e38c7ac7967776360767a9c7631f0ea32d33078b9ef5c40172af54101c24c" + sha256 cellar: :any, arm64_ventura: "a53d7f08299d8fd16c00e7920413c994332af53cceba4fbc7bdb16f82f69646d" + sha256 cellar: :any, sonoma: "2cced9c96fa88e2775c71596927403ac5022830e83bce66706ee928257876b0c" + sha256 cellar: :any, ventura: "e3f29e14fd84d143e79a2614600aef8b3adf194fda8aa4024fc337337eaa81d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "240af50bcf075ead0506a2a120c431ea2b2c6c3c3a923b60c8d3003d611092bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98abfc0b03a47a9c8d9884c4f68a236af40a2be2e42ac8e414f6b9211646e887" + 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..fae0c7d8c9025 --- /dev/null +++ b/Formula/c/cntb.rb @@ -0,0 +1,37 @@ +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_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, 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..867dfea231749 --- /dev/null +++ b/Formula/c/cntlm.rb @@ -0,0 +1,71 @@ +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 + + bottle do + rebuild 2 + 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 mojave: "79b1221fa60196d7670bb3cbcd6bab63490ba780222e7faf84404a57ac52d6ba" + sha256 high_sierra: "9a1bafd1930ba3ade9b8df892d9fd28a0c414750ee728a791886dd9c999d0173" + 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..779714fc7872c --- /dev/null +++ b/Formula/c/coal.rb @@ -0,0 +1,67 @@ +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.1/coal-3.0.1.tar.gz" + sha256 "b9609301baefbbf45b4e0f80865abc2b2dcbb69c323a55b0cd95f141959c478c" + 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_sequoia: "e2d87ef2038acd5dcf9756b87f66d478603dcf2e98bc7eba3aa8ed2455a326ad" + sha256 cellar: :any, arm64_sonoma: "f2ef50d3e832c5c63512cb927cc5a7a9e8624f9aa045e58a1433b62e54d9b295" + sha256 cellar: :any, arm64_ventura: "5915881cfc9032d711eba837fdbaa076ab45b23dffce110114778a2e65d6ce2a" + sha256 cellar: :any, sonoma: "28b03d78e18bca9541c8a186667a2cd59d9bf00c63011c7128af67451e7cb019" + sha256 cellar: :any, ventura: "51a4cd079554920b83c11f3177af2b2e4aa6d8496384dea819ada476163ab09f" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7a0eee745edc2ab275d7e4ae8fa3a7a4f8cf565da49e94c7a51d6aedb6367ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3909470b234c0176b176fc89c8378c2f778450cadadfe96cdf4a604d4534c5f" + 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.13" + + def python3 + "python3.13" + 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 diff --git a/Formula/c/cobalt.rb b/Formula/c/cobalt.rb new file mode 100644 index 0000000000000..09d40d5014b7f --- /dev/null +++ b/Formula/c/cobalt.rb @@ -0,0 +1,29 @@ +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.0.tar.gz" + sha256 "a425be77478230b25f5c64431e82633a35d03dd6719bf740e4ae6624a69ffca1" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7905ef78bb3e756be2089f0bf7957d77349548ca9252c023d47934b73ac990c0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e49c03ac7d5cbd1b84aeaa2d00853edcebb901e5d2586abc9324f0f850ee0d7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2c22c2fe56beb9508ea4a8b17fde0b753d5e280cf7f9a6ed8f472fae0a3e2d79" + sha256 cellar: :any_skip_relocation, sonoma: "4dd697c918d2ddeba21001a1137c4757000f61d608aea6fb6790dc580f24e0a3" + sha256 cellar: :any_skip_relocation, ventura: "07b06d6fa5007b9218cb3ac94bf33b70ac2ba1b277c77319570b1ec4964d8477" + sha256 cellar: :any_skip_relocation, arm64_linux: "302f4c25808c4f96f28439a3dbc27527f72864038387a7a6cf7a26d52018e897" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe587ed78c7928e4d6d07b5943addebf8805f0818fa12f4aaacf2d972ea2db55" + 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..824bf83d349b2 --- /dev/null +++ b/Formula/c/cobo-cli.rb @@ -0,0 +1,233 @@ +class CoboCli < Formula + include Language::Python::Virtualenv + + desc "Cobo Command-line Tool" + homepage "https://github.com/CoboGlobal/cobo-cli" + url "https://files.pythonhosted.org/packages/3a/07/a80c6fb19a005c81b20b344b6d3f4b3631563d732d6aa91acdc569503e49/cobo_cli-0.0.5.tar.gz" + sha256 "ae08b589fbf097c4cdac82e3802be2bf2faa98d7c710102c68c27cf6518dd98c" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "d5a8f6f864bce60e582cb73e9415a23ddbca53b543f29ea33eb67564110bf6cf" + sha256 cellar: :any, arm64_sonoma: "652be51343a462a3678ce3c57678694395c37c509a27a35bf1f32609850e8384" + sha256 cellar: :any, arm64_ventura: "d80cd0db285dc6e99f55079ad565efca256acf5254e893fea2daa8d6cfe83c2b" + sha256 cellar: :any, sonoma: "40d4ab83dfbd6ed44d1906c52c45e2b4dab041f6ad20a3eb5fd923a71fb51908" + sha256 cellar: :any, ventura: "3dd94d11b64260f1077fa488eb910fca49277a5e9fafb9b20d8f9a8e036a6bc2" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fdfa10d3b87c9f44eebd3c6a3f67b3397849a2a0c49edd255b8f9132dfef43a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1642e5cb6304cbf47ef746d55d38789f67264103b6b0913e2ccf2027a25e6632" + end + + depends_on "certifi" + depends_on "libsodium" + depends_on "libyaml" + depends_on "python@3.13" + depends_on "rust" + + uses_from_macos "libffi" + + 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/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz" + sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "dataclasses-json" do + url "https://files.pythonhosted.org/packages/64/a4/f71d9cf3a5ac257c993b5ca3f93df5f7fb395c725e7f1e6479d2514173c3/dataclasses_json-0.6.7.tar.gz" + sha256 "b6b3e528266ea45b9535223bc53ca645f5208833c29229e847b3f26a1cc55fc0" + + # poetry 2.0 build patch, upstream pr ref, https://github.com/lidatong/dataclasses-json/pull/554 + patch :DATA + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + 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 "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 "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "marshmallow" do + url "https://files.pythonhosted.org/packages/bd/5c/cbfa41491d6c83b36471f2a2f75602349d20a8f88afd94f83c1e68bbc298/marshmallow-3.25.0.tar.gz" + sha256 "5ba94a4eb68894ad6761a505eb225daf7e5cb7b4c32af62d4a45e9d42665bc31" + end + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz" + sha256 "75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/6a/c7/ca334c2ef6f2e046b1144fe4bb2a5da8a4c574e7f2ebf7e16b34a6a2fa92/pydantic-2.10.5.tar.gz" + sha256 "278b38dbbaec562011d659ee05f63346951b3a248a6f3642e1bc68894ea2b4ff" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/fc/01/f3e5ac5e7c25833db5eb555f7b7ab24cd6f8c322d3a3ad2d67a952dc0abc/pydantic_core-2.27.2.tar.gz" + sha256 "eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/73/7b/c58a586cd7d9ac66d2ee4ba60ca2d241fa837c02bca9bea80a9a8c3d22a9/pydantic_settings-2.7.1.tar.gz" + sha256 "10c9caad35e64bfb3c2fbf70a078c0e25cc92499782e5200747f942a065dec93" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/bc/57/e84d88dfe0aec03b7a2d4327012c1627ab5f03652216c63d49846d7a6c58/python-dotenv-1.0.1.tar.gz" + sha256 "e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca" + 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 "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/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz" + sha256 "cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff" + end + + resource "tomli-w" do + url "https://files.pythonhosted.org/packages/d4/19/b65f1a088ee23e37cdea415b357843eca8b1422a7b11a9eee6e35d4ec273/tomli_w-1.1.0.tar.gz" + sha256 "49e847a3a304d516a169a601184932ef0f6b61623fe680f836a2aa7128ed0d33" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + 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 "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/e6/30/fba0d96b4b5fbf5948ed3f4681f7da2f9f64512e1d303f94b4cc174c24a5/websocket_client-1.8.0.tar.gz" + sha256 "3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da" + end + + # add poetry 2.0 build patch, upstream pr ref, https://github.com/CoboGlobal/cobo-cli/pull/8 + patch do + url "https://github.com/CoboGlobal/cobo-cli/commit/a1b5c015ddbf9f635cb0d9638e879a909f4dba12.patch?full_index=1" + sha256 "d54e9fc183662e780b42ae4c84d31da04e10183599295ca36672e6048e2377e9" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cobo", shells: [:fish, :zsh], 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 + +__END__ +diff --git a/pyproject.toml b/pyproject.toml +index 93c5f21..9521dfe 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,12 +1,24 @@ +-[tool.poetry] ++[project] + name = "dataclasses-json" + version = "0.6.7" + description = "Easily serialize dataclasses to and from JSON." +-authors = ["Charles Li "] +-maintainers = ['Charles Li ', 'Georgiy Zubrienko ', 'Vitaliy Savitskiy ', 'Matthias Als '] ++authors = [ ++ { "name" = "Charles Li", "email" = "charles.dt.li@gmail.com" }, ++] ++maintainers = [ ++ { "name" = "Charles Li", "email" = "charles.dt.li@gmail.com" }, ++ { "name" = "Georgiy Zubrienko", "email" = "gzu@ecco.com" }, ++ { "name" = "Vitaliy Savitskiy", "email" = "visa@ecco.com" }, ++ { "name" = "Matthias Als", "email" = "mata@ecco.com>" }, ++] + license = 'MIT' + readme = "README.md" +-repository = 'https://github.com/lidatong/dataclasses-json' ++ ++[project.urls] ++Repository = 'https://github.com/lidatong/dataclasses-json' ++Changelog = "https://github.com/lidatong/dataclasses-json/releases" ++Documentation = "https://lidatong.github.io/dataclasses-json/" ++Issues = "https://github.com/lidatong/dataclasses-json/issues" + + [tool.poetry.dependencies] + python = "^3.7" +@@ -32,8 +44,3 @@ build-backend = "poetry_dynamic_versioning.backend" + + [tool.poetry-dynamic-versioning] + enable = false +- +-[tool.poetry.urls] +-changelog = "https://github.com/lidatong/dataclasses-json/releases" +-documentation = "https://lidatong.github.io/dataclasses-json/" +-issues = "https://github.com/lidatong/dataclasses-json/issues" diff --git a/Formula/c/cobra-cli.rb b/Formula/c/cobra-cli.rb new file mode 100644 index 0000000000000..bb05a9a0f3ff2 --- /dev/null +++ b/Formula/c/cobra-cli.rb @@ -0,0 +1,29 @@ +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" + + bottle do + 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, 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..a69b70c10c1e0 --- /dev/null +++ b/Formula/c/coccinelle.rb @@ -0,0 +1,71 @@ +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 2 + sha256 arm64_sequoia: "779d42bbb44aae1403be58912eec82d4a2dfda1506f02659a411e22496049cf0" + sha256 arm64_sonoma: "51cb6d4013905449b1a20a622cd95dce5ad64cdc37b6b92eda79ab7b23ed598b" + sha256 arm64_ventura: "cd9aeeaa7d72f22a8d9e4e7a211e0c634e045abc7be0ca46dfa5b69b8ae29769" + sha256 sonoma: "cd5a22c0db4ce7dbea0ba1b2c3306527f96b5830cdda41099d559faab14b8ef4" + sha256 ventura: "032e447251705797000b9e3e86afe2a5da3f96ec1d6d26d4492f9cd6336e8e32" + sha256 arm64_linux: "47bd69526b59084f30deed93c35ee9b4fa81494524489580f1a60cff5028d3a0" + sha256 x86_64_linux: "5a7edb3aa8cd3da9381de308c27b703a4026584f259eeed0257c2cacd560df6d" + 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.13" => :build + depends_on "ocaml" + depends_on "pcre" + + uses_from_macos "unzip" => :build + + def install + Dir.mktmpdir("opamroot") do |opamroot| + ENV["OPAMROOT"] = opamroot + ENV["OPAMYES"] = "1" + ENV["OPAMVERBOSE"] = "1" + system "opam", "init", "--no-setup", "--disable-sandboxing" + system "opam", "exec", "--", "opam", "install", ".", "--deps-only", "-y", "--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" + end + + 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/c/cocoapods.rb b/Formula/c/cocoapods.rb new file mode 100644 index 0000000000000..aa9d0698611d9 --- /dev/null +++ b/Formula/c/cocoapods.rb @@ -0,0 +1,37 @@ +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, 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", since: :catalina + + conflicts_with cask: "cocoapods", 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..41ee0eaa7c3f0 --- /dev/null +++ b/Formula/c/cocogitto.rb @@ -0,0 +1,52 @@ +class Cocogitto < Formula + desc "Conventional Commits toolbox" + homepage "https://docs.cocogitto.io/" + url "https://github.com/cocogitto/cocogitto/archive/refs/tags/6.3.0.tar.gz" + sha256 "bf78a06ec20cd33c4f9bcddb427067de34d005fb6d4a41727239b7b1e8e916e0" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "653bfecc7e5bf0d31506f6b7e0e6a39d42a1786df4320071e4bae07dadf57f0b" + sha256 cellar: :any, arm64_sonoma: "32504a5766eefb9b00ce51cb505f25c287c683bc244f29792113df3b8b7e2131" + sha256 cellar: :any, arm64_ventura: "0f133691154d002414e87fde8af45598f7e1bbb73db79cd0a36cdfadf7bc0978" + sha256 cellar: :any, sonoma: "de432bba61a74787063511a9c4346b036572c7579748af9056c583d9b0f22a8e" + sha256 cellar: :any, ventura: "3bc5fbfef19cf37d680111f4b16d9bc70f046ffcbd07f801d5ed09769724c8a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "abbe9fb10c06ade07ae9790a397ee02355f026fdcef62fa482733a5cd63dfac4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1fa05ff9b1e802473de9ababb53942b8c3aeb6ea3d7ca9aefbdf5a80e53aeb61" + 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..4080bd701b944 --- /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" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "25a6f46e119a250f8d10b8dd2df6a214823c1068b28fb5c332867e7b8ab8d2fd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6b8cf2ffa687f0c101bdc413edf820eb96c6642b31f94fba3142499e0f507e2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "19088d74ca2b35b02d63aec0edd71d0e38c6ec3054879b542f029f65f25a22e2" + sha256 cellar: :any_skip_relocation, sonoma: "edeff6b15686362384e4fa5334bca7d95393e27e47f9ca5a1401d4f6d1e596b8" + sha256 cellar: :any_skip_relocation, ventura: "5ea59853688e12fa9585572ecbfed6d46633eb9ac63aae0b4a22f7cef6babe0c" + sha256 cellar: :any_skip_relocation, arm64_linux: "0143d784e8e81c960cb5cf4b7aa2ecc52ae8e0fe539c1fabeb6224df88d43112" + sha256 cellar: :any_skip_relocation, x86_64_linux: "54bd43552fdf9f556039fdba27670f50e5fd699df7b967ff9648c05b3bd26059" + end + + depends_on "python@3.13" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/78/49/f3f17ec11c4a91fe79275c426658e509b07547f874b14c1a526d86a83fc8/anyio-4.6.0.tar.gz" + sha256 "137b4559cbb034c477165047febb6ff83f390fc3b20bf181c1fc0a728cb8beeb" + 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/74/fe/7d45fc7fb67dd3cdaef4430c882b0b655e18ca45cf792d5feefb15f18ca2/cpyparsing-2.4.7.2.4.0.tar.gz" + sha256 "ee3d2f262712ad252a640131687d1b25985127a5d9ba2e1200f3017165f2ee7d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/2d/4f/feb5e137aff82f7c7f3248267b97451da3644f6cdc218edfe549fb354127/prompt_toolkit-3.0.48.tar.gz" + sha256 "d6623ab0477a80df74e646bdbc93621143f5caf104206aa29294d53de1a03d90" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/18/c7/8c6872f7372eb6a6b2e4708b88419fb46b857f7a2e1892966b851cc79fc9/psutil-6.0.0.tar.gz" + sha256 "8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..dd682231b963d --- /dev/null +++ b/Formula/c/cocot.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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, mojave: "c5b0aa39597693d037438bd0f411965754539aaf50fbb2cb3b2a61082b6f4178" + sha256 cellar: :any_skip_relocation, high_sierra: "0070eb38e06043e3c1a4ad1b77205a6ed978ed300e8d0bb407391fecb191b050" + sha256 cellar: :any_skip_relocation, sierra: "a91ba93032e33b6a062b82f2df0b9170d5269cf0312d75eb6f16341fca54f9bd" + sha256 cellar: :any_skip_relocation, el_capitan: "60cbdadb074b019535319e5089d5c55c43b68e0b52a73b01cec3a9a8311e51a4" + 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..d1102a15c924e --- /dev/null +++ b/Formula/c/coda-cli.rb @@ -0,0 +1,80 @@ +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 + + 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 "openssl@3" + + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + end + + 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..a6ffa61fbd0c0 --- /dev/null +++ b/Formula/c/code-minimap.rb @@ -0,0 +1,33 @@ +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_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..b04ed83e103da --- /dev/null +++ b/Formula/c/code-server.rb @@ -0,0 +1,85 @@ +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.100.1.tgz" + sha256 "d7841a1a61b1403888b7fe2bef6c1a928a038dad52fad36fa2062ffe2bd98c84" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2e3a541a5a8441fff5980d2cf051deaa8ed6c1231dfc0f1bee25526b5399565" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "397fa2913a3dee751b32090bf8e005b4ba1c421457fd698115fd8ec9bf731609" + sha256 cellar: :any_skip_relocation, arm64_ventura: "19fd864c7ffbf5485ee62f7aa0b5a637050bc37a0ee9083e604a42a5678870be" + sha256 cellar: :any_skip_relocation, sonoma: "a9c8cccf7d9a6fa29377858c77ae5a2ee404ecb5a32a8ecb7b9355df76743f8f" + sha256 cellar: :any_skip_relocation, ventura: "1c2ddec151a4a6075e20980dcb2a717e00b86f66b8292233daba58f53b9a1fda" + sha256 cellar: :any_skip_relocation, arm64_linux: "58d93953c31333efc76c813139581b8743893538c310e38db18beb060aaa4097" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0724c1cb51bfc1a63cfb82215e3d15a6cd8c266911d7e4986b5903549217518a" + end + + depends_on "node@20" + + uses_from_macos "python" => :build + + on_linux do + depends_on "pkgconf" => :build + 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..321e1a47db7e3 --- /dev/null +++ b/Formula/c/code2prompt.rb @@ -0,0 +1,55 @@ +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/v3.0.2.tar.gz" + sha256 "08e45407b71bf5e5fb89930043b085cf8965a008dc5004d4aa4ac64db0e447e0" + license "MIT" + head "https://github.com/mufeedvh/code2prompt.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ffb0a37cd1c18cfce0671d5f12893bf3e76861adeed8aebd0877bb0e297722aa" + sha256 cellar: :any, arm64_sonoma: "bf804355c19b6f6be322938ed43f0cc80201f1b530a5fa26ef0f155326f19f5c" + sha256 cellar: :any, arm64_ventura: "2c8ece110e8e9691417400d8e011ed0954a9b7f3b160a3d0988632219cf0c5e3" + sha256 cellar: :any, sonoma: "a9a016853a6abfd026b1ab3db2205faf4da346be2fec686a5504b7eac87071a2" + sha256 cellar: :any, ventura: "7429f9f5fa52f3d55ce31b80a92feacbcf2d8dcd5a5a13ec5b3da1f50ff362a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "61242b4adb9b40caf4e07985b0f3e8296574322f18b60cf459812cf6e8197e09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef85b418af9acc67de01f42ac222b996933588a6f8d02cd7b162346aae8084ff" + 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..3eabd9505c38b --- /dev/null +++ b/Formula/c/codeberg-cli.rb @@ -0,0 +1,39 @@ +class CodebergCli < Formula + desc "CLI for Codeberg" + homepage "https://codeberg.org/Aviac/codeberg-cli" + url "https://codeberg.org/Aviac/codeberg-cli/archive/v0.4.11.tar.gz" + sha256 "15e637ebf3cbac0bfc4175939753db14f3536c8fb8b1ef57da3f93b14553f73c" + license "AGPL-3.0-or-later" + head "https://codeberg.org/Aviac/codeberg-cli.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "cd4dbc05182ca3546f636e0adeac3b23c187fe3ee64666fb54a03e0b213601bc" + sha256 cellar: :any, arm64_sonoma: "b7aab4dc62e541c5829689a7772881f75e9f84c6c802a983695584780d4c20cb" + sha256 cellar: :any, arm64_ventura: "8406ae43d5de60f8ba5c2d29f012c19b770fb4864ed276f14b3e79b2df70baf7" + sha256 cellar: :any, sonoma: "b6a10266f12cc59094ebec6ccfe7cd4e8dd2b60e63003c6d4d6f914b651a888f" + sha256 cellar: :any, ventura: "8eb3120448b7662097e091f060860d9e83786925e346973850281eca92665d73" + sha256 cellar: :any_skip_relocation, arm64_linux: "e783102e9bc4a84144cba4341f6c73819be53c7e119efa1b1a334b1b3cb8a98b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a02de1c89ab410a520b842500995aad13b214475f16cf7b9be504351dbcca54" + 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") + assert_match "Couldn't find login data", output + end +end diff --git a/Formula/c/codec2.rb b/Formula/c/codec2.rb new file mode 100644 index 0000000000000..b33bae79459cf --- /dev/null +++ b/Formula/c/codec2.rb @@ -0,0 +1,53 @@ +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_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..5e0ccc683306d --- /dev/null +++ b/Formula/c/codecov-cli.rb @@ -0,0 +1,151 @@ +class CodecovCli < Formula + include Language::Python::Virtualenv + + desc "Codecov's command-line interface" + homepage "https://cli.codecov.io/" + url "https://files.pythonhosted.org/packages/64/e3/d5e09f0431304bc495dd84b1f846c801d08639bc3a8e8c3544d4c8348c52/codecov_cli-10.4.0.tar.gz" + sha256 "714618fc7797fb1e369e3c9e23125d323ff0bc4d1bf8cdeace5d8c7562398c4a" + license "Apache-2.0" + revision 1 + head "https://github.com/codecov/codecov-cli.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f3b874bb7bf12ed69bb360119d6ff2b9660898c8eeef73ca119743af92755412" + sha256 cellar: :any, arm64_sonoma: "8c48ca48c74a5d66bd8ab5875fb1276fa1435fe50cfc652263b3afab98ca8e54" + sha256 cellar: :any, arm64_ventura: "72fb2e9fbe3185c1eca5d5f40df1738d091ee74cba1119fce057a2e919bcae9c" + sha256 cellar: :any, sonoma: "9aea021f9dad7ccab24d3663acd85d695975bc92078a25e533385726cfb773e8" + sha256 cellar: :any, ventura: "bb0a4661063229256f6206b16001c2439eae988d1849526ff62896e222192c8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "a41dbdef0f4bbf15afbb6fbb2482dff8b4d0c7728f44610c09b0f3e685ac9637" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f4aacde43fa4dc077f5766d2d56c2975ab7d3b46c6c17733d1c7d9d905a7357" + end + + depends_on "rust" => :build + depends_on "libyaml" + depends_on "python@3.13" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/e8/9e/c05b3920a3b7d20d3d3310465f50348e5b3694f4f88c6daf736eef3024c4/certifi-2025.4.26.tar.gz" + sha256 "0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6" + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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 "ijson" do + url "https://files.pythonhosted.org/packages/a3/4f/1cfeada63f5fce87536651268ddf5cca79b8b4bbb457aee4e45777964a0a/ijson-3.4.0.tar.gz" + sha256 "5f74dcbad9d592c428d3ca3957f7115a42689ee7ee941458860900236ae9bb13" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/cf/b6/a92ae6fa6d7e6e536bc586776b1669b84fb724dfe21b8ff08297f2d7c969/sentry_sdk-2.27.0.tar.gz" + sha256 "90f4f883f9eff294aff59af3d58c2d1b64e3927b28d5ada2b9b41f5aeda47daf" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/95/32/0cc40fe41fd2adb80a2f388987f4f8db3c866c69e33e0b4c8b093fdf700e/setuptools-80.4.0.tar.gz" + sha256 "5a78f61820bc088c8e4add52932ae6b8cf423da2aff268c23f813cfbb13b4006" + end + + resource "sniffio" do + url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz" + sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + 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" + end + + resource "tree-sitter" do + url "https://files.pythonhosted.org/packages/4a/64/71b3a0ff7d0d89cb333caeca01992099c165bdd663e7990ea723615e60f4/tree_sitter-0.20.4.tar.gz" + sha256 "6adb123e2f3e56399bbf2359924633c882cc40ee8344885200bca0922f713be5" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"codecovcli", shells: [:fish, :zsh], 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..81b6c23613619 --- /dev/null +++ b/Formula/c/codelimit.rb @@ -0,0 +1,155 @@ +class Codelimit < Formula + include Language::Python::Virtualenv + + desc "Your Refactoring Alarm" + homepage "https://github.com/getcodelimit/codelimit" + url "https://files.pythonhosted.org/packages/b2/35/88c6a31a680aaaa08906162e1a64187e8379c2f6fdf68a457d61e8a32ed1/codelimit-0.18.1.tar.gz" + sha256 "208e814cb3320ce5d1f862fc984b4e09760595b9ed6362bdc11214e3ee155549" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "f15f4541358fc187914d2f17704fedf18b03d44cc380836352e1adc81fcef479" + sha256 cellar: :any, arm64_sonoma: "57e69422339ead6154135d5339bf4aad2ee3d15a8ec3d2cebe7b2e3c3c4396db" + sha256 cellar: :any, arm64_ventura: "76579687a8003b964e910009b0fce2eaf338162bf831d9f694a48f9a10a839a0" + sha256 cellar: :any, sonoma: "903b1fc2e0653ed20f6759c80d41a19e64609b19cf147ee21fc07f9074787a13" + sha256 cellar: :any, ventura: "b85f06932dd86d2ebddc8e9d8835a498a6dc9639ad8d605cbceceb333b0a3ecb" + sha256 cellar: :any_skip_relocation, arm64_linux: "316122c6d5be36441f49438b192c6379ebfff7395991dd1dc353ebbf257f7751" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4fe6160e35e190a9070e3a420e37844eaffeb236689bac619266af1ae96c0766" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/7f/55/e4373e888fdacb15563ef6fa9fa8c8252476ea071e96fb46defac9f18bf2/aiohappyeyeballs-2.4.4.tar.gz" + sha256 "5fdd7d87889c63183afc18ce9271f9b0a7d32c2303e394468dd45d514a757745" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/fe/ed/f26db39d29cd3cb2f5a3374304c713fe5ab5a0e4c8ee25a0c45cc6adf844/aiohttp-3.11.11.tar.gz" + sha256 "bb49c7f1e6ebf3821a42d81d494f538107610c3a705987f53068546b0e90303e" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/48/c8/6260f8ccc11f0917360fc0da435c5c9c7504e3db174d5a12a1494887b045/attrs-24.3.0.tar.gz" + sha256 "8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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 "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/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + 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/20/c8/2a13f78d82211490855b2fb303b6721348d0787fdd9a12ac46d99d3acde1/propcache-0.2.1.tar.gz" + sha256 "3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz" + sha256 "b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310" + 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 "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "sh" do + url "https://files.pythonhosted.org/packages/52/12/b7965006c5adc57ba5459385358bd27c4983cd490884a75be86eb1d3efeb/sh-2.1.0.tar.gz" + sha256 "7e27301c574bec8ca5bf6f211851357526455ee97cd27a7c4c6cc5e2375399cb" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/e9/7d/b1e0399aa5e27071f0042784681d28417f3e526c61f62c8e3635ee5ad334/typer-0.9.4.tar.gz" + sha256 "f714c2d90afae3a7929fcd72a3abb08df305e1ff61719381384211c4070af57f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/b7/9d/4b94a8e6d2b51b599516a5cb88e5bc99b4d8d4583e468057eaa29d5f0918/yarl-1.18.3.tar.gz" + sha256 "ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + 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..cd70e2c618651 --- /dev/null +++ b/Formula/c/codequery.rb @@ -0,0 +1,41 @@ +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.0.tar.gz" + sha256 "b0776adeae2963f197e3b9a57eb7ca405542da5f6413e06063e8d68f8246baa8" + license "MPL-2.0" + + bottle do + sha256 cellar: :any, arm64_sonoma: "4e4fb0e6e4d1171bff615afc316580b9fa839da228349d9ceae861da9f184004" + sha256 cellar: :any, arm64_ventura: "7f2b375faf1d458989b42e8b03a4aa57599f54038e941752f50e18925ae4c43b" + sha256 cellar: :any, arm64_monterey: "3f13a8eb9bfbd76b95c2a9f93759b9667574df9fd949e9332d268b3e3f699406" + sha256 cellar: :any, sonoma: "7d4ab5fa8902cc12ce5c8f72f808b8dab4399b3caa281ed04bc286ae0689e4fc" + sha256 cellar: :any, ventura: "9b959ddfdcb5bbfcf3ab2a09f07ef279e76db150230c8c8a5ef7a8ab7ad00c8c" + sha256 cellar: :any, monterey: "00a3a640de5c64f871865d155bba13485269d2d1c2ec4a68a13367ef789e6d90" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02ad5e72b9b38a66604f6e1be788b94309e844276297037e402cfed743e25b80" + end + + depends_on "cmake" => :build + depends_on "qt" + 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..020a891d695a7 --- /dev/null +++ b/Formula/c/coder.rb @@ -0,0 +1,46 @@ +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.20.3.tar.gz" + sha256 "d1175b481da69996b8c09d37f9e258b4e4d938a750ed7fbc004717fa4b87309f" + 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_sequoia: "028446300178cf51ebbedad81d2f5f755e8fe1174996cc8a2885fae3ed5bbe52" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "293394be5f2d5bf8ba83cae2d39034295f3156223b7871cc4a0ec2d28a0f380c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c576e02f808de58f63a7a6c597c4c8544f921b00dc68f9efc255e62d556ede48" + sha256 cellar: :any_skip_relocation, sonoma: "b8d12798b0931b975fa0d3e03357855448099a0e9bac784a1437da434916862a" + sha256 cellar: :any_skip_relocation, ventura: "96dfb98494c764e615df9c36049ca02b3fa6a7cc745f8bd42f069f4a4a9b57e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "a8c3d48320a5e44df8e5a458f21b643239dde3ff42576a6b60462a65b74f91bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09c909551d9b57980db98bcf492174c83103a63ad6f1f513746bebf950bffa27" + 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..883ce663fb735 --- /dev/null +++ b/Formula/c/codesnap.rb @@ -0,0 +1,40 @@ +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.5.tar.gz" + sha256 "8b8fe2760ff373e5b3efdce684470399453c7313c554f1fa33b19c94804f56a9" + license "MIT" + head "https://github.com/codesnap-rs/codesnap.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d856b602c69bec1edf844fae1d0b0db478990fe0b056ce2fd3cf634f11b6fe25" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "70d5cf99e309f65de7e6165718b85fc74540575cc54527c39b2edba6f42abd08" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4f25953da13dc2dae3225af0efcbe0a204e430f880fdafa5923c86d286ac5e07" + sha256 cellar: :any_skip_relocation, sonoma: "d15706d9be90b1b0ccd44c5ec4d9eebc1e0f0dc7631f89d08eb183269c568cb9" + sha256 cellar: :any_skip_relocation, ventura: "f13fadf12e421eda053d94332f7573fabff492cc3625f29e9788a454d0721419" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8d0c7295d6f4e6cf3ba195a8a21aca3fddbfb0aa50a3a42caffd485947b6195" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a765e3dc0617d7f66a6983b2f1466f068d0986cdfc26d888cc3792416bd4c926" + 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..60241ccf7f5ce --- /dev/null +++ b/Formula/c/codespell.rb @@ -0,0 +1,29 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0b25d8acdbc85fd54a446dbc8c8b77d008bdb7e19d2fcc034c2bb6bb566cdd80" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0b25d8acdbc85fd54a446dbc8c8b77d008bdb7e19d2fcc034c2bb6bb566cdd80" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0b25d8acdbc85fd54a446dbc8c8b77d008bdb7e19d2fcc034c2bb6bb566cdd80" + sha256 cellar: :any_skip_relocation, sonoma: "8b4c26a1d31143074144646051489279e38203caa49c2f726e90489913ab9b15" + sha256 cellar: :any_skip_relocation, ventura: "8b4c26a1d31143074144646051489279e38203caa49c2f726e90489913ab9b15" + sha256 cellar: :any_skip_relocation, arm64_linux: "67af66b8da78c901be3d2be7b8f29f8e082d5bec51194da12ddbeead6eff7f32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0b25d8acdbc85fd54a446dbc8c8b77d008bdb7e19d2fcc034c2bb6bb566cdd80" + end + + depends_on "python@3.13" + + def install + virtualenv_install_with_resources + end + + test do + 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..bb102aac72384 --- /dev/null +++ b/Formula/c/codevis.rb @@ -0,0 +1,42 @@ +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_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/codex.rb b/Formula/c/codex.rb new file mode 100644 index 0000000000000..bfff867b3f7cf --- /dev/null +++ b/Formula/c/codex.rb @@ -0,0 +1,36 @@ +class Codex < Formula + desc "OpenAI's coding agent that runs in your terminal" + homepage "https://github.com/openai/codex" + url "https://registry.npmjs.org/@openai/codex/-/codex-0.1.2505141022.tgz" + sha256 "56548be82188742828bdce9721fe5e046740da9552d8f145404fb44e239e00b7" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6afc64bfb2b3f614ee89921cb4f06f625b4b8c7f02740a77fab9d3a2cc2b34c3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6afc64bfb2b3f614ee89921cb4f06f625b4b8c7f02740a77fab9d3a2cc2b34c3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6afc64bfb2b3f614ee89921cb4f06f625b4b8c7f02740a77fab9d3a2cc2b34c3" + sha256 cellar: :any_skip_relocation, sonoma: "d6179ec361d37813db5c0f668bc5fca20a8dc297b8df056b3c53d5cedc018aba" + sha256 cellar: :any_skip_relocation, ventura: "d6179ec361d37813db5c0f668bc5fca20a8dc297b8df056b3c53d5cedc018aba" + sha256 cellar: :any_skip_relocation, arm64_linux: "6afc64bfb2b3f614ee89921cb4f06f625b4b8c7f02740a77fab9d3a2cc2b34c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6afc64bfb2b3f614ee89921cb4f06f625b4b8c7f02740a77fab9d3a2cc2b34c3" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + + # Remove incompatible pre-built binaries + libexec.glob("lib/node_modules/@openai/codex/bin/*") + .each { |f| rm_r(f) if f.extname != ".js" } + + generate_completions_from_executable(bin/"codex", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/codex --version") + + assert_match "Missing openai API key", shell_output("#{bin}/codex brew 2>&1", 1) + end +end diff --git a/Formula/c/coffeescript.rb b/Formula/c/coffeescript.rb new file mode 100644 index 0000000000000..8cbd9e06822e0 --- /dev/null +++ b/Formula/c/coffeescript.rb @@ -0,0 +1,39 @@ +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" + + 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..003adb8bbcca4 --- /dev/null +++ b/Formula/c/cog.rb @@ -0,0 +1,50 @@ +class Cog < Formula + desc "Containers for machine learning" + homepage "https://cog.run/" + url "https://github.com/replicate/cog/archive/refs/tags/v0.14.11.tar.gz" + sha256 "826479d806d15dcba6784ffe4217216d749e523ce7105ecd39ad17de94acc476" + license "Apache-2.0" + head "https://github.com/replicate/cog.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7b736066a8d2cdcc40f5ed3085f52b4a39dbac1b39f79989ae2084ac0b397fe4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b736066a8d2cdcc40f5ed3085f52b4a39dbac1b39f79989ae2084ac0b397fe4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b736066a8d2cdcc40f5ed3085f52b4a39dbac1b39f79989ae2084ac0b397fe4" + sha256 cellar: :any_skip_relocation, sonoma: "311b4fe0fe996095909066fbb09f006bf541dc830695096f5b6d70af739739af" + sha256 cellar: :any_skip_relocation, ventura: "311b4fe0fe996095909066fbb09f006bf541dc830695096f5b6d70af739739af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a39602e9b24a3dca58749cbb880cb697a0b58b3fc9e4c4392b9e3db5a6188062" + end + + depends_on "go" => :build + depends_on "python@3.13" => :build + + conflicts_with "cocogitto", because: "both install `cog` binaries" + + def python3 + "python3.13" + 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/coin3d.rb b/Formula/c/coin3d.rb new file mode 100644 index 0000000000000..e81a66c2c7718 --- /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" + revision 2 + + stable do + url "https://github.com/coin3d/coin/releases/download/v4.0.3/coin-4.0.3-src.tar.gz" + sha256 "66e3f381401f98d789154eb00b2996984da95bc401ee69cc77d2a72ed86dfda8" + + resource "soqt" do + url "https://github.com/coin3d/soqt/releases/download/v1.6.3/soqt-1.6.3-src.tar.gz" + sha256 "79342e89290783457c075fb6a60088aad4a48ea072ede06fdf01985075ef46bd" + end + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "7a755e0c179f8d762196729ea039512ffc0814e929cd1f19c1026d151041b30e" + sha256 cellar: :any, arm64_ventura: "8742ecfd7f6ccea840603cb18083525d2711acee00fd9e0a6bb163f25b4e9029" + sha256 cellar: :any, sonoma: "38224963f262dd3b3a0ee96c8deb8c8bb092bfa9e01ea15465ad50fe0c3d36d0" + sha256 cellar: :any, ventura: "ac4d1a600375e93f86891c3b45c9fb5a93d6fef296d867a0d4e9dddcfcb774ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e5a6317d138ef6f2b147179e4e1ac4f029543d499d276f47d94958148fa4b28" + 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 "qt" + + 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..a869be2b76907 --- /dev/null +++ b/Formula/c/coinutils.rb @@ -0,0 +1,68 @@ +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_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..725cc0a3145a0 --- /dev/null +++ b/Formula/c/colfer.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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, mojave: "dfdb2743960de62ee18ab35a7ead3d2d8de4207cc6ffa11ff0d8ebf393a591e8" + sha256 cellar: :any_skip_relocation, high_sierra: "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..64c7127cf5ada --- /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.8.1", + revision: "96598cc5b64e5e9e1e64891642b91edc8ac49d16" + 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_sequoia: "8601f3bf93ac2f20626a12f4d068cddec17a742b43baba7f51083457fd7b16f5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bc95ca149e76289730810f8a336afceef043a81b8831d4ab1d4747189e7973c3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c7be1109ae77f76148c8520fcdfc4b1b391d0ce6508e2d2befc1458c40259f6d" + sha256 cellar: :any_skip_relocation, sonoma: "50adcb716f3c2709df01409e6f6d337219935882fe07e95bd17410066dd5af59" + sha256 cellar: :any_skip_relocation, ventura: "d92924d1e207780a5ae559f2949a9a5cdb6620ab6edefe9d659e92c51696b0cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b97ac7a0e415387837cb91ec365186722ab18ce5d3f1e9ef01819c07a3f9e90" + 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..ce6890ecdd56a --- /dev/null +++ b/Formula/c/collada-dom.rb @@ -0,0 +1,105 @@ +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 12 + head "https://github.com/rdiankov/collada-dom.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f8fe9c458f7b484d0cd0cf9621f9b84d6e63937a1d7bfeb705e801e026cab1e6" + sha256 cellar: :any, arm64_sonoma: "1a93d3a82bb601f66d34629015f53ab87e3193b61c364a5da75d83c7a0060685" + sha256 cellar: :any, arm64_ventura: "f76da451276e9251727ddfbe40b9dade4db304847a9c1cffd635d1089aa8f0bb" + sha256 cellar: :any, sonoma: "e9aba40820c17f45f7498b445f45d25698fc5fa2c324745404e55590189c9ab7" + sha256 cellar: :any, ventura: "25a584b502fb59ab0493eaaa7da669464d18481a8d5cd001c86c7ba0ba493ba7" + sha256 cellar: :any_skip_relocation, arm64_linux: "7785299a5c30c771300721863afb15b7e8a42a1990f80bbfef5a0816393e7737" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b72d91084f267637a321260f8bce9f79085ac8c6fd0c16d57c748ba483614a0d" + 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. + # 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/Formula/c/collectd.rb b/Formula/c/collectd.rb new file mode 100644 index 0000000000000..e96f8c322f267 --- /dev/null +++ b/Formula/c/collectd.rb @@ -0,0 +1,100 @@ +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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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 + + bottle do + 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..3fc8ddaa42a27 --- /dev/null +++ b/Formula/c/colmap.rb @@ -0,0 +1,64 @@ +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.11.1.tar.gz" + sha256 "d2c20729ab5b1198e17725b720128f304f4cfae5c0a8c20d75c0e9c5bdee5860" + license "BSD-3-Clause" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "a10d84ff5e6e26782f2043ea71657f741f6ad2a84870b15126d52dd75216fab8" + sha256 cellar: :any, arm64_sonoma: "a3b2341aad18e5ee0e65a9ca38d497de5f2dae573525588e01026e609ff5929d" + sha256 cellar: :any, arm64_ventura: "7d88ee8e8f5fc8b369050c706df0a6c6179eeb7a56262fc17d8e5ea0f9e3d050" + sha256 cellar: :any, sonoma: "9b56b2f3bdae3e126dff816fd6005b1142a7af895166666e626af58c93ef2497" + sha256 cellar: :any, ventura: "40a9ed14c6bdbb969209c24500ab814e0614740492e8cc26d0e50b2355f26fb5" + sha256 x86_64_linux: "ce9da6e8e8f4c41ef007ead45ed70122eeb4739f82bdeb36bfffcbfea922b5b9" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "ceres-solver" + depends_on "cgal" + depends_on "eigen" + 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 "poselib" + depends_on "qt@5" + depends_on "suite-sparse" + + 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 + ENV.append_path "CMAKE_PREFIX_PATH", Formula["qt@5"].prefix + + args = %w[ + -DCUDA_ENABLED=OFF + -DFETCH_POSELIB=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..88aed5f6fcb6c --- /dev/null +++ b/Formula/c/color-code.rb @@ -0,0 +1,38 @@ +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 + + bottle do + 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, x86_64_linux: "dd2a46ae5f69b106738617bd41d8fe1d2a71a34dcb876850ac1c698b4ca09496" + end + + 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..fdcd87a8fdf6b --- /dev/null +++ b/Formula/c/colordiff.rb @@ -0,0 +1,34 @@ +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 + + 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..d0de93bc5b8bb --- /dev/null +++ b/Formula/c/colormake.rb @@ -0,0 +1,36 @@ +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" + + 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..d3dab4223375e --- /dev/null +++ b/Formula/c/colortail.rb @@ -0,0 +1,27 @@ +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" + + bottle do + 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..6f094cb645261 --- /dev/null +++ b/Formula/c/comby.rb @@ -0,0 +1,74 @@ +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 + + bottle do + 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" + + def install + ENV.deparallelize + opamroot = buildpath/".opam" + ENV["OPAMROOT"] = opamroot + ENV["OPAMYES"] = "1" + + system "opam", "init", "--no-setup", "--disable-sandboxing" + # Workaround for https://github.com/comby-tools/comby/issues/381 + system "opam", "exec", "--", "opam", "pin", "add", "tar-unix", "2.6.0" + system "opam", "exec", "--", "opam", "install", ".", "--deps-only", "-y", "--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..e559467c81ff0 --- /dev/null +++ b/Formula/c/commitizen.rb @@ -0,0 +1,115 @@ +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/f3/7a/2c2a781b3e227f528b19e1144efcfdd61f7414bf9cf84ba6bbdc215f3427/commitizen-4.7.0.tar.gz" + sha256 "ef95f2ef354b438dce7c6164e5d47d10cc377df666ee65a116bcfcb146bb0c0a" + license "MIT" + head "https://github.com/commitizen-tools/commitizen.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a01f1d7e1c1d3555d6ca1c26baeca1798a8d6153f6db3bb1143356c68bea6e9f" + sha256 cellar: :any, arm64_sonoma: "1fb5367de4be0543281316fd3fbee6985110962cd4ff440e55bf9c4ed82608fe" + sha256 cellar: :any, arm64_ventura: "0d2f846b2df99148ae516d64c08f7e1e39dd3272e846fd4c57ce299af4a3e160" + sha256 cellar: :any, sonoma: "7ac807312d20fcbb0176c832afa39672dc10293c7f70bcc96ab91c596f0907d1" + sha256 cellar: :any, ventura: "9029e37e4a769024f872880ba5df3dfb9279a998de3d73a1d0f896ccbf2456de" + sha256 cellar: :any_skip_relocation, arm64_linux: "0727d61643c2c45d834ccc841071e97725794975790e535f17b692cee4ac5678" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d27e59e3f28d1f08b7a58f632be6cbddc860bf4333e8522ba9113f4719848be" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/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 "decli" do + url "https://files.pythonhosted.org/packages/3d/a0/a4658f93ecb589f479037b164dc13c68d108b50bf6594e54c820749f97ac/decli-0.6.2.tar.gz" + sha256 "36f71eb55fd0093895efb4f416ec32b7f6e00147dda448e3365cf73ceab42d6f" + 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 "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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "questionary" do + url "https://files.pythonhosted.org/packages/a8/b8/d16eb579277f3de9e56e5ad25280fab52fc5774117fb70362e8c2e016559/questionary-2.1.0.tar.gz" + sha256 "6302cdd645b19667d8f6e6634774e9538bfcd1aad9be287e743d96cacaf95587" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/37/72/88311445fd44c455c7d553e61f95412cf89054308a1aa2434ab835075fc5/termcolor-2.5.0.tar.gz" + sha256 "998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + 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..fd2158ff67e92 --- /dev/null +++ b/Formula/c/commitlint.rb @@ -0,0 +1,36 @@ +class Commitlint < Formula + desc "Lint commit messages according to a commit convention" + homepage "https://commitlint.js.org/#/" + url "https://registry.npmjs.org/commitlint/-/commitlint-19.8.1.tgz" + sha256 "b87082a3113be1c2929db63d727d3765b92f89e103b966996e7cfc560315ef68" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a5060996ad29bdfaed43cc556cd7f361c3fb3fb4240fe0f8ed9b3e2634963ec9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a5060996ad29bdfaed43cc556cd7f361c3fb3fb4240fe0f8ed9b3e2634963ec9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a5060996ad29bdfaed43cc556cd7f361c3fb3fb4240fe0f8ed9b3e2634963ec9" + sha256 cellar: :any_skip_relocation, sonoma: "86842a5c386c604d290b3784bfc29310ee7bc4de1e6b3c71d5a4621947d8b35d" + sha256 cellar: :any_skip_relocation, ventura: "86842a5c386c604d290b3784bfc29310ee7bc4de1e6b3c71d5a4621947d8b35d" + sha256 cellar: :any_skip_relocation, arm64_linux: "a5060996ad29bdfaed43cc556cd7f361c3fb3fb4240fe0f8ed9b3e2634963ec9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5060996ad29bdfaed43cc556cd7f361c3fb3fb4240fe0f8ed9b3e2634963ec9" + 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..e1bb1bc14fdc9 --- /dev/null +++ b/Formula/c/compiledb.rb @@ -0,0 +1,45 @@ +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 + sha256 cellar: :any_skip_relocation, all: "e1ba5487728c29b4d7c4c01a7d359a6d7b6879986bb58d9d1798b98a233fbde7" + end + + depends_on "python@3.13" + + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"compiledb", shells: [:fish, :zsh], 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..8e90b9270e809 --- /dev/null +++ b/Formula/c/composer.rb @@ -0,0 +1,82 @@ +class Composer < Formula + desc "Dependency Manager for PHP" + homepage "https://getcomposer.org/" + url "https://getcomposer.org/download/2.8.9/composer.phar" + sha256 "8e8829ec2b97fcb05158236984bc252bef902e7b8ff65555a1eeda4ec13fb82b" + 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_sequoia: "a05a5caf378a6feffbe8eb20a6df237f2fbdcd4ad95c330523721cba76c5ae24" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a05a5caf378a6feffbe8eb20a6df237f2fbdcd4ad95c330523721cba76c5ae24" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a05a5caf378a6feffbe8eb20a6df237f2fbdcd4ad95c330523721cba76c5ae24" + sha256 cellar: :any_skip_relocation, sonoma: "1f0caa6188458c601c106506cc548b99c711f6cd267cbe757ea80cc0307aac40" + sha256 cellar: :any_skip_relocation, ventura: "1f0caa6188458c601c106506cc548b99c711f6cd267cbe757ea80cc0307aac40" + sha256 cellar: :any_skip_relocation, arm64_linux: "00b726600dae89baf262d48d9919975579522b14e5a163506aedba18a74d3eab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00b726600dae89baf262d48d9919975579522b14e5a163506aedba18a74d3eab" + 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..dd05845c5ad6e --- /dev/null +++ b/Formula/c/comtrya.rb @@ -0,0 +1,39 @@ +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_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..1c82b6dc71b9a --- /dev/null +++ b/Formula/c/conan.rb @@ -0,0 +1,104 @@ +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/fb/59/c53bd6aef9a7a3c29e2966b121a00bbee0f7f3c5702a9bdd25c15cfe9691/conan-2.16.1.tar.gz" + sha256 "e5b2aac9dab4f23e95f62a7c62dfb33c5f4522fab34332120c8be6eca11f5bec" + license "MIT" + head "https://github.com/conan-io/conan.git", branch: "develop" + + bottle do + sha256 cellar: :any, arm64_sequoia: "81682fd11adbe683853c6495147f7110af106bcfe8b2ec929d92aa6738a2d868" + sha256 cellar: :any, arm64_sonoma: "c8a0d81d67ed6fd3e54670cc3e311cc7ebe5954629386f83387e597e1a6f1f6b" + sha256 cellar: :any, arm64_ventura: "70eb5f275455e7b417fd6455b12e73514ef3faa9dbca70b0f545be7ec5202ce9" + sha256 cellar: :any, sonoma: "726761ea2bdfed63e5511a4b72af229af41dfc45161a1347094a13b3d4ee6038" + sha256 cellar: :any, ventura: "2260de6a8861b39e26b71a19f9aec908091a93567936b0059256cf7c93d0b23e" + sha256 cellar: :any_skip_relocation, arm64_linux: "75df57d483ee21aaf222a0f3fb62f2c060097e7f3fbaa386e41a683e4fc3cd3e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3494473163e05b57aefbd72635cce45f0e994ccafd5755eb0cd8981756471cab" + end + + depends_on "pkgconf" => :build + depends_on "cmake" => :test + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/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 "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/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 "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/af/47/b215df9f71b4fdba1025fc05a77db2ad243fa0926755a52c5e71659f4e3c/urllib3-2.0.7.tar.gz" + sha256 "c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84" + 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..0349dfb775daa --- /dev/null +++ b/Formula/c/conan@1.rb @@ -0,0 +1,139 @@ +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 2 + + livecheck do + url "https://github.com/conan-io/conan.git" + regex(/^v?(1(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "b550d63c8a731b03e9ded55a90cdb8a6c0dee1e84bc6f82df11f4318975e8dfb" + sha256 cellar: :any, arm64_sonoma: "744d332a12938a5e6a7b2e9ec0163adcac70aaeb48b05e298c2d7d40396e515f" + sha256 cellar: :any, arm64_ventura: "c0e3bebe2b64cfafa39b897f3f858773496cde17c122e50fae5771a4403bb178" + sha256 cellar: :any, sonoma: "54186e3faa06a1c8525e5c12d37450f1a4798c730990c0d48ae3996bc8279c92" + sha256 cellar: :any, ventura: "1bb4a1ab47745f261a55d36abf00dacaae56b66eee6d452eda85df73c23c9974" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c3f6a9c11a9d08c7390e3a1ecedc2163bc431fae386ef403330d7ee3e339416" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d19d6f99603230aad74317f750f7902f88b88c679cd9455fba8734aac3eeaff2" + end + + keg_only :versioned_formula + + 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 + + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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 + + 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..9946722c2b3d7 --- /dev/null +++ b/Formula/c/concurrencykit.rb @@ -0,0 +1,50 @@ +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_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/conda-lock.rb b/Formula/c/conda-lock.rb new file mode 100644 index 0000000000000..5af6842a9bc8c --- /dev/null +++ b/Formula/c/conda-lock.rb @@ -0,0 +1,296 @@ +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/6c/80/a876bda810274e927b90c01e66ac3cc47737084514f5d5c020b4e4f5dec3/conda_lock-3.0.2.tar.gz" + sha256 "d6a668c4d7a627f6d234dc155ada292cc26e119b5b4b8f53787478d90ee1a3b2" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9c66e1bba6345c4a860277d95134a559ff091f8d69ebb0f057a2795f58b5bafd" + sha256 cellar: :any, arm64_sonoma: "c3a39469851f8ad5755e04aed8745a1ec7eea9220e098ab32f34851f1d47542f" + sha256 cellar: :any, arm64_ventura: "812ec33b3c7aee84bf2553b563ee693068386837433dc168d23c928cccb2aedb" + sha256 cellar: :any, sonoma: "ed244dfd7fa5ae1e876889917567926dc07d6c8223fec6202b1d9bece4a2f463" + sha256 cellar: :any, ventura: "36aa234d8ceb251520a0a08266c71cb8e2b26479cb57f52fc0c53b5b2e448ff0" + sha256 cellar: :any_skip_relocation, arm64_linux: "af899b4dde73160db5621f92306d01441971f2980f4139d943682e7f4e70eb97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e4deed57c2678f134dcd735359c6d5194d3f3489036172097479d6f383734717" + end + + depends_on "rust" => :build # for pydantic + depends_on "certifi" + depends_on "cffi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + 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/7d/46/aeab111f8e06793e4f0e421fcad593d547fb8313b50990f31681ee2fb1ad/build-1.2.2.post1.tar.gz" + sha256 "b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7" + 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/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + 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 "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/0d/dd/1bec4c5ddb504ca60fc29472f3d27e8d4da1257a854e1d96742f15c1d02d/distlib-0.3.9.tar.gz" + sha256 "a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403" + 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/71/29/eb78e24110a29221ec379104763a43ef0fe154aa2c6da251104633e667f0/ensureconda-1.4.7.tar.gz" + sha256 "b2f3643780dad9d4b7b4965c34803e5e00f216cc7e331aa927959c304cac2359" + end + + resource "fastjsonschema" do + url "https://files.pythonhosted.org/packages/8b/50/4b769ce1ac4071a1ef6d86b1a3fb56cdc3a37615e8c5519e1af96cdac366/fastjsonschema-2.21.1.tar.gz" + sha256 "794d4f0a58f848961ba16af7b9c85a3e88cd360df008c59aac6fc5ae9323b5d4" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + 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 "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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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 "msgpack" do + url "https://files.pythonhosted.org/packages/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + 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/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "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/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-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/ea/46/f44d8be06b85bc7c4d8c95d658be2b68f27711f279bf9dd0612a5e4794f5/ruamel.yaml-0.18.10.tar.gz" + sha256 "20c86ab29ac2153f80a428e1254a8adf686d3383df04490514ca3b79a362db58" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz" + sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77" + 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/9e/8b/dc1773e8e5d07fd27c1632c45c1de856ac3dbf09c0147f782ca6d990cf15/setuptools-80.7.1.tar.gz" + sha256 "f6ffc5f0142b1bd8d0ca94ee91b30c0ca862ffd50826da1ea85258a06fd94552" + 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/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + resource "trove-classifiers" do + url "https://files.pythonhosted.org/packages/38/04/1cd43f72c241fedcf0d9a18d0783953ee301eac9e5d9db1df0f0f089d9af/trove_classifiers-2025.5.9.12.tar.gz" + sha256 "7ca7c8a7a76e2cd314468c677c69d12cc2357711fcab4a60f87994c1589e5cb5" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/56/2c/444f465fb2c65f40c3a104fd0c495184c4f2336d65baf398e3c75d72ea94/virtualenv-20.31.2.tar.gz" + sha256 "e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af" + end + + resource "xattr" do + url "https://files.pythonhosted.org/packages/62/bf/8b98081f9f8fd56d67b9478ff1e0f8c337cde08bcb92f0d592f0a7958983/xattr-1.1.4.tar.gz" + sha256 "b7b02ecb2270da5b7e7deaeea8f8b528c17368401c2b9d5f63e91f545b45d372" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/ed/f6/2ac0287b442160a89d726b17a9184a4c615bb5237db763791a7fd16d9df1/zstandard-0.23.0.tar.gz" + sha256 "b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"conda-lock", shells: [:fish, :zsh], 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.13 + YAML + system bin/"conda-lock", "-p", "osx-64", "-p", "osx-arm64" + 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..6096e1b96e364 --- /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: "master" + + 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..b832e001d1028 --- /dev/null +++ b/Formula/c/conduit.rb @@ -0,0 +1,46 @@ +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.13.4.tar.gz" + sha256 "96dc9b58369025ef60d877ad776347c09b80dbb54800253936655489bb2273e8" + 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_sequoia: "1d7442b88e26aab3468f3f967cdd1247a18be6d0dabbfc4ec1cbdbc9b781a598" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d1d293e397e3869b6935453839173714658107b75c6996326c28bc66d31c6262" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6fbe86a1172ecd47dba7a7820959d492d67df7a5203202aae83c842b64031cee" + sha256 cellar: :any_skip_relocation, sonoma: "8c2f24df3998e0b26beca132b9da9465af1044b020e68c98c10d046501e07d24" + sha256 cellar: :any_skip_relocation, ventura: "b6d70e9f5d3994cd95c8698518e22747073867dca197c9c4fe4866d30b958498" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f13b176d8a74de86b8f81c670017178b2a96fec5a911572e3b6c35261dc81a52" + 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..92ed8ffc4410b --- /dev/null +++ b/Formula/c/condure.rb @@ -0,0 +1,119 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5dbd83cd3a803509a0cc5b3d0cdc7d3dbe09cc47ea085d2576e35852aa13f40e" + sha256 cellar: :any, arm64_sonoma: "b61e13bb29181ff457ce6a5b1b9156d370a31fabfd61767f94dfbef580469c7a" + sha256 cellar: :any, arm64_ventura: "a3d123a19dc1da1b031ae987ea84a517e3d1d6940206dce616e40a1122c3ac57" + sha256 cellar: :any, arm64_monterey: "4fd31572d6268c0d6bcc5993b23f50a7f75306316ddc3ed0cfe6dd7ed439d325" + sha256 cellar: :any, sonoma: "75aa7ff3919f0791a751778e0993d8244dbad023c92bee2a7c03cf2b18fb4751" + sha256 cellar: :any, ventura: "d5b7fd6e1d9572b673a1e4e2b5662c050009f439c9dcaddf69ed07346b49d231" + sha256 cellar: :any, monterey: "f44417d181f8cc64156a2d25910ff6ced2829011b6b7e52c36abe8fea9392392" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa34dc178dd11de4c03e5a72351aa73b8f82e2ea07d295b41e3403e3a50e2436" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00527a59f46952f13cb4a1af03af0dcf3d894dd1582828bcb3152ab5b070ac93" + 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.13" => :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.13" + 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..51d1f822191c3 --- /dev/null +++ b/Formula/c/confd.rb @@ -0,0 +1,63 @@ +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" + + bottle do + 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, mojave: "6c83fe2e7e744917d241e8fd51d76b83838ac08dcab31c2663c7b2c7703140cc" + sha256 cellar: :any_skip_relocation, high_sierra: "8605d52c611da0530d31178fbb9805592113d70b3d496d21a34696ff499aac70" + 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/configen.rb b/Formula/c/configen.rb new file mode 100644 index 0000000000000..fdbbf38beb51c --- /dev/null +++ b/Formula/c/configen.rb @@ -0,0 +1,54 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "befb8801be997ff110c9ca0b817fed82b4e233842f5afe05e7ae372a10c4007f" + 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..4ff15bf03ff37 --- /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.60.0.tar.gz" + sha256 "85db17fba05e95594c30fd67dfdbef78e18cf0f87ab3537d987a8197e2c19911" + license "Apache-2.0" + head "https://github.com/open-policy-agent/conftest.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "effd49553b97c61f566f9e6f20088c720eef2d9cccb059991be421551724483c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e09a8c2da7662d8c109024e001e7ef49833718bdd5575779238fc4f313f20e2d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "01f9d2cc41bbdc7500639f6e396ff1c7c771291b428f6e76671a09079ae052c0" + sha256 cellar: :any_skip_relocation, sonoma: "6ae1bff1b4b49e52187fd2f147265961ad59a99ab8de5b07d52bf0cac1bb80c8" + sha256 cellar: :any_skip_relocation, ventura: "5ea5d6a74c47a0945691a4482754050ed23f8363511a845ee88cf66a2b824b0c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fcde20e3189d8bbbbd92b3c7339f0d40d720a5a42da5a50c6f243f23529b6144" + 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..e3e2b5ff11ae9 --- /dev/null +++ b/Formula/c/confuse.rb @@ -0,0 +1,56 @@ +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" + + bottle do + 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 cellar: :any, mojave: "d6038fe2a7fcfea4ba6e3c29174cb6201ce7d05e22ef4c76b881b9f12dabcff6" + sha256 cellar: :any, high_sierra: "371f699488d7e4459251c55e4ef4d9087b08e07b4fedfc553476bc30070ca9c1" + 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..2c15ff19c1949 --- /dev/null +++ b/Formula/c/conman.rb @@ -0,0 +1,58 @@ +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" + + bottle do + 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..c7d542a710e59 --- /dev/null +++ b/Formula/c/connect.rb @@ -0,0 +1,39 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "cc0a39f7e2fea7672f6d691d2e1221d0c5963a9f7e0039317930418fc7c7ebfa" + 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..a8158716e17c7 --- /dev/null +++ b/Formula/c/conserver.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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..d25cb69ce84a1 --- /dev/null +++ b/Formula/c/console_bridge.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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 + + 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..65b6170ce068d --- /dev/null +++ b/Formula/c/consul-backinator.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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, mojave: "67549b4afb1e36aa92374850a5b5285d04a046e4f0120687613a58b63eab057d" + 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..166b4689b1e20 --- /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.40.0.tar.gz" + sha256 "cb74e87b972f6450f33c267cca332737aca00fa51d25c3fae65048158d393b27" + license "MPL-2.0" + head "https://github.com/hashicorp/consul-template.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "368a75569525e7512f65e51d89af81a299732099f24aff6d4af0c473caadf8ad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "368a75569525e7512f65e51d89af81a299732099f24aff6d4af0c473caadf8ad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "368a75569525e7512f65e51d89af81a299732099f24aff6d4af0c473caadf8ad" + sha256 cellar: :any_skip_relocation, sonoma: "335573d7ba780228b60e9e93f01e37600c3fb62988328be963a7e24c6ce137a1" + sha256 cellar: :any_skip_relocation, ventura: "335573d7ba780228b60e9e93f01e37600c3fb62988328be963a7e24c6ce137a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cca6f0ad7417f567f58295292468355109990ab7d0ffb715b09deb7b599f6ea0" + 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-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..da4b092798e21 --- /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.19.3.tar.gz" + sha256 "c91a76f7b4949775941f8308ee7676285555ae4756ec1ec990c609c975a55f93" + license "Apache-2.0" + head "https://github.com/GoogleContainerTools/container-structure-test.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "48ab6f7e67e0ccb7f9b1ad136fdd0a20d2d211991eddd6e2a172380790d7d699" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "48ab6f7e67e0ccb7f9b1ad136fdd0a20d2d211991eddd6e2a172380790d7d699" + sha256 cellar: :any_skip_relocation, arm64_ventura: "48ab6f7e67e0ccb7f9b1ad136fdd0a20d2d211991eddd6e2a172380790d7d699" + sha256 cellar: :any_skip_relocation, sonoma: "16ed431b05fd07b2f803a517bb8665eddf9c047a3ecac0888c1343e1dc277add" + sha256 cellar: :any_skip_relocation, ventura: "16ed431b05fd07b2f803a517bb8665eddf9c047a3ecac0888c1343e1dc277add" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5d7d0f9047eb0a3e0bc8b94d46e32581096d1fd3018591025d07d71bd186958" + 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/contentful-cli.rb b/Formula/c/contentful-cli.rb new file mode 100644 index 0000000000000..455898004a7f0 --- /dev/null +++ b/Formula/c/contentful-cli.rb @@ -0,0 +1,31 @@ +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.8.8.tgz" + sha256 "de28b9aaaea30c79543d867ac1f55f3638ecdf51ecef6a79d9c7ba3ed1cf6fdc" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "545f40ea5afd8b629a75d67e809e0db92c0e70daa6e1e8a7b4427839dad47597" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "545f40ea5afd8b629a75d67e809e0db92c0e70daa6e1e8a7b4427839dad47597" + sha256 cellar: :any_skip_relocation, arm64_ventura: "545f40ea5afd8b629a75d67e809e0db92c0e70daa6e1e8a7b4427839dad47597" + sha256 cellar: :any_skip_relocation, sonoma: "e6db3ae109bb33abc92d9d31368cc66a3d826dc19713487d0313fff004d28048" + sha256 cellar: :any_skip_relocation, ventura: "e6db3ae109bb33abc92d9d31368cc66a3d826dc19713487d0313fff004d28048" + sha256 cellar: :any_skip_relocation, arm64_linux: "545f40ea5afd8b629a75d67e809e0db92c0e70daa6e1e8a7b4427839dad47597" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82fd349f267efa4366b2780156a3d72da004297e13b0f3b65d284134515cfd6c" + 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/convco.rb b/Formula/c/convco.rb new file mode 100644 index 0000000000000..7eaf2b32b4e02 --- /dev/null +++ b/Formula/c/convco.rb @@ -0,0 +1,47 @@ +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_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..2e80155f40eb6 --- /dev/null +++ b/Formula/c/convertlit.rb @@ -0,0 +1,60 @@ +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 + + bottle do + rebuild 1 + 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..799601654f383 --- /dev/null +++ b/Formula/c/convmv.rb @@ -0,0 +1,30 @@ +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_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..1c3ee9b77fd36 --- /dev/null +++ b/Formula/c/convox.rb @@ -0,0 +1,41 @@ +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.21.3.tar.gz" + sha256 "2dfbb51b073b335adb505ed5c3a034aa34ed62572ea9e618b176559624f3e4d3" + 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_sequoia: "e2f752f5389d47373025f4ebc653af95d1dcde8b69d30acc0136f5b6ee0dc91c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c15ee0569577203170cfffbfeac14861d4dad6b08cf17165c7fb12d8f23d6319" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d5a5a7061660e85fbdc53bb43d7d524dd39e9813e96d0344c405d339f107ad62" + sha256 cellar: :any_skip_relocation, sonoma: "0dc2f48bb43a73b3703a834c3c1d19d4b7e0cfbdf3189b0b1377da5982cf8610" + sha256 cellar: :any_skip_relocation, ventura: "ff644f619b1230d40c3e6693f60c2be760c60700e588d7f2e936ae7783fb7dd0" + sha256 cellar: :any_skip_relocation, arm64_linux: "5cb223f669197c326be9d0068c97f652df42b3f3807bd5123acc9a2d0e19eb16" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3c0b3b5480c4d4b7fd2f3ab714fcdfa6e56140e02784c91852039ea775866b5" + 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..d0c19f633dda1 --- /dev/null +++ b/Formula/c/cookcli.rb @@ -0,0 +1,55 @@ +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.10.0.tar.gz" + sha256 "6832191a18e4e4a2d9f5e3227631b7c598d239f01f0560bc226cc3ef3948194b" + license "MIT" + head "https://github.com/cooklang/cookcli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "01306fee0d7da8501ff32659dcdab40c5705d12d042641a666708dfebb3efe17" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "952bef99a47f0fed5596abc7c6a0e842aeaec2d3d4bc10abd49eb95d0eefe943" + sha256 cellar: :any_skip_relocation, arm64_ventura: "266922100f1e6d6722969acc076b1580e6a5e6a66c7c7a37856529740449564d" + sha256 cellar: :any_skip_relocation, sonoma: "a1657416d697b0cb55e057aa31658b514814b349c106c8576c096cac9c333b81" + sha256 cellar: :any_skip_relocation, ventura: "792fc80ab06153e4a6291dfbe1a450c270a3b9cc6f71e2ad32b82b4c77c191c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae275d3f812b9edd4b008a48a15e8deb4d5b9f5dc789f3971b0e188f73f881fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "edb7a7f5ca3d7610a1ae9fe6e6963313a146a366440c4f948ba37697cd543be9" + end + + depends_on "rust" => :build + depends_on "openssl@3" + + def install + ENV["OPENSSL_NO_VENDOR"] = "1" + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + 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..93e8f3c13cb1e --- /dev/null +++ b/Formula/c/cookiecutter.rb @@ -0,0 +1,137 @@ +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 6 + head "https://github.com/cookiecutter/cookiecutter.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d0036f452cda2cd559991bfa098fa8c84934c9d9f145b68cd272e830a751d9d2" + sha256 cellar: :any, arm64_sonoma: "76167c501c04aafbf8dbac2f1ad85e14910f20a8b18bd9887775a3fc47181337" + sha256 cellar: :any, arm64_ventura: "2831c2f88a491579a7d1e7bb3e3e057c60024da924435afd3571983b61acdfb0" + sha256 cellar: :any, sonoma: "cc47a54732cc52494899fdf6b5e64e225e4cf03006b3d82a94d05046dd02b34c" + sha256 cellar: :any, ventura: "89b76f4f082b74b05c4f91181d0a4199f1390b457bc8b3e1cd29453d95f6e27f" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa5ced8d6b52116c88f7b97d98303b5726c2923c9d35b3e7980e3371d8902421" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f7909a1d0b54a0ab1c0f1c1fac38488e10ae9309ce710a2a4099b69ca5d635f" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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 "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 "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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/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 "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 "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/a9/60/47d92293d9bc521cd2301e423a358abfac0ad409b3a1606d8fbae1321961/types_python_dateutil-2.9.0.20241206.tar.gz" + sha256 "18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cookiecutter", shells: [:fish, :zsh], 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..06e82700edc2e --- /dev/null +++ b/Formula/c/coordgen.rb @@ -0,0 +1,58 @@ +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" + + bottle do + 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", + "-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..c180df767c769 --- /dev/null +++ b/Formula/c/copa.rb @@ -0,0 +1,47 @@ +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.10.0.tar.gz" + sha256 "4441630bca610ef6ed2ef17f353b27632bab4d0a2410f99bc96f0cd3f47b52f2" + license "Apache-2.0" + head "https://github.com/project-copacetic/copacetic.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "969e721d1f6b6fee2011c051609142aeb8950ebf74c02f3b51e75e48d2b98c7d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1b9e85da0b7a435be8ea6bece39a6f8d69e0cc4665869de13a672da81be933a8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d403fa235446f405793bc94b659e8b1db4f73dc7940f33032bca3fe2783235d8" + sha256 cellar: :any_skip_relocation, sonoma: "c473dedf7ed6d875c86756962b74a93b4f0ffe98294a368cd3941dac491f2056" + sha256 cellar: :any_skip_relocation, ventura: "b0d0dec095c5035c77c97115a91cc31014a665798a79dbddc0cb7c26ec0bdeef" + sha256 cellar: :any_skip_relocation, arm64_linux: "bd4e8c261fd31d0cdcbce2401183b2fc2b386feb10c520f1c10bb9f02a9adad7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e41b16c68e598ddecd219bee333ad8a405dbcdd6759fcbf49ac226638ba957c" + 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 + assert_match "Project Copacetic: container patching tool", shell_output("#{bin}/copa help") + (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 scanning results for os-pkgs 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..602869fd4a5b3 --- /dev/null +++ b/Formula/c/copier.rb @@ -0,0 +1,145 @@ +class Copier < Formula + include Language::Python::Virtualenv + + desc "Utility for rendering projects templates" + homepage "https://copier.readthedocs.io/" + url "https://files.pythonhosted.org/packages/08/ac/4d8fc462d06dcd25d35b0e8983b5a7466d82a8d8fa50c17f616d1fa65ee8/copier-9.7.1.tar.gz" + sha256 "83da2cbe5e28a1593c649f5dac37d916774b07a3ba3ce66e6966a3e84e557885" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b4ee5c5406d9d4efc02e3f4f0dc17da8b5d77b99542f803a3c60cd2ff66c367b" + sha256 cellar: :any, arm64_sonoma: "0d60097704bc87de54ffe3b223381774e3a71b64b47fa1fe943c258785888595" + sha256 cellar: :any, arm64_ventura: "10f435ec121886b12402f515e8057e5b8a0208318ee0dc3be8067a45cf0cc34b" + sha256 cellar: :any, sonoma: "cec64f396b3d0d7d0c662648f97a9615c6329e9aca5a5eacc2c2c38b41e2a3df" + sha256 cellar: :any, ventura: "b707caa7bb164000305f5bef68d4bf71bbdcb55177cc1fb56ad0e29eb104ef71" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a981a390910e9ecc9328d836d7796a440ecf0d477e60f89b6e587c4a76e807a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdd70a5fac7b957257dd2fc10463fcfd1627f56ab789e487f97bca45149c7982" + end + + depends_on "rust" => :build + depends_on "libyaml" + depends_on "python@3.13" + + 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/08/14/4932a8aee6df2f266c748f88d27a455719d04ca5cf723d5630b7fb215d61/dunamai-1.23.1.tar.gz" + sha256 "0b5712fc63bfb235263d912bfc5eb84590ba2201bb737268d25a5dbad7085489" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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/bb/6e/9d084c929dfe9e3bfe0c6a47e31f78a25c54627d64a66e884a8bf5474f1c/prompt_toolkit-3.0.51.tar.gz" + sha256 "931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "questionary" do + url "https://files.pythonhosted.org/packages/a8/b8/d16eb579277f3de9e56e5ad25280fab52fc5774117fb70362e8c2e016559/questionary-2.1.0.tar.gz" + sha256 "6302cdd645b19667d8f6e6634774e9538bfcd1aad9be287e743d96cacaf95587" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + 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..8c05ffb7ecae8 --- /dev/null +++ b/Formula/c/copilot.rb @@ -0,0 +1,47 @@ +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_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/coq.rb b/Formula/c/coq.rb new file mode 100644 index 0000000000000..35bc8d6ec2339 --- /dev/null +++ b/Formula/c/coq.rb @@ -0,0 +1,90 @@ +class Coq < Formula + desc "Proof assistant for higher-order logic" + homepage "https://coq.inria.fr/" + url "https://github.com/coq/coq/releases/download/V8.20.1/coq-8.20.1.tar.gz" + sha256 "09ad238cc7930d59564b032be2a8a1fd10d6ef845364d739072d04090a6d3cc2" + license "LGPL-2.1-only" + head "https://github.com/coq/coq.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "65a6d3984df7191476d584bf10ad5a20f7f5b79985f3b2550ede68ee9c84204c" + sha256 arm64_sonoma: "f0fbf43c5369353ec0b2ca64b5132bb81b34c1ed2e3dc3e51aefb35232807873" + sha256 arm64_ventura: "6a647ecd4b7562cac8cf430dc897db55cad68aa2f41f727491c9d25a9528f1da" + sha256 sonoma: "37910c96de115af903170ebc56447092de187c4e1eda11c44be0fdc77bf0881e" + sha256 ventura: "3d1168df2643f5ab98fd7a721ca12bd3dff10f447918d6f3962d1867abfdc1ff" + sha256 arm64_linux: "1d2e24d6e8d829cf454df015d3b03a86e0779639825b5cfe60800bcc03fe6d3f" + sha256 x86_64_linux: "df412ed51c3f13261aa40bd9cccf2544ffcc6993ede2371f334e63d0ad8ff473" + 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" + system "./configure", "-prefix", prefix, + "-mandir", man, + "-libdir", HOMEBREW_PREFIX/"lib/ocaml/coq", + "-docdir", pkgshare/"latex" + system "make", "dunestrap" + system "dune", "build", "-p", "coq-core,coq-stdlib,coqide-server,coq" + system "dune", "install", "--prefix=#{prefix}", + "--mandir=#{man}", + "--libdir=#{lib}/ocaml", + "coq-core", + "coq-stdlib", + "coqide-server", + "coq" + 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 <<~EOS + Require Coq.micromega.Lia. + 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.micromega.Lia. + Import Coq.ZArith.ZArith. + Open Scope Z. + Lemma add_O_r_Z : forall (n: Z), n + 0 = n. + Proof. + intros; lia. + Qed. + EOS + system bin/"coqc", testpath/"testing.v" + # test ability to find plugin files + output = shell_output("#{Formula["ocaml-findlib"].bin}/ocamlfind query coq-core.plugins.ltac") + assert_equal "#{HOMEBREW_PREFIX}/lib/ocaml/coq-core/plugins/ltac", output.chomp + end +end diff --git a/Formula/c/core-lightning.rb b/Formula/c/core-lightning.rb new file mode 100644 index 0000000000000..38881de0a596c --- /dev/null +++ b/Formula/c/core-lightning.rb @@ -0,0 +1,89 @@ +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.02.1/clightning-v25.02.1.zip" + sha256 "d1e44b73f6d1e2c8e73482b38645fdc95080a32a5fd53561a5af3ce269950b9e" + 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_sequoia: "b49f2814b9ec4357c2ab5db5efbe0b1eba2a109f99aa74ce3b17cec19b03f016" + sha256 arm64_sonoma: "79be98d83c0aac8cd5d489930b4794d1f83659c5e8d1175ba9f5b41ae17e5f98" + sha256 arm64_ventura: "bf0160cd78e908de4cf9a1effb96281523a3a6f9fbddf6ef5a92577d7b86508d" + sha256 sonoma: "f79a9e56ff37376cce4f46ef30f51365322529d9f51b999fef77a35288ff9183" + sha256 ventura: "c3de74f46974d05b446abcdd9121bd5df1fb684ec608821c7a3bd75a6e23b9c9" + sha256 arm64_linux: "75bdf892a9e16bd2de28c37f741aba769a787f6d0c2b9392698697be1ea178d3" + sha256 x86_64_linux: "6a24472f3b1f8ebd6b1d4f678ca8b6abc63b9a44dda8c1ae43252585e1bf813a" + 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.13" => :build + depends_on "rust" => :build + depends_on "bitcoin" + depends_on "libsodium" + + uses_from_macos "jq" => :build, since: :sequoia + uses_from_macos "python", since: :catalina + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_macos do + depends_on "gnu-sed" => :build + 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 "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + 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.13") + 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" + 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..0aaf3c2475685 --- /dev/null +++ b/Formula/c/coredns.rb @@ -0,0 +1,53 @@ +class Coredns < Formula + desc "DNS server that chains plugins" + homepage "https://coredns.io/" + url "https://github.com/coredns/coredns/archive/refs/tags/v1.12.1.tar.gz" + sha256 "665b2096611b960572b40ad7e943e9c6cca58da5f3885e148868578b15fbf8ef" + 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_sequoia: "13b4abe628698282e6474e7f352cff18cfa611706ac0ae34281cf39f36f1317c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "82804867b48f245caffea96c5f26d477e045f4570cfda68839dcfddc495d70d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e1eb3d98808f8adcdaf8cc174df49f9dffc9af6373fee36cc8af5cebdd5cfd0a" + sha256 cellar: :any_skip_relocation, sonoma: "f13021d45cb2c999f65ef26fc2deb4d4f98dd08b8e9abe857e779c1186943a30" + sha256 cellar: :any_skip_relocation, ventura: "9251bb323b4068f6479e5a006340915186f2229229751b46a7be13de1ac4738d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c91f537282c51406ea94933fbbf9a71b774f1abbbdfda543f1de92f45422965" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b65b0b0462eb7793d8457e7fbfdabf62efb683c869ef14952988cd045e6f0b5a" + 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..ade6344849aa7 --- /dev/null +++ b/Formula/c/coreos-ct.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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..1393130ba9ca3 --- /dev/null +++ b/Formula/c/coreutils.rb @@ -0,0 +1,129 @@ +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-9.7.tar.xz" + mirror "https://ftpmirror.gnu.org/coreutils/coreutils-9.7.tar.xz" + sha256 "e8bb26ad0293f9b5a1fc43fb42ba970e312c66ce92c1b0b16713d7500db251bf" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "5d3e3c74de367a4d8ae6f22457732a8e5d39030c46f8f585b1780c0a916d0c8e" + sha256 arm64_sonoma: "4092845c230a1b20213f3896125f12484cf72dcaca28e111544dbacb1110c8eb" + sha256 arm64_ventura: "84dc5707dd057de5ed4c6b79ae33c807dd00890cf470a64d3f200295974dec33" + sha256 sonoma: "c7580a41bcd888acda07bd8b2c6c0c194a3763a27d36b1a48210a96f22ee773c" + sha256 ventura: "838f1374519d8ddab94bfb910d57f802d6551baf4b97d6580e323d7d01f3180c" + sha256 arm64_linux: "485b2b05cc5e1293ef2e7dc4b3471e916dddb170424d5a4a57483f2d829d0a60" + sha256 x86_64_linux: "b4c41fd3102b03845f5ed8163a09dea3534db3773415524ddb5be10145aecb78" + 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 + + 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 + + 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 diff --git a/Formula/c/corkscrew.rb b/Formula/c/corkscrew.rb new file mode 100644 index 0000000000000..7da286a770423 --- /dev/null +++ b/Formula/c/corkscrew.rb @@ -0,0 +1,57 @@ +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 + + bottle do + 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, mojave: "c9a878e744506cee8a10b370ec59a2ebfb43b0a84c73ff02b67ba24f68c17938" + sha256 cellar: :any_skip_relocation, high_sierra: "53e2a491ecc6b1446ed3dcf1fc9a8c44ca9735acd9d0626e7806dc80b5285e79" + sha256 cellar: :any_skip_relocation, sierra: "85d9050689df4cf0ec3275957fad60609ea1a9511079f20f05470e1b767c94f2" + sha256 cellar: :any_skip_relocation, el_capitan: "f7e4e63df01aa33a6518f4f6c2c0ccbb0c7b8aaca95052d4aa827b5e56ed8e5c" + 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/corral.rb b/Formula/c/corral.rb new file mode 100644 index 0000000000000..b01357c2da7f3 --- /dev/null +++ b/Formula/c/corral.rb @@ -0,0 +1,34 @@ +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.8.2.tar.gz" + sha256 "26dad1803e8d06b659e82868957ceeebc85cb359b793da0e1ad8c02e86644b21" + license "BSD-2-Clause" + head "https://github.com/ponylang/corral.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "29bf46a9f879d765f5b4934d1225e7e3628d89eeeb861e4249db13d68394ed91" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c5f379d1abe1f5149675a4146d4e0fd296082ef236f53732a614e006bed00fe0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1fa374827a91062063dd2671364f343f8a9600ec097b016696947e1f1f223db1" + sha256 cellar: :any_skip_relocation, sonoma: "d3c9f703f83af5aae58955158e41a06ec7f278c88835788c5284dc83ea128375" + sha256 cellar: :any_skip_relocation, ventura: "22d42569b1948244d62de3e221aa049b32b158bb13caa8f89668b832cce137e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ca8261be3429b294cc647a29ad984237eb955d01578608272c9c80166c1afee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9cd3c31d9a1fd5c3f13c667eb4ebcfe21ff5a5f60ab51fcf692b0d69ec340823" + 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..49b95f8851a69 --- /dev/null +++ b/Formula/c/corrosion.rb @@ -0,0 +1,37 @@ +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_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..7662b7cffd499 --- /dev/null +++ b/Formula/c/corsixth.rb @@ -0,0 +1,119 @@ +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.68.0.tar.gz" + sha256 "54034b8434f5c583178405d2c84477f903fe2b15933b611f42230668e35d632e" + license "MIT" + 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_sequoia: "f870772f5827546ce2d05d7c82f5aa04c35f5d95111a2f8f4291eb02d0eeb518" + sha256 arm64_sonoma: "a998b8cb521a5c46582038f6d8a89ed6e647341c71df2d265af0c2ffc109deda" + sha256 arm64_ventura: "f33fb70d41df5fa4908989da6c640125723afee46e595b014fec646b0e22a0d4" + sha256 sonoma: "85a59fbbd11582ee897c97deb738fd4dbf9296cb4ba6ebc31e58dbd5d1362504" + sha256 ventura: "5f80e96e69be652083c55583cd7f5c624df10c076c309af4da609137faead94e" + sha256 arm64_linux: "682949f41996b62e90d171e70bd962468daefe53e08a842552ef324af9c03ba2" + sha256 x86_64_linux: "c4a8daafab979bc9e0795b94beff96c65f0e88a665559e5990b56f53ab1ae868" + 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 + 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..202c7fa501604 --- /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.0.tar.gz" + sha256 "7cb6b312f67263e40fef3a99afb7d12bce69fe035e7b787b9c1efb4bf7a693bc" + 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_sequoia: "ddcda7547e90bde4e7466eed576f853d1b024fa730f6a2083f35db2ece003a0f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ddcda7547e90bde4e7466eed576f853d1b024fa730f6a2083f35db2ece003a0f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ddcda7547e90bde4e7466eed576f853d1b024fa730f6a2083f35db2ece003a0f" + sha256 cellar: :any_skip_relocation, sonoma: "6b2f54b88703909eb151d7d7af35b576a36bb1d6f58c1401f7b1e884e14ca123" + sha256 cellar: :any_skip_relocation, ventura: "6b2f54b88703909eb151d7d7af35b576a36bb1d6f58c1401f7b1e884e14ca123" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e5fd77ae5c2bc6afe90da427f3a780adb07896bb655c09c57b92e5b0423de2c" + 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..80ff6025b4339 --- /dev/null +++ b/Formula/c/cortexso.rb @@ -0,0 +1,54 @@ +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_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 + + 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..934b1b0b97592 --- /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: "v2.5.0", + revision: "38bb98697005cdc5c092f031594c0e45d039f4a0" + license "Apache-2.0" + head "https://github.com/sigstore/cosign.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8c2cd25f665ca8ea906e08475fc7094dc2dc32afd5a4ff365bf799dbbce99b21" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f083bd5adc5e4c89eeee008732596380f7a0b123c42ee0e2fc8c4a394e175ee7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0b4d94d0a5ad0ba7fb6d95bb7e5a53d16f3f27eaffb8789897ce38eb1cc59cbf" + sha256 cellar: :any_skip_relocation, sonoma: "47f7ef1bb3b65d438baa796a1d69c825157b1ed1630b6d81f7ddd778b5f6708c" + sha256 cellar: :any_skip_relocation, ventura: "97766a8e480cd06913c1f46050ebc70a1a959715f34ea7705207a6f79b22a9b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "36ffc2c1d6c6a55de34709f44c0ed3ee01be183791535f34f164757d0a97f0d9" + 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..597cd529615fa --- /dev/null +++ b/Formula/c/cot.rb @@ -0,0 +1,30 @@ +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.3.0.tar.gz" + sha256 "d359d5948c0d5d8487c467a420b0b8a3b0dd8e76a4dc5b1392b21b11badf8dd4" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8a4ad582601b310fd2032dccd7c8cda5b35feda347b0c006fe6a85f489b04200" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "07cacb84310c872b8566dd2ddd5368a5bb86107b9a42413af21ba3532cab7c20" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bcc642f86d4aa89724026def2ea07b430d895debbe52b33fe206f06065fd3289" + sha256 cellar: :any_skip_relocation, sonoma: "327458cea9ea8a0a50e32a12d4e7c9f3670c1bf19f90f236969db25ec0b2aaa5" + sha256 cellar: :any_skip_relocation, ventura: "e1da2d011a0f15e92755babb6d161b480eb60d404858ab0972ecdefd62995785" + sha256 cellar: :any_skip_relocation, arm64_linux: "843c192cb4f5f4045241702c2eeb9d094df3792c5699b1ba446ce5092711bd1d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6dc8c54af49b1b0b31391d096e5e89ce4856d680c55539838a30afc9c3cf491f" + 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..aa4ff7ded97d9 --- /dev/null +++ b/Formula/c/cotp.rb @@ -0,0 +1,34 @@ +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.4.tar.gz" + sha256 "d992698e9177f7e9e00031c91d3f4857c39fb6cdc988ee5e1b4424ae6b82ea36" + license "GPL-3.0-only" + head "https://github.com/replydev/cotp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d234fa403ac86f2df536f76e90ab76fe7bf20134694a10c9c08c59ea0d66b9ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "429548e6194f6950502696a7ab495e47710dadca94fcc215881a69ec7a697712" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a8113b265e4caa7e87f07f3086397782e9093eac4f6267765aad25fcb0529ca7" + sha256 cellar: :any_skip_relocation, sonoma: "2b340dc84d3347dfd46305052812c614c6b0a99dcc81b60df2273ad45b36771d" + sha256 cellar: :any_skip_relocation, ventura: "0ff8c664232159a53ecb631f8b0dbff67d29f0d6742d412269943e8e29b657e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "507729b15f6dacde3ec96ef758825179cadfde8745ec1f916f01c9b5642edf0a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d696e4a80b0a6b10124e8d4004b6da1a06fb7f4143939cadebe4f3ffb077c4f" + 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..14701498da286 --- /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.6.3.tar.gz" + sha256 "dc3a529fd9956dc8771752a7169c5ad4c18b9deef3ec96049de30fabf1637704" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "d9bc46fa338fa68b9a829f2086b359e2cd92291ac2334d23d2d25bce73210647" + sha256 arm64_sonoma: "f48367d4e77f52c69ab4ad0276a3b8f8200679e8dfcb5ac5995dfa0603454778" + sha256 arm64_ventura: "177e302f3af1048a929dafbdd0ee76c11f94d37fa5463b38e29ee3967c02d099" + sha256 sonoma: "94d3da45859fbc4ff34196fba84e0af037a9654efe84e5656f2287b22808ca25" + sha256 ventura: "de095f3b7f5020ba028b1b01aa6750400e395f1a87c6c6d89748d07b5dcf5250" + sha256 cellar: :any_skip_relocation, arm64_linux: "64207317fa171d91d0088b4d8cc9f97de409735a2343b18b6a724489d6fd9edb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "231c71724dd5e78c2373cbc3e145b30552e36663ae210c305f2935d025681982" + 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..96622c1628fb8 --- /dev/null +++ b/Formula/c/couchbase-shell.rb @@ -0,0 +1,37 @@ +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_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 "rust" => :build + + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + 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..adc417606db1c --- /dev/null +++ b/Formula/c/couchdb-lucene.rb @@ -0,0 +1,96 @@ +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, mojave: "d7e8191c66bc938d7c8e15c10c13612be41ef601f5f6ab78b9ef5275c04bf89d" + 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..526402635cdbf --- /dev/null +++ b/Formula/c/couchdb.rb @@ -0,0 +1,78 @@ +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_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..8b9cf5c2e5dc6 --- /dev/null +++ b/Formula/c/countdown.rb @@ -0,0 +1,32 @@ +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_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..026f0a3a6ba43 --- /dev/null +++ b/Formula/c/counterfeiter.rb @@ -0,0 +1,40 @@ +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.11.2.tar.gz" + sha256 "8a8cc2c51d3118ba8fdac1bc93bb1c25fd6fcc135415f34ce3b02fc057be2f2b" + license "MIT" + head "https://github.com/maxbrunsfeld/counterfeiter.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f5b1ce50092552ea9b705730a0a111a80e0e3cfa6ab38155f20a4bb2159080d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5b1ce50092552ea9b705730a0a111a80e0e3cfa6ab38155f20a4bb2159080d5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f5b1ce50092552ea9b705730a0a111a80e0e3cfa6ab38155f20a4bb2159080d5" + sha256 cellar: :any_skip_relocation, sonoma: "1bb3461edc31c61bcdd5cf69d3e4973ea98e6d51e3d82d26c22963e1d0128e16" + sha256 cellar: :any_skip_relocation, ventura: "1bb3461edc31c61bcdd5cf69d3e4973ea98e6d51e3d82d26c22963e1d0128e16" + sha256 cellar: :any_skip_relocation, arm64_linux: "5452b37a98cacbe9ce1a2dd08fa7872f18eee49cfdc26d692650317c6e05c969" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d2459c5b2c06488e4387b4fa51f438e22210fe5c6a4ca8a33a45a015ae0e4ed3" + 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..3dc158afce17f --- /dev/null +++ b/Formula/c/counts.rb @@ -0,0 +1,54 @@ +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.4.tar.gz" + sha256 "fe4f869f9cf49a8aae57858e0ed4c76ea5f849db1445a2013d45a8e020b764c0" + license "Unlicense" + head "https://github.com/nnethercote/counts.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "82fa9ab01c22a6ee0df0a94c77008b58371646ff586f9298381d4231b06ac090" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb7bb551f6987542cace13619dbab2bce843a0c54b0add2090894e7f24b47623" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9f743f71875e3dd582631c35c4d4a9d2fb0850f7c170e294898ece405623b902" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ead496d9dd7dd01fc848d4f47465f872d1b942be786773ab6dbab5f05e805b55" + sha256 cellar: :any_skip_relocation, sonoma: "8f35bb0445dc8cb22aeb6b08739d76ef4ecf72803d8224b5d1268a4912142a37" + sha256 cellar: :any_skip_relocation, ventura: "51668f2ff93d15c246b5a7d57e2aebc235cae290cbde763965fdabc1d1d6c2a0" + sha256 cellar: :any_skip_relocation, monterey: "a4ea94d074f19ef53137496307d5887f6590d9542d314b157022c0ca9f68427e" + sha256 cellar: :any_skip_relocation, arm64_linux: "19aeb112e08fb7e4bac47349d3ad1d5d22338857e929fd8bd9ce122112c7a76d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "263fa00c97a3aa55d4857bd1e1ae79d2b1b94f9aafcd7d6f50040cd9bbd7098a" + 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..1a255ebfccbb0 --- /dev/null +++ b/Formula/c/cowsay.rb @@ -0,0 +1,22 @@ +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" + + 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..c21d1ec46d835 --- /dev/null +++ b/Formula/c/cp2k.rb @@ -0,0 +1,103 @@ +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_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 "python@3.13" => :build + depends_on "fftw" + + depends_on "gcc" # for gfortran + depends_on "libxc" + depends_on "open-mpi" + depends_on "openblas" + depends_on "scalapack" + + 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 + system "./configure", "--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: 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", + "-DWITH_EXAMPLES=OFF", + *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", + *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++ + -DCP2K_BLAS_VENDOR=OpenBLAS + -DCP2K_USE_LIBINT2=ON + -DCP2K_USE_LIBXC=ON + ] + std_cmake_args + + system "cmake", "-S", ".", "-B", "build_psmp/cp2k", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-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/cpansearch.rb b/Formula/c/cpansearch.rb new file mode 100644 index 0000000000000..cbe05c241be10 --- /dev/null +++ b/Formula/c/cpansearch.rb @@ -0,0 +1,53 @@ +class Cpansearch < Formula + desc "CPAN module search written in C" + homepage "https://github.com/c9s/cpansearch" + url "https://github.com/c9s/cpansearch/archive/refs/tags/0.2.tar.gz" + sha256 "09e631f361766fcacd608a0f5b3effe7b66b3a9e0970a458d418d58b8f3f2a74" + revision 1 + head "https://github.com/c9s/cpansearch.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "6f99905d8bca0790ecf1d11a25cc00e5057f9a552afc1a051530dc9a6271c93c" + sha256 cellar: :any, arm64_ventura: "559728aeba9f49230296c122a6082e18f188b17b689b015ae87bc3169f07dea3" + sha256 cellar: :any, arm64_monterey: "2a3b8377204fbffa071e4b8493e1c6bd5bf08df9d86d3e447470b55c34304277" + sha256 cellar: :any, arm64_big_sur: "60c7266ff4239e5a4e1eb31a8831ebe6f3fbaec4d177986dc1e1a8c58f31d335" + sha256 cellar: :any, sonoma: "1ef7dbcf248244b629d880236d70c50aa950baa10aeb7e5995ebf41a176dd023" + sha256 cellar: :any, ventura: "0d363d18d2a5b5a87bac3560266b5af9d3654dd20aedee7fd3b61ab3929beb48" + sha256 cellar: :any, monterey: "2ef810c08831dc48837d8b3cb0ddcfd13769d8f17397bb62e10f84ce90c2fad1" + sha256 cellar: :any, big_sur: "facb5cfb7e61d1fecba7f3185230c405abcdcf213dc779749fef25c47e72be63" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f88cd961acac2cdd3fd6711aea3c5e7fde3a23356c0a299f08cf440bed88d7d" + end + + # upstream missing license report, https://github.com/c9s/cpansearch/issues/5 + disable! date: "2024-08-10", because: :no_license + + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "ncurses" + + uses_from_macos "curl" + + on_macos do + depends_on "gettext" + depends_on "pcre2" + end + + def install + unless OS.mac? + # Help find some ncursesw headers + ENV.append "CPPFLAGS", "-I#{Formula["ncurses"].include}/ncursesw" + # Temporary Homebrew-specific work around for linker flag ordering problem in Ubuntu 16.04. + # Remove after migration to 18.04. + inreplace "Makefile", "$(LDFLAGS) $(OBJS)", "$(OBJS) $(LDFLAGS)" + end + 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/c/cpdf.rb b/Formula/c/cpdf.rb new file mode 100644 index 0000000000000..847c049da7500 --- /dev/null +++ b/Formula/c/cpdf.rb @@ -0,0 +1,55 @@ +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" + + bottle do + 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..38b13a9ea9758 --- /dev/null +++ b/Formula/c/cpi.rb @@ -0,0 +1,55 @@ +class Cpi < Formula + desc "Tiny c++ interpreter" + homepage "https://treefrogframework.github.io/cpi/" + url "https://github.com/treefrogframework/cpi/archive/refs/tags/v2.2.0.tar.gz" + sha256 "fb62a1e620850dcb69a1e65d0ff22c309c0469c876c718db017d0f92bcd114e5" + license "MIT" + head "https://github.com/treefrogframework/cpi.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sonoma: "83f1d3e84a6717be85bd5d5303ec9844674adb1815e8356f7689e9932916fb06" + sha256 cellar: :any, arm64_ventura: "3e6533a18019a9eafc3a3217135c0205deb8fb63e05bd910698cf824e34d031d" + sha256 cellar: :any, sonoma: "c26b11acc67d50e9f14b8b510c899173bbb93dbb80aa49f5813e5548012fdbe0" + sha256 cellar: :any, ventura: "f991fc7314d3db3a6e74d13b3e120adfc6cd40311db2afa1586b013353c7522c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b330b5e227b479dea3cca97bc0a9e85d1e7b7450adf781236ffa96f1350e0e7" + end + + depends_on "qt" + + 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..d9697bd795da2 --- /dev/null +++ b/Formula/c/cpio.rb @@ -0,0 +1,42 @@ +class Cpio < Formula + desc "Copies files into or out of a cpio or tar archive" + homepage "https://www.gnu.org/software/cpio/" + url "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.bz2" + mirror "https://ftpmirror.gnu.org/cpio/cpio-2.15.tar.bz2" + sha256 "937610b97c329a1ec9268553fb780037bcfff0dcffe9725ebc4fd9c1aa9075db" + license "GPL-3.0-or-later" + + bottle do + 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..b64d2e6d4fd6b --- /dev/null +++ b/Formula/c/cpl.rb @@ -0,0 +1,58 @@ +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 + + bottle do + 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..f05398dce8257 --- /dev/null +++ b/Formula/c/cpm.rb @@ -0,0 +1,227 @@ +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.997023.tar.gz" + sha256 "5185cfba03bd48e9554663721172a387d66c81dc5e1a1f83b967aabd04614c95" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + head "https://github.com/skaji/cpm.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f030e621df88f8368cea7a2e77756bedd0686ef8f58f8f416b3809e1ed90db23" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f030e621df88f8368cea7a2e77756bedd0686ef8f58f8f416b3809e1ed90db23" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f030e621df88f8368cea7a2e77756bedd0686ef8f58f8f416b3809e1ed90db23" + sha256 cellar: :any_skip_relocation, sonoma: "77a6c6c7095fd5e4d44f318ac67a7e5f3a22560772ba4c996fcb73583a4aaeaf" + sha256 cellar: :any_skip_relocation, ventura: "77a6c6c7095fd5e4d44f318ac67a7e5f3a22560772ba4c996fcb73583a4aaeaf" + sha256 cellar: :any_skip_relocation, arm64_linux: "6382742191f0cc6f2f864036ae6b023c3123d82cb7e9498cbeea33f7a680ee32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "edcb1755af01eac0735cdcbc9cf3d791a1258cb68fe9234814e6337407701cfa" + 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.051.tar.gz" + sha256 "74fdce35e8cd4d787bc2d4fc1d43a291b7bbced4e94dc5fc592bd81ca93a98e9" + 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.200.tar.gz" + sha256 "5ad26d06111bfecd53c8f5bb5dea94bf2025f6c78e95f6d8012e4cfa89e29f26" + 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.200.tar.gz" + sha256 "88b9850eacc9d618f3e91a51caa386c4a64e82cc187350335244e349b8111106" + 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.31.tar.gz" + sha256 "b9c4d58b2614b8611ae03a95a6d60ed996f4b311ef3cd5a937b92f1825ecc564" + 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..b751e29352775 --- /dev/null +++ b/Formula/c/cpmtools.rb @@ -0,0 +1,64 @@ +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 + + bottle do + 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..1ffd7ce74c6e5 --- /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.20.1.tar.gz" + sha256 "b74b1c2c150be2841eba80192f64d93e9a6711985b3ae8aaa1a9cec4863d1dd9" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6c8739839a8d1d626299bff4a7eb2efaffd52779062108e696c54fc6b313d96a" + 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..1e88503f26eca --- /dev/null +++ b/Formula/c/cpp-lazy.rb @@ -0,0 +1,42 @@ +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" + + 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..079527899625b --- /dev/null +++ b/Formula/c/cpp-peglib.rb @@ -0,0 +1,59 @@ +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_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..0c8ff50ad3a60 --- /dev/null +++ b/Formula/c/cppad.rb @@ -0,0 +1,57 @@ +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_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..4c54245a83f02 --- /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.17.1.tar.gz" + sha256 "bfd681868248ec03855ca7c2aea7bcb1f39b8b18860d76aec805a92a967b966c" + license "GPL-3.0-or-later" + revision 2 + 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 + sha256 arm64_sequoia: "3102544868411c345f7bb673595f0226163fe9e6d220ff4715c7af038751a9b7" + sha256 arm64_sonoma: "77ac696a0ef87246ca35816c0dfb0c094bdee504bb987d1ba1658414743a6fa6" + sha256 arm64_ventura: "023da7be5d3eb3d13f4609eeb23601bd95b7a261dcb2cd545c7aa7a0d25494e3" + sha256 sonoma: "8d5db1a37f58fa1313ff48bd119d3bd7fbf9b1604f6a2d51c0e167581b548f81" + sha256 ventura: "28b99b71be9372234be2e688217a65675bb7270f9c851c48e6dd825ec4d9b29a" + sha256 arm64_linux: "40e4409e2397ae1d69d2c4643cb57887ee81bb96cea754f04439dcc8d8975390" + sha256 x86_64_linux: "3ce75b931157c6e05a6d3e016fefd6d5c3357e2c3975440dac2b916b118c8c90" + end + + depends_on "cmake" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "pcre" + depends_on "tinyxml2" + + uses_from_macos "libxml2" + + def python3 + which("python3.13") + end + + def install + args = %W[ + -DHAVE_RULES=ON + -DUSE_BUNDLED_TINYXML2=OFF + -DENABLE_OSS_FUZZ=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..0c92843456b0a --- /dev/null +++ b/Formula/c/cppcms.rb @@ -0,0 +1,121 @@ +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 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "15a16c5b5f573a43871ff8c74cc01c314fb0e4972d4c70ca7f168c662bf20ef5" + sha256 cellar: :any, arm64_sonoma: "40b9a78d35c4a82ca461589a699a578b9af04a2db0bd04e996585bd4caab6b00" + sha256 cellar: :any, arm64_ventura: "fd4431e3606205326aec8f484f3244201795ac5d23343489bcbebcee30dab312" + sha256 cellar: :any, sonoma: "fa701ccf8fdb79cdef8b0a690ef5f77f167d63568349aefaca9ede863a3b16f1" + sha256 cellar: :any, ventura: "adc2a352809a202ca39cfa42ca5674512311d7e58a13bb1a4db8e844bfb7b310" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e32e87d6fd92a34b980782479476ec19d5c7e153cc81f5c002d0ce578f9ac35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1882da73e8db41b00a7fa01095d3d59314814cbaeb351e8cb7ca6611d44c02c2" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + depends_on "pcre" + depends_on "python@3.13" + + 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", *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..53ef07868ff50 --- /dev/null +++ b/Formula/c/cppi.rb @@ -0,0 +1,49 @@ +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" + license "GPL-3.0-or-later" + + bottle do + 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 cellar: :any_skip_relocation, mojave: "9091ecb45e38512cdeb73d92078d1ee9c7bd8e5bce9d1698da9a53e2ae3f8b3c" + sha256 cellar: :any_skip_relocation, high_sierra: "bc8253f982b219088603021d510a6e7ee6d692ff5f693da19b32d0431bc9c9b4" + sha256 cellar: :any_skip_relocation, sierra: "d4c044247ba8a12f1462089bfa22602547894f0a9081fce21c4800e192a526ae" + sha256 cellar: :any_skip_relocation, el_capitan: "970e44d2a7a340fe29577f92c4b6dfcbac17f3aef35e6085197b668c4cd9013f" + 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..616502a08c845 --- /dev/null +++ b/Formula/c/cppinsights.rb @@ -0,0 +1,47 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a633e7409562a57dcb44c9d1dbc216b3aa44ad3cb2a9424ddd3c00380ed06570" + sha256 cellar: :any, arm64_sonoma: "4fa5e74d7a8ded4618e8c6ddae47c77404891162e7b1fa38faad2cb9da5e1247" + sha256 cellar: :any, arm64_ventura: "c79eb403f5dcf43df867b2c2816c44527ee0bdea3c309161555a9f17a8d69762" + sha256 cellar: :any, sonoma: "949ca974b680ae7f24ea630bf94c668f69a846047e965aee01a8cb76950e6ca9" + sha256 cellar: :any, ventura: "1a8d128dffa08e8846e4d40c6272c094cbca13cf74b097690c3e2ad75762f76b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2fb8f4a46069faa95fd11d1572e5885b085a030db0d81441d674e5443b2ecba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68e8bd9b586a8a317b8eefbc6f6024a54f05ca22c47e7d016fa6100d18649abf" + end + + depends_on "cmake" => :build + depends_on "llvm" + + fails_with :clang do + build 1500 + cause "Requires Clang > 15.0" + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + + args = %W[ + -DINSIGHTS_LLVM_CONFIG=#{Formula["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..c4a55af5e5f99 --- /dev/null +++ b/Formula/c/cpplint.rb @@ -0,0 +1,31 @@ +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 + sha256 cellar: :any_skip_relocation, all: "e806fee8faa6d3aa1ea85acfe05ddb6b436f60ec95754190bc2b5ad893140218" + end + + depends_on "python@3.13" + + 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..49389f22c86d4 --- /dev/null +++ b/Formula/c/cppman.rb @@ -0,0 +1,79 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e7edded6fb04088da0b36108353bc082e82481dd5d6ba603e4313f926c63a8c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef7dc14b3e716c606d544ca2602786015dadcae34900798e5848df1b5481eb4b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a8850c52d49794b7386b0465fa3be10e8b48d2fbd6dd0ab5243f1e22172b7790" + sha256 cellar: :any_skip_relocation, sonoma: "b53e16784003384fae92a99dea19f97ae79844da5c8f420db45e990534f6ac18" + sha256 cellar: :any_skip_relocation, ventura: "ff6009f665c229db982f2bd5d6241536da69fc60840ef600b7f27483769d050e" + sha256 cellar: :any_skip_relocation, arm64_linux: "61499f34933d6bf8a3d5bab8ccb0d3366d3ea4e002af09e20b363706bc9ebb98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3bdb4b1df81dcbf31ee521271f510c565492921d31ce2d3d1070e1a708f53715" + end + + depends_on "python@3.13" + + 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" + 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..09137fca3ce21 --- /dev/null +++ b/Formula/c/cppp.rb @@ -0,0 +1,52 @@ +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 + + bottle do + 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..c0d60e5ff234f --- /dev/null +++ b/Formula/c/cpprestsdk.rb @@ -0,0 +1,67 @@ +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 2 + head "https://github.com/microsoft/cpprestsdk.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9640d605200200ae3d237d25c4331dbba2966b4581caff255f36a6ee4afe342b" + sha256 cellar: :any, arm64_sonoma: "7be58510e079c21e8521cbd6d8abcc72aa21e6253050b60b47cc4796b7a80ed5" + sha256 cellar: :any, arm64_ventura: "18cca4c9e3e5beb9e777729aab6b8f0bada951a3e4ea7605137c810e248b9a1e" + sha256 cellar: :any, sonoma: "fe4b73f785105a59749145114cba254a60729d80cb018e949fb1c2e1b32e84ff" + sha256 cellar: :any, ventura: "e644df4a3ff8db4487036eafbdd520bcf9479b6fe120845c6aaf400a81938d43" + sha256 cellar: :any_skip_relocation, arm64_linux: "07bc8aca63500a0b774984258086a28b5406b67814e9ce62e335b9e2edf8eb28" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1703233871c829af74138257f48fa690602ea45f7d7084a0acbd163a4c6db494" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "openssl@3" + + uses_from_macos "zlib" + + # 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 + + 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://example.com/")); + 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_system", "-lboost_filesystem", "-lcpprest", + "-o", "test_cpprest" + assert_match "Example Domain", shell_output("./test_cpprest") + end +end diff --git a/Formula/c/cpptest.rb b/Formula/c/cpptest.rb new file mode 100644 index 0000000000000..6c6705c80aa68 --- /dev/null +++ b/Formula/c/cpptest.rb @@ -0,0 +1,61 @@ +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" + + bottle do + 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, mojave: "5a109d0b6cb796d0de9e6b32a6373e1e78fd4da316be33a26ba9c84fbf799eb8" + sha256 cellar: :any, high_sierra: "cac49d059592f8d9f030855041727a61c7358404e16fc63d106ade58253ba0f1" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..3f107749fc3e2 --- /dev/null +++ b/Formula/c/cpptoml.rb @@ -0,0 +1,60 @@ +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" + + 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/cppunit.rb b/Formula/c/cppunit.rb new file mode 100644 index 0000000000000..06b65e5f7acd0 --- /dev/null +++ b/Formula/c/cppunit.rb @@ -0,0 +1,38 @@ +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 + + bottle do + 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, mojave: "1c107efb84d656dd5327aa8cf13e6cbce8db7542aacba98ae98a2b05940b16ff" + sha256 cellar: :any, high_sierra: "08a339bc38db169bce2f5eb0fc0b940bc82562c37274aa770668f681aeca4386" + 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..968772e3a072c --- /dev/null +++ b/Formula/c/cpputest.rb @@ -0,0 +1,55 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "59881c464ae17f1a2381145f78f614d174c83fbe8f4900e362e9a6830fcf446e" + sha256 cellar: :any_skip_relocation, high_sierra: "9cea67d4098efe30dd499d1a999467800ff91a9e7954ec6407b03d181a20761d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d93627b9eacfae5a05edbc1a678dfb89652ca842905d10993b35861913fde598" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4fb771aa9c96a9d5fa6f88f1172d94ed171b1b2ce87a353828771b48d732c68" + 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 "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..9f292aefe4385 --- /dev/null +++ b/Formula/c/cppzmq.rb @@ -0,0 +1,31 @@ +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.10.0.tar.gz" + sha256 "c81c81bba8a7644c84932225f018b5088743a22999c6d82a2b5f5cd1e6942b74" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "1be9fecbad4da621c4f608f0395efd58f1252f1898ea64620bdaf82a1b6fdc1e" + 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..24b1b6e513f5b --- /dev/null +++ b/Formula/c/cpr.rb @@ -0,0 +1,67 @@ +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.11.2.tar.gz" + sha256 "3795a3581109a9ba5e48fbb50f9efe3399a3ede22f2ab606b71059a615cd6084" + license "MIT" + head "https://github.com/libcpr/cpr.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "71b2c9813a08b665d0a5b8b24868396208e09e7bf76cd45c2076d37b99cb6cdc" + sha256 cellar: :any, arm64_sonoma: "f6a28ce2ce192505511c292fa90858d22d8e42f64ff95c8975cfadc256dcb592" + sha256 cellar: :any, arm64_ventura: "3271fe9f057e55db84d65544aff6b517a8da692ed1c32cf82de0ee7652218fda" + sha256 cellar: :any, sonoma: "cdaa14c8143c2a06e71b5de2c4f11b997e154924421a099a04dc1170262731fe" + sha256 cellar: :any, ventura: "12d3ddfced34a20c53564923df2382be1ddd69b605c2d2840781f91ddb6f228c" + sha256 cellar: :any_skip_relocation, arm64_linux: "929fb7a7d06f35f49c3d30fdc749633bb22d4f7bbb4f83a38b20a066acf884e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a456aa6d23a7639a658cd46e80479bce9889e4a708a0f4e90ed1ed41d2ab63cd" + 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..744cf5729999a --- /dev/null +++ b/Formula/c/cproto.rb @@ -0,0 +1,40 @@ +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.7x.tgz" + mirror "https://deb.debian.org/debian/pool/main/c/cproto/cproto_4.7x.orig.tar.gz" + sha256 "fb24b7254d8a5118913d3b7a54331975e60553afc70b88e4e7c2998203478cfe" + 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_sequoia: "74d14e6a7fe7d38a689657640c86f216d7ac5a5a472dac25d11a0668b5a76cb0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b7d8b448e7cac556d0061b2009604cbaf8eab809ce5d49ead798537ce6a707c1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c4fd395a6bca7ab53b5d1ec26d42cffdf5eae1d09d2dfbabf97a272433783304" + sha256 cellar: :any_skip_relocation, sonoma: "9fa78ac025b54e39d8bde868a2448c3bcfefb75ae582e44f35e0b8b371359245" + sha256 cellar: :any_skip_relocation, ventura: "321f6ca8a2ed5969e8e122279366e2c9b66457384599ab66fa3fb54d24348fb8" + sha256 cellar: :any_skip_relocation, arm64_linux: "c6d089f8bb6c3d23578d7c96e83b9cc23404363db522297c3ee935afa3c3776e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b48c6f4e571b667be12169a26d7b873fa73e22bbfabd5be8d4af34c5056f488e" + 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..eb27dd5ccb1ea --- /dev/null +++ b/Formula/c/cpu_features.rb @@ -0,0 +1,52 @@ +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_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..8a4700b24f8b9 --- /dev/null +++ b/Formula/c/cpufetch.rb @@ -0,0 +1,50 @@ +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.06.tar.gz" + sha256 "b8ec1339cf3a3bb9325cde7fb0748dd609043e8d2938c292956da7e457bdb7d9" + license "GPL-2.0-only" + head "https://github.com/Dr-Noob/cpufetch.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ab3dcf28e559af53759e191e76639f453a84a1707c615d5238a2e575b5eb7cc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "098d557d887f19ad7094306afcc07f8f0ee0346badd16f704c97df60a01f8c44" + sha256 cellar: :any_skip_relocation, arm64_ventura: "be2768d3f1d3a912e569e4dbaf407e4e7c881646275d2352d5d36e380568de05" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f696fa4865ae44d9390086d69318c6ad51d2b3425d77df5b3d17f45857e9a48e" + sha256 cellar: :any_skip_relocation, sonoma: "0faccde150115bfff166681b0f0fc22afeace6893f9f41972bfe7eb6026880bc" + sha256 cellar: :any_skip_relocation, ventura: "7f7c1ee72012d279f55cc50be333ad179c419e2d58b86035da5b24fb6a9070a3" + sha256 cellar: :any_skip_relocation, monterey: "f3a3ec4943787e4407d8b3c0d096739d71e0e15e90090121d74c3e0b590493ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc4e91b1eb64ecebcc988f28b958dc3ca9801e0f6b4458233cb4ff12865747eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0c449650a3358d7038e5b73831cc000ce0af1610c84abac26e506e5ff33e802" + end + + 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 diff --git a/Formula/c/cpuid.rb b/Formula/c/cpuid.rb new file mode 100644 index 0000000000000..20589d8d8bffc --- /dev/null +++ b/Formula/c/cpuid.rb @@ -0,0 +1,31 @@ +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.2.10.tar.gz" + sha256 "6064676aebe4848dff0aee73fe73efd0ecbf6f521faff94d266ce88283cf568b" + license "MIT" + head "https://github.com/klauspost/cpuid.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "407aa5d6b2f38800ef7c9163a0b36458accb97585c79216200fbafd66a734c0c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "407aa5d6b2f38800ef7c9163a0b36458accb97585c79216200fbafd66a734c0c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "407aa5d6b2f38800ef7c9163a0b36458accb97585c79216200fbafd66a734c0c" + sha256 cellar: :any_skip_relocation, sonoma: "ecfa112b44890d4e7f642b877c481cb42f97bbde314fc3f129a2c013dd897e60" + sha256 cellar: :any_skip_relocation, ventura: "ecfa112b44890d4e7f642b877c481cb42f97bbde314fc3f129a2c013dd897e60" + sha256 cellar: :any_skip_relocation, arm64_linux: "08f1cbad37f37822d1bb0ce32758b0ca0b6649fc89ba0328a658a446b2e8acba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ce13ee61313acec4f188de11c6707403489972057906b950aaf19bf5af8c6f6" + 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..ce2f89a025673 --- /dev/null +++ b/Formula/c/cpulimit.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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, mojave: "b9c7f99cbc62eb7c02b19c63a9b7e3f9186175707ff853a7107447fd7b2ee249" + sha256 cellar: :any_skip_relocation, high_sierra: "077ab8835a3b44ce77e3b8bf867633115b1d056046b232e49aeac96ac30e731c" + sha256 cellar: :any_skip_relocation, sierra: "fa5bc8d713837693c6bbd6139bec5e48b8a1d46ef669b2e042715dd1318b1655" + sha256 cellar: :any_skip_relocation, el_capitan: "9d7320465152a12ba75ce924beada5a3ce365b14becaa75e08ee8334c2cb2f6a" + 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..3a0c8504808c2 --- /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.1.6.tar.gz" + sha256 "f781abd69142551bc90e98bf986e82c191a39a9e1c45370d12a073268bc79c86" + license "Apache-2.0" + head "https://github.com/datastax/cql-proxy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4956cf9eb3aac88e7b3706870559e78ad8d7bf2f84470b858813ec6f3f2d674e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2dc499bc83523870318cb45457c8dbf5463b38613e8ba898eb40f3cfb26ed15e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f1341c402de442c3c8dc05e77ba655c372c14bdca32b36b3078be628fc62ee25" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c03fd5277a1fefba5da878800cf8c0d5efb8913a34850a60e840150f3a8c5508" + sha256 cellar: :any_skip_relocation, sonoma: "2e6e2bb6fb905db404f8912cc49e55a8d3dda016513e4eb683c89903161c8ddf" + sha256 cellar: :any_skip_relocation, ventura: "ea58fa6d3a9d6987cb1b67f88ee2f14bcd83d8502b9d848e2cba7528fb0b8637" + sha256 cellar: :any_skip_relocation, monterey: "6dc0f64f5ddd99e41653adda5e140c47aeb03c5a612a3f656f52e30209144a73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf5794b3521badaf76342cd4bcc83df09d26e3e77e7a2c9e1942ce3fcfb817ca" + 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..3507819346a98 --- /dev/null +++ b/Formula/c/cql.rb @@ -0,0 +1,55 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "aabedbf76babd3b74753cd478fc431a8b4da832de192c9cab733ba92564a4b1c" + 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/cqlkit.rb b/Formula/c/cqlkit.rb similarity index 81% rename from Formula/cqlkit.rb rename to Formula/c/cqlkit.rb index 0744ef79b164c..6c48b1c17d941 100644 --- a/Formula/cqlkit.rb +++ b/Formula/c/cqlkit.rb @@ -5,15 +5,18 @@ class Cqlkit < Formula sha256 "0574b4b6fe893078e993a80f95a183b89955129ab8929f5032b7faacf611952c" license "Apache-2.0" - bottle :unneeded + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "d046672e2ea78accbef7eb841a473b6074a2b42f683d6c9b4e07979f63c60c29" + end depends_on "openjdk" def install libexec.install %w[bin lib] - rm_f Dir["#{libexec}/bin/*.bat"] + rm(Dir["#{libexec}/bin/*.bat"]) bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files libexec/"bin", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env end test do diff --git a/Formula/c/crabz.rb b/Formula/c/crabz.rb new file mode 100644 index 0000000000000..a646fa191ffb4 --- /dev/null +++ b/Formula/c/crabz.rb @@ -0,0 +1,38 @@ +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_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..be0f659489a08 --- /dev/null +++ b/Formula/c/cracklib.rb @@ -0,0 +1,65 @@ +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_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/crackpkcs.rb b/Formula/c/crackpkcs.rb new file mode 100644 index 0000000000000..1edb2f7ee13f3 --- /dev/null +++ b/Formula/c/crackpkcs.rb @@ -0,0 +1,48 @@ +class Crackpkcs < Formula + desc "Multithreaded program to crack PKCS#12 files" + homepage "https://crackpkcs12.sourceforge.net/" + url "https://download.sourceforge.net/project/crackpkcs12/0.2.11/crackpkcs12-0.2.11.tar.gz" + sha256 "9cfd0aa1160545810404fff60234c7b6372ce7fcf9df392a7944366cae3fbf25" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sonoma: "0b89c0ab5d87df237985c9b1c638457eda5e1fb3d3ce2beda99c4b8ee7f0d1b0" + sha256 cellar: :any, arm64_ventura: "941c264ba6fed6fb691c2bae290d4a47bf68b62d8fbbbf3cd3f5767ad6b437c7" + sha256 cellar: :any, arm64_monterey: "531a0ea5e420e1a5d8a33efc3f3f027bed2125c1bb00aea565bd2bdde220d677" + sha256 cellar: :any, arm64_big_sur: "c78cddbd0a61219de5e403a5cf43c710a5a50141ccb3c66767823f0fb8941a70" + sha256 cellar: :any, sonoma: "6ac6965acf31cbce243630ac232c61e3b23d14325d4445a8b89a85e3e5a0fe1c" + sha256 cellar: :any, ventura: "8042cedd03a5382d67488238ddcce502b6a38cc2a3f2e101f9f8ad819051d4d8" + sha256 cellar: :any, monterey: "cf977d20a83190062068fb6c57d631761af2f8a1cf8985de088abc61db757384" + sha256 cellar: :any, big_sur: "6616b50b8bdc80f28a69184fe91d3c191c39f8259f539cab29009c65a79d2a99" + sha256 cellar: :any, catalina: "32c0e6b6e178c8afd6cf5e98807d1f165a5fccf41d2120f57036653fef1952c7" + sha256 cellar: :any, mojave: "ba3ab6f7c683ebf8f4eedb1528bb88941b31a52c69c4139c16f2388ea2b504f7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7fe6ba851498a7e734d172a966411bf9d2afed85ba6bd6c85cb3bac2f2d865af" + end + + # Match deprecation date of `openssl@1.1` as current release segfaults with `openssl@3`. + # Last release on 2018-03-10. + disable! date: "2024-08-01", because: :unmaintained + + depends_on "pkgconf" => :build + depends_on "openssl@1.1" + + resource "cert.p12" do + url "https://github.com/crackpkcs12/crackpkcs12/raw/9f7375fdc7358451add8b31aaf928ecd025d63d9/misc/utils/certs/usr0052-exportado_desde_firefox.p12" + sha256 "8789861fbaf1a0fc6299756297fe646692a7b43e06c2be89a382b3dceb93f454" + end + + def install + system "./configure", + *std_configure_args, + "--disable-silent-rules", + "--with-openssl=#{Formula["openssl@1.1"].opt_prefix}" + system "make", "install" + end + + test do + resource("cert.p12").stage do + output = shell_output("#{bin}/crackpkcs12 -m 7 -M 7 -s usr0052 -b usr0052-exportado_desde_firefox.p12") + assert_match "Brute force attack - Thread 1 - Password found: usr0052", output + end + end +end diff --git a/Formula/c/crane.rb b/Formula/c/crane.rb new file mode 100644 index 0000000000000..e24a0d73ba92c --- /dev/null +++ b/Formula/c/crane.rb @@ -0,0 +1,36 @@ +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.3.tar.gz" + sha256 "663f4b808c10315f56a09b7c0a63e314ad79b16a07f950641330899db68c6075" + license "Apache-2.0" + head "https://github.com/google/go-containerregistry.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b83007cc815313ad6732c19ab1c7c6138063efb31f68d9ad34b7131efc4dd105" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b83007cc815313ad6732c19ab1c7c6138063efb31f68d9ad34b7131efc4dd105" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b83007cc815313ad6732c19ab1c7c6138063efb31f68d9ad34b7131efc4dd105" + sha256 cellar: :any_skip_relocation, sonoma: "b42df32566b9d2c6770c232f280481f34ad323ddd5e4f414c23f5a87d9675f7f" + sha256 cellar: :any_skip_relocation, ventura: "b42df32566b9d2c6770c232f280481f34ad323ddd5e4f414c23f5a87d9675f7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73cf545d4c043bf2f38d693fca210207c02bf2088086473d69c0814a0d835ce8" + 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..df0b27d55c9c6 --- /dev/null +++ b/Formula/c/crash.rb @@ -0,0 +1,28 @@ +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 + + 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..a7271d99efca1 --- /dev/null +++ b/Formula/c/crates-tui.rb @@ -0,0 +1,46 @@ +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_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..c7d67efbc393f --- /dev/null +++ b/Formula/c/crc32c.rb @@ -0,0 +1,62 @@ +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" + + bottle do + 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, mojave: "7c59f41017496aa5997f0a43ca0b17f0676c665f782df0687e44fa542b9c0a42" + sha256 cellar: :any_skip_relocation, arm64_linux: "7cd8632d65ac971ce60b6023b00c4f0058db967cc33dcaba57bfd8a0fb336934" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d1d82ebed58e6c35064358c5a04428b6bb053413be7b11b2c14e4cbcd156205" + end + + depends_on "cmake" => :build + + def install + 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..8475539fe651b --- /dev/null +++ b/Formula/c/crcany.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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, mojave: "508e19628c74e47337d647c79a8c05831250ee2ca9c71d673960d4d0901bf19e" + 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/create-api.rb b/Formula/c/create-api.rb new file mode 100644 index 0000000000000..db7536763c58f --- /dev/null +++ b/Formula/c/create-api.rb @@ -0,0 +1,41 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3704ccee2566fbffef69ba830037391340cf4211d7ba722735175c8d97de27c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "630e2912f2280aeb27c2646cb6af920de7d9c2c5a8c01029bd6d9bfc61ccf823" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6f1b7204022524efbcc0d5488ace23dad6b074736da5938f5f2044c65466dabf" + sha256 cellar: :any_skip_relocation, sonoma: "cedcc24ae6221316aed18f3231693938d012c99f64af00b4cd53df7c3661c69d" + sha256 cellar: :any_skip_relocation, ventura: "576f78622c10ac452aba62246126c3ccfbb8ad3a684672563ce6d4a1b900a97e" + sha256 arm64_linux: "c76b87eb0e141e9c261f6bc2c00294a03589280162d3cba551828f2e1e324566" + sha256 x86_64_linux: "ab24ce8e1aa462a2745d77fd302a183f1f0ceb2d5e820da750f8c1f0667e38d1" + 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" + 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..9a217b0c8b9ca --- /dev/null +++ b/Formula/c/create-dmg.rb @@ -0,0 +1,25 @@ +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" + + 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/credstash.rb b/Formula/c/credstash.rb new file mode 100644 index 0000000000000..e0b51a4b1439f --- /dev/null +++ b/Formula/c/credstash.rb @@ -0,0 +1,65 @@ +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 11 + head "https://github.com/fugue/credstash.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7e6b3ebdf98c6b6b822df0535c9c2b88f6aa118a4a431373eb49818705b72298" + end + + depends_on "cryptography" + depends_on "python@3.13" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b8/29/10988ceaa300ddc628cb899875d85d9998e3da4803226398e002d95b2741/boto3-1.35.39.tar.gz" + sha256 "670f811c65e3c5fe4ed8c8d69be0b44b1d649e992c0fc16de43816d1188f88f1" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/28/d83dbd69d7015892b53ada4fded79a5bc1b7d77259361eb8302f88c2da81/botocore-1.35.39.tar.gz" + sha256 "cb7f851933b5ccc2fba4f0a8b846252410aa0efac5bfbe93b82d10801f5f8e90" + 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/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..e708b46c1b336 --- /dev/null +++ b/Formula/c/creduce.rb @@ -0,0 +1,150 @@ +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 + + bottle do + 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..527f884dfecb5 --- /dev/null +++ b/Formula/c/crf++.rb @@ -0,0 +1,56 @@ +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 + + bottle do + rebuild 3 + 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, mojave: "814479e15702bd1ef9afba98ff5030bbf7cd90810f2561863d1b9085a230ee8f" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..b8b6a3e8b08d6 --- /dev/null +++ b/Formula/c/crfsuite.rb @@ -0,0 +1,66 @@ +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" + + bottle do + 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" + + resource "homebrew-conll2000-training-data" do + url "https://www.cnts.ua.ac.be/conll2000/chunking/train.txt.gz" + sha256 "bcbbe17c487d0939d48c2d694622303edb3637ca9c4944776628cd1815c5cb34" + end + + # 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").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..d45b42a889d5c --- /dev/null +++ b/Formula/c/cri-tools.rb @@ -0,0 +1,43 @@ +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.33.0.tar.gz" + sha256 "2d71ca416a4657646d54725345f993fc1b66c8023da02952bd0e63fd515f49e3" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/cri-tools.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "008934d075ccd36341e98414e5bf5d42988d4e2e0e7a73f4dc242aff4bd4a51d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "008934d075ccd36341e98414e5bf5d42988d4e2e0e7a73f4dc242aff4bd4a51d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "008934d075ccd36341e98414e5bf5d42988d4e2e0e7a73f4dc242aff4bd4a51d" + sha256 cellar: :any_skip_relocation, sonoma: "f21321f265b02859092aa0678ed0c633991a5ebc5462cabfd2207a872b409602" + sha256 cellar: :any_skip_relocation, ventura: "f21321f265b02859092aa0678ed0c633991a5ebc5462cabfd2207a872b409602" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f66d7e6cb312b27388c8cf93cae4f02136d4731b013a019f85e82153063f66d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4cf3c77059a9da11c6adc99068249b0acb444bf9fdf163e43110bb26e7fca0ac" + 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..3a79bcc29cc05 --- /dev/null +++ b/Formula/c/crispy-doom.rb @@ -0,0 +1,50 @@ +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.0.tar.gz" + sha256 "25eea88fdbe1320ad0d1a3e0ed66ae8d985c39b79e442beab5fc36d9d5ddfc42" + license "GPL-2.0-only" + head "https://github.com/fabiangreffrath/crispy-doom.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b9b035b756e9b42de763784b2d232e18edd11778a9417f61155011aafef3c03e" + sha256 cellar: :any, arm64_sonoma: "5c440e871b1498809e4372de33366c2c3df9e740bb8b541f9e414e4d96de50fe" + sha256 cellar: :any, arm64_ventura: "10f31a1dabdaa5709e63146e3ebb56008afce374116da948002b7e611b35f26b" + sha256 cellar: :any, arm64_monterey: "327d92bb2cad988d5835718b372a77322f2aa7ba507200767e4d5dbb5c278545" + sha256 cellar: :any, sonoma: "325da8f1b4334a227d9f54f65434a84973331bec480d46e4136be618c32636b9" + sha256 cellar: :any, ventura: "edf187b019afbc43e5326413f87c603b591c964a1792932e3883e2a565ac0682" + sha256 cellar: :any, monterey: "b52ae717094041400af36ecbe0f741c7f32e7ec10c93f054f0e6d3a48d7e5c08" + sha256 cellar: :any_skip_relocation, arm64_linux: "bf4db5216f98d6f2937a33de95e9f49345989bff07ab4873f13ef274dd0e801f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32038b4fcd8556a79441e0f482ea6597e1ae6a8ec934a415c7fadc62ed21cf22" + 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..fe4377e138ec5 --- /dev/null +++ b/Formula/c/criterion.rb @@ -0,0 +1,49 @@ +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.2/criterion-2.4.2.tar.xz" + sha256 "e3c52fae0e90887aeefa1d45066b1fde64b82517d7750db7a0af9226ca6571c0" + license "MIT" + revision 2 + head "https://github.com/Snaipe/Criterion.git", branch: "bleeding" + + bottle do + sha256 cellar: :any, arm64_sequoia: "87e4b6050b97f8c93ffa634a013392a08dd9ca6ccde834ab0b38ef960bdbbb3c" + sha256 cellar: :any, arm64_sonoma: "cd2f6e03ef7b2bf9e3ba7e6620fc3f7971a98bba90ada27302ac84e1e0019ac4" + sha256 cellar: :any, arm64_ventura: "c6f8a68eba64dd89f2a9748e37b7739919ef51f24c065495c1804b682bf507b5" + sha256 cellar: :any, sonoma: "85c669acf3f38a5a905425ece8bc92f8a845c9af1dcf569a4d9c18da99a4e507" + sha256 cellar: :any, ventura: "b43ee024021a2a0ae8ad6c1a246790b0990544cbe288d16bd6a21af517afab97" + sha256 arm64_linux: "eb14834df1db070905a92dce10ae4cc7602ad77a1ea6b47f4c2936c556ef0136" + sha256 x86_64_linux: "c0801143d8501a7af0e73b559b3af2d4877edf4cf2a9f5adb1f622915738f9e4" + 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..fc47f464d948e --- /dev/null +++ b/Formula/c/crm114.rb @@ -0,0 +1,40 @@ +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, mojave: "38a8c208a23dc67027eb63e9a8a6782cdb0763caa061fbf74525003d028d0558" + sha256 cellar: :any, high_sierra: "1871f19d45d9d9d5f84663acde3f7e9177fd9a44bfe50532ed123314e360f690" + sha256 cellar: :any, sierra: "5e22ac9266e49f8281f3afbd613b3f16eb76113fc1f1e2256206513ab6220d42" + sha256 cellar: :any, el_capitan: "d48449acfcd105d07e11c0ac7c47fdb21b88d3346c0b51377b9e44b8c8726073" + 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 + + 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..685025879434f --- /dev/null +++ b/Formula/c/croaring.rb @@ -0,0 +1,47 @@ +class Croaring < Formula + desc "Roaring bitmaps in C (and C++)" + homepage "https://roaringbitmap.org/" + url "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.3.1.tar.gz" + sha256 "ec6e0e2ce55b09e8cc6a9b5d2e692ae19ddeebd68fa64712c6b6bb8f9ac2ce11" + license "Apache-2.0" + head "https://github.com/RoaringBitmap/CRoaring.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ac5547b7e96a03511593f490478459bf843123fb0388a10192c4866d15640328" + sha256 cellar: :any, arm64_sonoma: "4e7d59f81893acfe79bf3d03eae07d9f1f287ea936815ca2481d2a63c5e5f65b" + sha256 cellar: :any, arm64_ventura: "1650944f58f8c7b94e8216d05a1a13a049001c7e1712f41b21b2a93d503d7807" + sha256 cellar: :any, sonoma: "8bec472ae2241b6dc63ef1c381caa1ff1ea0f6cc5e0bdb7b688cde8fea94bb9f" + sha256 cellar: :any, ventura: "3e72e520c7a3b475bc09f133d1608cac43a95a7a45fbcfe44e82376b70539346" + sha256 cellar: :any_skip_relocation, arm64_linux: "37b6da559e81a316bcaadae18c77bb5eec72eb1f4f006c37cf7681a6b068157d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de8045b01ecf06b1e65b120266c6ee0814fec779727e817ee87f607c68e333cf" + 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..d7ff6bad0fb1e --- /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.2.tar.gz" + sha256 "1d892bbf3f8dacd0f528f683ab6c3678483374b17076187da7d1af805326fa68" + license "MIT" + head "https://github.com/schollz/croc.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "533cdeef8a749ee8ec433e30f10d4ae6ac7f34de8c4bcdf4c058946c6858b215" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "533cdeef8a749ee8ec433e30f10d4ae6ac7f34de8c4bcdf4c058946c6858b215" + sha256 cellar: :any_skip_relocation, arm64_ventura: "533cdeef8a749ee8ec433e30f10d4ae6ac7f34de8c4bcdf4c058946c6858b215" + sha256 cellar: :any_skip_relocation, sonoma: "6838fe3e3dd5698d49e3f8b60f41f513330306b10ad5b63cf45591a3a777d21c" + sha256 cellar: :any_skip_relocation, ventura: "6838fe3e3dd5698d49e3f8b60f41f513330306b10ad5b63cf45591a3a777d21c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0101375d0a74afc9480a58a61334da99dadc13d02b9de4e99ebb2ea236e20665" + 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..f3560cbe083bb --- /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/89/cromwell-89.jar" + sha256 "afc761fc05b31a63a1157d112c64db77222aa2397dfd2f6c974dc44db689090d" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d86293d84e263cb004ecd0240d4818ff8ca7d8a4219377d506e68cf9ba2b81d9" + 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/89/womtool-89.jar" + sha256 "beece815cbc7ddb48c49ef4511e1e794d6d2f3cb933f29265708a5c61c87fb4e" + + 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/cronolog.rb b/Formula/c/cronolog.rb new file mode 100644 index 0000000000000..bdbae39096394 --- /dev/null +++ b/Formula/c/cronolog.rb @@ -0,0 +1,35 @@ +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" + license "Apache-1.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_ventura: "c35ef462c37f02fcb214571fe0b5a4cee014a21c01f996526468a29479bd2f30" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3a4e3d4430cc1394a04c53a63725012906738f26acc227d58f91dd84ce3e6335" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "105b3e20c9a2c742c71e3c0367c451b37acc11945f05597e72a4c6ce98b9e82c" + sha256 cellar: :any_skip_relocation, ventura: "b94c01d0c09bb4649bfe0e4bfd416c78d1805ce99ebc15ef0a2a61629e71c5a0" + sha256 cellar: :any_skip_relocation, monterey: "dcb59364b5df275862b07d39e801c3564047d59c624d44145010cc446b8002bc" + sha256 cellar: :any_skip_relocation, big_sur: "b20a3d3f835199043f5420a386baefbf2b3ce1afbe78499e313c5e2de1684f52" + sha256 cellar: :any_skip_relocation, catalina: "b1a14dc1d1d5b30969523a75ef785e81a46f1961851adae8cc63c828b89b03a9" + sha256 cellar: :any_skip_relocation, mojave: "c99140b690aae4c8e28b53ba787ed5aef53d3fbc867186aca47cab021068db40" + sha256 cellar: :any_skip_relocation, high_sierra: "47a40bdccb74cb45e3df9e73306162ecc7206c26760521c6a9d8760872769b6b" + sha256 cellar: :any_skip_relocation, sierra: "66ad5bfa0080775875d2b72cc2bbd66bc8ee8de7ca1d482217414ba5b805f977" + sha256 cellar: :any_skip_relocation, el_capitan: "964df15660a5c0ec25bedec56aeb128ae93794a8ad721c1c600e377df9be1c2d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b7e0546314cd92d44b009de1894f4739f75865da5f95d425e305cf6ffeac10d" + end + + # no new release since 2003 + disable! date: "2024-07-05", because: :unmaintained + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}", + "--infodir=#{info}" + system "make", "install" + end +end diff --git a/Formula/c/crossplane.rb b/Formula/c/crossplane.rb new file mode 100644 index 0000000000000..8f2b0dc03ff3f --- /dev/null +++ b/Formula/c/crossplane.rb @@ -0,0 +1,60 @@ +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/v1.19.1.tar.gz" + sha256 "254d93eccab65904c8f4572ef7878c95d96a0cd7cc509d0050396960e7b4b89f" + license "Apache-2.0" + head "https://github.com/crossplane/crossplane.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a0097f1f2198e3c77e240942c7479408ce791d29d1c21071839ad88a52c1aab3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a0097f1f2198e3c77e240942c7479408ce791d29d1c21071839ad88a52c1aab3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a0097f1f2198e3c77e240942c7479408ce791d29d1c21071839ad88a52c1aab3" + sha256 cellar: :any_skip_relocation, sonoma: "c4cba58169c84389b8830fd7ac8ead6bccee3303970a0898d8fff82b8bb337c5" + sha256 cellar: :any_skip_relocation, ventura: "c4cba58169c84389b8830fd7ac8ead6bccee3303970a0898d8fff82b8bb337c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c9923ddfa4d8b280aa9285b8f71c097ff58b29df0db14877a1417adcd0cf983" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/crossplane/crossplane/internal/version.version=v#{version}"), "./cmd/crank" + end + + test do + assert_match "Client Version: v#{version}", shell_output("#{bin}/crossplane version --client") + + (testpath/"controllerconfig.yaml").write <<~YAML + apiVersion: pkg.crossplane.io/v1alpha1 + kind: ControllerConfig + metadata: + name: irsa + spec: + args: + - --enable-external-secret-stores + YAML + expected_output = <<~YAML + apiVersion: pkg.crossplane.io/v1beta1 + kind: DeploymentRuntimeConfig + metadata: + name: irsa + spec: + deploymentTemplate: + spec: + selector: {} + strategy: {} + template: + metadata: + spec: + containers: + - args: + - --enable-external-secret-stores + name: package-runtime + resources: {} + YAML + system bin/"crossplane", "beta", "convert", "deployment-runtime", "controllerconfig.yaml", "-o", +"deploymentruntimeconfig.yaml" + inreplace "deploymentruntimeconfig.yaml", /^\s+creationTimestamp.+$\n/, "" + assert_equal expected_output, File.read("deploymentruntimeconfig.yaml") + end +end diff --git a/Formula/c/crosstool-ng.rb b/Formula/c/crosstool-ng.rb new file mode 100644 index 0000000000000..11ad478a24718 --- /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.27.0.tar.xz" + sha256 "0506ab98fa0ad6d263a555feeb2c7fff9bc24a434635d4b0cdff9137fe5b4477" + 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 + sha256 cellar: :any, arm64_sequoia: "86c8e7e727cd75f79bb97d01765d510b48085412d7327b5d06f0f633021d26d9" + sha256 cellar: :any, arm64_sonoma: "5e90dd18b0af819e9d7816b6ac239dd9b7636fc4976401468570b85f4a59ac21" + sha256 cellar: :any, arm64_ventura: "6ce8cb522f4b57f144017581913ebd9b9f401ebb80efb9b3efc0907299606272" + sha256 cellar: :any, sonoma: "17ac89a41e37fa2f8e04122b22b49209a21d19dbccf9ad492dce6139ad64355d" + sha256 cellar: :any, ventura: "339070b60acf2dfd7684df759c21f8c354baa6f1aa7a4b5a249c843d7724d55e" + sha256 cellar: :any_skip_relocation, arm64_linux: "195c38b9f2a0a0ea25670a34a99756be7fc60e7735abe6197818c79d195bb063" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44af39329adc4bf0bed2b213d5a9f7c6ae51b517ffb6a63814ce60be6e042b21" + 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.13" + 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.13"].opt_bin/"python3.13" + + 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..2a64946a429ea --- /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.2.1.2.tar.gz" + sha256 "dc008515f64c9054250909a16bf0d9173af845d2c6d4e49ed6d3f0f32dfdc747" + license "BSD-3-Clause" + head "https://github.com/CrowCpp/Crow.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "97c63829c1a1d5eb88a3f75fa7e924bd424fd92c97b33d6f5c147dedf43748d5" + 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..c158703ab12e8 --- /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.7.0/crowdin-cli.zip" + sha256 "3c09968c529a89acf0fad5b72137a492632734207f7c760cd17fe7f1e7fa8d61" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "c44db6636f2553f42a3d5466e0b8b84aaef774930ff62595dcbebdb679d0ab51" + 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..d28696755a95d --- /dev/null +++ b/Formula/c/cruft.rb @@ -0,0 +1,170 @@ +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 1 + head "https://github.com/cruft/cruft.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e5e41d578ada45a0151ce9c8e2b738bca0676d5a2ae8a9b59a385c67b7a5a182" + sha256 cellar: :any, arm64_sonoma: "d35f7ca0f3a67330cde228787fcfd800089ba5bae39aed787f83f7f658ee9998" + sha256 cellar: :any, arm64_ventura: "10c160818ff74b45cc399ddeaba42392dd85dde57392de6600a8edc18da2ff13" + sha256 cellar: :any, sonoma: "a0fc82754d9cf9daa2073f7a669b5fe206be2cddd782c5c0500f58938990409c" + sha256 cellar: :any, ventura: "33d3b41b97eec435a95c44e3f12b607422be96ceefce86b9c011c75189db1714" + sha256 cellar: :any_skip_relocation, arm64_linux: "877a6b776387bb82f712f4debc0c68aa741e322b3b01c594ae226e0ace770392" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92fd31d81091b01cd9e9055482ff0e97f6af8bbb9ecbc9b137c8874e9b2e84a1" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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 "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 "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 "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 "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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/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 "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + 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/8b/6f/3991f0f1c7fcb2df31aef28e0594d8d54b05393a0e4e34c65e475c2a5d41/typer-0.15.2.tar.gz" + sha256 "ab2fab47533a813c49fe1f16b1a370fd5819099c00b119e0633df65f22144ba5" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/a9/60/47d92293d9bc521cd2301e423a358abfac0ad409b3a1606d8fbae1321961/types_python_dateutil-2.9.0.20241206.tar.gz" + sha256 "18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..ff12b45537dca --- /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.21/crun-1.21.tar.zst" + sha256 "d3a4ce8af89125851b2bbfe2375f4050c7eca837021043c5628172feacdb88a4" + license any_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "48e6dfa33d60b46d20b19ee5a93df7ca7b6b4f327f3cf022fe7986c9650d0d72" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7cb1901a9b6a7cbd680882e65ef2965a4d4f2e736441a563258e57ff9ea63519" + 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.13" => :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 --rootless=true list -q").strip + end +end diff --git a/Formula/c/crunch.rb b/Formula/c/crunch.rb new file mode 100644 index 0000000000000..b6b5dedb77faf --- /dev/null +++ b/Formula/c/crunch.rb @@ -0,0 +1,39 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "ad3bd04ba230c46df88ab4ab7a74efa3182cd65b804b65a28a327f74700641e8" + sha256 cellar: :any_skip_relocation, high_sierra: "c59cb398b0ed4f28e8d56c49709991f5ea61b61bad4d672f1a481730948cdeb0" + sha256 cellar: :any_skip_relocation, sierra: "737d46b90aaa933abe03e111ece79e3f6a0ecb372cc1903b9dba3a33208111b9" + sha256 cellar: :any_skip_relocation, el_capitan: "84c0c275e63cc5c27fd468587f67ae5f1ab31a3923fe2eda27b4e33477356844" + 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..5de74e0251d7b --- /dev/null +++ b/Formula/c/crunchy-cli.rb @@ -0,0 +1,42 @@ +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 + + 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..40c5ecc3491cc --- /dev/null +++ b/Formula/c/cryfs.rb @@ -0,0 +1,81 @@ +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 2 + head "https://github.com/cryfs/cryfs.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "43c5238d9673debec44d49a779e516ff86a2f9737ad574714064ead388b0f717" + sha256 cellar: :any_skip_relocation, x86_64_linux: "acbcf4dbcbbf93a3f22a2380c961bd353d77986c2557e2a8a36ba5592bf2c941" + end + + depends_on "cmake" => :build + depends_on "curl" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :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" + + # Update for changes in Boost.Process 1.88.0+. + # PR ref: https://github.com/cryfs/cryfs/pull/494 + patch :DATA + + 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 + +__END__ +diff --git a/src/cpp-utils/process/subprocess.cpp b/src/cpp-utils/process/subprocess.cpp +index 479bfe87..396ae09e 100644 +--- a/src/cpp-utils/process/subprocess.cpp ++++ b/src/cpp-utils/process/subprocess.cpp +@@ -1,7 +1,18 @@ + #include "subprocess.h" + #include + #include ++#include ++#if BOOST_VERSION < 108800 + #include ++#else ++#define BOOST_PROCESS_VERSION 1 ++#include ++#include ++#include ++#include ++#include ++#include ++#endif + #include + #include + #include diff --git a/Formula/c/cryptography.rb b/Formula/c/cryptography.rb new file mode 100644 index 0000000000000..5f4852691b0ab --- /dev/null +++ b/Formula/c/cryptography.rb @@ -0,0 +1,54 @@ +class Cryptography < Formula + desc "Cryptographic recipes and primitives for Python" + homepage "https://cryptography.io/en/latest/" + url "https://files.pythonhosted.org/packages/53/d6/1411ab4d6108ab167d06254c5be517681f1e331f90edf1379895bcb87020/cryptography-44.0.3.tar.gz" + sha256 "fe19d8bc5536a91a24a8133328880a41831b6c5df54599a8417b62fe015d3053" + license any_of: ["Apache-2.0", "BSD-3-Clause"] + head "https://github.com/pyca/cryptography.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "be6f02acb9eb7f6e715fa55c983f6ad218b4c014edec26b677aefabcef83a4eb" + sha256 cellar: :any, arm64_sonoma: "cd06588d93e725992a43e23fb77bb50eb715ca06a50c4aae06d5f846d9eac644" + sha256 cellar: :any, arm64_ventura: "3de1c75ae46eea82e43ea65ee096e0288ee29b6c1d6aaa397414c27ce89e4e7b" + sha256 cellar: :any, sonoma: "e02bd55b285cd4a8d766bb7b7f20ebf3dabc02b2b70fbabd7ff63ef291f409c0" + sha256 cellar: :any, ventura: "f4819cccd593753bc338ee41eef2f3cda0446fdc7706ca0e38b564114c9e421f" + sha256 cellar: :any_skip_relocation, arm64_linux: "28f97c7235fcc92642f8cdc3dabf97f0611a940dfb19dbd3cc6901d982c94e84" + sha256 cellar: :any_skip_relocation, x86_64_linux: "820d00b342ee8c60ea82e33899454492655e4cea419771d0c275486487a16e12" + end + + depends_on "maturin" => :build + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + depends_on "rust" => :build + depends_on "cffi" + depends_on "openssl@3" + + 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..ef29b2bbcc4a6 --- /dev/null +++ b/Formula/c/cryptol.rb @@ -0,0 +1,39 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "036f1699ef23e07d214b12ecd13e2a3f874e8546150628e03ab09d1cc4cdecfe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "29d817b9266776e61b772285651066d2ac1d4c7184b7361abce9a383eeaa7bb6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9035c6aa3b4bbc1e9f9731f92db90843d1e74dbb59d99930c737cc8510dccf59" + sha256 cellar: :any_skip_relocation, sonoma: "f26c5cc0f8e1d29455ffdf7d0875a1014b8b08929c62cbf6979e54eb24d1f816" + sha256 cellar: :any_skip_relocation, ventura: "9d37ae517d04c7def64d26f0451d8ac964c41e7d025dc204a01c68069920b386" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab55afae719399479d3b8f9ca9499f9fa7d26a5c8e5c985484d287d9234165b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d20522798fa5c6f11bc1bfab9506e4805bcc6b0eb675ccdc6e310c975809257" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + depends_on "z3" + + 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..931a65f8a2aa2 --- /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 + sha256 cellar: :any, arm64_sequoia: "b503cbfc78c8ccc52b5c61c393f934178b6b23fc24706e69ef36eb54da28f6d6" + sha256 cellar: :any, arm64_sonoma: "912b97d4711728c84b253e021fa6b8e44e71f85275da05b1e25c9345ab490771" + sha256 cellar: :any, arm64_ventura: "312052a0e90409e8ff3e6fe381939fd89a88b0aa4668929c8bf3b69f946b0eb8" + sha256 cellar: :any, sonoma: "f0b7d6be7d368640b55db2eb9c66d2eebca3866e82c806761a98b4b3ce148582" + sha256 cellar: :any, ventura: "59abe6398e16ea1b55a555594da6ef56499953648f7ad30740ff78f8cb7d25fa" + sha256 arm64_linux: "9f74deb3dd6da246645a5ab19d3464c1346d3c61a68d7f13e016ad178184214e" + sha256 x86_64_linux: "5fa5d82e89cd5a41834ad0fad26871fda52d043424f2860ca86008e0f342995c" + end + + depends_on "cmake" => :build + depends_on "python@3.13" => [: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.13" + 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..680c30d89f970 --- /dev/null +++ b/Formula/c/cryptopp.rb @@ -0,0 +1,98 @@ +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 + + bottle do + rebuild 2 + 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..472f66a8e0af0 --- /dev/null +++ b/Formula/c/crystal-icr.rb @@ -0,0 +1,44 @@ +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 + + bottle do + rebuild 1 + 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 + # Work around an Xcode 15 linker issue which causes linkage against LLVM's + # libunwind due to it being present in a library search path. + llvm = Formula["llvm"] + ENV.remove "HOMEBREW_LIBRARY_PATHS", llvm.opt_lib if DevelopmentTools.clang_build_version >= 1500 + + 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..9cafca87f00c2 --- /dev/null +++ b/Formula/c/crystal.rb @@ -0,0 +1,185 @@ +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.16.3.tar.gz" + sha256 "eb222af4d2aa269ed0f6c731661431a4fd97713de13f2f0a7c71e26140ca9d23" + + 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_sequoia: "1528df0078262f0a8a504c5cdb44ba59901f8def69b8356f28041aab529e4373" + sha256 cellar: :any, arm64_sonoma: "2110a2a8a989ada8ac31fff4f65b7ac7e165c2afa05e9b1f0c60e9c8d28a53ae" + sha256 cellar: :any, arm64_ventura: "636d1add07be313d2cd00293b5e3aeb008e9a84d73b4bc140b379da72dc56d2d" + sha256 cellar: :any, sonoma: "88f50621da7850132be73cd5b8cc0d4bea7cce723d5e9cbddaab6ee2a04f55d0" + sha256 cellar: :any, ventura: "51de4537260cbc30d99593c039163d796588c4d2bd9d836e1cf870c21ddbc36a" + sha256 cellar: :any_skip_relocation, arm64_linux: "37192aaf56db85c11672cd0d3d4e12531cc39dc6bb8c2435d34fba6b5fc645bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d4c70aa1b1a53b8182b88e8ec94cd1a2a2f4b053e4bc47bf167ffb586d4fae1" + 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..e609bf16212ea --- /dev/null +++ b/Formula/c/crystalline.rb @@ -0,0 +1,61 @@ +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" + + bottle do + sha256 arm64_sequoia: "87a66475cc7c310d5a9ca86451588753fa013793a29647adc860a722d44262b3" + sha256 arm64_sonoma: "55781acbd516f945fa2a882e4791c2eb78eebe8a67c618204dad015d960b93af" + sha256 arm64_ventura: "497f4eb216f23ed797a8d23b0430ce78156d865604c2e16d95aa3c7068aef792" + sha256 sonoma: "7633dc8f2abafcfe175aa69a8d85b75b9ce7c95a07a46a24cb4037c81625b035" + sha256 ventura: "2de8e6d021d4fef3cc3f3c896f03ddafc8e0003daccc7fdfb8687968e2b643c2" + sha256 arm64_linux: "7378baeedc88e661685c01cb031a0267dcf6969c071b5d8abcfa23b3a4e9d5e2" + sha256 x86_64_linux: "f99684dd3f96d2888b1429df00c6aef334cf35e5da5a6dab025e3192a57574f2" + 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..b84a65d388931 --- /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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "39f041a29cfabce763bf76b6ced058cc1e161cdc20b37d6c0167a3c39d8785ce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "27abdac866172eed6198e928f423e0a36a426afac9a56e87d80ace979d23b215" + sha256 cellar: :any_skip_relocation, arm64_ventura: "91b58a45b01aff82e8b56b0ad0f33d6c4a1c84f1663d1175d72aeff13cf113d5" + sha256 cellar: :any_skip_relocation, sonoma: "59b6d24eaa812ed4b2986a5ff480fc49f4a344a250ae0701bf64d1f2bb55fc35" + sha256 cellar: :any_skip_relocation, ventura: "5ab48b6011bb20b59f8ba237e0b11ef5b19208cd069978c6d7aa2408e314b3bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf7956683946a642638436c47cca92952433b84ac75fd9600c4e56dbd82b0e25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f712f5194e8feaf6b88e2c71eab95e2f67b3ad64f0d535eb5ebe07a930b0efd" + end + + depends_on "python@3.13" + + resource "cbor2" do + url "https://files.pythonhosted.org/packages/e4/aa/ba55b47d51d27911981a18743b4d3cebfabccbb0598c09801b734cec4184/cbor2-5.6.5.tar.gz" + sha256 "b682820677ee1dbba45f7da11898d2720f92e06be36acec290867d5ebf3d7e09" + 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/44/e6/099310419df5ada522ff34ffc2f1a48a11b37fc6a76f51a6854c182dbd3e/pycryptodome-3.22.0.tar.gz" + sha256 "fd7ab568b3ad7b77c908d7c3f7e167ec5a8f035c64ff74f10d47a4edd043d723" + 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..29d641fc16026 --- /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 + + bottle do + 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, mojave: "0a8c76e372e2c965e654b5024cbf872931e6204b7e2ba79623d5d7d002cd3c2f" + sha256 cellar: :any_skip_relocation, high_sierra: "ae7b5f716debeb937c3472add41f69c7176e9c4a9a0668090afd63313eabbe86" + sha256 cellar: :any_skip_relocation, sierra: "7eef899511b0d7eb0d6a35acf677d9b19f89528aae0272d5c414bbafbe5daaaf" + 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..84a03419151dc --- /dev/null +++ b/Formula/c/csfml.rb @@ -0,0 +1,48 @@ +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_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..21c74122fc6d5 --- /dev/null +++ b/Formula/c/csmith.rb @@ -0,0 +1,60 @@ +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 + + bottle do + 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, mojave: "7c3759ccefa73b295acd5e7e631c40594f6983e26e903b54a88a9e0dfdfcaa96" + sha256 cellar: :any, high_sierra: "e8e818a9898b4145c5622810958fa8616f8b57156f09aeaf3045873210f0856a" + sha256 cellar: :any, sierra: "2e78da57153124cb3feca12955d0bbadbc4e90dbff6c34a08532aea55c75ba8e" + sha256 cellar: :any, el_capitan: "472992fd577ec20b025397c840823abf8f88d719e7d86bba427446a38cc5584d" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + 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/c/csound.rb b/Formula/c/csound.rb new file mode 100644 index 0000000000000..8ad2753e3dc01 --- /dev/null +++ b/Formula/c/csound.rb @@ -0,0 +1,276 @@ +class Csound < Formula + desc "Sound and music computing system" + homepage "https://csound.com/" + license "LGPL-2.1-or-later" + revision 11 + head "https://github.com/csound/csound.git", branch: "master" + + # 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 + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "61be90827875be2da1ff759baea46c74e0c0ccd7344bc8ab949efe3b05260106" + sha256 arm64_sonoma: "71adfde634382610bffb31c3fbf3aeacf25773de90e06b5158e09b18e4d205e9" + sha256 arm64_ventura: "e3b0dfd98b61b7b2d1e575fd3719d915982f0da0232368137412d71d03c0dbea" + sha256 sonoma: "9431a7350d67b3e144136416cdca5162aba4a31ac7149c64c412be297c660c00" + sha256 ventura: "334cd0b0985e049534ab67125b7c173146dff78a7ddd66be4d1b14a8a12d357e" + sha256 arm64_linux: "3a44f46b8aab6877c5dec7ef7a411803aca10dcd0271e834433ca480da0eb2ae" + sha256 x86_64_linux: "a44c216a87f3465ac04b31775785e7b2226308cb88dc715f4f103a8b021b0e09" + 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.13" + 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.2.tar.gz" + sha256 "2673dfad75b1484e8388deb8393673c3304b3ab5662dd5828e08e029ca8797aa" + 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.13") + 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 + 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..95ae03f2cd1c5 --- /dev/null +++ b/Formula/c/cspell.rb @@ -0,0 +1,31 @@ +class Cspell < Formula + desc "Spell checker for code" + homepage "https://cspell.org/" + url "https://registry.npmjs.org/cspell/-/cspell-9.0.1.tgz" + sha256 "5d68a8ad5228766aafb0e88ac2d07942dad506d652b2620805a501202509f37c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bdeb751f85e1838bf3743169b80bf1604da6acda4756531f75397d59889db24e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bdeb751f85e1838bf3743169b80bf1604da6acda4756531f75397d59889db24e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bdeb751f85e1838bf3743169b80bf1604da6acda4756531f75397d59889db24e" + sha256 cellar: :any_skip_relocation, sonoma: "23bc69b7b434f59f5d6aa3873c8a08b620d65a20287069ea14899505601608ae" + sha256 cellar: :any_skip_relocation, ventura: "23bc69b7b434f59f5d6aa3873c8a08b620d65a20287069ea14899505601608ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "bdeb751f85e1838bf3743169b80bf1604da6acda4756531f75397d59889db24e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdeb751f85e1838bf3743169b80bf1604da6acda4756531f75397d59889db24e" + 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..13ca7300dcc71 --- /dev/null +++ b/Formula/c/cspice.rb @@ -0,0 +1,62 @@ +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 + + bottle do + 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..55ac7ce927e84 --- /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.1.tar.gz" + sha256 "69200ae4bc99ba41c5a884af6491373cf9cfc5cd66590804c6254460951da968" + license "MIT" + head "https://github.com/edoardottt/csprecon.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6d107562498b42b0e1b90be7b20e5cce58e36e722aabaeed906478642b8f344b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d107562498b42b0e1b90be7b20e5cce58e36e722aabaeed906478642b8f344b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6d107562498b42b0e1b90be7b20e5cce58e36e722aabaeed906478642b8f344b" + sha256 cellar: :any_skip_relocation, sonoma: "02fe59829e752d8f022020ef1e4cd105da7c791e8f58c1588e55d0fda1ccf02c" + sha256 cellar: :any_skip_relocation, ventura: "02fe59829e752d8f022020ef1e4cd105da7c791e8f58c1588e55d0fda1ccf02c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c58fc8a2225d8fb674e45f69015becdbdee1d4af13050b1837b1f26c6dbade70" + 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..c8e292c6e6e22 --- /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/v4.2.0.tar.gz" + sha256 "4c4a898ada8685cf7e33a1cdaca470ca45ec66ffbc441e749b2014f3010fd0aa" + license "MIT" + head "https://github.com/peteboere/css-crush.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "57dca95e7404936bc249a6934132a3942e31f4c1574e99dce5907c32bc14ad77" + 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..37438c19fdc6d --- /dev/null +++ b/Formula/c/csshx.rb @@ -0,0 +1,23 @@ +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" + + 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..ff9cc91c52974 --- /dev/null +++ b/Formula/c/csview.rb @@ -0,0 +1,40 @@ +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_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..bc3c2daaa90d1 --- /dev/null +++ b/Formula/c/csvkit.rb @@ -0,0 +1,124 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "38e538889d230e83686382e09b013d4f15792e1209c8191d38d8c1f497a22aca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fb219535aa5e1bdbece458a3e7aac6b43a2f42cea46dea519c9897ebd315aa9a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "993b70d9af69862534b8f3fd6c1746d2eca303d35a671f7ca9af48317e5f9d30" + sha256 cellar: :any_skip_relocation, sonoma: "39e0b38a1826e4991f03acb2836452c783a57089d81609b666cc999c3faa0af4" + sha256 cellar: :any_skip_relocation, ventura: "a656b465e6057aa27443398d98284b91c2975546014f3af373b29ead39c3d13c" + sha256 cellar: :any_skip_relocation, arm64_linux: "0381b3f897796ddf740e114a0227d07d485a0adceae1b7293e969bba2f5b5a67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d1e5f5f59d037761c45c7960dd7834988295aed1150e74ee91b2042e672741c" + end + + depends_on "python@3.13" + + 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 "greenlet" do + url "https://files.pythonhosted.org/packages/2f/ff/df5fede753cc10f6a5be0931204ea30c35fa2f2ea7a35b25bdaf4fe40e46/greenlet-3.1.1.tar.gz" + sha256 "4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467" + 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/e4/08/9a90962ea72acd532bda71249a626344d855c4032603924b1b547694b837/sqlalchemy-2.0.38.tar.gz" + sha256 "e5a4d82bdb4bf1ac1285a68eab02d253ab73355d9f0fe725a97e1e0fa689decb" + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "xlrd" do + url "https://files.pythonhosted.org/packages/a6/b3/19a2540d21dea5f908304375bd43f5ed7a4c28a370dc9122c565423e6b44/xlrd-2.0.1.tar.gz" + sha256 "f72f148f54442c6b056bf931dbc34f986fd0c3b0b6b5a58d013c9aef274d0c88" + 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..c65f5f71482df --- /dev/null +++ b/Formula/c/csvlens.rb @@ -0,0 +1,39 @@ +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.12.0.tar.gz" + sha256 "d95a3029e4ec471feb337f465e36910f712c790e629c8b23357d00b705399f6d" + license "MIT" + head "https://github.com/YS-L/csvlens.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ed68dbcd995125c2b973101875f5eaba2a611e62db0d7bdf0ea1ad11c78bd5b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7e7b44e6496caa54377eaf79872a5ac98735ef58b9c9d98b91e6c08851a6bdee" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3596c058574d6df0ecae12a7376d6481c864de4123b148ac1e97f75ee1496163" + sha256 cellar: :any_skip_relocation, sonoma: "c147bab09ebdf31d9bc3e85bb19c55ef6640377363aeb1e0969d7b376c6b57e7" + sha256 cellar: :any_skip_relocation, ventura: "eee96abff43d55cc9c846799712d2aee6ac132dda2a3bbb47f91dfd8e9de5a33" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b8d1df6d3ab2678c5d574764c3f774025a3a2e3771dc99b0af8241e148e6a57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f779201e350f658491b2326eeb7ff7b72155cb72b57310d707dc7ec3bc48bb5" + 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..8b6c81147841c --- /dev/null +++ b/Formula/c/csvprintf.rb @@ -0,0 +1,40 @@ +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.2.tar.gz" + sha256 "df034c676b512081f92727f4f36ad38e4d5d91d20a4a9abd52f10885b6c475e7" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "68dca765189cde9bb909b876cb833c3fe9f0e6cd98c7dddf470511374a4b1900" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "63b05c840d8e8778e8852c48c86f9d016a5836d166be5ea1e903139447df6e2d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9e4451744e95c6dd7b59d3fb4f87ca0544b6490b612f0f1a7bf89239d7cbbfc3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "719c4b5fbdf147b90f9bf5e66852aae45ee16dfbf6a98d88965b1e811382ed8b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "347ff9994e2283642d8c4e872befd1b05498730239954374a264ef9541608280" + sha256 cellar: :any_skip_relocation, sonoma: "19581e7d7ab4ddc9da2e82d307e19ac191b82fee6152bfd9c14605b29559465b" + sha256 cellar: :any_skip_relocation, ventura: "2bfcd4960b00c49f40191b1223bafe95cecb6e97a9b85de96980efffc32f1309" + sha256 cellar: :any_skip_relocation, monterey: "99b257d8a7e4b36c4595c7254450ead9356ac66540179d4339334ad1ecf7693c" + sha256 cellar: :any_skip_relocation, big_sur: "ae2efc4c958a8eab84e0c2009720ace1c8862d46e26bbf10fc79b3908b3ae5e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "11cb695074fd290b7e8cde5ab31824468a1193a4cea9b6ec28e1440878437ad5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bd6ad4105c7f8e55381dbd107a613b9ef790e39c4b14b35bd97808fb14cddaaf" + 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..f2bda26f1b593 --- /dev/null +++ b/Formula/c/csvq.rb @@ -0,0 +1,47 @@ +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_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, 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..155d17be12d1c --- /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.33.0.tar.gz" + sha256 "f325933dd2e2c4f8b83fac59df1a06b4b5b914c23c23acfa5658b676936dde9f" + license "MIT" + head "https://github.com/shenwei356/csvtk.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "de4fd6a17277f4e9a178cab48b5ca6135c304b27fa1617a1b9ea49a3f96260d0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "de4fd6a17277f4e9a178cab48b5ca6135c304b27fa1617a1b9ea49a3f96260d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "de4fd6a17277f4e9a178cab48b5ca6135c304b27fa1617a1b9ea49a3f96260d0" + sha256 cellar: :any_skip_relocation, sonoma: "20deb9324aeacaf068a1edcf988890e0a1f15ff3b735599513fd028b871fa7ac" + sha256 cellar: :any_skip_relocation, ventura: "20deb9324aeacaf068a1edcf988890e0a1f15ff3b735599513fd028b871fa7ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8ae2c10c57b6852b45ada75c178336f36b19e77f292ef25b65517baa8c52805" + end + + depends_on "go" => :build + + resource "homebrew-testdata" do + url "https://raw.githubusercontent.com/shenwei356/csvtk/e7b72224a70b7d40a8a80482be6405cb7121fb12/testdata/1.csv" + sha256 "3270b0b14178ef5a75be3f2e3fdcf93152e3949f9f8abb3382cb00755b62505b" + end + + 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").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..2abf9f1f5cd43 --- /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 6 + sha256 cellar: :any_skip_relocation, all: "db9a5f1d08b328f96733905f1b05215a8fe89ff95834ebc873a94d3197e16477" + end + + deprecate! date: "2025-01-10", because: :repo_archived + + depends_on "python@3.13" + + # 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..19585f5cd1c5e --- /dev/null +++ b/Formula/c/ctags.rb @@ -0,0 +1,109 @@ +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 + + bottle do + 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, mojave: "238b65e5e1614f1d24fd88b6741c04d1cf48fd5f5d247cdbcd1f82d5796197d5" + 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: "this formula installs the same executable as the ctags formula" + + # fixes https://sourceforge.net/p/ctags/bugs/312/ + patch :p2 do + on_macos do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/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..75954dcdbf401 --- /dev/null +++ b/Formula/c/ctail.rb @@ -0,0 +1,50 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "d81e805d4a80fd83b36fa579dff3c71a364b7bbc50ff6addf74a0d3790a92643" + sha256 cellar: :any, high_sierra: "de6e121995f86ec3dbfddf8bee861d9389c548648316f4901cbde691ca26a8d5" + sha256 cellar: :any, sierra: "829ed2ea1ac94bf32fd1817f714b87301abf2c488cf151675239d5d9bf6f6ef8" + sha256 cellar: :any, el_capitan: "80a2ae43fba99e6eb5eb4b50b52ee0e32213d521f59e147a109444439b86365d" + 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..f7ee01e7ce4bd --- /dev/null +++ b/Formula/c/ctemplate.rb @@ -0,0 +1,52 @@ +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" + + bottle do + rebuild 3 + 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..00061045ea08e --- /dev/null +++ b/Formula/c/ctl.rb @@ -0,0 +1,50 @@ +class Ctl < Formula + desc "Programming language for digital color management" + homepage "https://github.com/ampas/CTL" + license "AMPAS" + revision 1 + head "https://github.com/ampas/CTL.git", branch: "master" + + # TODO: Remove `stable` block when patch is no longer needed. + stable do + url "https://github.com/ampas/CTL/archive/refs/tags/ctl-1.5.3.tar.gz" + sha256 "0a9f5f3de8964ac5cca31597aca74bf915a3d8214e3276fdcb52c80ad25b0096" + + # Fix build failure due to ambiguous call to `clamp` with C++17 + # https://github.com/ampas/CTL/pull/164 + patch do + url "https://github.com/ampas/CTL/commit/8108715a8cbbb0a0a81a00fb7239f228270047c1.patch?full_index=1" + sha256 "4a48615dd434b80db01f23da56a2243d72d32f60a4a5c23655e5860a845eda6f" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9d2f566d3e81d03f0df20a22cafe1a0ffec738af1b3b8d8fb804c66bc57f1e42" + sha256 cellar: :any, arm64_sonoma: "6e5fa4335bc1b37de8c3fc53d05b4e6f6d1f98292d7f37101e58b4434b61e3e2" + sha256 cellar: :any, arm64_ventura: "cca063bca6afc27b93575530d6ae3b4e27887646a4d84ec62bab91e112664f55" + sha256 cellar: :any, sonoma: "f765540b318344aae45d9cb0ab5f9399f82f08cc560b4bec4b427795e6232cf6" + sha256 cellar: :any, ventura: "db8b8b63a18cdd1070dd9ebde85a3a4d5e2d6f9e1e520d7d31e90375143f1f15" + sha256 cellar: :any_skip_relocation, arm64_linux: "e655c7062702656e1d9e4be0f0a6151cbc7056a40069f9ce40a0e8c0846d4761" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ed74f26a409a8c6078dcdd8575a78a145991769103c40f2ee04cf65c2f59964" + 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..dbc1db2edcb70 --- /dev/null +++ b/Formula/c/ctlptl.rb @@ -0,0 +1,37 @@ +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.40.tar.gz" + sha256 "150c80e1855530871bd815cae466d559bddebae88e74e80f64a743bf10236d4d" + license "Apache-2.0" + head "https://github.com/tilt-dev/ctlptl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "08791701e964b9592a0e70ebe6f66a60c4ef45f60da25a34487ebed9aa2ea6d0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "930e48d7e62fb86dc4a3d833dc7bc709cd52ebf3ecccb29c29fcc85cbf76db73" + sha256 cellar: :any_skip_relocation, arm64_ventura: "849305be4d6845d03a45a4095182744cf52a23674ab47f975a7b77fe5e2d79e8" + sha256 cellar: :any_skip_relocation, sonoma: "7659d74ff23c82f25783815074811622c79b35749537f0843daf1c41556d8123" + sha256 cellar: :any_skip_relocation, ventura: "e5b1ace1ff8e2ffbe788d0f33f7969d2d2272b4217b38bd5137c685c74dd01ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "0282da94f64161002eab49d6d3846d600849b36e63c36db96b4bfb4b740e0c6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "300432a6c6c1ef111b46a4fed7af24162e918da54cdd676f7687a5390fa78b02" + 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..19ac84397166f --- /dev/null +++ b/Formula/c/ctop.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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..66ea9c1f1c993 --- /dev/null +++ b/Formula/c/ctpv.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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/cuba.rb b/Formula/c/cuba.rb new file mode 100644 index 0000000000000..061ea9acfe3fc --- /dev/null +++ b/Formula/c/cuba.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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..3320684263c6a --- /dev/null +++ b/Formula/c/cubeb.rb @@ -0,0 +1,117 @@ +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 + + bottle do + 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, mojave: "d34baf923b56edec2ae8201857c55426584f35b47ef8e2e6577a38f684fbab75" + sha256 cellar: :any, high_sierra: "618debffabe494dcde3e0d7e2231078df124ead8ee342886ab38ad7373f73e37" + sha256 cellar: :any, sierra: "f89e89027370ea9da99f72f0af0529f9b63fbe31c434d3ccafdc7230664a41c2" + sha256 cellar: :any, el_capitan: "f7e738b374bb07e1c420e56dfeb72caa814495b446c71d8158ef98c9b33d3a60" + 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..ccc068c99852b --- /dev/null +++ b/Formula/c/cubejs-cli.rb @@ -0,0 +1,31 @@ +class CubejsCli < Formula + desc "Cube.js command-line interface" + homepage "https://cube.dev/" + url "https://registry.npmjs.org/cubejs-cli/-/cubejs-cli-1.3.15.tgz" + sha256 "e4686d1700f219c285738b400b1a79f8719d48fd333531f11c7528264729a903" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3888bf52de94437aee01c501c1e07599455dd3e113650a0acf6677504609eb99" + sha256 cellar: :any, arm64_sonoma: "3888bf52de94437aee01c501c1e07599455dd3e113650a0acf6677504609eb99" + sha256 cellar: :any, arm64_ventura: "3888bf52de94437aee01c501c1e07599455dd3e113650a0acf6677504609eb99" + sha256 cellar: :any, sonoma: "6136384a5fbc79fd399402726841baf0bcf9b83831b3023d5591fe919a0dc12d" + sha256 cellar: :any, ventura: "6136384a5fbc79fd399402726841baf0bcf9b83831b3023d5591fe919a0dc12d" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a048c677e0d993acfb0a613635b4706790c037c1c7a55a77ddd1ec5204eb797" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6497aecdb8038816644c6b4913ad8f4d64c63efcd49f600605071937e9d9e93f" + 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..5c04756843b7b --- /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 + + bottle do + 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 + + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..38a48ab72d998 --- /dev/null +++ b/Formula/c/cucumber-cpp.rb @@ -0,0 +1,95 @@ +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" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ebd1f734db83ae5e745b5a870609430170ac0a4db66d0a982054f17f9c11df23" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d9d57c131eb3c28dacc0dc5191e0db536837ff6c0c3e1c00b18bbde206cbccea" + sha256 cellar: :any_skip_relocation, arm64_ventura: "83b0a4ebd24369723ca462379eec507069b69745b0162aaf8e52fbd191912f8b" + sha256 cellar: :any_skip_relocation, sonoma: "552c285dcbfdfeeeee4918504197d55608bcdd7a6f545c7b128b9a3ec4de66bd" + sha256 cellar: :any_skip_relocation, ventura: "f174b4c1f7188ec9cbfa63d42a7858b5b6055d46b4e8ef9e01603aa6a8f504a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b10926942356d39fb0ec167e488e3d170a265824e3afee947643ab71b8be4bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fdfd1f3eb9ae326c0490d8f17f4b68adebd5c48382bae283de89b9bb835b994" + end + + depends_on "cmake" => :build + depends_on "nlohmann-json" => :build + depends_on "ruby" => :test + depends_on "asio" + depends_on "tclap" + + def install + # TODO: Remove these 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 + ] + + 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..485a30a89e7f0 --- /dev/null +++ b/Formula/c/cucumber-ruby.rb @@ -0,0 +1,123 @@ +class CucumberRuby < Formula + desc "Cucumber for Ruby" + homepage "https://cucumber.io/" + url "https://github.com/cucumber/cucumber-ruby/archive/refs/tags/v9.2.1.tar.gz" + sha256 "d15fec49a75c2e0d740c87b16818a3cacc317f1751d075444cb93a87ddaaf2dc" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "20381cf2c1bbdb4f7ebea8dc4a0a8ed54da15918a5990a4174da415143f1d614" + sha256 cellar: :any, arm64_sonoma: "998779f5565e45a08537c4ee50623709e0a18b9196566b0e38960a550835e19d" + sha256 cellar: :any, arm64_ventura: "f666102925eaf6f28a901e04718ce7b11a6b212b5ac99facc05976619ead0da1" + sha256 cellar: :any, sonoma: "a064069552ea70949964106b212ac03a08545a1ff8cf579866157c3f081625f0" + sha256 cellar: :any, ventura: "4a50724c662c7703e7194415b307960575aa2fcdb9a02aa33af952469fdf807a" + sha256 cellar: :any_skip_relocation, arm64_linux: "729a70a8e6dfb8478fbd440b3d2c2dc0a90207e2b1e6eb8aea9eb96daf75e2db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e9d621e6af198167ae28ec80ffd44a87c2cffee29c5bc81869a1dc9c46e8152" + end + + depends_on "pkgconf" => :build + depends_on "ruby" + + uses_from_macos "libffi", since: :catalina + + # Runtime dependencies of cucumber + # List with `gem install --explain cucumber` + # https://rubygems.org/gems/cucumber/versions/9.0.1/dependencies + + resource "ffi" do + url "https://rubygems.org/gems/ffi-1.17.1.gem" + sha256 "26f6b0dbd1101e6ffc09d3ca640b2a21840cc52731ad8a7ded9fb89e5fb0fc39" + end + + resource "sys-uname" do + url "https://rubygems.org/gems/sys-uname-1.3.1.gem" + sha256 "b7b3eb817a9dd4a2f26a8b616a4f150ab1b79f4682d7538ceb992c8b7346f49c" + 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 "diff-lcs" do + url "https://rubygems.org/gems/diff-lcs-1.5.1.gem" + sha256 "273223dfb40685548436d32b4733aa67351769c7dea621da7d9dd4813e63ddfe" + end + + resource "cucumber-messages" do + url "https://rubygems.org/gems/cucumber-messages-22.0.0.gem" + sha256 "d08a6c228675dd036896bebe82a29750cbdc4dacd461e39edd1199dfa36da719" + end + + resource "cucumber-html-formatter" do + url "https://rubygems.org/gems/cucumber-html-formatter-21.7.0.gem" + sha256 "e116a23dd4827b76f5055e4bcba2899ac5d9391293000486680bf9a14d0bc252" + end + + resource "cucumber-gherkin" do + url "https://rubygems.org/gems/cucumber-gherkin-27.0.0.gem" + sha256 "2e6a8212c1d0107f95d75082e8bd5f05ace4e42dd77a396c7b713be3a8067718" + end + + resource "bigdecimal" do + url "https://rubygems.org/gems/bigdecimal-3.1.5.gem" + sha256 "534faee5ae3b4a0a6369fe56cd944e907bf862a9209544a9e55f550592c22fac" + end + + resource "cucumber-cucumber-expressions" do + url "https://rubygems.org/gems/cucumber-cucumber-expressions-17.1.0.gem" + sha256 "a1be9df1e5d787f62ff89e5a96c9a78e2e3b989cef7bf698f22cd5efd699d391" + end + + resource "cucumber-tag-expressions" do + url "https://rubygems.org/gems/cucumber-tag-expressions-6.1.1.gem" + sha256 "ccf1bb8ae92dc5f91571b3e8f034b496b079e2e25cabb802dd64b24975483430" + end + + resource "cucumber-core" do + url "https://rubygems.org/gems/cucumber-core-13.0.3.gem" + sha256 "e01c28d658dc0a8d5804507e0b63b58ba0e4fbe8e7d50f8f19c17b44872c5344" + 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 + + def install + ENV["GEM_HOME"] = libexec + resources.each do |r| + r.fetch + args = ["--ignore-dependencies", "--no-document", "--install-dir", libexec] + # Fix segmentation fault on Apple Silicon + # Ref: https://github.com/ffi/ffi/issues/864#issuecomment-875242776 + args += ["--", "--enable-libffi-alloc"] if r.name == "ffi" && OS.mac? && Hardware::CPU.arm? + system "gem", "install", r.cached_download, *args + 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 "create 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..690657e19a52e --- /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.12.1.tar.gz" + sha256 "dbf683785e5f3ee148345c31330b8aac6078e82d2d4c99c938315f5aecfeeb8b" + license "Apache-2.0" + head "https://github.com/cue-lang/cue.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "579de2e923c0c7d7db17ec8e410a86186d3aca8930af2d99ae0690d6aa1884bf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "579de2e923c0c7d7db17ec8e410a86186d3aca8930af2d99ae0690d6aa1884bf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "579de2e923c0c7d7db17ec8e410a86186d3aca8930af2d99ae0690d6aa1884bf" + sha256 cellar: :any_skip_relocation, sonoma: "b79869217afdcd5dc25eb65dde44d021330105b285f0fe592195c845bba423e3" + sha256 cellar: :any_skip_relocation, ventura: "b79869217afdcd5dc25eb65dde44d021330105b285f0fe592195c845bba423e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7f102fafb95b80f149b82a86f57fea7dc694f9369037cb5d09115aed545eba8" + 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..dee56a9d1dbe2 --- /dev/null +++ b/Formula/c/cuetools.rb @@ -0,0 +1,66 @@ +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" + + bottle do + 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, mojave: "1e36c3c8d2d53947b73a9f0a0aed74145e2b1890f83764de02f1d12566d0300f" + sha256 cellar: :any_skip_relocation, high_sierra: "4393d6db857a9568a34de3a09ff049fbec9a55a95b029eacd24e35d6ce792074" + sha256 cellar: :any_skip_relocation, sierra: "9456e5957a78f993f5a8cef76aa583ac6a42a8298fb05bded243dbaf810f9a44" + sha256 cellar: :any_skip_relocation, el_capitan: "7f0effc75d64fca0f2695b5f7ddb4d8713cc83522d40dcd37842e83c120ac117" + 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..6c07b92ecd282 --- /dev/null +++ b/Formula/c/cunit.rb @@ -0,0 +1,71 @@ +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" + + bottle do + 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, mojave: "561baccf9e285cd65021b70342d1ba37b456a2f35c0324dfd2a65ea427641d27" + sha256 cellar: :any, high_sierra: "23fdc88eeb1c4cf8d58e281e046f2e45a56860c0091e5c76f757f01679d143d2" + sha256 cellar: :any, sierra: "dc987998ebcfc175c9c9e70c6b83db4197bd5b79d383235b85ee8a30835785df" + sha256 cellar: :any, el_capitan: "0b92535641c86f38bf7a3a1b08a07aa6523e4c0135792dd92829e00579a5e3a9" + 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..8f859414fd2a8 --- /dev/null +++ b/Formula/c/cups.rb @@ -0,0 +1,55 @@ +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.12/cups-2.4.12-source.tar.gz" + sha256 "b1dde191a4ae2760c47220c82ca6155a28c382701e6c1a0159d1054990231d59" + 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_sequoia: "705e803a739ead8c04537615685fedf880afc88a536315d939571a98911f7936" + sha256 arm64_sonoma: "dc4da71981a402f2cdf66008cec93ab1480826254633a815e835d442b32c8536" + sha256 arm64_ventura: "1cfe5a32e6973737ae86e1f16b8cc104b5b5ac57243b8b787356adf687785c35" + sha256 sonoma: "38bf81dc15a0dca73492c12fc6912926bac447bd71fe4b3d0e7c5b6245dbd985" + sha256 ventura: "fd22e936b6d275b404c3a0b094624950b9dc27eb9924be1592792eec4e955c50" + sha256 arm64_linux: "ac4a05c8d6c069d1e486948aceee4edd97d8ff765b3282e077c69ca2d122580c" + sha256 x86_64_linux: "bf9ed3c684e203a1809506737ca7d167dbc4911019344298663f02792fb4fcaa" + 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..cb3e48cbd3e33 --- /dev/null +++ b/Formula/c/curl.rb @@ -0,0 +1,140 @@ +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` goes below this comment when the `stable` block is removed. + url "https://curl.se/download/curl-8.13.0.tar.bz2" + mirror "https://github.com/curl/curl/releases/download/curl-8_13_0/curl-8.13.0.tar.bz2" + mirror "http://fresh-center.net/linux/www/curl-8.13.0.tar.bz2" + mirror "http://fresh-center.net/linux/www/legacy/curl-8.13.0.tar.bz2" + sha256 "e0d20499260760f9865cb6308928223f4e5128910310c025112f592a168e1473" + license "curl" + + livecheck do + url "https://curl.se/download/" + regex(/href=.*?curl[._-]v?(.*?)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "71f23540167a8ab38a56ae1ec35b12f726765d6706602e93efdaad31a99bf01d" + sha256 cellar: :any, arm64_sonoma: "e0d632af6097f17ca1d10d2cbe63f43fdf2dd58aa1a36a6e8cad11e7f72159a5" + sha256 cellar: :any, arm64_ventura: "416ee6d14ce87952b11e325f9e320c068b657e3b5099ba50a34e7f5bbc68d634" + sha256 cellar: :any, sonoma: "49161bfb410f5a2f585256b452f9252319064f633789109f7f53941b28816b7b" + sha256 cellar: :any, ventura: "d6a522ebfb6b2b64f03911465d16ba15d4ce6b1e68d5cb5820c245c4f6ef8f1f" + sha256 cellar: :any_skip_relocation, arm64_linux: "420cec3c2e6f55105664b0074c49119f736621646ca522fae976cbe759667a8b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c420f63845b2ed7c29f089cdb84981134173dab3b89b8e6c7b06f22630dcbec" + 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 "libssh2" + depends_on "openssl@3" + depends_on "rtmpdump" + depends_on "zstd" + + uses_from_macos "krb5" + uses_from_macos "openldap" + uses_from_macos "zlib", since: :sierra + + on_system :linux, macos: :monterey_or_older do + depends_on "libidn2" + end + + # Fixes failure to download certdata.txt due to a redirect + patch do + url "https://github.com/curl/curl/commit/eeed87f0563d3ca73ff53813418d1f9f03c81fe5.patch?full_index=1" + sha256 "f7461a8042ca8ef86492338458ccd79ee286d17773487513928d7ed6ae25818c" + end + + # Fixes build on macOS 10.12 and earlier + patch do + url "https://github.com/curl/curl/commit/d7914f75aa8ecdd68cdbb130c1351a7432597fe4.patch?full_index=1" + sha256 "2ba45be5c9238abc914c2a47cd604cbd08972583b310c9079b7b7909b352001b" + end + + def install + tag_name = "curl-#{version.to_s.tr(".", "_")}" + if build.stable? && stable.mirrors.grep(/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 + + 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-secure-transport + --with-default-ssl-backend=openssl + --with-librtmp + --with-libssh2 + --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 + + # Check dependencies linked correctly + curl_features = shell_output("#{bin}/curl-config --features").split("\n") + %w[brotli GSS-API HTTP2 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..a4f76e98fe381 --- /dev/null +++ b/Formula/c/curlcpp.rb @@ -0,0 +1,83 @@ +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 + + bottle do + 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..0db1beb0a53ee --- /dev/null +++ b/Formula/c/curlie.rb @@ -0,0 +1,30 @@ +class Curlie < Formula + desc "Power of curl, ease of use of httpie" + homepage "https://github.com/rs/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_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..f16f4a847949f --- /dev/null +++ b/Formula/c/curlpp.rb @@ -0,0 +1,68 @@ +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 + + bottle do + 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/formula-patches/0089ecdbd3df70aa0efc06801d82700bd24be023/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..dbdff4b42f180 --- /dev/null +++ b/Formula/c/curseofwar.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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, mojave: "5847323530aec077f4a17d4c4eb78ee0f90499940dbce3608aba6d4f39e3719e" + sha256 cellar: :any_skip_relocation, high_sierra: "b2a0646e145b7ef8f502b6f544d106c05c90974c0f8972285a5dfa753305eece" + 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.rb b/Formula/c/cutter.rb new file mode 100644 index 0000000000000..17f1aac14374a --- /dev/null +++ b/Formula/c/cutter.rb @@ -0,0 +1,63 @@ +class Cutter < Formula + desc "Unit Testing Framework for C and C++" + homepage "https://github.com/clear-code/cutter" + url "https://osdn.mirror.constant.com/cutter/73761/cutter-1.2.8.tar.gz" + sha256 "bd5fcd6486855e48d51f893a1526e3363f9b2a03bac9fc23c157001447bc2a23" + license "LGPL-3.0-or-later" + head "https://github.com/clear-code/cutter.git", branch: "master" + + livecheck do + url "https://osdn.net/projects/cutter/releases/" + regex(%r{value=["'][^"']*?/rel/cutter/v?(\d+(?:\.\d+)+)["']}i) + end + + bottle do + sha256 arm64_sequoia: "64e7611a4932840b48802b8f628f0d1e8cbb7b639f774def7ab734679d35e1d4" + sha256 arm64_sonoma: "16bad5398ee66928c15164f769470028aca2912c9b634b45c11cd708f05de11f" + sha256 arm64_ventura: "37e55863dc6c7a518de33492c6afe7618604ffbc4871ea756bee1782325987e4" + sha256 arm64_monterey: "3e314f0acebc224eabaa266508356e09142f2834d7b6b2b1611d66eacc2496e3" + sha256 arm64_big_sur: "ac45c9987b4d770856db1f5e2c8fc20fb1ed882297c22691fe29fb153f7b9828" + sha256 sonoma: "3048a1973b5c6a8015a73e9b94b08497f8f05f65669c5d17db7b2daacc0652da" + sha256 ventura: "e1ca298daad5c2cd36945fbe4460938ae2412097fe71fe61587ecff9572e8bef" + sha256 monterey: "f6288d98ed9a5fd49d2223ae5a426bed1c9503672f971aae3d1433ebaf2f0d13" + sha256 big_sur: "3ac33f6c41d14b9d1fd3486fe811dda6219d45930b0359f4300b69c50a56572d" + sha256 catalina: "237aebfb6d39c2efcbbc27e550fbac0a6d1477b549416b69aa71c53c06dce231" + sha256 mojave: "70999a7a96da94c5de52da9edb4bf9b3fe5e7b2372d189ccc5a7328f0c21400c" + sha256 high_sierra: "ccff0989fe28eeb233bf0cc1f3681041d1945f6e3b0c2700899b8f02581426b6" + sha256 arm64_linux: "57ba9deb19adb6a9542dae1ccdc0b521d13a0dc4bfd97b8d689b54631cc763d9" + sha256 x86_64_linux: "1f0d55c82c767d2f7d947bdc054a43d381bc6c1b2b09adc2bd3e7e8381059eb2" + 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 + ENV.prepend_path "PERL5LIB", Formula["perl-xml-parser"].libexec/"lib/perl5" unless OS.mac? + + 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..2e8aec4e94ef0 --- /dev/null +++ b/Formula/c/cvs-fast-export.rb @@ -0,0 +1,60 @@ +class CvsFastExport < Formula + 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" + + livecheck do + url :homepage + regex(/href=.*?cvs-fast-export[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f7b2c67fe9436b3cfc2d64706c46ed8913e75db0486e72527be0c200fd31fbf2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9dba6bf27f82465c252bd146ea828f2e93849c7886015a66a3359957be1a32ad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c5e0e6010700405c1ef04acc75e09e45b2e513dd884e85145cc0876de50b6f10" + sha256 cellar: :any_skip_relocation, arm64_monterey: "034da199bcd8f5bef619c446d548727e6657dccdcda38933a23247c5cd476d0c" + sha256 cellar: :any_skip_relocation, sonoma: "f6aca690bf14add0b2daa03afc21b4efdfe093770c8547eb17ee271aea9a32bc" + sha256 cellar: :any_skip_relocation, ventura: "b70d7f541af12e97ee607b9d7fa1665af6bbfd6051e31bb6b93b71c220fa115d" + sha256 cellar: :any_skip_relocation, monterey: "3dde4030da24cab974a110ff6954b9d5b01091f33f16d936cad581e8db55067b" + sha256 cellar: :any_skip_relocation, arm64_linux: "feebbd85a5fe77606bb7abfd693844c374b11bf3b9e7af2201e31a9010854a52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a9a04b0289478952e4f7991b95d9f0ced10fedc353c263e28924195dc60a1727" + 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 "libxml2" + uses_from_macos "libxslt" + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "make", "install", "prefix=#{prefix}" + 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..0c381dc6d76b4 --- /dev/null +++ b/Formula/c/cvs.rb @@ -0,0 +1,142 @@ +# 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://ftp.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://ftp.gnu.org/non-gnu/cvs/source/feature/" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/}i) + end + + bottle do + 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/formula-patches/24118ec737c7d008420d4683a07129ed80a759eb/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..78cc2b1870ba0 --- /dev/null +++ b/Formula/c/cvsutils.rb @@ -0,0 +1,29 @@ +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 + + 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..271ee46fb089e --- /dev/null +++ b/Formula/c/cvsync.rb @@ -0,0 +1,60 @@ +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 + + bottle do + rebuild 3 + 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..7e16a7e92d9a1 --- /dev/null +++ b/Formula/c/cwb3.rb @@ -0,0 +1,140 @@ +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 + + bottle do + 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..463927271354d --- /dev/null +++ b/Formula/c/cweb.rb @@ -0,0 +1,59 @@ +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.1.tar.gz" + sha256 "c6e08d726b1b587187a70d45cf49dd990dfe70053059064fea0999e3f4fa976f" + # 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_sequoia: "f7dc4b0a260556f278058526ff6259dd28522b1f00454d9e1790a8aaff41b7f2" + sha256 arm64_sonoma: "a50c45f276cc546df324a406ddd8a2d89edb8a676c7b7e8bca29ee4dbb3e5d84" + sha256 arm64_ventura: "d9ac7cb438103378e55375f9ac40e1032dd0195d3a5e4a66549ec8856390d034" + sha256 sonoma: "75d0b7f16f41c5cf906aa45c0ffbb6c86415efd715604d2ac8ac9cda4c8507cb" + sha256 ventura: "e97d62ac332b3ae7ed53bf20c6e05605fb0409f1e8621a88821a6482322bd62b" + sha256 arm64_linux: "face2e86737f60a8e64490aef1eb49281c56c89aa969873dbed6df624ea9b507" + sha256 x86_64_linux: "7a59e26b5b3569d2459442cab528f68b0a83f66db2daf4592d65cffa04298ad2" + 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..b0bf638c3faad --- /dev/null +++ b/Formula/c/cxgo.rb @@ -0,0 +1,59 @@ +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_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, 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..97ba5cdd48495 --- /dev/null +++ b/Formula/c/cxxopts.rb @@ -0,0 +1,57 @@ +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.2.1.tar.gz" + sha256 "841f49f2e045b9c6365997c2a8fbf76e6f215042dda4511a5bb04bc5ebc7f88a" + license "MIT" + head "https://github.com/jarro2783/cxxopts.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "883a901ef150f303dfba9430fc0fd7f29a9f132406b35ebd9dcf481f23029957" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DCXXOPTS_BUILD_EXAMPLES=OFF + -DCXXOPTS_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.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..2acd604e7844e --- /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 5 + sha256 cellar: :any_skip_relocation, all: "643d46c6ac246d2b736860fd8e318a1a25fb4c2b659a18fead5db9fbe6dc9298" + end + + depends_on "python@3.13" + + def install + venv = virtualenv_create(libexec, "python3.13") + 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..9174dc092a9ad --- /dev/null +++ b/Formula/c/cyclonedx-gomod.rb @@ -0,0 +1,48 @@ +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_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, 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..2b27c3efad4aa --- /dev/null +++ b/Formula/c/cyclonedx-python.rb @@ -0,0 +1,186 @@ +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/98/a5/796b6e58ea9a13af3a9776ff4a4c7ee9108debe9461a129d121257146cd3/cyclonedx_bom-6.1.1.tar.gz" + sha256 "2523a1879b5cd4fd77be68a000c718cde80c17908a8374a17414eb8c9aa7cf20" + license "Apache-2.0" + head "https://github.com/CycloneDX/cyclonedx-python.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "207bc5a3afa9ede34792825e9e5e0804b2d4f5ddcc1ce91df087edd87648c27a" + sha256 cellar: :any, arm64_sonoma: "fe19b0b8809615f6e5a3c318992d326e440b6115fcc6c4922306873f55734b98" + sha256 cellar: :any, arm64_ventura: "c3f219cd7b18cada9994055590c49767f75fc8932fd57d5e312e7f0e7300ab1c" + sha256 cellar: :any, sonoma: "d2e9e72dcc36a618823be8e687379277305c8c8629766dcb61331f9c90b38170" + sha256 cellar: :any, ventura: "ad3569ee277cf642f66a26b6200a72d8c2268675f7f2fab371e13b5a69bf1d61" + sha256 cellar: :any_skip_relocation, arm64_linux: "a0f9f5d14e014409d650d5467c01eb754f30a8f08749de4a9785392a2cfd1fad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "14989decb820fef2e8eb9d59ce44a79b80bc3b9481e8c2b6fd2bdbf4984eb564" + end + + depends_on "rust" => :build # for rpds-py + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + 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/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 "cyclonedx-python-lib" do + url "https://files.pythonhosted.org/packages/bf/70/c5ab120047230e2c9db8e04b55f9b547fcf52ec6a4a5155dd5a3a3185fd2/cyclonedx_python_lib-10.0.1.tar.gz" + sha256 "6c7a8c27a28279d22d92d4e0982e59beed3076a1aa4928a27830b0eaa2ca4f29" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + 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 "license-expression" do + url "https://files.pythonhosted.org/packages/74/6f/8709031ea6e0573e6075d24ea34507b0eb32f83f10e1420f2e34606bf0da/license_expression-30.4.1.tar.gz" + sha256 "9f02105f9e0fcecba6a85dfbbed7d94ea1c3a70cf23ddbfb5adf3438a6f6fce0" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + 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 "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/f0/75/813967eae0542776314c6def33feac687642a193b9d5591c20684b2eafd8/py_serializable-2.0.0.tar.gz" + sha256 "e9e6491dd7d29c31daf1050232b57f9657f9e8a43b867cca1ff204752cf420a5" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + 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/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz" + sha256 "df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa" + 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 "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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 "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/a9/60/47d92293d9bc521cd2301e423a358abfac0ad409b3a1606d8fbae1321961/types_python_dateutil-2.9.0.20241206.tar.gz" + sha256 "18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb" + 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 + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + 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..b61b0e369d77c --- /dev/null +++ b/Formula/c/cycode.rb @@ -0,0 +1,168 @@ +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/27/3d/74aee82496a0b5015f7def09aa74449d534aaf24ff5cc2caf804eb54cf63/cycode-2.4.0.tar.gz" + sha256 "9c7ca025e4c8086c9d75588bf2eb43e02e551ea8d896f15fe86bd846097036b4" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5abeb5d47ad299c701efad432960b7b4ef369d979277440f140b07e67bd552e0" + sha256 cellar: :any, arm64_sonoma: "a7d64abc65d1499f5679f6dd8434f87c2735168cc3d7d29ecf05e74072f2839d" + sha256 cellar: :any, arm64_ventura: "a8390fccb4fde4ec4ff35c7f5f057eb84cabf9796c238caa60b4d5e9a1cbcd2f" + sha256 cellar: :any, sonoma: "625ff06a387d18700da2ab4fdb29ee824182208dfbfab1272f4d2eb2d75bcdae" + sha256 cellar: :any, ventura: "0bc83028b9a7adc9512e7492bd75428765a254ed4bc1c9c13d0668ef0dad1df3" + sha256 cellar: :any_skip_relocation, arm64_linux: "3426f067d5f99ab109093454df41164728cc16de3ef3135919a8d451e76e5c0d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0b8f367b69f6be6d4bf6a0a517c7e1a056de4aa53f8e9d4486db725f59e8521b" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/c0/89/37df0b71473153574a5cdef8f242de422a0f5d26d7a9e231e6f169b4ad14/gitpython-3.1.44.tar.gz" + sha256 "c87e30b26253bf5418b01b0660f818967f3c503193838337fe5e573331249269" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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 "marshmallow" do + url "https://files.pythonhosted.org/packages/70/40/faa10dc4500bca85f41ca9d8cefab282dd23d0fcc7a9b5fab40691e72e76/marshmallow-3.22.0.tar.gz" + sha256 "4972f529104a220bb8637d595aa4c9762afbe7f7a77d82dc58c1615d70c5823e" + 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 "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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/cf/b6/a92ae6fa6d7e6e536bc586776b1669b84fb724dfe21b8ff08297f2d7c969/sentry_sdk-2.27.0.tar.gz" + sha256 "90f4f883f9eff294aff59af3d58c2d1b64e3927b28d5ada2b9b41f5aeda47daf" + 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 "texttable" do + url "https://files.pythonhosted.org/packages/1c/dc/0aff23d6036a4d3bf4f1d8c8204c5c79c4437e25e0ae94ffe4bbb55ee3c2/texttable-1.7.0.tar.gz" + sha256 "2d2068fb55115807d3ac77a4ca68fa48803e84ebb0ee2340f858107a36522638" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/a9/60/47d92293d9bc521cd2301e423a358abfac0ad409b3a1606d8fbae1321961/types_python_dateutil-2.9.0.20241206.tar.gz" + sha256 "18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/c8/93/65e479b023bbc46dab3e092bda6b0005424ea3217d711964ccdede3f9b1b/urllib3-1.26.19.tar.gz" + sha256 "3e3d753a8618b86d7de333b4223005f68720bcd6a7d2bcb9fbd2229ec7c1e429" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"cycode", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + assert_match "Error: Ignore by type is missing", shell_output("#{bin}/cycode ignore 2>&1", 1) + assert_match "Error: 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 "Error: Invalid value for '--scan-type' / '-t'", output + assert_equal "Cycode authentication failed", shell_output("#{bin}/cycode auth check").strip + assert_match version.to_s, shell_output("#{bin}/cycode version") + end +end diff --git a/Formula/c/cyctl.rb b/Formula/c/cyctl.rb new file mode 100644 index 0000000000000..d0b542b69bfca --- /dev/null +++ b/Formula/c/cyctl.rb @@ -0,0 +1,52 @@ +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.20.1.tar.gz" + sha256 "03d5017a720318882926914198ed1c61e9fd89c24ca4cc89db504a346b0e789b" + license "Apache-2.0" + head "https://github.com/cyclops-ui/cyclops.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f9f2095b07b4f4d9b47e25e2d641087eec75fda10239d623b7e266492e65ac15" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f9f2095b07b4f4d9b47e25e2d641087eec75fda10239d623b7e266492e65ac15" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f9f2095b07b4f4d9b47e25e2d641087eec75fda10239d623b7e266492e65ac15" + sha256 cellar: :any_skip_relocation, sonoma: "5667b60a8bc30bc264896245ae4542b144880e4dcb35b6de590d8ec8ecb33b15" + sha256 cellar: :any_skip_relocation, ventura: "5667b60a8bc30bc264896245ae4542b144880e4dcb35b6de590d8ec8ecb33b15" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71cf6dfe33db7cd4aeee365726c1bd2e08a627f9aae1f78f6991b2836a084e2a" + 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..e29a753a8d593 --- /dev/null +++ b/Formula/c/cyme.rb @@ -0,0 +1,37 @@ +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.1.tar.gz" + sha256 "c02856a2e360d2ccb05137352a2aad3805a35d32571839d4fb232a2d40c630f8" + license "GPL-3.0-or-later" + head "https://github.com/tuna-f1sh/cyme.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8e14a5092fdceabb74a714bfcb0223f7ebd42f37b95bc65349615e7d5d3dfd78" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6086c67490c4964a9267c8191e8ab28762125d3fd5a6fe0709097865ffb0d0fd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e048d290caf5132e20ca7253e945746d654de3d0d0ccb3032618bc3a25666e01" + sha256 cellar: :any_skip_relocation, sonoma: "1070248f63a403ae88598e48ec1b59ce4edb141d7f4897cf4f7b95be7a0feaf0" + sha256 cellar: :any_skip_relocation, ventura: "2ceea9b8ed585f9b9882bc7055d99159858330e355672bd44dab9eeba0cadd5d" + sha256 cellar: :any_skip_relocation, arm64_linux: "c6031b8eec92db02de33a30836410ce1c5410e8494503a8604c7fe26154e9b01" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d91a19af6f0a0dd542b34b660d795b18bf7b8ed830fc963afd08793202a1afd6" + 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..e710e41b391bf --- /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.04.0.zip" + sha256 "2e131b48656a23980c4cb81889a28cefdd08e38a6573ea60470942194afb2228" + 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: "2796111e9b434e0191a3f0b1737f8f7a0f0d90919f746f59cd00d1d826838a8b" + 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..81bd2423b6b04 --- /dev/null +++ b/Formula/c/cyphernetes.rb @@ -0,0 +1,33 @@ +class Cyphernetes < Formula + desc "Kubernetes Query Language" + homepage "https://cyphernet.es/" + url "https://github.com/AvitalTamir/cyphernetes/archive/refs/tags/v0.17.1.tar.gz" + sha256 "cb4d83c9db0aaaaef8caae502c0797148cc71b8a4a6223f9ae2712cd4ce97d7f" + license "Apache-2.0" + head "https://github.com/AvitalTamir/cyphernetes.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "64eca76d22d73e2ffd5b3d3658248683b77c20c8d9be0f2addb335444406c006" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "64eca76d22d73e2ffd5b3d3658248683b77c20c8d9be0f2addb335444406c006" + sha256 cellar: :any_skip_relocation, arm64_ventura: "64eca76d22d73e2ffd5b3d3658248683b77c20c8d9be0f2addb335444406c006" + sha256 cellar: :any_skip_relocation, sonoma: "401165017fb820a352671efd89e263894ab0364e52cf9ac09928619b5020372e" + sha256 cellar: :any_skip_relocation, ventura: "401165017fb820a352671efd89e263894ab0364e52cf9ac09928619b5020372e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a2da0e9d3966580d50c10c9954a060469294dbaff7f2d49f27d1fb33998efd6" + 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..f5f6d5f914ec5 --- /dev/null +++ b/Formula/c/cyrus-sasl.rb @@ -0,0 +1,57 @@ +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_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..8a9962cd83751 --- /dev/null +++ b/Formula/c/cython.rb @@ -0,0 +1,54 @@ +class Cython < Formula + desc "Compiler for writing C extensions for the Python language" + homepage "https://cython.org/" + url "https://files.pythonhosted.org/packages/cf/f7/db37a613aec5abcd51c8000a386a701ac32e94659aa03fa69c3e5c19b149/cython-3.1.0.tar.gz" + sha256 "1097dd60d43ad0fff614a57524bfd531b35c13a907d13bee2cc2ec152e6bf4a1" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "523ef2906c0a49f7b8f6bd42cdc590c88cbd8f2e23fd3103ab7639831d006a40" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ba69d65522aaac7020b293bbee17f8bb7f94f3cba2d4fbe2a2fd2410b13da7e0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1ead5f57ce8703c3a5f849de31f5de4b95282db40a3d4d9f9f97b52e09caab9d" + sha256 cellar: :any_skip_relocation, sonoma: "f138b2d41d2fe40dba1e18748c362dff2e11f64c6735df7c5a7208f631660689" + sha256 cellar: :any_skip_relocation, ventura: "fd1b184b73148ce28997af38e4090adb1a85d1f724fefc8181fb77c32cf76d46" + sha256 cellar: :any_skip_relocation, arm64_linux: "7cc0e4a4e1dc5ba4039b8ae2ac033e57327d004d8dc9272a8f234ef248b2f799" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1359e72e9f13a895116e7cd58659ca0c03ed92eec6b2fedad0d4f17604d0d3d3" + 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.13" + + def python3 + "python3.13" + 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..d449ffa08df99 --- /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.11.1.tgz" + sha256 "1a7514a25f6568762cbda7a4a8c688682b96981013a1f898dc07dce3df29f0bc" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "dcbba0e4be5749e5fcb7da0e4db1e544fb4a323d98efd0946bb24d5c0b06b149" + 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..17623103b9020 --- /dev/null +++ b/Formula/c/czkawka.rb @@ -0,0 +1,61 @@ +class Czkawka < Formula + desc "Duplicate file utility" + homepage "https://github.com/qarmin/czkawka" + url "https://github.com/qarmin/czkawka/archive/refs/tags/9.0.0.tar.gz" + sha256 "2b2f419e1c733cad763eceb95eff28b1302e0926c247fdfd98e2f29f6f7866ee" + license all_of: ["MIT", "CC-BY-4.0"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "c28c1d127ad049a7ea6ca83b912d198125fd1ff907a6f695512a23698692c235" + sha256 cellar: :any, arm64_sonoma: "af4ae38ba517763f591b5f2ab52b0b3fead5627d2ee80bda8db3db596e2760c4" + sha256 cellar: :any, arm64_ventura: "0e0b5690c9450849adf554fdd0bfb7604160ee8030a3522f038c48d286d86afa" + sha256 cellar: :any, sonoma: "b962385e937d55de3c73bde9ff005a445060683d1eb1fe935cf4796d729c9baa" + sha256 cellar: :any, ventura: "4845dcbc5835c39c85987bebc64eaa14f449b6a36a8d669e8f0799bab7c22cb1" + sha256 cellar: :any_skip_relocation, arm64_linux: "639ef911d5321e575feeb023000967a18e8cd968cdb7e03952e3ddf4bf90d15c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df85cb1e5414b32e3026bd639dab932af37063363e1eb9cf58a8b46d0408f8e7" + end + + depends_on "rust" => :build + depends_on "adwaita-icon-theme" + depends_on "cairo" + 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", *std_cargo_args(path: "czkawka_cli") + system "cargo", "install", *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 + output = shell_output("#{bin}/czkawka_cli dup --directories #{testpath}") + assert_match "Not found any duplicates", output + + 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..f374edf1c7424 --- /dev/null +++ b/Formula/c/czmq.rb @@ -0,0 +1,94 @@ +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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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 + + bottle do + rebuild 1 + 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 155b93aa77e2f..0000000000000 --- a/Formula/c10t.rb +++ /dev/null @@ -1,51 +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 "50bb289bc77fc39bd7fa248be991069cfa63419c8ad74329d3684a965469084d" => :catalina - 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 abd020b2ba321..0000000000000 --- a/Formula/c14-cli.rb +++ /dev/null @@ -1,28 +0,0 @@ -class C14Cli < Formula - desc "Manage your Online C14 archives from the command-line" - homepage "https://github.com/scaleway/c14-cli" - url "https://github.com/scaleway/c14-cli/archive/v0.5.0.tar.gz" - sha256 "b93960ee3ba516a91df9f81cf9b258858f8b5da6238d44a339966a5636643cb2" - license "MIT" - head "https://github.com/scaleway/c14-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "137f585fd6aef342e9ac97ce6ffe819d30641727e7f9d621fa6d0124afeb46f5" => :catalina - sha256 "245dc470e7883100e9b8d3dd229a5fbf2e0960993c7432be11e31ba7ef887f71" => :mojave - sha256 "6b3262c0d209f01dd93a491c541ee7f9fedca9f6ff03203487394e0e4f5cdecf" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-trimpath", "-o", bin/"c14", - "-ldflags", "-X github.com/online-net/c14-cli/pkg/version.GITCOMMIT=homebrew", - "./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 a85a9e562f994..0000000000000 --- a/Formula/c2048.rb +++ /dev/null @@ -1,37 +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" - license "MIT" - head "https://github.com/mevdschee/2048.c.git" - - bottle do - cellar :any_skip_relocation - sha256 "727165d714b210f559b5f5450d6608bed0e7bfbf87c7a7cd5994259b65865411" => :catalina - 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 964a692d5f7cd..0000000000000 --- a/Formula/cabal-install.rb +++ /dev/null @@ -1,35 +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-3.2.0.0/cabal-install-3.2.0.0.tar.gz" - sha256 "a0555e895aaf17ca08453fde8b19af96725da8398e027aa43a49c1658a600cb0" - head "https://github.com/haskell/cabal.git", :branch => "3.2" - - bottle do - cellar :any_skip_relocation - sha256 "7fbdab393a7e9c70d4da3246152d852eb919f1fb6fd45eda6ab9b0326b3516fe" => :catalina - sha256 "11e3cd8f442d083b175f8d4e043f5d232c2593fc8c606551ef65b41b988b9748" => :mojave - sha256 "2946e5b36632d7e33e1312c0597d4858479748ee94eb1a52df9f4869c87eb2a7" => :high_sierra - end - - depends_on "ghc" - uses_from_macos "zlib" - - # Update bootstrap dependencies to work with base-4.13.0.0 - patch :p2 do - url "https://github.com/haskell/cabal/commit/b6f7ec5f3598f69288bddbdba352e246e337fb90.patch?full_index=1" - sha256 "f4c869e74968c5892cd1fa1001adf96eddcec73e03fb5cf70d3a0c0de08d9e4e" - end - - 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 b00a71399c52a..0000000000000 --- a/Formula/cabextract.rb +++ /dev/null @@ -1,34 +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.1.tar.gz" - sha256 "afc253673c8ef316b4d5c29cc4aa8445844bee14afffbe092ee9469405851ca7" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "d60179c028ac5fb69580f2f01cd9f59c1d1544c8f6d84a230a7dd3587f3c27e0" => :catalina - sha256 "cd27b939a0191d4dfff8ae13300b260b5ae01c563a21613718160012a982d5e8" => :mojave - sha256 "c77caa7c32b4320f9e887abeea99261345e83f03e2c321ec9e99ddd9c75f5d98" => :high_sierra - sha256 "c531546af69afda3101f07b509eb143cdaef00f4fdcbdd420e60287508a87e5e" => :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 f8194674755fe..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 "70e045edcdf30456dfcf96777f0f8fa68807d638ec90995b076c4ce47730e5ff" => :catalina - sha256 "7142730e5fa6dd1203d6f34168f85d7704050cf620891a9d0db4f9eefc49370a" => :mojave - sha256 "beafa5ccf84633bed67d405f22ac8e570d2dc2fe0e10fccf8c11076639c672ae" => :high_sierra - sha256 "27bd41bab80ab64fb32e5bc8b568864b874f0dec16817d38c37abd3c7582c694" => :sierra - sha256 "bf3ed6bc9333b43919264913c40a86997a7601a83abf6dcfa1dfe14745b3fc7c" => :el_capitan - sha256 "fe97decdca655899faffd6356bb8ddbb52d4949222690835374c3aeb9a65cdb2" => :yosemite - sha256 "794df46e362f3146b2bab17ba132978609954b0ba0a51ffa4d6d4e8845548764" => :mavericks - 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/cacli.rb b/Formula/cacli.rb deleted file mode 100644 index 7f50bb7b99d3a..0000000000000 --- a/Formula/cacli.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Cacli < Formula - desc "Train machine learning models from Cloud Annotations" - homepage "https://cloud.annotations.ai/" - url "https://github.com/cloud-annotations/training/archive/v1.3.2.tar.gz" - sha256 "9f164636367af848de93459cf0e7919aa099c408e6ad91a58874db6bc9986bfb" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "63f761d1b56137cdb4a2d94e5894c7a43ac28f8d9f7f36c2011da7ea21445c9e" => :catalina - sha256 "6b8148ab93f63cc8342a2b77356c1154d875f710edceacaac4258d36d1ccb108" => :mojave - sha256 "6dbca926050f4ca29a073d05591e818690d9a3d3cae0dffc7d658aab9afef02d" => :high_sierra - end - - depends_on "go" => :build - - def install - cd "cacli" do - project = "github.com/cloud-annotations/training/cacli" - system "go", "build", - "-ldflags", "-s -w -X #{project}/version.Version=#{version}", - "-o", bin/"cacli" - end - end - - test do - # Attempt to list training runs without credentials and confirm that it - # fails as expected. - output = shell_output("#{bin}/cacli list 2>&1", 1).strip - cleaned = output.gsub(/\e\[([;\d]+)?m/, "") # Remove colors from output. - assert_match "FAILED\nNot logged in. Use 'cacli login' to log in.", cleaned - end -end diff --git a/Formula/cadaver.rb b/Formula/cadaver.rb deleted file mode 100644 index 14504191207b6..0000000000000 --- a/Formula/cadaver.rb +++ /dev/null @@ -1,62 +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 5 - - bottle do - sha256 "44367afa090d79665cfc760d44daa172e1489627aaf7b8a125af8701b2b813e4" => :catalina - sha256 "57ebca208464b812e3bbb1df71e68369227d29005a15c990087f7de761007458" => :mojave - sha256 "d828c3a7454ea82ec5e575aebc3f57911ee3f08e45ed64ae1293026fc0ee8380" => :high_sierra - sha256 "2a80f1355db0d31d395596ab4941565af8f3d6dda36952c834e2ebeaadb9d65b" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "neon" - depends_on "openssl@1.1" - depends_on "readline" - - # enable build with the latest neon - patch :DATA - - def install - system "./configure", "--prefix=#{prefix}", - "--with-ssl=openssl", - "--with-libs=#{Formula["openssl@1.1"].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 a7fc5277e9d4b..0000000000000 --- a/Formula/caddy.rb +++ /dev/null @@ -1,80 +0,0 @@ -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/v2.1.1.tar.gz" - sha256 "77beb13b39b670bfe9e0cc1c71b720d5b037cca60e1426a9a485bbfae34ba8d2" - license "Apache-2.0" - head "https://github.com/caddyserver/caddy.git" - - bottle do - cellar :any_skip_relocation - sha256 "7df16c3b4486a906b41875c7f0f3bba6f6483891d390630f9454f8d506c9d94a" => :catalina - sha256 "4f6d47929676c285640e5d1a0153197e6fdc049cbc776f492b12c593701c3585" => :mojave - sha256 "2d08ea709294ac4b08b85dad8e5328b9b3c478ebc9c4d745c0e02d694ee2eb90" => :high_sierra - end - - depends_on "go" => :build - - resource "xcaddy" do - url "https://github.com/caddyserver/xcaddy/archive/v0.1.3.tar.gz" - sha256 "160244a67fca5a9ba448b98f4a94c6023e9ac64e3456a76ceea444d7a1f00767" - 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 - end - - plist_options :manual => "caddy run --config #{HOMEBREW_PREFIX}/etc/Caddyfile" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/caddy - run - --config - #{etc}/Caddyfile - - RunAtLoad - - - - EOS - 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}") - end -end diff --git a/Formula/cadubi.rb b/Formula/cadubi.rb deleted file mode 100644 index 6994b7d478aae..0000000000000 --- a/Formula/cadubi.rb +++ /dev/null @@ -1,21 +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" - license "MIT" - - 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 9404d2df6daf8..0000000000000 --- a/Formula/caf.rb +++ /dev/null @@ -1,44 +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.17.5.tar.gz" - sha256 "a60be1e729de9cf32e2a10335679f311228d8f04997b57d5dcbb508acfe29bed" - head "https://github.com/actor-framework/actor-framework.git" - - bottle do - cellar :any - sha256 "f7edfd696aeb6da9b5648198f012848abcbdcfef7563d33a5dcfa7fa5d00f3e7" => :catalina - sha256 "4e94b6afe4bf7e9c61e368c75348f667168dbdf6d0b1400163e7c9cc83ad1f68" => :mojave - sha256 "7e72d56ec3a0119e2a2d141e1373e1977c2315efcb18b34261af3d863be39331" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - def install - system "./configure", "--prefix=#{prefix}", - "--build-static", - "--no-examples", - "--no-unit-tests", - "--no-opencl" - 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; - }); - } - CAF_MAIN() - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lcaf_core", "-o", "test" - system "./test" - end -end diff --git a/Formula/cafeobj.rb b/Formula/cafeobj.rb deleted file mode 100644 index 39615f6d90873..0000000000000 --- a/Formula/cafeobj.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Cafeobj < Formula - desc "New generation algebraic specification and programming language" - homepage "https://cafeobj.org/" - url "https://cafeobj.org/files/1.6.0/cafeobj-1.6.0.tar.gz" - sha256 "ab97d3cf22d8556524c86540cbb11d4e2eb1ba38cb0198eb068a4493b745d560" - - bottle do - sha256 "d04302998bd8b6885ceafd9506b55cae54d34d2c76ea8da7fc4ba808ecdd51dd" => :catalina - sha256 "712981dcaf889bf309cf4395ebd6745f16189b8c85f2f6f6a99fc2dcc0964256" => :mojave - sha256 "df6fa5ce81c5c6440ee7dab7beddd79559e90749f6e49c6826caeb883b41888c" => :high_sierra - end - - depends_on "sbcl" - - def install - system "./configure", "--with-lisp=sbcl", "--prefix=#{prefix}", "--with-lispdir=#{share}/emacs/site-lisp/cafeobj" - system "make", "install" - end - - test do - system "#{bin}/cafeobj", "-batch" - end -end diff --git a/Formula/caffe.rb b/Formula/caffe.rb deleted file mode 100644 index cee5ad9545574..0000000000000 --- a/Formula/caffe.rb +++ /dev/null @@ -1,71 +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 23 - - bottle do - sha256 "1dd02fe2006ffb88eccbac465ef6764497b0830ba7f578a441d945adb6016fc9" => :catalina - sha256 "bc6d3bc9fc40f06fafd212984844353e55bf95a29fab914601b96d4955a65868" => :mojave - sha256 "546961871e409940874d6ff588b36fd263413df8b46ef9f819d88a2c3755bd63" => :high_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 "https://bintray.com/homebrew/mirror/download_file?file_path=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 - - 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 3eb55af8893b6..0000000000000 --- a/Formula/cairo.rb +++ /dev/null @@ -1,82 +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" - revision 3 - - bottle do - sha256 "6a23a68837269a8410a54950fdc8883feda091f221118370f1bfd3adbf5ee89c" => :catalina - sha256 "0984045234fb22fa3e54a337137e9e43a1bf997f5d77692ed02249dfdee2b1bf" => :mojave - sha256 "5c383ad4625fb1bd15e44e99fba1201490fa478b26178abaca5abb0fdb51510e" => :high_sierra - end - - head do - url "https://anongit.freedesktop.org/git/cairo.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 "lzo" - depends_on "pixman" - - uses_from_macos "zlib" - - 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 fbdcfd1738e0e..0000000000000 --- a/Formula/cairomm.rb +++ /dev/null @@ -1,70 +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" - revision 1 - - bottle do - cellar :any - sha256 "58ce00547bc4f0210b0236b3e3df344b372e801bc129ba32091a5396334af7f8" => :catalina - sha256 "2a77a830256c2da441f636fddbdc2bd4ad390e920fc223b4ea33821ec1265195" => :mojave - sha256 "08a29b621ee8173cb17452f2e7a62adb83a60a65f0758cab545ddc0c53ecf681" => :high_sierra - sha256 "1845ba3e5dd9364551980e16b446620e4088f1fe90517b5af7cd81435b60cc08" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "libpng" - depends_on "libsigc++@2" - - 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++@2"] - 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 403e540ee1e41..0000000000000 --- a/Formula/cake.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Cake < Formula - # As discussed with chenrui333 in this PR: https://github.com/Homebrew/homebrew-core/pull/55500#issuecomment-636390974 - # Cake uses the pre-release setting on all releases. This will change - # once we ship version 1.0.0, which is likely going to be our next release. - desc "Cross platform build automation system with a C# DSL" - homepage "https://cakebuild.net/" - url "https://github.com/cake-build/cake/releases/download/v0.38.4/Cake-bin-net461-v0.38.4.zip" - sha256 "95629cf444d6c07ad79b60a390fa9c2ef22bd8fef113cb82018de245ce09b659" - license "MIT" - - 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 e3130d545f71a..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.2.1-99/xmlcalabash-1.2.1-99.zip" - sha256 "7dde0a5bd5dc2471d866efa3e4b5a4c456aa1acabe8e1b441abfd4b1c51f4279" - - 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 d2210dec87e09..0000000000000 --- a/Formula/calc.rb +++ /dev/null @@ -1,40 +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" - revision 1 - - bottle do - sha256 "d78863a41409a2e3eaee0b8e4c5eb21a84ee28f1c3f8a27545d6e1f3fe3ae213" => :catalina - sha256 "1b4e5456d4965f8b74c120590070f74896c1fca85c8aa30354ffe519c1755600" => :mojave - sha256 "7614247fc707caf03a96e302ab2e1324f6a3609cfd1cdd7c6389bca77511ff18" => :high_sierra - sha256 "c31e4ac4a08ff6f1803cfcbe2d90a2634737ed69f4c38538f7ba77fc6a3e6728" => :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/calceph.rb b/Formula/calceph.rb deleted file mode 100644 index d0a3fab8ad54b..0000000000000 --- a/Formula/calceph.rb +++ /dev/null @@ -1,46 +0,0 @@ -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-3.4.5.tar.gz" - sha256 "e1b9076b49fee51f7efda22194c8b66aaeebedbdb41d731c5af2cd0b16b39b56" - - bottle do - cellar :any - sha256 "d05d76368447fbaef129c9ffa993fb9e8ba948884c6b9409e2282953f887dbfe" => :catalina - sha256 "4147bd6caffd7f2f03731420d9d2bf4db2123f9ce605a920630dca26ac711afe" => :mojave - sha256 "ce583c86b55ca06a9c05b13e81fb096502e261513427c100f46d2c298a8bf98e" => :high_sierra - end - - depends_on "gcc" # for gfortran - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"testcalceph.c").write <<~EOS - #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; - } - EOS - system ENV.cc, "testcalceph.c", "-L#{lib}", "-lcalceph", "-o", "testcalceph" - system "./testcalceph" - end -end diff --git a/Formula/calcurse.rb b/Formula/calcurse.rb deleted file mode 100644 index 9d46450c45fbb..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.6.0.tar.gz" - sha256 "fa090307a157e24e790819b20c93e037b89c6132f473abaaa7b21c3be76df043" - license "BSD-2-Clause" - head "https://git.calcurse.org/calcurse.git" - - bottle do - sha256 "21cb64443bbffe19f0adb8dfc8f5e49eabed5fc5c0347215bbb7aa3383126719" => :catalina - sha256 "0d114c613163c192e9f156750ffa9c3c9a4a303c103a7bc7091c369da151a4c4" => :mojave - sha256 "41886cc820da1133c6c5f57fea4f9fbe072a0735e3ef8522a9301736216f4e70" => :high_sierra - 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 6b2a252275066..0000000000000 --- a/Formula/calicoctl.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Calicoctl < Formula - desc "Calico CLI tool" - homepage "https://www.projectcalico.org/" - url "https://github.com/projectcalico/calicoctl.git", - :tag => "v3.15.0", - :revision => "7987fc57ae19d529c1289521f2e6371df90e2a4c" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "8de790a124ab604ed37a27516adc4037fd556b418798e7bcb0fb71658520c831" => :catalina - sha256 "cc705142d894a3eb3e0385b0dfb4b892214a7655c08ef76751bc3907b9adbed8" => :mojave - sha256 "d46e338642a4c1056cd4b16e10fd80415c8519364072c303f4b3a2c36946ccd7" => :high_sierra - end - - depends_on "go" => :build - - def install - commands = "github.com/projectcalico/calicoctl/calicoctl/commands" - system "go", "build", *std_go_args, - "-ldflags", "-X #{commands}.VERSION=#{stable.specs[:tag]} " \ - "-X #{commands}.GIT_REVISION=#{stable.specs[:revision][0, 8]} " \ - "-s -w", - "calicoctl/calicoctl.go" - 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 2624f885f3264..0000000000000 --- a/Formula/camellia.rb +++ /dev/null @@ -1,36 +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 "c7d2e77a15331cebfeff928b67bd32ee5b0a9325ac5cbea022b2c6ddbe585ff6" => :catalina - 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 - - test do - (testpath/"test.cpp").write <<~EOS - #include "camellia.h" - int main() { - CamImage image; // CamImage is an internal structure of Camellia - return 0; - } - EOS - - system ENV.cc, "-I#{include}", "-L#{lib}", "-lcamellia", "-o", "test", "test.cpp" - system "./test" - end -end diff --git a/Formula/camlp5.rb b/Formula/camlp5.rb deleted file mode 100644 index 7a957aad00de6..0000000000000 --- a/Formula/camlp5.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Camlp5 < Formula - desc "Preprocessor and pretty-printer for OCaml" - homepage "https://camlp5.github.io/" - url "https://github.com/camlp5/camlp5/archive/rel712.tar.gz" - version "7.12" - sha256 "fc4b50b9d917c2f844b909bdfd55735f3f658e32a415f0decc1c265bf3af42be" - head "https://github.com/camlp5/camlp5.git" - - bottle do - sha256 "37dddf4bb25b87697f67da03bafce93b5ed258468e4ca3381f92a76a76c1b956" => :catalina - sha256 "b2fddd39a3d20529598983ab9a1b1b80c86e228111e613501a71a223bf0d5694" => :mojave - sha256 "ab802383d18fa5a34dc9dc1abd3d264c006693df3205a53c4be17cca6e5f223d" => :high_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 - ocaml = Formula["ocaml"] - (testpath/"hi.ml").write "print_endline \"Hi!\";;" - assert_equal "let _ = print_endline \"Hi!\"", - # The purpose of linking with the file "bigarray.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/pr_o.cmo " \ - "#{ocaml.opt_lib}/ocaml/bigarray.cma 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 615f44fb9b56d..0000000000000 --- a/Formula/capnp.rb +++ /dev/null @@ -1,32 +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.8.0.tar.gz" - sha256 "d1f40e47574c65700f0ec98bf66729378efabe3c72bc0cda795037498541c10d" - head "https://github.com/capnproto/capnproto.git" - - bottle do - cellar :any_skip_relocation - sha256 "741c2079361cdb5881a60684190bc4aa98ff9cc6f8d29aa46880e809ac1b06c3" => :catalina - sha256 "f389012b8211b70af4fa7d2eed8db8ad399ef2bdc98e286fb57a4b1beb93dfe4" => :mojave - sha256 "9c3beb8d8db3b372e4d2fd07d99a553fde6ff53824c6cfec82c3db41e212bc5b" => :high_sierra - end - - depends_on "cmake" => :build - - 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 shell_output("#{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 bbcce6b7c4965..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.2.tar.gz" - sha256 "7c81d798022f81e7507f1a60d6817f63aa76e489aa4e7055255f21a22f5e526a" - head "https://github.com/aquynh/capstone.git", :branch => "next" - - bottle do - cellar :any - sha256 "b434ee96e9d7c413e289340b280705a6c3b9929cf1859de865d88bc012c34396" => :catalina - sha256 "c90885740ef54af155c2a0151dc85f728a3aa7ca304a45510e5524ac7fecb7fc" => :mojave - sha256 "c6d974a3c237fc36bfea2042d95551f2be7197d37fc0df6c7b9ea2179cd01084" => :high_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-c.rb b/Formula/cargo-c.rb deleted file mode 100644 index ef9b23683220f..0000000000000 --- a/Formula/cargo-c.rb +++ /dev/null @@ -1,36 +0,0 @@ -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/v0.6.8.tar.gz" - sha256 "ca8cb5e08b0ba5b6eccea1481854829e1b411ebb9885be891a897c27b5a76cba" - license "MIT" - - bottle do - cellar :any - sha256 "c4b83b9a8932ab1c15706585dda3ec88b75c966c967a25661f479150e4c29d20" => :catalina - sha256 "97f34a38dae6ffe05ff7b03fda5c6fd8db83a23acd6d2d19abd4b50306d2a022" => :mojave - sha256 "2633e4edabee4b62a5959a068022356e914db735201437b9c813cc19d58b6bdb" => :high_sierra - end - - depends_on "rust" => :build - depends_on "libgit2" - depends_on "libssh2" - depends_on "openssl@1.1" - - on_linux do - depends_on "pkg-config" => :build - end - - def install - ENV["LIBGIT2_SYS_USE_PKG_CONFIG"] = "1" - ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" - - system "cargo", "install", *std_cargo_args - end - - test do - 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) - end -end diff --git a/Formula/cargo-instruments.rb b/Formula/cargo-instruments.rb deleted file mode 100644 index 88be327c7d810..0000000000000 --- a/Formula/cargo-instruments.rb +++ /dev/null @@ -1,26 +0,0 @@ -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/v0.3.1.tar.gz" - sha256 "55a71300045a689b9a416a4367b0c1f6823c5bc837156e774bfd52eba105726f" - license "MIT" - - bottle do - cellar :any - sha256 "570ef6a76ad8b73cec931652ce50375dc3a334ed5b9f59a0120d52f4c677b5f8" => :catalina - sha256 "fd54b752b6dcacb30b861039f6a16109ca83072966651f0f62a50dc0e45c4360" => :mojave - sha256 "7cf3cf504a8ef58922cd115a26d0cda9b922d23f29f53d1a2aece21c855e846a" => :high_sierra - end - - depends_on "rust" => :build - depends_on "openssl@1.1" - - 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/carina.rb b/Formula/carina.rb deleted file mode 100644 index 25281e81ae392..0000000000000 --- a/Formula/carina.rb +++ /dev/null @@ -1,40 +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" - license "Apache-2.0" - head "https://github.com/getcarina/carina.git" - - bottle do - cellar :any_skip_relocation - sha256 "5dbb4ecd46d4ad1c33e7eea143dc2a0e56c85674a5e372e66f80b895375fbf13" => :catalina - 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 dc2e7f43bb450..0000000000000 --- a/Formula/carla.rb +++ /dev/null @@ -1,34 +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/v2.1.1.tar.gz" - sha256 "8611d6fc579ea55ab205cfb72571eb304da9ef997e7bbae5af5a339ef533d5d9" - head "https://github.com/falkTX/Carla.git" - - bottle do - cellar :any - sha256 "9d9d212871ff2695aa40bd5bca4e412f0e0e02011c800b3517ffd72722095536" => :catalina - sha256 "ee7af2de53e609f1ccf66149c6935bf638b02fd4c1a3affa0233e14a5553abcd" => :mojave - sha256 "a7787f941d9bda79e49d47d4fc8ee9e1f5fe8d559c10b93aec0e8d4dfe174d20" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "fluid-synth" - depends_on "liblo" - depends_on "libmagic" - depends_on "pyqt" - depends_on "python@3.8" - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - - inreplace bin/"carla", "PYTHON=$(which python3 2>/dev/null)", - "PYTHON=#{Formula["python@3.8"].opt_bin}/python3" - 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 6e1c6200d031e..0000000000000 --- a/Formula/carrot2.rb +++ /dev/null @@ -1,57 +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.3/carrot2-dcs-3.16.3.zip" - sha256 "653221f8d11a5712f6889555110ffb4b8eab9ba1ac042cb35a5a16f4531e5ee1" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"] - bin.install libexec/"dcs.sh" => "carrot2" - inreplace bin/"carrot2", "java", "cd #{libexec} && exec '#{Formula["openjdk"].opt_bin}/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" - port = free_port - begin - pid = fork { exec testpath/"bin/carrot2", "-port", port.to_s } - sleep 5 - assert_match /data mining/m, - shell_output("curl -s -F dcs.c2stream=@#{libexec}/examples/shared/data-mining.xml " \ - "http://localhost/#{port}/dcs/rest") - ensure - Process.kill "INT", pid - end - end -end diff --git a/Formula/carthage.rb b/Formula/carthage.rb deleted file mode 100644 index 5797bae6767d0..0000000000000 --- a/Formula/carthage.rb +++ /dev/null @@ -1,37 +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.35.0", - :revision => "c7550f832f23d2c00bf0c014351719839593c641", - :shallow => false - head "https://github.com/Carthage/Carthage.git", :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "fdaacafff1566fa7b1e42e68e108da69aa7578dc82f4736272dca10283c9cba2" => :catalina - sha256 "1da29ca0b1d8e79bec5e548f5ab2433890ebc3fc9007f5fdb70d9e3be281dbb7" => :mojave - sha256 "130fcb9bc06ef8e7f1c5ac9af0d155bd347db039b2cf80fa0fef764b3627ffbf" => :high_sierra - end - - depends_on :xcode => ["10.0", :build] - - patch do - # Fix erroneously re-throwing reduce (on Swift 5.3 pre-release) - # https://github.com/Carthage/Carthage/commit/a33d3483b31e28e0488ea51e3efb6b44025f1b5f - url "https://github.com/Carthage/Carthage/commit/a33d3483b31e28e0488ea51e3efb6b44025f1b5f.diff?full_index=1" - sha256 "75610a77cafbf447ea040d8dea1a4beb626944c577351ea5435ab5e8dda71b1c" - end - - 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/carton.rb b/Formula/carton.rb deleted file mode 100644 index 97158813ac68a..0000000000000 --- a/Formula/carton.rb +++ /dev/null @@ -1,184 +0,0 @@ -class Carton < Formula - desc "Bundler or pip freeze for Perl" - homepage "https://github.com/perl-carton/carton" - url "https://github.com/perl-carton/carton/archive/v1.0.34.tar.gz" - sha256 "c55d9e25b39fe7cfa5d9c5fac4b75572b4965b1ea1588ba97a37f1ade3a0c517" - - bottle do - cellar :any_skip_relocation - sha256 "d8b5829c89ed7530695a96fa3bdd0b555513bf3a83bc7e63370c53d39d69e083" => :catalina - sha256 "51128a93ea1037f16e65d4444354a6e643fe43ad13b921a7b108275280a472e6" => :mojave - sha256 "920440d30498e6af034f2cc62b9de1183a013c91a16ce2ea8cbd8b68da4eb68f" => :high_sierra - 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.006.tar.gz" - sha256 "2efcbd31528be51d3022c616768558b78c6172df5f03c5dc698939f65488cb4e" - 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.23.tar.gz" - sha256 "b79dc2244b2d97b6f27167fc3b7799ef61a179040f3abd76ce1e0a3b0bc4e078" - 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.16.tar.gz" - sha256 "1a3318b89987c2aa5dd18990a109e8af63049f87e4e1a9357583beed1c3bfbda" - 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.42.tar.gz" - sha256 "e7f6c70932b86eb4a2426569e33d2b651b52a24e5d0c0dcb3849d045b52c736c" - end - - resource "Path::Tiny" do - url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Path-Tiny-0.114.tar.gz" - sha256 "cd0f88f37a58fc3667ec065767fe01e73ee6efa18a112bfd3508cf6579ca00e1" - 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 "Test::Requires" do - url "https://cpan.metacpan.org/authors/id/T/TO/TOKUHIROM/Test-Requires-0.11.tar.gz" - sha256 "4b88de549597eecddf7c3c38a4d0204a16f59ad804577b671896ac04e24e040f" - 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.30.tar.gz" - sha256 "da5bd0d5c903519bbf10bb9ba0cb7bcac0563882bcfe4503aee3fb143eddef6b" - end - - resource "URI" do - url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-1.76.tar.gz" - sha256 "b2c98e1d50d6f572483ee538a6f4ccc8d9185f91f0073fd8af7390898254413e" - 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.000024.tar.gz" - sha256 "2e9b917bd48a0615e42633b2a327494e04610d8f710765b9493d306cead98a05" - 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 libexec/"man/man1/carton.1" - man3.install 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/cartridge-cli.rb b/Formula/cartridge-cli.rb deleted file mode 100644 index 09e8dd28fad4d..0000000000000 --- a/Formula/cartridge-cli.rb +++ /dev/null @@ -1,36 +0,0 @@ -class CartridgeCli < Formula - desc "Tarantool Cartridge command-line utility" - homepage "https://tarantool.org/" - url "https://github.com/tarantool/cartridge-cli.git", - :tag => "2.0.1", - :revision => "fa094aae41e72192c9f84291482bc77334b1f934" - - bottle do - cellar :any_skip_relocation - sha256 "512eddc42e90a1a83dd621937a88898586810276b1bdf6774a53b93e001b4591" => :catalina - sha256 "5ea8de300c3f17ddfadcbc5c2d5d8b5b678067ce209094a9181e84366a0a4b2e" => :mojave - sha256 "dd35ee608765bdb6bb5c29467058df59bd184927183ae9cac00c175e597be1e3" => :high_sierra - end - - depends_on "go" => :build - - def install - commit = Utils.safe_popen_read("git", "rev-parse", "--short", "HEAD").chomp - - ldflags = %W[ - -s -w - -X github.com/tarantool/cartridge-cli/cli/version.gitTag=#{version} - -X github.com/tarantool/cartridge-cli/cli/version.gitCommit=#{commit} - ] - - system "go", "build", "-o", bin/"cartridge", "-ldflags", ldflags.join(" "), "cli/main.go" - end - - test do - project_path = Pathname("test-project") - project_path.rmtree if project_path.exist? - system bin/"cartridge", "create", "--name", project_path - assert_predicate project_path, :exist? - assert_predicate project_path.join("init.lua"), :exist? - end -end diff --git a/Formula/cash-cli.rb b/Formula/cash-cli.rb deleted file mode 100644 index d17c50a77683c..0000000000000 --- a/Formula/cash-cli.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "language/node" - -class CashCli < Formula - desc "Convert currency rates directly from your terminal" - homepage "https://github.com/xxczaki/cash-cli" - url "https://registry.npmjs.org/cash-cli/-/cash-cli-4.2.1.tgz" - sha256 "593e2b02aab0e4369225a2c78a895d511ee491a1708e44d7aba63d9a897b000e" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "f22f6404f47adb8a6c0253362d61fb529da4d6a71045a2902407ed112329310d" => :catalina - sha256 "7aa6e66eef5defae364924b00859ad4d884a15563c52488462ab489676f02141" => :mojave - sha256 "903fde1135bcc71b70d74b852084897a2708f1d87ad00c200c793600472c42aa" => :high_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_match "Conversion of USD 100", shell_output("#{bin}/cash 100 USD PLN CHF") - end -end diff --git a/Formula/cask.rb b/Formula/cask.rb deleted file mode 100644 index faca88eaec0f5..0000000000000 --- a/Formula/cask.rb +++ /dev/null @@ -1,33 +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" - license "GPL-3.0" - 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-cpp-driver.rb b/Formula/cassandra-cpp-driver.rb deleted file mode 100644 index e75ff42f54045..0000000000000 --- a/Formula/cassandra-cpp-driver.rb +++ /dev/null @@ -1,64 +0,0 @@ -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/2.15.2.tar.gz" - sha256 "d69a51f2a40da6c450acd95102c2c4693baeae8327cd60aaf4548b23696508ca" - license "Apache-2.0" - head "https://github.com/datastax/cpp-driver.git" - - bottle do - cellar :any - sha256 "25abbbd19f8ff6ab026f3ccccd466da53e1daeeb52550c85211e833547e4c4aa" => :catalina - sha256 "49b53bff19ed2897ab07d47bb9db03697a659b55e007c0db0b8d2f0ef70dcb78" => :mojave - sha256 "0b5b67f7208a2491fa77f5393d993f36e76b23af72d848806b364a2e707c0091" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libuv" - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - on_linux do - depends_on "pkg-config" => :build - end - - def install - Dir.mkdir "build" - Dir.chdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #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; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lcassandra", "-o", "test" - assert_equal "connection failed", shell_output("./test") - end -end diff --git a/Formula/cassandra-reaper.rb b/Formula/cassandra-reaper.rb deleted file mode 100644 index 24e556c235414..0000000000000 --- a/Formula/cassandra-reaper.rb +++ /dev/null @@ -1,28 +0,0 @@ -class CassandraReaper < Formula - desc "Management interface for Cassandra" - homepage "https://cassandra-reaper.io/" - url "https://github.com/thelastpickle/cassandra-reaper/releases/download/1.3.0/cassandra-reaper-1.3.0-release.tar.gz" - sha256 "79c190c51c3404c2efc7f7f1aafa7cfd91f2280cbb1fe719e668966836904efd" - license "Apache-2.0" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - prefix.install "bin" - share.install "server/target" => "cassandra-reaper" - etc.install "resource" => "cassandra-reaper" - end - - test do - pid = fork do - exec "#{bin}/cassandra-reaper" - end - sleep 10 - output = shell_output("curl -Im3 -o- http://localhost:8080/webui/") - assert_match /200 OK.*/m, output - ensure - Process.kill("KILL", pid) - end -end diff --git a/Formula/cassandra.rb b/Formula/cassandra.rb deleted file mode 100644 index 09d56a9d148b2..0000000000000 --- a/Formula/cassandra.rb +++ /dev/null @@ -1,169 +0,0 @@ -class Cassandra < Formula - desc "Eventually consistent, distributed key-value store" - homepage "https://cassandra.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=cassandra/3.11.6/apache-cassandra-3.11.6-bin.tar.gz" - mirror "https://archive.apache.org/dist/cassandra/3.11.6/apache-cassandra-3.11.6-bin.tar.gz" - sha256 "ce34edebd1b6bb35216ae97bd06d3efc338c05b273b78267556a99f85d30e45b" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "8793318a2a51b4a285292135b40de6431a8e21557a18b228af6f744a02d84c9e" => :catalina - sha256 "931d04afa49cd31fbac71ad11a3155742871ee20d0d8adf0c0cbb1e28dc54871" => :mojave - sha256 "d0dd5acf5b7e782da36f19103b7c1e8be7746957d3ee2126e1988d5aed7f5fc2" => :high_sierra - end - - depends_on "cython" => :build - depends_on :macos # Due to Python 2 (https://issues.apache.org/jira/browse/CASSANDRA-10190) - - # Only >=Yosemite has new enough setuptools for successful compile of the below deps. - resource "setuptools" do - url "https://files.pythonhosted.org/packages/c2/f7/c7b501b783e5a74cf1768bc174ee4fb0a8a6ee5af6afa92274ff964703e0/setuptools-40.8.0.zip" - sha256 "6e4eec90337e849ade7103723b9a99631c1f0d19990d6e8412dc42f5ae8b304d" - 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/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - 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/31/07/2423f77878559593ef17175ef2e0372dc91994368b15c6a47fca40b416ea/cassandra-driver-3.16.0.tar.gz" - sha256 "42bcb167a90da6604081872ef609a327a63273842da81120fc462de031155abe" - 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 - resources.each do |r| - 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_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\"" - 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 5cbbfc9ca86d1..0000000000000 --- a/Formula/cassandra@2.1.rb +++ /dev/null @@ -1,137 +0,0 @@ -class CassandraAT21 < Formula - desc "Distributed key-value store" - homepage "https://cassandra.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=cassandra/2.1.21/apache-cassandra-2.1.21-bin.tar.gz" - mirror "https://archive.apache.org/dist/cassandra/2.1.21/apache-cassandra-2.1.21-bin.tar.gz" - sha256 "992080ce42bb90173b1a910edffadc7f917b5a6e598db5154ff32ae8e2d00ad3" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "ba43927921cfc8c4540736eec7472dcb5fb78efbd0fb7e948df64cedc243d2b5" => :catalina - sha256 "cbe96bf658b154f84a1ad7188ca3ea667f3f3201e46452f2e95f8d4a1c946af8" => :mojave - sha256 "7a0183c65df7ad2f04c6d53f781150af2540d52a80d4f349e59087d35c418399" => :high_sierra - end - - keg_only :versioned_formula - - depends_on :macos # Due to 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 9069365e18a5c..0000000000000 --- a/Formula/cassandra@2.2.rb +++ /dev/null @@ -1,138 +0,0 @@ -class CassandraAT22 < Formula - desc "Eventually consistent, distributed key-value db" - homepage "https://cassandra.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=cassandra/2.2.16/apache-cassandra-2.2.16-bin.tar.gz" - mirror "https://archive.apache.org/dist/cassandra/2.2.16/apache-cassandra-2.2.16-bin.tar.gz" - sha256 "827474c965242be4788beefa3e28d05d909e0bb068e03b65c73f1669796ddb84" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "da62e2b0ecaecaa18153a41a4dfd7e4d3430e46e6b8b48fcc1e8af70e01a60dd" => :catalina - sha256 "4dd86f0e2a8966109ea77ac5003898c604f1c1239138588c2fded53eb9ac7302" => :mojave - sha256 "34f2cf7cd565fbfabfbea6137859835dad092935c47df06391eca2824f9c4552" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "cython" => :build - depends_on :macos # Due to 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/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 => "#{HOMEBREW_PREFIX}/opt/cassandra@2.2/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/cassowary.rb b/Formula/cassowary.rb deleted file mode 100644 index b6297bbaa6999..0000000000000 --- a/Formula/cassowary.rb +++ /dev/null @@ -1,29 +0,0 @@ -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/v0.11.0.tar.gz" - sha256 "60d1bc68b75a59bc5511fd33eb77b14acd735887c74af1bbc4ea68badd271606" - license "MIT" - head "https://github.com/rogerwelin/cassowary.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "3a6e5b9679a3c5da70142d98eddb6825cb51ba69581e21a485a16c09f56de5f4" => :catalina - sha256 "e8ee2d0e616f89a395ed1e6b881a4c7f29529ebccd1524af9bb3ba2a23364106" => :mojave - sha256 "2b723e48851feba06f504d2c5ddd51314c619509df0a380cdd286e439ff35c07" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", *std_go_args, "./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/castxml.rb b/Formula/castxml.rb deleted file mode 100644 index 9395a2285413d..0000000000000 --- a/Formula/castxml.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Castxml < Formula - desc "C-family Abstract Syntax Tree XML Output" - homepage "https://github.com/CastXML/CastXML" - url "https://github.com/CastXML/CastXML/archive/v0.3.4.tar.gz" - sha256 "a597ef37fe2b43fe3cf2c0c4e2ed0069d5aba2714016c319ac47787760859df4" - license "Apache-2.0" - head "https://github.com/CastXML/castxml.git" - - bottle do - cellar :any - sha256 "2cca1b4b5c7298f2e385a5d24f0c507fde75691d70bb45fdc4e52092c02356da" => :catalina - sha256 "5eab772fc46e134783b1339b365c894bae9d2a15d714579206fb9a92a6c63964" => :mojave - sha256 "65232354608516831cd91b5e705e12551b09a6df773fbce9475fa609d3cefc32" => :high_sierra - 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 5007a0026a524..0000000000000 --- a/Formula/cataclysm.rb +++ /dev/null @@ -1,70 +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.E.tar.gz" - version "0.E" - sha256 "b0af9a9292929e17332edcea770bca9a91f1d08ea47726d78a47e09281a42fa3" - head "https://github.com/CleverRaven/Cataclysm-DDA.git" - - bottle do - cellar :any - sha256 "bbd96abbc2ac1ddfabb2ab2febff1b0653d95210b84e6ea8a1dec73a530d8647" => :catalina - sha256 "c2c44f2a965153e4258c8c3daf6772bd7f5c9935320d2e1975cb63fb6909f095" => :mojave - sha256 "1eb07ba0e992116ae94d8b380d520139d686997e6700834f2db4bb1cded1401f" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "libogg" - depends_on "libvorbis" - depends_on "sdl2" - depends_on "sdl2_image" - depends_on "sdl2_mixer" - depends_on "sdl2_ttf" - - def install - args = %W[ - NATIVE=osx - RELEASE=1 - OSX_MIN=#{MacOS.version} - USE_HOME_DIR=1 - TILES=1 - SOUND=1 - RUNTESTS=0 - ASTYLE=0 - LINTJSON=0 - ] - - 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 - # make user config directory - user_config_dir = testpath/"Library/Application Support/Cataclysm/" - user_config_dir.mkpath - - # run cataclysm for 7 seconds - pid = fork do - exec bin/"cataclysm" - end - sleep 7 - 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" - ensure - Process.kill("TERM", pid) - end -end diff --git a/Formula/catch2.rb b/Formula/catch2.rb deleted file mode 100644 index 519c0093eefac..0000000000000 --- a/Formula/catch2.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Catch2 < Formula - desc "Modern, C++-native, header-only, test framework" - homepage "https://github.com/catchorg/Catch2" - url "https://github.com/catchorg/Catch2/archive/v2.12.4.tar.gz" - sha256 "5436725bbc6ee131a0bc9545bef31f0adabbb21fbc39fb6f1b2a42c12e4f8107" - license "BSL-1.0" - - bottle do - cellar :any_skip_relocation - sha256 "7405839bc33f35be20565a1653bc112789d0ff0ba3daeff5e9846e1f80fc76f9" => :catalina - sha256 "7405839bc33f35be20565a1653bc112789d0ff0ba3daeff5e9846e1f80fc76f9" => :mojave - sha256 "6b886c94c3f56a9bd999eebf6140c7a62729fc9e8e4a110495f3e06d640abcf6" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", "-DBUILD_TESTING=OFF", *std_cmake_args - system "cmake", "--build", ".", "--target", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #define CATCH_CONFIG_MAIN - #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); - } - } - EOS - system ENV.cxx, "test.cpp", "-std=c++11", "-o", "test" - system "./test" - end -end diff --git a/Formula/catimg.rb b/Formula/catimg.rb deleted file mode 100644 index 57c66a8667aad..0000000000000 --- a/Formula/catimg.rb +++ /dev/null @@ -1,27 +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.6.0.tar.gz" - sha256 "53d6cbb5844424a4e8422b54c873c301c5ad0f286249c73b2e1a790dda991a3b" - license "MIT" - head "https://github.com/posva/catimg.git" - - bottle do - cellar :any_skip_relocation - sha256 "5388da00655624b77735420cc87607ade50709aed7141341dcd78d1ca09f327e" => :catalina - sha256 "c969dbc14fe8778d997abe119365a9a5b72a5192a2a73724edf820f4cc3d73c6" => :mojave - sha256 "afc3fe119461f26efece013456a43798b2898e4c903d80e37998222081e7699f" => :high_sierra - sha256 "2a7088bcac247d0dde972240369c4e7708511072f95e4bf43e3a1e2daa8e4e30" => :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 005faa88e79c9..0000000000000 --- a/Formula/cattle.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Cattle < Formula - desc "Brainfuck language toolkit" - homepage "https://kiyuko.org/software/cattle" - url "https://kiyuko.org/software/cattle/releases/cattle-1.4.0.tar.xz" - sha256 "9ba2d746f940978b5bfc6c39570dde7dc55d5b4d09d0d25f29252d6a25fb562f" - license "GPL-2.0" - - bottle do - sha256 "d721fea1c78f6b79eb7ae7e325442e276638919bdef0a21604e910501d4cc67f" => :catalina - sha256 "7ce0b67200025300e8e326dc890c79b94be12b627ebc4bbf230ae64437aa286d" => :mojave - sha256 "43b809e209b52621c0ac66810b751a22f43d1718f75f41c9c0364d6ecb762b83" => :high_sierra - 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 - - mkdir "build" do - system "../configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - 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/cayley.rb b/Formula/cayley.rb deleted file mode 100644 index 2c10af9de34b6..0000000000000 --- a/Formula/cayley.rb +++ /dev/null @@ -1,103 +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.git", - :tag => "v0.7.7", - :revision => "dcf764fef381f19ee49fad186b4e00024709f148" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "7fe446d8eaa6ed43ae226027feec3878e437708d4a59c5aab761ab249bc9ba56" => :catalina - sha256 "7084bd5b3b7dc66c9c50266f2831951f995901f2a326905c760646ebe66a3b96" => :mojave - sha256 "0dc598decbc9c70660d22fc670f71581e7fec09e5c9d9bc13ccee4c88c758338" => :high_sierra - end - - depends_on "bazaar" => :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" - - commit = Utils.safe_popen_read("git", "rev-parse", "--short", "HEAD").chomp - - ldflags = %W[ - -s -w - -X github.com/cayleygraph/cayley/version.Version=#{version} - -X github.com/cayleygraph/cayley/version.GitHash=#{commit} - ] - - # Build the binary - system "go", "build", "-o", bin/"cayley", "-ldflags", ldflags.join(" "), "./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 - - plist_options :manual => "cayley http --config=#{HOMEBREW_PREFIX}/etc/cayley.conf" - - def plist - <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/cayley - http - --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") - - 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/cbmbasic.rb b/Formula/cbmbasic.rb deleted file mode 100644 index 85942bc2ff5c1..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 "f4e101b38bb21ff46ce301f2c9a0f59f567df9a3265c4906969f1e4426160d9c" => :catalina - sha256 "c922c6bd9691307444d7c28ebe9d09299aa43efc7987e30f23bad572f990c81d" => :mojave - sha256 "99490e603e86319b7c4307657bf58511dacb801dddb30ed7c4269feaa19eb6bc" => :high_sierra - sha256 "018c1d1fa3050bdbd88c092f19c1ca787098ea1183e1227671507af3fca07b52" => :sierra - sha256 "92762d9b7f5f21190b98d23e7fedf787cccc14e1c82699b60036948beaf1e7d1" => :el_capitan - sha256 "d7285a8376e20ac008e51814a97f155f8ac80ce94a809c953ee63932a1d2c1d7" => :yosemite - sha256 "ffe1126f8e12f15471abadf280fa83b8e77770170749805a28fdaa1a1adf51b0" => :mavericks - 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/cbmc.rb b/Formula/cbmc.rb deleted file mode 100644 index 0c29b8808fe72..0000000000000 --- a/Formula/cbmc.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Cbmc < Formula - desc "CBMC: The C Bounded Model Checker" - homepage "https://www.cprover.org/cbmc/" - url "https://github.com/diffblue/cbmc.git", - :using => :git, - :tag => "cbmc-5.12.2", - :revision => "7405bfb6d6971ab53e430e553910b940522213ed" - - bottle do - cellar :any_skip_relocation - sha256 "bd44770d72509e90122d012d175fa7c0d4a96c306c2ce83da16b4289c628a1fb" => :catalina - sha256 "076ff439d06a93e350aa5cc1c9e18d34af12ba2caa5df716e68103328b509346" => :mojave - sha256 "0cc700306db145c37019af3b178285751c9af4450e55d22cc78ed2506e7390ab" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "maven" => :build - depends_on "openjdk" => :build - - def install - system "git", "submodule", "update", "--init" - - # Build CBMC - system "cmake", "-S.", "-Bbuild", *std_cmake_args - system "cmake", "--build", "build" - cd "build" do - system "make", "install" - end - end - - test do - # Find a pointer out of bounds error - (testpath/"main.c").write <<~EOS - #include - int main() { - char *ptr = malloc(10); - char c = ptr[10]; - } - EOS - assert_match "VERIFICATION FAILED", - shell_output("#{bin}/cbmc --pointer-check main.c", 10) - end -end diff --git a/Formula/cc65.rb b/Formula/cc65.rb deleted file mode 100644 index 630166b483189..0000000000000 --- a/Formula/cc65.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Cc65 < Formula - desc "6502 C compiler" - homepage "https://cc65.github.io/cc65/" - url "https://github.com/cc65/cc65/archive/V2.18.tar.gz" - sha256 "d14a22fb87c7bcbecd8a83d5362d5d317b19c6ce2433421f2512f28293a6eaab" - license "Zlib" - head "https://github.com/cc65/cc65.git" - - bottle do - sha256 "8f64703adec128eede5e3a980d1898e2b13ed87441ef7fdb5d41400850b82989" => :catalina - sha256 "a84e72ecee825a41a9614a7563df24418d5173ff13ff767adf2a924e28b00fcb" => :mojave - sha256 "2fecec53d0f65fc2ae409fc29516207cf11377e6726574087da4f06502e10770" => :high_sierra - sha256 "e4bf2981ea6489e414bf2166f6e591612b2e589aa30a3beaab1fd0d7a2ca1207" => :sierra - 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 06b591c955d1f..0000000000000 --- a/Formula/ccache.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Ccache < Formula - desc "Object-file caching compiler wrapper" - homepage "https://ccache.dev/" - url "https://github.com/ccache/ccache/releases/download/v3.7.10/ccache-3.7.10.tar.xz" - sha256 "0c9566d8eafaec2c5e5c0d9a91e921c858fcf349284a105ab524407b9b54ed28" - - bottle do - cellar :any_skip_relocation - sha256 "bfd4fe5e5f9cbc89cc6e7fb75f81f3e8242051a4d5a3f826393e687391d99d04" => :catalina - sha256 "3313b78106163a3a402a17dd3685585d847acab5d1fbaad5ee66820f4d0c55da" => :mojave - sha256 "e7cf896321b1436855c0289911fdf7a9942c67d3c9c5312aecb94c6b869e1e09" => :high_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 - - uses_from_macos "zlib" - - 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 gcc-8 gcc-9 - 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 - 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 - ].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 e65e85b19ab01..0000000000000 --- a/Formula/ccal.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Ccal < Formula - desc "Create Chinese calendars for print or browsing" - # no https urls - homepage "http://ccal.chinesebay.com/ccal/ccal.htm" - url "http://ccal.chinesebay.com/ccal/ccal-2.5.3.tar.gz" - sha256 "3d4cbdc9f905ce02ab484041fbbf7f0b7a319ae6a350c6c16d636e1a5a50df96" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "ea42afd04ed210cf6e0bedac3ab4ce6b3e37421ba8d79478769d2e117c38a41f" => :catalina - sha256 "c3a4bead8506e0234e878727e6d7827925e600bcee3857859fd575d4bbb185cc" => :mojave - sha256 "cd9bd38878cee9658e312142edfca7cf35e5223ef30b3a3effc9e4108ccf3d51" => :high_sierra - 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 456e925acb16b..0000000000000 --- a/Formula/ccat.rb +++ /dev/null @@ -1,35 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "aec38270a3b41a57fe6d05df08eea67042f2b65a2a5de30b2452afefd81a6d9d" => :catalina - 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 9b387d837d40e..0000000000000 --- a/Formula/ccd2iso.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "741bb587861701e9900ede511e2db1e73815428eb2f0f2c697313dad70609853" => :catalina - sha256 "710ddc04aac005477e9aaa73e882bc1d8cbe96412ac949ff4a7501c6a53ca018" => :mojave - sha256 "9d33b636be5f43c1e40955323c2f5d4a02d603c990aab2c89e98b5cb16a5cf93" => :high_sierra - sha256 "c855496f0265a8f806228cddc1c15d5a1d6e7186f4bb43c0a317a6256d8e8e85" => :sierra - sha256 "e74b2779ef3d832bc899422285c2d03ea33aa6ab979ca835914343999b444671" => :el_capitan - sha256 "020f198fa4476dc640fa14e8efa7ad04985143e7007c45610b890bdc7db47599" => :yosemite - sha256 "46facd34e7bbf203fe76dcd6e99bcf066eb245992aef01f1d703a9ce7a69cac3" => :mavericks - 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 1bc169a504cc9..0000000000000 --- a/Formula/ccextractor.rb +++ /dev/null @@ -1,33 +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.88.tar.gz" - sha256 "e0bfad4c7cf5d8a05305107ab53829a33b209446aaec515d5c51b72392b1eda7" - license "GPL-2.0" - head "https://github.com/ccextractor/ccextractor.git" - - bottle do - cellar :any_skip_relocation - sha256 "aaba08da14a3266a7b60bcd232c24d121ba9aa1741e768f54e77fd09f6c67fcc" => :catalina - sha256 "87a9b43c6ac20b2dc270cc35b1da0df4a92758bc722882407dcacbacb7e806d7" => :mojave - sha256 "35be2be5fd71b1784b85a7bd5ba7ccf35f987fd6ed0548df7864cd686e28c5c0" => :high_sierra - sha256 "9c78ad6dd2f3c02ef7ca508af88114f8deffa691cf3a546e6ca09ed279b80758" => :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/ccfits.rb b/Formula/ccfits.rb deleted file mode 100644 index 4548aca17c0ce..0000000000000 --- a/Formula/ccfits.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Ccfits < Formula - desc "Object oriented interface to the cfitsio library" - homepage "https://heasarc.gsfc.nasa.gov/fitsio/CCfits/" - url "https://heasarc.gsfc.nasa.gov/fitsio/CCfits/CCfits-2.5.tar.gz" - sha256 "938ecd25239e65f519b8d2b50702416edc723de5f0a5387cceea8c4004a44740" - revision 2 - - bottle do - cellar :any - sha256 "bcf673522fe7245b6ca8c93139793acf10c0fb3e351de96cfd634e296a5be813" => :catalina - sha256 "22aa452875d79f09825a87f9f3e384552e7fd92e5d954cd361a1b92cd9e52513" => :mojave - sha256 "b527e857acac1d749786f44a06af0cfa5f19f34c568c5f21c65675fa04b97f26" => :high_sierra - end - - depends_on "cfitsio" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - CCfits::FITS::setVerboseMode(true); - std::cout << "the answer is " << CCfits::VTbyte << std::endl; - } - EOS - 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/ccheck.rb b/Formula/ccheck.rb deleted file mode 100644 index 4b5e85fd9e902..0000000000000 --- a/Formula/ccheck.rb +++ /dev/null @@ -1,26 +0,0 @@ -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/v1.0.1.tar.gz" - sha256 "2325ea8476cce5111b8f848ca696409092b1d1d9c41bd46de7e3145374ed32cf" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "edc3a16f072eeca5647916de805bc80a753d00548b860a052f670b4698464632" => :catalina - sha256 "4afea0fa685001ecf5777cb37975074cc382f2282bfe7fbaf9543c3b520272df" => :mojave - sha256 "564171a220f9f031bd04044319b1e99e0a294208b3e804513ee0fe607525fe81" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"ccheck", "main.go" - prefix.install_metafiles - 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/ccls.rb b/Formula/ccls.rb deleted file mode 100644 index 5f82a79332274..0000000000000 --- a/Formula/ccls.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Ccls < Formula - desc "C/C++/ObjC language server" - homepage "https://github.com/MaskRay/ccls" - url "https://github.com/MaskRay/ccls/archive/0.20190823.6.tar.gz" - sha256 "83dd45120e9674319f91e4379013831e124c0858e050bbc3521e3f8aebe5c95b" - license "Apache-2.0" - head "https://github.com/MaskRay/ccls.git" - - bottle do - sha256 "826b74e4e2f5ed44734b1776e960fb4485bbd20ee6383dc9bc426ca2fed9ba03" => :catalina - sha256 "f32c94ebdd1b65fa75a32701573dfb1c87d16a339f57f261712ead133caeab3f" => :mojave - sha256 "fe0edff63df20a3c4624ce335c73276299f60d5bfad836c1acba32ce7435de18" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "rapidjson" => :build - depends_on "llvm" - depends_on :macos => :high_sierra # C++ 17 is required - - def install - system "cmake", *std_cmake_args - system "make", "install" - end - - test do - system bin/"ccls", "-index=#{testpath}" - end -end diff --git a/Formula/ccm.rb b/Formula/ccm.rb deleted file mode 100644 index 49c5560fb14a4..0000000000000 --- a/Formula/ccm.rb +++ /dev/null @@ -1,51 +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/f1/12/091e82033d53b3802e1ead6b16045c5ecfb03374f8586a4ae4673a914c1a/ccm-3.1.5.tar.gz" - sha256 "f07cc0a37116d2ce1b96c0d467f792668aa25835c73beb61639fa50a1954326c" - head "https://github.com/pcmanus/ccm.git" - - bottle do - cellar :any_skip_relocation - sha256 "1301713c60ca83ef5a2b1d5b0df50fcb73d57574ce1fb9f34091e549ba969815" => :catalina - sha256 "93f09667b609d1fe582de827efc3d48b4638717871336697b736cf7b997f1eb3" => :mojave - sha256 "6f301f55003b0542009458f90cebed245edb4f38abac9a0755552380f2174d12" => :high_sierra - end - - depends_on "python@3.8" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/3d/d9/ea9816aea31beeadccd03f1f8b625ecf8f645bd66744484d162d84803ce5/PyYAML-5.3.tar.gz" - sha256 "e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "cassandra-driver" do - url "https://files.pythonhosted.org/packages/19/bd/b522b200e8a7cc5ace859e9667308a3a302a23d6df09ae087ca2dfbf60c2/cassandra-driver-3.22.0.tar.gz" - sha256 "df825ee4ebb7f7fa33ab028d673530184fe0ee41ea66b2f9ddd478db56145a31" - 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 3ce645114209d..0000000000000 --- a/Formula/cconv.rb +++ /dev/null @@ -1,34 +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 "06b6bafaadcaa16329ba0cdeee7d11a13e94f126a4011b54253e31a1ea82108e" => :catalina - 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 502a5b337c573..0000000000000 --- a/Formula/ccrypt.rb +++ /dev/null @@ -1,37 +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" - license "GPL-2.0" - - bottle do - sha256 "e09c7818b7de98e36d433080334e169ac970e1a020114ddab1fdbbd54135ddbc" => :catalina - sha256 "49054d9d502ab13e65ab873cc9d355ab75438372a7770c38c4c7c35c84c31e3a" => :mojave - sha256 "a4d270d5b5f467870f0b265f6f2d1861762d853df46756a34ac7e6a6d83e2121" => :high_sierra - sha256 "048295cb4f95c9f0f3c5f1a619141e08c0326b6d8252c62c97608fb028cb48f7" => :sierra - sha256 "a98ea0f3dbee5e9086bea342ac8291303970b1d8a85344be2b4d91330a919ae9" => :el_capitan - end - - conflicts_with "ccat", :because => "both install `ccat` binaries" - - 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/cctz.rb b/Formula/cctz.rb deleted file mode 100644 index 9d1822a06befc..0000000000000 --- a/Formula/cctz.rb +++ /dev/null @@ -1,57 +0,0 @@ -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/v2.3.tar.gz" - sha256 "8615b20d4e33e02a271c3b93a3b208e3d7d5d66880f5f6208b03426e448f32db" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "3a73ab9d2f67020d95657e8c5b32a26d7eb81987cee2eace2b9d26eab2621bbb" => :catalina - sha256 "439ce8e6d464aa64aadd117e3effba68379883c3013de4944dda1def4127ff7d" => :mojave - sha256 "2d61f3555630f98a572971867d5da46212712eb30a18bb6545f9067369865c33" => :high_sierra - end - - depends_on "cmake" => :build - - def install - args = std_cmake_args - args << "-DBUILD_TESTING=OFF" - args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" - - system "cmake", ".", "-DBUILD_SHARED_LIBS=ON", *args - system "make", "install" - system "cmake", ".", "-DBUILD_SHARED_LIBS=OFF", *args - system "make", "install" - end - - test do - (testpath/"test.cc").write <<~EOS - #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); - } - EOS - system ENV.cxx, "-I#{include}", "-L#{lib}", "-lcctz", "test.cc", "-o", "test" - system testpath/"test" - end -end diff --git a/Formula/ccze.rb b/Formula/ccze.rb deleted file mode 100644 index 80cf9ca18ab48..0000000000000 --- a/Formula/ccze.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Ccze < Formula - desc "Robust and modular log colorizer" - homepage "https://packages.debian.org/wheezy/ccze" - url "https://deb.debian.org/debian/pool/main/c/ccze/ccze_0.2.1.orig.tar.gz" - sha256 "8263a11183fd356a033b6572958d5a6bb56bfd2dba801ed0bff276cfae528aa3" - revision 1 - - bottle do - cellar :any - rebuild 2 - sha256 "1d7fe7ec73840e77d3f76f6f9d38757e4ab62d9d6a951e6d9ccf83782f73a29a" => :catalina - sha256 "f748556612ca69454aec71083d8cedbb3def5091c9663c7df046c597fe26048f" => :mojave - sha256 "fdc8abe565f7cec57dd3461d6840e2676c556fa54eaccada60df4958310ff8a7" => :high_sierra - end - - # query via the last repo status change `https://api.github.com/repos/madhouse/ccze` - deprecate! :date => "2020-05-24" - - depends_on "pcre" - - uses_from_macos "ncurses" - - 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 e65d01420f435..0000000000000 --- a/Formula/cd-discid.rb +++ /dev/null @@ -1,41 +0,0 @@ -class CdDiscid < Formula - desc "Read CD and get CDDB discid information" - homepage "http://linukz.org/cd-discid.shtml" - license "GPL-2.0" - 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://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/formula-patches/85fa66a9/cd-discid/1.4.patch" - sha256 "f53b660ae70e91174ab86453888dbc3b9637ba7fcaae4ea790855b7c3d3fe8e6" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "0a9f85136e9727175a4d861f759236d62cf24f19170e27bfd9bf8aeddbc4c8b3" => :catalina - 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 diff --git a/Formula/cdargs.rb b/Formula/cdargs.rb deleted file mode 100644 index 3c807b4bfb392..0000000000000 --- a/Formula/cdargs.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Cdargs < Formula - desc "Directory bookmarking system - Enhanced cd utilities" - homepage "https://github.com/cbxbiker61/cdargs" - url "https://github.com/cbxbiker61/cdargs/archive/2.1.tar.gz" - sha256 "062515c3fbd28c68f9fa54ff6a44b81cf647469592444af0872b5ecd7444df7d" - license "GPL-2.0" - head "https://github.com/cbxbiker61/cdargs.git" - - bottle do - cellar :any_skip_relocation - sha256 "0a40505138d5465211cc963f438683e38b88518b9f854e58b75d245e7a6fcd16" => :catalina - sha256 "e78325dae8b29e9f7f5764537edf24d188be18ab27684392db9ebdbde1c9011b" => :mojave - sha256 "fc93b68d48a7ae82eaf0816b6952bb1a6c7cc038c6439232cf01ea1b39bea3b0" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - - # 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/formula-patches/85fa66a9/cdargs/1.35.patch" - sha256 "adb4e73f6c5104432928cd7474a83901fe0f545f1910b51e4e81d67ecef80a96" - end - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - - 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/cdb.rb b/Formula/cdb.rb deleted file mode 100644 index 841ce2c310ddb..0000000000000 --- a/Formula/cdb.rb +++ /dev/null @@ -1,31 +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 "055cbaab9c15fe3f4b29dac36558497937eea6643c8ccf0cc4a9ee2c427fcff2" => :catalina - 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/cddlib.rb b/Formula/cddlib.rb deleted file mode 100644 index ad9d62f6cb03d..0000000000000 --- a/Formula/cddlib.rb +++ /dev/null @@ -1,81 +0,0 @@ -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.94j/cddlib-0.94j.tar.gz" - sha256 "27d7fcac2710755a01ef5381010140fc57c95f959c3c5705c58539d8c4d17bfb" - license "GPL-2.0" - version_scheme 1 - - bottle do - cellar :any - sha256 "06dfe39e32a33bfeecffbdb4dbaa5da38f0f9e49bdd70995d431f71c050c697c" => :catalina - sha256 "eae03b8375c1b6c06d3f3b0fa2d420f84ede931fae51b1d2b1158ac65ae2d879" => :mojave - sha256 "c11684af685133e3c83ae655ac44fc4b9ca99e97adf22d85100bc762933ac2d6" => :high_sierra - end - - depends_on "gmp" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #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; - } - EOS - 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/cdecl.rb b/Formula/cdecl.rb deleted file mode 100644 index 048e6f1986aba..0000000000000 --- a/Formula/cdecl.rb +++ /dev/null @@ -1,39 +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 "bba9953b96f037148b23ecf85030ed505bf1e6712f21099d494084c26cd52f1c" => :catalina - 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 e31860a1c73bd..0000000000000 --- a/Formula/cdk.rb +++ /dev/null @@ -1,25 +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-20200228.tgz" - version "5.0.20200228" - sha256 "b23b55e2f21b4f1a2d6275e0ee017f4acfd5654f9c318080193ea71b7727b3cc" - - bottle do - cellar :any_skip_relocation - sha256 "f6af3de91a67f7bec4481770831733635e80467dde908806b7f236c4a367fec1" => :catalina - sha256 "d14ec66c67dd3cfeea5679661a1c6341ac1efa6d5090bbe72def80529051d9b4" => :mojave - sha256 "c3576b57b44eba4148477a0e987197c9f7d766ba6652280aa915989dcee441ad" => :high_sierra - 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/cdk8s.rb b/Formula/cdk8s.rb deleted file mode 100644 index 323623492080f..0000000000000 --- a/Formula/cdk8s.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "language/node" - -class Cdk8s < Formula - desc "Define k8s native apps and abstractions using object-oriented programming" - homepage "https://github.com/awslabs/cdk8s" - url "https://registry.npmjs.org/cdk8s-cli/-/cdk8s-cli-0.26.0.tgz" - sha256 "d4cd0eca893011420765bea1aed6a198a1f21b09d9650223dac33c17ed5eb4fa" - - bottle do - cellar :any_skip_relocation - sha256 "a6a3d58777381571fbabf4c023cb13da0145f1e77e58c39b50bc90616755578d" => :catalina - sha256 "945c71f494fcba0afecf91172181f826d4bb311256a7999b8912098d835f5e7f" => :mojave - sha256 "51fc6cfa21ea4d2f42a93de0908f12a3fea0f3cc3dea4bc83e663c4854a9a440" => :high_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}/cdk8s", "import", "k8s", "-l", "python" - assert_predicate testpath/"imports/k8s", :exist?, "cdk8s import did not work" - end -end diff --git a/Formula/cdlabelgen.rb b/Formula/cdlabelgen.rb deleted file mode 100644 index 093d3171756bc..0000000000000 --- a/Formula/cdlabelgen.rb +++ /dev/null @@ -1,27 +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 "5facce52a8f22279160a388513b2a9406f427f3ab231e119fbc0b074dc7028f9" => :catalina - 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/cdo.rb b/Formula/cdo.rb deleted file mode 100644 index a11e1857c2bff..0000000000000 --- a/Formula/cdo.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Cdo < Formula - desc "Climate Data Operators" - homepage "https://code.mpimet.mpg.de/projects/cdo" - url "https://code.mpimet.mpg.de/attachments/download/20826/cdo-1.9.8.tar.gz" - sha256 "f2660ac6f8bf3fa071cf2a3a196b3ec75ad007deb3a782455e80f28680c5252a" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "7642f67bf1e8b5eb28faa6b31b9c5c8800d971d584a2b8ef5c218fd39f3929c4" => :catalina - sha256 "6bee75bcd2637789145bcfb627c6faf7f4eb2a156ada667ddcfa9c97ad374666" => :mojave - sha256 "1f7aef8ac91a7f368b6e571537a59d8a83220657b8a051d7a85ac820a67cb853" => :high_sierra - end - - depends_on "eccodes" - depends_on "hdf5" - depends_on "netcdf" - depends_on "proj" - depends_on "szip" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --with-eccodes=#{Formula["eccodes"].opt_prefix} - --with-netcdf=#{Formula["netcdf"].opt_prefix} - --with-hdf5=#{Formula["hdf5"].opt_prefix} - --with-szlib=#{Formula["szip"].opt_prefix} - ] - - system "./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_predicate testpath/"test.nc", :exist? - end -end diff --git a/Formula/cdogs-sdl.rb b/Formula/cdogs-sdl.rb deleted file mode 100644 index 1bd224523a28b..0000000000000 --- a/Formula/cdogs-sdl.rb +++ /dev/null @@ -1,41 +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.8.0.tar.gz" - sha256 "ae5f493cfbbb5809824af79b164bd9a2ab7f7cfeb32468ff48f36b4a14982aba" - license "GPL-2.0" - head "https://github.com/cxong/cdogs-sdl.git" - - bottle do - sha256 "66687e6a3548b98f7fd709efd02c8b859720366ae4cce99a5bbd7912fbaeefaa" => :catalina - sha256 "268d71dc819666f503df8baf456e8c67ae656120325c220cbf61c24180ba539d" => :mojave - sha256 "867cda02b913848c1c3ceb77b5bd3830e744297bbb03924d55030630b8b6af9c" => :high_sierra - 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" - bin.install %w[src/cdogs-sdl src/cdogs-sdl-editor] - pkgshare.install %w[data dogfights graphics missions music sounds] - doc.install Dir["doc/*"] - end - - test do - pid = fork do - exec bin/"cdogs-sdl" - end - sleep 7 - assert_predicate testpath/".config/cdogs-sdl", - :exist?, "User config directory should exist" - ensure - Process.kill("TERM", pid) - end -end diff --git a/Formula/cdparanoia.rb b/Formula/cdparanoia.rb deleted file mode 100644 index 438d3c59118c9..0000000000000 --- a/Formula/cdparanoia.rb +++ /dev/null @@ -1,40 +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 "9a2def6e4aa8db0e7f35392dd73e2bbaf86a52ddc5cb6ff80e1fcf6f34f6133e" => :catalina - 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 445e639bab631..0000000000000 --- a/Formula/cdpr.rb +++ /dev/null @@ -1,31 +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 "62e58521757a1dd5020d962dc9a5d00647e920a66347b5d5e58c1e8920db822f" => :catalina - 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 7e7fa832cf70c..0000000000000 --- a/Formula/cdrdao.rb +++ /dev/null @@ -1,62 +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" - license "GPL-2.0" - - bottle do - sha256 "81acc38e0a51134c0eeebf20e76dcee4e80eabfac72f0ec890e448271a96792c" => :catalina - 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 7a0598c097636..0000000000000 --- a/Formula/cdrtools.rb +++ /dev/null @@ -1,59 +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 "f0c2ea440dda7483202622453db62f883ce3872b86c325ba4de046ac44a5c53b" => :catalina - 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/cedille.rb b/Formula/cedille.rb deleted file mode 100644 index c32e9074b1962..0000000000000 --- a/Formula/cedille.rb +++ /dev/null @@ -1,150 +0,0 @@ -require "language/haskell" - -class Cedille < Formula - include Language::Haskell::Cabal - - desc "Language based on the Calculus of Dependent Lambda Eliminations" - homepage "https://cedille.github.io/" - revision 2 - - stable do - url "https://github.com/cedille/cedille/archive/v1.1.2.tar.gz" - sha256 "cf6578256105c7042b99a70a897c1ed60f856b28628b79205eb95730863b71cb" - - resource "ial" do - url "https://github.com/cedille/ial/archive/v1.5.0.tar.gz" - sha256 "f003a785aba6743f4d76dcaafe3bc08bf879b2e1a7a198a4f192ced12b558f46" - end - end - - bottle do - rebuild 1 - sha256 "04fab3020135237fa6d0a72b764c2112ddaad2ca7374f30538c2d980a3a3cde6" => :catalina - sha256 "54beaa319a1be8a508d1ed7b87bb0a95f5000d630b588866232a7d3af9654782" => :mojave - sha256 "cf1adb7d3c89396d3e54877054019846a9313e59768c9e25fc0516fce525e037" => :high_sierra - end - - head do - url "https://github.com/cedille/cedille.git" - - resource "ial" do - url "https://github.com/cedille/ial.git" - end - end - - depends_on "agda" => :build - depends_on "cabal-install" => :build - depends_on "ghc@8.8" - - # needed to build with agda 2.6.1 - # taken from https://github.com/cedille/cedille/pull/144/files - # but added at the bottom to apply cleanly on v1.1.2 - # remove once this is merged into cedille, AND formula updated to - # a release that contains it - patch :DATA - - def install - resource("ial").stage buildpath/"ial" - - cabal_sandbox do - # build tools - cabal_install_tools "alex", "happy", "cpphs" - - # build dependencies - cabal_install "ieee754" - - # use the sandbox when building with Agda - ENV["GHC_PACKAGE_PATH"] = "#{buildpath/Dir[".cabal-sandbox/*packages.conf.d/"].first}:" - - # build - system "make", "core/cedille-core", "cedille-mac" - end - - # binaries and elisp - bin.install "core/cedille-core" - bin.install "cedille-mac" => "cedille" - elisp.install "cedille-mode.el", "cedille-mode", "se-mode" - - # standard libraries - (lib/"cedille").install "lib", "new-lib" - - # documentation - doc.install Dir["docs/html/*"] - (doc/"semantics").install "docs/semantics/paper.pdf" - info.install "docs/info/cedille-info-main.info" - end - - test do - coretest = testpath/"core-test.ced" - coretest.write <<~EOS - module core-test. - - id = Λ X: ★. λ x: X. x. - - cNat : ★ = ∀ X: ★. Π _: X. Π _: Π _: X. X. X. - czero = Λ X: ★. λ x: X. λ f: Π _: X. X. x. - csucc = λ n: cNat. Λ X: ★. λ x: X. λ f: Π _: X. X. f (n ·X x f). - - iNat : Π n: cNat. ★ - = λ n: cNat. ∀ P: Π _: cNat. ★. - Π _: P czero. Π _: ∀ n: cNat. Π p: P n. P (csucc n). P n. - izero - = Λ P: Π _: cNat. ★. - λ base: P czero. λ step: ∀ n: cNat. Π p: P n. P (csucc n). base. - isucc - = Λ n: cNat. λ i: iNat n. Λ P: Π _: cNat. ★. - λ base: P czero. λ step: ∀ n: cNat. Π p: P n. P (csucc n). - step -n (i ·P base step). - - Nat : ★ = ι x: cNat. iNat x. - zero = [ czero, izero @ x. iNat x ]. - succ = λ n: Nat. [ csucc n.1, isucc -n.1 n.2 @x. iNat x ]. - EOS - - cedilletest = testpath/"cedille-test.ced" - cedilletest.write <<~EOS - module cedille-test. - - id : ∀ X: ★. X ➔ X = Λ X. λ x. x. - - cNat : ★ = ∀ X: ★. X ➔ (X ➔ X) ➔ X. - czero : cNat = Λ X. λ x. λ f. x. - csucc : cNat ➔ cNat = λ n. Λ X. λ x. λ f. f (n x f). - - iNat : cNat ➔ ★ - = λ n: cNat. ∀ P: cNat ➔ ★. - P czero ➔ (∀ n: cNat. P n ➔ P (csucc n)) ➔ P n. - izero : iNat czero = Λ P. λ base. λ step. base. - isucc : ∀ n: cNat. iNat n ➔ iNat (csucc n) - = Λ n. λ i. Λ P. λ base. λ step. step -n (i base step). - - Nat : ★ = ι n: cNat. iNat n. - zero : Nat = [ czero, izero ]. - succ : Nat ➔ Nat = λ n. [ csucc n.1, isucc -n.1 n.2 ]. - EOS - - # test cedille-core - system bin/"cedille-core", coretest - - # test cedille - system bin/"cedille", cedilletest - end -end -__END__ -diff --git a/src/to-string.agda b/src/to-string.agda -index 2505942..051a2da 100644 ---- a/src/to-string.agda -+++ b/src/to-string.agda -@@ -100,9 +100,9 @@ no-parens {TK} _ _ _ = tt - no-parens {QUALIF} _ _ _ = tt - no-parens {ARG} _ _ _ = tt - --pattern ced-ops-drop-spine = cedille-options.options.mk-options _ _ _ _ ff _ _ _ ff _ --pattern ced-ops-conv-arr = cedille-options.options.mk-options _ _ _ _ _ _ _ _ ff _ --pattern ced-ops-conv-abs = cedille-options.options.mk-options _ _ _ _ _ _ _ _ tt _ -+pattern ced-ops-drop-spine = cedille-options.mk-options _ _ _ _ ff _ _ _ ff _ -+pattern ced-ops-conv-arr = cedille-options.mk-options _ _ _ _ _ _ _ _ ff _ -+pattern ced-ops-conv-abs = cedille-options.mk-options _ _ _ _ _ _ _ _ tt _ - - drop-spine : cedille-options.options → {ed : exprd} → ctxt → ⟦ ed ⟧ → ⟦ ed ⟧ - drop-spine ops @ ced-ops-drop-spine = h diff --git a/Formula/celero.rb b/Formula/celero.rb deleted file mode 100644 index b8d99c5be3fe5..0000000000000 --- a/Formula/celero.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Celero < Formula - desc "C++ Benchmark Authoring Library/Framework" - homepage "https://github.com/DigitalInBlue/Celero" - url "https://github.com/DigitalInBlue/Celero/archive/v2.6.0.tar.gz" - sha256 "a5b72da254f81d42369382ba3157229b6b32ebbb670a22b185f80db95535e66e" - - bottle do - cellar :any - sha256 "50180fabca883914fd2b120cee3258ef4a58015287babb1883274c03d5be0fa6" => :catalina - sha256 "2ae8505c1415e5a9ca3b9d2d80a4f28516f311c755a0cbe809bc45b521a0169b" => :mojave - sha256 "c73b3bcf8fc8dfcb1df8367febe579c11b60067550500a5e94ec1ef7f279882c" => :high_sierra - end - - depends_on "cmake" => :build - - def install - cmake_args = std_cmake_args + %w[ - -DCELERO_COMPILE_DYNAMIC_LIBRARIES=ON - -DCELERO_ENABLE_EXPERIMENTS=OFF - -DCELERO_ENABLE_TESTS=OFF - ] - system "cmake", ".", *cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #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)); - } - EOS - system ENV.cxx, "-std=c++14", "test.cpp", "-L#{lib}", "-lcelero", "-o", "test" - system "./test" - end -end diff --git a/Formula/center-im.rb b/Formula/center-im.rb deleted file mode 100644 index acc6e2b210628..0000000000000 --- a/Formula/center-im.rb +++ /dev/null @@ -1,56 +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 2 - - bottle do - rebuild 1 - sha256 "11a339b812d7fa164fce8e873e837d1ab07256e73ce0c4e483eeb60327ef6fa6" => :catalina - sha256 "42a8b8f09b9530139c5d9eaf7c83a435962c61631eea00a13bf70a670044c7a2" => :mojave - sha256 "9b40fc34ba5177765f01bdd821bec40377f44828421509491d90fb7a329ba400" => :high_sierra - sha256 "7e9f2db21d3ceec8ad7d3a59e5bf600d5d145aa0a88f676d803c1feea307f687" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "openssl@1.1" - - # 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@1.1"].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 7e3631081f507..0000000000000 --- a/Formula/cereal.rb +++ /dev/null @@ -1,75 +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.3.0.tar.gz" - sha256 "329ea3e3130b026c03a4acc50e168e7daff4e6e661bc6a7dfec0d77b570851d5" - head "https://github.com/USCiLab/cereal.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "a8320898b751c2df4777d1fd77f9982a812972b46630fa060b21e412c545a14d" => :catalina - sha256 "a8320898b751c2df4777d1fd77f9982a812972b46630fa060b21e412c545a14d" => :mojave - sha256 "a8320898b751c2df4777d1fd77f9982a812972b46630fa060b21e412c545a14d" => :high_sierra - end - - depends_on "cmake" => :build - - 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 da19fb3095164..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 12 - head "https://ceres-solver.googlesource.com/ceres-solver.git" - - bottle do - cellar :any - sha256 "2c086c9caaf2828a6429164960e438bc7b1d601a468599400dbcd9fce6baa33e" => :catalina - sha256 "6f3edef5bdaf1b23723825305b7cdc84d28a06705bd55735de70813b28cef37f" => :mojave - sha256 "4d59a78cc1d4fa075ad3cebfabb88f59080b3abe80a834445b018b670f9f2d0b" => :high_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 3e7cf8f9c9e8a..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/5.05.01.tar.gz" - sha256 "0634b14bd00234ef44d37e47a884d4031fd1a2062475553198e83923a7c918e5" - head "https://github.com/MethodicalAcceleratorDesign/MAD-X.git" - - bottle do - cellar :any_skip_relocation - sha256 "bb7ec4fd2605658c5d2ff764a6dc867c1322c673d6aad93acf9e269237a34907" => :catalina - sha256 "77bdb65653b6d4ab9fd1b2f7b5f4af951fce1f50cd5403b3d30eeafdfd85c20a" => :mojave - sha256 "66b88d2c6cf4f38ad0a3277175c83d99597ffdde3165905c9bcec285a6befd4d" => :high_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 2a726f33ca1b1..0000000000000 --- a/Formula/certbot.rb +++ /dev/null @@ -1,198 +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/v1.6.0.tar.gz" - sha256 "257250d5b641e2dad602010cc7794820c85ac47caac2bcc9f14108096365fb44" - head "https://github.com/certbot/certbot.git" - - bottle do - cellar :any - sha256 "3fa2128cc2dedf227d7f5b16f45bdfb1c0d7d810340d2ceef4690ccb009b9a01" => :catalina - sha256 "bb08a636d54c72f4321768e736ccef60ee2684e4618f1fc47cffbe5f70b40ae0" => :mojave - sha256 "f1a09902fd01db1ee0d6a581c76910d3948b0d723c683664bf903c7c1da9cda1" => :high_sierra - end - - depends_on "augeas" - depends_on "dialog" - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b4/19/53433f37a31543364c8676f30b291d128cdf4cd5b31b755b7890f8e89ac8/certifi-2020.4.5.2.tar.gz" - sha256 "5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/bb/79/3045743bb26ca2e44a1d317c37395462bfed82dbbd38e69a3280b63696ce/ConfigArgParse-1.2.3.tar.gz" - sha256 "edd17be986d5c1ba2e307150b8e5f5107aba125f3574dddd02c85d5cdcfd37dc" - 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/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "distro" do - url "https://files.pythonhosted.org/packages/a6/a4/75064c334d8ae433445a20816b788700db1651f21bdb0af33db2aab142fe/distro-1.5.0.tar.gz" - sha256 "0e58756ae38fbd8fc3020d54badb8eae17c5b9dcbed388b17bb55b8a5928df92" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "josepy" do - url "https://files.pythonhosted.org/packages/92/4a/145b0c6d0984698ccb4debc0161e3f74d8db645ddd9573cacc2abbc22d55/josepy-1.3.0.tar.gz" - sha256 "c341ffa403399b18e9eae9012f804843045764d1390f9cb4648980a7569b1619" - end - - resource "parsedatetime" do - url "https://files.pythonhosted.org/packages/a8/20/cb587f6672dbe585d101f590c3871d16e7aec5a576a1694997a3777312ac/parsedatetime-2.6.tar.gz" - sha256 "4cb368fbb18a0b7231f4d76119165451c8d2e35951455dfee97c62a87b04d455" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/0d/1d/6cc4bd4e79f78be6640fab268555a11af48474fac9df187c3361a1d1d2f0/pyOpenSSL-19.1.0.tar.gz" - sha256 "9a24494b2602aaf402be5c9e30a0b82d4a5c67528fe8fb475e3f3bc00dd69507" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - 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/af/cc/5064a3c25721cd863e6982b87f10fdd91d8bcc62b6f7f36f5231f20d6376/python-augeas-1.1.0.tar.gz" - sha256 "5194a49e86b40ffc57055f73d833f87e39dce6fce934683e7d0d5bbb8eff3b8c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "requests-toolbelt" do - url "https://files.pythonhosted.org/packages/28/30/7bf7e5071081f761766d46820e52f4b16c8a08fef02d2eb4682ca7534310/requests-toolbelt-0.9.1.tar.gz" - sha256 "968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "zope.component" do - url "https://files.pythonhosted.org/packages/b0/f3/ac5d649165f86d8174ad54f095f6109d72d9dac6aa4cdc6235fefb2007b9/zope.component-4.6.1.tar.gz" - sha256 "d9c7c27673d787faff8a83797ce34d6ebcae26a370e25bddb465ac2182766aca" - end - - resource "zope.deferredimport" do - url "https://files.pythonhosted.org/packages/b9/74/6eb2dcf013fac35d086abef2435b5a6621435c2b0c166ef5b63a1b51e91d/zope.deferredimport-4.3.1.tar.gz" - sha256 "57b2345e7b5eef47efcd4f634ff16c93e4265de3dcf325afc7315ade48d909e1" - 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/31/ce/4d1cd6d2a3d980989ceaf86abb6c8683f90f01a81861f3de6ec7ae317db7/zope.hookable-5.0.1.tar.gz" - sha256 "29d07681a78042cdd15b268ae9decffed9ace68a53eebeb61d65ae931d158841" - end - - resource "zope.interface" do - url "https://files.pythonhosted.org/packages/af/d2/9675302d7ced7ec721481f4bbecd28a390a8db4ff753d28c64057b975396/zope.interface-5.1.0.tar.gz" - sha256 "40e4c42bd27ed3c11b2c983fecfb03356fae1209de10686d03c02c8696a1d90e" - end - - resource "zope.proxy" do - url "https://files.pythonhosted.org/packages/ab/37/26899cb231ecfa04822a17a669eac6df7ef0c2a86e2b78001db0cd3edd46/zope.proxy-4.3.5.tar.gz" - sha256 "a66a0d94e5b081d5d695e66d6667e91e74d79e273eee95c1747717ba9cb70792" - 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 - - # Install in our prefix, not the first-in-the-path python site-packages dir. - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - - cd buildpath/"certbot" do - system "python3", *Language::Python.setup_install_args(libexec) - end - - # Shipped with certbot, not external resources. - %w[acme certbot-apache certbot-nginx].each do |r| - cd buildpath/r do - system "python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - pkgshare.install buildpath/"certbot/examples" - - bin.install Dir[libexec/"bin/certbot"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - 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 c4b4ff3c9122f..0000000000000 --- a/Formula/certigo.rb +++ /dev/null @@ -1,56 +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.12.1.tar.gz" - sha256 "800bdfa10ffc7f6313397220d02769e88ed5dae001224c9f0199383dcb63eaec" - license "Apache-2.0" - head "https://github.com/square/certigo.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "9cb3d249c87ed65409a4e4a0e7841bbb8ab9192dea06df8f78f28f0fcbec4550" => :catalina - sha256 "85d39ea2806bbd5ea750486132343d2dc36d5cc37ac0048d4561c40d20826fde" => :mojave - sha256 "0ec7c22fe619af5e5178f4387f2731909ff02d4379ec62784f3625d2a63c358c" => :high_sierra - end - - depends_on "go" => :build - - def install - system "./build" - bin.install "bin/certigo" - - # Install bash completion - output = Utils.safe_popen_read("#{bin}/certigo", "--completion-script-bash") - (bash_completion/"certigo").write output - - # Install zsh completion - output = Utils.safe_popen_read("#{bin}/certigo", "--completion-script-zsh") - (zsh_completion/"_certigo").write output - 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 e9d204979e1bb..0000000000000 --- a/Formula/certstrap.rb +++ /dev/null @@ -1,26 +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.2.0.tar.gz" - sha256 "0eebcc515ca1a3e945d0460386829c0cdd61e67c536ec858baa07986cb5e64f8" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "52e68d4bcd2256bb1026aafefc9aef39c0e7945e1f26c06b3e09f3b7e7d9ab14" => :catalina - sha256 "8f7fb0f6d8b559ee4d30972a68d5d76117a86c07233abc49237c516f45f07277" => :mojave - sha256 "12fdf1f518c3f2944d30f4289813a82aa56580b844fc2cc1ad3383d8675c9882" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", "-trimpath", "-o", bin/"certstrap" - prefix.install_metafiles - 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 2bfae42c4d714..0000000000000 --- a/Formula/ceylon.rb +++ /dev/null @@ -1,33 +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-tool.rb b/Formula/cf-tool.rb deleted file mode 100644 index a59e773713674..0000000000000 --- a/Formula/cf-tool.rb +++ /dev/null @@ -1,30 +0,0 @@ -class CfTool < Formula - desc "Command-line tool for Codeforces contests" - homepage "https://github.com/xalanq/cf-tool" - url "https://github.com/xalanq/cf-tool/archive/v1.0.0.tar.gz" - sha256 "6671392df969e7decf9bf6b89a43a93c2bde978e005e99ddb7fd84b0c513df9f" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "3369b5efe4c26d786fa8a54d4ca208c11dc89850565adaf6a1c922f4f16d2a3f" => :catalina - sha256 "4344edd7a9160d7113d135c574146f6ca5bedfded9e8633b02642276999e6dbe" => :mojave - sha256 "a3497993ba1bae8cda20da28d5fb7ea8687ba0e50a23d5f6687d515457c4a00c" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/xalanq/cf-tool").install buildpath.children - cd "src/github.com/xalanq/cf-tool" do - system "go", "build", "-o", "cf", "-trimpath", "-ldflags", "-s -w", "cf.go" - bin.install "cf" - prefix.install_metafiles - end - end - - test do - system "#{bin}/cf", "list", "1256" - end -end diff --git a/Formula/cf.rb b/Formula/cf.rb deleted file mode 100644 index 568e8a0293699..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 "14a240b51f627599ebd4cbbffc27c52d40790c6537f91f20d978d6054e62571b" => :catalina - sha256 "0cbd888d1a69516d55ce6572208b6adbdcbe9df7195199ac5d6e678e3e794f85" => :mojave - sha256 "b94cceb52c7da6995ed4acd014350e6d9b1dbeb7d03b0c8f2256a12e7f520b01" => :high_sierra - sha256 "5f37fd5ff05bdc66d21e9006f8907f1d19c92743bdffc2a5463251f6f681bd20" => :sierra - sha256 "658dbcf6f4868922582db207b8713c8a9009bc99d3d976866ecfacbb9f95dfd5" => :el_capitan - sha256 "4b4d294a9bd632f4daa07e643f7e33e3ffcf419d4df76c6656d2c688795f0d3c" => :yosemite - sha256 "ea165ebb43cf7e6d55e34b43df6dc31bc3b8a3d5d3441cb4106630b168e8c90b" => :mavericks - 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 b6e45849aad04..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" - license "LGPL-3.0" - revision 1 - - bottle do - cellar :any - sha256 "42086ab65ee844ca3e982c19592ca56fc4d7e0c1417fc749585dc4f24426c1b5" => :catalina - sha256 "bac407173815fb9bed500a83fb8c2cac4c599a4b1c35a6a619adbfa746817162" => :mojave - sha256 "d5903425babf74b3f3af6b4aebf7e0c583bf0729d15799b4a99208141ca80b5a" => :high_sierra - sha256 "dfbd0e6e303f7f8ff286e38b98562cbf9b18ac880070fcfa19240b0b9c8d4a2a" => :sierra - 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 40f291fac1cd9..0000000000000 --- a/Formula/cfengine.rb +++ /dev/null @@ -1,37 +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.16.0.tar.gz" - sha256 "f4256e6e1ca04776a9fd48f1388a30edfa8d11fdcf870ba62ce5b0ad62a87372" - - bottle do - sha256 "0ab2ee4f191720ab6e546f05235449a62c0435c5897a1d9bd271ba5de2d6192b" => :catalina - sha256 "11ffdc33ab4a8004aed11a71545dfb230c15c1a07780b73955a7095df223c2e0" => :mojave - sha256 "359f56d367aa77a65b089616556c7caf02aff9144fcbfc1eb208b2582d5a1ba5" => :high_sierra - end - - depends_on "lmdb" - depends_on "openssl@1.1" - depends_on "pcre" - - resource "masterfiles" do - url "https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-masterfiles-3.16.0.tar.gz" - sha256 "2f63ad1ee2d49af651c0911fc44778cbebb5a1afd33f5f93fa4644e71322a091" - 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 2cc4a35d99bc9..0000000000000 --- a/Formula/cfitsio.rb +++ /dev/null @@ -1,30 +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/cfitsio-3.48.tar.gz" - version "3.480" - sha256 "91b48ffef544eb8ea3908543052331072c99bf09ceb139cb3c6977fc3e47aac1" - - bottle do - cellar :any - sha256 "efaeebd4d115eabfc622672dc88f12b4aafce9ff20bce08e887147985c42d781" => :catalina - sha256 "a35caaadc929ff314d3b93b9bd8951b263724ef8300a433fe7607a477ab2b1d7" => :mojave - sha256 "27d890a098774743dd8c60c77d9faa7e303f52dfc977ebaa54469ff393c84929" => :high_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 641115b3787b8..0000000000000 --- a/Formula/cflow.rb +++ /dev/null @@ -1,65 +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.6.tar.bz2" - mirror "https://ftpmirror.gnu.org/cflow/cflow-1.6.tar.bz2" - sha256 "34487b4116e9b7ecde142b24480ce036887921ed5defb2958068bb069c1fedd7" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "a8b7329845d3c42a17efc7af96025a1a2839ae129afd7126e977d0a245853f45" => :catalina - sha256 "a96f9cf3cb35851c27ed602f6a05489da2d64e75ab6daccecc3e23156d9fe968" => :mojave - sha256 "50a816924cb91e1c4055923285ea3ceb0d815b4641477906ae5f6abdae337d52" => :high_sierra - sha256 "5e88f5310c34255947032f24227cf779aa8a42fe595f585605e814f001f4a151" => :sierra - 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/cfn-lint.rb b/Formula/cfn-lint.rb deleted file mode 100644 index 78926532ac39e..0000000000000 --- a/Formula/cfn-lint.rb +++ /dev/null @@ -1,130 +0,0 @@ -class CfnLint < Formula - include Language::Python::Virtualenv - - desc "Validate CloudFormation templates against the CloudFormation spec" - homepage "https://github.com/aws-cloudformation/cfn-python-lint/" - url "https://files.pythonhosted.org/packages/5a/aa/9a72f8da850c823c834cd6a26f6e8f861294166da030c8881e108e5f1415/cfn-lint-0.33.2.tar.gz" - sha256 "ff9b566bda43a2e74fdd89b57cbf0f76e209e4e666cc4babe7c96cbd3fb56bfe" - - bottle do - cellar :any_skip_relocation - sha256 "71c470a124bb44cb608b9a30cf4687d68beb76d1f17850971dc4989a40e3c9e6" => :catalina - sha256 "370848b62d535b14ce6fe4b8d6fad6514a11d8a56c5b3981b7d7312e2125006b" => :mojave - sha256 "5a90db54e3d6e999977cee93b83874e73fd8974ff50dda3e9997ea6d7b21faed" => :high_sierra - end - - depends_on "python@3.8" - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "aws-sam-translator" do - url "https://files.pythonhosted.org/packages/0b/0a/58b7b2132c19b2696b6e26ebb5ebfb86f70b5db85188188757cf4eb8bf0d/aws-sam-translator-1.25.0.tar.gz" - sha256 "5b31769d271fa6c7e87cde076ce819f9f9c7da324b3880f2cd0f5f5aa837e520" - end - - resource "boto3" do - url "https://files.pythonhosted.org/packages/fa/bb/d412bfa588b6623e0e797e698c66bc91b68362a71b75cde14791ef1f3ee8/boto3-1.14.10.tar.gz" - sha256 "16f83ca3aa98d3faeb4f0738b878525770323e5fb9952435ddf58ca09aacec7c" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/20/13/4e73b3dac653308036a7f930fc57cb0d61d581bf5f6eee9fcbbe691c7aed/botocore-1.17.10.tar.gz" - sha256 "cb0d7511a68439bf6f16683489130e06c5bbf9f5a9d647e0cbf63d79f3d3bdaa" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - # dependency constraint, docutils<0.16,>=0.10 - resource "docutils" do - url "https://files.pythonhosted.org/packages/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz" - sha256 "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9" - end - - resource "jsonpatch" do - url "https://files.pythonhosted.org/packages/69/72/24826f61fe4ba535207ed8efe17c82a5e9f9fdf2247054ae829b5c134b71/jsonpatch-1.26.tar.gz" - sha256 "e45df18b0ab7df1925f20671bbc3f6bd0b4b556fb4b9c5d97684b0a7eac01744" - end - - resource "jsonpointer" do - url "https://files.pythonhosted.org/packages/52/e7/246d9ef2366d430f0ce7bdc494ea2df8b49d7a2a41ba51f5655f68cfe85f/jsonpointer-2.0.tar.gz" - sha256 "c192ba86648e05fdae4f08a17ec25180a9aef5008d973407b581798a83975362" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" - sha256 "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" - end - - # only doing this because junit-xml source is not available in PyPI for v1.9 - resource "junit-xml" do - url "https://github.com/kyrus/python-junit-xml.git", - :revision => "4bd08a272f059998cedf9b7779f944d49eba13a6" - end - - resource "networkx" do - url "https://files.pythonhosted.org/packages/bf/63/7b579dd3b1c49ce6b7fd8f6f864038f255201410905dd183cf7f4a3845cf/networkx-2.4.tar.gz" - sha256 "f8f4ff0b6f96e4f9b16af6b84622597b5334bf9cae8cf9b2e42e7985d5c95c64" - end - - resource "pyrsistent" do - url "https://files.pythonhosted.org/packages/9f/0d/cbca4d0bbc5671822a59f270e4ce3f2195f8a899c97d0d5abb81b191efb5/pyrsistent-0.16.0.tar.gz" - sha256 "28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/50/de/2b688c062107942486c81a739383b1432a72717d9a85a6a1a692f003c70c/s3transfer-0.3.3.tar.gz" - sha256 "921a37e2aefc64145e7b73d50c71bb4f26f46e4c9f414dc648c6245ff92cf7db" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"test.yml").write <<~EOS - --- - 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' - EOS - system bin/"cfn-lint", "test.yml" - end -end diff --git a/Formula/cfr-decompiler.rb b/Formula/cfr-decompiler.rb deleted file mode 100644 index b5e4b12e0376c..0000000000000 --- a/Formula/cfr-decompiler.rb +++ /dev/null @@ -1,76 +0,0 @@ -class CfrDecompiler < Formula - desc "Yet Another Java Decompiler" - homepage "https://www.benf.org/other/cfr/" - url "https://github.com/leibnitz27/cfr.git", - :tag => "0.150", - :revision => "1361cd7fa74f25f30a6bbf72c825d83647d2cdaf" - license "MIT" - head "https://github.com/leibnitz27/cfr.git" - - bottle do - cellar :any_skip_relocation - sha256 "05d1bff6093077a4f9789606c7b8d77d26f66f341aa491a9412da3e85669c932" => :catalina - sha256 "0235b4a3204736079b3790db8de5bb02f99162318bff390aea45168f2bd1ea48" => :mojave - sha256 "c6866f8e6b6c8e849936d2b5a45c3827dda9acacfe49ca2e831041e633617ac5" => :high_sierra - end - - depends_on "maven" => :build - depends_on "openjdk" - - def install - # Homebrew's OpenJDK no longer accepts Java 6 source, so: - inreplace "pom.xml", "1.6", "1.7" - inreplace "cfr.iml", 'LANGUAGE_LEVEL="JDK_1_6"', 'LANGUAGE_LEVEL="JDK_1_7"' - - # build - ENV["JAVA_HOME"] = Formula["openjdk"].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!" unless (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/"cfr-decompiler").write <<~EOS - #!/bin/bash - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - exec "${JAVA_HOME}/bin/java" -jar "#{libexec/lib_jar}" "$@" - EOS - - # install library docs - doc.install doc_jar - mkdir doc/"javadoc" - cd doc/"javadoc" do - system Formula["openjdk"].bin/"jar", "-xf", doc/doc_jar - rm_rf "META-INF" - end - end - end - - test do - fixture = <<~EOS - class T { - T() { - } - - public static void main(String[] arrstring) { - System.out.println("Hello brew!"); - } - } - EOS - (testpath/"T.java").write fixture - system Formula["openjdk"].bin/"javac", "T.java" - output = pipe_output("#{bin}/cfr-decompiler --comments false T.class") - assert_match fixture, output - end -end diff --git a/Formula/cfssl.rb b/Formula/cfssl.rb deleted file mode 100644 index 83cb3c2c53ad5..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/v1.4.1.tar.gz" - sha256 "c8a86ef10cbb0c168f3b597db15b31f98b170edb7958f7154edeb29aee41315e" - license "BSD-2-Clause" - revision 1 - head "https://github.com/cloudflare/cfssl.git" - - bottle do - cellar :any_skip_relocation - sha256 "324cc909a9f6ade935def00160e7031fefa4a6aeb54d7595bec67986015e916b" => :catalina - sha256 "186357f1d25264be064c11a9aa2f7d7638687b8842a6945f313e576214a0f961" => :mojave - sha256 "0ad5f71f0350706a43d6fe121ad328c9d9fee4595c51ea900a0b9b466e4909b0" => :high_sierra - end - - depends_on "go" => :build - depends_on "libtool" - - def install - ldflags = ["-s", "-w", - "-X github.com/cloudflare/cfssl/cli/version.version=#{version}"] - - system "go", "build", "-o", "#{bin}/cfssl", "-ldflags", ldflags, "cmd/cfssl/cfssl.go" - system "go", "build", "-o", "#{bin}/cfssljson", "-ldflags", ldflags, "cmd/cfssljson/cfssljson.go" - system "go", "build", "-o", "#{bin}/cfsslmkbundle", "cmd/mkbundle/mkbundle.go" - 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 a8ba5a4e559cb..0000000000000 --- a/Formula/cfv.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "cd4fac08aac6490ade28d8b370e006c720bab5df939caadb92b25af278a4384a" => :catalina - sha256 "251348813c0a811e6ac298432967d19e42bfa73bbc3217eaa0b63bec4b78d98d" => :mojave - sha256 "7452ead7901f4f4ab2683cd391af82f856eba1a57c11d07c038ca18507535dac" => :high_sierra - sha256 "449f4b10a0371005f04bffa6271364824a83fbb68cb15208168c19457b987b6e" => :sierra - sha256 "49b83783b5737a364504fdd9fd09672134e0103c7bb8152741d67fca455fde04" => :el_capitan - sha256 "df85f8ee2901bb0b3033a3158d04848bb2fbc455f8af12d7d6eb6869c1471ed9" => :yosemite - sha256 "f251efc545293925f29093f8574495ebbbfe1cbad2a285a7a531e357310e3d1f" => :mavericks - 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 2ca89bbed69f5..0000000000000 --- a/Formula/cgal.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Cgal < Formula - desc "Computational Geometry Algorithms Library" - homepage "https://www.cgal.org/" - url "https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-5.0.2/CGAL-5.0.2.tar.xz" - sha256 "bb3594ba390735404f0972ece301f369b1ff12646ad25e48056b4d49c976e1fa" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "bfe584974efa46ca5cd173265a3978cd1cdc2231479dbd501a0aab27fd664e62" => :catalina - sha256 "e859824afcf819158bfc7d51db142c99d0ca06e37748e1ed46fefb071b421fe4" => :mojave - sha256 "e859824afcf819158bfc7d51db142c99d0ca06e37748e1ed46fefb071b421fe4" => :high_sierra - end - - depends_on "cmake" => [:build, :test] - depends_on "qt" => [:build, :test] - depends_on "boost" - depends_on "eigen" - depends_on "gmp" - depends_on "mpfr" - - on_linux do - depends_on "openssl@1.1" - end - - def install - args = std_cmake_args + %w[ - -DCMAKE_CXX_FLAGS='-std=c++14' - -DWITH_CGAL_Qt5=ON - ] - - system "cmake", ".", *args - system "make", "install" - end - test do - # https://doc.cgal.org/latest/Triangulation_2/Triangulation_2_2draw_triangulation_2_8cpp-example.html and https://doc.cgal.org/latest/Algebraic_foundations/Algebraic_foundations_2interoperable_8cpp-example.html - (testpath/"surprise.cpp").write <<~EOS - #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; - CGAL_static_assertion((CT::Are_explicit_interoperable::value)); - 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 Qt5 at runtime - CGAL::draw(t); - return EXIT_SUCCESS; - } - EOS - (testpath/"CMakeLists.txt").write <<~EOS - cmake_minimum_required(VERSION 3.1...3.15) - find_package(CGAL COMPONENTS Qt5) - add_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS) - add_executable(surprise surprise.cpp) - target_link_libraries(surprise PUBLIC CGAL::CGAL_Qt5) - EOS - system "cmake", "-L", "-DQt5_DIR=#{Formula["qt"].opt_lib}/cmake/Qt5", - "-DCMAKE_BUILD_RPATH=#{HOMEBREW_PREFIX}/lib", "-DCMAKE_PREFIX_PATH=#{prefix}", "." - system "cmake", "--build", ".", "-v" - assert_equal "15\n15", shell_output("./surprise").chomp - end -end diff --git a/Formula/cgdb.rb b/Formula/cgdb.rb deleted file mode 100644 index 7ddf76645cadb..0000000000000 --- a/Formula/cgdb.rb +++ /dev/null @@ -1,38 +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.1.tar.gz" - sha256 "bb723be58ec68cb59a598b8e24a31d10ef31e0e9c277a4de07b2f457fe7de198" - license "GPL-2.0" - - bottle do - sha256 "50abc3a292d69a3a121f3ed7d54d72f4528eb1285faa7f842bb96588a463dc88" => :catalina - sha256 "8f361fcad59ddf4825f4d42b516a099ba75bfffc0b885d42aeb875dbd1b2a1d4" => :mojave - sha256 "9ab4c0a880cb71903094929b04eada3c279a48ddb00b651a8a93d55cd523d380" => :high_sierra - sha256 "db6c63b20e2185ecaaf3ddef92d1ff052f0b0322c727f3f0429ef0d38ac9d269" => :sierra - 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" - - uses_from_macos "flex" => :build - - 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 082eabe536af9..0000000000000 --- a/Formula/cgit.rb +++ /dev/null @@ -1,48 +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" - revision 1 - - bottle do - rebuild 1 - sha256 "6ddf371689a429df59b81cc75ef3c491c58fa1536aeafb41eef0df89196405c6" => :catalina - sha256 "0a8124c41a3e891d8ac8a9dc9391a1048deecb3b82a785d604bbf1d59125b010" => :mojave - sha256 "b5dd8fcf3e81b7d320ea39d9de0b7a3b20b6522978e01f2527e14845d80454c4" => :high_sierra - sha256 "7b21a1dd7536c3354280089b4521fa64e36c2d177303bf5f9ea7994b77a25f2d" => :sierra - end - - depends_on "gettext" - depends_on "openssl@1.1" - - # 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 998a844b81056..0000000000000 --- a/Formula/cglm.rb +++ /dev/null @@ -1,46 +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.7.6.tar.gz" - sha256 "29ff8af4edc03697e36d3e6f99a80b884a80ee09d46055ce45765e5d6b2456d9" - license "MIT" - - bottle do - cellar :any - sha256 "71acb4380ab467ed76133c76d7b971a9914c0ba07b41ad51ee7e5b74334b6861" => :catalina - sha256 "253894ff185a4f8499253543a8cd246dc8958f65746f3319f1e311c0f81feabc" => :mojave - sha256 "683def15df6b8bf55a4954a3427291b559204975b5cdc35d74a18170d4e7db58" => :high_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/cgns.rb b/Formula/cgns.rb deleted file mode 100644 index 4783c9c31b583..0000000000000 --- a/Formula/cgns.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Cgns < Formula - desc "CFD General Notation System" - homepage "http://cgns.org/" - url "https://github.com/CGNS/CGNS/archive/v4.1.1.tar.gz" - sha256 "055d345c3569df3ae832fb2611cd7e0bc61d56da41b2be1533407e949581e226" - revision 2 - head "https://github.com/CGNS/CGNS.git" - - bottle do - cellar :any - sha256 "ac5ed0dcdfd12f7e07c483d355b26d46f8380cfadb069b60d7bee21c12f6d31a" => :catalina - sha256 "e9bcc9d1af96b8ebc5ecb0d5ba16165edf750f75e53b6b81997bb5078b718c68" => :mojave - sha256 "cd64974956ac61d5574db91ceba7bcf99e17981be478864ef7b368340e993025" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "gcc" - depends_on "hdf5" - depends_on "szip" - - uses_from_macos "zlib" - - def install - args = std_cmake_args - args << "-DCGNS_ENABLE_64BIT=YES" if Hardware::CPU.is_64_bit? - args << "-DCGNS_ENABLE_FORTRAN=YES" - args << "-DCGNS_ENABLE_HDF5=YES" - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - - # Avoid references to Homebrew shims - inreplace include/"cgnsBuild.defs", HOMEBREW_LIBRARY/"Homebrew/shims/mac/super/clang", "/usr/bin/clang" - end - - test do - (testpath/"test.c").write <<~EOS - #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; - } - EOS - system Formula["hdf5"].opt_prefix/"bin/h5cc", testpath/"test.c", "-L#{opt_lib}", "-lcgns" - system "./a.out" - end -end diff --git a/Formula/cgoban.rb b/Formula/cgoban.rb deleted file mode 100644 index 47b92c47b187a..0000000000000 --- a/Formula/cgoban.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Cgoban < Formula - desc "Go-related services" - homepage "https://cgoban1.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cgoban1/cgoban1/1.9.14/cgoban-1.9.14.tar.gz" - sha256 "3b8a6fc0e989bf977fcd9a65a367aa18e34c6e25800e78dd8f0063fa549c9b62" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "6b8613fe9566746c60a0ec45830b5c687d54cbaa6107179906248fa6094e856d" => :catalina - sha256 "fd7177595494fb367982e080af14fb7a249d6651a73a1b33f63394f9546fc837" => :mojave - sha256 "38bb87533d7c54253a2836af87c326651dda87c046f3803189308b155651e825" => :high_sierra - end - - depends_on :x11 - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-x" - system "make", "install" - end - - test do - assert_match "version #{version}", shell_output("#{bin}/cgoban --version") - end -end diff --git a/Formula/cgrep.rb b/Formula/cgrep.rb deleted file mode 100644 index 68a67169f6337..0000000000000 --- a/Formula/cgrep.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Cgrep < Formula - desc "Context-aware grep for source code" - homepage "https://github.com/awgn/cgrep" - url "https://github.com/awgn/cgrep/archive/v6.6.32.tar.gz" - sha256 "c45d680a2a00ef9524fc921e4c10fc7e68f02e57f4d6f1e640b7638a2f49c198" - license "GPL-2.0" - revision 1 - head "https://github.com/awgn/cgrep.git" - - bottle do - cellar :any - sha256 "cee7f82d8e3e6b46e2afae649e13cf55202771da2473fbbebc6a712aa2f46496" => :catalina - sha256 "0ac8d5bcfc0ce6d295aa617cf0e5c624c61df4fc28a2ddb8c7b21bf753c7e369" => :mojave - sha256 "55118e5aa9a1999081105f7b2aa3e00793de45623fa61c0e69c6830e598d045a" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.8" => :build - depends_on "pkg-config" => :build - depends_on "pcre" - - def install - system "cabal", "v2-update" - system "cabal", "v2-install", *std_cabal_v2_args - 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 c797b72ab0e38..0000000000000 --- a/Formula/cgvg.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "9ba7bdb16162f2ad7cb462cef5ad939ea15f93c759e272bc9fdf8eb9b1ad8df0" => :catalina - 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/chadwick.rb b/Formula/chadwick.rb deleted file mode 100644 index 2bd9fe1a433d5..0000000000000 --- a/Formula/chadwick.rb +++ /dev/null @@ -1,142 +0,0 @@ -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.7/chadwick-0.7.2/chadwick-0.7.2.tar.gz" - sha256 "f7b3af15281106e101e2ccc4cb182a3f15dbdc3327f2bcb045bfc486a8fda46e" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "693c6ee0980401936a83453bdbc398aeb0eb06ba9bb8e101046508b14edfdc98" => :catalina - sha256 "a068fd25b1e8b3d6f9a56a8a1d4ac18a49f07f82450b1ab3f3766b86fb0a362a" => :mojave - sha256 "427b5c0fca10b23b66c56bda3537080df2ba467edea59a9dfd2f0fba56f50f9b" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" - system "make" - system "make", "install" - end - - test do - date_d = 24 - date_m = 10 - date_y = 2000 - date_m_d_y = "#{date_m}/#{date_d}/#{date_y}" # chadwick's standard output - date_xml = "#{date_y}/#{date_m}/#{date_d}" # chadwick's xml output - 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" } - - # retrosheet "event file" name, chadwick's xml name?, our value - attr_map_info = [ - [:visteam, :visitor, attr[:visitor]], [:hometeam, :home, attr[:home]], - [:site, :site, "ATL02"], [:date, :date, date_xml], [:number, nil, "0"], - [:starttime, :start_time, "8:00PM"], [:daynight, :day_night, "night"], - [:umphome, :umpire_hp, "barkl901"], [:umphp, :umpire_hp, "barkl901"], - [:ump1b, :umpire_1b, "rippm901"], [:ump2b, :umpire_2b, "cedeg901"], - [:ump3b, :umpire_3b, "danlk901"], [:temp, :temperature, "60"], - [:winddir, :wind_direction, "ltor"], [:windspeed, :wind_speed, "8"], - [:timeofgame, :time_of_game, "187"], [:attendance, :attendance, "8"] - ] - - # 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_innings_cnt = exp_ing_ln_score.values[0].size - exp_tmplayers_cnt = 9 # expected player count for each team - - evn_file = testpath/"#{attr[:home]}#{date_y}.EVN" # retrosheet "event file" - evn_file.write "id,#{attr[:game_id]}\nversion,2\n" - - evn_file.open("a") do |f| # info,...,... - attr_map_info.each { |a, _, v| f.puts ["info", a, v].join(",") } - end - - evn_file.append_lines <<~EOS - start,youne003,"Eric Young",0,1,7\nstart,murpd006,"Daniel Murphy",0,2,4 - start,wrigd002,"David Wright",0,3,5\nstart,granc001,"Curtis Granderson",0,4,9 - start,dudal001,"Lucas Duda",0,5,3\nstart,lagaj001,"Juan Lagares",0,6,8 - start,darnt001,"Travis d'Arnaud",0,7,2\nstart,tejar001,"Ruben Tejada",0,8,6 - start,colob001,"Bartolo Colon",0,9,1\nstart,heywj001,"Jason Heyward",1,1,9 - start,uptob001,"B.J. Upton",1,2,8\nstart,freef001,"Freddie Freeman",1,3,3 - start,johnc003,"Chris Johnson",1,4,5\nstart,uptoj001,"Justin Upton",1,5,7 - start,uggld001,"Dan Uggla",1,6,4\nstart,gatte001,"Evan Gattis",1,7,2 - start,simma001,"Andrelton Simmons",1,8,6\nstart,haraa001,"Aaron Harang",1,9,1 - play,1,0,youne003,01,CX,S8/L\nplay,1,0,murpd006,22,C*BBS1FF1>FS,K - play,1,0,wrigd002,00,>B,SB2\nplay,1,0,wrigd002,31,>B.FBBX,63/G - play,1,0,granc001,11,*BCX,3/L\nplay,1,1,heywj001,22,BCFBC,K - play,1,1,uptob001,02,SST,K\nplay,1,1,freef001,01,FX,D8/L - play,1,1,johnc003,10,BX,9/F\nplay,2,0,dudal001,21,BBCX,2/P2F - play,2,0,lagaj001,32,BBSBSS,K\nplay,2,0,darnt001,12,BFCX,9/F - play,2,1,uptoj001,12,CCFBX,8/F\nplay,2,1,uggld001,32,TBFBBX,53/G - play,2,1,gatte001,01,CX,S9/G\nplay,2,1,simma001,02,CCX,9/F - play,3,0,tejar001,31,BBBCB,W\nplay,3,0,colob001,02,LLL,K/BF - play,3,0,youne003,30,B1BBB,W.1-2\nplay,3,0,murpd006,01,CX,9/F.2-3 - play,3,0,wrigd002,00,>C,SB2\nplay,3,0,wrigd002,22,>C.F*B*BB,WP.3-H;2-3 - play,3,0,wrigd002,32,>C.F*B*BB.X,8/F\nplay,3,1,haraa001,02,CSS,K - play,3,1,heywj001,31,BBBCX,7/F\nplay,3,1,uptob001,11,FBX,S7/G - play,3,1,freef001,20,111BB1X,3/L - EOS - - team_file = testpath/"TEAM#{date_y}" # retrosheet "team file" - team_file.write <<~EOS - #{attr[:home]},N,#{attr[:home_city]},#{attr[:home_name]} - #{attr[:visitor]},N,#{attr[:visitor_city]},#{attr[:visitor_name]} - EOS - - ros_file_h = testpath/"#{attr[:home]}#{date_y}.ROS" # retrosheet "roster" - ros_file_h.write <<~EOS - freef001,Freeman,Freddie,L,R,ATL,1B\ngatte001,Gattis,Evan,R,R,ATL,C - haraa001,Harang,Aaron,R,R,ATL,P\nheywj001,Heyward,Jason,L,L,ATL,OF - simma001,Simmons,Andrelton,R,R,ATL,SS\nuggld001,Uggla,Dan,R,R,ATL,2B - uptob001,Upton,B.J.,R,R,ATL,OF\nuptoj001,Upton,Justin,R,R,ATL,OF - johnc003,Johnson,Chris,R,R,ATL,3B - EOS - - ros_file_v = testpath/"#{attr[:visitor]}#{date_y}.ROS" # retrosheet "roster" - ros_file_v.write <<~EOS - colob001,Colon,Bartolo,R,R,NYN,P\ndarnt001,d'Arnaud,Travis,R,R,NYN,C - dudal001,Duda,Lucas,L,R,NYN,OF\ngranc001,Granderson,Curtis,L,R,NYN,RF - lagaj001,Lagares,Juan,R,R,NYN,OF\nmurpd006,Murphy,Daniel,L,R,NYN,3B - tejar001,Tejada,Ruben,R,R,NYN,SS\nwrigd002,Wright,David,R,R,NYN,3B - youne003,Yong,Eric,B,R,NYN,OF - EOS - - # check chadwick's standard output - exec_str = "#{bin}/cwbox -X -q -i #{attr[:game_id]} -y #{date_y} #{evn_file}" - out = shell_output(exec_str.sub("-X", "")) - assert_match "Game of #{date_m_d_y} -- #{attr[:visitor_city]} at #{attr[:home_city]}", out - - # check chadwick's xml output - out_xml = shell_output(exec_str) - require "rexml/document" - doc = REXML::Document.new(out_xml) - assert root = doc.root - - # check the root attributes - attr_map_info.each { |_, ch_at, v| assert v == root.attributes[ch_at.to_s] if ch_at } - attr.each { |ch_at, v| assert v == root.attributes[ch_at.to_s] } - - # check the computed scores - exp_linescore.each { |k, v| assert v == root.elements["linescore"].attributes[k.to_s] } - assert root.elements.to_a("linescore/inning_line_score").size == exp_innings_cnt - - root.elements.to_a("linescore/inning_line_score").each_with_index do |ing_line_score, idx| - exp_ing_ln_score.each do |k, values| - assert ing_line_score.attributes[k.to_s] == values[idx.to_i] - end - end - - # check the player count and that their full names have been fetched from the roster files - assert root.elements["players[@team='#{attr[:visitor]}']"].elements.size == exp_tmplayers_cnt - assert root.elements["players[@team='#{attr[:home]}']"].elements.size == exp_tmplayers_cnt - root.elements.each("players/player") do |e| - assert (!e.attributes["fname"].empty? && !e.attributes["lname"].empty?) - end - end -end diff --git a/Formula/chafa.rb b/Formula/chafa.rb deleted file mode 100644 index af8068948fe0f..0000000000000 --- a/Formula/chafa.rb +++ /dev/null @@ -1,31 +0,0 @@ -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.4.1.tar.xz" - sha256 "46d34034f4c96d120e0639f87a26590427cc29e95fe5489e903a48ec96402ba3" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "f8285220cba2737c58bea611f3c0b653b3c5e1306b8cef3ff33642ed26260fb8" => :catalina - sha256 "a483480366443ac91c52ebab6a06d0995a541098ce163a03c6cef71c0829be1c" => :mojave - sha256 "272891299f7962a49755de583274a21a49759e020418586fa0e7cdfe7c8e2202" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "imagemagick" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - output = shell_output("#{bin}/chafa #{test_fixtures("test.png")}") - assert_equal 4, output.lines.count - end -end diff --git a/Formula/chaiscript.rb b/Formula/chaiscript.rb deleted file mode 100644 index 441511acf33e6..0000000000000 --- a/Formula/chaiscript.rb +++ /dev/null @@ -1,39 +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 "d8f971e8ca36046cb2ddfa59c4a39091bce3cb1178f2be35d4f5a7a98ec2c932" => :catalina - 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 5c6057558a199..0000000000000 --- a/Formula/chakra.rb +++ /dev/null @@ -1,41 +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.20.tar.gz" - sha256 "2d7b70db1ab01cd8c3e519639f560b7787abafe4bc41dfb862095a3573f76f0d" - license "MIT" - - bottle do - cellar :any - sha256 "7ba3b69a2708111e59c5c4523fe6cc86607a6dabf182980d3507d8ae5bfa73e7" => :catalina - sha256 "06e7b9379e81f2151abb8db1858ce3ee29fb22a8971f7ae7224f48889d50cba9" => :mojave - sha256 "3dac54461da29e9849fcc60f25e8a55be79f336d0649d382d26362ab7a0e99f4" => :high_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 8eb692d1eedb4..0000000000000 --- a/Formula/chamber.rb +++ /dev/null @@ -1,32 +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.8.2.tar.gz" - sha256 "7f471abf96c92c619641d7a3fed130cddbd815c9c15fe2f151e6c981f5706584" - license "MIT" - head "https://github.com/segmentio/chamber.git" - - bottle do - cellar :any_skip_relocation - sha256 "8371eee8ce1d24a682597422a12b651ef6cdbabe3ef81c9678ee8f460401d063" => :catalina - sha256 "fe13b0ef1b110c43034f0e4ce3c414c68f199bcc5147ba2dda16608ab6673a05" => :mojave - sha256 "948c865eb11c46e8d662dad8db21f39d53476a99bfb5475aa1fdb68b5cd86201" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w -X main.Version=v#{version}", "-trimpath", "-o", bin/"chamber" - prefix.install_metafiles - 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 52e6d06a97651..0000000000000 --- a/Formula/chapel.rb +++ /dev/null @@ -1,43 +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.22.1/chapel-1.22.1.tar.gz" - sha256 "8235eb0869c9b04256f2e5ce3ac4f9eff558401582fba0eba05f254449a24989" - - bottle do - sha256 "aa7c3e7f089ac71f88c51eb06d0551d78661cb4fadaa86d9807a908c45650df8" => :catalina - sha256 "e722faf3c5f799150134f179d81733830b9b838812bdec77d350e0f752f71a5e" => :mojave - sha256 "9ba754a9f0788efe6ff78a6218773a915078ef798c2a9c72defa12ff18374fd1" => :high_sierra - 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", "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-x86_64/*"] - bin.env_script_all_files libexec/"bin/darwin-x86_64/", :CHPL_HOME => libexec - man1.install_symlink Dir["#{libexec}/man/man1/*.1"] - end - - test do - ENV["CHPL_HOME"] = libexec - cd libexec do - system "util/test/checkChplInstall" - end - end -end diff --git a/Formula/charm-tools.rb b/Formula/charm-tools.rb deleted file mode 100644 index 419f14169208d..0000000000000 --- a/Formula/charm-tools.rb +++ /dev/null @@ -1,280 +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/fd/8d/635a701dc4d942bb50cfb393917b408c07e4ca5485e05efb1d110652fbb1/charm-tools-2.7.5.tar.gz" - sha256 "c567a77f9e6277b9b18677a4a0f660aa949582978ec5541ac20817759c3d30ae" - - bottle do - cellar :any - sha256 "dddb172886d1220f9973ec549d167d1f0ba86b8eaf1f02399be820e7086c8ed5" => :catalina - sha256 "b90b92410de61d3af7cfce211d45d38943f9d991a254a699e4b9321831c122e9" => :mojave - sha256 "93bf33040e5829839cebebd39bcab01a5e4fdf678730fecdca3a93502d333777" => :high_sierra - end - - depends_on "charm" - depends_on "libyaml" - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - depends_on "gmp" - end - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" - sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" - end - - resource "blessings" do - url "https://files.pythonhosted.org/packages/af/4a/61acd1c6c29662d3fcbcaee5ba95c20b1d315c5a33534732b6d81e0dc8e8/blessings-1.6.tar.gz" - sha256 "edc5713061f10966048bf6b40d9a514b381e0ba849c64e034c4ef6c1847d3007" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "Cheetah3" do - url "https://files.pythonhosted.org/packages/50/d5/34b30f650e889d0d48e6ea9337f7dcd6045c828b9abaac71da26b6bdc543/Cheetah3-3.2.5.tar.gz" - sha256 "ececc9ca7c58b9a86ce71eb95594c4619949e2a058d2a1af74c7ae8222515eb1" - end - - resource "colander" do - url "https://files.pythonhosted.org/packages/db/e4/74ab06f54211917b41865cafc987ce511e35503de48da9bfe9358a1bdc3e/colander-1.7.0.tar.gz" - sha256 "d758163a22d22c39b9eaae049749a5cd503f341231a02ed95af480b1145e81f2" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - 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/7d/29/694a3a4d7c0e1aef76092e9167fbe372e0f7da055f5dcf4e1313ec21d96a/distlib-0.3.0.zip" - sha256 "2e166e231a26b36d6dfe35a48c4464346620f8645ed0ace01ee31822b288de21" - end - - resource "distro" do - url "https://files.pythonhosted.org/packages/a6/a4/75064c334d8ae433445a20816b788700db1651f21bdb0af33db2aab142fe/distro-1.5.0.tar.gz" - sha256 "0e58756ae38fbd8fc3020d54badb8eae17c5b9dcbed388b17bb55b8a5928df92" - end - - resource "filelock" do - url "https://files.pythonhosted.org/packages/14/ec/6ee2168387ce0154632f856d5cc5592328e9cf93127c5c9aeca92c8c16cb/filelock-3.0.12.tar.gz" - sha256 "18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59" - end - - resource "httplib2" do - url "https://files.pythonhosted.org/packages/98/3f/0769a851fbb0ecc458260055da67d550d3015ebe6b8b861c79ad00147bb9/httplib2-0.18.1.tar.gz" - sha256 "8af66c1c52c7ffe1aa5dc4bcd7c769885254b0756e6e69f953c7f0ab49a70ba3" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "iso8601" do - url "https://files.pythonhosted.org/packages/45/13/3db24895497345fb44c4248c08b16da34a9eb02643cea2754b21b5ed08b0/iso8601-0.1.12.tar.gz" - sha256 "49c4b20e1f38aa5cf109ddcd39647ac419f928512c869dc01d5c7098eddede82" - 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/fe/6c/a70cd143c77c3a5d6935e6b9e46261e8cab4db7911691650d0bbde8a1a78/jujubundlelib-0.5.6.tar.gz" - sha256 "80e4fbc2b8593082f57de03703df8c5ba69ed1cf73519d499f5d49c51ec91949" - end - - resource "keyring" do - url "https://files.pythonhosted.org/packages/a6/52/eb8a0e13b54ec9240c7dd68fcd0951c52f62033d438af372831af770f7cc/keyring-21.2.1.tar.gz" - sha256 "c53e0e5ccde3ad34284a40ce7976b5b3a3d6de70344c3f8ee44364cc340976ec" - end - - resource "launchpadlib" do - url "https://files.pythonhosted.org/packages/af/23/d97442ef2e13db4648608a9e1a5822b9ff5e25e7f05013b8a57343120e85/launchpadlib-1.10.13.tar.gz" - sha256 "5804d68ec93247194449d17d187e949086da0a4d044f12155fad269ef8515435" - end - - resource "lazr.restfulclient" do - url "https://files.pythonhosted.org/packages/4a/2f/14812d3b0808c594c1e090505229d5ae31d55eb93c23417d91b3a1f57853/lazr.restfulclient-0.14.3.tar.gz" - sha256 "9f28bbb7c00374159376bd4ce36b4dacde7c6b86a0af625aa5e3ae214651a690" - end - - resource "lazr.uri" do - url "https://files.pythonhosted.org/packages/43/54/ec82a2781dab1741ee120fb3e0c95bd3145e2236c34926471b5f78971131/lazr.uri-1.0.4.tar.gz" - sha256 "02838f2328e87e1093528d62ffbd9b540f7f3a2b9d42c7439a29c20db2f831bf" - end - - resource "libcharmstore" do - url "https://files.pythonhosted.org/packages/bc/83/c97392aa3ab2c2fd81a4e8896d986d59f7087342b71fed9d2168ada7589d/libcharmstore-0.0.9.tar.gz" - sha256 "0e82e7c4177b02f342bd85a3c3b1f46d1a0ddb4447e1305d3a3854226946e41e" - end - - resource "macaroonbakery" do - url "https://files.pythonhosted.org/packages/52/40/2a8bb2f507ce1a6c5b896c1b98044d74d34b07a6dd771526b4fe84e3181f/macaroonbakery-1.3.1.tar.gz" - sha256 "23f38415341a1d04a155b4dac6730d3ad5f39b86ce07b1bb134bdda52b48b053" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/fc/c7/829c73c64d3749da7811c06319458e47f3461944da9d98bb4df1cb1598c2/oauthlib-3.1.0.tar.gz" - sha256 "bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889" - 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/f4/65/220bb4075fddb09d5b3ea2c1c1fa66c1c72be9361ec187aab50fa161e576/parse-1.15.0.tar.gz" - sha256 "a6d4e2c2f1fbde6717d28084a191a052950f758c0cbd83805357e6575c2b95c0" - end - - resource "path" do - url "https://files.pythonhosted.org/packages/ff/15/3cb6e963733af47dc11289c20215f78ab5dc090f54cb568b891add332694/path-13.1.0.tar.gz" - sha256 "97249b37e5e4017429a780920147200a2215e268c1a18fa549fec0b654ce99b7" - end - - resource "path.py" do - url "https://files.pythonhosted.org/packages/b9/22/7f03ee0463f6734dd9f6957e7ab15681c9d44a8ce7a13af569a8e3e8d863/path.py-12.4.0.tar.gz" - sha256 "6647ca22523f5e868b110cc3d958be01aa92e662a8241e464f7416779427bf3e" - 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/8a/a8/bb34d7997eb360bc3e98d201a20b5ef44e54098bb2b8e978ae620d933002/pbr-5.4.5.tar.gz" - sha256 "07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c" - end - - resource "protobuf" do - url "https://files.pythonhosted.org/packages/ab/e7/8001b5fc971078a15f57cb56e15b699cb0c0f43b1dffaa2fae39961d80da/protobuf-3.12.2.tar.gz" - sha256 "49ef8ab4c27812a89a76fa894fe7a08f42f2147078392c0dee51d4a444ef6df5" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - 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/cf/5a/25aeb636baeceab15c8e57e66b8aa930c011ec1c035f284170cacb05025e/PyNaCl-1.4.0.tar.gz" - sha256 "54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505" - end - - resource "pyRFC3339" do - url "https://files.pythonhosted.org/packages/00/52/75ea0ae249ba885c9429e421b4f94bc154df68484847f1ac164287d978d7/pyRFC3339-1.1.tar.gz" - sha256 "81b8cbe1519cdb79bed04910dd6fa4e181faf8c88dff1e1b987b5f7ab23a5b1a" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - 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/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/9a/ee/55cd64bbff971c181e2d9e1c13aba9a27fd4cd2bee545dbe90c44427c757/ruamel.yaml-0.15.100.tar.gz" - sha256 "8e42f3067a59e819935a2926e247170ed93c8f0b2ab64526f888e026854db2e4" - end - - resource "SecretStorage" do - url "https://files.pythonhosted.org/packages/a5/a5/0830cfe34a4cfd0d1c3c8b614ede1edb2aaf999091ac8548dd19cb352e79/SecretStorage-2.3.1.tar.gz" - sha256 "3af65c87765323e6f64c83575b05393f9e003431959c9395d1791d51497f29b6" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - 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/9e/44/09471b2abf1cc22a427a8d49e4cfa9049bc18ea2c99d318faffc37b367a3/theblues-0.5.2.tar.gz" - sha256 "a9aded6b151c67d83eb9adcbcb38640872d9f29db985053259afd2fc012e5ed9" - end - - resource "translationstring" do - url "https://files.pythonhosted.org/packages/5e/eb/bee578cc150b44c653b63f5ebe258b5d0d812ddac12497e5f80fcad5d0b4/translationstring-1.3.tar.gz" - sha256 "4ee44cfa58c52ade8910ea0ebc3d2d84bdcad9fa0422405b1801ec9b9a65b72d" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - 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/d2/58/6afb5bd05c610e378eb8f1188896fd0a19dfe99d84613cdb60f2ca5cf0ef/virtualenv-20.0.25.tar.gz" - sha256 "f332ba0b2dfbac9f6b1da9f11224f0036b05cdb4df23b228527c2a2d5504aeed" - end - - resource "wadllib" do - url "https://files.pythonhosted.org/packages/07/d5/2a77dcbb4185d4df41c61a3abccd6e570b652b11973437430cefd65d91ab/wadllib-1.3.4.tar.gz" - sha256 "e995691713d3c795d2b36278de8e212241870f46bec6ecba91794ea3cc5bd67d" - end - - def install - 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 c7efadcc4a153..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.4.0.tar.gz" - sha256 "02f5b9c5211467353dbcf9589ecf70d6e7debf16e3a8b85fa870084525466731" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "8fceac06a83052ab1a67a5845ebc910438105e543677756c774c05b3a03a81c8" => :mojave - sha256 "0b0552a903e6a0a29fbf38c1d2110263df22fd5a12599e36cd60b22bc1dab71e" => :high_sierra - sha256 "1e3250586c714b629398dc02cd1b8168fe0cfe70a8a067d700b8b425f16d2ffa" => :sierra - 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 24dc98d558a31..0000000000000 --- a/Formula/cheapglk.rb +++ /dev/null @@ -1,50 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "91d3c4e89b0750585d52206bf25054eb2db72af798e0d4e1c33021177b92ae13" => :catalina - 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 1282d08ad462e..0000000000000 --- a/Formula/cheat.rb +++ /dev/null @@ -1,32 +0,0 @@ -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/4.0.1.tar.gz" - sha256 "98242fa3efd4b5fd57d6ad7e69a2570e7defacb580e30ae274deec3e1939f494" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "22e47b7e9dfb461e2e9f8c3dac9ead9fe261026a0f4b4ce2b89f490253ea2962" => :catalina - sha256 "c46bf0a127b1fd10e45b26e4fdf88333228f9d230f71190580891acd64a2a7bd" => :mojave - sha256 "78d1fc2437cda33d65afab69eadf4870afcb0ac7a0ff6fbe55ede0af982d52a7" => :high_sierra - end - - depends_on "go" => :build - - conflicts_with "bash-snippets", :because => "both install a `cheat` executable" - - def install - system "go", "build", "-mod", "vendor", "-o", bin/"cheat", "./cmd/cheat" - - bash_completion.install "scripts/cheat.bash" - fish_completion.install "scripts/cheat.fish" - end - - test do - assert_match version.to_s, shell_output("#{bin}/cheat --version") - - output = shell_output("#{bin}/cheat --init 2>&1") - assert_match "editor: vim", output - end -end diff --git a/Formula/check.rb b/Formula/check.rb deleted file mode 100644 index c578d60ad2479..0000000000000 --- a/Formula/check.rb +++ /dev/null @@ -1,36 +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.15.0/check-0.15.0.tar.gz" - sha256 "aea2e3c68fa6e1e92378e744b1c0db350ccda4b6bd0d19530d0ae185b3d1ac60" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "dbc7dd0d84f86a9ad3813a4ad45b076903120f0e3d0cb949c46f2dfc448e7d3c" => :catalina - sha256 "9820eed7640c7e834672ea0a378b37ebc8825b0513de1b06b6321eb51c799686" => :mojave - sha256 "f1f7a1f81a08235f922124a0e833fd9862e9e53931c5113ad543b42c4636a2b6" => :high_sierra - 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/check_postgres.rb b/Formula/check_postgres.rb deleted file mode 100644 index 4157af5dc06d6..0000000000000 --- a/Formula/check_postgres.rb +++ /dev/null @@ -1,32 +0,0 @@ -class CheckPostgres < Formula - desc "Monitor Postgres databases" - homepage "https://bucardo.org/wiki/Check_postgres" - url "https://bucardo.org/downloads/check_postgres-2.25.0.tar.gz" - sha256 "11b52f86c44d6cc26e9a4129e67c2589071dbe1b8ac1f8895761517491c6e44b" - head "https://github.com/bucardo/check_postgres.git" - - bottle do - cellar :any_skip_relocation - sha256 "2f164aefe3706e144350278db4e9246359a8a58bba1f16fae289344553e33b64" => :catalina - sha256 "2f164aefe3706e144350278db4e9246359a8a58bba1f16fae289344553e33b64" => :mojave - sha256 "e0ae2298e162d333e8833ad294906ba369ac5adaf704b8478ebf54c7a134b9f4" => :high_sierra - 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 7af9d4e783b0b..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.20.4.tar.xz" - sha256 "f94fe99c1e70443d9e2dcd58c1e530c182840a8b890c5f9a4f0d4af3bf521b9c" - - 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 6a86480f644e5..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.34/checkstyle-8.34-all.jar" - sha256 "ebbb437784e68983c4d89a7fd09080d092050985564eea3628be289b416bf461" - - 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 = 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/cheops.rb b/Formula/cheops.rb deleted file mode 100644 index d4cd0dd449962..0000000000000 --- a/Formula/cheops.rb +++ /dev/null @@ -1,28 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "df2ae1cf5f9b1b9ec0dc161da4d20fe4b24a5155c87e2c2466cbc26db9fce951" => :catalina - 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/chezmoi.rb b/Formula/chezmoi.rb deleted file mode 100644 index 0b15a37b0d6bb..0000000000000 --- a/Formula/chezmoi.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Chezmoi < Formula - desc "Manage your dotfiles across multiple machines, securely" - homepage "https://chezmoi.io/" - url "https://github.com/twpayne/chezmoi.git", - :tag => "v1.8.3", - :revision => "6d2be34cda3461ddf1211f98fdb10c00a4e18d67" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "bb13d0b336530dc43fb1a9d4049e9ba1bb52c9f4a86b3904b133772c65929642" => :catalina - sha256 "d38518b88a41af06b375d6fa2ab7c028c3b22d2064000d87aa3022b98d3b6f22" => :mojave - sha256 "d90ae59b97acb8e4d98564277dc7d1f12c5028c18a2cd7947a03d1dcdea0bbef" => :high_sierra - end - - depends_on "go" => :build - - def install - commit = Utils.safe_popen_read("git", "rev-parse", "HEAD").chomp - ldflags = %W[ - -s -w - -X main.version=#{version} - -X main.commit=#{commit} - -X main.date=#{Time.now.utc.rfc3339} - -X main.builtBy=homebrew - ].join(" ") - system "go", "build", *std_go_args, "-ldflags", ldflags - - bash_completion.install "completions/chezmoi-completion.bash" - fish_completion.install "completions/chezmoi.fish" - zsh_completion.install "completions/chezmoi.zsh" => "_chezmoi" - - prefix.install_metafiles - end - - test do - # test version to ensure that version number is embedded in binary - assert_match "version #{version}", shell_output("#{bin}/chezmoi --version") - assert_match "built by homebrew", shell_output("#{bin}/chezmoi --version") - - system "#{bin}/chezmoi", "init" - assert_predicate testpath/".local/share/chezmoi", :exist? - end -end diff --git a/Formula/chezscheme.rb b/Formula/chezscheme.rb deleted file mode 100644 index 3708ad2368bd8..0000000000000 --- a/Formula/chezscheme.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Chezscheme < Formula - desc "Chez Scheme" - homepage "https://cisco.github.io/ChezScheme/" - url "https://github.com/cisco/ChezScheme/archive/v9.5.2.tar.gz" - sha256 "3a370fdf2ffd67d6a0ccbb993dfab1cbaf4a0a97983c869cfaab40528c33c48b" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "bdb3d3f12a298ea57126c21264fefbec72d45b15cd6274d458c401ab96a2abd3" => :catalina - sha256 "22a69bfdc7cc44396429124104397dc5377b4e1b184064c8adec33bd0ff6203d" => :mojave - sha256 "3ce7b28cde766fe8b6f4c517182b5c21f38371108839712ac85c94f3fcd4a07a" => :high_sierra - sha256 "e26d93d7b1c4bfefa3238809c81cfe6b30a3d0fd57e716bb712a1258cb05d5f9" => :sierra - end - - depends_on :x11 => :build - uses_from_macos "ncurses" - - 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.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 ba64b17fd8e2c..0000000000000 --- a/Formula/chgems.rb +++ /dev/null @@ -1,28 +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" - license "MIT" - head "https://github.com/postmodern/chgems.git" - - bottle do - cellar :any_skip_relocation - sha256 "aae71d51be9dea4a7109bcf94073a772038ae50f32cd0eec51179aa554029e01" => :catalina - 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 aee109ac9d4d4..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 "https://github.com/ashinn/chibi-scheme" - url "https://github.com/ashinn/chibi-scheme/archive/0.8.tar.gz" - sha256 "8a077859b123216c123c243db391b0fe4c0cf73978c7cdd7b8ea853a48192756" - revision 1 - head "https://github.com/ashinn/chibi-scheme.git" - - bottle do - sha256 "f282470572fc6498ab24bf3fae1239eb7cc89b424251446dc8bf8063bbd99aea" => :catalina - sha256 "5cfc8a336bc76a1a268d2af908dd3f78a40cd87aedae92258b1ebb5755409cd9" => :mojave - sha256 "f5380c4a6d6fb13f6937117da61e71a088897fd53bbbeaa12fdab5cf41bc5540" => :high_sierra - 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 eb5ec2bcdc74d..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.2.0/chicken-5.2.0.tar.gz" - sha256 "819149c8ce7303a9b381d3fdc1d5765c5f9ac4dee6f627d1652f47966a8780fa" - head "https://code.call-cc.org/git/chicken-core.git" - - bottle do - sha256 "674b9d864481f15a5b406c1ef2e1dfce8ee584a100edf2501a096afee44ad396" => :catalina - sha256 "3d35a95b8296a8e37c5bbaf5d77188684adcccc7f3f3d77e73c6c3e9ac566f86" => :mojave - sha256 "17b093038bb0845a2687c1294288a11992f4e2279a64c93ef0e2c80977a1d882" => :high_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 b02bf04851aa3..0000000000000 --- a/Formula/chinadns-c.rb +++ /dev/null @@ -1,34 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "0c4820f0e5a12421b0e64c3cb993608560817a446b8747e7119838cb271b9044" => :catalina - sha256 "61ccebe523d9e2417385c911beca6a01ee7d2810f1a665fca9a4f6a0e7b81623" => :mojave - sha256 "5b0b51abe8a40dee4b1296e81da179aff05ba42befc869e06e081d7e6fc4e726" => :high_sierra - sha256 "fa51351f3cdfb63fa672d2011c08ac8a1f9a260bcfaacb13e4657f39e721b96f" => :sierra - sha256 "a620bce8421a9773233c51886c6845995569a1fda80e252efa86f6271c1d274c" => :el_capitan - sha256 "329351a4f82e4f871cbc2b384902b0c84040bd1df222970d67be7513bbead207" => :yosemite - sha256 "4266825a8ecbb6a84d459b41465fe9318a918b171880ac8ddfd8bdf3e37573d1" => :mavericks - 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 bdce7fb2f8517..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.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" - - bottle do - cellar :any - sha256 "b71191c2c1e4859cb9d5e77b8684612dec1c191780a0b1d56afc04ada66da036" => :catalina - sha256 "16292e5518bae60c6990a6f1565e1416f91ffe1c878ab43b58465bb2a24d3d11" => :mojave - sha256 "5370b9d8db489d6b8944c23fd4906768c84d87e22f054ca3381c7ee527233f4d" => :high_sierra - sha256 "c92a9c1134a272244ca3936b2c94431df7ed7002a9eec99f6914fe1128adae12" => :sierra - 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 be6c41909290b..0000000000000 --- a/Formula/chisel.rb +++ /dev/null @@ -1,43 +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/2.0.0.tar.gz" - sha256 "e2ededa84fbe68904f01ff12f2c9607a87626e33c17ed35989278f15c3543385" - license "MIT" - head "https://github.com/facebook/chisel.git" - - bottle do - cellar :any - sha256 "77635fc7ebef3451a9f81eb942d380c39990866eb7e1ca134efdcd9bc0c3f02c" => :catalina - sha256 "458800fbdac364534efa7105a17294125b58b5f929b6993bc7893e01a157e6cc" => :mojave - sha256 "596ef36832b696a736d8b47b6d0a27893dc74be2e999e80dbb7893ec79ca9ea5" => :high_sierra - end - - def install - libexec.install Dir["*.py", "commands"] - - # == 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 afb77be799622..0000000000000 --- a/Formula/chkrootkit.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Chkrootkit < Formula - desc "Rootkit detector" - homepage "http://www.chkrootkit.org/" - url "ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit-0.53.tar.gz" - mirror "https://fossies.org/linux/misc/chkrootkit-0.53.tar.gz" - sha256 "7262dae33b338976828b5d156b70d159e0043c0db43ada8dee66c97387cf45b5" - - bottle do - cellar :any_skip_relocation - sha256 "23a9f903721d19c0b6201163cb937823970c66592f094c673b1de1036da8bef9" => :catalina - sha256 "286de88eef77a53b9c7fab85ef3cec8b9876cf49a48910cbb591e44c9ca5d631" => :mojave - sha256 "55ab9957505513fd81d670c54e5ad1834fb72ae9cda7bd7cbc63f98feeccf24a" => :high_sierra - sha256 "f16966e93433cb877b04be8ea086c8a23905290643099229ffa3d665b2d11994" => :sierra - 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 145d60eb0ed58..0000000000000 --- a/Formula/chmlib.rb +++ /dev/null @@ -1,25 +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" - license "LGPL-2.1" - - bottle do - cellar :any - rebuild 2 - sha256 "96d7cb33260c72012f24f383054b7f2505f815f0e3e24298229b5712f8a66cfa" => :catalina - sha256 "1718a0a9343788718b4207596ebff457f5214879319292cc1608254374720944" => :mojave - sha256 "426b95744d071ad76399ee240400ab74bcec9057735cbfeb2d433501105060ef" => :high_sierra - sha256 "9781c76f933beca002df542d2db0644e51766568d9399f9e73dc39b9e896f539" => :sierra - sha256 "6b834a6ae6e95f8daaa726fd6ae1a2d3e60335f98862fea9e790c24e5a6411d1" => :el_capitan - sha256 "bdc19058cbf1690e960bd88d06f6c8b2ff47f8b743947eb82c259ba394881a65" => :yosemite - sha256 "366c564a2cd0185d84ff6892f5d773f80ddee50f6db39e763060b3ebb31413b3" => :mavericks - 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 77b46a49b0191..0000000000000 --- a/Formula/chocolate-doom.rb +++ /dev/null @@ -1,54 +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.1/chocolate-doom-3.0.1.tar.gz" - sha256 "d435d6177423491d60be706da9f07d3ab4fabf3e077ec2a3fc216e394fcfc8c7" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "91f8a622d0299afd99d6eb4768184100addb0d1a804683aa6486548ed5a14d8d" => :catalina - sha256 "9090cd83e434977b523647ea125b5de78ca8c2b434f1933a606200999e137a30" => :mojave - sha256 "c4799300dc6c4b10d68e0764cb57eec612fbe3d07a2ce7eeb0cf6bc60905a687" => :high_sierra - 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 f464c4478a44c..0000000000000 --- a/Formula/choose-gui.rb +++ /dev/null @@ -1,28 +0,0 @@ -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/1.1.tar.gz" - sha256 "cd921cfa6a7b7e976716c33dd8c800a06f41e88e12e385cd7b1ad5edc63578f2" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "397e6aaafb87524e0baa3f52376814a3d5e5dcf87e909719116742b57a513e4b" => :catalina - sha256 "b1f2b4a734d1cb3eca56eddac1a0a0c89a1bb1a57f4b3412843e971fd24a01ad" => :mojave - sha256 "7b5031da703f0297a387fc3f8220e28070b120c91ae4989327164955eedc56d6" => :high_sierra - end - - depends_on :xcode => :build - - conflicts_with "choose", :because => "both install a `choose` binary" - conflicts_with "choose-rust", :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-rust.rb b/Formula/choose-rust.rb deleted file mode 100644 index b94e584a2fa4b..0000000000000 --- a/Formula/choose-rust.rb +++ /dev/null @@ -1,27 +0,0 @@ -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/v1.3.0.tar.gz" - sha256 "95889215c57e3be9ea14b929f8a09858c740b1e78c608c2096812ce420eb099a" - - bottle do - cellar :any_skip_relocation - sha256 "5fc92343f3271b68c34297dc3b5be11c613cbbe3859a19b0fa77458e3a4c4062" => :catalina - sha256 "8ae1baa55d848f0cbdb3833ce5cc257870b0f4edd84e7d0e61c84ebd3ba1b510" => :mojave - sha256 "d8a10d3ad72b6b5c80f3656e2bab071eab67ba225959518283c1940d19707fd7" => :high_sierra - end - - depends_on "rust" => :build - - conflicts_with "choose", :because => "both install a `choose` binary" - 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/choose.rb b/Formula/choose.rb deleted file mode 100644 index 8c16eb281f3e6..0000000000000 --- a/Formula/choose.rb +++ /dev/null @@ -1,47 +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" - license "MIT" - revision 2 - head "https://github.com/geier/choose.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "add76ddd5165ad17bfc784dff7237777eac7ee898379bd55d76228e6f6897d6d" => :catalina - sha256 "74170f2582ab4a29bffcc34583017f97f39c5b600a5f5cfebacd6d66ecd5c818" => :mojave - sha256 "388b64e8072a54f01006ab9cad297789eda36fe0bec83b45759cfe80dbf8cb2c" => :high_sierra - end - - depends_on "python@3.8" - - conflicts_with "choose-gui", :because => "both install a `choose` binary" - conflicts_with "choose-rust", :because => "both install a `choose` binary" - - resource "urwid" do - url "https://files.pythonhosted.org/packages/45/dd/d57924f77b0914f8a61c81222647888fbb583f89168a376ffeb5613b02a6/urwid-2.1.0.tar.gz" - sha256 "0896f36060beb6bf3801cb554303fef336a79661401797551ba106d23ab4cd86" - 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 6ee2f1046f6d5..0000000000000 --- a/Formula/chordii.rb +++ /dev/null @@ -1,33 +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.3b.tar.gz" - sha256 "edb19be9de456366e592a75a5ce1c0a75352a55d5b4e5f282c953c7e7f2d87b5" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "ed1f635a737973af4b9f4f784757cdf0ddbb3f946cb285917c171392a9b59d4a" => :catalina - sha256 "def6b665fba55dfb8fa30269966e059b0a827f62a2338f73ea89c47a42fa7de7" => :mojave - sha256 "1901080a06bb4728ec9858e4e548f68e044534b9d65dee1996f0590b56abc1a9" => :high_sierra - 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 e27199516d892..0000000000000 --- a/Formula/chromaprint.rb +++ /dev/null @@ -1,27 +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.5.0/chromaprint-1.5.0.tar.gz" - sha256 "573a5400e635b3823fc2394cfa7a217fbb46e8e50ecebd4a61991451a8af766a" - revision 3 - - bottle do - cellar :any - sha256 "8693666d997e651672c56e619fb9a024d7f839748625cf481028600010f37ab3" => :catalina - sha256 "eebfcab3bf0e6534a89b8a69c2cfa3d89b4c4f6114351e8cc3a368c4220d31b5" => :mojave - sha256 "f47fb0b6d7cb0f7b6f974a8ec2f85c9c1afe1cbb553a87dbf0c47742f5db7e72" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "ffmpeg" - - def install - system "cmake", "-DCMAKE_BUILD_TYPE=Release", "-DBUILD_TOOLS=ON", ".", *std_cmake_args - system "make", "install" - 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/chrome-cli.rb b/Formula/chrome-cli.rb deleted file mode 100644 index e33bbd6043042..0000000000000 --- a/Formula/chrome-cli.rb +++ /dev/null @@ -1,43 +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" - license "MIT" - head "https://github.com/prasmussen/chrome-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "dcbd7ddb868c433f456921994be98e77d14bad4b51f3b1d5940def7bd845e7f5" => :catalina - sha256 "45226a0320842d8e3d717ffdf6e8828b9d1b5f52609757670f4d542fd722ee68" => :mojave - sha256 "b34f789eefdbb6312b05e4e55a71e9deaf889fe740e2d976cdf4279a0d74dd36" => :high_sierra - sha256 "31abf08f56dc906ec882cb4d7dc167424177c8849b8de8ecb71098afb249fc84" => :sierra - sha256 "e1d04616371d4c7147f884886d2e61df3bdea48c388dc50a684434f89b417792" => :el_capitan - end - - depends_on :xcode => :build - - 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 d1a5e7a01a274..0000000000000 --- a/Formula/chrome-export.rb +++ /dev/null @@ -1,31 +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.2.tar.gz" - sha256 "41b667b407bc745a57105cc7969ec80cd5e50d67e1cce73cf995c2689d306e97" - license "ISC" - revision 1 - - bottle :unneeded - - def install - bin.install "export-chrome-bookmarks" - bin.install "export-chrome-history" - man1.install "man_pages/export-chrome-bookmarks.1" - man1.install "man_pages/export-chrome-history.1" - 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 023a10cba2131..0000000000000 --- a/Formula/chronograf.rb +++ /dev/null @@ -1,81 +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.8.5.tar.gz" - sha256 "62a77dd6804ce29ed87fc87a503bc2f4d8a96478b9d4e571f10b0df91a036a60" - head "https://github.com/influxdata/chronograf.git" - - bottle do - cellar :any_skip_relocation - sha256 "08a2e6286b2ed6439746b99515a8b5d743d9995d5e1d9b07b444403c5dd79549" => :catalina - sha256 "88bb43f520b435bb2d1e62c303cb9561f36243a491f3700b863b407f50214b8c" => :mojave - sha256 "eeadc6aba17c24a984350975fb08431eceb821f5d5add563e691bdee0284fad0" => :high_sierra - end - - depends_on "go" => :build - depends_on "go-bindata" => :build - depends_on "node" => :build - depends_on "yarn" => :build - depends_on "influxdb" - depends_on "kapacitor" - - def install - Language::Node.setup_npm_environment - - cd "ui" do # fix compatibility with the latest node - system "yarn", "upgrade", "parcel@1.11.0" - end - system "make", "dep" - system "make", ".jssrc" - system "make", "chronograf" - bin.install "chronograf" - 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 - 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/chrony.rb b/Formula/chrony.rb deleted file mode 100644 index 5fcdcd456d112..0000000000000 --- a/Formula/chrony.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Chrony < Formula - desc "Versatile implementation of the Network Time Protocol (NTP)" - homepage "https://chrony.tuxfamily.org/" - url "https://download.tuxfamily.org/chrony/chrony-3.5.tar.gz" - sha256 "4e02795b1260a4ec51e6ace84149036305cc9fc340e65edb9f8452aa611339b5" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "c9dcac360bb8b69012e963df7dcf34fa50b944bd419ce4d9c28d729cc6787ce4" => :catalina - sha256 "946bc4e955230a22006204b3bea76ae4f5b3bd186f94fad91e3fc4d5c10b7a02" => :mojave - sha256 "856b8ccc137b877687e7054b28e160b0ecd7b5b94a76b6d4a6978258dbf619e4" => :high_sierra - end - - depends_on "nettle" - - uses_from_macos "libedit" - - def install - system "./configure", "--prefix=#{prefix}", - "--localstatedir=#{var}" - system "make", "install" - end - - test do - (testpath/"test.conf").write "pool pool.ntp.org 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/chruby-fish.rb b/Formula/chruby-fish.rb deleted file mode 100644 index 8bcc80acc9c73..0000000000000 --- a/Formula/chruby-fish.rb +++ /dev/null @@ -1,27 +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" - license "MIT" - head "https://github.com/JeanMertz/chruby-fish.git" - - bottle do - cellar :any_skip_relocation - sha256 "e604e4c2114b462ff23291677a171e77284dccb7a3a0444f26dc293c01890f91" => :catalina - 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 fc92da09e0af5..0000000000000 --- a/Formula/chruby.rb +++ /dev/null @@ -1,38 +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" - license "MIT" - head "https://github.com/postmodern/chruby.git" - - bottle do - cellar :any_skip_relocation - sha256 "004f825f798a41ffb3c9576aa3b77e7b8cef227287725818f5d3f1a779b12de6" => :catalina - 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 20ac921239e18..0000000000000 --- a/Formula/chuck.rb +++ /dev/null @@ -1,26 +0,0 @@ -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.4.0.1.tgz" - sha256 "11a20c34b385e132bf43d5ae6a562c652f631828cc6b1562a4c029bc9a850ed4" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "95574b4ee2d10154b683e9b506e3ea83f7038e5b8a8a5b8eacfabd80006ffba0" => :catalina - sha256 "d55689ced88b9cf3a280b39b6a0a92ab33f7b834f6d6c704b5ac57fe755f0dc3" => :mojave - sha256 "bf6caf2f7ecd22b43afca372f0fd7e26fab5145aee922725ddbb237039cd1883" => :high_sierra - end - - depends_on :xcode => :build - - def install - 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 a88ccfd415224..0000000000000 --- a/Formula/cidrmerge.rb +++ /dev/null @@ -1,33 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "5828da34c41143336cced7cc8051efd63d525c1a1a4788c6c1235d4bc75cf3df" => :catalina - sha256 "aa994dfc09a72377c001b0f94a0d8674034fe626e2d1a8bba0d6d514e849564b" => :mojave - sha256 "61d2b647e77f706f53ef22dcb1ad362d39bed01f2bed08270bc6110824233146" => :high_sierra - sha256 "8f2cf233141b0ea465c05d3487718176bb40023a05ecf7c275fdae9c36a5eef1" => :sierra - sha256 "7e607252679cd1648e6c9f48ebbeaa2379ce089ad87815bd6636e65dcedebc7b" => :el_capitan - sha256 "20c6f57fc6081c8d27d2e68b81e3d4c5cd68e7c799dc30e076f45ee71b42e69d" => :yosemite - sha256 "89b2d5b31bd190e0aa8837b84f3a684cf01b4501321e898507e5d8dd809f09d7" => :mavericks - 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 c93090258978a..0000000000000 --- a/Formula/cifer.rb +++ /dev/null @@ -1,30 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "ce4a7d9b846388eae2309dbd0a1f0493b533cbefef85ae50ff97648b6a46600c" => :catalina - sha256 "ed647fac83a0f0605c4fbf0492be1568199a60473e20ac455feb4ff1abea1946" => :mojave - sha256 "04d95a6448d38450079196139c6e6d5b5811265444c9abf8fe93b7424181a222" => :high_sierra - sha256 "875e676d7866fd3ba2c8b70806838068775ffbc1102c56ca52d041155b2ade43" => :sierra - sha256 "86cbc00f11a5818f48ee67bdc0fa5f2692cc7f37ae6c2c5eb237338c7dc6919b" => :el_capitan - sha256 "bde7d97d9ef2a07c481ff8c5ec717fb2ec455fdef864db2a1a7b3056aa1934d2" => :yosemite - sha256 "f4e2f4024a8daf1e2a1fc071113947561c803503fa242b7df7970e8979cf10be" => :mavericks - 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 2886c8223d700..0000000000000 --- a/Formula/cig.rb +++ /dev/null @@ -1,37 +0,0 @@ -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" - license "MIT" - head "https://github.com/stevenjack/cig.git" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "bb93970229fc7a62a6ca4b0c446ad36f135d2160aa0dce04fa5afbdc072291d3" => :catalina - sha256 "6ae38e73bed4326d85c7f31498b0a5715d877c7a2e32aad9987ba7726efe240e" => :mojave - sha256 "9215f225d4b314d1047f6bb4e5c909b82b456d2005fffed8c637ca2d63641791" => :high_sierra - sha256 "5d4eb1f34f8b185513d59dc9072f1a95555dd222f0f7a0526c89983e1643fef6" => :sierra - end - - depends_on "go" => :build - depends_on "godep" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/stevenjack").mkpath - ln_s buildpath, "src/github.com/stevenjack/cig" - system "godep", "restore" - system "go", "build", "-o", bin/"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 936aedb3b69f3..0000000000000 --- a/Formula/cimg.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Cimg < Formula - desc "C++ toolkit for image processing" - homepage "https://cimg.eu/" - url "https://cimg.eu/files/CImg_2.9.1.zip" - sha256 "5b5b9e57e8920c3291c80d6a604c1a40d2e0e4a038ec04a6c07b39f176c13200" - - 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", "image2ascii" - system "examples/image2ascii" - end -end diff --git a/Formula/circleci.rb b/Formula/circleci.rb deleted file mode 100644 index 52dba4a4c3cb2..0000000000000 --- a/Formula/circleci.rb +++ /dev/null @@ -1,51 +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.8599", - :revision => "d6e83e78520892de88019005ebf071f671283113" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "3a26df6b9686727e98418ffc3eb28c83689e202d9360d56eaebe358586be074e" => :catalina - sha256 "df2b01078f81928ebff0a17b9580a0105ab1ac5606513db5661fd56539c584af" => :mojave - sha256 "8aba332a6953247117def80ddd864c7c04d72876cf8389ac8f5436604beb44a4" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - dir = buildpath/"src/github.com/CircleCI-Public/circleci-cli" - dir.install buildpath.children - - cd dir do - commit = Utils.safe_popen_read("git", "rev-parse", "--short", "HEAD").chomp - ldflags = %W[ - -s -w - -X github.com/CircleCI-Public/circleci-cli/version.packageManager=homebrew - -X github.com/CircleCI-Public/circleci-cli/version.Version=#{version} - -X github.com/CircleCI-Public/circleci-cli/version.Commit=#{commit} - ] - system "make", "pack" - 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 - (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") - 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 d65ac882521be..0000000000000 --- a/Formula/citus.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Citus < Formula - desc "PostgreSQL-based distributed RDBMS" - homepage "https://www.citusdata.com/" - url "https://github.com/citusdata/citus/archive/v9.3.2.tar.gz" - sha256 "2455135d9186140363530f160a9d6bebabec36273efd7c2fab9f824387f8625f" - license "AGPL-3.0" - head "https://github.com/citusdata/citus.git" - - bottle do - cellar :any - sha256 "8bd267b5e781d6bedb24ced94d6f420f8ea712698813a30619afa8f1288937e7" => :catalina - sha256 "e2ae5075f1b400a6e57997e0e2087635ad3de13a353d30550d5d59389bf19d4b" => :mojave - sha256 "fb6eb7fb42077c25885a165f9ab978d24ea12b4a429f13a776fa11984df31c00" => :high_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 - return if ENV["CI"] - - 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 da745b6acd693..0000000000000 --- a/Formula/cityhash.rb +++ /dev/null @@ -1,39 +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" - license "MIT" - - bottle do - cellar :any - sha256 "ddca5903f40b8ec22ca0a2da4f116a03dc45d0f383c508f4f0370cd5899b80c3" => :catalina - 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 7d7b5de6d7e49..0000000000000 --- a/Formula/cjdns.rb +++ /dev/null @@ -1,31 +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.7.tar.gz" - sha256 "de8a9d1afacfa1147bb12bda6d382f30437d424c75d04a7895c2ccdad4d26284" - license "GPL-3.0" - head "https://github.com/cjdelisle/cjdns.git" - - bottle do - cellar :any_skip_relocation - sha256 "fdb020edfdc373f79126dc0a6044eeaefb9c437093c4ddda3348f3e84aa08453" => :catalina - sha256 "bd9dc1b933a12a0523dd03d313c15c28d91ab9161ae1c4455fe2d53e228492e9" => :mojave - sha256 "e71b7e72ae93a10a1cc26c39ef866d46dda116a0fe50ecb452a257ad631d3a29" => :high_sierra - end - - depends_on "node" => :build - - def install - system "./do" - bin.install "cjdroute" - (pkgshare/"test").install "build_darwin/test_testcjdroute_c" => "cjdroute_test" - rm_f "build_darwin/test_testcjdroute_c" - (pkgshare/"test").install "build_darwin" - end - - test do - cp_r pkgshare/"test/cjdroute_test", testpath - cp_r pkgshare/"test/build_darwin", testpath - system "./cjdroute_test", "all" - end -end diff --git a/Formula/cjson.rb b/Formula/cjson.rb deleted file mode 100644 index 761f945a16cf4..0000000000000 --- a/Formula/cjson.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Cjson < Formula - desc "Ultralightweight JSON parser in ANSI C" - homepage "https://github.com/DaveGamble/cJSON" - url "https://github.com/DaveGamble/cJSON/archive/v1.7.13.tar.gz" - sha256 "d4e77a38f540f2c37f55758f2666655314f1f51c716fea5f279659940efdcf04" - license "MIT" - - bottle do - cellar :any - sha256 "082bbc54aa1bf574900bc7ee017435d01888fd854953c6de1a6d62124fcd5306" => :catalina - sha256 "71a46c6fb3f06ed82cbb3009b5daed3b1083c6e7240760230ba900cb80267912" => :mojave - sha256 "76bde53a90ac3e1d62ae20283170392948bfce48046c6204e1114c1624dfa4aa" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", "-DENABLE_CJSON_UTILS=On", "-DENABLE_CJSON_TEST=Off", - "-DBUILD_SHARED_AND_STATIC_LIBS=On", ".", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #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; - } - EOS - system ENV.cc, "-L#{lib}", "-lcjson", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/ckan.rb b/Formula/ckan.rb deleted file mode 100644 index 9c0e18e025e60..0000000000000 --- a/Formula/ckan.rb +++ /dev/null @@ -1,28 +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.27.2/ckan.exe" - sha256 "57d487f8a81ed225eacc46b37a53cb3a8ff44057d6557b68e132b6669697d1af" - - 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 6f1b66ab6798a..0000000000000 --- a/Formula/cksfv.rb +++ /dev/null @@ -1,30 +0,0 @@ -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.14.tar.bz2" - sha256 "8f3c246f3a4a1f0136842a2108568297e66e92f5996e0945d186c27bca07df52" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ee0e6d47bba7ece1e9d3f89db630ba943d2e85834d1b2c7c4307e449f8de517f" => :catalina - 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 fcc89ada6a826..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.3.tar.gz" - sha256 "e751e31bd2d3cdf6daa80da0ea7761630767aa22df6954df35997d1fcc5fa8ae" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "afa69f51c57695ae2e01a3ad9a44690fa746e925129ab2809550811cafe0fb3f" => :catalina - sha256 "af0e4194b84f969e0a701f32c102dd64a432f6f675e6913716b81b96e548d451" => :mojave - sha256 "5be5ed82ad0b8669aef16942e39e9d60341ab6201ee019b9b997ab5ee4ea76b1" => :high_sierra - 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 2ee2c1f6c7236..0000000000000 --- a/Formula/clamav.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Clamav < Formula - desc "Anti-virus software" - homepage "https://www.clamav.net/" - url "https://www.clamav.net/downloads/production/clamav-0.102.3.tar.gz" - mirror "https://fossies.org/linux/misc/clamav-0.102.3.tar.gz" - sha256 "ed3050c4569989ee7ab54c7b87246b41ed808259632849be0706467442dc0693" - revision 1 - - bottle do - sha256 "2bb5ea7de66e798672e5f9a6bb49bb2d0f3f723a655fe365a5f12322567c6ef3" => :catalina - sha256 "c5dc15e28ffab603fea38b1e22fda3023384ae654544554f40d75038b7cb4318" => :mojave - sha256 "fd1d05cd3c62e0af9ee1a7b9b875d0f8ce776d4a4022c0fb3b184a806669abb0" => :high_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 "json-c" - depends_on "libiconv" - depends_on "openssl@1.1" - depends_on "pcre2" - depends_on "yara" - - uses_from_macos "bzip2" - uses_from_macos "curl" - uses_from_macos "libxml2" - uses_from_macos "zlib" - - skip_clean "share/clamav" - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --libdir=#{lib} - --sysconfdir=#{etc}/clamav - --disable-zlib-vcheck - --with-llvm=no - --with-libiconv-prefix=#{Formula["libiconv"].opt_prefix} - --with-iconv=#{Formula["libiconv"].opt_prefix} - --with-libjson=#{Formula["json-c"].opt_prefix} - --with-openssl=#{Formula["openssl@1.1"].opt_prefix} - --with-pcre=#{Formula["pcre2"].opt_prefix} - --with-zlib=#{MacOS.sdk_path_if_needed}/usr - --with-libbz2-prefix=#{MacOS.sdk_path_if_needed}/usr - --with-xml=#{MacOS.sdk_path_if_needed}/usr - ] - - 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 f4468e9269f00..0000000000000 --- a/Formula/clamz.rb +++ /dev/null @@ -1,30 +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 "6dc5a22ec8b190b91bc3e825a23063f6096f447ed24cabf6d5bcb19da8ef58f3" => :catalina - 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 93de40b0a1dcd..0000000000000 --- a/Formula/clang-format.rb +++ /dev/null @@ -1,69 +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_scheme 1 - head "https://github.com/llvm/llvm-project.git" - - stable do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/llvm-10.0.0.src.tar.xz" - sha256 "df83a44b3a9a71029049ec101fb0077ecbbdf5fe41e395215025779099a98fdf" - - resource "clang" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang-10.0.0.src.tar.xz" - sha256 "885b062b00e903df72631c5f98b9579ed1ed2790f74e5646b4234fa084eacb21" - end - - resource "libcxx" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/libcxx-10.0.0.src.tar.xz" - sha256 "270f8a3f176f1981b0f6ab8aa556720988872ec2b48ed3b605d0ced8d09156c7" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "7a2d877df6d298cba78b2ea3e543b5a874cf7af853538d9e1ae4b74b5f69bb65" => :catalina - sha256 "91e010b88d1779626bd693c6df0da1e10156887bc5bc2d3ed6500965ea66ec96" => :mojave - sha256 "dc9b3fe7f1b043286fb5554d26a70defabf0aa668b2861624451005c9593eca3" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "ninja" => :build - - uses_from_macos "libxml2" - uses_from_macos "ncurses" - uses_from_macos "zlib" - - def install - if build.head? - ln_s buildpath/"libcxx", buildpath/"llvm/projects/libcxx" - ln_s buildpath/"clang", buildpath/"llvm/tools/clang" - else - (buildpath/"projects/libcxx").install resource("libcxx") - (buildpath/"tools/clang").install resource("clang") - end - - llvmpath = build.head? ? buildpath/"llvm" : buildpath - - mkdir llvmpath/"build" do - args = std_cmake_args - args << "-DLLVM_ENABLE_LIBCXX=ON" - args << ".." - system "cmake", "-G", "Ninja", *args - system "ninja", "clang-format" - end - - bin.install llvmpath/"build/bin/clang-format" - bin.install llvmpath/"tools/clang/tools/clang-format/git-clang-format" - (share/"clang").install Dir[llvmpath/"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 b3068d61bb9bd..0000000000000 --- a/Formula/classads.rb +++ /dev/null @@ -1,25 +0,0 @@ -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" - - bottle do - cellar :any - rebuild 1 - sha256 "9803231cebf936ef95bd86c820a7f3ba832c56109ad8a527ac5786d1d6150234" => :catalina - 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/claws-mail.rb b/Formula/claws-mail.rb deleted file mode 100644 index c7078a6db1ada..0000000000000 --- a/Formula/claws-mail.rb +++ /dev/null @@ -1,34 +0,0 @@ -class ClawsMail < Formula - desc "The user-friendly, lightweight, and fast email client" - homepage "https://www.claws-mail.org/" - url "https://www.claws-mail.org/releases/claws-mail-3.17.5.tar.gz" - sha256 "f79e4c7f089d08e6b2b3323a90b6f46991a154ce168ba4a829d593b7a5768c7b" - revision 1 - - bottle do - sha256 "4bcd9ef99cb4d5bae16955d0e233bdb7587dd9e4d752a157ff4becd76f7c6c10" => :catalina - sha256 "a9e585254e35406a81cedec91987b99df7f3ca5fcc0e5275fddb057fd7029199" => :mojave - sha256 "5c95e783f0a6af22de1dce7a268c891733fda3b8e49e0c0c6a86ba2c3149fab1" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "glib" - depends_on "gnutls" - depends_on "gtk+" - depends_on "libetpan" - depends_on "nettle" - - def install - system "./configure", "--prefix=#{prefix}", - "LDFLAGS=-Wl,-framework -Wl,Security", - "--disable-archive-plugin", - "--disable-dillo-plugin", - "--disable-notification-plugin" - system "make", "install" - end - - test do - assert_equal ".claws-mail", shell_output("#{bin}/claws-mail --config-dir").strip - end -end diff --git a/Formula/clblas.rb b/Formula/clblas.rb deleted file mode 100644 index 892e623baaab6..0000000000000 --- a/Formula/clblas.rb +++ /dev/null @@ -1,38 +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" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "97d7206bae700bdba2b4f1c6570d7e772ab5ade56d82af61d98d75eebe764f72" => :catalina - 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 d7a2cb19e4d1e..0000000000000 --- a/Formula/clblast.rb +++ /dev/null @@ -1,27 +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.1.tar.gz" - sha256 "1679843290efdeafdc187c07dc033e27067b37e34243f9417087700f61408069" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "e1908450ec5ca862fc49fd80a2c33565729187372749e395a88baa49371465e5" => :catalina - sha256 "b6b81483ab6621bb1a9002e771c50d8fa90364b39aabe293dc276991ab5e60b5" => :mojave - sha256 "d4fc7ec77ca33d0d8182e345000044a925128ffdbc39f7e0802c8500475007c8" => :high_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 d4be33da70dae..0000000000000 --- a/Formula/clean.rb +++ /dev/null @@ -1,32 +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 "c4846ab5fe761673db9a5575b56ec21b4ae0d4d75a974015d946d25fde0def12" => :catalina - 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 3e3165eba1fb1..0000000000000 --- a/Formula/clearlooks-phenix.rb +++ /dev/null @@ -1,26 +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" - license "GPL-3.0" - 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 a7bfaaca0d876..0000000000000 --- a/Formula/clens.rb +++ /dev/null @@ -1,27 +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 "fef1ad76413e8e15683a4066276ed7f37f821edcbda4e6d648bd60e09a33a30d" => :catalina - 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/clfft.rb b/Formula/clfft.rb deleted file mode 100644 index d2a50e91b4c2e..0000000000000 --- a/Formula/clfft.rb +++ /dev/null @@ -1,34 +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" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "419694c9a979ae22c673a79bf2fa29fe6888f7243dcdd7dd38882af4ead720d6" => :catalina - 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 4e60f4557fc30..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/dist1/clhep-2.4.1.3.tgz" - sha256 "27c257934929f4cb1643aa60aeaad6519025d8f0a1c199bc3137ad7368245913" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "8c8ce7164df92c63519e8d361f341ef848796cdd4087982e507f32d06952afbf" => :catalina - sha256 "fda146a801791ab47ea095d0ba4d201de7fe52a23b90626e56f05aaeaf181a8f" => :mojave - sha256 "7cd39923fcc37640a5f8bf841252c1f914494443aa5c359a6aa68a6e57ee9282" => :high_sierra - 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 b6a5c8c718645..0000000000000 --- a/Formula/cli53.rb +++ /dev/null @@ -1,25 +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.17.tar.gz" - sha256 "32b8e6ffe3234f87497328285c377b9280d1b302658e9acb45eb0dedbda0b14d" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "65f9f13eb5c2f53afcb697f9699f8dd6b9df5f400908a2d3423879f8ca895942" => :catalina - sha256 "73ec9efeaf423dd32530bd4a547b11522b54dd5666942735268bb7690479ff09" => :mojave - sha256 "190e2e02b890cf099ca52d1468b224d16c82840a3a534db83a2aed5553b07bfc" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"cli53", "./cmd/cli53" - prefix.install_metafiles - 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 c21576ab5e150..0000000000000 --- a/Formula/clib.rb +++ /dev/null @@ -1,26 +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.11.3.tar.gz" - sha256 "93af31d1bccfc828c185c012ab1f737d60408bd8402bcef20ed96ac337270afe" - license "MIT" - head "https://github.com/clibs/clib.git" - - bottle do - cellar :any_skip_relocation - sha256 "26f1ebdd9169e1921150b2286f643efbffcbb65630a45f8d5c35a6421eab20e0" => :catalina - sha256 "6f6c1c922dc56b1b3c99d2021705799a4714f9c6e6dd83daddcb3b300b191b28" => :mojave - sha256 "997100150595e54147ffb1fe2b006f0bec1e581e34779a9f42a2327037db6e0d" => :high_sierra - end - - uses_from_macos "curl" - - 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 5a88cb8522d02..0000000000000 --- a/Formula/click.rb +++ /dev/null @@ -1,69 +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.5.3.tar.gz" - sha256 "68feaa0d2a0c5b3a110eedd393949a89d6f80583eb25289161c0b91714097bed" - license "Apache-2.0" - head "https://github.com/databricks/click.git" - - bottle do - cellar :any_skip_relocation - sha256 "6bced21af1d4a16b96986fccbab5781f1aae9d9816ce12fdbb299f70b8711229" => :catalina - sha256 "7ac283d05682f3cf9698b324fc749c7a3281048e3789ab0af61f01c649eebf7d" => :mojave - sha256 "e1b015903b819bc7f0bde965ca968457f2cac039001abc040ed9652e642fabe7" => :high_sierra - end - - depends_on "rust" => :build - - uses_from_macos "expect" => :test - - def install - system "cargo", "install", *std_cargo_args - 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 90e4416e85e74..0000000000000 --- a/Formula/cliclick.rb +++ /dev/null @@ -1,25 +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 "9ffcef6839fb396f022e415925f0e5f2cd1434d0eb723694d950d84fbaa3fcda" => :catalina - 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 42daa769bb21e..0000000000000 --- a/Formula/clinfo.rb +++ /dev/null @@ -1,24 +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" - head "https://github.com/Oblomov/clinfo.git" - - bottle do - cellar :any_skip_relocation - sha256 "860a35b3f6e571b54f7d7292446b9c1365b72f9fe9cc4d402641207156a58e17" => :catalina - 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 2919e95c6e598..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.6", - :revision => "82ac7bf1870abbedb7fe44f8e34a429538f26a8d" - - bottle do - cellar :any - sha256 "9ab4ced2f1cda06858656f78b5ffb7fd1ab680d8b26680e353e71eb7b6c5601b" => :catalina - sha256 "e630699239fadc14a1d6b2a62474a9e6c21f187642af66f92df1a49d5e7c899c" => :mojave - sha256 "381326c7944d38195c9b8507db18aa35fa636dc8c08f876472db0d7577ce597b" => :high_sierra - end - - depends_on "cmake" => :build - - resource "clang" do - url "http://root.cern.ch/git/clang.git", - :tag => "cling-v0.6", - :revision => "02c41d5edd15232b0b25ec1d842403552c2aceb4" - end - - resource "llvm" do - url "http://root.cern.ch/git/llvm.git", - :tag => "cling-v0.6", - :revision => "e0b472e46eb5861570497c2b9efabf96f2d4a485" - 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 40fe6391ffca6..0000000000000 --- a/Formula/clingo.rb +++ /dev/null @@ -1,48 +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.4.0.tar.gz" - sha256 "e2de331ee0a6d254193aab5995338a621372517adcf91568092be8ac511c18f3" - license "MIT" - revision 1 - - bottle do - sha256 "d22f05f1666d6e1c24b92e98b6cec9c44dafc53943555092f79de4625fb0bd9d" => :catalina - sha256 "68f3b4714a71193844fd338a4a426e469015db3f3ac11dd42c82080c5a182553" => :mojave - sha256 "ace56673b60a0576b584efb515b795354e7b0c2421c82e55a025dc08cba03980" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "lua" - depends_on "python@3.8" - - # 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" - - # Patch adds Python 3.8 compatibility - patch do - url "https://github.com/potassco/clingo/commit/13a896b6a762e48c2396e3dc9f2e794020f4e6e8.patch?full_index=1" - sha256 "f2840bc4ab5159c253c5390c845f0d003f5fef813f49ddca27dbd5245f535e79" - end - - 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@3.8"].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/clip.rb b/Formula/clip.rb deleted file mode 100644 index 9c472d769f33f..0000000000000 --- a/Formula/clip.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Clip < Formula - desc "Create high-quality charts from the command-line" - homepage "https://clip-lang.org/" - url "https://github.com/asmuth/clip/archive/v0.7.tar.gz" - sha256 "f38f455cf3e9201614ac71d8a871e4ff94a6e4cf461fd5bf81bdf457ba2e6b3e" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "421298a9039ad6645a2ff605f1e3e3ccf5e0ee345e71195e41e67e4ed1f7cfdf" => :catalina - sha256 "3f4983068feacbb39d6238e33c0516ac4bdff11c19b8e12321d06c47e39c9107" => :mojave - sha256 "e62a216d1b86f6775f07c5484099e905943ee283d0ad51aef812be4089624171" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "fmt" - depends_on "freetype" - depends_on "fribidi" - depends_on "harfbuzz" - - def install - system "cmake", ".", *std_cmake_args - system "make" - system "make", "install" - pkgshare.install "test" - end - - test do - cp_r pkgshare/"test", testpath - system "#{bin}/clip", "--export", "chart.svg", - "test/examples/charts_basic_areachart.clp" - assert_predicate testpath/"chart.svg", :exist? - end -end diff --git a/Formula/clipper.rb b/Formula/clipper.rb deleted file mode 100644 index a21ce26e0532a..0000000000000 --- a/Formula/clipper.rb +++ /dev/null @@ -1,72 +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" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "6e16549f9930f652364f727cf42ea04608d92f172e7916c85900c3b6feb98df0" => :catalina - sha256 "2216327dbb3a341f14db9d2da767749d00e460917bcf1098665948e24eeb2e8b" => :mojave - sha256 "a2230d8cb54b244b82ea5f5c47cebabe2f63a6b9dc1b98d47cd4a0fcd4eb743f" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"clipper", "clipper.go" - 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 7f6819a7854e8..0000000000000 --- a/Formula/clipsafe.rb +++ /dev/null @@ -1,83 +0,0 @@ -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" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "1a8a00c232a748d9b45271239043f5d155666acfdcb79670efc816e26c740221" => :catalina - sha256 "c3c42621d02672ee0cabd443b871760320c1b82ba61b48bca61076acab10d097" => :mojave - sha256 "211d670b61c6a68650736df3deb3ae783c320491ba3205e035cc28c014fca705" => :high_sierra - sha256 "7c894e55e215fffa121aef718dbf7fa0f2c71531cf7970ae8d27f4b5eb939877" => :sierra - sha256 "ffd255c6ff1bd4c403bc4040f1751eef61b4ae341c33b226bf9a696b2836b02e" => :el_capitan - sha256 "01dbb7b4cf71ae2b174cfec45cdf4a69e211a5154bc6541fb19e1b5aa20f8389" => :yosemite - end - - 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 9f8046dfcfb3d..0000000000000 --- a/Formula/clisp.rb +++ /dev/null @@ -1,75 +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 2 - - bottle do - cellar :any - sha256 "d71cf96b9d303ec2de1cb091043a0ad1befa590bbe3ee027f7f94c03daf9f6a1" => :mojave - sha256 "5bf6cb7c640be9841f8a433f2bdbbd872aaf01352355d8765266d19a699e23c1" => :high_sierra - sha256 "a34dc97249cc2e5001dff9561137c8a4ebc010e6da3be23735d711566e4d7312" => :sierra - 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" - - system "make", "check" - - 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 a2330816f4bc2..0000000000000 --- a/Formula/cln.rb +++ /dev/null @@ -1,28 +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.6.tar.bz2" - sha256 "f492530e8879bda529009b6033e1923c8f4aae843149fc28c667c20b094d984a" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "bbc7716e6028fc3dc95dc22bf20033d13119b6ffe62dbd4c2609ecce85459a92" => :catalina - sha256 "1e62717cf6b0562643947c904c547e737bc9209cb349c388c6b7f9edcd915001" => :mojave - sha256 "0f14327e937f0a665dc66c5b62dc5d11094d812831221d8b86f8e5ba966e9540" => :high_sierra - 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 f23dea0216e5f..0000000000000 --- a/Formula/cloc.rb +++ /dev/null @@ -1,81 +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/archive/1.86.tar.gz" - sha256 "55460851de0a59a770fa9fff45b9d0f40a87d5e7e64834a34a6b2ace4806d4cf" - license "GPL-2.0" - head "https://github.com/AlDanial/cloc.git" - - bottle do - cellar :any_skip_relocation - sha256 "e4ae9366fde0331f1c3e03f8d86c110d25afce7153d6972a0118148d9b368cfa" => :catalina - sha256 "824cc150f418d0a1c19dc33cc619da314e553bcd0d42c97ac1cb24394c19ef24" => :mojave - sha256 "d8a0fda0a037a1268e61ece760e6d09ce02ad769985142bf997d84d61960baa5" => :high_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-2.02.tar.gz" - sha256 "c1b2970a8bb666c3de7caac4a8f4dbcc043ab819bbc337692ec7bf27adae4404" - 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 "Moo::Role" do - url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Moo-2.004000.tar.gz" - sha256 "323240d000394cf38ec42e865b05cb8928f625c82c9391cd2cdc72b33c51b834" - 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.001004.tar.gz" - sha256 "92ba5712850a74102c93c942eb6e7f62f7a4f8f483734ed289d08b324c281687" - 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 075291833a0d9..0000000000000 --- a/Formula/clockywock.rb +++ /dev/null @@ -1,27 +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 "5bc4dcd5f3b6d995d6245d3f67a55fb2b5bb6d604e9ad214bc687f4ca8d40bd8" => :catalina - 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 2841e176e13e4..0000000000000 --- a/Formula/clog.rb +++ /dev/null @@ -1,43 +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 "0a5985eee7c41d2199e64105cb0d32b8e065b57257841f48b2eb36a3a662bc7b" => :catalina - 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-lsp.rb b/Formula/clojure-lsp.rb deleted file mode 100644 index d3c630e6142e3..0000000000000 --- a/Formula/clojure-lsp.rb +++ /dev/null @@ -1,46 +0,0 @@ -class ClojureLsp < Formula - desc "Language Server (LSP) for Clojure" - homepage "https://github.com/snoe/clojure-lsp" - # Switch to use git tag/revision as needed by `lein-git-version` - url "https://github.com/snoe/clojure-lsp.git", - :tag => "release-20200706T152722", - :revision => "2ced4b1f218223e4bcf534866021be5574fcf3cd" - version "20200706T152722" - license "MIT" - head "https://github.com/snoe/clojure-lsp.git" - - bottle do - cellar :any_skip_relocation - sha256 "9fba43cf1c7c6da52e20aea0b31d542642107ab5d38019ed7b30c126462e0f16" => :catalina - sha256 "bc81ca815f623bde094b13d92516932690d91a4ac4ba2d143d53c97154c042d6" => :mojave - sha256 "a6050c2e6c7e3a21fc047ff3e1498995816754904a9506424079d87c424122b9" => :high_sierra - end - - depends_on "leiningen" => :build - # The Java Runtime version only recognizes class file versions up to 52.0 - depends_on :java => "1.8" - - def install - system "lein", "uberjar" - jar = Dir["target/clojure-lsp-*-standalone.jar"][0] - libexec.install jar - bin.write_jar_script libexec/File.basename(jar), "clojure-lsp" - end - - test do - require "Open3" - - begin - stdin, stdout, _, wait_thr = Open3.popen3("#{bin}/clojure-lsp") - pid = wait_thr.pid - stdin.write <<~EOF - Content-Length: 58 - - {"jsonrpc":"2.0","method":"initialize","params":{},"id":1} - EOF - assert_match "Content-Length", stdout.gets("\n") - ensure - Process.kill "SIGKILL", pid - end - end -end diff --git a/Formula/clojure.rb b/Formula/clojure.rb deleted file mode 100644 index aaa4d6aca9cc8..0000000000000 --- a/Formula/clojure.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Clojure < Formula - desc "The Clojure Programming Language" - homepage "https://clojure.org/" - url "https://download.clojure.org/install/clojure-tools-1.10.1.547.tar.gz" - sha256 "2012b44ebdb9c7e49bfc03fec9571b88dbc1c1c2e589d4eba2fd3b80c7278f1a" - - bottle :unneeded - - depends_on "openjdk" - depends_on "rlwrap" - - uses_from_macos "ruby" => :build - - def install - system "./install.sh", prefix - bin.env_script_all_files libexec/"bin", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_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 626140b121f71..0000000000000 --- a/Formula/clojurescript.rb +++ /dev/null @@ -1,38 +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.758/cljs.jar" - sha256 "dcc98e103d281d4eab21ca94fba11728e9f587c3aa09c8ffc3b96cff210adcce" - license "EPL-1.0" - head "https://github.com/clojure/clojurescript.git" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "cljs.jar" - (bin/"cljsc").write <<~EOS - #!/bin/bash - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - exec "${JAVA_HOME}/bin/java" -jar "#{libexec}/cljs.jar" "$@" - EOS - 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 133b5d284fe41..0000000000000 --- a/Formula/cloog.rb +++ /dev/null @@ -1,66 +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 "4f21a763ea566aa97203b1823a659047c165df9b9d3144ed6df8e3038c054273" => :catalina - 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://deb.debian.org/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 099ef1d247527..0000000000000 --- a/Formula/closure-compiler.rb +++ /dev/null @@ -1,31 +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/v20200628/closure-compiler-v20200628.jar" - sha256 "c513dde942769497af3534d88779690a6737b0ee1340900c489fb03ad55cb7b3" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"] - (bin/"closure-compiler").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec.children.first}" "$@" - EOS - 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-stylesheets.rb b/Formula/closure-stylesheets.rb deleted file mode 100644 index 107b677458d59..0000000000000 --- a/Formula/closure-stylesheets.rb +++ /dev/null @@ -1,32 +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" - sha256 "aa4e9b23093187a507a4560d13e59411fc92e285bc911b908a6bcf39479df03c" - license "Apache-2.0" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "closure-stylesheets.jar" - (bin/"closure-stylesheets").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/closure-stylesheets.jar" "$@" - EOS - 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-nuke.rb b/Formula/cloud-nuke.rb deleted file mode 100644 index cccfc8e16bc13..0000000000000 --- a/Formula/cloud-nuke.rb +++ /dev/null @@ -1,35 +0,0 @@ -class CloudNuke < Formula - desc "CLI tool to nuke (delete) cloud resources" - homepage "https://gruntwork.io/" - url "https://github.com/gruntwork-io/cloud-nuke/archive/v0.1.20.tar.gz" - sha256 "9a8df713129afe2c4a536dcf3286353ecfb1899655efb95a6608c078cc66f89e" - license "MIT" - head "https://github.com/gruntwork-io/cloud-nuke.git" - - bottle do - cellar :any_skip_relocation - sha256 "1bd062358ee79ddd80e6aa82b70586c35e5db0f5578e828534186a2945114be2" => :catalina - sha256 "00d0e25987130eef854be69b476785b5c9520c010462b152435aa6a406098c2a" => :mojave - sha256 "a7a6c5ebabdab4c70e408d12dac4798d675dcb067de4e342d08c9d8a894ea9b9" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-X main.VERSION=v#{version}", *std_go_args - 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_REGION="" - EOS - 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/cloud-watch.rb b/Formula/cloud-watch.rb deleted file mode 100644 index 54e9eec839662..0000000000000 --- a/Formula/cloud-watch.rb +++ /dev/null @@ -1,43 +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" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - env = { - :JAVA_HOME => Formula["openjdk"].opt_prefix, - :AWS_CLOUDWATCH_HOME => libexec, - :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/cloudformation-cli.rb b/Formula/cloudformation-cli.rb deleted file mode 100644 index 256fec31fa8e5..0000000000000 --- a/Formula/cloudformation-cli.rb +++ /dev/null @@ -1,230 +0,0 @@ -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/54/8c/6126bc4bea7b379635915d909d13f71d4db51443732849828ac1e10f666d/cloudformation-cli-0.1.4.tar.gz" - sha256 "78057c90b4a1e97fd7f9857932d6443e8f5250db2a76419255aafab2711b8d50" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "f3f1c250ddb7e6cd00426bd28eca86d2ec322e96af7c7453c33d4f7af4da40e9" => :catalina - sha256 "6b8826f9dcf41e18424df2ecadb08c7ff6f97e93b037b2901264350cad29ba69" => :mojave - sha256 "ee85cee093d883e071a7cdf787415dd75eb1145af526a407ee77c2ca31725fe2" => :high_sierra - end - - depends_on "go" => :test - depends_on "python@3.8" - - uses_from_macos "expect" => :test - - # Generated with homebrew-pypi-poet from: - # poet -r cloudformation-cli -a cloudformation-cli-java-plugin -a cloudformation-cli-go-plugin \ - # -a attrs -a boto3 -a botocore -a certifi -a chardet \ - # -a colorama -a docutils -a hypothesis -a idna -a Jinja2 \ - # -a jmespath -a jsonschema -a MarkupSafe -a more-itertools -a packaging \ - # -a pluggy -a py -a pyparsing -a pyrsistent -a pytest \ - # -a python-dateutil -a PyYAML -a requests -a s3transfer -a semver \ - # -a six -a sortedcontainers -a urllib3 -a wcwidth -a Werkzeug > resources - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "boto3" do - url "https://files.pythonhosted.org/packages/71/46/ce23f690eddf36c6a8cba3b162a11a58da79c0a323e9083010bbd851d8f2/boto3-1.14.15.tar.gz" - sha256 "3c654c1b8f9708e0b457ea1d312ee53451368d09b571ce737dc1f46484112bc1" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/eb/b7/b058c816f3af8cb14abe47fc41daa58cabb49646ae1b433281c873c1bfa0/botocore-1.17.15.tar.gz" - sha256 "34ebc56471a75ea28bfd39f1665d58ee13229c75e8cd6c62b2e2abf1f3e75f0f" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "cloudformation-cli-go-plugin" do - url "https://files.pythonhosted.org/packages/de/ff/ac1b30082d588070f148babdcca0d995e1101e6a85ce3afbd9ce3dbbf894/cloudformation-cli-go-plugin-2.0.0.tar.gz" - sha256 "2f50a28fb6125c10071aac21f10d6be75df841d8471d88e1a07acdf314407a26" - end - - resource "cloudformation-cli-java-plugin" do - url "https://files.pythonhosted.org/packages/76/b5/785f247dc45ba5b1bd87e932b53afa60ed8ac1c606ad5190c6752869a8ba/cloudformation-cli-java-plugin-2.0.0.tar.gz" - sha256 "43f4314db2c26f4e3f3fee241e1f45a2208f8420a6062ea1c033a1639e6c9b57" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "hypothesis" do - url "https://files.pythonhosted.org/packages/dd/40/4e8f683671238cb76f0248e6d1f59feb10e850c7e38db4ef9cc7032074e7/hypothesis-5.19.0.tar.gz" - sha256 "ba7c92006716aaee4684f7876c116adedcfb88b19fcb55d21c47b28f03f933bf" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz" - sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz" - sha256 "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9" - 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/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "more-itertools" do - url "https://files.pythonhosted.org/packages/67/4a/16cb3acf64709eb0164e49ba463a42dc45366995848c4f0cf770f57b8120/more-itertools-8.4.0.tar.gz" - sha256 "68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/55/fd/fc1aca9cf51ed2f2c11748fa797370027babd82f87829c7a8e6dbe720145/packaging-20.4.tar.gz" - sha256 "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8" - end - - resource "pluggy" do - url "https://files.pythonhosted.org/packages/f8/04/7a8542bed4b16a65c2714bf76cf5a0b026157da7f75e87cc88774aa10b14/pluggy-0.13.1.tar.gz" - sha256 "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0" - end - - resource "py" do - url "https://files.pythonhosted.org/packages/97/a6/ab9183fe08f69a53d06ac0ee8432bc0ffbb3989c575cc69b73a0229a9a99/py-1.9.0.tar.gz" - sha256 "9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "pyrsistent" do - url "https://files.pythonhosted.org/packages/9f/0d/cbca4d0bbc5671822a59f270e4ce3f2195f8a899c97d0d5abb81b191efb5/pyrsistent-0.16.0.tar.gz" - sha256 "28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" - end - - resource "pytest" do - url "https://files.pythonhosted.org/packages/8f/c4/e4a645f8a3d6c6993cb3934ee593e705947dfafad4ca5148b9a0fde7359c/pytest-5.4.3.tar.gz" - sha256 "7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/50/de/2b688c062107942486c81a739383b1432a72717d9a85a6a1a692f003c70c/s3transfer-0.3.3.tar.gz" - sha256 "921a37e2aefc64145e7b73d50c71bb4f26f46e4c9f414dc648c6245ff92cf7db" - end - - resource "semver" do - url "https://files.pythonhosted.org/packages/aa/e8/cb894f70a52887f001aff5f264f68272c21fa58268495aca17df396c161f/semver-2.10.2.tar.gz" - sha256 "c0a4a9d1e45557297a722ee9bac3de2ec2ea79016b6ffcaca609b0bc62cf4276" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "sortedcontainers" do - url "https://files.pythonhosted.org/packages/3b/fb/48f6fa11e4953c530b09fa0f2976df5234b0eaabcd158625c3e73535aeb8/sortedcontainers-2.2.2.tar.gz" - sha256 "4e73a757831fc3ca4de2859c422564239a31d8213d09a2a666e375807034d2ba" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/89/38/459b727c381504f361832b9e5ace19966de1a235d73cdbdea91c771a1155/wcwidth-0.2.5.tar.gz" - sha256 "c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83" - end - - resource "Werkzeug" do - url "https://files.pythonhosted.org/packages/10/27/a33329150147594eff0ea4c33c2036c0eadd933141055be0ff911f7f8d04/Werkzeug-1.0.1.tar.gz" - sha256 "6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c" - end - - def install - virtualenv_install_with_resources - bin.install_symlink libexec/"bin/cfn" - end - - def caveats - <<~EOS - cloudformation java and go plugins are installed, but the Go and Java are not bundled with the installation. - EOS - end - - test do - script = (testpath/"test.sh") - script.write <<~EOS - #!/usr/bin/env expect -f - set timeout -1 - - spawn #{bin}/cfn init - - expect -exact "What's the name of your resource type?" - send -- "brew::formula::test\r" - - expect -exact "Select a language for code generation:" - send -- "1\r" - - expect -exact "Enter the GO Import path" - send -- "\r" - - expect -exact "Initialized a new project in" - expect eof - EOS - - script.chmod 0700 - system "./test.sh" - - rpdk_config = JSON.parse(File.read(testpath/".rpdk-config")) - assert_equal "brew::formula::test", rpdk_config["typeName"] - assert_equal "go", rpdk_config["language"] - end -end diff --git a/Formula/clozure-cl.rb b/Formula/clozure-cl.rb deleted file mode 100644 index ba43869024ed9..0000000000000 --- a/Formula/clozure-cl.rb +++ /dev/null @@ -1,61 +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.12.tar.gz" - sha256 "774a06b4fb6dc4b51dfb26da8e1cc809c605e7706c12180805d1be6f2885bd52" - license "Apache-2.0" - head "https://github.com/Clozure/ccl.git" - - bottle do - cellar :any_skip_relocation - sha256 "44532f82d79ee308886614d8a8ccafd65e049a8621cc7a54a6af15d9985486e7" => :catalina - sha256 "b17d10463b8101707ad7385a896e3252e6ffd4231c0334ac25aa7967c689226f" => :mojave - sha256 "3e2a8e6263055e8e21ae373b0def8f4ad5aebaa4e64df12d67b148bbb3fde177" => :high_sierra - end - - depends_on :xcode => :build - - resource "bootstrap" do - url "https://github.com/Clozure/ccl/releases/download/v1.12/darwinx86.tar.gz" - sha256 "9434fb5ebc01fc923625ad56726fdd217009e2d3c107cfa3c5435cb7692ba7ca" - 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 - args = [] - - if DevelopmentTools.clang_build_version == 1100 && MacOS::CLT.installed? - # Xcode 11.0-11.3 assembler is broken. Try the CLT in case it is older. - # https://github.com/Clozure/ccl/issues/271 - # Note: ccl NEEDS the system assembler - it is not compatible with Clang's - args << "AS=/Library/Developer/CommandLineTools/usr/bin/as" - end - - system "make", *args - end - - ENV["CCL_DEFAULT_DIRECTORY"] = buildpath - - 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" - - 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/clp.rb b/Formula/clp.rb deleted file mode 100644 index 1ec7e8ab3e0e6..0000000000000 --- a/Formula/clp.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Clp < Formula - desc "Linear programming solver" - homepage "https://github.com/coin-or/Clp" - url "https://github.com/coin-or/Clp/archive/releases/1.17.6.tar.gz" - sha256 "afff465b1620cfcbb7b7c17b5d331d412039650ff471c4160c7eb24ae01284c9" - license "EPL-1.0" - - bottle do - cellar :any - sha256 "4bb1c3b9b0322715b8a83db078a82c02c9430f4eca4032778ef1eb9dbf93db21" => :catalina - sha256 "a432a402144f37847273405880b184ffac8b7895da9f7f8c75e1e22069305031" => :mojave - sha256 "477054153fcd64813168336f9dc9e35e39a2c49029b15533e16dbf366009c365" => :high_sierra - end - - depends_on "pkg-config" => [:build, :test] - depends_on "coinutils" - depends_on "openblas" - - resource "coin-or-tools-data-sample-p0033-mps" do - url "https://raw.githubusercontent.com/coin-or-tools/Data-Sample/releases/1.2.11/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-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--includedir=#{include}/clp", - "--prefix=#{prefix}", - "--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 - 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 <<~EOS - #include - int main() { - ClpSimplex model; - int status = model.readMps("#{testpath}/p0033.mps", true); - if (status != 0) { return status; } - status = model.primal(); - return status; - } - EOS - pkg_config_flags = `pkg-config --cflags --libs clp`.chomp.split - system ENV.cxx, "test.cpp", *pkg_config_flags - system "./a.out" - end -end diff --git a/Formula/clpbar.rb b/Formula/clpbar.rb deleted file mode 100644 index e17dbfac3601c..0000000000000 --- a/Formula/clpbar.rb +++ /dev/null @@ -1,29 +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 "86aefc9d1110a945b62a9dbd9d1efe2a1c4ebaade84ad56d00084857439914a8" => :catalina - 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 d059e0de5791f..0000000000000 --- a/Formula/clucene.rb +++ /dev/null @@ -1,41 +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 "c5b00eb94db40324fb66bc7f79737f3963ea5f0df6f7c07c39583fe95bfe0ae6" => :catalina - sha256 "1e19a680030d8c4863deb4d5a5bc40675c58df5c21e5e7217f2ed8fcbc624d21" => :mojave - sha256 "3986feb447660b2732e2983f54d22086b10da442cb2d7b6ceac45a91ad58f09b" => :high_sierra - sha256 "5d25768dc355533553e6c1605a1dc89985ddd26b4d17d10078c39d6b085c03fb" => :sierra - sha256 "5ee0c98072c18c75dd8c25fd309ccb49f033300d474367a8e325ec601c427f66" => :el_capitan - sha256 "182db4f73e058e9d28b77cbbd642c40ecc403fbf1d9dc8357387b2c54dba8d1e" => :yosemite - sha256 "f85cdb67e53bc6eb380ae1bd8e087b42faca7c65f665f9719209adfa8aaa7b31" => :mavericks - end - - 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/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 b4d39ce57d9ee..0000000000000 --- a/Formula/clutter-gst.rb +++ /dev/null @@ -1,118 +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.27.tar.xz" - sha256 "fe69bd6c659d24ab30da3f091eb91cd1970026d431179b0724f13791e8ad9f9d" - revision 1 - - bottle do - rebuild 1 - sha256 "9e5e48bdf08599d63be7a75eabac3221ce4b1799fcf51d857d37336345393c16" => :catalina - sha256 "3c4dcfd6b9b95d1f0a96e33d23060225c322224e21e4501c8e2b5a6ef32a9ebe" => :mojave - sha256 "b60c1d84cf2f4e9cf931d10ce759d4b21f08a7a2288dd81cbab78854d3a767a2" => :high_sierra - sha256 "fb997fb8ac4fcafd52690d64c12dfcd7776630ce717521c7cc0ce7d44ae3b8f7" => :sierra - end - - depends_on "gobject-introspection" => :build - 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 - ] - - 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"] - harfbuzz = Formula["harfbuzz"] - 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#{harfbuzz.opt_include}/harfbuzz - -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 dec2b81bf04ef..0000000000000 --- a/Formula/clutter-gtk.rb +++ /dev/null @@ -1,115 +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 4 - - bottle do - sha256 "4b5c17d3567f1a5c03f98ccc8d9275f07fa733770d4ee741800505b8894442a1" => :catalina - sha256 "665ed256370965e0f1e8660bf1f0372a7e5a9ea0fde176c06cb4c8e390a0739c" => :mojave - sha256 "90929f36d6105b2b046e32f2d661c91305b785da535a7654fde19eb89617008e" => :high_sierra - 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"] - harfbuzz = Formula["harfbuzz"] - 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#{harfbuzz.opt_include}/harfbuzz - -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 639527d21f3ff..0000000000000 --- a/Formula/clutter.rb +++ /dev/null @@ -1,107 +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.4.tar.xz" - sha256 "8b48fac159843f556d0a6be3dbfc6b083fc6d9c58a20a49a6b4919ab4263c4e6" - license "LGPL-2.1" - - bottle do - sha256 "ccec39ce9c941de753798e466b8cfc2a69612319d8b5a422f6e4bde49db305b1" => :catalina - sha256 "43da6f50107059a3c9b215e77d29724f9e71a17fd89f5e72a200cd021e32f471" => :mojave - sha256 "2a1f93e956dbfc9dc4f3c47dd8923b224ed155f3b8dbf32df74f365a65052bbb" => :high_sierra - 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"] - harfbuzz = Formula["harfbuzz"] - 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#{harfbuzz.opt_include}/harfbuzz - -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/clzip.rb b/Formula/clzip.rb deleted file mode 100644 index 96f81f1efec81..0000000000000 --- a/Formula/clzip.rb +++ /dev/null @@ -1,31 +0,0 @@ -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.11.tar.gz" - sha256 "d9d51212afa80371dc2546d278ef8ebbb3cd57c06fdd761b7b204497586d24c0" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ae164ce5fd5a020988dc4e177a25cf19f924b282e561cdabf57577c88940ac2b" => :catalina - sha256 "654a41ff519d4109d38f17c3fb321f130e60c9d72d137674f2dde9ef5cf129be" => :mojave - sha256 "2a3bf6819a2fdbef49fa7bf1e1cea7ef6c6d090bf8fa787fe7b2a582b2631045" => :high_sierra - sha256 "26dbdb3a397aa3f62acc15bbbf599a32e5b832564ea6ddc6e15327baac90b5ba" => :sierra - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - 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/cmake.rb b/Formula/cmake.rb deleted file mode 100644 index 2e5bf43605a08..0000000000000 --- a/Formula/cmake.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Cmake < Formula - desc "Cross-platform make" - homepage "https://www.cmake.org/" - head "https://gitlab.kitware.com/cmake/cmake.git" - - stable do - url "https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3.tar.gz" - sha256 "0bd60d512275dc9f6ef2a2865426a184642ceb3761794e6b65bff233b91d8c40" - - # Allows CMAKE_FIND_FRAMEWORKS to work with CMAKE_FRAMEWORK_PATH, which brew sets. - # Remove with 3.18.0. - patch do - url "https://gitlab.kitware.com/cmake/cmake/-/commit/c841d43d70036830c9fe16a6dbf1f28acf49d7e3.diff" - sha256 "87de737abaf5f8c071abc4a4ae2e9cccced6a9780f4066b32ce08a9bc5d8edd5" - end - - # Adds macOS 11.0 compatibility. - # Remove with 3.18.0. - patch do - url "https://gitlab.kitware.com/cmake/cmake/-/commit/a0c4c27443afe1c423c08063e2eaf96ffa2f54fb.diff" - sha256 "7b84bc0dbb71c620939fb1e354f671e1d0007c9c8060ed3f2afe54a11f5e578c" - end - end - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "8546864336108d217502a797033a72568b0325bf739495dff49c39d7f429fd07" => :catalina - sha256 "a4e96287fc974242d6399ba2e3e040cfc99e7c1f574873e95491c88244744306" => :mojave - sha256 "32321684bf5d7d4270db1a6c8fe2bb4c5f18e4a3a00fc7b3c628939c842301ff" => :high_sierra - end - - depends_on "sphinx-doc" => :build - - on_linux do - depends_on "openssl@1.1" - end - - # 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`. - - def install - 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, "--", *std_cmake_args - 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 28db2da63fb5c..0000000000000 --- a/Formula/cmark-gfm.rb +++ /dev/null @@ -1,32 +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.29.0.gfm.0.tar.gz" - version "0.29.0.gfm.0" - sha256 "6a94aeaa59a583fadcbf28de81dea8641b3f56d935dda5b2447a3c8df6c95fea" - revision 1 - - bottle do - cellar :any - sha256 "bce67909783f14886f3c68195fa316e12019208e07a2893ece68bce3ab421014" => :catalina - sha256 "08cd69b6691e7f38c84c85272f39ce900d0cb7e8270218e48da25068da5fce2e" => :mojave - sha256 "c5b7a2ec9f938dc64d3bccead2e1b7fcb1d21de9404b0e33e433e2d0e6379243" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "python@3.8" => :build - - conflicts_with "cmark", :because => "both install a `cmark.h` header" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - 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 8f78053d7ec87..0000000000000 --- a/Formula/cmark.rb +++ /dev/null @@ -1,29 +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.29.0.tar.gz" - sha256 "2558ace3cbeff85610de3bda32858f722b359acdadf0c4691851865bb84924a6" - revision 1 - - bottle do - cellar :any - sha256 "3af95418f96f4b0cec4bd76abaab312f3caf4cea591f38d3b725f15068d06491" => :catalina - sha256 "7cbb32d00d44170f5fe426cf2f1d4b5d756738b18631a13f8c5f94524b39f73b" => :mojave - sha256 "fb673191d96707019c8eefc224de72045149830f445fb7340c454cc6e8510981" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "python@3.8" => :build - - def install - mkdir "build" do - system "cmake", "..", "-DCMAKE_INSTALL_LIBDIR=lib", *std_cmake_args - 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 cd77f720a3899..0000000000000 --- a/Formula/cmatrix.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Cmatrix < Formula - desc "Console Matrix" - homepage "https://github.com/abishekvashok/cmatrix/" - url "https://github.com/abishekvashok/cmatrix/archive/v2.0.tar.gz" - sha256 "ad93ba39acd383696ab6a9ebbed1259ecf2d3cf9f49d6b97038c66f80749e99a" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "fcc9c366c560e89ee2b4f61d1bdece14379a2c598719fd2eef784564bf9ed677" => :catalina - sha256 "1b3d3155c87c8f2b788fe18c3e72f04af4e79c609030e3447c3e17f9d3870c7b" => :mojave - sha256 "2c3b0ce73a2f89ece3783885e44aba5f584268768283e650d8b6552bc00f058d" => :high_sierra - 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/cmdshelf.rb b/Formula/cmdshelf.rb deleted file mode 100644 index f8ad277b5f1cf..0000000000000 --- a/Formula/cmdshelf.rb +++ /dev/null @@ -1,28 +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 - cellar :any_skip_relocation - rebuild 2 - sha256 "e4093bda9528ae027e122f321e2f1a44d3b4fc8b569e2bf0eba526399cccdacd" => :catalina - sha256 "4c83af8661b368f727a389f12d434be45655d10aef9ae1acb8b2be830aae0558" => :mojave - sha256 "c0cdc78df3f3896e4e8ba2112ec6e5189682da06419637ebfa9d660ff4fb902f" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - 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 6d2b6e773f979..0000000000000 --- a/Formula/cmigemo.rb +++ /dev/null @@ -1,54 +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 "81ea6aecbf5b3dec1ebc423d3503bd134d79f4fbfbb91b291e90c1b5a9fef1a4" => :catalina - 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 3766ba3039f3f..0000000000000 --- a/Formula/cminpack.rb +++ /dev/null @@ -1,35 +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" - revision 1 - head "https://github.com/devernay/cminpack.git" - - bottle do - cellar :any - sha256 "f01181d9cd0882df08500e79b24c98a0d101579592684fe151fac5efa4e34835" => :catalina - sha256 "4ee55e748a0b20cf6450c88beaf821fd962e78c81c640a569720c0831b653ac0" => :mojave - sha256 "07714bb85b22bf0a9408337520ec68ac1ebbf4141070319e26975b641b936cd2" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", "-DBUILD_SHARED_LIBS=ON", - "-DCMAKE_BUILD_WITH_INSTALL_RPATH=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/cmix.rb b/Formula/cmix.rb deleted file mode 100644 index 03404c91cb296..0000000000000 --- a/Formula/cmix.rb +++ /dev/null @@ -1,28 +0,0 @@ -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/v18.tar.gz" - version "18.0.0" - sha256 "2f0272186a8ff693146d0d8070ad4d9687461a486805ab91d727891df316498d" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "9dbbd3e8367f799405fbb237d68fe46e968bda502a5779f3be1c467b56e394b8" => :catalina - sha256 "448fa06555b59d6a0541d1e36ff9eac14e05775fd2ef119e860a305368b800ec" => :mojave - sha256 "6e1bc1de5f3c36e6fcda7874b8fbd18938aedbdbce94039763302f9643964a0a" => :high_sierra - sha256 "3dc97bda2656e2b2ffccb50915f9a981513fff5a8f90af2a1c5521afe52568d0" => :sierra - 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/cmocka.rb b/Formula/cmocka.rb deleted file mode 100644 index 46ebbd5363bc5..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.5.tar.xz" - sha256 "f0ccd8242d55e2fd74b16ba518359151f6f8383ff8aef4976e48393f77bba8b6" - license "Apache-2.0" - head "https://git.cryptomilk.org/projects/cmocka.git" - - bottle do - cellar :any - sha256 "719b81c50a85d95dfc0bdd88b52e5642cc81e22f95776fc8d92065217bef879e" => :catalina - sha256 "a05bfdbe08b08dc01db59d0c2c724b2a58c4f9e12c260dc5865e27dd456e7771" => :mojave - sha256 "c4fc9fe8a73b23206c0db8907c2f67dea482d689afea18c5e746556aff8098b5" => :high_sierra - sha256 "a8d32491c7cfd1670be11c022faa07619d7821a4328fb034e76f225933b5c4dc" => :sierra - end - - depends_on "cmake" => :build - - def install - args = std_cmake_args - args << "-DWITH_STATIC_LIB=ON" << "-DWITH_CMOCKERY_SUPPORT=ON" << "-DUNIT_TESTING=ON" - args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0" if MacOS.version == "10.11" && MacOS::Xcode.version >= "8.0" - - 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 ac77c1e022e95..0000000000000 --- a/Formula/cmockery.rb +++ /dev/null @@ -1,31 +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" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "1df72472ccf182fc7de6a14b047affceba8e7c986110f883ef55701b93b19d0f" => :catalina - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/cmockery/0.1.2.patch" - sha256 "4e1ba6ac1ee11350b7608b1ecd777c6b491d952538bc1b92d4ed407669ec712d" - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/cmockery2.rb b/Formula/cmockery2.rb deleted file mode 100644 index 60e13182da21c..0000000000000 --- a/Formula/cmockery2.rb +++ /dev/null @@ -1,37 +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" - license "Apache-2.0" - head "https://github.com/lpabon/cmockery2.git" - - bottle do - cellar :any - sha256 "dc794b321aa10ede37917259ba4491dc59271826f2921c5b652b1d67e744b961" => :catalina - sha256 "a36cbb449fcca235226fcfa94439f2370f22d3d6f1986c710c1e640959f8a271" => :mojave - sha256 "3651caa0ed8c5e2ec5dc0fe8932a53e20c2af28d3887161d1cdfe9c46fb9f220" => :high_sierra - sha256 "661b4a8751a4dbe7e52b19cd9452d8b7dd61c929d73da27ac4fca5623a0dff6c" => :sierra - sha256 "61b64aeaf89d205742bbb254148502cd2df83bcf05d20377bdce8637f275bee5" => :el_capitan - sha256 "ea94ba8420bd5bc01412b52ce9c03b392b933f279d1bce7a8ff8f7502bc83f88" => :yosemite - sha256 "ce0cc1a3151655d4bb970ca92c87c5ebb5ed660c3c445e763edc4b835ca7e9a6" => :mavericks - 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/cmt.rb b/Formula/cmt.rb deleted file mode 100644 index 7ddb7f70e78e1..0000000000000 --- a/Formula/cmt.rb +++ /dev/null @@ -1,45 +0,0 @@ -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/0.7.1.tar.gz" - sha256 "364faaf5f44544f952b511be184a724e2011fba8f0f88fdfc05fef6985dd32f6" - license "BSD-3-Clause" - revision 1 - head "https://github.com/smallhadroncollider/cmt.git" - - bottle do - cellar :any_skip_relocation - sha256 "2690f2f872ce08413832b0b6fd9e23b384fe7984f2a80e44285edd02d36cbaa5" => :catalina - sha256 "2f077c726546a39809f627d4d6bb24c0b172252eac7a65139fbcba9b9f1dd296" => :mojave - sha256 "cbfab965d0ca391ed029d21df3d8da1a21368263b549b65ecf200aa5209d7eba" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.8" => :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/cmu-pocketsphinx.rb b/Formula/cmu-pocketsphinx.rb deleted file mode 100644 index 3523df31ff34d..0000000000000 --- a/Formula/cmu-pocketsphinx.rb +++ /dev/null @@ -1,38 +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 "f2fc23a67634f26befdd128d21e886d7b3789484a14d498a40949e0e100d8afa" => :catalina - 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 d8be7fcc6a850..0000000000000 --- a/Formula/cmu-sphinxbase.rb +++ /dev/null @@ -1,58 +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 "0cea9513b180773ff3c45d24453e962ef4ad5d1f923c4c22716437f3580b195f" => :catalina - 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 1a7507b63c8f5..0000000000000 --- a/Formula/cmuclmtk.rb +++ /dev/null @@ -1,25 +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 "fb552e12a3c59e2ca6a9dd89e9ec229e5b815edef28093c3902fc4ee54b52207" => :catalina - 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 c017f1aeef4e0..0000000000000 --- a/Formula/cmus.rb +++ /dev/null @@ -1,37 +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.8.0.tar.gz" - sha256 "756ce2c6241b2104dc19097488225de559ac1802a175be0233cfb6fbc02f3bd2" - license "GPL-2.0" - revision 1 - head "https://github.com/cmus/cmus.git" - - bottle do - rebuild 1 - sha256 "d89a46acdec0e5830d41d2d40419d62fe555f34b99f93bf758e749e023e9b294" => :catalina - sha256 "5597b87c7fcdceec789103df12ae89408e69f98668da522b7ee6a908e622c290" => :mojave - sha256 "38f6dda244d82bc960b7e1c65e2e0316c2cde6cc61174bad763b7243e6f88ad8" => :high_sierra - sha256 "42cab3ddb96e7b36b2b8cf67d2384adea5169e2955841c35166aece5afcd9329" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "faad2" - depends_on "ffmpeg" - depends_on "flac" - depends_on "libcue" - depends_on "libogg" - depends_on "libvorbis" - depends_on "mad" - depends_on "mp4v2" - depends_on "opusfile" - - def install - system "./configure", "prefix=#{prefix}", "mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/cmus", "--plugins" - end -end diff --git a/Formula/cmusfm.rb b/Formula/cmusfm.rb deleted file mode 100644 index c2071198483bc..0000000000000 --- a/Formula/cmusfm.rb +++ /dev/null @@ -1,76 +0,0 @@ -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/v0.3.3.tar.gz" - sha256 "9d9fa7df01c3dd7eecd72656e61494acc3b0111c07ddb18be0ad233110833b63" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "c27aa49951efe2e485aba1eaf9527387e2fa92472bd2c1f56b5097a021dc5a64" => :catalina - sha256 "9e3320b2be61e18a10e6fef43c2c233b03670425108085c7aafa1218588cb2c9" => :mojave - sha256 "8fc5c21846193c1187440c297d0cebdd86a83452e5c648eb9e6e813cb2385f4e" => :high_sierra - sha256 "f399ae3146fe9e2214e24c96ecfbd3c77866a68c692d9d60d3363ac27d39da26" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "libfaketime" => :test - - def install - system "autoreconf", "--install" - mkdir "build" do - system "../configure", "--prefix=#{prefix}", "--disable-dependency-tracking", "--disable-silent-rules" - 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" - ENV["DYLD_INSERT_LIBRARIES"] = Formula["libfaketime"].lib/"faketime"/"libfaketime.1.dylib" - ENV["DYLD_FORCE_FLAT_NAMESPACE"] = "1" - 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_predicate cmusfm_cache, :exist? - strings = shell_output "strings #{cmusfm_cache}" - assert_match /^#{test_artist}$/, strings - assert_match /^#{test_title}$/, strings - end -end diff --git a/Formula/cnats.rb b/Formula/cnats.rb deleted file mode 100644 index 676439b354930..0000000000000 --- a/Formula/cnats.rb +++ /dev/null @@ -1,39 +0,0 @@ -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/v2.1.0.tar.gz" - sha256 "1493ae3d790e2ebc4d77c65ef2957e2fb77182d69afeeeb2be1e1e6bee0ca12e" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "39678d7d1bf583fc5c5812a7dff8626a8a5d4ca8028fb0b8b30a74fafcca82a8" => :catalina - sha256 "7c8e7fe9a642ba2e33c0e25b702171b557f29a3dd37921826d16566a0417cf66" => :mojave - sha256 "d961682c43b33f7149ed477bdff2246a6449463a2f51c592501eec7096dbbd11" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libevent" - depends_on "libuv" - depends_on "openssl@1.1" - depends_on "protobuf-c" - - def install - system "cmake", ".", "-DCMAKE_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 1541566046d0d..0000000000000 --- a/Formula/cntlm.rb +++ /dev/null @@ -1,56 +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 "1cb2eaf929777239d1371c36555ba24094c6f35cf4735b77df151174c4094f5d" => :catalina - 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/cobalt.rb b/Formula/cobalt.rb deleted file mode 100644 index 2fa4ac2ace76e..0000000000000 --- a/Formula/cobalt.rb +++ /dev/null @@ -1,26 +0,0 @@ -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/v0.15.11.tar.gz" - sha256 "f938b1dba3fe1874f87d9ced31ff6a8ba62c27927247fef6ba6c41897a30a62a" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "a7c8244a8382566add8c7079660767c3c1a5fe9d7ab86c345cef6b1117d2b800" => :catalina - sha256 "ea5ecf4c34c78804e3cfa3ea54ca7af15872ea3929ba8a397f108430fdf8296e" => :mojave - sha256 "e67e4a6d4176e16ba9e089325204d7c3bde339141067b4df13b4f0bfe6019e0a" => :high_sierra - 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_predicate testpath/"_site/index.html", :exist? - end -end diff --git a/Formula/coccinelle.rb b/Formula/coccinelle.rb deleted file mode 100644 index 3693addfe93cb..0000000000000 --- a/Formula/coccinelle.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Coccinelle < Formula - desc "Program matching and transformation engine for C code" - homepage "http://coccinelle.lip6.fr/" - url "https://github.com/coccinelle/coccinelle.git", - :tag => "1.0.8", - :revision => "d678c34afc0cfb479ad34f2225c57b1b8d3ebeae" - head "https://github.com/coccinelle/coccinelle.git" - - bottle do - cellar :any - sha256 "cc2f0b1ff9f45f48c91f136b1b88ac6c7d2e34b475d77d1c0e418f1a47e691b2" => :catalina - sha256 "6dd3d84d54e00d9d7ce4b27f1693d266120221bd98c99d7988a58c802c26fab3" => :mojave - sha256 "c50aae7af14976966f3d3232ac89b4b2fb45753765e07377a39daf9aaeb22960" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "hevea" => :build - depends_on "opam" => :build - depends_on "ocaml" - - def install - Dir.mktmpdir("opamroot") do |opamroot| - ENV["OPAMROOT"] = opamroot - ENV["OPAMYES"] = "1" - ENV["OPAMVERBOSE"] = "1" - system "opam", "init", "--no-setup", "--disable-sandboxing" - system "opam", "install", "ocamlfind" - system "./autogen" - system "opam", "config", "exec", "--", "./configure", - "--disable-dependency-tracking", - "--enable-release", - "--enable-ocaml", - "--enable-opt", - "--with-pdflatex=no", - "--prefix=#{prefix}" - ENV.deparallelize - system "opam", "config", "exec", "--", "make" - system "make", "install" - end - - 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/cocoapods.rb b/Formula/cocoapods.rb deleted file mode 100644 index 8567b5780e07a..0000000000000 --- a/Formula/cocoapods.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Cocoapods < Formula - desc "Dependency manager for Cocoa projects" - homepage "https://cocoapods.org/" - url "https://github.com/CocoaPods/CocoaPods/archive/1.9.3.tar.gz" - sha256 "12d8f52dcfbaf0f4b3e52001e072e26aa3c967e1c41e84511e84b587ae434e27" - - bottle do - sha256 "70f8c793bb60631422db028bbebb64ba9fcc1085a216abe5e625357380e06d46" => :catalina - sha256 "074e5b53b7a054c132582183dcf47546ddd028a7beb9fcdc653fe4a43225bcf3" => :mojave - sha256 "61d9473fd19573cebe3401921c69b8bc69eba9c096de654776a24dedd089ce65" => :high_sierra - end - - depends_on "pkg-config" => :build - - uses_from_macos "libffi", :since => :catalina - uses_from_macos "ruby", :since => :catalina - - def install - if MacOS.version >= :mojave && MacOS::CLT.installed? - ENV["SDKROOT"] = ENV["HOMEBREW_SDKROOT"] = MacOS::CLT.sdk_path(MacOS.version) - end - - 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/coconut.rb b/Formula/coconut.rb deleted file mode 100644 index 720252a88402c..0000000000000 --- a/Formula/coconut.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Coconut < Formula - include Language::Python::Virtualenv - - desc "Simple, elegant, Pythonic functional programming" - homepage "http://coconut-lang.org/" - url "https://files.pythonhosted.org/packages/49/bd/c77663bf5525bcb3c0995ebe0257cc5a9ef6d191cdb354faccc9841afe99/coconut-1.4.3.tar.gz" - sha256 "5053e876388faaa792154d3e86c27dcfa721d48a3611a8d9b94e7567e5652c0b" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "721657bf79238e4b65554edf1ae2559d2455223233af7376f3520cae9db0068d" => :catalina - sha256 "0c25d41587f659e14e81828374384dc803ac5ad61077103c597257ece36ac0a2" => :mojave - sha256 "80c780f3b9b9d1b07a258008aba03156a2ff4e44bd92850d38320d3d8d90b74d" => :high_sierra - end - - depends_on "python@3.8" - - resource "cPyparsing" do - url "https://files.pythonhosted.org/packages/f4/2e/11f7fd3dd699c57d27890971e104b632c7f6c4f96a9e58cd062473b39922/cPyparsing-2.4.5.0.1.1.tar.gz" - sha256 "9ef74514ca2359e3458674f1a0ee53632eb3c873361f766c5b90a7eed34699cd" - end - - resource "prompt-toolkit" do - url "https://files.pythonhosted.org/packages/69/19/3aa4bf17e1cbbdfe934eb3d5b394ae9a0a7fb23594a2ff27e0fdaf8b4c59/prompt_toolkit-3.0.5.tar.gz" - sha256 "563d1a4140b63ff9dd587bda9557cffb2fe73650205ab6f4383092fb882e7dc8" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/89/38/459b727c381504f361832b9e5ace19966de1a235d73cdbdea91c771a1155/wcwidth-0.2.5.tar.gz" - sha256 "c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83" - 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/cocot.rb b/Formula/cocot.rb deleted file mode 100644 index 53d1acf822cc3..0000000000000 --- a/Formula/cocot.rb +++ /dev/null @@ -1,21 +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 "c56c078fce103138a45bd1c715dc3854b9eddf207575fada0e736b866d4f46bb" => :catalina - 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 3b6efb91c6e98..0000000000000 --- a/Formula/coda-cli.rb +++ /dev/null @@ -1,17 +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" - license "MIT" - - bottle :unneeded - - def install - bin.install "coda" - end - - test do - system "#{bin}/coda", "-h" - end -end diff --git a/Formula/code-server.rb b/Formula/code-server.rb deleted file mode 100644 index 6d9aa79fcc545..0000000000000 --- a/Formula/code-server.rb +++ /dev/null @@ -1,72 +0,0 @@ -class CodeServer < Formula - desc "Access VS Code through the browser" - homepage "https://github.com/cdr/code-server" - url "https://registry.npmjs.org/code-server/-/code-server-3.4.1.tgz" - sha256 "38f14f7e9307e4fea7eeeaabdcbd7ff414c41136337a04530692207263101a2a" - license "MIT" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "e60052993a7053e4814d3ea9aa1b516b5ab7131c71dc524e2edd7abdf1fa7aee" => :catalina - sha256 "eda0ef4457730392ec9fbd0354ef3c25e67d6c658563876837c16cc994200b02" => :mojave - sha256 "f795b83b4a1333b0da1ef805257473937783aefecc0bb93c6e6ef36d83df07e9" => :high_sierra - end - - depends_on "python@3.8" => :build - depends_on "yarn" => :build - depends_on "node" - - on_linux do - depends_on "pkg-config" => :build - depends_on "libsecret" - end - - def install - system "yarn", "--production", "--frozen-lockfile" - libexec.install Dir["*"] - env = { :PATH => "#{HOMEBREW_PREFIX}/opt/node/bin:$PATH" } - (bin/"code-server").write_env_script "#{libexec}/out/node/entry.js", env - 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 - - plist_options :manual => "code-server" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{HOMEBREW_PREFIX}/bin/code-server - - RunAtLoad - - WorkingDirectory - #{ENV["HOME"]} - StandardOutPath - #{var}/log/code-server.log - StandardErrorPath - #{var}/log/code-server.log - - - EOS - end - - test do - system bin/"code-server", "--extensions-dir=.", "--install-extension", "ms-python.python" - assert_equal "info Using config file ~/.config/code-server/config.yaml\nms-python.python\n", - shell_output("#{bin/"code-server"} --extensions-dir=. --list-extensions") - end -end diff --git a/Formula/codec2.rb b/Formula/codec2.rb deleted file mode 100644 index 00122a599d120..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://github.com/drowe67/codec2/archive/v0.9.2.tar.gz" - sha256 "19181a446f4df3e6d616b50cabdac4485abb9cd3242cf312a0785f892ed4c76c" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "d41040646585e5b91438818ff4dfdccc94b3a2567d31d6960710f8f2455bab04" => :catalina - sha256 "460c2febeb64e913796ee3f161b8fa50bbc00904c99228d5122324ebadd91fe9" => :mojave - sha256 "5f4530a54adbc38253b993bdbb21da86b4d11725b2edcbec79e43ed739875208" => :high_sierra - 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 1d43c5a9f3f4a..0000000000000 --- a/Formula/codemod.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Codemod < Formula - include Language::Python::Virtualenv - - 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" - license "Apache-2.0" - revision 3 - version_scheme 1 - head "https://github.com/facebook/codemod.git" - - bottle do - cellar :any_skip_relocation - sha256 "3b32fef1fef317a4544225f6de58e0c1e970de6deb10258fe2d3f937116d5468" => :catalina - sha256 "da2eee278c0136d201d2c59db1876f90996600c8a00a0c2434742015846d7457" => :mojave - sha256 "31f1ef7e3e6867ef52f0922c807762363b3a4f1c520b0de5bbd448282f95a5e5" => :high_sierra - end - - depends_on "python@3.8" - - def install - virtualenv_install_with_resources - 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 36893634c3ec5..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.23.0.tar.gz" - sha256 "c8d1cac148de8979fa4fb4455edc7610e36519503bf9848b6edd008b00c41690" - license "MPL-2.0" - - bottle do - cellar :any - sha256 "b3f585e17783444968f0739397eb41fb14f897584118689bf1dbb862344e4221" => :catalina - sha256 "94fd84eb8c088b69eeddd1e09ad6bf7ed97ddd052e2ab4f6381776a6b4d3622d" => :mojave - sha256 "da150e36ca0d9cc56f7b243aa26677e4bed67335b1be5d01f10eeaf83df6884b" => :high_sierra - 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/codespell.rb b/Formula/codespell.rb deleted file mode 100644 index 573b88217ad8e..0000000000000 --- a/Formula/codespell.rb +++ /dev/null @@ -1,26 +0,0 @@ -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/7e/37/b15b4133e90bbef5acecfd2f3f3871c1352ee281c042fd64a22a72735fb8/codespell-1.17.1.tar.gz" - sha256 "25a2ecd86b9cdc111dc40a30d0ed28c578e13a0ce158d1c383f9d47811bfcd23" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "fb3fb87c3d707656b5c796fd40a13b6e7d0170f5cc4db6361751074b1f089bcf" => :catalina - sha256 "f44c96916092e661dfa53499d3570b98bba5fbcf964751f55c775e0aee68b37c" => :mojave - sha256 "752254907866753d1941f39193d67cb2fbaa54f294d6d0f4a1f11cd8a8247aae" => :high_sierra - end - - depends_on "python@3.8" - - def install - virtualenv_install_with_resources - end - - test do - assert_equal "1: teh\n\tteh ==> the\n", shell_output("echo teh | #{bin}/codespell -", 1) - end -end diff --git a/Formula/coffeescript.rb b/Formula/coffeescript.rb deleted file mode 100644 index 9e01cb681ca4b..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.5.1.tgz" - sha256 "0ab43e873a859d323f2f5a0069a8bef3acfa72b09769be3350c9d43c5bb489a0" - license "MIT" - head "https://github.com/jashkenas/coffeescript.git" - - bottle do - cellar :any_skip_relocation - sha256 "090fe2a4161fbcf4e7615cded97c8e9736f7939c1a70a863f37d83141f5cb118" => :catalina - sha256 "acd2a08cb5db976c36508582ac5ff82476ad9dc037ab065353d071cf46c211f5" => :mojave - sha256 "4ee049a8e7bb8a0c67452cb0b912ef5fd4e402c4948cf1b4cb8a5022640df19e" => :high_sierra - 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 c090cf7471459..0000000000000 --- a/Formula/cogl.rb +++ /dev/null @@ -1,59 +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.8.tar.xz" - sha256 "a805b2b019184710ff53d0496f9f0ce6dcca420c141a0f4f6fcc02131581d759" - - bottle do - sha256 "37fdd46a2845adf0e8f4ce85d5a80384ea235e435ef5f42167622f5224e4e51f" => :catalina - sha256 "eb37baaa178631afac43c8bb1c93cdf9b78dd7d44862c63dec598d54a51b201e" => :mojave - sha256 "46de52386a1123e828d94598279a99a88e3819d8f1dac1a51f39850a321ff7f2" => :high_sierra - end - - head do - url "https://gitlab.gnome.org/GNOME/cogl.git" - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "gdk-pixbuf" - depends_on "glib" - depends_on "pango" - - def install - # Don't dump files in $HOME. - ENV["GI_SCANNER_DISABLE_CACHE"] = "yes" - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --enable-cogl-pango=yes - --enable-introspection=yes - --disable-glx - --without-x - ] - - system "./configure", *args - system "make", "install" - end - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - CoglColor *color = cogl_color_new(); - cogl_color_free(color); - 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", - "-L#{lib}", "-lcogl" - system "./test" - end -end diff --git a/Formula/cointop.rb b/Formula/cointop.rb deleted file mode 100644 index 14e00a06dce2d..0000000000000 --- a/Formula/cointop.rb +++ /dev/null @@ -1,25 +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.4.6.tar.gz" - sha256 "69391a7c6f3a920c175685b9917086d449f4c1ff72c5b98ab08118489f15c0a9" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "1c5c3dd8363fa4b9d138cbf5a8689618b69f3cc4854b1216de0bc7299b68f4bd" => :catalina - sha256 "d04baa2622fcb278c5924a1eb8658ca2360b92864267008fa0e9007739c783c2" => :mojave - sha256 "672b40275b391c7ea1ea215eda5ac2c09df08a583adc6c2d7f59af41ad174c3e" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"cointop" - prefix.install_metafiles - end - - test do - system bin/"cointop", "test" - end -end diff --git a/Formula/coinutils.rb b/Formula/coinutils.rb deleted file mode 100644 index c9aa936dd0749..0000000000000 --- a/Formula/coinutils.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Coinutils < Formula - desc "COIN-OR utilities" - homepage "https://github.com/coin-or/CoinUtils" - url "https://github.com/coin-or/CoinUtils/archive/releases/2.11.4.tar.gz" - sha256 "d4effff4452e73356eed9f889efd9c44fe9cd68bd37b608a5ebb2c58bd45ef81" - license "EPL-1.0" - revision 1 - head "https://github.com/coin-or/CoinUtils.git" - - bottle do - cellar :any - rebuild 1 - sha256 "ec360d8c70a2f54dc6ab4cbabedf3e7f801bc1ae85e630ef9884d0a79ad706f0" => :catalina - sha256 "eb85ec2e02aed09292625122dc05fbcf64b85d7f82cc6d001975eed43cfc1de1" => :mojave - sha256 "f7bfde6c8c42b6f7d3925de0577d10bcef5b171b3337ea4c70b08a8ec20c026a" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "openblas" - - resource "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 - - def install - args = [ - "--datadir=#{pkgshare}", - "--disable-debug", - "--disable-dependency-tracking", - "--includedir=#{include}/coinutils", - "--prefix=#{prefix}", - "--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 - 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("coin-or-tools-data-sample-p0201-mps").stage testpath - (testpath/"test.cpp").write <<~EOS - #include - int main() { - CoinMpsIO mpsIO; - return mpsIO.readMps("#{testpath}/p0201.mps"); - } - EOS - system ENV.cxx, "test.cpp", "-I#{opt_include}/coinutils/coin", - "-L#{opt_lib}", "-lCoinUtils" - system "./a.out" - end -end diff --git a/Formula/colfer.rb b/Formula/colfer.rb deleted file mode 100644 index 6046300993039..0000000000000 --- a/Formula/colfer.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Colfer < Formula - desc "Schema compiler for binary data exchange" - homepage "https://github.com/pascaldekloe/colfer" - url "https://github.com/pascaldekloe/colfer/archive/v1.8.1.tar.gz" - sha256 "5d184c8a311543f26c957fff6cad3908b9b0a4d31e454bb7f254b300d004dca7" - license "CC0-1.0" - - bottle do - cellar :any_skip_relocation - sha256 "dfdb2743960de62ee18ab35a7ead3d2d8de4207cc6ffa11ff0d8ebf393a591e8" => :catalina - sha256 "dfdb2743960de62ee18ab35a7ead3d2d8de4207cc6ffa11ff0d8ebf393a591e8" => :mojave - sha256 "dfdb2743960de62ee18ab35a7ead3d2d8de4207cc6ffa11ff0d8ebf393a591e8" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args, "-o", 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/collada-dom.rb b/Formula/collada-dom.rb deleted file mode 100644 index 549bd223e19f0..0000000000000 --- a/Formula/collada-dom.rb +++ /dev/null @@ -1,44 +0,0 @@ -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/v2.5.0.tar.gz" - sha256 "3be672407a7aef60b64ce4b39704b32816b0b28f61ebffd4fbd02c8012901e0d" - head "https://github.com/rdiankov/collada-dom.git" - - bottle do - sha256 "5e86a0dfc3311b0c2bc49017493f4c729a42b0a1d8e6c8a8bb2c7145197f9509" => :catalina - sha256 "67da6177f67deeba4a08cc0648766856f647eb54ca9cfdf8fd61a2e665330614" => :mojave - sha256 "a88714bbcd001a475d4222407031997af3cb34fe6214352a562021770a09a560" => :high_sierra - sha256 "69a6c5f038f7d622130b272ac2c3b35beffb11b5ab0c4b080de422b68ebd7466" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "pcre" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - - using namespace std; - - int main() - { - cout << GetCOLLADA_VERSION() << endl; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-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 diff --git a/Formula/collectd.rb b/Formula/collectd.rb deleted file mode 100644 index 30d2d2ba506b5..0000000000000 --- a/Formula/collectd.rb +++ /dev/null @@ -1,94 +0,0 @@ -class Collectd < Formula - desc "Statistics collection and monitoring daemon" - homepage "https://collectd.org/" - url "https://collectd.org/files/collectd-5.11.0.tar.bz2" - sha256 "37b10a806e34aa8570c1cafa6006c604796fae13cc2e1b3e630d33dcba9e5db2" - - bottle do - sha256 "6b1fc316e7cab7aa33cfb8034a4e7485798ef2ceb477ceee88c212af480a1d3d" => :catalina - sha256 "0a3e17f5f67372dfb30d24f1a3253f53d20d22304f061d90d48a4f7cdd38bbb2" => :mojave - sha256 "380302d441ea46e334793feb602e788fe93fdaf13356bf8acc4ef8914d8005bb" => :high_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" - - uses_from_macos "bison" - uses_from_macos "flex" - uses_from_macos "perl" - - 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 df08c6a88dfd3..0000000000000 --- a/Formula/collector-sidecar.rb +++ /dev/null @@ -1,66 +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/1.0.2.tar.gz" - sha256 "ee7ddb725d3475656df0bb08476e64c7f919acfc011a338b4532249363778130" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "a246ba4b742f4813ea11488b1b958806d0852af192381b686326d28339651014" => :catalina - sha256 "c5df7e3fe89d27da283cba2d44c8d9bfd4edd686167b8d4acf0c6f0387154fef" => :mojave - sha256 "267c985605ca057bff286bc111fc6ac84dfc0d4bb391da19c044ddef381c7a74" => :high_sierra - sha256 "6e09f805d30b96d2650a6541fddbda8a55d6ef74d7de7e96c642df5d2cd7d18b" => :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 "sidecar-example.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/sidecar/sidecar.yml").install "sidecar-example.yml" - bin.install "graylog-sidecar" - prefix.install_metafiles - end - end - - plist_options :manual => "graylog-sidecar" - - def plist - <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/graylog-sidecar - RunAtLoad - - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/graylog-sidecar -version") - end -end diff --git a/Formula/color-code.rb b/Formula/color-code.rb deleted file mode 100644 index 42edd8a4ebdc1..0000000000000 --- a/Formula/color-code.rb +++ /dev/null @@ -1,30 +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 "3e03afccc282a21468f748cefdbdbf3d577dc6f84e2ef40f9b00379e48e18dd3" => :catalina - 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 c8fa3db53dce2..0000000000000 --- a/Formula/colordiff.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Colordiff < Formula - desc "Color-highlighted diff(1) output" - homepage "https://www.colordiff.org/" - url "https://www.colordiff.org/colordiff-1.0.19.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/colordiff-1.0.19.tar.gz" - sha256 "46e8c14d87f6c4b77a273cdd97020fda88d5b2be42cf015d5d84aca3dfff3b19" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "f0433560a0417e350a57ad24a80d277cb3cc2665046a10d8db630ef432529603" => :catalina - sha256 "f0433560a0417e350a57ad24a80d277cb3cc2665046a10d8db630ef432529603" => :mojave - sha256 "f0433560a0417e350a57ad24a80d277cb3cc2665046a10d8db630ef432529603" => :high_sierra - end - - depends_on "coreutils" => :build # GNU install - - conflicts_with "cdiff", :because => "both install `cdiff` binaries" - - 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/colormake.rb b/Formula/colormake.rb deleted file mode 100644 index 00c4f5c334dda..0000000000000 --- a/Formula/colormake.rb +++ /dev/null @@ -1,33 +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" - license "GPL-2.0" - 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 76a94ab121483..0000000000000 --- a/Formula/colorsvn.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Colorsvn < Formula - desc "Subversion output colorizer" - homepage "https://web.archive.org/web/20170725092001/colorsvn.tigris.org/" - url "https://web.archive.org/web/20170725092001/colorsvn.tigris.org/files/documents/4414/49311/colorsvn-0.3.3.tar.gz" - sha256 "db58d5b8f60f6d4def14f8f102ff137b87401257680c1acf2bce5680b801394e" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "fb2e7d5ebe86b5c758a88cc06fe9e79c0b6b7bb86153fe116380d9c7875b6355" => :catalina - sha256 "46d8260b22e8a86b2bb573bffff4c6b8cea06dd8e3b2fe7e35e4b66960eb38ee" => :mojave - sha256 "4135712b5dd13e852b9c3ec5b7e95f22f5ec89e28e9f600a9372bd260b2851cf" => :high_sierra - sha256 "5c56662f331161022c31f665d980e077d6a01328864c6c59c137de3b0b57e4f2" => :sierra - sha256 "bf4048c281332c5cfcae4fc74c0fa233ad84c3fe2c111e633101d593284fe601" => :el_capitan - sha256 "88c79f8a9bc43d118449ce9d97061af4633f15f942a0a48caef5e1b327aea0e5" => :yosemite - sha256 "2711d058fa4c892f350b6309a82f7eeb85455bc1b336afc75587c467121a553d" => :mavericks - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/colorsvn/0.3.3.patch" - sha256 "2fa2c40e90c04971865894933346f43fc1d85b8b4ba4f1c615a0b7ab0fea6f0a" - end - - 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 diff --git a/Formula/colortail.rb b/Formula/colortail.rb deleted file mode 100644 index 8a848e2c61536..0000000000000 --- a/Formula/colortail.rb +++ /dev/null @@ -1,39 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "76e327c10e6614aed10396f4da1008eda7d0574c77b009e6c4cc109829033bb1" => :catalina - sha256 "f68bafd58bcff89453bf8f81331eb968c5bde460821a885523863ec4ee9482fb" => :mojave - sha256 "a7974ddb2f0bd3a7946bb5d06fe637f94c7a8776f9cd811bf8fbd530caa92816" => :high_sierra - sha256 "44e09610d285f503fbae67f930ae7bea894c737d1e2c9c634332188340a70e3e" => :sierra - sha256 "e0c8c9af739ce911c0d09eaee26b615444c17f48de27c680cbaf27739e45d8f5" => :el_capitan - sha256 "1be1c0067a5621f5edcabf64ec06a775d334924e4ea01bccd1c42830f6c9d0c6" => :yosemite - sha256 "8570fbda1625d70eac83d0e53a1d32d0cd7b32f9fb0b8dea38d32a3228dc6688" => :mavericks - 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/comby.rb b/Formula/comby.rb deleted file mode 100644 index d84ac707eed93..0000000000000 --- a/Formula/comby.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Comby < Formula - desc "Tool for changing code across many languages" - homepage "https://comby.dev/" - url "https://github.com/comby-tools/comby/archive/0.16.0.tar.gz" - sha256 "f2be6809818baac0c4e3df6f1462616ae379319a19e2287b3cae623386fc4938" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "0f53fe71e3908a0d12571e20bfb3f9ed969a17d823e95281513312a3024e74e1" => :catalina - sha256 "7d08b2c3033529ca796125e666063df36e2eb036448ffb0a60b3bd141cc7f9d3" => :mojave - sha256 "d41bc25a97d82c1a8ef3a8f73014c4911edcfe153e11fb0b7a37b8d729b83c37" => :high_sierra - end - - depends_on "gmp" => :build - depends_on "ocaml" => :build - depends_on "opam" => :build - depends_on "pcre" - depends_on "pkg-config" - - uses_from_macos "m4" - uses_from_macos "unzip" - uses_from_macos "zlib" - - def install - ENV.deparallelize - opamroot = buildpath/".opam" - ENV["OPAMROOT"] = opamroot - ENV["OPAMYES"] = "1" - - system "opam", "init", "--no-setup", "--disable-sandboxing" - system "opam", "config", "exec", "--", "opam", "install", ".", "--deps-only", "-y" - - ENV.prepend_path "LIBRARY_PATH", opamroot/"default/lib/hack_parallel" # for -lhp - system "opam", "config", "exec", "--", "make", "release" - - bin.install "_build/default/src/main.exe" => "comby" - end - - test do - expect = <<~EXPECT - --- /dev/null - +++ /dev/null - @@ -1,3 +1,3 @@ - int main(void) { - - printf("hello world!"); - + printf("comby, hello!"); - } - EXPECT - - input = <<~INPUT - EOF - int main(void) { - printf("hello world!"); - } - EOF - INPUT - - match = 'printf(":[1] :[2]!")' - rewrite = 'printf("comby, :[1]!")' - - assert_equal expect, shell_output("#{bin}/comby '#{match}' '#{rewrite}' .c -stdin -diff << #{input}") - end -end diff --git a/Formula/commandbox.rb b/Formula/commandbox.rb deleted file mode 100644 index ccdbd005c8cae..0000000000000 --- a/Formula/commandbox.rb +++ /dev/null @@ -1,25 +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/5.1.1/commandbox-bin-5.1.1.zip" - sha256 "0b6b358ae2466297a7ddbd16d72a8b8a83c66d3f6cada0c8ff1e786d2a88af8b" - - bottle :unneeded - - depends_on "openjdk" - - resource "apidocs" do - url "https://downloads.ortussolutions.com/ortussolutions/commandbox/5.1.1/commandbox-apidocs-5.1.1.zip" - sha256 "81611cd5d6d7f5d33ca26672faeb06ec0e46e9796c986a05947ed3d460d7a7fb" - end - - def install - bin.install "box" - 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/compface.rb b/Formula/compface.rb deleted file mode 100644 index 95f81ebedf915..0000000000000 --- a/Formula/compface.rb +++ /dev/null @@ -1,33 +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 "1d05066e7342782014477a515bdb108bc4eb279cba1b8a5623ebc371c5165c16" => :catalina - 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/composer.rb b/Formula/composer.rb deleted file mode 100644 index 1688a79b9e475..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.10.8/composer.phar" - sha256 "4c40737f5d5f36d04f8b2df37171c6a1ff520efcadcb8626cc7c30bd4c5178e5" - - 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 - :catalina - sha256 "0db35eed9d049ab19d65dce6d1e1f7ba545a86318fd0618bd79ae69ae2d0c29b" => :mojave - sha256 "d34411b2b9e7057744a06d03bebda55e9dbc0d4c8d0e7a6cdec67b3d5d86cd17" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libffi" - depends_on "openssl@1.1" - depends_on "python@3.8" - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/9f/3d/8beae739ed8c1c8f00ceac0ab6b0e97299b42da869e24cf82851b27a9123/asn1crypto-1.3.0.tar.gz" - sha256 "5a215cb8dc12f892244e3a113fe05397ee23c5c4ca7a69cd6e69811755efc42d" - end - - resource "bottle" do - url "https://files.pythonhosted.org/packages/d9/4f/57887a07944140dae0d039d8bc270c249fc7fc4a00744effd73ae2cde0a9/bottle-0.12.18.tar.gz" - sha256 "0819b74b145a7def225c0e83b16a4d5711fde751cd92bae467a69efce720f69e" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz" - sha256 "8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6" - end - - resource "deprecation" do - url "https://files.pythonhosted.org/packages/cd/94/8d9d6303f5ddcbf40959fc2b287479bd9a201ea9483373d9b0882ae7c3ad/deprecation-2.0.7.tar.gz" - sha256 "c0392f676a6146f0238db5744d73e786a43510d54033f80994ef2f4c9df192ed" - end - - resource "distro" do - url "https://files.pythonhosted.org/packages/21/7b/14198029b49abdf80c6b8aadd9862f863b683dc4d3c2418f01bc6fad9fa3/distro-1.1.0.tar.gz" - sha256 "722054925f339a39ca411a8c7079f390a41d42c422697bedf228f1a9c46ac1ee" - end - - resource "fasteners" do - url "https://files.pythonhosted.org/packages/15/d7/1e8b3270f21dffcaaf5a2889675e8b2fa35f8a43a5817a31d3820e8e9495/fasteners-0.15.tar.gz" - sha256 "3a176da6b70df9bb88498e1a18a9e4a8579ed5b9141207762368a1017bf8f5ef" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz" - sha256 "b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" - 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/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "monotonic" do - url "https://files.pythonhosted.org/packages/19/c1/27f722aaaaf98786a1b338b78cf60960d9fe4849825b071f4e300da29589/monotonic-1.5.tar.gz" - sha256 "23953d55076df038541e648a53676fb24980f7a1be290cdda21300b3bc21dfb0" - 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 "packaging" do - url "https://files.pythonhosted.org/packages/55/fd/fc1aca9cf51ed2f2c11748fa797370027babd82f87829c7a8e6dbe720145/packaging-20.4.tar.gz" - sha256 "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8" - 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/6e/f4/1db0a26c1c7fad81a1214ad1b02839a7bd98d8ba68f782f6edcc3d343441/pluginbase-0.7.tar.gz" - sha256 "c0abe3218b86533cca287e7057a37481883c07acef7814b70583406938214cc8" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "PyJWT" do - url "https://files.pythonhosted.org/packages/2f/38/ff37a24c0243c5f45f5798bd120c0f873eeed073994133c084e1cf13b95c/PyJWT-1.7.1.tar.gz" - sha256 "8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96" - 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/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "tqdm" do - url "https://files.pythonhosted.org/packages/a9/03/df1d77e852dd697c0ff7b7b1b9888739517e5f97dfbd2cf7ebd13234084c/tqdm-4.46.1.tar.gz" - sha256 "cd140979c2bebd2311dfb14781d8f19bd5a9debb92dcab9f6ef899c987fcf71f" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - 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 a96d30ec50e4d..0000000000000 --- a/Formula/concurrencykit.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Concurrencykit < Formula - desc "Aid design and implementation of concurrent systems" - homepage "http://concurrencykit.org/" - # latest release on github is 0.7.0 - # release on concurrencykit.org is 0.6.0 - url "https://github.com/concurrencykit/ck/archive/0.7.0.tar.gz" - mirror "http://concurrencykit.org/releases/ck-0.7.0.tar.gz" - sha256 "e730cb448fb0ecf9d19bf4c7efe9efc3c04dd9127311d87d8f91484742b0da24" - head "https://github.com/concurrencykit/ck.git" - - bottle do - cellar :any - sha256 "12788eda54c82375102f2f33e28f533151b4d3f6fa9042ea7c7aa03fb25c3e3a" => :catalina - sha256 "357062d84adf8f0c8d1a92a7fda6fb9278b6264edf061935d595342e0c334aed" => :mojave - sha256 "c8def7655e173d45ff8ec94bc78750507235fa9eb8b79be639bf250698d59761" => :high_sierra - 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/confd.rb b/Formula/confd.rb deleted file mode 100644 index c8655b3fe1fb8..0000000000000 --- a/Formula/confd.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Confd < Formula - desc "Manage local application configuration files using templates" - homepage "https://github.com/kelseyhightower/confd" - url "https://github.com/kelseyhightower/confd/archive/v0.16.0.tar.gz" - sha256 "4a6c4d87fab77aa9827370541024a365aa6b4c8c25a3a9cab52f95ba6b9a97ea" - license "MIT" - head "https://github.com/kelseyhightower/confd.git" - - bottle do - cellar :any_skip_relocation - sha256 "34d59b3c47493cd00685c62997ac0385f52f90a5d99adb9ed5c98576c6c02452" => :catalina - sha256 "6c83fe2e7e744917d241e8fd51d76b83838ac08dcab31c2663c7b2c7703140cc" => :mojave - sha256 "8605d52c611da0530d31178fbb9805592113d70b3d496d21a34696ff499aac70" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (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 <<~EOS - [template] - prefix = "/" - src = "test.tmpl" - dest = "./test.conf" - keys = [ - "/version" - ] - EOS - - keysfile = testpath/"keys.yaml" - keysfile.write <<~EOS - version: v1 - EOS - - system "confd", "-backend", "file", "-file", "keys.yaml", "-onetime", "-confdir=." - assert_predicate testpath/"test.conf", :exist? - refute_predicate (testpath/"test.conf").size, :zero? - end -end diff --git a/Formula/configen.rb b/Formula/configen.rb deleted file mode 100644 index 3e1aab95fecaa..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/1.1.1.tar.gz" - sha256 "bc35ff0970c9d892a9c9e762f9a6bc63d222d3556cec924e9292f517ac22339d" - license "MIT" - head "https://github.com/theappbusiness/ConfigGenerator.git" - - bottle do - cellar :any_skip_relocation - sha256 "82e930bb4d70ee9a6e5d992369be4752f6fed2ddb24d32e55e1deafb32552f66" => :catalina - sha256 "1eba1c4035e8bd429023f782d093cbb98dae2c7d4f6a876640afdddc8aaef9e2" => :mojave - end - - depends_on :xcode => ["10.2", :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-platform.rb b/Formula/confluent-platform.rb deleted file mode 100644 index 643e0ae9f08b8..0000000000000 --- a/Formula/confluent-platform.rb +++ /dev/null @@ -1,37 +0,0 @@ -class ConfluentPlatform < Formula - desc "Developer-optimized distribution of Apache Kafka" - homepage "https://www.confluent.io/product/confluent-platform/" - url "https://packages.confluent.io/archive/5.5/confluent-5.5.1-2.12.tar.gz" - version "5.5.1" - sha256 "60efb18fb5768d05bbe7d0194fc6b61018ea3bd562d8829f9b14d9b5dd35f790" - - bottle :unneeded - - depends_on :java => "1.8" - - conflicts_with "kafka", :because => "kafka also ships with identically named Kafka related executables" - - def install - libexec.install %w[bin etc libexec share] - rm_rf libexec/"bin/windows" - - # Delete some lines to avoid the error like - # "cd: ../Cellar/confluent-platform/5.5.0/bin/../share/java: No such file or directory" - inreplace libexec/"bin/confluent-hub", "[ -L /usr/local/bin/confluent-hub ]", "false" - - bin.write_exec_script Dir["#{libexec}/bin/*"] - end - - test do - assert_match version.to_s, shell_output("#{bin}/kafka-broker-api-versions --version") - - # The executable "confluent" tries to create .confluent under the home directory - # without considering the envrionment variable "HOME", so the execution will fail - # due to sandbox-exec. - # The message "unable to load config" means that the execution will succeed - # if the user has write permission. - assert_match /unable to load config/, shell_output("#{bin}/confluent 2>&1", 1) - - assert_match /usage: confluent-hub/, shell_output("#{bin}/confluent-hub help") - end -end diff --git a/Formula/confuse.rb b/Formula/confuse.rb deleted file mode 100644 index a0dfc14719a9a..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.3/confuse-3.3.tar.xz" - sha256 "1dd50a0320e135a55025b23fcdbb3f0a81913b6d0b0a9df8cc2fdf3b3dc67010" - license "ISC" - - bottle do - cellar :any - sha256 "13ad01ca606e746ab7f6bcd42b0da08abdcc29ccaaa9e8106f9d28bfe96bffd7" => :catalina - sha256 "d6038fe2a7fcfea4ba6e3c29174cb6201ce7d05e22ef4c76b881b9f12dabcff6" => :mojave - sha256 "371f699488d7e4459251c55e4ef4d9087b08e07b4fedfc553476bc30070ca9c1" => :high_sierra - 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 b419b445ea6f8..0000000000000 --- a/Formula/conjure-up.rb +++ /dev/null @@ -1,279 +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.9.tar.gz" - sha256 "b5ebba187d27b3474b36acd715df015b198c0e5df8aefb32200ba4f3f3de17f4" - license "MIT" - revision 2 - - bottle do - cellar :any - sha256 "e9e7df0108dd3be03a9391a95befbbfa66950bbbb48ae8fd28f4855ae6c69932" => :catalina - sha256 "dc221c6071b5a37760a530da1981a96a1f404fa461d44fee7a217897e9a01077" => :mojave - sha256 "b20ebbe1aa0c30c713e58c03ac167196f7c3b5635f95c1ce8687e6bfad9a0294" => :high_sierra - end - - depends_on "awscli" - depends_on "jq" - depends_on "juju" - depends_on "juju-wait" - depends_on "libyaml" - depends_on "pwgen" - depends_on "python@3.8" - depends_on "redis" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - # list generated from the 'requirements.txt' file in the repository root - resource "aiofiles" do - url "https://files.pythonhosted.org/packages/94/c2/e3cb60c1b7d9478203d4514e2d33ea424ad9bb98e45b21d6225db93f25c9/aiofiles-0.4.0.tar.gz" - sha256 "021ea0ba314a86027c166ecc4b4c07f2d40fc0f4b3a950d1868a0f2571c2bbee" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/9f/3d/8beae739ed8c1c8f00ceac0ab6b0e97299b42da869e24cf82851b27a9123/asn1crypto-1.3.0.tar.gz" - sha256 "5a215cb8dc12f892244e3a113fe05397ee23c5c4ca7a69cd6e69811755efc42d" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz" - sha256 "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/62/85/7585750fd65599e88df0fed59c74f5075d4ea2fe611deceb95dd1c2fb25b/certifi-2019.9.11.tar.gz" - sha256 "e4f3620cfea4f83eedc95b24abd9cd56f3c4b146dd0177e83a21b4eb49e21e50" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz" - sha256 "041c81822e9f84b1d9c401182e174996f0bae9991f33725d059b771744290774" - 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/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz" - sha256 "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651" - 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/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/93/ea/d884a06f8c7f9b7afbc8138b762e80479fb17aedbbe2b06515a12de9378d/Jinja2-2.10.1.tar.gz" - sha256 "065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013" - end - - resource "juju" do - url "https://files.pythonhosted.org/packages/18/f2/714e253e7a8a0c697b2ccd11bc42622cf4aca69eaa599e00e8aa976cb540/juju-2.6.3.tar.gz" - sha256 "cbf0ed3c317dc98b307f74ff1cb99978857c008aeb05d8206c7313a28fdc207e" - end - - resource "juju-wait" do - url "https://files.pythonhosted.org/packages/d6/01/381cc24aabf820ff306b738a01b11aed5ac365a6438d46792f9fee2fe5f8/juju-wait-2.7.0.tar.gz" - sha256 "1e00cb75934defa50a2cc404574d4b633049f1fa011a197dfac33e3071840e98" - 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/d0/22/ca60ef57ad0ea904292daaa1cb0f1e991303667f70794a97674f4a3695fa/macaroonbakery-1.2.3.tar.gz" - sha256 "bd27e7d2d98cb3dc1973d7b67b2a0c475fb005c0f9c35c04dbf9b272e98939ec" - - # Python 3.8 compatibility platform.linux_distribution - # Remove in next release - patch do - url "https://github.com/go-macaroon-bakery/py-macaroon-bakery/pull/75.patch?full_index=1" - sha256 "70b36abee3f9d93afee7fb4d4cb9018370aad83f16a2ab7c5b5770aa1178be86" - end - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - 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/fc/c7/829c73c64d3749da7811c06319458e47f3461944da9d98bb4df1cb1598c2/oauthlib-3.1.0.tar.gz" - sha256 "bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/54/68/dde7919279d4ecdd1607a7eb425a2874ccd49a73a5a71f8aa4f0102d3eb8/paramiko-2.6.0.tar.gz" - sha256 "f4b2edfa0d226b70bd4ca31ea7e389325990283da23465d572ed1f70a7583041" - 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/d1/5f/a370a1e05589665bcdb98ea3b270eed99d7c4c6d8ff56438ef1e564b3057/progressbar2-3.47.0.tar.gz" - sha256 "7538d02045a1fd3aa2b2834bfda463da8755bd3ff050edc6c5ddff3bc616215f" - end - - resource "protobuf" do - url "https://files.pythonhosted.org/packages/7d/d0/473a91ac2c59639b9fe2f3248d98b4d6084d4be8254a7b83f010feac8de9/protobuf-3.9.2.tar.gz" - sha256 "843f498e98ad1469ad54ecb4a7ccf48605a1c5d2bd26ae799c7a2cddab4a37ec" - end - - resource "psutil" do - url "https://files.pythonhosted.org/packages/1c/ca/5b8c1fe032a458c2c4bcbe509d1401dca9dda35c7fc46b36bb81c2834740/psutil-5.6.3.tar.gz" - sha256 "863a85c1c0a5103a12c05a35e59d336e1d665747e531256e061213e2e90f63f3" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/ca/f8/2a60a2c88a97558bdd289b6dc9eb75b00bd90ff34155d681ba6dbbcb46b2/pyasn1-0.4.7.tar.gz" - sha256 "a9495356ca1d66ed197a0f72b41eb1823cf7ea8b5bd07191673e8147aecf8604" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - 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/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz" - sha256 "0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c" - 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/27/c0/fbd352ca76050952a03db776d241959d5a2ee1abddfeb9e2a53fdb489be4/pytz-2019.2.tar.gz" - sha256 "26c0b32e437e54a18161324a2fca3c4b9846b74a8dccddd843113109e1116b32" - end - - resource "pyvmomi" do - url "https://files.pythonhosted.org/packages/eb/87/ebf153a3aafdac7c54c5578b6240d7930a8c0a1a21bdd98d271fd131673c/pyvmomi-6.7.3.tar.gz" - sha256 "d639d09eb3c7b118bc83b48472c27a4567dcc128dac0ac25ee2c03ed6afbe584" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz" - sha256 "01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4" - 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/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz" - sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4" - 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 "sh" do - url "https://files.pythonhosted.org/packages/7c/71/199d27d3e7e78bf448bcecae0105a1d5b29173ffd2bbadaa95a74c156770/sh-1.12.14.tar.gz" - sha256 "b52bf5833ed01c7b5c5fb73a7f71b3d98d48e9b9b8764236237bdc7ecae850fc" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - 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/53/8b/fe35c9ffa939db896aaad229e42376fd203d44a86329e8bf4af736aa9982/theblues-0.5.1.tar.gz" - sha256 "908b4c478fa4907a5e40512a0e78a646792a219ac3343e6cdb412cf29f6be58e" - end - - resource "toposort" do - url "https://files.pythonhosted.org/packages/e5/d8/9bc1598ddf74410beba243ffeaee8d0b3ca7e9ac5cefe77367da497433e1/toposort-1.5.tar.gz" - sha256 "dba5ae845296e3bf37b042c640870ffebcdeb8cd4df45adaa01d8c5476c557dd" - 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/ff/44/29655168da441dff66de03952880c6e2d17b252836ff1aa4421fba556424/urllib3-1.25.6.tar.gz" - sha256 "9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/c7/90/415728875c230fafd13d118512bde3184d810d7bf798a631abc05fac09d0/urwid-2.0.1.tar.gz" - sha256 "644d3e3900867161a2fc9287a9762753d66bd194754679adb26aede559bcccbc" - end - - resource "websockets" do - url "https://files.pythonhosted.org/packages/ba/60/59844a5cef2428cb752bd4f446b72095b1edee404a58c27e87cd12a141e2/websockets-7.0.tar.gz" - sha256 "08e3c3e0535befa4f0c4443824496c03ecc25062debbcf895874f8a0b4c97c9f" - 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 "conjure-up #{version}", shell_output("#{bin}/conjure-up --version") - system 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 c9683ff9df320..0000000000000 --- a/Formula/connect.rb +++ /dev/null @@ -1,26 +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 "a353ddbeceae3a28038be62f2bbbdc54be7f2bd8642c57e33c2cd5f883dcfb3d" => :catalina - 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 300c4f0a5db4b..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.5/conserver-8.2.5.tar.gz" - sha256 "7db192f304126d7e5c15421c4c83cd5c08039f2f2b3c61b2998e71881ae47eea" - - bottle do - cellar :any_skip_relocation - sha256 "ce9d095a9e435480fe4a8eb2e73c0732fe0d7eda89aafc98e0599453eaa8f626" => :catalina - sha256 "70283393748aaf6397ea4b0bcdda5f7192597da2093e8fe0c21fcbc89cd5e900" => :mojave - sha256 "e5de5fdc13fd75c8ab4cb11f0a86408b63b2683ac9aacf573d7df0500dc38210" => :high_sierra - 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 ba7c860f9d76b..0000000000000 --- a/Formula/console_bridge.rb +++ /dev/null @@ -1,35 +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/1.0.0.tar.gz" - sha256 "880bbded7fcdc71479e9b1efc3ba5353f08eed23f0009c93d6bea8ba3974d078" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "8d2a1fc160054eeb2a8e373599867ce8c02c2e1a9e6c4f6ca38e1108d328577f" => :catalina - sha256 "61bbee506d4e6aced344f034fca587e56f0608bc75bf1b378fbecfd31e334a40" => :mojave - sha256 "ec5140cfb22e4dd077bb5d2f15b8c4e5189205e00b235dee4e8574369f38f903" => :high_sierra - end - - depends_on "cmake" => :build - - 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 f8329b49ba1fa..0000000000000 --- a/Formula/consul-backinator.rb +++ /dev/null @@ -1,41 +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" - license "MPL-2.0" - head "https://github.com/myENA/consul-backinator.git" - - bottle do - cellar :any_skip_relocation - sha256 "576e5b76d9ea50e2e68d6aa48ee434d26654a08f4c17f4dbb720aeafe59abc19" => :catalina - 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 6ebdf6024a1d7..0000000000000 --- a/Formula/consul-template.rb +++ /dev/null @@ -1,39 +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.25.0", - :revision => "edf364d29c5e2ab565081cd902cb37cb7a53bf11" - license "MPL-2.0" - head "https://github.com/hashicorp/consul-template.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "18f8279c9d16c47dcd19f6847bee1e5559729902a4ac43861c41a16ff9475860" => :catalina - sha256 "e6603f56f2d2bb333d8cd1eec11360aafacbd7dc7109b8f5dbf1233a5619779d" => :mojave - sha256 "02412d96e01e84ee47af28e8107ee386e4a1cef01ea8df45ce4a108aefd52f44" => :high_sierra - end - - depends_on "go" => :build - - def install - project = "github.com/hashicorp/consul-template" - commit = Utils.safe_popen_read("git", "rev-parse", "--short", "HEAD").chomp - ldflags = %W[ - -s -w - -X #{project}/version.Name=consul-template - -X #{project}/version.GitCommit=#{commit} - ] - system "go", "build", "-ldflags", ldflags.join(" "), *std_go_args - prefix.install_metafiles - 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 3e5426c559c70..0000000000000 --- a/Formula/consul.rb +++ /dev/null @@ -1,101 +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.8.0", - :revision => "3111cb8c7df8545abaa0c96347996b5341ff625d" - license "MPL-2.0" - head "https://github.com/hashicorp/consul.git", - :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "62f051244bfe72f748a7ced54bffae31d3a42e1e9116750f4b01d26008012e18" => :catalina - sha256 "a4f980e5674099da1126571ade778cf935e80d1325c71104194bd40de7bbcac8" => :mojave - sha256 "d0e30c7d24b99ba1dba65f4ff57019995ff44905ada6c6f5068ae5af0faf0694" => :high_sierra - end - - depends_on "go" => :build - depends_on "gox" => :build - - uses_from_macos "zip" => :build - - def install - 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 -bind 127.0.0.1" - - def plist - <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/consul - agent - -dev - -bind - 127.0.0.1 - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/consul.log - StandardOutPath - #{var}/log/consul.log - - - EOS - end - - test do - http_port = free_port - fork do - # most ports must be free, but are irrelevant to this test - system( - "#{bin}/consul", - "agent", - "-dev", - "-bind", "127.0.0.1", - "-dns-port", "-1", - "-grpc-port", "-1", - "-http-port", http_port, - "-serf-lan-port", free_port, - "-serf-wan-port", free_port, - "-server-port", free_port - ) - end - - # wait for startup - sleep 3 - - k = "brew-formula-test" - v = "value" - system "#{bin}/consul", "kv", "put", "-http-addr", "127.0.0.1:#{http_port}", k, v - assert_equal v, shell_output("#{bin}/consul kv get -http-addr 127.0.0.1:#{http_port} #{k}").chomp - end -end diff --git a/Formula/contacts.rb b/Formula/contacts.rb deleted file mode 100644 index cc4cb75dcf2d1..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 "https://web.archive.org/web/20181108222900/gnufoo.org/contacts/contacts.html" - url "https://github.com/dhess/contacts/archive/4092a3c6615d7a22852a3bafc44e4aeeb698aa8f.tar.gz" - version "1.1a-3" - sha256 "e3dd7e592af0016b28e9215d8ac0fe1a94c360eca5bfbdafc2b0e5d76c60b871" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "02f0086162efb3e8473f846252a6c4813e85a1bbf57a38e3420f20946eafa60f" => :catalina - sha256 "ad45d22cee04997d286b7e07f19328cd59dcb3a335a6a93e5ed24a8b995080f1" => :mojave - sha256 "27b7b256aa6f034b245c6cc1e6c7def038bbf183e73f94db942a220aa876ef0d" => :high_sierra - sha256 "21bf2ec23b9f096ed09acd44dbd7c2cc59891c01a821a6695e58d69c54647c0e" => :sierra - sha256 "7f6c6817310dacf83041d2017e8841b49e26df0d09039692576b6fe0fed52ecc" => :el_capitan - sha256 "9a9c89e40f9ccf4ec45cf63414eaf31266dfc9b71dc96d8c02f7ab2b38e8f346" => :mavericks - 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 0ba486b1208d7..0000000000000 --- a/Formula/container-diff.rb +++ /dev/null @@ -1,34 +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.15.0.tar.gz" - sha256 "4bdd73a81b6f7a988cf270236471016525d0541f5fe04286043f3db28e4b250c" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "8baffc25effb624f5882d57055512921276b4bc2e9067ed76b19e152f0109b59" => :catalina - sha256 "31af3976b5c63927f934d3155de81d6b6a241bae7244d103012d0d7cbfbeded7" => :mojave - sha256 "6002efa7d3d475f95c9bec04896e338a99da5bd333f6fc0ccd20ca80eb6e9726" => :high_sierra - sha256 "20eeaca03031026c546e493be1fc57560f9495f621526dae1c07fd4ac5f5d189" => :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/container-structure-test.rb b/Formula/container-structure-test.rb deleted file mode 100644 index b99d9f09bead8..0000000000000 --- a/Formula/container-structure-test.rb +++ /dev/null @@ -1,66 +0,0 @@ -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/v1.9.0.tar.gz" - sha256 "6a70b123a5a7781501109912249bc1209527d5dbee026e38777a25340b77a1df" - license "Apache-2.0" - head "https://github.com/GoogleContainerTools/container-structure-test.git" - - bottle do - cellar :any_skip_relocation - sha256 "51c418c5331fa47eb2a4fcaad891a9fdf16b1f1603350845cbbcef5e9b555306" => :catalina - sha256 "284e7ef67863ec90229ccae95dc240c850803aff531476f26194a84ed8cf33c7" => :mojave - sha256 "5c176caeb206957f6a943faad2a194ee88ebd5d3e6ed02cd6d9441fd3d1556c9" => :high_sierra - end - - depends_on "go" => :build - - # Small Docker image to run tests against - resource "busybox-image-tar" do - url "https://gist.github.com/AndiDog/1fab301b2dbc812b1544cd45db939e94/raw/5160ab30de17833fdfe183fc38e4e5f69f7bbae0/busybox-1.31.1.tar", - :using => :nounzip - sha256 "ab5088c314316f39ff1d1a452b486141db40813351731ec8d5300db3eb35a316" - end - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/GoogleContainerTools/container-structure-test" - dir.install buildpath.children - [buildpath/".brew_home"] - cd dir do - system "make" - bin.install "out/container-structure-test" - prefix.install_metafiles - end - end - - test do - (testpath/"test.yml").write <<~EOF - 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' - EOF - - args = %w[ - --driver tar - --json - --image busybox-1.31.1.tar - --config test.yml - ].join(" ") - - resource("busybox-image-tar").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/contentful-cli.rb b/Formula/contentful-cli.rb deleted file mode 100644 index f816c19b84d03..0000000000000 --- a/Formula/contentful-cli.rb +++ /dev/null @@ -1,31 +0,0 @@ -require "language/node" - -class ContentfulCli < Formula - desc "Contentful command-line tools" - homepage "https://github.com/contentful/contentful-cli" - url "https://registry.npmjs.org/contentful-cli/-/contentful-cli-1.4.17.tgz" - sha256 "d1a38c3f4ce6d5c5eecc02c22ec60c3de0e3f122d9a1cc1ccc070c2cedbf9e2b" - license "MIT" - head "https://github.com/contentful/contentful-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "ee999dffb7af4fad17a347edf0fc62f9a656ae50f47c696da3f0f5a55bddd65c" => :catalina - sha256 "ab4a672a796b111fdbb118c51a9fa9503f31bd9d34309ca29d7a223dc508011d" => :mojave - sha256 "104bb38a1761914b3c4648fc8e65d97fccda587bcb2b646aa383a7684f2d0f2d" => :high_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}/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 managementToken via --management-Token argument", 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 96369b9db9f23..0000000000000 --- a/Formula/convmv.rb +++ /dev/null @@ -1,23 +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 "203e34d5e76b55fabbf8548b93f749cd044ad843ca9062a916026e548332f7b0" => :catalina - 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 fde5a3725533a..0000000000000 --- a/Formula/convox.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Convox < Formula - desc "Command-line interface for the Convox PaaS" - homepage "https://convox.com/" - url "https://github.com/convox/convox/archive/3.0.29.tar.gz" - sha256 "31c74af451d68c14a0a927f96afb81dbe937d4971e3974484578109dc14a9f81" - license "Apache-2.0" - version_scheme 1 - - bottle do - cellar :any_skip_relocation - sha256 "4c474d0ddc76dea24082749a417c71fed6fabcc0541dfadda7837aa684a4b28b" => :catalina - sha256 "1e43eaf8bcf60ac01900626164c4c50914f09b742855888abc94bc3c495019b9" => :mojave - sha256 "0f4f9423595e353ae5d599826d106a8e1fd460ebcb440333653de44d3916955b" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-mod=vendor", "-ldflags=-X main.version=#{version}", - "-o", bin/"convox", "-v", "./cmd/convox" - prefix.install_metafiles - 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/cookiecutter.rb b/Formula/cookiecutter.rb deleted file mode 100644 index 7794a86ab8377..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/cookiecutter/cookiecutter" - url "https://github.com/cookiecutter/cookiecutter/archive/1.7.2.tar.gz" - sha256 "32d176621bbbe76f11012e015930d2382f0fbe803362091e79a5dddbf5612abc" - license "BSD-3-Clause" - head "https://github.com/cookiecutter/cookiecutter.git" - - bottle do - cellar :any_skip_relocation - sha256 "a2478744f1af2f5f7c88cf397f9b0909aa7ccbd9006bb47bae8d0d7de47e827a" => :catalina - sha256 "94952b16808a3e0428e3403f495d163532079a93ed7e1d1c56b0946f8bc354f4" => :mojave - sha256 "ced26761fb874fe209564d63067b40713ae17de01c7bb16baed6b8e75675abc6" => :high_sierra - end - - depends_on "python@3.8" - - resource "arrow" do - url "https://files.pythonhosted.org/packages/17/d0/8a69308a5cf4f07c53dca744402606610ec910dda1a9cdc94b3fc4a0c3a5/arrow-0.15.5.tar.gz" - sha256 "5390e464e2c5f76971b60ffa7ee29c598c7501a294bc9f5e6dadcb251a5d027b" - 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/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - 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/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "poyo" do - url "https://files.pythonhosted.org/packages/7d/56/01b496f36bbd496aed9351dd1b06cf57fd2f5028480a87adbcf7a4ff1f65/poyo-0.5.0.tar.gz" - sha256 "e26956aa780c45f011ca9886f044590e2d8fd8b61db7b1c1cf4e0869f48ed4dd" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "python-slugify" do - url "https://files.pythonhosted.org/packages/92/5f/7b84a0bba8a0fdd50c046f8b57dcf179dc16237ad33446079b7c484de04c/python-slugify-4.0.0.tar.gz" - sha256 "a8fc3433821140e8f409a9831d13ae5deccd0b033d4744d94b31fea141bdd84c" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "text-unidecode" do - url "https://files.pythonhosted.org/packages/ab/e2/e9a00f0ccb71718418230718b3d900e71a5d16e701a3dae079a21e9cd8f8/text-unidecode-1.3.tar.gz" - sha256 "bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - 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 07cb774ad59d9..0000000000000 --- a/Formula/coq.rb +++ /dev/null @@ -1,60 +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.11.2.tar.gz" - sha256 "98cb9e12ba2508a1ca59e0c638fce27bf95c37082b6f7ce355779b80b25e1bfd" - license "LGPL-2.1" - head "https://github.com/coq/coq.git" - - bottle do - sha256 "d59f03425ecdc2f904fd492996559a62ae9de11b7c80095913cecd7aee4ce876" => :catalina - sha256 "deb0c46797b5ef1f57420938278b8f7e2626e0c3a3225f12e07383ea1e8f530d" => :mojave - sha256 "cb85d3d2260c1ee93a1e05cdd0a3a61ccd77ddf7048d0ff0bd3db641bdbadeb8" => :high_sierra - end - - depends_on "ocaml-findlib" => :build - depends_on "ocaml" - depends_on "ocaml-num" - - uses_from_macos "m4" => :build - uses_from_macos "unzip" => :build - - def install - system "./configure", "-prefix", prefix, - "-mandir", man, - "-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 33d2e0c8e9e57..0000000000000 --- a/Formula/corectl.rb +++ /dev/null @@ -1,68 +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" - license "Apache-2.0" - revision 2 - head "https://github.com/TheNewNormal/corectl.git", :branch => "golang" - - bottle do - cellar :any - sha256 "b3d030cf97c738ef427b24cd492a7b746b738be84f234f5904eedbff14661570" => :mojave - sha256 "74527235d27b207a4b4331f16cfbb4f5b72b1dac36f9c9a4470626c32e882d5f" => :high_sierra - sha256 "89e963f61102d26d5fe756b06f50aa73bf9f827f81f92cefa2da6c195b7865da" => :sierra - end - - depends_on "aspcud" => :build - depends_on "go" => :build - depends_on "ocaml" => :build - depends_on "opam" => :build - depends_on :x11 => :build - depends_on "libev" - - 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", "--disable-sandboxing" - system "opam", "switch", "create", "ocaml-base-compiler.4.05.0" - system "opam", "config", "exec", "--", "opam", "install", "uri.2.2.0", - "ocamlfind.1.8.0", "qcow-format.0.5.0", "conf-libev.4-11", "io-page.1.6.1", - "mirage-block-unix.2.4.0", "lwt.3.0.0" - (opamroot/"system/bin").install_symlink opamroot/"ocaml-base-compiler.4.05.0/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/coredns.rb b/Formula/coredns.rb deleted file mode 100644 index 6d36293216293..0000000000000 --- a/Formula/coredns.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Coredns < Formula - desc "DNS server that chains plugins" - homepage "https://coredns.io/" - url "https://github.com/coredns/coredns/archive/v1.7.0.tar.gz" - sha256 "7e436e9d0c0b84af863685e05d701b84247bb0f12b6dbf05ea87e165c1398b2b" - license "Apache-2.0" - head "https://github.com/coredns/coredns.git" - - bottle do - cellar :any_skip_relocation - sha256 "717eb60a8e16116051725b2717cad72aa288038c08087981a4afdbf707bbec7f" => :catalina - sha256 "f9cea81b5c945bdf7201d9104236a71a624816093a5479fe695de727eff5682e" => :mojave - sha256 "9de8f7e481877045fdb18aad99723773a18f5a7de5c0aea1965ddece445e5092" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make" - bin.install "coredns" - end - - plist_options :startup => true - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/coredns - -conf - #{etc}/coredns/Corefile - - RunAtLoad - - KeepAlive - - StandardErrorPath - #{var}/log/coredns.log - StandardOutPath - #{var}/log/coredns.log - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - 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/coreos-ct.rb b/Formula/coreos-ct.rb deleted file mode 100644 index cbf1dab7b7354..0000000000000 --- a/Formula/coreos-ct.rb +++ /dev/null @@ -1,35 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "db582062a1743b1f01a0a90012e8a66d73b2518d88b4fb897afe9709565f6a95" => :catalina - 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 4766f9d46d386..0000000000000 --- a/Formula/coreutils.rb +++ /dev/null @@ -1,97 +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.32.tar.xz" - mirror "https://ftpmirror.gnu.org/coreutils/coreutils-8.32.tar.xz" - sha256 "4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa" - license "GPL-3.0" - - bottle do - sha256 "67a4452d75a1882bd7fb977b384204edfa2758276d66290e595487922368e093" => :catalina - sha256 "5da6cb9dbc0a8144480dde2fb78eb0a5a1710490afc3697174f7e261ec69763f" => :mojave - sha256 "caa8cd8965727d0e805eccdc3e306cd0599720cdd0d5417cfcca03bead670663" => :high_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 "aardvark_shell_utils", :because => "both install `realpath` binaries" - conflicts_with "b2sum", :because => "both install `b2sum` binaries" - 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 "md5sha1sum", :because => "both install `md5sum` and `sha1sum` binaries" - conflicts_with "truncate", :because => "both install `truncate` binaries" - conflicts_with "uutils-coreutils", :because => "coreutils and uutils-coreutils install the same binaries" - - def install - system "./bootstrap" if build.head? - - args = %W[ - --prefix=#{prefix} - --program-prefix=g - --without-gmp - ] - - # Work around a gnulib issue with macOS Catalina - args << "gl_cv_func_ftello_works=yes" - - 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 - libexec.install_symlink "gnuman" => "man" - - # Symlink non-conflicting binaries - no_conflict = %w[ - b2sum base32 chcon hostid md5sum nproc numfmt pinky ptx realpath runcon - sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf stdbuf tac timeout truncate - ] - no_conflict.each do |cmd| - bin.install_symlink "g#{cmd}" => cmd - man1.install_symlink "g#{cmd}.1" => "#{cmd}.1" - end - end - - def caveats - <<~EOS - Commands also provided by macOS 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" - 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 67f4a08aff072..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://deb.debian.org/debian/pool/main/c/corkscrew/corkscrew_2.0.orig.tar.gz" - sha256 "0d0fcbb41cba4a81c4ab494459472086f377f9edb78a2e2238ed19b58956b0be" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "83db433b1d34ad662d310504a476bcd5848955b0cc78087203b8e25164e4c8a8" => :catalina - sha256 "c9a878e744506cee8a10b370ec59a2ebfb43b0a84c73ff02b67ba24f68c17938" => :mojave - sha256 "53e2a491ecc6b1446ed3dcf1fc9a8c44ca9735acd9d0626e7806dc80b5285e79" => :high_sierra - sha256 "85d9050689df4cf0ec3275957fad60609ea1a9511079f20f05470e1b767c94f2" => :sierra - sha256 "f7e4e63df01aa33a6518f4f6c2c0ccbb0c7b8aaca95052d4aa827b5e56ed8e5c" => :el_capitan - sha256 "5a0916aa242a22808bbbb652664f1e44620c1c78b896982f67c9a5a1b85a5efc" => :yosemite - sha256 "79ca3f19c2a8df1cd7b43410ab600d32c4fc7038f99998acb656e5cc61807f25" => :mavericks - 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/corral.rb b/Formula/corral.rb deleted file mode 100644 index d131de8139cd9..0000000000000 --- a/Formula/corral.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Corral < Formula - desc "Dependency manager for the Pony language" - homepage "https://github.com/ponylang/corral" - url "https://github.com/ponylang/corral/archive/0.3.6.tar.gz" - sha256 "9f5b4e500374142098bf30274d69375507b6c3e44f653d518b61cdddae646a83" - license "BSD-2-Clause" - head "https://github.com/ponylang/corral.git" - - bottle do - cellar :any_skip_relocation - sha256 "f7d63dcd10594d659d950e8edb23dd189f56a1d887ac26f368c720feb91e674d" => :catalina - sha256 "6b9aaf79b508a63fd12311aae7d2631d45c08ab194802997d80832d530391763" => :mojave - sha256 "2551762505c66f37a181dbd5133fefb9bb92c6ed4e68a992f54db7e89be8a50f" => :high_sierra - 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}/corral", "run", "--", "ponyc", "test" - assert_equal "Hello World!", shell_output("./test1").chomp - end -end diff --git a/Formula/corsixth.rb b/Formula/corsixth.rb deleted file mode 100644 index 23ed3aa3c0ba9..0000000000000 --- a/Formula/corsixth.rb +++ /dev/null @@ -1,67 +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.64.tar.gz" - sha256 "12389a95de0031baec1a3fc77208d44228177f49564f1c79ae763ab4aeeafa98" - head "https://github.com/CorsixTH/CorsixTH.git" - - bottle do - sha256 "55125a4f568f1ba0f85b1eb4d120f5cacaea712edd83ea8f8532e88d951775f7" => :catalina - sha256 "a45d65b39202414cba78d393293003d43617b6bd2794fdd14d127ce606bdfee2" => :mojave - sha256 "a03e225349a6eb5511202933fb173600db098d8c93a5272daa09bd2c05f92801" => :high_sierra - 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 "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.2.tar.gz" - mirror "https://sources.voidlinux.org/lua-lpeg-1.0.2/lpeg-1.0.2.tar.gz" - sha256 "48d66576051b6c78388faad09b70493093264588fcd0f258ddaab1cdd4a15ffe" - 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", - "-DCORSIX_TH_DATADIR=#{prefix}/CorsixTH.app/Contents/Resources/", - *std_cmake_args - system "make" - cp_r %w[CorsixTH/CorsixTH.lua CorsixTH/Lua CorsixTH/Levels CorsixTH/Campaigns CorsixTH/Graphics CorsixTH/Bitmap], - "CorsixTH/CorsixTH.app/Contents/Resources/" - 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 c9d3e1ace464a..0000000000000 --- a/Formula/cosi.rb +++ /dev/null @@ -1,101 +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.6.tar.gz" - sha256 "007e4c4def13fcecf7301d86f177f098c583151c8a3d940ccb4c65a84413a9eb" - - bottle do - cellar :any_skip_relocation - sha256 "30bbb457c0fb67ee264331e434068a4a747ece4cbc536cb75d289a06e93988e2" => :catalina - sha256 "2ddd695441977b1cd435fbae28d9aa864d48b7a90ec24971348d91b5d0e551df" => :mojave - sha256 "00663999a04ee29f52e334022cc828d7ebe89a442f1e713afb2167112f4ebf75" => :high_sierra - 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 - port = free_port - (testpath/"config.toml").write <<~EOS - Public = "7b6d6361686d0c76d9f4b40961736eb5d0849f7db3f8bfd8f869b8015d831d45" - Private = "01a80f4fef21db2aea18e5288fe9aa71324a8ad202609139e5cfffc4ffdc4484" - Addresses = ["0.0.0.0:#{port}"] - EOS - (testpath/"group.toml").write <<~EOS - [[servers]] - Addresses = ["127.0.0.1:#{port}"] - 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 ced10a914dadd..0000000000000 --- a/Formula/coturn.rb +++ /dev/null @@ -1,72 +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.1.3/turnserver-4.5.1.3.tar.gz" - sha256 "408bf7fde455d641bb2a23ba2df992ea0ae87b328de74e66e167ef58d8e9713a" - - bottle do - sha256 "027e54c623df2dca0cb5b281123a01b5ab4625d277d7a1f7ac2bd998df790b01" => :catalina - sha256 "f5d4351c3ae9d4b8949012379f6b7cb680f4f0fdb6b01c55ff84bd735bd3a490" => :mojave - sha256 "4bfb3e74a8d467f7935ccb316097a70b3b14018b31316bccf7c758e65f2479e8" => :high_sierra - end - - depends_on "hiredis" - depends_on "libevent" - depends_on "libpq" - depends_on "openssl@1.1" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--mandir=#{man}", - "--localstatedir=#{var}", - "--includedir=#{include}", - "--libdir=#{lib}", - "--docdir=#{doc}", - "--prefix=#{prefix}" - - system "make", "install" - - man.mkpath - man1.install Dir["man/man1/*"] - end - - plist_options :manual => "turnserver -c #{HOMEBREW_PREFIX}/etc/turnserver.conf --userdb=#{HOMEBREW_PREFIX}/opt/coturn/var/db/turndb --daemon" - - def plist - <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/turnserver - -c - #{etc}/turnserver.conf - - WorkingDirectory - #{HOMEBREW_PREFIX} - RunAtLoad - - StandardErrorPath - #{var}/log/coturn.log - StandardOutPath - #{var}/log/coturn.log - - - EOS - 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 f1a9fd79f4297..0000000000000 --- a/Formula/couchdb-lucene.rb +++ /dev/null @@ -1,119 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "56e618fa1e535e061171d52dde83b617f4793b17654c4cc9adf1fc125607e096" => :catalina - sha256 "03b37461aeb2eb4172ee4ff18a44c9074d9b486bec0d3192a37bb22262e078c6" => :mojave - sha256 "2081b4665600643fd02deaac5b2177622d91729b6aec56197087b81412ecae35" => :high_sierra - end - - depends_on "maven" => :build - depends_on "couchdb" - depends_on :java => "1.8" - - 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" - 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/couchdb.rb b/Formula/couchdb.rb deleted file mode 100644 index d16db6e66103b..0000000000000 --- a/Formula/couchdb.rb +++ /dev/null @@ -1,97 +0,0 @@ -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.1.0/apache-couchdb-3.1.0.tar.gz" - mirror "https://archive.apache.org/dist/couchdb/source/3.1.0/apache-couchdb-3.1.0.tar.gz" - sha256 "4867c796a1ff6f0794b7bd3863089ea6397bd5c47544f9b97db8cdacff90f8ed" - revision 2 - - bottle do - cellar :any - sha256 "0e3d1fa0ce2afb1e38f3b141b8d7cb66211823bd57f8b72733f0261c76cf8795" => :catalina - sha256 "8a7a59746933d3b07ac907fde5b5c5b5d4ae81323155a17b683a6bb543a7383e" => :mojave - sha256 "289e443dd84e008c79649c239078890f7a2c4e5358c13b88e79002bace31b497" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "autoconf-archive" => :build - depends_on "automake" => :build - depends_on "erlang@22" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "icu4c" - depends_on "openssl@1.1" - depends_on "spidermonkey" - - conflicts_with "ejabberd", :because => "both install `jiffy` lib" - - def install - system "./configure" - system "make", "release" - # setting new database dir - inreplace "rel/couchdb/etc/default.ini", "./data", "#{var}/couchdb/data" - # remove windows startup script - File.delete("rel/couchdb/bin/couchdb.cmd") if File.exist?("rel/couchdb/bin/couchdb.cmd") - # install files - prefix.install Dir["rel/couchdb/*"] - if File.exist?(prefix/"Library/LaunchDaemons/org.apache.couchdb.plist") - (prefix/"Library/LaunchDaemons/org.apache.couchdb.plist").delete - end - end - - def post_install - # creating database directory - (var/"couchdb/data").mkpath - end - - def caveats - <<~EOS - If your upgrade from version 1.7.2_1 then your old database path is "/usr/local/var/lib/couchdb". - - The database path of this installation: #{var}/couchdb/data". - - If you want to migrate your data from 1.x to 2.x then follow this guide: - https://docs.couchdb.org/en/stable/install/upgrading.html - - EOS - end - - plist_options :manual => "couchdb" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{bin}/couchdb - - RunAtLoad - - - - EOS - 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 2 - - output = JSON.parse shell_output("curl --silent localhost:#{port}") - assert_equal "Welcome", output["couchdb"] - end -end diff --git a/Formula/couchpotatoserver.rb b/Formula/couchpotatoserver.rb deleted file mode 100644 index faf348cfb1218..0000000000000 --- a/Formula/couchpotatoserver.rb +++ /dev/null @@ -1,59 +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" - license "GPL-3.0" - 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 e9111efb606ec..0000000000000 --- a/Formula/cowsay.rb +++ /dev/null @@ -1,30 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "f6cb1c4d1b6f9d8eff3630420c8e51cb51029d00261fa30513f915ff231f5e2d" => :catalina - 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 6a90b7737dd56..0000000000000 --- a/Formula/cp2k.rb +++ /dev/null @@ -1,91 +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/v6.1.0/cp2k-6.1.tar.bz2" - sha256 "af803558e0a6b9e9d9ce8a3ab955ba32bacd179922455424e061c82c9fefa34b" - revision 2 - - bottle do - sha256 "1b442188cb4e82050da9d26b142cc570a0288c1719069b5d9ef66905aa02631f" => :catalina - sha256 "9dbb645d7b80d68cfff8f4bb53c3bcbadc9e82980517eaa2f12bb8ec2ad60258" => :mojave - sha256 "dc335861ca941065e722412473da3644d5e92e9f55f17424c7d9190693e32f6c" => :high_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 - - # Upstream fix for GCC 10, remove in next version - # https://github.com/cp2k/dbcsr/commit/fe71e6fe - patch do - url "https://github.com/Homebrew/formula-patches/raw/0c086813/cp2k/gcc10.diff" - sha256 "dfaa319c999d49faae86cafe58ddb3b696f72a89f7cc85acd47b3288c6b9ac89" - end - - def install - resource("libint").stage do - system "./configure", "--prefix=#{libexec}" - system "make" - ENV.deparallelize { system "make", "install" } - end - - # -fallow-argument-mismatch should be removed when the issue is fixed: - # https://github.com/cp2k/cp2k/issues/969 - fcflags = %W[ - -I#{Formula["fftw"].opt_include} - -I#{libexec}/include - -fallow-argument-mismatch - ] - - libs = %W[ - -L#{Formula["fftw"].opt_lib} - -lfftw3 - ] - - ENV["LIBXC_INCLUDE_DIR"] = Formula["libxc"].opt_include - ENV["LIBXC_LIB_DIR"] = Formula["libxc"].opt_lib - ENV["LIBINT_LIB_DIR"] = libexec/"lib" - - # CP2K configuration is done through editing of arch files - inreplace Dir["arch/Darwin-IntelMacintosh-gfortran.*"].each do |s| - s.gsub! /DFLAGS *=/, "DFLAGS = -D__FFTW3" - 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 1bff0adaace64..0000000000000 --- a/Formula/cpansearch.rb +++ /dev/null @@ -1,30 +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" - revision 1 - head "https://github.com/c9s/cpansearch.git" - - bottle do - cellar :any - sha256 "f5ad7240f2e1d3004c9b80d232192bbc50dcf777bdfe92fa73172e93476f5ef2" => :catalina - sha256 "5d583c37a54d9d6f96c625faf75b40c53a2ae59b8c9960f51a6f9bc215fa5bae" => :mojave - sha256 "e8197124d1341e8e5d8348cd322eac2bfa782d885c808b5322a340eb7b91ba8b" => :high_sierra - sha256 "6b4545b0455642a3b4f3c92ef480e704742cd06fd6ff64d24f9a5edbb3bc33a7" => :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/cpio.rb b/Formula/cpio.rb deleted file mode 100644 index a7f7f6ffed083..0000000000000 --- a/Formula/cpio.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Cpio < Formula - desc "Copies files into or out of a cpio or tar archive" - homepage "https://www.gnu.org/software/cpio/" - url "https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.bz2" - mirror "https://ftpmirror.gnu.org/cpio/cpio-2.13.tar.bz2" - sha256 "eab5bdc5ae1df285c59f2a4f140a98fc33678a0bf61bdba67d9436ae26b46f6d" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "1e2e8f240d9455593a653d4cc0759ee1a0596fe88641ad6a79d652f6596bb21b" => :catalina - sha256 "566b73ec056c1441e84e5be4d8f22ae0e9eec609e340d56d9ba22ebefaa273c6" => :mojave - sha256 "35cc00b8c97558822cc49cca1f40ba7a3a65af06be17317721ff471414c6f430" => :high_sierra - end - - keg_only :shadowed_by_macos, "macOS provides cpio" - - def install - system "./configure", - "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cc").write <<~EOS - #include - #include - EOS - system "ls #{testpath} | #{bin}/cpio -ov > #{testpath}/directory.cpio" - assert_path_exist "#{testpath}/directory.cpio" - end -end diff --git a/Formula/cpl.rb b/Formula/cpl.rb deleted file mode 100644 index c5d7f5b2c6ec1..0000000000000 --- a/Formula/cpl.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Cpl < Formula - desc "ISO-C libraries for developing astronomical data-reduction tasks" - homepage "https://www.eso.org/sci/software/cpl/index.html" - url "ftp://ftp.eso.org/pub/dfs/pipelines/libraries/cpl/cpl-7.1.2.tar.gz" - sha256 "b6d20752420e2333e86d9a08c24a08057351a9fef97c32f5894e63fbfece463a" - revision 6 - - bottle do - cellar :any - sha256 "4585413a3561eea4a3443b1214dd1759e82853ca5273929e202a2c38ad526add" => :catalina - sha256 "d9410e5fc7b4e1466f88233e8e5e925133257d3f33953a8ce91aee780d53db33" => :mojave - sha256 "7a810f03ee554b573832fd30285a2fad70be6b9ad6b0e9936300130396f151cd" => :high_sierra - 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 <<~EOF - #include - int main(){ - cpl_init(CPL_INIT_DEFAULT); - cpl_msg_info("hello()", "Hello, world!"); - cpl_end(); - return 0; - } - EOF - system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lcplcore", "-lcext", "-o", "test" - system "./test" - end -end diff --git a/Formula/cpm.rb b/Formula/cpm.rb deleted file mode 100644 index fe707838fe6a3..0000000000000 --- a/Formula/cpm.rb +++ /dev/null @@ -1,203 +0,0 @@ -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.993.tar.gz" - sha256 "07f66930cd173b314cc745706dc75d5cd873c498aebc65d9cecbd353cd5f9aee" - - bottle do - cellar :any_skip_relocation - sha256 "81c6cf61b1821d3d7de20bfff1c3ee6dff207399ad3b4b18d0aefa74c13b4c00" => :catalina - sha256 "f32eed6d025314d54c034b301e5c711dff0e0413d636eefd3886c65f690c2f71" => :mojave - sha256 "1207e5b101a9e9e48832c73a60dd0b58593634e83becef774d0eef3236dd21b0" => :high_sierra - end - - depends_on "perl" - - 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 "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.006.tar.gz" - sha256 "2efcbd31528be51d3022c616768558b78c6172df5f03c5dc698939f65488cb4e" - end - - resource "Command::Runner" do - url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/Command-Runner-0.102.tar.gz" - sha256 "3177c395bac36e5c26bd27145b23b2c480bff1081b9d99d6aee2ce680fc7dd35" - 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::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.23.tar.gz" - sha256 "b79dc2244b2d97b6f27167fc3b7799ef61a179040f3abd76ce1e0a3b0bc4e078" - 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.16.tar.gz" - sha256 "1a3318b89987c2aa5dd18990a109e8af63049f87e4e1a9357583beed1c3bfbda" - 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 "Parallel::Pipes" do - url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/Parallel-Pipes-0.005.tar.gz" - sha256 "44bd9e2be33d7b314f81c9b886a95d53514689090635f9fad53181f2d3051fd5" - end - - resource "Parse::PMFile" do - url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/Parse-PMFile-0.42.tar.gz" - sha256 "e7f6c70932b86eb4a2426569e33d2b651b52a24e5d0c0dcb3849d045b52c736c" - 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-1.76.tar.gz" - sha256 "b2c98e1d50d6f572483ee538a6f4ccc8d9185f91f0073fd8af7390898254413e" - 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.000024.tar.gz" - sha256 "2e9b917bd48a0615e42633b2a327494e04610d8f710765b9493d306cead98a05" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - build_pl = [ - "Module::Build::Tiny", - "Command::Runner", - "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/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/cpp-gsl.rb b/Formula/cpp-gsl.rb deleted file mode 100644 index 4574203c627bb..0000000000000 --- a/Formula/cpp-gsl.rb +++ /dev/null @@ -1,33 +0,0 @@ -class CppGsl < Formula - desc "Microsoft's C++ Guidelines Support Library" - homepage "https://github.com/Microsoft/GSL" - url "https://github.com/Microsoft/GSL/archive/v3.1.0.tar.gz" - sha256 "d3234d7f94cea4389e3ca70619b82e8fb4c2f33bb3a070799f1e18eef500a083" - head "https://github.com/Microsoft/GSL.git" - - bottle do - cellar :any_skip_relocation - sha256 "ba5b32881db75527872525bcde6bef641bdb6c89dff511ccf5105229f1ba1e7c" => :catalina - sha256 "262709d81631cc7aa7477b03bd1904320da93b12cecf4aded01e3cc59917287f" => :mojave - sha256 "262709d81631cc7aa7477b03bd1904320da93b12cecf4aded01e3cc59917287f" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", "-DGSL_TEST=false", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - gsl::span z; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", "-std=c++14" - system "./test" - end -end diff --git a/Formula/cppad.rb b/Formula/cppad.rb deleted file mode 100644 index a5d7445a55c22..0000000000000 --- a/Formula/cppad.rb +++ /dev/null @@ -1,45 +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/20200000.3.tar.gz" - sha256 "b37f3bc13d1e653828fefec604260d93224dc66a5f70da5500bc7bf2ba13c3d3" - version_scheme 1 - head "https://github.com/coin-or/CppAD.git" - - bottle do - cellar :any - sha256 "4ef0d734cddee5d7dfde8398b8b295cc35100424639db041816459636de3087f" => :catalina - sha256 "948e5a9ae91c50297d528c87b1f38afcd15f4e6b6f162ce7ddffa2f43b329143" => :mojave - sha256 "d74b4ab769dccd4537ef03dd28fea858b81ee2938df776e5d45a23069c57c142" => :high_sierra - 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 6884b48b09f71..0000000000000 --- a/Formula/cppcheck.rb +++ /dev/null @@ -1,111 +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/2.1.tar.gz" - sha256 "447d44bbaa555fa78b89dd2cb0203fd4c6f18269db8a78638b968ba7c72cb02e" - license "GPL-3.0" - head "https://github.com/danmar/cppcheck.git" - - bottle do - sha256 "ddc02ed55b089565973fc8936be8a0ae23829827d0bb8730f2dad2582ad68450" => :catalina - sha256 "416cb05e0dbd7f6b4a8c63a8dfe3a6c1d6d24c7c5d121842a4fab38bc70177f8" => :mojave - sha256 "4ea4c94f96f842874d9b07e5fd267df48d638c186ea26ee17715c1b130a0248b" => :high_sierra - end - - depends_on "python@3.8" => :test - depends_on "pcre" - - def install - ENV.cxx11 - - system "make", "HAVE_RULES=yes", "FILESDIR=#{prefix}/cfg" - - # FILESDIR is relative to the prefix for install, don't add #{prefix}. - system "make", "DESTDIR=#{prefix}", "BIN=#{bin}", "FILESDIR=/cfg", "install" - - # Move the python addons to the cppcheck pkgshare folder - (pkgshare/"addons").install Dir.glob("addons/*.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 #{Formula["python@3.8"].opt_bin}/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)) - 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(Formula["python@3.8"].opt_bin/"python3 #{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 fe8930cf8c8ef..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 - rebuild 1 - sha256 "14a71b7ff0bbcbd0def75bd0a5e4552d5bfeccd24b7de17d38dcb676c37a71cf" => :catalina - sha256 "aa587cdc614e7450100ee7c9aef5259893db98db66b9aa3fce8bc928fe080de7" => :mojave - sha256 "3339592fd6caed70941abe444cf34c1621dd65878eea1acbd07e798d4bb5c9b4" => :high_sierra - sha256 "9f21d55044af09d3eced9664c2d570657f0b3221c9f3051a5311f6f197bd2a28" => :sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - depends_on "pcre" - - 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 - - port = free_port - (testpath/"config.json").write <<~EOS - { - "service" : { - "api" : "http", - "port" : #{port}, - "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:#{port}/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 e52c7e00bdb07..0000000000000 --- a/Formula/cppi.rb +++ /dev/null @@ -1,41 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "24e10e144f6a86bb893f886cb631b9f57a3c3073fc19a0829e512c87db465ef0" => :catalina - sha256 "9091ecb45e38512cdeb73d92078d1ee9c7bd8e5bce9d1698da9a53e2ae3f8b3c" => :mojave - sha256 "bc8253f982b219088603021d510a6e7ee6d692ff5f693da19b32d0431bc9c9b4" => :high_sierra - sha256 "d4c044247ba8a12f1462089bfa22602547894f0a9081fce21c4800e192a526ae" => :sierra - sha256 "970e44d2a7a340fe29577f92c4b6dfcbac17f3aef35e6085197b668c4cd9013f" => :el_capitan - sha256 "f8198f4b6e76d9310d66d20cb0a5b2b6adc70bee83f0bbeaca8b45b6529ccc60" => :yosemite - sha256 "a37872a422b21892119583f4fe9670ff403d2e40ceb14f50166e2b501938c544" => :mavericks - 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/cppman.rb b/Formula/cppman.rb deleted file mode 100644 index 06a79e929eda9..0000000000000 --- a/Formula/cppman.rb +++ /dev/null @@ -1,51 +0,0 @@ -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/e4/a0/6c8af0f95dc7fe418f2cf812a8704780f83295235c7f32b12e87e77a79e4/cppman-0.5.1.tar.gz" - sha256 "a34261da3186d4f13836fec72e32258b82b6fad7d25f353d54ca54e831dd8589" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "fdae58d79f577a45b067be37598b239ee07f339f0dbdce0ef206caed7c83f33b" => :catalina - sha256 "6d2a39cf742b3c18ce35010bb81addd1164c6ce254e7fbf8999b0922b9326174" => :mojave - sha256 "df16ad64a2749394e0d105be9ddad4ddf782d5db56648577bf2d2568d5bd800b" => :high_sierra - end - - depends_on "python@3.8" - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/c6/62/8a2bef01214eeaa5a4489eca7104e152968729512ee33cb5fbbc37a896b7/beautifulsoup4-4.9.1.tar.gz" - sha256 "73cc4d115b96f79c7d77c1c7f7a0a8d4c57860d1041df407dd1aae7f07a77fd7" - end - - resource "html5lib" do - url "https://files.pythonhosted.org/packages/85/3e/cf449cf1b5004e87510b9368e7a5f1acd8831c2d6691edd3c62a0823f98f/html5lib-1.0.1.tar.gz" - sha256 "66cb0dcfdbbc4f9c3ba1a63fdb511ffdbd4f513b2b6d81b80cd26ce6b3fb3736" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "soupsieve" do - url "https://files.pythonhosted.org/packages/3e/db/5ba900920642414333bdc3cb397075381d63eafc7e75c2373bbc560a9fa1/soupsieve-2.0.1.tar.gz" - sha256 "a59dc181727e95d25f781f0eb4fd1825ff45590ec8ff49eadfd7f1a537cc0232" - 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 - assert_match "std::extent", shell_output("#{bin}/cppman -f :extent") - end -end diff --git a/Formula/cppp.rb b/Formula/cppp.rb deleted file mode 100644 index 47d21298a3ebd..0000000000000 --- a/Formula/cppp.rb +++ /dev/null @@ -1,42 +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 "29ce2b3314eaecc5873039675e85efb132a5ebfa9aac743d1b327b60f66c1122" => :catalina - 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 a5d4407b88909..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.16", - :revision => "18212a2a7967e12d740bfb957e500892b3463c88" - head "https://github.com/Microsoft/cpprestsdk.git", :branch => "development" - - bottle do - cellar :any - sha256 "0b7d717716ebc8393007599ed02f9a4f8b36eef1f3dd3d54d11b0966751a4f87" => :catalina - sha256 "feeabdfce6c4a065961f37c38578d626a50f8e7a3939343a6ed037f535418a02" => :mojave - sha256 "f98e8ff4c5b371ffe541eb1fefc13a178b02c07e6fab906fd206e6c833827dfa" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "openssl@1.1" - - 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@1.1"].include}", "-L#{lib}", - "-L#{Formula["openssl@1.1"].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 6de81a052d700..0000000000000 --- a/Formula/cpptest.rb +++ /dev/null @@ -1,44 +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-2.0.0/cpptest-2.0.0.tar.bz2" - sha256 "7c258936a407bcd1635a9b7719fbdcd6c6e044b5d32f53bbf6fbf6f205e5e429" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "531646bba9e8aedff87216058a90e2fdc245b11ef55ad3f5c3aaaf717fd998cb" => :catalina - sha256 "5a109d0b6cb796d0de9e6b32a6373e1e78fd4da316be33a26ba9c84fbf799eb8" => :mojave - sha256 "cac49d059592f8d9f030855041727a61c7358404e16fc63d106ade58253ba0f1" => :high_sierra - 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 94fadcf47f85f..0000000000000 --- a/Formula/cppunit.rb +++ /dev/null @@ -1,23 +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.15.1.tar.gz" - sha256 "89c5c6665337f56fd2db36bc3805a5619709d51fb136e51937072f63fcc717a7" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "3e194b84577c733e5641f305a1cb5cc76355f13037898afc56c3096f98bb78fe" => :catalina - sha256 "1c107efb84d656dd5327aa8cf13e6cbce8db7542aacba98ae98a2b05940b16ff" => :mojave - sha256 "08a339bc38db169bce2f5eb0fc0b940bc82562c37274aa770668f681aeca4386" => :high_sierra - 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 a192ab32056dd..0000000000000 --- a/Formula/cpputest.rb +++ /dev/null @@ -1,46 +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/v4.0/cpputest-4.0.tar.gz" - sha256 "21c692105db15299b5529af81a11a7ad80397f92c122bd7bf1e4a4b0e85654f7" - license "BSD-3-Clause" - head "https://github.com/cpputest/cpputest.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "9e06d26ed7a552c818c7f1d6bb68ef16e7185238a14bdf0ae337a410ecb46384" => :catalina - sha256 "59881c464ae17f1a2381145f78f614d174c83fbe8f4900e362e9a6830fcf446e" => :mojave - sha256 "9cea67d4098efe30dd499d1a999467800ff91a9e7954ec6407b03d181a20761d" => :high_sierra - 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" - - TEST_GROUP(HomebrewTest) - { - }; - - TEST(HomebrewTest, passing) - { - CHECK(true); - } - 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 \(1 tests/, shell_output("./test") - end -end diff --git a/Formula/cpr.rb b/Formula/cpr.rb deleted file mode 100644 index 81663e6108efe..0000000000000 --- a/Formula/cpr.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Cpr < Formula - desc "C++ Requests, a spiritual port of Python Requests" - homepage "https://whoshuu.github.io/cpr/" - url "https://github.com/whoshuu/cpr.git", - :tag => "v1.5.1", - :revision => "5e87cb5f45ac99858f0286dc1c35a6cd27c3bcb9" - license "MIT" - head "https://github.com/whoshuu/cpr.git" - - bottle do - cellar :any - sha256 "3de3156e76c50a9c0177f2f6b7856f83d36a7687d070c467acc9424a986a43b1" => :catalina - sha256 "477db140c07296b4fb3969b26d136afd1b7106625082cb57dfd8c274dd53da23" => :mojave - sha256 "b0c9560ba7c1fe39dfdb316541526494ea685f7c34944882ed7823f769e1cda9" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - uses_from_macos "curl" - - def install - args = std_cmake_args - args << "-DUSE_SYSTEM_CURL=ON" - args << "-DBUILD_CPR_TESTS=OFF" - - system "cmake", ".", *args, "-DBUILD_SHARED_LIBS=ON" - system "make", "install" - - system "make", "clean" - system "cmake", ".", *args, "-DBUILD_SHARED_LIBS=OFF" - system "make" - lib.install "lib/libcpr.a" - end - - test do - (testpath/"test.cpp").write <<~EOS - #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; - } - EOS - - system ENV.cxx, "-std=c++11", "-I#{include}", "-L#{lib}", "-lcpr", - "test.cpp", "-o", testpath/"test" - assert_match "200", shell_output("./test") - end -end diff --git a/Formula/cproto.rb b/Formula/cproto.rb deleted file mode 100644 index 9c103d24874a3..0000000000000 --- a/Formula/cproto.rb +++ /dev/null @@ -1,29 +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.7o.tgz" - mirror "https://deb.debian.org/debian/pool/main/c/cproto/cproto_4.7o.orig.tar.gz" - sha256 "c76b0b72064e59709459bb7d75d6ec929f77ce5ae7f2610d169ba0fa20ccb44f" - - bottle do - cellar :any_skip_relocation - sha256 "1bd13cfb0cbaf739a6108287a8b9fbe0489370d7306acead182a49ba63f7a562" => :catalina - sha256 "10ca6eb5bb793309be3dc367b013b97f3ab199cccfc27b0fac2dbdfcb8b73a62" => :mojave - sha256 "c3cb1dc57b52471d2ce88ee243dbc72bd96984ee23c6508f316fd037f283d144" => :high_sierra - sha256 "371d43e22636bad41b4a37d7abd06bc42b504b0790a14a6c54f0b5d03b693cf3" => :sierra - 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/cpu_features.rb b/Formula/cpu_features.rb deleted file mode 100644 index c9de96290a3fd..0000000000000 --- a/Formula/cpu_features.rb +++ /dev/null @@ -1,33 +0,0 @@ -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/v0.4.1.tar.gz" - sha256 "b7b6b27f759410f73f15f935ae646f30c9c6742731dc354416399677bd418156" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "cf7f7d47468e2c0cf321c22c86adb2c734920559b1a63553b1688ed0e4a39b73" => :catalina - sha256 "b2736429ca74d23173266aab1d3ee6fea58ee963e0042391d803b26d322838d7" => :mojave - sha256 "0d8119f02b609f5cfcac19177bd669668686c549bb138fbe2a0aa391df7dc838" => :high_sierra - sha256 "d703ec98a4f4913ac50c872475e7c37e6c439326db607297fa14cd438e75f919" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - output = shell_output(bin/"list_cpu_features") - assert_match /^arch\s*:/, output - 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 - assert_match /^flags\s*:/, output - end -end diff --git a/Formula/cpulimit.rb b/Formula/cpulimit.rb deleted file mode 100644 index 3140bbc85028b..0000000000000 --- a/Formula/cpulimit.rb +++ /dev/null @@ -1,27 +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 "7330907348c0a181c75b069dba7ee628e8c524c9bb9510487dbfd43730173db5" => :catalina - 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/cql.rb b/Formula/cql.rb deleted file mode 100644 index 74745b3bce9d1..0000000000000 --- a/Formula/cql.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Cql < Formula - desc "Decentralized SQL database with blockchain features" - homepage "https://covenantsql.io/" - url "https://github.com/CovenantSQL/CovenantSQL/archive/v0.8.0.tar.gz" - sha256 "fc63d9bc296b037c8a8fd1984bc6e4156d0c73d9948dfa8654a954f904ad1f4a" - license "Apache-2.0" - head "https://github.com/CovenantSQL/CovenantSQL.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "6910f358939ba05d8db050688abe4d6df42ce12801949e8be7f49743023d572f" => :catalina - sha256 "dd644eb78e0c68e04fcde376481d12ab7d5a0cfddcd844fe3529d8129fec262b" => :mojave - sha256 "623599aba9f2a656f5ee530dd367b0741b6b1e7a3e564c629adf29b5ef3a290e" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["CQLVERSION"] = "v#{version}" - ENV["CGO_ENABLED"] = "1" - mkdir_p "src/github.com/CovenantSQL" - ldflags = "-X main.version=v#{version} " \ - "-X github.com/CovenantSQL/CovenantSQL/conf.RoleTag=C " \ - "-X github.com/CovenantSQL/CovenantSQL/utils/log.SimpleLog=Y" - ln_s buildpath, "src/github.com/CovenantSQL/CovenantSQL" - system "go", "build", "-tags", "sqlite_omit_load_extension", - "-ldflags", ldflags, "-o", "bin/cql", "github.com/CovenantSQL/CovenantSQL/cmd/cql" - bin.install "bin/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_predicate testconf/"private.key", :exist? - assert_predicate testconf/"config.yaml", :exist? - end -end diff --git a/Formula/cquery.rb b/Formula/cquery.rb deleted file mode 100644 index 9223bdce4857b..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" - license "MIT" - head "https://github.com/cquery-project/cquery.git" - - bottle do - sha256 "8d2680e2397cbaa0a6c6cb2ffa00da5a10d3c2b89f5faeaa493c066417199e87" => :catalina - 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 - - 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 2a2e0b9ddca91..0000000000000 --- a/Formula/cracklib.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Cracklib < Formula - desc "LibCrack password checking library" - homepage "https://github.com/cracklib/cracklib" - url "https://github.com/cracklib/cracklib/releases/download/v2.9.7/cracklib-2.9.7.tar.bz2" - sha256 "fe82098509e4d60377b998662facf058dc405864a8947956718857dbb4bc35e6" - revision 1 - - bottle do - cellar :any - sha256 "6b22a44df4e1602edc9d248bd1ef58a638c1d04cfdfcbc745f331d05ea91d8ac" => :catalina - sha256 "cdf8e3240e77e574df95271024c7b260ef5eafea27dfa6f6188c1a686dd1b9be" => :mojave - sha256 "210b950eee847fdccdb388c14d87eb425182282e581187302daa91dfa166fb78" => :high_sierra - sha256 "3e74c66c810e5faa99833fc89d375945d0059ddc4b13b5f57128de70cff9dfef" => :sierra - end - - depends_on "gettext" - - resource "cracklib-words" do - url "https://github.com/cracklib/cracklib/releases/download/v2.9.7/cracklib-words-2.9.7.bz2" - sha256 "ec25ac4a474588c58d901715512d8902b276542b27b8dd197e9c2ad373739ec4" - 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 23583182fc03e..0000000000000 --- a/Formula/crc32c.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Crc32c < Formula - desc "Implementation of CRC32C with CPU-specific acceleration" - homepage "https://github.com/google/crc32c" - url "https://github.com/google/crc32c/archive/1.1.1.tar.gz" - sha256 "a6533f45b1670b5d59b38a514d82b09c6fb70cc1050467220216335e873074e8" - license "BSD-3-Clause" - head "https://github.com/google/crc32c.git" - - bottle do - cellar :any - sha256 "8ac4299583c3155c0410e246277214110bbbe453df5cc6b67694c67ba722bfbc" => :catalina - sha256 "f5e232ed8a57eea6b226f4596f94281ea4ea5467c626e83a1576e74aee32711e" => :mojave - sha256 "a8f21980c0fee7ffb9911b1eaa1bf7641940b4bb798a7dbd508ae60a6c1a46a8" => :high_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 17f0489791a1b..0000000000000 --- a/Formula/create-dmg.rb +++ /dev/null @@ -1,26 +0,0 @@ -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/v1.0.8.tar.gz" - sha256 "6eb256e6835e650e4a529c9ea0630c409e6d1d5413fc9076b94d231674fa4cae" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "42ba5df600cee3cc0c2ea3da594e2c09b710e93345f36941bf11cbece30464be" => :catalina - sha256 "42ba5df600cee3cc0c2ea3da594e2c09b710e93345f36941bf11cbece30464be" => :mojave - sha256 "42ba5df600cee3cc0c2ea3da594e2c09b710e93345f36941bf11cbece30464be" => :high_sierra - end - - 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/credstash.rb b/Formula/credstash.rb deleted file mode 100644 index afabb55156c64..0000000000000 --- a/Formula/credstash.rb +++ /dev/null @@ -1,93 +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://github.com/fugue/credstash/releases/download/v1.17.1/credstash-1.17.1.tar.gz" - sha256 "6c04e8734ef556ab459018da142dd0b244093ef176b3be5583e582e9a797a120" - license "Apache-2.0" - head "https://github.com/fugue/credstash.git" - - bottle do - cellar :any - sha256 "1a3850180efec6b674ec067a0368fb02e4d6e4c24c3b47102be54d4c23e7c1c7" => :catalina - sha256 "be020fc56818a3f17b978b50d666107cfbd67e1f91140fdc1bf800e4a25be785" => :mojave - sha256 "a36fac918c07dd8551a33c276b172bedab2df1953d0bb6d4c696710cdbccae74" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "boto3" do - url "https://files.pythonhosted.org/packages/2e/ed/c78be6e55442756a53c3dafe086e3c72534bfe7904e683ecca3678521f9b/boto3-1.12.39.tar.gz" - sha256 "970bd7b332e73d7b51077ed36772c634811b38c81b0cc6ed0f910e50d7ebadf8" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/87/9e/8c548fc924e2ebee4d2723705c557234550af6872bc6d9e505d05b0eeee9/botocore-1.15.39.tar.gz" - sha256 "94232b44e1540b7e043e220bd43f855400d0a243e926b26b3fb72994e971d518" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/9d/0a/d7060601834b1a0a84845d6ae2cd59be077aafa2133455062e47c9733024/cryptography-2.9.tar.gz" - sha256 "0cacd3ef5c604b8e5f59bf2582c076c98a37fe206b31430d0cd08138aff0986e" - end - - # docutils<0.16,>=0.10 - resource "docutils" do - url "https://files.pythonhosted.org/packages/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/5c/40/3bed01fc17e2bb1b02633efc29878dfa25da479ad19a69cfb11d2b88ea8e/jmespath-0.9.5.tar.gz" - sha256 "cca55c8d153173e21baa59983015ad0daf603f9cb799904ff057bfb8ff8dc2d9" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/50/de/2b688c062107942486c81a739383b1432a72717d9a85a6a1a692f003c70c/s3transfer-0.3.3.tar.gz" - sha256 "921a37e2aefc64145e7b73d50c71bb4f26f46e4c9f414dc648c6245ff92cf7db" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - 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 be1c6a4e5f5c1..0000000000000 --- a/Formula/creduce.rb +++ /dev/null @@ -1,97 +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.10.0.tar.gz" - sha256 "db1c0f123967f24d620b040cebd53001bf3dcf03e400f78556a2ff2e11fea063" - revision 1 - head "https://github.com/csmith-project/creduce.git" - - bottle do - cellar :any - sha256 "d460655f84c09cc178e1d678bf0efc517dd10d1a0d8ad3d1c4688d94dac35bde" => :catalina - sha256 "4af71fc62c556bb79a9013e23769d307a70df3db07b8f96b51870be05791b238" => :mojave - sha256 "04a55dcc4bb5ff291e902317955fa5bb5de5c9aab603d917851cdbd1288bdb11" => :high_sierra - end - - depends_on "astyle" - depends_on "delta" - depends_on "llvm@9" - - 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 "Term::ReadKey" do - url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.38.tar.gz" - sha256 "5a645878dc570ac33661581fbb090ff24ebce17d43ea53fd22e105a856a47290" - end - - # 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 - - 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@9"].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 df6cfd11eef94..0000000000000 --- a/Formula/crf++.rb +++ /dev/null @@ -1,27 +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 "19e8421df8bbc57a584452e3d5b895f97a05641b48c7772b0c9810fd2690205c" => :catalina - 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 ca59ef7d2096a..0000000000000 --- a/Formula/crm114.rb +++ /dev/null @@ -1,26 +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 "f6ebd35ffbae26d9cf77de3f165c13ec170b8123d527369f43e9a862f14eb287" => :catalina - 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 9ccbb59e3aed6..0000000000000 --- a/Formula/cromwell.rb +++ /dev/null @@ -1,71 +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/51//cromwell-51.jar" - sha256 "c7c1440fe410d393073cc9da22121bff1f04ee9c5a3b28f03b52384d7ff058e8" - - head do - url "https://github.com/broadinstitute/cromwell.git" - depends_on "sbt" => :build - end - - bottle :unneeded - - depends_on "openjdk" - - resource "womtool" do - url "https://github.com/broadinstitute/cromwell/releases/download/51//womtool-51.jar" - sha256 "e05051d5a6cdc5898d2a4b52352c4782fbbee5f003556fbe1b3f5db8809c967d" - end - - def install - 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/"cromwell").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" $JAVA_OPTS -jar "#{libexec}/cromwell.jar" "$@" - EOS - (bin/"womtool").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/womtool.jar" "$@" - EOS - 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 076be3e33ebd4..0000000000000 --- a/Formula/cronolog.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b1a14dc1d1d5b30969523a75ef785e81a46f1961851adae8cc63c828b89b03a9" => :catalina - 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 bfb0637c01e18..0000000000000 --- a/Formula/crosstool-ng.rb +++ /dev/null @@ -1,62 +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.24.0.tar.xz" - sha256 "804ced838ea7fe3fac1e82f0061269de940c82b05d0de672e7d424af98f22d2d" - revision 1 - head "https://github.com/crosstool-ng/crosstool-ng.git" - - bottle do - cellar :any - sha256 "733a1e37563ffd06a187fdad312bb03e1eca1467832771b57141b4542b81464a" => :catalina - sha256 "f95cc7d4b3bfcc8584d89c5dfa11d39e246c36ca2d707b108d5330fe24ac41c7" => :mojave - sha256 "c7f30be654aece34ce9e7cf5fc08f745cad233ff11ad1fd81826d9344a22345b" => :high_sierra - sha256 "b4d034ebac32df3affdd139f4c49804b74216bf372a9831c01693220d442a39a" => :sierra - end - - depends_on "help2man" => :build - depends_on "autoconf" - depends_on "automake" - depends_on "bash" - depends_on "binutils" - depends_on "bison" - depends_on "coreutils" - depends_on "flex" - depends_on "gawk" - depends_on "gettext" - depends_on "gnu-sed" - depends_on "grep" - depends_on "libtool" - depends_on "lzip" - depends_on "m4" - depends_on "make" - depends_on "ncurses" - depends_on "xz" - - uses_from_macos "flex" => :build - uses_from_macos "texinfo" => :build - uses_from_macos "unzip" => :build - - on_linux do - depends_on "gperf" => :build - end - - def install - system "./bootstrap" if build.head? - - ENV["BISON"] = "#{Formula["bison"].opt_bin}/bison" - ENV["M4"] = "#{Formula["m4"].opt_bin}/m4" - ENV["MAKE"] = "#{Formula["make"].opt_bin}/gmake" - ENV.append "LDFLAGS", "-lintl" - - 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 789e84ea1dede..0000000000000 --- a/Formula/crowdin.rb +++ /dev/null @@ -1,42 +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://github.com/crowdin/crowdin-cli/releases/download/3.2.0/crowdin-cli.zip" - sha256 "560ed771fc97b903e8480b52867b11d326046491a05ef48109f93ce0222b3581" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "crowdin-cli.jar" - (bin/"crowdin").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/crowdin-cli.jar" "$@" - EOS - end - - test do - (testpath/"crowdin.yml").write <<~EOS - "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%" - } - ] - EOS - - assert "Your configuration file looks good", - shell_output("#{bin}/crowdin lint") - - assert "Failed to authorize in Crowdin", - shell_output("#{bin}/crowdin upload sources --config #{testpath}/crowdin.yml", 1) - end -end diff --git a/Formula/crunch.rb b/Formula/crunch.rb deleted file mode 100644 index 8b154968961f8..0000000000000 --- a/Formula/crunch.rb +++ /dev/null @@ -1,31 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "67570938790b20aaabcb31c8ac86d4356702b87ce2ae8ea01d19553f531397a6" => :catalina - 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 547387a4b4257..0000000000000 --- a/Formula/crush-tools.rb +++ /dev/null @@ -1,42 +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" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "c5172b5ab0e1d85d0e1e87e0dc83b66b5ee8ffda0d86f85f586e4e8850268861" => :catalina - sha256 "148684da73eef05ce20f602fdc2d0a9795afbdb6db9cd324c74860c6600ff835" => :mojave - sha256 "729196f80c05c5e395c145752a7a54cc1488a6cf1767b43ed9f639c2f3f3c463" => :high_sierra - sha256 "28286e04a7baf7790f446f2f474a74387e6c0282df70d89ade39c84187394ce4" => :sierra - sha256 "0c7c58b9f2ec87237934eda55932b200c6d7b7f6dbb07a35e0a49ed389e984d3" => :el_capitan - sha256 "90c901bd6daf8178407232c6b3be7f3c5056e9cf2ab88750d09b151e0973d4ff" => :yosemite - sha256 "f1319787a7aafc6610f0217299791c428e5784d11cc93c8cd623e8a5cba5c414" => :mavericks - 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 7fcf7cbe8d5a7..0000000000000 --- a/Formula/cryfs.rb +++ /dev/null @@ -1,62 +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.10.2/cryfs-0.10.2.tar.xz" - sha256 "5531351b67ea23f849b71a1bc44474015c5718d1acce039cf101d321b27f03d5" - license "LGPL-3.0" - - bottle do - cellar :any - rebuild 1 - sha256 "3a5986dc3775877188cbf4442bd72c6f20ffe1d384fefebac8041c0d8f9ff09b" => :catalina - sha256 "cc94e5ba2d13205b0199e59779cecd7dd094965ee22c4ebf92d53ecaa65f8be7" => :mojave - sha256 "daa6d8961ef98fc509e806614c4daf6f589ee7d76bbb483066962b6bd700a2fe" => :high_sierra - sha256 "252aa90f3281ccff1b9d0c6292856df1a08be17ada7aacd320f05d2d2508565f" => :sierra - end - - head do - url "https://github.com/cryfs/cryfs.git", :branch => "develop", :shallow => false - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "libomp" - depends_on "openssl@1.1" - depends_on :osxfuse - - 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" - - # Test showing help page - assert_match "CryFS", shell_output("#{bin}/cryfs 2>&1", 10) - - # 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" - assert_match "Operation not permitted", pipe_output("#{bin}/cryfs -f basedir mountdir 2>&1", "password") - end -end diff --git a/Formula/cryptol.rb b/Formula/cryptol.rb deleted file mode 100644 index e3f2f2445cf1a..0000000000000 --- a/Formula/cryptol.rb +++ /dev/null @@ -1,37 +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.8.0/cryptol-2.8.0.tar.gz" - sha256 "b061bf88de09de5034a3707960af01fbcc0425cdbff1085c50c00748df9910bb" - head "https://github.com/GaloisInc/cryptol.git" - - bottle do - cellar :any_skip_relocation - sha256 "0aca3e2c29be5d4533e6114f0e7fd774173358f92d0f4e73903d0d536fb54160" => :mojave - sha256 "04d3178e67b8836a720d82dc3b88d1c69366aae6f0e7abdb9a1155b7dc31c28c" => :high_sierra - sha256 "3c3ffec1e47196b6c1767086fb9cc62e792546476cad5c6b92896eb45db13744" => :sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.6" => :build # 8.8 will be supported in the next release - depends_on "z3" - - uses_from_macos "ncurses" - - 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/cryptominisat.rb b/Formula/cryptominisat.rb deleted file mode 100644 index 5aa6eb94d6f59..0000000000000 --- a/Formula/cryptominisat.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Cryptominisat < Formula - desc "Advanced SAT solver" - homepage "https://www.msoos.org/cryptominisat5/" - url "https://github.com/msoos/cryptominisat/archive/5.6.8.tar.gz" - sha256 "38add382c2257b702bdd4f1edf73544f29efc6e050516b6cacd2d81e35744b55" - revision 1 - - bottle do - sha256 "6de78ffbfa1ae394f9e0ce868ae7a49412014d63fcaccb22dfefc8909564a18b" => :catalina - sha256 "f1120dbb776e906bfc0773dd4088df95cbc845d5ca5d26d375dfba9187c00656" => :mojave - sha256 "5aae642269d3a275db8f77e2ec202884d612ee7f00b406cc892f74c175372486" => :high_sierra - end - - depends_on "cmake" => :build - depends_on :arch => :x86_64 - depends_on "boost" - depends_on "python@3.8" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DNOM4RI=ON" - system "make", "install" - 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}/cryptominisat5 simple.cnf", 20) - assert_match /s UNSATISFIABLE/, result - - (testpath/"test.py").write <<~EOS - import pycryptosat - solver = pycryptosat.Solver() - solver.add_clause([1]) - solver.add_clause([-2]) - solver.add_clause([-1, 2, 3]) - print(solver.solve()[1]) - EOS - assert_equal "(None, True, False, True)\n", shell_output("#{Formula["python@3.8"].opt_bin}/python3 test.py") - end -end diff --git a/Formula/cryptopp.rb b/Formula/cryptopp.rb deleted file mode 100644 index 1380d829af4f2..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_1_0.tar.gz" - sha256 "8a4e4773a39b0c07d7cea1b8be7a3f7a9d126bd3ac9a9f072f82d3a53a474a87" - - # 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 c7ac432574abd..0000000000000 --- a/Formula/crystal-icr.rb +++ /dev/null @@ -1,26 +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.8.0.tar.gz" - sha256 "8c7825dd035bbb4bc6499873d4bd125185a01cae10dc8dd6f98e6e013def381c" - license "MIT" - - bottle do - sha256 "22389822712ed2a634ba8d32817a29e0930eb53669d4c931f740b5c895de9ed4" => :catalina - sha256 "5c73c5c37ed0cd5ceb6fc72f88afe4a9156417a0e4752e93500d0aec755646c0" => :mojave - sha256 "1ea960e6dd1eeffc8c7e9471a2e17e9dc912eccdc7558d18346a856c10e078bb" => :high_sierra - end - - depends_on "crystal" - depends_on "libevent" - depends_on "libyaml" - depends_on "openssl@1.1" - - 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 ffb6afee91c94..0000000000000 --- a/Formula/crystal.rb +++ /dev/null @@ -1,134 +0,0 @@ -class Crystal < Formula - desc "Fast and statically typed, compiled language with Ruby-like syntax" - homepage "https://crystal-lang.org/" - license "Apache-2.0" - revision 1 - - stable do - url "https://github.com/crystal-lang/crystal/archive/0.35.1.tar.gz" - sha256 "d324c79002b8a871997049e89cac3989fa48083e11bf9b8ec7fe2d1e94b35199" - - resource "shards" do - url "https://github.com/crystal-lang/shards/archive/v0.11.1.tar.gz" - sha256 "e78095867334b4058f860c6da8dc3892994769ef51795de74ffb708a66c6847d" - end - end - - bottle do - cellar :any - rebuild 1 - sha256 "1c5c42f3c9368d1f19111a04520cacaea05a4fa27c9f3f228566b9aa5d858d26" => :catalina - sha256 "a1b2259a727561bc6bc78002e12177a48386773709c23d89a9d5b8b2cca6652c" => :mojave - sha256 "4bc797cfed7e3d3bc2a04c232b086cf409c78da84be82d13f95df9d4d1406d06" => :high_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 "autoconf" => :build # for building bdw-gc - depends_on "automake" => :build # for building bdw-gc - depends_on "libatomic_ops" => :build # for building bdw-gc - depends_on "libtool" => :build # for building 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@1.1" # std uses it but it's not linked - depends_on "pcre" - depends_on "pkg-config" # @[Link] will use pkg-config if available - - # Crystal uses an extended version of bdw-gc to handle multi-threading - resource "bdw-gc" do - url "https://github.com/ivmai/bdwgc/releases/download/v8.0.4/gc-8.0.4.tar.gz" - sha256 "436a0ddc67b1ac0b0405b61a9675bca9e075c8156f4debd1d06f3a56c7cd289d" - - # extension to handle multi-threading - patch :p1 do - url "https://github.com/ivmai/bdwgc/commit/5668de71107022a316ee967162bc16c10754b9ce.patch?full_index=1" - sha256 "5c42d4b37cf4997bb6af3f9b00f5513644e1287c322607dc980a1955a09246e3" - end - end - - resource "boot" do - url "https://github.com/crystal-lang/crystal/releases/download/0.34.0/crystal-0.34.0-1-darwin-x86_64.tar.gz" - version "0.34.0-1" - sha256 "979b3006b03e5c598deb0c5a519b7fc9c5a805c930416b77b492a28af0a3a972" - end - - def install - (buildpath/"boot").install resource("boot") - ENV.append_path "PATH", "boot/bin" - - resource("bdw-gc").stage(buildpath/"gc") - cd(buildpath/"gc") do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-shared", - "--enable-large-config" - system "make" - end - - # Build crystal - crystal_build_opts = [] - crystal_build_opts << "release=true" - crystal_build_opts << "FLAGS=--no-debug" - crystal_build_opts << "CRYSTAL_CONFIG_LIBRARY_PATH=" - if build.head? - crystal_build_opts << "CRYSTAL_CONFIG_BUILD_COMMIT=#{Utils.safe_popen_read("git", "rev-parse", - "--short", "HEAD").strip}" - end - (buildpath/".build").mkpath - system "make", "deps" - system "make", "crystal", *crystal_build_opts - - # Build shards (with recently built crystal) - # - # Setup the same path the wrapper script would, but just for building shards. - # NOTE: it seems that the installed crystal in bin/"crystal" can be used while - # building the formula. Otherwise this ad-hoc setup could be avoided. - embedded_crystal_path=`"#{buildpath/".build/crystal"}" env CRYSTAL_PATH`.strip - ENV["CRYSTAL_PATH"] = "#{embedded_crystal_path}:#{buildpath/"src"}" - ENV["CRYSTAL_LIBRARY_PATH"] = buildpath/"gc/.libs" - - # Install shards - resource("shards").stage do - ENV["CRYSTAL_OPTS"] = "--release --no-debug" - system "make", "bin/shards", "CRYSTAL=#{buildpath/"bin/crystal"}", - "SHARDS=#{buildpath/"boot/embedded/bin/shards"}" - - # Install shards - bin.install "bin/shards" - man1.install "man/shards.1" - man5.install "man/shard.yml.5" - end - - # Install crystal - libexec.install ".build/crystal" - (bin/"crystal").write <<~SH - #!/bin/bash - EMBEDDED_CRYSTAL_PATH=$("#{libexec/"crystal"}" env CRYSTAL_PATH) - export CRYSTAL_PATH="${CRYSTAL_PATH:-"$EMBEDDED_CRYSTAL_PATH:#{prefix/"src"}"}" - export CRYSTAL_LIBRARY_PATH="${CRYSTAL_LIBRARY_PATH:+$CRYSTAL_LIBRARY_PATH:}#{prefix/"embedded/lib"}:/usr/local/lib" - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}#{Formula["openssl"].opt_lib/"pkgconfig"}" - exec "#{libexec/"crystal"}" "${@}" - SH - - prefix.install "src" - (prefix/"embedded/lib").install "#{buildpath/"gc"}/.libs/libgc.a" - - bash_completion.install "etc/completion.bash" => "crystal" - zsh_completion.install "etc/completion.zsh" => "_crystal" - - man1.install "man/crystal.1" - 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 dee826d2c3393..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/v15.9/cscope-15.9.tar.gz" - sha256 "c5505ae075a871a9cd8d9801859b0ff1c09782075df281c72c23e72115d9f159" - - bottle do - cellar :any_skip_relocation - sha256 "212b5f945f2a2eae2d07893bb08c490098f4f3e58ec8865499bec550882de29e" => :catalina - sha256 "0a8c76e372e2c965e654b5024cbf872931e6204b7e2ba79623d5d7d002cd3c2f" => :mojave - sha256 "ae7b5f716debeb937c3472add41f69c7176e9c4a9a0668090afd63313eabbe86" => :high_sierra - sha256 "7eef899511b0d7eb0d6a35acf677d9b19f89528aae0272d5c414bbafbe5daaaf" => :sierra - end - - uses_from_macos "ncurses" - - 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 9625d2d598271..0000000000000 --- a/Formula/csfml.rb +++ /dev/null @@ -1,38 +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.5.tar.gz" - sha256 "d49ddfbe9c14dbca60dd524d10bca7922142dc32a07a5dfbbd209cda7caad860" - head "https://github.com/SFML/CSFML.git" - - bottle do - cellar :any - sha256 "31fd66bf0d673c538efda5d66495bee9c4dddbf0c037d8066484c062dd3aaa3d" => :catalina - sha256 "23ba78c253971cd63e84eb54763fac657beafa93f445ee851ba90c8e80146bbb" => :mojave - sha256 "4c5a98b1bd072adaacae84e7ab0f3c7f33b74c72378f303e3f35fae6dabd4df4" => :high_sierra - sha256 "acfb319f9d70db51adf39a6931dfc938871ce9f9ad6dcb43d8395c7d735a2674" => :sierra - 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 57e0e8da6bd03..0000000000000 --- a/Formula/csmith.rb +++ /dev/null @@ -1,37 +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 "fdce1186c77ea774ed5575cd59bc194ab35725d3117c9a57bd54ce351a620965" => :catalina - 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/csound.rb b/Formula/csound.rb deleted file mode 100644 index 7f445bad3cb1d..0000000000000 --- a/Formula/csound.rb +++ /dev/null @@ -1,165 +0,0 @@ -class Csound < Formula - desc "Sound and music computing system" - homepage "https://csound.com/" - url "https://github.com/csound/csound.git", - :tag => "6.14.0", - :revision => "1073b4d1bc2304a1e06defd266781a9c441a5be0" - license "LGPL-2.1" - revision 5 - head "https://github.com/csound/csound.git", :branch => "develop" - - bottle do - sha256 "e6927a4fd4a1acc821bb5820318d2a0bca389d504271115a46b16f36c1cee642" => :catalina - sha256 "eaf9b0c29d23473d6f6f1c854e0c7ab95accbdd177d0377dc67294bd41ec6dde" => :mojave - sha256 "785dacc76af2fbedfb3e8f6cb83850735b2efdb505e7464972af3ae0312e4a5d" => :high_sierra - 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 "liblo" - depends_on "libpng" - depends_on "libsamplerate" - depends_on "libsndfile" - depends_on :macos # Due to Python 2 - depends_on "numpy" - depends_on "openjdk" - depends_on "portaudio" - depends_on "portmidi" - depends_on "stk" - depends_on "wiiuse" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - uses_from_macos "curl" - uses_from_macos "zlib" - - conflicts_with "libextractor", :because => "both install `extract` binaries" - conflicts_with "pkcrack", :because => "both install `extract` binaries" - - resource "ableton-link" do - url "https://github.com/Ableton/link/archive/Link-3.0.2.tar.gz" - sha256 "2716e916a9dd9445b2a4de1f2325da818b7f097ec7004d453c83b10205167100" - end - - resource "getfem" do - url "https://download.savannah.gnu.org/releases/getfem/stable/getfem-5.4.1.tar.gz" - sha256 "6b58cc960634d0ecf17679ba12f8e8cfe4e36b25a5fa821925d55c42ff38a64e" - end - - def install - ENV["JAVA_HOME"] = Formula["openjdk"].libexec/"openjdk.jdk/Contents/Home" - ENV.prepend "CFLAGS", "-DH5_USE_110_API -DH5Oget_info_vers=1" - - resource("ableton-link").stage { cp_r "include/ableton", buildpath } - resource("getfem").stage { cp_r "src/gmm", buildpath } - - args = std_cmake_args + %W[ - -DABLETON_LINK_HOME=#{buildpath}/ableton - -DBUILD_ABLETON_LINK_OPCODES=ON - -DBUILD_JAVA_INTERFACE=ON - -DBUILD_LINEAR_ALGEBRA_OPCODES=ON - -DBUILD_LUA_INTERFACE=OFF - -DBUILD_PYTHON_INTERFACE=OFF - -DBUILD_WEBSOCKET_OPCODE=OFF - -DCMAKE_INSTALL_RPATH=#{frameworks} - -DCS_FRAMEWORK_DEST=#{frameworks} - -DGMM_INCLUDE_DIR=#{buildpath}/gmm - -DJAVA_MODULE_INSTALL_DIR=#{libexec} - ] - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - - include.install_symlink frameworks/"CsoundLib64.framework/Headers" => "csound" - - libexec.install buildpath/"interfaces/ctcsound.py" - - python_version = Language::Python.major_minor_version Formula["python@3.8"].bin/"python3" - (lib/"python#{python_version}/site-packages/homebrew-csound.pth").write <<~EOS - import site; site.addsitedir('#{libexec}') - EOS - end - - def caveats - <<~EOS - To use the Python bindings, you may need to add to #{shell_profile}: - export DYLD_FRAMEWORK_PATH="$DYLD_FRAMEWORK_PATH:#{opt_frameworks}" - - To use the Java bindings, you may need to add to #{shell_profile}: - export CLASSPATH="#{opt_libexec}/csnd6.jar:." - and link the native shared library into your Java Extensions folder: - mkdir -p ~/Library/Java/Extensions - ln -s "#{opt_libexec}/lib_jcsound6.jnilib" ~/Library/Java/Extensions - EOS - end - - test do - (testpath/"test.orc").write <<~EOS - 0dbfs = 1 - gi_peer link_create - gi_programHandle faustcompile "process = _;", "--vectorize --loop-variant 1" - FLrun - gi_fluidEngineNumber fluidEngine - gi_image imagecreate 1, 1 - gi_realVector la_i_vr_create 1 - pyinit - pyruni "print('hello, world')" - instr 1 - a_, a_, a_ chuap 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - a_signal STKPlucked 440, 1 - hdf5write "test.h5", a_signal - out a_signal - endin - EOS - - (testpath/"test.sco").write <<~EOS - i 1 0 1 - e - EOS - - ENV["OPCODE6DIR64"] = frameworks/"CsoundLib64.framework/Resources/Opcodes64" - ENV["RAWWAVE_PATH"] = Formula["stk"].pkgshare/"rawwaves" - - output = shell_output "#{bin}/csound test.orc test.sco 2>&1" - assert_match /^hello, world$/, output - assert_match /^rtaudio:/, output - assert_match /^rtmidi:/, output - - assert_predicate testpath/"test.aif", :exist? - assert_predicate testpath/"test.h5", :exist? - - (testpath/"opcode-existence.orc").write <<~EOS - JackoInfo - instr 1 - i_success wiiconnect 1, 1 - endin - EOS - system bin/"csound", "--orc", "--syntax-check-only", "opcode-existence.orc" - - with_env("DYLD_FRAMEWORK_PATH" => frameworks) do - system Formula["python@3.8"].bin/"python3", "-c", "import ctcsound" - end - - (testpath/"test.java").write <<~EOS - import csnd6.*; - public class test { - public static void main(String args[]) { - csnd6.csoundInitialize(csnd6.CSOUNDINIT_NO_ATEXIT | csnd6.CSOUNDINIT_NO_SIGNAL_HANDLER); - } - } - EOS - 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/cspice.rb b/Formula/cspice.rb deleted file mode 100644 index 90a5f21de2bab..0000000000000 --- a/Formula/cspice.rb +++ /dev/null @@ -1,38 +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 "a8674cfcd5ef55ec8061890728960dd910aa23533c2c4868e93915c77b6e5c8c" => :catalina - 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 160497a5c4913..0000000000000 --- a/Formula/css-crush.rb +++ /dev/null @@ -1,27 +0,0 @@ -class CssCrush < Formula - desc "Extensible PHP based CSS preprocessor" - homepage "https://the-echoplex.net/csscrush" - url "https://github.com/peteboere/css-crush/archive/v3.0.1.tar.gz" - sha256 "6f24a857b496edccc2eaf261a6f34d64ae1dc2c288304df8dd4fcddb905d89d8" - license "MIT" - 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/cstore_fdw.rb b/Formula/cstore_fdw.rb deleted file mode 100644 index c56494246f2d8..0000000000000 --- a/Formula/cstore_fdw.rb +++ /dev/null @@ -1,66 +0,0 @@ -class CstoreFdw < Formula - desc "Columnar store for analytics with Postgres" - homepage "https://github.com/citusdata/cstore_fdw" - url "https://github.com/citusdata/cstore_fdw/archive/v1.7.0.tar.gz" - sha256 "bd8a06654b483d27b48d8196cf6baac0c7828b431b49ac097923ac0c54a1c38c" - license "Apache-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "bf5bff9fcedd614bb641d3ac2bfe1c0c5d226cffd4bdccdc4ea011cfe307000b" => :catalina - sha256 "d2758c2643cebe884e575a44e8f36defb68519326898dccc5dd13e2046235ea5" => :mojave - sha256 "c7eb62b441f09798e91098a082b8835184c98292822cf5606a3bc83d0627559e" => :high_sierra - end - - depends_on "postgresql" - depends_on "protobuf-c" - - def install - # 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" - - lib.install Dir["stage/**/lib/*"] - (share/"postgresql/extension").install Dir["stage/**/share/postgresql/extension/*"] - end - - test do - return if ENV["CI"] - - 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=cstore_fdw", - "-p", pg_port) - end - - begin - sleep 2 - - cmds = ["CREATE EXTENSION cstore_fdw;", - "CREATE SERVER cstore_server FOREIGN data WRAPPER cstore_fdw;", - "CREATE FOREIGN TABLE T(x int) SERVER cstore_server OPTIONS(compression 'pglz');", - "INSERT INTO T(x) SELECT 42;"] - - system "#{pg_bin}/createdb", "-p", pg_port, "test" - system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", cmds[0] - system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", cmds[1] - system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", cmds[2] - system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", cmds[3] - - assert_equal "42", shell_output("#{pg_bin}/psql -p #{pg_port} -d test -AXtc" \ - "'SELECT x from T;'").strip - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/csv-fix.rb b/Formula/csv-fix.rb deleted file mode 100644 index 8c461e2166db6..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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "3cc10313342650c680f23241e19ff8ec6b64df8fcc2123c5161b15e992c8973b" => :catalina - sha256 "93a9586c3ef8614be909c0e5ac5bb463536dab6fcbfc00bb1e94fc6affbe7248" => :mojave - sha256 "e02b2cb8929617c91a258c313481097146259a9ed68094bd759c30c3cc75806e" => :high_sierra - sha256 "b52224f7cd1dd228ffe751c67993f854a8a59f17d6099d40fca02374f1949d02" => :sierra - sha256 "ba19053a978b57b6b962f8fa24d099d964ceb90cd28304e3a6c2a7fe0d3abc32" => :el_capitan - sha256 "b8dbaf2e14e35cc4c1d7b5d04a5615377f7eeb4d9b1f25fe554b8711511c28f6" => :yosemite - sha256 "0b86933c8e32830d5abd0f26ef83b1a60e0254da67542b695fd50ab1e3ba2e68" => :mavericks - end - - 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 4632fe0e867e6..0000000000000 --- a/Formula/csvkit.rb +++ /dev/null @@ -1,131 +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/95/c9/8dd118c0ea0114125a8bf50d552626b95f6478bcf29a252296e93d778855/csvkit-1.0.5.tar.gz" - sha256 "7bd390f4d300e45dc9ed67a32af762a916bae7d9a85087a10fd4f64ce65fd5b9" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "1bb059e0420e7f4e117ad9bb0ad9ec2e281547c87ce3dec197dbcbcc2fbb3223" => :catalina - sha256 "39eb13816f8ea1ff6e91d759450a1cb56edc558cdc997776eb60a1fbfeaf4881" => :mojave - sha256 "2d7e167505bd1635d0fa97f525683c5a938cb6ebf7351299260822a4560cf513" => :high_sierra - end - - depends_on "python@3.8" - - 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/cb/05/8bd93fd8f47354e5a31b1ba5876a9498a59fa32166b2e3315da43774adb8/agate-dbf-0.2.1.tar.gz" - sha256 "00c93c498ec9a04cc587bf63dd7340e67e2541f0df4c9a7259d7cb3dd4ce372f" - end - - resource "agate-excel" do - url "https://files.pythonhosted.org/packages/a9/cd/ba7ce638900a91f00e6ebaa72c46fc90bfc13cb595071cee82c96057d5d6/agate-excel-0.2.3.tar.gz" - sha256 "8f255ef2c87c436b7132049e1dd86c8e08bf82d8c773aea86f3069b461a17d52" - end - - resource "agate-sql" do - url "https://files.pythonhosted.org/packages/4a/fb/796c6e7b625fde74274786da69f08aca5c5eefb891db77344f95ad7b75db/agate-sql-0.5.4.tar.gz" - sha256 "9277490ba8b8e7c747a9ae3671f52fe486784b48d4a14e78ca197fb0e36f281b" - end - - resource "Babel" do - url "https://files.pythonhosted.org/packages/34/18/8706cfa5b2c73f5a549fdc0ef2e24db71812a2685959cff31cbdfc010136/Babel-2.8.0.tar.gz" - sha256 "1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38" - 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/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz" - sha256 "b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" - 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/7b/b0/fa20fce23e9c3b55b640e629cb5edf32a85e6af3cf7af599940eb0c753fe/jdcal-1.4.1.tar.gz" - sha256 "472872e096eb8df219c23f2689fc336668bdb43d194094b5cc1707e1640acfc8" - 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/95/8c/83563c60489954e5b80f9e2596b93a68e1ac4e4a730deb1aae632066d704/openpyxl-3.0.3.tar.gz" - sha256 "547a9fc6aafcf44abe358b89ed4438d077e9d92e4f182c87e2dc294186dc4b64" - end - - resource "parsedatetime" do - url "https://files.pythonhosted.org/packages/5f/19/43357ced106dd1ab6bceb1decb866e8619172fc271991a54eb2f680a2e9b/parsedatetime-2.5.tar.gz" - sha256 "d2e9ddb1e463de871d32088a3f3cea3dc8282b1b2800e081bd0ef86900451667" - end - - resource "python-slugify" do - url "https://files.pythonhosted.org/packages/92/5f/7b84a0bba8a0fdd50c046f8b57dcf179dc16237ad33446079b7c484de04c/python-slugify-4.0.0.tar.gz" - sha256 "a8fc3433821140e8f409a9831d13ae5deccd0b033d4744d94b31fea141bdd84c" - 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/82/c3/534ddba230bd4fbbd3b7a3d35f3341d014cca213f369a9940925e7e5f691/pytz-2019.3.tar.gz" - sha256 "b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "SQLAlchemy" do - url "https://files.pythonhosted.org/packages/af/47/35edeb0f86c0b44934c05d961c893e223ef27e79e1f53b5e6f14820ff553/SQLAlchemy-1.3.13.tar.gz" - sha256 "64a7b71846db6423807e96820993fa12a03b89127d278290ca25c0b11ed7b4fb" - end - - resource "text-unidecode" do - url "https://files.pythonhosted.org/packages/ab/e2/e9a00f0ccb71718418230718b3d900e71a5d16e701a3dae079a21e9cd8f8/text-unidecode-1.3.tar.gz" - sha256 "bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93" - end - - resource "Unidecode" do - url "https://files.pythonhosted.org/packages/b1/d6/7e2a98e98c43cf11406de6097e2656d31559f788e9210326ce6544bd7d40/Unidecode-1.1.1.tar.gz" - sha256 "2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8" - end - - resource "xlrd" do - url "https://files.pythonhosted.org/packages/aa/05/ec9d4fcbbb74bbf4da9f622b3b61aec541e4eccf31d3c60c5422ec027ce2/xlrd-1.2.0.tar.gz" - sha256 "546eb36cee8db40c3eaa46c351e67ffee6eeb5fa2650b71bc4c758a29a1b29b2" - 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 4ce2788f71b3d..0000000000000 --- a/Formula/csvprintf.rb +++ /dev/null @@ -1,32 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "528d28c7c771522232c9a46b696cab18458ae21252859037c4f1b92801496eb4" => :catalina - 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/csvq.rb b/Formula/csvq.rb deleted file mode 100644 index 7d787094a0f86..0000000000000 --- a/Formula/csvq.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Csvq < Formula - desc "SQL-like query language for csv" - homepage "https://mithrandie.github.io/csvq" - url "https://github.com/mithrandie/csvq/archive/v1.13.3.tar.gz" - sha256 "3242f1dd4b1d36794642356610a8709dbcb257e9bf5fdb287222694c93853242" - - bottle do - cellar :any_skip_relocation - sha256 "f12b5af1956393fe1c7eb3c8a66af0395a57ca1fabce3fa46ec9abbc42d4c98f" => :catalina - sha256 "515f33d52a7f0aadd4fe25263cd1f9b48d93a2cfcd56642437b478e12d806568" => :mojave - sha256 "098d117004b545984482edb34ecc8961dd7d230afa950306669197d668d23182" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args - end - - test do - system "#{bin}/csvq", "--version" - - (testpath/"test.csv").write <<~EOS - a,b,c - 1,2,3 - EOS - expected = <<~EOS - a,b - 1,2 - EOS - result = shell_output("#{bin}/csvq --format csv 'SELECT a, b FROM `test.csv`'") - assert_equal expected, result - end -end diff --git a/Formula/csvtomd.rb b/Formula/csvtomd.rb deleted file mode 100644 index af7c98a32582a..0000000000000 --- a/Formula/csvtomd.rb +++ /dev/null @@ -1,35 +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/9d/59/ea3c8b102f9c72e5d276a169f7f343432213441c39a6eac7a8f444c66681/csvtomd-0.3.0.tar.gz" - sha256 "a1fbf1db86d4b7b62a75dc259807719b2301ed01db5d1d7d9bb49c4a8858778b" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "a095eb1747bdc18b737a5a1a090486cd0b694f33283163007f19b3b9e0abfade" => :catalina - sha256 "87c756127704a0211c2dcb8d7e0b7b11dfbaf0a2878dfec9a4881e034f114fd0" => :mojave - sha256 "c7ec7a2ff12f6d5707bb51b14bd078c2401840108cf1f6c4a774d04ffedf427b" => :high_sierra - end - - depends_on "python@3.8" - - 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 ddaa70fd05a53..0000000000000 --- a/Formula/ctags.rb +++ /dev/null @@ -1,77 +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 - cellar :any_skip_relocation - rebuild 2 - sha256 "0f9bebdadd76a7ec818b904d6266eae183e869bf6f83302d836b93fc50a03714" => :catalina - sha256 "da05bcfc8536c7e627dbea17e67997b45388706ba9bb84e521682c0358cf18b5" => :mojave - sha256 "169b9d458f2db04d609c86c36e9d9dd4ee2474b7c472a1a11c766454e4bba1a4" => :high_sierra - end - - head do - url "https://svn.code.sf.net/p/ctags/code/trunk" - depends_on "autoconf" => :build - end - - # fixes https://sourceforge.net/p/ctags/bugs/312/ - patch :p2 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/ctags/5.8.patch" - sha256 "9b5b04d2b30d27abe71094b4b9236d60482059e479aefec799f0e5ace0f153cb" - end - - 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. - 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 diff --git a/Formula/ctail.rb b/Formula/ctail.rb deleted file mode 100644 index 1727c882c3e4d..0000000000000 --- a/Formula/ctail.rb +++ /dev/null @@ -1,40 +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" - license "Apache-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "0821eb3a9bf969519149b7cb3038db2dc25836bc335c057e0ff263aa5fc2f7b2" => :catalina - 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 cb981999b059e..0000000000000 --- a/Formula/ctemplate.rb +++ /dev/null @@ -1,43 +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.4.tar.gz" - sha256 "ccc4105b3dc51c82b0f194499979be22d5a14504f741115be155bd991ee93cfa" - license "BSD-3-Clause" - head "https://github.com/olafvdspek/ctemplate.git" - - bottle do - cellar :any - sha256 "de55fe59cb142f6837d75f81c32a1430bd1df1cd3e612f2ccaa60baf4443ac4b" => :catalina - sha256 "614ac53920b9d21fcd936bf83580168ba9bebc15df7e87cf99135ab20bf1744d" => :mojave - sha256 "563a9a2d8c62edbd1496b4e360a625e3b484856d35edd945b364586f65c0e4e8" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "python@3.8" => :build - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - int main(int argc, char** argv) { - ctemplate::TemplateDictionary dict("example"); - dict.SetValue("NAME", "Jane Doe"); - return 0; - } - EOS - - system ENV.cxx, "-std=c++11", "-I#{include}", "-L#{lib}", - "-lctemplate_nothreads", "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/ctl.rb b/Formula/ctl.rb deleted file mode 100644 index 3683dc5780c46..0000000000000 --- a/Formula/ctl.rb +++ /dev/null @@ -1,43 +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 5 - - bottle do - sha256 "e44cbdbb013b350d22ff4cafeeb2a8e93dd164dc36bb6e181fb5cf086a8345c1" => :catalina - sha256 "6c88c03a0826a11e7267bf056e15362d4824cea2291b16af6db172d21f3654ce" => :mojave - sha256 "61b7606c62fb60aa86d887084e1cb0aa194ff5c64cb9726208ee364f870d7b43" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "aces_container" - depends_on "ilmbase" - depends_on "libtiff" - depends_on "openexr" - - patch do - url "https://github.com/ampas/CTL/pull/73.diff?full_index=1" - sha256 "119c2410403d16d1ecfe88bc687c16a0a5645f91824eec8de2d996d1248a06fd" - end - - patch do - url "https://github.com/ampas/CTL/pull/74.diff?full_index=1" - sha256 "0c261caf34f14a097811ceb82fc1d9aa29bc6c4861921361e6eb1b4fe5f8ebae" - end - - def install - ENV.cxx11 - 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 cb731d586dd9c..0000000000000 --- a/Formula/ctop.rb +++ /dev/null @@ -1,27 +0,0 @@ -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.3", - :revision => "4741b276e4bbaa41a67d62443239d50b5a936623" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d91134c9c0f82fa52d66316b3ce2508e6c53878e2bfcbb937a62f33bc0267d0c" => :catalina - sha256 "c70a8b08c6acf81b7c1b8a3183da8d02218be1ab966f5357c1ed537f4830b258" => :mojave - sha256 "fe7d332a2e1068be73ef3ef524745ddf444b77bcc0f67b8368e4fc78f3abb69e" => :high_sierra - 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/cuba.rb b/Formula/cuba.rb deleted file mode 100644 index e36f965f23b43..0000000000000 --- a/Formula/cuba.rb +++ /dev/null @@ -1,29 +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 "da4197a194f7a79465dfb2c06c250caa8e76d731e9d6bdfd2dd6e81c8fc005e0" - license "LGPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "dd3e744e7357b51f502a8241360df6f29ecfe74a8d33dad2503ab64528e99573" => :catalina - 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 a1edb408552af..0000000000000 --- a/Formula/cubeb.rb +++ /dev/null @@ -1,89 +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" - license "ISC" - head "https://github.com/kinetiknz/cubeb.git" - - bottle do - cellar :any - sha256 "98061577ff4699c6d87158764616203f1bc758a858c88683fd7f7f10f90e74b5" => :catalina - 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/cubelib.rb b/Formula/cubelib.rb deleted file mode 100644 index a5b8c3c9629ed..0000000000000 --- a/Formula/cubelib.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Cubelib < Formula - desc "Cube, is a 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.5/dist/cubelib-4.5.tar.gz" - sha256 "98f66837b4a834b1aacbcd4480a242d7a8c4a1b8dd44e02e836b8c7a4f0ffd98" - - bottle do - sha256 "038e4978220fae83b1469f2a22f05c3fa01876c9dd6f9d3f7da13b6bc6335a87" => :catalina - sha256 "ff5079cb8ddf09f12f73649cea99460b3fd112ba1dfc8791ed315d7b103031ba" => :mojave - sha256 "8147b72304638d649a1416edca7616f68580af6c60a4b29e4ac2f8057ed258d5" => :high_sierra - end - - def install - ENV.deparallelize - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--with-nocross-compiler-suite=clang", - "CXXFLAGS=-stdlib=libc++", - "LDFLAGS=-stdlib=libc++", - "--prefix=#{prefix}" - system "make" - system "make", "install" - 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/cucumber-cpp.rb b/Formula/cucumber-cpp.rb deleted file mode 100644 index c0e7d16fbc150..0000000000000 --- a/Formula/cucumber-cpp.rb +++ /dev/null @@ -1,88 +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" - license "MIT" - revision 5 - - bottle do - cellar :any_skip_relocation - sha256 "647928a1ca3316d5d7c46f1022b616f88c21fa9fab3ca147e8944a92377e2d67" => :catalina - sha256 "1913b19a2c3c876ae0ec6cf46bed0ea144cb97ab025b769472d9371c267e3764" => :mojave - sha256 "8d325d95cdd4a3dabcee3f9fe3184585dc5ddbae623033d157847a4ceca2bd45" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "ruby" => :test if MacOS.version <= :sierra - depends_on "boost" - - def install - args = std_cmake_args + %w[ - -DCUKE_DISABLE_GTEST=on - -DCUKE_DISABLE_CPPSPEC=on - -DCUKE_DISABLE_FUNCTIONAL=on - -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 - if MacOS.version >= :mojave && MacOS::CLT.installed? - ENV.delete("CPATH") - ENV["SDKROOT"] = MacOS::CLT.sdk_path(MacOS.version) - elsif MacOS.version == :high_sierra - ENV.delete("CPATH") - ENV.delete("SDKROOT") - end - 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/cucumber-ruby.rb b/Formula/cucumber-ruby.rb deleted file mode 100644 index 0a3c3c0c9470e..0000000000000 --- a/Formula/cucumber-ruby.rb +++ /dev/null @@ -1,31 +0,0 @@ -class CucumberRuby < Formula - desc "Cucumber for Ruby" - homepage "https://cucumber.io/" - url "https://github.com/cucumber/cucumber-ruby/archive/v4.1.0.tar.gz" - sha256 "56c52316fc91b8a9f284adb86e145b9314d5c417e73f0f8e32b91228f3f8c1f6" - license "MIT" - - bottle do - sha256 "2cb28eaaceddd08eb37eb3435c17d84c162cc2ffe92d4df5dd07674a94e65101" => :catalina - sha256 "fb8d3ca0b4824a2e11c8002ba64923a11895e0ac0e01bf77f70fc57a4ac7fc00" => :mojave - sha256 "f99d2fe27c870177a55e1ab115c83b89192d9e2cd230adced2516d2e8f4180c1" => :high_sierra - end - - depends_on "pkg-config" => :build - - uses_from_macos "libffi", :since => :catalina - uses_from_macos "ruby", :since => :catalina - - def install - ENV["GEM_HOME"] = libexec - system "gem", "build", "cucumber.gemspec" - system "gem", "install", "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 "create features", shell_output("#{bin}/cucumber --init") - assert_predicate testpath/"features", :exist? - end -end diff --git a/Formula/cuetools.rb b/Formula/cuetools.rb deleted file mode 100644 index d28bfb05c670a..0000000000000 --- a/Formula/cuetools.rb +++ /dev/null @@ -1,55 +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" - license "GPL-2.0" - head "https://github.com/svend/cuetools.git" - - bottle do - cellar :any_skip_relocation - sha256 "dc2d7bfcb8fd048421265da986fdb381007d64c7d2a45d45a53b896bad78bf18" => :catalina - sha256 "1e36c3c8d2d53947b73a9f0a0aed74145e2b1890f83764de02f1d12566d0300f" => :mojave - sha256 "4393d6db857a9568a34de3a09ff049fbec9a55a95b029eacd24e35d6ce792074" => :high_sierra - sha256 "9456e5957a78f993f5a8cef76aa583ac6a42a8298fb05bded243dbaf810f9a44" => :sierra - sha256 "7f0effc75d64fca0f2695b5f7ddb4d8713cc83522d40dcd37842e83c120ac117" => :el_capitan - sha256 "81d06ef2e3d98061f332a535b810102c1be0505371c1ac1aed711cf2ae8de5a3" => :yosemite - sha256 "95216c0df3840b2602e61dd3bef7d4c9b65cec0315e5b23ac87329320d9f6be9" => :mavericks - 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 594c3b50c407e..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 "5a03cc656131d1bcde14ec200be947c5b3caee6f5138e426b2b27b0286c59ee7" => :catalina - sha256 "561baccf9e285cd65021b70342d1ba37b456a2f35c0324dfd2a65ea427641d27" => :mojave - sha256 "23fdc88eeb1c4cf8d58e281e046f2e45a56860c0091e5c76f757f01679d143d2" => :high_sierra - sha256 "dc987998ebcfc175c9c9e70c6b83db4197bd5b79d383235b85ee8a30835785df" => :sierra - sha256 "0b92535641c86f38bf7a3a1b08a07aa6523e4c0135792dd92829e00579a5e3a9" => :el_capitan - sha256 "63c1d2905cf9214281b8dad71a7d86fcf57d46ccbeb026a43dc73dddac569840" => :yosemite - sha256 "4add1b332febce1ba3ee01ab98213be0729f3d2cad14f435f4064fec0273c3cd" => :mavericks - 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/cups.rb b/Formula/cups.rb deleted file mode 100644 index dd826bf7e1220..0000000000000 --- a/Formula/cups.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Cups < Formula - desc "Common UNIX Printing System" - homepage "https://www.cups.org/" - url "https://github.com/apple/cups/releases/download/v2.3.3/cups-2.3.3-source.tar.gz" - sha256 "261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee" - license "Apache-2.0" - - bottle do - sha256 "1bed38f7aa9ee2c76fed5393e308cf7de5dd6d443debb0455ee7739e010b0e20" => :catalina - sha256 "19ea09cef986e1c66f1736409f4e7917914100bb68525d8118e705500fbf28e0" => :mojave - sha256 "0d3328bddece686cfa54e63b61f68c68fed1b1f8553cd45ed194d8a80e56f9c9" => :high_sierra - end - - keg_only :provided_by_macos - - uses_from_macos "zlib" - - def install - system "./configure", "--disable-debug", - "--with-components=core", - "--without-bundledir", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - pid = fork do - exec "#{bin}/ippeveprinter", "Homebrew Test Printer" - end - - begin - sleep 2 - system "#{bin}/ippfind" - ensure - Process.kill("TERM", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/curaengine.rb b/Formula/curaengine.rb deleted file mode 100644 index 54fc38d18e52e..0000000000000 --- a/Formula/curaengine.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Curaengine < Formula - desc "C++ 3D printing GCode generator" - homepage "https://github.com/Ultimaker/CuraEngine" - url "https://github.com/Ultimaker/CuraEngine/archive/4.6.1.tar.gz" - sha256 "c72249b52ddab30fe41bccad4cbba14baa84a51b4069f79450ea0fd6dea78130" - license "AGPL-3.0" - version_scheme 1 - head "https://github.com/Ultimaker/CuraEngine.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d9822c078d322e27271b988695b8c62dcffb3c47a2d6cf3ba0924f8b7c2d718e" => :catalina - sha256 "491aae5f2853ac119f560dc64fa8bc4afcc27bf1b218d6fd3cf8170e6b041858" => :mojave - sha256 "7067dcf153826d767fc01831c4e535408ee1eca05b9bd7d858aca18964893ecb" => :high_sierra - end - - depends_on "cmake" => :build - - # The version tag in these resources (e.g., `/1.2.3/`) should be changed as - # part of updating this formula to a new version. - resource "fdmextruder_defaults" do - url "https://raw.githubusercontent.com/Ultimaker/Cura/4.6.1/resources/definitions/fdmextruder.def.json" - sha256 "9f0b42c98e023b32784c340db2db91a25f78fc30ca770a4914ae9c48a24d3db3" - end - - resource "fdmprinter_defaults" do - url "https://raw.githubusercontent.com/Ultimaker/Cura/4.6.1/resources/definitions/fdmprinter.def.json" - sha256 "142b4c17ed0270dfb76f23eb644a3a10c4e1c6be8ab35ff78ea2d3ea8a90f12d" - end - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DCMAKE_INSTALL_PREFIX=#{libexec}", - "-DENABLE_ARCUS=OFF" - system "make", "install" - end - bin.install "build/CuraEngine" - end - - test do - testpath.install resource("fdmextruder_defaults") - testpath.install resource("fdmprinter_defaults") - (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", "slice", "-j", "fdmprinter.def.json", "-l", "#{testpath}/t.stl" - end -end diff --git a/Formula/curl-openssl.rb b/Formula/curl-openssl.rb deleted file mode 100644 index 21991bd6ff82e..0000000000000 --- a/Formula/curl-openssl.rb +++ /dev/null @@ -1,71 +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.71.1.tar.bz2" - sha256 "9d52a4d80554f9b0d460ea2be5d7be99897a1a9f681ffafe739169afd6b4f224" - - bottle do - sha256 "3eb7b47868af07e3b766a325a2576749dc2f10ea1ff7ff6ccca3be59d1345712" => :catalina - sha256 "1bb271e14654750ec19a61283af0865b7f3ea18c2310bf6c7fd235ff294986b4" => :mojave - sha256 "8706151f228258eb6a75d98a661f9ab498025261b56d4fe6b44d0b3cc9967d6a" => :high_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 :shadowed_by_macos, "macOS provides curl" - - depends_on "pkg-config" => :build - depends_on "brotli" - depends_on "c-ares" - depends_on "libidn" - depends_on "libmetalink" - depends_on "libssh2" - depends_on "nghttp2" - depends_on "openldap" - depends_on "openssl@1.1" - depends_on "rtmpdump" - - def install - system "./buildconf" if build.head? - - openssl = Formula["openssl@1.1"] - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --enable-ares=#{Formula["c-ares"].opt_prefix} - --with-ca-bundle=#{openssl.pkgetc}/cert.pem - --with-ca-path=#{openssl.pkgetc}/certs - --with-gssapi - --with-libidn2 - --with-libmetalink - --with-librtmp - --with-libssh2 - --with-ssl=#{openssl.opt_prefix} - --without-libpsl - ] - - 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 337dbf5b750db..0000000000000 --- a/Formula/curl.rb +++ /dev/null @@ -1,62 +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.71.1.tar.bz2" - sha256 "9d52a4d80554f9b0d460ea2be5d7be99897a1a9f681ffafe739169afd6b4f224" - - bottle do - cellar :any - sha256 "36dc71f1899b803ab093e727c920b40f91b197402d9c73124c86d02feb0023c5" => :catalina - sha256 "99d574c0dec0a50f21ce736d77759038353f2301c7d7a64d5855d311aac4b506" => :mojave - sha256 "083d119978d82e86d68567b5fc48faf3d80bf66bf3f6e1c21400a2462d3c460c" => :high_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 - - depends_on "pkg-config" => :build - - uses_from_macos "zlib" - - on_linux do - depends_on "openssl@1.1" - end - - def install - system "./buildconf" if build.head? - - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-secure-transport - --without-ca-bundle - --without-ca-path - ] - - 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 5130f69391ac5..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" - revision 1 - head ":pserver:anonymous:@curlftpfs.cvs.sourceforge.net:/cvsroot/curlftpfs", :using => :cvs - - bottle do - cellar :any - sha256 "2d3fea0aecd1856a956cedcf8ab992f217bd730371c6eb80900158c69f138aa8" => :catalina - sha256 "b4f74999789cdb534784428530110421a256adc2b276ed8f372c8498e31719a0" => :mojave - sha256 "edb3da0b0ccc3b5b3004096f89174786ad75838b82b6c6b621855291744147f1" => :high_sierra - sha256 "5734dbff6e2a7c18232d08d22fe64e19610f32b07e48b276996df759baaef407" => :sierra - 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/curlpp.rb b/Formula/curlpp.rb deleted file mode 100644 index 2f77d286f833d..0000000000000 --- a/Formula/curlpp.rb +++ /dev/null @@ -1,53 +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 "8497c5ce375090d76c17a9197a07f2f55019ec2704e78208306a4e545e67bd46" => :catalina - sha256 "4a8dc2ab4cb65ed349477a0cced49ea3e6ee19aa49983313f8221bf2da303bf4" => :mojave - sha256 "0e5f9adbb17bd9e725fbe7ec11ada7a6d73e4a8ffb2448570b6ed16ed9fd2701" => :high_sierra - sha256 "0d721493b94879cdf25162903fd5d10299b5d8386942efb0969c470afeef6b35" => :sierra - sha256 "fd5c8375a1f4ef8aa20cfb740e8bac45c381ce6dbadc90f731e47b00c8a404b3" => :el_capitan - sha256 "fd39edf63c0745f9d39a76f7b428eba285af313967ad4697d4fb08b705ee3eef" => :yosemite - end - - depends_on "cmake" => :build - - 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 faa9c0385da09..0000000000000 --- a/Formula/curseofwar.rb +++ /dev/null @@ -1,28 +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" - license "GPL-3.0" - head "https://github.com/a-nikolaev/curseofwar.git" - - bottle do - cellar :any_skip_relocation - sha256 "92c8a1650e5e18866211a79499abad640ff8ce8f49b54c50043e7f421d8d8e47" => :catalina - 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 9717ca7d4d5a4..0000000000000 --- a/Formula/cutter.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Cutter < Formula - desc "Unit Testing Framework for C and C++" - homepage "https://cutter.osdn.jp/" - url "https://osdn.mirror.constant.com/cutter/71616/cutter-1.2.7.tar.gz" - sha256 "4d80feb16f8f4d8eed62bca40194f8896e70bdac06305bf612b41601e659cae6" - head "https://github.com/clear-code/cutter.git" - - bottle do - sha256 "0650d1181d339e3d89b8d4965fb2be8c0c69aa59766a09a96ed3eb8bf8d46307" => :catalina - sha256 "e0022aa0b542412a57d955ca8fb452ad039f7f88657ec1f76ad3820a12f3d96e" => :mojave - sha256 "28f8f560c992d67b7ae44d64b70476ed8f82b5df9aa1c9183babfb4723df1b55" => :high_sierra - 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 f1ec1bca81595..0000000000000 --- a/Formula/cvs.rb +++ /dev/null @@ -1,92 +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 2 - - bottle do - cellar :any_skip_relocation - sha256 "c80cc90d6ffbb4113745eac9386396c82b63ceee000f88acba79b7a16e05724d" => :catalina - sha256 "2fba5fb7a0ece4b19030e2217a9297f13d3a763303443b9f6935f48d434f636a" => :mojave - sha256 "eac3fab201c8e47ee3d05e95a240c2f53306e000a416956843083d7305b48da9" => :high_sierra - 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/24118ec737c7d008420d4683a07129ed80a759eb/cvs/vasnprintf-high-sierra-fix.diff" - sha256 "affa485332f66bb182963680f90552937bf1455b855388f7c06ef6a3a25286e2" - 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 - 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 - -__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/cvsps.rb b/Formula/cvsps.rb deleted file mode 100644 index 932f92fd38271..0000000000000 --- a/Formula/cvsps.rb +++ /dev/null @@ -1,29 +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 - rebuild 1 - sha256 "98ee59741e5e48ef4ca18f5b0b08cfc8eab19d8e96cebcb75e989334add7411f" => :catalina - sha256 "8901d9d03137e3ebc2dfa52eeec1b6fb5278aa21fcd2075302ea9c9e20ff1db5" => :mojave - sha256 "d67b00e52b9688d1249d996eaf94a728691f0b171b1708e83bba07508939d376" => :high_sierra - end - - # http://www.catb.org/~esr/cvsps/ - # Deprecation warning: this code has been end-of-lifed by its maintainer. Use cvs-fast-export instead. - deprecate! :date => "2013-12-11" - - 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 03fb75ea53a06..0000000000000 --- a/Formula/cvsutils.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "f8637db7bc660a9953b96bca2e68d1ba7c56bd0766e0ef12bc6b0b42d972ae3a" => :catalina - sha256 "e497ac1ba036fec1ccd8d34b2ec6262f9721ab805d0636f073c5406ef4fbd922" => :mojave - sha256 "102456ac28b63271b03a5722e8421d6273005c54203f4f818678be065479463b" => :high_sierra - sha256 "d1f2e13e0df6dbb767a04f7e206114c119f9e6435f227e07e14b4d200e6aba8f" => :sierra - sha256 "f8e35c8b0ed2db868e7dd12f653c20d7d2709059fb5a773fd49084a2655f4ca0" => :el_capitan - sha256 "ccefce4b4a1053e9a32e4f43318c7bf73c7154f0bee1be1cf1777e8fd3e8eabf" => :yosemite - sha256 "ab6140058099bdc798e0e294640504035d5c976a8752742044a161c416e2e31e" => :mavericks - 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 b714232a28a00..0000000000000 --- a/Formula/cvsync.rb +++ /dev/null @@ -1,45 +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 - cellar :any - rebuild 2 - sha256 "da10e78630bf61ac77576e3f10033730bf335e24324681f32c973cd9a2d645be" => :catalina - sha256 "1a7f82970b208df4bafed99ce20de7f4d94be51f79152ad75c85fb69ecaff51e" => :mojave - sha256 "1ea4fcb1bcb64f91915919e485b374eb2e16b69fb60f589242c3a140d3c16c7f" => :high_sierra - sha256 "4e92dd3b6a74831724c2da74f761660fa25630d9c44be9d80a0d72dc522e1fae" => :sierra - end - - depends_on "openssl@1.1" - - 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 2171250af2091..0000000000000 --- a/Formula/cweb.rb +++ /dev/null @@ -1,50 +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 "3fdde2a4883a27e1ed296a89458821c848bcbac7daa7df5ab33160131f0e38e8" => :catalina - 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 d8687f301e6ee..0000000000000 --- a/Formula/cwlogs.rb +++ /dev/null @@ -1,41 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "b28a57d8b6d5801ccbbbb9227952f9bd67935a62a0ddcaefddec2650a5296eba" => :catalina - 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/cxxopts.rb b/Formula/cxxopts.rb deleted file mode 100644 index 40acecd95b0ee..0000000000000 --- a/Formula/cxxopts.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Cxxopts < Formula - desc "Lightweight C++ command-line option parser" - homepage "https://github.com/jarro2783/cxxopts" - url "https://github.com/jarro2783/cxxopts/archive/v2.2.0.tar.gz" - sha256 "447dbfc2361fce9742c5d1c9cfb25731c977b405f9085a738fbd608626da8a4d" - license "MIT" - head "https://github.com/jarro2783/cxxopts.git" - - bottle do - cellar :any_skip_relocation - sha256 "eac0f746cf84e2b1a88cba6da3686269b7f71d05492eec886cd36f388989cb6c" => :catalina - sha256 "0d218ecd42f83ea5e0fac4c6d8e36d5acf555133c7d52fed9657107edffef917" => :mojave - sha256 "0d218ecd42f83ea5e0fac4c6d8e36d5acf555133c7d52fed9657107edffef917" => :high_sierra - sha256 "36f6ff18ae628891ca7d188c749fea2a097db1b9d83181bfd123ce09adddebb3" => :sierra - end - - depends_on "cmake" => :build - - def install - ENV.cxx11 - - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DCXXOPTS_BUILD_EXAMPLES=OFF", - "-DCXXOPTS_BUILD_TESTS=OFF" - system "make", "install" - end - end - - test do - (testpath/"test.cc").write <<~EOS - #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; - } - EOS - - 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/cxxtest.rb b/Formula/cxxtest.rb deleted file mode 100644 index 25b1352cbcdd0..0000000000000 --- a/Formula/cxxtest.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Cxxtest < Formula - include Language::Python::Virtualenv - - desc "C++ unit testing framework similar to JUnit, CppUnit and xUnit" - homepage "https://cxxtest.com/" - 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" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "90b9ca9996eb575a2e8665223f38731979a38630f5462fd3c2babf81ce7ceee4" => :catalina - sha256 "d6f91fba5743dc04e2c929036f59a34cd7833e5a75a6ebf6785209f8fabca4f1" => :mojave - sha256 "99b1ea9c495bf4ee03b88aadb33a5ae964741bcd387d678c6dcc5a18c925ad12" => :high_sierra - end - - depends_on "python@3.8" - - def install - venv = virtualenv_create(libexec, Formula["python@3.8"].opt_bin/"python3") - venv.pip_install_and_link buildpath/"python" - - 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/cypher-shell.rb b/Formula/cypher-shell.rb deleted file mode 100644 index cf9deb248398f..0000000000000 --- a/Formula/cypher-shell.rb +++ /dev/null @@ -1,27 +0,0 @@ -class CypherShell < Formula - desc "Command-line shell where you can execute Cypher against Neo4j" - homepage "https://github.com/neo4j/cypher-shell" - url "https://github.com/neo4j/cypher-shell/releases/download/4.1.1/cypher-shell.zip" - sha256 "5216e57490fe95ff5e677f1790444bd0fda7522f81c5ffca133bb9edb8fddd25" - version_scheme 1 - - bottle :unneeded - - depends_on :java => "1.8" - - def install - rm_f Dir["bin/*.bat"] - - # Needs the jar, but cannot go in bin - share.install ["cypher-shell.jar"] - - # Copy the bin - bin.install ["cypher-shell"] - bin.env_script_all_files(share, :NEO4J_HOME => ENV["NEO4J_HOME"]) - end - - test do - # 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/cython.rb b/Formula/cython.rb deleted file mode 100644 index f0ce6a147c3d9..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/6c/9f/f501ba9d178aeb1f5bf7da1ad5619b207c90ac235d9859961c11829d0160/Cython-0.29.21.tar.gz" - sha256 "e57acb89bd55943c8d8bf813763d20b9099cc7165c0f16b707631a7654be9cad" - - bottle do - cellar :any_skip_relocation - sha256 "bedaacf62301f7181b4d35dd98d3538bf27f78edffbbf0943742a50ac13781aa" => :catalina - sha256 "ce971564ac8590aed3f98feb6e1b48516313bcace8ff087fe3620260dc88e42a" => :mojave - sha256 "f2782e4d8583aa16b4793b431500d865f6dacee146e4f51ec298cd87d95c3d6e" => :high_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@3.8" - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system Formula["python@3.8"].opt_bin/"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 Formula["python@3.8"].opt_bin/"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 Formula["python@3.8"].opt_bin/"python3", "setup.py", "build_ext", "--inplace" - assert_match phrase, shell_output("#{Formula["python@3.8"].opt_bin}/python3 -c 'import package_manager'") - end -end diff --git a/Formula/czmq.rb b/Formula/czmq.rb deleted file mode 100644 index 7c89e7c02b4d3..0000000000000 --- a/Formula/czmq.rb +++ /dev/null @@ -1,69 +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.2.0/czmq-4.2.0.tar.gz" - sha256 "cfab29c2b3cc8a845749758a51e1dd5f5160c1ef57e2a41ea96e4c2dcc8feceb" - - bottle do - cellar :any - sha256 "c461e7f219ce378867918141470c871871c9e0aec437ceb52cc858f61811aece" => :catalina - sha256 "19b9f2b1d8d73f7314d0534f22bacd8bc02b39b2a985a07fc8e40365583fc45e" => :mojave - sha256 "a1afab02e1ff88b48e2bd92900a701745e18fb05ca700d5c2635fa4c986010f8" => :high_sierra - sha256 "d64960ca3558f8a571a51095b9c0e41b1eb8c535e2efc0882ea20c44a41b5563" => :sierra - end - - head do - url "https://github.com/zeromq/czmq.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 - depends_on :macos # Due to Python 2 - depends_on "zeromq" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - 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..583a96856d309 --- /dev/null +++ b/Formula/d/d2.rb @@ -0,0 +1,40 @@ +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.0.tar.gz" + sha256 "6e7e7c787755e61fc048cc0c2e939a330a3dad98ee0f3c1cd706f2c192416554" + license "MPL-2.0" + head "https://github.com/terrastruct/d2.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b263fd0a4c819aff3cf1f45401208ca46d0e0b9702de97565051ce7dca60162f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b263fd0a4c819aff3cf1f45401208ca46d0e0b9702de97565051ce7dca60162f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b263fd0a4c819aff3cf1f45401208ca46d0e0b9702de97565051ce7dca60162f" + sha256 cellar: :any_skip_relocation, sonoma: "0bd702fe40271a6413415a26344a5f9386c62a12395f982c90f651a96cdaf4ce" + sha256 cellar: :any_skip_relocation, ventura: "0bd702fe40271a6413415a26344a5f9386c62a12395f982c90f651a96cdaf4ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe4c5b7a9948a73d481f89c3606abe5f10fe93522f937d12275862c9ff51baee" + 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..beed68497f550 --- /dev/null +++ b/Formula/d/daemon.rb @@ -0,0 +1,36 @@ +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_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..b46357bd6fe0b --- /dev/null +++ b/Formula/d/daemonize.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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, mojave: "45a895642c3be14e888b66607c2a4567408657111686437a431a730358b2feea" + sha256 cellar: :any_skip_relocation, high_sierra: "bc501e9e4ba9fd11390fa9749a7b9a38a70353edaf75499bd969c45921d06bfe" + sha256 cellar: :any_skip_relocation, sierra: "d4d5109292158ef32eb73a37b9b6a037dcae620e234be945410ea927322bb998" + sha256 cellar: :any_skip_relocation, el_capitan: "5e05991cf0462e4fe32dd70354d2520a378831d2b1c0fc2cf0b4fbca8dc85489" + 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..3f570a9c69048 --- /dev/null +++ b/Formula/d/daemonlogger.rb @@ -0,0 +1,44 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "1cac9c8c17cd804206440d35ec88f49e8162ec102a4e561aa103f528b6d49382" + sha256 cellar: :any, high_sierra: "04242956845e71d839b050dd765829a217268486eb625a481a3fae85bd577f0d" + sha256 cellar: :any, sierra: "c3ac14ab04174e06129fc0a51d31ad992f3d11f362ecb1cf3803092b6c68b146" + sha256 cellar: :any, el_capitan: "582aa8e07f269bdfa00b1f66157c06339b62285d94f6b8ffa6a472eac063e5e5" + 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..8884e03a16b3f --- /dev/null +++ b/Formula/d/daemontools.rb @@ -0,0 +1,89 @@ +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 + + bottle do + rebuild 1 + 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/formula-patches/212baeaf8232802cf3dfbfcc531efa5741325bfa/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/formula-patches/e52085ff249263bdf9a21229e0d806ea4e2b9e95/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..d4ee3195e1193 --- /dev/null +++ b/Formula/d/dafny.rb @@ -0,0 +1,54 @@ +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.10.0.tar.gz" + sha256 "bd643ae9cd5b697505ca3682fa4d15238c6746701eaa1eeba4c541006674da40" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b0379afe58205e4e147a773cfe4e45102e4b6bda9a2a40e862641730e23381b6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8e361b9620dab3bc75b0f55c708fac271c5da152a11aade9873838b52af43c9c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "72f8fd00da940888a1a2cb7a5ad9ca0919a1537f2b2901336fd21e760f11cc6f" + sha256 cellar: :any_skip_relocation, ventura: "a717a33ebf39dcfa1bf658103e5e70d07961643d9652c4823f6969beb47735ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "25b428296abab12015268dbdb33f5a15707c5df5754665126cd2a78088b73b27" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e7397f8784ded9a6688b1e1a3e5ee31b2278d44e55462429395f1b374b3b736" + end + + depends_on "gradle" => :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..f42110d53631e --- /dev/null +++ b/Formula/d/dagger.rb @@ -0,0 +1,45 @@ +class Dagger < Formula + desc "Portable devkit for CI/CD pipelines" + homepage "https://dagger.io/" + url "https://github.com/dagger/dagger/archive/refs/tags/v0.18.8.tar.gz" + sha256 "40af9698750415e4100908156fa1b705811c482dc109257afd4af6ccf6f4eab0" + 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_sequoia: "d5c4e9cb80d508a4dd000618100b2bc694f7b0e8c1cc2f92e3c01a7dd467cb36" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d5c4e9cb80d508a4dd000618100b2bc694f7b0e8c1cc2f92e3c01a7dd467cb36" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d5c4e9cb80d508a4dd000618100b2bc694f7b0e8c1cc2f92e3c01a7dd467cb36" + sha256 cellar: :any_skip_relocation, sonoma: "dbfc058cc6313bc4feda60f4351cf53286d682a3750b92211a91f733fb5f3d0f" + sha256 cellar: :any_skip_relocation, ventura: "dbfc058cc6313bc4feda60f4351cf53286d682a3750b92211a91f733fb5f3d0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "790bc376851869cfe7ca735a0b52bea6ad1221f86a6de35243204aeb69af5046" + end + + depends_on "go" => :build + depends_on "docker" => :test + + def install + 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/daktilo.rb b/Formula/d/daktilo.rb new file mode 100644 index 0000000000000..72fc8b8641229 --- /dev/null +++ b/Formula/d/daktilo.rb @@ -0,0 +1,40 @@ +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_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..fc8f445d8ce69 --- /dev/null +++ b/Formula/d/dalfox.rb @@ -0,0 +1,33 @@ +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.11.0.tar.gz" + sha256 "3bb78fcdcfd620aebb5f7488770ee4df7c7fb6448181963f290e60a1cba95459" + license "MIT" + head "https://github.com/hahwul/dalfox.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91f55801c696f298971522b7ce6d824a9a1df13b047916ae74f0ab5316ee3d64" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91f55801c696f298971522b7ce6d824a9a1df13b047916ae74f0ab5316ee3d64" + sha256 cellar: :any_skip_relocation, arm64_ventura: "91f55801c696f298971522b7ce6d824a9a1df13b047916ae74f0ab5316ee3d64" + sha256 cellar: :any_skip_relocation, sonoma: "d89e7889cfb98452513664f667326fc9d75cca2ac01c1f3efe70703ee9f4a81e" + sha256 cellar: :any_skip_relocation, ventura: "d89e7889cfb98452513664f667326fc9d75cca2ac01c1f3efe70703ee9f4a81e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f947d564a27d70be00487e9ba33ba79e681e6f6ad230f2e635ad32aef925e5f4" + 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/dante.rb b/Formula/d/dante.rb new file mode 100644 index 0000000000000..ebf5b5b17a566 --- /dev/null +++ b/Formula/d/dante.rb @@ -0,0 +1,45 @@ +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_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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..05b2f887c77f2 --- /dev/null +++ b/Formula/d/daq.rb @@ -0,0 +1,58 @@ +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.19.tar.gz" + mirror "https://fossies.org/linux/misc/libdaq-3.0.19.tar.gz" + sha256 "28d026de46f8206b1a74dd6bf7de10ca19d7a7c95a463744b9f79e51958e5889" + license "GPL-2.0-only" + head "https://github.com/snort3/libdaq.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "de5fecd1ca4361de4a8435280165af94aab2dc93ef0e5596a1bf7ad5e52213ed" + sha256 cellar: :any, arm64_sonoma: "95684f5dbb32aee8326a248018e22ccf2457e1d0d8c6513bf5886663588987e4" + sha256 cellar: :any, arm64_ventura: "c698259bece3eeaca5400f4834b6868f182545137c31ef3b55320ab72b7c3ec6" + sha256 cellar: :any, sonoma: "97f451492598266dd1802c7ef01306793f3093e1199c432714240831956c0dc1" + sha256 cellar: :any, ventura: "e36b53523a795b1b2d1b6c706760ca98021982e001c29efe44aecc67008f4f83" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ceaab9f251d411b7bfa21784715a7c2eedd58511128f09b7d90ab15c645b30b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "274a26aa6ea3813c7551a43f8f9176293eb20ce87e813fb86d6ee4de08daf7d5" + 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..d0bd375aeb571 --- /dev/null +++ b/Formula/d/dar.rb @@ -0,0 +1,44 @@ +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.7.17/dar-2.7.17.tar.gz" + sha256 "4a597757d2de2f54821319129090ded8e67cff1a487c3d2e43b9daccefb5140b" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/dar[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_sequoia: "c1edb8bbd7c24b4449d558aa34c1e11f25e032a8e52545a273758b1540c28d67" + sha256 arm64_sonoma: "7c22d77abed655c9fe78c5f9bf82ef8afea3351508e6e5cae840aa289148a1f2" + sha256 arm64_ventura: "a54bc17f46e2c74c4d4f9c36d655b9f7f37427f09ce0eef08d91a3d5df312254" + sha256 sonoma: "0bca4d8a3e1da533332fe535d0d35f7fd13d87db88cae93b5b444e427cdb3028" + sha256 ventura: "cbbeca869cc054e953129ebe8e992b4bf8af69d0bd64570b49a2ff6abc25646f" + sha256 arm64_linux: "b48d311bb953658903d6e2e84efeba2da0a94b7f9a8fa0488ea8786e2db61fd7" + sha256 x86_64_linux: "5c2f273a76143c4aa87aa957647ddb3e3373ffa661edb57a685eca84aaddb77c" + 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..51346e891f3f2 --- /dev/null +++ b/Formula/d/darcs.rb @@ -0,0 +1,98 @@ +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_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..564883d1ee013 --- /dev/null +++ b/Formula/d/dark-mode.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "692456cb6abf428b487c663b4718147fe4fffa5be956054700857d2d9ddb977f" + end + + depends_on xcode: :build + depends_on :macos + depends_on macos: :mojave + + 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/darkhttpd.rb b/Formula/d/darkhttpd.rb new file mode 100644 index 0000000000000..fe237a46e3532 --- /dev/null +++ b/Formula/d/darkhttpd.rb @@ -0,0 +1,28 @@ +class Darkhttpd < Formula + desc "Small static webserver without CGI" + homepage "https://unix4lyfe.org/darkhttpd/" + url "https://github.com/emikulic/darkhttpd/archive/refs/tags/v1.16.tar.gz" + sha256 "ab97ea3404654af765f78282aa09cfe4226cb007d2fcc59fe1a475ba0fef1981" + license "ISC" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8acef684427142565d90c96db616fa7bcf1a28bf0d4fca71aacea8fc8cab2996" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5e57b5d8505d7a4073aa5d3bc46d06482332241cc7e28bfa2ba6a1257100ceec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0754b61bb91a3ffc1ac81c6b9caa11d3f165025abc78ea02faf114c8680ed236" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f3eba7b21645b53ce4129a5225d757046ed601d2ca937686aebd11b80bd381be" + sha256 cellar: :any_skip_relocation, sonoma: "cda44bc98470b2f53b0485af56ee360630c05ad1a8a1a05bca5c9ca0ea982e47" + sha256 cellar: :any_skip_relocation, ventura: "9f424d6282015f95909fef901b9519f6c4d6ac8b42af1cd08cdd8b889b2b7ef5" + sha256 cellar: :any_skip_relocation, monterey: "cd10faefba5c4988de8011263451f734e6e05a222839b6cb3218764643da4835" + sha256 cellar: :any_skip_relocation, arm64_linux: "b600432ced2e8b7addb47da3eb1846b175997d92836672303579e7b44416e46d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb8cd915b3d815dbae18a6a91f7f6027569d5d020101c19fde5d035d5d433a74" + 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..c2484db244ec6 --- /dev/null +++ b/Formula/d/darkice.rb @@ -0,0 +1,56 @@ +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_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..a980430664cf0 --- /dev/null +++ b/Formula/d/darklua.rb @@ -0,0 +1,77 @@ +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.16.0.tar.gz" + sha256 "133baa4e584f7566dfe38bec3b1fcffe43e795cc28af0465ab792acf31fa2264" + license "MIT" + head "https://github.com/seaofvoices/darklua.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "65353fe3b327985d26b88e45acc7d2448458850a15c70acd9e310dece10b5140" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "51e1aae12cddb661d59ac58804f67e610308b2fcdd4d8e1820b14c7d2fafb049" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5bd5f668a31c24ca6fd4c317e4699531c323b64c5cd19e37eb8b3458d6d8df63" + sha256 cellar: :any_skip_relocation, sonoma: "96749c157b2ff99a438cddb5159ffec85660e16b00e48ffb63a80882ca6278ed" + sha256 cellar: :any_skip_relocation, ventura: "ac5f3cc4f6355b66cae12369ae5dd85e1ab095af27a23cdf8a047c330b0f7b39" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab9e34f90b146992bbc5b7e88f14536fdf9bebabecd9cfbb3e657a4ef0b23f99" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8354ab92f83f7c68125c741cf2857d3fd8706e16a8769b719b16103b9a8e24d0" + 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/darksky-weather.rb b/Formula/d/darksky-weather.rb new file mode 100644 index 0000000000000..b911744ca82e7 --- /dev/null +++ b/Formula/d/darksky-weather.rb @@ -0,0 +1,40 @@ +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/refs/tags/v0.15.7.tar.gz" + sha256 "e5efd17d40d4246998293de6191e39954aee59c5a0f917f319b493a8dc335edb" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "478916227ceed88c3c7a55485f8c1edbd1e610e36949fb333e659b84a71c6f2e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "06d6793a769708b4644292ae99aed057e15c9f95fa5f38c8e058bca7c791915e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "65acd7270545c3451f69c5fb5e3a6fc819c3f86f7ee6f687769ccdf8ce41a86d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3908f2bff7bb30a6c668211e255cdb4edfb073e90db2d4fd75addc316b061fc2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d21740455ddc5db0a56e33e5f96dd7248d46b680414f5cff834faf3fb670b618" + sha256 cellar: :any_skip_relocation, sonoma: "744704bada9093c0638873d4239f1a13f0b48f8085a04c54291956dcda276d4a" + sha256 cellar: :any_skip_relocation, ventura: "07f1e787ff616626dcf0e4493d4b7453bf6cf283f8a226899ee67265cd81e4b3" + sha256 cellar: :any_skip_relocation, monterey: "2d45683974e5fb879064182bfde515b4d85945e43916fc11763ae1059c59078d" + sha256 cellar: :any_skip_relocation, big_sur: "af8fc6e9a4a4ed68bd19daabdce01d846f4e8d88028bccca8c9bec090cf53e29" + sha256 cellar: :any_skip_relocation, catalina: "736015c107e06e6251e4007ebc838addfe37ad6fa32683c05fb89be3d1b800f6" + sha256 cellar: :any_skip_relocation, mojave: "a38cef91ca53c2d452353cf3a15198b9946b67e7b601627b5e414359d23fa559" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f27ed1995e056157202f4785d0d4d28a8181d77cd0a971d6b778aafcbca7abc" + end + + disable! date: "2024-10-11", because: "uses the shutdown darksky.net API" + + depends_on "go" => :build + + def install + project = "github.com/genuinetools/weather" + ldflags = ["-s -w", + "-X #{project}/version.GITCOMMIT=#{tap.user.downcase}", + "-X #{project}/version.VERSION=v#{version}"] + system "go", "build", *std_go_args(output: bin/"weather", ldflags:) + end + + test do + # A functional test often errors out, so we stick to checking the version. + assert_match "v#{version}", shell_output("#{bin}/weather version") + end +end diff --git a/Formula/d/darkstat.rb b/Formula/d/darkstat.rb new file mode 100644 index 0000000000000..c64b42dcb7135 --- /dev/null +++ b/Formula/d/darkstat.rb @@ -0,0 +1,46 @@ +class Darkstat < Formula + desc "Network traffic analyzer" + homepage "https://unix4lyfe.org/darkstat/" + url "https://github.com/emikulic/darkstat/archive/refs/tags/3.0.721.tar.gz" + sha256 "0b405a6c011240f577559d84db22684a6349b25067c3a800df12439783c25494" + 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_sequoia: "5373a3a8b0c7a8138b1dd756814c5d0f383a530170822c5cec37260145a55bf0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e3e4f63fec4c167ff2ac71b28b5cdb1f163c2e961c4316792355500f96c85671" + sha256 cellar: :any_skip_relocation, arm64_ventura: "97674e5bd9b7f7924b24cff91ae6460327cc250272e9b67ef8d98c27f218f8d0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5981250184af819d33927ff9c81ab3249ee0ebe1f30c16fe6fdf59383946b718" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "223b3ec850fc9c5837d28d8484100ede7a06995ab925db15581925247e7ab729" + sha256 cellar: :any_skip_relocation, sonoma: "dc560a58e6bb24f515919e503a009f993754111bf15306a580fa399caf133930" + sha256 cellar: :any_skip_relocation, ventura: "885d6ca5a12e1faeb072e920dda1bcf214d9ecc9b401ffe207babca7ecc067b1" + sha256 cellar: :any_skip_relocation, monterey: "8449dc87a9567d043d9cb0639213e0be3e3a664dcbc9829b7a4fd4fa02de5d68" + sha256 cellar: :any_skip_relocation, big_sur: "d7f108870e81eb677b299a42824f4680a7f837614d26af49d6cee24519bb21fc" + sha256 cellar: :any_skip_relocation, catalina: "ea01bd86053287a7fce043527aa68ad0dc138d6cdb8e800602947b581687f18c" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b937251ad1b3ab158843ccc5ee02041c54304e852708f908d227bf2fb7a6eab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b32d27fc6e9539499c8d1c4ca716f2a489814fce3e71929b676339eb54425d9" + 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/formula-patches/442ce4a5/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..04e26e666660a --- /dev/null +++ b/Formula/d/dart-sdk.rb @@ -0,0 +1,55 @@ +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.7.3.tar.gz" + sha256 "5f7fd432c95adce1a00060675c5b52c001f8b540bcbe8eb1684a77ba4a02f2bd" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "51ad4a48127c60d434f74365ca59381592a7a4f1536aef3d2d78e6d2d9b6494e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f90cd5b367c173fdff23742a95bca90adc2e3b8c659f0ec793985c728f8de35e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c79a1a97598b2ced9424456b4ac349798e9dc3609c2932891c3da336c84afddf" + sha256 cellar: :any_skip_relocation, sonoma: "b093bb6e35f91068b8e4334da32a625650f73309b1362f4fbaf1611cf4937263" + sha256 cellar: :any_skip_relocation, ventura: "9d027e74e46f579aa40e1d74c566f5a3a144b6aabeea3e4b7a78a4b0fe5eb3aa" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f4bcb3418812e9907eae6fb5e0a25aaa9c6189110907e7f512599789191a8bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ade94ed4188f4e323662abe3c1251949ff65afae6055af06ac67e62267dbf146" + 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: "463ce5a855f4a65c75791c29a1394d2116eab277" + 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..be1de6074f0ab --- /dev/null +++ b/Formula/d/dartsim.rb @@ -0,0 +1,82 @@ +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 2 + + bottle do + sha256 arm64_sequoia: "57838cb631dac3c85c350663acee1b0582481212eac4a029d00792b58da5f814" + sha256 arm64_sonoma: "5b6c0a008105e1a5b1d2d3f0b84dca6505775c363cc0ec7871e06173430da721" + sha256 arm64_ventura: "f76dce0bfcfceddd7b0cf4b1d73f283336935870a43d152b49b52a68602dfe8e" + sha256 sonoma: "5ca7f3fce898de34e1dc012ed0aee14a0b870667f03ff190a6856ff834990dc6" + sha256 ventura: "2e3acef9d48405a5ab2a3e3a1df04379774a483cfa20e9d130132da14ab0b083" + sha256 arm64_linux: "386afa41680de20b295b29113e38210427bfccec0702068caaad1e44e57b6429" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b659c3c5a28cf073ea7b3ab319f9f2e692de6da6c8aa3869dea0697d2d0ced6c" + 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..eb9e5ab3668c2 --- /dev/null +++ b/Formula/d/dasel.rb @@ -0,0 +1,32 @@ +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" + + bottle do + rebuild 1 + 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, 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.rb b/Formula/d/dash.rb new file mode 100644 index 0000000000000..0be9c10191ad3 --- /dev/null +++ b/Formula/d/dash.rb @@ -0,0 +1,44 @@ +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.12.tar.gz" + sha256 "6a474ac46e8b0b32916c4c60df694c82058d3297d8b385b74508030ca4a8f28a" + 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_sequoia: "0a20260fdd5e1e0906fe213cbd842e2240e885ef1b29b0e848f7c8667d91eccd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bc85379f2d9ff74f8e1afcf0d0cda498bd3ca785c911f0ae06e5486c7d5463f0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f3f177c287fb59e325e09b7b94f5d64e3b562da1a4f6183cc49e06a1763a3502" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a5f99ef9dc765177761f70b92777cefb0f17df859cd263d1addc0669ed95a52d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5f729292d1177fb664cc5548ef9b454f875c93fa0a1fbcbe51708f9264d21e69" + sha256 cellar: :any_skip_relocation, sonoma: "a23a5f5c7d6166a0a3cc0dace982cbfa89479056bfb3b45c329a52dea918b0bd" + sha256 cellar: :any_skip_relocation, ventura: "909fda81a80744fd2e8ac80694258a2abf4ee52a7412fd2617d07fa61fb36586" + sha256 cellar: :any_skip_relocation, monterey: "5f282ad1ebb1967545d5fd96625943ef81fa89be33487da251c7fd780bb22564" + sha256 cellar: :any_skip_relocation, big_sur: "e7c20c1749cc4272f95828ba80ff122e7f451f887ba84892227017146759d69d" + sha256 cellar: :any_skip_relocation, arm64_linux: "59fefab5a530e94574f47321047cdea061cff60df562e33048af7a318b7a0492" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22df39762896ca47c7d2463dd5a150a98ee005f382cfde38f6750f2a7937fd5a" + 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..5c193e5221d1a --- /dev/null +++ b/Formula/d/dashing.rb @@ -0,0 +1,57 @@ +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" + + bottle do + rebuild 2 + 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, mojave: "bbd3a7995a6b5a0a87f4a08a4e4bb52fe75990bdde6b63bea1a9c56c7c144165" + 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..8280e53d5f14f --- /dev/null +++ b/Formula/d/dasht.rb @@ -0,0 +1,27 @@ +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" + + 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..d809c9cc0d657 --- /dev/null +++ b/Formula/d/dasm.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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, mojave: "43a9c82d0ed5d8466cdf1bd749c3a94710f76c5a1f1599a5a4538a58616bc95f" + sha256 cellar: :any_skip_relocation, high_sierra: "145c79491ba96ba7d21f4085ff3cedf482555e46c9c334fe6c9b2458202bfb8c" + 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..f584b3f63aec5 --- /dev/null +++ b/Formula/d/datafusion.rb @@ -0,0 +1,31 @@ +class Datafusion < Formula + desc "Apache Arrow DataFusion and Ballista query engines" + homepage "https://arrow.apache.org/datafusion" + url "https://github.com/apache/arrow-datafusion/archive/refs/tags/47.0.0.tar.gz" + sha256 "47d4ddba6708bca75e93c9e2955c3c518086dcc0e0deb10f6d285be14ad0a729" + license "Apache-2.0" + head "https://github.com/apache/arrow-datafusion.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a15568ea05c9e44c3d3cf2d2ad0ba99edd87f2aeb5ade7435328348d8aa3a6d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d16bc43308608858a817d893d3b65938109d188b7659da5405b499e4443db3e6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "21183c4ae865eff9ef9f75f75cec67ee4aea19aaba5c9f5d4e9547ceb6e153e5" + sha256 cellar: :any_skip_relocation, sonoma: "073fd32c2e07bec63333f6c61e2df43881ab79943944d3b3bdbb5d2d8cd38d04" + sha256 cellar: :any_skip_relocation, ventura: "8516cc8dda3f9e45a445c2203ef5665dd5699885a614d34afaecb64d188b89e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "df1093d35378b1c073ecacbf4498615ed1e57a0758de6f02fad3ee8f609655f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b9b048d833632e5ae314e2df8daa074c7a0734f95f9dcfb4c19b4e578c7cec9" + 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..b162ced14bbe8 --- /dev/null +++ b/Formula/d/datalad.rb @@ -0,0 +1,216 @@ +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/73/65/ee011cb8eed1f19787b9c41daf2c50148744c5edc699dc733f43e3822010/datalad-1.1.5.tar.gz" + sha256 "d32974b532e35172e25b50a30557544d3897e72c4e164073096b13dc775021a2" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d5d84cec714cd38b5e356428d3f9a83cf21bf12ceb0ab093bd27ee04017d4d8f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "812ac6c6cc22a240fb920d192fbf43f6679f854703c50cf027aa51987a149e11" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8816fa2f8951a949c619f7322e0d7b8b3ac22b1d746e81317f6019eef28d89a4" + sha256 cellar: :any_skip_relocation, sonoma: "373ad02b9ccab0cefcb8261d3e37979f32a0824d64a9a6de2c9525d0391fa8d8" + sha256 cellar: :any_skip_relocation, ventura: "98a6d7f6e4c231609e2b6f76221f636b5dcb7dd2215be5281444e369ebcf70f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "320fa25995ffb376e62f6109096be01d1b85e701bd68714ad646b32cdd6b6906" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9666a2a0f5ab4284c9d9cea0e9e5d717823bfbe1769d4c09b8d806c8bf3b7de" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "git-annex" + depends_on "p7zip" + depends_on "python@3.13" + + 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/7f/03/581b1c29d88fffaa08abbced2e628c34dd92d32f1adaed7e42fc416938b0/argcomplete-3.5.2.tar.gz" + sha256 "23146ed7ac4403b70bd6026402468942ceba34a6732255b9edf5b7354f68a6bb" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/d9/a5/8e610a7c230326b6a766758ce290233a8d0ec88bef4f5afe09e2313d2def/boto3-1.35.81.tar.gz" + sha256 "d2e95fa06f095b8e0c545dd678c6269d253809b2997c30f5ce8a956c410b4e86" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/3d/a8/b44d94c14ee4eb13db6dc549269c79199b43bddd70982e192aefd6ca6279/botocore-1.35.81.tar.gz" + sha256 "564c2478e50179e0b766e6a87e5e0cdd35e1bc37eb375c1cf15511f5dd13600d" + 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/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + 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 "humanize" do + url "https://files.pythonhosted.org/packages/6a/40/64a912b9330786df25e58127194d4a5a7441f818b400b155e748a270f924/humanize-4.11.0.tar.gz" + sha256 "e66f36020a2d5a974c504bd2555cf770621dbdbb6d82f94a6857c0b1ea2608be" + 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 "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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/d6/f4/154cf374c2daf2020e05c3c6a03c91348d59b23c5366e968feb198306fdf/jeepney-0.8.0.tar.gz" + sha256 "5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806" + 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/f6/24/64447b13df6a0e2797b586dad715766d756c932ce8ace7f67bd384d76ae0/keyring-25.5.0.tar.gz" + sha256 "4c753b3ec91717fe713c4edd522d625889d8973a349b0e582622f49766de58e6" + 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/51/78/65922308c4248e0eb08ebcbe67c95d48615cc6f27854b6f2e57143e9178f/more-itertools-10.5.0.tar.gz" + sha256 "5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "patool" do + url "https://files.pythonhosted.org/packages/64/da/02cbec351bc37b65a799f69161bb748603d41293c0efde1fb7fe0cb40325/patool-3.1.0.tar.gz" + sha256 "417ed1ff7b9c979ce8a10114ed9bc280b08e3af3df3072e761303a3e00aaba04" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + 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-gitlab" do + url "https://files.pythonhosted.org/packages/f6/44/a687ca1d79d3c4c52cc0529859eb2803f5a80612d0598c82798f1056e24b/python_gitlab-5.1.0.tar.gz" + sha256 "d5a10dae8328f32fb9214bd3f9dc199b4930cd496f81c9be42a0f8ff338aeb35" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/c0/0a/1cdbabf9edd0ea7747efdf6c9ab4e7061b085aa7f9bfc36bb1601563b069/s3transfer-0.10.4.tar.gz" + sha256 "29edc09801743c21eb5ecbc617a152df41d3c287f67b615f73e5f750583666a7" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz" + sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77" + 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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + without = %w[python-dateutil requests] + venv = virtualenv_install_with_resources(without:) + + # Fix compatability with setuptools 72+: https://github.com/dateutil/dateutil/pull/1376 + without.each do |r| + resource(r).stage do + inreplace "setup.py", "from setuptools.command.test import test as TestCommand", + "TestCommand = object" + venv.pip_install Pathname.pwd + end + end + + 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..2a70b980ee01c --- /dev/null +++ b/Formula/d/datamash.rb @@ -0,0 +1,35 @@ +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.9.tar.gz" + mirror "https://ftpmirror.gnu.org/datamash/datamash-1.9.tar.gz" + sha256 "f382ebda03650dd679161f758f9c0a6cc9293213438d4a77a8eda325aacb87d2" + license "GPL-3.0-or-later" + + bottle do + 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..0b3a52268f21d --- /dev/null +++ b/Formula/d/datasette.rb @@ -0,0 +1,165 @@ +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 + sha256 cellar: :any, arm64_sequoia: "9f65f9736edf713f241072bca204d7e5723857dfb119c5c1266361815ed9b604" + sha256 cellar: :any, arm64_sonoma: "03efc5c4fafe4358b3cf399e3d6d9d887d97307b87826739813eb5e168194894" + sha256 cellar: :any, arm64_ventura: "5de8c52f155dd5f33f7a1aff42942bac393a29876e326b3dca05c2437ec311df" + sha256 cellar: :any, sonoma: "9e0c935cab57607f2454dea1ca0718d12dc46eca93f0089c5f6c3de5ef40b911" + sha256 cellar: :any, ventura: "480a2aa22129db6b00bfdb54740cf35142938e7cf4a839913038ae541776d94a" + sha256 cellar: :any_skip_relocation, arm64_linux: "234642d734a55112c10aaee4e372886055fbc529b793cbe406c13785f4f092bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "54d23ce2aeb1362d1cd9d3fc7ccf0993d191adf9978ebe13452c7ab3370f8e1a" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "aiofiles" do + url "https://files.pythonhosted.org/packages/0b/03/a88171e277e8caa88a4c77808c20ebb04ba74cc4681bf1e9416c862de237/aiofiles-24.1.0.tar.gz" + sha256 "22a075c9e5a3810f0c2e48f3008c94d68c65d763b9b03857924c99e57355166c" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + 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/29/38/b3395cc9ad1b56d2ddac9970bc8f4141312dbaec28bc7c218b0dfafd0f42/asgiref-3.8.1.tar.gz" + sha256 "c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/bb/71/b6365e6325b3290e14957b2c3a804a529968c77a049b2ed40c095f749707/setuptools-79.0.1.tar.gz" + sha256 "128ce7b8f33c3079fd1b067ecbb4051a66e8526e7b65f6cec075dfc650ddfa88" + 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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/a6/ae/9bbb19b9e1c450cf9ecaef06463e40234d98d95bf572fab11b4f19ae5ded/uvicorn-0.34.2.tar.gz" + sha256 "0e929828f6186353a80b58ea719861d2629d766293b6d19baf086ba31d4f3328" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"datasette", shells: [:fish, :zsh], 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..aa5d70e3abc91 --- /dev/null +++ b/Formula/d/datetime-fortran.rb @@ -0,0 +1,45 @@ +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" + + bottle do + rebuild 1 + 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..792754b00c7d0 --- /dev/null +++ b/Formula/d/dateutils.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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..b72a95ab48280 --- /dev/null +++ b/Formula/d/dav1d.rb @@ -0,0 +1,43 @@ +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.1/dav1d-1.5.1.tar.bz2" + sha256 "4eddffd108f098e307b93c9da57b6125224dc5877b1b3d157b31be6ae8f1f093" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2cfb486c742fb8c46159b99a193f3c1ae221e7d460df6a01a0daf1bb33de0bb8" + sha256 cellar: :any, arm64_sonoma: "1c9d516532c87c8a065e4d98750a3a2d187c1f89f4ddb569315a61055e7ada5d" + sha256 cellar: :any, arm64_ventura: "554aac9fa65b6d94e721c59a4974182d1d77e5be4ebc31f1408ec1e3fe460ae2" + sha256 cellar: :any, sonoma: "0eab150c56858a839a017d529f909abbd7c83092a8815d21e51787e060e79b4f" + sha256 cellar: :any, ventura: "d92bf92c696541ec5e5455329f4deb851098ee60203067992b5b28e40e375446" + sha256 cellar: :any_skip_relocation, arm64_linux: "15ef0f5a59a18f57a8af1f2b50d5fda7c85ccb47e9d7b8040a6315d73d7f90f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a75a20ce3d5e586d5778c2a0a324175833352e2cc66ce2eff796dfec55fc867e" + 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..a0c49cb80248c --- /dev/null +++ b/Formula/d/davix.rb @@ -0,0 +1,48 @@ +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" + + bottle do + 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 + args = std_cmake_args + %W[ + -DEMBEDDED_LIBCURL=FALSE + -DCMAKE_INSTALL_RPATH=#{rpath} + -DLIB_SUFFIX= + -DBENCH_TESTS=FALSE + -DDAVIX_TESTS=FALSE + ] + + system "cmake", "-S", ".", "-B", "build", *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..ef2fef1669901 --- /dev/null +++ b/Formula/d/davmail.rb @@ -0,0 +1,68 @@ +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.3.0/davmail-6.3.0-3627.zip" + version "6.3.0" + sha256 "621eb5647b04305e927212c4c81577ad123ba49fdbbd1d8ae06f14ea3acf6b70" + 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 + + bottle do + sha256 cellar: :any_skip_relocation, all: "c48497283b8ffca924a12cbaa5227d0653b3c37990540eeb01593cf7fa7b93fa" + 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..fa0a25e53313f --- /dev/null +++ b/Formula/d/db-vcs.rb @@ -0,0 +1,23 @@ +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" + + 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..e932247ce6f01 --- /dev/null +++ b/Formula/d/dbacl.rb @@ -0,0 +1,74 @@ +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" + + bottle do + 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, mojave: "8a64ac80e91d8d5b2366046096098b851d503c58af65ef0858834c5794d039a5" + sha256 cellar: :any_skip_relocation, high_sierra: "42c1c03e8df0b4db91dc99ace3ec87f3901f1aa6975430d597240ab5f9182c1f" + sha256 cellar: :any_skip_relocation, sierra: "c6e6d74e2f2a86325ee895f8ef6893d99e1463d0018ead0d0da46e0dfd95c272" + sha256 cellar: :any_skip_relocation, el_capitan: "750c29761c5784ddbd0d46643f2d462d8b22c14822773e2366db01be17a3e310" + 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/dbdeployer.rb b/Formula/d/dbdeployer.rb new file mode 100644 index 0000000000000..989b9150982e8 --- /dev/null +++ b/Formula/d/dbdeployer.rb @@ -0,0 +1,35 @@ +class Dbdeployer < Formula + desc "Tool to deploy sandboxed MySQL database servers" + homepage "https://github.com/datacharmer/dbdeployer" + url "https://github.com/datacharmer/dbdeployer/archive/refs/tags/v1.73.0.tar.gz" + sha256 "c360b5118c3cfac724aebe107ed03b9af09b201dc189ae735589a7a3d75fcf7e" + license "Apache-2.0" + head "https://github.com/datacharmer/dbdeployer.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bf76138da81b0cf596eef9743794f933c0d086f034c2589148c2a89bbb8a8acb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5b23f66521f0f730865d23d9305990ba11807eb1d539ba90394bbb4f282bcdf7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5b23f66521f0f730865d23d9305990ba11807eb1d539ba90394bbb4f282bcdf7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5b23f66521f0f730865d23d9305990ba11807eb1d539ba90394bbb4f282bcdf7" + sha256 cellar: :any_skip_relocation, sonoma: "45f9bda916bf3da1b367b5580283841e9f46799fda8e01aed128a2e264ec3f64" + sha256 cellar: :any_skip_relocation, ventura: "4891e7e65214adfbbc5543737281be8bfda669964f8dd2bab40794adce9f4bfa" + sha256 cellar: :any_skip_relocation, monterey: "4891e7e65214adfbbc5543737281be8bfda669964f8dd2bab40794adce9f4bfa" + sha256 cellar: :any_skip_relocation, big_sur: "4891e7e65214adfbbc5543737281be8bfda669964f8dd2bab40794adce9f4bfa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "920be82872a3ea62308092a58e929eef0bf95c54027e772acfe7c23425a971f0" + end + + disable! date: "2024-09-09", because: :repo_archived + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + bash_completion.install "docs/dbdeployer_completion.sh" + end + + test do + shell_output("#{bin}/dbdeployer init --skip-shell-completion --skip-tarball-download") + assert_path_exists testpath/"opt/mysql" + assert_path_exists testpath/"sandboxes" + end +end diff --git a/Formula/d/dbg-macro.rb b/Formula/d/dbg-macro.rb new file mode 100644 index 0000000000000..0405ac2b580aa --- /dev/null +++ b/Formula/d/dbg-macro.rb @@ -0,0 +1,36 @@ +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" + + 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..b14d6d7379c1e --- /dev/null +++ b/Formula/d/dbhash.rb @@ -0,0 +1,43 @@ +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-3490200.zip" + version "3.49.2" + sha256 "c3101978244669a43bc09f44fa21e47a4e25cdf440f1829e9eff176b9a477862" + license "blessing" + + livecheck do + formula "sqlite" + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_sequoia: "ae28f827d09d908f3da16c9b1a12433426a97dc60d0ac81c1911889ac927be36" + sha256 cellar: :any, arm64_sonoma: "2ace67ff9b9fb828fea069f75e3f145f34a75812064d5a2d4f2cab8f207645de" + sha256 cellar: :any, arm64_ventura: "87ba3e3253e6cc53ee7e85080ec87479ca03ab731f7016e9078678791299bd51" + sha256 cellar: :any, sequoia: "2c287f8b1f91100678360da7d0bcaf3104184abfa988a4f14898d0d46b0c49ed" + sha256 cellar: :any, sonoma: "1d86fbd5e946a7350314e97f83d11391b6fda2057847e6becde9e2794781eabd" + sha256 cellar: :any, ventura: "3cc8606a4715a6fe538c30e706f3ed3623abc9e717d5de82e1798cd85bcc474c" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8230ee5aafbb5843b8b18bd00eedf66192bd21cc0c52eaca7ea5204417b5641" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c1b5ebde8a417626e5e7c5be1f91779587fa3e59f19b5fdd521a6c76be838a4" + 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..cdf0e2a5feb9e --- /dev/null +++ b/Formula/d/dblab.rb @@ -0,0 +1,33 @@ +class Dblab < Formula + desc "Database client every command-line junkie deserves" + homepage "https://dblab.danvergara.com/" + url "https://github.com/danvergara/dblab/archive/refs/tags/v0.32.0.tar.gz" + sha256 "58a71569c38dc6c331d30b9f9b71f99ae432e53f90f014192b45458afded5f4b" + license "MIT" + head "https://github.com/danvergara/dblab.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "735d628a3dc975dc2f525145876b79dd4dd9e7d835d80ffccd923b24cdb8d15c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "30f3149d9776e4690fb09bb3f42af66a1ab0844d85c274ea6a6be46558ef1399" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f8a73ee218e987738ec29c9deb767f7aa62a2b19b24101720c46db371a26ffb7" + sha256 cellar: :any_skip_relocation, sonoma: "b1e0e062bfe7c3164d9d6f0595c8110987deb52aa2fb95b92919233e7b6045ea" + sha256 cellar: :any_skip_relocation, ventura: "bd93f849d46873f36294087cb895133a07104019d32b0fa25d6d08b049d19fa8" + sha256 cellar: :any_skip_relocation, arm64_linux: "8bda69c0a881bb4fb054602419d21fd46dc6db6882ffbb39bdd42d0976a95c61" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7981c8c364d80f302664ed406b0c1da7a2fe40aa243f18ac8d4fca432475a90b" + 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..954e1e9a3b4e6 --- /dev/null +++ b/Formula/d/dbmate.rb @@ -0,0 +1,33 @@ +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.27.0.tar.gz" + sha256 "d45c3706b46e3a34f229329258eed09724ddb20da685eb3d62565b9c5fa0be3d" + license "MIT" + head "https://github.com/amacneil/dbmate.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c072c757e73fcb6407671cce10cad20dc8c9c936e2705d260a0885b35f0f3411" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc88071e93cd4dd7a7b4f07424e03b0b8b368f82afbb9cb3f4a1286241577e7b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "18c2df5545216821ece971f39558a2d2ba05b87b02ce48ba909a82d2a8e4fcc5" + sha256 cellar: :any_skip_relocation, sonoma: "3472015348afb4585a7541c299901792adf5f5c10ae18e50d660539261e1be31" + sha256 cellar: :any_skip_relocation, ventura: "e117fd0a6404774a1a9b432d054466db74226d5fe53e1669ca040f1c0163984d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d470c2496872f75b74a19909a632b5a004505dcc3e35673e1ac7b31d4cf26240" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef8f6bb9684382a30b23a8e851b88fd28e614d425ad3b682b49d5a0225590388" + 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..a7b7240844e75 --- /dev/null +++ b/Formula/d/dbml-cli.rb @@ -0,0 +1,48 @@ +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-3.13.5.tgz" + sha256 "d981fa4e82ce33b140f1efa2e057f12dca83d25774b58dc5ed2ed92fb9ba2569" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cbb40548dd4f2155051c5ca300e1edc8cf5aeb254b032233fe20afd34eb2eee8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cbb40548dd4f2155051c5ca300e1edc8cf5aeb254b032233fe20afd34eb2eee8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cbb40548dd4f2155051c5ca300e1edc8cf5aeb254b032233fe20afd34eb2eee8" + sha256 cellar: :any_skip_relocation, sonoma: "f48ac3665d9f77e9886340a6723f2f1ab4a274b8023cb7998e3e6a3f7f6d8de8" + sha256 cellar: :any_skip_relocation, ventura: "f48ac3665d9f77e9886340a6723f2f1ab4a274b8023cb7998e3e6a3f7f6d8de8" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbb40548dd4f2155051c5ca300e1edc8cf5aeb254b032233fe20afd34eb2eee8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cbb40548dd4f2155051c5ca300e1edc8cf5aeb254b032233fe20afd34eb2eee8" + 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..e8fbc3ec3b3c0 --- /dev/null +++ b/Formula/d/dbus-glib.rb @@ -0,0 +1,44 @@ +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_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..4a2be90a86617 --- /dev/null +++ b/Formula/d/dbus.rb @@ -0,0 +1,90 @@ +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"] + head "https://gitlab.freedesktop.org/dbus/dbus.git", branch: "master" + + livecheck do + url "https://dbus.freedesktop.org/releases/dbus/" + regex(/href=.*?dbus[._-]v?(\d+\.\d*?[02468](?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "b03c304cbecc18a7fd132a24aac4ae0245a731b72ea7ce819353397cd0e05b2c" + sha256 arm64_sonoma: "540c1301f304a5da43ba2f1af7cff5ae6bbac3b28169f59d76741ec8105ea1ee" + sha256 arm64_ventura: "55db2782d19df3356835e0f71b1edff1c9aad20084df237154760f7f73e21d0a" + sha256 sonoma: "cc14d4e58379b1c86bf51ce3ccb4a56ddf0808de29483cce83f5190c3dc0509b" + sha256 ventura: "a1e1ee9afdc8c822751f93d7513e08681546f851bc1df5a815841c881621605e" + sha256 arm64_linux: "b255e2237e533be133b8b637b8bc8425f754ba7a23bcdcf71a3634c5d4d79b4c" + sha256 x86_64_linux: "32d15b5c8ddfdbd62a0a232aed447ebc0311ab3812d6f08c6fde4af08dcb3af3" + 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" + + 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=#{lib}/Library/LaunchAgents" if OS.mac? + + # 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" + 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 load #{name} at startup, activate the included Launch Daemon: + + sudo cp #{lib}/Library/LaunchDaemons/org.freedesktop.dbus-session.plist /Library/LaunchDaemons + sudo chmod 644 /Library/LaunchDaemons/org.freedesktop.dbus-session.plist + sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-session.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.freedesktop.dbus-session.plist + sudo rm /Library/LaunchDaemons/org.freedesktop.dbus-session.plist + EOS + end + end + + service do + name macos: "org.freedesktop.dbus-session" + end + + test do + system bin/"dbus-daemon", "--version" + end +end diff --git a/Formula/d/dbxml.rb b/Formula/d/dbxml.rb new file mode 100644 index 0000000000000..4b9b7d0b0d063 --- /dev/null +++ b/Formula/d/dbxml.rb @@ -0,0 +1,80 @@ +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 + + bottle do + 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/formula-patches/4d337833ef2e10c1f06a72170f22b1cafe2b6a78/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..d8efab2613f03 --- /dev/null +++ b/Formula/d/dc3dd.rb @@ -0,0 +1,69 @@ +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" + + bottle do + 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 + + # 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..dd04d31163559 --- /dev/null +++ b/Formula/d/dcadec.rb @@ -0,0 +1,49 @@ +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, mojave: "68b350a3ec6a1ab7384eac3341a03762e8233dec742c35f8dc2afc213b3db567" + sha256 cellar: :any_skip_relocation, high_sierra: "7f938bcd68b9078df3dc6e67d82e08beb55b10228a808d91543a6ed2d15a2002" + sha256 cellar: :any_skip_relocation, sierra: "7a51fb1bfa07f08c45176df419087429e9ffce945cbcd28d71e403c456762c74" + sha256 cellar: :any_skip_relocation, el_capitan: "89ddc5e9a5cfd72e604bdff54ee1f09f9ad4ec281fc79c93201971bbd380ccdd" + 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 + + conflicts_with "libdca", because: "both install `dcadec` binaries" + + resource "homebrew-testdata" 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", "PREFIX=#{prefix}", "install" + end + + test do + 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..14eebb0b00149 --- /dev/null +++ b/Formula/d/dcd.rb @@ -0,0 +1,54 @@ +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_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, x86_64_linux: "658abefb0b260e852fb16078e353b453929f6f04fa8af8f636ed2d5e2aa89fca" + end + + on_macos do + depends_on "ldc" => :build + end + + on_linux do + depends_on "dmd" => :build + end + + def install + target = OS.mac? ? "ldc" : "dmd" + ENV.append "DFLAGS", "-fPIC" if OS.linux? + system "make", target + 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..be70d6ebed33a --- /dev/null +++ b/Formula/d/dcfldd.rb @@ -0,0 +1,31 @@ +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.2.tar.gz" + sha256 "52468122e915273eaffde94cb0b962adaefe260b8af74e98e1282e2177f01194" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e637feaefa3854ecdd910334ae5da97d68614e8e29a369fa93f6aaab9329a173" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1fb762dc8ff64b3829c069c5d65b33af13b1f0610bcdcaa8d6fa2de18d6e28dc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "209e4325ac641238a6be2c411e9d964a0f4efbb87cf5b69ffcfdd0efbf7ef523" + sha256 cellar: :any_skip_relocation, sonoma: "a0ab38a209df9b31c0f6a4a9212fa29f42569a47337046bef83c2e91121b3e23" + sha256 cellar: :any_skip_relocation, ventura: "3a087faea51f503a26ec7376b5955be58489380439b83ef554ab8c3be8669529" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c400bc4961787061faada1c125e0dc6c5e2fe8f0ba1604f4e87d591489ce5b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74daa691d054382c0173e9d0942a6ab7a91ce53a1f222c6297c2b9849a1d38b8" + 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..e839aec639262 --- /dev/null +++ b/Formula/d/dcled.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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, mojave: "4b94dd5ba218e3bdb0a10767d0ae62205495130baa839db4be4ab29d6561e5e2" + sha256 cellar: :any, high_sierra: "91cf7fa30d905efaf7499f0667c65e25ddb69d82be3f52b93d1df6a400fd7141" + sha256 cellar: :any, sierra: "bfc1532d76b4d37c706d065bc98feb5a3aeff20751a713d7b7efb08c0976fe9e" + sha256 cellar: :any, el_capitan: "53d07c9548eaeba12645e944ce92c27a02667758176815220dc4ee2a8945c661" + 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..eeb881f68c267 --- /dev/null +++ b/Formula/d/dcm2niix.rb @@ -0,0 +1,44 @@ +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.20241211.tar.gz" + sha256 "3c7643ac6a1cd9517209eb06f430ad5e2b39583e6a35364f015e5ec3380f9ee2" + 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 cellar: :any_skip_relocation, arm64_sequoia: "4f0b06a5b2894702dc46bc9f7de01dffc4287da7a94b1a586c2113d872b85c54" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b89aa18f86588bff4689bb3592493b2c299df30338cc8cc1ceefb2bc085be2d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2f848dbc3fcc8eb421c5a32fa0c159afe1601cf7111f95bb6cda721bd9e12d25" + sha256 cellar: :any_skip_relocation, sonoma: "0c716538917b7ab79080a7b64647e2e7fb1312b6a622e3882c8ff084c944d70d" + sha256 cellar: :any_skip_relocation, ventura: "f30ff1f7cdba4bbee0e9dbc71cd8097c5f758a1d037de1e518281c4b8183223c" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a10cbb413a652bd211a3bbc66ba8bbc002c4527b75a62537bd10d1797443563" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13baad586219be6dd44afd6992c7cf33bacd2b51abdb819a713ed3a0658b7df3" + 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..9502a8c79b3e2 --- /dev/null +++ b/Formula/d/dcmtk.rb @@ -0,0 +1,56 @@ +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 + + bottle do + 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..e1078cde32648 --- /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, mojave: "759770809a74366f84721771b18702a3d27c9e6aa9099f25895200462df17ab8" + 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 + + 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..53ac4faa7f853 --- /dev/null +++ b/Formula/d/dcp.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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..9871392e25abb --- /dev/null +++ b/Formula/d/dcraw.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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..b4bda97aa7130 --- /dev/null +++ b/Formula/d/ddate.rb @@ -0,0 +1,38 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "bac9bcfe773de4c34915a353fe6f8808ac26f8253d0da9d43ab9787b4988ff44" + sha256 cellar: :any_skip_relocation, high_sierra: "31a72f135768fdf09ddc40539e3860e3489cf478cca07f6af71d8d3428447a78" + sha256 cellar: :any_skip_relocation, sierra: "61be1f5fc044574ede464807fba1e092bc165932a909a357f5cd71b0cbfd4726" + sha256 cellar: :any_skip_relocation, el_capitan: "fe87fe60ad1e8cbff1ebbcefd8be0f6f8ec87013a91e6385adbde0aebd45edea" + 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..4fe94882e0b95 --- /dev/null +++ b/Formula/d/ddcctl.rb @@ -0,0 +1,32 @@ +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" + + bottle do + 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..dc1659c96108b --- /dev/null +++ b/Formula/d/ddclient.rb @@ -0,0 +1,119 @@ +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: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + 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..e1d6ad56daf48 --- /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.0.tar.gz" + sha256 "ed0c79f1c58269f491b8dca171d492b9fef133427370e1ba5058966b92b9552e" + 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: "6863cc924117633302ef9bf12a27b6ed79ebb51924c43c38f6da3d0c390d3ef3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93319d406a42b944595117a18cef379c71b19f09fe166b6af3c49b5b4bacf322" + 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..ee24ad2c34131 --- /dev/null +++ b/Formula/d/ddd.rb @@ -0,0 +1,90 @@ +class Ddd < Formula + desc "Graphical front-end for command-line debuggers" + homepage "https://www.gnu.org/software/ddd/" + url "https://ftp.gnu.org/gnu/ddd/ddd-3.4.1.tar.gz" + mirror "https://ftpmirror.gnu.org/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 + ] + + bottle do + 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..b9d0b9c586377 --- /dev/null +++ b/Formula/d/ddgr.rb @@ -0,0 +1,29 @@ +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" + + 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..a30d7b0641bfb --- /dev/null +++ b/Formula/d/ddh.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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..2294967ce5534 --- /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.9.2.tar.gz" + sha256 "a7023da2082182df5cf5547601048e7624cf13c988068697ff07ddcd3dfa5e60" + license "MIT" + head "https://github.com/jeessy2/ddns-go.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fc24e60f6bf8ba052d5016b91a1a2fd641109533abc6675981768bcc3fc94eae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fc24e60f6bf8ba052d5016b91a1a2fd641109533abc6675981768bcc3fc94eae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fc24e60f6bf8ba052d5016b91a1a2fd641109533abc6675981768bcc3fc94eae" + sha256 cellar: :any_skip_relocation, sonoma: "ff9b6a366a6941c647d53b0ceff396013255716f4274471eb3c3fd4bd6ff326f" + sha256 cellar: :any_skip_relocation, ventura: "ff9b6a366a6941c647d53b0ceff396013255716f4274471eb3c3fd4bd6ff326f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af465f7c258449f1ae6c65227a87977cbc67218e12d0ace1ff1bfb49adb09430" + 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..cb26a0be00cb8 --- /dev/null +++ b/Formula/d/ddrescue.rb @@ -0,0 +1,28 @@ +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.29.1.tar.lz" + mirror "https://ftpmirror.gnu.org/ddrescue/ddrescue-1.29.1.tar.lz" + sha256 "ddd7d45df026807835a2ec6ab9c365df2ef19e8de1a50ffe6886cd391e04dd75" + license "GPL-2.0-or-later" + + bottle do + 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..641f90826104c --- /dev/null +++ b/Formula/d/deadfinder.rb @@ -0,0 +1,52 @@ +class Deadfinder < Formula + desc "Finds broken links" + homepage "https://rubygems.org/gems/deadfinder" + url "https://github.com/hahwul/deadfinder/archive/refs/tags/1.7.1.tar.gz" + sha256 "fa9f8843b3c793a21b8c3c4c9623f15691c7ef94b8ce9d174d4b8cac7c13b8bd" + license "MIT" + head "https://github.com/hahwul/deadfinder.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "13018df0825a8907536fd51b444abffff1a403cb75a66541784068e344380294" + sha256 cellar: :any, arm64_sonoma: "9aa9af3b905a49df8df5198a2c33af78c40d4dbe27172603ddf1cd6e13a968a0" + sha256 cellar: :any, arm64_ventura: "ee48dded63f24b5db5eeb0b4e987f25873bb02a153b03421f799a0156431ca8f" + sha256 cellar: :any, sonoma: "52e2c68ca58d7333c8a18dc1b98c6559d0b473df83f719b6a433ca47110888ba" + sha256 cellar: :any, ventura: "218b0148f9ae522dd3ce3690921aafc420563ddb99681b32c231f2a0e63a2835" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2b9b260c9b5e8c7e0618087c8e232513b46af93a5ffb9162a7b8e5a3097280a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0f03ee2a1dd8fc7872d43948f024a6096fa5957e02d4f29655f9e3a0adc3289" + end + + depends_on "ruby" + + uses_from_macos "libffi" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "xz" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + end + + def install + ENV["GEM_HOME"] = libexec + ENV["NOKOGIRI_USE_SYSTEM_LIBRARIES"] = "1" + + 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"]) + + # 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..a9e34c5b4a89e --- /dev/null +++ b/Formula/d/deark.rb @@ -0,0 +1,38 @@ +class Deark < Formula + desc "File conversion utility for older formats" + homepage "https://entropymine.com/deark/" + url "https://entropymine.com/deark/releases/deark-1.7.0.tar.gz" + sha256 "7c3752c2c783cd6c4e22e527f1d72dbee9166883a156d25fbf98f73a8c44c8be" + 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_sequoia: "3f187e7332d8e5a0aa5e37bcd92428e3a67540169a447787e07105d91bded171" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8e0614b471960c3050b12098c9815a29da5238b8406bc72ddad21274f7bccd55" + sha256 cellar: :any_skip_relocation, arm64_ventura: "868b2f7a23d545977e5b68c3b7acb4e33ac1c9fe9a391d470c592799b5a5c6eb" + sha256 cellar: :any_skip_relocation, sonoma: "9a568c638ba0e2e84a40a82b9cdcd0fee3442b3da5e05f5b20677a785e515e55" + sha256 cellar: :any_skip_relocation, ventura: "b2914225b7ad22c0ccb2022c3a49431d8eee99c73882effe2200bbbfbbe2a3ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "e993400488b4e8f3c36e0c84dcfc8affcf27edf212790004d66e3bf36ee7df9d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b00c25bc3f03a626a34e87c61993656345229bac72768bbe7503d5ec8ab7b5a7" + 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..f8f7efbf63820 --- /dev/null +++ b/Formula/d/debianutils.rb @@ -0,0 +1,46 @@ +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.22.tar.xz" + sha256 "043569241cdd893cc45e00f917c94c123d0c24143895d91c4d08c6c567e35155" + 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_sequoia: "6b424a595625fd72f16ca4a64a6b3c76628eb368b4caf3d46f3fd3ed679a0b85" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "beb55c1b5ff723041ecb4b4547217f64b9333a0a588a7578238a33fbff45c193" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f44d04b0b597f2da95967a4b2be1e106f111357a558b5661ef3bf8b89abca6f6" + sha256 cellar: :any_skip_relocation, sonoma: "5de2cda2b72681b31d1bead67e307bae581f67f9045389edeb2e0cf064ac6895" + sha256 cellar: :any_skip_relocation, ventura: "dfdbd0132eff2547406593c94239b74011d3a9c614123435e62fe437a382f0d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "d13d8bded021ec8694b6d1921d142c1b26745e9d3dda9a512441d01db8833199" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df8cd2bb8e760398a01c3fc5e25eef69a37193ab063fd32d95a7f99f989f2b32" + 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..fda004644ce8b --- /dev/null +++ b/Formula/d/debugbreak.rb @@ -0,0 +1,30 @@ +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" + + 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("https://github.com/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..c5dc210f73344 --- /dev/null +++ b/Formula/d/decasify.rb @@ -0,0 +1,43 @@ +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_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/decompose.rb b/Formula/d/decompose.rb new file mode 100644 index 0000000000000..a8140acb3e343 --- /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.3.tar.gz" + sha256 "802a1d155df0bea896483da4162ae555d7e1e1d5e293ec8201508914314eb36b" + license "MIT" + head "https://github.com/s0rg/decompose.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1a6ac95d556532dcdb8ccb6bee22c93941e70d472d6fe2e2a04aee692e69fd12" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1a6ac95d556532dcdb8ccb6bee22c93941e70d472d6fe2e2a04aee692e69fd12" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1a6ac95d556532dcdb8ccb6bee22c93941e70d472d6fe2e2a04aee692e69fd12" + sha256 cellar: :any_skip_relocation, sonoma: "04959a2108da5a70a89780f02cc5691c39aa163d69921507743c56407b0353ac" + sha256 cellar: :any_skip_relocation, ventura: "04959a2108da5a70a89780f02cc5691c39aa163d69921507743c56407b0353ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1de0150f4dcf6163ee980363062881828b21085f5a44f38a1a14fad124a986d" + 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..6a7446c9a05f9 --- /dev/null +++ b/Formula/d/defaultbrowser.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "3a02a1fd0321f5070fa4ec9088a4a58a28ddb561bef5b94a0ccc31fdb896efa6" + sha256 cellar: :any_skip_relocation, high_sierra: "d07cc35e06f440584d698cde7ae5f27b09acfeafacc1499d331aa8553e945961" + sha256 cellar: :any_skip_relocation, sierra: "d0279f8c05c0c7828c534517897346fc231864ea8534f0ae04878ecfd51ca72d" + sha256 cellar: :any_skip_relocation, el_capitan: "f0ccf84abbd31469f80c4d232292dd280a978d3f04a1a6db46079902d9821d1e" + 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..4b4dbb9ea3a8b --- /dev/null +++ b/Formula/d/define.rb @@ -0,0 +1,35 @@ +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: "master" + + bottle do + 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, 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..c8ee403f74078 --- /dev/null +++ b/Formula/d/deheader.rb @@ -0,0 +1,46 @@ +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" + + livecheck do + url :homepage + regex(/href=.*?deheader[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + 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..ee6a33bdba63a --- /dev/null +++ b/Formula/d/dehydrated.rb @@ -0,0 +1,31 @@ +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.1.tar.gz" + sha256 "3d993237af5abd4ee83100458867454ed119e41fac72b3d2bce9efc60d4dff32" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "23a0b86ce9fd4da089669866a366e1adf806899e472465005c3c998af304c588" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b4325b8a1902d492ba021b0889fb5a91b59a26899569cc351be4a4a52e3d4f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f17795e23bdd54c28ee3b776ca2a23961d82ad07dd28b9d5081ae8edb2dae79c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f17795e23bdd54c28ee3b776ca2a23961d82ad07dd28b9d5081ae8edb2dae79c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f17795e23bdd54c28ee3b776ca2a23961d82ad07dd28b9d5081ae8edb2dae79c" + sha256 cellar: :any_skip_relocation, sonoma: "3fc1267b8ea7543354b58440605dcafee455c6196943e324bf049c836445f970" + sha256 cellar: :any_skip_relocation, ventura: "ebef64bfbbb961baab69a546da164867b6d3d0acc2090b6f0a8d9d1b2e6ac26b" + sha256 cellar: :any_skip_relocation, monterey: "ebef64bfbbb961baab69a546da164867b6d3d0acc2090b6f0a8d9d1b2e6ac26b" + sha256 cellar: :any_skip_relocation, big_sur: "ebef64bfbbb961baab69a546da164867b6d3d0acc2090b6f0a8d9d1b2e6ac26b" + sha256 cellar: :any_skip_relocation, catalina: "ebef64bfbbb961baab69a546da164867b6d3d0acc2090b6f0a8d9d1b2e6ac26b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b14de5fec3d694a0dd73d0a8a87bb1f6b0878c64c17b70658b986fcdc55d2f56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f17795e23bdd54c28ee3b776ca2a23961d82ad07dd28b9d5081ae8edb2dae79c" + end + + def install + bin.install "dehydrated" + man1.install "docs/man/dehydrated.1" + 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..2d0c73fc01dee --- /dev/null +++ b/Formula/d/deja-gnu.rb @@ -0,0 +1,45 @@ +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.3.tar.gz" + mirror "https://ftpmirror.gnu.org/dejagnu/dejagnu-1.6.3.tar.gz" + sha256 "87daefacd7958b4a69f88c6856dbd1634261963c414079d0c371f589cd66a2e3" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "267d87a1d746750a3797ad46513431e790f9a454c3d6d6d46e0e6b8cdb644702" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ada72df0280151e894c2d132b423a69cce43ffd27de25cf94439f78aa4df4da3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aae2cc17f126ef380eadd7d9a4909320f38d3b62c5722a2f9a777090cfe61720" + sha256 cellar: :any_skip_relocation, arm64_monterey: "aae2cc17f126ef380eadd7d9a4909320f38d3b62c5722a2f9a777090cfe61720" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "aae2cc17f126ef380eadd7d9a4909320f38d3b62c5722a2f9a777090cfe61720" + sha256 cellar: :any_skip_relocation, sonoma: "70be5d53c34797017fc00015b5a5e65354ce22b49aefd63bc4c8066080a0ca93" + sha256 cellar: :any_skip_relocation, ventura: "0369e312459148a10582a3d6f100167b44a80cfec0f03223099ecdaab7097551" + sha256 cellar: :any_skip_relocation, monterey: "0369e312459148a10582a3d6f100167b44a80cfec0f03223099ecdaab7097551" + sha256 cellar: :any_skip_relocation, big_sur: "0369e312459148a10582a3d6f100167b44a80cfec0f03223099ecdaab7097551" + sha256 cellar: :any_skip_relocation, catalina: "0369e312459148a10582a3d6f100167b44a80cfec0f03223099ecdaab7097551" + sha256 cellar: :any_skip_relocation, mojave: "0369e312459148a10582a3d6f100167b44a80cfec0f03223099ecdaab7097551" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a8436b1bf51478fe6b8d544127c22d7e27014c12b3a7c2a75923d8334f08ec6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aae2cc17f126ef380eadd7d9a4909320f38d3b62c5722a2f9a777090cfe61720" + 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..39008671c37a6 --- /dev/null +++ b/Formula/d/delve.rb @@ -0,0 +1,29 @@ +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.24.2.tar.gz" + sha256 "c26cce64c4cbef25b7652708cda198e9c081ea3abfbe411ed8048e131dba6275" + license "MIT" + head "https://github.com/go-delve/delve.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a13bd7c4078234dded9ffbef666bfcb4e809711c6a01503b923becffe9aa6601" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a13bd7c4078234dded9ffbef666bfcb4e809711c6a01503b923becffe9aa6601" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a13bd7c4078234dded9ffbef666bfcb4e809711c6a01503b923becffe9aa6601" + sha256 cellar: :any_skip_relocation, sonoma: "c4c37c81f6785a6c4584e4fb038a5d67dff0afd079bc6a49c08564bc212ac76e" + sha256 cellar: :any_skip_relocation, ventura: "c4c37c81f6785a6c4584e4fb038a5d67dff0afd079bc6a49c08564bc212ac76e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3516b907362af6a4150146eafe45a30761a5d7c026a9104f6e712d05669fb2c6" + 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..77e78f6e6c1ea --- /dev/null +++ b/Formula/d/demumble.rb @@ -0,0 +1,36 @@ +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_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..7d59320abeda1 --- /dev/null +++ b/Formula/d/deno.rb @@ -0,0 +1,103 @@ +class Deno < Formula + desc "Secure runtime for JavaScript and TypeScript" + homepage "https://deno.com/" + url "https://github.com/denoland/deno/releases/download/v2.3.1/deno_src.tar.gz" + sha256 "bde33c59bc458496cfb24743278b0bd0b140169f0b5cfa8c02900c4fb5ab8ca2" + license "MIT" + head "https://github.com/denoland/deno.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3af326a0eef7f3136d6a1ecc7c97a33cb1eac171120fed3730b065f05a778857" + sha256 cellar: :any, arm64_sonoma: "4b101e1744bbf33da4eaac6a67ae793956e0334121a5b2c7787b05210d4f7219" + sha256 cellar: :any, arm64_ventura: "2dee8b5cf45d0c152344638961a6ba3f3ae3b0aea8b4fc809ab8808cf8d16b09" + sha256 cellar: :any, sonoma: "305dc8947e3b6a01392877d7efff02664891b8857894771e2775bbd33af5129f" + sha256 cellar: :any, ventura: "f51d874734142938efd3bc3d4717db13f437027dbeb082591d93edc8ba454aca" + sha256 cellar: :any_skip_relocation, arm64_linux: "b0b877261bab96847f32e6d39c10d0874a40667d297748098c6f2a3753ae7ce7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d7dd3866d1770bfc8d632d3edbc349acf051cd18ba1edc4882adde0037784135" + 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, since: :catalina + uses_from_macos "libffi" + uses_from_macos "zlib" + + on_linux do + depends_on "glib" => :build + depends_on "pcre2" => :build + end + + def llvm + Formula["llvm"] + end + + def install + # Avoid vendored dependencies. + inreplace "Cargo.toml" do |s| + 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 + inreplace "resolvers/npm_cache/Cargo.toml", + 'flate2 = { workspace = true, features = ["zlib-ng-compat"] }', + "flate2 = { workspace = true }" + + 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 rusty_v8 from source + ENV["V8_FROM_SOURCE"] = "1" + # 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..00cc340c89407 --- /dev/null +++ b/Formula/d/denominator.rb @@ -0,0 +1,28 @@ +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 + + 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..a8143d17e39e5 --- /dev/null +++ b/Formula/d/dep-tree.rb @@ -0,0 +1,48 @@ +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_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, 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..c525749f2771a --- /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.64.0.tar.gz" + sha256 "c6dc6564636b01ab90e24315e37213253d43d5f91fc960e2d66791d29641730c" + license "MIT" + head "https://github.com/dependabot/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d470f7876372b442525a124b8d9ce8338ac87279f54158254922f1b3fb7fd565" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d470f7876372b442525a124b8d9ce8338ac87279f54158254922f1b3fb7fd565" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d470f7876372b442525a124b8d9ce8338ac87279f54158254922f1b3fb7fd565" + sha256 cellar: :any_skip_relocation, sonoma: "f2d8666b05c47322491b85689ba5d287f2a29a900fdc2a45e0eda16fe26842a5" + sha256 cellar: :any_skip_relocation, ventura: "f2d8666b05c47322491b85689ba5d287f2a29a900fdc2a45e0eda16fe26842a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20b74ba6cb04275a3e0201be2bc38657b5121686943caab84afafba57466a574" + 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..ca2e8941815f5 --- /dev/null +++ b/Formula/d/dependency-check.rb @@ -0,0 +1,53 @@ +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.1/dependency-check-12.1.1-release.zip" + sha256 "4511a2f1b4b5f8fc98fbd64c7455a9e49c6f89b5a74977d3eaa84a141c07e43a" + license "Apache-2.0" + head "https://github.com/dependency-check/DependencyCheck.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "05d697ff1d8f7c04ad642c3ba24511eeaa0c2e4a071ad62e32eb032d8dea3eb9" + 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").strip + 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" + 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..39eb1413a274a --- /dev/null +++ b/Formula/d/depqbf.rb @@ -0,0 +1,54 @@ +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" + + bottle do + 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, mojave: "210b2363035bf7772b275036b26938a8a286da0ddbd93d29a72cbbcb16237c23" + sha256 cellar: :any, high_sierra: "7c956f3b4e86d6f60e90dde3e25f6b5ce75f2ba75e756c9e4dd6debe46d2ddea" + sha256 cellar: :any, sierra: "fea1eb8ca62fccc5ce43b0a645fb67feffbf97c5a343d0ea6c9a015c37e24ccc" + sha256 cellar: :any, el_capitan: "3229005d870984af6beee544d5178094fc859525bd96552ac42301860c175f5b" + 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..47f2b394fe41f --- /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.6.0.tar.gz" + sha256 "4e5e25b2d3ade22f0dc87264945ece6138858d3c6803143cf39c66183a74c9c5" + license "Apache-2.0" + head "https://github.com/google/der-ascii.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c6b91afa38381784b23ba412b76988d4ee4c88be080ff8cc83e34925a9a5b8f3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c6b91afa38381784b23ba412b76988d4ee4c88be080ff8cc83e34925a9a5b8f3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6b91afa38381784b23ba412b76988d4ee4c88be080ff8cc83e34925a9a5b8f3" + sha256 cellar: :any_skip_relocation, sonoma: "be6480d41a86adbc097cb14c49fae031990959b144ea5c23e81254e9394b32a2" + sha256 cellar: :any_skip_relocation, ventura: "be6480d41a86adbc097cb14c49fae031990959b144ea5c23e81254e9394b32a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8bca066b2304679127bbf35d34a9ecbfb5744d4fa149a373bb3651b47d0d88b6" + 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..8ee23e0a5dae9 --- /dev/null +++ b/Formula/d/descope.rb @@ -0,0 +1,31 @@ +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_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, 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/desk.rb b/Formula/d/desk.rb new file mode 100644 index 0000000000000..1c98acad92453 --- /dev/null +++ b/Formula/d/desk.rb @@ -0,0 +1,30 @@ +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" + + 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..2748caa3470a6 --- /dev/null +++ b/Formula/d/desktop-file-utils.rb @@ -0,0 +1,63 @@ +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_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..2c2772cc3d58e --- /dev/null +++ b/Formula/d/detach.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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, mojave: "4aa3f65488ee7fb05d156d92f5f76a29d2cebe2034b226665e219978e228f1db" + sha256 cellar: :any_skip_relocation, high_sierra: "3367f32cb05a37e05e9ab18e4e1f2664137f7d03073fc2d9ec4aba0d62a6f431" + 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..c219c1fc62757 --- /dev/null +++ b/Formula/d/detect-secrets.rb @@ -0,0 +1,59 @@ +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 2 + head "https://github.com/Yelp/detect-secrets.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "5b5b89db99cf8daec3ebf6bced7ca89d5d969a632250df778b032b95a8b96ec5" + sha256 cellar: :any, arm64_sonoma: "327b43b5b499b3f31b8f98fc286e894c73991a5b6013217fb3d84675a40af59f" + sha256 cellar: :any, arm64_ventura: "caf0ed6dc73cf8e77e27eb99a72866a73f092bd00ad44ad29cdc5ae00d8a750b" + sha256 cellar: :any, sonoma: "690c5daee0e9dfa3df77e892a5e596d886e8ee122f89cbeab904f1c9c2ea12eb" + sha256 cellar: :any, ventura: "81ed7a53fcc48523a232222c8da7109cc10ef63ea87122b0567ee496b97dbc7e" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc70345c6ad57cf1aacd5fd295e2d248bbbce24d5c35b96ac3668c47f79a17da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29102c03ff1a3507bed0d32067f4f7b6523cb8198c07c890934b19fabc4cc97c" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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 "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..46115048b58d0 --- /dev/null +++ b/Formula/d/detox.rb @@ -0,0 +1,34 @@ +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/v2.0.0.tar.gz" + sha256 "46e646855cfeae5aa51d00c834f7eeeb5967188aaa17f8882a14f98343d82924" + license "BSD-3-Clause" + + bottle do + sha256 arm64_sequoia: "481ed92a26b1e26953107580c9a6baa6e4c3c3fd6d773395125de4038a83e46e" + sha256 arm64_sonoma: "8faa1e95922d876ff01d233893f0cb83d07bcf2e916c231d15e94765d16efa21" + sha256 arm64_ventura: "79122f4f58434d19c69c182bc1709630b052dd7141e6810691b1f1e91175083f" + sha256 arm64_monterey: "b105a28c660493298adf8cac087529dbafe41196b4f97b5e7d28a8543236b208" + sha256 sonoma: "cb3ba28c5bd713d4b8cbc3bd908270ff645481fa62b0d7d8c83e55c4e9ee984e" + sha256 ventura: "4e6159694a04362b11cec132dcacb70b1d84567c688614f7f887e8b7a1f43293" + sha256 monterey: "e39e5f5112ebedf0e3b44aab8d8af72c966698e9f4230797df96fffe24c82686" + sha256 arm64_linux: "b699688a6b8ba32c1b024d43a922014a10bef9fc957b833f9cdf17471211f7a0" + sha256 x86_64_linux: "cb4ab816445009b488e415ec13b576903e89a89e367bcf31313896b589163448" + 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..07465a397953c --- /dev/null +++ b/Formula/d/devcontainer.rb @@ -0,0 +1,38 @@ +class Devcontainer < Formula + desc "Reference implementation for the Development Containers specification" + homepage "https://containers.dev/" + url "https://registry.npmjs.org/@devcontainers/cli/-/cli-0.76.0.tgz" + sha256 "3725a3db0d9c42c2eae21cc32972674288f6c5d55b5b11c3b09fc7fc53dd9f26" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a478f446f6efb19efd7fb3f25348f67525fe323b5ab11415fad17169287d7b3f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a478f446f6efb19efd7fb3f25348f67525fe323b5ab11415fad17169287d7b3f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a478f446f6efb19efd7fb3f25348f67525fe323b5ab11415fad17169287d7b3f" + sha256 cellar: :any_skip_relocation, sonoma: "652c9facf4c49a046f52aee5148b959161a57689c37281ba9466e857c52ee20a" + sha256 cellar: :any_skip_relocation, ventura: "652c9facf4c49a046f52aee5148b959161a57689c37281ba9466e857c52ee20a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a478f446f6efb19efd7fb3f25348f67525fe323b5ab11415fad17169287d7b3f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a478f446f6efb19efd7fb3f25348f67525fe323b5ab11415fad17169287d7b3f" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + 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..f051efa610e99 --- /dev/null +++ b/Formula/d/devdash.rb @@ -0,0 +1,34 @@ +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, mojave: "a247529d915f53e3d43ea23b017373a905b11a51e8f2f18dc19a8eb90c5e9f96" + 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..114623529471e --- /dev/null +++ b/Formula/d/device-mapper.rb @@ -0,0 +1,44 @@ +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_32", + revision: "8817523c5682a7fd83770d3f58a99c436f7e73f7" + license "LGPL-2.1-only" + + livecheck do + url :stable + regex(/href=.*?;a=tag;.*?>Release (\d+(?:\.\d+)+)</i) + strategy :page_match + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "5d6d6a6fee244534f059ddbab95839ca2fd64c432198e6734dc0f97e1a59c9f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "14be86a855300b9f834dedf4c0986fca07b810854cc5b98c935fd1408615ea34" + 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..ca5d7e21d0e9d --- /dev/null +++ b/Formula/d/devil.rb @@ -0,0 +1,105 @@ +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 + + bottle do + 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", *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..0f5776442bb9d --- /dev/null +++ b/Formula/d/devspace.rb @@ -0,0 +1,43 @@ +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.15.tar.gz" + sha256 "9026064ed3ede1c1214ca1fa58e64379a7679bae6d00d32847a216d13960f498" + license "Apache-2.0" + head "https://github.com/loft-sh/devspace.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ef4d6538faf7cbcdf5e082b6c1e7b2383f6026e4d2d0dd8868dd7d32794bbac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c67ad1139eb728437d2ef33176abea6e84df6287d0093781c2e4f8cbad01654" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1f0e716dd00a472b69723cc700f66d4937a1c770b78aeaf04d2316d6970e1448" + sha256 cellar: :any_skip_relocation, sonoma: "ae9b0e8033c854dbc3dfe746c563adf0bf39b99e60c00131261ac805df910ae7" + sha256 cellar: :any_skip_relocation, ventura: "b35af98d07349b71630e0f2cb0bd87fa231bc2058ca519e087599b30fddf58c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "a8602287611d26cfb6e820739c4184dabaa91e86ff4f797bc39795357be3c0bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a7cb388594525cf14b8f36560ac0becb2ff284b71b1547ebff46d9bda6fa2ef6" + 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..ad6fc4523062b --- /dev/null +++ b/Formula/d/dex.rb @@ -0,0 +1,44 @@ +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" + + bottle do + rebuild 1 + 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 mojave: "689a8e1a94a3c2922defac96859aca9b4675118858d9abc8338c0687cf714f43" + sha256 high_sierra: "1d36402b9470f2e714bf9b9b94e9575d06130485559826a08181ff9087e77176" + sha256 sierra: "1e413a64cd9e2c594ec47c7e5e9ff36ab199126f6708265f5ad87363e66f033e" + sha256 el_capitan: "70c249809920acc2d10405c0487427d154ee55cf201507d910d8178693c7fd61" + sha256 arm64_linux: "d0e976083ba5b7bffc80bd67406135fc4dc08226ecfd3d2336f5e8bb39b634c9" + sha256 x86_64_linux: "53f45193c090faaeefd2c6ca8a492f51af29d6b72f7a13eacb9650b6fffd46c5" + end + + uses_from_macos "ncurses" + + 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/dexter.rb b/Formula/d/dexter.rb new file mode 100644 index 0000000000000..4c2f3a3ef3d71 --- /dev/null +++ b/Formula/d/dexter.rb @@ -0,0 +1,79 @@ +class Dexter < Formula + desc "Automatic indexer for Postgres" + homepage "https://github.com/ankane/dexter" + url "https://github.com/ankane/dexter/archive/refs/tags/v0.5.6.tar.gz" + sha256 "f2bebde21f8f06f726e6c16cd932afa8fe42714012f3ce53b4e0355b7cb91628" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "37a406d94e604468c6bd45f08225600fc3a929c38cdafbbcb6b0d1e73f833873" + sha256 cellar: :any, arm64_sonoma: "096fe52ac18aab6b6c77f98cd4b0ce92a9501b5759095a1d85a06394c8590531" + sha256 cellar: :any, arm64_ventura: "6a409cba5aeaff176b666c1cd2e9b53deaa704b5a1b46a3fe697703d8df302bb" + sha256 cellar: :any, sonoma: "3b9d57da475b9026fc2e469f6a442d1acd744192e817fb46086def143d75b5b5" + sha256 cellar: :any, ventura: "f21626ffdfeb5712eee1d1d6d311eb29c1bb6bf5e15a74de726628b4204474be" + sha256 cellar: :any_skip_relocation, arm64_linux: "20acd2b97f4698c0105d2dbcd5778f7adddb4336f9a1715911d2fc5e8bbda66e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c769be717ed914c7552d0aaccff2e9d53171f256ac7c9d9bbad0afa40b4bbaf8" + end + + depends_on "postgresql@17" => :test + depends_on "libpq" + depends_on "ruby" + + resource "google-protobuf" do + url "https://rubygems.org/gems/google-protobuf-4.29.3.gem" + sha256 "9a5576c0059f57d7e07107bda8287ac14d0c59c71fe939b260855d3f46b9b566" + end + + resource "pg" do + url "https://rubygems.org/gems/pg-1.5.9.gem" + sha256 "761efbdf73b66516f0c26fcbe6515dc7500c3f0aa1a1b853feae245433c64fdc" + end + + resource "pg_query" do + url "https://rubygems.org/gems/pg_query-6.0.0.gem" + sha256 "fbf09a4e900cee1d61e2bbfda1fefdbc35bc83c5f1c7ae1be1c6ffc5ae0f5c04" + 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@17"] + 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..50ca91c9204d0 --- /dev/null +++ b/Formula/d/dezoomify-rs.rb @@ -0,0 +1,53 @@ +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.13.0.tar.gz" + sha256 "b10bbb08d1e0f135f9db98a264e1b07dc05520b1968f433de2282cd74f004ebc" + 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_sequoia: "6108be976ce125b6bff8f8ac0e3e961d9241c9c516d45ee136cdc1462ce689be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ff85552168051685953432ef73daf408f75b248aac71a5823f94cc1ba76f17c7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4e1400a24bb9c455275a4d7fe2dd522bb6f54bc5e9a1f631fd0290ed657e0e96" + sha256 cellar: :any_skip_relocation, sonoma: "8d89fe6376c15244f784963fd9ea1bc5226088978f95c8a47c8eb41da9ac6ef3" + sha256 cellar: :any_skip_relocation, ventura: "5088562b5587179e0f31b706a5028a786b1e251dcc33bdce1aa4a1889392ae62" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e61cfcc1bc5a27a91b2e77b9c093f772289120c64ddc4f136b69987392efadc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3db821d32bdad848d8d4241afec374f212cf335fce3320831313faf90de84b4" + end + + depends_on "rust" => :build + depends_on "imagemagick" => :test + + 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_%7B%7Bx%7D%7D_%7B%7By%7D%7D.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> /dev/null") + 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..840f9d493caae --- /dev/null +++ b/Formula/d/dfc.rb @@ -0,0 +1,44 @@ +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" + + bottle do + rebuild 1 + 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 mojave: "93406a46f6e08d861ddbc5ea7f4ce910629f33090c39eeb827f05444d61fe466" + 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 + system "cmake", "-S", ".", "-B", "build", *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..ba7368a54ca9a --- /dev/null +++ b/Formula/d/dfmt.rb @@ -0,0 +1,60 @@ +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: "v0.x.x" + + bottle do + 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 + + on_arm do + depends_on "ldc" => :build + end + + on_intel do + depends_on "dmd" => :build + end + + def install + target = if Hardware::CPU.arm? + "ldc" + else + ENV.append "DFLAGS", "-fPIC" if OS.linux? + "dmd" + end + system "make", target + 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..f0a35526924eb --- /dev/null +++ b/Formula/d/dfu-programmer.rb @@ -0,0 +1,38 @@ +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_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..1fb893b0fdf32 --- /dev/null +++ b/Formula/d/dfu-util.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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, mojave: "1ded847895f4d2a86a4a7754fa711014d09c334044ccc03aa97d89059ae58604" + 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..7ca8e14079bb7 --- /dev/null +++ b/Formula/d/dhall-bash.rb @@ -0,0 +1,55 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d52349786b0b0288928a07f34495eaabb606b50478be372661aa32dca3a53d5b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e6932266f568e291768e86c3e995c625d9295a6b5aa6e0509694b64da1befe55" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2228d77b18593f1d2e2e0a382d3668716e5c002a4ac2354047ca6dcbbae327c8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5effd1de6bb963135bfe8335d5e3ef54dcb2fcb7867b2aa47a15df248dc57214" + sha256 cellar: :any_skip_relocation, sonoma: "f33bd2e5fb093aad3b961486d55a9616d43e7411452242863babd5973e95d9c7" + sha256 cellar: :any_skip_relocation, ventura: "52af086896ca9903342a123aa91ef7fdff9b76e8a3bf6827eba53bd6cc78817e" + sha256 cellar: :any_skip_relocation, monterey: "46dc888d21b56242ba9f076b07379e351858bf88a0bd5b896c5cc93dca87b7f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "a62ca6ba93469e9d31b9d25bd5e4bb830419d73cca637e0734fa6395bcc918ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd6520e32209110b00b6a9aad89cd4217b93f367140cbe870206c117d22027ed" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + + 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..966d8ea390572 --- /dev/null +++ b/Formula/d/dhall-json.rb @@ -0,0 +1,48 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aa28d7105b92415f10bdf28679bc631644527208492877b239ec7dca49a4576b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c953aa5b6578f99c770fcfea9d3ab337fbbb36dd35130f423b067b81aa32433c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b9828ba27a2b38b47259226edeaa90ada547b3bcbb4a19a06c6268ebfb4e79f8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "128907da1d0ae87a97d3e2eafaeb0976fb31ef6806826b8d1ab782781436834d" + sha256 cellar: :any_skip_relocation, sonoma: "6fe9a18931ce049c972b01ece18dd99b5519c8b81dc297ea739c855222501849" + sha256 cellar: :any_skip_relocation, ventura: "3a07abe91ba35acd16e9e3a4d293895b3722dde3c3b55ce9212d70220512c9d0" + sha256 cellar: :any_skip_relocation, monterey: "4cd90ca4159871376eb10cfc730116e7a55d78260aa9705dcc87bb00530ee9bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "51005894d801cc179e2e5246e27968f63a92466274c5b9e1ab073048d7084231" + sha256 cellar: :any_skip_relocation, x86_64_linux: "06ab63373f3d40884b9111382390b21525460927f12692a158e3983f68c9e0aa" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + + 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..c5ffdfd8579ba --- /dev/null +++ b/Formula/d/dhall-lsp-server.rb @@ -0,0 +1,77 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bc15cc3642206d59076f34a82cb4280e2755d427065711763529f848a711c401" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8c3923f8db87be736d4ea429f0165383eba919facd3033ba3ffaa01e6607ec08" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7d24735c86a2713a7016cc94bece0ab9421470f4be47e7fede73217b43c18d27" + sha256 cellar: :any_skip_relocation, sonoma: "2978096a8175e81e0b89b4b55b3de417206850c0abbe14ca869c13faf916df34" + sha256 cellar: :any_skip_relocation, ventura: "1bd665c5789efa9e61e36859dd4381663b05913c38c9d5e8e98e34783d3e8db1" + sha256 cellar: :any_skip_relocation, arm64_linux: "386e383923218adddb93e597da6ec639d81f3bb0033a7bf197a683c003762ae3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "590cc648ccea52123ff837a8f00cf19983ac2672d1be0fe570bd7500bed6c2c2" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + + 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..429aedd8254fe --- /dev/null +++ b/Formula/d/dhall-toml.rb @@ -0,0 +1,34 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa04be536e7446641318c9d7ee241d0280b24061fda69b889a2988f48898e8b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0b91f73c50c4c44ac7c5edef748f1c4f880a3ff0690ef64463f5dc04dfff85d5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b221d5914aad68c046ae8f9f0fee29cd0e74ad55f4db5fd027f334daf71282e2" + sha256 cellar: :any_skip_relocation, sonoma: "230e845fc7963e4f421247c6f7733af8a588782ad39232a446f6e1a65fccbb80" + sha256 cellar: :any_skip_relocation, ventura: "a118e324119fb58470cf49f4f898f0c3a603fc3975a11b2b3f60d66eeefdabe0" + sha256 cellar: :any_skip_relocation, arm64_linux: "b0a91ba9614f2b28c79379fb9208a6aa25735985b7d79f84f75aeca830133e3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7a0839d98769280508ea3d559828b88c1a78838f21bbceb64e179f6a7078f07" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + + 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..041c4e7af1b99 --- /dev/null +++ b/Formula/d/dhall-yaml.rb @@ -0,0 +1,52 @@ +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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dfe3dab1ecaaf096cc239883255676d3f441a446b8fe43c7928cf355a5f37467" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f9f9399367012591352d6df9fd8c1c66a3956a9ed6d31707cb9a45ca1397f58a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "47ddd725cf808f4ee04e3bb217e3a54a23dc3c91db1c77fb4b0985ea6a6edd51" + sha256 cellar: :any_skip_relocation, arm64_monterey: "45441a856fa1a3b3794608ecc0c9500fae68ad089adcc3698f5a59ba7125ea7a" + sha256 cellar: :any_skip_relocation, sonoma: "e284407208df9a5e48874e297ae5b959525d7de877fac148f5cf76aa9104003b" + sha256 cellar: :any_skip_relocation, ventura: "3d8172163ef684ea6612f87972161c4a1e0527f0a4e1d8108032bc40d6a73d8d" + sha256 cellar: :any_skip_relocation, monterey: "63b5a9360c083143320cdba1e3e2d3d9c28784cc7d0cdcf3fbf885579379eab7" + sha256 cellar: :any_skip_relocation, arm64_linux: "665b32d846ffab9fc4449756daaaa03bc428bd4b1aad881d3e3bba0781b65498" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b906ee758e3780cf57c12d8c4229f0c33781f1d8b82e5ef73ff9c31c4ac72c86" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + + 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..06df5fd0eb844 --- /dev/null +++ b/Formula/d/dhall.rb @@ -0,0 +1,35 @@ +class Dhall < Formula + desc "Interpreter for the Dhall language" + homepage "https://dhall-lang.org/" + url "https://hackage.haskell.org/package/dhall-1.42.2/dhall-1.42.2.tar.gz" + sha256 "9a907dd95f4eefee9110f8090d83021371b6b301da315b5b2911c766e0c67b3b" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6904e323b779154ef9aa1563882e8e3cac9d22416d1ff28c3a5701248a2ffbf4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d8a0875538c1eb6776b4a68e35228ac8012593d08df5e9b158b139345f52a8f6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f9c27c1448e7ea747a4e43dea0691cfeb1f4b607ce711765a791991ba5213e0c" + sha256 cellar: :any_skip_relocation, sonoma: "9a9eacd1dfa079788283348ba238c3afbc66cae36d4af2eb48019d4b945261a1" + sha256 cellar: :any_skip_relocation, ventura: "55434b1c01bf6bf9b264fced924a31aa852523884f2c23826e1a69af74c3b83f" + sha256 cellar: :any_skip_relocation, arm64_linux: "043f28389aef608dafa4085596e02da1c41a671928bf2a32aab9d05307f2f759" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07be1250410bbcaba21dc5084057529554497b52d942793f4165893a85cabd27" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + + 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..ef6c9b7aa5dc6 --- /dev/null +++ b/Formula/d/dhcpdump.rb @@ -0,0 +1,37 @@ +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 + + bottle do + 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..6ada6503552c0 --- /dev/null +++ b/Formula/d/dhcping.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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, mojave: "94dba411868455abd17d818d1009e71bae362cea093ec01437b19fbbb33a0cc2" + sha256 cellar: :any_skip_relocation, high_sierra: "e30ef14d867a06bcc9bcde18965fa00366780c3323841ca0fb25f864077044d6" + sha256 cellar: :any_skip_relocation, sierra: "5c41d596cb2a9835fc5f170ccd602294c98f163ba3f2a8d5c83bae252189817e" + sha256 cellar: :any_skip_relocation, el_capitan: "d3b03b1004d3a2d97b80fbbe9714bd29d006d9099a8f6baec343feb2833f3996" + 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..22390b8b03c33 --- /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 + + bottle do + 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, mojave: "2d6043ce881b7b407fa40691639c25c72d73a427fcdd39a56e0683f48b16b328" + sha256 cellar: :any_skip_relocation, high_sierra: "bfc2aa6c73ffff61a471b4dd8e183e493781a5c34baeddffc56fa89b0542a9bd" + sha256 cellar: :any_skip_relocation, sierra: "b83e63ad0f1e2910e1f2495903ac4077aa5caaabe8cb2702094f42c3921c7a9c" + 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..38443326d76c6 --- /dev/null +++ b/Formula/d/di.rb @@ -0,0 +1,46 @@ +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.0.0.tar.gz" + sha256 "7b663e4db044b1fa4986bd018f827c18e96fe6d1f9a36732dcbb0450e7f518cb" + 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_sequoia: "adc88bc0093e025288c699f376e758089711a840792aea13c990fc379cee1ec8" + sha256 cellar: :any, arm64_sonoma: "20416d442a7595dce7526c6ad3cf61fadf9fd75378aac82c1895c7ec17e81deb" + sha256 cellar: :any, arm64_ventura: "e00b6b7afc135ab8351c07cf4303540b4c533ca8ece84a4fe69acc13d87dae8f" + sha256 cellar: :any, sonoma: "b6e072007fa6ef95194d50126986fcc614371e0b4d8724ca1ee5ef0ccd8596de" + sha256 cellar: :any, ventura: "d17b37ed52039a49fc79fd6fae1e79dbfe3b2603806e105d3d53626af40c7a82" + sha256 cellar: :any_skip_relocation, arm64_linux: "ddd98a7738b8cb9ff067db4103d93f96ee4c9517a800d41ee142ec6ee14084ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9172a9b37e0d769eeab8e2bb77f2933b9f893652dbd1e49f9bc94569af9aa370" + 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/dialog.rb b/Formula/d/dialog.rb new file mode 100644 index 0000000000000..c6d0a1d5e1c7a --- /dev/null +++ b/Formula/d/dialog.rb @@ -0,0 +1,33 @@ +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-20250116.tgz" + sha256 "68406329827b783d0a8959cc20a94c6e1791ac861a27f854e06e9020541816dd" + 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_sequoia: "4d2469f63747ff4fd24c4f56ed8c40fc25bf9ad4b7125641efade529ec966910" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "730c804e04d5d9da67ddde062fa9434f022b7739b376c4b49a93161db69dcda1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c592b9a7cc4715b80b7461cd020a4de1672f17b845d70c2e77bb55670b660bd9" + sha256 cellar: :any_skip_relocation, sonoma: "38c5ed508d93b2fc7635c23d7fb5dbfc7c5edf336dc461e4b8b351b34ea09643" + sha256 cellar: :any_skip_relocation, ventura: "c1ba6e432599dae77a21e6a22107b5b432bfc66d5036d0adfde9c52aa181f7de" + sha256 cellar: :any_skip_relocation, arm64_linux: "7421e7e70ba47204b66907bab7aebe101a3b35ed94b92f8c1b2f10ff81284711" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f46ba5552ed2d230e0a3fb2aa544e98a2638f7ff6e6af8731a1d69726840179" + 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..808b7077d8de8 --- /dev/null +++ b/Formula/d/diamond.rb @@ -0,0 +1,59 @@ +class Diamond < Formula + desc "Accelerated BLAST compatible local sequence aligner" + homepage "https://www.wsi.uni-tuebingen.de/lehrstuehle/algorithms-in-bioinformatics/software/diamond/" + url "https://github.com/bbuchfink/diamond/archive/refs/tags/v2.1.11.tar.gz" + sha256 "e669e74ac4a7e45d86024a6b9bfda0642fabb02a8b6ce90a2ec7fb3aeb0f8233" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "16a5c9bdce286088598d1bf8922c57d953449e1bb895478ba8125f2c21c094fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bd8e1083cc5a50cf7abc7c5f5e8ab9d7239e5a5403c42c9037535de188b65fb1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e078aee98faa14ee3ce496ac97e5f84dc39e82948ad90e946ec4c14b1ce501ab" + sha256 cellar: :any_skip_relocation, sonoma: "435817155d56ee6e7f502da9e9ac1fa04d81d6c7269d318eca6cf77f6dfed4b3" + sha256 cellar: :any_skip_relocation, ventura: "811f9c67db74a23b6032064103e1fa317a55fdcece0f0a07cefffe2a66469db4" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a48ded9253e8c3c290481f0bb817c15b4fa11afd18b7f037fd6ed86d2133798" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c1682af17f554bf337e8717692460577cbc9ee688a196133c46f9eda4ede24e" + end + + depends_on "cmake" => :build + + uses_from_macos "zlib" + + # fix compile issue, upstream pr ref, https://github.com/bbuchfink/diamond/pull/852 + patch do + url "https://github.com/bbuchfink/diamond/commit/a50338f6033f55cbeb2db3526005f649a189c656.patch?full_index=1" + sha256 "67b2998afa133a77497dc2e928af488237d5d8d419bd916df893a318470fd49b" + end + + def install + system "cmake", "-S", ".", "-B", "build", *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..7519fafb0774b --- /dev/null +++ b/Formula/d/diary.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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..b30b2d59550e0 --- /dev/null +++ b/Formula/d/dicebear.rb @@ -0,0 +1,44 @@ +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.2.tgz" + sha256 "ac1d4abf73dce99db7535b2ccf43a8d55a4219ffa526b96db31809e77fe4aa23" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5046d62bd429c224479312085090e5ffff58d13afc0296e39862a45478261a12" + sha256 cellar: :any, arm64_sonoma: "5046d62bd429c224479312085090e5ffff58d13afc0296e39862a45478261a12" + sha256 cellar: :any, arm64_ventura: "5046d62bd429c224479312085090e5ffff58d13afc0296e39862a45478261a12" + sha256 sonoma: "51873d0358db2c72a4d0750e0d385b91f4956acf2bad9e6b5a53b46c695f5db2" + sha256 ventura: "51873d0358db2c72a4d0750e0d385b91f4956acf2bad9e6b5a53b46c695f5db2" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d49ce11619a7c5457a090a4b0c2a5f3c34ff7e2e36b7eac733c02b9c50f70d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8e5304c29b9f49af28a870360fc2964e32b884a2c59ebbd66ab028bda584ff7" + 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..89567d4e6842c --- /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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1d9d1288469164e84e042091daf65cb61637113d7e343dc8fc6c3ac95a75c4a1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d9d1288469164e84e042091daf65cb61637113d7e343dc8fc6c3ac95a75c4a1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d9d1288469164e84e042091daf65cb61637113d7e343dc8fc6c3ac95a75c4a1" + sha256 cellar: :any_skip_relocation, sonoma: "fddd1640d30f4248092cf4a711f6902f31241e3e0db20a3ac962c8bb34a8fe30" + sha256 cellar: :any_skip_relocation, ventura: "fddd1640d30f4248092cf4a711f6902f31241e3e0db20a3ac962c8bb34a8fe30" + sha256 cellar: :any_skip_relocation, arm64_linux: "0bbb8ae111a8a2534c4df6422a6c00802b43bc5744d6c9177d97b6cda883b0a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d9d1288469164e84e042091daf65cb61637113d7e343dc8fc6c3ac95a75c4a1" + end + + depends_on "python@3.13" + + def install + virtualenv_install_with_resources + man1.install "diceware.1" + end + + test do + 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..e6f96ec591070 --- /dev/null +++ b/Formula/d/dict.rb @@ -0,0 +1,45 @@ +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_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..b7e03a7b5adf6 --- /dev/null +++ b/Formula/d/diction.rb @@ -0,0 +1,43 @@ +class Diction < Formula + desc "GNU diction and style" + homepage "https://www.gnu.org/software/diction/" + url "https://ftp.gnu.org/gnu/diction/diction-1.11.tar.gz" + mirror "https://ftpmirror.gnu.org/diction/diction-1.11.tar.gz" + sha256 "35c2f1bf8ddf0d5fa9f737ffc8e55230736e5d850ff40b57fdf5ef1d7aa024f6" + license "GPL-3.0-or-later" + + bottle do + 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 mojave: "74ffc9abed7808557c799d089d4336da01d68c484e7b90dac797015d9656c8de" + sha256 high_sierra: "194a52459b3bfd3e4f38f8e19ea9f4d371d2bf3b005d3e36b8aa5519c5afaf2d" + sha256 sierra: "70dbde26567eb6b0093d897f9ceafb212eaf51d23028a925d39c0f53b803b5b9" + sha256 el_capitan: "858b8312ef527a7745a02b3bf40cd483c0212216e3342ac7eaddbfe6045893dd" + 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..71a871f755169 --- /dev/null +++ b/Formula/d/diesel.rb @@ -0,0 +1,36 @@ +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.2.10.tar.gz" + sha256 "7b2bad8963a8c0617b2d2259b2edeb34f10f36615b9a86e2a4a71546a13d7047" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/diesel-rs/diesel.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "97bec8a3bf972ded46e195a7b61eba9e255224fd6fcc070c8a086cd4055729e5" + sha256 cellar: :any, arm64_sonoma: "30203072dc2ee0738bd3bc129f47b7684a168e309c78c1afbc9dbe3e47e5780f" + sha256 cellar: :any, arm64_ventura: "a0c29e5dd9a63f3e906ddb6e12959e6ed5ce77c7e1b013b4cbfc31dce4500df5" + sha256 cellar: :any, sonoma: "dc260b121c3f39634c66a6dc74f6911290ed6d45565b4a35fa0f9fa829ebecfd" + sha256 cellar: :any, ventura: "ac6b6c4d5be5d8c6159c5cc8854cc4c105b5503507ad1612df2b01ae8f5f480c" + sha256 cellar: :any_skip_relocation, arm64_linux: "05b025b705196626075a6526bd658bee80d9c685e200eba8f4dbfc92a31b0a25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "637290663af15469c48782dfef35b6d7aca557c96be99e3be5988e8a9e23a919" + 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..2b68fb11d8d96 --- /dev/null +++ b/Formula/d/diff-pdf.rb @@ -0,0 +1,43 @@ +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 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "520ca811e168d7e466572c9da296ab1d67e32b839ff6cd6cc760b6a2d8e87feb" + sha256 cellar: :any, arm64_sonoma: "476dd932746a9fb40eace829b4fe1d06a9e47d5fa38ef7ac39c0d569b2c02c26" + sha256 cellar: :any, arm64_ventura: "5119383788dce6966d1e63c972d63291bcebfffe9c04bfa2afc724d409b7bc9d" + sha256 cellar: :any, sonoma: "e084c03e61866407057108db22f32f5926d9ca67d8370f69621b5fccbb1b5b66" + sha256 cellar: :any, ventura: "aecba03f87da7b448e6f0ccaeb6fa73198cda2d426b903fa2b4c011a2212245b" + sha256 cellar: :any_skip_relocation, arm64_linux: "6fa81a93d5d39277cdda0a4def3ad9ad2b1f309ecc49bcd3bb14534362f6bc54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a33ef479a7e400ad5adc632acb18df3f2bd567d9cc1b8ebc9c5ef298f76a6b7" + 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" + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--disable-silent-rules", *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..add5f01f9a225 --- /dev/null +++ b/Formula/d/diff-so-fancy.rb @@ -0,0 +1,35 @@ +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" + + 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..ee837cc98e502 --- /dev/null +++ b/Formula/d/diffoci.rb @@ -0,0 +1,35 @@ +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.6.tar.gz" + sha256 "650554edbc7118e6fb7008865281e5dba6bc6d82a417a1e0e0ea05c1561ee402" + license "Apache-2.0" + head "https://github.com/reproducible-containers/diffoci.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "272794b529802bbfca33f07801190a23adb3506727b2d92e06af1d1b3b65f714" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "272794b529802bbfca33f07801190a23adb3506727b2d92e06af1d1b3b65f714" + sha256 cellar: :any_skip_relocation, arm64_ventura: "272794b529802bbfca33f07801190a23adb3506727b2d92e06af1d1b3b65f714" + sha256 cellar: :any_skip_relocation, sonoma: "2d68d1a0c3ea3d9fe1fc230151f3d671c3215a54869ef1278b1a8706bb1857cd" + sha256 cellar: :any_skip_relocation, ventura: "0b1dbe2f83d047a7f1833904eec6cdfcae6fb07e823f586cd9f7c3607162bb1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e49d15e23b675401ff366c143fb50f819646f3211614b254de78d7c35d506d1" + 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..61413aff0c12a --- /dev/null +++ b/Formula/d/diffoscope.rb @@ -0,0 +1,59 @@ +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/e6/04/4a9df77e0b0dea2bd70b7366d9751237cc79ae2598d6dfbe5e5ab57f6228/diffoscope-295.tar.gz" + sha256 "f99ad743fc888693b193fe768a08d0142e3c5c6b2503a7265be7c08a99cc2a5f" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "72561383a6605b074c65408ecf6a012bda7afed15ccea38a2f59e2bfdbaf846b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "72561383a6605b074c65408ecf6a012bda7afed15ccea38a2f59e2bfdbaf846b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "72561383a6605b074c65408ecf6a012bda7afed15ccea38a2f59e2bfdbaf846b" + sha256 cellar: :any_skip_relocation, sonoma: "f1431204e8d53d11d393778f8ff9d4eefe0eb11d4b250a80c3191be650e8f83b" + sha256 cellar: :any_skip_relocation, ventura: "f1431204e8d53d11d393778f8ff9d4eefe0eb11d4b250a80c3191be650e8f83b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ef40858ce16753a77d8dfb8f32dda51080ecfaf3b8e7c5f770a2706eaadcf017" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef40858ce16753a77d8dfb8f32dda51080ecfaf3b8e7c5f770a2706eaadcf017" + end + + depends_on "libarchive" + depends_on "libmagic" + depends_on "python@3.13" + + 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/bc/0d/c45fe1307564cf550a407fca69cab3969a093d1d41bcd633b278440b4c30/libarchive_c-5.2.tar.gz" + sha256 "fd44a8e28509af6e78262c98d1a54f306eabd2963dfee57bf298977de5057417" + 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.13") + 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..b7bec81dca5ec --- /dev/null +++ b/Formula/d/diffr.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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..9379e1729587a --- /dev/null +++ b/Formula/d/diffstat.rb @@ -0,0 +1,46 @@ +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_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..2ba80fc620d23 --- /dev/null +++ b/Formula/d/difftastic.rb @@ -0,0 +1,34 @@ +class Difftastic < Formula + desc "Diff that understands syntax" + homepage "https://github.com/Wilfred/difftastic" + url "https://github.com/Wilfred/difftastic/archive/refs/tags/0.63.0.tar.gz" + sha256 "f96bcf4fc961921d52cd9fe5aa94017924abde3d5a3b5a4727b103e9c2d4b416" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "44a308c711b145d779e07d65b0d0c8cb676cf28802d09c53293d0f9db3d651cd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "460fa7cf4158529052c493abe521d1cfe890eb5a2a47dce1240a7e3e11211a49" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e7edb10cd62c0a2fd50175e5b11cb0b8f7f20695e91ada25b2df870441bc2d21" + sha256 cellar: :any_skip_relocation, sonoma: "102eab4842ecccf93ac8a8c65537a6be6da20d2c1610bd159b8711d3f413f523" + sha256 cellar: :any_skip_relocation, ventura: "51536fbe2b7004dbabb491d9b48a1be08f32857f0cff326deb3c6e5799e2b1f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "18e486daa9517bd3a97e32d0c3e8ca31bf470d2131d4df3ed11b9371efdb11de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22e2e3aee49400b6c943033f17e56f4a069addc228877b1e33a165a114c93e8a" + 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..878b7f17717a7 --- /dev/null +++ b/Formula/d/diffutils.rb @@ -0,0 +1,29 @@ +class Diffutils < Formula + desc "File comparison utilities" + homepage "https://www.gnu.org/software/diffutils/" + url "https://ftp.gnu.org/gnu/diffutils/diffutils-3.12.tar.xz" + mirror "https://ftpmirror.gnu.org/diffutils/diffutils-3.12.tar.xz" + sha256 "7c8b7f9fc8609141fdea9cece85249d308624391ff61dedaf528fcb337727dfd" + license "GPL-3.0-or-later" + + bottle do + 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..c6687b929cc44 --- /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" + + bottle do + 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, mojave: "54fbf374d90a378d49b86174f4c00e0a56a1cee599d040a740469d7ad7b3a991" + sha256 cellar: :any, high_sierra: "a91be4056f24f4bef0c19c8a3693d48e0f7d391494e7db1be416ab1eb833daa2" + sha256 cellar: :any, sierra: "dab9de93acb1edb05e3607075b36ce233e567dd9a1918aacf3b19f3826aa30ef" + 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..85d126a4627de --- /dev/null +++ b/Formula/d/dillo.rb @@ -0,0 +1,82 @@ +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_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..8a13f556b2763 --- /dev/null +++ b/Formula/d/dipc.rb @@ -0,0 +1,34 @@ +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"] + + bottle do + 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..0408565834c6a --- /dev/null +++ b/Formula/d/dirac.rb @@ -0,0 +1,60 @@ +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"] + + bottle do + rebuild 1 + 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, mojave: "c018586bbfdeb10487adc1c62bdd74138b9d11195064bd2a07d458a55d770a06" + sha256 cellar: :any, high_sierra: "9413ec8e068d4c8e30d679a62af9779a09de385e2287acebacf9e5c56e80a50a" + sha256 cellar: :any, sierra: "09b846fe4069e971ec6d10668d97ac599cb555e5799f3ba3076d0d088e1f78cf" + sha256 cellar: :any, el_capitan: "8f4414614755f863d3ba0f43d6415684fbc00976ae24c7e45c88fe736be918d2" + 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/formula-patches/85fa66a9/dirac/1.0.2.patch" + sha256 "8f77a8f088b7054855e18391a4baa5c085da0f418f203c3e47aad7b63d84794a" + end + + def install + # BSD cp doesn't have '-d' + inreplace "doc/Makefile.in", "cp -dR", "cp -R" + + 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..45103713834c3 --- /dev/null +++ b/Formula/d/directx-headers.rb @@ -0,0 +1,40 @@ +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.615.0.tar.gz" + sha256 "5394360b517f431949d751f3bcb4150313f28815aded514531c7aaea81bac314" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1faa5858f89b77c2dd492a5ccd6cda74370dc6d2c7d0bcfe840f9282aefa628a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "595d10c58c4361c6a1295b3d3dff7138eb77d700c0cd4c0d97b548df7dfc927d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2fc37a89a3f7d4bf06a790889419a85f6c3f8779bdb808c02d5b43580df8f0aa" + sha256 cellar: :any_skip_relocation, sonoma: "eb29c4055384634a995682654a7baeb1fa06765e05302fc6f0379edf7dcac747" + sha256 cellar: :any_skip_relocation, ventura: "0774047098f7cf7b6ecb92bdd8276aef0e5c992b9985e6e29cac3109832c8e29" + sha256 cellar: :any_skip_relocation, arm64_linux: "6de4f60ee0cd679353d3089b80fd89a62fdd1df0f51b9b5c3cf32526dc95e246" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5e786b1e03793996fac1da7d9a4b8c0a55090212b67c6b054ba508892a22b02" + 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..c4028cdc79bd8 --- /dev/null +++ b/Formula/d/direnv.rb @@ -0,0 +1,28 @@ +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.36.0.tar.gz" + sha256 "edb89ca67ef46a792d4e20177dae9dbd229e26dcbcfb17baa9645c1ff7cc47b0" + license "MIT" + head "https://github.com/direnv/direnv.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "8a1b7af4d31aa491936580dbd610fb42ff7dadfbcf4c17dde7cba96b9455fae7" + sha256 arm64_sonoma: "3ff6d45f5f77b9a52940e919e688b0fbe47a53aa76c6716619dc29f85bc2c149" + sha256 arm64_ventura: "960dc9caf8b3724bf2da2f08b44d4b7feedbe486081cc1958cfe1c03f8439198" + sha256 sonoma: "b9ad0b7bd6d72a57b52a78f481d53f6df54c589c913c4c8837b984719048de7a" + sha256 ventura: "70d7017e51a8f523ebba0650a109e269cd8840366548ff321903a9ccea098cb6" + sha256 x86_64_linux: "81c866237f98a187bd7bbeea7b96e1c05f85aa858142bb264b9b9e6ca33ec9c8" + end + + depends_on "go" => :build + depends_on "bash" + + def install + system "make", "install", "PREFIX=#{prefix}", "BASH_PATH=#{Formula["bash"].opt_bin}/bash" + end + + test do + system bin/"direnv", "status" + end +end diff --git a/Formula/d/direvent.rb b/Formula/d/direvent.rb new file mode 100644 index 0000000000000..98fe110521250 --- /dev/null +++ b/Formula/d/direvent.rb @@ -0,0 +1,35 @@ +class Direvent < Formula + desc "Monitors events in the file system directories" + homepage "https://www.gnu.org.ua/software/direvent/direvent.html" + url "https://ftp.gnu.org/gnu/direvent/direvent-5.4.tar.gz" + mirror "https://ftpmirror.gnu.org/direvent/direvent-5.4.tar.gz" + sha256 "1dbbc6192aab67e345725148603d570c6a2828380c964215762af91524d795ba" + license "GPL-3.0-or-later" + + bottle do + 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..0f1610f11f1dc --- /dev/null +++ b/Formula/d/direwolf.rb @@ -0,0 +1,55 @@ +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.7.tar.gz" + sha256 "6301f6a43e5db9ef754765875592a58933f6b78585e9272afc850acf7c5914be" + 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_sequoia: "fb3b2a272641595f3ea481b05ac39409f75466cdf50fc9592b3cdddeca1b3d20" + sha256 arm64_sonoma: "f15cf78ea350bac7d0daf8663e54242eed663f577400de7630f8225c4e08e340" + sha256 arm64_ventura: "494d3a0854c7d919fa8446915bec34806b387c138fd23210c05ab3677c701faf" + sha256 arm64_monterey: "1c437d0c62b29032faf6eb115caef44b62bc7ef7525d5a137c09eec5015a0f49" + sha256 sonoma: "5ad4a23ede0053b7c587b99514c48982378ad7f5e4ae4871e8b8eea6dccb6249" + sha256 ventura: "e3064f51ee693453adc1e25a4dc7e7f1617f51d070dc209c847a7459968de0dc" + sha256 monterey: "16947ff3e289c953ddb75acb44215ab7f74a5128a20464cfb7f6332b4438f25d" + sha256 cellar: :any_skip_relocation, arm64_linux: "2dc92264176a4397db556c4add6b01609e6a0364a39359f4b9d04adee3b1ec97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b20722ff017ed04a511f79061ad26959cdb92e5c7dc1080dbc22cc05c07e374" + end + + depends_on "cmake" => :build + depends_on "gpsd" + depends_on "hamlib" + + on_macos do + depends_on "portaudio" + end + + on_linux do + depends_on "alsa-lib" + depends_on "systemd" + end + + def install + inreplace "src/decode_aprs.c", "/opt/local/share", share + inreplace "src/symbols.c", "/opt/local/share", share + inreplace "conf/CMakeLists.txt", " /etc/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..e317051fde21a --- /dev/null +++ b/Formula/d/dirt.rb @@ -0,0 +1,47 @@ +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" + + bottle do + rebuild 1 + 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..a94d8376b216c --- /dev/null +++ b/Formula/d/discount.rb @@ -0,0 +1,60 @@ +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-2.2.7d.tar.bz2" + sha256 "12a2041e96ae8cde17e08ff1a215d331580a5c58688daa5a18842b6bb5b77b52" + 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_sequoia: "a570a68edd737474736b516db39db9a072785ff13735f226d0cd8ea056648311" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14e2177eb0728e9d8690a7e6854250f174f5d988a046dd3f071c9beecf930540" + sha256 cellar: :any_skip_relocation, arm64_ventura: "130512a4b6b48f7dc9352cf9591b27f1f3083a2ff22d88e71f47507178a87e43" + sha256 cellar: :any_skip_relocation, arm64_monterey: "19bff1a2b50eae855a70eb7e6ed839f37891b9001f77780245a8c484b009a108" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "49f9e9459165f07289b9e418e1db9398e94acd67fa480d50c2fc6951bd9f4bf8" + sha256 cellar: :any_skip_relocation, sonoma: "4f4407e7dc8307e20dfcb377e033e194c4161ee7128214644065f7a7cb400982" + sha256 cellar: :any_skip_relocation, ventura: "aa3f9a506863629ddcb54c8f52193e4bcf55563d2ad0a6e610bb84b262dad679" + sha256 cellar: :any_skip_relocation, monterey: "698db890a09df9b32fdaa93ac1f178cfbaf497a5b93ede5380c00ea539bcbcc1" + sha256 cellar: :any_skip_relocation, big_sur: "a1cfca46da847dcd5346cecf299b699b6f72826f3f5ab7a25ede643de3c26945" + sha256 cellar: :any_skip_relocation, arm64_linux: "469b554f06ee0e4ef331c971b2a7641615209062c3bb1be004b22b5ecb4107a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ec0cbcf4b9024c8f51ff944c335c2469b85082f8599b34b5b74046c9512afd2" + 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..ea0d01111358e --- /dev/null +++ b/Formula/d/dish.rb @@ -0,0 +1,28 @@ +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.10.4.tar.gz" + sha256 "31b3a04d43fe5fef3ba753ede5e2484d0ca01806ea19819a3d349ec102067295" + license "MIT" + head "https://github.com/thevxn/dish.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3d25c8c7528a83c822fee959c1f96e19fa2046d5504f947deb0f47cd1f4c42bd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3d25c8c7528a83c822fee959c1f96e19fa2046d5504f947deb0f47cd1f4c42bd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3d25c8c7528a83c822fee959c1f96e19fa2046d5504f947deb0f47cd1f4c42bd" + sha256 cellar: :any_skip_relocation, sonoma: "72e5b5e1221c875430f1f223cf67eee61cd510e4c118a015689e5a59f292f6b2" + sha256 cellar: :any_skip_relocation, ventura: "72e5b5e1221c875430f1f223cf67eee61cd510e4c118a015689e5a59f292f6b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eada0861871db7ef90b354073c67436c08047b230ced37ae3c5a782e31da635f" + 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") + 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..558f0de80075a --- /dev/null +++ b/Formula/d/diskonaut.rb @@ -0,0 +1,36 @@ +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" + + bottle do + rebuild 1 + 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..082ff75abc0a9 --- /dev/null +++ b/Formula/d/disktype.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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, mojave: "7b401cb017bbe0f119b590839941ca7a8d77136483f651504382ed595f4280ec" + sha256 cellar: :any_skip_relocation, high_sierra: "b6212feab524e86a8fc1f3c366092af206dee279900ea2753d331b295dd22c14" + sha256 cellar: :any_skip_relocation, sierra: "18ed63d389b55d3dabb84e355323f303013acd46a1905c194b470cc74fc95e4f" + sha256 cellar: :any_skip_relocation, el_capitan: "c1f45dc2bdcec2e3b56741bf03d673f3a99534f851d1c77de59d6832d0f75236" + 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..6b5899c8f0d13 --- /dev/null +++ b/Formula/d/diskus.rb @@ -0,0 +1,30 @@ +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_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..2050f2848fc95 --- /dev/null +++ b/Formula/d/displayplacer.rb @@ -0,0 +1,30 @@ +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_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..d97d0dd98f1d1 --- /dev/null +++ b/Formula/d/dissent.rb @@ -0,0 +1,50 @@ +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.34.tar.gz" + sha256 "54b437cd2ae63c32cf3fa71d4da327c32de949c68911685031c96752d89b2d1a" + license "GPL-3.0-or-later" + head "https://github.com/diamondburned/dissent.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a582ef1d6ea47394a7b6df4d265e629b6e2d26386c871b0e6724f5950be562f6" + sha256 cellar: :any, arm64_sonoma: "f79f724350eca02175363cb382661f0cb5381aee973190cdc269c11b5cff1e7c" + sha256 cellar: :any, arm64_ventura: "4e97c313bbf20d57a379d1642a9023f9a94531893fa61b2954c3f4542ea77e51" + sha256 cellar: :any, sonoma: "f26bc3ae384baa5f76c3caeb13048b93cdd3702ed253c56c3bbad593b7b4e7fc" + sha256 cellar: :any, ventura: "5159ff05405959dd2c6e70a1cbe5ad062c3258e9cb26143457e02680a112bf7b" + sha256 cellar: :any_skip_relocation, arm64_linux: "a17aa8c1d8575302b2da4ba7b6457f325be94d4d6362536b6e7374f12d98f221" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00f1c7ed586d1e26fc81daf2beac7d88287a9f7abdbe496ad602acd601d31afb" + 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..3f8f18ecdfb1d --- /dev/null +++ b/Formula/d/distcc.rb @@ -0,0 +1,99 @@ +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 2 + head "https://github.com/distcc/distcc.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 3 + sha256 arm64_sequoia: "49f0073a59339ec44150cdafd79c3d4ca807780e5e55df49a7030c179025c636" + sha256 arm64_sonoma: "00dcf6bcfda58dbb694516e1f21e5208604894977260101bf2ffc05c57544c44" + sha256 arm64_ventura: "f37c9ba4f2a613091c706b096d14cb4a44ccd38f6254fea5a50614ba55eb228f" + sha256 sonoma: "2eb1710b55e4cc45819f6a3bdd47f67e287e3ff6bd823015130c35a06b84da3f" + sha256 ventura: "72982228dea2fe8ccbcdd364ecc672c90c6c67ecab38732c7350032cb376c4c6" + sha256 arm64_linux: "86215de5512754860d1ae2124359bdf3bb31c022ef5fa4352f08440aac373477" + sha256 x86_64_linux: "b9b24030b5cdd52aa1abdf03c3d85ce35a327a4c3bffd928e466d05e6b118f8b" + end + + depends_on "python@3.13" + + resource "libiberty" do + url "https://ftp.debian.org/debian/pool/main/libi/libiberty/libiberty_20210106.orig.tar.xz" + sha256 "9df153d69914c0f5a9145e0abbb248e72feebab6777c712a30f1c3b8c19047d4" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/d6/4f/b10f707e14ef7de524fe1f8988a294fb262a29c9b5b12275c7e188864aed/setuptools-69.5.1.tar.gz" + sha256 "6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987" + 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.13") + 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..fef32cc6e8a73 --- /dev/null +++ b/Formula/d/distill-cli.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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..368c9395c48f0 --- /dev/null +++ b/Formula/d/distribution.rb @@ -0,0 +1,23 @@ +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" + + 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..898da152825cd --- /dev/null +++ b/Formula/d/distrobox.rb @@ -0,0 +1,31 @@ +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.1.2.tar.gz" + sha256 "3ecbce9b8c5b5df941f986798ffa6ea7fdf742223d42204207974c4323d5b9fc" + license "GPL-3.0-only" + head "https://github.com/89luca89/distrobox.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "98aec5e4ae61cf3ac4284185e988291eccb4d870b16a156d661bfcfd4580d4ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98aec5e4ae61cf3ac4284185e988291eccb4d870b16a156d661bfcfd4580d4ae" + 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..e1c8d6528ec53 --- /dev/null +++ b/Formula/d/dita-ot.rb @@ -0,0 +1,36 @@ +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.1/dita-ot-4.3.1.zip" + sha256 "e0c4dbab82de03076d4b7fa7e22bd0ae6ed29a5d63e972fbeb7cb9571cb18e2a" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "68f93968fe8b2a9750f00cf366ebd2a6857035f1fa05d1fe57ca947568783eaf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68f93968fe8b2a9750f00cf366ebd2a6857035f1fa05d1fe57ca947568783eaf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "68f93968fe8b2a9750f00cf366ebd2a6857035f1fa05d1fe57ca947568783eaf" + sha256 cellar: :any_skip_relocation, sonoma: "1ad7a7dfa44099570465acd1059e89c9ceadb2b6f2cae24fb1aaf74ade65fe8c" + sha256 cellar: :any_skip_relocation, ventura: "1ad7a7dfa44099570465acd1059e89c9ceadb2b6f2cae24fb1aaf74ade65fe8c" + sha256 cellar: :any_skip_relocation, arm64_linux: "aed6e7b84c823f4e9c15934449e88ebe0210a7de34ef968bc2785c74634933a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aed6e7b84c823f4e9c15934449e88ebe0210a7de34ef968bc2785c74634933a8" + 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 + 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..24d3bfc48e1b4 --- /dev/null +++ b/Formula/d/ditaa.rb @@ -0,0 +1,24 @@ +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 + + 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..81ad81a4839f8 --- /dev/null +++ b/Formula/d/dive.rb @@ -0,0 +1,34 @@ +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_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, x86_64_linux: "a0eea0c4d2dc63bfa43c121fc136bd18ba3b1fed57f5e3aedae0ca2c57b35097" + end + + depends_on "go" => :build + + def install + 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..2d27e738553ee --- /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.1.tar.gz" + sha256 "07387d6874e47225804bc589282165af137b9d3214e1b55590b2d33201f36c70" + 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: "4e20fed6f8306d964efba520d1d9fb2f9bc34e445885e036add3bb86dab6c0fc" + 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..d76ebd5600d2e --- /dev/null +++ b/Formula/d/djbdns.rb @@ -0,0 +1,73 @@ +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 + + bottle do + rebuild 3 + 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 mojave: "b57557c57ac07e053f78b2e73aed4cc9ec72a0c89d68e4ca8bc1dd3b2b9cddba" + sha256 high_sierra: "f6555710c361d47fabfeeb6d8148b84c3a7e973ba4407def4f0a37e327ac3a5b" + sha256 sierra: "ce72334aa541af3a486f90e32b2162ba8b5c86825f0a52f1b6de9cb33640eeff" + sha256 el_capitan: "9bbf4356e0bb4e25827fdf02d4efa0fc3763600456ad76e63f662dae6e1fb4ce" + 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..331cab4fb85f9 --- /dev/null +++ b/Formula/d/djhtml.rb @@ -0,0 +1,37 @@ +class Djhtml < Formula + include Language::Python::Virtualenv + + desc "Django/Jinja template indenter" + homepage "https://github.com/rtts/djhtml" + url "https://files.pythonhosted.org/packages/9f/e8/1919adec35e3a7e02ec874b7a95b811f03ad6dc9efcfe72d18e0a359f12a/djhtml-3.0.7.tar.gz" + sha256 "558c905b092a0c8afcbed27dea2f50aa6eb853a658b309e4e0f2bb378bdf6178" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f04ac1e5d07cff0015fd4bdc56e8f96b67a16836f1a4c7f31392f1f92c93033f" + end + + depends_on "python@3.13" + + 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..8e9c8f240cc51 --- /dev/null +++ b/Formula/d/djl-serving.rb @@ -0,0 +1,51 @@ +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.33.0.tar" + sha256 "48326bdeacba973ac54d8f07e22b6be0a0edafe2e1377d7031665d5efe726691" + 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: "9d0f31ed27572681ddd8cc68ecb6396fd1697ad89cd56bec21fa22f8f3017a38" + 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}}" } + 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"] + 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..f597169bc514d --- /dev/null +++ b/Formula/d/djlint.rb @@ -0,0 +1,95 @@ +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 1 + sha256 cellar: :any, arm64_sequoia: "ffffd50d9a981e616541d88a685b44ddd5fdb425873563681e3c0611775f48f7" + sha256 cellar: :any, arm64_sonoma: "15f38fb5cc8c6d57101be9f42ddef52a9e8c82b23874dff59b2051c282656e11" + sha256 cellar: :any, arm64_ventura: "25d8dd0b2238eef47a3f7d9cde2ff99c5bac124bdae44855aba1ef11fd4f977b" + sha256 cellar: :any, sonoma: "b6d24985a8a4d539ff7b2ce6f121eda24a96691ef42b5785714cd0394e9c7d9e" + sha256 cellar: :any, ventura: "2f351016b97bf06731b52dfca66ae25fd7b2d8a95442bf70e0c011789dd63105" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ed4e4ed73c1cddad3648f66cd8c9e87bfc8aa9aefaccefb7528b4f200171f89" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa3b3445307399671cdda0fb78276dc88e33823b28c4db26a27ded1f8ff9e4e9" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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 "cssbeautifier" do + url "https://files.pythonhosted.org/packages/e5/66/9bfd2d69fb4479d38439076132a620972939f7949015563dce5e61d29a8b/cssbeautifier-1.15.1.tar.gz" + sha256 "9f7064362aedd559c55eeecf6b6bed65e05f33488dcbe39044f0403c26e1c006" + end + + resource "editorconfig" do + url "https://files.pythonhosted.org/packages/b4/29/785595a0d8b30ab8d2486559cfba1d46487b8dcbd99f74960b6b4cca92a4/editorconfig-0.17.0.tar.gz" + sha256 "8739052279699840065d3a9f5c125d7d5a98daeefe53b0e5274261d77cb49aa2" + end + + resource "jsbeautifier" do + url "https://files.pythonhosted.org/packages/69/3e/dd37e1a7223247e3ef94714abf572415b89c4e121c4af48e9e4c392e2ca0/jsbeautifier-1.15.1.tar.gz" + sha256 "ebd733b560704c602d744eafc839db60a1ee9326e30a2a80c4adb8718adc1b24" + end + + resource "json5" do + url "https://files.pythonhosted.org/packages/85/3d/bbe62f3d0c05a689c711cff57b2e3ac3d3e526380adb7c781989f075115c/json5-0.10.0.tar.gz" + sha256 "e66941c8f0a02026943c52c2eb34ebeb2a6f819a0be05920a6f5243cd30fd559" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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 + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"djlint", shells: [:fish, :zsh], 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..99d8be57171e6 --- /dev/null +++ b/Formula/d/djview4.rb @@ -0,0 +1,83 @@ +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.tar.gz" + sha256 "5673c6a8b7e195b91a1720b24091915b8145de34879db1158bc936b100eaf3e3" + license "GPL-2.0-or-later" + revision 2 + + livecheck do + url :stable + regex(%r{url=.*?/djview[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "50f358049ae7371431b1640620050d40f9075e998695efc69e3cfc228955d189" + sha256 cellar: :any, arm64_sonoma: "aeec9249493e568780d0760a7c11d597c51e9a89835d9d7be3a3512510dd6e09" + sha256 cellar: :any, arm64_ventura: "a852adaa4bb85ae49414a271aa1b183595b523d994d338567a18384097ce1abf" + sha256 cellar: :any, arm64_monterey: "7386959e5881c110ca398bd1ec94f962a4d726ea659ef26c804cbf68aaf4fceb" + sha256 cellar: :any, arm64_big_sur: "2da284a44e3e0a0a1a5dc29c7b6c71ef3e014d13d81846c9d7e88293b005081f" + sha256 cellar: :any, sonoma: "fb06597b392db6503ee92b70ee0074a0880b58e2d5fed3999d3b2c40b0039d28" + sha256 cellar: :any, ventura: "7c8e2da786b4d91a1d4af0991a7d8e49903c80101377a10f8b6920559e25aff1" + sha256 cellar: :any, monterey: "d5c2c116e402498ec6ffd6261ee5eeaec4374a6d9ec7b37c7cb4f5ff7f316b81" + sha256 cellar: :any, big_sur: "8f03e13feeb1f0e19b8a1f1b5638990557aaad04916e06826bee7511a0dbfbf4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ad7de2463c9ef2720b7bd1a854ac73ed84bdf0ecb6273146a9a404a48b78eca" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "djvulibre" + depends_on "libtiff" + depends_on "qt@5" + + # Fix QT detection when multiple Xcode installations are present. + # Submitted upstream: https://sourceforge.net/p/djvu/patches/44/ + patch :DATA + + def install + system "autoreconf", "--force", "--install", "--verbose" + + system "./configure", "--with-x=no", + "--disable-nsdejavu", + "--disable-desktopfiles", + "--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? + prefix.install "src/djview.app" + bin.write_exec_script prefix/"djview.app/Contents/MacOS/djview" + else + prefix.install "src/djview" + end + end + + test do + name = if OS.mac? + "djview.app" + else + "djview" + end + assert_path_exists prefix/name + end +end + +__END__ +diff --git a/config/acinclude.m4 b/config/acinclude.m4 +index 3c78d41..8eb0575 100644 +--- a/config/acinclude.m4 ++++ b/config/acinclude.m4 +@@ -314,7 +314,7 @@ message(QT_INSTALL_BINS="$$[QT_INSTALL_BINS]") + changequote([, ])dnl + EOF + if ( cd conftest.d && $QMAKE > conftest.out 2>&1 ) ; then +- sed -e 's/^.*: *//' < conftest.d/conftest.out > conftest.d/conftest.sh ++ grep "Project MESSAGE:" < conftest.d/conftest.out | sed -e 's/^.*: *//' > conftest.d/conftest.sh + . conftest.d/conftest.sh + rm -rf conftest.d + else diff --git a/Formula/d/djvu2pdf.rb b/Formula/d/djvu2pdf.rb new file mode 100644 index 0000000000000..ed43bc585d950 --- /dev/null +++ b/Formula/d/djvu2pdf.rb @@ -0,0 +1,29 @@ +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 + + 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..4380d87c8e879 --- /dev/null +++ b/Formula/d/djvulibre.rb @@ -0,0 +1,47 @@ +class Djvulibre < Formula + desc "DjVu viewer" + homepage "https://djvu.sourceforge.net/" + url "https://downloads.sourceforge.net/djvu/djvulibre-3.5.28.tar.gz" + sha256 "fcd009ea7654fde5a83600eb80757bd3a76998e47d13c66b54c8db849f8f2edc" + license "GPL-2.0-or-later" + revision 2 + + livecheck do + url :stable + regex(%r{url=.*?/djvulibre[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_sequoia: "251aeb1ba6581281a3742cac327422498cc251097f79c56e4b262a4a32f178b3" + sha256 arm64_sonoma: "509e80c15c07de6b03d1bf3d729537d0abb30849c55b4aac092f6d760391ad8d" + sha256 arm64_ventura: "03c2b8a0fd889f5286436b3b2b1b8b10ceec29ed133756d8bb64ac20f867d0bf" + sha256 arm64_monterey: "f39559ac1a9d9e3351dcc2d77384875434a8aa7d84406d0f5214dd42e86759e5" + sha256 arm64_big_sur: "b2c030948a6296ea93065ac207b7d71effd08a1126abc9a8365186cf4d04bf73" + sha256 sonoma: "4a6bb80e8624388a8ec2b760b43908b8dcd45dd317026f0530c8d77a133d7d3e" + sha256 ventura: "437c4982f64bf9f3c17d3dc6e07a204770a8028ee924f23ddd0f09af9cd4fbc4" + sha256 monterey: "5c208fecddc8a56aae519f38d52a06c2b6f261b094077e05b43cebc9d452f3cd" + sha256 big_sur: "d325152b1930974548997efcf819595fefcddd23cebaee2e22718cc3296d1957" + sha256 arm64_linux: "0a162655cbf3a5344f2557b5863b79845330f1783b61da7ed9c8b4806c5f9ed8" + sha256 x86_64_linux: "16b50bba79b4dba1593db9633d8a396633e02dd015f5858f19eb8ad9aff3142f" + 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..2c9e3902db21c --- /dev/null +++ b/Formula/d/dlib.rb @@ -0,0 +1,63 @@ +class Dlib < Formula + desc "C++ library for machine learning" + homepage "http://dlib.net/" + url "https://github.com/davisking/dlib/archive/refs/tags/v19.24.9.tar.gz" + sha256 "65ff8debc3ffea84430bdd4992982082caf505404e16d986b7493c00f96f44e9" + 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_sequoia: "d837ecfb66b6f9dcf3e3da883b3e0f1ba898dcc98d9a7ca1ec466b4e3574cd43" + sha256 cellar: :any, arm64_sonoma: "4e0d8452b3aefab4c2aa2b1aa86cca6527d8b2273bc9ece1c7f30e8f72098be3" + sha256 cellar: :any, arm64_ventura: "267c714e2e908103d442163f2a9c1c3e07b5026bed843c20ac18376c12bf2071" + sha256 cellar: :any, sonoma: "17d127462b3a90968452527f849804c9d1f9793496bac0cff3baea46e96a0340" + sha256 cellar: :any, ventura: "15efa5a0d0cf21ea1f5593be6371731cab3ea7457e2dd98716114deb13f6d1ea" + sha256 cellar: :any_skip_relocation, arm64_linux: "c901a7c6e4001e0a455c88c99fac88f4041a474b599f64cd76daa756948b59d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f81a4a177a3c24c9e26bc7c4b21348774eb2813897f76d56115e9a790d984756" + 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..431440ab4e9d9 --- /dev/null +++ b/Formula/d/dmagnetic.rb @@ -0,0 +1,51 @@ +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 + + bottle do + 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..88b688dfb5a08 --- /dev/null +++ b/Formula/d/dmalloc.rb @@ -0,0 +1,37 @@ +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 + + bottle do + 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, mojave: "40c8cf6501477c243064179e7b634da0d9d32348155d3aee9fbf6631ffdc7ba7" + 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..194892346a50d --- /dev/null +++ b/Formula/d/dmd.rb @@ -0,0 +1,135 @@ +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 + + 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 + + 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.*"] + + dflags = "-I#{opt_include}/dlang/dmd -L-L#{opt_lib}" + # We include the -ld_classic linker argument in dmd.conf because it seems to need + # changes upstream to support the newer linker: + # https://forum.dlang.org/thread/jwmpdecwyazcrxphttoy@forum.dlang.org?page=1 + # https://github.com/ldc-developers/ldc/issues/4501 + # + # Also, macOS can't run CLT/Xcode new enough to need this flag, so restrict to Ventura + # and above. + dflags << " -L-ld_classic" if OS.mac? && DevelopmentTools.clang_build_version >= 1500 + + (buildpath/"dmd.conf").write <<~EOS + [Environment] + DFLAGS=#{dflags} + EOS + 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..8bd32f3f12074 --- /dev/null +++ b/Formula/d/dmenu.rb @@ -0,0 +1,42 @@ +class Dmenu < Formula + desc "Dynamic menu for X11" + homepage "https://tools.suckless.org/dmenu/" + url "https://dl.suckless.org/tools/dmenu-5.3.tar.gz" + sha256 "1a8f53e6fd2d749839ec870c5e27b3e14da5c3eeacbfcb945d159e1d5433795f" + 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_sequoia: "cd2aa831875be36cf4b70d2ca1b74ed2d8a652fbc040738a65ca31affeb2a312" + sha256 cellar: :any, arm64_sonoma: "351c0e07f7f4d729ccc4aa68c72aa5c0a4a58b612b07ff395d90dcf43d36a8d9" + sha256 cellar: :any, arm64_ventura: "51802214393325c58ee3cbc2571b7a9b92e82d3121f46149ce35aae78e1bd9dd" + sha256 cellar: :any, arm64_monterey: "0fd492daa5a3cd89f23dde5c292784faf55926d49278fa1094d79521bfb6b993" + sha256 cellar: :any, sonoma: "c39dc953009890c423d335046ef11928bb30265dc6dfda78acff84d715e79e18" + sha256 cellar: :any, ventura: "d6b512a8f65209bcec6f5880536229a6759df63320f5c58c38d129e133008e2e" + sha256 cellar: :any, monterey: "02ea9509edf2450330ab9d3351fa9671ae3198f09981e1288b806ae7952da028" + sha256 cellar: :any_skip_relocation, arm64_linux: "00ef849437676f26e9a00ee2a88addd3b9360d10bd9edeb8552463a5c0c9bc7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61976695e10967a0baa33883aef22eebc3c5b92dd54e2c873732bc4760f16a39" + 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..60c1be163de91 --- /dev/null +++ b/Formula/d/dmg2img.rb @@ -0,0 +1,52 @@ +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 + + bottle do + rebuild 1 + 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/formula-patches/b21aeee/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..ad6f3c43ad9c3 --- /dev/null +++ b/Formula/d/dmtx-utils.rb @@ -0,0 +1,58 @@ +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 + + bottle do + 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/dns2tcp.rb b/Formula/d/dns2tcp.rb new file mode 100644 index 0000000000000..6d94c21fdb6ca --- /dev/null +++ b/Formula/d/dns2tcp.rb @@ -0,0 +1,49 @@ +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 + + bottle do + 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, mojave: "f44f4f2e761da51c4552b6c394ae3ee48e2c1ff8b1b506cf35e648b3331b49dd" + sha256 cellar: :any_skip_relocation, high_sierra: "d6fb240175854e0a0b5069544a58c4fbcd161d3337288c2f289f48999c4dde10" + sha256 cellar: :any_skip_relocation, sierra: "e948ddde1e95f055a9cd3e73cd2756c22f729d9feed9ebc2929cb3df6fe09584" + sha256 cellar: :any_skip_relocation, el_capitan: "2cd5e77bec42f0f5e2715494c38eb8773ab30d53b140509d3f428d38890bf640" + 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..6441f103ad530 --- /dev/null +++ b/Formula/d/dnscontrol.rb @@ -0,0 +1,58 @@ +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.20.0.tar.gz" + sha256 "61fae2bf6fe20a8bb2f4b3313ea4c3add3068e280a2fb74b02e18c8fbe65c17b" + 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_sequoia: "5f54d2ea13319f4a443232ababa883046ef17e9540b13d529e6742aa59c4bfc9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f54d2ea13319f4a443232ababa883046ef17e9540b13d529e6742aa59c4bfc9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5f54d2ea13319f4a443232ababa883046ef17e9540b13d529e6742aa59c4bfc9" + sha256 cellar: :any_skip_relocation, sonoma: "79337f7bc293a980233782d79a589ea16575830a3752e5c9ec45a85d9f1f89b0" + sha256 cellar: :any_skip_relocation, ventura: "79337f7bc293a980233782d79a589ea16575830a3752e5c9ec45a85d9f1f89b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "422724e41057b2e46794178106ab088ade3c5628b63365faca283e32effe1dcf" + 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/"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..a8566a934f2f7 --- /dev/null +++ b/Formula/d/dnscrypt-proxy.rb @@ -0,0 +1,71 @@ +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.8.tar.gz" + sha256 "db2d593d084d034235faaf09743318b4039fb5be2d3a6e17cb0157091d23f4db" + 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_sequoia: "91e4c78e3601aab2a1f8e50217260da27d501d7b0cf13858d063c7b278ae95b2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91e4c78e3601aab2a1f8e50217260da27d501d7b0cf13858d063c7b278ae95b2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "91e4c78e3601aab2a1f8e50217260da27d501d7b0cf13858d063c7b278ae95b2" + sha256 cellar: :any_skip_relocation, sonoma: "3bc6a5fdd903b3d15717eb20446c9e59ba54f6e03d16e9c5078795c82896c9bf" + sha256 cellar: :any_skip_relocation, ventura: "3bc6a5fdd903b3d15717eb20446c9e59ba54f6e03d16e9c5078795c82896c9bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8957c4861f3297da76902a9a0cbe729aa71882662b683ba65e3f012b239537d5" + 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..579adcec1dc04 --- /dev/null +++ b/Formula/d/dnscrypt-wrapper.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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" + + on_macos do + depends_on arch: :x86_64 # https://github.com/cofyc/dnscrypt-wrapper/issues/177 + end + + def install + 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..2b46c5d18030b --- /dev/null +++ b/Formula/d/dnsdist.rb @@ -0,0 +1,53 @@ +class Dnsdist < Formula + desc "Highly DNS-, DoS- and abuse-aware loadbalancer" + homepage "https://www.dnsdist.org/" + url "https://downloads.powerdns.com/releases/dnsdist-1.9.9.tar.bz2" + sha256 "e86bc636d4d2dc8bac180ec8cdafbfe5f35229b6005ec15d7510fb6f58b49f5a" + license "GPL-2.0-only" + + livecheck do + url "https://downloads.powerdns.com/releases/" + regex(/href=.*?dnsdist[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "a73dc1b7b52577e052279e557fa6518c49463939fc166cbd36cd8b4b9353e801" + sha256 cellar: :any, arm64_sonoma: "61ecb524ae7eb13da09003ba59f303ac187c0f618863db1017d55afc2d2c9c04" + sha256 cellar: :any, arm64_ventura: "bb3a7bbbd5fbf16d754418dc368b029c407cbbc620d22af809747be807d314e1" + sha256 cellar: :any, sonoma: "62c7166340f3fce2a10d11a85b82f08f61f6b9c59307790663b3d2ede21c8c8b" + sha256 cellar: :any, ventura: "e0fd1cbde4a31acb149bbf155dcd7b832f61edae6a7da1dc69acf4c196bd3483" + sha256 cellar: :any_skip_relocation, arm64_linux: "976fd9d3f2689b8988f52953343ffe9cb9c83e57b86ecf84c7b42a5955277e32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42dbdf2e4312b61ace402dac35be28e93f7339e3a587fd0c866dddb73bd708b6" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + depends_on "abseil" + 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" + + def install + 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..2f3fa62250f1c --- /dev/null +++ b/Formula/d/dnsgen.rb @@ -0,0 +1,74 @@ +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" + head "https://github.com/AlephNullSK/dnsgen.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "0c01003d3350f795d946702e6853000f34c5436839ae5771deef6b84da57e2b6" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/9d/db/3ef5bb276dae18d6ec2124224403d1d67bccdbefc17af4cc8f553e341ab1/filelock-3.16.1.tar.gz" + sha256 "c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435" + 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/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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"dnsgen", shells: [:fish, :zsh], 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..88905fc771c86 --- /dev/null +++ b/Formula/d/dnsmap.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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..4069d6622e644 --- /dev/null +++ b/Formula/d/dnsmasq.rb @@ -0,0 +1,72 @@ +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_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..c8e5ec080580e --- /dev/null +++ b/Formula/d/dnsperf.rb @@ -0,0 +1,41 @@ +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_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..96e742d1c8437 --- /dev/null +++ b/Formula/d/dnsrobocert.rb @@ -0,0 +1,327 @@ +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" + head "https://github.com/adferrand/dnsrobocert.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ee39aa184197d2415e17fceb34a124e8da3a293ee52da740c2ea55b2099609c3" + sha256 cellar: :any, arm64_sonoma: "32f8817d5c2a29cde6d7baee541db30283293368c32e2ce6d61a1f4c1c362bab" + sha256 cellar: :any, arm64_ventura: "03d3f6469d38e2223e80a940da31cfb81e0f41b7a1497329d41694d62ff24ac1" + sha256 cellar: :any, sonoma: "4ed6e50ef214f233f75901703ebca38a1640ae0a7512a02f0b46efe86789f68a" + sha256 cellar: :any, ventura: "17fe6f60e94c1c54a373c44c7fce80f8c0882aab11cadbe86db26c1455660f29" + sha256 cellar: :any_skip_relocation, arm64_linux: "f659ad93ca0aa04e02ba1b720d351d839bd3651abfacc47556e312d97031df11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ea90acaea7dd8a2e68c03d239f47edb6bc5b7dc1879790937907a79dff115e8" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "acme" do + url "https://files.pythonhosted.org/packages/c6/aa/8d598e7338fb9677a9084c27d86e51f3732c541be161d77a24e28f23b6f2/acme-4.0.0.tar.gz" + sha256 "972d6e0b160000ae833aaa9619901896336e5dc7ca82003fa6ff465bafcbdf52" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/f0/3c/adaf39ce1fb4afdd21b611e3d530b183bb7759c9b673d60db0e347fd4439/beautifulsoup4-4.13.3.tar.gz" + sha256 "1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/89/74/001695948752bc1b5357677eb2635e059f464b22c3eb5f9411ec4e8c48a3/boto3-1.37.33.tar.gz" + sha256 "4390317a1578af73f1514651bd180ba25802dcbe0a23deafa13851d54d3c3203" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f4/1d/0c539ae261d2f8fe8b47c358b369ec58645bf0ea96b78825365e48675b67/botocore-1.37.33.tar.gz" + sha256 "09b213b0d0500040f85c7daee912ea767c724e43ed61909e624c803ff6925222" + end + + resource "certbot" do + url "https://files.pythonhosted.org/packages/00/91/a7acb7a9f7f065bf7f4aa356ecae039f229798eeceed205f397f329cd666/certbot-4.0.0.tar.gz" + sha256 "a867bfbb5126516c12d4c8a93909ef1e4d5309fc4e9f5b97b2d987b0ffd4bbe3" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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 "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/70/8a/73f1008adfad01cb923255b924b1528727b8270e67cb4ef41eabdc7d783e/ConfigArgParse-1.7.tar.gz" + sha256 "e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1" + 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/de/7f/1088bb43e65813ea634d2b0edb230611db72f932652c60140e1e29bf30c4/dns_lexicon-3.21.0.tar.gz" + sha256 "30b9c1e0ed9b6884c11957355d5386b8f5e1cadd90e979034bec667e850ef484" + 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/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + 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 "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/a9/29/e7c14150f200c5cd49d1a71b413f61b97406f57872ad693857982c0869c9/josepy-2.0.0.tar.gz" + sha256 "e7d7acd2fe77435cda76092abe4950bb47b597243a8fb733088615fa6de9ec40" + 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/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + 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/80/61/d3dc048cd6c7be6fe45b80cedcbdd4326ba4d550375f266d9f4246d0f4bc/lxml-5.3.2.tar.gz" + sha256 "773947d0ed809ddad824b7b14467e1a481b8976e87278ac4a730c2f7c7fcddc1" + 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 "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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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/e1/bd15cb8ffdcfeeb2bdc215de3c3cffca11408d829e4b8416dcfe71ba8854/prompt_toolkit-3.0.50.tar.gz" + sha256 "544748f3860a2623ca5cd6d2795e7a14f3d0e1c3c9728359013f79877fc89bab" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + 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/f0/d2/6587e8ec3951cbd97c56333d11e0f8a3a4cb64c0d6ed101882b7b31c431f/pyrfc3339-2.0.1.tar.gz" + sha256 "e47843379ea35c1296c3b6c67a948a1a490ae0584edfcbdea0eaffb5dd29960b" + 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 "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/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 "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/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/0f/ec/aa1a215e5c126fe5decbee2e107468f51d9ce190b9763cb649f76bb45938/s3transfer-0.11.4.tar.gz" + sha256 "559f161658e1cf0a911f45940552c696735f5c74e64362e515f333ebed87d679" + 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/fa/5a/316006203339a08d3871a1494e75e266e39ba0ccc6cf857d20e05d2fcdc8/softlayer-6.2.6.tar.gz" + sha256 "6e9d874648cbf234d49ee4f5b0829f6bcd4d706adf88318ed1b27a47debc7e5d" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + end + + resource "tencentcloud-sdk-python" do + url "https://files.pythonhosted.org/packages/49/e9/bd57d8403befa9f6da0899f0d53646ee2084f8632f2a1c1b145073c734b7/tencentcloud-sdk-python-3.0.1359.tar.gz" + sha256 "419d788ec413bc9a7c0711912787f22d9dd52033a359319a54a2d00d7ab47b9b" + end + + resource "tldextract" do + url "https://files.pythonhosted.org/packages/20/7a/e469c4f71231a848492da31a7be6921a6cd04ecc8eed58e924bece0fb6de/tldextract-5.2.0.tar.gz" + sha256 "c3a8c4daf2c25a57f54d6ef6762aeac7eff5ac3da04cdb607130be757b8457ab" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "zeep" do + url "https://files.pythonhosted.org/packages/09/35/4a91181499a1e098cb01e04a26a053714adf2fb1c25b40fdc5f46cfe2e4f/zeep-4.3.1.tar.gz" + sha256 "f45385e9e1b09d5550e0f51ab9fa7c6842713cab7194139372fd82a99c56a06e" + 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..0a69d5dfed8ce --- /dev/null +++ b/Formula/d/dnstop.rb @@ -0,0 +1,46 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "fc741283d3b21ab68de0972c733b38ac01c363a0588254c41ad19f5591f32bda" + sha256 cellar: :any_skip_relocation, high_sierra: "4d6b9a2f15e3165ccf63b67752cd4f0d21b128f64b5f22beb2c2b0657e082709" + sha256 cellar: :any_skip_relocation, sierra: "dc995c2857fdd5093ae753844ce5c45ed00bae59184528a184e0313b25882802" + sha256 cellar: :any_skip_relocation, el_capitan: "1d5b1ad056475ce9a27f40b48cbbf58421e4eb66fd134ac318413de2d025db66" + 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..be726bd1a0ea0 --- /dev/null +++ b/Formula/d/dnstracer.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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, mojave: "8fceeded94f224e8204c253197d742e5d2f94a83684b5ca0613f50841bd0ebe6" + sha256 cellar: :any_skip_relocation, high_sierra: "29086b127a2967e8e481c60e397fe803165be2d1ad46be7176642567d8844cc0" + sha256 cellar: :any_skip_relocation, sierra: "4d89811df14c8564d1ad2dae5a2f45f5e11a51f7b7ecb5f75f692b9507451b7b" + sha256 cellar: :any_skip_relocation, el_capitan: "d90b34cfc2d03af3c80ef6118484ddff05863a0e4d9a7a5db8bcf3801bcb3414" + sha256 cellar: :any_skip_relocation, arm64_linux: "396697504e1ed5de305ae93a03540549bde4be87839036df19439584a39dcdfc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5a8f70b7d7d09e10e995f908c4b581a9d3f2ea201719e768e7e65c022f8eb7d" + end + + 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 diff --git a/Formula/d/dnstwist.rb b/Formula/d/dnstwist.rb new file mode 100644 index 0000000000000..39a452d512fe7 --- /dev/null +++ b/Formula/d/dnstwist.rb @@ -0,0 +1,138 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "155b1759127de52b40f5d5b43ba1c4829de6542f0ad11d8124cc302aabcce6ff" + sha256 cellar: :any, arm64_sonoma: "1b28cfe782794e8b9496c6369a2cd6eeaf702a99966064b8cca278d250d64a31" + sha256 cellar: :any, arm64_ventura: "1fe7055f364955332df41950d1dc83e507d73f0e6ab185bdfbae25deb5374021" + sha256 cellar: :any, sonoma: "6bff9f746169de05da2bbcd1cbc44030e3122c5e48d1fc7e21746e4893293173" + sha256 cellar: :any, ventura: "e1cfb7957433647148b2831338d2b4b729b356f027377b857b29e713f2e5fa14" + sha256 cellar: :any_skip_relocation, arm64_linux: "dbcbe3aa4502529cb739bbc7f68de1adf48e5c3cf3ae4191fbac8e4b00078b07" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da7a5f81a7476529d05c5d55677a715454934914c5686cc7ff19c2eb0d57cea7" + end + + depends_on "certifi" + depends_on "libmaxminddb" + depends_on "python@3.13" + depends_on "ssdeep" + + uses_from_macos "libffi" + + on_linux do + depends_on "whois" + end + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/7f/55/e4373e888fdacb15563ef6fa9fa8c8252476ea071e96fb46defac9f18bf2/aiohappyeyeballs-2.4.4.tar.gz" + sha256 "5fdd7d87889c63183afc18ce9271f9b0a7d32c2303e394468dd45d514a757745" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/fe/ed/f26db39d29cd3cb2f5a3374304c713fe5ab5a0e4c8ee25a0c45cc6adf844/aiohttp-3.11.11.tar.gz" + sha256 "bb49c7f1e6ebf3821a42d81d494f538107610c3a705987f53068546b0e90303e" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/49/7c/fdf464bcc51d23881d110abd74b512a42b3d5d376a55a831b44c603ae17f/attrs-25.1.0.tar.gz" + sha256 "1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + end + + resource "geoip2" do + url "https://files.pythonhosted.org/packages/17/d7/21cfa1072b8ec5937c6af0cf8b624b4be9b44a7ca82f4335900df5482076/geoip2-5.0.1.tar.gz" + sha256 "90af8b6d3687f3bef251f2708ad017b30d627d1144c0040eabc4c9017a807d86" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "maxminddb" do + url "https://files.pythonhosted.org/packages/57/ae/422ec0f3b6a40f23de9477c42fce90126a3994dd51d06b50582973c0088e/maxminddb-2.6.3.tar.gz" + sha256 "d2c3806baa7aa047aa1bac7419e7e353db435f88f09d51106a84dbacf645d254" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + end + + resource "ppdeep" do + url "https://files.pythonhosted.org/packages/64/ad/ca722788606970d227b1778c158d4a04ffd8190487fa80b3273e3fa587ac/ppdeep-20200505.tar.gz" + sha256 "acc74bb902e6d21b03d39aed740597093c6562185bfe06da9b5272e01c80a1ff" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/20/c8/2a13f78d82211490855b2fb303b6721348d0787fdd9a12ac46d99d3acde1/propcache-0.2.1.tar.gz" + sha256 "3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "tld" do + url "https://files.pythonhosted.org/packages/19/2b/678082222bc1d2823ea8384c6806085b85226ff73885c703fe0c7143ef64/tld-0.13.tar.gz" + sha256 "93dde5e1c04bdf1844976eae440706379d21f4ab235b73c05d7483e074fb5629" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/b7/9d/4b94a8e6d2b51b599516a5cb88e5bc99b4d8d4583e468057eaa29d5f0918/yarl-1.18.3.tar.gz" + sha256 "ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1" + 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.13") + 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..1e645b344f1be --- /dev/null +++ b/Formula/d/dnsviz.rb @@ -0,0 +1,58 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "00110e902d3a1519334f1226603864e95d9d93c669d43c6fbf37aa27b08915d2" + sha256 cellar: :any, arm64_sonoma: "7cd031019ebadc5e47683d83d1d5828b5eb3baaa058ea3d69fb74b1a97906c22" + sha256 cellar: :any, arm64_ventura: "b2fbd7dcdf0549567e1da7bf6ea52f57be4a2abfc81ecaba08dda9ce5c35bc01" + sha256 cellar: :any, sonoma: "0682b0b1bbcd7b5e43d2304c3739f682eb29b6d47a1967f484bd3ba794d96ad6" + sha256 cellar: :any, ventura: "d1765ce90cc43961a8592c8abda79368e9cf9c1c0bc000fc536720ca0ab89e5d" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a96068801bd4e01adcc3a7441f41a498b0a6b88cc5b1fe8fbe6d5461975f6f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d105d485eb7a835fec8e4c6b7af690ba215c77b540a7d5b3954e2558e799e26" + end + + depends_on "bind" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "swig" => :build + depends_on "json-c" => :test + depends_on "cryptography" + depends_on "graphviz" + depends_on "openssl@3" + depends_on "python@3.13" + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + 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..ac773cf542e0a --- /dev/null +++ b/Formula/d/dnsx.rb @@ -0,0 +1,30 @@ +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: "master" + + bottle do + 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, 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..e0a2a00b0f1ce --- /dev/null +++ b/Formula/d/doc8.rb @@ -0,0 +1,61 @@ +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/11/28/b0a576233730b756ca1ebb422bc6199a761b826b86e93e5196dfa85331ea/doc8-1.1.2.tar.gz" + sha256 "1225f30144e1cc97e388dbaf7fe3e996d2897473a53a6dae268ddde21c354b98" + license "Apache-2.0" + head "https://github.com/PyCQA/doc8.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c3b10a7def5a70553f390474664fa3dbdfe53bcb207536fa28459dbf0482e222" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c3b10a7def5a70553f390474664fa3dbdfe53bcb207536fa28459dbf0482e222" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c3b10a7def5a70553f390474664fa3dbdfe53bcb207536fa28459dbf0482e222" + sha256 cellar: :any_skip_relocation, sonoma: "fc866ff039478a505cb59eb61e6150a4b0aa50c12a6aa9c9c31c6a9ed7b4e5b6" + sha256 cellar: :any_skip_relocation, ventura: "fc866ff039478a505cb59eb61e6150a4b0aa50c12a6aa9c9c31c6a9ed7b4e5b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "91dca4d2cf20ac5bfcd98748cff5c0bf1df44253affc1cba3b5cd4aee1f3a334" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3b10a7def5a70553f390474664fa3dbdfe53bcb207536fa28459dbf0482e222" + end + + depends_on "python@3.13" + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/b2/35/80cf8f6a4f34017a7fe28242dc45161a1baa55c41563c354d8147e8358b2/pbr-6.1.0.tar.gz" + sha256 "788183e382e3d1d7707db08978239965e8b9e4e5ed42669bf4758186734d5f24" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + 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/c4/59/f8aefa21020054f553bf7e3b405caec7f8d1f432d9cb47e34aaa244d8d03/stevedore-5.3.0.tar.gz" + sha256 "9a64265f4060312828151c204efbe9b7a9852a0d9228756344dbc7e4023e375a" + 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/docbook-xsl.rb b/Formula/d/docbook-xsl.rb similarity index 77% rename from Formula/docbook-xsl.rb rename to Formula/d/docbook-xsl.rb index 667038d08bb1b..df913f6d802a8 100644 --- a/Formula/docbook-xsl.rb +++ b/Formula/d/docbook-xsl.rb @@ -3,13 +3,19 @@ class DocbookXsl < Formula 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 + bottle do - cellar :any_skip_relocation - sha256 "65a5442556a88a865ef377cb73df0b3edf9ab2240e6f4bb2d71a71eabc74fa26" => :catalina - sha256 "65a5442556a88a865ef377cb73df0b3edf9ab2240e6f4bb2d71a71eabc74fa26" => :mojave - sha256 "65a5442556a88a865ef377cb73df0b3edf9ab2240e6f4bb2d71a71eabc74fa26" => :high_sierra + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "201ddedf7dcf5ac0d6eb0a2554ff329ee9856ce5f79d95db9c5d6db7703d9b84" end depends_on "docbook" @@ -24,9 +30,10 @@ class DocbookXsl < Formula sha256 "9bc38a3015717279a3a0620efb2d4bcace430077241ae2b0da609ba67d8340bc" end - # see http://www.linuxfromscratch.org/blfs/view/9.1/pst/docbook-xsl.html for this patch + # see https://www.linuxfromscratch.org/blfs/view/9.1/pst/docbook-xsl.html for this patch patch do - url "http://www.linuxfromscratch.org/patches/blfs/9.1/docbook-xsl-nons-1.79.2-stack_fix-1.patch" + 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/formula-patches/5f2d6c1/docbook-xsl/docbook-xsl-nons-1.79.2-stack_fix-1.patch" sha256 "a92c39715c54949ba9369add1809527b8f155b7e2a2b2e30cb4b39ee715f2e30" end @@ -54,12 +61,10 @@ def post_install etc_catalog = etc/"xml/catalog" ENV["XML_CATALOG_FILES"] = etc_catalog - [ - ["xsl", "xsl-nons"], - ["xsl-ns", "xsl"], - ].each do |nms| - old_name = nms[0] - new_name = nms[1] + { + "xsl" => "xsl-nons", + "xsl-ns" => "xsl", + }.each do |old_name, new_name| loc = "file://#{opt_prefix}/docbook-#{old_name}" # add/replace catalog entries @@ -68,14 +73,15 @@ def post_install 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 - ["rewriteSystem", "rewriteURI"].each do |k| - system "xmlcatalog", "--noout", "--add", k, "#{url_prefix}/#{ver}", loc, etc_catalog + rewrites.each do |rewrite| + system "xmlcatalog", "--noout", "--add", rewrite, "#{url_prefix}/#{ver}", loc, etc_catalog end end end diff --git a/Formula/docbook.rb b/Formula/d/docbook.rb similarity index 78% rename from Formula/docbook.rb rename to Formula/d/docbook.rb index 92e085ab98c59..5a5c8f8a1bed1 100644 --- a/Formula/docbook.rb +++ b/Formula/d/docbook.rb @@ -1,23 +1,27 @@ class Docbook < Formula - desc "Standard SGML representation system for technical documents" + 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 + bottle do - cellar :any_skip_relocation - sha256 "8152e5356c47a7b8282f3ed84ee3f29565e8ce620bddeaeaf23dfd1f5ef111a3" => :catalina - sha256 "8152e5356c47a7b8282f3ed84ee3f29565e8ce620bddeaeaf23dfd1f5ef111a3" => :mojave - sha256 "8152e5356c47a7b8282f3ed84ee3f29565e8ce620bddeaeaf23dfd1f5ef111a3" => :high_sierra + 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" - sha256 "30f0644064e0ea71751438251940b1431f46acada814a062870f486c772e7772" version "4.1.2" + sha256 "30f0644064e0ea71751438251940b1431f46acada814a062870f486c772e7772" end resource "xml42" do @@ -64,7 +68,6 @@ def install end end - rm_rf "docs" (prefix/"docbook/xml"/r.version).install Dir["*"] end end @@ -74,16 +77,19 @@ 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 File.file?(etc_catalog) + 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", + system xmlcatalog, "--noout", "--del", "file://#{catalog}", etc_catalog - system "xmlcatalog", "--noout", "--add", "nextCatalog", + system xmlcatalog, "--noout", "--add", "nextCatalog", "", "file://#{catalog}", etc_catalog end end @@ -98,6 +104,6 @@ def caveats end test do - assert_predicate etc/"xml/catalog", :exist? + 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..b06630432ce17 --- /dev/null +++ b/Formula/d/docbook2x.rb @@ -0,0 +1,98 @@ +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 + + bottle do + 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, mojave: "2009056af30fb2a08a751e055fbdec14d49b4bc51da34cb63737b22b4b4d7784" + sha256 cellar: :any_skip_relocation, high_sierra: "81734088203909fc5db96462d14116596058910cd1b7ab67389a7bf93c9bae63" + sha256 cellar: :any_skip_relocation, sierra: "a1110d4bd90cecf9ce8edacc27a3edc84dfcd4db7ab50b67269af0eb6a9bb00a" + sha256 cellar: :any_skip_relocation, el_capitan: "acfdd1c80cb523b213dea0125819b1b6fc783d6d740cc8fc0047f44756b57889" + 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..1341291169053 --- /dev/null +++ b/Formula/d/docfx.rb @@ -0,0 +1,55 @@ +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.3.tar.gz" + sha256 "d97142ff71bd84e200e6d121f09f57d28379a0c9d12cb58f23badad22cc5c1b7" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "abb66975d8752e67e031dd9f7a29bf6c3e896f5b424815d5dc088436ecfd8a40" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f97bed8a6dde6e7a73af444d845a63027029dc9dcb604177f166c712dc871d7e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "063a6dc7fb65e9d026503301fe0fe7b840d2e08b22015cb72773a9f7d92e4089" + sha256 cellar: :any_skip_relocation, ventura: "b1792841cb03d32d705e997d97ce7cc5a1e92ed3293de92b84d7055c7cdc5d2f" + sha256 cellar: :any_skip_relocation, arm64_linux: "c965e56932c64b38e3321027a5252e9ef6ca06aa8464e8d11def4b3cff09a609" + sha256 cellar: :any_skip_relocation, x86_64_linux: "41d6acfb56f458d4113e56c3a4b3368a29247d8ad4cf2caea98d2d7583fe38c8" + 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..38c6eaa535e1f --- /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.6.4.tar.gz" + sha256 "8c6ca93335e71f71da8fe80f048cef2b469b1a3e456f9d9940d97b76b66e8964" + license "GPL-3.0-only" + head "https://github.com/mag37/dockcheck.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f1b08612b7202b0e1a825e4d1c90e125a4362b50c964156eb57a07573edecee3" + 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..98fa4fb959537 --- /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.23.0.tar.gz" + sha256 "a6c8d86c55a733ddd6aeac8da0624aa9d0cb966846e955399f5a075590499fd8" + license "Apache-2.0" + head "https://github.com/docker/buildx.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4f92472a84386d23b5bbd6ad9aa1fe86da0be4a0ed56320a5b44905a7f908cc3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4f92472a84386d23b5bbd6ad9aa1fe86da0be4a0ed56320a5b44905a7f908cc3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4f92472a84386d23b5bbd6ad9aa1fe86da0be4a0ed56320a5b44905a7f908cc3" + sha256 cellar: :any_skip_relocation, sonoma: "70b2fbba98abe71c5613168f9ed3eda9fd268997e0b1696028bf9006f45f8803" + sha256 cellar: :any_skip_relocation, ventura: "70b2fbba98abe71c5613168f9ed3eda9fd268997e0b1696028bf9006f45f8803" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8905c276a25d3ebc57adbbf411ed196bf9c13be7ce2d5c333075e321d07e429" + end + + depends_on "go" => :build + + def install + 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 Dir["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..7b5c5482f9249 --- /dev/null +++ b/Formula/d/docker-clean.rb @@ -0,0 +1,20 @@ +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" + + 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..8cc844113ca1d --- /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.1.1.tar.gz" + sha256 "98b305725d453b6802a4df1e4c8184b66cf8d74e9050bbf3d92b2804621cb9f6" + 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: "bec711e769cdf55d0f8ffa4e470d1e0e361a3eede07f23dc10833697030aae1b" + end + + conflicts_with cask: "docker" + + # 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.rb b/Formula/d/docker-compose.rb new file mode 100644 index 0000000000000..c6d16381058ae --- /dev/null +++ b/Formula/d/docker-compose.rb @@ -0,0 +1,53 @@ +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.36.0.tar.gz" + sha256 "bbc5de6d0da1c1f20877b6fb3102bf7f4f7ec4882cbc30e9fa9f61908fc9e748" + 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_sequoia: "29cbac67c636fd303d42176136455c324ed52c4ecb9e5ddac00604b2ffac0431" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a2742978b20a1fb9f2c75d309ee54b15cfc77c9abb200acdce32c7eefb3ffca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c1c7539130b19035663fb6800b02f89e2cc9039186076d625c073928a954d9d6" + sha256 cellar: :any_skip_relocation, sonoma: "27095d258e0b2aa3ebf7a458488169a8e8357222f500765fdd3c6477ad301a09" + sha256 cellar: :any_skip_relocation, ventura: "01b0ac514c54db5992e259f05bdf9c1afea65e5374983afc33c600ba6981e6a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc3f306bb07a40097847f6876264cfefdeea3ef784f4d23c3d066c5168b61a7f" + end + + depends_on "go" => :build + + conflicts_with cask: "docker" + + def install + 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..e3db1bb68a98e --- /dev/null +++ b/Formula/d/docker-credential-helper-ecr.rb @@ -0,0 +1,38 @@ +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.9.1.tar.gz" + sha256 "0f186c04c4f90fde02add338cf85f7136a2b7aa52bf2f6ae2130244ce1132393" + 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_sequoia: "fedaf37d87aae03d6e661d21a997d2913dd09e77754f0574ad6936405fcd1597" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fedaf37d87aae03d6e661d21a997d2913dd09e77754f0574ad6936405fcd1597" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fedaf37d87aae03d6e661d21a997d2913dd09e77754f0574ad6936405fcd1597" + sha256 cellar: :any_skip_relocation, sonoma: "4a7e351e896541eb5048280a91cfbfc0888ecdc9f0a6111c2d18391d4dd7366f" + sha256 cellar: :any_skip_relocation, ventura: "4a7e351e896541eb5048280a91cfbfc0888ecdc9f0a6111c2d18391d4dd7366f" + sha256 cellar: :any_skip_relocation, arm64_linux: "36baad59d47edd5adb202e9c87fab1c00bc7c58c09d2bd3e3cdea6d2e24e7bfb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0b885a402893475b5e4fb09e712a50af51a7ad9f1edfae2adaa782f8444fc373" + end + + depends_on "go" => :build + + conflicts_with cask: "docker" + + 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..db5a14c12011e --- /dev/null +++ b/Formula/d/docker-credential-helper.rb @@ -0,0 +1,51 @@ +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.3.tar.gz" + sha256 "1111c403d50fc26bee310db8bed4fb7d98a43e88850e2ad47403e8f2e9109860" + license "MIT" + head "https://github.com/docker/docker-credential-helpers.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a366588cad8733a471b83be8c4ecd16b9d3e46a21981ebb1aaac7e5d975eb218" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "65cf8b678861bf541c2add288c76ffd8f55449e0d785531ee886335dc548cfed" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e7d0a074a828667999d5ccbc63a9014c496d8080f5588c5ca97c3f960ffab3e1" + sha256 cellar: :any_skip_relocation, sonoma: "87eb53c2e0c38484d644a34fa771252fa80a9357b448029a6878e5e8e8db58e7" + sha256 cellar: :any_skip_relocation, ventura: "e1fe2f7169aa164531f1184404d8213af4725dd85c9ff5257487c28d260788a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "81fe5fb3a19c029f2a4b89a5b8f7446de61c7ef9749630419c4e8c6760f55bee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a87eaee572a78cf7b00111afa196e6732f05794d83189620bb7be85c4dd217ed" + end + + depends_on "go" => :build + + on_linux do + depends_on "pkgconf" => :build + 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-gen.rb b/Formula/d/docker-gen.rb new file mode 100644 index 0000000000000..ed451f7d40cc6 --- /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.14.7.tar.gz" + sha256 "a00a5bf583e1f4be77be35c2adb1d0377ae51ecb1fd8b00951f443237edf94f4" + license "MIT" + head "https://github.com/nginx-proxy/docker-gen.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5fda1495e6af67b21c960c2e689e47f77219c6106fe129b01c3a9b58e48b4811" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5fda1495e6af67b21c960c2e689e47f77219c6106fe129b01c3a9b58e48b4811" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5fda1495e6af67b21c960c2e689e47f77219c6106fe129b01c3a9b58e48b4811" + sha256 cellar: :any_skip_relocation, sonoma: "6ab4366ef34f75854784bb508508836a01fc3e39588e41113dedbce72f7ee69e" + sha256 cellar: :any_skip_relocation, ventura: "6ab4366ef34f75854784bb508508836a01fc3e39588e41113dedbce72f7ee69e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a576590ce72f482fb6dddaddb5a0c823a9c57baeed9c67e96f0d421dcfbe1862" + 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..e57b2f9fa5253 --- /dev/null +++ b/Formula/d/docker-ls.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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, mojave: "38eb334f22797271ae8e121030133f6fc3e33cd178cd938940d4ead6565e0225" + 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..5dc2d904a6e39 --- /dev/null +++ b/Formula/d/docker-machine-driver-vmware.rb @@ -0,0 +1,37 @@ +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" + + bottle do + rebuild 1 + 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, 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..ab5b3ba28356a --- /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.2.0.tar.gz" + sha256 "5616de789503c56e1da38df238e3920d64d88728e401054a229580bf3e310108" + license "MIT" + head "https://github.com/vultr/docker-machine-driver-vultr.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe5c031493451ee1fd50f8b330c9aa4bcad771c3313057a57e191bf0f7ba8ec5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe5c031493451ee1fd50f8b330c9aa4bcad771c3313057a57e191bf0f7ba8ec5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fe5c031493451ee1fd50f8b330c9aa4bcad771c3313057a57e191bf0f7ba8ec5" + sha256 cellar: :any_skip_relocation, sonoma: "083a588c686e1ab4b850bed47b0dcc5b9de91c94165a05216fb2119766a5c736" + sha256 cellar: :any_skip_relocation, ventura: "083a588c686e1ab4b850bed47b0dcc5b9de91c94165a05216fb2119766a5c736" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dcce498ca4b19b4843339a7fcc14dc039a38bd3083534eeb5fd42d71facd9ff9" + 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-parallels.rb b/Formula/d/docker-machine-parallels.rb new file mode 100644 index 0000000000000..b48501a13b628 --- /dev/null +++ b/Formula/d/docker-machine-parallels.rb @@ -0,0 +1,45 @@ +class DockerMachineParallels < Formula + desc "Parallels Driver for Docker Machine" + homepage "https://github.com/Parallels/docker-machine-parallels" + url "https://github.com/Parallels/docker-machine-parallels.git", + tag: "v2.0.1", + revision: "a1c3d495487413bdd24a562c0edee1af1cfc2f0f" + license "MIT" + head "https://github.com/Parallels/docker-machine-parallels.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6ce0f85c64a896c155ffdd93fe2b55d085384af3b04779c03a4b672b8f2339c2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0cee48786886656ce8e484a4e04b9bcbf91bf0b1ce1f36688d8a3c7407263f2c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aa5a4b3ed1af696dddb33878a013f92e5b3e72635231f0a3a59eacf483c67c2a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "07f4935abdf9bd29eac8ad226a63410530ad37324f23d1865cb78585a9d077b2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "184912b76e50116c3144467e4da6e35fb8b68b217779cdb006aaf1543d94642e" + sha256 cellar: :any_skip_relocation, sonoma: "439730ce2266722643f9ab8acad673e7b3a868b1c506d04b4a0328a1c1b2923b" + sha256 cellar: :any_skip_relocation, ventura: "755f1a2c1f2491e122cff8f7d23ba3092a218bd7890e64334eb27a85d18fc446" + sha256 cellar: :any_skip_relocation, monterey: "9481f67357cfe0d5b608d32c7570a4d3ba418984d09adbfe6676d51abaadbb5e" + sha256 cellar: :any_skip_relocation, big_sur: "29b70e96c49252d2d127098796fa366aec2d66347450144af0b50afd413f8ef8" + end + + # https://github.com/Parallels/docker-machine-parallels/issues/111 + disable! date: "2024-09-23", because: :unmaintained + + depends_on "go" => :build + depends_on "docker-machine" + depends_on :macos + + # Fix build on Go >= 1.20 by removing obsolete build flag: + # https://github.com/Parallels/docker-machine-parallels/pull/113 + patch do + url "https://github.com/Parallels/docker-machine-parallels/commit/154f1906924900c948ea8759c711ba43cd236656.patch?full_index=1" + sha256 "ea6eb1a1f713f6e30bafbae19995915327c8400901e3350c60e40b50d43dd2a8" + end + + def install + system "make", "build" + bin.install "bin/docker-machine-driver-parallels" + end + + test do + assert_match "parallels-memory", shell_output("docker-machine create -d parallels -h") + end +end diff --git a/Formula/d/docker-machine.rb b/Formula/d/docker-machine.rb new file mode 100644 index 0000000000000..87777e747cc18 --- /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.35/docker-machine-v0.16.2-gitlab.35.tar.bz2" + version "0.16.2-gitlab.35" + sha256 "eeee9312a0220aca825668b0a05b17c02a061d0a9aff4f966068e981d0ee0271" + license "Apache-2.0" + head "https://gitlab.com/gitlab-org/ci-cd/docker-machine.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e94c4c302ee9c7fca30888e2c46c6065c6349464acbce6aa7febad595171a9ca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e94c4c302ee9c7fca30888e2c46c6065c6349464acbce6aa7febad595171a9ca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e94c4c302ee9c7fca30888e2c46c6065c6349464acbce6aa7febad595171a9ca" + sha256 cellar: :any_skip_relocation, sonoma: "2f332144a0eab5b87bb059592b91b524dd48cd328a44e4c879a6d4819ae0578c" + sha256 cellar: :any_skip_relocation, ventura: "2f332144a0eab5b87bb059592b91b524dd48cd328a44e4c879a6d4819ae0578c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "086a0f5f38b6b6cc496d80582ba42a89fdab4ff94c2ef504f4551b5d5ac4e65e" + 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..dd51184f5974f --- /dev/null +++ b/Formula/d/docker-squash.rb @@ -0,0 +1,56 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d4fe0620d9ab7a6c5f55e575438c1913ea44c968ab83ca2ff427215002b33cec" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..e0e0a0784f9f6 --- /dev/null +++ b/Formula/d/docker.rb @@ -0,0 +1,59 @@ +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.1.1", + revision: "4eba3773274f9d21ba90ae5bc719c3f1e4bb07a1" + 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_sequoia: "f4cafb97ca3f594ca7050af4399ec3ad80584c6ea703459b76a9a4ed254e2e8b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f4cafb97ca3f594ca7050af4399ec3ad80584c6ea703459b76a9a4ed254e2e8b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f4cafb97ca3f594ca7050af4399ec3ad80584c6ea703459b76a9a4ed254e2e8b" + sha256 cellar: :any_skip_relocation, sonoma: "57d7fd27548c111218a290190fef3d175dd3c370c6172a8a4b40dc4b4e591d39" + sha256 cellar: :any_skip_relocation, ventura: "57d7fd27548c111218a290190fef3d175dd3c370c6172a8a4b40dc4b4e591d39" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1494bc4df83a5d766599f3bae796c6ec4699754b5763a00151e3eff5215c0e53" + end + + depends_on "go" => :build + depends_on "go-md2man" => :build + depends_on "docker-completion" + + conflicts_with cask: "docker" + + def install + # 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..da164fec0e070 --- /dev/null +++ b/Formula/d/dockerfile-language-server.rb @@ -0,0 +1,47 @@ +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.14.0.tgz" + sha256 "2c2aa3fb4b1bea75701537a5e981f6001331308b930376e41305113edc4fe81a" + license "MIT" + head "https://github.com/rcjsuen/dockerfile-language-server.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9d6b490c6ccf09d9cf8136e67b95a9f12f350bc7ecd5f98b4d777c7b38baa631" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9d6b490c6ccf09d9cf8136e67b95a9f12f350bc7ecd5f98b4d777c7b38baa631" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9d6b490c6ccf09d9cf8136e67b95a9f12f350bc7ecd5f98b4d777c7b38baa631" + sha256 cellar: :any_skip_relocation, sonoma: "e2d4d1a7357c1b9e25828d9f2da5444b4ed725fa16e91cf63583bf56310f6fb3" + sha256 cellar: :any_skip_relocation, ventura: "e2d4d1a7357c1b9e25828d9f2da5444b4ed725fa16e91cf63583bf56310f6fb3" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d6b490c6ccf09d9cf8136e67b95a9f12f350bc7ecd5f98b4d777c7b38baa631" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d6b490c6ccf09d9cf8136e67b95a9f12f350bc7ecd5f98b4d777c7b38baa631" + 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..59750074c6e9d --- /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.17.11.tar.gz" + sha256 "45a4cf8f6ee2510819fa2d3fa1d2525e8c7cde5c6f9fc4c0e12a9d2a8ec43f92" + license "MIT" + head "https://github.com/patrickhoefler/dockerfilegraph.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d2f06756c8b0633109ef6a7b53ae5ccabf5782ca6bd4635b69aad24d24ee2f84" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d2f06756c8b0633109ef6a7b53ae5ccabf5782ca6bd4635b69aad24d24ee2f84" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d2f06756c8b0633109ef6a7b53ae5ccabf5782ca6bd4635b69aad24d24ee2f84" + sha256 cellar: :any_skip_relocation, sonoma: "06ff104186010a4abed01a1dd0901a917907bf422104daa628b2ba76507445a3" + sha256 cellar: :any_skip_relocation, ventura: "06ff104186010a4abed01a1dd0901a917907bf422104daa628b2ba76507445a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd7d7ec20c7bed42f090e8e5c8a95bee2bf8e8cde5c12f869f8839c709538f16" + 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..d00ba00e79aa4 --- /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.7.tar.gz" + sha256 "2cf8c1122817ac6d690d062aa41e2484c9d438ace605c64b21f5b7825d0a5c67" + license "MIT" + head "https://github.com/reteps/dockerfmt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3a05b7455a8e474512e24f51d42c916f90f885f04354805d03c8b970501a44c0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3a05b7455a8e474512e24f51d42c916f90f885f04354805d03c8b970501a44c0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3a05b7455a8e474512e24f51d42c916f90f885f04354805d03c8b970501a44c0" + sha256 cellar: :any_skip_relocation, sonoma: "0becd9e93ae00e8821409d9763897e87cfd72c490101606bce5a8d7bcce0f1d7" + sha256 cellar: :any_skip_relocation, ventura: "0becd9e93ae00e8821409d9763897e87cfd72c490101606bce5a8d7bcce0f1d7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82bb4ce0b94d51cb2e4b921ae4116a38f2c3bd5e17e20ba0a4f1b057687610bf" + 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..44dab343d4b84 --- /dev/null +++ b/Formula/d/dockerize.rb @@ -0,0 +1,29 @@ +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.3.tar.gz" + sha256 "73e1d74e4548affc8491c678b35560468998462c677c8be555c2a24657b4222a" + license "MIT" + head "https://github.com/jwilder/dockerize.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2d9678f32f8aa1cbb9ab471d09d55191d4c0d2a04af7888fed7512d37ae042e6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d9678f32f8aa1cbb9ab471d09d55191d4c0d2a04af7888fed7512d37ae042e6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2d9678f32f8aa1cbb9ab471d09d55191d4c0d2a04af7888fed7512d37ae042e6" + sha256 cellar: :any_skip_relocation, sonoma: "9d911cdb52483e88d898e261ef49ed47cb3922edaef5b7c85c58c233244ab392" + sha256 cellar: :any_skip_relocation, ventura: "9d911cdb52483e88d898e261ef49ed47cb3922edaef5b7c85c58c233244ab392" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5564e1ba66e1b6b143c2187d573f8accf0fc33f55bc69b22264ca9c8e423b2ac" + 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..4f95c181e84a6 --- /dev/null +++ b/Formula/d/dockly.rb @@ -0,0 +1,47 @@ +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_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..2cd8d9a2fd782 --- /dev/null +++ b/Formula/d/dockutil.rb @@ -0,0 +1,31 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b316cca52f1d2d41b358aae807d3d64996bd1dd6ff44852ac193075fd8eacd73" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7e0fb8383a52ed1459e9811a121cc5c4105afc61d11d757564e148f72d4b28ce" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5d8d0e3e19454fc3e958b30f7c1f93bc57cc08f14caa28c2435bbc77504699fc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3ccc0b78a56bec0d79cd7aa9249b72cb72330a6065d311041ac9d8415289654c" + sha256 cellar: :any_skip_relocation, sonoma: "e63bf1404297af85f7e5c20d31f23fee13071b66404bf323a19decdf4d898dbe" + sha256 cellar: :any_skip_relocation, ventura: "99b5c036b9ad73b6116ad5656218f55ed97680c6ab5e07921587ba6a10cba74d" + sha256 cellar: :any_skip_relocation, monterey: "0486c78b5e464029ce2669026de258e0bdc13ddbcece77db4e589e118b3e2fb4" + 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" + 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..90783d4bb742c --- /dev/null +++ b/Formula/d/dockviz.rb @@ -0,0 +1,32 @@ +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_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, 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/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..d348b6d117b44 --- /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.126.0.tar.gz" + sha256 "13fe74dd886418c6731bb55427f89bd904e3692f9280f3668ee5fa5000783be0" + license "Apache-2.0" + head "https://github.com/digitalocean/doctl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b1f9b7fec821afb4ac937afbdfe6fcb44d9a425ced63e899c5140bce2a9ac8b4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b1f9b7fec821afb4ac937afbdfe6fcb44d9a425ced63e899c5140bce2a9ac8b4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b1f9b7fec821afb4ac937afbdfe6fcb44d9a425ced63e899c5140bce2a9ac8b4" + sha256 cellar: :any_skip_relocation, sonoma: "45867fa35a1bcd50bb29661a7a62c5c452b8413d6a754a1318d7775366376111" + sha256 cellar: :any_skip_relocation, ventura: "45867fa35a1bcd50bb29661a7a62c5c452b8413d6a754a1318d7775366376111" + sha256 cellar: :any_skip_relocation, x86_64_linux: "780c1ce0842592f7c34fef07e836866ba00787d9f3f7d963d93dc0f864c5542c" + 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..cb00e58930d61 --- /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/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + license all_of: [:public_domain, "BSD-2-Clause", "GPL-3.0-or-later", "Python-2.0"] + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "902ea89749b8809d45604630f6246d07294e95af725a23d856d5b7006a1efb96" + end + + depends_on "python@3.13" + + 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..4877a1f3ed0fd --- /dev/null +++ b/Formula/d/docuum.rb @@ -0,0 +1,49 @@ +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.0.tar.gz" + sha256 "26bf153c72185516db77ffabc00d75f0ae9d642792ccf204f843ceee94236756" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "adf63e1b78702983b47c7e4af2f12395b2d058983ebbaf22c2f508a90c375409" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "affa59dad018a494a5f1ebd4ae95e6923b5de38921385138f29874e8d3e52de9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8c73857d61f8266046e879d12f4a527a8381c4e1320332cf9116ff25ba316820" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a0cd97e7867b1fc163b34c9b74d34644c24899d3dfed2f330d09657359674ad3" + sha256 cellar: :any_skip_relocation, sonoma: "8774fc1059a912cc7f102617177f0c756b98b4e9f1d4781c630d8ce425b24042" + sha256 cellar: :any_skip_relocation, ventura: "18b42e43794e140650178212b3a20df43897e9766ee1b94f7faaa2ab6e4795f1" + sha256 cellar: :any_skip_relocation, monterey: "ec9aa82548bc0fee393165d179eb607f91e558d569bee74f1181b843c37d3f96" + sha256 cellar: :any_skip_relocation, arm64_linux: "225f7a822dd9e4ad607ed9f23f384f2920fa10ef13bf2d586f56b484ba54693e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3bc6a5414cae362c54b12ee5cdff8212bce7f84a6f7bc670271796fb44d1a7ff" + 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..200fb68cd8473 --- /dev/null +++ b/Formula/d/docx2txt.rb @@ -0,0 +1,26 @@ +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" + + 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/dog.rb b/Formula/d/dog.rb new file mode 100644 index 0000000000000..195d3a959b09e --- /dev/null +++ b/Formula/d/dog.rb @@ -0,0 +1,48 @@ +class Dog < Formula + desc "Command-line DNS client" + homepage "https://dns.lookup.dog/" + url "https://github.com/ogham/dog/archive/refs/tags/v0.1.0.tar.gz" + sha256 "82387d38727bac7fcdb080970e84b36de80bfe7923ce83f993a77d9ac7847858" + license "EUPL-1.2" + head "https://github.com/ogham/dog.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d10a7859edcb1fefd50359a1d5104817eaca4a22ba8272ef610f4e392409ee9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "db5e1572f85dad9b50f7f17483b04d459f47871d4b0a7621c676c8f25cb1f0cc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "59c9e37cff1154bb2d7407b0473ab9280156a4144be16bf4bb7820bae34ab27a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8c5a4ee2a717b756d3668395a129aebe48e8cc72b049d7f9cfbbfb9d14669de0" + sha256 cellar: :any_skip_relocation, sonoma: "0d78a51c96d7a8b37fb975422031e7179b7cf266daf0b753b3b0a7b9ae143980" + sha256 cellar: :any_skip_relocation, ventura: "6a7a5f6ef5f5765f7e642cf03a079a48fd1ba43dbf1aada1aaadec840633abb3" + sha256 cellar: :any_skip_relocation, monterey: "0dbeb2271fcbda043b8c67b63463bafbe674e692ed464e891529941e72eecf4c" + sha256 cellar: :any_skip_relocation, big_sur: "b34f634c60a28d5e5ad7694da962949c677bb1808886c6fcaa7c92579633e5ee" + sha256 cellar: :any_skip_relocation, catalina: "0b7f88dc4941328cfb187798bb93f14d32abafa3d867e83161b8682619c868aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "55daa95c827fd102b2599978ebbc0fb60d497395388531533891c8d2a28ff3b4" + end + + disable! date: "2024-08-01", because: :unmaintained + + depends_on "just" => :build + depends_on "pandoc" => :build + depends_on "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + depends_on "openssl@1.1" # OpenSSL 3 issue: https://github.com/ogham/dog/issues/98 + end + + def install + system "cargo", "install", *std_cargo_args + bash_completion.install "completions/dog.bash" => "dog" + zsh_completion.install "completions/dog.zsh" => "_dog" + fish_completion.install "completions/dog.fish" + system "just", "man" + man1.install "target/man/dog.1" + end + + test do + output = shell_output("#{bin}/dog 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..3f31a25b3def4 --- /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.0.5.tar.gz" + sha256 "92a34f5510a48ab657a980c39edf907c17e96e88a476187d5b57a8cef3becd5b" + license "GPL-3.0-or-later" + head "https://github.com/mr-karan/doggo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "659e186849f180769977ef2af67b9880c454b72d32853222ab69f396e51094f7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "659e186849f180769977ef2af67b9880c454b72d32853222ab69f396e51094f7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "659e186849f180769977ef2af67b9880c454b72d32853222ab69f396e51094f7" + sha256 cellar: :any_skip_relocation, sonoma: "e2bf2f469a3d501455d0c5db6005dd1f78a5a3916e31253361db0effd0d4cedf" + sha256 cellar: :any_skip_relocation, ventura: "e2bf2f469a3d501455d0c5db6005dd1f78a5a3916e31253361db0effd0d4cedf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e6ef549e7c62a7cd3f1cf41dd03e7f99bf26e256f950ddc1b6c08d2a488debd5" + 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..36c451164cf84 --- /dev/null +++ b/Formula/d/doitlive.rb @@ -0,0 +1,68 @@ +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/32/75/c94e4d4e7fac8606e199fad35a00b33e4252d00078f25285f91e97e546c0/doitlive-5.1.0.tar.gz" + sha256 "b6bcd25f9f037b7e96e34d68549306adb3e8c83f6e92c51ec2b225abc05b25c5" + license "MIT" + revision 3 + head "https://github.com/sloria/doitlive.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd433d05b749832e59cc133360f6a038b2d9ae472fcb05982074a334d675e884" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e9132e01287a9fa33d7d541e59353728366c56430e07adab7bd42663b013f08f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a63ff879a0a23897fe227f6e12187d37cdba0158b5c167d91ae3c91a8d0ab103" + sha256 cellar: :any_skip_relocation, sonoma: "4a497a679df8b0080ae7dc946d151ff691d37c14e9ae1fe85d9ce960a77779c5" + sha256 cellar: :any_skip_relocation, ventura: "96bbbdc6cdfe5644e7668220fe22b1e08fbdc9ac7b6869b2937e436b148596e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "f837192ceb65241ded4a6e05974605ab6ff1d91f1854c062a716d1f096bfb763" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e136dccbf09aa94920066d2d30942057f0818f6bf7a20ca9150cffd5dfd2f7c7" + end + + depends_on "python@3.13" + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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..78e0c89804edc --- /dev/null +++ b/Formula/d/dolphie.rb @@ -0,0 +1,232 @@ +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/50/0b/71afd6b459ce5cfdbf581aa45276a957b705f0908661a0d98c90c54cd1ca/dolphie-6.10.1.tar.gz" + sha256 "81c1c3254efced0f0810d143389c9a9a3fbe779a9f608aae8c34d82158c7bb45" + license "GPL-3.0-or-later" + + no_autobump! because: "some resources have to be updated manually" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bcf56bd0619c58c4bb3c87e87f6d142ca2e29cf6b33b952685f0350b0be99ff7" + sha256 cellar: :any, arm64_sonoma: "079e391c2ca406995e757365521078135ec78a8aef299215bb966497adecd872" + sha256 cellar: :any, arm64_ventura: "7d8600a870d06e33a6e7e3715294efa62811009ee4809e1a0ee4b6d4603a1583" + sha256 cellar: :any, sonoma: "03d775a0e5ab843d644423dc9f0da277cac5446f05cc6c52dd65bc191b99c6d5" + sha256 cellar: :any, ventura: "f5b08e001ccc124d3463b0f0a5fb3c56055e58ee89737e58925bdbde575188fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "a160d6d352d12aa2f8ca6e08e9357ae3fd97e044679fee8a14894e9e56eb230a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e50d4cf9ce11b3e14c1d6ea1f19430bceff271191b7a2529c8d61d0ad8ac2487" + end + + depends_on "rust" => :build # for orjson + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + # `tree-sitter-*` sdists are missing C headers and therefore we have to use GitHub sources + # Resources can be updated the following way: + # 1. remove all resources to GitHub sources + # 2. run `brew update-python-resources dolphie` + # 3. replace `tree-sitter-*` resources with their versions from GitHub + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz" + sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" + end + + resource "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/19/03/a2ecab526543b152300717cf232bb4bb8605b6edb946c845016fa9c9c9fd/mdit_py_plugins-0.4.2.tar.gz" + sha256 "5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5" + 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/81/0b/fea456a3ffe74e70ba30e01ec183a9b26bec4d497f61dcfce1b601059c60/orjson-3.10.18.tar.gz" + sha256 "e8da3947d92123eda795b68228cafe2724815621fe35e8e320a9e9593a4bcd53" + 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/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + 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/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pymysql" do + url "https://files.pythonhosted.org/packages/b3/8f/ce59b5e5ed4ce8512f879ff1fa5ab699d211ae2495f1adaa5fbba2a1eada/pymysql-1.1.1.tar.gz" + sha256 "e127611aaf2b417403c60bf4dc570124aeb4a57f5f37b8e95ae399a42f904cd0" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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/34/99/8408761a1a1076b2bb69d4859ec110d74be7515552407ac1cb6b68630eb6/textual-3.2.0.tar.gz" + sha256 "d2f3b0c39e02535bb5f2aec1c45e10bd3ee7508ed1e240b7505c3cf02a6f00ed" + 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-bash" do + url "https://github.com/tree-sitter/tree-sitter-bash/archive/refs/tags/v0.23.3.tar.gz" + sha256 "c682b81d0fe953d19f6632db3ba6e4f2db1efe1784f7a28bc5fcf6355d67335b" + end + + resource "tree-sitter-css" do + url "https://github.com/tree-sitter/tree-sitter-css/archive/refs/tags/v0.23.2.tar.gz" + sha256 "5d442e8b04d8c743603172fb02664ae2b404f38f7a871d97cf2c89c1eedf8251" + end + + resource "tree-sitter-go" do + url "https://github.com/tree-sitter/tree-sitter-go/archive/refs/tags/v0.23.4.tar.gz" + sha256 "967870d7d120e9b760e538aeb8331a72f70ffcca4f1eaf1e1dea5375886d25d2" + 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.23.1.tar.gz" + sha256 "fc5b8f5a491a6db33ca4854b044b89363ff7615f4291977467f52c1b92a0c032" + 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.3.2.tar.gz" + sha256 "5dac48a6d971eb545aab665d59a18180d21963afc781bbf40f9077c06cb82ae5" + end + + resource "tree-sitter-python" do + url "https://github.com/tree-sitter/tree-sitter-python/archive/refs/tags/v0.23.6.tar.gz" + sha256 "630a0f45eccd9b69a66a07bf47d1568e96a9c855a2f30e0921c8af7121e8af96" + end + + resource "tree-sitter-regex" do + url "https://github.com/tree-sitter/tree-sitter-regex/archive/refs/tags/v0.24.3.tar.gz" + sha256 "92f24bb779a92debe259cc1c204aab78f425f0fc1e8b4f2c03b6896d2da8f0a3" + 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-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-yaml" do + url "https://github.com/tree-sitter-grammars/tree-sitter-yaml/archive/refs/tags/v0.7.0.tar.gz" + sha256 "8182760587f14d5131161dee3605613ccebe86062909f0879edf63b4bdd99d44" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/ed/f6/2ac0287b442160a89d726b17a9184a4c615bb5237db763791a7fd16d9df1/zstandard-0.23.0.tar.gz" + sha256 "b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09" + end + + def install + 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..c169a2ea35ba4 --- /dev/null +++ b/Formula/d/dolt.rb @@ -0,0 +1,54 @@ +class Dolt < Formula + desc "Git for Data" + homepage "https://github.com/dolthub/dolt" + url "https://github.com/dolthub/dolt/archive/refs/tags/v1.53.3.tar.gz" + sha256 "ff33c60741860b23ca3193ffa5a2a66636aecf6f6c9fa885f353be8d7cb6b7bf" + license "Apache-2.0" + head "https://github.com/dolthub/dolt.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "305cb3cd1ce0a4d9d281bf6f1d0e263c7291c6a68c3920c3cf991a46a4771f97" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d8cb240b4278c2afe2822c84c34e48789488ac09ee073ba38f373d8c4c0d221" + sha256 cellar: :any_skip_relocation, arm64_ventura: "05ffd7f991aac411d8802646d0ae153d85d8a7ece1afaa4df01512b2a2ff8e4e" + sha256 cellar: :any_skip_relocation, sonoma: "477873ae1ac0cf903dd146f5b632ad80692be7a503eeb16e886ee5c8939eaf2c" + sha256 cellar: :any_skip_relocation, ventura: "9f0f5ffe61fbca7dcaa9cba0e498d3de7fc01105681706669425bd7bf17d3d68" + sha256 cellar: :any_skip_relocation, arm64_linux: "189868e93e4c944d177ef2dabb91b34739445093dfc38b82b85d6d817943ba0d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90a8601c42fe9fa07371d48162aebdd5f598b8a04d061dcd7e50f1dcdc53d877" + end + + depends_on "go" => :build + + def install + 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..17525d01b4385 --- /dev/null +++ b/Formula/d/doltgres.rb @@ -0,0 +1,63 @@ +class Doltgres < Formula + desc "Dolt for Postgres" + homepage "https://github.com/dolthub/doltgresql" + url "https://github.com/dolthub/doltgresql/archive/refs/tags/v0.50.1.tar.gz" + sha256 "6be207f152003ffa989daa53c2a34f924e46a706ee574c9148092b4a4f7664aa" + 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_skip_relocation, arm64_sequoia: "c25436e0c3620249290d8d697d9ee593592fc215d0ed27e8372587e520cfa74b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0a0a3d0684540201ce3d3bf8965a3c86bb8192d283f353dfdb75bad155a75f07" + sha256 cellar: :any_skip_relocation, arm64_ventura: "83d4a2ead1ae05cbd2966b549653c9bf8c06b93fe70db7f14164b3de10d745c8" + sha256 cellar: :any_skip_relocation, sonoma: "ac5cbbcff64db390fdc38b488ebdb6248a744276a3cbc0e8e91d7e51b7c1ef78" + sha256 cellar: :any_skip_relocation, ventura: "7eabd05c9974e336b0163d4c3d205cea9953dd398786168afdfc324631630bc6" + sha256 cellar: :any_skip_relocation, arm64_linux: "75c6d7e214dafc389b0b9225a4056a82e9814d4f7eef991e68c6bd2e4027e7f7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29e8c6d2c1f81a9f18c9380fffecb6b88cb0a23045696d2abd1904e53784f399" + end + + depends_on "go" => :build + depends_on "libpq" => :test + + def install + 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/dooit.rb b/Formula/d/dooit.rb new file mode 100644 index 0000000000000..7f13b73f066be --- /dev/null +++ b/Formula/d/dooit.rb @@ -0,0 +1,153 @@ +class Dooit < Formula + include Language::Python::Virtualenv + + desc "TUI todo manager" + homepage "https://github.com/kraanzu/dooit" + url "https://files.pythonhosted.org/packages/0f/88/9ba9d1c289f215a16afe9135ecbcbe4473b0619da2c34bc05a4502eb9823/dooit-3.2.2.tar.gz" + sha256 "5a9bd501c6291c0c4bd8ed5035a9168f0e38b7245d3b3d1cd927e61f887ef953" + license "MIT" + head "https://github.com/kraanzu/dooit.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "31d3daf7728e9a2d00606bbfb0226408a3833fa03b7e6d7a7c3c4ffa5af62317" + sha256 cellar: :any, arm64_sonoma: "5a4ff1ac059b30c4570ef1ba771c063a5f1d80e942918fcb8bd6d05667c67591" + sha256 cellar: :any, arm64_ventura: "5182797225f133ce3c7f758e89f2599f3cb9e7bfc05b008a324b79811ff42344" + sha256 cellar: :any, sonoma: "27be32f80235fc4b29bcd5d5fe0e5a8cc11f0cd6628d46d283c09e356d37db83" + sha256 cellar: :any, ventura: "f7e53e1d767b4c43f85b7ff7a9dd971bee6d5abcbcbd6b65e271008355a911d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "1553693744a2be536c2e57f7105cf3cbeaf10cf3f3037fa8741c3af187a0f5a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9024438caae6b9b611cbbc8e83701ad4a14767dbd056c1133b1f6c2b0d8c29b2" + end + + depends_on "cmake" => :build + depends_on "libyaml" + depends_on "python@3.13" + + resource "click" do + url "https://files.pythonhosted.org/packages/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + end + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/34/c1/a82edae11d46c0d83481aacaa1e578fea21d94a1ef400afd734d47ad95ad/greenlet-3.2.2.tar.gz" + sha256 "ad053d34421a2debba45aa3cc39acf454acbcd025b3fc1a9f8a0dee237abd485" + 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 "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/19/03/a2ecab526543b152300717cf232bb4bb8605b6edb946c845016fa9c9c9fd/mdit_py_plugins-0.4.2.tar.gz" + sha256 "5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5" + 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/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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 "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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/68/c3/3f2bfa5e4dcd9938405fe2fab5b6ab94a9248a4f9536ea2fd497da20525f/sqlalchemy-2.0.40.tar.gz" + sha256 "d827099289c64589418ebbcaead0145cd19f4e3e8a93919a0100247af245fa00" + end + + resource "textual" do + url "https://files.pythonhosted.org/packages/34/99/8408761a1a1076b2bb69d4859ec110d74be7515552407ac1cb6b68630eb6/textual-3.2.0.tar.gz" + sha256 "d2f3b0c39e02535bb5f2aec1c45e10bd3ee7508ed1e240b7505c3cf02a6f00ed" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + 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 + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"dooit", shells: [:fish, :zsh], 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..acadb074ae6a6 --- /dev/null +++ b/Formula/d/dopewars.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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..84c3f93d6981e --- /dev/null +++ b/Formula/d/doppler.rb @@ -0,0 +1,36 @@ +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.74.0.tar.gz" + sha256 "7174cf7c963e939180cd07e325a163e2712ad1346b2aef09a267f0328fd9ee1a" + license "Apache-2.0" + head "https://github.com/DopplerHQ/cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6cfea3001c57cb86c423d2b97e5800251dc831524cf672fca3fbf390dae5cd7a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6cfea3001c57cb86c423d2b97e5800251dc831524cf672fca3fbf390dae5cd7a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6cfea3001c57cb86c423d2b97e5800251dc831524cf672fca3fbf390dae5cd7a" + sha256 cellar: :any_skip_relocation, sonoma: "bb5846bd9ddc86b465a5e5a01ad5c10cd65df1e69a71bb35b5429e177714db57" + sha256 cellar: :any_skip_relocation, ventura: "bb5846bd9ddc86b465a5e5a01ad5c10cd65df1e69a71bb35b5429e177714db57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa6ca27a3c2df4c1bdda56f9d72a66bfe343fc3147da3ce00d89fad72d21b436" + 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..71bd6ddbc9f1c --- /dev/null +++ b/Formula/d/dory.rb @@ -0,0 +1,42 @@ +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" + + bottle do + rebuild 1 + 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..e0e1b85882485 --- /dev/null +++ b/Formula/d/dos2unix.rb @@ -0,0 +1,60 @@ +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.2.tar.gz" + mirror "https://fossies.org/linux/misc/dos2unix-7.5.2.tar.gz" + sha256 "264742446608442eb48f96c20af6da303cb3a92b364e72cb7e24f88239c4bf3a" + license "BSD-2-Clause" + + livecheck do + url "https://waterlan.home.xs4all.nl/dos2unix/" + regex(/href=.*?dos2unix[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6782d0760a276f44db668e01a49edd85986d20a08fbd35fd1e72346591a37be3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "34b49544a0f299d1b2b0c391927b7c07201274a2c8bf682c0991ced19209501d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e739f5c6536d3fc4fa9a8922197379137322925c4476ee28f52e8e02875f61b9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "49bf57eaaa0a8fca72406d02a7b3b7d50107736cea3c3c01036543387b9668fc" + sha256 cellar: :any_skip_relocation, sonoma: "599b519868373bb9ee6258f31375f016b3f44242771bf5553ab52d3a2f9177c9" + sha256 cellar: :any_skip_relocation, ventura: "8e7421cfd610a505a2f653dfb064f6fd51a910e4a31b8ec615cc549f579796bf" + sha256 cellar: :any_skip_relocation, monterey: "6b0355a4247caca8cbf8cfd8fe7b6aee2db4e749184ab656b407f6c8b7c637eb" + sha256 cellar: :any_skip_relocation, arm64_linux: "17dd39d7d718f3ed4a2024f9502c9c82d4ac57b4f5482b3f421527a78745192b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "228436301f23d4b7b80cf0bfcf1f75d7cff50fd3134baf1c2f2d2b25538fa178" + 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..762b07266c474 --- /dev/null +++ b/Formula/d/dosbox-staging.rb @@ -0,0 +1,69 @@ +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.1.tar.gz" + sha256 "9d943d6610b6773cb0b27ba24904c85459757fbbfa0f34c72e76082132f77568" + 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_sequoia: "f1f4a11754e2436d48f1d40742cd8fcf904f07dfd53ac72f9547e95038483c91" + sha256 arm64_sonoma: "1afe5ab249e2156bbf89ae26a4e3871d9cbe19fa4de181fba3cc7d4802608b90" + sha256 arm64_ventura: "98e19ac0908a405094467dac092283e5192fd345c4db7d93c3d359bb9c5a9f66" + sha256 sonoma: "c6e67a8dd5578cf145a91d233f7dd1ddc2f123ecb2fb809984acfcee086897ab" + sha256 ventura: "417312bc7fdff60bb2ce34a73ef03f3043df6270c67377bdbcab99807feafb78" + sha256 arm64_linux: "a3dd6ea049201e66f43fc13cf224acba602504ae8121c691c0c6a218bb0befb1" + sha256 x86_64_linux: "7f20a8e4df3043ab401343c7178be0431a3bf8f16d4928c6f33ffd4185a9b2d3" + 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..d1ec6e491ad44 --- /dev/null +++ b/Formula/d/dosbox-x.rb @@ -0,0 +1,78 @@ +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.05.03.tar.gz" + sha256 "b29a2c9c38bfe1d1c1f2420d546b8c2456ae2ddce4c1f6b4d19f258841ce1581" + 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_sequoia: "6e250e527c94b3a1b9ea2893d64a6ee939178dcacdf42d1e9e158fc6b6fa8893" + sha256 arm64_sonoma: "5d3a7fe6f5d0c7bc5df0a8ac74d375fd4496dbf6532a3df186e60cfd1903ffe5" + sha256 arm64_ventura: "8405eb97c9b5b2460c2f7b03c0548a9be7ff2f3b304b4c0d07719652d83f79ec" + sha256 sonoma: "f557edc8c2354c5cb391faa9761566d496c19db26a79e05a5b627fb37ebf2ba0" + sha256 ventura: "0c463405ea683834c40157a3dab895df130e8422ef2f2750338e50b55da0789e" + sha256 arm64_linux: "2a3e03f8c61d44bb49c56381068e574dcdfb7d69736ae757ece8046642bb2420" + sha256 x86_64_linux: "6501a5f6178f9319250785644006eeefeabfec0bbd52e6a6bdfaafc4482bc88b" + 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 macos: :high_sierra # needs futimens + 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 "linux-headers@5.15" => :build + 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 + 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..0c4cfb5c3b06c --- /dev/null +++ b/Formula/d/dosfstools.rb @@ -0,0 +1,54 @@ +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 + + bottle do + 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, mojave: "4d910d3f83352692379e5ead97f3c52ab845cc187a1d791f655ed02ef7b7b9e6" + 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 + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--prefix=#{prefix}", + "--without-udev", + "--enable-compat-symlinks" + 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..8145dd6f3825a --- /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/8f/9f/c94c929cde5b1a295bb382e5ac139734166bd4a2c153c9bc98049e44436e/dotbot-1.21.0.tar.gz" + sha256 "f3dffc21bd603ae13d4097438c702e0b0f0ff0416d028ed20fa8906f39ec8953" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "40779ef3cdfd085e415cc914e7fa56a46ed451ceed8ae0ed4e688f16c50acad8" + sha256 cellar: :any, arm64_sonoma: "0e2936c7ad172ce6eba810f0fadf695c7bfa3420a47e8433ec61be5262ab4a33" + sha256 cellar: :any, arm64_ventura: "6e42ee1ac22fc0faf6e1f704e1cfb1ee98007ef5f7443ebba158ce752431a3c1" + sha256 cellar: :any, sonoma: "1bd9f76f9ad0b514602aebb0b30c3d69db0b04f066990bab62a20cffe87c207d" + sha256 cellar: :any, ventura: "65cd5598599cec59f69d94163616856daede84aad13d253e0d2a362d357e1460" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d8904144afa44ec2cec03f86cee27dbf383085f08f3a2b934e8c87b41e51c8b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "86b1ef5d51283f85ad579f4f32277a3ec7926f5357e3af375ae330574917e6e1" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/"install.conf.yaml").write <<~YAML + - create: + - brew + - .brew/test + YAML + + output = shell_output("#{bin}/dotbot -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..863da997210c4 --- /dev/null +++ b/Formula/d/dotdrop.rb @@ -0,0 +1,106 @@ +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 2 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "055b48473b91c2ac18fb5484cbd15d8bce400810a719069e607a0fe6c9c2e850" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0b6fe938d186ff05f54febfe024ca616cddedea94f993297f19677d84686ac4c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "619906eef041a7cf804f950612b4baf06b6b0802799c44c8c2c1430045d1c929" + sha256 cellar: :any_skip_relocation, sonoma: "dd85042f2b735fd8423ff730828fb263155adc05aba7e05ce4bf30f44550c51d" + sha256 cellar: :any_skip_relocation, ventura: "bd9ceaf452864233253439560e22357772f5abfc7bbdc9bae20dd33e928f1206" + sha256 cellar: :any_skip_relocation, arm64_linux: "0075d75bed0623702f6f1ad5fb8a4e51f1e06f824e8119f787c5f54069bbd633" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2333a8e7fcd4a30fe10abc3fde345006592859e6344178a3e7342dc2bc34d699" + end + + depends_on "certifi" + depends_on "libmagic" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/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 "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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 "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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..6195604dbe29f --- /dev/null +++ b/Formula/d/dotenv-linter.rb @@ -0,0 +1,50 @@ +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/v3.3.0.tar.gz" + sha256 "ffcd2f0d5bb40a19ea747ad7786fea796a7454f51e6da8f37fec572da8ae3c5f" + license "MIT" + head "https://github.com/dotenv-linter/dotenv-linter.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e74128c4d30c2a6528fc6a02f79e6e33ccd6a742110726025f02b71ea19e46df" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "981a11e38772c78552307b2c72983ca365ca9f40778a7cfce3f313d202d9ccf3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "061184afd4a55c9b9a1095ab0adc9306fea34473b79908e31d63b3322952b4fa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2758e27ba06e8c9593de63f69e0de848137ce7d0f176a6ddc61e5cd3584d5aff" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ce2bfeff94f6b0d50d14e690054038172d7ad26800f4eb9031f88eb9b390c9e9" + sha256 cellar: :any_skip_relocation, sonoma: "fdbc5c9441782795e7e1ec27befc257875e880b48111dc111d545933084b18c1" + sha256 cellar: :any_skip_relocation, ventura: "a5ee9c2f5b214a98f6f132647cca658fbfe71e6fac928323cbc75da3d28d92ce" + sha256 cellar: :any_skip_relocation, monterey: "5d16c28fec308fcc777002e6a6c58ae798ac141898c3b8c68242dbab9b9160b5" + sha256 cellar: :any_skip_relocation, big_sur: "a575348fa033223614c4dac49591ad81129238c3d8675d3e7a26fed6989e446e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c1d24d5ee409f3bdca9f8b112f29be3bd7c6212ffbac08f516b5c2f0d2ec5461" + sha256 cellar: :any_skip_relocation, x86_64_linux: "374ba41dd72196bdcdf510f52e42a74d0ee35eb96c4ba47bbb88cad7e298d023" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + checks = shell_output("#{bin}/dotenv-linter list").split("\n") + assert_includes checks, "DuplicatedKey" + assert_includes checks, "UnorderedKey" + assert_includes checks, "LeadingCharacter" + + (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", 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..80fd87b459bca --- /dev/null +++ b/Formula/d/dotnet.rb @@ -0,0 +1,171 @@ +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 + url "https://github.com/dotnet/dotnet/archive/refs/tags/v9.0.5.tar.gz" + sha256 "0ff026271b8e21db503284b5cfae8e0546f009d18581497ba754084729dc74c3" + + resource "release.json" do + url "https://github.com/dotnet/dotnet/releases/download/v9.0.5/release.json" + sha256 "36900c37e54d780ade35f2eaeaa9bf2dc1e7789b5d82c6c11a63d0da2853f813" + + 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_sequoia: "9a9c0fea3897f713604263ce3d25755cdc1cc34e9728ce384b1674a23adaf081" + sha256 cellar: :any, arm64_sonoma: "a6be60a96abea6c0c5262c1ee7ef44396cf96837c434beb2f1d7ae0643cffaad" + sha256 cellar: :any, arm64_ventura: "73b20278e33fb2c051e60b19b9aaf216c6edfb6e9b4b615f8a65ee53edff7d00" + sha256 cellar: :any, ventura: "e8e49e3b7d72dbd6adf719f368d0a38bb78a3e29e0368b828339657f765c2fa5" + sha256 cellar: :any_skip_relocation, arm64_linux: "4bc91b3b6e5934256b7c52e0e4028442cc0c263786408f7c10cab58ecdc96942" + sha256 cellar: :any_skip_relocation, x86_64_linux: "238d53cd94923a17447e797249358c06e6e5f8b4574a51bd87fb3c7734c7c39b" + 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, since: :catalina + 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" + conflicts_with cask: "dotnet-sdk" + conflicts_with cask: "dotnet-sdk@preview" + conflicts_with cask: "dotnet@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..78256e30df2c5 --- /dev/null +++ b/Formula/d/dotnet@6.rb @@ -0,0 +1,353 @@ +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_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..7856ccb24bfb9 --- /dev/null +++ b/Formula/d/dotnet@8.rb @@ -0,0 +1,173 @@ +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.16.tar.gz" + sha256 "a722ead5ff5f7635a99920a22fc0665370d443db6469fc06ce7634e200ef9790" + license "MIT" + + livecheck do + url :stable + regex(/^v?(8(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "fd1d4dc64caaa5ca9738dd99c40f598ffe28017dc94d36b589cb522f84de5423" + sha256 cellar: :any, arm64_sonoma: "01df057c866f41909dc9e5691e656a8607fb34de62fb0faf23f31c65b0ba5556" + sha256 cellar: :any, arm64_ventura: "136ac1159cf77b58b9b770769dcc0e03dd4b7f4ea49724d6b2d18ab1ff13f462" + sha256 cellar: :any, ventura: "261d97665ee9dcf394b6ad5b89bc6d39f7f231a36db90f44b465dac14cecc57e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e74118639a11bf3873efee66edb3b778ed5ef7d9e8ec3287fbd3a813306ef612" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f14a7a2e7158f440d8cf82ea8e272be2ee2750740a0509643dd3e2e60290ca43" + 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, since: :catalina + 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 + + resource "release.json" do + url "https://github.com/dotnet/dotnet/releases/download/v8.0.16/release.json" + sha256 "3d85b5918a91afe65c64c53af3c9a7d3ff4ff72ea7dcdf70f552c0512d1d9c43" + + 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..bb8720775315a --- /dev/null +++ b/Formula/d/dotslash.rb @@ -0,0 +1,88 @@ +class Dotslash < Formula + desc "Simplified executable deployment" + homepage "https://dotslash-cli.com/" + url "https://github.com/facebook/dotslash/archive/refs/tags/v0.5.2.tar.gz" + sha256 "4d459ddce4904c37b4c7a6cad8fd21833a9532c726839af1d1d28984623a77ab" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c3ac38a2e4a2cf63cfbd31d2d9cd2c4a38e684962ea47c4e2fef1ce68ddacb41" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3fc2f9e9270dd544592fb316fc64e78e78cec427a2db94623566fc28ce89a2fe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fadffb4eaf0eaf8a3995778a8d17aecfae54d6fbeb81522937b64cc135f8a7f8" + sha256 cellar: :any_skip_relocation, sonoma: "74a6777b9f435596814d4787c64134387216428c6c580b4e47cd1f7aaf2145ee" + sha256 cellar: :any_skip_relocation, ventura: "33a908670fcb8199bb7cb40522cac0091f8a41e14a8cf0940e7dba839e3a31c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "dedd5aa3e2a4bd90a4d395f53206f0d6c69540b2bbc9a6f66939f8bf67776d49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d1d5fe8adf4e3778bf619e8e4961203106203e5a155cde245a0caee4351a8fb" + 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..f13ace87b0cef --- /dev/null +++ b/Formula/d/dotter.rb @@ -0,0 +1,40 @@ +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.3.tar.gz" + sha256 "4ca78450414f405c892c26b1663cac6e56a86e1d04529a7b1a69b23881c38414" + license "Unlicense" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4e22655013ce29dc3aaf2aef3f7c8a6e86fffea03467e20c2fdc521c2b5b426c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "86cfd0af4c611bb66e40cfea7d2d88e231819a84cc9b52eabf1101c51744ee47" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c4573660ea7606a3d479eba1a215baba32327d862981bbeb2a88028f04b21516" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d97dcb1be41061ec99862f720fb241dbbab70d158ca09896bf664291be3d6ef4" + sha256 cellar: :any_skip_relocation, sonoma: "1859dcd0ac4a801579b813c0c6ba11333091b5f6e5fc8f6265fd8d248582c646" + sha256 cellar: :any_skip_relocation, ventura: "0d0e6ebda0277dbd55583f984d9e67e22e3c59244e25e6983772c83f36cbf326" + sha256 cellar: :any_skip_relocation, monterey: "5579f894280cf996c8081487fc932cce497bf5bc9d232e6b2a5d9cff66c92e25" + sha256 cellar: :any_skip_relocation, arm64_linux: "98ade366e0417b7f133a1e28b517ff69e6221b479d0aef896d69d8016c0724f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "35de8ef94e14f8a3f204755c943dfac83aba854bfe6c48d5300fed387673c0b7" + 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..ba5d4f9a8195b --- /dev/null +++ b/Formula/d/double-conversion.rb @@ -0,0 +1,54 @@ +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_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..2abbfebfb3ec6 --- /dev/null +++ b/Formula/d/doublecpp.rb @@ -0,0 +1,107 @@ +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" + + bottle do + 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, mojave: "eed3920bd4e85e32542ce2a67fc9d928f8d8ddfceb0b48e80ddd9db30090e9e6" + sha256 cellar: :any_skip_relocation, high_sierra: "ca161369434cba6763add99e4e470a495662c866a328b374c5d6184e687361cc" + sha256 cellar: :any_skip_relocation, sierra: "748af7fb63392453cc4b648cea20786173202f5c891b45765dbf374e4ac2c2d5" + sha256 cellar: :any_skip_relocation, el_capitan: "208aa405fce2959b47f705ab8ba9104e8eadec3e8e709bddd3117ef7b074bedf" + 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..f06f6e68b08b8 --- /dev/null +++ b/Formula/d/doubledown.rb @@ -0,0 +1,22 @@ +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" + + 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..a102a3023cec6 --- /dev/null +++ b/Formula/d/dovecot.rb @@ -0,0 +1,143 @@ +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 + + bottle do + rebuild 1 + 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..b9baf6a1dbbbb --- /dev/null +++ b/Formula/d/dovi_tool.rb @@ -0,0 +1,49 @@ +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.2.0.tar.gz" + sha256 "44a5f860301ab6ef1a02d8943e210c201ff3733d52b5929a5ab72a09e555041d" + 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_sequoia: "6c34699e13bf1c5fd04879f2c64a0074032c6d3effc79ee56fac744892bd4d36" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5573809c7af735d6adaef77e998bf34f3ad2fab891fac4a11668241e9c8cb48d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2e35381caf2775371ce2a35f7a9aa71d2f69dd272a1777158cf499fa667e8f54" + sha256 cellar: :any_skip_relocation, sonoma: "f22ff979e01886de1db7d0fa4f293839c367eb15ddee1aaaccf7de1f00bad9d2" + sha256 cellar: :any_skip_relocation, ventura: "e20491c0a0cd8351119f2c933bbd2c965b3a17ec77b6a499d64779ce49734a89" + sha256 cellar: :any_skip_relocation, arm64_linux: "102f3161283dca3a3b8811ceda88ddf2a1d17abec112d22acae986574e88f8c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8254aec7392a826c86b3bbbdcd12c7399ca78f863ff6b9909ee899e948f02072" + end + + depends_on "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + 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/doxygen.rb b/Formula/d/doxygen.rb new file mode 100644 index 0000000000000..d24eb6a8ad939 --- /dev/null +++ b/Formula/d/doxygen.rb @@ -0,0 +1,55 @@ +class Doxygen < Formula + desc "Generate documentation for several programming languages" + homepage "https://www.doxygen.nl/" + url "https://doxygen.nl/files/doxygen-1.13.2.src.tar.gz" + mirror "https://downloads.sourceforge.net/project/doxygen/rel-1.13.2/doxygen-1.13.2.src.tar.gz" + sha256 "3a25e3386c26ea5494c784e946327225debfbc5dbfa8b13549010a315aace66d" + 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_sequoia: "1a5f6b558cbcb85ce1dbd7d83b12efc412d7075704b9b4c43e3dfe9b9329993e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa86ff994b5dcb318bdcaa254f5a362ff75619737a042021ebb75a92d33916b3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d726ffc4e7df5f51137b312f5746e5828126ca1f71b733c80d3a6ccf1baf168" + sha256 cellar: :any_skip_relocation, sonoma: "09867504c3d527f0964e543466644ffe2da3ad10ffd8544ef355b4324d06d2f4" + sha256 cellar: :any_skip_relocation, ventura: "4dadc96efe27d3d615ae06a1196c444dd260201122a1b11612147615bd2fd07d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f7e4556f199db6e58e615dcc5a39cbd290f388d2e68746764db5c240f6468f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b58d06f93c341a4fa403c88b5c7144a00c155f71206d7e457c537321d3e833db" + end + + depends_on "bison" => :build + depends_on "cmake" => :build + + uses_from_macos "flex" => :build, since: :big_sur + uses_from_macos "python" => :build + + fails_with :clang do + build 1000 + cause <<~EOS + doxygen-1.11.0/src/datetime.cpp:100:19: error: no viable constructor or deduction guide for deduction of template arguments of 'array' + static std::array g_specFormats + ^ + EOS + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DPYTHON_EXECUTABLE=#{which("python3") || which("python")}", + *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..fc513b94697ca --- /dev/null +++ b/Formula/d/doxymacs.rb @@ -0,0 +1,63 @@ +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" + + bottle do + 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, mojave: "48298f0f0b797c18f3af78a77a0f09f9db3880dc9d85771794894da348aedf1c" + sha256 cellar: :any_skip_relocation, high_sierra: "29a4865170b12a2194c238c35ec5e0902b8e637e378f9013b7aef64fa21eb0fc" + sha256 cellar: :any_skip_relocation, sierra: "2fd3dc59a8c0c8fdccf8195265d320aaa7b5d67e9a81b5a085f27cc287e7370e" + sha256 cellar: :any_skip_relocation, el_capitan: "fb892db831aed57dbdcb2d3a81d78bd05c5b689376d4b7f14bffc56826205ce9" + 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..906058d13fee5 --- /dev/null +++ b/Formula/d/dpcmd.rb @@ -0,0 +1,36 @@ +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 + + bottle do + 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..75a5c74c47265 --- /dev/null +++ b/Formula/d/dpic.rb @@ -0,0 +1,36 @@ +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-2024.01.01.tar.gz" + sha256 "a69d8f5937bb400f53dd8188bc91c6f90c5fdb94287715fa2d8222b482288243" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "59d99f3d68b5d5f6cdd1442f68ea5a9284026d569fc4e6419330631922cfacaa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1359cf82e6b9997e0543b51fe66e278c3f00104064c7757fc6d53a6d5da8363c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "62e275983e3ad6f36101e0a524a29c9e24d973a72443dd750d44e7dbc6353adf" + sha256 cellar: :any_skip_relocation, sonoma: "306191125c20b05c28dae91d0da90c012769e4ecd0aa491e2d78d89594da640a" + sha256 cellar: :any_skip_relocation, ventura: "2be8b31cce643e70b5120d3e8db82c2e6e6733138f62c8d960b0544a05682ae6" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3440b146c2ee69950d80a96aee0be6aa37e2d418e1176ea5a63cd2032efc836" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99bb23d148d753c67dc621b7b5d8b9f3ca8759b7dba0cc45d9fc3b51a7e0611c" + 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..7096efb449338 --- /dev/null +++ b/Formula/d/dpkg.rb @@ -0,0 +1,138 @@ +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.18.tar.xz" + sha256 "7135eb7960e38b2c77810d5aab8cabf5f690fed7475b7b0f2654fd91efbba0f6" + 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_sequoia: "02a5d22a8a023ed282c0f17bd4a74995f05efac2ab8854f0c69a2967fcf2b815" + sha256 arm64_sonoma: "7725a9161f2b53b79d4fb3edf4842b449318ca4655dff5cdb1e79ee016a23d15" + sha256 arm64_ventura: "3065fa9adcac2201fc5331d72c83400f51737ee7cd154f1f96a3d6d46d1fd39c" + sha256 sonoma: "f4a435f42f76422d80718abd7e63e30a3993894378c42db768ce1ee0cbbf091e" + sha256 ventura: "f0bee0a0f628335f89863681dad738435b0533bd91bfcaca6bfece593337ad3f" + sha256 arm64_linux: "27140e671408c0bcd39fbae7d5142cde774ba89d0a1eb2079290c0847462539a" + sha256 x86_64_linux: "32f0c19e331d35e0cabe6c939b45d978e12be53b01b72007b6eac0ead1390d93" + 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 "not linked to prevent 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..6d0684c807ebf --- /dev/null +++ b/Formula/d/dpp.rb @@ -0,0 +1,91 @@ +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_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..e81bcb00977a1 --- /dev/null +++ b/Formula/d/dprint.rb @@ -0,0 +1,62 @@ +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.49.1.tar.gz" + sha256 "df019b295ff137ccaec3ad8c7a39282b485b6381ff5a3519ec18bd3d7c89ba72" + license "MIT" + head "https://github.com/dprint/dprint.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9b0e4b377e98ad778793484a3dff59f74b29906ccde4b94f52acafb9917195a7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "10a11ad7af71def0ba4b5a24c8aabc87563cbe745aa4b9899308e22ecbdbf844" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4b317e6c03f9dbfb204b69c5600b46a480969b4754939d6790ba84ef504a5f21" + sha256 cellar: :any_skip_relocation, sonoma: "76c79faf66dab060c0f8a12748640b27b4749751c52e61ec066120cc8e49e48b" + sha256 cellar: :any_skip_relocation, ventura: "888304a28f1df47eb8dc5acbfe7c7ab7ea3ed82bf2dc01b8fa6e4cad48b3d526" + sha256 cellar: :any_skip_relocation, arm64_linux: "1bcd8dba5722c9dd55148118451136d91948d2d641058a7b923e2b9436af151c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7408ff0f353f0797570b56ba614081abe5fbc553f97d11c4ef7b2f0b175c581c" + end + + depends_on "rust" => :build + + def install + 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..2bec1b857db29 --- /dev/null +++ b/Formula/d/dps8m.rb @@ -0,0 +1,51 @@ +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.0.1-archive/R3.0.1/dps8m-r3.0.1-src.tar.gz" + sha256 "4c7daf668021204b83dde43504396d80ddc36259fd80f3b9f810d6db83b29b28" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "662b0842c1799d9a5321c24202d9769a4684ecf49fccb399c22f5602b278f401" + sha256 cellar: :any, arm64_sonoma: "8512a997de2d7157aa181b8230286d68336640af6056ec945d5f81033711e893" + sha256 cellar: :any_skip_relocation, arm64_ventura: "34bcbbb25c2dfd78c480cabc2fe15524079bbe3cb2a928166bebac1ef7599b34" + sha256 cellar: :any_skip_relocation, arm64_monterey: "23ce64ca8ce99c74b5b50e47ad924980659a4971e569718b88f384146d7ed06d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "abe9ac4fb9b51cfbacd7047980ae30712abf795017bab0d50a2ca9a6eb562ee4" + sha256 cellar: :any, sonoma: "e1e5958347a26b9023e560695fb581b22355d89f7bdc811984fcb4a3fb3ccb74" + sha256 cellar: :any_skip_relocation, ventura: "81654fc8c297d212c51325ff99a85a4118b30448f1142a8996f3091159b8df0c" + sha256 cellar: :any_skip_relocation, monterey: "9a59be99e76eb327e76dbf8e29bd94b43037689a4287c53ef4d882fbfd0e626d" + sha256 cellar: :any_skip_relocation, big_sur: "ec9347f931db9539b6a17a5e3dd9559fd8d4eb0fd56aa7c26c8535c40d3a9c52" + sha256 cellar: :any_skip_relocation, arm64_linux: "d6e3b67195b4a692bda0e617989bbe2a2864a0d0ad47381b3cee12344a38f34f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2607bb961e0b28e82e64392f258f472ccc84335785c703bad7de6b5ebeb1b236" + end + + depends_on "libuv" + + def install + system "make", "install", "PREFIX=#{prefix}" + bin.install %w[src/punutil/punutil src/prt2pdf/prt2pdf] + 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/dra.rb b/Formula/d/dra.rb new file mode 100644 index 0000000000000..07251e00a929e --- /dev/null +++ b/Formula/d/dra.rb @@ -0,0 +1,37 @@ +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.8.1.tar.gz" + sha256 "93b05fd57b893873af622e0324efc63f8da4688bb8115e4b104ca45d05b0ab47" + license "MIT" + head "https://github.com/devmatteini/dra.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "537ded100520b5b459f4f899da12624fd07bca6b6384975a2e2ad88312dbab83" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1de59fcc091a9d8a4f41ac8f785d4ea367ff298df55fe1a5f1702c7da2ba265b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "30192f05fcb6db6d2819474b79a741472a32c8f4e5e5b8ffc6e0a4408f158eac" + sha256 cellar: :any_skip_relocation, sonoma: "1169ee247095063ecfa4a9ccf0a0875daef510972912cf5d9fff0a180bfc66b1" + sha256 cellar: :any_skip_relocation, ventura: "ee84bd924fb7a7c573190693dc4b06a95a1b3a17288642b5dd2782c4aaf62e28" + sha256 cellar: :any_skip_relocation, arm64_linux: "04725a075217369ec9912611521ed0eea5a4f2e0c231ba5df1364227cb135948" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb1ce502c6c2e6a8de47cc1c7c9f180a97f36ca95c98a00988708dcb519ae2c1" + 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..c64340cc24cce --- /dev/null +++ b/Formula/d/draco.rb @@ -0,0 +1,42 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "19a11fa538c294619e4fa59d43b660a82b4dc7132280839c5cd9e646265cd837" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1f4fe7b05ef229486843e184c0697489dbb3e989d1445000639a203ab46f6930" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3af268ae6b1611e6110f380caebb21c017909d63aa9d1fb06432410159038763" + sha256 cellar: :any_skip_relocation, arm64_monterey: "52eb3ca3d3ec7aa77a70d4b985096409ed2a4c17d27718426a43bf1c9427435b" + sha256 cellar: :any_skip_relocation, sonoma: "814aaa444d53214093d915e256f8a7ccc6677c59503e1ce706774ce567614976" + sha256 cellar: :any_skip_relocation, ventura: "e2b2177c30a62da96b47b4e0f433f279af482477561508e6637fa800e8b90add" + sha256 cellar: :any_skip_relocation, monterey: "e16ac56c7b5906c79b9c501ce9b17169a621156911613ccbb5f257809764b11d" + sha256 cellar: :any_skip_relocation, arm64_linux: "48d72a987891a5e9606a4103f3d5b32676e72054736db1a066b45773b19703fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f36b1685009883d27bf08cd3d554ecb16c05fe25b127cedc9980f20d6897f654" + 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 "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..93fbb79fbc881 --- /dev/null +++ b/Formula/d/draft.rb @@ -0,0 +1,34 @@ +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.11.tar.gz" + sha256 "91ab1bc877883e4bc2bd0424f748e2ba8b6c5e20acec52d3061ebd68706956dd" + license "MIT" + head "https://github.com/Azure/draft.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aaa730301a7d77c4638927be72b648b9c86555318873ba4d03cec5152e5ed710" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac732690e8096ce8d836ff10c46867529373a8450530977f77b0751639df4c09" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6441a7329f77438daa227cc746071742bb4ae2594df338ce59ee4bb9adcf3074" + sha256 cellar: :any_skip_relocation, sonoma: "6cb28c0ccd6b48aba8e49c82a56a7e223514b321ccbc8c8ce1a597281961b85b" + sha256 cellar: :any_skip_relocation, ventura: "f10aaa049dd8739890b5b26d6b0fb4f771e816e34b92e9d70553d509f2a1fe1f" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c81c7afc2efb7f0513b0f1763bbe8b068ed22e8ccb1234f42482a310e233ce3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d654a7f06ea0e4cc21e9a25930c33b883835ccf4d6211d231dea39c0e5715d13" + 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..469c5098cec15 --- /dev/null +++ b/Formula/d/drafter.rb @@ -0,0 +1,51 @@ +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_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 + system "cmake", "-S", ".", "-B", "build", *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..85449a49f09c7 --- /dev/null +++ b/Formula/d/dragonbox.rb @@ -0,0 +1,59 @@ +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_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/drake.rb b/Formula/d/drake.rb new file mode 100644 index 0000000000000..b72c078147074 --- /dev/null +++ b/Formula/d/drake.rb @@ -0,0 +1,54 @@ +class Drake < Formula + desc "Data workflow tool meant to be 'make for data'" + homepage "https://github.com/Factual/drake" + url "https://github.com/Factual/drake/archive/refs/tags/1.0.3.tar.gz" + sha256 "49c22b84f4059c1af905f92e276ac8a7aa80a8c236aca4c06df9b6c676b2cff7" + license "EPL-1.0" + head "https://github.com/Factual/drake.git", branch: "develop" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "98db9a4ae8a9345944f0b5388a35036c9a2384137f7a7db044ebc59cb5ebc117" + end + + # Last release on 2016-04-15 + # No response to https://github.com/Factual/drake/issues/227 on project status + disable! date: "2024-10-11", because: :unmaintained + + depends_on arch: :x86_64 # openjdk@8 is not supported on ARM + depends_on "openjdk@8" + + resource "jar" do + url "https://github.com/Factual/drake/releases/download/1.0.3/drake.jar" + sha256 "c9c5b109a900b6f30257425feee7a4e05ef11cc34cf227b04207a2f8645316af" + end + + def install + jar = "drake-#{version}-standalone.jar" + inreplace "bin/drake-pkg", "DRAKE_JAR", libexec/jar + + libexec.install "bin/drake-pkg" => "drake" + chmod 0755, libexec/"drake" + env = Language::Java.overridable_java_home_env("1.8") + env["PATH"] = "$JAVA_HOME/bin:$PATH" + (bin/"drake").write_env_script libexec/"drake", env + + resource("jar").stage do + libexec.install "drake.jar" => jar + end + end + + test do + # count lines test + (testpath/"Drakefile").write <<~EOS + find_lines <- [shell] + echo 'drake' > $OUTPUT + + count_drakes_lines <- find_lines + cat $INPUT | wc -l > $OUTPUT + EOS + + # force run (no user prompt) the full workflow + system bin/"drake", "--auto", "--workflow=#{testpath}/Drakefile", "+..." + end +end diff --git a/Formula/d/driftctl.rb b/Formula/d/driftctl.rb new file mode 100644 index 0000000000000..e88942c4d370a --- /dev/null +++ b/Formula/d/driftctl.rb @@ -0,0 +1,49 @@ +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_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, 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..f957ddaad56e7 --- /dev/null +++ b/Formula/d/driftwood.rb @@ -0,0 +1,65 @@ +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_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, 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..49ceb0a55924b --- /dev/null +++ b/Formula/d/drill.rb @@ -0,0 +1,57 @@ +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_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..05ff9d9a476ff --- /dev/null +++ b/Formula/d/drogon.rb @@ -0,0 +1,63 @@ +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.10", + revision: "cbf63f8fc4d849bbb82eeb1c83fcf8ff953f19f3" + license "MIT" + head "https://github.com/drogonframework/drogon.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "eaa532684adb01456ea16257408c2fc1e630ec7f369eaec77a9a18290c5c3b41" + sha256 arm64_sonoma: "8c5850884ec0ae09d4b17f37f3b3b8ff52c9b32f1160c95332a6208ab5085d45" + sha256 arm64_ventura: "452c23f0d15e9fae038387c4b7e9d151c80b9ce0f182a823b426e761bbb1dce6" + sha256 sonoma: "1f7d3528eafbd4fd89b546f930293184c08a1b96d3cafc849ed7b0d93d497c27" + sha256 ventura: "34690a0d3adc7ef0d65366be9f7c73baa7b3d2ca77368c1a71ded22f6584cdd5" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbbff4e21d26ba23715324ed47a6d66be5bf6a935160ef30684f7ada91839ebc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4d380c27cc5a5230b12e1889fca7fd3e6fad564e13a56021a8c3d26cc88d49e" + 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..7a23106f9cc61 --- /dev/null +++ b/Formula/d/dromeaudio.rb @@ -0,0 +1,51 @@ +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_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, mojave: "062b0fa8e43363d60e5816343d1fcb7f58ce02c236512d96f4bf4ba10c96fd2c" + sha256 cellar: :any_skip_relocation, high_sierra: "1334685c021a520567e2d16bfe68ebddea8f9382a50645e241d09349cfb6b450" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5db31bd07590274f76bfd1b145f31f5578834a96d9c093448860b27ac2d0a24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f070aab40ff55d1bc82cae306c222e05770d9b5cd22fdace7fbb7d04ea7aa6f" + end + + depends_on "cmake" => :build + + def install + # install FindDromeAudio.cmake under share/cmake/Modules/ + inreplace "share/CMakeLists.txt", "${CMAKE_ROOT}", "#{share}/cmake" + + system "cmake", "-S", ".", "-B", "build", *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..68daed28d0f1c --- /dev/null +++ b/Formula/d/drone-cli.rb @@ -0,0 +1,34 @@ +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.8.0.tar.gz" + sha256 "715e1187b8ccace88111671999c296dbd91e7523e09b0ee22dfb328f1a1d831b" + license "Apache-2.0" + head "https://github.com/harness/drone-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "32169cc3c88c8673a10a0667ad401d8ec22cc38873044b6da6dcf5ebe92d9d9a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8fc8dfba68da80112f85551c3dce05fc6cb269a6ae4a4f4aa7a1732d8098a85e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8fc8dfba68da80112f85551c3dce05fc6cb269a6ae4a4f4aa7a1732d8098a85e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8fc8dfba68da80112f85551c3dce05fc6cb269a6ae4a4f4aa7a1732d8098a85e" + sha256 cellar: :any_skip_relocation, sonoma: "bdb5c00c40d6176cd7f9dcf1d5d2e16bd73301687f8feca565f6ac7ab99b5651" + sha256 cellar: :any_skip_relocation, ventura: "bdb5c00c40d6176cd7f9dcf1d5d2e16bd73301687f8feca565f6ac7ab99b5651" + sha256 cellar: :any_skip_relocation, monterey: "bdb5c00c40d6176cd7f9dcf1d5d2e16bd73301687f8feca565f6ac7ab99b5651" + sha256 cellar: :any_skip_relocation, arm64_linux: "e416b331781eb265b5d9c17160bbf733290c38927a64dbe173da68935572d00f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9f53894149db17b3bb43aeaf2b72cf81f4d9f564fe810b1e7ec241645a5be2e" + 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..89a6297e6369f --- /dev/null +++ b/Formula/d/dropbear.rb @@ -0,0 +1,59 @@ +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_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/dropbox-uploader.rb b/Formula/d/dropbox-uploader.rb similarity index 76% rename from Formula/dropbox-uploader.rb rename to Formula/d/dropbox-uploader.rb index 25b5b733d10c9..90cf9c292a187 100644 --- a/Formula/dropbox-uploader.rb +++ b/Formula/d/dropbox-uploader.rb @@ -1,11 +1,14 @@ 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/1.0.tar.gz" + url "https://github.com/andreafabrizi/Dropbox-Uploader/archive/refs/tags/1.0.tar.gz" sha256 "8c9be8bd38fb3b0f0b4d1a863132ad38c8299ac62ecfbd1e818addf32b48d84c" - license "GPL-3.0" + license "GPL-3.0-or-later" - bottle :unneeded + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7c75671b625c28098f9e47ca1290b976943c041666e1250798f2a0cc5d73135d" + end def install bin.install "dropbox_uploader.sh", "dropShell.sh" 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..d0d832ab1654b --- /dev/null +++ b/Formula/d/dry.rb @@ -0,0 +1,34 @@ +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_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, 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..8166a14550671 --- /dev/null +++ b/Formula/d/dscanner.rb @@ -0,0 +1,52 @@ +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_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 + + on_arm do + depends_on "ldc" => :build + end + + on_intel do + depends_on "dmd" => :build + end + + def install + # Fix for /usr/bin/ld: obj/dmd/containers/src/containers/ttree.o: + # relocation R_X86_64_32 against hidden symbol `__stop_minfo' + # can not be used when making a PIE object + ENV.append "DFLAGS", "-fPIC" if OS.linux? && Hardware::CPU.intel? + system "make", "all", "DC=#{Hardware::CPU.arm? ? "ldc2" : "dmd"}" + 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..d364676c6b6e9 --- /dev/null +++ b/Formula/d/dsda-doom.rb @@ -0,0 +1,85 @@ +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.0.tar.gz" + sha256 "8a9e477c593320e488bbe0d0255ff23df8422869c397da3e222529e6a38db70d" + license "GPL-2.0-only" + head "https://github.com/kraflab/dsda-doom.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "62d79a9e28f986ac5d317caf56fe7507d41324233e01ad58fae7f511b68bbb96" + sha256 arm64_sonoma: "904eb35ca00eb76c99f65db6d17128670d6741c63a610e95777daccea320ab46" + sha256 arm64_ventura: "73ec5cb58f3621d80d1269bf98019a8991ca249a9be2166bdede06f3d17fbca2" + sha256 sonoma: "6f089e319ad1807a4838fa4e62f90d0722144a994f3e4e72ba0a6bc2b165ce2f" + sha256 ventura: "9bbfc89050f4e7f48dd21d7c334c3dda14a9297e1b692b288d9f776326dd1232" + sha256 arm64_linux: "e010235a756f7d322ed9cabbacc59b874db7206051e8d5a4586deb2879678bca" + sha256 x86_64_linux: "11154eb148709feb22b9e65b4e8f55968023a454d9b90854bd9c8aee0f035e9c" + end + + depends_on "cmake" => :build + + depends_on "dumb" + depends_on "fluid-synth" + depends_on "libvorbis" + 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_macos do + depends_on "libogg" + end + + 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}", + "-DWITH_DUMB=OM", + "-DWITH_FLUIDSYNTH=ON", + "-DWITH_IMAGE=ON", + "-DWITH_MAD=ON", + "-DWITH_PORTMIDI=ON", + "-DWITH_VORBISFILE=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..4a90d815438f0 --- /dev/null +++ b/Formula/d/dsh.rb @@ -0,0 +1,51 @@ +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 + + bottle do + 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 mojave: "e978724605a216f2e3ffc5df3ba12bb53e3150aa63b7d18779723e563a35f867" + sha256 high_sierra: "5d553941319eae8d839a53063057fff05b359eb13e53da2d7313c3d41fae88b0" + sha256 sierra: "9d694a476e5d74d7c3edbf284628e3f68c96c5a30c91b7fd3c624630805636ea" + sha256 el_capitan: "0b6a147235228473634c424e5e12671b6e9a4609ce6b732dd5ca9f56f335add5" + 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..ba6d9949eb1f8 --- /dev/null +++ b/Formula/d/dsocks.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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, mojave: "04977648b6805fb7e82c01064872c9a44356cc2b8499adde514aebe1687bfed8" + sha256 cellar: :any, high_sierra: "c6f4212b4e925dc0d29b21f96ab244a8a6842ea44b72f3e48036e69d86ac4c93" + sha256 cellar: :any, sierra: "896675fab1d6bf50e5ab9512041ab49fcf9af65198d93ec85c0f2c0d801df49d" + sha256 cellar: :any, el_capitan: "9b764e48bfe348433382d030a4aa00eefe1afa63b6bcfaab2450101bb429020e" + 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..ee711c32878ea --- /dev/null +++ b/Formula/d/dspdfviewer.rb @@ -0,0 +1,64 @@ +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 24 + head "https://github.com/dannyedel/dspdfviewer.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1e3e58ee1b8f07f27875503f799f27a43005828e3e952a7796ff3ba0e7348ed6" + sha256 cellar: :any, arm64_sonoma: "9d5d2f9eba46d09ca76df8877045f43cd5fe09c3f941be53db33a874e967451a" + sha256 cellar: :any, arm64_ventura: "9a65187c3e58d232fb02d2036bbec56b844dc5a00efd0b4a057a489268d02e02" + sha256 cellar: :any, sonoma: "feca0534b99e6265c66b5fdf1f9949db4948003715a58c27755171b19659dd28" + sha256 cellar: :any, ventura: "9f34c4b625b6d91a6e2708217ea7f93677ead5810433a880e96f924a2258ae27" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4719064766a35fa5c5879cd048d143732e7f54e8df986505ec00512e9cf1022" + end + + 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..49fe44bd37b27 --- /dev/null +++ b/Formula/d/dsq.rb @@ -0,0 +1,37 @@ +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_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..bf7d0ecf7f684 --- /dev/null +++ b/Formula/d/dssim.rb @@ -0,0 +1,28 @@ +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_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..3afdf8af754f0 --- /dev/null +++ b/Formula/d/dstack.rb @@ -0,0 +1,644 @@ +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/27/8f/f982cf705f2f86e29ec21de17735840c51b9ba1a97ff05fcdbc874d917f2/dstack-0.19.9.tar.gz" + sha256 "660c1b45daa91de9be47fcdfc221bea177a0119a989146ab98eb13793476f0e9" + license "MPL-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "aa528f1df801662042ccc6941106e5ea55347247d3a8a4e71fafdbfb365608a0" + sha256 cellar: :any, arm64_sonoma: "d557fe3708104806c229bb03221dd22e99649cef8dcddb461715de9714e324ba" + sha256 cellar: :any, arm64_ventura: "15654b5f18a846c4e99e3753f4b218aee2578669611c4f09a7125ad18c8c3a58" + sha256 cellar: :any, sonoma: "642eb1d794caa43cf2599665f2bc3525d2b6a466cd105d48af9e8edf1f260382" + sha256 cellar: :any, ventura: "eb0a660fc89200d518f24d66825104bd5f2a0984c0cdfca53b9e6c3f928bc33b" + sha256 cellar: :any_skip_relocation, arm64_linux: "18a1b5cd0f880c3cf96ce21c6f7cfb23f35afd4c94cf2b742e7c7c90f9d40078" + sha256 cellar: :any_skip_relocation, x86_64_linux: "602b479d07261a06878a25bf7ffdd001ce07a76ef64548b06a4ec6ec36c789c5" + 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 "libyaml" + depends_on "python@3.13" + + 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/e6/57/e314c31b261d1e8a5a5f1908065b4ff98270a778ce7579bd4254477209a7/alembic-1.15.2.tar.gz" + sha256 "1c72391bbdeffccfe317eefba686cb9a3c078005478885413b95c3b26c57a8a7" + end + + resource "alembic-postgresql-enum" do + url "https://files.pythonhosted.org/packages/f9/45/d3a66a8c7604baba5b498727539539120897fd8f931a6c89aa68ff0d7cb3/alembic_postgresql_enum-1.7.0.tar.gz" + sha256 "1a12a2b25f3f49440f419821888530496511573875438b6e9a08cbcb8a6f006f" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + 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/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + 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/c9/29/ff7a519a315e41c85bab92a7478c6acd1cf0b14353139a08caee4c691f77/azure_core-1.34.0.tar.gz" + sha256 "bdb544989f246a0ad1c85d72eeb45f2f835afdcbc5b45e43f0dbde7461c81ece" + end + + resource "azure-identity" do + url "https://files.pythonhosted.org/packages/41/52/458c1be17a5d3796570ae2ed3c6b7b55b134b22d5ef8132b4f97046a9051/azure_identity-1.23.0.tar.gz" + sha256 "d9cdcad39adb49d4bb2953a217f62aec1f65bbb3c63c9076da2be2a47e53dde4" + 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/87/30/bb941f2eee419009668305b510dfb3577604a08102b3a1d0df78d14205f3/azure_mgmt_compute-34.1.0.tar.gz" + sha256 "cd9d35d1cc1b8cb0bd241ad55c91b77d14e04ae73c632ada1140135f9c217fe1" + end + + resource "azure-mgmt-core" do + url "https://files.pythonhosted.org/packages/48/9a/9bdc35295a16fe9139a1f99c13d9915563cbc4f30b479efaa40f8694eaf7/azure_mgmt_core-1.5.0.tar.gz" + sha256 "380ae3dfa3639f4a5c246a7db7ed2d08374e88230fd0da3eb899f7c11e5c441a" + 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-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/a7/28/e950da2d89e55e2315ff0f4de075da4ac0fed4c27a489f7c774dedde9854/azure_mgmt_resource-23.3.0.tar.gz" + sha256 "fc4f1fd8b6aad23f8af4ed1f913df5f5c92df117449dc354fea6802a2829fea4" + 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/bb/5d/6d7433e0f3cd46ce0b43cd65e1db465ea024dbb8216fb2404e919c2ad77b/bcrypt-4.3.0.tar.gz" + sha256 "3a3fd2204178b6d2adcf09cb4f6426ffef54762577a7c9b54c159008cb288c18" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/02/e9/f20bbfcdea28329fa07ee353b85bea375d89d854f98c240b12a8a08e3664/boto3-1.38.16.tar.gz" + sha256 "0d4d9da05f20cf4bf351735307d9cda8711a5f7ad15de88b4e9372c6ee40d99f" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/ab/1b/fc86b24cfe9a5e88a9e4ee73ece2c5448cdf4551d9dabd87ff2ff69b2d8b/botocore-1.38.16.tar.gz" + sha256 "bf3666611259844b8e9478b88b162009082767789ed929059db4bbd370b75ee8" + end + + resource "cached-classproperty" do + url "https://files.pythonhosted.org/packages/6f/00/6c75d528e795555d65de8a4cd181347a5918d267c278478aeba2b369769b/cached_classproperty-1.0.1.tar.gz" + sha256 "24ac50911c5a87bd57fafc348ce14ba58584975e73d1dfea329d1dcdc9f774c0" + 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/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + end + + resource "cursor" do + url "https://files.pythonhosted.org/packages/59/1b/ae231e1f9a8e1f970453f92fcb20a3fce87fa38753915477c26bc1655d86/cursor-1.3.5.tar.gz" + sha256 "6758cae6ac14765ec85d9ce3f14fcb98fff5045f06d8398f1e8da8ce3acd2f20" + end + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/98/97/06afe62762c9a8a86af0cfb7bfdab22a43ad17138b07af5b1a58442690a2/deprecated-1.2.18.tar.gz" + sha256 "422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d" + 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/f4/55/ae499352d82338331ca1e28c7f4a63bfd09479b16395dce38cf50a39e2c2/fastapi-0.115.12.tar.gz" + sha256 "1e2c2a2646905f9e83d32f04a3f86aff4a286669c6c950ca95b5fd68c2602681" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + 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 "google-api-core" do + url "https://files.pythonhosted.org/packages/1f/5a/746a50ac46d6cb716fa30bf5686663ac27fb2616d07391d1e8d919dc2acc/google_api_core-2.25.0rc1.tar.gz" + sha256 "ec279085923652b0d2e4c72fd6bb926ee17e9c960f0b8a472df146a42493957e" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/4f/e6/787c24738fc7c99de9289abe60bd64591800ae1cdf60db7b87e0e6ef9cdd/google_api_python_client-2.169.0.tar.gz" + sha256 "0585bb97bd5f5bf3ed8d4bf624593e4c5a14d06c811d1952b07a1f94b4d12c51" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/94/a5/38c21d0e731bb716cffcf987bd9a3555cb95877ab4b616cfb96939933f20/google_auth-2.40.1.tar.gz" + sha256 "58f0e8416a9814c1d86c9b7f6acf6816b51aba167b2c76821965271bac275540" + 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/cb/ec/ac5eed8660dd49a68d425c1e9594a40dc0c757d3d06af1e7731e5ff5d4ee/google_cloud_appengine_logging-1.6.1.tar.gz" + sha256 "f97bde36c7f7ff541123c2570813158bdda0c3f2385c8d32fdf1211c561ae56d" + end + + resource "google-cloud-audit-log" do + url "https://files.pythonhosted.org/packages/85/af/53b4ef636e492d136b3c217e52a07bee569430dda07b8e515d5f2b701b1e/google_cloud_audit_log-0.3.2.tar.gz" + sha256 "2598f1533a7d7cdd6c7bf448c12e5519c1d53162d78784e10bcdd1df67791bc3" + end + + resource "google-cloud-billing" do + url "https://files.pythonhosted.org/packages/e0/75/3154aa521af2028ae12ac45afefe1f4b1a4e9c1ddf4db8107be1aebf7d28/google_cloud_billing-1.16.2.tar.gz" + sha256 "49ed14e5b184731ec9207e0eaf0f72cbab4ac541a2017f939c1a3e3bb5966d04" + end + + resource "google-cloud-compute" do + url "https://files.pythonhosted.org/packages/3f/ff/ea0b7e1b265b91511cb44b95e64634d10e747133a1896c6d80fb4a559cfe/google_cloud_compute-1.30.0.tar.gz" + sha256 "8b2d3fe37380de5859a786081d9bcc1203a0f3a205300839a27f828d59828a27" + 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-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/f3/08/52143124415a889bbab60a8ecede1e31ea0e8d992ca078317886f26dc3be/google_cloud_storage-3.1.0.tar.gz" + sha256 "944273179897c7c8a07ee15f2e6466a02da0c7c4b9ecceac2a26017cb2972049" + end + + resource "google-cloud-tpu" do + url "https://files.pythonhosted.org/packages/45/1f/e3bbd2115e64258ed50e901c264408999e35aa593125cebc7cc087f43221/google_cloud_tpu-1.23.1.tar.gz" + sha256 "df0f8c6e825c0a48471bed825a79d31686390d2069e374f086e0953f5771357c" + 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/39/24/33db22342cf4a2ea27c9955e6713140fedd51e8b141b5ce5260897020f1a/googleapis_common_protos-1.70.0.tar.gz" + sha256 "0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257" + end + + resource "gpuhunt" do + url "https://files.pythonhosted.org/packages/97/bd/c66741a78134095022d365f89de97b06afc31f4e8aa23fc5cacf993010b0/gpuhunt-0.1.5.tar.gz" + sha256 "fc6e744c2156c3b78d5412d39298814e24bbb50f9909e4f2be8e47a4423ff683" + end + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/34/c1/a82edae11d46c0d83481aacaa1e578fea21d94a1ef400afd734d47ad95ad/greenlet-3.2.2.tar.gz" + sha256 "ad053d34421a2debba45aa3cc39acf454acbcd025b3fc1a9f8a0dee237abd485" + end + + resource "grpc-google-iam-v1" do + url "https://files.pythonhosted.org/packages/b9/4e/8d0ca3b035e41fe0b3f31ebbb638356af720335e5a11154c330169b40777/grpc_google_iam_v1-0.14.2.tar.gz" + sha256 "b3e1fc387a1a329e41672197d0ace9de22c78dd7d215048c4c78712073f7bd20" + end + + resource "grpcio" do + url "https://files.pythonhosted.org/packages/d1/33/bf7bf9188cfce1c626e4c5d55523fec7f2f1d905e003df5da025f532916e/grpcio-1.72.0rc1.tar.gz" + sha256 "221793dccd3332060f426975a041d319d6d57323d857d4afc25257ec4a5a67f3" + end + + resource "grpcio-status" do + url "https://files.pythonhosted.org/packages/d7/53/a911467bece076020456401f55a27415d2d70d3bc2c37af06b44ea41fc5c/grpcio_status-1.71.0.tar.gz" + sha256 "11405fed67b68f406b3f3c7c5ae5104a79d2d309666d10d61b152e91d28fb968" + 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/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 "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/33/08/c1395a292bb23fd03bdf572a1357c5a733d3eecbab877641ceacab23db6e/importlib_metadata-8.6.1.tar.gz" + sha256 "310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + 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 "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/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 "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/3f/90/81dcc50f0be11a8c4dcbae1a9f761a26e5f905231330a7cacc9f04ec4c61/msal-1.32.3.tar.gz" + sha256 "5eea038689c78a5a70ca8ecbe1245458b55a857bd096efb6989c69ba15985d35" + 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/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + end + + resource "opentelemetry-api" do + url "https://files.pythonhosted.org/packages/70/ca/920a73b4a11cd271ba1c62f34dba27d7783996a6a7ac0bac7c83b230736d/opentelemetry_api-1.33.0.tar.gz" + sha256 "cc4380fd2e6da7dcb52a828ea81844ed1f4f2eb638ca3c816775109d93d58ced" + 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/7d/15/ad6ce226e8138315f2451c2aeea985bf35ee910afb477bae7477dc3a8f3b/paramiko-3.5.1.tar.gz" + sha256 "b2c665bc45b2b215bd7d7f039901b14b067da00f3a11e6640995fd58f2664822" + end + + resource "prometheus-client" do + url "https://files.pythonhosted.org/packages/62/14/7d0f567991f3a9af8d1cd4f619040c93b68f09a02b6d0b6ab1b2d1ded5fe/prometheus_client-0.21.1.tar.gz" + sha256 "252505a722ac04b0456be05c05f75f45d760c2911ffc45f2a06bcaed9f3ae3fb" + 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/17/7d/b9dca7365f0e2c4fa7c193ff795427cfa6290147e5185ab11ece280a18e7/protobuf-5.29.4.tar.gz" + sha256 "4f1dfcd7997b31ef8f53ec82781ff434a28bf71d9102ddde14d076adcfc78c99" + 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 "pydantic" do + url "https://files.pythonhosted.org/packages/9a/57/5996c63f0deec09e9e901a2b838247c97c6844999562eac4e435bcb83938/pydantic-1.10.22.tar.gz" + sha256 "ee1006cebd43a8e7158fb7190bb8f4e2da9649719bff65d0c287282ec38dec6d" + 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/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 "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/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + 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-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/9e/de/d3144a0bceede957f961e975f3752760fbe390d57fbe194baf709d8f1f7b/python_json_logger-3.3.0.tar.gz" + sha256 "12b7e74b17775e7d565129296105bbe3910842d9d0eb083fc83a6a617aa8df84" + 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/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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "rich-argparse" do + url "https://files.pythonhosted.org/packages/aa/b9/ff53663ee7fa6a4195fa96d91da499f2e00ca067541e016d345cce1c9ad2/rich_argparse-1.7.0.tar.gz" + sha256 "f31d809c465ee43f367d599ccaf88b73bc2c4d75d74ed43f2d538838c53544ba" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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/fc/9e/73b14aed38ee1f62cd30ab93cd0072dec7fb01f3033d116875ae3e7b8b44/s3transfer-0.12.0.tar.gz" + sha256 "8ac58bc1989a3fdb7c7f3ee0918a66b160d038a147c7b5db1500930a607e9a1c" + end + + resource "sentry-sdk" do + url "https://files.pythonhosted.org/packages/5e/bb/6a41b2e0e9121bed4d2ec68d50568ab95c49f4744156a9bbb789c866c66d/sentry_sdk-2.28.0.tar.gz" + sha256 "14d2b73bc93afaf2a9412490329099e6217761cbab13b6ee8bc0e82927e1504e" + 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/63/66/45b165c595ec89aa7dcc2c1cd222ab269bc753f1fc7a1e68f8481bd957bf/sqlalchemy-2.0.41.tar.gz" + sha256 "edba70118c4be3c2b1f90754d308d0b79c6fe2c0fdc52d8ddf603916f83f4db9" + end + + resource "sqlalchemy-utils" do + url "https://files.pythonhosted.org/packages/4d/bf/abfd5474cdd89ddd36dbbde9c6efba16bfa7f5448913eba946fed14729da/SQLAlchemy-Utils-0.41.2.tar.gz" + sha256 "bc599c8c3b3319e53ce6c5c3c471120bd325d0071fb6f38a10e924e3d07b9990" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/ce/20/08dfcd9c983f6a6f4a1000d934b9e6d626cff8d2eeb77a89a68eef20a2b7/starlette-0.46.2.tar.gz" + sha256 "7f7361f34eed179294600af672f565727419830b54b7b084efe44bb82d2fccd5" + 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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + 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/d2/5a/4742fdba39cd02a56226815abfa72fe0aa81c33bed16ed045647d6000eba/uritemplate-4.1.1.tar.gz" + sha256 "4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/a6/ae/9bbb19b9e1c450cf9ecaef06463e40234d98d95bf572fab11b4f19ae5ded/uvicorn-0.34.2.tar.gz" + sha256 "0e929828f6186353a80b58ea719861d2629d766293b6d19baf086ba31d4f3328" + end + + resource "watchfiles" do + url "https://files.pythonhosted.org/packages/03/e2/8ed598c42057de7aa5d97c472254af4906ff0a59a66699d426fc9ef795d7/watchfiles-1.0.5.tar.gz" + sha256 "b7529b5dcc114679d43827d8c35a07c493ad6f083633d573d81c660abc5979e9" + 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/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + 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/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + end + + def install + virtualenv_install_with_resources + end + + test do + expected = "No default project, specify project name" + assert_match expected, shell_output("#{bin}/dstack init 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/dstack --version") + end +end diff --git a/Formula/d/dstask.rb b/Formula/d/dstask.rb new file mode 100644 index 0000000000000..65e4aea05d611 --- /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/0.27.tar.gz" + sha256 "85da92eb50c3611e1054f5153dc0cf90fe1b8b12219c77d1aa86a61384c450a0" + license "MIT" + head "https://github.com/naggie/dstask.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c5ee01e4bed812038f3734de20cab6be5da1d4d17235489037fd0f5f7dac25a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c5ee01e4bed812038f3734de20cab6be5da1d4d17235489037fd0f5f7dac25a9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c5ee01e4bed812038f3734de20cab6be5da1d4d17235489037fd0f5f7dac25a9" + sha256 cellar: :any_skip_relocation, sonoma: "6958dcb344570273f7eeaa408ee4b0ebbc4cc2d03fce10d8483b8c7e163085c2" + sha256 cellar: :any_skip_relocation, ventura: "6958dcb344570273f7eeaa408ee4b0ebbc4cc2d03fce10d8483b8c7e163085c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a9f1978c6d71f808ebef38ac0f046f2b28e437b0df2f10e375231e5d625a00bc" + 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/dsvpn.rb b/Formula/d/dsvpn.rb new file mode 100644 index 0000000000000..cf96435b17d72 --- /dev/null +++ b/Formula/d/dsvpn.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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, mojave: "31a8359d756b673788aad04e1b776c0e1d5b6331f7e64494d3c6680280ea11ec" + sha256 cellar: :any_skip_relocation, high_sierra: "d34ff5d83b0b259c5051de2e2e8cf4599679d1d7e61dd282065afb0516fe62b1" + 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..f508ae4e6880d --- /dev/null +++ b/Formula/d/dtach.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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, mojave: "8126575ec7b9f9a4e9ba092e8d2c706c7a162c6dd7678c8dbbdc42676aae7eb6" + sha256 cellar: :any_skip_relocation, high_sierra: "286aa27d4de791d50bb7c16c57682174a9fbfd73890e7f58fa2681f48dc12c75" + sha256 cellar: :any_skip_relocation, sierra: "f69d8585d47b722bee78bc189708d5348548a3ad68a4ff6cb91443624f4a3f0c" + sha256 cellar: :any_skip_relocation, el_capitan: "bf26c7f68f65ae257c878e2008683d496a8c7542b3048e057bc3d588d779e16a" + 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..0734a36b10c18 --- /dev/null +++ b/Formula/d/dtc.rb @@ -0,0 +1,43 @@ +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_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..f1ee2beccd66e --- /dev/null +++ b/Formula/d/dtm.rb @@ -0,0 +1,50 @@ +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_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, 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..29ac7256a109b --- /dev/null +++ b/Formula/d/dtools.rb @@ -0,0 +1,54 @@ +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" + + bottle do + 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..67406f1c51594 --- /dev/null +++ b/Formula/d/dtrx.rb @@ -0,0 +1,58 @@ +class Dtrx < Formula + include Language::Python::Virtualenv + + desc "Intelligent archive extraction" + homepage "https://pypi.org/project/dtrx/" + url "https://files.pythonhosted.org/packages/b7/e6/204294b57be7bb5072c217a1c3ddd5acf9b60b006c215e13e11121c04108/dtrx-8.5.3.tar.gz" + sha256 "eec67869b85068fac8406f5018d781aee5b55422f3b7698bfea43468b2cec67c" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a1c04af670ced811950bb65e3ad904f2fe306b495e9ce1ebc1f0c816d016c088" + end + + # Include a few common decompression handlers in addition to the python dep + depends_on "p7zip" + depends_on "python@3.13" + depends_on "xz" + + uses_from_macos "zip" => :test + uses_from_macos "bzip2" + uses_from_macos "unzip" + + # Apply commit from open PR to fix `--flat` on Python 3.12+ + # Issue ref: https://github.com/dtrx-py/dtrx/issues/58 + # PR ref: https://github.com/dtrx-py/dtrx/pull/59 + patch do + url "https://github.com/dtrx-py/dtrx/commit/4f2868c87e7d2eef97c9dbcbea4d1738e947463d.patch?full_index=1" + sha256 "f81b0ed271ddfa22ee0e1d26f9ac3c5ea3e979497918594e8fc266b24b561a51" + end + + 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..6f4f715593fa5 --- /dev/null +++ b/Formula/d/dtsroll.rb @@ -0,0 +1,32 @@ +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_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..65f8e92f4d743 --- /dev/null +++ b/Formula/d/dua-cli.rb @@ -0,0 +1,36 @@ +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.30.1.tar.gz" + sha256 "e7cb52b4dc6bf89a554b0f1292344eafceeace1cbf957a2c0942bf1201b404a9" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "757cc4d0c36a61b8997cafc441891febe9aebfab9c31061da3bb6eeee57ed6b6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0c0cafb929368a37b064bbe654badfec69e81591bc64fc709a884206f4ec5201" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ba47ae7e44a346ed1e8e93d10a4ddb9e231105ed277416c555543c42d1d0a104" + sha256 cellar: :any_skip_relocation, sonoma: "8092bcc37112ec20f690a9e41bbf8712d7ce85c3b63d33d9bbd4096c2e9d0ade" + sha256 cellar: :any_skip_relocation, ventura: "87ed8692edf0f3ed5e72ea186dd201f1fadb8c81ed0730878e9ed1154f4f4505" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0634654442c4307b6cbdf27f43736b8f407848294163718a68c7cdaf8eaed16" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6222a1aa0caf02ceba9a9786a816bb99f4291e39507b38d399c4fc5b1b2ed2ce" + 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..510a91d5cbc62 --- /dev/null +++ b/Formula/d/dub.rb @@ -0,0 +1,63 @@ +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_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..3ccace76a8bd5 --- /dev/null +++ b/Formula/d/duc.rb @@ -0,0 +1,55 @@ +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" + + bottle do + 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..75cde3e7205c5 --- /dev/null +++ b/Formula/d/duck.rb @@ -0,0 +1,188 @@ +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.1.4.43177.tar.gz" + sha256 "96d5447320dd094d1c37d70a8631e321f966dc927179c8b01638c33baf502795" + 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_sequoia: "8452b267b2b6dc5b7f897bdd936630b4c20c74c98514089c3e7d1ea5424ad4f3" + sha256 cellar: :any, arm64_sonoma: "4b22313f07172072e458c058e7f1038d7a4d58593bc8e0ac126ab62f5a51c304" + sha256 cellar: :any, arm64_ventura: "139577fa21c0828e6f5b8881455282a0771289300ea91310ee10bef1d3d9f356" + sha256 cellar: :any, sonoma: "f942a951a01b823e6247b178b0da78bdab9094113cc858ddff68c1986c91def9" + sha256 cellar: :any, ventura: "9ba954249bc79a8afc1a55cc475fbafd13485f405007dc964fb033526bba9ee3" + sha256 arm64_linux: "95f1978f010a3009a79b9b381e59531b536b43f836e3acb3a1cf7a785165d3c9" + sha256 x86_64_linux: "d55145d694a6e3094243cdc1e4df1826b49cf5e1834fafbc4693f3a5432ce0a5" + 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://ftp.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..0b38f78834283 --- /dev/null +++ b/Formula/d/duckdb.rb @@ -0,0 +1,60 @@ +class Duckdb < Formula + desc "Embeddable SQL OLAP Database Management System" + homepage "https://www.duckdb.org/" + url "https://github.com/duckdb/duckdb.git", + tag: "v1.2.2", + revision: "7c039464e452ddc3330e2691d3fa6d305521d09b" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "08f736ac15900c9419d502cd49a561b00654ca43c1fb537477dd902386b87905" + sha256 cellar: :any, arm64_sonoma: "b2944c5b262da44b7c220ee8e088623341845ae625140c80f381b891d5b0cdd9" + sha256 cellar: :any, arm64_ventura: "b757097a4f3e3987d271e0af6087d7ebd56ad78c3f197e08bf66f5477ed89552" + sha256 cellar: :any, sonoma: "c6a941d6bf421faaeaea61d0575aba122b98481a64d908855819481cc445abf1" + sha256 cellar: :any, ventura: "4ca934eb3dc7d50b575aab4905cdfe5325c7974087a6e25a800d3c95e0190e13" + sha256 cellar: :any_skip_relocation, arm64_linux: "b7eebc76d2395b6b97c28cfe6574a9b4892fce2b55bb2bcc4aa1b21060dd8d75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc7d56badae2ff05853832413a614da1185060fa501a74b25b35511fa404c86e" + end + + depends_on "cmake" => :build + 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" + + rm lib.glob("*.a") + end + + test do + path = testpath/"weather.sql" + path.write <<~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, shell_output("#{bin}/duckdb_cli < #{path}") + end +end diff --git a/Formula/d/ducker.rb b/Formula/d/ducker.rb new file mode 100644 index 0000000000000..1a8c09721fd72 --- /dev/null +++ b/Formula/d/ducker.rb @@ -0,0 +1,30 @@ +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.3.0.tar.gz" + sha256 "122026ec9d835ded2f623993918e25ef60f753a7e1210d73d3d1d3728836ecb8" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "879ee0904c0c8d6604d6c4df86566910b0934c304a3f47d1903e09af01a734c8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "de041d0416d502a00f6fc6431cf742f5c796683a709aa95cfe764f340f280494" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3f2d51a8877db9e944e862e8f19d6372f0bcee65cbb59ddc06a6b284d56c74f5" + sha256 cellar: :any_skip_relocation, sonoma: "a06955cdf22f6b67ea433a47be4b070f399bd9d272e074ae432b2f8184fee7b2" + sha256 cellar: :any_skip_relocation, ventura: "613bef7394717defcb7ddc43b29bfb72c4ace6a6c4e4298d0a6c3111127af2f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "d1191adb12ed76927e47accc1b7df8234603c7603ed65e4f0bafc7fd89199220" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23dbe74594546f8e990291b4ade931849aa513f5c775d44c04859243fb760927" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output("#{bin}/ducker --export-default-config 2>&1", 1) + assert_match "failed to create docker connection", output + + 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..7bd12ae239868 --- /dev/null +++ b/Formula/d/duckscript.rb @@ -0,0 +1,42 @@ +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_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..a1afc2bd317c2 --- /dev/null +++ b/Formula/d/dud.rb @@ -0,0 +1,30 @@ +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" + + bottle do + 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, 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..7860aed4b7ba1 --- /dev/null +++ b/Formula/d/duf.rb @@ -0,0 +1,37 @@ +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.8.1.tar.gz" + sha256 "ebc3880540b25186ace220c09af859f867251f4ecaef435525a141d98d71a27a" + license "MIT" + head "https://github.com/muesli/duf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "643ad7ae4f361bb24fd34c0f0e0ece98bd541ac3be3fd78af2bc7648346318e7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44fd140c8e0bcc0e3620a3c1f6adf957e6c4e0cacf53862b5f6ae471eaf037cd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0957499928211de66a44dded811cac647a0916746a8d43ea2c6847ab5a34e48d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ecd8c737c799f637d764a08d6e6ca989987b8076ac128af8d3d69a98dba68002" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ecd8c737c799f637d764a08d6e6ca989987b8076ac128af8d3d69a98dba68002" + sha256 cellar: :any_skip_relocation, sonoma: "83e15019a34b896d4492264ef1af541d12d28f7b5a0e4c31a475c9f5bc10aeaa" + sha256 cellar: :any_skip_relocation, ventura: "76b64a57517e3b695a23f8e5c6460c905b1f0c0f56e7d4d7272381433ac74d1f" + sha256 cellar: :any_skip_relocation, monterey: "3c21e47dd0b481fd42a8da9acd9abdd838d4ef03ccd9936904cb63ed357cab47" + sha256 cellar: :any_skip_relocation, big_sur: "3c21e47dd0b481fd42a8da9acd9abdd838d4ef03ccd9936904cb63ed357cab47" + sha256 cellar: :any_skip_relocation, catalina: "3c21e47dd0b481fd42a8da9acd9abdd838d4ef03ccd9936904cb63ed357cab47" + sha256 cellar: :any_skip_relocation, arm64_linux: "3af3789f8c739679f465333040dcff841e4eb3a21c3dbf7f4959533fbc18304d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4f4e300c50dd460d534e71edcdf436251a0e9f44457d35cdf02a46d61b446ec" + 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..90dba00a9fe89 --- /dev/null +++ b/Formula/d/duff.rb @@ -0,0 +1,48 @@ +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" + + bottle do + 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 cellar: :any_skip_relocation, mojave: "b2f5b9c19bb74d92c6b43482b77bf6d852355b83ddfda7ca4f6340a8075067f4" + sha256 cellar: :any_skip_relocation, high_sierra: "a30c57c79b3cef30518fccc5227e954dd9a2383e15458f85706733dcc1fe188a" + sha256 cellar: :any_skip_relocation, sierra: "2af1262a9b02e687c0efc14eed3d837920ab746fe8fca9b12b9361c4729f06ef" + sha256 cellar: :any_skip_relocation, el_capitan: "8a469e92a6303d80752ebc80ade382261d263b9c7226ca6652eddc8954e5ff2f" + 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..3f95a30481601 --- /dev/null +++ b/Formula/d/dufs.rb @@ -0,0 +1,42 @@ +class Dufs < Formula + desc "Static file server" + homepage "https://github.com/sigoden/dufs" + url "https://github.com/sigoden/dufs/archive/refs/tags/v0.43.0.tar.gz" + sha256 "4ba3b90486336efc4e592bcf15f14d4e3b6ac7b3b1bf8770815b8c43975d8b01" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9907f1078c8ae4f2a52d038eef8ce547ac8cb14d88aced1ae385b562322c717" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "362bbbbe8f036f15d480ef45c944ce97cbe86d9e9b739d2403e9984df7106e6f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9b5f5323b754d091c8c15573339a9e0ac241eb30a6e1225fe737e9e41cdede6f" + sha256 cellar: :any_skip_relocation, sonoma: "dade66c1045bd01e2725a36df9f95b71c2d4035a522bc258ecd9a10069dc0d45" + sha256 cellar: :any_skip_relocation, ventura: "ff3b995c743d161810b2d11544feb09771673ad5696ef712413f2ede68ac88c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "8efae26008554d3f4fb18d63eaf80b94fff7403fb7e0f148668163527ee265ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf38795658e47257cee21c8d5ee8116fb9241b2638c75d17d03adee7b31b6b72" + 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..fb38f133792e9 --- /dev/null +++ b/Formula/d/dug.rb @@ -0,0 +1,53 @@ +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_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..e9d870de3bc47 --- /dev/null +++ b/Formula/d/duktape.rb @@ -0,0 +1,54 @@ +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 + + bottle do + 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..574615b9f9f94 --- /dev/null +++ b/Formula/d/dum.rb @@ -0,0 +1,40 @@ +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_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..4f5df001dcdae --- /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 + + livecheck do + skip "No longer developed or maintained" + end + + bottle do + 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 + + depends_on "cmake" => :build + depends_on "argtable" + depends_on "sdl2" + + def install + args = std_cmake_args + %w[ + -DBUILD_ALLEGRO4=OFF + -DBUILD_EXAMPLES=ON + ] + + # 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/dump1090-mutability.rb b/Formula/d/dump1090-mutability.rb new file mode 100644 index 0000000000000..448b92e103a03 --- /dev/null +++ b/Formula/d/dump1090-mutability.rb @@ -0,0 +1,72 @@ +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 + + bottle do + 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..aba8871d18024 --- /dev/null +++ b/Formula/d/dumpling.rb @@ -0,0 +1,45 @@ +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.1.tar.gz" + sha256 "5266d6d4657c4b8fe805e63f885afd2ed189c34ed25174f9ff17b8a3392208f0" + 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_sequoia: "6715a2eff19789a8226fd793c666467fb293a850eb7ce16bfa521d3d5e71ad84" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e8801737a27e7d2ac8480b200e3cd93c93c85890e6c9262ed2da27feab78991d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f1dc9cb3092baa6e4724deddc2ca90a367d568733fc9bbec3551380f891c2334" + sha256 cellar: :any_skip_relocation, sonoma: "3b81af5b162a3d46429358564ff50cc35d9b4764d699c475dba3554059923c38" + sha256 cellar: :any_skip_relocation, ventura: "245acffe14d7a85d822ccd801c1da66d2dcfddf2f9bf28353d0ee5b8423816cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c49cf78d2f80ea4fae79fc6f4478feb9ba9957c818dbd92455f95ee7aee39db7" + 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..6317f93b0ae88 --- /dev/null +++ b/Formula/d/dunamai.rb @@ -0,0 +1,35 @@ +class Dunamai < Formula + include Language::Python::Virtualenv + + desc "Dynamic version generation" + homepage "https://github.com/mtkennerly/dunamai" + url "https://files.pythonhosted.org/packages/54/22/7f46b0146ef614cd6f80e4bcb188dabe33e90b4e0af028e16f597f5826ad/dunamai-1.24.1.tar.gz" + sha256 "3aa3348f77242da8628b23f11e89569343440f0f912bcef32a1fa891cf8e7215" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "269b3b6b072addd2141d0430e7d3fcc6c95c400821db6b8b079a8ec0c56f7bed" + end + + depends_on "python@3.13" + + 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..79b0a70b78416 --- /dev/null +++ b/Formula/d/dune.rb @@ -0,0 +1,36 @@ +class Dune < Formula + desc "Composable build system for OCaml" + homepage "https://dune.build/" + url "https://github.com/ocaml/dune/releases/download/3.18.2/dune-3.18.2.tbz" + sha256 "56be509ffc3c5ba652113d9e6b43edb04a691f1e1f6cbba17b9d243b1239a7af" + license "MIT" + head "https://github.com/ocaml/dune.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "446457a03711a40ae442fd4ff1488a3956f305b96e2f39e95394e0e505711de7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bcd7f0c2b09631ab856dc0ea3299c2837cae1d2954942fcc49da32f575c8f262" + sha256 cellar: :any_skip_relocation, arm64_ventura: "226692748d8a71a4196d3165902befa36fd9853b9bd5702dab0b20f3d43bbd84" + sha256 cellar: :any_skip_relocation, sonoma: "995f1913eaa6d741d777fa50ddb825a2c8ffe34b9e279a2a017c0617d7184ba2" + sha256 cellar: :any_skip_relocation, ventura: "d5805012973f8ba213113b1c2075b3928810ac6c1ff40c1b7b43eaf83b9c8fa3" + sha256 cellar: :any_skip_relocation, arm64_linux: "74a1443ac2017d098c67e5af9c32a0427c2003940ef7f90706d5facb29bbc07d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "960c495a19d18be30ca5c8c5b37b459cd655159f471b9b05f28714b3f4cda9bd" + 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..2fd55815393b3 --- /dev/null +++ b/Formula/d/dungeon.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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..71405c5a488dc --- /dev/null +++ b/Formula/d/duo_unix.rb @@ -0,0 +1,44 @@ +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.0.4.tar.gz" + sha256 "e77512725dedb23b3e8094ca3153fc3ffe51d3c32cd9dd56779480a93625de90" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_sequoia: "a5a83f2592c5b682bf178fab0175c3c6038005821e6c06c7df552df9239f2c39" + sha256 arm64_sonoma: "1a74a2f536ed3aa4f3f17bb99771de85ac79a9f8ad08ae48009c3c923ccd3ee2" + sha256 arm64_ventura: "8c35a0ef94b4b3b4b73e5e28d8b76bf9f5bb07498532ebfc3dd824c481872b79" + sha256 sonoma: "01ba2b5a22076ea198c6295fce94d20526507e1009b8669fd65d7425899c6cb4" + sha256 ventura: "3271ea0c7e12aa40fc6f5fce6040b99c9f4378f767c8583459ea566af706d72d" + sha256 arm64_linux: "b8cdc6fefb55010b75a8377da26135fcf27d7257fac119d2957ac95dece82b2e" + sha256 x86_64_linux: "3d3f20a51db6e5642f7c85185081d89d38566b977c4d7c14406e115f34c78183" + 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..a263da7649824 --- /dev/null +++ b/Formula/d/duplicity.rb @@ -0,0 +1,609 @@ +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/56/e7/6399a29be736641d893a5d24401729e89fe180c18ab001f803780fa9c93c/duplicity-3.0.4.0.tar.gz" + sha256 "a5a6454041b21db1b97033d37b297b301b9c0bf3faa459c89b5eafb5ff7e0103" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5543e32ce82fd7bbbf389565c00a7159f3cf303d5eb047da47f1679e942d903e" + sha256 cellar: :any, arm64_sonoma: "adcad19340f8e1d64f54aa06e1152887bb5282373759ebe5badef8f0888ac930" + sha256 cellar: :any, arm64_ventura: "79d395b5b738c27844033f2b1341af9c8ce312042b550f19b33a59328255cc20" + sha256 cellar: :any, sonoma: "7a3e34120d8ab314a1d1f57de15ad8653f4ac5b2d485cc69acc81a66daf26841" + sha256 cellar: :any, ventura: "df1c485d16b843b9994bc4bdc9c25a3e5a2c18ef0fca6c0abe8d6b619365f437" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa06657ba417eb8695b14d4d431bb22e368ccbe3c2883b05112f5816273b03a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfc471b4aa51144d2f326b8b680d981aad058b38963541e406171defba64e906" + end + + depends_on "gettext" => :build # for msgfmt + depends_on "pkgconf" => :build # for cryptography + depends_on "rust" => :build # for bcrypt + depends_on "certifi" + depends_on "gnupg" + depends_on "librsync" + depends_on "libsodium" # for pynacl + depends_on "libyaml" + depends_on "openssl@3" # for cryptography + depends_on "python@3.13" + + uses_from_macos "libffi" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + 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 "atom" do + url "https://files.pythonhosted.org/packages/26/6b/101fc3344cc4cae7738665b87173762e279fbcf08bd47466adcbeeaf64ad/atom-0.11.0.tar.gz" + sha256 "4ab93fc3cc7b6a078253b116e9f6235d2913eb9bb49adbc31a258e1017f2aee0" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/49/7c/fdf464bcc51d23881d110abd74b512a42b3d5d376a55a831b44c603ae17f/attrs-25.1.0.tar.gz" + sha256 "1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e" + end + + resource "azure-core" do + url "https://files.pythonhosted.org/packages/cc/ee/668328306a9e963a5ad9f152cd98c7adad86c822729fd1d2a01613ad1e67/azure_core-1.32.0.tar.gz" + sha256 "22b3c35d6b2dae14990f6c1be2912bf23ffe50b220e708a28ab1bb92b1c730e5" + 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 "b2sdk" do + url "https://files.pythonhosted.org/packages/d5/d1/a2935719662b392ef8e5cc2035c62c8c62d652ec3693ae78142028e0e44b/b2sdk-2.8.0.tar.gz" + sha256 "e5a75b20b37b45d17fdb7fae491c8bb5d8adac67d99383cda3506f6b10c96710" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/56/8c/dd696962612e4cd83c40a9e6b3db77bfe65a830f4b9af44098708584686c/bcrypt-4.2.1.tar.gz" + sha256 "6765386e3ab87f569b276988742039baab087b2cdb01e809d74e74503c2faafe" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/79/af/2082fde2cbd81f8b60fd46e3ac07a0f841abfdb9818b818d560e42b5c444/boto3-1.36.26.tar.gz" + sha256 "523b69457eee55ac15aa707c0e768b2a45ca1521f95b2442931090633ec72458" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/69/db/caa8778cf98ecbe0ad0efd7fbf673e2d036373386582e15dffff80bf16e1/botocore-1.36.26.tar.gz" + sha256 "4a63bcef7ecf6146fd3a61dc4f9b33b7473b49bdaf1770e9aaca6eee0c9eab62" + end + + resource "boxsdk" do + url "https://files.pythonhosted.org/packages/ef/14/d07883d4d5bce18c4b537147541dde15efc9fc5c4a6f61cafb546b59697e/boxsdk-3.13.0.tar.gz" + sha256 "c01350bdb0d24aa7927a64f6e9e8d7899be2ff43ea0e1410d4a1a273763146d2" + 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 "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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/5e/d0/ec8ac1de7accdcf18cfe468653ef00afd2f609faf67c423efbd02491051b/ecdsa-0.19.0.tar.gz" + sha256 "60eaad1199659900dd0af521ed462b793bbdf867432b3948e87416ae4caf6bf8" + end + + resource "fasteners" do + url "https://files.pythonhosted.org/packages/5f/d4/e834d929be54bfadb1f3e3b931c38e956aaa3b235a46a3c764c26c774902/fasteners-0.19.tar.gz" + sha256 "b4f37c3ac52d8a445af3a66bce57b33b5e90b97c696b7b984f530cf8f0ded09c" + 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/b8/b7/481c83223d7b4f02c7651713fceca648fa3336e1571b9804713f66bca2d8/google_api_core-2.24.1.tar.gz" + sha256 "f8b36f5456ab0dd99a1b693a40a31d1e7757beea380ad1b38faaf8941eae9d8a" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/0a/50/c8d2d3c4e65e081c4c07b15e4fe35671676c5ecdb3674a167229e83ce49a/google_api_python_client-2.161.0.tar.gz" + sha256 "324c0cce73e9ea0a0d2afd5937e01b7c2d6a4d7e2579cdb6c384f9699d6c9f37" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/c6/eb/d504ba1daf190af6b204a9d4714d457462b486043744901a6eeea711f913/google_auth-2.38.0.tar.gz" + sha256 "8285113607d3b80a3f1543b75962447ba8a09fe85783432a784fdeef6ac094c4" + 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/cc/0f/1772edb8d75ecf6280f1c7f51cbcebe274e8b17878b382f63738fd96cee5/google_auth_oauthlib-1.2.1.tar.gz" + sha256 "afd0cad092a2eaa53cd8e8298557d6de1034c6cb4a740500b5357b648af97263" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/54/d2/c08f0d9f94b45faca68e355771329cba2411c777c8713924dd1baee0e09c/googleapis_common_protos-1.68.0.tar.gz" + sha256 "95d38161f4f9af0d9423eed8fb7b64ffd2568c3464eb542ff02c5bfa1953ab3c" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/3d/ad/2371116b22d616c194aa25ec410c9c6c37f23599dcd590502b74db197584/httplib2-0.22.0.tar.gz" + sha256 "d7a10bc5ef5ab08322488bde8c726eeee5c8618723fdb399597ec58f3d82df81" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/5b/8c/4f2f0784d08a383b5de3d3b1d65a6f204cc5dc487621c91c550388d756af/humanize-4.12.1.tar.gz" + sha256 "1338ba97415c96556758a6e2f65977ed406dddf4620d4c6db9bbdfd07f0f1232" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + 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/59/f8/39aa1ac0c7fb9e7c8849f17e663eac208262689b7b9db02861b5e1093500/keystoneauth1-5.10.0.tar.gz" + sha256 "34b870dbbcf806cdb5aec98483b62820a6568d364eca7b1174ca6a8b5a9c77ed" + 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/ef/f6/c15ca8e5646e937c148e147244817672cf920b56ac0bf2cc1512ae674be8/lxml-5.3.1.tar.gz" + sha256 "106b7b5d2977b339f1e97efe2778e2ab20e99994cbb0ec5e55771ed0795920c8" + 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/66/ab/41d09a46985ead5839d8be987acda54b5bb93f713b3969cc0be4f81c455b/mock-5.1.0.tar.gz" + sha256 "5e96aad5ccda4718e0a229ed94b2024df75cc2d55575ba5762d31f5767b8767d" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/88/3b/7fa1fe835e2e93fd6d7b52b2f95ae810cf5ba133e1845f726f5a992d62c2/more-itertools-10.6.0.tar.gz" + sha256 "2cd7fad1009c31cc9fb6a035108509e6547547a7a738374f10bd49a09eb3ee3b" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + 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/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + 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/58/3f/09e93eb484b69d2a0d31361962fb667591a850630c8ce47bb177324910ec/os-service-types-1.7.0.tar.gz" + sha256 "31800299a82239363995b91f1ebf9106ac7758542a1e4ef6dc737a5932878c6c" + 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-config" do + url "https://files.pythonhosted.org/packages/3c/ac/aa17577d353a8c90b758a0edb1a94de7fffa24283c7f82cd2c485cb0a740/oslo_config-9.7.1.tar.gz" + sha256 "5558b34bcc2b52f2208e80fcad955a4f7b2c41bb245b6451d43a621ad1263bbd" + end + + resource "oslo-i18n" do + url "https://files.pythonhosted.org/packages/cc/94/8ab2746a3251e805be8f7fd5243df44fe6289269ce9f7105bdbe418be90d/oslo_i18n-6.5.1.tar.gz" + sha256 "ea856a70c5af7c76efb6590994231289deabe23be8477159d37901cef33b109d" + end + + resource "oslo-serialization" do + url "https://files.pythonhosted.org/packages/a7/44/e7f2aaef66d7a02c74ce425f2bad8c4aaf11f39bb02fea98eeb7452a0910/oslo_serialization-5.7.0.tar.gz" + sha256 "bdc4d3dd97b80639b3505e46d9aa439fc95028814177f30b91743e81366c3be7" + end + + resource "oslo-utils" do + url "https://files.pythonhosted.org/packages/f1/98/0c74172604f4ea9db117933fa9794e82a66438481a1e5a538584479c92f8/oslo_utils-8.2.0.tar.gz" + sha256 "dcf78d14b968fb7b14263c77278b2b930a7861d3caa887d3a58b2890f6659835" + 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/7d/15/ad6ce226e8138315f2451c2aeea985bf35ee910afb477bae7477dc3a8f3b/paramiko-3.5.1.tar.gz" + sha256 "b2c665bc45b2b215bd7d7f039901b14b067da00f3a11e6640995fd58f2664822" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/01/d2/510cc0d218e753ba62a1bc1434651db3cd797a9716a0a66cc714cb4f0935/pbr-6.1.1.tar.gz" + sha256 "93ea72ce6989eb2eed99d0f75721474f69ad88128afdef5ac377eb797c4bf76b" + 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/02/7b/18bb59d7c3a4ac9ac7d986cfe49dd3c2e5f5ae3e65ca3db8816764e0c1df/prettytable-3.14.0.tar.gz" + sha256 "b804b8d51db23959b96b329094debdbbdf10c8c3aa75958c5988cfd7f78501dd" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/26/79/a5c6cbb42268cfd3ddc652dc526889044a8798c688a03ff58e5e92b743c8/proto_plus-1.26.0.tar.gz" + sha256 "6e93d5f5ca267b54300880fff156b6a3386b3fa3f43b1da62e680fc0c586ef22" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/f7/d1/e0a911544ca9993e0f17ce6d3cc0932752356c1b0a834397f28e63479344/protobuf-5.29.3.tar.gz" + sha256 "5da0f41edaf117bde316404bad1a486cb4ededf8e4a54891296f648e8e076620" + 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/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 "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/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + 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/8b/1a/3544f4f299a47911c2ab3710f534e52fea62a633c96806995da5d25be4b2/pyparsing-3.2.1.tar.gz" + sha256 "61980854fd66de3a90028d679a954d5f2623e83144b5afe5ee86f43d762e5f0a" + 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-gettext" do + url "https://files.pythonhosted.org/packages/f6/c8/85df0d3956bebdbaff936df47a5705be9e0b42404589a07065a39c8324e5/python-gettext-5.0.tar.gz" + sha256 "869af1ea45e3dab6180557259824c2a62f1800e1286226af912431fe75c5084c" + 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-novaclient" do + url "https://files.pythonhosted.org/packages/96/b4/c2bddc1fd99375cfe7d09a03dcc99d23b4600b15dd4fc21388b32a8a10c0/python-novaclient-18.8.0.tar.gz" + sha256 "66d0d81dee69bdc6937cca3b878261f1834959c607891527a78927a01cea8800" + end + + resource "python-swiftclient" do + url "https://files.pythonhosted.org/packages/1e/aa/77250fe47fcc62d4e97c921e853eaa717d1bd538527c2f249b29cc903a21/python-swiftclient-4.6.0.tar.gz" + sha256 "d4d18540413893fc16ad87791d740f823f763435e8212e68eb53d60da2638233" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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 "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/62/45/2323b5928f86fd29f9afdcef4659f68fa73eaa5356912b774227f5cf46b5/s3transfer-0.11.2.tar.gz" + sha256 "3b39185cb72f5acc77db1a58b6e25b977f28d20496b6e58d6813d75f464d632f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/92/ec/089608b791d210aec4e7f97488e67ab0d33add3efccb83a056cbafe3a2a6/setuptools-75.8.0.tar.gz" + sha256 "c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6" + 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/28/3f/13cacea96900bbd31bb05c6b74135f85d15564fc583802be56976c940470/stevedore-5.4.1.tar.gz" + sha256 "3135b5ae50fe12816ef291baff420acb727fcd356106e3e9cbfa9e5985cd6f4b" + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/43/0f/fa4723f22942480be4ca9527bbde8d43f6c3f2fe8412f00e7f5f6746bc8b/tzdata-2025.1.tar.gz" + sha256 "24894909e88cdb28bd1636c6887801df64cb485bd593f2fd83ef29075a81d694" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/d2/5a/4742fdba39cd02a56226815abfa72fe0aa81c33bed16ed045647d6000eba/uritemplate-4.1.1.tar.gz" + sha256 "4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0" + 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/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + 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..7d7629dfc8d6f --- /dev/null +++ b/Formula/d/duply.rb @@ -0,0 +1,34 @@ +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.5.tgz" + sha256 "001af2b95e6324da317092ec4a33832ce1ee2caad21216376eecf2d5c421f805" + 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, arm64_sequoia: "6b438a4e468cf24e66a3607703073e05ddfe9f6b41c8db9ec438e75f08066d2d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6b438a4e468cf24e66a3607703073e05ddfe9f6b41c8db9ec438e75f08066d2d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b438a4e468cf24e66a3607703073e05ddfe9f6b41c8db9ec438e75f08066d2d" + sha256 cellar: :any_skip_relocation, sonoma: "e7b6dfcf4d2d1b4da0c0c3b1ed3675ecff11be1149201931b281f15369b5a5a1" + sha256 cellar: :any_skip_relocation, ventura: "e7b6dfcf4d2d1b4da0c0c3b1ed3675ecff11be1149201931b281f15369b5a5a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b438a4e468cf24e66a3607703073e05ddfe9f6b41c8db9ec438e75f08066d2d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b438a4e468cf24e66a3607703073e05ddfe9f6b41c8db9ec438e75f08066d2d" + 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..fc8c8e32646c4 --- /dev/null +++ b/Formula/d/dupseek.rb @@ -0,0 +1,31 @@ +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 + + 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..8e944c13875e5 --- /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" + + bottle do + rebuild 1 + 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 "rust" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + end + + 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..e2ec40ddb526c --- /dev/null +++ b/Formula/d/dust.rb @@ -0,0 +1,45 @@ +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.0.tar.gz" + sha256 "e879e6bf662e07cff2962b68529dd78c3bafb67541aaa76e8c9d25ecb505b850" + 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_sequoia: "ae87355d4a34dcd3faf75ad83c8948cafc58d2d62bd4d381e3b904d22658b8e1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f95942e56163d80b2dc8c7fc656bbf75484ace461415e1b33f1973f6e0710b78" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f4f211b8d9243525047070230690681b7d7aaf1546978768f2c59241288b1dd2" + sha256 cellar: :any_skip_relocation, sonoma: "4e592912e74415e6e9826530cfdd82aa6b112f18c261e1144b7de3eb4a024bad" + sha256 cellar: :any_skip_relocation, ventura: "6822e29006988602032e639ef5d846e2eb1826725b04b2f14a4df60a451aa278" + sha256 cellar: :any_skip_relocation, arm64_linux: "38e10954139f77edbb32bac6dfc8168fde6793e919838862b899f79940f470bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2292e06d094c5c363395d48527e95d9c978d9aff6711c1847727b37683c3a1f" + 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..d426975124c2d --- /dev/null +++ b/Formula/d/duti.rb @@ -0,0 +1,72 @@ +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 + + bottle do + rebuild 2 + 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..2a0d61442a4f4 --- /dev/null +++ b/Formula/d/dutree.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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..380efa2b9cba4 --- /dev/null +++ b/Formula/d/dvanalyzer.rb @@ -0,0 +1,64 @@ +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 + + bottle do + 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, mojave: "d688b087bb74bacc39b805a35b7db02c1291502003eb4904ef5ddbf3063b7c1e" + sha256 cellar: :any_skip_relocation, high_sierra: "59667b7174026e959f123ebbf8f8e30559dabb70814565f8bec8316c4b9c02b1" + sha256 cellar: :any_skip_relocation, sierra: "fb066074dde3b6e94ba30bf37bc85c2e17ef30a7e2b8f874b1a09f3aca2275f7" + sha256 cellar: :any_skip_relocation, el_capitan: "0e138c105a1f4604dbb4b7c911e83c660f2078cb24af6ba0ba12564a6e93d9c0" + 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..b7b6627ae8066 --- /dev/null +++ b/Formula/d/dvc.rb @@ -0,0 +1,870 @@ +class Dvc < Formula + include Language::Python::Virtualenv + + desc "Git for data science projects" + homepage "https://dvc.org/" + url "https://files.pythonhosted.org/packages/f3/9d/c7c143684a87119213dcbe1a7da36d5e5d701467a2da3a9d0ae1d428e3b9/dvc-3.59.2.tar.gz" + sha256 "3eecc058b5d43e4e3ff7dfa72970a5c7d26e7b19f48395946ab314ce479bc1ce" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c01237910bd753e3907b8a46e98e5469a2e0f09881904581678606cf1dfbf8d0" + sha256 cellar: :any, arm64_sonoma: "2cbf501a191637cf2d808634e1fffd969f5af2f51327f0893419ef91c701382e" + sha256 cellar: :any, arm64_ventura: "fc8e7cc8b3617e0c7081c3b018b63b6dd9a5aaf695175c44041cbe92e3559c92" + sha256 cellar: :any, sonoma: "e26eb7148d04d1903872e08d70a11174c66513146ddbacb377948699201a7195" + sha256 cellar: :any, ventura: "72d11017a107ad1898bfee3e711dda45e35d1ac71288952fa77e7df8b8f963b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab56d99dd8fd9fc9e267a48fee69a6efa87cf6bcd8929c561cc986745f1cc531" + sha256 cellar: :any_skip_relocation, x86_64_linux: "94694d476ef7dfe9030abfbd0f2d692a3fa68f2d8b28db219992c175eaf8c788" + 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" + depends_on "cryptography" + depends_on "libyaml" + depends_on "numpy" + depends_on "pygit2" + depends_on "python@3.13" + + on_linux do + depends_on "patchelf" => :build # for pyarrow + end + + resource "adlfs" do + url "https://files.pythonhosted.org/packages/76/82/e30891af574fb358449fb9436aac53569814452cb88b0cba4f488171b8dc/adlfs-2024.12.0.tar.gz" + sha256 "04582bf7461a57365766d01a295a0a88b2b8c42c4fea06e2d673f62675cac5c6" + end + + resource "aiobotocore" do + url "https://files.pythonhosted.org/packages/9c/4c/113c4f5611103bba8e5252805fbee7944f5d9541addba9a96b091c0c4308/aiobotocore-2.22.0.tar.gz" + sha256 "11091477266b75c2b5d28421c1f2bc9a87d175d0b8619cb830805e7a113a170b" + 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/63/e7/fa1a8c00e2c54b05dc8cb5d1439f627f7c267874e3f7bb047146116020f9/aiohttp-3.11.18.tar.gz" + sha256 "ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a" + 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/99/81/63bc832d0ddf2ac5b61177343338ffb21d9ebd49964279a1bd83861b2844/aiooss2-0.2.10.tar.gz" + sha256 "65698a287386464e4a08fb862be85668df4d1e1acfe0620404617d88869630eb" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + 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/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + resource "asyncssh" do + url "https://files.pythonhosted.org/packages/e8/d6/823ed5a227f7da70b33681e49eec4a36fae31b9296b27a8d6aead2bd3f77/asyncssh-2.21.0.tar.gz" + sha256 "450fe13bb8d86a8f4e7d7b5fafce7791181ca3e7c92e15bbc45dfb25866e48b3" + end + + resource "atpublic" do + url "https://files.pythonhosted.org/packages/fa/af/d5113daf3947044e43d74305cbd31502915c784e158c0c098db03ceeff17/atpublic-5.1.tar.gz" + sha256 "abc1f4b3dbdd841cc3539e4b5e4f3ad41d658359de704e30cb36da4d4e9d3022" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "azure-core" do + url "https://files.pythonhosted.org/packages/c9/29/ff7a519a315e41c85bab92a7478c6acd1cf0b14353139a08caee4c691f77/azure_core-1.34.0.tar.gz" + sha256 "bdb544989f246a0ad1c85d72eeb45f2f835afdcbc5b45e43f0dbde7461c81ece" + 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/b5/a1/f1a683672e7a88ea0e3119f57b6c7843ed52650fdcac8bfa66ed84e86e40/azure_identity-1.21.0.tar.gz" + sha256 "ea22ce6e6b0f429bc1b8d9212d5b9f9877bd4c82f1724bfa910760612c07a9a6" + end + + resource "azure-storage-blob" do + url "https://files.pythonhosted.org/packages/8b/f3/f764536c25cc3829d36857167f03933ce9aee2262293179075439f3cd3ad/azure_storage_blob-12.25.1.tar.gz" + sha256 "4f294ddc9bc47909ac66b8934bd26b50d2000278b10ad82cc109764fdc6e0e3b" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/bb/5d/6d7433e0f3cd46ce0b43cd65e1db465ea024dbb8216fb2404e919c2ad77b/bcrypt-4.3.0.tar.gz" + sha256 "3a3fd2204178b6d2adcf09cb4f6426ffef54762577a7c9b54c159008cb288c18" + end + + resource "billiard" do + url "https://files.pythonhosted.org/packages/7c/58/1546c970afcd2a2428b1bfafecf2371d8951cc34b46701bea73f4280989e/billiard-4.2.1.tar.gz" + sha256 "12b641b0c539073fc8d3f5b8b7be998956665c4233c7c1fcd66a7e677c4fb36f" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/7e/3f/135ec0771e6d0e1af2ad7023a15df6677d96112072838d948c9b5075efe1/boto3-1.37.3.tar.gz" + sha256 "21f3ce0ef111297e63a6eb998a25197b8c10982970c320d4c6e8db08be2157be" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/74/fb/b243ab806d2e1e6b8a475b731cc59a1f1e4709eded4884b988a27bbc996b/botocore-1.37.3.tar.gz" + sha256 "fe8403eb55a88faf9b0f9da6615e5bee7be056d75e17af66c3c8f0a3b0648da4" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/6c/81/3747dad6b14fa2cf53fcf10548cf5aea6913e96fab41a3c198676f8948a5/cachetools-5.5.2.tar.gz" + sha256 "1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4" + end + + resource "celery" do + url "https://files.pythonhosted.org/packages/bf/03/5d9c6c449248958f1a5870e633a29d7419ff3724c452a98ffd22688a1a6a/celery-5.5.2.tar.gz" + sha256 "4d6930f354f9d29295425d7a37261245c74a32807c45d764bedc286afd0e724e" + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/5f/1d/45434f64ed749540af821fd7e42b8e4d23ac04b1eda7c26613288d6cd8a8/click-plugins-1.1.1.tar.gz" + sha256 "46ab999744a9d831159c3411bb0c79346d94a444df9a3a3742e9ed63645f264b" + 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/d4/8b/0f2de00c0c0d5881dc39be147ec2918725fb3628deeeb1f27d1c6cf6d9f4/dulwich-0.22.8.tar.gz" + sha256 "701547310415de300269331abe29cb5717aa1ea377af826bf513d0adfb1c209b" + 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/da/64/459483623d867d2161e3aacecc5f9f172e8a57438cfcfc029e00be5fb594/dvc_data-3.16.10.tar.gz" + sha256 "abca33f2169eabc70d1966e2ef3cd290127ebdf141fb0e84db3d37fef49205c6" + 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/71/58/7714c93a472f04613fee5714d847d1af7b1fabcca93784046cc07eb7b8d8/dvc-gs-3.0.1.tar.gz" + sha256 "e5430a297fb8182366f7c4bc910b1ab104d8e5cc22f611a19bce05165dffecd4" + 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/f0/18/22e1b3440ad2b1b6de864b10ef25e6e0069342524d2b592de40f0cb17e13/dvc-objects-5.1.0.tar.gz" + sha256 "22e919620f9ecf428a0d295efca8073d1c0e87206dd8e1f52b1d9520fa25b814" + 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/fa/cf/14e5f014f77381a58617c1ee3ae98f8fc15768e6a89ff0efac3ff7fc0016/dvc_s3-3.2.0.tar.gz" + sha256 "1d012ac1dce47659986f918123b48931cf9b3429ab0b4a22fd4b02448185ceb6" + end + + resource "dvc-ssh" do + url "https://files.pythonhosted.org/packages/2d/84/7cb9ee1eb82bd384f36eabc3afd18a659d9a669c16e3c78d947e6e0be7c1/dvc_ssh-4.2.1.tar.gz" + sha256 "95deae680200fbc9472bf4e32adae3b6618a8f9f38ed204c618bca28df8c912e" + end + + resource "dvc-studio-client" do + url "https://files.pythonhosted.org/packages/87/08/13cf5bb8bf0855d47325467a5948848bcea51780e2212349034f5e4701e6/dvc_studio_client-0.21.0.tar.gz" + sha256 "db212ff5cf73dce886d0713a5d2bf4bc0bbfb499f3ca8548705ca98aab5addd1" + 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/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + 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/a9/fa/885c58f9716063e2ac099f773d0420f20bb834b19538066a2e0d5b848ba4/flufl_lock-8.1.0.tar.gz" + sha256 "d88302005692a63d98b60080158faf089be5ecae6969f706409da8276fdce7cb" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/ee/f4/d744cba2da59b5c1d88823cf9e8a6c74e4659e2b27604ed973be2a0bf5ab/frozenlist-1.6.0.tar.gz" + sha256 "b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68" + end + + resource "fsspec" do + url "https://files.pythonhosted.org/packages/45/d8/8425e6ba5fcec61a1d16e41b1b71d2bf9344f1fe48012c2b48b9620feae5/fsspec-2025.3.2.tar.gz" + sha256 "e52c77ef398680bbd6a98c0e628fbc469491282981209907bbc8aea76a04fdc6" + 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/28/66/b606240ebe8f6e85db225e1ab6f9c73f0f3929d2af9dee59807d5d5088cb/gcsfs-2025.3.2.tar.gz" + sha256 "fe300179492e63e309fecb11e4de7c15a51172eefa2b846d4b3659960216bba8" + 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 "google-api-core" do + url "https://files.pythonhosted.org/packages/6a/a2/7950df7fbb8ab1b7afb286ab374df2f5b3ea107b5d18224eac4e81bd2a69/google_api_core-2.25.0rc0.tar.gz" + sha256 "38d9d6a67673473457adbbef1ccca27d9ebb755e377c05e8a9b88f89eecab9ad" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/4f/e6/787c24738fc7c99de9289abe60bd64591800ae1cdf60db7b87e0e6ef9cdd/google_api_python_client-2.169.0.tar.gz" + sha256 "0585bb97bd5f5bf3ed8d4bf624593e4c5a14d06c811d1952b07a1f94b4d12c51" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/8b/03/6b824ef961fb2ab74f3b54adf2a357f742d88e0667a3471621cb9477da96/google_auth-2.40.0.tar.gz" + sha256 "c277cf39f7c192d8540eb6331c08b5a0796e8041af8343ae73dd6b269732ca6c" + 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/d6/b8/2b53838d2acd6ec6168fd284a990c76695e84c65deee79c9f3a4276f6b4f/google_cloud_core-2.4.3.tar.gz" + sha256 "1fab62d7102844b278fe6dead3af32408b1df3eb06f5c7e8634cbd40edc4da53" + end + + resource "google-cloud-storage" do + url "https://files.pythonhosted.org/packages/f3/08/52143124415a889bbab60a8ecede1e31ea0e8d992ca078317886f26dc3be/google_cloud_storage-3.1.0.tar.gz" + sha256 "944273179897c7c8a07ee15f2e6466a02da0c7c4b9ecceac2a26017cb2972049" + 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/39/24/33db22342cf4a2ea27c9955e6713140fedd51e8b141b5ce5260897020f1a/googleapis_common_protos-1.70.0.tar.gz" + sha256 "0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257" + 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/d6/ea/ea6267da29ac54a53944106e46337e3e8e43eaa24bb6b7cf5da18043758c/gto-1.7.2.tar.gz" + sha256 "98994f43d02ef6d4e77c4087b1c0c70a038e4a753a5583c23116246d33b89742" + 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/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 "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/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 "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/bb/eb/1f26c9112a4ee84cfa4a0a81bdf844207496a476fa026cfc98545bb702db/knack-0.12.0.tar.gz" + sha256 "71f2a6b42ae9a302e43243320fa05edb09b19339fcf1f331f5b6d07bf97f5291" + end + + resource "kombu" do + url "https://files.pythonhosted.org/packages/60/0a/128b65651ed8120460fc5af754241ad595eac74993115ec0de4f2d7bc459/kombu-5.5.3.tar.gz" + sha256 "021a0e11fcfcd9b0260ef1fb64088c0e92beb976eb59c1dfca7ddd4ad4562ea2" + 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 "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/3f/90/81dcc50f0be11a8c4dcbae1a9f761a26e5f905231330a7cacc9f04ec4c61/msal-1.32.3.tar.gz" + sha256 "5eea038689c78a5a70ca8ecbe1245458b55a857bd096efb6989c69ba15985d35" + 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/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz" + sha256 "307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1" + 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/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + 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/81/0b/fea456a3ffe74e70ba30e01ec183a9b26bec4d497f61dcfce1b601059c60/orjson-3.10.18.tar.gz" + sha256 "e8da3947d92123eda795b68228cafe2724815621fe35e8e320a9e9593a4bcd53" + end + + resource "oss2" do + url "https://files.pythonhosted.org/packages/4a/e7/08b90651a435acde68c537eebff970011422f61c465f6d1c88c4b3af6774/oss2-2.18.1.tar.gz" + sha256 "5a901f6c0f3ac42f792e16a1e1c04e60f34e6cc9eb2bc4c0c3ce6e7bda2da4cc" + end + + resource "ossfs" do + url "https://files.pythonhosted.org/packages/d2/42/4cdce6e1ff4ce53c33cdc0dc1d212207181af3037d0a3a789367da42a266/ossfs-2023.12.0.tar.gz" + sha256 "f99eb2d74717d22551b1f32ec9434587962627a816a64536dc47d68470536110" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + 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/c8/8c/cf2ac658216eebe49eaedf1e06bc06cbf6a143469236294a1171a51357c3/protobuf-6.30.2.tar.gz" + sha256 "35c859ae076d8c56054c25b59e5e59638d86545ed6e2b6efac6be0b6ea3ba048" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + resource "pyarrow" do + url "https://files.pythonhosted.org/packages/7f/09/a9046344212690f0632b9c709f9bf18506522feb333c894d0de81d62341a/pyarrow-19.0.1.tar.gz" + sha256 "3bf266b485df66a400f282ac0b6d1b500b9d2ae73314a153dbe97d6d5cc8a99e" + 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/44/e6/099310419df5ada522ff34ffc2f1a48a11b37fc6a76f51a6854c182dbd3e/pycryptodome-3.22.0.tar.gz" + sha256 "fd7ab568b3ad7b77c908d7c3f7e167ec5a8f035c64ff74f10d47a4edd043d723" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "pydot" do + url "https://files.pythonhosted.org/packages/d1/c3/6034ed1ebf2e3ba95a0e35fa7c43104e40444c0ed2b5325702c63e824dbf/pydot-4.0.0.tar.gz" + sha256 "12f16493337cade2f7631b87c8ccd299ba2e251f3ee5d0732a058df2887afe97" + 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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/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 "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/ea/46/f44d8be06b85bc7c4d8c95d658be2b68f27711f279bf9dd0612a5e4794f5/ruamel.yaml-0.18.10.tar.gz" + sha256 "20c86ab29ac2153f80a428e1254a8adf686d3383df04490514ca3b79a362db58" + end + + resource "s3fs" do + url "https://files.pythonhosted.org/packages/72/df/559dc6d796c38f1b8a09a5f6dcf62a467a84f3c87a837ee07c59f60a26ad/s3fs-2025.3.2.tar.gz" + sha256 "6798f896ec76dd3bfd8beb89f0bb7c5263cb2760e038bae0978505cd172a307c" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/39/24/1390172471d569e281fcfd29b92f2f73774e95972c965d14b6c802ff2352/s3transfer-0.11.3.tar.gz" + sha256 "edae4977e3a122445660c7c114bba949f9d191bae3b34a096f18a1c8c354527a" + end + + resource "scmrepo" do + url "https://files.pythonhosted.org/packages/25/c9/a05b8ce93ce8470e44f430f664396396b6b183cbe899407e8cd286a29165/scmrepo-3.3.11.tar.gz" + sha256 "eb25424a7cc1290e3e0aeaa8a39bb8347b9abc5fab33356e8a70db530d7d06b6" + 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/70/dc/3976b322de9d2e87ed0007cf04cc7553969b6c7b3f48a565d0333748fbcd/setuptools-80.3.1.tar.gz" + sha256 "31e2c58dbb67c99c289f51c16d899afedae292b978f8051efaf6262d8212f927" + 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/5a/e6/74b6119fdaf81cadc4b404f6abf681836209a9d22f7f0c1b08760460e5c5/sshfs-2025.2.0.tar.gz" + sha256 "1a60b872062078cfb9d954d9c728f3e72e5bc81aa913dc0f91e687305a005fe1" + 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/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + 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/98/1a/5f36851f439884bcfe8539f6a20ff7516e7b60f319bbaf69a90dc35cc2eb/typer-0.15.3.tar.gz" + sha256 "818873625d0569653438316567861899f7e9972f2e6e0c16dab608345ced713c" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + 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/d2/5a/4742fdba39cd02a56226815abfa72fe0aa81c33bed16ed045647d6000eba/uritemplate-4.1.1.tar.gz" + sha256 "4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/62/51/c0edba5219027f6eab262e139f73e2417b0f4efffa23bf562f6e18f76ca5/yarl-1.20.0.tar.gz" + sha256 "686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307" + end + + resource "zc-lockfile" do + url "https://files.pythonhosted.org/packages/5b/83/a5432aa08312fc834ea594473385c005525e6a80d768a2ad246e78877afd/zc.lockfile-3.0.post1.tar.gz" + sha256 "adb2ee6d9e6a2333c91178dcb2c9b96a5744c78edb7712dc784a7d75648e81ec" + end + + def install + if DevelopmentTools.clang_build_version >= 1500 + # Work around an Xcode 15 linker issue which causes linkage against LLVM's + # libunwind due to it being present in a library search path. + ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib + end + + # 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..18693ff1cb90f --- /dev/null +++ b/Formula/d/dvd+rw-tools.rb @@ -0,0 +1,86 @@ +class DvdxrwTools < Formula + desc "DVD+-RW/R tools" + homepage "https://fy.chalmers.se/~appro/linux/DVD+RW/" + url "https://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-7.1.tar.gz" + sha256 "f8d60f822e914128bcbc5f64fbe3ed131cbff9045dca7e12c5b77b26edde72ca" + license "GPL-2.0-only" + + livecheck do + url "https://fy.chalmers.se/~appro/linux/DVD+RW/tools/" + regex(/href=.*?dvd\+rw-tools[._-]v?(\d+(?:[.-]\d+)+)\.t/i) + end + + bottle do + 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, mojave: "7d79f2f23e9fb680435005d4491e02d3beb4cbbf2d8abc338b4efe33b7d17988" + sha256 cellar: :any_skip_relocation, high_sierra: "acf8d9a92ff74fdbfc409dc42980be607c4dd263aca89444713972a055d5967a" + sha256 cellar: :any_skip_relocation, sierra: "932e3879247dd1587f35d99c7132c302ddeaf3b5efad9effb05f5b086a55541a" + sha256 cellar: :any_skip_relocation, el_capitan: "01bae78a5187a47ea770a9cb9c0cabdbafb60485e333a563240a6ea74d6718b0" + 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 + 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..7b2ce3893bd1b --- /dev/null +++ b/Formula/d/dvd-vr.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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, mojave: "1f815f7699e3bb885c56c3842e9d43ef58d3b338a1405f2f33b26a1b975a1061" + sha256 cellar: :any_skip_relocation, high_sierra: "e96bdfc31d58a3d94f739937c0efbbdd0b2a60a625aa8c33033e71adf8ee040c" + sha256 cellar: :any_skip_relocation, sierra: "7b38c83a9bb9daded6a6f28be018076cdcdbbfb0d47102ecbdd06128bebb33ee" + sha256 cellar: :any_skip_relocation, el_capitan: "a048c7985df06e3a1d4c7145064b87bd51945f15da2494c03e7af542f07ca8b4" + 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..b2f8da53531f8 --- /dev/null +++ b/Formula/d/dvdauthor.rb @@ -0,0 +1,50 @@ +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 + + bottle do + rebuild 1 + 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..11ca60dc70038 --- /dev/null +++ b/Formula/d/dvdbackup.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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 cellar: :any, mojave: "e28050e6f6611d8f8f573f52bdb17bb349a5f347b0a6499e9eaa8bfdde9a5f71" + 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/formula-patches/7d734fd4d41a331b403522249d96587a62fd85d5/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..9d34dd9097ec6 --- /dev/null +++ b/Formula/d/dvdrtools.rb @@ -0,0 +1,66 @@ +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 + + bottle do + 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, mojave: "77bee36a67611f862c4fd8fbff7b1bbc7e307f5f618508664f02193df7347865" + sha256 cellar: :any_skip_relocation, high_sierra: "f697f22349d9ed05ad580d06b5dc38c4b626187d50cfc364af4bb5634f16b152" + sha256 cellar: :any_skip_relocation, sierra: "afa198a1854643ac7657ad1c93bfc5f9b05760e3b3375dd3ec43ad0b51e4ea7e" + sha256 cellar: :any_skip_relocation, el_capitan: "8d29698226d26f42559f4913a13920632b85cafc389122697fa2c5c4d0cd2d8b" + 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/formula-patches/8a41dd4/dvdrtools/patch-cdda2wav-cdda2wav.c" + sha256 "f792a26af38f63ee1220455da8dba2afc31296136a97c11476d8e3abe94a4a94" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/8a41dd4/dvdrtools/patch-cdrecord-cdrecord.c" + sha256 "c7f182ce154785e19235f30d22d3cf56e60f6c9c8cc953a9d16b58205e29a039" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/8a41dd4/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/dvm.rb b/Formula/d/dvm.rb new file mode 100644 index 0000000000000..ddc7112222c22 --- /dev/null +++ b/Formula/d/dvm.rb @@ -0,0 +1,46 @@ +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" + + bottle do + rebuild 1 + 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..7e71b69101bbc --- /dev/null +++ b/Formula/d/dvorak7min.rb @@ -0,0 +1,49 @@ +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, mojave: "2657090fcb79b647e9c805780eb2a90d6a875aee6aebeb2dc0eebbdd3ace3ed1" + sha256 cellar: :any_skip_relocation, high_sierra: "0cfad9ea53f984ebc81c87fe2bd7fd8f3bad6c8c0032085de36eb499b041b5b0" + sha256 cellar: :any_skip_relocation, sierra: "052c259da37d2e9576fdf1809ce526dd54cedd362bbe747f02fa088e6568983b" + sha256 cellar: :any_skip_relocation, el_capitan: "d4bf1a053028f0712193e33911c2af3fb4f0a71b37480969b5c03b798d4930ae" + 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..10f3b6d2f50ff --- /dev/null +++ b/Formula/d/dvr-scan.rb @@ -0,0 +1,89 @@ +class DvrScan < Formula + include Language::Python::Virtualenv + + desc "Extract scenes with motion from videos" + homepage "https://www.dvr-scan.com/" + url "https://github.com/Breakthrough/DVR-Scan/archive/refs/tags/v1.7.0.1-release.tar.gz" + sha256 "c0bdb1d1963a1df38d30ba6ded04bc37013b143c551360a177fdde4fe33e7fc9" + license "BSD-2-Clause" + + # All release versions end with `-release` suffix + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)-release$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "986102fcac41135a62884a15d909914ae48e9f2a5932164386800763dad551a1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b3b52d9b93bfd31ab99d6cc94d335c4b06449aeb32dc2e592b629d76e658979" + sha256 cellar: :any_skip_relocation, sonoma: "a8225c786db4e4b76944d871a97872d1f69cddc5dd81d6fb8e3458697f227a44" + sha256 cellar: :any_skip_relocation, ventura: "f9455478612e42c382db2216da511f8b680eb5304c4cfddd87ccb7698aec9949" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aeece253f4474e20ffa1b16386bf88b76b7cd0aa2862dfa83e1f88e4768a8b53" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "ffmpeg" + depends_on "numpy" + depends_on "opencv" + depends_on "python@3.13" + + on_macos do + resource "pyobjc-core" do + url "https://files.pythonhosted.org/packages/5d/07/2b3d63c0349fe4cf34d787a52a22faa156225808db2d1531fe58fabd779d/pyobjc_core-10.3.2.tar.gz" + sha256 "dbf1475d864ce594288ce03e94e3a98dc7f0e4639971eb1e312bdf6661c21e0e" + end + + resource "pyobjc-framework-cocoa" do + url "https://files.pythonhosted.org/packages/39/41/4f09a5e9a6769b4dafb293ea597ed693cc0def0e07867ad0a42664f530b6/pyobjc_framework_cocoa-10.3.2.tar.gz" + sha256 "673968e5435845bef969bfe374f31a1a6dc660c98608d2b84d5cae6eafa5c39d" + end + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "cython" do + url "https://files.pythonhosted.org/packages/5a/25/886e197c97a4b8e254173002cdc141441e878ff29aaa7d9ba560cd6e4866/cython-3.0.12.tar.gz" + sha256 "b988bb297ce76c671e28c97d017b95411010f7c77fa6623dd0bb47eed1aee1bc" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "scenedetect" do + url "https://files.pythonhosted.org/packages/59/36/1e29ac958e2d2b5e4365fb7de03f94a98b9949c46267e682bcfe22460812/scenedetect-0.6.6.tar.gz" + sha256 "4b50946abca886bd623e7a304e30da197f0e7e69cd65d80115d551538261c35b" + 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? + + virtualenv_install_with_resources + 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..5e41f4e049010 --- /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 + + bottle do + 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, mojave: "c10f3ccbb2dc59b7c76c9dd46a71f1e41d7c7faa8fab5f4326599b3a5467c770" + sha256 cellar: :any, high_sierra: "92db022169f222a0ce002e6c20e6256cc5636f61c1e6fa1c44b56481c5a2422d" + sha256 cellar: :any, sierra: "dbc5a7043b5888284ddab1d97b57406fc6c24d71c205a54482e3ef0e442e20fd" + 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..3a1a4aa910ba6 --- /dev/null +++ b/Formula/d/dwarfs.rb @@ -0,0 +1,139 @@ +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.12.4/dwarfs-0.12.4.tar.xz" + sha256 "352d13a3c7d9416e0a7d0d959306a25908b58d1ff47fb97e30a7c8490fcff259" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(/^(?:release[._-])?v?(\d+(?:\.\d+)+)$/i) + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "3ff65a78a4f52826d19180d5d197218cb7e3fbe8d4b9ad6c16d85c8fb734e6a0" + sha256 arm64_sonoma: "0da0d156eaa75c1655cc3ea0a912028f92cf1b4b90a2c0b88b0966e4fa1319f7" + sha256 arm64_ventura: "5099e0966d6a3b0a764bbb820d3e40172cfce51adb8b8e4c5314c8b5988da1e0" + sha256 cellar: :any, sonoma: "a1e74d5a71e125918909c2f220b48df2e430de3ceb9fb5057e8f51c619b02677" + sha256 cellar: :any, ventura: "a811e4738557e2962e0f8182a54228ab7a4b4209c5595cf4955dbc0486d5d9c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "de340355a70a1bd71d61ece366abad774b8bc4fbf9a0d1654115b1ff7852f22a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97a7815ccb7ee637d0a712b3cee46753b82e8c4f66864a860b8900052c535d72" + 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 + + # Apply folly fix for LLVM 20 from https://github.com/facebook/folly/pull/2404 + patch do + url "https://github.com/facebook/folly/commit/1215a574e29ea94653dd8c48f72e25b5503ced18.patch?full_index=1" + sha256 "14a584c4f0a166d065d45eb691c23306289a5287960806261b605946166de590" + directory "folly" + end + + 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 + 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 diff --git a/Formula/d/dwarfutils.rb b/Formula/d/dwarfutils.rb new file mode 100644 index 0000000000000..9ee4bb97f95c3 --- /dev/null +++ b/Formula/d/dwarfutils.rb @@ -0,0 +1,71 @@ +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-0.12.0.tar.xz" + sha256 "444dc1c5176f04d3ebc50341552a8b2ea6c334f8f1868a023a740ace0e6eae9f" + 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_sequoia: "ec32537c7a568c917f5272456848661e30ce00ac9cf5fd4b68dc70d7316813c5" + sha256 arm64_sonoma: "c6be302ac2ebf8ef550362c794b703564f4ce039830f7c644f83429f03bb9229" + sha256 arm64_ventura: "e96358f887b938d3f7253721e876c8ffa8941b1e32a31a8380d4df9cb4898e77" + sha256 sonoma: "c42720cbd7837861122a08219b26c3c8cce385f694f8e2282d7a438c549c8b83" + sha256 ventura: "467ea3e56e9a9f808469ec730d8894d59ec23f4b42e3a79cd48111c222fba34a" + sha256 arm64_linux: "0b7aaef94c972dab147ee440a9655daca11d2f7b8c6c684e40827769800f0312" + sha256 x86_64_linux: "5f9220def8c174b3b3635804e5694b525386f39f92acc189e4a45bc7316f761e" + 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-0", "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..a541aac1dc599 --- /dev/null +++ b/Formula/d/dwatch.rb @@ -0,0 +1,49 @@ +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 + + bottle do + rebuild 2 + 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 mojave: "69b3cb7cc60c1635c3134a0cd5e9dd884b3e28f52955e62da9beb0605e43cff5" + sha256 high_sierra: "fdf97f373c4bb18a3025d0f4acd9e16c826eca19cb60c9abd59d59bee8741c0f" + 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..743c395b9409a --- /dev/null +++ b/Formula/d/dwdiff.rb @@ -0,0 +1,53 @@ +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 + + bottle do + 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..d4b8dbb27d098 --- /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.5.tar.gz" + sha256 "21d79ebfa9f2fb93141836c2666cb81f4784c69d64e7f1b2352f9b970ba09729" + 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 + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "1aea6c7c3cc131887b7d471659137384ac7e415dd9fbe7d15e3d8ae9c6dbe180" + sha256 cellar: :any, arm64_sonoma: "922787e07a3be0599f223d64f413f62ca8b7bb2a6d6fefec4565a7357c359564" + sha256 cellar: :any, arm64_ventura: "b7971ddb4bf6f52bfc8a844ff6ea0681a0c9d6645cea923b0851e94771068785" + sha256 cellar: :any, sonoma: "ddc7a7f3fbae58d7c4e8924ef3f53cff4906ac384f91a039bca5bdf097eb60d8" + sha256 cellar: :any, ventura: "bb5ad3a4079c76769e85ebda55ad12a1260e946be09c5b611bdbfdff3146fdf1" + sha256 cellar: :any_skip_relocation, arm64_linux: "a957940e9c5bbaf9b6ff415122794094c5384d24265b13772d1886dc46be1144" + sha256 cellar: :any_skip_relocation, x86_64_linux: "107dc6ce40aaa02fca9690bd3a7ac7804664cbfc49776b76354beccc8ba6da10" + 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..14a3bea4c3587 --- /dev/null +++ b/Formula/d/dxflib.rb @@ -0,0 +1,83 @@ +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 + + bottle do + 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, x86_64_linux: "e71a7e5920a5c7d7029edcf188bebf88aea640021d459ba1e2c0fa7266970c3a" + end + + depends_on "qt" => :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..d297006859548 --- /dev/null +++ b/Formula/d/dxpy.rb @@ -0,0 +1,80 @@ +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/47/32/d7f0c7b81b65024f44d2d595336122bf4a0ae8420d74f5b3a005931a6640/dxpy-0.396.0.tar.gz" + sha256 "b17c5cf26f1316d11c09f456e00559ebd2be022cfca35117cb96b9922eba8beb" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0e95c9b78028043ad88a811ff355fb887f82d41197d9ee350f88cece5bee9694" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2b73c1f8a7c89ab16caa88ca907824a8af21e4e03aebfb2fec62e84ae29064ae" + sha256 cellar: :any_skip_relocation, arm64_ventura: "318b5eb49bec15e811c8bb8be95c2379be2637fd08d007c21a60ffeaa5211094" + sha256 cellar: :any_skip_relocation, sonoma: "edda938ca56f17c4b53acda9751293b51ac764d1c98014f70fa4b6e0ecf77bd1" + sha256 cellar: :any_skip_relocation, ventura: "a2b1318edd12ccee92013d3df5fa1b001d1f71cd849b79564cbd83a94d37c54d" + sha256 cellar: :any_skip_relocation, arm64_linux: "f801493813c9000bfd552d0858c9c06b18a0915515c51af7096fba82aefd0597" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e5a94963ecb863a3738e18ca9a8237215a4d589df18b301c00706c9c839432a" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + uses_from_macos "libffi" + + on_macos do + depends_on "readline" + end + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + resource "crc32c" do + url "https://files.pythonhosted.org/packages/7f/4c/4e40cc26347ac8254d3f25b9f94710b8e8df24ee4dddc1ba41907a88a94d/crc32c-2.7.1.tar.gz" + sha256 "f91b144a21eef834d64178e01982bb9179c354b3e9e5f4c803b0e5096384968c" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + 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..2831957e5f964 --- /dev/null +++ b/Formula/d/dyff.rb @@ -0,0 +1,48 @@ +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.1.tar.gz" + sha256 "8f20ba3580fbb45957211efdf5ac4fc60dd339a2f798db0ecf521c930fdb0be0" + license "MIT" + head "https://github.com/homeport/dyff.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d709739f34f69642ebbadc8aa382b0ef0a4914593dbf31722ad409a79007fd2b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d709739f34f69642ebbadc8aa382b0ef0a4914593dbf31722ad409a79007fd2b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d709739f34f69642ebbadc8aa382b0ef0a4914593dbf31722ad409a79007fd2b" + sha256 cellar: :any_skip_relocation, sonoma: "37093d31497ba88d80070b9aa1516f93f745d5b4e145a815bb93fdc3c161a5d3" + sha256 cellar: :any_skip_relocation, ventura: "37093d31497ba88d80070b9aa1516f93f745d5b4e145a815bb93fdc3c161a5d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "86b077cc452fadf472c80a323c7fb655b0ee104aba3f9fe5fd46951d4f9896ba" + 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..f0038a48f314f --- /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-1284.13.tar.gz" + sha256 "583a6ac254698f17feb7c8a83c364d242ab9185aaf4f73478056579da6bce968" + license "APSL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "fcb398c76d5ef67211d4f30bea2475f9e60ceaa2d1351e133e3e0c12bbcb3554" + 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..3d7578cf117b1 --- /dev/null +++ b/Formula/d/dylibbundler.rb @@ -0,0 +1,31 @@ +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" + + bottle do + 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..1168fa0d81202 --- /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/62/eb/e9d1249ff56b11e63fd8c7d0fcc1f94704e21693c16862bf0ebfb07bd61a/dynaconf-3.2.11.tar.gz" + sha256 "4cfc6a730c533bf1a1d0bf266ae202133a22236bb3227d23eff4b8542d4034a5" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a603acc6b39b5cfa1f02584927ce2071ef3a04d63f5853497ad93c77aa395116" + end + + depends_on "python@3.13" + + 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..0f52a0a14639f --- /dev/null +++ b/Formula/d/dynamips.rb @@ -0,0 +1,56 @@ +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 + + bottle do + 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 + + 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..f87a1c3dd9028 --- /dev/null +++ b/Formula/d/dynare.rb @@ -0,0 +1,115 @@ +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.3.tar.xz" + sha256 "232788788a72c7bc4329eaa4e1ed24318c264095d7646622b871d6e711ff322c" + license "GPL-3.0-or-later" + 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_sonoma: "ba962affcd850ff14cc11142157a2f00dc83e27c29e6ba1e43b79612b276ca66" + sha256 cellar: :any, arm64_ventura: "d2ba3a1e17fa69985f92e7f48040d95c575914fc005b1e12f53be5b112194e37" + sha256 cellar: :any, sonoma: "b4ab59f0eaa2afa2fc2b7b6bf9e7baa264899269d729999eed5f342d39a6a66d" + sha256 cellar: :any, ventura: "107fc225fe27db388fc27a04036070c923e410bad080545afd657d2909c691bc" + sha256 x86_64_linux: "567a9630385a717ce6cfb3f1a2d094931c8ce2049a7b5feb523e9591aa2b9af4" + 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" + 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 + + # Work around used in upstream builds which helps avoid runtime preprocessor error. + # https://git.dynare.org/Dynare/dynare/-/blob/master/macOS/homebrew-native-arm64.ini + ENV.append "LDFLAGS", "-Wl,-ld_classic" if DevelopmentTools.clang_build_version >= 1500 + + # Help meson find `suite-sparse` and `slicot` + 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.6.5.tar.gz", using: :nounzip + sha256 "0ea8258c92ce67e1bb75a9813b7ceb56fff1dacf6c47236d3da776e27b684cee" + end + + ENV.cxx11 + ENV.delete "LDFLAGS" # avoid overriding Octave flags + + # Work around Xcode 15.0 ld error with GCC: https://github.com/Homebrew/homebrew-core/issues/145991 + if OS.mac? && (MacOS::Xcode.version.to_s.start_with?("15.0") || MacOS::CLT.version.to_s.start_with?("15.0")) + ENV["LDFLAGS"] = shell_output("#{Formula["octave"].opt_bin}/mkoctfile --print LDFLAGS").chomp + ENV.append "LDFLAGS", "-Wl,-ld_classic" + end + + 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..f3059c9a6ff10 --- /dev/null +++ b/Formula/d/dynein.rb @@ -0,0 +1,39 @@ +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_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..9fc74a75b7c74 --- /dev/null +++ b/Formula/d/dynet.rb @@ -0,0 +1,57 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "13425cf394c191250670db43c3090541143f76d156e06a11f2cba7294333926e" + sha256 cellar: :any, arm64_sonoma: "f64ed80ea96d473dd96800bdd9928eaa1b4fbe56cef809daf8d5241d3fb936e7" + sha256 cellar: :any, arm64_ventura: "326d11401b0db3d2294c46c7f3835cf497954f61fd14f8b6508461ef7ec6d8cf" + sha256 cellar: :any, arm64_monterey: "5344a9cc883ddbea6def01dc950bed7aca9fe06ba67d52d10349ef46af17879b" + sha256 cellar: :any, arm64_big_sur: "812e42a82c70b8c049582c897d8d6d645c7892cb29fe742bc4c857f6d915cb44" + sha256 cellar: :any, sonoma: "98c5c6da074e6b0e7eed5c60d8365945bb78b5e752e13f13ac345c08d2cb3acc" + sha256 cellar: :any, ventura: "88af1a5787e4b2d6919b16a94c72041009f72f2e0c58b03e11410206aa7b3eab" + sha256 cellar: :any, monterey: "ad0cf700f000d6b03ad08ec1074508eb01f442019f6e1c59fe7a83325bb84add" + sha256 cellar: :any, big_sur: "8bd7104e80fd7166539f40cf30f4c67ac643f096920582ec6702f81b06ff6910" + sha256 cellar: :any, catalina: "d699aaf34e601dca84a10d735a822954de02b2139757699da77df2632d9ae95c" + sha256 cellar: :any, mojave: "edc5ba7539f3c224b091ae08b2f23ae667f6851ebbc10515e410fbe2efb2aec4" + sha256 cellar: :any, high_sierra: "a8b5c58b84c07911937f5b2c633e38e884f860ac97fc45881bfa817f6045c467" + sha256 cellar: :any_skip_relocation, arm64_linux: "b34f9dd2d85fa95eb0d7894a2c3e8ae7758c8c2e0caeb10e69fef515d6249398" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6b8b9842ad483b362f47b1a5562e4cf839c26be13dd4fc525ed456f1dae230c" + end + + depends_on "cmake" => :build + depends_on "eigen" + + 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"].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..8b6a69e1b3762 --- /dev/null +++ b/Formula/d/dynomite.rb @@ -0,0 +1,75 @@ +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 + + bottle do + 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..f3a7a3725b173 --- /dev/null +++ b/Formula/d/dysk.rb @@ -0,0 +1,25 @@ +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/v2.10.1.tar.gz" + sha256 "3b7576b700b11052123a91780a6af26fbbd2560ad31fef917af8df8fcceffa04" + license "MIT" + head "https://github.com/Canop/dysk.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "66a69344a33513bf01fec33960a6b88f6bee689671af08704efbb6481ec4f06b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99f1b6df656fad0babd80cdeb986bc97043ae9636d2215fb79031d1c751607f8" + end + + depends_on "rust" => :build + depends_on :linux + + 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..646c376a272e1 --- /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/240909.tar.gz" + sha256 "8f400de9b2cfc7de87b72354db264abd79beb66734c80ac2cc69b5d49d0e39bd" + license "Unlicense" + head "https://github.com/yne/dzr.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1b6b6c9d140c4c0b2f8c4df0f3cc2bcb35860e1504be83597ecdcb4374ea2d08" + 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 de90d6e2b2a0a..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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "8cc2278936a35f9ae2c0952e4be5c9e06970386f3c9c5ae528b18c69902e9220" => :catalina - sha256 "0fd225e226dd07c3f51836f47bf9829dd095a46a13a5b78c3a0e9df3c5820683" => :mojave - sha256 "ca2b1016c1bbe48002f70b7beb86063943dadabcb670db9f90f1c259cb34d623" => :high_sierra - sha256 "bfc116e8f0853cdf5b4abc38b1f000c90708823bf49c5237f8ec453400a5d606" => :sierra - sha256 "ad4f8ad9e7deeb0039c6c603b0108fb6733abe425c49fa6344f762e26b49cf2d" => :el_capitan - sha256 "f48000af3631f28d47d01d3d89a1f03e7c4f7eac4a81ab7db9c38a1ce9ff66cd" => :yosemite - sha256 "09a420b59d2e5cbaf3073b2daf81d57d01c733b79a928bb58da6418de7f5bd3a" => :mavericks - end - - # fixes for strlcpy/strlcat: https://trac.macports.org/ticket/42845 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/3323958/daemon/daemon-0.6.4-ignore-strlcpy-strlcat.patch" - sha256 "a56e16b0801a13045d388ce7e755b2b4e40288c3731ce0f92ea879d0871782c0" - 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 83fd81f63e0f9..0000000000000 --- a/Formula/daemonize.rb +++ /dev/null @@ -1,40 +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 "a5c898ee425aecfb5c3d41e75da436ebbd44ad2fa343fa85b60573bd4fd8c7a7" => :catalina - 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 64d419a805d6b..0000000000000 --- a/Formula/daemonlogger.rb +++ /dev/null @@ -1,29 +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 "8f2af84c9d476a7bd11e30185794bf107a92ae32f92b84f38f5a629f368ad6c2" => :catalina - 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 984fd4d4c61da..0000000000000 --- a/Formula/daemontools.rb +++ /dev/null @@ -1,57 +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 "897ad92e7fcf9dd37a73dbb7113d5376d380351c505640535b4a5a38ac5e55cf" => :catalina - 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/dafny.rb b/Formula/dafny.rb deleted file mode 100644 index 086aaf3d2f3ed..0000000000000 --- a/Formula/dafny.rb +++ /dev/null @@ -1,54 +0,0 @@ -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/v2.3.0.tar.gz" - sha256 "ea7ae310282c922772a46a9a85e2b4213043283038b74d012047b5294687d168" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "00cfdeb5892e2834b144a6e4c816a50d594440882327e65a771f9e72cd13f82d" => :catalina - sha256 "4b0bb8f5e2385b99318cc85ff38496e87814d5658f5dd4054fdc7d2a0a8ebc07" => :mojave - sha256 "4b64f7c46ab2fdfb997ca918c81e0d423609f565bdd405eaa9a2d7e848295ab7" => :high_sierra - end - - depends_on "mono-libgdiplus" => :build - depends_on "nuget" => :build - depends_on "mono" - depends_on "z3" - - resource "boogie" do - url "https://github.com/boogie-org/boogie.git", - :revision => "9e74c3271f430adb958908400c6f6fce5b59000a" - end - - def install - (buildpath/"../boogie").install resource("boogie") - cd buildpath/"../boogie" do - system "nuget", "restore", "Source/Boogie.sln" - system "msbuild", "Source/Boogie.sln" - end - system "msbuild", "Source/Dafny.sln" - - libexec.install Dir["Binaries/*"] - - # We don't want to resolve opt_bin here. - dst_z3_bin = libexec/"z3/bin" - dst_z3_bin.mkpath - ln_sf (Formula["z3"].opt_bin/"z3").relative_path_from(dst_z3_bin), dst_z3_bin/"z3" - - (bin/"dafny").write <<~EOS - #!/bin/bash - mono #{libexec}/dafny.exe "$@" - EOS - end - - test do - (testpath/"test.dfy").write <<~EOS - method Main() { - print "hello, Dafny\\n"; - } - EOS - system "#{bin}/dafny", testpath/"test.dfy" - end -end diff --git a/Formula/dante.rb b/Formula/dante.rb deleted file mode 100644 index e8cf6fbd986d7..0000000000000 --- a/Formula/dante.rb +++ /dev/null @@ -1,30 +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 "d04be77c7a05eb220c08e161cc017b1029c25fc3aae0a9991d20d3493a57845c" => :catalina - 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 55322a11281a9..0000000000000 --- a/Formula/daq.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Daq < Formula - desc "Network intrusion prevention and detection system" - homepage "https://www.snort.org/" - url "https://www.snort.org/downloads/snort/daq-2.0.7.tar.gz" - mirror "https://fossies.org/linux/misc/daq-2.0.7.tar.gz" - sha256 "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e" - - bottle do - cellar :any - sha256 "3b1f25eab6e2c04f4b5e609a1d3e72c3eb55eb12d4a7acb61f43ae815bd10347" => :catalina - sha256 "8d57a1f8536259612d6ce312b54a96e8d0fd5527000593d11765baf095d1fd2d" => :mojave - sha256 "861fbfd197f0cef898687b427cfa259d6dbf15b2eace0036477910177b8c4c16" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - uses_from_macos "libpcap" - - # libpcap on >= 10.12 has pcap_lib_version() instead of pcap_version - # Reported 8 Oct 2017 to bugs AT snort DOT org - patch :p0, :DATA if MacOS.version >= :sierra - - def install - rm_f "./configure" - system "autoreconf", "-fiv" - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - ENV.deparallelize { 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 - -__END__ ---- ./m4/sf.m4 -+++ ./m4/sf.m4 -@@ -141,10 +141,9 @@ - [[ - #include - #include -- extern char pcap_version[]; - ]], - [[ -- if (strcmp(pcap_version, $1) < 0) -+ if (strcmp(pcap_lib_version(), $1) < 0) - return 1; - ]])], - [daq_cv_libpcap_version_1x="yes"], diff --git a/Formula/dar.rb b/Formula/dar.rb deleted file mode 100644 index 4c3d6bca2b362..0000000000000 --- a/Formula/dar.rb +++ /dev/null @@ -1,36 +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.6.10/dar-2.6.10.tar.gz" - sha256 "16a0b755c648c4ce6598e258ccf375f55d4f2f943448341ed41085ac7a27d2e7" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "715d4c42deee8466b4c4ca1eb5c1eb0e353531f008162a1caa0ac3cebed80eea" => :catalina - sha256 "da4e6447538509a0cf9b67cd126096ff8b4967ea9503681d8a985b557128cd1a" => :mojave - sha256 "589731424a6eb153ea8ad9f60e05f18e077194c7ca5d95784bd102bb7781652b" => :high_sierra - end - - depends_on "upx" => :build - depends_on "libgcrypt" - depends_on "lzo" - depends_on :macos => :el_capitan # needs thread-local storage - - def install - ENV.cxx11 - - 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 - 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 98a808b1380bf..0000000000000 --- a/Formula/darcs.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Darcs < Formula - desc "Distributed version control system that tracks changes, via Haskell" - homepage "http://darcs.net/" - url "https://hackage.haskell.org/package/darcs-2.14.4/darcs-2.14.4.tar.gz" - sha256 "e7721151000857a6ab53d7ee82a3d3e8e741b19c2cff0da2a2c9dc1285026762" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ccab83cfccbad379fd029b56b83cd79ad3587b42176e6d1e412bb08059f9a297" => :catalina - sha256 "b3febd7322260478d4043baad71f56322e2a14283e5343a7bc1b8d7ab366f266" => :mojave - sha256 "5b578c424e77b5d9174beea3c3ac25f4219002ffd0707506aba815e6ec7fd1eb" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - depends_on "gmp" - - 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.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 c9dc359ef7122..0000000000000 --- a/Formula/dark-mode.rb +++ /dev/null @@ -1,26 +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/v3.0.0.tar.gz" - sha256 "c79eb0a96e179953a12f69ec3486b2d89751599c5f5e3cf72ff4def7fd49dcbb" - license "MIT" - head "https://github.com/sindresorhus/dark-mode.git" - - bottle do - cellar :any_skip_relocation - sha256 "731a265bb76b143c30f3b6813973f3cfeee3be84b0020c9a616e3f9da326ec26" => :catalina - sha256 "45e08014f007e1e35fe9bd4619f3ec7517f06d5a5b9869412ae629dbc5010085" => :mojave - end - - depends_on :xcode => :build - depends_on :macos => :mojave - - 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 1a9c73494f57d..0000000000000 --- a/Formula/darkhttpd.rb +++ /dev/null @@ -1,26 +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 "9fbb24a5ba183c6e582a0a4960c86503ed6dca8b1fd37080f44c8516d0ef5117" => :catalina - 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 e3b8986f495ac..0000000000000 --- a/Formula/darkice.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Darkice < Formula - desc "Live audio streamer" - homepage "http://www.darkice.org/" - url "https://github.com/rafael2k/darkice/releases/download/v1.4/darkice-1.4.tar.gz" - sha256 "e6a8ec2b447cf5b4ffaf9b62700502b6bdacebf00b476f4e9bf9f9fe1e3dd817" - - bottle do - cellar :any - sha256 "c312949cef4bec0b37951d4e9f3b9211a0a0c04d8666cb14bfde0a9f6c85ad5e" => :catalina - sha256 "b41dd758dcda3daa8bcde6c5f161fb73d9268bef1bd68940e320fe0374b8272e" => :mojave - sha256 "a8b0c02c6b00f614c9eac9d05fa17aee233021879edf7abc8cd81d1de34881e4" => :high_sierra - 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 - 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 f1de02275bb70..0000000000000 --- a/Formula/darksky-weather.rb +++ /dev/null @@ -1,34 +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.7.tar.gz" - sha256 "e5efd17d40d4246998293de6191e39954aee59c5a0f917f319b493a8dc335edb" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "64aac1bb9c9f6fc856fdb6e818b11d715addb17c6f35480abf0a337c1dcaa311" => :catalina - sha256 "ae72f00275774f08c66fb8f90697545b97701c4fb819416fb6215779ec775cab" => :mojave - sha256 "b621c14d94f6e0e1c350e0bc78c0269bed889b065d811acb8da39d137de5ac4f" => :high_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") - assert_match "Current weather is", output - end -end diff --git a/Formula/darkstat.rb b/Formula/darkstat.rb deleted file mode 100644 index 35a8f331df696..0000000000000 --- a/Formula/darkstat.rb +++ /dev/null @@ -1,39 +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 "381e67870ea4f9f980421aa6f51580eedf98a916a09de042022744de1905798e" => :catalina - 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 7dc7a686706e6..0000000000000 --- a/Formula/dartsim.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Dartsim < Formula - desc "Dynamic Animation and Robotics Toolkit" - homepage "https://dartsim.github.io/" - url "https://github.com/dartsim/dart/archive/v6.9.2.tar.gz" - sha256 "7d46d23c04d74d3b78331f9fa7deb5ab32fd4b0c03b93548cd84a2d67771d816" - revision 8 - - bottle do - sha256 "bccbbcb136d0c77f46de622359c8085ad10436431deca27424bb894e01fb3d1c" => :catalina - sha256 "0af0f8332b0bfbcb384d1b467c3184ac5e72cdbc6571d2994c68d6ce33372687" => :mojave - sha256 "d1b8457d283fe9a28887f1d6dcd999fd09d5f7a58bc5d671e2e9353ace43df85" => :high_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 "ipopt" - depends_on "libccd" - depends_on "nlopt" - depends_on "ode" - depends_on "open-scene-graph" - depends_on "tinyxml2" - depends_on "urdfdom" - - 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" - - # Clean up the build file garbage that has been installed. - rm_r Dir["#{share}/doc/dart/**/CMakeFiles/"] - 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++14", "-o", "test" - system "./test" - end -end diff --git a/Formula/dash.rb b/Formula/dash.rb deleted file mode 100644 index e4ceccb4c9936..0000000000000 --- a/Formula/dash.rb +++ /dev/null @@ -1,36 +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 "21446fdece550bbaa24c64db4f03cba0c41a6b46eaaa20101573026a7f57f96c" => :catalina - 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 9326a320b1ed3..0000000000000 --- a/Formula/dashing.rb +++ /dev/null @@ -1,39 +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.4.0.tar.gz" - sha256 "81b21acae83c144f10d9eea05a0b89f0dcdfa694c3760c2a25bd4eab72a2a3b9" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "cdfb4329ae48807046deb40bb2adb9969afda47a25502cedb374cf21a6a605ee" => :catalina - sha256 "79874bca8f27064c16aa81b398131d7ed3558bd5987913e344d0075859d9f7c7" => :mojave - sha256 "8c34e42f44271bfea4aecbb5dedb18deecfc4b8d0d0564344efa861bb816e8d4" => :high_sierra - end - - depends_on "go" => :build - - # Use ruby docs just as dummy documentation to test with - resource "ruby_docs_tarball" do - url "https://ruby-doc.com/downloads/ruby_2_6_5_core_rdocs.tgz" - sha256 "9b5fc2814e4ce33701b3f6614a3309b8ed7a229e8b9b87cc5e75d5d4dbda1e12" - end - - def install - system "go", "build", "-o", bin/"dashing", "-ldflags", - "-X main.version=#{version}" - prefix.install_metafiles - 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 ef61dd2e4b793..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.4.0.tar.gz" - sha256 "5ea43b0f7461e124d46b991892dedc8dcf506ccd5e9dc94324f7bdf6e580ff73" - - 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 746a174e851be..0000000000000 --- a/Formula/dasm.rb +++ /dev/null @@ -1,35 +0,0 @@ -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/2.20.13.tar.gz" - sha256 "48be84858d578dd7e1ac702fb2dca713a2e0be930137cbb3d6ecbeac1944ff5c" - license "GPL-2.0" - revision 1 - version_scheme 1 - - bottle do - cellar :any_skip_relocation - sha256 "a55169cf45fc0d3d61dc77f69c0817fed7b28b66206a93e2c8f7715f867199ac" => :catalina - sha256 "45e8803c881a3ca3a3c7c1c45a5fd55185ba804765b0512971d798c04b1626fd" => :mojave - sha256 "b6c8d3f75172985f0f60172e654785fee331070fdd4c0fa58c4247db8c0ac192" => :high_sierra - end - - def install - system "make" - prefix.install "bin", "doc", "machines" - 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 b9ebe8cdf7772..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.7.tar.gz" - mirror "https://ftpmirror.gnu.org/datamash/datamash-1.7.tar.gz" - sha256 "574a592bb90c5ae702ffaed1b59498d5e3e7466a8abf8530c5f2f3f11fa4adb3" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "f592c4bda737ef924fb4c1642fb381db54c9ce246eb51d03a145dd28a8391406" => :catalina - sha256 "6533f0decc607d6e3ce1ad1fdb7f5b30f99bbbcbacbba1bcd880486eef648189" => :mojave - sha256 "b6100d066c3cf9d91b2bd4a8d8bcdc5fa453c6eb6a28d7cacb06659baa358e46" => :high_sierra - 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 3442f55987186..0000000000000 --- a/Formula/datetime-fortran.rb +++ /dev/null @@ -1,38 +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.7.0/datetime-fortran-1.7.0.tar.gz" - sha256 "cff4c1f53af87a9f8f31256a3e04176f887cc3e947a4540481ade4139baf0d6f" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "82d8b0e2a51fb7df321659ed4f5da43c24edd5aba81e5e05250508b541f2eb4b" => :catalina - sha256 "ef59feabc30610c41a5ac4b2e594f1378d3edeb3b13dd7912825c48815d547e2" => :mojave - sha256 "cf59b21c0539aa14f5e0274387669d13dae47b3e11267cdb1baed8545f2bd535" => :high_sierra - 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 "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 611e4ea7618a9..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.7/dateutils-0.4.7.tar.xz" - sha256 "49725457f5bef45ea424baade8999a6e54496e357f64280474ff7134a54f599a" - - bottle do - sha256 "25d5db665c0591e56c4ec698656a5519f20417473e3cb763299d804bc735a9a5" => :catalina - sha256 "3124ddab0439b64bcfc95057ee52c7c902e684898a2d96832732819682fba75c" => :mojave - sha256 "310bbe8e2d4d039d065fb9bc5cd33ced2fc45f970057f21a205ff0004d6921e0" => :high_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 13f9be8575ba4..0000000000000 --- a/Formula/dav1d.rb +++ /dev/null @@ -1,36 +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.7.1/dav1d-0.7.1.tar.bz2" - sha256 "9eac4f50089f54a9f562827bda4a21187d68c01d8b20055eef1d7efca9f84cf8" - license "BSD-2-Clause" - - bottle do - cellar :any - sha256 "72583c13b3f1a20ebf5bb51a44d23e29cbb19de60ee3cd9b2530dfd5f3061283" => :catalina - sha256 "457283e7f7e3066bcbacff2fda7c7630ccd476dc34908ab1e150f759d88dbe42" => :mojave - sha256 "9cadd5bf4b109037700161dcc12376d5f05a6ba73df925c592a01392f2247db6" => :high_sierra - end - - depends_on "meson" => :build - depends_on "nasm" => :build - depends_on "ninja" => :build - - resource "00000000.ivf" do - url "https://code.videolan.org/videolan/dav1d-test-data/raw/master/8-bit/data/00000000.ivf" - sha256 "52b4351f9bc8a876c8f3c9afc403d9e90f319c1882bfe44667d41c8c6f5486f3" - end - - def install - system "meson", *std_meson_args, "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 6b129239b6a50..0000000000000 --- a/Formula/davix.rb +++ /dev/null @@ -1,34 +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-fts/davix/releases/download/R_0_7_6/davix-0.7.6.tar.gz" - sha256 "a2e7fdff29f7ba247a3bcdb08ab1db6d6ed745de2d3971b46526986caf360673" - license "LGPL-2.1" - head "https://github.com/cern-fts/davix.git" - - bottle do - cellar :any - sha256 "31228a01aae02ff881132588f85e59c563d3bcaf206f7600afb16eed76f478c8" => :catalina - sha256 "d7af8ace083026f5fbbebc6e986162b16f651df17bd64a5303f6f4af6a110a9c" => :mojave - sha256 "562abf97a898044427a6f968145208d27ada1bf7b6e793fb64eb6fef5864731a" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "openssl@1.1" - - uses_from_macos "libxml2" - - on_linux do - depends_on "util-linux" - end - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/davix-get", "https://brew.sh/" - end -end diff --git a/Formula/davmail.rb b/Formula/davmail.rb deleted file mode 100644 index c608de6932df3..0000000000000 --- a/Formula/davmail.rb +++ /dev/null @@ -1,48 +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/5.5.1/davmail-5.5.1-3299.zip" - version "5.5.1" - sha256 "34dfd350e7142227cdceb267666b5886ce94564b6395fa0e6098d868c110a48e" - - 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/db-vcs.rb b/Formula/db-vcs.rb deleted file mode 100644 index 9fac0a9c85cb9..0000000000000 --- a/Formula/db-vcs.rb +++ /dev/null @@ -1,20 +0,0 @@ -class DbVcs < Formula - desc "Version control for MySQL databases" - homepage "https://github.com/infostreams/db" - url "https://github.com/infostreams/db/archive/1.1.tar.gz" - sha256 "90f07c13c388896ba02032544820f8ff3a23e6f9dc1e320a1a653dd77e032ee7" - license "MIT" - - bottle :unneeded - - 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/dbacl.rb b/Formula/dbacl.rb deleted file mode 100644 index 397bc68bd6f14..0000000000000 --- a/Formula/dbacl.rb +++ /dev/null @@ -1,59 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "d81fd1fc86703610737cfd9d24f8c3c8db2e97ef4148f1f7f91a43c81c8762c6" => :catalina - 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 67d3df68f78b5..0000000000000 --- a/Formula/dbhash.rb +++ /dev/null @@ -1,32 +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/2020/sqlite-src-3320300.zip" - version "3.32.3" - sha256 "9312f0865d3692384d466048f746d18f88e7ffd1758b77d4f07904e03ed5f5b9" - - bottle do - cellar :any_skip_relocation - sha256 "2c15b1a7f943559d1fc5f1ff3ce17c29d6ab54889aab413fccef92ea83ebb446" => :catalina - sha256 "09e619708878d1b09a08e398f326409d32b333e2130463a576ea24daaee12e31" => :mojave - sha256 "961c5f59efe16bf5e88a8876277faf106efe0786db58fe46feb36e1ad5ae8246" => :high_sierra - 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 "/usr/bin/sqlite3 #{dbpath} < #{sqlpath}" - assert_equal "b6113e0ce62c5f5ca5c9f229393345ce812b7309", - shell_output("#{bin}/dbhash #{dbpath}").strip.split.first - end -end diff --git a/Formula/dbmate.rb b/Formula/dbmate.rb deleted file mode 100644 index 6f86a7bc81729..0000000000000 --- a/Formula/dbmate.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Dbmate < Formula - desc "Lightweight, framework-agnostic database migration tool" - homepage "https://github.com/amacneil/dbmate" - url "https://github.com/amacneil/dbmate/archive/v1.9.0.tar.gz" - sha256 "8c7bb27b12b456b962a1d7828de048f7f0d3efc6ac0a3494fcaebe7a3bd3ad00" - license "MIT" - head "https://github.com/amacneil/dbmate.git" - - bottle do - cellar :any_skip_relocation - sha256 "380ddb2a725ca5e1657afd10acd7b343dc1c5826a4a455f8efe24e7c9bf3d779" => :catalina - sha256 "968002c69f18deead19c7f7e7ff9a387df34e7e30abb094c2176d6dc96f74e2a" => :mojave - sha256 "b2956de9991ef878a24b0e14a64527e7642fec5330ae8b5ca1c5d509adb42506" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s", "-o", bin/"dbmate", "." - end - - test do - (testpath/".env").write("DATABASE_URL=sqlite3:///test.sqlite3") - system bin/"dbmate", "create" - assert_predicate testpath/"test.sqlite3", :exist?, "failed to create test.sqlite3" - end -end diff --git a/Formula/dbus-glib.rb b/Formula/dbus-glib.rb deleted file mode 100644 index 74204981d2f43..0000000000000 --- a/Formula/dbus-glib.rb +++ /dev/null @@ -1,30 +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" - revision 1 - - bottle do - cellar :any - sha256 "1e239ecd5e6ba952a9a31ea7902c6b67fe5cf25509a7c796987dfc97efdbd38d" => :catalina - sha256 "107de2a15de30b069b1628b2b6aa347eaee4bc3931b9ba5a0b6ff9390e3550a8" => :mojave - sha256 "c47b5a0470a8fa82ea95e53317aa255f413b158a0f63a6b5b2ecfd368f176ad4" => :high_sierra - sha256 "bdf88ebc93b14b3f934f8ea8415234e099a20919bcf71b86c244393e31442f1c" => :sierra - 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 369b1e4ab32fd..0000000000000 --- a/Formula/dbus.rb +++ /dev/null @@ -1,75 +0,0 @@ -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.12.20.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/d/dbus/dbus_1.12.20.orig.tar.gz" - sha256 "f77620140ecb4cdc67f37fb444f8a6bea70b5b6461f12f1cbe2cec60fa7de5fe" - - bottle do - sha256 "23513ea5d75203fe4374ab37cc4226f23f34ec604449ef572fd6a2b48a612ff3" => :catalina - sha256 "912da7c3211a981762dc45e4f67fbedd1afd379459a40244340c83caa4134382" => :mojave - sha256 "6c98efff3cb8fdbba552351a2953f85953f053e12a8af891461118d37affdb73" => :high_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 - - uses_from_macos "expat" - - on_linux do - depends_on "pkg-config" => :build - end - - # 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 plist_name - "org.freedesktop.dbus-session" - 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 ecd0b89f59b16..0000000000000 --- a/Formula/dbxml.rb +++ /dev/null @@ -1,69 +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 "59c12069d26a6be4f542d4c7869841c2bd71e8cb08a1c809d559818fb1cb156a" => :catalina - 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/4d337833ef2e10c1f06a72170f22b1cafe2b6a78/dbxml/c%2B%2B11.patch" - sha256 "98d518934072d86c15780f10ceee493ca34bba5bc788fd9db1981a78234b0dc4" - end - - 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 bfeedfee2ce10..0000000000000 --- a/Formula/dc3dd.rb +++ /dev/null @@ -1,64 +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 2 - - bottle do - sha256 "da27e2227f7fac70c613c4677ec597255c13b1253bc7c79cf58f7321a0a6427e" => :mojave - sha256 "b906b2d7009282e22eb97a1ad07982f3e4545fa4791cb2bc2eaf1e0c101ebaed" => :high_sierra - sha256 "581af2165e8c666a92060e8354107cd0b27ada0143b4e0f5416b1d76739f45b7" => :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} - gl_cv_func_stpncpy=yes - ] - 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 1333a0bbd6ba7..0000000000000 --- a/Formula/dcadec.rb +++ /dev/null @@ -1,36 +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 "0622b87f5b7f7c71346443f12d5e3d6eabd02aa63dce433c7248d405a9fbc036" => :catalina - 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/dcd.rb b/Formula/dcd.rb deleted file mode 100644 index ed92aafbe2f46..0000000000000 --- a/Formula/dcd.rb +++ /dev/null @@ -1,38 +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.12.0", - :revision => "33dbd7653ecf830b735382e11d9bee66853a6dcf" - license "GPL-3.0" - head "https://github.com/dlang-community/dcd.git", :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "1db1c37fa9dd757c4a91439bb36c8bbfae7983b9cfcaaa82b7cefcb6dfc5237e" => :mojave - sha256 "932bb7fa259d950135a91973e7385e3fba9690cf899f65f0e1ffeb5b01d274e6" => :high_sierra - sha256 "92cc0dcf3830b9b5fe63abe6d54323f8c310147f280be907123fa69b1646d868" => :sierra - end - - depends_on "dmd" => :build - - def install - system "make" - bin.install "bin/dcd-client", "bin/dcd-server" - end - - test do - # 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 diff --git a/Formula/dcfldd.rb b/Formula/dcfldd.rb deleted file mode 100644 index 778355e3fcb0e..0000000000000 --- a/Formula/dcfldd.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "17bf5e7a79a3453103e9fd5a70f0b12d49c93c5302a6ada8bd021ca918979992" => :catalina - 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 9b3e386829713..0000000000000 --- a/Formula/dcled.rb +++ /dev/null @@ -1,32 +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 "83a87a0f780dc73c21151690f3b1d0654d33e2baad358122be9d24a0610cea64" => :catalina - 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 43ba3a754c6ce..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.20200331.tar.gz" - sha256 "d057f3dbfb0ec9474695075725bc09e28f1d1e021f5fe71c22903ed8cc18f7cb" - head "https://github.com/rordenlab/dcm2niix.git" - - bottle do - cellar :any_skip_relocation - sha256 "d6087edcd6fc5bd534295bbb5d909764b0f83ecc50812e58923a8200a22f3b65" => :catalina - sha256 "bd5449e4418187c4882e2b32afa857632dd8119f2583f5741272f74d65d82603" => :mojave - sha256 "072d6b24939de3dd5202142398083a4e9759c7adfc2c34d323b4b76fcecb542f" => :high_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 3d889d182e444..0000000000000 --- a/Formula/dcmtk.rb +++ /dev/null @@ -1,33 +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/dcmtk365/dcmtk-3.6.5.tar.gz" - sha256 "a05178665f21896dbb0974106dba1ad144975414abd760b4cf8f5cc979f9beb9" - head "https://git.dcmtk.org/dcmtk.git" - - bottle do - sha256 "5b49e8b8d34cd1472f5091fc4d6e4b4a05133ac3cd85f6f428aef6c1013234b0" => :catalina - sha256 "3d149b4aa7f6d76df7ddda09d845c4c43a0aa0617800b9ea25602183e213f5b0" => :mojave - sha256 "70ba2b42c6a522f2da68ac47834f240db316afd12b388edb4bc7c1f586a18f2c" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libpng" - depends_on "libtiff" - depends_on "openssl@1.1" - - uses_from_macos "libxml2" - - 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 55d561441d07c..0000000000000 --- a/Formula/dcos-cli.rb +++ /dev/null @@ -1,29 +0,0 @@ -class DcosCli < Formula - desc "The DC/OS command-line interface" - homepage "https://docs.d2iq.com/mesosphere/dcos/latest/cli" - url "https://github.com/dcos/dcos-cli/archive/1.1.3.tar.gz" - sha256 "cc423272e08a15d30e13c60b2245350c0b7d027649a6a01d44a58596a5ed8b20" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "1f98490af0a9ce9a22e7de6f764d887342e11bbd25ca70131e2987a93131170f" => :catalina - sha256 "d38aab9ff56007a19cc5a6e16546ac852b10a08d9b951c32dc36fd10642a15c0" => :mojave - sha256 "a44dadc1335fa9f20ef25f10cd6a6ef826b7d34cf20de7261b3e67d5c86f3474" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["NO_DOCKER"] = "1" - ENV["VERSION"] = version.to_s - - system "make", "darwin" - bin.install "build/darwin/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/dcraw.rb b/Formula/dcraw.rb deleted file mode 100644 index 8ff9d40f23a03..0000000000000 --- a/Formula/dcraw.rb +++ /dev/null @@ -1,31 +0,0 @@ -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" - - bottle do - cellar :any - sha256 "df26056a9b3374154b499b4dbdee4a1417a58a15cffe22ac40f095747ee1f8a7" => :catalina - 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/ddate.rb b/Formula/ddate.rb deleted file mode 100644 index d001da8e965f0..0000000000000 --- a/Formula/ddate.rb +++ /dev/null @@ -1,29 +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 "2b9be177e37cb4650bae50a9527315e700592bdd8a5546cfb7b40cf201bb680c" => :catalina - 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 bb2cea9f5fd3d..0000000000000 --- a/Formula/ddclient.rb +++ /dev/null @@ -1,121 +0,0 @@ -class Ddclient < Formula - desc "Update dynamic DNS entries" - homepage "https://ddclient.net/" - url "https://github.com/ddclient/ddclient/archive/v3.9.1.tar.gz" - sha256 "e4969e15cc491fc52bdcd649d4c2b0e4b1bf0c9f9dba23471c634871acc52470" - head "https://github.com/wimpunk/ddclient.git" - - bottle do - cellar :any_skip_relocation - sha256 "d4e32d3e5c88ea3d8b77caccd50e1a291e44934542279289f6e8e13203496214" => :catalina - sha256 "05482e7ee83ff87306f35898b16748d0c3823d15c8879a4a4f8e6da341d299a5" => :mojave - sha256 "45b2b534058896de6f98ab1da92d8a1f4ab71fc952b97129e94ae074cfa80b91" => :high_sierra - 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}. - 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 0692a2de52238..0000000000000 --- a/Formula/ddd.rb +++ /dev/null @@ -1,63 +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 "a2d1ceeadc2055223cea7c3e3776393dfc01bd0f2946ed82dda8226fe11ccb29" => :catalina - 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 - patch :p0 do - url "https://savannah.gnu.org/patch/download.php?file_id=29114" - sha256 "aaacae79ce27446ead3483123abef0f8222ebc13fd61627bfadad96016248af6" - 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 e98e9456a2873..0000000000000 --- a/Formula/ddgr.rb +++ /dev/null @@ -1,31 +0,0 @@ -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/v1.8.1.tar.gz" - sha256 "d223a3543866e44e4fb05df487bd3eb23d80debc95f116493ed5aad0d091149e" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "ba751df7de76dd4c286e8502cf5e46f406f1e6b1467689f98158bc92f7df42b2" => :catalina - sha256 "ba751df7de76dd4c286e8502cf5e46f406f1e6b1467689f98158bc92f7df42b2" => :mojave - sha256 "ba751df7de76dd4c286e8502cf5e46f406f1e6b1467689f98158bc92f7df42b2" => :high_sierra - end - - depends_on "python@3.8" - - def install - rewrite_shebang detected_python_shebang, "ddgr" - 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 "q:Homebrew", shell_output("#{bin}/ddgr --debug --noprompt Homebrew 2>&1") - end -end diff --git a/Formula/ddrescue.rb b/Formula/ddrescue.rb deleted file mode 100644 index d54ed63352681..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.25.tar.lz" - mirror "https://ftpmirror.gnu.org/ddrescue/ddrescue-1.25.tar.lz" - sha256 "ce538ebd26a09f45da67d3ad3f7431932428231ceec7a2d255f716fa231a1063" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "517175b22fc4cc660059801b497484ffd7096ade308222c752e758f5036f570a" => :catalina - sha256 "73234513fd966432d0cd11f907614b350c6943b3d2c82a7d1ed487fa93f948ca" => :mojave - sha256 "a4090204da6b3ef1ff36ff144dd7737e42424e7adf59519becd76ca134cbc08c" => :high_sierra - 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 ca460e70c032f..0000000000000 --- a/Formula/deark.rb +++ /dev/null @@ -1,29 +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.5.5.tar.gz" - sha256 "fea8ae40759d023baf39a89c5fdd157748d8d24591641c9d1b77106a28f1eb56" - - bottle do - cellar :any_skip_relocation - sha256 "f8d53f955cfd1e3e506c9db344479771a29d4a59408a845dcf58fa3c13f21641" => :catalina - sha256 "950b65739f9a3770e1e98ef497aef22a529f31aff07186e287dc41764ca8086f" => :mojave - sha256 "a66a4003564df921fd305c02fc9a2996093780365841a615615f953946f2b37d" => :high_sierra - 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 f2a17cdd81482..0000000000000 --- a/Formula/debianutils.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Debianutils < Formula - desc "Miscellaneous utilities specific to Debian" - homepage "https://packages.debian.org/sid/debianutils" - url "https://deb.debian.org/debian/pool/main/d/debianutils/debianutils_4.11.tar.xz" - sha256 "bb5ce6290696b0d623377521ed217f484aa98f7346c5f7c48f9ae3e1acfb7151" - - bottle do - cellar :any_skip_relocation - sha256 "91343603e1d52380fd28a65781e2cc8e7f9708cd94fd710a60261cc626509286" => :catalina - sha256 "0968d5be34075a8d95c5884baee76f3147216d403446cf2d121931a20664925b" => :mojave - sha256 "632fac3d90523c039bc7ab6829de0a27cd3f1fc39ce41337ba90ea6d14f2be89" => :high_sierra - 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 155dff4c381a6..0000000000000 --- a/Formula/defaultbrowser.rb +++ /dev/null @@ -1,26 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "e03bfa37fde424b0d7e76e6d2f99a26bad458e9d2bdf912db06d83d64bfe5a17" => :catalina - 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 a8f36fda47fbf..0000000000000 --- a/Formula/deheader.rb +++ /dev/null @@ -1,49 +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 "84bb08cf8c454272c7bfa95f530dc8f8bc15af43748631704dc7321f2989226c" => :catalina - 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 fe278398878e5..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.io/" - url "https://github.com/lukas2511/dehydrated/archive/v0.6.5.tar.gz" - sha256 "10aabd0027450bc70a18e49acaca7a9697e0cfb92368d3e508b7a4d6d69bfa35" - - bottle do - cellar :any_skip_relocation - sha256 "844e6e0618f99e44fb74c86abfed902f82e6c67ac9879f41a1f1bd0922554730" => :catalina - sha256 "376b14fa1047117a1779c583cd73139b7e4e8d3dafae240bac62912580aae571" => :mojave - sha256 "376b14fa1047117a1779c583cd73139b7e4e8d3dafae240bac62912580aae571" => :high_sierra - sha256 "1b4042e46b66cb78a1f4a423d742bfe3110f12ea8d26177ff0f05d2aea24d6b2" => :sierra - 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/deja-gnu.rb b/Formula/deja-gnu.rb deleted file mode 100644 index 4f27b806fda97..0000000000000 --- a/Formula/deja-gnu.rb +++ /dev/null @@ -1,40 +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.2.tar.gz" - mirror "https://ftpmirror.gnu.org/dejagnu/dejagnu-1.6.2.tar.gz" - sha256 "0d0671e1b45189c5fc8ade4b3b01635fb9eeab45cf54f57db23e4c4c1a17d261" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "894df4a4de1df0698f3539db58615fa63bcee77f723eba6efd8d1700ce0bb827" => :catalina - sha256 "eea1adea3a1c062fd6ba0e85fefebe9f9036736a9d3a3744cec79123390270f3" => :mojave - sha256 "eea1adea3a1c062fd6ba0e85fefebe9f9036736a9d3a3744cec79123390270f3" => :high_sierra - sha256 "5c1100eaf8ae4f28b1c4311241ddff8e0d195d0d241e106051bc60490d28d0e5" => :sierra - end - - head do - url "https://git.savannah.gnu.org/git/dejagnu.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - uses_from_macos "expect" - - 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 3c027eac90ad9..0000000000000 --- a/Formula/delta.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Delta < Formula - desc "Programatically minimize files to isolate features of interest" - homepage "https://web.archive.org/web/20170805142100/delta.tigris.org/" - url "https://deb.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 "244dfd6407c2b65ad33ca707b8642f51d5f63c8056ddd45baf5bc3734dc545ec" => :catalina - sha256 "a6116fb7212cb2271b5c73c1bb53f51aeb33bfcc734e77bd42396a968744a42c" => :mojave - sha256 "46734f3eb952455ecd9237ce455aebb3e66be791bbf190021d894dae39d55b66" => :high_sierra - sha256 "07e775a1054966ad2924512386643bc8cb4ef3ad7e12ce9a140015c82fba3072" => :sierra - sha256 "202409012500969cfd034c9d44c441a809445a3b367d514357346438aa850f14" => :el_capitan - sha256 "d3374cc3e84c93bb84615b1669503ea8b708ab65baf629ee0be9a728b12b10bc" => :yosemite - sha256 "04102ae55ffc2cc4351816b010544b854c21f1c5e2a462a6af0e57ec2f57b501" => :mavericks - end - - conflicts_with "git-delta", :because => "both install a `delta` binary" - - 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/deno.rb b/Formula/deno.rb deleted file mode 100644 index f966c1483a64d..0000000000000 --- a/Formula/deno.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Deno < Formula - desc "Secure runtime for JavaScript and TypeScript" - homepage "https://deno.land/" - url "https://github.com/denoland/deno/releases/download/v1.1.3/deno_src.tar.gz" - sha256 "f953919aceb86d5ebce070267106d2ced07a9b1741c1b01f0a0778c9f9e61e98" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "ec98829f0fd012242845099236bd6d51d86638bff237b669a60d6f64c4f6b3fe" => :catalina - sha256 "33086b7a5100ab2a6ee9fcefb006e2421610bd49edd5186c1619f35bf81bd0c2" => :mojave - sha256 "fbeaa845d6d96efa4a096d56b34499197887932e3809ff3e8bce43421641e99e" => :high_sierra - end - - depends_on "llvm" => :build - depends_on "ninja" => :build - depends_on "rust" => :build - depends_on :xcode => ["10.0", :build] # required by v8 7.9+ - depends_on :macos # Due to Python 2 (see https://github.com/denoland/deno/issues/2893) - - uses_from_macos "xz" - - resource "gn" do - url "https://gn.googlesource.com/gn.git", - :revision => "5ed3c9cc67b090d5e311e4bd2aba072173e82db9" - end - - def install - # Build gn from source (used as a build tool here) - (buildpath/"gn").install resource("gn") - cd "gn" do - system "python", "build/gen.py" - system "ninja", "-C", "out/", "gn" - end - - # env args for building a release build with our clang, ninja and gn - ENV["GN"] = buildpath/"gn/out/gn" - # build rusty_v8 from source - ENV["V8_FROM_SOURCE"] = "1" - # overwrite Chromium minimum sdk version of 10.15 - ENV["FORCE_MAC_SDK_MIN"] = "10.13" - # build with llvm and link against system libc++ (no runtime dep) - ENV["CLANG_BASE_PATH"] = Formula["llvm"].prefix - ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib - - cd "cli" do - system "cargo", "install", "-vv", *std_cargo_args - end - - # Install bash and zsh completion - output = Utils.safe_popen_read("#{bin}/deno", "completions", "bash") - (bash_completion/"deno").write output - output = Utils.safe_popen_read("#{bin}/deno", "completions", "zsh") - (zsh_completion/"_deno").write output - end - - test do - (testpath/"hello.ts").write <<~EOS - console.log("hello", "deno"); - EOS - assert_match "hello deno", shell_output("#{bin}/deno run hello.ts") - assert_match "console.log", - shell_output("#{bin}/deno run --allow-read=#{testpath} https://deno.land/std@0.50.0/examples/cat.ts " \ - "#{testpath}/hello.ts") - 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 9b6f0cf5ec569..0000000000000 --- a/Formula/density.rb +++ /dev/null @@ -1,40 +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" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "1d7dee6e22957cd5d755b11628e9a64d2233ef4abcb27e6aea15cbc9313b057e" => :catalina - 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 1fefa3b9f48f4..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.4", - :revision => "1f7c19e5f52f49ffb9f956f64c010be14683468b" - head "https://github.com/golang/dep.git" - - bottle do - cellar :any_skip_relocation - sha256 "326ba98bcef16dc8823dd9fe76657e6ff0088a0669c0f857a05dd51867220bb7" => :catalina - sha256 "33200b5422fac00416ac44c7c28ad5aa627b845cd4d9aeb7002f7d41304deab0" => :mojave - sha256 "29cfe5b8c29bfbb09a93087dfbd30a9894ed596d3a4219072f022a001d2975cd" => :high_sierra - sha256 "ef9a0a978cbf2d4e537d21c4ff7b89a75b66228697b0aa348daa2284bc7362a9" => :sierra - 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-amd64" => "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 867e65c24ac2d..0000000000000 --- a/Formula/dependency-check.rb +++ /dev/null @@ -1,42 +0,0 @@ -class DependencyCheck < Formula - desc "OWASP dependency-check" - homepage "https://owasp.org/www-project-dependency-check/" - url "https://dl.bintray.com/jeremy-long/owasp/dependency-check-5.3.2-release.zip" - sha256 "4c6f40cb596e335fd0cd816bd6c25773e1e029c3109979ce4c429f3b49850252" - - bottle :unneeded - - depends_on "openjdk" - - def install - rm_f 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 - output = shell_output("#{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 1d00d88dabb42..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.8.0/deployer.phar" - sha256 "25f639561cb7ebe5c2231b05cb10a0cf62f83469faf6b9248dfa6b7f94e3bd26" - - 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 f5807937822a1..0000000000000 --- a/Formula/depqbf.rb +++ /dev/null @@ -1,40 +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" - license "GPL-3.0" - head "https://github.com/lonsing/depqbf.git" - - bottle do - cellar :any - sha256 "432518e2ccee50695a9e79b4fe558142d78945ef96fcdbf7cccf090d72ec6543" => :catalina - 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 97a82613d37e4..0000000000000 --- a/Formula/derby.rb +++ /dev/null @@ -1,70 +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.lua?path=db/derby/db-derby-10.15.2.0/db-derby-10.15.2.0-bin.tar.gz" - mirror "https://archive.apache.org/dist/db/derby/db-derby-10.15.2.0/db-derby-10.15.2.0-bin.tar.gz" - sha256 "ac51246a2d9eef70cecd6562075b30aa9953f622cbd2cd3551bc3d239dc6f02a" - - bottle :unneeded - - depends_on "openjdk" - - 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", - :JAVA_HOME => Formula["openjdk"].opt_prefix, - :DERBY_INSTALL => libexec, - :DERBY_HOME => libexec - 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 e4d3cd644b679..0000000000000 --- a/Formula/desk.rb +++ /dev/null @@ -1,23 +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" - license "MIT" - - 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 eaeb6551a6038..0000000000000 --- a/Formula/desktop-file-utils.rb +++ /dev/null @@ -1,55 +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.26.tar.xz" - sha256 "b26dbde79ea72c8c84fb7f9d870ffd857381d049a86d25e0038c4cef4c747309" - license "GPL-2.0" - - bottle do - sha256 "fba87a1749b744c74510df1a49ed7627615ab10a2398922eac1389f4e35a5cb8" => :catalina - sha256 "2e6548daf5b3fd3f038205986130d39390fd4b22955ed07ad06f6378d5e6e5f2" => :mojave - sha256 "12e7bfe0f9a579f826f7c74f5a67d41ed4dee469f1cf0f3b4be89ef9e884996e" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "glib" - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - - # 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 - 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/detach.rb b/Formula/detach.rb deleted file mode 100644 index 06326ddc5b8e6..0000000000000 --- a/Formula/detach.rb +++ /dev/null @@ -1,28 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "dbd06a1dcb4592035dff0b4df0cc3259c2dbb444acdb1553ab2a2d4edf3fff57" => :catalina - sha256 "4aa3f65488ee7fb05d156d92f5f76a29d2cebe2034b226665e219978e228f1db" => :mojave - sha256 "3367f32cb05a37e05e9ab18e4e1f2664137f7d03073fc2d9ec4aba0d62a6f431" => :high_sierra - 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/detekt.rb b/Formula/detekt.rb deleted file mode 100644 index 4fd83b948b266..0000000000000 --- a/Formula/detekt.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Detekt < Formula - desc "Static code analysis for Kotlin" - homepage "https://github.com/detekt/detekt" - url "https://jcenter.bintray.com/io/gitlab/arturbosch/detekt/detekt-cli/1.10.0/detekt-cli-1.10.0-all.jar" - sha256 "bde5df05598fab5fe6c8f636a2cacce42440591985b744bc77ca519b25d20b9d" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "detekt-cli-#{version}-all.jar" - (bin/"detekt").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/detekt-cli-#{version}-all.jar" "$@" - EOS - end - - test do - (testpath/"input.kt").write <<~EOS - fun main() { - - } - EOS - (testpath/"detekt.yml").write <<~EOS - empty-blocks: - EmptyFunctionBlock: - active: true - EOS - system bin/"detekt", "--input", "input.kt", "--report", "txt:output.txt", "--config", "detekt.yml" - assert_equal "EmptyFunctionBlock", shell_output("cat output.txt").slice(/\w+/) - end -end diff --git a/Formula/detox.rb b/Formula/detox.rb deleted file mode 100644 index d5e003f43c1ed..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://github.com/dharple/detox/archive/v1.3.0.tar.gz" - sha256 "00daf6b019b51c7bbc3ac96deeeec18fd886c144eeee97c3372dd297bb134c84" - - bottle do - sha256 "34cf8b1f4375e659bb76d81fbe298ae6afed01ecd6cd070755b3eabc409c329a" => :catalina - sha256 "d8b6b72801850f3cf9ecc81e5dfbdcbc77de66c4dc65b49efd008dcb8aadc432" => :mojave - sha256 "07b8fe6a481bac0864ccc50939980aad50772c4af9c15d57f95d81ad41acda8e" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "autoreconf", "-fiv" - 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 bd1a3022f6076..0000000000000 --- a/Formula/devd.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Devd < Formula - desc "Local webserver for developers" - homepage "https://github.com/cortesi/devd" - url "https://github.com/cortesi/devd/archive/v0.9.tar.gz" - sha256 "5aee062c49ffba1e596713c0c32d88340360744f57619f95809d01c59bff071f" - license "MIT" - head "https://github.com/cortesi/devd.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "26a21f49c1abdafb1be22d48bc4186c18c0ff53620cc60a35ac778ed22a46c5a" => :catalina - sha256 "21b10d2ef5cdb6a11cb0fa64da6cb4ef5049d5bc9bc411ad4192127224709f2e" => :mojave - sha256 "2cc541a0a844b83e60b89f79e1f296d391737fb635f1bd43ff5dd022a07dc67b" => :high_sierra - 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 - (testpath/"www/example.txt").write <<~EOS - Hello World! - EOS - - port = free_port - fork { exec "#{bin}/devd", "--port=#{port}", "#{testpath}/www" } - sleep 2 - - output = shell_output("curl --silent 127.0.0.1:#{port}/example.txt") - assert_equal "Hello World!\n", output - end -end diff --git a/Formula/devdash.rb b/Formula/devdash.rb deleted file mode 100644 index c052a0233b872..0000000000000 --- a/Formula/devdash.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Devdash < Formula - desc "Highly Configurable Terminal Dashboard for Developers" - homepage "https://thedevdash.com/" - url "https://github.com/Phantas0s/devdash/archive/v0.4.0.tar.gz" - sha256 "2e2eadd5cc5d7f39160de208fd4b98d78adc29365960db3c57c2df814efe6c1b" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "86085a11dbf43d1edafd9e9fd7e47443ec11ab692b9b48a80c5ffc58a2f1b39a" => :catalina - sha256 "a15bcbbc6085b0420bb9bc863acfffbd4a8fd05956dc66dd163caa8ddf731fc3" => :mojave - sha256 "ef75c99c9d174815f7fb244f8b63866e0b27e22d5c35c9e37190da3293c7678b" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args - end - - test do - system bin/"devdash", "-h" - end -end diff --git a/Formula/devil.rb b/Formula/devil.rb deleted file mode 100644 index 54715e9d1dccb..0000000000000 --- a/Formula/devil.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Devil < Formula - desc "Cross-platform image library" - homepage "https://sourceforge.net/projects/openil/" - license "LGPL-2.1" - 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 "8d4739b13ed6e20bc9f87c7f5e06ae2742df94386a80ebae30a9eddf1c70c140" => :catalina - 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/devspace.rb b/Formula/devspace.rb deleted file mode 100644 index aa019e908047d..0000000000000 --- a/Formula/devspace.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Devspace < Formula - desc "CLI helps develop/deploy/debug apps with Docker and k8s" - homepage "https://devspace.cloud/docs" - url "https://github.com/devspace-cloud/devspace.git", - :tag => "v4.13.1", - :revision => "db7996b0004dae9ed7b0ccefc4bb0c0296a2a312" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "cf79d8d8955accaf109154787aaf3acaf86c690fb8e7413d8687253b04871954" => :catalina - sha256 "e91c1177c4d744a2f84d909858e18337283e3319b32f8314c457cc57a032b6de" => :mojave - sha256 "80217b01167d333179a4b9c584d30d0686572b711b718e2d9d291aa35a6e4bbf" => :high_sierra - end - - depends_on "go" => :build - depends_on "kubernetes-cli" - - def install - system "go", "build", *std_go_args - 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") - end -end diff --git a/Formula/devtodo.rb b/Formula/devtodo.rb deleted file mode 100644 index 12ff94f866965..0000000000000 --- a/Formula/devtodo.rb +++ /dev/null @@ -1,59 +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 2 - - bottle do - sha256 "24cc0693b8b69ac2fe7d926cbc3b8fae6e09df83b6a979ac71c68b8ae5ee6196" => :catalina - sha256 "80c04083f48a5791985a5cf02e86ddff3e40b4523177a947f0bd3f7f066f47a1" => :mojave - sha256 "1d5279b22730d8983887f91866a913b4714f8e453e382116bee294bbacee0e97" => :high_sierra - sha256 "aa22627fa7722dd0ca564fdd9770a047901d71090bb5312edfa91c8cf0d72ba4" => :sierra - 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, " +- +- mac +- +- mac +- +- +- +- +- org.fusesource.hawtjni +- maven-hawtjni-plugin +- +- +- osname=MacOS;processor=x86-64 +- osname=MacOS;processor=x86 +- osname=MacOS;processor=PowerPC +- * +- +- +- --with-universal +- +- osx +- +- +- +- +- +- +- + + diff --git a/Formula/g/groovysdk.rb b/Formula/g/groovysdk.rb new file mode 100644 index 0000000000000..ae92d222e6b83 --- /dev/null +++ b/Formula/g/groovysdk.rb @@ -0,0 +1,41 @@ +class Groovysdk < Formula + desc "SDK for Groovy: a Java-based scripting language" + homepage "https://www.groovy-lang.org/" + url "https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/apache-groovy-sdk-4.0.26.zip" + sha256 "8fb9e2e14621ea93b1f4d56859a034bca2f28b0dad36a9f528fa23a3603fba6f" + license "Apache-2.0" + + livecheck do + url "https://groovy.apache.org/download.html" + regex(/href=.*?apache-groovy-sdk[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a9c17b629d23fde4101a454445cab31c9e49a4c02e94df28b8d692094552a09" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a9c17b629d23fde4101a454445cab31c9e49a4c02e94df28b8d692094552a09" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4a9c17b629d23fde4101a454445cab31c9e49a4c02e94df28b8d692094552a09" + sha256 cellar: :any_skip_relocation, sonoma: "ab654d4dc0713f847e624ba123156703e4fb60a85e1da7312e7a65186a71aa1b" + sha256 cellar: :any_skip_relocation, ventura: "ab654d4dc0713f847e624ba123156703e4fb60a85e1da7312e7a65186a71aa1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a9c17b629d23fde4101a454445cab31c9e49a4c02e94df28b8d692094552a09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a9c17b629d23fde4101a454445cab31c9e49a4c02e94df28b8d692094552a09" + end + + depends_on "openjdk" + + conflicts_with "groovy", because: "both install the same binaries" + + def install + # We don't need Windows' files. + rm(Dir["bin/*.bat"]) + + bin.install Dir["bin/*"] + libexec.install "conf", "lib", "src", "doc" + bin.env_script_all_files libexec/"bin", + GROOVY_HOME: libexec, + JAVA_HOME: "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" + end + + test do + system bin/"grape", "install", "org.activiti", "activiti-engine", "5.16.4" + end +end diff --git a/Formula/g/grpc.rb b/Formula/g/grpc.rb new file mode 100644 index 0000000000000..e4bcfe2318a24 --- /dev/null +++ b/Formula/g/grpc.rb @@ -0,0 +1,114 @@ +class Grpc < Formula + desc "Next generation open source RPC library and framework" + homepage "https://grpc.io/" + url "https://github.com/grpc/grpc.git", + tag: "v1.72.0", + revision: "6c472088f7ced709efac16bf41d399c7ad6f1a44" + license "Apache-2.0" + head "https://github.com/grpc/grpc.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 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 arm64_sequoia: "71fe86a77d05a7368fdd2a1f53867afcc2c64151aba56274d867af273bce1541" + sha256 arm64_sonoma: "c92e09672fc7c0f2da7b00afd690aa593f4b414aae108acbd0649a8ad4f58321" + sha256 arm64_ventura: "7a5d14b5a62d039cf0516ac880f46e547bc689b739e3b5eb09a6cbf642d92fa2" + sha256 cellar: :any, sonoma: "9cfdf66271545a4fd86ae85a196de8485fd52ce6abc4ac39829def4ac4f534ff" + sha256 cellar: :any, ventura: "f6ace4ae0e675e7e7d46816b278c95003b467452c9f3398c769822b78d7dfea5" + sha256 cellar: :any_skip_relocation, arm64_linux: "61cb190cb71aefa2cf1cec922204d6150f8a17a65bd54e74538329632a9b0fc3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db69323ca3a5ad3a1f7e463e313cb2f701e75be9f9c6f4c44f4d826c8354190b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cmake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :test + depends_on "abseil" + depends_on "c-ares" + depends_on "openssl@3" + depends_on "protobuf" + depends_on "re2" + + 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 "Requires C++17 features not yet implemented" + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100) + args = %W[ + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_CXX_STANDARD_REQUIRED=TRUE + -DCMAKE_INSTALL_RPATH=#{rpath} + -DBUILD_SHARED_LIBS=ON + -DgRPC_BUILD_TESTS=OFF + -DgRPC_INSTALL=ON + -DgRPC_ABSL_PROVIDER=package + -DgRPC_CARES_PROVIDER=package + -DgRPC_PROTOBUF_PROVIDER=package + -DgRPC_SSL_PROVIDER=package + -DgRPC_ZLIB_PROVIDER=package + -DgRPC_RE2_PROVIDER=package + ] + linker_flags = [] + linker_flags += %w[-undefined dynamic_lookup] if OS.mac? + args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,#{linker_flags.join(",")}" if linker_flags.present? + system "cmake", "-S", ".", "-B", "_build", *args, *std_cmake_args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # The following are installed manually, so need to use CMAKE_*_LINKER_FLAGS + # TODO: `grpc_cli` is a huge pain to install. Consider removing it. + linker_flags += %W[-rpath #{rpath} -rpath #{rpath(target: HOMEBREW_PREFIX/"lib")}] + args = %W[ + -DCMAKE_EXE_LINKER_FLAGS=-Wl,#{linker_flags.join(",")} + -DCMAKE_SHARED_LINKER_FLAGS=-Wl,#{linker_flags.join(",")} + -DBUILD_SHARED_LIBS=ON + -DgRPC_BUILD_TESTS=ON + -DgRPC_ABSL_PROVIDER=package + -DgRPC_CARES_PROVIDER=package + -DgRPC_PROTOBUF_PROVIDER=package + -DgRPC_SSL_PROVIDER=package + -DgRPC_ZLIB_PROVIDER=package + -DgRPC_RE2_PROVIDER=package + ] + system "cmake", "-S", ".", "-B", "_build-grpc_cli", *args, *std_cmake_args + system "cmake", "--build", "_build-grpc_cli", "--target", "grpc_cli" + bin.install "_build-grpc_cli/grpc_cli" + lib.install (buildpath/"_build-grpc_cli").glob(shared_library("libgrpc++_test_config", "*")) + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + grpc_init(); + grpc_shutdown(); + return GRPC_STATUS_OK; + } + CPP + ENV.prepend_path "PKG_CONFIG_PATH", Formula["openssl@3"].opt_lib/"pkgconfig" + flags = shell_output("pkgconf --cflags --libs libcares protobuf re2 grpc++").chomp.split + system ENV.cc, "test.cpp", "-L#{Formula["abseil"].opt_lib}", *flags, "-o", "test" + system "./test" + + output = shell_output("#{bin}/grpc_cli ls localhost:#{free_port} 2>&1", 1) + assert_match "Received an error when querying services endpoint.", output + end +end diff --git a/Formula/g/grpc@1.54.rb b/Formula/g/grpc@1.54.rb new file mode 100644 index 0000000000000..bacd0da1ec562 --- /dev/null +++ b/Formula/g/grpc@1.54.rb @@ -0,0 +1,109 @@ +class GrpcAT154 < Formula + desc "Next generation open source RPC library and framework" + homepage "https://grpc.io/" + # TODO: Check if we can use unversioned `protobuf` at version bump + url "https://github.com/grpc/grpc.git", + tag: "v1.54.3", + revision: "868412b573a0663c8db41558498caf44098f4390" + license "Apache-2.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sonoma: "cf92a1cc58e01fea2cc5344d1bf56cc4599a621a19221afefb973b8b54c8c324" + sha256 cellar: :any, arm64_ventura: "0631cf6a63fca83abd8ff53b0a41811957c8efaf7a422a9f1987f5ee2fa4f88e" + sha256 cellar: :any, arm64_monterey: "b757a9ba28c98f1a0b2190c4fd8d30fd578b8024271295dda9940494a7184eb4" + sha256 cellar: :any, arm64_big_sur: "56e870bfa7c06a1726ffd4661f1d7a7e74fe9688b80544a44244262b40e64e3a" + sha256 cellar: :any, sonoma: "381a3af7f47c997510798e7e4636ef9ccfb54247661fa46759ba0d3ea2be4290" + sha256 cellar: :any, ventura: "8d73e997bc07465c96293af80e0530efdeaa92efe93fbb4bf73953895780e0ca" + sha256 cellar: :any, monterey: "3452857ae337fc8dfd15501a3794638692afb3f416643c072f966aa2ad76d755" + sha256 cellar: :any, big_sur: "6217233621ae1a4e337f64f5f6e0b7202e45266bddec1d33b13f272dd9675659" + sha256 cellar: :any_skip_relocation, x86_64_linux: "28d7467fb3e8243d7981ad883cc4a9838d477da3fd4b3e5cdbafb9b30ea84e7f" + end + + keg_only :versioned_formula + + disable! date: "2024-10-31", because: :versioned_formula + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cmake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :test + depends_on "abseil" + depends_on "c-ares" + depends_on "openssl@3" + depends_on "protobuf@21" + depends_on "re2" + + 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 "Requires C++17 features not yet implemented" + end + + def install + ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100) + mkdir "cmake/build" do + args = %W[ + ../.. + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_CXX_STANDARD_REQUIRED=TRUE + -DCMAKE_INSTALL_RPATH=#{rpath} + -DBUILD_SHARED_LIBS=ON + -DgRPC_BUILD_TESTS=OFF + -DgRPC_INSTALL=ON + -DgRPC_ABSL_PROVIDER=package + -DgRPC_CARES_PROVIDER=package + -DgRPC_PROTOBUF_PROVIDER=package + -DgRPC_SSL_PROVIDER=package + -DgRPC_ZLIB_PROVIDER=package + -DgRPC_RE2_PROVIDER=package + ] + std_cmake_args + + system "cmake", *args + system "make", "install" + + args = %W[ + ../.. + -DCMAKE_INSTALL_RPATH=#{rpath} + -DBUILD_SHARED_LIBS=ON + -DgRPC_BUILD_TESTS=ON + ] + std_cmake_args + system "cmake", *args + system "make", "grpc_cli" + bin.install "grpc_cli" + lib.install Dir[shared_library("libgrpc++_test_config", "*")] + + if OS.mac? + # These are installed manually, so need to be relocated manually as well + MachO::Tools.add_rpath(bin/"grpc_cli", rpath) + MachO::Tools.add_rpath(lib/shared_library("libgrpc++_test_config"), rpath) + end + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + grpc_init(); + grpc_shutdown(); + return GRPC_STATUS_OK; + } + CPP + ENV.prepend_path "PKG_CONFIG_PATH", lib/"pkgconfig" + ENV.prepend_path "PKG_CONFIG_PATH", Formula["protobuf@21"].opt_lib/"pkgconfig" + ENV.prepend_path "PKG_CONFIG_PATH", Formula["openssl@3"].opt_lib/"pkgconfig" + pkg_config_flags = shell_output("pkg-config --cflags --libs libcares protobuf re2 grpc++").chomp.split + system ENV.cc, "test.cpp", "-L#{Formula["abseil"].opt_lib}", *pkg_config_flags, "-o", "test" + system "./test" + + output = shell_output("#{bin}/grpc_cli ls localhost:#{free_port} 2>&1", 1) + assert_match "Received an error when querying services endpoint.", output + end +end diff --git a/Formula/g/grpcui.rb b/Formula/g/grpcui.rb new file mode 100644 index 0000000000000..ea1de00fbdc9f --- /dev/null +++ b/Formula/g/grpcui.rb @@ -0,0 +1,34 @@ +class Grpcui < Formula + desc "Interactive web UI for gRPC, along the lines of postman" + homepage "https://github.com/fullstorydev/grpcui" + url "https://github.com/fullstorydev/grpcui/archive/refs/tags/v1.4.3.tar.gz" + sha256 "7fa3039bfa6c06a688c1094177445f759c592be2f04574a234da7a88ab2d0efd" + license "MIT" + head "https://github.com/fullstorydev/grpcui.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ac35799e9b7d1c2a6c9eb8b1672f10ba975d0e32efe2665de2ecdc55d10ceeb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ac35799e9b7d1c2a6c9eb8b1672f10ba975d0e32efe2665de2ecdc55d10ceeb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9ac35799e9b7d1c2a6c9eb8b1672f10ba975d0e32efe2665de2ecdc55d10ceeb" + sha256 cellar: :any_skip_relocation, sonoma: "ba7e1920f634f492ee2b36de11763a0dc3b3f16e6c4691ef66bf5d1a6c651a30" + sha256 cellar: :any_skip_relocation, ventura: "ba7e1920f634f492ee2b36de11763a0dc3b3f16e6c4691ef66bf5d1a6c651a30" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a604659d4ba4f40852cc1d2b7924e0540f3e59f9f5628472826dfc6b0022dde" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/grpcui" + end + + test do + host = "no.such.host.dev" + output = shell_output("#{bin}/grpcui #{host}:999 2>&1", 1) + assert_match(/Failed to dial target host "#{Regexp.escape(host)}:999":.*: no such host/, output) + end +end diff --git a/Formula/g/grpcurl.rb b/Formula/g/grpcurl.rb new file mode 100644 index 0000000000000..acf6177a56618 --- /dev/null +++ b/Formula/g/grpcurl.rb @@ -0,0 +1,34 @@ +class Grpcurl < Formula + desc "Like cURL, but for gRPC" + homepage "https://github.com/fullstorydev/grpcurl" + url "https://github.com/fullstorydev/grpcurl/archive/refs/tags/v1.9.3.tar.gz" + sha256 "bb555087f279af156159c86d4d3d5dd3f2991129e4cd6b09114e6851a679340d" + license "MIT" + head "https://github.com/fullstorydev/grpcurl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0b6be18c234287de07dc328bcf18ab337dc9b89a477e20110546d7615bd31815" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0b6be18c234287de07dc328bcf18ab337dc9b89a477e20110546d7615bd31815" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0b6be18c234287de07dc328bcf18ab337dc9b89a477e20110546d7615bd31815" + sha256 cellar: :any_skip_relocation, sonoma: "73e6d2427885ab08ae862f8e43be8b3d988917a1fdc722026cdd587be1629d1e" + sha256 cellar: :any_skip_relocation, ventura: "73e6d2427885ab08ae862f8e43be8b3d988917a1fdc722026cdd587be1629d1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "14e2492169d85b40c8251c3ca7891c58d35f2f12cd781b720c29582573e12c9a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/grpcurl" + end + + test do + (testpath/"test.proto").write <<~PROTO + syntax = "proto3"; + package test; + message HelloWorld { + string hello_world = 1; + } + PROTO + system bin/"grpcurl", "-msg-template", "-proto", "test.proto", "describe", "test.HelloWorld" + end +end diff --git a/Formula/g/grsync.rb b/Formula/g/grsync.rb new file mode 100644 index 0000000000000..5885717cb25f9 --- /dev/null +++ b/Formula/g/grsync.rb @@ -0,0 +1,52 @@ +class Grsync < Formula + desc "GUI for rsync" + homepage "https://www.opbyte.it/grsync/" + url "https://downloads.sourceforge.net/project/grsync/grsync-1.3.1.tar.gz" + sha256 "33cc0e25daa62e5ba7091caea3c83a8dc74dc5d7721c4501d349f210c4b3c6d3" + license "GPL-2.0-only" + revision 1 + + bottle do + sha256 arm64_sequoia: "7acba4db4f6cd2ad09e1cffff1f7c0d24c46cbc611c8ed9c7e78a604b746b2cf" + sha256 arm64_sonoma: "abf6159ff6f8b96053d162b2022ed8609af8c059c79348ae5557c28afeecc562" + sha256 arm64_ventura: "3330a2f548559889d4d2cc138d79e5bd39f00aea3c14525912fd5f6c1c20136d" + sha256 arm64_monterey: "adb21b8016cdf6604a4d2ab0a8231769c08c19eb59f030e45229397f8bb71560" + sha256 sonoma: "17172832ac98aded38af454786303dc8f9d3b61e90470a4330a7774ae5885dd4" + sha256 ventura: "2049a7ee4bb92a609351d65b0c16adc5bee3f81cdfa580ade205dfcef48d8b4d" + sha256 monterey: "e6eb367af3e6e6cd9d08aeb7089bf2842422c9c727df241f11fce7a2239a3d64" + sha256 arm64_linux: "855b9f2180841ac05b112906346852effcaf37d1e0ccdfc11b6561f947da4a85" + sha256 x86_64_linux: "e69fa72c81515369642531c0e5fc7febe6953d082721eb5b1e839c0f7a72a597" + end + + depends_on "intltool" => :build + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "glib" + depends_on "gtk+3" + depends_on "pango" + + uses_from_macos "perl" => :build + + on_macos do + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "harfbuzz" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + system "./configure", "--disable-unity", *std_configure_args + chmod "+x", "install-sh" + system "make", "install" + end + + test do + # running the executable always produces the GUI, which is undesirable for the test + # so we'll just check if the executable exists + assert_path_exists bin/"grsync" + end +end diff --git a/Formula/g/grt.rb b/Formula/g/grt.rb new file mode 100644 index 0000000000000..e7ebc43b52624 --- /dev/null +++ b/Formula/g/grt.rb @@ -0,0 +1,44 @@ +class Grt < Formula + desc "Gesture Recognition Toolkit for real-time machine learning" + homepage "https://nickgillian.com/grt/" + url "https://github.com/nickgillian/grt/archive/refs/tags/v0.2.4.tar.gz" + sha256 "55bcabe7a58916461dc4341758eff2a45bd5b236c263dfe6e58c176c1a7e1ac4" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "074ba306d1024617ace8a0f056a9c55cf8cdb53ede10471eb77eeab5435f6e6d" + sha256 cellar: :any, arm64_sonoma: "4fb256ad0e810c361d218210ba816f27e7f36d0b03547dba8a503d804c7928d3" + sha256 cellar: :any, arm64_ventura: "b6aa8b0ecb30a18b3a1ddeb21a08f9b7aa12226bea2174a5bfce165e1e56e477" + sha256 cellar: :any, arm64_monterey: "a875908262d55401a19c3f03fc58c6c44aaa380a3f28c7d0c7686bf3226e33b5" + sha256 cellar: :any, arm64_big_sur: "e7fb295223786373ecfb9a7bfd323b234a2c9034f9fc2f4705ff1209be93dcfb" + sha256 cellar: :any, sonoma: "6cbbeba38afd1267c3db39c759771e7a58d28a82eeaac6c3e90e0bba92185f02" + sha256 cellar: :any, ventura: "bc61d78a6e3788cfbd018970acdcb4d60bcf7b66da889c5dd908dcda2e701d1a" + sha256 cellar: :any, monterey: "91ca908ff9c97a1cc86b8899d97e7f4d97d1d0a0dcbf959bd8f6d2a44ed04ce3" + sha256 cellar: :any, big_sur: "1d4777cee44f7b99247cc34cda090ca59e720a14f20b9d2336d21e06bc309d4a" + sha256 cellar: :any, catalina: "35705ad1d151228e4e8c647cf16fc5b7578b4b777c54e94ebbcc8e19d26bd1f5" + sha256 cellar: :any, mojave: "830332fffbe52f7eb282eca343977fa27e4ae4978bc9f409df264cba5f37e38c" + sha256 cellar: :any, high_sierra: "d5a55b3a6b4ca75d3ef37ba47f43ed033215e0d9b5f5a26f738e484f3e428667" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e0eeec38e25fa39e7e63c6e2a3a740e088522c789c77ea3361b5d6d7fd30e9f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9faf092937716c46062df1823e3af440e986eba4d3de6a965fbedd619b4e43e" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", "build", "-B", "_build", "-DBUILD_TESTS=OFF", "-DBUILD_EXAMPLES=OFF", *std_cmake_args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + GRT::GestureRecognitionPipeline pipeline; + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", "-lgrt", "-o", "test" + system "./test" + end +end diff --git a/Formula/g/grunt-cli.rb b/Formula/g/grunt-cli.rb new file mode 100644 index 0000000000000..9c08c3dbc27b0 --- /dev/null +++ b/Formula/g/grunt-cli.rb @@ -0,0 +1,51 @@ +class GruntCli < Formula + desc "JavaScript Task Runner" + homepage "https://gruntjs.com/" + url "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.5.0.tgz" + sha256 "4f7f52cf9f3bc62ebc7ae60d2db5c7f896cb0915ad1202dab9285d6117d7536d" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6623c9c49be25c0d046324eae90919e3360542d69f9cf921b3cc47a44573c984" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2dd1c3cbca5634e0af5e6f0cdecde2700c3b28fef7995b59527cbc225cc133a7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2dd1c3cbca5634e0af5e6f0cdecde2700c3b28fef7995b59527cbc225cc133a7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2dd1c3cbca5634e0af5e6f0cdecde2700c3b28fef7995b59527cbc225cc133a7" + sha256 cellar: :any_skip_relocation, sonoma: "be6201a69eafbd7b9d93fa919cd410dc0c8e03eef63f686836690fdee13b9fe0" + sha256 cellar: :any_skip_relocation, ventura: "be6201a69eafbd7b9d93fa919cd410dc0c8e03eef63f686836690fdee13b9fe0" + sha256 cellar: :any_skip_relocation, monterey: "be6201a69eafbd7b9d93fa919cd410dc0c8e03eef63f686836690fdee13b9fe0" + sha256 cellar: :any_skip_relocation, arm64_linux: "7cfb7579ba83a114818c2ef065a534f5d237cbd21b3be57d73063e5763addaa8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9383dff764eb6833c08ecf8ac67a869c40c5830ec27471577094357feabac56" + 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": "grunt-homebrew-test", + "version": "1.0.0", + "devDependencies": { + "grunt": ">=0.4.0" + } + } + JSON + + (testpath/"Gruntfile.js").write <<~JAVASCRIPT + module.exports = function(grunt) { + grunt.registerTask("default", "Write output to file.", function() { + grunt.file.write("output.txt", "Success!"); + }) + }; + JAVASCRIPT + + system "npm", "install", *std_npm_args(prefix: false) + system bin/"grunt" + assert_path_exists testpath/"output.txt", "output.txt was not generated" + end +end diff --git a/Formula/g/grunt-completion.rb b/Formula/g/grunt-completion.rb new file mode 100644 index 0000000000000..0ad7e4afcf5e4 --- /dev/null +++ b/Formula/g/grunt-completion.rb @@ -0,0 +1,22 @@ +class GruntCompletion < Formula + desc "Bash and Zsh completion for Grunt" + homepage "https://gruntjs.com/" + url "https://github.com/gruntjs/grunt-cli/archive/refs/tags/v1.5.0.tar.gz" + sha256 "0ed2f1bbe6ba85c5b2b3ae1233c52b7622db092c078aafbba75dbb435a6a9d20" + license "MIT" + head "https://github.com/gruntjs/grunt-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "4b46d9b78c7353cfdc7dcea3a0009d9799ac6281b32484fca512db71258a23e5" + end + + def install + bash_completion.install "completion/bash" => "grunt" + zsh_completion.install "completion/zsh" => "_grunt" + end + + test do + assert_match "-F _grunt_completions", + shell_output("bash -c 'source #{bash_completion}/grunt && complete -p grunt'") + end +end diff --git a/Formula/g/grype.rb b/Formula/g/grype.rb new file mode 100644 index 0000000000000..d4ff8e4d56638 --- /dev/null +++ b/Formula/g/grype.rb @@ -0,0 +1,33 @@ +class Grype < Formula + desc "Vulnerability scanner for container images and filesystems" + homepage "https://github.com/anchore/grype" + url "https://github.com/anchore/grype/archive/refs/tags/v0.92.0.tar.gz" + sha256 "f336e844721f78b928399e1b7b0bc11d1e8f7b9a20daf22b4ff6959b8197be14" + license "Apache-2.0" + head "https://github.com/anchore/grype.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0e74e1f2e5aa5d26cd7b6ed307f615cae6582808fc0f93d0ac830843f9861032" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "583d5c0bc185b6deae2b523c5276a0e227bb646ba1ee4659d937374e4468bc33" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7dd68f51b91e125dcc609b497db0c1bffb7c688fa4501288250264ff6cc55254" + sha256 cellar: :any_skip_relocation, sonoma: "24537105269f8fd964bbff9690f2a1f2dd0616081c3259e35b8d2b9f0a9fd4fc" + sha256 cellar: :any_skip_relocation, ventura: "7110d2834d7bedfa1bba16a4a2731c81829d63b332a116b0e3ff9c286ca3c5df" + sha256 cellar: :any_skip_relocation, arm64_linux: "c851832f9731eb851726eab281a27cb7c9889c3b52173e29290c1782ca205346" + sha256 cellar: :any_skip_relocation, x86_64_linux: "613b7b4064281666ce5128ec9f5780b1fa14fc1845e2d02d5d73af55e01770d5" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.gitCommit=#{tap.user} -X main.buildDate=#{time.iso8601}" + system "go", "build", *std_go_args(ldflags:), "./cmd/grype" + + generate_completions_from_executable(bin/"grype", "completion") + end + + test do + assert_match "database does not exist", shell_output("#{bin}/grype db status 2>&1", 1) + assert_match "update to the latest db", shell_output("#{bin}/grype db check", 100) + assert_match version.to_s, shell_output("#{bin}/grype version 2>&1") + end +end diff --git a/Formula/g/gsan.rb b/Formula/g/gsan.rb new file mode 100644 index 0000000000000..602706feb8759 --- /dev/null +++ b/Formula/g/gsan.rb @@ -0,0 +1,75 @@ +class Gsan < Formula + include Language::Python::Virtualenv + + desc "Extract subdomains from SSL certificates in HTTPS sites" + homepage "https://franccesco.github.io/getaltname/" + url "https://files.pythonhosted.org/packages/73/0c/1fc5a29ae79fd74f0fd54d2c4d487b8cf7b21ede08efe99a6c39977816c6/gsan-5.0.0.tar.gz" + sha256 "2418a6897b0eb1c6eb44c3521ccc5c69a811071f864b8001fd9699a4d2f4c9e3" + license "MIT" + head "https://github.com/franccesco/getaltname.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b5f3b8889010acbfe378e95593bfc2757db482894a47bbfb1dd6d76c1cd8be8f" + end + + depends_on "cryptography" + depends_on "python@3.13" + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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 "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + 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/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/c1/d4/1067b82c4fc674d6f6e9e8d26b3dff978da46d351ca3bac171544693e085/pyopenssl-24.3.0.tar.gz" + sha256 "49f7a019577d834746bc55c5fce6ecbcec0f2b4ec5ce1cf43a9a173b8138bb36" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + 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/cb/ce/dca7b219718afd37a0068f4f2530a727c2b74a8b6e8e0c0080a4c0de4fcd/typer-0.15.1.tar.gz" + sha256 "a0588c0a7fa68a1978a069818657778f86abe6ff5ea6abf472f940a08bfe4f0a" + 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 + end + + test do + assert_match(/google.com \[\d+\]/, shell_output("#{bin}/gsan google.com")) + end +end diff --git a/Formula/g/gsar.rb b/Formula/g/gsar.rb new file mode 100644 index 0000000000000..88583bc6806aa --- /dev/null +++ b/Formula/g/gsar.rb @@ -0,0 +1,42 @@ +class Gsar < Formula + desc "General Search And Replace on files" + homepage "https://tjaberg.com/" + url "https://tjaberg.com/gsar151.zip" + version "1.51" + sha256 "72908ae302d2293de5218fd4da0b98afa2ce8890a622e709360576e93f5e8cc8" + license "GPL-2.0-only" + + # gsar archive file names don't include a version string with dots (e.g., 123 + # instead of 1.23), so we identify versions from the text of the "Changes" + # section. + livecheck do + url :homepage + regex(/gsar v?(\d+(?:\.\d+)+) released/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b42feea06c9d194323f2917165a2dd23e1100cd27e51194f379bbf3920c5d0ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5dd43f9ab3392a433d2fccb9c9a45e75f76b5bcb2e68b57d5e6145630bcdff8e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2259d416f5a0fa7f855879195ab6ff9855c0d9c4786522311abaa058e90fa798" + sha256 cellar: :any_skip_relocation, arm64_monterey: "68051084dfbefccd95074b0e7cf9316fe916bd23e452a8c018b83c2aa185c0e7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "86de578de3d7754f9f3b6f3f092a262e32e2621f240105a8e983ce2b2afe4f7c" + sha256 cellar: :any_skip_relocation, sonoma: "134cf018983cff2de6c78f4b8261891a23587de341183aa3ba78c410d565d771" + sha256 cellar: :any_skip_relocation, ventura: "101d468b37350873bfee957164379ee006a8f8947577d88c580e0ed4f2041197" + sha256 cellar: :any_skip_relocation, monterey: "7b479c3f3d2d9ab12bacd67ae0792472f803f1c59ea65b1c180bba9c9e8cdbeb" + sha256 cellar: :any_skip_relocation, big_sur: "8bd2f9e7a24ec476fd8ae541dbeb60d1a5b93cc48790d28059d43fad27295581" + sha256 cellar: :any_skip_relocation, catalina: "6bba5adb80da7941b6a6a62015eae1ad8d6e27a11678a2d966ca0699ac05eae2" + sha256 cellar: :any_skip_relocation, mojave: "c3bf2fcc08cefb75fb0c8cae257f0b70f85172093649e065860324db6338f43a" + sha256 cellar: :any_skip_relocation, arm64_linux: "526b7939e186719e844042d86fb134a945e8e243ca556ec0e23045d2dd087b8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "160d27dd1c5497302c7249adb93a43cdb81669cdf5d01a23405adf42d5af16f4" + end + + def install + system "make" + bin.install "gsar" + end + + test do + assert_match "1 occurrence changed", + shell_output("#{bin}/gsar -sCourier -rMonaco #{test_fixtures("test.ps")} new.ps") + end +end diff --git a/Formula/g/gsasl.rb b/Formula/g/gsasl.rb new file mode 100644 index 0000000000000..85616668b2df0 --- /dev/null +++ b/Formula/g/gsasl.rb @@ -0,0 +1,33 @@ +class Gsasl < Formula + desc "SASL library command-line interface" + homepage "https://www.gnu.org/software/gsasl/" + url "https://ftp.gnu.org/gnu/gsasl/gsasl-2.2.2.tar.gz" + mirror "https://ftpmirror.gnu.org/gsasl/gsasl-2.2.2.tar.gz" + sha256 "41e8e442648eccaf6459d9ad93d4b18530b96c8eaf50e3f342532ef275eff3ba" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "f7ec07e3b1add0e32af563452c3f8ebf2317b3acad6b6a48b029dd72491354ab" + sha256 arm64_sonoma: "be4ad77df9264e1dbcd61df831870348ef3f0f7033f59c201f60ca78b8f5b608" + sha256 arm64_ventura: "9abcebd5e9da69094251b1d2de7434c3d97cc502bcf18406e5689bfb9ad166cc" + sha256 sonoma: "f8b9c8e586b6e83810512a0feb031b2b1a16f181c3c06b3a223ba7463dca256d" + sha256 ventura: "7915a31160f8bc10fe820d2e00e885d422af7b81d1c3b9f47c6c290083020635" + sha256 arm64_linux: "653c99b1e92e213c8f3d2a479bc24fa7db0b6d7a13e00110470f02b331412f92" + sha256 x86_64_linux: "e617b7fd6c52d487cdd7e33f6ade76b2fa98499605192cd1420c06fa5b3218ae" + end + + depends_on "libgcrypt" + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--with-gssapi-impl=mit", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/gsasl --version") + end +end diff --git a/Formula/g/gsettings-desktop-schemas.rb b/Formula/g/gsettings-desktop-schemas.rb new file mode 100644 index 0000000000000..dc91f26ddbfff --- /dev/null +++ b/Formula/g/gsettings-desktop-schemas.rb @@ -0,0 +1,48 @@ +class GsettingsDesktopSchemas < Formula + desc "GSettings schemas for desktop components" + homepage "https://download.gnome.org/sources/gsettings-desktop-schemas/" + url "https://download.gnome.org/sources/gsettings-desktop-schemas/48/gsettings-desktop-schemas-48.0.tar.xz" + sha256 "e68f155813bf18f865a8b2c8e9d473588b6ccadcafbb666ab788857c6c2d1bd3" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "28388575b4cdde9dbca9351e2589c4445e531fb7e4fa43905d96d3d89dd78d29" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "28388575b4cdde9dbca9351e2589c4445e531fb7e4fa43905d96d3d89dd78d29" + sha256 cellar: :any_skip_relocation, arm64_ventura: "28388575b4cdde9dbca9351e2589c4445e531fb7e4fa43905d96d3d89dd78d29" + sha256 cellar: :any_skip_relocation, sonoma: "28388575b4cdde9dbca9351e2589c4445e531fb7e4fa43905d96d3d89dd78d29" + sha256 cellar: :any_skip_relocation, ventura: "28388575b4cdde9dbca9351e2589c4445e531fb7e4fa43905d96d3d89dd78d29" + sha256 cellar: :any_skip_relocation, arm64_linux: "961057773b8eaa48b7a348fc0ac5ce5d14f8caa7785dc64bfb162b35e93e3bf3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "961057773b8eaa48b7a348fc0ac5ce5d14f8caa7785dc64bfb162b35e93e3bf3" + end + + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "glib" + + 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 + # manual schema compile step + system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + return 0; + } + C + system ENV.cc, "-I#{HOMEBREW_PREFIX}/include/gsettings-desktop-schemas", "test.c", "-o", "test" + system "./test" + end +end diff --git a/Formula/g/gsl.rb b/Formula/g/gsl.rb new file mode 100644 index 0000000000000..f1ac0bb7bfddb --- /dev/null +++ b/Formula/g/gsl.rb @@ -0,0 +1,30 @@ +class Gsl < Formula + desc "Numerical library for C and C++" + homepage "https://www.gnu.org/software/gsl/" + url "https://ftp.gnu.org/gnu/gsl/gsl-2.8.tar.gz" + mirror "https://ftpmirror.gnu.org/gsl/gsl-2.8.tar.gz" + sha256 "6a99eeed15632c6354895b1dd542ed5a855c0f15d9ad1326c6fe2b2c9e423190" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "52e3fe781b19bd2d88986005309b2d81a2af60d17a8b3dbc3d5cad4ae2c78858" + sha256 cellar: :any, arm64_sonoma: "b5cd011cc1f8ac606487224628d21247cbe290b4a035f844ab016088c82bbdf7" + sha256 cellar: :any, arm64_ventura: "5a197c4ee1e19b629de8203c0e365c7df8293c0d83cdadb38282baa2cceb926b" + sha256 cellar: :any, arm64_monterey: "3b13e8f79478d63845e9f2e0f4e6b09dee7b7c139f9a789a87a1250a6e989da0" + sha256 cellar: :any, sonoma: "a955529c333b0d646bdc2ea92c821b5280d2451090e999e159e78e6d274a24a0" + sha256 cellar: :any, ventura: "0b59031c0d9af903b2c1fc50e98022199a802ce5e44ad554a81bf763a2748806" + sha256 cellar: :any, monterey: "0d90b773e23b6892e7c90a6a7a1cd9bc8b647f50abcf5e39adc520af9ee7d93b" + sha256 cellar: :any_skip_relocation, arm64_linux: "8c55a27d42637c2063546598efe69937d9b926b760598e326fb035938f64fe57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7fb92934fa28882ef82232f29289132270d1de558d75452644668a8fdcd630a" + end + + def install + system "./configure", *std_configure_args.reject { |s| s["--disable-debug"] } + system "make" + system "make", "install" + end + + test do + system bin/"gsl-randist", "0", "20", "cauchy", "30" + end +end diff --git a/Formula/g/gsmartcontrol.rb b/Formula/g/gsmartcontrol.rb new file mode 100644 index 0000000000000..0514ae3f557ed --- /dev/null +++ b/Formula/g/gsmartcontrol.rb @@ -0,0 +1,63 @@ +class Gsmartcontrol < Formula + desc "Graphical user interface for smartctl" + homepage "https://gsmartcontrol.shaduri.dev/" + url "https://downloads.sourceforge.net/project/gsmartcontrol/2.0.2/gsmartcontrol-2.0.2.tar.gz" + sha256 "7cebd83fd34883d51e143389aa88f8173ea7b67c760b12b7de847f3c3c8cee34" + license any_of: ["GPL-2.0-only", "GPL-3.0-only"] + + bottle do + sha256 arm64_sequoia: "fec689ece510c21ae0589fce4d135a403f7b59904e2fd565d00079a21d3cf2e2" + sha256 arm64_sonoma: "dfb1e49374740cbeb2392d5b645e12df3669389f45e575eae5114cf2bbd89f4b" + sha256 arm64_ventura: "06c41cd9e482c9477e5e06131536cd9b678d52bf4e547cfc48414eb645ec4fd0" + sha256 sonoma: "3c772fa791354268934693ea60962ffbe839ca07219b9a69925e7bd862d0ff61" + sha256 ventura: "244de0b2b1617a8a7f71210230f94fd32d3f77a87745a4e3a893e6621e1da4f2" + sha256 arm64_linux: "5213f0cf402797e0e3d08a4ed283272fa701bf0ff1a876b468eedf4489464086" + sha256 x86_64_linux: "6cd4fa97e19fee44f12fe02e4d7edf882c098c80d83472d036d61f8e730c7b81" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "atkmm@2.28" + depends_on "cairo" + depends_on "cairomm@1.14" + depends_on "glib" + depends_on "glibmm@2.66" + depends_on "gtk+3" + depends_on "gtkmm3" + depends_on "libsigc++@2" + depends_on "pangomm@2.46" + depends_on "smartmontools" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1500 + + depends_on "at-spi2-core" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "harfbuzz" + depends_on "pango" + depends_on "pcre2" + end + + fails_with :clang do + build 1500 + cause "Requires C++20 support" + end + + fails_with :gcc do + version "10" + cause "Requires C++20" + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system sbin/"gsmartcontrol", "--version" + end +end diff --git a/Formula/g/gsoap.rb b/Formula/g/gsoap.rb new file mode 100644 index 0000000000000..91c9b87dc3182 --- /dev/null +++ b/Formula/g/gsoap.rb @@ -0,0 +1,49 @@ +class Gsoap < Formula + desc "SOAP stub and skeleton compiler for C and C++" + homepage "https://www.genivia.com/products.html" + url "https://downloads.sourceforge.net/project/gsoap2/gsoap_2.8.138.zip" + sha256 "5ddd63eebd6a08e1838e93400a843975c65ae77e09a95276f9adf166d3ca6f74" + # Parts of the software are alternatively licensed under gSOAP-1.3b, but this + # license is considered non-free by Debian and Fedora due to section 3.2: + # + # 3.2. Availability of Source Code. + # Any Modification created by You will be provided to the Initial Developer in + # Source Code form and are subject to the terms of the License. + # + # Ref: https://salsa.debian.org/ellert/gsoap/-/blob/master/debian/copyright#L7-26 + license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } + + livecheck do + url :stable + regex(%r{url=.*?/gsoap[._-]v?(\d+(?:\.\d+)+)\.zip}i) + end + + bottle do + sha256 arm64_sequoia: "dd050b688db6f6dc0afb179015be76a256a2d91fbee487bf7ad06756e9838752" + sha256 arm64_sonoma: "5181ef3b7f16cec46e7a951898d42cfe01a1d424ca742752aeb7a9832ed80485" + sha256 arm64_ventura: "0c002ce067077f15d7aa1571866ca07dc4cd1c183019364bc87bfdc203440a29" + sha256 sonoma: "ec9100abcefd7e4de6675a1f142db49da2a5f558c8dfb48a588a32add9e762eb" + sha256 ventura: "6d51669692bf617de0ae562d380c1d1b545bc99609db68bffbf004b1e1fbccba" + sha256 arm64_linux: "d85ffb3b69c1b3256cf621553c02b2230e2d93500d4965c887f65bd1198f93a3" + sha256 x86_64_linux: "d4ace7c9b06feba5c0780ca342cf53daf8efb0eac45017ee02f8bdb469dac04a" + end + + depends_on "autoconf" => :build + depends_on "openssl@3" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "zlib" + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make" + system "make", "install" + end + + test do + system bin/"wsdl2h", "-o", "calc.h", "https://www.genivia.com/calc.wsdl" + system bin/"soapcpp2", "calc.h" + assert_path_exists testpath/"calc.add.req.xml" + end +end diff --git a/Formula/g/gspell.rb b/Formula/g/gspell.rb new file mode 100644 index 0000000000000..af1a0d960780a --- /dev/null +++ b/Formula/g/gspell.rb @@ -0,0 +1,71 @@ +class Gspell < Formula + desc "Flexible API to implement spellchecking in GTK+ applications" + homepage "https://gitlab.gnome.org/GNOME/gspell" + url "https://download.gnome.org/sources/gspell/1.14/gspell-1.14.0.tar.xz" + sha256 "64ea1d8e9edc1c25b45a920e80daf67559d1866ffcd7f8432fecfea6d0fe8897" + license "LGPL-2.1-or-later" + revision 3 + + bottle do + sha256 arm64_sequoia: "7be7549f59cefa28a9820aa692e61beae5ac3907c00f405312ecd18ed13f657c" + sha256 arm64_sonoma: "956f9e9bba4d346b611b2ace7494592c26b764073c6063e453facb94973ecb12" + sha256 arm64_ventura: "ae7078de1e4777703851e5f72fe339feb3306b55c93ddd5446da1aac4c0fe6b8" + sha256 sonoma: "7f0f171e26e6a956b23b54bcfdb47665a763999ac1dade0011899664aafc977f" + sha256 ventura: "2dec4a4e7abf1ccd9564cc91b1259a0896f854f809d5cb0271982a77e4b83050" + sha256 arm64_linux: "74ee2677d98ec0caffe66e3989f73977065f2d2ae6ae198c36a2f535bd31ef20" + sha256 x86_64_linux: "65b869605e06e7571c5e74776a815949afa4acf36185a0fee15c008db1979f60" + 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 "at-spi2-core" + depends_on "cairo" + depends_on "enchant" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "pango" + + on_macos do + depends_on "gettext" + end + + def install + args = %w[ + -Dgtk_doc=false + -Dtests=false + -Dinstall_tests=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.c").write <<~C + #include + + int main(int argc, char *argv[]) { + const GList *list = gspell_language_get_available(); + return 0; + } + C + + icu4c = deps.map(&:to_formula).find { |f| f.name.match?(/^icu4c@\d+$/) } + ENV.prepend_path "PKG_CONFIG_PATH", icu4c.opt_lib/"pkgconfig" + flags = shell_output("pkgconf --cflags --libs gspell-1").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + ENV["G_DEBUG"] = "fatal-warnings" + + # This test will fail intentionally when iso-codes gets updated. + # Resolve by increasing the `revision` on this formula. + system "./test" + end +end diff --git a/Formula/g/gssdp.rb b/Formula/g/gssdp.rb new file mode 100644 index 0000000000000..b9f3f461c1656 --- /dev/null +++ b/Formula/g/gssdp.rb @@ -0,0 +1,57 @@ +class Gssdp < Formula + desc "GUPnP library for resource discovery and announcement over SSDP" + homepage "https://wiki.gnome.org/GUPnP/" + url "https://download.gnome.org/sources/gssdp/1.6/gssdp-1.6.3.tar.xz" + sha256 "2fedb5afdb22cf14d5498a39a773ca89788a250fcf70118783df821e1f3f3446" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "97111b046784bdbc49f2216a33602e3a5081c79371e4c25388f99f82a7c9cff5" + sha256 cellar: :any, arm64_sonoma: "1883e3ff3aabb0e94c3655d0730c9ef57197e179882fce345968718d9d706b05" + sha256 cellar: :any, arm64_ventura: "6780845ffd82b7162e83933d15c02a40f14173c46c42aaa3048c78a368741173" + sha256 cellar: :any, arm64_monterey: "90ce94882c16fabbcae645e03ac1f1e4653e05e71ff79847d4849ede89ec13d4" + sha256 cellar: :any, sonoma: "6d12bf3d48221158ae35d8f121ecf5a6ab1a255ce7cd8db2c212c99da44d4f17" + sha256 cellar: :any, ventura: "e26411028be8edf072f647c9c8dd4fb7929c2aea8aa46940d70c36bb26f71d21" + sha256 cellar: :any, monterey: "dc149d84e33f123c18e0a11858b16672f802bdef637d6f27322e310a23d7f237" + sha256 arm64_linux: "64ce3b6210ac63feee5c6f88f773afa9f2c1b7bd7ce4b2e819affa74a61c2bc0" + sha256 x86_64_linux: "1fdb4562ada9ffb0252f97fe765ce023d2530ff2528e4237cace63a29f75688a" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pandoc" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + depends_on "glib" + depends_on "libsoup" + + uses_from_macos "python" => :build + + on_macos do + depends_on "gettext" + end + + def install + ENV.prepend_path "XDG_DATA_DIRS", HOMEBREW_PREFIX/"share" + + system "meson", "setup", "build", "-Dsniffer=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[]) { + GType type = gssdp_client_get_type(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gssdp-1.6").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gssh.rb b/Formula/g/gssh.rb new file mode 100644 index 0000000000000..c8ccdf5e542fd --- /dev/null +++ b/Formula/g/gssh.rb @@ -0,0 +1,55 @@ +class Gssh < Formula + desc "SSH automation tool based on Groovy DSL" + homepage "https://gradle-ssh-plugin.github.io/" + url "https://github.com/int128/groovy-ssh/archive/refs/tags/2.11.2.tar.gz" + sha256 "0e078b37fe1ba1a9ca7191e706818e3b423588cac55484dda82dbbd1cdfe0b24" + license "Apache-2.0" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "908725192316eb3e9c9d54688d6233261998fc248c0196d5c518fc504ee5ec79" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fee6aa3a10a6bc1427d48fcd271b055a8c7f4f7fedc7164519e2be8b7aa81b98" + sha256 cellar: :any_skip_relocation, arm64_ventura: "701b4eb639074e1e7b39d3358531836bf142f3751123145e701aaa71fd17cb03" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3f5ed2374501abd977eb5c67490489ebe7354094c48f878d01543bd3d69a8782" + sha256 cellar: :any_skip_relocation, sonoma: "966fffd78fe61b7292a4141678a84e3a700a9388ecb2ab04ef2daba8220ccc5f" + sha256 cellar: :any_skip_relocation, ventura: "2b1130e6167fd512b87c843e1ebe20830b95bb21e98469cd681a944897300c61" + sha256 cellar: :any_skip_relocation, monterey: "1b51f981f8523077dbc4ac4269267ef57fc4c38d3c015bac0e14e1f612044f16" + sha256 cellar: :any_skip_relocation, arm64_linux: "80e5fade9eca898a2d7d3179b753757926e102a9cc08ba3c9868132b816b72e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db58030c9483c22ecde1258a00dd0bd3f1da7649e1114178e0495e0195296ef6" + end + + depends_on "gradle" => :build + depends_on "openjdk@21" + + # gradle 8 build patch, remove in next release + patch :DATA + + def install + ENV["CIRCLE_TAG"] = version + ENV["GROOVY_SSH_VERSION"] = version + system "gradle", "shadowJar", "--no-daemon" + libexec.install "cli/build/libs/gssh.jar" + bin.write_jar_script libexec/"gssh.jar", "gssh", java_version: "21" + end + + test do + assert_match "groovy-ssh-#{version}", shell_output("#{bin}/gssh --version") + end +end + +__END__ +diff --git a/cli/build.gradle b/cli/build.gradle +index 8044c6e..e6c2815 100644 +--- a/cli/build.gradle ++++ b/cli/build.gradle +@@ -32,7 +32,7 @@ jar { + } + + shadowJar { +- baseName = 'gssh' +- classifier = '' +- version = '' ++ archiveBaseName = 'gssh' ++ archiveVersion = '' ++ archiveClassifier = '' + } diff --git a/Formula/g/gstreamer.rb b/Formula/g/gstreamer.rb new file mode 100644 index 0000000000000..e8c148bdb7b8b --- /dev/null +++ b/Formula/g/gstreamer.rb @@ -0,0 +1,324 @@ +class Gstreamer < Formula + desc "Development framework for multimedia applications" + homepage "https://gstreamer.freedesktop.org/" + license all_of: ["LGPL-2.0-or-later", "LGPL-2.1-or-later", "MIT"] + + stable do + url "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.26.1/gstreamer-1.26.1.tar.bz2" + sha256 "4ef9885d3e1e366ba6400e5bbc39228cf1ee3619cbc5c17295b86901879c105f" + + # When updating this resource, use the tag that matches the GStreamer version. + resource "rs" do + url "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/archive/gstreamer-1.26.1/gst-plugins-rs-gstreamer-1.26.1.tar.bz2" + sha256 "a3a65363cb5addc87918eb56e837740f077842ef95d0db2296159a0cad3523f8" + + livecheck do + formula :parent + end + end + end + + livecheck do + url "https://gstreamer.freedesktop.org/src/gstreamer/" + regex(/href=.*?gstreamer[._-]v?(\d+\.\d*[02468](?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "ed81e3cb4bc2dc80f6cd7e0200df0a9de9c6ff610ceec01bef615a4813d47fb2" + sha256 arm64_sonoma: "ac317c901604ed40ff2c366ad0072dd17146273af06d5246b4fb12f5ae9c71f7" + sha256 arm64_ventura: "f6f7249e9298afab0c420b9d508fb057eda61e444666adec2153cbd94af3d57d" + sha256 sonoma: "b66228ea4e50d15ee1767a59ef374bdeff5aadb5806669dfae5b00a6205d105f" + sha256 ventura: "6bf802620b0b5d00379407b695fad4bb61c1f14449a9c8cd16cd3d9742be84c4" + sha256 arm64_linux: "83b6b8e873f8218902efe7b67a0e2153df109879762774d8e66a860cfd92072e" + sha256 x86_64_linux: "69ab9ecce839e04132c3903022de3372763474182f198a70b677b7a64f373d8f" + end + + head do + url "https://gitlab.freedesktop.org/gstreamer/gstreamer.git", branch: "main" + + resource "rs" do + url "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git", branch: "main" + end + end + + depends_on "bison" => :build + depends_on "cargo-c" => :build + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "nasm" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "aom" + depends_on "cairo" + depends_on "dav1d" + depends_on "faac" + depends_on "faad2" + depends_on "fdk-aac" + depends_on "ffmpeg" + depends_on "flac" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "graphene" + depends_on "gtk+3" + depends_on "gtk4" + depends_on "imath" + depends_on "jpeg-turbo" + depends_on "json-glib" + depends_on "lame" + depends_on "libass" + depends_on "libnice" + depends_on "libogg" + depends_on "libpng" + depends_on "libshout" + depends_on "libsndfile" + depends_on "libsodium" + depends_on "libsoup" # no linkage on Linux as dlopen'd + depends_on "libusrsctp" + depends_on "libvorbis" + depends_on "libvpx" + depends_on "libx11" + depends_on "libxcb" + depends_on "libxext" + depends_on "libxfixes" + depends_on "libxi" + depends_on "libxtst" + depends_on "little-cms2" + depends_on "mpg123" + depends_on "nettle" + depends_on "opencore-amr" + depends_on "openexr" + depends_on "openjpeg" + depends_on "openssl@3" + depends_on "opus" + depends_on "orc" + depends_on "pango" + depends_on "pygobject3" + depends_on "python@3.13" + depends_on "rtmpdump" + depends_on "speex" + depends_on "srt" + depends_on "srtp" + depends_on "svt-av1" + depends_on "taglib" + depends_on "theora" + depends_on "webp" + depends_on "x264" + depends_on "x265" + + uses_from_macos "flex" => :build + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + # musepack is not bottled on Linux + # https://github.com/Homebrew/homebrew-core/pull/92041 + depends_on "musepack" + end + + on_linux do + depends_on "alsa-lib" + depends_on "libdrm" + depends_on "libva" + depends_on "libxdamage" + depends_on "libxv" + depends_on "mesa" + depends_on "pulseaudio" + depends_on "wayland" + end + + def python3 + which("python3.13") + end + + # These paths used to live in various `gst-*` formulae. + link_overwrite "bin/gst-*", "lib/ligst*", "lib/libges*", "lib/girepository-1.0/Gst*-1.0.typelib" + link_overwrite "lib/girepository-1.0/GES-1.0.typelib", "lib/gst-validate-launcher/*", "lib/gstreamer-1.0/*" + link_overwrite "lib/pkgconfig/gst*.pc", "lib/python3.13/site-packages/gi/overrides/*", "include/gstreamer-1.0/*" + link_overwrite "share/gir-1.0/Gst*.gir", "share/gir-1.0/GES-1.0.gir", "share/gstreamer-1.0/*" + link_overwrite "share/locale/*/LC_MESSAGES/gst-*.mo", "share/man/man1/g*" + + # Avoid overlinking of `gst-python` python extension module. + # https://gitlab.freedesktop.org/gstreamer/gst-python/-/merge_requests/41 + # TODO: Migrate patch to gstreamer monorepo. + patch :DATA + + def install + odie "rs resource needs to be updated" if build.stable? && version != resource("rs").version + + (buildpath/"subprojects/gst-plugins-rs").install resource("rs") + + site_packages = Language::Python.site_packages(python3) + # To pass arguments to subprojects (e.g. `gst-editing-services`), use + # -Dsubproject:option=value + args = %W[ + -Dpython.platlibdir=#{site_packages} + -Dpython.purelibdir=#{site_packages} + -Dpython=enabled + -Dlibav=enabled + -Dlibnice=disabled + -Dbase=enabled + -Dgood=enabled + -Dugly=enabled + -Dbad=enabled + -Ddevtools=enabled + -Dges=enabled + -Drtsp_server=enabled + -Drs=enabled + -Dtls=enabled + -Dqt5=disabled + -Dtools=enabled + -Dorc-source=system + -Dgpl=enabled + -Dtests=disabled + -Dexamples=disabled + -Dnls=enabled + -Dorc=enabled + -Ddoc=disabled + -Dgtk_doc=disabled + -Dintrospection=enabled + -Dpackage-origin=#{tap.default_remote} + -Dgst-devtools:validate=enabled + -Dgst-devtools:cairo=enabled + -Dgst-editing-services:pygi-overrides-dir=#{site_packages}/gi/overrides + -Dgst-python:pygi-overrides-dir=#{site_packages}/gi/overrides + -Dgst-python:python=#{python3} + -Dgst-plugins-bad:opencv=disabled + -Dgst-plugins-bad:sctp=enabled + -Dgst-plugins-bad:sctp-internal-usrsctp=disabled + -Dgst-plugins-good:soup=enabled + -Dgst-plugins-rs:closedcaption=enabled + -Dgst-plugins-rs:dav1d=enabled + -Dgst-plugins-rs:sodium=enabled + -Dgst-plugins-rs:csound=disabled + -Dgst-plugins-rs:gtk4=enabled + -Dgst-plugins-rs:sodium-source=system + ] + + # The apple media plug-in uses API that was added in Mojave + args << "-Dgst-plugins-bad:applemedia=disabled" if OS.mac? && MacOS.version <= :high_sierra + + # Ban trying to chown to root. + # https://bugzilla.gnome.org/show_bug.cgi?id=750367 + args << "-Dgstreamer:ptp-helper-permissions=none" + + # Prevent the build from downloading an x86-64 version of bison. + args << "-Dbuild-tools-source=system" + + # Set `RPATH` since `cargo-c` doesn't seem to. + # https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/279 + plugin_dir = lib/"gstreamer-1.0" + rpath_args = [loader_path, rpath(source: plugin_dir)].map { |path| "-rpath,#{path}" } + ENV.append "RUSTFLAGS", "--codegen link-args=-Wl,#{rpath_args.join(",")}" + + # On Linux, adjust processing of RUSTFLAGS to avoid using shlex, which may mangle our + # RPATH-related flags, due to the presence of `$` in $ORIGIN. + if OS.linux? + wrapper_files = %w[ + subprojects/gst-plugins-rs/cargo_wrapper.py + subprojects/gst-devtools/dots-viewer/cargo_wrapper.py + ] + inreplace wrapper_files do |s| + s.gsub!(/shlex\.split\(env\.get\(("RUSTFLAGS"|'RUSTFLAGS'), (""|'')\)\)/, + "' '.split(env.get(\"RUSTFLAGS\", \"\"))") + s.gsub! "shlex_join(rust_flags)", "' '.join(rust_flags)" + end + end + + # Make sure the `openssl-sys` crate uses our OpenSSL. + ENV["OPENSSL_NO_VENDOR"] = "1" + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def post_install + # Support finding the `libnice` plugin, which is in a separate formula. + # Needs to be done in `post_install`, since bottling prunes this symlink. + libnice_gst_plugin = Formula["libnice-gstreamer"].opt_libexec/"gstreamer-1.0"/shared_library("libgstnice") + gst_plugin_dir = lib/"gstreamer-1.0" + ln_sf libnice_gst_plugin.relative_path_from(gst_plugin_dir), gst_plugin_dir + end + + def caveats + <<~EOS + All gst-* GStreamer plugins are now bundled in this formula. + For GStreamer to find your own plugins, add their paths to `GST_PLUGIN_PATH`. + For example, if you have plugins in `~/.local/lib/gstreamer-1.0`: + export GST_PLUGIN_PATH="~/.local/lib/gstreamer-1.0" + + Do not install plugins into GStreamer's prefix. They will be deleted + by `brew upgrade`. + EOS + end + + test do + # TODO: Improve test according to suggestions at + # https://github.com/orgs/Homebrew/discussions/3740 + system bin/"gst-validate-launcher", "--usage" + + system python3, "-c", <<~PYTHON + import gi + gi.require_version('Gst', '1.0') + from gi.repository import Gst + print (Gst.Fraction(num=3, denom=5)) + PYTHON + + # FIXME: The initial plugin load takes a long time without extra permissions on + # macOS, which frequently causes the slower Intel macOS runners to time out. + # Need to allow a longer timeout or see if CI terminal can be made a developer tool. + # + # Ref: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1119 + skip_plugins = OS.mac? && Hardware::CPU.intel? && ENV["HOMEBREW_GITHUB_ACTIONS"] + ENV["GST_PLUGIN_SYSTEM_PATH"] = testpath if skip_plugins + + assert_match(/^Total count: \d+ plugin/, shell_output(bin/"gst-inspect-1.0")) + return if skip_plugins + + system bin/"ges-launch-1.0", "--ges-version" + system bin/"gst-inspect-1.0", "libav" + system bin/"gst-inspect-1.0", "--plugin", "dvbsuboverlay" + system bin/"gst-inspect-1.0", "--plugin", "fdkaac" + system bin/"gst-inspect-1.0", "--plugin", "volume" + system bin/"gst-inspect-1.0", "--plugin", "cairo" + system bin/"gst-inspect-1.0", "--plugin", "dvdsub" + system bin/"gst-inspect-1.0", "--plugin", "x264" + system bin/"gst-inspect-1.0", "--plugin", "rtspclientsink" + system bin/"gst-inspect-1.0", "--plugin", "rsfile" + system bin/"gst-inspect-1.0", "hlsdemux2" + end +end + +__END__ +diff --git a/subprojects/gst-python/gi/overrides/meson.build b/subprojects/gst-python/gi/overrides/meson.build +index 20aeb06ac9..3c53eab6d7 100644 +--- a/subprojects/gst-python/gi/overrides/meson.build ++++ b/subprojects/gst-python/gi/overrides/meson.build +@@ -7,9 +7,11 @@ python.install_sources(pysources, + host_system = host_machine.system() + if host_system == 'windows' + gst_dep_for_gi = gst_dep ++ python_ext_dep = python_dep + else + gst_dep_for_gi = gst_dep.partial_dependency(compile_args: true, includes: true, sources: true) + gstanalytics_dep_for_gi = gstbad_dep.partial_dependency(compile_args:true, includes:true, sources:true) ++ python_ext_dep = python_dep.partial_dependency(compile_args: true) + endif + + gstpython = python.extension_module('_gi_gst', +@@ -18,7 +20,7 @@ gstpython = python.extension_module('_gi_gst', + install_dir : pygi_override_dir, + install_tag: 'python-runtime', + include_directories : [configinc], +- dependencies : [gst_dep_for_gi, python_dep, pygobject_dep], ++ dependencies : [gst_dep_for_gi, python_ext_dep, pygobject_dep], + ) + + env = environment() diff --git a/Formula/g/gti.rb b/Formula/g/gti.rb new file mode 100644 index 0000000000000..f98b4926a6698 --- /dev/null +++ b/Formula/g/gti.rb @@ -0,0 +1,34 @@ +class Gti < Formula + desc "ASCII-art displaying typo-corrector for commands" + homepage "https://r-wos.org/hacks/gti" + url "https://github.com/rwos/gti/archive/refs/tags/v1.9.1.tar.gz" + sha256 "f8a3afdd3967fe7d88bd1b0b9f5cb62ae04dc9ba458238da91efc213f61a9cf9" + license "MIT" + head "https://github.com/rwos/gti.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3f8050edc162e75b939fece0bc60b6aecfca2c5e38e0259085731a8a69e6ac13" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1446d1aac84e5119614a6bbfd66171910abc23826d06754d3319142ca0ec7f63" + sha256 cellar: :any_skip_relocation, arm64_ventura: "61791d20101f0ccaaf39d73a13da70f7ea88589b0eb7b0badbabd03719ebf24a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f5e4bd49913f7b31c872610abfde90700828d3235962c5c961f4b42138fa8e31" + sha256 cellar: :any_skip_relocation, sonoma: "11055e312584cca72aa358c1cc27ea9bc4d76bdb5f5f030ce3633cf6fc994f17" + sha256 cellar: :any_skip_relocation, ventura: "e9086b3d38889bfc0562db4390b3a0f692fd1d2a5324daee6e29c75cc2c8f161" + sha256 cellar: :any_skip_relocation, monterey: "6167571b70f956b1740a421b75c7e190dbfb1f5654f76563e81d748693803d2a" + sha256 cellar: :any_skip_relocation, arm64_linux: "86c9c281f743ac0808f749dfff7744cc6c4aa72ed6cc450fc0ad324dc3e0f815" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca34ee86c2f431b36b38d90251d42b6e68b52cb506d8f5197c4cfc1f807fe718" + end + + def install + system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" + bin.install "gti" + man6.install "gti.6" + + bash_completion.install "completions/gti.bash" => "gti" + zsh_completion.install "completions/gti.zsh" => "_gti" + end + + test do + system bin/"gti", "init" + assert_path_exists testpath/".git" + end +end diff --git a/Formula/g/gtk+.rb b/Formula/g/gtk+.rb new file mode 100644 index 0000000000000..67b983c9cc51f --- /dev/null +++ b/Formula/g/gtk+.rb @@ -0,0 +1,131 @@ +class Gtkx < Formula + desc "GUI toolkit" + homepage "https://gtk.org/" + url "https://download.gnome.org/sources/gtk+/2.24/gtk+-2.24.33.tar.xz" + sha256 "ac2ac757f5942d318a311a54b0c80b5ef295f299c2a73c632f6bfb1ff49cc6da" + license "LGPL-2.0-or-later" + revision 2 + + # From https://blog.gtk.org/2020/12/16/gtk-4-0/: + # "It does mean, however, that GTK 2 has reached the end of its life. + # We will do one final 2.x release in the coming days, and we encourage + # everybody to port their GTK 2 applications to GTK 3 or 4." + # + # TODO: Deprecate and remove livecheck once `gtk+` has no active dependents + livecheck do + skip "GTK 2 was declared end of life in 2020-12" + end + + bottle do + sha256 arm64_sonoma: "659b62a2677b7e945221ab78abfab6919d7a4ac7c635de52417ab96eb4970a92" + sha256 arm64_ventura: "140729098a62031c80b8e43c29314f84a5d0152b1348612f83d01331251ba02c" + sha256 arm64_monterey: "88b226c05abe1a848ee8ab7d98e7b0388383b3cdd003dff8448aa9d1901202c3" + sha256 sonoma: "2f73f9eafd45eef1e37f3e795d1cb086988fcba1cc374be9c4bc124744bc561a" + sha256 ventura: "e1724dfbff3e12dfc41c91d4ea850c52fbc716d30cae80308f55afaeaa887e42" + sha256 monterey: "29944de5a2598f393c086c1b9284dee31f94309826780204065d91de38c0a14d" + sha256 arm64_linux: "2738367a37a58ce253544f191877c5b653c3f6db7cbe3fd5ed3b3288b3bd243f" + sha256 x86_64_linux: "a73d8262778cf3541249d2ce04dbe9c2e545cc46401c695a77a893f812f35920" + end + + depends_on "gobject-introspection" => :build + # error: 'CGWindowListCreateImage' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead + # NOTE: We could potentially use an older deployment target; however, `gtk+` has been EOL since 2020. + # So rather than trying to workaround obsolete APIs, the limit is a deadline to deprecate `gtk+` and dependents. + depends_on maximum_macos: [:sonoma, :build] + depends_on "pkgconf" => [:build, :test] + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "hicolor-icon-theme" + depends_on "pango" + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "fontconfig" + depends_on "libx11" + depends_on "libxcomposite" + depends_on "libxcursor" + depends_on "libxdamage" + depends_on "libxext" + depends_on "libxfixes" + depends_on "libxinerama" + depends_on "libxrandr" + depends_on "libxrender" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + # Patch to allow Eiffel Studio to run in Cocoa / non-X11 mode, as well as Freeciv's freeciv-gtk2 client + # See: + # - https://gitlab.gnome.org/GNOME/gtk/-/issues/580 + # referenced from + # - https://bugzilla.gnome.org/show_bug.cgi?id=757187 + # referenced from + # - https://bugzilla.gnome.org/show_bug.cgi?id=557780 + # - Homebrew/homebrew-games#278 + patch do + url "https://gitlab.gnome.org/GNOME/gtk/uploads/2a194d81de8e8346a81816870264b3bf/gdkimage.patch" + sha256 "ce5adf1a019ac7ed2a999efb65cfadeae50f5de8663638c7f765f8764aa7d931" + end + + def backend + backend = "quartz" + on_linux do + backend = "x11" + end + backend + end + + def install + # Work-around for build issue with Xcode 15.3 + if DevelopmentTools.clang_build_version >= 1500 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types -Wno-implicit-int" + end + + system "./configure", "--disable-silent-rules", + "--enable-static", + "--disable-glibtest", + "--enable-introspection=yes", + "--with-gdktarget=#{backend}", + "--disable-visibility", + *std_configure_args + system "make", "install" + + inreplace bin/"gtk-builder-convert", %r{^#!/usr/bin/env python$}, "#!/usr/bin/python" + + # Prevent a conflict between this and `gtk+3` + libexec.install bin/"gtk-update-icon-cache" + bin.install_symlink libexec/"gtk-update-icon-cache" => "gtk2-update-icon-cache" + end + + def caveats + <<~EOS + To avoid a conflict with `gtk+3` formula, `gtk-update-icon-cache` is installed at + #{opt_libexec}/gtk-update-icon-cache + A versioned symlink `gtk2-update-icon-cache` is linked for convenience. + EOS + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + GtkWidget *label = gtk_label_new("Hello World!"); + return 0; + } + C + flags = shell_output("pkgconf --cflags --libs gtk+-2.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gtk+3.rb b/Formula/g/gtk+3.rb new file mode 100644 index 0000000000000..be87f48847439 --- /dev/null +++ b/Formula/g/gtk+3.rb @@ -0,0 +1,115 @@ +class Gtkx3 < Formula + desc "Toolkit for creating graphical user interfaces" + homepage "https://gtk.org/" + url "https://download.gnome.org/sources/gtk+/3.24/gtk+-3.24.43.tar.xz" + sha256 "7e04f0648515034b806b74ae5d774d87cffb1a2a96c468cb5be476d51bf2f3c7" + license "LGPL-2.0-or-later" + + livecheck do + url :stable + regex(/gtk\+[._-](3\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "6aca43b89a0ea1d910a7a3e6ec9d17b387f562208880efb2d1e0671a691cf3ec" + sha256 arm64_sonoma: "6098a780bf4f51b57620d05a62e2318edc8b75ea7bedc67a9d28ad90e27651ef" + sha256 arm64_ventura: "b2cfc5ed7e889d29b2f7b49d78a87af0505dfceb5ccd76cd1c08af2bac5db44b" + sha256 sonoma: "c0efd3d0e28212aeb25189685cdfb5a3fbb85fabc4700abbf922706badd15e17" + sha256 ventura: "912e58bc9f73495c086de2b289dd69926be1b3403b22190009c608b00e604e02" + sha256 arm64_linux: "c46dbee2b057b33d65c345ddc7d9581ba9f585b177b30db73c3c1132f3ba10b8" + sha256 x86_64_linux: "8ebaea8114ba92ae5ce85c1b832912dcc6011bda220940255d65ef704a0cf83e" + end + + depends_on "docbook" => :build + depends_on "docbook-xsl" => :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 "at-spi2-core" + depends_on "cairo" + depends_on "fribidi" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gsettings-desktop-schemas" + depends_on "harfbuzz" + depends_on "hicolor-icon-theme" + depends_on "libepoxy" + depends_on "pango" + + uses_from_macos "libxslt" => :build # for xsltproc + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "cmake" => :build + + depends_on "fontconfig" + depends_on "iso-codes" + depends_on "libx11" + depends_on "libxdamage" + depends_on "libxext" + depends_on "libxfixes" + depends_on "libxi" + depends_on "libxinerama" + depends_on "libxkbcommon" + depends_on "libxrandr" + depends_on "wayland" + depends_on "wayland-protocols" + depends_on "xorgproto" + end + + def install + args = %w[ + -Dgtk_doc=false + -Dman=true + -Dintrospection=true + ] + + if OS.mac? + args << "-Dquartz_backend=true" + args << "-Dx11_backend=false" + end + + # ensure that we don't run the meson post install script + ENV["DESTDIR"] = "/" + + # Find our docbook catalog + 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" + + bin.install_symlink bin/"gtk-update-icon-cache" => "gtk3-update-icon-cache" + man1.install_symlink man1/"gtk-update-icon-cache.1" => "gtk3-update-icon-cache.1" + end + + def post_install + system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" + system bin/"gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" + system bin/"gtk-query-immodules-3.0 > #{HOMEBREW_PREFIX}/lib/gtk-3.0/3.0.0/immodules.cache" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + gtk_disable_setlocale(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gtk+-3.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + # include a version check for the pkg-config files + assert_match version.to_s, shell_output("cat #{lib}/pkgconfig/gtk+-3.0.pc").strip + end +end diff --git a/Formula/g/gtk-doc.rb b/Formula/g/gtk-doc.rb new file mode 100644 index 0000000000000..5f5e30c0b218e --- /dev/null +++ b/Formula/g/gtk-doc.rb @@ -0,0 +1,65 @@ +class GtkDoc < Formula + include Language::Python::Virtualenv + + desc "GTK+ documentation tool" + homepage "https://gitlab.gnome.org/GNOME/gtk-doc" + url "https://download.gnome.org/sources/gtk-doc/1.34/gtk-doc-1.34.0.tar.xz" + sha256 "b20b72b32a80bc18c7f975c9d4c16460c2276566a0b50f87d6852dff3aa7861c" + license "GPL-2.0-or-later" + + # We use a common regex because gtk-doc doesn't use GNOME's + # "even-numbered minor is stable" version scheme. + livecheck do + url :stable + regex(/gtk-doc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d1f93587b00c38082d46a918917df8b1be8af308f1da1ed220ec2dbeed5cbf52" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e793af38570706760f128a35323714530cd1a61e49a5be3aeb61d6a12c87026" + sha256 cellar: :any_skip_relocation, arm64_ventura: "62aab6d8c1b15f0aa75052aa3b928304aecdb39241e1c6c4e165b6436dcfc12d" + sha256 cellar: :any_skip_relocation, sonoma: "c48ba412d560fa2dab1af3f8ac98013d64e77d4ad1c47f46c9aae84fdc30cdc7" + sha256 cellar: :any_skip_relocation, ventura: "167239cb8ead5dcc2911212f63302b7af68d88ba38dc1996e24a9c1da8150bd8" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ae17097732d29e71de50c9e7d8113e76447bebd0d23d3cb2e475ef543d29313" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f1cee5eacdfd90a89dad5a1b9303442d97fdb170bf1014efbc323d49e292f59" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "docbook" + depends_on "docbook-xsl" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "lxml" do + url "https://files.pythonhosted.org/packages/ef/f6/c15ca8e5646e937c148e147244817672cf920b56ac0bf2cc1512ae674be8/lxml-5.3.1.tar.gz" + sha256 "106b7b5d2977b339f1e97efe2778e2ab20e99994cbb0ec5e55771ed0795920c8" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + def install + # To avoid recording pkg-config shims path + ENV.prepend_path "PATH", Formula["pkgconf"].bin + + venv = virtualenv_create(libexec, "python3.13") + venv.pip_install resources + ENV.prepend_path "PATH", libexec/"bin" + + system "meson", "setup", "build", "-Dtests=false", "-Dyelp_manual=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system bin/"gtkdoc-scan", "--module=test" + system bin/"gtkdoc-mkdb", "--module=test" + end +end diff --git a/Formula/g/gtk-gnutella.rb b/Formula/g/gtk-gnutella.rb new file mode 100644 index 0000000000000..29f65b80bdb6e --- /dev/null +++ b/Formula/g/gtk-gnutella.rb @@ -0,0 +1,50 @@ +class GtkGnutella < Formula + desc "Share files in a peer-to-peer (P2P) network" + homepage "https://gtk-gnutella.sourceforge.io/" + url "https://downloads.sourceforge.net/project/gtk-gnutella/gtk-gnutella/1.2.3/gtk-gnutella-1.2.3.tar.xz" + sha256 "dd4ba09de6ff7e928c746e6aaeb2fb6b023c7b3de4ad247ce9f0ee9ba0092ef0" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_sonoma: "e57c0c018e79c1ba6db7d5bfbf1603602d44e14b51e962f53770e8de3d557447" + sha256 arm64_ventura: "508241efd200736106a8cd21165d828864e7c81d3cc7a59926bc128f84c83b61" + sha256 arm64_monterey: "bc9a686696930b2a69a462eecac488fe117ef1bce25880dcfb8d120efaedc902" + sha256 sonoma: "ce5c4299b77ed4a296744c99138baee934ca0811b00a21731489945575639a8f" + sha256 ventura: "b4eef4214608d4cab4598555c39b3c9ef7c497724a5c2c06be09be9e62c0df00" + sha256 monterey: "1ddfae5d7de803aed743b7fc75bdafebb1fb2c0823784834142c0f7b579ea804" + sha256 arm64_linux: "26f18be0623e97f5f964f3b444ebe037c288bcf41dfd10f94e4dfcd4a44db08b" + sha256 x86_64_linux: "70a5946bf77166b5076fe6fa1d45b69c6f512260451c96758c4cde02fbb983df" + end + + depends_on "pkgconf" => :build + + depends_on "at-spi2-core" + depends_on "dbus" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+" + depends_on "pango" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + # Work-around for build issue with Xcode 15.3: https://sourceforge.net/p/gtk-gnutella/bugs/583/ + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + ENV.deparallelize + + system "./build.sh", "--prefix=#{prefix}", "--disable-nls" + system "make", "install" + rm_r(share/"pixmaps") + rm_r(share/"applications") + end + + test do + system bin/"gtk-gnutella", "--version" + end +end diff --git a/Formula/g/gtk-mac-integration.rb b/Formula/g/gtk-mac-integration.rb new file mode 100644 index 0000000000000..8c608bd479ae5 --- /dev/null +++ b/Formula/g/gtk-mac-integration.rb @@ -0,0 +1,69 @@ +class GtkMacIntegration < Formula + desc "Integrates GTK macOS applications with the Mac desktop" + homepage "https://www.gtk.org/docs/installations/macos" + url "https://download.gnome.org/sources/gtk-mac-integration/3.0/gtk-mac-integration-3.0.2.tar.xz" + sha256 "42f29e002365467eac10f4ba78435d4be785a947424d9890112c8c8d5e21be25" + license "LGPL-2.1-only" + + # We use a common regex because gtk-mac-integration doesn't use GNOME's + # "even-numbered minor is stable" version scheme. + livecheck do + url :stable + regex(/gtk-mac-integration[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "7ca343892d71cdb55caf11b1998168507845c155857f0064b5e5847352a8a233" + sha256 arm64_sonoma: "cf8e1ad3215498c4682d30479c1850a89e1fcf478d9b69004da3dd7105afff75" + sha256 arm64_ventura: "03dbfce85532960db4084577e2e3ad7d7b6f82975dc3edaf3d96435a83a79526" + sha256 sonoma: "ce981b3727a5b425b31d44a918d2a44bb49c159214b0e13bd5968c1c653438d1" + sha256 ventura: "38d4c1f561c9062c4a6cbd38e282c42ae7fd7a07612c3f3417038c101a3cc715" + end + + head do + url "https://gitlab.gnome.org/GNOME/gtk-mac-integration.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, :test] + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "glib" + depends_on "gtk+3" + depends_on "harfbuzz" + depends_on :macos + depends_on "pango" + + def install + configure = build.head? ? "./autogen.sh" : "./configure" + + system configure, "--disable-silent-rules", + "--without-gtk2", + "--with-gtk3", + "--enable-introspection=yes", + "--enable-python=no", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + gchar *bundle = gtkosx_application_get_bundle_path(); + return 0; + } + C + flags = shell_output("pkgconf --cflags --libs gtk-mac-integration-gtk3").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gtk-vnc.rb b/Formula/g/gtk-vnc.rb new file mode 100644 index 0000000000000..6cea66b04c54d --- /dev/null +++ b/Formula/g/gtk-vnc.rb @@ -0,0 +1,59 @@ +class GtkVnc < Formula + desc "VNC viewer widget for GTK" + homepage "https://gitlab.gnome.org/GNOME/gtk-vnc" + url "https://download.gnome.org/sources/gtk-vnc/1.5/gtk-vnc-1.5.0.tar.xz" + sha256 "c0beb4747528ad931da43acc567c6a0190f7fc624465571ed9ccece02c34dd23" + license "LGPL-2.1-or-later" + + # gtk-vnc doesn't use the usual "even-numbered minor is stable" GNOME version + # scheme, so we have to provide a regex to opt out of the `Gnome` strategy's + # version filtering (for now). + livecheck do + url :stable + regex(/gtk-vnc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "fcad7b12178c5357a8f917117a61c27b626a5adb7808a01eb87c2c68706734c5" + sha256 arm64_sonoma: "25240b02f2fb63bd13b44cc1e368a5fd67fc9e5cd607648de5382e3e6ddb531a" + sha256 arm64_ventura: "69e94775e32d33f8163d56fd7c07e82dc420a20243a9a43ae1789e6fc85060b1" + sha256 sonoma: "0d033e153eda743deb33774cce0ee4c7bc62adac58d207791938c5137b296bb5" + sha256 ventura: "fcc58bb4a4cf61e92eae7caece5eb1b6e0cba0810a88e27e9c8a3acdbd38d11b" + sha256 arm64_linux: "f028be663ad772594ce686693d21b3a9db365b9e794ddcb51ef13c8c760d2f99" + sha256 x86_64_linux: "24f2a0271895b80c2afacd6b00030879f0d04869b506c773e7688a5c16a12d32" + end + + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gmp" + depends_on "gnutls" + depends_on "gtk+3" + depends_on "libgcrypt" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "libx11" + end + + def install + system "meson", "setup", "build", "-Dwith-vala=disabled", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system bin/"gvnccapture", "--help" + end +end diff --git a/Formula/g/gtk4.rb b/Formula/g/gtk4.rb new file mode 100644 index 0000000000000..dbbfa9574aa16 --- /dev/null +++ b/Formula/g/gtk4.rb @@ -0,0 +1,119 @@ +class Gtk4 < Formula + desc "Toolkit for creating graphical user interfaces" + homepage "https://gtk.org/" + url "https://download.gnome.org/sources/gtk/4.18/gtk-4.18.5.tar.xz" + sha256 "bb5267a062f5936947d34c9999390a674b0b2b0d8aa3472fe0d05e2064955abc" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/gtk[._-](4\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "a24eb2e0972814018d8b7df4752fd0ad4e2e35ded2edd341075f7146e87db48f" + sha256 arm64_sonoma: "71ed52f780ffb00e494d389df7e6ea8ec6af86b490c3d6692d7515fbeee6ce92" + sha256 arm64_ventura: "7146c5646c0f083d298bd6e50d955a8ba68b4c38d4806d6d11d33e90702f9b5c" + sha256 sonoma: "3543d8f74c468d7d8b183bb1a4166df671594be3890d79a63873d86378893892" + sha256 ventura: "540518e3e5f28db0cc0c5f97d2aeb651d03fc38f6cafa8a6cd82281fac4e7160" + sha256 arm64_linux: "f98d60ba716d8cef10285e73c2b0d29cfd1eeeadbb551eb3ff382f8497847bf1" + sha256 x86_64_linux: "67270bcd26dc1e078d49f96c4d79b16b8dda34ca7638f47eeaeaec6aa0b559a3" + end + + depends_on "docbook" => :build + depends_on "docbook-xsl" => :build + depends_on "docutils" => :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 "sassc" => :build + depends_on "cairo" + depends_on "fontconfig" + depends_on "fribidi" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "graphene" + depends_on "harfbuzz" + depends_on "hicolor-icon-theme" + depends_on "jpeg-turbo" + depends_on "libepoxy" + depends_on "libpng" + depends_on "libtiff" + depends_on "pango" + + uses_from_macos "libxslt" => :build # for xsltproc + uses_from_macos "cups" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "wayland-protocols" => :build + depends_on "libx11" + depends_on "libxcursor" + depends_on "libxdamage" + depends_on "libxext" + depends_on "libxfixes" + depends_on "libxi" + depends_on "libxinerama" + depends_on "libxkbcommon" + depends_on "libxrandr" + depends_on "wayland" + end + + def install + args = %w[ + -Dbuild-examples=false + -Dbuild-tests=false + -Dintrospection=enabled + -Dman-pages=true + -Dmedia-gstreamer=disabled + -Dvulkan=disabled + ] + + if OS.mac? + args << "-Dx11-backend=false" + args << "-Dmacos-backend=true" + args << "-Dprint-cups=disabled" if MacOS.version <= :mojave + end + + # ensure that we don't run the meson post install script + ENV["DESTDIR"] = "/" + + # Find our docbook catalog + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + # Disable asserts and cast checks explicitly + ENV.append "CPPFLAGS", "-DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS" + + system "meson", "setup", "build", *args, *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 bin/"gtk4-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" + system "#{Formula["glib"].opt_bin}/gio-querymodules", "#{HOMEBREW_PREFIX}/lib/gtk-4.0/4.0.0/printbackends" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + gtk_disable_setlocale(); + return 0; + } + C + + flags = shell_output("#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs gtk4").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + # include a version check for the pkg-config files + assert_match version.to_s, shell_output("cat #{lib}/pkgconfig/gtk4.pc").strip + end +end diff --git a/Formula/g/gtkdatabox.rb b/Formula/g/gtkdatabox.rb new file mode 100644 index 0000000000000..7ce3709a83d15 --- /dev/null +++ b/Formula/g/gtkdatabox.rb @@ -0,0 +1,55 @@ +class Gtkdatabox < Formula + desc "Widget for live display of large amounts of changing data" + homepage "https://sourceforge.net/projects/gtkdatabox/" + url "https://downloads.sourceforge.net/project/gtkdatabox/gtkdatabox-1/gtkdatabox-1.0.0.tar.gz" + sha256 "8bee70206494a422ecfec9a88d32d914c50bb7a0c0e8fedc4512f5154aa9d3e3" + license "LGPL-2.1-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "5754a6b703bfc85c30adfe1f78b4f5e3416a4d9f04d9531d1c43fb584e136307" + sha256 cellar: :any, arm64_sonoma: "c4c95de47b74f0a924c88543dfbfc01999cf3491ce8bac5e77b0db2a265bb0e9" + sha256 cellar: :any, arm64_ventura: "058fb1cf99c7c1a34a9c7b81ebbb8720863009241ad47d69b47efb2f448ff84a" + sha256 cellar: :any, arm64_monterey: "1951c01226523dbbf91a85816a64fed3377b9c4fec4180536b608b93151eafb0" + sha256 cellar: :any, sonoma: "bfaacbe85617357013ed6368753b261bc87963366680eac5f73cf85183710f96" + sha256 cellar: :any, ventura: "7a86f4f2915d37de33ae84232fa05588e576a2e0698321501b3a75e0aedd9ace" + sha256 cellar: :any, monterey: "abc35085101b1fdde0163eb859927e6dcc35e2d38451d033b78206cb24814fa0" + sha256 cellar: :any_skip_relocation, arm64_linux: "60cc0df3c42c25bf990182f6a0e7655292bca03dfcf43821421d0e45a7b02b75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1585023f5e6799a8eab163fae37ba597262d3352a01f2bee7763359224f94388" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "cairo" + depends_on "glib" + depends_on "gtk+3" + depends_on "pango" + + on_macos do + depends_on "at-spi2-core" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + gtk_init(&argc, &argv); + GtkWidget *db = gtk_databox_new(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gtkdatabox").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + # Disable this part of test on Linux because display is not available. + system "./test" if OS.mac? + end +end diff --git a/Formula/g/gtkglext.rb b/Formula/g/gtkglext.rb new file mode 100644 index 0000000000000..8788bc7de5bad --- /dev/null +++ b/Formula/g/gtkglext.rb @@ -0,0 +1,167 @@ +class Gtkglext < Formula + desc "OpenGL extension to GTK+" + homepage "https://gitlab.gnome.org/Archive/gtkglext" + url "https://download.gnome.org/sources/gtkglext/1.2/gtkglext-1.2.0.tar.gz" + sha256 "e5073f3c6b816e7fa67d359d9745a5bb5de94a628ac85f624c992925a46844f9" + license "LGPL-2.1-or-later" + revision 4 + + bottle do + sha256 cellar: :any, arm64_sonoma: "dbda7d73cfcf8ff56426e761be3d928b47cc25142be9e436f29634f306ceb02d" + sha256 cellar: :any, arm64_ventura: "97c561405376a0e3f03d661edb63332c449464eca670d94d95276d7a16708ada" + sha256 cellar: :any, arm64_monterey: "4082e12c1b01e56342b49fb16241fb6e4e52b6c1f5691052b332f75b8892781f" + sha256 cellar: :any, sonoma: "ea372181dc03023ea581b14ca996646f6da8cdb54d81911f5b999281c70ecdd7" + sha256 cellar: :any, ventura: "986da9680b6032a4f4ae363e3c18176dce0bd276367e311c36b09494198d79d1" + sha256 cellar: :any, monterey: "6f045d38e2a584449fa6b5fc275f13b46bce7a4bd892219bb9dbe9bae44a9835" + sha256 arm64_linux: "8111b6fa90b879f9572ff71ebec5ff279bc5b4532c19f52331286f39783c04ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bea86597c739ebbf55d551970dee174085bfc3d0c4d70f06f0cce969979ef2af" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "glib" + depends_on "gtk+" + depends_on "pango" + + on_macos do + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + depends_on "libx11" + depends_on "mesa" + depends_on "mesa-glu" + + resource "pangox-compat" do + url "https://gitlab.gnome.org/Archive/pangox-compat/-/archive/0.0.2/pangox-compat-0.0.2.tar.gz" + sha256 "c8076b3d54d5088974dbb088a9d991686d7340f368beebaf437b78dfed6c5cd5" + + # Taken from https://aur.archlinux.org/cgit/aur.git/plain/0002-disable-shaper.patch?h=pangox-compat. + patch :DATA + end + end + + # All these MacPorts patches have already been included upstream. A new release + # of gtkglext for gtk+2.0 remains uncertain though. + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-configure.diff" + sha256 "aca35cd6ae28613b375301068715f82b59bd066a32b2f4d046177478950ab026" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-examples-pixmap-mixed.c.diff" + sha256 "d2fe00bfcf96b3c78dd4b01aa119a7860a34ca6080c57f0ccc7a8e2fc4a3c92b" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-examples-pixmap.c.diff" + sha256 "d955b18784d3e83c1f698e63875d98de5bad9eae1e84b66549dfe25d9ff94d51" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gdk-gdkglglext.h.diff" + sha256 "a1b6a97016013d5cda73760bbf2a970bae318153c2810291b81bd49ed67de80b" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gdk-gdkglquery.c.diff" + sha256 "a419b8d523f123d1ab59e4de1105cdfc72bf5a450db8031809dcbc84932b539f" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gdk-gdkglshapes.c.diff" + sha256 "bc01fccec833f7ede39ee06ecc2a2ad5d2b30cf703dc66d2a40a912104c6e1f5" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gdk-makefile.in.diff" + sha256 "d0bc857f258640bf4f423a79e8475e8cf86e24f9994c0a85475ce87f41bcded6" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gtk-gtkglwidget.c.diff" + sha256 "7f7918d5a83c8f36186026a92587117a94014e7b21203fe9eb96a1c751c3c317" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gtk-makefile.in.diff" + sha256 "49f58421a12c2badd84ae6677752ba9cc23c249dac81987edf94abaf0d088ff6" + end + + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-makefile.in.diff" + sha256 "0d112b417d6c51022e31701037aa49ea50f270d3a34c263599ac0ef64c2f6743" + end + + patch :p0 do + url "https://trac.macports.org/raw-attachment/ticket/56260/patch-index-gdkglshapes-osx.diff" + sha256 "699ddd676b12a6c087e3b0a7064cc9ef391eac3d84c531b661948bf1699ebcc5" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + unless OS.mac? + resource("pangox-compat").stage do + system "./autogen.sh" + system "./configure", "--prefix=#{libexec}" + system "make" + system "make", "install" + end + ENV.append_path "PKG_CONFIG_PATH", libexec/"lib/pkgconfig" + + system "autoreconf", "--force", "--install", "--verbose" + end + + args = [] + if OS.mac? + args << "--without-x" + # Fix flat_namespace usage + inreplace "configure", "${wl}-flat_namespace ${wl}-undefined ${wl}suppress", + "${wl}-undefined ${wl}dynamic_lookup" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + int version_check = GTKGLEXT_CHECK_VERSION(1, 2, 0); + return 0; + } + C + + ENV.append_path "PKG_CONFIG_PATH", libexec/"lib/pkgconfig" + flags = shell_output("pkgconf --cflags --libs gtkglext-1.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end + +__END__ +--- pangox-compat/pangox.c.orig 2020-05-04 18:31:53.421197064 -0400 ++++ pangox-compat/pangox.c 2020-05-04 18:32:41.251146923 -0400 +@@ -277,11 +277,11 @@ pango_x_font_class_init (PangoXFontClass + object_class->finalize = pango_x_font_finalize; + object_class->dispose = pango_x_font_dispose; + + font_class->describe = pango_x_font_describe; + font_class->get_coverage = pango_x_font_get_coverage; +- font_class->find_shaper = pango_x_font_find_shaper; ++ /* font_class->find_shaper = pango_x_font_find_shaper; */ + font_class->get_glyph_extents = pango_x_font_get_glyph_extents; + font_class->get_metrics = pango_x_font_get_metrics; + font_class->get_font_map = pango_x_font_get_font_map; + } diff --git a/Formula/g/gtkmm.rb b/Formula/g/gtkmm.rb new file mode 100644 index 0000000000000..da5d22c1c1f44 --- /dev/null +++ b/Formula/g/gtkmm.rb @@ -0,0 +1,64 @@ +class Gtkmm < Formula + desc "C++ interfaces for GTK+ and GNOME" + homepage "https://www.gtkmm.org/" + url "https://download.gnome.org/sources/gtkmm/2.24/gtkmm-2.24.5.tar.xz" + sha256 "0680a53b7bf90b4e4bf444d1d89e6df41c777e0bacc96e9c09fc4dd2f5fe6b72" + license "LGPL-2.1-or-later" + revision 9 + + livecheck do + url :stable + regex(/gtkmm[._-]v?(2\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "600f066eb0843c1af59bce66aa578afde52aa3a5754c42ed7b04445db839f837" + sha256 cellar: :any, arm64_ventura: "d664e40ad1a7d3e5dbb9dc05cb36d73f97e5bc4ab71747bf1b08c7d73abeae02" + sha256 cellar: :any, arm64_monterey: "08400aebd2786edc67d2d6118dd98ea5e3e44ab3269f6fc49a651c7bc29589c3" + sha256 cellar: :any, sonoma: "c4aeb2114cd8dc59900af9d10e65c026ff69f3ede03c18dbc1ea655f9f3fc612" + sha256 cellar: :any, ventura: "992c80fea122b473d7788fe6733423dc729282fcce37095b204d5363e08b701a" + sha256 cellar: :any, monterey: "dde66554a67d936733736fd0c92a372ea01f7fad3ff3407cd2ce516c1332de13" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ee8da8d884f6e6ef96f4088af2c27ed79d4d8067e527e3c57abd540006e9403" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0b8ee9aae96d13469d2ca251d59582d5577122d69769f9038e62b1792c08c861" + end + + depends_on "pkgconf" => [:build, :test] + + depends_on "atkmm@2.28" + depends_on "cairomm@1.14" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "glibmm@2.66" + depends_on "gtk+" + depends_on "libsigc++@2" + depends_on "pangomm@2.46" + + on_macos do + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "gettext" + depends_on "harfbuzz" + depends_on "pango" + end + + def install + ENV.cxx11 + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main(int argc, char *argv[]) { + Gtk::Label label("Hello World!"); + return 0; + } + CPP + + flags = shell_output("pkgconf --cflags --libs gtkmm-2.4").chomp.split + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gtkmm3.rb b/Formula/g/gtkmm3.rb new file mode 100644 index 0000000000000..7681b3903f814 --- /dev/null +++ b/Formula/g/gtkmm3.rb @@ -0,0 +1,58 @@ +class Gtkmm3 < Formula + desc "C++ interfaces for GTK+ and GNOME" + homepage "https://www.gtkmm.org/" + url "https://download.gnome.org/sources/gtkmm/3.24/gtkmm-3.24.10.tar.xz" + sha256 "7ab7e2266808716e26c39924ace1fb46da86c17ef39d989624c42314b32b5a76" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/gtkmm[._-]v?(3\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5634f7dab4a1a1aae626e2bc5924a3737d0bcb837dcb4898e1fc826874cf835a" + sha256 cellar: :any, arm64_sonoma: "07b73759ecefe82efc737bcda354dccf5e2e456a2764c901e140205f682b1eec" + sha256 cellar: :any, arm64_ventura: "1e17204482b03aafe1defd5a0523fd56c924afff6fd814bdfb6d03adc3d33efa" + sha256 cellar: :any, sonoma: "87c03521300deea80cdcde65cd5cafbb5d37973929b06882aa03e408e367bd46" + sha256 cellar: :any, ventura: "62493ad49029c723f04205ade288aef953f58b952ce6fccc95d55791e21ae0e7" + sha256 arm64_linux: "b97dd9a0f48a85b6f8c5aecae71d7bf07a39ec2d3228bdde8ea155a49c2b94ba" + sha256 x86_64_linux: "f955e7ece517c27b273e28ffeb1375f14142bccd51c0b6fcfebb6f3b0fcd09f9" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "atkmm@2.28" + depends_on "cairomm@1.14" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "glibmm@2.66" + depends_on "gtk+3" + depends_on "libsigc++@2" + depends_on "pangomm@2.46" + + 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 + + class MyLabel : public Gtk::Label { + MyLabel(Glib::ustring text) : Gtk::Label(text) {} + }; + int main(int argc, char *argv[]) { + return 0; + } + CPP + + flags = shell_output("pkgconf --cflags --libs gtkmm-3.0").chomp.split + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gtkmm4.rb b/Formula/g/gtkmm4.rb new file mode 100644 index 0000000000000..93df28e72a020 --- /dev/null +++ b/Formula/g/gtkmm4.rb @@ -0,0 +1,59 @@ +class Gtkmm4 < Formula + desc "C++ interfaces for GTK+ and GNOME" + homepage "https://www.gtkmm.org/" + url "https://download.gnome.org/sources/gtkmm/4.18/gtkmm-4.18.0.tar.xz" + sha256 "2ee31c15479fc4d8e958b03c8b5fbbc8e17bc122c2a2f544497b4e05619e33ec" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/gtkmm[._-]v?(4\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "45f72e4079b03119f5aa4d27bb7b2004dfd8e44a980fe550098a93c86248e959" + sha256 cellar: :any, arm64_sonoma: "4577ada6c92b8eedda931d73c2820a65308c5863f2ff4d8eaf0fd96cee6f0a1f" + sha256 cellar: :any, arm64_ventura: "043d75d67b710a15990b48bc2e76cea7a45b3f3ca28a7f91242c710ea06a65c7" + sha256 cellar: :any, sonoma: "0ee8fe1d4addd3c071228a3c148b24e1dd0e6b307face59ca9dfd00ceeff5a4d" + sha256 cellar: :any, ventura: "af5a7c6f8fbbb6069fb4cc9bdbd11e78e072f43e5f391896924c01bf19c3ab50" + sha256 arm64_linux: "b6d3373334c215ec185f7e17c90f1f50798d12c37934a6f7cabf54c619a4c484" + sha256 x86_64_linux: "e6406579298ce93e310bcdea9fb9b7d9a201ccf3446f65d04259c7988f0d68c2" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "cairo" + depends_on "cairomm" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "glibmm" + depends_on "graphene" + depends_on "gtk4" + depends_on "libsigc++" + depends_on "pangomm" + + 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 + + class MyLabel : public Gtk::Label { + MyLabel(Glib::ustring text) : Gtk::Label(text) {} + }; + int main(int argc, char *argv[]) { + return 0; + } + CPP + + flags = shell_output("pkgconf --cflags --libs gtkmm-4.0").chomp.split + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gtksourceview3.rb b/Formula/g/gtksourceview3.rb new file mode 100644 index 0000000000000..3519c6d512b6c --- /dev/null +++ b/Formula/g/gtksourceview3.rb @@ -0,0 +1,72 @@ +class Gtksourceview3 < Formula + desc "Text view with syntax, undo/redo, and text marks" + homepage "https://projects.gnome.org/gtksourceview/" + url "https://download.gnome.org/sources/gtksourceview/3.24/gtksourceview-3.24.11.tar.xz" + sha256 "691b074a37b2a307f7f48edc5b8c7afa7301709be56378ccf9cc9735909077fd" + license "LGPL-2.1-or-later" + revision 4 + + livecheck do + url :stable + regex(/gtksourceview[._-]v?(3\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "224ac2e0b389c7042f62b4402665368612132e6c25715017700ad776bfff7524" + sha256 arm64_sonoma: "52fd0b688066b7ae0c5d9a87ddb185136dbeebd11b336ae776eeed43f4ce6399" + sha256 arm64_ventura: "c0e6dcec74dcad611bbd070ec935726d1a6e2ab55db8de33fd1aff89171cca21" + sha256 arm64_monterey: "1478db6878ebe7cf4e472197126c565df4ea939aeb91470a610cfe88ce3de7b0" + sha256 sonoma: "79296a156876f62aed3b1025d8dd869403562d03ed112d118d1076496e3cd8ef" + sha256 ventura: "fb3887ecc8c0938f012b851eaba6c3025ed6836f54aad8cd07e5d367c63084bd" + sha256 monterey: "e72638ee3511326f622b20975c568d0b0f054c318ae944b15505d1816af10c2d" + sha256 arm64_linux: "57b4a62f57cac2da14e784b1fd9f5e33b359ceb0e78cec0fb07cbbba7834cca2" + sha256 x86_64_linux: "a29fc106c186da13c48399358ec0152907ca4bc3be2545632400409aaffcce2e" + end + + depends_on "gobject-introspection" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "pango" + + uses_from_macos "libxml2" + + on_macos do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gtk-doc" => :build + depends_on "libtool" => :build + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if OS.mac? + + system "./configure", "--disable-silent-rules", + "--enable-vala=yes", + "--enable-introspection=yes", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + gchar *text = gtk_source_utils_unescape_search_text("hello world"); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gtksourceview-3.0").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gtksourceview4.rb b/Formula/g/gtksourceview4.rb new file mode 100644 index 0000000000000..c099c7fc13351 --- /dev/null +++ b/Formula/g/gtksourceview4.rb @@ -0,0 +1,65 @@ +class Gtksourceview4 < Formula + desc "Text view with syntax, undo/redo, and text marks" + homepage "https://projects.gnome.org/gtksourceview/" + url "https://download.gnome.org/sources/gtksourceview/4.8/gtksourceview-4.8.4.tar.xz" + sha256 "7ec9d18fb283d1f84a3a3eff3b7a72b09a10c9c006597b3fbabbb5958420a87d" + license "LGPL-2.1-or-later" + revision 1 + + livecheck do + url :stable + regex(/gtksourceview[._-]v?(4\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "938b87e409e99e8a9459001a8f2d618d6a11777a60bcd8b083d20569c9f7e000" + sha256 arm64_sonoma: "9585d13d6b48522730b5e44320f732b96ff69a53a8ea4c716e0944bd167437ca" + sha256 arm64_ventura: "d0594d55fadba6bb175be05c699167f109d1c062ba46f93b5a2b987707ed63cf" + sha256 sonoma: "397d7f712188423f7072a085f7df8c0f460038acce0287308d92ec5f2789f881" + sha256 ventura: "53dbd9908d978f3fda45fed54f5aaa9fc494a00529cb8f57364846b21c269bab" + sha256 arm64_linux: "a00ce1afcd0d97788a9e601e9a33a423a0a9e8abc77d9f5d1ab3105579f1fdfa" + sha256 x86_64_linux: "c441529f7e87e35ad9b92422aa394f77109f57c25a7eace6e368d3db8f95b54b" + 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 "at-spi2-core" + depends_on "cairo" + depends_on "fribidi" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "pango" + + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", "-Dgir=true", "-Dvapi=true", *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[]) { + gchar *text = gtk_source_utils_unescape_search_text("hello world"); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gtksourceview-4").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gtksourceview5.rb b/Formula/g/gtksourceview5.rb new file mode 100644 index 0000000000000..a7ed6cd377683 --- /dev/null +++ b/Formula/g/gtksourceview5.rb @@ -0,0 +1,69 @@ +class Gtksourceview5 < Formula + desc "Text view with syntax, undo/redo, and text marks" + homepage "https://projects.gnome.org/gtksourceview/" + url "https://download.gnome.org/sources/gtksourceview/5.16/gtksourceview-5.16.0.tar.xz" + sha256 "ab35d420102f3e8b055dd3b8642d3a48209f888189e6254d0ffb4b6a7e8c3566" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/gtksourceview[._-]v?(5\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "847a0f3517ce808dd4a6e17761a8d6a7fff953898c9afe848920b68e851c5d49" + sha256 arm64_sonoma: "ee4435516bcc7bc5d48e05bbab28ab416f937e83d8762019b1f761ec888f67a3" + sha256 arm64_ventura: "d372e735e12c374d561a49efe49f574a00cc4270335f05d662fe44c0a05b35bc" + sha256 sonoma: "924fe9d5f721db208b762410862d6da3d10578e6943e9b3082c4df3d532ee7f8" + sha256 ventura: "bccd0d2fff52f29f15f327a7950a57953a072d4b8682dd4b79f7c2c3926b18b4" + sha256 arm64_linux: "ba5eaeff438f6a378817ce099509f651fd8188c9131e03c849e0647922ee208c" + sha256 x86_64_linux: "3664b8119abd306259ab0ac62fb6ba02cb50e3a9e4db2efdb94319cdc3079b16" + 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 "cairo" + depends_on "fontconfig" + depends_on "fribidi" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk4" + depends_on "pango" + depends_on "pcre2" + + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + args = %w[ + -Dintrospection=enabled + -Dvapi=true + ] + + 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[]) { + gchar *text = gtk_source_utils_unescape_search_text("hello world"); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gtksourceview-5").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gtksourceviewmm3.rb b/Formula/g/gtksourceviewmm3.rb new file mode 100644 index 0000000000000..0f86e4fc3e771 --- /dev/null +++ b/Formula/g/gtksourceviewmm3.rb @@ -0,0 +1,67 @@ +class Gtksourceviewmm3 < Formula + desc "C++ bindings for gtksourceview3" + homepage "https://gitlab.gnome.org/GNOME/gtksourceviewmm" + url "https://download.gnome.org/sources/gtksourceviewmm/3.18/gtksourceviewmm-3.18.0.tar.xz" + sha256 "51081ae3d37975dae33d3f6a40621d85cb68f4b36ae3835eec1513482aacfb39" + license "LGPL-2.1-or-later" + revision 11 + + livecheck do + url :stable + regex(/gtksourceviewmm[._-]v?(3\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8de9f30c9a139c912211e4766370c1b2a3b4f78150a4342f6242f56581ebf3bb" + sha256 cellar: :any, arm64_sonoma: "dc3f50e8c5d192b4dc176878e95f4b7bf28d0a19e21c7c47b88f1c5905f64ebb" + sha256 cellar: :any, arm64_ventura: "fa886fba1a65986e976859a1c9714b8892695850e6c8325dc534532f31536f0a" + sha256 cellar: :any, arm64_monterey: "9353790d382f15315725c82eb60364f0533d2cc4d3e7483abbc34ab4962f3688" + sha256 cellar: :any, sonoma: "6d967d0889a430e64312a18afbae33554340938c8fae2a90ddd652cd2beb86cd" + sha256 cellar: :any, ventura: "599a63e233b2cab4497e4266780a1c4a55616aeb6a8dfbdb7fa92c0f443720c6" + sha256 cellar: :any, monterey: "e47d5fa75c9210450660bdd5bbb0ca206e90beba0a0954e49a7b7596e6bc5a42" + sha256 cellar: :any_skip_relocation, arm64_linux: "b71c353cdef6b20cb4b871ad1ec98712271fe7f123d793917ca5738cbe0ce099" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b6489e67344895dad8ef93a694a47c49fec20dc0735989355b11489cd85fbccd" + end + + depends_on "pkgconf" => [:build, :test] + + depends_on "atkmm@2.28" + depends_on "cairomm@1.14" + depends_on "glib" + depends_on "glibmm@2.66" + depends_on "gtk+3" + depends_on "gtkmm3" + depends_on "gtksourceview3" + depends_on "libsigc++@2" + depends_on "pangomm@2.46" + + 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.cxx11 + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main(int argc, char *argv[]) { + Gsv::init(); + return 0; + } + CPP + + flags = shell_output("pkgconf --cflags --libs gtksourceviewmm-3.0").chomp.split + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gtkspell3.rb b/Formula/g/gtkspell3.rb new file mode 100644 index 0000000000000..cc0e58ad57204 --- /dev/null +++ b/Formula/g/gtkspell3.rb @@ -0,0 +1,70 @@ +class Gtkspell3 < Formula + desc "Gtk widget for highlighting and replacing misspelled words" + homepage "https://gtkspell.sourceforge.net/" + url "https://downloads.sourceforge.net/project/gtkspell/3.0.10/gtkspell3-3.0.10.tar.xz" + sha256 "b040f63836b347eb344f5542443dc254621805072f7141d49c067ecb5a375732" + license "GPL-2.0-or-later" + revision 4 + + bottle do + sha256 arm64_sequoia: "f182f8a623b04c25479cfedab38fcc1bc4c6df7f548b7c3b1ceab211fbe16115" + sha256 arm64_sonoma: "af4e893051ace858028bf47a7fe57524b6fefddb105ec7325301468135ee2d1c" + sha256 arm64_ventura: "99fdc129ff12ac2e004114076b278d7b7b62b0fc7f6ffc7f40a3eaa186bbb795" + sha256 arm64_monterey: "c6b206d892fa7aa21650a0567741479e6b916f0c4e18683232be43845a4bc797" + sha256 sonoma: "0db8568fa754d743a6ee0a2e10804a464575a7cb2981599c4fccb0de4ff6fc10" + sha256 ventura: "8327e4eb37ec513c654f28d3c4bc1602fe19d0984f46fffae5bae668b526085e" + sha256 monterey: "6e04d8a356a3f3dadeef039a3b3e7218f44b7cc53ce720ab4e7273273749b6a2" + sha256 arm64_linux: "2107b9a48ac875459316fe149288cd8d0c48d1069000f009f15b007836a789df" + sha256 x86_64_linux: "e59e7ffb60fbef74bbfd6c8191776880cf5b4cb697c5519dfcdf7f1e1a29fccf" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "gtk-doc" => :build + depends_on "intltool" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + + depends_on "enchant" + depends_on "glib" + depends_on "gtk+3" + + uses_from_macos "perl" => :build + + 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 + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--enable-vala", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + GList *list = gtk_spell_checker_get_language_list(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gtkspell3-3.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gtmess.rb b/Formula/g/gtmess.rb new file mode 100644 index 0000000000000..8df0ea065a6d5 --- /dev/null +++ b/Formula/g/gtmess.rb @@ -0,0 +1,49 @@ +class Gtmess < Formula + desc "Console MSN messenger client" + homepage "https://gtmess.sourceforge.net/" + url "https://downloads.sourceforge.net/project/gtmess/gtmess/0.97/gtmess-0.97.tar.gz" + sha256 "606379bb06fa70196e5336cbd421a69d7ebb4b27f93aa1dfd23a6420b3c6f5c6" + license "GPL-2.0-or-later" + revision 2 + + bottle do + rebuild 1 + sha256 arm64_sequoia: "89e1ecfa7ac4a5fe6aeefeb3596be4602112e32ca6bd2a6de51da26abaaad0f5" + sha256 arm64_sonoma: "2a4138a4ba629449a00d75128520da749d92a1baeb648a14d765072722a81765" + sha256 arm64_ventura: "b900139985694c245c0211f9fea3ccdaa14fbde5094d7201bccb51029fd9ce41" + sha256 arm64_monterey: "19e8f974e8f84874a9d06a195d5a45b8c2d881689f767706eec5692589a6af4c" + sha256 arm64_big_sur: "a0b6c3219910c5014fb968fad3d3cf06694f5f2fc173b615df3d04e8e8b5e93d" + sha256 sonoma: "fb98cc013a64f99d2d603c825d8a819f4e65d0605cfbb635eaaaabb13ae585df" + sha256 ventura: "4ede269a5b42a857aa94e09d68eb889de5a15a190145efd09fb07b907971b4c7" + sha256 monterey: "ff05dfd808dd3c468e004dfa944117208e9f44bfe542bd45cbaa851f8981e04a" + sha256 big_sur: "28119023b99b93091412443d9ca881c06cd120b97f60719bf3705680d8c2eb39" + sha256 catalina: "b371a2eba5b1703eb6598daae20d72b08a866fe1db95505a9cfddacc470d4804" + sha256 arm64_linux: "9a4e59aeaeb6da7270ae2ccf566297007dd7710da2f13440089a7e6edbfdb163" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae09e63f26ccef723a73cf04f5dc36ba60ab1588b558d15b5e248132d7d88eea" + end + + head do + url "https://github.com/geotz/gtmess.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "openssl@3" + + uses_from_macos "ncurses" + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--with-ssl=#{Formula["openssl@3"].opt_prefix}", *std_configure_args + system "make", "install" + end + + test do + system bin/"gtmess", "--version" + end +end diff --git a/Formula/g/gtop.rb b/Formula/g/gtop.rb new file mode 100644 index 0000000000000..227a93eb37e54 --- /dev/null +++ b/Formula/g/gtop.rb @@ -0,0 +1,31 @@ +class Gtop < Formula + desc "System monitoring dashboard for terminal" + homepage "https://github.com/aksakalli/gtop" + url "https://registry.npmjs.org/gtop/-/gtop-1.1.5.tgz" + sha256 "a8e90b828e33160c6a0ac4fb11231f292496e8049c0dac814e46fdd0c90817c1" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "19886395a17a873daab79bd8e8970e7a9606d4389586123e68d875c2fd192c0f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9a4641e216717d7a5a9b15b74823300c209d4b524bfb67044eef2feb1269a014" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9a4641e216717d7a5a9b15b74823300c209d4b524bfb67044eef2feb1269a014" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9a4641e216717d7a5a9b15b74823300c209d4b524bfb67044eef2feb1269a014" + sha256 cellar: :any_skip_relocation, sonoma: "c553e5fc33023ca5721afcfa8a427ee24728fe83c4b3b959f7c2f297d9d7765b" + sha256 cellar: :any_skip_relocation, ventura: "c553e5fc33023ca5721afcfa8a427ee24728fe83c4b3b959f7c2f297d9d7765b" + sha256 cellar: :any_skip_relocation, monterey: "c553e5fc33023ca5721afcfa8a427ee24728fe83c4b3b959f7c2f297d9d7765b" + sha256 cellar: :any_skip_relocation, arm64_linux: "dbd2e93ffe00474fa327abc717c860e3d4254e09449c83cc01b1e860f3d6ea2a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "51f39616a98ddb6a0f1bf391b3c2155e1b0ba0c192ddb8c735dfb6ae5a24fed7" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir[libexec/"bin/*"] + end + + test do + assert_match "Error: Width must be multiple of 2", shell_output(bin/"gtop 2>&1", 1) + end +end diff --git a/Formula/g/gtranslator.rb b/Formula/g/gtranslator.rb new file mode 100644 index 0000000000000..8934c7cfe5af1 --- /dev/null +++ b/Formula/g/gtranslator.rb @@ -0,0 +1,57 @@ +class Gtranslator < Formula + desc "GNOME gettext PO file editor" + homepage "https://wiki.gnome.org/Design/Apps/Translator" + url "https://download.gnome.org/sources/gtranslator/48/gtranslator-48.0.tar.xz" + sha256 "e78ebc2006a251d8796ed1e72b9c2e53647973707e65b74d9f94521b03929e9f" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "fbcbdf1b0c13c0333ab1f149aabab989a49a674026ad6b1dfbb080dbbe262de6" + sha256 arm64_sonoma: "580ba20e94c0065f9de1136ed40ff1ee2c9099ec8953f9ce6cd054f18d5db6a8" + sha256 arm64_ventura: "25e6488bef8333cdcf5cdd7bdaebcaa9b4aed313b7d622c63471cb0dd283cb15" + sha256 sonoma: "726b1853ffff31972de87fe405054ba68275e37795ae9008d4e32b261b87822f" + sha256 ventura: "b0a7410ae57d2dfe88fb9b1b24280c17be9f0328391ce5d8c4daeb988ea7cd61" + sha256 arm64_linux: "3ed87f53f600bfa97ff051503934004292f80fcf87bdfe3ccfd4df0dee35c092" + sha256 x86_64_linux: "f90143186e87fb3d3216ea137e1976b4d60fb3e77fcbd0ea8b2444de389358a2" + end + + depends_on "desktop-file-utils" => :build # for update-desktop-database + depends_on "itstool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "adwaita-icon-theme" + depends_on "cairo" + depends_on "gettext" + depends_on "glib" + depends_on "gspell" + depends_on "gtk4" + depends_on "gtksourceview5" + depends_on "json-glib" + depends_on "libadwaita" + depends_on "libgda" + depends_on "libsoup" + depends_on "libspelling" + depends_on "pango" + + uses_from_macos "libxml2" + + def install + # 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["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" + end + + test do + system bin/"gtranslator", "-h" + end +end diff --git a/Formula/g/gtree.rb b/Formula/g/gtree.rb new file mode 100644 index 0000000000000..1c5030f49b1fa --- /dev/null +++ b/Formula/g/gtree.rb @@ -0,0 +1,31 @@ +class Gtree < Formula + desc "Generate directory trees and directories using Markdown or programmatically" + homepage "https://ddddddo.github.io/gtree/" + url "https://github.com/ddddddO/gtree/archive/refs/tags/v1.11.6.tar.gz" + sha256 "e7e033c6329729edf0b5640d06cc12d40d9f7b2ca8df733b1ba468206044eabc" + license "BSD-2-Clause" + head "https://github.com/ddddddO/gtree.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b978a7cb8d1d14fab89a3799e6bcd1a8c38278e4424275fc3ae79ba3a138e235" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b978a7cb8d1d14fab89a3799e6bcd1a8c38278e4424275fc3ae79ba3a138e235" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b978a7cb8d1d14fab89a3799e6bcd1a8c38278e4424275fc3ae79ba3a138e235" + sha256 cellar: :any_skip_relocation, sonoma: "4627a727d891901de873e80210407631af21dd3ca3235905d59a1d27860ccc69" + sha256 cellar: :any_skip_relocation, ventura: "4627a727d891901de873e80210407631af21dd3ca3235905d59a1d27860ccc69" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b5a627e1f44d9403b2cd46f93dccd4d1de50fec4f841635b0ebbc80a5973fa7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "650440dba22014109f5e1d03ae3a787ad90e34bfb4bf6926d6d5c83322bfec40" + 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:), "./cmd/gtree" + end + + test do + assert_match version.to_s, shell_output("#{bin}/gtree version") + + assert_match "testdata", shell_output("#{bin}/gtree template") + end +end diff --git a/Formula/g/gts.rb b/Formula/g/gts.rb new file mode 100644 index 0000000000000..541308a5ed9af --- /dev/null +++ b/Formula/g/gts.rb @@ -0,0 +1,84 @@ +class Gts < Formula + desc "GNU triangulated surface library" + homepage "https://gts.sourceforge.net/" + url "https://downloads.sourceforge.net/project/gts/gts/0.7.6/gts-0.7.6.tar.gz" + sha256 "059c3e13e3e3b796d775ec9f96abdce8f2b3b5144df8514eda0cc12e13e8b81e" + license "LGPL-2.0-or-later" + revision 3 + + bottle do + sha256 cellar: :any, arm64_sequoia: "b93bb9f091fbf2d25c99437f8ef0dc0e40f680fe445b968cf952d2d067417ebb" + sha256 cellar: :any, arm64_sonoma: "45ce1fc7fc4da58e808c6d11bd19a17c35bed97719b63e2572b22ff6bd417aac" + sha256 cellar: :any, arm64_ventura: "de8259a24624223ddab38d0e1482ec9f055ddfacc353fb0290d127919e509cf1" + sha256 cellar: :any, arm64_monterey: "8bedf36ac77f7998ea926904efe011d52086e67f9901c1a64cda7e8013f7bc07" + sha256 cellar: :any, arm64_big_sur: "ed540825164e099f8f1c9719fada2d186a3f9b9ee10279ad4f2dac658bc68cb8" + sha256 cellar: :any, sonoma: "63d06518c5c1da686ecf76d612b7717bc021d8c19a6470a21ec1f69020fe1dac" + sha256 cellar: :any, ventura: "946d3f08c41e94c2861e555358fd152df7c069ad8a2a7f621b64b55cfb8ceffb" + sha256 cellar: :any, monterey: "3800de79b45b9a5736b9ecd9d48b2ab2935d74cbe57e308eeed2ddb2e07a08e1" + sha256 cellar: :any, big_sur: "486a4d3b428e12daf5573a21d60371b4cd1f9e1c7e3b14c7d2d1c0a3bea58524" + sha256 cellar: :any_skip_relocation, arm64_linux: "b822bc2eb7de37c9497056021cca4397053d11bfafc980820766bcdced8daff5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c6bb3e3859bee6f8b113a08d7d158a19ef46ec307073fac12c90c4a0113f69e" + end + + # We regenerate configure to avoid the `-flat_namespace` flag. + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "glib" + depends_on "netpbm" + + on_macos do + depends_on "gettext" + end + + conflicts_with "pcb", because: "both install a `gts.h` header" + + # Fix for newer netpbm. + # This software hasn't been updated in seven years + patch :DATA + + def install + # The `configure` passes `-flat_namespace` but none of our usual patches apply. + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"gtstest.c").write <<~C + #include "gts.h" + int main() { + GtsRange r; + gts_range_init(&r); + + for (int i = 0; i < 10; ++i) + gts_range_add_value(&r, i); + + gts_range_update(&r); + + if (r.n == 10) return 0; + return 1; + } + C + + flags = shell_output("pkgconf --cflags --libs gts").strip.split + system ENV.cc, "gtstest.c", *flags, "-lm", "-o", "gtstest" + system "./gtstest" + end +end + +__END__ +diff --git a/examples/happrox.c b/examples/happrox.c +index 88770a8..11f140d 100644 +--- a/examples/happrox.c ++++ b/examples/happrox.c +@@ -21,7 +21,7 @@ + #include + #include + #include +-#include ++#include + #include "config.h" + #ifdef HAVE_GETOPT_H + # include diff --git a/Formula/g/gucharmap.rb b/Formula/g/gucharmap.rb new file mode 100644 index 0000000000000..d468354e9a997 --- /dev/null +++ b/Formula/g/gucharmap.rb @@ -0,0 +1,73 @@ +class Gucharmap < Formula + desc "GNOME Character Map, based on the Unicode Character Database" + homepage "https://wiki.gnome.org/Apps/Gucharmap" + url "https://gitlab.gnome.org/GNOME/gucharmap/-/archive/16.0.2/gucharmap-16.0.2.tar.bz2" + sha256 "f320ad67318dbf0ec26691849c0fe8f5ef4d72e6e78873fb083ad12c94bcda00" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "11517c190dbe6ac8cee546e89ba36df310d0fa838ed7636437f95155d2b62874" + sha256 arm64_sonoma: "fc21d70b9319bbadcc227107d7987e46c3474fbdea88ec219ec27051176f472c" + sha256 arm64_ventura: "f884c900fdba9a0a8bf52f00c5a3ec68db46fabec8f4ef4ac1faa8115f7afdbd" + sha256 sonoma: "4ff534da40aab00d5b36677697e061e465288eb59dcab160b26b85da15a6d2a3" + sha256 ventura: "ac90916e94ae7ffc4480793575cc9dc6555463335283252499a30663bb4521b8" + sha256 arm64_linux: "f6d5fbf4a6dbc49ff25dd11bb69e58c07f2f654bbcdc8712b5ebe8880978246a" + sha256 x86_64_linux: "15d7d8cc50e776aeb271dc07d659815ed08a4fbe5c9cc58cc315b6798b4f01e3" + end + + depends_on "desktop-file-utils" => :build + 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 + depends_on "vala" => :build + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "glib" + depends_on "gtk+3" + depends_on "pango" + depends_on "pcre2" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "gettext" => :build + end + + resource "ucd" do + url "https://www.unicode.org/Public/16.0.0/ucd/UCD.zip" + sha256 "c86dd81f2b14a43b0cc064aa5f89aa7241386801e35c59c7984e579832634eb2" + end + + resource "unihan" do + url "https://www.unicode.org/Public/16.0.0/ucd/Unihan.zip", using: :nounzip + sha256 "b8f000df69de7828d21326a2ffea462b04bc7560022989f7cc704f10521ef3e0" + end + + def install + ENV["DESTDIR"] = "/" + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + (buildpath/"unicode").install resource("ucd") + (buildpath/"unicode").install resource("unihan") + + # ERROR: Assert failed: -Wl,-Bsymbolic-functions is required but not supported + inreplace "meson.build", "'-Wl,-Bsymbolic-functions'", "" if OS.mac? + + system "meson", "setup", "build", "-Ducd_path=#{buildpath}/unicode", *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" + end + + test do + system bin/"gucharmap", "--version" + end +end diff --git a/Formula/g/guetzli.rb b/Formula/g/guetzli.rb new file mode 100644 index 0000000000000..8a663d323c0df --- /dev/null +++ b/Formula/g/guetzli.rb @@ -0,0 +1,44 @@ +class Guetzli < Formula + desc "Perceptual JPEG encoder" + homepage "https://github.com/google/guetzli" + url "https://github.com/google/guetzli/archive/refs/tags/v1.0.1.tar.gz" + sha256 "e52eb417a5c0fb5a3b08a858c8d10fa797627ada5373e203c196162d6a313697" + license "Apache-2.0" + head "https://github.com/google/guetzli.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a9d736ee968abfde99d6ccc42c9ca5793ea9d7b1e52b7127314a1f8fcfcf32fc" + sha256 cellar: :any, arm64_sonoma: "48791444d83a6bff9ff37b33b55422cebcca2c162e0d6c8daf3bbdaf62cc5bc7" + sha256 cellar: :any, arm64_ventura: "e914138a9bf24f33e5b66a2ae0721f64551a6d0e342d2aab989417a5290da0ee" + sha256 cellar: :any, arm64_monterey: "72334c25e95e54a5c5622b1e0e3f494f32117604f7d2a151a5f3dcbe15581907" + sha256 cellar: :any, arm64_big_sur: "4337b23e3a80393c75f23df48034d14e408b72647ec918caf5ae524ee6716a99" + sha256 cellar: :any, sonoma: "93a976e44bcdb34e084bc689d4cc7ab8bb8eb1b60f7f53e6b7c379599237b552" + sha256 cellar: :any, ventura: "e6a66cebdbadbf4de6e1d54e46af1e0bdb30db3b079fe73123687a4c1265e33b" + sha256 cellar: :any, monterey: "f0e8f99a914028ca43d741d20984d44f6249e3989b9f8f9a7f068dc169d8f3be" + sha256 cellar: :any, big_sur: "9f1fb787b3b21f795dd2a5d0399bf4f1263ca0e5c28f04e4d101ac33ea22503b" + sha256 cellar: :any, catalina: "14605bd3ba2aa89d0030d3935eb5ffa022712fc6eef43f969bc301beda218af6" + sha256 cellar: :any, mojave: "1599d5e292f5ca4ade99ab2627d3a0d2a3450011317dff9d5a46d779af20b01a" + sha256 cellar: :any, high_sierra: "1b3a1b5544b7a8c30553b2e8ac669d8e924d0164feb5355b0a7c2ef5807aca46" + sha256 cellar: :any, sierra: "c059346fa601885f550b50752d6d1a23eced66388b18e1c1db5169a0951dcad6" + sha256 cellar: :any, el_capitan: "a77327b3964a88a84879943171e0d10d6661cc72c5ceaa12ee2091f02930da1a" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d4369003d405489dc3558a67898b111a977d010f343a64153eb1dfd10ff1546" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f75d76355fa17bf7709842f7e1dab879c5cae613908bfd7196f6cc553238644f" + end + + depends_on "pkgconf" => :build + depends_on "libpng" + + resource "test_image" do + url "https://github.com/google/guetzli/releases/download/v1.0/bees.png" + sha256 "2c1784bf4efb90c57f00a3ab4898ac8ec4784c60d7a0f70d2ba2c00af910520b" + end + + def install + system "make" + bin.install "bin/Release/guetzli" + end + + test do + resource("test_image").stage { system bin/"guetzli", "bees.png", "bees.jpg" } + end +end diff --git a/Formula/g/guile-fibers.rb b/Formula/g/guile-fibers.rb new file mode 100644 index 0000000000000..41f71eddc5237 --- /dev/null +++ b/Formula/g/guile-fibers.rb @@ -0,0 +1,47 @@ +class GuileFibers < Formula + desc "Concurrent ML-like concurrency for Guile" + homepage "https://github.com/wingo/fibers" + url "https://github.com/wingo/fibers/releases/download/v1.3.1/fibers-1.3.1.tar.gz" + sha256 "a5e1a9c49c0efe7ac6f355662041430d4b64e59baa538d2b8fb5ef7528d81dbf" + license "LGPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "b0ffb1a8e973c4c824afef59cc42b36f02f402ac562157be5eeefe4fd5f35552" + sha256 arm64_sonoma: "aecafccfe6ae02c9d8aa3cec97cc91017995e5af3b6844f92f6a895289385828" + sha256 arm64_ventura: "c4efa5f223403ee3bb438ef926dca0775564e5756e6ce9c0e754698542c7b90a" + sha256 sonoma: "e314596a82b167bcd6548de44fd5d415987b257d8b46e2640a5924cc3c741530" + sha256 ventura: "b1fc7b219a7f68cded6c9786daedae1450870fcf5feccdd04cb38ce3ad4bc5b2" + sha256 arm64_linux: "d65a242acbf399e5666386ab6cf904c76389046dad4781aec73567acc72c4d26" + sha256 x86_64_linux: "d94c75d9e2acfbf27ba8387935d757398f54287c38654ae9a51169934f54c096" + end + + depends_on "guile" + depends_on "libevent" + + on_macos do + depends_on "bdw-gc" + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + ENV["GUILE_AUTO_COMPILE"] = "0" + ENV["GUILE_LOAD_PATH"] = share/"guile/site/3.0" + ENV["GUILE_LOAD_COMPILED_PATH"] = lib/"guile/3.0/site-ccache" + + (testpath/"test-fibers.scm").write <<~SCHEME + (use-modules (fibers)) + (display "fibers loaded\\n") + SCHEME + + output = shell_output("guile test-fibers.scm") + assert_match "fibers loaded", output + end +end diff --git a/Formula/g/guile-gnutls.rb b/Formula/g/guile-gnutls.rb new file mode 100644 index 0000000000000..96a80657d2d7a --- /dev/null +++ b/Formula/g/guile-gnutls.rb @@ -0,0 +1,72 @@ +class GuileGnutls < Formula + desc "Guile bindings for the GnuTLS library" + homepage "https://gitlab.com/gnutls/guile" + url "https://gitlab.com/-/project/40217954/uploads/f80b3a30cfc66c988775edc4ce3fb546/guile-gnutls-4.0.1.tar.gz" + sha256 "01f0ba3bea837bb44dcb1b3ffcce3c2ebe88699d0a3bddac1d879e475a9787e4" + license "LGPL-2.1-or-later" + head "https://gitlab.com/gnutls/guile.git", branch: "master" + + livecheck do + url "https://gitlab.com/api/v4/projects/40217954/releases" + regex(/^(?:gnutls[._-])?v?(\d+(?:[._]\d+)+)$/i) + strategy :json do |json, regex| + json.map { |item| item["tag_name"]&.[](regex, 1)&.tr("_", ".") } + end + end + + bottle do + sha256 arm64_sequoia: "774fbd9464a92152b3506f67c9e5b2f7349575e2031293e50132017b7a3e98bb" + sha256 arm64_sonoma: "a50a21859c4523e1a26aa0e9b566d69b8351da2a31b8f01999b407551b2cc4d1" + sha256 arm64_ventura: "54ab78a024a433b7617ce26f88fac53debc42320651d7d6729a6c52c044d2071" + sha256 sonoma: "5809a5ecdd6bacd5cb63f20aa5fd4d8af796e3d63c1554851090699d496f96a6" + sha256 ventura: "2cf7fdb17f501d3585ec6025132bc4b598349043e4d12ee82fec511fd7864b0d" + sha256 arm64_linux: "88ed2db04fcd5075579b4aa0176f0d89b8e39d9aff7e6ea8770f4aeb7ccd78bd" + sha256 x86_64_linux: "6d35dcf9c11c5b00943128d0a9a4ad7e2fc97b470a34879729f77412ac6af431" + end + + depends_on "gnutls" + depends_on "guile" + + on_macos do + depends_on "bdw-gc" + end + + def install + system "./configure", "--with-guile-site-dir=#{share}/guile/site/3.0", + "--with-guile-site-ccache-dir=#{lib}/guile/3.0/site-ccache", + "--with-guile-extension-dir=#{lib}/guile/3.0/extensions", + "--disable-silent-rules", + *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + def post_install + # Touch gnutls.go to avoid Guile recompilation. + # See https://github.com/Homebrew/homebrew-core/pull/60307#discussion_r478917491 + touch lib/"guile/3.0/site-ccache/gnutls.go" + end + + def caveats + <<~EOS + If you are going to use the Guile bindings you will need to add the following + to your .bashrc or equivalent in order for Guile to find the TLS certificates + database: + export GUILE_TLS_CERTIFICATE_DIRECTORY=#{Formula["gnutls"].pkgetc}/ + EOS + end + + test do + gnutls = testpath/"gnutls.scm" + gnutls.write <<~SCHEME + (use-modules (gnutls)) + (gnutls-version) + SCHEME + + ENV["GUILE_AUTO_COMPILE"] = "0" + ENV["GUILE_LOAD_PATH"] = HOMEBREW_PREFIX/"share/guile/site/3.0" + ENV["GUILE_LOAD_COMPILED_PATH"] = HOMEBREW_PREFIX/"lib/guile/3.0/site-ccache" + ENV["GUILE_SYSTEM_EXTENSIONS_PATH"] = HOMEBREW_PREFIX/"lib/guile/3.0/extensions" + + system "guile", gnutls + end +end diff --git a/Formula/g/guile.rb b/Formula/g/guile.rb new file mode 100644 index 0000000000000..5371e7a47815f --- /dev/null +++ b/Formula/g/guile.rb @@ -0,0 +1,110 @@ +class Guile < Formula + desc "GNU Ubiquitous Intelligent Language for Extensions" + homepage "https://www.gnu.org/software/guile/" + url "https://ftp.gnu.org/gnu/guile/guile-3.0.10.tar.xz" + mirror "https://ftpmirror.gnu.org/guile/guile-3.0.10.tar.xz" + sha256 "bd7168517fd526333446d4f7ab816527925634094fbd37322e17e2b8d8e76388" + license "LGPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "bacc4d4dca5374f7a713747ad70fb2111f8c3b443f2a5fb614f05b659be80949" + sha256 arm64_sonoma: "e7f65709dffaf55c7ace2e1c8f6553aebc56a17674b7ab57421c1f22bbf7798a" + sha256 arm64_ventura: "8e47adc1f7238e67c3af7712ff0e57c1d0b1b79a86950f0e0370944f1a69c960" + sha256 arm64_monterey: "d58266c28fa037d004ddcd50f5da744a7232303455139523f61a83a3d36ce5e6" + sha256 sonoma: "4b8013bda989e3215cbe659f8e0786408f8e71a56777c1533a882246e986cdf8" + sha256 ventura: "48cf5388ba5c114888987ae31a6620d640ed94c72e22076df491c33a88a35deb" + sha256 monterey: "2716185a062154262f1b160358fa955bf31bbdae5d0b08f4d0c38e3bf6ff066c" + sha256 arm64_linux: "d2c305fc8941ee39d4b7a4ea7ea5f3f6257d5ed67fd4fbae31bf5ad44a2f6411" + sha256 x86_64_linux: "fd3f68416f1b61d67641e43ce42a3a4b88ad5a010533b572b42e69fa8e4ef434" + end + + head do + url "https://git.savannah.gnu.org/git/guile.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + uses_from_macos "flex" => :build + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + end + + depends_on "gnu-sed" => :build + depends_on "bdw-gc" + depends_on "gmp" + depends_on "libtool" + depends_on "libunistring" + depends_on "pkgconf" # guile-config is a wrapper around pkg-config. + depends_on "readline" + + uses_from_macos "gperf" + uses_from_macos "libffi", since: :catalina + uses_from_macos "libxcrypt" + + def install + # So we can find libraries with (dlopen). + ENV.append "LDFLAGS", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib" + + # Avoid superenv shim + inreplace "meta/guile-config.in", "@PKG_CONFIG@", Formula["pkgconf"].opt_bin/"pkg-config" + + system "./autogen.sh" unless build.stable? + + system "./configure", "--disable-nls", + "--with-libreadline-prefix=#{Formula["readline"].opt_prefix}", + "--with-libgmp-prefix=#{Formula["gmp"].opt_prefix}", + *std_configure_args + system "make", "install" + + # A really messed up workaround required on macOS --mkhl + Pathname.glob("#{lib}/*.dylib") do |dylib| + lib.install_symlink dylib.basename => "#{dylib.basename(".dylib")}.so" + end + + # This is either a solid argument for guile including options for + # --with-xyz-prefix= for libffi and bdw-gc or a solid argument for + # Homebrew automatically removing Cellar paths from .pc files in favour + # of opt_prefix usage everywhere. + inreplace lib/"pkgconfig/guile-3.0.pc" do |s| + s.gsub! Formula["bdw-gc"].prefix.realpath, Formula["bdw-gc"].opt_prefix + s.gsub! Formula["libffi"].prefix.realpath, Formula["libffi"].opt_prefix if !OS.mac? || MacOS.version < :catalina + end + + (share/"gdb/auto-load").install Dir["#{lib}/*-gdb.scm"] + end + + def post_install + # Create directories so installed modules can create links inside. + (HOMEBREW_PREFIX/"lib/guile/3.0/site-ccache").mkpath + (HOMEBREW_PREFIX/"lib/guile/3.0/extensions").mkpath + (HOMEBREW_PREFIX/"share/guile/site/3.0").mkpath + end + + def caveats + <<~EOS + Guile libraries can now be installed here: + Source files: #{HOMEBREW_PREFIX}/share/guile/site/3.0 + Compiled files: #{HOMEBREW_PREFIX}/lib/guile/3.0/site-ccache + Extensions: #{HOMEBREW_PREFIX}/lib/guile/3.0/extensions + + Add the following to your .bashrc or equivalent: + export GUILE_LOAD_PATH="#{HOMEBREW_PREFIX}/share/guile/site/3.0" + export GUILE_LOAD_COMPILED_PATH="#{HOMEBREW_PREFIX}/lib/guile/3.0/site-ccache" + export GUILE_SYSTEM_EXTENSIONS_PATH="#{HOMEBREW_PREFIX}/lib/guile/3.0/extensions" + EOS + end + + test do + hello = testpath/"hello.scm" + hello.write <<~SCHEME + (display "Hello World") + (newline) + SCHEME + + ENV["GUILE_AUTO_COMPILE"] = "0" + + system bin/"guile", hello + end +end diff --git a/Formula/g/gulp-cli.rb b/Formula/g/gulp-cli.rb new file mode 100644 index 0000000000000..09620d37dfff2 --- /dev/null +++ b/Formula/g/gulp-cli.rb @@ -0,0 +1,44 @@ +class GulpCli < Formula + desc "Command-line utility for Gulp" + homepage "https://github.com/gulpjs/gulp-cli" + url "https://registry.npmjs.org/gulp-cli/-/gulp-cli-3.0.0.tgz" + sha256 "f90ba044fd1486dcc0f5e7ec07aba39fc62079cd0f3df78f2ba123b404f8094b" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4705be7a88b79dd85745a81118909d722e59a0d3d81a2766d5ee873b4f98089" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b6b78b8a649dc8b662a2fa39814d039991950450e52b20692ff9756955f642d6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b6b78b8a649dc8b662a2fa39814d039991950450e52b20692ff9756955f642d6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b6b78b8a649dc8b662a2fa39814d039991950450e52b20692ff9756955f642d6" + sha256 cellar: :any_skip_relocation, sonoma: "97e82d635666e3f778dd12285f8881701110370eaefe6c22fb902b493ae2ba58" + sha256 cellar: :any_skip_relocation, ventura: "97e82d635666e3f778dd12285f8881701110370eaefe6c22fb902b493ae2ba58" + sha256 cellar: :any_skip_relocation, monterey: "97e82d635666e3f778dd12285f8881701110370eaefe6c22fb902b493ae2ba58" + sha256 cellar: :any_skip_relocation, arm64_linux: "37ce0d118f641429fb3593e30aeb9d81dfebf95381855994b1d4e646f9d5cbd7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ca11835e27a0ab600dc0ce1c92b06791fb15b3f7c75d71d97ca4984983deff8" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + system "npm", "init", "-y" + system "npm", "install", *std_npm_args(prefix: false), "gulp" + + output = shell_output("#{bin}/gulp --version") + assert_match "CLI version: #{version}", output + assert_match "Local version: ", output + + (testpath/"gulpfile.js").write <<~JS + function defaultTask(cb) { + cb(); + } + exports.default = defaultTask + JS + assert_match "Finished 'default' after ", shell_output("#{bin}/gulp") + end +end diff --git a/Formula/g/gum.rb b/Formula/g/gum.rb new file mode 100644 index 0000000000000..01229fec984e1 --- /dev/null +++ b/Formula/g/gum.rb @@ -0,0 +1,35 @@ +class Gum < Formula + desc "Tool for glamorous shell scripts" + homepage "https://github.com/charmbracelet/gum" + url "https://github.com/charmbracelet/gum/archive/refs/tags/v0.16.0.tar.gz" + sha256 "cedcb16ee99149236dd1b0aa786a76fa49ae37da87d0a9a065d4db16a05a5496" + license "MIT" + head "https://github.com/charmbracelet/gum.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0777a7b361f46a1445a66b4fef79ab48ef25b95003123f623e7101245e0c3904" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0777a7b361f46a1445a66b4fef79ab48ef25b95003123f623e7101245e0c3904" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0777a7b361f46a1445a66b4fef79ab48ef25b95003123f623e7101245e0c3904" + sha256 cellar: :any_skip_relocation, sonoma: "f271722cf9f927416a1d3b7eb43d84f49f0ae33c422e00f83e4b42a0c55b6d74" + sha256 cellar: :any_skip_relocation, ventura: "f271722cf9f927416a1d3b7eb43d84f49f0ae33c422e00f83e4b42a0c55b6d74" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e0808d8dffcc35da6bf9397fc67451c0cfd8ab0ec39e0118227dcb50fe19f50" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}") + + man_page = Utils.safe_popen_read(bin/"gum", "man") + (man1/"gum.1").write man_page + + generate_completions_from_executable(bin/"gum", "completion") + end + + test do + assert_match "Gum", shell_output("#{bin}/gum format 'Gum'").chomp + assert_equal "foo", shell_output("#{bin}/gum style foo").chomp + assert_equal "foo\nbar", shell_output("#{bin}/gum join --vertical foo bar").chomp + assert_equal "foobar", shell_output("#{bin}/gum join foo bar").chomp + end +end diff --git a/Formula/g/gumbo-parser.rb b/Formula/g/gumbo-parser.rb new file mode 100644 index 0000000000000..5d91068ec7216 --- /dev/null +++ b/Formula/g/gumbo-parser.rb @@ -0,0 +1,41 @@ +class GumboParser < Formula + desc "C99 library for parsing HTML5" + homepage "https://codeberg.org/gumbo-parser/gumbo-parser" + url "https://codeberg.org/gumbo-parser/gumbo-parser/archive/0.13.1.tar.gz" + sha256 "1a054d1e53d556641a6666537247411a77b0c18ef6ad5df23e30d2131676ef81" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4fc6871a20b27a9e5462740793f01648b5a06d97f53e1c2e3a1be9b0b39eb700" + sha256 cellar: :any, arm64_sonoma: "1e1b191a7db8660d1625533cdd4f56f1627505c8e41d6d40eee4ad62d82d62ce" + sha256 cellar: :any, arm64_ventura: "ad2bba838cfdc4dabbdcb27921cacade5606f6154d0f4dfc3afbc6e50c1d8e37" + sha256 cellar: :any, sonoma: "fe7318f9114cdd67e66d6df0fdcd5ffd3d064bfff7d1adc87c0b2cf09c28fbd5" + sha256 cellar: :any, ventura: "e2cf0436b1de9343e4cf39d4f6c10bbbbef875a7ab45e5c6eee482f5d94a7fe0" + sha256 cellar: :any_skip_relocation, arm64_linux: "1fa8e5deaf3b5d23b3cd03388c53cab34b0a3056936bc3faee12a59c65fcc8cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b6bd03113d6c4cfb31850dd01825240596918b7463f93e000f606a1f6a65202c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :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 "gumbo.h" + + int main() { + GumboOutput* output = gumbo_parse("

Hello, World!

"); + gumbo_destroy_output(&kGumboDefaultOptions, output); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-L#{lib}", "-lgumbo", "-o", "test" + system "./test" + end +end diff --git a/Formula/g/gupnp-av.rb b/Formula/g/gupnp-av.rb new file mode 100644 index 0000000000000..a9e4975d2be4d --- /dev/null +++ b/Formula/g/gupnp-av.rb @@ -0,0 +1,57 @@ +class GupnpAv < Formula + desc "Library to help implement UPnP A/V profiles" + homepage "https://wiki.gnome.org/GUPnP/" + url "https://download.gnome.org/sources/gupnp-av/0.14/gupnp-av-0.14.3.tar.xz" + sha256 "abe2046043e66a9529365d89059be12219c21a4ede0c4743703b0fd9aaf17bb4" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_sequoia: "52e96af2014c55ac944a7a12ce3983a51fb4d67b1476bab9c197511eb26f17d4" + sha256 arm64_sonoma: "f5fa71cfa4de6c5d2eb41b3481035b601b9346002d2e0314d2b475414e293a67" + sha256 arm64_ventura: "4ac0ba69dc914ac64f6dfb684499e3da9d4b0ca15745b362cc20dfb7b5832075" + sha256 sonoma: "bed183c138c06172f184183d91dc750a20c53e35ddfdc5edef3e3562f5643cd7" + sha256 ventura: "10dfe0149fcc7e18fb487e427ccb69d8dbc7cd88c96c8ad1045eef7690ea2a77" + sha256 arm64_linux: "09905f96300d4ebc606466615ceca173a6fe4807e916d600df67692f9b3a0cd7" + sha256 x86_64_linux: "e130c48d351f4491f7c9a5ed5ca73510edf4fdfdadb33186e966e0650d73bac6" + end + + depends_on "gobject-introspection" => :build + depends_on "intltool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + + depends_on "gettext" + depends_on "glib" + + uses_from_macos "libxml2" + + 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(int argc, char *argv[]) { + GType type = gupnp_media_collection_get_type(); + + // Check if the type is valid + if (type == 0) { + g_print("Failed to get GType\\n"); + return 1; + } + + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gupnp-av-1.0 glib-2.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gupnp-tools.rb b/Formula/g/gupnp-tools.rb new file mode 100644 index 0000000000000..dbfb96343efe9 --- /dev/null +++ b/Formula/g/gupnp-tools.rb @@ -0,0 +1,46 @@ +class GupnpTools < Formula + desc "Free replacements of Intel's UPnP tools" + homepage "https://wiki.gnome.org/GUPnP/" + url "https://download.gnome.org/sources/gupnp-tools/0.12/gupnp-tools-0.12.2.tar.xz" + sha256 "4c92f2d1a3d454ec1f5fb05ef08ca34df9c743af64c8b5965c35884d46cb005c" + license all_of: ["GPL-2.0-or-later", "LGPL-2.0-or-later"] + + bottle do + sha256 arm64_sequoia: "d769ee08439b846b2a90fff8ac563aef69c0e5b9aeeb4f04c79d843b892c36b8" + sha256 arm64_sonoma: "065c59cdc36ec8557bdca9bc3da04847cfcd2e7e55ea4a161e6ee669601639d0" + sha256 arm64_ventura: "323caa61cc2fcb5fb594cd8c84f6761530bfb7e48fa160ae77f491ea98d1fe5c" + sha256 sonoma: "58c18fa2d0b58685ddb29a4d05064b4b1b76f537a63c943d6ba9db792a40b0d5" + sha256 ventura: "e9282722d1cba7a1661fa377fb504f6162350fc45382417172ae4babeab4ba8b" + sha256 arm64_linux: "2de86896f479386cda2f9f02c314f7f30456698873e493e57e96b2ef6c7c1581" + sha256 x86_64_linux: "6159c1527a0dfef2c43b726927c57fc69d64b0a51d4ff6a42809dea33ae5221c" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gssdp" + depends_on "gtk+3" + depends_on "gtksourceview4" + depends_on "gupnp" + depends_on "gupnp-av" + depends_on "libsoup" + depends_on "libxml2" + + 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 + system bin/"gupnp-universal-cp", "-h" + system bin/"gupnp-av-cp", "-h" + end +end diff --git a/Formula/g/gupnp.rb b/Formula/g/gupnp.rb new file mode 100644 index 0000000000000..a496983d22a41 --- /dev/null +++ b/Formula/g/gupnp.rb @@ -0,0 +1,91 @@ +class Gupnp < Formula + include Language::Python::Shebang + + desc "Framework for creating UPnP devices and control points" + homepage "https://wiki.gnome.org/Projects/GUPnP" + url "https://download.gnome.org/sources/gupnp/1.6/gupnp-1.6.8.tar.xz" + sha256 "70a003cebd68577293fb3e6af49ff902203bf8768b2fc5d651ddc1f0fa1e11e9" + license "LGPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0d73be784e10b682d081fa15b4779f54cf372468c0ae538d9d1468a135ca460b" + sha256 cellar: :any, arm64_sonoma: "c2e208114785c8a6891e62c0372c90a44879f1f03551cf7ea0948acf39aca197" + sha256 cellar: :any, arm64_ventura: "daf4ba3e00e3c0931a340c6dd4259840deeb0ca477d3f055a48ed517ddf14a25" + sha256 cellar: :any, sonoma: "666d7700b2ad4fb6ef4811186eb2b82fce1029e990bb7fecfec1f680c72eb08e" + sha256 cellar: :any, ventura: "d73e698c784354e7dcefedda8057a17d3fe4d5274ffc0ce96cce07b441639a12" + sha256 arm64_linux: "5c354c24487b881facf052d72ca33238ed108d8e599ed53f57d5e3c75005c046" + sha256 x86_64_linux: "6f3b4dbadddd74af18147095bf99055d590bfe0ffce1eca0a4cce2aaf261abb1" + end + + depends_on "docbook-xsl" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "vala" => :build + depends_on "gettext" + depends_on "glib" + depends_on "gssdp" + depends_on "libsoup" + depends_on "libxml2" + depends_on "python@3.13" + + def install + ENV.prepend_path "XDG_DATA_DIRS", HOMEBREW_PREFIX/"share" + 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" + rewrite_shebang detected_python_shebang, *bin.children + end + + test do + gnupnp_version = version.major_minor.to_s + gssdp_version = Formula["gssdp"].version.major_minor.to_s + + system bin/"gupnp-binding-tool-#{gnupnp_version}", "--help" + (testpath/"test.c").write <<~C + #include + + static GMainLoop *main_loop; + + int main (int argc, char **argv) + { + GUPnPContext *context; + GUPnPControlPoint *cp; + + context = gupnp_context_new (NULL, 0, NULL); + cp = gupnp_control_point_new + (context, "urn:schemas-upnp-org:service:WANIPConnection:1"); + + main_loop = g_main_loop_new (NULL, FALSE); + g_main_loop_unref (main_loop); + g_object_unref (cp); + g_object_unref (context); + + return 0; + } + C + + libxml2 = if OS.mac? + "-I#{MacOS.sdk_path}/usr/include/libxml2" + else + "-I#{Formula["libxml2"].include}/libxml2" + end + + system ENV.cc, testpath/"test.c", + "-I#{include}/gupnp-#{gnupnp_version}", + "-L#{lib}", + "-lgupnp-#{gnupnp_version}", + "-I#{Formula["gssdp"].opt_include}/gssdp-#{gssdp_version}", + "-L#{Formula["gssdp"].opt_lib}", "-lgssdp-#{gssdp_version}", + "-I#{Formula["glib"].opt_include}/glib-2.0", + "-I#{Formula["glib"].opt_lib}/glib-2.0/include", + "-L#{Formula["glib"].opt_lib}", + "-lglib-2.0", "-lgobject-2.0", + "-I#{Formula["libsoup"].opt_include}/libsoup-3.0", + libxml2, "-o", testpath/"test" + system "./test" + end +end diff --git a/Formula/g/gurk.rb b/Formula/g/gurk.rb new file mode 100644 index 0000000000000..c38909b93d9b8 --- /dev/null +++ b/Formula/g/gurk.rb @@ -0,0 +1,46 @@ +class Gurk < Formula + desc "Signal Messenger client for terminal" + homepage "https://github.com/boxdot/gurk-rs" + url "https://github.com/boxdot/gurk-rs/archive/refs/tags/v0.7.1.tar.gz" + sha256 "e86e6e0938439ac84af5b1f08a99810f0e632c60c63ba58e566181ffd2578874" + license "AGPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f0cc3cef149a12b05ca5b52ca1ea0d888b5f65dd083e4b315f4b3a5a77829a3b" + sha256 cellar: :any, arm64_sonoma: "8e156d730b5d988e6b33a2a783067c65010c2624eba23d7b3e28d3446300413f" + sha256 cellar: :any, arm64_ventura: "fe8c8e3fbff8fa370e82484f882e8455c122d439bf2a81cd68cca44f822db364" + sha256 cellar: :any, sonoma: "7d6d5437c710ed6103022b2f61fdf0e88ee8096e206bd5d2e4411fe28fd50c26" + sha256 cellar: :any, ventura: "a91f26706d7f12cab12b4ca8c532cb49c5327cc63e7ba3929a10a4dc1fcfd93b" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7285b0beae708e057aed8f506b9eef76657e7a8739e25c390e877dff026ea45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "699e7f4e25955cd8a7613da7bf1f3b07d345672d3b2dac7f8d466fca61f8909c" + end + + depends_on "pkgconf" => :build + depends_on "protobuf" => :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 + assert_match version.to_s, shell_output("#{bin}/gurk --version") + + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + begin + output_log = testpath/"output.log" + pid = spawn bin/"gurk", "--relink", [:out, :err] => output_log.to_s + sleep 2 + assert_match "Please enter your display name", output_log.read + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/g/gut.rb b/Formula/g/gut.rb new file mode 100644 index 0000000000000..147c43695bb38 --- /dev/null +++ b/Formula/g/gut.rb @@ -0,0 +1,36 @@ +class Gut < Formula + desc "Beginner friendly porcelain for git" + homepage "https://gut-cli.dev/" + url "https://github.com/julien040/gut/archive/refs/tags/0.3.2.tar.gz" + sha256 "49431ba0d24f9abf4c7cdbdf1956d2b6e70e16f955b5bbb70d8d8f4b8a5a48d1" + license "MIT" + head "https://github.com/julien040/gut.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2ffd25ab7b96ef2951a298214af160e7beb7e0079019bfac20f398bec5a42ce0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "993f5e0250aa0c86e7f439a332093c1e3384fcc5fd3979ba09485d0816947dc1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e0c4fba2fc790008bd0813b2313e81f75e2d02539e38f09141ee4082c5cafeb3" + sha256 cellar: :any_skip_relocation, sonoma: "6e61dc52c2aecadc43b95b5a2a1e3c4b278ac6c182b37d989e81af5bdf162847" + sha256 cellar: :any_skip_relocation, ventura: "c0bf2735f14841209395250135915692de7df22bafe1ad32e0e9d2f47c5b7ff5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "41e669eaafcb962c1f07cfe0daed82e5a7342d017e8c0160059498c168db8d35" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/julien040/gut/src/telemetry.gutVersion=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"gut", "completion") + end + + test do + system bin/"gut", "telemetry", "disable" + + assert_match version.to_s, shell_output("#{bin}/gut --version") + + system "git", "init", "--initial-branch=main" + system "git", "commit", "--allow-empty", "-m", "test" + assert_match "on branch main", shell_output("#{bin}/gut whereami") + end +end diff --git a/Formula/g/gvp.rb b/Formula/g/gvp.rb new file mode 100644 index 0000000000000..2115aa8adc3bc --- /dev/null +++ b/Formula/g/gvp.rb @@ -0,0 +1,28 @@ +class Gvp < Formula + desc "Go versioning packager" + homepage "https://github.com/pote/gvp" + url "https://github.com/pote/gvp/archive/refs/tags/v0.3.0.tar.gz" + sha256 "e1fccefa76495293350d47d197352a63cae6a014d8d28ebdedb785d4304ee338" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "7570737e59ef17b2cde9b25b56a9f148a839924b0e0bc9b9a91e30ee95b6a3e6" + end + + # Upstream fix for "syntax error near unexpected token `;'" + patch do + url "https://github.com/pote/gvp/commit/11c4cefd.patch?full_index=1" + sha256 "19c59c5185d351e05d0b3fbe6a4dba3960c34a804d67fe320e3189271374c494" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"gvp", "in" + assert File.directory? ".godeps/src" + end +end diff --git a/Formula/g/gwenhywfar.rb b/Formula/g/gwenhywfar.rb new file mode 100644 index 0000000000000..2419ae668b746 --- /dev/null +++ b/Formula/g/gwenhywfar.rb @@ -0,0 +1,141 @@ +class Gwenhywfar < Formula + desc "Utility library required by aqbanking and related software" + homepage "https://www.aquamaniac.de/rdm/projects/gwenhywfar" + url "https://www.aquamaniac.de/rdm/attachments/download/529/gwenhywfar-5.12.0.tar.gz" + sha256 "0ad5f1447703211f1610053a94bce1e82abceda2222a2ecc9cf45b148395d626" + license "LGPL-2.1-or-later" + + livecheck do + url "https://www.aquamaniac.de/rdm/projects/gwenhywfar/files" + regex(/href=.*?gwenhywfar[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "36e7bb5dd979060e85491ba7abad1220aeb8b69b00340cf6c162edf7bb9ab63d" + sha256 arm64_sonoma: "1dd92fec7f8e3ab7426077ca39df0ee64c989378a71bd8a0926d85f08d349495" + sha256 arm64_ventura: "f1ef551aa010c77293d9fa52fcc29390c8c5455846fb4fbf367132b8e6062ae7" + sha256 sonoma: "32c516bddf6b6850809f4019467e0ef959e5c999f382886e21e23b7f89db4902" + sha256 ventura: "1778cd3befe21f89fb6b0368871a0b8e4348e4ba9510f19b049fd80172caec9e" + sha256 x86_64_linux: "8a62c76819f61280a29d8961655ff5c396cda6e957e6e733521004014ac7aa6e" + end + + depends_on "gettext" => :build + depends_on "cmake" => :test + depends_on "gnutls" + depends_on "libgcrypt" + depends_on "libgpg-error" + depends_on "openssl@3" + depends_on "pkgconf" # gwenhywfar-config needs pkg-config for execution + depends_on "qt@5" + + on_macos do + depends_on "gettext" + end + + conflicts_with "go-size-analyzer", because: "both install `gsa` binaries" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + # Fix endianness handling for macos builds, emailed upstream about this patch + patch :DATA + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + if DevelopmentTools.clang_build_version >= 1500 + ENV.append_to_cflags "-Wno-int-conversion -Wno-incompatible-function-pointer-types" + end + + inreplace "gwenhywfar-config.in.in", "@PKG_CONFIG@", "pkg-config" + guis = ["cpp", "qt5"] + guis << "cocoa" if OS.mac? + system "./configure", "--disable-silent-rules", + "--with-guis=#{guis.join(" ")}", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + GWEN_Init(); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}/gwenhywfar5", "-L#{lib}", "-lgwenhywfar", "-o", "test_c" + system "./test_c" + + system ENV.cxx, "test.c", "-I#{include}/gwenhywfar5", "-L#{lib}", "-lgwenhywfar", "-o", "test_cpp" + system "./test_cpp" + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.29) + project(test_gwen) + + find_package(Qt5 REQUIRED Core Widgets) + find_package(gwenhywfar REQUIRED) + find_package(gwengui-cpp REQUIRED) + find_package(gwengui-qt5 REQUIRED) + + add_executable(${PROJECT_NAME} test.c) + + target_link_libraries(${PROJECT_NAME} PUBLIC + gwenhywfar::core + gwenhywfar::gui-cpp + gwenhywfar::gui-qt5 + ) + CMAKE + + args = std_cmake_args + args << "-DQt5_DIR=#{Formula["qt@5"].opt_prefix/"lib/cmake/Qt5"}" + + system "cmake", testpath.to_s, *args + system "make" + end +end + +__END__ +diff --git a/src/base/endianfns.h b/src/base/endianfns.h +index 2db9731..1d73968 100644 +--- a/src/base/endianfns.h ++++ b/src/base/endianfns.h +@@ -28,6 +28,7 @@ + #include + + ++ + #if GWENHYWFAR_SYS_IS_WINDOWS + /* assume little endian for now (is there any big endian Windows system??) */ + # define GWEN_ENDIAN_LE16TOH(x) (x) +@@ -39,8 +40,14 @@ + # define GWEN_ENDIAN_LE64TOH(x) (x) + # define GWEN_ENDIAN_HTOLE64(x) (x) + #else +-/* for Linux and others use definitions from endian.h */ +-# include ++/* Include portable_endian.h for cross-platform support */ ++# if __has_include("portable_endian.h") ++# include "portable_endian.h" ++# elif __has_include() ++# include ++# else ++# error "Neither portable_endian.h nor endian.h found. Cannot determine endianness." ++# endif + + # define GWEN_ENDIAN_LE16TOH(x) le16toh(x) + # define GWEN_ENDIAN_HTOLE16(x) htole16(x) +@@ -52,7 +59,4 @@ + # define GWEN_ENDIAN_HTOLE64(x) htole64(x) + #endif + +- +- +- + #endif diff --git a/Formula/g/gws.rb b/Formula/g/gws.rb new file mode 100644 index 0000000000000..334dc82bc2b0d --- /dev/null +++ b/Formula/g/gws.rb @@ -0,0 +1,28 @@ +class Gws < Formula + desc "Manage workspaces composed of git repositories" + homepage "https://streakycobra.github.io/gws/" + url "https://github.com/StreakyCobra/gws/archive/refs/tags/0.2.0.tar.gz" + sha256 "f92b7693179c2522c57edd578abdb90b08f6e2075ed27abd4af56c1283deab1a" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0d31f65a9ff26f5e0d80055636889fe835445ffcdcccb144333e042ae2b771aa" + end + + depends_on "bash" + + def install + bin.install "src/gws" + + bash_completion.install "completions/bash" + zsh_completion.install "completions/zsh" + end + + test do + system "git", "init", "project" + system bin/"gws", "init" + output = shell_output("#{bin}/gws status") + assert_equal "project:\n * Clean [Local only repository]\n", output + end +end diff --git a/Formula/g/gwt.rb b/Formula/g/gwt.rb new file mode 100644 index 0000000000000..a486addc77676 --- /dev/null +++ b/Formula/g/gwt.rb @@ -0,0 +1,31 @@ +class Gwt < Formula + desc "Google web toolkit" + homepage "https://www.gwtproject.org/" + url "https://github.com/gwtproject/gwt/releases/download/2.12.2/gwt-2.12.2.zip" + sha256 "32c17bbc8e98548c0be433aab36a3b8ba7428cfc70a26c41c4af4e0d6ecff1e1" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "82a74ed6f9efb134bb789174581dd637b7986775ec1ced9fac1d24b453e9a609" + end + + depends_on "openjdk" + + def install + rm Dir["*.cmd"] # remove Windows cmd files + libexec.install Dir["*"] + + (bin/"i18nCreator").write_env_script libexec/"i18nCreator", Language::Java.overridable_java_home_env + (bin/"webAppCreator").write_env_script libexec/"webAppCreator", Language::Java.overridable_java_home_env + end + + test do + system bin/"webAppCreator", "sh.brew.test" + assert_path_exists testpath/"src/sh/brew/test.gwt.xml" + end +end diff --git a/Formula/g/gwyddion.rb b/Formula/g/gwyddion.rb new file mode 100644 index 0000000000000..7d73acdd0e4e5 --- /dev/null +++ b/Formula/g/gwyddion.rb @@ -0,0 +1,76 @@ +class Gwyddion < Formula + desc "Scanning Probe Microscopy visualization and analysis tool" + homepage "http://gwyddion.net/" + url "https://downloads.sourceforge.net/project/gwyddion/gwyddion/2.68/gwyddion-2.68.tar.xz" + sha256 "725c3f71738362b10b1e2cf76d391684cf2f15a71a2b34ef1caddabd6d5a9bfa" + license "GPL-2.0-or-later" + + livecheck do + url "http://gwyddion.net/download.php" + regex(/stable version Gwyddion v?(\d+(?:\.\d+)+):/i) + end + + bottle do + sha256 arm64_sonoma: "b43e730eff6442bc243f8ac823d66f9662ddb19d3b45ba2fd4839539633ceec1" + sha256 arm64_ventura: "102134d0cc82e99b16f10beca65fbff50cf90fc20e8dfb9109947f38397c6e27" + sha256 sonoma: "2a46d8ac980a10cff9a5dd4e6ad6676732f36f3683e3f15527e73cbd2fbc00fe" + sha256 ventura: "98f80d6914545e03d705f8b36386f25c40c24b28790c68b3cd960f57736777e0" + sha256 arm64_linux: "50c3c92bfa90b717cd0363f1848160dd2f09460cf7c9bc2bac377dc773c976cc" + sha256 x86_64_linux: "ddb58bb61054c7d019aa1db4b8da4378829026a723bcd40d3181382e2809f562" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "cairo" + depends_on "fftw" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+" + depends_on "gtkglext" + depends_on "libpng" + depends_on "libxml2" + depends_on "minizip" + depends_on "pango" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_macos do + # Regenerate autoconf files to avoid flat namespace in library + # (autoreconf runs gtkdocize, provided by gtk-doc) + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gtk-doc" => :build + depends_on "libtool" => :build + # TODO: depends_on "gtk-mac-integration" + depends_on "at-spi2-core" + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if OS.mac? + system "./configure", "--disable-desktop-file-update", + "--disable-pygwy", + "--disable-silent-rules", + "--with-html-dir=#{doc}", + "--without-gtksourceview", + *std_configure_args + system "make", "install" + end + + test do + system bin/"gwyddion", "--version" + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + const gchar *string = gwy_version_string(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gwyddion").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gx.rb b/Formula/g/gx.rb new file mode 100644 index 0000000000000..a18d5956b7547 --- /dev/null +++ b/Formula/g/gx.rb @@ -0,0 +1,39 @@ +class Gx < Formula + desc "Language-agnostic, universal package manager" + homepage "https://github.com/whyrusleeping/gx" + url "https://github.com/whyrusleeping/gx/archive/refs/tags/v0.14.3.tar.gz" + sha256 "2c0b90ddfd3152863f815c35b37e94d027216c6ba1c6653a94b722bf6e2b015d" + license "MIT" + head "https://github.com/whyrusleeping/gx.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2f163d19c275918bb2de9aed07722dda266c010469bcb562bfbd65666d32b64c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "54ee0e7162c46736a63a8587f315b69d2090386bac3c46b0da3a9fcbfda5258f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a49ac2040542b71f63e9c30592e102b07fc10561a79b99014773f7c88ffe7c47" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f1323ff13674b582766dccca83ee63a63314eb3fbc0ccfd815dd9138e073b1f1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7099419ae5d6da42d66de65b1a4b9355f586f7484a6a738d1caa1c77ff917670" + sha256 cellar: :any_skip_relocation, sonoma: "43a996d21408e29e6b7e4dc7b169f97da742ec8ad4d629cd95a6f43c6cc3c88d" + sha256 cellar: :any_skip_relocation, ventura: "e707d45bd29a98762cee6992eccec4b0015c75d6d009488abfafeb96f63684f5" + sha256 cellar: :any_skip_relocation, monterey: "800b33c5da09b5165c011858adf22f136390f84c3636a66c32f6114fd9294ea4" + sha256 cellar: :any_skip_relocation, big_sur: "5171470b8fe21652a1ae5fef81f0b463a3c10fdac821134f2e8d7635af1ccdda" + sha256 cellar: :any_skip_relocation, catalina: "f737f5829c0e1ce2ff58c56515e77f3797c30d614a53ebbf663985d5564c62db" + sha256 cellar: :any_skip_relocation, mojave: "bd03f428c3e52561caefaa09c6abc92b21faa226ad02abeeb6c74217ca1dfbbf" + sha256 cellar: :any_skip_relocation, high_sierra: "e6634c1b68abcb48984a7d681248393ca26824a81496c567ef23029ff9a892f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "40fe8e9f82a981fbf440651d85215bdc246ef4da138b5378da7318b4f3f04645" + end + + # project is no longer maintained as people should be + # expected to use go modules to manage dependencies + # also see upstream discussion on this, https://github.com/whyrusleeping/gx/issues/247 + deprecate! date: "2024-12-07", because: :unmaintained + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "ERROR: no package found in this directory or any above", shell_output("#{bin}/gx deps", 1) + end +end diff --git a/Formula/g/gxml.rb b/Formula/g/gxml.rb new file mode 100644 index 0000000000000..ed73aa410fd59 --- /dev/null +++ b/Formula/g/gxml.rb @@ -0,0 +1,61 @@ +class Gxml < Formula + desc "GObject-based XML DOM API" + homepage "https://wiki.gnome.org/GXml" + url "https://gitlab.gnome.org/GNOME/gxml/-/archive/0.20.4/gxml-0.20.4.tar.bz2" + sha256 "d8d8b16ff701d0c5ff04b337b246880ec4523abfe897a1f77acdf7d73fb14b84" + license "LGPL-2.1-or-later" + revision 1 + + bottle do + sha256 arm64_sequoia: "47216df062f881bebea1796d72ce28358e3eeb746dbf9215e80ae4476daa3902" + sha256 arm64_sonoma: "8f97268cf4c3e02ebb80664ad7130ed9e8a73651c8ee4a4edff6a0c49f109518" + sha256 arm64_ventura: "e6e950ee7e48514e6ba3b1f81037e99799886d05adf2fdf7a31d3939bf9b7196" + sha256 arm64_monterey: "6fe172d27e676eb132acbef9b7a82d7e42658b1998babea50783504c2c4fa22c" + sha256 sonoma: "09e480a1b3fc86510efff4ec18fb6f2566d2f29a1c847289329db6625c4f3c25" + sha256 ventura: "bee9013ba03bee81e7224dcf0a4788daa943b53143033534b10f761d6c210630" + sha256 monterey: "19b816073438f3440875bfc354c81d5ac877576df616aa633a63c6951887fcd4" + sha256 arm64_linux: "138f902ae62c44ff26d94030f742d6d8bb7e0a2067337b15b4440562823acd9d" + sha256 x86_64_linux: "2655af742b291d5b01f09956dd4d7f812cf0351b4285a0a2e04bec744bfdc4bc" + 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 "libgee" + depends_on "libxml2" + + on_macos do + depends_on "gettext" + end + + # fix version comparison in gxml.pc.in, upstream pr ref, https://gitlab.gnome.org/GNOME/gxml/-/merge_requests/28 + patch do + url "https://gitlab.gnome.org/GNOME/gxml/-/commit/6551103abd5143e51814ec1dce9b36bb9a46e09f.diff" + sha256 "b87f585ab782b2ff4f024c45c9a90791c2023e3703756f2eb799591e7978e640" + end + + def install + system "meson", "setup", "build", "-Dintrospection=true", "-Ddocs=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[]) { + GType type = gxml_document_get_type(); + return 0; + } + C + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libxml2"].opt_lib/"pkgconfig" + flags = shell_output("pkgconf --cflags --libs libxml-2.0 gxml-0.20").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/g/gyb.rb b/Formula/g/gyb.rb new file mode 100644 index 0000000000000..ef838624362c0 --- /dev/null +++ b/Formula/g/gyb.rb @@ -0,0 +1,168 @@ +class Gyb < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "CLI for backing up and restoring Gmail messages" + homepage "https://github.com/GAM-team/got-your-back/" + # Check gyb.py imports for any changes. Update pypi_formula_mappings.json (if necessary) + # and then run `brew update-python-resources gyb`. + url "https://github.com/GAM-team/got-your-back/archive/refs/tags/v1.82.tar.gz" + sha256 "9cd29c81c78fceebe1e7ed34627bb27d758a250ccae92aecf6bacf1da6dfed09" + license "Apache-2.0" + head "https://github.com/GAM-team/got-your-back.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "13639e3e4d260b6ccd479c3df182713a84a572760e3ab024547191e2451d8269" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "634e92eab0fe3dcd78f78d4bb41afcdc7e59f9c41b0173a75e775865ad749e78" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d0576cedbd49932143f46d8c45403a1bab82673d2fe7c31f02c52fc803ee3afc" + sha256 cellar: :any_skip_relocation, sonoma: "f4cb28399d355bd65cd510920d7dce4f8938520978a7fb7a01241554dbf6f901" + sha256 cellar: :any_skip_relocation, ventura: "a57877c31dd762e0c1e6c0ebc58de904b9ecd22dad9c3ea7231b67e96fed1bc0" + sha256 cellar: :any_skip_relocation, arm64_linux: "1412409752e1a5f78caff35979987ab179a00cf5592c43c90bf6e1c7128ec0a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8278d5b011c57823852f6df9a866255be2e5b2230a7f33b5820ead35d46573a" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/c3/38/a0f315319737ecf45b4319a8cd1f3a908e29d9277b46942263292115eee7/cachetools-5.5.0.tar.gz" + sha256 "2cc24fb4cbe39633fb7badd9db9ca6295d766d9c2995f245725a46715d050f2a" + 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 "google-api-core" do + url "https://files.pythonhosted.org/packages/28/c8/046abf3ea11ec9cc3ea6d95e235a51161039d4a558484a997df60f9c51e9/google_api_core-2.21.0.tar.gz" + sha256 "4a152fd11a9f774ea606388d423b68aa7e6d6a0ffe4c8266f74979613ec09f81" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/ff/36/a587319840f32c8a28b6700805ad18a70690f985538ea49e87e210118884/google_api_python_client-2.149.0.tar.gz" + sha256 "b9d68c6b14ec72580d66001bd33c5816b78e2134b93ccc5cf8f624516b561750" + 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 "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/cc/0f/1772edb8d75ecf6280f1c7f51cbcebe274e8b17878b382f63738fd96cee5/google_auth_oauthlib-1.2.1.tar.gz" + sha256 "afd0cad092a2eaa53cd8e8298557d6de1034c6cb4a740500b5357b648af97263" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/53/3b/1599ceafa875ffb951480c8c74f4b77646a6b80e80970698f2aa93c216ce/googleapis_common_protos-1.65.0.tar.gz" + sha256 "334a29d07cddc3aa01dee4988f9afd9b2916ee2ff49d6b757155dc0d197852c0" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/3d/ad/2371116b22d616c194aa25ec410c9c6c37f23599dcd590502b74db197584/httplib2-0.22.0.tar.gz" + sha256 "d7a10bc5ef5ab08322488bde8c726eeee5c8618723fdb399597ec58f3d82df81" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/3e/fc/e9a65cd52c1330d8d23af6013651a0bc50b6d76bcbdf91fae7cd19c68f29/proto-plus-1.24.0.tar.gz" + sha256 "30b72a5ecafe4406b0d339db35b56c4059064e69227b8c3bda7462397f966445" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/b1/a4/4579a61de526e19005ceeb93e478b61d77aa38c8a85ad958ff16a9906549/protobuf-5.28.2.tar.gz" + sha256 "59379674ff119717404f7454647913787034f03fe7049cbef1d74a97bb4593f0" + 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 "pyparsing" do + url "https://files.pythonhosted.org/packages/83/08/13f3bce01b2061f2bbd582c9df82723de943784cf719a35ac886c652043a/pyparsing-3.1.4.tar.gz" + sha256 "f86ec8d1a83f11977c9a6ea7598e8c27fc5cddfa5b07ea2241edbbde1d7bc032" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/aa/65/7d973b89c4d2351d7fb232c2e452547ddfa243e93131e7cfa766da627b52/rsa-4.9.tar.gz" + sha256 "e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/d2/5a/4742fdba39cd02a56226815abfa72fe0aa81c33bed16ed045647d6000eba/uritemplate-4.1.1.tar.gz" + sha256 "4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def python3 + "python3.13" + end + + def install + # change user config location from default of executable own path + inreplace "gyb.py", "default=getProgPath()", + "default='#{pkgetc}'" + + venv = virtualenv_create(libexec, python3) + venv.pip_install resources + + rw_info = python_shebang_rewrite_info(libexec/"bin/python") + rewrite_shebang rw_info, "gyb.py" + bin.install "gyb.py" => "gyb" + (libexec/Language::Python.site_packages(python3)).install buildpath.glob("*.py") + end + + def post_install + pkgetc.mkpath + end + + def caveats + <<~EOS + Default config_folder: #{pkgetc} + EOS + end + + test do + assert_match version.to_s, pipe_output("#{bin}/gyb --version 2>&1") + # Below 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 "ERROR: --email is required.", shell_output(bin/"gyb", 1) + end +end diff --git a/Formula/g/gzip.rb b/Formula/g/gzip.rb new file mode 100644 index 0000000000000..269780ff897cc --- /dev/null +++ b/Formula/g/gzip.rb @@ -0,0 +1,30 @@ +class Gzip < Formula + desc "Popular GNU data compression program" + homepage "https://www.gnu.org/software/gzip/" + url "https://ftp.gnu.org/gnu/gzip/gzip-1.14.tar.gz" + mirror "https://ftpmirror.gnu.org/gzip/gzip-1.14.tar.gz" + sha256 "613d6ea44f1248d7370c7ccdeee0dd0017a09e6c39de894b3c6f03f981191c6b" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c82c69f648546f3d0e962e9012a2cb258b454b098ae880880dc88418dc544a41" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "595f0a87dd1fe49c90e97911e72335a00cf096adbf84dfb17745dbf351ab9d3b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d55108d43ddf0f8123694f06882e223023cf4346f9b9640d6c33b657d19260bf" + sha256 cellar: :any_skip_relocation, sonoma: "e590ecd558a1eec60fe790370d3ab2cde6d44fc918fe64ec98a56c31fbffc36c" + sha256 cellar: :any_skip_relocation, ventura: "39d86283bbdd91c6347ce5c7869e5a75db4d0bc6e961c8763fb7e81802cdeb55" + sha256 cellar: :any_skip_relocation, arm64_linux: "bf3ee62bd32f32b5288069e02bd54a9b1df35b2ec45dfc1a403aa95c010e0f6b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6cdbf878eda84da0ba1cac4bae09d3bf3c91ba1d5666806f9fa1ed19acc1f142" + end + + def install + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"foo").write "test" + system bin/"gzip", "foo" + system bin/"gzip", "-t", "foo.gz" + assert_equal "test", shell_output("#{bin}/gunzip -c foo") + end +end diff --git a/Formula/g/gzrt.rb b/Formula/g/gzrt.rb new file mode 100644 index 0000000000000..783cc939a656a --- /dev/null +++ b/Formula/g/gzrt.rb @@ -0,0 +1,68 @@ +class Gzrt < Formula + desc "Gzip recovery toolkit" + homepage "https://www.urbanophile.com/arenn/coding/gzrt/gzrt.html" + url "https://www.urbanophile.com/arenn/coding/gzrt/gzrt-0.8.tar.gz" + sha256 "b0b7dc53dadd8309ad9f43d6d6be7ac502c68ef854f1f9a15bd7f543e4571fee" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?gzrt[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a8383b91ba90e35c7cf4110167a631482dbbf1798faf36ab193ab2072aadfec5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a0aafbc9d11bc14764a79f044072cf6bb3ae9686fca63c2ccdad9b7001c77c82" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d6dfe52fd268de29704f3367daa802012d68b7162d957716d96d9da41bef80e6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "46794bf9bc734a2a73e7f7b8f9bb16825249bed562bd516a97aa8b2b3349b264" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b1bc6db3fef40f0c48ceac080ee84108364cf4ff1d94bb1423c1be5b2f14bc96" + sha256 cellar: :any_skip_relocation, sonoma: "d05c7de51bda8a52b47b8e8a3b8c8ec146d32c421992b94e2b99e67461de3adf" + sha256 cellar: :any_skip_relocation, ventura: "cfb47aeeccbaacbeefddc130b44f5c36e7660067dce5c903ebceac40199db8bf" + sha256 cellar: :any_skip_relocation, monterey: "003e9f13cb64da84793030b3b224e9dc2083b97b7bae69527857bb359f856331" + sha256 cellar: :any_skip_relocation, big_sur: "6f9f146178364bb1306a145076a4c79f01f1ba08726b2e90a022597fe34b63f9" + sha256 cellar: :any_skip_relocation, catalina: "d1d5378de11679a973ce6a5893984b0431f7ad62f369215814927cdb5fbf6678" + sha256 cellar: :any_skip_relocation, mojave: "4d2f5fca0f32dd8a88d7aba3d8e6f926d89f74fa1748b9e7f618bdc76e3500fe" + sha256 cellar: :any_skip_relocation, high_sierra: "2e7f8e8743943f1e83c4b1ed6372fa3c4cab00f7a090dbb4f967b7fade1e5e20" + sha256 cellar: :any_skip_relocation, sierra: "da5c89596737f514900f32986dd9eb32f010c6c1b9f1643dd03a07eae7e383a7" + sha256 cellar: :any_skip_relocation, el_capitan: "01df00fd35c6eaee9d32da4644d694ce33deda79a9c3da0284b52694f94a9515" + sha256 cellar: :any_skip_relocation, arm64_linux: "654f7cd9822abb04c3e99f03452260a1ba3adb935d74199dfee2c67530b0eb51" + sha256 cellar: :any_skip_relocation, x86_64_linux: "befaf922391daf55b95098ef2c66c02fcd04813517cef56c60caf3cd1297d986" + end + + uses_from_macos "zlib" + + def install + system "make" + bin.install "gzrecover" + man1.install "gzrecover.1" + end + + test do + filename = "data.txt" + fixed_filename = "#{filename}.recovered" + path = testpath/filename + fixed_path = testpath/fixed_filename + + original_contents = "." * 1000 + path.write original_contents + + # Compress data into archive + Utils::Gzip.compress path + refute_path_exists path + + # Corrupt the archive to test the recovery process + File.open("#{path}.gz", "r+b") do |file| + file.seek(11) + data = file.read(1).unpack1("C*") + data = ~data + file.write([data].pack("C*")) + end + + # Verify that file corruption is detected and attempt to recover + system bin/"gzrecover", "-v", "#{path}.gz" + + # Verify that recovered data is reasonably close - unlike lziprecover, + # this process is not perfect, even for small errors + assert_match original_contents, fixed_path.read + end +end diff --git a/Formula/g2.rb b/Formula/g2.rb deleted file mode 100644 index d3f7ed1f14668..0000000000000 --- a/Formula/g2.rb +++ /dev/null @@ -1,34 +0,0 @@ -class G2 < Formula - desc "Friendly git client" - homepage "https://orefalo.github.io/g2/" - url "https://github.com/orefalo/g2/archive/v1.1.tar.gz" - sha256 "bc534a4cb97be200ba4e3cc27510d8739382bb4c574e3cf121f157c6415bdfba" - license "MIT" - head "https://github.com/orefalo/g2.git" - - bottle do - cellar :any_skip_relocation - sha256 "e9350d1a2278bc954807b784dd6f34044ba69bcbeef3c91410f4bac9affdc0ca" => :catalina - sha256 "64107e7e395a373205f8e4953082f90e86736b27c01198836ea3915a40362dc5" => :mojave - sha256 "172bb101cd40ab61ea7a6ce85798556da5bbb980ae050023e8e8ff9f4d2e2c52" => :high_sierra - sha256 "6bd5de5c1e1335c1be168bf5eec800c8ac5d0b4d16534a7e686d9c4e8d396417" => :sierra - sha256 "45c2029c3fc914866ba32966a78cba39b8415ba7f191cd1eaaf604db798b6d3f" => :el_capitan - sha256 "5645b9c9401aa9f047082612de0e7bbd119ff7fd9fd49d94d45ce2adfbbfb69a" => :yosemite - sha256 "41f5cd09949d53b4d46dfab4a17d5f3d77f65978ebb5e04e3433f9386d7846b4" => :mavericks - end - - def install - system "make", "prefix=#{prefix}", "install" - end - - def caveats - <<~EOS - To complete the installation: - . #{prefix}/g2-install.sh - - NOTE: This will install a new ~/.gitconfig, backing up any existing - file first. For more information view: - #{prefix}/README.md - EOS - end -end diff --git a/Formula/g3log.rb b/Formula/g3log.rb deleted file mode 100644 index beaf772bedb43..0000000000000 --- a/Formula/g3log.rb +++ /dev/null @@ -1,41 +0,0 @@ -class G3log < Formula - desc "Asynchronous, 'crash safe', logger that is easy to use" - homepage "https://github.com/KjellKod/g3log" - url "https://github.com/KjellKod/g3log/archive/1.3.3.tar.gz" - sha256 "d8cae14e1508490145d710f10178b2da9b86ce03fb2428a684fff35576fe5d5c" - license "Unlicense" - - bottle do - cellar :any - sha256 "b819589f20ba980113593517ca9d54109a9a7cec22f756126021e2276a56bca4" => :catalina - sha256 "1b95598a1e31c627a40d9a2b67edd10a35209dc1c426849163ee297ca05e2bc6" => :mojave - sha256 "ac0ea62242bf04f640a7bd2cdd56a0ab585cef139748e47fe4d3ec118510dfd0" => :high_sierra - 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.gsub(/TESTDIR/, testpath) - #include - #include - int main() - { - using namespace g3; - auto worker = LogWorker::createLogWorker(); - worker->addDefaultLogger("test", "TESTDIR"); - g3::initializeLogging(worker.get()); - LOG(DEBUG) << "Hello World"; - return 0; - } - EOS - system ENV.cxx, "-std=c++14", "test.cpp", "-L#{lib}", "-lg3logger", "-o", "test" - system "./test" - Dir.glob(testpath/"test.g3log.*.log").any? - end -end diff --git a/Formula/gabedit.rb b/Formula/gabedit.rb deleted file mode 100644 index f71cb55b41c6d..0000000000000 --- a/Formula/gabedit.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Gabedit < Formula - desc "GUI to computational chemistry packages like Gamess-US, Gaussian, etc." - homepage "https://gabedit.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gabedit/gabedit/Gabedit250/GabeditSrc250.tar.gz" - version "2.5.0" - sha256 "45cdde213a09294bbf2df5f324ea11fc4c4045b3f9d58e4d67979e6f071c7689" - revision 2 - - bottle do - cellar :any - rebuild 1 - sha256 "af6b9870f2b34921313f3f38329a507e450462bf74055880f8c572e153c78932" => :catalina - sha256 "c8bd86798356203a2e554310149b51299c2221827a030fd74763c9237996fc9f" => :mojave - sha256 "83b205bd7a01eb782a9346f048c3c2e217ba4dc425f620853a4da066563e6b5c" => :high_sierra - sha256 "72d3d9bda815ffda49197241c46139686fbc0a4b2c9aeab2dce258573e5ea17b" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - depends_on "gtkglext" - - def install - opengl_headers = MacOS.sdk_path/"System/Library/Frameworks/OpenGL.framework/Headers" - (buildpath/"brew_include").install_symlink opengl_headers => "GL" - - inreplace "CONFIG" do |s| - s.gsub! "-lX11", "" - s.gsub! "-lpangox-1.0", "" - s.gsub! "GTKCFLAGS =", "GTKCFLAGS = -I#{buildpath}/brew_include" - end - - args = [] - args << "OMPLIB=" << "OMPCFLAGS=" if ENV.compiler == :clang - system "make", *args - bin.install "gabedit" - end - - test do - assert_predicate bin/"gabedit", :exist? - end -end diff --git a/Formula/gaffitter.rb b/Formula/gaffitter.rb deleted file mode 100644 index e8ee6a9828dcc..0000000000000 --- a/Formula/gaffitter.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Gaffitter < Formula - desc "Efficiently fit files/folders to fixed size volumes (like DVDs)" - homepage "https://gaffitter.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gaffitter/gaffitter/1.0.0/gaffitter-1.0.0.tar.gz" - sha256 "c85d33bdc6c0875a7144b540a7cce3e78e7c23d2ead0489327625549c3ab23ee" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "a2381f4f6c482bc267117d445b342b599ec9fd67970a542bc1c680ece5e2cbfb" => :catalina - sha256 "92257fd5e186c821139d66eea640bc3c64911046199faedc171564c62d7cef32" => :mojave - sha256 "379feade37882f3b78accdda2131aa4530806d010f1fde6e879347c19a980786" => :high_sierra - sha256 "9e2fbfd84ae7779882cbf3cd5d9a19fd9f27e6d986bd9c953df9a6e5687e242d" => :sierra - sha256 "1ca49d04fb786415d210d04e59c9e7ab74ada5ed6e2d429eb5793a3f34ba3562" => :el_capitan - sha256 "66332311c91a27aaf93d9bfa9d8d7c7c373aad98eb80ff53efebd3b9a0c51ff7" => :yosemite - sha256 "be06c31a5074d00dbf23ef22f515a8f42855aebdf0f9ee1a592c0a2581ff8279" => :mavericks - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - system bin/"fit", "-t", "10m", "--show-size", testpath - end -end diff --git a/Formula/gambit-scheme.rb b/Formula/gambit-scheme.rb deleted file mode 100644 index 38daf6a06b9b5..0000000000000 --- a/Formula/gambit-scheme.rb +++ /dev/null @@ -1,43 +0,0 @@ -class GambitScheme < Formula - desc "Gambit Scheme is an implementation of the Scheme Language" - homepage "https://github.com/gambit/gambit" - url "https://github.com/gambit/gambit/archive/v4.9.3.tar.gz" - sha256 "a5e4e5c66a99b6039fa7ee3741ac80f3f6c4cff47dc9e0ff1692ae73e13751ca" - license "Apache-2.0" - revision 2 - - bottle do - sha256 "cc4d0841423822b27fd424f7eba3a0482f01266ef61c25ec4b1d49d211d6c50e" => :catalina - sha256 "9fc086d950cb20c99d1d24947a0599fab72525c8a2dbd2d448f94791a5a8f481" => :mojave - sha256 "8af81a5c228d029402bc150331cb03dc0695eeee8dd5a58ce497a7a49a19fa47" => :high_sierra - end - - depends_on "openssl@1.1" - - def install - args = %W[ - --prefix=#{prefix} - --enable-single-host - --enable-multiple-versions - --enable-default-runtime-options=f8,-8,t8 - --enable-openssl - ] - - system "./configure", *args - - # Fixed in gambit HEAD, but they haven't cut a release - inreplace "config.status" do |s| - s.gsub! %r{/usr/local/opt/openssl(?!@1\.1)}, "/usr/local/opt/openssl@1.1" - end - system "./config.status" - - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - assert_equal "0123456789", - shell_output("#{prefix}/current/bin/gsi -e \"(for-each write '(0 1 2 3 4 5 6 7 8 9))\"") - end -end diff --git a/Formula/gambit.rb b/Formula/gambit.rb deleted file mode 100644 index a9ae0eab6f954..0000000000000 --- a/Formula/gambit.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Gambit < Formula - desc "Software tools for game theory" - homepage "http://www.gambit-project.org/" - url "https://github.com/gambitproject/gambit/archive/v16.0.1.tar.gz" - sha256 "56bb86fd17575827919194e275320a5dd498708fd8bb3b20845243d492c10fef" - - bottle do - cellar :any - sha256 "c1bf628cb87dbed50a0bd5299b3921545a001999af7a061343caf6aa75784cf5" => :catalina - sha256 "849760c07650bf6d240e3d488ed984ef3f1520976cc402ec1afe215ac881aa08" => :mojave - sha256 "f5d187618279c18de8e290151ba7683a5b68e4b96203db1a05600eb84002d391" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "wxmac" - - def install - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - pkgshare.install "contrib" - end - - test do - system bin/"gambit-enumpure", pkgshare/"contrib/games/e02.efg" - system bin/"gambit-enumpoly", pkgshare/"contrib/games/e01.efg" - system bin/"gambit-enummixed", pkgshare/"contrib/games/e02.nfg" - system bin/"gambit-gnm", pkgshare/"contrib/games/e02.nfg" - system bin/"gambit-ipa", pkgshare/"contrib/games/e02.nfg" - system bin/"gambit-lcp", pkgshare/"contrib/games/e02.efg" - system bin/"gambit-lp", pkgshare/"contrib/games/2x2const.nfg" - system bin/"gambit-liap", pkgshare/"contrib/games/e02.nfg" - system bin/"gambit-simpdiv", pkgshare/"contrib/games/e02.nfg" - system bin/"gambit-logit", pkgshare/"contrib/games/e02.efg" - system bin/"gambit-convert", "-O", "html", pkgshare/"contrib/games/2x2.nfg" - end -end diff --git a/Formula/game-music-emu.rb b/Formula/game-music-emu.rb deleted file mode 100644 index 66a37fea135c3..0000000000000 --- a/Formula/game-music-emu.rb +++ /dev/null @@ -1,45 +0,0 @@ -class GameMusicEmu < Formula - desc "Videogame music file emulator collection" - homepage "https://bitbucket.org/mpyne/game-music-emu" - url "https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-0.6.3.tar.xz" - sha256 "aba34e53ef0ec6a34b58b84e28bf8cfbccee6585cebca25333604c35db3e051d" - revision 1 - head "https://bitbucket.org/mpyne/game-music-emu.git" - - bottle do - cellar :any - sha256 "b1e4bc55c6071006d0f8a3ec5f48790f1e2c530ea181dfe29946b9a38c3778fa" => :catalina - sha256 "0bf8874b6ec94564458c38292f9838df8a025adecb89a3b5b116c5f430473768" => :mojave - sha256 "edf564750290fb0de9a5d72df0711fd658a4f73ed7ae51f567083cef812222d6" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) - { - Music_Emu* emu; - gme_err_t error; - - error = gme_open_data((void*)0, 0, &emu, 44100); - - if (error == gme_wrong_file_type) { - return 0; - } else { - return -1; - } - } - EOS - - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", - "-lgme", "-o", "test", *ENV.cflags.to_s.split - system "./test" - end -end diff --git a/Formula/gammaray.rb b/Formula/gammaray.rb deleted file mode 100644 index 83c414424a76a..0000000000000 --- a/Formula/gammaray.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Gammaray < Formula - desc "Examine and manipulate Qt application internals at runtime" - homepage "https://www.kdab.com/gammaray" - url "https://github.com/KDAB/GammaRay/releases/download/v2.11.1/gammaray-2.11.1.tar.gz" - sha256 "87a1d72ad1ad6d1a0156c54a85b0976ab38c6a64136458ca7c4ee491566d25d0" - head "https://github.com/KDAB/GammaRay.git" - - bottle do - cellar :any - sha256 "d43f04f5d9d8f0f26ff7ec8164b8a6a6397174e56476a60abf7f592a5e8ef2d8" => :catalina - sha256 "daaad613868d4159d40b7c954dfca613ac68a6cbd75e1471d35e04958ff5ae16" => :mojave - sha256 "652ed0574b07f8e0bffa9b7927c718295cbc4d1e5b69148101923d8edebcf406" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "graphviz" - depends_on "qt" - - def install - # For Mountain Lion - ENV.libcxx - - system "cmake", *std_cmake_args, - "-DCMAKE_DISABLE_FIND_PACKAGE_Graphviz=ON", - "-DCMAKE_DISABLE_FIND_PACKAGE_VTK=OFF" - system "make", "install" - end - - test do - assert_predicate prefix/"GammaRay.app/Contents/MacOS/gammaray", :executable? - end -end diff --git a/Formula/gammu.rb b/Formula/gammu.rb deleted file mode 100644 index 02b281048db81..0000000000000 --- a/Formula/gammu.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Gammu < Formula - desc "Command-line utility to control a phone" - homepage "https://wammu.eu/gammu/" - url "https://dl.cihar.com/gammu/releases/gammu-1.41.0.tar.xz" - sha256 "8426b69b07b259de301f41163fab5587935e27b94cc5eefab9277773b3e4df8f" - license "GPL-2.0" - head "https://github.com/gammu/gammu.git" - - bottle do - sha256 "31de777eebd433187faa9f4c903e9adee6f1fc7376764819e88bf6564dec7095" => :catalina - sha256 "e9436fa704b9bb1008b95f742b59f830a7fd717c24c97565f71989273a6eef58" => :mojave - sha256 "fb23d0dd21c8a5f48155b3ea71f445d99ea86ce7f5c968266782fa52990a6267" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "glib" - depends_on "openssl@1.1" - - def install - # Disable opportunistic linking against Postgres - inreplace "CMakeLists.txt", "macro_optional_find_package (Postgres)", "" - mkdir "build" do - system "cmake", "..", "-DBASH_COMPLETION_COMPLETIONSDIR:PATH=#{bash_completion}", *std_cmake_args - system "make", "install" - end - end - - test do - system bin/"gammu", "--help" - end -end diff --git a/Formula/gandi.cli.rb b/Formula/gandi.cli.rb deleted file mode 100644 index a89c5e6c7b47f..0000000000000 --- a/Formula/gandi.cli.rb +++ /dev/null @@ -1,66 +0,0 @@ -class GandiCli < Formula - include Language::Python::Virtualenv - - desc "Command-line interface to Gandi.net products using the public API" - homepage "https://cli.gandi.net/" - url "https://files.pythonhosted.org/packages/75/6d/ff2097a1b8f0142034394ca6832abade773a36efa0916500522b7d190264/gandi.cli-1.5.tar.gz" - sha256 "a575be04fd373d4798ae16f6cbe03e8ed16255043788fb3de13bebfe7e621c84" - revision 2 - - bottle do - cellar :any - sha256 "22779ab21e92c826c99ade2c24c9a8ebd7b8ab952fcf70b7c3ddd312e0419ee7" => :catalina - sha256 "4a0a55dbe51a2c20328b95fc90b8a89f6d4fc6c3118579e78d1a526a0712b351" => :mojave - sha256 "987991ebd9c8be956e4e2a358e5bc1310a18f98be561b8ce007b5582d033ba3b" => :high_sierra - end - - depends_on "python@3.8" - - 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 "click" do - url "https://files.pythonhosted.org/packages/f8/5c/f60e9d8a1e77005f664b76ff8aeaee5bc05d0a91798afd7f53fc998dbc47/Click-7.0.tar.gz" - sha256 "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz" - sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16" - end - - resource "IPy" do - url "https://files.pythonhosted.org/packages/88/28/79162bfc351a3f1ab44d663ab3f03fb495806fdb592170990a1568ffbf63/IPy-0.83.tar.gz" - sha256 "61da5a532b159b387176f6eabf11946e7458b6df8fb8b91ff1d345ca7a6edab8" - 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/97/10/92d25b93e9c266c94b76a5548f020f3f1dd0eb40649cb1993532c0af8f4c/requests-2.20.0.tar.gz" - sha256 "99dcfdaaeb17caf6e526f32b6a7b780461512ab3f1d992187801694cba42770c" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/a5/74/05ffd00b4b5c08306939c485869f5dc40cbc27357195b0a98b18e4c48893/urllib3-1.24.tar.gz" - sha256 "41c3db2fc01e5b907288010dec72f9d0a74e37d6994e6eb56849f59fea2265ae" - end - - def install - virtualenv_install_with_resources - end - - test do - system "#{bin}/gandi", "--version" - end -end diff --git a/Formula/ganglia.rb b/Formula/ganglia.rb deleted file mode 100644 index baf1da0855a31..0000000000000 --- a/Formula/ganglia.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Ganglia < Formula - desc "Scalable distributed monitoring system" - homepage "https://ganglia.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ganglia/ganglia%20monitoring%20core/3.7.2/ganglia-3.7.2.tar.gz" - sha256 "042dbcaf580a661b55ae4d9f9b3566230b2232169a0898e91a797a4c61888409" - license "BSD-3-Clause" - revision 3 - - bottle do - sha256 "3201c7b103ad74ed63d7e4cda74da894a3e71443a8b2e79353dcf22874580c96" => :catalina - sha256 "ff01d1a7d5457e2572273e61463a7a9c0da1b8a6c12a998b4c4da157163110c8" => :mojave - sha256 "d375f0a7bc5caff2ff825ac487530b0e78efb1521b8ea2b4ef7f15a002526941" => :high_sierra - sha256 "c295e711dd78ca5a19e3b7f8c5534b049217664701c13312795bf035a3db2017" => :sierra - sha256 "e2fe6f3370fa84645ff858ef651b54aee84b0522a8da0e529d6a98c465d6c8ad" => :el_capitan - end - - head do - url "https://github.com/ganglia/monitor-core.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "apr" - depends_on "confuse" - depends_on "pcre" - depends_on "rrdtool" - - conflicts_with "coreutils", :because => "both install `gstat` binaries" - - def install - if build.head? - inreplace "bootstrap", "libtoolize", "glibtoolize" - inreplace "libmetrics/bootstrap", "libtoolize", "glibtoolize" - system "./bootstrap" - end - - inreplace "configure", 'varstatedir="/var/lib"', %Q(varstatedir="#{var}/lib") - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sbindir=#{bin}", - "--sysconfdir=#{etc}", - "--mandir=#{man}", - "--with-gmetad", - "--with-libapr=#{Formula["apr"].opt_bin}/apr-1-config", - "--with-libpcre=#{Formula["pcre"].opt_prefix}" - system "make", "install" - - # Generate the default config file - system "#{bin}/gmond -t > #{etc}/gmond.conf" unless File.exist? "#{etc}/gmond.conf" - end - - def post_install - (var/"lib/ganglia/rrds").mkpath - end - - def caveats - <<~EOS - If you didn't have a default config file, one was created here: - #{etc}/gmond.conf - EOS - end - - test do - pid = fork do - exec bin/"gmetad", "--pid-file=#{testpath}/pid" - end - sleep 2 - assert_predicate testpath/"pid", :exist? - ensure - Process.kill "TERM", pid - Process.wait pid - end -end diff --git a/Formula/garmintools.rb b/Formula/garmintools.rb deleted file mode 100644 index 6f2080502ed5b..0000000000000 --- a/Formula/garmintools.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Garmintools < Formula - desc "Interface to the Garmin Forerunner GPS units" - homepage "https://code.google.com/archive/p/garmintools/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/garmintools/garmintools-0.10.tar.gz" - sha256 "ffd50b7f963fa9b8ded3223c4786b07906c887ed900de64581a24ff201444cee" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "91c193c86b431bc3541b18ad33cf6793b001fc70293c50289d8fe6d978d50ca5" => :catalina - sha256 "ee15b7a5ca1312a9ed358f22ce2c36681eedda24ae7b855b079f196e39280101" => :mojave - sha256 "9ecdb8294089c84a229db39a395bf3f4817f185f30135a6f92711b95705ab869" => :high_sierra - sha256 "c747a668400406f6625a3832e351a4f27fd1308d8ef840120eba086d3d6adcb4" => :sierra - sha256 "dd86a8e306d3c4ebb9b94ddd4aaf60fdb79aa06fc7eb56ca95942248db33924e" => :el_capitan - sha256 "62d2b45ae3d7ef7de9a8deaa658e12021f16b14008f1a91e8c747f84b0e803d3" => :yosemite - sha256 "bdd96fdc8cf79cde06b330855d7899539816d08cc3b815a0ee115289cac6e30b" => :mavericks - end - - depends_on "libusb-compat" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"garmin_dump" - end -end diff --git a/Formula/gatsby-cli.rb b/Formula/gatsby-cli.rb deleted file mode 100644 index 1e8afc931e1e6..0000000000000 --- a/Formula/gatsby-cli.rb +++ /dev/null @@ -1,32 +0,0 @@ -require "language/node" - -class GatsbyCli < Formula - desc "Gatsby command-line interface" - homepage "https://www.gatsbyjs.org/docs/gatsby-cli/" - # gatsby-cli should only be updated every 10 releases on multiples of 10 - url "https://registry.npmjs.org/gatsby-cli/-/gatsby-cli-2.12.56.tgz" - sha256 "cc8658c75108fd1ed1aaeae928b7bc61ea854d4c2d77ec501bc2c44981800336" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "1a264a549f3f9828b7b8a22b8fccd6873b6452da5998cefbaeeaae1dc3749939" => :catalina - sha256 "f2eceba9ad6b2146714fabb08e27c3cb586e9f9b397bc671347162706bcc1034" => :mojave - sha256 "10a8ccb1fd09f5c6a5dd3a68f6146d32a3d30bfd2d1c957fbab868823aed0878" => :high_sierra - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - - # Avoid references to Homebrew shims - rm_f "#{libexec}/lib/node_modules/gatsby-cli/node_modules/websocket/builderror.log" - end - - test do - system bin/"gatsby", "new", "hello-world", "https://github.com/gatsbyjs/gatsby-starter-hello-world" - assert_predicate testpath/"hello-world/package.json", :exist?, "package.json was not cloned" - end -end diff --git a/Formula/gau.rb b/Formula/gau.rb deleted file mode 100644 index 628795280240e..0000000000000 --- a/Formula/gau.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Gau < Formula - desc "Open Threat Exchange, Wayback Machine, and Common Crawl URL fetcher" - homepage "https://github.com/lc/gau" - url "https://github.com/lc/gau/archive/v1.0.2.tar.gz" - sha256 "058a0818b3b1465af9878566c6cb01e2b2835903b5630f63afb0645c07b28663" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "8fbfdf238dd7408adf09c159338c48e67ee9030f80f129a3b20683a960ab4531" => :catalina - sha256 "d24c1d256af7be9370ec0d12d5deddabde47885d8d2b387ce5bfb6eb0a36e05c" => :mojave - sha256 "67ece09c592ad7cdab9ec296e8fbff86fb23410a149aa9bb8f7a295d55661ab7" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args - end - - test do - output = shell_output("#{bin}/gau -providers wayback brew.sh") - output.each_line do |line| - assert_match %r{https?://brew\.sh(/|:)?.*}, line - end - end -end diff --git a/Formula/gauche.rb b/Formula/gauche.rb deleted file mode 100644 index e2a0575e9faa9..0000000000000 --- a/Formula/gauche.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Gauche < Formula - desc "R7RS Scheme implementation, developed to be a handy script interpreter" - homepage "https://practical-scheme.net/gauche/" - url "https://downloads.sourceforge.net/gauche/Gauche/Gauche-0.9.9.tgz" - sha256 "4ca9325322a7efadb9680d156eb7b53521321c9ca4955c4cbe738bc2e1d7f7fb" - - bottle do - sha256 "0d2bc0fa954237af130845e904c6c1680018c52c0fe60ccdcbb25000ed5b5408" => :catalina - sha256 "bb0bee61ddd5726151e4569d8ea2c7b5797a82543bb13e45a6fec66a521cdcae" => :mojave - sha256 "719f5826572a2aec1383ef5501ee4f92580f8a769205c03e47f9e610fa0b5abd" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking", - "--enable-multibyte=utf-8" - system "make" - system "make", "check" - system "make", "install" - end - - test do - output = shell_output("#{bin}/gosh -V") - assert_match "Gauche scheme shell, version #{version}", output - end -end diff --git a/Formula/gauge.rb b/Formula/gauge.rb deleted file mode 100644 index 15d3c62dd3f5c..0000000000000 --- a/Formula/gauge.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Gauge < Formula - desc "Test automation tool that supports executable documentation" - homepage "https://gauge.org/" - url "https://github.com/getgauge/gauge/archive/v1.1.1.tar.gz" - sha256 "b136727d0ed114ab18d9d380e1ff70ad70e60b56bbacf854be2aeddc9b20044a" - license "Apache-2.0" - head "https://github.com/getgauge/gauge.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "31440544842f79e972bf2df49fc4f87f4ee843f67fab0c007687ec6eac38f2cb" => :catalina - sha256 "590ec7a1a946660cbcab4a202666ac49c1d8cb43f791193a54760a8378c14189" => :mojave - sha256 "503c38cb1eeeedfbd24250e202107d64fc6712e40095b55880cb5893d04911fb" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "run", "build/make.go" - system "go", "run", "build/make.go", "--install", "--prefix", prefix - end - - test do - (testpath/"manifest.json").write <<~EOS - { - "Plugins": [ - "html-report" - ] - } - EOS - - system("#{bin}/gauge", "install") - assert_predicate testpath/".gauge/plugins", :exist? - - system("#{bin}/gauge", "config", "check_updates", "false") - assert_match "false", shell_output("#{bin}/gauge config check_updates") - - assert_match version.to_s, shell_output("#{bin}/gauge -v 2>&1") - end -end diff --git a/Formula/gaul.rb b/Formula/gaul.rb deleted file mode 100644 index a30ace3118772..0000000000000 --- a/Formula/gaul.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Gaul < Formula - desc "Genetic Algorithm Utility Library" - homepage "https://gaul.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gaul/gaul-devel/0.1850-0/gaul-devel-0.1850-0.tar.gz" - sha256 "7aabb5c1c218911054164c3fca4f5c5f0b9c8d9bab8b2273f48a3ff573da6570" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "f2f98c2f7d23ae7c1862702c6d17d4449bbcc2164940d9157ea12b97deadb273" => :catalina - sha256 "0f60116cbca6bb8986ffbd291d34a22c6426ad4c22bcedca2873aa24ab237eeb" => :mojave - sha256 "f1b6b4fedb8820b14b6384d612b16a1acca71efa26a0d81881c1730720518765" => :high_sierra - sha256 "5dcd424881f8395070bf534b8bd480279a17cbf8a5784ba2be7dffdbfbc85f51" => :sierra - sha256 "0a6fb9c8ae17bb0785cc9c9da0fa0b3bf5fd6ca69b1ef8516b800d0d28d77360" => :el_capitan - sha256 "8b0cb8b79f456faf4b7a8f9af2c788290b3e2eb1785f120875f2b72b4159fbf5" => :yosemite - sha256 "2ce7947353b3ea8e9be3925b1e516c92cbcca5602039d91ebe729c6fb96f5a37" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-debug", - "--disable-g", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/gawk.rb b/Formula/gawk.rb deleted file mode 100644 index a9aa4ad90cd7d..0000000000000 --- a/Formula/gawk.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Gawk < Formula - desc "GNU awk utility" - homepage "https://www.gnu.org/software/gawk/" - url "https://ftp.gnu.org/gnu/gawk/gawk-5.1.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gawk/gawk-5.1.0.tar.xz" - sha256 "cf5fea4ac5665fd5171af4716baab2effc76306a9572988d5ba1078f196382bd" - license "GPL-3.0" - - bottle do - sha256 "581b48f781104f0c3233edc30c47628f4eec8c2f1f2e191151f367ce26ec538a" => :catalina - sha256 "ddbb56c56d66f375147769a27301e2ffd099abdc07f5dfc16389af22028e185b" => :mojave - sha256 "eac1b8c97c682c32a1b6c589818aa8ffb8f09630258ed6f215c882368540713e" => :high_sierra - end - - depends_on "gettext" - depends_on "mpfr" - depends_on "readline" - - conflicts_with "awk", - :because => "both install an `awk` executable" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-libsigsegv-prefix", - "gl_cv_func_ftello_works=yes" # Work around a gnulib issue with macOS Catalina - - system "make" - system "make", "check" - system "make", "install" - - (libexec/"gnubin").install_symlink bin/"gawk" => "awk" - (libexec/"gnuman/man1").install_symlink man1/"gawk.1" => "awk.1" - end - - test do - output = pipe_output("#{bin}/gawk '{ gsub(/Macro/, \"Home\"); print }' -", "Macrobrew") - assert_equal "Homebrew", output.strip - end -end diff --git a/Formula/gbdfed.rb b/Formula/gbdfed.rb deleted file mode 100644 index 4224d49e789bf..0000000000000 --- a/Formula/gbdfed.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Gbdfed < Formula - desc "Bitmap Font Editor" - homepage "http://sofia.nmsu.edu/~mleisher/Software/gbdfed/" - url "http://sofia.nmsu.edu/~mleisher/Software/gbdfed/gbdfed-1.6.tar.gz" - sha256 "8042575d23a55a3c38192e67fcb5eafd8f7aa8d723012c374acb2e0a36022943" - revision 3 - - bottle do - cellar :any - sha256 "ac131ff87dd812928b3f8136d5ce364370ab0a8ded3ffdf2fbf2a38e58998494" => :catalina - sha256 "00b2376a043f6e90d777bc9e5805d84da21c046f446c4dcd649b482a01cbc6cf" => :mojave - sha256 "945fc3ffa7573224e7a387e6dec353ca7f3b46829f3e3728774a97c26fb0923a" => :high_sierra - sha256 "e32f2b72805a1dbe768f85e33ea10c0b603789f9101b21e0fbc750ab077a12e5" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - - # Fixes compilation error with gtk+ per note on the project homepage. - patch :DATA - - def install - # BDF_NO_X11 has to be defined to avoid X11 headers from being included - ENV["CPPFLAGS"] = "-DBDF_NO_X11" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--without-x" - system "make", "install" - end - - test do - assert_predicate bin/"gbdfed", :exist? - assert_predicate share/"man/man1/gbdfed.1", :exist? - end -end - -__END__ -diff --git a/Makefile.in b/Makefile.in -index b482958..10a528e 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -28,8 +28,7 @@ CC = @CC@ - CFLAGS = @XX_CFLAGS@ @CFLAGS@ - - DEFINES = @DEFINES@ -DG_DISABLE_DEPRECATED \ -- -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED \ -- -DGTK_DISABLE_DEPRECATED -+ -DGDK_PIXBUF_DISABLE_DEPRECATED - - SRCS = bdf.c \ - bdfcons.c \ diff --git a/Formula/gcab.rb b/Formula/gcab.rb deleted file mode 100644 index c3a8373fe5df8..0000000000000 --- a/Formula/gcab.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Gcab < Formula - desc "Windows installer (.MSI) tool" - homepage "https://wiki.gnome.org/msitools" - url "https://download.gnome.org/sources/gcab/1.4/gcab-1.4.tar.xz" - sha256 "67a5fa9be6c923fbc9197de6332f36f69a33dadc9016a2b207859246711c048f" - revision 1 - - bottle do - sha256 "7ed919ea9c7d4ec04f9d5f361f8628936e016318475fec26fdf6ef5ea56491cc" => :catalina - sha256 "c9ef02142502a47b006db735b87fe7d55611d46ecc087c697d3142ce8bd9c27a" => :mojave - sha256 "ca3d97d649c89be881528e7a7cf42f51c18c3a8e4c4b47c9a5fad29f355afd30" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "glib" - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Ddocs=false", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - system "#{bin}/gcab", "--version" - end -end diff --git a/Formula/gcal.rb b/Formula/gcal.rb deleted file mode 100644 index a46ac31e8919f..0000000000000 --- a/Formula/gcal.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Gcal < Formula - desc "Program for calculating and printing calendars" - homepage "https://www.gnu.org/software/gcal/" - url "https://ftp.gnu.org/gnu/gcal/gcal-4.1.tar.xz" - mirror "https://ftpmirror.gnu.org/gcal/gcal-4.1.tar.xz" - sha256 "91b56c40b93eee9bda27ec63e95a6316d848e3ee047b5880ed71e5e8e60f61ab" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "4bb8c5727fb336106016d1158796e0a127fc82eb630ec9e2bccb6d70327aa531" => :catalina - sha256 "39c897bb2106251109af642741220e8b92e19c52be37ef928258eb1a2f6230ff" => :mojave - sha256 "0a1e3ab27fcc8d08d78452074137dcdf281068c41a732a64222e9b5ed235e8fb" => :high_sierra - sha256 "f120585bc8538eb1ab7c71ec240b150472cbf7b42e7fc6a3f008c15104d81e7c" => :sierra - sha256 "c94d7232ff507f387fad5ba5fb0d09b1548e695cf7e1da284846a5ee828f2d03" => :el_capitan - sha256 "b50b10e57eea6d6fa84c35769401b0da3bde02bade28e137bc1263d492c60c3f" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - system "make", "-C", "doc/en", "html" - doc.install "doc/en/gcal.html" - end - - test do - date = shell_output("date +%Y") - assert_match date, shell_output("#{bin}/gcal") - end -end diff --git a/Formula/gcc.rb b/Formula/gcc.rb deleted file mode 100644 index 9061c4a7be355..0000000000000 --- a/Formula/gcc.rb +++ /dev/null @@ -1,151 +0,0 @@ -class Gcc < Formula - desc "GNU compiler collection" - homepage "https://gcc.gnu.org/" - url "https://ftp.gnu.org/gnu/gcc/gcc-10.1.0/gcc-10.1.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gcc/gcc-10.1.0/gcc-10.1.0.tar.xz" - sha256 "b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2" - head "https://gcc.gnu.org/git/gcc.git" - - bottle do - sha256 "1d6590ec0e8d2f5769ed4ef89f5d8d4087108420dba71bf77dd5ca6213ec1692" => :catalina - sha256 "dadf29a1cb3f4c707c5b8309206c2d7154a7a8d9c4d3c9d4047e6c8c88c2da9d" => :mojave - sha256 "23d5c3207fe0fe6274ce3bed43de88a46ac4ae812f8b298114d0ba66a79321f0" => :high_sierra - 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? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - depends_on "gmp" - depends_on "isl" - depends_on "libmpc" - depends_on "mpfr" - - uses_from_macos "zlib" - - # GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib - cxxstdlib_check :skip - - def version_suffix - if build.head? - "HEAD" - else - version.to_s.slice(/\d+/) - end - end - - def install - # GCC will suffer build errors if forced to use a particular linker. - ENV.delete "LD" - - # We avoiding building: - # - Ada, which requires a pre-existing GCC Ada compiler to bootstrap - # - Go, currently not supported on macOS - # - BRIG - languages = %w[c c++ objc obj-c++ fortran] - - osmajor = `uname -r`.split(".").first - pkgversion = "Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip - - args = %W[ - --build=x86_64-apple-darwin#{osmajor} - --prefix=#{prefix} - --libdir=#{lib}/gcc/#{version_suffix} - --disable-nls - --enable-checking=release - --enable-languages=#{languages.join(",")} - --program-suffix=-#{version_suffix} - --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-pkgversion=#{pkgversion} - --with-bugurl=https://github.com/Homebrew/homebrew-core/issues - ] - - # Xcode 10 dropped 32-bit support - args << "--disable-multilib" if DevelopmentTools.clang_build_version >= 1000 - - # System headers may not be in /usr/include - sdk = MacOS.sdk_path_if_needed - if sdk - args << "--with-native-system-header-dir=/usr/include" - args << "--with-sysroot=#{sdk}" - end - - # Avoid reference to sed shim - args << "SED=/usr/bin/sed" - - # Ensure correct install names when linking against libgcc_s; - # see discussion in https://github.com/Homebrew/legacy-homebrew/pull/34303 - inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}" - - mkdir "build" do - system "../configure", *args - - # Use -headerpad_max_install_names in the build, - # otherwise updated load commands won't fit in the Mach-O header. - # This is needed because `gcc` avoids the superenv shim. - system "make", "BOOT_LDFLAGS=-Wl,-headerpad_max_install_names" - system "make", "install" - - bin.install_symlink bin/"gfortran-#{version_suffix}" => "gfortran" - end - - # Handle conflicts between GCC formulae and avoid interfering - # with system compilers. - # Rename man7. - Dir.glob(man7/"*.7") { |file| add_suffix file, version_suffix } - # Even when we disable building info pages some are still installed. - info.rmtree - end - - def add_suffix(file, suffix) - dir = File.dirname(file) - ext = File.extname(file) - base = File.basename(file, ext) - File.rename file, "#{dir}/#{base}-#{suffix}#{ext}" - end - - test do - (testpath/"hello-c.c").write <<~EOS - #include - int main() - { - puts("Hello, world!"); - return 0; - } - EOS - system "#{bin}/gcc-#{version_suffix}", "-o", "hello-c", "hello-c.c" - assert_equal "Hello, world!\n", `./hello-c` - - (testpath/"hello-cc.cc").write <<~EOS - #include - int main() - { - std::cout << "Hello, world!" << std::endl; - return 0; - } - EOS - system "#{bin}/g++-#{version_suffix}", "-o", "hello-cc", "hello-cc.cc" - assert_equal "Hello, world!\n", `./hello-cc` - - (testpath/"test.f90").write <<~EOS - integer,parameter::m=10000 - real::a(m), b(m) - real::fact=0.5 - - do concurrent (i=1:m) - a(i) = a(i) + fact*b(i) - end do - write(*,"(A)") "Done" - end - EOS - system "#{bin}/gfortran", "-o", "test", "test.f90" - assert_equal "Done\n", `./test` - end -end diff --git a/Formula/gcc@4.9.rb b/Formula/gcc@4.9.rb deleted file mode 100644 index 685b968136cca..0000000000000 --- a/Formula/gcc@4.9.rb +++ /dev/null @@ -1,168 +0,0 @@ -class GccAT49 < Formula - def osmajor - `uname -r`.chomp - end - - desc "The GNU Compiler Collection" - homepage "https://gcc.gnu.org/" - url "https://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.bz2" - mirror "https://ftpmirror.gnu.org/gcc/gcc-4.9.4/gcc-4.9.4.tar.bz2" - sha256 "6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092" - revision 2 - - bottle do - sha256 "cb153d98245bcbe4809dc19adf688f642285154b19fe907c7de3cb71652b0ec6" => :high_sierra - 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? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - depends_on :maximum_macos => [:high_sierra, :build] - - # GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib - cxxstdlib_check :skip - - resource "gmp" do - url "https://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2" - mirror "https://ftpmirror.gnu.org/gmp/gmp-4.3.2.tar.bz2" - sha256 "936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775" - - # Upstream patch to fix gmp.h header use in C++ compilation with libc++ - # https://gmplib.org/repo/gmp/rev/6cd3658f5621 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/010a4dc3/gmp%404/4.3.2.patch" - sha256 "7865e09e154d4696e850779403e6c75be323f069356dedb7751cf1575db3a148" - end - end - - resource "mpfr" do - url "https://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2" - mirror "https://mirrorservice.org/sites/sourceware.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2" - sha256 "c7e75a08a8d49d2082e4caee1591a05d11b9d5627514e678f02d66a124bcf2ba" - end - - resource "mpc" do - url "https://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz" - sha256 "e664603757251fd8a352848276497a4c79b7f8b21fd8aedd5cc0598a38fee3e4" - end - - resource "isl" do - url "https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.12.2.tar.bz2" - mirror "https://mirrorservice.org/sites/distfiles.macports.org/isl/isl-0.12.2.tar.bz2" - sha256 "f4b3dbee9712850006e44f0db2103441ab3d13b406f77996d1df19ee89d11fb4" - end - - resource "cloog" do - url "http://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-0.18.4.tar.gz" - mirror "https://mirrorservice.org/sites/archive.ubuntu.com/ubuntu/pool/main/c/cloog/cloog_0.18.4.orig.tar.gz" - sha256 "325adf3710ce2229b7eeb9e84d3b539556d093ae860027185e7af8a8b00a750e" - end - - # Fix build with Xcode 9 - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82091 - if DevelopmentTools.clang_build_version >= 900 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/c2dae73416/gcc%404.9/xcode9.patch" - sha256 "92c13867afe18ccb813526c3b3c19d95a2dd00973f9939cf56ab7698bdd38108" - end - end - - # Fix issues with macOS 10.13 headers and parallel build on APFS - if MacOS.version == :high_sierra - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/b7c7883d/gcc%404.9/high_sierra_2.patch" - sha256 "c7bcad4657292f6939b7322eb5e821c4a110c4f326fd5844890f0e9a85da8cae" - end - end - - def install - # GCC will suffer build errors if forced to use a particular linker. - ENV.delete "LD" - - # Build dependencies in-tree, to avoid having versioned formulas - resources.each { |r| r.stage(buildpath/r.name) } - - version_suffix = version.to_s.slice(/\d\.\d/) - - args = [ - "--build=x86_64-apple-darwin#{osmajor}", - "--prefix=#{prefix}", - "--libdir=#{lib}/gcc/#{version_suffix}", - "--enable-languages=c,c++,fortran,objc,obj-c++", - # Make most executables versioned to avoid conflicts. - "--program-suffix=-#{version_suffix}", - "--with-system-zlib", - "--enable-libstdcxx-time=yes", - "--enable-stage1-checking", - "--enable-checking=release", - "--enable-lto", - "--enable-plugin", - # Use 'bootstrap-debug' build configuration to force stripping of object - # files prior to comparison during bootstrap (broken by Xcode 6.3). - "--with-build-config=bootstrap-debug", - # A no-op unless --HEAD is built because in head warnings will - # raise errors. But still a good idea to include. - "--disable-werror", - "--with-pkgversion=Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip, - "--with-bugurl=https://github.com/Homebrew/homebrew-core/issues", - # Even when suffixes are appended, the info pages conflict when - # install-info is run. - "MAKEINFO=missing", - "--disable-nls", - "--enable-multilib", - ] - - # System headers may not be in /usr/include - sdk = MacOS.sdk_path_if_needed - if sdk - args << "--with-native-system-header-dir=/usr/include" - args << "--with-sysroot=#{sdk}" - end - - # Avoid reference to sed shim - args << "SED=/usr/bin/sed" - - # Ensure correct install names when linking against libgcc_s; - # see discussion in https://github.com/Homebrew/homebrew/pull/34303 - inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}" - - mkdir "build" do - system "../configure", *args - system "make", "bootstrap" - - # At this point `make check` could be invoked to run the testsuite. The - # deja-gnu and autogen formulae must be installed in order to do this. - system "make", "install" - end - - # Handle conflicts between GCC formulae. - # Rename man7. - Dir.glob(man7/"*.7") { |file| add_suffix file, version_suffix } - # Even when we disable building info pages some are still installed. - info.rmtree - end - - def add_suffix(file, suffix) - dir = File.dirname(file) - ext = File.extname(file) - base = File.basename(file, ext) - File.rename file, "#{dir}/#{base}-#{suffix}#{ext}" - end - - test do - (testpath/"hello-c.c").write <<~EOS - #include - int main() - { - puts("Hello, world!"); - return 0; - } - EOS - system bin/"gcc-4.9", "-o", "hello-c", "hello-c.c" - assert_equal "Hello, world!\n", `./hello-c` - end -end diff --git a/Formula/gcc@5.rb b/Formula/gcc@5.rb deleted file mode 100644 index 29ea761c98520..0000000000000 --- a/Formula/gcc@5.rb +++ /dev/null @@ -1,159 +0,0 @@ -class GccAT5 < Formula - def osmajor - `uname -r`.chomp - end - - desc "The GNU Compiler Collection" - homepage "https://gcc.gnu.org/" - url "https://ftp.gnu.org/gnu/gcc/gcc-5.5.0/gcc-5.5.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gcc/gcc-5.5.0/gcc-5.5.0.tar.xz" - sha256 "530cea139d82fe542b358961130c69cfde8b3d14556370b65823d2f91f0ced87" - revision 4 - - bottle do - sha256 "7fc31bed73398ba401db3107151a3b0ae301ddc60e017a45bd3d69ac1b400235" => :high_sierra - 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? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - depends_on :maximum_macos => [:high_sierra, :build] - - depends_on "gmp" - depends_on "libmpc" - depends_on "mpfr" - - # GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib - cxxstdlib_check :skip - - resource "isl" do - url "https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.14.tar.bz2" - mirror "https://mirrorservice.org/sites/distfiles.macports.org/isl/isl-0.14.tar.bz2" - sha256 "7e3c02ff52f8540f6a85534f54158968417fd676001651c8289c705bd0228f36" - end - - # Fix build with Xcode 9 - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82091 - if DevelopmentTools.clang_build_version >= 900 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/078797f1b9/gcc%405/xcode9.patch" - sha256 "e1546823630c516679371856338abcbab381efaf9bd99511ceedcce3cf7c0199" - end - end - - # Fix Apple headers, otherwise they trigger a build failure in libsanitizer - # GCC bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83531 - # Apple radar 36176941 - if MacOS.version == :high_sierra - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/413cfac6/gcc%405/10.13_headers.patch" - sha256 "94aaec20c8c7bfd3c41ef8fb7725bd524b1c0392d11a411742303a3465d18d09" - end - end - - # Patch for Xcode bug, taken from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89864#c43 - # This should be removed in the next release of GCC if fixed by apple; this is an xcode bug, - # but this patch is a work around committed to GCC trunk - if MacOS::Xcode.version >= "10.2" - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/91d57ebe88e17255965fa88b53541335ef16f64a/gcc%405/gcc5-xcode10.2.patch" - sha256 "6834bec30c54ab1cae645679e908713102f376ea0fc2ee993b3c19995832fe56" - end - end - - def install - # GCC will suffer build errors if forced to use a particular linker. - ENV.delete "LD" - - # Build ISL 0.14 from source during bootstrap - resource("isl").stage buildpath/"isl" - - # C, C++, ObjC and Fortran compilers are always built - languages = %w[c c++ fortran objc obj-c++] - - version_suffix = version.to_s.slice(/\d/) - - # Even when suffixes are appended, the info pages conflict when - # install-info is run so pretend we have an outdated makeinfo - # to prevent their build. - ENV["gcc_cv_prog_makeinfo_modern"] = "no" - - args = [ - "--build=x86_64-apple-darwin#{osmajor}", - "--prefix=#{prefix}", - "--libdir=#{lib}/gcc/#{version_suffix}", - "--enable-languages=#{languages.join(",")}", - # Make most executables versioned to avoid conflicts. - "--program-suffix=-#{version_suffix}", - "--with-gmp=#{Formula["gmp"].opt_prefix}", - "--with-mpfr=#{Formula["mpfr"].opt_prefix}", - "--with-mpc=#{Formula["libmpc"].opt_prefix}", - "--with-system-zlib", - "--enable-libstdcxx-time=yes", - "--enable-stage1-checking", - "--enable-checking=release", - "--enable-lto", - "--enable-plugin", - # A no-op unless --HEAD is built because in head warnings will - # raise errors. But still a good idea to include. - "--disable-werror", - "--disable-nls", - "--with-pkgversion=Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip, - "--with-bugurl=https://github.com/Homebrew/homebrew-core/issues", - "--enable-multilib", - ] - - # System headers may not be in /usr/include - sdk = MacOS.sdk_path_if_needed - if sdk - args << "--with-native-system-header-dir=/usr/include" - args << "--with-sysroot=#{sdk}" - end - - # Avoid reference to sed shim - args << "SED=/usr/bin/sed" - - # Ensure correct install names when linking against libgcc_s; - # see discussion in https://github.com/Homebrew/homebrew/pull/34303 - inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}" - - mkdir "build" do - system "../configure", *args - system "make", "bootstrap" - - # At this point `make check` could be invoked to run the testsuite. The - # deja-gnu and autogen formulae must be installed in order to do this. - system "make", "install" - end - - # Handle conflicts between GCC formulae. - # Rename man7. - Dir.glob(man7/"*.7") { |file| add_suffix file, version_suffix } - # Even when we disable building info pages some are still installed. - info.rmtree - end - - def add_suffix(file, suffix) - dir = File.dirname(file) - ext = File.extname(file) - base = File.basename(file, ext) - File.rename file, "#{dir}/#{base}-#{suffix}#{ext}" - end - - test do - (testpath/"hello-c.c").write <<~EOS - #include - int main() - { - puts("Hello, world!"); - return 0; - } - EOS - system bin/"gcc-5", "-o", "hello-c", "hello-c.c" - assert_equal "Hello, world!\n", `./hello-c` - end -end diff --git a/Formula/gcc@6.rb b/Formula/gcc@6.rb deleted file mode 100644 index 19288bab1a431..0000000000000 --- a/Formula/gcc@6.rb +++ /dev/null @@ -1,156 +0,0 @@ -class GccAT6 < Formula - desc "GNU compiler collection" - homepage "https://gcc.gnu.org/" - url "https://ftp.gnu.org/gnu/gcc/gcc-6.5.0/gcc-6.5.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gcc/gcc-6.5.0/gcc-6.5.0.tar.xz" - sha256 "7ef1796ce497e89479183702635b14bb7a46b53249209a5e0f999bebf4740945" - revision 5 - - bottle do - sha256 "59e24c6441d4ebd6e6462406d07a4722f765b81aa96b0c81117376cf342641b0" => :catalina - sha256 "2280bb37e05ca20d3d797a4b75695ea6d57196c2f4b4003d43ba191883558073" => :mojave - sha256 "e3ab3cd2f05c00351825fb0a6bf2b4e57e959400d8f7931d47b9c81a3e5b6ad3" => :high_sierra - 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? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - depends_on "gmp" - depends_on "isl" - depends_on "libmpc" - depends_on "mpfr" - - # GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib - cxxstdlib_check :skip - - # Patch for Xcode bug, taken from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89864#c43 - # This should be removed in the next release of GCC if fixed by apple; this is an xcode bug, - # but this patch is a work around committed to GCC trunk - if MacOS::Xcode.version >= "10.2" - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/91d57ebe88e17255965fa88b53541335ef16f64a/gcc%406/gcc6-xcode10.2.patch" - sha256 "0f091e8b260bcfa36a537fad76823654be3ee8462512473e0b63ed83ead18085" - end - end - - def install - # GCC will suffer build errors if forced to use a particular linker. - ENV.delete "LD" - - # C, C++, ObjC, Fortran compilers are always built - languages = %w[c c++ objc obj-c++ fortran] - - version_suffix = version.to_s.slice(/\d/) - - # Even when suffixes are appended, the info pages conflict when - # install-info is run so pretend we have an outdated makeinfo - # to prevent their build. - ENV["gcc_cv_prog_makeinfo_modern"] = "no" - - osmajor = `uname -r`.chomp - - args = [ - "--build=x86_64-apple-darwin#{osmajor}", - "--prefix=#{prefix}", - "--libdir=#{lib}/gcc/#{version_suffix}", - "--enable-languages=#{languages.join(",")}", - # Make most executables versioned to avoid conflicts. - "--program-suffix=-#{version_suffix}", - "--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", - "--enable-stage1-checking", - "--enable-checking=release", - "--enable-lto", - # Use 'bootstrap-debug' build configuration to force stripping of object - # files prior to comparison during bootstrap (broken by Xcode 6.3). - "--with-build-config=bootstrap-debug", - "--disable-werror", - "--with-pkgversion=Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip, - "--with-bugurl=https://github.com/Homebrew/homebrew-core/issues", - "--disable-nls", - ] - - # Xcode 10 dropped 32-bit support - args << "--disable-multilib" if DevelopmentTools.clang_build_version >= 1000 - - # System headers may not be in /usr/include - sdk = MacOS.sdk_path_if_needed - if sdk - args << "--with-native-system-header-dir=/usr/include" - args << "--with-sysroot=#{sdk}" - end - - # Avoid reference to sed shim - args << "SED=/usr/bin/sed" - - # Ensure correct install names when linking against libgcc_s; - # see discussion in https://github.com/Homebrew/homebrew/pull/34303 - inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}" - - mkdir "build" do - system "../configure", *args - system "make", "bootstrap" - system "make", "install" - end - - # Handle conflicts between GCC formulae and avoid interfering - # with system compilers. - # Rename man7. - Dir.glob(man7/"*.7") { |file| add_suffix file, version_suffix } - # Even when we disable building info pages some are still installed. - info.rmtree - end - - def add_suffix(file, suffix) - dir = File.dirname(file) - ext = File.extname(file) - base = File.basename(file, ext) - File.rename file, "#{dir}/#{base}-#{suffix}#{ext}" - end - - test do - (testpath/"hello-c.c").write <<~EOS - #include - int main() - { - puts("Hello, world!"); - return 0; - } - EOS - system "#{bin}/gcc-6", "-o", "hello-c", "hello-c.c" - assert_equal "Hello, world!\n", `./hello-c` - - (testpath/"hello-cc.cc").write <<~EOS - #include - int main() - { - std::cout << "Hello, world!" << std::endl; - return 0; - } - EOS - system "#{bin}/g++-6", "-o", "hello-cc", "hello-cc.cc" - assert_equal "Hello, world!\n", `./hello-cc` - - fixture = <<~EOS - integer,parameter::m=10000 - real::a(m), b(m) - real::fact=0.5 - - do concurrent (i=1:m) - a(i) = a(i) + fact*b(i) - end do - print *, "done" - end - EOS - (testpath/"in.f90").write(fixture) - system "#{bin}/gfortran-6", "-o", "test", "in.f90" - assert_equal "done", `./test`.strip - end -end diff --git a/Formula/gcc@7.rb b/Formula/gcc@7.rb deleted file mode 100644 index a4c035c304d9e..0000000000000 --- a/Formula/gcc@7.rb +++ /dev/null @@ -1,143 +0,0 @@ -class GccAT7 < Formula - desc "GNU compiler collection" - homepage "https://gcc.gnu.org/" - url "https://ftp.gnu.org/gnu/gcc/gcc-7.5.0/gcc-7.5.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gcc/gcc-7.5.0/gcc-7.5.0.tar.xz" - sha256 "b81946e7f01f90528a1f7352ab08cc602b9ccc05d4e44da4bd501c5a189ee661" - revision 2 - - bottle do - sha256 "4dca3b07173bffba262e003b345970119626a4d60a25c167d6bc216c46f1d83e" => :catalina - sha256 "5d4086421866078dc4d9bfe623a38160dbcf04ff88b4d0284dee9da66ff50f4c" => :mojave - sha256 "3c2135fc0b1c7f0ce048c1f610d2131a237911bdbd66d8bff731bbf9c6d84bcc" => :high_sierra - 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? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - depends_on "gmp" - depends_on "isl" - depends_on "libmpc" - depends_on "mpfr" - - # GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib - cxxstdlib_check :skip - - def install - # GCC will suffer build errors if forced to use a particular linker. - ENV.delete "LD" - - version_suffix = version.to_s.slice(/\d/) - - # Even when suffixes are appended, the info pages conflict when - # install-info is run so pretend we have an outdated makeinfo - # to prevent their build. - ENV["gcc_cv_prog_makeinfo_modern"] = "no" - - # We avoiding building: - # - Ada, which requires a pre-existing GCC Ada compiler to bootstrap - # - Go, currently not supported on macOS - # - BRIG - languages = %w[c c++ objc obj-c++ fortran] - - osmajor = `uname -r`.chomp - - args = [ - "--build=x86_64-apple-darwin#{osmajor}", - "--prefix=#{prefix}", - "--libdir=#{lib}/gcc/#{version_suffix}", - "--enable-languages=#{languages.join(",")}", - # Make most executables versioned to avoid conflicts. - "--program-suffix=-#{version_suffix}", - "--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", - "--enable-checking=release", - "--with-pkgversion=Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip, - "--with-bugurl=https://github.com/Homebrew/homebrew-core/issues", - "--disable-nls", - ] - - # Xcode 10 dropped 32-bit support - args << "--disable-multilib" if DevelopmentTools.clang_build_version >= 1000 - - # System headers may not be in /usr/include - sdk = MacOS.sdk_path_if_needed - if sdk - args << "--with-native-system-header-dir=/usr/include" - args << "--with-sysroot=#{sdk}" - end - - # Avoid reference to sed shim - args << "SED=/usr/bin/sed" - - # Ensure correct install names when linking against libgcc_s; - # see discussion in https://github.com/Homebrew/homebrew/pull/34303 - inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}" - - mkdir "build" do - system "../configure", *args - - system "make" - system "make", "install" - end - - # Handle conflicts between GCC formulae and avoid interfering - # with system compilers. - # Rename man7. - Dir.glob(man7/"*.7") { |file| add_suffix file, version_suffix } - # Even when we disable building info pages some are still installed. - info.rmtree - end - - def add_suffix(file, suffix) - dir = File.dirname(file) - ext = File.extname(file) - base = File.basename(file, ext) - File.rename file, "#{dir}/#{base}-#{suffix}#{ext}" - end - - test do - (testpath/"hello-c.c").write <<~EOS - #include - int main() - { - puts("Hello, world!"); - return 0; - } - EOS - system "#{bin}/gcc-7", "-o", "hello-c", "hello-c.c" - assert_equal "Hello, world!\n", `./hello-c` - - (testpath/"hello-cc.cc").write <<~EOS - #include - int main() - { - std::cout << "Hello, world!" << std::endl; - return 0; - } - EOS - system "#{bin}/g++-7", "-o", "hello-cc", "hello-cc.cc" - assert_equal "Hello, world!\n", `./hello-cc` - - (testpath/"test.f90").write <<~EOS - integer,parameter::m=10000 - real::a(m), b(m) - real::fact=0.5 - - do concurrent (i=1:m) - a(i) = a(i) + fact*b(i) - end do - write(*,"(A)") "Done" - end - EOS - system "#{bin}/gfortran-7", "-o", "test", "test.f90" - assert_equal "Done\n", `./test` - end -end diff --git a/Formula/gcc@8.rb b/Formula/gcc@8.rb deleted file mode 100644 index 9a42c212b5a8f..0000000000000 --- a/Formula/gcc@8.rb +++ /dev/null @@ -1,146 +0,0 @@ -class GccAT8 < Formula - desc "GNU compiler collection" - homepage "https://gcc.gnu.org/" - url "https://ftp.gnu.org/gnu/gcc/gcc-8.4.0/gcc-8.4.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gcc/gcc-8.4.0/gcc-8.4.0.tar.xz" - sha256 "e30a6e52d10e1f27ed55104ad233c30bd1e99cfb5ff98ab022dc941edd1b2dd4" - revision 1 - - bottle do - sha256 "55525171b1a90425dab69799f3730492cd3f04b2755242340472925794104962" => :catalina - sha256 "3321d929ae429e3ccf8b4c4e265e20e6302d361d5c444f4b7a5217771b8d0b01" => :mojave - sha256 "80b73e0a1679e7ca9e098de1e82e19e312d159098b3355607b76a3673b80c2ee" => :high_sierra - 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? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - depends_on "gmp" - depends_on "isl" - depends_on "libmpc" - depends_on "mpfr" - - # GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib - cxxstdlib_check :skip - - def install - # GCC will suffer build errors if forced to use a particular linker. - ENV.delete "LD" - - version_suffix = version.to_s.slice(/\d/) - - # Even when suffixes are appended, the info pages conflict when - # install-info is run so pretend we have an outdated makeinfo - # to prevent their build. - ENV["gcc_cv_prog_makeinfo_modern"] = "no" - - # We avoiding building: - # - Ada, which requires a pre-existing GCC Ada compiler to bootstrap - # - Go, currently not supported on macOS - # - BRIG - languages = %w[c c++ objc obj-c++ fortran] - - osmajor = `uname -r`.split(".").first - pkgversion = "Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip - - args = %W[ - --build=x86_64-apple-darwin#{osmajor} - --prefix=#{prefix} - --libdir=#{lib}/gcc/#{version_suffix} - --disable-nls - --enable-checking=release - --enable-languages=#{languages.join(",")} - --program-suffix=-#{version_suffix} - --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-pkgversion=#{pkgversion} - --with-bugurl=https://github.com/Homebrew/homebrew-core/issues - ] - - # Xcode 10 dropped 32-bit support - args << "--disable-multilib" if DevelopmentTools.clang_build_version >= 1000 - - # System headers may not be in /usr/include - sdk = MacOS.sdk_path_if_needed - if sdk - args << "--with-native-system-header-dir=/usr/include" - args << "--with-sysroot=#{sdk}" - end - - # Avoid reference to sed shim - args << "SED=/usr/bin/sed" - - # Ensure correct install names when linking against libgcc_s; - # see discussion in https://github.com/Homebrew/legacy-homebrew/pull/34303 - inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}" - - mkdir "build" do - system "../configure", *args - - # Use -headerpad_max_install_names in the build, - # otherwise updated load commands won't fit in the Mach-O header. - # This is needed because `gcc` avoids the superenv shim. - system "make", "BOOT_LDFLAGS=-Wl,-headerpad_max_install_names" - system "make", "install" - end - - # Handle conflicts between GCC formulae and avoid interfering - # with system compilers. - # Rename man7. - Dir.glob(man7/"*.7") { |file| add_suffix file, version_suffix } - # Even when we disable building info pages some are still installed. - info.rmtree - end - - def add_suffix(file, suffix) - dir = File.dirname(file) - ext = File.extname(file) - base = File.basename(file, ext) - File.rename file, "#{dir}/#{base}-#{suffix}#{ext}" - end - - test do - (testpath/"hello-c.c").write <<~EOS - #include - int main() - { - puts("Hello, world!"); - return 0; - } - EOS - system "#{bin}/gcc-8", "-o", "hello-c", "hello-c.c" - assert_equal "Hello, world!\n", `./hello-c` - - (testpath/"hello-cc.cc").write <<~EOS - #include - int main() - { - std::cout << "Hello, world!" << std::endl; - return 0; - } - EOS - system "#{bin}/g++-8", "-o", "hello-cc", "hello-cc.cc" - assert_equal "Hello, world!\n", `./hello-cc` - - (testpath/"test.f90").write <<~EOS - integer,parameter::m=10000 - real::a(m), b(m) - real::fact=0.5 - - do concurrent (i=1:m) - a(i) = a(i) + fact*b(i) - end do - write(*,"(A)") "Done" - end - EOS - system "#{bin}/gfortran-8", "-o", "test", "test.f90" - assert_equal "Done\n", `./test` - end -end diff --git a/Formula/gcc@9.rb b/Formula/gcc@9.rb deleted file mode 100644 index 7df52eb9f6f48..0000000000000 --- a/Formula/gcc@9.rb +++ /dev/null @@ -1,145 +0,0 @@ -class GccAT9 < Formula - desc "GNU compiler collection" - homepage "https://gcc.gnu.org/" - url "https://ftp.gnu.org/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gcc/gcc-9.3.0/gcc-9.3.0.tar.xz" - sha256 "71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1" - - bottle do - sha256 "68aa5249f09a70b9c46bd403a46ae42b64f6ea6b3a2af00603852ecaf77c72ce" => :catalina - sha256 "445cf4a6a4f8f3da61c7e1e6aceaf6fe919a08c475126b2b1e159eae829617a4" => :mojave - sha256 "682244d252f68de9513ed43f45e3e9f80bcd582e58df1d4aaa16197f3fc88742" => :high_sierra - 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? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - depends_on "gmp" - depends_on "isl" - depends_on "libmpc" - depends_on "mpfr" - - uses_from_macos "zlib" - - # GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib - cxxstdlib_check :skip - - def install - # GCC will suffer build errors if forced to use a particular linker. - ENV.delete "LD" - - # Even when suffixes are appended, the info pages conflict when - # install-info is run so pretend we have an outdated makeinfo - # to prevent their build. - ENV["gcc_cv_prog_makeinfo_modern"] = "no" - - # We avoiding building: - # - Ada, which requires a pre-existing GCC Ada compiler to bootstrap - # - Go, currently not supported on macOS - # - BRIG - languages = %w[c c++ objc obj-c++ fortran] - - osmajor = `uname -r`.split(".").first - pkgversion = "Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip - - args = %W[ - --build=x86_64-apple-darwin#{osmajor} - --prefix=#{prefix} - --libdir=#{lib}/gcc/9 - --disable-nls - --enable-checking=release - --enable-languages=#{languages.join(",")} - --program-suffix=-9 - --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-pkgversion=#{pkgversion} - --with-bugurl=https://github.com/Homebrew/homebrew-core/issues - ] - - # Xcode 10 dropped 32-bit support - args << "--disable-multilib" if DevelopmentTools.clang_build_version >= 1000 - - # System headers may not be in /usr/include - sdk = MacOS.sdk_path_if_needed - if sdk - args << "--with-native-system-header-dir=/usr/include" - args << "--with-sysroot=#{sdk}" - end - - # Avoid reference to sed shim - args << "SED=/usr/bin/sed" - - # Ensure correct install names when linking against libgcc_s; - # see discussion in https://github.com/Homebrew/legacy-homebrew/pull/34303 - inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/9" - - mkdir "build" do - system "../configure", *args - - # Use -headerpad_max_install_names in the build, - # otherwise updated load commands won't fit in the Mach-O header. - # This is needed because `gcc` avoids the superenv shim. - system "make", "BOOT_LDFLAGS=-Wl,-headerpad_max_install_names" - system "make", "install" - end - - # Handle conflicts between GCC formulae and avoid interfering - # with system compilers. - # Rename man7. - Dir.glob(man7/"*.7") { |file| add_suffix file, "9" } - # Even when we disable building info pages some are still installed. - info.rmtree - end - - def add_suffix(file, suffix) - dir = File.dirname(file) - ext = File.extname(file) - base = File.basename(file, ext) - File.rename file, "#{dir}/#{base}-#{suffix}#{ext}" - end - - test do - (testpath/"hello-c.c").write <<~EOS - #include - int main() - { - puts("Hello, world!"); - return 0; - } - EOS - system "#{bin}/gcc-9", "-o", "hello-c", "hello-c.c" - assert_equal "Hello, world!\n", `./hello-c` - - (testpath/"hello-cc.cc").write <<~EOS - #include - int main() - { - std::cout << "Hello, world!" << std::endl; - return 0; - } - EOS - system "#{bin}/g++-9", "-o", "hello-cc", "hello-cc.cc" - assert_equal "Hello, world!\n", `./hello-cc` - - (testpath/"test.f90").write <<~EOS - integer,parameter::m=10000 - real::a(m), b(m) - real::fact=0.5 - - do concurrent (i=1:m) - a(i) = a(i) + fact*b(i) - end do - write(*,"(A)") "Done" - end - EOS - system "#{bin}/gfortran-9", "-o", "test", "test.f90" - assert_equal "Done\n", `./test` - end -end diff --git a/Formula/gconf.rb b/Formula/gconf.rb deleted file mode 100644 index dd17aaa0b7766..0000000000000 --- a/Formula/gconf.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Gconf < Formula - desc "System for storing user application preferences" - homepage "https://projects.gnome.org/gconf/" - url "https://download.gnome.org/sources/GConf/3.2/GConf-3.2.6.tar.xz" - sha256 "1912b91803ab09a5eed34d364bf09fe3a2a9c96751fde03a4e0cfa51a04d784c" - revision 1 - - bottle do - sha256 "4c434b1dd944001776c5aae9924d0e3724a8682114924f8847aad30d990deccd" => :mojave - sha256 "e8a40df67c6816854cdfa9530e4c3b437907f5f92c32e8292f239d957dc1c0c8" => :high_sierra - sha256 "46a60790c5f50f74833167d63e6a4772cd7b3de5672a54dd9a26ff7d82df1cb7" => :sierra - sha256 "e810083f15d5ebb027c92071ea67c5960abf4d0b19c5e7809a71d026a78ae34a" => :el_capitan - sha256 "85f809fb483b3c78b283d3e7b681b133d106d991717d361c0bdd9596a81178ea" => :yosemite - sha256 "91bbb172f214d7fc407f20eef91a6d4dcf0140da4e91d99f4e0c2fd1e902815d" => :mavericks - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "dbus" - depends_on "dbus-glib" - depends_on "gettext" - depends_on "glib" - depends_on "orbit" - - uses_from_macos "libxml2" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--disable-silent-rules", "--prefix=#{prefix}", - "--sysconfdir=#{etc}" - system "make", "install" - - # Refresh the cache post-install, not during install. - rm lib/"gio/modules/giomodule.cache" - end - - def post_install - system Formula["glib"].opt_bin/"gio-querymodules", HOMEBREW_PREFIX/"lib/gio/modules" - end -end diff --git a/Formula/gcore.rb b/Formula/gcore.rb deleted file mode 100644 index 6e29d124a58c3..0000000000000 --- a/Formula/gcore.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Gcore < Formula - desc "Produce a snapshot (core dump) of a running process" - homepage "https://osxbook.com/book/bonus/chapter8/core/" - url "https://osxbook.com/book/bonus/chapter8/core/download/gcore-1.3.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/gcore-1.3.tar.gz" - sha256 "6b58095c80189bb5848a4178f282102024bbd7b985f9543021a3bf1c1a36aa2a" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "3451656da696ce7bb47816bf409dd38f279a0dde973b5d7bc60eaec62edbee9a" => :catalina - sha256 "86a6941a86863482eb97fd03e40749b83b74b7a93d7c7592db4dab6acb9c859a" => :mojave - sha256 "b9e7e188bee51975ccfdb8f711101a7637f316be0e3aa6b8f80259f7b884f488" => :high_sierra - sha256 "5fbccf36d0bd51cc4261859b7faf2cc15fe89244109b64abf83512ea73f3259f" => :sierra - sha256 "5c48b53869e00e0456d57bfa5adde594b5c5e46f3b0678434139765f5d8167ba" => :el_capitan - sha256 "e215d77d74b8c878a7d7449aada4817714b13024d6bfad78b2b700271e6218ec" => :yosemite - end - - keg_only :provided_by_macos - - def install - system "make" - bin.install "gcore" - end - - test do - assert_match "", shell_output("#{bin}/gcore 2>&1", 22) - end -end diff --git a/Formula/gcovr.rb b/Formula/gcovr.rb deleted file mode 100644 index ef945691afcc9..0000000000000 --- a/Formula/gcovr.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Gcovr < Formula - desc "Reports from gcov test coverage program" - homepage "https://gcovr.com/" - url "https://github.com/gcovr/gcovr/archive/4.2.tar.gz" - sha256 "589d5cb7164c285192ed0837d3cc17001ba25211e24933f0ba7cb9cf38b8a30e" - head "https://github.com/gcovr/gcovr.git" - - bottle do - cellar :any_skip_relocation - sha256 "64f2de6af39af65e2da0fe0622cf72005110bdafcaecdfb71abd6253dc4cf9d5" => :catalina - sha256 "6a25bff0607c3ec6e8442a541dfae012678b046e5a1023efc22c5a5063300e1d" => :mojave - sha256 "182bbf76588334f06561c759dfdd7ded755f913293eb5da0fa2d7a9b53e6ee86" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "libxml2" - uses_from_macos "libxslt" - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/d8/03/e491f423379ea14bb3a02a5238507f7d446de639b623187bccc111fbecdf/Jinja2-2.11.1.tar.gz" - sha256 "93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" - sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - 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/"example.c").write "int main() { return 0; }" - system "cc", "-fprofile-arcs", "-ftest-coverage", "-fPIC", "-O0", "-o", - "example", "example.c" - assert_match "Code Coverage Report", shell_output("#{bin}/gcovr -r .") - end -end diff --git a/Formula/gcsfuse.rb b/Formula/gcsfuse.rb deleted file mode 100644 index fcfed0089287d..0000000000000 --- a/Formula/gcsfuse.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Gcsfuse < Formula - desc "User-space file system for interacting with Google Cloud" - homepage "https://github.com/googlecloudplatform/gcsfuse" - url "https://github.com/GoogleCloudPlatform/gcsfuse/archive/v0.30.0.tar.gz" - sha256 "930e3c15a9f3fa8b79023442b549f7813f5bf95739097f41000bff5ded9db66d" - license "Apache-2.0" - head "https://github.com/GoogleCloudPlatform/gcsfuse.git" - - bottle do - cellar :any_skip_relocation - sha256 "f17d670c7a662c8d16aa651b822b754507e22a2d6e4594aea1b0310d3aefb6f6" => :catalina - sha256 "4088dc349ce2baba035e901b93a5347a8cbe38600a28845a9883abc35d534d6f" => :mojave - sha256 "3935cf67d77796530c79ae81d493c9b82477ddc891f07b92e3553df8be833a61" => :high_sierra - end - - depends_on "go" => :build - depends_on :osxfuse - - def install - # Build the build_gcsfuse tool. Ensure that it doesn't pick up any - # libraries from the user's GOPATH; it should have no dependencies. - ENV.delete("GOPATH") - system "go", "build", "./tools/build_gcsfuse" - - # Use that tool to build gcsfuse itself. - gcsfuse_version = if build.head? - `git rev-parse --short HEAD`.strip - else - version - end - - system "./build_gcsfuse", buildpath, prefix, gcsfuse_version - end - - test do - system "#{bin}/gcsfuse", "--help" - system "#{sbin}/mount_gcsfuse", "--help" - end -end diff --git a/Formula/gcutil.rb b/Formula/gcutil.rb deleted file mode 100644 index f97ab65e9c9a7..0000000000000 --- a/Formula/gcutil.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Gcutil < Formula - desc "Manage your Google Compute Engine resources" - homepage "https://cloud.google.com/compute/docs/gcutil/" - url "https://dl.google.com/dl/cloudsdk/release/artifacts/gcutil-1.16.1.zip" - sha256 "31f438c9ce3471f1404340e3411239b28b63f117d17776271fee1e1a352f3877" - - bottle :unneeded - - def install - libexec.install "gcutil", "lib" - bin.install_symlink libexec/"gcutil" - end - - test do - system "#{bin}/gcutil", "version" - end -end diff --git a/Formula/gcviewer.rb b/Formula/gcviewer.rb deleted file mode 100644 index 65deafcbe3847..0000000000000 --- a/Formula/gcviewer.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Gcviewer < Formula - desc "Java garbage collection visualization tool" - homepage "https://github.com/chewiebug/GCViewer" - url "https://downloads.sourceforge.net/project/gcviewer/gcviewer-1.36.jar" - sha256 "5e6757735903d1d3b8359ae8fabc66cdc2ac6646725e820a18e55b85b3bc00f4" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"] - (bin/"gcviewer").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/gcviewer-#{version}.jar" "$@" - EOS - end - - test do - assert_predicate libexec/"gcviewer-#{version}.jar", :exist? - end -end diff --git a/Formula/gd.rb b/Formula/gd.rb deleted file mode 100644 index 45e7dc01c43ff..0000000000000 --- a/Formula/gd.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Gd < Formula - desc "Graphics library to dynamically manipulate images" - homepage "https://libgd.github.io/" - url "https://github.com/libgd/libgd/releases/download/gd-2.3.0/libgd-2.3.0.tar.xz" - sha256 "ecd9155b9a417fb3f837f29e5966323796de247789163761dd72dbf83bfcac58" - - bottle do - cellar :any - sha256 "ebc4192da4580942545084cf2f5c36dc4645a5c83244224905e01dee4e50837e" => :catalina - sha256 "c014efe5f692b3146a4416c0acdaad3c632064d50aad2c18598cfb32fb31ee69" => :mojave - sha256 "0bd97ae0be0bfaa7554d0628a69b5fd8cba27de7ff5bde0533d4a1b6445be614" => :high_sierra - end - - head do - url "https://github.com/libgd/libgd.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "fontconfig" - depends_on "freetype" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "webp" - - def install - system "./bootstrap.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-freetype=#{Formula["freetype"].opt_prefix}", - "--with-png=#{Formula["libpng"].opt_prefix}", - "--without-x", - "--without-xpm" - system "make", "install" - end - - test do - system "#{bin}/pngtogd", test_fixtures("test.png"), "gd_test.gd" - system "#{bin}/gdtopng", "gd_test.gd", "gd_test.png" - end -end diff --git a/Formula/gdal.rb b/Formula/gdal.rb deleted file mode 100644 index 3c5fd0cd0706a..0000000000000 --- a/Formula/gdal.rb +++ /dev/null @@ -1,163 +0,0 @@ -class Gdal < Formula - desc "Geospatial Data Abstraction Library" - homepage "https://www.gdal.org/" - url "https://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.xz" - sha256 "767c8d0dfa20ba3283de05d23a1d1c03a7e805d0ce2936beaff0bb7d11450641" - - bottle do - sha256 "b781dd4174e448f161d1e3f38fa898fea35ea16cb9fa6212cbcd0cffd6951e81" => :catalina - sha256 "5a517fafd975da2c073cbca3946b481683f88e832432efdc6c3951c8aac325d3" => :mojave - sha256 "d3e3b959e7c6f80ff748a345ba26c1876568de7f0edffe69ae6ed40959ddeee9" => :high_sierra - end - - head do - url "https://github.com/OSGeo/gdal.git" - depends_on "doxygen" => :build - end - - depends_on "pkg-config" => :build - - depends_on "cfitsio" - depends_on "epsilon" - depends_on "expat" - depends_on "freexl" - depends_on "geos" - depends_on "giflib" - depends_on "hdf5" - depends_on "jasper" - depends_on "jpeg" - depends_on "json-c" - depends_on "libdap" - depends_on "libgeotiff" - depends_on "libpng" - depends_on "libpq" - depends_on "libspatialite" - depends_on "libtiff" - depends_on "libxml2" - depends_on "netcdf" - depends_on "numpy" - depends_on "pcre" - depends_on "poppler" - depends_on "proj" - depends_on "python@3.8" - depends_on "sqlite" # To ensure compatibility with SpatiaLite - depends_on "unixodbc" # macOS version is not complete enough - depends_on "webp" - depends_on "xerces-c" - depends_on "xz" # get liblzma compression algorithm library from XZutils - depends_on "zstd" - - conflicts_with "cpl", :because => "both install cpl_error.h" - - def install - args = [ - # Base configuration - "--prefix=#{prefix}", - "--mandir=#{man}", - "--disable-debug", - "--with-libtool", - "--with-local=#{prefix}", - "--with-opencl", - "--with-threads", - - # GDAL native backends - "--with-bsb", - "--with-grib", - "--with-pam", - "--with-pcidsk=internal", - "--with-pcraster=internal", - - # Homebrew backends - "--with-curl=/usr/bin/curl-config", - "--with-expat=#{Formula["expat"].prefix}", - "--with-freexl=#{Formula["freexl"].opt_prefix}", - "--with-geos=#{Formula["geos"].opt_prefix}/bin/geos-config", - "--with-geotiff=#{Formula["libgeotiff"].opt_prefix}", - "--with-gif=#{Formula["giflib"].opt_prefix}", - "--with-jpeg=#{Formula["jpeg"].opt_prefix}", - "--with-libjson-c=#{Formula["json-c"].opt_prefix}", - "--with-libtiff=#{Formula["libtiff"].opt_prefix}", - "--with-pg=yes", - "--with-png=#{Formula["libpng"].opt_prefix}", - "--with-spatialite=#{Formula["libspatialite"].opt_prefix}", - "--with-sqlite3=#{Formula["sqlite"].opt_prefix}", - "--with-proj=#{Formula["proj"].opt_prefix}", - "--with-zstd=#{Formula["zstd"].opt_prefix}", - "--with-liblzma=yes", - "--with-cfitsio=#{Formula["cfitsio"].opt_prefix}", - "--with-hdf5=#{Formula["hdf5"].opt_prefix}", - "--with-netcdf=#{Formula["netcdf"].opt_prefix}", - "--with-jasper=#{Formula["jasper"].opt_prefix}", - "--with-xerces=#{Formula["xerces-c"].opt_prefix}", - "--with-odbc=#{Formula["unixodbc"].opt_prefix}", - "--with-dods-root=#{Formula["libdap"].opt_prefix}", - "--with-epsilon=#{Formula["epsilon"].opt_prefix}", - "--with-webp=#{Formula["webp"].opt_prefix}", - "--with-poppler=#{Formula["poppler"].opt_prefix}", - - # Explicitly disable some features - "--with-armadillo=no", - "--with-qhull=no", - "--without-grass", - "--without-jpeg12", - "--without-libgrass", - "--without-mysql", - "--without-perl", - "--without-python", - - # Unsupported backends are either proprietary or have no compatible version - # in Homebrew. Podofo is disabled because Poppler provides the same - # functionality and then some. - "--without-gta", - "--without-ogdi", - "--without-fme", - "--without-hdf4", - "--without-openjpeg", - "--without-fgdb", - "--without-ecw", - "--without-kakadu", - "--without-mrsid", - "--without-jp2mrsid", - "--without-mrsid_lidar", - "--without-msg", - "--without-oci", - "--without-ingres", - "--without-idb", - "--without-sde", - "--without-podofo", - "--without-rasdaman", - "--without-sosi", - ] - - # Work around "error: no member named 'signbit' in the global namespace" - # Remove once support for macOS 10.12 Sierra is dropped - if DevelopmentTools.clang_build_version >= 900 - ENV.delete "SDKROOT" - ENV.delete "HOMEBREW_SDKROOT" - end - - system "./configure", *args - system "make" - system "make", "install" - - # Build Python bindings - cd "swig/python" do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(prefix) - end - bin.install Dir["swig/python/scripts/*.py"] - - system "make", "man" if build.head? - # Force man installation dir: https://trac.osgeo.org/gdal/ticket/5092 - system "make", "install-man", "INST_MAN=#{man}" - # Clean up any stray doxygen files - Dir.glob("#{bin}/*.dox") { |p| rm p } - end - - test do - # basic tests to see if third-party dylibs are loading OK - system "#{bin}/gdalinfo", "--formats" - system "#{bin}/ogrinfo", "--formats" - - system Formula["python@3.8"].opt_bin/"python3", "-c", "import gdal" - end -end diff --git a/Formula/gdb.rb b/Formula/gdb.rb deleted file mode 100644 index 07ee95434e628..0000000000000 --- a/Formula/gdb.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Gdb < Formula - desc "GNU debugger" - homepage "https://www.gnu.org/software/gdb/" - url "https://ftp.gnu.org/gnu/gdb/gdb-9.2.tar.xz" - mirror "https://ftpmirror.gnu.org/gdb/gdb-9.2.tar.xz" - sha256 "360cd7ae79b776988e89d8f9a01c985d0b1fa21c767a4295e5f88cb49175c555" - license "GPL-2.0" - head "https://sourceware.org/git/binutils-gdb.git" - - bottle do - sha256 "9ad6c9a4147783a50f9e67a8d683c6dc070c738da06bfe8e2bf5cdd7bdfb5763" => :catalina - sha256 "4908f6954fbcccf317e4297e42f6b85ebcab003ff9d96f00f25023616782c0c1" => :mojave - sha256 "ac2a55847a2cf167e05e639003813606b32827e5f05995ff3544530e49b09d7a" => :high_sierra - end - - depends_on "guile" - depends_on "python@3.8" - depends_on "xz" # required for lzma support - - uses_from_macos "expat" - uses_from_macos "ncurses" - - on_linux do - depends_on "pkg-config" => :build - end - - conflicts_with "i386-elf-gdb", :because => "both install include/gdb, share/gdb and share/info" - - fails_with :clang do - build 800 - cause <<~EOS - probe.c:63:28: error: default initialization of an object of const type - 'const any_static_probe_ops' without a user-provided default constructor - EOS - end - - def install - args = %W[ - --enable-targets=all - --prefix=#{prefix} - --disable-debug - --disable-dependency-tracking - --with-lzma - --with-python=#{Formula["python@3.8"].opt_bin}/python3 - --disable-binutils - ] - - mkdir "build" do - system "../configure", *args - system "make" - - # Don't install bfd or opcodes, as they are provided by binutils - system "make", "install-gdb" - end - end - - def caveats - <<~EOS - gdb requires special privileges to access Mach ports. - You will need to codesign the binary. For instructions, see: - - https://sourceware.org/gdb/wiki/BuildingOnDarwin - - On 10.12 (Sierra) or later with SIP, you need to run this: - - echo "set startup-with-shell off" >> ~/.gdbinit - EOS - end - - test do - system bin/"gdb", bin/"gdb", "-configuration" - end -end diff --git a/Formula/gdbgui.rb b/Formula/gdbgui.rb deleted file mode 100644 index 06f705df746a8..0000000000000 --- a/Formula/gdbgui.rb +++ /dev/null @@ -1,110 +0,0 @@ -class Gdbgui < Formula - include Language::Python::Virtualenv - - desc "Modern, browser-based frontend to gdb (gnu debugger)" - homepage "https://www.gdbgui.com/" - url "https://github.com/cs01/gdbgui/archive/0.13.2.0.tar.gz" - sha256 "325e4c6dd417d59b95ceb123173eee69d754f6ff3f97110c0cb960670460f858" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "6b4dc81ae5aa3bb3d8758d38b3ab9cd89d14f85c8ada1229b8381dfef87f2777" => :catalina - sha256 "d4b788d85f71166160b4e302a751dc78fba34c613b6440a55415b60def0b1fc4" => :mojave - sha256 "c8b67848de98e9d29eda6cef4e493afdc40afa4b4301c34b1545add045677c68" => :high_sierra - end - - depends_on "gdb" - depends_on "python@3.8" - - resource "click" do - url "https://files.pythonhosted.org/packages/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - end - - resource "Flask" do - url "https://files.pythonhosted.org/packages/32/57/3c33fe153ea008e9e0202eb028972178337c55777686aac03f41ade671f8/Flask-0.12.5.tar.gz" - sha256 "fac2b9d443e49f7e7358a444a3db5950bdd0324674d92ba67f8f1f15f876b14f" - end - - resource "Flask-Compress" do - url "https://files.pythonhosted.org/packages/0e/2a/378bd072928f6d92fd8c417d66b00c757dc361c0405a46a0134de6fd323d/Flask-Compress-1.4.0.tar.gz" - sha256 "468693f4ddd11ac6a41bca4eb5f94b071b763256d54136f77957cfee635badb3" - end - - resource "Flask-SocketIO" do - url "https://files.pythonhosted.org/packages/5d/94/6f55de2fd72f1d7f7eb17cd6045a50581e7c66d53580fc93fd607a5cd630/Flask-SocketIO-2.9.6.tar.gz" - sha256 "f49edfd3a44458fbb9f7a04a57069ffc0c37f000495194f943a25d370436bb69" - end - - resource "gevent" do - url "https://files.pythonhosted.org/packages/5a/79/2c63d385d017b5dd7d70983a463dfd25befae70c824fedb857df6e72eff2/gevent-1.5.0.tar.gz" - sha256 "b2814258e3b3fb32786bb73af271ad31f51e1ac01f33b37426b66cb8491b4c29" - end - - resource "greenlet" do - url "https://files.pythonhosted.org/packages/f8/e8/b30ae23b45f69aa3f024b46064c0ac8e5fcb4f22ace0dca8d6f9c8bbe5e7/greenlet-0.4.15.tar.gz" - sha256 "9416443e219356e3c31f1f918a91badf2e37acf297e2fa13d24d1cc2380f8fbc" - end - - resource "itsdangerous" do - url "https://files.pythonhosted.org/packages/68/1a/f27de07a8a304ad5fa817bbe383d1238ac4396da447fa11ed937039fa04b/itsdangerous-1.1.0.tar.gz" - sha256 "321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "pygdbmi" do - url "https://files.pythonhosted.org/packages/b1/06/f60cce2f9acb5ac4278cb1eedb7bb1a7bb52777b7ae74cd222c0068302fd/pygdbmi-0.9.0.3.tar.gz" - sha256 "5bdf2f072e8f2f6471f19f8dcd87d6425c5d8069d47c0a5ffe8d0eff48cb171e" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "python-engineio" do - url "https://files.pythonhosted.org/packages/71/5d/620b75396ce993001cbccc80dd786ab09a16a8e3f6c4878ad05f051064d6/python-engineio-3.12.1.tar.gz" - sha256 "2481732d93646998f7372ef0ecf003af7817b82720b881db173c3d50b4887916" - end - - resource "python-socketio" do - url "https://files.pythonhosted.org/packages/9b/dd/45c2eb8fc9b8208cdf5948b468934b47f92ecca031c449863d8128d5cc15/python-socketio-4.5.1.tar.gz" - sha256 "149b98c33f8c3d09273fb4ebeb83781e4dc9411b56b27d9f058bec1bd1ed74b7" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "Werkzeug" do - url "https://files.pythonhosted.org/packages/c3/1d/1c0761d9365d166dc9d882a48c437111d22b0df564d6d5768045d9a51fd0/Werkzeug-0.16.1.tar.gz" - sha256 "b353856d37dec59d6511359f97f6a4b2468442e454bd1c98298ddce53cac1f04" - end - - def install - virtualenv_create(libexec, "python3") - virtualenv_install_with_resources - end - - test do - assert_equal version.to_s, shell_output("#{bin}/gdbgui -v").strip - - fork do - exec bin/"gdbgui", "-n" - end - sleep 3 - - assert_match "gdbgui - gdb in a browser", shell_output("curl -s 127.0.0.1:5000") - end -end diff --git a/Formula/gdbm.rb b/Formula/gdbm.rb deleted file mode 100644 index 2e779aa43fb23..0000000000000 --- a/Formula/gdbm.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Gdbm < Formula - desc "GNU database manager" - homepage "https://www.gnu.org/software/gdbm/" - url "https://ftp.gnu.org/gnu/gdbm/gdbm-1.18.1.tar.gz" - mirror "https://ftpmirror.gnu.org/gdbm/gdbm-1.18.1.tar.gz" - sha256 "86e613527e5dba544e73208f42b78b7c022d4fa5a6d5498bf18c8d6f745b91dc" - license "GPL-3.0" - - bottle do - cellar :any - rebuild 1 - sha256 "b20854a82cf1285c3be2c0890e45fa532bf2f5a9d9465694439c4a4c4310e528" => :catalina - sha256 "2168d58856917ca996d12dedaa930643529c66046103fe55018afc51f2bc1fcb" => :mojave - sha256 "ac688d571f9c00e09670440d67d2869a34dab0fb897ba0b183ed84fceffdbc9c" => :high_sierra - sha256 "89d6db4fbffbe2184b4531faaebf0432a4b01e1ed92678ce6bd2f95c69dc9803" => :sierra - end - - # Use --without-readline because readline detection is broken in 1.13 - # https://github.com/Homebrew/homebrew-core/pull/10903 - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --without-readline - --prefix=#{prefix} - ] - - system "./configure", *args - system "make", "install" - end - - test do - pipe_output("#{bin}/gdbmtool --norc --newdb test", "store 1 2\nquit\n") - assert_predicate testpath/"test", :exist? - assert_match /2/, pipe_output("#{bin}/gdbmtool --norc test", "fetch 1\nquit\n") - end -end diff --git a/Formula/gdcm.rb b/Formula/gdcm.rb deleted file mode 100644 index 5341b14513dab..0000000000000 --- a/Formula/gdcm.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Gdcm < Formula - desc "Grassroots DICOM library and utilities for medical files" - homepage "https://sourceforge.net/projects/gdcm/" - url "https://github.com/malaterre/GDCM/archive/v3.0.7.tar.gz" - sha256 "e00881f0a93d2db4a686231d5f1092a4bc888705511fe5d90114f2226147a18d" - - bottle do - rebuild 1 - sha256 "b4fcbfc9a2dd14f8d5b0cc1fd1f5900465b469a1f05fbae51f09bc209a578dac" => :catalina - sha256 "67a12632e5705ed9ce8b72061b88b16246114d89a9e0594c1dd60100869e7412" => :mojave - sha256 "6210fcdf8afd786ec2b49c74f1d5bd6d4e0f40e1404ffdbb0ee40c66ef53715d" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "swig" => :build - depends_on "openjpeg" - depends_on "openssl@1.1" - depends_on "python@3.8" - depends_on "vtk" - - def install - ENV.cxx11 - - python3 = Formula["python@3.8"].opt_bin/"python3" - xy = Language::Python.major_minor_version python3 - python_include = - Utils.safe_popen_read(python3, "-c", "from distutils import sysconfig;print(sysconfig.get_python_inc(True))") - .chomp - python_executable = Utils.safe_popen_read(python3, "-c", "import sys;print(sys.executable)").chomp - - args = std_cmake_args + %W[ - -GNinja - -DGDCM_BUILD_APPLICATIONS=ON - -DGDCM_BUILD_SHARED_LIBS=ON - -DGDCM_BUILD_TESTING=OFF - -DGDCM_BUILD_EXAMPLES=OFF - -DGDCM_BUILD_DOCBOOK_MANPAGES=OFF - -DGDCM_USE_VTK=ON - -DGDCM_USE_SYSTEM_OPENJPEG=ON - -DGDCM_USE_SYSTEM_OPENSSL=ON - -DGDCM_WRAP_PYTHON=ON - -DPYTHON_EXECUTABLE=#{python_executable} - -DPYTHON_INCLUDE_DIR=#{python_include} - -DGDCM_INSTALL_PYTHONMODULE_DIR=#{lib}/python#{xy}/site-packages - -DCMAKE_INSTALL_RPATH=#{lib} - -DGDCM_NO_PYTHON_LIBS_LINKING=ON - ] - - mkdir "build" do - ENV.append "LDFLAGS", "-undefined dynamic_lookup" - - system "cmake", "..", *args - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.cxx").write <<~EOS - #include "gdcmReader.h" - int main(int, char *[]) - { - gdcm::Reader reader; - reader.SetFileName("file.dcm"); - } - EOS - - system ENV.cxx, "-std=c++11", "-isystem", "#{include}/gdcm-3.0", "-o", "test.cxx.o", "-c", "test.cxx" - system ENV.cxx, "-std=c++11", "test.cxx.o", "-o", "test", "-L#{lib}", "-lgdcmDSED" - system "./test" - - system Formula["python@3.8"].opt_bin/"python3", "-c", "import gdcm" - end -end diff --git a/Formula/gdk-pixbuf.rb b/Formula/gdk-pixbuf.rb deleted file mode 100644 index 610af67cae757..0000000000000 --- a/Formula/gdk-pixbuf.rb +++ /dev/null @@ -1,114 +0,0 @@ -class GdkPixbuf < Formula - desc "Toolkit for image loading and pixel buffer manipulation" - homepage "https://gtk.org/" - url "https://download.gnome.org/sources/gdk-pixbuf/2.40/gdk-pixbuf-2.40.0.tar.xz" - sha256 "1582595099537ca8ff3b99c6804350b4c058bb8ad67411bbaae024ee7cead4e6" - revision 1 - - bottle do - sha256 "d70823971bb0c34d1ca997233471c9727dc7fe487ffbda050fad35a873a2b909" => :catalina - sha256 "e2599d42eb2cdf08f3784575778ea782e9bd5dfefbf15f7aea5408d8f653a6be" => :mojave - sha256 "3e95bd4ea1b357022809c86a104e0e971a264ffc69888026f261d74507abea00" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - - on_linux do - depends_on "shared-mime-info" - end - - # gdk-pixbuf has an internal version number separate from the overall - # version number that specifies the location of its module and cache - # files, this will need to be updated if that internal version number - # is ever changed (as evidenced by the location no longer existing) - def gdk_so_ver - "2.0" - end - - def gdk_module_ver - "2.10.0" - end - - def install - inreplace "gdk-pixbuf/meson.build", - "-DGDK_PIXBUF_LIBDIR=\"@0@\"'.format(gdk_pixbuf_libdir)", - "-DGDK_PIXBUF_LIBDIR=\"@0@\"'.format('#{HOMEBREW_PREFIX}/lib')" - - args = std_meson_args + %w[ - -Dx11=false - -Ddocs=false - -Dgir=true - -Drelocatable=false - -Dnative_windows_loaders=false - -Dinstalled_tests=false - -Dman=false - ] - - ENV["DESTDIR"] = "/" - mkdir "build" do - system "meson", *args, ".." - system "ninja", "-v" - system "ninja", "install" - end - - # Other packages should use the top-level modules directory - # rather than dumping their files into the gdk-pixbuf keg. - inreplace lib/"pkgconfig/gdk-pixbuf-#{gdk_so_ver}.pc" do |s| - libv = s.get_make_var "gdk_pixbuf_binary_version" - s.change_make_var! "gdk_pixbuf_binarydir", - HOMEBREW_PREFIX/"lib/gdk-pixbuf-#{gdk_so_ver}"/libv - end - end - - # The directory that loaders.cache gets linked into, also has the "loaders" - # directory that is scanned by gdk-pixbuf-query-loaders in the first place - def module_dir - "#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-#{gdk_so_ver}/#{gdk_module_ver}" - end - - def post_install - ENV["GDK_PIXBUF_MODULEDIR"] = "#{module_dir}/loaders" - system "#{bin}/gdk-pixbuf-query-loaders", "--update-cache" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = gdk_pixbuf_get_type(); - return 0; - } - EOS - gettext = Formula["gettext"] - glib = Formula["glib"] - libpng = Formula["libpng"] - 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}/gdk-pixbuf-2.0 - -I#{libpng.opt_include}/libpng16 - -I#{pcre.opt_include} - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lgdk_pixbuf-2.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gdl.rb b/Formula/gdl.rb deleted file mode 100644 index a3752814111b5..0000000000000 --- a/Formula/gdl.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Gdl < Formula - desc "GNOME Docking Library provides docking features for GTK+ 3" - homepage "https://developer.gnome.org/gdl/" - url "https://download.gnome.org/sources/gdl/3.34/gdl-3.34.0.tar.xz" - sha256 "858b30f0cdce4c4cb3e8365a7d54ce57c388beff38ea583be5449bc78dda8d02" - revision 2 - - bottle do - sha256 "5acba250d8c77d17be5ff312bf11d6aa33cb609c4c351b2a1cd1bf565e73e81a" => :catalina - sha256 "2e2e04543eaf7ee02a791433fbab570d3b5f44651cec8dd56a40a519c2a38d24" => :mojave - sha256 "abd9360935baecd914847697e5a21e7b7d91b94c0d5878509921cdb2ba72799c" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gtk+3" - depends_on "libxml2" - - 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 = gdl_dock_object_get_type(); - 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"] - 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#{gtkx3.opt_include}/gtk-3.0 - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/libgdl-3.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#{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 - -lcairo - -lcairo-gobject - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgdl-3 - -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/gdm.rb b/Formula/gdm.rb deleted file mode 100644 index 75e3589a5985a..0000000000000 --- a/Formula/gdm.rb +++ /dev/null @@ -1,48 +0,0 @@ -require "language/go" - -class Gdm < Formula - desc "Go Dependency Manager (gdm)" - homepage "https://github.com/sparrc/gdm" - url "https://github.com/sparrc/gdm/archive/1.4.tar.gz" - sha256 "2ac8800319d922fe2816e57f30e23ddd9a11ce2e93294c533318b9f081debde4" - license "Unlicense" - head "https://github.com/sparrc/gdm.git" - - bottle do - cellar :any_skip_relocation - sha256 "a9801987792b8b32d8e1a30d668e43a36c798f2901149dbd49f4f8f0f79b45b7" => :catalina - sha256 "655848c2fdb17aea2fd7f3f80a537d115b6e31232927c7cda7fac3b22f5d47a5" => :mojave - sha256 "f9d1d9d11a51359be57311d0e896dc797637905d0b8e68340a3e5d6ad2dc962d" => :high_sierra - sha256 "1271ce8ff02868997451491819027d10c362a9d6b72d10c9cbdafeb80ebbe747" => :sierra - sha256 "b3f081076a078f90f6a534ff30ff268c89baec38bd02ff11c9e02804755c8c33" => :el_capitan - sha256 "03f2d8cbcee0c4e41a00ec222f56b7d3204290b075afafe28afe6ced3458ebd8" => :yosemite - sha256 "a5b111a00c19c74400787394eead8b5a209f9ee64125a5365eae97fa3d78d38a" => :mavericks - end - - depends_on "go" - - go_resource "golang.org/x/tools" do - url "https://go.googlesource.com/tools.git", - :revision => "6f233b96dfbc53e33b302e31b88814cf74697ff6" - end - - def install - ENV["GOPATH"] = buildpath - mkdir_p buildpath/"src/github.com/sparrc" - ln_sf buildpath, buildpath/"src/github.com/sparrc/gdm" - - Language::Go.stage_deps resources, buildpath/"src" - - cd "src/github.com/sparrc/gdm" do - system "go", "build", "-o", bin/"gdm", - "-ldflags", "-X main.Version=#{version}" - end - end - - test do - ENV["GOPATH"] = testpath.realpath - assert_match version.to_s, shell_output("#{bin}/gdm version") - assert_match testpath.realpath.to_s, shell_output("#{bin}/gdm save") - system bin/"gdm", "restore" - end -end diff --git a/Formula/gdmap.rb b/Formula/gdmap.rb deleted file mode 100644 index a1742d3df386e..0000000000000 --- a/Formula/gdmap.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Gdmap < Formula - desc "Tool to inspect the used space of folders" - homepage "https://sourceforge.net/projects/gdmap/" - url "https://downloads.sourceforge.net/project/gdmap/gdmap/0.8.1/gdmap-0.8.1.tar.gz" - sha256 "a200c98004b349443f853bf611e49941403fce46f2335850913f85c710a2285b" - revision 2 - - bottle do - sha256 "d465a02727acca541229325a9d3ffa79e1ef9693512da5b1d3a3b37437fbe00d" => :catalina - sha256 "9c178f409b81ce7808efe356bf09d82804265de11d4527dcc1dea20948a76b16" => :mojave - sha256 "1f82d4cf21c4166fd579e132e3ecf7302179cba2d6b19bf33ef18618f5354416" => :high_sierra - sha256 "2a5da8dc2b00407271001ef511d61cad03f043cc98b45442ab1aff7d9263ae19" => :sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "gtk+" - - # The code depends on some GTK macros that are flagged as deprecated in the brew version of GTK. - # I assume they're not deprecated in normal GTK, because the config file disables deprecated GDK calls. - # The first patch turns off this disablement, making the code work fine as intended - # The second patch is to remove an unused system header import on one of the files. - # This header file doesn't exist in OSX and the program compiles and runs fine without it. - # Filed bug upstream as https://sourceforge.net/p/gdmap/bugs/19/ - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/gdmap/0.8.1.patch" - sha256 "292cc974405f0a8c7f6dc32770f81057e67eac6e4fcb1fc575e1f02e044cf9c3" - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - - system "make", "install" - end - - test do - system "#{bin}/gdmap", "--help" - end -end diff --git a/Formula/gdrive.rb b/Formula/gdrive.rb deleted file mode 100644 index 8599883de5839..0000000000000 --- a/Formula/gdrive.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Gdrive < Formula - desc "Google Drive CLI Client" - homepage "https://github.com/gdrive-org/gdrive" - url "https://github.com/gdrive-org/gdrive/archive/2.1.0.tar.gz" - sha256 "a1ea624e913e258596ea6340c8818a90c21962b0a75cf005e49a0f72f2077b2e" - license "MIT" - head "https://github.com/gdrive-org/gdrive.git" - - bottle do - cellar :any_skip_relocation - rebuild 3 - sha256 "c89785f7d95e16fe113f649f47c80261ce7d335427d60c6543a3bd8d58eee522" => :catalina - sha256 "e26ef4bec660913f42aa735c28f58393912d2d0293bf98a351fa2b27a1baee01" => :mojave - sha256 "8fc5917762cd0b7622d35053931b41315606be97ba38ae34c9a67bf7ff87a1d3" => :high_sierra - sha256 "b03e82ba9bb723b7f6225607b3127b9d515f0d79271f76b375b74324aecfb057" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - dir = buildpath/"src/github.com/prasmussen/gdrive" - dir.install buildpath.children - dir.cd do - system "go", "build", "-o", bin/"gdrive", "." - doc.install "README.md" - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/gdrive version") - end -end diff --git a/Formula/gdub.rb b/Formula/gdub.rb deleted file mode 100644 index 1f8087208faa0..0000000000000 --- a/Formula/gdub.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Gdub < Formula - desc "Gradlew/gradle wrapper" - homepage "https://www.gdub.rocks/" - url "https://github.com/dougborg/gdub/archive/v0.2.0.tar.gz" - sha256 "aa3da76752b597e60094a67971f35dfe20377390d21b3ae3b45b7b7040e9a268" - - bottle :unneeded - - def install - bin.install "bin/gw" - end - - test do - assert_match "No gradlew set up for this project", pipe_output("#{bin}/gw 2>&1") - end -end diff --git a/Formula/geant4.rb b/Formula/geant4.rb deleted file mode 100644 index 3eca4673e0947..0000000000000 --- a/Formula/geant4.rb +++ /dev/null @@ -1,112 +0,0 @@ -class Geant4 < Formula - desc "Simulation toolkit for particle transport through matter" - homepage "https://geant4.web.cern.ch/" - url "https://geant4-data.web.cern.ch/geant4-data/releases/source/geant4.10.05.p01.tar.gz" - version "10.5.1" - sha256 "f4a292220500fad17e0167ce3153e96e3410ecbe96284e572dc707f63523bdff" - revision 1 - - bottle do - cellar :any - sha256 "ff1b45e5f1c0e51b2716f7b355c2b314677341fc701c534538fda7fc29322f16" => :catalina - sha256 "c1b90be0a6928f6ae58bc842d61ce792ea6c1d004e51eeab5fe955216ab02b4f" => :mojave - sha256 "1074777bb8c5f386baec8bf280542b109576a74ad19a9e5c198e1789fc397646" => :high_sierra - end - - depends_on "cmake" => [:build, :test] - depends_on "qt" - depends_on "xerces-c" - - resource "G4NDL" do - url "https://cern.ch/geant4-data/datasets/G4NDL.4.5.tar.gz" - sha256 "cba928a520a788f2bc8229c7ef57f83d0934bb0c6a18c31ef05ef4865edcdf8e" - end - - resource "G4EMLOW" do - url "https://cern.ch/geant4-data/datasets/G4EMLOW.7.7.tar.gz" - sha256 "16dec6adda6477a97424d749688d73e9bd7d0b84d0137a67cf341f1960984663" - end - - resource "PhotonEvaporation" do - url "https://cern.ch/geant4-data/datasets/G4PhotonEvaporation.5.3.tar.gz" - sha256 "d47ababc8cbe548065ef644e9bd88266869e75e2f9e577ebc36bc55bf7a92ec8" - end - - resource "RadioactiveDecay" do - url "https://cern.ch/geant4-data/datasets/G4RadioactiveDecay.5.3.tar.gz" - sha256 "5c8992ac57ae56e66b064d3f5cdfe7c2fee76567520ad34a625bfb187119f8c1" - end - - resource "G4SAIDDATA" do - url "https://cern.ch/geant4-data/datasets/G4SAIDDATA.2.0.tar.gz" - sha256 "1d26a8e79baa71e44d5759b9f55a67e8b7ede31751316a9e9037d80090c72e91" - end - - resource "G4PARTICLEXS" do - url "https://cern.ch/geant4-data/datasets/G4PARTICLEXS.1.1.tar.gz" - sha256 "100a11c9ed961152acfadcc9b583a9f649dda4e48ab314fcd4f333412ade9d62" - end - - resource "G4ABLA" do - url "https://cern.ch/geant4-data/datasets/G4ABLA.3.1.tar.gz" - sha256 "7698b052b58bf1b9886beacdbd6af607adc1e099fc730ab6b21cf7f090c027ed" - end - - resource "G4INCL" do - url "https://cern.ch/geant4-data/datasets/G4INCL.1.0.tar.gz" - sha256 "716161821ae9f3d0565fbf3c2cf34f4e02e3e519eb419a82236eef22c2c4367d" - end - - resource "G4PII" do - url "https://cern.ch/geant4-data/datasets/G4PII.1.3.tar.gz" - sha256 "6225ad902675f4381c98c6ba25fc5a06ce87549aa979634d3d03491d6616e926" - end - - resource "G4ENSDFSTATE" do - url "https://cern.ch/geant4-data/datasets/G4ENSDFSTATE.2.2.tar.gz" - sha256 "dd7e27ef62070734a4a709601f5b3bada6641b111eb7069344e4f99a01d6e0a6" - end - - resource "RealSurface" do - url "https://cern.ch/geant4-data/datasets/G4RealSurface.2.1.1.tar.gz" - sha256 "90481ff97a7c3fa792b7a2a21c9ed80a40e6be386e581a39950c844b2dd06f50" - end - - def install - mkdir "geant-build" do - args = std_cmake_args + %w[ - ../ - -DGEANT4_USE_GDML=ON - -DGEANT4_BUILD_MULTITHREADED=ON - -DGEANT4_USE_QT=ON - ] - - system "cmake", *args - system "make", "install" - end - - resources.each do |r| - (share/"Geant4-#{version}/data/#{r.name}#{r.version}").install r - end - end - - def caveats - <<~EOS - Because Geant4 expects a set of environment variables for - datafiles, you should source: - . #{HOMEBREW_PREFIX}/bin/geant4.sh (or .csh) - before running an application built with Geant4. - EOS - end - - test do - system "cmake", share/"Geant4-#{version}/examples/basic/B1" - system "make" - (testpath/"test.sh").write <<~EOS - . #{bin}/geant4.sh - ./exampleB1 run2.mac - EOS - assert_match "Number of events processed : 1000", - shell_output("/bin/bash test.sh") - end -end diff --git a/Formula/gearman.rb b/Formula/gearman.rb deleted file mode 100644 index 00299b3955793..0000000000000 --- a/Formula/gearman.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Gearman < Formula - desc "Application framework to farm out work to other machines or processes" - homepage "http://gearman.org/" - url "https://github.com/gearman/gearmand/releases/download/1.1.19.1/gearmand-1.1.19.1.tar.gz" - sha256 "8ea6e0d16a0c924e6a65caea8a7cd49d3840b9256d440d991de4266447166bfb" - - bottle do - cellar :any - sha256 "3a1a4bc57288dea7905134d9290c88a04273f7cc6361646694324e3bc9eb42d3" => :catalina - sha256 "582d1de464569352536501e2aa832a9bc540220eae335b682411ecadffbfe198" => :mojave - sha256 "8664f5b9c91ef99190cb70000758aa3d50f68afcad01d2e8cac234adf6a5424c" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - depends_on "boost" - depends_on "libevent" - depends_on "libmemcached" - - def install - # Work around "error: no member named 'signbit' in the global namespace" - # encountered when trying to detect boost regex in configure - if MacOS.version == :high_sierra - ENV.delete("HOMEBREW_SDKROOT") - ENV.delete("SDKROOT") - end - - # https://bugs.launchpad.net/gearmand/+bug/1368926 - Dir["tests/**/*.cc", "libtest/main.cc"].each do |test_file| - next unless /std::unique_ptr/.match?(File.read(test_file)) - - inreplace test_file, "std::unique_ptr", "std::auto_ptr" - end - - args = %W[ - --prefix=#{prefix} - --localstatedir=#{var} - --disable-silent-rules - --disable-dependency-tracking - --disable-cyassl - --disable-hiredis - --disable-libdrizzle - --disable-libpq - --disable-libtokyocabinet - --disable-ssl - --enable-libmemcached - --with-boost=#{Formula["boost"].opt_prefix} - --with-memcached=#{Formula["memcached"].opt_bin}/memcached - --with-sqlite3 - --without-mysql - --without-postgresql - ] - - ENV.append_to_cflags "-DHAVE_HTONLL" - - (var/"log").mkpath - system "./configure", *args - system "make", "install" - end - - plist_options :manual => "gearmand -d" - - def plist - <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_sbin}/gearmand - RunAtLoad - - - - EOS - end - - test do - assert_match /gearman\s*Error in usage/, shell_output("#{bin}/gearman --version 2>&1", 1) - end -end diff --git a/Formula/geckodriver.rb b/Formula/geckodriver.rb deleted file mode 100644 index 03b01cc149a6e..0000000000000 --- a/Formula/geckodriver.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Geckodriver < Formula - desc "WebDriver <-> Marionette proxy" - homepage "https://github.com/mozilla/geckodriver" - head "https://hg.mozilla.org/mozilla-central/", :using => :hg - - stable do - # Get the hg_revision for stable releases from https://github.com/mozilla/geckodriver/releases - hg_revision = "e9783a644016aa9b317887076618425586730d73" - url "https://hg.mozilla.org/mozilla-central/archive/#{hg_revision}.zip/testing/geckodriver/" - version "0.26.0" - sha256 "c5854000621938de2aac0bdc853da62539e694adcba98b61851adcbb9ce54dd3" - - resource "webdriver" do - url "https://hg.mozilla.org/mozilla-central/archive/#{hg_revision}.zip/testing/webdriver/" - sha256 "d84d6b84d4b37bb4fadda639026eca63dc61dd289bbeb3961eef1257be49266b" - end - - resource "mozbase" do - url "https://hg.mozilla.org/mozilla-central/archive/#{hg_revision}.zip/testing/mozbase/rust/" - sha256 "a838ae82753aaed38eff52bd2076e47a418858be39c7dc5d833070c6ee2f7beb" - end - - resource "Cargo.lock" do - url "https://hg.mozilla.org/mozilla-central/raw-file/#{hg_revision}/Cargo.lock" - sha256 "107aaf145d4840a389c2d4586660e95e3fa336a42bb9f94524f9a72c89c21d09" - end - end - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "2b9a2eb29b8199df3f0c8e3a4395337fcdd1ae00cea28970df0add10a36b94ce" => :catalina - sha256 "13dd973454d187da00ccd4ab24f72987ea47f4984caa2e1fa5b3c36273d96bfa" => :mojave - sha256 "2e57ba33554f7b0180873d49dc8dc1b1587e9c8d637d8f50146395dcb923afea" => :high_sierra - end - - depends_on "rust" => :build - - uses_from_macos "unzip" - - def install - unless build.head? - # we need to do this, because all archives are containing a top level testing directory - %w[webdriver mozbase].each do |r| - (buildpath/"staging").install resource(r) - mv buildpath/"staging"/"testing"/r, buildpath/"testing" - rm_rf buildpath/"staging"/"testing" - end - rm_rf buildpath/"staging" - (buildpath/"testing"/"geckodriver").install resource("Cargo.lock") - end - - cd "testing/geckodriver" do - system "cargo", "install", *std_cargo_args - end - bin.install_symlink bin/"geckodriver" => "wires" - end - - test do - system bin/"geckodriver", "--help" - end -end diff --git a/Formula/gecode.rb b/Formula/gecode.rb deleted file mode 100644 index 52079d3ae2a46..0000000000000 --- a/Formula/gecode.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Gecode < Formula - desc "Toolkit for developing constraint-based systems and applications" - homepage "https://www.gecode.org/" - url "https://github.com/Gecode/gecode/archive/release-6.2.0.tar.gz" - sha256 "27d91721a690db1e96fa9bb97cec0d73a937e9dc8062c3327f8a4ccb08e951fd" - - bottle do - cellar :any - sha256 "de386e8ea3dcdbce6d35fe62e0f38f0bf51c6844db35eb7a2f81aa5501fa9c0d" => :catalina - sha256 "525b7649d716a0ccb5f47f29e93a07f1677cbe531c9c978656b04826ad1cb678" => :mojave - sha256 "763d0d5da64075f5f64c3b7aee49a604680c266b1b6e4eeb8ffcfdb9e0d9ca0d" => :high_sierra - sha256 "1bb46e60636f1431cc5bf4b9aed1a2f038da1fef0eaeb1c3130a9252924efd54" => :sierra - end - - def install - args = %W[ - --prefix=#{prefix} - --disable-examples - --disable-qt - ] - ENV.cxx11 - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - using namespace Gecode; - class Test : public Script { - public: - IntVarArray v; - Test(const Options& o) : Script(o) { - v = IntVarArray(*this, 10, 0, 10); - distinct(*this, v); - branch(*this, v, INT_VAR_NONE(), INT_VAL_MIN()); - } - Test(Test& s) : Script(s) { - v.update(*this, s.v); - } - virtual Space* copy() { - return new Test(*this); - } - virtual void print(std::ostream& os) const { - os << v << std::endl; - } - }; - int main(int argc, char* argv[]) { - Options opt("Test"); - opt.iterations(500); - opt.parse(argc, argv); - Script::run(opt); - return 0; - } - EOS - - args = %W[ - -std=c++11 - -I#{include} - -lgecodedriver - -lgecodesearch - -lgecodeint - -lgecodekernel - -lgecodesupport - -L#{lib} - -o test - ] - system ENV.cxx, "test.cpp", *args - assert_match "{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}", shell_output("./test") - end -end diff --git a/Formula/gedit.rb b/Formula/gedit.rb deleted file mode 100644 index be7bfd183b510..0000000000000 --- a/Formula/gedit.rb +++ /dev/null @@ -1,138 +0,0 @@ -class Gedit < Formula - desc "The GNOME text editor" - homepage "https://wiki.gnome.org/Apps/Gedit" - url "https://download.gnome.org/sources/gedit/3.36/gedit-3.36.2.tar.xz" - sha256 "6887554643c5b1b3862ac364d97b7b50224bff95e6758aeaa08f4a482b554197" - license "GPL-2.0" - revision 1 - - bottle do - sha256 "938865fa21884073086f325085bc9d46be2a606728f075d94ff7f6993b15a6e0" => :catalina - sha256 "a0ada6ab87a9a50d30dcfeb515e4db89779046a3cb3d8ece7d32b8b91eaf00bb" => :mojave - sha256 "d54a458e64a592c90c550598ad6f064e069fe7e230b9a810699cb2f9dcc9755e" => :high_sierra - end - - depends_on "itstool" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "adwaita-icon-theme" - depends_on "atk" - depends_on "cairo" - depends_on "gdk-pixbuf" - depends_on "gettext" - depends_on "glib" - depends_on "gobject-introspection" - depends_on "gsettings-desktop-schemas" - depends_on "gspell" - depends_on "gtk+3" - depends_on "gtksourceview4" - depends_on "libpeas" - depends_on "libsoup" - depends_on "libxml2" - depends_on "pango" - depends_on "tepl" - - def install - ENV["DESTDIR"] = "/" - - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - 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", "-qtf", "#{HOMEBREW_PREFIX}/share/icons/hicolor" - end - - test do - # main executable test - system bin/"gedit", "--version" - # API test - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - gchar *text = gedit_utils_make_valid_utf8("test text"); - 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"] - gobject_introspection = Formula["gobject-introspection"] - gtkx3 = Formula["gtk+3"] - gtksourceview4 = Formula["gtksourceview4"] - harfbuzz = Formula["harfbuzz"] - libepoxy = Formula["libepoxy"] - libffi = Formula["libffi"] - libpeas = Formula["libpeas"] - 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#{gobject_introspection.opt_include}/gobject-introspection-1.0 - -I#{gtksourceview4.opt_include}/gtksourceview-4 - -I#{gtkx3.opt_include}/gtk-3.0 - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gedit-3.36 - -I#{libepoxy.opt_include} - -I#{libffi.opt_lib}/libffi-3.0.13/include - -I#{libpeas.opt_include}/libpeas-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#{gdk_pixbuf.opt_lib} - -L#{lib}/gedit - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{gobject_introspection.opt_lib} - -L#{gtksourceview4.opt_lib} - -L#{gtkx3.opt_lib} - -L#{libpeas.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lcairo - -lcairo-gobject - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgedit-3.36 - -lgio-2.0 - -lgirepository-1.0 - -lglib-2.0 - -lgmodule-2.0 - -lgobject-2.0 - -lgtk-3 - -lgtksourceview-4.0 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - -lpeas-1.0 - -lpeas-gtk-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/geeqie.rb b/Formula/geeqie.rb deleted file mode 100644 index 545894663e8fe..0000000000000 --- a/Formula/geeqie.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Geeqie < Formula - desc "Lightweight Gtk+ based image viewer" - homepage "http://www.geeqie.org/" - url "http://www.geeqie.org/geeqie-1.5.1.tar.xz" - sha256 "4854d5d323c31f8f4068fd73ab2c454ff91e826c4ca4d37b22c246ad14dea10a" - license "GPL-2.0" - revision 1 - - bottle do - sha256 "5d344202876e8d095f69c10241a7018a97d4033f1e6c5fabc8db0f8152dc4d1c" => :catalina - sha256 "80074bcd449427974fafe01f1292d3d77111bb380eac0b94f91797a4802a2108" => :mojave - sha256 "bb5923d1d1a922ea077796653061d98b571bb96a89bb16d555ed5bf91770e79c" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "atk" - depends_on "cairo" - depends_on "exiv2" - depends_on "gdk-pixbuf" - depends_on "gettext" - depends_on "glib" - depends_on "gtk+3" - depends_on "imagemagick" - depends_on "jpeg" - depends_on "libtiff" - depends_on "little-cms2" - depends_on "pango" - - def install - ENV["NOCONFIGURE"] = "yes" - system "./autogen.sh" # Seems to struggle to find GTK headers without this - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-glibtest", - "--disable-gtktest", - "--enable-gtk3" - system "make", "install" - end - - test do - system "#{bin}/geeqie", "--version" - end -end diff --git a/Formula/gegl.rb b/Formula/gegl.rb deleted file mode 100644 index 9449b7b905603..0000000000000 --- a/Formula/gegl.rb +++ /dev/null @@ -1,81 +0,0 @@ -class Gegl < Formula - desc "Graph based image processing framework" - homepage "http://www.gegl.org/" - url "https://download.gimp.org/pub/gegl/0.4/gegl-0.4.24.tar.xz" - sha256 "7765499f27341b0d16032e665319cbc12876483ff6a944fcdf24a9c58e3e254a" - license "LGPL-3.0" - - bottle do - sha256 "2067ee4af3b1ddc40a49765e5612bcd23f0724ce2702db200f2ed7fc28792df5" => :catalina - sha256 "8163a17103afaaaadfaee1e509847278929365b4a8aac049f5912536e6b8b169" => :mojave - sha256 "35b5da2793a47b04b659a152e33dd520d28dfd42e9267288c28a0898d4098a3b" => :high_sierra - end - - head do - # Use the Github mirror because official git unreliable. - url "https://github.com/GNOME/gegl.git" - end - - depends_on "glib" => :build - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "babl" - depends_on "gettext" - depends_on "glib" - depends_on "jpeg" - depends_on "json-glib" - depends_on "libpng" - - on_linux do - depends_on "cairo" - end - - conflicts_with "coreutils", :because => "both install `gcut` binaries" - - def install - args = std_meson_args + %w[ - -Dwith-docs=false - -Dwith-cairo=false - -Dwith-jasper=false - -Dwith-umfpack=false - -Dwith-libspiro=false - ] - - ### Temporary Fix ### - # Temporary fix for a meson bug - # Upstream appears to still be deciding on a permanent fix - # See: https://gitlab.gnome.org/GNOME/gegl/-/issues/214 - inreplace "subprojects/poly2tri-c/meson.build", - "libpoly2tri_c = static_library('poly2tri-c',", - "libpoly2tri_c = static_library('poly2tri-c', 'EMPTYFILE.c'," - touch "subprojects/poly2tri-c/EMPTYFILE.c" - ### END Temporary Fix ### - - mkdir "build" do - system "meson", *args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - gint main(gint argc, gchar **argv) { - gegl_init(&argc, &argv); - GeglNode *gegl = gegl_node_new (); - gegl_exit(); - return 0; - } - EOS - system ENV.cc, "-I#{include}/gegl-0.4", "-L#{lib}", "-lgegl-0.4", - "-I#{Formula["babl"].opt_include}/babl-0.1", - "-I#{Formula["glib"].opt_include}/glib-2.0", - "-I#{Formula["glib"].opt_lib}/glib-2.0/include", - "-L#{Formula["glib"].opt_lib}", "-lgobject-2.0", "-lglib-2.0", - testpath/"test.c", "-o", testpath/"test" - system "./test" - end -end diff --git a/Formula/gel.rb b/Formula/gel.rb deleted file mode 100644 index 3c4f8f268ec62..0000000000000 --- a/Formula/gel.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Gel < Formula - desc "Modern gem manager" - homepage "https://gel.dev/" - url "https://github.com/gel-rb/gel/archive/v0.3.0.tar.gz" - sha256 "fe7c4bd67a2ea857b85b754f5b4d336e26640eda7199bc99b9a1570043362551" - license "MIT" - head "https://github.com/gel-rb/gel.git" - - bottle do - cellar :any_skip_relocation - sha256 "7452d45bb894918afcf8c4254910fcbcb29b126eb6376fc0ba77ec25ee79dab1" => :catalina - sha256 "7b08b9ca28185ab4ae1befb9f62d3d3a0d094f72629c0742b7135a521eac3381" => :mojave - sha256 "7b08b9ca28185ab4ae1befb9f62d3d3a0d094f72629c0742b7135a521eac3381" => :high_sierra - sha256 "a4a5e3f1b6eb3ea8511adbf12f9b22482c392616bdd37c801be2fd100a1b886f" => :sierra - end - - def install - ENV["PATH"] = "bin:#{ENV["HOME"]}/.local/gel/bin:#{ENV["PATH"]}" - system "gel", "install" - system "rake", "man" - bin.install "exe/gel" - prefix.install "lib" - man1.install Pathname.glob("man/man1/*.1") - end - - test do - (testpath/"Gemfile").write <<~EOS - source "https://rubygems.org/" - gem "gel" - EOS - system "#{bin}/gel", "install" - end -end diff --git a/Formula/gem-completion.rb b/Formula/gem-completion.rb deleted file mode 100644 index 5270b0845cb7a..0000000000000 --- a/Formula/gem-completion.rb +++ /dev/null @@ -1,20 +0,0 @@ -class GemCompletion < Formula - desc "Bash completion for gem" - homepage "https://github.com/mernen/completion-ruby" - url "https://github.com/mernen/completion-ruby.git", - :revision => "f3e4345042b0cc48317e45b673dfd3d23904b9a7" - version "2" - license "MIT" - head "https://github.com/mernen/completion-ruby.git" - - bottle :unneeded - - def install - bash_completion.install "completion-gem" => "gem" - end - - test do - assert_match "-F __gem", - shell_output("source #{bash_completion}/gem && complete -p gem") - end -end diff --git a/Formula/genact.rb b/Formula/genact.rb deleted file mode 100644 index 144f53c907b62..0000000000000 --- a/Formula/genact.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Genact < Formula - desc "Nonsense activity generator" - homepage "https://github.com/svenstaro/genact" - url "https://github.com/svenstaro/genact/archive/0.7.0.tar.gz" - sha256 "9bfb241d8d3e77dae63fa3f5c84ef67e459a03a8fc18ed4661e53765264288ce" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "38ba680b756939cbf698a3bb4e135613663e5d7778f15cf03c8cd2fb19abdad7" => :catalina - sha256 "da6e18f5cbe7a84c8ad3c4a3d079d7ca0deaded383d98ce72afed4f770a02aed" => :mojave - sha256 "2c962de62551fce95f18b2e46cc9b1140256daa10fcd5555d5cfc2e3999df340" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - assert_match /Available modules:/, shell_output("#{bin}/genact --list-modules") - end -end diff --git a/Formula/genders.rb b/Formula/genders.rb deleted file mode 100644 index a3269bbc89d2e..0000000000000 --- a/Formula/genders.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Genders < Formula - desc "Static cluster configuration database for cluster management" - homepage "https://github.com/chaos/genders" - url "https://github.com/chaos/genders/archive/genders-1-27-3.tar.gz" - version "1.27.3" - sha256 "c176045a7dd125313d44abcb7968ded61826028fe906028a2967442426229894" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "e1bbeeb4bc32d8655ea35718825175dc1293a1cebd059437cf2fcc9001d159e2" => :catalina - sha256 "353ba0eda08b2c75c72e72c2782fb72becb095b2a2875406651c48837dde4223" => :mojave - sha256 "31a726904f22c156b763a8bc95bd3db6e85b8bc0cf7d8a82d584bb8684241f6c" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}", "--with-java-extensions=no" - system "make", "install" - end - - test do - (testpath/"cluster").write <<~EOS - # slc cluster genders file - slci,slcj,slc[0-15] eth2=e%n,cluster=slc,all - slci passwdhost - slci,slcj management - slc[1-15] compute - EOS - assert_match "0 parse errors discovered", shell_output("#{bin}/nodeattr -f cluster -k 2>&1") - end -end diff --git a/Formula/generate-json-schema.rb b/Formula/generate-json-schema.rb deleted file mode 100644 index 98943a1651bdf..0000000000000 --- a/Formula/generate-json-schema.rb +++ /dev/null @@ -1,47 +0,0 @@ -require "language/node" - -class GenerateJsonSchema < Formula - desc "Generate a JSON Schema from Sample JSON" - homepage "https://github.com/Nijikokun/generate-schema" - url "https://registry.npmjs.org/generate-schema/-/generate-schema-2.6.0.tgz" - sha256 "1ddbf91aab2d649108308d1de7af782d9270a086919edb706f48d0216d51374a" - license "MIT" - head "https://github.com/Nijikokun/generate-schema.git" - - bottle do - cellar :any_skip_relocation - sha256 "4d5a50f712bb6714564574d20cbd771e62ad1da6dcd58d9b7225822af0821d73" => :catalina - sha256 "e049d098796be43aa340eca884fa71ec90f4fbeda02031142f66752df005de97" => :mojave - sha256 "3461301c038b8bb6e15b8e183661976e95ea7b7e0659d57f0f21ea2c0eb4e67c" => :high_sierra - sha256 "a6ff075810774d44030a59a12032d302c64834d03c7aabeb32efb8dc86d276de" => :sierra - sha256 "5a5b34d8e233d9b75648c39f8edada5077c8f6c6466bd3358f3f661062ccbe83" => :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/"test.json").write <<~EOS - { - "id": 2, - "name": "An ice sculpture", - "price": 12.50, - "tags": ["cold", "ice"], - "dimensions": { - "length": 7.0, - "width": 12.0, - "height": 9.5 - }, - "warehouseLocation": { - "latitude": -78.75, - "longitude": 20.4 - } - } - EOS - assert_match "schema.org", shell_output("#{bin}/generate-schema test.json", 1) - end -end diff --git a/Formula/genext2fs.rb b/Formula/genext2fs.rb deleted file mode 100644 index bb6f9d6c0806f..0000000000000 --- a/Formula/genext2fs.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Genext2fs < Formula - desc "Generates an ext2 filesystem as a normal (non-root) user" - homepage "https://genext2fs.sourceforge.io/" - url "https://downloads.sourceforge.net/project/genext2fs/genext2fs/1.4.1/genext2fs-1.4.1.tar.gz" - sha256 "404dbbfa7a86a6c3de8225c8da254d026b17fd288e05cec4df2cc7e1f4feecfc" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "65c723cefe5f0e2e70b2e23e217e9dc0c6ba0b8759ef6d50405356a34319875b" => :catalina - sha256 "9a22f21cd781def8a9c4f89eee4158c1ad525766f2bb2d54aa1d00362c399706" => :mojave - sha256 "b74a72de535c529c5c5aa9ac3b77618e6f95f8114ded59e7e84124a829b6bb16" => :high_sierra - sha256 "82ac8092d73d2f81fd0770b15bad060f4f3b010c089a0cda5131f9bcec3318ea" => :sierra - sha256 "3842e46ce4c24b75364337fbe4a10243cd01a8aaf4b51feca6631c7cf0649aa6" => :el_capitan - sha256 "acdca2f9efcacafc7f105a43837a2f36e42dca1fd1325d62f9e5327797c69164" => :yosemite - sha256 "f8f37e86e32de96736daac7b2b24594647e28d2b1610ccd68237d028d9b4dd43" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/genext2fs", "--root", testpath, - "--size-in-blocks", "20", - "#{testpath}/test.img" - end -end diff --git a/Formula/gengetopt.rb b/Formula/gengetopt.rb deleted file mode 100644 index 2e10b1b450203..0000000000000 --- a/Formula/gengetopt.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Gengetopt < Formula - desc "Generate C code to parse command-line arguments via getopt_long" - homepage "https://www.gnu.org/software/gengetopt/" - url "https://ftp.gnu.org/gnu/gengetopt/gengetopt-2.23.tar.xz" - mirror "https://ftpmirror.gnu.org/gengetopt/gengetopt-2.23.tar.xz" - sha256 "b941aec9011864978dd7fdeb052b1943535824169d2aa2b0e7eae9ab807584ac" - - bottle do - cellar :any_skip_relocation - sha256 "7134042a80bb314db08216b1de2d293b5925ab729ba87649fdab4dc6298256f4" => :catalina - sha256 "2ae5eeef439a6abc4d1f65965e1bafa9ac5ad0620cb4ef5e9444a4b2dbef1872" => :mojave - sha256 "00f2578e7697c01d060a422e1be0ce8f4c6d23b365967ff7b5501d5cd6306dd1" => :high_sierra - sha256 "57acd0ca20988a1b4f0f16383edb985549597b8a5266316e3a314b7775bab3c0" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - - ENV.deparallelize - system "make", "install" - end - - test do - ggo = <<~EOS - package "homebrew" - version "0.9.5" - purpose "The missing package manager for macOS" - - option "verbose" v "be verbose" - EOS - - pipe_output("#{bin}/gengetopt --file-name=test", ggo, 0) - assert_predicate testpath/"test.h", :exist? - assert_predicate testpath/"test.c", :exist? - assert_match(/verbose_given/, File.read("test.h")) - end -end diff --git a/Formula/genometools.rb b/Formula/genometools.rb deleted file mode 100644 index fb1a3da434cee..0000000000000 --- a/Formula/genometools.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Genometools < Formula - desc "GenomeTools: The versatile open source genome analysis software" - homepage "http://genometools.org/" - # genometools does not have source code on par with their binary dist on their website - url "https://github.com/genometools/genometools/archive/v1.6.1.tar.gz" - sha256 "528ca143a7f1d42af8614d60ea1e5518012913a23526d82e434f0dad2e2d863f" - revision 1 - head "https://github.com/genometools/genometools.git" - - bottle do - cellar :any - sha256 "2c49e8ae31d2e3d26e90c174bb4fb1e8e007f36bd9b9508220ff321ca3520d05" => :catalina - sha256 "c6509a3719aaa5e946f2e395c1ddcbe73c36ca8e1e965edb76136b00a3565c71" => :mojave - sha256 "89448e5e80e60f6d62ad7cc30892ae6d67fbc7af83e8ee7ce71e232884fe6721" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "pango" - depends_on "python@3.8" - - conflicts_with "libslax", :because => "both install `bin/gt`" - - def install - system "make", "prefix=#{prefix}" - system "make", "install", "prefix=#{prefix}" - - cd "gtpython" do - # Use the shared library from this specific version of genometools. - inreplace "gt/dlload.py", - "gtlib = CDLL(\"libgenometools\" + soext)", - "gtlib = CDLL(\"#{lib}/libgenometools\" + soext)" - - system "python3", *Language::Python.setup_install_args(prefix) - system "python3", "-m", "unittest", "discover", "tests" - end - end - - test do - system "#{bin}/gt", "-test" - system Formula["python@3.8"].opt_bin/"python3", "-c", "import gt" - end -end diff --git a/Formula/genstats.rb b/Formula/genstats.rb deleted file mode 100644 index 0b16300d77131..0000000000000 --- a/Formula/genstats.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Genstats < Formula - desc "Generate statistics about stdin or textfiles" - homepage "https://www.vanheusden.com/genstats/" - url "https://www.vanheusden.com/genstats/genstats-1.2.tgz" - sha256 "f0fb9f29750cdaa85dba648709110c0bc80988dd6a98dd18a53169473aaa6ad3" - - bottle do - cellar :any_skip_relocation - sha256 "8201a8f52e58a092d639023f9232079d7f88f5f5d221947b15c867417537274b" => :catalina - sha256 "821568c68faf33aa9045ccdcc6975d0f24f4faef8fc747275c5d8f8320d9ad55" => :mojave - sha256 "7bea82f0ca1047f295bfd0f6ca348f0c07cd33b165bb5a9042c77f9cdc97907f" => :high_sierra - sha256 "051dbb7c4f653b615b606d1fce15df9336a086e38428fcfdb2aee9f0057d8990" => :sierra - sha256 "44502f7a2dfcb1355336db69267d6363d6e8b8767b47628b0d3099743513ed5f" => :el_capitan - sha256 "91737ec825ed346716fddcedc4e075b195f214dfb22586a33d46f7ec5ea3a17e" => :yosemite - sha256 "d46142a806e13029120bfb1a038805b07dc88b191aed1cd41340f5f868168f92" => :mavericks - end - - def install - # Tried to make this a patch. Applying the patch hunk would - # fail, even though I used "git diff | pbcopy". Tried messing - # with whitespace, # lines, etc. Ugh. - inreplace "br.cpp", /if \(_XOPEN_VERSION >= 600\)/, - "if (_XOPEN_VERSION >= 600) && !__APPLE__" - - system "make" - bin.install "genstats" - man.install "genstats.1" - end - - test do - output = shell_output("#{bin}/genstats -h", 1) - assert_match "folkert@vanheusden.com", output - end -end diff --git a/Formula/geocode-glib.rb b/Formula/geocode-glib.rb deleted file mode 100644 index 7a68555d3a53f..0000000000000 --- a/Formula/geocode-glib.rb +++ /dev/null @@ -1,63 +0,0 @@ -class GeocodeGlib < Formula - desc "GNOME library for gecoding and reverse geocoding" - homepage "https://developer.gnome.org/geocode-glib" - url "https://download.gnome.org/sources/geocode-glib/3.26/geocode-glib-3.26.2.tar.xz" - sha256 "01fe84cfa0be50c6e401147a2bc5e2f1574326e2293b55c69879be3e82030fd1" - - bottle do - cellar :any - sha256 "0e79392bb60a588eaa86cbf4e756cad668cbf6ac6fd86606827874415e3e89fb" => :catalina - sha256 "ba3f2db7d23a1985abbcf09871cb98991fbc65f1935711dd6a2bc4d90bddeb10" => :mojave - sha256 "0ab0e0ed8f43285b66a27ccb0309fa719887298a9bcc95c8178ee07c84441a09" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gtk+3" - depends_on "json-glib" - depends_on "libsoup" - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Denable-installed-tests=false", "-Denable-gtk-doc=false", ".." - system "ninja" - system "ninja", "install" - end - end - - def post_install - system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/gnome" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GeocodeLocation *loc = geocode_location_new(1.0, 1.0, 1.0); - 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}/geocode-glib-1.0 - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lgeocode-glib - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/geogram.rb b/Formula/geogram.rb deleted file mode 100644 index 81c212bf6da2d..0000000000000 --- a/Formula/geogram.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Geogram < Formula - desc "Programming library of geometric algorithms" - homepage "http://alice.loria.fr/software/geogram/doc/html/index.html" - url "https://gforge.inria.fr/frs/download.php/file/38314/geogram_1.7.5.tar.gz" - sha256 "203349ff6424bc1d75f0a534b0b4626fc08e594109b5eaa7e82ee712f59bd24d" - - bottle do - sha256 "16ffa419e614e6ef1c73e14eb6b358fc112d9e5bb35e4c1b92dcab8f89842882" => :catalina - sha256 "ff58b787e0fa5c0b0608528dc76a94d8c76caa73b00102700f14e9a91e78aebc" => :mojave - sha256 "c5d5de12f0d0e7f7eb53022e7f9dae5b09172e97040f4d10b494ed66a0c4fb60" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "glfw" - - resource "bunny" do - url "https://raw.githubusercontent.com/FreeCAD/Examples/be0b4f9/Point_cloud_ExampleFiles/PointCloud-Data_Stanford-Bunny.asc" - sha256 "4fc5496098f4f4aa106a280c24255075940656004c6ef34b3bf3c78989cbad08" - end - - def install - (buildpath/"CMakeOptions.txt").append_lines <<~EOS - set(CMAKE_INSTALL_PREFIX #{prefix}) - set(GEOGRAM_USE_SYSTEM_GLFW3 ON) - EOS - - system "./configure.sh" - cd "build/Darwin-clang-dynamic-Release" do - system "make", "install" - end - - (share/"cmake/Modules").install Dir[lib/"cmake/modules/*"] - end - - test do - resource("bunny").stage { testpath.install Dir["*"].first => "bunny.xyz" } - system "#{bin}/vorpalite", "profile=reconstruct", "bunny.xyz", "bunny.meshb" - assert_predicate testpath/"bunny.meshb", :exist?, "bunny.meshb should exist!" - end -end diff --git a/Formula/geographiclib.rb b/Formula/geographiclib.rb deleted file mode 100644 index 9cf1d24cf3a5b..0000000000000 --- a/Formula/geographiclib.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Geographiclib < Formula - desc "C++ geography library" - homepage "https://geographiclib.sourceforge.io/" - url "https://downloads.sourceforge.net/project/geographiclib/distrib/GeographicLib-1.50.1.tar.gz" - sha256 "d1765009e068b8cc5e76957e5d6be45ce6cff08c4aad8e5995e84a28354385f1" - license "MIT" - - bottle do - cellar :any - sha256 "02ab2c5d659b1a1a2feb99cdf37635a20abc6747aadb25c5849dcb2f41563274" => :catalina - sha256 "3ae437ffb71cebfb80137603de10c69c33ba9ea9ba820fb00a1c136b66c158dc" => :mojave - sha256 "aeaf0148b41ba77b5f91221f0058326e6ca6be3de569966fe2d593e1200b451a" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_path}", *std_cmake_args - system "make", "install" - end - end - - test do - system bin/"GeoConvert", "-p", "-3", "-m", "--input-string", "33.3 44.4" - end -end diff --git a/Formula/geoip.rb b/Formula/geoip.rb deleted file mode 100644 index 067d798cf216c..0000000000000 --- a/Formula/geoip.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Geoip < Formula - desc "This library is for the GeoIP Legacy format (dat)" - homepage "https://github.com/maxmind/geoip-api-c" - url "https://github.com/maxmind/geoip-api-c/releases/download/v1.6.12/GeoIP-1.6.12.tar.gz" - sha256 "1dfb748003c5e4b7fd56ba8c4cd786633d5d6f409547584f6910398389636f80" - head "https://github.com/maxmind/geoip-api-c.git" - - bottle do - cellar :any - rebuild 1 - sha256 "8cac6d2fe351dbae2398e8c18906b06cd01d4b5db20c6a886f0551eee358d785" => :catalina - sha256 "311704d07adf7fa502e60bd0e462ba26f6830838c09461f8bbac38ccb5da77f1" => :mojave - sha256 "17db912ce8ffcd831d775f22c1ea428faf55d7ecb4dd19cdba6ab3234874417c" => :high_sierra - sha256 "166b2195350b830ddcaea41a24dbdbcea48b9d42f96673088dd3d51b8d5774d7" => :sierra - end - - resource "database" do - url "https://src.fedoraproject.org/lookaside/pkgs/GeoIP/GeoIP.dat.gz/4bc1e8280fe2db0adc3fe48663b8926e/GeoIP.dat.gz" - sha256 "7fd7e4829aaaae2677a7975eeecd170134195e5b7e6fc7d30bf3caf34db41bcd" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--datadir=#{var}", - "--prefix=#{prefix}" - system "make", "check" - system "make", "install" - end - - def post_install - geoip_data = Pathname.new "#{var}/GeoIP" - geoip_data.mkpath - - # Since default data directory moved, copy existing DBs - legacy_data = Pathname.new "#{HOMEBREW_PREFIX}/share/GeoIP" - cp Dir["#{legacy_data}/*"], geoip_data if legacy_data.exist? - - full = Pathname.new "#{geoip_data}/GeoIP.dat" - ln_s "GeoLiteCountry.dat", full unless full.exist? || full.symlink? - full = Pathname.new "#{geoip_data}/GeoIPCity.dat" - ln_s "GeoLiteCity.dat", full unless full.exist? || full.symlink? - end - - test do - resource("database").stage do - output = shell_output("#{bin}/geoiplookup -f GeoIP.dat 8.8.8.8") - assert_match "GeoIP Country Edition: US, United States", output - end - end -end diff --git a/Formula/geoipupdate.rb b/Formula/geoipupdate.rb deleted file mode 100644 index bd156b3e190b3..0000000000000 --- a/Formula/geoipupdate.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Geoipupdate < Formula - desc "Automatic updates of GeoIP2 and GeoIP Legacy databases" - homepage "https://github.com/maxmind/geoipupdate" - url "https://github.com/maxmind/geoipupdate/archive/v4.3.0.tar.gz" - sha256 "0c6df6a563203e87e80c9998975c287cd4e3a5eb6c83b90dd5a0597298b098f0" - head "https://github.com/maxmind/geoipupdate.git" - - bottle do - sha256 "8e03cdb8795a6a0dbd1a35a12c50e2021fee969926f6498369b0b04ea097c942" => :catalina - sha256 "710a53cf245d180e66f8b4626ff22cb2587912a8e8cd17b9cb34b6d5ffcc3174" => :mojave - sha256 "99a8bc8e63c1c8949e52fdd0fe04a27e1c2d973f2d2e9959fda52795bb7d01ed" => :high_sierra - end - - depends_on "go" => :build - depends_on "pandoc" => :build - - uses_from_macos "curl" - uses_from_macos "zlib" - - def install - system "make", "CONFFILE=#{etc}/GeoIP.conf", "DATADIR=#{var}/GeoIP", "VERSION=#{version} (homebrew)" - - bin.install "build/geoipupdate" - etc.install "build/GeoIP.conf" - man1.install "build/geoipupdate.1" - man5.install "build/GeoIP.conf.5" - end - - def post_install - (var/"GeoIP").mkpath - end - - test do - system "#{bin}/geoipupdate", "-V" - end -end diff --git a/Formula/geomview.rb b/Formula/geomview.rb deleted file mode 100644 index 5b9da5c14ee22..0000000000000 --- a/Formula/geomview.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Geomview < Formula - desc "Interactive 3D viewing program" - homepage "http://www.geomview.org/" - url "https://deb.debian.org/debian/pool/main/g/geomview/geomview_1.9.5.orig.tar.gz" - mirror "https://downloads.sourceforge.net/project/geomview/geomview/1.9.5/geomview-1.9.5.tar.gz" - sha256 "67edb3005a22ed2bf06f0790303ee3f523011ba069c10db8aef263ac1a1b02c0" - revision 1 - - bottle do - sha256 "2a2d54a233f02bb8667cc5217fe110fc31e29eeeaca51f99bb7ac58237f9b0a9" => :catalina - sha256 "cd70e7bf1004fe4b28933971dc3e817822c2abdd17fd09eb728f26ac85506cb2" => :mojave - sha256 "d66bbca7b5fb25556f03f40264d338e5ce99efaeba4e227b14711632a7f97cf5" => :high_sierra - sha256 "34cc860cab36fad0c134035897063de637b55c1bd53aafbccd24847af6af3b34" => :sierra - sha256 "6857c1bc6d2640c074b53981b2f027eb527a7c103b0c7ab1cd16d868decd35f9" => :el_capitan - sha256 "edc57089dc5ba7f2e7ec43c66202f19c460c4a1970f9c60984c0f3fe6c481012" => :yosemite - end - - depends_on "openmotif" - depends_on :x11 - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - (bin/"hvectext").unlink - end - - test do - system "#{bin}/geomview", "--version" - end -end diff --git a/Formula/geos.rb b/Formula/geos.rb deleted file mode 100644 index 09651ab86baa1..0000000000000 --- a/Formula/geos.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Geos < Formula - desc "Geometry Engine" - homepage "https://trac.osgeo.org/geos" - url "https://download.osgeo.org/geos/geos-3.8.1.tar.bz2" - sha256 "4258af4308deb9dbb5047379026b4cd9838513627cb943a44e16c40e42ae17f7" - revision 1 - - bottle do - cellar :any - sha256 "96668ef5d3512c74d8b9c029d36d52171e1d26e90935f4a108f51101c34df313" => :catalina - sha256 "32ad6e55282b63e933ca43309989943da06bd34eb151b8ca2f81ca70eb4ef146" => :mojave - sha256 "f17377d259393a9c0a7dd2ce41b7af6a09c2f4c137afe267ed7650adccc86c3f" => :high_sierra - end - - depends_on "swig" => :build - depends_on "python@3.8" - - def install - # https://trac.osgeo.org/geos/ticket/771 - inreplace "configure" do |s| - s.gsub! /PYTHON_CPPFLAGS=.*/, %Q(PYTHON_CPPFLAGS="#{`python3-config --includes`.strip}") - s.gsub! /PYTHON_LDFLAGS=.*/, 'PYTHON_LDFLAGS="-Wl,-undefined,dynamic_lookup"' - end - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-python", - "PYTHON=#{Formula["python@3.8"].opt_bin}/python3" - system "make", "install" - end - - test do - system "#{bin}/geos-config", "--libs" - end -end diff --git a/Formula/geoserver.rb b/Formula/geoserver.rb deleted file mode 100644 index 19dc78781ab35..0000000000000 --- a/Formula/geoserver.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Geoserver < Formula - desc "Java server to share and edit geospatial data" - homepage "http://geoserver.org/" - url "https://downloads.sourceforge.net/project/geoserver/GeoServer/2.17.1/geoserver-2.17.1-bin.zip" - sha256 "9ee69f896fb1e5f8b3d7adaff910ffccb70fcae803ccf974bc436bed8950704f" - - bottle :unneeded - - def install - libexec.install Dir["*"] - (bin/"geoserver").write <<~EOS - #!/bin/sh - if [ -z "$1" ]; then - echo "Usage: $ geoserver path/to/data/dir" - else - cd "#{libexec}" && java -DGEOSERVER_DATA_DIR=$1 -jar start.jar - fi - EOS - end - - def caveats - <<~EOS - To start geoserver: - geoserver path/to/data/dir - EOS - end - - test do - assert_match "geoserver path", shell_output("#{bin}/geoserver") - end -end diff --git a/Formula/geph2.rb b/Formula/geph2.rb deleted file mode 100644 index c5c76128fda6a..0000000000000 --- a/Formula/geph2.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Geph2 < Formula - desc "Modular Internet censorship circumvention system" - homepage "https://geph.io/" - url "https://github.com/geph-official/geph2/archive/v0.21.4.tar.gz" - sha256 "4a815ff800c492e2d7b7b5fa0dabeffc14d7c33307c0a00c4e533ec4ce85ff29" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "fe0f104deaa52d7ec13cf00a8154bb3e9cf9032441bda59c1b27a1c0bc310d76" => :catalina - sha256 "fe0f104deaa52d7ec13cf00a8154bb3e9cf9032441bda59c1b27a1c0bc310d76" => :mojave - sha256 "fe0f104deaa52d7ec13cf00a8154bb3e9cf9032441bda59c1b27a1c0bc310d76" => :high_sierra - end - - depends_on "go" => :build - - def install - bin_path = buildpath/"src/github.com/geph-official/geph2" - bin_path.install Dir["*"] - cd bin_path/"cmd/geph-client" do - ENV["CGO_ENABLED"] = "0" - system "go", "build", "-o", - bin/"geph-client", "-v", "-trimpath" - end - end - - test do - assert_match "-username", shell_output("#{bin}/geph-client -h 2>&1", 2) - end -end diff --git a/Formula/gerbil-scheme.rb b/Formula/gerbil-scheme.rb deleted file mode 100644 index dede375d53e3a..0000000000000 --- a/Formula/gerbil-scheme.rb +++ /dev/null @@ -1,40 +0,0 @@ -class GerbilScheme < Formula - desc "Opinionated dialect of Scheme designed for Systems Programming" - homepage "https://cons.io/" - url "https://github.com/vyzo/gerbil/archive/v0.16.tar.gz" - sha256 "1157d4ef60dab6a0f7c4986d5c938391973045093c470a03ffe02266c4d3e119" - - bottle do - sha256 "2e58cb74f57dd09a84bfed13aa1d44a1f1f8f5c057c59d2a27a338950c53ce82" => :catalina - sha256 "119570c624e9fb56e17df10263434eb0ba94ba3cdbcf5942c10cac9b26161318" => :mojave - sha256 "adb9592baedab1841b1a6603ff8cdc30694b01ecd5444d7c637a987f98356a44" => :high_sierra - end - - depends_on "gambit-scheme" - depends_on "leveldb" - depends_on "libyaml" - depends_on "lmdb" - depends_on "openssl@1.1" - - def install - cd "src" do - ENV.append_path "PATH", "#{Formula["gambit-scheme"].opt_prefix}/current/bin" - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version <= :sierra - system "./configure", "--prefix=#{prefix}", - "--with-gambit=#{Formula["gambit-scheme"].opt_prefix}/current", - "--enable-leveldb", - "--enable-libxml", - "--enable-libyaml", - "--enable-lmdb" - system "./build.sh" - system "./install" - - rm "#{bin}/.keep" - mv "#{share}/emacs/site-lisp/gerbil", "#{share}/emacs/site-lisp/gerbil-scheme" - end - end - - test do - assert_equal "0123456789", shell_output("gxi -e \"(for-each write '(0 1 2 3 4 5 6 7 8 9))\"") - end -end diff --git a/Formula/gerbv.rb b/Formula/gerbv.rb deleted file mode 100644 index 0aebe0f77aded..0000000000000 --- a/Formula/gerbv.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Gerbv < Formula - desc "Gerber (RS-274X) viewer" - homepage "http://gerbv.gpleda.org/" - # 2.6.1 is the latest official stable release but it is very buggy and incomplete - url "https://downloads.sourceforge.net/project/gerbv/gerbv/gerbv-2.7.0/gerbv-2.7.0.tar.gz" - sha256 "c5ee808c4230ce6be3ad10ab63c547098386d43022704de25ddb9378e62053b4" - license "GPL-2.0" - - bottle do - sha256 "eb27af6bcb6cfc6203297f617d88851e656c5b72fae84b10593429158d1861d6" => :catalina - sha256 "5995b2ff9b132c129e9e2ca08eb205c58883f63e22eec11c4c53e24ec6dfd4e3" => :mojave - sha256 "246a26e96d930c979db7bdb533807c71418ac0ad5c74bd12749d0c08b903e409" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - - def install - ENV.append "CPPFLAGS", "-DQUARTZ" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-update-desktop-database", - "--disable-schemas-compile" - system "make", "install" - end - - test do - # executable (GUI) test - system "#{bin}/gerbv", "--version" - # API test - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - double d = gerbv_get_tool_diameter(2); - 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+"] - harfbuzz = Formula["harfbuzz"] - 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}/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#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gerbv-2.7.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 - -lgerbv - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lgtk-quartz-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/gerrit-tools.rb b/Formula/gerrit-tools.rb deleted file mode 100644 index d0302f4e1a938..0000000000000 --- a/Formula/gerrit-tools.rb +++ /dev/null @@ -1,24 +0,0 @@ -class GerritTools < Formula - desc "Tools to ease Gerrit code review" - homepage "https://github.com/indirect/gerrit-tools" - url "https://github.com/indirect/gerrit-tools/archive/v1.0.0.tar.gz" - sha256 "c3a84af2ddb0f17b7a384e5dbc797329fb94d2499a75b6d8f4c8ed06a4a482dd" - head "https://github.com/indirect/gerrit-tools.git" - - bottle :unneeded - - def install - prefix.install "bin" - end - - test do - system "git", "init" - system "git", "remote", "add", "origin", "https://example.com/foo.git" - hook = (testpath/".git/hooks/commit-msg") - touch hook - hook.chmod 0744 - ENV["GERRIT"] = "example.com" - system "#{bin}/gerrit-setup" - assert_equal "github\norigin\n", shell_output("git remote") - end -end diff --git a/Formula/get-flash-videos.rb b/Formula/get-flash-videos.rb deleted file mode 100644 index 2118365f85f91..0000000000000 --- a/Formula/get-flash-videos.rb +++ /dev/null @@ -1,80 +0,0 @@ -class GetFlashVideos < Formula - desc "Download or play videos from various Flash-based websites" - homepage "https://github.com/monsieurvideo/get-flash-videos" - url "https://github.com/monsieurvideo/get-flash-videos/archive/1.25.99.03.tar.gz" - sha256 "37267b41c7b0c240d99ed1f5e7ba04d00f98a8daff82ac9edd2b12c3bca83d73" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "1a45571d40ed0c4e8b98142988156cdedafd82cfcb82108ee512cb59d34f6dcf" => :catalina - sha256 "ce0853c6ed07dfec3abce3ae4ca0cf073f5a8a38d530a227ffd966e7f1d946c4" => :mojave - sha256 "10e25788bbd00ffd0f0a5281c9c4c493c2957947ba4690cf92460c98aa72dc1b" => :high_sierra - sha256 "6c6e60aff2308881f4ef896b5a5c2dd1b05db9146d224be024793f042534dc6d" => :sierra - sha256 "0b7edca9b6518af848a6cb5f84bb34014cd017391279398ea9d796dc89ea7a57" => :el_capitan - end - - depends_on "rtmpdump" - - resource "Crypt::Blowfish_PP" do - url "https://cpan.metacpan.org/authors/id/M/MA/MATTBM/Crypt-Blowfish_PP-1.12.tar.gz" - sha256 "714f1a3e94f658029d108ca15ed20f0842e73559ae5fc1faee86d4f2195fcf8c" - end - - resource "LWP::Protocol" do - url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.33.tar.gz" - sha256 "97417386f11f007ae129fe155b82fd8969473ce396a971a664c8ae6850c69b99" - end - - resource "Tie::IxHash" do - url "https://cpan.metacpan.org/authors/id/C/CH/CHORNY/Tie-IxHash-1.23.tar.gz" - sha256 "fabb0b8c97e67c9b34b6cc18ed66f6c5e01c55b257dcf007555e0b027d4caf56" - end - - resource "WWW::Mechanize" do - url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/WWW-Mechanize-1.88.tar.gz" - sha256 "36d97e778ab911ab5a762d551541686cbf3463c571f474322f7b5da77f50a879" - end - - resource "Term::ProgressBar" do - url "https://cpan.metacpan.org/authors/id/M/MA/MANWAR/Term-ProgressBar-2.21.tar.gz" - sha256 "66994f1a6ca94d8d92e3efac406142fb0d05033360c0acce2599862db9c30e44" - end - - resource "Class::MethodMaker" do - url "https://cpan.metacpan.org/authors/id/S/SC/SCHWIGON/class-methodmaker/Class-MethodMaker-2.24.tar.gz" - sha256 "5eef58ccb27ebd01bcde5b14bcc553b5347a0699e5c3e921c7780c3526890328" - end - - resource "Crypt::Rijndael" do - url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Crypt-Rijndael-1.13.tar.gz" - sha256 "cd7209a6dfe0a3dc8caffe1aa2233b0e6effec7572d76a7a93feefffe636214e" - 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 - - ENV.prepend_create_path "PERL5LIB", lib/"perl5" - system "make" - (lib/"perl5").install "blib/lib/FlashVideo" - - bin.install "bin/get_flash_videos" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - chmod 0755, libexec/"bin/get_flash_videos" - - man1.install "blib/man1/get_flash_videos.1" - end - - test do - file = testpath/"BBC_-__Do_whatever_it_takes_to_get_him_to_talk.flv" - system bin/"get_flash_videos", "http://news.bbc.co.uk/2/hi/programmes/hardtalk/9560793.stm" - assert_predicate file, :exist?, "Failed to download #{file}!" - end -end diff --git a/Formula/get_iplayer.rb b/Formula/get_iplayer.rb deleted file mode 100644 index 615c062382d19..0000000000000 --- a/Formula/get_iplayer.rb +++ /dev/null @@ -1,70 +0,0 @@ -class GetIplayer < Formula - desc "Utility for downloading TV and radio programmes from BBC iPlayer" - homepage "https://github.com/get-iplayer/get_iplayer" - url "https://github.com/get-iplayer/get_iplayer/archive/v3.26.tar.gz" - sha256 "2ec105ccb47910d7f3ff7124ecaa839a8778837c12881358e627a132ba027b06" - license "GPL-3.0" - head "https://github.com/get-iplayer/get_iplayer.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "a3e2df4c8d889ff6230f0ef2bdace24455d15de97a0442b19139f7b8502dbf28" => :catalina - sha256 "574a33ef3208092d42fb8640da5ec55dd33b8114207f871329dfdd04813f77e1" => :mojave - sha256 "7cb313cecc47bd886b3fa782cc90d790ba75af34567b6bd29af84a218abcec40" => :high_sierra - end - - depends_on "atomicparsley" - depends_on "ffmpeg" - - uses_from_macos "libxml2" - uses_from_macos "perl" - - resource "IO::Socket::IP" do - url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/IO-Socket-IP-0.39.tar.gz" - sha256 "11950da7636cb786efd3bfb5891da4c820975276bce43175214391e5c32b7b96" - end - - resource "IO::Socket::SSL" do - url "https://cpan.metacpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-2.066.tar.gz" - sha256 "0d47064781a545304d5dcea5dfcee3acc2e95a32e1b4884d80505cde8ee6ebcd" - end - - resource "Mojolicious" do - url "https://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-7.94.tar.gz" - sha256 "171a1741f3ea57519657bfb1e40a5290149d7c7d69a1131464c7db23029e8f6e" - end - - resource "Mozilla::CA" do - url "https://cpan.metacpan.org/authors/id/A/AB/ABH/Mozilla-CA-20180117.tar.gz" - sha256 "f2cc9fbe119f756313f321e0d9f1fac0859f8f154ac9d75b1a264c1afdf4e406" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - ENV["NO_NETWORK_TESTING"] = "1" - - resources.each do |r| - r.stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - end - - inreplace ["get_iplayer", "get_iplayer.cgi"] do |s| - s.gsub!(/^(my \$version_text);/i, "\\1 = \"#{pkg_version}-homebrew\";") - s.gsub! "#!/usr/bin/env perl", "#!/usr/bin/perl" - end - - bin.install "get_iplayer", "get_iplayer.cgi" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - man1.install "get_iplayer.1" - end - - test do - output = shell_output("\"#{bin}/get_iplayer\" -f --refresh-include=\"BBC None\" -q dontshowanymatches 2>&1") - assert_match "get_iplayer #{pkg_version}-homebrew", output, "Unexpected version" - assert_match "INFO: 0 matching programmes", output, "Unexpected output" - assert_match "INFO: Indexing tv programmes (concurrent)", output, - "Mojolicious not found" - end -end diff --git a/Formula/getdns.rb b/Formula/getdns.rb deleted file mode 100644 index 973c83b2dc260..0000000000000 --- a/Formula/getdns.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Getdns < Formula - desc "Modern asynchronous DNS API" - homepage "https://getdnsapi.net/" - url "https://getdnsapi.net/releases/getdns-1-6-0/getdns-1.6.0.tar.gz" - sha256 "40e5737471a3902ba8304b0fd63aa7c95802f66ebbc6eae53c487c8e8a380f4a" - head "https://github.com/getdnsapi/getdns.git", :branch => "develop" - - bottle do - cellar :any - sha256 "e921bc22b5d49af0cf93a3daf035828b286cf28faf4e3916c863214c58cb100d" => :catalina - sha256 "dddc38b808f9901c02b56755838005ff9f04cb665f40d7145709838e8e38ef99" => :mojave - sha256 "431361fe29326a2c2b8ecb57b87f8a09c26fc21b5e3170c74bfe61b9ce6b1864" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libevent" - depends_on "libidn2" - depends_on "openssl@1.1" - depends_on "unbound" - - def install - system "cmake", ".", *std_cmake_args, - "-DBUILD_TESTING=OFF", - "-DPATH_TRUST_ANCHOR_FILE=#{etc}/getdns-root.key" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(int argc, char *argv[]) { - getdns_context *context; - getdns_dict *api_info; - char *pp; - getdns_return_t r = getdns_context_create(&context, 0); - if (r != GETDNS_RETURN_GOOD) { - return -1; - } - api_info = getdns_context_get_api_information(context); - if (!api_info) { - return -1; - } - pp = getdns_pretty_print_dict(api_info); - if (!pp) { - return -1; - } - puts(pp); - free(pp); - getdns_dict_destroy(api_info); - getdns_context_destroy(context); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-o", "test", "test.c", "-L#{lib}", "-lgetdns" - system "./test" - end -end diff --git a/Formula/getmail.rb b/Formula/getmail.rb deleted file mode 100644 index a4421d2dd6a88..0000000000000 --- a/Formula/getmail.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Getmail < Formula - desc "Extensible mail retrieval system with POP3, IMAP4, SSL support" - homepage "http://pyropus.ca/software/getmail/" - url "http://pyropus.ca/software/getmail/old-versions/getmail-5.14.tar.gz" - sha256 "f3a99fe74564237d12ca8d4582e113c067c9205b5ab640f72b4e8447606a99c1" - - bottle do - cellar :any_skip_relocation - sha256 "571bce56f171a3ea5274bdcb3aaac6bb18dc20323ccee9e513ca14d15f7b75f0" => :catalina - sha256 "bc414cc8a0f41c10adea2fe326d90567ed5fb143db7a4030db72c40c94f816d5" => :mojave - sha256 "bc414cc8a0f41c10adea2fe326d90567ed5fb143db7a4030db72c40c94f816d5" => :high_sierra - sha256 "d6a5a3c48f35d407c0a221da9c94e5ca8a92beac14c26aa13d4d355dfd64c923" => :sierra - end - - def install - libexec.install %w[getmail getmail_fetch getmail_maildir getmail_mbox] - inreplace Dir[libexec/"*"], %r{^#!/usr/bin/env python$}, "#!/usr/bin/python" - bin.install_symlink Dir["#{libexec}/*"] - libexec.install "getmailcore" - man1.install Dir["docs/*.1"] - end - - test do - system bin/"getmail", "--help" - end -end diff --git a/Formula/gettext.rb b/Formula/gettext.rb deleted file mode 100644 index ea18a7cf0fb21..0000000000000 --- a/Formula/gettext.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Gettext < Formula - desc "GNU internationalization (i18n) and localization (l10n) library" - homepage "https://www.gnu.org/software/gettext/" - url "https://ftp.gnu.org/gnu/gettext/gettext-0.20.2.tar.xz" - mirror "https://ftpmirror.gnu.org/gettext/gettext-0.20.2.tar.xz" - sha256 "b22b818e644c37f6e3d1643a1943c32c3a9bff726d601e53047d2682019ceaba" - revision 1 - - bottle do - sha256 "71f4ded03e8258b5e6896eebb00d26ed48307fbebece1a884b17ca3fb40e3121" => :catalina - sha256 "52067198cab528f05fdc0b06f7b9711f7614f60a7361f1e764c4f46d3342ff22" => :mojave - sha256 "4a999c75dcc53cbc711e3ac6545db69ab3aeca6c29c1cb6b21c353f237342457" => :high_sierra - end - - uses_from_macos "ncurses" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-debug", - "--prefix=#{prefix}", - "--with-included-gettext", - # Work around a gnulib issue with macOS Catalina - "gl_cv_func_ftello_works=yes", - "--with-included-glib", - "--with-included-libcroco", - "--with-included-libunistring", - "--with-emacs", - "--with-lispdir=#{elisp}", - "--disable-java", - "--disable-csharp", - # Don't use VCS systems to create these archives - "--without-git", - "--without-cvs", - "--without-xz" - system "make" - ENV.deparallelize # install doesn't support multiple make jobs - system "make", "install" - end - - test do - system bin/"gettext", "test" - end -end diff --git a/Formula/getxbook.rb b/Formula/getxbook.rb deleted file mode 100644 index a8640a9b05afe..0000000000000 --- a/Formula/getxbook.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Getxbook < Formula - desc "Tools to download ebooks from various sources" - homepage "https://njw.name/getxbook" - url "https://njw.name/getxbook/getxbook-1.2.tar.xz" - sha256 "7a4b1636ecb6dace814b818d9ff6a68167799b81ac6fc4dca1485efd48cf1c46" - revision 1 - - bottle do - cellar :any - sha256 "a99745b1db4509b84e84c0306bdf4439086670e608e7ff7e4d89e5318547391b" => :catalina - sha256 "68f7f76c607807315d1e8305830eaa94d04e1c87f1ea1382fb00bd7ec74f2886" => :mojave - sha256 "dce13d6e7d9f5f0eb79064858dca9dc3d62b274ba1f07b2ceaca3bf06e4effed" => :high_sierra - sha256 "d4b7500ecfbcf0b0d4ff905b01589a546aa53da5c1c465878305c8b6ee2c363c" => :sierra - end - - depends_on "openssl@1.1" - - def install - system "make", "CC=#{ENV.cc}", "PREFIX=#{prefix}" - bin.install "getgbook", "getabook", "getbnbook" - end - - test do - assert_match "getgbook #{version}", shell_output("#{bin}/getgbook", 1) - end -end diff --git a/Formula/gexiv2.rb b/Formula/gexiv2.rb deleted file mode 100644 index 9d51db1c72020..0000000000000 --- a/Formula/gexiv2.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Gexiv2 < Formula - desc "GObject wrapper around the Exiv2 photo metadata library" - homepage "https://wiki.gnome.org/Projects/gexiv2" - url "https://download.gnome.org/sources/gexiv2/0.12/gexiv2-0.12.1.tar.xz" - sha256 "8aeafd59653ea88f6b78cb03780ee9fd61a2f993070c5f0d0976bed93ac2bd77" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "1f8d42d1bb3e9ca58311b3a08b0576993007cb0d580e8740663e7ad4a055fb52" => :catalina - sha256 "7d97c40bab30a98f845560e0e6d12ea514ecceee3aab447f9a06664474d2ba10" => :mojave - sha256 "98515f671493f424a126e54ed940358f87a26d1bb049051735014b7c8a070900" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "vala" => :build - depends_on "exiv2" - depends_on "glib" - - def install - pyver = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - - mkdir "build" do - system "meson", *std_meson_args, "-Dpython3_girdir=#{lib}/python#{pyver}/site-packages/gi/overrides", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - GExiv2Metadata *metadata = gexiv2_metadata_new(); - return 0; - } - EOS - - flags = [ - "-I#{HOMEBREW_PREFIX}/include/glib-2.0", - "-I#{HOMEBREW_PREFIX}/lib/glib-2.0/include", - "-L#{lib}", - "-lgexiv2", - ] - - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gf-complete.rb b/Formula/gf-complete.rb deleted file mode 100644 index bf4fde9960530..0000000000000 --- a/Formula/gf-complete.rb +++ /dev/null @@ -1,32 +0,0 @@ -class GfComplete < Formula - desc "Comprehensive Library for Galois Field Arithmetic" - homepage "https://web.archive.org/web/20191024182742/jerasure.org/" - url "http://lab.jerasure.org/jerasure/gf-complete/repository/archive.tar.gz?ref=v2.0" - sha256 "0654202fe3b0d3f8a220158699bdea722e47e7f9cbc0fd52e4857aba6a069ea9" - - bottle do - cellar :any - sha256 "72161cd13399401cc443fb99bd9e50bcf1030155268b326b05d861812d1a84de" => :catalina - sha256 "6485d5f75f1d2ba75b3c1bac5a5d024cde64d7d96baf96c78eadc21199be4faf" => :mojave - sha256 "d4049ea995b6cb143af5383a101d15df811f88ab3d2d4c21428db967898e1927" => :high_sierra - sha256 "e6528a98b675a939a81a37ffd6f780c531a53dae8fc51eb8ec9277be1a363d37" => :sierra - sha256 "7a00f4c71d8f2173a4a21f1638010ee149d927dfb0f95a901036290f9b6529b5" => :el_capitan - sha256 "fd9172068e361c01e87a7a696e2ad6e7cee18f473cdd878a249e7df99e6cdf4a" => :yosemite - sha256 "9f82edf4ac3d0207b91075dbc7656ab21f6ab82b7df12053bdbcbf9886109cd3" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "./autogen.sh" - system "./configure", "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"gf_example_3" - end -end diff --git a/Formula/gflags.rb b/Formula/gflags.rb deleted file mode 100644 index 10a7b11835ec5..0000000000000 --- a/Formula/gflags.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Gflags < Formula - desc "Library for processing command-line flags" - homepage "https://gflags.github.io/gflags/" - url "https://github.com/gflags/gflags/archive/v2.2.2.tar.gz" - sha256 "34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf" - license "BSD-3-Clause" - - bottle do - cellar :any - rebuild 1 - sha256 "ebc7b6a9b5c14419f01a763f8b5d178525231d0fb4f5a4768673745a893f3b0b" => :catalina - sha256 "e3176e449321b1e2070a9fabc796e6820f2f0f1f4db1c3916f58e6cdd52e510e" => :mojave - sha256 "4beffa84f47bdfd9a1a90d9e591d9af4616db464d63046018ef0c58936d58366" => :high_sierra - sha256 "6f06466ca55f2174daecbc935e0bca1f2aed9bfb94a92f21d52fb4db1e07cd4a" => :sierra - end - - depends_on "cmake" => :build - - def install - mkdir "buildroot" do - system "cmake", "..", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON" - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include "gflags/gflags.h" - - DEFINE_bool(verbose, false, "Display program name before message"); - DEFINE_string(message, "Hello world!", "Message to print"); - - static bool IsNonEmptyMessage(const char *flagname, const std::string &value) - { - return value[0] != '\0'; - } - DEFINE_validator(message, &IsNonEmptyMessage); - - int main(int argc, char *argv[]) - { - gflags::SetUsageMessage("some usage message"); - gflags::SetVersionString("1.0.0"); - gflags::ParseCommandLineFlags(&argc, &argv, true); - if (FLAGS_verbose) std::cout << gflags::ProgramInvocationShortName() << ": "; - std::cout << FLAGS_message; - gflags::ShutDownCommandLineFlags(); - return 0; - } - EOS - system ENV.cxx, "-L#{lib}", "-lgflags", "test.cpp", "-o", "test" - assert_match "Hello world!", shell_output("./test") - assert_match "Foo bar!", shell_output("./test --message='Foo bar!'") - end -end diff --git a/Formula/gforth.rb b/Formula/gforth.rb deleted file mode 100644 index 0e938a4156a2c..0000000000000 --- a/Formula/gforth.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Gforth < Formula - desc "Implementation of the ANS Forth language" - homepage "https://www.gnu.org/software/gforth/" - url "https://www.complang.tuwien.ac.at/forth/gforth/gforth-0.7.3.tar.gz" - sha256 "2f62f2233bf022c23d01c920b1556aa13eab168e3236b13352ac5e9f18542bb0" - revision 2 - - bottle do - cellar :any - sha256 "e9063c35a2df4513ecb8c1aae8c02273c3da22487d90071db416c0b2b9bf1668" => :catalina - sha256 "25fd07e36c780229c02e3243b7aa71c3b3b2744e1626409f6321ad2d99c67471" => :mojave - sha256 "c5f42bd1b46307d521ccd626d7a5a4b030c48dd1788d4d580efb2d8aaa6d04bc" => :high_sierra - end - - depends_on "emacs" => :build - depends_on "libffi" - depends_on "libtool" - depends_on "pcre" - - def install - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version - cp Dir["#{Formula["libtool"].opt_share}/libtool/*/config.{guess,sub}"], buildpath - ENV.deparallelize - system "./configure", "--prefix=#{prefix}" - system "make", "EMACS=#{Formula["emacs"].opt_bin}/emacs" - elisp.mkpath - system "make", "install", "emacssitelispdir=#{elisp}" - - elisp.install "gforth.elc" - end - - test do - assert_equal "2 ", shell_output("#{bin}/gforth -e '1 1 + . bye'") - end -end diff --git a/Formula/gh.rb b/Formula/gh.rb deleted file mode 100644 index 7b56896143ab7..0000000000000 --- a/Formula/gh.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Gh < Formula - desc "GitHub command-line tool" - homepage "https://github.com/cli/cli" - url "https://github.com/cli/cli/archive/v0.10.1.tar.gz" - sha256 "5265f9594cca6c4c2f0d573c810f4ddb16e3baed0c18b18a353529506fc41297" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "210cce26348d4b91860f6fd9cf2037d6f316474bd318ecf58bc2923037c9b456" => :catalina - sha256 "1b56352a37dc5e336a93602cd0db37c58b8a8dfdec3e56d5bce8f4ff435f4ad4" => :mojave - sha256 "fcaab84b4e5a4e08d045348b42bd431412a169d6d117ed7af76f483970b2ebc2" => :high_sierra - end - - depends_on "go" => :build - - def install - ldflags = %W[ - -X github.com/cli/cli/command.Version=#{version} - -X github.com/cli/cli/command.BuildDate=#{Date.today} - -s -w - ] - system "make", "bin/gh", "manpages", "LDFLAGS=#{ldflags.join(" ")}" - bin.install "bin/gh" - man1.install Dir["share/man/man1/gh*.1"] - (bash_completion/"gh").write `#{bin}/gh completion -s bash` - (fish_completion/"gh.fish").write `#{bin}/gh completion -s fish` - (zsh_completion/"_gh").write `#{bin}/gh completion -s zsh` - end - - test do - assert_match "gh version #{version}", shell_output("#{bin}/gh --version") - assert_match "Work with GitHub issues", shell_output("#{bin}/gh issue 2>&1") - assert_match "Work with GitHub pull requests", shell_output("#{bin}/gh pr 2>&1") - end -end diff --git a/Formula/ghc.rb b/Formula/ghc.rb deleted file mode 100644 index 77de11e5622ab..0000000000000 --- a/Formula/ghc.rb +++ /dev/null @@ -1,128 +0,0 @@ -require "language/haskell" - -class Ghc < Formula - include Language::Haskell::Cabal - - desc "Glorious Glasgow Haskell Compilation System" - homepage "https://haskell.org/ghc/" - url "https://downloads.haskell.org/~ghc/8.10.1/ghc-8.10.1-src.tar.xz" - sha256 "4e3b07f83a266b3198310f19f71e371ebce97c769b14f0d688f4cbf2a2a1edf5" - - bottle do - sha256 "0771a43a5fd75ac8f3814367e0b99b27881b6730ced580eca109516aa250be4a" => :catalina - sha256 "12b0bfdf7570a348bda4ff916f3319a30c8cd82957725a78ba0ef25a1e42fdcc" => :mojave - sha256 "ab8ed6381773c90a5687843743b67e80ea7305cbebf056d0c1cceedb0ecc3490" => :high_sierra - end - - head do - url "https://gitlab.haskell.org/ghc/ghc.git", :branch => "ghc-8.10" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - resource "cabal" do - url "https://hackage.haskell.org/package/cabal-install-3.0.0.0/cabal-install-3.0.0.0.tar.gz" - sha256 "a432a7853afe96c0fd80f434bd80274601331d8c46b628cd19a0d8e96212aaf1" - end - end - - depends_on "python@3.8" => :build - depends_on "sphinx-doc" => :build - - resource "gmp" do - url "https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz" - mirror "https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz" - mirror "https://ftpmirror.gnu.org/gmp/gmp-6.1.2.tar.xz" - sha256 "87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912" - end - - # https://www.haskell.org/ghc/download_ghc_8_10_1.html#macosx_x86_64 - # "This is a distribution for Mac OS X, 10.7 or later." - # A binary of ghc is needed to bootstrap ghc - resource "binary" do - url "https://downloads.haskell.org/~ghc/8.10.1/ghc-8.10.1-x86_64-apple-darwin.tar.xz" - sha256 "65b1ca361093de4804a7e40b3e68178e1ef720f84f743641ec8d95e56a45b3a8" - end - - def install - # Work around Xcode 11 clang bug - # https://bitbucket.org/multicoreware/x265/issues/514/wrong-code-generated-on-macos-1015 - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - ENV["CC"] = ENV.cc - ENV["LD"] = "ld" - ENV["PYTHON"] = Formula["python@3.8"].opt_bin/"python3" - - # Build a static gmp rather than in-tree gmp, otherwise all ghc-compiled - # executables link to Homebrew's GMP. - gmp = libexec/"integer-gmp" - - # GMP *does not* use PIC by default without shared libs so --with-pic - # is mandatory or else you'll get "illegal text relocs" errors. - resource("gmp").stage do - system "./configure", "--prefix=#{gmp}", "--with-pic", "--disable-shared", - "--build=#{Hardware.oldest_cpu}-apple-darwin#{`uname -r`.to_i}" - system "make" - system "make", "install" - end - - args = ["--with-gmp-includes=#{gmp}/include", - "--with-gmp-libraries=#{gmp}/lib"] - - # As of Xcode 7.3 (and the corresponding CLT) `nm` is a symlink to `llvm-nm` - # and the old `nm` is renamed `nm-classic`. Building with the new `nm`, a - # segfault occurs with the following error: - # make[1]: * [compiler/stage2/dll-split.stamp] Segmentation fault: 11 - # Upstream is aware of the issue and is recommending the use of nm-classic - # until Apple restores POSIX compliance: - # https://ghc.haskell.org/trac/ghc/ticket/11744 - # https://ghc.haskell.org/trac/ghc/ticket/11823 - # https://mail.haskell.org/pipermail/ghc-devs/2016-April/011862.html - # LLVM itself has already fixed the bug: llvm-mirror/llvm@ae7cf585 - # rdar://25311883 and rdar://25299678 - if DevelopmentTools.clang_build_version >= 703 && DevelopmentTools.clang_build_version < 800 - args << "--with-nm=#{`xcrun --find nm-classic`.chomp}" - end - - resource("binary").stage do - binary = buildpath/"binary" - - system "./configure", "--prefix=#{binary}", *args - ENV.deparallelize { system "make", "install" } - - ENV.prepend_path "PATH", binary/"bin" - end - - if build.head? - resource("cabal").stage do - system "sh", "bootstrap.sh", "--sandbox" - (buildpath/"bootstrap-tools/bin").install ".cabal-sandbox/bin/cabal" - end - - ENV.prepend_path "PATH", buildpath/"bootstrap-tools/bin" - - cabal_sandbox do - cabal_install "--only-dependencies", "happy", "alex" - cabal_install "--prefix=#{buildpath}/bootstrap-tools", "happy", "alex" - end - - system "./boot" - end - - system "./configure", "--prefix=#{prefix}", *args - system "make" - - ENV.deparallelize { system "make", "install" } - Dir.glob(lib/"*/package.conf.d/package.cache") { |f| rm f } - end - - def post_install - system "#{bin}/ghc-pkg", "recache" - end - - test do - (testpath/"hello.hs").write('main = putStrLn "Hello Homebrew"') - assert_match "Hello Homebrew", shell_output("#{bin}/runghc hello.hs") - end -end diff --git a/Formula/ghc@8.6.rb b/Formula/ghc@8.6.rb deleted file mode 100644 index 04eb51dcc3750..0000000000000 --- a/Formula/ghc@8.6.rb +++ /dev/null @@ -1,139 +0,0 @@ -require "language/haskell" - -class GhcAT86 < Formula - include Language::Haskell::Cabal - - desc "Glorious Glasgow Haskell Compilation System" - homepage "https://haskell.org/ghc/" - url "https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-src.tar.xz" - sha256 "4d4aa1e96f4001b934ac6193ab09af5d6172f41f5a5d39d8e43393b9aafee361" - revision 1 - - bottle do - rebuild 1 - sha256 "3c2e2f8d8e4661dd7e53ad5af08489e926bec111e0d16a12397bb22a73b12997" => :catalina - sha256 "831a6537953f467724c4c3c45b16cc3e5ff944aa02f1e9b3b77e9bdbfcdfb9d2" => :mojave - sha256 "945069d9d94b4fb657e6d9c3a2d516ec551aea7535824b029c8c0632329f40cf" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "python@3.8" => :build - depends_on "sphinx-doc" => :build - - resource "gmp" do - url "https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz" - mirror "https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz" - mirror "https://ftpmirror.gnu.org/gmp/gmp-6.1.2.tar.xz" - sha256 "87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912" - end - - # https://www.haskell.org/ghc/download_ghc_8_6_5#macosx_x86_64 - # "This is a distribution for Mac OS X, 10.7 or later." - resource "binary" do - url "https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-apple-darwin.tar.xz" - sha256 "dfc1bdb1d303a87a8552aa17f5b080e61351f2823c2b99071ec23d0837422169" - end - - # Fix for Catalina compatibility https://gitlab.haskell.org/ghc/ghc/issues/17353 - patch :DATA - - def install - ENV["CC"] = ENV.cc - ENV["LD"] = "ld" - ENV["PYTHON"] = Formula["python@3.8"].opt_bin/"python3" - - # Build a static gmp rather than in-tree gmp, otherwise all ghc-compiled - # executables link to Homebrew's GMP. - gmp = libexec/"integer-gmp" - - # GMP *does not* use PIC by default without shared libs so --with-pic - # is mandatory or else you'll get "illegal text relocs" errors. - resource("gmp").stage do - system "./configure", "--prefix=#{gmp}", "--with-pic", "--disable-shared", - "--build=#{Hardware.oldest_cpu}-apple-darwin#{`uname -r`.to_i}" - system "make" - system "make", "install" - end - - args = ["--with-gmp-includes=#{gmp}/include", - "--with-gmp-libraries=#{gmp}/lib"] - - # As of Xcode 7.3 (and the corresponding CLT) `nm` is a symlink to `llvm-nm` - # and the old `nm` is renamed `nm-classic`. Building with the new `nm`, a - # segfault occurs with the following error: - # make[1]: * [compiler/stage2/dll-split.stamp] Segmentation fault: 11 - # Upstream is aware of the issue and is recommending the use of nm-classic - # until Apple restores POSIX compliance: - # https://ghc.haskell.org/trac/ghc/ticket/11744 - # https://ghc.haskell.org/trac/ghc/ticket/11823 - # https://mail.haskell.org/pipermail/ghc-devs/2016-April/011862.html - # LLVM itself has already fixed the bug: llvm-mirror/llvm@ae7cf585 - # rdar://25311883 and rdar://25299678 - if DevelopmentTools.clang_build_version >= 703 && DevelopmentTools.clang_build_version < 800 - args << "--with-nm=#{`xcrun --find nm-classic`.chomp}" - end - - resource("binary").stage do - binary = buildpath/"binary" - - system "./configure", "--prefix=#{binary}", *args - ENV.deparallelize { system "make", "install" } - - ENV.prepend_path "PATH", binary/"bin" - end - - if build.head? - resource("cabal").stage do - system "sh", "bootstrap.sh", "--sandbox" - (buildpath/"bootstrap-tools/bin").install ".cabal-sandbox/bin/cabal" - end - - ENV.prepend_path "PATH", buildpath/"bootstrap-tools/bin" - - cabal_sandbox do - cabal_install "--only-dependencies", "happy", "alex" - cabal_install "--prefix=#{buildpath}/bootstrap-tools", "happy", "alex" - end - - system "./boot" - end - - system "./configure", "--prefix=#{prefix}", *args - system "make" - - ENV.deparallelize { system "make", "install" } - Dir.glob(lib/"*/package.conf.d/package.cache") { |f| rm f } - end - - def post_install - system "#{bin}/ghc-pkg", "recache" - end - - test do - (testpath/"hello.hs").write('main = putStrLn "Hello Homebrew"') - assert_match "Hello Homebrew", shell_output("#{bin}/runghc hello.hs") - end -end -__END__ -diff -pur a/rts/Linker.c b/rts/Linker.c ---- a/rts/Linker.c 2019-08-25 21:03:36.000000000 +0900 -+++ b/rts/Linker.c 2019-11-05 11:09:06.000000000 +0900 -@@ -192,7 +192,7 @@ int ocTryLoad( ObjectCode* oc ); - * - * MAP_32BIT not available on OpenBSD/amd64 - */ --#if defined(x86_64_HOST_ARCH) && defined(MAP_32BIT) -+#if defined(x86_64_HOST_ARCH) && defined(MAP_32BIT) && !defined(__APPLE__) - #define TRY_MAP_32BIT MAP_32BIT - #else - #define TRY_MAP_32BIT 0 -@@ -214,7 +214,7 @@ int ocTryLoad( ObjectCode* oc ); - */ - #if !defined(ALWAYS_PIC) && defined(x86_64_HOST_ARCH) - --#if defined(MAP_32BIT) -+#if defined(MAP_32BIT) && !defined(__APPLE__) - // Try to use MAP_32BIT - #define MMAP_32BIT_BASE_DEFAULT 0 - #else diff --git a/Formula/ghc@8.8.rb b/Formula/ghc@8.8.rb deleted file mode 100644 index d0ad6ed1a362a..0000000000000 --- a/Formula/ghc@8.8.rb +++ /dev/null @@ -1,112 +0,0 @@ -require "language/haskell" - -class GhcAT88 < Formula - include Language::Haskell::Cabal - - desc "Glorious Glasgow Haskell Compilation System" - homepage "https://haskell.org/ghc/" - url "https://downloads.haskell.org/~ghc/8.8.3/ghc-8.8.3-src.tar.xz" - sha256 "e0dcc0aaf3e234c5978f29e6df62947e97720ab404ec0158343df211c5480f89" - - bottle do - sha256 "7968d8e75b49c4b4177aeec21bc09dc62dd039d973cfe5be6432ad54bd44ee38" => :catalina - sha256 "25ea38aa4d2e3089518f52af08083f7715843fdfda2637f92f478e3b4cc5540d" => :mojave - sha256 "de3fad18e3656100e3e57411281bedd903d1aae583b046c6b2916b2d29800acc" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "python@3.8" => :build - depends_on "sphinx-doc" => :build - - resource "gmp" do - url "https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz" - mirror "https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz" - mirror "https://ftpmirror.gnu.org/gmp/gmp-6.1.2.tar.xz" - sha256 "87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912" - end - - # https://www.haskell.org/ghc/download_ghc_8_8_3.html#macosx_x86_64 - # "This is a distribution for Mac OS X, 10.7 or later." - # A binary of ghc is needed to bootstrap ghc - resource "binary" do - url "https://downloads.haskell.org/~ghc/8.8.3/ghc-8.8.3-x86_64-apple-darwin.tar.xz" - sha256 "7016de90dd226b06fc79d0759c5d4c83c2ab01d8c678905442c28bd948dbb782" - end - - def install - ENV["CC"] = ENV.cc - ENV["LD"] = "ld" - - # Build a static gmp rather than in-tree gmp, otherwise all ghc-compiled - # executables link to Homebrew's GMP. - gmp = libexec/"integer-gmp" - - # GMP *does not* use PIC by default without shared libs so --with-pic - # is mandatory or else you'll get "illegal text relocs" errors. - resource("gmp").stage do - system "./configure", "--prefix=#{gmp}", "--with-pic", "--disable-shared", - "--build=#{Hardware.oldest_cpu}-apple-darwin#{`uname -r`.to_i}" - system "make" - system "make", "install" - end - - args = ["--with-gmp-includes=#{gmp}/include", - "--with-gmp-libraries=#{gmp}/lib"] - - # As of Xcode 7.3 (and the corresponding CLT) `nm` is a symlink to `llvm-nm` - # and the old `nm` is renamed `nm-classic`. Building with the new `nm`, a - # segfault occurs with the following error: - # make[1]: * [compiler/stage2/dll-split.stamp] Segmentation fault: 11 - # Upstream is aware of the issue and is recommending the use of nm-classic - # until Apple restores POSIX compliance: - # https://ghc.haskell.org/trac/ghc/ticket/11744 - # https://ghc.haskell.org/trac/ghc/ticket/11823 - # https://mail.haskell.org/pipermail/ghc-devs/2016-April/011862.html - # LLVM itself has already fixed the bug: llvm-mirror/llvm@ae7cf585 - # rdar://25311883 and rdar://25299678 - if DevelopmentTools.clang_build_version >= 703 && DevelopmentTools.clang_build_version < 800 - args << "--with-nm=#{`xcrun --find nm-classic`.chomp}" - end - - resource("binary").stage do - binary = buildpath/"binary" - - system "./configure", "--prefix=#{binary}", *args - ENV.deparallelize { system "make", "install" } - - ENV.prepend_path "PATH", binary/"bin" - end - - if build.head? - resource("cabal").stage do - system "sh", "bootstrap.sh", "--sandbox" - (buildpath/"bootstrap-tools/bin").install ".cabal-sandbox/bin/cabal" - end - - ENV.prepend_path "PATH", buildpath/"bootstrap-tools/bin" - - cabal_sandbox do - cabal_install "--only-dependencies", "happy", "alex" - cabal_install "--prefix=#{buildpath}/bootstrap-tools", "happy", "alex" - end - - system "./boot" - end - - system "./configure", "--prefix=#{prefix}", *args - system "make" - - ENV.deparallelize { system "make", "install" } - Dir.glob(lib/"*/package.conf.d/package.cache") { |f| rm f } - end - - def post_install - system "#{bin}/ghc-pkg", "recache" - end - - test do - (testpath/"hello.hs").write('main = putStrLn "Hello Homebrew"') - assert_match "Hello Homebrew", shell_output("#{bin}/runghc hello.hs") - end -end diff --git a/Formula/ghex.rb b/Formula/ghex.rb deleted file mode 100644 index 9116794e358b0..0000000000000 --- a/Formula/ghex.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Ghex < Formula - desc "GNOME hex editor" - homepage "https://wiki.gnome.org/Apps/Ghex" - url "https://download.gnome.org/sources/ghex/3.18/ghex-3.18.4.tar.xz" - sha256 "c2d9c191ff5bce836618779865bee4059db81a3a0dff38bda3cc7a9e729637c0" - revision 3 - - bottle do - sha256 "b152b5f03f5bc0d7a50a834fef582ea7fb477dd7560afb4a0b1f4df88e229970" => :catalina - sha256 "c2e68caac31470d6dbc66050b2dc42333b3dfc6956ee7453fba9032b5cf894a4" => :mojave - sha256 "4de4a0a7ee3f81c7f7b36d7368380b2ff2a063c5d444302cd5979ee33727fb1c" => :high_sierra - end - - depends_on "itstool" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gtk+3" - depends_on "hicolor-icon-theme" - - # submitted upstream as https://gitlab.gnome.org/GNOME/ghex/merge_requests/8 - patch :DATA - - def install - # ensure that we don't run the meson post install script - ENV["DESTDIR"] = "/" - - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - 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 - system "#{bin}/ghex", "--help" - end -end - -__END__ -diff --git a/src/meson.build b/src/meson.build -index fdcdcc2..ac45c93 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -23,9 +23,9 @@ libghex_c_args = [ - '-DG_LOG_DOMAIN="libgtkhex-3"' - ] - --libghex_link_args = [ -+libghex_link_args = cc.get_supported_link_arguments([ - '-Wl,--no-undefined' --] -+]) - - install_headers( - libghex_headers, -@@ -36,6 +36,7 @@ libghex = library( - 'gtkhex-@0@'.format(libghex_version_major), - libghex_sources + libghex_headers, - version: '0.0.0', -+ darwin_versions: ['1', '1.0'], - include_directories: ghex_root_dir, - dependencies: libghex_deps, - c_args: libghex_c_args, diff --git a/Formula/ghi.rb b/Formula/ghi.rb deleted file mode 100644 index 75a74c3e06592..0000000000000 --- a/Formula/ghi.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Ghi < Formula - desc "Work on GitHub issues on the command-line" - homepage "https://github.com/stephencelis/ghi" - url "https://github.com/stephencelis/ghi/archive/1.2.0.tar.gz" - sha256 "ffc17cfbdc8b88bf208f5f762e62c211bf8fc837f447354ad53cce39b1400671" - revision 4 - head "https://github.com/stephencelis/ghi.git" - - bottle do - cellar :any_skip_relocation - sha256 "36449d0c0fc0a544808178745ce7a846dfd905cf5fc2489feaa2a70d26346041" => :catalina - sha256 "b6dcd03ae7705b3a3648c6df15b9e451397cd81e41acc5c5f8444796c747c580" => :mojave - sha256 "9289e061f8a249130950ec212042e3d9adfaa96e3591f0eb2d6038c28ff0e6d6" => :high_sierra - sha256 "d2b59c4b0326bd4d4b2de6da0310e1d5228cc63d57adb9eb37c5f5c5a9471131" => :sierra - sha256 "d2b59c4b0326bd4d4b2de6da0310e1d5228cc63d57adb9eb37c5f5c5a9471131" => :el_capitan - end - - uses_from_macos "ruby" - - resource "multi_json" do - url "https://rubygems.org/gems/multi_json-1.12.1.gem" - sha256 "b387722b0a31fff619a2682c7011affb5a13fed2cce240c75c5d6ca3e910ecf2" - end - - resource "pygments.rb" do - url "https://rubygems.org/gems/pygments.rb-1.1.2.gem" - sha256 "55a5deed9ecba6037ac22bf27191e0073bd460f87291b2f384922e4b0d59511c" - end - - def install - ENV["GEM_HOME"] = libexec - resources.each do |r| - r.fetch - system "gem", "install", r.cached_download, "--no-document", - "--install-dir", libexec - end - bin.install "ghi" - bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) - man1.install "man/ghi.1" - end - - test do - system "#{bin}/ghi", "--version" - end -end diff --git a/Formula/ghostscript.rb b/Formula/ghostscript.rb deleted file mode 100644 index c62cb4da6d96c..0000000000000 --- a/Formula/ghostscript.rb +++ /dev/null @@ -1,108 +0,0 @@ -class Ghostscript < Formula - desc "Interpreter for PostScript and PDF" - homepage "https://www.ghostscript.com/" - url "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs952/ghostpdl-9.52.tar.gz" - sha256 "8f6e48325c106ae033bbae3e55e6c0b9ee5c6b57e54f7cd24fb80a716a93b06a" - - bottle do - sha256 "8cd0efa1e5525f849be3ee1e50e1635b99667cb4d1eb6c3002a45378346882f4" => :catalina - sha256 "8906a4dbf2513963a4710f351e3426622c259bd888c760e4c08a9436860b4014" => :mojave - sha256 "cd5e55d0429d7e88ba2d580e79934c157d5bd2981d71a7f40db4573abe79af67" => :high_sierra - end - - head do - # Can't use shallow clone. Doing so = fatal errors. - url "https://git.ghostscript.com/ghostpdl.git", :shallow => false - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libtiff" - - # https://sourceforge.net/projects/gs-fonts/ - resource "fonts" do - url "https://downloads.sourceforge.net/project/gs-fonts/gs-fonts/8.11%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-8.11.tar.gz" - sha256 "0eb6f356119f2e49b2563210852e17f57f9dcc5755f350a69a46a0d641a0c401" - end - - patch :DATA # Uncomment macOS-specific make vars - - def install - args = %W[ - --prefix=#{prefix} - --disable-cups - --disable-compile-inits - --disable-gtk - --disable-fontconfig - --without-libidn - --with-system-libtiff - --without-x - ] - - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end - - # Install binaries and libraries - system "make", "install" - system "make", "install-so" - - (pkgshare/"fonts").install resource("fonts") - (man/"de").rmtree - end - - test do - ps = test_fixtures("test.ps") - assert_match /Hello World!/, shell_output("#{bin}/ps2ascii #{ps}") - end -end - -__END__ -diff --git i/base/unix-dll.mak w/base/unix-dll.mak -index f50c09c00adb..8855133b400c 100644 ---- i/base/unix-dll.mak -+++ w/base/unix-dll.mak -@@ -89,18 +89,33 @@ GPDL_SONAME_MAJOR_MINOR=$(GPDL_SONAME_BASE)$(GS_SOEXT)$(SO_LIB_VERSION_SEPARATOR - # similar linkers it must containt the trailing "=" - # LDFLAGS_SO=-shared -Wl,$(LD_SET_DT_SONAME)$(LDFLAGS_SO_PREFIX)$(GS_SONAME_MAJOR) - - - # MacOS X --#GS_SOEXT=dylib --#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT) --#GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT) --#GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT) -+GS_SOEXT=dylib -+GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT) -+GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT) -+GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT) - #LDFLAGS_SO=-dynamiclib -flat_namespace --#LDFLAGS_SO_MAC=-dynamiclib -install_name $(GS_SONAME_MAJOR_MINOR) -+GS_LDFLAGS_SO=-dynamiclib -install_name $(GS_SONAME_MAJOR_MINOR) - #LDFLAGS_SO=-dynamiclib -install_name $(FRAMEWORK_NAME) - -+PCL_SONAME=$(PCL_SONAME_BASE).$(GS_SOEXT) -+PCL_SONAME_MAJOR=$(PCL_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT) -+PCL_SONAME_MAJOR_MINOR=$(PCL_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT) -+PCL_LDFLAGS_SO=-dynamiclib -install_name $(PCL_SONAME_MAJOR_MINOR) -+ -+XPS_SONAME=$(XPS_SONAME_BASE).$(GS_SOEXT) -+XPS_SONAME_MAJOR=$(XPS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT) -+XPS_SONAME_MAJOR_MINOR=$(XPS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT) -+XPS_LDFLAGS_SO=-dynamiclib -install_name $(XPS_SONAME_MAJOR_MINOR) -+ -+GPDL_SONAME=$(GPDL_SONAME_BASE).$(GS_SOEXT) -+GPDL_SONAME_MAJOR=$(GPDL_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT) -+GPDL_SONAME_MAJOR_MINOR=$(GPDL_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT) -+GPDL_LDFLAGS_SO=-dynamiclib -install_name $(GPDL_SONAME_MAJOR_MINOR) -+ - GS_SO=$(BINDIR)/$(GS_SONAME) - GS_SO_MAJOR=$(BINDIR)/$(GS_SONAME_MAJOR) - GS_SO_MAJOR_MINOR=$(BINDIR)/$(GS_SONAME_MAJOR_MINOR) - - PCL_SO=$(BINDIR)/$(PCL_SONAME) diff --git a/Formula/ghq.rb b/Formula/ghq.rb deleted file mode 100644 index ce4e38cd5d702..0000000000000 --- a/Formula/ghq.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Ghq < Formula - desc "Remote repository management made easy" - homepage "https://github.com/x-motemen/ghq" - url "https://github.com/x-motemen/ghq.git", - :tag => "v1.1.4", - :revision => "5b8d4e4ca8099e8de0188d6174eb58217e05d503" - license "MIT" - head "https://github.com/x-motemen/ghq.git" - - bottle do - cellar :any_skip_relocation - sha256 "8b50baf86d4bab90bf650a450fbbb3dc4e5f3132fe47207d68bf6681bee57f26" => :catalina - sha256 "517f67f0c52fec93f32c7d327baaf2062e8c16ca644560710c59a88f415d174f" => :mojave - sha256 "b908d0c46b72a968487f3a4d68e3397314d9277b09f89bab9c8c1af412703816" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "build", "VERBOSE=1" - bin.install "ghq" - bash_completion.install "misc/bash/_ghq" => "ghq" - zsh_completion.install "misc/zsh/_ghq" - prefix.install_metafiles - end - - test do - assert_match "#{testpath}/ghq", shell_output("#{bin}/ghq root") - end -end diff --git a/Formula/ghr.rb b/Formula/ghr.rb deleted file mode 100644 index 2725ddb445f03..0000000000000 --- a/Formula/ghr.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ghr < Formula - desc "Upload multiple artifacts to GitHub Release in parallel" - homepage "https://tcnksm.github.io/ghr" - url "https://github.com/tcnksm/ghr/archive/v0.13.0.tar.gz" - sha256 "53933c6436187f573128903701ce74ac341793e892d3c2f57c822c0ce3c49e11" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "7fd9ae651a7adbedd46e266e04260fa221c84cf1595c04e644f3e720f8f76a48" => :catalina - sha256 "322df199f2e51c91d348638c3d7baed79c8e542755fe51634cc2c06ea99150a9" => :mojave - sha256 "941dce22c70f320d75f5e961c3cfc33f837f6ee113a5a06c445e57cbdcfa34fb" => :high_sierra - end - - depends_on "go" => :build - - def install - # Avoid running `go get` - inreplace "Makefile", "go get ${u} -d", "" - - system "make", "build" - bin.install "bin/ghr" => "ghr" - prefix.install_metafiles - end - - test do - ENV["GITHUB_TOKEN"] = nil - args = "-username testbot -repository #{testpath} v#{version} #{Dir.pwd}" - assert_include "token not found", shell_output("#{bin}/ghr #{args}", 15) - end -end diff --git a/Formula/ghz-web.rb b/Formula/ghz-web.rb deleted file mode 100644 index 6696fe61a9e26..0000000000000 --- a/Formula/ghz-web.rb +++ /dev/null @@ -1,38 +0,0 @@ -class GhzWeb < Formula - desc "Web interface for ghz" - homepage "https://ghz.sh/" - url "https://github.com/bojand/ghz/archive/v0.55.0.tar.gz" - sha256 "d968e7841ec5c06bed2ab297308defa8ff268acd1ecdc7c003aebfc593f29d5d" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "cd64ee484257dd934ea0c635171be0eeaab99b5b38fbbe223de2d0937fbed1e4" => :catalina - sha256 "eb497d7e74d4e3896e164410a8bfa58ceddf44008a49fd0c9ea7ed09ddcafff3" => :mojave - sha256 "8e49c90d670f36521c6959f2b36d0bf7bc686740775adb069443db7b3cf419f5" => :high_sierra - end - - depends_on "go" => :build - depends_on :xcode => :build - - def install - ENV["CGO_ENABLED"] = "1" - system "go", "build", - "-ldflags", "-s -w -X main.version=#{version}", - *std_go_args, - "cmd/ghz-web/main.go" - prefix.install_metafiles - end - - test do - assert_match version.to_s, shell_output("#{bin}/ghz-web -v 2>&1") - port = free_port - ENV["GHZ_SERVER_PORT"] = port.to_s - fork do - exec "#{bin}/ghz-web" - end - sleep 1 - cmd = "curl -sIm3 -XGET http://localhost:#{port}/" - assert_match /200 OK/m, shell_output(cmd) - end -end diff --git a/Formula/ghz.rb b/Formula/ghz.rb deleted file mode 100644 index 3fc22bc5db1f2..0000000000000 --- a/Formula/ghz.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Ghz < Formula - desc "Simple gRPC benchmarking and load testing tool" - homepage "https://ghz.sh/" - url "https://github.com/bojand/ghz/archive/v0.55.0.tar.gz" - sha256 "d968e7841ec5c06bed2ab297308defa8ff268acd1ecdc7c003aebfc593f29d5d" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "df24f8e443c984051197b3818effe80d5f9b638a37466325599aeeeeee2d7ea1" => :catalina - sha256 "a123aedca86b64c0527230b4d3d395688af617adf7cfb8cb95d966921222cba3" => :mojave - sha256 "aaa35adb266065e4e6dbad474bb891d604e524e6194b6291cb8b1fecf96fa43c" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", - "-ldflags", "-s -w -X main.version=#{version}", - *std_go_args, - "cmd/ghz/main.go" - prefix.install_metafiles - end - - test do - assert_match version.to_s, shell_output("#{bin}/ghz -v 2>&1") - (testpath/"config.toml").write <<~EOS - proto = "greeter.proto" - call = "helloworld.Greeter.SayHello" - host = "0.0.0.0:50051" - insecure = true - [data] - name = "Bob" - EOS - assert_match "open greeter.proto: no such file or directory", - shell_output("#{bin}/ghz --config config.toml 2>&1", 1) - end -end diff --git a/Formula/gibbslda.rb b/Formula/gibbslda.rb deleted file mode 100644 index 3492ab1c01551..0000000000000 --- a/Formula/gibbslda.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Gibbslda < Formula - desc "Library wrapping imlib2's context API" - homepage "https://gibbslda.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gibbslda/GibbsLDA%2B%2B/0.2/GibbsLDA%2B%2B-0.2.tar.gz" - sha256 "4ca7b51bd2f098534f2fdf82c3f861f5d8bf92e29a6b7fbdc50c3c2baeb070ae" - - bottle do - cellar :any_skip_relocation - sha256 "1531c6a6f324f3639ad798d9ae63b461812aecf0a0f3e5a4ad3ea786997c1e5d" => :catalina - sha256 "2d8cab4cd368d2c12c301dae37449d9b5ce6e625b39bfa7f96d542e6390c6848" => :mojave - sha256 "a92cdb534bb1061948417a9840addb3bda01fcbdca63ca290b34e818bd4e695c" => :high_sierra - sha256 "9244041821944e45946fcf6a491ee1579293b4c154c7b9921b38fd6159567552" => :sierra - sha256 "c8a95c74f3c9e967506fb386a1343459ecae8362cbf91362a7955ba017bea5fc" => :el_capitan - sha256 "091c214c2589c2a2a0b0dcb90f45cf993ffeeb7d7260f505ef84f1fd773b326c" => :yosemite - sha256 "bd4c35f5f73ae1aa5fdee00bd89c7b9c455c30061effe1660fbfbd203cb82cd3" => :mavericks - end - - # Build fails without including stdlib - https://trac.macports.org/ticket/41915 - # https://sourceforge.net/p/gibbslda/bugs/4/ - patch :DATA - - def install - system "make", "clean" - system "make", "all" - bin.install "src/lda" - share.install "docs/GibbsLDA++Manual.pdf" - end -end - -__END__ - -diff --git a/src/utils.cpp b/src/utils.cpp -index e2f538b..1df5fb3 100644 ---- a/src/utils.cpp -+++ b/src/utils.cpp -@@ -22,6 +22,7 @@ - */ - - #include -+#include - #include - #include - #include "strtokenizer.h" diff --git a/Formula/gibo.rb b/Formula/gibo.rb deleted file mode 100644 index 46b15dd4a6d4b..0000000000000 --- a/Formula/gibo.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Gibo < Formula - desc "Access GitHub's .gitignore boilerplates" - homepage "https://github.com/simonwhitaker/gibo" - url "https://github.com/simonwhitaker/gibo/archive/2.2.4.tar.gz" - sha256 "35debd3e345caf8eeb4441a3877b7e33c98caec5f5c5e2e61da1cb1a263aec4b" - license "Unlicense" - - bottle :unneeded - - def install - bin.install "gibo" - bash_completion.install "shell-completions/gibo-completion.bash" - zsh_completion.install "shell-completions/gibo-completion.zsh" => "_gibo" - fish_completion.install "shell-completions/gibo.fish" - end - - test do - system "#{bin}/gibo", "update" - assert_includes shell_output("#{bin}/gibo dump Python"), "Python.gitignore" - end -end diff --git a/Formula/gif2png.rb b/Formula/gif2png.rb deleted file mode 100644 index ff393d919f748..0000000000000 --- a/Formula/gif2png.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Gif2png < Formula - desc "Convert GIFs to PNGs" - homepage "http://www.catb.org/~esr/gif2png/" - url "http://www.catb.org/~esr/gif2png/gif2png-2.5.13.tar.gz" - sha256 "997275b20338e6cfe3bd4adb084f82627c34c856bc1d67c915c397cf55146924" - - bottle do - cellar :any - sha256 "cfbf0572aec85f33c51bc58064e20a44de374a319bb369e46c0aab8581756253" => :catalina - sha256 "95c85cb74a70b1f217c3db5f4f6f6bab2b9871755435a25301bc4215015f1341" => :mojave - sha256 "fd15459a5000f08952b7609ef743d80c84749710e30b7bfbe02d68e7ccc27ed7" => :high_sierra - sha256 "25aa7ef95b5ca8e7a79bf884fa8e9c8eafb21f2887caabc3ffb40de5fda2ab26" => :sierra - end - - depends_on "libpng" - - def install - system "make", "install", "prefix=#{prefix}" - end - - test do - pipe_output "#{bin}/gif2png -O", File.read(test_fixtures("test.gif")) - end -end diff --git a/Formula/gifcap.rb b/Formula/gifcap.rb deleted file mode 100644 index 0a064f529979a..0000000000000 --- a/Formula/gifcap.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Gifcap < Formula - desc "Capture video from an Android device and make a gif" - homepage "https://github.com/outlook/gifcap" - url "https://github.com/outlook/gifcap/archive/1.0.4.tar.gz" - sha256 "32747a6cf77f7ea99380752ba35ecd929bb185167e5908cf910d2a92f05029ad" - license "MIT" - head "https://github.com/outlook/gifcap.git" - - bottle :unneeded - - depends_on "ffmpeg" - - def install - bin.install "gifcap" - end - - test do - assert_match /^usage: gifcap/, shell_output("#{bin}/gifcap --help").strip - end -end diff --git a/Formula/gifify.rb b/Formula/gifify.rb deleted file mode 100644 index 2e1f68457eb6c..0000000000000 --- a/Formula/gifify.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Gifify < Formula - desc "Turn movies into GIFs" - homepage "https://github.com/jclem/gifify" - url "https://github.com/jclem/gifify/archive/v4.0.tar.gz" - sha256 "4cb967e8d0ba897bc91a60006e34299687f388dd47e05fd534f2eff8379fe479" - license "MIT" - head "https://github.com/jclem/gifify.git" - - bottle :unneeded - - depends_on "ffmpeg" - depends_on "imagemagick" - - def install - bin.install "gifify.sh" => "gifify" - end - - test do - system "ffmpeg", "-f", "lavfi", "-i", "testsrc", "-t", "1", "-c:v", "libx264", "test.m4v" - system "#{bin}/gifify", "test.m4v" - end -end diff --git a/Formula/giflib.rb b/Formula/giflib.rb deleted file mode 100644 index 78352c827823a..0000000000000 --- a/Formula/giflib.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Giflib < Formula - desc "Library and utilities for processing GIFs" - homepage "https://giflib.sourceforge.io/" - url "https://downloads.sourceforge.net/project/giflib/giflib-5.2.1.tar.gz" - sha256 "31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd" - - bottle do - cellar :any - sha256 "ad97d175fa77f7afb4a1c215538d8ae9eff30435de7feaa6a5d2e29fca7fef4d" => :catalina - sha256 "42d2f8a6e9dbf9d4c22a2e64581c7170cc7dcb2a0e66df383efc67b7bc96238d" => :mojave - sha256 "e1a30a20ad93cd9ec003027d7fba43a7e04ced0bff4156614818cccfc9dec6c9" => :high_sierra - end - - # Upstream has stripped out the previous autotools-based build system and their - # Makefile doesn't work on macOS. See https://sourceforge.net/p/giflib/bugs/133/ - patch :p0 do - url "https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/c323/attachment/Makefile.patch" - sha256 "a94e7bdd8840a31cecacc301684dfdbf7b98773ad824aeaab611fabfdc513036" - end - - def install - system "make", "all" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - output = shell_output("#{bin}/giftext #{test_fixtures("test.gif")}") - assert_match "Screen Size - Width = 1, Height = 1", output - end -end diff --git a/Formula/giflossy.rb b/Formula/giflossy.rb deleted file mode 100644 index 222e137fdae88..0000000000000 --- a/Formula/giflossy.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Giflossy < Formula - desc "Lossy LZW compression, reduces GIF file sizes by 30-50%" - homepage "https://pornel.net/lossygif" - url "https://github.com/kornelski/giflossy/archive/1.91.tar.gz" - sha256 "b97f6aadf163ff5dd96ad1695738ad3d5aa7f1658baed8665c42882f11d9ab22" - license "GPL-2.0" - head "https://github.com/kornelski/giflossy.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "e3b6e1b39169c52c0f96b02ff68b43f4e8f297c830d290288221e17a5c130839" => :catalina - sha256 "9a0c85d6e19b61c8f232ab36211f8952220a62e5ca0f1c1f57de8280782dbc36" => :mojave - sha256 "492ddf714381465db00b10689af119d8c225ca5138304d8f1e6c946b9cf67e76" => :high_sierra - sha256 "464798aef709d62f6bfb4cefd3cb9d084e3aced492766e63b113762f15347d19" => :sierra - sha256 "50e8538008faf1bb05e8d44801cacd6e8f41fbf392ed23b639c7d05d36b5c8d8" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - conflicts_with "gifsicle", - :because => "both install an `gifsicle` binary" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-gifview - ] - - system "autoreconf", "-fvi" - system "./configure", *args - system "make", "install" - end - - test do - system bin/"gifsicle", "-O3", "--lossy=80", "-o", - "out.gif", test_fixtures("test.gif") - end -end diff --git a/Formula/gifsicle.rb b/Formula/gifsicle.rb deleted file mode 100644 index 5311197e64c12..0000000000000 --- a/Formula/gifsicle.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Gifsicle < Formula - desc "GIF image/animation creator/editor" - homepage "https://www.lcdf.org/gifsicle/" - url "https://www.lcdf.org/gifsicle/gifsicle-1.92.tar.gz" - sha256 "5ab556c01d65fddf980749e3ccf50b7fd40de738b6df679999294cc5fabfce65" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "5c39ab6736846e30082db190167bc498e78d03e523f642057eadc29f854c71b1" => :catalina - sha256 "52be1cd49246909777199147dcbbeb6f490580558615138ae063b6149cfbe53c" => :mojave - sha256 "a7cfb607906023c5bdb56a49f8a75ce0b3e2c76a971266bb530d04ed29be74f9" => :high_sierra - sha256 "746d071f268950c6af18704590b981f5f965d35e2adf6c202aa3df0f13e943e9" => :sierra - end - - head do - url "https://github.com/kohler/gifsicle.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - conflicts_with "giflossy", - :because => "both install an `gifsicle` binary" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-gifview - ] - - system "./bootstrap.sh" if build.head? - system "./configure", *args - system "make", "install" - end - - test do - system "#{bin}/gifsicle", "--info", test_fixtures("test.gif") - end -end diff --git a/Formula/gifski.rb b/Formula/gifski.rb deleted file mode 100644 index c4c5275def8c8..0000000000000 --- a/Formula/gifski.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Gifski < Formula - desc "Highest-quality GIF encoder based on pngquant" - homepage "https://gif.ski/" - url "https://github.com/ImageOptim/gifski/archive/0.10.4.tar.gz" - sha256 "0fd4b6beb880bb7719a3fb707f8f42678a62c8cf9bbb90f369f043864bbcc5ed" - license "AGPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "e00f209f81a6ae5e7b5f75427480776298d8cf4f9d8b5261e7c1a38e19858076" => :catalina - sha256 "a654fc60bf8ff9e29499f3514c4ab85227886380cd9126591cfd1c1afb137dfa" => :mojave - sha256 "a9e6089442617d5df7aa8b6e0baf11e5a5152adff89bb3d6cb018b61a8e3d387" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - png = test_fixtures("test.png") - system bin/"gifski", "-o", "out.gif", png, png - assert_predicate testpath/"out.gif", :exist? - refute_predicate (testpath/"out.gif").size, :zero? - end -end diff --git a/Formula/gimme-aws-creds.rb b/Formula/gimme-aws-creds.rb deleted file mode 100644 index f1850d1cc2180..0000000000000 --- a/Formula/gimme-aws-creds.rb +++ /dev/null @@ -1,145 +0,0 @@ -class GimmeAwsCreds < Formula - include Language::Python::Virtualenv - - desc "CLI to retrieve AWS credentials from Okta" - homepage "https://github.com/Nike-Inc/gimme-aws-creds" - url "https://files.pythonhosted.org/packages/bc/44/306b41996e0cf62082c4ff5bc4863cc488d8475ae7d8c6ce5db8b26137c5/gimme%20aws%20creds-2.3.4.tar.gz" - sha256 "a9cf1c816c9d0f8401832bca7f1ae05061edc0632a37853f3de9d942ad5d60d6" - - bottle do - cellar :any - sha256 "736faae3b3e9f48ea386933bc68de1cb64a293e13e5ae4111d437997964386ec" => :catalina - sha256 "9f6234bc623c5c32a120b3dfaa7d507e56e92d0b7386b71d768f15bf942e13e9" => :mojave - sha256 "d2e420d0a093b64c25f766c8a79bae90d5504324829bea3a0f50add60b7f1839" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/c6/62/8a2bef01214eeaa5a4489eca7104e152968729512ee33cb5fbbc37a896b7/beautifulsoup4-4.9.1.tar.gz" - sha256 "73cc4d115b96f79c7d77c1c7f7a0a8d4c57860d1041df407dd1aae7f07a77fd7" - end - - resource "boto3" do - url "https://files.pythonhosted.org/packages/71/46/ce23f690eddf36c6a8cba3b162a11a58da79c0a323e9083010bbd851d8f2/boto3-1.14.15.tar.gz" - sha256 "3c654c1b8f9708e0b457ea1d312ee53451368d09b571ce737dc1f46484112bc1" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/eb/b7/b058c816f3af8cb14abe47fc41daa58cabb49646ae1b433281c873c1bfa0/botocore-1.17.15.tar.gz" - sha256 "34ebc56471a75ea28bfd39f1665d58ee13229c75e8cd6c62b2e2abf1f3e75f0f" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "configparser" do - url "https://files.pythonhosted.org/packages/b1/83/fa54eee6643ffb30ab5a5bebdb523c697363658e46b85729e3d587a3765e/configparser-3.8.1.tar.gz" - sha256 "bc37850f0cc42a1725a796ef7d92690651bf1af37d744cc63161dac62cabee17" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "fido2" do - url "https://files.pythonhosted.org/packages/97/03/9ce85396423a4b9897cc3295a605b63dffd06940e65c1cccd51c2c016864/fido2-0.8.1.tar.gz" - sha256 "449068f6876f397c8bb96ebc6a75c81c2692f045126d3f13ece21d409acdf7c3" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz" - sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz" - sha256 "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9" - end - - resource "keyring" do - url "https://files.pythonhosted.org/packages/a6/52/eb8a0e13b54ec9240c7dd68fcd0951c52f62033d438af372831af770f7cc/keyring-21.2.1.tar.gz" - sha256 "c53e0e5ccde3ad34284a40ce7976b5b3a3d6de70344c3f8ee44364cc340976ec" - end - - resource "okta" do - url "https://files.pythonhosted.org/packages/e8/2a/1c1bae7ed0b429cfe04caaff4ec06383669b651b315328b15f87ab67d347/okta-0.0.4.tar.gz" - sha256 "53e792c68d3684ff4140b4cb1c02af3821090368f8110fde54c0bdb638449332" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - 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 "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/50/de/2b688c062107942486c81a739383b1432a72717d9a85a6a1a692f003c70c/s3transfer-0.3.3.tar.gz" - sha256 "921a37e2aefc64145e7b73d50c71bb4f26f46e4c9f414dc648c6245ff92cf7db" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "soupsieve" do - url "https://files.pythonhosted.org/packages/3e/db/5ba900920642414333bdc3cb397075381d63eafc7e75c2373bbc560a9fa1/soupsieve-2.0.1.tar.gz" - sha256 "a59dc181727e95d25f781f0eb4fd1825ff45590ec8ff49eadfd7f1a537cc0232" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - end - - test do - # Workaround gimme-aws-creds bug which runs action-configure twice when config file is missing. - config_file = Pathname(".okta_aws_login_config") - touch(config_file) - - assert_match "Okta Configuration Profile Name", - pipe_output("#{bin}/gimme-aws-creds --action-configure 2>&1", - "TESTPROFILE\nhttps://something.oktapreview.com\n\n\n\n\n\n\n\n\n\n\n") - assert_match "", config_file.read - - assert_match version.to_s, shell_output("#{bin}/gimme-aws-creds --version") - end -end diff --git a/Formula/gimme.rb b/Formula/gimme.rb deleted file mode 100644 index e2a36249dde2c..0000000000000 --- a/Formula/gimme.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Gimme < Formula - desc "Shell script to install any Go version" - homepage "https://github.com/travis-ci/gimme" - url "https://github.com/travis-ci/gimme/archive/v1.5.4.tar.gz" - sha256 "71036f892b3cae08f29be6fd4c69fb20d9b003ec80a24221d73e995e12ab0fe0" - license "MIT" - - bottle :unneeded - - def install - bin.install "gimme" - end - - test do - system "#{bin}/gimme", "-l" - end -end diff --git a/Formula/ginac.rb b/Formula/ginac.rb deleted file mode 100644 index a11f8e02112ec..0000000000000 --- a/Formula/ginac.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Ginac < Formula - desc "Not a Computer algebra system" - homepage "https://www.ginac.de/" - url "https://www.ginac.de/ginac-1.7.10.tar.bz2" - sha256 "e9ff2cc2d66e4181daf3a95405be7aa337f0446f5035e157b8c811eba10e51af" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "8cca55fc95511ccc59a7fad241b9359954ac105f74332058773ac4aa5dc8028a" => :catalina - sha256 "603c9d1e9b2e3bce8ac26887b78319a428f8a066a576ab3ac1ac2ae603ee67b4" => :mojave - sha256 "689107e33f99de6bbec419a1f252861258d8737d536dc2f62732e74bae8211ba" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "cln" - depends_on "python@3.8" - depends_on "readline" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - using namespace std; - using namespace GiNaC; - - int main() { - symbol x("x"), y("y"); - ex poly; - - for (int i=0; i<3; ++i) { - poly += factorial(i+16)*pow(x,i)*pow(y,2-i); - } - - cout << poly << endl; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", - "-L#{Formula["cln"].lib}", - "-lcln", "-lginac", "-o", "test", - "-std=c++11" - system "./test" - end -end diff --git a/Formula/gist.rb b/Formula/gist.rb deleted file mode 100644 index 0a6e5de99c05c..0000000000000 --- a/Formula/gist.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Gist < Formula - desc "Command-line utility for uploading Gists" - homepage "https://github.com/defunkt/gist" - url "https://github.com/defunkt/gist/archive/v5.1.0.tar.gz" - sha256 "843cea035c137d23d786965688afc9ee70610ac6c3d6f6615cb958d6c792fbb2" - license "MIT" - head "https://github.com/defunkt/gist.git" - - bottle do - cellar :any_skip_relocation - sha256 "7eb37c0514203306a3e5be9176acca230014a30e07d43d0e9ba72afcc3dc3203" => :catalina - sha256 "7eb37c0514203306a3e5be9176acca230014a30e07d43d0e9ba72afcc3dc3203" => :mojave - sha256 "7eb37c0514203306a3e5be9176acca230014a30e07d43d0e9ba72afcc3dc3203" => :high_sierra - end - - depends_on "ruby" if MacOS.version <= :sierra - - def install - system "rake", "install", "prefix=#{prefix}" - end - - test do - output = pipe_output("#{bin}/gist", "homebrew") - assert_match "GitHub now requires credentials", output - end -end diff --git a/Formula/gistit.rb b/Formula/gistit.rb deleted file mode 100644 index a674ce124204e..0000000000000 --- a/Formula/gistit.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Gistit < Formula - desc "Command-line utility for creating Gists" - homepage "https://gistit.herokuapp.com/" - url "https://github.com/jrbasso/gistit/archive/v0.1.3.tar.gz" - sha256 "b7203c318460c264bd19b35a767da1cef33e5cae2c65b057e401fe20f47e1cca" - license "MIT" - head "https://github.com/jrbasso/gistit.git" - - bottle do - cellar :any - sha256 "8a5288aec9e18273db915b7c2ac077157549f1b496a0fd98e878d34ec9be66fa" => :catalina - sha256 "56cf73e5a5c9742640a146b1b37ed2aea557b356b2e5a96ff437130a6aab4dfb" => :mojave - sha256 "decb56c455eb39e379b94b6832281ea06ae8a42c745eb6c108c15883a0ef2fad" => :high_sierra - sha256 "269b7429070e11980d6764f2f6bd1d870d2e391cfd919f948159cb35cfab1184" => :sierra - sha256 "b968a2885e3ac3e0c717fdabb9986149a39d58d031476d4ef3ada7a9e1ad07e9" => :el_capitan - sha256 "052536cb990d1c5ea4b48612026dfb13addd03cbc06ed8c6b42f3636eb6771a7" => :yosemite - sha256 "c2388d390d86f39934ae51e71edfa1fd890d8ad4384427ab14275280eece97ce" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "jansson" - - def install - mv "configure.in", "configure.ac" # silence warning - system "./autogen.sh", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/gistit", "-v" - end -end diff --git a/Formula/git-absorb.rb b/Formula/git-absorb.rb deleted file mode 100644 index 92b36217df3f6..0000000000000 --- a/Formula/git-absorb.rb +++ /dev/null @@ -1,40 +0,0 @@ -class GitAbsorb < Formula - desc "Automatic git commit --fixup" - homepage "https://github.com/tummychow/git-absorb" - url "https://github.com/tummychow/git-absorb/archive/0.6.3.tar.gz" - sha256 "d62ba36150d1113ea9216b8dc8f1f749c97a468cb41b2d1cd5c019158915ca70" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "bdf7c3b57f49dc9ccd83d9fed9f089f994f20c3591c6f18900f4e70ee80627e6" => :catalina - sha256 "63d50725c92837dbd25b63560ee2b8061c8b335288230c9f3f5976b94aed6248" => :mojave - sha256 "c6dc732ac254cc9d5aa2ebfe5ecc4e65c95b6ed860efc22b443c1911911099f4" => :high_sierra - end - - depends_on "rust" => :build - - uses_from_macos "zlib" - - def install - system "cargo", "install", *std_cargo_args - man1.install "Documentation/git-absorb.1" - end - - test do - (testpath/".gitconfig").write <<~EOS - [user] - name = Real Person - email = notacat@hotmail.cat - EOS - system "git", "init" - (testpath/"test").write "foo" - system "git", "add", "test" - system "git", "commit", "--message", "Initial commit" - - (testpath/"test").delete - (testpath/"test").write "bar" - system "git", "add", "test" - system "git", "absorb" - end -end diff --git a/Formula/git-annex-remote-rclone.rb b/Formula/git-annex-remote-rclone.rb deleted file mode 100644 index 9edcdddaab42e..0000000000000 --- a/Formula/git-annex-remote-rclone.rb +++ /dev/null @@ -1,50 +0,0 @@ -class GitAnnexRemoteRclone < Formula - desc "Use rclone supported cloud storage with git-annex" - homepage "https://github.com/DanielDent/git-annex-remote-rclone" - url "https://github.com/DanielDent/git-annex-remote-rclone/archive/v0.6.tar.gz" - sha256 "fb9bb77c6dd30dad4966926af87f63be92ef442cfeabcfd02202c657f40439d0" - license "GPL-3.0" - - bottle :unneeded - - depends_on "git-annex" - depends_on "rclone" - - def install - bin.install "git-annex-remote-rclone" - end - - test do - # try a test modeled after git-annex.rb's test (copy some lines - # from there) - - # make sure git can find git-annex - ENV.prepend_path "PATH", bin - # We don't want this here or it gets "caught" by git-annex. - rm_r "Library/Python/2.7/lib/python/site-packages/homebrew.pth" - - system "git", "init" - system "git", "annex", "init" - - (testpath/"Hello.txt").write "Hello!" - assert !File.symlink?("Hello.txt") - assert_match /^add Hello.txt.*ok.*\(recording state in git\.\.\.\)/m, shell_output("git annex add .") - system "git", "commit", "-a", "-m", "Initial Commit" - assert File.symlink?("Hello.txt") - - ENV["RCLONE_CONFIG_TMPLOCAL_TYPE"]="local" - system "git", "annex", "initremote", "testremote", "type=external", "externaltype=rclone", - "target=tmplocal", "encryption=none", "rclone_layout=lower" - - system "git", "annex", "copy", "Hello.txt", "--to=testremote" - - # The steps below are necessary to ensure the directory cleanly deletes. - # git-annex guards files in a way that isn't entirely friendly of automatically - # wiping temporary directories in the way `brew test` does at end of execution. - system "git", "rm", "Hello.txt", "-f" - system "git", "commit", "-a", "-m", "Farewell!" - system "git", "annex", "unused" - assert_match "dropunused 1 ok", shell_output("git annex dropunused 1 --force") - system "git", "annex", "uninit" - end -end diff --git a/Formula/git-annex.rb b/Formula/git-annex.rb deleted file mode 100644 index b2006e3222c14..0000000000000 --- a/Formula/git-annex.rb +++ /dev/null @@ -1,82 +0,0 @@ -require "language/haskell" - -class GitAnnex < Formula - include Language::Haskell::Cabal - - desc "Manage files with git without checking in file contents" - homepage "https://git-annex.branchable.com/" - url "https://hackage.haskell.org/package/git-annex-8.20200617/git-annex-8.20200617.tar.gz" - sha256 "04935cbeacd3da54c72757aaf946d69787b6d3b59219df571ca0f6cdf4c2f7ed" - head "git://git-annex.branchable.com/" - - bottle do - cellar :any - sha256 "5ef94fd462e9543ff6983aa32b26cf702d7d47cef83c6418410e3681b76cab34" => :catalina - sha256 "fa7cd4ceb2123f5570b5b9c0c9384011eab4cb382ad73afbccfd5a1fea9c2f2f" => :mojave - sha256 "21fba174494bc17c5592aa0c5493e21a76d49f988e3a0795c91e6c49d3e4afc2" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.6" => :build - depends_on "pkg-config" => :build - depends_on "gsasl" - depends_on "libmagic" - depends_on "quvi" - - def install - install_cabal_package "--constraint", "http-conduit>=2.3", - "--constraint", "network>=2.6.3.0", - :using => ["alex", "happy", "c2hs"], - :flags => ["s3", "webapp"] - bin.install_symlink "git-annex" => "git-annex-shell" - end - - plist_options :manual => "git annex assistant --autostart" - - def plist - <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_bin}/git-annex - assistant - --autostart - - - - EOS - end - - test do - # make sure git can find git-annex - ENV.prepend_path "PATH", bin - # We don't want this here or it gets "caught" by git-annex. - rm_r "Library/Python/2.7/lib/python/site-packages/homebrew.pth" - - system "git", "init" - system "git", "annex", "init" - (testpath/"Hello.txt").write "Hello!" - assert !File.symlink?("Hello.txt") - assert_match /^add Hello.txt.*ok.*\(recording state in git\.\.\.\)/m, shell_output("git annex add .") - system "git", "commit", "-a", "-m", "Initial Commit" - assert File.symlink?("Hello.txt") - - # The steps below are necessary to ensure the directory cleanly deletes. - # git-annex guards files in a way that isn't entirely friendly of automatically - # wiping temporary directories in the way `brew test` does at end of execution. - system "git", "rm", "Hello.txt", "-f" - system "git", "commit", "-a", "-m", "Farewell!" - system "git", "annex", "unused" - assert_match "dropunused 1 ok", shell_output("git annex dropunused 1 --force") - system "git", "annex", "uninit" - end -end diff --git a/Formula/git-appraise.rb b/Formula/git-appraise.rb deleted file mode 100644 index 1033cedfa1349..0000000000000 --- a/Formula/git-appraise.rb +++ /dev/null @@ -1,43 +0,0 @@ -class GitAppraise < Formula - desc "Distributed code review system for Git repos" - homepage "https://github.com/google/git-appraise" - url "https://github.com/google/git-appraise/archive/v0.6.tar.gz" - sha256 "5c674ee7f022cbc36c5889053382dde80b8e80f76f6fac0ba0445ed5313a36f1" - license "Apache-2.0" - head "https://github.com/google/git-appraise.git" - - bottle do - cellar :any_skip_relocation - sha256 "2d36acb4d28daabb41a0629e79a11aed722a988bdde30643cd24bc366f69754c" => :catalina - sha256 "f5f69cc84ebca243907d1e735b8f80807f48de36b3d6eea42a8ab99edbd48eb0" => :mojave - sha256 "e515979b703cef062e19829399ddb441c91d835e25814614c938af36764fc0d4" => :high_sierra - sha256 "c048f2cce708e7c85c74d18758e47d3959cce29e2f8e70bca021b1564e65092d" => :sierra - sha256 "e12ce185286565f4f07f48f1deb2fd4a19043bcafb337de94b9ba7148291b91b" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - (buildpath/"src/github.com/google").mkpath - ln_s buildpath, buildpath/"src/github.com/google/git-appraise" - - system "go", "build", "-o", bin/"git-appraise", "github.com/google/git-appraise/git-appraise" - end - - test do - system "git", "init" - system "git", "config", "user.email", "user@email.com" - (testpath/"README").write "test" - system "git", "add", "README" - system "git", "commit", "-m", "Init" - system "git", "branch", "user/test" - system "git", "checkout", "user/test" - (testpath/"README").append_lines "test2" - system "git", "add", "README" - system "git", "commit", "-m", "Update" - system "git", "appraise", "request", "--allow-uncommitted" - assert_predicate testpath/".git/refs/notes/devtools/reviews", :exist? - end -end diff --git a/Formula/git-archive-all.rb b/Formula/git-archive-all.rb deleted file mode 100644 index 79ee986235448..0000000000000 --- a/Formula/git-archive-all.rb +++ /dev/null @@ -1,34 +0,0 @@ -class GitArchiveAll < Formula - desc "Archive a project and its submodules" - homepage "https://github.com/Kentzo/git-archive-all" - url "https://github.com/Kentzo/git-archive-all/archive/1.21.0.tar.gz" - sha256 "b86681429124908645ac4cf26916519f23cdf2599e7c8e37ae21d86be4ca02c4" - license "MIT" - head "https://github.com/Kentzo/git-archive-all.git" - - bottle do - cellar :any_skip_relocation - sha256 "74c509f8ce278c1b12ef694749c5fedc9d056614f14ce4d6a01de1bb3803680f" => :catalina - sha256 "74c509f8ce278c1b12ef694749c5fedc9d056614f14ce4d6a01de1bb3803680f" => :mojave - sha256 "74c509f8ce278c1b12ef694749c5fedc9d056614f14ce4d6a01de1bb3803680f" => :high_sierra - end - - def install - system "make", "prefix=#{prefix}", "install" - end - - test do - (testpath/".gitconfig").write <<~EOS - [user] - name = Real Person - email = notacat@hotmail.cat - EOS - system "git", "init" - touch "homebrew" - system "git", "add", "homebrew" - system "git", "commit", "--message", "brewing" - - assert_equal "#{testpath.realpath}/homebrew => archive/homebrew", - shell_output("#{bin}/git-archive-all --dry-run ./archive").chomp - end -end diff --git a/Formula/git-bug.rb b/Formula/git-bug.rb deleted file mode 100644 index 138c772ccd122..0000000000000 --- a/Formula/git-bug.rb +++ /dev/null @@ -1,47 +0,0 @@ -class GitBug < Formula - desc "Distributed, offline-first bug tracker embedded in git, with bridges" - homepage "https://github.com/MichaelMure/git-bug" - url "https://github.com/MichaelMure/git-bug.git", - :tag => "0.7.1", - :revision => "2d64b85db71a17ff3277bbbf7ac9d8e81f8e416c" - license "GPL-3.0" - head "https://github.com/MichaelMure/git-bug.git" - - bottle do - cellar :any_skip_relocation - sha256 "6b22d352d4f7ac655ab3544593cbdbcb1d1ad6e2f87dd0f7066e31a9319aa97b" => :catalina - sha256 "c5a308416b902fbd59bd1df0bd17074f5bc9d8de594a07573b8d074889cb45fd" => :mojave - sha256 "0617df6821ac81888aa4ba8b38102031b17fb64b6b25b20554a454e3e4a1fd60" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOBIN"] = bin - system "make", "install" - - man1.install Dir["doc/man/*.1"] - doc.install Dir["doc/md/*.md"] - bash_completion.install "misc/bash_completion/git-bug" - zsh_completion.install "misc/zsh_completion/git-bug" => "_git-bug" - end - - test do - # Version - assert_match version.to_s, shell_output("#{bin}/git-bug --version") - # Version through git - assert_match version.to_s, shell_output("git bug --version") - - mkdir testpath/"git-repo" do - system "git", "init" - system "git", "config", "user.name", "homebrew" - system "git", "config", "user.email", "a@a.com" - system "yes 'a b http://www/www' | git bug user create" - system "git", "bug", "add", "-t", "Issue 1", "-m", "Issue body" - system "git", "bug", "add", "-t", "Issue 2", "-m", "Issue body" - system "git", "bug", "add", "-t", "Issue 3", "-m", "Issue body" - - assert_match "Issue 2", shell_output("git bug ls") - end - end -end diff --git a/Formula/git-cal.rb b/Formula/git-cal.rb deleted file mode 100644 index cc0a32acde19e..0000000000000 --- a/Formula/git-cal.rb +++ /dev/null @@ -1,34 +0,0 @@ -class GitCal < Formula - desc "GitHub-like contributions calendar but on the command-line" - homepage "https://github.com/k4rthik/git-cal" - url "https://github.com/k4rthik/git-cal/archive/v0.9.1.tar.gz" - sha256 "783fa73197b349a51d90670480a750b063c97e5779a5231fe046315af0a946cd" - license "MIT" - head "https://github.com/k4rthik/git-cal.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d409cf68f427e71e33abba6f0393860230882cb86a6cf58f8771135516d3afe2" => :catalina - sha256 "b6b4128e6c8dfc678bf4301a506795533a3c1a20a449d342e57b78cd3274db5d" => :mojave - sha256 "286c10cc47b2b26de4511fac0518d6edef3e05c676a45c14b32d8342891ecf2f" => :high_sierra - sha256 "82847887556bd0334e65c1c7a3a063c2d62e5f71e81e89c53aa8e0df1cc41e31" => :sierra - sha256 "8f928d65dc3414900ace5751d9e93bc712f03ffcabfefeb0d659e18db3998622" => :el_capitan - sha256 "d61d27644f236dd221d2ea15aea7ee088afaf08c305217084b63fb85cb0d7dba" => :yosemite - sha256 "2f09af33dd202d56be91b6bb7ead320cbc322332e411a7b712879a9198364e64" => :mavericks - end - - def install - system "perl", "Makefile.PL", "PREFIX=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "git", "init" - (testpath/"Hello").write "Hello World!" - system "git", "add", "Hello" - system "git", "commit", "-a", "-m", "Initial Commit" - system bin/"git-cal" - end -end diff --git a/Formula/git-cinnabar.rb b/Formula/git-cinnabar.rb deleted file mode 100644 index 96873e433c785..0000000000000 --- a/Formula/git-cinnabar.rb +++ /dev/null @@ -1,35 +0,0 @@ -class GitCinnabar < Formula - desc "Git remote helper to interact with mercurial repositories" - homepage "https://github.com/glandium/git-cinnabar" - url "https://github.com/glandium/git-cinnabar/archive/0.5.5.tar.gz" - sha256 "7e0a935966ab5b434f4c60335808be167e4b300d8cb0b0feb987adb7fc562521" - license "GPL-2.0" - head "https://github.com/glandium/git-cinnabar.git" - - bottle do - cellar :any_skip_relocation - sha256 "63fcc4e7b3080280b06da11e5c86f17d5f120984ea104f9983f4e9b4a12ba9bc" => :catalina - sha256 "384bddafdfea606547c363e9f53a0ddf97ccd5a407077c3200019e43e8d4853e" => :mojave - sha256 "8db1f3570d953a49235634aac491322fd68132c036b959fb9c5ff6960f1b4b58" => :high_sierra - end - - depends_on :macos # Due to Python 2 - depends_on "mercurial" - - uses_from_macos "curl" - - conflicts_with "git-remote-hg", :because => "both install `git-remote-hg` binaries" - - def install - system "make", "helper" - prefix.install "cinnabar" - bin.install "git-cinnabar", "git-cinnabar-helper", "git-remote-hg" - bin.env_script_all_files(libexec, :PYTHONPATH => prefix) - end - - test do - system "git", "clone", "hg::https://www.mercurial-scm.org/repo/hello" - assert_predicate testpath/"hello/hello.c", :exist?, - "hello.c not found in cloned repo" - end -end diff --git a/Formula/git-cola.rb b/Formula/git-cola.rb deleted file mode 100644 index e02b21925e7d0..0000000000000 --- a/Formula/git-cola.rb +++ /dev/null @@ -1,32 +0,0 @@ -class GitCola < Formula - desc "Highly caffeinated git GUI" - homepage "https://git-cola.github.io/" - url "https://github.com/git-cola/git-cola/archive/v3.7.tar.gz" - sha256 "9a1427b05c107ec8337881ed68bb450ac040a08880f91dcb770588f755d6fd1b" - license "GPL-2.0" - head "https://github.com/git-cola/git-cola.git" - - bottle do - cellar :any_skip_relocation - sha256 "b2ec181177165465c80e97a10e54ea4c2f60820b34107a6fca346408865319c6" => :catalina - sha256 "b2ec181177165465c80e97a10e54ea4c2f60820b34107a6fca346408865319c6" => :mojave - sha256 "b2ec181177165465c80e97a10e54ea4c2f60820b34107a6fca346408865319c6" => :high_sierra - end - - depends_on "sphinx-doc" => :build - depends_on "pyqt" - depends_on "python@3.8" - - uses_from_macos "rsync" - - def install - ENV.delete("PYTHONPATH") - system "make", "PYTHON=#{Formula["python@3.8"].opt_bin}/python3", "prefix=#{prefix}", "install" - system "make", "install-doc", "PYTHON=#{Formula["python@3.8"].opt_bin}/python3}", "prefix=#{prefix}", - "SPHINXBUILD=#{Formula["sphinx-doc"].opt_bin}/sphinx-build" - end - - test do - system "#{bin}/git-cola", "--version" - end -end diff --git a/Formula/git-credential-manager.rb b/Formula/git-credential-manager.rb deleted file mode 100644 index 68a4d406f88f3..0000000000000 --- a/Formula/git-credential-manager.rb +++ /dev/null @@ -1,23 +0,0 @@ -class GitCredentialManager < Formula - desc "Stores Git credentials for Visual Studio Team Services" - homepage "https://docs.microsoft.com/vsts/git/set-up-credential-managers" - url "https://github.com/Microsoft/Git-Credential-Manager-for-Mac-and-Linux/releases/download/git-credential-manager-2.0.4/git-credential-manager-2.0.4.jar" - sha256 "fb8536aac9b00cdf6bdeb0dd152bb1306d88cd3fdb7a958ac9a144bf4017cad7" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "git-credential-manager-#{version}.jar" - (bin/"git-credential-manager").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/git-credential-manager-#{version}.jar" "$@" - EOS - end - - test do - system "#{bin}/git-credential-manager", "version" - end -end diff --git a/Formula/git-crypt.rb b/Formula/git-crypt.rb deleted file mode 100644 index 577932e9242c8..0000000000000 --- a/Formula/git-crypt.rb +++ /dev/null @@ -1,26 +0,0 @@ -class GitCrypt < Formula - desc "Enable transparent encryption/decryption of files in a git repo" - homepage "https://www.agwa.name/projects/git-crypt/" - url "https://www.agwa.name/projects/git-crypt/downloads/git-crypt-0.6.0.tar.gz" - sha256 "6d30fcd99442d50f4b3c8d554067ff1d980cdf9f3120ee774131172dba98fd6f" - revision 1 - - bottle do - cellar :any - sha256 "f38bb645c3eff62cfb43802199370d85e4785fcf10c063e4d7453e032788bcba" => :catalina - sha256 "89d2058a4dd5afc565696707c8e93621fd644f9ab303fe378727ae999783d156" => :mojave - sha256 "0d2cf3c93ab2ca4059163f8da8a3ab845b566b13debf5e1b43a734dc86138a18" => :high_sierra - sha256 "6b2c2773e5c327282d461f5d49600928ae97d432e5f4d8b7acfcaaa6e6d1ef68" => :sierra - end - - depends_on "openssl@1.1" - - def install - system "make" - bin.install "git-crypt" - end - - test do - system "#{bin}/git-crypt", "keygen", "keyfile" - end -end diff --git a/Formula/git-delta.rb b/Formula/git-delta.rb deleted file mode 100644 index e31742a7e4f49..0000000000000 --- a/Formula/git-delta.rb +++ /dev/null @@ -1,29 +0,0 @@ -class GitDelta < Formula - desc "Syntax-highlighting pager for git and diff output" - homepage "https://github.com/dandavison/delta" - url "https://github.com/dandavison/delta/archive/0.2.0.tar.gz" - sha256 "c093d40e7a069572fc31407a39dcb6a77094acb5b52518691de6f8f0c21530de" - license "MIT" - head "https://github.com/dandavison/delta.git" - - bottle do - cellar :any_skip_relocation - sha256 "a684e673f61fdf4e6e5c45b55e5157c8767c524171bc77fa58e6c6a36354ef4c" => :catalina - sha256 "57c269e6376350be8c706bdd2dcb497c63786ecbef75edcda944d4f7728223f2" => :mojave - sha256 "9de66aecca7e14b8f74d22d9778559006c1a7d8d1dcb39cbd456060d95d32d20" => :high_sierra - end - - depends_on "rust" => :build - uses_from_macos "llvm" - - conflicts_with "delta", :because => "both install a `delta` binary" - - def install - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - system "cargo", "install", *std_cargo_args - end - - test do - assert_match "delta #{version}", `#{bin}/delta --version`.chomp - end -end diff --git a/Formula/git-extras.rb b/Formula/git-extras.rb deleted file mode 100644 index 506dd6c7c9c07..0000000000000 --- a/Formula/git-extras.rb +++ /dev/null @@ -1,36 +0,0 @@ -class GitExtras < Formula - desc "Small git utilities" - homepage "https://github.com/tj/git-extras" - url "https://github.com/tj/git-extras/archive/6.0.0.tar.gz" - sha256 "a823c12e4bf74e2f07ee80e597500e5f5120dcd8fa345e67e2c03544fd706ffe" - license "MIT" - head "https://github.com/tj/git-extras.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "6bec6d92d79cabaac6e99d15c8bf1542cf97dcb190b7e77ad4eaa8e381cff055" => :catalina - sha256 "6bec6d92d79cabaac6e99d15c8bf1542cf97dcb190b7e77ad4eaa8e381cff055" => :mojave - sha256 "6bec6d92d79cabaac6e99d15c8bf1542cf97dcb190b7e77ad4eaa8e381cff055" => :high_sierra - end - - conflicts_with "git-utils", - :because => "both install a `git-pull-request` script" - - def install - system "make", "PREFIX=#{prefix}", "INSTALL_VIA=brew", "install" - pkgshare.install "etc/git-extras-completion.zsh" - end - - def caveats - <<~EOS - To load Zsh completions, add the following to your .zshrc: - source #{opt_pkgshare}/git-extras-completion.zsh - EOS - end - - test do - system "git", "init" - assert_match(/#{testpath}/, shell_output("#{bin}/git-root")) - end -end diff --git a/Formula/git-filter-repo.rb b/Formula/git-filter-repo.rb deleted file mode 100644 index a3a8fcc93d6e6..0000000000000 --- a/Formula/git-filter-repo.rb +++ /dev/null @@ -1,41 +0,0 @@ -class GitFilterRepo < Formula - include Language::Python::Shebang - - desc "Quickly rewrite git repository history" - homepage "https://github.com/newren/git-filter-repo" - url "https://github.com/newren/git-filter-repo/releases/download/v2.27.1/git-filter-repo-2.27.1.tar.xz" - sha256 "48d0bf96c1b0fdf56bf25bf1cef488f4ec1e872ebf0dddc27fd4f91c8615231f" - - bottle :unneeded - - # ignore git dependency audit: - # * Don't use git as a dependency (it's always available) - # But we require Git 2.22.0+ - # https://github.com/Homebrew/homebrew-core/pull/46550#issuecomment-563229479 - depends_on "git" - depends_on "python@3.8" - - def install - rewrite_shebang detected_python_shebang, "git-filter-repo" - bin.install "git-filter-repo" - man1.install "Documentation/man1/git-filter-repo.1" - end - - test do - system "#{bin}/git-filter-repo", "--version" - - system "git", "init" - system "git", "config", "user.name", "BrewTestBot" - system "git", "config", "user.email", "BrewTestBot@example.com" - - touch "foo" - system "git", "add", "foo" - system "git", "commit", "-m", "foo" - # Use --force to accept non-fresh clone run: - # Aborting: Refusing to overwrite repo history since this does not look like a fresh clone. - # (expected freshly packed repo) - system "#{bin}/git-filter-repo", "--path-rename=foo:bar", "--force" - - assert_predicate testpath/"bar", :exist? - end -end diff --git a/Formula/git-fixup.rb b/Formula/git-fixup.rb deleted file mode 100644 index cec0346c3c0f3..0000000000000 --- a/Formula/git-fixup.rb +++ /dev/null @@ -1,32 +0,0 @@ -class GitFixup < Formula - desc "Alias for git commit --fixup " - homepage "https://github.com/keis/git-fixup" - url "https://github.com/keis/git-fixup/archive/v1.3.0.tar.gz" - sha256 "29665151f82cac5f5807b8241392150e7c8ee8024ce37f23752c23c134516d57" - license "ISC" - head "https://github.com/keis/git-fixup.git", :branch => "master" - - bottle :unneeded - - def install - system "make", "PREFIX=#{prefix}", "install" - zsh_completion.install "completion.zsh" => "_git-fixup" - end - - test do - (testpath/".gitconfig").write <<~EOS - [user] - name = Real Person - email = notacat@hotmail.cat - EOS - system "git", "init" - (testpath/"test").write "foo" - system "git", "add", "test" - system "git", "commit", "--message", "Initial commit" - - (testpath/"test").delete - (testpath/"test").write "bar" - system "git", "add", "test" - system "git", "fixup" - end -end diff --git a/Formula/git-flow-avh.rb b/Formula/git-flow-avh.rb deleted file mode 100644 index 2cdc5756ebc5b..0000000000000 --- a/Formula/git-flow-avh.rb +++ /dev/null @@ -1,56 +0,0 @@ -class GitFlowAvh < Formula - desc "AVH edition of git-flow" - homepage "https://github.com/petervanderdoes/gitflow-avh" - - stable do - url "https://github.com/petervanderdoes/gitflow-avh/archive/1.12.3.tar.gz" - sha256 "54e9fd81aa1aa8215c865503dc6377da205653c784d6c97baad3dafd20728e06" - - resource "completion" do - url "https://github.com/petervanderdoes/git-flow-completion/archive/0.6.0.tar.gz" - sha256 "b1b78b785aa2c06f81cc29fcf03a7dfc451ad482de67ca0d89cdb0f941f5594b" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "d9d8011ee6b4167e321077e44c0e99485a80f8bc1f294390495231c392d1bbba" => :catalina - sha256 "945e9ba05a169b32c86f5bd347542e803625791cf9a4b50a4a42fafb5e0b9c85" => :mojave - sha256 "945e9ba05a169b32c86f5bd347542e803625791cf9a4b50a4a42fafb5e0b9c85" => :high_sierra - sha256 "0e68b196dd24d9d41f9b0c5545d115c9ca8327dd799facbed2e619f8ceea221b" => :sierra - end - - head do - url "https://github.com/petervanderdoes/gitflow-avh.git", :branch => "develop" - - resource "completion" do - url "https://github.com/petervanderdoes/git-flow-completion.git", :branch => "develop" - end - end - - depends_on "gnu-getopt" - - conflicts_with "git-flow", :because => "both install `git-flow` binaries and completions" - - def install - system "make", "prefix=#{libexec}", "install" - (bin/"git-flow").write <<~EOS - #!/bin/bash - export FLAGS_GETOPT_CMD=#{Formula["gnu-getopt"].opt_bin}/getopt - exec "#{libexec}/bin/git-flow" "$@" - EOS - - resource("completion").stage do - bash_completion.install "git-flow-completion.bash" - zsh_completion.install "git-flow-completion.zsh" - fish_completion.install "git.fish" - end - end - - test do - system "git", "init" - system "#{bin}/git-flow", "init", "-d" - system "#{bin}/git-flow", "config" - assert_equal "develop", shell_output("git symbolic-ref --short HEAD").chomp - end -end diff --git a/Formula/git-flow.rb b/Formula/git-flow.rb deleted file mode 100644 index 83fe364fecfcf..0000000000000 --- a/Formula/git-flow.rb +++ /dev/null @@ -1,52 +0,0 @@ -class GitFlow < Formula - desc "Extensions to follow Vincent Driessen's branching model" - homepage "https://github.com/nvie/gitflow" - - stable do - # Use the tag instead of the tarball to get submodules - url "https://github.com/nvie/gitflow.git", - :tag => "0.4.1", - :revision => "1ffb6b1091f05466d3cd27f2da9c532a38586ed5" - - resource "completion" do - url "https://github.com/bobthecow/git-flow-completion/archive/0.4.2.2.tar.gz" - sha256 "1e82d039596c0e73bfc8c59d945ded34e4fce777d9b9bb45c3586ee539048ab9" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "8ea12cd7e2666fb6fdfaffaeb3a0437037a40cde559a835fc9de038f36a424dc" => :catalina - sha256 "ab455769b6b8122e1d345f56d799fe43445bbbeba6265892715167388c737af9" => :mojave - sha256 "ce4b64f4d13f4a5a8e05c9087627b42cd328c8accc8349c4ca256238d1d3fecc" => :high_sierra - sha256 "acb9a2690fa86925600fa6e67e38731ef05f7f5d6ccfceb9c5175286c1081fe0" => :sierra - sha256 "56826b30d91ffb54829f4792f88c673b1c3e748aa662bef5806e4a6f5d0ee015" => :el_capitan - sha256 "a5e97d4d5c082194b36c18e7b051c43b2d5b37366b2ac56c5ea9407f6315685b" => :yosemite - sha256 "8e931605a0d12cffa282db7244e0041cc14f8a7692e184a6bc1975800be2dac0" => :mavericks - end - - head do - url "https://github.com/nvie/gitflow.git", :branch => "develop" - - resource "completion" do - url "https://github.com/bobthecow/git-flow-completion.git", :branch => "develop" - end - end - - conflicts_with "git-flow-avh", :because => "both install `git-flow` binaries and completions" - - def install - system "make", "prefix=#{libexec}", "install" - bin.write_exec_script libexec/"bin/git-flow" - - resource("completion").stage do - bash_completion.install "git-flow-completion.bash" - zsh_completion.install "git-flow-completion.zsh" - end - end - - test do - system "git", "flow", "init", "-d" - assert_equal "develop", shell_output("git rev-parse --abbrev-ref HEAD").strip - end -end diff --git a/Formula/git-fresh.rb b/Formula/git-fresh.rb deleted file mode 100644 index 7d89fe20051f6..0000000000000 --- a/Formula/git-fresh.rb +++ /dev/null @@ -1,18 +0,0 @@ -class GitFresh < Formula - desc "Utility to keep git repos fresh" - homepage "https://github.com/imsky/git-fresh" - url "https://github.com/imsky/git-fresh/archive/v1.12.1.tar.gz" - sha256 "48be2629113ba77a2a6d8fd478b7186f7237669e9495e768b9d3133704c49dde" - license "MIT" - - bottle :unneeded - - def install - system "./install.sh", bin - man1.install "git-fresh.1" - end - - test do - system "#{bin}/git-fresh", "-T" - end -end diff --git a/Formula/git-ftp.rb b/Formula/git-ftp.rb deleted file mode 100644 index be1ed74e6ebd2..0000000000000 --- a/Formula/git-ftp.rb +++ /dev/null @@ -1,55 +0,0 @@ -class GitFtp < Formula - desc "Git-powered FTP client" - homepage "https://git-ftp.github.io/" - url "https://github.com/git-ftp/git-ftp/archive/1.6.0.tar.gz" - sha256 "088b58d66c420e5eddc51327caec8dcbe8bddae557c308aa739231ed0490db01" - license "GPL-3.0" - head "https://github.com/git-ftp/git-ftp.git", :branch => "develop" - - bottle do - cellar :any - sha256 "0a61ca11e69370dfecfd3c82d6d03aeec377bf9db660658403556ea71b84bae0" => :catalina - sha256 "f878c4015697794bb8b2c3f034a167b750d3871c0d320d903536128f01880ca2" => :mojave - sha256 "63c8b94fd89eb635d8c2056efdf933de45dca7fdb04793b620750f8b338fbb88" => :high_sierra - end - - depends_on "pandoc" => :build - depends_on "libssh2" - - uses_from_macos "zlib" - - resource "curl" do - url "https://curl.haxx.se/download/curl-7.69.0.tar.bz2" - mirror "https://curl.askapache.com/download/curl-7.69.0.tar.bz2" - sha256 "668d451108a7316cff040b23c79bc766e7ed84122074e44f662b8982f2e76739" - end - - def install - resource("curl").stage do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{libexec}", - "--disable-ares", - "--with-darwinssl", - "--with-libssh2", - "--without-brotli", - "--without-ca-bundle", - "--without-ca-path", - "--without-gssapi", - "--without-libmetalink", - "--without-librtmp" - system "make", "install" - end - - system "make", "prefix=#{prefix}", "install" - system "make", "-C", "man", "man" - man1.install "man/git-ftp.1" - (libexec/"bin").install bin/"git-ftp" - (bin/"git-ftp").write_env_script(libexec/"bin/git-ftp", :PATH => "#{libexec}/bin:$PATH") - end - - test do - system bin/"git-ftp", "--help" - end -end diff --git a/Formula/git-game.rb b/Formula/git-game.rb deleted file mode 100644 index 5ad54340c5689..0000000000000 --- a/Formula/git-game.rb +++ /dev/null @@ -1,17 +0,0 @@ -class GitGame < Formula - desc "Game for git to guess who made which commit" - homepage "https://github.com/jsomers/git-game" - url "https://github.com/jsomers/git-game/archive/1.2.tar.gz" - sha256 "d893b2c813388754c16d867cf37726cd7e73c9ccd316735aac43bf1cd3ab1412" - license "MIT" - - bottle :unneeded - - def install - bin.install "git-game" - end - - test do - system "git", "game", "help" - end -end diff --git a/Formula/git-gerrit.rb b/Formula/git-gerrit.rb deleted file mode 100644 index 51f7795671b53..0000000000000 --- a/Formula/git-gerrit.rb +++ /dev/null @@ -1,19 +0,0 @@ -class GitGerrit < Formula - desc "Gerrit code review helper scripts" - homepage "https://github.com/fbzhong/git-gerrit" - url "https://github.com/fbzhong/git-gerrit/archive/v0.3.0.tar.gz" - sha256 "433185315db3367fef82a7332c335c1c5e0b05dabf8d4fbeff9ecf6cc7e422eb" - head "https://github.com/fbzhong/git-gerrit.git" - - bottle :unneeded - - def install - prefix.install "bin" - bash_completion.install "completion/git-gerrit-completion.bash" - end - - test do - system "git", "init" - system "git", "gerrit", "help" - end -end diff --git a/Formula/git-gui.rb b/Formula/git-gui.rb deleted file mode 100644 index 981321d434f87..0000000000000 --- a/Formula/git-gui.rb +++ /dev/null @@ -1,45 +0,0 @@ -class GitGui < Formula - desc "Tcl/Tk UI for the git revision control system" - homepage "https://git-scm.com/" - # Note: Please keep these values in sync with git.rb when updating. - url "https://www.kernel.org/pub/software/scm/git/git-2.27.0.tar.xz" - sha256 "73ca9774d7fa226e1d87c1909401623f96dca6a044e583b9a762e84d7d1a73f9" - head "https://github.com/git/git.git", :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "9f8ccbd87f6c1e3328134e6ae400d763133165f2c0797047afd58c904fc7dcf8" => :catalina - sha256 "9f8ccbd87f6c1e3328134e6ae400d763133165f2c0797047afd58c904fc7dcf8" => :mojave - sha256 "9f8ccbd87f6c1e3328134e6ae400d763133165f2c0797047afd58c904fc7dcf8" => :high_sierra - end - - depends_on "tcl-tk" - - def install - # build verbosely - ENV["V"] = "1" - - # By setting TKFRAMEWORK to a non-existent directory we ensure that - # the git makefiles don't install a .app for git-gui - # We also tell git to use the homebrew-installed wish binary from tcl-tk. - # See https://github.com/Homebrew/homebrew-core/issues/36390 - tcl_bin = Formula["tcl-tk"].opt_bin - args = %W[ - TKFRAMEWORK=/dev/null - prefix=#{prefix} - gitexecdir=#{bin} - sysconfdir=#{etc} - CC=#{ENV.cc} - CFLAGS=#{ENV.cflags} - LDFLAGS=#{ENV.ldflags} - TCL_PATH=#{tcl_bin}/tclsh - TCLTK_PATH=#{tcl_bin}/wish - ] - system "make", "-C", "git-gui", "install", *args - system "make", "-C", "gitk-git", "install", *args - end - - test do - system bin/"git-gui", "--version" - end -end diff --git a/Formula/git-hooks.rb b/Formula/git-hooks.rb deleted file mode 100644 index 1ed1fa79c8da2..0000000000000 --- a/Formula/git-hooks.rb +++ /dev/null @@ -1,35 +0,0 @@ -class GitHooks < Formula - desc "Manage project, user, and global Git hooks" - homepage "https://github.com/icefox/git-hooks" - url "https://github.com/icefox/git-hooks/archive/1.00.0.tar.gz" - sha256 "8197ca1de975ff1f795a2b9cfcac1a6f7ee24276750c757eecf3bcb49b74808e" - head "https://github.com/icefox/git-hooks.git" - - # The icefox/git-hooks repository has been deleted and it doesn't appear to - # have moved to an alternative location. There is a rewrite in Go by a - # different author which someone may want to work into a new formula as a - # replacement: https://github.com/git-hooks/git-hooks - deprecate! - - bottle do - cellar :any_skip_relocation - sha256 "d33514436cb623e468314418876fe1e7bb8c31ee64fdcd3c9a297f26a7e7ae42" => :catalina - sha256 "a66bf94650a35829721b07c4f6a497154c9e667917ea8c28418b870c0de15697" => :mojave - sha256 "710495206af282348fa5e311f825bdbbcb7a891345ff467468908e16b3dbc090" => :high_sierra - sha256 "aaceeb7b390f71c45e3c1db15c23ab664a06bfc34de1c629a2b2f5b29e1bdec2" => :sierra - sha256 "bdfffb820e5a7574169b91113ed59c578ebe88bcea8c890166a33fb9af17c0ce" => :el_capitan - sha256 "d4c5fba7f1b80e8e68762356a2f64ac216bf4e9f3151cf2f236c92a9524b97ed" => :yosemite - sha256 "ace6acaff04ef09795d26e6034bf411a89c9f348287dd95f756c82068cea123d" => :mavericks - end - - def install - bin.install "git-hooks" - (etc/"git-hooks").install "contrib" - end - - test do - system "git", "init" - output = shell_output("git hooks").strip - assert_match "Listing User, Project, and Global hooks", output - end -end diff --git a/Formula/git-if.rb b/Formula/git-if.rb deleted file mode 100644 index f9e4979762f78..0000000000000 --- a/Formula/git-if.rb +++ /dev/null @@ -1,36 +0,0 @@ -class GitIf < Formula - desc "Glulx interpreter that is optimized for speed" - homepage "https://ifarchive.org/indexes/if-archiveXprogrammingXglulxXinterpretersXgit.html" - url "https://ifarchive.org/if-archive/programming/glulx/interpreters/git/git-135.zip" - version "1.3.5" - sha256 "4bdfae2e1ab085740efddf99d43ded6a044f1f2df274f753737e5f0e402fc4e9" - head "https://github.com/DavidKinder/Git.git" - - bottle do - cellar :any_skip_relocation - sha256 "f87fdd2951218631adc744bc2c9f1d83f3230bc49256f45735fc2d611f49dcc8" => :catalina - sha256 "37dc94c423003dedaf313ffa9343879ecb5d72f277a2f250100481cde240420e" => :mojave - sha256 "bedbf580c8b073c7dfcd6bbb470aee7c14fb31d2c3ec54b4be8fd2cf8545e577" => :high_sierra - sha256 "7c09116244a4c04a46337a0453d519523204233fc33d2d60c89c4b9469498380" => :sierra - sha256 "c38c41e66ca16a1ef9627112980fa49411b870c2438086db35f6dd9053f99850" => :el_capitan - sha256 "e727f112e350e8a12b87094715800e9c2abc03f2d45ad521c0d78e4c6bfff3ad" => :yosemite - end - - depends_on "glktermw" => :build - - def install - glk = Formula["glktermw"] - - inreplace "Makefile", "GLK = cheapglk", "GLK = #{glk.name}" - inreplace "Makefile", "GLKINCLUDEDIR = ../$(GLK)", "GLKINCLUDEDIR = #{glk.include}" - inreplace "Makefile", "GLKLIBDIR = ../$(GLK)", "GLKLIBDIR = #{glk.lib}" - inreplace "Makefile", /^OPTIONS = /, "OPTIONS = -DUSE_MMAP -DUSE_INLINE" - - system "make" - bin.install "git" => "git-if" - end - - test do - assert pipe_output("#{bin}/git-if -v").start_with? "GlkTerm, library version" - end -end diff --git a/Formula/git-imerge.rb b/Formula/git-imerge.rb deleted file mode 100644 index b7d106cb11e92..0000000000000 --- a/Formula/git-imerge.rb +++ /dev/null @@ -1,27 +0,0 @@ -class GitImerge < Formula - desc "Incremental merge for git" - homepage "https://github.com/mhagger/git-imerge" - url "https://github.com/mhagger/git-imerge/archive/v1.1.0.tar.gz" - sha256 "62692f43591cc7d861689c60b68c55d7b10c7a201c1026096a7efc771df2ca28" - license "GPL-2.0" - head "https://github.com/mhagger/git-imerge.git" - - bottle do - cellar :any_skip_relocation - sha256 "18c1258aaf3bf4614044a508f4e9189ea2a4c751bafb3885f36147662010a435" => :catalina - sha256 "5abf5b539420bb46a8ab7b10e43126b3719e2ebc6e0a37fc18434027ed816995" => :mojave - sha256 "76aee24eeb5e7615e4cfbd7aaf3aacac8d8729dfcee79d8542a84cbd9b663459" => :high_sierra - sha256 "76aee24eeb5e7615e4cfbd7aaf3aacac8d8729dfcee79d8542a84cbd9b663459" => :sierra - sha256 "76aee24eeb5e7615e4cfbd7aaf3aacac8d8729dfcee79d8542a84cbd9b663459" => :el_capitan - end - - def install - bin.mkpath - # Work around Makefile insisting to write to $(DESTDIR)/etc/bash_completion.d - system "make", "install", "DESTDIR=#{prefix}", "PREFIX=" - end - - test do - system bin/"git-imerge", "-h" - end -end diff --git a/Formula/git-integration.rb b/Formula/git-integration.rb deleted file mode 100644 index 0c72f42a27bcf..0000000000000 --- a/Formula/git-integration.rb +++ /dev/null @@ -1,37 +0,0 @@ -class GitIntegration < Formula - desc "Manage git integration branches" - homepage "https://johnkeeping.github.io/git-integration/" - url "https://github.com/johnkeeping/git-integration/archive/v0.4.tar.gz" - sha256 "b0259e90dca29c71f6afec4bfdea41fe9c08825e740ce18409cfdbd34289cc02" - license "GPL-2.0" - head "https://github.com/johnkeeping/git-integration.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "fb8287c4f092454a224bcc948821610f64b790d14e8befe4db9f3d441e2caab3" => :catalina - sha256 "96f0e7501667f2951628535f307efe672aa51daeb8af2509e0f04d06eb22b0e6" => :mojave - sha256 "30757baa47338aaa0e43240237d1dfefc1b59e397b55f36d5b7176ca978d7698" => :high_sierra - sha256 "30757baa47338aaa0e43240237d1dfefc1b59e397b55f36d5b7176ca978d7698" => :sierra - end - - def install - (buildpath/"config.mak").write "prefix = #{prefix}" - system "make", "install" - system "make", "install-completion" - end - - test do - system "git", "init" - system "git", "commit", "--allow-empty", "-m", "An initial commit" - system "git", "checkout", "-b", "branch-a", "master" - system "git", "commit", "--allow-empty", "-m", "A commit on branch-a" - system "git", "checkout", "-b", "branch-b", "master" - system "git", "commit", "--allow-empty", "-m", "A commit on branch-b" - system "git", "checkout", "master" - system "git", "integration", "--create", "integration" - system "git", "integration", "--add", "branch-a" - system "git", "integration", "--add", "branch-b" - system "git", "integration", "--rebuild" - end -end diff --git a/Formula/git-interactive-rebase-tool.rb b/Formula/git-interactive-rebase-tool.rb deleted file mode 100644 index 8680a46e27046..0000000000000 --- a/Formula/git-interactive-rebase-tool.rb +++ /dev/null @@ -1,61 +0,0 @@ -class GitInteractiveRebaseTool < Formula - desc "Native sequence editor for Git interactive rebase" - homepage "https://gitrebasetool.mitmaro.ca/" - url "https://github.com/MitMaro/git-interactive-rebase-tool/archive/1.2.1.tar.gz" - sha256 "8df32f209d481580c3365a065882e40343ecc42d9e4ed593838092bb6746a197" - - bottle do - cellar :any_skip_relocation - sha256 "ab2feae40a1c22695f88383fc0d25bd1ce90499cf74004719fbaf7540a673f09" => :catalina - sha256 "50a7e6d5e3b6e0cdb75f9dd83fde8c9d473a632c8f22f575591fe4b5469a19bf" => :mojave - sha256 "530ae677663e9773d05a17878a1e28e91e8751d9b9ac8cffdb0acaad7a7d1e8b" => :high_sierra - end - - depends_on "rust" => :build - - uses_from_macos "ncurses" - uses_from_macos "zlib" - - def install - system "cargo", "install", *std_cargo_args - end - - test do - require "pty" # required for interactivity - mkdir testpath/"repo" do - system "git", "init" - touch "FILE1" - system "git", "add", "FILE1" - system "git", "commit", "--date='2005-04-07T22:13:13-3:30'", - "--author='Test '", - "--message='File 1'" - touch "FILE2" - system "git", "add", "FILE2" - system "git", "commit", "--date='2005-04-07T22:13:13-3:30'", - "--author='Test '", - "--message='File 2'" - end - - (testpath/"repo/.git/rebase-merge/git-rebase-todo").write <<~EOS - pick be5eaa0 File 1 - pick 32bd1bb File 2 - EOS - - expected_git_rebase_todo = <<~EOS - drop be5eaa0 File 1 - pick 32bd1bb File 2 - EOS - - env = { "GIT_DIR" => testpath/"repo/.git/" } - executable = bin/"interactive-rebase-tool" - file = testpath/"repo/.git/rebase-merge/git-rebase-todo" - PTY.spawn(env, executable, file) do |stdout, stdin, _pid| - # simulate user input - stdin.putc "d" - stdin.putc "W" - stdout.read - end - - assert_equal expected_git_rebase_todo, (testpath/"repo/.git/rebase-merge/git-rebase-todo").read - end -end diff --git a/Formula/git-lfs.rb b/Formula/git-lfs.rb deleted file mode 100644 index c6726b3f82a6f..0000000000000 --- a/Formula/git-lfs.rb +++ /dev/null @@ -1,54 +0,0 @@ -class GitLfs < Formula - desc "Git extension for versioning large files" - homepage "https://github.com/git-lfs/git-lfs" - url "https://github.com/git-lfs/git-lfs/releases/download/v2.11.0/git-lfs-v2.11.0.tar.gz" - sha256 "8183c4cbef8cf9c2e86b0c0a9822451e2df272f89ceb357c498bfdf0ff1b36c7" - - bottle do - cellar :any_skip_relocation - sha256 "351d2d6cb168249b9b7b0d55628574126b9787eab1441861dfd324b952057651" => :catalina - sha256 "adbf311076f64920e0f621640d251e6ef44ad8fc9022f287118be5644c4095d4" => :mojave - sha256 "0c231fb0f6edab306f9b58f08fb8c075860f688d6efe4190b6377c661e36d18c" => :high_sierra - end - - depends_on "go" => :build - depends_on "ruby" => :build - - def install - ENV["GIT_LFS_SHA"] = "" - ENV["VERSION"] = version - - (buildpath/"src/github.com/git-lfs/git-lfs").install buildpath.children - cd "src/github.com/git-lfs/git-lfs" do - ENV["GEM_HOME"] = ".gem_home" - system "gem", "install", "ronn" - - system "make", "vendor" - system "make" - system "make", "man", "RONN=.gem_home/bin/ronn" - - bin.install "bin/git-lfs" - man1.install Dir["man/*.1"] - man5.install Dir["man/*.5"] - doc.install Dir["man/*.html"] - end - end - - def caveats - <<~EOS - Update your git config to finish installation: - - # Update global git config - $ git lfs install - - # Update system git config - $ git lfs install --system - EOS - end - - test do - system "git", "init" - system "git", "lfs", "track", "test" - assert_match(/^test filter=lfs/, File.read(".gitattributes")) - end -end diff --git a/Formula/git-multipush.rb b/Formula/git-multipush.rb deleted file mode 100644 index 85ad59dbe19d6..0000000000000 --- a/Formula/git-multipush.rb +++ /dev/null @@ -1,31 +0,0 @@ -class GitMultipush < Formula - desc "Push a branch to multiple remotes in one command" - homepage "https://github.com/gavinbeatty/git-multipush" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/git-multipush/git-multipush-2.3.tar.bz2" - sha256 "1f3b51e84310673045c3240048b44dd415a8a70568f365b6b48e7970afdafb67" - head "https://github.com/gavinbeatty/git-multipush.git" - - bottle do - cellar :any_skip_relocation - sha256 "b9de9b128791d8c416076ed738016ffe534ce85bacddf297ab9ce13954dcaff6" => :catalina - sha256 "8f4c2e7a1aee0db75154c4b21aee1a4bd398a9b889f119e7b86a06b1533b9304" => :mojave - sha256 "edd99d5ec177bccf061f7424aa595a5515fa5728aec649594f42964cec1f371e" => :high_sierra - sha256 "81d0a4bc4808ab5a31b043640c2ec861cbe6a5fead1a76eda0ffa7bff8ae6158" => :sierra - sha256 "dab6c9480077541aff39c6ba5b27a91bbc557faedd713178e9f6e8ea7daa5371" => :el_capitan - sha256 "83355d6549e7cf7d4a9d037cc44895487bb97019e5b810b42266af458302ce7d" => :yosemite - sha256 "cc6bb7672b79860ae50c06633c28913b5fadb25e2815c5b3e432d4039746f16c" => :mavericks - end - - depends_on "asciidoc" => :build - - def install - system "make" if build.head? - system "make", "prefix=#{prefix}", "install" - end - - test do - # git-multipush will error even on --version if not in a repo - system "git", "init" - assert_match version.to_s, shell_output("#{bin}/git-multipush --version") - end -end diff --git a/Formula/git-now.rb b/Formula/git-now.rb deleted file mode 100644 index 11a7b1ce9bf96..0000000000000 --- a/Formula/git-now.rb +++ /dev/null @@ -1,46 +0,0 @@ -class GitNow < Formula - desc "Light, temporary commits for git" - homepage "https://github.com/iwata/git-now" - url "https://github.com/iwata/git-now.git", - :tag => "v0.1.1.0", - :revision => "a07a05893b9ddf784833b3d4b410c843633d0f71" - license "GPL-2.0" - head "https://github.com/iwata/git-now.git" - - bottle do - cellar :any_skip_relocation - sha256 "5e1c1c1575d8fe84137bfc93b688babf32b59935f0a312c9d5ad844b8ab651e9" => :catalina - sha256 "4bef5c0beb701451614ec9a8e961940ce3caa50e09b8a7faf1b80dad10dace75" => :mojave - sha256 "ad78d8ab5cf008375bdeb03f0b1289733fba33fac43535f38117e5d8af50f06b" => :high_sierra - sha256 "ffde5161accdd2bab777e610302f858e1bf9e17f0ee1a41fb4e7b33a0d9f5eb4" => :sierra - sha256 "7126e867e543659b9750041412e737407fb94f9dbb38fea1edf16cec8027aa64" => :el_capitan - sha256 "748cd8691ad94b407f892ffa7f8e12c183b7326208efd9ac6dafbe1b8fda9565" => :yosemite - sha256 "c19eda078da8974bde40ee07eac5701e9295d56bd59a6d18ea21c3d337b50e02" => :mavericks - end - - depends_on "gnu-getopt" - - def install - system "make", "prefix=#{libexec}", "install" - - (bin/"git-now").write <<~EOS - #!/bin/sh - PATH=#{Formula["gnu-getopt"].opt_bin}:$PATH #{libexec}/bin/git-now "$@" - EOS - - zsh_completion.install "etc/_git-now" - end - - test do - (testpath/".gitconfig").write <<~EOS - [user] - name = Real Person - email = notacat@hotmail.cat - EOS - touch "file1" - system "git", "init" - system "git", "add", "file1" - system bin/"git-now" - assert_match "from now", shell_output("git log -1") - end -end diff --git a/Formula/git-number.rb b/Formula/git-number.rb deleted file mode 100644 index f56e1f3fb0de7..0000000000000 --- a/Formula/git-number.rb +++ /dev/null @@ -1,24 +0,0 @@ -class GitNumber < Formula - desc "Use numbers for dealing with files in git" - homepage "https://github.com/holygeek/git-number" - url "https://github.com/holygeek/git-number/archive/1.0.1.tar.gz" - sha256 "1b9e691bd2c16321a8b83b65f2393af1707ece77e05dab73b14b04f51e9f9a56" - - bottle do - cellar :any_skip_relocation - sha256 "662840b36a99f95902aee618faed6274d2cf9c6620b9c01855377d85d838eaad" => :catalina - sha256 "2fc24b4bb5404f85fb6c359ac9b8c969846953176d8a01176c4e6ddba3067bc9" => :mojave - sha256 "d71548120a8d5d9db4b9b9ae71be947303c6a415e35380d0d8e36551765b827f" => :high_sierra - sha256 "d71548120a8d5d9db4b9b9ae71be947303c6a415e35380d0d8e36551765b827f" => :sierra - sha256 "d71548120a8d5d9db4b9b9ae71be947303c6a415e35380d0d8e36551765b827f" => :el_capitan - end - - def install - system "make", "test" - system "make", "prefix=#{prefix}", "install" - end - - test do - system "#{bin}/git-number", "-v" - end -end diff --git a/Formula/git-octopus.rb b/Formula/git-octopus.rb deleted file mode 100644 index ecbf4143c7354..0000000000000 --- a/Formula/git-octopus.rb +++ /dev/null @@ -1,37 +0,0 @@ -class GitOctopus < Formula - desc "The continuous merge workflow" - homepage "https://github.com/lesfurets/git-octopus" - url "https://github.com/lesfurets/git-octopus/archive/v1.4.tar.gz" - sha256 "e2800eea829c6fc74da0d3f3fcb3f7d328d1ac8fbb7b2eca8c651c0c903a50c3" - license "LGPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "175dcb36b4098a7c406d15a84cd2cfa856d6df0cfd0cdb3d2a08ff4101dc5249" => :catalina - sha256 "4288690717a7c78406fde14701b2d8c3f7d1d24b27257ceedd02dda4ed81765e" => :mojave - sha256 "67b8b9950133c0ca6f8a0be544bf192136ebad791eea0070becf47ab99eec270" => :high_sierra - sha256 "8d5bd1ae923518cd155c1e1ddf1a31b93d75af241e325087853657adc39eca85" => :sierra - sha256 "8d5bd1ae923518cd155c1e1ddf1a31b93d75af241e325087853657adc39eca85" => :el_capitan - sha256 "8d5bd1ae923518cd155c1e1ddf1a31b93d75af241e325087853657adc39eca85" => :yosemite - end - - def install - system "make", "build" - bin.install "bin/git-octopus", "bin/git-conflict", "bin/git-apply-conflict-resolution" - man1.install "doc/git-octopus.1", "doc/git-conflict.1" - end - - test do - (testpath/".gitconfig").write <<~EOS - [user] - name = Real Person - email = notacat@hotmail.cat - EOS - system "git", "init" - touch "homebrew" - system "git", "add", "." - system "git", "commit", "--message", "brewing" - - assert_equal "", shell_output("#{bin}/git-octopus 2>&1").strip - end -end diff --git a/Formula/git-open.rb b/Formula/git-open.rb deleted file mode 100644 index a6d25b09befb1..0000000000000 --- a/Formula/git-open.rb +++ /dev/null @@ -1,16 +0,0 @@ -class GitOpen < Formula - desc "Open GitHub webpages from a terminal" - homepage "https://github.com/jeffreyiacono/git-open" - url "https://github.com/jeffreyiacono/git-open/archive/v1.3.tar.gz" - sha256 "a1217e9b0a76382a96afd33ecbacad723528ec1116381c22a17cc7458de23701" - - bottle :unneeded - - def install - bin.install "git-open.sh" => "git-open" - end - - test do - system "#{bin}/git-open", "-v" - end -end diff --git a/Formula/git-plus.rb b/Formula/git-plus.rb deleted file mode 100644 index e57c1d45e00a7..0000000000000 --- a/Formula/git-plus.rb +++ /dev/null @@ -1,37 +0,0 @@ -class GitPlus < Formula - include Language::Python::Virtualenv - - desc "Git utilities: git multi, git relation, git old-branches, git recent" - homepage "https://github.com/tkrajina/git-plus" - url "https://files.pythonhosted.org/packages/23/be/892184c18bb8b7ddc8d1931d3b638ec2221ae0725111008b330c7d44dc43/git-plus-v0.4.5.tar.gz" - sha256 "e60d97ceb7472c5f15a7230d14b3e1f4ab050cd5abf574fe9959bcc00fc17285" - license "Apache-2.0" - head "https://github.com/tkrajina/git-plus.git" - - bottle do - cellar :any_skip_relocation - sha256 "bddc068b92e8b64c9e2795eea8f1b52ffe4a69be0374080806157d867f2dee74" => :catalina - sha256 "dd7f413430c9568a6f1d8a1821c672abb0e184b61403c2d3a366399fb23840a3" => :mojave - sha256 "878c9fbdc776717eb21c07767bd67fc0d6ad412a69fbeab7ff12f9795076d8f3" => :high_sierra - end - - depends_on "python@3.8" - - def install - virtualenv_install_with_resources - end - - test do - mkdir "testme" do - system "git", "init" - system "git", "config", "user.email", "\"test@example.com\"" - system "git", "config", "user.name", "\"Test\"" - touch "README" - system "git", "add", "README" - system "git", "commit", "-m", "testing" - rm "README" - end - - assert_match "D README", shell_output("#{bin}/git-multi") - end -end diff --git a/Formula/git-quick-stats.rb b/Formula/git-quick-stats.rb deleted file mode 100644 index 1eb01cde6748c..0000000000000 --- a/Formula/git-quick-stats.rb +++ /dev/null @@ -1,20 +0,0 @@ -class GitQuickStats < Formula - desc "Simple and efficient way to access statistics in git" - homepage "https://github.com/arzzen/git-quick-stats" - url "https://github.com/arzzen/git-quick-stats/archive/2.1.2.tar.gz" - sha256 "0355f4f26ffc349206ee543aa155111d29cfa90ec71252fb7270f22f57eeb828" - license "MIT" - - bottle :unneeded - - def install - bin.install "git-quick-stats" - end - - test do - system "git", "init" - assert_match "All branches (sorted by most recent commit)", - shell_output("#{bin}/git-quick-stats --branches-by-date") - assert_match /^Invalid argument/, shell_output("#{bin}/git-quick-stats command", 1) - end -end diff --git a/Formula/git-recent.rb b/Formula/git-recent.rb deleted file mode 100644 index e82af49a6f188..0000000000000 --- a/Formula/git-recent.rb +++ /dev/null @@ -1,25 +0,0 @@ -class GitRecent < Formula - desc "See your latest local git branches, formatted real fancy" - homepage "https://github.com/paulirish/git-recent" - url "https://github.com/paulirish/git-recent/archive/v1.1.1.tar.gz" - sha256 "790c0de09ea19948b3b0ad642d82c30ee20c8d14a04b761fa2a2f716dc19eedc" - license "MIT" - - bottle :unneeded - - depends_on :macos => :sierra - - def install - bin.install "git-recent" - end - - test do - system "git", "init" - system "git", "recent" - # User will be 'BrewTestBot' on CI, needs to be set here to work locally - system "git", "config", "user.name", "BrewTestBot" - system "git", "config", "user.email", "brew@test.bot" - system "git", "commit", "--allow-empty", "-m", "test_commit" - assert_match(/.*master.*seconds? ago.*BrewTestBot.*\n.*test_commit/, shell_output("git recent")) - end -end diff --git a/Formula/git-remote-codecommit.rb b/Formula/git-remote-codecommit.rb deleted file mode 100644 index a624c813c7ec8..0000000000000 --- a/Formula/git-remote-codecommit.rb +++ /dev/null @@ -1,113 +0,0 @@ -class GitRemoteCodecommit < Formula - include Language::Python::Virtualenv - - desc "Git Remote Helper to interact with AWS CodeCommit" - homepage "https://github.com/aws/git-remote-codecommit" - url "https://github.com/aws/git-remote-codecommit/archive/1.13.tar.gz" - sha256 "2a8b641c0e8b4bac3162d7877d9eaf0f939fa8eda429c342d51ca33b8494ddad" - license "Apache-2.0" - head "https://github.com/aws/git-remote-codecommit.git" - - bottle do - cellar :any_skip_relocation - sha256 "42de381b31d9a0a18bf1f2f34428f1a57c90c7c04a0653cbfe7991970a501b69" => :catalina - sha256 "28aa72c9c720d190a3efae09cffa2ea79372b60c9952bd223d064139bf7acd0c" => :mojave - sha256 "b8172e7b8a01359fdf3992e2de30b95a3a52890da4a985bc44b217490cc8d725" => :high_sierra - end - - depends_on "python@3.8" - - resource "awscli" do - url "https://files.pythonhosted.org/packages/71/2f/8f9a58eac96d48bb1496596e64bebada636b0178b8f117498d313b13b0a2/awscli-1.16.313.tar.gz" - sha256 "a2b26db6afea30ce3a4b6706515b5342294eea28ed5888430986256324f95fe4" - end - - resource "boto3" do - url "https://files.pythonhosted.org/packages/60/43/960fa147d3c2b700350ed1dae385d96cc3adfc1ee2dfafc13fb69f907554/boto3-1.10.49.tar.gz" - sha256 "a2e40aecbda5ebf669089851f67962baf70fc6a1745c28ea157e4463cbee2a0d" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/70/c9/b8a18dcd6e444ff6b198dd09e733b446404de4d3d0d2cad628e85f744264/botocore-1.13.49.tar.gz" - sha256 "9b060954865fbad2f143253eef3cf38b1b68eb0675212413b8f0b1342026310c" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/76/53/e785891dce0e2f2b9f4b4ff5bc6062a53332ed28833c7afede841f46a5db/colorama-0.4.1.tar.gz" - sha256 "05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d" - 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/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/2c/30/f0162d3d83e398c7a3b70c91eef61d409dea205fb4dc2b47d335f429de32/jmespath-0.9.4.tar.gz" - sha256 "bde2aef6f44302dfb30320115b17d030798de8c4110e28d5cf6cf91a7a31074c" - 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/a4/db/fffec68299e6d7bad3d504147f9094830b704527a7fc098b721d38cc7fa7/pyasn1-0.4.8.tar.gz" - sha256 "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/cb/9f/27d4844ac5bf158a33900dbad7985951e2910397998e85712da03ce125f0/Pygments-2.5.2.tar.gz" - sha256 "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/8d/c9/e5be955a117a1ac548cdd31e37e8fd7b02ce987f9655f5c7563c656d5dcb/PyYAML-5.2.tar.gz" - sha256 "c0ee8eca2c582d29c3c2ec6e2c4f703d1b7f1fb10bc72317355a746057e7346c" - 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/39/12/150cd55c606ebca6725683642a8e7068cd6af10f837ce5419a9f16b7fb55/s3transfer-0.2.1.tar.gz" - sha256 "6efc926738a3cd576c2a79725fed9afde92378aa5c6a957e3af010cb019fac9d" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ad/fc/54d62fa4fc6e675678f9519e677dfc29b8964278d75333cf142892caf015/urllib3-1.25.7.tar.gz" - sha256 "f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/5e/33/92333eb80be0c96385dee338f30b53e24a8b415d5785e225d789b3f90feb/wcwidth-0.1.8.tar.gz" - sha256 "f28b3e8a6483e5d49e7f8949ac1a78314e740333ae305b4ba5defd3e74fb37a8" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match "The following URL is malformed", - pipe_output("#{bin}/git-remote-codecommit capabilities invalid 2>&1") - end -end diff --git a/Formula/git-remote-gcrypt.rb b/Formula/git-remote-gcrypt.rb deleted file mode 100644 index bc514a02f0ec7..0000000000000 --- a/Formula/git-remote-gcrypt.rb +++ /dev/null @@ -1,25 +0,0 @@ -class GitRemoteGcrypt < Formula - desc "GPG-encrypted git remotes" - homepage "https://spwhitton.name/tech/code/git-remote-gcrypt/" - url "https://github.com/spwhitton/git-remote-gcrypt/archive/1.3.tar.gz" - sha256 "e1948dda848db845db404e4337b07206c96cb239b66392fd1c9c246279c2cb25" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "40fe96f458da47660ec153c19efc0271f9f8bcd987cf328081873adecffd6a88" => :catalina - sha256 "c475f8f9a231038a1dcebdf37d14255ed9abb8e242cb0fe5a5216c3727ced1f1" => :mojave - sha256 "40fe96f458da47660ec153c19efc0271f9f8bcd987cf328081873adecffd6a88" => :high_sierra - end - - depends_on "docutils" => :build - - def install - ENV["prefix"] = prefix - system "./install.sh" - end - - test do - assert_match("fetch\npush\n", pipe_output("#{bin}/git-remote-gcrypt", "capabilities\n", 0)) - end -end diff --git a/Formula/git-remote-hg.rb b/Formula/git-remote-hg.rb deleted file mode 100644 index 6602008ca9ccc..0000000000000 --- a/Formula/git-remote-hg.rb +++ /dev/null @@ -1,45 +0,0 @@ -class GitRemoteHg < Formula - include Language::Python::Virtualenv - - desc "Transparent bidirectional bridge between Git and Mercurial" - homepage "https://github.com/felipec/git-remote-hg" - url "https://github.com/felipec/git-remote-hg/archive/v0.4.tar.gz" - sha256 "916072d134cde65b7ffa7d1da1acaabb0f29b65c017d0560e907e7a94063d1b1" - license "GPL-2.0" - revision 2 - head "https://github.com/felipec/git-remote-hg.git" - - bottle do - cellar :any_skip_relocation - sha256 "efcac93a209213486fcf837f83b364b6325adefba09493551e3e6017e669aa9f" => :catalina - sha256 "3903ddefc5ed6142943aa33ba298ac51d054159f0c401bcde044934494202a19" => :mojave - sha256 "1380e5053a25462f27d9be329840b6dda55b08e01b70ed6c581f3c625c7b332d" => :high_sierra - end - - depends_on "asciidoc" => :build - depends_on :macos # Due to Python 2 - - uses_from_macos "libxml2" - uses_from_macos "libxslt" - - conflicts_with "git-cinnabar", :because => "both install `git-remote-hg` binaries" - - resource "hg" do - url "https://www.mercurial-scm.org/release/mercurial-5.2.2.tar.gz" - sha256 "ffc5ff47488c7b5dae6ead3d99f08ef469500d6567592a25311838320106c03b" - end - - def install - venv = virtualenv_create(libexec) - venv.pip_install resource("hg") - inreplace "git-remote-hg", /#!.*/, "#!#{libexec}/bin/python" - system "make", "install", "prefix=#{prefix}" - - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "make", "install-doc", "prefix=#{prefix}" - end - - test do - system "git", "clone", "hg::https://www.mercurial-scm.org/repo/hello" - end -end diff --git a/Formula/git-review.rb b/Formula/git-review.rb deleted file mode 100644 index 254f65a48c607..0000000000000 --- a/Formula/git-review.rb +++ /dev/null @@ -1,66 +0,0 @@ -class GitReview < Formula - include Language::Python::Virtualenv - - desc "Submit git branches to gerrit for review" - homepage "https://opendev.org/opendev/git-review" - url "https://files.pythonhosted.org/packages/2c/e6/e4f1b999af2493a5cc5e050f0869b29f30914f94016abf48c77c6307745b/git-review-1.28.0.tar.gz" - sha256 "8e3aabb7b9484063e49c2504d137609401e32ad5128ff2a5cf43e98d5d3dc15a" - revision 2 - head "https://opendev.org/opendev/git-review.git" - - bottle do - cellar :any_skip_relocation - sha256 "8bb267cb74c37af45200381f60f84dc49af52a0d2eed65c23db6e582d0d407b9" => :catalina - sha256 "acd209ffed9affc75582b7ef94e3232abc0f2ab6490b634fc9abcb53a2e0f08d" => :mojave - sha256 "cb9721c5b767816de394884dbb83a7274b43fcb495015d445253d3820ac07b32" => :high_sierra - end - - depends_on "python@3.8" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/bf/9d214a5af07debc6acf7f3f257265618f1db242a3f8e49a9b516f24523a6/certifi-2019.11.28.tar.gz" - sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" - 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/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz" - sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ad/fc/54d62fa4fc6e675678f9519e677dfc29b8964278d75333cf142892caf015/urllib3-1.25.7.tar.gz" - sha256 "f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745" - end - - def install - virtualenv_install_with_resources - man1.install gzip("git-review.1") - end - - test do - system "git", "init" - system "git", "config", "user.name", "BrewTestBot" - system "git", "config", "user.email", "BrewTestBot@test.com" - system "git", "remote", "add", "gerrit", "https://github.com/Homebrew/homebrew.github.io" - (testpath/".git/hooks/commit-msg").write "# empty - make git-review happy" - (testpath/"foo").write "test file" - system "git", "add", "foo" - system "git", "commit", "-m", "test" - system "#{bin}/git-review", "--dry-run" - end -end diff --git a/Formula/git-revise.rb b/Formula/git-revise.rb deleted file mode 100644 index e39bbeb5cd381..0000000000000 --- a/Formula/git-revise.rb +++ /dev/null @@ -1,38 +0,0 @@ -class GitRevise < Formula - include Language::Python::Virtualenv - - desc "Rebase alternative for easy & efficient in-memory rebases and fixups" - homepage "https://github.com/mystor/git-revise" - url "https://github.com/mystor/git-revise/archive/v0.6.0.tar.gz" - sha256 "99c3804ddb73f1115bd6be05d10e640a7066e4019c6c223433e55136e66fa4c8" - license "MIT" - head "https://github.com/mystor/git-revise.git" - - bottle do - cellar :any_skip_relocation - sha256 "644bd8885dfc27b0cb84294b7195a296b1c1d56af5b870db7af109a93d80e2a0" => :catalina - sha256 "a9a61b083fc459b407488d8ef7e2439059702e89eaa19c9a5a8c0e1fb8f1a7c7" => :mojave - sha256 "1d15213e6e0220d5e97dd8991b4545d0789a3b907fff1a0996255ea675a1a94b" => :high_sierra - end - - depends_on "python@3.8" - - def install - virtualenv_install_with_resources - man1.install "git-revise.1" - end - - test do - (testpath/".gitconfig").write <<~EOS - [user] - name = J. Random Tester - email = test@example.com - EOS - system "git", "init" - (testpath/"test").write "foo" - system "git", "add", "test" - system "git", "commit", "--message", "a bad message" - system "git", "revise", "--message", "a good message", "HEAD" - assert_match "a good message", shell_output("git log --format=%B -n 1 HEAD") - end -end diff --git a/Formula/git-secret.rb b/Formula/git-secret.rb deleted file mode 100644 index 81ff49006f03d..0000000000000 --- a/Formula/git-secret.rb +++ /dev/null @@ -1,54 +0,0 @@ -class GitSecret < Formula - desc "Bash-tool to store the private data inside a git repo" - homepage "https://sobolevn.github.io/git-secret/" - license "MIT" - head "https://github.com/sobolevn/git-secret.git" - - stable do - url "https://github.com/sobolevn/git-secret/archive/v0.3.2.tar.gz" - sha256 "07b32b096e5ff5b4818096b1858c1f69df4684bb0f256e620514cf88f44ded85" - end - - bottle do - cellar :any_skip_relocation - sha256 "2fb53e4162baa1e614c3d73dbb24257604cf8b7864f73deeba21c784c6434193" => :catalina - sha256 "2fb53e4162baa1e614c3d73dbb24257604cf8b7864f73deeba21c784c6434193" => :mojave - sha256 "2fb53e4162baa1e614c3d73dbb24257604cf8b7864f73deeba21c784c6434193" => :high_sierra - end - - depends_on "gawk" - depends_on "gnupg" - - def install - system "make", "build" - system "bash", "utils/install.sh", prefix - 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 "git", "config", "user.email", "testing@foo.bar" - system "git", "secret", "init" - assert_match "testing@foo.bar added", shell_output("git secret tell -m") - (testpath/"shh.txt").write "Top Secret" - (testpath/".gitignore").append_lines "shh.txt" - system "git", "secret", "add", "shh.txt" - system "git", "secret", "hide" - assert_predicate testpath/"shh.txt.secret", :exist? - ensure - system Formula["gnupg"].opt_bin/"gpgconf", "--kill", "gpg-agent" - end - end -end diff --git a/Formula/git-secrets.rb b/Formula/git-secrets.rb deleted file mode 100644 index 5ce380034f9c5..0000000000000 --- a/Formula/git-secrets.rb +++ /dev/null @@ -1,25 +0,0 @@ -class GitSecrets < Formula - desc "Prevents you from committing sensitive information to a git repo" - homepage "https://github.com/awslabs/git-secrets" - url "https://github.com/awslabs/git-secrets/archive/1.3.0.tar.gz" - sha256 "f1d50c6c5c7564f460ff8d279081879914abe920415c2923934c1f1d1fac3606" - license "Apache-2.0" - head "https://github.com/awslabs/git-secrets.git" - - bottle do - cellar :any_skip_relocation - sha256 "92ae3c8447754b1f5d23b5e7e3a601fca133f4b691b51b5004ffe17f4d763622" => :catalina - sha256 "d77761ee552d2963788f2bcab6c695d1b52f9d0c1d68dad65230901c750e63aa" => :mojave - sha256 "d77761ee552d2963788f2bcab6c695d1b52f9d0c1d68dad65230901c750e63aa" => :high_sierra - sha256 "fc2745b24be00e6b8e4b82d6768632810823ffff3f80ad99ca9943b31d003003" => :sierra - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "git", "init" - system "git", "secrets", "--install" - end -end diff --git a/Formula/git-series.rb b/Formula/git-series.rb deleted file mode 100644 index 96eb8ed7cbe24..0000000000000 --- a/Formula/git-series.rb +++ /dev/null @@ -1,52 +0,0 @@ -class GitSeries < Formula - desc "Track changes to a patch series over time" - homepage "https://github.com/git-series/git-series" - url "https://github.com/git-series/git-series/archive/0.9.1.tar.gz" - sha256 "c0362e19d3fa168a7cb0e260fcdecfe070853b163c9f2dfd2ad8213289bc7e5f" - license "MIT" - revision 2 - - bottle do - cellar :any - sha256 "29b2137b70b357be519ea871f44be18286547f1fd1e86ac9d2c0b5ba2f046fc2" => :catalina - sha256 "9a30242b1878ddca0dcbb05aae2fade5bbef945563c4a8c64912263e3c31cf5f" => :mojave - sha256 "7e57cc878bd7619f8585e5577ec25c51372af77d4189d2c43b520402b3b33447" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "rust" => :build - depends_on "libgit2" - depends_on "libssh2" - depends_on "openssl@1.1" - - def install - # Ensure that the `openssl` crate picks up the intended library. - # https://crates.io/crates/openssl#manual-configuration - ENV["OPENSSL_DIR"] = Formula["openssl@1.1"].opt_prefix - - ENV["LIBGIT2_SYS_USE_PKG_CONFIG"] = "1" - ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" - - system "cargo", "install", "--root", prefix, "--path", "." - man1.install "git-series.1" - end - - test do - (testpath/".gitconfig").write <<~EOS - [user] - name = Real Person - email = notacat@hotmail.cat - EOS - - system "git", "init" - (testpath/"test").write "foo" - system "git", "add", "test" - system "git", "commit", "-m", "Initial commit" - (testpath/"test").append_lines "bar" - system "git", "commit", "-m", "Second commit", "test" - system bin/"git-series", "start", "feature" - system "git", "checkout", "HEAD~1" - system bin/"git-series", "base", "HEAD" - system bin/"git-series", "commit", "-a", "-m", "new feature v1" - end -end diff --git a/Formula/git-sh.rb b/Formula/git-sh.rb deleted file mode 100644 index 5d305b53e4cc2..0000000000000 --- a/Formula/git-sh.rb +++ /dev/null @@ -1,28 +0,0 @@ -class GitSh < Formula - desc "Customized Bash environment for git work" - homepage "https://github.com/rtomayko/git-sh" - url "https://github.com/rtomayko/git-sh/archive/1.3.tar.gz" - sha256 "461848dfa52ea6dd6cd0a374c52404b632204dc637cde17c0532529107d52358" - license "GPL-2.0" - head "https://github.com/rtomayko/git-sh.git" - - bottle do - cellar :any_skip_relocation - sha256 "d25516fc861d600cf11c600f0a43b08b0217c87cbc7b391809e4df0051c1153b" => :catalina - sha256 "379e7d57000e9eda710d764516e3c4a98e3aafb71020e15faafe3e20e12a82d3" => :mojave - sha256 "69491a98476b0e745107e6be3623d678e0dcdf33dda7f76d541ba773881e74cd" => :high_sierra - sha256 "d371fba61367507f5e88818eb1f0630e388d198c37faa957ce410d97675a7f5d" => :sierra - sha256 "e30e7836919a5d79712e3fd51a118279b412c44da909053b9b185eb48963323f" => :el_capitan - sha256 "cdbc6fc62300722f613f314e2859422edcf938c6807a3039bcf476e02fbe222c" => :yosemite - sha256 "1b9aa141f32145516db62304dda799611e1fc35ec57275ee75bf566325a6bfa5" => :mavericks - end - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/git-sh", "-c", "ls" - end -end diff --git a/Formula/git-sizer.rb b/Formula/git-sizer.rb deleted file mode 100644 index 94bd57646cfb1..0000000000000 --- a/Formula/git-sizer.rb +++ /dev/null @@ -1,32 +0,0 @@ -class GitSizer < Formula - desc "Compute various size metrics for a Git repository" - homepage "https://github.com/github/git-sizer" - url "https://github.com/github/git-sizer/archive/v1.3.0.tar.gz" - sha256 "c5f77d50eeda704a228f30f5a233ef0e56ef9f4cc83433d46e331b3247d28c6d" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "5d465491e6d2fd3b025dd6ad8f1448ef6ee7dd18d84ef73e895cc483afb9b98c" => :catalina - sha256 "4d4e1b47018c1b5efe0ae71996e1dad3f7b0ec4f9616793121463b1c092b03af" => :mojave - sha256 "add468f96d564f1046a0908cc1f553c73a2ac672973f3c7a7bca47c12fd72867" => :high_sierra - sha256 "b0a6d0757c623e8e6b1f2ed6e9fb05496b29dd6f615df72e615a7a6a8fb45e3e" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/github/git-sizer").install buildpath.children - cd "src/github.com/github/git-sizer" do - system "go", "build", "-o", bin/"git-sizer" - prefix.install_metafiles - end - end - - test do - system "git", "init" - output = shell_output("#{bin}/git-sizer") - assert_match "No problems above the current threshold were found", output - end -end diff --git a/Formula/git-ssh.rb b/Formula/git-ssh.rb deleted file mode 100644 index b55c4caef039a..0000000000000 --- a/Formula/git-ssh.rb +++ /dev/null @@ -1,24 +0,0 @@ -class GitSsh < Formula - desc "Proxy for serving git repositories over SSH" - homepage "https://github.com/lemarsu/git-ssh" - url "https://github.com/lemarsu/git-ssh/archive/v0.2.0.tar.gz" - sha256 "f7cf45f71e1f3aa23ef47cbbc411855f60d15ee69992c9f57843024e241a842f" - license "GPL-2.0" - head "https://github.com/lemarsu/git-ssh.git" - - bottle :unneeded - - def install - # Change loading of required code from libexec location (Cellar only) - inreplace "bin/git-ssh" do |s| - s.sub!(/path = .*$/, "path = '#{libexec}'") - end - bin.install "bin/git-ssh" - libexec.install Dir["lib/*"] - end - - test do - assert_equal "#{bin}/git-ssh v0.2.0", - shell_output("#{bin}/git-ssh -V").chomp - end -end diff --git a/Formula/git-standup.rb b/Formula/git-standup.rb deleted file mode 100644 index 8218e96214396..0000000000000 --- a/Formula/git-standup.rb +++ /dev/null @@ -1,27 +0,0 @@ -class GitStandup < Formula - desc "Git extension to generate reports for standup meetings" - homepage "https://github.com/kamranahmedse/git-standup" - url "https://github.com/kamranahmedse/git-standup/archive/2.3.2.tar.gz" - sha256 "48d5aaa3c585037c950fa99dd5be8a7e9af959aacacde9fe94143e4e0bfcd6ba" - license "MIT" - head "https://github.com/kamranahmedse/git-standup.git" - - bottle do - cellar :any_skip_relocation - sha256 "0a75c65615d92237a59492ac00867d12ab4a23865d85d5cb464d9deb1f6d8ee8" => :catalina - sha256 "0a75c65615d92237a59492ac00867d12ab4a23865d85d5cb464d9deb1f6d8ee8" => :mojave - sha256 "0a75c65615d92237a59492ac00867d12ab4a23865d85d5cb464d9deb1f6d8ee8" => :high_sierra - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "git", "init" - (testpath/"test").write "test" - system "git", "add", "#{testpath}/test" - system "git", "commit", "--message", "test" - system "git", "standup" - end -end diff --git a/Formula/git-subrepo.rb b/Formula/git-subrepo.rb deleted file mode 100644 index 649abc2969214..0000000000000 --- a/Formula/git-subrepo.rb +++ /dev/null @@ -1,51 +0,0 @@ -class GitSubrepo < Formula - desc "Git Submodule Alternative" - homepage "https://github.com/ingydotnet/git-subrepo" - url "https://github.com/ingydotnet/git-subrepo/archive/0.4.1.tar.gz" - sha256 "64cc2490c54fe1e5396bb14f6bbf0aa8378085f3b8847fd8ed171e5ddd886065" - license "MIT" - head "https://github.com/ingydotnet/git-subrepo.git" - - bottle do - cellar :any_skip_relocation - sha256 "499beadca28680001847d8ee797f15595b629017a4b434e775ae4d3309277002" => :catalina - sha256 "499beadca28680001847d8ee797f15595b629017a4b434e775ae4d3309277002" => :mojave - sha256 "499beadca28680001847d8ee797f15595b629017a4b434e775ae4d3309277002" => :high_sierra - end - - depends_on "bash" - - def install - libexec.mkpath - system "make", "PREFIX=#{prefix}", "INSTALL_LIB=#{libexec}", "install" - bin.install_symlink libexec/"git-subrepo" - - # Remove test for $GIT_SUBREPO_ROOT in completion script - # https://github.com/ingydotnet/git-subrepo/issues/183 - inreplace "share/zsh-completion/_git-subrepo", - /^if [[ -z $GIT_SUBREPO_ROOT ]].*?^fi$/m, "" - - mv "share/completion.bash", "share/git-subrepo" - bash_completion.install "share/git-subrepo" - zsh_completion.install "share/zsh-completion/_git-subrepo" - end - - test do - mkdir "mod" do - system "git", "init" - touch "HELLO" - system "git", "add", "HELLO" - system "git", "commit", "-m", "testing" - end - - mkdir "container" do - system "git", "init" - touch ".gitignore" - system "git", "add", ".gitignore" - system "git", "commit", "-m", "testing" - - assert_match(/cloned into/, - shell_output("git subrepo clone ../mod mod")) - end - end -end diff --git a/Formula/git-svn-abandon.rb b/Formula/git-svn-abandon.rb deleted file mode 100644 index 11dcbb8856857..0000000000000 --- a/Formula/git-svn-abandon.rb +++ /dev/null @@ -1,22 +0,0 @@ -class GitSvnAbandon < Formula - desc "History-preserving svn-to-git migration" - homepage "https://github.com/nothingmuch/git-svn-abandon" - url "https://github.com/nothingmuch/git-svn-abandon/archive/0.0.1.tar.gz" - sha256 "65c11b5e575e6af4d21ef7624941c4581a5570748d50e38714bd33fee56e4485" - license "MIT" - head "https://github.com/nothingmuch/git-svn-abandon.git" - - bottle :unneeded - - def install - bin.install Dir["git-svn-abandon-*"] - end - - test do - system "git", "init" - system "git", "symbolic-ref", "HEAD", "refs/heads/trunk" - system "git", "commit", "--allow-empty", "-m", "foo" - system "git", "svn-abandon-fix-refs" - assert_equal "* master", shell_output("git branch -a").chomp - end -end diff --git a/Formula/git-test.rb b/Formula/git-test.rb deleted file mode 100644 index 8a9dca30c3900..0000000000000 --- a/Formula/git-test.rb +++ /dev/null @@ -1,28 +0,0 @@ -class GitTest < Formula - desc "Run tests on each distinct tree in a revision list" - homepage "https://github.com/spotify/git-test" - url "https://github.com/spotify/git-test/archive/v1.0.4.tar.gz" - sha256 "7c2331c8dc3c815e440ffa1a4dc7a9ff8a28a0a8cbfd195282f53c3e4cb2ee00" - license "Apache-2.0" - - bottle :unneeded - - def install - bin.install "git-test" - man1.install "git-test.1" - pkgshare.install "test.sh" - end - - test do - ENV["XDG_CONFIG_HOME"] = testpath/".config" - ENV["GIT_CONFIG_NOSYSTEM"] = "1" - system "git", "init" - ln_s bin/"git-test", testpath - cp pkgshare/"test.sh", testpath - chmod 0755, "test.sh" - system "git", "add", "test.sh" - system "git", "commit", "-m", "initial commit" - ENV["TERM"] = "xterm" - system bin/"git-test", "-v", "HEAD", "--verify='./test.sh'" - end -end diff --git a/Formula/git-tf.rb b/Formula/git-tf.rb deleted file mode 100644 index 2bb59e4bc31ce..0000000000000 --- a/Formula/git-tf.rb +++ /dev/null @@ -1,27 +0,0 @@ -class GitTf < Formula - desc "Share changes between TFS and git" - homepage "https://archive.codeplex.com/?p=gittf" - url "https://download.microsoft.com/download/A/E/2/AE23B059-5727-445B-91CC-15B7A078A7F4/git-tf-2.0.3.20131219.zip" - sha256 "91fd12e7db19600cc908e59b82104dbfbb0dbfba6fd698804a8330d6103aae74" - - bottle :unneeded - - def install - libexec.install "git-tf" - libexec.install "lib" - (libexec/"native").install "native/macosx" - - bin.write_exec_script libexec/"git-tf" - doc.install Dir["Git-TF_*", "ThirdPartyNotices*"] - end - - def caveats - <<~EOS - This release removes support for TFS 2005 and 2008. Use a previous version if needed. - EOS - end - - test do - system "#{bin}/git-tf" - end -end diff --git a/Formula/git-town.rb b/Formula/git-town.rb deleted file mode 100644 index 45e3529f73e63..0000000000000 --- a/Formula/git-town.rb +++ /dev/null @@ -1,31 +0,0 @@ -class GitTown < Formula - desc "High-level command-line interface for Git" - homepage "https://www.git-town.com/" - url "https://github.com/git-town/git-town/archive/v7.4.0.tar.gz" - sha256 "f9ff00839fde70bc9b5024bae9a51d8b00e0bb309c3542ed65be50bb8a13e6a5" - - bottle do - cellar :any_skip_relocation - sha256 "e6d6fbabc41bbef0488161ac1ab71d486dd0439eb8ee3072b1a812cc0d573bee" => :catalina - sha256 "2d39b261dfa7208c257416d61115c22bf242b16e7d696eb810252c192981a052" => :mojave - sha256 "40debf4a33e518102e579e8e8dbdefa2676c4bf057cbcb994bb86f05df17dd16" => :high_sierra - end - - depends_on "go" => :build - depends_on :macos => :el_capitan - - def install - system "go", "build", *std_go_args, "-ldflags", - "-X github.com/git-town/git-town/src/cmd.version=v7.4.0 "\ - "-X github.com/git-town/git-town/src/cmd.buildDate=2020/07/05" - end - - test do - system "git", "init" - touch "testing.txt" - system "git", "add", "testing.txt" - system "git", "commit", "-m", "Testing!" - - system "#{bin}/git-town", "config" - end -end diff --git a/Formula/git-tracker.rb b/Formula/git-tracker.rb deleted file mode 100644 index aaf23a5447769..0000000000000 --- a/Formula/git-tracker.rb +++ /dev/null @@ -1,27 +0,0 @@ -class GitTracker < Formula - desc "Integrate Pivotal Tracker into your Git workflow" - homepage "https://github.com/stevenharman/git_tracker" - url "https://github.com/stevenharman/git_tracker/archive/v2.0.0.tar.gz" - sha256 "ec0a8d6dd056b8ae061d9ada08f1cc2db087e13aaecf4e0d150c1808e0250504" - license "MIT" - head "https://github.com/stevenharman/git_tracker.git" - - bottle do - cellar :any_skip_relocation - sha256 "4bfd3a9d45ba7fa4eb83c27efc7d56d4ceae11c2fcd51817d32024b05633a8e8" => :catalina - sha256 "1b4a0022514c92d8aa724987024f38932e2dd897ffb85238e057977929d729c3" => :mojave - sha256 "b99c9fa3e5e35a59659091162620299a1f39f6e36b25e05e71cdc2989157d66d" => :high_sierra - sha256 "38f5240121fa53c038034ea9d0ce639f49c6df241727cbc5fbbd6acb48c60ea7" => :sierra - sha256 "beba888de6c1dad6b4069be93ad1029ce70c24cc241c5b930c6aaf541fd11c4d" => :el_capitan - sha256 "beba888de6c1dad6b4069be93ad1029ce70c24cc241c5b930c6aaf541fd11c4d" => :yosemite - end - - def install - system "rake", "standalone:install", "prefix=#{prefix}" - end - - test do - output = shell_output("#{bin}/git-tracker help") - assert_match /git-tracker \d+(\.\d+)* is installed\./, output - end -end diff --git a/Formula/git-trim.rb b/Formula/git-trim.rb deleted file mode 100644 index a1a779e32bb88..0000000000000 --- a/Formula/git-trim.rb +++ /dev/null @@ -1,35 +0,0 @@ -class GitTrim < Formula - desc "Trim your git remote tracking branches that are merged or gone" - homepage "https://github.com/foriequal0/git-trim" - url "https://github.com/foriequal0/git-trim/archive/v0.3.2.tar.gz" - sha256 "08c65f0e821b12f5e512034df22723be9289e42102d478dae759f57905554f25" - license "MIT" - - bottle do - cellar :any - sha256 "291284c8fc2191487bcc55ea41a0de621e705b3ae141f91226cb843b5be408af" => :catalina - sha256 "a41fdd1acd98185e906be41cb1ca658e50e32fc3461a9d5ef5d10a1aed9c7e11" => :mojave - sha256 "e0c2c87d6d4aad24751f3dded41c6e8f68300eaef2a9721eea92508bb9ccc32c" => :high_sierra - end - - depends_on "rust" => :build - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - on_linux do - depends_on "pkg-config" => :build - end - - def install - system "cargo", "install", *std_cargo_args - man1.install "docs/git-trim.man" => "git-trim.1" - end - - test do - system "git", "clone", "https://github.com/foriequal0/git-trim" - Dir.chdir("git-trim") - system "git", "branch", "brew-test" - assert_match "brew-test", shell_output("git trim") - end -end diff --git a/Formula/git-url-sub.rb b/Formula/git-url-sub.rb deleted file mode 100644 index 6e8d1bd703781..0000000000000 --- a/Formula/git-url-sub.rb +++ /dev/null @@ -1,30 +0,0 @@ -class GitUrlSub < Formula - desc "Recursively substitute remote URLs for multiple repos" - homepage "https://gosuri.github.io/git-url-sub" - url "https://github.com/gosuri/git-url-sub/archive/1.0.1.tar.gz" - sha256 "6c943b55087e786e680d360cb9e085d8f1d7b9233c88e8f2e6a36f8e598a00a9" - license "MIT" - head "https://github.com/gosuri/git-url-sub.git" - - bottle do - cellar :any_skip_relocation - sha256 "e35658a190c074ad5bb88578e34c91f8751b24ea297cf5b2eac9729c8eb9e814" => :catalina - sha256 "f8f1a14a4d3cbc359b741111b56f5c47d252946784501e934fbdc5f82cbd2ed8" => :mojave - sha256 "4eca101481773e802431bc9fc264f5f2db309595d0faf0c02886a559c31baa91" => :high_sierra - sha256 "2fcf47332e070caed126fef2be0a1108a23e18a9d1ba80b6059b45a417af1b31" => :sierra - sha256 "cf954ff293abbcaf8816c8142b5762ebe7601107f76530f6bab0edea71e2d609" => :el_capitan - sha256 "2edfbc5f15001b1c4c08b26251a845533473a79bc2f387d3fd1d74751080cd1b" => :yosemite - sha256 "ce9c28238d1904b9d2c97da10fd7a6be0b1ceafde423311078dfac0bbe8a82dc" => :mavericks - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "git", "init" - system "git", "remote", "add", "origin", "foo" - system "#{bin}/git-url-sub", "-c", "foo", "bar" - assert_match(/origin\s+bar \(fetch\)/, shell_output("git remote -v")) - end -end diff --git a/Formula/git-utils.rb b/Formula/git-utils.rb deleted file mode 100644 index d733fb5b3c494..0000000000000 --- a/Formula/git-utils.rb +++ /dev/null @@ -1,26 +0,0 @@ -class GitUtils < Formula - desc "Various Git helper utilities" - homepage "https://github.com/ddollar/git-utils" - url "https://github.com/ddollar/git-utils/archive/v1.0.tar.gz" - sha256 "a65252222222981d769fe2b19508e698fac4a0ce72e4ff07e74851e99a8fc813" - head "https://github.com/ddollar/git-utils.git" - - bottle :unneeded - - conflicts_with "git-extras", - :because => "both install a `git-pull-request` script" - - conflicts_with "willgit", - :because => "both install a `git-rank-contributors` script" - - def install - bin.install Dir["git-*"] - end - - test do - touch "#{testpath}/somefile" - system "git", "init" - system "git", "wip" - assert_match "wip", shell_output("git last 1") - end -end diff --git a/Formula/git-vendor.rb b/Formula/git-vendor.rb deleted file mode 100644 index 7f9c8cdc489eb..0000000000000 --- a/Formula/git-vendor.rb +++ /dev/null @@ -1,33 +0,0 @@ -class GitVendor < Formula - desc "Command for managing git vendored dependencies" - homepage "https://brettlangdon.github.io/git-vendor" - url "https://github.com/brettlangdon/git-vendor/archive/v1.1.2.tar.gz" - sha256 "1ae2c12ae535669d0f65d297f5ff79d36d37dabf372feb6bda3f7856cf14ef97" - license "MIT" - head "https://github.com/brettlangdon/git-vendor.git" - - bottle do - cellar :any_skip_relocation - sha256 "18f987b67a107a3bf300ecde0a8bfe9ae11876f150450697b43d13d76f8df840" => :catalina - sha256 "ce617fdad4c3a2eda141623da2e9eff59435f4ffd1c6a192efb6a8b5d13faa44" => :mojave - sha256 "468cfcc770bb7a88baf9961d665262be06de01bc85cfce19385e03d6e381521c" => :high_sierra - sha256 "24e13e681254ae28aae5d51dffda26d70c0cbfbca7c52b61f16f7496822c7d1f" => :sierra - sha256 "9461c5ce8f0b418d4ab1180c1fff22ef847b0d0af740489b3553d1715a8dc8c0" => :el_capitan - sha256 "62a8d29afff9e7e99c93917cfee92a68495443234346a72f16c8167d6310126a" => :yosemite - sha256 "962f05607dbd8ea0669f081039ce2fad01cddcdbfe53859b57c9ef69d89cde45" => :mavericks - end - - def install - system "make", "PREFIX=#{prefix}", "install" - end - - test do - system "git", "init" - system "git", "config", "user.email", "author@example.com" - system "git", "config", "user.name", "Au Thor" - system "git", "add", "." - system "git", "commit", "-m", "Initial commit" - system "git", "vendor", "add", "git-vendor", "https://github.com/brettlangdon/git-vendor", "v1.1.0" - assert_match "git-vendor@v1.1.0", shell_output("git vendor list") - end -end diff --git a/Formula/git-when-merged.rb b/Formula/git-when-merged.rb deleted file mode 100644 index 375df01841052..0000000000000 --- a/Formula/git-when-merged.rb +++ /dev/null @@ -1,30 +0,0 @@ -class GitWhenMerged < Formula - desc "Find where a commit was merged in git" - homepage "https://github.com/mhagger/git-when-merged" - url "https://github.com/mhagger/git-when-merged/archive/v1.2.0.tar.gz" - sha256 "3fb3ee2f186103c2dae1e4a2e104bc37199641f4ffdb38d85ca612cf16636982" - license "GPL-2.0" - - bottle :unneeded - - def install - bin.install "bin/git-when-merged" - end - - test do - system "git", "init" - touch "foo" - system "git", "add", "foo" - system "git", "commit", "-m", "foo" - system "git", "checkout", "-b", "bar" - touch "bar" - system "git", "add", "bar" - system "git", "commit", "-m", "bar" - system "git", "checkout", "master" - system "git", "merge", "--no-ff", "bar" - touch "baz" - system "git", "add", "baz" - system "git", "commit", "-m", "baz" - system "#{bin}/git-when-merged", "bar" - end -end diff --git a/Formula/git.rb b/Formula/git.rb deleted file mode 100644 index f4ac2ed0ffbfd..0000000000000 --- a/Formula/git.rb +++ /dev/null @@ -1,177 +0,0 @@ -class Git < Formula - desc "Distributed revision control system" - homepage "https://git-scm.com/" - # Note: Please keep these values in sync with git-gui.rb when updating. - url "https://www.kernel.org/pub/software/scm/git/git-2.27.0.tar.xz" - sha256 "73ca9774d7fa226e1d87c1909401623f96dca6a044e583b9a762e84d7d1a73f9" - head "https://github.com/git/git.git", :shallow => false - - bottle do - rebuild 1 - sha256 "731a77dd23d63ca8a0a5ba5c990218e37f1c8d9313fa1f9e58771cf5abd97bef" => :catalina - sha256 "a752212149e96e67fd8c42e1d68d7612de94bc67f06ffdc13ed7236aa33debf4" => :mojave - sha256 "c9b1c7d3686fac0f7006b13b1afd46e38f2d6c73dd72049d9e8fc49b1bb34599" => :high_sierra - end - - depends_on "gettext" - depends_on "pcre2" - - resource "html" do - url "https://www.kernel.org/pub/software/scm/git/git-htmldocs-2.27.0.tar.xz" - sha256 "ffa91681b6a8f558745924b1dbb76d604c9e52b27c525c6bd470c0123f7f4af3" - end - - resource "man" do - url "https://www.kernel.org/pub/software/scm/git/git-manpages-2.27.0.tar.xz" - sha256 "e6cbab49b04c975886fdddf46eb24c5645c6799224208db8b01143091d9bd49c" - end - - resource "Net::SMTP::SSL" do - url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Net-SMTP-SSL-1.04.tar.gz" - sha256 "7b29c45add19d3d5084b751f7ba89a8e40479a446ce21cfd9cc741e558332a00" - end - - def install - # If these things are installed, tell Git build system not to use them - ENV["NO_FINK"] = "1" - ENV["NO_DARWIN_PORTS"] = "1" - ENV["PYTHON_PATH"] = which("python") - ENV["PERL_PATH"] = which("perl") - ENV["USE_LIBPCRE2"] = "1" - ENV["INSTALL_SYMLINKS"] = "1" - ENV["LIBPCREDIR"] = Formula["pcre2"].opt_prefix - ENV["V"] = "1" # build verbosely - - perl_version = Utils.safe_popen_read("perl", "--version")[/v(\d+\.\d+)(?:\.\d+)?/, 1] - - ENV["PERLLIB_EXTRA"] = %W[ - #{MacOS.active_developer_dir} - /Library/Developer/CommandLineTools - /Applications/Xcode.app/Contents/Developer - ].uniq.map do |p| - "#{p}/Library/Perl/#{perl_version}/darwin-thread-multi-2level" - end.join(":") - - # Ensure we are using the correct system headers (for curl) to workaround - # mismatched Xcode/CLT versions: - # https://github.com/Homebrew/homebrew-core/issues/46466 - if MacOS.version == :mojave && MacOS::CLT.installed? && MacOS::CLT.provides_sdk? - ENV["HOMEBREW_SDKROOT"] = MacOS::CLT.sdk_path(MacOS.version) - end - - # The git-gui and gitk tools are installed by a separate formula (git-gui) - # to avoid a dependency on tcl-tk and to avoid using the broken system - # tcl-tk (see https://github.com/Homebrew/homebrew-core/issues/36390) - # This is done by setting the NO_TCLTK make variable. - args = %W[ - prefix=#{prefix} - sysconfdir=#{etc} - CC=#{ENV.cc} - CFLAGS=#{ENV.cflags} - LDFLAGS=#{ENV.ldflags} - NO_TCLTK=1 - ] - - if MacOS.version < :yosemite - openssl_prefix = Formula["openssl@1.1"].opt_prefix - args += %W[NO_APPLE_COMMON_CRYPTO=1 OPENSSLDIR=#{openssl_prefix}] - else - args += %w[NO_OPENSSL=1 APPLE_COMMON_CRYPTO=1] - end - - system "make", "install", *args - - git_core = libexec/"git-core" - - # Install the macOS keychain credential helper - cd "contrib/credential/osxkeychain" do - system "make", "CC=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}", - "LDFLAGS=#{ENV.ldflags}" - git_core.install "git-credential-osxkeychain" - system "make", "clean" - end - - # Generate diff-highlight perl script executable - cd "contrib/diff-highlight" do - system "make" - end - - # Install the netrc credential helper - cd "contrib/credential/netrc" do - system "make", "test" - git_core.install "git-credential-netrc" - end - - # Install git-subtree - cd "contrib/subtree" do - system "make", "CC=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}", - "LDFLAGS=#{ENV.ldflags}" - git_core.install "git-subtree" - end - - # install the completion script first because it is inside "contrib" - bash_completion.install "contrib/completion/git-completion.bash" - bash_completion.install "contrib/completion/git-prompt.sh" - zsh_completion.install "contrib/completion/git-completion.zsh" => "_git" - cp "#{bash_completion}/git-completion.bash", zsh_completion - - elisp.install Dir["contrib/emacs/*.el"] - (share/"git-core").install "contrib" - - # We could build the manpages ourselves, but the build process depends - # on many other packages, and is somewhat crazy, this way is easier. - man.install resource("man") - (share/"doc/git-doc").install resource("html") - - # Make html docs world-readable - chmod 0644, Dir["#{share}/doc/git-doc/**/*.{html,txt}"] - chmod 0755, Dir["#{share}/doc/git-doc/{RelNotes,howto,technical}"] - - # git-send-email needs Net::SMTP::SSL - resource("Net::SMTP::SSL").stage do - (share/"perl5").install "lib/Net" - 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_rf prefix/"Library/Perl" - - # Set the macOS keychain credential helper by default - # (as Apple's CLT's git also does this). - (buildpath/"gitconfig").write <<~EOS - [credential] - \thelper = osxkeychain - EOS - etc.install "gitconfig" - end - - def caveats - <<~EOS - The Tcl/Tk GUIs (e.g. gitk, git-gui) are now in the `git-gui` formula. - EOS - end - - test do - system bin/"git", "init" - %w[haunted house].each { |f| touch testpath/f } - system bin/"git", "add", "haunted", "house" - system bin/"git", "config", "user.name", "'A U Thor'" - system bin/"git", "config", "user.email", "author@example.com" - system bin/"git", "commit", "-a", "-m", "Initial Commit" - assert_equal "haunted\nhouse", shell_output("#{bin}/git ls-files").strip - - # Check Net::SMTP::SSL was installed correctly. - %w[foo bar].each { |f| touch testpath/f } - system bin/"git", "add", "foo", "bar" - system bin/"git", "commit", "-a", "-m", "Second Commit" - assert_match "Authentication Required", pipe_output( - "#{bin}/git send-email --from=test@example.com --to=dev@null.com " \ - "--smtp-server=smtp.gmail.com --smtp-server-port=587 " \ - "--smtp-encryption=tls --confirm=never HEAD^ 2>&1", - ) - end -end diff --git a/Formula/gitbatch.rb b/Formula/gitbatch.rb deleted file mode 100644 index 3b743a09531d1..0000000000000 --- a/Formula/gitbatch.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Gitbatch < Formula - desc "Manage your git repositories in one place" - homepage "https://github.com/isacikgoz/gitbatch" - url "https://github.com/isacikgoz/gitbatch/archive/v0.5.0.tar.gz" - sha256 "b1781bb1a0f16545d8980d4f854cb4685c289b222d141197889fc387524aa515" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "58b204bd1779e99cade465f98457ec14cadaee9a3b65afe099245faba640da0c" => :catalina - sha256 "31d8b72293ceacef7d44beb203887ff80628cb5cd3b56a9f0b467704d153b261" => :mojave - sha256 "73fc219e77776b78635c672111736a1ce26f6f1afe0df4ce7c571341578cd1e9" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/name - end - - test do - mkdir testpath/"repo" do - system "git", "init" - end - assert_match "1 repositories finished", shell_output("#{bin}/gitbatch -q") - end -end diff --git a/Formula/gitbucket.rb b/Formula/gitbucket.rb deleted file mode 100644 index aaca8837e2e96..0000000000000 --- a/Formula/gitbucket.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Gitbucket < Formula - desc "Git platform powered by Scala offering" - homepage "https://github.com/gitbucket/gitbucket" - url "https://github.com/gitbucket/gitbucket/releases/download/4.33.0/gitbucket.war" - sha256 "35e190ddb7a2f9760d43617d2e6325c2a745ba66061daa3fa95cc9d871423506" - license "Apache-2.0" - revision 1 - - head do - url "https://github.com/gitbucket/gitbucket.git" - depends_on "ant" => :build - end - - bottle :unneeded - - depends_on "openjdk" - - def install - if build.head? - system "ant" - libexec.install "war/target/gitbucket.war", "." - else - libexec.install "gitbucket.war" - end - end - - def caveats - <<~EOS - Note: When using launchctl the port will be 8080. - EOS - end - - plist_options :manual => "java -jar #{HOMEBREW_PREFIX}/opt/gitbucket/libexec/gitbucket.war" - - def plist - <<~EOS - - - - - Label - gitbucket - ProgramArguments - - #{Formula["openjdk"].opt_bin}/java - -Dmail.smtp.starttls.enable=true - -jar - #{opt_libexec}/gitbucket.war - --host=127.0.0.1 - --port=8080 - - RunAtLoad - - - - EOS - end - - test do - java = Formula["openjdk"].opt_bin/"java" - fork do - exec "'#{java}' -jar #{libexec}/gitbucket.war --port=#{free_port} > output" - end - sleep 12 - File.read("output") !~ /Exception/ - end -end diff --git a/Formula/giter8.rb b/Formula/giter8.rb deleted file mode 100644 index 8e74c90e77627..0000000000000 --- a/Formula/giter8.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Giter8 < Formula - desc "Generate files and directories from templates in a git repo" - homepage "https://github.com/foundweekends/giter8" - url "https://search.maven.org/remotecontent?filepath=org/foundweekends/giter8/giter8-bootstrap_2.12/0.13.1/giter8-bootstrap_2.12-0.13.1.sh" - sha256 "f3465f6b69a68c4cc67086446e6f583af3a243b2541e64dc32122a94999d29e0" - - bottle :unneeded - - depends_on :java => "1.8+" - - def install - bin.install "giter8-bootstrap_2.12-#{version}.sh" => "g8" - end - - test do - assert_match "g8 #{version}", shell_output("#{bin}/g8 --version") - system "#{bin}/g8", "scala/scala-seed.g8", "--name=hello" - assert_predicate testpath/"hello/build.sbt", :exist? - end -end diff --git a/Formula/gitfs.rb b/Formula/gitfs.rb deleted file mode 100644 index 8a5acabfefa10..0000000000000 --- a/Formula/gitfs.rb +++ /dev/null @@ -1,100 +0,0 @@ -class Gitfs < Formula - include Language::Python::Virtualenv - - desc "Version controlled file system" - homepage "https://www.presslabs.com/gitfs" - url "https://github.com/presslabs/gitfs/archive/0.5.2.tar.gz" - sha256 "921e24311e3b8ea3a5448d698a11a747618ee8dd62d5d43a85801de0b111cbf3" - license "Apache-2.0" - revision 3 - head "https://github.com/presslabs/gitfs.git" - - bottle do - cellar :any - sha256 "a2bafe9a8ff3d0b0600c8b1cfc580646f0bf058db47655e0f708efd3c3b36583" => :catalina - sha256 "a1817085b653a485019f22acc6457b6ea858fba6209558991ef6efa72ce34f8d" => :mojave - sha256 "c35d61dcf4f5145067b88526b47c12363f794c30f414db0a56f3ff4251a5708e" => :high_sierra - end - - depends_on "libgit2" - depends_on :osxfuse - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "atomiclong" do - url "https://files.pythonhosted.org/packages/86/8c/70aea8215c6ab990f2d91e7ec171787a41b7fbc83df32a067ba5d7f3324f/atomiclong-0.1.1.tar.gz" - sha256 "cb1378c4cd676d6f243641c50e277504abf45f70f1ea76e446efcdbb69624bbe" - 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 "cffi" do - url "https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz" - sha256 "041c81822e9f84b1d9c401182e174996f0bae9991f33725d059b771744290774" - end - - resource "fusepy" do - url "https://files.pythonhosted.org/packages/04/0b/4506cb2e831cea4b0214d3625430e921faaa05a7fb520458c75a2dbd2152/fusepy-3.0.1.tar.gz" - sha256 "72ff783ec2f43de3ab394e3f7457605bf04c8cf288a2f4068b4cde141d4ee6bd" - end - - resource "pygit2" do - url "https://files.pythonhosted.org/packages/1d/c4/e0ba65178512a724a86b39565d7f9286c16d7f8e45e2f665973065c4a495/pygit2-1.1.1.tar.gz" - sha256 "9255d507d5d87bf22dfd57997a78908010331fc21f9a83eca121a53f657beb3c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - resource "raven" do - url "https://files.pythonhosted.org/packages/79/57/b74a86d74f96b224a477316d418389af9738ba7a63c829477e7a86dd6f47/raven-6.10.0.tar.gz" - sha256 "3fa6de6efa2493a7c827472e984ce9b020797d0da16f1db67197bcc23c8fae54" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - def install - virtualenv_install_with_resources - end - - def caveats - <<~EOS - gitfs clones repos in /var/lib/gitfs. You can either create it with - sudo mkdir -m 1777 /var/lib/gitfs or use another folder with the - repo_path argument. - - Also make sure OSXFUSE is properly installed by running brew info osxfuse. - EOS - end - - test do - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - - (testpath/"test.py").write <<~EOS - import gitfs - import pygit2 - pygit2.init_repository('testing/.git', True) - EOS - - system Formula["python@3.8"].opt_bin/"python3", "test.py" - assert_predicate testpath/"testing/.git/config", :exist? - cd "testing" do - system "git", "remote", "add", "homebrew", "https://github.com/Homebrew/homebrew.git" - assert_match "homebrew", shell_output("git remote") - end - end -end diff --git a/Formula/gitg.rb b/Formula/gitg.rb deleted file mode 100644 index de1175a5f3fd1..0000000000000 --- a/Formula/gitg.rb +++ /dev/null @@ -1,146 +0,0 @@ -class Gitg < Formula - desc "GNOME GUI client to view git repositories" - homepage "https://wiki.gnome.org/Apps/Gitg" - url "https://download.gnome.org/sources/gitg/3.32/gitg-3.32.1.tar.xz" - sha256 "24a4aabf8a42aa2e783e1fb5996ebb3c2a82a01b9689269f1329517ef124ef5a" - revision 4 - - bottle do - sha256 "5729e6dfac4f8529ded23111c81367aae5fdb56e16cc5770af94d9612817af75" => :catalina - sha256 "689dab137da9bc087f0d97d9400f0aaa64cc68a5c232be6c9be4c10381915268" => :mojave - sha256 "080ea91b644fa99b32620a44bfd3b4b301353db6782320a97465c54c1cde573c" => :high_sierra - end - - depends_on "intltool" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "adwaita-icon-theme" - depends_on "gobject-introspection" - depends_on "gtk+3" - depends_on "gtksourceview3" - depends_on "gtkspell3" - depends_on "hicolor-icon-theme" - depends_on "libdazzle" - depends_on "libgee" - depends_on "libgit2" - depends_on "libgit2-glib" - depends_on "libpeas" - depends_on "libsecret" - depends_on "libsoup" - - # Fix libgitg compile on macOS - # Remove for next version - patch do - url "https://gitlab.gnome.org/GNOME/gitg/-/merge_requests/142.diff" - sha256 "b9b842d1be3e435ce14a57d30702138a0e08ba0f9ef95249876fc05aeac2417c" - end - - def install - ENV["DESTDIR"] = "/" - - mkdir "build" do - system "meson", *std_meson_args, "-Dpython=false", ".." - 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 - # test executable - assert_match version.to_s, shell_output("#{bin}/gitg --version") - # test API - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType gtype = gitg_stage_status_file_get_type(); - 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"] - gobject_introspection = Formula["gobject-introspection"] - gtkx3 = Formula["gtk+3"] - harfbuzz = Formula["harfbuzz"] - libepoxy = Formula["libepoxy"] - libffi = Formula["libffi"] - libgee = Formula["libgee"] - libgit2 = Formula["libgit2"] - libgit2_glib = Formula["libgit2-glib"] - libpng = Formula["libpng"] - libsoup = Formula["libsoup"] - 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#{gobject_introspection.opt_include}/gobject-introspection-1.0 - -I#{gtkx3.opt_include}/gtk-3.0 - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/libgitg-1.0 - -I#{libepoxy.opt_include} - -I#{libgee.opt_include}/gee-0.8 - -I#{libffi.opt_lib}/libffi-3.0.13/include - -I#{libgit2}/include - -I#{libgit2_glib.opt_include}/libgit2-glib-1.0 - -I#{libpng.opt_include}/libpng16 - -I#{libsoup.opt_include}/libsoup-2.4 - -I#{pango.opt_include}/pango-1.0 - -I#{pixman.opt_include}/pixman-1 - -DGIT_SSH=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#{gobject_introspection.opt_lib} - -L#{gtkx3.opt_lib} - -L#{libgee.opt_lib} - -L#{libgit2.opt_lib} - -L#{libgit2_glib.opt_lib} - -L#{libsoup.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lcairo - -lcairo-gobject - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lgirepository-1.0 - -lgit2 - -lgit2-glib-1.0 - -lgitg-1.0 - -lglib-2.0 - -lgmodule-2.0 - -lgobject-2.0 - -lgthread-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/github-keygen.rb b/Formula/github-keygen.rb deleted file mode 100644 index 45fef3ed0c85f..0000000000000 --- a/Formula/github-keygen.rb +++ /dev/null @@ -1,18 +0,0 @@ -class GithubKeygen < Formula - desc "Bootstrap GitHub SSH configuration" - homepage "https://github.com/dolmen/github-keygen" - url "https://github.com/dolmen/github-keygen/archive/v1.305.tar.gz" - sha256 "5a0a68ed9e3eb1c0e3b783c250e0790fffe17fc1a663cefa1348560ff040b940" - license "GPL-3.0" - head "https://github.com/dolmen/github-keygen.git" - - bottle :unneeded - - def install - bin.install "github-keygen" - end - - test do - system "#{bin}/github-keygen" - end -end diff --git a/Formula/github-markdown-toc.rb b/Formula/github-markdown-toc.rb deleted file mode 100644 index d51b951514d00..0000000000000 --- a/Formula/github-markdown-toc.rb +++ /dev/null @@ -1,27 +0,0 @@ -class GithubMarkdownToc < Formula - desc "Easy TOC creation for GitHub README.md (in go)" - homepage "https://github.com/ekalinin/github-markdown-toc.go" - url "https://github.com/ekalinin/github-markdown-toc.go/archive/1.0.0.tar.gz" - sha256 "0a13627a29114ee817160ecd3eba130c05f95c4aeedb9d0805d8b5a587fce55a" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b4f9d659136a64866c45db6175dd57c366a05b99228e59c889714ae07810a9d9" => :catalina - sha256 "599edae04915747981605739964b0f496e22d434005be54cc7102ff64e592ba7" => :mojave - sha256 "44e9a44b52c69571064b4d316f99b1b0ba9b87ac0453e2f0e69a8da65513c9f7" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-trimpath", "-o", bin/"gh-md-toc" - end - - test do - (testpath/"README.md").write("# Header") - assert_match version.to_s, shell_output("#{bin}/gh-md-toc --version 2>&1") - assert_match "* [Header](#header)", shell_output("#{bin}/gh-md-toc ./README.md") - end -end diff --git a/Formula/github-release.rb b/Formula/github-release.rb deleted file mode 100644 index eacdd2dc05428..0000000000000 --- a/Formula/github-release.rb +++ /dev/null @@ -1,29 +0,0 @@ -class GithubRelease < Formula - desc "Create and edit releases on Github (and upload artifacts)" - homepage "https://github.com/github-release/github-release" - url "https://github.com/github-release/github-release/archive/v0.8.1.tar.gz" - sha256 "c32d615e94cfa1d7c64af5ca84820bfc6193c867b0e9041b4e21b40f0b3df307" - license "MIT" - head "https://github.com/github-release/github-release.git" - - bottle do - cellar :any_skip_relocation - sha256 "67399d81e62c8b1fb7d5b26ebea79de5d806757cd194d2055dcd5dc8935167e2" => :catalina - sha256 "3640960eb97bed10dfe75237cc61b3e8fb36f526c9d50c6820cd07c841432842" => :mojave - sha256 "53b5ef103a6190a891f53a5c52019ab2e12e31f15f4f97775cb2cb169befefa1" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - system "make" - bin.install "github-release" - end - - test do - system "#{bin}/github-release", "info", "--user", "github-release", - "--repo", "github-release", - "--tag", "v#{version}" - end -end diff --git a/Formula/gitlab-gem.rb b/Formula/gitlab-gem.rb deleted file mode 100644 index ceb0be97d61c8..0000000000000 --- a/Formula/gitlab-gem.rb +++ /dev/null @@ -1,65 +0,0 @@ -class GitlabGem < Formula - desc "Ruby client and CLI for GitLab API" - homepage "https://github.com/NARKOZ/gitlab" - url "https://github.com/NARKOZ/gitlab/archive/v4.16.0.tar.gz" - sha256 "e1e3e89ce60c214c21825a2deb42733367e7c2e8d88f9d1f5b29192b55c8ea1e" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "02dd1bfa7cb3872750c0945d794eda87f140c31acd53b501e50cfe027de956e0" => :catalina - sha256 "1380776bfb8fdab91795e7ce8e680c9a11ae6eb4c4b12b089d2ce699ff6da6a2" => :mojave - sha256 "e28e60dbbef4c007ca168ba0047a0293d5eb36569911b61ba89c93286ca69dab" => :high_sierra - end - - uses_from_macos "ruby", :since => :catalina - - resource "httparty" do - url "https://rubygems.org/gems/httparty-0.18.0.gem" - sha256 "c6f77f117ca6e7aeaf5405d0992edd43f19f4fa5eea79e9a4fdfdb287cfeee6f" - end - - resource "mime-types" do - url "https://rubygems.org/gems/mime-types-3.3.1.gem" - sha256 "708f737e28ceef48b9a1bc041aa9eec46fa36eb36acb95e6b64a9889131541fe" - end - - resource "mime-types-data" do - url "https://rubygems.org/gems/mime-types-data-3.2020.0512.gem" - sha256 "a31c1705fec7fc775749742c52964a0e012968b43939e141a74f43ffecd6e5fc" - end - - resource "multi_xml" do - url "https://rubygems.org/gems/multi_xml-0.6.0.gem" - sha256 "d24393cf958adb226db884b976b007914a89c53ad88718e25679d7008823ad52" - end - - resource "terminal-table" do - url "https://rubygems.org/gems/terminal-table-1.8.0.gem" - sha256 "13371f069af18e9baa4e44d404a4ada9301899ce0530c237ac1a96c19f652294" - end - - resource "unicode-display_width" do - url "https://rubygems.org/gems/unicode-display_width-1.7.0.gem" - sha256 "cad681071867a4cf52613412e379e39e85ac72b1d236677a2001187d448b231a" - 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", "gitlab.gemspec" - system "gem", "install", "--ignore-dependencies", "gitlab-#{version}.gem" - (bin/"gitlab").write_env_script libexec/"bin/gitlab", :GEM_HOME => ENV["GEM_HOME"] - end - - test do - ENV["GITLAB_API_ENDPOINT"] = "https://example.com/" - ENV["GITLAB_API_PRIVATE_TOKEN"] = "token" - output = shell_output("#{bin}/gitlab user 2>&1", 1) - assert_match "Server responded with code 404", output - end -end diff --git a/Formula/gitlab-runner.rb b/Formula/gitlab-runner.rb deleted file mode 100644 index 561615f52009c..0000000000000 --- a/Formula/gitlab-runner.rb +++ /dev/null @@ -1,80 +0,0 @@ -class GitlabRunner < Formula - desc "The official GitLab CI runner written in Go" - homepage "https://gitlab.com/gitlab-org/gitlab-runner" - url "https://gitlab.com/gitlab-org/gitlab-runner.git", - :tag => "v13.1.1", - :revision => "6fbc747426d91528fcc5a7a3b47b2ef3e430bd3a" - license "MIT" - head "https://gitlab.com/gitlab-org/gitlab-runner.git" - - bottle do - cellar :any_skip_relocation - sha256 "3a91a0ef04cf878b0e98d0897ce58888b3872e4844f820adc7dfcfa9204653a0" => :catalina - sha256 "c30a9bff71c9148659bc9893231782aeb10e33b7c368e00325032dbaa8027cec" => :mojave - sha256 "7395fd0fc8f8344bf51a4a0bc78374f8e4131a98c5fd3308674cfddcac40ea8a" => :high_sierra - end - - depends_on "go" => :build - - def install - dir = buildpath/"src/gitlab.com/gitlab-org/gitlab-runner" - dir.install buildpath.children - - cd dir do - proj = "gitlab.com/gitlab-org/gitlab-runner" - commit = Utils.safe_popen_read("git", "rev-parse", "--short=8", "HEAD").chomp - branch = version.to_s.split(".")[0..1].join("-") + "-stable" - built = Time.new.strftime("%Y-%m-%dT%H:%M:%S%:z") - system "go", "build", "-ldflags", <<~EOS - -X #{proj}/common.NAME=gitlab-runner - -X #{proj}/common.VERSION=#{version} - -X #{proj}/common.REVISION=#{commit} - -X #{proj}/common.BRANCH=#{branch} - -X #{proj}/common.BUILT=#{built} - EOS - - bin.install "gitlab-runner" - prefix.install_metafiles - end - end - - plist_options :manual => "gitlab-runner start" - - def plist - <<~EOS - - - - - SessionCreate - KeepAlive - RunAtLoad - Disabled - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/gitlab-runner - run - --working-directory - #{ENV["HOME"]} - --config - #{ENV["HOME"]}/.gitlab-runner/config.toml - --service - gitlab-runner - --syslog - - EnvironmentVariables - - PATH - /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin - - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/gitlab-runner --version") - end -end diff --git a/Formula/gitleaks.rb b/Formula/gitleaks.rb deleted file mode 100644 index e90a01d40fd74..0000000000000 --- a/Formula/gitleaks.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Gitleaks < Formula - desc "Audit git repos for secrets" - homepage "https://github.com/zricethezav/gitleaks" - url "https://github.com/zricethezav/gitleaks/archive/v4.3.1.tar.gz" - sha256 "0a109362ccc1b773407112c8fa81718c09c861fdefdaa19312316aa4f88ef1e0" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "bd93e118160563e46825ee86bfbcedc8894e8799b20a400fe47b4412243f8f12" => :catalina - sha256 "857d0fcf0420198d43a76ff555a2afb893662aae808711e8deb7d0c7604f873d" => :mojave - sha256 "678cd5b4d9e592985bb56e4e20a5f675010eb623b7f61aede5290a72137f640c" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-X github.com/zricethezav/gitleaks/version.Version=#{version}", - *std_go_args - end - - test do - assert_match "remote repository is empty", - shell_output("#{bin}/gitleaks -r https://github.com/gitleakstest/emptyrepo.git", 2) - end -end diff --git a/Formula/gitless.rb b/Formula/gitless.rb deleted file mode 100644 index cca70ecd0132a..0000000000000 --- a/Formula/gitless.rb +++ /dev/null @@ -1,87 +0,0 @@ -class Gitless < Formula - include Language::Python::Virtualenv - - desc "Simplified version control system on top of git" - homepage "https://gitless.com/" - url "https://github.com/gitless-vcs/gitless/archive/v0.8.8.tar.gz" - sha256 "470aab13d51baec2ab54d7ceb6d12b9a2937f72d840516affa0cb34a6360523c" - license "MIT" - revision 4 - - bottle do - cellar :any - sha256 "c0ffed9f5228aecb14175929167812114176ac2df5b9583161c4f3c0f7785da0" => :catalina - sha256 "f72efc4323f531adcb1a38c8d864a4bd464b4a7d67400623479f05d37a4332cd" => :mojave - sha256 "aa526af3aaa79be5c7d86d4265589194e331766ba138e5b74894ad8037224c5c" => :high_sierra - end - - depends_on "libgit2" - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "args" do - url "https://files.pythonhosted.org/packages/e5/1c/b701b3f4bd8d3667df8342f311b3efaeab86078a840fb826bd204118cc6b/args-0.1.0.tar.gz" - sha256 "a785b8d837625e9b61c39108532d95b85274acd679693b71ebb5156848fcf814" - 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 "cffi" do - url "https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz" - sha256 "041c81822e9f84b1d9c401182e174996f0bae9991f33725d059b771744290774" - end - - resource "clint" do - url "https://files.pythonhosted.org/packages/3d/b4/41ecb1516f1ba728f39ee7062b9dac1352d39823f513bb6f9e8aeb86e26d/clint-0.5.1.tar.gz" - sha256 "05224c32b1075563d0b16d0015faaf9da43aa214e4a2140e51f08789e7a4c5aa" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz" - sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226" - end - - resource "pygit2" do - url "https://files.pythonhosted.org/packages/1d/c4/e0ba65178512a724a86b39565d7f9286c16d7f8e45e2f665973065c4a495/pygit2-1.1.1.tar.gz" - sha256 "9255d507d5d87bf22dfd57997a78908010331fc21f9a83eca121a53f657beb3c" - end - - resource "sh" do - url "https://files.pythonhosted.org/packages/7c/71/199d27d3e7e78bf448bcecae0105a1d5b29173ffd2bbadaa95a74c156770/sh-1.12.14.tar.gz" - sha256 "b52bf5833ed01c7b5c5fb73a7f71b3d98d48e9b9b8764236237bdc7ecae850fc" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - # Allow to be dependent on pygit2 1.1.1 - # Remove for next version - patch do - url "https://github.com/gitless-vcs/gitless/pull/230.patch?full_index=1" - sha256 "fd4ef60552add5f95944083a8ba867a3b34a197bdbad6b13afcf5ab29ebe09be" - end - - def install - virtualenv_install_with_resources - end - - test do - system "git", "config", "--global", "user.email", '"test@example.com"' - system "git", "config", "--global", "user.name", '"Test"' - system bin/"gl", "init" - %w[haunted house].each { |f| touch testpath/f } - system bin/"gl", "track", "haunted", "house" - system bin/"gl", "commit", "-m", "Initial Commit" - assert_equal "haunted\nhouse", shell_output("git ls-files").strip - end -end diff --git a/Formula/gitmoji.rb b/Formula/gitmoji.rb deleted file mode 100644 index 7f5890b1b74b4..0000000000000 --- a/Formula/gitmoji.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "language/node" - -class Gitmoji < Formula - desc "Emoji guide for your commit messages" - homepage "https://gitmoji.carloscuesta.me/" - url "https://registry.npmjs.org/gitmoji-cli/-/gitmoji-cli-3.2.6.tgz" - sha256 "e10d84ee451f236e3be5ed487557c4b7bab46338d5115f5c58ecf4f6862b8bd6" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "625e829cad6317c55ba225ad7429bdc44b5f2f0e8542913150fdbcf995f72cda" => :catalina - sha256 "0a9e423e8d354c7a1b5dac4cc8aee6455c54081bc5a6f81fdf1d987afc0a1dd1" => :mojave - sha256 "61f3bfbad5458f75bbaf554eeca5d6840a0aaa1e27702ef210a6ec3aed81013f" => :high_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_match ":bug:", shell_output("#{bin}/gitmoji --search bug") - end -end diff --git a/Formula/gitslave.rb b/Formula/gitslave.rb deleted file mode 100644 index 9ec43e48f0b1e..0000000000000 --- a/Formula/gitslave.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Gitslave < Formula - desc "Create group of related repos with one as superproject" - homepage "https://gitslave.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gitslave/gitslave-2.0.2.tar.gz" - sha256 "8aa3dcb1b50418cc9cee9bee86bb4b279c1c5a34b7adc846697205057d4826f0" - - bottle do - cellar :any_skip_relocation - sha256 "dd32d79091815434db1c465b3f7caa6c6c346449558d82023a6d88ff92c6ba6b" => :catalina - sha256 "0a6c3ead2d8834fb3e728c06bb72d1102ff516cfafd8283e96b03c5a13a44b89" => :mojave - sha256 "53cbfbd7d9f86fa6ee98b46356d76db4c952adbf9e3cf913f0a3136da56bcb69" => :high_sierra - sha256 "3ccd021a4393d137eed5c0dfdfe94b325b6142258a7090ad04f9166039efa52d" => :sierra - sha256 "e556bf6f7ddfa3e9f6a9b726d80a35404270c96e36ada122fd16d8946394aaa6" => :el_capitan - sha256 "395794a75f26acdf034f4ab1541cd9af327d13309517e2553bbcb1fdb4bb0f85" => :yosemite - sha256 "f960d16d68868685850464321b5e4f82be4b85b1e3baa9392f185773818e596f" => :mavericks - end - - def install - system "make", "install", "prefix=#{prefix}" - end - - test do - output = shell_output("#{bin}/gits --version") - assert_match "gits version #{version}", output - end -end diff --git a/Formula/gitter-cli.rb b/Formula/gitter-cli.rb deleted file mode 100644 index 77919208e6285..0000000000000 --- a/Formula/gitter-cli.rb +++ /dev/null @@ -1,30 +0,0 @@ -require "language/node" - -class GitterCli < Formula - desc "Extremely simple Gitter client for terminals" - homepage "https://github.com/RodrigoEspinosa/gitter-cli" - url "https://github.com/RodrigoEspinosa/gitter-cli/archive/v0.8.5.tar.gz" - sha256 "c4e335620fc1be50569f3b7543c28ba2c6121b1c7e6d041464b29a31b3d84c25" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "b65d3049c2aeb35b63aeece9d9a08f224ec9e4b3aa2d64c1d8a7850ea631f836" => :catalina - sha256 "07256d350f14363a87f7bcf2457bd963f3dbe8f87cbb988319319340b02911d4" => :mojave - sha256 "8a9a8bea2541bd954d589f4195665c8f2a36090fba16a6b652f88337a029c117" => :high_sierra - sha256 "6b0c1af334ab94692271f4e88b3f3b44adb8f2e7738cd68cdc20719dbb4f315f" => :sierra - sha256 "4503b65ec4122d7cb51e8173168dc41dc4e57f978f4246697f9a3bf768f8c9cb" => :el_capitan - sha256 "d4b1a539db31e5a04e05fc982c6b9961bde7eae94de06d1addc2dc4346f696e9" => :yosemite - end - - depends_on "node" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink libexec/"bin/gitter-cli" - end - - test do - assert_match "access token", pipe_output("#{bin}/gitter-cli authorize") - end -end diff --git a/Formula/gitui.rb b/Formula/gitui.rb deleted file mode 100644 index 29a04128d4c55..0000000000000 --- a/Formula/gitui.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Gitui < Formula - desc "Blazing fast terminal-ui for git written in rust" - homepage "https://github.com/extrawurst/gitui" - url "https://github.com/extrawurst/gitui/archive/v0.8.1.tar.gz" - sha256 "41662bb14ae89b9f25c2a956571a2855f977273261228f1ceba856fc8b7f2eca" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "b94f377f1976908862b4c0a7245066882b12b22c30917ce8c4cc200820fbdf9c" => :catalina - sha256 "91dc87cfe10bec502b3a3b8085164fcfc23061c1f0c5a3f6fe8f459bb69e3191" => :mojave - sha256 "dacd4f58f87566bf594b8985c4a03446a9523607b05505b177f8823a9ab3084c" => :high_sierra - end - - depends_on "rust" => :build - - uses_from_macos "libiconv" - - def install - system "cargo", "install", *std_cargo_args - end - - test do - system "git", "clone", "https://github.com/extrawurst/gitui.git" - (testpath/"gitui").cd { system "git", "checkout", "v0.7.0" } - - input, _, wait_thr = Open3.popen2 "script -q screenlog.ansi" - input.puts "stty rows 80 cols 130" - input.puts "env LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 TERM=xterm #{bin}/gitui -d gitui" - sleep 1 - # select log tab - input.puts "2" - sleep 1 - # inspect commit (right arrow key) - input.puts "\e[C" - sleep 1 - input.close - - screenlog = (testpath/"screenlog.ansi").read - # remove ANSI colors - screenlog.encode!("UTF-8", "binary", - :invalid => :replace, - :undef => :replace, - :replace => "") - screenlog.gsub! /\e\[([;\d]+)?m/, "" - assert_match "Author: Stephan Dilly", screenlog - assert_match "Date: 2020-06-15", screenlog - assert_match "SHA: 9c2a31846c417d8775a346ceaf38e77b710d3aab", screenlog - ensure - Process.kill("TERM", wait_thr.pid) - end -end diff --git a/Formula/gitup.rb b/Formula/gitup.rb deleted file mode 100644 index 2fe2ae1493920..0000000000000 --- a/Formula/gitup.rb +++ /dev/null @@ -1,89 +0,0 @@ -class Gitup < Formula - include Language::Python::Virtualenv - - desc "Update multiple git repositories at once" - homepage "https://github.com/earwig/git-repo-updater" - url "https://github.com/earwig/git-repo-updater.git", - :tag => "v0.5.1", - :revision => "b502b2eaa46a6a10d9db228209f984bb235444a7" - license "MIT" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "61b9abe9e481e9fa3a86074756d065f48f92cf71420e6855e95ad1ecdc92cecb" => :catalina - sha256 "2e1fb0d6519682a80737b73136fd6cf1c81928d993e88e835cb053725ff40bf2" => :mojave - sha256 "63c2169d68aed5aca9a91bba014cdb96238b61316267691dd7c63ef566b89fc8" => :high_sierra - end - - depends_on "python@3.8" - - resource "colorama" do - url "https://files.pythonhosted.org/packages/e6/76/257b53926889e2835355d74fec73d82662100135293e17d382e2b74d1669/colorama-0.3.9.tar.gz" - sha256 "48eb22f4f8461b1df5734a074b57042430fb06e1d61bd1e11b078c0fe6d7a1f1" - end - - resource "gitdb2" do - url "https://files.pythonhosted.org/packages/b9/36/4bdb753087a9232899ac482ee2d5da25f50b63998d661aa4e8170acd95b5/gitdb2-2.0.4.tar.gz" - sha256 "bb4c85b8a58531c51373c89f92163b92f30f81369605a67cd52d1fc21246c044" - end - - resource "GitPython" do - url "https://files.pythonhosted.org/packages/4d/e8/98e06d3bc954e3c5b34e2a579ddf26255e762d21eb24fede458eff654c51/GitPython-2.1.11.tar.gz" - sha256 "8237dc5bfd6f1366abeee5624111b9d6879393d84745a507de0fda86043b65a8" - end - - resource "smmap2" do - url "https://files.pythonhosted.org/packages/ad/e9/0fb974b182ff41d28ad267d0b4201b35159619eb610ea9a2e036817cb0b8/smmap2-2.0.4.tar.gz" - sha256 "dc216005e529d57007ace27048eb336dcecb7fc413cfb3b2f402bb25972b69c6" - end - - def install - virtualenv_install_with_resources - end - - test do - def prepare_repo(uri, local_head) - system "git", "init" - system "git", "remote", "add", "origin", uri - system "git", "fetch", "origin" - system "git", "checkout", local_head - system "git", "reset", "--hard" - system "git", "checkout", "-b", "master" - system "git", "branch", "--set-upstream-to=origin/master", "master" - end - - first_head_start = "f47ab45abdbc77e518776e5dc44f515721c523ae" - mkdir "first" do - prepare_repo("https://github.com/pr0d1r2/homebrew-contrib.git", first_head_start) - end - - second_head_start = "f863d5ca9e39e524e8c222428e14625a5053ed2b" - mkdir "second" do - prepare_repo("https://github.com/pr0d1r2/homebrew-cask-games.git", second_head_start) - end - - system bin/"gitup", "first", "second" - - first_head = `cd first ; git rev-parse HEAD`.split.first - assert_not_equal first_head, first_head_start - - second_head = `cd second ; git rev-parse HEAD`.split.first - assert_not_equal second_head, second_head_start - - third_head_start = "f47ab45abdbc77e518776e5dc44f515721c523ae" - mkdir "third" do - prepare_repo("https://github.com/pr0d1r2/homebrew-contrib.git", third_head_start) - end - - system bin/"gitup", "--add", "third" - - system bin/"gitup" - third_head = `cd third ; git rev-parse HEAD`.split.first - assert_not_equal third_head, third_head_start - - assert_match %r{#{Dir.pwd}/third}, `#{bin}/gitup --list`.strip - - system bin/"gitup", "--delete", "#{Dir.pwd}/third" - end -end diff --git a/Formula/gitversion.rb b/Formula/gitversion.rb deleted file mode 100644 index f45fa12a878a1..0000000000000 --- a/Formula/gitversion.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Gitversion < Formula - desc "Easy semantic versioning for projects using Git" - homepage "https://github.com/GitTools/GitVersion" - url "https://github.com/GitTools/GitVersion/releases/download/5.0.1/GitVersion-bin-fullfx-v5.0.1.zip" - sha256 "9b543d3e42e0d5e6fab0b44553cb6bbbb0e31431030ef761fc1a50c845fd166a" - license "MIT" - - bottle :unneeded - - depends_on "mono" - - uses_from_macos "icu4c" - - def install - libexec.install Dir["*"] - (bin/"gitversion").write <<~EOS - #!/bin/sh - exec "#{Formula["mono"].opt_bin}/mono" "#{libexec}/GitVersion.exe" "$@" - EOS - end - - test do - # Circumvent GitVersion's build server detection scheme: - ENV["JENKINS_URL"] = nil - - (testpath/"test.txt").write("test") - system "git", "init" - system "git", "add", "test.txt" - system "git", "commit", "-q", "--author='Test '", "--message='Test'" - assert_match '"FullSemVer":"0.1.0+0"', shell_output("#{bin}/gitversion -output json") - end -end diff --git a/Formula/gjs.rb b/Formula/gjs.rb deleted file mode 100644 index ecec0cefa83be..0000000000000 --- a/Formula/gjs.rb +++ /dev/null @@ -1,120 +0,0 @@ -class Gjs < Formula - desc "JavaScript Bindings for GNOME" - homepage "https://gitlab.gnome.org/GNOME/gjs/wikis/Home" - url "https://download.gnome.org/sources/gjs/1.64/gjs-1.64.4.tar.xz" - sha256 "a3cc3a8eda87074b2c363ffe28b29a5202d7f12914b6973f199acf2d1816d44c" - - bottle do - sha256 "48ab51876b8cb4b93914f6ec9f97134d19883a3aecdf0fceeb39ba4565820c84" => :catalina - sha256 "3605114b6a6168aac10d3544cb44a8c543b94d1938f22edfe3b898e1f967136c" => :mojave - sha256 "37212a55eeac304e95953c4681c42a6eddf82eb62eca40bedc459c943ce55580" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "gobject-introspection" - depends_on "gtk+3" - depends_on "llvm" - depends_on "nspr" - depends_on "readline" - - resource "autoconf@213" do - 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" - end - - resource "mozjs68" do - url "https://archive.mozilla.org/pub/firefox/releases/68.8.0esr/source/firefox-68.8.0esr.source.tar.xz" - sha256 "fa5b2266d225878d4b35694678f79fd7e7a6d3c62759a40326129bd90f63e842" - end - - def install - ENV.cxx11 - - resource("autoconf@213").stage do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--program-suffix=213", - "--prefix=#{buildpath}/autoconf", - "--infodir=#{buildpath}/autoconf/share/info", - "--datadir=#{buildpath}/autoconf/share" - system "make", "install" - end - - resource("mozjs68").stage do - inreplace "config/rules.mk", - "-install_name $(_LOADER_PATH)/$(SHARED_LIBRARY) ", - "-install_name #{lib}/$(SHARED_LIBRARY) " - inreplace "old-configure", "-Wl,-executable_path,${DIST}/bin", "" - inreplace "build/moz.configure/toolchain.configure", - "sdk_max_version = Version('10.14')", - "sdk_max_version = Version('10.16')" - - mkdir("build") do - ENV["PYTHON"] = "python" - ENV["_MACOSX_DEPLOYMENT_TARGET"] = ENV["MACOSX_DEPLOYMENT_TARGET"] - ENV["CC"] = Formula["llvm"].opt_bin/"clang" - ENV["CXX"] = Formula["llvm"].opt_bin/"clang++" - ENV.prepend_path "PATH", buildpath/"autoconf/bin" - system "../js/src/configure", "--prefix=#{prefix}", - "--with-system-nspr", - "--with-system-zlib", - "--with-system-icu", - "--enable-readline", - "--enable-shared-js", - "--enable-optimize", - "--enable-release", - "--with-intl-api", - "--disable-jemalloc", - "--disable-xcode-checks" - system "make" - system "make", "install" - rm Dir["#{bin}/*"] - end - # headers were installed as softlinks, which is not acceptable - cd(include.to_s) do - `find . -type l`.chomp.split.each do |link| - header = File.readlink(link) - rm link - cp header, link - end - end - ENV.append_path "PKG_CONFIG_PATH", "#{lib}/pkgconfig" - rm "#{lib}/libjs_static.ajs" - end - - # ensure that we don't run the meson post install script - ENV["DESTDIR"] = "/" - - args = std_meson_args + %w[ - -Dprofiler=disabled - -Dinstalled_tests=false - -Dbsymbolic_functions=false - -Dskip_dbus_tests=true - -Dskip_gtk_tests=true - ] - - mkdir "build" do - system "meson", *args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - def post_install - system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" - end - - test do - (testpath/"test.js").write <<~EOS - #!/usr/bin/env gjs - const GLib = imports.gi.GLib; - if (31 != GLib.Date.get_days_in_month(GLib.DateMonth.JANUARY, 2000)) - imports.system.exit(1) - EOS - system "#{bin}/gjs", "test.js" - end -end diff --git a/Formula/gkrellm.rb b/Formula/gkrellm.rb deleted file mode 100644 index 68ce4d2af46d6..0000000000000 --- a/Formula/gkrellm.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Gkrellm < Formula - desc "Extensible GTK system monitoring application" - homepage "https://billw2.github.io/gkrellm/gkrellm.html" - url "http://gkrellm.srcbox.net/releases/gkrellm-2.3.11.tar.bz2" - sha256 "1ee0643ed9ed99f88c1504c89d9ccb20780cf29319c904b68e80a8e7c8678c06" - revision 2 - - bottle do - sha256 "17b040897e4feebebcca29a8d8f69fdf0cd789f07a3e479b0fe5f5f172436289" => :catalina - sha256 "641f4e27054dacd25dd91dc2f6d8d608918321ae06cf06eb17f2d62132125e7a" => :mojave - sha256 "71f4e92d308a39b38ac97bf2f06cea12ccee0072cbd27b8443e1d33f11fb7c5b" => :high_sierra - sha256 "f90adbb22bdbc169d95c932591d4c5a7c5e869f61c79744bb743c50a4698acc9" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "atk" - depends_on "cairo" - depends_on "fontconfig" - depends_on "freetype" - depends_on "gdk-pixbuf" - depends_on "gettext" - depends_on "glib" - depends_on "gtk+" - depends_on "openssl@1.1" - depends_on "pango" - - def install - system "make", "INSTALLROOT=#{prefix}", "macosx" - system "make", "INSTALLROOT=#{prefix}", "install" - end - - test do - pid = fork do - exec "#{bin}/gkrellmd --pidfile #{testpath}/test.pid" - end - sleep 2 - - begin - assert_predicate testpath/"test.pid", :exist? - ensure - Process.kill "SIGINT", pid - Process.wait pid - end - end -end diff --git a/Formula/gl2ps.rb b/Formula/gl2ps.rb deleted file mode 100644 index 66d6c3cd43a73..0000000000000 --- a/Formula/gl2ps.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Gl2ps < Formula - desc "OpenGL to PostScript printing library" - homepage "https://www.geuz.org/gl2ps/" - url "https://geuz.org/gl2ps/src/gl2ps-1.4.2.tgz" - sha256 "8d1c00c1018f96b4b97655482e57dcb0ce42ae2f1d349cd6d4191e7848d9ffe9" - - bottle do - cellar :any - sha256 "dbdfe5d8458e1224941d6e5707b725ab6872333112dc408dbf35202eddbc8d15" => :catalina - sha256 "bc857ec44c73448acf748dea7a699e1018a874196dec19659a63aa70a7b5e970" => :mojave - sha256 "6c36dc780b0579f44057cadddb9e1a2e369e2ba9205b68d6c81ebd79defc45b4" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libpng" - - on_linux do - depends_on "freeglut" - end - - def install - # Prevent linking against X11's libglut.dylib when it's present - # Reported to upstream's mailing list gl2ps@geuz.org (1st April 2016) - # https://www.geuz.org/pipermail/gl2ps/2016/000433.html - # Reported to cmake's bug tracker, as well (1st April 2016) - # https://public.kitware.com/Bug/view.php?id=16045 - system "cmake", ".", "-DGLUT_glut_LIBRARY=/System/Library/Frameworks/GLUT.framework", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(int argc, char *argv[]) - { - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_DEPTH); - glutInitWindowSize(400, 400); - glutInitWindowPosition(100, 100); - glutCreateWindow(argv[0]); - GLint viewport[4]; - glGetIntegerv(GL_VIEWPORT, viewport); - FILE *fp = fopen("test.eps", "wb"); - GLint buffsize = 0, state = GL2PS_OVERFLOW; - while( state == GL2PS_OVERFLOW ){ - buffsize += 1024*1024; - gl2psBeginPage ( "Test", "Homebrew", viewport, - GL2PS_EPS, GL2PS_BSP_SORT, GL2PS_SILENT | - GL2PS_SIMPLE_LINE_OFFSET | GL2PS_NO_BLENDING | - GL2PS_OCCLUSION_CULL | GL2PS_BEST_ROOT, - GL_RGBA, 0, NULL, 0, 0, 0, buffsize, - fp, "test.eps" ); - gl2psText("Homebrew Test", "Courier", 12); - state = gl2psEndPage(); - } - fclose(fp); - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "-lgl2ps", "-framework", "OpenGL", "-framework", "GLUT", - "-framework", "Cocoa", "test.c", "-o", "test" - system "./test" - assert_predicate testpath/"test.eps", :exist? - assert_predicate File.size("test.eps"), :positive? - end -end diff --git a/Formula/glade.rb b/Formula/glade.rb deleted file mode 100644 index 39a90699fbab2..0000000000000 --- a/Formula/glade.rb +++ /dev/null @@ -1,119 +0,0 @@ -class Glade < Formula - desc "RAD tool for the GTK+ and GNOME environment" - homepage "https://glade.gnome.org/" - url "https://download.gnome.org/sources/glade/3.36/glade-3.36.0.tar.xz" - sha256 "19b546b527cc46213ccfc8022d49ec57e618fe2caa9aa51db2d2862233ea6f08" - revision 1 - - bottle do - sha256 "9131bb138ba8e7b7b2f3d593342846fdabebd28b33c755ae0feaba4f52a39ab9" => :catalina - sha256 "2c95e5cb5f386fbacf1fb4ca17b2dc9ad6c6b2d83b9d0891460905f87cb608c4" => :mojave - sha256 "89b48942bd5c136dae47bf534e6f99d425aebd9165432c07411ce341d210cda9" => :high_sierra - end - - depends_on "docbook-xsl" => :build - depends_on "gobject-introspection" => :build - depends_on "itstool" => :build - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "gettext" - depends_on "gtk+3" - depends_on "gtk-mac-integration" - depends_on "hicolor-icon-theme" - depends_on "libxml2" - - def install - # Find our docbook catalog - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - # Disable icon-cache update - ENV["DESTDIR"] = "/" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-gladeui", - "--enable-introspection" - - system "make" # separate steps required - 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 - # executable test (GUI) - system "#{bin}/glade", "--version" - # API test - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - gboolean glade_util_have_devhelp(); - 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}/libgladeui-2.0 - -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 - -lcairo - -lcairo-gobject - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lgladeui-2 - -lglib-2.0 - -lgobject-2.0 - -lgtk-3 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - -lxml2 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/glances.rb b/Formula/glances.rb deleted file mode 100644 index 8bac6d484b1f5..0000000000000 --- a/Formula/glances.rb +++ /dev/null @@ -1,260 +0,0 @@ -class Glances < Formula - desc "Alternative to top/htop" - homepage "https://nicolargo.github.io/glances/" - url "https://github.com/nicolargo/glances/archive/v3.1.4.1.tar.gz" - sha256 "0347a0b949451fd0022c0f22e54092fe526120a776af1f2bde1ea7ba61d6b792" - license "LGPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "3bc1dc122d7ed7542795ac6b390dea5e7645528439295d29f8f127148425b5c2" => :catalina - sha256 "4f1c3d51bf77bb95586c81bdf5170f5fd2b53d544f06a311d9152c00f4abb038" => :mojave - sha256 "27db703a8a6fd3decc1d96ebed0c0d991c41a74e5a25d1c708a843671be072fd" => :high_sierra - end - - depends_on "python@3.8" - - resource "bernhard" do - url "https://files.pythonhosted.org/packages/51/d4/b2701097f9062321262c4d4e3488fdf127887502b2619e8fd1ae13955a36/bernhard-0.2.6.tar.gz" - sha256 "7efafa3ae1221a465fcbd74c4f78e5ad4a1841b9fa70c95eb38ba103a71bdb9b" - end - - resource "bottle" do - url "https://files.pythonhosted.org/packages/d9/4f/57887a07944140dae0d039d8bc270c249fc7fc4a00744effd73ae2cde0a9/bottle-0.12.18.tar.gz" - sha256 "0819b74b145a7def225c0e83b16a4d5711fde751cd92bae467a69efce720f69e" - end - - resource "cassandra-driver" do - url "https://files.pythonhosted.org/packages/19/bd/b522b200e8a7cc5ace859e9667308a3a302a23d6df09ae087ca2dfbf60c2/cassandra-driver-3.22.0.tar.gz" - sha256 "df825ee4ebb7f7fa33ab028d673530184fe0ee41ea66b2f9ddd478db56145a31" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/bf/9d214a5af07debc6acf7f3f257265618f1db242a3f8e49a9b516f24523a6/certifi-2019.11.28.tar.gz" - sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "CouchDB" do - url "https://files.pythonhosted.org/packages/7c/c8/f94a107eca0c178e5d74c705dad1a5205c0f580840bd1b155cd8a258cb7c/CouchDB-1.2.tar.gz" - sha256 "1386a1a43f25bed3667e3b805222054940d674fa1967fa48e9d2012a18630ab7" - end - - resource "docker" do - url "https://files.pythonhosted.org/packages/96/62/cd321bff4c55532e46f2824df8981fba9ac793d148d410bbdd4b8a98bd3c/docker-4.2.0.tar.gz" - sha256 "ddae66620ab5f4bce769f64bcd7934f880c8abe6aa50986298db56735d0f722e" - end - - resource "elasticsearch" do - url "https://files.pythonhosted.org/packages/94/1a/2369fc9264c655c20908053b59fae7f65ddc47f123d89b533a724ae1d19d/elasticsearch-7.6.0.tar.gz" - sha256 "d228b2d37ac0865f7631335268172dbdaa426adec1da3ed006dddf05134f89c8" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz" - sha256 "b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" - end - - resource "Glances" do - url "https://files.pythonhosted.org/packages/05/a6/420f3bd9add62f7da69bc43033610bcecbd344363a926b8093245f5b9779/Glances-3.1.4.1.tar.gz" - sha256 "22bdaae4ff194516e35d068729ee72aeab506b3d561c2974ddbf58f2f64392b3" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "ifaddr" do - url "https://files.pythonhosted.org/packages/9f/54/d92bda685093ebc70e2057abfa83ef1b3fb0ae2b6357262a3e19dfe96bb8/ifaddr-0.1.6.tar.gz" - sha256 "c19c64882a7ad51a394451dabcbbed72e98b5625ec1e79789924d5ea3e3ecb93" - end - - resource "influxdb" do - url "https://files.pythonhosted.org/packages/d2/0d/351a346886ecbe61211cbfcad8ac73f99f5a9bf526916631c5668dbad601/influxdb-5.2.3.tar.gz" - sha256 "30276c7e04bf7659424c733b239ba2f0804d7a1f3c59ec5dd3f88c56176c8d36" - end - - resource "kafka-python" do - url "https://files.pythonhosted.org/packages/8c/5d/2eda2648fbd9a024721b4d551eb671091a03b564455fe2ad5c643b6b06c3/kafka-python-2.0.1.tar.gz" - sha256 "e59ad42dec8c7d54e3fbba0c1f8b54c44d92a3392d88242962d0c29803f2f6f8" - end - - resource "netifaces" do - url "https://files.pythonhosted.org/packages/0d/18/fd6e9c71a35b67a73160ec80a49da63d1eed2d2055054cc2995714949132/netifaces-0.10.9.tar.gz" - sha256 "2dee9ffdd16292878336a58d04a20f0ffe95555465fee7c9bd23b3490ef2abf3" - end - - resource "nvidia-ml-py3" do - url "https://files.pythonhosted.org/packages/6d/64/cce82bddb80c0b0f5c703bbdafa94bfb69a1c5ad7a79cff00b482468f0d3/nvidia-ml-py3-7.352.0.tar.gz" - sha256 "390f02919ee9d73fe63a98c73101061a6b37fa694a793abf56673320f1f51277" - end - - resource "paho-mqtt" do - url "https://files.pythonhosted.org/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz" - sha256 "e3d286198baaea195c8b3bc221941d25a3ab0e1507fc1779bdb7473806394be4" - end - - resource "pbkdf2" do - url "https://files.pythonhosted.org/packages/02/c0/6a2376ae81beb82eda645a091684c0b0becb86b972def7849ea9066e3d5e/pbkdf2-1.3.tar.gz" - sha256 "ac6397369f128212c43064a2b4878038dab78dab41875364554aaf2a684e6979" - end - - resource "pika" do - url "https://files.pythonhosted.org/packages/8c/6d/a526ad96ffb8aa0d3ab7e8660eb1c9fc964a02e7624112d70e4b63fb2bb7/pika-1.1.0.tar.gz" - sha256 "9fa76ba4b65034b878b2b8de90ff8660a59d925b087c5bb88f8fdbb4b64a1dbf" - end - - resource "ply" do - url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" - sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" - end - - resource "potsdb" do - url "https://files.pythonhosted.org/packages/14/dd/c7c618f87cb6005adf86eafa08e33f2e807dbd2128d992e53d5ee1a87cbc/potsdb-1.0.3.tar.gz" - sha256 "ef8317e45758552c6fe15a5246f93afee6f40c1c7e08dc0469e70adf463ed447" - end - - resource "prometheus_client" do - url "https://files.pythonhosted.org/packages/b3/23/41a5a24b502d35a4ad50a5bb7202a5e1d9a0364d0c12f56db3dbf7aca76d/prometheus_client-0.7.1.tar.gz" - sha256 "71cd24a2b3eb335cb800c7159f423df1bd4dcd5171b234be15e3f31ec9f622da" - end - - resource "protobuf" do - url "https://files.pythonhosted.org/packages/c9/d5/e6e789e50e478463a84bd1cdb45aa408d49a2e1aaffc45da43d10722c007/protobuf-3.11.3.tar.gz" - sha256 "c77c974d1dadf246d789f6dad1c24426137c9091e930dbf50e0a29c1fcf00b1f" - end - - resource "psutil" do - url "https://files.pythonhosted.org/packages/c4/b8/3512f0e93e0db23a71d82485ba256071ebef99b227351f0f5540f744af41/psutil-5.7.0.tar.gz" - sha256 "685ec16ca14d079455892f25bd124df26ff9137664af445563c1bd36629b5e0e" - end - - resource "py-cpuinfo" do - url "https://files.pythonhosted.org/packages/42/60/63f28a5401da733043abe7053e7d9591491b4784c4f87c339bf51215aa0a/py-cpuinfo-5.0.0.tar.gz" - sha256 "2cf6426f776625b21d1db8397d3297ef7acfa59018f02a8779123f3190f18500" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/a4/db/fffec68299e6d7bad3d504147f9094830b704527a7fc098b721d38cc7fa7/pyasn1-0.4.8.tar.gz" - sha256 "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba" - end - - resource "pycryptodomex" do - url "https://files.pythonhosted.org/packages/7f/3c/80cfaec41c3a9d0f524fe29bca9ab22d02ac84b5bfd6e22ade97d405bdba/pycryptodomex-3.9.7.tar.gz" - sha256 "50163324834edd0c9ce3e4512ded3e221c969086e10fdd5d3fdcaadac5e24a78" - end - - resource "pygal" do - url "https://files.pythonhosted.org/packages/14/52/2394f0f8444db3af299f2700aaff22f8cc3741fbd5ed644f782327d356b3/pygal-2.4.0.tar.gz" - sha256 "9204f05380b02a8a32f9bf99d310b51aa2a932cba5b369f7a4dc3705f0a4ce83" - end - - resource "pymdstat" do - url "https://files.pythonhosted.org/packages/23/70/6e033dd42b832ca79c81f291460f1039e236a389d9c29443692b577c0073/pymdstat-0.4.2.tar.gz" - sha256 "fef53c6f1864fdfe8616d6e985498b7f05ef19d0952f7ec3e7f8379298b9ada9" - end - - resource "pysmi" do - url "https://files.pythonhosted.org/packages/52/42/ddaeb06ff551672b17b77f81bc2e26b7c6060b28fe1552226edc6476ce37/pysmi-0.3.4.tar.gz" - sha256 "bd15a15020aee8376cab5be264c26330824a8b8164ed0195bd402dd59e4e8f7c" - end - - resource "pysnmp" do - url "https://files.pythonhosted.org/packages/4e/75/72f64c451bf5884715f84f8217b69b4025da0b67628d611cd14a5b7db217/pysnmp-4.4.12.tar.gz" - sha256 "0c3dbef2f958caca96071fe5c19de43e9c1b0484ab02a0cf08b190bcee768ba9" - end - - resource "pystache" do - url "https://files.pythonhosted.org/packages/d6/fd/eb8c212053addd941cc90baac307c00ac246ac3fce7166b86434c6eae963/pystache-0.5.4.tar.gz" - sha256 "f7bbc265fb957b4d6c7c042b336563179444ab313fb93a719759111eabd3b85a" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/82/c3/534ddba230bd4fbbd3b7a3d35f3341d014cca213f369a9940925e7e5f691/pytz-2019.3.tar.gz" - sha256 "b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be" - end - - resource "pyzmq" do - url "https://files.pythonhosted.org/packages/16/4c/762c2c3063c4d45baf4a49acea7a4f561f7b78a45cd04b58d63f4c5f6b8d/pyzmq-19.0.0.tar.gz" - sha256 "5e1f65e576ab07aed83f444e201d86deb01cd27dcf3f37c727bc8729246a60a8" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "scandir" do - url "https://files.pythonhosted.org/packages/df/f5/9c052db7bd54d0cbf1bc0bb6554362bba1012d03e5888950a4f5c5dadc4e/scandir-1.10.0.tar.gz" - sha256 "4d4631f6062e658e9007ab3149a9b914f3548cb38bfb021c64f39a025ce578ae" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "statsd" do - url "https://files.pythonhosted.org/packages/2d/f2/48ffc8d0051849e4417e809dc9420e76084c8a62749b3442915402127caa/statsd-3.3.0.tar.gz" - sha256 "e3e6db4c246f7c59003e51c9720a51a7f39a396541cb9b147ff4b14d15b5dd1f" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - end - - resource "websocket_client" do - url "https://files.pythonhosted.org/packages/8b/0f/52de51b9b450ed52694208ab952d5af6ebbcbce7f166a48784095d930d8c/websocket_client-0.57.0.tar.gz" - sha256 "d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010" - end - - resource "wifi" do - url "https://files.pythonhosted.org/packages/fe/a9/d026afe8a400dd40122385cd690e4fff4d574ed16f5c3a0f5e3921bfd383/wifi-0.3.8.tar.gz" - sha256 "a9880b2e91ea8420154c6826c8112a2f541bbae5641d59c5cb031d27138d7f26" - end - - resource "zeroconf" do - url "https://files.pythonhosted.org/packages/93/22/e6e46427412134baaabc8e8232861da1acf8a2e8067b46f3f9149b0805cb/zeroconf-0.24.5.tar.gz" - sha256 "893a841445663e0c4c20d1111ce41484bd62d58f59d653d0485187343368ef4a" - 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"]) - - prefix.install libexec/"share" - end - - test do - read, write = IO.pipe - pid = fork do - exec bin/"glances", "-q", "--export", "csv", "--export-csv-file", "/dev/stdout", :out => write - end - header = read.gets - assert_match "timestamp", header - ensure - Process.kill("TERM", pid) - end -end diff --git a/Formula/glassfish.rb b/Formula/glassfish.rb deleted file mode 100644 index 871cc56408dc6..0000000000000 --- a/Formula/glassfish.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Glassfish < Formula - desc "Java EE application server" - homepage "https://github.com/eclipse-ee4j/glassfish" - url "https://www.eclipse.org/downloads/download.php?file=/glassfish/glassfish-5.1.0.zip&r=1" - sha256 "26f3fa6463d24c5ed3956e4cab24a97e834ca37d7a23d341aadaa78d9e0093ce" - - bottle :unneeded - - depends_on :java => "1.8" - - conflicts_with "payara", :because => "both install the same scripts" - - def install - rm_rf Dir["bin/*.bat"] - libexec.install Dir["*", ".org.opensolaris,pkg"] - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - def caveats - <<~EOS - You may want to add the following to your .bash_profile: - export GLASSFISH_HOME=#{opt_libexec} - EOS - end - - test do - # check version - system "#{opt_libexec}/glassfish/bin/asadmin version | grep #{version}" - - mkdir testpath/"glassfish" - cp_r libexec/"glassfish", testpath/"glassfish" - - asadmin = testpath/"glassfish/glassfish/bin/asadmin" - asenv_conf_path = testpath/"glassfish/glassfish/config/asenv.conf" - domains_path = testpath/"glassfish/glassfish/domains" - domain_xml_path = domains_path/"domain1/config/domain.xml" - domaindir_arg = "--domaindir=#{domains_path}" - - # tell glassfish to use Java 8 - java8_home = Language::Java.java_home("1.8") - File.open(asenv_conf_path, "a") { |file| file.puts "AS_JAVA=\"#{java8_home}\"" } - - port = free_port - - # assign port to glassfish admin console - text = File.read(domain_xml_path) - new_contents = text.gsub(/port="4848"/, "port=\"#{port}\"") - File.open(domain_xml_path, "w") { |file| file.puts new_contents } - - fork do - exec asadmin, "start-domain", domaindir_arg, "domain1" - end - - sleep 15 - - begin - output = shell_output("curl -s -X GET localhost:#{port}") - assert_match "GlassFish Server", output - ensure - exec asadmin, "stop-domain", domaindir_arg, "domain1" - end - end -end diff --git a/Formula/glbinding.rb b/Formula/glbinding.rb deleted file mode 100644 index e0dd756cc260f..0000000000000 --- a/Formula/glbinding.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Glbinding < Formula - desc "C++ binding for the OpenGL API" - homepage "https://github.com/cginternals/glbinding" - url "https://github.com/cginternals/glbinding/archive/v2.1.4.tar.gz" - sha256 "cb5971b086c0d217b2304d31368803fd2b8c12ee0d41c280d40d7c23588f8be2" - license "MIT" - - bottle do - cellar :any - rebuild 1 - sha256 "6a371e47b76cd227e12699de3e7a095e620150532789cdac48e1c9b59bee06b6" => :catalina - sha256 "a44cd2f23650ce664d8f61634c27abce3a00f4b5d9efbb10687759a62ca26895" => :mojave - sha256 "ad79687ca8b43832ab27d5a459a71c4cb7e2be5b02d5df15c667ad7689fe38d0" => :high_sierra - sha256 "454bfd4f3f6a983a0614f469388cbe27437350d203c61aed34a8c05fa9bb0710" => :sierra - end - - depends_on "cmake" => :build - - def install - ENV.cxx11 - system "cmake", ".", *std_cmake_args, "-DGLFW_LIBRARY_RELEASE=" - system "cmake", "--build", ".", "--target", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main(void) - { - glbinding::Binding::initialize(); - } - EOS - system ENV.cxx, "-o", "test", "test.cpp", "-std=c++11", "-stdlib=libc++", - "-I#{include}/glbinding", "-I#{lib}/glbinding", "-framework", "OpenGL", - "-L#{lib}", "-lglbinding", *ENV.cflags.to_s.split - system "./test" - end -end diff --git a/Formula/gleam.rb b/Formula/gleam.rb deleted file mode 100644 index 6a9064bb667e5..0000000000000 --- a/Formula/gleam.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Gleam < Formula - desc "✨ A statically typed language for the Erlang VM" - homepage "https://gleam.run/" - url "https://github.com/lpil/gleam/archive/v0.10.0.tar.gz" - sha256 "f909fc7c89c950f7a8fffc943733dc4bac3b0b88eb7d7760eb04732347459ba1" - - bottle do - cellar :any_skip_relocation - sha256 "d6cc30c84004f50f76c4d7501814e5311482619c96b56e7e51f9b706e3490c25" => :catalina - sha256 "724d94e8bf2556d9485423de6ed21efbc53326114f245d9ac24d96e20f57a96d" => :mojave - sha256 "4735f65ab3a0ae5614feaf1433cd103edc1ea6ee2de59c2383e051047834ff55" => :high_sierra - end - - depends_on "rust" => :build - depends_on "erlang" - depends_on "rebar3" - - on_linux do - depends_on "pkg-config" => :build - end - - def install - system "cargo", "install", *std_cargo_args - end - - test do - Dir.chdir testpath - system "#{bin}/gleam", "new", "test_project" - Dir.chdir "test_project" - system "rebar3", "eunit" - end -end diff --git a/Formula/glew.rb b/Formula/glew.rb deleted file mode 100644 index 942021ec34fd8..0000000000000 --- a/Formula/glew.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Glew < Formula - desc "OpenGL Extension Wrangler Library" - homepage "https://glew.sourceforge.io/" - url "https://downloads.sourceforge.net/project/glew/glew/2.1.0/glew-2.1.0.tgz" - sha256 "04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95" - revision 1 - head "https://github.com/nigels-com/glew.git" - - bottle do - cellar :any - rebuild 1 - sha256 "3181853e5ec2d8e0b24842c06b2882fce2d3ff89d83f4647bfee755005e165ca" => :catalina - sha256 "04ad309f33a1355e3e29251cf60ad24058b53443352c74d30624ec470b0428a1" => :mojave - sha256 "1b5e8d521625cfabd6e429e4111d74cd68fdc4efbde826a6b5bbee1a7261e801" => :high_sierra - end - - depends_on "cmake" => :build - - conflicts_with "root", :because => "root ships its own copy of glew" - - def install - cd "build" do - system "cmake", "./cmake", *std_cmake_args - system "make" - system "make", "install" - end - doc.install Dir["doc/*"] - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(int argc, char** argv) { - glutInit(&argc, argv); - glutCreateWindow("GLEW Test"); - GLenum err = glewInit(); - if (GLEW_OK != err) { - return 1; - } - return 0; - } - EOS - system ENV.cc, testpath/"test.c", "-o", "test", "-L#{lib}", "-lGLEW", - "-framework", "GLUT" - system "./test" - end -end diff --git a/Formula/glfw.rb b/Formula/glfw.rb deleted file mode 100644 index 4b14d9b25f1c1..0000000000000 --- a/Formula/glfw.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Glfw < Formula - desc "Multi-platform library for OpenGL applications" - homepage "https://www.glfw.org/" - url "https://github.com/glfw/glfw/archive/3.3.2.tar.gz" - sha256 "98768e12e615fbe9f3386f5bbfeb91b5a3b45a8c4c77159cef06b1f6ff749537" - license "Zlib" - head "https://github.com/glfw/glfw.git" - - bottle do - cellar :any - sha256 "deaf1b20e9fc336d5f0c9a927bc07f2c509fc63538c39e4ab3a024ca7c6170d8" => :catalina - sha256 "0c0de277c23273346d703004279d92d17a8962f4d62bf01f76021beea3c3f20a" => :mojave - sha256 "c6a198383ef979823c1e0071e65771ed9059626071390f2dc5b84b218dc565c3" => :high_sierra - end - - depends_on "cmake" => :build - - def install - args = std_cmake_args + %w[ - -DGLFW_USE_CHDIR=TRUE - -DGLFW_USE_MENUBAR=TRUE - -DBUILD_SHARED_LIBS=TRUE - ] - - system "cmake", *args, "." - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #define GLFW_INCLUDE_GLU - #include - #include - int main() - { - if (!glfwInit()) - exit(EXIT_FAILURE); - glfwTerminate(); - return 0; - } - EOS - - system ENV.cc, "test.c", "-o", "test", - "-I#{include}", "-L#{lib}", "-lglfw" - system "./test" - end -end diff --git a/Formula/glib-networking.rb b/Formula/glib-networking.rb deleted file mode 100644 index ab254c2700e7d..0000000000000 --- a/Formula/glib-networking.rb +++ /dev/null @@ -1,72 +0,0 @@ -class GlibNetworking < Formula - desc "Network related modules for glib" - homepage "https://gitlab.gnome.org/GNOME/glib-networking" - url "https://download.gnome.org/sources/glib-networking/2.64/glib-networking-2.64.3.tar.xz" - sha256 "937a06b124052813bfc0b0b86bff42016ff01067582e1aca65bb6dbe0845a168" - license "LGPL-2.1" - - bottle do - sha256 "52991dae042721d0bc9af98a7a777435b76fd6ef3a66ce8bf89928fd549537ee" => :catalina - sha256 "1c26ff7e2f3dfc8b5fec714aef7c35a3c1a8b89228b8e62c8311a2e942ceec22" => :mojave - sha256 "1a5a55a81cc7c844af35a53ad39ad6babb56de8f901ad300959e978a0542ce1c" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gnutls" - depends_on "gsettings-desktop-schemas" - - on_linux do - depends_on "libidn" - end - - link_overwrite "lib/gio/modules" - - 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", *std_meson_args, - "-Dlibproxy=disabled", - "-Dopenssl=disabled", - "-Dgnome_proxy=disabled", - ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - def post_install - system Formula["glib"].opt_bin/"gio-querymodules", HOMEBREW_PREFIX/"lib/gio/modules" - end - - test do - (testpath/"gtls-test.c").write <<~EOS - #include - int main (int argc, char *argv[]) - { - if (g_tls_backend_supports_tls (g_tls_backend_get_default())) - return 0; - else - return 1; - } - EOS - - # From `pkg-config --cflags --libs gio-2.0` - flags = [ - "-D_REENTRANT", - "-I#{HOMEBREW_PREFIX}/include/glib-2.0", - "-I#{HOMEBREW_PREFIX}/lib/glib-2.0/include", - "-I#{HOMEBREW_PREFIX}/opt/gettext/include", - "-L#{HOMEBREW_PREFIX}/lib", - "-L#{HOMEBREW_PREFIX}/opt/gettext/lib", - "-lgio-2.0", "-lgobject-2.0", "-lglib-2.0" - ] - - system ENV.cc, "gtls-test.c", "-o", "gtls-test", *flags - system "./gtls-test" - end -end diff --git a/Formula/glib-openssl.rb b/Formula/glib-openssl.rb deleted file mode 100644 index 37583e5c68cd1..0000000000000 --- a/Formula/glib-openssl.rb +++ /dev/null @@ -1,69 +0,0 @@ -class GlibOpenssl < Formula - desc "OpenSSL GIO module for glib" - homepage "https://launchpad.net/glib-networking" - url "https://download.gnome.org/sources/glib-openssl/2.50/glib-openssl-2.50.8.tar.xz" - sha256 "869f08e4e9a719c1df411c2fb5554400f6b24a9db0cb94c4359db8dad18d185f" - revision 3 - - bottle do - sha256 "d3e3d452515afbf8ab39555e7c9e4add50f28aa89252321bee6ca021c7cb88a9" => :catalina - sha256 "10b207a9c340bc6710e1df7f47ef4a0dba5a941c0cdb3330255718cf1884276c" => :mojave - sha256 "04107ac3e021e4dd11feb50a3ac4024f3c73dd2b805f171ccfc22c1d7e3a665e" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "openssl@1.1" - - def install - # Install files to `lib` instead of `HOMEBREW_PREFIX/lib`. - inreplace "configure", "$($PKG_CONFIG --variable giomoduledir gio-2.0)", lib/"gio/modules" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-static", - "--prefix=#{prefix}", - "--with-ca-certificates=#{Formula["openssl@1.1"].pkgetc}/cert.pem" - system "make", "install" - - # Delete the cache, will regenerate it in post_install - rm lib/"gio/modules/giomodule.cache" - end - - def post_install - system Formula["glib"].opt_bin/"gio-querymodules", HOMEBREW_PREFIX/"lib/gio/modules" - end - - test do - (testpath/"gtls-test.c").write <<~EOS - #include - #include - int main (int argc, char *argv[]) - { - GType type = g_tls_backend_get_certificate_type(g_tls_backend_get_default()); - if (strcmp(g_type_name(type), "GTlsCertificateOpenssl") == 0) - return 0; - else - return 1; - } - EOS - - # From `pkg-config --cflags --libs gio-2.0` - gettext = Formula["gettext"] - glib = Formula["glib"] - flags = %W[ - -D_REENTRANT - -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 - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -lgio-2.0 - -lgobject-2.0 - -lglib-2.0 - -lintl - ] - system ENV.cc, "gtls-test.c", "-o", "gtls-test", *flags - system "./gtls-test" - end -end diff --git a/Formula/glib.rb b/Formula/glib.rb deleted file mode 100644 index 253a29b60de7f..0000000000000 --- a/Formula/glib.rb +++ /dev/null @@ -1,109 +0,0 @@ -class Glib < Formula - desc "Core application library for C" - homepage "https://developer.gnome.org/glib/" - url "https://download.gnome.org/sources/glib/2.64/glib-2.64.3.tar.xz" - sha256 "fe9cbc97925d14c804935f067a3ad77ef55c0bbe9befe68962318f5a767ceb22" - license "LGPL-2.1" - - bottle do - sha256 "c7259832a3bf3fe8093962473718a2ca030a94c54f21cbdc46369974d6e80be8" => :catalina - sha256 "47d4a4666df88be5c56def3cb5d8e7c0e3ee6baf431584c40783d98a063fb943" => :mojave - sha256 "1e5fadb54980899f293ea99796c33f25109c72ad745b9bc5583a1f86f02bee06" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "libffi" - depends_on "pcre" - depends_on "python@3.8" - - on_linux do - depends_on "util-linux" - end - - # https://bugzilla.gnome.org/show_bug.cgi?id=673135 Resolved as wontfix, - # but needed to fix an assumption about the location of the d-bus machine - # id file. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/6164294a75541c278f3863b111791376caa3ad26/glib/hardcoded-paths.diff" - sha256 "a57fec9e85758896ff5ec1ad483050651b59b7b77e0217459ea650704b7d422b" - end - - def install - Language::Python.rewrite_python_shebang(Formula["python@3.8"].opt_bin/"python3") - - inreplace %w[gio/gdbusprivate.c gio/xdgmime/xdgmime.c glib/gutils.c], - "@@HOMEBREW_PREFIX@@", HOMEBREW_PREFIX - - # Disable dtrace; see https://trac.macports.org/ticket/30413 - args = std_meson_args + %W[ - -Diconv=auto - -Dgio_module_dir=#{HOMEBREW_PREFIX}/lib/gio/modules - -Dbsymbolic_functions=false - -Ddtrace=false - ] - - mkdir "build" do - system "meson", *args, ".." - system "ninja", "-v" - # Some files have been generated with a Python shebang, rewrite these too - Language::Python.rewrite_python_shebang(Formula["python@3.8"].opt_bin/"python3") - system "ninja", "install", "-v" - end - - # ensure giomoduledir contains prefix, as this pkgconfig variable will be - # used by glib-networking and glib-openssl to determine where to install - # their modules - inreplace lib/"pkgconfig/gio-2.0.pc", - "giomoduledir=#{HOMEBREW_PREFIX}/lib/gio/modules", - "giomoduledir=${libdir}/gio/modules" - - # `pkg-config --libs glib-2.0` includes -lintl, and gettext itself does not - # have a pkgconfig file, so we add gettext lib and include paths here. - gettext = Formula["gettext"].opt_prefix - inreplace lib+"pkgconfig/glib-2.0.pc" do |s| - s.gsub! "Libs: -L${libdir} -lglib-2.0 -lintl", - "Libs: -L${libdir} -lglib-2.0 -L#{gettext}/lib -lintl" - s.gsub! "Cflags:-I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include", - "Cflags:-I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include -I#{gettext}/include" - end - - # `pkg-config --print-requires-private gobject-2.0` includes libffi, - # but that package is keg-only so it needs to look for the pkgconfig file - # in libffi's opt path. - libffi = Formula["libffi"].opt_prefix - inreplace lib+"pkgconfig/gobject-2.0.pc" do |s| - s.gsub! "Requires.private: libffi", - "Requires.private: #{libffi}/lib/pkgconfig/libffi.pc" - end - - bash_completion.install Dir["gio/completion/*"] - end - - def post_install - (HOMEBREW_PREFIX/"lib/gio/modules").mkpath - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(void) - { - gchar *result_1, *result_2; - char *str = "string"; - - result_1 = g_convert(str, strlen(str), "ASCII", "UTF-8", NULL, NULL, NULL); - result_2 = g_convert(result_1, strlen(result_1), "UTF-8", "ASCII", NULL, NULL, NULL); - - return (strcmp(str, result_2) == 0) ? 0 : 1; - } - EOS - system ENV.cc, "-o", "test", "test.c", "-I#{include}/glib-2.0", - "-I#{lib}/glib-2.0/include", "-L#{lib}", "-lglib-2.0" - system "./test" - end -end diff --git a/Formula/glibmm.rb b/Formula/glibmm.rb deleted file mode 100644 index c608f2ca15c96..0000000000000 --- a/Formula/glibmm.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Glibmm < Formula - desc "C++ interface to glib" - homepage "https://www.gtkmm.org/" - url "https://download.gnome.org/sources/glibmm/2.64/glibmm-2.64.2.tar.xz" - sha256 "a75282e58d556d9b2bb44262b6f5fb76c824ac46a25a06f527108bec86b8d4ec" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "8b39f15570f8ec9281554ec8db93e4011ad2e13a1248047c18c7f8570a548d53" => :catalina - sha256 "316a5f0f84491a62cf1c48a12cd4f8d9b7f7de9aa8092f72256f5114aa8730d3" => :mojave - sha256 "7d224a2283e08715a1f7f286fcdc3e1c5cc277101bb3e2cc4bce488ec776cc02" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libsigc++@2" - - 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[]) - { - Glib::ustring my_string("testing"); - return 0; - } - EOS - gettext = Formula["gettext"] - glib = Formula["glib"] - libsigcxx = Formula["libsigc++@2"] - flags = %W[ - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{include}/glibmm-2.4 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/glibmm-2.4/include - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -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/glide.rb b/Formula/glide.rb deleted file mode 100644 index eff46de011174..0000000000000 --- a/Formula/glide.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Glide < Formula - desc "Simplified Go project management, dependency management, and vendoring" - homepage "https://github.com/Masterminds/glide" - url "https://github.com/Masterminds/glide/archive/v0.13.3.tar.gz" - sha256 "817dad2f25303d835789c889bf2fac5e141ad2442b9f75da7b164650f0de3fee" - head "https://github.com/Masterminds/glide.git" - - bottle do - cellar :any_skip_relocation - sha256 "6950b3ca86a9c460e3937ca5b931836586310203726ca37bd434b822b4f0f8c1" => :catalina - sha256 "795f7f533f050b5356846b3ed2a9db88a51ef74b929e28ea0473c83f630b03c3" => :mojave - sha256 "45c35a6adf13bc732a827669e4ffb19dcfa710180c2b2930435d4217802313d6" => :high_sierra - sha256 "d665d8221c75985ffde8357c5ebfd53c2cb3398ac699a1afc1ebf8000e5206cc" => :sierra - end - - depends_on "go" - - def install - ENV["GOPATH"] = buildpath - glidepath = buildpath/"src/github.com/Masterminds/glide" - glidepath.install buildpath.children - - cd glidepath do - system "go", "build", "-o", "glide", "-ldflags", "-X main.version=#{version}" - bin.install "glide" - prefix.install_metafiles - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/glide --version") - system bin/"glide", "create", "--non-interactive", "--skip-import" - assert_predicate testpath/"glide.yaml", :exist? - end -end diff --git a/Formula/glkterm.rb b/Formula/glkterm.rb deleted file mode 100644 index 2f9839cac14bb..0000000000000 --- a/Formula/glkterm.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Glkterm < Formula - desc "Terminal-window Glk library" - homepage "https://www.eblong.com/zarf/glk/" - url "https://www.eblong.com/zarf/glk/glkterm-104.tar.gz" - version "1.0.4" - sha256 "473d6ef74defdacade2ef0c3f26644383e8f73b4f1b348e37a9bb669a94d927e" - - bottle do - cellar :any_skip_relocation - sha256 "c337df9d5b7c6343fe21abf1f17143d51d4e61e747b1c6da7d31ad557653a7a0" => :catalina - sha256 "34bba71e2063d751f179adf09caa65b6815b94b0f5c64436f20f3117e038e128" => :mojave - sha256 "1e7d75d921b11cd91354b2f8acf8a63416709b7875146d095bcf1ce02cc6fdad" => :high_sierra - sha256 "b4c65e282b8cf6fce1e32e4e168aef241d6c38f2090448c68ad3ca7157e1d473" => :sierra - sha256 "b9db7677c23716a7f8a57ce45d309487a36cc41c1388e2c7990b49c17e2f0bb7" => :el_capitan - sha256 "61b75bf1232fb3aacc5966ea13e88fe339da7ffd7c9882bab549456dd816a30a" => :yosemite - end - - keg_only "conflicts with other Glk libraries" - - def install - system "make" - - lib.install "libglkterm.a" - include.install "glk.h", "glkstart.h", "gi_blorb.h", "gi_dispa.h", "Make.glkterm" - 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}", "-lglkterm", "-lncurses", "-o", "test" - system "echo test | ./test" - end -end diff --git a/Formula/glktermw.rb b/Formula/glktermw.rb deleted file mode 100644 index 3980e3d5a6b1b..0000000000000 --- a/Formula/glktermw.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Glktermw < Formula - desc "Terminal-window Glk library with Unicode support" - homepage "https://www.eblong.com/zarf/glk/" - url "https://www.eblong.com/zarf/glk/glktermw-104.tar.gz" - version "1.0.4" - sha256 "5968630b45e2fd53de48424559e3579db0537c460f4dc2631f258e1c116eb4ea" - - bottle do - cellar :any_skip_relocation - sha256 "6959c1eebd57b190196abeee87a79bceffe67dfb1454c78d0068a576648fc4aa" => :catalina - sha256 "cbb9467a9639470772bb010a05c79b396ab12bad33726f2fe6cb60dc29bda9b2" => :mojave - sha256 "c8ecb98e15edfdb02c5aed42590291e45c0dae29640a209428f1382991a23a2a" => :high_sierra - sha256 "8f62b5b2b920573742886d31a7c579b174bb60fad1bfeabae346f8893dc440cf" => :sierra - sha256 "5b302ada83cd6185c262277c3836d9e071a050a677fd41d86cab31aa0e8257d0" => :el_capitan - sha256 "9e1cce9e7bbc7d1bb1ea781bcd49c8cd1a3a933ca00637bf5c637a5dfa7c5ccc" => :yosemite - end - - keg_only "conflicts with other Glk libraries" - - def install - inreplace "gtoption.h", "/* #define LOCAL_NCURSESW */", "#define LOCAL_NCURSESW" - inreplace "Makefile", "-lncursesw", "-lncurses" - - system "make" - - lib.install "libglktermw.a" - include.install "glk.h", "glkstart.h", "gi_blorb.h", "gi_dispa.h", "Make.glktermw" - 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}", "-lglktermw", "-lncurses", "-o", "test" - system "echo test | ./test" - end -end diff --git a/Formula/glm.rb b/Formula/glm.rb deleted file mode 100644 index a4bb78ca37aa2..0000000000000 --- a/Formula/glm.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Glm < Formula - desc "C++ mathematics library for graphics software" - homepage "https://glm.g-truc.net/" - url "https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.zip" - sha256 "37e2a3d62ea3322e43593c34bae29f57e3e251ea89f4067506c94043769ade4c" - head "https://github.com/g-truc/glm.git" - - bottle do - cellar :any_skip_relocation - sha256 "9b661be1f704c2e946dbd4d4f96d58ae82427824ef88d7dd9f0f0cfc3fae2233" => :catalina - sha256 "7210910c6f106de4c22874f3977b1457cea3db6bb03269ea6831ffae861bb80e" => :mojave - sha256 "ea41bb7f8f195c22d6f7834c57684412d752e2c72ff795b9056dd90aaebf9d84" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - end - include.install "glm" - lib.install "cmake" - (lib/"pkgconfig/glm.pc").write <<~EOS - prefix=#{prefix} - includedir=${prefix}/include - - Name: GLM - Description: OpenGL Mathematics - Version: #{version.to_s.match(/\d+\.\d+\.\d+/)} - Cflags: -I${includedir} - EOS - - cd "doc" do - system "doxygen", "man.doxy" - man.install "html" - end - doc.install Dir["doc/*"] - end - - test do - (testpath/"test.cpp").write <<~EOS - #include // glm::vec2 - int main() - { - std::size_t const VertexCount = 4; - std::size_t const PositionSizeF32 = VertexCount * sizeof(glm::vec2); - glm::vec2 const PositionDataF32[VertexCount] = - { - glm::vec2(-1.0f,-1.0f), - glm::vec2( 1.0f,-1.0f), - glm::vec2( 1.0f, 1.0f), - glm::vec2(-1.0f, 1.0f) - }; - return 0; - } - EOS - system ENV.cxx, "-I#{include}", testpath/"test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/global.rb b/Formula/global.rb deleted file mode 100644 index e5d172f730ece..0000000000000 --- a/Formula/global.rb +++ /dev/null @@ -1,110 +0,0 @@ -class Global < Formula - desc "Source code tag system" - homepage "https://www.gnu.org/software/global/" - url "https://ftp.gnu.org/gnu/global/global-6.6.4.tar.gz" - mirror "https://ftpmirror.gnu.org/global/global-6.6.4.tar.gz" - sha256 "987e8cb956c53f8ebe4453b778a8fde2037b982613aba7f3e8e74bcd05312594" - revision 1 - - bottle do - sha256 "748524c4b316196e41e0f54df683117c61f7dfdbab1c3e641c36ae4eed7f1013" => :catalina - sha256 "848b4e78c1f507bc4356b285164368641125194e730accf46c540af5806a600f" => :mojave - sha256 "ba9cdd8c988ca4aff95538b8d30cb9f97c99dd6f5e91e296db121c8b53459cf0" => :high_sierra - end - - head do - url ":pserver:anonymous:@cvs.savannah.gnu.org:/sources/global", :using => :cvs - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "bison" => :build - depends_on "flex" => :build - ## gperf is provided by OSX Command Line Tools. - depends_on "libtool" => :build - end - - depends_on "ctags" - depends_on "python@3.8" - - uses_from_macos "ncurses" - - on_linux do - depends_on "libtool" => :build - end - - skip_clean "lib/gtags" - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/cb/9f/27d4844ac5bf158a33900dbad7985951e2910397998e85712da03ce125f0/Pygments-2.5.2.tar.gz" - sha256 "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe" - end - - def install - system "sh", "reconf.sh" if build.head? - - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - pygments_args = %W[build install --prefix=#{libexec}] - resource("Pygments").stage { system "python3", "setup.py", *pygments_args } - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --sysconfdir=#{etc} - --with-exuberant-ctags=#{Formula["ctags"].opt_bin}/ctags - ] - - system "./configure", *args - system "make", "install" - - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - - etc.install "gtags.conf" - - # we copy these in already - cd share/"gtags" do - rm %w[README COPYING LICENSE INSTALL ChangeLog AUTHORS] - end - end - - test do - (testpath/"test.c").write <<~EOS - int c2func (void) { return 0; } - void cfunc (void) {int cvar = c2func(); }") - EOS - (testpath/"test.py").write <<~EOS - def py2func (): - return 0 - def pyfunc (): - pyvar = py2func() - EOS - - assert shell_output("#{bin}/gtags --gtagsconf=#{share}/gtags/gtags.conf --gtagslabel=pygments .") - assert_match "test.c", shell_output("#{bin}/global -d cfunc") - assert_match "test.c", shell_output("#{bin}/global -d c2func") - assert_match "test.c", shell_output("#{bin}/global -r c2func") - assert_match "test.py", shell_output("#{bin}/global -d pyfunc") - assert_match "test.py", shell_output("#{bin}/global -d py2func") - assert_match "test.py", shell_output("#{bin}/global -r py2func") - assert_match "test.c", shell_output("#{bin}/global -s cvar") - assert_match "test.py", shell_output("#{bin}/global -s pyvar") - - assert shell_output("#{bin}/gtags --gtagsconf=#{share}/gtags/gtags.conf --gtagslabel=exuberant-ctags .") - # ctags only yields definitions - assert_match "test.c", shell_output("#{bin}/global -d cfunc # passes") - assert_match "test.c", shell_output("#{bin}/global -d c2func # passes") - assert_match "test.py", shell_output("#{bin}/global -d pyfunc # passes") - assert_match "test.py", shell_output("#{bin}/global -d py2func # passes") - assert_no_match(/test\.c/, shell_output("#{bin}/global -r c2func # correctly fails")) - assert_no_match(/test\.c/, shell_output("#{bin}/global -s cvar # correctly fails")) - assert_no_match(/test\.py/, shell_output("#{bin}/global -r py2func # correctly fails")) - assert_no_match(/test\.py/, shell_output("#{bin}/global -s pyvar # correctly fails")) - - # Test the default parser - assert shell_output("#{bin}/gtags --gtagsconf=#{share}/gtags/gtags.conf --gtagslabel=default .") - assert_match "test.c", shell_output("#{bin}/global -d cfunc") - assert_match "test.c", shell_output("#{bin}/global -d c2func") - assert_match "test.c", shell_output("#{bin}/global -r c2func") - assert_match "test.c", shell_output("#{bin}/global -s cvar") - end -end diff --git a/Formula/globe.rb b/Formula/globe.rb deleted file mode 100644 index 77c3d978d5186..0000000000000 --- a/Formula/globe.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Globe < Formula - desc "Prints ASCII graphic of currently-lit side of the Earth" - homepage "https://www.acme.com/software/globe/" - url "https://www.acme.com/software/globe/globe_14Aug2014.tar.gz" - version "0.0.20140814" - sha256 "5507a4caaf3e3318fd895ab1f8edfa5887c9f64547cad70cff3249350caa6c86" - - bottle do - cellar :any_skip_relocation - sha256 "813ec2be614ca68c63af2b1830b6aa5129c5b65ce3c0d3aa6fa6d8f826f674e5" => :catalina - sha256 "a5a07b3dfade00debcfe123b8ce103ec33649c9152f89676fce5b70c0f0fec8a" => :mojave - sha256 "f61e4026debce10b4611ce963f5387721296b9bd84120eecfcff275facf76f32" => :high_sierra - sha256 "20488fcd0137e0d2a05ea3bfa91adc2f45460f05bb01f26e41005ccafc3e8c54" => :sierra - sha256 "11acded7be5d1ba22260d039e3daf4fdc4cac49ebcd234c879da655a1532c22f" => :el_capitan - sha256 "a3ccdf74813e704ab1c8d50bb32f3f9b3f62110c8a6a143e3df85eb6ab7ecd7d" => :yosemite - sha256 "8ff4dd96c5ab3c846ac61ff66c866e3d4969560611405db6e20436ff75494715" => :mavericks - end - - def install - bin.mkpath - man1.mkpath - - system "make", "all", "install", "BINDIR=#{bin}", "MANDIR=#{man1}" - end - - test do - system "#{bin}/globe" - end -end diff --git a/Formula/globjects.rb b/Formula/globjects.rb deleted file mode 100644 index 81279309663fe..0000000000000 --- a/Formula/globjects.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Globjects < Formula - desc "C++ library strictly wrapping OpenGL objects" - homepage "https://github.com/cginternals/globjects" - url "https://github.com/cginternals/globjects/archive/v1.1.0.tar.gz" - sha256 "68fa218c1478c09b555e44f2209a066b28be025312e0bab6e3a0b142a01ebbc6" - license "MIT" - head "https://github.com/cginternals/globjects.git" - - bottle do - cellar :any - sha256 "8093cb17f6c1ba5ce345d3a89f0a2330cbdbb88100ad241be0dd8611a6ad52d9" => :catalina - sha256 "9bbf36b86602a7b0c7bf66bb911e200e4f7b94f05c304afb261781edebf119ce" => :mojave - sha256 "baae740c033bc384454f81c0abba246f935765ec7decf408777d318d60cbe565" => :high_sierra - sha256 "dacabb07360fa768e54e9436f071a6ac2a56d0fc9da0d72b491fb8a645f48c33" => :sierra - end - - depends_on "cmake" => :build - depends_on "glbinding" - depends_on "glm" - - def install - ENV.cxx11 - system "cmake", ".", "-Dglbinding_DIR=#{Formula["glbinding"].opt_prefix}", *std_cmake_args - system "cmake", "--build", ".", "--target", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main(void) - { - globjects::init(); - } - EOS - system ENV.cxx, "-o", "test", "test.cpp", "-std=c++11", "-stdlib=libc++", - "-I#{include}/globjects", "-I#{Formula["glm"].include}/glm", "-I#{lib}/globjects", - "-L#{lib}", "-L#{Formula["glbinding"].opt_lib}", - "-lglobjects", "-lglbinding", *ENV.cflags.to_s.split - system "./test" - end -end diff --git a/Formula/glog.rb b/Formula/glog.rb deleted file mode 100644 index 5debcb3065de8..0000000000000 --- a/Formula/glog.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Glog < Formula - desc "Application-level logging library" - homepage "https://github.com/google/glog" - url "https://github.com/google/glog/archive/v0.4.0.tar.gz" - sha256 "f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c" - head "https://github.com/google/glog.git" - - bottle do - cellar :any - sha256 "918710bfd20d088718f33579216eb4574595f27ea234c409dd5848c0b8ad9e15" => :catalina - sha256 "034a4d2272b48fd7655b467b92c78eebfb11efb33cc6cd31f7b13ee085b7169b" => :mojave - sha256 "bbe6c4138b5fe8cd58d269a39644176f640fa62e694ffac36337f87661cacc69" => :high_sierra - sha256 "08408127c37122614811eae2d925d940912c2cb29eb0fb300116ee4813d50095" => :sierra - end - - depends_on "cmake" => :build - depends_on "gflags" - - def install - mkdir "cmake-build" do - system "cmake", "..", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args - system "make", "install" - end - - # Upstream PR from 30 Aug 2017 "Produce pkg-config file under cmake" - # See https://github.com/google/glog/pull/239 - (lib/"pkgconfig/libglog.pc").write <<~EOS - prefix=#{prefix} - exec_prefix=${prefix} - libdir=${exec_prefix}/lib - includedir=${prefix}/include - - Name: libglog - Description: Google Log (glog) C++ logging framework - Version: #{stable.version} - Libs: -L${libdir} -lglog - Cflags: -I${includedir} - EOS - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - int main(int argc, char* argv[]) - { - google::InitGoogleLogging(argv[0]); - LOG(INFO) << "test"; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-I#{include}", "-L#{lib}", - "-lglog", "-I#{Formula["gflags"].opt_lib}", - "-L#{Formula["gflags"].opt_lib}", "-lgflags", - "-o", "test" - system "./test" - end -end diff --git a/Formula/glooctl.rb b/Formula/glooctl.rb deleted file mode 100644 index 1ab905c0b2c3d..0000000000000 --- a/Formula/glooctl.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Glooctl < Formula - desc "Envoy-Powered API Gateway" - homepage "https://docs.solo.io/gloo/latest/" - url "https://github.com/solo-io/gloo.git", - :tag => "v1.4.2", - :revision => "8f064c02d58be7cf86b3aa4ffb59b8ae2856a729" - license "Apache-2.0" - head "https://github.com/solo-io/gloo.git" - - bottle do - cellar :any_skip_relocation - sha256 "5d9902117ff6b7b6f2b1d2c2e7a936f247cc1468f68a9bb36b45b5afe3c24205" => :catalina - sha256 "865784a82a8fcba694bcc4c892e8b3422455c6ff487c0a29d330a311c91b1afb" => :mojave - sha256 "1ea4c8d39fdf3910ac86e37b30cb47ff1caf76da97de61b160c3dfcaefc76381" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/solo-io/gloo" - dir.install buildpath.children - [buildpath/".brew_home"] - - cd dir do - system "make", "glooctl", "TAGGED_VERSION=v#{version}" - bin.install "_output/glooctl" - end - end - - test do - run_output = shell_output("#{bin}/glooctl 2>&1") - assert_match "glooctl is the unified CLI for Gloo.", run_output - - version_output = shell_output("#{bin}/glooctl version 2>&1") - assert_match "Client: {\"version\":\"#{version}\"}", version_output - - version_output = shell_output("#{bin}/glooctl version 2>&1") - assert_match "Server: version undefined", version_output - - # Should error out as it needs access to a Kubernetes cluster to operate correctly - status_output = shell_output("#{bin}/glooctl get proxy 2>&1", 1) - assert_match "failed to create kube client", status_output - end -end diff --git a/Formula/gloox.rb b/Formula/gloox.rb deleted file mode 100644 index 1fedd6ce2a1df..0000000000000 --- a/Formula/gloox.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Gloox < Formula - desc "C++ Jabber/XMPP library that handles the low-level protocol" - homepage "https://camaya.net/gloox/" - url "https://camaya.net/download/gloox-1.0.23.tar.bz2" - sha256 "97cb6a0c07e320ffa4a7c66e8ab06b2361086271dc87ed2398befef4e8435f8a" - - bottle do - cellar :any - sha256 "ae614fa73c886d568e4bb6916438affd3b081bccfc4904fef4a4110417f41e9d" => :catalina - sha256 "eea355a755180f72c719f06d0eae5c7b03223c35f39aae6379a007f0a6333ffe" => :mojave - sha256 "730858e264fc531556d60fd93f971614e9ce22ee1db1391f651a8fba2b257198" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libidn" - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - system "./configure", "--prefix=#{prefix}", - "--with-zlib", - "--disable-debug", - "--with-openssl=#{Formula["openssl@1.1"].opt_prefix}" - system "make", "install" - end - - test do - system bin/"gloox-config", "--cflags", "--libs", "--version" - end -end diff --git a/Formula/glow.rb b/Formula/glow.rb deleted file mode 100644 index 16ade542ae78d..0000000000000 --- a/Formula/glow.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Glow < Formula - desc "Render markdown on the CLI" - homepage "https://github.com/charmbracelet/glow" - url "https://github.com/charmbracelet/glow/archive/v0.2.0.tar.gz" - sha256 "031a47a06767373ae7d0ad3b6dfd64075b93d66a8a980a7250358fc5f30d05f4" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "1c21088d72f2e0e7f41b64c74b0b5c4b0494570ccde672998bf62f920dacdb7c" => :catalina - sha256 "65d2045f3ecb6368b018706e65a32093651dcedf5aa6b0fab15bd60278452742" => :mojave - sha256 "8cdd087d6817dde487cd09c3378048728cf492ab4e94188f76bf3bdbe4a1c168" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/name - end - - test do - (testpath/"test.md").write <<~EOS - # header - - **bold** - - ``` - code - ``` - EOS - assert_match "# header", shell_output("#{bin}/glow test.md") - end -end diff --git a/Formula/glpk.rb b/Formula/glpk.rb deleted file mode 100644 index 91f5380a5cf3e..0000000000000 --- a/Formula/glpk.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Glpk < Formula - desc "Library for Linear and Mixed-Integer Programming" - homepage "https://www.gnu.org/software/glpk/" - url "https://ftp.gnu.org/gnu/glpk/glpk-4.65.tar.gz" - mirror "https://ftpmirror.gnu.org/glpk/glpk-4.65.tar.gz" - sha256 "4281e29b628864dfe48d393a7bedd781e5b475387c20d8b0158f329994721a10" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "55bd72ce9a73c652c34616d09d8ca7d05028c089835c9f0e91db0868e626fc05" => :catalina - sha256 "563546e59d89de41270630d03276672f927037c28d6c64531791524cb7e611e4" => :mojave - sha256 "5c0b4a34749c6e60bf9aa39f175ca907bab774f89a1b8a1697f3f5d02d493f2a" => :high_sierra - sha256 "3cbe0b40e3852414560a4929da0ee050fc8fa424b56b3ea756f853ce274b9a3a" => :sierra - sha256 "90ba265eb683981e612faae96318b662558e828a99a89200a29df93006d34084" => :el_capitan - end - - depends_on "gmp" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--with-gmp" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include "glpk.h" - - int main(int argc, const char *argv[]) - { - printf("%s", glp_version()); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lglpk", "-o", "test" - assert_match version.to_s, shell_output("./test") - end -end diff --git a/Formula/glslang.rb b/Formula/glslang.rb deleted file mode 100644 index 1883279870183..0000000000000 --- a/Formula/glslang.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Glslang < Formula - desc "OpenGL and OpenGL ES reference compiler for shading languages" - homepage "https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/" - url "https://github.com/KhronosGroup/glslang/archive/8.13.3743.tar.gz" - sha256 "639ebec56f1a7402f2fa094469a5ddea1eceecfaf2e9efe361376a0f73a7ee2f" - head "https://github.com/KhronosGroup/glslang.git" - - bottle do - cellar :any_skip_relocation - sha256 "9db9f4d0af3d3945270e3fcfbb2e502f377f15d76810facf80862093a18b7a5d" => :catalina - sha256 "24e6cb49dac7d598a0d12e055a67cd036196eb8cfb7f688b58240219e1a144b9" => :mojave - sha256 "02af3328d6edf389d340d0c106c4366f575e5abf8db478e6b5c6fc99111b2c2c" => :high_sierra - end - - depends_on "cmake" => :build - - def install - args = %w[ - -DBUILD_EXTERNAL=OFF - -DENABLE_CTEST=OFF - ] - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - end - - test do - (testpath/"test.frag").write <<~EOS - #version 110 - void main() { - gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); - } - EOS - (testpath/"test.vert").write <<~EOS - #version 110 - void main() { - gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; - } - EOS - system "#{bin}/glslangValidator", "-i", testpath/"test.vert", testpath/"test.frag" - end -end diff --git a/Formula/glslviewer.rb b/Formula/glslviewer.rb deleted file mode 100644 index 64097d597e959..0000000000000 --- a/Formula/glslviewer.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Glslviewer < Formula - desc "Live-coding console tool that renders GLSL Shaders" - homepage "http://patriciogonzalezvivo.com/2015/glslViewer/" - url "https://github.com/patriciogonzalezvivo/glslViewer/archive/1.6.0.tar.gz" - sha256 "9235fefc41130ad4088c50c76a1f246069fe4986e42df972e352549d16d935b7" - license "BSD-3-Clause" - head "https://github.com/patriciogonzalezvivo/glslViewer.git" - - bottle do - cellar :any - sha256 "4df521fbbc143343c32dd68f743f337954063f0852dcab3aa75a08a8b8be3509" => :catalina - sha256 "c15fc78aa3d9ec10dadabac7e2d240c6b05bfee77d0248c7c05f8ffea06ec971" => :mojave - sha256 "c1bc3d4aaaba644a4c825c090d0aa2987ae243c78f7e931c99ef6631d6f81cbc" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "glfw" - - def install - system "make" - bin.install Dir["bin/*"] - end - - test do - system "#{bin}/glslViewer", "--help" - end -end diff --git a/Formula/glui.rb b/Formula/glui.rb deleted file mode 100644 index 339ccca82ad44..0000000000000 --- a/Formula/glui.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Glui < Formula - desc "C++ user interface library" - homepage "https://glui.sourceforge.io/" - url "https://github.com/libglui/glui/archive/2.37.tar.gz" - sha256 "f7f6983f7410fe8dfaa032b2b7b1aac2232ec6a400a142b73f680683dad795f8" - - bottle do - cellar :any_skip_relocation - sha256 "a9e404e892ccdf44f28504a433b598a08533290486189bc4a707b3e333dd3950" => :catalina - sha256 "24c323dbaa5f6f1b01fbf8f837c379ef503d323a448d2bb3d673c31ced622f0d" => :mojave - sha256 "7cd9b9d6bffa3b6b6ff806c4041f495d5a7ef40296cb50097db25d17eb616265" => :high_sierra - sha256 "c087de27b46b86a14d583904e0a9d293428af37d8710b521ae7aeeb5174fc8fd" => :sierra - end - - # Fix compiler warnings in glui.h. Merged into master on November 28, 2016. - patch do - url "https://github.com/libglui/glui/commit/fc9ad76733034605872a0d1323bb19cbc23d87bf.patch?full_index=1" - sha256 "b1afada854f920692ab7cb6b6292034f3488936c4332e3e996798ee494a3fdd7" - end - - def install - system "make", "setup" - system "make", "lib/libglui.a" - lib.install "lib/libglui.a" - include.install "include/GL" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - GLUI *glui = GLUI_Master.create_glui("GLUI"); - assert(glui != nullptr); - return 0; - } - EOS - system ENV.cxx, "-framework", "GLUT", "-framework", "OpenGL", "-I#{include}", - "-L#{lib}", "-lglui", "-std=c++11", "test.cpp" - system "./a.out" - end -end diff --git a/Formula/glulxe.rb b/Formula/glulxe.rb deleted file mode 100644 index 2a77a9f6ad4b0..0000000000000 --- a/Formula/glulxe.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Glulxe < Formula - desc "Portable VM like the Z-machine" - homepage "https://www.eblong.com/zarf/glulx/" - url "https://eblong.com/zarf/glulx/glulxe-054.tar.gz" - version "0.5.4" - sha256 "1fc26f8aa31c880dbc7c396ede196c5d2cdff9bdefc6b192f320a96c5ef3376e" - license "MIT" - head "https://github.com/erkyrath/glulxe.git" - - bottle do - cellar :any_skip_relocation - sha256 "8f14cd2b19deb64a78d25bda3426d27b0fa25708daf39f7ccd9721daca81b8f1" => :catalina - sha256 "cfff5a59e704d30bd2cd75955245c286183b301dc93bd63c8ba9e7e2d00c356f" => :mojave - sha256 "229ef4b0b9e61f0e1ecf0b632ccd5fee08df494a97203820368e669a91f4028d" => :high_sierra - sha256 "3a36753838342aef55319fdf1aab32666caffcb714fefd328a93521ed33d6adf" => :sierra - sha256 "b5bc0c06241f2c7de3da21b27f2126903550fe959378992fe5260eeedb0f612f" => :el_capitan - sha256 "b50be16e36671d7818d123403937496f258882c98bbc6f4d8242c2e6eb97b310" => :yosemite - end - - depends_on "glktermw" => :build - - def install - glk = Formula["glktermw"] - inreplace "Makefile", "GLKINCLUDEDIR = ../cheapglk", "GLKINCLUDEDIR = #{glk.include}" - inreplace "Makefile", "GLKLIBDIR = ../cheapglk", "GLKLIBDIR = #{glk.lib}" - inreplace "Makefile", "Make.cheapglk", "Make.#{glk.name}" - - system "make" - bin.install "glulxe" - end - - test do - assert pipe_output("#{bin}/glulxe -v").start_with? "GlkTerm, library version" - end -end diff --git a/Formula/gluon.rb b/Formula/gluon.rb deleted file mode 100644 index 8be0925fc85ad..0000000000000 --- a/Formula/gluon.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Gluon < Formula - desc "Static, type inferred and embeddable language written in Rust" - homepage "https://gluon-lang.org/" - url "https://github.com/gluon-lang/gluon/archive/v0.15.1.tar.gz" - sha256 "9e05b157337804a4cf111ee8a1854250970c460e9a32d3b662fc90ebf5b91638" - head "https://github.com/gluon-lang/gluon.git" - - bottle do - cellar :any_skip_relocation - sha256 "c81ab3772a8ec0e0d0fcc6a0566f0a031ee949bd7703480b9981e8ace0f33028" => :catalina - sha256 "b601ddc20dc2e67702ff2fccd9750393c77a3d121d3e25366909ef30370136cd" => :mojave - sha256 "3e806c404ad175fe37f1ad13c7ce6e229a3654b61ccb70e0ff814e1fbe628222" => :high_sierra - end - - depends_on "rust" => :build - - def install - cd "repl" do - system "cargo", "install", *std_cargo_args - end - end - - test do - (testpath/"test.glu").write <<~EOS - let io = import! std.io - io.print "Hello world!\\n" - EOS - assert_equal "Hello world!\n", shell_output("#{bin}/gluon test.glu") - end -end diff --git a/Formula/glyr.rb b/Formula/glyr.rb deleted file mode 100644 index da2c53c56605d..0000000000000 --- a/Formula/glyr.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Glyr < Formula - desc "Music related metadata search engine with command-line interface and C API" - homepage "https://github.com/sahib/glyr" - url "https://github.com/sahib/glyr/archive/1.0.10.tar.gz" - sha256 "77e8da60221c8d27612e4a36482069f26f8ed74a1b2768ebc373c8144ca806e8" - license "LGPL-3.0" - revision 1 - - bottle do - cellar :any - sha256 "0a32bfceb64d33842aee008ca44e823062589323777efee2f15f013f18017a08" => :catalina - sha256 "45d36208e031f97c1202824c6a6a0a9e97d777fae91ce7cddc3ca17c3168d31c" => :mojave - sha256 "fb3ef9186aae754a62a466aae16471049bdaefcc168106fc6f0097e937115524" => :high_sierra - sha256 "04cbfc6d3294d068b3a97bfb5235aed84b3e95478f8f3e873be17127142b07f6" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - search = "--artist Beatles --album \"Please Please Me\"" - cmd = "#{bin}/glyrc cover --no-download #{search} -w stdout" - assert_match %r{^https?://}, pipe_output(cmd, nil, 0) - end -end diff --git a/Formula/gmail-backup.rb b/Formula/gmail-backup.rb deleted file mode 100644 index 3d0c2eab01a0e..0000000000000 --- a/Formula/gmail-backup.rb +++ /dev/null @@ -1,20 +0,0 @@ -class GmailBackup < Formula - desc "Backup and restore the content of your Gmail account" - homepage "https://code.google.com/archive/p/gmail-backup-com/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/gmail-backup-com/gmail-backup-20110307.tar.gz" - sha256 "caf7cb40ea580e506f90a6029a64fedaf1234093c729ca7e6e36efbd709deb93" - - bottle :unneeded - - def install - bin.install "gmail-backup.py" => "gmail-backup" - libexec.install Dir["*"] - - ENV.prepend_path "PYTHONPATH", libexec - bin.env_script_all_files(libexec, :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system bin/"gmail-backup", "--help" - end -end diff --git a/Formula/gmailctl.rb b/Formula/gmailctl.rb deleted file mode 100644 index ab8344050ded0..0000000000000 --- a/Formula/gmailctl.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Gmailctl < Formula - desc "Declarative configuration for Gmail filters" - homepage "https://github.com/mbrt/gmailctl" - url "https://github.com/mbrt/gmailctl/archive/v0.7.0.tar.gz" - sha256 "8c3d88c06709d4c96414fa0ba1a90f0f8f12026d726a1ddb54b439b4b5b6ec5f" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "d3a358debf1f7335f2736a28437b8106f917a9449593a498ccf6ce2589d813aa" => :catalina - sha256 "7695c67ce6a12008b8c04a84d4899cf17d7bc5d3ad32a9bca35c101c1ca65195" => :mojave - sha256 "c2803a3f282d5b1b60b76552787d13ad54d0403537380daebdf09105793b87df" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", *std_go_args, "cmd/gmailctl/main.go" - end - - test do - assert_includes shell_output("#{bin}/gmailctl init"), "The credentials are not initialized" - end -end diff --git a/Formula/gmic.rb b/Formula/gmic.rb deleted file mode 100644 index ec1aa4e41564e..0000000000000 --- a/Formula/gmic.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Gmic < Formula - desc "Full-Featured Open-Source Framework for Image Processing" - homepage "https://gmic.eu/" - url "https://gmic.eu/files/source/gmic_2.9.1.tar.gz" - sha256 "50c9dd418b8d0e80c703c2e2b179b6049343567483d37d9ff6c642c6ede95d8d" - head "https://github.com/dtschump/gmic.git" - - bottle do - cellar :any - sha256 "183c99cebc7e117f17d258c875e859aad64f0d2b4837386fb76be23341f9ff95" => :catalina - sha256 "32903db189cdbbc67e0445786b483d3266c36033e4ea9ac4473972844460dc37" => :mojave - sha256 "c012e70fb7185d12e44fbb64e1a27dcaaad6089c57a7b8862fb984c66b32eeee" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "fftw" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - - def install - system "cmake", *std_cmake_args, - "-DENABLE_FFMPEG=OFF", - "-DENABLE_OPENCV=OFF", - "-DENABLE_OPENEXR=OFF", - "-DENABLE_X=OFF" - system "make", "install" - end - - test do - %w[test.jpg test.png].each do |file| - system bin/"gmic", test_fixtures(file) - end - system bin/"gmic", "-input", test_fixtures("test.jpg"), "rodilius", "10,4,400,16", - "smooth", "60,0,1,1,4", "normalize_local", "10,16", "-output", testpath/"test_rodilius.jpg" - assert_predicate testpath/"test_rodilius.jpg", :exist? - end -end diff --git a/Formula/gmime.rb b/Formula/gmime.rb deleted file mode 100644 index faffde12258df..0000000000000 --- a/Formula/gmime.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Gmime < Formula - desc "MIME mail utilities" - homepage "https://spruce.sourceforge.io/gmime/" - url "https://download.gnome.org/sources/gmime/3.2/gmime-3.2.7.tar.xz" - sha256 "2aea96647a468ba2160a64e17c6dc6afe674ed9ac86070624a3f584c10737d44" - license "LGPL-2.1" - - bottle do - sha256 "877f2024cc0d97bc94f559ad992f87bdf6fdc23f9a1acc7b5bb13f0711b734c3" => :catalina - sha256 "7a0bda5bca906bc62e3ab24fc39752e2858fce861ba759040fc864928ab18d96" => :mojave - sha256 "0bb48841eae316695037bcd793673d518d0f2be20968a115a81c92824fb77ac0" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gpgme" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --enable-largefile - --disable-vala - --disable-glibtest - --enable-crypto - --enable-introspection - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main (int argc, char **argv) - { - g_mime_init(); - if (gmime_major_version>=3) { - return 0; - } else { - return 1; - } - } - 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}/gmime-3.0 - -I#{pcre.opt_include} - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lgio-2.0 - -lglib-2.0 - -lgmime-3.0 - -lgobject-2.0 - -lintl - ] - system ENV.cc, "-o", "test", "test.c", *flags - system "./test" - end -end diff --git a/Formula/gmp.rb b/Formula/gmp.rb deleted file mode 100644 index 8eb22641b22b1..0000000000000 --- a/Formula/gmp.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Gmp < Formula - desc "GNU multiple precision arithmetic library" - homepage "https://gmplib.org/" - url "https://gmplib.org/download/gmp/gmp-6.2.0.tar.xz" - mirror "https://ftp.gnu.org/gnu/gmp/gmp-6.2.0.tar.xz" - sha256 "258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "2e6acd6e62d1b8ef0800061e113aea30a63f56b32b99c010234c0420fd6d3ecf" => :catalina - sha256 "1bbea4983a4c883c8eb8b7e19df9fab52f0575be8a34b629fc7df79895f48937" => :mojave - sha256 "63f220c9ac4ebc386711c8c4c5e1f955cfb0a784bdc41bfd6c701dc789be7fcc" => :high_sierra - end - - uses_from_macos "m4" => :build - - patch do - # Remove when upstream fix is released - # https://gmplib.org/list-archives/gmp-bugs/2020-July/004837.html - # arm64-darwin patch - url "https://raw.githubusercontent.com/Homebrew/formula-patches/c53834b4/gmp/6.2.0-arm.patch" - sha256 "4c5b926f47c78f9cc6f900130d020e7f3aa6f31a6e84246e8886f6da04f7424c" - end - - if Hardware::CPU.arm? - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - # Work around macOS Catalina / Xcode 11 code generation bug - # (test failure t-toom53, due to wrong code in mpn/toom53_mul.o) - ENV.append_to_cflags "-fno-stack-check" - - # Enable --with-pic to avoid linking issues with the static library - args = %W[--prefix=#{prefix} --enable-cxx --with-pic] - - if Hardware::CPU.arm? - args << "--build=aarch64-apple-darwin#{`uname -r`.to_i}" - system "autoreconf", "-fiv" - else - args << "--build=#{Hardware.oldest_cpu}-apple-darwin#{`uname -r`.to_i}" - end - system "./configure", *args - system "make" - system "make", "check" - 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", "-L#{lib}", "-lgmp", "-o", "test" - system "./test" - - # Test the static library to catch potential linking issues - system ENV.cc, "test.c", "#{lib}/libgmp.a", "-o", "test" - system "./test" - end -end diff --git a/Formula/gmsh.rb b/Formula/gmsh.rb deleted file mode 100644 index 49ac393fdcc8d..0000000000000 --- a/Formula/gmsh.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Gmsh < Formula - desc "3D finite element grid generator with CAD engine" - homepage "https://gmsh.info/" - url "https://gmsh.info/src/gmsh-4.6.0-source.tgz" - sha256 "0f2c55e50fb6c478ebc8977f6341c223754cbf3493b7b0d683b4395ae9f2ad1c" - head "https://gitlab.onelab.info/gmsh/gmsh.git" - - bottle do - cellar :any - sha256 "1b53f3f06a4da49a5575231bfe012e7bf576c4e42aae04013d5cf567e443bcb3" => :catalina - sha256 "65571ab862218f934db927a6e05b52742cd77b7d539c32a02626b061c3e7b33f" => :mojave - sha256 "bdab380d0009ef4a2b0b3c26cdc4a543654964f6d8eecb1fe5443a29c1cdee46" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "cairo" - depends_on "fltk" - depends_on "gcc" # for gfortran - depends_on "open-mpi" - depends_on "opencascade" - - def install - args = std_cmake_args + %W[ - -DENABLE_OS_SPECIFIC_INSTALL=0 - -DGMSH_BIN=#{bin} - -DGMSH_LIB=#{lib} - -DGMSH_DOC=#{pkgshare}/gmsh - -DGMSH_MAN=#{man} - -DENABLE_BUILD_LIB=ON - -DENABLE_BUILD_SHARED=ON - -DENABLE_NATIVE_FILE_CHOOSER=ON - -DENABLE_PETSC=OFF - -DENABLE_SLEPC=OFF - -DENABLE_OCC=ON - ] - - ENV["CASROOT"] = Formula["opencascade"].opt_prefix - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - - # Move onelab.py into libexec instead of bin - mkdir_p libexec - mv bin/"onelab.py", libexec - end - end - - test do - system "#{bin}/gmsh", "#{share}/doc/gmsh/tutorial/t1.geo", "-parse_and_exit" - end -end diff --git a/Formula/gmt.rb b/Formula/gmt.rb deleted file mode 100644 index 6f60f8239c359..0000000000000 --- a/Formula/gmt.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Gmt < Formula - desc "Tools for manipulating and plotting geographic and Cartesian data" - homepage "https://www.generic-mapping-tools.org/" - url "https://github.com/GenericMappingTools/gmt/releases/download/6.1.0/gmt-6.1.0-src.tar.xz" - mirror "ftp://ftp.soest.hawaii.edu/gmt/gmt-6.1.0-src.tar.xz" - mirror "https://mirrors.ustc.edu.cn/gmt/gmt-6.1.0-src.tar.xz" - sha256 "ad02780153c53a1116ae0cc7945b6f533f066af44c30d7f95ff138cfede1867c" - head "https://github.com/GenericMappingTools/gmt.git" - - bottle do - sha256 "cd6f1812723ff16468641ab3574c929b555e1ecb6b6e328be9952711d53d3823" => :catalina - sha256 "6ba6b23540ca9730012d24ab1d910b4308a2092d9e28d088febbd0a1fd0e4fe5" => :mojave - sha256 "dbd89446b661b2cd72fa90fa57316aa38f2d6a8c18cc1ab430713c2da44d862e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "fftw" - depends_on "gdal" - depends_on "netcdf" - depends_on "pcre" - - resource "gshhg" do - url "https://github.com/GenericMappingTools/gshhg-gmt/releases/download/2.3.7/gshhg-gmt-2.3.7.tar.gz" - mirror "ftp://ftp.soest.hawaii.edu/gmt/gshhg-gmt-2.3.7.tar.gz" - mirror "https://mirrors.ustc.edu.cn/gmt/gshhg-gmt-2.3.7.tar.gz" - sha256 "9bb1a956fca0718c083bef842e625797535a00ce81f175df08b042c2a92cfe7f" - end - - resource "dcw" do - url "https://github.com/GenericMappingTools/dcw-gmt/releases/download/1.1.4/dcw-gmt-1.1.4.tar.gz" - mirror "ftp://ftp.soest.hawaii.edu/gmt/dcw-gmt-1.1.4.tar.gz" - mirror "https://mirrors.ustc.edu.cn/gmt/dcw-gmt-1.1.4.tar.gz" - sha256 "8d47402abcd7f54a0f711365cd022e4eaea7da324edac83611ca035ea443aad3" - end - - def install - (buildpath/"gshhg").install resource("gshhg") - (buildpath/"dcw").install resource("dcw") - - # GMT_DOCDIR and GMT_MANDIR must be relative paths - args = std_cmake_args.concat %W[ - -DCMAKE_INSTALL_PREFIX=#{prefix} - -DGMT_DOCDIR=share/doc/gmt - -DGMT_MANDIR=share/man - -DGSHHG_ROOT=#{buildpath}/gshhg - -DCOPY_GSHHG:BOOL=TRUE - -DDCW_ROOT=#{buildpath}/dcw - -DCOPY_DCW:BOOL=TRUE - -DFFTW3_ROOT=#{Formula["fftw"].opt_prefix} - -DGDAL_ROOT=#{Formula["gdal"].opt_prefix} - -DNETCDF_ROOT=#{Formula["netcdf"].opt_prefix} - -DPCRE_ROOT=#{Formula["pcre"].opt_prefix} - -DFLOCK:BOOL=TRUE - -DGMT_INSTALL_MODULE_LINKS:BOOL=FALSE - -DGMT_INSTALL_TRADITIONAL_FOLDERNAMES:BOOL=FALSE - -DLICENSE_RESTRICTED:BOOL=FALSE - ] - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - inreplace bin/"gmt-config", "#{HOMEBREW_LIBRARY}/Homebrew/shims/mac/super/clang", "/usr/bin/clang" - end - - def caveats - <<~EOS - GMT needs Ghostscript for the 'psconvert' command to convert PostScript files - to other formats. To use 'psconvert', please 'brew install ghostscript'. - - GMT needs FFmpeg for the 'movie' command to make movies in MP4 or WebM format. - If you need this feature, please 'brew install ffmpeg'. - - GMT needs GraphicsMagick for the 'movie' command to make animated GIFs. - If you need this feature, please 'brew install graphicsmagick'. - EOS - end - - test do - system "#{bin}/gmt pscoast -R0/360/-70/70 -Jm1.2e-2i -Ba60f30/a30f15 -Dc -G240 -W1/0 -P > test.ps" - assert_predicate testpath/"test.ps", :exist? - end -end diff --git a/Formula/gmt@5.rb b/Formula/gmt@5.rb deleted file mode 100644 index 2b73e338c7a30..0000000000000 --- a/Formula/gmt@5.rb +++ /dev/null @@ -1,83 +0,0 @@ -class GmtAT5 < Formula - desc "Tools for manipulating and plotting geographic and Cartesian data" - homepage "https://www.generic-mapping-tools.org/" - url "https://github.com/GenericMappingTools/gmt/releases/download/5.4.5/gmt-5.4.5-src.tar.gz" - mirror "https://mirrors.ustc.edu.cn/gmt/gmt-5.4.5-src.tar.gz" - mirror "https://fossies.org/linux/misc/GMT/gmt-5.4.5-src.tar.gz" - sha256 "225629c7869e204d5f9f1a384c4ada43e243f83e1ed28bdca4f7c2896bf39ef6" - revision 6 - - bottle do - sha256 "ccbfdc5293e264dfa68d6bd0bc6bbe84cda41df4b0dae485f44921a918762ff0" => :catalina - sha256 "470de2773519e927fcf3c10b5d9128c31f151c348ef752cad40190fe7790195d" => :mojave - sha256 "032dca5dd465eb6ba588a02df5c3912835cfc0412a595d6895c44e0e71c99162" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "fftw" - depends_on "gdal" - depends_on "netcdf" - depends_on "pcre" - - resource "gshhg" do - url "https://github.com/GenericMappingTools/gshhg-gmt/releases/download/2.3.7/gshhg-gmt-2.3.7.tar.gz" - mirror "https://mirrors.ustc.edu.cn/gmt/gshhg-gmt-2.3.7.tar.gz" - mirror "https://fossies.org/linux/misc/GMT/gshhg-gmt-2.3.7.tar.gz" - sha256 "9bb1a956fca0718c083bef842e625797535a00ce81f175df08b042c2a92cfe7f" - end - - resource "dcw" do - url "https://github.com/GenericMappingTools/dcw-gmt/releases/download/1.1.4/dcw-gmt-1.1.4.tar.gz" - mirror "https://mirrors.ustc.edu.cn/gmt/dcw-gmt-1.1.4.tar.gz" - mirror "https://fossies.org/linux/misc/GMT/dcw-gmt-1.1.4.tar.gz" - sha256 "8d47402abcd7f54a0f711365cd022e4eaea7da324edac83611ca035ea443aad3" - end - - # netcdf 4.7.4 compatibility - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/cdbf0de198531528db908a5d827f3d2e5b9618cc/gmt%405/netcdf-4.7.4.patch" - sha256 "d894869830f6e57b0670dc31df6b5c684e079418f8bf5c0cd0f7014b65c1981f" - end - - def install - (buildpath/"gshhg").install resource("gshhg") - (buildpath/"dcw").install resource("dcw") - - args = std_cmake_args.concat %W[ - -DCMAKE_INSTALL_PREFIX=#{prefix} - -DGMT_DOCDIR=#{share}/doc/gmt - -DGMT_MANDIR=#{man} - -DGSHHG_ROOT=#{buildpath}/gshhg - -DCOPY_GSHHG:BOOL=TRUE - -DDCW_ROOT=#{buildpath}/dcw - -DCOPY_DCW:BOOL=TRUE - -DFFTW3_ROOT=#{Formula["fftw"].opt_prefix} - -DGDAL_ROOT=#{Formula["gdal"].opt_prefix} - -DNETCDF_ROOT=#{Formula["netcdf"].opt_prefix} - -DPCRE_ROOT=#{Formula["pcre"].opt_prefix} - -DFLOCK:BOOL=TRUE - -DGMT_INSTALL_MODULE_LINKS:BOOL=TRUE - -DGMT_INSTALL_TRADITIONAL_FOLDERNAMES:BOOL=FALSE - -DLICENSE_RESTRICTED:BOOL=FALSE - ] - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end - - def caveats - <<~EOS - GMT needs Ghostscript for the 'psconvert' command to convert PostScript files - to other formats. To use 'psconvert', please 'brew install ghostscript'. - EOS - end - - test do - system "#{bin}/pscoast -R0/360/-70/70 -Jm1.2e-2i -Ba60f30/a30f15 -Dc -G240 -W1/0 -P > test.ps" - assert_predicate testpath/"test.ps", :exist? - end -end diff --git a/Formula/gnirehtet.rb b/Formula/gnirehtet.rb deleted file mode 100644 index 08e96738a1857..0000000000000 --- a/Formula/gnirehtet.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Gnirehtet < Formula - desc "Reverse tethering tool for Android" - homepage "https://github.com/Genymobile/gnirehtet" - url "https://github.com/Genymobile/gnirehtet/archive/v2.4.tar.gz" - sha256 "5ff179fca58e85473e737680a72aeb84c710082283bfe9cce4b044b3c2436c4d" - license "Apache-2.0" - head "https://github.com/Genymobile/gnirehtet.git" - - bottle do - cellar :any_skip_relocation - sha256 "8f2c4797209bc261df8b2b9ba75d2719070c1c3e587c392d941aac7b18e9da8e" => :catalina - sha256 "879106aecceb430220e20e3224e906cb2cbe1fdf92febed03c6f319fb668592d" => :mojave - sha256 "86843aab81fac7df1b3fe9c92c47ea6be7367fecefa90398dd2a9d322160455a" => :high_sierra - end - - depends_on "rust" => :build - depends_on "socat" => :test - - resource "java_bundle" do - url "https://github.com/Genymobile/gnirehtet/releases/download/v2.4/gnirehtet-java-v2.4.zip" - sha256 "10b6cca49a76231fbf8ac3428cf95e9f1c193c4f47abe2b8e2aa16746eb8cc21" - end - - def install - resource("java_bundle").stage { libexec.install "gnirehtet.apk" } - - system "cargo", "install", "--locked", "--root", libexec, "--path", "relay-rust" - mv "#{libexec}/bin/gnirehtet", "#{libexec}/gnirehtet" - - (bin/"gnirehtet").write <<~EOS - #!/bin/bash - if [[ "$1" == "install" ]]; then - shift - echo "Installing #{libexec}/gnirehtet.apk" - adb install -r #{libexec}/gnirehtet.apk - else - #{libexec}/gnirehtet $* - fi - EOS - 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 - gnirehtet_err = "#{testpath}/gnirehtet.err" - gnirehtet_out = "#{testpath}/gnirehtet.out" - - port = free_port - begin - child_pid = fork do - Process.setsid - $stdout.reopen(gnirehtet_out, "w") - $stderr.reopen(gnirehtet_err, "w") - exec bin/"gnirehtet", "relay", "-p", port.to_s - end - sleep 3 - system "socat", "-T", "1", "-", "TCP4:127.0.0.1:#{port}" - ensure - pgid = Process.getpgid(child_pid) - Process.kill("HUP", -pgid) - Process.detach(pgid) - end - - assert_empty File.readlines(gnirehtet_err) - - output = File.readlines(gnirehtet_out) - assert output.any? { |l| l["TunnelServer: Client #0 connected"] } - assert output.any? { |l| l["TunnelServer: Client #0 disconnected"] } - end -end diff --git a/Formula/gnome-autoar.rb b/Formula/gnome-autoar.rb deleted file mode 100644 index f27e5739e9806..0000000000000 --- a/Formula/gnome-autoar.rb +++ /dev/null @@ -1,69 +0,0 @@ -class GnomeAutoar < Formula - desc "GNOME library for archive handling" - homepage "https://github.com/GNOME/gnome-autoar" - url "https://download.gnome.org/sources/gnome-autoar/0.2/gnome-autoar-0.2.4.tar.xz" - sha256 "0a34c377f8841abbf4c29bc848b301fbd8e4e20c03d7318c777c58432033657a" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "e98e396441864f69d9866921363bbff8fe3a0e6e7048e9fcebfa98d0f8e3100c" => :catalina - sha256 "8f87552420faa2d64fee8cf655a15c58eb988bba92284b00e4fcb3cf2f10ce82" => :mojave - sha256 "bc17062bdb3f3b299c5122ffd887ff872d22f9d3021faed94db07da9687d096c" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+3" - depends_on "libarchive" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--disable-glibtest", - "--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 - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = autoar_extractor_get_type(); - return 0; - } - EOS - gettext = Formula["gettext"] - glib = Formula["glib"] - libarchive = Formula["libarchive"] - 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}/gnome-autoar-0 - -I#{libarchive.opt_include} - -I#{pcre.opt_include} - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{libarchive.opt_lib} - -L#{lib} - -larchive - -lgio-2.0 - -lglib-2.0 - -lgnome-autoar-0 - -lgobject-2.0 - -lintl - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gnome-common.rb b/Formula/gnome-common.rb deleted file mode 100644 index 9c24500e558e8..0000000000000 --- a/Formula/gnome-common.rb +++ /dev/null @@ -1,23 +0,0 @@ -class GnomeCommon < Formula - desc "Core files for GNOME" - homepage "https://gitlab.gnome.org/GNOME/gnome-common" - url "https://download.gnome.org/sources/gnome-common/3.18/gnome-common-3.18.0.tar.xz" - sha256 "22569e370ae755e04527b76328befc4c73b62bfd4a572499fde116b8318af8cf" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a2499bb22344a9d8da6807a7a3cb3ebbf525f954d2e6f028953cae230e040106" => :catalina - sha256 "abae5e0fbfb6d9995ca705f512c606efc426b17e0aee0e323f62bdb6daebdcf6" => :mojave - sha256 "1a24d488923e1d73f30e541bf1fcd4956d73e4d0f11c32e5133946cb6a1c546b" => :high_sierra - sha256 "6aae778f648ed18eb63e49a5764fa98431683dcaff1d42280d9cdd464b727312" => :sierra - sha256 "a5ad22711bdc05e9dbe4c4891ad06f146bc81b4d0d7d737d582f32e36f4e6fc7" => :el_capitan - sha256 "7e3512e3a7c39f759ab9f3642831961b355f3f83ae6e19a26fdaf91739870e23" => :yosemite - sha256 "a96e5dedc2888b6caa326da0abd8eb7d3f1426407e8bef82a6ba0f41adb7016a" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/gnome-latex.rb b/Formula/gnome-latex.rb deleted file mode 100644 index 6b9042f867949..0000000000000 --- a/Formula/gnome-latex.rb +++ /dev/null @@ -1,47 +0,0 @@ -class GnomeLatex < Formula - desc "LaTeX editor for the GNOME desktop" - homepage "https://wiki.gnome.org/Apps/GNOME-LaTeX" - url "https://download.gnome.org/sources/gnome-latex/3.36/gnome-latex-3.36.0.tar.xz" - sha256 "1657238f4e2b419fe211e4b0b51a20889f44e6e3f498b87e25e032f8439ec9a0" - license "GPL-3.0" - revision 1 - - bottle do - sha256 "df723e3dd919a9d020089e8e19dea1a65c9f621907519fd35e4330cb69d53c28" => :catalina - sha256 "d82135bcbb899a686ef55bbbfea0eeecc1267da9e5bc075274a01b720ea9441d" => :mojave - sha256 "f6332db50b6a791c5fb73abe2b26b097b9f60acb78cb7a8b1ce398ec3e04d3fd" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "intltool" => :build - depends_on "itstool" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "adwaita-icon-theme" - depends_on "gnome-themes-standard" - depends_on "gspell" - depends_on "libgee" - depends_on "tepl" - - def install - system "./configure", "--disable-schemas-compile", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-dconf-migration", - "--prefix=#{prefix}" - system "make", "install" - 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" - system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", - "#{HOMEBREW_PREFIX}/share/icons/HighContrast" - end - - test do - system "#{bin}/gnome-latex", "--version" - end -end diff --git a/Formula/gnome-recipes.rb b/Formula/gnome-recipes.rb deleted file mode 100644 index 749c74a1ae658..0000000000000 --- a/Formula/gnome-recipes.rb +++ /dev/null @@ -1,66 +0,0 @@ -class GnomeRecipes < Formula - desc "Formula for GNOME recipes" - homepage "https://wiki.gnome.org/Apps/Recipes" - url "https://download.gnome.org/sources/gnome-recipes/2.0/gnome-recipes-2.0.2.tar.xz" - sha256 "1be9d2fcb7404a97aa029d2409880643f15071c37039247a6a4320e7478cd5fb" - revision 13 - - bottle do - sha256 "a6f88d7b457fdd95336a608e43e8bcc13af68dcf3c35c41b398d2aa867a65a27" => :catalina - sha256 "ebf73b933f00c8aa705f72a33cee9f72679563896c33509d705a3efe04d2a4e8" => :mojave - sha256 "eb8410b2a27097f646a3e75810a5a21b04f76aee9e0fb393af2f7d4f2df32ea9" => :high_sierra - end - - depends_on "itstool" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "gnome-autoar" - depends_on "gnu-tar" - depends_on "gspell" - depends_on "gtk+3" - depends_on "json-glib" # for goa - depends_on "libcanberra" - depends_on "librest" # for goa - depends_on "libsoup" - depends_on "libxml2" - - resource "goa" do - url "https://download.gnome.org/sources/gnome-online-accounts/3.30/gnome-online-accounts-3.30.2.tar.xz" - sha256 "05c7e588c884a4145db376880303588f74b76d1fa11afbeccb74c6eff36b2fdc" - end - - def install - resource("goa").stage do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{libexec}", - "--disable-backend" - system "make", "install" - end - - ENV.prepend_path "PKG_CONFIG_PATH", libexec/"lib/pkgconfig" - - # BSD tar does not support the required options - inreplace "src/gr-recipe-store.c", "argv[0] = \"tar\";", "argv[0] = \"gtar\";" - # stop meson_post_install.py from doing what needs to be done in the post_install step - ENV["DESTDIR"] = "" - ENV.delete "PYTHONPATH" - mkdir "build" do - system "meson", *std_meson_args, ".." - 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 - system "#{bin}/gnome-recipes", "--help" - end -end diff --git a/Formula/gnome-themes-standard.rb b/Formula/gnome-themes-standard.rb deleted file mode 100644 index 4ff1d24284afd..0000000000000 --- a/Formula/gnome-themes-standard.rb +++ /dev/null @@ -1,34 +0,0 @@ -class GnomeThemesStandard < Formula - desc "Default themes for the GNOME desktop environment" - homepage "https://gitlab.gnome.org/GNOME/gnome-themes-extra" - url "https://download.gnome.org/sources/gnome-themes-standard/3.22/gnome-themes-standard-3.22.3.tar.xz" - sha256 "61dc87c52261cfd5b94d65e8ffd923ddeb5d3944562f84942eeeb197ab8ab56a" - revision 2 - - bottle do - cellar :any - sha256 "6fb1066c6af0428fee29272851b4d7fbf10bac3bec4ed48ce6cffb780a3175f1" => :catalina - sha256 "0275e08061a7fc1c641729075add70362499309548d9f82a65f30397fe756073" => :mojave - sha256 "7c871fcd54d59a07719e5b1f22ca003921e479548ee9d13c5910af482b47891e" => :high_sierra - sha256 "7e5bfe5894c0498b6b9325a782e4ea1c756b042d527815547cba6e6f411095a2" => :sierra - end - - depends_on "gettext" => :build - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gtk+" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--disable-gtk3-engine" - - system "make", "install" - end - - test do - assert_predicate share/"icons/HighContrast/scalable/actions/document-open-recent.svg", :exist? - assert_predicate lib/"gtk-2.0/2.10.0/engines/libadwaita.so", :exist? - end -end diff --git a/Formula/gnu-apl.rb b/Formula/gnu-apl.rb deleted file mode 100644 index 497dc8d24b98d..0000000000000 --- a/Formula/gnu-apl.rb +++ /dev/null @@ -1,58 +0,0 @@ -class GnuApl < Formula - desc "GNU implementation of the programming language APL" - homepage "https://www.gnu.org/software/apl/" - url "https://ftp.gnu.org/gnu/apl/apl-1.8.tar.gz" - mirror "https://ftpmirror.gnu.org/apl/apl-1.8.tar.gz" - sha256 "144f4c858a0d430ce8f28be90a35920dd8e0951e56976cb80b55053fa0d8bbcb" - license "GPL-3.0" - - bottle do - sha256 "2a7717b6b60567eade10b30f473771f563ebd6a009c91e0522eab6497516e892" => :catalina - sha256 "9df4d2bfcfda74e10451b132d0c274265bb1e550a9d7829402913d7798a83c46" => :mojave - sha256 "d1d035cef7cb23ecde90146a8eae564fbbeba3546228618dc250581d5611a4ab" => :high_sierra - sha256 "cbb8043b314e3141b2a9e6e3121b7c797ca68298374d9c50f6d07447e5ea7ca5" => :sierra - end - - head do - url "https://svn.savannah.gnu.org/svn/apl/trunk" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "readline" # GNU Readline is required, libedit won't work - - def install - # 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 - ENV.delete("HOMEBREW_SDKROOT") if MacOS.version == :high_sierra - - system "autoreconf", "-fiv" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"hello.apl").write <<~EOS - 'Hello world' - )OFF - EOS - - pid = fork do - exec "#{bin}/APserver" - end - sleep 4 - - begin - assert_match "Hello world", shell_output("#{bin}/apl -s -f hello.apl") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/gnu-barcode.rb b/Formula/gnu-barcode.rb deleted file mode 100644 index 044399d7b2ec9..0000000000000 --- a/Formula/gnu-barcode.rb +++ /dev/null @@ -1,66 +0,0 @@ -class GnuBarcode < Formula - desc "Convert text strings to printed bars" - homepage "https://www.gnu.org/software/barcode/" - url "https://ftp.gnu.org/gnu/barcode/barcode-0.99.tar.gz" - mirror "https://ftpmirror.gnu.org/barcode/barcode-0.99.tar.gz" - sha256 "7c031cf3eb811242f53664379aebbdd9fae0b7b26b5e5d584c31a9f338154b64" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "237ba00c7acb6a0343b17cae529d6a854ae321a03136d0f2882b010f4107230c" => :catalina - sha256 "a24619af860a3658774fdcb5b5439ed751e1284b724e2f5dc8bb0c35736f879a" => :mojave - sha256 "bd55ad14c9e7411d952d9243b6c4c7aa84162afe34ed1e3c3d9e9a368d2d6485" => :high_sierra - sha256 "7588bb4800b5c348e103ed92e8bcc2f38812b8fbf4e254315e6429b3961e9f05" => :sierra - sha256 "1885abad5bc70c2e9952e131307ca7282d851856ebdea58dadc69f0e125a7c22" => :el_capitan - sha256 "819af5d364f041397c7c6b768829df7fcbd617f86194a1656b5523eeaed9415a" => :yosemite - sha256 "285a9fa2833e843765087545f778aeadc670555bcac38193788c866826a88d42" => :mavericks - end - - # Patch and ac_cv_func_calloc_0_nonnull config addresses the following issue: - # https://lists.gnu.org/archive/html/bug-barcode/2015-06/msg00001.html - patch :DATA - - def install - system "./configure", "ac_cv_func_calloc_0_nonnull=yes", - "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - - system "make" - system "make", "MAN1DIR=#{man1}", - "MAN3DIR=#{man3}", - "INFODIR=#{info}", - "install" - end - - test do - (testpath/"test.txt").write("12345") - system "#{bin}/barcode", "-e", "CODE39", "-i", "test.txt", "-o", "test.ps" - assert File.read("test.ps").start_with?("") - end -end - -__END__ -diff -bur barcode-original/barcode.h barcode-new/barcode.h ---- barcode-original/barcode.h 2013-03-29 16:51:07.000000000 -0500 -+++ barcode-new/barcode.h 2015-08-16 16:06:23.000000000 -0500 -@@ -123,6 +123,6 @@ - } - #endif - --int streaming; -+extern int streaming; - - #endif /* _BARCODE_H_ */ -diff -bur barcode-original/pcl.c barcode-new/pcl.c ---- barcode-original/pcl.c 2013-03-29 17:23:31.000000000 -0500 -+++ barcode-new/pcl.c 2015-08-16 16:07:06.000000000 -0500 -@@ -29,6 +29,7 @@ - - #define SHRINK_AMOUNT 0.15 /* shrink the bars to account for ink spreading */ - -+int streaming; - - /* - * How do the "partial" and "textinfo" strings work? See file "ps.c" diff --git a/Formula/gnu-chess.rb b/Formula/gnu-chess.rb deleted file mode 100644 index de79f3b58fb72..0000000000000 --- a/Formula/gnu-chess.rb +++ /dev/null @@ -1,59 +0,0 @@ -class GnuChess < Formula - desc "GNU Chess" - homepage "https://www.gnu.org/software/chess/" - url "https://ftp.gnu.org/gnu/chess/gnuchess-6.2.7.tar.gz" - mirror "https://ftpmirror.gnu.org/chess/gnuchess-6.2.7.tar.gz" - sha256 "e536675a61abe82e61b919f6b786755441d9fcd4c21e1c82fb9e5340dd229846" - license "GPL-3.0" - - bottle do - sha256 "85423112485c7dbe474c99c93008b8a7a7a8c9a9737bbda3e372fde8674cbef1" => :catalina - sha256 "4bc514e190844faa459fbbc204c7bdd4699cb6cd09011811ae0999429343f0da" => :mojave - sha256 "81883d1506513bdb4feff2617b492237aef06a2f17f3bd4eb81e68142c4d73af" => :high_sierra - end - - head do - url "https://svn.savannah.gnu.org/svn/chess/trunk" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "help2man" => :build - depends_on "gettext" - end - - depends_on "readline" - - resource "book" do - url "https://ftp.gnu.org/gnu/chess/book_1.02.pgn.gz" - sha256 "deac77edb061a59249a19deb03da349cae051e52527a6cb5af808d9398d32d44" - end - - def install - # Fix "install-sh: Permission denied" issue - chmod "+x", "install-sh" - - if build.head? - system "autoreconf", "--install" - chmod 0755, "install-sh" - end - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - - resource("book").stage do - doc.install "book_1.02.pgn" - end - end - - def caveats - <<~EOS - This formula also downloads the additional opening book. The - opening book is a PGN file located in #{doc} that can be added - using gnuchess commands. - EOS - end - - test do - assert_equal "GNU Chess #{version}", shell_output("#{bin}/gnuchess --version").chomp - end -end diff --git a/Formula/gnu-cobol.rb b/Formula/gnu-cobol.rb deleted file mode 100644 index 82ebdad94093e..0000000000000 --- a/Formula/gnu-cobol.rb +++ /dev/null @@ -1,48 +0,0 @@ -class GnuCobol < Formula - desc "Implements much of the COBOL 85 and COBOL 2002 standards" - homepage "https://sourceforge.net/projects/open-cobol/" - url "https://downloads.sourceforge.net/project/open-cobol/gnucobol/2.2/gnucobol-2.2.tar.xz" - sha256 "dc18fc45c269debfe86a4bbe20a7250983cba6238ea1917e135df5926cd024a0" - revision 1 - - bottle do - rebuild 1 - sha256 "5f7a515f0ee41a8c841fb06e4cf1b662d52eaff20145d894ac4cb851cbae1bd3" => :catalina - sha256 "62df1877f13b109a5ab0c775d1419fb687a6c47356333190367ab356165524f3" => :mojave - sha256 "257ab86b68ebb00c5e29ae347cd71f041644a779ab0c1dcf6146509546603a46" => :high_sierra - end - - depends_on "berkeley-db" - depends_on "gmp" - - def install - # both environment variables are needed to be set - # the cobol compiler takes these variables for calling cc during its run - # if the paths to gmp and bdb are not provided, the run of cobc fails - gmp = Formula["gmp"] - bdb = Formula["berkeley-db"] - ENV.append "CPPFLAGS", "-I#{gmp.opt_include} -I#{bdb.opt_include}" - ENV.append "LDFLAGS", "-L#{gmp.opt_lib} -L#{bdb.opt_lib}" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-libiconv-prefix=/usr", - "--with-libintl-prefix=/usr" - system "make", "install" - end - - test do - (testpath/"hello.cob").write <<~EOS - * COBOL must be indented - 000001 IDENTIFICATION DIVISION. - 000002 PROGRAM-ID. hello. - 000003 PROCEDURE DIVISION. - 000004 DISPLAY "Hello World!". - 000005 STOP RUN. - EOS - system "#{bin}/cobc", "-x", "hello.cob" - system "./hello" - end -end diff --git a/Formula/gnu-complexity.rb b/Formula/gnu-complexity.rb deleted file mode 100644 index 7a5cbee468b67..0000000000000 --- a/Formula/gnu-complexity.rb +++ /dev/null @@ -1,51 +0,0 @@ -class GnuComplexity < Formula - desc "Measures complexity of C source" - homepage "https://www.gnu.org/software/complexity" - url "https://ftp.gnu.org/gnu/complexity/complexity-1.10.tar.xz" - mirror "https://ftpmirror.gnu.org/complexity/complexity-1.10.tar.xz" - sha256 "6d378a3ef9d68938ada2610ce32f63292677d3b5c427983e8d72702167a22053" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "8a83c1ada362279b8fbe66addd9fb0d646cb90f8c936959c7923a546f9cd0770" => :catalina - sha256 "25474f8be313534736f5ccbe1c707969606ca3fa7360079df0cc8879cde0fbbb" => :mojave - sha256 "94558c250d55d6d1c83e682d38481b0d75b12850d46e00dacdf81744be288229" => :high_sierra - sha256 "3ea1d968a1eaa2ce6655fa8e33b721af3cd631075f960c6595ca68aecd0972c7" => :sierra - sha256 "89b7043d1f51fc6ff7a1e96f8ed23bbac73bbb7196a04851a2cf29475b0803f7" => :el_capitan - sha256 "35a8ac468a12565af95b82c75d6b45c9c55c27fa769244f0bd87ec69b10742b1" => :yosemite - end - - depends_on "autogen" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - void free_table(uint32_t *page_dir) { - // The last entry of the page directory is reserved. It points to the page - // table itself. - for (size_t i = 0; i < PAGE_TABLE_SIZE-2; ++i) { - uint32_t *page_entry = (uint32_t*)GETADDRESS(page_dir[i]); - for (size_t j = 0; j < PAGE_TABLE_SIZE; ++j) { - uintptr_t addr = (i<<20|j<<12); - if (addr == VIDEO_MEMORY_BEGIN || - (addr >= KERNEL_START && addr < KERNEL_END)) { - continue; - } - if ((page_entry[j] & PAGE_PRESENT) == 1) { - free_frame(page_entry[j]); - } - } - } - free_frame((page_frame_t)page_dir); - } - EOS - system bin/"complexity", "-t", "3", "./test.c" - end -end diff --git a/Formula/gnu-getopt.rb b/Formula/gnu-getopt.rb deleted file mode 100644 index 5109f96283e8d..0000000000000 --- a/Formula/gnu-getopt.rb +++ /dev/null @@ -1,32 +0,0 @@ -class GnuGetopt < Formula - desc "Command-line option parsing utility" - homepage "https://github.com/karelzak/util-linux" - url "https://www.kernel.org/pub/linux/utils/util-linux/v2.35/util-linux-2.35.2.tar.xz" - sha256 "21b7431e82f6bcd9441a01beeec3d57ed33ee948f8a5b41da577073c372eb58a" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "4eda655b18149121dd39d19928b64b63f7310469ad1d64a232996b61afb5016c" => :catalina - sha256 "ff402c05420ff975374689ce0f185c8d9f9578f3e9113e935cf3030f0743c31c" => :mojave - sha256 "a9c00a4e5483a0636b9a8dc6def5cc73c53f7b6ef16a476af5d470d4d6e1e5c4" => :high_sierra - end - - keg_only :provided_by_macos - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - - system "make", "getopt" - - bin.install "getopt" - man1.install "misc-utils/getopt.1" - bash_completion.install "bash-completion/getopt" - end - - test do - system "#{bin}/getopt", "-o", "--test" - end -end diff --git a/Formula/gnu-go.rb b/Formula/gnu-go.rb deleted file mode 100644 index 047f733315a03..0000000000000 --- a/Formula/gnu-go.rb +++ /dev/null @@ -1,30 +0,0 @@ -class GnuGo < Formula - desc "GNU Go" - homepage "https://www.gnu.org/software/gnugo/gnugo.html" - url "https://ftp.gnu.org/gnu/gnugo/gnugo-3.8.tar.gz" - mirror "https://ftpmirror.gnu.org/gnugo/gnugo-3.8.tar.gz" - sha256 "da68d7a65f44dcf6ce6e4e630b6f6dd9897249d34425920bfdd4e07ff1866a72" - revision 1 - head "https://git.savannah.gnu.org/git/gnugo.git" - - bottle do - cellar :any_skip_relocation - sha256 "b756b9307e6ff0a0cb9c05eca13ae12b3a9f6ee44219fa4a899e5301fffa2483" => :catalina - sha256 "75ae8e3e46982c28060396ad4cfaab92c0072f7f8191e21fe9b5b53b157fac06" => :mojave - sha256 "5e6ee72c1ccd877c08591680117bf73d809f6422ea9855596b286970d165c14a" => :high_sierra - sha256 "25fa92bd5c129cb655ec06c441523ada5cbc90a560111c32f5b1246c8f7d124c" => :sierra - sha256 "f845be5a48a89cf0e46322b4d3a64a86b9fd4793f6b98fee0c45de5e8e5eda69" => :el_capitan - sha256 "57731f2cb8dcb2959e85baebdb779989390688a70447b923b9d5c1ce8575da44" => :yosemite - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-readline" - system "make", "install" - end - - test do - assert_match /GNU Go #{version}$/, shell_output("#{bin}/gnugo --version") - end -end diff --git a/Formula/gnu-indent.rb b/Formula/gnu-indent.rb deleted file mode 100644 index 20f38ef97a7ab..0000000000000 --- a/Formula/gnu-indent.rb +++ /dev/null @@ -1,57 +0,0 @@ -class GnuIndent < Formula - desc "C code prettifier" - homepage "https://www.gnu.org/software/indent/" - url "https://ftp.gnu.org/gnu/indent/indent-2.2.12.tar.gz" - mirror "https://ftpmirror.gnu.org/indent/indent-2.2.12.tar.gz" - sha256 "e77d68c0211515459b8812118d606812e300097cfac0b4e9fb3472664263bb8b" - revision 1 - - bottle do - sha256 "82a12279be8834591a2104253ac562978b557c26b262dd8d5bfbf6e7b1103dd1" => :catalina - sha256 "e960e3f35f6a77daef487f54158953522f58a27caf27e39e0c17702754718ee1" => :mojave - sha256 "3280e6e9fc0c5cc895367291fc328dccae5f2e36606dd503b5721d449bc33eb8" => :high_sierra - sha256 "98bcdee2e49d7e165a07ce6468d2c1a3030db7205472d015ba516e43f5a1e0fd" => :sierra - end - - depends_on "gettext" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --mandir=#{man} - --program-prefix=g - ] - - system "./configure", *args - system "make", "install" - - (libexec/"gnubin").install_symlink bin/"gindent" => "indent" - (libexec/"gnuman/man1").install_symlink man1/"gindent.1" => "indent.1" - - libexec.install_symlink "gnuman" => "man" - end - - def caveats - <<~EOS - GNU "indent" has been installed as "gindent". - If you need to use it as "indent", you can add a "gnubin" directory - to your PATH from your bashrc like: - - PATH="#{opt_libexec}/gnubin:$PATH" - EOS - end - - test do - (testpath/"test.c").write("int main(){ return 0; }") - system "#{bin}/gindent", "test.c" - assert_equal File.read("test.c"), <<~EOS - int - main () - { - return 0; - } - EOS - end -end diff --git a/Formula/gnu-prolog.rb b/Formula/gnu-prolog.rb deleted file mode 100644 index 2188c17aac925..0000000000000 --- a/Formula/gnu-prolog.rb +++ /dev/null @@ -1,33 +0,0 @@ -class GnuProlog < Formula - desc "Prolog compiler with constraint solving" - homepage "http://www.gprolog.org/" - url "http://www.gprolog.org/gprolog-1.4.5.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/g/gprolog/gprolog_1.4.5.orig.tar.gz" - sha256 "bfdcf00e051e0628b4f9af9d6638d4fde6ad793401e58a5619d1cc6105618c7c" - - bottle do - cellar :any_skip_relocation - sha256 "30c1693edfb527b5d9a3de534b3f47b0667303d23b451006ce9c3a923a068025" => :mojave - sha256 "21072ba374c5426f89448664738eea6e331c0e9da452ca7945d709901b72eda4" => :high_sierra - sha256 "957d8a1d72f338cb94765a82f88d5154bb0611e938db765de2b8120fc8e8f0db" => :sierra - sha256 "4437bfce43e947a2ae48b50963b9cda18c257b3dbe202f49dde1da8f615d54e2" => :el_capitan - end - - def install - cd "src" do - system "./configure", "--prefix=#{prefix}", "--with-doc-dir=#{doc}" - ENV.deparallelize - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.pl").write <<~EOS - :- initialization(main). - main :- write('Hello World!'), nl, halt. - EOS - system "#{bin}/gplc", "test.pl" - assert_match /Hello World!/, shell_output("./test") - end -end diff --git a/Formula/gnu-sed.rb b/Formula/gnu-sed.rb deleted file mode 100644 index f34cff8382b1a..0000000000000 --- a/Formula/gnu-sed.rb +++ /dev/null @@ -1,55 +0,0 @@ -class GnuSed < Formula - desc "GNU implementation of the famous stream editor" - homepage "https://www.gnu.org/software/sed/" - url "https://ftp.gnu.org/gnu/sed/sed-4.8.tar.xz" - mirror "https://ftpmirror.gnu.org/sed/sed-4.8.tar.xz" - sha256 "f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "726be75d6d7155820b408a10e5c1a5ba1406374a7fc167af62524a4f4bbbc099" => :catalina - sha256 "093f16752e7dfb115c055f20aed090108b94edd47c40f5e50878d961359251b2" => :mojave - sha256 "865abe618c67037a4a419a05e0df2c6814fb3abdd6f631ea546aeba0aaf8eb78" => :high_sierra - end - - conflicts_with "ssed", :because => "both install share/info/sed.info" - - def install - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --program-prefix=g - ] - - # Work around a gnulib issue with macOS Catalina - args << "gl_cv_func_ftello_works=yes" - - system "./configure", *args - system "make", "install" - - (libexec/"gnubin").install_symlink bin/"gsed" =>"sed" - (libexec/"gnuman/man1").install_symlink man1/"gsed.1" => "sed.1" - - libexec.install_symlink "gnuman" => "man" - end - - def caveats - <<~EOS - GNU "sed" has been installed as "gsed". - If you need to use it as "sed", you can add a "gnubin" directory - to your PATH from your bashrc like: - - PATH="#{opt_libexec}/gnubin:$PATH" - EOS - end - - test do - (testpath/"test.txt").write "Hello world!" - system "#{bin}/gsed", "-i", "s/world/World/g", "test.txt" - assert_match /Hello World!/, File.read("test.txt") - - system "#{opt_libexec}/gnubin/sed", "-i", "s/world/World/g", "test.txt" - assert_match /Hello World!/, File.read("test.txt") - end -end diff --git a/Formula/gnu-shogi.rb b/Formula/gnu-shogi.rb deleted file mode 100644 index 34e25c7f82c59..0000000000000 --- a/Formula/gnu-shogi.rb +++ /dev/null @@ -1,31 +0,0 @@ -class GnuShogi < Formula - desc "GNU Shogi (Japanese Chess)" - homepage "https://www.gnu.org/software/gnushogi/" - url "https://ftp.gnu.org/gnu/gnushogi/gnushogi-1.4.2.tar.gz" - mirror "https://ftpmirror.gnu.org/gnushogi/gnushogi-1.4.2.tar.gz" - sha256 "1ecc48a866303c63652552b325d685e7ef5e9893244080291a61d96505d52b29" - license "GPL-3.0" - - bottle do - sha256 "6c559fdfcd24543c1f83f681fe3337048783d17649804b642fb0063dee88d7c8" => :catalina - sha256 "c52d5743a6b9b6aeff9ba4b87104fa7adb58e7752683420e2c038f0216a2447d" => :mojave - sha256 "20895a9d3fe87357df4dad1aaae16fee4d7a0c70e95119756c8ab2928817c161" => :high_sierra - sha256 "677531c9eb7bdd01f22862c24d5ab144f7b78bd672223854fc169d103a9924e2" => :sierra - sha256 "49ff431036e172362b24dc7eca426a638ec2953ea014c67e4cae239e9175bf27" => :el_capitan - sha256 "1fbc9bf567ea4c50c5bb12fda953e18ce8617298d474ed8a56ca2b9dd24b2726" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install", "MANDIR=#{man6}", "INFODIR=#{info}" - end - - test do - (testpath/"test").write <<~EOS - 7g7f - exit - EOS - system "#{bin}/gnushogi < test" - end -end diff --git a/Formula/gnu-smalltalk.rb b/Formula/gnu-smalltalk.rb deleted file mode 100644 index 0d22543dcef1b..0000000000000 --- a/Formula/gnu-smalltalk.rb +++ /dev/null @@ -1,55 +0,0 @@ -class GnuSmalltalk < Formula - desc "GNU Smalltalk interpreter and image" - homepage "https://www.gnu.org/software/smalltalk/" - url "https://ftp.gnu.org/gnu/smalltalk/smalltalk-3.2.5.tar.xz" - mirror "https://ftpmirror.gnu.org/smalltalk/smalltalk-3.2.5.tar.xz" - sha256 "819a15f7ba8a1b55f5f60b9c9a58badd6f6153b3f987b70e7b167e7755d65acc" - revision 9 - head "https://github.com/gnu-smalltalk/smalltalk.git" - - bottle do - sha256 "8a00e81f1a751efeec308de2bbf2e75a1173a636a29c27cec440c121208f0fe6" => :catalina - sha256 "0f569ca28ff2eaa54b36780c278a7170be42ef25e6d305852323952390be7270" => :mojave - sha256 "2f369eed3ac62fbe0c4c257cefa0c9477ce0a806859a18d65ba565fbfdc76786" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gawk" => :build - depends_on "pkg-config" => :build - depends_on "gdbm" - depends_on "gnutls" - depends_on "libffi" - depends_on "libsigsegv" - depends_on "libtool" - depends_on "readline" - - def install - # Fix build failure "Symbol not found: _clock_gettime" - ENV["ac_cv_search_clock_gettime"] = "no" if MacOS.version == "10.11" && MacOS::Xcode.version >= "8.0" - - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --with-lispdir=#{elisp} - --disable-gtk - --with-readline=#{Formula["readline"].opt_lib} - --without-tcl - --without-tk - --without-x - ] - - system "autoreconf", "-ivf" - system "./configure", *args - system "make" - system "make", "install" - end - - test do - path = testpath/"test.gst" - path.write "0 to: 9 do: [ :n | n display ]\n" - - assert_match "0123456789", shell_output("#{bin}/gst #{path}") - end -end diff --git a/Formula/gnu-tar.rb b/Formula/gnu-tar.rb deleted file mode 100644 index 38bd171657705..0000000000000 --- a/Formula/gnu-tar.rb +++ /dev/null @@ -1,71 +0,0 @@ -class GnuTar < Formula - desc "GNU version of the tar archiving utility" - homepage "https://www.gnu.org/software/tar/" - url "https://ftp.gnu.org/gnu/tar/tar-1.32.tar.gz" - mirror "https://ftpmirror.gnu.org/tar/tar-1.32.tar.gz" - sha256 "b59549594d91d84ee00c99cf2541a3330fed3a42c440503326dab767f2fbb96c" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "158cb67ea9e02435d671013b4d0d7369822758d9f7ff400ce2512a03f2f7f4e4" => :catalina - sha256 "1034894e78bb22b0fcf0c8114666d4dc3eb82345a5ca83797ca3bda367d998ac" => :mojave - sha256 "3771cead286229786d9d92a7697bc6e0de576ec9cae1f881017884ceb3e24f17" => :high_sierra - end - - head do - url "https://git.savannah.gnu.org/git/tar.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - end - - def install - # 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" if MacOS.version == :el_capitan - - args = %W[ - --prefix=#{prefix} - --mandir=#{man} - --program-prefix=g - ] - - # Work around a gnulib issue with macOS Catalina - args << "gl_cv_func_ftello_works=yes" - - system "./bootstrap" if build.head? - system "./configure", *args - system "make", "install" - - # Symlink the executable into libexec/gnubin as "tar" - (libexec/"gnubin").install_symlink bin/"gtar" =>"tar" - (libexec/"gnuman/man1").install_symlink man1/"gtar.1" => "tar.1" - - libexec.install_symlink "gnuman" => "man" - end - - def caveats - <<~EOS - GNU "tar" has been installed as "gtar". - If you need to use it as "tar", you can add a "gnubin" directory - to your PATH from your bashrc like: - - PATH="#{opt_libexec}/gnubin:$PATH" - EOS - end - - test do - (testpath/"test").write("test") - system bin/"gtar", "-czvf", "test.tar.gz", "test" - assert_match /test/, shell_output("#{bin}/gtar -xOzf test.tar.gz") - - assert_match /test/, shell_output("#{opt_libexec}/gnubin/tar -xOzf test.tar.gz") - end -end diff --git a/Formula/gnu-time.rb b/Formula/gnu-time.rb deleted file mode 100644 index 1d82400fd95cd..0000000000000 --- a/Formula/gnu-time.rb +++ /dev/null @@ -1,45 +0,0 @@ -class GnuTime < Formula - desc "GNU implementation of time utility" - homepage "https://www.gnu.org/software/time/" - url "https://ftp.gnu.org/gnu/time/time-1.9.tar.gz" - mirror "https://ftpmirror.gnu.org/time/time-1.9.tar.gz" - sha256 "fbacf0c81e62429df3e33bda4cee38756604f18e01d977338e23306a3e3b521e" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "9a1d1160f85f46b3022dc4d978dfafe6b3a02fc97446bc51f8b1ae4580b7c69a" => :catalina - sha256 "dc007b95e2f9fb0df3380da55d3c9337529b1a4a3cd762972eb88512f567ea1c" => :mojave - sha256 "ad5d776c38e43f16fad8976770eeaa18e40562c166fa65fdaa12af61981c7b90" => :high_sierra - sha256 "d51ef948a5a87281175fef771cb28469cbdb3085e3c51ad325d780ff921cc013" => :sierra - end - - def install - args = %W[ - --prefix=#{prefix} - --info=#{info} - --program-prefix=g - ] - - system "./configure", *args - system "make", "install" - - (libexec/"gnubin").install_symlink bin/"gtime" => "time" - end - - def caveats - <<~EOS - GNU "time" has been installed as "gtime". - If you need to use it as "time", you can add a "gnubin" directory - to your PATH from your bashrc like: - - PATH="#{opt_libexec}/gnubin:$PATH" - EOS - end - - test do - system bin/"gtime", "ruby", "--version" - system opt_libexec/"gnubin/time", "ruby", "--version" - end -end diff --git a/Formula/gnu-typist.rb b/Formula/gnu-typist.rb deleted file mode 100644 index f2bd1c02dfc90..0000000000000 --- a/Formula/gnu-typist.rb +++ /dev/null @@ -1,43 +0,0 @@ -class GnuTypist < Formula - desc "GNU typing tutor" - homepage "https://www.gnu.org/software/gtypist/" - url "https://ftp.gnu.org/gnu/gtypist/gtypist-2.9.5.tar.xz" - mirror "https://ftpmirror.gnu.org/gtypist/gtypist-2.9.5.tar.xz" - sha256 "c13af40b12479f8219ffa6c66020618c0ce305ad305590fde02d2c20eb9cf977" - revision 2 - - bottle do - sha256 "2a824f3fad3871cbf43f15009c23563aa03872597f22e823f9e2551d35fe1e26" => :catalina - sha256 "9f0fcdd42b9a041408b132882778db2eb479749a7169b82f2caf1f4fd486b599" => :mojave - sha256 "72503afd4efafe7a8485ea22332819937008263976a6f5f5b42818565d59edbf" => :high_sierra - sha256 "d32708d6e8a640101ac618ceac23be6b9d1a6a4caa127c5fd12a44b4e57c09e9" => :sierra - end - - depends_on "gettext" - - # Use Apple's ncurses instead of ncursesw. - # TODO: use an IFDEF for apple and submit upstream - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/42c4b96/gnu-typist/2.9.5.patch" - sha256 "a408ecb8be3ffdc184fe1fa94c8c2a452f72b181ce9be4f72557c992508474db" - end - - def install - # libiconv is not linked properly without this - ENV.append "LDFLAGS", "-liconv" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-lispdir=#{elisp}" - system "make" - system "make", "install" - end - - test do - session = fork do - exec bin/"gtypist", "-t", "-q", "-l", "DEMO_0", share/"gtypist/demo.typ" - end - sleep 2 - Process.kill("TERM", session) - end -end diff --git a/Formula/gnu-units.rb b/Formula/gnu-units.rb deleted file mode 100644 index 21625c7dcc389..0000000000000 --- a/Formula/gnu-units.rb +++ /dev/null @@ -1,48 +0,0 @@ -class GnuUnits < Formula - desc "GNU unit conversion tool" - homepage "https://www.gnu.org/software/units/" - url "https://ftp.gnu.org/gnu/units/units-2.19.tar.gz" - mirror "https://ftpmirror.gnu.org/units/units-2.19.tar.gz" - sha256 "4262136bdfc152b63ff5a9b93a7d80ce18b5e8bebdcffddc932dda769e306556" - license "GPL-3.0" - - bottle do - sha256 "cb6d07ccc60529a687f7e175c982ae065aa56a580bc13ba5a53949c058c072d7" => :catalina - sha256 "ea90fe5d92832bd8491f3adcb5f01c67cd12eba112485f8e03b252909a019a68" => :mojave - sha256 "43db4b67478cb35f0639fb616f4c4cf04c717a61dafe56c9d36adda921b90da0" => :high_sierra - sha256 "5704a3d37c2790c482bbefc4290f3ffd589ab071e400f2e9610b267ea0f5a3dd" => :sierra - end - - depends_on "readline" - - def install - args = %W[ - --prefix=#{prefix} - --with-installed-readline - --program-prefix=g - ] - - system "./configure", *args - system "make", "install" - - (libexec/"gnubin").install_symlink bin/"gunits" => "units" - (libexec/"gnubin").install_symlink bin/"gunits_cur" => "units_cur" - (libexec/"gnuman/man1").install_symlink man1/"gunits.1" => "units.1" - - libexec.install_symlink "gnuman" => "man" - 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" - EOS - end - - test do - assert_equal "* 18288", shell_output("#{bin}/gunits '600 feet' 'cm' -1").strip - assert_equal "* 18288", shell_output("#{opt_libexec}/gnubin/units '600 feet' 'cm' -1").strip - end -end diff --git a/Formula/gnu-which.rb b/Formula/gnu-which.rb deleted file mode 100644 index 4d2cc9d860566..0000000000000 --- a/Formula/gnu-which.rb +++ /dev/null @@ -1,49 +0,0 @@ -class GnuWhich < Formula - desc "GNU implementation of which utility" - # Previous homepage is dead. Have linked to the GNU Projects page for now. - homepage "https://savannah.gnu.org/projects/which/" - url "https://ftp.gnu.org/gnu/which/which-2.21.tar.gz" - mirror "https://ftpmirror.gnu.org/which/which-2.21.tar.gz" - sha256 "f4a245b94124b377d8b49646bf421f9155d36aa7614b6ebf83705d3ffc76eaad" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 3 - sha256 "f9e6512591096a9f53067ea4a0b5b9f8516515b49fd5bdabfc6e31c1c0c876f2" => :catalina - sha256 "170008e80a4cc5f1e45b3445f9fb6f099d7700aa6dd825602f6d32316c27735b" => :mojave - sha256 "66446416b0dc367076ab38cfc9775d8c201fc571b1a2cd2fc0197daa6b83882a" => :high_sierra - sha256 "68ea3522ec318c9b25d711ce4405b4cd6a41edca20b7df008adc499ab794c4fa" => :sierra - end - - def install - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --program-prefix=g - ] - - system "./configure", *args - system "make", "install" - - (libexec/"gnubin").install_symlink bin/"gwhich" => "which" - (libexec/"gnuman/man1").install_symlink man1/"gwhich.1" => "which.1" - - libexec.install_symlink "gnuman" => "man" - end - - def caveats - <<~EOS - GNU "which" has been installed as "gwhich". - If you need to use it as "which", you can add a "gnubin" directory - to your PATH from your bashrc like: - - PATH="#{opt_libexec}/gnubin:$PATH" - EOS - end - - test do - system "#{bin}/gwhich", "gcc" - system "#{opt_libexec}/gnubin/which", "gcc" - end -end diff --git a/Formula/gnumeric.rb b/Formula/gnumeric.rb deleted file mode 100644 index ac391e878d705..0000000000000 --- a/Formula/gnumeric.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Gnumeric < Formula - desc "GNOME Spreadsheet Application" - homepage "https://projects.gnome.org/gnumeric/" - url "https://download.gnome.org/sources/gnumeric/1.12/gnumeric-1.12.47.tar.xz" - sha256 "40159f34128a13c6102a512c01cdb050a779801072e55b16f2a0e038c57119ce" - revision 1 - - bottle do - sha256 "cd2ea956e97d9a0b4cca6b1fc8438960211c2d4b6330062d38534c6415e7a971" => :catalina - sha256 "c9ab0149387a0624e2cde10decc20a4c0b7910819ea5b5876ae84a741108f58d" => :mojave - sha256 "b96a7352a602b4a3bcc35e4727f87eb620be31e59eaafb8aa9fe63b91f903508" => :high_sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "gettext" - depends_on "goffice" - depends_on "itstool" - depends_on "libxml2" - depends_on "rarian" - - def install - # ensures that the files remain within the keg - inreplace "component/Makefile.in", - "GOFFICE_PLUGINS_DIR = @GOFFICE_PLUGINS_DIR@", - "GOFFICE_PLUGINS_DIR = @libdir@/goffice/@GOFFICE_API_VER@/plugins/gnumeric" - - system "./configure", "--disable-dependency-tracking", - "--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/"gnumeric", "--version" - end -end diff --git a/Formula/gnunet.rb b/Formula/gnunet.rb deleted file mode 100644 index 6046df1b6cd52..0000000000000 --- a/Formula/gnunet.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Gnunet < Formula - desc "Framework for distributed, secure and privacy-preserving applications" - homepage "https://gnunet.org/" - url "https://ftp.gnu.org/gnu/gnunet/gnunet-0.13.0.tar.gz" - mirror "https://ftpmirror.gnu.org/gnunet/gnunet-0.13.0.tar.gz" - sha256 "a3f78af7f85402cccadc21cfdd5febf8d64a5d5b699645644fff7b2233ba5f3c" - license "AGPL-3.0" - - bottle do - cellar :any - sha256 "bcef73933e829bc7fd6a52928f33087dd1261ab879735e58d99801305ef3649f" => :catalina - sha256 "6c0fa2f4d6c274b3273e6c2f8f290d28c0bec457b887041b4d9f1defc3d5abae" => :mojave - sha256 "bb24f051b036b4729d52937c6b31b790ffff064f327a34ccaf563279ec809db9" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gnutls" - depends_on "jansson" - depends_on "libextractor" - depends_on "libgcrypt" - depends_on "libidn2" - depends_on "libmicrohttpd" - depends_on "libmpc" - depends_on "libsodium" - depends_on "libunistring" - depends_on "unbound" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - output = shell_output("#{bin}/gnunet-config -s arm") - assert_match "BINARY = gnunet-service-arm", output - end -end diff --git a/Formula/gnupg-pkcs11-scd.rb b/Formula/gnupg-pkcs11-scd.rb deleted file mode 100644 index 17b4cc6c67b0f..0000000000000 --- a/Formula/gnupg-pkcs11-scd.rb +++ /dev/null @@ -1,40 +0,0 @@ -class GnupgPkcs11Scd < Formula - desc "Enable the use of PKCS#11 tokens with GnuPG" - homepage "https://gnupg-pkcs11.sourceforge.io/" - url "https://github.com/alonbl/gnupg-pkcs11-scd/releases/download/gnupg-pkcs11-scd-0.9.2/gnupg-pkcs11-scd-0.9.2.tar.bz2" - sha256 "fddd798f8b5f9f960d2a7f6961b00ef7b49b00e8bf069c113a4d42b5e44fd0d5" - revision 1 - - bottle do - cellar :any - sha256 "78f09618378fd89be78ff9e10af2e1d33ac5dc06fcca6474994662434b7b3dc1" => :catalina - sha256 "78537d1ee3285a604aae1d683db56da1b9ec76bf71262ff234e758efda63f885" => :mojave - sha256 "1f4264ac76b36c453a3c5a000d1b1269f331e88420efc5591274ccbb8dc8b85c" => :high_sierra - sha256 "83748a14d87233e8a2cf4744d0353c01176536b5cd9e1b317f741f824416453f" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libassuan" - depends_on "libgcrypt" - depends_on "libgpg-error" - depends_on "pkcs11-helper" - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--with-libgpg-error-prefix=#{Formula["libgpg-error"].opt_prefix}", - "--with-libassuan-prefix=#{Formula["libassuan"].opt_prefix}", - "--with-libgcrypt-prefix=#{Formula["libgcrypt"].opt_prefix}", - "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - system "#{bin}/gnupg-pkcs11-scd", "--help" - end -end diff --git a/Formula/gnupg.rb b/Formula/gnupg.rb deleted file mode 100644 index b0ce7bdfc38e8..0000000000000 --- a/Formula/gnupg.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Gnupg < Formula - desc "GNU Pretty Good Privacy (PGP) package" - homepage "https://gnupg.org/" - url "https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.20.tar.bz2" - sha256 "04a7c9d48b74c399168ee8270e548588ddbe52218c337703d7f06373d326ca30" - license "GPL-3.0" - - bottle do - sha256 "527ac31afe998a9931a6648c6fcc7288462ae73d6e6e8b84ecf46561c82d50ec" => :catalina - sha256 "e826cf4b1764da749eba007097be8077f433e52d8f96405044e57a384b114942" => :mojave - sha256 "179b68a29fe9f6731a294a674fbd439623acf22c1997c68b6358808adc83b763" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "adns" - depends_on "gettext" - depends_on "gnutls" - depends_on "libassuan" - depends_on "libgcrypt" - depends_on "libgpg-error" - depends_on "libksba" - depends_on "libusb" - depends_on "npth" - depends_on "pinentry" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sbindir=#{bin}", - "--sysconfdir=#{etc}", - "--enable-all-tests", - "--enable-symcryptrun", - "--with-pinentry-pgm=#{Formula["pinentry"].opt_bin}/pinentry" - system "make" - system "make", "check" - system "make", "install" - end - - def post_install - (var/"run").mkpath - quiet_system "killall", "gpg-agent" - 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 bin/"gpg", "--batch", "--gen-key", "batch.gpg" - (testpath/"test.txt").write "Hello World!" - system bin/"gpg", "--detach-sign", "test.txt" - system bin/"gpg", "--verify", "test.txt.sig" - ensure - system bin/"gpgconf", "--kill", "gpg-agent" - end - end -end diff --git a/Formula/gnupg@1.4.rb b/Formula/gnupg@1.4.rb deleted file mode 100644 index e8ea704f286cc..0000000000000 --- a/Formula/gnupg@1.4.rb +++ /dev/null @@ -1,88 +0,0 @@ -class GnupgAT14 < Formula - desc "GNU Pretty Good Privacy (PGP) package" - homepage "https://www.gnupg.org/" - url "https://gnupg.org/ftp/gcrypt/gnupg/gnupg-1.4.23.tar.bz2" - mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.23.tar.bz2" - sha256 "c9462f17e651b6507848c08c430c791287cd75491f8b5a8b50c6ed46b12678ba" - revision 1 - - bottle do - sha256 "3796803df0956a54dfc5ed26f17a92791622c4ddc6b0dfa6b8fabc0f65afdd0d" => :catalina - sha256 "32f23f8ceec79b8073f8b69a2c7f1278adf9020c00d78d2cd9d07c1e5f3bdb89" => :mojave - sha256 "dbd43b52f11e65c2bb6dadf3adbf8ccf7f740af33b56e4d8c8b037611840f127" => :high_sierra - sha256 "abc1e142397fbe833f2f7c5f71409d925ce690506d77296f7f3d41656a0791f2" => :sierra - sha256 "397c92b88bd189ef61dfb01d5fe2e27e0477a63de64a713ffb883eb799dcbb87" => :el_capitan - end - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --disable-asm - --program-suffix=1 - --with-libusb=no - ] - - system "./configure", *args - system "make" - system "make", "check" - - # we need to create these directories because the install target has the - # dependency order wrong - [bin, libexec/"gnupg"].each(&:mkpath) - system "make", "install" - - # https://lists.gnupg.org/pipermail/gnupg-devel/2016-August/031533.html - inreplace bin/"gpg-zip1", "GPG=gpg", "GPG=gpg1" - - # link to libexec binaries without the "1" suffix - # gpg1 will call them without the suffix when it needs to - %w[curl finger hkp ldap].each do |cmd| - cmd.prepend("gpgkeys_") - (libexec/"gnupg").install_symlink (cmd + "1") => cmd - end - - # Although gpg2 support should be pretty universal these days - # keep vanilla `gpg` executables available, at least for now. - %w[gpg-zip gpg gpgsplit gpgv].each do |cmd| - (libexec/"gpgbin").install_symlink bin/(cmd + "1") => cmd - end - end - - def caveats - <<~EOS - This formula does not install either `gpg` or `gpgv` executables into - the PATH. - - If you simply require `gpg` and `gpgv` executables without explicitly - needing GnuPG 1.x we recommend: - brew install gnupg - - If you really need to use these tools without the "1" suffix you can - add a "gpgbin" directory to your PATH from your #{shell_profile} like: - - PATH="#{opt_libexec}/gpgbin:$PATH" - - Note that doing so may interfere with GPG-using formulae installed via - Homebrew. - EOS - end - - test do - (testpath/"batchgpg").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 - %commit - EOS - system bin/"gpg1", "--batch", "--gen-key", "batchgpg" - (testpath/"test.txt").write "Hello World!" - system bin/"gpg1", "--armor", "--sign", "test.txt" - system bin/"gpg1", "--verify", "test.txt.asc" - end -end diff --git a/Formula/gnuplot.rb b/Formula/gnuplot.rb deleted file mode 100644 index 12d0ee0a79431..0000000000000 --- a/Formula/gnuplot.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Gnuplot < Formula - desc "Command-driven, interactive function plotting" - homepage "http://www.gnuplot.info/" - url "https://downloads.sourceforge.net/project/gnuplot/gnuplot/5.2.8/gnuplot-5.2.8.tar.gz" - sha256 "60a6764ccf404a1668c140f11cc1f699290ab70daa1151bb58fed6139a28ac37" - - bottle do - sha256 "752b5a6f7e93af1e2a23e8ab27c6d19d286f50b054eb0b7accdfa5765c69b3b0" => :catalina - sha256 "645bff55538d6610cf93539dbeec5067a750a6edc0fbbbab6e34710c16db10ef" => :mojave - sha256 "36f2d97fbf5772eef3cd0f1988997848e7367ab7943a2542ea15d93bbfd083ce" => :high_sierra - end - - head do - url "https://git.code.sf.net/p/gnuplot/gnuplot-main.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "gd" - depends_on "libcerf" - depends_on "lua" - depends_on "pango" - depends_on "qt" - depends_on "readline" - - def install - # Qt5 requires c++11 (and the other backends do not care) - ENV.cxx11 - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-readline=#{Formula["readline"].opt_prefix} - --without-tutorial - --disable-wxwidgets - --with-qt - --without-x - ] - - system "./prepare" if build.head? - system "./configure", *args - ENV.deparallelize # or else emacs tries to edit the same file with two threads - system "make" - system "make", "install" - end - - test do - system "#{bin}/gnuplot", "-e", <<~EOS - set terminal dumb; - set output "#{testpath}/graph.txt"; - plot sin(x); - EOS - assert_predicate testpath/"graph.txt", :exist? - end -end diff --git a/Formula/gnuplot@4.rb b/Formula/gnuplot@4.rb deleted file mode 100644 index 4d604eba9f8e1..0000000000000 --- a/Formula/gnuplot@4.rb +++ /dev/null @@ -1,64 +0,0 @@ -class GnuplotAT4 < Formula - desc "Command-driven, interactive function plotting" - homepage "http://www.gnuplot.info/" - url "https://downloads.sourceforge.net/project/gnuplot/gnuplot/4.6.7/gnuplot-4.6.7.tar.gz" - sha256 "26d4d17a00e9dcf77a4e64a28a3b2922645b8bbfe114c0afd2b701ac91235980" - revision 3 - - bottle do - sha256 "aca6da067597cd60e147c1534d0f6cf86f874de847a62888fda313ad66ea5d79" => :catalina - sha256 "e1444a4c413bb9e5d6670c3b8216761f097dd1ba6943f075f3014391184bd2d5" => :mojave - sha256 "63368d69e33d92bd7f36e5ebd4f5245263c656171ff2e9d346183d0e3ea45534" => :high_sierra - sha256 "d6439eb67f9da39adfacfbeef4719efa6a88ebeb6a4f8091b5e1dac267479d3b" => :sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "fontconfig" - depends_on "gd" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "lua@5.1" - depends_on "pdflib-lite" - depends_on "readline" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["lua@5.1"].opt_libexec/"lib/pkgconfig" - - # Do not build with Aquaterm - inreplace "configure", "-laquaterm", "" - - pdflib = Formula["pdflib-lite"].opt_prefix - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --disable-wxwidgets - --with-aquaterm - --with-gd=#{Formula["gd"].opt_prefix} - --with-lispdir=#{elisp} - --with-pdf=#{pdflib} - --with-readline=#{Formula["readline"].opt_prefix} - --without-cairo - --without-latex - --without-tutorial - --without-x - ] - - system "./configure", *args - ENV.deparallelize # or else emacs tries to edit the same file with two threads - system "make" - system "make", "install" - end - - test do - system "#{bin}/gnuplot", "-e", <<~EOS - set terminal png; - set output "#{testpath}/image.png"; - plot sin(x); - EOS - assert_predicate testpath/"image.png", :exist? - end -end diff --git a/Formula/gnuradio.rb b/Formula/gnuradio.rb deleted file mode 100644 index 75ac5f1f72e56..0000000000000 --- a/Formula/gnuradio.rb +++ /dev/null @@ -1,198 +0,0 @@ -class Gnuradio < Formula - desc "SDK providing the signal processing runtime and processing blocks" - homepage "https://gnuradio.org/" - url "https://gnuradio.org/releases/gnuradio/gnuradio-3.7.13.4.tar.gz" - sha256 "c536c268b1e9c24f1206bbc881a5819ac46e662f4e8beaded6f3f441d3502f0d" - license "GPL-3.0" - revision 14 - head "https://github.com/gnuradio/gnuradio.git" - - bottle do - sha256 "74aa8a8d8c32be557ea8a8864cb8617e82a939e667b73e11c45da13d72b52a3a" => :catalina - sha256 "ee2e794d854ab87e00ca35805d4f57232d49e688df5e71a7e9e448883402f540" => :mojave - sha256 "ae53bf0abbdda23f25a45829483a6d1e03f096447289f2df72a6855be7af1619" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - depends_on "swig" => :build - depends_on "boost" - depends_on "fftw" - depends_on "gsl" - depends_on :macos # Due to Python 2 - depends_on "numpy@1.16" - depends_on "portaudio" - depends_on "uhd" - depends_on "zeromq" - - # cheetah starts here - resource "Markdown" do - url "https://files.pythonhosted.org/packages/b3/73/fc5c850f44af5889192dff783b7b0d8f3fe8d30b65c8e3f78f8f0265fecf/Markdown-2.6.11.tar.gz" - sha256 "a856869c7ff079ad84a3e19cd87a64998350c2b94e9e08e44270faef33400f81" - end - - resource "Cheetah" do - url "https://files.pythonhosted.org/packages/cd/b0/c2d700252fc251e91c08639ff41a8a5203b627f4e0a2ae18a6b662ab32ea/Cheetah-2.4.4.tar.gz" - sha256 "be308229f0c1e5e5af4f27d7ee06d90bb19e6af3059794e5fd536a6f29a9b550" - end - # cheetah ends here - - resource "lxml" do - url "https://files.pythonhosted.org/packages/54/a6/43be8cf1cc23e3fa208cab04ba2f9c3b7af0233aab32af6b5089122b44cd/lxml-4.2.3.tar.gz" - sha256 "622f7e40faef13d232fb52003661f2764ce6cdef3edb0a59af7c1559e4cc36d1" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz" - sha256 "a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665" - end - - resource "Mako" do - url "https://files.pythonhosted.org/packages/eb/f3/67579bb486517c0d49547f9697e36582cd19dafb5df9e687ed8e22de57fa/Mako-1.0.7.tar.gz" - sha256 "4e02fde57bd4abb5ec400181e4c314f56ac3e49ba4fb8b0d50bba18cb27d25ae" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "cppzmq" do - url "https://raw.githubusercontent.com/zeromq/cppzmq/46fc0572c5e9f09a32a23d6f22fd79b841f77e00/zmq.hpp" - sha256 "964031c0944f913933f55ad1610938105a6657a69d1ac5a6dd50e16a679104d5" - end - - # patch for boost 1.70.0, remove after next release - patch do - url "https://github.com/gnuradio/gnuradio/commit/6dc8229fd0dda25c054c2194ee2c9b28affe92d8.patch?full_index=1" - sha256 "9836235ea69b3d66b5cd4b2cdc89f80d010797d2bd59dc5c6631a96af921db8c" - end - - def install - ENV.prepend_path "PATH", "/System/Library/Frameworks/Python.framework/Versions/2.7/bin" - - ENV["CHEETAH_INSTALL_WITHOUT_SETUPTOOLS"] = "1" - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" - - %w[Markdown Cheetah MarkupSafe Mako six].each do |r| - resource(r).stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - begin - # Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - resource("lxml").stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - ensure - ENV.delete("SDKROOT") - end - - resource("cppzmq").stage include.to_s - - args = std_cmake_args + %W[ - -DGR_PKG_CONF_DIR=#{etc}/gnuradio/conf.d - -DGR_PREFSDIR=#{etc}/gnuradio/conf.d - -DENABLE_DEFAULT=OFF - ] - - enabled = %w[GR_ANALOG GR_FFT VOLK GR_FILTER GNURADIO_RUNTIME - GR_BLOCKS GR_PAGER GR_NOAA GR_CHANNELS GR_AUDIO - GR_FCD GR_VOCODER GR_FEC GR_DIGITAL GR_DTV GR_ATSC - GR_TRELLIS GR_ZEROMQ GR_WAVELET GR_UHD DOXYGEN SPHINX - PYTHON GR_UTILS] - enabled.each do |c| - args << "-DENABLE_#{c}=ON" - end - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - - rm bin.children.reject(&:executable?) - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - assert_match version.to_s, shell_output("#{bin}/gnuradio-config-info -v") - - (testpath/"test.c++").write <<~EOS - #include - #include - #include - #include - #include - - class top_block : public gr::top_block { - public: - top_block(); - private: - gr::blocks::null_source::sptr null_source; - gr::blocks::null_sink::sptr null_sink; - gr::blocks::head::sptr head; - }; - - top_block::top_block() : gr::top_block("Top block") { - long s = sizeof(gr_complex); - null_source = gr::blocks::null_source::make(s); - null_sink = gr::blocks::null_sink::make(s); - head = gr::blocks::head::make(s, 1024); - connect(null_source, 0, head, 0); - connect(head, 0, null_sink, 0); - } - - int main(int argc, char **argv) { - top_block top; - top.run(); - } - EOS - system ENV.cxx, "-L#{lib}", "-L#{Formula["boost"].opt_lib}", - "-lgnuradio-blocks", "-lgnuradio-runtime", "-lgnuradio-pmt", - "-lboost_system", testpath/"test.c++", "-o", testpath/"test" - system "./test" - - (testpath/"test.py").write <<~EOS - from gnuradio import blocks - from gnuradio import gr - - class top_block(gr.top_block): - def __init__(self): - gr.top_block.__init__(self, "Top Block") - self.samp_rate = 32000 - s = gr.sizeof_gr_complex - self.blocks_null_source_0 = blocks.null_source(s) - self.blocks_null_sink_0 = blocks.null_sink(s) - self.blocks_head_0 = blocks.head(s, 1024) - self.connect((self.blocks_head_0, 0), - (self.blocks_null_sink_0, 0)) - self.connect((self.blocks_null_source_0, 0), - (self.blocks_head_0, 0)) - - def main(top_block_cls=top_block, options=None): - tb = top_block_cls() - tb.start() - tb.wait() - - main() - EOS - system "python", testpath/"test.py" - - cd testpath do - system "#{bin}/gr_modtool", "newmod", "test" - - cd "gr-test" do - system "#{bin}/gr_modtool", "add", "-t", "general", "test_ff", "-l", - "python", "-y", "--argument-list=''", "--add-python-qa", - "--copyright=brew" - end - end - end -end diff --git a/Formula/gnuski.rb b/Formula/gnuski.rb deleted file mode 100644 index 9250e8980cda5..0000000000000 --- a/Formula/gnuski.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Gnuski < Formula - desc "Open source clone of Skifree" - homepage "https://gnuski.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gnuski/gnuski/gnuski-0.3/gnuski-0.3.tar.gz" - sha256 "1b629bd29dd6ad362b56055ccdb4c7ad462ff39d7a0deb915753c2096f5f959d" - - bottle do - cellar :any_skip_relocation - sha256 "7c58085b5ceb98168c728003d484e08410c837bde9b044ed5a5fa6f26796d9ab" => :catalina - sha256 "4fe7b21e4b40ee72c7825c1e0330a958694b98529121385b78b7af9aff229d6d" => :mojave - sha256 "6f15bd497951ea784e84b2ec888be83343ad1ad96eb6bab9ba343bff31246700" => :high_sierra - sha256 "3874907a4ad715492c026d969ec3265dcd5f71424dde07a83aa1c21a1e36fa38" => :sierra - sha256 "ce14d8ee8b8d58c710b93adb2f4cedfb9d78fb64746f38daee4ea38aa977ae43" => :el_capitan - sha256 "3163ed8b9f1487e0f5f5a42006e0edfbfdb3a4dbea9b917c0aa692db282ec13b" => :yosemite - end - - def install - system "make" - bin.install "gnuski" - end -end diff --git a/Formula/gnustep-make.rb b/Formula/gnustep-make.rb deleted file mode 100644 index 22b9f3afe1e84..0000000000000 --- a/Formula/gnustep-make.rb +++ /dev/null @@ -1,25 +0,0 @@ -class GnustepMake < Formula - desc "Basic GNUstep Makefiles" - homepage "http://gnustep.org/" - url "http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-make-2.8.0.tar.gz" - sha256 "9fce2942dd945c103df37d668dd5fff650b23351b25a650428f6f59133f5ca5d" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "0112f9b5cc350a2e8efc7eff2ea1b3e0b13e62877ce02592eac34052b33de00f" => :catalina - sha256 "4025644721c7902db42e5f63a1d8980056b809bdab7237289b92381e82492cca" => :mojave - sha256 "ff2edab383602c3449f074284f992567b0d072a3a442be898be21da0d484d3c3" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}", - "--with-config-file=#{prefix}/etc/GNUstep.conf", - "--enable-native-objc-exceptions" - system "make", "install", "tooldir=#{libexec}" - end - - test do - assert_match shell_output("#{libexec}/gnustep-config --variable=CC").chomp, ENV.cc - end -end diff --git a/Formula/gnutls.rb b/Formula/gnutls.rb deleted file mode 100644 index 7cd32fadf1e0c..0000000000000 --- a/Formula/gnutls.rb +++ /dev/null @@ -1,79 +0,0 @@ -class Gnutls < Formula - desc "GNU Transport Layer Security (TLS) Library" - homepage "https://gnutls.org/" - url "https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.14.tar.xz" - mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnutls/v3.6/gnutls-3.6.14.tar.xz" - sha256 "5630751adec7025b8ef955af4d141d00d252a985769f51b4059e5affa3d39d63" - - bottle do - sha256 "ed76b5d22e195a797c2d01ab2f4a8e769a023b056b17e86f11cb6b9af200babe" => :catalina - sha256 "d57c7537ca0565e8c8fdf13beb4b082548f87a0df2295469596f1cfe3067faae" => :mojave - sha256 "2773c249c2a71f299261889185bda3950ed15150ff09529a71f88c30d68ff26f" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "gmp" - depends_on "libidn2" - depends_on "libtasn1" - depends_on "libunistring" - depends_on "nettle" - depends_on "p11-kit" - depends_on "unbound" - - on_linux do - depends_on "autogen" => :build - end - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --disable-static - --prefix=#{prefix} - --sysconfdir=#{etc} - --with-default-trust-store-file=#{pkgetc}/cert.pem - --disable-guile - --disable-heartbeat-support - --with-p11-kit - ] - - # Work around a gnulib issue with macOS Catalina - args << "gl_cv_func_ftello_works=yes" - - system "./configure", *args - # Adding LDFLAGS= to allow the build on Catalina 10.15.4 - # See https://gitlab.com/gnutls/gnutls/-/issues/966 - system "make", "LDFLAGS=", "install" - - # certtool shadows the macOS certtool utility - mv bin/"certtool", bin/"gnutls-certtool" - mv man1/"certtool.1", man1/"gnutls-certtool.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("openssl x509 -inform pem -checkend 0 -noout", "w") do |openssl_io| - openssl_io.write(cert) - openssl_io.close_write - end - - $CHILD_STATUS.success? - end - - pkgetc.mkpath - (pkgetc/"cert.pem").atomic_write(valid_certs.join("\n")) - end - - test do - system bin/"gnutls-cli", "--version" - end -end diff --git a/Formula/go-bindata.rb b/Formula/go-bindata.rb deleted file mode 100644 index cb2755618cec8..0000000000000 --- a/Formula/go-bindata.rb +++ /dev/null @@ -1,29 +0,0 @@ -class GoBindata < Formula - desc "Small utility that generates Go code from any file" - homepage "https://github.com/kevinburke/go-bindata" - url "https://github.com/kevinburke/go-bindata/archive/v3.21.0.tar.gz" - sha256 "91ba0e1947c2c144d8834823b3ddd5b78b97391f912ae0d7a07b65bd468ac77d" - - bottle do - cellar :any_skip_relocation - sha256 "2b83e2976473f2310d488db6c3b20c27c844ce0eae86d2787fb1f5081da7fc98" => :catalina - sha256 "658b8c27208d0e31241c811ea52fde269354d79804e95db8fc6bf9b9dd5f89c5" => :mojave - sha256 "e2c10e8a03c3393d7500bd085e2a9f36285ccd75cd38a989517c2aaba55f5586" => :high_sierra - end - - depends_on "go" - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/kevinburke").mkpath - ln_s buildpath, buildpath/"src/github.com/kevinburke/go-bindata" - system "go", "build", "-o", bin/"go-bindata", "./go-bindata" - end - - test do - (testpath/"data").write "hello world" - system bin/"go-bindata", "-o", "data.go", "data" - assert_predicate testpath/"data.go", :exist? - assert_match '\xff\xff\x85\x11\x4a', (testpath/"data.go").read - end -end diff --git a/Formula/go-jira.rb b/Formula/go-jira.rb deleted file mode 100644 index b32494a780c71..0000000000000 --- a/Formula/go-jira.rb +++ /dev/null @@ -1,33 +0,0 @@ -class GoJira < Formula - desc "Simple jira command-line client in Go" - homepage "https://github.com/go-jira/jira" - url "https://github.com/go-jira/jira/archive/v1.0.23.tar.gz" - sha256 "01c86d3119d050774caa41b89fb4f038026542eb1e362e89f3f89bf330b68354" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "77a16e13c81b90fb7a7cb90ce607531b1bb932a31e2db1aedfdb6d85d7986f1d" => :catalina - sha256 "f165d25aa98ec17d4da66fa9c3b727c1b99723043ad4b259f01b6aa3e8c80bfd" => :mojave - sha256 "a4d50f8c0376b0bef991ee3d7e9c50621dfae151e9bdb0e5ed143649de49a283" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"jira", "cmd/jira/main.go" - prefix.install_metafiles - end - - test do - system "#{bin}/jira", "export-templates" - template_dir = testpath/".jira.d/templates/" - - files = Dir.entries(template_dir) - # not an exhaustive list, see https://github.com/go-jira/jira/blob/4d74554300fa7e5e660cc935a92e89f8b71012ea/jiracli/templates.go#L239 - expected_templates = %w[comment components create edit issuetypes list view worklog debug] - - assert_equal([], expected_templates - files) - assert_equal("{{ . | toJson}}\n", IO.read("#{template_dir}/debug")) - end -end diff --git a/Formula/go-jsonnet.rb b/Formula/go-jsonnet.rb deleted file mode 100644 index c3916c7079478..0000000000000 --- a/Formula/go-jsonnet.rb +++ /dev/null @@ -1,50 +0,0 @@ -class GoJsonnet < Formula - desc "Go implemention of configuration language for defining JSON data" - homepage "https://jsonnet.org/" - url "https://github.com/google/go-jsonnet/archive/v0.16.0.tar.gz" - sha256 "8ca930c892d34a119c1970431d159000321fe323734f06a1253bd78fc3625b84" - license "Apache-2.0" - head "https://github.com/google/go-jsonnet.git" - - bottle do - cellar :any_skip_relocation - sha256 "5c476a536e168be0cf65a7850c05563c5363356774057bd9cfc8aa11cb0e0df6" => :catalina - sha256 "6dda575e3b152664a76776a23ceec61a471fc0baedbb4062e784d4f917a76b15" => :mojave - sha256 "3f98a99da047fabc9a1fee8b32585c86f2e370a6a278e7d27cef8f7a050006c5" => :high_sierra - end - - depends_on "go" => :build - - conflicts_with "jsonnet", :because => "both install binaries with the same name" - - def install - system "go", "build", "-o", bin/"jsonnet", "./cmd/jsonnet" - system "go", "build", "-o", bin/"jsonnetfmt", "./cmd/jsonnetfmt" - end - - test do - (testpath/"example.jsonnet").write <<~EOS - { - person1: { - name: "Alice", - welcome: "Hello " + self.name + "!", - }, - person2: self.person1 { name: "Bob" }, - } - EOS - - expected_output = { - "person1" => { - "name" => "Alice", - "welcome" => "Hello Alice!", - }, - "person2" => { - "name" => "Bob", - "welcome" => "Hello Bob!", - }, - } - - output = shell_output("#{bin}/jsonnet #{testpath}/example.jsonnet") - assert_equal expected_output, JSON.parse(output) - end -end diff --git a/Formula/go-md2man.rb b/Formula/go-md2man.rb deleted file mode 100644 index 0641a23f9d53c..0000000000000 --- a/Formula/go-md2man.rb +++ /dev/null @@ -1,30 +0,0 @@ -class GoMd2man < Formula - desc "Converts markdown into roff (man pages)" - homepage "https://github.com/cpuguy83/go-md2man" - url "https://github.com/cpuguy83/go-md2man.git", - :tag => "v2.0.0", - :revision => "f79a8a8ca69da163eee19ab442bedad7a35bba5a" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "1ff2123c31e56bc183a1b9b0e270c01ee31e16efc34c060e0d4ecbde87d9e16e" => :catalina - sha256 "1ff2123c31e56bc183a1b9b0e270c01ee31e16efc34c060e0d4ecbde87d9e16e" => :mojave - sha256 "1ff2123c31e56bc183a1b9b0e270c01ee31e16efc34c060e0d4ecbde87d9e16e" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"go-md2man" - system bin/"go-md2man", "-in=go-md2man.1.md", "-out=go-md2man.1" - man1.install "go-md2man.1" - prefix.install_metafiles - end - - test do - assert_includes pipe_output(bin/"go-md2man", "# manpage\nand a half\n"), - ".TH manpage\n.PP\nand a half\n" - end -end diff --git a/Formula/go-statik.rb b/Formula/go-statik.rb deleted file mode 100644 index edf4205b7588b..0000000000000 --- a/Formula/go-statik.rb +++ /dev/null @@ -1,35 +0,0 @@ -class GoStatik < Formula - desc "Embed files into a Go executable" - homepage "https://github.com/rakyll/statik" - url "https://github.com/rakyll/statik/archive/v0.1.7.tar.gz" - sha256 "cd05f409e63674f29cff0e496bd33eee70229985243cce486107085fab747082" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "923729f442bef89c09fc9818c4f2ff1689a099b7519285372d7f5448e5b88fcc" => :catalina - sha256 "3834b8aa037b4e5b84caaa68aa6170f482869e73098af131f0a93b0e4dba3454" => :mojave - sha256 "79b923320dfeb847b229ee880cd8aa1c11a77026d6070bb33ebaee1d76b67198" => :high_sierra - end - - depends_on "go" => :build - - conflicts_with "statik", :because => "both install `statik` binaries" - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - (buildpath/"src/github.com/rakyll/statik").install buildpath.children - - cd "src/github.com/rakyll/statik" do - system "go", "build", "-o", bin/"statik" - prefix.install_metafiles - end - end - - test do - font_name = (MacOS.version >= :catalina) ? "Arial Unicode.ttf" : "Arial.ttf" - system bin/"statik", "-src", "/Library/Fonts/#{font_name}" - assert_predicate testpath/"statik/statik.go", :exist? - refute_predicate (testpath/"statik/statik.go").size, :zero? - end -end diff --git a/Formula/go.rb b/Formula/go.rb deleted file mode 100644 index 08083c4937234..0000000000000 --- a/Formula/go.rb +++ /dev/null @@ -1,98 +0,0 @@ -class Go < Formula - desc "Open source programming language to build simple/reliable/efficient software" - homepage "https://golang.org/" - license "BSD-3-Clause" - - stable do - url "https://dl.google.com/go/go1.14.4.src.tar.gz" - mirror "https://fossies.org/linux/misc/go1.14.4.src.tar.gz" - sha256 "7011af3bbc2ac108d1b82ea8abb87b2e63f78844f0259be20cde4d42c5c40584" - - go_version = version.to_s.split(".")[0..1].join(".") - resource "gotools" do - url "https://go.googlesource.com/tools.git", - :branch => "release-branch.go#{go_version}" - end - end - - bottle do - sha256 "935214ab166d8da148af812614545a25778e4ee11c2ea5cfd332bff72ec4046e" => :catalina - sha256 "f1ef93181b0c4c97617b74d787ced8e18ceca12ee52d9559a8db0f21eb84fa43" => :mojave - sha256 "4b5e79d15f4bb768bc0cefe54a670a525f21257f2532697df76d44c8cc0e8a7a" => :high_sierra - end - - head do - url "https://go.googlesource.com/go.git" - - resource "gotools" do - url "https://go.googlesource.com/tools.git" - end - end - - depends_on :macos => :el_capitan - - # Don't update this unless this version cannot bootstrap the new version. - resource "gobootstrap" do - on_macos do - url "https://storage.googleapis.com/golang/go1.7.darwin-amd64.tar.gz" - sha256 "51d905e0b43b3d0ed41aaf23e19001ab4bc3f96c3ca134b48f7892485fc52961" - end - - on_linux do - url "https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz" - sha256 "702ad90f705365227e902b42d91dd1a40e48ca7f67a2f4b2fd052aaa4295cd95" - end - end - - def install - (buildpath/"gobootstrap").install resource("gobootstrap") - ENV["GOROOT_BOOTSTRAP"] = buildpath/"gobootstrap" - - cd "src" do - ENV["GOROOT_FINAL"] = libexec - ENV["GOOS"] = "darwin" - system "./make.bash", "--no-clean" - end - - (buildpath/"pkg/obj").rmtree - rm_rf "gobootstrap" # Bootstrap not required beyond compile. - libexec.install Dir["*"] - bin.install_symlink Dir[libexec/"bin/go*"] - - system bin/"go", "install", "-race", "std" - - # Build and install godoc - ENV.prepend_path "PATH", bin - ENV["GOPATH"] = buildpath - (buildpath/"src/golang.org/x/tools").install resource("gotools") - cd "src/golang.org/x/tools/cmd/godoc/" do - system "go", "build" - (libexec/"bin").install "godoc" - end - bin.install_symlink libexec/"bin/godoc" - end - - test do - (testpath/"hello.go").write <<~EOS - package main - - import "fmt" - - func main() { - fmt.Println("Hello World") - } - EOS - # Run go fmt check for no errors then run the program. - # This is a a bare minimum of go working as it uses fmt, build, and run. - system bin/"go", "fmt", "hello.go" - assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go") - - # godoc was installed - assert_predicate libexec/"bin/godoc", :exist? - assert_predicate libexec/"bin/godoc", :executable? - - ENV["GOOS"] = "freebsd" - ENV["GOARCH"] = "amd64" - system bin/"go", "build", "hello.go" - end -end diff --git a/Formula/go@1.10.rb b/Formula/go@1.10.rb deleted file mode 100644 index b051cd46e804b..0000000000000 --- a/Formula/go@1.10.rb +++ /dev/null @@ -1,95 +0,0 @@ -class GoAT110 < Formula - desc "Go programming environment (1.10)" - homepage "https://golang.org/" - url "https://dl.google.com/go/go1.10.8.src.tar.gz" - mirror "https://fossies.org/linux/misc/go1.10.8.src.tar.gz" - sha256 "6faf74046b5e24c2c0b46e78571cca4d65e1b89819da1089e53ea57539c63491" - - bottle do - rebuild 2 - sha256 "fa6f1fcd01302191009869886cf56208a42224ad86e201ebd98be6346f72f4a3" => :catalina - sha256 "b00703a47e9352ee299c81d269c66209edca69605d06b2ce031b9754b8da56e6" => :mojave - sha256 "395dcfc97f048bf95efedcf084206d730dba4ba59391075869b6cbae8d4ad0c1" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! :date => "2019-02-25" - - resource "gotools" do - url "https://go.googlesource.com/tools.git", - :branch => "release-branch.go1.10" - end - - # Don't update this unless this version cannot bootstrap the new version. - resource "gobootstrap" do - on_macos do - url "https://storage.googleapis.com/golang/go1.7.darwin-amd64.tar.gz" - sha256 "51d905e0b43b3d0ed41aaf23e19001ab4bc3f96c3ca134b48f7892485fc52961" - end - - on_linux do - url "https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz" - sha256 "702ad90f705365227e902b42d91dd1a40e48ca7f67a2f4b2fd052aaa4295cd95" - end - end - - # Prevents Go from building malformed binaries. Fixed upstream, should - # be in a future release. - # https://github.com/golang/go/issues/32673 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/b8d26872202f4efc9797a51265b868f7ebc0d03a/go%401.10/dwarf_segments.patch" - sha256 "7bdf34196f5e8f7de705670e6199cf7dc22835f9a188af3e319aed60f7398ff6" - end - - def install - (buildpath/"gobootstrap").install resource("gobootstrap") - ENV["GOROOT_BOOTSTRAP"] = buildpath/"gobootstrap" - - cd "go/src" do - ENV["GOROOT_FINAL"] = libexec - ENV["GOOS"] = "darwin" - system "./make.bash", "--no-clean" - end - - (buildpath/"go/pkg/obj").rmtree - rm_rf "gobootstrap" # Bootstrap not required beyond compile. - libexec.install Dir["*"] - bin.install_symlink Dir[libexec/"go/bin/go*"] - - system bin/"go", "install", "-race", "std" - - # Build and install godoc - ENV.prepend_path "PATH", bin - ENV["GOPATH"] = buildpath/"go" - (buildpath/"go/src/golang.org/x/tools").install resource("gotools") - cd "go/src/golang.org/x/tools/cmd/godoc/" do - system "go", "build" - (libexec/"bin").install "godoc" - end - bin.install_symlink libexec/"bin/godoc" - end - - test do - (testpath/"hello.go").write <<~EOS - package main - - import "fmt" - - func main() { - fmt.Println("Hello World") - } - EOS - # Run go fmt check for no errors then run the program. - # This is a a bare minimum of go working as it uses fmt, build, and run. - system bin/"go", "fmt", "hello.go" - assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go") - - # godoc was installed - assert_predicate libexec/"bin/godoc", :exist? - assert_predicate libexec/"bin/godoc", :executable? - - ENV["GOOS"] = "freebsd" - system bin/"go", "build", "hello.go" - end -end diff --git a/Formula/go@1.11.rb b/Formula/go@1.11.rb deleted file mode 100644 index ccd541a78ead8..0000000000000 --- a/Formula/go@1.11.rb +++ /dev/null @@ -1,89 +0,0 @@ -class GoAT111 < Formula - desc "Go programming environment (1.11)" - homepage "https://golang.org/" - url "https://dl.google.com/go/go1.11.13.src.tar.gz" - mirror "https://fossies.org/linux/misc/go1.11.13.src.tar.gz" - sha256 "5032095fd3f641cafcce164f551e5ae873785ce7b07ca7c143aecd18f7ba4076" - license "BSD-3-Clause" - - bottle do - rebuild 1 - sha256 "077ca87532424c95f5072fa0d6cb0aa316fb6c6309ba9ad8d158556ddf264792" => :catalina - sha256 "8f9794052cd1e44eedd34c5a28fd7614cb21e1c67d54a8c4b5733115f04978c8" => :mojave - sha256 "c42368b27f9f70e02a858a3bbf07f73e41295512191d8b7b524a474b8157e91a" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! :date => "2019-09-03" - - resource "gotools" do - url "https://go.googlesource.com/tools.git", - :branch => "release-branch.go1.11" - end - - # Don't update this unless this version cannot bootstrap the new version. - resource "gobootstrap" do - on_macos do - url "https://storage.googleapis.com/golang/go1.7.darwin-amd64.tar.gz" - sha256 "51d905e0b43b3d0ed41aaf23e19001ab4bc3f96c3ca134b48f7892485fc52961" - end - - on_linux do - url "https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz" - sha256 "702ad90f705365227e902b42d91dd1a40e48ca7f67a2f4b2fd052aaa4295cd95" - end - end - - def install - (buildpath/"gobootstrap").install resource("gobootstrap") - ENV["GOROOT_BOOTSTRAP"] = buildpath/"gobootstrap" - - cd "src" do - ENV["GOROOT_FINAL"] = libexec - ENV["GOOS"] = "darwin" - system "./make.bash", "--no-clean" - end - - (buildpath/"pkg/obj").rmtree - rm_rf "gobootstrap" # Bootstrap not required beyond compile. - libexec.install Dir["*"] - bin.install_symlink Dir[libexec/"bin/go*"] - - system bin/"go", "install", "-race", "std" - - # Build and install godoc - ENV.prepend_path "PATH", bin - ENV["GO111MODULE"] = "on" - ENV["GOPATH"] = buildpath - (buildpath/"src/golang.org/x/tools").install resource("gotools") - cd "src/golang.org/x/tools/cmd/godoc/" do - system "go", "build" - (libexec/"bin").install "godoc" - end - bin.install_symlink libexec/"bin/godoc" - end - - test do - (testpath/"hello.go").write <<~EOS - package main - - import "fmt" - - func main() { - fmt.Println("Hello World") - } - EOS - # Run go fmt check for no errors then run the program. - # This is a a bare minimum of go working as it uses fmt, build, and run. - system bin/"go", "fmt", "hello.go" - assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go") - - # godoc was installed - assert_predicate libexec/"bin/godoc", :exist? - assert_predicate libexec/"bin/godoc", :executable? - - ENV["GOOS"] = "freebsd" - system bin/"go", "build", "hello.go" - end -end diff --git a/Formula/go@1.12.rb b/Formula/go@1.12.rb deleted file mode 100644 index 43749b628be0a..0000000000000 --- a/Formula/go@1.12.rb +++ /dev/null @@ -1,89 +0,0 @@ -class GoAT112 < Formula - desc "Go programming environment (1.12)" - homepage "https://golang.org/" - url "https://dl.google.com/go/go1.12.17.src.tar.gz" - mirror "https://fossies.org/linux/misc/go1.12.17.src.tar.gz" - sha256 "de878218c43aa3c3bad54c1c52d95e3b0e5d336e1285c647383e775541a28b25" - license "BSD-3-Clause" - - bottle do - rebuild 1 - sha256 "44d6c83a39c231cae86af05b3689cb2ec03be389562c1cc5e84a9f68ed09af80" => :catalina - sha256 "dc3b90a9ba13c31928c92227957d530656bab53d5ca3a35bfab02038118a964e" => :mojave - sha256 "e42c02a42a4d2df97cba11e80729e8439e7476745548bd7ee23d72858c22a3f1" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! :date => "2020-02-25" - - resource "gotools" do - url "https://go.googlesource.com/tools.git", - :branch => "release-branch.go1.12" - end - - # Don't update this unless this version cannot bootstrap the new version. - resource "gobootstrap" do - on_macos do - url "https://storage.googleapis.com/golang/go1.7.darwin-amd64.tar.gz" - sha256 "51d905e0b43b3d0ed41aaf23e19001ab4bc3f96c3ca134b48f7892485fc52961" - end - - on_linux do - url "https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz" - sha256 "702ad90f705365227e902b42d91dd1a40e48ca7f67a2f4b2fd052aaa4295cd95" - end - end - - def install - (buildpath/"gobootstrap").install resource("gobootstrap") - ENV["GOROOT_BOOTSTRAP"] = buildpath/"gobootstrap" - - cd "src" do - ENV["GOROOT_FINAL"] = libexec - ENV["GOOS"] = "darwin" - system "./make.bash", "--no-clean" - end - - (buildpath/"pkg/obj").rmtree - rm_rf "gobootstrap" # Bootstrap not required beyond compile. - libexec.install Dir["*"] - bin.install_symlink Dir[libexec/"bin/go*"] - - system bin/"go", "install", "-race", "std" - - # Build and install godoc - ENV.prepend_path "PATH", bin - ENV["GO111MODULE"] = "on" - ENV["GOPATH"] = buildpath - (buildpath/"src/golang.org/x/tools").install resource("gotools") - cd "src/golang.org/x/tools/cmd/godoc/" do - system "go", "build" - (libexec/"bin").install "godoc" - end - bin.install_symlink libexec/"bin/godoc" - end - - test do - (testpath/"hello.go").write <<~EOS - package main - - import "fmt" - - func main() { - fmt.Println("Hello World") - } - EOS - # Run go fmt check for no errors then run the program. - # This is a a bare minimum of go working as it uses fmt, build, and run. - system bin/"go", "fmt", "hello.go" - assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go") - - # godoc was installed - assert_predicate libexec/"bin/godoc", :exist? - assert_predicate libexec/"bin/godoc", :executable? - - ENV["GOOS"] = "freebsd" - system bin/"go", "build", "hello.go" - end -end diff --git a/Formula/go@1.13.rb b/Formula/go@1.13.rb deleted file mode 100644 index 3ea7292bea7e3..0000000000000 --- a/Formula/go@1.13.rb +++ /dev/null @@ -1,88 +0,0 @@ -class GoAT113 < Formula - desc "Go programming environment (1.13)" - homepage "https://golang.org/" - url "https://dl.google.com/go/go1.13.12.src.tar.gz" - mirror "https://fossies.org/linux/misc/go1.13.12.src.tar.gz" - sha256 "17ba2c4de4d78793a21cc659d9907f4356cd9c8de8b7d0899cdedcef712eba34" - license "BSD-3-Clause" - - bottle do - sha256 "1e2aff4b727a0dec15ecdc2d97c1aa8e77fff21ad07a800917c80371b3812243" => :catalina - sha256 "41e5aee4bc93775ee229b79330e80bf14d50825f5f48f4cdb0cfe8bcccc5b5f0" => :mojave - sha256 "1f0c88622d5c804013c3e80cdc5fd482f28fcc8df3a7e7f4069d0035e35853c5" => :high_sierra - end - - keg_only :versioned_formula - - depends_on :macos => :el_capitan - - resource "gotools" do - url "https://go.googlesource.com/tools.git", - :branch => "release-branch.go1.13" - end - - # Don't update this unless this version cannot bootstrap the new version. - resource "gobootstrap" do - on_macos do - url "https://storage.googleapis.com/golang/go1.7.darwin-amd64.tar.gz" - sha256 "51d905e0b43b3d0ed41aaf23e19001ab4bc3f96c3ca134b48f7892485fc52961" - end - - on_linux do - url "https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz" - sha256 "702ad90f705365227e902b42d91dd1a40e48ca7f67a2f4b2fd052aaa4295cd95" - end - end - - def install - (buildpath/"gobootstrap").install resource("gobootstrap") - ENV["GOROOT_BOOTSTRAP"] = buildpath/"gobootstrap" - - cd "src" do - ENV["GOROOT_FINAL"] = libexec - ENV["GOOS"] = "darwin" - system "./make.bash", "--no-clean" - end - - (buildpath/"pkg/obj").rmtree - rm_rf "gobootstrap" # Bootstrap not required beyond compile. - libexec.install Dir["*"] - bin.install_symlink Dir[libexec/"bin/go*"] - - system bin/"go", "install", "-race", "std" - - # Build and install godoc - ENV.prepend_path "PATH", bin - ENV["GOPATH"] = buildpath - (buildpath/"src/golang.org/x/tools").install resource("gotools") - cd "src/golang.org/x/tools/cmd/godoc/" do - system "go", "build" - (libexec/"bin").install "godoc" - end - bin.install_symlink libexec/"bin/godoc" - end - - test do - (testpath/"hello.go").write <<~EOS - package main - - import "fmt" - - func main() { - fmt.Println("Hello World") - } - EOS - # Run go fmt check for no errors then run the program. - # This is a a bare minimum of go working as it uses fmt, build, and run. - system bin/"go", "fmt", "hello.go" - assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go") - - # godoc was installed - assert_predicate libexec/"bin/godoc", :exist? - assert_predicate libexec/"bin/godoc", :executable? - - ENV["GOOS"] = "freebsd" - ENV["GOARCH"] = "amd64" - system bin/"go", "build", "hello.go" - end -end diff --git a/Formula/go@1.9.rb b/Formula/go@1.9.rb deleted file mode 100644 index d910fd9e836c3..0000000000000 --- a/Formula/go@1.9.rb +++ /dev/null @@ -1,103 +0,0 @@ -class GoAT19 < Formula - desc "Go programming environment (1.9)" - homepage "https://golang.org/" - url "https://dl.google.com/go/go1.9.7.src.tar.gz" - mirror "https://fossies.org/linux/misc/go1.9.7.src.tar.gz" - sha256 "582814fa45e8ecb0859a208e517b48aa0ad951e3b36c7fff203d834e0ef27722" - license "BSD-3-Clause" - - bottle do - rebuild 2 - sha256 "c34c669ba94287eb0485513ad03416d531f0d4fb58908df4984ed85fd2c41b1e" => :catalina - sha256 "358e06f98931f9f9f2238e59c9ec40a4cc8526e518b8828c8b72543f6d40d9b0" => :mojave - sha256 "be1bd13af09e6bf2ee698f98d80fbd99ac86858337d90fce6e2e86ecfd67b19f" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! :date => "2018-08-04" - - resource "gotools" do - url "https://go.googlesource.com/tools.git", - :branch => "release-branch.go1.9" - end - - # Don't update this unless this version cannot bootstrap the new version. - resource "gobootstrap" do - on_macos do - url "https://storage.googleapis.com/golang/go1.7.darwin-amd64.tar.gz" - sha256 "51d905e0b43b3d0ed41aaf23e19001ab4bc3f96c3ca134b48f7892485fc52961" - end - - on_linux do - url "https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz" - sha256 "702ad90f705365227e902b42d91dd1a40e48ca7f67a2f4b2fd052aaa4295cd95" - end - end - - # Backports the following commit from 1.10/1.11: - # https://github.com/golang/go/commit/1a92cdbfc10e0c66f2e015264a39159c055a5c15 - patch do - url "https://github.com/Homebrew/formula-patches/raw/e089e057dbb8aff7d0dc36a6c1933c29dca9c77e/go%401.9/go_19_load_commands.patch" - sha256 "771b67df44e3d5d5d7c01ea4a0d1693032bc880ea4f16cf82c1bacb42bfd9b10" - end - - # Prevents Go from building malformed binaries. Fixed upstream, should - # be in a future release. - # https://github.com/golang/go/issues/32673 - patch do - url "https://github.com/golang/go/commit/26954bde4443c4bfbfe7608f35584b6b810f3f2c.patch?full_index=1" - sha256 "25a361bd4aa1155be06e2239c1974aa9c59f971210f19e16a3b7b576b9d4f677" - end - - def install - (buildpath/"gobootstrap").install resource("gobootstrap") - ENV["GOROOT_BOOTSTRAP"] = buildpath/"gobootstrap" - - cd "src" do - ENV["GOROOT_FINAL"] = libexec - ENV["GOOS"] = "darwin" - system "./make.bash", "--no-clean" - end - - (buildpath/"pkg/obj").rmtree - rm_rf "gobootstrap" # Bootstrap not required beyond compile. - libexec.install Dir["*"] - bin.install_symlink Dir[libexec/"bin/go*"] - - system bin/"go", "install", "-race", "std" - - # Build and install godoc - ENV.prepend_path "PATH", bin - ENV["GOPATH"] = buildpath - (buildpath/"src/golang.org/x/tools").install resource("gotools") - cd "src/golang.org/x/tools/cmd/godoc/" do - system "go", "build" - (libexec/"bin").install "godoc" - end - bin.install_symlink libexec/"bin/godoc" - end - - test do - (testpath/"hello.go").write <<~EOS - package main - - import "fmt" - - func main() { - fmt.Println("Hello World") - } - EOS - # Run go fmt check for no errors then run the program. - # This is a a bare minimum of go working as it uses fmt, build, and run. - system bin/"go", "fmt", "hello.go" - assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go") - - # godoc was installed - assert_predicate libexec/"bin/godoc", :exist? - assert_predicate libexec/"bin/godoc", :executable? - - ENV["GOOS"] = "freebsd" - system bin/"go", "build", "hello.go" - end -end diff --git a/Formula/goaccess.rb b/Formula/goaccess.rb deleted file mode 100644 index a59d4ef665275..0000000000000 --- a/Formula/goaccess.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Goaccess < Formula - desc "Log analyzer and interactive viewer for the Apache Webserver" - homepage "https://goaccess.io/" - url "https://tar.goaccess.io/goaccess-1.4.tar.gz" - sha256 "e8fbb9ff852556d72dfd9f1d0134ba075ce5b4c41289902a6f4e0d97c69377be" - license "MIT" - head "https://github.com/allinurl/goaccess.git" - - bottle do - sha256 "ca26b40fa6af07692cef8397e8b5cef4a4426f413cea4d08399bf2e075656f70" => :catalina - sha256 "ff8280daf00ff222480c70ab73762a74f1661053f68f318b48c934b91215d80c" => :mojave - sha256 "fb4fd174c742537f1cbf536ca36a5cfd0580ae0576cfe484dc6848daea208953" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" - depends_on "libmaxminddb" - depends_on "tokyo-cabinet" - - def install - ENV.append_path "PATH", Formula["gettext"].bin - system "autoreconf", "-vfi" - - # upstream issue: https://github.com/allinurl/goaccess/issues/1779 - inreplace "src/parser.c", "#include ", "" - - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --enable-utf8 - --enable-tcb=btree - --enable-geoip=mmdb - --with-libintl-prefix=#{Formula["gettext"].opt_prefix} - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"access.log").write \ - '127.0.0.1 - - [04/May/2015:15:48:17 +0200] "GET / HTTP/1.1" 200 612 "-" ' \ - '"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) ' \ - 'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36"' - - output = shell_output \ - "#{bin}/goaccess --time-format=%T --date-format=%d/%b/%Y " \ - "--log-format='%h %^[%d:%t %^] \"%r\" %s %b \"%R\" \"%u\"' " \ - "-f access.log -o json 2>/dev/null" - - assert_equal "Chrome", JSON.parse(output)["browsers"]["data"].first["data"] - end -end diff --git a/Formula/goad.rb b/Formula/goad.rb deleted file mode 100644 index 9c607fcd1920a..0000000000000 --- a/Formula/goad.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Goad < Formula - desc "AWS Lambda powered, highly distributed, load testing tool built in Go" - homepage "https://goad.io/" - url "https://github.com/goadapp/goad.git", - :tag => "2.0.4", - :revision => "e015a55faa940cde2bc7b38af65709d52235eaca" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "57345918587236f5235fcacc3d6d7f64272a5c1def4e64632fee13b960c027b5" => :catalina - sha256 "366aad32eaa55e8561244bc31dc7650d829dd1f588801ad5d986a22cbfc80418" => :mojave - sha256 "3a87755d9b4b48b07a7fecd9be72df574d5866fe39d4dc0c60d6a88da40c5081" => :high_sierra - sha256 "b10fb1177f1f3548b2a497cb56ce9f10620a06175adec6a1d452b0e136981d1e" => :sierra - sha256 "f0c6400909fbe194400717025ad64cba2ccd63b1db9cba5ec7a9195274614b41" => :el_capitan - end - - depends_on "go" => :build - depends_on "go-bindata" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/goadapp/goad" - dir.install buildpath.children - - cd dir do - system "make", "build" - bin.install "build/goad" - prefix.install_metafiles - end - end - - test do - system "#{bin}/goad", "--version" - end -end diff --git a/Formula/gobby.rb b/Formula/gobby.rb deleted file mode 100644 index 6b42fc795e7ab..0000000000000 --- a/Formula/gobby.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Gobby < Formula - desc "Multi-platform collaborative text editor" - homepage "https://gobby.github.io/" - url "http://releases.0x539.de/gobby/gobby-0.5.0.tar.gz" - sha256 "8ceb3598d27cfccdf9c9889b781c4c5c8e1731ca6beb183f5d4555644c06bd98" - license "ISC" - revision 8 - head "https://github.com/gobby/gobby" - - bottle do - sha256 "5e2914adc88813352b11d1db5e69d2aa9b4612b7fb4ae05443a18b9426a0f26d" => :catalina - sha256 "d55e74b24f3d03968afa85eff7473316e8c0816a137d82e26e24e089b42cc3b4" => :mojave - sha256 "76ec450b768f0d27bb032cfb34e337002ee9f45a547a07c01e03b73e03413ad0" => :high_sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gnutls" - depends_on "gsasl" - depends_on "gtkmm3" - depends_on "gtksourceview3" - depends_on "hicolor-icon-theme" - depends_on "libinfinity" - depends_on "libxml++" - - # open issue since 2017-04-23, https://github.com/gobby/gobby/issues/143 - # no active release and maintenance since 2018-08-26 - disable! - - # Necessary to remove mandatory gtk-mac-integration - # it's badly broken as it depends on an ancient version of ige-mac-integration - # since it depends on gtk3, it doesn't even need gtk-mac-integration anymore - # This has already been fixed upstream: gtk2 support has been dropped completely - # and all traces of ige-mac-integration have been removed from the code - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/gobby/0.5.0.patch" - sha256 "d406603caae0a2ed6e01ec682fdd0ba5b3b23c5a731082f93b2500c95ab2f7e6" - end - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--with-gtk3" - system "make", "install" - end - - test do - # executable (GUI) - system bin/"gobby-0.5", "--version" - end -end diff --git a/Formula/gobject-introspection.rb b/Formula/gobject-introspection.rb deleted file mode 100644 index 76766ee1a987e..0000000000000 --- a/Formula/gobject-introspection.rb +++ /dev/null @@ -1,54 +0,0 @@ -class GobjectIntrospection < Formula - include Language::Python::Shebang - - desc "Generate introspection data for GObject libraries" - homepage "https://wiki.gnome.org/Projects/GObjectIntrospection" - url "https://download.gnome.org/sources/gobject-introspection/1.64/gobject-introspection-1.64.1.tar.xz" - sha256 "80beae6728c134521926affff9b2e97125749b38d38744dc901f4010ee3e7fa7" - revision 2 - - bottle do - sha256 "4715d7cb549501fa75101266f6c49fe656666cb071a6e8f111b08cb3b74a2b15" => :catalina - sha256 "e6f0eacacdda25019941d42dd600c478f22de8c57a8975b2e26c4a5cfb8f367c" => :mojave - sha256 "b54f973af9b413e20a7b6485315da882f73e623c61f3573325a434d47e5b011a" => :high_sierra - end - - depends_on "bison" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "cairo" - depends_on "glib" - depends_on "libffi" - depends_on "pkg-config" - depends_on "python@3.8" - - uses_from_macos "flex" - - resource "tutorial" do - url "https://gist.github.com/7a0023656ccfe309337a.git", - :revision => "499ac89f8a9ad17d250e907f74912159ea216416" - end - - def install - ENV["GI_SCANNER_DISABLE_CACHE"] = "true" - inreplace "giscanner/transformer.py", "/usr/share", "#{HOMEBREW_PREFIX}/share" - inreplace "meson.build", - "config.set_quoted('GOBJECT_INTROSPECTION_LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))", - "config.set_quoted('GOBJECT_INTROSPECTION_LIBDIR', '#{HOMEBREW_PREFIX}/lib')" - - mkdir "build" do - system "meson", *std_meson_args, - "-Dpython=#{Formula["python@3.8"].opt_bin}/python3", ".." - system "ninja", "-v" - system "ninja", "install", "-v" - bin.find { |f| rewrite_shebang detected_python_shebang, f } - end - end - - test do - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libffi"].opt_lib/"pkgconfig" - resource("tutorial").stage testpath - system "make" - assert_predicate testpath/"Tut-0.1.typelib", :exist? - end -end diff --git a/Formula/gobo.rb b/Formula/gobo.rb deleted file mode 100644 index adc60d4ed74ba..0000000000000 --- a/Formula/gobo.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Gobo < Formula - desc "Free and portable Eiffel tools and libraries" - homepage "http://www.gobosoft.com/" - url "https://downloads.sourceforge.net/project/gobo-eiffel/gobo-eiffel/20.05/gobo2005-src.tar.gz" - sha256 "047b6710abd94d1c1366316b4411d5cc1a3752bb60155c24e2a6d81494d63e5b" - - bottle do - cellar :any_skip_relocation - sha256 "a7cd43939f9300895b1b9261ae14dfab076c9daca40f553d1b6b7b263e6b5b98" => :catalina - sha256 "a4177e9921a0ccb52b426aea6bd000b3492545f763549fa979d082693041b41c" => :mojave - sha256 "72337bad76bfb21be107f01d587c6f4f968e5f4e1b94343e936e7086e59d6308" => :high_sierra - end - - depends_on "eiffelstudio" => :test - - def install - ENV["GOBO"] = buildpath - ENV.prepend_path "PATH", buildpath/"bin" - system buildpath/"bin/install.sh", "-v", "--threads=#{ENV.make_jobs}", ENV.compiler - (prefix/"gobo").install Dir[buildpath/"*"] - (Pathname.glob prefix/"gobo/bin/ge*").each do |p| - (bin/p.basename).write_env_script p, - "GOBO" => prefix/"gobo", - "PATH" => "#{prefix/"gobo/bin"}:$PATH" - end - end - - test do - (testpath/"build.eant").write <<~EOS - - - - system: "Hello World test program" - - - - - - - - - - - - EOS - (testpath/"system.ecf").write <<~EOS - - - - system: "Hello World test program" - - - - - /EIFGENs$ - - - - - - - - - - - - - - - EOS - mkdir "src" do - (testpath/"hello.e").write <<~EOS - note - description: - "Hello World test program" - class HELLO - inherit - KL_SHARED_STANDARD_FILES - create - execute - feature - execute do - std.output.put_string ("Hello, world!") - end - end - EOS - end - system bin/"geant", "-v", "compile_ge" - assert_equal "Hello, world!", shell_output(testpath/"hello") - system bin/"geant", "-v", "clean" - system bin/"geant", "-v", "compile_ise" - assert_equal "Hello, world!", shell_output(testpath/"hello") - system bin/"geant", "-v", "clean" - end -end diff --git a/Formula/gobuster.rb b/Formula/gobuster.rb deleted file mode 100644 index 7d896e104d626..0000000000000 --- a/Formula/gobuster.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Gobuster < Formula - desc "Directory/file & DNS busting tool written in Go" - homepage "https://github.com/OJ/gobuster" - url "https://github.com/OJ/gobuster.git", - :tag => "v3.0.1", - :revision => "9ef3642d170d71fd79093c0aa0c23b6f2a4c1c64" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d6616ba0e64ee406559414e2c6325f46b0ddc16fc20dde42cad3e3fc7d3df223" => :catalina - sha256 "068251847cb8be7e495f093d86468eec1d6459f9a4daa0ba6b7936b49cc14735" => :mojave - sha256 "98d0266e847077f64dbff9bac8db93e0d3044425efc4992374be23ddb94d7d3d" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"gobuster" - prefix.install_metafiles - end - - test do - (testpath/"words.txt").write <<~EOS - dog - cat - horse - snake - ape - EOS - - output = shell_output("#{bin}/gobuster dir -u https://buffered.io -w words.txt 2>&1") - assert_match "Finished", output - end -end diff --git a/Formula/gocloc.rb b/Formula/gocloc.rb deleted file mode 100644 index fc8697069cbf3..0000000000000 --- a/Formula/gocloc.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Gocloc < Formula - desc "Little fast LoC counter" - homepage "https://github.com/hhatto/gocloc" - url "https://github.com/hhatto/gocloc/archive/v0.3.3.tar.gz" - sha256 "308461beea124991c1558d8278e3a7cc0c8411c5730d444ebbd54187edeb688d" - license "MIT" - head "https://github.com/hhatto/gocloc.git" - - bottle do - cellar :any_skip_relocation - sha256 "a6dc5fa859f29d07e0668c169dfc4d240dbd46a8e79fbc63c31261cdf4f6a79b" => :catalina - sha256 "a6dc5fa859f29d07e0668c169dfc4d240dbd46a8e79fbc63c31261cdf4f6a79b" => :mojave - sha256 "a6dc5fa859f29d07e0668c169dfc4d240dbd46a8e79fbc63c31261cdf4f6a79b" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args, "./cmd/gocloc" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) { - return 0; - } - EOS - - assert_equal "{\"languages\":[{\"name\":\"C\",\"files\":1,\"code\":4,\"comment\":0," \ - "\"blank\":0}],\"total\":{\"files\":1,\"code\":4,\"comment\":0,\"blank\":0}}", - shell_output("#{bin}/gocloc --output-type=json .") - end -end diff --git a/Formula/gocr.rb b/Formula/gocr.rb deleted file mode 100644 index 3cddc852e814e..0000000000000 --- a/Formula/gocr.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Gocr < Formula - desc "Optical Character Recognition (OCR), converts images back to text" - homepage "https://wasd.urz.uni-magdeburg.de/jschulen/ocr/" - url "https://wasd.urz.uni-magdeburg.de/jschulen/ocr/gocr-0.52.tar.gz" - sha256 "df906463105f5f4273becc2404570f187d4ea52bd5769d33a7a8661a747b8686" - revision 1 - - bottle do - cellar :any - sha256 "d0408f223b941c6d81c0edd843ab5916475a4ea4b94892b548da6403e4c3af2a" => :catalina - sha256 "d173d60e8d8f139b4e7e310b84d1bfc56e406eb026c51beba9d4b2facaac3ae1" => :mojave - sha256 "2a5cfa5a815706b2ecb11658ad9132bba21de5304e4541118d8d061a5bb7779a" => :high_sierra - end - - depends_on "jpeg" - depends_on "netpbm" - - # Edit makefile to install libs per developer documentation - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/gocr/0.50.patch" - sha256 "0ed4338c3233a8d1d165f687d6cbe6eee3d393628cdf711a4f8f06b5edc7c4dc" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - - # --mandir doesn't work correctly; fix broken Makefile - inreplace "man/Makefile" do |s| - s.change_make_var! "mandir", "/share/man" - end - - system "make", "libs" - system "make", "install" - end - - test do - system "#{bin}/gocr", "--help" - end -end diff --git a/Formula/gocryptfs.rb b/Formula/gocryptfs.rb deleted file mode 100644 index d81fc6d9512a2..0000000000000 --- a/Formula/gocryptfs.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Gocryptfs < Formula - desc "Encrypted overlay filesystem written in Go" - homepage "https://nuetzlich.net/gocryptfs/" - url "https://github.com/rfjakob/gocryptfs/releases/download/v1.8.0/gocryptfs_v1.8.0_src-deps.tar.gz" - sha256 "c4ca576c2a47f0ed395b96f70fb58fc8f7b4beced8ae67e356eeed6898f8352a" - license "MIT" - - bottle do - cellar :any - sha256 "adf2a34cc99f353992e790c856971e9128d55caf5c51a2ae0a50ff5506e63c1c" => :catalina - sha256 "3e4cd09514efbd074f41f6636f0df0b01708856446c1da1d6cfe766cd8cae121" => :mojave - sha256 "a7e6b3d28c3e3cd78ff4be78adc8d2feeb8061c7459d2c8e6f04e61f0029bb51" => :high_sierra - end - - depends_on "go" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - depends_on :osxfuse - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/rfjakob/gocryptfs").install buildpath.children - cd "src/github.com/rfjakob/gocryptfs" do - system "./build.bash" - bin.install "gocryptfs" - prefix.install_metafiles - end - end - - test do - (testpath/"encdir").mkpath - pipe_output("#{bin}/gocryptfs -init #{testpath}/encdir", "password", 0) - assert_predicate testpath/"encdir/gocryptfs.conf", :exist? - end -end diff --git a/Formula/godep.rb b/Formula/godep.rb deleted file mode 100644 index 2cc87b0d302e2..0000000000000 --- a/Formula/godep.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Godep < Formula - desc "Dependency tool for go" - homepage "https://godoc.org/github.com/tools/godep" - url "https://github.com/tools/godep/archive/v80.tar.gz" - sha256 "029adc1a0ce5c63cd40b56660664e73456648e5c031ba6c214ba1e1e9fc86cf6" - revision 34 - head "https://github.com/tools/godep.git" - - bottle do - cellar :any_skip_relocation - sha256 "b75f52e4b6ff4f29c6ee086b14e973595408edcba02027acf47206a6b1cdf748" => :catalina - sha256 "65fac648f744fe78ac382e7dda5cdc1774be69d83c77a0c07eb34493cef8fe48" => :mojave - sha256 "d8125aec91095023ff641181d442dd10c303b7e0b618c5d1a93c471202ccb087" => :high_sierra - end - - depends_on "go" - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/tools/godep").install buildpath.children - cd "src/github.com/tools/godep" do - system "go", "build", "-o", bin/"godep" - prefix.install_metafiles - end - end - - test do - ENV["GOPATH"] = testpath.realpath - (testpath/"Godeps/Godeps.json").write <<~EOS - { - "ImportPath": "github.com/tools/godep", - "GoVersion": "go1.8", - "Deps": [ - { - "ImportPath": "golang.org/x/tools/cover", - "Rev": "3fe2afc9e626f32e91aff6eddb78b14743446865" - } - ] - } - EOS - system bin/"godep", "restore" - assert_predicate testpath/"src/golang.org/x/tools/README", :exist?, - "Failed to find 'src/golang.org/x/tools/README!' file" - end -end diff --git a/Formula/goenv.rb b/Formula/goenv.rb deleted file mode 100644 index 974a5eab87d72..0000000000000 --- a/Formula/goenv.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Goenv < Formula - desc "Go version management" - homepage "https://github.com/syndbg/goenv" - url "https://github.com/syndbg/goenv/archive/1.23.3.tar.gz" - sha256 "1559f2907ee0339328466fe93f3c9637b7674917db81754412c7f842749e3201" - license "MIT" - version_scheme 1 - head "https://github.com/syndbg/goenv.git" - - bottle :unneeded - - def install - inreplace "libexec/goenv", "/usr/local", HOMEBREW_PREFIX - prefix.install Dir["*"] - %w[goenv-install goenv-uninstall go-build].each do |cmd| - bin.install_symlink "#{prefix}/plugins/go-build/bin/#{cmd}" - end - end - - test do - assert_match "Usage: goenv []", shell_output("#{bin}/goenv help") - end -end diff --git a/Formula/gofabric8.rb b/Formula/gofabric8.rb deleted file mode 100644 index 13ce0fcaa1adc..0000000000000 --- a/Formula/gofabric8.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Gofabric8 < Formula - desc "CLI for fabric8 running on Kubernetes or OpenShift" - homepage "https://github.com/fabric8io/gofabric8/" - url "https://github.com/fabric8io/gofabric8/archive/v0.4.176.tar.gz" - sha256 "78e44fdfd69605f50ab1f5539f2d282ce786b28b88c49d0f9671936c9e37355a" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "d77a93b69fcd7ce3924da680758be10df17d36de20bacc45163af46e7a590613" => :catalina - sha256 "f3e6eb21a7d5e2e83ae1d463fa36a5501d8bc1f72d98d105e700a446003ee336" => :mojave - sha256 "5835f2a6b6dd8e030b75bd7b8d5b28852011c23fb41864d54cb5af8b1a9af8d7" => :high_sierra - sha256 "4e5c9251203ad5c0d80959d881551231159ba4782346c5619fa6a521d3dc86c2" => :sierra - sha256 "b727813219f939d47303e0ed627d778747ba890456d7f571675e6caf79b92ea1" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/fabric8io/gofabric8" - dir.install buildpath.children - - cd dir do - system "make", "install", "REV=homebrew" - prefix.install_metafiles - end - - bin.install "bin/gofabric8" - end - - test do - Open3.popen3("#{bin}/gofabric8", "version") do |stdin, stdout, _| - stdin.puts "N" # Reject any auto-update prompts - stdin.close - assert_match "gofabric8, version #{version} (branch: 'unknown', revision: 'homebrew')", stdout.read - end - end -end diff --git a/Formula/goffice.rb b/Formula/goffice.rb deleted file mode 100644 index 0bfff983963d9..0000000000000 --- a/Formula/goffice.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Goffice < Formula - desc "Gnumeric spreadsheet program" - homepage "https://developer.gnome.org/goffice/" - url "https://download.gnome.org/sources/goffice/0.10/goffice-0.10.47.tar.xz" - sha256 "258895abaee72fb4bd2ed6e7166946ac57c8781faea6c31d5097d6fd9b7bb176" - revision 1 - - bottle do - sha256 "983c0ffa880b04fff6e29283a5d02fa089a08c86f0e203abff977e1dae1d9468" => :catalina - sha256 "c33d7ef544bec3d218f80d43998e6e5b80583699f9f6066b78c39fd21c87b5f6" => :mojave - sha256 "25961ad399e8d8e0bdde62ad3cfbed0ec2926ae39f8eb4facc6f9ad303a1487e" => :high_sierra - end - - head do - url "https://github.com/GNOME/goffice.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gtk-doc" => :build - depends_on "libtool" => :build - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "atk" - depends_on "cairo" - depends_on "gdk-pixbuf" - depends_on "gettext" - depends_on "gtk+3" - depends_on "libgsf" - depends_on "librsvg" - depends_on "pango" - depends_on "pcre" - - uses_from_macos "libxslt" - - def install - args = %W[--disable-dependency-tracking --prefix=#{prefix}] - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() - { - void - libgoffice_init (void); - void - libgoffice_shutdown (void); - return 0; - } - EOS - system ENV.cc, "-I#{include}/libgoffice-0.10", - "-I#{Formula["glib"].opt_include}/glib-2.0", - "-I#{Formula["glib"].opt_lib}/glib-2.0/include", - "-I#{Formula["harfbuzz"].opt_include}/harfbuzz", - "-I#{Formula["libgsf"].opt_include}/libgsf-1", - "-I#{MacOS.sdk_path}/usr/include/libxml2", - "-I#{Formula["gtk+3"].opt_include}/gtk-3.0", - "-I#{Formula["pango"].opt_include}/pango-1.0", - "-I#{Formula["cairo"].opt_include}/cairo", - "-I#{Formula["gdk-pixbuf"].opt_include}/gdk-pixbuf-2.0", - "-I#{Formula["atk"].opt_include}/atk-1.0", - testpath/"test.c", "-o", testpath/"test" - system "./test" - end -end diff --git a/Formula/gofish.rb b/Formula/gofish.rb deleted file mode 100644 index a968074ad1841..0000000000000 --- a/Formula/gofish.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Gofish < Formula - desc "Cross-platform systems package manager" - homepage "https://gofi.sh/" - url "https://github.com/fishworks/gofish.git", - :tag => "v0.12.2", - :revision => "7ffd9b5ecf427284c425eb86830a53e427eda5f9" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "bac35a400b653cf733b089e18eff0b99695c99d08f5dd1a0e199328b360de376" => :catalina - sha256 "8c9b0f7f5ba7d628cb52aa0b1ab01d1712fd206dce43ad5ac91296b8a3c51ca8" => :mojave - sha256 "60a95d0ee72b99643765e8f1f29d4551007d904f644a447df2ee1c8706c1b072" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make" - bin.install "bin/gofish" - end - - def caveats - <<~EOS - To activate gofish, run: - gofish init - EOS - end - - test do - assert_match "v#{version}", shell_output("#{bin}/gofish version") - end -end diff --git a/Formula/golang-migrate.rb b/Formula/golang-migrate.rb deleted file mode 100644 index 9697415edce03..0000000000000 --- a/Formula/golang-migrate.rb +++ /dev/null @@ -1,33 +0,0 @@ -class GolangMigrate < Formula - desc "Database migrations CLI tool" - homepage "https://github.com/golang-migrate/migrate" - url "https://github.com/golang-migrate/migrate/archive/v4.11.0.tar.gz" - sha256 "e9b7a1fc834414584186cebb96ef59439d843d62f3d2c0b0c7aaa6da689d5d86" - - bottle do - cellar :any_skip_relocation - sha256 "53c9f1c0dfdf5dabb05feaed6b379e4d9c57dbbd8ead10392f125edd8b17c72b" => :catalina - sha256 "790bd0091cfd117a99f6e8dd5e9991d74891c1915ac183dccc5a8dd9a4de7896" => :mojave - sha256 "0b86ead888e2b925dc81ebc21ef871fd3bfe038fb2dd3f4f8c34a62d4c2d3d0f" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - (buildpath/"src/github.com/golang-migrate/migrate").install buildpath.children - - # Build and install CLI as "migrate" - cd "src/github.com/golang-migrate/migrate" do - system "make", "build-cli", "VERSION=v#{version}" - bin.install "cli/build/migrate.darwin-amd64" => "migrate" - prefix.install_metafiles - end - end - - test do - touch "0001_migtest.up.sql" - output = shell_output("#{bin}/migrate -database stub: -path . up 2>&1") - assert_match "1/u migtest", output - end -end diff --git a/Formula/gollum.rb b/Formula/gollum.rb deleted file mode 100644 index ed573df083857..0000000000000 --- a/Formula/gollum.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Gollum < Formula - desc "Go n:m message multiplexer" - homepage "https://github.com/trivago/gollum" - url "https://github.com/trivago/gollum/archive/v0.5.4.tar.gz" - sha256 "ba2299c7946385704b7952a77f28e6a7bd243f350e31e7009e21586ec9ca5494" - license "Apache-2.0" - head "https://github.com/trivago/gollum.git" - - bottle do - cellar :any_skip_relocation - sha256 "bf987d3c10c67153ffc11b1926162882d00cdf23261516e614181dafb67eb70c" => :catalina - sha256 "d2d022b779e4290e98d0783232b00c79bf46fc08d9ad3bea0dd352071e2995f3" => :mojave - sha256 "afaf112d706150eeb5f8e5152a7b88ef18fc944fdd01dc8a46357a3c8ce13f8b" => :high_sierra - sha256 "9e82aadccabe2a1224658cc824536e061d617355bb7f7eda5a889e117c3bb472" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/trivago/gollum").install buildpath.children - cd "src/github.com/trivago/gollum" do - system "go", "build", "-o", bin/"gollum" - prefix.install_metafiles - end - end - - test do - (testpath/"test.conf").write <<~EOS - "Profiler": - Type: "consumer.Profiler" - Runs: 100000 - Batches: 100 - Characters: "abcdefghijklmnopqrstuvwxyz .,!;:-_" - Message: "%256s" - Streams: "profile" - KeepRunning: false - ModulatorRoutines: 0 - - "Benchmark": - Type: "producer.Benchmark" - Streams: "profile" - EOS - assert_match "Config OK.", shell_output("#{bin}/gollum -tc #{testpath}/test.conf") - end -end diff --git a/Formula/golo.rb b/Formula/golo.rb deleted file mode 100644 index 2fa6c7141875a..0000000000000 --- a/Formula/golo.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Golo < Formula - desc "Lightweight dynamic language for the JVM" - homepage "https://golo-lang.org/" - url "https://bintray.com/artifact/download/golo-lang/downloads/golo-3.3.0.zip" - sha256 "a9ff036518aee4280102b2d5b79752d8378857fd9714e5b701999a6c93b89316" - revision 2 - head "https://github.com/eclipse/golo-lang.git" - - bottle :unneeded - - depends_on "openjdk@11" - - def install - ENV["JAVA_HOME"] = Formula["openjdk@11"].opt_prefix - if build.head? - system "./gradlew", "installDist" - libexec.install %w[build/install/golo/bin build/install/golo/docs build/install/golo/lib] - else - libexec.install %w[bin docs lib] - end - libexec.install %w[share samples] - - rm_f Dir["#{libexec}/bin/*.bat"] - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files libexec/"bin", :JAVA_HOME => "${JAVA_HOME:-#{ENV["JAVA_HOME"]}}" - bash_completion.install "#{libexec}/share/shell-completion/golo-bash-completion" - zsh_completion.install "#{libexec}/share/shell-completion/golo-zsh-completion" => "_golo" - cp "#{bash_completion}/golo-bash-completion", zsh_completion - end - - def caveats - if ENV["SHELL"].include? "zsh" - <<~EOS - For ZSH users, please add "golo" in yours plugins in ".zshrc" - EOS - end - end - - test do - system "#{bin}/golo", "golo", "--files", "#{libexec}/samples/helloworld.golo" - end -end diff --git a/Formula/gom.rb b/Formula/gom.rb deleted file mode 100644 index 5154464d9be28..0000000000000 --- a/Formula/gom.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Gom < Formula - desc "GObject wrapper around SQLite" - homepage "https://wiki.gnome.org/Projects/Gom" - url "https://download.gnome.org/sources/gom/0.4/gom-0.4.tar.xz" - sha256 "68d08006aaa3b58169ce7cf1839498f45686fba8115f09acecb89d77e1018a9d" - revision 1 - - bottle do - cellar :any - sha256 "2d41e90512e737bfd112ba64278fda9c0dbaf1ab7dbd00732ed6ebb644da31e0" => :catalina - sha256 "619f71c318e02d8c33e4d827aedfaad09d6f349d92408bb9a40097dba99eb65e" => :mojave - sha256 "7566dd0ded406861960ebd556ce0d7f7e6e48eac4e72ab88aa9934d554ad638b" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "gdk-pixbuf" - depends_on "gettext" - depends_on "glib" - - def install - pyver = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - - mkdir "build" do - system "meson", *std_meson_args, "-Dpygobject-override-dir=#{lib}/python#{pyver}/site-packages", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = gom_error_get_type(); - 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}/gom-1.0 - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lglib-2.0 - -lgobject-2.0 - -lgom-1.0 - -lintl - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gomplate.rb b/Formula/gomplate.rb deleted file mode 100644 index bc05dc0b86e5a..0000000000000 --- a/Formula/gomplate.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Gomplate < Formula - desc "Command-line Golang template processor" - homepage "https://gomplate.hairyhenderson.ca/" - url "https://github.com/hairyhenderson/gomplate/archive/v3.7.0.tar.gz" - sha256 "cf4ca68c81894c6aae4a618f31fe8f09cbb86580c58c33729481194f3c4e2aab" - license "MIT" - head "https://github.com/hairyhenderson/gomplate.git" - - bottle do - cellar :any_skip_relocation - sha256 "88cf5acdba5d5558ce1432c00c63969a2832a47459eac91d8854ba6655479892" => :catalina - sha256 "91f6db91eb3d9a33801b48612c4b5b8b3525eb60373081bea7bef213553a807c" => :mojave - sha256 "b1bd2ca2cba7b66040780f5284b280dc5b02f589ef7f238afc1777c9e547a3a2" => :high_sierra - end - - depends_on "go" => :build - depends_on "upx" => :build - - def install - system "make", "compress", "VERSION=#{version}" - bin.install "bin/gomplate-slim" => "gomplate" - prefix.install_metafiles - end - - test do - output = shell_output("#{bin}/gomplate --version") - assert_equal "gomplate version #{version}", output.chomp - - test_template = <<~EOS - {{ range ("foo:bar:baz" | strings.SplitN ":" 2) }}{{.}} - {{end}} - EOS - - expected = <<~EOS - foo - bar:baz - EOS - - assert_match expected, pipe_output("#{bin}/gomplate", test_template, 0) - end -end diff --git a/Formula/goocanvas.rb b/Formula/goocanvas.rb deleted file mode 100644 index 922194f0805e6..0000000000000 --- a/Formula/goocanvas.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Goocanvas < Formula - desc "Canvas widget for GTK+ using the Cairo 2D library for drawing" - homepage "https://wiki.gnome.org/Projects/GooCanvas" - url "https://download.gnome.org/sources/goocanvas/2.0/goocanvas-2.0.4.tar.xz" - sha256 "c728e2b7d4425ae81b54e1e07a3d3c8a4bd6377a63cffa43006045bceaa92e90" - revision 2 - - bottle do - sha256 "ff71ce064b86b1e8973ee5c6aaebdbba6a1159614f5c425d83cc3fb6b00e8b97" => :catalina - sha256 "b9d36364339793b428077bbc7735981f8cd33e681971653806dc574236382778" => :mojave - sha256 "6822fe0a452809ce94bc1fd70fb32b024ad52702a56878db381b7dad2e05aa28" => :high_sierra - sha256 "44b1bd9f058cd4fe112cd1022a0ad2daa93c7f849257ae57bc6d10f9c33e57de" => :sierra - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "glib" - depends_on "gtk+3" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-introspection=yes", - "--disable-gtk-doc-html" - system "make", "install" - end -end diff --git a/Formula/goofys.rb b/Formula/goofys.rb deleted file mode 100644 index 2cba7c0b6c9ab..0000000000000 --- a/Formula/goofys.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Goofys < Formula - desc "Filey-System interface to Amazon S3" - homepage "https://github.com/kahing/goofys" - url "https://github.com/kahing/goofys.git", - :tag => "v0.24.0", - :revision => "45b8d78375af1b24604439d2e60c567654bcdf88" - license "Apache-2.0" - head "https://github.com/kahing/goofys.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "da054592343f7423d91a3abadbe4d601295b1f74b3a404c36fdb4deb94f7019b" => :catalina - sha256 "cee50248f9ac4d33ef8ca585ad94e3c9e6226fc464dfad86de2b7f9497b9f2b7" => :mojave - sha256 "eb0a3cfe49104292c16d76dce71db34000b1a7214f660b3cff3a39e4b3ba7a44" => :high_sierra - end - - depends_on "go" => :build - depends_on :osxfuse - - def install - contents = Dir["*"] - gopath = buildpath/"gopath" - (gopath/"src/github.com/kahing/goofys").install contents - - ENV["GOPATH"] = gopath - - cd gopath/"src/github.com/kahing/goofys" do - commit = Utils.safe_popen_read("git", "rev-parse", "HEAD").chomp - system "go", "build", "-o", "goofys", "-ldflags", - "-X main.Version=#{commit}" - bin.install "goofys" - prefix.install_metafiles - end - end - - test do - system "#{bin}/goofys", "--version" - end -end diff --git a/Formula/google-authenticator-libpam.rb b/Formula/google-authenticator-libpam.rb deleted file mode 100644 index 7bce8c31bd5eb..0000000000000 --- a/Formula/google-authenticator-libpam.rb +++ /dev/null @@ -1,47 +0,0 @@ -class GoogleAuthenticatorLibpam < Formula - desc "PAM module for two-factor authentication" - homepage "https://github.com/google/google-authenticator-libpam" - url "https://github.com/google/google-authenticator-libpam/archive/1.09.tar.gz" - sha256 "ab1d7983413dc2f11de2efa903e5c326af8cb9ea37765dacb39949417f7cd037" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "4ed85644559250923d4b21f5b99643cad08eb8bbb63afc3827d7ac225b4581d7" => :catalina - sha256 "d62c1f21ec88406788b314bd7a06c0e37e7ab9dad4237f6832441f235723d3cb" => :mojave - sha256 "33fa28d290cb0068a67c288d4889967180de64aa895f0ac1a3aedcc38d6a7d7a" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "qrencode" - - def install - system "./bootstrap.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - def caveats - <<~EOS - Add 2-factor authentication for ssh: - echo "auth required #{opt_lib}/security/pam_google_authenticator.so" \\ - | sudo tee -a /etc/pam.d/sshd - - Add 2-factor authentication for ssh allowing users to log in without OTP: - echo "auth required #{opt_lib}/security/pam_google_authenticator.so" \\ - "nullok" | sudo tee -a /etc/pam.d/sshd - - (Or just manually edit /etc/pam.d/sshd) - EOS - end - - test do - system "#{bin}/google-authenticator", "--force", "--time-based", - "--disallow-reuse", "--rate-limit=3", "--rate-time=30", - "--window-size=3", "--no-confirm" - end -end diff --git a/Formula/google-benchmark.rb b/Formula/google-benchmark.rb deleted file mode 100644 index b0010ec4c75fd..0000000000000 --- a/Formula/google-benchmark.rb +++ /dev/null @@ -1,39 +0,0 @@ -class GoogleBenchmark < Formula - desc "C++ microbenchmark support library" - homepage "https://github.com/google/benchmark" - url "https://github.com/google/benchmark/archive/v1.5.1.tar.gz" - sha256 "23082937d1663a53b90cb5b61df4bcc312f6dee7018da78ba00dd6bd669dfef2" - license "Apache-2.0" - head "https://github.com/google/benchmark.git" - - bottle do - cellar :any_skip_relocation - sha256 "d81d77c351b590b574869d88e22203aa3728410bc1d775f10bec672bf947e0af" => :catalina - sha256 "ec80102ba3d26ce496a543a5270b4958c25cac3fc72c23f1daceff49bfafc467" => :mojave - sha256 "407dfc8c6995f34fc9b6fd7da02747d538326462402e744e2318a2db5e3e86ed" => :high_sierra - end - - depends_on "cmake" => :build - - def install - ENV.cxx11 - system "cmake", "-DBENCHMARK_ENABLE_GTEST_TESTS=OFF", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - static void BM_StringCreation(benchmark::State& state) { - while (state.KeepRunning()) - std::string empty_string; - } - BENCHMARK(BM_StringCreation); - BENCHMARK_MAIN(); - EOS - flags = ["-stdlib=libc++", "-I#{include}", "-L#{lib}", "-lbenchmark"] + ENV.cflags.to_s.split - system ENV.cxx, "-o", "test", "test.cpp", *flags - system "./test" - end -end diff --git a/Formula/google-java-format.rb b/Formula/google-java-format.rb deleted file mode 100644 index cb081f5227be6..0000000000000 --- a/Formula/google-java-format.rb +++ /dev/null @@ -1,29 +0,0 @@ -class GoogleJavaFormat < Formula - desc "Reformats Java source code to comply with Google Java Style" - homepage "https://github.com/google/google-java-format" - url "https://github.com/google/google-java-format/archive/google-java-format-1.8.tar.gz" - sha256 "7ae8449441a15fc76e58d0cd69628a5e5135f01a5dea5184738c9b5ba57b525e" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "40458975314ee330d5563f305c08538a3774b3f816d43075e9509fe16dc121a5" => :catalina - sha256 "264c72a1955375d7aecb428be58dd60c1710a1d9ef3ba242bc9a17bd185547c9" => :mojave - sha256 "83fc6d1ca07eb27c3c9124020aa6e366815585c1e6e2d0daf90076a11844e179" => :high_sierra - end - - depends_on "maven" => :build - - def install - system "mvn", "versions:set", "-DnewVersion=#{version}" - system "mvn", "install", "-DskipTests=true", "-Dmaven.javadoc.skip=true", "-B" - libexec.install "core/target/google-java-format-#{version}-all-deps.jar" - - bin.write_jar_script libexec/"google-java-format-#{version}-all-deps.jar", "google-java-format" - end - - test do - (testpath/"foo.java").write "public class Foo{\n}\n" - assert_match "public class Foo {}", shell_output("#{bin}/google-java-format foo.java") - end -end diff --git a/Formula/google-sparsehash.rb b/Formula/google-sparsehash.rb deleted file mode 100644 index 34f29082af171..0000000000000 --- a/Formula/google-sparsehash.rb +++ /dev/null @@ -1,25 +0,0 @@ -class GoogleSparsehash < Formula - desc "Extremely memory-efficient hash_map implementation" - homepage "https://github.com/sparsehash/sparsehash" - url "https://github.com/sparsehash/sparsehash/archive/sparsehash-2.0.3.tar.gz" - sha256 "05e986a5c7327796dad742182b2d10805a8d4f511ad090da0490f146c1ff7a8c" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "baf009352f7372901cb23c3e0db607313809d038d5975fd43195515c448f544c" => :catalina - sha256 "7042ae9f9b7df36cf6ebfe76704997aa21892c5119adb32c56874954953e9a84" => :mojave - sha256 "89dbaeb37bfaa056e8c1fd822e585f9ff04001778f646b1ec3f13c85a2ccaedc" => :high_sierra - sha256 "a0bedeb9128c863130ee3330f65a6c4fe2fb8ca8aeb0aca7abd0ffc2c76691a1" => :sierra - sha256 "8655e0c3b4f4c69e46d8823eef0d8ae2b1397cd2aa01bda3340eb3a84d647b89" => :el_capitan - sha256 "b8e55b96aa3016ed2ab5a8d53a4bb39b44773885355ec75e80c9d9ef57c3e8b1" => :yosemite - sha256 "570c4d250a4fe18d99f11167653a501a1d8a82ff74d2413336a85bc7fa8cbb81" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "check" - system "make", "install" - end -end diff --git a/Formula/google-sql-tool.rb b/Formula/google-sql-tool.rb deleted file mode 100644 index 1f54dfea7a88d..0000000000000 --- a/Formula/google-sql-tool.rb +++ /dev/null @@ -1,23 +0,0 @@ -class GoogleSqlTool < Formula - desc "Command-line tool for executing common SQL statements" - homepage "https://cloud.google.com/sql/docs/mysql-client" - url "https://dl.google.com/cloudsql/tools/google_sql_tool.zip" - version "r10" - sha256 "b7e993edab12da32772bfa90c13999df728f06792757c496140d729d230b03c3" - - bottle :unneeded - - def install - # Patch script to find jar - chmod 0755, "google_sql.sh" - inreplace "google_sql.sh", 'SQL_SH_DIR="$(cd $(dirname $0); pwd)"', - "SQL_SH_DIR=\"#{libexec}\"" - - libexec.install %w[google_sql.sh google_sql.jar] - bin.install_symlink libexec/"google_sql.sh" => "google_sql" - end - - test do - assert_match "Release 10", shell_output("#{bin}/google_sql --version") - end -end diff --git a/Formula/googler.rb b/Formula/googler.rb deleted file mode 100644 index 10188a0b9e0d6..0000000000000 --- a/Formula/googler.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Googler < Formula - include Language::Python::Shebang - - desc "Google Search and News from the command-line" - homepage "https://github.com/jarun/googler" - url "https://github.com/jarun/googler/archive/v4.1.tar.gz" - sha256 "1906be38020a941ee271034df63c589bb0ba6a7449fa1a68d4df2d10922fba07" - license "GPL-3.0" - head "https://github.com/jarun/googler.git" - - bottle do - cellar :any_skip_relocation - sha256 "f61c5b26c1384e2f7a8e41245b2d9e6c0e006c8dc5f507c2153410ee4a72f7a3" => :catalina - sha256 "f61c5b26c1384e2f7a8e41245b2d9e6c0e006c8dc5f507c2153410ee4a72f7a3" => :mojave - sha256 "f61c5b26c1384e2f7a8e41245b2d9e6c0e006c8dc5f507c2153410ee4a72f7a3" => :high_sierra - end - - depends_on "python@3.8" - - def install - rewrite_shebang detected_python_shebang, "googler" - system "make", "disable-self-upgrade" - system "make", "install", "PREFIX=#{prefix}" - bash_completion.install "auto-completion/bash/googler-completion.bash" - fish_completion.install "auto-completion/fish/googler.fish" - zsh_completion.install "auto-completion/zsh/_googler" - end - - test do - ENV["PYTHONIOENCODING"] = "utf-8" - assert_match "Homebrew", shell_output("#{bin}/googler --noprompt Homebrew") - end -end diff --git a/Formula/goolabs.rb b/Formula/goolabs.rb deleted file mode 100644 index 0f9aefbfe2bf2..0000000000000 --- a/Formula/goolabs.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Goolabs < Formula - include Language::Python::Virtualenv - - desc "Command-line tool for morphologically analyzing Japanese language" - homepage "https://pypi.python.org/pypi/goolabs" - url "https://files.pythonhosted.org/packages/ce/86/2d3b5bd85311ee3a7ae7a661b3619095431503cd0cae03048c646b700cad/goolabs-0.4.0.tar.gz" - sha256 "4f768a5b98960c507f5ba4e1ca14d45e3139388669148a2750d415c312281527" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "c784f76b536c01324365eae262d9fb1b6feff9eeb39173f5ea0269eae3b3d73c" => :catalina - sha256 "1b1fe110089fe56dbb9db0d11eb28dbe57629462c8274eb33a2fe7f9198b482d" => :mojave - sha256 "1705b23fe27ee59062383dc353dbf34770d1aef2378a3740e77b02c71724f001" => :high_sierra - end - - depends_on "python@3.8" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match "Usage: goolabs morph", shell_output("#{bin}/goolabs morph test 2>&1", 2) - end -end diff --git a/Formula/goose.rb b/Formula/goose.rb deleted file mode 100644 index 51f8585a071cd..0000000000000 --- a/Formula/goose.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Goose < Formula - desc "Go Language's command-line interface for database migrations" - homepage "https://github.com/pressly/goose" - url "https://github.com/pressly/goose/archive/v2.6.0.tar.gz" - sha256 "389953f40e567fd92090fd29d60e1baec576e6432e689f11ef54e6493502383a" - - bottle do - cellar :any_skip_relocation - sha256 "c61983ec470b8ca810e5f4d084ed1c03518281290e0e0f873efd0a703fdd3657" => :catalina - sha256 "121541b4371c54909eb3d0e3c20c99d60166ce4eab54521e6e8e2a42f0c4e71e" => :mojave - sha256 "0e8c6ed483b244eac2370dad2d7fa59a6a7f1075305577553aac66463c7b0062" => :high_sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/pressly/goose").install buildpath.children - cd "src/github.com/pressly/goose" do - system "dep", "ensure" - system "go", "build", "-o", bin/"goose", ".../cmd/goose" - prefix.install_metafiles - end - end - - test do - output = shell_output("#{bin}/goose sqlite3 foo.db status create 2>&1") - assert_match "Migration", output - assert_predicate testpath/"foo.db", :exist?, "Failed to create foo.db!" - end -end diff --git a/Formula/gopass.rb b/Formula/gopass.rb deleted file mode 100644 index fff38df0ca631..0000000000000 --- a/Formula/gopass.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Gopass < Formula - desc "The slightly more awesome Standard Unix Password Manager for Teams" - homepage "https://github.com/gopasspw/gopass" - url "https://github.com/gopasspw/gopass/releases/download/v1.9.2/gopass-1.9.2.tar.gz" - sha256 "1017264678d3a2cdc862fc81e3829f390facce6c4a334cb314192ff321837bf5" - license "MIT" - revision 1 - head "https://github.com/gopasspw/gopass.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "26710a265c2f2adffdb3f34e8b15873f2bc17ff9fa06406190b40f8368190ff9" => :catalina - sha256 "a3592f946209c38204bad19c033f3b386e2f227c92783f8f399fbe02eb651b3b" => :mojave - sha256 "063a6aebae764af7440c411c527182911ba31b0a688fc413afc684719544df9d" => :high_sierra - end - - depends_on "go" => :build - depends_on "gnupg" - depends_on "terminal-notifier" - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/gopasspw/gopass").install buildpath.children - - cd "src/github.com/gopasspw/gopass" do - prefix.install_metafiles - ENV["PREFIX"] = prefix - system "make", "install" - end - - output = Utils.safe_popen_read("#{bin}/gopass", "completion", "bash") - (bash_completion/"gopass-completion").write output - end - - test do - assert_match version.to_s, shell_output("#{bin}/gopass version") - - (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/"gopass", "init", "--rcs", "noop", "testing@foo.bar" - system bin/"gopass", "generate", "Email/other@foo.bar", "15" - assert_predicate testpath/".password-store/Email/other@foo.bar.gpg", :exist? - 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/gor.rb b/Formula/gor.rb deleted file mode 100644 index 50638e71a6d7d..0000000000000 --- a/Formula/gor.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Gor < Formula - desc "Real-time HTTP traffic replay tool written in Go" - homepage "https://gortool.com/" - url "https://github.com/buger/goreplay.git", - :tag => "v1.1.0", - :revision => "5cbb5ea85fcb33c40b314d8baf84cac65a623098" - head "https://github.com/buger/goreplay.git" - - bottle do - cellar :any_skip_relocation - sha256 "a36b70bcd45188693395cea5faec7fbc59641f2aac7918e16042560064d28ad0" => :catalina - sha256 "ad78a27ea91f8731573e633bcb3490a62fb8d1330292544da37876fb8d8805a5" => :mojave - sha256 "b8c6106bc0ef1b1defc163d9e3e477a8d0462ab65b9b3f409a8a79debf96ba85" => :high_sierra - end - - depends_on "go" => :build - - uses_from_macos "libpcap" - - def install - system "go", "build", "-ldflags", "-X main.VERSION=#{version}", *std_go_args - end - - test do - test_port = free_port - fork do - exec bin/"gor", "file-server", ":#{test_port}" - end - - sleep 2 - system "nc", "-z", "localhost", test_port - end -end diff --git a/Formula/goreleaser.rb b/Formula/goreleaser.rb deleted file mode 100644 index ab79d6efe21d0..0000000000000 --- a/Formula/goreleaser.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Goreleaser < Formula - desc "Deliver Go binaries as fast and easily as possible" - homepage "https://goreleaser.com/" - url "https://github.com/goreleaser/goreleaser.git", - :tag => "v0.139.0", - :revision => "752d4e5435468a9c4b9e911840101d2af2f5acaa" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "6822c33f552ce79bfac47ddbc3cb09aa2e138f142a05891c4a70dcdc5a92c822" => :catalina - sha256 "9f06b02ebe62611581e67bcd75c2ba92f1f2ac647e99d0f94a580f1a49d69436" => :mojave - sha256 "d81d76cda82857154be4fb5aac3a413514f2cb30b0ace921e75dd0107bee036b" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", - "-s -w -X main.version=#{version} -X main.commit=#{stable.specs[:revision]} -X main.builtBy=homebrew", - *std_go_args - end - - test do - assert_match version.to_s, shell_output("#{bin}/goreleaser -v 2>&1") - assert_match "config created", shell_output("#{bin}/goreleaser init --config=.goreleaser.yml 2>&1") - assert_predicate testpath/".goreleaser.yml", :exist? - end -end diff --git a/Formula/goreman.rb b/Formula/goreman.rb deleted file mode 100644 index a310342940250..0000000000000 --- a/Formula/goreman.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Goreman < Formula - desc "Foreman clone written in Go" - homepage "https://github.com/mattn/goreman" - url "https://github.com/mattn/goreman/archive/v0.3.5.tar.gz" - sha256 "ceae7f2b71098799982928f35174df91e301fd5792af12b97a9ece943d260b9e" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "8a7091a9c750d499f4b7857d606f3ce762bd4901b715ce1e4c0a45196487615f" => :catalina - sha256 "1d38d14fa4f2a7e7f77f7d2609bf1b289fcea8622f23829f4e35da2a499a3d35" => :mojave - sha256 "44a066817f8aedad724ff2e2bdf9be53fbacaf1f8939462d6e5dc89bd7f3fab0" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"goreman" - prefix.install_metafiles - end - - test do - (testpath/"Procfile").write "web: echo 'hello' > goreman-homebrew-test.out" - system bin/"goreman", "start" - assert_predicate testpath/"goreman-homebrew-test.out", :exist? - assert_match "hello", (testpath/"goreman-homebrew-test.out").read - end -end diff --git a/Formula/gosu.rb b/Formula/gosu.rb deleted file mode 100644 index a034f1f524e3c..0000000000000 --- a/Formula/gosu.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Gosu < Formula - desc "Pragmatic language for the JVM" - homepage "https://gosu-lang.github.io/" - url "https://github.com/gosu-lang/gosu-lang/archive/v1.14.18.tar.gz" - sha256 "b6bf6967ee127b727b4be56aaa02bc807340d4663e00dafd9fd8a6c1a5cd6958" - license "Apache-2.0" - head "https://github.com/gosu-lang/gosu-lang.git" - - bottle do - cellar :any_skip_relocation - sha256 "f727564002df8588a711228ee9da4ff92636f32cbaac3f851d4840e9c6330649" => :catalina - sha256 "ecd68c00bfcd4384bfb10d8ef05edb7e63b3835405514233dff3899766db4dff" => :mojave - sha256 "45f6fc1936fc923213326882d70aaec798e0c1cffb7b33d05f9d6f1cc0e75b6c" => :high_sierra - end - - depends_on "maven" => :build - depends_on :java => "1.8" - - skip_clean "libexec/ext" - - def install - cmd = Language::Java.java_home_cmd("1.8") - ENV["JAVA_HOME"] = Utils.safe_popen_read(cmd).chomp - - system "mvn", "package" - libexec.install Dir["gosu/target/gosu-#{version}-full/gosu-#{version}/*"] - (libexec/"ext").mkpath - (bin/"gosu").write_env_script libexec/"bin/gosu", Language::Java.java_home_env("1.8") - end - - test do - (testpath/"test.gsp").write 'print ("burp")' - assert_equal "burp", shell_output("#{bin}/gosu test.gsp").chomp - end -end diff --git a/Formula/gotags.rb b/Formula/gotags.rb deleted file mode 100644 index 96384e85c2704..0000000000000 --- a/Formula/gotags.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Gotags < Formula - desc "Tag generator for Go, compatible with ctags" - homepage "https://github.com/jstemmer/gotags" - url "https://github.com/jstemmer/gotags/archive/v1.4.1.tar.gz" - sha256 "2df379527eaa7af568734bc4174febe7752eb5af1b6194da84cd098b7c873343" - license "MIT" - head "https://github.com/jstemmer/gotags.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "c1b5430e2c3544fc021bc9bbc35c33a1f2c4482a30dbbc8d4977c1f0ee5638a1" => :catalina - sha256 "4413278c3b7f4d8783b9009a986dc91a2a5d3749430105a4297f2cec960a5344" => :mojave - sha256 "095f81ef736207a6806af1613a7ab5a0ba3837b4f94f85260aa1bceba3535fea" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"gotags" - prefix.install_metafiles - end - - test do - (testpath/"test.go").write <<~EOS - package main - - type Foo struct { - Bar int - } - EOS - - assert_match /^Bar.*test.go.*$/, shell_output("#{bin}/gotags #{testpath}/test.go") - end -end diff --git a/Formula/goto.rb b/Formula/goto.rb deleted file mode 100644 index 8574162861a86..0000000000000 --- a/Formula/goto.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Goto < Formula - desc "Bash tool for navigation to aliased directories with auto-completion" - homepage "https://github.com/iridakos/goto" - url "https://github.com/iridakos/goto/archive/v2.0.0.tar.gz" - sha256 "460fe3994455501b50b2f771f999ace77ade295122e90e959084047dbfb1f0dc" - license "MIT" - - bottle :unneeded - - def install - bash_completion.install "goto.sh" - end - - test do - output = shell_output("source #{bash_completion}/goto.sh && complete -p goto") - assert_match "-F _complete_goto_bash", output - end -end diff --git a/Formula/gotop.rb b/Formula/gotop.rb deleted file mode 100644 index ad155f64a601d..0000000000000 --- a/Formula/gotop.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Gotop < Formula - desc "Terminal based graphical activity monitor inspired by gtop and vtop" - homepage "https://github.com/xxxserxxx/gotop" - url "https://github.com/xxxserxxx/gotop/archive/v4.0.1.tar.gz" - sha256 "38a34543ed828ed8cedd93049d9634c2e578390543d4068c19f0d0c20aaf7ba0" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "5a61acb05457b28a32d342fc75376785873ec8f9fd73209f079550051851ea54" => :catalina - sha256 "c758b1001a0de9af2572871c05cd3ec78341e31e2e870a9a147cea493f85baa6" => :mojave - sha256 "194a6ee2f9ab9922b23a91d8868ac7802f611f238d56d10c79da4c9263a9afa4" => :high_sierra - end - - depends_on "go" => :build - - def install - time = `date +%Y%m%dT%H%M%S`.chomp - system "go", "build", *std_go_args, "-ldflags", - "-X main.Version=#{version} -X main.BuildDate=#{time}", "./cmd/gotop" - end - - test do - assert_match version.to_s, shell_output("#{bin}/gotop --version").chomp - - system bin/"gotop", "--write-config" - assert_predicate testpath/"Library/Application Support/gotop/gotop.conf", :exist? - end -end diff --git a/Formula/gource.rb b/Formula/gource.rb deleted file mode 100644 index f56db6595abb1..0000000000000 --- a/Formula/gource.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Gource < Formula - desc "Version Control Visualization Tool" - homepage "https://github.com/acaudwell/Gource" - url "https://github.com/acaudwell/Gource/releases/download/gource-0.51/gource-0.51.tar.gz" - sha256 "19a3f888b1825aa7ed46f52cebce5012e3c62439e3d281102f21814c7a58e79a" - license "GPL-3.0" - - bottle do - sha256 "6db0866cca37c5701a5deb79e4867ec0cf1134c76839a40b6fd49968a5564cb0" => :catalina - sha256 "18204f0fb8b737d0e903718a645a08d63338c93c7ca8052db569445d19a18800" => :mojave - sha256 "1dc9d1e848779e59367a2c7714bc6f2c97f2becc3d4ccef8c3576ad38af4053e" => :high_sierra - end - - head do - url "https://github.com/acaudwell/Gource.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "glm" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "freetype" - depends_on "glew" - depends_on "libpng" - depends_on "pcre" - depends_on "sdl2" - depends_on "sdl2_image" - - def install - # clang on Mt. Lion will try to build against libstdc++, - # despite -std=gnu++0x - ENV.libcxx - - system "autoreconf", "-f", "-i" if build.head? - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-boost=#{Formula["boost"].opt_prefix}", - "--without-x" - system "make", "install" - end - - test do - system "#{bin}/gource", "--help" - end -end diff --git a/Formula/govc.rb b/Formula/govc.rb deleted file mode 100644 index b6591322d88c8..0000000000000 --- a/Formula/govc.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Govc < Formula - desc "Command-line tool for VMware vSphere" - homepage "https://github.com/vmware/govmomi/tree/master/govc" - url "https://github.com/vmware/govmomi/archive/v0.23.1.tar.gz" - sha256 "792f295975f86e86ebe43c5de520267295a8a4346440d89fc36624370d4264af" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "f87e7522bf5a4d2dfadd33586f362c362373de714f46e08f3417ea228fbbf8ec" => :catalina - sha256 "9381ff648dcb11aa393221f3051685a32fec1e08e1e820dac5f6b4c9add33015" => :mojave - sha256 "b1004db501274c309e2c1b61c692f38e438ca1742bb59397ce332059259ce813" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", "#{bin}/#{name}", "./#{name}" - end - - test do - assert_match "GOVC_URL=foo", shell_output("#{bin}/#{name} env -u=foo") - end -end diff --git a/Formula/govendor.rb b/Formula/govendor.rb deleted file mode 100644 index 809dac66c66b7..0000000000000 --- a/Formula/govendor.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Govendor < Formula - desc "Go vendor tool that works with the standard vendor file" - homepage "https://github.com/kardianos/govendor" - url "https://github.com/kardianos/govendor/archive/v1.0.9.tar.gz" - sha256 "d303abf194838792234a1451c3a1e87885d1b2cd21774867b592c1f7db00551e" - license "BSD-3-Clause" - head "https://github.com/kardianos/govendor.git" - - bottle do - cellar :any_skip_relocation - sha256 "5b69e8fa939454a773bf64f82998bc95523bf7fda3f037baabe25cd4cbb6132d" => :catalina - sha256 "b5bcf9c902173a5ea922be49153fb3a5f59d44534a7f4dbbb5b9f536c0607fa6" => :mojave - sha256 "38df7324a3a5292636a57c8c17cbdda94a0d529fa42f2e446f372a49b5697f26" => :high_sierra - sha256 "5708cee7e053271235d433cc1f7450f10540129810016095db622652621dc528" => :sierra - sha256 "52e2dd5debbd16a4da952ce16dd37d2697e16ba8509ff1e9a9551e7303ec6949" => :el_capitan - end - - depends_on "go" - - def install - ENV["GOPATH"] = buildpath - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = "amd64" - - (buildpath/"src/github.com/kardianos/").mkpath - ln_sf buildpath, buildpath/"src/github.com/kardianos/govendor" - system "go", "build", "-o", bin/"govendor" - end - - test do - # Default HOMEBREW_TEMP is /tmp, which is actually a symlink to /private/tmp. - # `govendor` bails without `.realpath` as it expects $GOPATH to be "real" path. - ENV["GOPATH"] = testpath.realpath - commit = "89d9e62992539701a49a19c52ebb33e84cbbe80f" - (testpath/"src/github.com/project/testing").mkpath - - cd "src/github.com/project/testing" do - system bin/"govendor", "init" - assert_predicate Pathname.pwd/"vendor", :exist?, "Failed to init!" - system bin/"govendor", "fetch", "-tree", "golang.org/x/crypto@#{commit}" - assert_match commit, File.read("vendor/vendor.json") - assert_match "golang.org/x/crypto/blowfish", shell_output("#{bin}/govendor list") - end - end -end diff --git a/Formula/gowsdl.rb b/Formula/gowsdl.rb deleted file mode 100644 index 0db270eef1816..0000000000000 --- a/Formula/gowsdl.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Gowsdl < Formula - desc "WSDL2Go code generation as well as its SOAP proxy" - homepage "https://github.com/hooklift/gowsdl" - url "https://github.com/hooklift/gowsdl.git", - :tag => "v0.4.0", - :revision => "7a3e6bce010b32c1672884a6d478a16fee8f2d05" - license "MPL-2.0" - head "https://github.com/hooklift/gowsdl.git" - - bottle do - cellar :any_skip_relocation - sha256 "ac79869fae62091277dad289c73f337cee0c9d92a42b38af5dc4d59b53f59885" => :catalina - sha256 "650f3a704f6918e069c60d64807ddffe3fd327b6ef2e5688768d08f646ccfa59" => :mojave - sha256 "64d483de68fc8f23043ee9652addf1a918e79a3c68c70324652ab5d0ac4b1c64" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "build" - bin.install "build/gowsdl" - end - - test do - system "#{bin}/gowsdl" - end -end diff --git a/Formula/gox.rb b/Formula/gox.rb deleted file mode 100644 index 193c0f23ec192..0000000000000 --- a/Formula/gox.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Gox < Formula - desc "Go cross compile tool" - homepage "https://github.com/mitchellh/gox" - url "https://github.com/mitchellh/gox/archive/v1.0.1.tar.gz" - sha256 "25aab55a4ba75653931be2a2b95e29216b54bd8fecc7931bd416efe49a388229" - license "MPL-2.0" - head "https://github.com/mitchellh/gox.git" - - bottle do - cellar :any_skip_relocation - sha256 "6693416aef377d44385c25eb786d25f963258c0895491beedbf6039d7c84c06d" => :catalina - sha256 "008ec56acef96c3ad3117bcde87f1998fcf4ef9c93f82ae363ed6ac39914a95d" => :mojave - sha256 "c2d77e6fadb6c7585a5df89eb91aaf1f41f6b88829e1a647efb4ebbc70277b3b" => :high_sierra - sha256 "1d48879bdbbd84d2406aeaf5f052c51ed2f0b8f9484508ad6085bf537be6f5f6" => :sierra - end - - depends_on "go" - - resource "iochan" do - url "https://github.com/mitchellh/iochan.git", - :revision => "87b45ffd0e9581375c491fef3d32130bb15c5bd7" - end - - # This resource is for the test so doesn't really need to be updated. - resource "pup" do - url "https://github.com/ericchiang/pup/archive/v0.4.0.tar.gz" - sha256 "0d546ab78588e07e1601007772d83795495aa329b19bd1c3cde589ddb1c538b0" - end - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/mitchellh/gox").install buildpath.children - (buildpath/"src/github.com/mitchellh/iochan").install resource("iochan") - cd "src/github.com/mitchellh/gox" do - system "go", "build", "-o", bin/"gox" - prefix.install_metafiles - end - end - - test do - ENV["GOPATH"] = testpath - (testpath/"src/github.com/ericchiang/pup").install resource("pup") - cd "src/github.com/ericchiang/pup" do - output = shell_output("#{bin}/gox -arch amd64 -os darwin -os freebsd") - assert_match "parallel", output - assert_predicate Pathname.pwd/"pup_darwin_amd64", :executable? - assert_predicate Pathname.pwd/"pup_freebsd_amd64", :executable? - refute_predicate Pathname.pwd/"pup_linux_amd64", :exist? - end - end -end diff --git a/Formula/gpa.rb b/Formula/gpa.rb deleted file mode 100644 index db4722760de44..0000000000000 --- a/Formula/gpa.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Gpa < Formula - desc "Graphical user interface for the GnuPG" - homepage "https://www.gnupg.org/related_software/gpa/" - url "https://gnupg.org/ftp/gcrypt/gpa/gpa-0.10.0.tar.bz2" - mirror "https://deb.debian.org/debian/pool/main/g/gpa/gpa_0.10.0.orig.tar.bz2" - sha256 "95dbabe75fa5c8dc47e3acf2df7a51cee096051e5a842b4c9b6d61e40a6177b1" - revision 1 - - bottle do - sha256 "296e517c02d381101befecef3700d17c12a9542dd0b105912f304846a7d54fb2" => :catalina - sha256 "183d889ae94650931d7ed470ec643a9e5b02843e037a97de2669f2d48076e996" => :mojave - sha256 "dc9d49486a627330931c0d2caeb6af4629e3871bdbff840ae33e5afb97c087ba" => :high_sierra - sha256 "73e3e3c27b72b36ed733b01435dd4eb9538f036cf1a817d48a171e58b70de395" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "desktop-file-utils" - depends_on "gpgme" - depends_on "gtk+" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/gpa", "--version" - end -end diff --git a/Formula/gpac.rb b/Formula/gpac.rb deleted file mode 100644 index 1b71c8698d79b..0000000000000 --- a/Formula/gpac.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Installs a relatively minimalist version of the GPAC tools. The -# most commonly used tool in this package is the MP4Box metadata -# interleaver, which has relatively few dependencies. -# -# The challenge with building everything is that Gpac depends on -# a much older version of FFMpeg and WxWidgets than the version -# that Brew installs - -class Gpac < Formula - desc "Multimedia framework for research and academic purposes" - homepage "https://gpac.wp.mines-telecom.fr/" - url "https://github.com/gpac/gpac/archive/v1.0.0.tar.gz" - sha256 "ebcca41993e51706c891dba4e9fe03b59bc671c41910bc6c303ba3feeb7f1b20" - license "LGPL-2.1" - head "https://github.com/gpac/gpac.git" - - bottle do - cellar :any - sha256 "615c346a9a86fd6fcdc1591bf6c5a634ae408e0ba39e11ec1b9e011488e278e3" => :catalina - sha256 "167c5e24935a3f4b118e0d931f1d3ed2a4101a39b5de85910ec7384ee13f95b1" => :mojave - sha256 "420874d6129c931e0dd7051bb2a91fd492f40456ade36259de611546f409f539" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - conflicts_with "bento4", :because => "both install `mp42ts` binaries" - - def install - args = %W[ - --disable-wx - --disable-pulseaudio - --prefix=#{prefix} - --mandir=#{man} - --disable-x11 - ] - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - system "#{bin}/MP4Box", "-add", test_fixtures("test.mp3"), "#{testpath}/out.mp4" - assert_predicate testpath/"out.mp4", :exist? - end -end diff --git a/Formula/gpatch.rb b/Formula/gpatch.rb deleted file mode 100644 index 293bc83219eb3..0000000000000 --- a/Formula/gpatch.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Gpatch < Formula - desc "Apply a diff file to an original" - homepage "https://savannah.gnu.org/projects/patch/" - url "https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz" - mirror "https://ftpmirror.gnu.org/patch/patch-2.7.6.tar.xz" - sha256 "ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "f539f83039bc989b16aac11becfaa933c6dc8088f6fa060a8e01e84ed0a61d77" => :catalina - sha256 "c25bf27bae741a7ec1a16d19d449d28b4b4a2f225190f55badf86b64b0266f4d" => :mojave - sha256 "418d7ea9c3948a5d70bdca202bd56e5554eef7f105fc25449f041331db7f4f96" => :high_sierra - sha256 "81e0fb63928b01d60b9d7a1f0bdbf262679888556bd055fd02f4f57a70cb87ad" => :sierra - sha256 "bd67af8b9c24fa785a2da2a1d3475305593dbc183331aed657313e4066de3259" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - testfile = testpath/"test" - testfile.write "homebrew\n" - patch = <<~EOS - 1c1 - < homebrew - --- - > hello - EOS - pipe_output("#{bin}/patch #{testfile}", patch) - assert_equal "hello", testfile.read.chomp - end -end diff --git a/Formula/gpcslots2.rb b/Formula/gpcslots2.rb deleted file mode 100644 index 0528ba6d9a20e..0000000000000 --- a/Formula/gpcslots2.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Gpcslots2 < Formula - desc "Casino text-console game" - homepage "https://sourceforge.net/projects/gpcslots2/" - url "https://downloads.sourceforge.net/project/gpcslots2/gpcslots2_0-4-5b" - version "0.4.5b" - sha256 "4daf5b6e5a23fe6cd121fe1250f10ad9f3b936bd536d475ec585f57998736f55" - - bottle :unneeded - - def install - bin.install "gpcslots2_0-4-5b" => "gpcslots2" - end - - test do - system "#{bin}/gpcslots2", "-h" - end -end diff --git a/Formula/gperf.rb b/Formula/gperf.rb deleted file mode 100644 index e8b89cc543d84..0000000000000 --- a/Formula/gperf.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Gperf < Formula - desc "Perfect hash function generator" - homepage "https://www.gnu.org/software/gperf" - url "https://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz" - mirror "https://ftpmirror.gnu.org/gperf/gperf-3.1.tar.gz" - sha256 "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "fc18781c090c4b8b7bb7305a864eeb4e6f3f458d8daa2fff96da3bda061fa8bb" => :catalina - sha256 "85c9bd450b0a0d7453584c343fe6770c94f8f3941aaa6f95d735f1923209b6ed" => :mojave - sha256 "d71157cd1baddf951e91477b85b533ade99dfe97a5876bb993fe7f6e8336f780" => :high_sierra - sha256 "3cbaa18692ac53ce98a754d46e07e89d6dddca4bef3bbb312e762abf5a30093d" => :sierra - sha256 "27f661ef9546ff113279654e92c08bb8d8ab837f7dc8b308c1a2beeafdcebc76" => :el_capitan - sha256 "263440c302dddec69c2140e8df2e4c00a76b76137243e712e8e8756140e0eaf5" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "TOTAL_KEYWORDS 3", - pipe_output("#{bin}/gperf", "homebrew\nfoobar\ntest\n") - end -end diff --git a/Formula/gperftools.rb b/Formula/gperftools.rb deleted file mode 100644 index e9940acf0390c..0000000000000 --- a/Formula/gperftools.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Gperftools < Formula - desc "Multi-threaded malloc() and performance analysis tools" - homepage "https://github.com/gperftools/gperftools" - url "https://github.com/gperftools/gperftools/releases/download/gperftools-2.8/gperftools-2.8.tar.gz" - sha256 "240deacdd628b6459671b83eb0c4db8e97baadf659f25b92e9a078d536bd513e" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "61a7c4f6c446b4ade0be332854baa8320a9cc193b00d89e39a0d3c18183aa8e3" => :catalina - sha256 "efcfaff363bbb0508a50d2987f04cbe8dfa21bfb75e8d6388516ffefc0a74bff" => :mojave - sha256 "55470b74d7c7567ca44429a1c1621cc2077dcadd2c6a8b4067f3812c3124f82c" => :high_sierra - end - - head do - url "https://github.com/gperftools/gperftools.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - # Fix "error: unknown type name 'mach_port_t'" - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - ENV.append_to_cflags "-D_XOPEN_SOURCE" - - system "autoreconf", "-fiv" 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() - { - void *p1 = tc_malloc(10); - assert(p1 != NULL); - - tc_free(p1); - - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-ltcmalloc", "-o", "test" - system "./test" - end -end diff --git a/Formula/gpgme.rb b/Formula/gpgme.rb deleted file mode 100644 index f8967915d56f3..0000000000000 --- a/Formula/gpgme.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Gpgme < Formula - desc "Library access to GnuPG" - homepage "https://www.gnupg.org/related_software/gpgme/" - url "https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.13.1.tar.bz2" - sha256 "c4e30b227682374c23cddc7fdb9324a99694d907e79242a25a4deeedb393be46" - revision 1 - - bottle do - cellar :any - sha256 "85e3bca3de90a091853a056a40fc22778d3a75abb4297064edae1fc07eaefdee" => :catalina - sha256 "b49b55062ab1ba7a6994ac8506aeec65ba5acd512fabfa696148dd7b08acb1d9" => :mojave - sha256 "c4bc2011b6afe87a0f3d76c43c50c117c1640eaa848c7a4f7be0f92e261017a7" => :high_sierra - end - - depends_on "python@3.8" => [:build, :test] - depends_on "swig" => :build - depends_on "gnupg" - depends_on "libassuan" - depends_on "libgpg-error" - - def install - ENV["PYTHON"] = Formula["python@3.8"].opt_bin/"python3" - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-static" - system "make" - system "make", "install" - - # avoid triggering mandatory rebuilds of software that hard-codes this path - inreplace bin/"gpgme-config", prefix, opt_prefix - end - - test do - assert_match version.to_s, shell_output("#{bin}/gpgme-tool --lib-version") - system Formula["python@3.8"].opt_bin/"python3", "-c", "import gpg; print(gpg.version.versionstr)" - end -end diff --git a/Formula/gphoto2.rb b/Formula/gphoto2.rb deleted file mode 100644 index 60af5fb587599..0000000000000 --- a/Formula/gphoto2.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Gphoto2 < Formula - desc "Command-line interface to libgphoto2" - homepage "http://www.gphoto.org/" - url "https://downloads.sourceforge.net/project/gphoto/gphoto/2.5.23/gphoto2-2.5.23.tar.bz2" - sha256 "df87092100e7766c9d0a4323217c91908a9c891c0d3670ebf40b76903be458d1" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "41373d501ce514558ba5ef0ba1511a4e1b340157eb900adc50c27c3712f479e5" => :catalina - sha256 "da5cc508f296a7830b969ac4689ed9decb2242f1f2ce847bbffa76bc4ee535db" => :mojave - sha256 "5d8185b94ff870dbea0947367b66b839a48523be64eef5b351e67d94fb3d3587" => :high_sierra - sha256 "058a04c33c80cfaad20f5bf35f1afee9624c390cf163e96df60f6c9c0c06f7e3" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "jpeg" - depends_on "libgphoto2" - depends_on "popt" - depends_on "readline" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/gphoto2 -v") - end -end diff --git a/Formula/gplcver.rb b/Formula/gplcver.rb deleted file mode 100644 index 3755411a594d0..0000000000000 --- a/Formula/gplcver.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Gplcver < Formula - desc "Pragmatic C Software GPL Cver 2001" - homepage "https://gplcver.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gplcver/gplcver/2.12a/gplcver-2.12a.src.tar.bz2" - sha256 "f7d94677677f10c2d1e366eda2d01a652ef5f30d167660905c100f52f1a46e75" - - bottle do - cellar :any_skip_relocation - sha256 "e0db2e2d2f4331ecbe4ead3c8f9d4f239c6b9427472ea959dd394544fbbf7b43" => :catalina - sha256 "fb50587552693b0c0c26ee074c52766c097f90afc6492a0bcf75cc65aaf2f031" => :mojave - sha256 "2460dcc2da525280cd5b7d2452abe922874291b92f0ba3abd1316da2e5ff40f7" => :high_sierra - sha256 "a0f14e7d01b7098ed6e770b21df05f03d7506ca0bab3d1f84845ca9ca7d1eb5b" => :sierra - sha256 "a094d355a75148ed611e9668841a33810a1a1226bc6651b8d0c5e4868867e7fd" => :el_capitan - sha256 "fc4f5fc0f1bb13139740ae6f2966bd4e3adb57c7a9803b84f946d95fcb40dd2a" => :yosemite - sha256 "0fc13b457839ee25fc9d0b35338ada6af67d07c8e3fb4ea1ac6f7d454f13475c" => :mavericks - end - - def install - inreplace "src/makefile.osx" do |s| - s.gsub! "-mcpu=powerpc", "" - s.change_make_var! "CFLAGS", "$(INCS) $(OPTFLGS) #{ENV.cflags}" - s.change_make_var! "LFLAGS", "" - end - - system "make", "-C", "src", "-f", "makefile.osx" - bin.install "bin/cver" - end -end diff --git a/Formula/gpm.rb b/Formula/gpm.rb deleted file mode 100644 index a2e990eaea296..0000000000000 --- a/Formula/gpm.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Gpm < Formula - desc "Barebones dependency manager for Go" - homepage "https://github.com/pote/gpm" - url "https://github.com/pote/gpm/archive/v1.4.0.tar.gz" - sha256 "2e213abbb1a12ecb895c3f02b74077d3440b7ae3221b4b524659c2ea9065b02a" - license "MIT" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "f5c138e505b9e96ca109152ab5e5aa6871d9e9b200b7c603ca4d1c210be30838" => :catalina - sha256 "d13ab2f5674bb5797801ca42fc50ff05ecfc9f674d09a406e8affcce2baf4111" => :mojave - sha256 "cac9f1ce7bb82555763015539417c9e709ca27d414c24f100ed045b593573cee" => :high_sierra - sha256 "816976b12502697adb886dfbee31bbc2cfcbe2cff1302927f8da6cef4e4b08cf" => :sierra - sha256 "ba26a6b34e92b4333d636ae3d9e54d726f6bd3bbabdabbfbdd9c3fec569e10fe" => :el_capitan - sha256 "0ed200c92c086eebf306065403c6a18db6e55e6d2764904cbd53f442f3043179" => :yosemite - sha256 "87cf43901daa271a5d27fbea5e6f103c15e287318152f02f0ef14bd77d51cb63" => :mavericks - end - - depends_on "go" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - ENV["GOPATH"] = testpath - (testpath/"Godeps").write("github.com/pote/gpm-testing-package v6.1") - system bin/"gpm", "install" - (testpath/"go_code.go").write <<~EOS - package main - import ("fmt"; "github.com/pote/gpm-testing-package") - func main() { fmt.Print(gpm_testing_package.Version()) } - EOS - assert_equal "v6.1", shell_output("go run go_code.go") - end -end diff --git a/Formula/gpp.rb b/Formula/gpp.rb deleted file mode 100644 index 9088d768e0d8a..0000000000000 --- a/Formula/gpp.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Gpp < Formula - desc "General-purpose preprocessor with customizable syntax" - homepage "https://logological.org/gpp" - url "https://files.nothingisreal.com/software/gpp/gpp-2.26.tar.bz2" - sha256 "4176aa5e37be1c72cb8a90a371ecb2d3388c772814a34debe0ff581f2e1dccb3" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "7b18d4755835ab3cad89e5d90b459475dd499695d461a6c8ac4df35f07a11b1b" => :catalina - sha256 "d83bbb08210bd763f300a44c9cae8cf8bad7070fcd0e8064e2c81f6c385937b8" => :mojave - sha256 "c45c620602411620fa60c1b780a0a9b6172606f9f03c9e7d18e31e9c1276b172" => :high_sierra - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--mandir=#{man}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - system "#{bin}/gpp", "--version" - end -end diff --git a/Formula/gpredict.rb b/Formula/gpredict.rb deleted file mode 100644 index b865cdb026f0b..0000000000000 --- a/Formula/gpredict.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Gpredict < Formula - desc "Real-time satellite tracking/prediction application" - homepage "http://gpredict.oz9aec.net/" - url "https://github.com/csete/gpredict/releases/download/v2.2.1/gpredict-2.2.1.tar.bz2" - sha256 "e759c4bae0b17b202a7c0f8281ff016f819b502780d3e77b46fe8767e7498e43" - license "GPL-2.0" - revision 2 - - bottle do - sha256 "99fff9473dcc5eaa0c58cf0b2bf04f4240e1598aada45565e4dbbf050d2ac7dc" => :catalina - sha256 "952941a2ecdb5f75805888dfd020acce48c4f1b29a9c2e3ec8742d35fcd9c829" => :mojave - sha256 "189249444c490bc7984506a3d041de1d057fff671ff774871f549f6b32efa042" => :high_sierra - sha256 "9a0a4b0e63b3b1f84830f508d60ee3fc5b5fd0b9a5731241873168baa88209cf" => :sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "gettext" - depends_on "glib" - depends_on "goocanvas" - depends_on "gtk+3" - depends_on "hamlib" - - uses_from_macos "curl" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "real-time", shell_output("#{bin}/gpredict -h") - end -end diff --git a/Formula/gpsbabel.rb b/Formula/gpsbabel.rb deleted file mode 100644 index 2c0011f2f9e09..0000000000000 --- a/Formula/gpsbabel.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Gpsbabel < Formula - desc "Converts/uploads GPS waypoints, tracks, and routes" - homepage "https://www.gpsbabel.org/" - url "https://github.com/gpsbabel/gpsbabel/archive/gpsbabel_1_6_0.tar.gz" - sha256 "ad56796f725dcdb7f52d9a9509d4922f11198c382fe10fc2d6c9efa8159f2090" - license "GPL-2.0" - - bottle do - sha256 "685947e84880f27a16a442c10456990f9ede1efa8adf723fa217ba7ac5123ff7" => :catalina - sha256 "0d5fa17f760e4ff0ebf88bf4b461c1fba6498278edd57ab77caee7576f5c4609" => :mojave - sha256 "e147b5217a57fdf32a8073f53718e6423f227e967f9d495cb3a0bc38b5e2ad3a" => :high_sierra - sha256 "e982a298816049c9094762699799f238cfc8d7804cf5d72f6816ebd0e8aa414e" => :sierra - end - - depends_on "libusb" - depends_on "qt" - - def install - ENV.cxx11 - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.loc").write <<~EOS - - - - - - - - EOS - system bin/"gpsbabel", "-i", "geo", "-f", "test.loc", "-o", "gpx", "-F", "test.gpx" - assert_predicate testpath/"test.gpx", :exist? - end -end diff --git a/Formula/gpsd.rb b/Formula/gpsd.rb deleted file mode 100644 index f41c6ed99335b..0000000000000 --- a/Formula/gpsd.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Gpsd < Formula - desc "Global Positioning System (GPS) daemon" - homepage "http://catb.org/gpsd/" - url "https://download.savannah.gnu.org/releases/gpsd/gpsd-3.20.tar.xz" - mirror "https://download-mirror.savannah.gnu.org/releases/gpsd/gpsd-3.20.tar.xz" - sha256 "3998a5cbb728e97f896f46c3c83301b1e6c5d859393e58c2fad8c5426774d571" - - bottle do - cellar :any - sha256 "e73790ec49d1c4f079e0584596d2126447422c3f569281eb092afc77ece1bc3a" => :catalina - sha256 "cf9997d1456a9ec3fa49fee4cbc189af1a60cbeb0afb1abfb59c75ede967864c" => :mojave - sha256 "0e4110bedb2dd77d37e116fc32f1c45775f387df1a3eb21fc870f0a86ce04262" => :high_sierra - end - - depends_on "scons" => :build - - def install - system "scons", "chrpath=False", "python=False", "strip=False", "prefix=#{prefix}/" - system "scons", "install" - end - - def caveats - <<~EOS - gpsd does not automatically detect GPS device addresses. Once started, you - need to force it to connect to your GPS: - - GPSD_SOCKET="#{var}/gpsd.sock" #{sbin}/gpsdctl add /dev/tty.usbserial-XYZ - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/sbin/gpsd -N -F #{HOMEBREW_PREFIX}/var/gpsd.sock /dev/tty.usbserial-XYZ" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/gpsd - -N - -F - #{var}/gpsd.sock - - RunAtLoad - - KeepAlive - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardOutPath - #{var}/log/gpsd.log - StandardErrorPath - #{var}/log/gpsd.log - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{sbin}/gpsd -V") - end -end diff --git a/Formula/gpsim.rb b/Formula/gpsim.rb deleted file mode 100644 index ce8f1d5fad09d..0000000000000 --- a/Formula/gpsim.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Gpsim < Formula - desc "Simulator for Microchip's PIC microcontrollers" - homepage "https://gpsim.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gpsim/gpsim/0.31.0/gpsim-0.31.0.tar.gz" - sha256 "110ee6be3a5d02b32803a91e480cbfc9d423ef72e0830703fc0bc97b9569923f" - license "GPL-2.0" - head "https://svn.code.sf.net/p/gpsim/code/trunk" - - bottle do - cellar :any - sha256 "7f92c6ae94438c73050aea08fa41c56b93efa9464855b3b0861b0bb3c6a08621" => :catalina - sha256 "00c585480ada4e552a32ee3f0e11bc68142ce4f6671eeb14badc51007d07be9f" => :mojave - sha256 "612ce9c2f03a5c6464aee9b9bdcd6884e434e457f515bbbc2adceb8417f1c6d1" => :high_sierra - sha256 "5a366b0dccfe1ff92aaed6d29f9bd5ca66806471b17e8941206e985f6bd8817a" => :sierra - end - - depends_on "gputils" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "popt" - depends_on "readline" - - def install - ENV.cxx11 - - # Upstream bug filed: https://sourceforge.net/p/gpsim/bugs/245/ - inreplace "src/modules.cc", "#include \"error.h\"", "" - - system "./configure", "--disable-dependency-tracking", - "--disable-gui", - "--disable-shared", - "--prefix=#{prefix}" - system "make", "all" - system "make", "install" - end - - test do - system "#{bin}/gpsim", "--version" - end -end diff --git a/Formula/gptfdisk.rb b/Formula/gptfdisk.rb deleted file mode 100644 index 8f635f57d5712..0000000000000 --- a/Formula/gptfdisk.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Gptfdisk < Formula - desc "Text-mode partitioning tools" - homepage "https://www.rodsbooks.com/gdisk/" - url "https://downloads.sourceforge.net/project/gptfdisk/gptfdisk/1.0.5/gptfdisk-1.0.5.tar.gz" - sha256 "0e7d3987cd0488ecaf4b48761bc97f40b1dc089e5ff53c4b37abe30bc67dcb2f" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "7764d3c435876ddc2d8c2fc67ac033f1fae3343967844254deaa3854adf62285" => :catalina - sha256 "7764d3c435876ddc2d8c2fc67ac033f1fae3343967844254deaa3854adf62285" => :mojave - sha256 "d68f15fdff5ea9385e68129a209c8d2de1f9525a114637e8b361caf06bf4e482" => :high_sierra - end - - depends_on "popt" - - def install - system "make", "-f", "Makefile.mac" - %w[cgdisk fixparts gdisk sgdisk].each do |program| - bin.install program - man8.install "#{program}.8" - end - end - - test do - system "hdiutil", "create", "-size", "128k", "test.dmg" - output = shell_output("#{bin}/gdisk -l test.dmg") - assert_match "Found valid GPT with protective MBR", output - end -end diff --git a/Formula/gptsync.rb b/Formula/gptsync.rb deleted file mode 100644 index 8a057bcf0ada8..0000000000000 --- a/Formula/gptsync.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Gptsync < Formula - desc "GPT and MBR partition tables synchronization tool" - homepage "https://refit.sourceforge.io/" - url "https://downloads.sourceforge.net/refit/refit-src-0.14.tar.gz" - sha256 "c4b0803683c9f8a1de0b9f65d2b5a25a69100dcc608d58dca1611a8134cde081" - - bottle do - cellar :any_skip_relocation - sha256 "e6761d20c0090477f2914576cbb97654774a5de9cae4b3846187120961450ed0" => :catalina - sha256 "76d760477b55a2ac3ebe3d2fb472e70ccd84a2fa8cb265bae829669e639897f3" => :mojave - sha256 "8d21fa7f491b5cfe7a2c809a99d753ff4511c5354c4761751ab9c5abebd585c6" => :high_sierra - sha256 "e822ef6c99aeaf6eee5812cd83ede2bc9a045dd556105150293bcf486898a59d" => :sierra - sha256 "d355de7bea36e310d22ed1109a34574ab93859bfe9e44b9493ebe75cfe429c33" => :el_capitan - sha256 "34756250a7bbd8470dd98401c86c65d9886cfac802adb2371bf0a23fa9351f7f" => :yosemite - sha256 "77233898efcd0dee5ec73bf8a11294bd5f6c64f5f7d34136c792d1e96ef13d61" => :mavericks - end - - def install - cd "gptsync" do - system "make", "-f", "Makefile.unix", "CC=#{ENV.cc}" - sbin.install "gptsync", "showpart" - man8.install "gptsync.8" - end - end -end diff --git a/Formula/gputils.rb b/Formula/gputils.rb deleted file mode 100644 index fe543fdd51f9a..0000000000000 --- a/Formula/gputils.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Gputils < Formula - desc "GNU PIC Utilities" - homepage "https://gputils.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gputils/gputils/1.5.0/gputils-1.5.0-1.tar.bz2" - sha256 "6f88a018e85717b57a22f27a0ca41b2157633a82351f7755be92e2d7dc40bb14" - license "GPL-2.0" - - bottle do - sha256 "66500b5fe160a363d47dd326ff7e983e33f81d25a457f0304ada80de72d61ac8" => :catalina - sha256 "94ddaac79ac5d6cfdddbd588fbb2ccd8be3f5a62662fe64d19a63828d8b6d305" => :mojave - sha256 "c5ed95fc323471f635edbc08e81394f66486c4c81953a0881c5b26791d1176bb" => :high_sierra - sha256 "aba5cb544582e26bdb212f9782f911b0e9d36c5049d0aed3928c48ae9b74a6e9" => :sierra - sha256 "ad3a6688ca0dac1da0a10db36d9119d9bedcd8d0f389920a45832cc0676c67a3" => :el_capitan - sha256 "dd69717c349e405ed04eebc07fc86dcc09d3763f892488514528b328a725a3f9" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - end - - test do - # assemble with gpasm - (testpath/"test.asm").write " movlw 0x42\n end\n" - system "#{bin}/gpasm", "-p", "p16f84", "test.asm" - assert_predicate testpath/"test.hex", :exist? - - # disassemble with gpdasm - output = shell_output("#{bin}/gpdasm -p p16f84 test.hex") - assert_match "0000: 3042 movlw 0x42\n", output - end -end diff --git a/Formula/gpx.rb b/Formula/gpx.rb deleted file mode 100644 index e77cf386bc844..0000000000000 --- a/Formula/gpx.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Gpx < Formula - desc "Gcode to x3g converter for 3D printers running Sailfish" - homepage "https://github.com/markwal/GPX/blob/HEAD/README.md" - url "https://github.com/markwal/GPX/archive/2.5.2.tar.gz" - sha256 "8b637a366a2863ca3a11b4c6a33d8ebc10806bf7de3e3ac90f2a3a57529ea864" - license "GPL-2.0" - head "https://github.com/markwal/GPX.git" - - bottle do - cellar :any_skip_relocation - sha256 "cc71031bc580eeaea3319c3a4e0534feec061620d5c21fca74f7245193413b70" => :catalina - sha256 "3a4ae78b868644f171e9005ba2da3169dfb969e607e239280345ae32b0369ced" => :mojave - sha256 "057c877225787dc6468db8beb07505870510d9b421e46a1fb7b9b76ad48b0ac4" => :high_sierra - sha256 "e51f98467745f27e906fa4d1152cb7fe7e73c2606872f2c9eba8d54fa250a32e" => :sierra - sha256 "29621a041a78876e963bdd922c6ea5203f102dbbcd87038d3ade22eca6bafb29" => :el_capitan - sha256 "451eab6ecaf8a42858ae0d71cfa141bc14fd3d0608285bc1a677422fcc8a662e" => :yosemite - sha256 "d1fdd06431d4efa1043c364c34d1e2f1fd0d904aa58047829ec0beda4aa47340" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.gcode").write("G28 X Y Z") - system "#{bin}/gpx", "test.gcode" - end -end diff --git a/Formula/gqlplus.rb b/Formula/gqlplus.rb deleted file mode 100644 index ca9e066d0d8d8..0000000000000 --- a/Formula/gqlplus.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Gqlplus < Formula - desc "Drop-in replacement for sqlplus, an Oracle SQL client" - homepage "https://gqlplus.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gqlplus/gqlplus/1.16/gqlplus-1.16.tar.gz" - sha256 "9e0071d6f8bc24b0b3623c69d9205f7d3a19c2cb32b5ac9cff133dc75814acdd" - revision 2 - - bottle do - cellar :any - sha256 "2ffb1031a83fe666dc574d17d72b08781dd08e48f1dba88c5c67550472f819df" => :catalina - sha256 "014190ba5c0c8e5bc88b0d434f6a05d4c26ab0b6e40b96d6fa00f37f02ee078a" => :mojave - sha256 "324544d5383507812e0cc14a6e085697661944588ee1fe56477c67e2bc1c009d" => :high_sierra - sha256 "9ad645ec60442256a86ad9bcd081b7adffd4d6ad4cdb47f10814020b53f3200d" => :sierra - end - - depends_on "readline" - - def install - # Fix the version - # Reported 18 Jul 2016: https://sourceforge.net/p/gqlplus/bugs/43/ - inreplace "gqlplus.c", - "#define VERSION \"1.15\"", - "#define VERSION \"1.16\"" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/gqlplus -h") - end -end diff --git a/Formula/gqview.rb b/Formula/gqview.rb deleted file mode 100644 index 3df34c2e0b586..0000000000000 --- a/Formula/gqview.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Gqview < Formula - desc "Image browser" - homepage "https://gqview.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gqview/gqview/2.0.4/gqview-2.0.4.tar.gz" - sha256 "97e3b7ce5f17a315c56d6eefd7b3a60b40cc3d18858ca194c7e7262acce383cb" - revision 3 - - bottle do - sha256 "e8e56389d265444d10d7859b63736370c2b88b98d4f8b4254bdecf2f3b7c8ab4" => :catalina - sha256 "dc9cc0efc66c0e2156efeba84201c54711288e96868367bde264dbfaff14236f" => :mojave - sha256 "faeb25a25899fc5d18b2097574c3975648aaab4b8a55545e5ba6579335c2f587" => :high_sierra - sha256 "b0e983e36c58634a2ae893003567dac0737c012811c1dcb64f0def22fc11f604" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/gqview", "--version" - end -end diff --git a/Formula/gr-osmosdr.rb b/Formula/gr-osmosdr.rb deleted file mode 100644 index eec401ca91c0b..0000000000000 --- a/Formula/gr-osmosdr.rb +++ /dev/null @@ -1,53 +0,0 @@ -class GrOsmosdr < Formula - desc "Osmocom GNU Radio Blocks" - homepage "https://osmocom.org/projects/sdr/wiki/GrOsmoSDR" - url "https://github.com/osmocom/gr-osmosdr/archive/v0.1.4.tar.gz" - sha256 "bcf9a9b1760e667c41a354e8cd41ef911d0929d5e4a18e0594ccb3320d735066" - license "GPL-3.0" - revision 10 - - bottle do - cellar :any - sha256 "65570c9ef4058f8ace042beeed7672b445e7d7c069ca9c6b28c535bbe0a2b711" => :catalina - sha256 "971a785a7acf94c36761047326a56ce5e375bf9d5e633b24df196cef4c0035e6" => :mojave - sha256 "0a79c514b8da09932af265cf6582789edb8fd1b87cef0796e10dab7b847779bb" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "swig" => :build - depends_on "airspy" - depends_on "boost" - depends_on "gnuradio" - depends_on "hackrf" - depends_on "librtlsdr" - depends_on :macos # gnuradio uses Python 2 - depends_on "uhd" - - resource "Cheetah" do - url "https://files.pythonhosted.org/packages/source/C/Cheetah/Cheetah-2.4.4.tar.gz" - sha256 "be308229f0c1e5e5af4f27d7ee06d90bb19e6af3059794e5fd536a6f29a9b550" - end - - def install - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" - - resource("Cheetah").stage do - system "python", *Language::Python.setup_install_args(libexec/"vendor") - end - - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - osmosdr::device_t device; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lgnuradio-osmosdr", "-o", "test" - system "./test" - end -end diff --git a/Formula/grace.rb b/Formula/grace.rb deleted file mode 100644 index 3cd458d540033..0000000000000 --- a/Formula/grace.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Grace < Formula - desc "WYSIWYG 2D plotting tool for X11" - homepage "https://plasma-gate.weizmann.ac.il/Grace/" - url "https://deb.debian.org/debian/pool/main/g/grace/grace_5.1.25.orig.tar.gz" - sha256 "751ab9917ed0f6232073c193aba74046037e185d73b77bab0f5af3e3ff1da2ac" - revision 2 - - bottle do - sha256 "7629c4a481667d3acbbb5813789d885beece9f063e41826546b68b5f7170360b" => :catalina - sha256 "919ed10debaca3045266712e6927d410c152ec92e44f403efc91c11a322652d4" => :mojave - sha256 "24e9a28ea6b6665f2e8e7a0d179735a6f956bb55b02d5515570017780e4903a1" => :high_sierra - sha256 "80eae698e6f2cf3dd8a1fb11937871f2e588417b3abfe22ff12d066dd9f0e747" => :sierra - sha256 "f178d67cb811997af5d52c11afb1e27c73bc44a1063aa06f08bc7ee189691812" => :el_capitan - sha256 "e1dc9c34d5417798dbd2d0c834fe099e7f1d8b395863964ffeb9fcb69e4b3c33" => :yosemite - end - - depends_on "fftw" - depends_on "jpeg" - depends_on "libpng" - depends_on "openmotif" - depends_on "pdflib-lite" - depends_on :x11 - - def install - ENV.O1 # https://github.com/Homebrew/homebrew/issues/27840#issuecomment-38536704 - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--enable-grace-home=#{prefix}" - system "make", "install" - share.install "fonts", "examples" - man1.install Dir["doc/*.1"] - doc.install Dir["doc/*"] - end - - test do - system bin/"gracebat", share/"examples/test.dat" - assert_equal "12/31/1999 23:59:59.999", - shell_output("#{bin}/convcal -i iso -o us 1999-12-31T23:59:59.999").chomp - end -end diff --git a/Formula/gradio.rb b/Formula/gradio.rb deleted file mode 100644 index abc58d726e8fa..0000000000000 --- a/Formula/gradio.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Gradio < Formula - desc "GTK3 app for finding and listening to internet radio stations" - homepage "https://github.com/haecker-felix/Gradio" - url "https://github.com/haecker-felix/Gradio/archive/v7.3.tar.gz" - sha256 "5c5afed83fceb9a9f8bc7414b8a200128b3317ccf1ed50a0e7321ca15cf19412" - license "GPL-3.0" - revision 1 - - bottle do - sha256 "80de210e71cbf7bd18f125ed1b74c58939046418905bbbbe03892b1b7d4dc8ca" => :catalina - sha256 "afed2590e43bb873751bf147da70228edf518aaa4da9a47a8e74a339385e7407" => :mojave - sha256 "772bc7cd809b085f9eaf2419ae9ddae50e80cbaaace480fe1f3d23c26bd8f164" => :high_sierra - end - - deprecate! :date => "2019-11-16" - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "adwaita-icon-theme" - depends_on "cairo" - depends_on "gettext" - depends_on "glib" - depends_on "gst-libav" - depends_on "gst-plugins-base" - depends_on "gstreamer" - depends_on "gtk+3" - depends_on "hicolor-icon-theme" - depends_on "json-glib" - depends_on "libsoup" - depends_on "python@3.7" - - 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", *std_meson_args, ".." - system "ninja" - system "ninja", "install" - end - end - - def post_install - system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" - system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" - end - - test do - system "#{bin}/gradio", "-h" - end -end diff --git a/Formula/gradle-completion.rb b/Formula/gradle-completion.rb deleted file mode 100644 index 86b8e4e3eb1c2..0000000000000 --- a/Formula/gradle-completion.rb +++ /dev/null @@ -1,22 +0,0 @@ -class GradleCompletion < Formula - desc "Bash and Zsh completion for Gradle" - homepage "https://gradle.org/" - url "https://github.com/gradle/gradle-completion/archive/v1.4.1.tar.gz" - sha256 "5d77f0c739fe983cfa86078a615f43be9be0e3ce05a3a7b70cb813a1ebd1ceef" - license "MIT" - head "https://github.com/gradle/gradle-completion.git" - - bottle :unneeded - - depends_on "bash-completion" - - def install - bash_completion.install "gradle-completion.bash" => "gradle" - zsh_completion.install "_gradle" => "_gradle" - end - - test do - assert_match "-F _gradle", - shell_output("bash -c 'source #{bash_completion}/gradle && complete -p gradle'") - end -end diff --git a/Formula/gradle.rb b/Formula/gradle.rb deleted file mode 100644 index 8b0f6999e5ee7..0000000000000 --- a/Formula/gradle.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Gradle < Formula - desc "Open-source build automation tool based on the Groovy and Kotlin DSL" - homepage "https://www.gradle.org/" - url "https://services.gradle.org/distributions/gradle-6.5.1-all.zip" - sha256 "143a28f54f1ae93ef4f72d862dbc3c438050d81bb45b4601eb7076e998362920" - - bottle :unneeded - - depends_on "openjdk" - - def install - rm_f Dir["bin/*.bat"] - libexec.install %w[bin docs lib src] - (bin/"gradle").write_env_script libexec/"bin/gradle", - :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - end - - test do - assert_match version.to_s, shell_output("#{bin}/gradle --version") - - (testpath/"build.gradle").write <<~EOS - println "gradle works!" - EOS - gradle_output = shell_output("#{bin}/gradle build --no-daemon") - assert_includes gradle_output, "gradle works!" - end -end diff --git a/Formula/grafana.rb b/Formula/grafana.rb deleted file mode 100644 index 01e5ea050eb9b..0000000000000 --- a/Formula/grafana.rb +++ /dev/null @@ -1,136 +0,0 @@ -class Grafana < Formula - desc "Gorgeous metric visualizations and dashboards for timeseries databases" - homepage "https://grafana.com/" - url "https://github.com/grafana/grafana/archive/v7.0.5.tar.gz" - sha256 "0c088e0018255628396889ed1459164ce5dc0e5539cb3ffb48aa729f8505b6fe" - license "Apache-2.0" - head "https://github.com/grafana/grafana.git" - - bottle do - cellar :any_skip_relocation - sha256 "72ed67d00321251b5a602f539cafa9a7e83486137830aa5fb9eea6e29c79eb79" => :catalina - sha256 "f2645d4c42ff88d21642abcd1aa7fc8a98f73b7747a1f6de5643ca1cf29e2503" => :mojave - sha256 "6503248c691347b73972d27f822e7d41fd910e756ad6ed27e4ca30032b6c5926" => :high_sierra - end - - depends_on "go" => :build - depends_on "node" => :build - depends_on "yarn" => :build - - def install - ENV["GOPATH"] = buildpath - grafana_path = buildpath/"src/github.com/grafana/grafana" - grafana_path.install buildpath.children - - cd grafana_path do - system "go", "run", "build.go", "build" - - system "yarn", "install", "--ignore-engines" - - system "node_modules/grunt-cli/bin/grunt", "build" - - bin.install "bin/darwin-amd64/grafana-cli" - bin.install "bin/darwin-amd64/grafana-server" - (etc/"grafana").mkpath - cp("conf/sample.ini", "conf/grafana.ini.example") - etc.install "conf/sample.ini" => "grafana/grafana.ini" - etc.install "conf/grafana.ini.example" => "grafana/grafana.ini.example" - pkgshare.install "conf", "public", "tools" - prefix.install_metafiles - end - end - - def post_install - (var/"log/grafana").mkpath - (var/"lib/grafana/plugins").mkpath - end - - plist_options :manual => "grafana-server --config=#{HOMEBREW_PREFIX}/etc/grafana/grafana.ini --homepath #{HOMEBREW_PREFIX}/share/grafana --packaging=brew cfg:default.paths.logs=#{HOMEBREW_PREFIX}/var/log/grafana cfg:default.paths.data=#{HOMEBREW_PREFIX}/var/lib/grafana cfg:default.paths.plugins=#{HOMEBREW_PREFIX}/var/lib/grafana/plugins" - - def plist - <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/grafana-server - --config - #{etc}/grafana/grafana.ini - --homepath - #{opt_pkgshare} - --packaging=brew - cfg:default.paths.logs=#{var}/log/grafana - cfg:default.paths.data=#{var}/lib/grafana - cfg:default.paths.plugins=#{var}/lib/grafana/plugins - - RunAtLoad - - WorkingDirectory - #{var}/lib/grafana - StandardErrorPath - #{var}/log/grafana/grafana-stderr.log - StandardOutPath - #{var}/log/grafana/grafana-stdout.log - SoftResourceLimits - - NumberOfFiles - 10240 - - - - EOS - end - - test do - require "pty" - require "timeout" - - # first test - system bin/"grafana-server", "-v" - - # avoid stepping on anything that may be present in this directory - tdir = File.join(Dir.pwd, "grafana-test") - Dir.mkdir(tdir) - logdir = File.join(tdir, "log") - datadir = File.join(tdir, "data") - plugdir = File.join(tdir, "plugins") - [logdir, datadir, plugdir].each do |d| - Dir.mkdir(d) - end - Dir.chdir(pkgshare) - - res = PTY.spawn(bin/"grafana-server", - "cfg:default.paths.logs=#{logdir}", - "cfg:default.paths.data=#{datadir}", - "cfg:default.paths.plugins=#{plugdir}", - "cfg:default.server.http_port=50100") - r = res[0] - w = res[1] - pid = res[2] - - listening = Timeout.timeout(10) do - li = false - r.each do |l| - if /HTTP Server Listen/.match?(l) - li = true - break - end - end - li - end - - Process.kill("TERM", pid) - w.close - r.close - listening - end -end diff --git a/Formula/grails.rb b/Formula/grails.rb deleted file mode 100644 index e64e27b78d8ce..0000000000000 --- a/Formula/grails.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Grails < Formula - desc "Web application framework for the Groovy language" - homepage "https://grails.org/" - url "https://github.com/grails/grails-core/releases/download/v4.0.3/grails-4.0.3.zip" - sha256 "4a1b219451a4a64d0236ad1e1b6e1946ca916258db069c526eb751b1f9dbed80" - license "Apache-2.0" - - bottle :unneeded - - depends_on "openjdk@11" - - def install - rm_f Dir["bin/*.bat", "bin/cygrails", "*.bat"] - libexec.install Dir["*"] - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files libexec/"bin", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk@11"].opt_prefix}}" - end - - def caveats - <<~EOS - The GRAILS_HOME directory is: - #{opt_libexec} - EOS - end - - test do - assert_match "Grails Version: #{version}", shell_output("#{bin}/grails -v") - end -end diff --git a/Formula/grakn.rb b/Formula/grakn.rb deleted file mode 100644 index 4ff33afba5e17..0000000000000 --- a/Formula/grakn.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Grakn < Formula - desc "The distributed hyper-relational database for knowledge engineering" - homepage "https://grakn.ai/" - url "https://github.com/graknlabs/grakn/releases/download/1.8.0/grakn-core-all-mac-1.8.0.zip" - sha256 "5d9e4e7067e53be2868d8a9a56f9e64fe2dee2b46039a303655d32911cbbdf56" - license "AGPL-3.0" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - libexec.install Dir["*"] - bin.install libexec/"grakn" - bin.env_script_all_files(libexec, Language::Java.java_home_env("1.8")) - end - - test do - assert_match /RUNNING/i, shell_output("#{bin}/grakn server status") - end -end diff --git a/Formula/grap.rb b/Formula/grap.rb deleted file mode 100644 index e315ff7ebada1..0000000000000 --- a/Formula/grap.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Grap < Formula - desc "Language for typesetting graphs" - homepage "https://www.lunabase.org/~faber/Vault/software/grap/" - url "https://www.lunabase.org/~faber/Vault/software/grap/grap-1.46.tar.gz" - sha256 "7a8ecefdecfee96699913f2a412da68703911fa640bac3b964a413131f848bb4" - - bottle do - sha256 "8eb83388db58c42ae00a343e1382c52948c5b203ff754fed7b6582eeb989fa3c" => :catalina - sha256 "d7f05f3fc8eb5c0c3f3a5a66bf4d43262a84ae1edaf7ec92897122fd069e4a96" => :mojave - sha256 "b7394034b2898da9e7a61d578f9789f642f29d3191f84041b4fb9763bdfdcc73" => :high_sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-example-dir=#{pkgshare}/examples" - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - (testpath/"test.d").write <<~EOS - .G1 - 54.2 - 49.4 - 49.2 - 50.0 - 48.2 - 43.87 - .G2 - EOS - system bin/"grap", testpath/"test.d" - end -end diff --git a/Formula/graph-tool.rb b/Formula/graph-tool.rb deleted file mode 100644 index 2151ecf0135c7..0000000000000 --- a/Formula/graph-tool.rb +++ /dev/null @@ -1,110 +0,0 @@ -class GraphTool < Formula - include Language::Python::Virtualenv - - desc "Efficient network analysis for Python 3" - homepage "https://graph-tool.skewed.de/" - url "https://downloads.skewed.de/graph-tool/graph-tool-2.33.tar.bz2" - sha256 "f07025160a8cb376551508c6d8aa5fd05a146c67c4706ea4635d2766aa5c9fcb" - license "GPL-3.0" - - bottle do - sha256 "c87595bb20ff5868ca1b32ee16baf7cad07c08124b4bb209bf9fb275821cb661" => :catalina - sha256 "04e48635f2b6d233525a3df163acbe1fc9b6ee5859892c2a2d46afa631ae8fd3" => :mojave - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "boost-python3" - depends_on "cairomm" - depends_on "cgal" - depends_on "google-sparsehash" - depends_on "gtk+3" - depends_on "librsvg" - depends_on :macos => :mojave # for C++17 - depends_on "numpy" - depends_on "py3cairo" - depends_on "pygobject3" - depends_on "python@3.8" - depends_on "scipy" - - resource "Cycler" do - url "https://files.pythonhosted.org/packages/c2/4b/137dea450d6e1e3d474e1d873cd1d4f7d3beed7e0dc973b06e8e10d32488/cycler-0.10.0.tar.gz" - sha256 "cd7b2d1018258d7247a71425e9f26463dfb444d411c39569972f4ce586b0c9d8" - end - - resource "kiwisolver" do - url "https://files.pythonhosted.org/packages/16/e7/df58eb8868d183223692d2a62529a594f6414964a3ae93548467b146a24d/kiwisolver-1.1.0.tar.gz" - sha256 "53eaed412477c836e1b9522c19858a8557d6e595077830146182225613b11a75" - end - - resource "matplotlib" do - url "https://files.pythonhosted.org/packages/12/d1/7b12cd79c791348cb0c78ce6e7d16bd72992f13c9f1e8e43d2725a6d8adf/matplotlib-3.1.1.tar.gz" - sha256 "1febd22afe1489b13c6749ea059d392c03261b2950d1d45c17e3aed812080c93" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/00/32/8076fa13e832bb4dcff379f18f228e5a53412be0631808b9ca2610c0f566/pyparsing-2.4.5.tar.gz" - sha256 "4ca62001be367f01bd3e92ecbb79070272a9d4964dce6a48a82ff0b8bc7e683a" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/82/c3/534ddba230bd4fbbd3b7a3d35f3341d014cca213f369a9940925e7e5f691/pytz-2019.3.tar.gz" - sha256 "b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - end - - def install - system "autoreconf", "-fiv" - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - venv = virtualenv_create(libexec, Formula["python@3.8"].opt_bin/"python3") - - resources.each do |r| - venv.pip_install_and_link r - end - - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - PYTHON=python3 - PYTHON_LIBS=-undefined\ dynamic_lookup - --with-python-module-path=#{lib}/python#{xy}/site-packages - --with-boost-python=boost_python#{xy.to_s.delete(".")}-mt - --with-boost-libdir=#{HOMEBREW_PREFIX}/opt/boost/lib - --with-boost-coroutine=boost_coroutine-mt - ] - args << "--with-expat=#{MacOS.sdk_path}/usr" if MacOS.sdk_path_if_needed - - system "./configure", *args - system "make", "install" - - site_packages = "lib/python#{xy}/site-packages" - pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n" - (prefix/site_packages/"homebrew-graph-tool.pth").write pth_contents - end - - test do - (testpath/"test.py").write <<~EOS - import graph_tool as gt - g = gt.Graph() - v1 = g.add_vertex() - v2 = g.add_vertex() - e = g.add_edge(v1, v2) - assert g.num_edges() == 1 - assert g.num_vertices() == 2 - EOS - system Formula["python@3.8"].opt_bin/"python3", "test.py" - end -end diff --git a/Formula/graphene.rb b/Formula/graphene.rb deleted file mode 100644 index d88744c403edc..0000000000000 --- a/Formula/graphene.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Graphene < Formula - desc "Thin layer of graphic data types" - homepage "https://ebassi.github.io/graphene/" - url "https://download.gnome.org/sources/graphene/1.10/graphene-1.10.2.tar.xz" - sha256 "e97de8208f1aac4f913d4fa71ab73a7034e807186feb2abe55876e51c425a7f6" - - bottle do - cellar :any - sha256 "d8519d2811ee796969121cd0b087fb7a5e96c2952c69bb2dfe206f3efc299e31" => :catalina - sha256 "0e7e238034cfcd390b8bd0e49bd6ba3c23dcdbff7c9a1cea5e626b34a3381acb" => :mojave - sha256 "7bcd5ab83e1509ddeec6b710ba2a69c99bb92438344694423b1c886346fd44c2" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "glib" - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = graphene_point_get_type(); - 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}/graphene-1.0 - -I#{lib}/graphene-1.0/include - -L#{lib} - -lgraphene-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/graphicsmagick.rb b/Formula/graphicsmagick.rb deleted file mode 100644 index e985655b0bb99..0000000000000 --- a/Formula/graphicsmagick.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Graphicsmagick < Formula - desc "Image processing tools collection" - homepage "http://www.graphicsmagick.org/" - url "https://downloads.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.35/GraphicsMagick-1.3.35.tar.xz" - sha256 "188a8d6108fea87a0208723e8d206ec1d4d7299022be8ce5d0a9720509250250" - head "http://hg.code.sf.net/p/graphicsmagick/code", :using => :hg - - bottle do - sha256 "e5517b416b979debeafdf4fc7a408e09f77c2a8f93b76051d6707f2a6750d0c2" => :catalina - sha256 "26ba769c14c9ab3b4de02afcb3735b4f1256f23e822166934152c68939508245" => :mojave - sha256 "8d27e0e2ee2ce56c77a65d691ae893b1ac4ec38e62ee78111964023800756ac5" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "jasper" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "libtool" - depends_on "little-cms2" - depends_on "webp" - - uses_from_macos "bzip2" - uses_from_macos "libxml2" - uses_from_macos "zlib" - - skip_clean :la - - def install - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --disable-openmp - --disable-static - --enable-shared - --with-modules - --with-quantum-depth=16 - --without-lzma - --without-x - --without-gslib - --with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts - --without-wmf - ] - - # versioned stuff in main tree is pointless for us - inreplace "configure", "${PACKAGE_NAME}-${PACKAGE_VERSION}", "${PACKAGE_NAME}" - system "./configure", *args - system "make", "install" - end - - test do - fixture = test_fixtures("test.png") - assert_match "PNG 8x8+0+0", shell_output("#{bin}/gm identify #{fixture}") - end -end diff --git a/Formula/graphite2.rb b/Formula/graphite2.rb deleted file mode 100644 index 9ab3501b16ef2..0000000000000 --- a/Formula/graphite2.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Graphite2 < Formula - desc "Smart font renderer for non-Roman scripts" - homepage "https://graphite.sil.org/" - url "https://github.com/silnrsi/graphite/releases/download/1.3.14/graphite2-1.3.14.tgz" - sha256 "f99d1c13aa5fa296898a181dff9b82fb25f6cc0933dbaa7a475d8109bd54209d" - head "https://github.com/silnrsi/graphite.git" - - bottle do - cellar :any - sha256 "0831f474c920b66bbeab3f93a91fa019b82bfffcdd40e369fdab76372700e980" => :catalina - sha256 "2f3abb971be03141e9eea54b87c6861d72865bd76fde73ae3161d64c40d51cd9" => :mojave - sha256 "62e39dce0ae0440ac164edaab6e1351520bc5414ad509fc0b8d5c890500785bd" => :high_sierra - end - - depends_on "cmake" => :build - - resource "testfont" do - url "https://scripts.sil.org/pub/woff/fonts/Simple-Graphite-Font.ttf" - sha256 "7e573896bbb40088b3a8490f83d6828fb0fd0920ac4ccdfdd7edb804e852186a" - end - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - resource("testfont").stage do - shape = shell_output("#{bin}/gr2fonttest Simple-Graphite-Font.ttf 'abcde'") - assert_match /67.*36.*37.*38.*71/m, shape - end - end -end diff --git a/Formula/graphql-cli.rb b/Formula/graphql-cli.rb deleted file mode 100644 index 1c89b36db10b8..0000000000000 --- a/Formula/graphql-cli.rb +++ /dev/null @@ -1,62 +0,0 @@ -require "language/node" - -class GraphqlCli < Formula - desc "Command-line tool for common GraphQL development workflows" - homepage "https://github.com/Urigo/graphql-cli" - url "https://registry.npmjs.org/graphql-cli/-/graphql-cli-4.0.0.tgz" - sha256 "1517777bc00b35f3ca3cc7a5a0a639ee9562871e4f4ac3b67143cabc0b4e2222" - license "MIT" - - bottle do - sha256 "5ecb75b7aa2887d2a7e81fe08b3cb18cb62e0dfe38d57eaa2cfa7fd636dab625" => :catalina - sha256 "a9c8667aebd1344a6bfb265180054a6e063122da8a567fc62d54f05cd62f5ab9" => :mojave - sha256 "be04819e9354a609deb3e075510e324eb5c7520d43eafc1b589ea03da487a3b0" => :high_sierra - end - - depends_on "node" - - uses_from_macos "expect" => :test - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - - # Avoid references to Homebrew shims - rm_f "#{libexec}/lib/node_modules/graphql-cli/node_modules/websocket/builderror.log" - end - - test do - script = (testpath/"test.sh") - script.write <<~EOS - #!/usr/bin/env expect -f - set timeout -1 - - spawn #{bin}/graphql init - - expect -exact "? What is the type of the project?" - send -- "1\r" - - expect -exact "Select the best option for you" - send -- "1\r" - - expect -exact "? What is the name of the project?" - send -- "brew\r" - - expect -exact "? Which template do you want to start with your new Full Stack project?" - send -- "1\r" - expect -exact "? Do you want to have GraphQL Inspector tools for your frontend?" - send -- "Y\r" - expect -exact "? Do you want to have GraphQL Inspector tools for your backend?" - send -- "Y\r" - - expect eof - EOS - - script.chmod 0700 - system "./test.sh" - - assert_predicate testpath/"Full Stack", :exist? - assert_predicate testpath/"brew", :exist? - assert_match "full-stack-template", File.read(testpath/"brew/package.json") - end -end diff --git a/Formula/graphviz.rb b/Formula/graphviz.rb deleted file mode 100644 index 46e8e2e8f9acb..0000000000000 --- a/Formula/graphviz.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Graphviz < Formula - desc "Graph visualization software from AT&T and Bell Labs" - homepage "https://www.graphviz.org/" - license "EPL-1.0" - version_scheme 1 - - stable do - url "https://www2.graphviz.org/Packages/stable/portable_source/graphviz-2.44.0.tar.gz" - sha256 "9aabd13a8018b708ab3c822de2326c19d0a52ed59f50a6b0f9318c07e2a6d93b" - - # Fix compile on macOS. - # Remove with the next release. - patch do - url "https://gitlab.com/graphviz/graphviz/-/commit/4b9079d9fc8634961d146609a420d674225dbe95.diff" - sha256 "689b54eda5b19e92cd51322c874116b46aa76c5f1b43cf9869fd7c5a2b771f0f" - end - end - - bottle do - sha256 "b7622910804f75702b6124ed0a376f7d4f1c8aaa8dde38601549bb4c9a84589b" => :catalina - sha256 "cadbefa8657abfbc63d66827ca1492226d10fc6fdba9276f41e62be3b9434ba2" => :mojave - sha256 "c3b0269db2fb418c0e1b7413f10e0bec2d4f69485cfda484e8acf99cb1b86a54" => :high_sierra - end - - head do - url "https://gitlab.com/graphviz/graphviz.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "gd" - depends_on "gts" - depends_on "libpng" - depends_on "libtool" - depends_on "pango" - - uses_from_macos "flex" => :build - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --disable-php - --disable-swig - --with-quartz - --without-freetype2 - --without-qt - --without-x - --with-gts - ] - - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end - system "make", "install" - - (bin/"gvmap.sh").unlink - end - - test do - (testpath/"sample.dot").write <<~EOS - digraph G { - a -> b - } - EOS - - system "#{bin}/dot", "-Tpdf", "-o", "sample.pdf", "sample.dot" - end -end diff --git a/Formula/gravity.rb b/Formula/gravity.rb deleted file mode 100644 index 6d0c1613dc9b4..0000000000000 --- a/Formula/gravity.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Gravity < Formula - desc "The Gravity Programming Language" - homepage "https://marcobambini.github.io/gravity/" - url "https://github.com/marcobambini/gravity/archive/0.7.8.tar.gz" - sha256 "d6589e1cf55eb3b46e205342cb8c01d524da66b98b6fabe0785c711ec314969d" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "a98efa44c0d6442beabb0b95efb8d404d81b982d5f6cd41225bbf64dede0f5be" => :catalina - sha256 "05f4fba3adf2677631c67980a296f0d43c733221532853f42daef08348627bcb" => :mojave - sha256 "3ee168dfc2cf1397868dbd520bf2b89f04286394f354a86dad602e58c4d9f15a" => :high_sierra - end - - def install - system "make" - bin.install "gravity" - doc.install Dir["docs/*"] - end - - test do - (testpath/"hello.gravity").write <<~EOS - func main() { - System.print("Hello World!") - } - EOS - system bin/"gravity", "-c", "hello.gravity", "-o", "out.json" - assert_equal "Hello World!\n", shell_output("#{bin}/gravity -q -x out.json") - assert_equal "Hello World!\n", shell_output("#{bin}/gravity -q hello.gravity") - end -end diff --git a/Formula/grc.rb b/Formula/grc.rb deleted file mode 100644 index 787229d40efba..0000000000000 --- a/Formula/grc.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Grc < Formula - include Language::Python::Shebang - - desc "Colorize logfiles and command output" - homepage "https://korpus.juls.savba.sk/~garabik/software/grc.html" - url "https://github.com/garabik/grc/archive/v1.11.3.tar.gz" - sha256 "b167babd8f073a68f5a3091f833e4036fb8d86504e746694747a3ee5048fa7a9" - revision 1 - head "https://github.com/garabik/grc.git" - - bottle :unneeded - - depends_on "python@3.8" - - conflicts_with "cc65", :because => "both install `grc` binaries" - - def install - # fix non-standard prefix installs - inreplace ["grc", "grc.1"], "/etc", etc - inreplace ["grcat", "grcat.1"], "/usr/local", HOMEBREW_PREFIX - - # so that the completions don't end up in etc/profile.d - inreplace "install.sh", - "mkdir -p $PROFILEDIR\ncp -fv grc.bashrc $PROFILEDIR", "" - - rewrite_shebang detected_python_shebang, "grc", "grcat" - - system "./install.sh", prefix, HOMEBREW_PREFIX - etc.install "grc.bashrc" - etc.install "grc.zsh" - etc.install "grc.fish" - zsh_completion.install "_grc" - end - - # Apply the upstream fix from garabik/grc@ddc789bf to preexisting config files - def post_install - grc_bashrc = etc/"grc.bashrc" - bad = /^ alias ls='colourify ls --color'$/ - inreplace grc_bashrc, bad, " alias ls='colourify ls'" if grc_bashrc.exist? && File.read(grc_bashrc) =~ bad - end - - test do - actual = pipe_output("#{bin}/grcat #{pkgshare}/conf.ls", "hello root") - assert_equal "\e[0mhello \e[0m\e[1m\e[37m\e[41mroot\e[0m", actual.chomp - end -end diff --git a/Formula/greed.rb b/Formula/greed.rb deleted file mode 100644 index 7819f577d9f63..0000000000000 --- a/Formula/greed.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Greed < Formula - desc "Game of consumption" - homepage "http://www.catb.org/~esr/greed/" - url "http://www.catb.org/~esr/greed/greed-4.2.tar.gz" - sha256 "702bc0314ddedb2ba17d4b55d873384a1606886e8d69f35ce67f6e3024a8d3fd" - head "https://gitlab.com/esr/greed.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "64d0028754d683a8bbe1de0bb1a7319dcf6d8020c6d3624e58df5b5be3bf4e42" => :catalina - sha256 "9cba951e4fd73d29a1e4899a4f2a7d5f0158f6f5b6d02bb75837c7296530e65c" => :mojave - sha256 "9685dcc52ad08b19964cfb61f4fd0d9e28ec0d42cde2f112da4e9be1e1d15b5b" => :high_sierra - end - - def install - # Handle hard-coded destination - inreplace "Makefile", "/usr/share/man/man6", man6 - # Make doesn't make directories - bin.mkpath - man6.mkpath - (var/"greed").mkpath - # High scores will be stored in var/greed - system "make", "SFILE=#{var}/greed/greed.hs" - system "make", "install", "BIN=#{bin}" - end - - def caveats - <<~EOS - High scores will be stored in the following location: - #{var}/greed/greed.hs - EOS - end - - test do - assert_predicate bin/"greed", :executable? - end -end diff --git a/Formula/grep.rb b/Formula/grep.rb deleted file mode 100644 index a1ed7e306600d..0000000000000 --- a/Formula/grep.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Grep < Formula - desc "GNU grep, egrep and fgrep" - homepage "https://www.gnu.org/software/grep/" - url "https://ftp.gnu.org/gnu/grep/grep-3.4.tar.xz" - mirror "https://ftpmirror.gnu.org/grep/grep-3.4.tar.xz" - sha256 "58e6751c41a7c25bfc6e9363a41786cff3ba5709cf11d5ad903cf7cce31cc3fb" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "52fb744dfc1f2766b41d90bc4126bc6101663d12c3e31446719ef723b7883266" => :catalina - sha256 "cbce0c10ed3edc352347287ec36a8a199bb7649892943a6948e4dbe4127e83ac" => :mojave - sha256 "bcc9802f916e1db94b2879ff66b058d42142b391bfbc2002fd1fb13fd9e4c8ca" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "pcre" - - def install - args = %W[ - --disable-dependency-tracking - --disable-nls - --prefix=#{prefix} - --infodir=#{info} - --mandir=#{man} - --with-packager=Homebrew - --program-prefix=g - ] - - system "./configure", *args - system "make" - system "make", "install" - - %w[grep egrep fgrep].each do |prog| - (libexec/"gnubin").install_symlink bin/"g#{prog}" => prog - (libexec/"gnuman/man1").install_symlink man1/"g#{prog}.1" => "#{prog}.1" - end - - libexec.install_symlink "gnuman" => "man" - 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" - EOS - end - - test do - text_file = testpath/"file.txt" - text_file.write "This line should be matched" - - grepped = shell_output("#{bin}/ggrep match #{text_file}") - assert_match "should be matched", grepped - - grepped = shell_output("#{opt_libexec}/gnubin/grep match #{text_file}") - assert_match "should be matched", grepped - end -end diff --git a/Formula/grepcidr.rb b/Formula/grepcidr.rb deleted file mode 100644 index 335f82b92525a..0000000000000 --- a/Formula/grepcidr.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Grepcidr < Formula - desc "Filter IP addresses matching IPv4 CIDR/network specification" - homepage "http://www.pc-tools.net/unix/grepcidr/" - url "http://www.pc-tools.net/files/unix/grepcidr-2.0.tar.gz" - sha256 "61886a377dabf98797145c31f6ba95e6837b6786e70c932324b7d6176d50f7fb" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "29222220edfad5ce8db2a197f1e0a3fe1d703a62338c5dc8d28ed8ce47afe987" => :catalina - sha256 "195665f1f4647ec6ee1f43830cd21079413fc8c1df4dce5e869891d402791488" => :mojave - sha256 "7266be7b9262d50ab08d63529cf9858764573784ab63918010454ec2d76363b6" => :high_sierra - sha256 "12dfa49026bffb77ed1c4a08e9b60b56859eb183bbf791754d0b1d476ba6d795" => :sierra - sha256 "31ccf6792cab3c5022530ef4576ea53e6dedd4855b939d11212fea0d7fa294dc" => :el_capitan - sha256 "d0024b81610b4a698de415aef87958e2a61f74a9f1f2b7acf875f2f3d50ecc05" => :yosemite - sha256 "c4ed3ba91b4acd41f51850b143ea9826275b221fc8f041098dfe5f5a429a0289" => :mavericks - end - - def install - system "make" - bin.install "grepcidr" - man1.install "grepcidr.1" - end - - test do - (testpath/"access.log").write <<~EOS - 127.0.0.1 duck - 8.8.8.8 duck - 66.249.64.123 goose - 192.168.0.1 duck - EOS - - output = shell_output("#{bin}/grepcidr 66.249.64.0/19 access.log") - assert_equal "66.249.64.123 goose", output.strip - end -end diff --git a/Formula/grex.rb b/Formula/grex.rb deleted file mode 100644 index 871d009d19ff9..0000000000000 --- a/Formula/grex.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Grex < Formula - desc "Command-line tool for generating regular expressions" - homepage "https://github.com/pemistahl/grex" - url "https://github.com/pemistahl/grex/archive/v1.1.0.tar.gz" - sha256 "52a9d5ddc15c7fb227c87147d991bfabe2aae1fbef8169893a9111dcd3aa641f" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a6a2e903b81404d8637492fdbdea4bd2bafc5b9e2ead89e565ed64ca27a8a9ad" => :catalina - sha256 "add77eeff9facb30f56b579ab893bcfafcae43699e629b3780f67b560fb59ad2" => :mojave - sha256 "b09e46aabadbb7742e60b942386f994795fcfca48a2834b2dbc4bc7fdb500dcc" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - output = shell_output("#{bin}/grex a b c") - assert_match "^[a-c]$\n", output - end -end diff --git a/Formula/griffon.rb b/Formula/griffon.rb deleted file mode 100644 index 8aeb367e267ff..0000000000000 --- a/Formula/griffon.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Griffon < Formula - desc "Application framework for desktop applications in the JVM" - homepage "http://griffon-framework.org/" - url "https://dl.bintray.com/content/aalmiray/Griffon/griffon-1.5.0-bin.tgz" - sha256 "3f7868e8d86f10e4a5a9139661465a0b89f2646ef93a553b9bdfb625356ef876" - - bottle :unneeded - - def install - rm_f Dir["bin/*.bat"] - libexec.install Dir["*"] - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - def caveats - <<~EOS - You should set the environment variable GRIFFON_HOME to: - #{libexec} - EOS - end - - test do - system "#{bin}/griffon", "--version" - end -end diff --git a/Formula/grin-wallet.rb b/Formula/grin-wallet.rb deleted file mode 100644 index 4ac367811dc9d..0000000000000 --- a/Formula/grin-wallet.rb +++ /dev/null @@ -1,28 +0,0 @@ -class GrinWallet < Formula - desc "Official wallet for the cryptocurrency Grin" - homepage "https://grin.mw/" - url "https://github.com/mimblewimble/grin-wallet/archive/v4.0.0.tar.gz" - sha256 "b31e7e0271c7c821c66153fbc2b70aa7db365309a5460fde9dc004a5dcc72986" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "99c3c710cca324b279b9f53db6687c5f35dceb1a7fab99e6da08734f1f14fb64" => :catalina - sha256 "9527840eae34a19dc485a2f13fe0d0422429f08e2352267a637a41b5bf31bf1d" => :mojave - sha256 "c9f755928079e4d3073e5f80071b2d7a860b3f0daaf44abd0e0d5c1c1c106cab" => :high_sierra - end - - depends_on "llvm" => :build # for libclang - depends_on "rust" => :build - - def install - ENV["CLANG_PATH"] = Formula["llvm"].opt_bin/"clang" - - system "cargo", "install", *std_cargo_args - end - - test do - system "yes | #{bin}/grin-wallet init" - assert_predicate testpath/".grin/main/wallet_data/wallet.seed", :exist? - end -end diff --git a/Formula/grin.rb b/Formula/grin.rb deleted file mode 100644 index e8c744283d8c7..0000000000000 --- a/Formula/grin.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Grin < Formula - desc "Minimal implementation of the Mimblewimble protocol" - homepage "https://grin.mw/" - url "https://github.com/mimblewimble/grin/archive/v4.0.0.tar.gz" - sha256 "0ed64bea377199544b3d41560c9a72f7914434b32f97fe0221b5e43719121845" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "6853b963721e30472a1d939c87d373dd150b8d55eb73712c51b99d883a85d34a" => :catalina - sha256 "87e605492972be68df5d540b630dfb343177aab67078fe9b878717c0d7288785" => :mojave - sha256 "334ee1dc41d566f07bc38a0506857f3b34cb8d2e2512d437b13dd39bf23bebd3" => :high_sierra - end - - depends_on "llvm" => :build # for libclang - depends_on "rust" => :build - - def install - ENV["CLANG_PATH"] = Formula["llvm"].opt_bin/"clang" - - system "cargo", "install", *std_cargo_args - end - - test do - system "#{bin}/grin", "server", "config" - assert_predicate testpath/"grin-server.toml", :exist? - end -end diff --git a/Formula/grip.rb b/Formula/grip.rb deleted file mode 100644 index 24653fe25e02c..0000000000000 --- a/Formula/grip.rb +++ /dev/null @@ -1,102 +0,0 @@ -class Grip < Formula - include Language::Python::Virtualenv - - desc "GitHub Markdown previewer" - homepage "https://github.com/joeyespo/grip" - url "https://files.pythonhosted.org/packages/3c/ea/2a475ed37e1b6476182e71223c98667f51704bdbc919608372b203c7ea04/grip-4.5.2.tar.gz" - sha256 "048b7e5c738ed80bee345bd10840f27eb31687eb67132b40f2473dc1cf67aa0f" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "f3af5ab0c40d11f8fcbd2dec4dcbadca3b24d0eef5c3626484601ec8d98ddb20" => :catalina - sha256 "4f3bef6a20d2693b4a816dba62d2bba912f8d92163a65b0aadbf68479627f040" => :mojave - sha256 "820f10c78b49556e81eb7680fa9c0129b666a76bdc8316bbeab14f40a71601ca" => :high_sierra - end - - depends_on "python@3.8" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - end - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "Flask" do - url "https://files.pythonhosted.org/packages/4e/0b/cb02268c90e67545a0e3a37ea1ca3d45de3aca43ceb7dbf1712fb5127d5d/Flask-1.1.2.tar.gz" - sha256 "4efa1ae2d7c9865af48986de8aeb8504bf32c7f3d6fdc9353d34b21f4b127060" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "itsdangerous" do - url "https://files.pythonhosted.org/packages/68/1a/f27de07a8a304ad5fa817bbe383d1238ac4396da447fa11ed937039fa04b/itsdangerous-1.1.0.tar.gz" - sha256 "321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/d8/03/e491f423379ea14bb3a02a5238507f7d446de639b623187bccc111fbecdf/Jinja2-2.11.1.tar.gz" - sha256 "93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250" - end - - resource "Markdown" do - url "https://files.pythonhosted.org/packages/98/79/ce6984767cb9478e6818bd0994283db55c423d733cc62a88a3ffb8581e11/Markdown-3.2.1.tar.gz" - sha256 "90fee683eeabe1a92e149f7ba74e5ccdc81cd397bd6c516d93a8da0ef90b6902" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "path-and-address" do - url "https://files.pythonhosted.org/packages/2b/b5/749fab14d9e84257f3b0583eedb54e013422b6c240491a4ae48d9ea5e44f/path-and-address-2.0.1.zip" - sha256 "e96363d982b3a2de8531f4cd5f086b51d0248b58527227d43cf5014d045371b7" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - end - - resource "Werkzeug" do - url "https://files.pythonhosted.org/packages/10/27/a33329150147594eff0ea4c33c2036c0eadd933141055be0ff911f7f8d04/Werkzeug-1.0.1.tar.gz" - sha256 "6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match "Homebrew is awesome", - pipe_output("#{bin}/grip - --export -", "**Homebrew** is awesome.") - end -end diff --git a/Formula/groff.rb b/Formula/groff.rb deleted file mode 100644 index 2826a5dfa455a..0000000000000 --- a/Formula/groff.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Groff < Formula - desc "GNU troff text-formatting system" - homepage "https://www.gnu.org/software/groff/" - url "https://ftp.gnu.org/gnu/groff/groff-1.22.4.tar.gz" - mirror "https://ftpmirror.gnu.org/groff/groff-1.22.4.tar.gz" - sha256 "e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1bad0293" - license "GPL-3.0" - - bottle do - sha256 "a7c425eec2e56f10e06978b393c0cf53269d27f20e801856fd6d2ba91df81136" => :catalina - sha256 "1ee2ce419f4d59f098f0804e1dea42524ef72a88b69ce891c42f13d5f19be5f9" => :mojave - sha256 "24fac4b672946970b70c6e308311e87a6686fed50d4d0909228afb252531065d" => :high_sierra - sha256 "2966f4b562c30eb6679d6940b43f4b99b2b625433e6a218489f160eb76c7c360" => :sierra - end - - def install - system "./configure", "--prefix=#{prefix}", "--without-x" - system "make" # Separate steps required - system "make", "install" - end - - test do - assert_match "homebrew\n", - pipe_output("#{bin}/groff -a", "homebrew\n") - end -end diff --git a/Formula/grok.rb b/Formula/grok.rb deleted file mode 100644 index 34ce53feaf203..0000000000000 --- a/Formula/grok.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Grok < Formula - desc "Powerful pattern-matching/reacting too" - homepage "https://github.com/jordansissel/grok" - url "https://github.com/jordansissel/grok/archive/v0.9.2.tar.gz" - sha256 "40edbdba488ff9145832c7adb04b27630ca2617384fbef2af014d0e5a76ef636" - license "BSD-2-Clause" - revision 2 - head "https://github.com/jordansissel/grok.git" - - bottle do - cellar :any - sha256 "8e3f44420143e731799d52290c9823a42a1833c4bc51906af59d4cd7c284f391" => :catalina - sha256 "b78cf21dd67826d14d99188e631ff1c431913744d91089c4cefd9b3c9e9d9a46" => :mojave - sha256 "41889afb55bfcf1d8b41eda76ef2272d29225f4cc4a5690bd409198417d7cf98" => :high_sierra - sha256 "32dc46849684918dad9ca9005ca43b092de84b16a0837049146948379301b1fa" => :sierra - end - - depends_on "libevent" - depends_on "pcre" - depends_on "tokyo-cabinet" - - def install - # Race condition in generating grok_capture_xdr.h - ENV.deparallelize - system "make", "grok" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system bin/"grok", "-h" - end -end diff --git a/Formula/gromacs.rb b/Formula/gromacs.rb deleted file mode 100644 index fb2c2864318e1..0000000000000 --- a/Formula/gromacs.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Gromacs < Formula - desc "Versatile package for molecular dynamics calculations" - homepage "http://www.gromacs.org/" - url "https://ftp.gromacs.org/pub/gromacs/gromacs-2020.2.tar.gz" - sha256 "7465e4cd616359d84489d919ec9e4b1aaf51f0a4296e693c249e83411b7bd2f3" - revision 1 - - bottle do - sha256 "58dd207377d3cdaad5a162134e113be0bd2efa225c202089d7ef1863cef8f93b" => :catalina - sha256 "d3f15cda513906fd9a57832d15e8fecd0627b31e984b7f15981cb57d8f3e40b2" => :mojave - sha256 "3617784ee60e87999f305b2530cd5e83ad89db13049e947c597fa1927ab3eae9" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "fftw" - depends_on "gcc" # for OpenMP - depends_on "openblas" - - def install - # Non-executable GMXRC files should be installed in DATADIR - inreplace "scripts/CMakeLists.txt", "CMAKE_INSTALL_BINDIR", - "CMAKE_INSTALL_DATADIR" - - # Avoid superenv shim reference - inreplace "src/gromacs/gromacs-toolchain.cmake.cmakein", "@CMAKE_LINKER@", - "/usr/bin/ld" - - args = std_cmake_args + %W[ - -DCMAKE_C_COMPILER=gcc-#{Formula["gcc"].version_suffix} - -DCMAKE_CXX_COMPILER=g++-#{Formula["gcc"].version_suffix} - ] - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - - bash_completion.install "build/scripts/GMXRC" => "gromacs-completion.bash" - bash_completion.install "#{bin}/gmx-completion-gmx.bash" => "gmx-completion-gmx.bash" - bash_completion.install "#{bin}/gmx-completion.bash" => "gmx-completion.bash" - zsh_completion.install "build/scripts/GMXRC.zsh" => "_gromacs" - end - - def caveats - <<~EOS - GMXRC and other scripts installed to: - #{HOMEBREW_PREFIX}/share/gromacs - EOS - end - - test do - system "#{bin}/gmx", "help" - end -end diff --git a/Formula/gron.rb b/Formula/gron.rb deleted file mode 100644 index ff97041fbce5b..0000000000000 --- a/Formula/gron.rb +++ /dev/null @@ -1,62 +0,0 @@ -require "language/go" - -class Gron < Formula - desc "Make JSON greppable" - homepage "https://github.com/tomnomnom/gron" - url "https://github.com/tomnomnom/gron/archive/v0.6.0.tar.gz" - sha256 "fe75b1b4922b591723f48cb9cd2c31cb60bb3ab9f8d0398df75a08b781d8591c" - license "MIT" - head "https://github.com/tomnomnom/gron.git" - - bottle do - cellar :any_skip_relocation - sha256 "a7851170e1feed7c87430f7af735f193cf295b5a4116d0f177296dd8fb000815" => :catalina - sha256 "8250d3b6d9acc5bf1700a6513ab9df0df1a3e5660d2f984a4a903c234e6cd555" => :mojave - sha256 "7838ab1c751a11027f31b7b4dac4f7a83402b04a7eef522edeb15735846dfd81" => :high_sierra - sha256 "fa5310f4ac25091387f24e5dd4bb0364db432ebc9f3273da371cbd35116af09e" => :sierra - sha256 "23c3378ea69d5936b6966608942a0769c4adad0cdeabb9575e8b811b9b6c3a26" => :el_capitan - end - - depends_on "go" => :build - - go_resource "github.com/fatih/color" do - url "https://github.com/fatih/color.git", - :revision => "2d684516a8861da43017284349b7e303e809ac21" - end - - go_resource "github.com/mattn/go-colorable" do - url "https://github.com/mattn/go-colorable.git", - :revision => "efa589957cd060542a26d2dd7832fd6a6c6c3ade" - end - - go_resource "github.com/mattn/go-isatty" do - url "https://github.com/mattn/go-isatty.git", - :revision => "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c" - end - - go_resource "github.com/nwidger/jsoncolor" do - url "https://github.com/nwidger/jsoncolor.git", - :revision => "75a6de4340e59be95f0884b9cebdda246e0fdf40" - end - - go_resource "github.com/pkg/errors" do - url "https://github.com/pkg/errors.git", - :revision => "816c9085562cd7ee03e7f8188a1cfd942858cded" - end - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/tomnomnom").mkpath - ln_s buildpath, buildpath/"src/github.com/tomnomnom/gron" - Language::Go.stage_deps resources, buildpath/"src" - system "go", "build", "-o", bin/"gron" - end - - test do - assert_equal <<~EOS, pipe_output("#{bin}/gron", "{\"foo\":1, \"bar\":2}") - json = {}; - json.bar = 2; - json.foo = 1; - EOS - end -end diff --git a/Formula/groonga.rb b/Formula/groonga.rb deleted file mode 100644 index 8003afdbbd696..0000000000000 --- a/Formula/groonga.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Groonga < Formula - desc "Fulltext search engine and column store" - homepage "https://groonga.org/" - url "https://packages.groonga.org/source/groonga/groonga-10.0.4.tar.gz" - sha256 "32d3c98978030b165aa7ff0e8d8e44635775fe6afc8264712f2e210c25dec9bd" - license "LGPL-2.1" - - bottle do - sha256 "68d49909d9cdc88a23eb50dc4e5e02d7d646b99f609a5f98e5d71685df38ad8c" => :catalina - sha256 "8d5c63880dda507eecf1affccd11082c79b062605fa3166859a36b24755e3636" => :mojave - sha256 "28e2ff2fd38e7cb84ad05a1872ad646d8783aa48663de3d5d7702ac70ae3dd58" => :high_sierra - end - - head do - url "https://github.com/groonga/groonga.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "mecab" - depends_on "mecab-ipadic" - depends_on "msgpack" - depends_on "openssl@1.1" - depends_on "pcre" - - link_overwrite "lib/groonga/plugins/normalizers/" - link_overwrite "share/doc/groonga-normalizer-mysql/" - link_overwrite "lib/pkgconfig/groonga-normalizer-mysql.pc" - - resource "groonga-normalizer-mysql" do - url "https://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-1.1.4.tar.gz" - sha256 "084a74742ba7cf396c617354fa58d691b0c22e1c5d1ddfc3722123d7161fcd96" - end - - def install - args = %W[ - --prefix=#{prefix} - --disable-zeromq - --enable-mruby - --with-ssl - --with-zlib - --without-libstemmer - --with-mecab - ] - - if build.head? - args << "--with-ruby" - system "./autogen.sh" - end - - system "./configure", *args - system "make", "install" - - resource("groonga-normalizer-mysql").stage do - ENV.prepend_path "PATH", bin - ENV.prepend_path "PKG_CONFIG_PATH", lib/"pkgconfig" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - end - - test do - IO.popen("#{bin}/groonga -n #{testpath}/test.db", "r+") do |io| - io.puts("table_create --name TestTable --flags TABLE_HASH_KEY --key_type ShortText") - sleep 2 - io.puts("shutdown") - # expected returned result is like this: - # [[0,1447502555.38667,0.000824928283691406],true]\n - assert_match(/\[\[0,\d+.\d+,\d+.\d+\],true\]/, io.read) - end - - IO.popen("#{bin}/groonga -n #{testpath}/test-normalizer-mysql.db", "r+") do |io| - io.puts "register normalizers/mysql" - sleep 2 - io.puts("shutdown") - # expected returned result is like this: - # [[0,1447502555.38667,0.000824928283691406],true]\n - assert_match(/\[\[0,\d+.\d+,\d+.\d+\],true\]/, io.read) - end - end -end diff --git a/Formula/groovy.rb b/Formula/groovy.rb deleted file mode 100644 index 51a4b2854e345..0000000000000 --- a/Formula/groovy.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Groovy < Formula - desc "Java-based scripting language" - homepage "https://www.groovy-lang.org/" - url "https://dl.bintray.com/groovy/maven/apache-groovy-binary-3.0.4.zip" - sha256 "eba1dc30ed0ceeefe56eba6e79cf43c2ae164eea6e407fd7a79f6c434a667146" - - bottle :unneeded - - depends_on "openjdk" - - conflicts_with "groovysdk", :because => "both install the same binaries" - - def install - # Don't need Windows files. - rm_f Dir["bin/*.bat"] - - libexec.install "bin", "conf", "lib" - bin.install Dir["#{libexec}/bin/*"] - ["#{libexec}/bin/groovy.ico"] - bin.env_script_all_files libexec/"bin", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - end - - def caveats - <<~EOS - You should set GROOVY_HOME: - export GROOVY_HOME=#{opt_libexec} - EOS - end - - test do - system "#{bin}/grape", "install", "org.activiti", "activiti-engine", "5.16.4" - end -end diff --git a/Formula/groovysdk.rb b/Formula/groovysdk.rb deleted file mode 100644 index a0b12b196d5fd..0000000000000 --- a/Formula/groovysdk.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Groovysdk < Formula - desc "SDK for Groovy: a Java-based scripting language" - homepage "https://www.groovy-lang.org/" - url "https://dl.bintray.com/groovy/maven/apache-groovy-sdk-3.0.4.zip" - sha256 "3b7c2b05bd01017096d027ac17abacc8dcd855a89582ec53a62f56de899fd230" - - bottle :unneeded - - depends_on "openjdk" - - conflicts_with "groovy", :because => "both install the same binaries" - - def install - # We don't need Windows' files. - rm_f Dir["bin/*.bat"] - - prefix.install_metafiles - bin.install Dir["bin/*"] - libexec.install "conf", "lib", "src", "doc" - bin.env_script_all_files libexec/"bin", - :GROOVY_HOME => libexec, - :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - end - - test do - system "#{bin}/grape", "install", "org.activiti", "activiti-engine", "5.16.4" - end -end diff --git a/Formula/groovyserv.rb b/Formula/groovyserv.rb deleted file mode 100644 index 64182841623d9..0000000000000 --- a/Formula/groovyserv.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Groovyserv < Formula - desc "Speed up Groovy startup time" - homepage "https://kobo.github.io/groovyserv/" - url "https://bitbucket.org/kobo/groovyserv-mirror/downloads/groovyserv-1.2.0-src.zip" - sha256 "235b38c6bb70721fa41b2c2cc6224eeaac09721e4d04b504148b83c40ea0bb27" - - bottle do - cellar :any_skip_relocation - sha256 "4f132f1b743be47df84dc7b581b86951379598b3ae260701259e784c516b1a6a" => :catalina - sha256 "576129ad3f5db66baf931af66b60c8c41b0e91929bcbd16c4e05d1ed710415fe" => :mojave - sha256 "30825c3d2f95214cf8e06fbec819f5b3d1ed87f7b5f0dd1c588525dafaf12c41" => :high_sierra - sha256 "43388a03d5e69fd6fe8377f8ac51fdfa00ffe0e0276a60f8c7ff2934ab32e2b0" => :sierra - sha256 "51aef6e15608021ae127aaa93e2aa39bfaf52cfea688b45841d315b6a04b55aa" => :el_capitan - end - - depends_on "go" => :build - depends_on "groovy" - depends_on :java => "1.8" - - def install - # Sandbox fix to stop it ignoring our temporary $HOME variable. - ENV["GRADLE_USER_HOME"] = buildpath/".brew_home" - system "./gradlew", "clean", "distLocalBin" - system "unzip", "build/distributions/groovyserv-#{version}-bin-local.zip" - libexec.install Dir["groovyserv-#{version}/{bin,lib}"] - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - end - - test do - system bin/"groovyserver", "--help" - end -end diff --git a/Formula/growly.rb b/Formula/growly.rb deleted file mode 100644 index 4054aa20ab955..0000000000000 --- a/Formula/growly.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Growly < Formula - desc "Redirect command output to a growl notification" - homepage "https://github.com/ryankee/growly" - url "https://github.com/downloads/ryankee/growly/growly-v0.2.0.tar.gz" - sha256 "3e803207aa15e3a1ee33fc388a073bd84230dce2c579295ce26b857987e78a79" - head "https://github.com/ryankee/growly.git" - - bottle :unneeded - - def install - bin.install "growly" - end - - test do - system "#{bin}/growly", "echo Hello, world!" - end -end diff --git a/Formula/grpc-swift.rb b/Formula/grpc-swift.rb deleted file mode 100644 index 288762df608b9..0000000000000 --- a/Formula/grpc-swift.rb +++ /dev/null @@ -1,43 +0,0 @@ -class GrpcSwift < Formula - desc "The Swift language implementation of gRPC" - homepage "https://github.com/grpc/grpc-swift" - url "https://github.com/grpc/grpc-swift/archive/0.11.0.tar.gz" - sha256 "82e0a3d8fe2b9ee813b918e1a674f5a7c6dc024abe08109a347b686db6e57432" - head "https://github.com/grpc/grpc-swift.git" - - bottle do - cellar :any_skip_relocation - sha256 "c4b65a7ca86cce5a51c4d361f242f3223db64ada30295215636abe6c5e2e6682" => :catalina - sha256 "44d0cea0079f5b8ead3ae00b5ffe0268424c1b9c894d3f84f9b56e9295cfc4d6" => :mojave - sha256 "01f53ec401f366d2eedc15b6bf24221443cf3e4728e25891fa87cd89d389efb2" => :high_sierra - end - - depends_on :xcode => ["10.0", :build] - depends_on "protobuf" - depends_on "swift-protobuf" - - def install - system "swift", "build", "--disable-sandbox", "-c", "release", "--product", "protoc-gen-swiftgrpc" - bin.install ".build/release/protoc-gen-swiftgrpc" - end - - test do - (testpath/"echo.proto").write <<~EOS - 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; - } - EOS - system Formula["protobuf"].opt_bin/"protoc", "echo.proto", "--swiftgrpc_out=." - assert_predicate testpath/"echo.grpc.swift", :exist? - end -end diff --git a/Formula/grpc.rb b/Formula/grpc.rb deleted file mode 100644 index b20d1526094bf..0000000000000 --- a/Formula/grpc.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Grpc < Formula - desc "Next generation open source RPC library and framework" - homepage "https://grpc.io/" - url "https://github.com/grpc/grpc.git", - :tag => "v1.30.0", - :revision => "9655f1f6449dca36312489f9c82560c32050af71", - :shallow => false - license "Apache-2.0" - head "https://github.com/grpc/grpc.git" - - bottle do - sha256 "8f3212ca72a09d11787864d33503116d0527478565f36f666b68b10f6e286173" => :catalina - sha256 "eb609a63758d89d676d8e41e6f2b4a1d9eef0c5e2aeeffa85dc883728c9c79ae" => :mojave - sha256 "990d0b3fa57618f5b19d5ea719bbe1817f8fc17e51e05a8709b097e4acdaa18e" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "c-ares" - depends_on "gflags" - depends_on "openssl@1.1" - depends_on "protobuf" - - resource "gtest" do - url "https://github.com/google/googletest/archive/release-1.10.0.tar.gz" - sha256 "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb" - end - - def install - system "make", "install", "prefix=#{prefix}" - - system "make", "install-plugins", "prefix=#{prefix}" - - (buildpath/"third_party/googletest").install resource("gtest") - system "make", "grpc_cli", "prefix=#{prefix}" - bin.install "bins/opt/grpc_cli" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - grpc_init(); - grpc_shutdown(); - return GRPC_STATUS_OK; - } - EOS - system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lgrpc", "-o", "test" - system "./test" - end -end diff --git a/Formula/grpcui.rb b/Formula/grpcui.rb deleted file mode 100644 index b696c40ec38d5..0000000000000 --- a/Formula/grpcui.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Grpcui < Formula - desc "Interactive web UI for gRPC, along the lines of postman" - homepage "https://github.com/fullstorydev/grpcui" - url "https://github.com/fullstorydev/grpcui/archive/v1.0.0.tar.gz" - sha256 "2169f72d23a5e4caceee3b863220bf6a4b4a15f7d88d5bb0de909ca4299a92df" - - bottle do - cellar :any_skip_relocation - sha256 "a8551ee4ec39d50e8b596a5c7c3b4e8c62371f294937c951aae2f3e40931cb6d" => :catalina - sha256 "e81b5780c4d24c413ad269c6d51ff226a5b7bf929003ced43200870604d01d92" => :mojave - sha256 "c28c396193a02af6efadd816e5dea7d6a648dc178e8411e3a53885f44834619b" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args, "-ldflags", "-X main.version=#{version}", "./cmd/grpcui" - end - - test do - host = "no.such.host.dev" - assert_match "#{host}: no such host", shell_output("#{bin}/grpcui #{host}:999 2>&1", 1) - end -end diff --git a/Formula/grpcurl.rb b/Formula/grpcurl.rb deleted file mode 100644 index 18be65eedecd8..0000000000000 --- a/Formula/grpcurl.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Grpcurl < Formula - desc "Like cURL, but for gRPC" - homepage "https://github.com/fullstorydev/grpcurl" - url "https://github.com/fullstorydev/grpcurl/archive/v1.6.0.tar.gz" - sha256 "5faa9806308730524e8f6e67bc8d5378261814e5b4869dad2c0696e9d8bc8979" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "39d8535ec12e81fb2243eaa28a2bff15c5f1022ed709918eb8d23547ebf11e78" => :catalina - sha256 "38fe5e2ed21bdcbf75aae000c84204a9223ad771e1077873085f6d95b9e6c876" => :mojave - sha256 "3790eff7e7a9d67280e21a243b021e8ca95788076bbc555ef0db0589aa723eea" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - (buildpath/"src/github.com/fullstorydev/grpcurl").install buildpath.children - cd "src/github.com/fullstorydev/grpcurl/cmd" do - system "go", "build", "-ldflags", "-X main.version=#{version}", - "-o", bin/"grpcurl", "./..." - prefix.install_metafiles - end - end - - test do - (testpath/"test.proto").write <<~EOS - syntax = "proto3"; - package test; - message HelloWorld { - string hello_world = 1; - } - EOS - system "#{bin}/grpcurl", "-msg-template", "-proto", "test.proto", "describe", "test.HelloWorld" - end -end diff --git a/Formula/grsync.rb b/Formula/grsync.rb deleted file mode 100644 index 0d216aa9d57a0..0000000000000 --- a/Formula/grsync.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Grsync < Formula - desc "GUI for rsync" - homepage "https://www.opbyte.it/grsync/" - url "https://downloads.sourceforge.net/project/grsync/grsync-1.2.8.tar.gz" - sha256 "94ea5faca67e3df467b5283377af3cb32b2b47631b6a32d38bc7b371209306b1" - license "GPL-2.0" - - bottle do - sha256 "07f40176b0bfb08d3b461fceb2d4e18f249354ef60a57dd550c11c31d26fee6a" => :catalina - sha256 "b0bf1fe191950905e46c81953e93a72c6c6c185c146b1a79d09e388348e1c5f1" => :mojave - sha256 "741b7306a6373fc2d86a416a2def2a06c1fd25ab6b30585755faa8326c497c2b" => :high_sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gtk+" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-unity", - "--prefix=#{prefix}" - - system "make", "install" - end - - test do - # running the executable always produces the GUI, which is undesirable for the test - # so we'll just check if the executable exists - assert_predicate bin/"grsync", :exist? - end -end diff --git a/Formula/grt.rb b/Formula/grt.rb deleted file mode 100644 index 17ef44b79505a..0000000000000 --- a/Formula/grt.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Grt < Formula - desc "The Gesture Recognition Toolkit for real-time machine learning" - homepage "https://nickgillian.com/grt/" - url "https://github.com/nickgillian/grt/archive/v0.2.4.tar.gz" - sha256 "55bcabe7a58916461dc4341758eff2a45bd5b236c263dfe6e58c176c1a7e1ac4" - - bottle do - cellar :any - sha256 "35705ad1d151228e4e8c647cf16fc5b7578b4b777c54e94ebbcc8e19d26bd1f5" => :catalina - sha256 "830332fffbe52f7eb282eca343977fa27e4ae4978bc9f409df264cba5f37e38c" => :mojave - sha256 "d5a55b3a6b4ca75d3ef37ba47f43ed033215e0d9b5f5a26f738e484f3e428667" => :high_sierra - end - - depends_on "cmake" => :build - - def install - cd "build" - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - GRT::GestureRecognitionPipeline pipeline; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lgrt", "-o", "test" - system "./test" - end -end diff --git a/Formula/grunt-cli.rb b/Formula/grunt-cli.rb deleted file mode 100644 index af8d09625f91d..0000000000000 --- a/Formula/grunt-cli.rb +++ /dev/null @@ -1,47 +0,0 @@ -require "language/node" - -class GruntCli < Formula - desc "JavaScript Task Runner" - homepage "https://gruntjs.com/" - url "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.3.2.tgz" - sha256 "3b0a3c2aee71f1cb92984afd3fffa7882cbd40958825313946aa7f2938f67e93" - - bottle do - cellar :any_skip_relocation - sha256 "374df04d2a7da96b2995552308258e637edebd304d09ca2cba49f9106b8324f3" => :catalina - sha256 "738d87cf6f7eb5a0b554980f1e77dc349fa092d34ef20b2f41583442d9249348" => :mojave - sha256 "7df2a65c82959d478c0d384ad5e51046186750e0f744beea06916c663c4ca4eb" => :high_sierra - sha256 "677a92a25a3f7d1a8e6ceeb6b869e4f4d784bbd10a32e37d7f32aa122c1176a4" => :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/"package.json").write <<~EOS - { - "name": "grunt-homebrew-test", - "version": "1.0.0", - "devDependencies": { - "grunt": ">=0.4.0" - } - } - EOS - - (testpath/"Gruntfile.js").write <<~EOS - module.exports = function(grunt) { - grunt.registerTask("default", "Write output to file.", function() { - grunt.file.write("output.txt", "Success!"); - }) - }; - EOS - - system "npm", "install", *Language::Node.local_npm_install_args - system bin/"grunt" - assert_predicate testpath/"output.txt", :exist?, "output.txt was not generated" - end -end diff --git a/Formula/grunt-completion.rb b/Formula/grunt-completion.rb deleted file mode 100644 index 9c03282fdc264..0000000000000 --- a/Formula/grunt-completion.rb +++ /dev/null @@ -1,20 +0,0 @@ -class GruntCompletion < Formula - desc "Bash and Zsh completion for Grunt" - homepage "https://gruntjs.com/" - url "https://github.com/gruntjs/grunt-cli/archive/v1.3.2.tar.gz" - sha256 "c85c4882a53de135d56fba703e35d7b47a89c628382eb5c7d43e250da197502f" - license "MIT" - head "https://github.com/gruntjs/grunt-cli.git" - - bottle :unneeded - - def install - bash_completion.install "completion/bash" => "grunt" - zsh_completion.install "completion/zsh" => "_grunt" - end - - test do - assert_match "-F _grunt_completions", - shell_output("source #{bash_completion}/grunt && complete -p grunt") - end -end diff --git a/Formula/grv.rb b/Formula/grv.rb deleted file mode 100644 index e59b6fa6d2d13..0000000000000 --- a/Formula/grv.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Grv < Formula - desc "Terminal interface for viewing git repositories" - homepage "https://github.com/rgburke/grv" - url "https://github.com/rgburke/grv/releases/download/v0.3.2/grv-0.3.2-src.tar.gz" - sha256 "988788cce5c581531c26df9048e4187440c5ebc9811afd371d565436dfb65d57" - license "GPL-3.0" - head "https://github.com/rgburke/grv.git" - - bottle do - cellar :any - sha256 "47ca79fcad09617a086eddf37627be483b9d6ca9a2436d11acac6754b0d2ce15" => :catalina - sha256 "2f223f7ca56ee01201a05e8660c219a2f70d7ead2c5e4f0dac65f4a9b8cd5941" => :mojave - sha256 "d51249eec72ee11cc90b0d5b4c06e10b77eec0bd7ddf8b53df6d0a0d8a291605" => :high_sierra - sha256 "19f2e8bedb458d0b339160b275e196add00abcca7db92ba141aaccae255bb973" => :sierra - end - - depends_on "cmake" => :build - depends_on "go" => :build - depends_on "pkg-config" => :build - depends_on "ncurses" if DevelopmentTools.clang_build_version >= 1000 - depends_on "readline" - - def install - ENV["GOPATH"] = buildpath - path = buildpath/"src/github.com/rgburke/grv" - path.install buildpath.children - - cd path do - system "make", "build-only" - bin.install "grv" - prefix.install_metafiles - end - end - - test do - ENV["TERM"] = "xterm" - - system "git", "init" - system "git", "commit", "--allow-empty", "-m", "test" - pipe_output("#{bin}/grv -logLevel DEBUG", "''", 0) - - assert_predicate testpath/"grv.log", :exist? - assert_match "Loaded HEAD", File.read(testpath/"grv.log") - end -end diff --git a/Formula/gsar.rb b/Formula/gsar.rb deleted file mode 100644 index 6d15be6c6fd57..0000000000000 --- a/Formula/gsar.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Gsar < Formula - desc "General Search And Replace on files" - homepage "http://tjaberg.com/" - url "http://tjaberg.com/gsar121.zip" - version "1.21" - sha256 "05fb9583c970aba4eb0ffae2763d7482b0697c65fda1632a247a0153d7db65a9" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "be008a03610074b4c66f775ae1802ed214006e6ba21150da886c8f4aa97362a4" => :catalina - sha256 "b357c58535d31278d9b815770aa10e9f7d496849ecf58e131a23ea2182c7cbc3" => :mojave - sha256 "07872ab6e21c22fe0ff901974ff6772d934bebc6f574a8908e6e3600a0fb6fb9" => :high_sierra - sha256 "762262cc0840aa074588b1fbbd534f6b865a44d344628b9dbf36b07dfdef2a9a" => :sierra - sha256 "5cf3fe6d772f95378e2802a6208b8f06524a81b4d881343571dd3af201b69e98" => :el_capitan - sha256 "6e138e63b868dfbd4d16109cabe60f50dc600fd65cbf14cd3926b1b8c2f3e2dc" => :yosemite - sha256 "3911e63bccd5deae4101c7c38a84954ad7e205bda69b3eefcee61a4d46e1df8d" => :mavericks - end - - def install - system "make" - bin.install "gsar" - end - - test do - assert_match "1 occurrence changed", - shell_output("#{bin}/gsar -sCourier -rMonaco #{test_fixtures("test.ps")} new.ps") - end -end diff --git a/Formula/gsasl.rb b/Formula/gsasl.rb deleted file mode 100644 index a0f864e9b9322..0000000000000 --- a/Formula/gsasl.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Gsasl < Formula - desc "SASL library command-line interface" - homepage "https://www.gnu.org/software/gsasl/" - url "https://ftp.gnu.org/gnu/gsasl/gsasl-1.8.1.tar.gz" - mirror "https://ftpmirror.gnu.org/gsasl/gsasl-1.8.1.tar.gz" - sha256 "4dda162a511976bfef14ad1fecd7733719dfd9c361b5d09dc8414ea9d472d8d2" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "964ad480f7fafd04051fe76a288b5f109766ae39e4329b00f1a268b5082b316e" => :catalina - sha256 "ac8236d918eea76cb15f196f5a571aab775ba1381e33d2c222a98114a2d391f6" => :mojave - sha256 "d79efee531f43ebd0019d68f2066fb02f0ab9009ea3b78bddda231b6ddda5a7a" => :high_sierra - end - - depends_on "libgcrypt" - - def install - system "./configure", "--disable-dependency-tracking", - "--with-gssapi-impl=mit", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match /#{version}/, shell_output("#{bin}/gsasl") - end -end diff --git a/Formula/gsettings-desktop-schemas.rb b/Formula/gsettings-desktop-schemas.rb deleted file mode 100644 index 2a8b835b800ea..0000000000000 --- a/Formula/gsettings-desktop-schemas.rb +++ /dev/null @@ -1,49 +0,0 @@ -class GsettingsDesktopSchemas < Formula - desc "GSettings schemas for desktop components" - homepage "https://download.gnome.org/sources/gsettings-desktop-schemas/" - url "https://download.gnome.org/sources/gsettings-desktop-schemas/3.36/gsettings-desktop-schemas-3.36.1.tar.xz" - sha256 "004bdbe43cf8290f2de7d8537e14d8957610ca479a4fa368e34dbd03f03ec9d9" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "ca79e0409fb9d658c9ab2f9e3ecde89e10ef305121b9fa71c909cf3cb098a82a" => :catalina - sha256 "ca79e0409fb9d658c9ab2f9e3ecde89e10ef305121b9fa71c909cf3cb098a82a" => :mojave - sha256 "ca79e0409fb9d658c9ab2f9e3ecde89e10ef305121b9fa71c909cf3cb098a82a" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "glib" - - uses_from_macos "expat" - - def install - ENV["DESTDIR"] = "/" - - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - def post_install - # manual schema compile step - system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - return 0; - } - EOS - system ENV.cc, "-I#{HOMEBREW_PREFIX}/include/gsettings-desktop-schemas", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/gsl.rb b/Formula/gsl.rb deleted file mode 100644 index 93189f7ac977b..0000000000000 --- a/Formula/gsl.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Gsl < Formula - desc "Numerical library for C and C++" - homepage "https://www.gnu.org/software/gsl/" - url "https://ftp.gnu.org/gnu/gsl/gsl-2.6.tar.gz" - mirror "https://ftpmirror.gnu.org/gsl/gsl-2.6.tar.gz" - sha256 "b782339fc7a38fe17689cb39966c4d821236c28018b6593ddb6fd59ee40786a8" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "5972e8669b2560124278b43788a002e3ff22f024c761750a1a33b41d2002f292" => :catalina - sha256 "6c88a066c85f76c93a20f6e3256fb9022d6e7db828d184be5b42fd0b322ca7b8" => :mojave - sha256 "8213b1a73d038e499223ccae6d04afe6eb2d9455e327d9558351cf47a0431b84" => :high_sierra - sha256 "8515f26e5a06a99097e87dc9b88ee79787b95448ab67f09b449aee4b0d67bdba" => :sierra - end - - def install - ENV.deparallelize - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" # A GNU tool which doesn't support just make install! Shameful! - system "make", "install" - end - - test do - system bin/"gsl-randist", "0", "20", "cauchy", "30" - end -end diff --git a/Formula/gsmartcontrol.rb b/Formula/gsmartcontrol.rb deleted file mode 100644 index ff6c0e3758a8a..0000000000000 --- a/Formula/gsmartcontrol.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Gsmartcontrol < Formula - desc "Graphical user interface for smartctl" - homepage "https://gsmartcontrol.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gsmartcontrol/1.1.3/gsmartcontrol-1.1.3.tar.bz2" - sha256 "b64f62cffa4430a90b6d06cd52ebadd5bcf39d548df581e67dfb275a673b12a9" - revision 5 - - bottle do - sha256 "f013a063bc125ddf0eb174d8893edc7eea8433aac4ba910b0ed3a11337171fd4" => :catalina - sha256 "f07ac44ce8d76f469f2bd02da3476f41151416dacb64569a03cf936d8b50697f" => :mojave - sha256 "67fa6b9c4b3f203916bb66ca3b5b67c2171cbd2d0fd26886746408e09243577f" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gtkmm3" - depends_on "pcre" - depends_on "smartmontools" - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{sbin}/gsmartcontrol", "--version" - end -end diff --git a/Formula/gsoap.rb b/Formula/gsoap.rb deleted file mode 100644 index 5e59d91ee6f17..0000000000000 --- a/Formula/gsoap.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Gsoap < Formula - desc "SOAP stub and skeleton compiler for C and C++" - homepage "https://www.genivia.com/products.html" - url "https://downloads.sourceforge.net/project/gsoap2/gsoap-2.8/gsoap_2.8.104.zip" - sha256 "60fcd137c59a7640470f873d9a0a29c62896a15e8517a2f5a03eb2d7eebc0c52" - - bottle do - sha256 "a180cea83603a954af06249e89902c1ce1870a2a173ca5fcb38256dd1f166699" => :catalina - sha256 "8d76726a053764e6469eb396a5dc841b0652bdf7a0d0162eb0f1478d30602da0" => :mojave - sha256 "5cba55bdc1815a5967bd20ffb945a83daff49c06baf99786c57bac21d27486ad" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "openssl@1.1" - - uses_from_macos "bison" - uses_from_macos "flex" - uses_from_macos "zlib" - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/wsdl2h", "-o", "calc.h", "https://www.genivia.com/calc.wsdl" - system "#{bin}/soapcpp2", "calc.h" - assert_predicate testpath/"calc.add.req.xml", :exist? - end -end diff --git a/Formula/gspell.rb b/Formula/gspell.rb deleted file mode 100644 index 2ad66c60f0a45..0000000000000 --- a/Formula/gspell.rb +++ /dev/null @@ -1,136 +0,0 @@ -class Gspell < Formula - desc "Flexible API to implement spellchecking in GTK+ applications" - homepage "https://wiki.gnome.org/Projects/gspell" - url "https://download.gnome.org/sources/gspell/1.8/gspell-1.8.3.tar.xz" - sha256 "5ae514dd0216be069176accf6d0049d6a01cfa6a50df4bc06be85f7080b62de8" - revision 2 - - bottle do - sha256 "491b662bd382e322b2041a255551dcd1a3ba6dbaa5a2fc825dc239241ac7a64a" => :catalina - sha256 "d471894ee5c85f31be7a2a9c5a122382a3619852f4b9a36f1d2778e669ad4cb0" => :mojave - sha256 "3b167053c54d962f2eed54e7bff70b2ce4b0a21ccb22be19a1091318e85bcbfc" => :high_sierra - 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 "enchant" - depends_on "gtk+3" - depends_on "gtk-mac-integration" - depends_on "iso-codes" - depends_on "vala" - - patch :DATA - - def install - system "autoreconf", "-if" - 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[]) { - const GList *list = gspell_language_get_available(); - return 0; - } - EOS - atk = Formula["atk"] - cairo = Formula["cairo"] - enchant = Formula["enchant"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - gtkx3 = Formula["gtk+3"] - gtk_mac_integration = Formula["gtk-mac-integration"] - harfbuzz = Formula["harfbuzz"] - 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#{enchant.opt_include}/enchant-2 - -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#{gtk_mac_integration.opt_include}/gtkmacintegration - -I#{gtkx3.opt_include}/gtk-3.0 - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gspell-1 - -I#{libepoxy.opt_include} - -I#{libpng.opt_include}/libpng16 - -I#{pango.opt_include}/pango-1.0 - -I#{pixman.opt_include}/pixman-1 - -DMAC_INTEGRATION - -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 - -lcairo - -lcairo-gobject - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lgspell-1 - -lgtk-3 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - ENV["G_DEBUG"] = "fatal-warnings" - - # This test will fail intentionally when iso-codes gets updated. - # Resolve by increasing the `revision` on this formula. - system "./test" - end -end - -__END__ -diff --git a/gspell/Makefile.am b/gspell/Makefile.am -index 076a9fd..6c67184 100644 ---- a/gspell/Makefile.am -+++ b/gspell/Makefile.am -@@ -91,6 +91,7 @@ nodist_libgspell_core_la_SOURCES = \ - $(BUILT_SOURCES) - - libgspell_core_la_LIBADD = \ -+ $(GTK_MAC_LIBS) \ - $(CODE_COVERAGE_LIBS) - - libgspell_core_la_CFLAGS = \ -@@ -155,6 +156,12 @@ gspell_private_headers += \ - gspell_private_c_files += \ - gspell-osx.c - -+libgspell_core_la_CFLAGS += \ -+ -xobjective-c -+ -+libgspell_core_la_LDFLAGS += \ -+ -framework Cocoa -+ - endif # OS_OSX - - if HAVE_INTROSPECTION diff --git a/Formula/gssdp.rb b/Formula/gssdp.rb deleted file mode 100644 index 7925b112fe7dc..0000000000000 --- a/Formula/gssdp.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Gssdp < Formula - desc "GUPnP library for resource discovery and announcement over SSDP" - homepage "https://wiki.gnome.org/GUPnP/" - url "https://download.gnome.org/sources/gssdp/1.2/gssdp-1.2.3.tar.xz" - sha256 "a263dcb6730e3b3dc4bbbff80cf3fab4cd364021981d419db6dd5a8e148aa7e8" - - bottle do - cellar :any - sha256 "22865104f953a59e6fbf2d2159a18d4c0d59e9398ba490effb0988c919704229" => :catalina - sha256 "2ecafed662cc94896bd9a36c34024141a67d1773649e9841c595dbf938e3c837" => :mojave - sha256 "3591386e88d6df3df51173c64c9e86680e128e01d6876344f537b45df901ee8f" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "libsoup" - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Dsniffer=false", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = gssdp_client_get_type(); - 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}/gssdp-1.2 - -D_REENTRANT - -L#{lib} - -lgssdp-1.2 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gssh.rb b/Formula/gssh.rb deleted file mode 100644 index c3f1da0c73cd8..0000000000000 --- a/Formula/gssh.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Gssh < Formula - desc "SSH automation tool based on Groovy DSL" - homepage "https://github.com/int128/groovy-ssh" - url "https://github.com/int128/groovy-ssh/archive/2.10.1.tar.gz" - sha256 "d1a6e2293e4f23f3245ede7d473a08d4fb6019bf18efbef1a74c894d5c50d6a1" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e62b8a6ca01051f9c49cf3031349c3460d1f1c4f32b6950d8cc7fc00b5ba4011" => :catalina - sha256 "81d9d04f30ae5f158b18a3749f4e655d25374bc069292e22b47e5c0250ccea3d" => :mojave - sha256 "4d9d09ec57af0639e794cbed732c12050fca8fe3d43d6e5d3e1de0e473eb5b0a" => :high_sierra - sha256 "ef0becf43b6bfe4a1c1a3cffc27c5c01f338348273f66c7f4e3355e05f55b508" => :sierra - end - - depends_on :java => "1.8" - - def install - ENV["CIRCLE_TAG"] = version - system "./gradlew", "shadowJar" - libexec.install "cli/build/libs/gssh.jar" - bin.write_jar_script libexec/"gssh.jar", "gssh", :java_version => "1.8" - end - - test do - system bin/"gssh" - end -end diff --git a/Formula/gst-editing-services.rb b/Formula/gst-editing-services.rb deleted file mode 100644 index af17f9bbb8936..0000000000000 --- a/Formula/gst-editing-services.rb +++ /dev/null @@ -1,29 +0,0 @@ -class GstEditingServices < Formula - desc "GStreamer Editing Services" - homepage "https://gstreamer.freedesktop.org/modules/gst-editing-services.html" - url "https://gstreamer.freedesktop.org/src/gst-editing-services/gstreamer-editing-services-1.16.2.tar.xz" - sha256 "0e06a6191a0c6c16e16272bf2573cecaeb245f10629486ad940a299bef700c16" - - bottle do - sha256 "08d783fd326d9c40cb2ec12b236d0fa560be509f364b2725e4e806855416e11d" => :catalina - sha256 "e049cdc2cfe546f1367bb7b680e4b13dc013a1ff6f9c8175b63cadd200c8a875" => :mojave - sha256 "db19177293d74892f5770fe76e57ee7c5cf42e3ab4e06c7e32c376053473882d" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "gst-plugins-base" - depends_on "gstreamer" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-gtk-doc", - "--disable-docbook" - system "make" - system "make", "install" - end - - test do - system "#{bin}/ges-launch-1.0", "--ges-version" - end -end diff --git a/Formula/gst-libav.rb b/Formula/gst-libav.rb deleted file mode 100644 index 3ce98f7ecbd4d..0000000000000 --- a/Formula/gst-libav.rb +++ /dev/null @@ -1,43 +0,0 @@ -class GstLibav < Formula - desc "GStreamer plugins for Libav (a fork of FFmpeg)" - homepage "https://gstreamer.freedesktop.org/" - url "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.16.2.tar.xz" - sha256 "c724f612700c15a933c7356fbeabb0bb9571fb5538f8b1b54d4d2d94188deef2" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "dce5e4261059fa2fc2e14eb4db2f43cfdf749eee11140539b3f1c3c74af25198" => :catalina - sha256 "999e32d952de88b5578a3906fe922b135827738ac9b16afcd542bc9ba01d2d21" => :mojave - sha256 "281dc5fd5d4a0f558b653d7054303fbd30308feb73d2c4e37811d8389d28b6ad" => :high_sierra - end - - head do - url "https://anongit.freedesktop.org/git/gstreamer/gst-libav.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "gettext" - end - - depends_on "pkg-config" => :build - depends_on "yasm" => :build - depends_on "gst-plugins-base" - depends_on "xz" # For LZMA - - def install - if build.head? - ENV["NOCONFIGURE"] = "yes" - system "./autogen.sh" - end - - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make" - system "make", "install" - end - - test do - system "#{Formula["gstreamer"].opt_bin}/gst-inspect-1.0", "libav" - end -end diff --git a/Formula/gst-plugins-bad.rb b/Formula/gst-plugins-bad.rb deleted file mode 100644 index 509e68c661148..0000000000000 --- a/Formula/gst-plugins-bad.rb +++ /dev/null @@ -1,68 +0,0 @@ -class GstPluginsBad < Formula - desc "GStreamer plugins less supported, not fully tested" - homepage "https://gstreamer.freedesktop.org/" - url "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.16.2.tar.xz" - sha256 "f1cb7aa2389569a5343661aae473f0a940a90b872001824bc47fa8072a041e74" - revision 3 - - bottle do - sha256 "c1031cef7c790bbdf27ffe3eee51ccd128cd28c7309e9da6814ec8cf87682c9d" => :catalina - sha256 "d390095d1b6cd82eec7c6133fe11c5d944cf63ffe783ce65e7cf0900aedb1100" => :mojave - sha256 "76524f6b5d72948656e52c06d9dc20b0bb534fe016ee33086aac12ea8d1bbfae" => :high_sierra - end - - head do - url "https://anongit.freedesktop.org/git/gstreamer/gst-plugins-bad.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "gobject-introspection" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "faac" - depends_on "faad2" - depends_on "gettext" - depends_on "gst-plugins-base" - depends_on "jpeg" - depends_on "libmms" - depends_on "libnice" - depends_on "libusrsctp" - depends_on "musepack" - depends_on "openssl@1.1" - depends_on "opus" - depends_on "orc" - depends_on "rtmpdump" - depends_on "srtp" - - def install - args = %W[ - --prefix=#{prefix} - --disable-yadif - --disable-examples - --disable-debug - --disable-dependency-tracking - --enable-introspection=yes - ] - - # The apple media plug-in uses API that was added in Mojave - args << "--disable-apple_media" if MacOS.version <= :high_sierra - - if build.head? - # autogen is invoked in "stable" build because we patch configure.ac - ENV["NOCONFIGURE"] = "yes" - system "./autogen.sh" - end - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - gst = Formula["gstreamer"].opt_bin/"gst-inspect-1.0" - output = shell_output("#{gst} --plugin dvbsuboverlay") - assert_match version.to_s, output - end -end diff --git a/Formula/gst-plugins-base.rb b/Formula/gst-plugins-base.rb deleted file mode 100644 index e0980b9dab115..0000000000000 --- a/Formula/gst-plugins-base.rb +++ /dev/null @@ -1,64 +0,0 @@ -class GstPluginsBase < Formula - desc "GStreamer plugins (well-supported, basic set)" - homepage "https://gstreamer.freedesktop.org/" - url "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.16.2.tar.xz" - sha256 "b13e73e2fe74a4166552f9577c3dcb24bed077021b9c7fa600d910ec6987816a" - - bottle do - sha256 "64e4395ec1d40677cfc8b21eaf6815296f44660aab0b4a125735f266552dad95" => :catalina - sha256 "5a4245b5251ec3c8ef12a8278101c84c4db8a8892114a53e6a3304569571caba" => :mojave - sha256 "d9144e2a0c20e479c341167a8aa9ecc87e65a9c7c9515a62a855785cb1d42252" => :high_sierra - end - - head do - url "https://anongit.freedesktop.org/git/gstreamer/gst-plugins-base.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 "gettext" - depends_on "gstreamer" - depends_on "libogg" - depends_on "libvorbis" - depends_on "opus" - depends_on "orc" - depends_on "pango" - depends_on "theora" - - def install - # gnome-vfs turned off due to lack of formula for it. - args = %W[ - --prefix=#{prefix} - --enable-experimental - --disable-libvisual - --disable-alsa - --disable-cdparanoia - --without-x - --disable-x - --disable-xvideo - --disable-xshm - --disable-debug - --disable-dependency-tracking - --enable-introspection=yes - ] - - if build.head? - ENV["NOCONFIGURE"] = "yes" - system "./autogen.sh" - end - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - gst = Formula["gstreamer"].opt_bin/"gst-inspect-1.0" - output = shell_output("#{gst} --plugin volume") - assert_match version.to_s, output - end -end diff --git a/Formula/gst-plugins-good.rb b/Formula/gst-plugins-good.rb deleted file mode 100644 index 8fcf9712e9f4a..0000000000000 --- a/Formula/gst-plugins-good.rb +++ /dev/null @@ -1,69 +0,0 @@ -class GstPluginsGood < Formula - desc "GStreamer plugins (well-supported, under the LGPL)" - homepage "https://gstreamer.freedesktop.org/" - license "LGPL-2.1" - - stable do - url "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.16.2.tar.xz" - sha256 "40bb3bafda25c0b739c8fc36e48380fccf61c4d3f83747e97ac3f9b0171b1319" - end - - bottle do - sha256 "4ea6d0ea1dcc6c20afbd0976006a84d57067b83926aa74bd28a0d21b4afa1aa9" => :catalina - sha256 "5bab7c207014dad9b950247148d930251fba89458f97527b9fb076a1a5a843ca" => :mojave - sha256 "0af59390678c89f8a5c396afcd63e5b1d95d84dad217c61860db6adc3f8c2539" => :high_sierra - end - - head do - url "https://anongit.freedesktop.org/git/gstreamer/gst-plugins-good.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "check" - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "flac" - depends_on "gettext" - depends_on "gst-plugins-base" - depends_on "gtk+3" - depends_on "jpeg" - depends_on "lame" - depends_on "libpng" - depends_on "libshout" - depends_on "libsoup" - depends_on "libvpx" - depends_on "orc" - depends_on "speex" - depends_on "taglib" - - def install - args = %W[ - --prefix=#{prefix} - --disable-gtk-doc - --disable-goom - --with-default-videosink=ximagesink - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --disable-x - ] - - if build.head? - ENV["NOCONFIGURE"] = "yes" - system "./autogen.sh" - end - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - gst = Formula["gstreamer"].opt_bin/"gst-inspect-1.0" - output = shell_output("#{gst} --plugin cairo") - assert_match version.to_s, output - end -end diff --git a/Formula/gst-plugins-ugly.rb b/Formula/gst-plugins-ugly.rb deleted file mode 100644 index 25ff32cf0de81..0000000000000 --- a/Formula/gst-plugins-ugly.rb +++ /dev/null @@ -1,59 +0,0 @@ -class GstPluginsUgly < Formula - desc "Library for constructing graphs of media-handling components" - homepage "https://gstreamer.freedesktop.org/" - url "https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.16.2.tar.xz" - sha256 "5500415b865e8b62775d4742cbb9f37146a50caecfc0e7a6fc0160d3c560fbca" - revision 2 - - bottle do - sha256 "7134966013d0e1fdbe6f431d1148749b3de1abe933f7ed9144523a21bb1488aa" => :catalina - sha256 "accfd660d9f84e37c3b12b7b5a1c9b43d405877162e8c156cf743d97d4460dbb" => :mojave - sha256 "c46ee6e2d960accfde8ccb82908ca6e8c48c3eda883222cc1998eabee16eb470" => :high_sierra - end - - head do - url "https://anongit.freedesktop.org/git/gstreamer/gst-plugins-ugly.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "gettext" - depends_on "gst-plugins-base" - depends_on "jpeg" - depends_on "libmms" - depends_on "libshout" - depends_on "libvorbis" - depends_on "pango" - depends_on "theora" - depends_on "x264" - - def install - args = %W[ - --prefix=#{prefix} - --mandir=#{man} - --disable-debug - --disable-dependency-tracking - --disable-amrnb - --disable-amrwb - ] - - if build.head? - ENV["NOCONFIGURE"] = "yes" - system "./autogen.sh" - end - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - gst = Formula["gstreamer"].opt_bin/"gst-inspect-1.0" - output = shell_output("#{gst} --plugin dvdsub") - assert_match version.to_s, output - end -end diff --git a/Formula/gst-python.rb b/Formula/gst-python.rb deleted file mode 100644 index cac49d74601a0..0000000000000 --- a/Formula/gst-python.rb +++ /dev/null @@ -1,39 +0,0 @@ -class GstPython < Formula - desc "Python overrides for gobject-introspection-based pygst bindings" - homepage "https://gstreamer.freedesktop.org/modules/gst-python.html" - url "https://gstreamer.freedesktop.org/src/gst-python/gst-python-1.16.2.tar.xz" - sha256 "208df3148d73d9f416d016564737585d8ea763d91201732d44b5fe688c6288a8" - revision 1 - - bottle do - cellar :any - sha256 "c81ba537e1ffcf118f451c9bfd14316130b6fef8c4783200cab52a6b5eb494f9" => :catalina - sha256 "baccf8cd73d36aba4ce9418639c70c15c48b1675a3bf4b8629cc6814f4014678" => :mojave - sha256 "4f97f255287bcefc62d520f4c29111c3ec1012a582cc5251c00779c29b8a4a02" => :high_sierra - end - - depends_on "gst-plugins-base" - depends_on "pygobject3" - depends_on "python@3.8" - - def install - python_version = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - # pygi-overrides-dir switch ensures files don't break out of sandbox. - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-pygi-overrides-dir=#{lib}/python#{python_version}/site-packages/gi/overrides", - "PYTHON=#{Formula["python@3.8"].opt_bin}/python3", - "LDFLAGS=-undefined dynamic_lookup" - system "make", "install" - end - - test do - system Formula["python@3.8"].opt_bin/"python3", "-c", <<~EOS - import gi - gi.require_version('Gst', '1.0') - from gi.repository import Gst - print (Gst.Fraction(num=3, denom=5)) - EOS - end -end diff --git a/Formula/gst-rtsp-server.rb b/Formula/gst-rtsp-server.rb deleted file mode 100644 index 08272138c7768..0000000000000 --- a/Formula/gst-rtsp-server.rb +++ /dev/null @@ -1,37 +0,0 @@ -class GstRtspServer < Formula - desc "RTSP server library based on GStreamer" - homepage "https://gstreamer.freedesktop.org/modules/gst-rtsp-server.html" - url "https://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.16.2.tar.xz" - sha256 "de07a2837b3b04820ce68264a4909f70c221b85dbff0cede7926e9cdbb1dc26e" - - bottle do - sha256 "30d213fe81eece2d6a566c7d53ea36f9f3ee24219aa7b0be4edf15d46559cc03" => :catalina - sha256 "fc5d1f94602dc377f2d6938ed5f97e1a104958fbfeb26e48598e18c0dd0ca9ca" => :mojave - sha256 "94e6f9c451be9c5f2e3b3a92d7450b730b3cea49c85f1e03cd8348943385a311" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gst-plugins-base" - depends_on "gstreamer" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-examples", - "--disable-tests", - "--enable-introspection=yes" - - system "make", "install" - end - - test do - gst = Formula["gstreamer"].opt_bin/"gst-inspect-1.0" - output = shell_output("#{gst} --gst-plugin-path #{lib} --plugin rtspclientsink") - assert_match /\s#{version}\s/, output - end -end diff --git a/Formula/gst-validate.rb b/Formula/gst-validate.rb deleted file mode 100644 index 29777de71718e..0000000000000 --- a/Formula/gst-validate.rb +++ /dev/null @@ -1,60 +0,0 @@ -class GstValidate < Formula - include Language::Python::Shebang - - desc "Tools to validate GstElements from GStreamer" - homepage "https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-validate/html/" - url "https://gstreamer.freedesktop.org/src/gst-validate/gst-validate-1.16.2.tar.xz" - sha256 "4861ccb9326200e74d98007e316b387d48dd49f072e0b78cb9d3303fdecfeeca" - revision 1 - - bottle do - sha256 "44ac302a258e77061adf3b5e87542ef2c2d1e6a4399554198f8e54c16a501491" => :catalina - sha256 "602b5e8cfc4749ead0dba6866b12487742488de6cc59555758284c1c8bc9f4b0" => :mojave - sha256 "675669b40f30a05ab4c4c32bb92245753890419a8d4f5a649efc9441d200ed28" => :high_sierra - end - - head do - url "https://anongit.freedesktop.org/git/gstreamer/gst-devtools.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 "gettext" - depends_on "gst-plugins-base" - depends_on "gstreamer" - depends_on "json-glib" - depends_on "python@3.8" - - def install - args = %W[ - --prefix=#{prefix} - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - ] - - if build.head? - ENV["NOCONFIGURE"] = "yes" - cd "validate" do - system "./autogen.sh" - system "./configure", *args - system "make" - system "make", "install" - end - else - system "./configure", *args - system "make" - system "make", "install" - end - - rewrite_shebang detected_python_shebang, bin/"gst-validate-launcher" - end - - test do - system "#{bin}/gst-validate-launcher", "--usage" - end -end diff --git a/Formula/gstreamer.rb b/Formula/gstreamer.rb deleted file mode 100644 index 600e8793edab1..0000000000000 --- a/Formula/gstreamer.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Gstreamer < Formula - desc "Development framework for multimedia applications" - homepage "https://gstreamer.freedesktop.org/" - url "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.16.2.tar.xz" - sha256 "e3f044246783fd685439647373fa13ba14f7ab0b346eadd06437092f8419e94e" - - bottle do - sha256 "3473eef6aadd51a378f722c08a399922c4b401f38d8d5bffe7e2cb0ba845f919" => :catalina - sha256 "6427cd64ac1c541d35fc57f869dd1290e57aab8a2a9f5589b79f6e078e4432d5" => :mojave - sha256 "b1a6cbfbac2bb152ce023fbe283ef38ec371ceccff48ae1545cdeac1a36933ba" => :high_sierra - end - - head do - url "https://anongit.freedesktop.org/git/gstreamer/gstreamer.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "bison" => :build - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - - uses_from_macos "flex" => :build - - def install - args = %W[ - --prefix=#{prefix} - --disable-debug - --disable-dependency-tracking - --disable-gtk-doc - --enable-introspection=yes - ] - - if build.head? - ENV["NOCONFIGURE"] = "yes" - system "./autogen.sh" - - # Ban trying to chown to root. - # https://bugzilla.gnome.org/show_bug.cgi?id=750367 - args << "--with-ptp-helper-permissions=none" - end - - # Look for plugins in HOMEBREW_PREFIX/lib/gstreamer-1.0 instead of - # HOMEBREW_PREFIX/Cellar/gstreamer/1.0/lib/gstreamer-1.0, so we'll find - # plugins installed by other packages without setting GST_PLUGIN_PATH in - # the environment. - inreplace "configure", 'PLUGINDIR="$full_var"', - "PLUGINDIR=\"#{HOMEBREW_PREFIX}/lib/gstreamer-1.0\"" - - system "./configure", *args - system "make" - system "make", "install" - end - - def caveats - <<~EOS - Consider also installing gst-plugins-base and gst-plugins-good. - - The gst-plugins-* packages contain gstreamer-video-1.0, gstreamer-audio-1.0, - and other components needed by most gstreamer applications. - EOS - end - - test do - system bin/"gst-inspect-1.0" - end -end diff --git a/Formula/gstreamermm.rb b/Formula/gstreamermm.rb deleted file mode 100644 index 67750e49e9cf2..0000000000000 --- a/Formula/gstreamermm.rb +++ /dev/null @@ -1,94 +0,0 @@ -class Gstreamermm < Formula - desc "GStreamer C++ bindings" - homepage "https://gstreamer.freedesktop.org/bindings/cplusplus.html" - url "https://download.gnome.org/sources/gstreamermm/1.10/gstreamermm-1.10.0.tar.xz" - sha256 "be58fe9ef7d7e392568ec85e80a84f4730adbf91fb0355ff7d7c616675ea8d60" - revision 4 - - bottle do - cellar :any - sha256 "2cd58f367c293ee4b19caddbc97ffb3be2fffb0382e0c0908bd4c2e604912ad7" => :catalina - sha256 "8249cddb44016172a38348a0d1f1092d07fe3848b0bbb0f2b964213305bc6be4" => :mojave - sha256 "fee76c2e868cd7f21a0953a53144ef5ee8a07960a1873cb0db84933baa471cfd" => :high_sierra - sha256 "c1fcf19c49b4cb0674bfb7deeb51c403093b53d0a03c5f3819d7905131f64a4e" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "glibmm" - depends_on "gst-plugins-base" - depends_on "gstreamer" - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - - int main(int argc, char *argv[]) { - guint macro, minor, micro; - Gst::version(macro, minor, micro); - return 0; - } - EOS - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - gst_plugins_base = Formula["gst-plugins-base"] - gstreamer = Formula["gstreamer"] - libsigcxx = Formula["libsigc++@2"] - flags = %W[ - -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#{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}/gstreamermm-1.0 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/gstreamermm-1.0/include - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{gst_plugins_base.opt_lib} - -L#{gstreamer.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -lgio-2.0 - -lgiomm-2.4 - -lglib-2.0 - -lglibmm-2.4 - -lgobject-2.0 - -lgstapp-1.0 - -lgstaudio-1.0 - -lgstbase-1.0 - -lgstcheck-1.0 - -lgstcontroller-1.0 - -lgstfft-1.0 - -lgstnet-1.0 - -lgstpbutils-1.0 - -lgstreamer-1.0 - -lgstreamermm-1.0 - -lgstriff-1.0 - -lgstrtp-1.0 - -lgstsdp-1.0 - -lgsttag-1.0 - -lgstvideo-1.0 - -lintl - -lsigc-2.0 - ] - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gti.rb b/Formula/gti.rb deleted file mode 100644 index e326031239909..0000000000000 --- a/Formula/gti.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Gti < Formula - desc "ASCII-art displaying typo-corrector for commands" - homepage "https://r-wos.org/hacks/gti" - url "https://github.com/rwos/gti/archive/v1.7.0.tar.gz" - sha256 "cea8baf25ac5e6272f9031bd5e36a17a4b55038830b108f4f24e7f55690198f7" - head "https://github.com/rwos/gti.git" - - bottle do - cellar :any_skip_relocation - sha256 "dc2f7bf9b442294a044b782321689783cd3fd93a465a9604db606b2b420e4443" => :catalina - sha256 "2e1f996a67020a9bd842b41d0ac7d6e5ef0791fbc7fd57ffe3e9b7aacc1ee6de" => :mojave - sha256 "9d46e56c0f79ba9d81e40bc1edc7b4ff1a9c9eeb4dbcb087827dec5b84c4f82b" => :high_sierra - end - - def install - system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}" - bin.install "gti" - man6.install "gti.6" - end - - test do - system "#{bin}/gti", "init" - end -end diff --git a/Formula/gtk+.rb b/Formula/gtk+.rb deleted file mode 100644 index ca6884537258f..0000000000000 --- a/Formula/gtk+.rb +++ /dev/null @@ -1,125 +0,0 @@ -class Gtkx < Formula - desc "GUI toolkit" - homepage "https://gtk.org/" - revision 3 - - stable do - url "https://download.gnome.org/sources/gtk+/2.24/gtk+-2.24.32.tar.xz" - sha256 "b6c8a93ddda5eabe3bfee1eb39636c9a03d2a56c7b62828b359bf197943c582e" - end - - bottle do - rebuild 1 - sha256 "09e223d16f3e891d2a4184c66fecbf0a777e70e23680ac794dd8c44e4a63d5cf" => :catalina - sha256 "cec64106c085533a58f8d436f029b2d7199a14cd15af9ece086814396ba48b0e" => :mojave - sha256 "30ce8d0a4062200196f8d802ae75769d8e05d530c338619d290704c46a7d317b" => :high_sierra - sha256 "a1324b85f6749111c3eb598c6d3ed231eaa8281b60fc2eb13d48a5f342da3efc" => :sierra - end - - head do - url "https://gitlab.gnome.org/GNOME/gtk.git", :branch => "gtk-2-24" - - 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 "atk" - depends_on "gdk-pixbuf" - depends_on "hicolor-icon-theme" - depends_on "pango" - - # Patch to allow Eiffel Studio to run in Cocoa / non-X11 mode, as well as Freeciv's freeciv-gtk2 client - # See: - # - https://bugzilla.gnome.org/show_bug.cgi?id=757187 - # referenced from - # - https://bugzilla.gnome.org/show_bug.cgi?id=557780 - # - Homebrew/homebrew-games#278 - patch do - url "https://bug757187.bugzilla-attachments.gnome.org/attachment.cgi?id=331173" - sha256 "ce5adf1a019ac7ed2a999efb65cfadeae50f5de8663638c7f765f8764aa7d931" - end - - def install - args = ["--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-static", - "--disable-glibtest", - "--enable-introspection=yes", - "--with-gdktarget=quartz", - "--disable-visibility"] - - if build.head? - inreplace "autogen.sh", "libtoolize", "glibtoolize" - ENV["NOCONFIGURE"] = "yes" - system "./autogen.sh" - end - system "./configure", *args - system "make", "install" - - inreplace bin/"gtk-builder-convert", %r{^#!/usr/bin/env python$}, "#!/usr/bin/python" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GtkWidget *label = gtk_label_new("Hello World!"); - 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"] - harfbuzz = Formula["harfbuzz"] - 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}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gtk-2.0 - -I#{libpng.opt_include}/libpng16 - -I#{lib}/gtk-2.0/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#{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 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gtk+3.rb b/Formula/gtk+3.rb deleted file mode 100644 index de06b98c97dcb..0000000000000 --- a/Formula/gtk+3.rb +++ /dev/null @@ -1,124 +0,0 @@ -class Gtkx3 < Formula - desc "Toolkit for creating graphical user interfaces" - homepage "https://gtk.org/" - url "https://download.gnome.org/sources/gtk+/3.24/gtk+-3.24.21.tar.xz" - sha256 "aeea6ae7cd35e83dfc7699be716519faefca346c62e784dd1a37d9df94c08f52" - - bottle do - sha256 "d0db8f581501a4046ba74ca0f3666f96a1c211f39961395b83375edb17247f43" => :catalina - sha256 "4ee0638ebd51d281f71b42fbb3db48d5888877d08399d8c8226e3f87c9ee4ec3" => :mojave - sha256 "b3aba62ebbae85a9a3686e099f4cfaa1e81d5d4a52de3dbf783740bd6be47764" => :high_sierra - 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 "pkg-config" => :build - depends_on "atk" - depends_on "gdk-pixbuf" - depends_on "glib" - depends_on "gsettings-desktop-schemas" - depends_on "hicolor-icon-theme" - depends_on "libepoxy" - depends_on "pango" - - uses_from_macos "libxslt" => :build # for xsltproc - - def install - args = std_meson_args + %w[ - -Dx11_backend=false - -Dquartz_backend=true - -Dgtk_doc=false - -Dman=true - -Dintrospection=true - ] - - # ensure that we don't run the meson post install script - ENV["DESTDIR"] = "/" - - # Find our docbook catalog - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - mkdir "build" do - system "meson", *args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - - # Prevent a conflict between this and Gtk+2 - mv bin/"gtk-update-icon-cache", bin/"gtk3-update-icon-cache" - end - - def post_install - system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" - system bin/"gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" - system "#{bin}/gtk-query-immodules-3.0 > #{HOMEBREW_PREFIX}/lib/gtk-3.0/3.0.0/immodules.cache" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - gtk_disable_setlocale(); - 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"] - harfbuzz = Formula["harfbuzz"] - 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#{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#{harfbuzz.opt_include}/harfbuzz - -I#{include} - -I#{include}/gtk-3.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#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.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 - -lgobject-2.0 - -lgtk-3 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - # include a version check for the pkg-config files - assert_match version.to_s, shell_output("cat #{lib}/pkgconfig/gtk+-3.0.pc").strip - end -end diff --git a/Formula/gtk-chtheme.rb b/Formula/gtk-chtheme.rb deleted file mode 100644 index c1d3b53113e46..0000000000000 --- a/Formula/gtk-chtheme.rb +++ /dev/null @@ -1,33 +0,0 @@ -class GtkChtheme < Formula - desc "GTK+ 2.0 theme changer GUI" - homepage "http://plasmasturm.org/code/gtk-chtheme/" - url "http://plasmasturm.org/code/gtk-chtheme/gtk-chtheme-0.3.1.tar.bz2" - sha256 "26f4b6dd60c220d20d612ca840b6beb18b59d139078be72c7b1efefc447df844" - revision 3 - - bottle do - cellar :any - sha256 "6294abe2d8ad07c52cc78c6fd156fba145340c163d4be7d103ce91ef84d2911b" => :catalina - sha256 "54438d348c8534071e384f17ce9e9e5e784ec9732b64249a996372360edb5f9a" => :mojave - sha256 "5e3ddc7b15e6d35d857815932e80b39f0abf804c8526cc798f0b3d3d66fe0338" => :high_sierra - sha256 "5af49da12ab0e1799377eb160cff68283b7a24e0149135603d35810e6c0d7e55" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gtk+" - - def install - # Unfortunately chtheme relies on some deprecated functionality - # we need to disable errors for it to compile properly - inreplace "Makefile", "-DGTK_DISABLE_DEPRECATED", "" - - system "make", "PREFIX=#{prefix}", "install" - end - - test do - # package contains just an executable and a man file - # executable accepts no options and just spawns a GUI - assert_predicate bin/"gtk-chtheme", :exist? - end -end diff --git a/Formula/gtk-doc.rb b/Formula/gtk-doc.rb deleted file mode 100644 index 9be7dcc6447ad..0000000000000 --- a/Formula/gtk-doc.rb +++ /dev/null @@ -1,53 +0,0 @@ -class GtkDoc < Formula - desc "GTK+ documentation tool" - homepage "https://gitlab.gnome.org/GNOME/gtk-doc" - url "https://download.gnome.org/sources/gtk-doc/1.32/gtk-doc-1.32.tar.xz" - sha256 "de0ef034fb17cb21ab0c635ec730d19746bce52984a6706e7bbec6fb5e0b907c" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "2e0c508a1f6fe8ab48a03ab83f8471c3153ce937099437dad6bbbd1dd36a42ce" => :catalina - sha256 "2e0c508a1f6fe8ab48a03ab83f8471c3153ce937099437dad6bbbd1dd36a42ce" => :mojave - sha256 "2e0c508a1f6fe8ab48a03ab83f8471c3153ce937099437dad6bbbd1dd36a42ce" => :high_sierra - end - - depends_on "itstool" => :build - depends_on "pkg-config" => :build - depends_on "docbook" - depends_on "docbook-xsl" - depends_on "gettext" - depends_on "libxml2" - depends_on "python@3.8" - depends_on "source-highlight" - - uses_from_macos "libxslt" - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/7e/ae/26808275fc76bf2832deb10d3a3ed3107bc4de01b85dcccbe525f2cd6d1e/Pygments-2.4.2.tar.gz" - sha256 "881c4c157e45f30af185c1ffe8d549d48ac9127433f2c380c24b84572ad66297" - end - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resource("Pygments").stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec/"vendor") - end - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-highlight=source-highlight", - "--with-xml-catalog=#{etc}/xml/catalog" - system "make" - system "make", "install" - - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - system bin/"gtkdoc-scan", "--module=test" - system bin/"gtkdoc-mkdb", "--module=test" - end -end diff --git a/Formula/gtk-gnutella.rb b/Formula/gtk-gnutella.rb deleted file mode 100644 index 8d45cb8dd2233..0000000000000 --- a/Formula/gtk-gnutella.rb +++ /dev/null @@ -1,34 +0,0 @@ -class GtkGnutella < Formula - desc "Share files in a peer-to-peer (P2P) network" - homepage "https://gtk-gnutella.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gtk-gnutella/gtk-gnutella/1.1.15/gtk-gnutella-1.1.15.tar.xz" - sha256 "2931fab394b6d36c14a6bbc3b0ff584af5550f2eeb03f78bb19743c47767c1b7" - license "GPL-2.0" - - bottle do - sha256 "9fb121eec5c3e0f3e8750464148488870056596b59068e5765991c3851e85316" => :catalina - sha256 "1ab6b18c2ec8cd720a7024e471ceba5b9c8397c8c589b4eebbb371a2dc390f24" => :mojave - sha256 "dc0cab460a17691ee852300b90f014eeaa7871c59859cf92e887aa882b032ed0" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - - def install - ENV.deparallelize - - if MacOS.version == :el_capitan && MacOS::Xcode.version >= "8.0" - inreplace "Configure", "ret = clock_gettime(CLOCK_REALTIME, &tp);", - "ret = undefinedgibberish(CLOCK_REALTIME, &tp);" - end - - system "./build.sh", "--prefix=#{prefix}", "--disable-nls" - system "make", "install" - rm_rf share/"pixmaps" - rm_rf share/"applications" - end - - test do - system "#{bin}/gtk-gnutella", "--version" - end -end diff --git a/Formula/gtk-mac-integration.rb b/Formula/gtk-mac-integration.rb deleted file mode 100644 index ccd6e73544d78..0000000000000 --- a/Formula/gtk-mac-integration.rb +++ /dev/null @@ -1,112 +0,0 @@ -class GtkMacIntegration < Formula - desc "Integrates GTK macOS applications with the Mac desktop" - homepage "https://wiki.gnome.org/Projects/GTK+/OSX/Integration" - url "https://download.gnome.org/sources/gtk-mac-integration/2.1/gtk-mac-integration-2.1.3.tar.xz" - sha256 "d5f72302daad1f517932194d72967a32e72ed8177cfa38aaf64f0a80564ce454" - license "LGPL-2.1" - revision 4 - - bottle do - sha256 "f3aa06585602da10d89507059ece018889dbb0054118791015d22c65fec76cde" => :catalina - sha256 "a49e16175a868344c82613a7e23755bc6fc5da89c12e8ee6385c94c02da477cc" => :mojave - sha256 "61e69c71c4443999c5b0f53fcbcf1e5e775e7f0078117b54b5fe451dafeabc5f" => :high_sierra - end - - head do - url "https://github.com/jralls/gtk-mac-integration.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 "gettext" - depends_on "gtk+" - depends_on "gtk+3" - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-gtk2 - --with-gtk3 - --enable-introspection=yes - --enable-python=no - ] - - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - gchar *bundle = gtkosx_application_get_bundle_path(); - 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+"] - harfbuzz = Formula["harfbuzz"] - 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}/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#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gtkmacintegration - -I#{libpng.opt_include}/libpng16 - -I#{pango.opt_include}/pango-1.0 - -I#{pixman.opt_include}/pixman-1 - -DMAC_INTEGRATION - -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 - -lgtkmacintegration-gtk2 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gtk-vnc.rb b/Formula/gtk-vnc.rb deleted file mode 100644 index 4ca0f75930289..0000000000000 --- a/Formula/gtk-vnc.rb +++ /dev/null @@ -1,113 +0,0 @@ -class GtkVnc < Formula - desc "VNC viewer widget for GTK" - homepage "https://wiki.gnome.org/Projects/gtk-vnc" - url "https://download.gnome.org/sources/gtk-vnc/1.0/gtk-vnc-1.0.0.tar.xz" - sha256 "a81a1f1a79ad4618027628ffac27d3391524c063d9411c7a36a5ec3380e6c080" - - bottle do - sha256 "f6e79e525133ea8c72d4be4b0719299141a8b206b9f547fd27b882b06a817f01" => :catalina - sha256 "1e932ef0f54e09e9cf107c6ef386ff49e1b1cfd107eca77e4d1c5569da71909d" => :mojave - sha256 "efb82f38076361165896bbf906881331c349082464fa8fc0b6b81f4c58b52f0a" => :high_sierra - sha256 "c244ffda67d3e559172ba2b9e2b1015011733630232c203f733f259d8a6dd485" => :sierra - end - - depends_on "gettext" => :build - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gnutls" - depends_on "gtk+3" - depends_on "libgcrypt" - - # submitted upstream at https://gitlab.gnome.org/GNOME/gtk-vnc/merge_requests/4 - patch :DATA - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Dwith-vala=false", ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - system "#{bin}/gvnccapture", "--help" - end -end - -__END__ -diff --git a/src/meson.build b/src/meson.build -index 956f189..e238bc3 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -89,7 +89,7 @@ else - endif - - gvnc_link_args = [] --if host_machine.system() != 'windows' -+if meson.get_compiler('c').has_link_argument('-Wl,--no-undefined') - gvnc_link_args += ['-Wl,--no-undefined'] - endif - -@@ -116,6 +116,15 @@ gvnc_inc = [ - top_incdir, - ] - -+c_args = [] -+ -+if host_machine.system() == 'darwin' -+ # fix "The deprecated ucontext routines require _XOPEN_SOURCE to be defined" -+ c_args += ['-D_XOPEN_SOURCE=600'] -+ # for MAP_ANON -+ c_args += ['-D_DARWIN_C_SOURCE'] -+endif -+ - gvnc = library( - 'gvnc-1.0', - sources: gvnc_sources, -@@ -123,8 +132,10 @@ gvnc = library( - include_directories: gvnc_inc, - link_args: gvnc_link_args, - version: '0.0.1', -+ darwin_versions: ['1.0', '1.1'], - soversion: '0', - install: true, -+ c_args: c_args, - ) - - gvnc_dep = declare_dependency( -@@ -178,7 +189,7 @@ if libpulse_dep.found() - ] - - gvncpulse_link_args = [] -- if host_machine.system() != 'windows' -+ if meson.get_compiler('c').has_link_argument('-Wl,--no-undefined') - gvncpulse_link_args += ['-Wl,--no-undefined'] - endif - -@@ -206,6 +217,7 @@ if libpulse_dep.found() - include_directories: gvncpulse_inc, - link_args: gvncpulse_link_args, - version: '0.0.1', -+ darwin_versions: ['1.0', '1.1'], - soversion: '0', - install: true, - ) -@@ -337,7 +349,7 @@ endforeach - - - gtk_vnc_link_args = [] --if host_machine.system() != 'windows' -+if meson.get_compiler('c').has_link_argument('-Wl,--no-undefined') - gtk_vnc_link_args += ['-Wl,--no-undefined'] - endif - -@@ -369,6 +381,7 @@ gtk_vnc = library( - include_directories: gtk_vnc_inc, - link_args: gtk_vnc_link_args, - version: '0.0.2', -+ darwin_versions: ['1.0', '1.2'], - soversion: '0', - install: true, - ) diff --git a/Formula/gtkdatabox.rb b/Formula/gtkdatabox.rb deleted file mode 100644 index 864c47781e07d..0000000000000 --- a/Formula/gtkdatabox.rb +++ /dev/null @@ -1,86 +0,0 @@ -class Gtkdatabox < Formula - desc "Widget for live display of large amounts of changing data" - homepage "https://sourceforge.net/projects/gtkdatabox/" - url "https://downloads.sourceforge.net/project/gtkdatabox/gtkdatabox/0.9.3.1/gtkdatabox-0.9.3.1.tar.gz" - sha256 "d04938d969d5458bd0df1b4fa22f647fb2eeeef75555a71f967e6c039fb4bde5" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "e85124ef7180c8803f8700e9269a47d3b5841c1cdace25e6914a50a0b7389dd1" => :catalina - sha256 "bfb185bdad65010d94e7ec0d343f11dafb0135adecf0480a43b705a54b062ff1" => :mojave - sha256 "f0b09b52354b68f4bc4e2d01dcd970f5f5f6f549141dd75af3734a9b3c1f0b2f" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GtkWidget *db = gtk_databox_new(); - 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+"] - harfbuzz = Formula["harfbuzz"] - 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}/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#{harfbuzz.opt_include}/harfbuzz - -I#{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#{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 - -lgtkdatabox - -lintl - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gtkextra.rb b/Formula/gtkextra.rb deleted file mode 100644 index 3cf10662872f0..0000000000000 --- a/Formula/gtkextra.rb +++ /dev/null @@ -1,91 +0,0 @@ -class Gtkextra < Formula - desc "Widgets for creating GUIs for GTK+" - homepage "https://gtkextra.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gtkextra/3.3/gtkextra-3.3.4.tar.gz" - sha256 "651b738a78edbd5d6ccb64f5a256c39ec35fbbed898e54a3ab7e6cf8fd82f1d6" - revision 2 - - bottle do - cellar :any - rebuild 1 - sha256 "06663d6dcee70c6a18e9b29a32df23a6ac513c071f109ca190bc5ec3b7c2d0dd" => :catalina - sha256 "c38010856fc21985142ce72c0b07be8aba4d8b2d24e7a29fee497383d131efbc" => :mojave - sha256 "a18ed1a1fe359d9572ac5f334b522b175c0309168dbe1274f25884f9d062282e" => :high_sierra - sha256 "021592c075825331cf707f79c010fa75f1e688f821acfe167543236f8cdcc556" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--enable-tests", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(int argc, char *argv[]) { - GtkWidget *canvas = gtk_plot_canvas_new(GTK_PLOT_A4_H, GTK_PLOT_A4_W, 0.8); - 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+"] - harfbuzz = Formula["harfbuzz"] - 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}/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#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gtkextra-3.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 - -lgtkextra-quartz-3.0 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gtkglext.rb b/Formula/gtkglext.rb deleted file mode 100644 index 54fdf68559acd..0000000000000 --- a/Formula/gtkglext.rb +++ /dev/null @@ -1,153 +0,0 @@ -class Gtkglext < Formula - desc "OpenGL extension to GTK+" - homepage "https://projects.gnome.org/gtkglext/" - url "https://download.gnome.org/sources/gtkglext/1.2/gtkglext-1.2.0.tar.gz" - sha256 "e5073f3c6b816e7fa67d359d9745a5bb5de94a628ac85f624c992925a46844f9" - revision 3 - - bottle do - cellar :any - rebuild 1 - sha256 "4c7037249d9b85ad1aefe7aa015dfd6d6228572c735d3771bb4f4d093c7eb402" => :catalina - sha256 "47e6df4903aa0d42f746daad8e0069e6136468cb7e43ca19aa244ca375347c6c" => :mojave - sha256 "032ee12c02c6b7cd99a5fcd13ec0d34218ce2201d7e326f33154b9123b7f18df" => :high_sierra - sha256 "c4a324a42081a1fe90112ec887f5a1d8b0bd5284453e4b01ae357332fbd69de7" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gtk+" - - # All these MacPorts patches have already been included upstream. A new release - # of gtkglext for gtk+2.0 remains uncertain though. - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-configure.diff" - sha256 "aca35cd6ae28613b375301068715f82b59bd066a32b2f4d046177478950ab026" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-examples-pixmap-mixed.c.diff" - sha256 "d2fe00bfcf96b3c78dd4b01aa119a7860a34ca6080c57f0ccc7a8e2fc4a3c92b" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-examples-pixmap.c.diff" - sha256 "d955b18784d3e83c1f698e63875d98de5bad9eae1e84b66549dfe25d9ff94d51" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gdk-gdkglglext.h.diff" - sha256 "a1b6a97016013d5cda73760bbf2a970bae318153c2810291b81bd49ed67de80b" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gdk-gdkglquery.c.diff" - sha256 "a419b8d523f123d1ab59e4de1105cdfc72bf5a450db8031809dcbc84932b539f" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gdk-gdkglshapes.c.diff" - sha256 "bc01fccec833f7ede39ee06ecc2a2ad5d2b30cf703dc66d2a40a912104c6e1f5" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gdk-makefile.in.diff" - sha256 "d0bc857f258640bf4f423a79e8475e8cf86e24f9994c0a85475ce87f41bcded6" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gtk-gtkglwidget.c.diff" - sha256 "7f7918d5a83c8f36186026a92587117a94014e7b21203fe9eb96a1c751c3c317" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-gtk-makefile.in.diff" - sha256 "49f58421a12c2badd84ae6677752ba9cc23c249dac81987edf94abaf0d088ff6" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/21e7e01/gtkglext/patch-makefile.in.diff" - sha256 "0d112b417d6c51022e31701037aa49ea50f270d3a34c263599ac0ef64c2f6743" - end - - patch :p0 do - url "https://trac.macports.org/raw-attachment/ticket/56260/patch-index-gdkglshapes-osx.diff" - sha256 "699ddd676b12a6c087e3b0a7064cc9ef391eac3d84c531b661948bf1699ebcc5" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-x" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - int version_check = GTKGLEXT_CHECK_VERSION(1, 2, 0); - 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+"] - harfbuzz = Formula["harfbuzz"] - 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}/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#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gtkglext-1.0 - -I#{libpng.opt_include}/libpng16 - -I#{lib}/gtkglext-1.0/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#{gtkx.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lcairo - -lgdk-quartz-2.0 - -lgdk_pixbuf-2.0 - -lgdkglext-quartz-1.0 - -lgio-2.0 - -lglib-2.0 - -lgmodule-2.0 - -lgobject-2.0 - -lgtk-quartz-2.0 - -lgtkglext-quartz-1.0 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - -framework AppKit - -framework OpenGL - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gtkmm.rb b/Formula/gtkmm.rb deleted file mode 100644 index 87f45ce8d4199..0000000000000 --- a/Formula/gtkmm.rb +++ /dev/null @@ -1,124 +0,0 @@ -class Gtkmm < Formula - desc "C++ interfaces for GTK+ and GNOME" - homepage "https://www.gtkmm.org/" - url "https://download.gnome.org/sources/gtkmm/2.24/gtkmm-2.24.5.tar.xz" - sha256 "0680a53b7bf90b4e4bf444d1d89e6df41c777e0bacc96e9c09fc4dd2f5fe6b72" - revision 3 - - bottle do - cellar :any - sha256 "172050b87d5a7d4cd945722d80d5a8c933ed6329ad130ba9f92c0705a44acbbd" => :catalina - sha256 "bfa9c862a46b1ca66466e30ba6dfcb74bf69a345089aba76f6620f6aa28b69dc" => :mojave - sha256 "160a917c60ae9f41117f297a3bc8933fffb0084edccb6113fc7510798ad01d3e" => :high_sierra - sha256 "d525d513745bb81d43bcd3b43fc7067f64a8425640c9e1a959e94bd2c7d4eee9" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "atkmm" - depends_on "cairomm" - depends_on "glibmm" - depends_on "gtk+" - depends_on "libsigc++@2" - depends_on "pangomm" - - 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[]) { - Gtk::Label label("Hello World!"); - return 0; - } - EOS - atk = Formula["atk"] - atkmm = Formula["atkmm"] - cairo = Formula["cairo"] - cairomm = Formula["cairomm"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - gtkx = Formula["gtk+"] - harfbuzz = Formula["harfbuzz"] - libpng = Formula["libpng"] - libsigcxx = Formula["libsigc++@2"] - pango = Formula["pango"] - pangomm = Formula["pangomm"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{atkmm.opt_include}/atkmm-1.6 - -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#{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#{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#{gtkx.opt_include}/gtk-2.0 - -I#{gtkx.opt_include}/gtk-unix-print-2.0 - -I#{gtkx.opt_lib}/gtk-2.0/include - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gdkmm-2.4 - -I#{include}/gtkmm-2.4 - -I#{libpng.opt_include}/libpng16 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/gdkmm-2.4/include - -I#{lib}/gtkmm-2.4/include - -I#{pango.opt_include}/pango-1.0 - -I#{pangomm.opt_include}/pangomm-1.4 - -I#{pangomm.opt_lib}/pangomm-1.4/include - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{atkmm.opt_lib} - -L#{cairo.opt_lib} - -L#{cairomm.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{gtkx.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -L#{pangomm.opt_lib} - -latk-1.0 - -latkmm-1.6 - -lcairo - -lcairomm-1.0 - -lgdk-quartz-2.0 - -lgdk_pixbuf-2.0 - -lgdkmm-2.4 - -lgio-2.0 - -lgiomm-2.4 - -lglib-2.0 - -lglibmm-2.4 - -lgobject-2.0 - -lgtk-quartz-2.0 - -lgtkmm-2.4 - -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/gtkmm3.rb b/Formula/gtkmm3.rb deleted file mode 100644 index 03e5b6bbb54a9..0000000000000 --- a/Formula/gtkmm3.rb +++ /dev/null @@ -1,127 +0,0 @@ -class Gtkmm3 < Formula - desc "C++ interfaces for GTK+ and GNOME" - homepage "https://www.gtkmm.org/" - url "https://download.gnome.org/sources/gtkmm/3.24/gtkmm-3.24.2.tar.xz" - sha256 "6d71091bcd1863133460d4188d04102810e9123de19706fb656b7bb915b4adc3" - license "LGPL-2.1" - revision 1 - - bottle do - cellar :any - sha256 "c656b3844e5e94f34556e5b8b0b6ee3099e7a2c1b96c839229bbc9997c18218d" => :catalina - sha256 "12efd715a1422f80321a2af07a6d82d1e95772b4c23dea90d8138e3a22475886" => :mojave - sha256 "2183abaf056161d4d13d8bd86fc5795b3e32caf3db7c1a4b8a44eba320104402" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "atkmm" - depends_on "gtk+3" - depends_on "pangomm" - - def install - ENV.cxx11 - - system "./configure", "--disable-silent-rules", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - class MyLabel : public Gtk::Label { - MyLabel(Glib::ustring text) : Gtk::Label(text) {} - }; - int main(int argc, char *argv[]) { - return 0; - } - EOS - atk = Formula["atk"] - atkmm = Formula["atkmm"] - cairo = Formula["cairo"] - cairomm = Formula["cairomm"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - gtkx3 = Formula["gtk+3"] - harfbuzz = Formula["harfbuzz"] - libepoxy = Formula["libepoxy"] - libpng = Formula["libpng"] - libsigcxx = Formula["libsigc++@2"] - pango = Formula["pango"] - pangomm = Formula["pangomm"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{atkmm.opt_include}/atkmm-1.6 - -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#{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#{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#{gtkx3.opt_include} - -I#{gtkx3.opt_include}/gtk-3.0 - -I#{gtkx3.opt_include}/gtk-3.0/unix-print - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gdkmm-3.0 - -I#{include}/gtkmm-3.0 - -I#{libepoxy.opt_include} - -I#{libpng.opt_include}/libpng16 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/gdkmm-3.0/include - -I#{lib}/gtkmm-3.0/include - -I#{pango.opt_include}/pango-1.0 - -I#{pangomm.opt_include}/pangomm-1.4 - -I#{pangomm.opt_lib}/pangomm-1.4/include - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{atkmm.opt_lib} - -L#{cairo.opt_lib} - -L#{cairomm.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{gtkx3.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -L#{pangomm.opt_lib} - -latk-1.0 - -latkmm-1.6 - -lcairo - -lcairo-gobject - -lcairomm-1.0 - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgdkmm-3.0 - -lgio-2.0 - -lgiomm-2.4 - -lglib-2.0 - -lglibmm-2.4 - -lgobject-2.0 - -lgtk-3 - -lgtkmm-3.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/gtksourceview.rb b/Formula/gtksourceview.rb deleted file mode 100644 index bc055caddd8b8..0000000000000 --- a/Formula/gtksourceview.rb +++ /dev/null @@ -1,100 +0,0 @@ -class Gtksourceview < Formula - desc "Text view with syntax, undo/redo, and text marks" - homepage "https://projects.gnome.org/gtksourceview/" - url "https://download.gnome.org/sources/gtksourceview/2.10/gtksourceview-2.10.5.tar.gz" - sha256 "f5c3dda83d69c8746da78c1434585169dd8de1eecf2a6bcdda0d9925bf857c97" - revision 4 - - bottle do - rebuild 1 - sha256 "c17eddcfc4490429a25b8c2ebd5dd32ac430e8bb26230698910bde85d2b48af6" => :catalina - sha256 "240b0c4807eb0920d9e349898f637d1070eaff855a06ae8389e2894d359c3096" => :mojave - sha256 "ac6289f22ae87186413936732cba3aaaf9b8d15ff4b71c574bf6c874bb6d1df4" => :high_sierra - sha256 "eb5679608c0d4b848640218761d6978a7b1a914721b31e648d92ed8b5968bf85" => :sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gtk+" - depends_on "gtk-mac-integration" - - # patches added the ensure that gtk-mac-integration is supported properly instead - # of the old released called ige-mac-integration. - # These are already integrated upstream in their gnome-2-30 branch but a release of - # this remains highly unlikely - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/gtksourceview/2.10.5.patch" - sha256 "1c91cd534d73a0f9b0189da572296c5bd9f99e0bb0d3004a5e9cbd9f828edfaf" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GtkWidget *widget = gtk_source_view_new(); - 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"] - gtkx = Formula["gtk+"] - harfbuzz = Formula["harfbuzz"] - 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}/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#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gtksourceview-2.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 - -lgtksourceview-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/gtksourceview3.rb b/Formula/gtksourceview3.rb deleted file mode 100644 index 64ea449859489..0000000000000 --- a/Formula/gtksourceview3.rb +++ /dev/null @@ -1,99 +0,0 @@ -class Gtksourceview3 < Formula - desc "Text view with syntax, undo/redo, and text marks" - homepage "https://projects.gnome.org/gtksourceview/" - url "https://download.gnome.org/sources/gtksourceview/3.24/gtksourceview-3.24.11.tar.xz" - sha256 "691b074a37b2a307f7f48edc5b8c7afa7301709be56378ccf9cc9735909077fd" - revision 3 - - bottle do - sha256 "b34db76dca1649cd3ecb7a0e62904c093381902199b427d444e5974f3017c8ed" => :catalina - sha256 "fdd26532623b2ab2f6333c51ea0bb2addca737ab79b74c18ea4e5d49d687ce89" => :mojave - sha256 "310d80ce58f5e77fa2b3ca1867e081a1c03c2da31d7560faf8e0f218378e5a17" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gobject-introspection" => :build - depends_on "intltool" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "gettext" - depends_on "gtk+3" - - def install - system "autoreconf", "-fi" - system "./configure", "--disable-dependency-tracking", - "--enable-vala=yes", - "--enable-introspection=yes", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - gchar *text = gtk_source_utils_unescape_search_text("hello world"); - 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"] - 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#{gtkx3.opt_include}/gtk-3.0 - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gtksourceview-3.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#{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 - -lcairo - -lcairo-gobject - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lgtk-3 - -lgtksourceview-3.0 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gtksourceview4.rb b/Formula/gtksourceview4.rb deleted file mode 100644 index 1790960d7ab1b..0000000000000 --- a/Formula/gtksourceview4.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Gtksourceview4 < Formula - desc "Text view with syntax, undo/redo, and text marks" - homepage "https://projects.gnome.org/gtksourceview/" - url "https://download.gnome.org/sources/gtksourceview/4.6/gtksourceview-4.6.1.tar.xz" - sha256 "63f487a7ab59612ffa9e7be1883dbd274ab1016afcede3239b93b0fc384df874" - license "LGPL-2.1" - revision 1 - - bottle do - sha256 "3372d364163e22dcbd3306835788a6cb6578bd8e6828a456f4d89bc8779aa756" => :catalina - sha256 "e0653a0d167b7daaf1642f322d4c3b40e4e068958328cefa0b5f473e0797bb00" => :mojave - sha256 "9ac5ec8943202490a696877b8df00395588f14cf9331c7badda0f316c8de6d97" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "gtk+3" - - def install - args = std_meson_args + %w[ - -Dgir=true - -Dvapi=true - ] - - mkdir "build" do - system "meson", *args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - gchar *text = gtk_source_utils_unescape_search_text("hello world"); - 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"] - 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#{gtkx3.opt_include}/gtk-3.0 - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gtksourceview-4 - -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#{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 - -lcairo - -lcairo-gobject - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -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/gtksourceviewmm.rb b/Formula/gtksourceviewmm.rb deleted file mode 100644 index 11128ebd827f4..0000000000000 --- a/Formula/gtksourceviewmm.rb +++ /dev/null @@ -1,130 +0,0 @@ -class Gtksourceviewmm < Formula - desc "C++ bindings for gtksourceview" - homepage "https://developer.gnome.org/gtksourceviewmm/" - url "https://download.gnome.org/sources/gtksourceviewmm/2.10/gtksourceviewmm-2.10.3.tar.xz" - sha256 "0000df1b582d7be2e412020c5d748f21c0e6e5074c6b2ca8529985e70479375b" - revision 6 - - bottle do - cellar :any - sha256 "11a112b786ce66947f6a9a0988d7ecafe62360492e0bab36490bb9bf63e50a17" => :catalina - sha256 "3cc10eb3380492729132b0518d0ad95ab81cd88ece8b871ddb139c0517f89a41" => :mojave - sha256 "4b1dfd6e1b0a4a78e33f49a4fdf95b1d880bc2148049be74fa6b5b8cb8532372" => :high_sierra - sha256 "f7d4623be50ab3901c895998c87b1d5719aff1d2e92f5974a98f71d5f5ed6911" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gtkmm" - depends_on "gtksourceview" - - 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[]) { - gtksourceview::init(); - return 0; - } - EOS - ENV.libxml2 - atk = Formula["atk"] - atkmm = Formula["atkmm"] - cairo = Formula["cairo"] - cairomm = Formula["cairomm"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - gtkx = Formula["gtk+"] - gtkmm = Formula["gtkmm"] - gtksourceview = Formula["gtksourceview"] - harfbuzz = Formula["harfbuzz"] - libpng = Formula["libpng"] - libsigcxx = Formula["libsigc++@2"] - pango = Formula["pango"] - pangomm = Formula["pangomm"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{atkmm.opt_include}/atkmm-1.6 - -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#{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#{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#{gtkmm.opt_include}/gdkmm-2.4 - -I#{gtkmm.opt_include}/gtkmm-2.4 - -I#{gtkmm.opt_lib}/gdkmm-2.4/include - -I#{gtkmm.opt_lib}/gtkmm-2.4/include - -I#{gtksourceview.opt_include}/gtksourceview-2.0 - -I#{gtkx.opt_include}/gtk-2.0 - -I#{gtkx.opt_include}/gtk-unix-print-2.0 - -I#{gtkx.opt_lib}/gtk-2.0/include - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gtksourceviewmm-2.0 - -I#{libpng.opt_include}/libpng16 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/gtksourceviewmm-2.0/include - -I#{pango.opt_include}/pango-1.0 - -I#{pangomm.opt_include}/pangomm-1.4 - -I#{pangomm.opt_lib}/pangomm-1.4/include - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{atkmm.opt_lib} - -L#{cairo.opt_lib} - -L#{cairomm.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{gtkmm.opt_lib} - -L#{gtksourceview.opt_lib} - -L#{gtkx.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -L#{pangomm.opt_lib} - -latk-1.0 - -latkmm-1.6 - -lcairo - -lcairomm-1.0 - -lgdk-quartz-2.0 - -lgdk_pixbuf-2.0 - -lgdkmm-2.4 - -lgio-2.0 - -lgiomm-2.4 - -lglib-2.0 - -lglibmm-2.4 - -lgobject-2.0 - -lgtk-quartz-2.0 - -lgtkmm-2.4 - -lgtksourceview-2.0 - -lgtksourceviewmm-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/gtksourceviewmm3.rb b/Formula/gtksourceviewmm3.rb deleted file mode 100644 index 7b07b293cae37..0000000000000 --- a/Formula/gtksourceviewmm3.rb +++ /dev/null @@ -1,132 +0,0 @@ -class Gtksourceviewmm3 < Formula - desc "C++ bindings for gtksourceview3" - homepage "https://developer.gnome.org/gtksourceviewmm/" - url "https://download.gnome.org/sources/gtksourceviewmm/3.18/gtksourceviewmm-3.18.0.tar.xz" - sha256 "51081ae3d37975dae33d3f6a40621d85cb68f4b36ae3835eec1513482aacfb39" - revision 5 - - bottle do - cellar :any - sha256 "d35b302c510fb00351509ce3e0be7b9987e5e85f82ce081c193c7ede8e23222c" => :catalina - sha256 "b3c787892287e10195221b827bb4a98e93cbe374ff5d157a093e1439d2cb3f8f" => :mojave - sha256 "f0c576ddf05f4098af489f9cd7aa228e9c996fa77a81b820ac52fc1353119719" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gtkmm3" - depends_on "gtksourceview3" - - 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[]) { - Gsv::init(); - return 0; - } - EOS - ENV.libxml2 - atk = Formula["atk"] - atkmm = Formula["atkmm"] - cairo = Formula["cairo"] - cairomm = Formula["cairomm"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - gtkx3 = Formula["gtk+3"] - gtkmm3 = Formula["gtkmm3"] - gtksourceview3 = Formula["gtksourceview3"] - harfbuzz = Formula["harfbuzz"] - libepoxy = Formula["libepoxy"] - libpng = Formula["libpng"] - libsigcxx = Formula["libsigc++@2"] - pango = Formula["pango"] - pangomm = Formula["pangomm"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{atkmm.opt_include}/atkmm-1.6 - -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#{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#{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#{gtkmm3.opt_include}/gdkmm-3.0 - -I#{gtkmm3.opt_include}/gtkmm-3.0 - -I#{gtkmm3.opt_lib}/gdkmm-3.0/include - -I#{gtkmm3.opt_lib}/gtkmm-3.0/include - -I#{gtksourceview3.opt_include}/gtksourceview-3.0 - -I#{gtkx3.opt_include}/gtk-3.0 - -I#{gtkx3.opt_include}/gtk-3.0/unix-print - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gtksourceviewmm-3.0 - -I#{libepoxy.opt_include} - -I#{libpng.opt_include}/libpng16 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/gtksourceviewmm-3.0/include - -I#{pango.opt_include}/pango-1.0 - -I#{pangomm.opt_include}/pangomm-1.4 - -I#{pangomm.opt_lib}/pangomm-1.4/include - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{atkmm.opt_lib} - -L#{cairo.opt_lib} - -L#{cairomm.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{gtkmm3.opt_lib} - -L#{gtksourceview3.opt_lib} - -L#{gtkx3.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -L#{pangomm.opt_lib} - -latk-1.0 - -latkmm-1.6 - -lcairo - -lcairo-gobject - -lcairomm-1.0 - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgdkmm-3.0 - -lgio-2.0 - -lgiomm-2.4 - -lglib-2.0 - -lglibmm-2.4 - -lgobject-2.0 - -lgtk-3 - -lgtkmm-3.0 - -lgtksourceview-3.0 - -lgtksourceviewmm-3.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/gtkspell3.rb b/Formula/gtkspell3.rb deleted file mode 100644 index bb34fe9deda7a..0000000000000 --- a/Formula/gtkspell3.rb +++ /dev/null @@ -1,103 +0,0 @@ -class Gtkspell3 < Formula - desc "Gtk widget for highlighting and replacing misspelled words" - homepage "https://gtkspell.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gtkspell/3.0.10/gtkspell3-3.0.10.tar.xz" - sha256 "b040f63836b347eb344f5542443dc254621805072f7141d49c067ecb5a375732" - revision 3 - - bottle do - sha256 "b3b9eff2b9b11085e6b16cf50165031ab7446cd78aa125afd358747a67419bd8" => :catalina - sha256 "1d41a37ab6c27e572e59bf7a0aaf1f66cfbbe587fffb5e9fdcc2749c24be4b26" => :mojave - sha256 "590fb3c9f5b1f978d385128db8c8aec91b0285a3dbead32bc19c127d9a35bb50" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gobject-introspection" => :build - depends_on "intltool" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "enchant" - depends_on "gtk+3" - - def install - system "autoreconf", "-fi" - system "./configure", "--disable-dependency-tracking", - "--disable-debug", - "--enable-vala", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GList *list = gtk_spell_checker_get_language_list(); - return 0; - } - EOS - atk = Formula["atk"] - cairo = Formula["cairo"] - enchant = Formula["enchant"] - 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"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{cairo.opt_include}/cairo - -I#{enchant.opt_include}/enchant-2 - -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}/gtkspell-3.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#{enchant.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 - -lcairo - -lcairo-gobject - -lenchant-2 - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgmodule-2.0 - -lgobject-2.0 - -lgtk-3 - -lgtkspell3-3 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gtmess.rb b/Formula/gtmess.rb deleted file mode 100644 index 42026221a275e..0000000000000 --- a/Formula/gtmess.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Gtmess < Formula - desc "Console MSN messenger client" - homepage "https://gtmess.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gtmess/gtmess/0.97/gtmess-0.97.tar.gz" - sha256 "606379bb06fa70196e5336cbd421a69d7ebb4b27f93aa1dfd23a6420b3c6f5c6" - license "GPL-2.0" - revision 2 - - bottle do - sha256 "3c8e2979b478bfe761e2baf263ce4bfdee03426d853ee10faaba353481a21420" => :catalina - sha256 "9b5e2ecdb133c3a069305f572ec6d172dfaf10371459e44cc84574b08d2db19c" => :mojave - sha256 "90d1a2aeab88db7022e64335d101d2a10a045a3b8d6c443381ade99b2c13e2d1" => :high_sierra - sha256 "e8568ea56b4f24521472ae51b4f00bcd704791ec1bcbd6a8a250c7a1e2c43c04" => :sierra - end - - head do - url "https://github.com/geotz/gtmess.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "openssl@1.1" - - def install - system "autoreconf", "-fvi" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-ssl=#{Formula["openssl@1.1"].opt_prefix}" - system "make", "install" - end - - test do - system "#{bin}/gtmess", "--version" - end -end diff --git a/Formula/gtranslator.rb b/Formula/gtranslator.rb deleted file mode 100644 index efeedd5c68f15..0000000000000 --- a/Formula/gtranslator.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Gtranslator < Formula - desc "GNOME gettext PO file editor" - homepage "https://wiki.gnome.org/Design/Apps/Translator" - url "https://download.gnome.org/sources/gtranslator/3.36/gtranslator-3.36.0.tar.xz" - sha256 "2daa1d3b59b4a35ef54df087345b03e1703e725081f9dac543539228a715add3" - revision 3 - - bottle do - sha256 "33dd6fa5518dd793a54e79a1245fa8c339ab396d75e593477f64145d9c2ff877" => :catalina - sha256 "2f8aa54a06d06dd3dab570d2031ce66bb92a90c888999dda38126de9aceef859" => :mojave - sha256 "801eaf1384023bc5345dee58ae35a07b53d25c8fe69cad1b1a12a5b6158b812d" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "glib" - depends_on "gspell" - depends_on "gtk+3" - depends_on "gtksourceview4" - depends_on "iso-codes" - depends_on "itstool" - depends_on "json-glib" - depends_on "libdazzle" - depends_on "libgda" - depends_on "libsoup" - - 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", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - 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 - system "#{bin}/gtranslator", "-h" - end -end diff --git a/Formula/gts.rb b/Formula/gts.rb deleted file mode 100644 index 3d562f8e5d4d1..0000000000000 --- a/Formula/gts.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Gts < Formula - desc "GNU triangulated surface library" - homepage "https://gts.sourceforge.io/" - url "https://downloads.sourceforge.net/project/gts/gts/0.7.6/gts-0.7.6.tar.gz" - sha256 "059c3e13e3e3b796d775ec9f96abdce8f2b3b5144df8514eda0cc12e13e8b81e" - revision 2 - - bottle do - cellar :any - sha256 "8a0c9b4f60a2cbea2e2e3469880284c2373843e676aaf58c1ff28d1e31c2ccb9" => :catalina - sha256 "e0ba5b2700ba2a0c88a6345117a699c08f47738d3e727dbc64d815d1a3b7492b" => :mojave - sha256 "5aa85562ed3d0aad446825d7c4e3cc717f8044a2c638bbdcdd0e18bc0f366e81" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "netpbm" - - # Fix for newer netpbm. - # This software hasn't been updated in seven years - patch :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - - system "make", "install" - end -end - -__END__ -diff --git a/examples/happrox.c b/examples/happrox.c -index 88770a8..11f140d 100644 ---- a/examples/happrox.c -+++ b/examples/happrox.c -@@ -21,7 +21,7 @@ - #include - #include - #include --#include -+#include - #include "config.h" - #ifdef HAVE_GETOPT_H - # include diff --git a/Formula/gucharmap.rb b/Formula/gucharmap.rb deleted file mode 100644 index 3a06e88e239e6..0000000000000 --- a/Formula/gucharmap.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Gucharmap < Formula - desc "GNOME Character Map, based on the Unicode Character Database" - homepage "https://wiki.gnome.org/Apps/Gucharmap" - url "https://download.gnome.org/sources/gucharmap/12.0/gucharmap-12.0.1.tar.xz" - sha256 "39de8aad9d7f0af33c29db1a89f645e76dad2fce00d1a0f7c8a689252a2c2155" - revision 3 - - bottle do - sha256 "732ed6b19cd29d595941397082369c61c35a4e960ca0b36e4dd306cc7a97b06e" => :catalina - sha256 "a01bf4f29277930ae3376a8d6a69c762d95ba0d1e2807af55f7ec8e3c41866cb" => :mojave - sha256 "9c3fbd03c494d4dfa3f126d070e033529aa71d1902674d1b70c1c2ccb73f5835" => :high_sierra - end - - depends_on "coreutils" => :build - depends_on "desktop-file-utils" => :build - depends_on "intltool" => :build - depends_on "itstool" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "gtk+3" - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].opt_lib}/python#{xy}/site-packages" - ENV["WGET"] = "curl" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--disable-Bsymbolic", - "--disable-schemas-compile", - "--enable-introspection=no", - "--with-unicode-data=download" - system "make", "WGETFLAGS=--remote-name --remote-time --connect-timeout 30 --retry 8" - 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}/gucharmap", "--version" - end -end diff --git a/Formula/guetzli.rb b/Formula/guetzli.rb deleted file mode 100644 index 0f5b3208541fb..0000000000000 --- a/Formula/guetzli.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Guetzli < Formula - desc "Perceptual JPEG encoder" - homepage "https://github.com/google/guetzli" - url "https://github.com/google/guetzli/archive/v1.0.1.tar.gz" - sha256 "e52eb417a5c0fb5a3b08a858c8d10fa797627ada5373e203c196162d6a313697" - license "Apache-2.0" - head "https://github.com/google/guetzli.git" - - bottle do - cellar :any - sha256 "14605bd3ba2aa89d0030d3935eb5ffa022712fc6eef43f969bc301beda218af6" => :catalina - sha256 "1599d5e292f5ca4ade99ab2627d3a0d2a3450011317dff9d5a46d779af20b01a" => :mojave - sha256 "1b3a1b5544b7a8c30553b2e8ac669d8e924d0164feb5355b0a7c2ef5807aca46" => :high_sierra - sha256 "c059346fa601885f550b50752d6d1a23eced66388b18e1c1db5169a0951dcad6" => :sierra - sha256 "a77327b3964a88a84879943171e0d10d6661cc72c5ceaa12ee2091f02930da1a" => :el_capitan - sha256 "04864f5c52c77f2d382247a57bf082052599a2bc9bd8fa28592ab17657342b08" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "libpng" - - resource "test_image" do - url "https://github.com/google/guetzli/releases/download/v1.0/bees.png" - sha256 "2c1784bf4efb90c57f00a3ab4898ac8ec4784c60d7a0f70d2ba2c00af910520b" - end - - def install - system "make" - bin.install "bin/Release/guetzli" - end - - test do - resource("test_image").stage { system "#{bin}/guetzli", "bees.png", "bees.jpg" } - end -end diff --git a/Formula/guichan.rb b/Formula/guichan.rb deleted file mode 100644 index 3e700ae682467..0000000000000 --- a/Formula/guichan.rb +++ /dev/null @@ -1,175 +0,0 @@ -class Guichan < Formula - desc "Small, efficient C++ GUI library designed for games" - homepage "https://guichan.sourceforge.io/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/guichan/guichan-0.8.2.tar.gz" - sha256 "eedf206eae5201eaae027b133226d0793ab9a287bfd74c5f82c7681e3684eeab" - - bottle do - cellar :any - rebuild 1 - sha256 "fcc36306d344d47e3151ee1447e00b590cf2d079397f4302301dd7a5fca4bb6f" => :catalina - sha256 "20887eab0782fcd2eb3e922b1f388831057b0faaeab519e98590118853c48e3c" => :mojave - sha256 "c685850224a216a61b5d0fb96aeb56935deb2187f2781bac7e64668e93baf3ab" => :high_sierra - sha256 "d98d6bdc213bca6d4d6fbf904e91f45dd678996ae5522b194805e3bd098c87fb" => :sierra - end - - depends_on "sdl_image" - - resource "fixedfont.bmp" do - url "https://guichan.sourceforge.io/oldsite/images/fixedfont.bmp" - sha256 "fc6144c8fefa27c207560820450abb41378c705a0655f536ce33e44a5332c5cc" - end - - def install - ENV.append "CPPFLAGS", "-I#{Formula["sdl_image"].opt_include}/SDL" - ENV.append "LDFLAGS", "-lSDL -lSDL_image -framework OpenGL" - inreplace "src/opengl/Makefile.in", "-no-undefined", " " - inreplace "src/sdl/Makefile.in", "-no-undefined", " " - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - testpath.install resource("fixedfont.bmp") - (testpath/"helloworld.cpp").write <<~EOS - #include - #include - #include - #include "SDL/SDL.h" - - bool running = true; - - SDL_Surface* screen; - SDL_Event event; - - gcn::SDLInput* input; // Input driver - gcn::SDLGraphics* graphics; // Graphics driver - gcn::SDLImageLoader* imageLoader; // For loading images - - gcn::Gui* gui; // A Gui object - binds it all together - gcn::Container* top; // A top container - gcn::ImageFont* font; // A font - gcn::Label* label; // And a label for the Hello World text - - void init() - { - SDL_Init(SDL_INIT_VIDEO); - screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE); - SDL_EnableUNICODE(1); - SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); - - imageLoader = new gcn::SDLImageLoader(); - gcn::Image::setImageLoader(imageLoader); - graphics = new gcn::SDLGraphics(); - graphics->setTarget(screen); - input = new gcn::SDLInput(); - - top = new gcn::Container(); - top->setDimension(gcn::Rectangle(0, 0, 640, 480)); - gui = new gcn::Gui(); - gui->setGraphics(graphics); - gui->setInput(input); - gui->setTop(top); - font = new gcn::ImageFont("fixedfont.bmp", " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); - gcn::Widget::setGlobalFont(font); - - label = new gcn::Label("Hello World"); - label->setPosition(280, 220); - top->add(label); - } - - void halt() - { - delete label; - delete font; - delete top; - delete gui; - delete input; - delete graphics; - delete imageLoader; - } - - void checkInput() - { - while(SDL_PollEvent(&event)) - { - if (event.type == SDL_KEYDOWN) - { - if (event.key.keysym.sym == SDLK_ESCAPE) - { - running = false; - } - if (event.key.keysym.sym == SDLK_f) - { - if (event.key.keysym.mod & KMOD_CTRL) - { - // Works with X11 only - SDL_WM_ToggleFullScreen(screen); - } - } - } - else if(event.type == SDL_QUIT) - { - running = false; - } - input->pushInput(event); - } - } - - void run() - { - while(running) - { - checkInput(); - gui->logic(); - gui->draw(); - SDL_Flip(screen); - } - } - - int main(int argc, char **argv) - { - try - { - init(); - run(); - halt(); - } - catch (gcn::Exception e) - { - std::cerr << e.getMessage() << std::endl; - return 1; - } - catch (std::exception e) - { - std::cerr << "Std exception: " << e.what() << std::endl; - return 1; - } - catch (...) - { - std::cerr << "Unknown exception" << std::endl; - return 1; - } - return 0; - } - EOS - system ENV.cc, "helloworld.cpp", ENV.cppflags, - "-I#{HOMEBREW_PREFIX}/include/SDL", - "-L#{Formula["sdl"].opt_lib}", - "-L#{Formula["sdl_image"].opt_lib}", - "-framework", "Foundation", - "-framework", "CoreGraphics", - "-framework", "Cocoa", - "-lSDL", "-lSDLmain", "-lSDL_image", - "-L#{lib}", "-lguichan", "-lguichan_sdl", - "-lobjc", "-lc++", "-o", "helloworld" - helloworld = fork do - system testpath/"helloworld" - end - Process.kill("TERM", helloworld) - end -end diff --git a/Formula/guile.rb b/Formula/guile.rb deleted file mode 100644 index 142d7a4d8e72e..0000000000000 --- a/Formula/guile.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Guile < Formula - desc "GNU Ubiquitous Intelligent Language for Extensions" - homepage "https://www.gnu.org/software/guile/" - url "https://ftp.gnu.org/gnu/guile/guile-3.0.4.tar.xz" - mirror "https://ftpmirror.gnu.org/guile/guile-3.0.4.tar.xz" - sha256 "6b7947dc2e3d115983846a268b8f5753c12fd5547e42fbf2b97d75a3b79f0d31" - - bottle do - rebuild 1 - sha256 "82d5ae8de3a1c8bf11e35b53487d6dbd14536376d04b9939df052f2eac66f0f0" => :catalina - sha256 "ed3f5ae6d9331860184d93c8e4d3e230c4b1558a330a9a23042115aef17c7ed5" => :mojave - sha256 "1e02fde47f568f75a58911b9c14ba60169c77ed09bdddb9038a4b89adc153b9d" => :high_sierra - end - - head do - url "https://git.savannah.gnu.org/git/guile.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - uses_from_macos "flex" => :build - end - - depends_on "gnu-sed" => :build - depends_on "bdw-gc" - depends_on "gmp" - depends_on "libffi" - depends_on "libtool" - depends_on "libunistring" - depends_on "pkg-config" # guile-config is a wrapper around pkg-config. - depends_on "readline" - - on_linux do - depends_on "gperf" - end - - def install - # Work around Xcode 11 clang bug - # https://bitbucket.org/multicoreware/x265/issues/514/wrong-code-generated-on-macos-1015 - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - # Avoid superenv shim - inreplace "meta/guile-config.in", "@PKG_CONFIG@", Formula["pkg-config"].opt_bin/"pkg-config" - - system "./autogen.sh" unless build.stable? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-libreadline-prefix=#{Formula["readline"].opt_prefix}", - "--with-libgmp-prefix=#{Formula["gmp"].opt_prefix}" - system "make", "install" - - # A really messed up workaround required on macOS --mkhl - Pathname.glob("#{lib}/*.dylib") do |dylib| - lib.install_symlink dylib.basename => "#{dylib.basename(".dylib")}.so" - end - - # This is either a solid argument for guile including options for - # --with-xyz-prefix= for libffi and bdw-gc or a solid argument for - # Homebrew automatically removing Cellar paths from .pc files in favour - # of opt_prefix usage everywhere. - inreplace lib/"pkgconfig/guile-3.0.pc" do |s| - s.gsub! Formula["bdw-gc"].prefix.realpath, Formula["bdw-gc"].opt_prefix - s.gsub! Formula["libffi"].prefix.realpath, Formula["libffi"].opt_prefix - end - - (share/"gdb/auto-load").install Dir["#{lib}/*-gdb.scm"] - end - - def post_install - # Create directories so installed modules can create links inside. - (HOMEBREW_PREFIX/"lib/guile/3.0/site-ccache").mkpath - (HOMEBREW_PREFIX/"lib/guile/3.0/extensions").mkpath - (HOMEBREW_PREFIX/"share/guile/site/3.0").mkpath - end - - def caveats - <<~EOS - Guile libraries can now be installed here: - Source files: #{HOMEBREW_PREFIX}/share/guile/site/3.0 - Compiled files: #{HOMEBREW_PREFIX}/lib/guile/3.0/site-ccache - Extensions: #{HOMEBREW_PREFIX}/lib/guile/3.0/extensions - - Add the following to your .bashrc or equivalent: - export GUILE_LOAD_PATH="#{HOMEBREW_PREFIX}/share/guile/site/3.0" - export GUILE_LOAD_COMPILED_PATH="#{HOMEBREW_PREFIX}/lib/guile/3.0/site-ccache" - export GUILE_SYSTEM_EXTENSIONS_PATH="#{HOMEBREW_PREFIX}/lib/guile/3.0/extensions" - EOS - end - - test do - hello = testpath/"hello.scm" - hello.write <<~EOS - (display "Hello World") - (newline) - EOS - - ENV["GUILE_AUTO_COMPILE"] = "0" - - system bin/"guile", hello - end -end diff --git a/Formula/guile@2.rb b/Formula/guile@2.rb deleted file mode 100644 index fe1e5cf82a7f9..0000000000000 --- a/Formula/guile@2.rb +++ /dev/null @@ -1,69 +0,0 @@ -class GuileAT2 < Formula - desc "GNU Ubiquitous Intelligent Language for Extensions" - homepage "https://www.gnu.org/software/guile/" - url "https://ftp.gnu.org/gnu/guile/guile-2.2.7.tar.xz" - mirror "https://ftpmirror.gnu.org/guile/guile-2.2.7.tar.xz" - sha256 "cdf776ea5f29430b1258209630555beea6d2be5481f9da4d64986b077ff37504" - - bottle do - sha256 "2821f055df7815abc7467a42f1bd90a09672261a9aad4ce994111a59a2ce6dbe" => :catalina - sha256 "78e5fd69581a54b8d7c701e1fc03d96660b80a2699d7dad701cdd2865a5f2442" => :mojave - sha256 "2832668210b0ef94ae0596c7e27aca846f76453719df6a9103e34af9e885d031" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! - - depends_on "gnu-sed" => :build - depends_on "bdw-gc" - depends_on "gmp" - depends_on "libffi" - depends_on "libtool" - depends_on "libunistring" - depends_on "pkg-config" # guile-config is a wrapper around pkg-config. - depends_on "readline" - - def install - # Work around Xcode 11 clang bug - # https://bitbucket.org/multicoreware/x265/issues/514/wrong-code-generated-on-macos-1015 - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - # Avoid superenv shim - inreplace "meta/guile-config.in", "@PKG_CONFIG@", Formula["pkg-config"].opt_bin/"pkg-config" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-libreadline-prefix=#{Formula["readline"].opt_prefix}", - "--with-libgmp-prefix=#{Formula["gmp"].opt_prefix}" - system "make", "install" - - # A really messed up workaround required on macOS --mkhl - Pathname.glob("#{lib}/*.dylib") do |dylib| - lib.install_symlink dylib.basename => "#{dylib.basename(".dylib")}.so" - end - - # This is either a solid argument for guile including options for - # --with-xyz-prefix= for libffi and bdw-gc or a solid argument for - # Homebrew automatically removing Cellar paths from .pc files in favour - # of opt_prefix usage everywhere. - inreplace lib/"pkgconfig/guile-2.2.pc" do |s| - s.gsub! Formula["bdw-gc"].prefix.realpath, Formula["bdw-gc"].opt_prefix - s.gsub! Formula["libffi"].prefix.realpath, Formula["libffi"].opt_prefix - end - - (share/"gdb/auto-load").install Dir["#{lib}/*-gdb.scm"] - end - - test do - hello = testpath/"hello.scm" - hello.write <<~EOS - (display "Hello World") - (newline) - EOS - - ENV["GUILE_AUTO_COMPILE"] = "0" - - system bin/"guile", hello - end -end diff --git a/Formula/gumbo-parser.rb b/Formula/gumbo-parser.rb deleted file mode 100644 index 21c555d2ac28d..0000000000000 --- a/Formula/gumbo-parser.rb +++ /dev/null @@ -1,45 +0,0 @@ -class GumboParser < Formula - desc "C99 library for parsing HTML5" - homepage "https://github.com/google/gumbo-parser" - url "https://github.com/google/gumbo-parser/archive/v0.10.1.tar.gz" - sha256 "28463053d44a5dfbc4b77bcf49c8cee119338ffa636cc17fc3378421d714efad" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "c922c8ec4425cef96e3283bace0ffda97cdd5f4946ca151da69045c6ce80ef06" => :catalina - sha256 "aa6ed085625f40a65ecead082bd711dcb16af9aed6f74372edb7dc19e44fba5c" => :mojave - sha256 "ed0957fe59981b55c1baf149022a5b0f3a163f1a6eb6e03e402da2f018406b9f" => :high_sierra - sha256 "7c911b3f74827405abdf92cb6f6265cf7185043af4101d851eb68c5e69ea71e6" => :sierra - sha256 "56f5446eb431b628655748659a8a7479466e00addf7d90070464364a3f3cafa9" => :el_capitan - sha256 "02169cdaafcf9343bacf98e0e34b1f7383eb0b1b89385965d81796e110f8c38f" => :yosemite - sha256 "efc9658f05e6543d7faed663ef7106c5720e72a86672d7ef000372babade1e43" => :mavericks - 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", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "gumbo.h" - - int main() { - GumboOutput* output = gumbo_parse("

Hello, World!

"); - gumbo_destroy_output(&kGumboDefaultOptions, output); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lgumbo", "-o", "test" - system "./test" - end -end diff --git a/Formula/gupnp-av.rb b/Formula/gupnp-av.rb deleted file mode 100644 index 3d95860b35aa2..0000000000000 --- a/Formula/gupnp-av.rb +++ /dev/null @@ -1,28 +0,0 @@ -class GupnpAv < Formula - desc "Library to help implement UPnP A/V profiles" - homepage "https://wiki.gnome.org/GUPnP/" - url "https://download.gnome.org/sources/gupnp-av/0.12/gupnp-av-0.12.11.tar.xz" - sha256 "689dcf1492ab8991daea291365a32548a77d1a2294d85b33622b55cca9ce6fdc" - revision 2 - - bottle do - sha256 "6e0cf541932104a1259005b3d125d96c72c80e2dffc7d8d4b5ddb199c7bdd237" => :catalina - sha256 "15f5c2ec832094d098ebbc52c1a327ce7e6125293180e7acc377bc7dcc3d5210" => :mojave - sha256 "7149d11d69541003e8fc3b1d0da0b125b6dac5329db3017a735858363f31e78c" => :high_sierra - sha256 "dc21d3e8e793fffde5b7b734be587f3a736f94f03f8bfa42ca5ae395be6081a3" => :sierra - end - - depends_on "gobject-introspection" => :build - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - - def install - ENV["ax_cv_check_cflags__Wl___no_as_needed"] = "no" - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/gupnp-tools.rb b/Formula/gupnp-tools.rb deleted file mode 100644 index 39e0e62365d41..0000000000000 --- a/Formula/gupnp-tools.rb +++ /dev/null @@ -1,36 +0,0 @@ -class GupnpTools < Formula - desc "Free replacements of Intel's UPnP tools" - homepage "https://wiki.gnome.org/GUPnP/" - url "https://download.gnome.org/sources/gupnp-tools/0.10/gupnp-tools-0.10.0.tar.xz" - sha256 "41da7ff5ba8e2425adcb64ca5e04c81f57ca20ec6fdb84923939fdad42c6a18d" - revision 3 - - bottle do - sha256 "50ea87e51a1ded32ea3aca221e05f0b9812994b36c659069567bc05d30c4355b" => :catalina - sha256 "9bac2d4f913429bd683502cb4757fd58f119cb0e16d7f4ddce26df6ff1187d2d" => :mojave - sha256 "a7be90e6f182e9f3650db2de237532d45453b71986b97b808c51ed3e204837c8" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gtk+3" - depends_on "gtksourceview4" - depends_on "gupnp" - depends_on "gupnp-av" - depends_on "libsoup" - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - system "#{bin}/gupnp-universal-cp", "-h" - system "#{bin}/gupnp-av-cp", "-h" - end -end diff --git a/Formula/gupnp.rb b/Formula/gupnp.rb deleted file mode 100644 index 3d9f5308bf78f..0000000000000 --- a/Formula/gupnp.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Gupnp < Formula - include Language::Python::Shebang - - desc "Framework for creating UPnP devices and control points" - homepage "https://wiki.gnome.org/Projects/GUPnP" - url "https://download.gnome.org/sources/gupnp/1.2/gupnp-1.2.3.tar.xz" - sha256 "d447e54d88e4a8fab84ad1766070e9208e21166fc7e2ce95df6e33e49e8d29b1" - - bottle do - cellar :any - sha256 "c3293403d47e51ae9ae4bec506dc3ca54209769165fd98c6807f0876825d8195" => :catalina - sha256 "c06a3a4c5ffe1b21b2c362e1dcb08d063e2bab5a54eaa3f78f72a0ef39c7b5a4" => :mojave - sha256 "db6c7a1a1f48689266050b0e8e71329fd9d5aaec68090c61c22b9475e6a75e24" => :high_sierra - end - - depends_on "docbook-xsl" => :build - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "gssdp" - depends_on "libsoup" - depends_on "python@3.8" - - def install - mkdir "build" do - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - system "meson", *std_meson_args, ".." - system "ninja" - system "ninja", "install" - bin.find { |f| rewrite_shebang detected_python_shebang, f } - end - end - - test do - system bin/"gupnp-binding-tool-1.2", "--help" - (testpath/"test.c").write <<~EOS - #include - - static GMainLoop *main_loop; - - int main (int argc, char **argv) - { - GUPnPContext *context; - GUPnPControlPoint *cp; - - context = gupnp_context_new (NULL, 0, NULL); - cp = gupnp_control_point_new - (context, "urn:schemas-upnp-org:service:WANIPConnection:1"); - - main_loop = g_main_loop_new (NULL, FALSE); - g_main_loop_unref (main_loop); - g_object_unref (cp); - g_object_unref (context); - - return 0; - } - EOS - system ENV.cc, "-I#{include}/gupnp-1.2", "-L#{lib}", "-lgupnp-1.2", - "-I#{Formula["gssdp"].opt_include}/gssdp-1.2", - "-L#{Formula["gssdp"].opt_lib}", "-lgssdp-1.2", - "-I#{Formula["glib"].opt_include}/glib-2.0", - "-I#{Formula["glib"].opt_lib}/glib-2.0/include", - "-L#{Formula["glib"].opt_lib}", - "-lglib-2.0", "-lgobject-2.0", - "-I#{Formula["libsoup"].opt_include}/libsoup-2.4", - "-I#{MacOS.sdk_path}/usr/include/libxml2", - testpath/"test.c", "-o", testpath/"test" - system "./test" - end -end diff --git a/Formula/gvp.rb b/Formula/gvp.rb deleted file mode 100644 index 93598b2d39deb..0000000000000 --- a/Formula/gvp.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Gvp < Formula - desc "Go versioning packager" - homepage "https://github.com/pote/gvp" - url "https://github.com/pote/gvp/archive/v0.3.0.tar.gz" - sha256 "e1fccefa76495293350d47d197352a63cae6a014d8d28ebdedb785d4304ee338" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "5ac60db3ccf491e68595a4ae2185ea2acb1e733bbdd4dabe24617e7f19409790" => :catalina - sha256 "dce646d2b2bbc9cfecbeb99360b0df2d1149b758a40af3ab81138b544a6e3871" => :mojave - sha256 "c62a176dc8bee30dcd1453a8b3c608dcd059dc133167df74802d515931470f6d" => :high_sierra - sha256 "2405a1e481ebfafcd4fbfdc2874feacc402b851fafdc69596d1afa120924c157" => :sierra - sha256 "ddd00ded9d21c3ecfe23e807619d3ab1b3011bc586db0d7d4aa8d5d87e3689c6" => :el_capitan - sha256 "5e63da6d9c8d065277491db1658fee5c53089f7dd1bf1180e5d9e7172b376cde" => :yosemite - sha256 "afbe7d649883c750c182976a7c09035fe30f4d56b1b5859c8d214c01334874f7" => :mavericks - end - - # Upstream fix for "syntax error near unexpected token `;'" - patch do - url "https://github.com/pote/gvp/commit/11c4cefd.patch?full_index=1" - sha256 "19c59c5185d351e05d0b3fbe6a4dba3960c34a804d67fe320e3189271374c494" - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"gvp", "in" - assert File.directory? ".godeps/src" - end -end diff --git a/Formula/gwenhywfar.rb b/Formula/gwenhywfar.rb deleted file mode 100644 index 67601bd329a47..0000000000000 --- a/Formula/gwenhywfar.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Gwenhywfar < Formula - desc "Utility library required by aqbanking and related software" - homepage "https://www.aquamaniac.de/" - url "https://www.aquamaniac.de/rdm/attachments/download/319/gwenhywfar-5.3.0.tar.gz" - sha256 "3aec5982f5e136761863f4b6b12bbb4cd26b8ffb5f7553b58a48f72b6a4344a9" - - bottle do - sha256 "d353d4792d28b57e1fad274293cd4d5952186554571b1efb91169e98c4722a13" => :catalina - sha256 "a162c646051357271a51b779a885041dcef5b92824d566c290ec0234d450f837" => :mojave - sha256 "a9a9db801484a06000f75c642cad6d3897e9cd5afbf8bce3e49e7528656b8ba3" => :high_sierra - end - - depends_on "gettext" - depends_on "gnutls" - depends_on "libgcrypt" - depends_on "openssl@1.1" - depends_on "pkg-config" # gwenhywfar-config needs pkg-config for execution - - def install - inreplace "gwenhywfar-config.in.in", "@PKG_CONFIG@", "pkg-config" - system "autoreconf", "-fiv" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-guis=cocoa" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - GWEN_Init(); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}/gwenhywfar5", "-L#{lib}", "-lgwenhywfar", "-o", "test" - system "./test" - end -end diff --git a/Formula/gws.rb b/Formula/gws.rb deleted file mode 100644 index 81b4e6d4757fa..0000000000000 --- a/Formula/gws.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Gws < Formula - desc "Manage workspaces composed of git repositories" - homepage "https://streakycobra.github.io/gws/" - url "https://github.com/StreakyCobra/gws/archive/0.2.0.tar.gz" - sha256 "f92b7693179c2522c57edd578abdb90b08f6e2075ed27abd4af56c1283deab1a" - license "MIT" - - bottle :unneeded - - depends_on "bash" - - def install - bin.install "src/gws" - - bash_completion.install "completions/bash" - zsh_completion.install "completions/zsh" - end - - test do - system "git", "init", "project" - system "#{bin}/gws", "init" - output = shell_output("#{bin}/gws status") - assert_equal "project:\n * Clean [Local only repository]\n", output - end -end diff --git a/Formula/gwt.rb b/Formula/gwt.rb deleted file mode 100644 index a80e9d6211f0a..0000000000000 --- a/Formula/gwt.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Gwt < Formula - desc "Google web toolkit" - homepage "http://www.gwtproject.org/" - url "https://storage.googleapis.com/gwt-releases/gwt-2.9.0.zip" - sha256 "253911e3be63c19628ffef5c1082258704e7896f81b855338c6a036f524fbd42" - - bottle :unneeded - - def install - rm Dir["*.cmd"] # remove Windows cmd files - libexec.install Dir["*"] - - # Don't use the GWT scripts because they expect the GWT jars to - # be in the same place as the script. - (bin/"webAppCreator").write <<~EOS - #!/bin/sh - HOMEDIR=#{libexec} - java -cp "$HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev.jar" com.google.gwt.user.tools.WebAppCreator "$@"; - EOS - - (bin/"benchmarkViewer").write <<~EOS - #!/bin/sh - APPDIR=#{libexec} - java -Dcom.google.gwt.junit.reportPath="$1" -cp "$APPDIR/gwt-dev.jar" com.google.gwt.dev.RunWebApp -port auto $APPDIR/gwt-benchmark-viewer.war; - EOS - - (bin/"i18nCreator").write <<~EOS - #!/bin/sh - HOMEDIR=#{libexec} - java -cp "$HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev.jar" com.google.gwt.i18n.tools.I18NCreator "$@"; - EOS - end - - test do - system bin/"webAppCreator", "sh.brew.test" - assert_predicate testpath/"src/sh/brew/test.gwt.xml", :exist? - end -end diff --git a/Formula/gwyddion.rb b/Formula/gwyddion.rb deleted file mode 100644 index 26d13dc7b4f67..0000000000000 --- a/Formula/gwyddion.rb +++ /dev/null @@ -1,119 +0,0 @@ -class Gwyddion < Formula - desc "Scanning Probe Microscopy visualization and analysis tool" - homepage "http://gwyddion.net/" - url "http://gwyddion.net/download/2.56/gwyddion-2.56.tar.gz" - sha256 "4714ebd28482decceb0d9f83f7af200df5919530e02416b8b2121affe5ae6818" - license "GPL-2.0" - - bottle do - sha256 "4172123e804c37db82b8b2ce473f36f4f644f1c2af6029f4e36a35576f792635" => :catalina - sha256 "a7d84f53539e1f9d77e0f11ccddd17a000733bf50d169c1af567ed157755502f" => :mojave - sha256 "e9a3d12639dc7018e50a0b422b5ea144a651c692818b9e7eb5b168670b8462d3" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "fftw" - depends_on "gtk+" - depends_on "gtk-mac-integration" - depends_on "gtkglext" - depends_on "gtksourceview" - depends_on "libxml2" - depends_on "minizip" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-desktop-file-update", - "--prefix=#{prefix}", - "--with-html-dir=#{doc}", - "--disable-pygwy" - system "make", "install" - end - - test do - system "#{bin}/gwyddion", "--version" - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - const gchar *string = gwy_version_string(); - return 0; - } - EOS - atk = Formula["atk"] - cairo = Formula["cairo"] - fftw = Formula["fftw"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - gtkx = Formula["gtk+"] - gtkglext = Formula["gtkglext"] - harfbuzz = Formula["harfbuzz"] - libpng = Formula["libpng"] - pango = Formula["pango"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{cairo.opt_include}/cairo - -I#{fftw.opt_include} - -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#{gtkglext.opt_include}/gtkglext-1.0 - -I#{gtkglext.opt_lib}/gtkglext-1.0/include - -I#{gtkx.opt_include}/gtk-2.0 - -I#{gtkx.opt_lib}/gtk-2.0/include - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/gwyddion - -I#{libpng.opt_include}/libpng16 - -I#{lib}/gwyddion/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#{fftw.opt_lib} - -L#{fontconfig.opt_lib} - -L#{freetype.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{gtkglext.opt_lib} - -L#{gtkx.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lcairo - -lfftw3 - -lfontconfig - -lfreetype - -lgdk-quartz-2.0 - -lgdk_pixbuf-2.0 - -lgdkglext-quartz-1.0 - -lgio-2.0 - -lglib-2.0 - -lgmodule-2.0 - -lgobject-2.0 - -lgtk-quartz-2.0 - -lgtkglext-quartz-1.0 - -lgwyapp2 - -lgwyddion2 - -lgwydgets2 - -lgwydraw2 - -lgwymodule2 - -lgwyprocess2 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - -lpangoft2-1.0 - -framework AppKit - -framework OpenGL - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gx-go.rb b/Formula/gx-go.rb deleted file mode 100644 index cd9dd62fc7668..0000000000000 --- a/Formula/gx-go.rb +++ /dev/null @@ -1,187 +0,0 @@ -require "language/go" - -class GxGo < Formula - desc "Tool to use with the gx package manager for packages written in go" - homepage "https://github.com/whyrusleeping/gx-go" - url "https://github.com/whyrusleeping/gx-go/archive/v1.9.0.tar.gz" - sha256 "f3a0ee17359e0e5efab8008361da0e312ca723a0c9e165342a0306caba55a535" - license "MIT" - head "https://github.com/whyrusleeping/gx-go.git" - - bottle do - cellar :any_skip_relocation - sha256 "66fa3b40ddb24acbb713379c90df9b398baafd51aa825d5ba28d5fc7781ad987" => :catalina - sha256 "8c86c8465cde5c6189e67f2d3b758604ef579d064f398cd48eff6ab6ce092bdb" => :mojave - sha256 "57eb4c948ce99ebca79f938539c1b5e096aef6c16554c30f5744b4e1fc93016d" => :high_sierra - sha256 "7eb7a89b575a1cb12464f1a0a4d14c5983333a79fb6e4fbb9c5b5240e540020d" => :sierra - end - - depends_on "go" => :build - - go_resource "github.com/agl/ed25519" do - url "https://github.com/agl/ed25519.git", - :revision => "5312a61534124124185d41f09206b9fef1d88403" - end - - go_resource "github.com/btcsuite/btcd" do - url "https://github.com/btcsuite/btcd.git", - :revision => "675abc5df3c5531bc741b56a765e35623459da6d" - end - - go_resource "github.com/urfave/cli" do - url "https://github.com/codegangsta/cli.git", - :revision => "cfb38830724cc34fedffe9a2a29fb54fa9169cd1" - end - - go_resource "github.com/gogo/protobuf" do - url "https://github.com/gogo/protobuf.git", - :revision => "ba06b47c162d49f2af050fb4c75bcbc86a159d5c" - end - - go_resource "github.com/gxed/hashland" do - url "https://github.com/gxed/hashland.git", - :revision => "d9f6b97f8db22dd1e090fd0bbbe98f09cc7dd0a8" - end - - go_resource "github.com/ipfs/go-ipfs-api" do - url "https://github.com/ipfs/go-ipfs-api.git", - :revision => "d204576299ddab1140d043d0abb0d9b60a8a5af4" - end - - go_resource "github.com/ipfs/go-ipfs-cmdkit" do - url "https://github.com/ipfs/go-ipfs-cmdkit.git", - :revision => "c2103d7ae7f889e7329673cc3ba55df8b3863b0f" - end - - go_resource "github.com/ipfs/go-log" do - url "https://github.com/ipfs/go-log.git", - :revision => "0ef81702b797a2ecef05f45dcc82b15298f54355" - end - - go_resource "github.com/kr/fs" do - url "https://github.com/kr/fs.git", - :revision => "1455def202f6e05b95cc7bfc7e8ae67ae5141eba" - end - - go_resource "github.com/libp2p/go-libp2p-crypto" do - url "https://github.com/libp2p/go-libp2p-crypto.git", - :revision => "18915b5467c77ad8c07a35328c2cab468667a4e8" - end - - go_resource "github.com/libp2p/go-libp2p-peer" do - url "https://github.com/libp2p/go-libp2p-peer.git", - :revision => "aa0e03e559bde9d4749ad8e38595e15a6fe808fa" - end - - go_resource "github.com/libp2p/go-libp2p-pubsub" do - url "https://github.com/libp2p/go-libp2p-pubsub.git", - :revision => "f736644fe805a9f5677c82aca25c82da7cde2c76" - end - - go_resource "github.com/mattn/go-colorable" do - url "https://github.com/mattn/go-colorable.git", - :revision => "efa589957cd060542a26d2dd7832fd6a6c6c3ade" - end - - go_resource "github.com/mattn/go-isatty" do - url "https://github.com/mattn/go-isatty.git", - :revision => "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c" - end - - go_resource "github.com/minio/blake2b-simd" do - url "https://github.com/minio/blake2b-simd.git", - :revision => "3f5f724cb5b182a5c278d6d3d55b40e7f8c2efb4" - end - - go_resource "github.com/minio/sha256-simd" do - url "https://github.com/minio/sha256-simd.git", - :revision => "ad98a36ba0da87206e3378c556abbfeaeaa98668" - end - - go_resource "github.com/mitchellh/go-homedir" do - url "https://github.com/mitchellh/go-homedir.git", - :revision => "b8bc1bf767474819792c23f32d8286a45736f1c6" - end - - go_resource "github.com/mr-tron/base58" do - url "https://github.com/mr-tron/base58.git", - :revision => "c1bdf7c52f59d6685ca597b9955a443ff95eeee6" - end - - go_resource "github.com/multiformats/go-multiaddr" do - url "https://github.com/multiformats/go-multiaddr.git", - :revision => "123a717755e0559ec8fda308019cd24e0a37bb07" - end - - go_resource "github.com/multiformats/go-multiaddr-net" do - url "https://github.com/multiformats/go-multiaddr-net.git", - :revision => "97d80565f68c5df715e6ba59c2f6a03d1fc33aaf" - end - - go_resource "github.com/multiformats/go-multihash" do - url "https://github.com/multiformats/go-multihash.git", - :revision => "265e72146e710ff649c6982e3699d01d4e9a18bb" - end - - go_resource "github.com/opentracing/opentracing-go" do - url "https://github.com/opentracing/opentracing-go.git", - :revision => "6c572c00d1830223701e155de97408483dfcd14a" - end - - go_resource "github.com/sabhiram/go-gitignore" do - url "https://github.com/sabhiram/go-gitignore.git", - :revision => "fc6676d5d4e5b94d6530686eecb94f85b44cdc39" - end - - go_resource "github.com/spaolacci/murmur3" do - url "https://github.com/spaolacci/murmur3.git", - :revision => "f09979ecbc725b9e6d41a297405f65e7e8804acc" - end - - go_resource "github.com/whyrusleeping/go-logging" do - url "https://github.com/whyrusleeping/go-logging.git", - :revision => "0457bb6b88fc1973573aaf6b5145d8d3ae972390" - end - - go_resource "github.com/whyrusleeping/gx" do - url "https://github.com/whyrusleeping/gx.git", - :revision => "733691bc18c0858a3d7e1a6e0a42df7d0bcac1de" - end - - go_resource "github.com/whyrusleeping/progmeter" do - url "https://github.com/whyrusleeping/progmeter.git", - :revision => "30d42a105341e640d284d9920da2078029764980" - end - - go_resource "github.com/whyrusleeping/stump" do - url "https://github.com/whyrusleeping/stump.git", - :revision => "206f8f13aae1697a6fc1f4a55799faf955971fc5" - end - - go_resource "github.com/whyrusleeping/tar-utils" do - url "https://github.com/whyrusleeping/tar-utils.git", - :revision => "8c6c8ba81d5c71fd69c0f48dbde4b2fb422b6dfc" - end - - go_resource "golang.org/x/crypto" do - url "https://go.googlesource.com/crypto.git", - :revision => "2d027ae1dddd4694d54f7a8b6cbe78dca8720226" - end - - go_resource "golang.org/x/sys" do - url "https://go.googlesource.com/sys.git", - :revision => "d0faeb539838e250bd0a9db4182d48d4a1915181" - end - - def install - ENV["GOPATH"] = buildpath - mkdir_p "src/github.com/whyrusleeping" - ln_s buildpath, "src/github.com/whyrusleeping/gx-go" - Language::Go.stage_deps resources, buildpath/"src" - system "go", "build", "-o", bin/"gx-go" - end - - test do - system bin/"gx-go", "help" - end -end diff --git a/Formula/gx.rb b/Formula/gx.rb deleted file mode 100644 index def665330ea20..0000000000000 --- a/Formula/gx.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Gx < Formula - desc "The language-agnostic, universal package manager" - homepage "https://github.com/whyrusleeping/gx" - url "https://github.com/whyrusleeping/gx/archive/v0.14.3.tar.gz" - sha256 "2c0b90ddfd3152863f815c35b37e94d027216c6ba1c6653a94b722bf6e2b015d" - license "MIT" - head "https://github.com/whyrusleeping/gx.git" - - bottle do - cellar :any_skip_relocation - sha256 "f737f5829c0e1ce2ff58c56515e77f3797c30d614a53ebbf663985d5564c62db" => :catalina - sha256 "bd03f428c3e52561caefaa09c6abc92b21faa226ad02abeeb6c74217ca1dfbbf" => :mojave - sha256 "e6634c1b68abcb48984a7d681248393ca26824a81496c567ef23029ff9a892f5" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"gx" - end - - test do - assert_match "ERROR: no package found in this directory or any above", shell_output("#{bin}/gx deps", 1) - end -end diff --git a/Formula/gxml.rb b/Formula/gxml.rb deleted file mode 100644 index ef38e959a6f4d..0000000000000 --- a/Formula/gxml.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Gxml < Formula - desc "GObject-based XML DOM API" - homepage "https://wiki.gnome.org/GXml" - url "https://download.gnome.org/sources/gxml/0.18/gxml-0.18.1.tar.xz" - sha256 "bac5bc82c39423c1dbbfd89235f4a9b03b69cfcd3188905359ce81747b6400ed" - license "LGPL-2.1" - - bottle do - sha256 "4eb68617f73471be697746b879fe118fb3e116a1e911a2f95541982a77cd4714" => :catalina - sha256 "b9bb621d776f10dc1c3a9bde25964bd26847bf49cdee49ada1c0407f5fb14dbb" => :mojave - sha256 "4253e9a1bd9ce221e2287e5d53d39342c65fd06aa63028aa56effae2514854b4" => :high_sierra - sha256 "47042a94c013db905170cc0c373b8f7000d77e9c75d2d17dbacad6cd658e6b56" => :sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "glib" - depends_on "libgee" - depends_on "libxml2" - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Dintrospection=true", ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = gxml_document_get_type(); - return 0; - } - EOS - libxml2 = Formula["libxml2"] - gettext = Formula["gettext"] - glib = Formula["glib"] - libgee = Formula["libgee"] - flags = %W[ - -I#{gettext.opt_include} - -I#{libxml2.opt_include}/libxml2 - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{include}/gxml-0.18 - -I#{libgee.opt_include}/gee-0.8 - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{libgee.opt_lib} - -L#{libxml2.opt_lib} - -L#{lib} - -lgee-0.8 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lgxml-0.18 - -lintl - -lxml2 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/gzip.rb b/Formula/gzip.rb deleted file mode 100644 index 0486434a46961..0000000000000 --- a/Formula/gzip.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Gzip < Formula - desc "Popular GNU data compression program" - homepage "https://www.gnu.org/software/gzip" - url "https://ftp.gnu.org/gnu/gzip/gzip-1.10.tar.gz" - mirror "https://ftpmirror.gnu.org/gzip/gzip-1.10.tar.gz" - sha256 "c91f74430bf7bc20402e1f657d0b252cb80aa66ba333a25704512af346633c68" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "903289308ce89ae70f3f8116738834d2c18fed8c248c1da82fde69cdca2b34a9" => :catalina - sha256 "9391f27b1cf04c20abb2320ba55e1f8ac186db22b7c07bf51ebccfab073f85dd" => :mojave - sha256 "d639fe5a95eb7c0e12aa1577ca9b230cdbbd31b0ef51794d57415f9a9fa68f08" => :high_sierra - sha256 "bfd50566283402c72d15cd87670a3fd8ea122ebbaf583bc8cfafc552340ecf70" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"foo").write "test" - system "#{bin}/gzip", "foo" - system "#{bin}/gzip", "-t", "foo.gz" - assert_equal "test", shell_output("#{bin}/gunzip -c foo") - end -end diff --git a/Formula/gzrt.rb b/Formula/gzrt.rb deleted file mode 100644 index 2d61d63ff5e88..0000000000000 --- a/Formula/gzrt.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Gzrt < Formula - desc "Gzip recovery toolkit" - homepage "https://www.urbanophile.com/arenn/coding/gzrt/gzrt.html" - url "https://www.urbanophile.com/arenn/coding/gzrt/gzrt-0.8.tar.gz" - sha256 "b0b7dc53dadd8309ad9f43d6d6be7ac502c68ef854f1f9a15bd7f543e4571fee" - - bottle do - cellar :any_skip_relocation - sha256 "d1d5378de11679a973ce6a5893984b0431f7ad62f369215814927cdb5fbf6678" => :catalina - sha256 "4d2f5fca0f32dd8a88d7aba3d8e6f926d89f74fa1748b9e7f618bdc76e3500fe" => :mojave - sha256 "2e7f8e8743943f1e83c4b1ed6372fa3c4cab00f7a090dbb4f967b7fade1e5e20" => :high_sierra - sha256 "da5c89596737f514900f32986dd9eb32f010c6c1b9f1643dd03a07eae7e383a7" => :sierra - sha256 "01df00fd35c6eaee9d32da4644d694ce33deda79a9c3da0284b52694f94a9515" => :el_capitan - sha256 "af8ffc53bcf606b0634537adfeb67733c27ec079fa0347de41c668dbb5cce037" => :yosemite - sha256 "0df681add87a86ffad0954b1699e3d92613faad902184b24ed595bccb7d3897d" => :mavericks - end - - def install - system "make" - bin.install "gzrecover" - man1.install "gzrecover.1" - end -end diff --git a/Formula/h/h2.rb b/Formula/h/h2.rb new file mode 100644 index 0000000000000..e5b714709819b --- /dev/null +++ b/Formula/h/h2.rb @@ -0,0 +1,36 @@ +class H2 < Formula + desc "Java SQL database" + homepage "https://www.h2database.com/" + url "https://github.com/h2database/h2database/releases/download/version-2.3.232/h2-2024-08-11.zip" + version "2.3.232" + sha256 "aa95a3433b6f434cac43b072b52756fa46c611239b7a0de3a8038501b8dae2af" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5fd92e04e213f01b78acb580651cf0ef22ccc29ea925e903eed2ddf4f907254b" + end + + depends_on "openjdk" + + def install + # Remove windows files + rm(Dir["bin/*.bat"]) + + # Fix the permissions on the script + # upstream issue, https://github.com/h2database/h2database/issues/3254 + chmod 0755, "bin/h2.sh" + + libexec.install Dir["*"] + (bin/"h2").write_env_script libexec/"bin/h2.sh", Language::Java.overridable_java_home_env + end + + service do + run [opt_bin/"h2", "-tcp", "-web", "-pg"] + keep_alive false + working_dir HOMEBREW_PREFIX + end + + test do + assert_match "Usage: java org.h2.tools.GUIConsole", shell_output("#{bin}/h2 -help 2>&1") + end +end diff --git a/Formula/h/h264bitstream.rb b/Formula/h/h264bitstream.rb new file mode 100644 index 0000000000000..ceb30a063cb8d --- /dev/null +++ b/Formula/h/h264bitstream.rb @@ -0,0 +1,34 @@ +class H264bitstream < Formula + desc "Library for reading and writing H264 video streams" + homepage "https://h264bitstream.sourceforge.net/" + url "https://downloads.sourceforge.net/project/h264bitstream/h264bitstream/0.2.0/h264bitstream-0.2.0.tar.gz" + sha256 "94912cb07ef67da762be9c580b325fd8957ad400793c9030f3fb6565c6d263a7" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4616a724fcfbdc091a8be99a5746c3c1a20e9be058fd4acd09a3e4ac12ab7756" + sha256 cellar: :any, arm64_sonoma: "946ce648f0daf4e64a182e2f39811d0d78946a5150899dffe5984bb1926a88f2" + sha256 cellar: :any, arm64_ventura: "9fd917379072e27703bae053f19aefc1abbf328dfcf5857e6aa4192babe3fc48" + sha256 cellar: :any, arm64_monterey: "21fef413b7c8c4ae235dcdd1aba11a77553cd382f74d328c5958ba7e6ed47c39" + sha256 cellar: :any, arm64_big_sur: "86d9c15b08de87f85f791e45669241a1a27fefef2ddbccf6016642505e69c6e6" + sha256 cellar: :any, sonoma: "614b023114612bd3882c240f6a76ccae5b0fb4a10a8f79660e0c7cf4a6aa8931" + sha256 cellar: :any, ventura: "befe3309e1c2b4670bd77c741ac73abadcbb23fab0199422b61d901111fae7b3" + sha256 cellar: :any, monterey: "65af04578c1f21572695b045a268c8de1f3e8592dde3c407a2cc0c9e5aae797f" + sha256 cellar: :any, big_sur: "2ace75ebe5094b847024fb80a23a82bba3acfa7869399f3962c6910089ebc777" + sha256 cellar: :any, catalina: "ac1f452b4c4d4d90310ec1f3cd9ec45271665604844dca55df3f7a91885d28d7" + sha256 cellar: :any, mojave: "ebe66ef0a10e2afacf2b418eb15aa57ed873c6df73d6da71b6252efce8c15a5e" + sha256 cellar: :any, high_sierra: "191acedb64e2ab618696fe16c55b81cdadb9819a0b0fc594235d31a28a1cdf96" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc3ca9983f5e3f12e4f0f602606d56aa96e40ecdc224dd27018b9e7d3220a42f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c79de8d86abcc4f3f95f8bd7a504116fe189546101cec66d52ab6295bf0bf376" + 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 +end diff --git a/Formula/h/h26forge.rb b/Formula/h/h26forge.rb new file mode 100644 index 0000000000000..034519cf7bd40 --- /dev/null +++ b/Formula/h/h26forge.rb @@ -0,0 +1,31 @@ +class H26forge < Formula + desc "Tool for making syntactically valid but semantically spec-noncompliant videos" + homepage "https://github.com/h26forge/h26forge" + url "https://github.com/h26forge/h26forge/archive/refs/tags/2024-07-06.tar.gz" + sha256 "66e3bd1f63e6c70db334d103107ced2b2924aaee6472c71682ed34c8276203b0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d06793175eeeb5e1aea26650c793e33e06e9dfa9e53e422055cbf44d3ebe3909" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ca2e2d0171e3ea766da1fd0cf238a5b1a6f97addf518e4346810eabcd4a1b8d1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a76d3cb2f83f178bb60ebc6b79efbde31b56c4c500f7ad901b8f306dcb826eb2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fa2c3be208f76107b4f5c6312ade500217edfe4f1478620b149fb9cb93f5a872" + sha256 cellar: :any_skip_relocation, sonoma: "00dc5feba7341d70ec4bd024f63de066cf1574b97832e87e2496ee268dcf5e5d" + sha256 cellar: :any_skip_relocation, ventura: "ffe426e9eae46e983558bc76e27422d94837af5fb7260efaac0dedf0381fb6d7" + sha256 cellar: :any_skip_relocation, monterey: "25cbb1705a0bdf656e6cde346f458fe9e89975d0846f1411532b07cd089212b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "c37e9c31fbd4ef981277a591d851fcf9a1e10f21689917d698709a7b086ab0fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "800da50e33cdc4bbce4222275b0337685a7aa3cea4bac0029c99b963d997a4f4" + end + + depends_on "rust" => :build + + uses_from_macos "llvm" # for libclang + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"h26forge", "generate", "-o", "out.h264", "--seed", "264", "--small" + end +end diff --git a/Formula/h/h2c.rb b/Formula/h/h2c.rb new file mode 100644 index 0000000000000..463e61065b613 --- /dev/null +++ b/Formula/h/h2c.rb @@ -0,0 +1,24 @@ +class H2c < Formula + desc "Headers 2 curl" + homepage "https://curl.se/h2c/" + url "https://github.com/curl/h2c/archive/refs/tags/1.0.tar.gz" + sha256 "1c5e4d76131abb5151c89cc54945256509dad9d12cab36205aa5bcd7f8a311af" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "1380fd71175ca3911be9411e849ff6a739dca5b676771a42a6437c629216983e" + end + + def install + bin.install "h2c" + end + + test do + assert_match "h2c.pl [options] < file", shell_output("#{bin}/h2c --help") + + # test if h2c can convert HTTP headers to curl options. + assert_match "curl --head --http1.1 --header Accept: --header \"Shoesize: 12\" --user-agent \"moo\" https://example.com/", + pipe_output(bin/"h2c", "HEAD / HTTP/1.1\nHost: example.com\nUser-Agent: moo\nShoesize: 12") + end +end diff --git a/Formula/h/h2o.rb b/Formula/h/h2o.rb new file mode 100644 index 0000000000000..5f70983965b72 --- /dev/null +++ b/Formula/h/h2o.rb @@ -0,0 +1,89 @@ +class H2o < Formula + desc "HTTP server with support for HTTP/1.x and HTTP/2" + homepage "https://github.com/h2o/h2o/" + url "https://github.com/h2o/h2o/archive/refs/tags/v2.2.6.tar.gz" + sha256 "f8cbc1b530d85ff098f6efc2c3fdbc5e29baffb30614caac59d5c710f7bda201" + license "MIT" + revision 3 + + bottle do + sha256 arm64_sequoia: "c54b0d937a91c61b234753347dd756cb2a26dcb3b7f1aa37252b55fb9ee065ae" + sha256 arm64_sonoma: "02473fe011f04525a6e4fd604baa839c43988ca3fc96396774d96200e79daf87" + sha256 arm64_ventura: "1227fcbf6a078a4448106c6e60af24e1bb271823a50590bf201e4887784b8edb" + sha256 arm64_monterey: "df4235fa62ee97877317730f405c523eb091f32ec9bf3ad433b9a72596a60fe3" + sha256 arm64_big_sur: "08434131f8e46623e330dbfe07d4d2010cd9c55d28b308c04a93efb6a5cfb4a2" + sha256 sonoma: "65f63aaef6dbb1ea867afc03d5ea6766dbf317cc572787ec5d30c9fa65a0ebbd" + sha256 ventura: "4d046c5d98b9a75b8f53bdc068f2246c7c1958e8f4863ed2f8f2610ee6674934" + sha256 monterey: "bd75d169a42961123cc4791aa219572cf9181185ae0cb8679a3a10e7705a688c" + sha256 big_sur: "d54fbb44713fa39e3172e0e70a224fbd67e7657357c8179a2c257b510a9bf167" + sha256 arm64_linux: "a7aafba0cec8e259b00f5a12d5a65ff12652803f1d2638c8d7c8697b44d02796" + sha256 x86_64_linux: "ec3f7d26e8df24768cf2953db461dcff9a5713bb79a23c553cd30016b6a7fba6" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + # https://github.com/Homebrew/homebrew-core/pull/1046 + # https://github.com/Homebrew/brew/pull/251 + ENV.delete("SDKROOT") + + args = std_cmake_args + %W[ + -DWITH_BUNDLED_SSL=OFF + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + ] + + # Build shared library. + system "cmake", "-S", ".", "-B", "build_shared", *args, "-DBUILD_SHARED_LIBS=ON" + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + # Build static library. + system "cmake", "-S", ".", "-B", "build_static", *args, "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "build_static" + lib.install "build_static/libh2o-evloop.a" + + (etc/"h2o").mkpath + (var/"h2o").install "examples/doc_root/index.html" + # Write up a basic example conf for testing. + (buildpath/"brew/h2o.conf").write conf_example + (etc/"h2o").install buildpath/"brew/h2o.conf" + pkgshare.install "examples" + end + + # This is simplified from examples/h2o/h2o.conf upstream. + def conf_example(port = 8080) + <<~EOS + listen: #{port} + hosts: + "127.0.0.1.xip.io:#{port}": + paths: + /: + file.dir: #{var}/h2o/ + EOS + end + + def caveats + <<~EOS + A basic example configuration file has been placed in #{etc}/h2o. + + You can find fuller, unmodified examples in #{opt_pkgshare}/examples. + EOS + end + + service do + run [opt_bin/"h2o", "-c", etc/"h2o/h2o.conf"] + keep_alive true + end + + test do + port = free_port + (testpath/"h2o.conf").write conf_example(port) + spawn "#{bin}/h2o -c #{testpath}/h2o.conf" + sleep 2 + assert_match "Welcome to H2O", shell_output("curl localhost:#{port}") + end +end diff --git a/Formula/h/h2spec.rb b/Formula/h/h2spec.rb new file mode 100644 index 0000000000000..b0f6b4f2a5b92 --- /dev/null +++ b/Formula/h/h2spec.rb @@ -0,0 +1,45 @@ +class H2spec < Formula + desc "Conformance testing tool for HTTP/2 implementation" + homepage "https://github.com/summerwind/h2spec" + url "https://github.com/summerwind/h2spec.git", + tag: "v2.6.0", + revision: "70ac2294010887f48b18e2d64f5cccd48421fad1" + license "MIT" + head "https://github.com/summerwind/h2spec.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c838540f260b348701c7911092e08e52b6e6395ffb442ddd65e47ab7d4b606ff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eccfc65c379b50c2b3c83f6ef56c3cf581e9568e0ec1e8d23d55253dae5c180a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "85916701e8dd7c4caaef314e26c48344423369b3b2197bd80111141a9b526a38" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b2589ab8277cf827e7903a523b666e8ceb1b4fe5b494f0fcd52ac5b40706a5c6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "90d9e00cce2bd7659510bb75cc6735b94d7488207a4aeb665fd9aedae3ed8ca1" + sha256 cellar: :any_skip_relocation, sonoma: "4b4ac641cb3543d796da56ede9ab23924cddac7d16b73d1b75072b90ee498651" + sha256 cellar: :any_skip_relocation, ventura: "f64b879c82616e820a77e8c39c65a6fd6b957c069aabd31ef5f2478b14101d46" + sha256 cellar: :any_skip_relocation, monterey: "512863844a450dba5025fa2d09c88fb9e86e72e62ac43d0a19d2cc020e0b8467" + sha256 cellar: :any_skip_relocation, big_sur: "ee24c3ab807d25dc92116e1b794d319365b7ad7a801f9ef9089f2992844673aa" + sha256 cellar: :any_skip_relocation, catalina: "c585fbaa7e8d101d280edafce5e26b4df57a1ac8ddbd7327f1efdc07d0ac17a0" + sha256 cellar: :any_skip_relocation, mojave: "83ba531c3cfffe083ffc687cff9c7ad41eb30c6745994a6eca2bc9f245e7f00e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d72f6c447db109aa6a6bceb41aed5fcc445ce1008633b8e236e457d686915990" + end + + depends_on "go" => :build + + def install + commit = Utils.git_short_head + ldflags = %W[ + -s -w + -X main.VERSION=#{version} + -X main.COMMIT=#{commit} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/h2spec" + end + + test do + assert_match "1 tests, 0 passed, 0 skipped, 1 failed", + shell_output("#{bin}/h2spec http2/6.3/1 -h httpbin.org 2>&1", 1) + + assert_match "connect: connection refused", + shell_output("#{bin}/h2spec http2/6.3/1 2>&1", 1) + end +end diff --git a/Formula/h/h3.rb b/Formula/h/h3.rb new file mode 100644 index 0000000000000..c0ffd6949a184 --- /dev/null +++ b/Formula/h/h3.rb @@ -0,0 +1,33 @@ +class H3 < Formula + desc "Hexagonal hierarchical geospatial indexing system" + homepage "https://uber.github.io/h3/" + url "https://github.com/uber/h3/archive/refs/tags/v4.2.1.tar.gz" + sha256 "1b51822b43f3887767c5a5aafd958fca72b72fc454f3b3f6eeea31757d74687d" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7be49d20c152264ea989f2e96be5b0b4cdabc41769a3577ceb7d6c7e0a6b481b" + sha256 cellar: :any, arm64_sonoma: "3ae20dda8f2138be8d79d77a20d82f92caa7a7a0828c9a0aeb4e2f64b29cc8db" + sha256 cellar: :any, arm64_ventura: "a72d460ce48392a312f9713131c9e526c32421a30f862c9c65ef2c9c009dbf0d" + sha256 cellar: :any, sonoma: "d0849d830aca26ddaff870a0d725dfc24ac2e3e8cf827a4f89bdb71587ba2d8b" + sha256 cellar: :any, ventura: "32cceafc84e5fa584523be35756aa6cdc437457b2712cd0a2d1a03bdea31b1b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "d309c31edb9ba1b7b046df61e2b819791e0c0ca2fe54be55567621953fc48dbb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3410f81c6368a364ef33073653ec88928912738e9f653b99a3b01694dd510b41" + 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" + end + + test do + result = pipe_output("#{bin}/latLngToCell -r 10 --lat 40.689167 --lng -74.044444") + assert_equal "8a2a1072b59ffff", result.chomp + end +end diff --git a/Formula/h/hackrf.rb b/Formula/h/hackrf.rb new file mode 100644 index 0000000000000..2509dc792402b --- /dev/null +++ b/Formula/h/hackrf.rb @@ -0,0 +1,43 @@ +class Hackrf < Formula + desc "Low cost software radio platform" + homepage "https://github.com/greatscottgadgets/hackrf" + url "https://github.com/greatscottgadgets/hackrf/releases/download/v2024.02.1/hackrf-2024.02.1.tar.xz" + sha256 "d9ced67e6b801cd02c18d0c4654ed18a4bcb36c24a64330c347dfccbd859ad16" + license "GPL-2.0-or-later" + head "https://github.com/greatscottgadgets/hackrf.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "700b528a727979c136ce3c8c009ff76ed6683fa32236684847652da562bef92e" + sha256 cellar: :any, arm64_sonoma: "5bcb0c337a5f17808365a9472d8537f4bc91a7e16d0147656020a9e2c7fb8735" + sha256 cellar: :any, arm64_ventura: "785f40b5807a55615798acdb3c2f3084da4f619199ce4680dbdb03a33800e656" + sha256 cellar: :any, arm64_monterey: "34c1393265906dce624d9ce369a051d119523f5c645f0ce651ac2fd3127101b8" + sha256 cellar: :any, sonoma: "0f6aad32f2fcec8733d6f1c6e2cd5454973a52c33f7797032a90bc9a730285ff" + sha256 cellar: :any, ventura: "d5620a9f49dd68c91a36ffb55c2b60c4a28baa5b98440e3425f2d0c35ce299b6" + sha256 cellar: :any, monterey: "b8fc89adc569dc32b152eafcea69a98d5fbe47264938992c5450048c392abcf4" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf2359eb301541f275226c4b2f03a3c08db88558eeb05ecdac58530d3e91a506" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5305ace77af21dc264b7c83e17e95a89d05ef7f23e8af8cc29315728b340fbe" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "fftw" + depends_on "libusb" + + def install + args = OS.linux? ? ["-DUDEV_RULES_GROUP=plugdev", "-DUDEV_RULES_PATH=#{lib}/udev/rules.d"] : [] + + system "cmake", "-S", "host", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "firmware-bin/" + end + + test do + shell_output("#{bin}/hackrf_transfer", 1) + end +end diff --git a/Formula/h/hadolint.rb b/Formula/h/hadolint.rb new file mode 100644 index 0000000000000..cc82826d2761f --- /dev/null +++ b/Formula/h/hadolint.rb @@ -0,0 +1,121 @@ +class Hadolint < Formula + desc "Smarter Dockerfile linter to validate best practices" + homepage "https://github.com/hadolint/hadolint" + url "https://github.com/hadolint/hadolint/archive/refs/tags/v2.12.0.tar.gz" + sha256 "1f972f070fa068a8a18b62016c9cbd00df994006e069647038694fc6cde45545" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "59b74bdb8e45b7e59e477aa7f5e0a3534a656181816010f4cd2811b0ff2de1f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d2058530a9078298705f9fa4da7a7408a649aa9cdac2fd7983ee9bed2a8099ba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c721712adf9cbc6c02517b8c912462b9ae9bb89d84654a4f6b2f83e877103d4c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "56ff572bce4302be865315fb8f3600dea1491f10bb527c808d88d3b6eea0cd24" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3a5ec25ca1ad776f4336830f309f63665c590521248e5a5d3a61bf6583f65b1b" + sha256 cellar: :any_skip_relocation, sonoma: "1ce867b213ba400ed1b7e04cdb1f1046513d16b901a1533cf1c58ba981a3061d" + sha256 cellar: :any_skip_relocation, ventura: "4de41cd99e149ac7d69ad2c2be30870204072993af1c78789fdc025f58b4e256" + sha256 cellar: :any_skip_relocation, monterey: "1df703a623dc8dbb3423a593a9050ece0e560400a1bf07779968779e055e0fff" + sha256 cellar: :any_skip_relocation, big_sur: "ed03ac5e81ded1c0e18ad0475d03ca708ea159939789b59049d63507bbe1be6f" + sha256 cellar: :any_skip_relocation, catalina: "85d88fda55b31414f8e91de69916c7c1ed8c3d48da54b7abab6fd09cdb8f195a" + sha256 cellar: :any_skip_relocation, arm64_linux: "76e71e292364be0910b7714d216e9c754e3947dcc3918cb011d0d9ca23963d1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f4fbe6eb66d7e58700076ef0f4b3f775e441355ccdb7d65451d327536dc75e1" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + + uses_from_macos "xz" + + # Backport support for GHC 9.8 + patch do + url "https://github.com/hadolint/hadolint/commit/593ccde5af13c9b960b3ea815c47ce028a2e8adc.patch?full_index=1" + sha256 "dfa4e7a6c2c06f792d299ac17f13fbfd13654c35dea1dc202eda0601650e3b7e" + end + patch :DATA # https://github.com/hadolint/hadolint/commit/6a6dd09917d4b6c7c8fb5a5d8c31bb24e2a3b1e0 + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + df = testpath/"Dockerfile" + df.write <<~DOCKERFILE + FROM debian + DOCKERFILE + assert_match "DL3006", shell_output("#{bin}/hadolint #{df}", 1) + end +end + +__END__ +diff --git a/cabal.project b/cabal.project +index 8b2b6d6e..40a32226 100644 +--- a/cabal.project ++++ b/cabal.project +@@ -7,5 +7,5 @@ optional-packages: + source-repository-package + type: git + location: https://github.com/lorenzo/shellcheck +- tag: 07095b233a60b819df6710b7741a59bac62179e1 +- --sha256: 114yfgp40klrm32al93j7fh7lzzg7scqqnf8cc953h2m22k0c48q ++ tag: 248273935cd95afeaf835c688980ac5bccca8d14 ++ --sha256: 1xm38l1fcq2agiwhh2jqikzinv5ldgnfazgir83xyv8r2v6x1ray +diff --git a/hadolint.cabal b/hadolint.cabal +index a0469934..7e6d01ab 100644 +--- a/hadolint.cabal ++++ b/hadolint.cabal +@@ -147,14 +143,14 @@ library + , containers + , cryptonite + , data-default +- , deepseq >=1.4.4 && <1.5 ++ , deepseq >=1.4.4 + , directory >=1.3.0 + , email-validate + , filepath + , foldl + , gitrev >=1.3.1 + , ilist +- , language-docker >=12.0.0 && <13 ++ , language-docker >=13.0.0 && <14 + , megaparsec >=9.0.0 + , mtl + , network-uri +@@ -169,7 +165,7 @@ library + , time + , timerep >=2.0 + , void +- default-language: Haskell2010 ++ default-language: GHC2021 + + executable hadolint + main-is: Main.hs +@@ -196,14 +192,14 @@ executable hadolint + , containers + , data-default + , hadolint +- , language-docker >=12.0.0 && <13 ++ , language-docker >=13.0.0 && <14 + , megaparsec >=9.0.0 + , optparse-applicative >=0.14.0 + , prettyprinter >=1.7.0 + , text + if flag(static) && !(os(osx)) + ld-options: -static -pthread +- default-language: Haskell2010 ++ default-language: GHC2021 + + test-suite hadolint-unit-tests + type: exitcode-stdio-1.0 +@@ -321,10 +317,10 @@ test-suite hadolint-unit-tests + , foldl + , hadolint + , hspec >=2.8.3 +- , language-docker >=12.0.0 && <13 ++ , language-docker >=13.0.0 && <14 + , megaparsec >=9.0.0 + , optparse-applicative >=0.14.0 + , silently + , split >=0.2 + , text +- default-language: Haskell2010 ++ default-language: GHC2021 diff --git a/Formula/h/hadoop.rb b/Formula/h/hadoop.rb new file mode 100644 index 0000000000000..141aa618a12df --- /dev/null +++ b/Formula/h/hadoop.rb @@ -0,0 +1,83 @@ +class Hadoop < Formula + desc "Framework for distributed processing of large data sets" + homepage "https://hadoop.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=hadoop/common/hadoop-3.4.1/hadoop-3.4.1.tar.gz" + mirror "https://archive.apache.org/dist/hadoop/common/hadoop-3.4.1/hadoop-3.4.1.tar.gz" + sha256 "9ad5487833996dfe5514e756f4391029c90529fd22e8d002fd3dd0c14c04ba46" + license "Apache-2.0" + + livecheck do + url "https://hadoop.apache.org/releases.html" + regex(/href=.*?hadoop[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f85402488931c97be6c4c8eb13b1c802a417aa79cef03b59a6b294a51c34f261" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f85402488931c97be6c4c8eb13b1c802a417aa79cef03b59a6b294a51c34f261" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f85402488931c97be6c4c8eb13b1c802a417aa79cef03b59a6b294a51c34f261" + sha256 cellar: :any_skip_relocation, sonoma: "a778cfa6e5a611c84fc5ff42e00ad5d568ef7328c41c74a69455b008efcd5221" + sha256 cellar: :any_skip_relocation, ventura: "a778cfa6e5a611c84fc5ff42e00ad5d568ef7328c41c74a69455b008efcd5221" + sha256 cellar: :any_skip_relocation, arm64_linux: "95771d9e7f4affc79481feac8b3122762db71f7f508902c18f6751e33ce09838" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f85402488931c97be6c4c8eb13b1c802a417aa79cef03b59a6b294a51c34f261" + end + + # WARNING: Check https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+Java+Versions before updating JDK version + depends_on "openjdk@11" + + conflicts_with "yarn", because: "both install `yarn` binaries" + + def install + rm(Dir["bin/*.cmd", "sbin/*.cmd", "libexec/*.cmd", "etc/hadoop/*.cmd"]) + rm ["bin/container-executor", "bin/oom-listener", "bin/test-container-executor"] + libexec.install %w[bin sbin libexec share etc] + + hadoop_env = Language::Java.overridable_java_home_env("11") + hadoop_env[:HADOOP_LOG_DIR] = var/"hadoop" + + (libexec/"bin").each_child do |path| + (bin/File.basename(path)).write_env_script path, hadoop_env + end + (libexec/"sbin").each_child do |path| + (sbin/File.basename(path)).write_env_script path, hadoop_env + end + libexec.glob("libexec/*.sh").each do |path| + (libexec/File.basename(path)).write_env_script path, hadoop_env + end + + # Temporary fix until https://github.com/Homebrew/brew/pull/4512 is fixed + chmod 0755, libexec.glob("*.sh") + end + + test do + system bin/"hadoop", "fs", "-ls" + + # Test if resource manager can start successfully + port = free_port + classpaths = %w[ + etc/hadoop + share/hadoop/common/lib/* + share/hadoop/common/* + share/hadoop/hdfs + share/hadoop/hdfs/lib/* + share/hadoop/hdfs/* + share/hadoop/mapreduce/* + share/hadoop/yarn + share/hadoop/yarn/lib/* + share/hadoop/yarn/* + share/hadoop/yarn/timelineservice/* + share/hadoop/yarn/timelineservice/lib/* + ].map { |path| libexec/path } + + pid = Process.spawn({ + "JAVA_HOME" => Language::Java.java_home("11"), + "CLASSPATH" => classpaths.join(":"), + }, Formula["openjdk@11"].opt_bin/"java", "org.apache.hadoop.yarn.server.resourcemanager.ResourceManager", + "-Dyarn.resourcemanager.webapp.address=127.0.0.1:#{port}") + sleep 15 + + Process.getpgid pid + system "curl", "http://127.0.0.1/#{port}" + ensure + Process.kill "TERM", pid + end +end diff --git a/Formula/h/haiti.rb b/Formula/h/haiti.rb new file mode 100644 index 0000000000000..10dc5293c4f37 --- /dev/null +++ b/Formula/h/haiti.rb @@ -0,0 +1,43 @@ +class Haiti < Formula + desc "Hash type identifier" + homepage "https://noraj.github.io/haiti/#/" + url "https://github.com/noraj/haiti/archive/refs/tags/v3.0.0.tar.gz" + sha256 "f6b8bf21104cedda21d1cdfa9931b5f7a6049231aedba984a0e92e49123a3791" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "437a900ef99a2a9ce151f54852b5ceba54b04b0ae4f7dbdfca33ac96262db51c" + sha256 cellar: :any, arm64_sonoma: "d256b2ab7188e82c043c22fc4ca8e5df092d581e4d0c7db6a1feda3110a3054e" + sha256 cellar: :any, arm64_ventura: "cd3f25be3ff7e82d716d0c04b6703687a104014703d0fca01ef6b743014a1112" + sha256 cellar: :any, sonoma: "03b15c6432552b2f1bf9b501292dec5d9981c1b31e48b371c5368248bd3c9498" + sha256 cellar: :any, ventura: "eacc0e910d7028495d5ac2dd6fc488fef97f660bd586ab4f4638d90ca9830345" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7ba6681ea727c139e302ef47608117ceba1ec44781fd0f37ba9eb646cfa3acd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf1cab0eaadd053425ec6af959b808b9b8c60f12e531791ec6215cf009529e33" + 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}-hash-#{version}.gem" + + bin.install Dir[libexec/"bin/#{name}"] + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + ENV["LANG"] = "en_US.UTF-8" + ENV["LC_ALL"] = "en_US.UTF-8" + + assert_match version.to_s, shell_output("#{bin}/haiti --version") + + output = shell_output("#{bin}/haiti 12c87370d1b5472793e67682596b60efe2c6038d63d04134a1a88544509737b4") + assert_match "[JtR: raw-sha256]", output + end +end diff --git a/Formula/h/halibut.rb b/Formula/h/halibut.rb new file mode 100644 index 0000000000000..3b5df174f2acb --- /dev/null +++ b/Formula/h/halibut.rb @@ -0,0 +1,44 @@ +class Halibut < Formula + desc "Yet another free document preparation system" + homepage "https://www.chiark.greenend.org.uk/~sgtatham/halibut/" + url "https://www.chiark.greenend.org.uk/~sgtatham/halibut/halibut-1.3/halibut-1.3.tar.gz" + sha256 "aaa0f7696f17f74f42d97d0880aa088f5d68ed3079f3ed15d13b6e74909d3132" + license all_of: ["MIT", "APAFML"] + head "https://git.tartarus.org/simon/halibut.git", branch: "main" + + livecheck do + url :homepage + regex(/href=.*?halibut[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f9fc41c88b7b3b7d2cc9ae9160316ea794a4316e1ed217c3dca842324cdbff54" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e5aa2f452b8152cfe1db12e63ebab5cc3884aeb0096a8e237382ffd91b4ea3d7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ed4000bb616ed6fcf26b2cb79659a1fec79d6e6728b05be5b3f53c1dea03ae7a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "15128f8454d3cbfbe26c615f8a49daeeb3f7a6566be8f390370bf1b789ec3aa1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8b45d0f3af3aba76ea7e2b5e0c447f0ae7674db57330c2d03c6a6dc8e5ef9a53" + sha256 cellar: :any_skip_relocation, sonoma: "2a9f53eba275766163826e616ffed4fb4ce2436aac73c3b3b710cca63ccbb382" + sha256 cellar: :any_skip_relocation, ventura: "bed49d04cdab196ff5554ee4d8a0f431407cbce92f2eccc5b97d2ae4bdb23ffd" + sha256 cellar: :any_skip_relocation, monterey: "edef3d404fd16343e22399f1f559d6b937585e4e6dbd6f2ff2a3a954f2147cba" + sha256 cellar: :any_skip_relocation, big_sur: "4e224f4d6f3757b28c0620022e925ea494c8d416db51c9306c87aba7619f7c45" + sha256 cellar: :any_skip_relocation, catalina: "df8f9c9f491fe0ac2cb55271a2f578260833733dfc7ce3d9f88ee3c9c865c5ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "5db7dd744d114aef3647f5ff961716ad0996cdc3f9efa96c9810047181483c4a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b074c7854ab9c65b56a04c63512c77e8bae8958a2beb2f0eff3b791264fc354" + 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/"sample.but").write("Hello, world!") + system bin/"halibut", "--html=sample.html", "sample.but" + + assert_match("

\nHello, world!\n

", + (testpath/"sample.html").read) + end +end diff --git a/Formula/h/halide.rb b/Formula/h/halide.rb new file mode 100644 index 0000000000000..9cf33b961ec03 --- /dev/null +++ b/Formula/h/halide.rb @@ -0,0 +1,78 @@ +class Halide < Formula + desc "Language for fast, portable data-parallel computation" + homepage "https://halide-lang.org/" + license "MIT" + revision 1 + + stable do + url "https://github.com/halide/Halide/archive/refs/tags/v19.0.0.tar.gz" + sha256 "83bae1f0e24dc44d9d85014d5cd0474df2dd03975680894ce3fafd6e97dffee2" + + depends_on "lld@19" + depends_on "llvm@19" # TODO: Use `lld`/`llvm` in both stable and head in Halide 20 + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "33f39347076af5498e35bed325acfb3f3251de6efb4d54c72380901a3524ec70" + sha256 cellar: :any, arm64_sonoma: "5fde8b88d62f8e6320f235828f0e81a91c021c1854688edfdb2203da69701a82" + sha256 cellar: :any, arm64_ventura: "14d6bd1d3b21ddd8c2048fb026c0602be863df3126f686e9e830ff0a475ccd9f" + sha256 cellar: :any, sonoma: "aae907b9c881d5a750264f333ba2f3991fbe95c8d3dd50e6b2246fdbe0b37665" + sha256 cellar: :any, ventura: "25f68206d87d7f26f557115db0f87686df2d2d378e619e0fd692d61c9333884a" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa6fe703b19d08cfee1366d5366fc1f5a9e93286566a91634007fa3191410417" + sha256 cellar: :any_skip_relocation, x86_64_linux: "559910d964d788f02580e34bb3483e083f4a292cd9cfb3ee52ee8d6fe0d76c24" + end + + head do + url "https://github.com/halide/Halide.git", branch: "main" + + depends_on "lld" + depends_on "llvm" + end + + depends_on "cmake" => :build + depends_on "pybind11" => :build + depends_on "flatbuffers" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "python@3.13" + depends_on "wabt" + + on_macos do + depends_on "openssl@3" + end + + def python3 + "python3.13" + end + + def install + llvm = deps.map(&:to_formula).find { |f| f.name.match?(/^llvm(@\d+(\.\d+)*)?$/) } + site_packages = prefix/Language::Python.site_packages(python3) + rpaths = [rpath, rpath(source: site_packages/"halide")] + rpaths << llvm.opt_lib.to_s if OS.linux? + args = [ + "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}", + "-DHalide_INSTALL_PYTHONDIR=#{site_packages}/halide", + "-DHalide_LLVM_SHARED_LIBS=ON", + "-DHalide_USE_FETCHCONTENT=OFF", + "-DWITH_TESTS=NO", + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + cp share/"doc/Halide/tutorial/lesson_01_basics.cpp", testpath + system ENV.cxx, "-std=c++17", "lesson_01_basics.cpp", "-L#{lib}", "-lHalide", "-o", "test" + assert_match "Success!", shell_output("./test") + + cp share/"doc/Halide_Python/tutorial-python/lesson_01_basics.py", testpath + assert_match "Success!", shell_output("#{python3} lesson_01_basics.py") + end +end diff --git a/Formula/h/halp.rb b/Formula/h/halp.rb new file mode 100644 index 0000000000000..4d7ec063f65a2 --- /dev/null +++ b/Formula/h/halp.rb @@ -0,0 +1,52 @@ +class Halp < Formula + desc "CLI tool to get help with CLI tools" + homepage "https://halp.cli.rs/" + url "https://github.com/orhun/halp/archive/refs/tags/v0.2.0.tar.gz" + sha256 "de4e931aebd420e800007c446115f9fa3e2e581cbb4f2db9cb10488862e5f98b" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/orhun/halp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "90151c6762fc2f8f021d83dcdfd7791a1ec6eeb8f21326a99045bf430f6fd04f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a5a811ad95cf4dd2fe8eaea97a1bd0878e8bd9d57317e82d0a2ebb9a01f8176d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "46621463527a0130f38fe08aabec8736830f4409440dc9b8332ef9995797cfcd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "122153f544cae19d3b4ae5aebfc18e09deaf87e793b06b859924ddaf5b16a482" + sha256 cellar: :any_skip_relocation, sonoma: "ded7efbdeb80254547423d1538af040d268252a597d326663caf9aa469ea48b6" + sha256 cellar: :any_skip_relocation, ventura: "7387bc748aaba59be28c6c0e220034e115097b7b7ea453c75c128bebb0982286" + sha256 cellar: :any_skip_relocation, monterey: "a604ca28c91bcc23f3ca2d30c185cca378440a5ddbc5c548285e898f0b1d863e" + sha256 cellar: :any_skip_relocation, arm64_linux: "bf016a89b83b085ec2dfbec7654727141a413552afee4bd0cfecee15d0895217" + sha256 cellar: :any_skip_relocation, x86_64_linux: "525dfbe3581d9fce47ecb99abf03269c9b36282498bb6d971844846c66e01bf3" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + # Setup OUT_DIR for completion and manpage generations + ENV["OUT_DIR"] = buildpath + + system bin/"halp-completions" + bash_completion.install "halp.bash" => "halp" + fish_completion.install "halp.fish" + zsh_completion.install "_halp" + + system bin/"halp-mangen" + man1.install "halp.1" + + # Remove binaries used for building completions and manpage + rm([bin/"halp-completions", bin/"halp-mangen", bin/"halp-test"]) + end + + test do + output = shell_output("#{bin}/halp halp") + assert_match <<~EOS, output + (\u00B0\u30ED\u00B0) checking 'halp -v' + (\u00D7\uFE4F\u00D7) fail '-v' argument not found. + (\u00B0\u30ED\u00B0) checking 'halp -V' + \\(^\u30EE^)/ success '-V' argument found! + EOS + + assert_match version.to_s, shell_output("#{bin}/halp --version") + end +end diff --git a/Formula/h/hamlib.rb b/Formula/h/hamlib.rb new file mode 100644 index 0000000000000..acb72a2ae05ba --- /dev/null +++ b/Formula/h/hamlib.rb @@ -0,0 +1,39 @@ +class Hamlib < Formula + desc "Ham radio control libraries" + homepage "http://www.hamlib.org/" + url "https://github.com/Hamlib/Hamlib/releases/download/4.6.2/hamlib-4.6.2.tar.gz" + sha256 "b2ac73f44dd1161e95fdee6c95276144757647bf92d7fdb369ee2fe41ed47ae8" + license "LGPL-2.1-or-later" + head "https://github.com/hamlib/hamlib.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9167a0022aa4c469cc54b917d0f4eccb1df3a8dd16c2bde575939a9bb363053f" + sha256 cellar: :any, arm64_sonoma: "c4aa54f5b84ad20d5378a77c1860de8ef5307a36e2ba4d44252c3236115e7f68" + sha256 cellar: :any, arm64_ventura: "29ca12dd53120b6219a72cf06003ac4f9f7b0136d3a906f2f7c7e283a677ad27" + sha256 cellar: :any, sonoma: "6e018327f7f25dc3826e923f7e1aff7c45f20a90a5682b9359f78d548b33e610" + sha256 cellar: :any, ventura: "49b659bd45a24723430fc33d608f8bbd247678183a9f67e7cf2ff95d6344fc96" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd26f0e428ccfdf1090ce0a9ad4ea786949d88b3399e384084f5722dac54b877" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39cd33fc06e7145cca060ed370d7c6b099dcd87eba63947403f947d9eac2d1a0" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "libtool" + depends_on "libusb" + depends_on "libusb-compat" + + on_linux do + depends_on "readline" + end + + def install + system "./bootstrap" if build.head? + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"rigctl", "-V" + end +end diff --git a/Formula/h/handbrake.rb b/Formula/h/handbrake.rb new file mode 100644 index 0000000000000..810ea60c8c00e --- /dev/null +++ b/Formula/h/handbrake.rb @@ -0,0 +1,69 @@ +class Handbrake < Formula + desc "Open-source video transcoder available for Linux, Mac, and Windows" + homepage "https://handbrake.fr/" + url "https://github.com/HandBrake/HandBrake/releases/download/1.9.2/HandBrake-1.9.2-source.tar.bz2" + sha256 "f56696b9863a6c926c0eabdcb980cece9aa222c650278d455ac6873d3220ce49" + license "GPL-2.0-only" + head "https://github.com/HandBrake/HandBrake.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e522355fdd80a18975dff369e4f84f114db24bdd998c9aabf0412e37870d3c14" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2bf626472451af5250d1ad1bda30d045fd8524c8ead478ba10c6617137513ea4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0963b2fe7afb36039db49f6d70bfb956d762e2f45dc8f8f75f6b788f130e27e7" + sha256 cellar: :any_skip_relocation, sonoma: "90d51673f0d57cf519ca07cef60fd47d3102352a7eb15c9b74cd5528cfc34dce" + sha256 cellar: :any_skip_relocation, ventura: "e4566e9531e9b4ef8e1424d2b64881a42849fa998c4f41723e7901ac69fa869c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5897d3846d9bc98ae0ca7f17f818aa471dc3c77c0fee7cff49c9870e27cfd60a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d369bff496ed3e599714b882be69de1d774ec7f4c36863de22e230ea1739cca7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cmake" => :build + depends_on "libtool" => :build + depends_on "meson" => :build + depends_on "nasm" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "yasm" => :build + + uses_from_macos "m4" => :build + uses_from_macos "python" => :build + uses_from_macos "bzip2" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_linux do + depends_on "jansson" + depends_on "jpeg-turbo" + depends_on "lame" + depends_on "libass" + depends_on "libvorbis" + depends_on "libvpx" + depends_on "numactl" + depends_on "opus" + depends_on "speex" + depends_on "theora" + depends_on "x264" + depends_on "xz" + end + + def install + # Several vendored dependencies, including x265 and svt-av1, attempt detection + # of supported CPU features in the compiler via -march flags. + ENV.runtime_cpu_detection + + inreplace "contrib/ffmpeg/module.defs", "$(FFMPEG.GCC.gcc)", "cc" + + ENV.append "CFLAGS", "-I#{Formula["libxml2"].opt_include}/libxml2" if OS.linux? + + system "./configure", "--prefix=#{prefix}", + "--disable-xcode", + "--disable-gtk" + system "make", "-C", "build" + system "make", "-C", "build", "install" + end + + test do + system bin/"HandBrakeCLI", "--help" + end +end diff --git a/Formula/h/hapi-fhir-cli.rb b/Formula/h/hapi-fhir-cli.rb new file mode 100644 index 0000000000000..8c915a4a938d7 --- /dev/null +++ b/Formula/h/hapi-fhir-cli.rb @@ -0,0 +1,41 @@ +class HapiFhirCli < Formula + desc "Command-line interface for the HAPI FHIR library" + homepage "https://hapifhir.io/" + url "https://github.com/hapifhir/hapi-fhir/releases/download/v8.0.0/hapi-fhir-8.0.0-cli.zip" + sha256 "a00a82209896fea70ebb142f48a5fc745932e214b8155777ce013c0876bb700e" + license "Apache-2.0" + + # The "latest" release on GitHub is sometimes for an older major/minor, so we + # can't rely on it being the newest version. However, the formula's `stable` + # URL is a release asset, so it's necessary 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, all: "29b0f3cda38309cfd5b29adda9c5187d7366d1b9d75f9f0fb0009f70dfe97055" + end + + depends_on "openjdk" + + resource "homebrew-test_resource" do + url "https://github.com/hapifhir/hapi-fhir/raw/v5.4.0/hapi-fhir-structures-dstu3/src/test/resources/specimen-example.json" + sha256 "4eacf47eccec800ffd2ca23b704c70d71bc840aeb755912ffb8596562a0a0f5e" + end + + def install + inreplace "hapi-fhir-cli", /SCRIPTDIR=(.*)/, "SCRIPTDIR=#{libexec}" + libexec.install "hapi-fhir-cli.jar" + bin.install "hapi-fhir-cli" + bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix + end + + test do + testpath.install resource("homebrew-test_resource") + system bin/"hapi-fhir-cli", "validate", "--file", "specimen-example.json", + "--fhir-version", "dstu3" + end +end diff --git a/Formula/h/haproxy.rb b/Formula/h/haproxy.rb new file mode 100644 index 0000000000000..760bc69cc36f4 --- /dev/null +++ b/Formula/h/haproxy.rb @@ -0,0 +1,60 @@ +class Haproxy < Formula + desc "Reliable, high performance TCP/HTTP load balancer" + homepage "https://www.haproxy.org/" + url "https://www.haproxy.org/download/3.1/src/haproxy-3.1.7.tar.gz" + sha256 "a3952644ef939b36260d91d81a335636aa9b44572b4cb8b6001272f88545c666" + license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } + + livecheck do + url :homepage + regex(/href=.*?haproxy[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "305d5570a4dc9718db040872e0d29b29f28cdb5459f0c53c26fc30825d05f418" + sha256 cellar: :any, arm64_sonoma: "ab0abefa8f3e367ef0ded08e18bdece2ce2c472e5ccb13a02f0cf9206dfadaeb" + sha256 cellar: :any, arm64_ventura: "6477114920e1fab919475030cf1e36565377d3dfe4b1fb54990138b5246cc231" + sha256 cellar: :any, sonoma: "286e84ad8bd5e4f97ef31fff2ec087245fc0fede37aad5acc65aad87662b000b" + sha256 cellar: :any, ventura: "403c9dabb2c851b7acffd1d243f2c2ce661bb6b2e7ac1c019baedf61456b1904" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7d85e25de80e5b1e47f3ca1b86b47f03b3acee97accab7c299c0270ea552425" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3efee571841ae7dc3fb6816f779ca00ab459349206a86e3dbb43a946237e9e40" + end + + depends_on "openssl@3" + depends_on "pcre2" + + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + def install + args = %w[ + USE_PCRE2=1 + USE_PCRE2_JIT=1 + USE_OPENSSL=1 + USE_ZLIB=1 + ] + + target = if OS.mac? + "osx" + else + "linux-glibc" + end + args << "TARGET=#{target}" + + # We build generic since the Makefile.osx doesn't appear to work + system "make", *args + man1.install "doc/haproxy.1" + bin.install "haproxy" + end + + service do + run [opt_bin/"haproxy", "-f", etc/"haproxy.cfg"] + keep_alive true + log_path var/"log/haproxy.log" + error_log_path var/"log/haproxy.log" + end + + test do + system bin/"haproxy", "-v" + end +end diff --git a/Formula/h/haproxy@2.8.rb b/Formula/h/haproxy@2.8.rb new file mode 100644 index 0000000000000..e6f3125a9a0ac --- /dev/null +++ b/Formula/h/haproxy@2.8.rb @@ -0,0 +1,66 @@ +class HaproxyAT28 < Formula + desc "Reliable, high performance TCP/HTTP load balancer" + homepage "https://www.haproxy.org/" + url "https://www.haproxy.org/download/2.8/src/haproxy-2.8.15.tar.gz" + sha256 "98f0551b9c3041a87869f4cd4e1465adf6fbef2056e83aabea92106032585242" + license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } + + livecheck do + url :homepage + regex(/href=.*?haproxy[._-]v?(2\.8(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9c2974edd35e97688c43cc7d2eeb05f99d7d1e77d4775b75252f0596c7d3be38" + sha256 cellar: :any, arm64_sonoma: "8d88b51a5bdd02a5ad295a62798be487f2402449da9a00d3a1e894fff2e98760" + sha256 cellar: :any, arm64_ventura: "e48343df1514212e3befa265ef2ccff16f0a8895ec0e19bb6f92edde2bc6a62a" + sha256 cellar: :any, sonoma: "f68328ce7705a4ab218a7d9a4242be1a48e5f130727d4d0cbc31c473508ed6be" + sha256 cellar: :any, ventura: "cbbad755a7f67a6125833975e7c774175da4c01ca7fa60f1e1ae78e14cad7623" + sha256 cellar: :any_skip_relocation, arm64_linux: "6afa3c123ad4870ee3d15c19ac44d3d586a1f8120ee1bad07f6e0874ef445450" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afe78555e84ac066998a7016ff4448317b992fe410a9046ce065d0733c268559" + end + + keg_only :versioned_formula + + # https://www.haproxy.org/ + # https://endoflife.date/haproxy + disable! date: "2028-04-01", because: :unmaintained + + depends_on "openssl@3" + depends_on "pcre2" + + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + def install + args = %w[ + USE_PCRE2=1 + USE_PCRE2_JIT=1 + USE_OPENSSL=1 + USE_ZLIB=1 + ] + + target = if OS.mac? + "osx" + else + "linux-glibc" + end + args << "TARGET=#{target}" + + # We build generic since the Makefile.osx doesn't appear to work + system "make", *args + man1.install "doc/haproxy.1" + bin.install "haproxy" + end + + service do + run [opt_bin/"haproxy", "-f", etc/"haproxy.cfg"] + keep_alive true + log_path var/"log/haproxy.log" + error_log_path var/"log/haproxy.log" + end + + test do + system bin/"haproxy", "-v" + end +end diff --git a/Formula/h/harbour.rb b/Formula/h/harbour.rb new file mode 100644 index 0000000000000..ffd1452b56d67 --- /dev/null +++ b/Formula/h/harbour.rb @@ -0,0 +1,161 @@ +class Harbour < Formula + desc "Portable, xBase-compatible programming language and environment" + homepage "https://harbour.github.io/" + license "GPL-2.0-or-later" + revision 2 + head "https://github.com/harbour/core.git", branch: "master" + + stable do + url "https://downloads.sourceforge.net/project/harbour-project/source/3.0.0/harbour-3.0.0.tar.bz2" + sha256 "4e99c0c96c681b40c7e586be18523e33db24baea68eb4e394989a3b7a6b5eaad" + + # Missing a header that was deprecated by libcurl @ version 7.12.0 and + # deleted sometime after Harbour 3.0.0 release. + # Also backport upstream changes in src/rtl/arc4.c for glibc 2.30+. + patch :DATA + end + + livecheck do + url :stable + regex(%r{url=.*?/harbour[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "c391f2098164917feb69d3e4820c3c7495dbb84689c5fe2b5dcf5f0d5940d82c" + sha256 cellar: :any, arm64_sonoma: "7e80473b90f18a1d0825801e625bb117f69551e6d04f11fd65b113b2ab8e53cb" + sha256 cellar: :any, arm64_ventura: "ad3d5b72015a0fb027952c207b4637adb47a3535e8492cb3553e687720b20b59" + sha256 cellar: :any, arm64_monterey: "b767ebd7a0e600631d6d61ce3a8bbd907f3f8fd305270ac85053684ecce5ebea" + sha256 cellar: :any, sonoma: "cc37a07184ba91033dc4b4e824a302f9ef54abbee7026fbd0cda30f2d2cbeb57" + sha256 cellar: :any, ventura: "3f888b135d92845905b0926aef1623e5c4bcc72b4c71cc4d6f45554c5200f78b" + sha256 cellar: :any, monterey: "407f06fad0eac6ca57c858185ebe6e77bb4dcd7740c5b91a6c0e7524d72642c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "798cc4aee29d60fb9fe930c7b22f691de6e5f0b90ac997f42d41d1c1d589baf5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2087353cafad551175524915a162da8520c6401686c1d4d70414553fbc2d1f1b" + end + + depends_on "jpeg-turbo" + depends_on "libharu" + depends_on "libpng" + depends_on "libxdiff" + depends_on "minizip" + depends_on "pcre" + + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "expat" + uses_from_macos "ncurses" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + def install + # Delete files that cause vendored libraries for minizip and expat to be built. + rm "contrib/hbmzip/3rd/minizip/minizip.hbp" + rm "contrib/hbexpat/3rd/expat/expat.hbp" + + # Fix flat namespace usage. + # Upstreamed here: https://github.com/harbour/core/pull/263. + inreplace "config/darwin/clang.mk", "-flat_namespace -undefined warning", "-undefined dynamic_lookup" + + # The following optional dependencies are not being used at this time: + # allegro, cairo, cups, freeimage, gd, ghostscript, libmagic, mysql, postgresql, qt@5, unixodbc + # openssl can not included because the hbssl extension does not support OpenSSL 1.1. + + # The below dependencies are included because they will be built as vendored libraries by default. + # The vendored version of liblzf is used instead of the Homebrew one because the Homebrew version + # is missing header files and the extension will not build + # The vendored version of libmxml is used because it needs config.h, which is not included in + # the Homebrew version of libmxml. + # The vendored version of minilzo is used because the Homebrew version of lzo does not include minilzo. + ENV["HB_INSTALL_PREFIX"] = prefix + ENV["HB_WITH_X11"] = "no" + ENV["HB_WITH_JPEG"] = Formula["jpeg-turbo"].opt_include + ENV["HB_WITH_LIBHARU"] = Formula["libharu"].opt_include + ENV["HB_WITH_MINIZIP"] = Formula["minizip"].opt_include/"minizip" + ENV["HB_WITH_PCRE"] = Formula["pcre"].opt_include + ENV["HB_WITH_PNG"] = Formula["libpng"].opt_include + ENV["HB_WITH_XDIFF"] = Formula["libxdiff"].opt_include + + if OS.mac? + ENV["HB_COMPILER"] = ENV.cc + ENV["HB_USER_DFLAGS"] = "-L#{MacOS.sdk_path}/usr/lib" + ENV.append "HB_USER_DFLAGS", "-ld_classic" if DevelopmentTools.clang_build_version >= 1500 + ENV.append "HB_USER_DFLAGS", "-macosx_version_min #{MacOS.version}.0" if Hardware::CPU.arm? + ENV["HB_WITH_BZIP2"] = MacOS.sdk_path/"usr/include" + ENV["HB_WITH_CURL"] = MacOS.sdk_path/"usr/include" + ENV["HB_WITH_CURSES"] = MacOS.sdk_path/"usr/include" + ENV["HB_WITH_EXPAT"] = MacOS.sdk_path/"usr/include" + ENV["HB_WITH_SQLITE3"] = MacOS.sdk_path/"usr/include" + ENV["HB_WITH_ZLIB"] = MacOS.sdk_path/"usr/include" + else + ENV["HB_WITH_BZIP2"] = Formula["bzip2"].opt_include + ENV["HB_WITH_CURL"] = Formula["curl"].opt_include + ENV["HB_WITH_CURSES"] = Formula["ncurses"].opt_include + ENV["HB_WITH_EXPAT"] = Formula["expat"].opt_include + ENV["HB_WITH_SQLITE3"] = Formula["sqlite"].opt_include + ENV["HB_WITH_ZLIB"] = Formula["zlib"].opt_include + end + + ENV.deparallelize + + system "make", "install" + + rm Dir[bin/"hbmk2.*.hbl"] + rm bin/"contrib.hbr" if build.head? + rm bin/"harbour.ucf" if build.head? + end + + test do + (testpath/"hello.prg").write <<~EOS + procedure Main() + OutStd( ; + "Hello, world!" + hb_eol() + ; + OS() + hb_eol() + ; + Version() + hb_eol() ) + return + EOS + + assert_match "Hello, world!", shell_output("#{bin}/hbmk2 hello.prg -run") + end +end + +__END__ +diff --git a/contrib/hbcurl/core.c b/contrib/hbcurl/core.c +index 00caaa8..53618ed 100644 +--- a/contrib/hbcurl/core.c ++++ b/contrib/hbcurl/core.c +@@ -53,8 +53,12 @@ + */ + + #include +-#include +-#include ++#if LIBCURL_VERSION_NUM < 0x070A03 ++# include ++#endif ++#if LIBCURL_VERSION_NUM < 0x070C00 ++# include ++#endif + + #include "hbapi.h" + #include "hbapiitm.h" +diff --git a/src/rtl/arc4.c b/src/rtl/arc4.c +index 8a3527c..69b4e8b 100644 +--- a/src/rtl/arc4.c ++++ b/src/rtl/arc4.c +@@ -54,7 +54,15 @@ + /* XXX: Check and possibly extend this to other Unix-like platforms */ + #if ( defined( HB_OS_BSD ) && ! defined( HB_OS_DARWIN ) ) || \ + ( defined( HB_OS_LINUX ) && ! defined ( HB_OS_ANDROID ) && ! defined ( __WATCOMC__ ) ) +-# define HAVE_SYS_SYSCTL_H ++ /* ++ * sysctl() on Linux has fallen into depreciation. Not available in current ++ * runtime C libraries, like musl and glibc >= 2.30. ++ */ ++# if ( ! defined( HB_OS_LINUX ) || \ ++ ( ( defined( __GLIBC__ ) && ! ( ( __GLIBC__ > 2 ) || ( ( __GLIBC__ == 2 ) && ( __GLIBC_MINOR__ >= 30 ) ) ) ) ) || \ ++ defined( __UCLIBC__ ) ) ++# define HAVE_SYS_SYSCTL_H ++# endif + # define HAVE_DECL_CTL_KERN + # define HAVE_DECL_KERN_RANDOM + # if defined( HB_OS_LINUX ) diff --git a/Formula/h/harfbuzz.rb b/Formula/h/harfbuzz.rb new file mode 100644 index 0000000000000..bbaf93b1e12a6 --- /dev/null +++ b/Formula/h/harfbuzz.rb @@ -0,0 +1,62 @@ +class Harfbuzz < Formula + desc "OpenType text shaping engine" + homepage "https://github.com/harfbuzz/harfbuzz" + url "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/11.2.1.tar.gz" + sha256 "057d5754c3ac0c499bbf4d729d52acf134c7bb4ba8868ba22e84ae96bc272816" + license "MIT" + head "https://github.com/harfbuzz/harfbuzz.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c2bfac8d26f33150c1fbe86293113c217b6a452c347a509428f3a7ee4752b956" + sha256 cellar: :any, arm64_sonoma: "509842a43792ef0fac0bc55a0cffd4eb424ae91ea576de4bb58903c787913986" + sha256 cellar: :any, arm64_ventura: "f3f560cff261aaf4d8f6adb7312673d85b4bddec40a1ecad7ee9c618998aa09f" + sha256 cellar: :any, sonoma: "fa2402380d3f6f5f3c9aa13ea3414c49ffba1f7f243ca78a77e761eabd6beb34" + sha256 cellar: :any, ventura: "d61d888fc759b1ed1ee9e1d7b72fc0668425f55979b800823d809efaba8ca112" + sha256 arm64_linux: "b531487da9f408317fcf04ec5101a12b089e52ac85b960a4e76c8800c083a3ed" + sha256 x86_64_linux: "a3c3cee38367d44e713a98a09e117cd831cad5c67fb52fe67d75a81450b9d94a" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "pygobject3" => :test + depends_on "cairo" + depends_on "freetype" + depends_on "glib" + depends_on "graphite2" + depends_on "icu4c@77" + + resource "homebrew-test-ttf" do + url "https://github.com/harfbuzz/harfbuzz/raw/fc0daafab0336b847ac14682e581a8838f36a0bf/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf" + sha256 "9535d35dab9e002963eef56757c46881f6b3d3b27db24eefcc80929781856c77" + end + + def install + args = %w[ + --default-library=both + -Dcairo=enabled + -Dcoretext=enabled + -Dfreetype=enabled + -Dglib=enabled + -Dgobject=enabled + -Dgraphite=enabled + -Dicu=enabled + -Dintrospection=enabled + -Dtests=disabled + ] + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + resource("homebrew-test-ttf").stage do + shape = pipe_output("#{bin}/hb-shape 270b89df543a7e48e206a2d830c0e10e5265c630.ttf", "സ്റ്റ്").chomp + assert_equal "[glyph201=0+1183|U0D4D=0+0]", shape + end + system "python3.13", "-c", "from gi.repository import HarfBuzz" + end +end diff --git a/Formula/h/harlequin.rb b/Formula/h/harlequin.rb new file mode 100644 index 0000000000000..7f4d88146a1c1 --- /dev/null +++ b/Formula/h/harlequin.rb @@ -0,0 +1,238 @@ +class Harlequin < Formula + include Language::Python::Virtualenv + + desc "Easy, fast, and beautiful database client for the terminal" + homepage "https://harlequin.sh/" + url "https://files.pythonhosted.org/packages/b2/e2/e9176c2102b0f9fa4384dcf6e20aa11aedd50f446180cca32e44e06f7fe1/harlequin-2.1.2.tar.gz" + sha256 "751f71384a40443810f192f48f1c9bbd6f24be053231368971c2271fb56956fa" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1cb7396dda2a840f7ffa488d3d7f6358152c727df60e22437de383732a7683c1" + sha256 cellar: :any, arm64_sonoma: "0728497b8ddbc348a4ca7c4cc41f981e4ce826c18e0ee357ae431ddea080bd91" + sha256 cellar: :any, arm64_ventura: "89cb5cc85f0d2c0f982398bc4905a70035b8e8cfb771219c91b1d209147700b8" + sha256 cellar: :any, sonoma: "e5fb063890fae202945e5eb1e3314d3963163572156437c04415fd5ed3d831ca" + sha256 cellar: :any, ventura: "02f939918ee3d829e710cd5bbbfe838222d688fe753c5f5e62c31d66bdbdcda1" + sha256 cellar: :any_skip_relocation, arm64_linux: "bf2bd77c91b8a9bb130174383d7e5c72635d9a9d24e6e4eba63c94073b21909b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fbd4614f5777dcc7a2ba3e83b48fca042e2f0c9713673f0e5312f24fa5638c63" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "apache-arrow" + depends_on "libpq" # psycopg + depends_on "numpy" + depends_on "python@3.13" + depends_on "unixodbc" # harlequin-odbc + + on_linux do + depends_on "patchelf" => :build # for pyarrow + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "cython" do + url "https://files.pythonhosted.org/packages/5a/25/886e197c97a4b8e254173002cdc141441e878ff29aaa7d9ba560cd6e4866/cython-3.0.12.tar.gz" + sha256 "b988bb297ce76c671e28c97d017b95411010f7c77fa6623dd0bb47eed1aee1bc" + end + + resource "duckdb" do + url "https://files.pythonhosted.org/packages/28/b8/0f86278684fb7a1fac7c0c869fc6d68ed005cdc91c963eb4373e0551bc0a/duckdb-1.2.2.tar.gz" + sha256 "1e53555dece49201df08645dbfa4510c86440339889667702f936b7d28d39e43" + end + + resource "harlequin-mysql" do + url "https://files.pythonhosted.org/packages/44/e1/d210f15f8090a7c0834b3bf90c46d202028d401fe96e9dd86e59abfaad40/harlequin_mysql-1.1.0.tar.gz" + sha256 "7a5a82e5c2eb9383a30443d387a139a4509b111afc2fe935b619e6c73409ee7b" + end + + resource "harlequin-odbc" do + url "https://files.pythonhosted.org/packages/e5/c0/a012185883fd7d472954e945dbcb5fbad50272c5d0b84396886896bf8682/harlequin_odbc-0.3.1.tar.gz" + sha256 "c12ea98101ba5dffe212df2d5fbe0aef2e786eaa58d03d911bc3bbf89491be01" + end + + resource "harlequin-postgres" do + url "https://files.pythonhosted.org/packages/af/d3/ec374f95a2a4a2eecf4cbd256d018bd1fbd45df97466f5fba253d91fa352/harlequin_postgres-1.2.0.tar.gz" + sha256 "f544b469a5cfd85f9454cf69638dcaa67074e4a0b4fee0f1ae964060e27e451d" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/19/03/a2ecab526543b152300717cf232bb4bb8605b6edb946c845016fa9c9c9fd/mdit_py_plugins-0.4.2.tar.gz" + sha256 "5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + # upstream bug report on pypi artifact issue, https://bugs.mysql.com/bug.php?id=113396 + resource "mysql-connector-python" do + url "https://github.com/mysql/mysql-connector-python/archive/refs/tags/8.4.0.tar.gz" + sha256 "52944d6fa84c903fd70723a47d2f8c3153c50ae91773f1584a7bd30606c58b35" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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 "psycopg" do + url "https://files.pythonhosted.org/packages/67/97/eea08f74f1c6dd2a02ee81b4ebfe5b558beb468ebbd11031adbf58d31be0/psycopg-3.2.6.tar.gz" + sha256 "16fa094efa2698f260f2af74f3710f781e4a6f226efe9d1fd0c37f384639ed8a" + end + + resource "psycopg-c" do + url "https://files.pythonhosted.org/packages/2f/f1/367a2429af2b97f6a46dc116206cd3b1cf668fca7ff3c22b979ea0686427/psycopg_c-3.2.6.tar.gz" + sha256 "b5fd4ce70f82766a122ca5076a36c4d5818eaa9df9bf76870bc83a064ffaed3a" + end + + resource "psycopg-pool" do + url "https://files.pythonhosted.org/packages/cf/13/1e7850bb2c69a63267c3dbf37387d3f71a00fd0e2fa55c5db14d64ba1af4/psycopg_pool-3.2.6.tar.gz" + sha256 "0f92a7817719517212fbfe2fd58b8c35c1850cdd2a80d36b581ba2085d9148e5" + end + + resource "pyarrow" do + url "https://files.pythonhosted.org/packages/7f/09/a9046344212690f0632b9c709f9bf18506522feb333c894d0de81d62341a/pyarrow-19.0.1.tar.gz" + sha256 "3bf266b485df66a400f282ac0b6d1b500b9d2ae73314a153dbe97d6d5cc8a99e" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyodbc" do + url "https://files.pythonhosted.org/packages/a0/36/a1ac7d23a1611e7ccd4d27df096f3794e8d1e7faa040260d9d41b6fc3185/pyodbc-5.2.0.tar.gz" + sha256 "de8be39809c8ddeeee26a4b876a6463529cd487a60d1393eb2a93e9bcd44a8f5" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz" + sha256 "b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310" + end + + resource "questionary" do + url "https://files.pythonhosted.org/packages/a8/b8/d16eb579277f3de9e56e5ad25280fab52fc5774117fb70362e8c2e016559/questionary-2.1.0.tar.gz" + sha256 "6302cdd645b19667d8f6e6634774e9538bfcd1aad9be287e743d96cacaf95587" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "rich-click" do + url "https://files.pythonhosted.org/packages/a6/7a/4b78c5997f2a799a8c5c07f3b2145bbcda40115c4d35c76fbadd418a3c89/rich_click-1.8.8.tar.gz" + sha256 "547c618dea916620af05d4a6456da797fbde904c97901f44d2f32f89d85d6c84" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + end + + resource "shandy-sqlfmt" do + url "https://files.pythonhosted.org/packages/e9/82/43763176f899a87ea66cfe335659862ca2c623de7382d164f01ea35519fd/shandy_sqlfmt-0.26.0.tar.gz" + sha256 "d95abd381640a846c71b0e2effb30d47f0b3eb5f69fb337fafe663634857f7a5" + end + + resource "textual" do + url "https://files.pythonhosted.org/packages/4b/cb/b3ff0e45d812997a527cb581a4cd602f0b28793450aa26201969fd6ce42c/textual-0.89.1.tar.gz" + sha256 "66befe80e2bca5a8c876cd8ceeaf01752267b6b1dc1d0f73071f1f1e15d90cc8" + end + + resource "textual-fastdatatable" do + url "https://files.pythonhosted.org/packages/ef/da/9e86cadf3824df250126616a19d3b79f48f13e0f336605e1a2ab3d5a0aef/textual_fastdatatable-0.12.0.tar.gz" + sha256 "56b035e22d694fa902a8b80120765addd6e32f4eee0151ee46fa6ab1deaad59e" + end + + resource "textual-textarea" do + url "https://files.pythonhosted.org/packages/da/85/e3dd273455337efe8e9f14bd8b048e7f22a40ad86615a69866a03967715c/textual_textarea-0.15.0.tar.gz" + sha256 "1343604a4dc3bac0337c58d926a02ddcf451956fb12532a3d5ade9219905f426" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + 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/4a/64/71b3a0ff7d0d89cb333caeca01992099c165bdd663e7990ea723615e60f4/tree_sitter-0.20.4.tar.gz" + sha256 "6adb123e2f3e56399bbf2359924633c882cc40ee8344885200bca0922f713be5" + end + + # sdist issue report, https://github.com/grantjenks/py-tree-sitter-languages/issues/63 + # https://github.com/grantjenks/py-tree-sitter-languages/issues/54 + resource "tree-sitter-languages" do + url "https://github.com/grantjenks/py-tree-sitter-languages/archive/refs/tags/v1.10.2.tar.gz" + sha256 "cdd03196ebaf8f486db004acd07a5b39679562894b47af6b20d28e4aed1a6ab5" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + 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 "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + venv = virtualenv_install_with_resources without: "mysql-connector-python" + + # PyPI sdist is broken (missing at least setup.py) + # https://bugs.mysql.com/bug.php?id=113396 + resource("mysql-connector-python").stage do + venv.pip_install Pathname.pwd/"mysql-connector-python" + end + + generate_completions_from_executable(bin/"harlequin", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + output = shell_output("#{bin}/harlequin --profile none", 2) + assert_match "Harlequin couldn't load your profile", output + + assert_match version.to_s, shell_output("#{bin}/harlequin --version") + end +end diff --git a/Formula/h/harper.rb b/Formula/h/harper.rb new file mode 100644 index 0000000000000..59fc1b8e50928 --- /dev/null +++ b/Formula/h/harper.rb @@ -0,0 +1,63 @@ +class Harper < Formula + desc "Grammar Checker for Developers" + homepage "https://writewithharper.com/" + url "https://github.com/Automattic/harper/archive/refs/tags/v0.36.0.tar.gz" + sha256 "426a0432e59c04cd14173c5e301bc5122344e4a2099bc5a2baaf70f43ffd51ca" + license "Apache-2.0" + head "https://github.com/Automattic/harper.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f398df19ef15610a7ddcaad20db27eb54313a8958bd562a4ffddfbd7c7c6d0a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "60807f65be439f026e9d617f90c7216c2579598915f84a8af52880065e5b356f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d34f8c98f447d05d9c11a2cd0da0fdf852af62888f259f2f0d881464879e82c3" + sha256 cellar: :any_skip_relocation, sonoma: "b08ed8e9b74f8d47190e3f43294a840767a8dd28f718de56c097dd441c3c3847" + sha256 cellar: :any_skip_relocation, ventura: "4c82bdab9fe5810bc460913251b4c70b838a5370dab93b06bb942513a5da0154" + sha256 cellar: :any_skip_relocation, arm64_linux: "a0e74673cdb30d856bba631cb7d0916d7b1fb7871e1bc7655f3e957fd06dd487" + sha256 cellar: :any_skip_relocation, x86_64_linux: "46530e3a118dc057bd899eee71f6cfd257e2bd35cd64680a4106f8ba3bf857db" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "harper-cli") + system "cargo", "install", *std_cargo_args(path: "harper-ls") + end + + test do + # test harper-cli + (testpath/"test.md").write <<~MARKDOWN + # Hello Harper + + This is an example to ensure language detection works properly. + MARKDOWN + + # Dialect in https://github.com/Automattic/harper/blob/833b212e8665567fa2912e6c07d7c83d394dd449/harper-core/src/word_metadata.rs#L357-L362 + system bin/"harper-cli", "lint", "--dialect", "American", "test.md" + + output = shell_output("#{bin}/harper-cli parse test.md") + assert_equal "Word", JSON.parse(output.lines.first)["kind"]["kind"] + + assert_match "\"iteration\"", shell_output("#{bin}/harper-cli words") + + # test harper-ls + 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}/harper-ls --stdio 2>&1", input) + assert_match(/^Content-Length: \d+/i, output) + end +end diff --git a/Formula/h/harsh.rb b/Formula/h/harsh.rb new file mode 100644 index 0000000000000..e2b6a74f00842 --- /dev/null +++ b/Formula/h/harsh.rb @@ -0,0 +1,28 @@ +class Harsh < Formula + desc "Habit tracking for geeks" + homepage "https://github.com/wakatara/harsh" + url "https://github.com/wakatara/harsh/archive/refs/tags/v0.10.21.tar.gz" + sha256 "3ddf2798ab1853932ecadfb1bcc1ea6cecfb96fbda35fbd52a797baf5844e6b1" + license "MIT" + head "https://github.com/wakatara/harsh.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "681743141ad4722b7161b6f11c6f513d4c5844ee51f25ba9f5535c85ca0eb64a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "681743141ad4722b7161b6f11c6f513d4c5844ee51f25ba9f5535c85ca0eb64a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "681743141ad4722b7161b6f11c6f513d4c5844ee51f25ba9f5535c85ca0eb64a" + sha256 cellar: :any_skip_relocation, sonoma: "c53ec508dd9962b23efba69a2948eecd0400a8468f571b869a4184c51f0e93cf" + sha256 cellar: :any_skip_relocation, ventura: "c53ec508dd9962b23efba69a2948eecd0400a8468f571b869a4184c51f0e93cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82d1afdfcec69c42387a91aeebc377b0c7709e4fbfdf5a990362e852a598e417" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "Harsh version #{version}", shell_output("#{bin}/harsh --version") + assert_match "Welcome to harsh!", shell_output("#{bin}/harsh todo") + end +end diff --git a/Formula/h/has.rb b/Formula/h/has.rb new file mode 100644 index 0000000000000..ee821659d75fa --- /dev/null +++ b/Formula/h/has.rb @@ -0,0 +1,22 @@ +class Has < Formula + desc "Checks presence of various command-line tools and their versions on the path" + homepage "https://github.com/kdabir/has" + url "https://github.com/kdabir/has/archive/refs/tags/v1.5.0.tar.gz" + sha256 "d45be15f234556cdbaffa46edae417b214858a4bd427a44a2a94aaa893da7d99" + license "MIT" + head "https://github.com/kdabir/has.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "dd0eec9c703fb35356c4931881f3c5106a4fdee227e39c2c2844fecf025509e8" + end + + def install + bin.install "has" + end + + test do + assert_match "git", shell_output("#{bin}/has git") + assert_match version.to_s, shell_output("#{bin}/has --version") + end +end diff --git a/Formula/h/hashcash.rb b/Formula/h/hashcash.rb new file mode 100644 index 0000000000000..91ede1586c8a8 --- /dev/null +++ b/Formula/h/hashcash.rb @@ -0,0 +1,43 @@ +class Hashcash < Formula + desc "Proof-of-work algorithm to counter denial-of-service (DoS) attacks" + homepage "http://hashcash.org/" + url "http://hashcash.org/source/hashcash-1.22.tgz" + sha256 "0192f12d41ce4848e60384398c5ff83579b55710601c7bffe6c88bc56b547896" + license any_of: [:public_domain, "BSD-3-Clause", "LGPL-2.1-only", "GPL-2.0-only"] + revision 1 + + livecheck do + url "http://hashcash.org/source/" + regex(/href=.*?hashcash[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "ff46dc55af54e0d3f0e20308536a4ebd0d08fa18c8ae1797fbc75bf2be97c79f" + sha256 cellar: :any, arm64_sonoma: "3b7abf77630bc94b21eb0c23dc42ae2922ee662d724958baf8cd4c24df10db15" + sha256 cellar: :any, arm64_ventura: "8aeaabfc6febb7e6b9c7c163d896f3dd425ea41e74ed49e18312146cdbc66112" + sha256 cellar: :any, arm64_monterey: "c2c65eefb2d69f47865df020f4fce758a783c1a203c11c3055939b153f1ef449" + sha256 cellar: :any, sonoma: "79b371fdc35215fc8e1c9eb83bca3d2ce1fdcfd5d4b998e186f6f4bf6d01a7eb" + sha256 cellar: :any, ventura: "351c383a5882cfd727f386588e4003968476a94eb39fd5e41729d9e4aa4e0455" + sha256 cellar: :any, monterey: "b4fce5f6c16446ee31dca21eac35d6c38a9d61068cb8f59cb37b6eee3196f012" + sha256 cellar: :any_skip_relocation, arm64_linux: "635ea819bef9b8f88bfb4b027258804db1e092f4ea235cd34e09261af318cf31" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b099580ee6cd7ac69d1c63064049ce5ebb922272245be3f3aeac34943d59274" + end + + depends_on "openssl@3" + + def install + ENV.append_to_cflags "-Dunix" + platform = Hardware::CPU.intel? ? "x86" : "generic" + system "make", "#{platform}-openssl", + "LIBCRYPTO=#{Formula["openssl@3"].opt_lib}/#{shared_library("libcrypto")}" + system "make", "install", + "PACKAGER=HOMEBREW", + "INSTALL_PATH=#{bin}", + "MAN_INSTALL_PATH=#{man1}", + "DOC_INSTALL_PATH=#{doc}" + end + + test do + system bin/"hashcash", "-mb10", "test@example.com" + end +end diff --git a/Formula/h/hashcat.rb b/Formula/h/hashcat.rb new file mode 100644 index 0000000000000..658b4408df48b --- /dev/null +++ b/Formula/h/hashcat.rb @@ -0,0 +1,115 @@ +class Hashcat < Formula + desc "World's fastest and most advanced password recovery utility" + homepage "https://hashcat.net/hashcat/" + url "https://hashcat.net/files/hashcat-6.2.6.tar.gz" + mirror "https://github.com/hashcat/hashcat/archive/refs/tags/v6.2.6.tar.gz" + sha256 "b25e1077bcf34908cc8f18c1a69a2ec98b047b2cbcf0f51144dcf3ba1e0b7b2a" + license all_of: [ + "MIT", + "LZMA-SDK-9.22", # deps/LZMA-SDK/ + :public_domain, # include/sort_r.h + ] + revision 1 + version_scheme 1 + head "https://github.com/hashcat/hashcat.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?hashcat[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "06e83f034f4146c057190a75ea05d9ede88a2205db694dacf643d7e4d88b8210" + sha256 arm64_sonoma: "8b1640f18f1fcf6049869f3e461979401f811b1f46d1131676b0732a8b799c7b" + sha256 arm64_ventura: "9b4475b3b7384c8186f3e42e1cef42df899148ecb496f1fdea5c1184773cee6d" + sha256 arm64_monterey: "d05a3da7fe49d7010b867b3fcfd5b71210a4013d1069a6eca4bb1085dec342ab" + sha256 sonoma: "2c7627ab1623911e96f599e9c3cd2e7a29fd53ad3df2b280fb9a39433db8ce72" + sha256 ventura: "ebba1034f159a47591071da81c48fa08dfd79416599d4540da0b01ea974d1aa3" + sha256 monterey: "1f2d0c9bfb3c3b723a27448e9b26377287b4da0aed331c7f1df80e18a29b9089" + sha256 arm64_linux: "7534a31d8feb58822f89d3396496d563092652c5578d1c37ebb17afd87cd3f45" + sha256 x86_64_linux: "efd1c1f00684129f650a86d10c78873d44535502724731b5eca1976e8624d249" + end + + depends_on macos: :high_sierra # Metal implementation requirement + depends_on "minizip" + depends_on "xxhash" + + uses_from_macos "zlib" + + on_macos do + depends_on "gnu-sed" => :build + end + + on_linux do + depends_on "opencl-headers" => :build + depends_on "opencl-icd-loader" + depends_on "pocl" + end + + # Fix 'failed to create metal library' on macos + # extract from hashcat version 66b22fa, remove this patch when version released after 66b22fa + # hashcat 66b22fa link: https://github.com/hashcat/hashcat/commit/66b22fa64472b4d809743c35fb05fc3c993a5cd2#diff-1eece723a1d42fd48f0fc4f829ebbb4a67bd13cb3499f49196f801ee9143ee83R15 + patch :DATA + + def install + # Remove all bundled dependencies other than LZMA-SDK (https://www.7-zip.org/sdk.html) + (buildpath/"deps").each_child { |dep| rm_r(dep) if dep.basename.to_s != "LZMA-SDK" } + (buildpath/"docs/license_libs").each_child { |dep| rm(dep) unless dep.basename.to_s.start_with?("LZMA") } + + args = %W[ + CC=#{ENV.cc} + COMPTIME=#{ENV["SOURCE_DATE_EPOCH"]} + PREFIX=#{prefix} + USE_SYSTEM_XXHASH=1 + USE_SYSTEM_OPENCL=1 + USE_SYSTEM_ZLIB=1 + ENABLE_UNRAR=0 + ] + system "make", *args + system "make", "install", *args + bin.install "hashcat" => "hashcat_bin" + (bin/"hashcat").write_env_script bin/"hashcat_bin", XDG_DATA_HOME: share + end + + test do + ENV["XDG_DATA_HOME"] = testpath + mkdir testpath/"hashcat" + + # OpenCL is not supported on virtualized arm64 macOS + no_opencl = OS.mac? && Hardware::CPU.arm? && Hardware::CPU.virtualized? + # MTLCreateSystemDefaultDevice() isn't supported on GitHub runners. + # Ref: https://github.com/actions/runner-images/issues/1779 + no_metal = !OS.mac? || ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + args = %w[ + --benchmark + --hash-type=0 + --workload-profile=2 + ] + args << (no_opencl ? "--backend-ignore-opencl" : "--opencl-device-types=1,2") + + if no_opencl && no_metal + assert_match "No devices found/left", shell_output("#{bin}/hashcat_bin #{args.join(" ")} 2>&1", 255) + else + assert_match "Hash-Mode 0 (MD5)", shell_output("#{bin}/hashcat_bin #{args.join(" ")}") + end + + assert_equal "v#{version}", shell_output("#{bin}/hashcat_bin --version").chomp + end +end + +__END__ +diff --git a/OpenCL/inc_vendor.h b/OpenCL/inc_vendor.h +index c39fce952..0916a30b3 100644 +--- a/OpenCL/inc_vendor.h ++++ b/OpenCL/inc_vendor.h +@@ -12,7 +12,7 @@ + #define IS_CUDA + #elif defined __HIPCC__ + #define IS_HIP +-#elif defined __METAL_MACOS__ ++#elif defined __METAL__ + #define IS_METAL + #else + #define IS_OPENCL diff --git a/Formula/h/hashlink.rb b/Formula/h/hashlink.rb new file mode 100644 index 0000000000000..2c337a957e7e5 --- /dev/null +++ b/Formula/h/hashlink.rb @@ -0,0 +1,127 @@ +class Hashlink < Formula + desc "Virtual machine for Haxe" + homepage "https://hashlink.haxe.org/" + license "MIT" + head "https://github.com/HaxeFoundation/hashlink.git", branch: "master" + + stable do + url "https://github.com/HaxeFoundation/hashlink/archive/refs/tags/1.15.tar.gz" + sha256 "3c3e3d47ed05139163310cbe49200de8fb220cd343a979cd1f39afd91e176973" + + # Backport fix for arm64 linux, https://github.com/HaxeFoundation/hashlink/pull/765 + patch do + url "https://github.com/HaxeFoundation/hashlink/commit/6794cdbe4407d26f405e5978890de67d4d42a96d.patch?full_index=1" + sha256 "fe885f32e89831a3269cb0da738316843af8ee80f55dc859c97a9cfb1725e7d8" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "88ce0382363f5995731d0fc498aa87d0e3a63e5e1df9dcb850f9aae11f47ce4f" + sha256 cellar: :any, arm64_sonoma: "74702f549d40fa1f1ca50bab1bf403f99b2ed87e2ff6ae9db26ee6ac417b4668" + sha256 cellar: :any, arm64_ventura: "97f8de5f331d21b2d857282e6b3bed1d8b47fd02c3e77aedb789b9711088aee9" + sha256 cellar: :any, sonoma: "99ef63e02f0bbb6a3e54b02319796fed5660f992ee0e1dbe9097239044ad4faa" + sha256 cellar: :any, ventura: "f7e72d266dc1e415280ee163dcbcc8ef6802751e8469229da7c75653b621dca0" + sha256 cellar: :any_skip_relocation, arm64_linux: "032ad206b3a17a214c1c0d0cf8256b7882b1d962306dd8ab5ca7f39c4e3fdc99" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7e70f6faae35bb958d819576c54d06d9852415cbbc5e98c8846db377a83eed8" + end + + depends_on "haxe" => :test + depends_on "jpeg-turbo" + depends_on "libogg" + depends_on "libpng" + depends_on "libuv" + depends_on "libvorbis" + depends_on "mbedtls" + depends_on "openal-soft" + depends_on "sdl2" + + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_linux do + depends_on "mesa" + depends_on "mesa-glu" + end + + def install + # NOTE: This installs lib/*.hdll files which would be audited by `--new`. + # These appear to be renamed shared libraries specifically used by HashLink. + args = ["PREFIX=#{prefix}"] + + if OS.mac? + # make file doesn't set rpath on mac yet + args << "EXTRA_LFLAGS=-Wl,-rpath,#{rpath}" + else + args << "ARCH=arm64" if Hardware::CPU.arm? + # On Linux, also set RPATH in LIBFLAGS, so that the linker will also add the RPATH to .hdll files. + inreplace "Makefile", "LIBFLAGS =", "LIBFLAGS = -Wl,-rpath,${INSTALL_LIB_DIR}" + end + + system "make", *args + system "make", "install", *args + end + + def caveats + on_arm do + <<~EOS + The HashLink/JIT virtual machine (hl) is not installed as only + HashLink/C native compilation is supported on ARM processors. + + See https://github.com/HaxeFoundation/hashlink/issues/557 + EOS + end + end + + test do + haxebin = Formula["haxe"].bin + + (testpath/"HelloWorld.hx").write <<~EOS + class HelloWorld { + static function main() Sys.println("Hello world!"); + } + EOS + + (testpath/"TestHttps.hx").write <<~EOS + class TestHttps { + static function main() { + var http = new haxe.Http("https://www.google.com/"); + http.onStatus = status -> Sys.println(status); + http.onError = error -> { + trace('error: $error'); + Sys.exit(1); + } + http.request(); + } + } + EOS + + system "#{haxebin}/haxe", "-hl", "HelloWorld.hl", "-main", "HelloWorld" + system "#{haxebin}/haxe", "-hl", "TestHttps.hl", "-main", "TestHttps" + + if Hardware::CPU.intel? + assert_equal "Hello world!\n", shell_output("#{bin}/hl HelloWorld.hl") + assert_equal "200\n", shell_output("#{bin}/hl TestHttps.hl") + end + + (testpath/"build").mkdir + system "#{haxebin}/haxelib", "newrepo" + system "#{haxebin}/haxelib", "install", "hashlink" + + system "#{haxebin}/haxe", "-hl", "HelloWorld/main.c", "-main", "HelloWorld" + + flags = %W[ + -I#{include} + -L#{lib} + ] + flags << "-Wl,-rpath,#{lib}" unless OS.mac? + + system ENV.cc, "HelloWorld/main.c", "-O3", "-std=c11", "-IHelloWorld", + *flags, "-lhl", "-o", "build/HelloWorld" + assert_equal "Hello world!\n", `./build/HelloWorld` + + system "#{haxebin}/haxe", "-hl", "TestHttps/main.c", "-main", "TestHttps" + system ENV.cc, "TestHttps/main.c", "-O3", "-std=c11", "-ITestHttps", + *flags, "-lhl", "-o", "build/TestHttps", lib/"ssl.hdll" + assert_equal "200\n", `./build/TestHttps` + end +end diff --git a/Formula/h/hashpump.rb b/Formula/h/hashpump.rb new file mode 100644 index 0000000000000..f09da4f825b11 --- /dev/null +++ b/Formula/h/hashpump.rb @@ -0,0 +1,70 @@ +class Hashpump < Formula + desc "Tool to exploit hash length extension attack" + homepage "https://github.com/bwall/HashPump" + url "https://github.com/bwall/HashPump/archive/refs/tags/v1.2.0.tar.gz" + sha256 "d002e24541c6604e5243e5325ef152e65f9fcd00168a9fa7a06ad130e28b811b" + license "MIT" + revision 7 + + bottle do + sha256 cellar: :any, arm64_ventura: "ee4e8e386dbf585e9672aabb460e44e0a3ba40486d71443200912c1e39e95ad5" + sha256 cellar: :any, arm64_monterey: "63cf0b6889738999549fbaec92d5a6659c7e67243e6c1d8c6de327a625aec770" + sha256 cellar: :any, arm64_big_sur: "462e0b0b6d802d8b63a5179525830a7a2b653e508447c3a3c6c1e49fa644e173" + sha256 cellar: :any, ventura: "4719aeb4e527d69dec4a39e3ebd572f5e3a75997771fa7bdb7b95d8ef1a0d52c" + sha256 cellar: :any, monterey: "c947cdf5337bf9b01d58bfab17640121972ecda945c19142296d94738a7a637a" + sha256 cellar: :any, big_sur: "680680ea8ab91083953e359b7fb74bd8195e4d9c94fdb3c351741d90983f72c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "542fd495cbe83aed52b7766926946f923d1e395f46cb4245b6ac6387cbeb0276" + end + + disable! date: "2024-09-16", because: :repo_removed + + depends_on "openssl@3" + depends_on "python@3.11" + + # Remove on next release + patch do + url "https://github.com/bwall/HashPump/commit/1d76a269d18319ea3cc9123901ea8cf240f7cc34.patch?full_index=1" + sha256 "ffc978cbc07521796c0738df77a3e40d79de0875156f9440ef63eca06b2e2779" + end + + # Fix compatibility with Python 3.10 and later. + # SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats + # PR ref: https://github.com/bwall/HashPump/pull/25 + patch :DATA + + def python3 + "python3.11" + end + + def install + bin.mkpath + system "make", "INSTALLLOCATION=#{bin}", "install" + system python3, "-m", "pip", "install", *std_pip_args, "." + end + + test do + output = shell_output("#{bin}/hashpump -s '6d5f807e23db210bc254a28be2d6759a0f5f5d99' " \ + "-d 'count=10&lat=37.351&user_id=1&long=-119.827&waffle=eggo' " \ + "-a '&waffle=liege' -k 14") + assert_match "0e41270260895979317fff3898ab85668953aaa2", output + assert_match "&waffle=liege", output + assert_equal 0, $CHILD_STATUS.exitstatus + + (testpath/"test.py").write <<~PYTHON + import hashpumpy + print(hashpumpy.hashpump('ffffffff', 'original_data', 'data_to_add', len('KEYKEYKEY'))[0]) + PYTHON + assert_equal "e3c4a05f", shell_output("#{python3} test.py").chomp + end +end + +__END__ +diff --git a/hashpumpy.cpp b/hashpumpy.cpp +index e84e442..eaa9f04 100644 +--- a/hashpumpy.cpp ++++ b/hashpumpy.cpp +@@ -1,3 +1,4 @@ ++#define PY_SSIZE_T_CLEAN + #include + #include + #include diff --git a/Formula/h/haskell-language-server.rb b/Formula/h/haskell-language-server.rb new file mode 100644 index 0000000000000..5ccaaa2234ebe --- /dev/null +++ b/Formula/h/haskell-language-server.rb @@ -0,0 +1,88 @@ +class HaskellLanguageServer < Formula + desc "Integration point for ghcide and haskell-ide-engine. One IDE to rule them all" + homepage "https://github.com/haskell/haskell-language-server" + url "https://github.com/haskell/haskell-language-server/releases/download/2.10.0.0/haskell-language-server-2.10.0.0-src.tar.gz" + sha256 "dd7ba032767e9a955f334617eef8f4b8b12b260191f97ad883545851f498dc0a" + license "Apache-2.0" + head "https://github.com/haskell/haskell-language-server.git", branch: "master" + + # we need :github_latest here because otherwise + # livecheck picks up spurious non-release tags + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a49980333b291f0817180be4b6d35818b0d6ab670943623dccb9c9820f8339c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d23f1a7a36b002d29587f5077262654b80100471200b870bb7987e5d8448cd4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "61bf5b68dc9cd636f5a2ef3792a8c955a33e461544ce2da87efcb1cb29975358" + sha256 cellar: :any_skip_relocation, sonoma: "d2b798ae2b7c005c05170f7e92f653b939ed51e4f6e907e737ae9b3bf5645923" + sha256 cellar: :any_skip_relocation, ventura: "e04bb44cbacf239ec843f840bc6887a760c4a021abc6996465a5d8d85b88947b" + sha256 cellar: :any_skip_relocation, arm64_linux: "7784b1f454b182e6227b1ead86db9e4a04d5b22cef627bb3743ec4d95645711d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bab5d18cee8d36906dc58806f1c42ef705ad217c2b2521648284ecf900f8d042" + end + + depends_on "cabal-install" => [:build, :test] + depends_on "ghc" => [:build, :test] + depends_on "ghc@9.10" => [:build, :test] + depends_on "ghc@9.8" => [:build, :test] + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def ghcs + deps.filter_map { |dep| dep.to_formula if dep.name.match? "ghc" } + .sort_by(&:version) + end + + def install + # Cannot dynamically link when supporting multiple versions of GHC in single formula + args = ["--disable-executable-dynamic", "--flags=-dynamic -test-exe"] + # Work around failure: ld: B/BL out of range 204883708 (max +/-128MB) + args << "--ghc-option=-optl-ld_classic" if DevelopmentTools.clang_build_version == 1500 && Hardware::CPU.arm? + + system "cabal", "v2-update" + + ghcs.each do |ghc| + system "cabal", "v2-install", "--with-compiler=#{ghc.bin}/ghc", *args, *std_cabal_v2_args + + cmds = ["haskell-language-server", "ghcide-bench"] + cmds.each do |cmd| + bin.install bin/cmd => "#{cmd}-#{ghc.version}" + bin.install_symlink "#{cmd}-#{ghc.version}" => "#{cmd}-#{ghc.version.major_minor}" + end + (bin/"haskell-language-server-wrapper").unlink if ghc != ghcs.last + end + end + + def caveats + ghc_versions = ghcs.map { |ghc| ghc.version.to_s }.join(", ") + + <<~EOS + #{name} is built for GHC versions #{ghc_versions}. + You need to provide your own GHC or install one with + brew install #{ghcs.last} + EOS + end + + test do + (testpath/"valid.hs").write <<~HASKELL + f :: Int -> Int + f x = x + 1 + HASKELL + + (testpath/"invalid.hs").write <<~HASKELL + f :: Int -> Int + HASKELL + + ghcs.each do |ghc| + with_env(PATH: "#{ghc.bin}:#{ENV["PATH"]}") do + hls = bin/"haskell-language-server-#{ghc.version.major_minor}" + assert_match "Completed (1 file worked, 1 file failed)", shell_output("#{hls} #{testpath}/*.hs 2>&1", 1) + end + end + end +end diff --git a/Formula/h/haskell-stack.rb b/Formula/h/haskell-stack.rb new file mode 100644 index 0000000000000..96ada413d33cb --- /dev/null +++ b/Formula/h/haskell-stack.rb @@ -0,0 +1,53 @@ +class HaskellStack < Formula + desc "Cross-platform program for developing Haskell projects" + homepage "https://haskellstack.org/" + url "https://github.com/commercialhaskell/stack/archive/refs/tags/v3.5.1.tar.gz" + sha256 "00de60eaefdba1aa289ed409a9cabe8d63f9f6d554018456ab7f78531b2c3629" + license "BSD-3-Clause" + head "https://github.com/commercialhaskell/stack.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bb81522eb7a165d7f1dc9650b1cc2bedacfb43cca1a08a0c960e5519a90f37a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b25f2852beeca1d67c7771142af9b81d404f9a1dae8985caf4641f6be33b0746" + sha256 cellar: :any_skip_relocation, arm64_ventura: "58ed8f3b45ce0d96ef92ce596ee4aa8c898c2a004d3fa94ac5ac7aad3da10d7b" + sha256 cellar: :any_skip_relocation, sonoma: "5492d567c98c075d1312897d0afb4645f44d500814bce73785729f86f95099d7" + sha256 cellar: :any_skip_relocation, ventura: "27831d3d54f8b3b7ab1e59da20dedc67c8da46e85bb2c7379df0f1333af47a15" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e6a57d5ccfc7082cde45e9b926a774c7f3d455d2c693fa0f758e881328d0d8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dfbfa1acd47505570bbb0b1989c824af5bc0b280f2003bbb10df1f2e566cab4d" + end + + depends_on "cabal-install" => :build + # https://github.com/commercialhaskell/stack/issues/6625#issuecomment-2228087359 + # https://github.com/commercialhaskell/stack/blob/master/stack-ghc-9.10.1.yaml#L4-L5 + depends_on "ghc@9.8" => :build # GHC 9.10+ blocked by Cabal 3.12+ API changes + + uses_from_macos "zlib" + + def install + # Remove locked dependencies which only work with a single patch version of GHC. + # If there are issues resolving dependencies, then can consider bootstrapping with stack instead. + (buildpath/"cabal.project").unlink + (buildpath/"cabal.project").write <<~EOS + packages: . + EOS + + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + + [:bash, :fish, :zsh].each do |shell| + generate_completions_from_executable(bin/"stack", "--#{shell}-completion-script", bin/"stack", + shells: [shell], shell_parameter_format: :none) + end + end + + test do + system bin/"stack", "new", "test" + assert_path_exists testpath/"test" + assert_match "# test", (testpath/"test/README.md").read + end +end diff --git a/Formula/h/haste-client.rb b/Formula/h/haste-client.rb new file mode 100644 index 0000000000000..8f5d8cd5c98cb --- /dev/null +++ b/Formula/h/haste-client.rb @@ -0,0 +1,60 @@ +class HasteClient < Formula + desc "CLI client for haste-server" + homepage "https://hastebin.com/" + url "https://github.com/toptal/haste-client/archive/refs/tags/v0.3.0.tar.gz" + sha256 "9f7e943be47408ba0b9765328794e7b87bdb2a785f1e9edb5d541d67b4a75d31" + license "MIT" + revision 2 + head "https://github.com/toptal/haste-client.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e6968438749dec734a5a5ab8c4dac48fd5eee5b2c8adfe6ec8908d17c72788c1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e6968438749dec734a5a5ab8c4dac48fd5eee5b2c8adfe6ec8908d17c72788c1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e6968438749dec734a5a5ab8c4dac48fd5eee5b2c8adfe6ec8908d17c72788c1" + sha256 cellar: :any_skip_relocation, sonoma: "e6968438749dec734a5a5ab8c4dac48fd5eee5b2c8adfe6ec8908d17c72788c1" + sha256 cellar: :any_skip_relocation, ventura: "e6968438749dec734a5a5ab8c4dac48fd5eee5b2c8adfe6ec8908d17c72788c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "d3a5464d1d5022277c0c64052cc9bc98d2664901f78ad655e153fea1fcb08c44" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dee9ebcf14e0273c14d8e28ceb77984f9fcd521e11cbc65f74762897d0e73cba" + end + + deprecate! date: "2025-04-18", because: :repo_archived + + uses_from_macos "ruby", since: :high_sierra + + resource "faraday" do + url "https://rubygems.org/gems/faraday-0.17.6.gem" + sha256 "a572118695fce2937e3a8bed33498ac0c25a263cdb570ea5cd2e41b36c821c34" + end + + resource "json" do + on_system :linux, macos: :sierra_or_older do + url "https://rubygems.org/gems/json-2.6.3.gem" + sha256 "86aaea16adf346a2b22743d88f8dcceeb1038843989ab93cda44b5176c845459" + end + end + + resource "multipart-post" do + url "https://rubygems.org/gems/multipart-post-2.3.0.gem" + sha256 "3dcdd74a767302559fcf91a63b568ee00770494ce24195167b1c147ab3f6fe51" + end + + def install + ENV["GEM_HOME"] = libexec + resources.each do |r| + r.fetch + system "gem", "install", r.cached_download, "--no-document", + "--install-dir", libexec + end + system "gem", "build", "haste.gemspec" + system "gem", "install", "--ignore-dependencies", "haste-#{version}.gem" + bin.install libexec/"bin/haste" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + test_file = testpath/"dummy_file" + touch test_file + output = shell_output("#{bin}/haste #{test_file} 2>&1", 1) + assert_match "Unauthorized request: missing access token", output + end +end diff --git a/Formula/h/hasura-cli.rb b/Formula/h/hasura-cli.rb new file mode 100644 index 0000000000000..ab5f0ca2001e1 --- /dev/null +++ b/Formula/h/hasura-cli.rb @@ -0,0 +1,53 @@ +class HasuraCli < Formula + desc "Command-Line Interface for Hasura GraphQL Engine" + homepage "https://hasura.io/" + url "https://github.com/hasura/graphql-engine/archive/refs/tags/v2.47.0.tar.gz" + sha256 "77302d2040a4b751ab4cd380a3e1ae076c766f5831f50e9c1b129daf4f29182b" + license "Apache-2.0" + head "https://github.com/hasura/graphql-engine.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0cf82800a978f1dae7eedbfd498ad07fa51ce5f9897aa65be9d50a4911f81777" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0cf82800a978f1dae7eedbfd498ad07fa51ce5f9897aa65be9d50a4911f81777" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0cf82800a978f1dae7eedbfd498ad07fa51ce5f9897aa65be9d50a4911f81777" + sha256 cellar: :any_skip_relocation, sonoma: "f8ff28b8ab7095ccb9f8b1f8524572daa46b3b4288b052f8af84c20d3b08d28d" + sha256 cellar: :any_skip_relocation, ventura: "f8ff28b8ab7095ccb9f8b1f8524572daa46b3b4288b052f8af84c20d3b08d28d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5f028f4c15eeedafe1f173248dc2eab692611ea7b5ff40831a2c6897ba8ab3b" + end + + deprecate! date: "2024-10-29", because: "uses `node@18`, which is deprecated" + + depends_on "go" => :build + depends_on "node@18" => :build + + def install + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + os = OS.kernel_name.downcase + + # Based on `make build-cli-ext`, but only build a single host-specific binary + cd "cli-ext" do + # TODO: Remove `npm add pkg` when https://github.com/hasura/graphql-engine/issues/9440 is resolved. + system "npm", "add", "pkg@5.8.1" + system "npm", "install", *std_npm_args(prefix: false) + system "npm", "run", "prebuild" + dest = "./cli/internal/cliext/static-bin/#{os}/#{arch}/cli-ext" + system "npx", "pkg", "./build/command.js", "--output", dest, "-t", "host" + end + + ldflags = %W[ + -s -w + -X github.com/hasura/graphql-engine/cli/v2/version.BuildVersion=#{version} + -X github.com/hasura/graphql-engine/cli/v2/plugins.IndexBranchRef=master + ] + cd "cli" do + system "go", "build", *std_go_args(output: bin/"hasura", ldflags:), "./cmd/hasura/" + end + + generate_completions_from_executable(bin/"hasura", "completion", shells: [:bash, :zsh]) + end + + test do + system bin/"hasura", "init", "testdir" + assert_path_exists testpath/"testdir/config.yaml" + end +end diff --git a/Formula/h/hatari.rb b/Formula/h/hatari.rb new file mode 100644 index 0000000000000..dd26c02846ea3 --- /dev/null +++ b/Formula/h/hatari.rb @@ -0,0 +1,58 @@ +class Hatari < Formula + desc "Atari ST/STE/TT/Falcon emulator" + homepage "https://www.hatari-emu.org/" + url "https://framagit.org/hatari/releases/-/raw/main/v2.5/hatari-2.5.0.tar.bz2" + sha256 "d76c22fc3de69fb1bb4af3e8ba500b7e40f5a2a45d07783f24cb7101e53c3457" + license "GPL-2.0-or-later" + head "https://framagit.org/hatari/hatari.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fd62555b198d19de0d5afa2dcf6538030b015edbecbb67e7f71b6b0650b51e4e" + sha256 cellar: :any, arm64_sonoma: "c621abae9b430a09f6389df198a246bab810281201b4d7e87fbaac311db06d22" + sha256 cellar: :any, arm64_ventura: "cacb7a21109dc0377d2e24bcf8f183ea94c295fcae57688e9703de1e0ed6eceb" + sha256 cellar: :any, arm64_monterey: "26032585bf8048b0987200009f9532d1a0281051644511269cc4918d94680b78" + sha256 cellar: :any, sonoma: "107fc887028fe359dc50681b60dca25b27bb498d333167874e021e4f8dc0f0b1" + sha256 cellar: :any, ventura: "0fc52a934a1d10afabf313998aadb3257cf1043d5232057c9b42714f9417b59a" + sha256 cellar: :any, monterey: "b3691b1718cea74b9fd1c859aaa7bae64732fb9d47ccc55ba8851628ee66e3c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "de32a18236e652b50c7653df4f9accaf247f24c36577c96bec0af61ce2c4a8ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3a872e656f3ca0cf1d3db8447e745c81b8ad652580f0481e571deded52351f3" + end + + depends_on "cmake" => :build + depends_on "libpng" + depends_on "sdl2" + + uses_from_macos "zlib" + + on_linux do + depends_on "libx11" + depends_on "readline" + end + + # Download EmuTOS ROM image + resource "emutos" do + url "https://downloads.sourceforge.net/project/emutos/emutos/1.3/emutos-1024k-1.3.zip" + sha256 "076d451f15ddf7b64530c14431142b026569b1e5d6becc1af37aa008db81333f" + end + + def install + # Set .app bundle destination + inreplace "src/CMakeLists.txt", "/Applications", prefix + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.arch}", *std_cmake_args + system "cmake", "--build", "build" + if OS.mac? + prefix.install "build/src/Hatari.app" + bin.write_exec_script prefix/"Hatari.app/Contents/MacOS/hatari" + else + system "cmake", "--install", "build" + end + resource("emutos").stage do + datadir = OS.mac? ? prefix/"Hatari.app/Contents/Resources" : pkgshare + datadir.install "etos1024k.img" => "tos.img" + end + end + + test do + assert_match "Hatari v#{version} -", shell_output("#{bin}/hatari -v", 1) + end +end diff --git a/Formula/h/hatch.rb b/Formula/h/hatch.rb new file mode 100644 index 0000000000000..25edacdb81d08 --- /dev/null +++ b/Formula/h/hatch.rb @@ -0,0 +1,215 @@ +class Hatch < Formula + include Language::Python::Virtualenv + + desc "Modern, extensible Python project management" + homepage "https://hatch.pypa.io/latest/" + url "https://files.pythonhosted.org/packages/1f/43/c0b37db0e857a44ce5ffdb7e8a9b8fa6425d0b74dea698fafcd9bddb50d1/hatch-1.14.1.tar.gz" + sha256 "ca1aff788f8596b0dd1f8f8dfe776443d2724a86b1976fabaf087406ba3d0713" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a4eda7fb30534534d4faae868ad401f83d4f42166f097d45e47ebc2a55a42483" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bdf1828ac87e8a2e4f42f88d898383846e7bd85598090a962dd22ac2647dbcef" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b06966c90c33a346877cfc84c09d51270fbb8c37e4f8df258dcb9e09e6d0eef6" + sha256 cellar: :any_skip_relocation, sonoma: "a274928615946c8530317b3491b8ae65a0d9b699e75243801b0d9b5ebcf4b5d8" + sha256 cellar: :any_skip_relocation, ventura: "425135d328dbcf49d264d243967a78267249439e547f00f02b7ab8402b1a4f1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f98a7b38bad0e6482bff83ce27ae3396165fd86ddb129fbf8c4c823948ea8d62" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4c3c96c76b37bc851bc07d14dedc6ce5339c21ec7293b9340dc92c08a2ddaa6" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + depends_on "uv" + + on_linux do + depends_on "cffi" + depends_on "pycparser" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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 "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "hatchling" do + url "https://files.pythonhosted.org/packages/8f/8a/cc1debe3514da292094f1c3a700e4ca25442489731ef7c0814358816bb03/hatchling-1.27.0.tar.gz" + sha256 "971c296d9819abb3811112fc52c7a9751c8d381898f36533bb16f9791e941fd6" + 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 "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 "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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + 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/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz" + sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" + 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/ce/a0/834b0cebabbfc7e311f30b46c8188790a37f89fc8d756660346fe5abfd09/more_itertools-10.7.0.tar.gz" + sha256 "9fddd5403be01a94b204faadcff459ec3568cf110265d3c54323e1e866ad29d3" + 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 "platformdirs" do + url "https://files.pythonhosted.org/packages/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "ptyprocess" do + url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" + sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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 "tomli-w" do + url "https://files.pythonhosted.org/packages/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz" + sha256 "2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + resource "trove-classifiers" do + url "https://files.pythonhosted.org/packages/52/db/cd8510702ed0ac1215e960ab3511a7f5750d63b56f2ae94d94fb4a6425af/trove_classifiers-2025.4.11.15.tar.gz" + sha256 "634728aa6698dc1ae3db161da94d9e4c7597a9a5da2c4410211b36f15fed60fc" + end + + resource "userpath" do + url "https://files.pythonhosted.org/packages/d5/b7/30753098208505d7ff9be5b3a32112fb8a4cb3ddfccbbb7ba9973f2e29ff/userpath-1.9.2.tar.gz" + sha256 "6c52288dab069257cc831846d15d48133522455d4677ee69a9781f11dbefd815" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/38/e0/633e369b91bbc664df47dcb5454b6c7cf441e8f5b9d0c250ce9f0546401e/virtualenv-20.30.0.tar.gz" + sha256 "800863162bcaa5450a6e4d721049730e7f2dae07720e0902b0e4040bd6f9ada8" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/ed/f6/2ac0287b442160a89d726b17a9184a4c615bb5237db763791a7fd16d9df1/zstandard-0.23.0.tar.gz" + sha256 "b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"hatch", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + ENV["HATCH_PYTHON"] = "self" + system bin/"hatch", "new", "homebrew" + assert_path_exists testpath/"homebrew/pyproject.toml" + + cd testpath/"homebrew" do + inreplace "pyproject.toml", "dependencies = []", "dependencies = ['requests==2.31.0']" + system bin/"hatch", "config", "set", "dirs.env.virtual", ".venv" + system bin/"hatch", "env", "create" + output = shell_output("#{bin}/hatch env run -- python -c 'import requests;print(requests.__version__)'") + assert_equal "2.31.0", output.strip.lines.last + end + end +end diff --git a/Formula/h/havener.rb b/Formula/h/havener.rb new file mode 100644 index 0000000000000..50d44346f2664 --- /dev/null +++ b/Formula/h/havener.rb @@ -0,0 +1,33 @@ +class Havener < Formula + desc "Swiss army knife for Kubernetes tasks" + homepage "https://github.com/homeport/havener" + url "https://github.com/homeport/havener/archive/refs/tags/v2.2.6.tar.gz" + sha256 "f5fe8bc809694bd8c757c3ddaac91cdcc20eb9efc988dd736838b0a8bbfdf7e8" + license "MIT" + head "https://github.com/homeport/havener.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "782f87dbacbc1f10917ce27d6c55a7b056a79599d8cb278a4177f083f997df94" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f4d9fa80983fc35b46c5fdf848329e6411f7721fb682c2b7e47f245a18d1284c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7508c64e16751ec9db51a2c3bb20723c81a63d41e1c5f764cd905f80c1f01501" + sha256 cellar: :any_skip_relocation, sonoma: "d92ca660499fd2425363e86b2a4e8705d66f6fdca8ecd9d67df608268f5957c3" + sha256 cellar: :any_skip_relocation, ventura: "c0c17a5fc1a6da70aa556b4fd99705774d13d1afd2a66e0b027d76177a08b9ed" + sha256 cellar: :any_skip_relocation, arm64_linux: "f045d9de94acb50ebf35282493b8111f01e7b94acb8dac684df1b4cc2d2fd1fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b26d282528a406601cfe3abb4d5ad3d5809b0403e00389d6e8736750d35ce419" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/homeport/havener/internal/cmd.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/havener" + + generate_completions_from_executable(bin/"havener", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/havener version") + + assert_match "unable to get access to cluster", shell_output("#{bin}/havener events 2>&1", 1) + end +end diff --git a/Formula/h/havn.rb b/Formula/h/havn.rb new file mode 100644 index 0000000000000..9b0572aef5fa1 --- /dev/null +++ b/Formula/h/havn.rb @@ -0,0 +1,30 @@ +class Havn < Formula + desc "Fast configurable port scanner with reasonable defaults" + homepage "https://github.com/mrjackwills/havn" + url "https://github.com/mrjackwills/havn/archive/refs/tags/v0.2.1.tar.gz" + sha256 "fb6b6020f46da25d47297bc4ef6532d05ab2b4a6e15d2b2fa604c94332d29106" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b24849890d88b43caff250678f08011abb5619f9477bdf0dde46cc66c4bdff7d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e2aa5db2dabbad41ac44dc6466c5634bb7f0ef76f3a483ee54baf5d8c151cf1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e5a1b929a0b723b86fb32e5d05f0679567ab10e3f31b9f4f7b4e9439eeb8a91a" + sha256 cellar: :any_skip_relocation, sonoma: "e5d2b361d8301fbdb0c7cfbd14c237e3c74db5a729c808d134edec50f76633aa" + sha256 cellar: :any_skip_relocation, ventura: "01e81f1daf0bb75b4ce93605f78a74bb7ec2d7cc6c826ecb69f28b279dfa1122" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d3aa5609f4e2e052f6085a4429b31ea559f5b63610c0dfe0f5786de32cdb1ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44ae34dc9053eb50a6399cd14ccadc01728801f0b1b69f3db01d16fa805ceff1" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = shell_output("#{bin}/havn example.com -p 443 -r 6") + assert_match "1 open\e[0m, \e[31m0 closed", output + + assert_match version.to_s, shell_output("#{bin}/havn --version") + end +end diff --git a/Formula/h/hawkeye.rb b/Formula/h/hawkeye.rb new file mode 100644 index 0000000000000..6db81394c572b --- /dev/null +++ b/Formula/h/hawkeye.rb @@ -0,0 +1,39 @@ +class Hawkeye < Formula + desc "Simple license header checker and formatter, in multiple distribution forms" + homepage "https://github.com/korandoru/hawkeye" + url "https://github.com/korandoru/hawkeye/archive/refs/tags/v6.0.3.tar.gz" + sha256 "339a5d9b9461637b90b518158568607ba50bda4f27799af40d6cef28436255bc" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ea5793271a325cee369ad2297073eec9d999887339fbb0df05faaf9cc62d95c5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2ee33048b4858dcc734d160fe1bb86f2d66dc78f56052751a3c5432540642b14" + sha256 cellar: :any_skip_relocation, arm64_ventura: "af72ecfda55801481b2c1b66fd7d82aa61f42547a0954bff20ce301d6c610956" + sha256 cellar: :any_skip_relocation, sonoma: "9db1a87051b178dcaa1ed321fb2a2bf79aad0e27bec75002728e3f738ee34d64" + sha256 cellar: :any_skip_relocation, ventura: "6ecd32e655b3321a0e0090e34d31810be8853eab976bd3317a877eb5c174e5d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "08aca455279a8e6bac6b9cd02c12f47ae7293cff514264f902435f81d79131ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5487fcf1de1b759ccb3eef7688d2dcdd12f1803b542edd9f32fa229ef7fd37c" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + end + + test do + assert_includes shell_output("#{bin}/hawkeye --version"), "hawkeye \nversion: #{version}\n" + + configfile = testpath/"licenserc.toml" + configfile.write <<~EOS + inlineHeader = """ + Copyright © 1970 + """ + + includes = ["licenserc.toml"] + EOS + + shell_output("#{bin}/hawkeye format", 1) + assert File.read("licenserc.toml").start_with?("# Copyright © 1970") + end +end diff --git a/Formula/h/haxe.rb b/Formula/h/haxe.rb new file mode 100644 index 0000000000000..66e45a7772d1c --- /dev/null +++ b/Formula/h/haxe.rb @@ -0,0 +1,133 @@ +class Haxe < Formula + desc "Multi-platform programming language" + homepage "https://haxe.org/" + license all_of: ["GPL-2.0-or-later", "MIT"] + head "https://github.com/HaxeFoundation/haxe.git", branch: "development" + + stable do + # TODO: Remove `extlib==1.7.9` pin when upstream fixes https://github.com/HaxeFoundation/haxe/issues/11787 + # TODO: Remove `ctypes==0.21.1` pin when build fails from pointer mismatch (i.e. `luv >= 0.5.13`) + # Ref: https://github.com/HaxeFoundation/haxe/commit/e646e6f182c920694968ba7a28ad01ddfee4519a + # Ref: https://github.com/HaxeFoundation/haxe/commit/0866067940256afc9227a75f96baee6ec64ee373 + url "https://github.com/HaxeFoundation/haxe.git", + tag: "4.3.6", + revision: "760c0dd9972abadceba4e72edb1db13b2a4fb315" + + # Backport support for mbedtls 3.x + patch do + url "https://github.com/HaxeFoundation/haxe/commit/c3258892c3c829ddd9faddcc0167108e62c84390.patch?full_index=1" + sha256 "d92fa85053ed4303f147e784e528380f6a0f6f08d35b5d93fbdfbf072ca7ed3e" + end + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "e8b9ac34567f3367a0d6e420c3a64782113cb4b279bdfe405c42e74086c45b8d" + sha256 cellar: :any, arm64_sonoma: "7b578bd443368559647f8f4b83b4f8836f57a5d753fb039dadfbcdbe7de79093" + sha256 cellar: :any, arm64_ventura: "20d95b7e36e2332cb253d226ddd5d321376235aa505e2a0a5ae20bdf023b4a6f" + sha256 cellar: :any, sonoma: "bc78b84d45023ee30a3dc005043d89171b3bd3489a917670bff5d91aeb48c6bd" + sha256 cellar: :any, ventura: "23effcc0f7131aa4c4367a357b1f6f905bfaf214ee08ba83d15e57b211680a6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f095dbf4adcdbc71e5a95b089f67c25d9955e4f1a2dc4f1e158ad63491a2ae0c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b93448c64ffe1c9250e868fde52012b3cef2543b4954e7e24697a221c57b645" + end + + depends_on "cmake" => :build + depends_on "ocaml" => :build + depends_on "opam" => :build + depends_on "pkgconf" => :build + depends_on "mbedtls" + depends_on "neko" + depends_on "pcre2" + + uses_from_macos "m4" => :build + uses_from_macos "perl" => :build + uses_from_macos "rsync" => :build + uses_from_macos "unzip" => :build + uses_from_macos "zlib" + + on_linux do + depends_on "node" => :test + 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 "IPC::System::Simple" do + url "https://cpan.metacpan.org/authors/id/J/JK/JKEENAN/IPC-System-Simple-1.30.tar.gz" + sha256 "22e6f5222b505ee513058fdca35ab7a1eab80539b98e5ca4a923a70a8ae9ba9e" + end + + def install + # Build requires targets to be built in specific order + ENV.deparallelize + + 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 + + Dir.mktmpdir("opamroot") do |opamroot| + ENV["OPAMROOT"] = opamroot + ENV["OPAMYES"] = "1" + ENV["ADD_REVISION"] = "1" if build.head? + system "opam", "init", "--no-setup", "--disable-sandboxing" + system "opam", "exec", "--", "opam", "pin", "add", "ctypes", "0.21.1" + system "opam", "exec", "--", "opam", "pin", "add", "extlib", "1.7.9" + system "opam", "exec", "--", "opam", "pin", "add", "haxe", buildpath, "--no-action" + system "opam", "exec", "--", "opam", "install", "haxe", "--deps-only", "--working-dir", "--no-depexts" + system "opam", "exec", "--", "make" + end + + # Rebuild haxelib as a valid binary + cd "extra/haxelib_src" do + system "cmake", ".", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "make" + end + rm "haxelib" + cp "extra/haxelib_src/haxelib", "haxelib" + + bin.mkpath + system "make", "install", "INSTALL_BIN_DIR=#{bin}", + "INSTALL_LIB_DIR=#{lib}/haxe", "INSTALL_STD_DIR=#{lib}/haxe/std" + end + + def caveats + <<~EOS + Add the following line to your .bashrc or equivalent: + export HAXE_STD_PATH="#{HOMEBREW_PREFIX}/lib/haxe/std" + EOS + end + + test do + ENV["HAXE_STD_PATH"] = HOMEBREW_PREFIX/"lib/haxe/std" + + system bin/"haxe", "-v", "Std" + system bin/"haxelib", "version" + + (testpath/"HelloWorld.hx").write <<~EOS + import js.html.Console; + + class HelloWorld { + static function main() Console.log("Hello world!"); + } + EOS + system bin/"haxe", "-js", "out.js", "-main", "HelloWorld" + + cmd = if OS.mac? + "osascript -so -lJavaScript out.js 2>&1" + else + "node out.js" + end + assert_equal "Hello world!", shell_output(cmd).strip + end +end diff --git a/Formula/h/hayai.rb b/Formula/h/hayai.rb new file mode 100644 index 0000000000000..d7f61bd3cab04 --- /dev/null +++ b/Formula/h/hayai.rb @@ -0,0 +1,56 @@ +class Hayai < Formula + desc "C++ benchmarking framework inspired by the googletest framework" + homepage "https://bruun.co/2012/02/07/easy-cpp-benchmarking" + url "https://github.com/nickbruun/hayai/archive/refs/tags/v1.0.2.tar.gz" + sha256 "e30e69b107361c132c831a2c8b2040ea51225bb9ed50675b51099435b8cd6594" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "550f637f1d8b57e9b2127a31da69c37b88928c44d67805b6126eb1b5c4119acc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "761e7c56fb8d74f8803deda44ba43cf8e483937a173f74fce264fb12a345a285" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dd6a2a14ff0cd666059ddf5aecbbca1679a1fd40248c981566223c308f3dd659" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9dccf9e4fa4cd6918a8bf6e37008b59044af49aedf965a878d35fe5200d42062" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "41ba5eb3f260d738729a866e1951d9caf2830eacb918944da50ab0761a4b4f56" + sha256 cellar: :any_skip_relocation, sonoma: "c8b827d5fa2ebb2ebf1ca3358e4014d57cfc694c3eb6da0b6ae56f1395c9b85c" + sha256 cellar: :any_skip_relocation, ventura: "9db2e26c1c283f4ce4875ba2c5b4639cbdfa800276f059abe407bff4098300df" + sha256 cellar: :any_skip_relocation, monterey: "fe3175b383887bb7a3c8d98378c76c09fd1b1bfe9ad64e7f119df3d6054faebc" + sha256 cellar: :any_skip_relocation, big_sur: "2ced5bfcd90e829400f4d8f92c5069d1af7b7bb913a0a3dd089f6ef41d89c86d" + sha256 cellar: :any_skip_relocation, catalina: "0a63325782e38d9ea125ec2948604856a2d0a95a89607bbe3eb8730ca5034009" + sha256 cellar: :any_skip_relocation, mojave: "083c25ed21eb21a54f72ea2957b47e6444278aaa996143c2788e434fb19eaf0c" + sha256 cellar: :any_skip_relocation, high_sierra: "c28fb50fbaed6281dafa6b8ec7b2cafc45fe3255bcc57a6678dbac5da67e4dca" + sha256 cellar: :any_skip_relocation, sierra: "d2702e169ba0c8a8b79f3df6f83fc2268b95b0b0d2c2c4d11387ea99011800f4" + sha256 cellar: :any_skip_relocation, el_capitan: "0a9089377b36a1f719966add1fcd01780e27e250db062affb818236e9b8161c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "595752ef429dfe91c34c27f8850eb71b88a57abf1411f7c80f9802a893b0cebd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "568a29e0dee5f8da2adcce268ca50150ab1f4f06e3badecf5aa2adf6fd1cb940" + end + + deprecate! date: "2024-04-18", because: :repo_archived + disable! date: "2025-04-22", 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.cpp").write <<~CPP + #include + #include + int main() { + hayai::Benchmarker::RunAllTests(); + return 0; + } + + BENCHMARK(HomebrewTest, TestBenchmark, 1, 1) + { + std::cout << "Hayai works!" << std::endl; + } + CPP + + system ENV.cxx, "test.cpp", "-L#{lib}", "-lhayai_main", "-o", "test" + system "./test" + end +end diff --git a/Formula/h/hbase.rb b/Formula/h/hbase.rb new file mode 100644 index 0000000000000..2e43af2416544 --- /dev/null +++ b/Formula/h/hbase.rb @@ -0,0 +1,189 @@ +class Hbase < Formula + desc "Hadoop database: a distributed, scalable, big data store" + homepage "https://hbase.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=hbase/2.6.2/hbase-2.6.2-bin.tar.gz" + mirror "https://archive.apache.org/dist/hbase/2.6.2/hbase-2.6.2-bin.tar.gz" + sha256 "5ff9a3993031f5a9e1d94fd795fb9ff8ee003b90570e476c63af6d3dd744a583" + # We bundle hadoop-lzo which is GPL-3.0-or-later + license all_of: ["Apache-2.0", "GPL-3.0-or-later"] + + bottle do + sha256 arm64_sequoia: "d76a13a786aad736dc835a851093884a5f546000537f1c0dbc9787e8a53046b9" + sha256 arm64_sonoma: "a38e8f800db8309eef49ce43641250bba09b54df5db0f6e6be3b2db630870993" + sha256 arm64_ventura: "fe7c197d0041aefe2b7c087ebc8309da66974a2395db77d763b0c056513813bf" + sha256 sonoma: "03d6287c185c479d6fa135e85ddf90947df47b496d793720cfc994682e7f6ddc" + sha256 ventura: "f37ea71e025d1d3daa046013a6c55bc4d50118efa4a93513cd92cc278a5e9d2b" + sha256 arm64_linux: "e0f0e0efda771923a5e568d44213faa079d49aec80981f07a2ec53d233e42a1e" + sha256 x86_64_linux: "5ed28e89fd22d263715dc6579d1185ed053546ed2f76ab6de8ec34dde3c88e0c" + end + + depends_on "ant" => :build + depends_on "lzo" + depends_on "openjdk@11" + + on_linux do + on_arm do + # Added automake as a build dependency to update config files for ARM support. + depends_on "automake" => :build + end + end + + resource "hadoop-lzo" do + url "https://github.com/cloudera/hadoop-lzo/archive/refs/tags/0.4.14.tar.gz" + sha256 "aa8ddbb8b3f9e1c4b8cc3523486acdb7841cd97c002a9f2959c5b320c7bb0e6c" + + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/b89da3afad84bbf69deed0611e5dddaaa5d39325/hbase/build.xml.patch" + sha256 "d1d65330a4367db3e17ee4f4045641b335ed42449d9e6e42cc687e2a2e3fa5bc" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + directory "src/native" + end + end + + def install + java_home = Language::Java.java_home("11") + rm(Dir["bin/*.cmd", "conf/*.cmd"]) + libexec.install %w[bin conf lib hbase-webapps] + + # Some binaries have really generic names (like `test`) and most seem to be + # too special-purpose to be permanently available via PATH. + %w[hbase start-hbase.sh stop-hbase.sh].each do |script| + (bin/script).write_env_script libexec/"bin"/script, Language::Java.overridable_java_home_env("11") + end + + resource("hadoop-lzo").stage do + if OS.linux? && Hardware::CPU.arm? + # Workaround for ancient config files not recognizing aarch64 macos. + automake_dir = Formula["automake"].share/"automake-#{Formula["automake"].version.major_minor}" + %w[config.guess config.sub].each { |fn| cp automake_dir/fn, "src/native/config/#{fn}" } + end + + # Help configure to find liblzo on Linux. + unless OS.mac? + inreplace "src/native/configure", + "#define HADOOP_LZO_LIBRARY ${ac_cv_libname_lzo2}", + "#define HADOOP_LZO_LIBRARY \"#{Formula["lzo"].opt_lib/shared_library("liblzo2")}\"" + end + + # Fixed upstream: https://github.com/cloudera/hadoop-lzo/blob/HEAD/build.xml#L235 + ENV["CLASSPATH"] = Dir["#{libexec}/lib/hadoop-common-*.jar"].first + # Workaround for Xcode 14.3. + ENV.append_to_cflags "-m64" if Hardware::CPU.intel? + ENV.append_to_cflags "-Wno-implicit-function-declaration" + ENV["CPPFLAGS"] = "-I#{Formula["openjdk@11"].include}" + + system "ant", "compile-native", "tar" + (libexec/"lib").install Dir["build/hadoop-lzo-*/hadoop-lzo-*.jar"] + (libexec/"lib/native").install Dir["build/hadoop-lzo-*/lib/native/*"] + end + + inreplace libexec/"conf/hbase-env.sh" do |s| + # upstream bugs for ipv6 incompatibility: + # https://issues.apache.org/jira/browse/HADOOP-8568 + # https://issues.apache.org/jira/browse/HADOOP-3619 + s.gsub!(/^# export HBASE_OPTS$/, + "export HBASE_OPTS=\"-Djava.net.preferIPv4Stack=true -XX:+UseConcMarkSweepGC\"") + s.gsub!(/^# export JAVA_HOME=.*/, + "export JAVA_HOME=\"${JAVA_HOME:-#{java_home}}\"") + + # Default `$HBASE_HOME/logs` is unsuitable as it would cause writes to the + # formula's prefix. Provide a better default but still allow override. + s.gsub!(/^# export HBASE_LOG_DIR=.*$/, + "export HBASE_LOG_DIR=\"${HBASE_LOG_DIR:-#{var}/log/hbase}\"") + end + + # Interface name is lo on Linux, not lo0. + loopback = OS.mac? ? "lo0" : "lo" + # makes hbase usable out of the box + # upstream has been provided this patch + # https://issues.apache.org/jira/browse/HBASE-15426 + inreplace "#{libexec}/conf/hbase-site.xml", + //, + <<~XML + + + hbase.rootdir + file://#{var}/hbase + + + hbase.zookeeper.property.clientPort + 2181 + + + hbase.zookeeper.property.dataDir + #{var}/zookeeper + + + hbase.zookeeper.dns.interface + #{loopback} + + + hbase.regionserver.dns.interface + #{loopback} + + + hbase.master.dns.interface + #{loopback} + + XML + end + + def post_install + (var/"log/hbase").mkpath + (var/"run/hbase").mkpath + end + + service do + run [opt_bin/"hbase", "--config", opt_libexec/"conf", "master", "start"] + keep_alive true + working_dir HOMEBREW_PREFIX + log_path var/"hbase/hbase.log" + error_log_path var/"hbase/hbase.err" + environment_variables HBASE_HOME: opt_libexec, + HBASE_IDENT_STRING: "root", + HBASE_LOG_DIR: var/"hbase", + HBASE_LOG_PREFIX: "hbase-root-master", + HBASE_LOGFILE: "hbase-root-master.log", + HBASE_MASTER_OPTS: " -XX:PermSize=128m -XX:MaxPermSize=128m", + HBASE_NICENESS: "0", + HBASE_OPTS: "-XX:+UseConcMarkSweepGC", + HBASE_PID_DIR: var/"run/hbase", + HBASE_REGIONSERVER_OPTS: " -XX:PermSize=128m -XX:MaxPermSize=128m", + HBASE_ROOT_LOGGER: "INFO,RFA", + HBASE_SECURITY_LOGGER: "INFO,RFAS" + end + + test do + port = free_port + assert_match "HBase #{version}", shell_output("#{bin}/hbase version 2>&1") + + cp_r (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") + s.gsub!(/(hbase.zookeeper.property.clientPort.*)\n.*/, "\\1\n#{port}") + end + + ENV["HBASE_LOG_DIR"] = testpath/"logs" + ENV["HBASE_CONF_DIR"] = testpath/"conf" + ENV["HBASE_PID_DIR"] = testpath/"pid" + + system bin/"start-hbase.sh" + begin + sleep 15 + TCPSocket.open("127.0.0.1", port) do |sock| + sock.puts("stats") + assert_match "Zookeeper", sock.gets + ensure + sock.close + end + ensure + system bin/"stop-hbase.sh" + end + end +end diff --git a/Formula/h/hblock.rb b/Formula/h/hblock.rb new file mode 100644 index 0000000000000..33d9c39ff6890 --- /dev/null +++ b/Formula/h/hblock.rb @@ -0,0 +1,22 @@ +class Hblock < Formula + desc "Adblocker that creates a hosts file from multiple sources" + homepage "https://hblock.molinero.dev/" + url "https://github.com/hectorm/hblock/archive/refs/tags/v3.5.1.tar.gz" + sha256 "af98a6753e5de1406b63cd1fabf4b3eae84816168c532dae40c83092acb69941" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "4b1d02f032f4ba28b0f3497231a40a3d4f47064f7a740064e16ed83aa6357f42" + end + + uses_from_macos "curl" + + def install + system "make", "install", "prefix=#{prefix}", "bindir=#{bin}", "mandir=#{man}" + end + + test do + output = shell_output("#{bin}/hblock -H none -F none -S none -A none -D none -qO-") + assert_match "Blocked domains:", output + end +end diff --git a/Formula/h/hck.rb b/Formula/h/hck.rb new file mode 100644 index 0000000000000..78d65b191368d --- /dev/null +++ b/Formula/h/hck.rb @@ -0,0 +1,43 @@ +class Hck < Formula + desc "Sharp cut(1) clone" + homepage "https://github.com/sstadick/hck" + url "https://github.com/sstadick/hck/archive/refs/tags/v0.11.4.tar.gz" + sha256 "f6c87edfeabf33c12b08c4c585d7fece3a618a56dbd87c695ca18629ca599457" + license any_of: ["MIT", "Unlicense"] + head "https://github.com/sstadick/hck.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "80c37f8d57ec62a4a1cad9def4ada5e68d8b9f3cba9f92cb3dd1b9c8d0335503" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a26a272867f32a7165106dfbbbfa78be9eb2897903325641bf32650ad68f0340" + sha256 cellar: :any_skip_relocation, arm64_ventura: "56e22305a058ad39a97212158329f8a55f6a1c9365dc370ff6bdbdc6b75c04be" + sha256 cellar: :any_skip_relocation, sonoma: "945b035add2b676ad6e0eb2654e89088834c82a188960dd49aa861bab5e66c79" + sha256 cellar: :any_skip_relocation, ventura: "ab31471f5828d042a4593047b0cc8fea9206dc456ff9c3c65fd930099269fbc5" + sha256 cellar: :any_skip_relocation, arm64_linux: "cec9d7ffe968172f6e6312fe9a6519f6dcc13b84744cd120b58e8726a6d38964" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d588364e3b545a16083916df392dd0cca81eaa9cd1f84eb09533b7980840b0a" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + uses_from_macos "zlib" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + output = pipe_output("#{bin}/hck -d, -D: -f3 -F 'a'", "a,b,c,d,e\n1,2,3,4,5\n") + expected = <<~EOS + a:c + 1:3 + EOS + assert_equal expected, output + + assert_match version.to_s, shell_output("#{bin}/hck --version") + end +end diff --git a/Formula/h/hcl2json.rb b/Formula/h/hcl2json.rb new file mode 100644 index 0000000000000..fd6b4f40b092a --- /dev/null +++ b/Formula/h/hcl2json.rb @@ -0,0 +1,48 @@ +class Hcl2json < Formula + desc "Convert HCL2 to JSON" + homepage "https://github.com/tmccombs/hcl2json" + url "https://github.com/tmccombs/hcl2json/archive/refs/tags/v0.6.7.tar.gz" + sha256 "868a6986ae983b703c9845f315b27ab19207b816a8f16f6d44041e4d78764f70" + license "Apache-2.0" + head "https://github.com/tmccombs/hcl2json.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "11269bcec892b16d8f8402eff9ee2859278e1299e93e922d8cec1528131d97f0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "11269bcec892b16d8f8402eff9ee2859278e1299e93e922d8cec1528131d97f0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "11269bcec892b16d8f8402eff9ee2859278e1299e93e922d8cec1528131d97f0" + sha256 cellar: :any_skip_relocation, sonoma: "9efd21df9259e6c35c31824542f3a8c29dfa3eb7195b227e33e9bfde6e0dd1d6" + sha256 cellar: :any_skip_relocation, ventura: "9efd21df9259e6c35c31824542f3a8c29dfa3eb7195b227e33e9bfde6e0dd1d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "1871f1b9e169a2b6b1941edd5554ca05aeb3af111a014f8a5692b5921fe8241a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f986c89d832074fdbcd080dafd6ab4a174e43648b9fb45bb855a4b41dd2908d" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + test_hcl = testpath/"test.hcl" + test_hcl.write <<~HCL + resource "my_resource_type" "test_resource" { + input = "magic_test_value" + } + HCL + + test_json = { + resource: { + my_resource_type: { + test_resource: [ + { + input: "magic_test_value", + }, + ], + }, + }, + }.to_json + + assert_equal test_json, shell_output("#{bin}/hcl2json #{test_hcl}").gsub(/\s+/, "") + assert_match "Failed to open brewtest", shell_output("#{bin}/hcl2json brewtest 2>&1", 1) + end +end diff --git a/Formula/h/hcledit.rb b/Formula/h/hcledit.rb new file mode 100644 index 0000000000000..96e9193ef836b --- /dev/null +++ b/Formula/h/hcledit.rb @@ -0,0 +1,41 @@ +class Hcledit < Formula + desc "Command-line editor for HCL" + homepage "https://github.com/minamijoyo/hcledit" + url "https://github.com/minamijoyo/hcledit/archive/refs/tags/v0.2.17.tar.gz" + sha256 "007e8ba0c8be6272793fc4714cb60b93cb4cdfdc48ab5ad5a6566e44f99d200e" + license "MIT" + head "https://github.com/minamijoyo/hcledit.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f337eedfe77241c8a1e9e1be22fcc53322fc34343950d7cb7a52908f5452c4e0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f337eedfe77241c8a1e9e1be22fcc53322fc34343950d7cb7a52908f5452c4e0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f337eedfe77241c8a1e9e1be22fcc53322fc34343950d7cb7a52908f5452c4e0" + sha256 cellar: :any_skip_relocation, sonoma: "0b20a51f695f3783df9862c041c4c969061476b870efee585cbbc0e676c49542" + sha256 cellar: :any_skip_relocation, ventura: "0b20a51f695f3783df9862c041c4c969061476b870efee585cbbc0e676c49542" + sha256 cellar: :any_skip_relocation, x86_64_linux: "502832282bfe2438b7fec2233905a46cf484e94240e86b854e7fdc85bd634603" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/minamijoyo/hcledit/cmd.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/hcledit version") + + (testpath/"test.hcl").write <<~HCL + resource "foo" "bar" { + attr1 = "val1" + nested { + attr2 = "val2" + } + } + HCL + + output = pipe_output("#{bin}/hcledit attribute get resource.foo.bar.attr1", + (testpath/"test.hcl").read, 0) + assert_equal "\"val1\"", output.chomp + end +end diff --git a/Formula/h/hcloud.rb b/Formula/h/hcloud.rb new file mode 100644 index 0000000000000..8a8516bc2ad8d --- /dev/null +++ b/Formula/h/hcloud.rb @@ -0,0 +1,45 @@ +class Hcloud < Formula + desc "Command-line interface for Hetzner Cloud" + homepage "https://github.com/hetznercloud/cli" + url "https://github.com/hetznercloud/cli/archive/refs/tags/v1.50.0.tar.gz" + sha256 "61fb1823a176ec77c102c30b3a7de50c67df7eda6dd8a3bf1f17c882e8c78011" + license "MIT" + head "https://github.com/hetznercloud/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5926c1e2cb28a791212b47aee1fa99ef3a269b7e29325d21cd3844754e2d3053" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5926c1e2cb28a791212b47aee1fa99ef3a269b7e29325d21cd3844754e2d3053" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5926c1e2cb28a791212b47aee1fa99ef3a269b7e29325d21cd3844754e2d3053" + sha256 cellar: :any_skip_relocation, sonoma: "e2916119cdca7afe0d62123300ac9d49649aa19e44cc14aaadfe8f55a1c86582" + sha256 cellar: :any_skip_relocation, ventura: "e2916119cdca7afe0d62123300ac9d49649aa19e44cc14aaadfe8f55a1c86582" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3455977befd86b6dcb02de868e4d1d544134095ba3b2c74772ae1d32747b9954" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/hetznercloud/cli/internal/version.version=v#{version} + -X github.com/hetznercloud/cli/internal/version.versionPrerelease= + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/hcloud" + + generate_completions_from_executable(bin/"hcloud", "completion") + end + + test do + config_path = testpath/".config/hcloud/cli.toml" + ENV["HCLOUD_CONFIG"] = config_path + assert_match "", shell_output("#{bin}/hcloud context active") + config_path.write <<~EOS + active_context = "test" + [[contexts]] + name = "test" + token = "foobar" + EOS + assert_match "test", shell_output("#{bin}/hcloud context list") + assert_match "test", shell_output("#{bin}/hcloud context active") + assert_match "hcloud v#{version}", shell_output("#{bin}/hcloud version") + end +end diff --git a/Formula/h/hcxtools.rb b/Formula/h/hcxtools.rb new file mode 100644 index 0000000000000..6ebbb7407e019 --- /dev/null +++ b/Formula/h/hcxtools.rb @@ -0,0 +1,49 @@ +class Hcxtools < Formula + desc "Utils for conversion of cap/pcap/pcapng WiFi dump files" + homepage "https://github.com/ZerBea/hcxtools" + url "https://github.com/ZerBea/hcxtools/archive/refs/tags/6.3.5.tar.gz" + sha256 "17c9724bc8368a0878706d27a231aa699a8bf78ad804ca97413081bce69eb74c" + license "MIT" + head "https://github.com/ZerBea/hcxtools.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fbee732a7304ed828f71ebe2ee5847637e54e2291bf498a899516090800066af" + sha256 cellar: :any, arm64_sonoma: "a0b4c4fd4c407a664e5ef6b9e4bd8debd5f6239aa5ceac40754bb7dacbbcffe2" + sha256 cellar: :any, arm64_ventura: "a5c6154b7c474f89e552279acb816eb2f16fe580cf2b551476c48bed97d52a27" + sha256 cellar: :any, sonoma: "2814039645270a0de28354efc71e9e640e79113c4893edac270a3596e82cb74a" + sha256 cellar: :any, ventura: "53ca3c7313e167c4f82b00e9fc0f35bae6ebb80b15e3762f59668e4a34c44aaf" + sha256 cellar: :any_skip_relocation, arm64_linux: "4fbec0db0c78b0ce779195131d1e70118b6642dc6a66469f3bea2be7e0fdb35f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cfa435ef982fe30b6e3ea26c1d736882a4799c0ee035bccb5cf20bdca00740dd" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + bin.mkpath + man1.mkpath + system "make", "install", "PREFIX=#{prefix}" + end + + test do + # Create file with 22000 hash line + testhash = testpath/"test.22000" + (testpath/"test.22000").write <<~EOS + WPA*01*4d4fe7aac3a2cecab195321ceb99a7d0*fc690c158264*f4747f87f9f4*686173686361742d6573736964*** + EOS + + # Convert hash to .cap file + testcap = testpath/"test.cap" + system bin/"hcxhash2cap", "--pmkid-eapol=#{testhash}", "-c", testpath/"test.cap" + + # Convert .cap file back to hash file + newhash = testpath/"new.22000" + system bin/"hcxpcapngtool", "-o", newhash, testcap + + expected = "WPA*01*4d4fe7aac3a2cecab195321ceb99a7d0*fc690c158264*f4747f87f9f4*686173686361742d6573736964***01" + assert_equal expected, newhash.read.chomp + end +end diff --git a/Formula/h/hdf5-mpi.rb b/Formula/h/hdf5-mpi.rb new file mode 100644 index 0000000000000..0c9463c31c288 --- /dev/null +++ b/Formula/h/hdf5-mpi.rb @@ -0,0 +1,115 @@ +class Hdf5Mpi < Formula + desc "File format designed to store large amounts of data" + homepage "https://www.hdfgroup.org/solutions/hdf5/" + url "https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.6/hdf5-1.14.6.tar.gz" + sha256 "e4defbac30f50d64e1556374aa49e574417c9e72c6b1de7a4ff88c4b1bea6e9b" + license "BSD-3-Clause" + version_scheme 1 + + livecheck do + formula "hdf5" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "3d151c2f7f4e990d4c87d09cfd1159a00eeced94110946b04d78e8afc643532d" + sha256 cellar: :any, arm64_sonoma: "328ef1d38510de4d0b6acdd2aa8ba2bf96ee37c7006ee56b7cf33107386a4eb3" + sha256 cellar: :any, arm64_ventura: "ab720a1b8793cda7b0726ca973b97823986b14a01829b01532dc9ac27872851c" + sha256 cellar: :any, sonoma: "e33bdad2d726e495962a617bfe049532cbb7fe0b65cc7e023888c8b02028ddb3" + sha256 cellar: :any, ventura: "8a473329abf771f03d917727b158c734fc39e25a2dc11bd484d0b035ddd106c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a08338aebc175d621fe8d25c8ce7545228c8ed465e0f8e4f2b7af29a6abfe33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "effb5567624b9c92939a07d58a03c66710dec767d17b1e85f94a7ac94f1db18d" + end + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + depends_on "libaec" + depends_on "open-mpi" + depends_on "pkgconf" + + uses_from_macos "zlib" + + conflicts_with "hdf5", because: "hdf5-mpi is a variant of hdf5, one can only use one or the other" + + def install + args = %w[ + -DHDF5_USE_GNU_DIRS:BOOL=ON + -DHDF5_INSTALL_CMAKE_DIR=lib/cmake/hdf5 + -DHDF5_ENABLE_PARALLEL:BOOL=ON + -DALLOW_UNSUPPORTED:BOOL=ON + -DHDF5_BUILD_FORTRAN:BOOL=ON + -DHDF5_BUILD_CPP_LIB:BOOL=ON + -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON + ] + + # https://github.com/HDFGroup/hdf5/issues/4310 + args << "-DHDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16:BOOL=OFF" + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + + # Avoid c shims in settings files + inreplace_c_files = %w[ + build/src/H5build_settings.c + build/src/libhdf5.settings + ] + inreplace inreplace_c_files, Superenv.shims_path/ENV.cc, ENV.cc + + # Avoid cpp shims in settings files + inreplace_cxx_files = %w[ + build/CMakeFiles/h5c++ + build/CMakeFiles/h5hlc++ + ] + inreplace_cxx_files << "build/src/libhdf5.settings" if OS.linux? + inreplace inreplace_cxx_files, Superenv.shims_path/ENV.cxx, ENV.cxx + + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include "hdf5.h" + int main() + { + printf("%d.%d.%d\\n", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); + return 0; + } + C + system bin/"h5pcc", "test.c" + assert_equal version.major_minor_patch.to_s, shell_output("./a.out").chomp + + (testpath/"test.f90").write <<~FORTRAN + use hdf5 + integer(hid_t) :: f, dspace, dset + integer(hsize_t), dimension(2) :: dims = [2, 2] + integer :: error = 0, major, minor, rel + + call h5open_f (error) + if (error /= 0) call abort + call h5fcreate_f ("test.h5", H5F_ACC_TRUNC_F, f, error) + if (error /= 0) call abort + call h5screate_simple_f (2, dims, dspace, error) + if (error /= 0) call abort + call h5dcreate_f (f, "data", H5T_NATIVE_INTEGER, dspace, dset, error) + if (error /= 0) call abort + call h5dclose_f (dset, error) + if (error /= 0) call abort + call h5sclose_f (dspace, error) + if (error /= 0) call abort + call h5fclose_f (f, error) + if (error /= 0) call abort + call h5close_f (error) + if (error /= 0) call abort + CALL h5get_libversion_f (major, minor, rel, error) + if (error /= 0) call abort + write (*,"(I0,'.',I0,'.',I0)") major, minor, rel + end + FORTRAN + system bin/"h5pfc", "test.f90" + assert_equal version.major_minor_patch.to_s, shell_output("./a.out").chomp + + # Make sure that it was built with SZIP/libaec + config = shell_output("#{bin}/h5cc -showconfig") + assert_match %r{I/O filters.*DECODE}, config + end +end diff --git a/Formula/h/hdf5.rb b/Formula/h/hdf5.rb new file mode 100644 index 0000000000000..8ba7fb08fa675 --- /dev/null +++ b/Formula/h/hdf5.rb @@ -0,0 +1,118 @@ +class Hdf5 < Formula + desc "File format designed to store large amounts of data" + homepage "https://www.hdfgroup.org/solutions/hdf5/" + url "https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.6/hdf5-1.14.6.tar.gz" + sha256 "e4defbac30f50d64e1556374aa49e574417c9e72c6b1de7a4ff88c4b1bea6e9b" + license "BSD-3-Clause" + version_scheme 1 + + # 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, arm64_sequoia: "2338b44eb0a44fbb3261862de8310f98f749caef3ae9387687b961e7f3b97d0f" + sha256 cellar: :any, arm64_sonoma: "50b38bf19514ed01f14c9c2d94619945fcdc60c5deaf83ea1595916093f7977c" + sha256 cellar: :any, arm64_ventura: "3bbb75b9bb29386801e650f2406ecde85ec9d73460b0b1bd2629d457a7ba1672" + sha256 cellar: :any, sonoma: "13a628da9dbe2b7528532731dabe50715bf0487ce069f040fac75f9eadd8b3b5" + sha256 cellar: :any, ventura: "ee3258e58082872fac217ece616a82a76c945ba9f38362c710b77df833adbceb" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a5ab8ac6290a03e1e69dda1ff8363c8f2dfdfed2e7491e8d04d95987a3f98fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "526dee09cdfb1857f883931aa914cab567df80cf2cc95dfaa899d6fbee9f6619" + end + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + depends_on "libaec" + depends_on "pkgconf" + + uses_from_macos "zlib" + + conflicts_with "hdf5-mpi", because: "hdf5-mpi is a variant of hdf5, one can only use one or the other" + + def install + args = %w[ + -DHDF5_USE_GNU_DIRS:BOOL=ON + -DHDF5_INSTALL_CMAKE_DIR=lib/cmake/hdf5 + -DHDF5_BUILD_FORTRAN:BOOL=ON + -DHDF5_BUILD_CPP_LIB:BOOL=ON + -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON + ] + + # https://github.com/HDFGroup/hdf5/issues/4310 + args << "-DHDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16:BOOL=OFF" + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + + # Avoid c shims in settings files + inreplace_c_files = %w[ + build/src/H5build_settings.c + build/src/libhdf5.settings + build/CMakeFiles/h5cc + build/CMakeFiles/h5hlcc + ] + inreplace inreplace_c_files, Superenv.shims_path/ENV.cc, ENV.cc + + # Avoid cpp shims in settings files + inreplace_cxx_files = %w[ + build/CMakeFiles/h5c++ + build/CMakeFiles/h5hlc++ + ] + inreplace_cxx_files << "build/src/libhdf5.settings" if OS.linux? + inreplace inreplace_cxx_files, Superenv.shims_path/ENV.cxx, ENV.cxx + + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include "hdf5.h" + int main() + { + printf("%d.%d.%d\\n", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); + return 0; + } + C + system bin/"h5cc", "test.c" + assert_equal version.major_minor_patch.to_s, shell_output("./a.out").chomp + + (testpath/"test.f90").write <<~FORTRAN + use hdf5 + integer(hid_t) :: f, dspace, dset + integer(hsize_t), dimension(2) :: dims = [2, 2] + integer :: error = 0, major, minor, rel + + call h5open_f (error) + if (error /= 0) call abort + call h5fcreate_f ("test.h5", H5F_ACC_TRUNC_F, f, error) + if (error /= 0) call abort + call h5screate_simple_f (2, dims, dspace, error) + if (error /= 0) call abort + call h5dcreate_f (f, "data", H5T_NATIVE_INTEGER, dspace, dset, error) + if (error /= 0) call abort + call h5dclose_f (dset, error) + if (error /= 0) call abort + call h5sclose_f (dspace, error) + if (error /= 0) call abort + call h5fclose_f (f, error) + if (error /= 0) call abort + call h5close_f (error) + if (error /= 0) call abort + CALL h5get_libversion_f (major, minor, rel, error) + if (error /= 0) call abort + write (*,"(I0,'.',I0,'.',I0)") major, minor, rel + end + FORTRAN + system bin/"h5fc", "test.f90" + assert_equal version.major_minor_patch.to_s, shell_output("./a.out").chomp + + # Make sure that it was built with SZIP/libaec + config = shell_output("#{bin}/h5cc -showconfig") + assert_match %r{I/O filters.*DECODE}, config + end +end diff --git a/Formula/h/hdf5@1.10.rb b/Formula/h/hdf5@1.10.rb new file mode 100644 index 0000000000000..0a55442066c98 --- /dev/null +++ b/Formula/h/hdf5@1.10.rb @@ -0,0 +1,112 @@ +class Hdf5AT110 < Formula + desc "File format designed to store large amounts of data" + homepage "https://www.hdfgroup.org/HDF5" + url "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.11/src/hdf5-1.10.11.tar.bz2" + sha256 "0afc77da5c46217709475bbefbca91c0cb6f1ea628ccd8c36196cf6c5a4de304" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b582f925e723b300ee8401f89307fdc2cb336b7ea691b61f8396890446645ceb" + sha256 cellar: :any, arm64_sonoma: "b85adcde660662f9ed6f4c9740e1c97a8ec2a1b4be7ff3185142801ce7083a5c" + sha256 cellar: :any, arm64_ventura: "7c8e8deff03df6d11099246b2ab71ed2decdcdbbc395e4803b0a12fb5d0ec672" + sha256 cellar: :any, arm64_monterey: "06e03e5b27f560906f80721de89c681a56f138f239f04a71142efdb14c180e4c" + sha256 cellar: :any, sonoma: "83e1a3357f24fe7de568be6fb299907031ed32e888c4dfc56d57f0c213d7772f" + sha256 cellar: :any, ventura: "f420a1f3da8697f61b51c2006e5e7e5bfad27922dab09fedce4695250b35bcc7" + sha256 cellar: :any, monterey: "c1c4e6a9a6e42f6e267d44d3a7734ca21eede859a9021156511a99faf0ceacfe" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7328ba07bc86946622b3aa178be3c62f48e38c6f75bdb3bd3fdf25b5d2158e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "706516f685fc2d8a3d2c1e6565b36cbc885445f2c0f901a2bd735f3229151590" + end + + keg_only :versioned_formula + + # 1.10.11 is the last release for 1.10.x + # https://github.com/HDFGroup/hdf5#release-schedule + deprecate! date: "2024-07-24", because: :unsupported + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "gcc" # for gfortran + depends_on "libaec" + + uses_from_macos "zlib" + + def install + # Work around incompatibility with new linker (FB13194355) + # https://github.com/HDFGroup/hdf5/issues/3571 + ENV.append "LDFLAGS", "-Wl,-ld_classic" if DevelopmentTools.clang_build_version >= 1500 + + inreplace %w[c++/src/h5c++.in fortran/src/h5fc.in bin/h5cc.in], + "${libdir}/libhdf5.settings", + "#{pkgshare}/libhdf5.settings" + + inreplace "src/Makefile.am", + "settingsdir=$(libdir)", + "settingsdir=#{pkgshare}" + + system "autoreconf", "--force", "--install", "--verbose" + + args = %W[ + --disable-dependency-tracking + --disable-silent-rules + --enable-build-mode=production + --enable-fortran + --enable-cxx + --prefix=#{prefix} + --with-szlib=#{Formula["libaec"].opt_prefix} + ] + args << "--with-zlib=#{Formula["zlib"].opt_prefix}" if OS.linux? + + system "./configure", *args + + # Avoid shims in settings file + inreplace "src/libhdf5.settings", Superenv.shims_path/ENV.cxx, ENV.cxx + inreplace "src/libhdf5.settings", Superenv.shims_path/ENV.cc, ENV.cc + + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include "hdf5.h" + int main() + { + printf("%d.%d.%d\\n", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); + return 0; + } + C + system bin/"h5cc", "test.c" + assert_equal version.to_s, shell_output("./a.out").chomp + + (testpath/"test.f90").write <<~FORTRAN + use hdf5 + integer(hid_t) :: f, dspace, dset + integer(hsize_t), dimension(2) :: dims = [2, 2] + integer :: error = 0, major, minor, rel + + call h5open_f (error) + if (error /= 0) call abort + call h5fcreate_f ("test.h5", H5F_ACC_TRUNC_F, f, error) + if (error /= 0) call abort + call h5screate_simple_f (2, dims, dspace, error) + if (error /= 0) call abort + call h5dcreate_f (f, "data", H5T_NATIVE_INTEGER, dspace, dset, error) + if (error /= 0) call abort + call h5dclose_f (dset, error) + if (error /= 0) call abort + call h5sclose_f (dspace, error) + if (error /= 0) call abort + call h5fclose_f (f, error) + if (error /= 0) call abort + call h5close_f (error) + if (error /= 0) call abort + CALL h5get_libversion_f (major, minor, rel, error) + if (error /= 0) call abort + write (*,"(I0,'.',I0,'.',I0)") major, minor, rel + end + FORTRAN + system bin/"h5fc", "test.f90" + assert_equal version.to_s, shell_output("./a.out").chomp + end +end diff --git a/Formula/h/hdt.rb b/Formula/h/hdt.rb new file mode 100644 index 0000000000000..884e5d0aa8b80 --- /dev/null +++ b/Formula/h/hdt.rb @@ -0,0 +1,62 @@ +class Hdt < Formula + desc "Header Dictionary Triples (HDT) is a compression format for RDF data" + homepage "https://github.com/rdfhdt/hdt-cpp" + url "https://github.com/rdfhdt/hdt-cpp/archive/refs/tags/v1.3.3.tar.gz" + sha256 "3abc8af7a0b19760654acf149f0ec85d4e9589a32c4331d3bfbe2fcd825173e6" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "85d785dfa207bd588ef5e630b9a5adde0d98bac472119547d6128e0544de7bb4" + sha256 cellar: :any, arm64_sonoma: "606b24419877439b12ba1833394854122acf1342bf10fa6801b32d213e12f1aa" + sha256 cellar: :any, arm64_ventura: "a68a7b396c8b98c042548bd50ea2fc8736e1588be1c1f0d092bcc9d150df1f32" + sha256 cellar: :any, arm64_monterey: "13a72094b82ac91fe1bbaed2cfb12ffda92903715e105c1136e42c7a1a3d48d0" + sha256 cellar: :any, arm64_big_sur: "934a8c000b23ee6a63cda409118c47737d4549a5f0fd260a1652ecfc6b49f1d2" + sha256 cellar: :any, sonoma: "f6ff8a133b9be463e6b3212a5b9c2c2c3a022e369c02caf06eb1b8f0cf8d34c2" + sha256 cellar: :any, ventura: "a086f2948a08f8143d2d379dad6165689f27904b03937287d2fa3c1d4daf5bca" + sha256 cellar: :any, monterey: "693a2273358dcdc130f4bdc102d23e0c7d33d709a417811e737320faf96caaa4" + sha256 cellar: :any, big_sur: "614cded2abf67c909f7fd1a980b3093e8368bf0fc802adcd774716e9e301f4f9" + sha256 cellar: :any, catalina: "66978658e51117e228dea28a0d4264cfe3ce9ed7e4536eb0726d8c1438d4fb59" + sha256 cellar: :any, mojave: "333a1baf863f372e94a40474a799fdd7e043bd691817ab5f7467983ce31a21cb" + sha256 cellar: :any, high_sierra: "709ea815a3a24e104b0bd873948d8cbaca317ed235098f1c042ab308f7c3cb6f" + sha256 cellar: :any_skip_relocation, arm64_linux: "3fa37020c7bf676a78fd5678b77cf64e48d1a04d71b142f3e6f07360a9582522" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e252bf5067fa866d9fb2d81f5af2fc302347982ed6b8c5c7f1474da27eafff8" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "serd" + + uses_from_macos "zlib" + + def install + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"rdf2hdt", "-h" + + test_file = testpath/"test.nt" + test_file.write <<~EOS + "literal1" . + "literalA" . + "literalA" . + "literalB" . + "literalC" . + . + . + . + "literal1" . + . + . + . + EOS + + system bin/"rdf2hdt", test_file, "test.hdt" + assert_path_exists testpath/"test.hdt" + system bin/"hdtInfo", "test.hdt" + end +end diff --git a/Formula/h/healpix.rb b/Formula/h/healpix.rb new file mode 100644 index 0000000000000..55bf048266e15 --- /dev/null +++ b/Formula/h/healpix.rb @@ -0,0 +1,65 @@ +class Healpix < Formula + desc "Hierarchical Equal Area isoLatitude Pixelization of a sphere" + homepage "https://healpix.jpl.nasa.gov/" + url "https://downloads.sourceforge.net/project/healpix/Healpix_3.83/Healpix_3.83_2024Nov13.tar.gz" + version "3.83" + sha256 "8876c18efc596fd706b2a004ac15f2fb60b795f2db6fbabea9d8ccf549531dda" + license "GPL-2.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "00a065c336cdb31ca6f06b99b478f0b287b63a4f1ded2042c3c73520e1fa683b" + sha256 cellar: :any, arm64_sonoma: "e1fee5370b52292ae8ac97fff082aa5556b77668a786ee8da2145131ea74095f" + sha256 cellar: :any, arm64_ventura: "e1f000bb22bda5eaa5646998cc34accd8776a7f5dbc86bce1b84060268210c1e" + sha256 cellar: :any, sonoma: "43e79fede218b1b9a0c38a6b385d5eca84e3b641d5baffc0a0b08312712f5531" + sha256 cellar: :any, ventura: "982e2549856517eab2db91f0d842b9ee7a869f29e9b2651ac76444810325ef77" + sha256 cellar: :any_skip_relocation, arm64_linux: "709088c5a4b411ce2c24096ffe11fe947933eaa30dc253ccf44d4c95802a1a5c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22ff195a45c8dad505f4db28341c4caa459228bd689cb68700ad0664210af5e7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "cfitsio" + + def install + cd "src/C/autotools" do + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + cd "src/common_libraries/libsharp" do + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + cd "src/cxx" do + ENV["SHARP_CFLAGS"] = "-I#{include}" + ENV["SHARP_LIBS"] = "-L#{lib} -lsharp" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + end + + test do + (testpath/"test.cxx").write <<~CPP + #include + #include + #include "chealpix.h" + int main(void) { + long nside, npix, pp, ns1; + nside = 1024; + for (pp = 0; pp < 14; pp++) { + nside = pow(2, pp); + npix = nside2npix(nside); + ns1 = npix2nside(npix); + } + }; + CPP + + system ENV.cxx, "-o", "test", "test.cxx", "-L#{lib}", "-lchealpix" + system "./test" + end +end diff --git a/Formula/h/heartbeat.rb b/Formula/h/heartbeat.rb new file mode 100644 index 0000000000000..bd905feb7bd1b --- /dev/null +++ b/Formula/h/heartbeat.rb @@ -0,0 +1,107 @@ +class Heartbeat < Formula + desc "Lightweight Shipper for Uptime Monitoring" + homepage "https://www.elastic.co/beats/heartbeat" + url "https://github.com/elastic/beats.git", + tag: "v9.0.1", + revision: "bce373f7dcd56a5575ad2c0ec40159722607e801" + license "Apache-2.0" + head "https://github.com/elastic/beats.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "11a71a842f6c6c232fce58666e7f60a65a3c1a94c554d88c58e69f4a71712b6d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "82a41c69c964ced6f85dd9179f39791df9dc508f96a039890b744cbbeaca1d9f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cc0fc78f06e58e46c1306c258494b78f2bb27448f3e541165cccc6d5a4940880" + sha256 cellar: :any_skip_relocation, sonoma: "90a5383ae88b797afc1afbacbd7855d375315afce5ea58da2c76b7b47b3b697a" + sha256 cellar: :any_skip_relocation, ventura: "dd3779455d1c2a849e94c0bae6ab58d55d028cd7ffec80700c9579ee387f7d42" + sha256 cellar: :any_skip_relocation, arm64_linux: "09d6943af7afa16a989ffce37a59279730124802055cfd8ab7c4e05fb73f9b66" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7cd3c7bf64e558701b30353437d7d0ea7e611c90e286ed85e0e36a56681075e0" + end + + depends_on "go" => :build + depends_on "mage" => :build + + def install + # 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 "heartbeat" do + # don't build docs because we aren't installing them and allows avoiding venv + inreplace "magefile.go", "(Fields, FieldDocs,", "(Fields," + + system "mage", "-v", "build" + system "mage", "-v", "update" + + pkgetc.install Dir["heartbeat.*"], "fields.yml" + (libexec/"bin").install "heartbeat" + end + + (bin/"heartbeat").write <<~EOS + #!/bin/sh + exec #{libexec}/bin/heartbeat \ + --path.config #{etc}/heartbeat \ + --path.data #{var}/lib/heartbeat \ + --path.home #{prefix} \ + --path.logs #{var}/log/heartbeat \ + "$@" + EOS + + chmod 0555, bin/"heartbeat" # generate_completions_from_executable fails otherwise + generate_completions_from_executable(bin/"heartbeat", "completion", shells: [:bash, :zsh]) + end + + def post_install + (var/"lib/heartbeat").mkpath + (var/"log/heartbeat").mkpath + end + + service do + run opt_bin/"heartbeat" + end + + test do + # FIXME: This keeps stalling CI when tested as a dependent. See, for example, + # https://github.com/Homebrew/homebrew-core/pull/91712 + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + begin + port = free_port + + (testpath/"config/heartbeat.yml").write <<~YAML + heartbeat.monitors: + - type: tcp + schedule: '@every 5s' + hosts: ["localhost:#{port}"] + check.send: "hello\\n" + check.receive: "goodbye\\n" + output.file: + path: "#{testpath}/heartbeat" + filename: heartbeat + codec.format: + string: '%{[monitor]}' + YAML + + pid = spawn bin/"heartbeat", "--path.config", testpath/"config", "--path.data", testpath/"data" + TCPServer.open(port) do |server| + session = server.accept + assert_equal "hello", session.gets.chomp + session.puts "goodbye" + session.close + end + + output = JSON.parse((testpath/"data/meta.json").read) + assert_includes output, "first_start" + + (testpath/"data").glob("heartbeat-*.ndjson") do |file| + s = JSON.parse(file.read) + assert_match "up", s["status"] + end + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/h/heatshrink.rb b/Formula/h/heatshrink.rb new file mode 100644 index 0000000000000..86651b92c8512 --- /dev/null +++ b/Formula/h/heatshrink.rb @@ -0,0 +1,40 @@ +class Heatshrink < Formula + desc "Data compression library for embedded/real-time systems" + homepage "https://github.com/atomicobject/heatshrink" + url "https://github.com/atomicobject/heatshrink/archive/refs/tags/v0.4.1.tar.gz" + sha256 "7529a1c8ac501191ad470b166773364e66d9926aad632690c72c63a1dea7e9a6" + license "ISC" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4135d8d01abb01a3864191897728bddbc0791fa9356aa2537eeab61bdef9e1ff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ceb0d2e8dff933f32c0aae21c396d5f2ea1bbffa163fced76f09e1b8b4680df8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f897e27aea76f1c2723f8cca5418f8d1cad173b0457348200b609e452f8584da" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1c86c8958da5c539b53eb0a34f12502aea411b86fd0bcece742397fc515178db" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a6a1ec3b2cd5dc0ebc16fe7ed2beabdb2aba1c7fd9782d3d7fe5f667f4298b44" + sha256 cellar: :any_skip_relocation, sonoma: "8b8841b365d74adf6e4300d9d7bf092fd6c3bb3badace8636688fc6dc7debe24" + sha256 cellar: :any_skip_relocation, ventura: "0bde7796c0ff7e0b7d9963db722a39a69baa5b9d89b975b8e49bbab5a6b246a7" + sha256 cellar: :any_skip_relocation, monterey: "e211c2b12e4cfb4ccc65155ec91a03d4b5eaf04538814a7404787f308463fbcd" + sha256 cellar: :any_skip_relocation, big_sur: "9131daef95de9b3c7fecb082ade54be4b67f8c4ca3f3bce6d18f19b1492078d9" + sha256 cellar: :any_skip_relocation, catalina: "5956959544286fc9b6474a0f6df508530431c1632527fa4048091f33f319fab2" + sha256 cellar: :any_skip_relocation, mojave: "504b4b64164343217c6852509b59858494ba38ad9b63e7a9b3bb247290833582" + sha256 cellar: :any_skip_relocation, high_sierra: "865d11380a3e586a962a5dec0069def43e777f20626bdc5396735d003d90d20b" + sha256 cellar: :any_skip_relocation, sierra: "3965350f672040dfec9d2e07ac5f26aa16b324f59d2a762a4faac0930d2de684" + sha256 cellar: :any_skip_relocation, arm64_linux: "b403c35dc1c684ff7fd3c7bad6e7b3724c458ba77537c7208660a0c0cd2986fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff464d4696b56788cdbde22f9ec08015f65626ee0b8a4707fad973fd0f493495" + end + + def install + mkdir_p prefix/"bin" + mkdir_p prefix/"include" + mkdir_p prefix/"lib" + system "make", "test_heatshrink_dynamic" + system "make", "test_heatshrink_static" + system "make", "install", "PREFIX=#{prefix}" + (pkgshare/"tests").install "test_heatshrink_dynamic", "test_heatshrink_static" + end + + test do + system pkgshare/"tests/test_heatshrink_dynamic" + system pkgshare/"tests/test_heatshrink_static" + end +end diff --git a/Formula/h/hebcal.rb b/Formula/h/hebcal.rb new file mode 100644 index 0000000000000..b3c26a89d0bd2 --- /dev/null +++ b/Formula/h/hebcal.rb @@ -0,0 +1,33 @@ +class Hebcal < Formula + desc "Perpetual Jewish calendar for the command-line" + homepage "https://github.com/hebcal/hebcal" + url "https://github.com/hebcal/hebcal/archive/refs/tags/v5.9.0.tar.gz" + sha256 "236617ad37c7621e61eb4aa10e407cf95950563bf5e0c663e4720e5a9fb5e3dd" + license "GPL-2.0-or-later" + head "https://github.com/hebcal/hebcal.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "29b4c545ce82fdd87512f859b1377b3cae30a6cd092ba1a5be4c6cec6fb7a868" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "29b4c545ce82fdd87512f859b1377b3cae30a6cd092ba1a5be4c6cec6fb7a868" + sha256 cellar: :any_skip_relocation, arm64_ventura: "29b4c545ce82fdd87512f859b1377b3cae30a6cd092ba1a5be4c6cec6fb7a868" + sha256 cellar: :any_skip_relocation, sonoma: "641185644af7b9ccf87fe96cb9be7261a67a51b07e45712c27be7f881a43f917" + sha256 cellar: :any_skip_relocation, ventura: "641185644af7b9ccf87fe96cb9be7261a67a51b07e45712c27be7f881a43f917" + sha256 cellar: :any_skip_relocation, arm64_linux: "c5d7f436d8dc946674c8c4dc35eae6148b094976c481762d50112b65cae9d46d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "72ce8d3960251c1e1813b16b5f559d08bed22e5749a205c850d0d281033eee72" + end + + depends_on "go" => :build + + def install + # populate DEFAULT_CITY variable + system "make", "dcity.go", "man" + system "go", "build", *std_go_args(ldflags: "-s -w") + man1.install "hebcal.1" + end + + test do + output = shell_output("#{bin}/hebcal 01 01 2020").chomp + assert_equal output, "1/1/2020 4th of Tevet, 5780" + end +end diff --git a/Formula/h/heimdal.rb b/Formula/h/heimdal.rb new file mode 100644 index 0000000000000..189ffe9689f1f --- /dev/null +++ b/Formula/h/heimdal.rb @@ -0,0 +1,85 @@ +class Heimdal < Formula + desc "Free Kerberos 5 implementation" + homepage "https://www.h5l.org/" + url "https://github.com/heimdal/heimdal/releases/download/heimdal-7.8.0/heimdal-7.8.0.tar.gz" + sha256 "fd87a207846fa650fd377219adc4b8a8193e55904d8a752c2c3715b4155d8d38" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + regex(/heimdal[._-]v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "fb6f2aaa1bd42cc3a1f66b2734eb142b5d7720d7ee3f4fc4988cdbcacb94b572" + sha256 arm64_sonoma: "33521852182643bef11ec36f2b8a135fb1726156216b8aa7ade41f7d0f54896a" + sha256 arm64_ventura: "2dfde5f498579296c4b696ee625832f25a8c199be4101a84513f2ea32bd20b96" + sha256 arm64_monterey: "789b56750fdced7cb966215496bbc9645c3379b36b7fd033ddac213480a54b42" + sha256 sonoma: "fa1f05f6585b701568b83b2b8fd17dcae9202cad5d1bafde3ead076c9a9b0544" + sha256 ventura: "aef11fca0e5edd30a40482958ad3ef0ed6cba88cb450403d6c7ec7a20b88593f" + sha256 monterey: "225d96d3d691885770a75f327457b0a6480cdbebba506e96deb669bbbbf26bf6" + sha256 arm64_linux: "8339834c3ba9f2d87764050b7ad5b5f0acc75a994f4a2cf3fe2762324f6970fb" + sha256 x86_64_linux: "50b84d04c9adf4ea658519cdc158a68aa264300bdaf290675010529d6d72e6ac" + end + + keg_only "conflicts with Kerberos" + + depends_on "bison" => :build + depends_on "berkeley-db@5" # keep berkeley-db < 6 to avoid AGPL incompatibility + depends_on "flex" + depends_on "lmdb" + depends_on "openldap" + depends_on "openssl@3" + + uses_from_macos "perl" => :build + uses_from_macos "python" => :build + uses_from_macos "libxcrypt" + + on_linux do + depends_on "pkgconf" => :build + end + + resource "JSON" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.10.tar.gz" + sha256 "df8b5143d9a7de99c47b55f1a170bd1f69f711935c186a6dc0ab56dd05758e35" + end + + def install + ENV.prepend_create_path "PERL5LIB", buildpath/"perl5/lib/perl5" + + resource("JSON").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{buildpath}/perl5" + system "make" + system "make", "install" + end + + ENV.append "LDFLAGS", "-L#{Formula["berkeley-db@5"].opt_lib}" + ENV.append "LDFLAGS", "-L#{Formula["lmdb"].opt_lib}" + ENV.append "CFLAGS", "-I#{Formula["lmdb"].opt_include}" + + args = %W[ + --without-x + --enable-static=no + --enable-pthread-support + --disable-afs-support + --disable-ndbm-db + --disable-heimdal-documentation + --disable-silent-rules + --with-openldap=#{Formula["openldap"].opt_prefix} + --with-openssl=#{Formula["openssl@3"].opt_prefix} + --with-hcrypto-default-backend=ossl + --with-berkeley-db + --with-berkeley-db-include=#{Formula["berkeley-db@5"].opt_include} + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + assert_match "-L#{lib}", shell_output("#{bin}/krb5-config --libs") + end +end diff --git a/Formula/h/heksa.rb b/Formula/h/heksa.rb new file mode 100644 index 0000000000000..0d5da2d7b81da --- /dev/null +++ b/Formula/h/heksa.rb @@ -0,0 +1,43 @@ +class Heksa < Formula + desc "CLI hex dumper with colors" + homepage "https://github.com/raspi/heksa" + url "https://github.com/raspi/heksa.git", + tag: "v1.14.0", + revision: "045ea335825556c856b2f4dee606ae91c61afe7d" + license "Apache-2.0" + head "https://github.com/raspi/heksa.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba04dda9e2366f4af82dc315932e46e298779ffd0a4a1e5bbf37f531b2c9b102" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b2e5970a9ac9da77a4e75733b5afe87fdba4704007b938e35855714c204ab9d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "89b15d07d2e29580a0ee9b2f71fc60f36b71e2e7bfb8c460e24fcc5f005bd9e8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f4cab211255c75ce7044df346f1b85d3a548c2a760be570a10fcc970a3aec5fb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "de0c36cdc7215c90ea71792580f298717eeffc2b8d6e7a556cd55e4a9c6fd43e" + sha256 cellar: :any_skip_relocation, sonoma: "c646a1b7289f4b96e1172ff6bec29fac49fe66a414f93886182f1d67399d37a8" + sha256 cellar: :any_skip_relocation, ventura: "3bff648f15075466f5e8ddfa77e7092428b6d294091c8f95dabf53e6688a97f6" + sha256 cellar: :any_skip_relocation, monterey: "2c40667b5945ee8ce31d17eef4edb72b05d2238bf6a19210885d29471218eb1a" + sha256 cellar: :any_skip_relocation, big_sur: "f58fd184f70cb5601d2da5737aff2add348d98eeb7724460dbdbebef04bd9ea6" + sha256 cellar: :any_skip_relocation, catalina: "98f162aca970fdb91350424f8f4fcf94348b07d598a32355c6e2dfda57b31150" + sha256 cellar: :any_skip_relocation, mojave: "deb7aa04db9d74d1300c7b5bfc85243cc853eb7bf81ca0657b3c7bfa6bf499a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "81ddc9393c38b0f1fdd8543e44b74bf011c31e1bd71b68ca414b436aeaebbc0b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0c2fa3a47b5d6a492a5bd6b3c881b19714c459adaf3103d1313e9cf9213386a" + end + + depends_on "go" => :build + + def install + system "make", "build" + bin.install "bin/heksa" + end + + test do + require "pty" + + PTY.spawn("#{bin}/heksa -l 16 -f asc -o no #{test_fixtures("test.png")}") do |r, _w, pid| + output = r.readline.gsub(/\e\[([;\d]+)?m/, "") + assert_match(/^.PNG/, output) + ensure + Process.wait pid + end + end +end diff --git a/Formula/h/helib.rb b/Formula/h/helib.rb new file mode 100644 index 0000000000000..b829ce52080ea --- /dev/null +++ b/Formula/h/helib.rb @@ -0,0 +1,43 @@ +class Helib < Formula + desc "Implementation of homomorphic encryption" + homepage "https://github.com/homenc/HElib" + url "https://github.com/homenc/HElib/archive/refs/tags/v2.3.0.tar.gz" + sha256 "05c87f2b50d4774e16868ba61a7271930dd67f4ad137f30eb0f310969377bc20" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7a0fdca928c8a547f654e16f831250201e5446eb0f5b2dc80a8dc6cb775a0975" + sha256 cellar: :any, arm64_sonoma: "3c872b546835221839113e47e3d5afe25e094e1e9f2ff45379a8e1f82a6c1d6e" + sha256 cellar: :any, arm64_ventura: "fcbf73389a3e7c97b6094b2fbac15446ceba4d79326c174cce1a136a4321edf9" + sha256 cellar: :any, arm64_monterey: "fc4e3cdfee251e095c0dd3527d2b4ae11909c3b71a79f8d48166ee267492be0b" + sha256 cellar: :any, arm64_big_sur: "7821f76c654d9a08cb613f7127b9932241726c49c6f5a3225b232deb0a5fad78" + sha256 cellar: :any, sonoma: "e7f9f520edef3a1d3ae396600ef2176524e102bffd3eceaf9432fecdec820e91" + sha256 cellar: :any, ventura: "b3daa3e53fdce0c3961eddfac1476cba433db1eebe96047a89be9164adb788cf" + sha256 cellar: :any, monterey: "2678f6fedfb79ed9b30a086ce2d05a6f551ab9ddced48582d50fad2340d92c6d" + sha256 cellar: :any, big_sur: "dec80000dc1431cef027b67fab14c516248994758c9a2b8a45ea411dcea27584" + sha256 cellar: :any_skip_relocation, arm64_linux: "b5f16e098ebf51299e8553b528190c7f8f2ffd3ca3add170bdd277b54800b704" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e209862dd2093cd1d27e94f10a7403b4fa2d3b258c197d4aeaf3d3af7ecbd3a" + end + + depends_on "cmake" => :build + depends_on "bats-core" => :test + depends_on "gmp" + depends_on "ntl" + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples" + end + + test do + cp pkgshare/"examples/BGV_country_db_lookup/BGV_country_db_lookup.cpp", testpath/"test.cpp" + mkdir "build" + system ENV.cxx, "test.cpp", "-std=c++17", "-L#{lib}", "-L#{Formula["ntl"].opt_lib}", + "-pthread", "-lhelib", "-lntl", "-o", "build/BGV_country_db_lookup" + + cp_r pkgshare/"examples/tests", testpath + system "bats", "." + end +end diff --git a/Formula/h/helidon.rb b/Formula/h/helidon.rb new file mode 100644 index 0000000000000..f165ec0181800 --- /dev/null +++ b/Formula/h/helidon.rb @@ -0,0 +1,46 @@ +class Helidon < Formula + desc "Command-line tool for Helidon application development" + homepage "https://helidon.io/" + url "https://github.com/helidon-io/helidon-build-tools/archive/refs/tags/3.0.6.tar.gz" + sha256 "749cf3fd162bb9449ab57584c0bdf8874114d678499071ea522c047637de0f90" + license "Apache-2.0" + 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_skip_relocation, arm64_sequoia: "7c9501af89a38771d60a2615d6b5f14e689a193f4b6661493e2710c6ee916ba7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4248959a9bfb64c7228ddd2e2e34863e59f513617cbe45f7de7c2c50cdd9ef2f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3517a8e1438fea1afb60a5d51da906a0e9c92d3cebce10f88298818974e3caf3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4e0aa3e9cddf0f4892cadd4d96b6d48a887ac2a9f43a8e8693fc38c5a843bb8f" + sha256 cellar: :any_skip_relocation, sonoma: "27cce977bf0cb83027055f100992353b129041bfe38e50c796a7f485bb579311" + sha256 cellar: :any_skip_relocation, ventura: "67f45ccc046d27bcbc02ce5c817156aa3762e8bebf19becefc49e2afd56e2311" + sha256 cellar: :any_skip_relocation, monterey: "3f2434d267c5098e823d76ea786c6568f76f2519952166d203a2e283268d1fb1" + sha256 cellar: :any_skip_relocation, arm64_linux: "41d184bf37f0efdace3ffe845a427439daf9a1993422d88d4a5bfcbf31edce67" + sha256 cellar: :any_skip_relocation, x86_64_linux: "155ba1f8e4903a933f1e28b19bce7efa6cbf2a0514e1391627410aad8ffe8d18" + end + + depends_on "maven" + depends_on "openjdk" + + def install + system "mvn", "package", "-f", "cli/impl/pom.xml", "-DskipTests" + system "unzip", "cli/impl/target/helidon-cli" + libexec.install "helidon-#{version}/bin", "helidon-#{version}/helidon-cli.jar", "helidon-#{version}/libs" + (bin/"helidon").write_env_script libexec/"bin/helidon", Language::Java.overridable_java_home_env + end + + test do + # Avoid error: java.lang.IllegalArgumentException: `HOMEBREW_CACHE/"java_cache"` does not exist + mkdir_p HOMEBREW_CACHE/"java_cache" + + system bin/"helidon", "init", "--batch" + assert_predicate testpath/"quickstart-se", :directory? + end +end diff --git a/Formula/h/helix.rb b/Formula/h/helix.rb new file mode 100644 index 0000000000000..b3f384dd133a9 --- /dev/null +++ b/Formula/h/helix.rb @@ -0,0 +1,39 @@ +class Helix < Formula + desc "Post-modern modal text editor" + homepage "https://helix-editor.com/" + url "https://github.com/helix-editor/helix/releases/download/25.01.1/helix-25.01.1-source.tar.xz" + sha256 "12508c4f5b9ae6342299bd40d281cd9582d3b51487bffe798f3889cb8f931609" + license "MPL-2.0" + head "https://github.com/helix-editor/helix.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "cca895da8d7984d1dc974a69c1cac38111fab2b7c32d5f0bc66e919dbd2bd4a6" + sha256 cellar: :any, arm64_sonoma: "b2e86d4e5e3a822615d9173afa64d0de2be5d97fe2fddc7dc7d18a974344bd75" + sha256 cellar: :any, arm64_ventura: "f5f20d49f3a8c130001741624e440fd9f80335a5d64ef331ae2ef80da48f8fd8" + sha256 cellar: :any, sonoma: "3bb3161910930c9f2316b6478a166432b22abd664a72fc5f493e74d705f4ac5e" + sha256 cellar: :any, ventura: "42358aa662d5ebf73dd8150e83822b6c347b2f73a7f612bf36100240c3364761" + sha256 cellar: :any_skip_relocation, arm64_linux: "100f81c5b8b2abe845d92ee08456b2c2e82bebeebb2a59326a6c18f3902eb298" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d890c7a8eec62f5c3864bb272bfdedb09bea2c1b9523f34545db607b353ee88" + end + + depends_on "rust" => :build + + conflicts_with "evil-helix", because: "both install `hx` binaries" + conflicts_with "hex", because: "both install `hx` binaries" + + def install + ENV["HELIX_DEFAULT_RUNTIME"] = libexec/"runtime" + system "cargo", "install", "-vv", *std_cargo_args(path: "helix-term") + rm_r "runtime/grammars/sources/" + libexec.install "runtime" + + bash_completion.install "contrib/completion/hx.bash" => "hx" + fish_completion.install "contrib/completion/hx.fish" + zsh_completion.install "contrib/completion/hx.zsh" => "_hx" + end + + test do + assert_match "post-modern text editor", shell_output("#{bin}/hx --help") + assert_match "✓", shell_output("#{bin}/hx --health") + end +end diff --git a/Formula/h/hello.rb b/Formula/h/hello.rb new file mode 100644 index 0000000000000..761c18653066a --- /dev/null +++ b/Formula/h/hello.rb @@ -0,0 +1,35 @@ +class Hello < Formula + desc "Program providing model for GNU coding standards and practices" + homepage "https://www.gnu.org/software/hello/" + url "https://ftp.gnu.org/gnu/hello/hello-2.12.1.tar.gz" + sha256 "8d99142afd92576f30b0cd7cb42a8dc6809998bc5d607d88761f512e26c7db20" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d933581c28ace3bc418f910aeb86aacc4465f727127b50e00b95dba985606009" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c1770a992b197e450da7cf2282fdeaae855765f66609063bfb963ffb2ccf69a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cb3569886bfa1c197ea1db0b0eee32f5eff574454517ca64520c34adeff90404" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a0103553329c8a010ed68a1143bf9126b0f1977fec308953e9068a9722790d9d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e8c7459b0310a5c99d441e1a5814f9eb1723b11e84b58efad01c0db4aeaf8d36" + sha256 cellar: :any_skip_relocation, sequoia: "e256e8f273e3dac56c4806757e7fb4e6bfedf17e483e03bebe6627772ae3c7b7" + sha256 cellar: :any_skip_relocation, sonoma: "fba57a7f384eeab7d36b575b80054ddf2169249962139fc0c818553c1a1bdc6e" + sha256 cellar: :any_skip_relocation, ventura: "b430480afc7bb4107bc1a42930bf69baa7f1da42c2080cdf837e57f7a509147a" + sha256 cellar: :any_skip_relocation, monterey: "62534bceb8f7074827fa2146dd13603018aaf07c82e22cfef96571c8133ce8a1" + sha256 cellar: :any_skip_relocation, big_sur: "480a77f0f4e0ea6aa4175b3853feba7bdeda9f0b3dd808ad02eeb358b8a48f4a" + sha256 cellar: :any_skip_relocation, catalina: "c30c2be3191bd643f36e96b45b1282b5a750219bc8cab2e31d3c23d4cad5d70c" + sha256 arm64_linux: "97d3ee7869f6b785392190092cde2939d3e0414839d5638d0001d60481727fd8" + sha256 x86_64_linux: "7935d0efdae69742f5140d514ef2e3e50d1d7cb82104cf6033ad51b900c12749" + end + + def install + ENV.append "LDFLAGS", "-liconv" if OS.mac? + + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + test do + assert_equal "brew", shell_output("#{bin}/hello --greeting=brew").chomp + end +end diff --git a/Formula/h/hellwal.rb b/Formula/h/hellwal.rb new file mode 100644 index 0000000000000..a5fc796a49c1e --- /dev/null +++ b/Formula/h/hellwal.rb @@ -0,0 +1,29 @@ +class Hellwal < Formula + desc "Fast, extensible color palette generator" + homepage "https://github.com/danihek/hellwal" + url "https://github.com/danihek/hellwal/archive/refs/tags/v1.0.4.tar.gz" + sha256 "a33d1c5257fe4b42e92cac7f055c6ed1a3e857fe52ab435924b316947d55e200" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5b29e58646b2391aa7789e5a9f5f123ca3348881cf77685cd1e8167cdc0e0ba9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e70ac6fbd2861baba5a96267ba402c2a824579d146c14c8a24febbac5adbcb5f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "232ae8888f812cc13028e638d484ce639187362e35f257ca73b4907c8682a2cd" + sha256 cellar: :any_skip_relocation, sonoma: "ad61a0ce7e32d075464eaeb3eaadd263eadc50c1d03b9df920da1e8cbf81a72a" + sha256 cellar: :any_skip_relocation, ventura: "419049de2bda47e54b8a8ab224c5ecdab29306522541e72e6cc43eb217bb8c1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd029a9bca7810dfca9c45300f153a735d3ce5e7c93a2e532e2cbe4cd65a61f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b23953290d7eb3c7c73158227ef69b2517986868324ec96ac69c0e71c75e207" + end + + def install + system "make", "install", "DESTDIR=#{bin}" + end + + test do + assert_match version.to_s, shell_output("#{bin}/hellwal --version") + + (testpath/"hw.theme").write "%% color0 = #282828 %%" + output = shell_output("#{bin}/hellwal --skip-term-colors -j -t hw.theme 2>&1", 1) + assert_match "Not enough colors were specified in color palette", output + end +end diff --git a/Formula/h/helm-docs.rb b/Formula/h/helm-docs.rb new file mode 100644 index 0000000000000..e344e08633a30 --- /dev/null +++ b/Formula/h/helm-docs.rb @@ -0,0 +1,58 @@ +class HelmDocs < Formula + desc "Tool for automatically generating markdown documentation for helm charts" + homepage "https://github.com/norwoodj/helm-docs" + url "https://github.com/norwoodj/helm-docs/archive/refs/tags/v1.14.2.tar.gz" + sha256 "88d1b3401220b2032cd27974264d2dc0da8f9e7b67a8a929a0848505c4e4a0ae" + license "GPL-3.0-or-later" + head "https://github.com/norwoodj/helm-docs.git", branch: "master" + + # This repository originally used a date-based version format like `19.0110` + # (from 2019-01-10) instead of the newer `v1.2.3` format. The regex below + # avoids tags using the older version format, as they will be treated as + # newer until version 20.x. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d{1,3})(?:\.\d)*)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91c39e8d994bccf86a38142464dad370c4f90efd76f0708a44ad179a8616c192" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "83ae9a4b26f989027ccdb15b93bdf17cab1d501f1fe593f1c803399406b6be4a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cf56a0615e759c2723e4c01c05655e9c830f652cbaa0a6b97f72ede69a8d53a5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4abcec8420c006dd7ecb2e120b1784a2ba037ca11f208461dd15daeba9d4ba80" + sha256 cellar: :any_skip_relocation, sonoma: "75d1650efc32f8b5539301435719ddd40d32ca7e619e497f0baa5ba374ee6b7f" + sha256 cellar: :any_skip_relocation, ventura: "1f25d968c9cd5ae22a5e2cc08f5ff15361fc990b9a3aa618dfb9c3180109b2f8" + sha256 cellar: :any_skip_relocation, monterey: "8967c19d3cea006bd846275c7be9e97e289dd7fff3763e763c50ec20c410ce73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "78df0661852c388c2245a14aeeaf3442206a33ac08b1b7b74f233c72ec5d0cc5" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/helm-docs" + end + + test do + assert_match version.to_s, shell_output("#{bin}/helm-docs --version") + + (testpath/"Chart.yaml").write <<~YAML + apiVersion: v2 + name: test-app + description: A test Helm chart + version: 0.1.0 + type: application + YAML + + (testpath/"values.yaml").write <<~YAML + replicaCount: 1 + image: "nginx:1.19.10" + service: + type: ClusterIP + port: 80 + YAML + + output = shell_output("#{bin}/helm-docs --chart-search-root . 2>&1") + assert_match "Generating README Documentation for chart .", output + assert_match "A test Helm chart", (testpath/"README.md").read + end +end diff --git a/Formula/h/helm-ls.rb b/Formula/h/helm-ls.rb new file mode 100644 index 0000000000000..fc9b5a928760f --- /dev/null +++ b/Formula/h/helm-ls.rb @@ -0,0 +1,63 @@ +class HelmLs < Formula + desc "Language server for Helm" + homepage "https://github.com/mrjosh/helm-ls" + url "https://github.com/mrjosh/helm-ls/archive/refs/tags/v0.2.2.tar.gz" + sha256 "e3945bcaba746a77ea48358e96d738f7aeaf5fd1a8df3a9dc6ae2180e60d8293" + license "MIT" + head "https://github.com/mrjosh/helm-ls.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5de07d6e4cce9a468bc17e5ff2eaa1760cfd4eaf660c217fae62d9297f761318" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "30d39909350f51e14d18ac9d54831ca6a7bd975c92d46fed01a29cf192e88dd0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ffc943640cc4af33ae672a0ddea9812ebe967edd969061ff0dabc471fcce1a71" + sha256 cellar: :any_skip_relocation, sonoma: "c1160df1fd8402f4109469cf19d7d7ac568fd4c9585d954df472f37530863f2c" + sha256 cellar: :any_skip_relocation, ventura: "ee71981f5938a9eea1b396a8d5e1088ea933afada9f154dc69432429b6d27d0e" + sha256 cellar: :any_skip_relocation, arm64_linux: "66bce3b1a2691f963ddc72ebdf5e62e9c3f74d30a843e3a183ad3fc4b2e8d26a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ffba8dee3f42eb6c2e358390ec751016b9c9f3054005f4cd55df57d47e282c35" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.Version=#{version} + -X main.CompiledBy=#{tap.user} + -X main.GitCommit=#{tap.user} + -X main.BuildTime=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"helm_ls") + + generate_completions_from_executable(bin/"helm_ls", "completion") + end + + test do + require "open3" + + assert_match version.to_s, shell_output(bin/"helm_ls version") + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "workspaceFolders": [ + { + "uri": "file://#{testpath}" + } + ], + "capabilities": {} + } + } + JSON + + File.write("Chart.yaml", "") + + Open3.popen3("#{bin}/helm_ls", "serve") 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/h/helm.rb b/Formula/h/helm.rb new file mode 100644 index 0000000000000..28cc3fe88ca76 --- /dev/null +++ b/Formula/h/helm.rb @@ -0,0 +1,42 @@ +class Helm < Formula + desc "Kubernetes package manager" + homepage "https://helm.sh/" + url "https://github.com/helm/helm.git", + tag: "v3.17.3", + revision: "e4da49785aa6e6ee2b86efd5dd9e43400318262b" + license "Apache-2.0" + head "https://github.com/helm/helm.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9bc9183844aa08e59dbf0601712dd7ebce9e3608e9f9dad6d8b93daa9c567dcd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "941a2e39998eece96d5d264e5c5a6be83039ee49aa23a43ea2252be79f6cb603" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4f3c11d35d57ce2d8611669bc4d2e619c6c8f48a836b0f3119b7cfc6c1023c7c" + sha256 cellar: :any_skip_relocation, sonoma: "58a5dbc2737b4b5c331047e2e6063481ca5f27e9a126c355f969cc4ad8554a5b" + sha256 cellar: :any_skip_relocation, ventura: "47118aa666e8f83ac3425dbb4538926701673eb42e96e3df2d6e3108cc2329d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "114b712b051b18938dabdf39c153ed3cf4ac5802fa2890a31a40d36c12b87c82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "236a0586ad8a20b39449228e16cf287114a874f5d760e6f0df7a45d0dd1d1ad5" + end + + depends_on "go" => :build + + def install + system "make", "build" + bin.install "bin/helm" + + mkdir "man1" do + system bin/"helm", "docs", "--type", "man" + man1.install Dir["*"] + end + + generate_completions_from_executable(bin/"helm", "completion") + end + + test do + system bin/"helm", "create", "foo" + assert File.directory? testpath/"foo/charts" + + version_output = shell_output("#{bin}/helm version 2>&1") + assert_match "GitCommit:\"#{stable.specs[:revision]}\"", version_output + assert_match "Version:\"v#{version}\"", version_output + end +end diff --git a/Formula/h/helmfile.rb b/Formula/h/helmfile.rb new file mode 100644 index 0000000000000..c6ef66908d0e5 --- /dev/null +++ b/Formula/h/helmfile.rb @@ -0,0 +1,57 @@ +class Helmfile < Formula + desc "Deploy Kubernetes Helm Charts" + homepage "https://github.com/helmfile/helmfile" + url "https://github.com/helmfile/helmfile/archive/refs/tags/v1.0.0.tar.gz" + sha256 "071a479c94356a4131a8def5d71844573115a2f0c8f03f47947c4f8981704ab5" + license "MIT" + version_scheme 1 + head "https://github.com/helmfile/helmfile.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6ae2ad6453bd74e0ceaa96d4c7a9f95493d862b0c340e8568159abe90ecc3d78" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2ef85545fa4d51d3c316883e36f3f487a30522ba1f8d7a632b4366cea1a5aef1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b91cfa05287d8812d3b82de71b6dccac95bad5cb57ad1b99de785baf41c21a6" + sha256 cellar: :any_skip_relocation, sonoma: "68dc55aa7f6258de96d3f5698c2c950907a5e8822490634412a672da973b277c" + sha256 cellar: :any_skip_relocation, ventura: "7e270a710f7253a3fb4e3af2a17fbb3070338be1d1b992ee6f0546cd642ee9fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "e00846dd97268f9509df5d3dc272b58e07be57406382dcb04bc28e6d2e3b3e4d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "702a1e345b89765895f46b08511c6edb6736077fd2e3638fdb6c185da7d913ec" + end + + depends_on "go" => :build + depends_on "helm" + + def install + ldflags = %W[ + -s -w + -X go.szostok.io/version.version=v#{version} + -X go.szostok.io/version.buildDate=#{time.iso8601} + -X go.szostok.io/version.commit="brew" + -X go.szostok.io/version.commitDate=#{time.iso8601} + -X go.szostok.io/version.dirtyBuild=false + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"helmfile", "completion") + end + + test do + (testpath/"helmfile.yaml").write <<~YAML + repositories: + - name: stable + url: https://charts.helm.sh/stable + + releases: + - name: vault # name of this release + namespace: vault # target namespace + createNamespace: true # helm 3.2+ automatically create release namespace (default true) + labels: # Arbitrary key value pairs for filtering releases + foo: bar + chart: stable/vault # the chart being installed to create this release, referenced by `repository/chart` syntax + version: ~1.24.1 # the semver of the chart. range constraint is supported + YAML + system Formula["helm"].opt_bin/"helm", "create", "foo" + output = "Adding repo stable https://charts.helm.sh/stable" + assert_match output, shell_output("#{bin}/helmfile -f helmfile.yaml repos 2>&1") + assert_match version.to_s, shell_output("#{bin}/helmfile -v") + end +end diff --git a/Formula/h/helmify.rb b/Formula/h/helmify.rb new file mode 100644 index 0000000000000..e37083a383228 --- /dev/null +++ b/Formula/h/helmify.rb @@ -0,0 +1,54 @@ +class Helmify < Formula + desc "Create Helm chart from Kubernetes yaml" + homepage "https://github.com/arttor/helmify" + url "https://github.com/arttor/helmify/archive/refs/tags/v0.4.18.tar.gz" + sha256 "d5d30c59f29355d8e6f0722ea863c0e72d8958d75206d948500defa36b57d430" + license "MIT" + head "https://github.com/arttor/helmify.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9292bcbd63dec204dfdfb1ee1445c40af97365351b1013b612f7b8c2d288118" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e9292bcbd63dec204dfdfb1ee1445c40af97365351b1013b612f7b8c2d288118" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e9292bcbd63dec204dfdfb1ee1445c40af97365351b1013b612f7b8c2d288118" + sha256 cellar: :any_skip_relocation, sonoma: "c879d0d8990dd78ae5719e95be9ff32ece4abfb0e0279fce0faaeebb51f19f5b" + sha256 cellar: :any_skip_relocation, ventura: "c879d0d8990dd78ae5719e95be9ff32ece4abfb0e0279fce0faaeebb51f19f5b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "664f4e993ea457c1f691ecc749086493979d37034b3cc12e589ee2bb9c4f31f2" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.date=#{time.iso8601} + -X main.commit=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/helmify" + end + + test do + test_service = testpath/"service.yml" + test_service.write <<~YAML + apiVersion: v1 + kind: Service + metadata: + name: brew-test + spec: + type: LoadBalancer + YAML + + expected_values_yaml = <<~YAML + brewTest: + ports: [] + type: LoadBalancer + kubernetesClusterDomain: cluster.local + YAML + + system "cat #{test_service} | #{bin}/helmify brewtest" + assert_path_exists testpath/"brewtest/Chart.yaml" + assert_equal expected_values_yaml, (testpath/"brewtest/values.yaml").read + + assert_match version.to_s, shell_output("#{bin}/helmify --version") + end +end diff --git a/Formula/h/helmsman.rb b/Formula/h/helmsman.rb new file mode 100644 index 0000000000000..df52b8a501b92 --- /dev/null +++ b/Formula/h/helmsman.rb @@ -0,0 +1,36 @@ +class Helmsman < Formula + desc "Helm Charts as Code tool" + homepage "https://github.com/Praqma/helmsman" + url "https://github.com/Praqma/helmsman/archive/refs/tags/v4.0.1.tar.gz" + sha256 "1fd57af9978681f0c148157e5ef7929b5154e6e79bc13c41711892340320254e" + license "MIT" + head "https://github.com/Praqma/helmsman.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b083ce72a651f9040fcd994a3c2472ea05689e460a1837d793ddd2fae40800ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b083ce72a651f9040fcd994a3c2472ea05689e460a1837d793ddd2fae40800ed" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b083ce72a651f9040fcd994a3c2472ea05689e460a1837d793ddd2fae40800ed" + sha256 cellar: :any_skip_relocation, sonoma: "a3446b60d03f301e50972b2a38239cc0ffe0a0052bef78ecac9cb892aeacb9f3" + sha256 cellar: :any_skip_relocation, ventura: "a3446b60d03f301e50972b2a38239cc0ffe0a0052bef78ecac9cb892aeacb9f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d40bb6b1568328e315a28aa502c5cbf8b86cb95f493647ff4edd639878f7ba1d" + end + + depends_on "go" => :build + depends_on "helm" + depends_on "kubernetes-cli" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/helmsman" + pkgshare.install "examples/example.yaml", "examples/job.yaml" + end + + test do + ENV["ORG_PATH"] = "brewtest" + ENV["VALUE"] = "brewtest" + + output = shell_output("#{bin}/helmsman --apply -f #{pkgshare}/example.yaml 2>&1", 1) + assert_match "helm diff not found", output + + assert_match version.to_s, shell_output("#{bin}/helmsman version") + end +end diff --git a/Formula/h/help2man.rb b/Formula/h/help2man.rb new file mode 100644 index 0000000000000..a254dc3bd3001 --- /dev/null +++ b/Formula/h/help2man.rb @@ -0,0 +1,54 @@ +class Help2man < Formula + desc "Automatically generate simple man pages" + homepage "https://www.gnu.org/software/help2man/" + url "https://ftp.gnu.org/gnu/help2man/help2man-1.49.3.tar.xz" + mirror "https://ftpmirror.gnu.org/help2man/help2man-1.49.3.tar.xz" + sha256 "4d7e4fdef2eca6afe07a2682151cea78781e0a4e8f9622142d9f70c083a2fd4f" + license "GPL-3.0-or-later" + revision 3 + + bottle do + sha256 cellar: :any, arm64_sequoia: "253c91cfe267b4e6d99516e9b6243db8de63cd2090feba9a411f0de56ffdc003" + sha256 cellar: :any, arm64_sonoma: "6fff08f6e2f1e2c1a116771d2cec67f02fd4e5157c5a7468299d625d8708c9c2" + sha256 cellar: :any, arm64_ventura: "ec4c0a8ad5435ebce1cdcc50850121a465da5d591e02cb3264d0b1ddd367dfd5" + sha256 cellar: :any, sonoma: "e7fee7c80e8f8b0db71ed8f91789676f01f0c25ea7a36dddbe6ac4132a371ffe" + sha256 cellar: :any, ventura: "f50814222c4bf9afb2f0430b65e058bd893eabd43036e2e8083cb8213b69f10b" + sha256 cellar: :any_skip_relocation, arm64_linux: "2589a1e73bbb7b11ab13b6ba8f60dbd56509377ce07adf66f4f8c4f43e947d54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2fe8b82eddc849ea8cb7b7c2f5a2452bf3bfb5fd8af84e18f5689c1f6966a02" + end + + depends_on "gettext" + depends_on "perl" + + resource "Locale::gettext" 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", libexec/"lib/perl5" + + resource("Locale::gettext").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", "NO_MYMETA=1" + system "make", "install" + end + + # install is not parallel safe + # see https://github.com/Homebrew/homebrew/issues/12609 + ENV.deparallelize + + args = [] + args << "--enable-nls" if Hardware::CPU.intel? + + system "./configure", "--prefix=#{prefix}", *args + system "make", "install" + (libexec/"bin").install bin/"help2man" + (bin/"help2man").write_env_script("#{libexec}/bin/help2man", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + out = shell_output("#{bin}/help2man --locale=en_US.UTF-8 #{bin}/help2man") + + assert_match "help2man #{version}", out + end +end diff --git a/Formula/h/heppdt2.rb b/Formula/h/heppdt2.rb new file mode 100644 index 0000000000000..158dd948a0b52 --- /dev/null +++ b/Formula/h/heppdt2.rb @@ -0,0 +1,35 @@ +class Heppdt2 < Formula + desc "Translation for particle ID's to and from various MC generators and PDG standard" + homepage "https://cdcvs.fnal.gov/redmine/projects/heppdt/wiki" + url "https://cern.ch/lcgpackages/tarFiles/sources/HepPDT-2.06.01.tar.gz" + sha256 "12a1b6ffdd626603fa3b4d70f44f6e95a36f8f3b6d4fd614bac14880467a2c2e" + license "AFL-3.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a88323276e43919598c99db83cb8ad62864a6c3fa87045791ae7b65f5c8c1aeb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2114a3a999db405565067ff1590fec7434c1481f6ba57416d2a722baf19991e0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d5527abc757007282f1ff1d2eefb61d6febfb6343fc411d17ff0f79e1ee39c69" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e1edccaf839fb239d8d8b583b03537bb8789f939afa610df5b806f2ff15243d5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2b0f2ffc2837fee3dbf5aea96b1a7329c574373578548986c95cdf50b7f0171a" + sha256 cellar: :any_skip_relocation, sonoma: "e903e846adbe99c02072c6e20bd9ab59dfcd673bc24ed43d84f80eadbba03ee9" + sha256 cellar: :any_skip_relocation, ventura: "f248471e73e458133f30b910b846157b4fb7dfc1bc403123503ec01c1a9a55fe" + sha256 cellar: :any_skip_relocation, monterey: "d41f92b1fe64fe52327e3a3f80d04acdc449a9c9d40d9a75dba40700382f51a9" + sha256 cellar: :any_skip_relocation, big_sur: "ad2b96b10116b7be43a7fb93f0dd76346c904b9fc281983cbb954dd21674499e" + sha256 cellar: :any_skip_relocation, catalina: "5cefdebab8dadafb0c96b121eab2dc0abf0cf6b2f7ff5acdd4d67353c05c275b" + sha256 cellar: :any_skip_relocation, mojave: "2c0ccad4374004249fc7431acaa358d0b04d096526e6447ec0c10cdc3b4759af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a9fd6f6dc87942bb05ce6105a4038ce7c824c25636a0b110b33bdb9b25cb15a" + end + + disable! date: "2025-01-05", because: :unmaintained + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + system ENV.cxx, "#{prefix}/examples/HepPDT/examMyPDT.cc", "-I#{include}", "-L#{lib}", "-lHepPDT", "-lHepPID" + system "./a.out" + end +end diff --git a/Formula/h/hercules.rb b/Formula/h/hercules.rb new file mode 100644 index 0000000000000..b3741c047875c --- /dev/null +++ b/Formula/h/hercules.rb @@ -0,0 +1,81 @@ +class Hercules < Formula + desc "System/370, ESA/390 and z/Architecture Emulator" + homepage "https://sdl-hercules-390.github.io/html/" + url "https://github.com/SDL-Hercules-390/hyperion/archive/refs/tags/Release_4.8.tar.gz" + sha256 "91ac45a1cce8196f32a7d7918db6f935c29a891cd0baedeec70f9290bce91de9" + license "QPL-1.0" + head "https://github.com/SDL-Hercules-390/hyperion.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "99d22a70c57b1ef09d2af6f4f1f1836dac37bb9f6a5d4bbb516b78f902bdf770" + sha256 arm64_sonoma: "eb8da1cb1281e2d9ba2ca7260d86c28c1b75f79711b6f9f2ec8c956c5556b8c3" + sha256 arm64_ventura: "4cd0f333e7fb17a5d3e746c7ed3bc6126f2969c9841f7d094afaaa8ac93d6b98" + sha256 sonoma: "1551d8fef170befe95c125cd4fb745dc7e694a579d6d7f3d089d0ce50645d77f" + sha256 ventura: "1613524057720b523c065d4f8ad567dd0a71414e6dbc59666d65ca341338f518" + sha256 arm64_linux: "897a20cdbd2fa6664163911d8a2a47fb972c5879070c83230a268dc6c7390db6" + sha256 x86_64_linux: "48bb0bff466cc2f739e49ff0f2eba752986354df6f2848130973e53ad81559a8" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cmake" => :build + depends_on "gnu-sed" => :build + depends_on "libtool" => :build + + uses_from_macos "zlib" + + resource "crypto" do + url "https://github.com/SDL-Hercules-390/crypto/archive/a5096e5dd79f46b568806240c0824cd8cb2fcda2.tar.gz" + sha256 "78bda462d46c75ab4a92e7fd6755b648658851f5f1ac3f07423e55251bd83a8c" + end + + resource "decNumber" do + url "https://github.com/SDL-Hercules-390/decNumber/archive/3aa2f4531b5fcbd0478ecbaf72ccc47079c67280.tar.gz" + sha256 "527192832f191454b19da953d1f3324c11a4f01770ad2451c42dc6d638baca62" + end + + resource "SoftFloat" do + url "https://github.com/SDL-Hercules-390/SoftFloat/archive/c114c53e672d92671e0971cfbf8fe2bed3d5ae9e.tar.gz" + sha256 "3dfbd1c1dc2ee6b1dcc6d67fa831d0590982c28f518ef207363950125d36aa47" + end + + resource "telnet" do + url "https://github.com/SDL-Hercules-390/telnet/archive/729f0b688c1426018112c1e509f207fb5f266efa.tar.gz" + sha256 "222bc9c5b56056b3fa4afdf4dd78ab1c87673c26c725309b1b3a6fd3e0e88d51" + end + + def install + resources.each do |r| + resource_prefix = buildpath/r.name + rm_r(resource_prefix) + build_dir = buildpath/"#{r.name}64.Release" + + r.stage do + system "cmake", "-S", ".", "-B", build_dir, *std_cmake_args(install_prefix: resource_prefix) + system "cmake", "--build", build_dir + system "cmake", "--install", build_dir + end + + (resource_prefix/"lib/aarch64").install_symlink (resource_prefix/"lib").children if Hardware::CPU.arm? + end + + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--enable-optimization=no", + "--disable-getoptwrapper", + "--without-included-ltdl" + system "make" + ENV.deparallelize if OS.linux? + system "make", "install" + pkgshare.install "hercules.cnf" + end + + test do + (testpath/"test00.ctl").write <<~EOS + TEST00 3390 10 + TEST.PDS EMPTY CYL 1 0 5 PO FB 80 6080 + EOS + + system bin/"dasdload", "test00.ctl", "test00.ckd" + end +end diff --git a/Formula/h/hermit.rb b/Formula/h/hermit.rb new file mode 100644 index 0000000000000..366beb86b761f --- /dev/null +++ b/Formula/h/hermit.rb @@ -0,0 +1,47 @@ +class Hermit < Formula + desc "Manages isolated, self-bootstrapping sets of tools in software projects" + homepage "https://cashapp.github.io/hermit" + url "https://github.com/cashapp/hermit/archive/refs/tags/v0.44.8.tar.gz" + sha256 "9bc7a4142e0d10cccefbb637e9d3be46b441c8e80614044ab0d8940470b610d4" + license "Apache-2.0" + head "https://github.com/cashapp/hermit.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b56a205c2ccedf1190954e940fa8eccd675f6a2944e9302b2603344713c5a1ad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5ea3e9c3d486fcd9e22923d7b81569a16895bdc400fd22651cb4681fce5d1691" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d6e2e0b2a7fcf04e3d8e0a9c500ac93b7467c3088d94ec56a08570c3b70cce78" + sha256 cellar: :any_skip_relocation, sonoma: "576cc5864a37c0b780e77b6ac7b87837a19eee8108992697c431154eff65bf4d" + sha256 cellar: :any_skip_relocation, ventura: "7b9364cea9afe0265d4526b94a6b9792c7309167ec34136afddd12892474a5e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e30f258d750c56d219dd2c21a332721cc23a7daaf042da650210b65405803d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ded6a6a78f7547f5d75c7f201b20c44d93e14905e598110bc4ec11d97c102f66" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.channel=stable + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/hermit" + end + + def caveats + <<~EOS + For shell integration hooks, add the following to your shell configuration: + + For bash, add the following command to your .bashrc: + eval "$(test -x $(brew --prefix)/bin/hermit && $(brew --prefix)/bin/hermit shell-hooks --print --bash)" + + For zsh, add the following command to your .zshrc: + eval "$(test -x $(brew --prefix)/bin/hermit && $(brew --prefix)/bin/hermit shell-hooks --print --zsh)" + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/hermit version") + system bin/"hermit", "init", "." + assert_path_exists testpath/"bin/hermit.hcl" + end +end diff --git a/Formula/h/heroku.rb b/Formula/h/heroku.rb new file mode 100644 index 0000000000000..1f8985c81c9c8 --- /dev/null +++ b/Formula/h/heroku.rb @@ -0,0 +1,49 @@ +class Heroku < Formula + desc "CLI for Heroku" + homepage "https://www.npmjs.com/package/heroku/" + url "https://registry.npmjs.org/heroku/-/heroku-10.7.0.tgz" + sha256 "518e73915bd2134e68ccd04741a0f790f35847dc39951b3edc27cd634e37550f" + license "ISC" + + bottle do + sha256 arm64_sequoia: "ba167e543e9529e78ce6c7106c32678f24ad0d59b5f9af0bd959db047f99b0e3" + sha256 arm64_sonoma: "dafe1bae56a7f0a43f512032b794a04d4d96ec64b824d4d1e7f5405cc5d0c4ab" + sha256 arm64_ventura: "53bd059bf3d2a323e4b5c2e63b7d3d621a1f9d5b64a486b2aba33f18460547f3" + sha256 sonoma: "48041780138edd9a4868f848838fd7642b695c8d4ba63a58b580169c8596fa6b" + sha256 ventura: "ed5b029b88e298d35add4198f4086cb7dfe1676ff1ce188976a1370126a45c88" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4b8f063121a6735395a5d0dbd3d42fb56c569daa993dee84cb0a80cd1eade73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8dd0f9a00e54e78e28a19f3b38f53fe255a769c853ba50b99f35c5966b5c64b" + 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/*"] + + node_modules = libexec/"lib/node_modules/heroku/node_modules" + # 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 + + # Replace universal binaries with their native slices. + deuniversalize_machos + end + + test do + assert_match "Error: not logged in", shell_output("#{bin}/heroku auth:whoami 2>&1", 100) + end +end diff --git a/Formula/h/hesiod.rb b/Formula/h/hesiod.rb new file mode 100644 index 0000000000000..90c2413315340 --- /dev/null +++ b/Formula/h/hesiod.rb @@ -0,0 +1,42 @@ +class Hesiod < Formula + desc "Library for the simple string lookup service built on top of DNS" + homepage "https://github.com/achernya/hesiod" + url "https://github.com/achernya/hesiod/archive/refs/tags/hesiod-3.2.1.tar.gz" + sha256 "813ccb091ad15d516a323bb8c7693597eec2ef616f36b73a8db78ff0b856ad63" + license "BSD-2-Clause" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "b35e4acc79d9b6003e2358d0c508b8c0e8abd37b5668136f5b52ebdbec389bbc" + sha256 cellar: :any, arm64_sonoma: "4530f3f5f7f4402adcc86cd8a55a5427ce4c838b0193a126a0ddb21ef617e41c" + sha256 cellar: :any, arm64_ventura: "5eeb38db926fd0be3a2d565646b739000e20d3a9d556aadef81d6bd758c9255f" + sha256 cellar: :any, arm64_monterey: "1887e1da4904dd97c1cb19c251cad52a79a8c83113075c65d7331ddff69cd99e" + sha256 cellar: :any, arm64_big_sur: "66f05bed0ecbd7328400f142a7864ec972fd3573d284375c222ff963a5ae7875" + sha256 cellar: :any, sonoma: "e84876e787316bb428e51e487e32bba65ad77323d34c4d2f3d1b72a0749e69ab" + sha256 cellar: :any, ventura: "7fe19d0020ba5289aa071273d00a86179fcadaf2d6352ccb6caf7bc213eb80dd" + sha256 cellar: :any, monterey: "d9006242a86ffc44a757bee9408f1e668cfc528ed9654816550b197118f73d7f" + sha256 cellar: :any, big_sur: "8b396dffcf3d833f50169ee20ae3ae126775cb40430ee4d2d967ba459834815a" + sha256 cellar: :any, catalina: "2e077b355ca0ed9f0bbadfc7b54ef681fc11f58c324ce19d3131fb61b99f15d2" + sha256 cellar: :any, mojave: "76748e285f22aed694c2933e4cd3a1469398ea254671755e6f89ad07e76b7f73" + sha256 cellar: :any, high_sierra: "de927a6526209db3673aa9e426d7e32f53b7a278798f07d6dc1c5069e816d09a" + sha256 cellar: :any_skip_relocation, arm64_linux: "61a92d40669db1231ac941a5d2f4f71a09e9bad4907e36239dd22f9b71da305c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f798b02cd050763429e1db3c6e8afbb591bca678a8352fa8305cdbaa544a3f9" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libidn" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"hesinfo", "sipbtest", "passwd" + system bin/"hesinfo", "sipbtest", "filsys" + end +end diff --git a/Formula/h/hevea.rb b/Formula/h/hevea.rb new file mode 100644 index 0000000000000..a81f5900a8057 --- /dev/null +++ b/Formula/h/hevea.rb @@ -0,0 +1,48 @@ +class Hevea < Formula + desc "LaTeX-to-HTML translator" + homepage "https://hevea.inria.fr/" + url "https://hevea.inria.fr/old/hevea-2.36.tar.gz" + sha256 "5d6759d7702a295c76a12c1b2a1a16754ab0ec1ffed73fc9d0b138b41e720648" + license all_of: [ + "QPL-1.0", # source files + "GPL-2.0-only", # binaries + ] + + livecheck do + url "https://hevea.inria.fr/old/" + regex(/href=.*?hevea[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "bdfe564bb63675879e20d1f8d2958a658b10a062010af2cb2634ba08987ae135" + sha256 arm64_sonoma: "37c9173e633f015bdac3ded26af7827373fbfc24816bb4224e788c288f6b502c" + sha256 arm64_ventura: "a1f2662024a74ebcb1a5fe6d6066030899abcd9586942136b19db4ecb36da59b" + sha256 arm64_monterey: "c390ecca1b09d574110a2394049497f058b9fe2dec4a1cc89647b624dc91b404" + sha256 arm64_big_sur: "c1a1d50e902bf8aa644a33983ffde654d240f0d6101e25f838b8565ca6a1c576" + sha256 sonoma: "0dbceac1365afd4c4ddc7f19223a3db7bfca07302c829427e62a8873e7e61a6f" + sha256 ventura: "d2b833d6882beedf115c34a4d385160179f3271cc6758f7b0e3cf12a0176406f" + sha256 monterey: "db2c216ff60400ea161cd163af81b5c62cb2749d3ba0109e4ec76d13f0f57d3a" + sha256 big_sur: "a583d051c2a5257acb2b60d9fdcacbafb63a6012c4d3f4aa293a5372020fb942" + sha256 catalina: "22faadcb4cf36deb5864e240ef5e7e718dbfd10308adb3582acbf53d653d082f" + sha256 arm64_linux: "1ea230b32d26c06671f04ef6860d3fae36a6287a0f308758dea55606bbaf3927" + sha256 x86_64_linux: "06f64e05150caebad2f34b80f2861b3c69fc4fa1a483d0863e269007d77de28b" + end + + depends_on "ocamlbuild" => :build + depends_on "ocaml" + + def install + ENV["PREFIX"] = prefix + system "make" + system "make", "install" + end + + test do + (testpath/"test.tex").write <<~'TEX' + \documentclass{article} + \begin{document} + \end{document} + TEX + system bin/"hevea", "test.tex" + end +end diff --git a/Formula/h/hevi.rb b/Formula/h/hevi.rb new file mode 100644 index 0000000000000..bf515731bb50b --- /dev/null +++ b/Formula/h/hevi.rb @@ -0,0 +1,36 @@ +class Hevi < Formula + desc "Hex viewer" + homepage "https://github.com/Arnau478/hevi" + url "https://github.com/Arnau478/hevi/archive/refs/tags/v1.1.0.tar.gz" + sha256 "d1c444301c65910b171541f1e3d1445cc3ff003dfc8218b976982f80bccd9ee0" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "af71a0d595ed48d139c93e8f4ef5a59edea2309afeddf280c5408ba532d470f7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "135aef044ae02eb3898d410284c9ca8e75289effcef3dd15bc56f7a4df50f1e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6e9597a6ff6d8eeac1df5ad0bd524a8b2a1998af819df0dc5d2b2ff8f6037a23" + sha256 cellar: :any_skip_relocation, sonoma: "c023afee5920d4732b9a9dd8d85e0c2922a877cb51b288901ea93bbb90897b37" + sha256 cellar: :any_skip_relocation, ventura: "7ad8ac2263159c788705564b0a17d3f9052f237db3efffcd1e68f089314a4006" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98a58cbce9389c32d13ddf68be6a62b89113000d5ae6f82711174b90cf63174e" + 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 Hardware.oldest_cpu + when :arm_vortex_tempest then "apple_m1" # See `zig targets`. + else Hardware.oldest_cpu + end + + args = [] + args << "-Dcpu=#{cpu}" if build.bottle? + system "zig", "build", *args, *std_zig_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/hevi --version 2>&1") + assert_match "00000000", shell_output("#{bin}/hevi #{test_fixtures("test.pdf")}") + end +end diff --git a/Formula/h/hex.rb b/Formula/h/hex.rb new file mode 100644 index 0000000000000..f01d4a8b6abc1 --- /dev/null +++ b/Formula/h/hex.rb @@ -0,0 +1,45 @@ +class Hex < Formula + desc "Futuristic take on hexdump" + homepage "https://github.com/sitkevij/hex" + url "https://github.com/sitkevij/hex/archive/refs/tags/v0.6.0.tar.gz" + sha256 "7952ee2b6782e49259f82155c3b5287f1be72f15360a88e379c9270bd0d2416c" + license "MIT" + head "https://github.com/sitkevij/hex.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "00163db8e16e993aea4f0695efa7742dd69be3b8c95fda5fd173116e6a95dab9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6ba2edfeca426fad9d11610304e66413568579e8799fcd75233bb78b244c734b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "12c69fa625d5767d73c6db34852bc5e407ea72f0e3323719cc12452be5a96aa2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "add8f34f654c08ee6bad65a9241ddf888f48671af80ed8802a28aeb0521c0ec1" + sha256 cellar: :any_skip_relocation, sonoma: "a68b4808c49f1efe490dda2257c7a086b49f06568217b69377d26f29579c6382" + sha256 cellar: :any_skip_relocation, ventura: "773540855a62a291de74084ecb0176d9d10b7451c447524c31de2e5916178931" + sha256 cellar: :any_skip_relocation, monterey: "32335343e695d99fe0e99e3f4d10900337d0b3994e0f4e5bb628a7ada5ccb643" + sha256 cellar: :any_skip_relocation, arm64_linux: "6a5aff5da3a46ee810ad341f7d44702b1c9800b3950a8efb7689e392446b61c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b991de74c7ae7edad37b6c25c583a93de8cfd3cdc938bb00d978de0d80602bf5" + end + + depends_on "rust" => :build + + conflicts_with "evil-helix", because: "both install `hx` binaries" + conflicts_with "helix", because: "both install `hx` binaries" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"tiny.txt").write("il") + output = shell_output("#{bin}/hx tiny.txt") + assert_match "0x000000: 0x69 0x6c", output + + output = shell_output("#{bin}/hx -ar -c8 tiny.txt") + expected = <<~EOS + let ARRAY: [u8; 2] = [ + 0x69, 0x6c + ]; + EOS + assert_equal expected, output + + assert_match "hx #{version}", shell_output("#{bin}/hx --version") + end +end diff --git a/Formula/h/hexcurse.rb b/Formula/h/hexcurse.rb new file mode 100644 index 0000000000000..a897e1523df6b --- /dev/null +++ b/Formula/h/hexcurse.rb @@ -0,0 +1,41 @@ +class Hexcurse < Formula + desc "Ncurses-based console hex editor" + homepage "https://github.com/LonnyGomes/hexcurse" + url "https://github.com/LonnyGomes/hexcurse/archive/refs/tags/v1.60.0.tar.gz" + sha256 "f6919e4a824ee354f003f0c42e4c4cef98a93aa7e3aa449caedd13f9a2db5530" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a7086e819b1cd96888fbd2026a5367552e1eacd579dd72fa81e275c32939499" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26ca7161cf90a9794229c2a7fdee93f2a8ffe0db514ff282e480f199d408fbfd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e70c0b58b904bd8b310d02ff2c1b486e75ffab55ffda96cd3627920cdd41d4f3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c5778ff4ddb2d3d4d18c4150c34d2a73be472c239a81a243dd03f93a494a4fcb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5147e2ba447a362995e7b4de49fa9519c7f4f4a72e00396e1e850ebc5e6d6e30" + sha256 cellar: :any_skip_relocation, sonoma: "8bccca2082f0cb7ea860c031adb448b3c4c7d1009558f77a3aa1dda10850d348" + sha256 cellar: :any_skip_relocation, ventura: "1ae6efc1513df7fccc4ed4e124f76b2a1cee2255503e5c495f0cfa53c61c9d81" + sha256 cellar: :any_skip_relocation, monterey: "7af11f5ed0d454f43e40d39f35fb1967414d81f314aa46fbadd556265c0966e3" + sha256 cellar: :any_skip_relocation, big_sur: "26bbc403b9590ad6891663edfb0c424c7497755098873e4f5cc95fb7231e259b" + sha256 cellar: :any_skip_relocation, catalina: "977632cc06d33a8d2f7f44866a7497dc7f8b8b423869f348827f20811c024935" + sha256 cellar: :any_skip_relocation, mojave: "1e940f63d87629fd0fd6758436679eac6238afae871681c5d65e03cfce11bde1" + sha256 cellar: :any_skip_relocation, high_sierra: "071ab88d401cc9ff24c6d466f291217d57082d07649ddb39f7d6aa28dd9ed7e6" + sha256 cellar: :any_skip_relocation, sierra: "580efaffc5d8dccb0f4f6532ad5be35e372c6b8d91dfb6d3930aa773c9bf7ea1" + sha256 cellar: :any_skip_relocation, el_capitan: "ffe690a87522627dc0088c391f7237fc6a3f2aa12fc5a3487c0aa6694905dc4d" + sha256 cellar: :any_skip_relocation, arm64_linux: "dfdd735912fd3c69d3e62a7b71b0e4e453b762e5ad5bc7c6788f19c83e4abb59" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5a77e765183c6f25ab2334662999e980f9c3ee127394682d3723262e0e80b64a" + end + + uses_from_macos "ncurses" + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `fpIN'; file.o:(.bss+0x0): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + system bin/"hexcurse", "-help" + end +end diff --git a/Formula/h/hexd.rb b/Formula/h/hexd.rb new file mode 100644 index 0000000000000..41d46f7d4c9b3 --- /dev/null +++ b/Formula/h/hexd.rb @@ -0,0 +1,29 @@ +class Hexd < Formula + desc "Colourful, human-friendly hexdump tool" + homepage "https://github.com/FireyFly/hexd" + url "https://github.com/FireyFly/hexd/archive/refs/tags/v1.1.0.tar.gz" + sha256 "de0db7205c8eb0f170263aca27f5d48963855345bc79ba4842edd21a938d0326" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "05ec65d79e0eae2ee7291cbb5fc523358b97e0f93a5b5cab039d02b27aa39230" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6258b4701ae5d49c39ee122ad9988d9647141a3c62ae49923dacc5086617c1f5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "542333622e6a776e913cd72d820671ae3da80180673f3f6ce93e911816f04b56" + sha256 cellar: :any_skip_relocation, sonoma: "45a53e8aad1758074bbffb8e618a19c25645547d883d5f4ccf62cd2ac312658e" + sha256 cellar: :any_skip_relocation, ventura: "dacdc00f2ad09c469316c672491b47d4242bf119eea23ed4de2d361518a3b7f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b62eca23b33b5257e4fb33ec61b9301700d7c732c2efe2037952fdc3b9e8cf8d" + end + + def install + # BSD install does not understand the GNU "-D" flag. + inreplace "Makefile", "install -D", "install" + + bin.mkdir + man1.mkpath + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match(/0000\s+48/, pipe_output("#{bin}/hexd -p", "H")) + end +end diff --git a/Formula/h/hexedit.rb b/Formula/h/hexedit.rb new file mode 100644 index 0000000000000..b6511d0abfd2d --- /dev/null +++ b/Formula/h/hexedit.rb @@ -0,0 +1,38 @@ +class Hexedit < Formula + desc "View and edit files in hexadecimal or ASCII" + homepage "https://rigaux.org/hexedit.html" + url "https://github.com/pixel/hexedit/archive/refs/tags/1.6.tar.gz" + sha256 "598906131934f88003a6a937fab10542686ce5f661134bc336053e978c4baae3" + license "GPL-2.0-or-later" + head "https://github.com/pixel/hexedit.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "604722ab45e22e81dbfdc0d047e99be5e11dc0dbe938bb9e12623a452681f848" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "afc2fe1bf87e8c4eeca709846343c69c54e061130fa737068de92c442138eeb4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b0a625232f5b830b4eaf819181ab6d7f33ba19862d803fa563a7f428224dc819" + sha256 cellar: :any_skip_relocation, arm64_monterey: "036e68e8552287bbf3c4f37232a3eda16f05993b0635573f04f87f9a89b71392" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4127abcc6c5a2dcd8e5b535b89de6bc2a32a5c0f92f26fef10114ad5b03d5c72" + sha256 cellar: :any_skip_relocation, sonoma: "8c2475e85e6883ff4693d020c4ffaf4864fa5f4bf4e9ab612a29a040d992519b" + sha256 cellar: :any_skip_relocation, ventura: "31a2dd5134505b0fd1c10cfbf241a2dfd7cf62874d350588b89f2f14a2f4bdff" + sha256 cellar: :any_skip_relocation, monterey: "f24ca3b6ffe8ab46993b0044f5fa94f2663f4122d65ae290ff8355241d41ca0f" + sha256 cellar: :any_skip_relocation, big_sur: "145c1c6e983965f64b0e19df3a0c6adaff3577486c42ffbe1e79939ef855d9c5" + sha256 cellar: :any_skip_relocation, catalina: "6306cc37f5c56d10fd058db6881681e2406adf397537616b37d45aab2e732964" + sha256 cellar: :any_skip_relocation, arm64_linux: "545be837a1c5050d983a83141cc68eb447da849733f010fbc4b38c3264893215" + sha256 cellar: :any_skip_relocation, x86_64_linux: "26a91b13749f1e68542e41109fed36f4001a23d79a412bf7a5830f2a08ddbe5c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "ncurses" + + def install + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + shell_output("#{bin}/hexedit -h 2>&1", 1) + end +end diff --git a/Formula/h/hexer.rb b/Formula/h/hexer.rb new file mode 100644 index 0000000000000..4397d13a6d565 --- /dev/null +++ b/Formula/h/hexer.rb @@ -0,0 +1,38 @@ +class Hexer < Formula + desc "Hex editor for the terminal with vi-like interface" + homepage "https://devel.ringlet.net/editors/hexer/" + url "https://devel.ringlet.net/files/editors/hexer/hexer-1.0.6.tar.gz" + sha256 "fff00fbb0eb0eee959c08455861916ea672462d9bcc5580207eb41123e188129" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?hexer[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bd7a6cbea17a087bc8c9f58fbd4dcc595ea3c1f65760a6c1f7c34d9e4c2c7b1c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e5bd5b3ffa68b3200ee5cdda6afa4ed5982760598c759bebc1497404abf170b9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "78608e7de426f8d081f22e85878d8d0a42388246d79ad773431164f65b05e867" + sha256 cellar: :any_skip_relocation, arm64_monterey: "71e185121e08ddab73b7f5071eee7420fbb87b159a0a0cfb8d99202e86a407cf" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "870e4eee439fd986b917b966c67b59965a643e71b4cc33ea9b28236ee248a170" + sha256 cellar: :any_skip_relocation, sonoma: "4c84fa4cf1ada9f83e915bfb80384901799d678d5a97eff7e244534bdbb67f48" + sha256 cellar: :any_skip_relocation, ventura: "019c5a1806bd439ff70d9efee99d3202385da58529bb5970c24f8e435c9b660f" + sha256 cellar: :any_skip_relocation, monterey: "88fc357578acfb6e88b9b1e5c1a07bae269a7d3811269fcd6d14ec86c5efc04d" + sha256 cellar: :any_skip_relocation, big_sur: "c9f70c4af623ee7ffbc9da870f2b07b527b27ccab166243febbd206f4a78eb2c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f74c6862bfe432093fa0a9db2c6cd3dca5812a5c86bae57777410e41956c2f7a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d2555b996ecdfe5178d26c9b7279c882fbdbff1551b8f71b6d232338ccf2c74" + end + + uses_from_macos "ncurses" + + def install + system "make", "install", "PREFIX=#{prefix}", "MANDIR=#{man1}" + end + + test do + ENV["TERM"] = "xterm" + assert_match "00000000: 62 72 65 77", pipe_output("#{bin}/hexer test", "i62726577\e:wq\n") + assert_equal "brew", (testpath/"test").read + end +end diff --git a/Formula/h/hexgui.rb b/Formula/h/hexgui.rb new file mode 100644 index 0000000000000..e5114bfb58dca --- /dev/null +++ b/Formula/h/hexgui.rb @@ -0,0 +1,37 @@ +class Hexgui < Formula + desc "GUI for playing Hex over Hex Text Protocol" + homepage "https://sourceforge.net/p/benzene/hexgui/" + url "https://github.com/apetresc/hexgui/archive/refs/tags/v0.9.4.tar.gz" + sha256 "902ebcdf46ac9b90fec6ebd2e24e8d12f2fb291ea4ef711abe407f13c4301eb8" + license "GPL-3.0-or-later" + head "https://github.com/apetresc/hexgui.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ccdb3e80a0eb41a92445f2eb7338c220303da8c6bd8e536e825d69b7fa2908a1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "37ccb0805ccbcc1a8a9af8ecb5c6b687ea896afeebb892029dfa07da395d5ad2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "28d9d6d7ec542660e6760f7fbce2101b2259e096cd5ba57aaee7c39cd7399ba6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fd4e9603173284cc9b7c066832fccc7e175f6bbad1b1e4fbee348fe658c1695a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "67b948cd8592fa945919c0c3817e7fc4ef946c63f0eea2ce6eff0948a4d7b391" + sha256 cellar: :any_skip_relocation, sonoma: "6b472541128e32ff7814d513e2bf85dc681dfc6c5266c8fa9822bbe2dc0c5f72" + sha256 cellar: :any_skip_relocation, ventura: "d8e8fd7679f0f5a55f8c2221049542ac4241c1c0ac3bbd2a05401bdf4b702401" + sha256 cellar: :any_skip_relocation, monterey: "d81898239d18db373e084173879a20bb068b5addb64e197cb89eea039aacd487" + sha256 cellar: :any_skip_relocation, big_sur: "604a0d381b523b54292f65b3e9ab20b3085e5a8f0c84065516c74bd38ce1245b" + sha256 cellar: :any_skip_relocation, arm64_linux: "a23602aeb64e79dc0f28b3c7bf13a05144d2501d38804c5d000e0c7d8081acee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f3482e21058facf382c8920f29980679e4b168d2a5380ca9f995bb8e6383f4b" + end + + depends_on "ant" => :build + depends_on "openjdk" + + def install + system "ant" + libexec.install Dir["*"] + env = Language::Java.overridable_java_home_env + env["PATH"] = "$JAVA_HOME/bin:$PATH" + (bin/"hexgui").write_env_script libexec/"bin/hexgui", env + end + + test do + assert_match(/^HexGui #{version} .*/, shell_output("#{bin}/hexgui -version").chomp) + end +end diff --git a/Formula/h/hexo.rb b/Formula/h/hexo.rb new file mode 100644 index 0000000000000..5adf3b0853725 --- /dev/null +++ b/Formula/h/hexo.rb @@ -0,0 +1,38 @@ +class Hexo < Formula + desc "Fast, simple & powerful blog framework" + homepage "https://hexo.io/" + url "https://registry.npmjs.org/hexo/-/hexo-7.3.0.tgz" + sha256 "807b356fef2aa9623788b0e2b997fc6955c4c0a2a70fc1a8776c281194e4277e" + license "MIT" + head "https://github.com/hexojs/hexo.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8a1d3ba84fcc6755801b4e0d7838adb598b651c8ac4648b33bcbdff5797a5a20" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "209a443cc5a02dd08fad22385e10e453b903b22ab90d0c19a825da1bcba3d6be" + sha256 cellar: :any_skip_relocation, arm64_ventura: "209a443cc5a02dd08fad22385e10e453b903b22ab90d0c19a825da1bcba3d6be" + sha256 cellar: :any_skip_relocation, arm64_monterey: "209a443cc5a02dd08fad22385e10e453b903b22ab90d0c19a825da1bcba3d6be" + sha256 cellar: :any_skip_relocation, sonoma: "e44df1e02afe2df6e9957c624aa306392d7ef6e9273a65bad30cce1826644443" + sha256 cellar: :any_skip_relocation, ventura: "e44df1e02afe2df6e9957c624aa306392d7ef6e9273a65bad30cce1826644443" + sha256 cellar: :any_skip_relocation, monterey: "e44df1e02afe2df6e9957c624aa306392d7ef6e9273a65bad30cce1826644443" + sha256 cellar: :any_skip_relocation, arm64_linux: "0492ce8c52b9c4040646909acf29b5d237855026d982304e137f497a2bf4455e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "803c580e42eadd1f4dd66bcb435bbc117df28b3a1e6a9c0c85551940d9d3c79a" + end + + depends_on "node" + + def install + mkdir_p libexec/"lib" + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + output = shell_output("#{bin}/hexo --help") + assert_match "Usage: hexo ", output.strip + + output = shell_output("#{bin}/hexo init blog --no-install") + assert_match "Cloning hexo-starter", output.strip + assert_path_exists testpath/"blog/_config.yml" + end +end diff --git a/Formula/h/hexyl.rb b/Formula/h/hexyl.rb new file mode 100644 index 0000000000000..418d60fee22af --- /dev/null +++ b/Formula/h/hexyl.rb @@ -0,0 +1,34 @@ +class Hexyl < Formula + desc "Command-line hex viewer" + homepage "https://github.com/sharkdp/hexyl" + url "https://github.com/sharkdp/hexyl/archive/refs/tags/v0.16.0.tar.gz" + sha256 "52853b4edede889b40fd6ff132e1354d957d1f26ee0c26ebdea380f8ce82cb0b" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/sharkdp/hexyl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "97598fb11f5c1a101081183f3a00864973d5349402864db0e2c694a48c079f97" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "21cada0c4349bfc09a426f2616e4f881ef42d6625d46120d65f95394e2e36fb2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "779a6fdb3c0f2e6510bd57178035273a0f9646f5040d7a5f62c71b6acfe40242" + sha256 cellar: :any_skip_relocation, sonoma: "61036a4e637cedfd6552216797444bf1bf0cbd1d2904fa45be32ac595cfbcb78" + sha256 cellar: :any_skip_relocation, ventura: "42429a6a91e2d1f963559a9c618397be4ab0fbd70e206c599e49acab065cdff4" + sha256 cellar: :any_skip_relocation, arm64_linux: "80fe3aabca5af968a98011d4eafacf571e107ef9650342a293f9585de3980009" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84ad345fa48b2ea4a6e62145423924a9f4112f10b1cfd1f765bdb7b3531d56c5" + end + + depends_on "pandoc" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + system "pandoc", "-s", "-f", "markdown", "-t", "man", + "doc/hexyl.1.md", "-o", "hexyl.1" + man1.install "hexyl.1" + end + + test do + pdf = test_fixtures("test.pdf") + output = shell_output("#{bin}/hexyl -n 100 #{pdf}") + assert_match "00000000", output + end +end diff --git a/Formula/h/hey.rb b/Formula/h/hey.rb new file mode 100644 index 0000000000000..105fdde30634c --- /dev/null +++ b/Formula/h/hey.rb @@ -0,0 +1,39 @@ +class Hey < Formula + desc "HTTP load generator, ApacheBench (ab) replacement" + homepage "https://github.com/rakyll/hey" + url "https://github.com/rakyll/hey/archive/refs/tags/v0.1.4.tar.gz" + sha256 "944097e62dd0bd5012d3b355d9fe2e7b7afcf13cc0b2c06151e0f4c2babfc279" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "11d051b5a740c4932cdbb39fa8e3abb465b499b0dd24831b0649fc37fb9da5a2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7240c725e9276fc11ea1a59f748219c34b26ef36fa299644cc676ebd459b92ca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "04967df199323ca6ba0df1731c05185bdba45fb9379369608e2ba43806f6bf40" + sha256 cellar: :any_skip_relocation, arm64_monterey: "31facd23bb601b3b20819401fd535eb3415ae7849c3989923226e368897c3248" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "45175c81eb26b54fcf4b865e97a3a075ea12a85657884aaf78d2626ee07232fe" + sha256 cellar: :any_skip_relocation, sonoma: "ce33b37c801d64c65b13f7a1d7e9c8f84bfb9cff54fbfca2656cea9884c0f021" + sha256 cellar: :any_skip_relocation, ventura: "a4b5c5c6bfe7adc7c696feb4873346f2054ee268a04c483e2a29510d5b8c5d9a" + sha256 cellar: :any_skip_relocation, monterey: "55e5e3fa15f75e97aae934d9e86319d54af49275eef765241b05415e608c2791" + sha256 cellar: :any_skip_relocation, big_sur: "4a743f02a2abfd8fa424bb9ddc8b65ba3633f6b3b7b216da6763a5fe95c10501" + sha256 cellar: :any_skip_relocation, catalina: "972cc3f6a520467db11ab9cef3aa5311c6813c203c23bb0173363a00a45cfc07" + sha256 cellar: :any_skip_relocation, mojave: "af9934ac04900c142879a97bcc9b376e25f4928239c0bb9bd68fdad0e4174ead" + sha256 cellar: :any_skip_relocation, high_sierra: "67fbe5a4b3574ea9025607e02b56c49572d4f184bcf1ae49fb5cb3eb05ede26c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5454552b0eb8d412645a0a5211b0566a41d13fc238149177bfddea36ace56e4" + end + + # no commits over the past four years + # community discussion thread, https://github.com/rakyll/hey/issues/269 + # `oha` is a good alternative + deprecate! date: "2025-01-12", because: :unmaintained + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + output = "[200] 200 responses" + assert_match output.to_s, shell_output("#{bin}/hey https://example.com") + end +end diff --git a/Formula/h/hfstospell.rb b/Formula/h/hfstospell.rb new file mode 100644 index 0000000000000..5884e98315246 --- /dev/null +++ b/Formula/h/hfstospell.rb @@ -0,0 +1,40 @@ +class Hfstospell < Formula + desc "Helsinki Finite-State Technology ospell" + homepage "https://hfst.github.io/" + url "https://github.com/hfst/hfst-ospell/releases/download/v0.5.4/hfst-ospell-0.5.4.tar.bz2" + sha256 "ab644c802f813a06a406656c3a873d31f6a999e13cafc9df68b03e76714eae0e" + license "Apache-2.0" + revision 4 + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "512a7ec1987a6ea4ba00e0e97744fe569cf086f8599fc1116d3a286430e51b82" + sha256 cellar: :any, arm64_sonoma: "b9620e78ab2a3afaa6dbfeeb225da7e9f1e5da55a0bf82e8bff66bf51a1c6bdb" + sha256 cellar: :any, arm64_ventura: "68701bdb5dbcfc7e2874ed38329b15851fac68b5ffd6a9b4cd52017d63490f20" + sha256 cellar: :any, sonoma: "fd2830d383ff448efa33c3061360e7f95226c985a50cb01780f2220de2e1d1f5" + sha256 cellar: :any, ventura: "1f4cc82befe7f5e77bb255468434d980c15baa8b9eca1fd7a67003dcbdb17e8c" + sha256 cellar: :any_skip_relocation, arm64_linux: "42b8d7e3e410a5e31d3ddbe7f7954191e7dd4fb367018b8e80182befa52e5081" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87395934d55bf05dbd13fa44c20c36d417a883bfb1080ca2fdb5b03be5237e8d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + depends_on "libarchive" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", "--without-libxmlpp", *std_configure_args + system "make", "install" + end + + test do + system bin/"hfst-ospell", "--version" + end +end diff --git a/Formula/h/hfsutils.rb b/Formula/h/hfsutils.rb new file mode 100644 index 0000000000000..560db3458999d --- /dev/null +++ b/Formula/h/hfsutils.rb @@ -0,0 +1,48 @@ +class Hfsutils < Formula + desc "Tools for reading and writing Macintosh volumes" + homepage "https://www.mars.org/home/rob/proj/hfs/" + url "https://ftp.osuosl.org/pub/clfs/conglomeration/hfsutils/hfsutils-3.2.6.tar.gz" + mirror "https://fossies.org/linux/misc/old/hfsutils-3.2.6.tar.gz" + sha256 "bc9d22d6d252b920ec9cdf18e00b7655a6189b3f34f42e58d5bb152957289840" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2a486e1123355f24eb17dd33821edbfa4c9f7f505ffa9009f8380a0000b4f45f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d2cb41e60bac6d99365b3efc77078c76f6d13c92d9cc5413065db01f739a8c9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a8245a9a524d4f34c9a005a09a56f6d190ec20583c43fb8c1317fbc13827fc37" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4d74c98e3e180254629b1dbcf8898a6de9167d28feaabed35b76d3aebcf84b5b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "107acc6f2b286756c2d74d4973eb367071d53ed4271aabfcdde504818f2458ed" + sha256 cellar: :any_skip_relocation, sonoma: "f0e5cc460ae549e009fa87ccb3da5d0c369cf36f702219d126b395c144f07bb8" + sha256 cellar: :any_skip_relocation, ventura: "cf4d77dfdb1ede0dc9b5cbdeba835284926b201d5f8afc7830d7fb59bb68b39f" + sha256 cellar: :any_skip_relocation, monterey: "6ae0944174c9dd94812396503c259d281061fa2706f610b03d538d9e502b17c7" + sha256 cellar: :any_skip_relocation, big_sur: "133b4b04a161486e76ca06ed4e78086a83ce7ed238b10b879f78a93d66d9dc68" + sha256 cellar: :any_skip_relocation, catalina: "5a0e074c5fdcfb43508e049941dd5d7384a7f4843c8d0fe3df325880a45823fd" + sha256 cellar: :any_skip_relocation, mojave: "f32eb0e176bc5f5939a12599f0dbc808631a7680e21b5f820cc096e00fcec46e" + sha256 cellar: :any_skip_relocation, arm64_linux: "884c03ae82783f8f238c85d784850ca15dfbf5a92c8d0948412551e850051111" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec4614155fc7221a5410f47eac547e8c6c906bfa9965acfc03433fee57a997c9" + end + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + # hpwd.c:55:7: error: call to undeclared library function 'strcmp' with type 'int (const char *, const char *)'; + # ISO C99 and later do not support implicit function declarations + # Notified the author via email on 2023-01-05 + inreplace "hpwd.c", "# include \n", "# include \n# include \n" + + system "./configure", "--mandir=#{man}", *std_configure_args + bin.mkpath + man1.mkpath + system "make", "install" + end + + test do + system "dd", "if=/dev/zero", "of=disk.hfs", "bs=1k", "count=800" + system bin/"hformat", "-l", "Test Disk", "disk.hfs" + output = shell_output("#{bin}/hmount disk.hfs") + assert_match(/^Volume name is "Test Disk"$/, output) + assert_match(/^Volume has 803840 bytes free$/, output) + end +end diff --git a/Formula/h/hg-fast-export.rb b/Formula/h/hg-fast-export.rb new file mode 100644 index 0000000000000..313f803f3d37b --- /dev/null +++ b/Formula/h/hg-fast-export.rb @@ -0,0 +1,53 @@ +class HgFastExport < Formula + include Language::Python::Shebang + + desc "Fast Mercurial to Git converter" + homepage "https://repo.or.cz/fast-export.git" + url "https://github.com/frej/fast-export/archive/refs/tags/v250330.tar.gz" + sha256 "1c4785f1e9e63e0ada87e0be5a7236d6889eea98975800671e3c3805b54bf801" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b1030f2a360f970ad4d58c661adb4793be8e4abcf4f602e0d0e217a601542e0b" + end + + depends_on "mercurial" + depends_on "python@3.13" + + def install + # The Python executable is tested from PATH + # Prepend ours Python to the executable candidate list (python2 python python3) + # See https://github.com/Homebrew/homebrew-core/pull/90709#issuecomment-988548657 + %w[hg-fast-export.sh hg-reset.sh].each do |f| + inreplace f, "for python_cmd in ", + "for python_cmd in '#{which("python3.13")}' " + end + + libexec.install Dir["*"] + + %w[hg-fast-export.py hg-fast-export.sh hg-reset.py hg-reset.sh hg2git.py].each do |f| + rewrite_shebang detected_python_shebang, libexec/f + bin.install_symlink libexec/f + end + end + + test do + mkdir testpath/"hg-repo" do + system "hg", "init" + (testpath/"hg-repo/test.txt").write "Hello" + system "hg", "add", "test.txt" + system "hg", "commit", "-u", "test@test", "-m", "test" + end + + mkdir testpath/"git-repo" do + system "git", "config", "--global", "init.defaultBranch", "master" + system "git", "init" + system "git", "config", "core.ignoreCase", "false" + system bin/"hg-fast-export.sh", "-r", "#{testpath}/hg-repo" + system "git", "checkout", "HEAD" + end + + assert_path_exists testpath/"git-repo/test.txt" + assert_equal "Hello", (testpath/"git-repo/test.txt").read + end +end diff --git a/Formula/h/hgrep.rb b/Formula/h/hgrep.rb new file mode 100644 index 0000000000000..5e2dc804efbe4 --- /dev/null +++ b/Formula/h/hgrep.rb @@ -0,0 +1,32 @@ +class Hgrep < Formula + desc "Grep with human-friendly search results" + homepage "https://github.com/rhysd/hgrep" + url "https://github.com/rhysd/hgrep/archive/refs/tags/v0.3.8.tar.gz" + sha256 "a8c554bab136be4083429e97a41d70b8cabcdf113ac3a2ce6c801b5c8710d1d2" + license "MIT" + head "https://github.com/rhysd/hgrep.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bdc73fc805440e15b720a25825a116fe80353b8b7169932f6fdd0b2d15259184" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d49c3f35512cd5f2c75ee590bd320c5a4d24785181319e00b63e08be3af99280" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9df4b9b5224a7972f504d5c34ba609ee631abb70a2ae1749753a4dd50216b3a7" + sha256 cellar: :any_skip_relocation, sonoma: "a874051334cff79a342cfae5c56daebfd5d0f4c78e8d32ab0290e456b980eebb" + sha256 cellar: :any_skip_relocation, ventura: "1f2b68a3c41557c21771eb8d59946310a58f2df48aa505c0e9e8f2b0e9e4f07e" + sha256 cellar: :any_skip_relocation, arm64_linux: "016725006c81ba59a24815bdc72a82bea7b912ad346d0770658bb8bc3399188e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "471b142b6b7286f5f3a0240fe951dc555cd29be2a5233a95af1fd08983673c18" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"hgrep", "--generate-completion-script") + end + + test do + assert_match version.to_s, shell_output("#{bin}/hgrep --version") + (testpath/"test").write("Hello, world!") + system bin/"hgrep", "Hello" + end +end diff --git a/Formula/h/hickory-dns.rb b/Formula/h/hickory-dns.rb new file mode 100644 index 0000000000000..25ca578543f0f --- /dev/null +++ b/Formula/h/hickory-dns.rb @@ -0,0 +1,49 @@ +class HickoryDns < Formula + desc "Rust based DNS client, server, and resolver" + homepage "https://github.com/hickory-dns/hickory-dns" + url "https://github.com/hickory-dns/hickory-dns/archive/refs/tags/v0.25.2.tar.gz" + sha256 "b4f4b3ff1cbefd1023c6e2b96b3db237e051e4b6c3596cafb310da4901212e58" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/hickory-dns/hickory-dns.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f8f589615fd4ae0e19b330aebf7c932480fd246e2e890e263cb091c9deb3229c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e4641077055a67a0cf03f1a91f7b08e3ce543fd357b546fa23ecac969117eaec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "898885c68864696ba13319a1d7d5b079d6e2c3dc535cce904d0d1b95d24f3cbd" + sha256 cellar: :any_skip_relocation, sonoma: "93208fe97224110bb8ff4638f3ee46936701f6a25d219e8b85a0b08224aaa343" + sha256 cellar: :any_skip_relocation, ventura: "382b24e7db321eca7f60bd4c0b35994413ff9022e42b9d685a4fe63def240cbd" + sha256 cellar: :any_skip_relocation, arm64_linux: "cffb447b25434f6d148933f632a8445b5dfbcaf5208f195707b21348be3ad0ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5a06249c3bc754dac00f8f5924b864dd2658476c309d82c38a82b6ddefee282" + end + + depends_on "rust" => :build + + on_linux do + depends_on "bind" => :test # for `dig` + end + + def install + system "cargo", "install", *std_cargo_args(path: "bin") + pkgshare.install "tests/test-data" + end + + test do + test_port = free_port + cp_r pkgshare/"test-data", testpath + test_config_path = testpath/"test-data/test_configs" + example_config = test_config_path/"example.toml" + + pid = fork do + exec bin/"hickory-dns", "-c", example_config, "-z", test_config_path, "-p", test_port.to_s + end + sleep 2 + output = shell_output("dig @127.0.0.1 -p #{test_port} www.example.com") + expected = "www.example.com. 86400 IN A 127.0.0.1" + assert_match expected, output + + assert_match "Hickory DNS named server #{version}", shell_output("#{bin}/hickory-dns --version") + ensure + Process.kill "SIGTERM", pid + Process.wait pid + end +end diff --git a/Formula/h/hicolor-icon-theme.rb b/Formula/h/hicolor-icon-theme.rb new file mode 100644 index 0000000000000..7e18950f84e63 --- /dev/null +++ b/Formula/h/hicolor-icon-theme.rb @@ -0,0 +1,32 @@ +class HicolorIconTheme < Formula + desc "Fallback theme for FreeDesktop.org icon themes" + homepage "https://wiki.freedesktop.org/www/Software/icon-theme/" + url "https://icon-theme.freedesktop.org/releases/hicolor-icon-theme-0.18.tar.xz" + sha256 "db0e50a80aa3bf64bb45cbca5cf9f75efd9348cf2ac690b907435238c3cf81d7" + license "GPL-2.0-only" + head "https://gitlab.freedesktop.org/xdg/default-icon-theme.git", branch: "master" + + # The homepage hasn't been updated to link to more recent versions, so we + # have to check the directory listing page instead. + livecheck do + url "https://icon-theme.freedesktop.org/releases/" + regex(/href=.*?hicolor-icon-theme[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "76779247990b538d304e98b042fde85677491e428d0381a59383264ce8ef199f" + 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 + assert_path_exists share/"icons/hicolor/index.theme" + end +end diff --git a/Formula/h/hidapi.rb b/Formula/h/hidapi.rb new file mode 100644 index 0000000000000..ef366da0701b6 --- /dev/null +++ b/Formula/h/hidapi.rb @@ -0,0 +1,59 @@ +class Hidapi < Formula + desc "Library for communicating with USB and Bluetooth HID devices" + homepage "https://github.com/libusb/hidapi" + url "https://github.com/libusb/hidapi/archive/refs/tags/hidapi-0.14.0.tar.gz" + sha256 "a5714234abe6e1f53647dd8cba7d69f65f71c558b7896ed218864ffcf405bcbd" + license any_of: ["GPL-3.0-only", "BSD-3-Clause", "HIDAPI"] + head "https://github.com/libusb/hidapi.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ed4edcb94c18b6f2dfe35b9642a92bfb9198258e7c195d5100b1f84d7e9c0f41" + sha256 cellar: :any, arm64_sonoma: "8f665c92f1b3012852243abfc40b427cba3d4e581070cd4f2d8fa5dd185dd4d5" + sha256 cellar: :any, arm64_ventura: "a51ee174536f9f73d398c2b6a998df28c812a5baac14e4f07e8bb17c846d53cf" + sha256 cellar: :any, arm64_monterey: "4330e0a273dcb943f27e2be002fad07c385737bd308478b73bf24be2898c9bf5" + sha256 cellar: :any, arm64_big_sur: "18184e80f9d6ce6e702068b67d4e887dbb28d3fb753c379b6e97c6fbed3cdf97" + sha256 cellar: :any, sonoma: "3250f61ca23b7654de19d272869f70b15b9227dcdf449610b44af13286d32dc6" + sha256 cellar: :any, ventura: "7198e6d7a9946aa995eee2dcb7595dddb362aa5ed3ed5bcc7b3eeb08fb5cb9e4" + sha256 cellar: :any, monterey: "94a5ead30ea58235a8e1cfe884f55c10756efdd580954e1b0565f2298f9f0376" + sha256 cellar: :any, big_sur: "7c131edf18d63b5cc8844cda43f8347808a5fd4668739b577c2d1a72f779df4f" + sha256 cellar: :any_skip_relocation, arm64_linux: "41a1f24c942d2481bb0ffa64c68ba664be5eb45108a21019925e8688b0bbc6df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8c0fe481208e93135393bb11e970917dd10438ccfdbc180bc5efb97aec7ce52" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + on_linux do + depends_on "libusb" + depends_on "systemd" # for libudev + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DHIDAPI_BUILD_HIDTEST=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include "hidapi.h" + int main(void) + { + return hid_exit(); + } + C + + flags = ["-I#{include}/hidapi", "-L#{lib}"] + flags << if OS.mac? + "-lhidapi" + else + "-lhidapi-hidraw" + end + flags += ENV.cflags.to_s.split + system ENV.cc, "-o", "test", "test.c", *flags + system "./test" + end +end diff --git a/Formula/h/highlight.rb b/Formula/h/highlight.rb new file mode 100644 index 0000000000000..046a5e6f5d81a --- /dev/null +++ b/Formula/h/highlight.rb @@ -0,0 +1,37 @@ +class Highlight < Formula + desc "Convert source code to formatted text with syntax highlighting" + homepage "http://andre-simon.de/doku/highlight/en/highlight.php" + url "http://andre-simon.de/zip/highlight-4.15.tar.bz2" + sha256 "68b3f8178c5c9d4b0a03f6948635cef1c8d06244f6b438eebf3a190c588337e9" + license "GPL-3.0-or-later" + head "https://gitlab.com/saalen/highlight.git", branch: "master" + + livecheck do + url "http://andre-simon.de/zip/download.php" + regex(/href=.*?highlight[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "ff999afeca53826467b3b2ffd96e65716fa8a8e51a59c9be07666517828f93e1" + sha256 arm64_sonoma: "5d3477115be405359748090729b3ebfe31cb9dc0811fcd5655789527a4b52fba" + sha256 arm64_ventura: "3555236122462cedf6214f1f16f29d8867351fd3769fb3bcbfc7bed2af8f4476" + sha256 sonoma: "171ae8debcdaeb6f04cd6a591c18b5edf12481334baa35fd5e6d88a25e85ba5e" + sha256 ventura: "3b72f161f5978f8c565fad920a41252ac17106e79ce342984a80ffe0caaefe00" + sha256 arm64_linux: "a1de5fb88c5ff05d3977173bc2901ad2dcbdf8311859a9d4f21f681262a07586" + sha256 x86_64_linux: "52594457b5a8a77269f061bd6fae2a973afcba2b71a91a285d57de2dbaf135a1" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + depends_on "lua" + + def install + conf_dir = etc/"highlight/" # highlight needs a final / for conf_dir + system "make", "PREFIX=#{prefix}", "conf_dir=#{conf_dir}" + system "make", "PREFIX=#{prefix}", "conf_dir=#{conf_dir}", "install" + end + + test do + system bin/"highlight", doc/"extras/highlight_pipe.php" + end +end diff --git a/Formula/h/highs.rb b/Formula/h/highs.rb new file mode 100644 index 0000000000000..7c2aba17e4cd4 --- /dev/null +++ b/Formula/h/highs.rb @@ -0,0 +1,48 @@ +class Highs < Formula + desc "Linear optimization software" + homepage "https://www.maths.ed.ac.uk/hall/HiGHS/" + url "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.10.0.tar.gz" + sha256 "cf29873b894133bac111fc45bbf10989b6c5c041992fcd10e31222253e371a4c" + license "MIT" + + # 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, arm64_sequoia: "119488a2ba901dadad44f18523a0f3d95c9b2ddf8ef4813d5e6dcf9ff6042e81" + sha256 cellar: :any, arm64_sonoma: "29deeb714569915e5102ff6fcc8fd31a88d2c1f658047fb056bded24328c78e2" + sha256 cellar: :any, arm64_ventura: "8c8e22fc0e5d246880e232ca0360e1aafde2d3f6d53a893195fc8eeeb2a9b4b6" + sha256 cellar: :any, sonoma: "477a2610423ff1509ee37a45879861e7cd92d067a582b5e65f9216a29e0ea09b" + sha256 cellar: :any, ventura: "2d47d187c483c4e3c3a60f4fad733a55b7fe3b8b3e62aa2999144fd4d2808156" + sha256 cellar: :any_skip_relocation, arm64_linux: "7c60abb5e3d3a231de96c15abc55cf7f21d7cf22d17189ff03809ac2d5409908" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef7a0c25e31afe2edf9707ddec00c82b66389631377ed30baf43a11e475dcc67" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "check", "examples" + end + + test do + output = shell_output("#{bin}/highs #{pkgshare}/check/instances/test.mps") + assert_match "Optimal", output + + cp pkgshare/"examples/call_highs_from_cpp.cpp", testpath/"test.cpp" + system ENV.cxx, "-std=c++11", "test.cpp", "-I#{include}/highs", "-L#{lib}", "-lhighs", "-o", "test" + assert_match "Optimal", shell_output("./test") + end +end diff --git a/Formula/h/highway.rb b/Formula/h/highway.rb new file mode 100644 index 0000000000000..ddd55faec154e --- /dev/null +++ b/Formula/h/highway.rb @@ -0,0 +1,68 @@ +class Highway < Formula + desc "Performance-portable, length-agnostic SIMD with runtime dispatch" + homepage "https://github.com/google/highway" + url "https://github.com/google/highway/archive/refs/tags/1.2.0.tar.gz" + sha256 "7e0be78b8318e8bdbf6fa545d2ecb4c90f947df03f7aadc42c1967f019e63343" + license "Apache-2.0" + head "https://github.com/google/highway.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "8a3327629482279fdff46b5bf3324cb6379a975b271d1ecc4a901a3cdb7e7f5a" + sha256 cellar: :any, arm64_sonoma: "406c96cf28555eb84e1c67788db50223a6af2fd488ce91e831068e60981d128a" + sha256 cellar: :any, arm64_ventura: "26b4d20fb463b4a30a66a9bb8bf0e6bdac663b6c2ffe741652e671d20142a07b" + sha256 cellar: :any, arm64_monterey: "7895ad60eb76fe27a6e954f30f00db408883a5fc90965d8802b6094d62b98bff" + sha256 cellar: :any, sonoma: "dd94650f29c85c1e1ed4343d1b3689161671586d2c19d14a42409c383ff0f456" + sha256 cellar: :any, ventura: "30ed68093b0816c5f0de2e504c299fb0981004b165dc75cae08a669f7cecfbbe" + sha256 cellar: :any, monterey: "4f27b99b7df6a54abf3aad7e2636f8947001518a057f385920f5d3c26b742e00" + sha256 cellar: :any_skip_relocation, arm64_linux: "2396e123e8890890de1977e2991632fead58fd6bbd427aa27d343755f24417c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7dfee6723c0915e37b9253347c24bca7a2e37f0823a2e2883449c58a77ff32b6" + end + + depends_on "cmake" => :build + + # These used to be bundled with `jpeg-xl`. + link_overwrite "include/hwy/*", "lib/pkgconfig/libhwy*" + + # Avoid compiling ARM SVE on Apple Silicon + # Issue ref: https://github.com/google/highway/issues/2317 + patch :DATA + + def install + ENV.runtime_cpu_detection + system "cmake", "-S", ".", "-B", "builddir", + "-DBUILD_SHARED_LIBS=ON", + "-DHWY_ENABLE_TESTS=OFF", + "-DHWY_ENABLE_EXAMPLES=OFF", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + (share/"hwy").install "hwy/examples" + end + + test do + system ENV.cxx, "-std=c++11", "-I#{share}", "-I#{include}", + share/"hwy/examples/benchmark.cc", "-L#{lib}", "-lhwy" + system "./a.out" + end +end + +__END__ +diff --git a/hwy/detect_targets.h b/hwy/detect_targets.h +index a8d4a13f..e0ffb33a 100644 +--- a/hwy/detect_targets.h ++++ b/hwy/detect_targets.h +@@ -223,8 +223,12 @@ + #endif + + // SVE[2] require recent clang or gcc versions. ++// ++// SVE is not supported on Apple arm64 CPUs and also crashes the compiler: ++// https://github.com/llvm/llvm-project/issues/97198 + #if (HWY_COMPILER_CLANG && HWY_COMPILER_CLANG < 1100) || \ +- (HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1000) ++ (HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1000) || \ ++ (HWY_OS_APPLE && HWY_ARCH_ARM_A64) + #define HWY_BROKEN_SVE (HWY_SVE | HWY_SVE2 | HWY_SVE_256 | HWY_SVE2_128) + #else + #define HWY_BROKEN_SVE 0 diff --git a/Formula/h/hilite.rb b/Formula/h/hilite.rb new file mode 100644 index 0000000000000..7a6acf4c7ca2e --- /dev/null +++ b/Formula/h/hilite.rb @@ -0,0 +1,35 @@ +class Hilite < Formula + desc "CLI tool that runs a command and highlights STDERR output" + homepage "https://sourceforge.net/projects/hilite/" + url "https://downloads.sourceforge.net/project/hilite/hilite/1.5/hilite.c" + sha256 "e15bdff2605e8d23832d6828a62194ca26dedab691c9d75df2877468c2f6aaeb" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f3535152f7fa6b54957f00de4158dd790073c81737140ae90c16cbda8d37ba51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "428126844c77fdfab8f4d4d007a3e5c2a743511b4005e71f91b74a4a162836d1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8d2fa393a2cd13f75d3793c7d543ae3fd5a053cdfdd82ac722015912618fa596" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4f3e960b26ed8e81acab99dd342d1e2946b1ec8003fb99dd65b91add5af31c93" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b4095517387a97c332c1acb88969995248ee95d2c29483e56ed7e47bbb8ca721" + sha256 cellar: :any_skip_relocation, sonoma: "1419bc243a91c8c7f71649cdeb80843940133dd48b0f26d475db261fd7af8571" + sha256 cellar: :any_skip_relocation, ventura: "5316dcf6b7f26ecf9a6149a3db6026a9b1c467f35af63e2dcd499f0262c3db52" + sha256 cellar: :any_skip_relocation, monterey: "5c5bf78c282a2858319b08bcfcc65af8be02431aeae83ac6654b32cc7c3bb605" + sha256 cellar: :any_skip_relocation, big_sur: "3f3139534dda449285ab33db2042a264bc553b7efa47ac86507b598c50a5a2d7" + sha256 cellar: :any_skip_relocation, catalina: "31205045cec574039eca74d90f2701191f1192726943e5f7bbc37d1081e21c3e" + sha256 cellar: :any_skip_relocation, mojave: "0b25a0fe83ce681fab4f9a0a3f7989528387e299cd6fc507eeb9b24e8f2b1490" + sha256 cellar: :any_skip_relocation, high_sierra: "0266c20b3be69d398a14f1cb9332d34fe9ffca36c827b6e3681b636c0eab6073" + sha256 cellar: :any_skip_relocation, sierra: "b4bab9fd50310b7401d2605b9a9cdad0a8d7069e5b477d5f53fef61847bea624" + sha256 cellar: :any_skip_relocation, el_capitan: "2c407d12952089ade6602be85acda46eceb3127e32ba2068c0034df8a486e989" + sha256 cellar: :any_skip_relocation, arm64_linux: "1da54468f24162b4804bcca235bce6c1320c722fd9d5c1dfde11e71885bde309" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45f0c131886b8932ee87061c612877ff71fa38650e81340eab5694de95e6cb40" + end + + def install + system ENV.cc, "hilite.c", "-o", "hilite", *ENV.cflags.to_s.split + bin.install "hilite" + end + + test do + system bin/"hilite", "bash", "-c", "echo 'stderr in red' >&2" + end +end diff --git a/Formula/h/himalaya.rb b/Formula/h/himalaya.rb new file mode 100644 index 0000000000000..ebefa98a71d03 --- /dev/null +++ b/Formula/h/himalaya.rb @@ -0,0 +1,68 @@ +class Himalaya < Formula + desc "CLI email client written in Rust" + homepage "https://github.com/pimalaya/himalaya" + url "https://github.com/pimalaya/himalaya/archive/refs/tags/v1.1.0.tar.gz" + sha256 "bc5ee10ebdb23ea205215650070373dc591f083a96b1d6d038aa23a105256f94" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c4faaa05c76bc7dd4d2423479e34af0cff58aba3f95bcd5a96ee6b154326460d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9194d490d1c2356183427ebe2762a813661535944d34daa63e2d75d976ef6bbd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0ef6045f2bf47e807661cf800ff036e9df0c2e99fcea5e7d00ba0bed15a0160e" + sha256 cellar: :any_skip_relocation, sonoma: "a2782ddbd515580d4ce47d939155d31b3bf744500ef566c771d839bc32b05f5f" + sha256 cellar: :any_skip_relocation, ventura: "159ef73b0f7b1fbca6cd8a509a993b7d18df156eddce6b04ad5e22360343d35f" + sha256 cellar: :any_skip_relocation, arm64_linux: "84fa7f497a0ad4b0538f9891058ed21051e906a48fcd2dbef55aa49cad570f28" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b564756c788cadcae7e27532be8008896bf3cf742c7b5f9c861f966576364df4" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + # revert `cc` crate to 1.2.7, upstream pr ref, https://github.com/pimalaya/himalaya/pull/542 + patch do + url "https://github.com/pimalaya/himalaya/commit/ea70e7c123fd8b30e5b36ab62bfcfafa63779797.patch?full_index=1" + sha256 "44e8c415819272971787761f285be397ddc384a4230890bf1c8494c786b45373" + end + + def install + system "cargo", "install", *std_cargo_args + + system bin/"himalaya", "man", buildpath + man1.install Dir["*.1"] + generate_completions_from_executable(bin/"himalaya", "completion") + end + + test do + # See https://github.com/pimalaya/himalaya#configuration + (testpath/".config/himalaya/config.toml").write <<~TOML + [accounts.gmail] + default = true + email = "example@gmail.com" + + folder.alias.inbox = "INBOX" + folder.alias.sent = "[Gmail]/Sent Mail" + folder.alias.drafts = "[Gmail]/Drafts" + folder.alias.trash = "[Gmail]/Trash" + + backend.type = "imap" + backend.host = "imap.gmail.com" + backend.port = 993 + backend.login = "example@gmail.com" + backend.auth.type = "password" + backend.auth.raw = "*****" + + message.send.backend.type = "smtp" + message.send.backend.host = "smtp.gmail.com" + message.send.backend.port = 465 + message.send.backend.login = "example@gmail.com" + message.send.backend.auth.type = "password" + message.send.backend.auth.cmd = "*****" + TOML + + assert_match "cannot authenticate to IMAP server", shell_output(bin/"himalaya 2>&1", 1) + end +end diff --git a/Formula/h/hiredis.rb b/Formula/h/hiredis.rb new file mode 100644 index 0000000000000..e0d15d9db7a45 --- /dev/null +++ b/Formula/h/hiredis.rb @@ -0,0 +1,33 @@ +class Hiredis < Formula + desc "Minimalistic client for Redis" + homepage "https://github.com/redis/hiredis" + url "https://github.com/redis/hiredis/archive/refs/tags/v1.3.0.tar.gz" + sha256 "25cee4500f359cf5cad3b51ed62059aadfc0939b05150c1f19c7e2829123631c" + license "BSD-3-Clause" + head "https://github.com/redis/hiredis.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d3bb6a7fd40584c74321d404d0c459f11e3d612c329a5f95367c372cb21bbdca" + sha256 cellar: :any, arm64_sonoma: "68e9423a13a8c5dc27884296ec0ee6ab25930aaa85d3b6e5e8726855fd864211" + sha256 cellar: :any, arm64_ventura: "fa65af1fbbc772155907ee6332c3a21c8780a3ce8491b762470d05cf3ae57c85" + sha256 cellar: :any, sonoma: "d7ed68aa281c0ccd51c7e28ffe6eef652478b7a03cd0e7ffd239cdd54f9412c6" + sha256 cellar: :any, ventura: "d08d4992b894522efb41ad2f502a1fa4b0e48b7a3ada25a87c7b73a03bbb6cfb" + sha256 cellar: :any_skip_relocation, arm64_linux: "0760d1e33d3c044724b3c8c1053514f85a6fc12d55edfa3745cec4ed5dcf0fa3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0280a87a599747410042bebf2811c9c20bbe2ca577e066daa784a5ad5e1ffa31" + end + + depends_on "openssl@3" + + def install + system "make", "install", "PREFIX=#{prefix}", "USE_SSL=1" + pkgshare.install "examples" + end + + test do + # running `./test` requires a database to connect to, so just make + # sure it compiles + system ENV.cc, pkgshare/"examples/example.c", "-o", testpath/"test", + "-I#{include}/hiredis", "-L#{lib}", "-lhiredis" + assert_path_exists testpath/"test" + end +end diff --git a/Formula/h/hishtory.rb b/Formula/h/hishtory.rb new file mode 100644 index 0000000000000..2203e3bebedea --- /dev/null +++ b/Formula/h/hishtory.rb @@ -0,0 +1,44 @@ +class Hishtory < Formula + desc "Your shell history: synced, queryable, and in context" + homepage "https://hishtory.dev/" + url "https://github.com/ddworken/hishtory/archive/refs/tags/v0.335.tar.gz" + sha256 "f312acc99195ca035db7b6612408169ce3a14c170f85dba238f9a29ca7825a3d" + license "MIT" + head "https://github.com/ddworken/hishtory.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e34db19bb53a5227bdda758dd4511b3268bba2a5edf4e97ab312d96a164f8c24" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e34db19bb53a5227bdda758dd4511b3268bba2a5edf4e97ab312d96a164f8c24" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e34db19bb53a5227bdda758dd4511b3268bba2a5edf4e97ab312d96a164f8c24" + sha256 cellar: :any_skip_relocation, sonoma: "d98870cb4d2d3427a139d11dbc40b9e8d94bea42b3be326074fb72363c8bd1fa" + sha256 cellar: :any_skip_relocation, ventura: "c406a562034cc2bdd76625c79616e6bf7362857cd0964c13636d5660a241f1d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ff41cdcf4490c139d740a547cc565febf4326cc11d86ca2cd87eb49f615c73c" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/ddworken/hishtory/client/lib.Version=#{version} + -X github.com/ddworken/hishtory/client/lib.GitCommit=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"hishtory", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/hishtory --version") + + output = shell_output("#{bin}/hishtory init") + assert_match "Setting secret hishtory key", output + + assert_match "Enabled: true", shell_output("#{bin}/hishtory status") + end +end diff --git a/Formula/h/historian.rb b/Formula/h/historian.rb new file mode 100644 index 0000000000000..dd9956fb8bad2 --- /dev/null +++ b/Formula/h/historian.rb @@ -0,0 +1,27 @@ +class Historian < Formula + desc "Command-line utility for managing shell history in a SQLite database" + homepage "https://github.com/jcsalterego/historian" + url "https://github.com/jcsalterego/historian/archive/refs/tags/0.0.2.tar.gz" + sha256 "691b131290ddf06142a747755412115fec996cb9cc2ad8e8f728118788b3fe05" + license "BSD-2-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "189a00a7ac7714b8c9c9f5aa6691278538a072629bc6fa24ab99812d37b9e58d" + end + + uses_from_macos "sqlite" + + def install + bin.install "hist" + end + + test do + ENV["HISTORIAN_SRC"] = "test_history" + (testpath/"test_history").write <<~EOS + brew update + brew upgrade + EOS + system bin/"hist", "import" + end +end diff --git a/Formula/h/hive.rb b/Formula/h/hive.rb new file mode 100644 index 0000000000000..bb1e6517baea3 --- /dev/null +++ b/Formula/h/hive.rb @@ -0,0 +1,50 @@ +class Hive < Formula + desc "Hadoop-based data summarization, query, and analysis" + homepage "https://hive.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=hive/hive-4.0.1/apache-hive-4.0.1-bin.tar.gz" + mirror "https://archive.apache.org/dist/hive/hive-4.0.1/apache-hive-4.0.1-bin.tar.gz" + sha256 "2bf988a1ed17437b1103e367939c25a13f64d36cf6d1c3bef8c3f319f0067619" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "967f1273e5e14b787fb79b46fc2a8affb1cb09db6c0a6c7691aeca05343e3a96" + end + + depends_on "hadoop" + + # hive requires Java 8. + # Java 11 support ticket: https://issues.apache.org/jira/browse/HIVE-22415 + # Java 17 support ticket: https://issues.apache.org/jira/browse/HIVE-26473 + depends_on "openjdk@8" + + def install + libexec.install %w[bin conf examples hcatalog lib scripts] + + # Hadoop currently supplies a newer version + # and two versions on the classpath causes problems + rm libexec/"lib/guava-22.0.jar" + guava = (Formula["hadoop"].opt_libexec/"share/hadoop/common/lib").glob("guava-*-jre.jar") + ln_s guava.first, libexec/"lib" + + (libexec/"bin").each_child do |file| + next if file.directory? + + (bin/file.basename).write_env_script file, + JAVA_HOME: Formula["openjdk@8"].opt_prefix, + HADOOP_HOME: "${HADOOP_HOME:-#{Formula["hadoop"].opt_libexec}}", + HIVE_HOME: libexec + end + end + + def caveats + <<~EOS + If you want to use HCatalog with Pig, set $HCAT_HOME in your profile: + export HCAT_HOME=#{opt_libexec}/hcatalog + EOS + end + + test do + system bin/"schematool", "-initSchema", "-dbType", "derby" + assert_match "123", shell_output("#{bin}/beeline -u jdbc:hive2:// -e 'SELECT 123'") + end +end diff --git a/Formula/h/hivemind.rb b/Formula/h/hivemind.rb new file mode 100644 index 0000000000000..a2be81fae9413 --- /dev/null +++ b/Formula/h/hivemind.rb @@ -0,0 +1,34 @@ +class Hivemind < Formula + desc "Process manager for Procfile-based applications" + homepage "https://github.com/DarthSim/hivemind" + url "https://github.com/DarthSim/hivemind/archive/refs/tags/v1.1.0.tar.gz" + sha256 "b4f7259663ef5b99906af0d98fe4b964d8f9a4d86a8f5aff30ab8df305d3a996" + license "MIT" + head "https://github.com/DarthSim/hivemind.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "703f51c01ebed71957e5579c9c753b3090443312b6d6c69a019b0be10a6aa4b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f4aff69e5552065591bb76b91c80ee7ea9b072e32b339cf6d7fe658cc8e3d5f3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "607a7cc36605a2a8b01952dc7d5755995d57370cefa3ea320c77c893d1cd9e93" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f8ca06b6d2dde91c66cd6af2396a58b40e6be52e51fa738f24ff2e23376dc60a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f8ca06b6d2dde91c66cd6af2396a58b40e6be52e51fa738f24ff2e23376dc60a" + sha256 cellar: :any_skip_relocation, sonoma: "dbbd5d0316e6b88c627c0c06f9e5cffee12b1db773ee32f243c4dbf06e2c452c" + sha256 cellar: :any_skip_relocation, ventura: "026944b2be6f616212ad147c3b9ce9bba4a18929f8db3edcee75e2eda6abaa20" + sha256 cellar: :any_skip_relocation, monterey: "eaedb2b4739dc4e668ae9bf563750e1bb54fea1f16e800f6bf496226dc1daff0" + sha256 cellar: :any_skip_relocation, big_sur: "eaedb2b4739dc4e668ae9bf563750e1bb54fea1f16e800f6bf496226dc1daff0" + sha256 cellar: :any_skip_relocation, catalina: "eaedb2b4739dc4e668ae9bf563750e1bb54fea1f16e800f6bf496226dc1daff0" + sha256 cellar: :any_skip_relocation, arm64_linux: "59ded5a99d5aa39ca906ae688d9d57ef5407316329f662f2299ade76cec93e6b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c702f980c6b3a024c20bd50af65de981ab55b360e10013b22aa6797d834f7c85" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"Procfile").write("test: echo 'test message'") + assert_match "test message", shell_output(bin/"hivemind") + end +end diff --git a/Formula/h/hivex.rb b/Formula/h/hivex.rb new file mode 100644 index 0000000000000..70efa07019b82 --- /dev/null +++ b/Formula/h/hivex.rb @@ -0,0 +1,55 @@ +class Hivex < Formula + desc "Library and tools for extracting the contents of Windows Registry hive files" + homepage "https://libguestfs.org/" + url "https://download.libguestfs.org/hivex/hivex-1.3.24.tar.gz" + sha256 "a52fa45cecc9a78adb2d28605d68261e4f1fd4514a778a5473013d2ccc8a193c" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-only"] + + livecheck do + url "https://download.libguestfs.org/hivex/" + regex(/href=.*?hivex[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "56591673b746f964c9a11aa5d00f3f7414aecaf44189650e7542eef6796a56a5" + sha256 cellar: :any, arm64_sonoma: "fec44a3603f70ad668b8340f75d5c2efd21eec82d87dbdf9e7c6272f9e41ac87" + sha256 cellar: :any, arm64_ventura: "2788843263f4b80761e8c47fd4c565a2b17c740ea786b6d3c07a56cb548e9cc9" + sha256 cellar: :any, arm64_monterey: "4f43e6cb50e86f7035276b2f80d5f158329c3320caa06eef2f7b7cd25799584f" + sha256 cellar: :any, sonoma: "b02c58d064c1463fbb8375839a8a43d4511f9e7869f934e26dfd4471a3493b76" + sha256 cellar: :any, ventura: "be3ab0e828697756aef7048c02c6c9be7f2e05b7eb1445822931371f11309093" + sha256 cellar: :any, monterey: "bc1a776d2a57db7b102fb788d7b7c2a7fd3b6d753df57b4881c911c99a0c0928" + sha256 arm64_linux: "ae8bb40fdea46651ab1105f9c50c1bb1001809398414452f4ca597b0db5f8654" + sha256 x86_64_linux: "521ab163122aa40680fe0473ca6ea2f77fdb877ac4ef417dfff93eef66608a0b" + end + + depends_on "pkgconf" => :build + depends_on "readline" + + uses_from_macos "pod2man" => :build + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + # Use `-ld_classic` to work around `-Wl,-M` usage + ENV.append "LDFLAGS", "-Wl,-ld_classic" if DevelopmentTools.clang_build_version >= 1500 + + args = %w[ + --disable-ocaml + --disable-perl + --disable-python + --disable-ruby + --disable-silent-rules + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + (pkgshare/"test").install "images/large" + end + + test do + assert_equal "305419896", shell_output("#{bin}/hivexget #{pkgshare}/test/large 'A\\A giant' B").chomp + end +end diff --git a/Formula/h/hjson.rb b/Formula/h/hjson.rb new file mode 100644 index 0000000000000..fb91e1bbadb7c --- /dev/null +++ b/Formula/h/hjson.rb @@ -0,0 +1,99 @@ +class Hjson < Formula + desc "Convert JSON to HJSON and vice versa" + homepage "https://hjson.github.io/" + url "https://github.com/hjson/hjson-go/archive/refs/tags/v4.5.0.tar.gz" + sha256 "bd73ffdee391a51137544ca3fc0550a6d1e839d20088fe27bc20b2a79f7910b4" + license "MIT" + head "https://github.com/hjson/hjson-go.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "56b3481c44007e1c2bbe12d642ec95d55ecf79525580ce026ef1c26e9ad16fc2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "56b3481c44007e1c2bbe12d642ec95d55ecf79525580ce026ef1c26e9ad16fc2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "56b3481c44007e1c2bbe12d642ec95d55ecf79525580ce026ef1c26e9ad16fc2" + sha256 cellar: :any_skip_relocation, sonoma: "bcfc6613edc2126cad95c59980dc47d8efd368ad8ebfe19ba8fc644e45ef34cd" + sha256 cellar: :any_skip_relocation, ventura: "bcfc6613edc2126cad95c59980dc47d8efd368ad8ebfe19ba8fc644e45ef34cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "54c62c7a294556247b593ef0ccbdeb41e83086d141990ac6e9e00b5abe6d1bba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9daafea6f326b56f2922c76fc086e29ef65ac0ab49b8e7cfe660e9aa678c3ad9" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}"), "./hjson-cli" + end + + test do + assert_match version.to_s, shell_output("#{bin}/hjson -v") + + (testpath/"test.hjson").write <<~HJSON + { + # comment + // a comment too + /* + * multiline comments + */ + rate: 1000 + key: value + text: look ma, no quotes! + commas: + { + one: 1 + two: 2 + } + trailing: + { + one: 1 + two: 2 + } + haiku: + ''' + JSON I love you. + But you strangle my expression. + This is so much better. + ''' + favNumbers: + [ + 1 + 2 + 3 + 6 + 42 + ] + } + HJSON + + (testpath/"expected.json").write <<~JSON + { + commas: + { + one: 1 + two: 2 + } + favNumbers: + [ + 1 + 2 + 3 + 6 + 42 + ] + haiku: + ''' + JSON I love you. + But you strangle my expression. + This is so much better. + ''' + key: value + rate: 1000 + text: look ma, no quotes! + trailing: + { + one: 1 + two: 2 + } + } + JSON + + assert_equal (testpath/"expected.json").read, shell_output("#{bin}/hjson #{testpath}/test.hjson") + end +end diff --git a/Formula/h/hk.rb b/Formula/h/hk.rb new file mode 100644 index 0000000000000..c1b3ed0eaead1 --- /dev/null +++ b/Formula/h/hk.rb @@ -0,0 +1,60 @@ +class Hk < Formula + desc "Git hook and pre-commit lint manager" + homepage "https://hk.jdx.dev/" + url "https://github.com/jdx/hk/archive/refs/tags/v1.1.0.tar.gz" + sha256 "c2a338a8d9ed574ff2be84b5cc84a904bdf311e0c635736e4ac9cd2673c9fb3c" + license "MIT" + head "https://github.com/jdx/hk.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "40c6717baafe8d20a8c4ae9150ca357489ebdc92dd6dc56ac8efcd9ff775f81a" + sha256 cellar: :any, arm64_sonoma: "df5fb743251e5a5b7be64f3652e0e5d12e634cf9b2e74edd63b07f28ca4d7bf7" + sha256 cellar: :any, arm64_ventura: "61c68e54443ba445cda2dbfcd995976cc89102f2cd68e36202e5287191fd7b04" + sha256 cellar: :any, sonoma: "c5a73b3d27a0bb95fb60a0f19913ccc7c2eb3cadc3cc807192788f642c982ad6" + sha256 cellar: :any, ventura: "a554e87a809f7deb1baa78e18043ae9f99130852b67f1a94157c77af1b0c023e" + sha256 cellar: :any_skip_relocation, arm64_linux: "134e8cc2e90d5dad534421bd8196da6dc355db5d1273e4c37103e08375c022a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe872014624c193f20827165321607f6dbdc5a8ef163af6926e086fa39e47377" + end + + depends_on "rust" => [:build, :test] + + depends_on "openssl@3" + depends_on "pkl" + depends_on "usage" + + 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 + + generate_completions_from_executable(bin/"hk", "completion") + + pkgshare.install "pkl" + end + + test do + assert_match version.to_s, shell_output("#{bin}/hk --version") + + (testpath/"hk.pkl").write <<~PKL + amends "#{pkgshare}/pkl/Config.pkl" + import "#{pkgshare}/pkl/Builtins.pkl" + + hooks { + ["pre-commit"] { + steps = new { ["cargo-clippy"] = Builtins.cargo_clippy } + } + } + PKL + + system "cargo", "init", "--name=brew" + system "git", "add", "--all" + system "git", "commit", "-m", "Initial commit" + + output = shell_output("#{bin}/hk run pre-commit --all 2>&1") + assert_match "cargo-clippy", output + end +end diff --git a/Formula/h/hl.rb b/Formula/h/hl.rb new file mode 100644 index 0000000000000..41f55f38fc588 --- /dev/null +++ b/Formula/h/hl.rb @@ -0,0 +1,40 @@ +class Hl < Formula + desc "Fast and powerful log viewer and processor" + homepage "https://github.com/pamburus/hl" + url "https://github.com/pamburus/hl/archive/refs/tags/v0.31.1.tar.gz" + sha256 "98bba8014ad46a6c1be97a18064adc67a68d09cf55a13c4b8c1f65c516490d0b" + license "MIT" + head "https://github.com/pamburus/hl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5821234bc5173cdc2730a11649d5b452d30479fc4c6f7432dc5a2a4b0c8adc06" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "675996094b38b68904a661343b205d84aad93630753847d4a2c0998f956f0874" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e350ab70e49aaf3c57173a969c70afc3d768d1bc8dd483d6ee49bfd85e9a3db1" + sha256 cellar: :any_skip_relocation, sonoma: "e5fad8da88d8ee938ee5abc01bee9575e79170708aa00ef40848ac7803e08db0" + sha256 cellar: :any_skip_relocation, ventura: "b3d9d7d255cceb974790d468ec01fcf746974927a81f951cf9c6c625b2408489" + sha256 cellar: :any_skip_relocation, arm64_linux: "539421f6d4cabd513cc98ecdeeeb6c2fe196ffc5381b9afda8981705560a91ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1509a33864a41b18d451ee729e40fff332fb45075840dad1e8e69ba5c3aab66" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"hl", "--shell-completions") + (man1/"hl.1").write Utils.safe_popen_read(bin/"hl", "--man-page") + end + + test do + assert_match version.to_s, shell_output("#{bin}/hl --version") + + (testpath/"sample.log").write <<~EOS + time="2025-02-17 12:00:00" level=INFO msg="Starting process" + time="2025-02-17 12:01:00" level=ERROR msg="An error occurred" + time="2025-02-17 12:02:00" level=INFO msg="Process completed" + EOS + + output = shell_output("#{bin}/hl --level ERROR sample.log") + assert_equal "Feb 17 12:01:00.000 [ERR] An error occurred", output.chomp + end +end diff --git a/Formula/h/hledger.rb b/Formula/h/hledger.rb new file mode 100644 index 0000000000000..b0fbaf2c2d2b5 --- /dev/null +++ b/Formula/h/hledger.rb @@ -0,0 +1,46 @@ +class Hledger < Formula + desc "Easy plain text accounting with command-line, terminal and web UIs" + homepage "https://hledger.org/" + url "https://github.com/simonmichael/hledger/archive/refs/tags/1.42.1.tar.gz" + sha256 "4f1f51b3a9881f8916ee560ef6d59256e4a7b3dc41805a5cb72d9e32e9a3609d" + license "GPL-3.0-or-later" + head "https://github.com/simonmichael/hledger.git", branch: "master" + + # A new version is sometimes present on Hackage before it's officially + # released on the upstream homepage, so we check the first-party download + # page instead. + livecheck do + url "https://hledger.org/install.html" + regex(%r{href=.*?/tag/(?:hledger[._-])?v?(\d+(?:\.\d+)+)(?:#[^"' >]+?)?["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3f5ab7f6bab85b88efaf347acef94c022b3641c2693571b43edc55cc1fcea88e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b7f9ad75611a7c7a1e679936aebc6a102bf486de208220f32fb83793bdf2b43a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cf2be7014cae8f431a444f602c87140f53f84442f50f091c062fb42220454f59" + sha256 cellar: :any_skip_relocation, sonoma: "63f0dc6e1350138fbd4dc87d834e8e34541a6571af225c3f31046a2f996193e7" + sha256 cellar: :any_skip_relocation, ventura: "7ce2d500f72423d8916c557d0eac3c484b4b43d29e0c83577e877381c35e1829" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ac5ecf1f2e73dbff32e466330c31c9622d81acc1b913cee21fd5885581ca754" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dedee0b7c5e25ae0af2417c5594e11efd59c919856dc74dbcb3865b799eb7647" + end + + depends_on "ghc@9.10" => :build + depends_on "haskell-stack" => :build + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def install + system "stack", "update" + system "stack", "install", "--system-ghc", "--no-install-ghc", "--skip-ghc-check", "--local-bin-path=#{bin}" + man1.install Dir["hledger*/*.1"] + info.install Dir["hledger*/*.info"] + bash_completion.install "hledger/shell-completion/hledger-completion.bash" => "hledger" + end + + test do + system bin/"hledger", "test" + system bin/"hledger-ui", "--version" + system bin/"hledger-web", "--test" + end +end diff --git a/Formula/h/hlint.rb b/Formula/h/hlint.rb new file mode 100644 index 0000000000000..bca02d472ff0b --- /dev/null +++ b/Formula/h/hlint.rb @@ -0,0 +1,43 @@ +class Hlint < Formula + desc "Haskell source code suggestions" + homepage "https://github.com/ndmitchell/hlint" + url "https://hackage.haskell.org/package/hlint-3.10/hlint-3.10.tar.gz" + sha256 "d99672337c06b455884ac14418d562701143141d0d7e46af476817c2ae3efe37" + license "BSD-3-Clause" + head "https://github.com/ndmitchell/hlint.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b9f3a91f79fe82520ad8dfabefbce65bb2ea46b6204b4502f273e77c25ad6506" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e5145bf4f71231257b00c87da12917717656ef7ce2cc3b0ab34ab0eda2b27c34" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ca888410bda893835a17d6b612b1d81c6b27c3b7d48a8f3c235b8300bde6211c" + sha256 cellar: :any_skip_relocation, sonoma: "1fabac4ad28935c5b1f84a5e2ca98e3e5d10ad97bd3ef4ec43df68e13be4236a" + sha256 cellar: :any_skip_relocation, ventura: "25bddf78c27dcd1c33697450946158fa12af8f8a487c38b906490878e4f8c3a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "e138950b30faf4adfc02f70d7a9e61c34ff51bd102ea11aa63da02d8706d4955" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2217e05a4e5a0fc44c950f63111bcbd4bd48d2148fa95ec8820a7f50f9a5ea6e" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "gmp" + + uses_from_macos "libffi" + uses_from_macos "ncurses" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + man1.install "data/hlint.1" + end + + test do + (testpath/"test.hs").write <<~HASKELL + main = do putStrLn "Hello World" + HASKELL + assert_match "No hints", shell_output("#{bin}/hlint test.hs") + + (testpath/"test1.hs").write <<~HASKELL + main = do foo x; return 3; bar z + HASKELL + assert_match "Redundant return", shell_output("#{bin}/hlint test1.hs", 1) + end +end diff --git a/Formula/h/hmmer.rb b/Formula/h/hmmer.rb new file mode 100644 index 0000000000000..1ef9516f6090a --- /dev/null +++ b/Formula/h/hmmer.rb @@ -0,0 +1,36 @@ +class Hmmer < Formula + desc "Build profile HMMs and scan against sequence databases" + homepage "http://hmmer.org/" + url "http://eddylab.org/software/hmmer/hmmer-3.4.tar.gz" + sha256 "ca70d94fd0cf271bd7063423aabb116d42de533117343a9b27a65c17ff06fbf3" + license "BSD-3-Clause" + + livecheck do + url "http://eddylab.org/software/hmmer/" + regex(/href=.*?hmmer[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3342dd2de2909df5053dea525398b3e3902b07a1d58dab35a940bb7bf77b877b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0b23b02bb7bf3113ad01b32f5410ad7e1aade6186e5b54f788bc4c5345ea7d4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6285afc40e6975a1c8c0def48bc621e91801995481683954e580529fe4a5ae2a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5c32f8196a92df90112d84a4478ff8621ad2682074765fb956e6eb47a2ad9a86" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "37ffb9e206f2bd9a6bcfc8ec0209ef879057293ec0cf3588c083e6948c51c548" + sha256 cellar: :any_skip_relocation, sonoma: "dccdc668733d08a039d2ae9c5c40e4aef51c7b3bd8ed87398bc4159b7275cbef" + sha256 cellar: :any_skip_relocation, ventura: "1158f5420a01acc1906a56f654c564dc1538fc7961472f4a00598875b474f7c3" + sha256 cellar: :any_skip_relocation, monterey: "454e0ba7a19efebc0ec14b06d0075c377fab5ffc69c2a2fc7c54a2bac6406d76" + sha256 cellar: :any_skip_relocation, big_sur: "3fd8305a219c8084fa7fa34915fb904837b172fe7f3aafc8d6aa3c4e9a6f919d" + sha256 cellar: :any_skip_relocation, arm64_linux: "fdfea197f9b659764a9a641cd3bd27d10d27f53c116801332b2074d40fd3b9b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6de4e838a141d9cd836421806beeb8fea120434756ab1897a7dcd2d6e858e0ae" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + doc.install "Userguide.pdf", "tutorial" + end + + test do + assert_match "PF00069.17", shell_output("#{bin}/hmmstat #{doc}/tutorial/Pkinase.hmm") + end +end diff --git a/Formula/h/hoedown.rb b/Formula/h/hoedown.rb new file mode 100644 index 0000000000000..94de312b5ee51 --- /dev/null +++ b/Formula/h/hoedown.rb @@ -0,0 +1,39 @@ +class Hoedown < Formula + desc "Secure Markdown processing (a revived fork of Sundown)" + homepage "https://github.com/hoedown/hoedown" + url "https://github.com/hoedown/hoedown/archive/refs/tags/3.0.7.tar.gz" + sha256 "01b6021b1ec329b70687c0d240b12edcaf09c4aa28423ddf344d2bd9056ba920" + license "ISC" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fb7b81c0d930df8830f4424d2737dfe94320153725066bf2669c24f9cbb9ef46" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b1beec1ef5663b3a9f945403dbd5337e1c840faaa6662faf18e39c41c435963" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8ad1617812e2acc482387a1fed431b102a43cd3c641f4b639131a451c2608077" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c91387f585953da59a7587de33a6085642da3d55a416c6d1a99839340df531f0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "748004674d9036262032eda6a9b574137cff8a01178977c45d735adba7160587" + sha256 cellar: :any_skip_relocation, sonoma: "2b75fd94f2f468aa5990c8f5383bc71453e2fb96a2280c88043cf7d375b1dd2d" + sha256 cellar: :any_skip_relocation, ventura: "141636a2e7dac87d21a6de5d3c31ab258048e641934b6da600b50c79a9b34290" + sha256 cellar: :any_skip_relocation, monterey: "a3a6b53be859368f6565a31c918758648fa6c41f833ccd2419961fb3b01ecaa9" + sha256 cellar: :any_skip_relocation, big_sur: "8878fa04ace3327364bb0d18113bbb56006f169d7f169bc41d03986e1bfe6270" + sha256 cellar: :any_skip_relocation, catalina: "578d2db4436012569cd56a47cca8967e106cd83474ed80f52dd7deeda6b1a134" + sha256 cellar: :any_skip_relocation, mojave: "4028b7bb88b6da75f735c58f3497d354dda4bc7ce33288a0ae71932878991c5b" + sha256 cellar: :any_skip_relocation, high_sierra: "1be6101d978f2df1749712dd39d3fc8b9c7cc014c2402eab5060e8656f6b22cf" + sha256 cellar: :any_skip_relocation, sierra: "f940a418b3ca712a91e8b782d61618a2b1cf2c662a98f636e4df1318fbb9f508" + sha256 cellar: :any_skip_relocation, el_capitan: "7076f6f7c091919a3619a5a5655270d79dab42fdb6d7dfdc3f1324318ca4ec6d" + sha256 cellar: :any_skip_relocation, arm64_linux: "09bbf5d61c9d83cd75e37e09ac33cf02b267a99fb6702879bb28e096753d6470" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d9c93dc9fcdfd9daa56e0dc4c410ec0003a11150b211124bc0c367098fb5132" + end + + def install + system "make", "hoedown" + bin.install "hoedown" + prefix.install "test" + end + + test do + system "perl", "#{prefix}/test/MarkdownTest_1.0.3/MarkdownTest.pl", + "--script=#{bin}/hoedown", + "--testdir=#{prefix}/test/MarkdownTest_1.0.3/Tests", + "--tidy" + end +end diff --git a/Formula/h/hof.rb b/Formula/h/hof.rb new file mode 100644 index 0000000000000..50b8905723680 --- /dev/null +++ b/Formula/h/hof.rb @@ -0,0 +1,57 @@ +class Hof < Formula + desc "Flexible data modeling & code generation system" + homepage "https://hofstadter.io/" + url "https://github.com/hofstadter-io/hof/archive/refs/tags/v0.6.10.tar.gz" + sha256 "87703d19a23121a4b617f1359aed9616dceb6c79718245861835b61ccff7e1eb" + license "Apache-2.0" + head "https://github.com/hofstadter-io/hof.git", branch: "_dev" + + # Latest release tag contains `-beta`, which is not ideal + # adding a livecheck block to check the stable release + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8e5275eb22672ae3f0bcf884becc77d6b34eda2b7ba84ffd3fe562fddbc3d5e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8e5275eb22672ae3f0bcf884becc77d6b34eda2b7ba84ffd3fe562fddbc3d5e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8e5275eb22672ae3f0bcf884becc77d6b34eda2b7ba84ffd3fe562fddbc3d5e5" + sha256 cellar: :any_skip_relocation, sonoma: "96a01bb5adfdee2ac9d77baf10cdbd99682f95e487ea6fc9b0a0be59d3492c19" + sha256 cellar: :any_skip_relocation, ventura: "96a01bb5adfdee2ac9d77baf10cdbd99682f95e487ea6fc9b0a0be59d3492c19" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1649592d767a8d06f0db43de77032c854168d2626ba0113650942c1d3221e935" + end + + depends_on "go" => :build + + def install + arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s + os = OS.kernel_name.downcase + + ldflags = %W[ + -s -w + -X github.com/hofstadter-io/hof/cmd/hof/verinfo.Version=#{version} + -X github.com/hofstadter-io/hof/cmd/hof/verinfo.Commit=#{tap.user} + -X github.com/hofstadter-io/hof/cmd/hof/verinfo.BuildDate=#{time.iso8601} + -X github.com/hofstadter-io/hof/cmd/hof/verinfo.GoVersion=#{Formula["go"].version} + -X github.com/hofstadter-io/hof/cmd/hof/verinfo.BuildOS=#{os} + -X github.com/hofstadter-io/hof/cmd/hof/verinfo.BuildArch=#{arch} + ] + + ENV["HOF_TELEMETRY_DISABLED"] = "1" + system "go", "build", *std_go_args(ldflags:), "./cmd/hof" + + generate_completions_from_executable(bin/"hof", "completion") + end + + test do + ENV["HOF_TELEMETRY_DISABLED"] = "1" + + assert_match version.to_s, shell_output("#{bin}/hof version") + + system bin/"hof", "mod", "init", "brew.sh/brewtest" + assert_path_exists testpath/"cue.mod" + assert_match 'module: "brew.sh/brewtest"', (testpath/"cue.mod/module.cue").read + end +end diff --git a/Formula/h/homeassistant-cli.rb b/Formula/h/homeassistant-cli.rb new file mode 100644 index 0000000000000..97f0420f119e9 --- /dev/null +++ b/Formula/h/homeassistant-cli.rb @@ -0,0 +1,187 @@ +class HomeassistantCli < Formula + include Language::Python::Virtualenv + + desc "Command-line utility for Home Assistant" + homepage "https://github.com/home-assistant-ecosystem/home-assistant-cli" + url "https://files.pythonhosted.org/packages/b2/98/fd5e7beb7cc135f80d78b32c85ac15f3ba9219063b794b1d184fb07fd84b/homeassistant-cli-0.9.6.tar.gz" + sha256 "9b9b705eaf6ee40dc6a732f3458c78ba37b62b7330bc17b132e6fee385ec8606" + license "Apache-2.0" + revision 15 + head "https://github.com/home-assistant-ecosystem/home-assistant-cli.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "07422b9395cc7066c0a9bf26ea9e6b56efda53fd77cbad9d3f36643d87e1025b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c3791da0b8b63e58a0a9af117eb2f0262dc61fe10037ea2cee8b764696b61716" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0856e1f97cb95c050cf694da2d017e0908d73b3ca091d114b5f49e3667e599d8" + sha256 cellar: :any_skip_relocation, sonoma: "af3662a2dfdf8fb6f87b516cd097f1da2881883d2f66bc8bcff4d248ccec41d4" + sha256 cellar: :any_skip_relocation, ventura: "e831c3f5fbcfde80e13af58fcd0ef774b294398b6c1ac21f696615b53b256278" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b8615ffa457a353dba3f257143f6062f41360f643aea501e53cf7ef2c56c4b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1789a467e9517c4ab669369528ad6052e1e3b645fa83765d88cbfd542e8e6e28" + end + + depends_on "python@3.13" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/a2/0c/458958007041f4b4de2d307e6b75d9e7554dad0baf26fe7a48b741aac126/aiohappyeyeballs-2.5.0.tar.gz" + sha256 "18fde6204a76deeabc97c48bdd01d5801cfda5d6b9c8bbeb1aaaee9d648ca191" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/b3/3f/c4a667d184c69667b8f16e0704127efc5f1e60577df429382b4d95fd381e/aiohttp-3.11.13.tar.gz" + sha256 "8ce789231404ca8fff7f693cdce398abf6d90fd5dae2b1847477196c243b1fbb" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/49/7c/fdf464bcc51d23881d110abd74b512a42b3d5d376a55a831b44c603ae17f/attrs-25.1.0.tar.gz" + sha256 "1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/1c/ab/c9f1e32b7b1bf505bf26f0ef697775960db7932abeb7b516de930ba2705f/certifi-2025.1.31.tar.gz" + sha256 "3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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 "dateparser" do + url "https://files.pythonhosted.org/packages/86/6e/9a47cf3841bcfd1dd07a20b2aca42d4e02822ea7121aeb022869855b8d2f/dateparser-0.7.6.tar.gz" + sha256 "e875efd8c57c85c2d02b238239878db59ff1971f5a823457fcc69e493bf6ebfa" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + 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 "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 "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + end + + resource "netdisco" do + url "https://files.pythonhosted.org/packages/65/ca/f9263e384128a973595dda4022c96cb89afab8a9a83435bc955ec6f23358/netdisco-3.0.0.tar.gz" + sha256 "4dbb590482f377ccc461e01742707ccbe8f1d2d1b28578af91dc9b7febcdcbd2" + end + + resource "ply" do + url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" + sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/92/76/f941e63d55c0293ff7829dd21e7cf1147e90a526756869a9070f287a68c9/propcache-0.3.0.tar.gz" + sha256 "a8fd93de4e1d278046345f49e2238cdb298589325849b2645d4a94c53faeffc5" + 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/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/d1/d6/eb2833ccba5ea36f8f4de4bcfa0d1a91eb618f832d430b70e3086821f251/ruamel.yaml-0.17.40.tar.gz" + sha256 "6024b986f06765d482b5b07e086cc4b4cd05dd22ddcbc758fa23d54873cf313d" + 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 "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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/b7/9d/4b94a8e6d2b51b599516a5cb88e5bc99b4d8d4583e468057eaa29d5f0918/yarl-1.18.3.tar.gz" + sha256 "ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1" + end + + resource "zeroconf" do + url "https://files.pythonhosted.org/packages/43/6b/5fa7a4c677376b549655d67f6902c80bde4b534405cdf2b5f0c50cc7bd8a/zeroconf-0.146.1.tar.gz" + sha256 "c53c07d6df3698bd19dcc832a897181872ec47e98e7cd70cff6c1bb0aff0bbfd" + end + + def install + virtualenv_install_with_resources + generate_completions_from_executable(bin/"hass-cli", shells: [:fish, :zsh], + shell_parameter_format: :click) + end + + test do + output = shell_output("#{bin}/hass-cli info 2>&1", 3) + assert_match "Trying to locate Home Assistant on local network", output + assert_match "warning: Found no Home Assistant on local network. Using defaults", output + + assert_match "hass-cli, version #{version}", shell_output("#{bin}/hass-cli --version") + end +end diff --git a/Formula/h/homebank.rb b/Formula/h/homebank.rb new file mode 100644 index 0000000000000..7f01cc3ec1903 --- /dev/null +++ b/Formula/h/homebank.rb @@ -0,0 +1,62 @@ +class Homebank < Formula + desc "Manage your personal accounts at home" + homepage "http://homebank.free.fr/" + # A mirror is used as primary URL because the official one is unstable. + url "https://deb.debian.org/debian/pool/main/h/homebank/homebank_5.8.6.orig.tar.gz" + mirror "http://homebank.free.fr/public/sources/homebank-5.8.6.tar.gz" + sha256 "af138a7bf2cd795c1338c5e3d9e99909ee6b33d920c618dc35c6477fd826ddf5" + license "GPL-2.0-or-later" + + livecheck do + url "https://deb.debian.org/debian/pool/main/h/homebank/" + regex(/href=.*?homebank[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + bottle do + sha256 arm64_sequoia: "efab141f793847482f16f90362916f2f09937a6baa3c892df30fe04e3de6b86a" + sha256 arm64_sonoma: "a75d764da8a08f87a173194d81d821ee201636295a9522ac96dad5fd52e679b6" + sha256 arm64_ventura: "f7a05e75f18dedecb7a07fa78a1f862b8967274018824829ff33c8efe88aaf70" + sha256 sonoma: "8c979f17c79bf993edbb449c5f2be3f6d2a8123321125cb64744ca1bd15b35e3" + sha256 ventura: "7e8692240976b9a05c7e36ea7fd9f5e0b4af9a41e79918d2a0bb63967bcff906" + sha256 arm64_linux: "3f0ae5cd4b908fbcbae49b32b219fc61c712020a982209e0707881c077cfd2b1" + sha256 x86_64_linux: "096747e583c538a312c20b541fc8c7388001d86ed9cabb01a0e949d55c3e187c" + end + + depends_on "intltool" => :build + depends_on "pkgconf" => :build + + depends_on "adwaita-icon-theme" + depends_on "cairo" + depends_on "fontconfig" + depends_on "freetype" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "hicolor-icon-theme" + depends_on "libofx" + depends_on "libsoup" + 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 + system "./configure", "--with-ofx", *std_configure_args + chmod 0755, "./install-sh" + system "make", "install" + end + + test do + # homebank is a GUI application + system bin/"homebank", "--help" + end +end diff --git a/Formula/h/homeshick.rb b/Formula/h/homeshick.rb new file mode 100644 index 0000000000000..3bdf86cdabefb --- /dev/null +++ b/Formula/h/homeshick.rb @@ -0,0 +1,46 @@ +class Homeshick < Formula + desc "Git dotfiles synchronizer written in bash" + homepage "https://github.com/andsens/homeshick" + url "https://github.com/andsens/homeshick/archive/refs/tags/v2.0.1.tar.gz" + sha256 "949f5de3c7f235ceb37c08e0cc8f3f7ad166f741a8fd01bf4b935a2031e37557" + license "MIT" + head "https://github.com/andsens/homeshick.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "9a93b6514577c36a3de2d9c6a8c3cf9474a6534cc9547407f49ebc0325b20a8d" + end + + def install + inreplace "bin/homeshick", /^homeshick=.*/, "homeshick=#{opt_prefix}" + + prefix.install "lib", "homeshick.sh" + fish_function.install "homeshick.fish" + bin.install "bin/homeshick" + zsh_completion.install "completions/_homeshick" + bash_completion.install "completions/homeshick-completion.bash" => "homeshick" + fish_completion.install "completions/homeshick.fish" + end + + def caveats + <<~EOS + To enable the `homeshick cd ` command, you need to + `export HOMESHICK_DIR=#{opt_prefix}` + and + `source "#{opt_prefix}/homeshick.sh"` + in your $HOME/.bashrc + EOS + end + + test do + (testpath/"test.sh").write <<~SHELL + #!/bin/sh + export HOMESHICK_DIR="#{opt_prefix}" + source "#{opt_prefix}/homeshick.sh" + homeshick generate test + homeshick list + SHELL + + assert_match "test", shell_output("bash #{testpath}/test.sh") + end +end diff --git a/Formula/h/homeworlds.rb b/Formula/h/homeworlds.rb new file mode 100644 index 0000000000000..e53cc5bbd8177 --- /dev/null +++ b/Formula/h/homeworlds.rb @@ -0,0 +1,31 @@ +class Homeworlds < Formula + desc "C++ framework for the game of Binary Homeworlds" + homepage "https://github.com/Quuxplusone/Homeworlds/" + url "https://github.com/Quuxplusone/Homeworlds/archive/refs/tags/v1.1.0.tar.gz" + sha256 "3ffbad58943127850047ef144a572f6cc84fd1ec2d29dad1f118db75419bf600" + license "BSD-2-Clause" + revision 1 + version_scheme 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "fc648ea7d7196a2067c452be9e0e4ba83500b687518bf6c120cccc9147e77201" + sha256 cellar: :any, arm64_sonoma: "7f0bfeb7524e5ca6ec187759fac9ca02b2a4f24ece3cfe8506d9d325530d8ba6" + sha256 cellar: :any, arm64_ventura: "9b02997109618a53e50a2dd9dba793b98abe87ec60b2acd3efbf0ebc30ceeff1" + sha256 cellar: :any, sonoma: "12a6e003b2201f391a32e4e7329d56606fc61677cfe7c30ddf3003dc5d5eed47" + sha256 cellar: :any, ventura: "c1ef4ed10f9d30d5ac69572ce0ef0a9677924cecdcbdbdb3f520415675b983cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "bcd8d56b7c77a7a3817dac2aa1c006d8590d5e18fe67fefcdf47cb348c2b19f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3390b52f4c1be6153a244f3b396d54fec26315d710626c2fa9df90330e8199c" + end + + depends_on "wxwidgets" + + def install + system "make", "homeworlds-cli", "homeworlds-wx" + bin.install "homeworlds-cli", "homeworlds-wx" + end + + test do + output = shell_output(bin/"homeworlds-cli", 1) + assert_match "Error: Incorrect command-line arguments", output + end +end diff --git a/Formula/h/honcho.rb b/Formula/h/honcho.rb new file mode 100644 index 0000000000000..8eddf777742e9 --- /dev/null +++ b/Formula/h/honcho.rb @@ -0,0 +1,27 @@ +class Honcho < Formula + include Language::Python::Virtualenv + + desc "Python clone of Foreman, for managing Procfile-based applications" + homepage "https://github.com/nickstenning/honcho" + url "https://files.pythonhosted.org/packages/65/c8/d860888358bf5c8a6e7d78d1b508b59b0e255afd5655f243b8f65166dafd/honcho-2.0.0.tar.gz" + sha256 "af3815c03c634bf67d50f114253ea9fef72ecff26e4fd06b29234789ac5b8b2e" + license "MIT" + head "https://github.com/nickstenning/honcho.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9156231ae4d87e5ec1dadf38d3251849012f02358f8b7461eb165d770963ddb6" + end + + depends_on "python@3.13" + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"Procfile").write "talk: echo $MY_VAR" + (testpath/".env").write "MY_VAR=hi" + assert_match(/talk\.\d+ \| hi/, shell_output("#{bin}/honcho start")) + end +end diff --git a/Formula/h/hopenpgp-tools.rb b/Formula/h/hopenpgp-tools.rb new file mode 100644 index 0000000000000..479f8686392af --- /dev/null +++ b/Formula/h/hopenpgp-tools.rb @@ -0,0 +1,76 @@ +class HopenpgpTools < Formula + desc "Command-line tools for OpenPGP-related operations" + homepage "https://hackage.haskell.org/package/hopenpgp-tools" + # TODO: Check if `ixset-typed` resource can be dropped + url "https://hackage.haskell.org/package/hopenpgp-tools-0.23.11/hopenpgp-tools-0.23.11.tar.gz" + sha256 "2a056bd320caafe0f7ac3c95d56819f9fef02ddafe11b59802ea5a678d88a54f" + license "AGPL-3.0-or-later" + head "https://salsa.debian.org/clint/hOpenPGP.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "41b5917c6be661736f37f098bff90219a3c4f5cd87b396abf57389d219c1ccb4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0ea0bdb57778391700816112db32d245f0bb3ec0d8baeecca58764d3bfc9f54b" + sha256 cellar: :any, arm64_ventura: "b83d81cff76f58a88f73c353b6807a82bb6186419bc525f7e90aaddea2e0c272" + sha256 cellar: :any_skip_relocation, sonoma: "81a7de6f22c94c9e6511f74ac6caab00902a992db025cc63503746ff7ddebe95" + sha256 cellar: :any, ventura: "8d3b9bf6403e965b552105bf02b1dd620325f5c37174d3c3959899eae71fe055" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b60d684c2fee4c0a2bf97fbc083340f7830183f7372edadb6e7a0fd9042843e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e51c27ef595c911cb7a2f208b6a5c5426e767240f3651e072b5af7bd6213156" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + depends_on "pkgconf" => :build + depends_on "gnupg" => :test + depends_on "nettle" + + uses_from_macos "zlib" + + # TODO: Remove resource once new release ixset-typed release is available + resource "ixset-typed" do + url "https://hackage.haskell.org/package/ixset-typed-0.5.1.0/ixset-typed-0.5.1.0.tar.gz" + sha256 "08b7b4870d737b524a8575529ee1901b0d8e39ff72298a6b231f8719b5a8790c" + + # Backport https://github.com/well-typed/ixset-typed/pull/23 + patch do + url "https://github.com/well-typed/ixset-typed/commit/460901368dcb452d352a17bcd4b8f60200a6fa71.patch?full_index=1" + sha256 "e284534df9ff14f49dad95a6745137c36c7a6335e896201c577d709794882e4c" + end + end + + def install + # Workaround to use newer GHC + (buildpath/"cabal.project.local").write "packages: . ixset-typed/" + (buildpath/"ixset-typed").install resource("ixset-typed") + + # Workaround to build with GHC 9.10. `data-functor-logistic` is a + # dependency of `rank2classes` which uses the same workaround. + # Ref: https://github.com/blamario/grampa/blob/master/cabal.project#L6 + args = ["--allow-newer=data-functor-logistic:base"] + + system "cabal", "v2-update" + system "cabal", "v2-install", *args, *std_cabal_v2_args + end + + test do + (testpath/"batch.gpg").write <<~GPG + 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 + GPG + + gpg = Formula["gnupg"].opt_bin/"gpg" + begin + system gpg, "--batch", "--gen-key", "batch.gpg" + output = pipe_output("#{bin}/hokey lint", shell_output("#{gpg} --export Testing"), 0) + assert_match "Testing ", output + ensure + system "#{gpg}conf", "--kill", "gpg-agent" + end + end +end diff --git a/Formula/h/hopscotch-map.rb b/Formula/h/hopscotch-map.rb new file mode 100644 index 0000000000000..1e766f85374df --- /dev/null +++ b/Formula/h/hopscotch-map.rb @@ -0,0 +1,36 @@ +class HopscotchMap < Formula + desc "C++ implementation of a fast hash map and hash set using hopscotch hashing" + homepage "https://github.com/Tessil/hopscotch-map" + url "https://github.com/Tessil/hopscotch-map/archive/refs/tags/v2.3.1.tar.gz" + sha256 "53dab49005cd5dc859f2546d0d3eef058ec7fb3b74fc3b19f4965a9a151e9b20" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c7e9170bcfbca171cce4515cad7ff32963dfc5ae0f364a5e99ee20839c8682cb" + 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.cc").write <<~CPP + #include + #include + + int main() { + tsl::hopscotch_set s; + s.insert(3); + assert(s.count(3) == 1); + return(0); + } + CPP + system ENV.cxx, "-std=c++14", "test.cc", "-I#{include}", "-o", "test" + system "./test" + end +end diff --git a/Formula/h/hostdb.rb b/Formula/h/hostdb.rb new file mode 100644 index 0000000000000..8b03bc9506e0f --- /dev/null +++ b/Formula/h/hostdb.rb @@ -0,0 +1,35 @@ +class Hostdb < Formula + desc "Generate DNS zones and DHCP configuration from hostlist.txt" + homepage "https://code.google.com/archive/p/hostdb/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hostdb/hostdb-1.004.tgz" + sha256 "beea7cfcdc384eb40d0bc8b3ad2eb094ee81ca75e8eef7c07ea4a47e9f0da350" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "09b528afa8eb8c14becf6bc4240d82b1d40320be2e4a5718af35769e0ba663db" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "507656584e0ec815556008dea547944116e8e6c99a3646c3b7ae31b489e337b6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d1c397eae6bba51e1082904159e462f7cede76d7c3d1def04a0cfbc65cec17d5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d1c397eae6bba51e1082904159e462f7cede76d7c3d1def04a0cfbc65cec17d5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d1c397eae6bba51e1082904159e462f7cede76d7c3d1def04a0cfbc65cec17d5" + sha256 cellar: :any_skip_relocation, sonoma: "e18f13b9c70d5496eb9ca5066bc2876affd943b2489b99d38e0d2238b70eadc6" + sha256 cellar: :any_skip_relocation, ventura: "15df2ae20a92ce1921922de57e085664cc31557f11fcee4dc4a214c7f4c949d9" + sha256 cellar: :any_skip_relocation, monterey: "15df2ae20a92ce1921922de57e085664cc31557f11fcee4dc4a214c7f4c949d9" + sha256 cellar: :any_skip_relocation, big_sur: "15df2ae20a92ce1921922de57e085664cc31557f11fcee4dc4a214c7f4c949d9" + sha256 cellar: :any_skip_relocation, catalina: "15df2ae20a92ce1921922de57e085664cc31557f11fcee4dc4a214c7f4c949d9" + sha256 cellar: :any_skip_relocation, mojave: "15df2ae20a92ce1921922de57e085664cc31557f11fcee4dc4a214c7f4c949d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "3187a248c3315e748961010b25b7f9801defbbb730f2caaee17e6c1f3ebb5812" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1c397eae6bba51e1082904159e462f7cede76d7c3d1def04a0cfbc65cec17d5" + end + + def install + bin.install Dir["bin/*"] + doc.install Dir["docs/*"] + pkgshare.install "examples" + end + + test do + system("#{bin}/mkzones -z #{pkgshare}/examples/example1/zoneconf.txt < #{pkgshare}/examples/example1/hostdb.txt") + expected = /^4 \s+ IN \s+ PTR \s+ vector\.example\.com\.$/x + assert_match(expected, (testpath/"INTERNAL.179.32.64.in-addr.arpa").read) + end +end diff --git a/Formula/h/hostess.rb b/Formula/h/hostess.rb new file mode 100644 index 0000000000000..8ae9836d81b67 --- /dev/null +++ b/Formula/h/hostess.rb @@ -0,0 +1,34 @@ +class Hostess < Formula + desc "Idempotent command-line utility for managing your /etc/hosts file" + homepage "https://github.com/cbednarski/hostess" + url "https://github.com/cbednarski/hostess/archive/refs/tags/v0.5.2.tar.gz" + sha256 "ece52d72e9e886e5cc877379b94c7d8fe6ba5e22ab823ef41b66015e5326da87" + license "MIT" + head "https://github.com/cbednarski/hostess.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5af8f3803260637b3938948d0a18cf210279b7cd6b6abeb9e197e373feb5a53f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0186aaf7affa768a218d00dc949003d663a5e13c0282c2b95b18135070254118" + sha256 cellar: :any_skip_relocation, arm64_ventura: "70fb5d0bdf6c6c22082affae3027953e8c59d51a795bd6983b30a58fecf5088c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "277bc64d736ab7413d771e469943d1037b196e6b3aafd987a5c09602ada6b499" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4272e75f8cba2d02e038dca00f7620a70ca396f3486aaf57a6a9fde77645c562" + sha256 cellar: :any_skip_relocation, sonoma: "d9161d0f8c9609bbbca83aaf95f6042c28f71e376d7af4b66d119d8a3d68b184" + sha256 cellar: :any_skip_relocation, ventura: "a0cf169ccb1606629100606c6326aeccb72447e6f3447dd018814c4423f8f07e" + sha256 cellar: :any_skip_relocation, monterey: "02d6c4ebd1fb5d414bde215becf8c8c69c1a7b7d9561ca19c270f3c2da2e904b" + sha256 cellar: :any_skip_relocation, big_sur: "addb5bc6b7ff84ad6d2a33f2e0c46298f16865473ad82a32c02434def068c26b" + sha256 cellar: :any_skip_relocation, catalina: "9386f4841bb16ea44d5131b0a360138a3d33d7595e85d0baba3b9546762d7ae6" + sha256 cellar: :any_skip_relocation, mojave: "90e6b36f4131f2e8a914cd81e6a17e59075e734fa83b583654e178c6e7e65aa3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0b57a734d8f4d98281726dfa821ff8b2dac02cfdfcd2349000257bdaf614cd6" + 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 "localhost", shell_output("#{bin}/hostess ls 2>&1") + end +end diff --git a/Formula/h/hotbuild.rb b/Formula/h/hotbuild.rb new file mode 100644 index 0000000000000..f1e9e240363cb --- /dev/null +++ b/Formula/h/hotbuild.rb @@ -0,0 +1,39 @@ +class Hotbuild < Formula + desc "Cross platform hot compilation tool for go" + homepage "https://hotbuild.rustpub.com/" + url "https://github.com/wandercn/hotbuild/archive/refs/tags/v1.0.8.tar.gz" + sha256 "662fdc31ca85f5d00ba509edcb177b617d8d6d8894086197347cfdbd17dc7c2f" + license "MulanPSL-2.0" + head "https://github.com/wandercn/hotbuild.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fbc85999d55d54744d2d91cb460717d72fc448bd5845222218bf3fcf510fd3ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ddd19c999dc3804ab7ce881c97e26f62c61579c59ae13aaa3b6d6cfdf8b5bb77" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a9fc5a6d582ee188052e3daa22aa3c6063fb09aaef924deac5cbfe5f697e02f0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "547bc3bac1e2621f3f6d1dbc83ed412897b2aa1def4a08a5fdbfd2a24e9cde2f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e0ad321f7a6ab55d11b47e83963984eb51576264653ce4613183a03730f9c7b9" + sha256 cellar: :any_skip_relocation, sonoma: "5f9c67fca7d339796057af29edb1792fbf3058bc1c0dde2d20c8ef0be5fa9f61" + sha256 cellar: :any_skip_relocation, ventura: "c0e255bfa37fa3ee34f2c35c5c00ec41879a0c89d17f9073b0dbc215b4be3649" + sha256 cellar: :any_skip_relocation, monterey: "c2c61c0aa4d1a3f4beda6764e28af6de0ff60e0fc1df445e52d941daa921a82b" + sha256 cellar: :any_skip_relocation, big_sur: "9c327c9eddb60305d8b6a5ba1a164ae1ae416f2f448048804f12a42dd07bc8dc" + sha256 cellar: :any_skip_relocation, catalina: "32cf72dbf642a44b7a6ad2182fb42946583004a9e87b8a3042f43f918d559c1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb2fa25a273f069d799eb0d30e31b73ca3a8e9fd319c76a6f0171a661fe68ad0" + end + + depends_on "go" => :build + + def install + # fixed in https://github.com/wandercn/hotbuild/commit/16d2d337fc20b245a96a4bd2cfe7c0ec8657470d + # remove in next release + inreplace "version/version.go", "v1.0.7", version.to_s + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = "buildcmd = \"go build -o tmp/tmp_bin\"" + system bin/"hotbuild", "initconf" + assert_match output, (testpath/".hotbuild.toml").read + + assert_match version.to_s, shell_output("#{bin}/hotbuild version") + end +end diff --git a/Formula/h/hoverfly.rb b/Formula/h/hoverfly.rb new file mode 100644 index 0000000000000..bdabd88522d38 --- /dev/null +++ b/Formula/h/hoverfly.rb @@ -0,0 +1,33 @@ +class Hoverfly < Formula + desc "API simulations for development and testing" + homepage "https://hoverfly.io/" + url "https://github.com/SpectoLabs/hoverfly/archive/refs/tags/v1.11.0.tar.gz" + sha256 "9a2587be03cab6622791a6bfa35af41203da2834531d7ddd9b020bce2c6c9577" + license "Apache-2.0" + head "https://github.com/SpectoLabs/hoverfly.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aa0650cb2bca45af44b5c505b24cafa445131f788d3a881aad60d59dd04eeccb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aa0650cb2bca45af44b5c505b24cafa445131f788d3a881aad60d59dd04eeccb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aa0650cb2bca45af44b5c505b24cafa445131f788d3a881aad60d59dd04eeccb" + sha256 cellar: :any_skip_relocation, sonoma: "aad40108122fec25a308fc098d7b7c58ff253a76cc272e0134f67fc6d0830dce" + sha256 cellar: :any_skip_relocation, ventura: "aad40108122fec25a308fc098d7b7c58ff253a76cc272e0134f67fc6d0830dce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db976ddeba1a9c5a2ccacab93d9bfbf0ce4a92df1eba2b919e7673c86fed2399" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.hoverctlVersion=#{version}" + system "go", "build", *std_go_args(ldflags:), "./core/cmd/hoverfly" + end + + test do + require "pty" + + stdout, = PTY.spawn("#{bin}/hoverfly -webserver") + assert_match "Using memory backend", stdout.readline + + assert_match version.to_s, shell_output("#{bin}/hoverfly -version") + end +end diff --git a/Formula/h/howard-hinnant-date.rb b/Formula/h/howard-hinnant-date.rb new file mode 100644 index 0000000000000..453e02ede6e32 --- /dev/null +++ b/Formula/h/howard-hinnant-date.rb @@ -0,0 +1,46 @@ +class HowardHinnantDate < Formula + desc "C++ library for date and time operations based on " + homepage "https://github.com/HowardHinnant/date" + url "https://github.com/HowardHinnant/date/archive/refs/tags/v3.0.3.tar.gz" + sha256 "30de45a34a2605cca33a993a9ea54e8f140f23b1caf1acf3c2fd436c42c7d942" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f5caa8a7a4f7072d005a62f565705607e1d5ff21ef112d5a911bacb3c8a1695b" + sha256 cellar: :any, arm64_sonoma: "fb88892a2b820b2e43c6b47af05740b6a5bd44e20335ec9ca23a5e247c0782ac" + sha256 cellar: :any, arm64_ventura: "5c383e2d85dfb776bb86e0aa19cd34ae62510d87b725c6fde8dc18b199a9462d" + sha256 cellar: :any, sonoma: "a15f73654fcc9dc73f6628b06b13184127271c6090a340b160ecec12170d9c4b" + sha256 cellar: :any, ventura: "af3320951ccf968555f534e710b4ff9fa5ddb4a2b28d9422aa37424d45b1d0c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "da2daf5cb277e9f7b56e7e0e14ca74d9932b042784821db38263ef59511cd806" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1cd260df2059437676d4ffd985f8be01745964447e00c227bb8f3ea78355f650" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DENABLE_DATE_TESTING=OFF + -DUSE_SYSTEM_TZ_DB=ON + -DBUILD_SHARED_LIBS=ON + -DBUILD_TZ_LIB=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 "date/tz.h" + #include + + int main() { + auto t = date::make_zoned(date::current_zone(), std::chrono::system_clock::now()); + std::cout << t << std::endl; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++1y", "-L#{lib}", "-ldate-tz", "-o", "test" + system "./test" + end +end diff --git a/Formula/h/howdoi.rb b/Formula/h/howdoi.rb new file mode 100644 index 0000000000000..7983890a3636a --- /dev/null +++ b/Formula/h/howdoi.rb @@ -0,0 +1,153 @@ +class Howdoi < Formula + include Language::Python::Virtualenv + + desc "Instant coding answers via the command-line" + homepage "https://github.com/gleitz/howdoi" + url "https://files.pythonhosted.org/packages/6d/43/0e8166583575bd500c0f8f1a4ab9429af9466feb6fcdc006e88de8fd23e9/howdoi-2.0.20.tar.gz" + sha256 "51cd40c53e0c0f8f8da88f480eb7423183be2350ab4f0a4d9d4763ca6ac3e2a9" + license "MIT" + revision 9 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "2674270159eb079ad93bb4c4abe680f4dd089976fe59109dd2156c9111fa600b" + sha256 cellar: :any, arm64_sonoma: "4ff362e290742baad6e9d0484ea70aee147e397388d7a550d322ff215c361d25" + sha256 cellar: :any, arm64_ventura: "5c6417c2f0e5618fe13bcb79b032f2aad5ac5e564f5db7abc705487ab7bc7d77" + sha256 cellar: :any, sonoma: "f48a8bd968b56195def07c3318ae53f095d446eb21dd187ea1d51d1c967558de" + sha256 cellar: :any, ventura: "234f5431c62f46e47c90e8832be245d5e146a746d6a687bb83911fd0761bb065" + sha256 cellar: :any_skip_relocation, arm64_linux: "caf49a0e48f5e5af6128986abdb30092c7bfc8ad0e6535efced309250d487535" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a77719b07db84dd967caa408e74ce85db345adeb14520c7ba83e8711140d89ff" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "libsodium" # for pynacl + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "appdirs" do + url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" + sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" + end + + resource "cachelib" do + url "https://files.pythonhosted.org/packages/1d/69/0b5c1259e12fbcf5c2abe5934b5c0c1294ec0f845e2b4b2a51a91d79a4fb/cachelib-0.13.0.tar.gz" + sha256 "209d8996e3c57595bee274ff97116d1d73c4980b2fd9a34c7846cd07fd2e1a48" + 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 "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 "cssselect" do + url "https://files.pythonhosted.org/packages/d1/91/d51202cc41fbfca7fa332f43a5adac4b253962588c7cc5a54824b019081c/cssselect-1.2.0.tar.gz" + sha256 "666b19839cfaddb9ce9d36bfe4c969132c647b92fc9088c4e23f786b30f1b3dc" + end + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/92/14/1e41f504a246fc224d2ac264c227975427a85caf37c3979979edb9b1b232/Deprecated-1.2.14.tar.gz" + sha256 "e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "keep" do + url "https://files.pythonhosted.org/packages/60/2b/cff99a6e90eb54f88ea4f96395a788dce3167b95b5e2a93642f16d8a10e2/keep-2.11.tar.gz" + sha256 "06bc2fbbf65ebebf2c384dca0306a40c3cd531cd95a05c486f5a2b5c07acd94d" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/e7/6b/20c3a4b24751377aaa6307eb230b66701024012c29dd374999cc92983269/lxml-5.3.0.tar.gz" + sha256 "4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f" + 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 "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pygithub" do + url "https://files.pythonhosted.org/packages/f1/a0/1e8b8ca88df9857836f5bf8e3ee15dfb810d19814ef700b12f99ce11f691/pygithub-2.4.0.tar.gz" + sha256 "6601e22627e87bac192f1e2e39c6e6f69a43152cfb8f307cee575879320b3051" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/fb/68/ce067f09fca4abeca8771fe667d89cc347d1e99da3e093112ac329c6020e/pyjwt-2.9.0.tar.gz" + sha256 "7e1e5b56cc735432a7369cbfa0efe50fa113ebecdc04ae6922deba8b84582d0c" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "pyquery" do + url "https://files.pythonhosted.org/packages/ae/48/79e774ea00b671d08867f06d9258203be81834236c150ac00e942d8fc4db/pyquery-2.0.1.tar.gz" + sha256 "0194bb2706b12d037db12c51928fe9ebb36b72d9e719565daba5a6c595322faf" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/aa/9e/1784d15b057b0075e5136445aaea92d23955aad2c93eaede673718a40d95/rich-13.9.2.tar.gz" + sha256 "51a2c62057461aaf7152b4d611168f93a9fc73068f8ded2790f29fe2b5366d0c" + end + + resource "terminaltables3" do + url "https://files.pythonhosted.org/packages/55/9b/9abd7feb0cf552061cfa452c22773f3158cdad877ad5623f13edfa07116f/terminaltables3-4.0.0.tar.gz" + sha256 "4e3eefe209aa89005a0a34d1525739424569729ee29b5e64a8dd51c5ebdab77f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/4c/063a912e20bcef7124e0df97282a8af3ff3e4b603ce84c481d6d7346be0a/wrapt-1.16.0.tar.gz" + sha256 "5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d" + end + + def install + ENV["SODIUM_INSTALL"] = "system" + virtualenv_install_with_resources + end + + test do + assert_equal "Here are a few popular howdoi commands ", shell_output("#{bin}/howdoi howdoi").split("\n").first + end +end diff --git a/Formula/h/hpack.rb b/Formula/h/hpack.rb new file mode 100644 index 0000000000000..fd54d26cf08df --- /dev/null +++ b/Formula/h/hpack.rb @@ -0,0 +1,63 @@ +class Hpack < Formula + desc "Modern format for Haskell packages" + homepage "https://github.com/sol/hpack" + url "https://github.com/sol/hpack/archive/refs/tags/0.38.1.tar.gz" + sha256 "ccd01b0c737e27bb7c10758fe68fc79c89f0ecf7bfa9c3616938871f0a026ebb" + license "MIT" + head "https://github.com/sol/hpack.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "506faf7c344fc1997660ffda25024706c2b54b1e214dbea969aebad5cf0dc111" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7acb9d1da41078cc9c8cbbc99d6d207a70dc84be8969b36289ba959dfceff13b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d0773c8ef24951ae47c9f8857787ddcb1cfe167e3a26f0947cce5fffa25b88ba" + sha256 cellar: :any_skip_relocation, sonoma: "fd8894d5c462ad64921917b06d6fb5218498c3449be09efc863f7ef403efb27e" + sha256 cellar: :any_skip_relocation, ventura: "e523a9d85f322584f051fe7714f9c83ab58ff17a56deb9ae73526a22f47e7a52" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ecf79f06c6d22e1e71b63d44c89fec1ba2abff56b1e14d51af04e7ae734a6f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8c54054592cd045802666c94874a5637edc6745fa94cda90fc3af1b1d97770c" + 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 + + # Testing hpack is complicated by the fact that it is not guaranteed + # to produce the exact same output for every version. Hopefully + # keeping this test maintained will not require too much churn, but + # be aware that failures here can probably be fixed by tweaking the + # expected output a bit. + test do + (testpath/"package.yaml").write <<~YAML + name: homebrew + dependencies: base + library: + exposed-modules: Homebrew + YAML + expected = <<~EOS + name: homebrew + version: 0.0.0 + build-type: Simple + + library + exposed-modules: + Homebrew + other-modules: + Paths_homebrew + build-depends: + base + default-language: Haskell2010 + EOS + + system bin/"hpack" + + # Skip the first lines because they contain the hpack version number. + assert_equal expected, (testpath/"homebrew.cabal").read.lines[6..].join + end +end diff --git a/Formula/h/hq.rb b/Formula/h/hq.rb new file mode 100644 index 0000000000000..5ec9cc5987b30 --- /dev/null +++ b/Formula/h/hq.rb @@ -0,0 +1,41 @@ +class Hq < Formula + desc "Jq, but for HTML" + homepage "https://github.com/orf/html-query" + url "https://github.com/orf/html-query/archive/refs/tags/html-query-v1.2.2.tar.gz" + sha256 "0fdc12100c178cd2e5ae61c54e640ecb68533017fcee4845ceb4050d1e4fff60" + license "MIT" + + livecheck do + url :stable + regex(/^html-query[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "98303f1643d1cae4cd2c7c12b89eca81e9861cb85a3ff9259b7e91e21cdc81e1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb2ff0f3f904b95e1de83afa9df496e1cdb9e7b884f8bc6d6752e1d4f2e5add2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eb0f1f15deae5619464b105b1fb9ac5c3086e9d74146d8d41155390f48a4eac6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "97c09153ae3ec35218ea7b371ecc89404e391eefa4b8e1510f7aa7ec98b3a0b8" + sha256 cellar: :any_skip_relocation, sonoma: "96168009af37277c094136a7fdfab3de012ffcfe9758becb2ab885279c3cbdfb" + sha256 cellar: :any_skip_relocation, ventura: "1fc6b120bfea15968b556c36a75428a9c5f7df760b73c94e5eff5fc77cc3e714" + sha256 cellar: :any_skip_relocation, monterey: "39119277ab30f7b0f5b5c60905cbe36764eb5aec06ec7b9d6ad1c780afa0cb9f" + sha256 cellar: :any_skip_relocation, arm64_linux: "85a77b0126bc74d1645877c96fda56a2132373d0ec5d32488c8206d2e0367e26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98e9c85bd5a5304f6be3adb3ea8b0b69659f1622fc873dfae7b7fdfbaaee8ed2" + end + + depends_on "rust" => :build + + conflicts_with "proxygen", because: "both install `hq` binaries" + + def install + system "cargo", "install", *std_cargo_args(path: "html-query") + end + + test do + html = testpath/"test.html" + html.write <<~EOS +

Test

+ EOS + output = shell_output("#{bin}/hq '{foo: .foo}' test.html") + assert_match '{"foo":"Test"}', output + end +end diff --git a/Formula/h/hqx.rb b/Formula/h/hqx.rb new file mode 100644 index 0000000000000..1e683efbb2fdf --- /dev/null +++ b/Formula/h/hqx.rb @@ -0,0 +1,56 @@ +class Hqx < Formula + desc "Magnification filter designed for pixel art" + homepage "https://github.com/grom358/hqx" + url "https://github.com/grom358/hqx.git", + tag: "v1.2", + revision: "124c9399fa136fb0f743417ca27dfa2ca2860c2d" + license "LGPL-2.1-or-later" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "d0546464bc8981a17a079d2e9264ae9bbca9cbd7db380b0c2d8c76addf18f4e5" + sha256 cellar: :any, arm64_sonoma: "1d690216c9ec6dedb23e318b8d83da3687dcedf9f1a533ad59e58e6fcf6be39b" + sha256 cellar: :any, arm64_ventura: "83b6c8f9ae3cfcf01fd4745bf1170829206069830a119324cf382c7a258ea66b" + sha256 cellar: :any, arm64_monterey: "09abea6af7106f8bdcf0e58e7b17cd91e1c22074139596a2c4f23afdbf9c9a07" + sha256 cellar: :any, arm64_big_sur: "d782e36758fe3e2a3b354a3c9e021078230934c2bbc2bd4f7043cf7ad570f542" + sha256 cellar: :any, sonoma: "4f96059b9bb168ee276f6cd0ea67f3f21240c03682dfb57ec3b672258100ef57" + sha256 cellar: :any, ventura: "dcf39c5df3a0caa4b58e68cf62d77fb1f5c75fdfb1c2d1cd31dab8ad263d69f5" + sha256 cellar: :any, monterey: "3d8f69b255851ecfcefd4ddaf2011eb70a2a038868001194fcff7f87c777c891" + sha256 cellar: :any, big_sur: "8eccb719985ba896880e42efd7266c24ee920c3952441ac90f8fb327c875b1c0" + sha256 cellar: :any, catalina: "d59524a43357e8590e15fbb039891261b2d3c6c33bf073fece8bfa568c3b9710" + sha256 cellar: :any, mojave: "3714c62ed8c552ddf8242b87845c5d35d17341d44ffea5cc3feceaa2e4c7e960" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb459e2d22d4afeebf2a798b5756a82bdb7658e33fd8c249fa99cac4594fc35f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d10418410cbd8fb6be975c40e233a41031491a307ef05a021f5be55e379063cc" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "php" => :test + depends_on "devil" + + def install + ENV.deparallelize + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"hqx", test_fixtures("test.jpg"), "out.jpg" + output = pipe_output("php -r \"print_r(getimagesize('file://#{testpath}/out.jpg'));\"") + assert_equal <<~EOS, output + Array + ( + [0] => 4 + [1] => 4 + [2] => 2 + [3] => width="4" height="4" + [bits] => 8 + [channels] => 3 + [mime] => image/jpeg + ) + EOS + end +end diff --git a/Formula/h/hr.rb b/Formula/h/hr.rb new file mode 100644 index 0000000000000..5308e5b785322 --- /dev/null +++ b/Formula/h/hr.rb @@ -0,0 +1,21 @@ +class Hr < Formula + desc "
, for your terminal window" + homepage "https://github.com/LuRsT/hr" + url "https://github.com/LuRsT/hr/archive/refs/tags/1.5.tar.gz" + sha256 "d4bb6e8495a8adaf7a70935172695d06943b4b10efcbfe4f8fcf6d5fe97ca251" + license "MIT" + head "https://github.com/LuRsT/hr.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ef156edf072a61b38e5fd50fa8eb8e71f651ed459132490b8994737eb2691ed7" + end + + def install + bin.install "hr" + man1.install "hr.1" + end + + test do + system bin/"hr", "-#-" + end +end diff --git a/Formula/h/hsd.rb b/Formula/h/hsd.rb new file mode 100644 index 0000000000000..5a264ddeb35f1 --- /dev/null +++ b/Formula/h/hsd.rb @@ -0,0 +1,48 @@ +class Hsd < Formula + desc "Handshake Daemon & Full Node" + homepage "https://handshake.org/" + url "https://github.com/handshake-org/hsd/archive/refs/tags/v7.0.1.tar.gz" + sha256 "b00b4250ccb56e42a0075263564bdc9a41b536d903b20af6cb2e87ca9a0e99a6" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "a64c6370b1e09f25dfef73cc662a4781b72b977bf4a27a55ac346701fc71d9e1" + sha256 arm64_sonoma: "93ece0122203241029f6aedb4817ee7f8a751fa9f7307c3b4bac5209eb096b15" + sha256 arm64_ventura: "23eb2c7aa7efe1c0719de0cd083cbff53c2fc09ade911da47e66d5d75b5427fb" + sha256 sonoma: "01cd2eeaf3eb101e8d2f19cf7385168654053a875ca3ef071293918af1c52962" + sha256 ventura: "7df4707762756df9e7f918c4fd4003f1fb45d492f11ae75a3d619e9984a14e45" + sha256 cellar: :any_skip_relocation, arm64_linux: "671cdaf56b2fc2d5f9431b5a9b9bc80ffb9eeedd503e6257da2c5efde884b70a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "168fe038545e6dd92c6efaefc90aa7c8ffd6aa072e3be6c7a990f898a38c5b99" + end + + depends_on "node" + depends_on "unbound" + + 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 hsd = require('#{libexec}/lib/node_modules/hsd'); + assert(hsd); + + const node = new hsd.FullNode({ + prefix: '#{testpath}/.hsd', + memory: false + }); + (async () => { + await node.ensure(); + })(); + JS + system Formula["node"].opt_bin/"node", testpath/"script.js" + assert_predicate testpath/".hsd", :directory? + end +end diff --git a/Formula/h/hspell.rb b/Formula/h/hspell.rb new file mode 100644 index 0000000000000..f3771a3b365c6 --- /dev/null +++ b/Formula/h/hspell.rb @@ -0,0 +1,66 @@ +class Hspell < Formula + desc "Free Hebrew linguistic project" + homepage "http://hspell.ivrix.org.il/" + url "http://hspell.ivrix.org.il/hspell-1.4.tar.gz" + sha256 "7310f5d58740d21d6d215c1179658602ef7da97a816bc1497c8764be97aabea3" + license "AGPL-3.0-only" + + livecheck do + url "http://hspell.ivrix.org.il/download.html" + regex(/href=.*?hspell[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "c40456d586f63147c43885dbad8c72e18bafae62f93305d96e29146465f053e8" + sha256 arm64_sonoma: "86f6240fcd352f4fe5579be572c0e50fb679b689b2e37e9c04c46ca485f8e6de" + sha256 arm64_ventura: "2fcc00698fda6279a021ece352de8c8c7597cabec4ae896416db031215e2dcbb" + sha256 arm64_monterey: "743ad6762f4452a62702961c030950a6d70d36877140dd8728ce45f8d06411c3" + sha256 arm64_big_sur: "421fdc3ab5d0ebde258ce7bdb235d2b50144966a27a74cbbe5c607dff0984c7f" + sha256 sonoma: "3b4967b8ce06e657e8c28d706c3c30975708453f8459b3171797d28e01be103c" + sha256 ventura: "8409b8e239d65f3109f29b1a5317c30c88fb468e1591d1a056c303afd3a95edd" + sha256 monterey: "21abb651324e2e46eae76ae915efe203f198a7a74f7c9144b3d21060fc5a2dfd" + sha256 big_sur: "426c87d91350f33392c862296b5d1b0081bc953adae5c04a9769ebb2a626213f" + sha256 catalina: "a0406d5a4d5adefa40b5e820510a9b7f461fcea6a61112103c112775fff49ae8" + sha256 mojave: "32e8037e9d494241b975c7558635456991285d53c9bbc89005cd6c86744f30e3" + sha256 arm64_linux: "8ad90f494f3f74249ff959d11f18ca5e5e5375f79630d768ed2d67889f1f1597" + sha256 x86_64_linux: "fd7cae8024a97aadce0f713008dba1f27e7254969f689a21c9501d42be84fcdb" + end + + depends_on "autoconf" => :build + + uses_from_macos "zlib" + + # hspell was built for linux and compiles a .so shared library, to comply with macOS + # standards this patch creates a .dylib instead + patch :p0 do + on_macos do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/hspell/1.3.patch" + sha256 "63cc1bc753b1062d1144dcdd959a0a8f712b8872dce89e54ddff2d24f2ca2065" + end + end + + def install + ENV.deparallelize + + # The build scripts rely on "." being in @INC which was disabled by default in perl 5.26 + ENV["PERL_USE_UNSAFE_INC"] = "1" + + # autoconf needs to pick up on the patched configure.in and create a new ./configure + # script + system "autoconf" + + system "./configure", "--prefix=#{prefix}", + "--enable-shared", + "--enable-linginfo" + system "make", "dolinginfo" + system "make", "install" + end + + test do + File.open("test.txt", "w:ISO8859-8") do |f| + f.write "שלום" + end + system bin/"hspell", "-l", "test.txt" + end +end diff --git a/Formula/h/hss.rb b/Formula/h/hss.rb new file mode 100644 index 0000000000000..f6a74542b1823 --- /dev/null +++ b/Formula/h/hss.rb @@ -0,0 +1,51 @@ +class Hss < Formula + desc "Interactive parallel SSH client" + homepage "https://github.com/six-ddc/hss" + url "https://github.com/six-ddc/hss/archive/refs/tags/1.9.tar.gz" + sha256 "d7846ee657fe6a600c7d6f8e91f17ffa238efcaeb6f79856caa9fdedd96e3bca" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c616d7afe8f651f286bb4ae77580bcf33427f770c3d9769f8968bc94ba54d7ef" + sha256 cellar: :any, arm64_sonoma: "2aff0aef887b145023e4a61c093bf041696c8e4d34f38a0cba28cef8ecbd76af" + sha256 cellar: :any, arm64_ventura: "8a236cdb837ab620def9e04659cef476c55b046888dbc0c89047aca8e9fff865" + sha256 cellar: :any, arm64_monterey: "b22fe721a066962a1673c52f8c1152b46c451cd4cfa3672158faefb24533fe5b" + sha256 cellar: :any, arm64_big_sur: "510fa3605e4d856cde1df1fd6af76db46b00b382738004931a6a59cfe78d1a4c" + sha256 cellar: :any, sonoma: "f5525633894624bbe6e098593a2297d52c66385e07c602ef6d1f4152a4519fc4" + sha256 cellar: :any, ventura: "30aee10929522aa5f226d171caf6c072fcc1ca552400262acd5c11c9992c9d07" + sha256 cellar: :any, monterey: "148418af9ede974ce97929a4d2203427b67d8cefd49001e8f70eaae68742b8dd" + sha256 cellar: :any, big_sur: "3b2888677612b095f03226c3a9cd1dbb788233dc909519021f38a4fcbed09a49" + sha256 cellar: :any, catalina: "64bb0e7f8de22316b5cabf7c805e4ce2948a7e44d4490e51bc3012c40acd59e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a5cfe145c4a72af92124dbb88438dfadba9a451fe5c5adf56804ccab9aa274c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afddb5bd47b5545caddb3f178c318eae3074c07a417c194163316981067924a4" + end + + depends_on "readline" + + def install + system "make" + system "make", "install", "INSTALL_BIN=#{bin}" + end + + test do + port = free_port + begin + server = TCPServer.new(port) + accept_pid = fork do + msg = server.accept.gets + assert_match "SSH", msg + end + hss_read, hss_write = IO.pipe + hss_pid = fork do + exec bin/"hss", "-H", "-p #{port} 127.0.0.1", "-u", "root", "true", + out: hss_write + end + server.close + msg = hss_read.gets + assert_match "Connection closed", msg + ensure + Process.kill("TERM", accept_pid) + Process.kill("TERM", hss_pid) + end + end +end diff --git a/Formula/h/hstr.rb b/Formula/h/hstr.rb new file mode 100644 index 0000000000000..f724d0d9b36c0 --- /dev/null +++ b/Formula/h/hstr.rb @@ -0,0 +1,41 @@ +class Hstr < Formula + desc "Bash and zsh history suggest box" + homepage "https://github.com/dvorka/hstr" + url "https://github.com/dvorka/hstr/archive/refs/tags/3.1.tar.gz" + sha256 "e5293d4fe2502662f19c793bef416e05ac020490218e71c75a5e92919c466071" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "76e0d87760c6519a63d6cf0e7719b4683292572ac923e29b9f366d67deae37df" + sha256 cellar: :any, arm64_sonoma: "72781912003352405419c5a62748a8a19807b5ac77691013fb59fe54084617e7" + sha256 cellar: :any, arm64_ventura: "fc49b795a9a4182c314a299e959d3307a90e0dcd349f7a177f4990177fdbbd2d" + sha256 cellar: :any, arm64_monterey: "db9cc4ec008f0de26ed8804a27497ab85e0ef5130cbaff99d36b7a9e290484ed" + sha256 cellar: :any, arm64_big_sur: "27b892cd3e184775eb18ad1538f102470d9ea46f2b12aaeae0c9369eb7d10ae6" + sha256 cellar: :any, sonoma: "8305545469de8189ba8bf0ab46f91bd055beecdb95632e7227f25b3e247963e9" + sha256 cellar: :any, ventura: "dab8c56dc9d4a3c14b97a16e4b7640e911fc263cdf8c0d051ef7b2f5914c5d68" + sha256 cellar: :any, monterey: "4d612879fc6066185b3b1cf9f334f55dfafbab73295bc041d3edc8fd1a2d0be7" + sha256 cellar: :any, big_sur: "196bd9dcd789830ca5ea6f3ee94ba43bf3ec0574cbc21196c0461a20b1b34757" + sha256 cellar: :any_skip_relocation, arm64_linux: "7e90597a53137de8a61011df6b8e453657a4e679e42f1f98da5e9e29259c948f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f3e5c6ea14b17a5e83263bc1df77201cf44eee579f2663656c9912893de7df0" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "readline" + + uses_from_macos "ncurses" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + ENV["HISTFILE"] = testpath/".hh_test" + (testpath/".hh_test").write("test\n") + assert_match "test", shell_output("#{bin}/hh -n").chomp + end +end diff --git a/Formula/h/ht.rb b/Formula/h/ht.rb new file mode 100644 index 0000000000000..f1e162d4d452a --- /dev/null +++ b/Formula/h/ht.rb @@ -0,0 +1,56 @@ +class Ht < Formula + desc "Viewer/editor/analyzer for executables" + homepage "https://hte.sourceforge.net/" + url "https://downloads.sourceforge.net/project/hte/ht-source/ht-2.1.0.tar.bz2" + sha256 "31f5e8e2ca7f85d40bb18ef518bf1a105a6f602918a0755bc649f3f407b75d70" + license "GPL-2.0-only" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_sequoia: "4dcd72bf389cc8babbb16008ededd722842fa9a5fb3141cac62719e06931f7ff" + sha256 cellar: :any, arm64_sonoma: "94baa4793d98e0b2b965672e0881cbf1a5b4c85fab1f6f32b1a13553ffd4dddd" + sha256 cellar: :any, arm64_ventura: "f429f9b9cd7181b2f6ab5f7d75314c975657fe21ab2dbcb4a193b1a090f12bfb" + sha256 cellar: :any, arm64_monterey: "c3cc295c38e1b904ca509a7bbbac2d1a927aa07eb7c1be789c9228b329387be4" + sha256 cellar: :any, arm64_big_sur: "67aa1b783d01e759a908a568cfc1715e614bff7b77171fc82af00e2af682b464" + sha256 cellar: :any, sonoma: "6700769f0daec8cafcaf7d16f9bd6b1e1a7fc3e7afd5011717b7b48368699b7b" + sha256 cellar: :any, ventura: "d704c8f0d899b257967d3478cbeb1e2c093a71e28402747722842908e1e2eff6" + sha256 cellar: :any, monterey: "cf85f1fc8724c40f8f03a109f8a39b35e84358796b8fe17de1e907f49dcad53f" + sha256 cellar: :any, big_sur: "68a9ebfab03bd7d4f5e61d26075d07ee692002a07b8e5f201ae84ebbac45e5dd" + sha256 cellar: :any, catalina: "75ab4e842bc671346e7e75ef512f5f2b3d55008a07d91437a9ba46e9c9dcb1b4" + sha256 cellar: :any, mojave: "9ba777d460dbc11e7c119d6924c765c0d3fb9c50953ed833a07de5e7eb9f6807" + sha256 cellar: :any_skip_relocation, arm64_linux: "63afc8ba699c8e8182ac6271c69f9c52ac4266e4ef1e61b61fcf391339053121" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b74b56b840ef0c1ccbba640ef5625dc0b4f24c6b89220eed18769084064ca590" + end + + depends_on "lzo" + + uses_from_macos "ncurses" + + conflicts_with "texlive", because: "both install `ht` binaries" + + # Apply commit from open PR to work around build failure on Apple Silicon + # ld: building fixups: pointer not aligned at _coff_characteristics+0x1 + # PR ref: https://github.com/sebastianbiallas/ht/pull/31 + patch do + on_macos do + url "https://github.com/sebastianbiallas/ht/commit/a721310665267655d37d9e80db5234d2a7731895.patch?full_index=1" + sha256 "def983c542112d66f472a4a32323948f812bdd30bb1aa54abc5cb5b3ffef1752" + end + end + + def install + # Fix compilation with Xcode 9 + # https://github.com/sebastianbiallas/ht/pull/18 + inreplace "htapp.cc", "(abs(a - b) > 1)", "(abs((int)a - (int)b))" + + chmod 0755, "./install-sh" + system "./configure", "--disable-silent-rules", + "--disable-x11-textmode", + *std_configure_args + system "make", "install" + end + + test do + assert_match "ht #{version}", shell_output("#{bin}/ht -v") + end +end diff --git a/Formula/h/html-xml-utils.rb b/Formula/h/html-xml-utils.rb new file mode 100644 index 0000000000000..229fe40f95cd3 --- /dev/null +++ b/Formula/h/html-xml-utils.rb @@ -0,0 +1,34 @@ +class HtmlXmlUtils < Formula + desc "Tools for manipulating HTML and XML files" + homepage "https://www.w3.org/Tools/HTML-XML-utils/" + url "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-8.7.tar.gz" + sha256 "888a31631a7a70308bb2f333e077d0416f4bb78317f8697ffb4a95187f677301" + license "W3C" + + livecheck do + url :homepage + regex(/href=.*?html-xml-utils[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4bd647931de55d7910433f203fca693d2deeb2c80bc5190464b56cc2d9cd0bc1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae39f3f7704ef5261b41cbddbb1facefde3b3224d12d91ec722a243c11d5cafd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "72ded5b4323716b813c46b80f31f4604fe7bc7611c5795c865bfc68f4a9ad9bf" + sha256 cellar: :any_skip_relocation, sonoma: "ef5904e06e9a4f2381485ae3ff342d68a6dced43269a9c9098bdfc19503ca08e" + sha256 cellar: :any_skip_relocation, ventura: "af7e2d3010b2a13594f27ad96dc45c8a59ada49610aabf24761cb72a210a52ed" + sha256 cellar: :any_skip_relocation, arm64_linux: "63363ff100b473875d5af798b0085b7467363f147bc3d793807f1cb37a6b2192" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f555fdca29f038169dc2499fc0e680e40c30b18b4224b43b3cc7ac5967bef21c" + end + + def install + ENV.append "CFLAGS", "-std=gnu89" + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make" + ENV.deparallelize # install is not thread-safe + system "make", "install" + end + + test do + assert_equal "你好", pipe_output("#{bin}/xml2asc", "你好") + end +end diff --git a/Formula/h/html2markdown.rb b/Formula/h/html2markdown.rb new file mode 100644 index 0000000000000..c6a5c4c2b4fcb --- /dev/null +++ b/Formula/h/html2markdown.rb @@ -0,0 +1,36 @@ +class Html2markdown < Formula + desc "Convert HTML to Markdown" + homepage "https://html-to-markdown.com/" + url "https://github.com/JohannesKaufmann/html-to-markdown/archive/refs/tags/v2.3.2.tar.gz" + sha256 "bb7d3279445c2528e559322dea1f03c3fb348dc0ca47973ce0974809ca88c5fc" + license "MIT" + head "https://github.com/JohannesKaufmann/html-to-markdown.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2d8daf525b9a981be08c65882c5599ebba958df03d67509ae178e695643af711" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d8daf525b9a981be08c65882c5599ebba958df03d67509ae178e695643af711" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2d8daf525b9a981be08c65882c5599ebba958df03d67509ae178e695643af711" + sha256 cellar: :any_skip_relocation, sonoma: "e978957819f668e625e7c8deec0742125f50da04aef584f966704b0f64e74876" + sha256 cellar: :any_skip_relocation, ventura: "e978957819f668e625e7c8deec0742125f50da04aef584f966704b0f64e74876" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b25ae62ee053448efa1cc4179bc88c98702d2de7d4d4062833da810c9142800" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6cdb63e2d006026129b22b42ca38682b761e938086a457a50eac7d14dc98a931" + 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:), "./cli/html2markdown" + end + + test do + assert_match version.to_s, shell_output("#{bin}/html2markdown --version") + + assert_match "**important**", shell_output("echo 'important' | #{bin}/html2markdown") + end +end diff --git a/Formula/h/html2text.rb b/Formula/h/html2text.rb new file mode 100644 index 0000000000000..38230bbba0ac8 --- /dev/null +++ b/Formula/h/html2text.rb @@ -0,0 +1,41 @@ +class Html2text < Formula + desc "Advanced HTML-to-text converter" + homepage "https://github.com/grobian/html2text" + url "https://github.com/grobian/html2text/releases/download/v2.2.3/html2text-2.2.3.tar.gz" + sha256 "859133528b3fd893562e41d84bc1ebc1f9166dd281d0fa8e17e7dd26337f5752" + license "GPL-2.0-or-later" + head "https://github.com/grobian/html2text.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0586df2ecd8a66280ec53b0ae852f22867471b66a60fbd4cb8054a1a2c98b536" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "03b77ee2ee4c1a68b990f2d386ddf70ff2f072da841441f2d4ae0aecf3e95f26" + sha256 cellar: :any_skip_relocation, arm64_ventura: "df6b508a10d46399eaf5f9040974e1b91b1a9efb51d8bf1be3bdb04ca114b567" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f9ee670f7db4188a57c3c7dd563ef3bf45cb36dc90688d9d1f67ee28efc09ccb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fc46b8e76c5aed13521d92cf83e521142115ad206e6e6b7cba03b153ace328ec" + sha256 cellar: :any_skip_relocation, sonoma: "558e4e7ad1247c5f25210a29fd458b82f5dcda8c36ca9e81db5385d9a21107b1" + sha256 cellar: :any_skip_relocation, ventura: "d5aaf31694d77a7b58638596ed3d0aa9bac50b148b60e416dd9cd41306fb2b86" + sha256 cellar: :any_skip_relocation, monterey: "f8a93138c8595992de8d0e9421147b1995d1f4344cf7f94b47f004c76ffe46e9" + sha256 cellar: :any_skip_relocation, big_sur: "b4d67a9b09786e6f9e1141dd88a614493b94c65d47e87e6cecb9a65bcf8b353b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce82baf3b669ad59fb52c489c9aedae804b8463233a3c123a82b2b3ab3bb2ea6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8fa522f9b7031aff66bb0bdabef05c4def2d153a7c6ff5f4136341b06822c5f" + end + + def install + ENV.cxx11 + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + path = testpath/"index.html" + path.write <<~HTML + + + Home +

Hello World

+ + HTML + + assert_equal "Hello World", shell_output("#{bin}/html2text #{path}").strip + end +end diff --git a/Formula/h/htmlcleaner.rb b/Formula/h/htmlcleaner.rb new file mode 100644 index 0000000000000..fdfb3e223f38e --- /dev/null +++ b/Formula/h/htmlcleaner.rb @@ -0,0 +1,35 @@ +class Htmlcleaner < Formula + desc "HTML parser written in Java" + homepage "https://htmlcleaner.sourceforge.net/" + url "https://downloads.sourceforge.net/project/htmlcleaner/htmlcleaner/htmlcleaner%20v2.29/htmlcleaner-src-2.29.zip" + sha256 "9fc68d7161be6f34f781e109bf63894d260428f186d88f315b1d2e3a33495350" + license "BSD-3-Clause" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1ee4cfa168e59ef59a77de847f53f23c4f9a2a7be9a1f1844608c72b5ff1b7af" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "35348580167a179573bf545a60831a398a8d70a0c567d313acdb1707d9068d15" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b8823d1ba1ef2e847fe95da75054ec681d3aafcafef2c1bf084b7f917c02884c" + sha256 cellar: :any_skip_relocation, sonoma: "5e7f1b1c468d1a5ead2ed450fed70e621ee5b429486da31ac05474d9871473ed" + sha256 cellar: :any_skip_relocation, ventura: "8dc19a84c07fee65cef8e0889cae31a1e9f1a437f78911808340bbaf5a7a9a2b" + sha256 cellar: :any_skip_relocation, arm64_linux: "0cdd1dd6b3a16f874d8980cc78f599dddc97713c322b5e8f962a7cf88810efd9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "49d3b92068ee5e037f6efe9232227d6b49069c0f6e0a09a1abd34467290755b1" + end + + depends_on "maven" => :build + depends_on "openjdk" + + def install + ENV["JAVA_HOME"] = Language::Java.java_home + system "mvn", "clean", "package", "-DskipTests=true", "-Dmaven.javadoc.skip=true" + libexec.install "target/htmlcleaner-#{version}.jar" + bin.write_jar_script libexec/"htmlcleaner-#{version}.jar", "htmlcleaner" + end + + test do + path = testpath/"index.html" + path.write "" + assert_match "", shell_output("#{bin}/htmlcleaner src=#{path}") + end +end diff --git a/Formula/htmlcompressor.rb b/Formula/h/htmlcompressor.rb similarity index 79% rename from Formula/htmlcompressor.rb rename to Formula/h/htmlcompressor.rb index 76644ac1fa8e6..72016a3978933 100644 --- a/Formula/htmlcompressor.rb +++ b/Formula/h/htmlcompressor.rb @@ -3,8 +3,14 @@ class Htmlcompressor < Formula homepage "https://code.google.com/archive/p/htmlcompressor/" url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/htmlcompressor/htmlcompressor-1.5.3.jar" sha256 "88894e330cdb0e418e805136d424f4c262236b1aa3683e51037cdb66310cb0f9" + license "Apache-2.0" - bottle :unneeded + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "a8323e2d6001cc0effb3c29900f977118d35fc4a0a86be9cd49d0fa133d04f23" + end + + depends_on "openjdk" def install libexec.install "htmlcompressor-#{version}.jar" diff --git a/Formula/h/htmlcxx.rb b/Formula/h/htmlcxx.rb new file mode 100644 index 0000000000000..e6ed4f64245cf --- /dev/null +++ b/Formula/h/htmlcxx.rb @@ -0,0 +1,42 @@ +class Htmlcxx < Formula + desc "Non-validating CSS1 and HTML parser for C++" + homepage "https://htmlcxx.sourceforge.net/" + url "https://downloads.sourceforge.net/project/htmlcxx/v0.87/htmlcxx-0.87.tar.gz" + sha256 "5d38f938cf4df9a298a5346af27195fffabfef9f460fc2a02233cbcfa8fc75c8" + license all_of: ["LGPL-2.0-only", "Apache-2.0"] + + bottle do + sha256 arm64_sequoia: "e1cb2639240425d10dcaea3639f09ae7b7795141d85b562d5df0fd79709c6edc" + sha256 arm64_sonoma: "a0db079df456a6240676663a280b60f12ef280c2a83f3f4a3a7c41a9e5bd719d" + sha256 arm64_ventura: "a89f6f97c7cdaa4ad3734786c0a15c2bbbfd6ba703127c9239bff75e89ace62a" + sha256 arm64_monterey: "f0b1e84a587e9c944b7e6d1952b1feea22e223897a12adf51e28f51ec9bf4e9d" + sha256 arm64_big_sur: "076a461f50d225b8f6d7b1d1541b0fcdb2fba0af77e28d2524815e5d912b623e" + sha256 sonoma: "65361151ac13372109b4cda9bb852c32b6d53ffbeb8cdbe04aabf85671ac61bc" + sha256 ventura: "61b23db961d207a125bb6443e2d76d9e2a4d8d89443165c385962be172ed8c09" + sha256 monterey: "2f62b3bfd180f22804cf7df3161f018769be76311e4d740cc619f3fb2766a1aa" + sha256 big_sur: "5afe59e8f11f3ee3d04448c1e885b433cdcb356c6aaa80bc1e8ed0f6b0c0ec95" + sha256 catalina: "8414d919ae850983832803af525e8b98d3e5aa106c47b05f420d77020c7c99ca" + sha256 mojave: "e910595c43c028e25e0e0a44203e3c95b229162ea89678721b4a7f6e22974aca" + sha256 high_sierra: "062a4b1629ab6f28e59ef0ea15c257c8bfd9e3646f3342fbfe14268727be7649" + sha256 sierra: "4407cb1a50e8d629db9b93bdbbbf2a0892967611f7e579c49c0d084769f8a5ca" + sha256 arm64_linux: "6302595c7cf05e040aa5cfbfec3b91408e5c6769f4117a2e7d8d0103c9e492a2" + sha256 x86_64_linux: "ba29d98077036799d68c6c6dc56e0e7fa28aee700a89f4128a2d10a29d1ab39e" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + ENV.cxx11 + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_equal version.to_s, shell_output("#{bin}/htmlcxx -V 2>&1").chomp + end +end diff --git a/Formula/h/htmldoc.rb b/Formula/h/htmldoc.rb new file mode 100644 index 0000000000000..9622367ec3289 --- /dev/null +++ b/Formula/h/htmldoc.rb @@ -0,0 +1,41 @@ +class Htmldoc < Formula + desc "Convert HTML to PDF or PostScript" + homepage "https://www.msweet.org/htmldoc/" + url "https://github.com/michaelrsweet/htmldoc/archive/refs/tags/v1.9.20.tar.gz" + sha256 "a155c86c69f90a426ff7244bd046bad026cc5ba9ac2be89dcb1d7973c52d5d82" + license "GPL-2.0-only" + head "https://github.com/michaelrsweet/htmldoc.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "5183e094ab3128b038025333172df99251d2a4f1db6c409d892eba9ff9967270" + sha256 arm64_sonoma: "3957858cee344323b79f139e3659f40112509a8a63305422c18a523f3a4ebd78" + sha256 arm64_ventura: "fc6b29637b2e230ee3f969118df765352cc4c55c496ba0aa28b3ccd8db3fa762" + sha256 sonoma: "7bb2bc2ad093d1d9ab36698bb927dd6ace11ca733f300c18bf8f7299588cf1a4" + sha256 ventura: "905cc97f81a0215aa7b1c90b8679ed67e5446b1b533173f2a2d288b4db4fbc96" + sha256 arm64_linux: "74408397b4af6c258673102b7951aefbed87b8bf0522853139308b2e599d7e88" + sha256 x86_64_linux: "cff32d4cdcf1043c08056a4a3bcacb77de58c679c878bbe983f8de9fc75d438c" + end + + depends_on "pkgconf" => :build + depends_on "jpeg-turbo" + depends_on "libpng" + + uses_from_macos "cups" + uses_from_macos "zlib" + + on_linux do + depends_on "gnutls" + end + + def install + system "./configure", "--mandir=#{man}", + "--without-gui", + *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"htmldoc", "--version" + end +end diff --git a/Formula/h/htmlq.rb b/Formula/h/htmlq.rb new file mode 100644 index 0000000000000..ed48aedfc4cee --- /dev/null +++ b/Formula/h/htmlq.rb @@ -0,0 +1,55 @@ +class Htmlq < Formula + desc "Uses CSS selectors to extract bits content from HTML files" + homepage "https://github.com/mgdm/htmlq" + url "https://github.com/mgdm/htmlq/archive/refs/tags/v0.4.0.tar.gz" + sha256 "c2954c0fcb3ada664b14834646aa0a2c4268683cc51fd60d47a71a9f7e77d4b9" + license "MIT" + head "https://github.com/mgdm/htmlq.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dad7b90fdb9cf7781efc52510275c94be20072923755c429fcbc72f0101fbc7d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e2a2cabca03421c79492a6928576d7e6282ce001a17e278b89335f37717d29ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0b48cd78910d620c598a8102cc8801f0155b8aee452440b6f6d965e931488906" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2e03e8a2c059ad4ac3454ad2b4cc70fb77e7883d7141f6f10d8a9bfe9c421b53" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "abf6473f80399fc7dd8252a2c35dff388c142ca028de0128b26defc46f6f107f" + sha256 cellar: :any_skip_relocation, sonoma: "751848732c51050f5fe2e00e8ddbe287b4dd399e34f44f2dece25672c795b25c" + sha256 cellar: :any_skip_relocation, ventura: "dd3223cb5afa829c8519e42515d06f56d6d815794af40d8c7ff932aacb3d3634" + sha256 cellar: :any_skip_relocation, monterey: "c2dc9b6cb1914175ee46979f7edcf7d6883b9234da5f85711fd7f58ebef11e44" + sha256 cellar: :any_skip_relocation, big_sur: "f14e7cff6db455661e178db9d57b3b5cbc172c4bc3903d959ee1b5f38bf816a2" + sha256 cellar: :any_skip_relocation, catalina: "4a790da130fb9f4db4d43051df1fbcf409b6dbd49293d757411cd5118c9e18e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "feb04cd2b99368ec5b5ad4119906d9766235c8d88ab842f26ec35126c9c535a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b93418d06723d65a8da8cb3c34819f24f825a057efc7788bf45f0db3484abf13" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.html").write <<~HTML + + + + Example Domain + + + + + +
+

Example Domain

+

This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.

+

More information...

+
+ + + HTML + + test_html = testpath/"test.html" + assert_equal "More information...\n", pipe_output("#{bin}/htmlq -t p a", test_html.read) + assert_equal "Example Domain\n", pipe_output("#{bin}/htmlq -t h1:first-child", test_html.read) + end +end diff --git a/Formula/h/htmltest.rb b/Formula/h/htmltest.rb new file mode 100644 index 0000000000000..b7b38649439a3 --- /dev/null +++ b/Formula/h/htmltest.rb @@ -0,0 +1,48 @@ +class Htmltest < Formula + desc "HTML validator written in Go" + homepage "https://github.com/wjdp/htmltest" + url "https://github.com/wjdp/htmltest/archive/refs/tags/v0.17.0.tar.gz" + sha256 "2c89e56c837f4d715db9816942e007c973ba58de53d249abc80430c4b7e72f88" + license "MIT" + head "https://github.com/wjdp/htmltest.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ada8e26674de531245f8110ab62f73f5f89600f133b22765077d14a0ff06f3e7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6c40c1199909f13636e2a5707f87e17f275efdaeef1f192f34b05e01eeee7491" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2085a020402e7b50b3f536995df8767f4ae61d0839fff353d5e2c246aacd63be" + sha256 cellar: :any_skip_relocation, arm64_monterey: "89d683e7134fbf979b69b3ac6d40b9b1990497b628340b1251375a3ed3b7d478" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0fe78109831dc567098f963166d242a8bcff1dd100a4b9d48b4e5abe8c79b4e3" + sha256 cellar: :any_skip_relocation, sonoma: "3012d7148925ee8a9234c8b20951f300ecb97a7b7805f3b428edf1ac4b2ae128" + sha256 cellar: :any_skip_relocation, ventura: "306cdfed4300789dfd04480c4ebf16120a1ce8f7e5ecc9dae31ba503a47dc574" + sha256 cellar: :any_skip_relocation, monterey: "c3090218a14bc1b7d07c024d6170a9282870d3c43f5d2484dc9580659566e35d" + sha256 cellar: :any_skip_relocation, big_sur: "26151c135b1d83a1f14cc600f2e70e69e8d5c1f0cbe7fc0c27287799ef5a454b" + sha256 cellar: :any_skip_relocation, catalina: "5318d8a460992bebaf2fd7f0df04d984a9694b5abe86aaac97431359612d3bf5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "86bac90087af2f141f80bfdc6e3c77220e26ec9097831d030b5f1c4264d7ddbc" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -X main.date=#{time.iso8601} + -X main.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + (testpath/"test.html").write <<~HTML + + + + +
+

Some text

+
+ + + HTML + assert_match "htmltest started at", shell_output("#{bin}/htmltest test.html") + end +end diff --git a/Formula/h/htop.rb b/Formula/h/htop.rb new file mode 100644 index 0000000000000..7fd70263e181a --- /dev/null +++ b/Formula/h/htop.rb @@ -0,0 +1,53 @@ +class Htop < Formula + desc "Improved top (interactive process viewer)" + homepage "https://htop.dev/" + url "https://github.com/htop-dev/htop/archive/refs/tags/3.4.1.tar.gz" + sha256 "af9ec878f831b7c27d33e775c668ec79d569aa781861c995a0fbadc1bdb666cf" + license "GPL-2.0-or-later" + head "https://github.com/htop-dev/htop.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "275705af5f32669121f09010359ed54a913cd25c268cde4956753da6d3ed73c9" + sha256 cellar: :any, arm64_sonoma: "f8c77ed7920bc1a2b6bc2fa7eb578dfc12a061142bc29729f9cb66d3ac7c0234" + sha256 cellar: :any, arm64_ventura: "c848a84e90f7882cee84f24fe5c6d77c38b8530eaef24ef09172fc54c1c81ca3" + sha256 cellar: :any, sonoma: "66f129d4a7275937877eb128b208a53879d8a7c518903522ff0a7318f84d9867" + sha256 cellar: :any, ventura: "e046c6078e2d30e54f2d0b10417b9b0e6de02aa31d889586cd1d3a5e87b8643c" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f1eb1a8b344bda3f1f805743419260c0187ea3a05fdce7bb23708b085261a4f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33b22b0ce29e0e73a86575daeaf0a01c6bb913f95d0b54172bba9021ec514fa7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "ncurses" # enables mouse scroll + + on_linux do + depends_on "lm-sensors" + end + + def install + system "./autogen.sh" + args = ["--prefix=#{prefix}"] + args << "--enable-sensors" if OS.linux? + system "./configure", *args + system "make", "install" + end + + def caveats + <<~EOS + htop requires root privileges to correctly display all running processes, + so you will need to run `sudo htop`. + You should be certain that you trust any software you grant root privileges. + EOS + end + + test do + pipe_output(bin/"htop", "q", 0) + end +end diff --git a/Formula/h/htpdate.rb b/Formula/h/htpdate.rb new file mode 100644 index 0000000000000..bb2499f2fe66f --- /dev/null +++ b/Formula/h/htpdate.rb @@ -0,0 +1,36 @@ +class Htpdate < Formula + desc "Synchronize time with remote web servers" + homepage "https://www.vervest.org/htp/" + url "https://www.vervest.org/htp/archive/c/htpdate-2.0.0.tar.gz" + sha256 "52f25811f00dfe714e0bcf122358ee0ad74e25db3ad230d5a4196e7a62633f27" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.vervest.org/htp/?download" + regex(/href=.*?htpdate[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe928ac1ad4a1d522e627c3f4d5ff49fbb6854618915ef2e637e11b86cd48be1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a5c342e659f6ecae78ec9b538f84da8240bde60848f6fbd3166773c44401c83" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ecdc7014e50912857698372140ac946170a739c23b41614895872586daba71c0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ef4adc85d46ad9b58f71f397295288eceaa19f98e808e50059dfe0f0a01602e7" + sha256 cellar: :any_skip_relocation, sonoma: "c4893b5b8412f014565d366bdb4d95feae8572a9328aa341e41e27056d26cb75" + sha256 cellar: :any_skip_relocation, ventura: "687a2c378cb61476b28d932c3b4de170337bdaf22003b55d82c7a50b58ef762a" + sha256 cellar: :any_skip_relocation, monterey: "c09f96724bae5ae13b7b84c7e76b1f0a2c8f362e6e007fd4187ad18c0afb9364" + sha256 cellar: :any_skip_relocation, arm64_linux: "be4c2fa2c9b1e31a45e406d8a888a1f77200fa2355e1fbf09b27ae77ebdae007" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c769ab62c46610dd1986c757bb70a42cd446e9e0292e0fca80cd60a33e752b1e" + end + + def install + system "make", "prefix=#{prefix}", + "STRIP=/usr/bin/strip", + "CC=#{ENV.cc}", + "CFLAGS=#{ENV.cflags}", + "install" + end + + test do + system "#{sbin}/htpdate", "-q", "-d", "-u", ENV["USER"], "example.org" + end +end diff --git a/Formula/h/htslib.rb b/Formula/h/htslib.rb new file mode 100644 index 0000000000000..ece7decf3eac7 --- /dev/null +++ b/Formula/h/htslib.rb @@ -0,0 +1,56 @@ +class Htslib < Formula + desc "C library for high-throughput sequencing data formats" + homepage "https://www.htslib.org/" + url "https://github.com/samtools/htslib/releases/download/1.21/htslib-1.21.tar.bz2" + sha256 "84b510e735f4963641f26fd88c8abdee81ff4cb62168310ae716636aac0f1823" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5666590893b28330ba567928e6c9a3f9df35f31bbe1141715f598943ea2792ac" + sha256 cellar: :any, arm64_sonoma: "13cfebf52afda554d0356c9c15fadaf0361a13b63354f6fd6408070cc2189dc2" + sha256 cellar: :any, arm64_ventura: "140f35781a6dca49898ee9b16cd8d9566b67147508604da63b1dc614cf4acad9" + sha256 cellar: :any, arm64_monterey: "6631954131f70ee19111f4c9f1c7920995333638a66959714d63bb81effdd07f" + sha256 cellar: :any, sonoma: "9242245655ac588d50e779950bd07525c5a5ffa3fd84531d837336c67dd5c85c" + sha256 cellar: :any, ventura: "5fb7968f1ee7824d0c42550ba6441559f3d2d61ded9b838fbc9e4681f8b9a0e7" + sha256 cellar: :any, monterey: "7643426f0e6a8958f63fdc0cb0fe0c259e1da50eb22d19f74f26a53f62520309" + sha256 cellar: :any_skip_relocation, arm64_linux: "97b70d9fd20c7fd47e0b50c2a1cdade309327051a43b6c9b0ec306971deabb7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5a5a9b188b427ad39f32bd45f8420f46e7bb0d4fc03e1eb46a3b1f78d97d67d" + end + + depends_on "libdeflate" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + end + + def install + system "./configure", "--prefix=#{prefix}", "--enable-libcurl", "--with-libdeflate" + system "make", "install" + end + + test do + sam = testpath/"test.sam" + sam.write <<~EOS + @SQ SN:chr1 LN:500 + r1 0 chr1 100 0 4M * 0 0 ATGC ABCD + r2 0 chr1 200 0 4M * 0 0 AATT EFGH + EOS + assert_match "SAM", shell_output("#{bin}/htsfile #{sam}") + + system "#{bin}/bgzip -c #{sam} > sam.gz" + assert_path_exists testpath/"sam.gz" + + system bin/"tabix", "-p", "sam", "sam.gz" + assert_path_exists testpath/"sam.gz.tbi" + end +end diff --git a/Formula/h/httm.rb b/Formula/h/httm.rb new file mode 100644 index 0000000000000..2daefb6546fad --- /dev/null +++ b/Formula/h/httm.rb @@ -0,0 +1,43 @@ +class Httm < Formula + desc "Interactive, file-level Time Machine-like tool for ZFS/btrfs" + homepage "https://github.com/kimono-koans/httm" + url "https://github.com/kimono-koans/httm/archive/refs/tags/0.47.1.tar.gz" + sha256 "30174bbf0ee2c29590e2ae768393ca7ffc302f2a4b4bc481f363f8e51cfcf757" + license "MPL-2.0" + head "https://github.com/kimono-koans/httm.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fd1e4b21776718c195d290908adc114e55e9a9781efe9c674bec2d772c878454" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2b535b8f6af070b69c564685f95ab327280e50380c7340b9fdf9902fd0c47452" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d1d3f71082d7a3c857b1d521c7d7b50f87494dd896d4fde168e27722f127976" + sha256 cellar: :any_skip_relocation, sonoma: "451cd03a1a8f3d5f7fcaceed122e491aa0cf39a30844e4adcf1d2d595d32acba" + sha256 cellar: :any_skip_relocation, ventura: "3326dea5e03098bf848d4fd3d291df5d7af40434ffbd405391f63ed1127e20d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a1eba7d2901122f117ec77d693c41ab7daa8226fe9eaf8a544c56ab86141971" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6210e69750e71567c1c429be7215be6f1e09489ea5d9df6d9140d009469992a" + end + + depends_on "rust" => :build + + on_linux do + depends_on "acl" + end + + conflicts_with "nicotine-plus", because: "both install `nicotine` binaries" + + def install + system "cargo", "install", "--features", "xattrs,acls", *std_cargo_args + man1.install "httm.1" + + bin.install "scripts/ounce.bash" => "ounce" + bin.install "scripts/bowie.bash" => "bowie" + bin.install "scripts/nicotine.bash" => "nicotine" + bin.install "scripts/equine.bash" => "equine" + end + + test do + touch testpath/"foo" + assert_equal "ERROR: httm could not find any valid datasets on the system.", + shell_output("#{bin}/httm #{testpath}/foo 2>&1", 1).strip + assert_equal "httm #{version}", shell_output("#{bin}/httm --version").strip + end +end diff --git a/Formula/h/http-prompt.rb b/Formula/h/http-prompt.rb new file mode 100644 index 0000000000000..2265178858acd --- /dev/null +++ b/Formula/h/http-prompt.rb @@ -0,0 +1,154 @@ +class HttpPrompt < Formula + include Language::Python::Virtualenv + + desc "Interactive command-line HTTP client with autocomplete and syntax highlighting" + homepage "https://http-prompt.com/" + url "https://files.pythonhosted.org/packages/bf/e2/bc5b0df107afcac65fde7015df48cbe9b4d877d1d0818203544ed1a41d4c/http-prompt-2.1.0.tar.gz" + sha256 "eee71a00fed0b8a2a35bb338b269be7a20e8a1a6f6465a65561d76a21521e7f3" + license "MIT" + revision 10 + head "https://github.com/httpie/http-prompt.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "b011c69d4afbef3f74f82823d1b6e097385967a71228e18b3dc9a4e756b12079" + sha256 cellar: :any, arm64_sonoma: "53659c6f09f90fb0f3d71f22f6757f7d7bc9fc05709f7eeb6af46bdf2528829a" + sha256 cellar: :any, arm64_ventura: "e569ae1a14a4e5a911d32c8ae67811f38f1b0cdf34f745dc98e50e4ee8005a2b" + sha256 cellar: :any, sonoma: "d9c8f46296414e0d9d1b33f93bb52b82a713cf288296ff6ad9ed67c46b4248fe" + sha256 cellar: :any, ventura: "33c3a14f21a42a7ecf2baaa509b8e9138f7304843391a8a30afb6b922666fceb" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd8727c82b5fc415a6e1f2fd600d3c23ec8b6813110da4d32c84a63858d0b0cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "797fda91cbe2f3fa31dd291dd6eb10821eabdd0f58f4dba6b8ed081009c99c11" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "httpie" do + url "https://files.pythonhosted.org/packages/3e/bb/aefb0abbdbadeb9e8e7f04fb0f1942bc084f4215bf8dc729236153d09e1e/httpie-3.2.4.tar.gz" + sha256 "302ad436c3dc14fd0d1b19d4572ef8d62b146bcd94b505f3c2521f701e2e7a2a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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 "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/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + end + + resource "parsimonious" do + url "https://files.pythonhosted.org/packages/7b/91/abdc50c4ef06fdf8d047f60ee777ca9b2a7885e1a9cea81343fbecda52d7/parsimonious-0.10.0.tar.gz" + sha256 "8281600da180ec8ae35427a4ab4f7b82bfec1e3d1e52f80cb60ea82b9512501c" + 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 "pygments" do + url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f9/38/148df33b4dbca3bd069b963acab5e0fa1a9dbd6820f8c322d0dd6faeff96/regex-2024.9.11.tar.gz" + sha256 "6c188c307e8433bcb63dc1915022deb553b4203a70722fc542c363bf120a01fd" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/ed/22/a438e0caa4576f8c383fa4d35f1cc01655a46c75be358960d815bfbb12bd/setuptools-75.3.0.tar.gz" + sha256 "fba5dd4d766e97be1b1681d98712680ae8f2f26d7881245f2ce9e40714f1a686" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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 + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"http-prompt", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + require "pty" + require "expect" + + test_url = "http://brew.sh/" + + PTY.spawn(bin/"http-prompt", test_url) do |read, write, _pid| + read.expect(/#{test_url}> /) + write.puts "get > test.html" + read.expect(/#{test_url}> /) + write.puts "exit" + read.expect(/Goodbye!/) + end + + assert_match(/^/, (testpath/"test.html").read) + end +end diff --git a/Formula/h/http-server-rs.rb b/Formula/h/http-server-rs.rb new file mode 100644 index 0000000000000..17360e647075e --- /dev/null +++ b/Formula/h/http-server-rs.rb @@ -0,0 +1,40 @@ +class HttpServerRs < Formula + desc "Simple and configurable command-line HTTP server" + homepage "https://github.com/http-server-rs/http-server" + url "https://github.com/http-server-rs/http-server/archive/refs/tags/v0.8.9.tar.gz" + sha256 "b385a979946efb9421f49b698ce9fe1f0e590a96797e72e8e441bebd6ce65bb6" + license "Apache-2.0" + head "https://github.com/http-server-rs/http-server.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe010697a6d9851c061d2939929b4e6f9750ad2612ba486b35610175da62c604" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6f29de99576b74d2398a7fc093bc700a3de1d7d5c1db98224c3750c1ae79226" + sha256 cellar: :any_skip_relocation, arm64_ventura: "07f0f7eaf185964fa80e46e9b0b797c8f454345fb3eb72d21ca618379c59602d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "02223f122e30366797da3e9016ce454653dc8db7a07f79fbd6392aa42dee20a3" + sha256 cellar: :any_skip_relocation, sonoma: "9fd1a8e7f2e528913edb6e48b07d03d61b7b39e63173b77e64696394a5f33318" + sha256 cellar: :any_skip_relocation, ventura: "2b555ba245fc88ce42aacc38c80c1409176d0f7900d85945609111bc3bdf6573" + sha256 cellar: :any_skip_relocation, monterey: "6611eb126def91614acb470f6393229f827905ee621fedf4f3791f8c94cff625" + sha256 cellar: :any_skip_relocation, arm64_linux: "619764056faf97e193acababdbd3afc2f94c239dbfa695cefc953836445d653f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "580cdfea1cd7aacdc67e69c5db6e16f057c8a459c8567b0eea601628c30352b7" + end + + depends_on "rust" => :build + + conflicts_with "http-server", because: "both install a `http-server` binary" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + touch testpath/"foobar" + port = free_port + pid = fork { exec bin/"http-server", "-q", "-p", port.to_s } + sleep 3 + output = shell_output("curl -s http://localhost:#{port}") + assert_match "foobar", output + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end +end diff --git a/Formula/h/http-server.rb b/Formula/h/http-server.rb new file mode 100644 index 0000000000000..3a0ecfbb710de --- /dev/null +++ b/Formula/h/http-server.rb @@ -0,0 +1,43 @@ +class HttpServer < Formula + desc "Simple zero-configuration command-line HTTP server" + homepage "https://github.com/http-party/http-server" + url "https://registry.npmjs.org/http-server/-/http-server-14.1.1.tgz" + sha256 "9e1ceb265d09a4d86dcf509cb4ba6dcd2e03254b1d13030198766fe3897fd7a5" + license "MIT" + head "https://github.com/http-party/http-server.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bb1d84d1666919ec7a065dbb8d7a33a6b66ec0d853566efb9fbef8257202c827" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b8798ac5ea1972bc153b971db14968ada2527c73c4ac4c442f3c3e2c2d2b0802" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b8798ac5ea1972bc153b971db14968ada2527c73c4ac4c442f3c3e2c2d2b0802" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b8798ac5ea1972bc153b971db14968ada2527c73c4ac4c442f3c3e2c2d2b0802" + sha256 cellar: :any_skip_relocation, sonoma: "b8798ac5ea1972bc153b971db14968ada2527c73c4ac4c442f3c3e2c2d2b0802" + sha256 cellar: :any_skip_relocation, ventura: "b8798ac5ea1972bc153b971db14968ada2527c73c4ac4c442f3c3e2c2d2b0802" + sha256 cellar: :any_skip_relocation, monterey: "b8798ac5ea1972bc153b971db14968ada2527c73c4ac4c442f3c3e2c2d2b0802" + sha256 cellar: :any_skip_relocation, arm64_linux: "aef704031b11e99b66edc4bd3807d1ea4b4c365582ae6d5d6b669303e2368332" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9f714a6e9f2aae98529f5cf3c01587a9c3ff867ad8aa8446453a62688ff4bb4" + end + + depends_on "node" + + conflicts_with "http-server-rs", because: "both install a `http-server` binary" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + port = free_port + + pid = fork do + exec bin/"http-server", "-p#{port}" + end + sleep 3 + output = shell_output("curl -sI http://localhost:#{port}") + assert_match "200 OK", output + ensure + Process.kill("HUP", pid) + end +end diff --git a/Formula/h/http_load.rb b/Formula/h/http_load.rb new file mode 100644 index 0000000000000..ac95d5ed4da97 --- /dev/null +++ b/Formula/h/http_load.rb @@ -0,0 +1,60 @@ +class HttpLoad < Formula + desc "Test throughput of a web server by running parallel fetches" + homepage "https://www.acme.com/software/http_load/" + url "https://www.acme.com/software/http_load/http_load-09Mar2016.tar.gz" + version "20160309" + sha256 "5a7b00688680e3fca8726dc836fd3f94f403fde831c71d73d9a1537f215b4587" + license "BSD-2-Clause" + revision 2 + + livecheck do + url :homepage + regex(/href=.*?http_load[._-]v?(\d+[a-z]+\d+)\.t/i) + strategy :page_match do |page, regex| + # Convert date-based version from 09Mar2016 format to 20160309 + page.scan(regex).map do |match| + date_str = match&.first + date_str ? Date.parse(date_str)&.strftime("%Y%m%d") : nil + end + end + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "3d19f59b28f7f602e80aef16d2455d98513a6886a58910287ac5845bdcd9733b" + sha256 cellar: :any, arm64_sonoma: "185664add7e628ad4614228aef6bf0b18356077ddd71abf3eae39ae12a2e2d03" + sha256 cellar: :any, arm64_ventura: "4349eea05cac8aef36a6243f8051208cddfda24966252b1ca079c3a89855b913" + sha256 cellar: :any, arm64_monterey: "b4a5b7e79f524a59d414c14ff40ea8ad5a0871a6c98606e721c8f83320cdd230" + sha256 cellar: :any, arm64_big_sur: "f8ad486c4e8c9eb7f5204584c74de6e366e3e2ab1452682dc9904badec75e4d5" + sha256 cellar: :any, sonoma: "27129e350fa06c4e302145c55a83a0b41f4ab96ebf371de001151d537929ccb8" + sha256 cellar: :any, ventura: "a6416934e52f12730249f9175afefb89dda92f939aa880961b48613561eeb124" + sha256 cellar: :any, monterey: "03949d76fa9a565a4e52e3219a097eef0453bb082a77674a16a66e407f6bba24" + sha256 cellar: :any, big_sur: "04650d6cbf5dce7109ed1ce45a1bad45ae6d2706d3b5dd2baf411b198a3c5e27" + sha256 cellar: :any, catalina: "6989c80f8d5213ed9e9586707e8ce2ab503b5d7bf6d10fadddd8bc310575f452" + sha256 cellar: :any_skip_relocation, arm64_linux: "21d002bd2aa7f0c6f9bb57c13777d961e01a3e149769017c6ed91cb4a1ea0f1c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5172c491fea4e76a68983d8fe6563a97e2ed2bef73b6bb0c95f5290282343116" + end + + depends_on "openssl@3" + + def install + bin.mkpath + man1.mkpath + + args = %W[ + BINDIR=#{bin} + LIBDIR=#{lib} + MANDIR=#{man1} + CC=#{ENV.cc} + SSL_TREE=#{Formula["openssl@3"].opt_prefix} + ] + + inreplace "Makefile", "#SSL_", "SSL_" + system "make", "install", *args + end + + test do + (testpath/"urls").write "https://brew.sh/" + system bin/"http_load", "-rate", "1", "-fetches", "1", "urls" + end +end diff --git a/Formula/h/httpd.rb b/Formula/h/httpd.rb new file mode 100644 index 0000000000000..1854ef44d7037 --- /dev/null +++ b/Formula/h/httpd.rb @@ -0,0 +1,182 @@ +class Httpd < Formula + desc "Apache HTTP server" + homepage "https://httpd.apache.org/" + url "https://dlcdn.apache.org/httpd/httpd-2.4.63.tar.bz2" + mirror "https://downloads.apache.org/httpd/httpd-2.4.63.tar.bz2" + sha256 "88fc236ab99b2864b248de7d49a008ec2afd7551e64dce8b95f58f32f94c46ab" + license "Apache-2.0" + + bottle do + sha256 arm64_sequoia: "9ca7b90378d07613eb7f25d3f254e3c988392b6aa03724e2a391fc3900200b94" + sha256 arm64_sonoma: "3cac4f194862dc3e6f0676a10307810a2b623603fd8d2e7b82e867a4dccc01ab" + sha256 arm64_ventura: "cfc960b54bf8dbdc87fc91de6cbad9a9e8c1775d69659ee206d6bbdd0d9d8cea" + sha256 sonoma: "e0854ef063e66912912753c71fd85f4e92cc59930ed824974ca2b9709ddcaaaf" + sha256 ventura: "d873c7c33a633d07739c0cef9551074dc53d5480a16e82c302f0ec0e9c01359b" + sha256 arm64_linux: "0d503fbd29ac1ba3f7b4ceed16358437ffabdebfae412386073dcf9986593468" + sha256 x86_64_linux: "82136824ca8efeb096ba9236bf103b87d91d52e2c2de3081775fcbc9e7df55eb" + end + + depends_on "apr" + depends_on "apr-util" + depends_on "brotli" + depends_on "libnghttp2" + depends_on "openssl@3" + depends_on "pcre2" + + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + def install + # fixup prefix references in favour of opt_prefix references + inreplace "Makefile.in", + '#@@ServerRoot@@#$(prefix)#', "\#@@ServerRoot@@##{opt_prefix}#" + inreplace "docs/conf/extra/httpd-autoindex.conf.in", + "@exp_iconsdir@", "#{opt_pkgshare}/icons" + inreplace "docs/conf/extra/httpd-multilang-errordoc.conf.in", + "@exp_errordir@", "#{opt_pkgshare}/error" + + # fix default user/group when running as root + inreplace "docs/conf/httpd.conf.in", /(User|Group) daemon/, "\\1 _www" + + # use Slackware-FHS layout as it's closest to what we want. + # these values cannot be passed directly to configure, unfortunately. + inreplace "config.layout" do |s| + s.gsub! "${datadir}/htdocs", "${datadir}" + s.gsub! "${htdocsdir}/manual", "#{pkgshare}/manual" + s.gsub! "${datadir}/error", "#{pkgshare}/error" + s.gsub! "${datadir}/icons", "#{pkgshare}/icons" + end + + if OS.mac? + libxml2 = "#{MacOS.sdk_path_if_needed}/usr" + zlib = "#{MacOS.sdk_path_if_needed}/usr" + else + libxml2 = Formula["libxml2"].opt_prefix + zlib = Formula["zlib"].opt_prefix + end + + system "./configure", "--enable-layout=Slackware-FHS", + "--prefix=#{prefix}", + "--sbindir=#{bin}", + "--mandir=#{man}", + "--sysconfdir=#{etc}/httpd", + "--datadir=#{var}/www", + "--localstatedir=#{var}", + "--enable-mpms-shared=all", + "--enable-mods-shared=all", + "--enable-authnz-fcgi", + "--enable-cgi", + "--enable-pie", + "--enable-suexec", + "--with-suexec-bin=#{opt_bin}/suexec", + "--with-suexec-caller=_www", + "--with-port=8080", + "--with-sslport=8443", + "--with-apr=#{Formula["apr"].opt_prefix}", + "--with-apr-util=#{Formula["apr-util"].opt_prefix}", + "--with-brotli=#{Formula["brotli"].opt_prefix}", + "--with-libxml2=#{libxml2}", + "--with-mpm=prefork", + "--with-nghttp2=#{Formula["libnghttp2"].opt_prefix}", + "--with-ssl=#{Formula["openssl@3"].opt_prefix}", + "--with-pcre=#{Formula["pcre2"].opt_prefix}/bin/pcre2-config", + "--with-z=#{zlib}", + "--disable-lua", + "--disable-luajit" + system "make" + ENV.deparallelize if OS.linux? + system "make", "install" + + # suexec does not install without root + bin.install "support/suexec" + + # remove non-executable files in bin dir (for brew audit) + rm bin/"envvars" + rm bin/"envvars-std" + + # avoid using Cellar paths + inreplace %W[ + #{include}/httpd/ap_config_layout.h + #{lib}/httpd/build/config_vars.mk + ] do |s| + s.gsub! lib/"httpd/modules", HOMEBREW_PREFIX/"lib/httpd/modules" + end + + inreplace %W[ + #{bin}/apachectl + #{bin}/apxs + #{include}/httpd/ap_config_auto.h + #{include}/httpd/ap_config_layout.h + #{lib}/httpd/build/config_vars.mk + #{lib}/httpd/build/config.nice + ] do |s| + s.gsub! prefix, opt_prefix + end + + inreplace "#{lib}/httpd/build/config_vars.mk" do |s| + pcre = Formula["pcre2"] + s.gsub! pcre.prefix.realpath, pcre.opt_prefix + s.gsub! "${prefix}/lib/httpd/modules", HOMEBREW_PREFIX/"lib/httpd/modules" + s.gsub! Superenv.shims_path, HOMEBREW_PREFIX/"bin" + end + end + + def post_install + (var/"cache/httpd").mkpath + (var/"www").mkpath + end + + def caveats + <<~EOS + DocumentRoot is #{var}/www. + + The default ports have been set in #{etc}/httpd/httpd.conf to 8080 and in + #{etc}/httpd/extra/httpd-ssl.conf to 8443 so that httpd can run without sudo. + EOS + end + + service do + run [opt_bin/"httpd", "-D", "FOREGROUND"] + environment_variables PATH: std_service_path_env + run_type :immediate + end + + test do + # Ensure modules depending on zlib and xml2 have been compiled + assert_path_exists lib/"httpd/modules/mod_deflate.so" + assert_path_exists lib/"httpd/modules/mod_proxy_html.so" + assert_path_exists lib/"httpd/modules/mod_xml2enc.so" + + begin + port = free_port + + expected_output = "Hello world!" + (testpath/"index.html").write expected_output + (testpath/"httpd.conf").write <<~EOS + Listen #{port} + ServerName localhost:#{port} + DocumentRoot "#{testpath}" + ErrorLog "#{testpath}/httpd-error.log" + 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 + LoadModule mpm_prefork_module #{lib}/httpd/modules/mod_mpm_prefork.so + EOS + + pid = spawn bin/"httpd", "-X", "-f", "#{testpath}/httpd.conf" + + sleep 3 + sleep 2 if OS.mac? && Hardware::CPU.intel? + + assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") + + # Check that `apxs` can find `apu-1-config`. + system bin/"apxs", "-q", "APU_CONFIG" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/h/httpdiff.rb b/Formula/h/httpdiff.rb new file mode 100644 index 0000000000000..2ce2dd89583e0 --- /dev/null +++ b/Formula/h/httpdiff.rb @@ -0,0 +1,41 @@ +class Httpdiff < Formula + desc "Compare two HTTP(S) responses" + homepage "https://github.com/jgrahamc/httpdiff" + url "https://github.com/jgrahamc/httpdiff/archive/refs/tags/v1.0.0.tar.gz" + sha256 "b2d3ed4c8a31c0b060c61bd504cff3b67cd23f0da8bde00acd1bfba018830f7f" + license "GPL-2.0-only" + head "https://github.com/jgrahamc/httpdiff.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e3440a3284a54af6e5c28606e0d6ffcde2150980a740dd2a0bc27d435c04fba7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e8f493a6c29a4edf788d888adc111c2f3727b0a725661f0b62c9934292f1c43" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f7fcb1b3bdfb03fa3238b6e837c99668fcdc340070519d1a8e2144171be14b33" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e8e0883f20c870f02e78385ba604f33cca56c29e41037c1b42c98b9e231a1845" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "290b6c6f1c990249cc760ee510f0669dd9e317ac169be71cd5fb945a8625413e" + sha256 cellar: :any_skip_relocation, sonoma: "541557da88ab0a9ec186d305cc0f65f8e25df8ad183ebbe80af829afbae87477" + sha256 cellar: :any_skip_relocation, ventura: "3dcf894a63441e77ae53928406016eb7b4c061588156aea9a6b5b28fb825b2a0" + sha256 cellar: :any_skip_relocation, monterey: "868da1b5aed20834315043ee38f653e34166b799fdf4ee90aa5967de099d8c45" + sha256 cellar: :any_skip_relocation, big_sur: "bd0aa59b471dc747b3af50d5c1f4611ed2c4993eebe64ffb4d343d1d7bef0fbb" + sha256 cellar: :any_skip_relocation, catalina: "5731d30f22cf63bd619c18f0f91c4547c52f2ae1b38a2cfeb0316958e93995c1" + sha256 cellar: :any_skip_relocation, mojave: "6113414a69c11632f0088e478d6db0acc6b826db7937c3570e661152c58bd334" + sha256 cellar: :any_skip_relocation, high_sierra: "1432608ef9e3ffaac9fc3c6207e63d888dd2246e1c806bc6a57cab312f944aea" + sha256 cellar: :any_skip_relocation, sierra: "39a0d685904aba4c3e55ff22b4d231b8890c022a1eb0366dc264bbabc410a117" + sha256 cellar: :any_skip_relocation, el_capitan: "59b46605118f8789c10facd53e9d4ce4c9f54c8de85611d423984c4316a169eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b75213c432ca3754d283de01029ae208a75955949c8b5b9e04613c9da943f8c" + end + + # https://github.com/jgrahamc/httpdiff/issues/21 + deprecate! date: "2024-02-20", because: :unmaintained + disable! date: "2025-02-24", because: :unmaintained + + depends_on "go" => :build + + def install + ENV["GO111MODULE"] = "auto" + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + system bin/"httpdiff", "https://brew.sh/", "https://brew.sh/" + end +end diff --git a/Formula/h/httperf.rb b/Formula/h/httperf.rb new file mode 100644 index 0000000000000..36579640035ff --- /dev/null +++ b/Formula/h/httperf.rb @@ -0,0 +1,67 @@ +class Httperf < Formula + desc "Tool for measuring webserver performance" + homepage "https://github.com/httperf/httperf" + license "GPL-2.0-or-later" + revision 2 + + stable do + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/httperf/httperf-0.9.0.tar.gz" + sha256 "e1a0bf56bcb746c04674c47b6cfa531fad24e45e9c6de02aea0d1c5f85a2bf1c" + + # Upstream patch for OpenSSL 1.1 compatibility + # https://github.com/httperf/httperf/pull/48 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/httperf/openssl-1.1.diff" + sha256 "69d5003f60f5e46d25813775bbf861366fb751da4e0e4d2fe7530d7bb3f3660a" + end + end + + # Until the upstream GitHub repository creates a new release (something after + # 0.9.0), we're unable to create a check that can identify new versions. + livecheck do + skip "No version information available to check" + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "777ac05c7372517913a1dc06a7cfa1499480ed89708baf56d57749bfaf9b3375" + sha256 cellar: :any, arm64_sonoma: "4f3dbaee84b9ecec246b11f1da959850d5ec283d28dd0ec11e40c7d93975734e" + sha256 cellar: :any, arm64_ventura: "cf626f3e9d749e395728ce1ca02b1441be6321989841a0b1135baef10455b739" + sha256 cellar: :any, arm64_monterey: "a6976f04d98a5195075909f77587f0c113ed94389a49ab1ff4ddfc263c14c3ea" + sha256 cellar: :any, arm64_big_sur: "e8a25cd3891631f61aaaf69682a952ceaa5e680559defd48a0de3eaebe1f1519" + sha256 cellar: :any, sonoma: "3ca6eec51c2712c64eb58bab12064953826af672d843171672f6d60fb034df0c" + sha256 cellar: :any, ventura: "3f61658586cbdac24c810c9b201d8054f9f800046a7ec1b6754e82e49be64244" + sha256 cellar: :any, monterey: "72bdd969d2e88750ea3827860143f05756fb0da35f9ce04d185ed9de0f42791f" + sha256 cellar: :any, big_sur: "a77143c2960957c7b998ef8259f23f7252264e297c1f8a7f812c7712eec756f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b14593cb779357511b91b27d4de352324c2eafa8390353cdc7e8332ca230443" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da0a7ad0ca9b357505cc3c26fa174dd7c4f289e2054e654eb82e2678aad8dc74" + end + + head do + url "https://github.com/httperf/httperf.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "openssl@3" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + + # idleconn.c:164:28: error: passing argument 2 of ‘connect’ from incompatible pointer type + 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", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"httperf", "--version" + end +end diff --git a/Formula/h/httpflow.rb b/Formula/h/httpflow.rb new file mode 100644 index 0000000000000..7c9c3328f7386 --- /dev/null +++ b/Formula/h/httpflow.rb @@ -0,0 +1,39 @@ +class Httpflow < Formula + desc "Packet capture and analysis utility similar to tcpdump for HTTP" + homepage "https://github.com/six-ddc/httpflow" + url "https://github.com/six-ddc/httpflow/archive/refs/tags/0.0.9.tar.gz" + sha256 "2347bd416641e165669bf1362107499d0bc4524ed9bfbb273ccd3b3dd411e89c" + license "MIT" + head "https://github.com/six-ddc/httpflow.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ac62f29bcb5a484af3755990f8ddd109dce6df7a261e281f9846a383457f815a" + sha256 cellar: :any, arm64_sonoma: "2c7c2232e112599cf10e22ac013df5cf5823f6071292fa91a5252480539c85b7" + sha256 cellar: :any, arm64_ventura: "4b3f8c7e2ac615472630e7913d4e0461199a5f9fc6204db04802c6829d359b1d" + sha256 cellar: :any, arm64_monterey: "90a537d7db4c639129394ae490211a16378c9549a777e80b3e050197fac49d84" + sha256 cellar: :any, arm64_big_sur: "4ad73cc6cd313d17634e78df0795ce7ad85b929e05efaf219768e9929950a663" + sha256 cellar: :any, sonoma: "f33fafda905397e163ece952c25c475d5eb49ababa691b63ed26436f9873291f" + sha256 cellar: :any, ventura: "a32947a5a6a4de44b49ace73f7bfb89047eaae6bc7c8e9c101e306aeb075c7c2" + sha256 cellar: :any, monterey: "2733c1f43d12b4581542233c0b0314189756d98b0fbd76e0899ca2342f811bc3" + sha256 cellar: :any, big_sur: "8fd53a648dc88731b9dc6dd03fbfa68302f287e8c3eb2685273f10d691aee13e" + sha256 cellar: :any, catalina: "2b7b63f5d82139b4fc017b8848e3b29608738cd510ef1350710c6224a24079a3" + sha256 cellar: :any, mojave: "6d911ff1c720035b0b23cf994fbbb37e7d1372dcd32eb60bc54924b78b444431" + sha256 cellar: :any, high_sierra: "cf54de7d5e6fda49966d75a0c33580bb8e64d3d0fb6c39337a03e21fb20682d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "a0c2f859553f2a542f2ab254d0bcfeedbd29c3f5f8b626cd699c81a2912b77e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4974439a78ea50c5a49a972f340395f0f2a8305ff2980e9eab9bb27b94de9778" + end + + depends_on "pcre" + + uses_from_macos "libpcap" + uses_from_macos "zlib" + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}", "CXX=#{ENV.cxx}" + end + + test do + system bin/"httpflow", "-h" + end +end diff --git a/Formula/h/httpie.rb b/Formula/h/httpie.rb new file mode 100644 index 0000000000000..21a7d3009e07b --- /dev/null +++ b/Formula/h/httpie.rb @@ -0,0 +1,108 @@ +class Httpie < Formula + include Language::Python::Virtualenv + + desc "User-friendly cURL replacement (command-line HTTP client)" + homepage "https://httpie.io/" + url "https://github.com/httpie/cli/archive/refs/tags/3.2.4.tar.gz" + sha256 "b185cd8d81325f97c773582e50f1c5e047c2d8575b53d676469c9daf2a52f341" + license "BSD-3-Clause" + head "https://github.com/httpie/cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "83e92884af29f9d3f550603b35715ad22d04a353d754a0c9f237318166f24147" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5e6306cd7e9fb707552d406186b25a1774e436e218ec2ca1f8cc44319d73f591" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7e92db0acf947533e3ef430e7c0030819d2a616ad0290bbd2ba3038cdd53afcc" + sha256 cellar: :any_skip_relocation, sonoma: "2c2b7f472c1baf574ac82ad47299ad3b838b1cb287d98165a395d5b05e371ad6" + sha256 cellar: :any_skip_relocation, ventura: "49df2e4365298b54ebf24b0bd661e06f73dd3844d7575de76c74467c8cda8f3e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c574ce8746fe865719cd707022de24ec05a57733eaba7cf075b8bac19548233b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "72dc884db737283760aae001baadbf96fc3dd71119545eb09783f1523654408b" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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 "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/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/ed/22/a438e0caa4576f8c383fa4d35f1cc01655a46c75be358960d815bfbb12bd/setuptools-75.3.0.tar.gz" + sha256 "fba5dd4d766e97be1b1681d98712680ae8f2f26d7881245f2ce9e40714f1a686" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + # We use a special file called __build_channel__.py to denote which source + # was used to install httpie. + File.write("httpie/internal/__build_channel__.py", "BUILD_CHANNEL = \"homebrew\"") + + virtualenv_install_with_resources + + bash_completion.install "extras/httpie-completion.bash" => "httpie" + fish_completion.install "extras/httpie-completion.fish" => "httpie.fish" + end + + test do + assert_match version.to_s, shell_output("#{bin}/httpie --version") + assert_match version.to_s, shell_output("#{bin}/https --version") + assert_match version.to_s, shell_output("#{bin}/http --version") + + raw_url = "https://raw.githubusercontent.com/Homebrew/homebrew-core/HEAD/Formula/h/httpie.rb" + assert_match "PYTHONPATH", shell_output("#{bin}/http --ignore-stdin #{raw_url}") + end +end diff --git a/Formula/h/httping.rb b/Formula/h/httping.rb new file mode 100644 index 0000000000000..56288a62155c0 --- /dev/null +++ b/Formula/h/httping.rb @@ -0,0 +1,51 @@ +class Httping < Formula + desc "Ping-like tool for HTTP requests" + homepage "https://github.com/folkertvanheusden/HTTPing" + url "https://github.com/folkertvanheusden/HTTPing/archive/refs/tags/v4.4.0.tar.gz" + sha256 "87fa2da5ac83c4a0edf4086161815a632df38e1cc230e1e8a24a8114c09da8fd" + license "AGPL-3.0-only" + + # 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_sequoia: "2edf3ec3576fcb84bcd40124d94c84e80fedba5975fa7c22aa30375e40ab48c6" + sha256 arm64_sonoma: "f51c8f88fcfdf499b9402d73c8e694395f1ee09af0a1d988774f02cdd7ae9fed" + sha256 arm64_ventura: "cd0bd242c917ce8ce4699733fb6bd36cfccefd36bd8b0b7fba4822842601a351" + sha256 sonoma: "5c887df378bbfbe24b8049e579a6325bbd7d8cba076eebe392ae3dab8dd6f832" + sha256 ventura: "12e2cbfeb500c53bd2cde0ec98d9426a9736d4a40cce70035869b5220108ff6f" + sha256 arm64_linux: "21a1a7426bddeb581154982e0752a0a745069893d7fb04872e2700bccb8a26db" + sha256 x86_64_linux: "d216d2e231fe96782beab3f205156d657da0c91f6c6c98e2a2ab1218a1db0f33" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build # for msgfmt + depends_on "openssl@3" + + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" # for libintl + end + + # enable TCP Fast Open on macOS, upstream pr ref, https://github.com/folkertvanheusden/HTTPing/pull/48 + patch do + url "https://github.com/folkertvanheusden/HTTPing/commit/79236affb75667cf195f87a58faaebe619e7bfd4.patch?full_index=1" + sha256 "765fd15dcb35a33141d62b70e4888252a234b9f845c8e35059654852a0d19d1c" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DUSE_SSL=ON", "-DUSE_GETTEXT=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"httping", "-c", "2", "-g", "https://brew.sh/" + end +end diff --git a/Formula/h/httpry.rb b/Formula/h/httpry.rb new file mode 100644 index 0000000000000..362452e36a089 --- /dev/null +++ b/Formula/h/httpry.rb @@ -0,0 +1,41 @@ +class Httpry < Formula + desc "Packet sniffer for displaying and logging HTTP traffic" + homepage "https://github.com/jbittel/httpry" + url "https://github.com/jbittel/httpry/archive/refs/tags/httpry-0.1.8.tar.gz" + sha256 "b3bcbec3fc6b72342022e940de184729d9cdecb30aa754a2c994073447468cf0" + license "GPL-2.0-only" + head "https://github.com/jbittel/httpry.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "efbe819748288998ac0d955481db2aee1846e2e70db91a72ea2c4652accb95e4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b00d782c62d0ecf4e4b784178575ce77075887d1a614f3c4cc16127cd1ee37e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2a55a20ab1f6989ce19201f8f542961cf83dedb772a32006f600270ee199b551" + sha256 cellar: :any_skip_relocation, arm64_monterey: "35b7bf13b5cb242152bddbdd26ffc2d3102849a0ff8c95f5b7fac5ee818cd0ae" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "96df271f206bb36741a419eb5dced955578cb462c849da52e61778102f8629d2" + sha256 cellar: :any_skip_relocation, sonoma: "d59fe1cd0cbceb67f849c6b39f65f391eaba5b8a31fe7eabe240646abb29ae17" + sha256 cellar: :any_skip_relocation, ventura: "20c4af64c9155666c8c0c777c065aef44bb29e35c339e280d3e834b5759cd026" + sha256 cellar: :any_skip_relocation, monterey: "31a42f2ee46af90cf63b5da4cf20066a8a35cb4f977794e94e1179bd2df01169" + sha256 cellar: :any_skip_relocation, big_sur: "4be4a4e9939e75e8eb4854df6003265f986ada5b2d08ba96fbaf355323f184f2" + sha256 cellar: :any_skip_relocation, catalina: "322f399002eec5d9116942db65d231d7eed5bb1b46e9959cdb48c6eb10f41339" + sha256 cellar: :any_skip_relocation, mojave: "32bdf2c6b873fc531455da9f4658746c650203a017c8b367172efde8aa93f9ba" + sha256 cellar: :any_skip_relocation, high_sierra: "349ba4f39066cb02c151ab0f274f6bb9f4ee2cf558abdb2c5a3ecf0e563874fc" + sha256 cellar: :any_skip_relocation, sierra: "71014794d2a136fea229dd19d6fe7dc136037c074a817d70bd7b13713653f19f" + sha256 cellar: :any_skip_relocation, el_capitan: "56d6a77e429bf9dde3d5e5edb9959fc7ed913430236cf628e0aec6445c07c85a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4bf3a6354608e592030d226229360572cd999dc311d46a2a11908736fec6cf3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "362c2d3249eec72e7baebdde1a8c0a2e6a2b005e70b516733b96fa01e2aaf55e" + end + + uses_from_macos "libpcap" + + def install + system "make" + bin.install "httpry" + man1.install "httpry.1" + doc.install Dir["doc/*"] + end + + test do + system bin/"httpry", "-h" + end +end diff --git a/Formula/h/httpstat.rb b/Formula/h/httpstat.rb new file mode 100644 index 0000000000000..92fc432ca8919 --- /dev/null +++ b/Formula/h/httpstat.rb @@ -0,0 +1,29 @@ +class Httpstat < Formula + include Language::Python::Shebang + + desc "Curl statistics made simple" + homepage "https://github.com/reorx/httpstat" + url "https://github.com/reorx/httpstat/archive/refs/tags/1.3.2.tar.gz" + sha256 "56c45aebdb28160dd16c73cf23af8208c19b30ec0166790685dfec115df9c92f" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "4c6ac7e7f5619376d294d7921048b7bfc2745c280518b2ce977f8091d5536ef9" + end + + uses_from_macos "curl" + uses_from_macos "python" + + def install + if OS.linux? || MacOS.version >= :catalina + rw_info = python_shebang_rewrite_info("/usr/bin/env python3") + rewrite_shebang rw_info, "httpstat.py" + end + bin.install "httpstat.py" => "httpstat" + end + + test do + assert_match "HTTP", shell_output("#{bin}/httpstat https://github.com") + end +end diff --git a/Formula/h/httpx.rb b/Formula/h/httpx.rb new file mode 100644 index 0000000000000..d8e12c9c7acf2 --- /dev/null +++ b/Formula/h/httpx.rb @@ -0,0 +1,29 @@ +class Httpx < Formula + desc "Fast and multi-purpose HTTP toolkit" + homepage "https://github.com/projectdiscovery/httpx" + url "https://github.com/projectdiscovery/httpx/archive/refs/tags/v1.7.0.tar.gz" + sha256 "119b725844422f8c39f01d39cd738cc14eba43d9e2637ec2794af1aec4e3be3a" + license "MIT" + head "https://github.com/projectdiscovery/httpx.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "35112d82ea01cc70c621469fa2816f0586232614dee5d2fca1c951cff9c9c505" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fd1371837ea36e01fead639803499bc7b114e091ef829259dd5ae157ee47c872" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4d50000119001e207dc548787e4322810d86c7cf85ee756d8da9cf16205a6777" + sha256 cellar: :any_skip_relocation, sonoma: "e4c9cdcaa13dceb559505e937295185cd0399df1cf9ee3f0606f7f6cf1084f40" + sha256 cellar: :any_skip_relocation, ventura: "eb1289adb465eb9d87863760ba58883d83a441bcc21a86328208ec3e0ed9ed83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e957e22724c8ce9f1aa8aea2f52c83bccccf60dfc918bec733d7d1bc41d93fc0" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/httpx" + end + + test do + output = JSON.parse(shell_output("#{bin}/httpx -silent -title -json -u example.org")) + assert_equal 200, output["status_code"] + assert_equal "Example Domain", output["title"] + end +end diff --git a/Formula/h/httpyac.rb b/Formula/h/httpyac.rb new file mode 100644 index 0000000000000..04df2a325a771 --- /dev/null +++ b/Formula/h/httpyac.rb @@ -0,0 +1,68 @@ +class Httpyac < Formula + desc "Quickly and easily send REST, SOAP, GraphQL and gRPC requests" + homepage "https://httpyac.github.io/" + url "https://registry.npmjs.org/httpyac/-/httpyac-6.16.7.tgz" + sha256 "e6bc615ef8b58ea9334fcac3e2000eb3e49926dca1ec7087456e9aa6c402000e" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c661e19ffede29528d8ac52646f9453c17bced8e814b33fc3c078092d28a434e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c661e19ffede29528d8ac52646f9453c17bced8e814b33fc3c078092d28a434e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c661e19ffede29528d8ac52646f9453c17bced8e814b33fc3c078092d28a434e" + sha256 cellar: :any_skip_relocation, sonoma: "866418e856e92498dfcc3efd3f1418a5db7791e0addce76c733a9af8f74064a8" + sha256 cellar: :any_skip_relocation, ventura: "866418e856e92498dfcc3efd3f1418a5db7791e0addce76c733a9af8f74064a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "6db1182a2c0a29553eefb6f3477fcfdbbf5a769a954520ac2ddd8bfe07355cc5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6db1182a2c0a29553eefb6f3477fcfdbbf5a769a954520ac2ddd8bfe07355cc5" + 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 + (testpath/"test_cases").write <<~EOS + GET https://httpbin.org/anything HTTP/1.1 + Content-Type: text/html + Authorization: Bearer token + + POST https://countries.trevorblades.com/graphql + Content-Type: application/json + + query Continents($code: String!) { + continents(filter: {code: {eq: $code}}) { + code + name + } + } + + { + "code": "EU" + } + EOS + + output = shell_output("#{bin}/httpyac send test_cases --all") + # for httpbin call + assert_match "HTTP/1.1 200 - OK", output + # for graphql call + assert_match "\"name\": \"Europe\"", output + assert_match "2 requests processed (2 succeeded)", output + + assert_match version.to_s, shell_output("#{bin}/httpyac --version") + end +end diff --git a/Formula/h/httrack.rb b/Formula/h/httrack.rb new file mode 100644 index 0000000000000..dab06f1fd63fc --- /dev/null +++ b/Formula/h/httrack.rb @@ -0,0 +1,55 @@ +class Httrack < Formula + desc "Website copier/offline browser" + homepage "https://www.httrack.com/" + # Always use mirror.httrack.com when you link to a new version of HTTrack, as + # link to download.httrack.com will break on next HTTrack update. + url "https://mirror.httrack.com/historical/httrack-3.49.2.tar.gz" + sha256 "3477a0e5568e241c63c9899accbfcdb6aadef2812fcce0173688567b4c7d4025" + license "GPL-3.0-or-later" => { with: "openvpn-openssl-exception" } + revision 1 + + livecheck do + url "https://mirror.httrack.com/historical/" + regex(/href=.*?httrack[._-]v?(\d+(?:\.\d+)+)\./i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "49d241f3883e9342da2bc7b3344f3bb4ae0e17fb2bd4f476834dbdaf3c190c6d" + sha256 arm64_sonoma: "38f84248540e95dd51ab69cc3ec049b03b7193e0e4b628e2d1d5ab9d9bc3e56b" + sha256 arm64_ventura: "82366a7496c4dad900d7c5de609becac2493bfaca4101e77b43120450ab9ff4b" + sha256 arm64_monterey: "0345ae5cd642cad43051144018ad7716f91ba9c2a7b94f3068c5b7c855a6e8ba" + sha256 arm64_big_sur: "1e2db8b0a5afa31857870b780957c99975f68248c8a7e2826b4b3e9ccb1b4a64" + sha256 sonoma: "f0411219cf957c47ad4e80e468fb1dc758b4042b83b6ba5550022b2d12469c6e" + sha256 ventura: "ce79d5a831a8a5162a84e447625330038f98ea4797b5d6ad079198c5943ea654" + sha256 monterey: "98b7f4c73a1bb5f531bdd455942ceb00226068ec7bf5f32fd8a45b01f9cbb482" + sha256 big_sur: "01c1cb899db03ce18211dc2014af7f9a2592b61b32038540a8d8e5e7e40b9386" + sha256 catalina: "58d9d2b9cee7fd5e4d3faad7620def7aa029f81b03d92a4150b5269fc38ea963" + sha256 arm64_linux: "89bf73e6fa218309a7a07a8fb6ed1b6a6fd0f5c7928ef2dcea53ba97d25670ea" + sha256 x86_64_linux: "b7688c49793f0dab8cd4ec29ec2ac3ecb978d6f15067d0806f9bbc315bdb08f1" + end + + depends_on "openssl@3" + + uses_from_macos "zlib" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + ENV.deparallelize + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + # Don't need Gnome integration + rm_r(Dir["#{share}/{applications,pixmaps}"]) + end + + test do + download = "https://raw.githubusercontent.com/Homebrew/homebrew/65c59dedea31/.yardopts" + system bin/"httrack", download, "-O", testpath + assert_path_exists testpath/"raw.githubusercontent.com" + end +end diff --git a/Formula/h/hub-tool.rb b/Formula/h/hub-tool.rb new file mode 100644 index 0000000000000..d0badc03a5727 --- /dev/null +++ b/Formula/h/hub-tool.rb @@ -0,0 +1,35 @@ +class HubTool < Formula + desc "Docker Hub experimental CLI tool" + homepage "https://github.com/docker/hub-tool" + url "https://github.com/docker/hub-tool/archive/refs/tags/v04.6.tar.gz" + sha256 "e033e027c4b6dc360abf530a00b3ac0caec5ab17788c015336eb59a5e854e7d1" + license "Apache-2.0" + head "https://github.com/docker/hub-tool.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a77e71f702e249983b474cfc5a48f8a74a4bb412bff7160f04a77b811fc6c05" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6a77e71f702e249983b474cfc5a48f8a74a4bb412bff7160f04a77b811fc6c05" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a77e71f702e249983b474cfc5a48f8a74a4bb412bff7160f04a77b811fc6c05" + sha256 cellar: :any_skip_relocation, sonoma: "e3ee0caebbd8e7a36566a14a720ee77d29cfb7f7efb7e85d25df4586ddc1d914" + sha256 cellar: :any_skip_relocation, ventura: "e3ee0caebbd8e7a36566a14a720ee77d29cfb7f7efb7e85d25df4586ddc1d914" + sha256 cellar: :any_skip_relocation, x86_64_linux: "975161f22332ee0ed88c51528cea62b39144d231fff94f460c4c1650ccb23228" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/docker/hub-tool/internal.Version=#{version} + -X github.com/docker/hub-tool/internal.GitCommit=#{tap.user} + ] + + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/hub-tool version") + output = shell_output("#{bin}/hub-tool token 2>&1", 1) + assert_match "You need to be logged in to Docker Hub to use this tool", output + end +end diff --git a/Formula/h/hub.rb b/Formula/h/hub.rb new file mode 100644 index 0000000000000..1011da1d25aef --- /dev/null +++ b/Formula/h/hub.rb @@ -0,0 +1,52 @@ +class Hub < Formula + desc "Add GitHub support to git on the command-line" + homepage "https://hub.github.com/" + url "https://github.com/github/hub/archive/refs/tags/v2.14.2.tar.gz" + sha256 "e19e0fdfd1c69c401e1c24dd2d4ecf3fd9044aa4bd3f8d6fd942ed1b2b2ad21a" + license "MIT" + head "https://github.com/github/hub.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "90a1cf13fdd2a83b764953421cdf3ef3fa115d82d893f0b4fec100539c97773f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7df6f6e443e8e00fa18c8bd5e88fa666fe0a40659832e478a0d2345233ca374d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b1b4d7c179ca172a5d00781021defae38a452408eab7077e26ad4f317cfad9e6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "00602733d9a4c8049e34cb20a7c96dbd51f98a60e1cb5fbc9aec72663324ce89" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "19d761270350d4c4b6d5118d096dc7c012e7b58b43c0d81f9c6d8bded1888dd9" + sha256 cellar: :any_skip_relocation, sonoma: "007fb6c7dcfd7feb24afdcd95d016756357eb5bf38716c887e7839e4eeebfde7" + sha256 cellar: :any_skip_relocation, ventura: "737b57476182bf2e937a570be65f991590d79d84b9d14299fe15c2711a715113" + sha256 cellar: :any_skip_relocation, monterey: "d4c647211cc8a8e9aa9bedfaa4cb079a3a5fafea3f8378c7eaf5c50e2503cd0e" + sha256 cellar: :any_skip_relocation, big_sur: "7c480f3de5f449a741f88718194c129d597f0fe0db8b2130c1ccf4daa9a8dfca" + sha256 cellar: :any_skip_relocation, catalina: "fdf05855839a9d7ec6e7bee6796e3cb5fc473500cffc002366cf98c09a805b69" + sha256 cellar: :any_skip_relocation, mojave: "bcbae9c683d76f3395665467ba0f0c00c60c12c84022f72faba4b8981724b563" + sha256 cellar: :any_skip_relocation, high_sierra: "8800cda4532784bf764ea6116a06c81d8d90bb3d36d8ecf295e64f9dd647c4ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "213636e856404251ffd7897357ab91cc9519d3852e4b28cbb43575988d9bbc1b" + end + + depends_on "go" => :build + + uses_from_macos "ruby" => :build + + on_system :linux, macos: :ventura_or_newer do + depends_on "groff" => :build + end + + on_linux do + depends_on "util-linux" + end + + def install + system "make", "install", "prefix=#{prefix}" + + bash_completion.install "etc/hub.bash_completion.sh" + zsh_completion.install "etc/hub.zsh_completion" => "_hub" + fish_completion.install "etc/hub.fish_completion" => "hub.fish" + end + + test do + system "git", "init" + %w[haunted house].each { |f| touch testpath/f } + system "git", "add", "haunted", "house" + system "git", "commit", "-a", "-m", "Initial Commit" + assert_equal "haunted\nhouse", shell_output("#{bin}/hub ls-files").strip + end +end diff --git a/Formula/h/hubble.rb b/Formula/h/hubble.rb new file mode 100644 index 0000000000000..4d000bd430f83 --- /dev/null +++ b/Formula/h/hubble.rb @@ -0,0 +1,39 @@ +class Hubble < Formula + desc "Network, Service & Security Observability for Kubernetes using eBPF" + homepage "https://github.com/cilium/hubble" + url "https://github.com/cilium/hubble/archive/refs/tags/v1.17.3.tar.gz" + sha256 "79afdd77b2b9406bb6cdd90c0a5990fdfe9457c08837af458a7bb7717b58d560" + license "Apache-2.0" + head "https://github.com/cilium/hubble.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_sequoia: "b4210634cbfb63e325c4fcb0caa54d95600c68ee72efb43c0f6c0b7d37171b2c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5d729dec4e8f713d1e0e77ba55306ffb68a5a68c9a4c0f0acd5b70a96f3da651" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4d34e4e9eef900d79d172443b2d73fe6f41a34b96e3b1a5e48336bc12d650b86" + sha256 cellar: :any_skip_relocation, sonoma: "cae4b36388efba845b960cc11b96d1080f2c1005be4ea312c66d05bf44def11f" + sha256 cellar: :any_skip_relocation, ventura: "65c8bd611be75a636bd448ab9a13f20185001851497940796aaefeaf4ede1265" + sha256 cellar: :any_skip_relocation, arm64_linux: "48bb390c83f4682abef8122759a1d994ad631e3fbda78e028ed573e32f98f130" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aec6dcc7737747c056c029a1279b93e3141e82bd92aea0cf1f3804981860a495" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/cilium/hubble/pkg.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"hubble", "completion") + end + + test do + assert_match(/tls-allow-insecure:/, shell_output("#{bin}/hubble config get")) + end +end diff --git a/Formula/h/hubflow.rb b/Formula/h/hubflow.rb new file mode 100644 index 0000000000000..7ebe85aeddb70 --- /dev/null +++ b/Formula/h/hubflow.rb @@ -0,0 +1,28 @@ +# NOTE: Pull from git tag to get submodules +class Hubflow < Formula + desc "GitFlow for GitHub" + homepage "https://github.com/datasift/gitflow" + url "https://github.com/datasift/gitflow.git", + tag: "v1.5.4", + revision: "61a7dbec2bb463216b4cad2645d6721ab713f597" + license "BSD-2-Clause" + head "https://github.com/datasift/gitflow.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2b459633314cbd53abafb6f330b5fa10799fc03cc191cd2357f538ab0c2acec8" + end + + deprecate! date: "2024-03-05", because: :repo_archived + disable! date: "2025-03-24", because: :repo_archived + + def install + ENV["INSTALL_INTO"] = libexec + system "./install.sh", "install" + bin.write_exec_script libexec/"git-hf" + end + + test do + system bin/"git-hf", "version" + end +end diff --git a/Formula/h/huexpress.rb b/Formula/h/huexpress.rb new file mode 100644 index 0000000000000..c212f822858ed --- /dev/null +++ b/Formula/h/huexpress.rb @@ -0,0 +1,80 @@ +class Huexpress < Formula + desc "PC Engine emulator" + homepage "https://github.com/kallisti5/huexpress" + url "https://github.com/kallisti5/huexpress/archive/refs/tags/3.0.4.tar.gz" + sha256 "76589f02d1640fc5063d48a47f017077c6b7557431221defe9e38679d86d4db8" + license "GPL-2.0-or-later" + revision 2 + head "https://github.com/kallisti5/huexpress.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c72017994c148e0c3320a90bcadb956732c96b544def28ff398892e578922c22" + sha256 cellar: :any, arm64_sonoma: "6e8a501836cd6c97ee3344adaff36f6be40a2ddd6d3266cb980cb32eab566006" + sha256 cellar: :any, arm64_ventura: "d69fc8ce360f304a6c9e95a8120196d5efaec9f77f02a82b0e5c3e4cab6b84da" + sha256 cellar: :any, arm64_monterey: "a0919bd5024f7f197c262f0ba1dd5c57871506308bd7a4bfd98b5f18f04dbb50" + sha256 cellar: :any, arm64_big_sur: "2709e20246d6ab1a14329ccc842e49eefd9276c6b1e3ef90bcadc85c2213a394" + sha256 cellar: :any, sonoma: "ed758b69740bc72b5bdb5d463bea32d699c5f5e6d2de07ebfec1a035cebe6dd0" + sha256 cellar: :any, ventura: "3fc6ef796681ae0b49b2f6386add406c8ace5aa450160b2530fe0174205d6b7e" + sha256 cellar: :any, monterey: "5c02e7de59a65392f1347c65df445e2d447daaac2eb508c920f8ce452628dbd5" + sha256 cellar: :any, big_sur: "37272d08ed74984450ae2f08e17e9b41fdf32cc487aee1c0ab0832c10177474a" + sha256 cellar: :any, catalina: "9e714566437e60a45c978daeade8dbb3515ee37c5d2b6de1a203443f243917d8" + sha256 arm64_linux: "cf8c9ea08ea0615c32f11b3b2574054bc950436bca1539c7c7d0625c1a7fd3ec" + sha256 x86_64_linux: "8f5ca6b63b8fc347e8221765dc09ac1000f4b6a62e53424fb578bb14103c8952" + end + + depends_on "pkgconf" => :build + depends_on "scons" => :build + depends_on "libvorbis" + depends_on "libzip" + depends_on "sdl2" + depends_on "sdl2_mixer" + + on_macos do + depends_on "gettext" + depends_on "glib" + end + + on_linux do + depends_on "mesa" + depends_on "mesa-glu" + end + + # Workaround for newer Clang + # upstream bug report, https://github.com/kallisti5/huexpress/issues/19 + patch :DATA + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `XBuf'; src/osd_sdl_machine.o:../src/osd_sdl_machine.c:13: first defined here + # upstream bug report, https://github.com/kallisti5/huexpress/issues/18 + ENV.append "CC", "-fcommon" if OS.linux? + + # Don't statically link to libzip. + inreplace "src/SConscript", "pkg-config --cflags --libs --static libzip", "pkg-config --cflags --libs libzip" + system "scons" + bin.install ["src/huexpress", "src/hucrc"] + end + + test do + assert_match(/Version #{version}$/, shell_output("#{bin}/huexpress -h", 1)) + end +end + +__END__ +diff --git a/SConstruct b/SConstruct +index 096a1ef..98216b9 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -40,5 +40,12 @@ env.Append(CPPDEFINES={'VERSION_MAJOR' : '3'}) + env.Append(CPPDEFINES={'VERSION_MINOR' : '0'}) + env.Append(CPPDEFINES={'VERSION_UPDATE' : '4'}) + ++# Workaround for newer Clang ++clang_version = env['CCVERSION'] ++if env['PLATFORM'] == 'darwin' and 'clang' in env['CC']: ++ clang_version_parts = [int(part) for part in clang_version.split('.')] ++ if clang_version_parts >= [15, 0, 0]: ++ env.Append(CFLAGS=['-Wno-incompatible-function-pointer-types', '-Wno-int-conversion']) # Pass as separate flags ++ + Export("env") + SConscript('src/SConscript') diff --git a/Formula/h/huggingface-cli.rb b/Formula/h/huggingface-cli.rb new file mode 100644 index 0000000000000..389b6a0772429 --- /dev/null +++ b/Formula/h/huggingface-cli.rb @@ -0,0 +1,108 @@ +class HuggingfaceCli < Formula + include Language::Python::Virtualenv + + desc "Client library for huggingface.co hub" + homepage "https://huggingface.co/docs/huggingface_hub/index" + url "https://files.pythonhosted.org/packages/3b/7b/09ab792c463975fcd0a81f459b5e900057dabbbc274ff253bb28d58ebfce/huggingface_hub-0.31.2.tar.gz" + sha256 "7053561376ed7f6ffdaecf09cc54d70dc784ac6315fa4bb9b93e19662b029675" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0814aa2c707380d887a444d591ff127fcefd6539c099110a9f4486a824f5a726" + sha256 cellar: :any, arm64_sonoma: "1412911b19e5b33993e492ff434999d57afc68db2db688cd67b89cd4f62735c6" + sha256 cellar: :any, arm64_ventura: "10da1c26829853a38a65923694b0757fa7bbfa73e2af202f487b9333b0910cd2" + sha256 cellar: :any, sonoma: "e4a2fa6869d8f8db6ccb9ecf61d4d1ced8dc79f9870f2a345966d32dbd1b681d" + sha256 cellar: :any, ventura: "3061fdba22bf94c4340614acb0822bbefdda1b5c8df6ef51abf7378cc1716d5c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef08c2bde722866281684832b425d49db96705f48ec44c0d266eba28c6808f7b" + end + + depends_on "certifi" + depends_on "git-lfs" + depends_on "libyaml" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + end + + resource "fsspec" do + url "https://files.pythonhosted.org/packages/45/d8/8425e6ba5fcec61a1d16e41b1b71d2bf9344f1fe48012c2b48b9620feae5/fsspec-2025.3.2.tar.gz" + sha256 "e52c77ef398680bbd6a98c0e628fbc469491282981209907bbc8aea76a04fdc6" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "inquirerpy" do + url "https://files.pythonhosted.org/packages/64/73/7570847b9da026e07053da3bbe2ac7ea6cde6bb2cbd3c7a5a950fa0ae40b/InquirerPy-0.3.4.tar.gz" + sha256 "89d2ada0111f337483cb41ae31073108b2ec1e618a49d7110b0d7ade89fc197e" + 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 "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/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 "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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + virtualenv_install_with_resources + end + + test do + whoami_output = shell_output("#{bin}/huggingface-cli whoami") + assert_match "Not logged in", whoami_output + test_cache = testpath/"cache" + test_cache.mkdir + ENV["HUGGINGFACE_HUB_CACHE"] = test_cache.to_s + ENV["NO_COLOR"] = "1" + scan_output = shell_output("#{bin}/huggingface-cli scan-cache") + assert_match "Done in 0.0s. Scanned 0 repo(s) for a total of 0.0.", scan_output + end +end diff --git a/Formula/h/hugo.rb b/Formula/h/hugo.rb new file mode 100644 index 0000000000000..e49fb55a91777 --- /dev/null +++ b/Formula/h/hugo.rb @@ -0,0 +1,47 @@ +class Hugo < Formula + desc "Configurable static site generator" + homepage "https://gohugo.io/" + url "https://github.com/gohugoio/hugo/archive/refs/tags/v0.147.3.tar.gz" + sha256 "cc37a9ecec5f8065d1854916c317015fb2b6e8ecc391db5a04adfc3818599152" + license "Apache-2.0" + head "https://github.com/gohugoio/hugo.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1ab459e598537ae4077bce74b71ffffb5c7f64b6be37e9ee3c8b0d8e6a1fe018" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "946d48a188fa8026de41d70425a8a39149977f7eb4e41d0e686fe620203f6cd2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c83e32196b6df599d716431c6d792ca2b4b0e418ae5e3f95c2d2dbfb9fc1e29c" + sha256 cellar: :any_skip_relocation, sonoma: "34db8d7ad65a226b9d55ab39e9138c41b8f7bc5bb1b848cd8efe9d7c14c2f6d7" + sha256 cellar: :any_skip_relocation, ventura: "e17d359b4b41510464032414e6db3c2c9cdf38a7f63bbb7636aa00d2252844f5" + sha256 cellar: :any_skip_relocation, arm64_linux: "e6fc0644dcaeae92b974ab07a2cb54a2a5a47b47c253a8a2a657446d619995bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1ad002d74b49aa51be3801e8deca7686d0bae361104e0463709bfd4c585c4e4" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/gohugoio/hugo/common/hugo.commitHash=#{tap.user} + -X github.com/gohugoio/hugo/common/hugo.buildDate=#{time.iso8601} + -X github.com/gohugoio/hugo/common/hugo.vendorInfo=brew + ] + tags = %w[extended withdeploy] + system "go", "build", *std_go_args(ldflags:, tags:) + + generate_completions_from_executable(bin/"hugo", "completion") + system bin/"hugo", "gen", "man", "--dir", man1 + end + + test do + site = testpath/"hops-yeast-malt-water" + system bin/"hugo", "new", "site", site + assert_path_exists site/"hugo.toml" + + assert_match version.to_s, shell_output(bin/"hugo version") + end +end diff --git a/Formula/h/humanlog.rb b/Formula/h/humanlog.rb new file mode 100644 index 0000000000000..effe645919513 --- /dev/null +++ b/Formula/h/humanlog.rb @@ -0,0 +1,40 @@ +class Humanlog < Formula + desc "Logs for humans to read" + homepage "https://github.com/humanlogio/humanlog" + url "https://github.com/humanlogio/humanlog/archive/refs/tags/v0.8.4.tar.gz" + sha256 "ee74057578be0f3e4809310628ece7b3dd724ed289faeccbede7516ae9c0cccd" + license "Apache-2.0" + head "https://github.com/humanlogio/humanlog.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e607ffb517b99483aff013387c964df57c8146e11ecc661bf216149aa28e99f2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5a5af5c936e226edd0e6ee87837c084f495ea60a5bc1dded1de2d60aadc12ef3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "10adf72350923e7485caae7f36965120345115aaca4daf8988d6915bf3676a7b" + sha256 cellar: :any_skip_relocation, sonoma: "7a5e445aa0ba11de61a37a66cff000a844dad842cf3a7ceb752555c41817a702" + sha256 cellar: :any_skip_relocation, ventura: "96974ab256db635fefbdbac3568b86432e92bace15f4c0df1ebacb4ebaa8d110" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0d6c3ae2ac9f62c305f004c33732859b7868ad23251c4518924af4c104f848e" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.versionMajor=#{version.major} + -X main.versionMinor=#{version.minor} + -X main.versionPatch=#{version.patch} + -X main.versionPrerelease= + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/humanlog" + end + + test do + assert_match version.to_s, shell_output("#{bin}/humanlog --version") + + test_input = '{"time":"2024-12-23T12:34:56Z","level":"info","message":"brewtest log"}' + expected_output = "brewtest log" + + output = pipe_output(bin/"humanlog", test_input) + assert_match expected_output, output + end +end diff --git a/Formula/h/hunspell.rb b/Formula/h/hunspell.rb new file mode 100644 index 0000000000000..778be8e9d4d71 --- /dev/null +++ b/Formula/h/hunspell.rb @@ -0,0 +1,55 @@ +class Hunspell < Formula + desc "Spell checker and morphological analyzer" + homepage "https://hunspell.github.io/" + url "https://github.com/hunspell/hunspell/releases/download/v1.7.2/hunspell-1.7.2.tar.gz" + sha256 "11ddfa39afe28c28539fe65fc4f1592d410c1e9b6dd7d8a91ca25d85e9ec65b8" + license any_of: ["MPL-1.1", "GPL-2.0-or-later", "LGPL-2.1-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "98c354c4b2d30399b17d20622cddfbbbc27a2a33fbde6c53a9445375ab4d6c61" + sha256 cellar: :any, arm64_sonoma: "7c5fef61ba38c643c6e29cdb3e835875011411edf1f421a7f0329e1723c6e397" + sha256 cellar: :any, arm64_ventura: "97e8e1bbf7cbad6fa97efd96711e0ff25d46cd98bd19c75dab4d1160c00b591d" + sha256 cellar: :any, arm64_monterey: "0077d77fd9cc1a47eb3b0e78818c91735899879fab8373acbc41bccf74cbd2cc" + sha256 cellar: :any, arm64_big_sur: "1f0389abc127deb93d7230497181af1d2cbc18a354127b98f7aa1a7a47e56279" + sha256 cellar: :any, sonoma: "824cc2f1c917cc1a43872bbf9b36fba99072458de10b41631097dcf62e0d82f2" + sha256 cellar: :any, ventura: "c0770e77b09220da99d9dc5f169a5a815b08b77350a7396ef1017d131fc2a800" + sha256 cellar: :any, monterey: "a4f7164470263a3d9b5511136680475f91c5f4498b6d58097f18a8ee496cc3da" + sha256 cellar: :any, big_sur: "9d58f7687ab71647524ada2ab980193d7083357072b15510d756e6f90a769830" + sha256 cellar: :any_skip_relocation, arm64_linux: "cfbe072b957d6e8dcc23af726175c10452cd2069e0ff9e0e54c3ce064fe626e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09ba93523c0b255617dd5c9771da092b73a9e9f40f0e7f5c727b7b181f6c8248" + end + + depends_on "readline" + + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + end + + conflicts_with "freeling", because: "both install 'analyze' binary" + + def install + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--with-ui", + "--with-readline" + system "make" + system "make", "check" + system "make", "install" + end + + def caveats + <<~EOS + Dictionary files (*.aff and *.dic) should be placed in + ~/Library/Spelling/ or /Library/Spelling/. Homebrew itself + provides no dictionaries for Hunspell, but you can download + compatible dictionaries from other sources, such as + https://cgit.freedesktop.org/libreoffice/dictionaries/tree/ . + EOS + end + + test do + system bin/"hunspell", "--help" + end +end diff --git a/Formula/h/hurl.rb b/Formula/h/hurl.rb new file mode 100644 index 0000000000000..0a56e9a32b947 --- /dev/null +++ b/Formula/h/hurl.rb @@ -0,0 +1,61 @@ +class Hurl < Formula + desc "Run and Test HTTP Requests with plain text and curl" + homepage "https://hurl.dev/" + url "https://github.com/Orange-OpenSource/hurl/archive/refs/tags/6.1.1.tar.gz" + sha256 "26ef1ed685f4b94190914a0e03127f7b7f6a488abf65758c19092dc6b9034b2c" + license "Apache-2.0" + head "https://github.com/Orange-OpenSource/hurl.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_sequoia: "d0580eea478d4c02659b1a8637e4ee7c2921bf4f7922546315f9f06b11aef64e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e267e70f355ad821be193f973081f0e0abc69b2bdb08fcc6a32aa977c807754c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "80f9f55257157bcdbce39f036b9ce0c82e82a6d58b46d4fc773dcec8e296d333" + sha256 cellar: :any_skip_relocation, sonoma: "8791f49c5281f560ca43e6539cf8e20ece6284285458a151f8762c262799a841" + sha256 cellar: :any_skip_relocation, ventura: "c2687dc9b8c865a50eaa19de4022a19492ede31d4a24b354f347a4f90c8f4c17" + sha256 cellar: :any_skip_relocation, arm64_linux: "84c1996b20423a345f84c535e53c01b297a499d838fc6df4aa0c08ed184775a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eba4cba1f46c24cff1ffe75a3c342456564a1707b80b4a83e1eb02c62f736208" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "curl" + uses_from_macos "libxml2" + + def install + # FIXME: This formula uses the `openssl-sys` crate on Linux but does not link with our OpenSSL. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + system "cargo", "install", *std_cargo_args(path: "packages/hurl") + system "cargo", "install", *std_cargo_args(path: "packages/hurlfmt") + + man1.install "docs/manual/hurl.1" + man1.install "docs/manual/hurlfmt.1" + + bash_completion.install "completions/hurl.bash" => "hurl" + zsh_completion.install "completions/_hurl" + fish_completion.install "completions/hurl.fish" + bash_completion.install "completions/hurlfmt.bash" => "hurlfmt" + zsh_completion.install "completions/_hurlfmt" + fish_completion.install "completions/hurlfmt.fish" + end + + test do + # Perform a GET request to https://hurl.dev. + # This requires a network connection, but so does Homebrew in general. + test_file = testpath/"test.hurl" + test_file.write "GET https://hurl.dev" + + system bin/"hurl", "--color", test_file + system bin/"hurlfmt", "--color", test_file + end +end diff --git a/Formula/h/hut.rb b/Formula/h/hut.rb new file mode 100644 index 0000000000000..61219b8998734 --- /dev/null +++ b/Formula/h/hut.rb @@ -0,0 +1,37 @@ +class Hut < Formula + desc "CLI tool for sr.ht" + homepage "https://sr.ht/~xenrox/hut" + url "https://git.sr.ht/~xenrox/hut/archive/v0.6.0.tar.gz" + sha256 "f6abe54b433c30557c49aa41d351ec97ef24b4bee3f9dbc91e7db8f366592f99" + license "AGPL-3.0-or-later" + head "https://git.sr.ht/~xenrox/hut", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b325236125aec42c74dbe8d208876f84960dc72b9315a5c259141f4aa361acfa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a794a6301290cd276f54adb4563f0fc6d36a64df5c8e551d31c586130bd7f7d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6dba5c5dcd21ff2ac28fd7cf85d0b42137475c854041a649f7ebf48526d43d58" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f5dffbec031ad1234fe4aaf50ca4dd01cebcb809f1c3a7ef6db808e785b2d09d" + sha256 cellar: :any_skip_relocation, sonoma: "76608f5475592bdc30274a0ae0a1d49653d3cd176916d668015e18dcb199703a" + sha256 cellar: :any_skip_relocation, ventura: "37d5b0b11aa4ec0d8e2d33597d75f3493ea447ed00c3dacb03f24153eebb6c4d" + sha256 cellar: :any_skip_relocation, monterey: "5a7fb7cd6dad34620815d931b1d559cb62b5557c47da05e3a37b5e90c6e343ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29634eb61ceaf3579e21f5eca143860c31d2938a33e60b6859df47bc43ba6040" + end + + depends_on "go" => :build + depends_on "scdoc" => :build + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"config").write <<~EOS + instance "sr.ht" { + access-token "some_fake_access_token" + } + EOS + assert_match "Authentication error: Invalid OAuth bearer token", + shell_output("#{bin}/hut --config #{testpath}/config todo list 2>&1", 1) + end +end diff --git a/Formula/h/hwatch.rb b/Formula/h/hwatch.rb new file mode 100644 index 0000000000000..63f3c705be301 --- /dev/null +++ b/Formula/h/hwatch.rb @@ -0,0 +1,41 @@ +class Hwatch < Formula + desc "Modern alternative to the watch command" + homepage "https://github.com/blacknon/hwatch" + url "https://github.com/blacknon/hwatch/archive/refs/tags/0.3.19.tar.gz" + sha256 "b0c7da2b8279e483a88019f07a058c978c324f37cd67c34b50de46fb5bd0db16" + license "MIT" + head "https://github.com/blacknon/hwatch.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "28288a789480c819fde11788c0b35086e29c19691ce52075565fb46b2abc4f7b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "78cabd0217cac85bdd8d4b459cf2ff9eac0d5cc6fc865fd1287a2b7cceb07c4d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bd598066ec25a28c99b6af7d3cf2dd4f21568effda47fe2d337eccdb97f6acbd" + sha256 cellar: :any_skip_relocation, sonoma: "ae0f06837309e0c232866023b8258b77825353eb931b6f0c8adabf789cb8b7eb" + sha256 cellar: :any_skip_relocation, ventura: "c9fa547c1b2b927bde3a9ad76e3a2f730cd3338e1ccff8ad935633900271d7da" + sha256 cellar: :any_skip_relocation, arm64_linux: "e23c602171e0c2b3fef61c8efbaf763609dac8e410368c07798221acd54cd154" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e4fd00a8be3bb4833c96b76ca42e5ed029ff3da919deae9a199ed09273840038" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + man1.install "man/hwatch.1" + bash_completion.install "completion/bash/hwatch-completion.bash" => "hwatch" + zsh_completion.install "completion/zsh/_hwatch" + fish_completion.install "completion/fish/hwatch.fish" + end + + test do + begin + pid = fork do + system bin/"hwatch", "--interval", "1", "date" + end + sleep 2 + ensure + Process.kill("TERM", pid) + end + + assert_match "hwatch #{version}", shell_output("#{bin}/hwatch --version") + end +end diff --git a/Formula/h/hwloc.rb b/Formula/h/hwloc.rb new file mode 100644 index 0000000000000..9e49ec81a4d5f --- /dev/null +++ b/Formula/h/hwloc.rb @@ -0,0 +1,55 @@ +class Hwloc < Formula + desc "Portable abstraction of the hierarchical topology of modern architectures" + homepage "https://www.open-mpi.org/projects/hwloc/" + url "https://download.open-mpi.org/release/hwloc/v2.12/hwloc-2.12.1.tar.bz2" + sha256 "38a90328bb86259f9bb2fe1dc57fd841e111d1e6358012bef23dfd95d21dc66b" + license "BSD-3-Clause" + + livecheck do + url "https://www.open-mpi.org/software/hwloc/current/downloads/latest_release.txt" + regex(/(\d+\.\d+\.\d+)/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "90fafd57899d674e5f653f5c7c9d964f992877eb2a1d74364ea9cb14f9063149" + sha256 cellar: :any, arm64_sonoma: "ed649bbbddd8352d9d7c8e36f9968cb1975b86378a2ee686637977e6f7a59190" + sha256 cellar: :any, arm64_ventura: "1b19f3b8775e2ed4ec5ec212199c136e3f427321bc4fc19c5a35df543405fbab" + sha256 cellar: :any, sonoma: "270040ceedd93532189119df30d37a666125a16b7679bfb8466e5795d5e788cf" + sha256 cellar: :any, ventura: "d0052e70d0877350983882f598575d38d81e771fe4d567491eae9f25789d45e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "27aadfd1d6983986febec9f2feab8092bbe86561403bcbb6ce1072bcfb0db2e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0cdd5ecab9208d5919050bfecdb84dee087fccaa460d4832e4ed3e859441a9c" + end + + head do + url "https://github.com/open-mpi/hwloc.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 "ncurses" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--enable-shared", + "--enable-static", + "--disable-cairo", + "--without-x", + *std_configure_args + system "make", "install", "bashcompletionsdir=#{bash_completion}" + + pkgshare.install "tests" + + # remove homebrew shims directory references + rm Dir[pkgshare/"tests/**/Makefile"] + end + + test do + system ENV.cc, pkgshare/"tests/hwloc/hwloc_groups.c", "-I#{include}", + "-L#{lib}", "-lhwloc", "-o", "test" + system "./test" + end +end diff --git a/Formula/h/hy.rb b/Formula/h/hy.rb new file mode 100644 index 0000000000000..f92ab61b05265 --- /dev/null +++ b/Formula/h/hy.rb @@ -0,0 +1,32 @@ +class Hy < Formula + include Language::Python::Virtualenv + + desc "Dialect of Lisp that's embedded in Python" + homepage "https://github.com/hylang/hy" + url "https://files.pythonhosted.org/packages/eb/4e/30dbda9961e5eec63606c8d2fd08ece12f28244111df05a79adac2b02f37/hy-1.1.0.tar.gz" + sha256 "c8943ce306341b4b3edab4142f2c7ca55b43415b0ebf6c0e7969290a6eed2948" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "06373055a6ecfc7909dbc3ac76d49381920669abd8e375bc1c96317f0f05dba5" + end + + depends_on "python@3.13" + + resource "funcparserlib" do + url "https://files.pythonhosted.org/packages/93/44/a21dfd9c45ad6909257e5186378a4fedaf41406824ce1ec06bc2a6c168e7/funcparserlib-1.0.1.tar.gz" + sha256 "a2c4a0d7942f7a0e7635c369d921066c8d4cae7f8b5bf7914466bec3c69837f4" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.hy").write "(print (+ 2 2))" + assert_match "4", shell_output("#{bin}/hy test.hy") + + (testpath/"test.py").write shell_output("#{bin}/hy2py test.hy") + assert_match "4", shell_output("#{libexec}/bin/python test.py") + end +end diff --git a/Formula/h/hydra.rb b/Formula/h/hydra.rb new file mode 100644 index 0000000000000..25564197a2be4 --- /dev/null +++ b/Formula/h/hydra.rb @@ -0,0 +1,77 @@ +class Hydra < Formula + desc "Network logon cracker which supports many services" + homepage "https://github.com/vanhauser-thc/thc-hydra" + url "https://github.com/vanhauser-thc/thc-hydra/archive/refs/tags/v9.5.tar.gz" + sha256 "9dd193b011fdb3c52a17b0da61a38a4148ffcad731557696819d4721d1bee76b" + license "AGPL-3.0-only" + revision 5 + head "https://github.com/vanhauser-thc/thc-hydra.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4f52a4dd8c6ee9b1819f64a688cd7f2677873250a515b2269acac1758bafc1c8" + sha256 cellar: :any, arm64_sonoma: "3ecca5dbd9fc6e4770e0c302cb183b65b9eb107ed4a49bea7991905e7635cdaa" + sha256 cellar: :any, arm64_ventura: "ddfa012421a719f0299339726f34303ac70cfc84bb8be9f60faee15c9c670ac2" + sha256 cellar: :any, sonoma: "8e7d6db10c76332a98db7be88357089ad50d984fa057382f1513aaed157f1bfd" + sha256 cellar: :any, ventura: "0cf381bd263ece00b7174f9cf025055616688e77774bf9c9bf7a298a0876a33d" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d8c55399e4bbb56fb9e2f50f99f894d7d729582cdc53e8cd2682f0593928f80" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b289ab00cf96e4b7a327102991a0d1787756dcdca1af594828c05ecc4e86e075" + end + + depends_on "pkgconf" => :build + depends_on "libssh" + depends_on "mariadb-connector-c" + depends_on "openssl@3" + depends_on "pcre2" + + uses_from_macos "ncurses" + + conflicts_with "ory-hydra", because: "both install `hydra` binaries" + + def install + inreplace "configure" do |s| + # Link against our OpenSSL + # https://github.com/vanhauser-thc/thc-hydra/issues/80 + s.gsub!(/^SSL_PATH=""$/, "SSL_PATH=#{Formula["openssl@3"].opt_lib}") + s.gsub!(/^SSL_IPATH=""$/, "SSL_IPATH=#{Formula["openssl@3"].opt_include}") + s.gsub!(/^SSLNEW=""$/, "SSLNEW=YES") + s.gsub!(/^CRYPTO_PATH=""$/, "CRYPTO_PATH=#{Formula["openssl@3"].opt_lib}") + s.gsub!(/^SSH_PATH=""$/, "SSH_PATH=#{Formula["libssh"].opt_lib}") + s.gsub!(/^SSH_IPATH=""$/, "SSH_IPATH=#{Formula["libssh"].opt_include}") + s.gsub!(/^MYSQL_PATH=""$/, "MYSQL_PATH=#{Formula["mariadb-connector-c"].opt_lib}") + s.gsub!(/^MYSQL_IPATH=""$/, "MYSQL_IPATH=#{Formula["mariadb-connector-c"].opt_include}/mariadb") + s.gsub!(/^PCRE_PATH=""$/, "PCRE_PATH=#{Formula["pcre2"].opt_lib}") + s.gsub!(/^PCRE_IPATH=""$/, "PCRE_IPATH=#{Formula["pcre2"].opt_include}") + if OS.mac? + s.gsub!(/^CURSES_PATH=""$/, "CURSES_PATH=#{MacOS.sdk_path_if_needed}/usr/lib") + s.gsub!(/^CURSES_IPATH=""$/, "CURSES_IPATH=#{MacOS.sdk_path_if_needed}/usr/include") + else + s.gsub!(/^CURSES_PATH=""$/, "CURSES_PATH=#{Formula["ncurses"].opt_lib}") + s.gsub!(/^CURSES_IPATH=""$/, "CURSES_IPATH=#{Formula["ncurses"].opt_include}") + end + # Avoid opportunistic linking of everything + %w[ + gtk+-2.0 + libfreerdp2 + libgcrypt + libidn + libmemcached + libmongoc + libpq + libsvn + ].each do |lib| + s.gsub! lib, "oh_no_you_dont" + end + end + + # Having our gcc in the PATH first can cause issues. Monitor this. + # https://github.com/vanhauser-thc/thc-hydra/issues/22 + system "./configure", "--prefix=#{prefix}" + bin.mkpath + system "make", "all", "install" + share.install prefix/"man" # Put man pages in correct place + end + + test do + assert_match(/ mysql .* ssh /, shell_output(bin/"hydra", 255)) + end +end diff --git a/Formula/h/hyfetch.rb b/Formula/h/hyfetch.rb new file mode 100644 index 0000000000000..a2f04b11b1f64 --- /dev/null +++ b/Formula/h/hyfetch.rb @@ -0,0 +1,51 @@ +class Hyfetch < Formula + include Language::Python::Virtualenv + + desc "Fast, highly customisable system info script with LGBTQ+ pride flags" + homepage "https://github.com/hykilpikonna/hyfetch" + url "https://files.pythonhosted.org/packages/1f/7d/7acc8fd22a1a4861f6a3833fbba8d1ffc6d118d143a4cbaab7f998867b4e/HyFetch-1.99.0.tar.gz" + sha256 "ddeb422fd797c710f0ad37d584fac466df89e39feddeef765492b2c0b529616e" + license "MIT" + head "https://github.com/hykilpikonna/hyfetch.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5032952a2e1ded6fc2a2982b8ea254233f5886c54a34717b0affd2890d40765e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5032952a2e1ded6fc2a2982b8ea254233f5886c54a34717b0affd2890d40765e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5032952a2e1ded6fc2a2982b8ea254233f5886c54a34717b0affd2890d40765e" + sha256 cellar: :any_skip_relocation, sonoma: "2adf143cdacc67ab16db6094d2bc2fb3f79137d9a0546836ad24a5036fe16769" + sha256 cellar: :any_skip_relocation, ventura: "2adf143cdacc67ab16db6094d2bc2fb3f79137d9a0546836ad24a5036fe16769" + sha256 cellar: :any_skip_relocation, arm64_linux: "cec6b351903878e14e0dc095ec82b8d38fce455d812e17a65af773df0731d34b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5032952a2e1ded6fc2a2982b8ea254233f5886c54a34717b0affd2890d40765e" + end + + depends_on "python@3.13" + + def install + virtualenv_install_with_resources + end + + test do + (testpath/".config/hyfetch.json").write <<~JSON + { + "preset": "genderfluid", + "mode": "rgb", + "light_dark": "dark", + "lightness": 0.5, + "color_align": { + "mode": "horizontal", + "custom_colors": [], + "fore_back": null + }, + "backend": "neofetch", + "distro": null, + "pride_month_shown": [], + "pride_month_disable": false + } + JSON + + system bin/"neowofetch", "--config", "none", "--color_blocks", "off", + "--disable", "wm", "de", "term", "gpu" + system bin/"hyfetch", "-C", testpath/"hyfetch.json", + "--args=\"--config none --color_blocks off --disable wm de term gpu\"" + end +end diff --git a/Formula/h/hyperestraier.rb b/Formula/h/hyperestraier.rb new file mode 100644 index 0000000000000..7ecfeae48a655 --- /dev/null +++ b/Formula/h/hyperestraier.rb @@ -0,0 +1,51 @@ +class Hyperestraier < Formula + desc "Full-text search system for communities" + homepage "https://dbmx.net/hyperestraier/" + url "https://dbmx.net/hyperestraier/hyperestraier-1.4.13.tar.gz" + sha256 "496f21190fa0e0d8c29da4fd22cf5a2ce0c4a1d0bd34ef70f9ec66ff5fbf63e2" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?hyperestraier[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "18f652254c3b115ffe6fad67be39dee791ef6b8f456122618762417eef74f4cb" + sha256 cellar: :any, arm64_sonoma: "5ac8a21fdb6d25f1855c3ab56253357c1938d3fe45d35f449e23dc28dd997a38" + sha256 cellar: :any, arm64_ventura: "381f8cb7f35472802af7f859b9b5369427a9260cf2470917f74f0e43d78915ec" + sha256 cellar: :any, arm64_monterey: "4c7b331c57a8dc648150b89336b93cd18c172bce495a2fe5f7e351037d640305" + sha256 cellar: :any, arm64_big_sur: "77cc656687e473f7ae65dac6d4efb0ed75538f22890a3f48251791c1947487d0" + sha256 cellar: :any, sonoma: "c981ea80d0221e330581cbe313a598f79776c62e8cd4100a274f3dcb2b435feb" + sha256 cellar: :any, ventura: "ecc6438dbf55e4e3fde88968da4cf9c071b97436e94cb21e3daadd04f5ff4052" + sha256 cellar: :any, monterey: "e97a30177dd2112ae7ef36b2165213874faa7a4ef1e40dd6433ccfdd3eae7ac2" + sha256 cellar: :any, big_sur: "98338e8f67c7cba1df436607f09415415e39a38f695805ddd94720326eae9212" + sha256 cellar: :any, catalina: "0304cb2db3ed4e35c12ccaac0251ea19f7fd4c0f2a5b9f3ffad0f201f7f4357c" + sha256 cellar: :any, mojave: "4275d3ad552f225c5b686532d6cc2703481284fa73eaf3c5b35bc5551dc95761" + sha256 cellar: :any, high_sierra: "f0eeb8e60dc0639fdbf5c15fc22c954a627b5136525021706876972b5bfdd816" + sha256 cellar: :any, sierra: "c6018d888e9a4f03546f1727d9ec7b6d7eb6a87fc4f6755667bdafa71929aca7" + sha256 cellar: :any, el_capitan: "c90ef2d3ccac1af3247726697be33748ec53df85a98af4611b6dbfc9a8dca0c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "82e4346da884ac2a0ef08c094839ff64c4f689a2d036dc4be0db5f7d86af69ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "67da1265df5336838e42f563b8b90041d83d848739bf7972950de444cef78650" + end + + depends_on "pkgconf" => :build + depends_on "qdbm" + + def install + system "./configure", *std_configure_args + if OS.mac? + system "make", "mac" + system "make", "check-mac" + system "make", "install-mac" + else + system "make", "LIBS=-lqdbm -lm" + system "make", "check" + system "make", "install" + end + end + + test do + system bin/"estcmd", "version" + end +end diff --git a/Formula/h/hyperfine.rb b/Formula/h/hyperfine.rb new file mode 100644 index 0000000000000..a77dbe9b47f60 --- /dev/null +++ b/Formula/h/hyperfine.rb @@ -0,0 +1,37 @@ +class Hyperfine < Formula + desc "Command-line benchmarking tool" + homepage "https://github.com/sharkdp/hyperfine" + url "https://github.com/sharkdp/hyperfine/archive/refs/tags/v1.19.0.tar.gz" + sha256 "d1c782a54b9ebcdc1dedf8356a25ee11e11099a664a7d9413fdd3742138fa140" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/sharkdp/hyperfine.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "acf0ce7620aa8b6c3e1f1b755d8fb1a89445b4293935c3d5a96ea3f8f193ec22" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "76a4b9596447f7c86d96de9bd7d9312eceee745509f9bea470bc32fafe0b97b9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1113b8769a5054fd790e5de5cd95089ef500bcce78694f6263be6f25d521f0c7" + sha256 cellar: :any_skip_relocation, sonoma: "4b79040d510fe182211e539164cfa633858ec983b9ae33d62a8f028a18d01a0e" + sha256 cellar: :any_skip_relocation, ventura: "f738c61291419374ec425df822cef3486cc86504d42d7a995301b13485303b60" + sha256 cellar: :any_skip_relocation, arm64_linux: "44571f44266cd6388c86a22fceb6b947d39fe4abebaad9094cc10c163ddea8c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c758dccd2d2f5fbd7f6a2ae6971534ac1cb0c6f0f6e83ff21741798326c98b52" + end + + depends_on "rust" => :build + + def install + ENV["SHELL_COMPLETIONS_DIR"] = buildpath + + system "cargo", "install", *std_cargo_args + + bash_completion.install "hyperfine.bash" => "hyperfine" + fish_completion.install "hyperfine.fish" + zsh_completion.install "_hyperfine" + man1.install "doc/hyperfine.1" + end + + test do + output = shell_output("#{bin}/hyperfine 'sleep 0.3'") + assert_match "Benchmark 1: sleep", output + end +end diff --git a/Formula/h/hyperkit.rb b/Formula/h/hyperkit.rb new file mode 100644 index 0000000000000..52a91e78fe8ad --- /dev/null +++ b/Formula/h/hyperkit.rb @@ -0,0 +1,90 @@ +class Hyperkit < Formula + desc "Toolkit for embedding hypervisor capabilities in your application" + homepage "https://github.com/moby/hyperkit" + url "https://github.com/moby/hyperkit/archive/refs/tags/v0.20210107.tar.gz" + sha256 "095f5f5ef550d7cad10e4d13e9c9ce8b58cc319d654a6d837d8d87ee70537835" + license "BSD-2-Clause" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, monterey: "69e59bde1dae4ff1da807711cd9060cdf81e248aa55a0dd761a20abd8787e20b" + end + + # does not build for 13 and 14, and no upstream commits in the past two years + deprecate! date: "2024-06-06", because: :unmaintained + + depends_on "ocaml" => :build + depends_on "opam" => :build + depends_on "pkgconf" => :build + depends_on xcode: ["9.0", :build] + depends_on arch: :x86_64 + depends_on "libev" + depends_on :macos # Uses Hypervisor.framework, a component of macOS. + + resource "tinycorelinux" do + url "https://github.com/Homebrew/homebrew-core/files/6405545/tinycorelinux_8.x.tar.gz" + sha256 "560c1d2d3a0f12f9b1200eec57ca5c1d107cf4823d3880e09505fcd9cd39141a" + end + + def install + system "opam", "init", "--disable-sandboxing", "--no-setup" + opam_dir = "#{buildpath}/.brew_home/.opam" + ENV["CAML_LD_LIBRARY_PATH"] = "#{opam_dir}/system/lib/stublibs:#{Formula["ocaml"].opt_lib}/ocaml/stublibs" + ENV["OPAMUTF8MSGS"] = "1" + ENV["PERL5LIB"] = "#{opam_dir}/system/lib/perl5" + ENV["OCAML_TOPLEVEL_PATH"] = "#{opam_dir}/system/lib/toplevel" + ENV.prepend_path "PATH", "#{opam_dir}/system/bin" + + system "opam", "exec", "--", + "opam", "install", "-y", "uri.4.2.0", "qcow.0.11.0", "conduit.2.1.0", "lwt.5.3.0", + "qcow-tool.0.11.0", "mirage-block-unix.2.12.0", "conf-libev.4-11", "logs.0.7.0", "fmt.0.8.8", + "mirage-unix.4.0.0", "prometheus-app.0.7" + + args = [] + args << "GIT_VERSION=#{version}" + system "opam", "exec", "--", "make", *args + + bin.install "build/hyperkit" + man1.install "hyperkit.1" + end + + test do + assert_match(version.to_s, shell_output("#{bin}/hyperkit -v 2>&1")) + + if Hardware::CPU.features.include? :vmx + resource("tinycorelinux").stage do |context| + tmpdir = context.staging.tmpdir + path_resource_versioned = Dir.glob(tmpdir.join("tinycorelinux_[0-9]*"))[0] + cp(File.join(path_resource_versioned, "vmlinuz"), testpath) + cp(File.join(path_resource_versioned, "initrd.gz"), testpath) + end + + (testpath/"test_hyperkit.exp").write <<~EXPECT + #!/usr/bin/env expect -d + set KERNEL "./vmlinuz" + set KERNEL_INITRD "./initrd.gz" + set KERNEL_CMDLINE "earlyprintk=serial console=ttyS0" + set MEM {512M} + set PCI_DEV1 {0:0,hostbridge} + set PCI_DEV2 {31,lpc} + set LPC_DEV {com1,stdio} + set ACPI {-A} + spawn #{bin}/hyperkit $ACPI -m $MEM -s $PCI_DEV1 -s $PCI_DEV2 -l $LPC_DEV -f kexec,$KERNEL,$KERNEL_INITRD,$KERNEL_CMDLINE + set pid [exp_pid] + set timeout 20 + expect { + timeout { puts "FAIL boot"; exec kill -9 $pid; exit 1 } + "\\r\\ntc@box:~$ " + } + send "sudo halt\\r\\n"; + expect { + timeout { puts "FAIL shutdown"; exec kill -9 $pid; exit 1 } + "reboot: System halted" + } + expect eof + puts "\\nPASS" + EXPECT + system "expect", "test_hyperkit.exp" + end + end +end diff --git a/Formula/h/hyperscan.rb b/Formula/h/hyperscan.rb new file mode 100644 index 0000000000000..9430958f95eae --- /dev/null +++ b/Formula/h/hyperscan.rb @@ -0,0 +1,59 @@ +class Hyperscan < Formula + desc "High-performance regular expression matching library" + homepage "https://www.intel.com/content/www/us/en/developer/articles/technical/introduction-to-hyperscan.html" + url "https://github.com/intel/hyperscan/archive/refs/tags/v5.4.2.tar.gz" + sha256 "32b0f24b3113bbc46b6bfaa05cf7cf45840b6b59333d078cc1f624e4c40b2b99" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, sonoma: "2019ecd836e8e16a4b4a1e2605297900ee9d5e6ca8fce4c2cee056ea8c00934d" + sha256 cellar: :any, ventura: "a5866b950b8b18122c144b6b6ff2ca64705861d59917a1762bef1faff1cc7b8a" + sha256 cellar: :any, monterey: "d67efe0abd515b90c2fe9e10694c99f62e708ac507395aa232bbb54eac0470b6" + sha256 cellar: :any, big_sur: "f000309c80201f6a1ced867c4d36d45a51ea980cd3ee116e853cf03625efcc77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45406945a7c9c98bb01d8dc90ad045746bbe7b0146a522badbc8925dd03d0fd5" + end + + # This software is no longer open-source after this version, + # and the upstream repository is not receiving any updates. + deprecate! date: "2024-05-10", because: :unmaintained + disable! date: "2025-05-11", because: :unmaintained, replacement_formula: "vectorscan" + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "ragel" => :build + # Only supports x86 instructions and will fail to build on ARM. + # See https://github.com/intel/hyperscan/issues/197 + depends_on arch: :x86_64 + depends_on "pcre" # PCRE2 issue: https://github.com/intel/hyperscan/issues/397 + + uses_from_macos "python" => :build + + def install + args = %W[ + -DBUILD_STATIC_AND_SHARED=ON + -DPYTHON_EXECUTABLE=#{which("python3") || which("python")} + ] + + # Linux CI cannot guarantee AVX2 support needed to build fat runtime. + args << "-DFAT_RUNTIME=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 + int main() + { + printf("hyperscan v%s", hs_version()); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lhs", "-o", "test" + system "./test" + end +end diff --git a/Formula/h/hypopg.rb b/Formula/h/hypopg.rb new file mode 100644 index 0000000000000..8d4d83928ac21 --- /dev/null +++ b/Formula/h/hypopg.rb @@ -0,0 +1,56 @@ +class Hypopg < Formula + desc "Hypothetical Indexes for PostgreSQL" + homepage "https://github.com/HypoPG/hypopg" + url "https://github.com/HypoPG/hypopg/archive/refs/tags/1.4.1.tar.gz" + sha256 "9afe6357fd389d8d33fad81703038ce520b09275ec00153c6c89282bcdedd6bc" + license "PostgreSQL" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "10b284849ebe8618fcd22cf24d8c7f738a6c8eebbfc43985a507678933d7cb99" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5af96aaf0761e90723a994ecd9513d41771f9b29322d83d9ed59e5333d75a29d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "336b887e0c2c5cd91097071f09d67bd9d9de7524015e1496e70866c63b1e4d8f" + sha256 cellar: :any_skip_relocation, sonoma: "102e97902b5026c63764d4e82c30aebe724f41d73d8bec88c6d3910a49acfb32" + sha256 cellar: :any_skip_relocation, ventura: "7fa60d1d35db14d12c9c77a9ada287f3b89bf9126047a85fde1a77d4567f794e" + sha256 cellar: :any_skip_relocation, arm64_linux: "b24987307d13aef5c00b76fe88a171c97037c9e7a40abd84873066479e2bdb2d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c86012c904916b59941015fa5f90726c1b968edd014214b52a7c0e3fe13095d8" + end + + depends_on "postgresql@14" => [:build, :test] + depends_on "postgresql@17" => [:build, :test] + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + 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 hypopg;", "postgres" + ensure + system pg_ctl, "stop", "-D", datadir + end + end + end +end diff --git a/Formula/h/hypre.rb b/Formula/h/hypre.rb new file mode 100644 index 0000000000000..a31902e2a3860 --- /dev/null +++ b/Formula/h/hypre.rb @@ -0,0 +1,47 @@ +class Hypre < Formula + desc "Library featuring parallel multigrid methods for grid problems" + homepage "https://computing.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods" + url "https://github.com/hypre-space/hypre/archive/refs/tags/v2.33.0.tar.gz" + sha256 "0f9103c34bce7a5dcbdb79a502720fc8aab4db9fd0146e0791cde7ec878f27da" + license any_of: ["MIT", "Apache-2.0"] + head "https://github.com/hypre-space/hypre.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86c808a2d91ad2cb4e451e10445911ebdfddc094f683ec5dc4135e3d32373179" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "980dfd622aec636d422f3ee28ca6a0a8069634b85c75f45bd0a61136ed241dd7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cd5cce6bbe748ee40110a0c6fa3be575a7ad940435c162194cc6504f300cdc15" + sha256 cellar: :any_skip_relocation, sonoma: "d4c4a4b58c7b5217f625d1e0726b899563f99a3d92a45decf651522900fc2ef9" + sha256 cellar: :any_skip_relocation, ventura: "b62f0376fa5930164977c6b3e5766ecc14375a5f7e15a806c28fbf2ce241dcee" + sha256 cellar: :any_skip_relocation, arm64_linux: "f890413fed72b117977cd0235e885a983af1fc5c998a98fa22a7aae87333a596" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9eea76ecc19f0455d9a8416aa615626f67c77d6792ae173b1d6944ceecb1c2c3" + end + + depends_on "gcc" # for gfortran + depends_on "open-mpi" + + def install + cd "src" do + system "./configure", "--prefix=#{prefix}", + "--with-MPI", + "--enable-bigint" + system "make", "install" + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "HYPRE_struct_ls.h" + int main(int argc, char* argv[]) { + HYPRE_StructGrid grid; + } + CPP + + system ENV.cxx, "test.cpp", "-o", "test" + system "./test" + end +end diff --git a/Formula/h/hysteria.rb b/Formula/h/hysteria.rb new file mode 100644 index 0000000000000..eb54db368d1ab --- /dev/null +++ b/Formula/h/hysteria.rb @@ -0,0 +1,61 @@ +class Hysteria < Formula + desc "Feature-packed proxy & relay tool optimized for lossy, unstable connections" + homepage "https://hysteria.network/" + url "https://github.com/apernet/hysteria/archive/refs/tags/app/v2.6.1.tar.gz" + sha256 "21955752d4a9fcbe42cde9e491421b67144e0070cba184884ad7f8d4ff1f48de" + license "MIT" + head "https://github.com/apernet/hysteria.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "893d862f1cc8ff509a85160f845542bed099266ce239d4a678bd51e54c223cf1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "893d862f1cc8ff509a85160f845542bed099266ce239d4a678bd51e54c223cf1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "893d862f1cc8ff509a85160f845542bed099266ce239d4a678bd51e54c223cf1" + sha256 cellar: :any_skip_relocation, sonoma: "edd9a98c25c2d783dd01daa311c6ac7bf37a7251a6cfa6ec49778a78c9265921" + sha256 cellar: :any_skip_relocation, ventura: "edd9a98c25c2d783dd01daa311c6ac7bf37a7251a6cfa6ec49778a78c9265921" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf9dafc3df20027eec5f19fab1a099d7fcc5e5ac1784bfd545c410f370462ca3" + end + + depends_on "go" => :build + + def install + pkg = "github.com/apernet/hysteria/app/v2/cmd" + ldflags = %W[ + -s -w + -X #{pkg}.appVersion=v#{version} + -X #{pkg}.appDate=#{time.iso8601} + -X #{pkg}.appType=release + -X #{pkg}.appCommit=#{tap.user} + -X #{pkg}.appPlatform=#{OS.kernel_name.downcase} + -X #{pkg}.appArch=#{Hardware::CPU.arch} + ] + system "go", "build", *std_go_args(ldflags:), "./app" + + generate_completions_from_executable(bin/"hysteria", "completion") + end + + service do + run [opt_bin/"hysteria", "--config", etc/"hysteria/config.yaml"] + run_type :immediate + keep_alive true + end + + test do + port = free_port + (testpath/"config.yaml").write <<~YAML + listen: :#{port} + acme: + domains: + - your.domain.com + email: your@email.com + + obfs: + type: salamander + salamander: + password: cry_me_a_r1ver + YAML + output = shell_output("#{bin}/hysteria server --disable-update-check -c #{testpath}/config.yaml 2>&1", 1) + assert_match "maintenance started background certificate maintenance", output + + assert_match version.to_s, shell_output("#{bin}/hysteria version") + end +end diff --git a/Formula/h/hyx.rb b/Formula/h/hyx.rb new file mode 100644 index 0000000000000..031d937dd2efa --- /dev/null +++ b/Formula/h/hyx.rb @@ -0,0 +1,45 @@ +class Hyx < Formula + desc "Powerful hex editor for the console" + homepage "https://yx7.cc/code/" + url "https://yx7.cc/code/hyx/hyx-2024.02.29.tar.xz" + sha256 "76e7f1df3b1a6de7aded1a7477ad0c22e36a8ac21077a52013b5836583479771" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?hyx[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd26c1c352925782b4e7d45785b76f40f245fa2f1dbbc98f9cc4f2d3666cfa58" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7f55cd07a556e62e1b0264f158397ab1a13ee78ceed580c499b40b8f4158a8a7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa1142ffce4cb48c51d90fa02b8dfcf43d9685bae6011f6ec072b71bc916035c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ab078d0fa36bef1b72850c4a355268afaeb8f889fb96cc14d4ac0fa0292727c8" + sha256 cellar: :any_skip_relocation, sonoma: "9f084d25734ace46da19988e530330c80da3aee8d09b474ed151c0fe67ee45ca" + sha256 cellar: :any_skip_relocation, ventura: "3328518acd239a750d5abf4aa64ce03a5cde6ba9e4d295008ba88211bf6da8fe" + sha256 cellar: :any_skip_relocation, monterey: "652226492680dbb33afac3764bac50c27386811d37922f08c487ef0086b3426f" + sha256 cellar: :any_skip_relocation, arm64_linux: "dcbfd8ea3d3bf741858c96956174d8813ddd1e925c334643cbcd7883b0dbdf10" + sha256 cellar: :any_skip_relocation, x86_64_linux: "caa4542a609e244b3d83ca4e45e3fb9a71d3fa77e8ba0346803b24f63cc205bf" + end + + def install + system "make" + bin.install "hyx" + end + + test do + require "pty" + PTY.spawn(bin/"hyx", "test") do |r, w, pid| + r.winsize = [80, 43] + w.write "62726577:wq\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 "brew", (testpath/"test").read + end +end diff --git a/Formula/h/hz.rb b/Formula/h/hz.rb new file mode 100644 index 0000000000000..a17f976ecef55 --- /dev/null +++ b/Formula/h/hz.rb @@ -0,0 +1,43 @@ +class Hz < Formula + desc "Golang HTTP framework for microservices" + homepage "https://github.com/cloudwego/hertz" + url "https://github.com/cloudwego/hertz/archive/refs/tags/cmd/hz/v0.9.7.tar.gz" + sha256 "c2d894db10414648cd4d131ca1405cb1fde0dcdd3287fbd4c4623c9916ae6717" + license "Apache-2.0" + head "https://github.com/cloudwego/hertz.git", branch: "develop" + + livecheck do + url :stable + regex(%r{^cmd/hz/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4ce4bbaf5113e48f449db2b510cd18797b23c40035d488bc1fc8a364a16d9a6c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4ce4bbaf5113e48f449db2b510cd18797b23c40035d488bc1fc8a364a16d9a6c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4ce4bbaf5113e48f449db2b510cd18797b23c40035d488bc1fc8a364a16d9a6c" + sha256 cellar: :any_skip_relocation, sonoma: "464319954276a791ad9366da2feb521563721204dc1ffe4c18e733b4a6acd4c0" + sha256 cellar: :any_skip_relocation, ventura: "464319954276a791ad9366da2feb521563721204dc1ffe4c18e733b4a6acd4c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9906a09535199349b1e5bae6c8b5ffd62b9f2a74437480d4783e705d4cc161a6" + end + + depends_on "go" => [:build, :test] + + def install + cd "cmd/hz" do + system "go", "build", *std_go_args(ldflags: "-s -w") + end + bin.install_symlink bin/"hz" => "thrift-gen-hertz" + bin.install_symlink bin/"hz" => "protoc-gen-hertz" + end + + test do + ENV["GOPATH"] = testpath + + output = shell_output("#{bin}/hz --version 2>&1") + assert_match "hz version v#{version}", output + + system bin/"hz", "new", "--mod=test" + assert_path_exists testpath/"main.go" + refute_predicate (testpath/"main.go").size, :zero? + end +end diff --git a/Formula/h2.rb b/Formula/h2.rb deleted file mode 100644 index c61499aa97281..0000000000000 --- a/Formula/h2.rb +++ /dev/null @@ -1,67 +0,0 @@ -class H2 < Formula - desc "Java SQL database" - homepage "https://www.h2database.com/" - url "https://www.h2database.com/h2-2019-10-14.zip" - version "1.4.200" - sha256 "a72f319f1b5347a6ee9eba42718e69e2ae41e2f846b3475f9292f1e3beb59b01" - - bottle :unneeded - - def script - <<~EOS - #!/bin/sh - cd #{libexec} && bin/h2.sh "$@" - EOS - end - - def install - # Remove windows files - rm_f Dir["bin/*.bat"] - - # As of 1.4.190, the script contains \r\n line endings, - # causing it to fail on macOS. This is a workaround until - # upstream publishes a fix. - # - # https://github.com/h2database/h2database/issues/218 - h2_script = File.read("bin/h2.sh").gsub("\r\n", "\n") - File.open("bin/h2.sh", "w") { |f| f.write h2_script } - - # Fix the permissions on the script - chmod 0755, "bin/h2.sh" - - libexec.install Dir["*"] - (bin+"h2").write script - end - - plist_options :manual => "h2" - - def plist - <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_bin}/h2 - -tcp - -web - -pg - - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end - - test do - assert_match "Usage: java org.h2.tools.GUIConsole", shell_output("#{bin}/h2 -help 2>&1") - end -end diff --git a/Formula/h264bitstream.rb b/Formula/h264bitstream.rb deleted file mode 100644 index a007406744370..0000000000000 --- a/Formula/h264bitstream.rb +++ /dev/null @@ -1,24 +0,0 @@ -class H264bitstream < Formula - desc "Library for reading and writing H264 video streams" - homepage "https://h264bitstream.sourceforge.io/" - url "https://downloads.sourceforge.net/project/h264bitstream/h264bitstream/0.2.0/h264bitstream-0.2.0.tar.gz" - sha256 "94912cb07ef67da762be9c580b325fd8957ad400793c9030f3fb6565c6d263a7" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "ac1f452b4c4d4d90310ec1f3cd9ec45271665604844dca55df3f7a91885d28d7" => :catalina - sha256 "ebe66ef0a10e2afacf2b418eb15aa57ed873c6df73d6da71b6252efce8c15a5e" => :mojave - sha256 "191acedb64e2ab618696fe16c55b81cdadb9819a0b0fc594235d31a28a1cdf96" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-iv" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/h2o.rb b/Formula/h2o.rb deleted file mode 100644 index 718cce72d31dc..0000000000000 --- a/Formula/h2o.rb +++ /dev/null @@ -1,95 +0,0 @@ -class H2o < Formula - desc "HTTP server with support for HTTP/1.x and HTTP/2" - homepage "https://github.com/h2o/h2o/" - url "https://github.com/h2o/h2o/archive/v2.2.6.tar.gz" - sha256 "f8cbc1b530d85ff098f6efc2c3fdbc5e29baffb30614caac59d5c710f7bda201" - license "MIT" - revision 1 - - bottle do - sha256 "2a76dbab7292c0244c32e6a350f0c39dfb4d9b066de8510f2d8f3a9905c05f54" => :catalina - sha256 "4f8f5c326d24dcfc95faf48849ae89721f1e19a407968cfa67efbc99dba33f76" => :mojave - sha256 "80eac6a05ba27ce57142ad1a9211495fa3b044433623438b6319109e2852eb55" => :high_sierra - sha256 "049e412820e6495cfb0906101cb00cea928543583cfc1b6986e0a52d1d215d0c" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - # https://github.com/Homebrew/homebrew-core/pull/1046 - # https://github.com/Homebrew/brew/pull/251 - ENV.delete("SDKROOT") - - system "cmake", *std_cmake_args, - "-DWITH_BUNDLED_SSL=OFF", - "-DOPENSSL_ROOT_DIR=#{Formula["openssl@1.1"].opt_prefix}" - system "make", "install" - - (etc/"h2o").mkpath - (var/"h2o").install "examples/doc_root/index.html" - # Write up a basic example conf for testing. - (buildpath/"brew/h2o.conf").write conf_example - (etc/"h2o").install buildpath/"brew/h2o.conf" - pkgshare.install "examples" - end - - # This is simplified from examples/h2o/h2o.conf upstream. - def conf_example(port = 8080) - <<~EOS - listen: #{port} - hosts: - "127.0.0.1.xip.io:#{port}": - paths: - /: - file.dir: #{var}/h2o/ - EOS - end - - def caveats - <<~EOS - A basic example configuration file has been placed in #{etc}/h2o. - - You can find fuller, unmodified examples in #{opt_pkgshare}/examples. - EOS - end - - plist_options :manual => "h2o" - - def plist - <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_bin}/h2o - -c - #{etc}/h2o/h2o.conf - - - - EOS - end - - test do - port = free_port - (testpath/"h2o.conf").write conf_example(port) - fork do - exec "#{bin}/h2o -c #{testpath}/h2o.conf" - end - sleep 2 - - assert_match "Welcome to H2O", shell_output("curl localhost:#{port}") - end -end diff --git a/Formula/h3.rb b/Formula/h3.rb deleted file mode 100644 index 50696b5f046b2..0000000000000 --- a/Formula/h3.rb +++ /dev/null @@ -1,34 +0,0 @@ -class H3 < Formula - desc "Hexagonal hierarchical geospatial indexing system" - homepage "https://uber.github.io/h3/" - url "https://github.com/uber/h3/archive/v3.6.4.tar.gz" - sha256 "b80c2eee2b3e645de77893e27ca149e63d3bb6bf95d33e3a384e3f390e2681bb" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "17f1a0f774f7b5a25f1b02fcd19d9edd6fbe2a994aba9ad8bd3e6c964f84ddda" => :catalina - sha256 "a100aa0c3fc2a23d01aa4b9524d89a3a457b098563df19ae7b8499b43e2eddca" => :mojave - sha256 "67f1d3f546bbea83339951e7b4428a14852453d2049d9d5c24acf894abdd5ad0" => :high_sierra - end - - depends_on "cmake" => :build - - # remove in next release - patch do - url "https://github.com/uber/h3/pull/362.patch?full_index=1" - sha256 "a86d8dc0296fcf5fafd3ce071c85725e768886e350905bc88d13a01d98601a94" - end - - def install - mkdir "build" do - system "cmake", "..", "-DBUILD_SHARED_LIBS=YES", *std_cmake_args - system "make", "install" - end - end - - test do - result = pipe_output("#{bin}/geoToH3 -r 10 --lat 40.689167 --lon -74.044444") - assert_equal "8a2a1072b59ffff", result.chomp - end -end diff --git a/Formula/hackrf.rb b/Formula/hackrf.rb deleted file mode 100644 index 316e33dcd7f36..0000000000000 --- a/Formula/hackrf.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Hackrf < Formula - desc "Low cost software radio platform" - homepage "https://github.com/mossmann/hackrf" - url "https://github.com/mossmann/hackrf/archive/v2018.01.1.tar.gz" - sha256 "84dbb5536d3aa5bd6b25d50df78d591e6c3431d752de051a17f4cb87b7963ec3" - license "GPL-2.0" - head "https://github.com/mossmann/hackrf.git" - - bottle do - cellar :any - sha256 "4004e867109e43fb7f9613c01a99ffd3d8dee0949d6f27232b06bf740d1e1776" => :catalina - sha256 "9c0610e7d8fe8f1e840b38d3ce6eeab741842a95f227025fbca24c417ae30549" => :mojave - sha256 "430173362cc05912520a38f41ce465a0966f1c8d849fd492f0b40074425c3f88" => :high_sierra - sha256 "f33bc6bde41e6522d587bc574c01e1402ccbde6759dec5e9d1a1e5f593e189b3" => :sierra - sha256 "909a5a9aca6f81cbab08bb7c063f3ee0e666bb5b44af86ebbec62cbdaf3e3b33" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "fftw" - depends_on "libusb" - - def install - cd "host" do - system "cmake", ".", *std_cmake_args - system "make", "install" - end - end - - test do - shell_output("#{bin}/hackrf_transfer", 1) - end -end diff --git a/Formula/hadolint.rb b/Formula/hadolint.rb deleted file mode 100644 index 8fa72311d522b..0000000000000 --- a/Formula/hadolint.rb +++ /dev/null @@ -1,43 +0,0 @@ -require "language/haskell" - -class Hadolint < Formula - include Language::Haskell::Cabal - - desc "Smarter Dockerfile linter to validate best practices" - homepage "https://github.com/hadolint/hadolint" - url "https://github.com/hadolint/hadolint/archive/v1.18.0.tar.gz" - sha256 "0ebe67e543226721c3802dd56db0355575accf50f10c09fe188bbb604aa8c193" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "63418b66810e1792249522adb0ec5a4b952e4bef34a5425525ca2d7eccbc69ee" => :catalina - sha256 "519d3abecbff0d2cc2aaead01027d18e3b061c45dd63de429c4baab0c677b1ed" => :mojave - sha256 "bc87517a3a30252c0477e4862146ac33604b355a8c900f566bfaa1f404a284ad" => :high_sierra - end - - depends_on "haskell-stack" => :build - - uses_from_macos "xz" - - on_linux do - depends_on "gmp" - end - - def install - # Let `stack` handle its own parallelization - jobs = ENV.make_jobs - ENV.deparallelize - - system "stack", "-j#{jobs}", "build" - system "stack", "-j#{jobs}", "--local-bin-path=#{bin}", "install" - end - - test do - df = testpath/"Dockerfile" - df.write <<~EOS - FROM debian - EOS - assert_match "DL3006", shell_output("#{bin}/hadolint #{df}", 1) - end -end diff --git a/Formula/hadoop.rb b/Formula/hadoop.rb deleted file mode 100644 index 64d00cf3116a1..0000000000000 --- a/Formula/hadoop.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Hadoop < Formula - desc "Framework for distributed processing of large data sets" - homepage "https://hadoop.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=hadoop/common/hadoop-3.2.1/hadoop-3.2.1.tar.gz" - mirror "https://archive.apache.org/dist/hadoop/common/hadoop-3.2.1/hadoop-3.2.1.tar.gz" - sha256 "f66a3a4115b8f16c1077d1a198a06854dbef0e4233291712ed08d0a10629ed37" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - conflicts_with "yarn", :because => "both install `yarn` binaries" - - def install - rm_f Dir["bin/*.cmd", "sbin/*.cmd", "libexec/*.cmd", "etc/hadoop/*.cmd"] - libexec.install %w[bin sbin libexec share etc] - Dir["#{libexec}/bin/*"].each do |path| - (bin/File.basename(path)).write_env_script path, :JAVA_HOME => Formula["openjdk"].opt_prefix - end - Dir["#{libexec}/sbin/*"].each do |path| - (sbin/File.basename(path)).write_env_script path, :JAVA_HOME => Formula["openjdk"].opt_prefix - end - Dir["#{libexec}/libexec/*.sh"].each do |path| - (libexec/File.basename(path)).write_env_script path, :JAVA_HOME => Formula["openjdk"].opt_prefix - end - # Temporary fix until https://github.com/Homebrew/brew/pull/4512 is fixed - chmod 0755, Dir["#{libexec}/*.sh"] - end - - test do - system bin/"hadoop", "fs", "-ls" - end -end diff --git a/Formula/halibut.rb b/Formula/halibut.rb deleted file mode 100644 index 2e6c3019cde0a..0000000000000 --- a/Formula/halibut.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Halibut < Formula - desc "Yet another free document preparation system" - homepage "https://www.chiark.greenend.org.uk/~sgtatham/halibut/" - url "https://www.chiark.greenend.org.uk/~sgtatham/halibut/halibut-1.2/halibut-1.2.tar.gz" - sha256 "1aedfb6240f27190c36a390fcac9ce732edbdbaa31c85ee675b994e2b083163f" - head "https://git.tartarus.org/simon/halibut.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "e9bd74c1ab130f4abc824906bf1f73f910032a4c7c0938798f7fbab2f1346020" => :catalina - sha256 "05f0236c180aeab690979615812fb72642e7cdeaccb35ebb865a53aadb35e7c6" => :mojave - sha256 "fe74b9670ae0d996a17de4a70a140365d057a83a643125dcbd16b33dacad9f6a" => :high_sierra - end - - def install - system "make", "prefix=#{prefix}", "mandir=#{man}", "all" - system "make", "-C", "doc", "prefix=#{prefix}", "mandir=#{man}" - system "make", "prefix=#{prefix}", "mandir=#{man}", "install" - end - - test do - (testpath/"sample.but").write("Hello, world!") - system "#{bin}/halibut", "--html=sample.html", "sample.but" - - assert_match("

\nHello, world!\n<\/p>", - (testpath/"sample.html").read) - end -end diff --git a/Formula/hamlib.rb b/Formula/hamlib.rb deleted file mode 100644 index e475a51395bce..0000000000000 --- a/Formula/hamlib.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Hamlib < Formula - desc "Ham radio control libraries" - homepage "https://hamlib.sourceforge.io/" - url "https://src.fedoraproject.org/repo/pkgs/hamlib/hamlib-3.3.tar.gz/sha512/4cf6c94d0238c8a13aed09413b3f4a027c8ded07f8840cdb2b9d38b39b6395a4a88a8105257015345f6de0658ab8c60292d11a9de3e16a493e153637af630a80/hamlib-3.3.tar.gz" - sha256 "c90b53949c767f049733b442cd6e0a48648b55d99d4df5ef3f852d985f45e880" - - bottle do - cellar :any - sha256 "45c4558dd261444364a656c8afb48f0ec7a95efe27f2b7e65784687081f6e6c3" => :catalina - sha256 "cef1ba3b5dcb592c43686f76e9167ee60c19331672164bae5186620d6db7d382" => :mojave - sha256 "1a347bc581ea06ee93d2c2ddf955f54a6997484b91aabd304fdc077bd70936b9" => :high_sierra - sha256 "eb3ce94a8e752ab792dd306221b74d0a254695d64bd818fbb841ef068b6b7600" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "libtool" - depends_on "libusb-compat" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/rigctl", "-V" - end -end diff --git a/Formula/handbrake.rb b/Formula/handbrake.rb deleted file mode 100644 index 8b480b7e5b1e1..0000000000000 --- a/Formula/handbrake.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Handbrake < Formula - desc "Open-source video transcoder available for Linux, Mac, and Windows" - homepage "https://handbrake.fr/" - url "https://github.com/HandBrake/HandBrake/releases/download/1.3.3/HandBrake-1.3.3-source.tar.bz2" - sha256 "218a37d95f48b5e7cf285363d3ab16c314d97627a7a710cab3758902ae877f85" - head "https://github.com/HandBrake/HandBrake.git" - - bottle do - cellar :any_skip_relocation - sha256 "79cad2f66f656641da650bac57445c033ed6e23ac4707a96b1bdd38298fba007" => :catalina - sha256 "7930401b64b3960fb96edf3da3d3b235fe881c1282b9db2be303e99a5b15d473" => :mojave - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "cmake" => :build - depends_on "libtool" => :build - depends_on "meson" => :build - depends_on "nasm" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on :xcode => ["10.3", :build] - depends_on "yasm" => :build - - def install - inreplace "contrib/ffmpeg/module.defs", "$(FFMPEG.GCC.gcc)", "cc" - system "./configure", "--prefix=#{prefix}", - "--disable-xcode", - "--disable-gtk" - system "make", "-C", "build" - system "make", "-C", "build", "install" - end - - test do - system bin/"HandBrakeCLI", "--help" - end -end diff --git a/Formula/hapi-fhir-cli.rb b/Formula/hapi-fhir-cli.rb deleted file mode 100644 index 2351231a8d72f..0000000000000 --- a/Formula/hapi-fhir-cli.rb +++ /dev/null @@ -1,29 +0,0 @@ -class HapiFhirCli < Formula - desc "Command-line interface for the HAPI FHIR library" - homepage "https://hapifhir.io/hapi-fhir/docs/tools/hapi_fhir_cli.html" - url "https://github.com/jamesagnew/hapi-fhir/releases/download/v5.0.0/hapi-fhir-5.0.0-cli.zip" - sha256 "a08877a6d07cd480cc85966ff66025fe378101fedd3a287f9b29813579929214" - license "Apache-2.0" - - bottle :unneeded - - depends_on "openjdk" - - resource "test_resource" do - url "https://github.com/jamesagnew/hapi-fhir/raw/v5.0.0/hapi-fhir-structures-dstu3/src/test/resources/specimen-example.json" - sha256 "4eacf47eccec800ffd2ca23b704c70d71bc840aeb755912ffb8596562a0a0f5e" - end - - def install - inreplace "hapi-fhir-cli", /SCRIPTDIR=(.*)/, "SCRIPTDIR=#{libexec}" - libexec.install "hapi-fhir-cli.jar" - bin.install "hapi-fhir-cli" - bin.env_script_all_files libexec/"bin", :JAVA_HOME => Formula["openjdk"].opt_prefix - end - - test do - testpath.install resource("test_resource") - system bin/"hapi-fhir-cli", "validate", "--file", "specimen-example.json", - "--fhir-version", "dstu3" - end -end diff --git a/Formula/haproxy.rb b/Formula/haproxy.rb deleted file mode 100644 index d6ceff26610ff..0000000000000 --- a/Formula/haproxy.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Haproxy < Formula - desc "Reliable, high performance TCP/HTTP load balancer" - homepage "https://www.haproxy.org/" - url "https://www.haproxy.org/download/2.2/src/haproxy-2.2.0.tar.gz" - sha256 "3c1a87160eea40e067f1e2813bfe692280a10c455beb17a8ee7fae11e4223274" - - bottle do - cellar :any - sha256 "0321c84dd236915de93bf218f7b6f7616c85ecf058639760a94d24ac9d0c0d83" => :catalina - sha256 "da00b9480533821e1b34bffa7a2d602ddc5f96e03aaa439ea2bae0349549a858" => :mojave - sha256 "501ccc11c70474ef69d4544416a5a7777a6aeb9be0249f596b944c6cb12e8a68" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "pcre" - - def install - args = %w[ - TARGET=generic - USE_KQUEUE=1 - USE_POLL=1 - USE_PCRE=1 - USE_OPENSSL=1 - USE_THREAD=1 - USE_ZLIB=1 - ADDLIB=-lcrypto - ] - - # We build generic since the Makefile.osx doesn't appear to work - system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", "LDFLAGS=#{ENV.ldflags}", *args - man1.install "doc/haproxy.1" - bin.install "haproxy" - end - - plist_options :manual => "haproxy -f #{HOMEBREW_PREFIX}/etc/haproxy.cfg" - - def plist - <<~EOS - - - - - Label - #{plist_name} - KeepAlive - - ProgramArguments - - #{opt_bin}/haproxy - -f - #{etc}/haproxy.cfg - - StandardErrorPath - #{var}/log/haproxy.log - StandardOutPath - #{var}/log/haproxy.log - - - EOS - end - - test do - system bin/"haproxy", "-v" - end -end diff --git a/Formula/harbour.rb b/Formula/harbour.rb deleted file mode 100644 index 1714b6118e335..0000000000000 --- a/Formula/harbour.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Harbour < Formula - desc "Portable, xBase-compatible programming language and environment" - homepage "https://harbour.github.io/" - head "https://github.com/harbour/core.git" - - # Missing a header that was deprecated by libcurl @ version 7.12.0 and - # deleted sometime after Harbour 3.0.0 release. - stable do - patch :DATA - url "https://downloads.sourceforge.net/harbour-project/source/3.0.0/harbour-3.0.0.tar.bz2" - sha256 "4e99c0c96c681b40c7e586be18523e33db24baea68eb4e394989a3b7a6b5eaad" - end - - bottle do - cellar :any - rebuild 2 - sha256 "a782b441606f27f4c2b4708faa78b980b675c5e1e4b8a3d9ab4f2df7f6df8b0a" => :catalina - sha256 "38063770c90226c48e9d73c6789a015141ac0db6478d075fe18f5d8718e2472d" => :mojave - sha256 "efcb46128115bea60eab289f581c4bed82fa846af095055feee116cbf90ed9ac" => :high_sierra - sha256 "ddf71a29c41a874b1d6e787d07f8f66d284ac2bbc24c7a77c1dedfe8d243c76a" => :sierra - end - - depends_on "pcre" - - def install - ENV["HB_INSTALL_PREFIX"] = prefix - ENV["HB_WITH_X11"] = "no" - - ENV.deparallelize - - system "make", "install" - - rm Dir[bin/"hbmk2.*.hbl"] - rm bin/"contrib.hbr" if build.head? - rm bin/"harbour.ucf" if build.head? - end - - test do - (testpath/"hello.prg").write <<~EOS - procedure Main() - OutStd( ; - "Hello, world!" + hb_eol() + ; - OS() + hb_eol() + ; - Version() + hb_eol() ) - return - EOS - - assert_match /Hello, world!/, shell_output("#{bin}/hbmk2 hello.prg -run") - end -end - -__END__ -diff --git a/contrib/hbcurl/core.c b/contrib/hbcurl/core.c -index 00caaa8..53618ed 100644 ---- a/contrib/hbcurl/core.c -+++ b/contrib/hbcurl/core.c -@@ -53,8 +53,12 @@ - */ - - #include --#include --#include -+#if LIBCURL_VERSION_NUM < 0x070A03 -+# include -+#endif -+#if LIBCURL_VERSION_NUM < 0x070C00 -+# include -+#endif - - #include "hbapi.h" - #include "hbapiitm.h" diff --git a/Formula/hardlink-osx.rb b/Formula/hardlink-osx.rb deleted file mode 100644 index 9f2c1e433adf2..0000000000000 --- a/Formula/hardlink-osx.rb +++ /dev/null @@ -1,41 +0,0 @@ -class HardlinkOsx < Formula - desc "Command-line utility that implements hardlinks on macOS" - homepage "https://github.com/selkhateeb/hardlink" - url "https://github.com/selkhateeb/hardlink/archive/v0.1.1.tar.gz" - sha256 "5876554e6dafb6627a94670ac33e750a7efeb3a5fbde5ede3e145cdb5131d1ba" - - bottle do - cellar :any_skip_relocation - sha256 "65636aa5d94437d15de5242711605a07fe6b3b3eebeb8753120555b2a0efe589" => :mojave - sha256 "5d1dca9220c4955c4e4a3b05a23f9c241f9ea73a27ac78d967efdaf29f4d9730" => :high_sierra - sha256 "01a3edbdac1385e04a3b0857e8073f0731ee26f6f71746a9c5347458aafc9623" => :sierra - sha256 "edf85db2b0586c410dd96f8ab50cf4cc0f34d1494b3b91a5ef0b00ae16fed3c0" => :el_capitan - sha256 "dcba3e0320ca63d1b958173aa9e2ac24074c5c1f94becaba07f0c92e721b941e" => :yosemite - sha256 "2ebdf76a67f7c63614d581963d92d79de15cf834b7e3857c139f474db71aab73" => :mavericks - end - - def install - system "make" - bin.mkdir - system "make", "install", "PREFIX=#{prefix}" - end - - def caveats - <<~EOS - Hardlinks can not be created under the same directory root. If you try to - `hln source directory` to target directory under the same root you will get an error! - - Also, remember the binary is named `hln` due to a naming conflict. - EOS - end - - test do - mkdir_p "test1/inner" - touch "test1/inner/file" - mkdir "otherdir" - system "#{bin}/hln", "test1", "otherdir/test2" - assert File.directory? "otherdir/test2" - assert File.directory? "otherdir/test2/inner" - assert File.file? "otherdir/test2/inner/file" - end -end diff --git a/Formula/hardlink.rb b/Formula/hardlink.rb deleted file mode 100644 index ca4450c282b7d..0000000000000 --- a/Formula/hardlink.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Hardlink < Formula - desc "Replace file copies using hardlinks" - homepage "https://jak-linux.org/projects/hardlink/" - url "https://jak-linux.org/projects/hardlink/hardlink_0.3.0.tar.xz" - sha256 "e8c93dfcb24aeb44a75281ed73757cb862cc63b225d565db1c270af9dbb7300f" - - bottle do - cellar :any - sha256 "f0b2171598c5eb9111c2923649f46e32a182af7bc5e5f6012f4f13178651e3ed" => :catalina - sha256 "971dab4459ef06afd11cf2cf7c0ade1ee7bcf959e359938f83b2b8a7d86a7d17" => :mojave - sha256 "4738a658357798d756d8a96f96d3700f387ae89d1db769b81675634e85018c19" => :high_sierra - sha256 "56ac75c51db6d7e19efe41eef24aa6646cdc126a113f5aacadd5f80043efc0d5" => :sierra - sha256 "d8b6e2d26d8f49a207c5082a97f1e5c31b35041bcfbc17a217a1c2ad4ff68551" => :el_capitan - sha256 "36c30ed90a3d2b9d2d4d07cb182c2838dfba276a05c22d022a42e16043e86f02" => :yosemite - sha256 "cba1b82474c668bbb36e2e56cf7b36685924592d291dc05067d7c4a605686084" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "gnu-getopt" - depends_on "pcre" - - def install - system "make", "PREFIX=#{prefix}", "MANDIR=#{man}", "BINDIR=#{bin}", "install" - end - - test do - system "#{bin}/hardlink", "--help" - end -end diff --git a/Formula/harfbuzz.rb b/Formula/harfbuzz.rb deleted file mode 100644 index a4374243c7948..0000000000000 --- a/Formula/harfbuzz.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Harfbuzz < Formula - desc "OpenType text shaping engine" - homepage "https://github.com/harfbuzz/harfbuzz" - url "https://github.com/harfbuzz/harfbuzz/releases/download/2.6.8/harfbuzz-2.6.8.tar.xz" - sha256 "6648a571a27f186e47094121f0095e1b809e918b3037c630c7f38ffad86e3035" - - bottle do - cellar :any - sha256 "895c050d4c7cf989e3fd212e88ab904db5d91900b3e7455ff2f026574923042b" => :catalina - sha256 "2e8462507d2501793c335f4c7aff91dd8d2e38beb060fc416af7d9bf577158a9" => :mojave - sha256 "9ca4eaac80b2db11439e865f977d6b7b330b2bd5ca8f558e23be49acda67b23e" => :high_sierra - end - - head do - url "https://github.com/behdad/harfbuzz.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "ragel" => :build - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "freetype" - depends_on "glib" - depends_on "graphite2" - depends_on "icu4c" - - resource "ttf" do - url "https://github.com/behdad/harfbuzz/raw/fc0daafab0336b847ac14682e581a8838f36a0bf/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf" - sha256 "9535d35dab9e002963eef56757c46881f6b3d3b27db24eefcc80929781856c77" - end - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --enable-introspection=yes - --enable-static - --with-cairo=yes - --with-coretext=yes - --with-freetype=yes - --with-glib=yes - --with-gobject=yes - --with-graphite2=yes - --with-icu=yes - ] - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make", "install" - end - - test do - resource("ttf").stage do - shape = `echo 'സ്റ്റ്' | #{bin}/hb-shape 270b89df543a7e48e206a2d830c0e10e5265c630.ttf`.chomp - assert_equal "[glyph201=0+1183|U0D4D=0+0]", shape - end - end -end diff --git a/Formula/hashcash.rb b/Formula/hashcash.rb deleted file mode 100644 index 67209d488bef7..0000000000000 --- a/Formula/hashcash.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Hashcash < Formula - desc "Proof-of-work algorithm to counter denial-of-service (DoS) attacks" - homepage "http://hashcash.org/" - url "http://hashcash.org/source/hashcash-1.22.tgz" - sha256 "0192f12d41ce4848e60384398c5ff83579b55710601c7bffe6c88bc56b547896" - - bottle do - cellar :any_skip_relocation - sha256 "1865d8db05d392b73cf26b0d873b397b087ac76f6a71c6bdbbf9f5888d46ef15" => :catalina - sha256 "775184aba3e61dcabed2020c4f2bdda029561badd41aae6d75c56b7bb564a7a3" => :mojave - sha256 "acb58644b209a262a1f8aea8c4f40e078f4e76742d0339c4e240f92bdd2fb290" => :high_sierra - sha256 "af78a79c6b0dbf5267781eb209cc3115f43dcdfd7a389c2740262bbab3be3c20" => :sierra - sha256 "b9ab067b3001c71dc5cfa3085bfcd204cb4837fd6c87f5ce722bd77b8a629850" => :el_capitan - sha256 "b9e7653e9f2c14aad3d4f3589bed6de036e78b766bc01be5ae9f24be0d9696c4" => :yosemite - sha256 "5b34b5d7a14ec55622545d823d7a707fcb7b736a88cc531e82799ef85ff8f494" => :mavericks - end - - def install - system "make", "install", - "PACKAGER=HOMEBREW", - "INSTALL_PATH=#{bin}", - "MAN_INSTALL_PATH=#{man1}", - "DOC_INSTALL_PATH=#{doc}" - end - - test do - system "#{bin}/hashcash", "-mb10", "test@example.com" - end -end diff --git a/Formula/hashcat.rb b/Formula/hashcat.rb deleted file mode 100644 index bcab755c8ce74..0000000000000 --- a/Formula/hashcat.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Hashcat < Formula - desc "World's fastest and most advanced password recovery utility" - homepage "https://hashcat.net/hashcat/" - url "https://hashcat.net/files/hashcat-5.1.0.tar.gz" - sha256 "283beaa68e1eab41de080a58bb92349c8e47a2bb1b93d10f36ea30f418f1e338" - version_scheme 1 - head "https://github.com/hashcat/hashcat.git" - - bottle do - sha256 "4ad387b50b7aeb56058d3e83fbac70d6f750d4636d255f94534526d9d6885b56" => :catalina - sha256 "b33b3b59b9e65fa33b35ade1cd7b39a334198701dd47ea89d3f717de1c3cdad5" => :mojave - sha256 "3de92d3e2fbe15dcfeda31f900bd58fe92469f7e04d68b09a1e9db4e01d87781" => :high_sierra - sha256 "383cf945f9263a4e777db23bcee81ab4175e4679930c657628b76d3430e8bd94" => :sierra - end - - depends_on "gnu-sed" => :build - - def install - system "make", "CC=#{ENV.cc}", "PREFIX=#{prefix}" - system "make", "install", "CC=#{ENV.cc}", "PREFIX=#{prefix}" - end - - test do - cp_r pkgshare.children, testpath - cp bin/"hashcat", testpath - system testpath/"hashcat --benchmark -m 0" - end -end diff --git a/Formula/hashlink.rb b/Formula/hashlink.rb deleted file mode 100644 index 102416af429ee..0000000000000 --- a/Formula/hashlink.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Hashlink < Formula - desc "Virtual machine for Haxe" - homepage "https://hashlink.haxe.org/" - url "https://github.com/HaxeFoundation/hashlink/archive/1.11.tar.gz" - sha256 "b087ded7b93c7077f5b093b999f279a37aa1e31df829d882fa965389b5ad1aea" - license "MIT" - head "https://github.com/HaxeFoundation/hashlink.git" - - bottle do - sha256 "d8911ee23e791b7cf2cc1b1ef443182d85133d4161bab29ab2da69bcfd1aed66" => :catalina - sha256 "16162d83b4b6962b9422b8b78a8f85f186254c9dcc1640a461b9f7b9b2a38fed" => :mojave - sha256 "04539eb5366f0c48928b5e625a3b403746749d73fc4b97ef58806bb0e994c95b" => :high_sierra - end - - depends_on "haxe" => :test - depends_on "jpeg-turbo" - depends_on "libogg" - depends_on "libpng" - depends_on "libuv" - depends_on "libvorbis" - depends_on "mbedtls" - depends_on "openal-soft" - depends_on "sdl2" - - def install - inreplace "Makefile", /\$\{LFLAGS\}/, "${LFLAGS} ${EXTRA_LFLAGS}" unless build.head? - system "make", "EXTRA_LFLAGS=-Wl,-rpath,#{libexec}/lib" - system "make", "install", "PREFIX=#{libexec}" - bin.install_symlink Dir[libexec/"bin/*"] - end - - test do - haxebin = Formula["haxe"].bin - - (testpath/"HelloWorld.hx").write <<~EOS - class HelloWorld { - static function main() Sys.println("Hello world!"); - } - EOS - system "#{haxebin}/haxe", "-hl", "HelloWorld.hl", "-main", "HelloWorld" - assert_equal "Hello world!\n", shell_output("#{bin}/hl HelloWorld.hl") - - (testpath/"TestHttps.hx").write <<~EOS - class TestHttps { - static function main() { - var http = new haxe.Http("https://www.google.com/"); - http.onStatus = status -> Sys.println(status); - http.onError = error -> { - trace('error: $error'); - Sys.exit(1); - } - http.request(); - } - } - EOS - system "#{haxebin}/haxe", "-hl", "TestHttps.hl", "-main", "TestHttps" - assert_equal "200\n", shell_output("#{bin}/hl TestHttps.hl") - - (testpath/"build").mkdir - system "#{haxebin}/haxelib", "newrepo" - system "#{haxebin}/haxelib", "install", "hashlink" - - system "#{haxebin}/haxe", "-hl", "HelloWorld/main.c", "-main", "HelloWorld" - system ENV.cc, "-O3", "-std=c11", "-IHelloWorld", "-I#{libexec}/include", "-L#{libexec}/lib", "-lhl", - "HelloWorld/main.c", "-o", "build/HelloWorld" - assert_equal "Hello world!\n", `./build/HelloWorld` - - system "#{haxebin}/haxe", "-hl", "TestHttps/main.c", "-main", "TestHttps" - system ENV.cc, "-O3", "-std=c11", "-ITestHttps", "-I#{libexec}/include", "-L#{libexec}/lib", "-lhl", - "TestHttps/main.c", "-o", "build/TestHttps", libexec/"lib/ssl.hdll" - assert_equal "200\n", `./build/TestHttps` - end -end diff --git a/Formula/hashpump.rb b/Formula/hashpump.rb deleted file mode 100644 index 7048c19a501f4..0000000000000 --- a/Formula/hashpump.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Hashpump < Formula - desc "Tool to exploit hash length extension attack" - homepage "https://github.com/bwall/HashPump" - url "https://github.com/bwall/HashPump/archive/v1.2.0.tar.gz" - sha256 "d002e24541c6604e5243e5325ef152e65f9fcd00168a9fa7a06ad130e28b811b" - license "MIT" - revision 4 - - bottle do - cellar :any - sha256 "117ca0966fcc664caacd251d564dbebde369b0a5b6c9a35242c898f5b12f232e" => :catalina - sha256 "71b04dff8cc052944d44566bd79385236db3af53fea647381e587d13503bb148" => :mojave - sha256 "e7dc1492f0177f7e186deebccb47428861cd2525bbb352959a2b69608f86de3f" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "python@3.8" - - # Remove on next release - patch do - url "https://github.com/bwall/HashPump/pull/14.patch?full_index=1" - sha256 "ffc978cbc07521796c0738df77a3e40d79de0875156f9440ef63eca06b2e2779" - end - - def install - bin.mkpath - system "make", "INSTALLLOCATION=#{bin}", - "CXX=#{ENV.cxx}", - "install" - - system "python3", *Language::Python.setup_install_args(prefix) - end - - test do - output = `#{bin}/hashpump -s '6d5f807e23db210bc254a28be2d6759a0f5f5d99' \\ - -d 'count=10&lat=37.351&user_id=1&long=-119.827&waffle=eggo' \\ - -a '&waffle=liege' -k 14` - assert_match /0e41270260895979317fff3898ab85668953aaa2/, output - assert_match /&waffle=liege/, output - assert_equal 0, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/haskell-stack.rb b/Formula/haskell-stack.rb deleted file mode 100644 index 62ab26a96080f..0000000000000 --- a/Formula/haskell-stack.rb +++ /dev/null @@ -1,84 +0,0 @@ -require "language/haskell" - -class HaskellStack < Formula - include Language::Haskell::Cabal - - desc "The Haskell Tool Stack" - homepage "https://haskellstack.org/" - url "https://github.com/commercialhaskell/stack/archive/v2.3.1.tar.gz" - sha256 "6701ddfc6d0be0c2bf0f75c84375e41923c5617f04222c5e582e7011c7f8fb83" - head "https://github.com/commercialhaskell/stack.git" - - bottle do - cellar :any_skip_relocation - sha256 "de6d561271fd1a422e4b4e85e9d71fd0cd87870d524e984aec3caab4762753ed" => :catalina - sha256 "bffb38f057df538f22407b0c7e62cf224f60851b4845f8ef3cd7ee603f030fed" => :mojave - sha256 "00038523c213ac96e759c01108a9867a55afc6ba3ea32646962493f29667b702" => :high_sierra - end - - depends_on "cabal-install" => :build - - uses_from_macos "zlib" - - on_linux do - depends_on "gmp" - end - - # Stack requires stack to build itself. Yep. - resource "bootstrap-stack" do - on_macos do - url "https://github.com/commercialhaskell/stack/releases/download/v2.3.1/stack-2.3.1-osx-x86_64.tar.gz" - sha256 "73eee7e5f24d11fd0af00cb05f16119e86be5d578c35083250e6b85ed1ca3621" - end - - on_linux do - url "https://github.com/commercialhaskell/stack/releases/download/v2.3.1/stack-2.3.1-linux-x86_64.tar.gz" - sha256 "b753cd21d446aea16a221326ec686e3acdf1b146c714a77b5d27fd855475554d" - end - end - - # Stack has very specific GHC requirements. - # For 2.3.1, it requires 8.6.5. - resource "bootstrap-ghc" do - on_macos do - url "https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-apple-darwin.tar.xz" - sha256 "dfc1bdb1d303a87a8552aa17f5b080e61351f2823c2b99071ec23d0837422169" - end - - on_linux do - url "https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-deb8-linux.tar.xz" - sha256 "c419fd0aa9065fe4d2eb9a248e323860c696ddf3859749ca96a84938aee49107" - end - end - - def install - (buildpath/"bootstrap-stack").install resource("bootstrap-stack") - ENV.append_path "PATH", "#{buildpath}/bootstrap-stack" - - resource("bootstrap-ghc").stage do - binary = buildpath/"bootstrap-ghc" - - system "./configure", "--prefix=#{binary}" - ENV.deparallelize { system "make", "install" } - - ENV.prepend_path "PATH", binary/"bin" - end - - cabal_sandbox do - # Let `stack` handle its own parallelization - # Prevents "install: mkdir ... ghc-7.10.3/lib: File exists" - jobs = ENV.make_jobs - ENV.deparallelize - - system "stack", "-j#{jobs}", "--stack-yaml=stack.yaml", - "--system-ghc", "--no-install-ghc", "build" - system "stack", "-j#{jobs}", "--stack-yaml=stack.yaml", - "--system-ghc", "--no-install-ghc", "--local-bin-path=#{bin}", - "install" - end - end - - test do - system bin/"stack", "new", "test" - end -end diff --git a/Formula/haste-client.rb b/Formula/haste-client.rb deleted file mode 100644 index 44547c3daa1e8..0000000000000 --- a/Formula/haste-client.rb +++ /dev/null @@ -1,63 +0,0 @@ -class HasteClient < Formula - desc "CLI client for haste-server" - homepage "https://hastebin.com/" - revision 5 - head "https://github.com/seejohnrun/haste-client.git" - - stable do - url "https://github.com/seejohnrun/haste-client/archive/v0.2.3.tar.gz" - sha256 "becbc13c964bb88841a440db4daff8e535e49cc03df7e1eddf16f95e2696cbaf" - - # Remove for > 0.2.3 - # Upstream commit from 19 Jul 2017 "Bump version to 0.2.3" - patch do - url "https://github.com/seejohnrun/haste-client/commit/1037d89.patch?full_index=1" - sha256 "1e9c47f35c65f253fd762c673b7677921b333c02d2c4e4ae5f182fcd6a5747c6" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "d7b5efc8934cbfb2534db7db7b8418142472f980b8f4165c317ab51cc4f14824" => :catalina - sha256 "c38551ce841f7a3cd825e1ae20b774836aba13fe6e129c1539eadde9b9e64a02" => :mojave - sha256 "a97b7aaf38ec730bffa45ffc073ccf4921b4e5714069a21bf63e682a9d21527e" => :high_sierra - sha256 "746af59be7c010e6e13b67d1f98766c0237061eabca601e5f0cad935e1c648bf" => :sierra - end - - depends_on "ruby" if MacOS.version <= :sierra - - resource "faraday" do - url "https://rubygems.org/gems/faraday-0.12.2.gem" - sha256 "6299046a78613ce330b67060e648a132ba7cca4f0ea769bc1d2bbcb22a23ec94" - end - - if MacOS.version <= :sierra - resource "json" do - url "https://rubygems.org/gems/json-2.1.0.gem" - sha256 "b76fd09b881088c6c64a12721a1528f2f747a1c2ee52fab4c1f60db8af946607" - end - end - - resource "multipart-post" do - url "https://rubygems.org/gems/multipart-post-2.0.0.gem" - sha256 "3dc44e50d3df3d42da2b86272c568fd7b75c928d8af3cc5f9834e2e5d9586026" - end - - def install - ENV["GEM_HOME"] = libexec - resources.each do |r| - r.fetch - system "gem", "install", r.cached_download, "--no-document", - "--install-dir", libexec - end - system "gem", "build", "haste.gemspec" - system "gem", "install", "--ignore-dependencies", "haste-#{version}.gem" - bin.install libexec/"bin/haste" - bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) - end - - test do - output = pipe_output("#{bin}/haste", "testing", 0) - assert_match(%r{^https://hastebin\.com/.+}, output) - end -end diff --git a/Formula/hasura-cli.rb b/Formula/hasura-cli.rb deleted file mode 100644 index c5c9ce6b241b1..0000000000000 --- a/Formula/hasura-cli.rb +++ /dev/null @@ -1,38 +0,0 @@ -class HasuraCli < Formula - desc "Command-Line Interface for Hasura GraphQL Engine" - homepage "https://hasura.io/" - url "https://github.com/hasura/graphql-engine/archive/v1.2.2.tar.gz" - sha256 "59e15fe760794bb0ec69b62d0bf13d7925c2f595d78ee4121fc82fa67c36dbf9" - - bottle do - cellar :any_skip_relocation - sha256 "77d006e1f89a36169f6f4e8858271d0ad10125902c988f0ae6e82854b2610514" => :catalina - sha256 "6907c2b64b830d81ef389f7535436571394205645de47492dd5bba7679b4a93d" => :mojave - sha256 "a5e93c26c925bec1c45be398ad5431cd2b9a4f842af308ae0e94728a5b48ecc0" => :high_sierra - end - - depends_on "go" => :build - - def install - ldflags = %W[ - -s -w - -X github.com/hasura/graphql-engine/cli/version.BuildVersion=#{version} - -X github.com/hasura/graphql-engine/cli/plugins.IndexBranchRef=master - ] - - cd "cli" do - system "go", "build", *std_go_args, "-ldflags", ldflags.join(" "), "-o", bin/"hasura", "./cmd/hasura/" - - system bin/"hasura", "completion", "bash", "--file", "completion_bash" - bash_completion.install "completion_bash" => "hasura" - - system bin/"hasura", "completion", "zsh", "--file", "completion_zsh" - zsh_completion.install "completion_zsh" => "_hasura" - end - end - - test do - system bin/"hasura", "init", "testdir" - assert_predicate testpath/"testdir/config.yaml", :exist? - end -end diff --git a/Formula/hatari.rb b/Formula/hatari.rb deleted file mode 100644 index 5a42060e55030..0000000000000 --- a/Formula/hatari.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Hatari < Formula - desc "Atari ST/STE/TT/Falcon emulator" - homepage "https://hatari.tuxfamily.org/" - url "https://download.tuxfamily.org/hatari/2.2.1/hatari-2.2.1.tar.bz2" - sha256 "11afef30a274be84696588583d5a1d65c8046934670f718c311c956ef7106f60" - head "https://git.tuxfamily.org/hatari/hatari.git" - - bottle do - cellar :any - sha256 "b7117341420c778b9d58b05551c59f214ef22c60ec3b94dcbcd7ce9bfd404ceb" => :catalina - sha256 "c0a3104dfa4cbaf4fd4d740606f79d5a1813e1721fd0df39864d3e5f68b81648" => :mojave - sha256 "297be94b3f4d81ab53b00e9ed5918b62c6de3d80a70b9c17b1dc364b0e52a75d" => :high_sierra - sha256 "e9059ebf74999ffdd7737aa36a9cbde52766ac0187a3b94074b79ffd5ab49977" => :sierra - end - - depends_on "cmake" => :build - depends_on "libpng" - depends_on "portaudio" - depends_on "sdl2" - - # Download EmuTOS ROM image - resource "emutos" do - url "https://downloads.sourceforge.net/project/emutos/emutos/0.9.10/emutos-512k-0.9.10.zip" - sha256 "773bbbfc418827d863c313c4f1d3c73ef3d296c5f23b4d00ee4f38f080a9c255" - end - - def install - # Set .app bundle destination - inreplace "src/CMakeLists.txt", "/Applications", prefix - system "cmake", *std_cmake_args - system "make" - prefix.install "src/Hatari.app" - bin.write_exec_script "#{prefix}/Hatari.app/Contents/MacOS/hatari" - resource("emutos").stage do - (prefix/"Hatari.app/Contents/Resources").install "etos512k.img" => "tos.img" - end - end - - test do - assert_match /Hatari v#{version} -/, shell_output("#{bin}/hatari -v", 1) - end -end diff --git a/Formula/haxe.rb b/Formula/haxe.rb deleted file mode 100644 index 2a97dd6751532..0000000000000 --- a/Formula/haxe.rb +++ /dev/null @@ -1,80 +0,0 @@ -class Haxe < Formula - desc "Multi-platform programming language" - homepage "https://haxe.org/" - url "https://github.com/HaxeFoundation/haxe.git", - :tag => "4.1.2", - :revision => "74ee129d6856c8fca8e375b795363eb64a14240e" - head "https://github.com/HaxeFoundation/haxe.git", :branch => "development" - - bottle do - cellar :any - sha256 "b2cba26b2261e9678e535d29b1232f7033db8b96b35bcd471f057099bb936f97" => :catalina - sha256 "218a30f066c2e56c4f4a1d7290124db7cf7715f54e0218c8e37ccd52b36bb747" => :mojave - sha256 "59bd36a2799b9e13064f25124f4d3d18d991d50142d6063c25bcc5452e1c5ed4" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "ocaml" => :build - depends_on "opam" => :build - depends_on "pkg-config" => :build - depends_on "mbedtls" - depends_on "neko" - depends_on "pcre" - - uses_from_macos "m4" => :build - uses_from_macos "unzip" => :build - - def install - # Build requires targets to be built in specific order - ENV.deparallelize - - Dir.mktmpdir("opamroot") do |opamroot| - ENV["OPAMROOT"] = opamroot - ENV["OPAMYES"] = "1" - ENV["ADD_REVISION"] = "1" if build.head? - system "opam", "init", "--no-setup", "--disable-sandboxing" - system "opam", "config", "exec", "--", - "opam", "pin", "add", "haxe", buildpath, "--no-action" - system "opam", "config", "exec", "--", - "opam", "install", "haxe", "--deps-only" - system "opam", "config", "exec", "--", - "make" - end - - # Rebuild haxelib as a valid binary - cd "extra/haxelib_src" do - system "cmake", ".", *std_cmake_args - system "make" - end - rm "haxelib" - cp "extra/haxelib_src/haxelib", "haxelib" - - bin.mkpath - system "make", "install", "INSTALL_BIN_DIR=#{bin}", - "INSTALL_LIB_DIR=#{lib}/haxe", "INSTALL_STD_DIR=#{lib}/haxe/std" - end - - def caveats - <<~EOS - Add the following line to your .bashrc or equivalent: - export HAXE_STD_PATH="#{HOMEBREW_PREFIX}/lib/haxe/std" - EOS - end - - test do - ENV["HAXE_STD_PATH"] = "#{HOMEBREW_PREFIX}/lib/haxe/std" - system "#{bin}/haxe", "-v", "Std" - system "#{bin}/haxelib", "version" - - (testpath/"HelloWorld.hx").write <<~EOS - import js.html.Console; - - class HelloWorld { - static function main() Console.log("Hello world!"); - } - EOS - system "#{bin}/haxe", "-js", "out.js", "-main", "HelloWorld" - _, stderr, = Open3.capture3("osascript -so -lJavaScript out.js") - assert_match /^Hello world!$/, stderr - end -end diff --git a/Formula/hayai.rb b/Formula/hayai.rb deleted file mode 100644 index 5b3c2266bc0d1..0000000000000 --- a/Formula/hayai.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Hayai < Formula - desc "C++ benchmarking framework inspired by the googletest framework" - homepage "https://bruun.co/2012/02/07/easy-cpp-benchmarking" - url "https://github.com/nickbruun/hayai/archive/v1.0.2.tar.gz" - sha256 "e30e69b107361c132c831a2c8b2040ea51225bb9ed50675b51099435b8cd6594" - - bottle do - cellar :any_skip_relocation - sha256 "0a63325782e38d9ea125ec2948604856a2d0a95a89607bbe3eb8730ca5034009" => :catalina - sha256 "083c25ed21eb21a54f72ea2957b47e6444278aaa996143c2788e434fb19eaf0c" => :mojave - sha256 "c28fb50fbaed6281dafa6b8ec7b2cafc45fe3255bcc57a6678dbac5da67e4dca" => :high_sierra - sha256 "d2702e169ba0c8a8b79f3df6f83fc2268b95b0b0d2c2c4d11387ea99011800f4" => :sierra - sha256 "0a9089377b36a1f719966add1fcd01780e27e250db062affb818236e9b8161c6" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - hayai::Benchmarker::RunAllTests(); - return 0; - } - - BENCHMARK(HomebrewTest, TestBenchmark, 1, 1) - { - std::cout << "Hayai works!" << std::endl; - } - EOS - - system ENV.cxx, "test.cpp", "-L#{lib}", "-lhayai_main", "-o", "test" - system "./test" - end -end diff --git a/Formula/hbase.rb b/Formula/hbase.rb deleted file mode 100644 index 6b7773b3e80ef..0000000000000 --- a/Formula/hbase.rb +++ /dev/null @@ -1,176 +0,0 @@ -class Hbase < Formula - desc "Hadoop database: a distributed, scalable, big data store" - homepage "https://hbase.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=hbase/2.2.3/hbase-2.2.3-bin.tar.gz" - mirror "https://archive.apache.org/dist/hbase/2.2.3/hbase-2.2.3-bin.tar.gz" - sha256 "ea8fa72aa6220e038e30bd7c439d181b10bd7225383f7f2d224ebb5f5397310a" - license "Apache-2.0" - - bottle do - sha256 "a9ec56fc8c2a4629decb24c71c940f6fe455f5805d8935d5bc5f735cc1598711" => :catalina - sha256 "1c7e1f742b67d5309ff781c8956e6626a618218f340df3a829c43179b2b2c11b" => :mojave - sha256 "188b5091ec942c61b789b823aa3537a0cb0ffc808d7c20a37262c18899c5e394" => :high_sierra - end - - depends_on "ant" => :build - depends_on "lzo" - depends_on "openjdk@11" - - resource "hadoop-lzo" do - url "https://github.com/cloudera/hadoop-lzo/archive/0.4.14.tar.gz" - sha256 "aa8ddbb8b3f9e1c4b8cc3523486acdb7841cd97c002a9f2959c5b320c7bb0e6c" - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/b89da3afad84bbf69deed0611e5dddaaa5d39325/hbase/build.xml.patch" - sha256 "d1d65330a4367db3e17ee4f4045641b335ed42449d9e6e42cc687e2a2e3fa5bc" - end - end - - def install - java_home = Formula["openjdk@11"].opt_prefix - rm_f Dir["bin/*.cmd", "conf/*.cmd"] - libexec.install %w[bin conf lib hbase-webapps] - - # Some binaries have really generic names (like `test`) and most seem to be - # too special-purpose to be permanently available via PATH. - %w[hbase start-hbase.sh stop-hbase.sh].each do |script| - (bin/script).write_env_script "#{libexec}/bin/#{script}", :JAVA_HOME => "${JAVA_HOME:-#{java_home}}" - end - - resource("hadoop-lzo").stage do - # Fixed upstream: https://github.com/cloudera/hadoop-lzo/blob/HEAD/build.xml#L235 - ENV["CLASSPATH"] = Dir["#{libexec}/lib/hadoop-common-*.jar"].first - ENV["CFLAGS"] = "-m64" - ENV["CXXFLAGS"] = "-m64" - ENV["CPPFLAGS"] = "-I#{Formula["openjdk@11"].include}" - system "ant", "compile-native", "tar" - (libexec/"lib").install Dir["build/hadoop-lzo-*/hadoop-lzo-*.jar"] - (libexec/"lib/native").install Dir["build/hadoop-lzo-*/lib/native/*"] - end - - inreplace "#{libexec}/conf/hbase-env.sh" do |s| - # upstream bugs for ipv6 incompatibility: - # https://issues.apache.org/jira/browse/HADOOP-8568 - # https://issues.apache.org/jira/browse/HADOOP-3619 - s.gsub! /^export HBASE_OPTS=.*/, - "export HBASE_OPTS=\"-Djava.net.preferIPv4Stack=true -XX:+UseConcMarkSweepGC\"" - s.gsub! /^# export JAVA_HOME=.*/, - "export JAVA_HOME=\"${JAVA_HOME:-#{java_home}}\"" - - # Default `$HBASE_HOME/logs` is unsuitable as it would cause writes to the - # formula's prefix. Provide a better default but still allow override. - s.gsub! /^# export HBASE_LOG_DIR=.*$/, - "export HBASE_LOG_DIR=\"${HBASE_LOG_DIR:-#{var}/log/hbase}\"" - end - - # makes hbase usable out of the box - # upstream has been provided this patch - # https://issues.apache.org/jira/browse/HBASE-15426 - inreplace "#{libexec}/conf/hbase-site.xml", - //, - <<~EOS - - - hbase.rootdir - file://#{var}/hbase - - - hbase.zookeeper.property.clientPort - 2181 - - - hbase.zookeeper.property.dataDir - #{var}/zookeeper - - - hbase.zookeeper.dns.interface - lo0 - - - hbase.regionserver.dns.interface - lo0 - - - hbase.master.dns.interface - lo0 - - EOS - end - - def post_install - (var/"log/hbase").mkpath - (var/"run/hbase").mkpath - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/hbase/bin/start-hbase.sh" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - EnvironmentVariables - - HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m - HBASE_LOG_DIR#{var}/hbase - HBASE_HOME#{opt_libexec} - HBASE_SECURITY_LOGGERINFO,RFAS - HBASE_PID_DIR#{var}/run/hbase - HBASE_NICENESS0 - HBASE_IDENT_STRINGroot - HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m - HBASE_OPTS-XX:+UseConcMarkSweepGC - HBASE_ROOT_LOGGERINFO,RFA - HBASE_LOG_PREFIXhbase-root-master - HBASE_LOGFILEhbase-root-master.log - - ProgramArguments - - #{opt_bin}/hbase - --config - #{opt_libexec}/conf - master - start - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardOutPath - #{var}/hbase/hbase.log - StandardErrorPath - #{var}/hbase/hbase.err - - - EOS - end - - test do - port = free_port - assert_match "HBase #{version}", shell_output("#{bin}/hbase version 2>&1") - - cp_r (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" - s.gsub! /(hbase.zookeeper.property.clientPort.*)\n.*/, "\\1\n#{port}" - end - - ENV["HBASE_LOG_DIR"] = testpath/"logs" - ENV["HBASE_CONF_DIR"] = testpath/"conf" - ENV["HBASE_PID_DIR"] = testpath/"pid" - - system "#{bin}/start-hbase.sh" - sleep 10 - begin - assert_match "Zookeeper", pipe_output("nc 127.0.0.1 #{port} 2>&1", "stats") - ensure - system "#{bin}/stop-hbase.sh" - end - end -end diff --git a/Formula/hcloud.rb b/Formula/hcloud.rb deleted file mode 100644 index e554640db58af..0000000000000 --- a/Formula/hcloud.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Hcloud < Formula - desc "Command-line interface for Hetzner Cloud" - homepage "https://github.com/hetznercloud/cli" - url "https://github.com/hetznercloud/cli/archive/v1.17.0.tar.gz" - sha256 "72710ebf4ce5598791d4e295dc749b7996433084dcd7523ced97912d321bdc4f" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "2f4380704f5a26b3641ba22eefe76e5727f2d5a896f610690440d53b97a6019f" => :catalina - sha256 "c8f1899db008f59048dcddcac0768849c089edc27b44a010f23e99f2815acefa" => :mojave - sha256 "602946c6991d779a617cec60e57f27b28d447f5334f09e9fa6e42c957144a8ee" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - (buildpath/"src/github.com/hetznercloud/cli").install buildpath.children - - cd "src/github.com/hetznercloud/cli" do - ldflags = "-w -X github.com/hetznercloud/cli/cli.Version=v#{version}" - system "go", "build", "-o", bin/"hcloud", "-ldflags", ldflags, - "./cmd/hcloud" - prefix.install_metafiles - end - - output = Utils.safe_popen_read("#{bin}/hcloud", "completion", "bash") - (bash_completion/"hcloud").write output - output = Utils.safe_popen_read("#{bin}/hcloud", "completion", "zsh") - (zsh_completion/"_hcloud").write output - end - - test do - config_path = testpath/".config/hcloud/cli.toml" - ENV["HCLOUD_CONFIG"] = config_path - assert_match "", shell_output("#{bin}/hcloud context active") - config_path.write <<~EOS - active_context = "test" - [[contexts]] - name = "test" - token = "foobar" - EOS - assert_match "test", shell_output("#{bin}/hcloud context list") - assert_match "test", shell_output("#{bin}/hcloud context active") - assert_match "hcloud v#{version}", shell_output("#{bin}/hcloud version") - end -end diff --git a/Formula/hcxtools.rb b/Formula/hcxtools.rb deleted file mode 100644 index de1a423443901..0000000000000 --- a/Formula/hcxtools.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Hcxtools < Formula - desc "Utils for conversion of cap/pcap/pcapng WiFi dump files" - homepage "https://github.com/ZerBea/hcxtools" - url "https://github.com/ZerBea/hcxtools/archive/6.0.3.tar.gz" - sha256 "9a88a8ad609d4259e8892322711e812a5a3731ab1f16d347ae1fd2208d692a3e" - license "MIT" - head "https://github.com/ZerBea/hcxtools.git" - - bottle do - cellar :any - sha256 "ac97f5bfa367504cea6dae147971e34cc43fce130614804f8a796e7ef8eb1c7c" => :catalina - sha256 "190a886d5aa509ec93acbdca3f870d2d44660a3cb595754c6324848cbaf3910c" => :mojave - sha256 "c769742aa2e3952651d5c49fdb9cf8ecdfd7bf0575ec4cd8f2c3c6a584d576e7" => :high_sierra - end - - depends_on "openssl@1.1" - - def install - bin.mkpath - man1.mkpath - system "make", "install", "PREFIX=#{prefix}" - end - - test do - # Create file with 22000 hash line - testhash = testpath/"test.22000" - (testpath/"test.22000").write <<~EOS - WPA*01*4d4fe7aac3a2cecab195321ceb99a7d0*fc690c158264*f4747f87f9f4*686173686361742d6573736964*** - EOS - - # Convert hash to .cap file - testcap = testpath/"test.cap" - system "#{bin}/hcxhash2cap", "--pmkid-eapol=#{testhash}", "-c", testpath/"test.cap" - - # Convert .cap file back to hash file - newhash = testpath/"new.22000" - system "#{bin}/hcxpcapngtool", "-o", newhash, testcap - - # Diff old and new hash file to check if they are identical - system "diff", newhash, testhash - end -end diff --git a/Formula/hdf5-mpi.rb b/Formula/hdf5-mpi.rb deleted file mode 100644 index 8b5044593ce8e..0000000000000 --- a/Formula/hdf5-mpi.rb +++ /dev/null @@ -1,99 +0,0 @@ -class Hdf5Mpi < Formula - desc "File format designed to store large amounts of data" - homepage "https://www.hdfgroup.org/HDF5" - url "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.tar.bz2" - sha256 "97906268640a6e9ce0cde703d5a71c9ac3092eded729591279bf2e3ca9765f61" - revision 1 - - bottle do - cellar :any - sha256 "ba61a9e5993f15c7b339a17afa405422abf89a908f890cd60aead67d2114f310" => :catalina - sha256 "f39b0f908ba1cb1c74aff7a36cb54cf04bc417defd5641752dffb2902866bd0c" => :mojave - sha256 "7be5d7e51464129cd531f124efec310affc716d2e810a224d238bba1659aea53" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "gcc" # for gfortran - depends_on "open-mpi" - depends_on "szip" - - uses_from_macos "zlib" - - conflicts_with "hdf5", :because => "hdf5-mpi is a variant of hdf5, one can only use one or the other" - - def install - inreplace %w[c++/src/h5c++.in fortran/src/h5fc.in bin/h5cc.in], - "${libdir}/libhdf5.settings", - "#{pkgshare}/libhdf5.settings" - - inreplace "src/Makefile.am", - "settingsdir=$(libdir)", - "settingsdir=#{pkgshare}" - - system "autoreconf", "-fiv" - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-szlib=#{Formula["szip"].opt_prefix} - --enable-build-mode=production - --enable-fortran - --enable-parallel - CC=mpicc - CXX=mpic++ - FC=mpifort - F77=mpif77 - F90=mpif90 - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include "hdf5.h" - int main() - { - printf("%d.%d.%d\\n", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); - return 0; - } - EOS - system "#{bin}/h5pcc", "test.c" - assert_equal version.to_s, shell_output("./a.out").chomp - - (testpath/"test.f90").write <<~EOS - use hdf5 - integer(hid_t) :: f, dspace, dset - integer(hsize_t), dimension(2) :: dims = [2, 2] - integer :: error = 0, major, minor, rel - - call h5open_f (error) - if (error /= 0) call abort - call h5fcreate_f ("test.h5", H5F_ACC_TRUNC_F, f, error) - if (error /= 0) call abort - call h5screate_simple_f (2, dims, dspace, error) - if (error /= 0) call abort - call h5dcreate_f (f, "data", H5T_NATIVE_INTEGER, dspace, dset, error) - if (error /= 0) call abort - call h5dclose_f (dset, error) - if (error /= 0) call abort - call h5sclose_f (dspace, error) - if (error /= 0) call abort - call h5fclose_f (f, error) - if (error /= 0) call abort - call h5close_f (error) - if (error /= 0) call abort - CALL h5get_libversion_f (major, minor, rel, error) - if (error /= 0) call abort - write (*,"(I0,'.',I0,'.',I0)") major, minor, rel - end - EOS - system "#{bin}/h5pfc", "test.f90" - assert_equal version.to_s, shell_output("./a.out").chomp - end -end diff --git a/Formula/hdf5.rb b/Formula/hdf5.rb deleted file mode 100644 index b7cc4bc571ba4..0000000000000 --- a/Formula/hdf5.rb +++ /dev/null @@ -1,91 +0,0 @@ -class Hdf5 < Formula - desc "File format designed to store large amounts of data" - homepage "https://www.hdfgroup.org/HDF5" - url "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.tar.bz2" - sha256 "97906268640a6e9ce0cde703d5a71c9ac3092eded729591279bf2e3ca9765f61" - revision 1 - - bottle do - cellar :any - sha256 "e0990f7a52f3f66fd8d546ff1e1d26d4a0cec5ebc9a45ec21fb5335359d6878a" => :catalina - sha256 "3b681a12f21a576b4c80d84d52dbe8ff9380ecc517f9b742dbe26faf5ffc289a" => :mojave - sha256 "331f9a49fb5abb3344a6dc7ff626e37d799418d8de507487c30aff91e2b22265" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "gcc" # for gfortran - depends_on "szip" - - uses_from_macos "zlib" - - def install - inreplace %w[c++/src/h5c++.in fortran/src/h5fc.in bin/h5cc.in], - "${libdir}/libhdf5.settings", - "#{pkgshare}/libhdf5.settings" - - inreplace "src/Makefile.am", - "settingsdir=$(libdir)", - "settingsdir=#{pkgshare}" - - system "autoreconf", "-fiv" - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-szlib=#{Formula["szip"].opt_prefix} - --enable-build-mode=production - --enable-fortran - --enable-cxx - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include "hdf5.h" - int main() - { - printf("%d.%d.%d\\n", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); - return 0; - } - EOS - system "#{bin}/h5cc", "test.c" - assert_equal version.to_s, shell_output("./a.out").chomp - - (testpath/"test.f90").write <<~EOS - use hdf5 - integer(hid_t) :: f, dspace, dset - integer(hsize_t), dimension(2) :: dims = [2, 2] - integer :: error = 0, major, minor, rel - - call h5open_f (error) - if (error /= 0) call abort - call h5fcreate_f ("test.h5", H5F_ACC_TRUNC_F, f, error) - if (error /= 0) call abort - call h5screate_simple_f (2, dims, dspace, error) - if (error /= 0) call abort - call h5dcreate_f (f, "data", H5T_NATIVE_INTEGER, dspace, dset, error) - if (error /= 0) call abort - call h5dclose_f (dset, error) - if (error /= 0) call abort - call h5sclose_f (dspace, error) - if (error /= 0) call abort - call h5fclose_f (f, error) - if (error /= 0) call abort - call h5close_f (error) - if (error /= 0) call abort - CALL h5get_libversion_f (major, minor, rel, error) - if (error /= 0) call abort - write (*,"(I0,'.',I0,'.',I0)") major, minor, rel - end - EOS - system "#{bin}/h5fc", "test.f90" - assert_equal version.to_s, shell_output("./a.out").chomp - end -end diff --git a/Formula/hdf5@1.10.rb b/Formula/hdf5@1.10.rb deleted file mode 100644 index bc3c48bfc07be..0000000000000 --- a/Formula/hdf5@1.10.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Hdf5AT110 < Formula - desc "File format designed to store large amounts of data" - homepage "https://www.hdfgroup.org/HDF5" - url "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.6/src/hdf5-1.10.6.tar.bz2" - sha256 "09d6301901685201bb272a73e21c98f2bf7e044765107200b01089104a47c3bd" - revision 1 - - bottle do - cellar :any - sha256 "883714d800b7d167ffc96ca4bd43e66e6d6ff725ef4ec1bef8c7ca2c4c9ebef2" => :catalina - sha256 "98eea2bc9464f516dfd7e4bc2375c5e1b7abf0e50a15972abe4a2c19e58a0028" => :mojave - sha256 "7cd8d6f0c183a2aad1ceacbca0ecf5667df81b786fc05d3cfe5640c4c24e46fa" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "gcc" # for gfortran - depends_on "szip" - - uses_from_macos "zlib" - - def install - inreplace %w[c++/src/h5c++.in fortran/src/h5fc.in bin/h5cc.in], - "${libdir}/libhdf5.settings", - "#{pkgshare}/libhdf5.settings" - - inreplace "src/Makefile.am", - "settingsdir=$(libdir)", - "settingsdir=#{pkgshare}" - - system "autoreconf", "-fiv" - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-szlib=#{Formula["szip"].opt_prefix} - --enable-build-mode=production - --enable-fortran - --enable-cxx - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include "hdf5.h" - int main() - { - printf("%d.%d.%d\\n", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); - return 0; - } - EOS - system "#{bin}/h5cc", "test.c" - assert_equal version.to_s, shell_output("./a.out").chomp - - (testpath/"test.f90").write <<~EOS - use hdf5 - integer(hid_t) :: f, dspace, dset - integer(hsize_t), dimension(2) :: dims = [2, 2] - integer :: error = 0, major, minor, rel - - call h5open_f (error) - if (error /= 0) call abort - call h5fcreate_f ("test.h5", H5F_ACC_TRUNC_F, f, error) - if (error /= 0) call abort - call h5screate_simple_f (2, dims, dspace, error) - if (error /= 0) call abort - call h5dcreate_f (f, "data", H5T_NATIVE_INTEGER, dspace, dset, error) - if (error /= 0) call abort - call h5dclose_f (dset, error) - if (error /= 0) call abort - call h5sclose_f (dspace, error) - if (error /= 0) call abort - call h5fclose_f (f, error) - if (error /= 0) call abort - call h5close_f (error) - if (error /= 0) call abort - CALL h5get_libversion_f (major, minor, rel, error) - if (error /= 0) call abort - write (*,"(I0,'.',I0,'.',I0)") major, minor, rel - end - EOS - system "#{bin}/h5fc", "test.f90" - assert_equal version.to_s, shell_output("./a.out").chomp - end -end diff --git a/Formula/hdf5@1.8.rb b/Formula/hdf5@1.8.rb deleted file mode 100644 index 4914ef2663fef..0000000000000 --- a/Formula/hdf5@1.8.rb +++ /dev/null @@ -1,88 +0,0 @@ -class Hdf5AT18 < Formula - desc "File format designed to store large amounts of data" - homepage "https://www.hdfgroup.org/HDF5" - url "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.21/src/hdf5-1.8.21.tar.bz2" - sha256 "e5b1b1dee44a64b795a91c3321ab7196d9e0871fe50d42969761794e3899f40d" - revision 2 - - bottle do - cellar :any - sha256 "cf26b031bb492997d0f6731eb563637d8c37c434ea82bced9e324a1bf40d9031" => :catalina - sha256 "869247e293d26ce1988ae02cab81e71d92cb8c845ce5587def24a3c473c2201a" => :mojave - sha256 "cc7478ecc9b526b32bb9919a05094d5feff0833d1f5f27b6f7fef60545e6c998" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "gcc" # for gfortran - depends_on "szip" - - def install - inreplace %w[c++/src/h5c++.in fortran/src/h5fc.in tools/misc/h5cc.in], - "${libdir}/libhdf5.settings", "#{pkgshare}/libhdf5.settings" - - inreplace "src/Makefile.am", "settingsdir=$(libdir)", "settingsdir=#{pkgshare}" - - system "autoreconf", "-fiv" - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-szlib=#{Formula["szip"].opt_prefix} - --enable-build-mode=production - --enable-fortran - --disable-cxx - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include "hdf5.h" - int main() - { - printf("%d.%d.%d\\n", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); - return 0; - } - EOS - system "#{bin}/h5cc", "test.c" - assert_equal version.to_s, shell_output("./a.out").chomp - - (testpath/"test.f90").write <<~EOS - use hdf5 - integer(hid_t) :: f, dspace, dset - integer(hsize_t), dimension(2) :: dims = [2, 2] - integer :: error = 0, major, minor, rel - - call h5open_f (error) - if (error /= 0) call abort - call h5fcreate_f ("test.h5", H5F_ACC_TRUNC_F, f, error) - if (error /= 0) call abort - call h5screate_simple_f (2, dims, dspace, error) - if (error /= 0) call abort - call h5dcreate_f (f, "data", H5T_NATIVE_INTEGER, dspace, dset, error) - if (error /= 0) call abort - call h5dclose_f (dset, error) - if (error /= 0) call abort - call h5sclose_f (dspace, error) - if (error /= 0) call abort - call h5fclose_f (f, error) - if (error /= 0) call abort - call h5close_f (error) - if (error /= 0) call abort - CALL h5get_libversion_f (major, minor, rel, error) - if (error /= 0) call abort - write (*,"(I0,'.',I0,'.',I0)") major, minor, rel - end - EOS - system "#{bin}/h5fc", "test.f90" - assert_equal version.to_s, shell_output("./a.out").chomp - end -end diff --git a/Formula/hdt.rb b/Formula/hdt.rb deleted file mode 100644 index 6f05e94290598..0000000000000 --- a/Formula/hdt.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Hdt < Formula - desc "Header Dictionary Triples (HDT) is a compression format for RDF data" - homepage "https://github.com/rdfhdt/hdt-cpp" - url "http://srvgal80.deri.ie/~pabtor/hdt/hdt-1.3.3.tar.gz" - sha256 "ac624802909ce04cbc046f00173496fb44768b45157d284d258d394477ae23b9" - - bottle do - cellar :any - sha256 "66978658e51117e228dea28a0d4264cfe3ce9ed7e4536eb0726d8c1438d4fb59" => :catalina - sha256 "333a1baf863f372e94a40474a799fdd7e043bd691817ab5f7467983ce31a21cb" => :mojave - sha256 "709ea815a3a24e104b0bd873948d8cbaca317ed235098f1c042ab308f7c3cb6f" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "serd" - - uses_from_macos "zlib" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/rdf2hdt", "-h" - path = testpath/"test.nt" - path.write <<~EOS - "literal1" . - "literalA" . - "literalA" . - "literalB" . - "literalC" . - . - . - . - "literal1" . - . - . - . - EOS - system "#{bin}/rdf2hdt", path, "test.hdt" - assert_predicate testpath/"test.hdt", :exist? - system "#{bin}/hdtInfo", "test.hdt" - end -end diff --git a/Formula/healpix.rb b/Formula/healpix.rb deleted file mode 100644 index f814458f13445..0000000000000 --- a/Formula/healpix.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Healpix < Formula - desc "Hierarchical Equal Area isoLatitude Pixelization of a sphere" - homepage "https://healpix.jpl.nasa.gov/" - url "https://downloads.sourceforge.net/project/healpix/Healpix_3.60/Healpix_3.60_2019Dec18.tar.gz" - version "3.60" - sha256 "bf1797022fb57b5b8381290955e8c4161e3ca9b9d88e3e32d55b092a4a04b500" - revision 1 - - bottle do - cellar :any - sha256 "06f325d3c2ca5ea3ba59102406b9db993df33db6eb3767375f30e6dbd736c068" => :catalina - sha256 "9b32669974a4ad5c1daba24a0841eddb092416c902e6b83d61f34d240e872a7d" => :mojave - sha256 "9e809e0585035821b9e35cdb2c4bcecba7f6f44528f3470f8b3d73d43312d46b" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "cfitsio" - - def install - configure_args = %w[ - --disable-dependency-tracking - --disable-silent-rules - ] - - cd "src/C/autotools" do - system "autoreconf", "--install" - system "./configure", "--prefix=#{prefix}", *configure_args - system "make", "install" - end - - cd "src/common_libraries/libsharp" do - system "./configure", "--prefix=#{buildpath}/libsharp", *configure_args - system "make", "install" - end - - cd "src/cxx" do - ENV["SHARP_CFLAGS"] = "-I#{buildpath}/libsharp/include" - ENV["SHARP_LIBS"] = "-L#{buildpath}/libsharp/lib" - system "./configure", "--prefix=#{prefix}", *configure_args - system "make", "install" - end - end - - test do - (testpath/"test.cxx").write <<-EOS - #include - #include - #include "chealpix.h" - int main(void) { - long nside, npix, pp, ns1; - nside = 1024; - for (pp = 0; pp < 14; pp++) { - nside = pow(2, pp); - npix = nside2npix(nside); - ns1 = npix2nside(npix); - } - }; - EOS - - system ENV.cxx, "-o", "test", "test.cxx", "-L#{lib}", "-lchealpix" - system "./test" - end -end diff --git a/Formula/heartbeat.rb b/Formula/heartbeat.rb deleted file mode 100644 index ff6d3169f99a8..0000000000000 --- a/Formula/heartbeat.rb +++ /dev/null @@ -1,117 +0,0 @@ -class Heartbeat < Formula - desc "Lightweight Shipper for Uptime Monitoring" - homepage "https://www.elastic.co/products/beats/heartbeat" - url "https://github.com/elastic/beats.git", - :tag => "v7.8.0", - :revision => "f79387d32717d79f689d94fda1ec80b2cf285d30" - head "https://github.com/elastic/beats.git" - - bottle do - cellar :any_skip_relocation - sha256 "3ead08eebb8bf137e99ad3bb4ddeb272c97925b36322acddc617c25294f70567" => :catalina - sha256 "85a4feb68f6e1f5df44315eb5903c7fdcf0b52f39d674801544493722ff919a8" => :mojave - sha256 "b0ba82526d992d5a6f00ca58d61bbc23026300bf69349526fefe5713c2ece417" => :high_sierra - end - - depends_on "go" => :build - depends_on "python@3.8" => :build - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz" - sha256 "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54" - end - - def install - # remove non open source files - rm_rf "x-pack" - - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/elastic/beats").install buildpath.children - - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python#{xy}/site-packages" - - resource("virtualenv").stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(buildpath/"vendor") - end - - ENV.prepend_path "PATH", buildpath/"vendor/bin" # for virtualenv - ENV.prepend_path "PATH", buildpath/"bin" # for mage (build tool) - - cd "src/github.com/elastic/beats/heartbeat" do - system "make", "mage" - # prevent downloading binary wheels during python setup - system "make", "PIP_INSTALL_COMMANDS=--no-binary :all", "python-env" - system "mage", "-v", "build" - ENV.deparallelize - system "mage", "-v", "update" - - (etc/"heartbeat").install Dir["heartbeat.*", "fields.yml"] - (libexec/"bin").install "heartbeat" - prefix.install "_meta/kibana.generated" - end - - prefix.install_metafiles buildpath/"src/github.com/elastic/beats" - - (bin/"heartbeat").write <<~EOS - #!/bin/sh - exec #{libexec}/bin/heartbeat \ - --path.config #{etc}/heartbeat \ - --path.data #{var}/lib/heartbeat \ - --path.home #{prefix} \ - --path.logs #{var}/log/heartbeat \ - "$@" - EOS - end - - def post_install - (var/"lib/heartbeat").mkpath - (var/"log/heartbeat").mkpath - end - - plist_options :manual => "heartbeat" - - def plist - <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/heartbeat - RunAtLoad - - - - EOS - end - - test do - port = free_port - - (testpath/"config/heartbeat.yml").write <<~EOS - heartbeat.monitors: - - type: tcp - schedule: '@every 5s' - hosts: ["localhost:#{port}"] - check.send: "hello\\n" - check.receive: "goodbye\\n" - output.file: - path: "#{testpath}/heartbeat" - filename: heartbeat - codec.format: - string: '%{[monitor]}' - EOS - fork do - exec bin/"heartbeat", "-path.config", testpath/"config", "-path.data", - testpath/"data" - end - sleep 5 - assert_match "hello", pipe_output("nc -l #{port}", "goodbye\n", 0) - sleep 5 - assert_match "\"status\":\"up\"", (testpath/"heartbeat/heartbeat").read - end -end diff --git a/Formula/heatshrink.rb b/Formula/heatshrink.rb deleted file mode 100644 index 54b4cc26a2c6f..0000000000000 --- a/Formula/heatshrink.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Heatshrink < Formula - desc "Data compression library for embedded/real-time systems" - homepage "https://github.com/atomicobject/heatshrink" - url "https://github.com/atomicobject/heatshrink/archive/v0.4.1.tar.gz" - sha256 "7529a1c8ac501191ad470b166773364e66d9926aad632690c72c63a1dea7e9a6" - license "ISC" - - bottle do - cellar :any_skip_relocation - sha256 "5956959544286fc9b6474a0f6df508530431c1632527fa4048091f33f319fab2" => :catalina - sha256 "504b4b64164343217c6852509b59858494ba38ad9b63e7a9b3bb247290833582" => :mojave - sha256 "865d11380a3e586a962a5dec0069def43e777f20626bdc5396735d003d90d20b" => :high_sierra - sha256 "3965350f672040dfec9d2e07ac5f26aa16b324f59d2a762a4faac0930d2de684" => :sierra - end - - def install - mkdir_p prefix/"bin" - mkdir_p prefix/"include" - mkdir_p prefix/"lib" - system "make", "test_heatshrink_dynamic" - system "make", "test_heatshrink_static" - system "make", "install", "PREFIX=#{prefix}" - (pkgshare/"tests").install "test_heatshrink_dynamic", "test_heatshrink_static" - end - - test do - system pkgshare/"tests/test_heatshrink_dynamic" - system pkgshare/"tests/test_heatshrink_static" - end -end diff --git a/Formula/hebcal.rb b/Formula/hebcal.rb deleted file mode 100644 index 3c91c99d79f8a..0000000000000 --- a/Formula/hebcal.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Hebcal < Formula - desc "Perpetual Jewish calendar for the command-line" - homepage "https://github.com/hebcal/hebcal" - url "https://github.com/hebcal/hebcal/archive/v4.20.tar.gz" - sha256 "61021362e72f21bd7faacb5ff65605762344c1d7eea99bf362b566a4556e222a" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ce90a45b81d9339bcc51c84905d58b406b489d0a52ab5c1ad250ae75822ec7c2" => :catalina - sha256 "38f782313236f406e78c8cfd8c65145da3bfce221580b1c5f5d26cdc1655d23c" => :mojave - sha256 "76cf4ff0475218d4d51e4fbbf1a8ee36df7b5e64c8d9cde524083b35b5e4e4a3" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "./configure", "--prefix=#{prefix}", "ACLOCAL=aclocal", "AUTOMAKE=automake" - system "make", "install" - end - - test do - system "#{bin}/hebcal" - end -end diff --git a/Formula/heimdal.rb b/Formula/heimdal.rb deleted file mode 100644 index ed38dc29ce190..0000000000000 --- a/Formula/heimdal.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Heimdal < Formula - desc "Free Kerberos 5 implementation" - homepage "https://www.h5l.org/" - url "https://github.com/heimdal/heimdal/releases/download/heimdal-7.7.0/heimdal-7.7.0.tar.gz" - sha256 "f02d3314d634cc55eb9cf04a1eae0d96b293e45a1f837de9d894e800161b7d1b" - - bottle do - sha256 "339287d54592d68d27ad3420f71c02bd0bf988b901116a4609ac05560fe38ca0" => :catalina - sha256 "c1d88cd19ae7300789f7423ccbda607a1d08c81881e4eb697686211e9451067a" => :mojave - sha256 "05b2d973befd459ec885e88876f6ebe9730c684f004eadb8e13bad31ac2dc1cc" => :high_sierra - end - - keg_only :shadowed_by_macos, "macOS provides Kerberos" - - depends_on "bison" => :build - depends_on "berkeley-db" - depends_on "flex" - depends_on "lmdb" - depends_on "openldap" - depends_on "openssl@1.1" - - resource "JSON" do - url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.02.tar.gz" - sha256 "444a88755a89ffa2a5424ab4ed1d11dca61808ebef57e81243424619a9e8627c" - end - - def install - 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 - - ENV.append "LDFLAGS", "-L#{Formula["berkeley-db"].opt_lib}" - ENV.append "LDFLAGS", "-L#{Formula["lmdb"].opt_lib}" - ENV.append "CFLAGS", "-I#{Formula["lmdb"].opt_include}" - - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --without-x - --enable-static=no - --enable-pthread-support - --disable-afs-support - --disable-ndbm-db - --with-openldap=#{Formula["openldap"].opt_prefix} - --with-openssl=#{Formula["openssl@1.1"].opt_prefix} - --with-hcrypto-default-backend=ossl - --with-berkeley-db - --with-berkeley-db-include=#{Formula["berkeley-db"].opt_include} - ] - - system "./configure", *args - system "make", "install" - end - - test do - assert_match "-L#{lib}", shell_output("#{bin}/krb5-config --libs") - end -end diff --git a/Formula/heksa.rb b/Formula/heksa.rb deleted file mode 100644 index 408176d89c838..0000000000000 --- a/Formula/heksa.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Heksa < Formula - desc "CLI hex dumper with colors" - homepage "https://github.com/raspi/heksa" - url "https://github.com/raspi/heksa.git", - :tag => "v1.12.1", - :revision => "54a68a2910a87b8b9cfcda28b8693e18dd9e2463" - head "https://github.com/raspi/heksa.git" - - bottle do - cellar :any_skip_relocation - sha256 "346f10b8cfc84fe37619e925372c27b7787beecd3d240a3f381fdca629da117e" => :catalina - sha256 "481e0b181ff88978df7804ff8f657821b7802a9c2fe3937bb949b723e55a4369" => :mojave - sha256 "cf17ed8f9f50e1c4c1864b8847e456bf6a93a89bb9bcb76416393effbcf4d441" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "build" - bin.install "bin/heksa" - end - - test do - require "pty" - - r, _w, pid = PTY.spawn("#{bin}/heksa -l 16 -f asc -o no #{test_fixtures("test.png")}") - - # remove ANSI colors - output = r.read.gsub /\e\[([;\d]+)?m/, "" - assert_match /^.PNG/, output - - Process.wait(pid) - assert_equal 0, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/helib.rb b/Formula/helib.rb deleted file mode 100644 index 9d3e9de9dca77..0000000000000 --- a/Formula/helib.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Helib < Formula - desc "Implementation of homomorphic encryption" - homepage "https://github.com/homenc/HElib" - url "https://github.com/homenc/HElib/archive/v1.0.2.tar.gz" - sha256 "b907eaa8381af3d001d7fb8383273f4c652415b3320c11d5be2ad8f19757c998" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "457cfdab05d0634453d4ddcbf84853f354a7ff7d83a4a5cad8d79edc3e1a3ee5" => :catalina - sha256 "b74a96fd7b94f1411015de28e8fb1dec5627cb5d8f63f3c7a0fcbd084eae13fe" => :mojave - sha256 "677d399ee0d241b206d026aea134812570256a6ca6f33ff809d68c2bff26440d" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "ntl" - - def install - mkdir "build" do - system "cmake", "-DBUILD_SHARED=ON", "..", *std_cmake_args - system "make", "install" - end - pkgshare.install "examples" - end - - test do - cp pkgshare/"examples/BGV_database_lookup/BGV_database_lookup.cpp", testpath/"test.cpp" - mkdir "build" - system ENV.cxx, "-std=c++14", "-L#{lib}", "-L#{Formula["ntl"].opt_lib}", - "-lhelib", "-lntl", "test.cpp", "-o", "build/BGV_database_lookup" - - cp pkgshare/"examples/BGV_database_lookup/runtest.sh", testpath/"runtest.sh" - system "./runtest.sh" - end -end diff --git a/Formula/hello.rb b/Formula/hello.rb deleted file mode 100644 index e7d781ab9fc5a..0000000000000 --- a/Formula/hello.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Hello < Formula - desc "Program providing model for GNU coding standards and practices" - homepage "https://www.gnu.org/software/hello/" - url "https://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz" - sha256 "31e066137a962676e89f69d1b65382de95a7ef7d914b8cb956f41ea72e0f516b" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "449de5ea35d0e9431f367f1bb34392e450f6853cdccdc6bd04e6ad6471904ddb" => :catalina - sha256 "f9d6285eafa4317c5a653bd02832bdabe4df9f6b18702274d551b28cc45d8b23" => :mojave - sha256 "1b66790d42664fe95d44f56d2c82db7ea2ce03e01bda0c8e9932f3b768342c7b" => :high_sierra - sha256 "9691f91e7c6897d525b76f5910144e0ed0adcb8bd8f7bb155f29fd431d8ff431" => :sierra - sha256 "54ac46b692fcca2abe77aeeca41976172a2dc24a6762f84a47fabcaba336df89" => :el_capitan - sha256 "f81a305402e8f8b6cf11a17dac81f604b6f48d940909886a6733cf4f6a64c05f" => :yosemite - sha256 "c80495cb6d1ad8f2c3a64c22c9dcee9d0117ca25fa6426f20a6acca275cd6c56" => :mavericks - end - - conflicts_with "perkeep", :because => "both install `hello` binaries" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - test do - assert_equal "brew", shell_output("#{bin}/hello --greeting=brew").chomp - end -end diff --git a/Formula/helm.rb b/Formula/helm.rb deleted file mode 100644 index 5d396fb3d88ba..0000000000000 --- a/Formula/helm.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Helm < Formula - desc "The Kubernetes package manager" - homepage "https://helm.sh/" - url "https://github.com/helm/helm.git", - :tag => "v3.2.4", - :revision => "0ad800ef43d3b826f31a5ad8dfbb4fe05d143688" - license "Apache-2.0" - revision 1 - head "https://github.com/helm/helm.git" - - bottle do - cellar :any_skip_relocation - sha256 "ef144157585daf829c63c3a8fe35563b743f5783b92671f6707970b138e9dc06" => :catalina - sha256 "4d2f7c76c460765302cac696913707ad0b4ab7b2491f1cae4879f44c1f2e114f" => :mojave - sha256 "3a09f9884497cd0c9de782913a1c6c44b31a93945ee72bbf377fac00411d670c" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "build" - bin.install "bin/helm" - - mkdir "man1" do - system bin/"helm", "docs", "--type", "man" - man1.install Dir["*"] - end - - output = Utils.safe_popen_read({ "SHELL" => "bash" }, bin/"helm", "completion", "bash") - (bash_completion/"helm").write output - - output = Utils.safe_popen_read({ "SHELL" => "zsh" }, bin/"helm", "completion", "zsh") - (zsh_completion/"_helm").write output - end - - test do - system "#{bin}/helm", "create", "foo" - assert File.directory? "#{testpath}/foo/charts" - - version_output = shell_output("#{bin}/helm version 2>&1") - assert_match "Version:\"v#{version}\"", version_output - if build.stable? - assert_match stable.instance_variable_get(:@resource).instance_variable_get(:@specs)[:revision], version_output - end - end -end diff --git a/Formula/helm@2.rb b/Formula/helm@2.rb deleted file mode 100644 index 24ca98a33c568..0000000000000 --- a/Formula/helm@2.rb +++ /dev/null @@ -1,57 +0,0 @@ -class HelmAT2 < Formula - desc "The Kubernetes package manager" - homepage "https://helm.sh/" - url "https://github.com/helm/helm.git", - :tag => "v2.16.9", - :revision => "8ad7037828e5a0fca1009dabe290130da6368e39" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "949b1de3c0b2a99db03e6836cd58e8747c8114ff8d2c051ddb8dccfd86365bcc" => :catalina - sha256 "8a527e486b748d271e08f5de2a11ba3d00e431c84c11972cb05da025dad6df2d" => :mojave - sha256 "2a03856a9bc1736b0ebb5c9d274519c330870c5fc36d6e1bc34aa1aecc61d15d" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "glide" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" - ENV.prepend_create_path "PATH", buildpath/"bin" - ENV["TARGETS"] = "darwin/amd64" - dir = buildpath/"src/k8s.io/helm" - dir.install buildpath.children - [buildpath/".brew_home"] - - cd dir do - system "make", "bootstrap" - system "make", "build" - - bin.install "bin/helm" - bin.install "bin/tiller" - man1.install Dir["docs/man/man1/*"] - - output = Utils.safe_popen_read({ "SHELL" => "bash" }, bin/"helm", "completion", "bash") - (bash_completion/"helm").write output - - output = Utils.safe_popen_read({ "SHELL" => "zsh" }, bin/"helm", "completion", "zsh") - (zsh_completion/"_helm").write output - - prefix.install_metafiles - end - end - - test do - system "#{bin}/helm", "create", "foo" - assert File.directory? "#{testpath}/foo/charts" - - version_output = shell_output("#{bin}/helm version --client 2>&1") - assert_match "GitTreeState:\"clean\"", version_output - if build.stable? - assert_match stable.instance_variable_get(:@resource).instance_variable_get(:@specs)[:revision], version_output - end - end -end diff --git a/Formula/helmfile.rb b/Formula/helmfile.rb deleted file mode 100644 index 953473845f9f1..0000000000000 --- a/Formula/helmfile.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Helmfile < Formula - desc "Deploy Kubernetes Helm Charts" - homepage "https://github.com/roboll/helmfile" - url "https://github.com/roboll/helmfile/archive/v0.120.0.tar.gz" - sha256 "2fe0df3970fd93ce6b49be941eef33a2cd0f90355ef120852a5d0964ec105c2e" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "258a73a874fb4349af5c2e9fafcdd6588db0e82f492ddea6625077ad3b9de957" => :catalina - sha256 "3da4d04558dee29e85524cbc4cb32a587eb50251548fa92b647533c6d1e5c7a4" => :mojave - sha256 "bf87f561f5cea2e7bfe16c83d7edf3e9a75b2ce20a0e2eaeca605ac858e98dc5" => :high_sierra - end - - depends_on "go" => :build - depends_on "helm" - - def install - system "go", "build", "-ldflags", "-X github.com/roboll/helmfile/pkg/app/version.Version=v#{version}", - "-o", bin/"helmfile", "-v", "github.com/roboll/helmfile" - end - - test do - (testpath/"helmfile.yaml").write <<-EOS - repositories: - - name: stable - url: https://kubernetes-charts.storage.googleapis.com/ - - releases: - - name: vault # name of this release - namespace: vault # target namespace - labels: # Arbitrary key value pairs for filtering releases - foo: bar - chart: roboll/vault-secret-manager # the chart being installed to create this release, referenced by `repository/chart` syntax - version: ~1.24.1 # the semver of the chart. range constraint is supported - EOS - system Formula["helm"].opt_bin/"helm", "create", "foo" - output = "Adding repo stable https://kubernetes-charts.storage.googleapis.com" - assert_match output, shell_output("#{bin}/helmfile -f helmfile.yaml repos 2>&1") - assert_match version.to_s, shell_output("#{bin}/helmfile -v") - end -end diff --git a/Formula/helmsman.rb b/Formula/helmsman.rb deleted file mode 100644 index 5beec38810031..0000000000000 --- a/Formula/helmsman.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Helmsman < Formula - desc "Helm Charts as Code tool" - homepage "https://github.com/Praqma/helmsman" - url "https://github.com/Praqma/helmsman.git", - :tag => "v3.4.4", - :revision => "9568064b9f1e0bbcb208f1083355861a63da86ba" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "124144b8d17651350350433fe6e65dcb6025146b27919c171fd6d4c6d37a7cf7" => :catalina - sha256 "6b279f354d6c1b1ba6d9340750fca9b7809823354f892f4f941a8fcbd3f10d82" => :mojave - sha256 "a7a21e2b4f07b283c989f0ce373ecbfe805788025656bdcfbbe3d74f9114419d" => :high_sierra - end - - depends_on "go" => :build - depends_on "helm" - depends_on "kubernetes-cli" - - def install - system "go", "build", - "-ldflags", "-s -w -X main.version=#{version}", - "-trimpath", "-o", bin/"helmsman", "cmd/helmsman/main.go" - prefix.install_metafiles - pkgshare.install "examples/example.yaml" - end - - test do - assert_match version.to_s, shell_output("#{bin}/helmsman version") - - output = shell_output("#{bin}/helmsman --apply -f #{pkgshare}/example.yaml 2>&1", 1) - assert_match "helm diff plugin is not installed", output - end -end diff --git a/Formula/help2man.rb b/Formula/help2man.rb deleted file mode 100644 index c365a48c9d944..0000000000000 --- a/Formula/help2man.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Help2man < Formula - desc "Automatically generate simple man pages" - homepage "https://www.gnu.org/software/help2man/" - url "https://ftp.gnu.org/gnu/help2man/help2man-1.47.16.tar.xz" - mirror "https://ftpmirror.gnu.org/help2man/help2man-1.47.16.tar.xz" - sha256 "3ef8580c5b86e32ca092ce8de43df204f5e6f714b0cd32bc6237e6cd0f34a8f4" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "457a2b1ce094f9997ac5555a843d025eb9bc2267a54be0a1f2292b67a038de72" => :catalina - sha256 "e06ed538e4c68bec3c3e759ef12961c42288238dd82cdb948e40d6c98733f07d" => :mojave - sha256 "457a2b1ce094f9997ac5555a843d025eb9bc2267a54be0a1f2292b67a038de72" => :high_sierra - end - - def install - # install is not parallel safe - # see https://github.com/Homebrew/homebrew/issues/12609 - ENV.deparallelize - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "help2man #{version}", shell_output("#{bin}/help2man #{bin}/help2man") - end -end diff --git a/Formula/henplus.rb b/Formula/henplus.rb deleted file mode 100644 index 1e118e8aedf6a..0000000000000 --- a/Formula/henplus.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Henplus < Formula - desc "SQL shell that can handle multiple sessions in parallel" - homepage "https://github.com/neurolabs/henplus" - url "https://github.com/downloads/neurolabs/henplus/henplus-0.9.8.tar.gz" - sha256 "ea7ca363d0503317235e97f66aa0efefe44463d8445e88b304ec0ac1748fe1ff" - license "GPL-2.0" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "a53828d49583605b23c96a1cbdcf50eabd946bcc77b4cb3b9beb02f620f7c372" => :catalina - sha256 "4b11fa555ad538ba707fdfe601b105a7ed184be52f46d9aadb1d5ce7c53e2e15" => :mojave - sha256 "87645aab44dcb857cf05f044d1991c7c06ee616b00acde904d3f470d2caf6ae3" => :high_sierra - sha256 "2a66a4eeecd45406dc022d6f22a17aaf1ff3a22277296620a2771fb26a580afe" => :sierra - sha256 "529052e2809a6c83143e68f2352defef79b72a72c91a27a16c5d0b778a51d729" => :el_capitan - sha256 "8c3373e1459910f5c2df7c1849a881cf4caf71f75830f18b92bff9013b3178e8" => :yosemite - sha256 "21f7ee166b94b30dd78cee8a6757fecd285544b8b12b332db9141e6a94eb29a7" => :mavericks - end - - depends_on "ant" => :build - depends_on :java => "1.8" - depends_on "libreadline-java" - - def install - inreplace "bin/henplus" do |s| - s.gsub! "LD_LIBRARY_PATH", "DYLD_LIBRARY_PATH" - s.change_make_var! "DYLD_LIBRARY_PATH", Formula["libreadline-java"].opt_lib - s.gsub! "$THISDIR/..", HOMEBREW_PREFIX - s.gsub! "share/java/libreadline-java.jar", - "share/libreadline-java/libreadline-java.jar" - end - - system "ant", "install", "-Dprefix=#{prefix}" - end - - def caveats - <<~EOS - You may need to set JAVA_HOME: - export JAVA_HOME="$(/usr/libexec/java_home)" - EOS - end - - test do - system bin/"henplus", "--help" - end -end diff --git a/Formula/hercules.rb b/Formula/hercules.rb deleted file mode 100644 index 5fb6397e1d7d9..0000000000000 --- a/Formula/hercules.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Hercules < Formula - desc "System/370, ESA/390 and z/Architecture Emulator" - homepage "http://www.hercules-390.eu/" - url "http://downloads.hercules-390.eu/hercules-3.13.tar.gz" - sha256 "890c57c558d58708e55828ae299245bd2763318acf53e456a48aac883ecfe67d" - - bottle do - sha256 "2ba0ca1b3ed54b5fa9e782cd1d8e225f58203e32b29b98af642932ed0fddbf1b" => :catalina - sha256 "893e8854c92794377f2fc0b6cd96ad7f7ffd3d153a0a1678c6227468067d3696" => :mojave - sha256 "f1feaf922ae9105c64ba207bc9e2d9b573ddcae8b6feaba501a6daf3068e9901" => :high_sierra - sha256 "a9ca5fff16a7aa506e2067d7bad9bbb8c54ede7af0e1102150f5d385a7097e9d" => :sierra - sha256 "cf3d8203cb207792e0c800aadc86ee78714795316e936870f5a4ceae53bfdacc" => :el_capitan - end - - head do - url "https://github.com/hercules-390/hyperion.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - skip_clean :la - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-optimization=no" - system "make" - system "make", "install" - pkgshare.install "hercules.cnf" - end - - test do - (testpath/"test00.ctl").write <<~EOS - TEST00 3390 10 - TEST.PDS EMPTY CYL 1 0 5 PO FB 80 6080 - EOS - system "#{bin}/dasdload", "test00.ctl", "test00.ckd" - end -end diff --git a/Formula/herrie.rb b/Formula/herrie.rb deleted file mode 100644 index 57ec35b854bbe..0000000000000 --- a/Formula/herrie.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Herrie < Formula - desc "Minimalistic audio player built upon Ncurses" - homepage "https://herrie.info/" - url "https://github.com/EdSchouten/herrie/releases/download/herrie-2.2/herrie-2.2.tar.bz2" - sha256 "142341072920f86b6eb570b8f13bf5fd87c06cf801543dc7d1a819e39eb9fb2b" - revision 1 - - bottle do - sha256 "ceb3bb01f7cc36c3d55d785ff6d06706708ce11e81bd9da29b4dcdaaa6476f9a" => :catalina - sha256 "689038931cdc86fee22b0e4217bdb4eccc5c7591254c67300aade0637ae1dc5e" => :mojave - sha256 "65631ae69a925bf48a3e4167807b13c36988db1bd1d4f7ed311356da39344c9a" => :high_sierra - sha256 "f794117e72309d83bc947463032c262a7341d21eabc5099712016d0f078804f2" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "libid3tag" - depends_on "libsndfile" - depends_on "libvorbis" - depends_on "mad" - - def install - ENV["PREFIX"] = prefix - system "./configure", "no_modplug", "no_xspf", "coreaudio", "ncurses" - system "make", "install" - end - - test do - system "#{bin}/herrie", "-v" - end -end diff --git a/Formula/hesiod.rb b/Formula/hesiod.rb deleted file mode 100644 index 4b75a50e21c1e..0000000000000 --- a/Formula/hesiod.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Hesiod < Formula - desc "Library for the simple string lookup service built on top of DNS" - homepage "https://github.com/achernya/hesiod" - url "https://github.com/achernya/hesiod/archive/hesiod-3.2.1.tar.gz" - sha256 "813ccb091ad15d516a323bb8c7693597eec2ef616f36b73a8db78ff0b856ad63" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "2e077b355ca0ed9f0bbadfc7b54ef681fc11f58c324ce19d3131fb61b99f15d2" => :catalina - sha256 "76748e285f22aed694c2933e4cd3a1469398ea254671755e6f89ad07e76b7f73" => :mojave - sha256 "de927a6526209db3673aa9e426d7e32f53b7a278798f07d6dc1c5069e816d09a" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "libidn" - - def install - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/hesinfo", "sipbtest", "passwd" - system "#{bin}/hesinfo", "sipbtest", "filsys" - end -end diff --git a/Formula/hevea.rb b/Formula/hevea.rb deleted file mode 100644 index 3cbdbd9200740..0000000000000 --- a/Formula/hevea.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Hevea < Formula - desc "LaTeX-to-HTML translator" - homepage "http://hevea.inria.fr/" - url "http://hevea.inria.fr/old/hevea-2.34.tar.gz" - sha256 "3ad08a0dce6675df3caa912ec1497d8019ce10733263092bbb7482c4fbd7fedf" - - bottle do - sha256 "34fd968c75f335330d256da9ad1b3e39b65b4286deb36810f898a6a729794b41" => :catalina - sha256 "780ecfdaaac0985d9d9a6ef2b92c966d101144637bb65c41880f9b71c27c3c13" => :mojave - sha256 "851ce38d9468eee9b2548f303e1e9d029e863dadcf90caa68039b8615b5acf07" => :high_sierra - end - - depends_on "ocamlbuild" => :build - depends_on "ocaml" - - def install - ENV["PREFIX"] = prefix - system "make" - system "make", "install" - end - - test do - (testpath/"test.tex").write <<~EOS - \\documentclass{article} - \\begin{document} - \\end{document} - EOS - system "#{bin}/hevea", "test.tex" - end -end diff --git a/Formula/hexcurse.rb b/Formula/hexcurse.rb deleted file mode 100644 index 23efc532362bb..0000000000000 --- a/Formula/hexcurse.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Hexcurse < Formula - desc "Ncurses-based console hex editor" - homepage "https://github.com/LonnyGomes/hexcurse" - url "https://github.com/LonnyGomes/hexcurse/archive/v1.60.0.tar.gz" - sha256 "f6919e4a824ee354f003f0c42e4c4cef98a93aa7e3aa449caedd13f9a2db5530" - - bottle do - cellar :any_skip_relocation - sha256 "977632cc06d33a8d2f7f44866a7497dc7f8b8b423869f348827f20811c024935" => :catalina - sha256 "1e940f63d87629fd0fd6758436679eac6238afae871681c5d65e03cfce11bde1" => :mojave - sha256 "071ab88d401cc9ff24c6d466f291217d57082d07649ddb39f7d6aa28dd9ed7e6" => :high_sierra - sha256 "580efaffc5d8dccb0f4f6532ad5be35e372c6b8d91dfb6d3930aa773c9bf7ea1" => :sierra - sha256 "ffe690a87522627dc0088c391f7237fc6a3f2aa12fc5a3487c0aa6694905dc4d" => :el_capitan - sha256 "ef5644e4e96604f6f3bbe802e7824a7fd82e01163d532d0e2be6a93cc6595eab" => :yosemite - sha256 "fe4f9ddeaa505e9b8554f1118a0298fecf8008c2e4d4569675b349e51feba00b" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/hexcurse", "-help" - end -end diff --git a/Formula/hexedit.rb b/Formula/hexedit.rb deleted file mode 100644 index b1d8a35a236eb..0000000000000 --- a/Formula/hexedit.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Hexedit < Formula - desc "View and edit files in hexadecimal or ASCII" - homepage "http://rigaux.org/hexedit.html" - url "https://github.com/pixel/hexedit/archive/1.4.2.tar.gz" - sha256 "c81ffb36af9243aefc0887e33dd8e41c4b22d091f1f27d413cbda443b0440d66" - license "GPL-2.0" - head "https://github.com/pixel/hexedit.git" - - bottle do - cellar :any_skip_relocation - sha256 "4b53f01b5dace2c4549295b110b6f8320e87beee63b06fd7276ed179017eab52" => :catalina - sha256 "50d22aea785dda60c33b9e4e54640c44e64a0c6cab64b560a05a921bb6d078f2" => :mojave - sha256 "9a6c6e290d26d793c2e2b85a1cc1ef0147ea70d957859228d5a363c8ebb3fb4f" => :high_sierra - sha256 "c93767f4bec81f4d372d4af42a7505131f61ce4992b2549210aa464ee5b309ce" => :sierra - sha256 "8939412f612cb0b5a8fd49fc1045bdd9dee9f729cf741fba2421ed28deeadc82" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - shell_output("#{bin}/hexedit -h 2>&1", 1) - end -end diff --git a/Formula/hexgui.rb b/Formula/hexgui.rb deleted file mode 100644 index f77ea5f3b697d..0000000000000 --- a/Formula/hexgui.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Hexgui < Formula - desc "GUI for playing Hex over Hex Text Protocol" - homepage "https://sourceforge.net/p/benzene/hexgui/" - url "https://github.com/apetresc/hexgui/archive/v0.9.2.tar.gz" - sha256 "8c4c808b72412e4f3d506921f21692ec63ed28a783179fbdee4eb19ed82fdeb8" - license "GPL-3.0" - head "https://github.com/apetresc/hexgui.git" - - bottle do - cellar :any_skip_relocation - sha256 "20bb6ef52823f04542d36a30fe287c434507dde7da65db8d6a2eaaca07182bff" => :catalina - sha256 "fd20a0ef344f16b48caa919f9035fae68e581bf7f2513b550b1381b1ad50d9f0" => :mojave - sha256 "01862818b35ba08d8c4f2d10242797b8ae60a6db4621dd53ce8b5fd41722dcc9" => :high_sierra - sha256 "4021eba73364a966aff074205f33d5718ab9b51fc0ff6f4e7d5676d97439fb01" => :sierra - sha256 "7be565ccc6959d4373fea52cb9fa0d23bc42039b1c8fb29fbe53a101f23685d7" => :el_capitan - end - - depends_on "ant" => :build - depends_on :java => "1.8" - - def install - system "ant" - libexec.install Dir["*"] - (bin/"hexgui").write_env_script libexec/"bin/hexgui", Language::Java.java_home_env("1.8") - end - - test do - assert_match /^HexGui #{version} .*/, shell_output("#{bin}/hexgui -version").chomp - end -end diff --git a/Formula/hexyl.rb b/Formula/hexyl.rb deleted file mode 100644 index 0125c5f860ddc..0000000000000 --- a/Formula/hexyl.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Hexyl < Formula - desc "Command-line hex viewer" - homepage "https://github.com/sharkdp/hexyl" - url "https://github.com/sharkdp/hexyl/archive/v0.8.0.tar.gz" - sha256 "b2e69b4ca694afd580c7ce22ab83a207174d2bbc9dabbad020fee4a98a1205be" - - bottle do - cellar :any_skip_relocation - sha256 "2443b91247ef98143863f23724ab1ffe3b192aa65471d2198ab02ffa72936ce9" => :catalina - sha256 "465474b8dd2b6344efda4d611341a0d40c46965fabce4e3446bb3bc0a45c2392" => :mojave - sha256 "8805fb02b8cc13ffe9ca11663140f502dfbcbe5a4cbdf1262bd88758bc88167f" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - pdf = test_fixtures("test.pdf") - output = shell_output("#{bin}/hexyl -n 100 #{pdf}") - assert_match "00000000", output - end -end diff --git a/Formula/hey.rb b/Formula/hey.rb deleted file mode 100644 index e17b42577a43d..0000000000000 --- a/Formula/hey.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Hey < Formula - desc "HTTP load generator, ApacheBench (ab) replacement" - homepage "https://github.com/rakyll/hey" - url "https://github.com/rakyll/hey.git", - :tag => "v0.1.3", - :revision => "36f181ad99713ffd70c09a021ea8a689b8fb43d3" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "833f09f5322dd41cc3438f9880d557941652073d02acc2971181aa1c5b4f6a7d" => :catalina - sha256 "902d975f8dbc7f27890d56eed1a377bd880225b6860e2e7db6fed4f03e58c077" => :mojave - sha256 "2111023b9742683d7beb4c1383f59daff60fe019ffcf5fbc91d9e3f68386dc5f" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"hey" - prefix.install_metafiles - end - - test do - output = "[200] 200 responses" - assert_match output.to_s, shell_output("#{bin}/hey https://google.com") - end -end diff --git a/Formula/hfstospell.rb b/Formula/hfstospell.rb deleted file mode 100644 index 1fdcb8a08bbdb..0000000000000 --- a/Formula/hfstospell.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Hfstospell < Formula - desc "Helsinki Finite-State Technology ospell" - homepage "https://hfst.github.io/" - url "https://github.com/hfst/hfst-ospell/releases/download/v0.5.1/hfstospell-0.5.1.tar.gz" - sha256 "ccf5f3b06bcdc5636365e753b9f7fad9c11dfe483272061700a905b3d65ac750" - license "Apache-2.0" - revision 2 - - bottle do - cellar :any - sha256 "82553e62189a1eeb0a759f5a0dddc57c21c6545ee35f1b59338c3fb0efca765f" => :catalina - sha256 "4ed2a4a266fad9dd113fe2221bff23b460c9e50bb956b1eba5b8ba15fb756626" => :mojave - sha256 "f5ebd7bb299f5e660c8b559bed232bc6fc6ec4ea98691384d385f3afcf4a6c96" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "icu4c" - depends_on "libarchive" - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--without-libxmlpp", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/hfst-ospell", "--version" - end -end diff --git a/Formula/hfsutils.rb b/Formula/hfsutils.rb deleted file mode 100644 index 575294f99a97d..0000000000000 --- a/Formula/hfsutils.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Hfsutils < Formula - desc "Tools for reading and writing Macintosh volumes" - homepage "https://www.mars.org/home/rob/proj/hfs/" - url "ftp://ftp.mars.org/pub/hfs/hfsutils-3.2.6.tar.gz" - mirror "https://fossies.org/linux/misc/old/hfsutils-3.2.6.tar.gz" - mirror "https://ftp.osuosl.org/pub/clfs/conglomeration/hfsutils/hfsutils-3.2.6.tar.gz" - sha256 "bc9d22d6d252b920ec9cdf18e00b7655a6189b3f34f42e58d5bb152957289840" - - bottle do - cellar :any_skip_relocation - sha256 "3f357724a46995df877e649f9ade4afb97b78e4e8cec503666a8423343d1589b" => :catalina - sha256 "980dd894478cfc6b12f76b56dfd12996218af2ea7aa4a14503e11865364b2cab" => :mojave - sha256 "1a0fd0b0ac3529aac6c79b1f3b15fbeefa2cf05838de439929b8c5c61d49c077" => :high_sierra - sha256 "4b9c18851c1fd5ce7049946cb583d4f8336c29bd48c76690df707c768a2879fd" => :sierra - sha256 "61847361f9dac3c719ae8fb464fb9e45d7b64054c7d3c2ff23b37a698546f63d" => :el_capitan - sha256 "2d0997b77b2bc7b3a0454c552c6ebd3b24c6efc01bc9e4814781f7971c8802f9" => :yosemite - sha256 "06dddcb4d540a24b63b389213724b828f99bfc7c32272be1a9e4ca4472409c93" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - bin.mkpath - man1.mkpath - system "make", "install" - end - - test do - system "dd", "if=/dev/zero", "of=disk.hfs", "bs=1k", "count=800" - system bin/"hformat", "-l", "Test Disk", "disk.hfs" - output = shell_output("#{bin}/hmount disk.hfs") - assert_match /^Volume name is "Test Disk"$/, output - assert_match /^Volume has 803840 bytes free$/, output - end -end diff --git a/Formula/hg-fast-export.rb b/Formula/hg-fast-export.rb deleted file mode 100644 index 6869bad877159..0000000000000 --- a/Formula/hg-fast-export.rb +++ /dev/null @@ -1,59 +0,0 @@ -class HgFastExport < Formula - include Language::Python::Virtualenv - - desc "Fast Mercurial to Git converter" - homepage "https://repo.or.cz/fast-export.git" - url "https://github.com/frej/fast-export/archive/v200213.tar.gz" - sha256 "358f501ab301c31525f23f29e94708fe361ed53e99b5fb9c77fbca81ff1a2b76" - - bottle do - cellar :any_skip_relocation - sha256 "88cbf330f7c043f1e36f00e8bded4624ec510ca5d825e0be1f1805520f893238" => :catalina - sha256 "b308363b65517f560f935ba4a2ffcbba80f69d42d79788b83935518552b95138" => :mojave - sha256 "1da8e73f749516b112815209ab914d1929820004db9d91170d99666f993e15a8" => :high_sierra - end - - depends_on :macos # Due to Python 2 - - # mercurial 5.3 support will be added in the next release - # Ref https://github.com/frej/fast-export/pull/197 - resource "hg" do - url "https://www.mercurial-scm.org/release/mercurial-5.2.2.tar.gz" - sha256 "ffc5ff47488c7b5dae6ead3d99f08ef469500d6567592a25311838320106c03b" - end - - def install - ENV.delete("PYTHONPATH") - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" - - resource("hg").stage { system "python", *Language::Python.setup_install_args(libexec/"vendor") } - - libexec.install Dir["*"] - - bins = %w[hg-fast-export.py hg-fast-export.sh hg-reset.py hg-reset.sh hg2git.py] - bins.each do |f| - (bin / f).write_env_script(libexec / f, :PYTHONPATH => ENV["PYTHONPATH"]) - end - end - - test do - hg = "#{libexec}/vendor/bin/hg" - - mkdir testpath/"hg-repo" do - system hg, "init" - (testpath/"hg-repo/test.txt").write "Hello" - system hg, "add", "test.txt" - system hg, "commit", "-u", "test@test", "-m", "test" - end - - mkdir testpath/"git-repo" do - system "git", "init" - system "git", "config", "core.ignoreCase", "false" - system "hg-fast-export.sh", "-r", "#{testpath}/hg-repo" - system "git", "checkout", "HEAD" - end - - assert_predicate testpath/"git-repo/test.txt", :exist? - assert_equal "Hello", (testpath/"git-repo/test.txt").read - end -end diff --git a/Formula/hicolor-icon-theme.rb b/Formula/hicolor-icon-theme.rb deleted file mode 100644 index afb4f9077a9f8..0000000000000 --- a/Formula/hicolor-icon-theme.rb +++ /dev/null @@ -1,37 +0,0 @@ -class HicolorIconTheme < Formula - desc "Fallback theme for FreeDesktop.org icon themes" - homepage "https://wiki.freedesktop.org/www/Software/icon-theme/" - url "https://icon-theme.freedesktop.org/releases/hicolor-icon-theme-0.17.tar.xz" - sha256 "317484352271d18cbbcfac3868eab798d67fff1b8402e740baa6ff41d588a9d8" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "8ba8d6065b652396583c55a0e73cff0007f96064a330ac20499ff1d887771eb8" => :catalina - sha256 "5ba4bb6a7e89f5fb0d43504d68d657a536be9540d4cc72552bd5965e15a82b91" => :mojave - sha256 "b33f58b98a6ca6bb72777eaf7b7a4bb393d5cc9ced6954dd7a7e52e18c214799" => :high_sierra - sha256 "cd8699f3944eb87b76fc89e4ca69f19df5d66aa8a4c89d636660d299e807f5b0" => :sierra - sha256 "cd8699f3944eb87b76fc89e4ca69f19df5d66aa8a4c89d636660d299e807f5b0" => :el_capitan - sha256 "cd8699f3944eb87b76fc89e4ca69f19df5d66aa8a4c89d636660d299e807f5b0" => :yosemite - end - - head do - url "https://anongit.freedesktop.org/git/xdg/default-icon-theme.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - args = %W[--prefix=#{prefix} --disable-silent-rules] - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end - system "make", "install" - end - - test do - assert_predicate share/"icons/hicolor/index.theme", :exist? - end -end diff --git a/Formula/hidapi.rb b/Formula/hidapi.rb deleted file mode 100644 index 47b77757df176..0000000000000 --- a/Formula/hidapi.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Hidapi < Formula - desc "Library for communicating with USB and Bluetooth HID devices" - homepage "https://github.com/libusb/hidapi" - url "https://github.com/libusb/hidapi/archive/hidapi-0.9.0.tar.gz" - sha256 "630ee1834bdd5c5761ab079fd04f463a89585df8fcae51a7bfe4229b1e02a652" - head "https://github.com/libusb/hidapi.git" - - bottle do - cellar :any - sha256 "08ed41cd6127ccaa6c4e60f34e663bd020e5ceb335c8b6fcfc7454ee75cbf948" => :catalina - sha256 "8e4c1959c227e51e8bc8e45532838dff3fd5c58aff90a03eb1e19d9cd51f7160" => :mojave - sha256 "0b972366a1dc78445d448b40892ef7885fb682eb2042e41723274d2e50388732" => :high_sierra - sha256 "befada3ffe32de1d7363d0a958aec534b248d8cd45111c4f30a6f46bb0ac401b" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - def install - system "./bootstrap" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - bin.install "hidtest/.libs/hidtest" - end - - test do - (testpath/"test.c").write <<~EOS - #include "hidapi.h" - int main(void) - { - return hid_exit(); - } - EOS - - flags = ["-I#{include}/hidapi", "-L#{lib}", "-lhidapi"] + ENV.cflags.to_s.split - system ENV.cc, "-o", "test", "test.c", *flags - system "./test" - end -end diff --git a/Formula/highlight.rb b/Formula/highlight.rb deleted file mode 100644 index 28e43c46e34ef..0000000000000 --- a/Formula/highlight.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Highlight < Formula - desc "Convert source code to formatted text with syntax highlighting" - homepage "http://www.andre-simon.de/doku/highlight/en/highlight.php" - url "http://www.andre-simon.de/zip/highlight-3.57.tar.bz2" - sha256 "f203f75e7e35ce381d0a13270bfdc9ee53fa965c39cc137a9927b9ff0e3be913" - license "GPL-3.0" - head "https://gitlab.com/saalen/highlight.git" - - bottle do - sha256 "243c2078603d4f83e931300382e2aaa21972251a99ebe50b822e673bd358a502" => :catalina - sha256 "6030a1c16c514c91897d6ab538f5ec6f41efffbecfe836df7e7edda555f15b2e" => :mojave - sha256 "cc27431c8f13763d6c75b377345e324f16060eebdd1687fbf40b0b2331ea1c89" => :high_sierra - end - - depends_on "boost" => :build - depends_on "pkg-config" => :build - depends_on "lua" - - def install - conf_dir = etc/"highlight/" # highlight needs a final / for conf_dir - system "make", "PREFIX=#{prefix}", "conf_dir=#{conf_dir}" - system "make", "PREFIX=#{prefix}", "conf_dir=#{conf_dir}", "install" - end - - test do - system bin/"highlight", doc/"extras/highlight_pipe.php" - end -end diff --git a/Formula/hilite.rb b/Formula/hilite.rb deleted file mode 100644 index 748cbb145954c..0000000000000 --- a/Formula/hilite.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Hilite < Formula - desc "CLI tool that runs a command and highlights STDERR output" - homepage "https://sourceforge.net/projects/hilite/" - url "https://downloads.sourceforge.net/project/hilite/hilite/1.5/hilite.c" - sha256 "e15bdff2605e8d23832d6828a62194ca26dedab691c9d75df2877468c2f6aaeb" - - bottle do - cellar :any_skip_relocation - sha256 "31205045cec574039eca74d90f2701191f1192726943e5f7bbc37d1081e21c3e" => :catalina - sha256 "0b25a0fe83ce681fab4f9a0a3f7989528387e299cd6fc507eeb9b24e8f2b1490" => :mojave - sha256 "0266c20b3be69d398a14f1cb9332d34fe9ffca36c827b6e3681b636c0eab6073" => :high_sierra - sha256 "b4bab9fd50310b7401d2605b9a9cdad0a8d7069e5b477d5f53fef61847bea624" => :sierra - sha256 "2c407d12952089ade6602be85acda46eceb3127e32ba2068c0034df8a486e989" => :el_capitan - sha256 "1eea4240f83568d245aa55801949cd9deb4663fc26df75569e029cc1c4c14112" => :yosemite - sha256 "d004176bb8c9df0a165c05863d594e007831cc6b9ce4219ec3639b4ba1069895" => :mavericks - end - - def install - system ENV.cc, ENV.cflags, "hilite.c", "-o", "hilite" - bin.install "hilite" - end - - test do - system "#{bin}/hilite", "bash", "-c", "echo 'stderr in red' >&2" - end -end diff --git a/Formula/hiredis.rb b/Formula/hiredis.rb deleted file mode 100644 index 8807ccc904a97..0000000000000 --- a/Formula/hiredis.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Hiredis < Formula - desc "Minimalistic client for Redis" - homepage "https://github.com/redis/hiredis" - url "https://github.com/redis/hiredis/archive/v0.14.1.tar.gz" - sha256 "2663b2aed9fd430507e30fc5e63274ee40cdd1a296026e22eafd7d99b01c8913" - license "BSD-3-Clause" - revision 1 - head "https://github.com/redis/hiredis.git" - - bottle do - cellar :any - sha256 "4b089bee868b4fe533bea75917f21a42a11a9e04d5b396ec5a94d5623372ec0b" => :catalina - sha256 "8974f8bacac7ce018f6f238915c6c5f07751c5183283337634a1715624d344b8" => :mojave - sha256 "5ed94f51e6dbe91f7d195be5a5d085c7929f82bafeecba8645dd2315a94dad8d" => :high_sierra - end - - def install - system "make", "install", "PREFIX=#{prefix}" - pkgshare.install "examples" - end - - test do - # running `./test` requires a database to connect to, so just make - # sure it compiles - system ENV.cc, "-I#{include}/hiredis", "-L#{lib}", "-lhiredis", - pkgshare/"examples/example.c", "-o", testpath/"test" - assert_predicate testpath/"test", :exist? - end -end diff --git a/Formula/historian.rb b/Formula/historian.rb deleted file mode 100644 index b5f1c1cabcfa1..0000000000000 --- a/Formula/historian.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Historian < Formula - desc "Command-line utility for managing shell history in a SQLite database" - homepage "https://github.com/jcsalterego/historian" - url "https://github.com/jcsalterego/historian/archive/0.0.2.tar.gz" - sha256 "691b131290ddf06142a747755412115fec996cb9cc2ad8e8f728118788b3fe05" - - bottle :unneeded - - def install - bin.install "hist" - end - - test do - ENV["HISTORIAN_SRC"] = "test_history" - (testpath/"test_history").write <<~EOS - brew update - brew upgrade - EOS - system bin/"hist", "import" - end -end diff --git a/Formula/hive.rb b/Formula/hive.rb deleted file mode 100644 index 397deaa3d752c..0000000000000 --- a/Formula/hive.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Hive < Formula - desc "Hadoop-based data summarization, query, and analysis" - homepage "https://hive.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=hive/hive-3.1.2/apache-hive-3.1.2-bin.tar.gz" - mirror "https://archive.apache.org/dist/hive/hive-3.1.2/apache-hive-3.1.2-bin.tar.gz" - sha256 "d75dcf36908b4e7b9b0ec9aec57a46a6628b97b276c233cb2c2f1a3e89b13462" - revision 1 - - bottle :unneeded - - depends_on "hadoop" - depends_on :java => "1.8" - - def install - rm_f Dir["bin/*.cmd", "bin/ext/*.cmd", "bin/ext/util/*.cmd"] - libexec.install %w[bin conf examples hcatalog lib scripts] - - # Hadoop currently supplies a newer version - # and two versions on the classpath causes problems - rm libexec/"lib/guava-19.0.jar" - guava = (Formula["hadoop"].opt_libexec/"share/hadoop/common/lib").glob("guava-*-jre.jar") - ln_s guava.first, libexec/"lib" - - Pathname.glob("#{libexec}/bin/*") do |file| - next if file.directory? - - (bin/file.basename).write_env_script file, - Language::Java.java_home_env("1.7+").merge(:HIVE_HOME => libexec) - end - end - - def caveats - <<~EOS - Hadoop must be in your path for hive executable to work. - - If you want to use HCatalog with Pig, set $HCAT_HOME in your profile: - export HCAT_HOME=#{opt_libexec}/hcatalog - EOS - end - - test do - system bin/"schematool", "-initSchema", "-dbType", "derby" - assert_match "Hive #{version}", shell_output("#{bin}/hive --version") - end -end diff --git a/Formula/hivemind.rb b/Formula/hivemind.rb deleted file mode 100644 index c6356df4c3e42..0000000000000 --- a/Formula/hivemind.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Hivemind < Formula - desc "The mind to rule processes of your development environment" - homepage "https://github.com/DarthSim/hivemind" - url "https://github.com/DarthSim/hivemind/archive/v1.0.6.tar.gz" - sha256 "8ca7884db49268b7938d0503e7e95443cb3a56696478d5dcc2b9813705525a39" - license "MIT" - head "https://github.com/DarthSim/hivemind.git" - - bottle do - cellar :any_skip_relocation - sha256 "ed80238e557ca71f115b2b3cd5031bfac16a3d02d8b37b386b629d89dd26af48" => :catalina - sha256 "8e6f70ca5e0c8eb1e42d47bee207ec5333b453660d808103a36d53c51a7fb59a" => :mojave - sha256 "7a89018774693681975cea22dcdebe35df043507476d1318f195e6d194978693" => :high_sierra - sha256 "4aa25b52b5c7fd3dc7ae29ab31cf19eeddde4e7685fd7e9838be0ea8cf09f3c1" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/DarthSim/hivemind/").install Dir["*"] - system "go", "build", "-o", "#{bin}/hivemind", "-v", "github.com/DarthSim/hivemind/" - end - - test do - (testpath/"Procfile").write("test: echo 'test message'") - assert_match "test message", shell_output("#{bin}/hivemind") - end -end diff --git a/Formula/hledger.rb b/Formula/hledger.rb deleted file mode 100644 index 58ce073f9c972..0000000000000 --- a/Formula/hledger.rb +++ /dev/null @@ -1,85 +0,0 @@ -class Hledger < Formula - desc "Easy plain text accounting with command-line, terminal and web UIs" - homepage "https://hledger.org/" - url "https://hackage.haskell.org/package/hledger-1.18.1/hledger-1.18.1.tar.gz" - sha256 "0c88c9a1896a6c431854c76229f0fe8d9bc59b6560829a4af1b8fcbad85486fa" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "d3a0849f59d9db817166c2d029d5ea25d9a95d62f8a9b4f9db2bda443d4d2aaa" => :catalina - sha256 "64cda6dc29ef5bc5fe65f6c3669a1738076849798a030bc8819166001b13ec62" => :mojave - sha256 "702f4abb102cb59528c4f33a6d6a6aa48c7a12cf0db0008e493cef429e62060a" => :high_sierra - end - - depends_on "ghc@8.8" => :build - depends_on "haskell-stack" => :build - - uses_from_macos "ncurses" - uses_from_macos "zlib" - - resource "hledger-lib" do - url "https://hackage.haskell.org/package/hledger-lib-1.18.1/hledger-lib-1.18.1.tar.gz" - sha256 "44c265b655a8ad37111821d58486bdbe7e8f0e285d3ecb94b46d132b0219cd99" - end - resource "hledger-ui" do - url "https://hackage.haskell.org/package/hledger-ui-1.18.1/hledger-ui-1.18.1.tar.gz" - sha256 "c4f487ea97ac83ac5f2efd772f24e70b47339ba6ebdb3fbfb4f693e046faee3d" - end - resource "hledger-web" do - url "https://hackage.haskell.org/package/hledger-web-1.18.1/hledger-web-1.18.1.tar.gz" - sha256 "3e2ca18e5a5d0c76c19208ede84b3931844254382c9f9a48a2fd1c8da3ef20e8" - end - - def install - (buildpath/"../hledger-lib").install resource("hledger-lib") - (buildpath/"../hledger-ui").install resource("hledger-ui") - (buildpath/"../hledger-web").install resource("hledger-web") - cd ".." do - system "stack", "update" - system "stack", "init", "--resolver=lts-15.16" - system "stack", "install", "--system-ghc", "--no-install-ghc", "--local-bin-path=#{bin}" - - man1.install "hledger-1.18.1/hledger.1" - man1.install "hledger-ui/hledger-ui.1" - man1.install "hledger-web/hledger-web.1" - man5.install "hledger-lib/hledger_csv.5" - man5.install "hledger-lib/hledger_journal.5" - man5.install "hledger-lib/hledger_timeclock.5" - man5.install "hledger-lib/hledger_timedot.5" - - info.install "hledger-1.18.1/hledger.info" - info.install "hledger-lib/hledger_csv.info" - info.install "hledger-lib/hledger_journal.info" - info.install "hledger-lib/hledger_timeclock.info" - info.install "hledger-lib/hledger_timedot.info" - info.install "hledger-ui/hledger-ui.info" - info.install "hledger-web/hledger-web.info" - end - end - - test do - system "#{bin}/hledger", "test" - - File.open(".hledger.journal", "w") do |f| - f.write <<~EOS - 2020/1/1 - boat 123 - cash - EOS - end - - system "#{bin}/hledger-ui", "--version" - - pid = fork do - exec "#{bin}/hledger-web", "--serve" - end - sleep 1 - begin - assert_match /boat +123/, shell_output("curl -s http://127.0.0.1:5000/journal") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/hlint.rb b/Formula/hlint.rb deleted file mode 100644 index 8fa1897ab8fbc..0000000000000 --- a/Formula/hlint.rb +++ /dev/null @@ -1,42 +0,0 @@ -require "language/haskell" - -class Hlint < Formula - include Language::Haskell::Cabal - - desc "Haskell source code suggestions" - homepage "https://github.com/ndmitchell/hlint" - url "https://hackage.haskell.org/package/hlint-3.1.6/hlint-3.1.6.tar.gz" - sha256 "dd420c3da81837bfe65f2de2bf9adacec0c9964a0783d2c5f224e7c1f1907fcd" - license "BSD-3-Clause" - head "https://github.com/ndmitchell/hlint.git" - - bottle do - cellar :any_skip_relocation - sha256 "a385bc86bdad4e1e59180e844b1f6371577ca05e17039094988d2c404ba9b769" => :catalina - sha256 "3e395a8ccaded15d81e5e970b4347a2484669e9cdd5ab27373f224297af090aa" => :mojave - sha256 "cba025cfb5157f42fec2fdb4e3ef6fb798f44e9daca5e1a860a722931a5c5f6b" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - uses_from_macos "ncurses" - - def install - system "cabal", "v2-update" - system "cabal", "v2-install", *std_cabal_v2_args - man1.install "data/hlint.1" - end - - test do - (testpath/"test.hs").write <<~EOS - main = do putStrLn "Hello World" - EOS - assert_match "No hints", shell_output("#{bin}/hlint test.hs") - - (testpath/"test1.hs").write <<~EOS - main = do foo x; return 3; bar z - EOS - assert_match "Redundant return", shell_output("#{bin}/hlint test1.hs", 1) - end -end diff --git a/Formula/hmmer.rb b/Formula/hmmer.rb deleted file mode 100644 index aeabcb86acf21..0000000000000 --- a/Formula/hmmer.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Hmmer < Formula - desc "Build profile HMMs and scan against sequence databases" - homepage "http://hmmer.org/" - url "http://eddylab.org/software/hmmer/hmmer-3.3.tar.gz" - sha256 "0186bf40af67032666014971ed8ddc3cf2834bebc2be5b3bc0304a93e763736c" - - bottle do - cellar :any_skip_relocation - sha256 "6cafc97dbddaa66d9e353f161ce402786d887aea8a88f52be3323ffc4cf5733b" => :catalina - sha256 "544c93b2fc808d5176ac562689afb59785f24ef29f3198b8ca24adf2c5fab422" => :mojave - sha256 "aac6c2a8264ae6192bff7dd02c57cfe5000e830a0991c9e5be8c0fc27b0daded" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - doc.install "Userguide.pdf", "tutorial" - end - - test do - assert_match "PF00069.17", shell_output("#{bin}/hmmstat #{doc}/tutorial/Pkinase.hmm") - end -end diff --git a/Formula/hoedown.rb b/Formula/hoedown.rb deleted file mode 100644 index 7136c7fc0024f..0000000000000 --- a/Formula/hoedown.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Hoedown < Formula - desc "Secure Markdown processing (a revived fork of Sundown)" - homepage "https://github.com/hoedown/hoedown" - url "https://github.com/hoedown/hoedown/archive/3.0.7.tar.gz" - sha256 "01b6021b1ec329b70687c0d240b12edcaf09c4aa28423ddf344d2bd9056ba920" - license "ISC" - - bottle do - cellar :any_skip_relocation - sha256 "578d2db4436012569cd56a47cca8967e106cd83474ed80f52dd7deeda6b1a134" => :catalina - sha256 "4028b7bb88b6da75f735c58f3497d354dda4bc7ce33288a0ae71932878991c5b" => :mojave - sha256 "1be6101d978f2df1749712dd39d3fc8b9c7cc014c2402eab5060e8656f6b22cf" => :high_sierra - sha256 "f940a418b3ca712a91e8b782d61618a2b1cf2c662a98f636e4df1318fbb9f508" => :sierra - sha256 "7076f6f7c091919a3619a5a5655270d79dab42fdb6d7dfdc3f1324318ca4ec6d" => :el_capitan - sha256 "fc37aa79feca395a49b3e15348d8156721ba1713dfb740622c57a696d1ec5e58" => :yosemite - sha256 "9940929bd2ede20f973f29fdac888c6b664188bf29e9a1f7c8eba0eeb42e6206" => :mavericks - end - - def install - system "make", "hoedown" - bin.install "hoedown" - prefix.install "test" - end - - test do - system "perl", "#{prefix}/test/MarkdownTest_1.0.3/MarkdownTest.pl", - "--script=#{bin}/hoedown", - "--testdir=#{prefix}/test/MarkdownTest_1.0.3/Tests", - "--tidy" - end -end diff --git a/Formula/homeassistant-cli.rb b/Formula/homeassistant-cli.rb deleted file mode 100644 index 41d8e87e11ed9..0000000000000 --- a/Formula/homeassistant-cli.rb +++ /dev/null @@ -1,175 +0,0 @@ -class HomeassistantCli < Formula - include Language::Python::Virtualenv - - desc "Command-line utility for Home Assistant" - homepage "https://github.com/home-assistant/home-assistant-cli" - url "https://files.pythonhosted.org/packages/ea/14/3e1f0327335a2a50409efbcdd35f4eea2961308a735bb1b1dd5b70ff6cec/homeassistant-cli-0.9.1.tar.gz" - sha256 "eec1b7f16d688fb8781b554f8c41325222316237aa3eb980f30bf172859f61a8" - head "https://github.com/home-assistant/home-assistant-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "147e080fb5b9377766c8788a371ac336da5568e960b6857468a94c2410d8ff15" => :catalina - sha256 "70ebba0eb012d61f1d523ecbb72cb95ec411d63a358c06d881f0c50599919d11" => :mojave - sha256 "a7d4301ca443bc0e0a2761d4592515e027e1bfa964a07de6752bb0f714e0f2bf" => :high_sierra - end - - depends_on "python@3.8" - - resource "aiohttp" do - url "https://files.pythonhosted.org/packages/00/94/f9fa18e8d7124d7850a5715a0b9c0584f7b9375d331d35e157cee50f27cc/aiohttp-3.6.2.tar.gz" - sha256 "259ab809ff0727d0e834ac5e8a283dc5e3e0ecc30c4d80b3cd17a4139ce1f326" - end - - resource "async_timeout" do - url "https://files.pythonhosted.org/packages/a1/78/aae1545aba6e87e23ecab8d212b58bb70e72164b67eb090b81bb17ad38e3/async-timeout-3.0.1.tar.gz" - sha256 "0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - end - - resource "click-log" do - url "https://files.pythonhosted.org/packages/22/44/3d73579b547f0790a2723728088c96189c8b52bd2ee3c3de8040efc3c1b8/click-log-0.3.2.tar.gz" - sha256 "16fd1ca3fc6b16c98cea63acf1ab474ea8e676849dc669d86afafb0ed7003124" - end - - resource "dateparser" do - url "https://files.pythonhosted.org/packages/e2/da/c58ecd3b4183849b7373e6bbe140fdc0e0cc4640b960a1ddb5f550c2b283/dateparser-0.7.4.tar.gz" - sha256 "fb5bfde4795fa4b179fe05c2c25b3981f785de26bec37e247dee1079c63d5689" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "ifaddr" do - url "https://files.pythonhosted.org/packages/9f/54/d92bda685093ebc70e2057abfa83ef1b3fb0ae2b6357262a3e19dfe96bb8/ifaddr-0.1.6.tar.gz" - sha256 "c19c64882a7ad51a394451dabcbbed72e98b5625ec1e79789924d5ea3e3ecb93" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - 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 "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "multidict" do - url "https://files.pythonhosted.org/packages/61/b4/475114b3f1671da634f89239e61038f8742d9ac13aa34b32a05bf8022d22/multidict-4.7.5.tar.gz" - sha256 "aee283c49601fa4c13adc64c09c978838a7e812f85377ae130a24d7198c0331e" - end - - resource "netdisco" do - url "https://files.pythonhosted.org/packages/ae/73/2a60ac3292203ac75528b1ae9a475fac6fff690e906cbc13e744701b2436/netdisco-2.6.0.tar.gz" - sha256 "2b3aca14a1807712a053f11fd80dc251dd821ee4899aefece515287981817762" - end - - resource "ply" do - url "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" - sha256 "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/82/c3/534ddba230bd4fbbd3b7a3d35f3341d014cca213f369a9940925e7e5f691/pytz-2019.3.tar.gz" - sha256 "b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be" - end - - resource "regex" do - url "https://files.pythonhosted.org/packages/4c/e7/eee73c42c1193fecc0e91361a163cbb8dfbea62c3db7618ad986e5b43a14/regex-2020.4.4.tar.gz" - sha256 "295badf61a51add2d428a46b8580309c520d8b26e769868b922750cf3ce67142" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/16/8b/54a26c1031595e5edd0e616028b922d78d8ffba8bc775f0a4faeada846cc/ruamel.yaml-0.16.10.tar.gz" - sha256 "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954" - end - - resource "ruamel.yaml.clib" do - url "https://files.pythonhosted.org/packages/92/28/612085de3fae9f82d62d80255d9f4cf05b1b341db1e180adcf28c1bf748d/ruamel.yaml.clib-0.2.0.tar.gz" - sha256 "b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/57/6f/213d075ad03c84991d44e63b6516dd7d185091df5e1d02a660874f8f7e1e/tabulate-0.8.7.tar.gz" - sha256 "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007" - end - - resource "tzlocal" do - url "https://files.pythonhosted.org/packages/c6/52/5ec375d4efcbe4e31805f3c4b301bdfcff9dcbdb3605d4b79e117a16b38d/tzlocal-2.0.0.tar.gz" - sha256 "949b9dd5ba4be17190a80c0268167d7e6c92c62b30026cf9764caf3e308e5590" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - end - - resource "yarl" do - url "https://files.pythonhosted.org/packages/d6/67/6e2507586eb1cfa6d55540845b0cd05b4b77c414f6bca8b00b45483b976e/yarl-1.4.2.tar.gz" - sha256 "58cd9c469eced558cd81aa3f484b2924e8897049e06889e8ff2510435b7ef74b" - end - - resource "zeroconf" do - url "https://files.pythonhosted.org/packages/11/c9/903f1df6e9e9a3cff4f7123891f4855ce94de167cddef87a6e85da71f72b/zeroconf-0.25.0.tar.gz" - sha256 "e65a65fbff2285d6196018c20d939772ebdafbe8d092aa4138c103ed9fb9c741" - end - - def install - virtualenv_install_with_resources - bin.install_symlink libexec/"bin/hass-cli" - end - - test do - # test shell completion output - completion_token = "_hass_cli_completion" - assert_match completion_token, shell_output("#{bin}/hass-cli completion bash") - assert_match completion_token, shell_output("#{bin}/hass-cli completion zsh") - end -end diff --git a/Formula/homebank.rb b/Formula/homebank.rb deleted file mode 100644 index 69e3ae7c69e84..0000000000000 --- a/Formula/homebank.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Homebank < Formula - desc "Manage your personal accounts at home" - homepage "http://homebank.free.fr/" - url "http://homebank.free.fr/public/homebank-5.4.2.tar.gz" - sha256 "c6ce84b421e7199ae545ea8b8d981f347af4d67b4cd5912b6789cf1450db722e" - license "GPL-2.0" - revision 1 - - bottle do - sha256 "1ca56de1c4771063323308f34678f4118f8d1c2ffc532dbbd331292bd56f9657" => :catalina - sha256 "6d067038c65914ac316c860816b6d2a0c03eb29ccde03f7f799737b4bcb62d3a" => :mojave - sha256 "b58b4f6913811db5fd8ac1e2c949198b4f2f67979679a33829e928654cbf6c0c" => :high_sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "fontconfig" - depends_on "freetype" - depends_on "gettext" - depends_on "gtk+3" - depends_on "hicolor-icon-theme" - depends_on "libofx" - depends_on "libsoup" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--with-ofx" - chmod 0755, "./install-sh" - system "make", "install" - end - - test do - system "#{bin}/homebank", "--version" - end -end diff --git a/Formula/homeshick.rb b/Formula/homeshick.rb deleted file mode 100644 index 8416db6506b61..0000000000000 --- a/Formula/homeshick.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Homeshick < Formula - desc "Git dotfiles synchronizer written in bash" - homepage "https://github.com/andsens/homeshick" - url "https://github.com/andsens/homeshick/archive/v2.0.0.tar.gz" - sha256 "14a538bfc2e7cb6bfd35c984cdedbf3d3293413a70cc67f685dbfbd33ce64fdd" - license "MIT" - head "https://github.com/andsens/homeshick.git" - - bottle :unneeded - - conflicts_with "asdf", - :because => "asdf and homeshick both install files in lib/commands" - - def install - inreplace "bin/homeshick", /^homeshick=.*/, "homeshick=#{opt_prefix}" - - prefix.install "lib", "homeshick.sh" - fish_function.install "homeshick.fish" - bin.install "bin/homeshick" - zsh_completion.install "completions/_homeshick" - bash_completion.install "completions/homeshick-completion.bash" - fish_completion.install "completions/homeshick.fish" if build.head? - end - - def caveats - <<~EOS - To enable the `homeshick cd ` command, you need to - `export HOMESHICK_DIR=#{opt_prefix}` - and - `source "#{opt_prefix}/homeshick.sh"` - in your $HOME/.bashrc - EOS - end - - test do - (testpath/"test.sh").write <<~EOS - #!/bin/sh - export HOMESHICK_DIR="#{opt_prefix}" - source "#{opt_prefix}/homeshick.sh" - homeshick generate test - homeshick list - EOS - assert_match "test", shell_output("bash #{testpath}/test.sh") - end -end diff --git a/Formula/homesick-completion.rb b/Formula/homesick-completion.rb deleted file mode 100644 index 28ebec8120b21..0000000000000 --- a/Formula/homesick-completion.rb +++ /dev/null @@ -1,17 +0,0 @@ -class HomesickCompletion < Formula - desc "Bash completion for Homesick" - homepage "https://github.com/MasterRoot24/homesick-completion" - url "https://github.com/MasterRoot24/homesick-completion/archive/v1.0.0.tar.gz" - sha256 "f9953d92dc5c0d9770d502a68651795c78f5d7bd6078cd747e77ebc602c43609" - - bottle :unneeded - - def install - bash_completion.install "homesick" - end - - test do - assert_match "-F _homesick", - shell_output("source #{bash_completion}/homesick && complete -p homesick") - end -end diff --git a/Formula/homeworlds.rb b/Formula/homeworlds.rb deleted file mode 100644 index 1fa8a3a33fe67..0000000000000 --- a/Formula/homeworlds.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Homeworlds < Formula - desc "C++ framework for the game of Binary Homeworlds" - homepage "https://github.com/Quuxplusone/Homeworlds/" - url "https://github.com/Quuxplusone/Homeworlds.git", - :revision => "917cd7e7e6d0a5cdfcc56cd69b41e3e80b671cde" - version "20141022" - - bottle do - cellar :any - sha256 "a31bff64509e705b514068d75a4bdd6b9e11fa1f0e0aa45bef8b6ecb2b10c7be" => :catalina - sha256 "9998b77fea42a5c72c4ffdab61b84165ae8ce067763e4c661a058235749eaf84" => :mojave - sha256 "b26fbb5f7955afa48247667b0caeff13d504eee6ef744284c498702026f9528e" => :high_sierra - sha256 "499e9a94e24c8965b9a31902ab2a14a021c780756451b82ac2313c7c86ac5756" => :sierra - sha256 "2665c0ed4da2eb399314d044699385250ca5db54e6f8c22287222b7877881d22" => :el_capitan - sha256 "47251f13fa79c98b3c41d45cafade044bded134256f56e6ee1a118f67eb325d8" => :yosemite - end - - depends_on "wxmac" - - def install - system "make" - bin.install "wxgui" => "homeworlds-wx", "annotate" => "homeworlds-cli" - end -end diff --git a/Formula/honcho.rb b/Formula/honcho.rb deleted file mode 100644 index 21a9cdb73eaaa..0000000000000 --- a/Formula/honcho.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Honcho < Formula - desc "Python clone of Foreman, for managing Procfile-based applications" - homepage "https://github.com/nickstenning/honcho" - url "https://github.com/nickstenning/honcho/archive/v1.0.1.tar.gz" - sha256 "3271f986ff7c4732cfd390383078bfce68c46f9ad74f1804c1b0fc6283b13f7e" - license "MIT" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "986c98221b9bb025b0c8fa8c1f4ca150ee1853488f6060b603c54aa7e02c8be1" => :catalina - sha256 "986c98221b9bb025b0c8fa8c1f4ca150ee1853488f6060b603c54aa7e02c8be1" => :mojave - sha256 "986c98221b9bb025b0c8fa8c1f4ca150ee1853488f6060b603c54aa7e02c8be1" => :high_sierra - end - - depends_on "python@3.8" - - 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/"Procfile").write("talk: echo $MY_VAR") - (testpath/".env").write("MY_VAR=hi") - assert_match /talk\.\d+ \| hi/, shell_output("#{bin}/honcho start") - end -end diff --git a/Formula/hopenpgp-tools.rb b/Formula/hopenpgp-tools.rb deleted file mode 100644 index 7f79cfed1dc51..0000000000000 --- a/Formula/hopenpgp-tools.rb +++ /dev/null @@ -1,40 +0,0 @@ -require "language/haskell" - -class HopenpgpTools < Formula - include Language::Haskell::Cabal - - desc "Command-line tools for OpenPGP-related operations" - homepage "https://hackage.haskell.org/package/hopenpgp-tools" - url "https://hackage.haskell.org/package/hopenpgp-tools-0.23.1/hopenpgp-tools-0.23.1.tar.gz" - sha256 "b28ac66343a0bf78b3bfb22cc87f85355909fcd49d9ba5ad43e5a0c38e8b014b" - revision 1 - head "https://salsa.debian.org/clint/hOpenPGP.git" - - bottle do - cellar :any_skip_relocation - sha256 "9d03ebe24464c62fae11b856eb20f9b1ea4d67470ac65b8f770b20cf5f319913" => :catalina - sha256 "4e4744a3d82755df2e2d03c775f99414faa5d13cdc1efa2462b16d65db1561e1" => :mojave - sha256 "a2184881695b6d7209c40467a5c57c5ce32b1604fa909df13c84b3ed1aab3408" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.6" => :build - depends_on "pkg-config" => :build - depends_on "nettle" - - resource "homebrew-key.gpg" do - url "https://gist.githubusercontent.com/zmwangx/be307671d11cd78985bd3a96182f15ea/raw/c7e803814efc4ca96cc9a56632aa542ea4ccf5b3/homebrew-key.gpg" - sha256 "994744ca074a3662cff1d414e4b8fb3985d82f10cafcaadf1f8342f71f36b233" - end - - def install - install_cabal_package :using => ["alex", "happy", "c2hs"] - end - - test do - resource("homebrew-key.gpg").stage do - linter_output = shell_output("#{bin}/hokey lint /dev/null") - assert_match "Homebrew ", linter_output - end - end -end diff --git a/Formula/hornetq.rb b/Formula/hornetq.rb deleted file mode 100644 index a19c002777065..0000000000000 --- a/Formula/hornetq.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Hornetq < Formula - desc "Multi-protocol, embeddable, clustered, asynchronous messaging system" - homepage "https://hornetq.jboss.org/" - url "https://downloads.jboss.org/hornetq/hornetq-2.4.0.Final-bin.tar.gz" - version "2.4.0" - sha256 "a774083f6b56b368624eafd85002f7b9d15472690daf6dc6ca04c7561e66b013" - - bottle :unneeded - - def wrapper_script(target) - <<~EOS - #!/bin/bash - cd #{libexec}/bin/ - ./#{target} "$@" - EOS - end - - def install - libexec.install Dir["*"] - (bin+"hornet-start").write wrapper_script("run.sh") - (bin+"hornet-stop").write wrapper_script("stop.sh") - end - - def caveats - <<~EOS - HornetQ has been installed to: - #{libexec} - - `run.sh` and `stop.sh` have been wrapped as`hornet-start` and `hornet-stop` - to avoid naming conflicts. - EOS - end -end diff --git a/Formula/hostdb.rb b/Formula/hostdb.rb deleted file mode 100644 index 45084bbeddfaa..0000000000000 --- a/Formula/hostdb.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Hostdb < Formula - desc "Generate DNS zones and DHCP configuration from hostlist.txt" - homepage "https://code.google.com/archive/p/hostdb/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hostdb/hostdb-1.004.tgz" - sha256 "beea7cfcdc384eb40d0bc8b3ad2eb094ee81ca75e8eef7c07ea4a47e9f0da350" - - bottle :unneeded - - def install - bin.install Dir["bin/*"] - doc.install Dir["docs/*"] - pkgshare.install "examples" - end - - test do - system("#{bin}/mkzones -z #{pkgshare}/examples/example1/zoneconf.txt < #{pkgshare}/examples/example1/hostdb.txt") - expected = /^4 \s+ IN \s+ PTR \s+ vector\.example\.com\.$/x - assert_match(expected, (testpath/"INTERNAL.179.32.64.in-addr.arpa").read) - end -end diff --git a/Formula/hostess.rb b/Formula/hostess.rb deleted file mode 100644 index 4d29f01289d55..0000000000000 --- a/Formula/hostess.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Hostess < Formula - desc "Idempotent command-line utility for managing your /etc/hosts file" - homepage "https://github.com/cbednarski/hostess" - url "https://github.com/cbednarski/hostess/archive/v0.5.2.tar.gz" - sha256 "ece52d72e9e886e5cc877379b94c7d8fe6ba5e22ab823ef41b66015e5326da87" - license "MIT" - head "https://github.com/cbednarski/hostess.git" - - bottle do - cellar :any_skip_relocation - sha256 "80480773a167fdcad3fadb3feeb298b51aeb89aec5863204f512f941af7271da" => :catalina - sha256 "f3f06881067507c0d115209d515e6ebbe4090d7aa8fcff7bc685027c49ea6479" => :mojave - sha256 "15050f5b2f5936fe74e47937323c8a872ec12b75ed639b3df2c6eac11cf7da6f" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = "amd64" - - system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", "-o", bin/"hostess" - end - - test do - assert_match "localhost", shell_output("#{bin}/hostess ls 2>&1") - end -end diff --git a/Formula/howard-hinnant-date.rb b/Formula/howard-hinnant-date.rb deleted file mode 100644 index 80ad6f8e5de29..0000000000000 --- a/Formula/howard-hinnant-date.rb +++ /dev/null @@ -1,38 +0,0 @@ -class HowardHinnantDate < Formula - desc "C++ library for date and time operations based on " - homepage "https://github.com/HowardHinnant/date" - url "https://github.com/HowardHinnant/date/archive/v3.0.0.tar.gz" - sha256 "87bba2eaf0ebc7ec539e5e62fc317cb80671a337c1fb1b84cb9e4d42c6dbebe3" - - bottle do - cellar :any - sha256 "336157e546ea77db5ec3c0360b4e873e8c6ec265aa6dedb2fe19d45a6df207fb" => :catalina - sha256 "20a35158d9c478a553baae673544620546db6f31825f9e052a0bbf07086e773e" => :mojave - sha256 "f23b72ea88d5c0bc12f2e93dff65ba6a9867d88831294fc5c770f2d0a39762fa" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args, - "-DENABLE_DATE_TESTING=OFF", - "-DUSE_SYSTEM_TZ_DB=ON", - "-DBUILD_SHARED_LIBS=ON", - "-DBUILD_TZ_LIB=ON" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "date/tz.h" - #include - - int main() { - auto t = date::make_zoned(date::current_zone(), std::chrono::system_clock::now()); - std::cout << t << std::endl; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++1y", "-L#{lib}", "-ldate-tz", "-o", "test" - system "./test" - end -end diff --git a/Formula/howdoi.rb b/Formula/howdoi.rb deleted file mode 100644 index 8ecfaaaab419e..0000000000000 --- a/Formula/howdoi.rb +++ /dev/null @@ -1,90 +0,0 @@ -class Howdoi < Formula - include Language::Python::Virtualenv - - desc "Instant coding answers via the command-line" - homepage "https://github.com/gleitz/howdoi" - url "https://files.pythonhosted.org/packages/03/db/c9b5bb64adac16b0feab7924fb1134ce88bc38f7af4e74aca27c48de26df/howdoi-1.2.1.tar.gz" - sha256 "3b322668606d29d8a841c3b28c0574851f512b55c33a7ceb982b6a98d82fa3e3" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "b2a140c27beb5eb6cf0828112a4c90983014d36d50c66096a68773b0d47410a8" => :catalina - sha256 "eba1481a04f930805a0033c3213ae837464c600d6bc4f7bf3a3db4d17e328ae2" => :mojave - sha256 "bb5109a1450ea626cfaacae8001b086495ba7b33a14e7ea6b27dcb243f2421be" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "libxml2" - uses_from_macos "libxslt" - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5/appdirs-1.4.3.tar.gz" - sha256 "9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92" - end - - resource "cachelib" do - url "https://files.pythonhosted.org/packages/e6/5b/39d1f9071e95123a4ae6d8bdeb53416d1af601f662641eac9b0d7c844dba/cachelib-0.1.tar.gz" - sha256 "8b889b509d372095357b8705966e1282d40835c4126d7c2b07fd414514d8ae8d" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/bf/9d214a5af07debc6acf7f3f257265618f1db242a3f8e49a9b516f24523a6/certifi-2019.11.28.tar.gz" - sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" - 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/70/54/37630f6eb2c214cdee2ae56b7287394c8aa2f3bafb8b4eb8c3791aae7a14/cssselect-1.1.0.tar.gz" - sha256 "f95f8dedd925fd8f54edb3d2dfb44c190d9d18512377d3c1e2388d16126879bc" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/e4/19/8dfeef50623892577dc05245093e090bb2bab4c8aed5cad5b03208959563/lxml-4.4.2.tar.gz" - sha256 "eff69ddbf3ad86375c344339371168640951c302450c5d3e9936e98d6459db06" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/cb/9f/27d4844ac5bf158a33900dbad7985951e2910397998e85712da03ce125f0/Pygments-2.5.2.tar.gz" - sha256 "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe" - end - - resource "pyquery" do - url "https://files.pythonhosted.org/packages/6b/94/4663206f709ac32446e995227cc5be34d5e2aa74ba8f92b8083c2740d3d7/pyquery-1.4.1.tar.gz" - sha256 "8fcf77c72e3d602ce10a0bd4e65f57f0945c18e15627e49130c27172d4939d98" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz" - sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ad/fc/54d62fa4fc6e675678f9519e677dfc29b8964278d75333cf142892caf015/urllib3-1.25.7.tar.gz" - sha256 "f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745" - 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 - assert_match "pow", shell_output("#{bin}/howdoi square root python") - - assert_match "# put current date as yyyy-mm-dd in $date", - shell_output("#{bin}/howdoi format date bash 2>&1") - end -end diff --git a/Formula/hpack.rb b/Formula/hpack.rb deleted file mode 100644 index 63c2802e6ca36..0000000000000 --- a/Formula/hpack.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Hpack < Formula - desc "Modern format for Haskell packages" - homepage "https://github.com/sol/hpack" - url "https://github.com/sol/hpack/archive/0.34.2.tar.gz" - sha256 "1c23f0a14ca32c92a2b6522d047757850ae89be2b344b19a2df668607f5f72e7" - license "MIT" - head "https://github.com/sol/hpack.git" - - bottle do - cellar :any_skip_relocation - sha256 "e230f0684178727141cfb242d235de3f062a056816c06c1e882ad3c2caf34c35" => :catalina - sha256 "cc6b80c259ea44fdb961fc758c9472264b48ce481f5c9d436c325493d7d13c0a" => :mojave - sha256 "197fe924cebba40e09bf85adb60beeb889e576cc8600b1e92361f20a5e9c0a04" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - def install - system "cabal", "v2-update" - system "cabal", "v2-install", *std_cabal_v2_args - end - - # Testing hpack is complicated by the fact that it is not guaranteed - # to produce the exact same output for every version. Hopefully - # keeping this test maintained will not require too much churn, but - # be aware that failures here can probably be fixed by tweaking the - # expected output a bit. - test do - (testpath/"package.yaml").write <<~EOS - name: homebrew - dependencies: base - library: - exposed-modules: Homebrew - EOS - expected = <<~EOS - name: homebrew - version: 0.0.0 - build-type: Simple - - library - exposed-modules: - Homebrew - other-modules: - Paths_homebrew - build-depends: - base - default-language: Haskell2010 - EOS - - system "#{bin}/hpack" - - # Skip the first lines because they contain the hpack version number. - assert_equal expected, (testpath/"homebrew.cabal").read.lines[6..].join - end -end diff --git a/Formula/hping.rb b/Formula/hping.rb deleted file mode 100644 index a5cb8ac61da44..0000000000000 --- a/Formula/hping.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Hping < Formula - desc "Command-line oriented TCP/IP packet assembler/analyzer" - homepage "http://www.hping.org/" - url "http://www.hping.org/hping3-20051105.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/hping-3.20051105.tar.gz" - version "3.20051105" - sha256 "f5a671a62a11dc8114fa98eade19542ed1c3aa3c832b0e572ca0eb1a5a4faee8" - - bottle do - cellar :any_skip_relocation - sha256 "3cf96bb2d2dcc407aadab3bb2691937e2adc96008df65314b889914621ade865" => :catalina - sha256 "dd0b27a1e3b858378a184dd2cca506bbed420d103a75bb98545a649890142ab9" => :mojave - sha256 "088413e9a62fe7b67627f41b91d762c2b639ca6b5598175002616ceb234fe93a" => :high_sierra - sha256 "e6b7a8ef4527b282da33e75fc9484dee752f365b34498849fd251146948f0e80" => :sierra - sha256 "9644e041cb830ebd121c224cef3727e20c5bf4dcca918fd91135d74e10eb2123" => :el_capitan - sha256 "95f5fabc90cdd2e8ca9b10189f69a2057019b35ac1f6cb2e7e4afa7bea1221d5" => :yosemite - sha256 "3e8641cad09db531d4ee6b3686748627177d53234ad6b5df92abebf3c1a94ae7" => :mavericks - end - - patch :DATA - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/fc1d446f/hping/patch-libpcap_stuff.c.diff" - sha256 "56d3af80a6385bf93257080233e971726283d6555cc244ebe886ea21133e83ad" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/fc1d446f/hping/patch-ars.c.diff" - sha256 "02138051414e48b9f057a2dd8134c01ccd374aff65593833a799a5aaa36193c4" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/fc1d446f/hping/patch-sendip.c.diff" - sha256 "e7befff6dd546cdb38b59d9e6d3ef4a4dc09c79af2982f4609b2ea5dadf1a360" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/fc1d446f/hping/patch-Makefile.in.diff" - sha256 "18ceb30104bdb906b540bb5f6316678ce85fb55f5c086d2d74417416de3792f8" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/fc1d446f/hping/patch-bytesex.h.diff" - sha256 "7bad5e8b4b5441f72f85d50fa3461857a398b87e2d0cb63bb30985c9457be21d" - end - - def install - # Compile fails with tcl support; TCL on macOS is 32-bit only - system "./configure", "--no-tcl" - - # Target folders need to exist before installing - sbin.mkpath - man8.mkpath - system "make", "CC=#{ENV.cc}", - "COMPILE_TIME=#{ENV.cflags}", - "INSTALL_PATH=#{prefix}", - "INSTALL_MANPATH=#{man}", - "install" - end -end - -__END__ -diff --git a/gethostname.c b/gethostname.c -index 3d0ea58..a8a9699 100644 ---- a/gethostname.c -+++ b/gethostname.c -@@ -18,8 +18,6 @@ - #include - #include - --size_t strlcpy(char *dst, const char *src, size_t siz); -- - char *get_hostname(char* addr) - { - static char answer[1024]; diff --git a/Formula/hqx.rb b/Formula/hqx.rb deleted file mode 100644 index 914c04fce5cd0..0000000000000 --- a/Formula/hqx.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Hqx < Formula - desc "Magnification filter designed for pixel art" - homepage "https://github.com/grom358/hqx" - url "https://github.com/grom358/hqx.git", - :tag => "v1.2", - :revision => "124c9399fa136fb0f743417ca27dfa2ca2860c2d" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "14a68ef6155118b80a663827075e5a98a9f889f0edbe0fac77905ea69be9b334" => :catalina - sha256 "557085364f580e05f98df85ba471d686563820c1cf4b890c8c577ea1a1ac6e27" => :mojave - sha256 "efdbc80364955ad0c66fe7729d298affb7644a72ee780012ad99f506088aedf9" => :high_sierra - sha256 "2925d0405549e466e967124d8192e88a27a83b8b4619e88e9b5b1a109eb4e7ac" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "devil" - - def install - ENV.deparallelize - system "autoreconf", "-iv" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"hqx", test_fixtures("test.jpg"), "out.jpg" - output = pipe_output("php -r \"print_r(getimagesize(\'file://#{testpath}/out.jpg\'));\"") - assert_equal <<~EOS, output - Array - ( - [0] => 4 - [1] => 4 - [2] => 2 - [3] => width="4" height="4" - [bits] => 8 - [channels] => 3 - [mime] => image/jpeg - ) - EOS - end -end diff --git a/Formula/hr.rb b/Formula/hr.rb deleted file mode 100644 index f67bcecd6b539..0000000000000 --- a/Formula/hr.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Hr < Formula - desc "


, for your terminal window" - homepage "https://github.com/LuRsT/hr" - url "https://github.com/LuRsT/hr/archive/1.2.tar.gz" - sha256 "8f611b3f25e10fac1e67cf8b30fea4c1c02db7ab8c55d39402fe08caecb68a1a" - license "MIT" - head "https://github.com/LuRsT/hr.git" - - bottle :unneeded - - def install - bin.install "hr" - man1.install "hr.1" - end - - test do - system "#{bin}/hr", "-#-" - end -end diff --git a/Formula/hsd.rb b/Formula/hsd.rb deleted file mode 100644 index 3ae970378f66e..0000000000000 --- a/Formula/hsd.rb +++ /dev/null @@ -1,44 +0,0 @@ -require "language/node" - -class Hsd < Formula - desc "Handshake Daemon & Full Node" - homepage "https://handshake.org/" - url "https://github.com/handshake-org/hsd/archive/v2.1.5.tar.gz" - sha256 "e53689784d677e4f729dd723e753038b020e030522e7c43b5dd753b7079a05f7" - - bottle do - rebuild 1 - sha256 "dbd50284d8546d83bbe30663b99eeb5244fad4c0fedac0e673772b99300e0967" => :catalina - sha256 "051254fac8a90d4069a7da8a56e17b16b926083d74bf699b34ab71d0c815bd81" => :mojave - sha256 "0420b2d3785703c26a0c02f873d08463795e0bcee43a5f3bf871b28a7901ba40" => :high_sierra - end - - depends_on "python@3.8" => :build - depends_on "node@10" - depends_on "unbound" - - def install - system "#{Formula["node@10"].bin}/npm", "install", *Language::Node.std_npm_install_args(libexec) - (bin/"hsd").write_env_script libexec/"bin/hsd", :PATH => "#{Formula["node@10"].opt_bin}:$PATH" - bin.install_symlink libexec/"bin/hsd-cli" - bin.install_symlink libexec/"bin/hsw-cli" - end - - test do - (testpath/"script.js").write <<~EOS - const assert = require('assert'); - const hsd = require('#{libexec}/lib/node_modules/hsd'); - assert(hsd); - - const node = new hsd.FullNode({ - prefix: '#{testpath}/.hsd', - memory: false - }); - (async () => { - await node.ensure(); - })(); - EOS - system "#{Formula["node@10"].opt_bin}/node", testpath/"script.js" - assert_true File.directory?("#{testpath}/.hsd") - end -end diff --git a/Formula/hspell.rb b/Formula/hspell.rb deleted file mode 100644 index d1f4e96458012..0000000000000 --- a/Formula/hspell.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Hspell < Formula - desc "Free Hebrew linguistic project" - homepage "http://hspell.ivrix.org.il/" - url "http://hspell.ivrix.org.il/hspell-1.4.tar.gz" - sha256 "7310f5d58740d21d6d215c1179658602ef7da97a816bc1497c8764be97aabea3" - - bottle do - sha256 "95b64e844560f948bdd487f1aa8a36fa6b54af18a278be1793b2f34614e08736" => :catalina - sha256 "92fac64ac02e38e225184831bda82521c4136d480660d52f599c6a92f6647860" => :mojave - sha256 "62cf9605edbaf21775ddc788367d78260d79058fba8c90674620d1ee59c9b273" => :high_sierra - sha256 "50be9b91b5158ce882207622b6a2581185f67a5c999c8f1105d522d800344a37" => :sierra - sha256 "f9648fc0bbf530759a8cd7057ebed5310c3b293c5cd2c1e284aef28f55e44ba7" => :el_capitan - sha256 "6ccb57a3f549935b58b3aaa56b0a49b5a7fc41692594d2e4a0d718a5be30fa84" => :yosemite - end - - depends_on "autoconf" => :build - - # hspell was built for linux and compiles a .so shared library, to comply with macOS - # standards this patch creates a .dylib instead - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/hspell/1.3.patch" - sha256 "63cc1bc753b1062d1144dcdd959a0a8f712b8872dce89e54ddff2d24f2ca2065" - end - - def install - ENV.deparallelize - - # autoconf needs to pick up on the patched configure.in and create a new ./configure - # script - system "autoconf" - - system "./configure", "--prefix=#{prefix}", - "--enable-shared", - "--enable-linginfo" - system "make", "dolinginfo" - system "make", "install" - end - - test do - File.open("test.txt", "w:ISO8859-8") do |f| - f.write "שלום" - end - system "#{bin}/hspell", "-l", "test.txt" - end -end diff --git a/Formula/hss.rb b/Formula/hss.rb deleted file mode 100644 index a6eed9c1dfd47..0000000000000 --- a/Formula/hss.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Hss < Formula - desc "Interactive parallel SSH client" - homepage "https://github.com/six-ddc/hss" - url "https://github.com/six-ddc/hss/archive/1.8.tar.gz" - sha256 "60481274403c551f5b717599c813d619877a009832c4a8a84fcead18e39382fa" - license "MIT" - - bottle do - cellar :any - sha256 "709da9ba5497dd3d76b8b425f6a74c8b6014e23a0a85b5b1498d6ac0137b15cd" => :catalina - sha256 "bc7f0e8a54effd65cae855164b7ea0d287af079ceec01accebb74f476e04c863" => :mojave - sha256 "e6b884c0c3f45c0365c39d65f644281c0079899b96d7835ad7fdab6e2e67c338" => :high_sierra - sha256 "4d23f98a3af8e2facd71c61616a207bb7c990bb2b9c5c52ca9a772cc6aecd0be" => :sierra - end - - depends_on "readline" - - def install - system "make" - system "make", "install", "INSTALL_BIN=#{bin}" - end - - test do - port = free_port - begin - server = TCPServer.new(port) - accept_pid = fork do - msg = server.accept.gets - assert_match "SSH", msg - end - hss_read, hss_write = IO.pipe - hss_pid = fork do - exec "#{bin}/hss", "-H", "-p #{port} 127.0.0.1", "-u", "root", "true", - :out => hss_write - end - server.close - msg = hss_read.gets - assert_match "Connection closed by remote host", msg - ensure - Process.kill("TERM", accept_pid) - Process.kill("TERM", hss_pid) - end - end -end diff --git a/Formula/hstr.rb b/Formula/hstr.rb deleted file mode 100644 index fc6e78b34969f..0000000000000 --- a/Formula/hstr.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Hstr < Formula - desc "Bash and zsh history suggest box" - homepage "https://github.com/dvorka/hstr" - url "https://github.com/dvorka/hstr/archive/2.2.tar.gz" - sha256 "886531ca9d8d1a5a93a3db96e9fc64154a03f6de428c74c722b41057bceca266" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "5b3c9395c5d63b3a75bad4ef78ec8eb7d1e359fd72904feab750bf9d162f44ec" => :catalina - sha256 "99916c805fb5e557e366c1c0cff89d160148607f0a401084fd555c4ba6619c4d" => :mojave - sha256 "a8477c9cd9c66f9d9045328615941f0d1366441cf282c2011f71c4f7061302ba" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "readline" - - def install - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - ENV["HISTFILE"] = testpath/".hh_test" - (testpath/".hh_test").write("test\n") - assert_equal "test", shell_output("#{bin}/hh -n").chomp - end -end diff --git a/Formula/ht.rb b/Formula/ht.rb deleted file mode 100644 index 86ca372da2bd5..0000000000000 --- a/Formula/ht.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Ht < Formula - desc "Viewer/editor/analyzer for executables" - homepage "https://hte.sourceforge.io/" - url "https://downloads.sourceforge.net/project/hte/ht-source/ht-2.1.0.tar.bz2" - sha256 "31f5e8e2ca7f85d40bb18ef518bf1a105a6f602918a0755bc649f3f407b75d70" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "330aeebfe496dbe213285aed3ab6d2dfad6a709f86b43ac8ad8a33798b08c2fe" => :catalina - sha256 "0669645033eb4eeecad54df5e43bc733ce4cc527fa52f2277c002296b2207753" => :mojave - sha256 "8c604066c63fa1eba3bb547626bbc280ea4446bb2961cb54e8b4fc7b829af5c4" => :high_sierra - sha256 "197a62339202dd45529bbf42b67addc35939dbae43cc9704ff15d75e5ad62d01" => :sierra - sha256 "4556713b40bfd3846c7c03a02c174bff2a771fba4084721b6faed88437c3c1a2" => :el_capitan - end - - depends_on "lzo" - - uses_from_macos "ncurses" - - def install - # Fix compilation with Xcode 9 - # https://github.com/sebastianbiallas/ht/pull/18 - inreplace "htapp.cc", "(abs(a - b) > 1)", "(abs((int)a - (int)b))" - - chmod 0755, "./install-sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-x11-textmode" - system "make", "install" - end - - test do - assert_match "ht #{version}", shell_output("#{bin}/ht -v") - end -end diff --git a/Formula/html-xml-utils.rb b/Formula/html-xml-utils.rb deleted file mode 100644 index e4e7edb099547..0000000000000 --- a/Formula/html-xml-utils.rb +++ /dev/null @@ -1,25 +0,0 @@ -class HtmlXmlUtils < Formula - desc "Tools for manipulating HTML and XML files" - homepage "https://www.w3.org/Tools/HTML-XML-utils/" - url "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-7.8.tar.gz" - sha256 "9ab41c9277efc699603d062c10740c6e528fdb9ac35014db4e07f16ad8700d5d" - - bottle do - cellar :any_skip_relocation - sha256 "28e913a33a61be2662a9aeedb18afd3e61f7ff31f533221e2382fc16845984a2" => :catalina - sha256 "8e290495b957bc609598e4a2e6fb26512011e0c433a5058d807d86e406a406ab" => :mojave - sha256 "2aa00ada9b366c012d149ff28c99d0054a7b166d2088700482e6118e16580358" => :high_sierra - end - - def install - ENV.append "CFLAGS", "-std=gnu89" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - ENV.deparallelize # install is not thread-safe - system "make", "install" - end - - test do - assert_equal "你好", pipe_output("#{bin}/xml2asc", "你好") - end -end diff --git a/Formula/html2text.rb b/Formula/html2text.rb deleted file mode 100644 index 3b52bef9ea34b..0000000000000 --- a/Formula/html2text.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Html2text < Formula - desc "Advanced HTML-to-text converter" - homepage "http://www.mbayer.de/html2text/" - url "https://github.com/grobian/html2text/archive/v2.0.0.tar.gz" - sha256 "061125bfac658c6d89fa55e9519d90c5eeb3ba97b2105748ee62f3a3fa2449de" - license "GPL-2.0" - head "https://github.com/grobian/html2text.git" - - bottle do - cellar :any_skip_relocation - sha256 "567d2c7e25a24c445ad54074e9ff3ee6edfce3fe7fe960966dcd49a488b2affb" => :catalina - sha256 "55a8fe864bc8e05e7e2fa0085e22adb251fdeeee3fd463e326224a3dff78c773" => :mojave - sha256 "b0c913f98f9169669395d57c28c45d7d6c1dc68c13fdb82ba52a04fefdb00bc5" => :high_sierra - end - - def install - ENV.cxx11 - - system "./configure", "--disable-dependency-tracking", - "--disable-debug", - "--prefix=#{prefix}" - system "make", "all" - - bin.install "html2text" - man1.install "html2text.1" - man5.install "html2textrc.5" - end - - test do - path = testpath/"index.html" - path.write <<~EOS - - - Home -

Hello World

- - EOS - - output = `#{bin}/html2text #{path}`.strip - assert_equal "Hello World", output - assert_equal 0, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/htmlcleaner.rb b/Formula/htmlcleaner.rb deleted file mode 100644 index caab8b950b44a..0000000000000 --- a/Formula/htmlcleaner.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Htmlcleaner < Formula - desc "HTML parser written in Java" - homepage "https://htmlcleaner.sourceforge.io/" - url "https://downloads.sourceforge.net/project/htmlcleaner/htmlcleaner/htmlcleaner%20v2.24/htmlcleaner-2.24-src.zip" - sha256 "ee476c1f31eabcbd56c174ec482910e1b19907ad3e57dff9a4d0a2f456c9cd42" - - bottle do - cellar :any_skip_relocation - sha256 "5a7e7c9daa84d81c700790660a2d43400bfab987aae3aa95eb244d36e500961b" => :catalina - sha256 "32204eab6692433aa9901a20781d15b99a494a25d99dd22357944f4297e77ef0" => :mojave - sha256 "70e509e98f352819e0dc4bdbe125f74ffcc4e80f660515f4cb59e3cdbaa3f273" => :high_sierra - end - - depends_on "maven" => :build - depends_on :java => "1.8" - - def install - cmd = Language::Java.java_home_cmd("1.8") - ENV["JAVA_HOME"] = Utils.safe_popen_read(cmd).chomp - - system "mvn", "--log-file", "build-output.log", "clean", "package" - libexec.install Dir["target/htmlcleaner-*.jar"] - - (bin/"htmlcleaner").write <<~EOS - #!/bin/bash - export JAVA_HOME=$(#{cmd}) - exec java -jar #{libexec}/htmlcleaner-#{version}.jar "$@" - EOS - end - - test do - path = testpath/"index.html" - path.write "" - assert_match "", shell_output("#{bin}/htmlcleaner src=#{path}") - end -end diff --git a/Formula/htmlcxx.rb b/Formula/htmlcxx.rb deleted file mode 100644 index 572d6e3fc9914..0000000000000 --- a/Formula/htmlcxx.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Htmlcxx < Formula - desc "Non-validating CSS1 and HTML parser for C++" - homepage "https://htmlcxx.sourceforge.io/" - url "https://downloads.sourceforge.net/project/htmlcxx/v0.87/htmlcxx-0.87.tar.gz" - sha256 "5d38f938cf4df9a298a5346af27195fffabfef9f460fc2a02233cbcfa8fc75c8" - - bottle do - sha256 "8414d919ae850983832803af525e8b98d3e5aa106c47b05f420d77020c7c99ca" => :catalina - sha256 "e910595c43c028e25e0e0a44203e3c95b229162ea89678721b4a7f6e22974aca" => :mojave - sha256 "062a4b1629ab6f28e59ef0ea15c257c8bfd9e3646f3342fbfe14268727be7649" => :high_sierra - sha256 "4407cb1a50e8d629db9b93bdbbbf2a0892967611f7e579c49c0d084769f8a5ca" => :sierra - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal version.to_s, shell_output("#{bin}/htmlcxx -V 2>&1").chomp - end -end diff --git a/Formula/htmldoc.rb b/Formula/htmldoc.rb deleted file mode 100644 index 7551d4069ec2f..0000000000000 --- a/Formula/htmldoc.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Htmldoc < Formula - desc "Convert HTML to PDF or PostScript" - homepage "https://www.msweet.org/htmldoc/" - url "https://github.com/michaelrsweet/htmldoc/archive/v1.9.9.tar.gz" - sha256 "59c699f7ae9f6e9a291e28870f93a824cf5ecf7b3ea6634773cc5a7f9ccd1000" - license "GPL-2.0" - head "https://github.com/michaelrsweet/htmldoc.git" - - bottle do - sha256 "f79c834310ae1d6b00c91f3ad8fe52a74e24c99c034f858df603e38be03f04d6" => :catalina - sha256 "4a836bef89bfad7066df20527ed7b1ff59bc82738d13fdb6e5220bdb9e64b3c1" => :mojave - sha256 "0e2d12668674dce9db320db8feb3468f897af6551f94ddf0e12231b8ecceb398" => :high_sierra - end - - depends_on "jpeg" - depends_on "libpng" - - def install - system "./configure", "--disable-debug", - "--disable-ssl", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/htmldoc", "--version" - end -end diff --git a/Formula/htop.rb b/Formula/htop.rb deleted file mode 100644 index 5acfe69ab90c9..0000000000000 --- a/Formula/htop.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Htop < Formula - desc "Improved top (interactive process viewer)" - homepage "https://hisham.hm/htop/" - url "https://hisham.hm/htop/releases/2.2.0/htop-2.2.0.tar.gz" - sha256 "d9d6826f10ce3887950d709b53ee1d8c1849a70fa38e91d5896ad8cbc6ba3c57" - license "GPL-2.0" - revision 1 - - bottle do - cellar :any - sha256 "c06ff60960f64f5c8395f53d7419cbcce2a22ee87f0cb0138352c8a88111d21c" => :catalina - sha256 "77aa302765353b4085dcad52356d3264183e06310dda8d5bac64642299ea2902" => :mojave - sha256 "0ebfb655b91566ba31f8effc94d642a43305ff95bdc9b30b46fadc132e2ced0c" => :high_sierra - sha256 "ed93b86f011de155c5d261b8c9cc9cb81fd0017667bf3ebe26ee090716bcd650" => :sierra - end - - head do - url "https://github.com/hishamhm/htop.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "ncurses" # enables mouse scroll - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - def caveats - <<~EOS - htop requires root privileges to correctly display all running processes, - so you will need to run `sudo htop`. - You should be certain that you trust any software you grant root privileges. - EOS - end - - test do - pipe_output("#{bin}/htop", "q", 0) - end -end diff --git a/Formula/htpdate.rb b/Formula/htpdate.rb deleted file mode 100644 index 3e53ec694ada3..0000000000000 --- a/Formula/htpdate.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Htpdate < Formula - desc "Synchronize time with remote web servers" - homepage "http://www.vervest.org/htp/" - url "http://www.vervest.org/htp/archive/c/htpdate-1.2.2.tar.xz" - sha256 "5f1f959877852abb3153fa407e8532161a7abe916aa635796ef93f8e4119f955" - - bottle do - cellar :any_skip_relocation - sha256 "ed41231b1e7d1760603e39f3e161be7cf817abc978f70c0dcbaec3bb206d9d8d" => :catalina - sha256 "4da5825b9f51a83c7de24d289719f0d341b79685a7e1580f2de867e53941934a" => :mojave - sha256 "437b8823d451f79f1ad8e2420387a3f50c3dc5919ef19717d41c437a88b77247" => :high_sierra - end - - depends_on :macos => :high_sierra # needs - - def install - system "make", "prefix=#{prefix}", - "STRIP=/usr/bin/strip", - "CC=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}", - "install" - end - - test do - system "#{bin}/htpdate", "-q", "-d", "-u", ENV["USER"], "example.org" - end -end diff --git a/Formula/htslib.rb b/Formula/htslib.rb deleted file mode 100644 index 6e88baeed81ad..0000000000000 --- a/Formula/htslib.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Htslib < Formula - desc "C library for high-throughput sequencing data formats" - homepage "https://www.htslib.org/" - url "https://github.com/samtools/htslib/releases/download/1.10.2/htslib-1.10.2.tar.bz2" - sha256 "e3b543de2f71723830a1e0472cf5489ec27d0fbeb46b1103e14a11b7177d1939" - - bottle do - cellar :any - sha256 "4db003ad760c84dbe70dfcd866a32066a4d93980eab12526f69f53e0052d84a6" => :catalina - sha256 "b4282ee3f330a894e68a0141b13b7fc1327d92a5319a95f5a8107a401e57ece5" => :mojave - sha256 "507db470fc6cb7d97b06f0efff270fe2063d25143bdc09623135c4876474b3c3" => :high_sierra - end - - depends_on "xz" - - uses_from_macos "bzip2" - uses_from_macos "curl" - uses_from_macos "zlib" - - def install - system "./configure", "--prefix=#{prefix}", "--enable-libcurl" - system "make", "install" - pkgshare.install "test" - end - - test do - sam = pkgshare/"test/ce#1.sam" - assert_match "SAM", shell_output("#{bin}/htsfile #{sam}") - system "#{bin}/bgzip -c #{sam} > sam.gz" - assert_predicate testpath/"sam.gz", :exist? - system "#{bin}/tabix", "-p", "sam", "sam.gz" - assert_predicate testpath/"sam.gz.tbi", :exist? - end -end diff --git a/Formula/http-parser.rb b/Formula/http-parser.rb deleted file mode 100644 index 5338047812434..0000000000000 --- a/Formula/http-parser.rb +++ /dev/null @@ -1,28 +0,0 @@ -class HttpParser < Formula - desc "HTTP request/response parser for c" - homepage "https://github.com/nodejs/http-parser" - url "https://github.com/nodejs/http-parser/archive/v2.9.4.tar.gz" - sha256 "467b9e30fd0979ee301065e70f637d525c28193449e1b13fbcb1b1fab3ad224f" - license "MIT" - - bottle do - cellar :any - sha256 "f03615a5ecb9e65d4bd7b302a8429ba9130012b092f3f42e0afd85df2bf47453" => :catalina - sha256 "b36ae811b2b72823cea4c7ab445ee2a5f628255aa169f0bc453fda1d3d520fbb" => :mojave - sha256 "0c6b69289fa4a8dd7ad532fcefb0848af229dcb5a64df981c03e99af2ce3acd8" => :high_sierra - end - - depends_on "coreutils" => :build - - def install - system "make", "install", "PREFIX=#{prefix}", "INSTALL=ginstall" - pkgshare.install "test.c" - end - - test do - # Set HTTP_PARSER_STRICT=0 to bypass "tab in URL" test on macOS - system ENV.cc, pkgshare/"test.c", "-o", "test", "-L#{lib}", "-lhttp_parser", - "-DHTTP_PARSER_STRICT=0" - system "./test" - end -end diff --git a/Formula/http-server.rb b/Formula/http-server.rb deleted file mode 100644 index 41923501e6c0e..0000000000000 --- a/Formula/http-server.rb +++ /dev/null @@ -1,37 +0,0 @@ -require "language/node" - -class HttpServer < Formula - desc "Simple zero-configuration command-line HTTP server" - homepage "https://github.com/http-party/http-server" - url "https://registry.npmjs.org/http-server/-/http-server-0.12.3.tgz" - sha256 "7a4f4c768bedbdfd72de849efcbf65a437000004f5cabf958bc2d73caa1a1623" - license "MIT" - head "https://github.com/http-party/http-server.git" - - bottle do - cellar :any_skip_relocation - sha256 "11f0b3f7fc0975e2eb7c911fe1555c13527f75ea5468215e6d6340e11bf36f33" => :catalina - sha256 "fcc2086b4000cc47077413c116c09ee4b60fe9b064f7d95ff7c19c966a181d4f" => :mojave - sha256 "1b3f5212bc710e5ae053bbd9fb3bd279d763ad03e6c550425ab95534e309a9ef" => :high_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 - port = free_port - - pid = fork do - exec "#{bin}/http-server", "-p#{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/http_load.rb b/Formula/http_load.rb deleted file mode 100644 index 7f06065e416df..0000000000000 --- a/Formula/http_load.rb +++ /dev/null @@ -1,39 +0,0 @@ -class HttpLoad < Formula - desc "Test throughput of a web server by running parallel fetches" - homepage "https://www.acme.com/software/http_load/" - url "https://www.acme.com/software/http_load/http_load-09Mar2016.tar.gz" - version "20160309" - sha256 "5a7b00688680e3fca8726dc836fd3f94f403fde831c71d73d9a1537f215b4587" - revision 2 - - bottle do - cellar :any - sha256 "36fada1e1b8cbe35a9eb1fb2374c175a003d750f0560565c6bfaf6b90a17f748" => :catalina - sha256 "d0d672723564b758fc3ef0721239e108ec063a395e183db033071200d5d9ee48" => :mojave - sha256 "22e21275c49121c174024104f9b99c5f55d37e032ff7cae42bba89746c26bd88" => :high_sierra - sha256 "a949ed2040faf49c7cdb6bf0110dfbbff465641c811e78a035998a4160170a05" => :sierra - end - - depends_on "openssl@1.1" - - def install - bin.mkpath - man1.mkpath - - args = %W[ - BINDIR=#{bin} - LIBDIR=#{lib} - MANDIR=#{man1} - CC=#{ENV.cc} - SSL_TREE=#{Formula["openssl@1.1"].opt_prefix} - ] - - inreplace "Makefile", "#SSL_", "SSL_" - system "make", "install", *args - end - - test do - (testpath/"urls").write "https://brew.sh/" - system "#{bin}/http_load", "-rate", "1", "-fetches", "1", "urls" - end -end diff --git a/Formula/httpd.rb b/Formula/httpd.rb deleted file mode 100644 index 24215064ecb54..0000000000000 --- a/Formula/httpd.rb +++ /dev/null @@ -1,181 +0,0 @@ -class Httpd < Formula - desc "Apache HTTP server" - homepage "https://httpd.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=httpd/httpd-2.4.43.tar.bz2" - mirror "https://archive.apache.org/dist/httpd/httpd-2.4.43.tar.bz2" - sha256 "a497652ab3fc81318cdc2a203090a999150d86461acff97c1065dc910fe10f43" - license "Apache-2.0" - - bottle do - sha256 "016ec294067375e0a0080d1c06812e4323b9d834452e937057e3c84387c44f02" => :catalina - sha256 "628617d2cc60534dc6cb78cc971de32b9724757498f194dc900ad5e5d1e6f56a" => :mojave - sha256 "71ab239430eb1709ff16ecc0a991e6e10f8bdd320889515f5ba88cf018f91255" => :high_sierra - end - - depends_on "apr" - depends_on "apr-util" - depends_on "brotli" - depends_on "nghttp2" - depends_on "openssl@1.1" - depends_on "pcre" - - uses_from_macos "zlib" - - def install - # fixup prefix references in favour of opt_prefix references - inreplace "Makefile.in", - '#@@ServerRoot@@#$(prefix)#', '#@@ServerRoot@@'"##{opt_prefix}#" - inreplace "docs/conf/extra/httpd-autoindex.conf.in", - "@exp_iconsdir@", "#{opt_pkgshare}/icons" - inreplace "docs/conf/extra/httpd-multilang-errordoc.conf.in", - "@exp_errordir@", "#{opt_pkgshare}/error" - - # fix default user/group when running as root - inreplace "docs/conf/httpd.conf.in", /(User|Group) daemon/, "\\1 _www" - - # use Slackware-FHS layout as it's closest to what we want. - # these values cannot be passed directly to configure, unfortunately. - inreplace "config.layout" do |s| - s.gsub! "${datadir}/htdocs", "${datadir}" - s.gsub! "${htdocsdir}/manual", "#{pkgshare}/manual" - s.gsub! "${datadir}/error", "#{pkgshare}/error" - s.gsub! "${datadir}/icons", "#{pkgshare}/icons" - end - - system "./configure", "--enable-layout=Slackware-FHS", - "--prefix=#{prefix}", - "--sbindir=#{bin}", - "--mandir=#{man}", - "--sysconfdir=#{etc}/httpd", - "--datadir=#{var}/www", - "--localstatedir=#{var}", - "--enable-mpms-shared=all", - "--enable-mods-shared=all", - "--enable-authnz-fcgi", - "--enable-cgi", - "--enable-pie", - "--enable-suexec", - "--with-suexec-bin=#{opt_bin}/suexec", - "--with-suexec-caller=_www", - "--with-port=8080", - "--with-sslport=8443", - "--with-apr=#{Formula["apr"].opt_prefix}", - "--with-apr-util=#{Formula["apr-util"].opt_prefix}", - "--with-brotli=#{Formula["brotli"].opt_prefix}", - "--with-libxml2=#{MacOS.sdk_path_if_needed}/usr", - "--with-mpm=prefork", - "--with-nghttp2=#{Formula["nghttp2"].opt_prefix}", - "--with-ssl=#{Formula["openssl@1.1"].opt_prefix}", - "--with-pcre=#{Formula["pcre"].opt_prefix}", - "--with-z=#{MacOS.sdk_path_if_needed}/usr", - "--disable-lua", - "--disable-luajit" - system "make" - system "make", "install" - - # suexec does not install without root - bin.install "support/suexec" - - # remove non-executable files in bin dir (for brew audit) - rm bin/"envvars" - rm bin/"envvars-std" - - # avoid using Cellar paths - inreplace %W[ - #{include}/httpd/ap_config_layout.h - #{lib}/httpd/build/config_vars.mk - ] do |s| - s.gsub! "#{lib}/httpd/modules", "#{HOMEBREW_PREFIX}/lib/httpd/modules" - end - - inreplace %W[ - #{bin}/apachectl - #{bin}/apxs - #{include}/httpd/ap_config_auto.h - #{include}/httpd/ap_config_layout.h - #{lib}/httpd/build/config_vars.mk - #{lib}/httpd/build/config.nice - ] do |s| - s.gsub! prefix, opt_prefix - end - - inreplace "#{lib}/httpd/build/config_vars.mk" do |s| - pcre = Formula["pcre"] - s.gsub! pcre.prefix.realpath, pcre.opt_prefix - s.gsub! "${prefix}/lib/httpd/modules", - "#{HOMEBREW_PREFIX}/lib/httpd/modules" - end - end - - def post_install - (var/"cache/httpd").mkpath - (var/"www").mkpath - end - - def caveats - <<~EOS - DocumentRoot is #{var}/www. - - The default ports have been set in #{etc}/httpd/httpd.conf to 8080 and in - #{etc}/httpd/extra/httpd-ssl.conf to 8443 so that httpd can run without sudo. - EOS - end - - plist_options :manual => "apachectl start" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/httpd - -D - FOREGROUND - - RunAtLoad - - - - EOS - end - - test do - # Ensure modules depending on zlib and xml2 have been compiled - assert_predicate lib/"httpd/modules/mod_deflate.so", :exist? - assert_predicate lib/"httpd/modules/mod_proxy_html.so", :exist? - assert_predicate lib/"httpd/modules/mod_xml2enc.so", :exist? - - begin - port = free_port - - expected_output = "Hello world!" - (testpath/"index.html").write expected_output - (testpath/"httpd.conf").write <<~EOS - Listen #{port} - ServerName localhost:#{port} - DocumentRoot "#{testpath}" - ErrorLog "#{testpath}/httpd-error.log" - 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 - LoadModule mpm_prefork_module #{lib}/httpd/modules/mod_mpm_prefork.so - EOS - - pid = fork do - exec bin/"httpd", "-X", "-f", "#{testpath}/httpd.conf" - end - sleep 3 - - assert_match expected_output, shell_output("curl -s 127.0.0.1:#{port}") - ensure - Process.kill("TERM", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/httpdiff.rb b/Formula/httpdiff.rb deleted file mode 100644 index c0f35a0f788da..0000000000000 --- a/Formula/httpdiff.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Httpdiff < Formula - desc "Compare two HTTP(S) responses" - homepage "https://github.com/jgrahamc/httpdiff" - url "https://github.com/jgrahamc/httpdiff/archive/v1.0.0.tar.gz" - sha256 "b2d3ed4c8a31c0b060c61bd504cff3b67cd23f0da8bde00acd1bfba018830f7f" - license "GPL-2.0" - head "https://github.com/jgrahamc/httpdiff.git" - - bottle do - cellar :any_skip_relocation - sha256 "5731d30f22cf63bd619c18f0f91c4547c52f2ae1b38a2cfeb0316958e93995c1" => :catalina - sha256 "6113414a69c11632f0088e478d6db0acc6b826db7937c3570e661152c58bd334" => :mojave - sha256 "1432608ef9e3ffaac9fc3c6207e63d888dd2246e1c806bc6a57cab312f944aea" => :high_sierra - sha256 "39a0d685904aba4c3e55ff22b4d231b8890c022a1eb0366dc264bbabc410a117" => :sierra - sha256 "59b46605118f8789c10facd53e9d4ce4c9f54c8de85611d423984c4316a169eb" => :el_capitan - sha256 "d5919069e31192cfd6f7d33dd4ff80d2142a8c36d23b50291e914c158d91ffac" => :yosemite - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"httpdiff" - end - - test do - system bin/"httpdiff", "https://brew.sh/", "https://brew.sh/" - end -end diff --git a/Formula/httperf.rb b/Formula/httperf.rb deleted file mode 100644 index 6182dd9a3b8b6..0000000000000 --- a/Formula/httperf.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Httperf < Formula - desc "Tool for measuring webserver performance" - homepage "https://github.com/httperf/httperf" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/httperf/httperf-0.9.0.tar.gz" - sha256 "e1a0bf56bcb746c04674c47b6cfa531fad24e45e9c6de02aea0d1c5f85a2bf1c" - license "GPL-2.0" - revision 2 - - bottle do - cellar :any - sha256 "80a2634adda8fe39ebda84ccdf6cbbb0357668da3615067b6f9714229801d085" => :catalina - sha256 "390d46278c9e7bd0f58003ba49bc1a0ab110ab24864029d6ae9fd8d3f491b57c" => :mojave - sha256 "5c049e4bfc272313e7c1051da7430bc09e712d5a70f1593c5ecf08ac94b3b238" => :high_sierra - sha256 "015d2ce99b57fa808ae284f44904ca209e11603bf66085bf64a8270c45203490" => :sierra - end - - head do - url "https://github.com/httperf/httperf.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "openssl@1.1" - - # Upstream patch for OpenSSL 1.1 compatibility - # https://github.com/httperf/httperf/pull/48 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/httperf/openssl-1.1.diff" - sha256 "69d5003f60f5e46d25813775bbf861366fb751da4e0e4d2fe7530d7bb3f3660a" - end - - def install - system "autoreconf", "-fvi" if build.head? - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - end - - test do - system "#{bin}/httperf", "--version" - end -end diff --git a/Formula/httpflow.rb b/Formula/httpflow.rb deleted file mode 100644 index ca791a9295476..0000000000000 --- a/Formula/httpflow.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Httpflow < Formula - desc "Packet capture and analysis utility similar to tcpdump for HTTP" - homepage "https://github.com/six-ddc/httpflow" - url "https://github.com/six-ddc/httpflow/archive/0.0.9.tar.gz" - sha256 "2347bd416641e165669bf1362107499d0bc4524ed9bfbb273ccd3b3dd411e89c" - license "MIT" - head "https://github.com/six-ddc/httpflow.git" - - bottle do - cellar :any - sha256 "2b7b63f5d82139b4fc017b8848e3b29608738cd510ef1350710c6224a24079a3" => :catalina - sha256 "6d911ff1c720035b0b23cf994fbbb37e7d1372dcd32eb60bc54924b78b444431" => :mojave - sha256 "cf54de7d5e6fda49966d75a0c33580bb8e64d3d0fb6c39337a03e21fb20682d5" => :high_sierra - end - - depends_on "pcre" - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}", "CXX=#{ENV.cxx}" - end - - test do - system "#{bin}/httpflow", "-h" - end -end diff --git a/Formula/httpie.rb b/Formula/httpie.rb deleted file mode 100644 index 0ba938cd1a477..0000000000000 --- a/Formula/httpie.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Httpie < Formula - include Language::Python::Virtualenv - - desc "User-friendly cURL replacement (command-line HTTP client)" - homepage "https://httpie.org/" - url "https://files.pythonhosted.org/packages/37/6c/0d050f49e3b2bac589367d0c3aee9c078e23c6914b0210ffc0117218bdaf/httpie-2.2.0.tar.gz" - sha256 "31ac28088ee6a0b6f3ba7a53379000c4d1910c1708c9ff768f84b111c14405a0" - license "BSD-3-Clause" - head "https://github.com/jakubroztocil/httpie.git" - - bottle do - cellar :any_skip_relocation - sha256 "443726f066b0dfd2b6c69fd51ab3008965d0dfae8c35346e0607d92454716b4e" => :catalina - sha256 "d0e7b6ce991c68d8a07a6387ec685cab4a912a6e9c6213f2f1b308b05b132e00" => :mojave - sha256 "e638b750ffdce34252f3f6b361f588f210aad1850de84d85c34e8f1c34cfb670" => :high_sierra - end - - depends_on "python@3.8" - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b4/19/53433f37a31543364c8676f30b291d128cdf4cd5b31b755b7890f8e89ac8/certifi-2020.4.5.2.tar.gz" - sha256 "5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "PySocks" do - url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" - sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" - end - - def install - virtualenv_install_with_resources - end - - test do - raw_url = "https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/httpie.rb" - assert_match "PYTHONPATH", shell_output("#{bin}/http --ignore-stdin #{raw_url}") - end -end diff --git a/Formula/httping.rb b/Formula/httping.rb deleted file mode 100644 index 9b11e143486fa..0000000000000 --- a/Formula/httping.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Httping < Formula - desc "Ping-like tool for HTTP requests" - homepage "https://www.vanheusden.com/httping/" - url "https://www.vanheusden.com/httping/httping-2.5.tgz" - sha256 "3e895a0a6d7bd79de25a255a1376d4da88eb09c34efdd0476ab5a907e75bfaf8" - revision 2 - head "https://github.com/flok99/httping.git" - - bottle do - cellar :any - sha256 "9432f93eec676aad685be06819da5649ec071f6542302d077ccf5d0623b9b567" => :catalina - sha256 "2314efd3b919b759290b7ead8dea99c50b11860f7aadb8fd4f9c7e0e7cc92e5e" => :mojave - sha256 "8df0f98d479c72a20ca2b353a06c9c1bf071cceed53774c737f41caf27238fc1" => :high_sierra - sha256 "9d0b6368e6fa4e2b4fb618c7ba3893a5b3b47471b366305026ee75b44d6ce91e" => :sierra - end - - depends_on "gettext" - depends_on "openssl@1.1" - - def install - # Reported upstream, see: https://github.com/Homebrew/homebrew/pull/28653 - inreplace %w[configure Makefile], "ncursesw", "ncurses" - ENV.append "LDFLAGS", "-lintl" - inreplace "Makefile", "cp nl.mo $(DESTDIR)/$(PREFIX)/share/locale/nl/LC_MESSAGES/httping.mo", "" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system bin/"httping", "-c", "2", "-g", "https://brew.sh/" - end -end diff --git a/Formula/httpry.rb b/Formula/httpry.rb deleted file mode 100644 index 29a44154b0a1a..0000000000000 --- a/Formula/httpry.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Httpry < Formula - desc "Packet sniffer for displaying and logging HTTP traffic" - homepage "https://github.com/jbittel/httpry" - url "https://github.com/jbittel/httpry/archive/httpry-0.1.8.tar.gz" - sha256 "b3bcbec3fc6b72342022e940de184729d9cdecb30aa754a2c994073447468cf0" - head "https://github.com/jbittel/httpry.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "322f399002eec5d9116942db65d231d7eed5bb1b46e9959cdb48c6eb10f41339" => :catalina - sha256 "32bdf2c6b873fc531455da9f4658746c650203a017c8b367172efde8aa93f9ba" => :mojave - sha256 "349ba4f39066cb02c151ab0f274f6bb9f4ee2cf558abdb2c5a3ecf0e563874fc" => :high_sierra - sha256 "71014794d2a136fea229dd19d6fe7dc136037c074a817d70bd7b13713653f19f" => :sierra - sha256 "56d6a77e429bf9dde3d5e5edb9959fc7ed913430236cf628e0aec6445c07c85a" => :el_capitan - sha256 "af0deb9d79e72df6369f57ed1050abeb70c62f77ab481232b556ba6da5ace66c" => :yosemite - sha256 "ec016612be65aa5761213134d211f9bee121d8904dae9b9d73ebfc37d4de3cea" => :mavericks - end - - uses_from_macos "libpcap" - - def install - system "make" - bin.install "httpry" - man1.install "httpry.1" - doc.install Dir["doc/*"] - end - - test do - system bin/"httpry", "-h" - end -end diff --git a/Formula/httpstat.rb b/Formula/httpstat.rb deleted file mode 100644 index 86e5fdb436d15..0000000000000 --- a/Formula/httpstat.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Httpstat < Formula - desc "Curl statistics made simple" - homepage "https://github.com/reorx/httpstat" - url "https://github.com/reorx/httpstat/archive/1.2.1.tar.gz" - sha256 "b670f03d38ecaae40e05cae79dfc296b567598752d5fb6ec174836a5f4d0b381" - license "MIT" - - bottle :unneeded - - def install - bin.install "httpstat.py" => "httpstat" - end - - test do - assert_match "HTTP", shell_output("#{bin}/httpstat https://github.com") - end -end diff --git a/Formula/httptunnel.rb b/Formula/httptunnel.rb deleted file mode 100644 index 674671a641d61..0000000000000 --- a/Formula/httptunnel.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Httptunnel < Formula - desc "Tunnels a data stream in HTTP requests" - homepage "https://github.com/larsbrinkhoff/httptunnel" - url "https://ftp.gnu.org/gnu/httptunnel/httptunnel-3.3.tar.gz" - mirror "https://ftpmirror.gnu.org/httptunnel/httptunnel-3.3.tar.gz" - sha256 "142f82b204876c2aa90f19193c7ff78d90bb4c2cba99dfd4ef625864aed1c556" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "992853ebe7a48e07cf6e129d68cab49aab670ce4231a4a984ded21ece64247c0" => :catalina - sha256 "b6072c89e94ba53852f28c25ec85e6bdb24e7ebbce7eee35b418c9d609e68670" => :mojave - sha256 "6012d5967ab7263658ce1da99ee7bbdd051e37243b922b0702f4279ed047c014" => :high_sierra - sha256 "64b548d12c4e3012cb9d8d9f5171e0fc47e594c13f4d4ae35c5f97be1582b263" => :sierra - sha256 "b328d4e1f1e2638764d3ac2ed32a4f4e06935e4e9ef83af281936df4ab805aa5" => :el_capitan - sha256 "54fbed6b247d143f05c50c2202b5ff447f90504553431e7a143f6178893f148c" => :yosemite - sha256 "dcec84a118e1e7246d29ccc12397b7aa0134e1a2a952aa83af7b4ba6745318ac" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - pid = fork do - exec "#{bin}/hts --stdin-stdout --pid-file #{testpath}/pid 8081" - end - sleep 2 - - begin - assert_predicate testpath/"pid", :exist? - ensure - Process.kill "SIGINT", pid - Process.wait pid - end - end -end diff --git a/Formula/httrack.rb b/Formula/httrack.rb deleted file mode 100644 index 7f16dec173f1b..0000000000000 --- a/Formula/httrack.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Httrack < Formula - desc "Website copier/offline browser" - homepage "https://www.httrack.com/" - # Always use mirror.httrack.com when you link to a new version of HTTrack, as - # link to download.httrack.com will break on next HTTrack update. - url "https://mirror.httrack.com/historical/httrack-3.49.2.tar.gz" - sha256 "3477a0e5568e241c63c9899accbfcdb6aadef2812fcce0173688567b4c7d4025" - revision 1 - - bottle do - sha256 "291ab06b376233166dd833422801d0a7be6f06cdabdc568656ec64ad3adc5fe8" => :catalina - sha256 "6e0d2265e15d103a37b6b594f7f10c85af82012f1e3c1e25fc436e7430502b2c" => :mojave - sha256 "612d8c3f9ee15fd7c4f42dbca3c5e3b58e968d626aa15f916f85c8cdb44ea31f" => :high_sierra - sha256 "842d48bdb72573623a478a97a2c2abcafe34fb4b0443229216e35d30552dd27f" => :sierra - end - - depends_on "openssl@1.1" - - def install - ENV.deparallelize - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - # Don't need Gnome integration - rm_rf Dir["#{share}/{applications,pixmaps}"] - end - - test do - download = "https://raw.githubusercontent.com/Homebrew/homebrew/65c59dedea31/.yardopts" - system bin/"httrack", download, "-O", testpath - assert_predicate testpath/"raw.githubusercontent.com", :exist? - end -end diff --git a/Formula/hub.rb b/Formula/hub.rb deleted file mode 100644 index 5905ebc0ea0af..0000000000000 --- a/Formula/hub.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Hub < Formula - desc "Add GitHub support to git on the command-line" - homepage "https://hub.github.com/" - url "https://github.com/github/hub/archive/v2.14.2.tar.gz" - sha256 "e19e0fdfd1c69c401e1c24dd2d4ecf3fd9044aa4bd3f8d6fd942ed1b2b2ad21a" - license "MIT" - head "https://github.com/github/hub.git" - - bottle do - cellar :any_skip_relocation - sha256 "fdf05855839a9d7ec6e7bee6796e3cb5fc473500cffc002366cf98c09a805b69" => :catalina - sha256 "bcbae9c683d76f3395665467ba0f0c00c60c12c84022f72faba4b8981724b563" => :mojave - sha256 "8800cda4532784bf764ea6116a06c81d8d90bb3d36d8ecf295e64f9dd647c4ad" => :high_sierra - end - - depends_on "go" => :build - - uses_from_macos "groff" => :build - uses_from_macos "ruby" => :build - - on_linux do - depends_on "util-linux" - end - - def install - system "make", "install", "prefix=#{prefix}" - - prefix.install_metafiles - - bash_completion.install "etc/hub.bash_completion.sh" - zsh_completion.install "etc/hub.zsh_completion" => "_hub" - fish_completion.install "etc/hub.fish_completion" => "hub.fish" - end - - test do - system "git", "init" - %w[haunted house].each { |f| touch testpath/f } - system "git", "add", "haunted", "house" - system "git", "commit", "-a", "-m", "Initial Commit" - assert_equal "haunted\nhouse", shell_output("#{bin}/hub ls-files").strip - end -end diff --git a/Formula/hubflow.rb b/Formula/hubflow.rb deleted file mode 100644 index 81bdcb4f37f09..0000000000000 --- a/Formula/hubflow.rb +++ /dev/null @@ -1,21 +0,0 @@ -# Note: pull from git tag to get submodules -class Hubflow < Formula - desc "GitFlow for GitHub" - homepage "https://datasift.github.io/gitflow/" - url "https://github.com/datasift/gitflow.git", - :tag => "1.5.3", - :revision => "ed032438d2100b826d2fd5c8281b5e07d88ab9eb" - head "https://github.com/datasift/gitflow.git" - - bottle :unneeded - - def install - ENV["INSTALL_INTO"] = libexec - system "./install.sh", "install" - bin.write_exec_script libexec/"git-hf" - end - - test do - system bin/"git-hf", "version" - end -end diff --git a/Formula/huexpress.rb b/Formula/huexpress.rb deleted file mode 100644 index 70105264d32f9..0000000000000 --- a/Formula/huexpress.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Huexpress < Formula - desc "PC Engine emulator" - homepage "https://github.com/kallisti5/huexpress" - url "https://github.com/kallisti5/huexpress/archive/3.0.4.tar.gz" - sha256 "76589f02d1640fc5063d48a47f017077c6b7557431221defe9e38679d86d4db8" - revision 1 - head "https://github.com/kallisti5/huexpress.git" - - bottle do - cellar :any - rebuild 1 - sha256 "a17fe6ae136f94e859edbe7d65fc15466645c1d569fdbf363c841ec85477fa1d" => :catalina - sha256 "f395a18b662d16c84b18e4594f67516a43e7a692879d68289c08ee652cedc651" => :mojave - sha256 "53eec3fc474a553bdd70ad1c8dcb63714db5d059839748dcbc80b86380c81d4c" => :high_sierra - sha256 "31ffed8cb0c04131abefe50aa06aa8154e3cf8e49fa24ebe5f4e6d456f6b3d9b" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "scons" => :build - depends_on "libvorbis" - depends_on "libzip" - depends_on "sdl2" - depends_on "sdl2_mixer" - - def install - system "scons" - bin.install ["src/huexpress", "src/hucrc"] - end - - test do - assert_match /Version #{version}$/, shell_output("#{bin}/huexpress -h", 1) - end -end diff --git a/Formula/hugo.rb b/Formula/hugo.rb deleted file mode 100644 index 2ac317b9709d7..0000000000000 --- a/Formula/hugo.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Hugo < Formula - desc "Configurable static site generator" - homepage "https://gohugo.io/" - url "https://github.com/gohugoio/hugo/archive/v0.73.0.tar.gz" - sha256 "36e106c96b6c66bd558759a069b227f797a996235a39bb6fa0397fa32eb8434a" - license "Apache-2.0" - head "https://github.com/gohugoio/hugo.git" - - bottle do - cellar :any_skip_relocation - sha256 "173fee6f7220cdd918bafc73a89437ba4773fd1feef0834fdaa959ff2767382e" => :catalina - sha256 "ffdb7c0c2612cff9551889405bb9d8ccd2de37516957ee7ca5e78af03ac9f315" => :mojave - sha256 "0659e118aa3816c8c9c19c7399f3178f6557217f2d507f4e73f73907e045f244" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - (buildpath/"src/github.com/gohugoio/hugo").install buildpath.children - - cd "src/github.com/gohugoio/hugo" do - system "go", "build", "-o", bin/"hugo", "-tags", "extended", "main.go" - - # Build bash completion - system bin/"hugo", "gen", "autocomplete", "--completionfile=hugo.sh" - bash_completion.install "hugo.sh" - - # Build man pages; target dir man/ is hardcoded :( - (Pathname.pwd/"man").mkpath - system bin/"hugo", "gen", "man" - man1.install Dir["man/*.1"] - - prefix.install_metafiles - end - end - - test do - site = testpath/"hops-yeast-malt-water" - system "#{bin}/hugo", "new", "site", site - assert_predicate testpath/"#{site}/config.toml", :exist? - end -end diff --git a/Formula/hunspell.rb b/Formula/hunspell.rb deleted file mode 100644 index 961f10475c07a..0000000000000 --- a/Formula/hunspell.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Hunspell < Formula - desc "Spell checker and morphological analyzer" - homepage "https://hunspell.github.io/" - url "https://github.com/hunspell/hunspell/archive/v1.7.0.tar.gz" - sha256 "bb27b86eb910a8285407cf3ca33b62643a02798cf2eef468c0a74f6c3ee6bc8a" - revision 2 - - bottle do - cellar :any - sha256 "3b7a02908774fa50dafee913969963ce223a09de100b62269fdb0fd71cd09115" => :catalina - sha256 "30927ed74597ba96c52ec0c1e9380aaaadee2adadf2e17414e1b494bfd8066b3" => :mojave - sha256 "4ada0a39e041b9e6676b4cd68e95c6523725043088f3555d1cac1216c8f91944" => :high_sierra - sha256 "65b1d0fc54a0de1fc7e8520aaee4dbe192a2f441757002c7b305b0fb93e3e341" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "gettext" - depends_on "readline" - - conflicts_with "freeling", :because => "both install 'analyze' binary" - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-ui", - "--with-readline" - system "make" - system "make", "check" - system "make", "install" - - pkgshare.install "tests" - end - - def caveats - <<~EOS - Dictionary files (*.aff and *.dic) should be placed in - ~/Library/Spelling/ or /Library/Spelling/. Homebrew itself - provides no dictionaries for Hunspell, but you can download - compatible dictionaries from other sources, such as - https://wiki.openoffice.org/wiki/Dictionaries . - EOS - end - - test do - system bin/"hunspell", "--help" - end -end diff --git a/Formula/hwloc.rb b/Formula/hwloc.rb deleted file mode 100644 index 39c27bbe25483..0000000000000 --- a/Formula/hwloc.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Hwloc < Formula - desc "Portable abstraction of the hierarchical topology of modern architectures" - homepage "https://www.open-mpi.org/projects/hwloc/" - url "https://www.open-mpi.org/software/hwloc/v2.2/downloads/hwloc-2.2.0.tar.bz2" - sha256 "ae70b893df272b84afd7068d351aae5c8c4fd79d40ca783b3e67554b873a2252" - - bottle do - cellar :any - sha256 "dd1fcb52fa8c513dc264d359d2b71c847dfbc9c65d817ddc4254d2af97cf6e60" => :catalina - sha256 "06104c9e69d96e85f4c914ef6bcae0a3275a0910a6a592b9d6ba1b20d2ad6301" => :mojave - sha256 "05558ada03d18ac4e4a232ead53eb9f59ac5889a899dce4670cc3fe273438d10" => :high_sierra - end - - head do - url "https://github.com/open-mpi/hwloc.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - - uses_from_macos "libxml2" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--enable-shared", - "--enable-static", - "--prefix=#{prefix}", - "--without-x" - system "make", "install" - - pkgshare.install "tests" - end - - test do - system ENV.cc, pkgshare/"tests/hwloc/hwloc_groups.c", "-I#{include}", - "-L#{lib}", "-lhwloc", "-o", "test" - system "./test" - end -end diff --git a/Formula/hydra.rb b/Formula/hydra.rb deleted file mode 100644 index f427de67d4d10..0000000000000 --- a/Formula/hydra.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Hydra < Formula - desc "Network logon cracker which supports many services" - homepage "https://github.com/vanhauser-thc/thc-hydra" - url "https://github.com/vanhauser-thc/thc-hydra/archive/v9.0.tar.gz" - sha256 "56672e253c128abaa6fb19e77f6f59ba6a93762a9ba435505a009ef6d58e8d0e" - revision 4 - head "https://github.com/vanhauser-thc/thc-hydra.git" - - bottle do - cellar :any - sha256 "c45914c437ca6bf8b969a88da0249b24045a713c3ef1f5c8d66c67cafd2505f8" => :catalina - sha256 "72663c807cdbc3f18e0f0f69c2139e75a7bc11b73138aba9b58d3c75061bdd23" => :mojave - sha256 "61c6734cca2ae64fa62747afd14eb05bd869bf521fee854079aff6861ac38992" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libssh" - depends_on "mysql-client" - depends_on "openssl@1.1" - - def install - inreplace "configure" do |s| - # Link against our OpenSSL - # https://github.com/vanhauser-thc/thc-hydra/issues/80 - s.gsub! "/opt/local/lib", Formula["openssl@1.1"].opt_lib - s.gsub! "/opt/local/*ssl", Formula["openssl@1.1"].opt_lib - s.gsub! "/opt/*ssl/include", Formula["openssl@1.1"].opt_include - # Avoid opportunistic linking of everything - %w[ - gtk+-2.0 - libfreerdp2 - libgcrypt - libidn - libmemcached - libmongoc - libpq - libsvn - ].each do |lib| - s.gsub! lib, "oh_no_you_dont" - end - end - - # Having our gcc in the PATH first can cause issues. Monitor this. - # https://github.com/vanhauser-thc/thc-hydra/issues/22 - system "./configure", "--prefix=#{prefix}" - bin.mkpath - system "make", "all", "install" - share.install prefix/"man" # Put man pages in correct place - end - - test do - assert_match version.to_s, shell_output("#{bin}/hydra", 255) - end -end diff --git a/Formula/hyperestraier.rb b/Formula/hyperestraier.rb deleted file mode 100644 index ef4f20fd4374d..0000000000000 --- a/Formula/hyperestraier.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Hyperestraier < Formula - desc "Full-text search system for communities" - homepage "https://fallabs.com/hyperestraier/" - url "https://fallabs.com/hyperestraier/hyperestraier-1.4.13.tar.gz" - sha256 "496f21190fa0e0d8c29da4fd22cf5a2ce0c4a1d0bd34ef70f9ec66ff5fbf63e2" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "0304cb2db3ed4e35c12ccaac0251ea19f7fd4c0f2a5b9f3ffad0f201f7f4357c" => :catalina - sha256 "4275d3ad552f225c5b686532d6cc2703481284fa73eaf3c5b35bc5551dc95761" => :mojave - sha256 "f0eeb8e60dc0639fdbf5c15fc22c954a627b5136525021706876972b5bfdd816" => :high_sierra - sha256 "c6018d888e9a4f03546f1727d9ec7b6d7eb6a87fc4f6755667bdafa71929aca7" => :sierra - sha256 "c90ef2d3ccac1af3247726697be33748ec53df85a98af4611b6dbfc9a8dca0c7" => :el_capitan - sha256 "d18c19a9d691e2bd209cc05006b608776066352d297865238cc7262a527a82bd" => :yosemite - sha256 "b52c716897730a939ba7763492b7b1080a70c918b07571f4a4e296aea42f42ee" => :mavericks - end - - depends_on "qdbm" - - def install - system "./configure", "--disable-debug", "--prefix=#{prefix}", - "--disable-dependency-tracking" - system "make", "mac" - system "make", "check-mac" - system "make", "install-mac" - end - - test do - system "#{bin}/estcmd", "version" - end -end diff --git a/Formula/hyperfine.rb b/Formula/hyperfine.rb deleted file mode 100644 index 557121c340a2d..0000000000000 --- a/Formula/hyperfine.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Hyperfine < Formula - desc "Command-line benchmarking tool" - homepage "https://github.com/sharkdp/hyperfine" - url "https://github.com/sharkdp/hyperfine/archive/v1.10.0.tar.gz" - sha256 "b949d6c1a78e9c1c5a7bb6c241fcd51d6faf00bba5719cc312f57b5b301cc854" - - bottle do - cellar :any_skip_relocation - sha256 "0442a6f327081df37ce855d91fdf7bdf2136b8ef4f2039313274820936314c2f" => :catalina - sha256 "4922076ae457efd2423a728e543fc2c3546f6e035f475e2f65b2cbcb977d2d38" => :mojave - sha256 "d489a6d7cb337646e3f9954bc888cc8c6f42af5181ab6c0c4da51c65e8e5efa6" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - output = shell_output("#{bin}/hyperfine 'sleep 0.3'") - assert_match "Benchmark #1: sleep", output - end -end diff --git a/Formula/hyperkit.rb b/Formula/hyperkit.rb deleted file mode 100644 index 77191867d25b0..0000000000000 --- a/Formula/hyperkit.rb +++ /dev/null @@ -1,91 +0,0 @@ -class Hyperkit < Formula - desc "Toolkit for embedding hypervisor capabilities in your application" - homepage "https://github.com/moby/hyperkit" - url "https://github.com/moby/hyperkit/archive/v0.20200224.tar.gz" - sha256 "c0f9e0eb4cd9efdfa099a8cb5b35483b64688d6d1fc0c7a01e591abd4cf76413" - - bottle do - cellar :any_skip_relocation - sha256 "ba8679cca5d4532aa1afd0f5e6558b38f673e66c48b274dbf73228c632478c3c" => :catalina - sha256 "6e658f44e70586cd209fee359e1f303e3f4c8ed24f2ae1f53d845557fa420ee2" => :mojave - sha256 "e9d9fda51a2c05a37d0d872a80b6dbf26f56b5842c5dc03ad7be13fd1224d5c1" => :high_sierra - end - - depends_on "aspcud" => :build - depends_on "ocaml" => :build - depends_on "opam" => :build - depends_on :x11 => :build - depends_on :xcode => ["9.0", :build] - - depends_on "libev" - - resource "tinycorelinux" do - url "https://dl.bintray.com/markeissler/homebrew/hyperkit-kernel/tinycorelinux_8.x.tar.gz" - sha256 "560c1d2d3a0f12f9b1200eec57ca5c1d107cf4823d3880e09505fcd9cd39141a" - end - - def install - system "opam", "init", "--disable-sandboxing", "--no-setup" - opam_dir = "#{buildpath}/.brew_home/.opam" - ENV["CAML_LD_LIBRARY_PATH"] = "#{opam_dir}/system/lib/stublibs:#{Formula["ocaml"].opt_lib}/ocaml/stublibs" - ENV["OPAMEXTERNALSOLVER"] = "aspcud" - ENV["OPAMUTF8MSGS"] = "1" - ENV["PERL5LIB"] = "#{opam_dir}/system/lib/perl5" - ENV["OCAML_TOPLEVEL_PATH"] = "#{opam_dir}/system/lib/toplevel" - ENV.prepend_path "PATH", "#{opam_dir}/system/bin" - - ENV.deparallelize { system "opam", "switch", "create", "ocaml-base-compiler.4.07.1" } - - system "opam", "config", "exec", "--", - "opam", "install", "-y", "uri.1.9.7", "qcow.0.10.4", "conduit.1.0.0", "lwt.3.1.0", - "qcow-tool.0.10.5", "mirage-block-unix.2.9.0", "conf-libev.4-11", "logs.0.6.3", "fmt.0.8.6", - "mirage-unix.3.2.0", "prometheus-app.0.5", "cstruct-lwt.3.2.1" - - args = [] - args << "GIT_VERSION=#{version}" - system "opam", "config", "exec", "--", "make", *args - - bin.install "build/hyperkit" - man1.install "hyperkit.1" - end - - test do - assert_match(version.to_s, shell_output("#{bin}/hyperkit -v 2>&1")) - - if Hardware::CPU.features.include? :vmx - resource("tinycorelinux").stage do |context| - tmpdir = context.staging.tmpdir - path_resource_versioned = Dir.glob(tmpdir.join("tinycorelinux_[0-9]*"))[0] - cp(File.join(path_resource_versioned, "vmlinuz"), testpath) - cp(File.join(path_resource_versioned, "initrd.gz"), testpath) - end - - (testpath / "test_hyperkit.exp").write <<-EOS - #!/usr/bin/env expect -d - set KERNEL "./vmlinuz" - set KERNEL_INITRD "./initrd.gz" - set KERNEL_CMDLINE "earlyprintk=serial console=ttyS0" - set MEM {512M} - set PCI_DEV1 {0:0,hostbridge} - set PCI_DEV2 {31,lpc} - set LPC_DEV {com1,stdio} - set ACPI {-A} - spawn #{bin}/hyperkit $ACPI -m $MEM -s $PCI_DEV1 -s $PCI_DEV2 -l $LPC_DEV -f kexec,$KERNEL,$KERNEL_INITRD,$KERNEL_CMDLINE - set pid [exp_pid] - set timeout 20 - expect { - timeout { puts "FAIL boot"; exec kill -9 $pid; exit 1 } - "\\r\\ntc@box:~$ " - } - send "sudo halt\\r\\n"; - expect { - timeout { puts "FAIL shutdown"; exec kill -9 $pid; exit 1 } - "reboot: System halted" - } - expect eof - puts "\\nPASS" - EOS - system "expect", "test_hyperkit.exp" - end - end -end diff --git a/Formula/hyperscan.rb b/Formula/hyperscan.rb deleted file mode 100644 index 95c2d09407cb0..0000000000000 --- a/Formula/hyperscan.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Hyperscan < Formula - desc "High-performance regular expression matching library" - homepage "https://www.hyperscan.io/" - url "https://github.com/intel/hyperscan/archive/v5.3.0.tar.gz" - sha256 "9b50e24e6fd1e357165063580c631a828157d361f2f27975c5031fc00594825b" - - bottle do - cellar :any - sha256 "a56dfd1232dd769b481e1c9e0544c84f542f82bb527e23dd27d9a7451258194d" => :catalina - sha256 "217445aaf506df06e6759c53e38fc767c337a791a16d4073cf870027a93543f3" => :mojave - sha256 "49403fbbdd395e877457945ce7f00476574befcfa07238059cfb8ee40ef8e764" => :high_sierra - end - - depends_on "boost" => :build - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "ragel" => :build - depends_on "pcre" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DBUILD_STATIC_AND_SHARED=on" - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() - { - printf("hyperscan v%s", hs_version()); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lhs", "-o", "test" - system "./test" - end -end diff --git a/Formula/hyperspec.rb b/Formula/hyperspec.rb deleted file mode 100644 index 5f0b012a69674..0000000000000 --- a/Formula/hyperspec.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Hyperspec < Formula - desc "Common Lisp ANSI-standard Hyperspec" - homepage "https://www.lispworks.com/documentation/common-lisp.html" - url "http://ftp.lispworks.com/pub/software_tools/reference/HyperSpec-7-0.tar.gz" - version "7.0" - sha256 "1ac1666a9dc697dbd8881262cad4371bcd2e9843108b643e2ea93472ba85d7c3" - - bottle :unneeded - - def install - doc.install Dir["*"] - end - - def caveats - <<~EOS - To use this copy of the HyperSpec with SLIME, put the following in - you .emacs intialization file: - - (eval-after-load "slime" - '(progn - (setq common-lisp-hyperspec-root - "#{HOMEBREW_PREFIX}/share/doc/hyperspec/HyperSpec/") - (setq common-lisp-hyperspec-symbol-table - (concat common-lisp-hyperspec-root "Data/Map_Sym.txt")) - (setq common-lisp-hyperspec-issuex-table - (concat common-lisp-hyperspec-root "Data/Map_IssX.txt")))) - - EOS - end - - test do - assert_predicate doc/"HyperSpec-README.text", :exist? - end -end diff --git a/Formula/hypre.rb b/Formula/hypre.rb deleted file mode 100644 index b46b59fa3169e..0000000000000 --- a/Formula/hypre.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Hypre < Formula - desc "Library featuring parallel multigrid methods for grid problems" - homepage "https://computation.llnl.gov/casc/hypre/software.html" - url "https://github.com/hypre-space/hypre/archive/v2.19.0.tar.gz" - sha256 "466b19d8a86c69989a237f6f03f20d35c0c63a818776d2cd071b0a084cffeba5" - head "https://github.com/hypre-space/hypre.git" - - bottle do - cellar :any_skip_relocation - sha256 "9bba59afd174afc5ebb884369445639d9aae27bf5894ecd65e8f113d33c4f89f" => :catalina - sha256 "b8e38313cbf6a6a5ca0ad3605c51f70efea2687f9d8fa299e525b927b43544be" => :mojave - sha256 "135e5998b03eb58b4f4a7363c01014a74362c93daad5b8720b9081b5a65caeb9" => :high_sierra - end - - depends_on "gcc" # for gfortran - depends_on "open-mpi" - - def install - cd "src" do - system "./configure", "--prefix=#{prefix}", - "--with-MPI", - "--enable-bigint" - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "HYPRE_struct_ls.h" - int main(int argc, char* argv[]) { - HYPRE_StructGrid grid; - } - EOS - - system ENV.cc, "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/i/i2c-tools.rb b/Formula/i/i2c-tools.rb new file mode 100644 index 0000000000000..b86f5b02e8783 --- /dev/null +++ b/Formula/i/i2c-tools.rb @@ -0,0 +1,36 @@ +class I2cTools < Formula + desc "Heterogeneous set of I2C tools for Linux" + homepage "https://i2c.wiki.kernel.org/index.php/I2C_Tools" + url "https://mirrors.edge.kernel.org/pub/software/utils/i2c-tools/i2c-tools-4.4.tar.xz" + sha256 "8b15f0a880ab87280c40cfd7235cfff28134bf14d5646c07518b1ff6642a2473" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + livecheck do + url "https://mirrors.edge.kernel.org/pub/software/utils/i2c-tools/" + regex(/href=.*?i2c-tools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "dd2a87e8ac0da6a882e8e0c117b93ea8e8932629703e372b39f6f92bf93387b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d20107422ff757ff511d2a8099bb04f96cba86e4a0a81081efe7a7c49d02b118" + end + + depends_on "python@3.13" => [:build, :test] + depends_on :linux + + def python3 + "python3.13" + end + + def install + system "make", "install", "PREFIX=#{prefix}", "EXTRA=eeprog" + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "./py-smbus" + end + + test do + system python3, "-c", "import smbus" + assert_empty shell_output("#{sbin}/i2cdetect -l 2>&1").strip + assert_match "/dev/i2c/0': No such file or directory", shell_output("#{sbin}/i2cget -y 0 0x08 2>&1", 1) + assert_match "No EEPROM found", shell_output("#{bin}/decode-dimms 2>&1") + end +end diff --git a/Formula/i/i2p.rb b/Formula/i/i2p.rb new file mode 100644 index 0000000000000..bcb50517e5681 --- /dev/null +++ b/Formula/i/i2p.rb @@ -0,0 +1,73 @@ +class I2p < Formula + desc "Anonymous overlay network - a network within a network" + homepage "https://geti2p.net/" + url "https://github.com/i2p/i2p.i2p/archive/refs/tags/i2p-2.8.2.tar.gz" + sha256 "b259b5a7d4652dc344b106d00223d1a6c53339d3a126aed2428a56806044d464" + license :cannot_represent + + livecheck do + url :stable + regex(/^i2p[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0474f0fe1bb56848164ead49ae8fc6773411c03a89deca2d2bab927818d6c3e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5dc4c1f910162f8b9ad1f918bf6e3e3b79c8a859b5c63baa2be55387acddc49a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5c2ab69384a69e6789a5d94c42e9db014a13e4246a6883fc77a71e24db197c84" + sha256 cellar: :any_skip_relocation, sonoma: "0ba3aa0abed7cf698f49358c49e17f95a1147d1016edd0fa9280b199a433fec2" + sha256 cellar: :any_skip_relocation, ventura: "883859807c878a8335a3ea00fc89fc705ca66a725ea1c87809253541398450d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "a713439beb9052582edac83adc9afb95aeb729020b7094d0a1b6146cd44cf11f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d8af5e63ed68d9755a4e29419295bba255ea6915f43393670b16ee027565d71" + end + + depends_on "ant" => :build + depends_on "gettext" => :build + depends_on "java-service-wrapper" + depends_on "openjdk" + + def install + ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix + os = OS.mac? ? "osx" : OS.kernel_name.downcase + system "ant", "preppkg-#{os}-only" + + libexec.install (buildpath/"pkg-temp").children + + # Replace vendored copy of java-service-wrapper with brewed version. + rm libexec/"lib/wrapper.jar" + rm_r(libexec/"lib/wrapper") + jsw_libexec = Formula["java-service-wrapper"].opt_libexec + ln_s jsw_libexec/"lib/wrapper.jar", libexec/"lib" + ln_s jsw_libexec/"lib/#{shared_library("libwrapper")}", libexec/"lib" + cp jsw_libexec/"bin/wrapper", libexec/"i2psvc" # Binary must be copied, not symlinked. + + # Set executable permissions on scripts + scripts = ["eepget", "i2prouter", "runplain.sh"] + scripts += ["install_i2p_service_osx.command", "uninstall_i2p_service_osx.command"] if OS.mac? + + scripts.each do |file| + chmod 0755, libexec/file + end + + # Replace references to INSTALL_PATH with libexec + install_path_files = ["eepget", "i2prouter", "runplain.sh"] + install_path_files << "Start I2P Router.app/Contents/MacOS/i2prouter" if OS.mac? + install_path_files.each do |file| + inreplace libexec/file, "%INSTALL_PATH", libexec + end + + inreplace libexec/"wrapper.config", "$INSTALL_PATH", libexec + + inreplace libexec/"i2prouter", "%USER_HOME", "$HOME" + inreplace libexec/"i2prouter", "%SYSTEM_java_io_tmpdir", "$TMPDIR" + inreplace libexec/"runplain.sh", "%SYSTEM_java_io_tmpdir", "$TMPDIR" + + # Wrap eepget and i2prouter in env scripts so they can find OpenJDK + (bin/"eepget").write_env_script libexec/"eepget", JAVA_HOME: Formula["openjdk"].opt_prefix + (bin/"i2prouter").write_env_script libexec/"i2prouter", JAVA_HOME: Formula["openjdk"].opt_prefix + man1.install Dir["#{libexec}/man/*"] + end + + test do + assert_match "I2P Service is not running.", shell_output("#{bin}/i2prouter status", 1) + end +end diff --git a/Formula/i/i2pd.rb b/Formula/i/i2pd.rb new file mode 100644 index 0000000000000..7460d3274d7b3 --- /dev/null +++ b/Formula/i/i2pd.rb @@ -0,0 +1,80 @@ +class I2pd < Formula + desc "Full-featured C++ implementation of I2P client" + homepage "https://i2pd.website/" + url "https://github.com/PurpleI2P/i2pd/archive/refs/tags/2.56.0.tar.gz" + sha256 "eb83f7e98afeb3704d9ee0da2499205f73bab0b1becaf4494ccdcbe4295f8550" + license "BSD-3-Clause" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "511fa269ce664d6f11bcf59a497bee0598c5801be4831c19a4fc9c695c071e05" + sha256 cellar: :any, arm64_sonoma: "fc44c7b9bcf177eb06fc5f2f18325015f3372d16a6dd5f5e9697c1e98c7c332c" + sha256 cellar: :any, arm64_ventura: "765fe20c75d136c406e503e0aef6225a575d27070dff1918e7cc4bec561ffb65" + sha256 cellar: :any, sonoma: "98cb30e4d9380b10b1463ce47d4823f4def228d4953811a35f0cbabfa9c5bfbb" + sha256 cellar: :any, ventura: "5f18cdf5bb827d6fab2f4ff0661f7be5a2c08086d5a8cbbb1a82c35c3f9ad958" + sha256 cellar: :any_skip_relocation, arm64_linux: "07c6f097a50e0bc19d5984b1d72ad7a5e656c1275daa8c3491b27e2d7bd5514d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e1a5462d9d85b03007dc93b0a8174fe586e56a771c86bea5bc975e3ba1701ec3" + end + + depends_on "boost" + depends_on "miniupnpc" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + args = %W[ + DEBUG=no + HOMEBREW=1 + USE_UPNP=yes + PREFIX=#{prefix} + BREWROOT=#{HOMEBREW_PREFIX} + SSLROOT=#{Formula["openssl@3"].opt_prefix} + ] + args << "USE_AESNI=no" if Hardware::CPU.arm? + + system "make", "install", *args + + # preinstall to prevent overwriting changed by user configs + confdir = etc/"i2pd" + rm_r(prefix/"etc") + confdir.install doc/"i2pd.conf", doc/"subscriptions.txt", doc/"tunnels.conf" + end + + def post_install + # i2pd uses datadir from variable below. If that path doesn't exist, + # create the directory and create symlinks to certificates and configs. + # Certificates can be updated between releases, so we must recreate symlinks + # to the latest version on upgrade. + datadir = var/"lib/i2pd" + if datadir.exist? + rm datadir/"certificates" + datadir.install_symlink pkgshare/"certificates" + else + datadir.dirname.mkpath + datadir.install_symlink pkgshare/"certificates", etc/"i2pd/i2pd.conf", + etc/"i2pd/subscriptions.txt", etc/"i2pd/tunnels.conf" + end + + (var/"log/i2pd").mkpath + end + + service do + run [opt_bin/"i2pd", "--datadir=#{var}/lib/i2pd", "--conf=#{etc}/i2pd/i2pd.conf", + "--tunconf=#{etc}/i2pd/tunnels.conf", "--log=file", "--logfile=#{var}/log/i2pd/i2pd.log", + "--pidfile=#{var}/run/i2pd.pid"] + end + + test do + pidfile = testpath/"i2pd.pid" + system bin/"i2pd", "--datadir=#{testpath}", "--pidfile=#{pidfile}", "--daemon" + sleep 5 + assert_path_exists testpath/"router.keys", "Failed to start i2pd" + pid = pidfile.read.chomp.to_i + begin + Process.kill("TERM", pid) + rescue Errno::ESRCH + # Process already terminated + end + end +end diff --git a/Formula/i/i2util.rb b/Formula/i/i2util.rb new file mode 100644 index 0000000000000..7e59ecd00c96b --- /dev/null +++ b/Formula/i/i2util.rb @@ -0,0 +1,49 @@ +class I2util < Formula + desc "Internet2 utility tools" + homepage "https://github.com/perfsonar/i2util" + url "https://github.com/perfsonar/i2util/archive/refs/tags/v5.1.4.tar.gz" + sha256 "912ff463abd70d54eb5307a90afcc33f8fc99ab77280af4f92c54e3aea6c6d50" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6cc0c4bc1018bff30946b704981b5f4121919962ede12492366c3717777cf6bc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c5d1c9bdbf91900b34bada6e9156d78591d320a8eaed4919032d5978a2ec7121" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b24f1cef4b07175a76cef6b7fe947f0d79c28da9190f1e1178774f2e0a1e0972" + sha256 cellar: :any_skip_relocation, sonoma: "befe3806ff0f7dfc7b16ad24d053b6d413f9b8707308a785ac5389a72bc138dd" + sha256 cellar: :any_skip_relocation, ventura: "6eb5a9b77aa09934bab46691646a8b9ece5052463808e090475ba5acd4b2af0d" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7d0dc0e964c27a230992004304252eddcf4eff8f50564f26b0c74296d84bd35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e6aa9300019b1866dcf826c8c62d5dbcfe47ac41b318db7c32d45af4038c2cb" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + cd "I2util/I2util" do + system "./bootstrap" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + uint8_t buf[2]; + if (!I2HexDecode("beef", buf, sizeof(buf))) return 1; + if (buf[0] != 190 || buf[1] != 239) return 1; + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lI2util", "-o", "test" + system "./test" + end +end diff --git a/Formula/i/i386-elf-gdb.rb b/Formula/i/i386-elf-gdb.rb new file mode 100644 index 0000000000000..86970e3727784 --- /dev/null +++ b/Formula/i/i386-elf-gdb.rb @@ -0,0 +1,76 @@ +class I386ElfGdb < Formula + desc "GNU debugger for i386-elf cross development" + homepage "https://www.gnu.org/software/gdb/" + url "https://ftp.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + mirror "https://ftpmirror.gnu.org/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 + + bottle do + sha256 arm64_sequoia: "af939496c6245db5f2f812e196fb9e4b3623f15a2db5035716f392d6633ffe8c" + sha256 arm64_sonoma: "951dac8073ae7de6fb7d74db8b7694a4bc323e02013f1ac541b1f03f45e8d319" + sha256 arm64_ventura: "b8c97775ea52dfbb3459fae62aa433402a2fb23a1d3b4553be7c206b38e63701" + sha256 sonoma: "a7a43697ffade75a422458eb851588a15b042272729d9850339ae465069cd5cf" + sha256 ventura: "c9d550dcb8ddb0db49e41f7a72339424e320ee23537ed52e8f66b2887185d889" + sha256 arm64_linux: "2a7f9f61e3f2faac56dfd439e1488567643896454a98acf4d03fa7e201a6d57f" + sha256 x86_64_linux: "3f2f5cd65a663532604928725a87b015fd9f596ae92b647a4ee6b4fb9c61fd97" + end + + depends_on "i686-elf-gcc" => :test + depends_on "gmp" + depends_on "mpfr" + depends_on "python@3.13" + depends_on "xz" # required for lzma support + + uses_from_macos "expat", since: :sequoia # minimum macOS due to python + uses_from_macos "ncurses" + 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 = "i386-elf" + args = %W[ + --target=#{target} + --datarootdir=#{share}/#{target} + --includedir=#{include}/#{target} + --infodir=#{info}/#{target} + --mandir=#{man} + --with-lzma + --with-python=#{which("python3.13")} + --with-system-zlib + --disable-binutils + ] + + 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["i686-elf-gcc"].bin/"i686-elf-gcc", "-g", "-nostdlib", "test.c" + + output = shell_output("#{bin}/i386-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/i/i686-elf-binutils.rb b/Formula/i/i686-elf-binutils.rb new file mode 100644 index 0000000000000..2b92f33992e54 --- /dev/null +++ b/Formula/i/i686-elf-binutils.rb @@ -0,0 +1,60 @@ +class I686ElfBinutils < Formula + desc "GNU Binutils for i686-elf cross development" + homepage "https://www.gnu.org/software/binutils/" + url "https://ftp.gnu.org/gnu/binutils/binutils-2.44.tar.bz2" + mirror "https://ftpmirror.gnu.org/binutils/binutils-2.44.tar.bz2" + sha256 "f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_sequoia: "b0a006a8cb8b4b032c38c07349f0287d0cfb719ca75845cccb13415908b4938c" + sha256 arm64_sonoma: "9afba9508ee359df64f8f4aa6b8281a9b10955e3931466018f055191b3fdc955" + sha256 arm64_ventura: "23dc4080e2539e76c030d156545e70b8e4884d382c960edc8f2d5380d4a96a14" + sha256 sonoma: "3396bc05cca54e0beed9815a264d62409606b9c769b735961d6b6cf8f09f73bc" + sha256 ventura: "c8aa9c42376c639a42c169b739428ce2686bf580c387830b13972ee33ee4742c" + sha256 arm64_linux: "cda3cb982ee056cbc462a2da05b83a3cc3bd9f27989e56b569778badfb273b31" + sha256 x86_64_linux: "958ff43e0bc720c34882ec39f853810e651989dfed66fc2af63c88361a96ab74" + 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 = "i686-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 .data + .section .text + .globl _start + _start: + movl $1, %eax + movl $4, %ebx + int $0x80 + ASM + + system bin/"i686-elf-as", "--32", "-o", "test-s.o", "test-s.s" + assert_match "file format elf32-i386", + shell_output("#{bin}/i686-elf-objdump -a test-s.o") + end +end diff --git a/Formula/i/i686-elf-gcc.rb b/Formula/i/i686-elf-gcc.rb new file mode 100644 index 0000000000000..fbb68cd33f596 --- /dev/null +++ b/Formula/i/i686-elf-gcc.rb @@ -0,0 +1,68 @@ +class I686ElfGcc < Formula + desc "GNU compiler collection for i686-elf" + homepage "https://gcc.gnu.org/" + url "https://ftp.gnu.org/gnu/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + mirror "https://ftpmirror.gnu.org/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + sha256 "e2b09ec21660f01fecffb715e0120265216943f038d0e48a9868713e54f06cea" + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + + livecheck do + formula "gcc" + end + + bottle do + sha256 arm64_sequoia: "8e2c4ad88cbeb24b8de4bd588b2295594282738e750a12257b741d62b9554d15" + sha256 arm64_sonoma: "d76a7ca2b5c17dfd8371073bd9403eebbf767778cd29b3b12add0906f1c292c7" + sha256 arm64_ventura: "4c06228afceb027d0ce4b34256c6ec0d5cd7dfe7daeec3ed9294cfc30530bd1a" + sha256 sonoma: "1172380d92d25c59e015a58d537e7034ba29bfaf6fe8144100744074829a0ff4" + sha256 ventura: "8a8386bf395ef25bea60ec676e54579ffa3a7f36e9c5559e3f4be9840ad9ff7e" + sha256 arm64_linux: "7dea4d76dd9a20c6f789b0b942843995bbc12cf73f55345e54c3ebd2b986e043" + sha256 x86_64_linux: "311f32728f01c2ee43cc703ed6a12be6b930a0df5f434f4ffeda5bf9e8f2aedc" + end + + depends_on "gmp" + depends_on "i686-elf-binutils" + depends_on "libmpc" + depends_on "mpfr" + depends_on "zstd" + + uses_from_macos "zlib" + + def install + target = "i686-elf" + mkdir "i686-elf-gcc-build" do + system "../configure", "--target=#{target}", + "--prefix=#{prefix}", + "--infodir=#{info}/#{target}", + "--disable-nls", + "--without-isl", + "--without-headers", + "--with-as=#{Formula["i686-elf-binutils"].bin}/i686-elf-as", + "--with-ld=#{Formula["i686-elf-binutils"].bin}/i686-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/"i686-elf-gcc", "-c", "-o", "test-c.o", "test-c.c" + output = shell_output("#{Formula["i686-elf-binutils"].bin}/i686-elf-objdump -a test-c.o") + assert_match "file format elf32-i386", output + end +end diff --git a/Formula/i/i686-elf-grub.rb b/Formula/i/i686-elf-grub.rb new file mode 100644 index 0000000000000..b35dfecf3afe2 --- /dev/null +++ b/Formula/i/i686-elf-grub.rb @@ -0,0 +1,71 @@ +class I686ElfGrub < Formula + desc "GNU GRUB bootloader for i686-elf" + homepage "https://savannah.gnu.org/projects/grub" + url "https://ftp.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" + + bottle do + sha256 arm64_sequoia: "16923a4a52103eb6468129a574eb7b3c85d771adb37773d8e2a6850225805931" + sha256 arm64_sonoma: "ceb84b9c359fbb659e7b355065513d605bd013fde1a642c4c9838d08499e5959" + sha256 arm64_ventura: "acfedbdc6b331ec2a1257cb55303befd965280978678c2f6e34f9dd45d6bd7e6" + sha256 sonoma: "f72297ff2a716b0347a300c27b8ea3e0f40090b243b5500f0fe2c824de003ac3" + sha256 ventura: "154a14a89653bdf2f8a521ae150c8e998e2bd51f2d9bf78560509b4a2d9791e8" + sha256 arm64_linux: "d210e360f1529d9d5019a07c703d312155a3d485413df86ab13599240bdbdd39" + sha256 x86_64_linux: "f6f03a027b9c884fedcc5c9c3fb85599a4d279ea38263afbb64824fb7148db84" + end + + depends_on "gawk" => :build + depends_on "help2man" => :build + depends_on "i686-elf-binutils" => :build + depends_on "i686-elf-gcc" => [:build, :test] + depends_on "objconv" => :build + depends_on "texinfo" => :build + depends_on "gettext" + depends_on "xorriso" + depends_on "xz" + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "python" => :build + + def target + "i686-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" + + mkdir "build" do + args = %W[ + --disable-werror + --target=#{target} + --prefix=#{prefix/target} + --bindir=#{bin} + --libdir=#{lib/target} + --with-platform=pc + --program-prefix=#{target}- + ] + + system "../configure", *args + system "make" + system "make", "install" + 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/i/iam-policy-json-to-terraform.rb b/Formula/i/iam-policy-json-to-terraform.rb new file mode 100644 index 0000000000000..426d33dcff337 --- /dev/null +++ b/Formula/i/iam-policy-json-to-terraform.rb @@ -0,0 +1,34 @@ +class IamPolicyJsonToTerraform < Formula + desc "Convert a JSON IAM Policy into terraform" + homepage "https://github.com/flosell/iam-policy-json-to-terraform" + url "https://github.com/flosell/iam-policy-json-to-terraform/archive/refs/tags/1.9.1.tar.gz" + sha256 "5943b0a352758d4a6e9d7d759fd10af24f42abe7012b862cf92048b6dc6e15fb" + license "Apache-2.0" + head "https://github.com/flosell/iam-policy-json-to-terraform.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "016bb0b29e4f5c61e1c7e0e0c99ba74757327a146ddf9906df1d628694e31ae2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "016bb0b29e4f5c61e1c7e0e0c99ba74757327a146ddf9906df1d628694e31ae2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "016bb0b29e4f5c61e1c7e0e0c99ba74757327a146ddf9906df1d628694e31ae2" + sha256 cellar: :any_skip_relocation, sonoma: "717be4d1e9c56ce0f37199dee4b9d7e2055f166cc47b56101e7f2f9d22c6d8a3" + sha256 cellar: :any_skip_relocation, ventura: "717be4d1e9c56ce0f37199dee4b9d7e2055f166cc47b56101e7f2f9d22c6d8a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "92ee9be34d8a9dddfe40f1a969683233cd80495d87f3d91956292db8b13c8846" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f62890eb65845d86e84179b17762c573d9f77a1cafbe3bba430f73602f9b3ff" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + # test version + assert_match version.to_s, shell_output("#{bin}/iam-policy-json-to-terraform -version") + + # test functionality + test_input = '{"Statement":[{"Effect":"Allow","Action":["ec2:Describe*"],"Resource":"*"}]}' + output = pipe_output(bin/"iam-policy-json-to-terraform", test_input) + assert_match "ec2:Describe*", output + end +end diff --git a/Formula/i/iamb.rb b/Formula/i/iamb.rb new file mode 100644 index 0000000000000..06c0246ed7dc1 --- /dev/null +++ b/Formula/i/iamb.rb @@ -0,0 +1,38 @@ +class Iamb < Formula + desc "Matrix client for Vim addicts" + homepage "https://iamb.chat/" + url "https://github.com/ulyssa/iamb/archive/refs/tags/v0.0.10.tar.gz" + sha256 "f628cfbd9eba9e8881902b970e9432fec815044ec9bea901a8562ea3ef8f4615" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1e1a4d58912f7dad8c353cb2ec05577693b21de7954e33b22e0314ae10039e17" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c09591eb3bc906830f85bbc406b20a8a5d1fca0bb3f8809c661d88360aa35d6c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b2124f6220a2c7354ac1435f15a6805adf0ecc617cd9febdfaae65a48ef58f6e" + sha256 cellar: :any, arm64_monterey: "4bf0b74795aea77ea0e1e10a763550d4a58409aa3a08fa5bdcd9c87194dda4ff" + sha256 cellar: :any_skip_relocation, sonoma: "9333e920a2091887b025e048a61544c69c263610f261796b3844001d00084bca" + sha256 cellar: :any_skip_relocation, ventura: "94f17c6cffebdd18ed8963bfd933925b9b182cf2879b84c80245f4be9cd1dd57" + sha256 cellar: :any, monterey: "c0d27624f82d9978f2466e90e7e89629704d890c0d8461e9ec01113d6f1ae105" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b6775634be6db7388d651436166e5663bad228494564b9d6ea16704b47ce035" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f77262d3d6396f267d57ae41fa0d76d023dc5960ebb0eea743ebff4b9ea7f245" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "sqlite", since: :ventura # requires sqlite3_error_offset + + on_linux do + depends_on "openssl@3" + end + + def install + ENV["LIBSQLITE3_SYS_USE_PKG_CONFIG"] = "1" + ENV["VERGEN_GIT_SHA"] = tap.user + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "Please create a configuration file", shell_output(bin/"iamb", 2) + end +end diff --git a/Formula/i/iamy.rb b/Formula/i/iamy.rb new file mode 100644 index 0000000000000..a4207d45e1c0e --- /dev/null +++ b/Formula/i/iamy.rb @@ -0,0 +1,37 @@ +class Iamy < Formula + desc "AWS IAM import and export tool" + homepage "https://github.com/99designs/iamy" + url "https://github.com/99designs/iamy/archive/refs/tags/v2.4.0.tar.gz" + sha256 "13bd9e66afbeb30d386aa132a4af5d2e9a231d2aadf54fe8e5dc325583379359" + license "MIT" + head "https://github.com/99designs/iamy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "be58860790e074a6d7d6c53dead8c0b2868b7bba94c5cb1c6f7e1eff9c881bc5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4faa78ee3321aef4101f68718671c10e93151b584b4829f9ccd7214bd714bd9e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0610f24a24be30691a67a4c3b187cf0a959876c50ad250d7bf5802eb0190e51d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b0283107c1a133b0f8e7295de2fc2970a4824a2638011c63eb37cc55c654f8f1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9b81ec5512ba8332739f653b1c93a4b2118a1e9929329e0e6c4d2dd80c47d5a6" + sha256 cellar: :any_skip_relocation, sonoma: "86d99df6409eccfe7fc1ade637a446fd5490fa29f485bdb1b783bce3c10a311a" + sha256 cellar: :any_skip_relocation, ventura: "cb7d122b05b54d4bb580b923d100b0b0bd2e175f8bc69d92ffc6c2f4f46f2c65" + sha256 cellar: :any_skip_relocation, monterey: "df95bd8de163fb4fcecd92ba25fa559b75332c6fcb6a5aebb205ffbb3a4148dd" + sha256 cellar: :any_skip_relocation, big_sur: "59dde9a556103175d876fd1fba134133ddd1b162daa491cdbf35bb58bfb4fc85" + sha256 cellar: :any_skip_relocation, catalina: "54c8b998bcfe19443e99f609e34864a39e9d3b49cd5f935c78b9654727a81137" + sha256 cellar: :any_skip_relocation, mojave: "1024d9cc234fb7e94ff17781c2f600ed6d286c5e7b6ab96b20e259e61a56a0ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc26edb3bea1993f7650cce2cfd848318ba19cf3a155ae7838823b4f4c3c8041" + end + + depends_on "go" => :build + depends_on "awscli" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=v#{version}") + end + + test do + ENV.delete "AWS_ACCESS_KEY" + ENV.delete "AWS_SECRET_KEY" + output = shell_output("#{bin}/iamy pull 2>&1", 1) + assert_match "Can't determine the AWS account", output + end +end diff --git a/Formula/i/iat.rb b/Formula/i/iat.rb new file mode 100644 index 0000000000000..ecc66fae9477d --- /dev/null +++ b/Formula/i/iat.rb @@ -0,0 +1,36 @@ +class Iat < Formula + desc "Converts many CD-ROM image formats to ISO9660" + homepage "https://sourceforge.net/projects/iat.berlios/" + url "https://downloads.sourceforge.net/project/iat.berlios/iat-0.1.7.tar.bz2" + sha256 "fb72c42f4be18107ec1bff8448bd6fac2a3926a574d4950a4d5120f0012d62ca" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6bc109730274136edd66490ce1029a7e48d083a418924684adbd72154a1ea84" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b9bf951c493709c86c80ded9cfda13a70c2fb7c6736ed66403bd493cd4267c5e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a0db42bcd57f51e6e6ae308b4e5999449bd70113b22e1e581331b892895d1c52" + sha256 cellar: :any_skip_relocation, arm64_monterey: "093c585bccdf3c2befc96c8050fc922267769a8d11e5d8d613aaaf5771ccc5cb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d62b3a234d80f15acfed8e030897b09f88678213024c5b5f47ae667507984d24" + sha256 cellar: :any_skip_relocation, sonoma: "bdb26eec9b7caef99572119093011954c596d32273d663bad57e98e869cdbc05" + sha256 cellar: :any_skip_relocation, ventura: "e01adc32b1913dab6e6907a82fcc5865c6f7d9cf1d18ea65225fb45726862fef" + sha256 cellar: :any_skip_relocation, monterey: "9cd2da0793bd90422e81e10cc2748b3d5c27cdb8fb2e47d167cc0bf2a94ed096" + sha256 cellar: :any_skip_relocation, big_sur: "a1a5029ab927dc08cf6cf89a583c52e475dd50521d461f5ed3d05056a7605dc1" + sha256 cellar: :any_skip_relocation, catalina: "6400e0c863f951cf324e9630ad9de91cc099e5d3f9cfd34f3cfa4344eb747cf3" + sha256 cellar: :any_skip_relocation, mojave: "e10169c9c7101efb0cfa7670cadbed74dde199b1a8d034f73e906f897be1bbc2" + sha256 cellar: :any_skip_relocation, high_sierra: "799764ef75d9efdf93f92a2fbc2beaedecd6037eae45eaaf7ce888c2ef2b3eb3" + sha256 cellar: :any_skip_relocation, sierra: "97d378d0b0ee8bb685272d126a54c833ad8d9f7f3ab34631198d054d2f1d0bdf" + sha256 cellar: :any_skip_relocation, el_capitan: "baadc7c40697b28b46c7541d617f65ee318b78efbdc4156c6527490616fd2dee" + sha256 cellar: :any_skip_relocation, arm64_linux: "eedb0ed17c84f3336f603a629de7b551aac5f37d77cb79236aa3caaff3901562" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f6c91342941bb21b0ac060ac56c8453578655e499ef758ab2c7366ce2052d47" + end + + def install + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", + "--includedir=#{include}/iat" + system "make", "install" + end + + test do + system bin/"iat", "--version" + end +end diff --git a/Formula/i/ibazel.rb b/Formula/i/ibazel.rb new file mode 100644 index 0000000000000..a6243c67cd473 --- /dev/null +++ b/Formula/i/ibazel.rb @@ -0,0 +1,75 @@ +class Ibazel < Formula + desc "Tools for building Bazel targets when source files change" + homepage "https://github.com/bazelbuild/bazel-watcher" + url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.25.3.tar.gz" + sha256 "064e313f2e2fa39ebd71a8f6b5eb44e7c832b713c0fc4077811d88830aa2e68e" + license "Apache-2.0" + head "https://github.com/bazelbuild/bazel-watcher.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2c12651e6c9cbc680f6e787336fc2f2af53ccdd09cc7fafc8ee27a9317f507df" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c12651e6c9cbc680f6e787336fc2f2af53ccdd09cc7fafc8ee27a9317f507df" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3244d3623fc940b32da49370e3b4d78edae09fa66fc336a80dc5a2a6bfca08d1" + sha256 cellar: :any_skip_relocation, sonoma: "a2a7ca0a10912f7e99064fa84f76e4c05a0d1e1aefc026572187c66064872f37" + sha256 cellar: :any_skip_relocation, ventura: "74d628872158223d2254232f97bc08654db611958b4269ed5b60aa91d8c3ec50" + sha256 cellar: :any_skip_relocation, arm64_linux: "f218a79d9f3d14172c346ef78f621bfb3dd03f9e5e0e0b9f0199fbb5f6cc6e1d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1dd9fbcb138b56677b3123f7194cb5d13675a5cdd6f8dcfd9a41f218b3b67828" + end + + depends_on "bazel@7" => [:build, :test] + depends_on "go" => [:build, :test] + + def install + # Bazel clears environment variables which breaks superenv shims + ENV.remove "PATH", Superenv.shims_path + + # Allow using our bazel rather than pre-built from bazelisk + rm(".bazelversion") + + system "bazel", "build", "--config=release", "--workspace_status_command", "echo STABLE_GIT_VERSION #{version}", "//cmd/ibazel:ibazel" + bin.install "bazel-bin/cmd/ibazel/ibazel_/ibazel" + end + + test do + ENV.prepend_path "PATH", Formula["bazel@7"].bin + + # Write MODULE.bazel with Bazel module dependencies + (testpath/"MODULE.bazel").write <<~STARLARK + bazel_dep(name = "rules_go", version = "0.50.1") + bazel_dep(name = "gazelle", version = "0.40.0") + + # Register the Go SDK extension properly + go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") + + # Register the Go SDK installed on the host. + go_sdk.host() + STARLARK + + (testpath/"BUILD.bazel").write <<~STARLARK + load("@rules_go//go:def.bzl", "go_binary") + + go_binary( + name = "bazel-test", + srcs = ["test.go"], + ) + STARLARK + + (testpath/"test.go").write <<~GO + package main + import "fmt" + func main() { + fmt.Println("Hi!") + } + GO + + pid = spawn("ibazel", "build", "//:bazel-test") + out_file = "bazel-bin/bazel-test_/bazel-test" + sleep 1 until File.exist?(out_file) + assert_equal "Hi!\n", shell_output(out_file) + ensure + Process.kill("TERM", pid) + sleep 1 + Process.kill("TERM", pid) + end +end diff --git a/Formula/i/ibex.rb b/Formula/i/ibex.rb new file mode 100644 index 0000000000000..8a5af0e4c16e8 --- /dev/null +++ b/Formula/i/ibex.rb @@ -0,0 +1,87 @@ +class Ibex < Formula + desc "C++ library for constraint processing over real numbers" + homepage "https://ibex-team.github.io/ibex-lib/" + url "https://github.com/ibex-team/ibex-lib/archive/refs/tags/ibex-2.9.0.tar.gz" + sha256 "8d16ac2dfbc6de0353a12b7008d1d566bda52178f247d8461be02063972311a6" + license "LGPL-3.0-only" + head "https://github.com/ibex-team/ibex-lib.git", branch: "master" + + livecheck do + url :stable + regex(/^ibex[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "81f2219bb5ace8fd196334c02cc5be36d3c708a21b778138cc89f49d48c5f11e" + sha256 cellar: :any, arm64_sonoma: "c1aa3a31657f99acd38c81e90595f4bd9b34710ef22482a22cd4a44e9f1c1cf4" + sha256 cellar: :any, arm64_ventura: "e7337ed741f758908a333c04e29aecf4c6a36888cc99682766e1c34b2ab61719" + sha256 cellar: :any, sonoma: "b38534dba34ff9bddf80c2e0c3ee09c3312e5e92cd28f6590af0cd6cd363d341" + sha256 cellar: :any, ventura: "8f57286a04f31143a67d3cd7d58c70fda908f5a2dbcc00a7589821f1f29ff1c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e660a514b4bc69bcb13000715af40d392fa65b5daac014401d46a1482370f661" + end + + depends_on "bison" => :build + depends_on "cmake" => [:build, :test] + depends_on "flex" => :build + depends_on "pkgconf" => :build + + uses_from_macos "zlib" + + on_linux do + # https://github.com/ibex-team/ibex-lib/blob/master/interval_lib_wrapper/gaol/3rd/mathlib-2.1.1/CMakeLists.txt + depends_on arch: :x86_64 + end + + # Workaround for Intel macOS processor detection + # Issue ref: https://github.com/ibex-team/ibex-lib/issues/567 + patch :DATA + + def install + rpaths = [loader_path, rpath, rpath(target: lib/"ibex/3rd")] + + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}", + *std_cmake_args.reject { |s| s["CMAKE_INSTALL_LIBDIR"] } + + # Workaround for Intel macOS build error: no member named '__fpcr' in 'fenv_t' + # Issue ref: https://github.com/ibex-team/ibex-lib/issues/567 + if OS.mac? && Hardware::CPU.intel? + inreplace "build/interval_lib_wrapper/gaol/gaol-4.2.3alpha0/gaol/gaol_fpu_fenv.h", + "#if __APPLE__\n# define CTRLWORD(v) (v).__fpcr", + "#if __APPLE__\n# define CTRLWORD(v) (v).__control" + end + + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install %w[examples benchs/solver] + (pkgshare/"examples/symb01.txt").write <<~EOS + function f(x) + return ((2*x,-x);(-x,3*x)); + end + EOS + end + + test do + system "cmake", "-S", pkgshare/"examples", "-B", ".", "-DCMAKE_BUILD_RPATH=#{lib};#{lib}/ibex/3rd" + system "cmake", "--build", "." + (1..8).each { |n| system "./lab#{n}" } + (1..3).each { |n| system "./slam#{n}" } + end +end + +__END__ +diff --git a/interval_lib_wrapper/gaol/3rd/mathlib-2.1.1/CMakeLists.txt b/interval_lib_wrapper/gaol/3rd/mathlib-2.1.1/CMakeLists.txt +index 65b5ea8b..24a2e5b9 100644 +--- a/interval_lib_wrapper/gaol/3rd/mathlib-2.1.1/CMakeLists.txt ++++ b/interval_lib_wrapper/gaol/3rd/mathlib-2.1.1/CMakeLists.txt +@@ -43,7 +43,7 @@ elseif (CMAKE_SYSTEM MATCHES "CYGWIN" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i.86") + elseif (CMAKE_SYSTEM MATCHES "Darwin") + if (CMAKE_SYSTEM_PROCESSOR MATCHES "arm64") + set (MATHLIB_AARCH64 ON) +- elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "i.86") ++ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "i.86|86_64") + set (MATHLIB_I86_MACOSX ON) + set (IX86_CPU ON) + else () diff --git a/Formula/i/iblinter.rb b/Formula/i/iblinter.rb new file mode 100644 index 0000000000000..c46ef9ddf43ff --- /dev/null +++ b/Formula/i/iblinter.rb @@ -0,0 +1,96 @@ +class Iblinter < Formula + desc "Linter tool for Interface Builder" + homepage "https://github.com/IBDecodable/IBLinter" + url "https://github.com/IBDecodable/IBLinter/archive/refs/tags/0.5.0.tar.gz" + sha256 "d1aafdca18bc81205ef30a2ee59f33513061b20184f0f51436531cec4a6f7170" + license "MIT" + head "https://github.com/IBDecodable/IBLinter.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ab02ce27d16504d8ec99411983ecec5503a128fd940bc6d0c9c13ba7347d7632" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c629f36cf48f2703306e635ad77c25ff9d6423789664bcda698403588461a598" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7f71014fe66db0a03768d59175053f6d3575dcc7ea91e806cec6912d808df667" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2e63e2fe2324d295afb9bba5b8a3b7475480543fcf8145b61cb5931cda5ca97d" + sha256 cellar: :any_skip_relocation, sonoma: "769206183628990b57eec91a82781e399a6e1581551f85308bdc1342cc8b0265" + sha256 cellar: :any_skip_relocation, ventura: "cc719fe755a7c5af129d7e9cf053935ff4daf35fe48ead5fbff3d4a74be49cd4" + sha256 cellar: :any_skip_relocation, monterey: "dc4ca4585eaa86c2fec24e712100925b460dd75ed13c8d15eab5141a88a43a30" + sha256 arm64_linux: "c38241d3217c0ebb29e163e3f50cbf43308b33197e475a29b9d215286f21e504" + sha256 x86_64_linux: "7284a5a01c79771e29fa8c9fe44d2cb6412ad4b09f1c3338908eeaf905c34e95" + end + + depends_on xcode: ["10.2", :build] + + uses_from_macos "swift" + + # Fetch a copy of SourceKitten in order to fix build with newer Swift. + # Issue ref: https://github.com/IBDecodable/IBLinter/issues/189 + resource "SourceKitten" do + on_system :linux, macos: :sonoma_or_newer do + # https://github.com/IBDecodable/IBLinter/blob/0.5.0/Package.resolved#L41-L47 + url "https://github.com/jpsim/SourceKitten.git", + tag: "0.29.0", + revision: "77a4dbbb477a8110eb8765e3c44c70fb4929098f" + + # Backport of import from HEAD + patch :DATA + end + end + + def install + args = ["--disable-sandbox", "--configuration", "release"] + if !OS.mac? || MacOS.version >= :sonoma + (buildpath/"SourceKitten").install resource("SourceKitten") + system "swift", "package", *args, "edit", "SourceKitten", "--path", buildpath/"SourceKitten" + end + + system "swift", "build", *args + bin.install ".build/release/iblinter" + end + + test do + # Test by showing the help scree + system bin/"iblinter", "help" + + # Test by linting file + (testpath/".iblinter.yml").write <<~YAML + ignore_cache: true + enabled_rules: [ambiguous] + YAML + + (testpath/"Test.xib").write <<~XML + + + + + + + + + XML + + assert_match "#{testpath}/Test.xib:0:0: error: UIView (iGg-Eg-h0O) has ambiguous constraints", + shell_output("#{bin}/iblinter lint --config #{testpath}/.iblinter.yml --path #{testpath}", 2).chomp + 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/i/ical-buddy.rb b/Formula/i/ical-buddy.rb new file mode 100644 index 0000000000000..6a3a0891bb557 --- /dev/null +++ b/Formula/i/ical-buddy.rb @@ -0,0 +1,55 @@ +class IcalBuddy < Formula + desc "Get events and tasks from the macOS calendar database" + homepage "https://hasseg.org/icalBuddy/" + url "https://github.com/dkaluta/icalBuddy64/archive/refs/tags/v1.10.1.tar.gz" + sha256 "aff42b809044efbf9a1f7df7598e9e110c1c4de0a4c27ddccde5ea325ddc4b77" + license "MIT" + revision 1 + head "https://github.com/dkaluta/icalBuddy64.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "be7bf233e7a634c48779b5567de34e3f2a5af0e3b7b85fe1036cd899d665d1e6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f5470ef901a02406a988f04542a69a7563b7936eaa90144aa316a10fcdc1977" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b5931088a2e5f1df062e44902d454d0c9bfeb466c6baf49ed06a946599f3c15" + sha256 cellar: :any_skip_relocation, arm64_monterey: "26aa750e17161ec7755b39cc6a8ae2cfc04cbfd0c1a2feec9db67fcb21c06fbb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a04c344f77d1a6b2e137e0d7517b4d5bbe63f45079f3d1539138650af942936f" + sha256 cellar: :any_skip_relocation, sonoma: "643b31efdb5c6e5bc8338e397cc26ee9fdaebdde74e1f7835493c5065496993a" + sha256 cellar: :any_skip_relocation, ventura: "fa2359d74a4873041ef1774db5882be7468a4c056be5aca64ad01e3eaef604ff" + sha256 cellar: :any_skip_relocation, monterey: "7d0a5b87da06e38709f11885b3410c463260d753093f7525c8726b110b93aef8" + sha256 cellar: :any_skip_relocation, big_sur: "64163480c791a44e507091e8b73175f71aa3ce544d42fb1be7cc4f21f028fa55" + sha256 cellar: :any_skip_relocation, catalina: "64e1fd969d08e19aaf8a42d3fa5cb9d1a6f9eff77ef993d4e2d68eeed3e55230" + end + + depends_on :macos + + def install + inreplace "Makefile" do |s| + # Allow native builds rather than only x86_64 + s.gsub! "-arch x86_64", "" + + # https://github.com/dkaluta/icalBuddy64/pull/5 + s.gsub! "-force_cpusubtype_ALL", "" + + # Keep the build date (used in manpages) reproducible + s.change_make_var! "CURRDATE", time.strftime("%Y-%m-%d") + end + + args = %W[ + icalBuddy + icalBuddy.1 + icalBuddyLocalization.1 + icalBuddyConfig.1 + COMPILER=#{ENV.cc} + APP_VERSION=#{version} + ] + system "make", *args + bin.install "icalBuddy" + man1.install Dir["*.1"] + end + + test do + # Testing of other calendar functionality requires granting calendar access + # to the program (or the terminal emulator). + assert_match "Non-lossy ASCII", shell_output("#{bin}/icalBuddy strEncodings") + end +end diff --git a/Formula/i/icann-rdap.rb b/Formula/i/icann-rdap.rb new file mode 100644 index 0000000000000..d358c8edee7d9 --- /dev/null +++ b/Formula/i/icann-rdap.rb @@ -0,0 +1,44 @@ +class IcannRdap < Formula + desc "Full-rich client for the Registry Data Access Protocol (RDAP) sponsored by ICANN" + homepage "https://github.com/icann/icann-rdap/wiki" + url "https://github.com/icann/icann-rdap/archive/refs/tags/v0.0.22.tar.gz" + sha256 "42360a82605bf92891b4de0a133d43baabb041446b16063094c4abc94c531c30" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "70a951b05788925c050650eaec31c3a7a0e26869d77701b190dfba2787a1d063" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "812554fed56276e8cf3e84147630a91f60a08a1c5a0b1f48802e4e35780f5e7a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f4f9f9c8d870740f0e2dbe9b89799fbb9c6e652eab49ee30828501dee2c86892" + sha256 cellar: :any_skip_relocation, sonoma: "9c636a8333f3f570b08255835a91e4801d02c1f63790068bcb30e1c749a48f39" + sha256 cellar: :any_skip_relocation, ventura: "fd38c0e06394376548163d27eec245846b5486cf6778ff08a7310e41f30d2970" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0c436e4857f837be3315250b81ae04f1971a07fc13b5eb2d0a6ac6bce427191" + sha256 cellar: :any_skip_relocation, x86_64_linux: "76d31f3744546c6f91b20c85bf371e1a3cf89eb0eef808c61fbef8e449302f4c" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + conflicts_with "rdap", because: "rdap also ships a rdap binary" + + def install + system "cargo", "install", "--bin=rdap", *std_cargo_args(path: "icann-rdap-cli") + system "cargo", "install", "--bin=rdap-test", *std_cargo_args(path: "icann-rdap-cli") + end + + test do + # check version of rdap + assert_match "icann-rdap-cli #{version}", shell_output("#{bin}/rdap -V") + + # check version of rdap-test + assert_match "icann-rdap-cli #{version}", shell_output("#{bin}/rdap-test -V") + + # lookup com TLD at IANA with rdap + output = shell_output("#{bin}/rdap -O pretty-json https://rdap.iana.org/domain/com") + assert_match '"ldhName": "com"', output + + # test com TLD at IANA with rdap-test + output = shell_output("#{bin}/rdap-test -O pretty-json --skip-v6 -C icann-error https://rdap.iana.org/domain/com") + assert_match '"status_code": 200', output + end +end diff --git a/Formula/i/icarus-verilog.rb b/Formula/i/icarus-verilog.rb new file mode 100644 index 0000000000000..2c085bd39b4e8 --- /dev/null +++ b/Formula/i/icarus-verilog.rb @@ -0,0 +1,75 @@ +class IcarusVerilog < Formula + desc "Verilog simulation and synthesis tool" + homepage "https://steveicarus.github.io/iverilog/" + url "https://github.com/steveicarus/iverilog/archive/refs/tags/v12_0.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/i/iverilog/iverilog_12.0.orig.tar.gz" + sha256 "a68cb1ef7c017ef090ebedb2bc3e39ef90ecc70a3400afb4aa94303bc3beaa7d" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + head "https://github.com/steveicarus/iverilog.git", branch: "master" + + livecheck do + url :stable + regex(/v?(\d+(?:[._]\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "71feafd9b968350f08ca504f95b7d0be4e048799c47c145e2d7757ce0d179a5c" + sha256 arm64_sonoma: "16e03356975ad058efbf99a12cb1ed1a6c078aea5d7b5bb6a0035442afb0f335" + sha256 arm64_ventura: "0c963a73d69e2c0ad3c6813dd9d03ac4b5a880052bf9ecb28a8918adc9384b4e" + sha256 arm64_monterey: "968e2d0ca44b96920ad0806c19101a4dbd888ae8f5d3f6ede6395b13ee84c35b" + sha256 arm64_big_sur: "af49151647a5194225563412267b0dacb3da1d3fe3777802f13788ebf098d50d" + sha256 sonoma: "53a13ceb942f2ae0e867fc35716853f809114b157bb1e813a9a11b798666b968" + sha256 ventura: "f8d395f182e8788ae9720421d2c8ba5ab90fad839e0071ed871c8a8b23484d58" + sha256 monterey: "f6fea867f86a544671ff8d074da509d2997f545df8fa2d47cbb118aa7029fcfa" + sha256 big_sur: "b5c5e18bfcdadfcc54a69954b71bf4c56f6e9c223823f65c798c442c4ec61e79" + sha256 arm64_linux: "36faa76b1a7d0089f202c91564fb24536d9e2cb7d446a36e51657505f1cf8e89" + sha256 x86_64_linux: "ee0b7b46d11a76808cebc2140d83fc615ae4bec40aa3cfbc346560532caf3cdb" + end + + depends_on "autoconf" => :build + # parser is subtly broken when processed with an old version of bison + depends_on "bison" => :build + + uses_from_macos "flex" => :build + uses_from_macos "gperf" => :build + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "readline" + end + + def install + system "autoconf" + system "./configure", "--prefix=#{prefix}" + system "make", "install", "BISON=#{Formula["bison"].opt_bin}/bison" + end + + test do + (testpath/"test.v").write <<~VERILOG + module main; + initial + begin + $display("Boop"); + $finish; + end + endmodule + VERILOG + system bin/"iverilog", "-o", "test", "test.v" + + expected = <<~EOS + Boop + test.v:5: $finish called at 0 (1s) + EOS + assert_equal expected, shell_output("./test") + + # test syntax errors do not cause segfaults + (testpath/"error.v").write "error;" + expected = <<~EOS + error.v:1: syntax error + I give up. + EOS + assert_equal expected, shell_output("#{bin}/iverilog error.v 2>&1", 2) + end +end diff --git a/Formula/i/icbirc.rb b/Formula/i/icbirc.rb new file mode 100644 index 0000000000000..66bc5950b7a80 --- /dev/null +++ b/Formula/i/icbirc.rb @@ -0,0 +1,28 @@ +class Icbirc < Formula + desc "Proxy IRC client and ICB server" + homepage "https://www.benzedrine.ch/icbirc.html" + url "https://www.benzedrine.ch/icbirc-2.2.tar.gz" + sha256 "de045b4fc826abc348d4f83ac674a135faeee7235a4941d5daf35e85a83c2b3e" + license "BSD-2-Clause" + + livecheck do + url :homepage + regex(/href=.*?icbirc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4246015b1c291cb3a55226ca562a4af17b4898367b94995842d093d39f679c7a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69f5a69f48564c553cec8b3239d2d85b06799d3a92ff590bea143a4a52041a4d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bbc895f1f9d189f480b198d6b21cfb19058ad162640c26563370fdca83d4d3e1" + sha256 cellar: :any_skip_relocation, sonoma: "f2f06c70f2aa742d48a0131f67f2c3c1036699888f536d3fa4c05200a5b02de2" + sha256 cellar: :any_skip_relocation, ventura: "8ac135755acfc32dcabbd12e8a0deb9fae1f8b02ca9835c1fbdf567121214de5" + end + + depends_on "bsdmake" => :build + + def install + system "bsdmake" + bin.install "icbirc" + man8.install "icbirc.8" + end +end diff --git a/Formula/i/iccmax.rb b/Formula/i/iccmax.rb new file mode 100644 index 0000000000000..271344b6d9193 --- /dev/null +++ b/Formula/i/iccmax.rb @@ -0,0 +1,50 @@ +class Iccmax < Formula + desc "Demonstration Implementation for iccMAX color profiles" + homepage "https://github.com/InternationalColorConsortium/DemoIccMAX" + url "https://github.com/InternationalColorConsortium/DemoIccMAX/archive/refs/tags/v2.1.26.tar.gz" + sha256 "e3bff2e0e7876faebe4a2097eefa2a190325bcc04c152ef470449f0c01b41fa7" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1c199d5cf09f566e818d2049fb093faf85d4db8d5523e1434291fa2c9472410b" + sha256 cellar: :any, arm64_sonoma: "1b74500262109e0e702597ed2342f488c4517b8f44800534e33c55c88b89bdaf" + sha256 cellar: :any, arm64_ventura: "47bc9ddae076560477d5dcb2aba20a1f1ee6a1bfd7abf427bf70aec37c7b911d" + sha256 cellar: :any, sonoma: "7fb47953f25262626476ffa53e8b9a1062ac2f8dfd1a3c492c4cabb8159da326" + sha256 cellar: :any, ventura: "0c77e5b40278033497bdf99dd0f667a06b3e8ceb5ec47ee4c32802da98d8e930" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e4b5ff79e1bec935b036745b9dd4fe399864472e88bfd3f7352130efa91b7bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0923ecf885cebd5ad8dc4438ca1d594faa37f9139c1a2606494aca2f2a023a1b" + end + + depends_on "cmake" => :build + depends_on "jpeg" + depends_on "libpng" + depends_on "libtiff" + depends_on "nlohmann-json" + depends_on "wxwidgets" + + uses_from_macos "libxml2" + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{opt_lib} + -DENABLE_TOOLS=ON + -DENABLE_SHARED_LIBS=ON + -DENABLE_INSTALL_RIM=ON + -DENABLE_ICCXML=ON + ] + + system "cmake", "-S", "Build/Cmake", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "Testing/Calc/CameraModel.xml" + end + + test do + system bin/"iccFromXml", pkgshare/"CameraModel.xml", "output.icc" + assert_path_exists testpath/"output.icc" + + system bin/"iccToXml", "output.icc", "output.xml" + assert_path_exists testpath/"output.xml" + end +end diff --git a/Formula/i/icdiff.rb b/Formula/i/icdiff.rb new file mode 100644 index 0000000000000..36316b804d0b5 --- /dev/null +++ b/Formula/i/icdiff.rb @@ -0,0 +1,31 @@ +class Icdiff < Formula + include Language::Python::Shebang + + desc "Improved colored diff" + homepage "https://www.jefftk.com/icdiff" + url "https://github.com/jeffkaufman/icdiff/archive/refs/tags/release-2.0.7.tar.gz" + sha256 "147ebdd0c2b8019d0702bbbb1349d77442a4f05530cba39276b58b005ca08c77" + license "PSF-2.0" + head "https://github.com/jeffkaufman/icdiff.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "6fd6d50bbd97cdad70b01dcbb90a65b87f79a359cbe235f0d23367de8778fbfc" + end + + uses_from_macos "python" + + def install + rewrite_shebang detected_python_shebang(use_python_from_path: true), "icdiff" + bin.install "icdiff", "git-icdiff" + end + + test do + (testpath/"file1").write "test1" + (testpath/"file2").write "test1" + + system bin/"icdiff", "file1", "file2" + system "git", "init" + system bin/"git-icdiff" + end +end diff --git a/Formula/i/ice.rb b/Formula/i/ice.rb new file mode 100644 index 0000000000000..ce8f7a59aa4ba --- /dev/null +++ b/Formula/i/ice.rb @@ -0,0 +1,120 @@ +class Ice < Formula + desc "Comprehensive RPC framework" + homepage "https://zeroc.com/" + url "https://github.com/zeroc-ice/ice/archive/refs/tags/v3.7.10.tar.gz" + sha256 "b90e9015ca9124a9eadfdfc49c5fba24d3550c547f166f3c9b2b5914c00fb1df" + license "GPL-2.0-only" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "7c514dfb78c4739a0e3a89fef4c6cb238fa944b43efab26bda3aea20ec4ae47e" + sha256 cellar: :any, arm64_sonoma: "9e16e4dc54af25f1f87ada450ac1179be3f2ddbdfaf53d75fc242f20dd093721" + sha256 cellar: :any, arm64_ventura: "c13e1bd19804740b88a1a91acb548a66a4407bb234c74423bf0fa5a4c529b59c" + sha256 cellar: :any, arm64_monterey: "0193902362ba7001f9ada681d417b2ff2178a259e1742a1ef7b40a13a0c1659f" + sha256 cellar: :any, sonoma: "7f5e821c0f5341f106eb7ac794cc28212fff4cb1ea7c1bc4a9b4be0f9045453f" + sha256 cellar: :any, ventura: "f51b98196d1bbd54ebc2f5fd0afc4ca79581109d94546741cf60abb6c7a5f32f" + sha256 cellar: :any, monterey: "0cddb56c9be86ab8f4c9741f3ef2b4b1cebd4893692f8ddd06085c4e6bd82512" + sha256 cellar: :any_skip_relocation, arm64_linux: "303296e9ae326b721e3cc46e5d1d714ae03c74ca4b0504539d65c9e1517e9f42" + sha256 cellar: :any_skip_relocation, x86_64_linux: "52ec26319cdc6a02479ca493939ca965d97fde730b6d2f35eb151f55b0735e2a" + end + + depends_on "lmdb" + depends_on "mcpp" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "libedit" + uses_from_macos "libxcrypt" + + on_linux do + depends_on "openssl@3" + end + + def install + # Workaround for Xcode 16 (LLVM 17) Clang bug that causes: + # include/Ice/OutgoingAsync.h: error: declaration shadows a local variable [-Werror,-Wshadow-uncaptured-local] + # Ref: https://github.com/llvm/llvm-project/issues/81307 + # Ref: https://github.com/llvm/llvm-project/issues/71976 + if DevelopmentTools.clang_build_version == 1600 + inreplace "config/Make.rules.Darwin", "-Wno-shadow-field ", "\\0-Wno-shadow-uncaptured-local " + end + + args = [ + "prefix=#{prefix}", + "V=1", + "USR_DIR_INSTALL=yes", # ensure slice and man files are installed to share + "MCPP_HOME=#{Formula["mcpp"].opt_prefix}", + "LMDB_HOME=#{Formula["lmdb"].opt_prefix}", + "CONFIGS=shared cpp11-shared xcodesdk cpp11-xcodesdk", + "PLATFORMS=all", + "SKIP=slice2confluence", + "LANGUAGES=cpp objective-c", + ] + + # Fails with Xcode < 12.5 + inreplace "cpp/include/Ice/Object.h", /^#.+"-Wdeprecated-copy-dtor"+/, "" if OS.mac? && MacOS.version <= :catalina + + system "make", "install", *args + + # We install these binaries to libexec because they conflict with those + # installed along with the ice packages from PyPI, RubyGems and npm. + (libexec/"bin").mkpath + %w[slice2py slice2rb slice2js].each do |r| + mv bin/r, libexec/"bin" + end + end + + def caveats + <<~EOS + slice2py, slice2js and slice2rb were installed in: + + #{opt_libexec}/bin + + You may wish to add this directory to your PATH. + EOS + end + + test do + (testpath/"Hello.ice").write <<~EOS + module Test + { + interface Hello + { + void sayHello(); + } + } + EOS + + port = free_port + + (testpath/"Test.cpp").write <<~CPP + #include + #include + + class HelloI : public Test::Hello + { + public: + virtual void sayHello(const Ice::Current&) override {} + }; + + int main(int argc, char* argv[]) + { + Ice::CommunicatorHolder ich(argc, argv); + auto adapter = ich->createObjectAdapterWithEndpoints("Hello", "default -h 127.0.0.1 -p #{port}"); + adapter->add(std::make_shared(), Ice::stringToIdentity("hello")); + adapter->activate(); + return 0; + } + CPP + + system bin/"slice2cpp", "Hello.ice" + system ENV.cxx, "-DICE_CPP11_MAPPING", "-std=c++11", "-c", "-I#{include}", "-I.", "Hello.cpp" + system ENV.cxx, "-DICE_CPP11_MAPPING", "-std=c++11", "-c", "-I#{include}", "-I.", "Test.cpp" + system ENV.cxx, "-L#{lib}", "-o", "test", "Test.o", "Hello.o", "-lIce++11", "-pthread" + system "./test" + end +end diff --git a/Formula/i/icecast.rb b/Formula/i/icecast.rb new file mode 100644 index 0000000000000..4e52a86fa0986 --- /dev/null +++ b/Formula/i/icecast.rb @@ -0,0 +1,73 @@ +class Icecast < Formula + desc "Streaming MP3 audio server" + homepage "https://icecast.org/" + url "https://ftp.osuosl.org/pub/xiph/releases/icecast/icecast-2.4.4.tar.gz" + mirror "https://mirror.csclub.uwaterloo.ca/xiph/releases/icecast/icecast-2.4.4.tar.gz" + sha256 "49b5979f9f614140b6a38046154203ee28218d8fc549888596a683ad604e4d44" + license "GPL-2.0-only" + revision 2 + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/icecast/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)icecast[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "669009eaccd0b5a3963bc8e23516d6fc5092b75a956bc06f9a7157e0ee5c1896" + sha256 cellar: :any, arm64_sonoma: "499383218ab2e3a1b9d0de600ecfbd0ce9f792ba34333a782c072c3c5227ff2e" + sha256 cellar: :any, arm64_ventura: "f1dbdd4c3334a071987302de9a1bf78bcdda9fd4fd38599e7e8edba3d9b4dc49" + sha256 cellar: :any, arm64_monterey: "1cb64c4bfce898110241fde245ba51ee8f9ce59290f9274b9e0e02b6930dce06" + sha256 cellar: :any, arm64_big_sur: "bb94499394f61cbae3fd9f68626c22b93f8647007f79ac1ee4afb8d71f6774d9" + sha256 cellar: :any, sonoma: "999d8b13ea8aa849d73452c3eea6573fea4a67cbb15a4c2778e2c50cb98c3aea" + sha256 cellar: :any, ventura: "670f11797d9920650b98eef03ce127985f07ff919f2780ba83c37c12865b93bd" + sha256 cellar: :any, monterey: "70dcce0432592b1fd218c86a3594b7d38fd664f6bfd0ddfa6ad11ca914cd216c" + sha256 cellar: :any, big_sur: "1eace833c381d2fc1989670bf8fdfa38d444177c1c855477ffc3c47b659b1340" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c63fee692d5550f89e7c5f33a602c4d8fcdd9fb24fb35cf701bc69e6254cede" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a5ea433670e7f6a02c9ff502c6d65c56d6ea5c5e65c3eac418d3da2cf05cac2" + end + + depends_on "pkgconf" => :build + + depends_on "libogg" + depends_on "libvorbis" + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + def install + args = %W[ + --disable-silent-rules + --without-speex + --without-theora + --sysconfdir=#{etc} + --localstatedir=#{var} + ] + system "./configure", *args, *std_configure_args + system "make", "install" + end + + def post_install + (var/"log/icecast").mkpath + touch var/"log/icecast/access.log" + touch var/"log/icecast/error.log" + end + + test do + port = free_port + + cp etc/"icecast.xml", testpath/"icecast.xml" + inreplace testpath/"icecast.xml", "8000", "#{port}" + + pid = spawn "icecast", "-c", testpath/"icecast.xml", err: "/dev/null" + sleep 3 + + begin + assert_match "icestats", shell_output("curl localhost:#{port}/status-json.xsl") + ensure + Process.kill "TERM", pid + Process.wait pid + end + end +end diff --git a/Formula/i/icecream.rb b/Formula/i/icecream.rb new file mode 100644 index 0000000000000..72882fd9d6c6a --- /dev/null +++ b/Formula/i/icecream.rb @@ -0,0 +1,126 @@ +class Icecream < Formula + desc "Distributed compiler with a central scheduler to share build load" + homepage "https://en.opensuse.org/Icecream" + url "https://github.com/icecc/icecream/archive/refs/tags/1.4.tar.gz" + sha256 "249dcf74f0fc477ff9735ff0bdcdfaa4c257a864c4db5255d8b25c9f4fd20b6b" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_sequoia: "3e72ef8ca299726695641f68412f9071e3840671808710ae1d4fc09b120d73e8" + sha256 arm64_sonoma: "cd4ee875fc4006985db7d2caab6039e97ea091165f1c683e19dd104e54362890" + sha256 arm64_ventura: "95f69b28c10fbe5af6475f27d70bf86279839de46ef27c3ea08e76b8fa97772d" + sha256 arm64_monterey: "053f5583b18d4201020f59f9d4481a2d6c0b584c5bb3297038ddd9653d70998e" + sha256 arm64_big_sur: "1a26f6bb194f5e27212c555783574c81d56f4fcb5e3bdc410278f8f74b128016" + sha256 sonoma: "52b41894ec8d21e972bdbe27965b0c3113870a50f7d9a334e8bfb8a244585087" + sha256 ventura: "2b6b3e86015280b1ab00f8ced1ce1dad32800c316627d7cba4165931f44a58fc" + sha256 monterey: "781ad1cb41ba91d5bd7b2f6763807b3fd89a0ff30b572b8ec77273d713867c1e" + sha256 big_sur: "076868e850f3b6b5ae814e19b03528143ea5bb3f903edcdca14cac7ce3fbf4e8" + sha256 catalina: "a85e725c50fc4fad0d28621cd9c241326c516b3bfb32e01a4710615b0bcec4f5" + sha256 arm64_linux: "de2b7ebbe426439abbbeb9a93d329d802b7ac1c58cabe4fa47e9954ec0332ecd" + sha256 x86_64_linux: "9eef6bec6b3f10bb768c84872285e4ffe45e45ffcd4e05c4e7727c702875d044" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "docbook2x" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libarchive" + depends_on "lzo" + depends_on "zstd" + + on_linux do + depends_on "llvm" => :test + depends_on "libcap-ng" + end + + def install + args = %w[ + --disable-silent-rules + --enable-clang-wrappers + ] + + system "./autogen.sh" + system "./configure", *args, *std_configure_args + system "make", "install" + + # Manually install scheduler property list + (prefix/"#{plist_name}-scheduler.plist").write scheduler_plist + end + + def caveats + <<~EOS + To override the toolset with icecc, add to your path: + #{opt_libexec}/icecc/bin + EOS + end + + service do + run opt_sbin/"iceccd" + end + + def scheduler_plist + <<~EOS + + + + + Label + #{plist_name}-scheduler + ProgramArguments + + #{sbin}/icecc-scheduler + + RunAtLoad + + + + EOS + end + + test do + (testpath/"hello-c.c").write <<~C + #include + int main() + { + puts("Hello, world!"); + return 0; + } + C + system opt_libexec/"icecc/bin/gcc", "-o", "hello-c", "hello-c.c" + assert_equal "Hello, world!\n", shell_output("./hello-c") + + (testpath/"hello-cc.cc").write <<~CPP + #include + int main() + { + std::cout << "Hello, world!" << std::endl; + return 0; + } + CPP + system opt_libexec/"icecc/bin/g++", "-o", "hello-cc", "hello-cc.cc" + assert_equal "Hello, world!\n", shell_output("./hello-cc") + + (testpath/"hello-clang.c").write <<~C + #include + int main() + { + puts("Hello, world!"); + return 0; + } + C + system opt_libexec/"icecc/bin/clang", "-o", "hello-clang", "hello-clang.c" + assert_equal "Hello, world!\n", shell_output("./hello-clang") + + (testpath/"hello-cclang.cc").write <<~CPP + #include + int main() + { + std::cout << "Hello, world!" << std::endl; + return 0; + } + CPP + system opt_libexec/"icecc/bin/clang++", "-o", "hello-cclang", "hello-cclang.cc" + assert_equal "Hello, world!\n", shell_output("./hello-cclang") + end +end diff --git a/Formula/i/icemon.rb b/Formula/i/icemon.rb new file mode 100644 index 0000000000000..be120a0956015 --- /dev/null +++ b/Formula/i/icemon.rb @@ -0,0 +1,57 @@ +class Icemon < Formula + desc "Icecream GUI Monitor" + homepage "https://kfunk.org/tag/icemon/" + url "https://github.com/icecc/icemon/archive/refs/tags/v3.3.tar.gz" + sha256 "3caf14731313c99967f6e4e11ff261b061e4e3d0c7ef7565e89b12e0307814ca" + license "GPL-2.0-or-later" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "ee2a82f839e771368531ab54f76b5b17b54fbfdbe1ce4ff77671321b5913c35a" + sha256 cellar: :any, arm64_sonoma: "17248733e176763f0279735fd42c504e3e52f0845279e41a27e3c019703a607e" + sha256 cellar: :any, arm64_ventura: "93377ed3f7d1b598aa9b2c4f0dd5df364e5612fa91d1501282a35ce598e946fe" + sha256 cellar: :any, arm64_monterey: "ddd8e4ef2a9f056c9b1ea46968ce4e69b281816ef9c405514164d2ca65e4e61c" + sha256 cellar: :any, arm64_big_sur: "f6c322e1fbdd9f73d1a91dfd1e546f55b617cf9dbde7e22283a288a0b5013ec9" + sha256 cellar: :any, sonoma: "d8d8974be93462dfcde940fcbb20a85f3bc68d891de8e1c58b06e1eb90b39d12" + sha256 cellar: :any, ventura: "1ecf54b786d25c305bb35ee4133434643a6ea112cd1098513c3d6f6d9a054c04" + sha256 cellar: :any, monterey: "a1f66afcc9a18f14e87f6f3e631f1372f7b7d244b642d5f7f05da155d8710b06" + sha256 cellar: :any, big_sur: "f691df436bfddef842f8e64a3b5272b9be0d3faa902a0c8b7d6a1f940445c080" + sha256 cellar: :any, catalina: "dbbc9d249e23f8d6fcb3cdab7f8ff0a981134a4b7d3280355748d0b74a19c395" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f6c890302532ee361d184142ec1153513e8d5be413c2479d2b9fc4146137b43" + end + + depends_on "cmake" => :build + depends_on "extra-cmake-modules" => :build + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + + depends_on "icecream" + depends_on "lzo" + depends_on "qt@5" + depends_on "zstd" + + on_macos do + depends_on "libarchive" + end + + on_linux do + depends_on "libcap-ng" + end + + def install + args = ["-DECM_DIR=#{Formula["extra-cmake-modules"].opt_share}/ECM/cmake"] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + if OS.mac? + system bin/"icemon", "--version" + else + output = shell_output("#{bin}/icemon --version 2>&1", 134) + assert_match "qt.qpa.xcb: could not connect to display", output + end + end +end diff --git a/Formula/i/icloudpd.rb b/Formula/i/icloudpd.rb new file mode 100644 index 0000000000000..e646ce7619499 --- /dev/null +++ b/Formula/i/icloudpd.rb @@ -0,0 +1,179 @@ +class Icloudpd < Formula + include Language::Python::Virtualenv + + desc "Tool to download photos from iCloud" + homepage "https://github.com/icloud-photos-downloader/icloud_photos_downloader" + # We use a git checkout as scripts/patch_version runs git commands to update SHA + url "https://github.com/icloud-photos-downloader/icloud_photos_downloader.git", + tag: "v1.27.5", + revision: "ee21fdf518569f8836fd9a945c438e25cc9a2065" + license "MIT" + head "https://github.com/icloud-photos-downloader/icloud_photos_downloader.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f0d54cfaec8c90744723bc432e63f0ae845df3616ed284b4a586b2e0cc3e01c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a8ff0aa8ae29dc10f43a31e0d2959f8d0cb857f15ce78938cc01b03be77a0044" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aa483406a5949be879208cf94209a8cea474dae8843aa3377c7575ab0d1b6ae9" + sha256 cellar: :any_skip_relocation, sonoma: "c70347d1b14bb624a3f3d877eefaa53c77b4e8e9c042570d4e1e12b3658609c4" + sha256 cellar: :any_skip_relocation, ventura: "93c78c13b30859432920ba01996d69452a6164bfc0dddc9879774d3f390e6599" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d6c620beb5f44ce446c997ea10bf56acc0b0b3ce1330e4e5bfc5dadb35ef8fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e4885032aa8be43cfb8ee17b5470a7363a07ad19059fbe948f1d871e6c63f93b" + end + + depends_on "certifi" + depends_on "python@3.13" + + on_macos do + depends_on "gnu-sed" => :build + 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/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "flask" do + url "https://files.pythonhosted.org/packages/89/50/dff6380f1c7f84135484e176e0cac8690af72fa90e932ad2a0a60e28c69b/flask-3.1.0.tar.gz" + sha256 "5f873c5184c897c8d9d1b05df1e3d01b14910ce69607a117bd3277098a5836ac" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "itsdangerous" do + url "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz" + sha256 "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + 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 "keyrings-alt" do + url "https://files.pythonhosted.org/packages/5c/7b/e3bf53326e0753bee11813337b1391179582ba5c6851b13e0d9502d15a50/keyrings_alt-5.0.2.tar.gz" + sha256 "8f097ebe9dc8b185106502b8cdb066c926d2180e13b4689fd4771a3eab7d69fb" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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 "piexif" do + url "https://files.pythonhosted.org/packages/fa/84/a3f25cec7d0922bf60be8000c9739d28d24b6896717f44cc4cfb843b1487/piexif-1.1.3.zip" + sha256 "83cb35c606bf3a1ea1a8f0a25cb42cf17e24353fd82e87ae3884e74a302a5f1b" + 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 "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "schema" do + url "https://files.pythonhosted.org/packages/d4/01/0ea2e66bad2f13271e93b729c653747614784d3ebde219679e41ccdceecd/schema-0.7.7.tar.gz" + sha256 "7da553abd2958a19dc2547c388cde53398b39196175a9be59ea1caf5ab0a1807" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "srp" do + url "https://files.pythonhosted.org/packages/8d/fb/9210875dd162d3977580407b1c5ce6e779e770b8197a0de76819144a9755/srp-1.0.22.tar.gz" + sha256 "f330d0ec7387e2ac8577487b164963155d4a031bca6e2024f1b0930eb92baa5d" + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/04/d3/c19d65ae67636fe63953b20c2e4a8ced4497ea232c43ff8d01db16de8dc0/tzlocal-5.2.tar.gz" + sha256 "8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/e4/e8/6ff5e6bc22095cfc59b6ea711b687e2b7ed4bdb373f7eeec370a97d7392f/urllib3-1.26.20.tar.gz" + sha256 "40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32" + end + + resource "waitress" do + url "https://files.pythonhosted.org/packages/bf/cb/04ddb054f45faa306a230769e868c28b8065ea196891f09004ebace5b184/waitress-3.0.2.tar.gz" + sha256 "682aaaf2af0c44ada4abfb70ded36393f0e307f4ab9456a215ce0020baefc31f" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + def install + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" if OS.mac? + # https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/922#issuecomment-2252928501 + system "scripts/patch_version" + + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output(bin/"icloudpd --version") + + output = shell_output(bin/"icloudpd -u brew -p brew --auth-only 2>&1", 1) + assert_match "Authenticating...", output + end +end diff --git a/Formula/i/icon-naming-utils.rb b/Formula/i/icon-naming-utils.rb new file mode 100644 index 0000000000000..b7ee2bb27e505 --- /dev/null +++ b/Formula/i/icon-naming-utils.rb @@ -0,0 +1,161 @@ +class IconNamingUtils < Formula + desc "Script to handle icon names in desktop icon themes" + homepage "https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html" + # Upstream seem to have enabled by default SSL/TLS across whole domain which + # is problematic when the cert is for www rather than a wildcard or similar. + # url "http://tango.freedesktop.org/releases/icon-naming-utils-0.8.90.tar.gz" + url "https://deb.debian.org/debian/pool/main/i/icon-naming-utils/icon-naming-utils_0.8.90.orig.tar.gz" + sha256 "044ab2199ed8c6a55ce36fd4fcd8b8021a5e21f5bab028c0a7cdcf52a5902e1c" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3caca3e4bf1e45408fdd966f46f860a0fd9002f471a1fa258e9c3c66ab28b204" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4875c2788c7c77a35e9af5ecda0d4ba48ec06668ed12acd5b95b77860a8e25ca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d9b0891567661143495e9cb87f7811d66a7e980e26d403fdbd3485590f9bbf7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0d9b0891567661143495e9cb87f7811d66a7e980e26d403fdbd3485590f9bbf7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b212434c2f761da7a71beffe6984969eda3f0b97853ad70a2c4b9318efb35f06" + sha256 cellar: :any_skip_relocation, sonoma: "4875c2788c7c77a35e9af5ecda0d4ba48ec06668ed12acd5b95b77860a8e25ca" + sha256 cellar: :any_skip_relocation, ventura: "0d9b0891567661143495e9cb87f7811d66a7e980e26d403fdbd3485590f9bbf7" + sha256 cellar: :any_skip_relocation, monterey: "0d9b0891567661143495e9cb87f7811d66a7e980e26d403fdbd3485590f9bbf7" + sha256 cellar: :any_skip_relocation, big_sur: "f5f035a7553f25b130f64662cfea9fe25d8db0b7697f7f61e6ad52be8b8f24c5" + sha256 cellar: :any_skip_relocation, catalina: "6ed447fa2e57d32cc048b551ee67339d2be52d89f124e9dfddb3322cc0882883" + sha256 cellar: :any_skip_relocation, mojave: "7845482b7512d560f5363c75ae0e6d457bb22d9f2bd1820052b580f65a689a1f" + sha256 cellar: :any_skip_relocation, high_sierra: "1ab22bc216fc60fe05436993a1d451542a5f57a12ecf835c85f5c850574e54f3" + sha256 cellar: :any_skip_relocation, sierra: "d824a2df63a9615bb242c197af07ce18f6a6a046df9c785fe31d5f39d986f4ed" + sha256 cellar: :any_skip_relocation, el_capitan: "f8a29d74289a555ba7969b8d8f6984de7251393d7d0270e61abf69d36f270fc0" + sha256 cellar: :any_skip_relocation, arm64_linux: "089bbe93b74c60c6520d3269999e652427cf02a30e8825a7e70261af6ba7beaf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2808ba5e1f6d084d4f424e084ead17462349b6b2c5d60e5162ecd633c7e3be2f" + end + + depends_on "pkgconf" => :test + + uses_from_macos "perl" + + # XML::Simple dependency tree + on_linux do + depends_on "expat" + + resource "Clone" do + url "https://cpan.metacpan.org/authors/id/G/GA/GARU/Clone-0.46.tar.gz" + sha256 "aadeed5e4c8bd6bbdf68c0dd0066cb513e16ab9e5b4382dc4a0aafd55890697b" + 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 "HTML::HeadParser" 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 "HTTP::Date" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Date-6.06.tar.gz" + sha256 "7b685191c6acc3e773d1fc02c95ee1f9fae94f77783175f5e78c181cc92d2b52" + 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 "HTTP::Request" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Message-6.46.tar.gz" + sha256 "e27443434150d2d1259bb1e5c964429f61559b0ae34b5713090481994936e2a5" + 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 "LWP::UserAgent" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.77.tar.gz" + sha256 "94a907d6b3ea8d966ef43deffd4fa31f5500142b4c00489bfd403860a5f060e4" + 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 "Time::Zone" do + url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/TimeDate-2.33.tar.gz" + sha256 "c0b69c4b039de6f501b0d9f13ec58c86b040c1f7e9b27ef249651c143d605eb2" + 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::Escape" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.28.tar.gz" + sha256 "e7985da359b15efd00917fa720292b711c396f2f9f9a7349e4e7dec74aa79765" + 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::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::SAX::Expat" do + url "https://cpan.metacpan.org/authors/id/B/BJ/BJOERN/XML-SAX-Expat-0.51.tar.gz" + sha256 "4c016213d0ce7db2c494e30086b59917b302db8c292dcd21f39deebd9780c83f" + 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 + + 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" + if r.name == "XML::SAX::Expat" + ENV.deparallelize { system "make", "install" } + else + system "make", "install" + end + end + end + end + + system "./configure", *std_configure_args + system "make", "install" + return unless OS.linux? + + libexec.install libexec/"icon-name-mapping" => "icon-name-mapping.pl" + (libexec/"icon-name-mapping").write_env_script libexec/"icon-name-mapping.pl", PERL5LIB: ENV["PERL5LIB"] + chmod "+x", libexec/"icon-name-mapping" + end + + test do + assert_equal libexec.to_s, shell_output("pkgconf --variable=program_path icon-naming-utils").chomp + assert_match "Usage: icon-name-mapping", shell_output(libexec/"icon-name-mapping", 1) + end +end diff --git a/Formula/i/icon.rb b/Formula/i/icon.rb new file mode 100644 index 0000000000000..3ecc8de193435 --- /dev/null +++ b/Formula/i/icon.rb @@ -0,0 +1,43 @@ +class Icon < Formula + desc "General-purpose programming language" + homepage "https://www2.cs.arizona.edu/icon/" + url "https://github.com/gtownsend/icon/archive/refs/tags/v9.5.24b.tar.gz" + version "9.5.24b" + sha256 "85d695ab34d62f86d5b08f5bde91200026c1fc5a67f33f47c498f96e72543c62" + license :public_domain + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+[a-z]?)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a20d67451650cdfea1f41e28644395e799c8cb02de9e9dc452d5ceffee1a6833" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ecc07e8c403f9de87e9be35a1e130633b38dcfb081c427b11db3a72c14d457f7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ce83ff988cba709e562c1f9eb10b83b213dac39c0fbf5f35a0c604e5d946b395" + sha256 cellar: :any_skip_relocation, sonoma: "b0b3a9d4c3edecb4a85b91b50b434c0d2e1340ca56fd363255ad21e7e3d67566" + sha256 cellar: :any_skip_relocation, ventura: "305fba963c8ec8927afab6c2418cc27833fe06dd384549d2c84dfc6f68e556fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "3add527d5661f110ee2fbd4a9c9fd45c125570c6ffae22a302e4c0f2d54fe927" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd4a8c1440be1ac2b3dee44a515b8b0b9a173081242f1afa024a82bb03fa88f5" + end + + def install + ENV.deparallelize + target = if OS.mac? + "macintosh" + else + "linux" + end + system "make", "Configure", "name=#{target}" + system "make" + bin.install "bin/icon", "bin/icont", "bin/iconx" + doc.install Dir["doc/*"] + man1.install Dir["man/man1/*.1"] + end + + test do + args = "'procedure main(); writes(\"Hello, World!\"); end'" + output = shell_output("#{bin}/icon -P #{args}") + assert_equal "Hello, World!", output + end +end diff --git a/Formula/i/iconsur.rb b/Formula/i/iconsur.rb new file mode 100644 index 0000000000000..321b7028df9c7 --- /dev/null +++ b/Formula/i/iconsur.rb @@ -0,0 +1,87 @@ +class Iconsur < Formula + include Language::Python::Virtualenv + + desc "macOS Big Sur Adaptive Icon Generator" + homepage "https://github.com/rikumi/iconsur" + # Keep extra_packages in pypi_formula_mappings.json aligned with + # https://github.com/rikumi/iconsur/blob/#{version}/src/fileicon.sh#L230 + url "https://registry.npmjs.org/iconsur/-/iconsur-1.7.0.tgz" + sha256 "d732df6bbcaf1418c6f46f9148002cbc1243814692c1c0e5c0cebfcff001c4a1" + license "MIT" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba4be0ff656530a2a787c34d2b8c9502a0bb6448dd3d76198ff9d9a295769303" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4c5b0753cf7a6dd13ecc8fa8ca6d8e511f1f8658a907e793e8cce001164f669a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "81f49f558f09ca338470b0599e6c8e2254a85b31e7a098dada4dac32bd5f2de5" + sha256 cellar: :any_skip_relocation, sonoma: "80a8c9d1251b6015fa7070d4a07a82fe39b6b70d2a1bf148a468cf8f28dd9467" + sha256 cellar: :any_skip_relocation, ventura: "652b5bdaa7162f802914ec320be23b44f1984f58a967cb5488dfa354a46b678c" + end + + depends_on :macos + depends_on "node" + + # Uses /usr/bin/python on older macOS. Otherwise, it will use python3 from PATH. + # Since fileicon.sh runs `pip3 install --user` to install any missing packages, + # this causes issues if a user has Homebrew Python installed (EXTERNALLY-MANAGED). + # We instead prepare a virtualenv with all missing packages. + on_monterey :or_newer do + depends_on "python@3.13" + end + + resource "pyobjc-core" do + url "https://files.pythonhosted.org/packages/b7/40/a38d78627bd882d86c447db5a195ff307001ae02c1892962c656f2fd6b83/pyobjc_core-10.3.1.tar.gz" + sha256 "b204a80ccc070f9ab3f8af423a3a25a6fd787e228508d00c4c30f8ac538ba720" + end + + resource "pyobjc-framework-cocoa" do + url "https://files.pythonhosted.org/packages/a7/6c/b62e31e6e00f24e70b62f680e35a0d663ba14ff7601ae591b5d20e251161/pyobjc_framework_cocoa-10.3.1.tar.gz" + sha256 "1cf20714daaa986b488fb62d69713049f635c9d41a60c8da97d835710445281a" + + # Backport commit to avoid Xcode.app dependency. Remove in the next release + # https://github.com/ronaldoussoren/pyobjc/commit/864a21829c578f6479ac6401d191fb759215175e + patch :DATA + end + + def install + system "npm", "install", *std_npm_args + + if MacOS.version >= :monterey + # Help `pyobjc-framework-cocoa` pick correct SDK after removing -isysroot from Python formula + ENV.append_to_cflags "-isysroot #{MacOS.sdk_path}" + + venv = virtualenv_create(libexec/"venv", "python3.13") + venv.pip_install resources + bin.install libexec.glob("bin/*") + bin.env_script_all_files libexec/"bin", PATH: "#{venv.root}/bin:${PATH}" + else + bin.install_symlink libexec.glob("bin/*") + end + end + + test do + mkdir testpath/"Test.app" + system bin/"iconsur", "set", testpath/"Test.app", "-k", "AppleDeveloper" + system bin/"iconsur", "cache" + system bin/"iconsur", "unset", testpath/"Test.app" + end +end + +__END__ +--- a/pyobjc_setup.py ++++ b/pyobjc_setup.py +@@ -510,15 +510,6 @@ def Extension(*args, **kwds): + % (tuple(map(int, os_level.split(".")[:2]))) + ) + +- # XCode 15 has a bug w.r.t. weak linking for older macOS versions, +- # fall back to older linker when using that compiler. +- # XXX: This should be in _fixup_compiler but doesn't work there... +- lines = subprocess.check_output(["xcodebuild", "-version"], text=True).splitlines() +- if lines[0].startswith("Xcode"): +- xcode_vers = int(lines[0].split()[-1].split(".")[0]) +- if xcode_vers >= 15: +- ldflags.append("-Wl,-ld_classic") +- + if os_level == "10.4": + cflags.append("-DNO_OBJC2_RUNTIME") diff --git a/Formula/i/icoutils.rb b/Formula/i/icoutils.rb new file mode 100644 index 0000000000000..155a7e83e158f --- /dev/null +++ b/Formula/i/icoutils.rb @@ -0,0 +1,49 @@ +class Icoutils < Formula + desc "Create and extract MS Windows icons and cursors" + homepage "https://www.nongnu.org/icoutils/" + url "https://savannah.nongnu.org/download/icoutils/icoutils-0.32.3.tar.bz2" + sha256 "17abe02d043a253b68b47e3af69c9fc755b895db68fdc8811786125df564c6e0" + license "GPL-3.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/icoutils/" + regex(/href=.*?icoutils[._-](\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "1f134eb8d5bfda13e1afd2742d87488abb2bd651f0ec059b6bbea76add8a647f" + sha256 cellar: :any, arm64_sonoma: "273cfd4c47669dcb185b256f41952316faeb9c7f263c86e602b81e5b1d4c9302" + sha256 cellar: :any, arm64_ventura: "6d0b6015b32488d5eadeed7af574b0b07c8071dfaae487a41f5306585eb8510b" + sha256 cellar: :any, arm64_monterey: "cca2c49761f3c0c2c4d8261af392cb156b43d49e99d16af0962584717c1e2ad3" + sha256 cellar: :any, arm64_big_sur: "561bdf394863bd566ebfd0f9f5c5cb084d9eeeeb21c4013dc67f49ca2f382d68" + sha256 cellar: :any, sonoma: "09886292b02d85b40a34e8dfe38379b89455ed50cb0002313f88e022906e4927" + sha256 cellar: :any, ventura: "bc125498f4fb92c602479703be80ef4e1870dd4f74159e1ed0d2fd801179ba75" + sha256 cellar: :any, monterey: "23f46510e0108a2342a83ba36aa2b11346d18a3f5ae29aa238cb249f3e4fa3e8" + sha256 cellar: :any, big_sur: "2f71fa8b1131f534d2d7d674642091a80f61108a376240bd6e19c92d436aecfe" + sha256 arm64_linux: "628929761f445827749c377cd6309471d0f4f5e70f3f70b6004d052f3dd8d1d0" + sha256 x86_64_linux: "4bcbbfe1270c90d060baf5fe79eea7cd07daaae074c110b57e8505eac348cdb8" + end + + depends_on "libpng" + + on_monterey :or_newer do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + inreplace "common/Makefile.am", "libcommon_a_LIBADD", "libcommon_la_LIBADD" + + # Workaround for Xcode 14 ld. + system "autoreconf", "--force", "--install", "--verbose" if OS.mac? && MacOS.version >= :monterey + + system "./configure", "--disable-rpath", *std_configure_args + system "make", "install" + end + + test do + system bin/"icotool", "-l", test_fixtures("test.ico") + end +end diff --git a/Formula/i/icu4c@74.rb b/Formula/i/icu4c@74.rb new file mode 100644 index 0000000000000..c7e6c1296a048 --- /dev/null +++ b/Formula/i/icu4c@74.rb @@ -0,0 +1,46 @@ +class Icu4cAT74 < Formula + desc "C/C++ and Java libraries for Unicode and globalization" + homepage "https://icu.unicode.org/home" + url "https://github.com/unicode-org/icu/releases/download/release-74-2/icu4c-74_2-src.tgz" + version "74.2" + sha256 "68db082212a96d6f53e35d60f47d38b962e9f9d207a74cfac78029ae8ff5e08c" + license "ICU" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d9b0dc95a406d340373bf75d6d013cc53e8815d0c0b550e584b4006a7aba12f0" + sha256 cellar: :any, arm64_sonoma: "2216fec75032a12c4a442448ca23fed421eb94374e2e9994e6db0c51eae60ed2" + sha256 cellar: :any, arm64_ventura: "1870714606c1792b9ca84cb9c07028c745575c8f3219c629f56c27b1b333ce25" + sha256 cellar: :any, sonoma: "715c3ec07d1056f609f7b670fa6b8767aa508d4e8e4f93b2ae15a635b77715c4" + sha256 cellar: :any, ventura: "81c9ad51d30a5b4d33c4b2a1c89d46d27bc4e6c8f1ffe8f723bf2c8d1bb27901" + sha256 cellar: :any_skip_relocation, arm64_linux: "13a2717a6454f814a899079cc2276e062b839b19ef5be9c026efb289c3d93775" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99595c8a778c7b3161baed663fb738a28213e9e31797aa558f6c5bb5ab239c3d" + end + + keg_only :versioned_formula + + disable! date: "2025-05-01", because: :versioned_formula + + def install + args = %w[ + --disable-samples + --disable-tests + --enable-static + --with-library-bits=64 + ] + + cd "source" do + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + end + + test do + if File.exist? "/usr/share/dict/words" + system bin/"gendict", "--uchars", "/usr/share/dict/words", "dict" + else + (testpath/"hello").write "hello\nworld\n" + system bin/"gendict", "--uchars", "hello", "dict" + end + end +end diff --git a/Formula/i/icu4c@75.rb b/Formula/i/icu4c@75.rb new file mode 100644 index 0000000000000..66c420919dbf6 --- /dev/null +++ b/Formula/i/icu4c@75.rb @@ -0,0 +1,50 @@ +class Icu4cAT75 < Formula + desc "C/C++ and Java libraries for Unicode and globalization" + homepage "https://icu.unicode.org/home" + url "https://github.com/unicode-org/icu/releases/download/release-75-1/icu4c-75_1-src.tgz" + version "75.1" + sha256 "cb968df3e4d2e87e8b11c49a5d01c787bd13b9545280fc6642f826527618caef" + license "ICU" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "4f07c25ad9219c64a89315c92926a4ed100abee56ca8239697f4d4ed96fc8c4e" + sha256 cellar: :any, arm64_sonoma: "992749cb6ae752008a3ae031fdc6972833f7ccece25557990797abedb65cdc34" + sha256 cellar: :any, arm64_ventura: "bc6e3f3b55834a9d8ed02b27160c5fad0fc51083d3d75a5241ac7fb6396ac2d0" + sha256 cellar: :any, sonoma: "db53be7588fef20af9fd3b8c065119fddc412c40715784cc92329d22c01c655b" + sha256 cellar: :any, ventura: "9f3b96254d2b5ddddff97938832693cadf666c2ea7d9d6085eb8e04358f54b2a" + sha256 cellar: :any_skip_relocation, arm64_linux: "b7aa60fe9cc6f1483265c013fb1f08a69c63340fa01ed077334df38afb815430" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9ba262410561b5fcd350ddadb7b0704ccabca5d2556817caf5e3ab31560ef25" + end + + keg_only :versioned_formula + + # Disable date set 1 year after ICU 76.1 release + disable! date: "2025-10-24", because: :versioned_formula + + def install + odie "Major version bumps need a new formula!" if version.major.to_s != name[/@(\d+)$/, 1] + + args = %w[ + --disable-samples + --disable-tests + --enable-static + --with-library-bits=64 + ] + + cd "source" do + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + end + + test do + if File.exist? "/usr/share/dict/words" + system bin/"gendict", "--uchars", "/usr/share/dict/words", "dict" + else + (testpath/"hello").write "hello\nworld\n" + system bin/"gendict", "--uchars", "hello", "dict" + end + end +end diff --git a/Formula/i/icu4c@76.rb b/Formula/i/icu4c@76.rb new file mode 100644 index 0000000000000..ee4d26ec4953c --- /dev/null +++ b/Formula/i/icu4c@76.rb @@ -0,0 +1,48 @@ +class Icu4cAT76 < Formula + desc "C/C++ and Java libraries for Unicode and globalization" + homepage "https://icu.unicode.org/home" + url "https://github.com/unicode-org/icu/releases/download/release-76-1/icu4c-76_1-src.tgz" + version "76.1" + sha256 "dfacb46bfe4747410472ce3e1144bf28a102feeaa4e3875bac9b4c6cf30f4f3e" + license "ICU" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "36740927f8bdb436e6a4fa4066ac13d32edaaf4125ba3f20ca12e18d7eecbd6f" + sha256 cellar: :any, arm64_sonoma: "75dc3baf41567d78c356904dd11c66d4a052dc81fc8f06b574d169a10f373b94" + sha256 cellar: :any, arm64_ventura: "07be73f27660fabda108d0ac346f862763a871b6ac1b257b1e84ab234a6ca2b4" + sha256 cellar: :any, sonoma: "15465a73773821af7d4b86219a496664b677b426794a43d1231ee57f86241ee8" + sha256 cellar: :any, ventura: "d7186e6b5e4a11a0614ecc251633825ade3a548f8bdedce230dc0d2982c3ff78" + sha256 cellar: :any_skip_relocation, arm64_linux: "c4057b22ba207185f7afd794e22e6d69f587e3d4f94f6e51069632b66b507cc4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96de6e1689d33123805108c40a8411dfa341b1cfc963af19ecd8f1ffe63b30b0" + end + + keg_only :versioned_formula + + # Deprecated with ICU 77.1 release + deprecate! date: "2025-03-29", because: :versioned_formula + + def install + args = %w[ + --disable-samples + --disable-tests + --enable-static + --with-library-bits=64 + ] + + cd "source" do + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + end + + test do + if File.exist? "/usr/share/dict/words" + system bin/"gendict", "--uchars", "/usr/share/dict/words", "dict" + else + (testpath/"hello").write "hello\nworld\n" + system bin/"gendict", "--uchars", "hello", "dict" + end + end +end diff --git a/Formula/i/icu4c@77.rb b/Formula/i/icu4c@77.rb new file mode 100644 index 0000000000000..51db6bd418ca1 --- /dev/null +++ b/Formula/i/icu4c@77.rb @@ -0,0 +1,57 @@ +class Icu4cAT77 < Formula + desc "C/C++ and Java libraries for Unicode and globalization" + homepage "https://icu.unicode.org/home" + url "https://github.com/unicode-org/icu/releases/download/release-77-1/icu4c-77_1-src.tgz" + version "77.1" + sha256 "588e431f77327c39031ffbb8843c0e3bc122c211374485fa87dc5f3faff24061" + license "ICU" + + # We allow the livecheck to detect new `icu4c` major versions in order to + # automate version bumps. To make sure PRs are created correctly, we output + # an error during installation to notify when a new formula is needed. + livecheck do + url :stable + regex(/^release[._-]v?(\d+(?:[.-]\d+)+)$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.tr("-", ".") } + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "19f6b5fef0cdf1dfc7f136ca103348ec8530ffdf8012273f6ee4a6159cdfaf75" + sha256 cellar: :any, arm64_sonoma: "f2b3a9d78e046b3b1ca1f06227272c0ea25490bd8efa4c98a33ffdcc734452ff" + sha256 cellar: :any, arm64_ventura: "425a38eb7a7a1bb54dd25ac58194ef89d79caf1777a01fb244ed37487c1f7d80" + sha256 cellar: :any, sonoma: "54d609febedd08e8a4a825435d85f6d4db045f586523edb8965434e8e9c93fa6" + sha256 cellar: :any, ventura: "6f04d1757707495212ff68722bab629766329874ef7d0531e756903dff5022cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d633e676a17c418e7e1e6e58d41a7c61856f06cf198a3efa97e4a5489ab0196" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f82d4ca07fbdcf99cb5553ae9cf298bbff475a465f13e1c5d934dcbcb1e14741" + end + + keg_only :shadowed_by_macos, "macOS provides libicucore.dylib (but nothing else)" + + def install + odie "Major version bumps need a new formula!" if version.major.to_s != name[/@(\d+)$/, 1] + + args = %w[ + --disable-samples + --disable-tests + --enable-static + --with-library-bits=64 + ] + + cd "source" do + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + end + + test do + if File.exist? "/usr/share/dict/words" + system bin/"gendict", "--uchars", "/usr/share/dict/words", "dict" + else + (testpath/"hello").write "hello\nworld\n" + system bin/"gendict", "--uchars", "hello", "dict" + end + end +end diff --git a/Formula/i/id3ed.rb b/Formula/i/id3ed.rb new file mode 100644 index 0000000000000..66b2b408a7cf2 --- /dev/null +++ b/Formula/i/id3ed.rb @@ -0,0 +1,43 @@ +class Id3ed < Formula + desc "ID3 tag editor for MP3 files" + homepage "https://web.archive.org/web/20230604094705/http://code.fluffytapeworm.com/projects/id3ed" + url "https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/id3ed-1.10.4.tar.gz" + sha256 "56f26dfde7b6357c5ad22644c2a379f25fce82a200264b5d4ce62f2468d8431b" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f4fd74264459035f47365eaedfcd7eb24a140a9165e1f5d911229349c25d1557" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ee1364fbe79738671595a35b7050d96ce311d8653d317f0f3ac6a23f8e853c18" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2b6b901c8500506fbec5ace1aad481fae193b52264a0c40f1911b94f1f4961d4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ec8b1d5f390522de640fa294bf2d3c45b2f8aba7ed9711cb7698ed0ce998e935" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0adb83739ee928667c488d4213369f5854900380f159219d0f04dc929ff731cc" + sha256 cellar: :any_skip_relocation, sonoma: "8744bdcf51ddb52130d9daf02707f6f87220c8dd9b8a79aecdc01827e3fd1995" + sha256 cellar: :any_skip_relocation, ventura: "e18e3ce1e739fcbfe0efe68334c6e1bb38e789b13be19fdbf4d8edd4e8382769" + sha256 cellar: :any_skip_relocation, monterey: "a4e6c6805d84b99c9302f9656e19c6430489d6518ff154f6983e2319e5d24c8f" + sha256 cellar: :any_skip_relocation, big_sur: "a560e42fb11482b14d22079ffa0ffb2dd2307f5e740b22acd2636b4fa6e4a307" + sha256 cellar: :any_skip_relocation, catalina: "9520d236327bce01cc292421934e19476163d8d72b4848740d3067cbc71b2572" + sha256 cellar: :any_skip_relocation, mojave: "2079b26fd26395f4eb016c61afafa007045d7b87b5030b05650705959c3bd87a" + sha256 cellar: :any_skip_relocation, high_sierra: "c31762b13640d1e9713ea26df41d5e9cb675a8d3565cd84b70efc526663ddfb8" + sha256 cellar: :any_skip_relocation, sierra: "e930552e37599e7926efebaf0d893f888576a26bddef6a91e356cf1b5de15b9e" + sha256 cellar: :any_skip_relocation, el_capitan: "6448c8e19c8e0874ed5141193c7db06c443ac6c33ab2f6bbe8811098b063c0d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0955550881e7f35fdf76fe198de7f2c1908d749978587c55cc9b5574ddafb2fd" + end + + disable! date: "2025-01-10", because: :repo_removed + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--bindir=#{bin}/", + "--mandir=#{man1}" + bin.mkpath + man1.mkpath + system "make", "install" + end + + test do + system bin/"id3ed", "-r", "-q", test_fixtures("test.mp3") + end +end diff --git a/Formula/i/id3lib.rb b/Formula/i/id3lib.rb new file mode 100644 index 0000000000000..d3ef3edc67f53 --- /dev/null +++ b/Formula/i/id3lib.rb @@ -0,0 +1,99 @@ +class Id3lib < Formula + desc "ID3 tag manipulation" + homepage "https://id3lib.sourceforge.net/" + license "LGPL-2.0-or-later" + revision 1 + head ":pserver:anonymous:@id3lib.cvs.sourceforge.net:/cvsroot/id3lib", using: :cvs, module: "id3lib-devel" + + stable do + url "https://downloads.sourceforge.net/project/id3lib/id3lib/3.8.3/id3lib-3.8.3.tar.gz" + sha256 "2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079" + + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/id3lib-vbr-overflow.patch" + sha256 "0ec91c9d89d80f40983c04147211ced8b4a4d8a5be207fbe631f5eefbbd185c2" + end + + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/id3lib-main.patch" + sha256 "83c8d2fa54e8f88b682402b2a8730dcbcc8a7578681301a6c034fd53e1275463" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2043f772a3513c2eeaf0c6c18894930ececbfc0a8480f7223995ed81abf00401" + sha256 cellar: :any, arm64_sonoma: "b881a2bd2bd818806f8b793da5064f7ecc09d2a675ea6a23ab688d5b3b9d2ef9" + sha256 cellar: :any, arm64_ventura: "d7b4e26e6b79cdc70261532ee5f64546900499c9dbfdf66c0959ea3a30c8a3a8" + sha256 cellar: :any, arm64_monterey: "bde33424b92f09c04a31be4efbb346254d6027b5bbc1bd290fd59dfd649b7e9a" + sha256 cellar: :any, arm64_big_sur: "7511c1df301e89112972d2b8aa0cc3711f4be7276317f345a26e64ae2a31143b" + sha256 cellar: :any, sonoma: "829007444977749e39c9fdb82c8a717fa339d95d783ac734dc33e44290798fb7" + sha256 cellar: :any, ventura: "0a4d41f11ad2eea0de2aa345508c35aab669de388368883e6fdab54ae845d12c" + sha256 cellar: :any, monterey: "a5dd0668b696e1d6c3ac17d1d516c2a41ea354606c9db893b90575d01f714a40" + sha256 cellar: :any, big_sur: "18f0b568466493ca322662357962fecfe1774844ad140be1c2d23443c2845ff3" + sha256 cellar: :any, catalina: "914ff24e2ca015f81b5c58fbd39f1a059c10ecbca87d09cf7e77285435bd158e" + sha256 cellar: :any, mojave: "fa00373e74d0b57967108dd48b652bf6750c742db31ab72ff9b7c8c777ba181e" + sha256 cellar: :any, high_sierra: "33c419dd2789c20e5e71b96185e41b2c81b2056d84b0e1a5cea0835e58dfb572" + sha256 cellar: :any, sierra: "1dddf1fac71acc4bd54cfcc6cdb80884129754d25f42efff5fbe6d5d38d99c0a" + sha256 cellar: :any, el_capitan: "266926f3fe3593bd04db9b9ff200676aaeb879d1f855e289cc41d2b40d72a16d" + sha256 cellar: :any_skip_relocation, arm64_linux: "be0089c2991abe20d74640693515a56a0883fc88effaa2fda69799cd0025a83c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5648fdcafc5fc4ea60431c568ff4856334be3a139e4d4d696257b58b1a6be09b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + uses_from_macos "zlib" + + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/no-iomanip.h.patch" + sha256 "da0bd9f3d17f1dd054720c17dfd15062eabdfc4d38126bb1b2ef5e8f39904925" + end + + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/automake.patch" + sha256 "c1ae2aa04baee7f92301cbed120340682e62e1f839bb61f8f6d3c459a7faf097" + end + + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/boolcheck.patch" + sha256 "a7881dc25665f284798934ba19092d1eb45ca515a34e5c473accd144aa1a215a" + end + + # fixes Unicode display problem in easytag: see Homebrew/homebrew-x11#123 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff" + sha256 "71c79002d9485965a3a93e87ecbd7fed8f89f64340433b7ccd263d21385ac969" + end + + patch :DATA + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end +end + +__END__ +--- a/include/id3/id3lib_strings.h ++++ b/include/id3/id3lib_strings.h +@@ -30,6 +30,7 @@ + #define _ID3LIB_STRINGS_H_ + + #include ++#include + + #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000)) + namespace std +--- a/include/id3/writers.h ++++ b/include/id3/writers.h +@@ -30,7 +30,7 @@ + + #include "id3/writer.h" + #include "id3/id3lib_streams.h" +-//#include ++#include + + class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer + { diff --git a/Formula/i/id3tool.rb b/Formula/i/id3tool.rb new file mode 100644 index 0000000000000..b4b7b3e08b06d --- /dev/null +++ b/Formula/i/id3tool.rb @@ -0,0 +1,49 @@ +class Id3tool < Formula + desc "ID3 editing tool" + homepage "http://nekohako.xware.cx/id3tool/" + url "http://nekohako.xware.cx/id3tool/id3tool-1.2a.tar.gz" + sha256 "7908d66c5aabe2a53ae8019e8234f4231485d80be4b2fe72c9d04013cff1caec" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?id3tool[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c0c5fde02924517f49e33c33f18430726f0b613bb013fa73d0eb035a6d34755f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e67faa6f3ae68053ff10e5e16e3dfad49dd3f67a578114109a143c6131c44391" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bd6e6e24689e48d6ec5c67fef4ab113b40d92b91a02d85a8d67744ad454e820e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "eaab957f04597caeef0f4d080d4e936743d154c3c0c2e62e228678f5d5123b58" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "eec5850fee5d290bad13de2cb4456b2e600560632be7b86309ac5c3f3f03697f" + sha256 cellar: :any_skip_relocation, sonoma: "75ad7009eb4917c7333de727e417b4057aca5256a85946f1b76dc72eb9e849ef" + sha256 cellar: :any_skip_relocation, ventura: "cef8ba04668ad9e85b60642b34da3c81c2cb9bcd6a509ed28cf50a99bd822699" + sha256 cellar: :any_skip_relocation, monterey: "3703e5cde176d1f1855da2b8091570378d77f64d7870222d5d6cf149d702cb74" + sha256 cellar: :any_skip_relocation, big_sur: "7a6a25738f1961b7ebb929fe0e4746a60ef71fd28af06ea305c5f5d95ef10e60" + sha256 cellar: :any_skip_relocation, catalina: "ec3431bcd97a7852c292f72d45de19ad742a2e18bc8d6830ce5fc6e2351a8d29" + sha256 cellar: :any_skip_relocation, mojave: "053ce5a2222cac2bdecff1e97e73110af9cfbb199b77441ec5db19b4fc7ef1ae" + sha256 cellar: :any_skip_relocation, high_sierra: "c98d949a63b2d26f6cff9d63d24ecdfbd48196f58111a9a244ec7319d2ea7c21" + sha256 cellar: :any_skip_relocation, sierra: "2b7bcf184092881638221c606ae50879d02478bf9d433dc946f63dbe2e68368a" + sha256 cellar: :any_skip_relocation, el_capitan: "b5b4d49b4710a67df5200149873dd8c17131ef4a4eaac722a2095b1445d053ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "15050e11c91c720f0382457f0daabad0e6edc395cfdcbbc50bad30ecfe551661" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bbe4dde2f28fb22ebd981fa3faa4db03f327a43531c102a6a47a463e0f329d6b" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + test do + test_mp3 = testpath/"test.mp3" + # needs to write the file to set the tags + cp test_fixtures("test.mp3"), test_mp3 + + system bin/"id3tool", "-t", "Homebrew", test_mp3 + assert_match(/Song Title:\s+Homebrew/, + shell_output("#{bin}/id3tool #{test_mp3}").chomp) + end +end diff --git a/Formula/i/id3v2.rb b/Formula/i/id3v2.rb new file mode 100644 index 0000000000000..1cc523609d813 --- /dev/null +++ b/Formula/i/id3v2.rb @@ -0,0 +1,50 @@ +class Id3v2 < Formula + desc "Command-line editor" + homepage "https://id3v2.sourceforge.net/" + url "https://downloads.sourceforge.net/project/id3v2/id3v2/0.1.12/id3v2-0.1.12.tar.gz" + sha256 "8105fad3189dbb0e4cb381862b4fa18744233c3bbe6def6f81ff64f5101722bf" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6d78452187f861e1e8ecf3a23a2e873e251ccda22403a855c86dff5aa6e5bb30" + sha256 cellar: :any, arm64_sonoma: "9bf6ca393764873ff61916821417e4bfbbe1564682ca2004fcbeef1525c211b7" + sha256 cellar: :any, arm64_ventura: "222ba809b014c313ebe411cff50e684b04ece17c3d2a380ac0b794b03c3aaae2" + sha256 cellar: :any, arm64_monterey: "d987f37e40ed136bf3eb8a46e867dad0a78f48a1b5457085161f90404b1eee20" + sha256 cellar: :any, arm64_big_sur: "4eb1279baa3350a16d82139446ab610aa897087821c2dd6fce2a12fac692f958" + sha256 cellar: :any, sonoma: "38486f0dc0335b2aef545f3da7f12019ac89485ef778b40271d90ddfbd1b4077" + sha256 cellar: :any, ventura: "585863c7e461122fa8ebcf700a1a87d6bc506f2b4ab21c472974f5c52dcc19b8" + sha256 cellar: :any, monterey: "f2ef072277b52404b538228954a139a02828b20696ffe12b968d1ae64a40d70a" + sha256 cellar: :any, big_sur: "363e3ccb0976eddc681538d70f43e498eafc6b03b31bcb1f3f4fccb2382790d9" + sha256 cellar: :any, catalina: "2476bad339650dc2c12e3dd074b3aba7058e9b3b07c9caf05d6f068ea216d9ef" + sha256 cellar: :any, mojave: "f0e2da49b513dce2ab73589b2aed98ae2cca184dbe082f92502d87e96ba9731d" + sha256 cellar: :any, high_sierra: "ca2c1296318425931c5eec52c70adf98665edeb19d5b681271c3b6353ddf171a" + sha256 cellar: :any, sierra: "3b1d75af49217a58f5ecb6f0e9e34564b299903898c76145218a6496de3a7778" + sha256 cellar: :any, el_capitan: "941e267b5a214013c8085c7918c0d8c1805c906cacf162191b764d2ae1df265f" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad8dba5a20ec860000a9f5768fd6f14031e910d7581841b972014c132ea802c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4b36bc47648e0f0c1f54755ba7320310a5bd321baa33aab440de475644a7c85" + end + + depends_on "id3lib" + + uses_from_macos "mandoc" => :build + uses_from_macos "zlib" + + def install + # mandoc is only available since Ventura, but nroff is available for older macOS + inreplace "Makefile", "nroff ", "mandoc " if !OS.mac? || MacOS.version >= :ventura + + # Fix linker flag order on Linux + inreplace "Makefile", "-lz -lid3", "-lid3 -lz" + + # tarball includes a prebuilt Linux binary, which will get installed + # by `make install` if `make clean` isn't run first + system "make", "clean" + bin.mkpath + man1.mkpath + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"id3v2", "--version" + end +end diff --git a/Formula/i/identme.rb b/Formula/i/identme.rb new file mode 100644 index 0000000000000..3702caf860e0a --- /dev/null +++ b/Formula/i/identme.rb @@ -0,0 +1,30 @@ +class Identme < Formula + desc "Public IP address lookup" + homepage "https://www.ident.me/" + url "https://github.com/pcarrier/ident.me/archive/refs/tags/v0.6.0.tar.gz" + sha256 "5e37f2f5b661ebe9731aab8d6d2ecdbea6e2239ea6f5ad1f2b158ea15fea947c" + license "0BSD" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "82d1f4cb80b8e2938b98e7f2607790e755f2426ba501b0c3c3168046c87f6bfc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3aaf58663a73cae3a4d7fbadb335ed1b6edcb06650f87ed7e5e866699ab85c03" + sha256 cellar: :any_skip_relocation, arm64_ventura: "477637b5d904ee0681549d058fcfb5a02bc6b567acc4b46e56116aa4e8b1116a" + sha256 cellar: :any_skip_relocation, sonoma: "9c44759d0efa524f4fb1dd080df603c5e76f07979e20cbd046d67a79f663ad4f" + sha256 cellar: :any_skip_relocation, ventura: "4767ff40b495e2121372fa1b63eec1ec3af427349550df21620422071120f023" + sha256 cellar: :any_skip_relocation, arm64_linux: "7374807cd07652348ba7d65f83719f748cca06c79f98a3384ba581ac57e6ed66" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab6f811abc28c9e9eb8402f34187210d1ee43ad0e915891c57f6a3962b43f22d" + end + + depends_on "cmake" => :build + uses_from_macos "curl" + + def install + system "cmake", "-S", "cli", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "ipv4", shell_output("#{bin}/identme --json -4") + end +end diff --git a/Formula/i/ideviceinstaller.rb b/Formula/i/ideviceinstaller.rb new file mode 100644 index 0000000000000..f9801ad7aa47c --- /dev/null +++ b/Formula/i/ideviceinstaller.rb @@ -0,0 +1,41 @@ +class Ideviceinstaller < Formula + desc "Tool for managing apps on iOS devices" + homepage "https://libimobiledevice.org/" + url "https://github.com/libimobiledevice/ideviceinstaller/releases/download/1.1.1/ideviceinstaller-1.1.1.tar.bz2" + sha256 "deb883ec97f2f88115aab39f701b83c843e9f2b67fe02f5e00a9a7d6196c3063" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/libimobiledevice/ideviceinstaller.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "42ce06edd2a59ca8e25f460c6d66689c04587f4779bf4ef4f965b5c7d01b89c4" + sha256 cellar: :any, arm64_sonoma: "818061a6b3ede66696892086a119faa1df036d6d4a3242672fdb955db0d23e6c" + sha256 cellar: :any, arm64_ventura: "dfaf6de5dc0578c882412ef904195d77a6aacf7f1b9b28855ba5d8610ce17ca1" + sha256 cellar: :any, arm64_monterey: "64803ee9f44f71a81476e4f609a96be3c33276da4eaa07f5f4c402e758fbd18c" + sha256 cellar: :any, arm64_big_sur: "b76c11584f52a003b8b473a8b6e74a44244255b372d129a9dc0c89ae920a6c6b" + sha256 cellar: :any, sonoma: "904a3bd25f933d636a094b0f16aaa8559fddac5c50f13e749b533c02f7717de6" + sha256 cellar: :any, ventura: "cca7171c1e51ae86824029858e05c382a4f8088644aa0ac1d075c8d8a901b5ee" + sha256 cellar: :any, monterey: "baade9b3f29b7de45b0ddfd66f911eadaba2b7d4a2fe6601e69f660757400ff7" + sha256 cellar: :any, big_sur: "76b96ca732ae1bbba325139477cca6fe6f601cb62f0435232e497d619c56d828" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f75dd2a9a73912f8e655a54be16b59e92a99db898d95bd482dde4d2f434d6f9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "85e4dd1751770e3068d164a48202b714923ac6acb344934f67ee2c9b6bd5b375" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libimobiledevice" + depends_on "libplist" + depends_on "libzip" + + def install + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, *std_configure_args + system "make", "install" + end + + test do + assert_match "Manage apps on iOS devices", shell_output("#{bin}/ideviceinstaller --help") + end +end diff --git a/Formula/i/idnits.rb b/Formula/i/idnits.rb new file mode 100644 index 0000000000000..4771e34d20346 --- /dev/null +++ b/Formula/i/idnits.rb @@ -0,0 +1,28 @@ +class Idnits < Formula + desc "Looks for problems in internet draft formatting" + homepage "https://github.com/ietf-tools/idnits" + url "https://github.com/ietf-tools/idnits/archive/refs/tags/2.17.1.tar.gz" + sha256 "195ed8c9bfd38fbaf1ecb674a894f98f43be774dfecc37da5ef953ccba99ce76" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0821ceb278c9bb73ef75f4aa1ebeca58d6e5264d4360d63ccdf0d1b43e23d2e6" + end + + def install + bin.install "idnits" + end + + test do + resource "homebrew-test" do + url "https://tools.ietf.org/id/draft-tian-frr-alt-shortest-path-01.txt" + sha256 "dd20ac54e5e864cfd426c7fbbbd7a1c200eeff5b7b4538ba3a929d9895f01b76" + end + + testpath.install resource("homebrew-test") + system bin/"idnits", "draft-tian-frr-alt-shortest-path-01.txt" + + assert_match "idnits\t#{version}", shell_output("#{bin}/idnits --version") + end +end diff --git a/Formula/i/idris2.rb b/Formula/i/idris2.rb new file mode 100644 index 0000000000000..f0ced1f1746f0 --- /dev/null +++ b/Formula/i/idris2.rb @@ -0,0 +1,56 @@ +class Idris2 < Formula + desc "Pure functional programming language with dependent types" + homepage "https://www.idris-lang.org/" + url "https://github.com/idris-lang/Idris2/archive/refs/tags/v0.7.0.tar.gz" + sha256 "7a8612a1cd9f1f737893247260c6942bf93f193375d4b3df0148f7abf74d6e14" + license "BSD-3-Clause" + revision 4 + head "https://github.com/idris-lang/Idris2.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f2e9a79eac9603493e64a21505f127cc98d64e418b5fbfd82ed02a9144b7dcb5" + sha256 cellar: :any, arm64_sonoma: "5b85059f83fe007bbf8de891999e16da762694cdec97ba66ad304f65c9a6e149" + sha256 cellar: :any, arm64_ventura: "0a53ba9dcbb69069d2dcfa18c41a92507f950b7cba74e805f10be724e10cafcd" + sha256 cellar: :any, sonoma: "dbc307d2c2f47d019a8cc3a172434e05187bc1bc62f342d0c8b598b72a07e5ee" + sha256 cellar: :any, ventura: "f6eec5a8db64201ed600264c4ab6348fcbe70c9901d8c7f2337ad18530c3450e" + sha256 arm64_linux: "a0b776d5066bf8834d1ce1afc5b84ec6c514b7ad7c5cbe253875f320a514d6de" + sha256 x86_64_linux: "1bd3781f33f5138c4e88482b003c084ac56294258bc0115ee999d54a01290c99" + end + + depends_on "gmp" => :build + depends_on "chezscheme" + + on_high_sierra :or_older do + depends_on "zsh" => :build + end + + def install + scheme = Formula["chezscheme"].opt_bin/"chez" + + ENV.deparallelize + ENV["CHEZ"] = scheme + system "make", "bootstrap", "SCHEME=#{scheme}", "PREFIX=#{libexec}" + system "make", "install", "PREFIX=#{libexec}" + system "make", "install-with-src-libs", "PREFIX=#{libexec}" + ENV.prepend_path "PATH", "#{libexec}/bin" + system "make", "install-with-src-api", "PREFIX=#{libexec}" + bin.install_symlink libexec/"bin/idris2" + lib.install_symlink Dir[libexec/"lib"/shared_library("*")] + generate_completions_from_executable(libexec/"bin/idris2", "--bash-completion-script", "idris2", + shells: [:bash], shell_parameter_format: :none) + end + + test do + (testpath/"hello.idr").write <<~EOS + module Main + main : IO () + main = + let myBigNumber = (the Integer 18446744073709551615 + 1) in + putStrLn $ "Hello, Homebrew! This is a big number: " ++ ( show $ myBigNumber ) + EOS + + system bin/"idris2", "hello.idr", "-o", "hello" + assert_equal "Hello, Homebrew! This is a big number: 18446744073709551616", + shell_output("./build/exec/hello").chomp + end +end diff --git a/Formula/i/idsgrep.rb b/Formula/i/idsgrep.rb new file mode 100644 index 0000000000000..68bbbc45cc6f7 --- /dev/null +++ b/Formula/i/idsgrep.rb @@ -0,0 +1,48 @@ +class Idsgrep < Formula + desc "Grep for Extended Ideographic Description Sequences" + homepage "https://tsukurimashou.org/idsgrep.php.en" + url "https://tsukurimashou.org/files/idsgrep-0.6.tar.gz" + sha256 "2c07029bab12d9ceefddf447ce4213535b68d020b093a593190c2afa8a577c7c" + license "GPL-3.0-only" + + livecheck do + url :homepage + regex(/href=.*idsgrep[._-]v?(\d+(?:\.\d+)+)\.t*/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9195c89da2a586ec7c5d86d4b7da682d4d358ff39581755414f6040dce4db197" + sha256 cellar: :any, arm64_sonoma: "cd0cd350e0b1880c10cdb41eb85aa6a2f72829b08bffb5ef4c507ae9b75359e4" + sha256 cellar: :any, arm64_ventura: "a674cfac9231215819fb5c3d6dc777f4b4ed316d2b1ef85bf959e5eb199d4414" + sha256 cellar: :any, sonoma: "f3e253e90dc6299cce14e78d01062c00aa36894449e1a2d24c93b1080613ae0f" + sha256 cellar: :any, ventura: "4a17486e3c1cd52db67298ab9ec094c171a46ae0636bc460a112b80453944645" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f532dc4ea8d251de9f344575f969d869ad14be07deffa3c86c090112232d008" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5570ed64d7e567b0ca54977415c5b45653b7e5ad1aa04ff9f2d6e30d048a536" + end + + depends_on "cmake" => :build + depends_on "pcre" + + def install + system "./configure", "--disable-silent-rules" + system "make", "idsgrep" + bin.install "idsgrep" + man1.install "idsgrep.1" + pkgshare.install "chise.eids" + end + + test do + expected = <<~EOS + 【䲤】⿰⻥<酒>⿰氵酉 + 【酒】⿰氵酉 + 【鿐】⿰魚<酒>⿰氵酉 + 【𤄍】⿰<酒>⿰氵酉<留>⿱;刀田 + 【𦵩】⿱艹<酒>⿰氵酉 + 【𫇓】⿳⿴𦥑<林>⿰木木冖<酒>⿰氵酉 + 【𬜂】⿱⿴𦥑<林>⿰木木<酒>⿰氵酉 + 【𭊼】⿱<酒>⿰氵酉<吒>⿰口<乇>⿱丿七 + 【𭳒】⿰<酒>⿰氵酉<或>⿹戈⿱口一 + EOS + assert_equal expected, shell_output("#{bin}/idsgrep -d '...酒' #{pkgshare}/chise.eids") + end +end diff --git a/Formula/i/idutils.rb b/Formula/i/idutils.rb new file mode 100644 index 0000000000000..ff6242ab99f2d --- /dev/null +++ b/Formula/i/idutils.rb @@ -0,0 +1,80 @@ +class Idutils < Formula + desc "ID database and query tools" + homepage "https://www.gnu.org/software/idutils/" + url "https://ftp.gnu.org/gnu/idutils/idutils-4.6.tar.xz" + mirror "https://ftpmirror.gnu.org/idutils/idutils-4.6.tar.xz" + sha256 "8181f43a4fb62f6f0ccf3b84dbe9bec71ecabd6dfdcf49c6b5584521c888aac2" + license "GPL-3.0-or-later" + revision 1 + + bottle do + rebuild 2 + sha256 arm64_sequoia: "63d48bcd08d23874fff1f37a66c022c47c10c085549405f4fa8cdb4ba8d34b28" + sha256 arm64_sonoma: "cfeadacc331e01cf64d880d4f9b35a54870ea30594d638b58f245f4cda394469" + sha256 arm64_ventura: "c410f473b777ac344a863267348be1dc14f587c28f6c3a5845cc556ce52ba843" + sha256 arm64_monterey: "072b4846a5c749954544e7b747d2951d4ee43a4bd6f024e817ac74743cdeefa7" + sha256 arm64_big_sur: "321fd582b7e17f7f912f76f0b5e8f57d16ebf9ea6c8721854c2567df8136fe28" + sha256 sonoma: "3107240f1d74fde8a91d009fadbdbd2a3e2e0384476735365c9d87a919421d2c" + sha256 ventura: "1d29ee25c018fa81e5cc297091cb8190fa0dbdb54c2ad21c8909cff989e8703c" + sha256 monterey: "e3fc421fedb08ac46a82fb2dd8127f4c7c03c6103d943b53a49e8220406ed157" + sha256 big_sur: "4e20dbb5fa6efb604aba5c3fab7b2fe948517c16569a3c27fa5b314e0d0730bf" + sha256 catalina: "7e27c7bad2b5d30c4ee26ffb21cf0412706e83c17d0d55b7cefd1f63c919063c" + sha256 arm64_linux: "a82f5ffc54658cb4994b62c8db6217395eb90e9b863b2b4de410ef267db66ce9" + sha256 x86_64_linux: "54a8af17aba2695b61bd976d6ae4bf2f13c45cec787b1c14b497080d5bac9ce9" + end + + conflicts_with "coreutils", because: "both install `gid` and `gid.1`" + + patch :p0 do + on_high_sierra :or_newer do + url "https://raw.githubusercontent.com/macports/macports-ports/b76d1e48dac/editors/nano/files/secure_snprintf.patch" + sha256 "57f972940a10d448efbd3d5ba46e65979ae4eea93681a85e1d998060b356e0d2" + end + end + + # Fix build on Linux. Upstream issue: + # https://savannah.gnu.org/bugs/?57429 + # Patch submitted here: + # https://savannah.gnu.org/patch/index.php?10240 + patch :DATA + + def install + args = ["--disable-silent-rules", "--with-lispdir=#{elisp}"] + 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? + # Workaround to use outdated gnulib with glibc 2.28+ based on gnulib fix[^1]. + # Upstream updated to newer gnulib[^2] which should fix issue in next release. + # + # [^1]: https://github.com/coreutils/gnulib/commit/4af4a4a71827c0bc5e0ec67af23edef4f15cee8e + # [^2]: https://git.savannah.gnu.org/cgit/idutils.git/commit/?id=6efa403e105381a468d8b2cb8c254c1c217d1b53 + ENV.append_to_cflags "-D_IO_ftrylockfile -D_IO_IN_BACKUP=0x100" + end + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + usr = if OS.mac? + "#{MacOS.sdk_path_if_needed}/usr" + else + "/usr" + end + system bin/"mkid", "#{usr}/include" + + system bin/"lid", "FILE" + end +end + +__END__ +diff --git a/lib/stdio.in.h b/lib/stdio.in.h +index 0481930..79720e0 100644 +--- a/lib/stdio.in.h ++++ b/lib/stdio.in.h +@@ -715,7 +715,6 @@ _GL_CXXALIASWARN (gets); + /* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ +-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + #endif diff --git a/Formula/i/ievms.rb b/Formula/i/ievms.rb new file mode 100644 index 0000000000000..4fa736a0bc886 --- /dev/null +++ b/Formula/i/ievms.rb @@ -0,0 +1,19 @@ +class Ievms < Formula + desc "Automated installation of Microsoft IE AppCompat virtual machines" + homepage "https://xdissent.github.io/ievms/" + url "https://github.com/xdissent/ievms/archive/refs/tags/v0.3.3.tar.gz" + sha256 "95cafdc295998712c3e963dc4a397d6e6a823f6e93f2c119e9be928b036163be" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "64f7839125fd69525935b7cd3eee26cb7ef05010105218c3135d7ac81f7cd0db" + end + + disable! date: "2024-08-12", because: :no_license + + depends_on "unar" + + def install + bin.install "ievms.sh" => "ievms" + end +end diff --git a/Formula/i/ifacemaker.rb b/Formula/i/ifacemaker.rb new file mode 100644 index 0000000000000..8b167ec8c2fa9 --- /dev/null +++ b/Formula/i/ifacemaker.rb @@ -0,0 +1,44 @@ +class Ifacemaker < Formula + desc "Generate interfaces from structure methods" + homepage "https://github.com/vburenin/ifacemaker" + url "https://github.com/vburenin/ifacemaker/archive/refs/tags/v1.3.0.tar.gz" + sha256 "36d1b93300169c2d9d607fc7c082ff62914300e2d20f67250113d0f9acf71457" + license "Apache-2.0" + head "https://github.com/vburenin/ifacemaker.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6154bb922ed27a72a91b0d10e5ec06218ff8b9a49b247fae68a65dbc948621f0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6154bb922ed27a72a91b0d10e5ec06218ff8b9a49b247fae68a65dbc948621f0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6154bb922ed27a72a91b0d10e5ec06218ff8b9a49b247fae68a65dbc948621f0" + sha256 cellar: :any_skip_relocation, sonoma: "6bfa1e6a33785aedb8ccdf3cb1289a4401000966fbaeea575f5b40cfd3dca554" + sha256 cellar: :any_skip_relocation, ventura: "6bfa1e6a33785aedb8ccdf3cb1289a4401000966fbaeea575f5b40cfd3dca554" + sha256 cellar: :any_skip_relocation, arm64_linux: "3965817642d73ac92add1f56c90513f1aea6afb7aa0062554ced5e4811e0f8a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "25971c5b2fee2f1a24f267bef1f1e9a6070a1f3f5bfa6a693012dc07b2de1d13" + end + + depends_on "go" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"human.go").write <<~GO + package main + + type Human struct { + name string + } + + // Returns the name of our Human. + func (h *Human) GetName() string { + return h.name + } + GO + + output = shell_output("#{bin}/ifacemaker -f human.go -s Human -i HumanIface -p humantest " \ + "-y \"HumanIface makes human interaction easy\"" \ + "-c \"DONT EDIT: Auto generated\"") + assert_match "type HumanIface interface", output + end +end diff --git a/Formula/i/ifstat.rb b/Formula/i/ifstat.rb new file mode 100644 index 0000000000000..55e39fcce2f3d --- /dev/null +++ b/Formula/i/ifstat.rb @@ -0,0 +1,75 @@ +class Ifstat < Formula + desc "Tool to report network interface bandwidth" + homepage "http://gael.roualland.free.fr/ifstat/" + url "http://gael.roualland.free.fr/ifstat/ifstat-1.1.tar.gz" + sha256 "8599063b7c398f9cfef7a9ec699659b25b1c14d2bc0f535aed05ce32b7d9f507" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=["']?ifstat[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7929e573cc9e8172c16c8a9d4a5c3ff51fb02ba824a70c4e749cea56e9d33ed2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "077e591c44a830e200e6587ea68eefdc06be3fd5ab6eafe867743b3f24a4d498" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7c6dab0fa026b8e652bdefaf589924b6dab3ec148299090b9df4cb645aa5f7e7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e47fd692e61f239ebcf2f92d7bd6bf039f5f5eed49a3ccd699cc2075125667a4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b10871840559de217d7a096eccc52f9f4115be20d03eee1c17c97e60e331ac0d" + sha256 cellar: :any_skip_relocation, sonoma: "26750a5b02680ff19a5d8009360516de185fa5e048fa8ef1924e92549597f962" + sha256 cellar: :any_skip_relocation, ventura: "be15673cd3ce2675c9e2e350891ad0c888c0691b53be77f649a95556ca810307" + sha256 cellar: :any_skip_relocation, monterey: "963b568e9888e27dbbc4b93d94231713104fbe0ea48093eb6363b719dbb773f7" + sha256 cellar: :any_skip_relocation, big_sur: "e78cdbeab6d2b938879ae80e9a611ea2042cf2806f9d2447b6117518d545083b" + sha256 cellar: :any_skip_relocation, catalina: "bc3d531dc3b4f6ff78a4acac901a9e6afc21a7994d7cbc3403839a5ae68b68b3" + sha256 cellar: :any_skip_relocation, mojave: "cd3e855e0608177b9aebf545faeb17a4bad84e093a8ed6a84193b9583a94dc92" + sha256 cellar: :any_skip_relocation, high_sierra: "8e385a8fdf00266e63bd7a3af17cdcf07da3cb86a08bd3431cfa3b4cc88bb7a5" + sha256 cellar: :any_skip_relocation, sierra: "99eada14bfc555bd8f64d447bddd8a53c7325afed40446e5edbcfb5d7bdc7dd6" + sha256 cellar: :any_skip_relocation, el_capitan: "e3b3f843c9fba2770a49dd7abcdacc30aa6b5e57f06b5ed96f09d20ada58bd6f" + sha256 cellar: :any_skip_relocation, arm64_linux: "ccc66717dd6d93615459286fc714279141b2bbbaabe598dbc0aab40215161a43" + sha256 cellar: :any_skip_relocation, x86_64_linux: "80bb1ac13a6750229f428e108b349523896fa1bbe1823300f07e366e58cfa1c9" + end + + # Fixes 32/64 bit incompatibility + patch :DATA + + 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/"ifstat", "-v" + end +end + +__END__ +diff --git a/drivers.c b/drivers.c +index d5ac501..47fb320 100644 +--- a/drivers.c ++++ b/drivers.c +@@ -593,7 +593,8 @@ static int get_ifcount() { + int ifcount[] = { + CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_SYSTEM, IFMIB_IFCOUNT + }; +- int count, size; ++ int count; ++ size_t size; + + size = sizeof(count); + if (sysctl(ifcount, sizeof(ifcount) / sizeof(int), &count, &size, NULL, 0) < 0) { +@@ -607,7 +608,7 @@ static int get_ifdata(int index, struct ifmibdata * ifmd) { + int ifinfo[] = { + CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_IFDATA, index, IFDATA_GENERAL + }; +- int size = sizeof(*ifmd); ++ size_t size = sizeof(*ifmd); + + if (sysctl(ifinfo, sizeof(ifinfo) / sizeof(int), ifmd, &size, NULL, 0) < 0) + return 0; diff --git a/Formula/i/iftop.rb b/Formula/i/iftop.rb new file mode 100644 index 0000000000000..50cf11e6c9000 --- /dev/null +++ b/Formula/i/iftop.rb @@ -0,0 +1,68 @@ +# Version is "pre-release", but is what Debian, MacPorts, etc. +# package, and upstream has not had any movement in a long time. +class Iftop < Formula + desc "Display an interface's bandwidth usage" + homepage "https://pdw.ex-parrot.com/iftop/" + url "https://pdw.ex-parrot.com/iftop/download/iftop-1.0pre4.tar.gz" + sha256 "f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97" + license "GPL-2.0-or-later" + + # We have to allow the regex to match prerelease versions (e.g., 1.0pre4) + # until there's a new stable version. The newest version was released on + # 2014-01-19, so it could be a while. + livecheck do + url "https://pdw.ex-parrot.com/iftop/download/" + regex(/href=.*?iftop[._-]v?(\d+(?:\.\d+)+(?:pre\d+)?)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a3d6d2dbbb5f10a3cc0043846d9742314b1795d77f08dae5a2ce8abfe9696f3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f516ed09bb4c7f8b6fb01626b6a822a382c88d5a26329798f3139f7998192f6e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b385697e4cd0da7d4c88d0e9b1425653086fca957782db41c2b2ed93dbe0f9e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4656226f9f98a40b6b4dee8c6af89d09f6d34b506663e7cbd985935d74285529" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f97b05b386f2d60baf56d271e6ced20679c9bc38b147479d65bb78baa84d19d" + sha256 cellar: :any_skip_relocation, sonoma: "c8d45797f98dcb4ef91e762c716766de3da3c04b7c977300ea4e73ff34b8712d" + sha256 cellar: :any_skip_relocation, ventura: "fc562e7e272bf086b60ecc29385410ddd173d3814f500c6d880a6c4c0afa8a56" + sha256 cellar: :any_skip_relocation, monterey: "e68a2edd94cef76e72ce249aca7ba6b6eed43e839fae0c55efcbc90c3f88758a" + sha256 cellar: :any_skip_relocation, big_sur: "fd0f1539789e93b6b2149414831853597471ffcdf92759de42470704b4aaed57" + sha256 cellar: :any_skip_relocation, catalina: "8f40152f928f5f63f777b7dd1780951d451defffb30517f657b1850448a2f5ab" + sha256 cellar: :any_skip_relocation, mojave: "aaa2c283765b4fe9d1f3e7af3e71f145f3eecceb72b284ecf3daa806052ae3a9" + sha256 cellar: :any_skip_relocation, high_sierra: "c582f943657323d52493e9b85d05a9ac5b079dd1bb74075fbcd5952f2758fbd7" + sha256 cellar: :any_skip_relocation, sierra: "3a75c5edf29f6cbac19641910661423ed2f0b83f3e0de28c8417be76f4ce5c38" + sha256 cellar: :any_skip_relocation, el_capitan: "e7b9ed6bef435d7de8e986cedfc76779f2655bfac7ed780afb33a42e92b8d01d" + sha256 cellar: :any_skip_relocation, arm64_linux: "74167e8ae57c728a312c3008a6039f7ef440bc59e0cd6f7a80db27a244697133" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eef5cd5b14c8b7b2e7964b39a3833a2cbe3253d93905157f92632c78555a8190" + end + + head do + url "https://code.blinkace.com/pdw/iftop.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + uses_from_macos "libpcap" + uses_from_macos "ncurses" + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # (resolves "multiple definition of `...'" errors) + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "./bootstrap" if build.head? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end + + def caveats + <<~EOS + iftop requires root privileges so you will need to run `sudo iftop`. + You should be certain that you trust any software you grant root privileges. + EOS + end + + test do + assert_match "interface:", pipe_output("#{sbin}/iftop -t -s 1 2>&1") + end +end diff --git a/Formula/i/ifuse.rb b/Formula/i/ifuse.rb new file mode 100644 index 0000000000000..edcd701d58d45 --- /dev/null +++ b/Formula/i/ifuse.rb @@ -0,0 +1,43 @@ +class Ifuse < Formula + desc "FUSE module for iOS devices" + homepage "https://libimobiledevice.org/" + license "LGPL-2.1-or-later" + revision 2 + head "https://github.com/libimobiledevice/ifuse.git", branch: "master" + + stable do + url "https://github.com/libimobiledevice/ifuse/archive/refs/tags/1.1.4.tar.gz" + sha256 "2a00769e8f1d8bad50898b9d00baf12c8ae1cda2d19ff49eaa9bf580e5dbe78c" + + # Backport support for libfuse 3 + patch do + url "https://github.com/libimobiledevice/ifuse/commit/36956a5179e224f57ebb9d0f01314c09c8bf0f97.patch?full_index=1" + sha256 "47c87159f085977bc728f586c975b343f67bdf221b164bfef10a572546e80df3" + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "734a650c8068975a04496c7efc513167c327b7202a112698745cea919ad75a6d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c1e2348ff0c16c8d70685fb9112a77739aec3317e21079527dcb2abb0f99e8e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libfuse" + depends_on "libimobiledevice" + depends_on "libplist" + depends_on :linux # on macOS, requires closed-source macFUSE + + def install + system "./autogen.sh", *std_configure_args + system "make", "install" + end + + test do + # Actual test of functionality requires osxfuse, so test for expected failure instead + assert_match "ERROR: No device found!", shell_output("#{bin}/ifuse --list-apps", 1) + end +end diff --git a/Formula/i/ignite.rb b/Formula/i/ignite.rb new file mode 100644 index 0000000000000..64f6950080997 --- /dev/null +++ b/Formula/i/ignite.rb @@ -0,0 +1,31 @@ +class Ignite < Formula + desc "Build, launch, and maintain any crypto application with Ignite CLI" + homepage "https://docs.ignite.com/" + url "https://github.com/ignite/cli/archive/refs/tags/v28.10.0.tar.gz" + sha256 "92fb98e8af121fefffd2e333c6affa27bfb209bcfab7fd744b5852748a96e812" + license "Apache-2.0" + head "https://github.com/ignite/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b1cb8a0ecc1805f09980c52907e6f797b3dbafa1b45d22f33914d65a32149f16" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "66c6f7356f621f87d9c526a3676cbdc489dfc336b0c475fe417e7a5f22315226" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dd2e9d9b1d8c659dc1d9f0830ee41a0efd5c4b1e5380a8eadd2c59c73db5c43e" + sha256 cellar: :any_skip_relocation, sonoma: "bc9c4f987bd94796563c7ead67a7a743703d6bbdf58f42dbfc4a4fc62a03e7ba" + sha256 cellar: :any_skip_relocation, ventura: "937380c6deabd83d481c55696a7bbc8cb64d31241c1b6481851e4c24d21768d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ff38a04ba6c4a08132bd9d460a159da9c431eac244f3ad6f7d08589f549c688" + end + + depends_on "go" + depends_on "node" + + def install + system "go", "build", "-mod=readonly", *std_go_args(ldflags: "-s -w", output: bin/"ignite"), "./ignite/cmd/ignite" + end + + test do + ENV["DO_NOT_TRACK"] = "1" + system bin/"ignite", "s", "chain", "mars" + sleep 2 + assert_path_exists testpath/"mars/go.mod" + end +end diff --git a/Formula/i/igraph.rb b/Formula/i/igraph.rb new file mode 100644 index 0000000000000..4bc53ab3b2957 --- /dev/null +++ b/Formula/i/igraph.rb @@ -0,0 +1,72 @@ +class Igraph < Formula + desc "Network analysis package" + homepage "https://igraph.org/" + url "https://github.com/igraph/igraph/releases/download/0.10.15/igraph-0.10.15.tar.gz" + sha256 "03ba01db0544c4e32e51ab66f2356a034394533f61b4e14d769b9bbf5ad5e52c" + license "GPL-2.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "05e858933d67bf168bb125e3cb2e6037bbeb28197f9a22a998d513ce1bf7289c" + sha256 cellar: :any, arm64_sonoma: "79aecc04dda8059ec114e1562dd5ac4e1051b22c9bc2ed53f44b11fccc69af4d" + sha256 cellar: :any, arm64_ventura: "405a45f59e91eb93a06222d9b3bb4d6dbddea521acb0c302362fb8507d91055c" + sha256 cellar: :any, sonoma: "aed39268ccb1453bfb2bdc91bd6324cb84cb97a5d8510f63f1a8969579594d0f" + sha256 cellar: :any, ventura: "a5d07f29fc614f21980859db3f9b3557972033c7f2a64284253f7213abf5d4f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "3156331b8e0752a21a710c5c64b8e0894dadc6d80083e56409f39195879a05a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc2fe384bb82430e1a4671ba9ff56d2a2579250e3b2ab3748b49eb6a2b654635" + end + + depends_on "cmake" => :build + depends_on "arpack" + depends_on "glpk" + depends_on "gmp" + depends_on "openblas" + + uses_from_macos "libxml2" + + def install + # explanation of extra options: + # * we want a shared library, not a static one + # * link-time optimization should be enabled if the compiler supports it + # * thread-local storage of global variables is enabled + # * force the usage of external dependencies from Homebrew where possible + # * GraphML support should be compiled in (needs libxml2) + # * BLAS and LAPACK should come from OpenBLAS + # * prevent the usage of ccache even if it is installed to ensure that we + # have a clean build + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DIGRAPH_ENABLE_LTO=AUTO", + "-DIGRAPH_ENABLE_TLS=ON", + "-DIGRAPH_GLPK_SUPPORT=ON", + "-DIGRAPH_GRAPHML_SUPPORT=ON", + "-DIGRAPH_USE_INTERNAL_ARPACK=OFF", + "-DIGRAPH_USE_INTERNAL_BLAS=OFF", + "-DIGRAPH_USE_INTERNAL_GLPK=OFF", + "-DIGRAPH_USE_INTERNAL_GMP=OFF", + "-DIGRAPH_USE_INTERNAL_LAPACK=OFF", + "-DBLA_VENDOR=OpenBLAS", + "-DUSE_CCACHE=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) { + igraph_real_t diameter; + igraph_t graph; + igraph_rng_seed(igraph_rng_default(), 42); + igraph_erdos_renyi_game(&graph, IGRAPH_ERDOS_RENYI_GNP, 1000, 5.0/1000, IGRAPH_UNDIRECTED, IGRAPH_NO_LOOPS); + igraph_diameter(&graph, &diameter, 0, 0, 0, 0, IGRAPH_UNDIRECTED, 1); + printf("Diameter = %f\\n", (double) diameter); + igraph_destroy(&graph); + } + C + system ENV.cc, "test.c", "-I#{include}/igraph", "-L#{lib}", + "-ligraph", "-lm", "-o", "test" + assert_match "Diameter = 8", shell_output("./test") + end +end diff --git a/Formula/i/iguana.rb b/Formula/i/iguana.rb new file mode 100644 index 0000000000000..9f3540d4bc573 --- /dev/null +++ b/Formula/i/iguana.rb @@ -0,0 +1,39 @@ +class Iguana < Formula + desc "Universal serialization engine" + homepage "https://github.com/qicosmos/iguana" + url "https://github.com/qicosmos/iguana/archive/refs/tags/1.0.9.tar.gz" + sha256 "b6e3f11a0c37538e84e25397565f5f12b0e6810e582bce7f3ca046425b0b1edf" + license "Apache-2.0" + head "https://github.com/qicosmos/iguana.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f67499cf80e3b24af53d4a7cc8c8f0f61fcbd603ded5ee734589a7fa3002deb0" + end + + depends_on "frozen" + + def install + include.install "iguana" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + struct person + { + std::string name; + int age; + }; + auto main() -> int { + person p = { "tom", 28 }; + std::string ss; + iguana::to_json(p, ss); + std::cout << ss << std::endl; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++20", "-L#{lib}", "-o", "test" + assert_equal "{\"name\":\"tom\",\"age\":28}", shell_output("./test").chomp + end +end diff --git a/Formula/i/igv.rb b/Formula/i/igv.rb new file mode 100644 index 0000000000000..a1a41d646875c --- /dev/null +++ b/Formula/i/igv.rb @@ -0,0 +1,35 @@ +class Igv < Formula + desc "Interactive Genomics Viewer" + homepage "https://igv.org/doc/desktop/" + url "https://data.broadinstitute.org/igv/projects/downloads/2.19/IGV_2.19.4.zip" + sha256 "3065b3311c4ff33240e8b8ffbc623c9df142bd1b89934f2bf33f341e56b63d04" + license "MIT" + + livecheck do + url "https://igv.org/doc/desktop/DownloadPage/" + regex(/href=.*?IGV[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "cd73c0dcc21998edf82de77487f1a16ab3d55c39a03f228eec5c6df90b03ba03" + end + + depends_on "openjdk" + + def install + inreplace ["igv.sh", "igvtools"], /^prefix=.*/, "prefix=#{libexec}" + bin.install "igv.sh" => "igv" + bin.install "igvtools" + libexec.install "igv.args", "lib" + bin.env_script_all_files libexec, Language::Java.overridable_java_home_env + end + + test do + assert_match "Usage:", shell_output("#{bin}/igvtools") + assert_match "org/broad/igv/ui/IGV.class", shell_output("#{Formula["openjdk"].bin}/jar tf #{libexec}/lib/igv.jar") + + ENV.append "_JAVA_OPTIONS", "-Duser.home=#{testpath}" + (testpath/"script").write "exit" + assert_match "Using system JDK.", shell_output("#{bin}/igv -b script") + end +end diff --git a/Formula/i/ii.rb b/Formula/i/ii.rb new file mode 100644 index 0000000000000..79a928c31c4bb --- /dev/null +++ b/Formula/i/ii.rb @@ -0,0 +1,46 @@ +class Ii < Formula + desc "Minimalist IRC client" + homepage "https://tools.suckless.org/ii/" + url "https://dl.suckless.org/tools/ii-2.0.tar.gz" + sha256 "4f67afcd208c07939b88aadbf21497a702ad0a07f9b5a6ce861f9f39ffe5425b" + license "MIT" + head "https://git.suckless.org/ii", using: :git, branch: "master" + + livecheck do + url "https://dl.suckless.org/tools/" + regex(/href=.*?ii[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ab84f7b5884e3b926510c76631987ea2eb214d73c0595af30063c7b0131fe759" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eeaebb7ec193ae9299db69b34cecf80665a50d2820a69c2ed053142af6d4de40" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ea782f684a234374c02653e45ba15f4f08b8472cbb2e623eff6ed407f31a63ad" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9b690908cae6529a5196b469c91a53702562da0fbd27025aade6c9b18c853447" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5c34f6e709a97a2146181e6cde6af9e4917ba655cf053f96a6da2cc92c57fbb1" + sha256 cellar: :any_skip_relocation, sonoma: "3938268330391bede9735fb20c451aafe21c6ed952a42cb8fc7774c8591d1f83" + sha256 cellar: :any_skip_relocation, ventura: "781ebafbbff7496ee5eebbef4751e1c0490f22f7f76b208a13e2b7d931f27f37" + sha256 cellar: :any_skip_relocation, monterey: "5e5d3163eedc2edc9c94fe7bb0d0131748b73d48696c742b34f2f1cf8492377d" + sha256 cellar: :any_skip_relocation, big_sur: "de3668d67aaaf8cd68d4a65afb5c0814e47e81516053c98ce1acac8cf0cdccda" + sha256 cellar: :any_skip_relocation, catalina: "1a3272d46510c5313a2133b4024f35dedf0f566c3b52592a29a2aaa4fa9e9e9a" + sha256 cellar: :any_skip_relocation, arm64_linux: "c438a93192fd567fe1da3dc018445ca4e5f269c8c8920cf429eca3484e354a75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2dbf5ccf220ff7c74c9c409f2ed36465f28fe20ab14d42e62b8df2499b5c320" + end + + def install + # macOS already provides strlcpy + if OS.mac? + inreplace "Makefile" do |s| + s.gsub! "-D_DEFAULT_SOURCE -DNEED_STRLCPY", "-D_DEFAULT_SOURCE" + s.gsub! "= strlcpy.o", "=" + end + end + + system "make", "install", "PREFIX=#{prefix}" + end + + test do + port = free_port + output = shell_output("#{bin}/ii -s localhost -p #{port} 2>&1", 1) + assert_match "#{bin}/ii: could not connect to localhost:#{port}:", output.chomp + end +end diff --git a/Formula/i/iir1.rb b/Formula/i/iir1.rb new file mode 100644 index 0000000000000..4adc092219196 --- /dev/null +++ b/Formula/i/iir1.rb @@ -0,0 +1,34 @@ +class Iir1 < Formula + desc "DSP IIR realtime filter library written in C++" + homepage "https://berndporr.github.io/iir1/" + url "https://github.com/berndporr/iir1/archive/refs/tags/1.9.5.tar.gz" + sha256 "beb16142e08e5f68010c6e5014dea2276ea49b71a258439eff09c5ee3f781d88" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9e7224ee70fc1f78d5f1f031afe43b140badf13a4775ee36ba80f70710e6e79b" + sha256 cellar: :any, arm64_sonoma: "2f0eaa182942ffef4f0b3be1475fe866355bdf312925af2548a63ae31e79d65b" + sha256 cellar: :any, arm64_ventura: "00753cfc7f401ac5cdbc0b96f52455e446332cfa74e5d84a1d42331dec290a23" + sha256 cellar: :any, arm64_monterey: "4a6a10dd45465631eec4bc7536df754279c7d3ce1328c5bc05bd9a09e675dce1" + sha256 cellar: :any, sonoma: "d911a4ef85de7d0ada39a6326a16c8bf7d4194edb35d2822701876cc6b364e73" + sha256 cellar: :any, ventura: "15e5d5a25bd144ab9e0a1f2081a5a1ffd916576c0618f0a71f414d84a780720b" + sha256 cellar: :any, monterey: "513efd0674e3ebc67f2ddd17f1911a3596fa2778948ad862cf71ef10da16545b" + sha256 cellar: :any_skip_relocation, arm64_linux: "71a81a0cac1d08293121e403655c424d7c72afb87cb40218bcef42f4bb631525" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b623801ecd47f5dc48c230b15d7abc0fd05fc97404ad1ba1d8e3da9e536bb5aa" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + (pkgshare/"test").install "test/butterworth.cpp", "test/assert_print.h" + end + + test do + cp (pkgshare/"test").children, testpath + system ENV.cxx, "-std=c++11", "butterworth.cpp", "-o", "test", "-L#{lib}", "-liir" + system "./test" + end +end diff --git a/Formula/i/ijq.rb b/Formula/i/ijq.rb new file mode 100644 index 0000000000000..46c87b23ac914 --- /dev/null +++ b/Formula/i/ijq.rb @@ -0,0 +1,50 @@ +class Ijq < Formula + desc "Interactive jq" + homepage "https://sr.ht/~gpanders/ijq/" + url "https://git.sr.ht/~gpanders/ijq", + tag: "v1.1.2", + revision: "f67100db8b03095fbd25fef8c7f01e6407023923" + license "GPL-3.0-or-later" + head "https://git.sr.ht/~gpanders/ijq", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f6d56b0207fbe0c580f29636d34c39e2d52349f649e04988a56f73d3ea9a1a8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0a744ffeab4e167df5562e00df9f6881619690890b944e8812c36f6bf173c7b8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fd09def3304b0cfcd714745a057853784b49e482a32d599db45c742d2eac3522" + sha256 cellar: :any_skip_relocation, arm64_monterey: "539054df9a9d84798427580397d6495c34f7ce8fd844fa8073fa7eef765727c5" + sha256 cellar: :any_skip_relocation, sonoma: "d1821ef799142750e30c540f77a45b584c376d7806638fb9deddda3aead6c1c6" + sha256 cellar: :any_skip_relocation, ventura: "593ef098186825e2813b8d33687f3d7781e48d765a51f3d7e7801441579394b8" + sha256 cellar: :any_skip_relocation, monterey: "f9343078267b776e7fe34ab333b29753cfc44aec8ab291507b43cb7a815faa0a" + sha256 cellar: :any_skip_relocation, arm64_linux: "1be3e5965edb03db7e0f7001c8856757699df59a38013e50d998c3031b2bbd83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c92b37ce9a8a054ad37bfefe48a1d1b03ed163527545ba10de7b7f0c3c3a9825" + end + + depends_on "go" => :build + depends_on "scdoc" => :build + depends_on "jq" + + def install + system "make", "prefix=#{prefix}", "install" + end + + test do + ENV["TERM"] = "xterm" + + (testpath/"filterfile.jq").write '["foo", "bar", "baz"] | sort | add' + + require "expect" + require "pty" + PTY.spawn("#{bin}/ijq -H '' -M -n -f filterfile.jq > result") do |r, w, pid| + refute_nil r.expect("barbazfoo", 5), "Expected barbazfoo" + w.write "\r" + 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 "\"barbazfoo\"\n", (testpath/"result").read + end +end diff --git a/Formula/i/ike-scan.rb b/Formula/i/ike-scan.rb new file mode 100644 index 0000000000000..58ef1bc0df8dc --- /dev/null +++ b/Formula/i/ike-scan.rb @@ -0,0 +1,51 @@ +class IkeScan < Formula + desc "Discover and fingerprint IKE hosts" + homepage "https://github.com/royhills/ike-scan" + license "GPL-3.0-or-later" => { with: "openvpn-openssl-exception" } + head "https://github.com/royhills/ike-scan.git", branch: "master" + + stable do + url "https://github.com/royhills/ike-scan/archive/refs/tags/1.9.5.tar.gz" + sha256 "5152bf06ac82d0cadffb93a010ffb6bca7efd35ea169ca7539cf2860ce2b263f" + + # Backport fix for implicit-int + patch do + url "https://github.com/royhills/ike-scan/commit/9949ce4bdf9f4bcb616b2a5d273708a7ea9ee93d.patch?full_index=1" + sha256 "99e46df8b50e26982f0462d633cf3638f9b3ff2f65b7b4588241f17628e0f9d7" + end + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "ab952b41aca2d112e8238ac293c43b90382a49fa9afca8f1726a5f1b138dd1aa" + sha256 arm64_sonoma: "a26d56aa62837f5f384c928cdcb10db12c18608365bb8de3606db95fd9a2ab69" + sha256 arm64_ventura: "4962babb485008c4ca7365744527389c7f100c26a37e286f4131f554d8d30e76" + sha256 arm64_monterey: "2cdc49f704f821bd0aaa51534c4d9b8b73524fae1737ca302308b026c4d48db9" + sha256 arm64_big_sur: "e3e644f24b55009f2acb78739cd2504f72800c07d3faac4fe2f8af7256b119a4" + sha256 sonoma: "6626bcdb27b825c736d4ea41c785e8f0368276575e0bb789effe317b27031868" + sha256 ventura: "d75a804e64246fb47fa55b2b96cfe9ad00659b29f11c35b14eb182dd0dd0a298" + sha256 monterey: "a75856c7333e0bdfd2668348ed6abfbee95361f1e3645998c7730f84eecf45a1" + sha256 big_sur: "43fb51d3ef205224920eee1e85861d8957159684d86d3de76c925b3e14b22c87" + sha256 catalina: "a158c41e25fa99aaca6bf29573b4b6e77775be3402973bd016ee3ef4f9d6c8cc" + sha256 arm64_linux: "f64aff3a995ef7e1742735b56834e1558567f4bc6605fd1740cc1a3c23445462" + sha256 x86_64_linux: "2b7b0f9ab06373c381c2133befa3d9524bcdb27c6ccd0f44acdc52d5497cee24" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "openssl@3" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--mandir=#{man}", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + *std_configure_args + system "make", "install" + end + + test do + # We probably shouldn't probe any host for VPN servers, so let's keep this simple. + system bin/"ike-scan", "--version" + end +end diff --git a/Formula/i/imagejs.rb b/Formula/i/imagejs.rb new file mode 100644 index 0000000000000..78623f218faef --- /dev/null +++ b/Formula/i/imagejs.rb @@ -0,0 +1,40 @@ +class Imagejs < Formula + desc "Tool to hide JavaScript inside valid image files" + homepage "https://github.com/jklmnn/imagejs" + url "https://github.com/jklmnn/imagejs/archive/refs/tags/0.7.2.tar.gz" + sha256 "ba75c7ea549c4afbcb2a516565ba0b762b5fc38a03a48e5b94bec78bac7dab07" + license "GPL-3.0-only" + head "https://github.com/jklmnn/imagejs.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e63b962d504ec008aa03bbbc391604e5ade5d25d0316d1b040cc053a56b2821f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "99187a2855b722b5b1e50cce08e0c12c22ee803f6420ea15c96852b2be06dac1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e76ab06468439a91138e802c3da8aa8d422a659aebb2abc94fea8a8f576d0b71" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1297a2272e34c7bd91997cb8ec161fac1694089d5e4daeaa2a9377714e197d38" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f03279a8e5c316d74b2b93939714aa16dc624735ca8bda89b20468bc346c4216" + sha256 cellar: :any_skip_relocation, sonoma: "56cdc1042a0b27737d8c42c9c9edd9f4d704c17330f28a27958013c1bffd6991" + sha256 cellar: :any_skip_relocation, ventura: "e2ad3d26c4cf47649428a26612ebf2db567717311fac840f894526c52efc423a" + sha256 cellar: :any_skip_relocation, monterey: "8cd267264a5a90805ce6271406f149e6401f04e851243bf89b6ec70a2975cc92" + sha256 cellar: :any_skip_relocation, big_sur: "99e906e8eeb8451f8c2f8408aa990cddb575a02be4cdc5d4ea3f95362d040633" + sha256 cellar: :any_skip_relocation, catalina: "7bddae8dab41f73bce7acb3c86a6dc01dcd3edeb5e0abf80b155e498372b8e5e" + sha256 cellar: :any_skip_relocation, mojave: "4d071eb79a95c78c190c91ef8295b0a300a0ccdd525b401af2e797767bc54410" + sha256 cellar: :any_skip_relocation, arm64_linux: "372fb4580d7b15c0016508a244d85e66c675fe74b152d9864a9cf5a249bc3aa4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6bda97ebfc90e0131fce362fa01a10bce43ab5cc1ee0080d260483b2902e88d4" + end + + def install + system "make" + bin.install "imagejs" + end + + test do + (testpath/"test.js").write "alert('Hello World!')" + system bin/"imagejs", "bmp", "test.js", "-l" + end +end diff --git a/Formula/i/imagemagick.rb b/Formula/i/imagemagick.rb new file mode 100644 index 0000000000000..c2c506f6879fe --- /dev/null +++ b/Formula/i/imagemagick.rb @@ -0,0 +1,125 @@ +class Imagemagick < Formula + desc "Tools and libraries to manipulate images in many formats" + homepage "https://imagemagick.org/index.php" + url "https://imagemagick.org/archive/releases/ImageMagick-7.1.1-47.tar.xz" + sha256 "2396cd3c4237cfbc09a89d31d1cee157ee11fbc8ec1e540530e10175cb707160" + license "ImageMagick" + head "https://github.com/ImageMagick/ImageMagick.git", branch: "main" + + livecheck do + url "https://imagemagick.org/archive/" + regex(/href=.*?ImageMagick[._-]v?(\d+(?:\.\d+)+-\d+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "3d7b63545a505aa12f4b9919c03499765b9ae91bb22c171503e00ef1403d447a" + sha256 arm64_sonoma: "34e1150a01678d185c30df5f2274d07c4f06236f92b3fb707c3027e346f83610" + sha256 arm64_ventura: "81ba67cc61546e29607ff63e792dcaa078453c66300e62c48dd805c76b2b469e" + sha256 sonoma: "4392321a4b1027b2b005046cc4da9695daabcf10fd7855f438757525a937dadb" + sha256 ventura: "a4d5765e945c356571764b833bd1b884d93f4befe9dcc1b62c4213daa8f687b1" + sha256 arm64_linux: "adfcf4acb6cb5c630fa7ed04cde51b2567bee8bced1bd9694c3f9e25df6f9721" + sha256 x86_64_linux: "cd94eab74e5550506589f0b8b8f1e401e38f1a57d714c1005cdd61095c2cb6fd" + end + + depends_on "pkgconf" => :build + depends_on "fontconfig" + depends_on "freetype" + depends_on "jpeg-turbo" + depends_on "jpeg-xl" + depends_on "libheif" + depends_on "liblqr" + depends_on "libpng" + depends_on "libraw" + depends_on "libtiff" + depends_on "libtool" + depends_on "little-cms2" + depends_on "openexr" + depends_on "openjpeg" + depends_on "webp" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "glib" + depends_on "imath" + depends_on "libomp" + end + + on_linux do + depends_on "libx11" + depends_on "libxext" + end + + skip_clean :la + + def install + # Avoid references to shim + inreplace Dir["**/*-config.in"], "@PKG_CONFIG@", Formula["pkg-config"].opt_bin/"pkg-config" + # versioned stuff in main tree is pointless for us + inreplace "configure", "${PACKAGE_NAME}-${PACKAGE_BASE_VERSION}", "${PACKAGE_NAME}" + + args = [ + "--enable-osx-universal-binary=no", + "--disable-silent-rules", + "--disable-opencl", + "--enable-shared", + "--enable-static", + "--with-freetype=yes", + "--with-gvc=no", + "--with-modules", + "--with-openjp2", + "--with-openexr", + "--with-webp=yes", + "--with-heic=yes", + "--with-raw=yes", + "--without-gslib", + "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts", + "--with-lqr", + "--without-djvu", + "--without-fftw", + "--without-pango", + "--without-wmf", + "--enable-openmp", + ] + if OS.mac? + args += [ + "--without-x", + # Work around "checking for clang option to support OpenMP... unsupported" + "ac_cv_prog_c_openmp=-Xpreprocessor -fopenmp", + "ac_cv_prog_cxx_openmp=-Xpreprocessor -fopenmp", + "LDFLAGS=-lomp -lz", + ] + end + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + def caveats + <<~EOS + Ghostscript is not installed by default as a dependency. + If you need PS or PDF support, ImageMagick will still use the ghostscript formula if installed directly. + EOS + end + + test do + assert_match "PNG", shell_output("#{bin}/identify #{test_fixtures("test.png")}") + + # Check support for recommended features and delegates. + features = shell_output("#{bin}/magick -version") + %w[Modules freetype heic jpeg png raw tiff].each do |feature| + assert_match feature, features + end + + # Check support for a few specific image formats, mostly to ensure LibRaw linked correctly. + formats = shell_output("#{bin}/magick -list format") + ["AVIF HEIC rw+", "ARW DNG r--", "DNG DNG r--"].each do |format| + assert_match format, formats + end + end +end diff --git a/Formula/i/imagemagick@6.rb b/Formula/i/imagemagick@6.rb new file mode 100644 index 0000000000000..cc17858c23c5e --- /dev/null +++ b/Formula/i/imagemagick@6.rb @@ -0,0 +1,91 @@ +class ImagemagickAT6 < Formula + desc "Tools and libraries to manipulate images in many formats" + homepage "https://legacy.imagemagick.org/" + url "https://imagemagick.org/archive/releases/ImageMagick-6.9.13-25.tar.xz" + sha256 "17ba5ee0e0ce4a2248db5115d3683dd7c24e82eec96515da028997c9f926a121" + license "ImageMagick" + head "https://github.com/imagemagick/imagemagick6.git", branch: "main" + + livecheck do + url "https://imagemagick.org/archive/" + regex(/href=.*?ImageMagick[._-]v?(6(?:[.-]\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "09cae28da4c71a6004c02518ffea95ef4df07fcc7f211eab10d6eac87eb48fb5" + sha256 arm64_sonoma: "3f7492a6a7040334c307e36e780a4e34a9148c2d644713c939ab8ccd4c82bf6e" + sha256 arm64_ventura: "0736732b7c46c6fcbbf5106695758e428ef862d2a03414bd97c9986f0e1f96c7" + sha256 sonoma: "57a9fb490b1378cc28e1df03706e8d3c937c1d0aad8210c18880fc186069a6ec" + sha256 ventura: "68eeb42ec14914a27303bb7748bce2ced67135dd6824fba1a138f1967b67e8dd" + sha256 arm64_linux: "4d83ead3cbb27e2c7aff3f58e5796c07691a16c2574aede0ce4aa35f99bbc057" + sha256 x86_64_linux: "5487c6a697e5ec21472cadd645e053b289700c75c169a1ae9e0eaf52b482f090" + end + + keg_only :versioned_formula + + depends_on "pkgconf" => :build + + depends_on "fontconfig" + depends_on "freetype" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "libtool" + depends_on "little-cms2" + depends_on "openjpeg" + depends_on "webp" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + skip_clean :la + + def install + # Avoid references to shim + inreplace Dir["**/*-config.in"], "@PKG_CONFIG@", Formula["pkg-config"].opt_bin/"pkg-config" + # versioned stuff in main tree is pointless for us + inreplace "configure", "${PACKAGE_NAME}-${PACKAGE_BASE_VERSION}", "${PACKAGE_NAME}" + + args = %W[ + --enable-osx-universal-binary=no + --disable-silent-rules + --disable-opencl + --disable-openmp + --enable-shared + --enable-static + --with-freetype=yes + --with-modules + --with-webp=yes + --with-openjp2 + --without-gslib + --with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts + --without-djvu + --without-fftw + --without-pango + --without-x + --without-wmf + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + def caveats + <<~EOS + Ghostscript is not installed by default as a dependency. + If you need PS or PDF support, ImageMagick will still use the ghostscript formula if installed directly. + EOS + end + + test do + assert_match "PNG", shell_output("#{bin}/identify #{test_fixtures("test.png")}") + # Check support for recommended features and delegates. + features = shell_output("#{bin}/convert -version") + %w[Modules freetype jpeg png tiff].each do |feature| + assert_match feature, features + end + end +end diff --git a/Formula/i/imageoptim-cli.rb b/Formula/i/imageoptim-cli.rb new file mode 100644 index 0000000000000..160f814436a45 --- /dev/null +++ b/Formula/i/imageoptim-cli.rb @@ -0,0 +1,36 @@ +class ImageoptimCli < Formula + desc "CLI for ImageOptim, ImageAlpha and JPEGmini" + homepage "https://jamiemason.github.io/ImageOptim-CLI/" + url "https://github.com/JamieMason/ImageOptim-CLI/archive/refs/tags/3.1.9.tar.gz" + sha256 "35aee4c380d332355d9f17c97396e626eea6a2e83f9777cc9171f699e2887b33" + license "MIT" + head "https://github.com/JamieMason/ImageOptim-CLI.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "a773e296348e3eefcf67f3b5101d88df39de5a2cf3746ddc67bb14542620c105" + end + + depends_on "yarn" => :build + depends_on :macos + depends_on "node" + + def install + # Adjust package.json's bin and add missing shebang to avoid bundling node + inreplace "src/imageoptim.ts", "import chalk from 'chalk'", "#!/usr/bin/env node\n\nimport chalk from 'chalk'" + system "npm", "pkg", "set", "bin.imageoptim=dist/imageoptim.js" + system "yarn", "install" + system "npm", "run", "build:ts" + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + assert_equal version.to_s, shell_output("#{bin}/imageoptim -V").chomp + end +end diff --git a/Formula/i/imagesnap.rb b/Formula/i/imagesnap.rb new file mode 100644 index 0000000000000..d8fe7d90dc340 --- /dev/null +++ b/Formula/i/imagesnap.rb @@ -0,0 +1,32 @@ +class Imagesnap < Formula + desc "Tool to capture still images from an iSight or other video source" + homepage "https://github.com/rharder/imagesnap" + url "https://github.com/rharder/imagesnap/archive/refs/tags/0.2.16.tar.gz" + sha256 "103610515aae71fe1eea6bea15b2b48542f88042515d404fb4d0a18f44120a9a" + license :public_domain + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d0088adcce46dada16585280738cedb609b10178e4c192ad9d9b92f92c90b45c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae1001e52ea2fdb7dd9531be39fda237c343b0013f2b7855e9ee1656ae0466b3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d5673f34fe68a24f689695bfe5c01faedd9040c7947204bff0a69c533bffcd14" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6b0aaeb3a21d3a74c0f3ac12fb9f6e6283646b9da1acf72cdd1ad257e7bd745b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9fdb123fcbab3195ad09621fe4b7c2e1777f93fd00ba6ba07bc0bf8f51bd8301" + sha256 cellar: :any_skip_relocation, sonoma: "b0915b8c95b3046c9f05743823899b9e087a14241eab3fde4629d0d6980500ce" + sha256 cellar: :any_skip_relocation, ventura: "a3cf2f2513ba875fc96fa062818a3ab9d95aecb1cc706af4cad9f51df4bf31b0" + sha256 cellar: :any_skip_relocation, monterey: "7f1c640f6bb51c1b5838639e8165e6156c5e4e48c052639a5b40c593e374bcd6" + sha256 cellar: :any_skip_relocation, big_sur: "91158c236f55084e864fe99fe3691e3c1196c9e9e20247d0b754ae73cc2c516c" + end + + depends_on xcode: :build + depends_on :macos + + def install + xcodebuild "-arch", Hardware::CPU.arch, "-project", "ImageSnap.xcodeproj", "SYMROOT=build", +"MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + bin.install "build/Release/imagesnap" + end + + test do + assert_match "imagesnap", shell_output("#{bin}/imagesnap -h") + end +end diff --git a/Formula/i/imageworsener.rb b/Formula/i/imageworsener.rb new file mode 100644 index 0000000000000..def0d3feb8165 --- /dev/null +++ b/Formula/i/imageworsener.rb @@ -0,0 +1,55 @@ +class Imageworsener < Formula + desc "Utility and library for image scaling and processing" + homepage "https://entropymine.com/imageworsener/" + url "https://entropymine.com/imageworsener/imageworsener-1.3.5.tar.gz" + sha256 "a7fbb65c5ade67d9ebc32e52c58988a4f986bacc008c9021fe36b598466d5c8d" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?imageworsener[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2f5e92e748e1e1993f68bf0e8313742c972c9b466ff60a307c4b8eb3c12ab388" + sha256 cellar: :any, arm64_sonoma: "5b595eed5b2b5cd87dd3f6cf4585b3a0709ec9a4e7fddc64a54f29056133fee1" + sha256 cellar: :any, arm64_ventura: "14a343a159b3410196cc3ed40b0e674b4bed5f8ee7b2760b49b1317e1a09811a" + sha256 cellar: :any, arm64_monterey: "0d8c2dab98fa032f871df63f93ae33d4d1a989fe7c97f185d976d976f243134a" + sha256 cellar: :any, arm64_big_sur: "50063cbefef7614047703983639adaee5836d68c02f673aed62c38fea1c4418d" + sha256 cellar: :any, sonoma: "dad022cb391e42d43f72c3e7f3b2e2fb3bfb28b2c933d29790c8c863086c4518" + sha256 cellar: :any, ventura: "d360400241b1bf7a2199e04034e96da619f19c0473c17bf7637555fdaab73421" + sha256 cellar: :any, monterey: "443be530e6d93e197026cf8ec457817446c38c94d84b39a3ca76e7a2282225ae" + sha256 cellar: :any, big_sur: "7ce254b5dfb0dcd52e39b682cfd21ea665601cd14e9a2a5ab0c923e185ad5261" + sha256 cellar: :any, catalina: "7301d5557860b7402e3d624c77a208c1e3eb1ed69479d6d3d3f1158a3e3ea079" + sha256 cellar: :any_skip_relocation, arm64_linux: "aba845ffa91fb356cfc4f89ef25e24761c0586d43a820cf69013b72e9afe713b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ffeb2d98cb08aca5974ca2ece5a40a42b5bd6e0c2422f0a3013455d00793883d" + end + + head do + url "https://github.com/jsummers/imageworsener.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "jpeg-turbo" + depends_on "libpng" + + uses_from_macos "zlib" + + def install + if build.head? + inreplace "./scripts/autogen.sh", "libtoolize", "glibtoolize" + system "./scripts/autogen.sh" + end + + system "./configure", *std_configure_args, "--without-webp" + system "make", "install" + pkgshare.install "tests" + end + + test do + cp_r Dir["#{pkgshare}/tests/*"], testpath + system "./runtest", bin/"imagew" + end +end diff --git a/Formula/i/imake.rb b/Formula/i/imake.rb new file mode 100644 index 0000000000000..534239813ae6d --- /dev/null +++ b/Formula/i/imake.rb @@ -0,0 +1,67 @@ +class Imake < Formula + desc "Build automation system written for X11" + homepage "https://xorg.freedesktop.org/" + url "https://xorg.freedesktop.org/releases/individual/util/imake-1.0.10.tar.xz" + sha256 "75decbcea8d7b354cf36adc9675e53c4790ee3de56a14bd87b42c8e8aad2ecf5" + license "MIT" + + livecheck do + url "https://xorg.freedesktop.org/releases/individual/util/" + regex(/href=.*?imake[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "7ec67382a8dbee7134f20cacb6f701e780ce5e0da7902341047bfcff4492c9e2" + sha256 arm64_sonoma: "2e5e51212893abfdefa9fe94309a52728693418424af70ad64424974816d1624" + sha256 arm64_ventura: "1bf5d0e8b8fc5f7030162a29d9054863f2af080a8ec62db87d8f6ce90c55d8d6" + sha256 arm64_monterey: "5708253a196811ca791e556e6b22582b84b8f925d15b2bccca6d13b9f049002b" + sha256 sonoma: "f2362816e0e06c863938298689c9cc9b9ee34ffe2aace4369fd42774ab5a66a4" + sha256 ventura: "d62ef9dabad43d8c1bf7ee4d40762bf36dab9475ddcbfaf205f67303e3b197b5" + sha256 monterey: "b288cbb7cb8faf0e38bd79cae80e0a9b47eebd3e760caaae129aaa001d880fc1" + sha256 arm64_linux: "4ba1ca704e4e9383f470dba78fefde5e6eacf51384aecc964221055e36ced4b1" + sha256 x86_64_linux: "296155e61983cc533d3f5ab094d796d2ab3d992606be73da1f7a51f3920ea41e" + end + + depends_on "pkgconf" => :build + depends_on "xorgproto" => :build + depends_on "tradcpp" + + resource "xorg-cf-files" do + url "https://xorg.freedesktop.org/releases/individual/util/xorg-cf-files-1.0.8.tar.xz" + sha256 "7408955defcfab0f44d1bedd4ec0c20db61914917ad17bfc1f1c9bf56acc17b9" + end + + def install + ENV.deparallelize + + # imake runtime is broken when used with clang's cpp + cpp_program = Formula["tradcpp"].opt_bin/"tradcpp" + (buildpath/"imakemdep.h").append_lines <<~C + #define DEFAULT_CPP "#{cpp_program}" + #undef USE_CC_E" + C + + inreplace "imake.man", /__cpp__/, cpp_program + + # also use gcc's cpp during buildtime to pass ./configure checks + ENV["RAWCPP"] = cpp_program + + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + + resource("xorg-cf-files").stage do + # Fix for different X11 locations. + inreplace "X11.rules", "define TopXInclude /**/", + "define TopXInclude -I#{HOMEBREW_PREFIX}/include" + system "./configure", "--with-config-dir=#{lib}/X11/config", + "--prefix=#{HOMEBREW_PREFIX}" + system "make", "install" + end + end + + test do + # Use pipe_output because the return code is unimportant here. + output = pipe_output("#{bin}/imake -v -s/dev/null -f/dev/null -T/dev/null 2>&1") + assert_match "#{Formula["tradcpp"].opt_bin}/tradcpp", output + end +end diff --git a/Formula/i/imap-backup.rb b/Formula/i/imap-backup.rb new file mode 100644 index 0000000000000..de5a68907d074 --- /dev/null +++ b/Formula/i/imap-backup.rb @@ -0,0 +1,34 @@ +class ImapBackup < Formula + desc "Backup GMail (or other IMAP) accounts to disk" + homepage "https://github.com/joeyates/imap-backup" + url "https://github.com/joeyates/imap-backup/archive/refs/tags/v15.0.2.tar.gz" + sha256 "62d738d5d79d62e884bbd1ebac0cff5233c62e5a98a64f6a1d0f29a3c6e28ab2" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "100a8693014f1b39e4bf99b501e27560b2db9b3175234fb77f30a8f3196b17c4" + 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 "Choose an action:", pipe_output(bin/"imap-backup setup", "3\n") + assert_match version.to_s, shell_output("#{bin}/imap-backup version") + end +end diff --git a/Formula/i/imap-uw.rb b/Formula/i/imap-uw.rb new file mode 100644 index 0000000000000..891a1736c1682 --- /dev/null +++ b/Formula/i/imap-uw.rb @@ -0,0 +1,102 @@ +class ImapUw < Formula + # imap-uw is unmaintained software; the author has passed away and there is + # no active successor project. + # The previous homepage is + # https://web.archive.org/web/20191028114408/https://www.washington.edu/imap/ + desc "University of Washington IMAP toolkit" + homepage "https://salsa.debian.org/holmgren/uw-imap" + url "https://mirrorservice.org/sites/ftp.cac.washington.edu/imap/imap-2007f.tar.gz" + mirror "https://fossies.org/linux/misc/old/imap-2007f.tar.gz" + sha256 "53e15a2b5c1bc80161d42e9f69792a3fa18332b7b771910131004eb520004a28" + license "Apache-2.0" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "1c6588d448256165bc075365c4261d53de52575e394b9661c7837e6cce5450f8" + sha256 cellar: :any, arm64_sonoma: "0c3e132c651b5e9b2a8deed4b0c512144c118d72df933fdc87046e2b631793c9" + sha256 cellar: :any, arm64_ventura: "853cb9eabed350f511e68b7198005a276b86efecf79846ed68858d226df546de" + sha256 cellar: :any, arm64_monterey: "52ef7c6c326e06a85524eab3a22f29ff095877b1a640979958b72cede3dc8758" + sha256 cellar: :any, arm64_big_sur: "3598566905f97346d6691c708ae0c6673d28924265f5e10d33bdb2f8d40aa90b" + sha256 cellar: :any, sonoma: "765a17f2dd45fe663b5c33591f9178e72801afa7ff61e5f5d3c94166801057aa" + sha256 cellar: :any, ventura: "3752df02ec24ffaed9fb630721492c24647a5426a0b53678fb4d574b1c99babb" + sha256 cellar: :any, monterey: "b103e67bafbc727288fe497dc634d65489b9c9272ed23971a35348988e0fd21d" + sha256 cellar: :any, big_sur: "03c5fc6a4e888a756809749d359b45141b95fbb8b3cfa662ebd9687e55ba958a" + sha256 cellar: :any, catalina: "f98ac44c956015b954474247210e3b19dbcf629280b69ab2c33386ad6f298c31" + sha256 cellar: :any_skip_relocation, arm64_linux: "b472a137b28ddcf33d31429f2a6deb39ba923ba6b61853572fe432866758a570" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b87416d2dcf7b2384df72ef50f309556b3e4e267eedf11f05ae54b53f67c8a1" + end + + deprecate! date: "2024-07-03", because: :unmaintained + + depends_on "openssl@3" + + uses_from_macos "krb5" + + on_linux do + depends_on "linux-pam" + end + + conflicts_with "alpine", because: "both install `mailutil` binaries" + + # Two patches below are from Debian, to fix OpenSSL 3 compatibility + # https://salsa.debian.org/holmgren/uw-imap/tree/master/debian/patches + patch do + url "https://salsa.debian.org/holmgren/uw-imap/raw/master/debian/patches/1006_openssl1.1_autoverify.patch" + sha256 "7c41c4aec4f25546c998593a09386bbb1d6c526ba7d6f65e3f55a17c20644d0a" + end + + patch do + url "https://salsa.debian.org/holmgren/uw-imap/raw/master/debian/patches/2014_openssl1.1.1_sni.patch" + sha256 "9db45ba5462292acd04793ac9fa856e332b37506f1e0991960136dff170a2cd3" + end + + def install + ENV.deparallelize + inreplace "Makefile" do |s| + s.gsub! "SSLINCLUDE=/usr/include/openssl", + "SSLINCLUDE=#{Formula["openssl@3"].opt_include}/openssl" + s.gsub! "SSLLIB=/usr/lib", + "SSLLIB=#{Formula["openssl@3"].opt_lib}" + s.gsub! "-DMAC_OSX_KLUDGE=1", "" + end + inreplace "src/osdep/unix/ssl_unix.c", "#include \n#include ", + "#include \n#include " + + # Skip IPv6 warning on Linux as libc should be IPv6 safe. + touch "ip6" + + extra_cflags = [] + # Workaround for Xcode 14.3 + extra_cflags << "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + # Workaround for Xcode 15 + extra_cflags << "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + target = if OS.mac? + "oxp" + else + "ldb" + end + system "make", target, "EXTRACFLAGS=#{extra_cflags.join(" ")}" + + # email servers: + sbin.install "imapd/imapd", "ipopd/ipop2d", "ipopd/ipop3d" + + # mail utilities: + bin.install "dmail/dmail", "mailutil/mailutil", "tmail/tmail" + + # c-client library: + # Note: Installing the headers from the root c-client directory is not + # possible because they are symlinks and homebrew dutifully copies them + # as such. Pulling from within the src dir achieves the desired result. + doc.install Dir["docs/*"] + lib.install "c-client/c-client.a" => "libc-client.a" + (include + "imap").install "c-client/osdep.h", "c-client/linkage.h" + (include + "imap").install Dir["src/c-client/*.h", "src/osdep/unix/*.h"] + end + + test do + system bin/"mailutil", "create", "MAILBOX" + assert_match "No new messages, 0 total in MAILBOX", shell_output("#{bin}/mailutil check MAILBOX") + end +end diff --git a/Formula/i/imapfilter.rb b/Formula/i/imapfilter.rb new file mode 100644 index 0000000000000..f5704649668b6 --- /dev/null +++ b/Formula/i/imapfilter.rb @@ -0,0 +1,45 @@ +class Imapfilter < Formula + desc "IMAP message processor/filter" + homepage "https://github.com/lefcha/imapfilter/" + url "https://github.com/lefcha/imapfilter/archive/refs/tags/v2.8.3.tar.gz" + sha256 "a28ee90ac20a996e2fc19cbc36a36c152483085011f3b2ec8dfd913b7a6d9804" + license "MIT" + + bottle do + sha256 arm64_sequoia: "70c757de93288ef4e4367aa3fe55cd42f764a5ce18750bc71dddf21049ea2f42" + sha256 arm64_sonoma: "ca4b34e7d186953097c449ba67f55596aca8e8f4a69afb60c6d5314f3dc7d433" + sha256 arm64_ventura: "f15d485165819dd296961c167070e2e516dc728859e4b163bc339f9000f5215c" + sha256 sonoma: "ea24e234a4966f529e93c36bc66c664b725bf616a5a2b286d87410d28ef6ebe8" + sha256 ventura: "1325382fbd71289a23633f2c51b7da08308b933635fd4168aa624397cbea66e1" + sha256 arm64_linux: "cef5702c2ca63d9a2a2d0b6ce8637bc8d9be9f9203a5465a42dc83294d2e0da0" + sha256 x86_64_linux: "fe050a935bffa0600d9a50adaed8f253886d32bbb18e8350b6596e5e3b83b8b3" + end + + depends_on "lua" + depends_on "openssl@3" + depends_on "pcre2" + + def install + # find Homebrew's libpcre and lua + ENV.append "CPPFLAGS", "-I#{Formula["lua"].opt_include}/lua" + ENV.append "LDFLAGS", "-L#{Formula["pcre2"].opt_lib}" + ENV.append "LDFLAGS", "-L#{Formula["lua"].opt_lib}" + ENV.append "LDFLAGS", "-liconv" if OS.mac? + system "make", "PREFIX=#{prefix}", "MANDIR=#{man}", "MYCFLAGS=#{ENV.cflags}", "MYLDFLAGS=#{ENV.ldflags}" + system "make", "PREFIX=#{prefix}", "MANDIR=#{man}", "install" + + prefix.install "samples" + end + + def caveats + <<~EOS + You will need to create a ~/.imapfilter/config.lua file. + Samples can be found in: + #{prefix}/samples + EOS + end + + test do + system bin/"imapfilter", "-V" + end +end diff --git a/Formula/i/imapsync.rb b/Formula/i/imapsync.rb new file mode 100644 index 0000000000000..a08e0b38ee065 --- /dev/null +++ b/Formula/i/imapsync.rb @@ -0,0 +1,206 @@ +class Imapsync < Formula + desc "Migrate or backup IMAP mail accounts" + homepage "https://imapsync.lamiral.info/" + url "https://imapsync.lamiral.info/dist2/imapsync-2.290.tgz" + # NOTE: The mirror will return 404 until the version becomes outdated. + sha256 "b85853c676940cfefdde2b1fa45ffb4fc7780275c32f8b8deb353c8a063e1051" + license "NLPL" + revision 1 + head "https://github.com/imapsync/imapsync.git", branch: "master" + + livecheck do + url "https://imapsync.lamiral.info/dist2/" + regex(/href=.*?imapsync[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "960856f358c0d1426a2c292f489a1260c9fbf43f8129fb54403714b4375c0429" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c4004298124fe2313df06859f011a236d032e989476c4a33802b7ef053f8f789" + sha256 cellar: :any_skip_relocation, arm64_ventura: "05b3412162cd311bf3a5ddd78d6bfcea258eb8435a13990058f107e1ada5f2f5" + sha256 cellar: :any_skip_relocation, sonoma: "a0641b76b15aca5a1f6c08dcc7c8a36b0dfa76a4d5573a4f690e2f837a3cbc28" + sha256 cellar: :any_skip_relocation, ventura: "75f700341b793ed2b70dda1e545506fca9df3a7d4eb58fc3390e98917c739671" + sha256 cellar: :any_skip_relocation, arm64_linux: "53fc0d6eda97088597ae4d682846897a5877dfb4745dc0598d4898cac4306838" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e8fd22ccf3708f6bfaf8f0e9718c596f23b6da13787e7b2b5adbccb07c0624c" + end + + depends_on "pod2man" => :build + + uses_from_macos "perl" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + + resource "Digest::HMAC_SHA1" do + url "https://cpan.metacpan.org/authors/id/A/AR/ARODLAND/Digest-HMAC-1.04.tar.gz" + sha256 "d6bc8156aa275c44d794b7c18f44cdac4a58140245c959e6b19b2c3838b08ed4" + end + + 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 "Socket6" do + url "https://cpan.metacpan.org/authors/id/U/UM/UMEMOTO/Socket6-0.29.tar.gz" + sha256 "468915fa3a04dcf6574fc957eff495915e24569434970c91ee8e4e1459fc9114" + end + + resource "IO::Socket::SSL" do + url "https://cpan.metacpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-2.088.tar.gz" + sha256 "9d27a31f0b617022180a1d1c45664beb76f51f3b8caede1404072a87dab74536" + 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 "Term::ReadKey" do + url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.38.tar.gz" + sha256 "5a645878dc570ac33661581fbb090ff24ebce17d43ea53fd22e105a856a47290" + end + + resource "Regexp::Common" do + url "https://cpan.metacpan.org/authors/id/A/AB/ABIGAIL/Regexp-Common-2024080801.tar.gz" + sha256 "0677afaec8e1300cefe246b4d809e75cdf55e2cc0f77c486d13073b69ab4fbdd" + 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.027.tar.gz" + sha256 "9d592131dc5845a86dc28be9143f764e73cb62db06fedf50a895be1324b6cec5" + end + + resource "ExtUtils::InstallPaths" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.013.tar.gz" + sha256 "65969d3ad8a3a2ea8ef5b4213ed5c2c83961bb5bd12f7ad35128f6bd5b684aa0" + end + end + + resource "Module::Build" do + on_system :linux, macos: :catalina_or_older do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4234.tar.gz" + sha256 "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f" + end + end + + resource "Encode::IMAPUTF7" do + url "https://cpan.metacpan.org/authors/id/P/PM/PMAKHOLM/Encode-IMAPUTF7-1.05.tar.gz" + sha256 "470305ddc37483cfe8d3c16d13770a28011f600bf557acb8c3e07739997c37e1" + end + + resource "Unicode::String" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/GAAS/Unicode-String-2.10.tar.gz" + sha256 "894a110ece479546af8afec0972eec7320c86c4dea4e6b354dff3c7526ba9b68" + 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 "Authen::NTLM" do + url "https://cpan.metacpan.org/authors/id/N/NB/NBEBOUT/NTLM-1.09.tar.gz" + sha256 "c823e30cda76bc15636e584302c960e2b5eeef9517c2448f7454498893151f85" + end + + resource "Mail::IMAPClient" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLOBBES/Mail-IMAPClient-3.43.tar.gz" + sha256 "093c97fac15b47a8fe4d2936ef2df377abf77cc8ab74092d2128bb945d1fb46f" + end + + resource "IO::Tee" do + url "https://cpan.metacpan.org/authors/id/N/NE/NEILB/IO-Tee-0.66.tar.gz" + sha256 "2d9ce7206516f9c30863a367aa1c2b9b35702e369b0abaa15f99fb2cc08552e0" + 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 "JSON" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.10.tar.gz" + sha256 "df8b5143d9a7de99c47b55f1a170bd1f69f711935c186a6dc0ab56dd05758e35" + end + + resource "Test::MockObject" do + url "https://cpan.metacpan.org/authors/id/C/CH/CHROMATIC/Test-MockObject-1.20200122.tar.gz" + sha256 "2b7f80da87f5a6fe0360d9ee521051053017442c3a26e85db68dfac9f8307623" + end + + resource "JSON::WebToken" do + url "https://cpan.metacpan.org/authors/id/X/XA/XAICRON/JSON-WebToken-0.10.tar.gz" + sha256 "77c182a98528f1714d82afc548d5b3b4dc93e67069128bb9b9413f24cf07248b" + end + + resource "Module::Build::Tiny" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-0.048.tar.gz" + sha256 "79a73e506fb7badabdf79137a45c6c5027daaf6f9ac3dcfb9d4ffcce92eb36bd" + end + + resource "Readonly" do + url "https://cpan.metacpan.org/authors/id/S/SA/SANKO/Readonly-2.05.tar.gz" + sha256 "4b23542491af010d44a5c7c861244738acc74ababae6b8838d354dfb19462b5e" + end + + resource "Sys::MemInfo" do + url "https://cpan.metacpan.org/authors/id/S/SC/SCRESTO/Sys-MemInfo-0.99.tar.gz" + sha256 "0786319d3a3a8bae5d727939244bf17e140b714f52734d5e9f627203e4cf3e3b" + end + + resource "File::Tail" do + url "https://cpan.metacpan.org/authors/id/M/MG/MGRABNAR/File-Tail-1.3.tar.gz" + sha256 "26d09f81836e43eae40028d5283fe5620fe6fe6278bf3eb8eb600c48ec34afc7" + end + + resource "IO::Socket::IP" do + url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/IO-Socket-IP-0.42.tar.gz" + sha256 "f97a3846c50a4e0658ce1722ce7cc2acad9472e70478bfbe9c794fb1db6a6b13" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + build_pl = ["Module::Build", "JSON::WebToken", "Module::Build::Tiny", "Readonly", "IO::Socket::IP"] + + 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 + + # Big Sur has a sufficiently new Module::Build + build_pl.shift if OS.mac? && MacOS.version >= :big_sur + + 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", "-c", "imapsync" + system "#{Formula["pod2man"].opt_bin}/pod2man", "imapsync", "imapsync.1" + bin.install "imapsync" + man1.install "imapsync.1" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + assert_match version.to_s, pipe_output("#{bin}/imapsync --dry") + shell_output("#{bin}/imapsync --dry \ + --host1 test1.lamiral.info --user1 test1 --password1 secret1 \ + --host2 test2.lamiral.info --user2 test2 --password2 secret2") + end +end diff --git a/Formula/i/imath.rb b/Formula/i/imath.rb new file mode 100644 index 0000000000000..415d2113c2b27 --- /dev/null +++ b/Formula/i/imath.rb @@ -0,0 +1,52 @@ +class Imath < Formula + desc "Library of 2D and 3D vector, matrix, and math operations" + homepage "https://imath.readthedocs.io/en/latest/" + url "https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v3.1.12.tar.gz" + sha256 "8a1bc258f3149b5729c2f4f8ffd337c0e57f09096e4ba9784329f40c4a9035da" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "946c5c0541452ef3285cc49eb495c476b083203d3c0edab493045cb2e665fd31" + sha256 cellar: :any, arm64_sonoma: "787f2525c5b53bb1153e265774555f2a39c350bf927ce32fdb675987db179776" + sha256 cellar: :any, arm64_ventura: "b8fb4298477012d3e5b2572264a10220370e2849214df677519f92c93a522e42" + sha256 cellar: :any, arm64_monterey: "c20229d09bc63f5f7c83ba3cfa9b591993d5b08aa5a82ee1e715cffd169d42c1" + sha256 cellar: :any, sonoma: "6f6d2633c7443723f64753ceac0bd2d69c5954f615fb9d843944f03fc6a9cf32" + sha256 cellar: :any, ventura: "93b1c78e9e628d1c6897d738ec717e50b1451f84ef5a97d3109d7ba26dc42bc9" + sha256 cellar: :any, monterey: "b83b7496444abd2a7d69c208f77aa788ce65326cb9b34561a1cd467083104e32" + sha256 cellar: :any_skip_relocation, arm64_linux: "eab26c27cf6c5e2a45da4bada3075547eedeb60e5fad75f7f9285e0737cb1074" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bd454621cf393aee0d5448b8ac4e6e1d6cd3fd0ee88b4596be0fec333d11130" + end + + depends_on "cmake" => :build + + # These used to be provided by `ilmbase` + link_overwrite "lib/libImath.dylib" + link_overwrite "lib/libImath.so" + + 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 + + int main(int argc, char *argv[]) + { + double x[2] = {0.0, 0.0}; + int n = IMATH_NAMESPACE::solveQuadratic(1.0, 3.0, 2.0, x); + + if (x[0] > x[1]) + std::swap(x[0], x[1]); + + std::cout << n << ", " << x[0] << ", " << x[1] << "\n"; + } + EOS + system ENV.cxx, "-std=c++11", "-I#{include}/Imath", "-o", testpath/"test", "test.cpp" + assert_equal "2, -2, -1\n", shell_output("./test") + end +end diff --git a/Formula/i/imessage-exporter.rb b/Formula/i/imessage-exporter.rb new file mode 100644 index 0000000000000..5fa95f4a98b10 --- /dev/null +++ b/Formula/i/imessage-exporter.rb @@ -0,0 +1,33 @@ +class ImessageExporter < Formula + desc "Command-line tool to export and inspect local iMessage database" + homepage "https://github.com/ReagentX/imessage-exporter" + url "https://github.com/ReagentX/imessage-exporter/archive/refs/tags/2.6.2.tar.gz" + sha256 "c5c372b6e9e416522be3cc0797557b0fdb0df546b0b48e379d18b56f54b692ea" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "79751187490085c01bd66f6e00e9059e4ca9d4f3d252ead0c0af8a761db47393" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1ba23b54cbb4f8c006a2f08d94bf548970c8c666a8ccdc4c4b3cb3ebc74c4f6c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f3ec942d1b835e7cc0aa17273925fdd5cd6a4e94c5aad080c7d60db7bb3bf9b2" + sha256 cellar: :any_skip_relocation, sonoma: "1f0d781c61084cc396e18bf53da6682438be8dc7adeaf804f15002841de0c0a9" + sha256 cellar: :any_skip_relocation, ventura: "8ecf2e0efbe7f76d90c1dac41d03950b8f816c397d835c2f3a78b216c136793f" + sha256 cellar: :any_skip_relocation, arm64_linux: "235b89d49a0956642fc1ad28a9e013c389a05278819dc57ba971012e6e413e9c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0d5f24d0c724f8c81528ba216139e05cf6ed1fa9176d985c72ae1ceb36649b5" + end + + depends_on "rust" => :build + + def install + # manifest set to 0.0.0 for some reason, matching upstream build behavior + # https://github.com/ReagentX/imessage-exporter/blob/develop/build.sh + inreplace "imessage-exporter/Cargo.toml", "version = \"0.0.0\"", + "version = \"#{version}\"" + system "cargo", "install", *std_cargo_args(path: "imessage-exporter") + end + + test do + assert_match version.to_s, shell_output(bin/"imessage-exporter --version") + output = shell_output(bin/"imessage-exporter --diagnostics 2>&1") + assert_match "Invalid configuration: Database not found", output + end +end diff --git a/Formula/i/imessage-ruby.rb b/Formula/i/imessage-ruby.rb new file mode 100644 index 0000000000000..2ffbadcd234f2 --- /dev/null +++ b/Formula/i/imessage-ruby.rb @@ -0,0 +1,40 @@ +class ImessageRuby < Formula + desc "Command-line tool to send iMessage" + homepage "https://github.com/linjunpop/imessage" + url "https://github.com/linjunpop/imessage/archive/refs/tags/v0.4.0.tar.gz" + sha256 "09031e60548f34f05e07faeb0e26b002aeb655488d152dd811021fba8d850162" + license "MIT" + head "https://github.com/linjunpop/imessage.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "676022be294ea2d4654c968012a952dac36f61e573e44f3fd99b52f071767372" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b325f6945c083382956ed3f81d453e17151a0a09f4eff7d5f84c7208d1a1cd7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a05553e529ee3f7d2a212033b5353e1bae2534a7651e0b4ac4ac66c2301c6f96" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a05553e529ee3f7d2a212033b5353e1bae2534a7651e0b4ac4ac66c2301c6f96" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "97031cd42ff2a4338b973493629d314f1ad1e7a79ca7e912503f68585f5bfc61" + sha256 cellar: :any_skip_relocation, sonoma: "9b325f6945c083382956ed3f81d453e17151a0a09f4eff7d5f84c7208d1a1cd7" + sha256 cellar: :any_skip_relocation, ventura: "a05553e529ee3f7d2a212033b5353e1bae2534a7651e0b4ac4ac66c2301c6f96" + sha256 cellar: :any_skip_relocation, monterey: "a05553e529ee3f7d2a212033b5353e1bae2534a7651e0b4ac4ac66c2301c6f96" + sha256 cellar: :any_skip_relocation, big_sur: "97031cd42ff2a4338b973493629d314f1ad1e7a79ca7e912503f68585f5bfc61" + sha256 cellar: :any_skip_relocation, catalina: "97031cd42ff2a4338b973493629d314f1ad1e7a79ca7e912503f68585f5bfc61" + sha256 cellar: :any_skip_relocation, arm64_linux: "98197a6b45c3c46674268c2033a0648ce4afe2c89904a56f959d1c37a2f2a902" + sha256 cellar: :any_skip_relocation, x86_64_linux: "584a4e42785d258568915c287d02ea037c685bd577812c66844350425fea5df3" + end + + uses_from_macos "ruby" + + def install + ENV["GEM_HOME"] = libexec + ENV["GEM_PATH"] = libexec + + system "gem", "build", "imessage.gemspec", "-o", "imessage-#{version}.gem" + system "gem", "install", "--local", "--verbose", "imessage-#{version}.gem", "--no-document" + + bin.install libexec/"bin/imessage" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + assert_match "imessage v#{version}", shell_output("#{bin}/imessage --version") + end +end diff --git a/Formula/i/img2pdf.rb b/Formula/i/img2pdf.rb new file mode 100644 index 0000000000000..83bef9dae34a1 --- /dev/null +++ b/Formula/i/img2pdf.rb @@ -0,0 +1,61 @@ +class Img2pdf < Formula + include Language::Python::Virtualenv + + desc "Convert images to PDF via direct JPEG inclusion" + homepage "https://gitlab.mister-muffin.de/josch/img2pdf" + url "https://files.pythonhosted.org/packages/82/c3/023387e00682dc1b46bd719ec19c4c9206dc8eb182dfd02bc62c5b9320a2/img2pdf-0.6.1.tar.gz" + sha256 "306e279eb832bc159d7d6294b697a9fbd11b4be1f799b14b3b2174fb506af289" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1079b3b50de55ff2cb1ddba4de0b6263eb02e19e4b8c71b789a6e06c5a6eb592" + sha256 cellar: :any, arm64_sonoma: "3de734f6984a7b7e9642891724dabaa3f21d61627c82d06a5d43828eaaf2933e" + sha256 cellar: :any, arm64_ventura: "e43e023adc6d723aeba2a655fe2aa389ed431132cad290adf7a9fe40e361879c" + sha256 cellar: :any, sonoma: "a23983ca26c2f1334d67ab269a3710623e3ccf836e05fe29709275a1bb69221b" + sha256 cellar: :any, ventura: "baf5c53f44485b93ba85f1ca2da11ad6afb6537ccf810e768ca539e9d9e55fcb" + sha256 cellar: :any_skip_relocation, arm64_linux: "5420086a7f5c69c6afdc715b30a04b2956e4bb62ebc50c32f3080e7057e8444a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4ef1ecb337f847a0348943032ef9432b5b5c012ae95c45fb6182fefa6e8dfa4" + end + + depends_on "pillow" + depends_on "python@3.13" + depends_on "qpdf" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/98/97/06afe62762c9a8a86af0cfb7bfdab22a43ad17138b07af5b1a58442690a2/deprecated-1.2.18.tar.gz" + sha256 "422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" + sha256 "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + end + + resource "pikepdf" do + url "https://files.pythonhosted.org/packages/9d/eb/4756ba366b5b243a1b5711e02993ea932d45d7e2d750bf01eb0029dc443e/pikepdf-9.7.0.tar.gz" + sha256 "ab54895a246768a2660cafe48052dbf5425c76f6f04e0f53b911df6cfd7e1c95" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"img2pdf", test_fixtures("test.png"), test_fixtures("test.jpg"), + test_fixtures("test.tiff"), "--pagesize", "A4", "-o", "test.pdf" + assert_path_exists testpath/"test.pdf" + end +end diff --git a/Formula/i/imgdiet.rb b/Formula/i/imgdiet.rb new file mode 100644 index 0000000000000..c7eb150d20db3 --- /dev/null +++ b/Formula/i/imgdiet.rb @@ -0,0 +1,36 @@ +class Imgdiet < Formula + desc "Optimize and resize images" + homepage "https://git.sr.ht/~jamesponddotco/imgdiet-go" + url "https://git.sr.ht/~jamesponddotco/imgdiet-go/archive/v0.2.0.tar.gz" + sha256 "25fcdc40ad63ce2739fad6543c592d757dc59d5c7a409af87cb20884600984ce" + license "MIT" + head "https://git.sr.ht/~jamesponddotco/imgdiet-go", branch: "trunk" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3f2124dea87682bc905fb403d3cfb36b16193959e56e267de9c31c73c8a5c708" + sha256 cellar: :any, arm64_sonoma: "f105f52dbd1a99c8a8326845841da7f2236060e11ca3cec2c4b96f9f8375f876" + sha256 cellar: :any, arm64_ventura: "fc829c032e756ecb5b56c0998c24147db43f76ef1498961a2b59ebb04bb1b6d5" + sha256 cellar: :any, sonoma: "ae731c0d8dca0947f6015f1024ce4b41206c00c9e497a62f0f834965a4c67852" + sha256 cellar: :any, ventura: "947efce27e3c0ef5a9be6fba6fa4fe3c7f6d926ed27bb1e3f62d04cf4c2eb65d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a7c06e10203f59029e144945345f81e9efbbe4b758442441f35a9e6d85b603e7" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "vips" + + on_macos do + depends_on "gettext" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/imgdiet" + end + + test do + system bin/"imgdiet", "--compression", "9", test_fixtures("test.png"), testpath/"out.jpg" + assert_path_exists testpath/"out.jpg" + end +end diff --git a/Formula/i/imgdiff.rb b/Formula/i/imgdiff.rb new file mode 100644 index 0000000000000..c6a177afbf7a1 --- /dev/null +++ b/Formula/i/imgdiff.rb @@ -0,0 +1,33 @@ +class Imgdiff < Formula + desc "Pixel-by-pixel image difference tool" + homepage "https://github.com/n7olkachev/imgdiff" + url "https://github.com/n7olkachev/imgdiff/archive/refs/tags/v1.0.2.tar.gz" + sha256 "e057fffbf9960caf90d69387d6bc52e4c59637d75b6ee19cbc40d8a3238877e4" + license "MIT" + head "https://github.com/n7olkachev/imgdiff.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "353d0253fe941d4505520098a05f9be091e7c4cdd1ce77dd192f20b4021df88d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dde33cc03e6e8eabf007303fb1fbc66c6b84675d6397df4cce9d1c7540a7ce0a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "942f3a737f90c494847592442d17fd383991ed92169fb96a5790ad689e519c6c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "694271bcf10d42cdd17204aef241ba2ae68c7e0feb22a7d71435b5ac9895b7ec" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "af67076130ef37bd88ce33a9702400cb8dffb66dc851b1ed1ff74a24044ab31f" + sha256 cellar: :any_skip_relocation, sonoma: "a4235fcb7927d3b4fb8fd45c808109b078b0ec61de7e468512a8b21f1e74925a" + sha256 cellar: :any_skip_relocation, ventura: "29720df056b9a1efc37bba9541506c34472f15e3a76e8e7c5da2bd72d9a76633" + sha256 cellar: :any_skip_relocation, monterey: "da646305519f434e028ef7ab1e1c8a53df4ce19444e7c54aaac8d92b78a34823" + sha256 cellar: :any_skip_relocation, big_sur: "050b20915575431bee1ec827bdbc497c7203cf80999fd926da0b89bd206ff0e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba0cd4c33ae5e8d1bc7a2cf32152c75c02b24e4477a3c674857b1547b43baec2" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd" + end + + test do + test_image = test_fixtures("test.png") + output = shell_output("#{bin}/imgdiff #{test_image} #{test_image}") + assert_match "Images are equal", output + end +end diff --git a/Formula/i/imgp.rb b/Formula/i/imgp.rb new file mode 100644 index 0000000000000..5a289f2600cdf --- /dev/null +++ b/Formula/i/imgp.rb @@ -0,0 +1,33 @@ +class Imgp < Formula + include Language::Python::Shebang + + desc "High-performance CLI batch image resizer & rotator" + homepage "https://github.com/jarun/imgp" + url "https://github.com/jarun/imgp/archive/refs/tags/v2.9.tar.gz" + sha256 "4cc3dcbe669ff6b97641ce0c6c332e63934d829a0700fd87171d5be5b1b89305" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1b0ee7ffcfa799ee0c2157c291db758e12bc1d7ad6a29fa7403fcbe3f7d29394" + end + + depends_on "pillow" + depends_on "python@3.13" + + def install + rewrite_shebang detected_python_shebang, "imgp" + system "make", "install", "PREFIX=#{prefix}" + + bash_completion.install "auto-completion/bash/imgp-completion.bash" => "imgp" + fish_completion.install "auto-completion/fish/imgp.fish" + zsh_completion.install "auto-completion/zsh/_imgp" + end + + test do + cp test_fixtures("test.png"), "test.png" + system bin/"imgp", "-x", "50", "test.png" + assert_path_exists testpath/"test_IMGP.png" + + assert_match version.to_s, shell_output("#{bin}/imgp --help 2>&1") + end +end diff --git a/Formula/i/imgproxy.rb b/Formula/i/imgproxy.rb new file mode 100644 index 0000000000000..37cf0cad0f03a --- /dev/null +++ b/Formula/i/imgproxy.rb @@ -0,0 +1,58 @@ +class Imgproxy < Formula + desc "Fast and secure server for resizing and converting remote images" + homepage "https://imgproxy.net/" + url "https://github.com/imgproxy/imgproxy/archive/refs/tags/v3.28.0.tar.gz" + sha256 "43e1fa6f49b8a0cc82da7e5774342c7b95c74a65381a040cd39acc2c6bf862c6" + license "MIT" + head "https://github.com/imgproxy/imgproxy.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "73d5c6d819fbadd507b0282332e110e603076cabc27739df5a7dab59841fb552" + sha256 cellar: :any, arm64_sonoma: "9412aeb30d70b1a0077a11acf693ee2e75166eb359bc74f92d9ec1cc73b59e8c" + sha256 cellar: :any, arm64_ventura: "93a92638810d263deaa6cb8b9541d5bbf30afe1809835b50caea2b0cedadeda8" + sha256 cellar: :any, sonoma: "5dee2d3978d48ff30c413dd7f994fac6089fa355fe53886a1f38a4d1c4aa25ef" + sha256 cellar: :any, ventura: "1abd843a5433c1905ba8686f2e97cda179968e95a20ee69eb35e69349c955086" + sha256 cellar: :any_skip_relocation, x86_64_linux: "831d008ef5d22a9ada546b9fb83135f7933f1e95992e680e67502355836a7be5" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "vips" + + on_macos do + depends_on "gettext" + end + + def install + ENV["CGO_LDFLAGS_ALLOW"] = "-s|-w" + ENV["CGO_CFLAGS_ALLOW"] = "-Xpreprocessor" + + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + port = free_port + cp test_fixtures("test.jpg"), testpath/"test.jpg" + + ENV["IMGPROXY_BIND"] = "127.0.0.1:#{port}" + ENV["IMGPROXY_LOCAL_FILESYSTEM_ROOT"] = testpath + + pid = spawn bin/"imgproxy" + sleep 20 + sleep 50 if OS.mac? && Hardware::CPU.intel? + + output = testpath/"test-converted.png" + url = "http://127.0.0.1/#{port}/insecure/resize:fit:100:100:true/plain/local:///test.jpg@png" + + system "curl", "-s", "-o", output, url + assert_path_exists output + + file_output = shell_output("file #{output}") + assert_match "PNG image data", file_output + assert_match "100 x 100", file_output + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/i/imlib2.rb b/Formula/i/imlib2.rb new file mode 100644 index 0000000000000..391fff63fd5fd --- /dev/null +++ b/Formula/i/imlib2.rb @@ -0,0 +1,49 @@ +class Imlib2 < Formula + desc "Image loading and rendering library" + homepage "https://sourceforge.net/projects/enlightenment/" + url "https://downloads.sourceforge.net/project/enlightenment/imlib2-src/1.12.5/imlib2-1.12.5.tar.gz" + sha256 "097d40aee4cf4a349187615b796b37db1652fcc84bb0e8d5c0b380ab651d9095" + license "Imlib2" + + bottle do + sha256 arm64_sequoia: "45e7832774c28fd6a40124c51835018534047536a506a8d7eed221ea2ab0204c" + sha256 arm64_sonoma: "baf76382fc4937739ed8d2b61486b21a6677014362e0f3d891e6300d2a3f0012" + sha256 arm64_ventura: "deea7061495882c1a753838d12b5c84aeafad29a6422320bdae76c73bc5a29c2" + sha256 sonoma: "9eba1823dbefdeebc3529ab8b40fd9a94ae36418e127f6743ccde0cd8ba6f78c" + sha256 ventura: "9370ff5272a65cf7cf2f6748085c5728f6ac53cf1c42a382c4ef868e6856e8b8" + sha256 arm64_linux: "2779490f04716e717c042160e6a70288b7de6097b42d2f5c573d8b3415abf482" + sha256 x86_64_linux: "4a735d4a3638e58916205c67984e5ee5fa1b2aff554c9da6310d57995c84234f" + end + + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "giflib" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "libx11" + depends_on "libxcb" + depends_on "libxext" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "./configure", "--disable-silent-rules", + "--enable-amd64=no", + "--without-heif", + "--without-id3", + "--without-j2k", + "--without-jxl", + "--without-ps", + "--without-svg", + "--without-webp", + *std_configure_args + system "make", "install" + end + + test do + system bin/"imlib2_conv", test_fixtures("test.png"), "imlib2_test.png" + end +end diff --git a/Formula/i/immer.rb b/Formula/i/immer.rb new file mode 100644 index 0000000000000..12440243d29eb --- /dev/null +++ b/Formula/i/immer.rb @@ -0,0 +1,44 @@ +class Immer < Formula + desc "Library of persistent and immutable data structures written in C++" + homepage "https://sinusoid.es/immer/" + url "https://github.com/arximboldi/immer/archive/refs/tags/v0.8.1.tar.gz" + sha256 "de8411c84830864604bb685dc8f2e3c0dbdc40b95b2f6726092f7dcc85e75209" + license "BSL-1.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "b7829748b93385f0e75c14f6b04502c943d7ca8b3530b6d3715cfb1c00fbd401" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + def install + args = %w[ + -Dimmer_BUILD_EXAMPLES=OFF + -Dimmer_BUILD_EXTRAS=OFF + -Dimmer_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 + int main() + { + const auto v0 = immer::vector{}; + const auto v1 = v0.push_back(13); + assert(v0.size() == 0 && v1.size() == 1 && v1[0] == 13); + + const auto v2 = v1.set(0, 42); + assert(v1[0] == 13 && v2[0] == 42); + } + CPP + + system ENV.cxx, "-std=c++14", "-I#{include}", "test.cpp", "-o", "test" + system "./test" + end +end diff --git a/Formula/i/immich-cli.rb b/Formula/i/immich-cli.rb new file mode 100644 index 0000000000000..984547bbb50b4 --- /dev/null +++ b/Formula/i/immich-cli.rb @@ -0,0 +1,23 @@ +class ImmichCli < Formula + desc "Command-line interface for self-hosted photo manager Immich" + homepage "https://immich.app/docs/features/command-line-interface" + url "https://registry.npmjs.org/@immich/cli/-/cli-2.2.65.tgz" + sha256 "4ddf8c27184b0496e10019c44c360aaf483eefaed29bcae36c8f26f8246d7146" + license "AGPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, all: "787cce5ddba965cc8c7603d9563a9880ee1b3ee6427c81dcd545f8829f40cc25" + 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/"immich --version") + assert_match "No auth file exists. Please login first.", shell_output(bin/"immich server-info", 1) + end +end diff --git a/Formula/i/immich-go.rb b/Formula/i/immich-go.rb new file mode 100644 index 0000000000000..5c8ef8dfd7b5e --- /dev/null +++ b/Formula/i/immich-go.rb @@ -0,0 +1,38 @@ +class ImmichGo < Formula + desc "Alternative to the official immich-CLI command written in Go" + homepage "https://github.com/simulot/immich-go" + url "https://github.com/simulot/immich-go/archive/refs/tags/v0.26.2.tar.gz" + sha256 "f7f28e5564f8dcc9e212de540d1fcd97da42e4e01cbf23783ad75908499f3cd6" + license "AGPL-3.0-only" + head "https://github.com/simulot/immich-go.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a8a708643bbba7b9920e140ccf8ba2e9f58960ad6c9a2d944aaa01570393b321" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7115f84fea56567bdf37f8516922810558bf15c4240bfed51ffefb52eaeffa77" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a4aa81c30dbcbf3f0fa31a45a87c172811760c17cb677868f702ccc6f469a02c" + sha256 cellar: :any_skip_relocation, sonoma: "ecf85afab78a0cc610624e27a8d4e22d250f49a76dc89694ef9a2d634b39af30" + sha256 cellar: :any_skip_relocation, ventura: "5b3336520dc28e10dcee345c40b65ab96d6031a280caf898ff442e5f7792f71b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be30c5edd7fcde93f8a105d6ef4328f3a13be89e1c4bd10fcc76be562a75e393" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/simulot/immich-go/app.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"immich-go", "completion") + end + + test do + output = shell_output("#{bin}/immich-go --server http://localhost --api-key test upload from-folder . 2>&1", 1) + assert_match "Error: error while calling the immich's ping API", output + + assert_match version.to_s, shell_output("#{bin}/immich-go --version") + end +end diff --git a/Formula/i/immortal.rb b/Formula/i/immortal.rb new file mode 100644 index 0000000000000..a74022b0d7259 --- /dev/null +++ b/Formula/i/immortal.rb @@ -0,0 +1,35 @@ +class Immortal < Formula + desc "OS agnostic (*nix) cross-platform supervisor" + homepage "https://immortal.run/" + url "https://github.com/immortal/immortal/archive/refs/tags/v0.24.6.tar.gz" + sha256 "f62b21ba622ffff04acee5bb7606761db3d19f57cbbe666e40fa84674b1ef4bf" + license "BSD-3-Clause" + head "https://github.com/immortal/immortal.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5e2bcd1f7d742201f09a81cf4e84f5ed53fd4f0037b642b88911a5dfe791125c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c1c3c0aeb30b0928787e93434aeedb259f019550eb26ee06e86a9958c81d632f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1710b0a46b1221d24c2bbcc560ad91c193c3ad630772d7758dd8a7fd26c3cde0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1a500f9e9092f1263f8811d0148e63f9aeb2600233827b98ccdc93d99cb95d05" + sha256 cellar: :any_skip_relocation, sonoma: "f4e75b4f8c75d8aae9cc0fae052916f1424b36ac6183942d974077191b6079f6" + sha256 cellar: :any_skip_relocation, ventura: "bbe372718d137b00ec707786441d1a6ef0df3a472e5c282464358bdbfef8571f" + sha256 cellar: :any_skip_relocation, monterey: "ab444396fab083b3938dc87cfae485a1c2eb0fad2b221a5a00a9bccf5a88f62b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75184bcc104152d9b8c6d418f09dcde65d93863645794c19a2482278354dd281" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + %w[immortal immortalctl immortaldir].each do |file| + system "go", "build", *std_go_args(ldflags:, output: bin/file), "cmd/#{file}/main.go" + end + man8.install Dir["man/*.8"] + end + + test do + system bin/"immortal", "-v" + system bin/"immortalctl", "-v" + system bin/"immortaldir", "-v" + end +end diff --git a/Formula/i/immudb.rb b/Formula/i/immudb.rb new file mode 100644 index 0000000000000..62c51141e53ec --- /dev/null +++ b/Formula/i/immudb.rb @@ -0,0 +1,58 @@ +class Immudb < Formula + desc "Lightweight, high-speed immutable database" + homepage "https://immudb.io/" + url "https://github.com/codenotary/immudb/archive/refs/tags/v1.9.6.tar.gz" + sha256 "23ffc0db0f09a76b5fbeb4ac99288eb710bb76328a62eebfd5b3c496a333b06f" + license "Apache-2.0" + head "https://github.com/codenotary/immudb.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cd161e153ab0079172f48878b3cb6e56a27ad41fb33aad546948bc0c4e1f6220" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "055d9fddcf52d9050071be83495d66eecee43c8ef29cf0df7a47244d57601ad4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "464feab4bacebdaf0608b7a392e19bd16876560ada067051dbf745b0f8c3cc89" + sha256 cellar: :any_skip_relocation, sonoma: "3c15a17ea8a351047e8c3b29dadf4faf7fc10e7c83289feb14359008c5326df8" + sha256 cellar: :any_skip_relocation, ventura: "49cb44d5e851ff03a054725bcacbe22a033e808986b9029bccf76569a77dbfa2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eca039e40556b1e10e3a923b8523e6dd1ca6956a03fdc9eba5a2c84e899a3652" + end + + depends_on "go" => :build + + def install + ENV["WEBCONSOLE"] = "default" + system "make", "all" + + %w[immudb immuclient immuadmin].each do |binary| + bin.install binary + generate_completions_from_executable(bin/binary, "completion") + end + end + + def post_install + (var/"immudb").mkpath + end + + service do + run opt_bin/"immudb" + keep_alive true + error_log_path var/"log/immudb.log" + log_path var/"log/immudb.log" + working_dir var/"immudb" + end + + test do + port = free_port + + fork do + exec bin/"immudb", "--port=#{port}" + end + sleep 3 + + assert_match "immuclient", shell_output("#{bin}/immuclient version") + assert_match "immuadmin", shell_output("#{bin}/immuadmin version") + end +end diff --git a/Formula/i/imposm3.rb b/Formula/i/imposm3.rb new file mode 100644 index 0000000000000..91404da67d831 --- /dev/null +++ b/Formula/i/imposm3.rb @@ -0,0 +1,73 @@ +class Imposm3 < Formula + desc "Imports OpenStreetMap data into PostgreSQL/PostGIS databases" + homepage "https://imposm.org/docs/imposm3/latest/" + url "https://github.com/omniscale/imposm3/archive/refs/tags/v0.14.2.tar.gz" + sha256 "dc779a274a7ec7e86ffdb97c881b6410f82a6d21924d08b9ed0785d2cf266113" + license "Apache-2.0" + head "https://github.com/omniscale/imposm3.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ef0edd9832c108b40a6eea993c88ce7c2716f05dbac67e18f4c45085acdef838" + sha256 cellar: :any, arm64_sonoma: "f9c1f47003a67cac4718eee990bce3a96fdce764d7003670edcc9e782da1939d" + sha256 cellar: :any, arm64_ventura: "e73b325a6bff285c9dfe4cc6736703881518972216c2ac0cd01e0b147db07632" + sha256 cellar: :any, sonoma: "d665afcf5f6f08652ed1af431e1aa4d38eb0dd747b57ed3e7c6726d8cb75a175" + sha256 cellar: :any, ventura: "49aacfcbcbf3e519f8257f24a8366aca51460e96c51036a5232d5d1324e60f3c" + sha256 cellar: :any_skip_relocation, arm64_linux: "2545034b671e36df257d6adbc876eb1e0eec26c15469c0bf0d4ab20c16638285" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5f69476d6817e049c7177e14a69cff62546d2a436aff1334c83a34ee6c07d69" + end + + depends_on "go" => :build + depends_on "osmium-tool" => :test + depends_on "geos" + depends_on "leveldb" + + def install + ENV["CGO_LDFLAGS"] = "-L#{Formula["geos"].opt_lib} -L#{Formula["leveldb"].opt_lib}" + ENV["CGO_CFLAGS"] = "-I#{Formula["geos"].opt_include} -I#{Formula["leveldb"].opt_include}" + + ldflags = "-s -w -X github.com/omniscale/imposm3.Version=#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"imposm"), "cmd/imposm/main.go" + end + + test do + (testpath/"sample.osm.xml").write <<~XML + + + + + XML + + (testpath/"mapping.yml").write <<~YAML + tables: + admin: + columns: + - name: osm_id + type: id + - name: geometry + type: geometry + - key: name + name: name + type: string + - name: type + type: mapping_value + - key: admin_level + name: admin_level + type: integer + mapping: + boundary: + - administrative + type: polygon + YAML + + assert_match version.to_s, shell_output("#{bin}/imposm version").chomp + + system "osmium", "cat", testpath/"sample.osm.xml", "-o", "sample.osm.pbf" + system bin/"imposm", "import", "-read", testpath/"sample.osm.pbf", "-mapping", testpath/"mapping.yml", + "-cachedir", testpath/"cache" + + assert_path_exists testpath/"cache/coords/LOG" + assert_path_exists testpath/"cache/nodes/LOG" + assert_path_exists testpath/"cache/relations/LOG" + assert_path_exists testpath/"cache/ways/LOG" + end +end diff --git a/Formula/i/inadyn.rb b/Formula/i/inadyn.rb new file mode 100644 index 0000000000000..1c2e9006440c7 --- /dev/null +++ b/Formula/i/inadyn.rb @@ -0,0 +1,49 @@ +class Inadyn < Formula + desc "Dynamic DNS client with IPv4, IPv6, and SSL/TLS support" + homepage "https://troglobit.com/projects/inadyn/" + url "https://github.com/troglobit/inadyn/releases/download/v2.12.0/inadyn-2.12.0.tar.xz" + sha256 "e64c4386b6f42bbace589b847f22823a755b59f14a277a5f556fef0d99069245" + license all_of: ["GPL-2.0-or-later", "ISC", "MIT"] + + bottle do + sha256 arm64_sequoia: "e39b78913e57e26ef5a7f3d3acf1af40f58ac4025acc42e433eb790ea7454eb2" + sha256 arm64_sonoma: "fe1fce79f66da620c913fbdb957e248a86c230c11811c816abb71a0b7917f787" + sha256 arm64_ventura: "174182adaa5fe0f4109350449a22af67979963cfff2d1c061ea2831c1657921c" + sha256 arm64_monterey: "11427c528e6354558c3031729130274e52d3fa304801523c0bc9305a11ea0352" + sha256 arm64_big_sur: "17bdc871fa2a0195a3fc5aad3a3088d3fd82bf82373abab194cd886a34fe8f72" + sha256 sonoma: "7b34e39f010411c1e0353ee2c82926082244e4a912c56a27452e464b838e1d25" + sha256 ventura: "37916b230975cb4d718b41108b1e6a98b475f27e9c731285fd286e572af414ec" + sha256 monterey: "b50296e99a5e8841ffa158c7d29a0ad6532cd5cbcc430dd1dabee8a8c792d22f" + sha256 big_sur: "e026b42611ff126596674a9aee10b6c33321bb471d8ed3f27836014dec1b4eeb" + sha256 arm64_linux: "cd720c777e2e52e8a7f1030af7bc90164358f5f5c566b09d696f9b55f00c7afd" + sha256 x86_64_linux: "056482287ad8f58d2ffd63ab62d28f9e0d136ddfce39eb884265e9e9c7ffafe9" + end + + head do + url "https://github.com/troglobit/inadyn.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + + depends_on "confuse" + depends_on "gnutls" + depends_on "nettle" + + def install + mkdir_p buildpath/"inadyn/m4" + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", + "--sysconfdir=#{etc}", + "--localstatedir=#{var}", + *std_configure_args + system "make", "install" + end + + test do + system sbin/"inadyn", "--check-config", "--config=#{doc}/examples/inadyn.conf" + end +end diff --git a/Formula/i/inchi.rb b/Formula/i/inchi.rb new file mode 100644 index 0000000000000..bd7cb580095c9 --- /dev/null +++ b/Formula/i/inchi.rb @@ -0,0 +1,73 @@ +class Inchi < Formula + desc "IUPAC International Chemical Identifier" + homepage "https://www.inchi-trust.org/" + url "https://github.com/IUPAC-InChI/InChI/releases/download/v1.07.3/INCHI-1-SRC.zip" + sha256 "b42d828b5d645bd60bc43df7e0516215808d92e5a46c28e12b1f4f75dfaae333" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f8c679765ab69cc6aae5b2fa81f6bbeea4c903826060410d0b36f4794211f005" + sha256 cellar: :any, arm64_sonoma: "b7fc7a880952735827136cd6ef79d7d624b5543faaa6bc2223f4ebbf63c3f111" + sha256 cellar: :any, arm64_ventura: "21ecf31cb3a08690a8f126b4de6b1c6763555e1d976951c36fad7adbf8e30a6f" + sha256 cellar: :any, sonoma: "3db52eb01148b9f7bd51984b0f3a74bd094df492135d7aee961a593df7c052a8" + sha256 cellar: :any, ventura: "2cdfe8cc8a2577264d50d5b3f577d12fd2f75781bcfc7e020e0579b1383a20c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f11430d8f96d6a69e1f8604bc297108ea4e7871c4209b0a02cf7c0da382f07a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4154598d70aa3ff9644319a6f181b3044748779833d3d1d7544005ce1162268" + end + + # These used to be part of open-babel + link_overwrite "include/inchi/inchi_api.h", "lib/libinchi.dylib", "lib/libinchi.so" + + def install + bin.mkpath + lib.mkpath + + args = ["C_COMPILER=#{ENV.cc}", "BIN_DIR=#{bin}", "LIB_DIR=#{lib}"] + system "make", "-C", "INCHI_API/libinchi/gcc", *args + system "make", "-C", "INCHI_EXE/inchi-1/gcc", *args + + # Add major versioned and unversioned symlinks + libinchi = shared_library("libinchi", version.to_s[/^(\d+\.\d+)/, 1]) + odie "Unable to find #{libinchi}" unless (lib/libinchi).exist? + lib.install_symlink libinchi => shared_library("libinchi", version.major.to_s) + lib.install_symlink shared_library("libinchi", version.major.to_s) => shared_library("libinchi") + + # Install the same headers as Debian[^1] and Fedora[^2]. Some are needed by `open-babel`[^3]. + # + # [^1]: https://packages.debian.org/sid/amd64/libinchi-dev/filelist + # [^2]: https://packages.fedoraproject.org/pkgs/inchi/inchi-devel/fedora-rawhide.html#files + # [^3]: https://github.com/openbabel/openbabel/blob/master/cmake/modules/FindInchi.cmake + (include/"inchi").install %w[ichisize.h inchi_api.h ixa.h].map { |header| "INCHI_BASE/src/#{header}" } + end + + test do + # https://github.com/openbabel/openbabel/blob/master/test/files/alanine.mol + (testpath/"alanine.mol").write <<~EOS + + Ketcher 02131813502D 1 1.00000 0.00000 0 + + 7 6 0 0 0 999 V2000 + 1.0000 1.0000 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 + 1.0000 2.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.8660 2.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.5000 2.8660 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.7321 2.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.8660 3.5000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0000 2.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 1 0 0 0 + 2 3 1 0 0 0 + 2 4 1 1 0 0 + 3 5 1 0 0 0 + 3 6 2 0 0 0 + 2 7 1 6 0 0 + M END + $$$$ + EOS + + assert_equal <<~EOS, shell_output("#{bin}/inchi-1 alanine.mol -STDIO") + Structure: 1 + InChI=1S/C3H7NO2/c1-2(4)3(5)6/h2H,4H2,1H3,(H,5,6)/t2-/m0/s1 + AuxInfo=1/1/N:4,2,3,1,5,6/E:(5,6)/it:im/rA:7nNCCCOOH/rB:s1;s2;P2;s3;d3;N2;/rC:1,1,0;1,2,0;1.866,2.5,0;.5,2.866,0;2.7321,2,0;1.866,3.5,0;0,2,0; + EOS + end +end diff --git a/Formula/i/include-what-you-use.rb b/Formula/i/include-what-you-use.rb new file mode 100644 index 0000000000000..cb3a654b820d1 --- /dev/null +++ b/Formula/i/include-what-you-use.rb @@ -0,0 +1,109 @@ +class IncludeWhatYouUse < Formula + desc "Tool to analyze #includes in C and C++ source files" + homepage "https://include-what-you-use.org/" + url "https://include-what-you-use.org/downloads/include-what-you-use-0.24.src.tar.gz" + sha256 "a23421ceff601d3ea215e8fa9292bfa8ca39eb1ac2098dbbedfc6cfe65541c10" + license "NCSA" + head "https://github.com/include-what-you-use/include-what-you-use.git", branch: "master" + + # This omits the 3.3, 3.4, and 3.5 versions, which come from the older + # version scheme like `Clang+LLVM 3.5` (25 November 2014). The current + # versions are like: `include-what-you-use 0.15 (aka Clang+LLVM 11)` + # (21 November 2020). + livecheck do + url "https://include-what-you-use.org/downloads/" + regex(/href=.*?include-what-you-use[._-]v?((?!3\.[345])\d+(?:\.\d+)+)[._-]src\.t/i) + end + + bottle do + sha256 arm64_sequoia: "30ac8c04e8b22d83d3840790810ad8d4e8fc42f2feef42a24da884e9ad0a33e8" + sha256 arm64_sonoma: "e25d02bca2115e3249049bcfe411560870fa816ffc1a07f5fe18d5c8875367f1" + sha256 arm64_ventura: "79ef55188a1c7328c7f717a96661403093a724e3fd5031b5799315ff7247232b" + sha256 sonoma: "b84eea76382134fcb83e0de05b86c7984d1743ca128fdb9967bd09e81699bf4b" + sha256 ventura: "2cff619261a5c37db862623ac06cc058d83f171ee8b1298d4812a1e1106cbdc6" + sha256 arm64_linux: "c098fa5be99719ee60989eba3970d9c242ba789a1bae7b105e8ed4adac757f68" + sha256 x86_64_linux: "4a76b914ec9e0b003450f409db649fe518e16bce7d5e175158de6d345abb409c" + end + + depends_on "cmake" => :build + depends_on "llvm" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + def llvm + deps.map(&:to_formula).find { |f| f.name.match?(/^llvm(@\d+(\.\d+)*)?$/) } + end + + def install + # FIXME: CMake stripped out our `llvm` rpath; work around that. + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath(source: libexec/"bin", target: llvm.opt_lib)} + ] + + # We do not want to symlink clang or libc++ headers into HOMEBREW_PREFIX, + # so install to libexec to ensure that the resource path, which is always + # computed relative to the location of the include-what-you-use executable + # and is not configurable, is also located under libexec. + system "cmake", "-S", ".", "-B", "build", *std_cmake_args(install_prefix: libexec), *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + bin.write_exec_script libexec.glob("bin/*") + man1.install_symlink libexec.glob("share/man/man1/*") + + # include-what-you-use needs a copy of the clang and libc++ headers to be + # located in specific folders under its resource path. These may need to be + # updated when new major versions of llvm are released, i.e., by + # incrementing the version of include-what-you-use or the revision of this + # formula. This would be indicated by include-what-you-use failing to + # locate stddef.h and/or stdlib.h when running the test block below. + # https://clang.llvm.org/docs/LibTooling.html#libtooling-builtin-includes + (libexec/"lib").mkpath + ln_sf (llvm.opt_lib/"clang").relative_path_from(libexec/"lib"), libexec/"lib" + (libexec/"include").mkpath + ln_sf (llvm.opt_include/"c++").relative_path_from(libexec/"include"), libexec/"include" + end + + test do + (testpath/"direct.h").write <<~C + #include + size_t function() { return (size_t)0; } + C + (testpath/"indirect.h").write <<~C + #include "direct.h" + C + (testpath/"main.c").write <<~C + #include "indirect.h" + int main() { + return (int)function(); + } + C + expected_output = <<~EOS + main.c should add these lines: + #include "direct.h" // for function + + main.c should remove these lines: + - #include "indirect.h" // lines 1-1 + + The full include-list for main.c: + #include "direct.h" // for function + --- + EOS + assert_match expected_output, + shell_output("#{bin}/include-what-you-use main.c 2>&1") + + mapping_file = "#{llvm.opt_include}/c++/v1/libcxx.imp" + (testpath/"main.cc").write <<~CPP + #include + int main() { + std::cout << "Hello, world!" << std::endl; + return 0; + } + CPP + expected_output = <<~EOS + (main.cc has correct #includes/fwd-decls) + EOS + assert_match expected_output, + shell_output("#{bin}/include-what-you-use main.cc -Xiwyu --mapping_file=#{mapping_file} 2>&1") + end +end diff --git a/Formula/i/incus.rb b/Formula/i/incus.rb new file mode 100644 index 0000000000000..0ea10efeb1774 --- /dev/null +++ b/Formula/i/incus.rb @@ -0,0 +1,38 @@ +class Incus < Formula + desc "CLI client for interacting with Incus" + homepage "https://linuxcontainers.org/incus" + url "https://linuxcontainers.org/downloads/incus/incus-6.12.tar.xz" + sha256 "c165077b150d175845199b5763643d1630e9afe9d02fa58be227a1ef00bf4abc" + license "Apache-2.0" + head "https://github.com/lxc/incus.git", branch: "main" + + livecheck do + url "https://linuxcontainers.org/incus/downloads/" + regex(/href=.*?incus[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "96c0e9f8b692336ee8a2b5218997bdc50d128bb37aae72633425d8c5fd18b449" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "96c0e9f8b692336ee8a2b5218997bdc50d128bb37aae72633425d8c5fd18b449" + sha256 cellar: :any_skip_relocation, arm64_ventura: "96c0e9f8b692336ee8a2b5218997bdc50d128bb37aae72633425d8c5fd18b449" + sha256 cellar: :any_skip_relocation, sonoma: "b879970fef17805a567779870e95cb95134673e90deb27fe889474f0288c07cd" + sha256 cellar: :any_skip_relocation, ventura: "b879970fef17805a567779870e95cb95134673e90deb27fe889474f0288c07cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "ebaff3260b927859e23d59d8b37d3a851fc5d34872e1cdb4e064cc3b51c9d3fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1fca0ec9e0434f01409bc0e8809975f2c0fab3a3e7faac74a626257ec257df88" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/incus" + + generate_completions_from_executable(bin/"incus", "completion") + end + + test do + output = JSON.parse(shell_output("#{bin}/incus remote list --format json")) + assert_equal "https://images.linuxcontainers.org/", output["images"]["Addr"] + + assert_match version.to_s, shell_output("#{bin}/incus --version") + end +end diff --git a/Formula/i/indicators.rb b/Formula/i/indicators.rb new file mode 100644 index 0000000000000..005211521e6af --- /dev/null +++ b/Formula/i/indicators.rb @@ -0,0 +1,70 @@ +class Indicators < Formula + desc "Activity indicators for modern C++" + homepage "https://github.com/p-ranav/indicators" + url "https://github.com/p-ranav/indicators/archive/refs/tags/v2.3.tar.gz" + sha256 "70da7a693ff7a6a283850ab6d62acf628eea17d386488af8918576d0760aef7b" + license "MIT" + head "https://github.com/p-ranav/indicators.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2322751e34abbf99f523edd2f22119089ce3ce2935ffc919e6ba6c2e2b6f72bc" + 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() { + using namespace indicators; + show_console_cursor(false); + indicators::ProgressBar p; + p.set_option(option::BarWidth{0}); + p.set_option(option::PrefixText{"Brewing... "}); + p.set_option(option::Start{""}); + p.set_option(option::Fill{""}); + p.set_option(option::Lead{""}); + p.set_option(option::Remainder{""}); + p.set_option(option::End{""}); + p.set_option(option::ForegroundColor{indicators::Color::white}); + p.set_option(option::ShowPercentage{false}); + p.set_option( + option::FontStyles{std::vector{indicators::FontStyle::bold}}); + auto job = [&p]() { + while (true) { + p.set_option( + option::PrefixText{"Brewing... " + std::to_string(p.current()) + "% "}); + if (p.current() + 1 > 100) + p.set_option(option::PrefixText{"Brewing... Done"}); + p.tick(); + if (p.is_completed()) { + break; + } + std::this_thread::sleep_for(std::chrono::milliseconds(10)); + } + }; + std::thread thread(job); + thread.join(); + show_console_cursor(true); + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-o", "test" + output = shell_output("./test") + + assert_equal output.scan(/(?=Brewing...)/).count, 100 + 100.times do |n| + assert_match "#{n}%", output + end + end +end diff --git a/Formula/i/inetutils.rb b/Formula/i/inetutils.rb new file mode 100644 index 0000000000000..16e17f8e8a0f8 --- /dev/null +++ b/Formula/i/inetutils.rb @@ -0,0 +1,126 @@ +class Inetutils < Formula + desc "GNU utilities for networking" + homepage "https://www.gnu.org/software/inetutils/" + url "https://ftp.gnu.org/gnu/inetutils/inetutils-2.6.tar.xz" + mirror "https://ftpmirror.gnu.org/inetutils/inetutils-2.6.tar.xz" + sha256 "68bedbfeaf73f7d86be2a7d99bcfbd4093d829f52770893919ae174c0b2357ca" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "d6effc6962c93d36abc4c5912fad2235fb8a22660e0564134e04d4bab636b6b3" + sha256 arm64_sonoma: "c597d9559731d11246683d104edfe3a0cefc5051cf2c522e865540a19e39b225" + sha256 arm64_ventura: "2fcf900ec14e1c171d02ca16dc8f39123de7a3efd2a9881770fe6ed095bab2b4" + sha256 sonoma: "67ec5c370542a4a6e30bb446748481336eebc34d5b7e26c83f2209990cf76272" + sha256 ventura: "01116c7159a47d9ad41d61ef5d7e6c671e06f80a0473d0e6459e1d51e2a48aa2" + sha256 arm64_linux: "7016cbea9291ebb752d5cb881caf5537fd816027e09b8b89869ce2d09f0a7a82" + sha256 x86_64_linux: "d14270a7f2d5b24df4526319374f9038b2ebc430e5e2432262eff1d78195232a" + end + + depends_on "help2man" => :build + depends_on "libidn2" + + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + + on_linux do + depends_on "readline" + end + + conflicts_with "telnet", because: "both install `telnet` binaries" + conflicts_with "tnftp", because: "both install `ftp` binaries" + conflicts_with "gping", because: "both install `gping` binaries" + + def noshadow + # List of binaries that do not shadow macOS utils + list = %w[dnsdomainname rcp rexec rlogin rsh] + on_high_sierra :or_newer do + list += %w[ftp telnet] + end + list + end + + def linux_conflicts + # List of binaries that conflict with other common implementations + list = %w[dnsdomainname hostname ifconfig] # net-tools + list << "logger" # util-linux + list << "ping" # iputils + list << "whois" # whois + list + end + + def install + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--with-idn", + "--program-prefix=g" + system "make", "SUIDMODE=", "install" + + no_conflict = OS.mac? ? noshadow : [] + + # Symlink server commands without 'g' prefix into sbin on Linux. + # (ftpd, inetd, rexecd, rlogind, rshd, syslogd, talkd, telnetd, tftpd, uucpd) + if OS.linux? + libexec.find.each do |path| + next if !File.executable?(path) || File.directory?(path) + + cmd = path.basename.to_s.sub(/^g/, "") + sbin.install_symlink libexec/"g#{cmd}" => cmd + man8.install_symlink man8/"g#{cmd}.8" => "#{cmd}.8" + end + end + + # Symlink commands without 'g' prefix into libexec/gnubin and + # man pages into libexec/gnuman + bin.find.each do |path| + next if !File.executable?(path) || File.directory?(path) + + cmd = path.basename.to_s.sub(/^g/, "") + no_conflict << cmd unless OS.mac? + (libexec/"gnubin").install_symlink bin/"g#{cmd}" => cmd + (libexec/"gnuman"/"man1").install_symlink man1/"g#{cmd}.1" => "#{cmd}.1" + end + (libexec/"gnubin").install_symlink "../gnuman" => "man" + + no_conflict -= linux_conflicts if OS.linux? + # Symlink binaries that are not shadowing macOS utils or are + # non-conflicting with common alternatives on Linux. + no_conflict.each do |cmd| + bin.install_symlink "g#{cmd}" => cmd + man1.install_symlink "g#{cmd}.1" => "#{cmd}.1" + end + end + + def caveats + s = "" + on_macos do + s += <<~EOS + Only the following commands have been installed without the prefix 'g'. + + #{noshadow.sort.join("\n ")} + + If you really need to use other commands with their normal names, + EOS + end + on_linux do + s += <<~EOS + The following commands have been installed with the prefix 'g'. + + #{linux_conflicts.sort.join("\n ")} + + If you really need to use these commands with their normal names, + EOS + end + s += <<~EOS + you can add a "gnubin" directory to your PATH from your bashrc like: + + PATH="#{opt_libexec}/gnubin:$PATH" + EOS + s + end + + test do + ftp = OS.mac? ? libexec/"gnubin/ftp" : bin/"ftp" + output = pipe_output("#{ftp} -v", "open ftp.gnu.org\nanonymous\nls\nquit\n") + assert_match "Connected to ftp.gnu.org.\n220 GNU FTP server ready", output + end +end diff --git a/Formula/i/infat.rb b/Formula/i/infat.rb new file mode 100644 index 0000000000000..bae58f7d6a984 --- /dev/null +++ b/Formula/i/infat.rb @@ -0,0 +1,30 @@ +class Infat < Formula + desc "Tool to set default openers for file formats and url schemes on MacOS" + homepage "https://github.com/philocalyst/infat" + url "https://github.com/philocalyst/infat/archive/refs/tags/v2.3.4.tar.gz" + sha256 "5dd263952f49617ce688d3ec6c043e3dce8c5766fab9a4aef31f99c010c1ccd5" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e263c627344fa10c4373c6f7f76b96bbf090703a2e1761ed247f04f385deaf56" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "db3419a6e095edcea41b5a029dcbc2aa1a94b70c684e42c67e38019de59dbf69" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0c57aaf12f258985b59315f828aaee79cb6fda188dca639a29407205cef827ab" + sha256 cellar: :any_skip_relocation, sonoma: "76e0af0201e4226d74e7b95c0217b0b3a1bdd21f98de04cf2c7f07a7d4bb6d3a" + sha256 cellar: :any_skip_relocation, ventura: "be3d4afc2a8963e9e6bdafdf6b6dd7522b5bb0594fabd7bec6a669eeeaac78e9" + end + + depends_on :macos + uses_from_macos "swift" => :build + + def install + system "swift", "build", "--disable-sandbox", "-c", "release", "--static-swift-stdlib" + bin.install ".build/release/infat" + + generate_completions_from_executable(bin/"infat", "--generate-completion-script") + end + + test do + output = shell_output("#{bin}/infat set TextEdit --ext txt") + assert_match "Successfully bound TextEdit to txt", output + end +end diff --git a/Formula/i/infisical.rb b/Formula/i/infisical.rb new file mode 100644 index 0000000000000..57593073e3991 --- /dev/null +++ b/Formula/i/infisical.rb @@ -0,0 +1,44 @@ +class Infisical < Formula + desc "CLI for Infisical" + homepage "https://infisical.com/docs/cli/overview" + url "https://github.com/Infisical/infisical/archive/refs/tags/infisical-cli/v0.41.2.tar.gz" + sha256 "3acf82b51453681bb70a77373ce03c22ff544b5ae2c29f8e124687504de0012a" + license "MIT" + head "https://github.com/Infisical/infisical.git", branch: "main" + + livecheck do + url :stable + regex(%r{^infisical-cli/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0199f07e2099a2b247298ebca3718479c0fc39d5f8581a203bb65436554d711f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0199f07e2099a2b247298ebca3718479c0fc39d5f8581a203bb65436554d711f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0199f07e2099a2b247298ebca3718479c0fc39d5f8581a203bb65436554d711f" + sha256 cellar: :any_skip_relocation, sonoma: "02b355e3bfebc24b0869a75d78e056f06ae638ec116f9e817e8b063d2a0bfb56" + sha256 cellar: :any_skip_relocation, ventura: "02b355e3bfebc24b0869a75d78e056f06ae638ec116f9e817e8b063d2a0bfb56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a73cef48b6a13d7359ff80116d6fa35eae3a7d245e116bdcc317e043fc90c8c" + end + + depends_on "go" => :build + + def install + cd "cli" do + ldflags = %W[ + -s -w + -X github.com/Infisical/infisical-merge/packages/util.CLI_VERSION=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/infisical --version") + + output = shell_output("#{bin}/infisical reset") + assert_match "Reset successful", output + + output = shell_output("#{bin}/infisical init 2>&1", 1) + assert_match "You must be logged in to run this command.", output + end +end diff --git a/Formula/i/influxdb-cli.rb b/Formula/i/influxdb-cli.rb new file mode 100644 index 0000000000000..78a8cd7756c91 --- /dev/null +++ b/Formula/i/influxdb-cli.rb @@ -0,0 +1,74 @@ +class InfluxdbCli < Formula + desc "CLI for managing resources in InfluxDB v2" + homepage "https://influxdata.com/time-series-platform/influxdb/" + url "https://github.com/influxdata/influx-cli.git", + tag: "v2.7.5", + revision: "a79a2a1b825867421d320428538f76a4c90aa34c" + license "MIT" + head "https://github.com/influxdata/influx-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_sequoia: "d319d1a5eb3d7643f4b6b767e0eacf8f1af03eeab6586c6d062a8350d9f95acb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3c3c36b35e1fe4d4f4712f72c5ddd12709846f32088f1bc7637e6b3ed24b2fbe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f07a68d82c3075c6bf62922c646998bb362c4ea26166f4ecd31738da4e2af9ba" + sha256 cellar: :any_skip_relocation, arm64_monterey: "91dc24269127d0a41b7faef7d93e61a6ffec9ecb50d0a0cab69465cd66d9c706" + sha256 cellar: :any_skip_relocation, sonoma: "65b07fcaf938f712efb30d280dd18ce8a2652de4b9f89f913ccaad300da18d3f" + sha256 cellar: :any_skip_relocation, ventura: "e098362c88be1c91f18927ab98efab0bbb3d73603a3383c1c6735b0c27b4bf95" + sha256 cellar: :any_skip_relocation, monterey: "f073f4752f61154e3bed747c8e79fe778d51596d16e179506b52106f65225cc1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a2f1bdca46755b062abdd18f7c3fefc5af42f14e709034c1f2db67e5ca7e896" + end + + depends_on "go" => :build + depends_on "influxdb" => :test + + def install + ldflags = %W[ + -s + -w + -X main.version=#{version} + -X main.commit=#{Utils.git_short_head(length: 10)} + -X main.date=#{time.iso8601} + ] + + system "go", "build", *std_go_args(output: bin/"influx", ldflags:), "./cmd/influx" + + generate_completions_from_executable(bin/"influx", "completion", shells: [:bash, :zsh]) + end + + test do + # Boot a test server. + influxd_port = free_port + influxd = fork do + exec "influxd", "--bolt-path=#{testpath}/influxd.bolt", + "--engine-path=#{testpath}/engine", + "--http-bind-address=:#{influxd_port}", + "--log-level=error" + end + sleep 30 + + # Configure the CLI for the test env. + influx_host = "http://localhost/#{influxd_port}" + cli_configs_path = "#{testpath}/influx-configs" + ENV["INFLUX_HOST"] = influx_host + ENV["INFLUX_CONFIGS_PATH"] = cli_configs_path + + # Check that the CLI can connect to the server. + assert_match "OK", shell_output("#{bin}/influx ping") + + # Perform initial DB setup. + system bin/"influx", "setup", "-u", "usr", "-p", "fakepassword", "-b", "bkt", "-o", "org", "-f" + + # Assert that initial resources show in CLI output. + assert_match "usr", shell_output("#{bin}/influx user list") + assert_match "bkt", shell_output("#{bin}/influx bucket list") + assert_match "org", shell_output("#{bin}/influx org list") + ensure + Process.kill("TERM", influxd) + Process.wait influxd + end +end diff --git a/Formula/i/influxdb.rb b/Formula/i/influxdb.rb new file mode 100644 index 0000000000000..92c037afc137f --- /dev/null +++ b/Formula/i/influxdb.rb @@ -0,0 +1,147 @@ +class Influxdb < Formula + desc "Time series, events, and metrics database" + homepage "https://influxdata.com/time-series-platform/influxdb/" + # When bumping to 3.x, update license stanza to `license any_of: ["Apache-2.0", "MIT"]` + # Ref: https://github.com/influxdata/influxdb/blob/main/Cargo.toml#L124 + url "https://github.com/influxdata/influxdb.git", + tag: "v2.7.11", + revision: "fbf5d4ab5e65d3a3661aa52e1d05259d19a6a81b" + license "MIT" + head "https://github.com/influxdata/influxdb.git", branch: "main-2.x" + + # 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_sequoia: "577ba9284522799541c29345f9c05007fa0a4d49c506e9d6e3ef8410cf070bba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9cb31a2b14b041a044bb1bd8ca75a3a1799d6ab4c9981d95eafe2675cf1786fc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1ff048a6a4b8784a6f07c16c40a406fa90f7acc77b9f6db1d2b59403fac0d211" + sha256 cellar: :any_skip_relocation, sonoma: "2cbda744c82743c7e1b0193708c813b22602b65ce9c3c5117f595ea44933103e" + sha256 cellar: :any_skip_relocation, ventura: "5b206daf7596804851d172d0f70d0713b2477a1cc7fb58d5b0c18a3deba9a6f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dce1ad38f5b09ae95904350471e1d3dd7dd9eb1558e07c52e9dda1db2dd8ab2a" + end + + depends_on "breezy" => :build + depends_on "go" => :build + depends_on "pkgconf" => :build + depends_on "protobuf" => :build + depends_on "rust" => :build + + # NOTE: The version here is specified in the go.mod of influxdb. + # If you're upgrading to a newer influxdb version, check to see if this needs upgraded too. + resource "pkg-config-wrapper" do + url "https://github.com/influxdata/pkg-config/archive/refs/tags/v0.2.11.tar.gz" + sha256 "52b22c151163dfb051fd44e7d103fc4cde6ae8ff852ffc13adeef19d21c36682" + + livecheck do + url "https://raw.githubusercontent.com/influxdata/influxdb/v#{LATEST_VERSION}/go.mod" + regex(/pkg-config\s+v?(\d+(?:\.\d+)+)/i) + end + end + + # NOTE: The version/URL here is specified in scripts/fetch-ui-assets.sh in influxdb. + # If you're upgrading to a newer influxdb version, check to see if this needs upgraded too. + resource "ui-assets" do + url "https://github.com/influxdata/ui/releases/download/OSS-2.7.8/build.tar.gz" + sha256 "28ace1df37b7860b011e5c1b8c74830b0ec584d2f86c24e58a7c855c168f58a8" + + livecheck do + url "https://raw.githubusercontent.com/influxdata/influxdb/v#{LATEST_VERSION}/scripts/fetch-ui-assets.sh" + regex(/UI_RELEASE=["']?OSS[._-]v?(\d+(?:\.\d+)+)["']?$/i) + end + end + + # rust 1.83 build patch, upstream pr ref, https://github.com/influxdata/flux/pull/5516 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/a188defd190459f5d1faa8c8f9e253e8f83ca161/influxdb/2.7.11-rust-1.83.patch" + sha256 "15fa09ae18389b21b8d93792934abcf85855a666ddd8faeaeca6890452fd5bd4" + end + + def install + # Set up the influxdata pkg-config wrapper to enable just-in-time compilation & linking + # of the Rust components in the server. + resource("pkg-config-wrapper").stage do + system "go", "build", *std_go_args(output: buildpath/"bootstrap/pkg-config") + end + ENV.prepend_path "PATH", buildpath/"bootstrap" + + # Extract pre-build UI resources to the location expected by go-bindata. + resource("ui-assets").stage(buildpath/"static/data/build") + # Embed UI files into the Go source code. + system "make", "generate-web-assets" + + # Build the server. + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{Utils.git_short_head(length: 10)} + -X main.date=#{time.iso8601} + ] + tags = %w[ + assets + sqlite_foreign_keys + sqlite_json + ] + + system "go", "build", *std_go_args(output: bin/"influxd", ldflags:, tags:), "./cmd/influxd" + + data = var/"lib/influxdb2" + data.mkpath + + # Generate default config file. + config = buildpath/"config.yml" + config.write Utils.safe_popen_read(bin/"influxd", "print-config", + "--bolt-path=#{data}/influxdb.bolt", + "--engine-path=#{data}/engine") + (etc/"influxdb2").install config + + # Create directory for DB stdout+stderr logs. + (var/"log/influxdb2").mkpath + end + + def caveats + <<~EOS + This formula does not contain command-line interface; to install it, run: + brew install influxdb-cli + EOS + end + + service do + run opt_bin/"influxd" + keep_alive true + working_dir HOMEBREW_PREFIX + log_path var/"log/influxdb2/influxd_output.log" + error_log_path var/"log/influxdb2/influxd_output.log" + environment_variables INFLUXD_CONFIG_PATH: etc/"influxdb2/config.yml" + end + + test do + influxd_port = free_port + influx_host = "http://localhost/#{influxd_port}" + ENV["INFLUX_HOST"] = influx_host + + influxd = fork do + exec "#{bin}/influxd", "--bolt-path=#{testpath}/influxd.bolt", + "--engine-path=#{testpath}/engine", + "--http-bind-address=:#{influxd_port}", + "--log-level=error" + end + sleep 30 + + # Check that the server has properly bundled UI assets and serves them as HTML. + curl_output = shell_output("curl --silent --head #{influx_host}") + assert_match "200 OK", curl_output + assert_match "text/html", curl_output + ensure + Process.kill("TERM", influxd) + Process.wait influxd + end +end diff --git a/Formula/i/influxdb@1.rb b/Formula/i/influxdb@1.rb new file mode 100644 index 0000000000000..b4ac9ec45a534 --- /dev/null +++ b/Formula/i/influxdb@1.rb @@ -0,0 +1,88 @@ +class InfluxdbAT1 < Formula + desc "Time series, events, and metrics database" + homepage "https://influxdata.com/time-series-platform/influxdb/" + url "https://github.com/influxdata/influxdb/archive/refs/tags/v1.12.0.tar.gz" + sha256 "386ffaae9b050c52e720153f6c52b4a832d97edbfd589ffe498a269b6fe09fbf" + # 1.x is using MIT license while 1.x and 3.x is using dual license (Apache-2.0/MIT) + license "MIT" + + livecheck do + url :stable + regex(/^v?(1(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a54efa19a98e686d906825fc5aa9fed8c740c38a76c9bd3e2b7946d2eeda0dfa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ccd1fbfca74c70cf224bf1c12823f480cd7b6538c1e5289adba8574afd446b05" + sha256 cellar: :any_skip_relocation, arm64_ventura: "19953f46f583a2f2295bb3fa8f551cbf324c8b1f8b699ac01a538f44803dad3d" + sha256 cellar: :any_skip_relocation, sonoma: "1da2fcc61dc5a233920aa387e0009e2c50488b20fc5901ad2a78353a9f02d48c" + sha256 cellar: :any_skip_relocation, ventura: "b02e6c03e1e7ca6a1e71985ae1adeb0ff867e47bf22d84ef5231ab0ce037459d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "79494e554b7bd0f9f1191d40a86a23bd5ef01e58ab2f8bc99ad088603023ce2d" + end + + keg_only :versioned_formula + + depends_on "go" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + # NOTE: The version here is specified in the go.mod of influxdb. + # If you're upgrading to a newer influxdb version, check to see if this needs + # to be upgraded too. + resource "pkg-config-wrapper" do + url "https://github.com/influxdata/pkg-config/archive/refs/tags/v0.2.14.tar.gz" + sha256 "465d2fb3fc6dab9aca60e3ee3ca623ea346f3544d53082505645f81a7c4cd6d3" + end + + def install + # Set up the influxdata pkg-config wrapper + resource("pkg-config-wrapper").stage do + system "go", "build", *std_go_args(output: buildpath/"bootstrap/pkg-config") + end + ENV.prepend_path "PATH", buildpath/"bootstrap" + + ldflags = "-s -w -X main.version=#{version}" + + %w[influxd influx influx_tools influx_inspect].each do |f| + system "go", "build", *std_go_args(output: bin/f, ldflags:), "./cmd/#{f}" + end + + etc.install "etc/config.sample.toml" => "influxdb.conf" + inreplace etc/"influxdb.conf" do |s| + s.gsub! "/var/lib/influxdb/data", "#{var}/influxdb/data" + s.gsub! "/var/lib/influxdb/meta", "#{var}/influxdb/meta" + s.gsub! "/var/lib/influxdb/wal", "#{var}/influxdb/wal" + end + + (var/"influxdb/data").mkpath + (var/"influxdb/meta").mkpath + (var/"influxdb/wal").mkpath + end + + service do + run [opt_bin/"influxd", "-config", HOMEBREW_PREFIX/"etc/influxdb.conf"] + keep_alive true + working_dir var + log_path var/"log/influxdb.log" + error_log_path var/"log/influxdb.log" + end + + test do + (testpath/"config.toml").write shell_output("#{bin}/influxd config") + inreplace testpath/"config.toml" do |s| + s.gsub! %r{/.*/.influxdb/data}, "#{testpath}/influxdb/data" + s.gsub! %r{/.*/.influxdb/meta}, "#{testpath}/influxdb/meta" + s.gsub! %r{/.*/.influxdb/wal}, "#{testpath}/influxdb/wal" + end + + begin + pid = spawn "#{bin}/influxd -config #{testpath}/config.toml" + sleep 6 + output = shell_output("curl -Is localhost:8086/ping") + assert_match "X-Influxdb-Version:", output + ensure + Process.kill("SIGTERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/i/inform6.rb b/Formula/i/inform6.rb new file mode 100644 index 0000000000000..2dde6226f458c --- /dev/null +++ b/Formula/i/inform6.rb @@ -0,0 +1,42 @@ +class Inform6 < Formula + desc "Design system for interactive fiction" + homepage "https://inform-fiction.org/inform6.html" + url "https://ifarchive.org/if-archive/infocom/compilers/inform6/source/inform-6.42-r8.tar.gz" + version "6.42-r8" + sha256 "0a8dd735caf42c319e1184f12059aa4ec68a9b8ab95692e956c4cd9c91d45fca" + license "Artistic-2.0" + head "https://gitlab.com/DavidGriffith/inform6unix.git", branch: "master" + + livecheck do + url "https://ifarchive.org/if-archive/infocom/compilers/inform6/source/" + regex(/href=.*?inform[._-]v?(\d+(?:[.-]\d+)+(?:[._-]r\d+)?)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cf50a43cf6ad1bc5002808d0d54881f67ac354b4bcb8a5f667dc91f541bfaa29" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c56ad26a5f0b7ee5b1546a2323fcc1011727219c94f85d37e3c1f56c56218c9d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b047ddfaa9d4a2ed217f9db0848ae6ed4f81da101f483eb2d8ef181845114739" + sha256 cellar: :any_skip_relocation, sonoma: "151021e2da3438b0fd19a89a5c11a0368bf64dedbb08dc92d32bf97254409dd2" + sha256 cellar: :any_skip_relocation, ventura: "6ceed800af41932e57fc4f44c9fb35fbf68d112e67509cb46355918dcfd4769f" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd487ca3d4116c71e15bd22d38ee373a8b1bcd2e45ba5d042689b13c23ea6567" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b36578068913f30bbe928390054a167147038167d3b42781e9e066e5695a6f0" + end + + def install + # Parallel install fails because of: https://gitlab.com/DavidGriffith/inform6unix/-/issues/26 + ENV.deparallelize + system "make", "PREFIX=#{prefix}", "MAN_PREFIX=#{man}", "MANDIR=#{man1}", "install" + end + + test do + resource "homebrew-test_resource" do + url "https://inform-fiction.org/examples/Adventureland/Adventureland.inf" + sha256 "3961388ff00b5dfd1ccc1bb0d2a5c01a44af99bdcf763868979fa43ba3393ae7" + end + + resource("homebrew-test_resource").stage do + system bin/"inform", "Adventureland.inf" + assert_path_exists Pathname.pwd/"Adventureland.z5" + end + end +end diff --git a/Formula/i/infracost.rb b/Formula/i/infracost.rb new file mode 100644 index 0000000000000..a1da8443cb538 --- /dev/null +++ b/Formula/i/infracost.rb @@ -0,0 +1,35 @@ +class Infracost < Formula + desc "Cost estimates for Terraform" + homepage "https://www.infracost.io/docs/" + url "https://github.com/infracost/infracost/archive/refs/tags/v0.10.41.tar.gz" + sha256 "daec27ad58abcb8a823ad21862b4143eaa8a8fd03b3c7f3621e8fca61eb8e68e" + license "Apache-2.0" + head "https://github.com/infracost/infracost.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "06de717bd785bcd624c997a14590ff47a188e31536d2fd5117b4d316c0dc6904" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "06de717bd785bcd624c997a14590ff47a188e31536d2fd5117b4d316c0dc6904" + sha256 cellar: :any_skip_relocation, arm64_ventura: "06de717bd785bcd624c997a14590ff47a188e31536d2fd5117b4d316c0dc6904" + sha256 cellar: :any_skip_relocation, sonoma: "bdc82112097b2a1b05b8f578896e64a96374658385768a791330c74f42f125a7" + sha256 cellar: :any_skip_relocation, ventura: "bdc82112097b2a1b05b8f578896e64a96374658385768a791330c74f42f125a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "40a7f0284e9b3122b93b89771f00b0c5cea7ecef05d75e7231718242f5e548bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d521fdfce102614f8bd7d7e9e2adcd59ff807f46bfe24fe767e44de5415f03e0" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + ldflags = "-X github.com/infracost/infracost/internal/version.Version=v#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/infracost" + + generate_completions_from_executable(bin/"infracost", "completion", "--shell") + end + + test do + assert_match "v#{version}", shell_output("#{bin}/infracost --version 2>&1") + + output = shell_output("#{bin}/infracost breakdown --no-color 2>&1", 1) + assert_match "Error: INFRACOST_API_KEY is not set but is required", output + end +end diff --git a/Formula/i/inframap.rb b/Formula/i/inframap.rb new file mode 100644 index 0000000000000..c7c39e6c81901 --- /dev/null +++ b/Formula/i/inframap.rb @@ -0,0 +1,45 @@ +class Inframap < Formula + desc "Read your tfstate or HCL to generate a graph" + homepage "https://github.com/cycloidio/inframap" + url "https://github.com/cycloidio/inframap/archive/refs/tags/v0.7.0.tar.gz" + sha256 "1dd1080245198eb53451502b40994a90e97eb283dc61b0d77d620f0ee6c1d23b" + license "MIT" + head "https://github.com/cycloidio/inframap.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "045720e46c73c4a8f8398d48d0a66207e62195d8797c7f69a8ac1ab1a3bf7412" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "045720e46c73c4a8f8398d48d0a66207e62195d8797c7f69a8ac1ab1a3bf7412" + sha256 cellar: :any_skip_relocation, arm64_ventura: "045720e46c73c4a8f8398d48d0a66207e62195d8797c7f69a8ac1ab1a3bf7412" + sha256 cellar: :any_skip_relocation, sonoma: "aa596b7fd67f707f8a838582b00f65c4a195c1051654a2f72c4e78d0f0d968a0" + sha256 cellar: :any_skip_relocation, ventura: "aa596b7fd67f707f8a838582b00f65c4a195c1051654a2f72c4e78d0f0d968a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6621e3619bcb502a7e99fbf8043fac869cf1d03b6fffb09945bf759d721093b7" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/cycloidio/inframap/cmd.Version=v#{version}") + + generate_completions_from_executable(bin/"inframap", "completion") + end + + test do + resource "homebrew-test_resource" do + url "https://raw.githubusercontent.com/cycloidio/inframap/7ef22e7/generate/testdata/azure.tfstate" + sha256 "633033074a8ac43df3d0ef0881f14abd47a850b4afd5f1fbe02d3885b8e8104d" + end + + assert_match "v#{version}", shell_output("#{bin}/inframap version") + testpath.install resource("homebrew-test_resource") + output = shell_output("#{bin}/inframap generate --tfstate #{testpath}/azure.tfstate") + assert_match "strict digraph G {", output + assert_match "\"azurerm_virtual_network.myterraformnetwork\"->\"azurerm_virtual_network.myterraformnetwork2\";", + output + end +end diff --git a/Formula/i/ingress2gateway.rb b/Formula/i/ingress2gateway.rb new file mode 100644 index 0000000000000..c245936f697fb --- /dev/null +++ b/Formula/i/ingress2gateway.rb @@ -0,0 +1,121 @@ +class Ingress2gateway < Formula + desc "Convert Kubernetes Ingress resources to Kubernetes Gateway API resources" + homepage "https://github.com/kubernetes-sigs/ingress2gateway" + url "https://github.com/kubernetes-sigs/ingress2gateway/archive/refs/tags/v0.4.0.tar.gz" + sha256 "7c511e4c309b62d01ce2128643922637f0ca77524bab2c4c6811bebbb43ff119" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/ingress2gateway.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "804894e94d5995db30d5c70e8ae93fadb64d95488792ad588f01508178f7c6ab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4fe29eb341d887273844fbbb2ac25d7016ea1c035200bcad34cef8ac3e27a905" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6eef8e59f45e555634acea8f44f91845d3e52c57a807aeeabf5ec4f114c3b75b" + sha256 cellar: :any_skip_relocation, sonoma: "b532ae021e34552d352eed71e599c80dae9d6037dba5153b433ce30d0b2b73d8" + sha256 cellar: :any_skip_relocation, ventura: "c23960ce300c4aa2ea510e24e7c480eb510cc2dfc9365109f0a2d6c7f130b1a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "c26492ccbce780760a7ddf26595463229e745b7cba5d453d48fa71692842e909" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a76215216004e804caad4063551e07f7ccba6cf55f44d7e5f97cbc6678f34ef" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"ingress2gateway", "completion") + end + + test do + test_file = testpath/"test.yml" + test_file.write <<~YAML + apiVersion: networking.k8s.io/v1 + kind: Ingress + metadata: + name: foo + namespace: bar + annotations: + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + nginx.ingress.kubernetes.io/ssl-passthrough: "true" + cert-manager.io/cluster-issuer: "letsencrypt-prod" + labels: + name: foo + spec: + ingressClassName: nginx + rules: + - host: foo.bar + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: foo-bar + port: + number: 443 + tls: + - hosts: + - foo,bar + secretName: foo-bar-cert + YAML + + expected = <<~YAML + apiVersion: gateway.networking.k8s.io/v1 + kind: Gateway + metadata: + annotations: + gateway.networking.k8s.io/generator: ingress2gateway-#{version} + creationTimestamp: null + name: nginx + namespace: bar + spec: + gatewayClassName: nginx + listeners: + - hostname: foo.bar + name: foo-bar-http + port: 80 + protocol: HTTP + - hostname: foo.bar + name: foo-bar-https + port: 443 + protocol: HTTPS + tls: + certificateRefs: + - group: null + kind: null + name: foo-bar-cert + status: {} + --- + apiVersion: gateway.networking.k8s.io/v1 + kind: HTTPRoute + metadata: + annotations: + gateway.networking.k8s.io/generator: ingress2gateway-#{version} + creationTimestamp: null + name: foo-foo-bar + namespace: bar + spec: + hostnames: + - foo.bar + parentRefs: + - name: nginx + rules: + - backendRefs: + - name: foo-bar + port: 443 + matches: + - path: + type: PathPrefix + value: / + status: + parents: [] + YAML + + result = shell_output("#{bin}/ingress2gateway\ + print\ + --providers ingress-nginx\ + --input-file #{testpath}/test.yml\ + -A") + + assert_equal expected.chomp, result.chomp + end +end diff --git a/Formula/i/inih.rb b/Formula/i/inih.rb new file mode 100644 index 0000000000000..5e258decb8ee0 --- /dev/null +++ b/Formula/i/inih.rb @@ -0,0 +1,86 @@ +class Inih < Formula + desc "Simple .INI file parser in C" + homepage "https://github.com/benhoyt/inih" + url "https://github.com/benhoyt/inih/archive/refs/tags/r60.tar.gz" + sha256 "706aa05c888b53bd170e5d8aa8f8a9d9ccf5449dfed262d5103d1f292af26774" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d733ad23333784e6543acd42a009e285ac26022be060618ff6bd22ed79090a45" + sha256 cellar: :any, arm64_sonoma: "33fb4ad64115e9d2505de9b3a25799b36ab5fc787e7ffed3f782cd07f1823ea0" + sha256 cellar: :any, arm64_ventura: "703fa07d9b11ef46f41717d8c84830a6e23142048e3854819df6836633b483eb" + sha256 cellar: :any, sonoma: "824e3faaaabd542a7766f86bcc74c76f3c9613da1b84afca8fa6df5ce16156a2" + sha256 cellar: :any, ventura: "79702e0e934119b994574bb0c16953a8e7f77294f742a63d8ba6a6386b1f4765" + sha256 cellar: :any_skip_relocation, arm64_linux: "27fbd099baf0e6f942cff29f191f8cba0dad5a854f61f93ad9e23f88e83eafa6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "49344a3a05193407903d38f32aff19acd16390490455f544c0417901c394e186" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + def install + system "meson", "setup", "build", "-Dcpp_std=c++11", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + static int dumper(void* user, const char* section, const char* name, const char* value) { + static char prev_section[50] = ""; + if (strcmp(section, prev_section)) { + printf("%s[%s]\\n", (prev_section[0] ? "\\n" : ""), section); + strncpy(prev_section, section, sizeof(prev_section)); + prev_section[sizeof(prev_section) - 1] = '\\0'; + } + printf("%s = %s\\n", name, value); + return 1; + } + + int main(int argc, char* argv[]) { + if (argc <= 1) { + return 1; + } + + int error = ini_parse(argv[1], dumper, NULL); + if (error < 0) { + printf("Can't read '%s'!\\n", argv[1]); + return 2; + } else if (error) { + printf("Bad config file (first error on line %d)!\\n", error); + return 3; + } + return 0; + } + C + + (testpath/"test.ini").write <<~EOS + [protocol] ; Protocol configuration + version=6 ; IPv6 + + [user] + name = Bob Smith ; Spaces around '=' are stripped + email = bob@smith.com ; And comments (like this) ignored + active = true ; Test a boolean + pi = 3.14159 ; Test a floating point number + EOS + + expected = <<~EOS + [protocol] + version = 6 + + [user] + name = Bob Smith + email = bob@smith.com + active = true + pi = 3.14159 + EOS + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-linih", "-o", "test" + assert_equal expected, shell_output("./test test.ini") + end +end diff --git a/Formula/i/iniparser.rb b/Formula/i/iniparser.rb new file mode 100644 index 0000000000000..8ef67c8021a3e --- /dev/null +++ b/Formula/i/iniparser.rb @@ -0,0 +1,59 @@ +class Iniparser < Formula + desc "Library for parsing ini files" + homepage "https://gitlab.com/iniparser/iniparser" + url "https://gitlab.com/iniparser/iniparser/-/archive/v4.2.6/iniparser-v4.2.6.tar.bz2" + sha256 "30f8eaf74b8c4667f2adef4c6b5c50699d1fa6e3ad65b65b0993d414d7ee3118" + license "MIT" + head "https://gitlab.com/iniparser/iniparser.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5aab8ec466dbb3974f8dd4f365ea8d514801ee1832ef60309186b3769f0035ef" + sha256 cellar: :any, arm64_sonoma: "7fd0032d365acd032de46252eefaf99668c70c44ae9f23cfe93ffe8325b67556" + sha256 cellar: :any, arm64_ventura: "317b964fca741f0cc3a16e607c4d992ea0a4dfd60a68868a05aba5ed84bc17fe" + sha256 cellar: :any, sonoma: "754b6ca8d166e289fa6a6510a576c6dbea76f0136c3fe82a3423002892be8aa0" + sha256 cellar: :any, ventura: "220c994a2c80e0b4ad4cfb281537500c5acb6172f1ab28db090341c9a2ad3dd7" + sha256 cellar: :any_skip_relocation, arm64_linux: "89ed8749f1748dd06b6e4025b5b5c4c7b811b53e580e218d4089a61bba4d2082" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd4194648453a37551214cebaac99d63a204422271f2a298ed47f8e69a0d50a2" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + + conflicts_with "fastbit", because: "both install `include/dictionary.h`" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + test_config = testpath/"test.ini" + test_config.write <<~EOS + [section] + key = value + EOS + + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + dictionary *ini; + ini = iniparser_load("#{test_config}"); + const char *value = iniparser_getstring(ini, "section:key", NULL); + if (value == NULL || strcmp(value, "value") != 0) { + fprintf(stderr, "value not found or incorrect\\n"); + return 1; + } + printf("Parsed value: %s", value); + iniparser_freedict(ini); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-liniparser" + assert_equal "Parsed value: value", shell_output("./test") + end +end diff --git a/Formula/i/inja.rb b/Formula/i/inja.rb new file mode 100644 index 0000000000000..588196550812d --- /dev/null +++ b/Formula/i/inja.rb @@ -0,0 +1,44 @@ +class Inja < Formula + desc "Template engine for modern C++" + homepage "https://pantor.github.io/inja/" + url "https://github.com/pantor/inja/archive/refs/tags/v3.4.0.tar.gz" + sha256 "7155f944553ca6064b26e88e6cae8b71f8be764832c9c7c6d5998e0d5fd60c55" + license "MIT" + head "https://github.com/pantor/inja.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "78f7fb60abcd044a0fbd19d1723da834a8a754f4df1601de17a02b2010381666" + end + + depends_on "cmake" => :build + depends_on "nlohmann-json" + + def install + args = %w[ + -DBUILD_BENCHMARK=OFF + -DINJA_USE_EMBEDDED_JSON=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() { + nlohmann::json data; + data["name"] = "world"; + + inja::render_to(std::cout, "Hello {{ name }}!\\n", data); + } + CPP + + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", + "-I#{include}", "-I#{Formula["nlohmann-json"].opt_include}" + assert_equal "Hello world!\n", shell_output("./test") + end +end diff --git a/Formula/i/inko.rb b/Formula/i/inko.rb new file mode 100644 index 0000000000000..3c14f3f5d5b1b --- /dev/null +++ b/Formula/i/inko.rb @@ -0,0 +1,53 @@ +class Inko < Formula + desc "Safe and concurrent object-oriented programming language" + homepage "https://inko-lang.org/" + url "https://releases.inko-lang.org/0.18.1.tar.gz" + sha256 "498d7062ab2689850f56f5a85f5331115a8d1bee147e87c0fdfe97894bc94d80" + license "MPL-2.0" + head "https://github.com/inko-lang/inko.git", branch: "main" + + # The upstream website doesn't provide easily accessible version information + # or link to release tarballs, so we check the release manifest file that + # the Inko version manager (`ivm`) uses. + livecheck do + url "https://releases.inko-lang.org/manifest.txt" + regex(/^v?(\d+(?:\.\d+)+)$/im) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "ee26a0c11c1c527151fde51739a7f4fe5ac5f721805deb98e1a5f2bd3024d038" + sha256 cellar: :any, arm64_sonoma: "44fc95eba234a04e7cfe132a17874892a86fdcf0b198a07de3ca5807fdead3be" + sha256 cellar: :any, arm64_ventura: "e61d4dd6bacfdb7d01a885493de960998271cf10f6bf4931a2deecef27a59eec" + sha256 cellar: :any, sonoma: "487151f34bc632c5d5618cb65d06efd23afd8f8dac3becf13f2b2597e18aa4e5" + sha256 cellar: :any, ventura: "f4b935a853326a2422c5f2bb826c765d9cfa27dd32ebf8005e1d1f7bdbdd58f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "578ff3eacb96844be7e983fd7c8bf8c7481138ea12425cbdd9cf2c95e317060a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7af46ba20d2d34d8d5ec23574d97caa98a50278eca21fd9e1573856cf58ee24f" + end + + depends_on "rust" => :build + depends_on "llvm@17" # see https://github.com/inko-lang/inko/blob/4738b81dbec1f50dadeec3608dde855583f80dda/ci/mac.sh#L5 + + uses_from_macos "libffi", since: :catalina + + def install + # Avoid statically linking to LLVM + inreplace "compiler/Cargo.toml", 'features = ["prefer-static"]', 'features = ["force-dynamic"]' + + system "make", "build", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"hello.inko").write <<~INKO + import std.stdio (Stdout) + + class async Main { + fn async main { + Stdout.new.print('Hello, world!') + } + } + INKO + assert_equal "Hello, world!\n", shell_output("#{bin}/inko run hello.inko") + end +end diff --git a/Formula/i/inlyne.rb b/Formula/i/inlyne.rb new file mode 100644 index 0000000000000..f44b81e21e902 --- /dev/null +++ b/Formula/i/inlyne.rb @@ -0,0 +1,63 @@ +class Inlyne < Formula + desc "GPU powered yet browserless tool to help you quickly view markdown files" + homepage "https://github.com/Inlyne-Project/inlyne" + url "https://github.com/Inlyne-Project/inlyne/archive/refs/tags/v0.5.0.tar.gz" + sha256 "0473d154469c4f078029c2fdb58dca19b8d415633934773c41930536b54e71e0" + license "MIT" + head "https://github.com/Inlyne-Project/inlyne.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "08618c2b26c159f199bb3b0ec92f989d0cc101f615288f1eec2a587f60fb0622" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "93ba8afea50e4112475f7d41b4a4a952b242f48e6791550dcf4459430b0c6d70" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ce4fafe2f79643c467a358a1ad72309be4f791eade01de70dfb7e91d4ef41298" + sha256 cellar: :any_skip_relocation, sonoma: "420ff2e57ec6742be5eb6074b489dd8a04a5811a471ba3448ddfedf821447de8" + sha256 cellar: :any_skip_relocation, ventura: "34aee2a7ddd8c4b85a2f4187a0d380f69a9830ef00e2c57d3165f7e55319056c" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2a1671d0354386d01527ce7fceb5d00eebbe9ed629760c8a4aff044b38be002" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c1df3c19155248403249b2d8f39a1633c058142eaa20c9023925a21d18d5c48" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "expect" => :test + + on_linux do + depends_on "libxkbcommon" + depends_on "wayland" + end + + def install + system "cargo", "install", *std_cargo_args + + bash_completion.install "completions/inlyne.bash" => "inlyne" + fish_completion.install "completions/inlyne.fish" + zsh_completion.install "completions/_inlyne" + end + + test do + assert_match version.to_s, shell_output("#{bin}/inlyne --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"] + + test_markdown = testpath/"test.md" + test_markdown.write <<~EOS + _lorem_ **ipsum** dolor **sit** _amet_ + EOS + + script = (testpath/"test.exp") + script.write <<~EOS + #!/usr/bin/env expect -f + set timeout 2 + + spawn #{bin}/inlyne #{test_markdown} + + send -- "q\r" + + expect eof + EOS + + system "expect", "-f", "test.exp" + end +end diff --git a/Formula/i/innoextract.rb b/Formula/i/innoextract.rb new file mode 100644 index 0000000000000..f4c2b5802ed31 --- /dev/null +++ b/Formula/i/innoextract.rb @@ -0,0 +1,54 @@ +class Innoextract < Formula + desc "Tool to unpack installers created by Inno Setup" + homepage "https://constexpr.org/innoextract/" + license "Zlib" + revision 11 + head "https://github.com/dscharrer/innoextract.git", branch: "master" + + stable do + url "https://constexpr.org/innoextract/files/innoextract-1.9.tar.gz" + sha256 "6344a69fc1ed847d4ed3e272e0da5998948c6b828cb7af39c6321aba6cf88126" + + # Backport commit to fix build with CMake 4 + patch do + url "https://github.com/dscharrer/innoextract/commit/83d0bf4365b09ddd17dddb400ba5d262ddf16fb8.patch?full_index=1" + sha256 "fe5299d1fdea5c66287aef2f70fee41d86aedc460c5b165da621d699353db07d" + end + end + + livecheck do + url :homepage + regex(/href=.*?innoextract[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "a6ecba6f9571ac08021cee5007d4ce46bc1c8af96f996dd58397fe2f2466d9c7" + sha256 cellar: :any, arm64_sonoma: "8bcb1acc92f2b71ba74dbd9989858cb4c97c673ea4165d9a917005e3ae20ee0d" + sha256 cellar: :any, arm64_ventura: "078863c79c61eaa1bf3b34960334582c52c8cf6932d279f460fce2718a6ee852" + sha256 cellar: :any, sonoma: "13374c0149963a68d215be71fee1e3be6ad3bc94793b582ec0545fc850a6186b" + sha256 cellar: :any, ventura: "2d06f2828524c9790714130e550fe7aad4b157005b39652633500dbe35aaacb8" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a14135ee0ef9142fd550768cf198305ba67081514b03fe6ff1c36c3b0e1247b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f307fcdedb067bd399862b2640f25a92c31cd1ce5ab6d00ab113bfcb6a88f62d" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "xz" + + # Fix build with `boost` 1.85.0 using open PR + # PR ref: https://github.com/dscharrer/innoextract/pull/169 + patch do + url "https://github.com/dscharrer/innoextract/commit/264c2fe6b84f90f6290c670e5f676660ec7b2387.patch?full_index=1" + sha256 "f968a9c0521083dd4076ce5eed56127099a9c9888113fc50f476b914396045cc" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"innoextract", "--version" + end +end diff --git a/Formula/i/innotop.rb b/Formula/i/innotop.rb new file mode 100644 index 0000000000000..287cafa2fca74 --- /dev/null +++ b/Formula/i/innotop.rb @@ -0,0 +1,51 @@ +class Innotop < Formula + desc "Top clone for MySQL" + homepage "https://github.com/innotop/innotop/" + url "https://github.com/innotop/innotop/archive/refs/tags/v1.15.2.tar.gz" + sha256 "cfedf31ba5617a5d53ff0fedc86a8578f805093705a5e96a5571d86f2d8457c0" + license any_of: ["GPL-2.0-only", "Artistic-1.0-Perl"] + head "https://github.com/innotop/innotop.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "954079748cf6e9ff2ed6cf2f1c32596c923dcc1b91e5731eda1b99c58644d239" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "954079748cf6e9ff2ed6cf2f1c32596c923dcc1b91e5731eda1b99c58644d239" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d857ac77497c1ee6be53254808fb73c50f6906270d7c9d0480a69181375233f" + sha256 cellar: :any_skip_relocation, sonoma: "954079748cf6e9ff2ed6cf2f1c32596c923dcc1b91e5731eda1b99c58644d239" + sha256 cellar: :any_skip_relocation, ventura: "1d857ac77497c1ee6be53254808fb73c50f6906270d7c9d0480a69181375233f" + sha256 cellar: :any_skip_relocation, arm64_linux: "87b81323270bd39ae2d5b41b93f84b766d47afc5145416f97e7247460b26dab4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "55b9d968176edd6d7ef594c1e0b8ba4cd349999aa9b7e4c6161f30f8d0ce8157" + end + + depends_on "perl-dbd-mysql" + + uses_from_macos "perl" + + resource "Term::ReadKey" do + on_linux do + url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.38.tar.gz" + sha256 "5a645878dc570ac33661581fbb090ff24ebce17d43ea53fd22e105a856a47290" + 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" + 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 + # Calling commands throws up interactive GUI, which is a pain. + assert_match version.to_s, shell_output("#{bin}/innotop --version") + end +end diff --git a/Formula/i/inotify-tools.rb b/Formula/i/inotify-tools.rb new file mode 100644 index 0000000000000..9040c88af2024 --- /dev/null +++ b/Formula/i/inotify-tools.rb @@ -0,0 +1,35 @@ +class InotifyTools < Formula + desc "C library and command-line programs providing a simple interface to inotify" + homepage "https://github.com/inotify-tools/inotify-tools" + url "https://github.com/inotify-tools/inotify-tools/archive/refs/tags/4.23.9.0.tar.gz" + sha256 "1dfa33f80b6797ce2f6c01f454fd486d30be4dca1b0c5c2ea9ba3c30a5c39855" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "801e47d3b577a62bc15e16656cb20cfd09be683592513df4446b01ea875b82b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9a50d94145be77d8493bb7e2a8ee259784c209113e84b9ce5b1df586868f052" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on :linux + + def install + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}", + "--mandir=#{man}", + "--disable-dependency-tracking" + system "make", "install" + end + + test do + touch "test.txt" + stdin, stdout, stderr, = Open3.popen3("#{bin}/inotifywatch test.txt --timeout 2") + stdin.close + assert_match "Establishing watches", stderr.read + stdout.close + stderr.close + end +end diff --git a/Formula/i/insect.rb b/Formula/i/insect.rb new file mode 100644 index 0000000000000..99bbf6a95249c --- /dev/null +++ b/Formula/i/insect.rb @@ -0,0 +1,49 @@ +class Insect < Formula + desc "High precision scientific calculator with support for physical units" + homepage "https://github.com/sharkdp/insect" + url "https://registry.npmjs.org/insect/-/insect-5.9.0.tgz" + sha256 "dcb8d696e9209157f596c7c102cdc436d520629d2aed71585767af77bde2cb70" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "29f76c8e217cd55d3cda29df44ef5a8d18b795c72ffb408d2d81385ed7455bb7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a246e04de19ce3736e0c839afc375de68b0358dd475676268b30f369caf4c85f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a246e04de19ce3736e0c839afc375de68b0358dd475676268b30f369caf4c85f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a246e04de19ce3736e0c839afc375de68b0358dd475676268b30f369caf4c85f" + sha256 cellar: :any_skip_relocation, sonoma: "8077869bde22d8f4f44fb25ba149c47c7b39d80b1f5b0ad0e364a477be7c829b" + sha256 cellar: :any_skip_relocation, ventura: "8077869bde22d8f4f44fb25ba149c47c7b39d80b1f5b0ad0e364a477be7c829b" + sha256 cellar: :any_skip_relocation, monterey: "8077869bde22d8f4f44fb25ba149c47c7b39d80b1f5b0ad0e364a477be7c829b" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb8ac696b796232cb024ce2bd9186fcafe1e2acf4b46b9c4df803e5a40cd7a1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8988d5e206cae71f827f36d7085acc298f39c3d30c92abda00610f3e01151dac" + end + + # deprecated in favor of `numbat` formula, https://github.com/sharkdp/insect/commit/6c7dea10a491b55250acede0bd740e72177d8945 + # see https://github.com/sharkdp/numbat/blob/master/assets/reasons-for-rewriting-in-rust.md + deprecate! date: "2024-12-28", because: :unmaintained, replacement_formula: "numbat" + + depends_on "node" + + on_linux do + depends_on "xsel" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("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_equal "120000 ms", shell_output("#{bin}/insect '1 min + 60 s -> ms'").chomp + assert_equal "299792458 m/s", shell_output("#{bin}/insect speedOfLight").chomp + end +end diff --git a/Formula/i/inspectrum.rb b/Formula/i/inspectrum.rb new file mode 100644 index 0000000000000..c8f7cbf6ff4dd --- /dev/null +++ b/Formula/i/inspectrum.rb @@ -0,0 +1,39 @@ +class Inspectrum < Formula + desc "Offline radio signal analyser" + homepage "https://github.com/miek/inspectrum" + url "https://github.com/miek/inspectrum/archive/refs/tags/v0.3.1.tar.gz" + sha256 "94e42333aceb06c15fb6fc10d186d61112975fdcf9539357a279e886e9edf35e" + license "GPL-3.0-or-later" + head "https://github.com/miek/inspectrum.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7060c870cf3c1fb749f7fbca5fa9479ff9f3794f932804f211728c6238355025" + sha256 cellar: :any, arm64_sonoma: "b8fed8bc9e251d6f90e191b260fba14a907183b966ce9058eca5e45832fd096b" + sha256 cellar: :any, arm64_ventura: "85676ab09338e0dc82b50ef359f7ac49e8f1ae09eaa673ad23da5edb55dcbe07" + sha256 cellar: :any, arm64_monterey: "a4a8b084973fc6d26f895e56e82e3bb5b6f10ef5f803a2ae41b85ecd7e84d06f" + sha256 cellar: :any, sonoma: "d362f00903bb5068748061931788f911ecc8f219453822eb5e2dbfbefbe77e7d" + sha256 cellar: :any, ventura: "4698d8a738a586230abc96eafdf2b8e5ddc404eed157a9793232742c60689f0d" + sha256 cellar: :any, monterey: "dd6e9a06f5bb1a627906d9b87b5f2a54c0589f9663335224092eed9d4ec8e038" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ebd0cb2283b88fad36bb8c481cab44ee8fa12be897a798697d3643646772cf4c" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "fftw" + depends_on "liquid-dsp" + depends_on "qt@5" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + # inspectrum is a GUI application + assert_match "-r, --rate Set sample rate.", shell_output("#{bin}/inspectrum -h").strip + end +end diff --git a/Formula/i/inspircd.rb b/Formula/i/inspircd.rb new file mode 100644 index 0000000000000..2bbda73ee1828 --- /dev/null +++ b/Formula/i/inspircd.rb @@ -0,0 +1,47 @@ +class Inspircd < Formula + desc "Modular C++ Internet Relay Chat daemon" + homepage "https://www.inspircd.org/" + url "https://github.com/inspircd/inspircd/archive/refs/tags/v4.7.0.tar.gz" + sha256 "fcad041a46f1d7c635ba2ed41d7bcef1cfa2510a5692ac98b34f90420187c97b" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "25726c3cd16e4152b60e5954728b860301ef05097c030994075c26f1e87bba5c" + sha256 arm64_sonoma: "736a32bb3d0a02e08aeed2354a2f124ac9f9ad501d6c0b17a98f876e5ada3103" + sha256 arm64_ventura: "0c20a2bbf5b9267494511cf817f9df92018f81b1dd31bada11cc62da1d854963" + sha256 sonoma: "acaac9dcbb9b05fb6b5634a3e00a0135d161c3277761377df0b8c6eaedb4d5b9" + sha256 ventura: "5cb7ec5be5faac2a8cbce377e82c4080a0b5dd73b60cb454ed4798994640286c" + sha256 arm64_linux: "38b1ffba9b147bb7cc7825460cf6c6ca2105c543471288637d9047598917f5ba" + sha256 x86_64_linux: "1b6aa72c698ca20cc3d757e0760a4e44b0bbdb113790e0ced655c646204542cc" + end + + depends_on "pkgconf" => :build + depends_on "argon2" + depends_on "gnutls" + depends_on "libpq" + depends_on "mariadb-connector-c" + + uses_from_macos "openldap" + + skip_clean "data" + skip_clean "logs" + + def install + ENV.cxx11 + system "./configure", "--enable-extras", + "argon2 ldap mysql pgsql regex_posix ssl_gnutls sslrehashsignal" + system "./configure", "--disable-auto-extras", + "--distribution-label", "homebrew-#{revision}", + "--prefix", prefix + system "make", "install" + end + + test do + assert_match("ERROR: Cannot open config file", shell_output(bin/"inspircd", 1)) + end +end diff --git a/Formula/i/install-peerdeps.rb b/Formula/i/install-peerdeps.rb new file mode 100644 index 0000000000000..33ddd2b89ca04 --- /dev/null +++ b/Formula/i/install-peerdeps.rb @@ -0,0 +1,23 @@ +class InstallPeerdeps < Formula + desc "CLI to automatically install peerDeps" + homepage "https://github.com/nathanhleung/install-peerdeps" + url "https://registry.npmjs.org/install-peerdeps/-/install-peerdeps-3.0.7.tgz" + sha256 "b161e9e3e497cd492e571393784232a9ac9e4518044cda909f7e1d09c4fb5ea7" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "eec2d65cc63dd3b8af5a9fd355eded183615f9f987cc708d1ac2a22fe16a4b2d" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + system bin/"install-peerdeps", "eslint-config-airbnb@19.0.4" + assert_path_exists testpath/"node_modules"/"eslint" # eslint is a peerdep + end +end diff --git a/Formula/i/instaloader.rb b/Formula/i/instaloader.rb new file mode 100644 index 0000000000000..121540b2ff6f5 --- /dev/null +++ b/Formula/i/instaloader.rb @@ -0,0 +1,47 @@ +class Instaloader < Formula + include Language::Python::Virtualenv + + desc "Download media from Instagram" + homepage "https://instaloader.github.io/" + url "https://files.pythonhosted.org/packages/d8/67/2adb34f2fc306d5fe8610c946f4b1fc4fb517b10034ef60f61d7674556b1/instaloader-4.14.1.tar.gz" + sha256 "a41a7372a18fb096b3ed545469479884de9cf768e12020c0e0e67c488d9d599c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1258d3d6db08915ae0cc8096da6642c35e02c4be75258ec0e08372a2e18292e2" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/instaloader --login foo --password bar 2>&1", 3) + assert_match "Login error", output + + assert_match version.to_s, shell_output("#{bin}/instaloader --version") + end +end diff --git a/Formula/i/instalooter.rb b/Formula/i/instalooter.rb new file mode 100644 index 0000000000000..143332462cf0e --- /dev/null +++ b/Formula/i/instalooter.rb @@ -0,0 +1,107 @@ +class Instalooter < Formula + include Language::Python::Virtualenv + + desc "Download any picture or video associated from an Instagram profile" + homepage "https://github.com/althonos/instalooter" + url "https://files.pythonhosted.org/packages/30/13/907e6aaba6280e1001080ab47e750068ffc5fb7174203985b3c9d678e3f2/instalooter-2.4.4.tar.gz" + sha256 "fb9b4a948702361a161cc42e58857e3a6c9dafd9e22568b07bc0d0b09c3c34a9" + license "GPL-3.0-or-later" + revision 10 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f8640398cc08d94ac041b9dc19b31dc5fb20130e8babe71398804d7a389ac298" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f8640398cc08d94ac041b9dc19b31dc5fb20130e8babe71398804d7a389ac298" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f8640398cc08d94ac041b9dc19b31dc5fb20130e8babe71398804d7a389ac298" + sha256 cellar: :any_skip_relocation, sonoma: "9b3fed127005dd557fff1cb3e124c0cd297dcae0b48cdad41688562bcf32d09e" + sha256 cellar: :any_skip_relocation, ventura: "9b3fed127005dd557fff1cb3e124c0cd297dcae0b48cdad41688562bcf32d09e" + sha256 cellar: :any_skip_relocation, arm64_linux: "358b6c0c0b86ac7af5091ad66cbd6f7e175255540f8d17bf0a4f0d0d8f116b3f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "669e99fd34fb0b33c74e2558dd977406d62c9acd3c7254b63e7c853a3e2faafd" + end + + depends_on "certifi" + depends_on "python@3.13" + + 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/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "coloredlogs" do + url "https://files.pythonhosted.org/packages/5a/6d/1796dc260bfd8be7c9ecd9c17e02b5b2ad9ba310983cc4ceabc1ea4dbb42/coloredlogs-14.3.tar.gz" + sha256 "7ef1a7219870c7f02c218a2f2877ce68f2f8e087bb3a55bd6fbaa2a4362b4d52" + end + + resource "docopt" do + url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" + sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" + end + + resource "fs" do + url "https://files.pythonhosted.org/packages/5d/a9/af5bfd5a92592c16cdae5c04f68187a309be8a146b528eac3c6e30edbad2/fs-2.4.16.tar.gz" + sha256 "ae97c7d51213f4b70b6a958292530289090de3a7e15841e108fbe144f069d313" + 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 "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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "tenacity" do + url "https://files.pythonhosted.org/packages/70/0c/47136795c8be87c7c30f28c9a56b59deb9550b2a1f5f3abb177daf5da1a3/tenacity-6.3.1.tar.gz" + sha256 "e14d191fb0a309b563904bbc336582efe2037de437e543b38da749769b544d7f" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/58/83/6ba9844a41128c62e810fddddd72473201f3eacde02046066142a2d96cc5/tqdm-4.66.5.tar.gz" + sha256 "e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "verboselogs" do + url "https://files.pythonhosted.org/packages/29/15/90ffe9bdfdd1e102bc6c21b1eea755d34e69772074b6e706cab741b9b698/verboselogs-1.7.tar.gz" + sha256 "e33ddedcdfdafcb3a174701150430b11b46ceb64c2a9a26198c76a156568e427" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"instalooter", "logout" + end +end diff --git a/Formula/i/instead.rb b/Formula/i/instead.rb new file mode 100644 index 0000000000000..db88f194d5afa --- /dev/null +++ b/Formula/i/instead.rb @@ -0,0 +1,54 @@ +class Instead < Formula + desc "Interpreter of simple text adventures" + homepage "https://instead.hugeping.ru/" + url "https://github.com/instead-hub/instead/archive/refs/tags/3.5.2.tar.gz" + sha256 "589f80cbac9edf51b29d86e1528b9e72c576129fa5c95f1bac3e5bb25c210cf3" + license "MIT" + + bottle do + sha256 arm64_sequoia: "b27debf30bd17c51b94f24b9aed4d2a5be840d0af7a177bf32b6ad9e65221f6c" + sha256 arm64_sonoma: "1387c5811cd5a12673f7c9ad9e0e53f1805cd4510112b4a348912d711f07d745" + sha256 arm64_ventura: "a787fd3c5152c2c083ac5a5ecf474649d6e84ed5b49f8b4ea02681161ad57676" + sha256 arm64_monterey: "66f51dc5e4e785ea0c15e11a7ff63a0bd42bd9fbde2113cb8eb31100147b86e9" + sha256 sonoma: "b923b24f39f86b55e4ea5e85570c83927dbc0fa96fa0edab5a2fcf0ca77c3c9a" + sha256 ventura: "33d4f677954750c9bb4f4bf48cd36720bc80ae91e9a1be16c766cc1d9629f3b6" + sha256 monterey: "b3bd5654c3d4e24858569437b6aad9dea3c568bf014abb94202e2f4e73f0d9dd" + sha256 arm64_linux: "88fcd069cad40be6a02b4b34c859f9132bc5961fcbf22e522aeac5017b412cf6" + sha256 x86_64_linux: "06bea67b1d7d82de33cf429134b9f001bfd1a788ad10bbf61d666f10a1a18e1f" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "luajit" + depends_on "sdl2" + depends_on "sdl2_image" + depends_on "sdl2_mixer" + depends_on "sdl2_ttf" + + uses_from_macos "zlib" + + on_macos do + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "gettext" + depends_on "harfbuzz" + depends_on "pango" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DWITH_GTK2=OFF", + "-DWITH_LUAJIT=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "INSTEAD #{version} ", shell_output("#{bin}/instead -h 2>&1") + end +end diff --git a/Formula/i/intercal.rb b/Formula/i/intercal.rb new file mode 100644 index 0000000000000..9c0a5eeda0d35 --- /dev/null +++ b/Formula/i/intercal.rb @@ -0,0 +1,78 @@ +class Intercal < Formula + desc "Esoteric, parody programming language" + homepage "http://catb.org/~esr/intercal/" + license "GPL-2.0-or-later" + + stable do + url "http://catb.org/~esr/intercal/intercal-0.31.tar.gz" + sha256 "93d842b81ecdc82b352beb463fbf688749b0c04445388a999667e1958bba4ffc" + + # Backport fix for GCC 10 and newer + patch do + url "https://gitlab.com/esr/intercal/-/commit/f33a8f3a96e955a6eb3e8db850d0edac44c22176.diff" + sha256 "2cd1be13f779a0fd93aa3c50e1dbf62596b81727c539674d872b4e912ad62a55" + end + end + + # The latest version tags in the Git repository are `0.31` (2019-06-12) and + # `0.30` (2015-04-02) but there are older versions like `1.27` (2010-08-25) + # and `1.26` (2010-08-25). These two older 1.x releases are wrongly treated + # as newer but the GitLab project doesn't do releases, so we can only + # reference the tags. We work around this by restricting matching to 0.x + # releases for now. If the major version reaches 1.x in the future, this + # check will also need to be updated. + livecheck do + url :head + regex(/^v?(0(?:\.\d+)+)$/i) + end + + bottle do + sha256 sonoma: "bdbcb6b6741a84e30ab923c62dc0dbced0348ba9c35b95f9441bdc4bb821130a" + sha256 ventura: "996598c6c8145f0a45dac7109aa3cb39b5854396b58c3b7ab75c784844160877" + sha256 monterey: "a691470666ee0f15af22265be65eda2757fabd8f6fbc5fa8341f8c3059749d34" + sha256 big_sur: "487fc70071a54c09cccdbba0284db23c156983b76416a4b4c03f44130531213c" + sha256 catalina: "a2c1673fbed3d331e725694196acf9ea4cd6bc6df3b86568af3e67ee90d70b30" + sha256 mojave: "d048d5c58fd1fc3b17c44103b3bbddd445a657415c215916587d9eb8e7f9c2da" + sha256 high_sierra: "c0569e08915adc912bdc3fb149d0d3c50e7a2d941fff8b2d951b22fcfaf4539f" + sha256 sierra: "b00c959878aaead39f9106ef199d7082b4e1a62ef6957f11796a99650678c9b2" + sha256 arm64_linux: "dcf9671a1cd68f29ad22ed2ea028a790f03cd0b794a4156d3e958794dec68052" + sha256 x86_64_linux: "31105eaa4a4800c562060caa8fa7c241b946c8dca2e92f0b2e101c34830787e8" + end + + head do + url "https://gitlab.com/esr/intercal.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + on_macos do + depends_on arch: :x86_64 # test fails on arm64 + end + + def install + if build.head? + cd "buildaux" do + system "./regenerate-build-system.sh" + end + end + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + (etc/"intercal").install Dir["etc/*"] + pkgshare.install "pit" + end + + test do + (testpath/"lib").mkpath + (testpath/"test").mkpath + cp pkgshare/"pit/beer.i", "test" + cd "test" do + system bin/"ick", "beer.i" + system "./beer" + end + end +end diff --git a/Formula/i/intercept.rb b/Formula/i/intercept.rb new file mode 100644 index 0000000000000..9e32c558aab6c --- /dev/null +++ b/Formula/i/intercept.rb @@ -0,0 +1,45 @@ +class Intercept < Formula + desc "Static Application Security Testing (SAST) tool" + homepage "https://intercept.cc/" + url "https://github.com/xfhg/intercept/archive/refs/tags/v1.0.12.tar.gz" + sha256 "2732a3e895a9685ba6f112e7e372627aebfa340a94bf4716462b382075593308" + license "EUPL-1.2" + version_scheme 1 + head "https://github.com/xfhg/intercept.git", branch: "master" + + # Upstream 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_skip_relocation, arm64_sequoia: "7b2ca377ce1685e85a012867dbddc3a499ff32c063c29b361f653a7a4f073aa4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b2ca377ce1685e85a012867dbddc3a499ff32c063c29b361f653a7a4f073aa4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b2ca377ce1685e85a012867dbddc3a499ff32c063c29b361f653a7a4f073aa4" + sha256 cellar: :any_skip_relocation, sonoma: "4e28e659023400422b0e0b74efe5bfc8c1e6ba00f7a22882bc38b708997bc8a8" + sha256 cellar: :any_skip_relocation, ventura: "4e28e659023400422b0e0b74efe5bfc8c1e6ba00f7a22882bc38b708997bc8a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38d2e66df02d2438485a11a941f5c53287609a58a39aae3570e10294332688e4" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"intercept", "completion") + + pkgshare.install "playground" + end + + test do + cp_r "#{pkgshare}/playground", testpath + cd "playground" do + output = shell_output("#{bin}/intercept audit --policy policies/test_scan.yaml " \ + "--target targets -vvv audit 2>&1") + assert_match "Total Policies: 2", output + end + end +end diff --git a/Formula/i/interface99.rb b/Formula/i/interface99.rb new file mode 100644 index 0000000000000..4c15d63760450 --- /dev/null +++ b/Formula/i/interface99.rb @@ -0,0 +1,65 @@ +class Interface99 < Formula + desc "Full-featured interfaces for C99" + homepage "https://github.com/Hirrolot/interface99" + url "https://github.com/Hirrolot/interface99/archive/refs/tags/v1.0.2.tar.gz" + sha256 "8bd007c48cf05436ced60884e8e3a05ede46105f3efae9bf29e0f4d30f938f9e" + license "MIT" + head "https://github.com/Hirrolot/interface99.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "cdcd1817a2f31b433c04ed591b2f5de07141a3e783de280b0c7431b68dec2556" + end + + depends_on "metalang99" + + def install + include.install "interface99.h" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + #define Shape_IFACE vfunc( int, perim, const VSelf) vfunc(void, scale, VSelf, int factor) + + typedef struct { int a, b; } Rectangle; + typedef struct { int a, b, c; } Triangle; + + int Rectangle_perim(const VSelf) { + VSELF(const Rectangle); + return (self->a + self->b) * 2; + } + + void Rectangle_scale(VSelf, int factor) { + VSELF(Rectangle); + self->a *= factor; self->b *= factor; + } + + int Triangle_perim(const VSelf) { + VSELF(const Triangle); + return self->a + self->b + self->c; + } + + void Triangle_scale(VSelf, int factor) { + VSELF(Triangle); + self->a *= factor; self->b *= factor; self->c *= factor; + } + + interface(Shape); + impl(Shape, Rectangle); + impl(Shape, Triangle); + + int main() { + Shape r = DYN_LIT(Rectangle, Shape, {5, 7}); + Shape t = DYN_LIT(Triangle, Shape, {10, 20, 30}); + printf("%d %d ", VCALL(r, perim), VCALL(t, perim)); + VCALL(r, scale, 5); + VCALL(t, scale, 5); + printf("%d %d", VCALL(r, perim), VCALL(t, perim)); + } + C + system ENV.cc, "test.c", "-I#{include}", "-I#{Formula["metalang99"].opt_include}", "-o", "test" + assert_equal "24 60 120 300", shell_output("./test") + end +end diff --git a/Formula/i/intermodal.rb b/Formula/i/intermodal.rb new file mode 100644 index 0000000000000..aca2800cbd781 --- /dev/null +++ b/Formula/i/intermodal.rb @@ -0,0 +1,38 @@ +class Intermodal < Formula + desc "Command-line utility for BitTorrent torrent file creation, verification, etc." + homepage "https://imdl.io/" + url "https://github.com/casey/intermodal/archive/refs/tags/v0.1.14.tar.gz" + sha256 "4b42fc39246a637e8011a520639019d33beffb337ed4e45110260eb67ecec9cb" + license "CC0-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "852b6c8f3270eac4536874bcd3569c7b356f196095395587b827c19694bc8850" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e8a4fd8dbae699ee5489ee270a44217875c278e8dafd4b0d2ab59c0a53c233d7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f97365296218ba43ceae80cc225a3ede3974b0060dc6e22b0e9c7bb10fc10ce5" + sha256 cellar: :any_skip_relocation, sonoma: "d67ee890e7374157bff784bc6a756b0a38156c90bf45dfbeed40860a060b82bf" + sha256 cellar: :any_skip_relocation, ventura: "729f1a952834a171ae49923079e207ff23dca4df44975f22057cb3c7df555c7c" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ebd7eddf899a9fd8880bda08f54e4b46da5fcddbc60677a07fe43bd9a407bf6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "302d5f8fcf0869b8dd99ad396a04ca70d4f4a07cdc500de72cd01dec07fccba1" + end + + depends_on "help2man" => :build + depends_on "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + depends_on "openssl@3" + end + + def install + system "cargo", "install", *std_cargo_args + system "cargo", "run", "--package", "gen", "--", "--bin", bin/"imdl", "man" + generate_completions_from_executable(bin/"imdl", "completions", shells: [:fish, :zsh, :bash]) + + man1.install Dir["target/gen/man/*.1"] + end + + test do + system bin/"imdl", "torrent", "create", "--input", test_fixtures("test.flac"), "--output", "test.torrent" + system bin/"imdl", "torrent", "verify", "--content", test_fixtures("test.flac"), "--input", "test.torrent" + end +end diff --git a/Formula/i/internetarchive.rb b/Formula/i/internetarchive.rb new file mode 100644 index 0000000000000..d322efe167486 --- /dev/null +++ b/Formula/i/internetarchive.rb @@ -0,0 +1,61 @@ +class Internetarchive < Formula + include Language::Python::Virtualenv + + desc "Python wrapper for the various Internet Archive APIs" + homepage "https://github.com/jjjake/internetarchive" + url "https://files.pythonhosted.org/packages/e9/69/b7e8aebae4be5f633491b90e620af92335723070313ea12ceaedfc0c3759/internetarchive-5.4.0.tar.gz" + sha256 "869d6606210d333c7faca709196fad9bdcb925b614c134920ce8eb24b82ecffd" + license "AGPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a7feafb9d101db4510db863e10a3ddd4df58ab290b18555d46e9541ab6747a98" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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 "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + def install + ENV["PIP_USE_PEP517"] = "1" + virtualenv_install_with_resources + end + + test do + metadata = JSON.parse shell_output("#{bin}/ia metadata tigerbrew") + assert_equal metadata["metadata"]["uploader"], "mistydemeo@gmail.com" + end +end diff --git a/Formula/i/intltool.rb b/Formula/i/intltool.rb new file mode 100644 index 0000000000000..bf5c830c949fb --- /dev/null +++ b/Formula/i/intltool.rb @@ -0,0 +1,37 @@ +class Intltool < Formula + desc "String tool" + homepage "https://wiki.freedesktop.org/www/Software/intltool" + url "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz" + sha256 "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd" + license "GPL-2.0-or-later" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7ebd88e28e9fdc4af031759fae5cfc6b4f93489e2aff78924d0a0b41ab4d9ea2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b725467f89444f309fe6ac39a1e8c93dfde4d58ce9ab1bc8f92a49beb899e1de" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b725467f89444f309fe6ac39a1e8c93dfde4d58ce9ab1bc8f92a49beb899e1de" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b725467f89444f309fe6ac39a1e8c93dfde4d58ce9ab1bc8f92a49beb899e1de" + sha256 cellar: :any_skip_relocation, sonoma: "a15ddf828a10f73b8ecbc8126bc6a5b9c659c94dcc9f8c3f761cda1a40e725cb" + sha256 cellar: :any_skip_relocation, ventura: "a15ddf828a10f73b8ecbc8126bc6a5b9c659c94dcc9f8c3f761cda1a40e725cb" + sha256 cellar: :any_skip_relocation, monterey: "a15ddf828a10f73b8ecbc8126bc6a5b9c659c94dcc9f8c3f761cda1a40e725cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "dfd00166b42210512d2499bf7d45eb3bd86bc4b64f0c40f9da0f57b15710ba22" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3760928e8e228b469f78ad5ebf3468a745b6dedbbeb7b7968b4f4ac7ae40bd5" + end + + uses_from_macos "perl" + + on_linux do + depends_on "expat" + depends_on "perl-xml-parser" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"intltool-extract", "--help" + end +end diff --git a/Formula/i/invoice.rb b/Formula/i/invoice.rb new file mode 100644 index 0000000000000..21be042918afa --- /dev/null +++ b/Formula/i/invoice.rb @@ -0,0 +1,34 @@ +class Invoice < Formula + desc "Command-line invoice generator" + homepage "https://github.com/maaslalani/invoice" + url "https://github.com/maaslalani/invoice/archive/refs/tags/v0.1.0.tar.gz" + sha256 "f34f20f6491f42c0e94dbde433a578f0dba98938f2e3186018d3e16d050abdaf" + license "MIT" + head "https://github.com/maaslalani/invoice.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "57ae38669eb66909d476bf260857c15657b1a9934645adb5ec339fb6d56eb07f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bfd3dde3902f66423f1a09b951ad977729e31b6e7b81e5e6f4f61de4765e438a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f60846fa811e66cbd42acd1d900081f5029a492c8b5959983faa333409a3207" + sha256 cellar: :any_skip_relocation, arm64_monterey: "56261fe54c7a9268a1405a62d6b61f7a7ad1249ee4630d0c61ee3043db1db457" + sha256 cellar: :any_skip_relocation, sonoma: "9998524c8a3e9e2eb17ddf71de7290230b3f1caa7f37ef1398beaed2908da774" + sha256 cellar: :any_skip_relocation, ventura: "f4f343dc13b544093113964003344450c555714b286bb4be8049bf7dacd747f7" + sha256 cellar: :any_skip_relocation, monterey: "8c2382bc80db909ed4d6e4ad929f31b8a042545fe0c822b0247197d6c7afa756" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc46d1f1aba2274b4f41c09a95b9beed529e456ecb3c0d8fe8f0f7f0246bc616" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args + end + + test do + cmd = "#{bin}/invoice generate --from \"Dream, Inc.\" --to \"Imagine, Inc.\" " \ + "--item \"Rubber Duck\" --quantity 2 --rate 25 " \ + "--tax 0.13 --discount 0.15 " \ + "--note \"For debugging purposes.\"" + assert_equal "Generated invoice.pdf", shell_output(cmd).chomp + assert_path_exists testpath/"invoice.pdf" + end +end diff --git a/Formula/i/inxi.rb b/Formula/i/inxi.rb new file mode 100644 index 0000000000000..22ba91f83ee1f --- /dev/null +++ b/Formula/i/inxi.rb @@ -0,0 +1,35 @@ +class Inxi < Formula + desc "Full featured CLI system information tool" + homepage "https://smxi.org/docs/inxi.htm" + url "https://codeberg.org/smxi/inxi/archive/3.3.38-1.tar.gz" + sha256 "9601b5d6287a2508a2e3c2652ce44190636dfe48371dc658e48ffc74af500b1b" + license "GPL-3.0-or-later" + head "https://codeberg.org/smxi/inxi.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d4dda15963a7681aa6aa80c0296a464247a6a479557471c14bf255b913673b77" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d4dda15963a7681aa6aa80c0296a464247a6a479557471c14bf255b913673b77" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d4dda15963a7681aa6aa80c0296a464247a6a479557471c14bf255b913673b77" + sha256 cellar: :any_skip_relocation, sonoma: "bb38cef399b732313bc2aba24bf42528a24d634c21571c783fecd33cc9ba30b3" + sha256 cellar: :any_skip_relocation, ventura: "bb38cef399b732313bc2aba24bf42528a24d634c21571c783fecd33cc9ba30b3" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4dda15963a7681aa6aa80c0296a464247a6a479557471c14bf255b913673b77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4dda15963a7681aa6aa80c0296a464247a6a479557471c14bf255b913673b77" + end + + uses_from_macos "perl" + + def install + bin.install "inxi" + man1.install "inxi.1" + + ["LICENSE.txt", "README.txt", "inxi.changelog"].each do |file| + prefix.install file + end + end + + test do + inxi_output = shell_output(bin/"inxi") + uname_r = shell_output("uname -r").strip + assert_match uname_r.to_str, inxi_output.to_s + end +end diff --git a/Formula/i/io.rb b/Formula/i/io.rb new file mode 100644 index 0000000000000..0ace2e6abff6c --- /dev/null +++ b/Formula/i/io.rb @@ -0,0 +1,88 @@ +class Io < Formula + desc "Small prototype-based programming language" + homepage "http://iolanguage.com/" + license "BSD-3-Clause" + revision 1 + head "https://github.com/IoLanguage/io.git", branch: "master" + + stable do + url "https://github.com/IoLanguage/io/archive/refs/tags/2017.09.06.tar.gz" + sha256 "9ac5cd94bbca65c989cd254be58a3a716f4e4f16480f0dc81070457aa353c217" + + # Backport fix for Linux build + patch do + url "https://github.com/IoLanguage/io/commit/92fe8304c55b84a17b0624613a7006e85a0128a2.patch?full_index=1" + sha256 "183367979123123671fcd076aba3820ed20066add66725211a396eb5c621a6c6" + end + + # build patch for sysctl.h as glibc 2.32 removed + patch :DATA + end + + bottle do + rebuild 1 + sha256 sonoma: "9ceacf2ba834c91d5101adb7061bfd7c1ae702d9fbbbd9d8f78b5e82d049fd7e" + sha256 ventura: "914d9b485bd7ceaec9bc8e43c9ffff86560ced0074ea2ae73312c45fafc0e01e" + sha256 monterey: "2bbd166e8e51dd46f71818b6d2acad483af7cd19c2f8f114e5e713a64740d438" + sha256 arm64_linux: "7fb2cd769bab17e5a6e13563e09fb02bbd1da5e25d4fe541335b97f9f22fbc04" + sha256 x86_64_linux: "28f27659192940b8773ab23b0d237befa1ebb90ca6b771f82852422631f6549e" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + uses_from_macos "libxml2" + + on_macos do + depends_on arch: :x86_64 # https://github.com/IoLanguage/io/issues/465 + end + + def install + ENV.deparallelize + + # FSF GCC needs this to build the ObjC bridge + ENV.append_to_cflags "-fobjc-exceptions" + + inreplace "CMakeLists.txt" do |s| + # Turn off all add-ons in main cmake file + s.gsub! "add_subdirectory(addons)", "#add_subdirectory(addons)" unless build.head? + # Allow building on non-x86_64 platforms + # Ref: https://github.com/IoLanguage/io/issues/450 / https://github.com/IoLanguage/io/issues/474 + s.gsub! 'SET(CMAKE_C_FLAGS "-msse2")', "" unless Hardware::CPU.intel? + end + + args = %W[ + -DCMAKE_DISABLE_FIND_PACKAGE_ODE=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Theora=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -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.io").write <<~EOS + "it works!" println + EOS + + assert_equal "it works!\n", shell_output("#{bin}/io test.io") + end +end + +__END__ +diff --git a/libs/iovm/source/IoSystem.c b/libs/iovm/source/IoSystem.c +index a6234f7..af3a975 100755 +--- a/libs/iovm/source/IoSystem.c ++++ b/libs/iovm/source/IoSystem.c +@@ -22,7 +22,7 @@ Contains methods related to the IoVM. + #if defined(__NetBSD__) || defined(__OpenBSD__) + # include + #endif +-#ifndef __CYGWIN__ ++#if defined(HAVE_SYS_SYSCTL_H) && !defined(__GLIBC__) + # include + #endif + #endif diff --git a/Formula/i/iocextract.rb b/Formula/i/iocextract.rb new file mode 100644 index 0000000000000..e738f14e51b67 --- /dev/null +++ b/Formula/i/iocextract.rb @@ -0,0 +1,63 @@ +class Iocextract < Formula + include Language::Python::Virtualenv + + desc "Defanged indicator of compromise extractor" + homepage "https://inquest.readthedocs.io/projects/iocextract/en/latest/" + url "https://files.pythonhosted.org/packages/ad/4b/19934df6cd6a0f6923aabae391a67b630fdd03c12c1226377c99a747a4f1/iocextract-1.16.1.tar.gz" + sha256 "ec1389a76a5083f643652579610e8313d27ed5821fc57e7b046c23ddec181d44" + license "GPL-2.0-only" + revision 6 + head "https://github.com/InQuest/iocextract.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "77906e2e0c46fc8af0b0e771f466e8cf8e5e9aa8f1a73262fda532e2916626be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "47808e0f042ab926754f5dc822682dfbfb18eaff3bb961cdfaac4bb86dee8edc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6164ec611b5570c2998714a6fb0ab559f14e0c358ab5bdc95f221a8bbe3c952c" + sha256 cellar: :any_skip_relocation, sonoma: "c7934084e14ae5bd78c08be3b6cd69d417e03c3343e2653b91d3c7505289b15a" + sha256 cellar: :any_skip_relocation, ventura: "6bb94f5f1ac212b6e2de7d35de7e9df3658e9f85b230d4b30c5916ee83f2ae6c" + sha256 cellar: :any_skip_relocation, arm64_linux: "45d25b9b2f7a6324f95efcc256be1b26b99c139a78a5d3af479cf6d0dded4189" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d21ed8761747b89d58f0362ab3cea3dec8dafc22180f88fc4f017894bccbf55c" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f9/38/148df33b4dbca3bd069b963acab5e0fa1a9dbd6820f8c322d0dd6faeff96/regex-2024.9.11.tar.gz" + sha256 "6c188c307e8433bcb63dc1915022deb553b4203a70722fc542c363bf120a01fd" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"test.txt").write <<~EOS + InQuest customers have had detection for threats delivered from hotfixmsupload[.]com + since 6/3/2017 and cdnverify[.]net since 2/1/18. + EOS + + assert_match "hotfixmsupload[.]com\ncdnverify[.]net", shell_output("#{bin}/iocextract -i #{testpath}/test.txt") + end +end diff --git a/Formula/i/ioctl.rb b/Formula/i/ioctl.rb new file mode 100644 index 0000000000000..6df4548fad0f2 --- /dev/null +++ b/Formula/i/ioctl.rb @@ -0,0 +1,35 @@ +class Ioctl < Formula + desc "Command-line interface for interacting with the IoTeX blockchain" + homepage "https://docs.iotex.io/" + url "https://github.com/iotexproject/iotex-core/archive/refs/tags/v2.1.2.tar.gz" + sha256 "797fba127a4b9e85829d95176f23109506b87adaf1e7b04c0c9845b3a0631554" + license "Apache-2.0" + head "https://github.com/iotexproject/iotex-core.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "030fbe31b9e2166af259082211aa261e83d076f6a51da3dc6547be0375834d6b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "674e273961cc8f3590c9fd5dcbd45806fc9c259cbc7033f86dc95ad00fa1d412" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e808d19939fb4cd954e53d813bf1c92ff93459eec7860dc943a70d4808cfa468" + sha256 cellar: :any_skip_relocation, sonoma: "dc41a5f7a13c5a52b6b3ad3fd88169a2f2ba00889ca807c10a12e7d90058b276" + sha256 cellar: :any_skip_relocation, ventura: "8695571a76082a146a2f966e089d6d495eb35b95832ff0eedd872515d00f2d6f" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d4a09ecf29ad86975fa9a292d14fdc97792dac67558e3406f4c46a355368c1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d580fcb4495ddcaf8e6a0c25cadd870f02bf50d20f3b473f7715cc0951ddcc4c" + end + + depends_on "go" => :build + + def install + system "make", "ioctl" + bin.install "bin/ioctl" + end + + test do + output = shell_output "#{bin}/ioctl config set endpoint api.iotex.one:443" + assert_match "Endpoint is set to api.iotex.one:443", output + end +end diff --git a/Formula/i/iodine.rb b/Formula/i/iodine.rb new file mode 100644 index 0000000000000..71a3ff25123ac --- /dev/null +++ b/Formula/i/iodine.rb @@ -0,0 +1,37 @@ +class Iodine < Formula + desc "Tunnel IPv4 traffic through a DNS server" + homepage "https://code.kryo.se/iodine" + url "https://github.com/yarrick/iodine/archive/refs/tags/v0.8.0.tar.gz" + sha256 "ffc7a58cdde390a01580f4cfc78c446b0965bcb719bde2c68c5e0c27345a8dfc" + license "ISC" + head "https://github.com/yarrick/iodine.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "78df44a424d8357cd348a96c8a3f87502229b37e8871687bf39e246ea02327fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6137123041fc9cc12bfb1ab7b5c89db1df5a8a53c46005894ed3a2928cfd0ed2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7d366cab32fff89cfe558c7b03fdf36931a100e2834e6d830a642cb4517eb5e0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c56442257c490693ec92dce6ecf8b579c630460843e1bae51f46f48116a7e316" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6d07879633a49ec8f6dcaf65514c71409acdc9b9a92b05872ed02581ddadb999" + sha256 cellar: :any_skip_relocation, sonoma: "ec5682669fd55f55ea306f36d07d84cb69b19bf6fd295e18b3d161a4c32f43ef" + sha256 cellar: :any_skip_relocation, ventura: "e1162e6eb9ee5c0579216e80af32079d36adde37fe4653fb6da34a58d54e7c3c" + sha256 cellar: :any_skip_relocation, monterey: "297d884daa963973050eb436c9727c850ffce5627a33310bd159e7e13c6c8483" + sha256 cellar: :any_skip_relocation, big_sur: "fe1f5e48bcc20c66d29ce945f72d7879ba59eec5af18b3fd46ac3c21c40c6319" + sha256 cellar: :any_skip_relocation, arm64_linux: "7878240547b0427b4bb82fdb7062c995362a540e48c87fb97c5b5b81022514b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eef2dd9635b68cd36d2d7e3d1225d0644205250b5600874ad381d8b94a7a5b06" + end + + depends_on "cmake" => :build + + uses_from_macos "zlib" + + def install + system "make", "prefix=#{prefix}", "install" + end + + test do + # iodine and iodined require being run as root. Match on the non-root error text, which is printed to + # stderr, as a successful test + assert_match("iodine: Run as root and you'll be happy.", pipe_output("#{sbin}/iodine google.com 2>&1")) + assert_match("iodined: Run as root and you'll be happy.", pipe_output("#{sbin}/iodined google.com 2>&1")) + end +end diff --git a/Formula/i/ioping.rb b/Formula/i/ioping.rb new file mode 100644 index 0000000000000..6bd87452b5a56 --- /dev/null +++ b/Formula/i/ioping.rb @@ -0,0 +1,32 @@ +class Ioping < Formula + desc "Tool to monitor I/O latency in real time" + homepage "https://github.com/koct9i/ioping" + url "https://github.com/koct9i/ioping/archive/refs/tags/v1.3.tar.gz" + sha256 "7aa48e70aaa766bc112dea57ebbe56700626871052380709df3a26f46766e8c8" + license "GPL-3.0-or-later" + head "https://github.com/koct9i/ioping.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "52741ce205f6edd2660c7848d815fbf708aeecf69439a47984dedd602c0aa783" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4f3bda1094884d84cd06efdfdbe955f9926c5e9f265abfcb5ae1169ca03ac73e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "251ce565377d1b3f09d3293c46459b9950b8345ae8e66c2af8e069541880548c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c80c269c2105571ae9ea183372a238c784553652783ea417365010422dd1b2cc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f3560ce6ce206bb2e7296eca549d45714a945dc001a595dae743f6cb9b3120cd" + sha256 cellar: :any_skip_relocation, sonoma: "a4f39831f232914d0caa0d1f8cac3093d561a7b5daf7016e5778ae9e782d148d" + sha256 cellar: :any_skip_relocation, ventura: "808c5aa1e50e89a7a600bf83aa07905c8896be683854ddb7de42ec78c20c26bf" + sha256 cellar: :any_skip_relocation, monterey: "b13267eb009500e2ecd3655390e1b39c0083ef38b4cc4945be7a0dfb7fe12746" + sha256 cellar: :any_skip_relocation, big_sur: "ca6704be7e6eb5d2e774cebd8afbf125e86f4bf08c9c0ab1140ae283b3bd9cdf" + sha256 cellar: :any_skip_relocation, catalina: "6a7926f6e4b0e04d4ba5382f63c3a2434b5744901c26ad865544d887fc888145" + sha256 cellar: :any_skip_relocation, arm64_linux: "d215c9fae718ae0a3114e38361728c177e3d842db90b61f596d7b835041f3cd7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19e6f04bd51ce45365b256877f1b894023415a07f8966bab528c9eeba9feacb9" + end + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"ioping", "-c", "1", testpath + end +end diff --git a/Formula/i/ios-class-guard.rb b/Formula/i/ios-class-guard.rb new file mode 100644 index 0000000000000..ddd62d95002c6 --- /dev/null +++ b/Formula/i/ios-class-guard.rb @@ -0,0 +1,62 @@ +class IosClassGuard < Formula + desc "Objective-C obfuscator for Mach-O executables" + homepage "https://github.com/Polidea/ios-class-guard/" + url "https://github.com/Polidea/ios-class-guard/archive/refs/tags/0.8.tar.gz" + sha256 "4446993378f1e84ce1d1b3cbace0375661e3fe2fa1a63b9bf2c5e9370a6058ff" + license "GPL-2.0-or-later" + head "https://github.com/Polidea/ios-class-guard.git", branch: "master" + + # The latest version tags in the Git repository are `0.8` (2015-10-14) and + # `0.6` (2014-08-20) but versions before these are like `3.5` (2013-11-16), + # `3.4` (2012-11-19), `3.3.4` (2011-09-03), etc. The older releases like `3.5` + # are wrongly treated as newer but the GitHub repository doesn't mark a + # "latest" release, so we can only work around this by restricting matching + # to 0.x releases for now. If the major version reaches 1.x in the + # future, this check will also need to be updated. + livecheck do + url :stable + regex(/^v?(0(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4de6dec4f0120a68ac884defc966d1e3ff7da2cae669cccf3b80f72cdf7e7ddc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2573d220e15167e7b384badba84c8c81a68e7ec3caf0335182693fac4bacc08e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2cfa45ab4d2e9f5ff160c3e88426c890c83d5a87997fff438e04d07cd4d68467" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b4953b61e871a9935955ce26115619c081b15a5712decba1502b1d50b8d311cc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "80da4446b7d4838b965d12546d9b10ad777c24c2026248e6d49c415aad3f9771" + sha256 cellar: :any_skip_relocation, sonoma: "b63ae8b6898be42e963f77307eab235d553c049a532bc727b628fece3da6c874" + sha256 cellar: :any_skip_relocation, ventura: "4864bb18b6e3712c92bede68182d7d8345e35b98da0327b8bbffbfc07891ddee" + sha256 cellar: :any_skip_relocation, monterey: "c6ac0f4d85d53a86ee0de247c7119f776506830d4d7d2df26eb2ecebc1fa20f4" + sha256 cellar: :any_skip_relocation, big_sur: "159991d0922d6ea71dceb5f97c3024659f70c48fb91c0222186e8c108885db54" + sha256 cellar: :any_skip_relocation, catalina: "807b425c949e9a25331abd13967721d6f58d3a1674fcc8175744e713e81ee5d3" + sha256 cellar: :any_skip_relocation, mojave: "480f0437e5217cb8a47fcc0e9ffb6ffc62e4f81a79d5df9529320edeed479217" + sha256 cellar: :any_skip_relocation, high_sierra: "1962e7dde167e41141680b1347318396c0878fb8eeae55ec9f09460fcee33142" + sha256 cellar: :any_skip_relocation, sierra: "a7843a0767e916aa6be1509a984eb698bb54d125d06ad762fd25f4a3d6a55db1" + sha256 cellar: :any_skip_relocation, el_capitan: "0bb9abaac82cbc4e66a12493548659197559a01a779db6ceda4cf6c4439ea0bb" + end + + depends_on xcode: :build + depends_on :macos + + def install + xcodebuild "-workspace", "ios-class-guard.xcworkspace", + "-scheme", "ios-class-guard", + "-configuration", "Release", + "SYMROOT=build", "PREFIX=#{prefix}", "ONLY_ACTIVE_ARCH=YES", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + bin.install "build/Release/ios-class-guard" + end + + test do + (testpath/"crashdump").write <<~EOS + 1 MYAPP 0x0006573a -[C03B setR02:] + 42 + EOS + (testpath/"symbols.json").write <<~JSON + { + "C03B" : "MyViewController", + "setR02" : "setRightButtons" + } + JSON + system bin/"ios-class-guard", "-c", "crashdump", "-m", "symbols.json" + end +end diff --git a/Formula/i/ios-deploy.rb b/Formula/i/ios-deploy.rb new file mode 100644 index 0000000000000..9472d23e6fe7d --- /dev/null +++ b/Formula/i/ios-deploy.rb @@ -0,0 +1,41 @@ +class IosDeploy < Formula + desc "Install and debug iPhone apps from the command-line" + homepage "https://github.com/ios-control/ios-deploy" + url "https://github.com/ios-control/ios-deploy/archive/refs/tags/1.12.2.tar.gz" + sha256 "2a1e9836192967f60194334261e7af4de2ba72e4047a3e54376e5caa57a1db70" + license all_of: ["GPL-3.0-or-later", "BSD-3-Clause"] + head "https://github.com/ios-control/ios-deploy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4c69eb7279d465db83c5d996a519fdc0f045338adaef8a92eb426a67f9733ee9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d9ac2ff01049d41618a63ef47738fe9e01cf9b77154b9773bde884a42dd31e1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5c87b96b6692afa7b56724cb2e1a0f1cf1e8065f803266c8d83a7d5623496896" + sha256 cellar: :any_skip_relocation, arm64_monterey: "eae3172eaea91a064b40f05f508d4d4a3d9c18cdba920fec27be57477cfd5ec4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8eddbc577a5cfa12da1fa5e0c6a40ae19f2b20c275326f3e9db6ce95bef0c640" + sha256 cellar: :any_skip_relocation, sonoma: "91d82a87a7a1ed736955a407d2fba49053222fd3ab4a4af23123cb6fd6b7ad4b" + sha256 cellar: :any_skip_relocation, ventura: "9c9ca5f1ced69ffa9d96409dce25c135560edce0082391f24c84493b8822fd04" + sha256 cellar: :any_skip_relocation, monterey: "245e3e9a9334e2fc2ee3e1123493849bbfdec93dd33fad32c45dff32da512e96" + sha256 cellar: :any_skip_relocation, big_sur: "b04cc3456def885207da127501db9e3e8defb9b108f1aae2f358e8498d6e8f16" + end + + depends_on xcode: :build + depends_on :macos + + def install + xcodebuild "-configuration", "Release", + "SYMROOT=build", + "-arch", Hardware::CPU.arch + + xcodebuild "test", + "-scheme", "ios-deploy-tests", + "-configuration", "Release", + "SYMROOT=build", + "-arch", Hardware::CPU.arch + + bin.install "build/Release/ios-deploy" + end + + test do + system bin/"ios-deploy", "-V" + end +end diff --git a/Formula/i/ios-sim.rb b/Formula/i/ios-sim.rb new file mode 100644 index 0000000000000..3a0683f6e6afb --- /dev/null +++ b/Formula/i/ios-sim.rb @@ -0,0 +1,31 @@ +class IosSim < Formula + desc "Command-line application launcher for the iOS Simulator" + homepage "https://github.com/ios-control/ios-sim" + url "https://github.com/ios-control/ios-sim/archive/refs/tags/9.0.0.tar.gz" + sha256 "8c72c8c5f9b0682c218678549c08ca01b3ac2685417fc2ab5b4b803d65a21958" + license "Apache-2.0" + head "https://github.com/ios-control/ios-sim.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bd92e6e258c08fa9311aa30268b4ca011cdc433deaba18f2f61056c36e09431a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6e73a7f221630697eab12ddbd235c47bc13274d1901ae108bd38f4cba5d5b6a8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6e73a7f221630697eab12ddbd235c47bc13274d1901ae108bd38f4cba5d5b6a8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6e73a7f221630697eab12ddbd235c47bc13274d1901ae108bd38f4cba5d5b6a8" + sha256 cellar: :any_skip_relocation, sonoma: "fa7b613231b370eb5cf3577fe6cfade02cb01fbbf71925a1e2b8915c93216e4a" + sha256 cellar: :any_skip_relocation, ventura: "fa7b613231b370eb5cf3577fe6cfade02cb01fbbf71925a1e2b8915c93216e4a" + sha256 cellar: :any_skip_relocation, monterey: "fa7b613231b370eb5cf3577fe6cfade02cb01fbbf71925a1e2b8915c93216e4a" + end + + depends_on :macos + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + system bin/"ios-sim", "--help" + end +end diff --git a/Formula/i/ios-webkit-debug-proxy.rb b/Formula/i/ios-webkit-debug-proxy.rb new file mode 100644 index 0000000000000..80a49145a3e04 --- /dev/null +++ b/Formula/i/ios-webkit-debug-proxy.rb @@ -0,0 +1,50 @@ +class IosWebkitDebugProxy < Formula + desc "DevTools proxy for iOS devices" + homepage "https://github.com/google/ios-webkit-debug-proxy" + url "https://github.com/google/ios-webkit-debug-proxy/archive/refs/tags/v1.9.1.tar.gz" + sha256 "6b7781294cc84d383c7e7ecd05af08ca8d9b2af7a49ba648178ae4d84837c52b" + license "BSD-3-Clause" + head "https://github.com/google/ios-webkit-debug-proxy.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b8ca23a0fe897b848f8fbe19273bf1e78793f7b0f9ec2ff9399173f4d8af7f1a" + sha256 cellar: :any, arm64_sonoma: "e94dd8359b362248a2add9bb60bdd7eaf096290b5fada5d73b8c8cfa86ea79da" + sha256 cellar: :any, arm64_ventura: "c74be0abfd3c227042b2be63c13207a9e6b72c228ab9c027d1f8c0ecd89f6abe" + sha256 cellar: :any, arm64_monterey: "34da6aa20a69ca6f79afff001898af9994b697331815b44ae572a05c25dda7e4" + sha256 cellar: :any, sonoma: "f62dc78d90d3d02d3d0ea7f4d4d3d82b13affcdc403955113ec0d73d56c74fc3" + sha256 cellar: :any, ventura: "22cb1b17edbddfc17bf64112a60d32fd659dfadce8cf1521018b994f89194f0d" + sha256 cellar: :any, monterey: "a2ec7d1750d1c8d4370679e255f75957f6365bb55259b21967216ea5549ee88f" + sha256 cellar: :any_skip_relocation, arm64_linux: "5838f6c52b74b403ec6ec7bc002bbda9336cfb033144fa2a48aa87d644fc2c74" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44137a86b9210566d60a3b8b8e09f5cca01340f2db9441c6a29375df8e8e6db9" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libimobiledevice" + depends_on "libplist" + depends_on "libusbmuxd" + depends_on "openssl@3" + + def install + system "./autogen.sh", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ios_webkit_debug_proxy --version") + + # Fails in Linux CI with "`No device found, is it plugged in?`" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + base_port = free_port + (testpath/"config.csv").write <<~CSV + null:#{base_port},:#{base_port + 1}-#{base_port + 101} + CSV + + spawn "#{bin}/ios_webkit_debug_proxy", "-c", testpath/"config.csv" + sleep 2 + assert_match "iOS Devices:", shell_output("curl localhost:#{base_port}") + end +end diff --git a/Formula/i/iowow.rb b/Formula/i/iowow.rb new file mode 100644 index 0000000000000..220875ee216c6 --- /dev/null +++ b/Formula/i/iowow.rb @@ -0,0 +1,36 @@ +class Iowow < Formula + desc "C utility library and persistent key/value storage engine" + homepage "https://iowow.softmotions.com/" + url "https://github.com/Softmotions/iowow/archive/refs/tags/v1.4.18.tar.gz" + sha256 "ef4ee56dd77ce326fff25b6f41e7d78303322cca3f11cf5683ce9abfda34faf9" + license "MIT" + head "https://github.com/Softmotions/iowow.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "037aeefb4df2c9cc2c239192b51713f918271e48455c48bdebbcf2d688bb212f" + sha256 cellar: :any, arm64_sonoma: "2fba078871f285e4275e5335150ef00f6615d5739d7a9280919edf787f9a0b5f" + sha256 cellar: :any, arm64_ventura: "653db3534479fa6987b0276850e13ae821507a3eb40131f9170e4ce1158bf56e" + sha256 cellar: :any, arm64_monterey: "02ac4f8dc19959efbfd5bbac2685c2532e9de9488f3f51a218e15b2767727559" + sha256 cellar: :any, sonoma: "bfdd0df35ade257dfc24898f77d0134176f5d3c13a12338c4d0e705451bb269d" + sha256 cellar: :any, ventura: "e222abf0c1723ef6439607386f136582ef7384aa2c5df9e989386f3be4c5e5c1" + sha256 cellar: :any, monterey: "791aad132a5be42cbde1b97c8f38dc6c63f84f382aa94980b9fc5371778deb20" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b3ddbc7bd008a380416bef79e794b4ab3e1085309c6b5f22b2fed244dceca09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c50abbc4cf8ac933da6dc4be5dab2ca27db4e653fa7eb7189f00378561c3d7e" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + inreplace "src/kv/examples/example1.c", "#include \"iwkv.h\"", "#include " + (pkgshare/"examples").install "src/kv/examples/example1.c" + end + + test do + system ENV.cc, pkgshare/"examples/example1.c", "-I#{include}", "-L#{lib}", "-liowow", "-o", "example1" + assert_match "put: foo => bar\nget: foo => bar\n", shell_output("./example1") + end +end diff --git a/Formula/i/ip_relay.rb b/Formula/i/ip_relay.rb new file mode 100644 index 0000000000000..d10bf3e77fac9 --- /dev/null +++ b/Formula/i/ip_relay.rb @@ -0,0 +1,25 @@ +class IpRelay < Formula + desc "TCP traffic shaping relay application" + homepage "https://stewart.com.au/ip_relay/" + url "https://stewart.com.au/ip_relay/ip_relay-0.71.tgz" + sha256 "0cf6c7db64344b84061c64e848e8b4f547b5576ad28f8f5e67163fc0382d9ed3" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?ip_relay[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ea932a50ad3b1643e87dab5b41be2a75c2ac1f22392930e1cf3f05e85beef8ed" + end + + def install + bin.install "ip_relay.pl" => "ip_relay" + end + + test do + shell_output("#{bin}/ip_relay -b", 1) + end +end diff --git a/Formula/i/ipatool.rb b/Formula/i/ipatool.rb new file mode 100644 index 0000000000000..4614b1d4b2f7b --- /dev/null +++ b/Formula/i/ipatool.rb @@ -0,0 +1,32 @@ +class Ipatool < Formula + desc "CLI tool for searching and downloading app packages from the iOS App Store" + homepage "https://github.com/majd/ipatool" + url "https://github.com/majd/ipatool/archive/refs/tags/v2.1.6.tar.gz" + sha256 "7527e6896185c10a8c009124e1d3c62276ebf06915701f90b123afcffd03d480" + license "MIT" + head "https://github.com/majd/ipatool.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0da4cdf6b4fbc9c904b18b613bd4ab33370551c592f61572145c42318a0be893" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "36af7d17a62e94943b0bb01fb600fabce35f0b4ba2a8a8744158def9438e441c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1fe7c6ecaa326cc5cb34a8e31c3c9e7ea15dfcac499dc8e9d9ffec8336917ed4" + sha256 cellar: :any_skip_relocation, sonoma: "79387b5b7e3e7e9d0153a92046ee21b8b6aff7f1d02f933a219bb2a332dfd926" + sha256 cellar: :any_skip_relocation, ventura: "378aabe9ed8c78ac4032cebc32186ec050be020c4a5a9f3ca8d8cc0a97d11950" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a237bacf6bde652eef91bb9645f27c9f1858277e571943caa0e1930184a402a0" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/majd/ipatool/v2/cmd.version=#{version}") + + generate_completions_from_executable(bin/"ipatool", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/ipatool --version") + + output = shell_output("#{bin}/ipatool auth info 2>&1", 1) + assert_match "failed to get account", output + end +end diff --git a/Formula/i/ipbt.rb b/Formula/i/ipbt.rb new file mode 100644 index 0000000000000..2a0c4a5411935 --- /dev/null +++ b/Formula/i/ipbt.rb @@ -0,0 +1,39 @@ +class Ipbt < Formula + desc "Program for recording a UNIX terminal session" + homepage "https://www.chiark.greenend.org.uk/~sgtatham/ipbt/" + url "https://www.chiark.greenend.org.uk/~sgtatham/ipbt/ipbt-20240909.a852474.tar.gz" + version "20240909" + sha256 "89d95b6c806461ac0dc2096732e266dfb288d08cd8cbe68df83cea9fe0895bfe" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?ipbt[._-]v?(\d+(?:\.\d+)*)(?:[._-][\da-z]+)?\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "92e01edfa69f113441a864b0a8f64ff02089a7f058da34d9a8a0d92c0cb9bdaa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2b9aa1ec59dbb646fa05808cd92db6f11cb16027349a2c3d29ad0bbdf56bf76f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cc6c27b8f14f12fbca7cdba7ad7f0a2fd31919f6589a2cb331fa2d490cf9d08f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "540baf21bc21eaeac9079d0f674b00a2d5d306a8b0e6ce3fe02ef3c282f49d36" + sha256 cellar: :any_skip_relocation, sonoma: "62353f1d79b73c4a914726299f572ec461d23eca472ca88c876f87e91f811fe3" + sha256 cellar: :any_skip_relocation, ventura: "9679a46da3f945ff493a4235ad49a562073a6c3da5ce96b33f6731f535dfdf1c" + sha256 cellar: :any_skip_relocation, monterey: "1a7a751716a0df2221e6cbfdb528720936a0c2054a219a9012765f39fe1081ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "3374979030a5d810381b6f3d85ed4c40c40cc7ffc69bc7fee643c6fab7d4025c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee0805604e97eaceb23bc1c424867e48c4f8e158e84ab807963fbe7dce5c3d0d" + end + + depends_on "cmake" => :build + + uses_from_macos "ncurses" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"ipbt" + end +end diff --git a/Formula/i/ipcalc.rb b/Formula/i/ipcalc.rb new file mode 100644 index 0000000000000..802ea5ba58d14 --- /dev/null +++ b/Formula/i/ipcalc.rb @@ -0,0 +1,20 @@ +class Ipcalc < Formula + desc "Calculate various network masks, etc. from a given IP address" + homepage "https://jodies.de/ipcalc" + url "https://github.com/kjokjo/ipcalc/archive/refs/tags/0.51.tar.gz" + sha256 "a4dbfaeb7511b81830793ab9936bae9d7b1b561ad33e29106faaaf97ba1c117e" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "34f1ac1f3130d85231cf0af66acd5d46b21bbdaa9a32153ae71c7d9977c36c57" + end + + def install + bin.install "ipcalc" + end + + test do + system bin/"ipcalc", "--nobinary", "192.168.0.1/24" + end +end diff --git a/Formula/i/iperf.rb b/Formula/i/iperf.rb new file mode 100644 index 0000000000000..c3557adc9b524 --- /dev/null +++ b/Formula/i/iperf.rb @@ -0,0 +1,36 @@ +class Iperf < Formula + desc "Tool to measure maximum TCP and UDP bandwidth" + homepage "https://sourceforge.net/projects/iperf2/" + url "https://downloads.sourceforge.net/project/iperf2/iperf-2.2.1.tar.gz" + sha256 "754ab0a7e28033dbea81308ef424bc7df4d6e2fe31b60cc536b61b51fefbd8fb" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(%r{url=.*?/iperf[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "db6efa4665fb211a816b35f09bcfa864a730c6e4090db7980237fa59a21a3ca2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c37a56093641d787d93ae9bfe6f703c2cb135426118ea840206b6cf65b6b839" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7175c66a9b8d7b696e90924d5143cd7c4c6f70d3882a2786f3074cc76acd1771" + sha256 cellar: :any_skip_relocation, sonoma: "aed94aa9afebab06799f8029472589ceec497c794a787cff72b266485d747e07" + sha256 cellar: :any_skip_relocation, ventura: "64ed221535508fd70d50c162cf827e21e3753a831cd806d7a81949f9251503af" + sha256 cellar: :any_skip_relocation, arm64_linux: "b82dd7aea8a7176b9de78654e8fb38b5ea3fac1a68ecf538d5fc8c00cd1ddbfc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30cab186caf9720f6d1758b086d8df5978ea56022a32ad4367f232ab82c1750e" + end + + def install + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + end + + test do + server = IO.popen("#{bin}/iperf --server") + sleep 1 + assert_match "Bandwidth", pipe_output("#{bin}/iperf --client 127.0.0.1 --time 1") + ensure + Process.kill("SIGINT", server.pid) + Process.wait(server.pid) + end +end diff --git a/Formula/i/iperf3.rb b/Formula/i/iperf3.rb new file mode 100644 index 0000000000000..82e01b6eb4c61 --- /dev/null +++ b/Formula/i/iperf3.rb @@ -0,0 +1,53 @@ +class Iperf3 < Formula + desc "Update of iperf: measures TCP, UDP, and SCTP bandwidth" + homepage "https://github.com/esnet/iperf" + url "https://downloads.es.net/pub/iperf/iperf-3.18.tar.gz" + sha256 "c0618175514331e766522500e20c94bfb293b4424eb27d7207fb427b88d20bab" + license "BSD-3-Clause" + + livecheck do + url "https://downloads.es.net/pub/iperf/" + regex(/href=.*?iperf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "afa3ad80146f97f3881e7b11001b86607a2fd3f91d7b7321d1dd23e407165ff5" + sha256 cellar: :any, arm64_sonoma: "18879823e7b5da6f272ccfee521d5e472991446ac9abf02c83f4bca98815c503" + sha256 cellar: :any, arm64_ventura: "fddee79c5fb5d0507590f1750140936cef0123c5880422e62cf091f28426d219" + sha256 cellar: :any, sonoma: "14cac44b69e7d492cc3057c11deca0cde4a0c7685fec6fc8d76f0c36480e92ee" + sha256 cellar: :any, ventura: "95973254270c226cba64aeb3394534de4a6c4e3c6ac5d93a221da58128bae2d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e85d170629520862e53cfafde65f4779266bb7afd32b727eac04ba5bdeb1ba5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e882398a3b0d2b0a2e068f0c92e76b3e4c7698c7e1e592d310b568fece389866" + end + + head do + url "https://github.com/esnet/iperf.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "openssl@3" + + def install + system "./bootstrap.sh" if build.head? + system "./configure", "--disable-silent-rules", + "--disable-profiling", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + *std_configure_args + system "make", "clean" # there are pre-compiled files in the tarball + system "make", "install" + end + + test do + port = free_port + pid = spawn bin/"iperf3", "--server", "--port", port.to_s + sleep 1 + sleep 2 if OS.mac? && Hardware::CPU.intel? + assert_match "Bitrate", shell_output("#{bin}/iperf3 --client 127.0.0.1 --port #{port} --time 1") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end +end diff --git a/Formula/i/ipfs.rb b/Formula/i/ipfs.rb new file mode 100644 index 0000000000000..61db9e3434c4d --- /dev/null +++ b/Formula/i/ipfs.rb @@ -0,0 +1,46 @@ +class Ipfs < Formula + desc "Peer-to-peer hypermedia protocol" + homepage "https://docs.ipfs.tech/how-to/command-line-quick-start/" + url "https://github.com/ipfs/kubo/archive/refs/tags/v0.34.1.tar.gz" + sha256 "297b1c85940b5894831b85ffae3acfd81ee7c4495bec5166ca1250080c44ee7a" + license all_of: [ + "MIT", + any_of: ["MIT", "Apache-2.0"], + ] + head "https://github.com/ipfs/kubo.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa9247fd3a45680a7838d4b6d66758c09f18aefc85615d1dc7a98cb3bff78554" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a2f7540f385733884173b3513e8a11c504e7b4a4356005ee3d5f4469e5790905" + sha256 cellar: :any_skip_relocation, arm64_ventura: "675d7dd4eedc61d603df047cf2071ab6319a0ed99c3a699b57dfd37d8a649d2d" + sha256 cellar: :any_skip_relocation, sonoma: "69f5a6b93a1ece3537228b63fd41c9c8c3754e93954647289f2ca0a1f09b820b" + sha256 cellar: :any_skip_relocation, ventura: "b7e68e4c8583ecf9384da070cddaf554819ff8c5f52e8eb8d96fc403b81bf6de" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f2ad69a69385a237e3ba6bded2f335bcc6122fab81747aa4486ee8a6b07f04d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe83850301a90dd4e7c08eda8ca5169bc05ca2e5ff504b50b26b49df2a08258c" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/ipfs/kubo.CurrentCommit=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/ipfs" + + generate_completions_from_executable(bin/"ipfs", "commands", "completion") + end + + service do + run [opt_bin/"ipfs", "daemon"] + end + + test do + assert_match "initializing IPFS node", shell_output("#{bin}/ipfs init") + end +end diff --git a/Formula/i/ipget.rb b/Formula/i/ipget.rb new file mode 100644 index 0000000000000..ecbaab8d9b891 --- /dev/null +++ b/Formula/i/ipget.rb @@ -0,0 +1,35 @@ +class Ipget < Formula + desc "Retrieve files over IPFS and save them locally" + homepage "https://github.com/ipfs/ipget/" + url "https://github.com/ipfs/ipget/archive/refs/tags/v0.11.1.tar.gz" + sha256 "3dd56e9243ab59383d206c2b374980cc987c016a391976dd9dcf5bff33a96f35" + license "MIT" + head "https://github.com/ipfs/ipget.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d8ae441fecd189ca058e76d0acfb30e93a2fa8a04beffdaa27b1780d3f0ba34b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d963166f966424517640b342f72019fd6d1f5d7721a508f60d3841f512ded3d2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4e5a57ab51fe284bb42595846d991d16f16c9af8b9edc1ca59a8d4601abc2ffa" + sha256 cellar: :any_skip_relocation, sonoma: "f918f9a023d8f9259c75ed408752e6a0cfe660806ec2e9aef326ebaf19ac199f" + sha256 cellar: :any_skip_relocation, ventura: "f5725f63532333b6729f26664512984c4e2914358344894c6c9cfe8fabf81245" + sha256 cellar: :any_skip_relocation, arm64_linux: "f21317d1628e7a600ef4480d5ab43d707ad7a1241fd873fb1afad2f9fac5674d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "304bebe13417bc89ee71aab782f6f528824b4fd3dae6d8bf6a01540b2e11832c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + # Make sure correct version is reported + assert_match version.to_s, shell_output("#{bin}/ipget --version") + + # An example content identifier (CID) used in IPFS docs: + # https://docs.ipfs.tech/concepts/content-addressing/ + cid = "bafybeihkoviema7g3gxyt6la7vd5ho32ictqbilu3wnlo3rs7ewhnp7lly" + system bin/"ipget", "ipfs://#{cid}/" + assert_match "JPEG image data", shell_output("file #{cid}") + end +end diff --git a/Formula/i/ipinfo-cli.rb b/Formula/i/ipinfo-cli.rb new file mode 100644 index 0000000000000..a266f708eb467 --- /dev/null +++ b/Formula/i/ipinfo-cli.rb @@ -0,0 +1,39 @@ +class IpinfoCli < Formula + desc "Official CLI for the IPinfo IP Address API" + homepage "https://ipinfo.io/" + url "https://github.com/ipinfo/cli/archive/refs/tags/ipinfo-3.3.1.tar.gz" + sha256 "b3acdfdfdebe64b34c7a1aa80de25fd7178a51105e588ad0d205870ca9d15cfb" + license "Apache-2.0" + head "https://github.com/ipinfo/cli.git", branch: "master" + + livecheck do + url :stable + regex(/^ipinfo[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0d429542dab200b1fe6efea35c8c1c6af0f619c8b3fb54ebb01953334d6daf68" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "24a4a6cf506fe7c3f61570df82ab98529c08de85cf884fc87251268670e2b322" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a23d240ffde98765e7fe943aa1634f194df0d23cd9160060b892b6554316d911" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a612af30b534c65fa532a52be61ef3b74ced4a579439f90c1cff1200b5c9f346" + sha256 cellar: :any_skip_relocation, sonoma: "93d7de1ed1ffcb8e5e7399debf034c5818874fd09666341ed70d46031d0ebccd" + sha256 cellar: :any_skip_relocation, ventura: "1b62948b8934538adb736f4c828fe28ea5c12598adfa4023af12902d7021db24" + sha256 cellar: :any_skip_relocation, monterey: "77e2425a41302f25261670c67c2d84730e24ec207d2ae7eea3fb22c57e1c4f3a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2880d661339a626ecb23cc58f0049c21f35c1991c1db50b9d40872cb5bac5207" + end + + depends_on "go" => :build + + conflicts_with "ipinfo", because: "ipinfo and ipinfo-cli install the same binaries" + + def install + system "./ipinfo/build.sh" + bin.install "build/ipinfo" + generate_completions_from_executable(bin/"ipinfo", "completion") + end + + test do + assert_equal version.to_s, shell_output("#{bin}/ipinfo version").chomp + assert_equal "1.1.1.0\n1.1.1.1\n1.1.1.2\n1.1.1.3\n", `#{bin}/ipinfo prips 1.1.1.1/30` + end +end diff --git a/Formula/i/ipinfo.rb b/Formula/i/ipinfo.rb new file mode 100644 index 0000000000000..b779a337370d1 --- /dev/null +++ b/Formula/i/ipinfo.rb @@ -0,0 +1,43 @@ +class Ipinfo < Formula + desc "Tool for calculation of IP networks" + homepage "https://kyberdigi.cz/projects/ipinfo/" + url "https://kyberdigi.cz/projects/ipinfo/files/ipinfo-1.2.tar.gz" + sha256 "19e6659f781a48b56062a5527ff463a29c4dcc37624fab912d1dce037b1ddf2d" + license "Beerware" + + # The content of the download page is generated using JavaScript and software + # versions are the first string in certain array literals in the page source. + livecheck do + url :homepage + regex(/(?:new Array\(|\[)["']v?(\d+(?:\.\d+)+)["'],/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ff62045518304b036f380fb7a14218208349858d1d1b5db7d39c3877e1361400" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4284a229bc38e71cb7ccd08df9056a350eb2e7a47b224e3f567eb8f4ec79d0fa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "48870fd5a3ee495bbc62c79d5706403ccef08c28f00d503b7bd661315bf2016c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e36096abf98dc91542e89ef61e240b9470d7b4203d721f18d9e0021a0bc373e8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c631709cb3810dbbef8f37e1b2d7c76fb301ae36bb9b2d63885ecde62152b7ef" + sha256 cellar: :any_skip_relocation, sonoma: "ea99afca3cdf9fa28fdb6a72a72b4d094716c2a10d06ee22d7c558328673454f" + sha256 cellar: :any_skip_relocation, ventura: "b6200ef7097f9b8deaf0b7c28b968e6af3577e22a38345fccc859c89ded033b1" + sha256 cellar: :any_skip_relocation, monterey: "dd6a283e541551be0bda8e82d322dc5f057e363021482cb8111afd0d045d6924" + sha256 cellar: :any_skip_relocation, big_sur: "9b70f868f6a9a1c2e59247a09510e14e3da1a45c2acaa86fde9b93a155a14e68" + sha256 cellar: :any_skip_relocation, catalina: "b2202f465e419b0bc7e3667d75247cc37a46b49d9a4eb5f23f1f63cb361fd366" + sha256 cellar: :any_skip_relocation, mojave: "33fdb805793a8566f7f6adca7a1c3b7d0c67071fc846977bacf6629a8e63c9b2" + sha256 cellar: :any_skip_relocation, high_sierra: "c06a0c771b66def2758aad30e8331cc56f751478715e12b25b9e46d9b64090f9" + sha256 cellar: :any_skip_relocation, sierra: "255c10eb2f0f885ba301fa2977ae3c45b5f7117388739adb58ce4312515ff98f" + sha256 cellar: :any_skip_relocation, el_capitan: "ecb331ae035cf5963afc8e8adf371d80f936960bf0d5ba379b18761263a1b040" + sha256 cellar: :any_skip_relocation, arm64_linux: "7281f5fe0d2f917996b4049beb1753c4c4e22a808d9fbbdc3b1905c37365be70" + sha256 cellar: :any_skip_relocation, x86_64_linux: "91632022aa7d392d7f03002052683ca4d7bc9d09b16a6132d479b7263dd2969f" + end + + conflicts_with "ipinfo-cli", because: "ipinfo and ipinfo-cli install the same binaries" + + def install + system "make", "BINDIR=#{bin}", "MANDIR=#{man1}", "install" + end + + test do + system bin/"ipinfo", "127.0.0.1" + end +end diff --git a/Formula/i/ipmitool.rb b/Formula/i/ipmitool.rb new file mode 100644 index 0000000000000..2da8aaf157a43 --- /dev/null +++ b/Formula/i/ipmitool.rb @@ -0,0 +1,73 @@ +class Ipmitool < Formula + desc "Utility for IPMI control with kernel driver or LAN interface" + homepage "https://codeberg.org/IPMITool/ipmitool" + url "https://codeberg.org/IPMITool/ipmitool/archive/IPMITOOL_1_8_19.tar.gz" + sha256 "ce13c710fea3c728ba03a2a65f2dd45b7b13382b6f57e25594739f2e4f20d010" + license "BSD-3-Clause" + revision 3 + + livecheck do + url :stable + regex(/^IPMITOOL[._-]v?(\d+(?:[._]\d+)+)$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + bottle do + sha256 arm64_sequoia: "edbce0fa9c0eb8554d49e69266b9a954b48675511ae98cab9f252df858c60feb" + sha256 arm64_sonoma: "4209c292804d02871d7ffbb5eacfe3d0a9b4c433bd7ea324d7411453e5898ed8" + sha256 arm64_ventura: "d5f56eab1fc400e5160b2e08df8161d8d8c0bfeb9935ed220ae28e60ab6f460c" + sha256 sonoma: "6486e5cfbef27dc3affea78d2ce0d06b50b44030e27606095f25ad9f42dafce7" + sha256 ventura: "b232ea31418c3291675268781731b137e2d5737e3e588c46508bc5c7c9bcc3ce" + sha256 arm64_linux: "9a89dea49852f23f465ae0c9d72c718cb06f593e097dc8e1370f22061800ba7c" + sha256 x86_64_linux: "610caf753fee4dcb908b7213554bb2397a9e303c00c95b52a7168da42ba804f7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "openssl@3" + + on_linux do + depends_on "readline" + end + + # Patch to fix lan print + # https://github.com/ipmitool/ipmitool/issues/388 + patch do + url "https://github.com/ipmitool/ipmitool/commit/a61349b443c16821e4884cde5ad8c031d619631a.patch?full_index=1" + sha256 "e026b8a5a5128714a0f36d05b4b26428dca3522dc889ebc21dc8888a2d3f1505" + end + + # Patch to fix enterprise-number URL due to IANA URL scheme change + # https://github.com/ipmitool/ipmitool/issues/377 + patch do + url "https://codeberg.org/IPMITool/ipmitool/commit/1edb0e27e44196d1ebe449aba0b9be22d376bcb6.patch?full_index=1" + sha256 "044363a930cf6a9753d8be2a036a0ee8c4243ce107eebc639dcb93e1e412e0ed" + end + + # Patch to fix build on ARM + # https://github.com/ipmitool/ipmitool/issues/332 + patch do + url "https://codeberg.org/IPMITool/ipmitool/commit/206dba615d740a31e881861c86bcc8daafd9d5b1.patch?full_index=1" + sha256 "86eba5d0000b2d1f3ce3ba4a23ccb5dd762d01fec0f9910a95e756c5399d7fb8" + end + + def install + system "./bootstrap" + system "./configure", *std_configure_args, + "--mandir=#{man}", + "--disable-intf-usb" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ipmitool -V") + if OS.mac? + assert_match "No hostname specified!", shell_output("#{bin}/ipmitool 2>&1", 1) + else # Linux + assert_match "Could not open device", shell_output("#{bin}/ipmitool 2>&1", 1) + end + end +end diff --git a/Formula/i/ipmiutil.rb b/Formula/i/ipmiutil.rb new file mode 100644 index 0000000000000..62bd26d110146 --- /dev/null +++ b/Formula/i/ipmiutil.rb @@ -0,0 +1,55 @@ +class Ipmiutil < Formula + desc "IPMI server management utility" + homepage "https://ipmiutil.sourceforge.net/" + url "https://downloads.sourceforge.net/project/ipmiutil/ipmiutil-3.2.1.tar.gz" + sha256 "04811b2e657ff98cd31e44b91a700c9f33c4c9dd93a36c8fc987de1f47c24024" + license all_of: ["BSD-2-Clause", "BSD-3-Clause", "GPL-2.0-or-later"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b18ce2d2673c32032f3448fee24b12041f9295d308ae2cd8012673e5d493140e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d8932e2a1bb40be9409d1e6af6d317b358639854bb8bede8968cae75ddc47ab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3352de5466ef543f219504b8ea5cb36ae4b86394230792b3e58a608fb44a5b09" + sha256 cellar: :any_skip_relocation, sonoma: "c0a5db5e377eefc09019ff44dc4acead6bc7d39a5fbc905c69d2ec09f67b34a7" + sha256 cellar: :any_skip_relocation, ventura: "81ce2a5170ab9e89315a1120048f357ae8b7658fce50b53caab7856b30615e11" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e4cdaa053ef9087f6876ec170bee57b33179a2f3878f16fd2ea2ad9d7218492" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8cb1651c4cb5ff74bbf0de01df94c49af156e8dd92df446a6cc105bf50be73c" + end + + on_macos do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + conflicts_with "renameutils", because: "both install `icmd` binaries" + + def install + # Workaround for newer Clang + ENV.append "CC", "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + # Darwin does not exist only on PowerPC + if OS.mac? + inreplace "configure.ac", "test \"$archp\" = \"powerpc\"", "true" + system "autoreconf", "--force", "--install", "--verbose" + end + + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--disable-lanplus", + "--enable-sha256", + "--enable-gpl" + + system "make", "TMPDIR=#{ENV["TMPDIR"]}" + # DESTDIR is needed to make everything go where we want it. + system "make", "prefix=/", + "DESTDIR=#{prefix}", + "varto=#{var}/lib/#{name}", + "initto=#{etc}/init.d", + "sysdto=#{prefix}/#{name}", + "install" + end + + test do + system bin/"ipmiutil", "delloem", "help" + end +end diff --git a/Formula/i/ipopt.rb b/Formula/i/ipopt.rb new file mode 100644 index 0000000000000..938afd1ba5dcb --- /dev/null +++ b/Formula/i/ipopt.rb @@ -0,0 +1,105 @@ +class Ipopt < Formula + desc "Interior point optimizer" + homepage "https://coin-or.github.io/Ipopt/" + url "https://github.com/coin-or/Ipopt/archive/refs/tags/releases/3.14.17.tar.gz" + sha256 "17ab8e9a6059ab11172c184e5947e7a7dda9fed0764764779c27e5b8e46f3d75" + license "EPL-2.0" + head "https://github.com/coin-or/Ipopt.git", branch: "stable/3.14" + + bottle do + sha256 cellar: :any, arm64_sequoia: "28f86d6ab4e46e32df53b0d84ea2bc8da41fe2493d8659f9f113e221587292e7" + sha256 cellar: :any, arm64_sonoma: "e0da5c979f401e853212ee3318729532f8bcb29b289dc13027aeb91a10f1ccfe" + sha256 cellar: :any, arm64_ventura: "0430a197a189b0173c8a291595f5603a5732a465219113ae7600da3e704ecf78" + sha256 cellar: :any, sonoma: "945bcc0d98610c8f333c8d67bbe38efe6f784fd072ea1912ae62767d3090b4b8" + sha256 cellar: :any, ventura: "59158e254001660ae93cf61f6afb569cc5742617e590e9c8ce337c597d4caa28" + sha256 cellar: :any_skip_relocation, arm64_linux: "d20ad4dc92919fa54f2e701092701a525d410538cc736a6c4ac43aff7c46d211" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0cba5cbe25680d7bf7d4dbfdbcc7c730981aefef2104d8b4de2846d566094f33" + end + + depends_on "openjdk" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "ampl-asl" + depends_on "gcc" # for gfortran + depends_on "openblas" + + resource "mumps" do + # follow links provided in official repo: https://github.com/coin-or-tools/ThirdParty-Mumps/blob/stable/3.0/get.Mumps + url "https://coin-or-tools.github.io/ThirdParty-Mumps/MUMPS_5.6.2.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/m/mumps/mumps_5.6.2.orig.tar.gz" + sha256 "13a2c1aff2bd1aa92fe84b7b35d88f43434019963ca09ef7e8c90821a8f1d59a" + + patch do + # MUMPS does not provide a Makefile.inc customized for macOS. + on_macos do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/ab96a8b8e510a8a022808a9be77174179ac79e85/ipopt/mumps-makefile-inc-generic-seq.patch" + sha256 "0c570ee41299073ec2232ad089d8ee10a2010e6dfc9edc28f66912dae6999d75" + end + + on_linux do + url "https://gist.githubusercontent.com/dawidd6/09f831daf608eb6e07cc80286b483030/raw/b5ab689dea5772e9b6a8b6d88676e8d76224c0cc/mumps-homebrew-linux.patch" + sha256 "13125be766a22aec395166bf015973f5e4d82cd3329c87895646f0aefda9e78e" + end + end + end + + resource "test" do + url "https://github.com/coin-or/Ipopt/archive/refs/tags/releases/3.14.17.tar.gz" + sha256 "17ab8e9a6059ab11172c184e5947e7a7dda9fed0764764779c27e5b8e46f3d75" + end + + resource "miniampl" do + url "https://github.com/dpo/miniampl/archive/refs/tags/v1.0.tar.gz" + sha256 "b836dbf1208426f4bd93d6d79d632c6f5619054279ac33453825e036a915c675" + end + + def install + ENV.delete("MPICC") + ENV.delete("MPICXX") + ENV.delete("MPIFC") + + resource("mumps").stage do + cp "Make.inc/Makefile.inc.generic.SEQ", "Makefile.inc" + inreplace "Makefile.inc", "@rpath/", "#{opt_lib}/" if OS.mac? + + # Fix for GCC 10 + inreplace "Makefile.inc", "OPTF = -fPIC", + "OPTF = -fPIC -fallow-argument-mismatch" + + ENV.deparallelize { system "make", "d" } + + (buildpath/"mumps_include").install Dir["include/*.h", "libseq/mpi.h"] + lib.install Dir[ + "lib/#{shared_library("*")}", + "libseq/#{shared_library("*")}", + "PORD/lib/#{shared_library("*")}", + ] + end + + args = [ + "--disable-silent-rules", + "--enable-shared", + "--with-blas=-L#{Formula["openblas"].opt_lib} -lopenblas", + "--with-mumps-cflags=-I#{buildpath}/mumps_include", + "--with-mumps-lflags=-L#{lib} -ldmumps -lmpiseq -lmumps_common -lopenblas -lpord", + "--with-asl-cflags=-I#{Formula["ampl-asl"].opt_include}/asl", + "--with-asl-lflags=-L#{Formula["ampl-asl"].opt_lib} -lasl", + ] + + system "./configure", *args, *std_configure_args + system "make" + + ENV.deparallelize + system "make", "install" + end + + test do + testpath.install resource("test") + pkgconf_flags = shell_output("pkgconf --cflags --libs ipopt").chomp.split + system ENV.cxx, "examples/hs071_cpp/hs071_main.cpp", "examples/hs071_cpp/hs071_nlp.cpp", *pkgconf_flags + system "./a.out" + + resource("miniampl").stage do + system bin/"ipopt", "examples/wb" + end + end +end diff --git a/Formula/i/iproute2.rb b/Formula/i/iproute2.rb new file mode 100644 index 0000000000000..a73b294ced54f --- /dev/null +++ b/Formula/i/iproute2.rb @@ -0,0 +1,50 @@ +class Iproute2 < Formula + desc "Linux routing utilities" + homepage "https://wiki.linuxfoundation.org/networking/iproute2" + url "https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/iproute2-6.14.0.tar.xz" + sha256 "a6d23588150096591c3d00fc27a324a82ee71d7a1a9eea78df5df17ad9b8461f" + license "GPL-2.0-only" + head "https://git.kernel.org/pub/scm/network/iproute2/iproute2.git", branch: "main" + + livecheck do + url "https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/" + regex(/href=.*?iproute2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "e3cf1ba66e83b59f23e34d23fef8830d0182b04b4569634fb82f6de6f934cc05" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19e435ed304dd274e814a3fb09a03d33418faaccbed672101ef5ca81123d487e" + end + + depends_on "bison" => :build + depends_on "flex" => :build + depends_on "pkgconf" => :build + + depends_on "berkeley-db@5" # keep berkeley-db < 6 to avoid AGPL incompatibility + depends_on "elfutils" + depends_on "libbpf" + depends_on "libcap" + depends_on "libmnl" + depends_on "libtirpc" + depends_on :linux + + def install + system "make" + system "make", "install", + "PREFIX=#{prefix}", + "LIBDIR=#{lib}", + "SBINDIR=#{sbin}", + "CONF_USR_DIR=#{etc}/iproute2", + "CONF_ETC_DIR=#{pkgetc}", + "NETNS_RUN_DIR=#{var}/run/netns", + "NETNS_ETC_DIR=#{etc}/netns", + "ARPDDIR=#{var}/lib/arpd", + "KERNEL_INCLUDE=#{include}", + "DBM_INCLUDE=#{include}" + end + + test do + output = shell_output("#{sbin}/ip addr").strip + assert_match "link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00", output + end +end diff --git a/Formula/i/iproute2mac.rb b/Formula/i/iproute2mac.rb new file mode 100644 index 0000000000000..06bd52d755e13 --- /dev/null +++ b/Formula/i/iproute2mac.rb @@ -0,0 +1,33 @@ +class Iproute2mac < Formula + include Language::Python::Shebang + + desc "CLI wrapper for basic network utilities on macOS - ip command" + homepage "https://github.com/brona/iproute2mac" + url "https://github.com/brona/iproute2mac/releases/download/v1.5.4/iproute2mac-1.5.4.tar.gz" + sha256 "9548ed9ead114a3a7095890c51e0e5b1d8ea1dd955692400e19fb97f1b6ad015" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "231085d2b1c81ef0406d5f32239fe6edfb4f92e52ab0f3a4065221e318b2babc" + end + + depends_on :macos + depends_on "python@3.13" + + def install + libexec.install "src/iproute2mac.py" + libexec.install "src/ip.py" => "ip" + libexec.install "src/bridge.py" => "bridge" + rewrite_shebang detected_python_shebang, libexec/"ip", libexec/"bridge", libexec/"iproute2mac.py" + bin.write_exec_script (libexec/"ip"), (libexec/"bridge") + end + + test do + system "/sbin/ifconfig -v -a 2>/dev/null" + system bin/"ip", "route" + system bin/"ip", "address" + system bin/"ip", "neigh" + system bin/"bridge", "link" + end +end diff --git a/Formula/i/ipsumdump.rb b/Formula/i/ipsumdump.rb new file mode 100644 index 0000000000000..618e21ba841da --- /dev/null +++ b/Formula/i/ipsumdump.rb @@ -0,0 +1,68 @@ +class Ipsumdump < Formula + desc "Summarizes TCP/IP dump files into a self-describing ASCII format" + homepage "https://read.seas.harvard.edu/~kohler/ipsumdump/" + url "https://read.seas.harvard.edu/~kohler/ipsumdump/ipsumdump-1.86.tar.gz" + sha256 "e114cd01b04238b42cd1d0dc6cfb8086a6b0a50672a866f3d0d1888d565e3b9c" + license "MIT" + head "https://github.com/kohler/ipsumdump.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?ipsumdump[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "df39ad78cb2e3dbca54558205978fc4c39ffee8b17f11027f51c62dab42b9da7" + sha256 arm64_sonoma: "009a39b4f09dc2d72956618d85b8981ec8288b7320a4072799b670b72c863680" + sha256 arm64_ventura: "e6643af43d1106c2e50a60b58d80997e52623dcfeab558f26e0045ba16a74ecc" + sha256 arm64_monterey: "1494705fff0bb7937d74557efd7484896a8c87133dad9a4e40ee2ee5b5da67eb" + sha256 arm64_big_sur: "6348649ec33f562a3622f97fb7b253d39ed8b3f919a9aa2af8fa84b8d67d765a" + sha256 sonoma: "ed6f33b6662a53b8f5fa73dbceff2a2ecafdc517dbc986ad6e091cf74201d2c9" + sha256 ventura: "3b5c4c6d9645971bdb31dbaf9e2fa6feae366d34bf2c1d6720af1d8cd77a9062" + sha256 monterey: "421b6575ab2ea358e7dadb1d43f2519efb2e8f8353260c3e2b83e7d4610d3841" + sha256 big_sur: "f3302bce45a3eed980b7c07d05eabc9088a469cd07528c5e1f32a52474b6383a" + sha256 catalina: "bf3d17d0d8bd97b75c44fd7929e348e096f3f1ac6a94ff31e785eb1f685db041" + sha256 mojave: "1ca321c3b11654d07e0f2f6a13e6e36ccc28b550a42515cd495777f15f1e05e9" + sha256 high_sierra: "16c995a9158257d8390cda7223f4d0620b6189c331177336b81f81077ee81620" + sha256 sierra: "96148641aa0430d8b80cb3ebad8994d1911d61cad9557155172490579e210eaf" + sha256 el_capitan: "a98b6116340b9b459f53310c030e99b8022f546c78cda7fcb040ea87c6e2a5f6" + sha256 arm64_linux: "64cca494a61a1849068d908106a059039b47fe6bae0504056995c2af2f43e2fd" + sha256 x86_64_linux: "27e438253bf0b215381e8f27d3898eab9e905181266347997c5f59cfdc46175a" + end + + # add missing definition for SIOCGSTAMP to support linux arm build + 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 + output = shell_output("#{bin}/ipsumdump -c -r #{test_fixtures("test.pcap")}") + assert_match "!host #{Socket.gethostname}", output + assert_match "!data count\n" + ("1\n" * 12), output + end +end + +__END__ +diff --git a/src/fromdevice.cc b/src/fromdevice.cc +index 76e2b12..f59d7bd 100644 +--- a/src/fromdevice.cc ++++ b/src/fromdevice.cc +@@ -28,6 +28,11 @@ + #else + # include + #endif ++ ++#ifndef SIOCGSTAMP ++#define SIOCGSTAMP 0x8906 ++#endif ++ + #if HAVE_NET_BPF_H + # include + # define PCAP_DONT_INCLUDE_PCAP_BPF_H 1 diff --git a/Formula/i/ipsw.rb b/Formula/i/ipsw.rb new file mode 100644 index 0000000000000..1890cc5878624 --- /dev/null +++ b/Formula/i/ipsw.rb @@ -0,0 +1,41 @@ +class Ipsw < Formula + desc "Research tool for iOS & macOS devices" + homepage "https://blacktop.github.io/ipsw" + url "https://github.com/blacktop/ipsw/archive/refs/tags/v3.1.603.tar.gz" + sha256 "7edcc34e1182624ff34ea3bb534dd5b3d2141805a23cf1a9e0b9bcb9d02644a0" + license "MIT" + head "https://github.com/blacktop/ipsw.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "638043508131bdff4e50cf64b026740287c6540402d1dd4026d4be5d4217920e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91cebc30440a26e1778e0c3a526c0812fb365a80ed96fec45fcd3bc742cdfa09" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ac0fc9e3a0308c906233994f4ed3d477c4c088a492e1df3433fc392f568d7043" + sha256 cellar: :any_skip_relocation, sonoma: "e1cb741b139c07ef907ec3dafa9d58a5afd0b0ce724b188856724f654d2becf6" + sha256 cellar: :any_skip_relocation, ventura: "7372c6f00dd779f70d51dd3a92ec3a329e84bdd98d3c65b9ceffa63feb5bc390" + sha256 cellar: :any_skip_relocation, arm64_linux: "04fcc9a17c03a1d81b68ddcc60a62e46a764921adefbe7674b8566b1bb533607" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77d45edc7f8e5b7a277764ecd0110abf99939ff0cd72f0c2427df6feef0b64b6" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion=#{version} + -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildCommit=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/ipsw" + generate_completions_from_executable(bin/"ipsw", "completion") + end + + test do + assert_match version.to_s, shell_output(bin/"ipsw version") + + assert_match "MacFamily20,1", shell_output(bin/"ipsw device-list") + end +end diff --git a/Formula/i/iptables.rb b/Formula/i/iptables.rb new file mode 100644 index 0000000000000..17bf172513101 --- /dev/null +++ b/Formula/i/iptables.rb @@ -0,0 +1,43 @@ +class Iptables < Formula + desc "Linux kernel packet control tool" + homepage "https://www.netfilter.org/projects/iptables/index.html" + url "https://www.netfilter.org/pub/iptables/iptables-1.8.11.tar.xz" + sha256 "d87303d55ef8c92bcad4dd3f978b26d272013642b029425775f5bad1009fe7b2" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.netfilter.org/projects/iptables/downloads.html" + regex(/href=.*?iptables[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_linux: "38c583268c51dbe06d76e48b6146b4caf75bc34726745574e96006e0ec715a64" + sha256 x86_64_linux: "4de49c1ece1a24f6f72d8290a3d1b4f875a94b9a277640f65faf3258e578a6da" + end + + depends_on "linux-headers@5.15" => :build + depends_on "pkgconf" => :build + depends_on "libmnl" + depends_on "libnetfilter_conntrack" + depends_on "libnfnetlink" + depends_on "libnftnl" + depends_on "libpcap" + depends_on :linux + depends_on "nftables" + + def install + ENV.append "CFLAGS", "-I#{Formula["linux-headers@5.15"].opt_include}" + system "./configure", "--disable-silent-rules", + "--enable-bpf-compiler", + "--enable-devel", + "--enable-libipq", + "--enable-shared", + *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "Permission denied (you must be root)", shell_output("#{sbin}/iptables-nft --list-rules 2>&1", 4) + end +end diff --git a/Formula/i/iputils.rb b/Formula/i/iputils.rb new file mode 100644 index 0000000000000..c3713d815199c --- /dev/null +++ b/Formula/i/iputils.rb @@ -0,0 +1,34 @@ +class Iputils < Formula + desc "Set of small useful utilities for Linux networking" + homepage "https://github.com/iputils/iputils" + url "https://github.com/iputils/iputils/archive/refs/tags/20240905.tar.gz" + sha256 "055b4e6e4f298c97fd5848898099e59b4590db63fac3f7ad4fa796354ad44403" + license all_of: ["GPL-2.0-or-later", "BSD-3-Clause"] + head "https://github.com/iputils/iputils.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "9881e8da206fa156f109ae29a816d2927eee1366b5f38e32c22cbcb7987ab14f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e17cf0b22d54026f33a2a0883726815e6a98b31a838e2c644b6c2b219c1b934" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "libxslt" + depends_on :linux + + def install + args = %w[ + -DBUILD_MANS=true + -DUSE_CAP=false + -DSKIP_TESTS=true + ] + + system "meson", "setup", "build", *args, *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}/ping -V") + end +end diff --git a/Formula/i/ipv6calc.rb b/Formula/i/ipv6calc.rb new file mode 100644 index 0000000000000..572028248e98f --- /dev/null +++ b/Formula/i/ipv6calc.rb @@ -0,0 +1,38 @@ +class Ipv6calc < Formula + desc "Small utility for manipulating IPv6 addresses" + homepage "https://www.deepspace6.net/projects/ipv6calc.html" + url "https://github.com/pbiering/ipv6calc/archive/refs/tags/4.3.1.tar.gz" + sha256 "b1c5006edebaad3e2e286d12f70d136bf05658e9e8bda8d67ef7c477322a1a47" + license "GPL-2.0-only" + + # Upstream creates stable version tags (e.g., `v1.2.3`) 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. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c18e41361e9aabcc661d067201a8833b63fbe49e8727008e1ca90ecd482ab71b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "690c2ac907040b2463b56df53423fa41b09d383a4b5019c24fe8797b17e56b2c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fef675752856ebfd976ee1db8411a7368cdbf5c1f009325e8aa1d19b554b327e" + sha256 cellar: :any_skip_relocation, sonoma: "b1cdd07c304ad39d3c522c811d36196e911a5e6fe89c736f1fa5f46795a7c58b" + sha256 cellar: :any_skip_relocation, ventura: "7049e2e4c58bf4a40bf002f74e19e7201fa2ea806cba87eb13934af4849d0873" + sha256 cellar: :any_skip_relocation, arm64_linux: "091b84ae00c4fe6cc017fbd4730e32f2699dceba70491456fba29c6687ccacc1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "654016fe83fb602354bced323d6591b9a5a8ce2d48369b13cb17d32a4ac8305a" + end + + uses_from_macos "perl" + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_equal "192.168.251.97", + shell_output("#{bin}/ipv6calc -q --action conv6to4 --in ipv6 2002:c0a8:fb61::1 --out ipv4").strip + end +end diff --git a/Formula/i/ipv6toolkit.rb b/Formula/i/ipv6toolkit.rb new file mode 100644 index 0000000000000..59f1a98a6b6ec --- /dev/null +++ b/Formula/i/ipv6toolkit.rb @@ -0,0 +1,46 @@ +class Ipv6toolkit < Formula + desc "Security assessment and troubleshooting tool for IPv6" + homepage "https://www.si6networks.com/research/tools/ipv6toolkit/" + url "https://pages.cs.wisc.edu/~plonka/ipv6toolkit/ipv6toolkit-v2.0.tar.gz" + sha256 "16f13d3e7d17940ff53f028ef0090e4aa3a193a224c97728b07ea6e26a19e987" + license "GPL-3.0-or-later" + head "https://github.com/fgont/ipv6toolkit.git", branch: "master" + + livecheck do + url "https://pages.cs.wisc.edu/~plonka/ipv6toolkit/" + regex(/href=.*?ipv6toolkit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "84e046d00d2c97f7aa83e87b5f81264820bf1a2303adc3a8f32b2af23aeac8df" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e4a45d913f12fe71fcbb19db2cee10a04016f3a501b0719be848e6c9840c4449" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a1b2e4c72b667645eecf35a6fd6f5a155833a859d0871f8774d1c507cdac5eb1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "79ca05285bd1af83adba5abc616a2b991fd65c0255466745b0b3a6815d49b0d2" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ee329b82ef00e47b858fe38adc0e0320635c66847c3986dc2e1727fa529173af" + sha256 cellar: :any_skip_relocation, sonoma: "8f4fa847950dc918ff1cfbf7c738b03fe192d9e593fae8bad67b998de91b4f5c" + sha256 cellar: :any_skip_relocation, ventura: "9a075376fd95cbbbce662b52d4cb90a67c1a7970fe53cd48a730b9553e431745" + sha256 cellar: :any_skip_relocation, monterey: "63e06e58b85f10ca935dbfd52860ef330d734ec7c29425aaa8f33a05037c2979" + sha256 cellar: :any_skip_relocation, big_sur: "7ccda456d8eb276a1a462bc06e63167984e5c1a45f58ba453063c5a22b5b31bd" + sha256 cellar: :any_skip_relocation, catalina: "6ab4963d7d80f42fb444fabe02122f0290842cffd620a38e15060ed1c1b120ef" + sha256 cellar: :any_skip_relocation, mojave: "b589fdd1d51db357ecda7452f10ac8daa48266dc4bb52bd6f3b18864e8e8bcbb" + sha256 cellar: :any_skip_relocation, arm64_linux: "c38a0f68b3f06c078555bc39b9bc3a8e57be74769c8c323a250e6e0eb8895ef3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a659a7839c2b43480e498f9fa62a0655ebf3bf3a4c785b1fac682c56d35e788a" + end + + uses_from_macos "libpcap" + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `pcap_filter'; /tmp/cck9bqrJ.o:(.bss+0x238): first defined here + # multiple definition of `errbuf'; /tmp/cck9bqrJ.o:(.bss+0x12e38): first defined here + inreplace "GNUmakefile", "-Wall", "-Wall -fcommon" if OS.linux? + + system "make" + system "make", "install", "DESTDIR=#{prefix}", "PREFIX=", "MANPREFIX=/share" + end + + test do + system bin/"addr6", "-a", "fc00::1" + end +end diff --git a/Formula/i/ipython.rb b/Formula/i/ipython.rb new file mode 100644 index 0000000000000..3a736953c40ab --- /dev/null +++ b/Formula/i/ipython.rb @@ -0,0 +1,105 @@ +class Ipython < Formula + include Language::Python::Virtualenv + + desc "Interactive computing in Python" + homepage "https://ipython.org/" + url "https://files.pythonhosted.org/packages/9d/02/63a84444a7409b3c0acd1de9ffe524660e0e5d82ee473e78b45e5bfb64a4/ipython-9.2.0.tar.gz" + sha256 "62a9373dbc12f28f9feaf4700d052195bf89806279fc8ca11f3f54017d04751b" + license "BSD-3-Clause" + head "https://github.com/ipython/ipython.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e10722230861a5db2ef2b390540c0735d2edaebcfa5beecef6cfc7297b62fcf2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e10722230861a5db2ef2b390540c0735d2edaebcfa5beecef6cfc7297b62fcf2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e10722230861a5db2ef2b390540c0735d2edaebcfa5beecef6cfc7297b62fcf2" + sha256 cellar: :any_skip_relocation, sonoma: "aae30f91cb0b55ee7b634645e3748c6c23c1488100cdd24df6485348ee36c7d2" + sha256 cellar: :any_skip_relocation, ventura: "aae30f91cb0b55ee7b634645e3748c6c23c1488100cdd24df6485348ee36c7d2" + sha256 cellar: :any_skip_relocation, arm64_linux: "e10722230861a5db2ef2b390540c0735d2edaebcfa5beecef6cfc7297b62fcf2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e10722230861a5db2ef2b390540c0735d2edaebcfa5beecef6cfc7297b62fcf2" + end + + depends_on "python@3.13" + + resource "asttokens" do + url "https://files.pythonhosted.org/packages/4a/e7/82da0a03e7ba5141f05cce0d302e6eed121ae055e0456ca228bf693984bc/asttokens-3.0.0.tar.gz" + sha256 "0dcd8baa8d62b0c1d118b399b2ddba3c4aff271d0d7a9e0d4c1681c79035bbc7" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz" + sha256 "65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360" + end + + resource "executing" do + url "https://files.pythonhosted.org/packages/91/50/a9d80c47ff289c611ff12e63f7c5d13942c65d68125160cefd768c73e6e4/executing-2.2.0.tar.gz" + sha256 "5d108c028108fe2551d1a7b2e8b713341e2cb4fc0aa7dcf966fa4327a5226755" + end + + resource "ipython-pygments-lexers" do + url "https://files.pythonhosted.org/packages/ef/4c/5dd1d8af08107f88c7f741ead7a40854b8ac24ddf9ae850afbcf698aa552/ipython_pygments_lexers-1.1.1.tar.gz" + sha256 "09c0138009e56b6854f9535736f4171d855c8c08a563a0dcd8022f78355c7e81" + end + + resource "jedi" do + url "https://files.pythonhosted.org/packages/72/3a/79a912fbd4d8dd6fbb02bf69afd3bb72cf0c729bb3063c6f4498603db17a/jedi-0.19.2.tar.gz" + sha256 "4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0" + end + + resource "matplotlib-inline" do + url "https://files.pythonhosted.org/packages/99/5b/a36a337438a14116b16480db471ad061c36c3694df7c2084a0da7ba538b7/matplotlib_inline-0.1.7.tar.gz" + sha256 "8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90" + end + + resource "parso" do + url "https://files.pythonhosted.org/packages/66/94/68e2e17afaa9169cf6412ab0f28623903be73d1b32e208d9e8e541bb086d/parso-0.8.4.tar.gz" + sha256 "eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d" + end + + resource "pexpect" do + url "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz" + sha256 "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + 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 "ptyprocess" do + url "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz" + sha256 "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + end + + resource "pure-eval" do + url "https://files.pythonhosted.org/packages/cd/05/0a34433a064256a578f1783a10da6df098ceaa4a57bbeaa96a6c0352786b/pure_eval-0.2.3.tar.gz" + sha256 "5f4e983f40564c576c7c8635ae88db5956bb2229d7e9237d03b3c0b0190eaf42" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "stack-data" do + url "https://files.pythonhosted.org/packages/28/e3/55dcc2cfbc3ca9c29519eb6884dd1415ecb53b0e934862d3559ddcb7e20b/stack_data-0.6.3.tar.gz" + sha256 "836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9" + end + + resource "traitlets" do + url "https://files.pythonhosted.org/packages/eb/79/72064e6a701c2183016abbbfedaba506d81e30e232a68c9f0d6f6fcd1574/traitlets-5.14.3.tar.gz" + sha256 "9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_equal "4", shell_output("#{bin}/ipython -c 'print(2+2)'").chomp + end +end diff --git a/Formula/i/ircd-hybrid.rb b/Formula/i/ircd-hybrid.rb new file mode 100644 index 0000000000000..de5287be60b7e --- /dev/null +++ b/Formula/i/ircd-hybrid.rb @@ -0,0 +1,62 @@ +class IrcdHybrid < Formula + desc "High-performance secure IRC server" + homepage "https://www.ircd-hybrid.org/" + url "https://downloads.sourceforge.net/project/ircd-hybrid/ircd-hybrid/ircd-hybrid-8.2.47/ircd-hybrid-8.2.47.tgz" + sha256 "d5f253f6dd1a93e7183323f410b7e2269ba4392d3d00a0e7dc6248f6f9864ffe" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/ircd-hybrid[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_sequoia: "c61a232e6b16f0e0df0382399bdaa612ccd755e20611e356b6687745e64da69c" + sha256 arm64_sonoma: "602e3329ab2c61db98749f3e4ad0237db35542c7284034e0dc36ff3606c9544c" + sha256 arm64_ventura: "143e5f32b944813a8d5891665000739043e1e537a1d0c6a9b8e28b3c63893f4c" + sha256 sonoma: "bc9a3ce5fe871c70917f827f5a56631e71b4852609e9372f8eedb493752a8de2" + sha256 ventura: "c1a7944fb9568fdec12b8daabad9d75d50844f9e4e535ce8bd8dfe8347e1b28a" + sha256 arm64_linux: "f4b2f1f47eea9e04695a498e5031229a828305107530b8811422d772542b9cd3" + sha256 x86_64_linux: "5026f20ed6cb34c59dddb2e7df8f9388cb9e148c55d8c4d7fba9668ea140bb11" + end + + depends_on "jansson" + depends_on "openssl@3" + + uses_from_macos "libxcrypt" + + conflicts_with "expect", because: "both install an `mkpasswd` binary" + conflicts_with "ircd-irc2", because: "both install an `ircd` binary" + + # ircd-hybrid needs the .la files + skip_clean :la + + def install + ENV.deparallelize # build system trips over itself + + system "./configure", "--localstatedir=#{var}", + "--sysconfdir=#{etc}", + "--with-tls=openssl", + *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + etc.install "doc/reference.modules.conf" => "ircd.conf" + end + + def caveats + <<~EOS + You'll more than likely need to edit the default settings in the config file: + #{etc}/ircd.conf + EOS + end + + service do + run opt_bin/"ircd" + keep_alive false + working_dir HOMEBREW_PREFIX + error_log_path var/"ircd.log" + end + + test do + system bin/"ircd", "-version" + end +end diff --git a/Formula/i/ircd-irc2.rb b/Formula/i/ircd-irc2.rb new file mode 100644 index 0000000000000..7579b490a7941 --- /dev/null +++ b/Formula/i/ircd-irc2.rb @@ -0,0 +1,162 @@ +class IrcdIrc2 < Formula + desc "Original IRC server daemon" + homepage "https://web.archive.org/web/20240814044559/http://www.irc.org/" + url "https://web.archive.org/web/20240805183402/http://www.irc.org/ftp/irc/server/irc2.11.2p3.tgz" + version "2.11.2p3" + sha256 "be94051845f9be7da0e558699c4af7963af7e647745d339351985a697eca2c81" + # The `:cannot_represent` is for a Digital Equipment Corporation license. + # TODO: See if SPDX will consider this a match for HPND License. + license all_of: [ + "GPL-1.0-or-later", + "GPL-2.0-or-later", # ircd/fileio.*, ircd/patricia.c + "ISC", # ircd/res_comp.c + "BSD-4-Clause-UC", # ircd/{res_comp.c,res_init.c,res_mkquery.c,resolv_def.h} + :cannot_represent, # ircd/{res_comp.c,res_init.c,res_mkquery.c,resolv_def.h} + ] + + bottle do + rebuild 2 + sha256 arm64_sequoia: "11a1e704e3078514219037593b14351817074e38045f95a056d048ced644fed1" + sha256 arm64_sonoma: "c45a5b7682ca7ac5d07f883a2aa981c835ef3ecf2b25602099eb8c27331e4398" + sha256 arm64_ventura: "692fa84b509e25774b65bd12c281990093c6f6563447d2a62ca6e1f13f04ea69" + sha256 arm64_monterey: "bd6adad56faafcb7ac533e5bb8668e689b8017a6b0ad336715d02b00b824b882" + sha256 sonoma: "f5fcb1c6dea38be635adcc3bb4a6b32d8034d4c02ee5ea1034a66e6b64059cbd" + sha256 ventura: "fcde6372721ec2700d587fd077cb410df0afdc5100d8181576a5f905728e7ed9" + sha256 monterey: "90c0639ec3e7ab17eaa97b90af15b30b14896d23f7f3c492b88a3190555781ff" + sha256 arm64_linux: "6dab067580b38df4623c5256bb04d641f108ec8997491b483e91b58df06e9257" + sha256 x86_64_linux: "524aef733a367cce6eb115c4453ec851ffe7ac7d731c3d5ce91195be201bddb1" + end + + def default_ircd_conf + <<~EOS + # M-Line + M:irc.localhost::Darwin ircd default configuration::000A + + # A-Line + A:This is Darwin's default ircd configurations:Please edit your /usr/local/etc/ircd.conf file:Contact for questions::ExampleNet + + # Y-Lines + Y:1:90::100:512000:5.5:100.100 + Y:2:90::300:512000:5.5:250.250 + + # I-Line + I:*:::0:1 + I:127.0.0.1/32:::0:1 + + # P-Line + P::::6667: + EOS + end + + # Last release on 2010-08-13 and site is down + deprecate! date: "2025-04-06", because: :unmaintained + + uses_from_macos "libxcrypt" + + on_linux do + on_arm do + # Added automake as a build dependency to update config files for ARM support. + depends_on "automake" => :build + end + end + + conflicts_with "ircd-hybrid", because: "both install `ircd` binaries" + + # Replace usage of nameser_def.h which has incompatible IBM license. + # Ref: https://gitlab.com/fedora/legal/fedora-license-data/-/issues/53 + patch :DATA + + def install + # Remove header with incompatible IBM license and add linker flags to use system library instead + rm("ircd/nameser_def.h") + ENV.append "LIBS", "-lresolv" + + if OS.linux? && 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, "support/#{fn}" + end + end + + system "./configure", "--prefix=#{prefix}", + "--localstatedir=#{var}", + "--sysconfdir=#{etc}", + "--mandir=#{man}", + "CFLAGS=-DRLIMIT_FDMAX=0" + + build_dir = `./support/config.guess`.chomp + + # Disable netsplit detection. In a netsplit, joins to new channels do not + # give chanop status. + inreplace "#{build_dir}/config.h", /#define DEFAULT_SPLIT_USERS\s+65000/, + "#define DEFAULT_SPLIT_USERS 0" + inreplace "#{build_dir}/config.h", /#define DEFAULT_SPLIT_SERVERS\s+80/, + "#define DEFAULT_SPLIT_SERVERS 0" + + # The directory is something like `i686-apple-darwin13.0.2' + system "make", "install", "-C", build_dir + + (buildpath/"ircd.conf").write default_ircd_conf + etc.install "ircd.conf" + end + + service do + run [opt_sbin/"ircd", "-t"] + keep_alive false + working_dir HOMEBREW_PREFIX + error_log_path var/"ircd.log" + end + + test do + system "#{sbin}/ircd", "-version" + end +end + +__END__ +diff --git a/ircd/res_comp.c b/ircd/res_comp.c +index b58d06c..a0ff2b9 100644 +--- a/ircd/res_comp.c ++++ b/ircd/res_comp.c +@@ -64,6 +64,7 @@ static const volatile char rcsid[] = "$Id: res_comp.c,v 1.10 2004/10/01 20:22:14 + #include "s_externs.h" + #undef RES_COMP_C + ++#if 0 + static int ns_name_ntop (const u_char *, char *, size_t); + static int ns_name_pton (const char *, u_char *, size_t); + static int ns_name_unpack (const u_char *, const u_char *, +@@ -75,6 +76,7 @@ static int ns_name_uncompress (const u_char *, const u_char *, + static int ns_name_compress (const char *, u_char *, size_t, + const u_char **, const u_char **); + static int ns_name_skip (const u_char **, const u_char *); ++#endif + + /* + * Expand compressed domain name 'comp_dn' to full domain name. +@@ -306,6 +308,7 @@ static int dn_find (const u_char *, const u_char *, + + /* Public. */ + ++#if 0 + /* + * ns_name_ntop(src, dst, dstsiz) + * Convert an encoded domain name to printable ascii as per RFC1035. +@@ -749,6 +752,7 @@ static int ns_name_skip(const u_char **ptrptr, const u_char *eom) + *ptrptr = cp; + return (0); + } ++#endif + + /* Private. */ + +diff --git a/ircd/s_defines.h b/ircd/s_defines.h +index aaaf0d4..acd1378 100644 +--- a/ircd/s_defines.h ++++ b/ircd/s_defines.h +@@ -37,4 +37,5 @@ + #include "service_def.h" + #include "sys_def.h" + #include "resolv_def.h" +-#include "nameser_def.h" ++#define BIND_8_COMPAT ++#include diff --git a/Formula/i/ircii.rb b/Formula/i/ircii.rb new file mode 100644 index 0000000000000..264c761fe23cf --- /dev/null +++ b/Formula/i/ircii.rb @@ -0,0 +1,53 @@ +class Ircii < Formula + desc "IRC and ICB client" + homepage "http://www.eterna23.net/ircii/" + url "https://ircii.warped.com/ircii-20240918.tar.bz2" + mirror "https://deb.debian.org/debian/pool/main/i/ircii/ircii_20240918.orig.tar.bz2" + sha256 "f4b9b380ba5143261a3ef219abfdef749c44ce4f669908da60bc3997af649ca9" + license all_of: [ + "BSD-3-Clause", + "BSD-2-Clause", + "GPL-2.0-or-later", + "MIT", + :public_domain, + ] + + livecheck do + url "https://ircii.warped.com/" + regex(/href=.*?ircii[._-]v?(\d{6,8})\.t/i) + end + + bottle do + sha256 arm64_sequoia: "8e8fe508af0773e346c196d3ded29a2529e736ae175942b407321556e7ee3d85" + sha256 arm64_sonoma: "250efa55d481e553454206dd459b55e825a16f93003e4e96ccb26c9b132c3568" + sha256 arm64_ventura: "9bba80a660397068c42e2f12d7940ced34bdb253451435ee8f51b6993230bda5" + sha256 sonoma: "e9db1fd59f8b31c281a121f1821628780a85e990042cfb8c4ac674ee1b50433b" + sha256 ventura: "b3cfde024333fbc46af44fcf09500d7a27369a12eac24f604ba404aca862ca18" + sha256 arm64_linux: "c2c74e2ba79a6f4ef96605a4868673c34afb722f71118f6a489bf4c6041df158" + sha256 x86_64_linux: "7680b15d1879970be38ec1c55f3e2c99a0381c0cddddf43fd4c66e567340427a" + end + + depends_on "openssl@3" + + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + + def install + ENV.append "LIBS", "-liconv" if OS.mac? + system "./configure", "--prefix=#{prefix}", + "--with-default-server=irc.libera.chat", + "--enable-ipv6" + system "make" + ENV.deparallelize + system "make", "install" + end + + test do + IO.popen("#{bin}/irc -d", "r+") do |pipe| + assert_match "Connecting to port 6667 of server irc.libera.chat", pipe.gets + pipe.puts "/quit" + pipe.close_write + pipe.close + end + end +end diff --git a/Formula/i/ired.rb b/Formula/i/ired.rb new file mode 100644 index 0000000000000..1a2dc6dcf9e00 --- /dev/null +++ b/Formula/i/ired.rb @@ -0,0 +1,43 @@ +class Ired < Formula + desc "Minimalistic hexadecimal editor designed to be used in scripts" + homepage "https://github.com/radare/ired" + url "https://github.com/radare/ired/archive/refs/tags/0.6.tar.gz" + sha256 "c15d37b96b1a25c44435d824bd7ef1f9aea9dc191be14c78b689d3156312d58a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "05e4599eb5ff1fd43a3865f5b14dc52db0eae92d3972fd83baa67bc1ad2b20fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c0ca5910c721240b35e486d26d4f4fac34e55014fb3ecb92c41c89bb89c830f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2b152332ff671a52b4025c50746e88f84d91794e2fe433a9fddaddd10382b0cc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "beaab59e24217daae0d860b303cbd4d75649509805cf1dff0d38de222d2e66ec" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8c5fc028d62ce70b95c2f4ae6e9ec78c88b1083d7244263e5cae2734f9f1f682" + sha256 cellar: :any_skip_relocation, sonoma: "def04b2a2b062bf95cd2900bb549bed22fdea5075dee1c99e974a5b0d660bdac" + sha256 cellar: :any_skip_relocation, ventura: "b4ebac315972d619eb8034bd5b486a6e4e8c46e9bc7ca4aff78a5e7a19c62af4" + sha256 cellar: :any_skip_relocation, monterey: "6f988d4fafb5fc0070801f09feb033b469a8c4463a87ff3abb2e6b081b4c1a62" + sha256 cellar: :any_skip_relocation, big_sur: "383839a113477cfad0b9197aa5e1e5c07ca5248057da840617354552ea35e6dc" + sha256 cellar: :any_skip_relocation, catalina: "e74475e811c38aa46bf3e7e69e0a264a2d30c08cfcbd801433e03c14944b8366" + sha256 cellar: :any_skip_relocation, mojave: "7821d818af4c7d28b4cbf26c627685b77f18a1004369d4a57bee2582620008b7" + sha256 cellar: :any_skip_relocation, high_sierra: "f6af714455a74c02769c9726855a92832e43c37c79a0c589a0c7744beac8956c" + sha256 cellar: :any_skip_relocation, sierra: "5d10dfac87e4a4ca589a9fa76e8f9aff62625ef6358b6ab29360e79fe4a6dc35" + sha256 cellar: :any_skip_relocation, el_capitan: "4fc558225913b629b144661385841e63ebb167beb9900475fadb0c0e886b4997" + sha256 cellar: :any_skip_relocation, arm64_linux: "611fb6eb2d5001ab972a13ec8dffcd4c80cb10f2429989d394c4f13c7f827695" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3ddb4735af8b485b31fb3c9b2b8cc87c0aadfd1c3a2ae43df84bee8d5f16701" + end + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + input = <<~EOS + w"hello wurld" + s+7 + r-4 + w"orld" + q + EOS + pipe_output("#{bin}/ired test.text", input) + assert_equal "hello world", (testpath/"test.text").read.chomp + end +end diff --git a/Formula/i/iredis.rb b/Formula/i/iredis.rb new file mode 100644 index 0000000000000..f68a4a85702ba --- /dev/null +++ b/Formula/i/iredis.rb @@ -0,0 +1,78 @@ +class Iredis < Formula + include Language::Python::Virtualenv + + desc "Terminal Client for Redis with AutoCompletion and Syntax Highlighting" + homepage "https://iredis.xbin.io/" + url "https://files.pythonhosted.org/packages/da/87/8b70adbbc97b71bf96d859fcc81344033a718b4df636c738091b42eb23ae/iredis-1.15.1.tar.gz" + sha256 "b702e64ea665aa8472bcda0a388c1c555584014db00ad2cea318090d9a5ff818" + license "BSD-3-Clause" + head "https://github.com/laixintao/iredis.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8d794b2cd077052710ce7e016c3d75b8a16b2b8b03be5b7a9ce2e003c6693ab9" + end + + depends_on "python@3.13" + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "mistune" do + url "https://files.pythonhosted.org/packages/c4/79/bda47f7dd7c3c55770478d6d02c9960c430b0cf1773b72366ff89126ea31/mistune-3.1.3.tar.gz" + sha256 "a7035c21782b2becb6be62f8f25d3df81ccb4d6fa477a6525b15af06539f02a0" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz" + sha256 "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5" + 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 "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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 "redis" do + url "https://files.pythonhosted.org/packages/47/da/d283a37303a995cd36f8b92db85135153dc4f7a8e4441aa827721b442cfb/redis-5.2.1.tar.gz" + sha256 "16f2e22dff21d5125e8481515e386711a34cbec50f0e44413dd7d9c060a54e0f" + 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/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" + sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"iredis", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + port = free_port + output = shell_output("#{bin}/iredis -p #{port} info 2>&1", 1) + assert_match "Connection refused", output + end +end diff --git a/Formula/i/irrlicht.rb b/Formula/i/irrlicht.rb new file mode 100644 index 0000000000000..a00bf145003eb --- /dev/null +++ b/Formula/i/irrlicht.rb @@ -0,0 +1,125 @@ +class Irrlicht < Formula + desc "Realtime 3D engine" + homepage "https://irrlicht.sourceforge.io/" + url "https://downloads.sourceforge.net/project/irrlicht/Irrlicht%20SDK/1.8/1.8.5/irrlicht-1.8.5.zip" + sha256 "effb7beed3985099ce2315a959c639b4973aac8210f61e354475a84105944f3d" + # Irrlicht is available under alternative license terms. See + # https://metadata.ftp-master.debian.org/changelogs//main/i/irrlicht/irrlicht_1.8.4+dfsg1-1.1_copyright + license "Zlib" + revision 1 + head "https://svn.code.sf.net/p/irrlicht/code/trunk" + + livecheck do + url :stable + regex(%r{url=.*?/irrlicht[._-]v?(\d+(?:\.\d+)+)\.(?:t|zip)}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "045c5bc182a699319caede3eda01d1e51487e2bb176ed6609af6f045a3674068" + sha256 cellar: :any, arm64_sonoma: "52d4ef47d187ba97e3d75832e69650fe4c042019e379b9937c27f6e4864e4927" + sha256 cellar: :any, arm64_ventura: "d50090b7519be5ae7851a96f142261e094e1ae2bf0da926d2ba4f7f8d334a462" + sha256 cellar: :any, arm64_monterey: "1f80ce9c03a5ebf3220c5d89bf6b99fb710cde5fccacd9d5a6002102a70260d7" + sha256 cellar: :any, arm64_big_sur: "8c6b7ab06bdcc19d8860114516f77fd58c5afd8b9f5574ed59adb6d9140105aa" + sha256 cellar: :any, sonoma: "d765836b6a9a4fcfd74a89b04c37a8a49ee15c5983921a0f2b3a19ae54df32cd" + sha256 cellar: :any, ventura: "4a7427d5a530d10fec547a9ff26aa1a460288a10778db1e4a257650b44359a67" + sha256 cellar: :any, monterey: "7bd3837250e6ad688a177a8d3cbbab368967e0bd8f55e4971ba8d9700205d78b" + sha256 cellar: :any, big_sur: "ef94ddaa3dcb668253d03433c09d68806b4437c38c6abfeb6616d30849a18540" + sha256 cellar: :any, catalina: "9b97a72a9d6a454c512b8d5c395bbc4229e271ae6ec3feecc422bbdeb70a7955" + sha256 cellar: :any_skip_relocation, arm64_linux: "c164215a58f0194152ec5bc6aaa4b0752fb9208df441cef0a4bba5dac52ae8c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "972f4d1016a83b88a7c9162695b8f1bce97c0a707f3fd8db11bdb527f7a0637a" + end + + depends_on xcode: :build + + depends_on "jpeg-turbo" + depends_on "libpng" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "libx11" + depends_on "libxxf86vm" + depends_on "mesa" + end + + # Use libraries from Homebrew or macOS + patch do + url "https://github.com/Homebrew/formula-patches/raw/69ad57d16cdd4ecdf2dfa50e9ce751b082d78cf9/irrlicht/use-system-libs.patch" + sha256 "70d2534506e0e34279c3e9d8eff4b72052cb2e78a63d13ce0bc60999cbdb411b" + end + + # Update Xcode project to use libraries from Homebrew and macOS + patch do + url "https://github.com/Homebrew/formula-patches/raw/69ad57d16cdd4ecdf2dfa50e9ce751b082d78cf9/irrlicht/xcode.patch" + sha256 "2cfcc34236469fcdb24b6a77489272dfa0a159c98f63513781245f3ef5c941c0" + end + + def install + %w[bzip2 jpeglib libpng zlib].each { |l| rm_r(buildpath/"source/Irrlicht"/l) } + + if OS.mac? + inreplace "source/Irrlicht/MacOSX/MacOSX.xcodeproj/project.pbxproj" do |s| + s.gsub! "@LIBPNG_PREFIX@", Formula["libpng"].opt_prefix + s.gsub! "@JPEG_PREFIX@", Formula["jpeg-turbo"].opt_prefix + end + + extra_args = [] + + # Fix "Undefined symbols for architecture arm64: "_png_init_filter_functions_neon" + # Reported 18 Nov 2020 https://sourceforge.net/p/irrlicht/bugs/452/ + extra_args << "GCC_PREPROCESSOR_DEFINITIONS='PNG_ARM_NEON_OPT=0'" if Hardware::CPU.arm? + + xcodebuild "-project", "source/Irrlicht/MacOSX/MacOSX.xcodeproj", + "-configuration", "Release", + "-target", "IrrFramework", + "SYMROOT=build", + *extra_args + + xcodebuild "-project", "source/Irrlicht/MacOSX/MacOSX.xcodeproj", + "-configuration", "Release", + "-target", "libIrrlicht.a", + "SYMROOT=build", + *extra_args + + frameworks.install "source/Irrlicht/MacOSX/build/Release/IrrFramework.framework" + lib.install_symlink frameworks/"IrrFramework.framework/Versions/A/IrrFramework" => "libIrrlicht.dylib" + lib.install "source/Irrlicht/MacOSX/build/Release/libIrrlicht.a" + include.install "include" => "irrlicht" + else + cd "source/Irrlicht" do + inreplace "Makefile" do |s| + s.gsub! "/usr/X11R6/lib$(LIBSELECT)", Formula["libx11"].opt_lib + s.gsub! "/usr/X11R6/include", Formula["libx11"].opt_include + end + ENV.append "LDFLAGS", "-L#{Formula["bzip2"].opt_lib} -lbz2" + ENV.append "LDFLAGS", "-L#{Formula["jpeg-turbo"].opt_lib} -ljpeg" + ENV.append "LDFLAGS", "-L#{Formula["libpng"].opt_lib} -lpng" + ENV.append "LDFLAGS", "-L#{Formula["zlib"].opt_lib} -lz" + ENV.append "LDFLAGS", "-L#{Formula["mesa"].opt_lib}" + ENV.append "LDFLAGS", "-L#{Formula["libxxf86vm"].opt_lib}" + ENV.append "CXXFLAGS", "-I#{Formula["libxxf86vm"].opt_include}" + args = %w[ + NDEBUG=1 + BZIP2OBJ= + JPEGLIBOBJ= + LIBPNGOBJ= + ZLIBOBJ= + ] + system "make", "sharedlib", *args + system "make", "install", "INSTALL_DIR=#{lib}" + system "make", "clean" + system "make", "staticlib", *args + end + lib.install "lib/Linux/libIrrlicht.a" + end + + (pkgshare/"examples").install "examples/01.HelloWorld" + end + + test do + assert_match Hardware::CPU.arch.to_s, shell_output("lipo -info #{lib}/libIrrlicht.a") if OS.mac? + cp_r Dir["#{pkgshare}/examples/01.HelloWorld/*"], testpath + system ENV.cxx, "main.cpp", "-I#{include}/irrlicht", "-L#{lib}", "-lIrrlicht", "-o", "hello" + end +end diff --git a/Formula/i/irrtoolset.rb b/Formula/i/irrtoolset.rb new file mode 100644 index 0000000000000..5815967a247a0 --- /dev/null +++ b/Formula/i/irrtoolset.rb @@ -0,0 +1,53 @@ +class Irrtoolset < Formula + desc "Tools to work with Internet routing policies" + homepage "https://github.com/irrtoolset/irrtoolset" + url "https://github.com/irrtoolset/irrtoolset/archive/refs/tags/release-5.1.3.tar.gz" + sha256 "a3eff14c2574f21be5b83302549d1582e509222d05f7dd8e5b68032ff6f5874a" + license all_of: ["MIT", "HPND", "GPL-2.0-or-later", "LGPL-2.0-or-later"] + head "https://github.com/irrtoolset/irrtoolset.git", branch: "master" + + livecheck do + url :stable + regex(/v?(\d+(?:[._-]\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c8f841c2b1f1181dfd110bb27a4d374ff43d204bda34a871aa260bd8c67c7e43" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "89d7ae76431629fd7703e8295dae62fbaae4ef6adba8b261e14d92ff409fc450" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5834b05bb5b3280a60032cca1d759d1ffd7f513118fdabe5e9ded8c7d08252de" + sha256 cellar: :any_skip_relocation, arm64_monterey: "435c4b7b2a17d32046afab709f58dad5ce6b4372a064223eb9b695e939df097c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "545814a389476ca20bd0419777b6d82a17a47e0e695d5bbac3ffcb8406c50c47" + sha256 cellar: :any_skip_relocation, sonoma: "75c7f0f0b7f2c2173740961a9bb2cce8b77456bbcce1343672169ad392c929a3" + sha256 cellar: :any_skip_relocation, ventura: "11e52bef1dfd00a4986b2569907a6cd813f48805273de424006bd54d939d6b38" + sha256 cellar: :any_skip_relocation, monterey: "0a1e66582bd543ecde2c8429c3cfbe9254fc9e55056ffc519d56a89f7b1b22e1" + sha256 cellar: :any_skip_relocation, big_sur: "632c6b4036c71036b6b4038816dd20a3f791e9d06aab981f01429fc07bb4d3a3" + sha256 cellar: :any_skip_relocation, catalina: "958df309df54264b13dba2185761e5d4ce1397e3c6b079dbd9396e054d02d306" + sha256 cellar: :any_skip_relocation, mojave: "fd790b230ed1c3559d79c5e86080a6c5163d71817c13980a3abc904e15535d98" + sha256 cellar: :any_skip_relocation, high_sierra: "250f93336659350a65426d86c28053763f530b56ae9513b44f086196a91a59c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "764470b02f51abbb9c5a21cb574bb11b226213478829953fd5d115b45e6e1f46" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b03e7fcf28c8481e33209b35b08bac6d1293240ea1f7d71714c3bce19ee98b88" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "bison" => :build # Uses newer syntax than system Bison supports + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + uses_from_macos "flex" => :build + + on_linux do + depends_on "readline" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"peval", "ANY" + end +end diff --git a/Formula/i/irssi.rb b/Formula/i/irssi.rb new file mode 100644 index 0000000000000..faf4404888f7e --- /dev/null +++ b/Formula/i/irssi.rb @@ -0,0 +1,67 @@ +class Irssi < Formula + desc "Modular IRC client" + homepage "https://irssi.org/" + url "https://github.com/irssi/irssi/releases/download/1.4.5/irssi-1.4.5.tar.xz" + sha256 "72a951cb0ad622785a8962801f005a3a412736c7e7e3ce152f176287c52fe062" + license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } + revision 1 + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "9f640f1d64cf5331669a1f872ef3f797d4c4360015bba172c9b2ce4c48412453" + sha256 arm64_sonoma: "ca992d7b5d2a8af9a75712670cacccf4910fa7c706e39169037a1c957ca314f1" + sha256 arm64_ventura: "618eb4e0270a79ba93e8a11a190c9650cbf274fb25b029b57c306c236ec68d07" + sha256 sonoma: "24ab2a3d9546159460cb4248a74a0548cc63799ca80ab588f52a04a159c19282" + sha256 ventura: "f35187d68cac2f55f1208c5ca2a362676e55fff197bea91e1a3720dd9e590f52" + sha256 arm64_linux: "41225f150571644cb4b871859ff86b56eac1188ba6c6694a03c3800c22e7842c" + sha256 x86_64_linux: "4af07634acbc8972700abb9dd307360a506032ab34eaf389fbb55780f4cd9781" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "openssl@3" + + uses_from_macos "ncurses" + uses_from_macos "perl" + + on_macos do + depends_on "gettext" + end + + def install + args = %W[ + --sysconfdir=#{etc} + --with-proxy + --enable-true-color + --with-socks=no + --with-perl=yes + --with-perl-lib=#{lib}/perl5/site_perl + ] + + system "./configure", *args, *std_configure_args.reject { |s| s["--disable-debug"] } + # "make" and "make install" must be done separately on some systems + system "make" + system "make", "install" + end + + test do + require "pty" + + assert_match version.to_s, shell_output("#{bin}/irssi --version") + + stdout, = PTY.spawn("#{bin}/irssi -c irc.freenode.net -n testbrew") + assert_match "Terminal doesn't support cursor movement", stdout.readline + + # This is not how you'd use Perl with Irssi but it is enough to be + # sure the Perl element didn't fail to compile, which is needed + # because upstream treats Perl build failures as non-fatal. + # To debug a Perl problem copy the following test at the end of the install + # block to surface the relevant information from the build warnings. + ENV["PERL5LIB"] = lib/"perl5/site_perl" + system "perl", "-e", "use Irssi" + end +end diff --git a/Formula/i/is-fast.rb b/Formula/i/is-fast.rb new file mode 100644 index 0000000000000..177f8a3880c60 --- /dev/null +++ b/Formula/i/is-fast.rb @@ -0,0 +1,40 @@ +class IsFast < Formula + desc "Check the internet as fast as possible" + homepage "https://github.com/Magic-JD/is-fast" + url "https://github.com/Magic-JD/is-fast/archive/refs/tags/v0.16.2.tar.gz" + sha256 "d818a8c20cc5591c0966e2d59c9f239c8a347dcef9f0f1804b64c15147130f1e" + license "MIT" + head "https://github.com/Magic-JD/is-fast.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "546640c60d2ecc1b9a38b859facde882132063d0e3d7e27849b5d2c963a6f45a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b018bd65bbaee7fc9f0feb423a71189b4f0eb5fd469f29094ad895bb21ac2f1d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cbfb84141997ab8ceccdc21ee03da9feb31be4b6360e46478d0d817875b54aed" + sha256 cellar: :any_skip_relocation, sonoma: "3513a63834eabe0c5c2441974696e1c7410f556f2f85f016b4fb5b8d2777d4d0" + sha256 cellar: :any_skip_relocation, ventura: "c6aa6b01e98161bd8ec209720ff506371fc40afccf74fb12abb17634b178acbc" + sha256 cellar: :any_skip_relocation, arm64_linux: "d3a8c518fe12675850de53d18ec89c3172e6ee08c11c0a46a70e3e3a8c8861d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e3421b677773813f2138f524911883aec2604f0a56c7abfc75e9f1bc0b9be049" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "is-fast #{version}", shell_output("#{bin}/is-fast --version") + + (testpath/"test.html").write <<~HTML + + + Test HTML page + +

Hello Homebrew!

+ + + HTML + + assert_match "Hello Homebrew!", shell_output("#{bin}/is-fast --piped --file #{testpath}/test.html") + end +end diff --git a/Formula/i/isa-l.rb b/Formula/i/isa-l.rb new file mode 100644 index 0000000000000..45b8208e4bae8 --- /dev/null +++ b/Formula/i/isa-l.rb @@ -0,0 +1,38 @@ +class IsaL < Formula + desc "Intelligent Storage Acceleration Library" + homepage "https://github.com/intel/isa-l" + url "https://github.com/intel/isa-l/archive/refs/tags/v2.31.1.tar.gz" + sha256 "e1d5573a4019738243b568ab1e1422e6ab7557c5cae33cc8686944d327ad6bb4" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "6715b874f4070412fd9fde672ac8d3afeabcedd94e585a2ee16a5e20823a3dc5" + sha256 cellar: :any, arm64_sonoma: "cdde71e94bd415fff6acacfe9d8dcd064b956d639192ffae847743e46cee219f" + sha256 cellar: :any, arm64_ventura: "ee7744d14e7835a1473f1c411e14648b56d3aa1af4d699357c1275c555a689d0" + sha256 cellar: :any, sonoma: "5a50a8e10d340dad15b350e8cfee247d36d305293aadb78802dfed9a9662f436" + sha256 cellar: :any, ventura: "02e1310ed918a703cc9d85e0cc6d4e17eee42fa64c640b82eecb68cfa837ee44" + sha256 cellar: :any_skip_relocation, arm64_linux: "721ad28e5067ae0ded3a409859243bcbea8fa14b7bafc858424c177b4d6134e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6cc323c0888ad23cc884dbcd260f08706daf6ac31d765554adce4bd35fa3824" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "nasm" => :build + + def install + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + pkgshare.install "examples" + end + + test do + cp pkgshare/"examples/ec/ec_simple_example.c", testpath + inreplace "ec_simple_example.c", "erasure_code.h", "isa-l.h" + system ENV.cc, "ec_simple_example.c", "-L#{lib}", "-lisal", "-o", "test" + assert_match "Pass", shell_output("./test") + end +end diff --git a/Formula/i/isc-dhcp.rb b/Formula/i/isc-dhcp.rb new file mode 100644 index 0000000000000..49ff967c236ad --- /dev/null +++ b/Formula/i/isc-dhcp.rb @@ -0,0 +1,132 @@ +class IscDhcp < Formula + desc "Production-grade DHCP solution" + homepage "https://www.isc.org/dhcp" + url "https://ftp.isc.org/isc/dhcp/4.4.3-P1/dhcp-4.4.3-P1.tar.gz" + sha256 "0ac416bb55997ca8632174fd10737fd61cdb8dba2752160a335775bc21dc73c7" + license "MPL-2.0" + + bottle do + sha256 arm64_sequoia: "d2757d9ace5037a47edaa968d947b51afbfe271b79e5655700167ff8985d6031" + sha256 arm64_sonoma: "620dbe4f0f6b3905627c1d41c597f2436ead691362ba8ebc8d435efa3ed0284e" + sha256 arm64_ventura: "ca26d2145b3c8040d94c1ee2b8065d1facdf47f00e4d26e93d8a15a9bab3b209" + sha256 arm64_monterey: "53454eb5ae86cb4fe52825f7bcfec568ed205ee417d21526fa42d1c5b90141dd" + sha256 arm64_big_sur: "11182828a03788759a737535d2db69aa96d12df98889e62c4b8147f709b00a92" + sha256 sonoma: "9eca5bab2ddcf8f6e0222c28db825e4bd66424f64f7e87eed988db312cd53923" + sha256 ventura: "1e27788709ff517345a449edc508cfc9dc5426baa08bb3f34167acffc84c010f" + sha256 monterey: "a55472a7338f26f7138000677df04f90eec5eec5120168b87c72ed14b9536fbe" + sha256 big_sur: "a0ca57af4461f5ecad3f0882c72e3afaa78a78d46ad2393cbf553226c471107a" + sha256 catalina: "0c39f7765fb83025a5b24012b692c04aaf4e78cfa6a1e450e93b191b9d33e90d" + sha256 x86_64_linux: "6085ad7064a861fe03a25bf6ba6172d1a50cdf0f5985dc652ba32484fb7e08ca" + end + + # see https://www.isc.org/blogs/isc-dhcp-eol/ + disable! date: "2025-01-16", because: :deprecated_upstream, replacement_formula: "kea" + + def install + # use one dir under var for all runtime state. + dhcpd_dir = var/"dhcpd" + + # Change the locations of various files to match Homebrew + # we pass these in through CFLAGS since some cannot be changed + # via configure args. + path_opts = { + "_PATH_DHCPD_CONF" => etc/"dhcpd.conf", + "_PATH_DHCLIENT_CONF" => etc/"dhclient.conf", + "_PATH_DHCPD_DB" => dhcpd_dir/"dhcpd.leases", + "_PATH_DHCPD6_DB" => dhcpd_dir/"dhcpd6.leases", + "_PATH_DHCLIENT_DB" => dhcpd_dir/"dhclient.leases", + "_PATH_DHCLIENT6_DB" => dhcpd_dir/"dhclient6.leases", + "_PATH_DHCPD_PID" => dhcpd_dir/"dhcpd.pid", + "_PATH_DHCPD6_PID" => dhcpd_dir/"dhcpd6.pid", + "_PATH_DHCLIENT_PID" => dhcpd_dir/"dhclient.pid", + "_PATH_DHCLIENT6_PID" => dhcpd_dir/"dhclient6.pid", + "_PATH_DHCRELAY_PID" => dhcpd_dir/"dhcrelay.pid", + "_PATH_DHCRELAY6_PID" => dhcpd_dir/"dhcrelay6.pid", + } + + path_opts.each do |symbol, path| + ENV.append "CFLAGS", "-D#{symbol}='\"#{path}\"'" + end + + # See discussion at: https://gist.github.com/1157223 + ENV.append "CFLAGS", "-D__APPLE_USE_RFC_3542" + + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--localstatedir=#{dhcpd_dir}", + "--sysconfdir=#{etc}" + + ENV.deparallelize { system "make", "-C", "bind" } + + # build everything else + inreplace "Makefile", "SUBDIRS = ${top_srcdir}/bind", "SUBDIRS = " + system "make" + system "make", "install" + + # create the state dir and lease files else dhcpd will not start up. + dhcpd_dir.mkpath + %w[dhcpd dhcpd6 dhclient dhclient6].each do |f| + file = "#{dhcpd_dir}/#{f}.leases" + File.new(file, File::CREAT|File::RDONLY).close + end + + # dhcpv6 plists + (prefix/"homebrew.mxcl.dhcpd6.plist").write plist_dhcpd6 + (prefix/"homebrew.mxcl.dhcpd6.plist").chmod 0644 + end + + def caveats + <<~EOS + This install of dhcpd expects config files to be in #{etc}. + All state files (leases and pids) are stored in #{var}/dhcpd. + + Dhcpd needs to run as root since it listens on privileged ports. + + There are two plists because a single dhcpd process may do either + DHCPv4 or DHCPv6 but not both. Use one or both as needed. + + Note that you must create the appropriate config files before starting + the services or dhcpd will refuse to run. + DHCPv4: #{etc}/dhcpd.conf + DHCPv6: #{etc}/dhcpd6.conf + + Sample config files may be found in #{etc}. + EOS + end + + service do + run [opt_sbin/"dhcpd", "-f"] + keep_alive true + require_root true + end + + def plist_dhcpd6 + <<~EOS + + + + + Label#{plist_name} + ProgramArguments + + #{opt_sbin}/dhcpd + -f + -6 + -cf + #{etc}/dhcpd6.conf + + Disabled + KeepAlive + RunAtLoad + LowPriorityIO + + + EOS + end + + test do + cp etc/"dhcpd.conf.example", testpath/"dhcpd.conf" + system sbin/"dhcpd", "-cf", "#{testpath}/dhcpd.conf", "-t" + end +end diff --git a/Formula/i/isl.rb b/Formula/i/isl.rb new file mode 100644 index 0000000000000..354707cf48926 --- /dev/null +++ b/Formula/i/isl.rb @@ -0,0 +1,68 @@ +class Isl < Formula + # NOTE: Always use tarball instead of git tag for stable version. + # + # Currently isl detects its version using source code directory name + # and update isl_version() function accordingly. All other names will + # result in isl_version() function returning "UNKNOWN" and hence break + # package detection. + desc "Integer Set Library for the polyhedral model" + homepage "https://libisl.sourceforge.io/" + url "https://libisl.sourceforge.io/isl-0.27.tar.xz" + sha256 "6d8babb59e7b672e8cb7870e874f3f7b813b6e00e6af3f8b04f7579965643d5c" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?isl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "de143fddb0e20b6b73016ead1e625ebd429db53918200d093e4da98f1e758889" + sha256 cellar: :any, arm64_sonoma: "8f1af90ff2967e80c1a757e8e6aae61c9f6876a8ad98c1613e252f7daaa8a483" + sha256 cellar: :any, arm64_ventura: "7d74b1abc36c01f14202d8d4f3105826cca0a1ac5db3fd831c8fd3673097e2d6" + sha256 cellar: :any, arm64_monterey: "f09ed357251a8f1771f93c22b5c18441299cf4ecbabf4f83a63b71abba565904" + sha256 cellar: :any, sequoia: "edae3d6050998a8b6c40d79244d1c73231537371e7a36a3a72f756ed965088be" + sha256 cellar: :any, sonoma: "23be453b3fbe9ab4a1baeb8a99eea31a6362825f03f74a1c7015bb0bda9ad4d8" + sha256 cellar: :any, ventura: "df3c2c3161184a8cea83dfda47bbf31f81e3527951c2dc72bdeb2ac1638e2709" + sha256 cellar: :any, monterey: "fea18e3734c269de46cb70dc7a263e5784e0e67d16e59598aaea22618c6a4650" + sha256 cellar: :any_skip_relocation, arm64_linux: "58237313da104ff5b3f16289cea5fccd51465e4ef88f977ea7f91a2a578be1d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "25c8bf618d4e3c68c27eed634bd7695104ff5daa37246253aabce80d7c1ac7f5" + end + + head do + url "https://repo.or.cz/isl.git" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "gmp" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-gmp=system", + "--with-gmp-prefix=#{Formula["gmp"].opt_prefix}" + system "make" + system "make", "install" + (share/"gdb/auto-load").install Dir["#{lib}/*-gdb.py"] + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + isl_ctx* ctx = isl_ctx_alloc(); + isl_ctx_free(ctx); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lisl", "-o", "test" + system "./test" + end +end diff --git a/Formula/i/iso-codes.rb b/Formula/i/iso-codes.rb new file mode 100644 index 0000000000000..a3a45256c45c7 --- /dev/null +++ b/Formula/i/iso-codes.rb @@ -0,0 +1,32 @@ +class IsoCodes < Formula + desc "Provides lists of various ISO standards" + homepage "https://salsa.debian.org/iso-codes-team/iso-codes" + url "https://deb.debian.org/debian/pool/main/i/iso-codes/iso-codes_4.18.0.orig.tar.xz" + sha256 "066bc4df7bf299561856a07119cde01d563c8c4c39906537a39363bb833d466c" + license "LGPL-2.1-or-later" + head "https://salsa.debian.org/iso-codes-team/iso-codes.git", branch: "main" + + livecheck do + url "https://deb.debian.org/debian/pool/main/i/iso-codes/" + regex(/href=.*?iso-codes[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "c15c05f6acf542ec524347a70aa893262931fe44c6b4e3ee737ab721b72aaa8a" + end + + depends_on "gettext" => :build + + uses_from_macos "python" => :build + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + output = shell_output("grep domains #{share}/pkgconfig/iso-codes.pc") + assert_match "iso_639-2 iso_639-3 iso_639-5 iso_3166-1", output + end +end diff --git a/Formula/i/isort.rb b/Formula/i/isort.rb new file mode 100644 index 0000000000000..125278c463f9c --- /dev/null +++ b/Formula/i/isort.rb @@ -0,0 +1,30 @@ +class Isort < Formula + include Language::Python::Virtualenv + + desc "Sort Python imports automatically" + homepage "https://pycqa.github.io/isort/" + url "https://files.pythonhosted.org/packages/b8/21/1e2a441f74a653a144224d7d21afe8f4169e6c7c20bb13aec3a2dc3815e0/isort-6.0.1.tar.gz" + sha256 "1cb5df28dfbc742e490c5e41bad6da41b805b0a8be7bc93cd0fb2a8a890ac450" + license "MIT" + head "https://github.com/PyCQA/isort.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "64e7ccae9c077d0226eed19c482f610038f1b5bd9b7d2bf8aa5f24b42c1a1863" + end + + depends_on "python@3.13" + + def install + virtualenv_install_with_resources + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + (testpath/"isort_test.py").write <<~PYTHON + from third_party import lib + import os + PYTHON + system bin/"isort", "isort_test.py" + assert_equal "import os\n\nfrom third_party import lib\n", (testpath/"isort_test.py").read + end +end diff --git a/Formula/i/ispc.rb b/Formula/i/ispc.rb new file mode 100644 index 0000000000000..c62f4a13d0f46 --- /dev/null +++ b/Formula/i/ispc.rb @@ -0,0 +1,109 @@ +class Ispc < Formula + desc "Compiler for SIMD programming on the CPU" + homepage "https://ispc.github.io/" + url "https://github.com/ispc/ispc/archive/refs/tags/v1.26.0.tar.gz" + sha256 "f75b26894af1429a3dc6929ae03e2c9e99bb8c5930eda14add5d2f6674db7afb" + license "BSD-3-Clause" + revision 1 + + # 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_sequoia: "8ca65ff11543bb326b81d959a0edb4223098d6f9d735733ee004816574aea051" + sha256 cellar: :any, arm64_sonoma: "8e37e253863a335c144afaa6f7b159a9dff376fa874db90e9a9fca54ed9408f8" + sha256 cellar: :any, arm64_ventura: "fee375a66b0d659a61a8b8682dd46f938e997a78d0b228f6ebea5ef17a81175f" + sha256 cellar: :any, sonoma: "1741872fdafe79dfbd305382c122a2a7a7cd849d06fdc0d8ca8c1d9860075d19" + sha256 cellar: :any, ventura: "f3232ae325e47ed4a131e06f7a33c7c45428d9fd59b9da0b56bbcea6a626a766" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8b5e673cf3ffccdabf4730cb099907f9ff73375e867dae4fe13446bb96394e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "701d608135443f6fd38f019c5a7a993214bc395e3c14005d074a8261a8dd795e" + end + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "flex" => :build + depends_on "llvm" + + uses_from_macos "python" => :build + + on_linux do + depends_on "tbb" + end + + # Backport commits for LLVM 20, https://github.com/ispc/ispc/pull/3286 + patch do + url "https://github.com/ispc/ispc/commit/d8082c8e73a7998d2d527c1ac87d5acf1d35aba4.patch?full_index=1" + sha256 "f21388d50719bf282b161a59a3dba4b6cb8b4f4b3be5fb88c501a63086566112" + end + patch do + url "https://github.com/ispc/ispc/commit/26e0c53ee7e3639fe37f796ebc402776fd5ac771.patch?full_index=1" + sha256 "66a5148a1baf02a64c52faba61094ae186001b7a2595ef42b7b88a05d423301d" + end + patch do + url "https://github.com/ispc/ispc/commit/2e7b817e1a4dbb623d922eb5eec94749002e5585.patch?full_index=1" + sha256 "44d4ee4c256180abc9590d640c5fe3d1175102fd9365ab1976a45c64d1ef81ba" + end + + def llvm + deps.map(&:to_formula).find { |f| f.name.match? "^llvm" } + end + + def install + args = %W[ + -DISPC_INCLUDE_EXAMPLES=OFF + -DISPC_INCLUDE_TESTS=OFF + -DISPC_INCLUDE_UTILS=OFF + -DLLVM_TOOLS_BINARY_DIR=#{llvm.opt_bin} + ] + # We can target ARM for free on macOS, so let's use the upstream default there. + args << "-DARM_ENABLED=OFF" if OS.linux? && Hardware::CPU.intel? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"simple.ispc").write <<~EOS + export void simple(uniform float vin[], uniform float vout[], uniform int count) { + foreach (index = 0 ... count) { + float v = vin[index]; + if (v < 3.) + v = v * v; + else + v = sqrt(v); + vout[index] = v; + } + } + EOS + + if Hardware::CPU.arm? + arch = "aarch64" + target = "neon" + else + arch = "x86-64" + target = "sse2" + end + system bin/"ispc", "--arch=#{arch}", "--target=#{target}", testpath/"simple.ispc", + "-o", "simple_ispc.o", "-h", "simple_ispc.h" + + (testpath/"simple.cpp").write <<~CPP + #include "simple_ispc.h" + int main() { + float vin[9], vout[9]; + for (int i = 0; i < 9; ++i) vin[i] = static_cast(i); + ispc::simple(vin, vout, 9); + return 0; + } + CPP + system ENV.cxx, "-I#{testpath}", "-c", "-o", testpath/"simple.o", testpath/"simple.cpp" + system ENV.cxx, "-o", testpath/"simple", testpath/"simple.o", testpath/"simple_ispc.o" + + system testpath/"simple" + end +end diff --git a/Formula/i/ispell.rb b/Formula/i/ispell.rb new file mode 100644 index 0000000000000..c502c9fd37a88 --- /dev/null +++ b/Formula/i/ispell.rb @@ -0,0 +1,56 @@ +class Ispell < Formula + desc "International Ispell" + homepage "https://www.cs.hmc.edu/~geoff/ispell.html" + url "https://www.cs.hmc.edu/~geoff/tars/ispell-3.4.06.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/i/ispell/ispell_3.4.06.orig.tar.gz" + sha256 "17c91633d4c8075acc503163a16463fc54ab1c7453280ad39cd3db75c783eba6" + license :cannot_represent # modified BSD license + + livecheck do + url :homepage + regex(/href=.*?ispell[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "fc52b0f23b84dbe44eba8d0ef80ae93927f90591678155d6579af7e04819abb0" + sha256 arm64_sonoma: "f59130f4372ea62fbc0e9eb4278f334c2c0560bda769da34124eaa09be982308" + sha256 arm64_ventura: "55b954a652b789b190d4ec1e6ff44dadfe98dc3136c7b1a7899a4ca98ba69dac" + sha256 arm64_monterey: "50ddb869e8a2cbac73c222c44c3d0fc05e53e688fea457f9f36f6bccc4eebabf" + sha256 sonoma: "b694e02bc0e7ed4f22e3cb6acbc65e102ce247f7e51b56c5993f0d9e257a923f" + sha256 ventura: "09c4567d275b8bc4aaf705c61b55415efc4ca531d1aac0affc77accf25f37cbb" + sha256 monterey: "2823acb91a77394cb0cc476ad86713e5a40de442e3f6a3e8b50837db31ad0468" + sha256 arm64_linux: "9b9d077e2087198423033e13a10e3b918d078dd7e5bd39a798ebeb92899d5249" + sha256 x86_64_linux: "869cb27e3534e6aa9503dd0598a7115207ddf665f8183fd14f99dd931f61fe6c" + end + + uses_from_macos "bison" => :build + uses_from_macos "ncurses" + + def install + ENV.deparallelize + + # No configure script, so do this all manually + cp "local.h.macos", "local.h" + chmod 0644, "local.h" + inreplace "local.h" do |s| + s.gsub! "/usr/local", prefix + s.gsub! "/man/man", "/share/man/man" + s.gsub! "/lib", "/lib/ispell" + end + + chmod 0644, "correct.c" + inreplace "correct.c", "getline", "getline_ispell" + + system "make", "config.sh" + chmod 0644, "config.sh" + inreplace "config.sh", "/usr/share/dict", "#{share}/dict" + + (lib/"ispell").mkpath + system "make", "install" + end + + test do + assert_equal "BOTHER BOTHE/R BOTH/R", + `echo BOTHER | #{bin}/ispell -c`.chomp + end +end diff --git a/Formula/i/istioctl.rb b/Formula/i/istioctl.rb new file mode 100644 index 0000000000000..975394d1bb852 --- /dev/null +++ b/Formula/i/istioctl.rb @@ -0,0 +1,45 @@ +class Istioctl < Formula + desc "Istio configuration command-line utility" + homepage "https://istio.io/" + url "https://github.com/istio/istio/archive/refs/tags/1.26.0.tar.gz" + sha256 "1498307624d9cb85d15f3e1892de6cf3d80fdfe888716b05ee4ff25f210c7663" + license "Apache-2.0" + head "https://github.com/istio/istio.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b3b2cecdb78def06f1acf78e5556dcb681c9a14fb497fcd5dddb6e47f5280bcb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "008e07b52404f9c4dcf2f59e2249c93f119bda704e2a8a39c65b54ec3c16ac22" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4560f640418cc7890c39bbc6c76aa7d56f3122073069147696f5ecd055445d1b" + sha256 cellar: :any_skip_relocation, sonoma: "e2a74cb5635944bf2d2be59b4e39a70649973fd9f8f4ba9c62948b4245ce774b" + sha256 cellar: :any_skip_relocation, ventura: "918648eb2bd92dbd6293d491492686433f72b1b22ae276956b4970c010513769" + sha256 cellar: :any_skip_relocation, arm64_linux: "29e4307005a3061e32e9193962f7659c6cf500fcff92623cd998c734d08e28f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4db14434c5c82f0165723aebf431aa3d9fd3ad10bd97b1e8f2e7d2f24a301e76" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X istio.io/istio/pkg/version.buildVersion=#{version} + -X istio.io/istio/pkg/version.buildGitRevision=#{tap.user} + -X istio.io/istio/pkg/version.buildStatus=#{tap.user} + -X istio.io/istio/pkg/version.buildTag=#{version} + -X istio.io/istio/pkg/version.buildHub=docker.io/istio + ] + system "go", "build", *std_go_args(ldflags:), "./istioctl/cmd/istioctl" + + generate_completions_from_executable(bin/"istioctl", "completion") + system bin/"istioctl", "collateral", "--man" + man1.install Dir["*.1"] + end + + test do + assert_equal "client version: #{version}", shell_output("#{bin}/istioctl version --remote=false").strip + end +end diff --git a/Formula/i/isync.rb b/Formula/i/isync.rb new file mode 100644 index 0000000000000..1e829bf5335fb --- /dev/null +++ b/Formula/i/isync.rb @@ -0,0 +1,48 @@ +class Isync < Formula + desc "Synchronize a maildir with an IMAP server" + homepage "https://isync.sourceforge.io/" + url "https://downloads.sourceforge.net/project/isync/isync/1.5.1/isync-1.5.1.tar.gz" + sha256 "28cc90288036aa5b6f5307bfc7178a397799003b96f7fd6e4bd2478265bb22fa" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "679faf8c8def86ce0224c4f1edbff742549d5a7f7ec1389f30c5b9d050844fce" + sha256 cellar: :any, arm64_sonoma: "4e4510861b03a2ccec9b01b0136ddb6ed903db1d53e8691ebf7606f225d5eb40" + sha256 cellar: :any, arm64_ventura: "130456630d195bea122ac91aded7cfa8b4375bb954325f4b0806b73322125978" + sha256 cellar: :any, sonoma: "51ee82083ce5aae9883f444fe52aaa26c43d0856e587ee7755b2a4d132dfabe9" + sha256 cellar: :any, ventura: "cc88915ef3a70a61e83952548559a3d6879561063b0826566851e0c1b3ae0a5d" + sha256 cellar: :any_skip_relocation, arm64_linux: "a485ffab93aec68e2643810d101ededa1de3ce47f1fba32b69a525f72ba52691" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b7f6e94602fe5a7812e8c8731ddb620827c950199116ecd10b22f24040cf6d0" + end + + head do + url "https://git.code.sf.net/p/isync/isync.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "berkeley-db@5" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + service do + run [opt_bin/"mbsync", "-a"] + 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 + system bin/"mbsync-get-cert", "duckduckgo.com:443" + end +end diff --git a/Formula/i/itex2mml.rb b/Formula/i/itex2mml.rb new file mode 100644 index 0000000000000..d82bd0d7b89b5 --- /dev/null +++ b/Formula/i/itex2mml.rb @@ -0,0 +1,53 @@ +# From: Jacques Distler +# You can always find the latest version by checking +# https://golem.ph.utexas.edu/~distler/code/itexToMML/view/head:/itex-src/itex2MML.h +# The corresponding versioned archive is +# https://golem.ph.utexas.edu/~distler/blog/files/itexToMML-x.x.x.tar.gz + +class Itex2mml < Formula + desc "Text filter to convert itex equations to MathML" + homepage "https://golem.ph.utexas.edu/~distler/blog/itex2MML.html" + url "https://golem.ph.utexas.edu/~distler/blog/files/itexToMML-1.6.1.tar.gz" + sha256 "3ef2572aa3421cf4d12321905c9c3f6b68911c3c9283483b7a554007010be55f" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + + livecheck do + url :homepage + regex(%r{\s*Current itex2MML Version:\s*\s*(\d+(?:\.\d+)+)[\s(<]}im) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7218674b662a6415899e7eb4dc00ac2634c60837b7a4b9fa7a4019cf668d8890" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7d58887108a80df9633a6d0740d9c7c8e630ca95f440878d2b75bcd1ac626951" + sha256 cellar: :any_skip_relocation, arm64_ventura: "21fbfa1382c97a13c162899ec72451dccf4d9a4c368c3c0a3fc5e70db4173497" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f08478f4813d052ae7d98339582ca05b95674d7b08a254305bf8e4e6575b3327" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2a13992add208a7ab179fab850b3aba9a18a672dd803247ccde9c225103edf01" + sha256 cellar: :any_skip_relocation, sonoma: "c7fc486174a242a55b26291f5bb37abb96457788b66b3adcbe89291179f8edaf" + sha256 cellar: :any_skip_relocation, ventura: "e54abed4dd08fd6edf1b19812617d7ec4c3d94a4619c36172579b3a32f04351a" + sha256 cellar: :any_skip_relocation, monterey: "fa3e744eb8281aba061785ebb783c1a55d7f4a85c00787052a309411af702583" + sha256 cellar: :any_skip_relocation, big_sur: "3cf7d88d4e102acb646f5e23a4bc168a50c19ce8bda26011bd25c7d8208dbb86" + sha256 cellar: :any_skip_relocation, catalina: "a4a3f1a4d8ff096ed6a4e1eb6ac2883d916de6504496cd8da929081484ab65c4" + sha256 cellar: :any_skip_relocation, mojave: "ca96d27550adc14145a18df3a31ed79dfd12d082f7e4dbccce73e8eabe4ae69e" + sha256 cellar: :any_skip_relocation, arm64_linux: "abef6379fe470feb9877993e8e9392c51bce8f9006b3d9de2e28c5c2b110cd03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "809bf39b25611efdd6f0c297918b0376788c1a4f380a69489b1e4495bd19821e" + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + bin.mkpath + cd "itex-src" do + system "make" + system "make", "install", "prefix=#{prefix}", "BINDIR=#{bin}" + end + end + + test do + input = "$f(x)$" + output = "" \ + "f(x)" \ + "f(x)" + assert_equal output, pipe_output("#{bin}/itex2MML", input) + end +end diff --git a/Formula/i/itk.rb b/Formula/i/itk.rb new file mode 100644 index 0000000000000..a614e5159d702 --- /dev/null +++ b/Formula/i/itk.rb @@ -0,0 +1,121 @@ +class Itk < Formula + desc "Insight Toolkit is a toolkit for performing registration and segmentation" + homepage "https://itk.org/" + url "https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.4.3/InsightToolkit-5.4.3.tar.gz" + sha256 "dd3f286716ee291221407a67539f2197c184bd80d4a8f53de1fb7d19351c7eca" + license "Apache-2.0" + head "https://github.com/InsightSoftwareConsortium/ITK.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sonoma: "ae807a63310b53705b6f0e2d9a2b516efb1519aea5872ee1343068e4c67e0edd" + sha256 arm64_ventura: "da205f1d8c8c34092aaeac9cc503c57b3b936573919b783fed65ed55992d2ba9" + sha256 sonoma: "60075661e500e59497c31b98486d5b8a03f784aff0454dc3fcfdea74a50d1b26" + sha256 ventura: "742b3de29a8603ea9644ff8a3030bd69bad915179a53f210f6aed05b397a2d17" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec5e4bc7f694ffba16ee04174557a1954cac0841310c500fc85dfe591adbead4" + end + + depends_on "cmake" => :build + + depends_on "double-conversion" + depends_on "expat" + depends_on "fftw" + depends_on "gdcm" + depends_on "hdf5" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "vtk" + + uses_from_macos "zlib" + + on_macos do + depends_on "freetype" + depends_on "glew" + end + + on_linux do + depends_on "alsa-lib" + depends_on "unixodbc" + end + + def install + # Avoid CMake trying to find GoogleTest even though tests are disabled + rm_r(buildpath/"Modules/ThirdParty/GoogleTest") + + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH:STRING=#{lib} + -DCMAKE_INSTALL_NAME_DIR:STRING=#{lib} + -DITKV3_COMPATIBILITY:BOOL=OFF + -DITK_LEGACY_REMOVE=ON + -DITK_USE_64BITS_IDS=ON + -DITK_USE_FFTWF=ON + -DITK_USE_FFTWD=ON + -DITK_USE_SYSTEM_FFTW=ON + -DITK_USE_SYSTEM_HDF5=ON + -DITK_USE_SYSTEM_JPEG=ON + -DITK_USE_SYSTEM_PNG=ON + -DITK_USE_SYSTEM_TIFF=ON + -DITK_USE_SYSTEM_GDCM=ON + -DITK_USE_SYSTEM_ZLIB=ON + -DITK_USE_SYSTEM_EXPAT=ON + -DITK_USE_SYSTEM_DOUBLECONVERSION=ON + -DITK_USE_SYSTEM_LIBRARIES=ON + -DModule_ITKReview=ON + -DModule_ITKVtkGlue=ON + -DModule_SCIFIO=ON + ] + # Cannot compile on macOS with this arg + # Upstream issue: https://github.com/InsightSoftwareConsortium/ITK/issues/3821 + # args << "-DITK_USE_GPU=ON" if OS.mac? + + # Avoid references to the Homebrew shims directory + inreplace "Modules/Core/Common/src/CMakeLists.txt" do |s| + s.gsub!(/MAKE_MAP_ENTRY\(\s*\\"CMAKE_C_COMPILER\\", + \s*\\"\${CMAKE_C_COMPILER}\\".*\);/x, + "MAKE_MAP_ENTRY(\\\"CMAKE_C_COMPILER\\\", " \ + "\\\"#{ENV.cc}\\\", \\\"The C compiler.\\\");") + + s.gsub!(/MAKE_MAP_ENTRY\(\s*\\"CMAKE_CXX_COMPILER\\", + \s*\\"\${CMAKE_CXX_COMPILER}\\".*\);/x, + "MAKE_MAP_ENTRY(\\\"CMAKE_CXX_COMPILER\\\", " \ + "\\\"#{ENV.cxx}\\\", \\\"The CXX compiler.\\\");") + end + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Remove the bundled JRE installed by SCIFIO ImageIO plugin + rm_r(lib/"jre") if OS.linux? || Hardware::CPU.intel? + end + + test do + (testpath/"test.cxx").write <<~CPP + #include "itkImage.h" + int main(int argc, char* argv[]) + { + typedef itk::Image ImageType; + ImageType::Pointer image = ImageType::New(); + image->Update(); + return EXIT_SUCCESS; + } + CPP + + v = version.major_minor + # Build step + system ENV.cxx, "-std=c++17", "-isystem", "#{include}/ITK-#{v}", "-o", "test.cxx.o", "-c", "test.cxx" + # Linking step + system ENV.cxx, "-std=c++17", "test.cxx.o", "-o", "test", + lib/shared_library("libITKCommon-#{v}", 1), + lib/shared_library("libITKVNLInstantiation-#{v}", 1), + lib/shared_library("libitkvnl_algo-#{v}", 1), + lib/shared_library("libitkvnl-#{v}", 1) + system "./test" + end +end diff --git a/Formula/i/itpp.rb b/Formula/i/itpp.rb new file mode 100644 index 0000000000000..9433072404698 --- /dev/null +++ b/Formula/i/itpp.rb @@ -0,0 +1,62 @@ +class Itpp < Formula + desc "Library of math, signal, and communication classes and functions" + homepage "https://itpp.sourceforge.net/" + url "https://downloads.sourceforge.net/project/itpp/itpp/4.3.1/itpp-4.3.1.tar.bz2" + sha256 "50717621c5dfb5ed22f8492f8af32b17776e6e06641dfe3a3a8f82c8d353b877" + license "GPL-3.0-or-later" + head "https://git.code.sf.net/p/itpp/git.git", branch: "master" + + livecheck do + url :stable + regex(%r{url=.*?/itpp[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "58f42ea3453634e3160598380eedb74e3917eec37fe55c5e57b09db4f4ca2314" + sha256 cellar: :any, arm64_sonoma: "ea1d6f7812b08ab488e3029479f886c293bec4ace34c3f6fa69dbce73823161e" + sha256 cellar: :any, arm64_ventura: "0a42ca8d1cb49fb7b8af53e5c62b6ebb327dee7d81555d58e3b47518ab2105af" + sha256 cellar: :any, arm64_monterey: "23dde1c42eafdbba4fb7f2d5f26ae5115706fca6104de839903d1394e48a525d" + sha256 cellar: :any, arm64_big_sur: "6108f6abf3ec7cd2e4a3b1d3d36dce2cc59327b01d7168705cc1e6b6976c3976" + sha256 cellar: :any, sonoma: "72a33b48a02269658ea8ac820b621d6c4c3a6e3192a739ab816cac68dfd5d746" + sha256 cellar: :any, ventura: "5a5486d9e73641cafadebc2a16aaff3f0309fd88a03ecc6c51ab74aa9662ffd0" + sha256 cellar: :any, monterey: "85f1d652165756860f4f4c8ecc86e583ab9b58ec803804bf278a724319790c11" + sha256 cellar: :any, big_sur: "05b2e27723a47b64d46abb221ac931cbd4f530c2bea166ff4a75c6cc6aec496f" + sha256 cellar: :any, catalina: "e35e75d21d3414bf4586b7ca6ee2ff1f99b8fd7106bf32c7eec434b2de5135d8" + sha256 cellar: :any, mojave: "9c4b59029023095449f5592cf26420418af874263b49980a255d084c3f6c8a25" + sha256 cellar: :any_skip_relocation, arm64_linux: "9537b4762ac42062b61e93b08eca2bbd875fcbf1a5defe17a6a83b192ce409e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "804cfd8e327183c284a6018f22613896b1876aa2b5fffe99e7ecd594d6f4b006" + end + + depends_on "cmake" => :build + depends_on "fftw" + + def install + # Rename VERSION file to avoid build failure: version:1:1: error: expected unqualified-id + # Reported upstream at: https://sourceforge.net/p/itpp/bugs/262/ + mv "VERSION", "VERSION.txt" + + 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() { + itpp::BPSK bpsk; + itpp::bvec input_bits = "0 1 0 1"; + itpp::vec modulated_signal; + bpsk.modulate_bits(input_bits, modulated_signal); + std::cout << "Modulated signal: " << modulated_signal << std::endl; + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-litpp" + system "./test" + end +end diff --git a/Formula/i/itstool.rb b/Formula/i/itstool.rb new file mode 100644 index 0000000000000..0c9334ac403bb --- /dev/null +++ b/Formula/i/itstool.rb @@ -0,0 +1,56 @@ +class Itstool < Formula + desc "Make XML documents translatable through PO files" + homepage "https://itstool.org/" + url "https://files.itstool.org/itstool/itstool-2.0.7.tar.bz2" + sha256 "6b9a7cd29a12bb95598f5750e8763cee78836a1a207f85b74d8b3275b27e87ca" + license "GPL-3.0-or-later" + revision 1 + + livecheck do + url "https://itstool.org/download.html" + regex(/href=.*?itstool[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 5 + sha256 cellar: :any_skip_relocation, all: "789a00622218d97cded8fbc0e82b043478c693b62f25a372769f4d0cd8eb7cb6" + end + + head do + url "https://github.com/itstool/itstool.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "libxml2" + depends_on "python@3.13" + + def python3 + "python3.13" + end + + def install + ENV.append_path "PYTHONPATH", Formula["libxml2"].opt_prefix/Language::Python.site_packages(python3) + + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, "--prefix=#{libexec}", "PYTHON=#{which(python3)}" + system "make", "install" + + bin.install Dir[libexec/"bin/*"] + bin.env_script_all_files libexec/"bin", PYTHONPATH: ENV["PYTHONPATH"] + pkgshare.install_symlink libexec/"share/itstool/its" + man1.install_symlink libexec/"share/man/man1/itstool.1" + + # Check for itstool data files in HOMEBREW_PREFIX. This also ensures uniform bottles. + inreplace libexec/"bin/itstool", "/usr/local", HOMEBREW_PREFIX + end + + test do + (testpath/"test.xml").write <<~XML + Homebrew + XML + system bin/"itstool", "-o", "test.pot", "test.xml" + assert_match "msgid \"Homebrew\"", File.read("test.pot") + end +end diff --git a/Formula/i/ittapi.rb b/Formula/i/ittapi.rb new file mode 100644 index 0000000000000..469676ba46c63 --- /dev/null +++ b/Formula/i/ittapi.rb @@ -0,0 +1,46 @@ +class Ittapi < Formula + desc "Intel Instrumentation and Tracing Technology (ITT) and Just-In-Time (JIT) API" + homepage "https://github.com/intel/ittapi" + url "https://github.com/intel/ittapi/archive/refs/tags/v3.26.1.tar.gz" + sha256 "e070b01293cd9ebaed8e5dd1dd0a662735637b1d144bbdcb6ba18fd90683accf" + license "GPL-2.0-only" + head "https://github.com/intel/ittapi.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5424508c20204936d2fad669378ac204bc082015502cf15ed36550ba6f64c76" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ad8d7db2bdfa50d5c4c298b2a570599bda56b71fcc7d08ac36cf7de96c6ff64f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "211f381413eef7fdbf6843fecdf4160dd8748dc1d652fae6dcd0c3d096825eb0" + sha256 cellar: :any_skip_relocation, sonoma: "0cc017753e4c3c83d108cfd2dd9e0d84f8d0c46ecbd53958cca0fb8f9154dab8" + sha256 cellar: :any_skip_relocation, ventura: "fa2e9c2e80eb616452e93de954e8b04afcfdb36cb9129f32e64b18a9a538e4d2" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b35467fb43af71a19ab43bdf8cc72dff27ec833c4bb1155ae5d22f46aeb3d3f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea5b67f7f9f0d42188564fda3e430f4fd33ccecfb933e404e7f69ed3f12545a5" + 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 + + __itt_domain* domain = __itt_domain_create("Example.Domain.Global"); + __itt_string_handle* handle_main = __itt_string_handle_create("main"); + + int main() + { + __itt_task_begin(domain, __itt_null, __itt_null, handle_main); + __itt_task_end(domain); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", + "-I#{include}", + "-L#{lib}", "-littnotify" + system "./test" + end +end diff --git a/Formula/i/ivtools.rb b/Formula/i/ivtools.rb new file mode 100644 index 0000000000000..7b5dd5751b12e --- /dev/null +++ b/Formula/i/ivtools.rb @@ -0,0 +1,61 @@ +class Ivtools < Formula + desc "X11 vector graphic servers" + homepage "https://github.com/vectaport/ivtools" + url "https://github.com/vectaport/ivtools/archive/refs/tags/ivtools-2.1.1.tar.gz" + sha256 "4fa680b9d0fd2af610e9012258e150249d9a8abbc3b1f65eb17d01c959142cfc" + license "MIT" + revision 2 + + bottle do + sha256 arm64_sequoia: "8e490b72b8f0d4ab14b666c5a0a5c1e7fb0a1ef009f16e68a287cdbe6baabc5e" + sha256 arm64_sonoma: "089d3a1a83e7ab861c372e8624d4f5c1cf30170395c880527f5e40452f9c3332" + sha256 arm64_ventura: "f0e1133904428f8b10565f5429aee3e97dd525c25be3dc79c6d93b8fbff1bc4a" + sha256 sonoma: "ca9aeb46127c39266456e76adf83ab9ebea763512189525c0c87b1495d605055" + sha256 ventura: "5634c8c5cc630b4320e6b087451878491050fb0e03d620870caa1688a31ae3ac" + sha256 arm64_linux: "25d8f1dfb90b4a732d8c01f8320ed8a4e3ed4548bd4d73fa730cf9eb7d1a42c7" + sha256 x86_64_linux: "cfa432a860ad12324624892ce24da9b83092bba19212e7e435c40cac8b1f65eb" + end + + depends_on "ace" + depends_on "libx11" + depends_on "libxext" + + on_linux do + on_arm do + depends_on "automake" => :build + end + end + + # Fix to error: unknown type name '_LIBCPP_INLINE_VISIBILITY' and '_VSTD' + # PR ref: https://github.com/vectaport/ivtools/pull/25 + patch do + url "https://github.com/vectaport/ivtools/commit/6c4f2afb11d76fc34fb918c2ba53c4c4c5db55ae.patch?full_index=1" + sha256 "5aaa198d2c2721d30b1f31ea9817ca7fbf1a518dde782d6441cf5946a7b83ee2" + 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, "src/scripts/#{fn}" + end + end + + cp "Makefile.orig", "Makefile" + ace = Formula["ace"] + args = %W[--mandir=#{man} --with-ace=#{ace.opt_include} --with-ace-libs=#{ace.opt_lib}] + system "./configure", *std_configure_args, *args + system "make" + system "make", "install" + + # Conflicts with dialog + mv man3/"Dialog.3", man3/"Dialog_ivtools.3" + + # Delete unneeded symlink to libACE on Linux which conflicts with ace. + rm lib/"libACE.so" unless OS.mac? + end + + test do + system bin/"comterp", "exit(0)" + end +end diff --git a/Formula/i/ivy.rb b/Formula/i/ivy.rb new file mode 100644 index 0000000000000..ea5f0654682f6 --- /dev/null +++ b/Formula/i/ivy.rb @@ -0,0 +1,20 @@ +class Ivy < Formula + desc "Agile dependency manager" + homepage "https://ant.apache.org/ivy/" + 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" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c3132187b5761ef4cf40ef487beb49fa5e3d7c963628854a4d44d10dd1741065" + end + + depends_on "openjdk" + + def install + libexec.install Dir["ivy*"] + doc.install Dir["doc/*"] + bin.write_jar_script libexec/"ivy-#{version}.jar", "ivy", "$JAVA_OPTS" + end +end diff --git a/Formula/i/ivykis.rb b/Formula/i/ivykis.rb new file mode 100644 index 0000000000000..dc83008ea4a56 --- /dev/null +++ b/Formula/i/ivykis.rb @@ -0,0 +1,51 @@ +class Ivykis < Formula + desc "Async I/O-assisting library" + homepage "https://sourceforge.net/projects/libivykis/" + url "https://github.com/buytenh/ivykis/archive/refs/tags/v0.43.2-trunk.tar.gz" + sha256 "22621ae6a7144039cfb8666ed509b99ea1876d7642021a3505c7351502641103" + license "LGPL-2.1-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)(?:[._-]trunk)?$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "d76bb73ff8c5001a8347d9f382e2ee49b500773ce56d0a611b8828c856d5b93b" + sha256 cellar: :any, arm64_sonoma: "041ef153175797ab1ffdc43c6f66792ccab6bf7bb30b0458e9a0e2796c208135" + sha256 cellar: :any, arm64_ventura: "075569d21dab788f26ae067e2d3b68de653041f8964df56fb49212162657cf77" + sha256 cellar: :any, arm64_monterey: "97757eff18712b8e6e994bf1d84aa89f4d371793117f11e802570af83a2b8fc0" + sha256 cellar: :any, sonoma: "c70c4ccd6872f0be9b0d0ab49218fca35d43077d6a82be5b541aa4b5573af1f2" + sha256 cellar: :any, ventura: "ed59e7e11206ff76514c05ab2bbe5bc302bfff40e73959ee3294cb6759640dda" + sha256 cellar: :any, monterey: "8246dcfdc88e144a353448209a0f86c06e9fce2c4ad05a493648b4db7d70e496" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b90fe4d18f18d4f598f91f1bc0dca09552f78dc2076f7908574ab19972c3bf8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63cc7d328a6c1816803b8a4a90377dfe86dfe0ce21d895bc1968e27c46ed083f" + 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" + system "make", "check" + system "make", "install" + end + + test do + (testpath/"test_ivykis.c").write <<~C + #include + #include + int main() + { + iv_init(); + iv_deinit(); + return 0; + } + C + system ENV.cc, "test_ivykis.c", "-L#{lib}", "-livykis", "-o", "test_ivykis" + system "./test_ivykis" + end +end diff --git a/Formula/i2p.rb b/Formula/i2p.rb deleted file mode 100644 index e8b22c89ac6e0..0000000000000 --- a/Formula/i2p.rb +++ /dev/null @@ -1,28 +0,0 @@ -class I2p < Formula - desc "Anonymous overlay network - a network within a network" - homepage "https://geti2p.net/" - url "https://download.i2p2.de/releases/0.9.46/i2pinstall_0.9.46.jar" - mirror "https://launchpad.net/i2p/trunk/0.9.46/+download/i2pinstall_0.9.46.jar" - sha256 "bc8ec63e1df5eba7b22c57a143ff177a1fb208f793f07ecf249f3589029def1e" - - bottle :unneeded - - depends_on "openjdk@11" - - def install - (buildpath/"path.conf").write "INSTALL_PATH=#{libexec}" - - system "#{Formula["openjdk@11"].opt_bin}/java", "-jar", "i2pinstall_#{version}.jar", - "-options", "path.conf", "-language", "eng" - - wrapper_name = "i2psvc-macosx-universal-64" - libexec.install_symlink libexec/wrapper_name => "i2psvc" - (bin/"eepget").write_env_script libexec/"eepget", :JAVA_HOME => Formula["openjdk@11"].opt_prefix - (bin/"i2prouter").write_env_script libexec/"i2prouter", :JAVA_HOME => Formula["openjdk@11"].opt_prefix - man1.install Dir["#{libexec}/man/*"] - end - - test do - assert_match "I2P Service is not running.", shell_output("#{bin}/i2prouter status", 1) - end -end diff --git a/Formula/i2pd.rb b/Formula/i2pd.rb deleted file mode 100644 index 8e66d5ece8bac..0000000000000 --- a/Formula/i2pd.rb +++ /dev/null @@ -1,82 +0,0 @@ -class I2pd < Formula - desc "Full-featured C++ implementation of I2P client" - homepage "https://i2pd.website/" - url "https://github.com/PurpleI2P/i2pd/archive/2.32.1.tar.gz" - sha256 "64229101411a9dda3237dc27939aa13ec90d4900aae499e59931063c36e8556b" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "90162e02f622061a681bdd19fbc1e4a1e652bfb34f77ece9dc1f657ea3440cf5" => :catalina - sha256 "d5cac221a162fec22a8bdbc8ae57a9c97e9baeb9d7fe5e27bcbc468747643f63" => :mojave - sha256 "30c5bfeba103e53e7652ad7207f26a67a587c479aebb6707d548a7611ed76992" => :high_sierra - end - - depends_on "boost" - depends_on "miniupnpc" - depends_on "openssl@1.1" - - def install - system "make", "install", "DEBUG=no", "HOMEBREW=1", "USE_UPNP=yes", - "USE_AENSI=no", "USE_AVX=no", "PREFIX=#{prefix}" - - # preinstall to prevent overwriting changed by user configs - confdir = etc/"i2pd" - rm_rf prefix/"etc" - confdir.install doc/"i2pd.conf", doc/"subscriptions.txt", doc/"tunnels.conf" - end - - def post_install - # i2pd uses datadir from variable below. If that path doesn't exist, - # create the directory and create symlinks to certificates and configs. - # Certificates can be updated between releases, so we must recreate symlinks - # to the latest version on upgrade. - datadir = var/"lib/i2pd" - if datadir.exist? - rm datadir/"certificates" - datadir.install_symlink pkgshare/"certificates" - else - datadir.dirname.mkpath - datadir.install_symlink pkgshare/"certificates", etc/"i2pd/i2pd.conf", - etc/"i2pd/subscriptions.txt", etc/"i2pd/tunnels.conf" - end - - (var/"log/i2pd").mkpath - end - - plist_options :manual => "i2pd" - - def plist - <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - ProgramArguments - - #{opt_bin}/i2pd - --datadir=#{var}/lib/i2pd - --conf=#{etc}/i2pd/i2pd.conf - --tunconf=#{etc}/i2pd/tunnels.conf - --log=file - --logfile=#{var}/log/i2pd/i2pd.log - --pidfile=#{var}/run/i2pd.pid - - - - EOS - end - - test do - pid = fork do - exec "#{bin}/i2pd", "--datadir=#{testpath}", "--daemon" - end - sleep 5 - Process.kill "TERM", pid - assert_predicate testpath/"router.keys", :exist?, "Failed to start i2pd" - end -end diff --git a/Formula/i2util.rb b/Formula/i2util.rb deleted file mode 100644 index af4130f7fbdac..0000000000000 --- a/Formula/i2util.rb +++ /dev/null @@ -1,39 +0,0 @@ -class I2util < Formula - desc "Internet2 utility tools" - homepage "https://software.internet2.edu/" - url "https://software.internet2.edu/sources/I2util/I2util-1.2.tar.gz" - sha256 "3b704cdb88e83f7123f3cec0fe3283b0681cc9f80c426c3f761a0eefd1d72c59" - - bottle do - cellar :any_skip_relocation - sha256 "583442b07b8d0007ad6b3302daefd4bc5d2ce0b71ed3bc7f73c68eb3fb3e3fdd" => :catalina - sha256 "39d1540d90f798d79b38844fe234329513548c6882204fb69c1b5f372d1f7c5e" => :mojave - sha256 "47c66cf5e0bfec05a5c254dc4088fe2ec3dd45772d729bd0b38146afdfbd0f0a" => :high_sierra - sha256 "562e2d9021ff8044ca05a63c31d6560e5071ffc62f34ff1046cf195118b3471a" => :sierra - sha256 "44f87d48502ae3e34ebfc0882aa689a70e8c92d398247c5a53e2f4b7d7652b39" => :el_capitan - sha256 "ad1821b2637c75638de2ecd2bd3127a0c8300fe4fbd72c18ae648a131b97b6f7" => :yosemite - sha256 "b9a22dff1f4a26be02712d17de832a23fc3dbe5eee75ab62b72ffb5b18ecbd99" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() { - uint8_t buf[2]; - if (!I2HexDecode("beef", buf, sizeof(buf))) return 1; - if (buf[0] != 190 || buf[1] != 239) return 1; - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lI2util", "-o", "test" - system "./test" - end -end diff --git a/Formula/i386-elf-gdb.rb b/Formula/i386-elf-gdb.rb deleted file mode 100644 index 434f7a99bc577..0000000000000 --- a/Formula/i386-elf-gdb.rb +++ /dev/null @@ -1,44 +0,0 @@ -class I386ElfGdb < Formula - desc "GNU debugger for i386-elf cross development" - homepage "https://www.gnu.org/software/gdb/" - url "https://ftp.gnu.org/gnu/gdb/gdb-9.2.tar.xz" - mirror "https://ftpmirror.gnu.org/gdb/gdb-9.2.tar.xz" - sha256 "360cd7ae79b776988e89d8f9a01c985d0b1fa21c767a4295e5f88cb49175c555" - license "GPL-2.0" - head "https://sourceware.org/git/binutils-gdb.git" - - bottle do - sha256 "8d6ce6e01f67563076e657967c64aa266b7b6d93fd9ffe7cc0f91cb38d4f700f" => :catalina - sha256 "2a8ecb8ae77565fabfb6286fbc60f4aaf843bc74c72b3ff2e1d5087e4dcbd92e" => :mojave - sha256 "8dad06d6eea6ec145763819d982916d590edd45b40e4c91e328bba76f0aac0bf" => :high_sierra - end - - depends_on "python@3.8" - depends_on "xz" # required for lzma support - - conflicts_with "gdb", :because => "both install include/gdb, share/gdb and share/info" - - def install - args = %W[ - --target=i386-elf - --prefix=#{prefix} - --disable-debug - --disable-dependency-tracking - --with-lzma - --with-python=#{Formula["python@3.8"].opt_bin}/python3 - --disable-binutils - ] - - mkdir "build" do - system "../configure", *args - system "make" - - # Don't install bfd or opcodes, as they are provided by binutils - system "make", "install-gdb" - end - end - - test do - system "#{bin}/i386-elf-gdb", "#{bin}/i386-elf-gdb", "-configuration" - end -end diff --git a/Formula/i386-elf-grub.rb b/Formula/i386-elf-grub.rb deleted file mode 100644 index 72da4c0e3e4bf..0000000000000 --- a/Formula/i386-elf-grub.rb +++ /dev/null @@ -1,52 +0,0 @@ -class I386ElfGrub < Formula - desc "GNU GRUB 2 for i386-elf" - homepage "https://www.gnu.org/software/grub/" - url "https://ftp.gnu.org/gnu/grub/grub-2.04.tar.xz" - sha256 "e5292496995ad42dabe843a0192cf2a2c502e7ffcc7479398232b10a472df77d" - license "GPL-3.0" - - bottle do - sha256 "5830d46cdc02c4667b253cbccf2310d7cddbf779658193ab949c0b2447eb20be" => :catalina - sha256 "00be811dfc11c92ba89e6383ec1afb621b5f92e01d744e0c51bb07c459cecdd4" => :mojave - sha256 "14d011e73fe7ea1272ec3ddb229b29fdc86c20fbbb59fb9bc6bbf3bfd34f830f" => :high_sierra - sha256 "6631f2c897378798fb03472e306d4ae6d6ac44c2e4e629599b06978b4ed1ce19" => :sierra - end - - depends_on "i386-elf-binutils" => :build - depends_on "i386-elf-gcc" => :build - - resource ("image") do - url "https://raw.githubusercontent.com/MRNIU/tools/master/kernel.kernel" - sha256 "ac0e87c8a612fdfd4ce4c7f0a2161b5d156972d757c781cc5690735303861abf" - end - - def install - mkdir "build" do - system "../configure", "--target=i386-elf", - "--prefix=#{prefix}", - "--program-prefix=i386-elf-", - "--disable-werror", - "TARGET_CC=i386-elf-gcc", - "TARGET_OBJCOPY=i386-elf-objcopy", - "TARGET_STRIP=i386-elf-strip", - "TARGET_NM=i386-elf-nm", - "TARGET_RANLIB=i386-elf-ranlib" - - # ../grub-core/osdep/generic/blocklist.c:62:67: error: use of undeclared identifier 'FILE_TYPE_NO_DECOMPRESS'; - # did you mean 'GRUB_FILE_TYPE_NO_DECOMPRESS'? - # - # Upstream issue has been reported at https://www.mail-archive.com/grub-devel@gnu.org/msg29007.html - inreplace buildpath/"grub-core/osdep/generic/blocklist.c", - "FILE_TYPE_NO_DECOMPRESS", "GRUB_FILE_TYPE_NO_DECOMPRESS" - - system "make" - system "make", "install" - end - end - - test do - resource("image").stage do - system bin/"i386-elf-grub-file", "--is-x86-multiboot2", "kernel.kernel" - end - end -end diff --git a/Formula/i686-elf-binutils.rb b/Formula/i686-elf-binutils.rb deleted file mode 100644 index 5fe24f490a1be..0000000000000 --- a/Formula/i686-elf-binutils.rb +++ /dev/null @@ -1,38 +0,0 @@ -class I686ElfBinutils < Formula - desc "GNU Binutils for i686-elf cross development" - homepage "https://www.gnu.org/software/binutils/" - url "https://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.gz" - mirror "https://ftpmirror.gnu.org/binutils/binutils-2.34.tar.gz" - sha256 "53537d334820be13eeb8acb326d01c7c81418772d626715c7ae927a7d401cab3" - license "GPL-2.0" - - bottle do - sha256 "c2d082bc08ccb4ce1c870a3e670670eb756f0da433c9a29246277d42814263c1" => :catalina - sha256 "eb5d102d5ed4cff2710d084d80a3ecba884d39364b7616df9944788090e517e7" => :mojave - sha256 "7b6014e9338df52a85c747915bafe09af2abba4d9688ac19dc3de73958e4bcde" => :high_sierra - end - - def install - system "./configure", "--target=i686-elf", - "--prefix=#{prefix}", - "--infodir=#{info}/i686-elf-binutils", - "--disable-nls" - system "make" - system "make", "install" - end - - test do - (testpath/"test-s.s").write <<~EOS - .section .data - .section .text - .globl _start - _start: - movl $1, %eax - movl $4, %ebx - int $0x80 - EOS - system "#{bin}/i686-elf-as", "--32", "-o", "test-s.o", "test-s.s" - assert_match "file format elf32-i386", - shell_output("#{bin}/i686-elf-objdump -a test-s.o") - end -end diff --git a/Formula/i686-elf-gcc.rb b/Formula/i686-elf-gcc.rb deleted file mode 100644 index 0c0b41a5e969f..0000000000000 --- a/Formula/i686-elf-gcc.rb +++ /dev/null @@ -1,55 +0,0 @@ -class I686ElfGcc < Formula - desc "The GNU compiler collection for i686-elf" - homepage "https://gcc.gnu.org/" - url "https://ftp.gnu.org/gnu/gcc/gcc-10.1.0/gcc-10.1.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gcc/gcc-10.1.0/gcc-10.1.0.tar.xz" - sha256 "b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2" - license "GPL-2.0" - - bottle do - sha256 "885c670f1284e93080919fa84bffe146d747c99cecf2c9f6f4e45fc457013141" => :catalina - sha256 "96bb7e4a8a16695feb1824adb6f1947ee6c25425c77c557ba125553eedbf029b" => :mojave - sha256 "e7c1d55d8f4f017cb270f5e8ee6354825da5eca941988b44dbe2555de9b7daa7" => :high_sierra - end - - depends_on "gmp" - depends_on "i686-elf-binutils" - depends_on "libmpc" - depends_on "mpfr" - - def install - mkdir "i686-elf-gcc-build" do - system "../configure", "--target=i686-elf", - "--prefix=#{prefix}", - "--infodir=#{info}/i686-elf-gcc", - "--disable-nls", - "--without-isl", - "--without-headers", - "--with-as=#{Formula["i686-elf-binutils"].bin}/i686-elf-as", - "--with-ld=#{Formula["i686-elf-binutils"].bin}/i686-elf-ld", - "--enable-languages=c,c++", - "SED=/usr/bin/sed" - 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 - (share/"man/man7").rmtree - end - end - - test do - (testpath/"test-c.c").write <<~EOS - int main(void) - { - int i=0; - while(i<10) i++; - return i; - } - EOS - system "#{bin}/i686-elf-gcc", "-c", "-o", "test-c.o", "test-c.c" - assert_match "file format elf32-i386", - shell_output("#{Formula["i686-elf-binutils"].bin}/i686-elf-objdump -a test-c.o") - end -end diff --git a/Formula/iam-policy-json-to-terraform.rb b/Formula/iam-policy-json-to-terraform.rb deleted file mode 100644 index 520a140337303..0000000000000 --- a/Formula/iam-policy-json-to-terraform.rb +++ /dev/null @@ -1,43 +0,0 @@ -class IamPolicyJsonToTerraform < Formula - desc "Convert a JSON IAM Policy into terraform" - homepage "https://github.com/flosell/iam-policy-json-to-terraform" - url "https://github.com/flosell/iam-policy-json-to-terraform/archive/1.5.0.tar.gz" - sha256 "9d58642d3f532c4334dc63f45e44ff9cae254360f977bca925f20033338fadcb" - license "Apache-2.0" - head "https://github.com/flosell/iam-policy-json-to-terraform.git" - - bottle do - cellar :any_skip_relocation - sha256 "d5aa3dea843226e508c13bd46c418d7d76e928d631863002054a0bd05b139a73" => :catalina - sha256 "b7d80897886195d53da78f483318c12c5873483faaf73bf42dc91dfe1d7ddfbc" => :mojave - sha256 "1ad4ad756d400206cc8583a53dc57e50139b45865118d13594c5cc4acef7ff75" => :high_sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOOS"] = "darwin" - - dir = buildpath/"src/github.com/flosell/iam-policy-json-to-terraform" - dir.install buildpath.children - cd "src/github.com/flosell/iam-policy-json-to-terraform" do - # system "go", "build", "-o", "iam-policy-json-to-terraform", "*.go" - system "make", "iam-policy-json-to-terraform_darwin" - mv "iam-policy-json-to-terraform_darwin", "iam-policy-json-to-terraform" - bin.install "iam-policy-json-to-terraform" - prefix.install_metafiles - end - end - - test do - # test version - assert_match version.to_s, shell_output("#{bin}/iam-policy-json-to-terraform -version") - - # test functionality - test_input = '{"Statement":[{"Effect":"Allow","Action":["ec2:Describe*"],"Resource":"*"}]}' - output = shell_output("echo '#{test_input}' | #{bin}/iam-policy-json-to-terraform") - assert_match "ec2:Describe*", output - end -end diff --git a/Formula/iamy.rb b/Formula/iamy.rb deleted file mode 100644 index 2c35624ef9705..0000000000000 --- a/Formula/iamy.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Iamy < Formula - desc "AWS IAM import and export tool" - homepage "https://github.com/99designs/iamy" - url "https://github.com/99designs/iamy/archive/v2.3.2.tar.gz" - sha256 "66d44dd6af485b2b003b0aa1c8dcd799f7bae934f1ce1efb7e5d5f6cfe7f8bf2" - license "MIT" - head "https://github.com/99designs/iamy.git" - - bottle do - cellar :any_skip_relocation - sha256 "a74e94857f4b788918ac74f9ef20c3c6c19a0e1164522a4591165b0d070795a4" => :catalina - sha256 "d24e802f1fc572c7d49620531e57a5e143956b2ce1e1d05b2320167b09fbf875" => :mojave - sha256 "aac8b68119dad48d8aca16a2355cc5c8605e8b1fe44b18e5eb8326216873d657" => :high_sierra - sha256 "1d22caa158fea3cb67ca07ef5f0785dc9f8568470d0323a5958229ed1f650f6c" => :sierra - end - - depends_on "go" => :build - depends_on "awscli" - - def install - ENV["GOPATH"] = buildpath - src = buildpath/"src/github.com/99designs/iamy" - src.install buildpath.children - src.cd do - system "go", "build", "-o", bin/"iamy", "-ldflags", - "-X main.Version=v#{version}" - prefix.install_metafiles - end - end - - test do - ENV.delete "AWS_ACCESS_KEY" - ENV.delete "AWS_SECRET_KEY" - output = shell_output("#{bin}/iamy pull 2>&1", 1) - assert_match "Can't determine the AWS account", output - end -end diff --git a/Formula/iat.rb b/Formula/iat.rb deleted file mode 100644 index 83f1ac3bbdafd..0000000000000 --- a/Formula/iat.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Iat < Formula - desc "Converts many CD-ROM image formats to ISO9660" - homepage "https://sourceforge.net/projects/iat.berlios/" - url "https://downloads.sourceforge.net/project/iat.berlios/iat-0.1.7.tar.bz2" - sha256 "fb72c42f4be18107ec1bff8448bd6fac2a3926a574d4950a4d5120f0012d62ca" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "6400e0c863f951cf324e9630ad9de91cc099e5d3f9cfd34f3cfa4344eb747cf3" => :catalina - sha256 "e10169c9c7101efb0cfa7670cadbed74dde199b1a8d034f73e906f897be1bbc2" => :mojave - sha256 "799764ef75d9efdf93f92a2fbc2beaedecd6037eae45eaaf7ce888c2ef2b3eb3" => :high_sierra - sha256 "97d378d0b0ee8bb685272d126a54c833ad8d9f7f3ab34631198d054d2f1d0bdf" => :sierra - sha256 "baadc7c40697b28b46c7541d617f65ee318b78efbdc4156c6527490616fd2dee" => :el_capitan - sha256 "db517ebd84afdeabaf2e130faccb88f33f359d13eab3bfbb5e19013051ca7827" => :yosemite - sha256 "31eb7a245b5ee29b983017b572bb6895abda8f32101b402889a96b0f316abe45" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", - "--includedir=#{include}/iat" - system "make", "install" - end - - test do - system "#{bin}/iat", "--version" - end -end diff --git a/Formula/ibex.rb b/Formula/ibex.rb deleted file mode 100644 index 6d7b664524803..0000000000000 --- a/Formula/ibex.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Ibex < Formula - desc "C++ library for constraint processing over real numbers" - homepage "https://web.archive.org/web/20190826220512/www.ibex-lib.org/" - url "https://github.com/ibex-team/ibex-lib/archive/ibex-2.8.7.tar.gz" - sha256 "b80da9f6edecaf93edc00c7e7c630ae6cf934ce9ce061debb630f027e69b5c97" - license "LGPL-3.0" - head "https://github.com/ibex-team/ibex-lib.git" - - bottle do - cellar :any - sha256 "0de9cd95f329d455905ef0d562c4bf116b7a634adc70296830da39259b21130f" => :catalina - sha256 "ffebafe7aec3708cf61e3f248c891cca974d904c0e987294e45cbf0bf612d13b" => :mojave - sha256 "91500e1cd76da6db5afa6e5c0ac70ccf09b2ce3036d4544b2abd21a4ec3beb78" => :high_sierra - end - - depends_on "bison" => :build - depends_on "flex" => :build - depends_on "pkg-config" => [:build, :test] - depends_on :macos # Due to Python 2 - - uses_from_macos "zlib" - - def install - ENV.cxx11 - - # Reported 9 Oct 2017 https://github.com/ibex-team/ibex-lib/issues/286 - ENV.deparallelize - - system "./waf", "configure", "--prefix=#{prefix}", - "--enable-shared", - "--lp-lib=soplex", - "--with-optim" - system "./waf", "install" - - pkgshare.install %w[examples benchs/solver] - (pkgshare/"examples/symb01.txt").write <<~EOS - function f(x) - return ((2*x,-x);(-x,3*x)); - end - EOS - end - - test do - ENV.cxx11 - - cp_r (pkgshare/"examples").children, testpath - - # so that pkg-config can remain a build-time only dependency - inreplace %w[makefile slam/makefile] do |s| - s.gsub!(/CXXFLAGS.*pkg-config --cflags ibex./, - "CXXFLAGS := -I#{include} -I#{include}/ibex "\ - "-I#{include}/ibex/3rd") - s.gsub!(/LIBS.*pkg-config --libs ibex./, "LIBS := -L#{lib} -libex") - end - - (1..8).each do |n| - system "make", "lab#{n}" - system "./lab#{n}" - end - - (1..3).each do |n| - system "make", "-C", "slam", "slam#{n}" - system "./slam/slam#{n}" - end - end -end diff --git a/Formula/iblinter.rb b/Formula/iblinter.rb deleted file mode 100644 index c12e9bba73fa5..0000000000000 --- a/Formula/iblinter.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Iblinter < Formula - desc "Linter tool for Interface Builder" - homepage "https://github.com/IBDecodable/IBLinter" - url "https://github.com/IBDecodable/IBLinter/archive/0.4.23.tar.gz" - sha256 "f39241980244cb97fccb11ef3aac6b6deb9c6cfbcf1253e1280f18499c43e739" - license "MIT" - head "https://github.com/IBDecodable/IBLinter.git" - - bottle do - cellar :any_skip_relocation - sha256 "317e711f65b4a62562f8d32834cbd1c7c0a20fca44c5d3f9cc34974848a5a1e2" => :catalina - sha256 "7bbba8112111c1923eb9a2e0234d0630aa20a0f9fa34944260e4951f291ff9ba" => :mojave - end - - depends_on :xcode => ["10.2", :build] - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - # Test by showing the help scree - system "#{bin}/iblinter", "help" - - # Test by linting file - (testpath/".iblinter.yml").write <<~EOS - ignore_cache: true - enabled_rules: [ambiguous] - EOS - - (testpath/"Test.xib").write <<~EOS - - - - - - - - - EOS - - assert_match "#{testpath}/Test.xib:0:0: error: UIView (iGg-Eg-h0O) has ambiguous constraints", - shell_output("#{bin}/iblinter lint --config #{testpath}/.iblinter.yml --path #{testpath}", 2).chomp - end -end diff --git a/Formula/ical-buddy.rb b/Formula/ical-buddy.rb deleted file mode 100644 index aafe0bfee3f88..0000000000000 --- a/Formula/ical-buddy.rb +++ /dev/null @@ -1,22 +0,0 @@ -class IcalBuddy < Formula - desc "Get events and tasks from the macOS calendar database" - homepage "https://hasseg.org/icalBuddy/" - url "https://github.com/DavidKaluta/icalBuddy64/releases/download/v1.10.1/icalBuddy-v1.10.1.zip" - sha256 "720a6a3344ce32c2cab7c3d2b686ad8de8d9744b747ac48b275247ed54cb3945" - head "https://github.com/DavidKaluta/icalBuddy64.git" - - bottle do - cellar :any_skip_relocation - sha256 "4f621e8b12e2c2e5e7c9fdd97ee973b7d4b14ce58eb5a5f7a9db32243f0f99f1" => :catalina - sha256 "4f621e8b12e2c2e5e7c9fdd97ee973b7d4b14ce58eb5a5f7a9db32243f0f99f1" => :mojave - sha256 "4f621e8b12e2c2e5e7c9fdd97ee973b7d4b14ce58eb5a5f7a9db32243f0f99f1" => :high_sierra - end - - def install - args = %W[icalBuddy icalBuddy.1 icalBuddyLocalization.1 - icalBuddyConfig.1 COMPILER=#{ENV.cc}] - system "make", *args - bin.install "icalBuddy" - man1.install Dir["*.1"] - end -end diff --git a/Formula/icarus-verilog.rb b/Formula/icarus-verilog.rb deleted file mode 100644 index 52aea5b208dc7..0000000000000 --- a/Formula/icarus-verilog.rb +++ /dev/null @@ -1,51 +0,0 @@ -class IcarusVerilog < Formula - desc "Verilog simulation and synthesis tool" - homepage "http://iverilog.icarus.com/" - url "https://github.com/steveicarus/iverilog/archive/v10_3.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/i/iverilog/iverilog_10.3.orig.tar.gz" - sha256 "4b884261645a73b37467242d6ae69264fdde2e7c4c15b245d902531efaaeb234" - license "LGPL-2.1" - head "https://github.com/steveicarus/iverilog.git" - - bottle do - sha256 "bf40a384b8432dfb72276e31e87d550b9b47515dc68bdfb25f0cde9becd4ac10" => :catalina - sha256 "0237851e478bcb76567111f14c1e42fe79161a8cd28ca04127295fc40db14113" => :mojave - sha256 "96a15af23212d29f9410e073418c9388447955245fa8c38cf3b27ccf8fabd178" => :high_sierra - sha256 "ded40d14a1cd74f2b764d9cf667d48ee8b6c010e77d88ca47afc99188ace1255" => :sierra - end - - depends_on "autoconf" => :build - # parser is subtly broken when processed with an old version of bison - depends_on "bison" => :build - - uses_from_macos "flex" => :build - uses_from_macos "bzip2" - uses_from_macos "zlib" - - def install - system "autoconf" - system "./configure", "--prefix=#{prefix}" - # https://github.com/steveicarus/iverilog/issues/85 - ENV.deparallelize - system "make", "install", "BISON=#{Formula["bison"].opt_bin}/bison" - end - - test do - (testpath/"test.v").write <<~EOS - module main; - initial - begin - $display("Boop"); - $finish; - end - endmodule - EOS - system bin/"iverilog", "-otest", "test.v" - assert_equal "Boop", shell_output("./test").chomp - - # test syntax errors do not cause segfaults - (testpath/"error.v").write "error;" - assert_equal "-:1: error: variable declarations must be contained within a module.", - shell_output("#{bin}/iverilog error.v 2>&1", 1).chomp - end -end diff --git a/Formula/icbirc.rb b/Formula/icbirc.rb deleted file mode 100644 index aa36a2bdd2bd3..0000000000000 --- a/Formula/icbirc.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Icbirc < Formula - desc "Proxy IRC client and ICB server" - homepage "https://www.benzedrine.ch/icbirc.html" - url "https://www.benzedrine.ch/icbirc-2.1.tar.gz" - sha256 "6839344d93c004da97ec6bb5d805a1db7e0a79efc3870445788043627162bbb1" - - bottle do - cellar :any_skip_relocation - sha256 "c1a639673100e6c8f2f5116b11c4c7a8b38cc0af73841c4d13e611f7605a8c1e" => :catalina - sha256 "c353062cf16183b658ca999e477f2f4ac6040dd8d3a995fe2736a382d989ca8e" => :mojave - sha256 "e258e2ca2bf835d76b7d509eac5417629451068c85fe729cbab7fc64e89df9c0" => :high_sierra - sha256 "cbec4e472c640a63081f12723fc9d144f00aa00c9229ce5bfc2edd99199aee74" => :sierra - sha256 "2f943e4af7a9c1e2524d9583b0ef5539988f68f56a8f8c483b2c2d1990fff21d" => :el_capitan - sha256 "c4fdfe55febee01d5fc84bdc7bb49ad6bb2366f6f5a54dfbb851ee891a67c5a3" => :yosemite - end - - depends_on "bsdmake" => :build - - def install - system "bsdmake" - bin.install "icbirc" - man8.install "icbirc.8" - end -end diff --git a/Formula/icdiff.rb b/Formula/icdiff.rb deleted file mode 100644 index dbdfd21e491e8..0000000000000 --- a/Formula/icdiff.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Icdiff < Formula - desc "Improved colored diff" - homepage "https://github.com/jeffkaufman/icdiff" - url "https://github.com/jeffkaufman/icdiff/archive/release-1.9.5.tar.gz" - sha256 "f2e3df30e93df92224538ef3c62a73891af92de4caf94e8117582835e1040fc7" - head "https://github.com/jeffkaufman/icdiff.git" - - bottle :unneeded - - def install - bin.install "icdiff", "git-icdiff" - end - - test do - (testpath/"file1").write "test1" - (testpath/"file2").write "test2" - system "#{bin}/icdiff", "file1", "file2" - system "git", "init" - system "#{bin}/git-icdiff" - end -end diff --git a/Formula/ice.rb b/Formula/ice.rb deleted file mode 100644 index 908ab64c83c68..0000000000000 --- a/Formula/ice.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Ice < Formula - desc "Comprehensive RPC framework" - homepage "https://zeroc.com/" - url "https://github.com/zeroc-ice/ice/archive/v3.7.4.tar.gz" - sha256 "57f200bd2916799bce12960e579d9f9e5b6a9801addaf93d97bb4ce15c760a44" - - bottle do - cellar :any - sha256 "ed026c50e889b8eab856b8310d9b57a5a09487775b85e0fd3a745c3703234aa3" => :catalina - sha256 "d8ddc0c493286e78174f61eb8feb7af105c6c4b33580435f6df4515aefa56b0a" => :mojave - sha256 "d80dfe41a72184cfb820940e926acd8204d5338327b0ff1007fe77e7662a8164" => :high_sierra - end - - depends_on "lmdb" - depends_on "mcpp" - - def install - ENV.O2 # Os causes performance issues - - args = [ - "prefix=#{prefix}", - "V=1", - "MCPP_HOME=#{Formula["mcpp"].opt_prefix}", - "LMDB_HOME=#{Formula["lmdb"].opt_prefix}", - "CONFIGS=shared cpp11-shared xcodesdk cpp11-xcodesdk", - "PLATFORMS=all", - "SKIP=slice2confluence", - "LANGUAGES=cpp objective-c", - ] - system "make", "install", *args - - (libexec/"bin").mkpath - %w[slice2py slice2rb slice2js].each do |r| - mv bin/r, libexec/"bin" - end - end - - def caveats - <<~EOS - slice2py, slice2js and slice2rb were installed in: - - #{opt_libexec}/bin - - You may wish to add this directory to your PATH. - EOS - end - - test do - (testpath / "Hello.ice").write <<~EOS - module Test - { - interface Hello - { - void sayHello(); - } - } - EOS - (testpath / "Test.cpp").write <<~EOS - #include - #include - - class HelloI : public Test::Hello - { - public: - virtual void sayHello(const Ice::Current&) override {} - }; - - int main(int argc, char* argv[]) - { - Ice::CommunicatorHolder ich(argc, argv); - auto adapter = ich->createObjectAdapterWithEndpoints("Hello", "default -h localhost -p 10000"); - adapter->add(std::make_shared(), Ice::stringToIdentity("hello")); - adapter->activate(); - return 0; - } - EOS - system "#{bin}/slice2cpp", "Hello.ice" - system ENV.cxx, "-DICE_CPP11_MAPPING", "-std=c++11", "-c", "-I#{include}", "-I.", "Hello.cpp" - system ENV.cxx, "-DICE_CPP11_MAPPING", "-std=c++11", "-c", "-I#{include}", "-I.", "Test.cpp" - system ENV.cxx, "-L#{lib}", "-o", "test", "Test.o", "Hello.o", "-lIce++11" - system "./test" - end -end diff --git a/Formula/icecast.rb b/Formula/icecast.rb deleted file mode 100644 index dd7c3beb018fa..0000000000000 --- a/Formula/icecast.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Icecast < Formula - desc "Streaming MP3 audio server" - homepage "https://icecast.org/" - url "https://downloads.xiph.org/releases/icecast/icecast-2.4.4.tar.gz" - sha256 "49b5979f9f614140b6a38046154203ee28218d8fc549888596a683ad604e4d44" - revision 1 - - bottle do - cellar :any - sha256 "824f7d295c28fbdb17da3015b4e4d6ca76be536f6bf81e98d5312dd7b9a095cd" => :catalina - sha256 "3fb3b8c1e995a9c39a56ecd91a42cc0187f3bb2541c1abb4d0b7fc922da9cb95" => :mojave - sha256 "a498fdc056b3afbb14b3138586f5dca3b0c1bae523c909c0b9383d5c5f4b02ca" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libvorbis" - depends_on "openssl@1.1" - - uses_from_macos "curl" - uses_from_macos "libxslt" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}" - system "make", "install" - end - - def post_install - (var/"log/icecast").mkpath - touch var/"log/icecast/access.log" - touch var/"log/icecast/error.log" - end - - test do - port = free_port - - cp etc/"icecast.xml", testpath/"icecast.xml" - inreplace testpath/"icecast.xml", "8000", "#{port}" - - pid = fork do - exec "icecast", "-c", testpath/"icecast.xml", "2>", "/dev/null" - end - sleep 3 - - begin - assert_match "icestats", shell_output("curl localhost:#{port}/status-json.xsl") - ensure - Process.kill "TERM", pid - Process.wait pid - end - end -end diff --git a/Formula/icecream.rb b/Formula/icecream.rb deleted file mode 100644 index a1d06baae9bfa..0000000000000 --- a/Formula/icecream.rb +++ /dev/null @@ -1,130 +0,0 @@ -class Icecream < Formula - desc "Distributed compiler with a central scheduler to share build load" - homepage "https://en.opensuse.org/Icecream" - url "https://github.com/icecc/icecream/archive/1.3.1.tar.gz" - sha256 "9f45510fb2251d818baebcff19051c1cf059e48c6b830fb064a8379480159b9d" - license "GPL-2.0" - - bottle do - sha256 "666f827a6a686e6d2e81dc1d0eb5aae8374f01d7d1524ef6c695e3bf207c4af5" => :catalina - sha256 "fb94b2d8e763469a2b0112523f89496f4a81e22ed9b7290f4280178f726853da" => :mojave - sha256 "6cc11bcddd969e9aeb7e83692e9714d5891f0530bacbc1c52b019b298bce3d24" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "docbook2x" => :build - depends_on "libtool" => :build - depends_on "libarchive" - depends_on "lzo" - depends_on "zstd" - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --enable-clang-wrappers - ] - - system "./autogen.sh" - system "./configure", *args - system "make", "install" - - # Manually install scheduler property list - (prefix/"#{plist_name}-scheduler.plist").write scheduler_plist - end - - def caveats - <<~EOS - To override the toolset with icecc, add to your path: - #{opt_libexec}/icecc/bin - EOS - end - - plist_options :manual => "iceccd" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{sbin}/iceccd - - RunAtLoad - - - - EOS - end - - def scheduler_plist - <<~EOS - - - - - Label - #{plist_name}-scheduler - ProgramArguments - - #{sbin}/icecc-scheduler - - RunAtLoad - - - - EOS - end - - test do - (testpath/"hello-c.c").write <<~EOS - #include - int main() - { - puts("Hello, world!"); - return 0; - } - EOS - system opt_libexec/"icecc/bin/gcc", "-o", "hello-c", "hello-c.c" - assert_equal "Hello, world!\n", shell_output("./hello-c") - - (testpath/"hello-cc.cc").write <<~EOS - #include - int main() - { - std::cout << "Hello, world!" << std::endl; - return 0; - } - EOS - system opt_libexec/"icecc/bin/g++", "-o", "hello-cc", "hello-cc.cc" - assert_equal "Hello, world!\n", shell_output("./hello-cc") - - (testpath/"hello-clang.c").write <<~EOS - #include - int main() - { - puts("Hello, world!"); - return 0; - } - EOS - system opt_libexec/"icecc/bin/clang", "-o", "hello-clang", "hello-clang.c" - assert_equal "Hello, world!\n", shell_output("./hello-clang") - - (testpath/"hello-cclang.cc").write <<~EOS - #include - int main() - { - std::cout << "Hello, world!" << std::endl; - return 0; - } - EOS - system opt_libexec/"icecc/bin/clang++", "-o", "hello-cclang", "hello-cclang.cc" - assert_equal "Hello, world!\n", shell_output("./hello-cclang") - end -end diff --git a/Formula/icemon.rb b/Formula/icemon.rb deleted file mode 100644 index 9ee037bbcc9c4..0000000000000 --- a/Formula/icemon.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Icemon < Formula - desc "Icecream GUI Monitor" - homepage "https://github.com/icecc/icemon" - url "https://github.com/icecc/icemon/archive/v3.3.tar.gz" - sha256 "3caf14731313c99967f6e4e11ff261b061e4e3d0c7ef7565e89b12e0307814ca" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "4a5b08e5bc831130b26e21e81456c56b01f3ca391ff822785fe4b2a9f005132e" => :catalina - sha256 "0752b2d25bb1371bf42fd8a049b6c10d6e289d74cf6d9409dd9b268a4da70722" => :mojave - sha256 "785d0af0e6f9900aa7bd1c60309385da28dee75380dd47a449286dae7e6c3df2" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - depends_on "icecream" - depends_on "lzo" - depends_on "qt" - - resource "ecm" do - url "https://github.com/KDE/extra-cmake-modules/archive/v5.62.0.tar.gz" - sha256 "b3da80738ec793e8052819c53464244ff04a0705d92e8143b11d1918df9e970b" - end - - def install - resource("ecm").stage do - cmake_args = std_cmake_args.reject { |s| s["CMAKE_INSTALL_PREFIX"] } - system "cmake", ".", - "-DCMAKE_INSTALL_PREFIX=#{buildpath}/ecm", - *cmake_args - system "make", "install" - end - system "cmake", ".", "-DECM_DIR=ecm/share/ECM/cmake", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/icemon", "--version" - end -end diff --git a/Formula/icon-naming-utils.rb b/Formula/icon-naming-utils.rb deleted file mode 100644 index 53be7594f3bd9..0000000000000 --- a/Formula/icon-naming-utils.rb +++ /dev/null @@ -1,27 +0,0 @@ -class IconNamingUtils < Formula - desc "Script to handle icon names in desktop icon themes" - homepage "https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html" - # Upstream seem to have enabled by default SSL/TLS across whole domain which - # is problematic when the cert is for www rather than a wildcard or similar. - # url "http://tango.freedesktop.org/releases/icon-naming-utils-0.8.90.tar.gz" - url "https://deb.debian.org/debian/pool/main/i/icon-naming-utils/icon-naming-utils_0.8.90.orig.tar.gz" - sha256 "044ab2199ed8c6a55ce36fd4fcd8b8021a5e21f5bab028c0a7cdcf52a5902e1c" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "6ed447fa2e57d32cc048b551ee67339d2be52d89f124e9dfddb3322cc0882883" => :catalina - sha256 "7845482b7512d560f5363c75ae0e6d457bb22d9f2bd1820052b580f65a689a1f" => :mojave - sha256 "1ab22bc216fc60fe05436993a1d451542a5f57a12ecf835c85f5c850574e54f3" => :high_sierra - sha256 "d824a2df63a9615bb242c197af07ce18f6a6a046df9c785fe31d5f39d986f4ed" => :sierra - sha256 "f8a29d74289a555ba7969b8d8f6984de7251393d7d0270e61abf69d36f270fc0" => :el_capitan - sha256 "22a80ba1d9042481251c8b85aa46dc163abfd9a54d6815ab43a3a5124592be5f" => :yosemite - sha256 "1e2f32f1e755df8a974482ad56c0cc85f7d537005419b0c0c42013f0f0ab717d" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/icon.rb b/Formula/icon.rb deleted file mode 100644 index 06137c5faaa94..0000000000000 --- a/Formula/icon.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Icon < Formula - desc "General-purpose programming language" - homepage "https://www.cs.arizona.edu/icon/" - url "https://www2.cs.arizona.edu/icon/ftp/packages/unix/icon-v951src.tgz" - version "9.5.1" - sha256 "062a680862b1c10c21789c0c7c7687c970a720186918d5ed1f7aad9fdc6fa9b9" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "a4f708b77cf3147ad2bc029577a7f56aa4cd2a4d192e9fc0a28eb34dcc08775f" => :catalina - sha256 "3b97859fb6ac03f3420628fef5d660fbbf6208f642a979307b6bc85e063eb5c3" => :mojave - sha256 "f0f50c06a2355371e01ea83f95a1743d94815f3029c0d74ce5888f446c07ab18" => :high_sierra - end - - def install - ENV.deparallelize - system "make", "Configure", "name=posix" - system "make" - bin.install "bin/icon", "bin/icont", "bin/iconx" - doc.install Dir["doc/*"] - man1.install Dir["man/man1/*.1"] - end - - test do - args = "'procedure main(); writes(\"Hello, World!\"); end'" - output = shell_output("#{bin}/icon -P #{args}") - assert_equal "Hello, World!", output - end -end diff --git a/Formula/icoutils.rb b/Formula/icoutils.rb deleted file mode 100644 index 7f133be9cdc49..0000000000000 --- a/Formula/icoutils.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Icoutils < Formula - desc "Create and extract MS Windows icons and cursors" - homepage "https://www.nongnu.org/icoutils/" - url "https://savannah.nongnu.org/download/icoutils/icoutils-0.32.3.tar.bz2" - sha256 "17abe02d043a253b68b47e3af69c9fc755b895db68fdc8811786125df564c6e0" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "67e11f8966ff949902c637dccea47ee5ee341128519050f31f6c87eb74264d99" => :catalina - sha256 "c22bed7e3ad43221011658fb8acd08481dccd11b0cc5750e6a21502d7da51fb9" => :mojave - sha256 "50b8adff5f3364626026d19fba9a0c9fef8cf93104b8d6907bcbe8a5f4a136c2" => :high_sierra - sha256 "1a3656f2fcf778aa32eb734a60dfceccd5e1a702fa6558b11b33cc6f44aeba99" => :sierra - sha256 "fb93eb5cfa6b222e77ec07569f501fcc03143e9decf306ebd21e9d1c6d304bce" => :el_capitan - end - - depends_on "libpng" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-rpath", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"icotool", "-l", test_fixtures("test.ico") - end -end diff --git a/Formula/icu4c.rb b/Formula/icu4c.rb deleted file mode 100644 index c6d2874732c07..0000000000000 --- a/Formula/icu4c.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Icu4c < Formula - desc "C/C++ and Java libraries for Unicode and globalization" - homepage "http://site.icu-project.org/home" - url "https://github.com/unicode-org/icu/releases/download/release-67-1/icu4c-67_1-src.tgz" - version "67.1" - sha256 "94a80cd6f251a53bd2a997f6f1b5ac6653fe791dfab66e1eb0227740fb86d5dc" - - bottle do - cellar :any - sha256 "2d1e91b5127f66e7941790c004817c94c892725c88f84f1e4c37297fcbc0c72f" => :catalina - sha256 "b6069459c78f18045ee922ce5cb5b235d4b479597d79c3c298d09e0de3d70794" => :mojave - sha256 "0720bd47f020d5ca895ae79eb61623ed3c7de0d4c4f221613105f47147aec01f" => :high_sierra - end - - keg_only :provided_by_macos, "macOS provides libicucore.dylib (but nothing else)" - - def install - args = %W[ - --prefix=#{prefix} - --disable-samples - --disable-tests - --enable-static - --with-library-bits=64 - ] - - cd "source" do - system "./configure", *args - system "make" - system "make", "install" - end - end - - test do - system "#{bin}/gendict", "--uchars", "/usr/share/dict/words", "dict" - end -end diff --git a/Formula/id3ed.rb b/Formula/id3ed.rb deleted file mode 100644 index d3daa8551165b..0000000000000 --- a/Formula/id3ed.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Id3ed < Formula - desc "ID3 tag editor for MP3 files" - homepage "http://code.fluffytapeworm.com/projects/id3ed" - url "http://code.fluffytapeworm.com/projects/id3ed/id3ed-1.10.4.tar.gz" - sha256 "56f26dfde7b6357c5ad22644c2a379f25fce82a200264b5d4ce62f2468d8431b" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "9520d236327bce01cc292421934e19476163d8d72b4848740d3067cbc71b2572" => :catalina - sha256 "2079b26fd26395f4eb016c61afafa007045d7b87b5030b05650705959c3bd87a" => :mojave - sha256 "c31762b13640d1e9713ea26df41d5e9cb675a8d3565cd84b70efc526663ddfb8" => :high_sierra - sha256 "e930552e37599e7926efebaf0d893f888576a26bddef6a91e356cf1b5de15b9e" => :sierra - sha256 "6448c8e19c8e0874ed5141193c7db06c443ac6c33ab2f6bbe8811098b063c0d1" => :el_capitan - sha256 "8ca64da5c8c0cbbc7ec64af436fcf3a7ae457c8d8a8073887fc63ec4e89c98b9" => :yosemite - sha256 "8dd4a14922e94245dd016a266aa23c7bcebb18a56e574c8179df83c2d68ff23c" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--bindir=#{bin}/", - "--mandir=#{man1}" - bin.mkpath - man1.mkpath - system "make", "install" - end - - test do - system "#{bin}/id3ed", "-r", "-q", test_fixtures("test.mp3") - end -end diff --git a/Formula/id3lib.rb b/Formula/id3lib.rb deleted file mode 100644 index 555100ebb3979..0000000000000 --- a/Formula/id3lib.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Id3lib < Formula - desc "ID3 tag manipulation" - homepage "https://id3lib.sourceforge.io/" - revision 1 - head ":pserver:anonymous:@id3lib.cvs.sourceforge.net:/cvsroot/id3lib", - :using => :cvs, :module => "id3lib-devel" - - stable do - url "https://downloads.sourceforge.net/project/id3lib/id3lib/3.8.3/id3lib-3.8.3.tar.gz" - sha256 "2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079" - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/id3lib-vbr-overflow.patch" - sha256 "0ec91c9d89d80f40983c04147211ced8b4a4d8a5be207fbe631f5eefbbd185c2" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/id3lib-main.patch" - sha256 "83c8d2fa54e8f88b682402b2a8730dcbcc8a7578681301a6c034fd53e1275463" - end - end - - bottle do - cellar :any - sha256 "914ff24e2ca015f81b5c58fbd39f1a059c10ecbca87d09cf7e77285435bd158e" => :catalina - sha256 "fa00373e74d0b57967108dd48b652bf6750c742db31ab72ff9b7c8c777ba181e" => :mojave - sha256 "33c419dd2789c20e5e71b96185e41b2c81b2056d84b0e1a5cea0835e58dfb572" => :high_sierra - sha256 "1dddf1fac71acc4bd54cfcc6cdb80884129754d25f42efff5fbe6d5d38d99c0a" => :sierra - sha256 "266926f3fe3593bd04db9b9ff200676aaeb879d1f855e289cc41d2b40d72a16d" => :el_capitan - sha256 "6d255640321f499620cdac8c6645be5c74c6d67de9cf593506f5766b0adf9ddb" => :yosemite - sha256 "0eaeb0ed5fe1a86af5ffa34d4d5a96b91b97ccfc525fd471dc38a63d2585ad77" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/no-iomanip.h.patch" - sha256 "da0bd9f3d17f1dd054720c17dfd15062eabdfc4d38126bb1b2ef5e8f39904925" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/automake.patch" - sha256 "c1ae2aa04baee7f92301cbed120340682e62e1f839bb61f8f6d3c459a7faf097" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/boolcheck.patch" - sha256 "a7881dc25665f284798934ba19092d1eb45ca515a34e5c473accd144aa1a215a" - end - - # fixes Unicode display problem in easytag: see Homebrew/homebrew-x11#123 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e223e971/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff" - sha256 "71c79002d9485965a3a93e87ecbd7fed8f89f64340433b7ccd263d21385ac969" - end - - def install - system "autoreconf", "-fvi" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/id3tool.rb b/Formula/id3tool.rb deleted file mode 100644 index 940982f357ce0..0000000000000 --- a/Formula/id3tool.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Id3tool < Formula - desc "ID3 editing tool" - homepage "http://nekohako.xware.cx/id3tool/" - url "http://nekohako.xware.cx/id3tool/id3tool-1.2a.tar.gz" - sha256 "7908d66c5aabe2a53ae8019e8234f4231485d80be4b2fe72c9d04013cff1caec" - - bottle do - cellar :any_skip_relocation - sha256 "ec3431bcd97a7852c292f72d45de19ad742a2e18bc8d6830ce5fc6e2351a8d29" => :catalina - sha256 "053ce5a2222cac2bdecff1e97e73110af9cfbb199b77441ec5db19b4fc7ef1ae" => :mojave - sha256 "c98d949a63b2d26f6cff9d63d24ecdfbd48196f58111a9a244ec7319d2ea7c21" => :high_sierra - sha256 "2b7bcf184092881638221c606ae50879d02478bf9d433dc946f63dbe2e68368a" => :sierra - sha256 "b5b4d49b4710a67df5200149873dd8c17131ef4a4eaac722a2095b1445d053ff" => :el_capitan - sha256 "348a229d26dd699013d8e3372c5382da10b12d02d286304e61d9f2c71ed77101" => :yosemite - sha256 "dd989abacf0c1113879b6864a5ca08a59ac766a320897b9c323e5f7eaeeb2e70" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - mp3 = "#{testpath}/test.mp3" - cp test_fixtures("test.mp3"), mp3 - - system "#{bin}/id3tool", "-t", "Homebrew", mp3 - assert_match(/Song Title:\s+Homebrew/, - shell_output("#{bin}/id3tool #{mp3}").chomp) - end -end diff --git a/Formula/id3v2.rb b/Formula/id3v2.rb deleted file mode 100644 index 61cd76a17203b..0000000000000 --- a/Formula/id3v2.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Id3v2 < Formula - desc "Command-line editor" - homepage "https://id3v2.sourceforge.io/" - url "https://downloads.sourceforge.net/project/id3v2/id3v2/0.1.12/id3v2-0.1.12.tar.gz" - sha256 "8105fad3189dbb0e4cb381862b4fa18744233c3bbe6def6f81ff64f5101722bf" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "2476bad339650dc2c12e3dd074b3aba7058e9b3b07c9caf05d6f068ea216d9ef" => :catalina - sha256 "f0e2da49b513dce2ab73589b2aed98ae2cca184dbe082f92502d87e96ba9731d" => :mojave - sha256 "ca2c1296318425931c5eec52c70adf98665edeb19d5b681271c3b6353ddf171a" => :high_sierra - sha256 "3b1d75af49217a58f5ecb6f0e9e34564b299903898c76145218a6496de3a7778" => :sierra - sha256 "941e267b5a214013c8085c7918c0d8c1805c906cacf162191b764d2ae1df265f" => :el_capitan - sha256 "cd8dd2f943081a051214bf0eedb3c1431abf2bb060a528058e6b9d4c841995ce" => :yosemite - sha256 "129381e13539c589fce554a305f4c0a83763ae01865f8810c4145089969c51db" => :mavericks - end - - depends_on "id3lib" - - def install - # tarball includes a prebuilt Linux binary, which will get installed - # by `make install` if `make clean` isn't run first - system "make", "clean" - bin.mkpath - man1.mkpath - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/id3v2", "--version" - end -end diff --git a/Formula/ideviceinstaller.rb b/Formula/ideviceinstaller.rb deleted file mode 100644 index 224d1ceae68c0..0000000000000 --- a/Formula/ideviceinstaller.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Ideviceinstaller < Formula - desc "Tool for managing apps on iOS devices" - homepage "https://www.libimobiledevice.org/" - url "https://www.libimobiledevice.org/downloads/ideviceinstaller-1.1.1.tar.bz2" - sha256 "deb883ec97f2f88115aab39f701b83c843e9f2b67fe02f5e00a9a7d6196c3063" - - bottle do - cellar :any - sha256 "6ee12db78e8c224c0eb0cf88eb4f43242eb1ba672eb006636273b99b75b02a87" => :catalina - sha256 "6ed5e4f7ace33fd5f4d1b4c6b9f0fd519836080e170b981e63942087698351c6" => :mojave - sha256 "0dfe944eaa47cad87ad22f70dbbcefdb6b27bbeb83ca1f7a229827c03054c07c" => :high_sierra - end - - head do - url "https://git.sukimashita.com/ideviceinstaller.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libimobiledevice" - depends_on "libplist" - depends_on "libzip" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/ideviceinstaller --help |grep -q ^Usage" - end -end diff --git a/Formula/idnits.rb b/Formula/idnits.rb deleted file mode 100644 index 1ddf1a959bac1..0000000000000 --- a/Formula/idnits.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Idnits < Formula - desc "Looks for problems in internet draft formatting" - homepage "https://tools.ietf.org/tools/idnits/" - url "https://tools.ietf.org/tools/idnits/idnits-2.16.04.tgz" - sha256 "1eef34b131d9c0b45090192f972db0b5dae15047271a7962959c8019dd8cc06b" - - bottle :unneeded - - resource "test" do - url "https://tools.ietf.org/id/draft-ietf-tcpm-undeployed-03.txt" - sha256 "34e72c2c089409dc1935e18f75351025af3cfc253dee50db042d188b46733550" - end - - def install - bin.install "idnits" - end - - test do - resource("test").stage do - system "#{bin}/idnits", "draft-ietf-tcpm-undeployed-03.txt" - end - end -end diff --git a/Formula/idris.rb b/Formula/idris.rb deleted file mode 100644 index f5f98b9e9e061..0000000000000 --- a/Formula/idris.rb +++ /dev/null @@ -1,50 +0,0 @@ -require "language/haskell" - -class Idris < Formula - include Language::Haskell::Cabal - - desc "Pure functional programming language with dependent types" - homepage "https://www.idris-lang.org/" - url "https://github.com/idris-lang/Idris-dev/archive/v1.3.3.tar.gz" - sha256 "ad693614cc61a92bf51a33f5dc74f90b2eba91fd89064ec0580525e220556113" - head "https://github.com/idris-lang/Idris-dev.git" - - bottle do - sha256 "21957bdad1ae76da84a7bce2600eb8ee04e4237f5d2e207f9d17c1a36dcc0dfc" => :catalina - sha256 "34176d383858ef2eafc782a933625de1ad555d4c9d8c5c2f8153baf586b0a0ae" => :mojave - sha256 "8fa79b9a1e987385e64432dac32a619a654b934bce8f0e42217f579bb43580ad" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.6" => :build # 8.8 will be supported in the next release - depends_on "pkg-config" => :build - depends_on "libffi" - - def install - args = ["-f", "FFI"] - args << "-f" << "release" if build.stable? - install_cabal_package(*args) - end - - test do - (testpath/"hello.idr").write <<~EOS - module Main - main : IO () - main = putStrLn "Hello, Homebrew!" - EOS - - system bin/"idris", "hello.idr", "-o", "hello" - assert_equal "Hello, Homebrew!", shell_output("./hello").chomp - - (testpath/"ffi.idr").write <<~EOS - module Main - puts: String -> IO () - puts x = foreign FFI_C "puts" (String -> IO ()) x - main : IO () - main = puts "Hello, interpreter!" - EOS - - system bin/"idris", "ffi.idr", "-o", "ffi" - assert_equal "Hello, interpreter!", shell_output("./ffi").chomp - end -end diff --git a/Formula/idris2.rb b/Formula/idris2.rb deleted file mode 100644 index a55e9d53dd665..0000000000000 --- a/Formula/idris2.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Idris2 < Formula - desc "Pure functional programming language with dependent types" - homepage "https://www.idris-lang.org/" - url "https://github.com/idris-lang/Idris2/archive/v0.2.0.tar.gz" - sha256 "cc7c48d3fbaa55e536890c9eb4701755081d2b5df9a65f0ecc3e00ee5ccf0a0f" - head "https://github.com/idris-lang/Idris2.git" - - bottle do - cellar :any - rebuild 1 - sha256 "3dd1bbee7fae182553f34b89bf5c3049a8b8bfcd4206c7c7b904ad6b0672259b" => :catalina - sha256 "48268ef2985009712a46469b3ec7f849ba91f640d17e8f0b86b24f9e0477c267" => :mojave - sha256 "4f0a8f3c3ef289309fe2b02ff6f5b395e3b71fee94de1dbc0b9a70589788b1bd" => :high_sierra - end - - depends_on "coreutils" => :build - depends_on "chezscheme" - - def install - ENV.deparallelize - scheme = Formula["chezscheme"].bin/"chez" - system "make", "bootstrap", "SCHEME=#{scheme}", "PREFIX=#{libexec}" - system "make", "install", "PREFIX=#{libexec}" - # idris2.so is an executable file generated by Idris2 - bin.install "#{libexec}/bin/idris2_app/idris2.so" => "idris2" - lib.install_symlink Dir["#{libexec}/lib/*.dylib"] - end - - test do - (testpath/"hello.idr").write <<~EOS - module Main - main : IO () - main = putStrLn "Hello, Homebrew!" - EOS - - system bin/"idris2", "hello.idr", "-o", "hello" - assert_equal "Hello, Homebrew!", - shell_output("./build/exec/hello_app/hello.so").chomp - end -end diff --git a/Formula/idutils.rb b/Formula/idutils.rb deleted file mode 100644 index f3aa6eade095a..0000000000000 --- a/Formula/idutils.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Idutils < Formula - desc "ID database and query tools" - homepage "https://www.gnu.org/s/idutils/" - url "https://ftp.gnu.org/gnu/idutils/idutils-4.6.tar.xz" - mirror "https://ftpmirror.gnu.org/idutils/idutils-4.6.tar.xz" - sha256 "8181f43a4fb62f6f0ccf3b84dbe9bec71ecabd6dfdcf49c6b5584521c888aac2" - revision 1 - - bottle do - rebuild 1 - sha256 "5df54c76ae786e54f6994c1c65821adaa746c8a6b1aecbafbe3cd9f4f77f7c62" => :catalina - sha256 "b48a4caf24a1eba916f1932c85970294e56a0559603a8289fe732c124fbf0811" => :mojave - sha256 "95f118aa56026de98d148bccc5a807d609a2bfc54749e1d9051a5dce80f603ef" => :high_sierra - end - - conflicts_with "coreutils", :because => "both install `gid` and `gid.1`" - - 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 - # 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" if MacOS.version == :el_capitan - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-lispdir=#{elisp}" - system "make", "install" - end - - test do - system bin/"mkid", "#{MacOS.sdk_path}/usr/include" - system bin/"lid", "FILE" - end -end diff --git a/Formula/ievms.rb b/Formula/ievms.rb deleted file mode 100644 index 5f4ca5a583ae0..0000000000000 --- a/Formula/ievms.rb +++ /dev/null @@ -1,14 +0,0 @@ -class Ievms < Formula - desc "Automated installation of Microsoft IE AppCompat virtual machines" - homepage "https://xdissent.github.io/ievms/" - url "https://github.com/xdissent/ievms/archive/v0.3.3.tar.gz" - sha256 "95cafdc295998712c3e963dc4a397d6e6a823f6e93f2c119e9be928b036163be" - - bottle :unneeded - - depends_on "unar" - - def install - bin.install "ievms.sh" => "ievms" - end -end diff --git a/Formula/ifstat.rb b/Formula/ifstat.rb deleted file mode 100644 index 991d07537f88d..0000000000000 --- a/Formula/ifstat.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Ifstat < Formula - desc "Tool to report network interface bandwidth" - homepage "http://gael.roualland.free.fr/ifstat/" - url "http://gael.roualland.free.fr/ifstat/ifstat-1.1.tar.gz" - sha256 "8599063b7c398f9cfef7a9ec699659b25b1c14d2bc0f535aed05ce32b7d9f507" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "bc3d531dc3b4f6ff78a4acac901a9e6afc21a7994d7cbc3403839a5ae68b68b3" => :catalina - sha256 "cd3e855e0608177b9aebf545faeb17a4bad84e093a8ed6a84193b9583a94dc92" => :mojave - sha256 "8e385a8fdf00266e63bd7a3af17cdcf07da3cb86a08bd3431cfa3b4cc88bb7a5" => :high_sierra - sha256 "99eada14bfc555bd8f64d447bddd8a53c7325afed40446e5edbcfb5d7bdc7dd6" => :sierra - sha256 "e3b3f843c9fba2770a49dd7abcdacc30aa6b5e57f06b5ed96f09d20ada58bd6f" => :el_capitan - sha256 "ecce408a9ae1a82c7b2457e5a5263ec760096e7e0e71cf0da1ce98523787bcbc" => :yosemite - sha256 "9107e6b49f17fc1a4eac3ded9e499d164fe73f1c8d9307146b9db00952a72de9" => :mavericks - end - - # Fixes 32/64 bit incompatibility for snow leopard - patch :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/ifstat", "-v" - end -end - -__END__ -diff --git a/drivers.c b/drivers.c -index d5ac501..47fb320 100644 ---- a/drivers.c -+++ b/drivers.c -@@ -593,7 +593,8 @@ static int get_ifcount() { - int ifcount[] = { - CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_SYSTEM, IFMIB_IFCOUNT - }; -- int count, size; -+ int count; -+ size_t size; - - size = sizeof(count); - if (sysctl(ifcount, sizeof(ifcount) / sizeof(int), &count, &size, NULL, 0) < 0) { -@@ -607,7 +608,7 @@ static int get_ifdata(int index, struct ifmibdata * ifmd) { - int ifinfo[] = { - CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_IFDATA, index, IFDATA_GENERAL - }; -- int size = sizeof(*ifmd); -+ size_t size = sizeof(*ifmd); - - if (sysctl(ifinfo, sizeof(ifinfo) / sizeof(int), ifmd, &size, NULL, 0) < 0) - return 0; - diff --git a/Formula/iftop.rb b/Formula/iftop.rb deleted file mode 100644 index 19c6ecae189f3..0000000000000 --- a/Formula/iftop.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Version is "pre-release", but is what Debian, MacPorts, etc. -# package, and upstream has not had any movement in a long time. -class Iftop < Formula - desc "Display an interface's bandwidth usage" - homepage "https://www.ex-parrot.com/~pdw/iftop/" - url "https://www.ex-parrot.com/pdw/iftop/download/iftop-1.0pre4.tar.gz" - sha256 "f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "8f40152f928f5f63f777b7dd1780951d451defffb30517f657b1850448a2f5ab" => :catalina - sha256 "aaa2c283765b4fe9d1f3e7af3e71f145f3eecceb72b284ecf3daa806052ae3a9" => :mojave - sha256 "c582f943657323d52493e9b85d05a9ac5b079dd1bb74075fbcd5952f2758fbd7" => :high_sierra - sha256 "3a75c5edf29f6cbac19641910661423ed2f0b83f3e0de28c8417be76f4ce5c38" => :sierra - sha256 "e7b9ed6bef435d7de8e986cedfc76779f2655bfac7ed780afb33a42e92b8d01d" => :el_capitan - sha256 "5ac910598f86716e0dc676f0fd44af51da141ad84dfbaf5535a31f11ab91ffd7" => :yosemite - sha256 "9563857745dca2db9f91388d3f0d0fae4b6cdc2fc6ff84ffce14325c0cafee0f" => :mavericks - end - - head do - url "https://code.blinkace.com/pdw/iftop.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "./bootstrap" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - def caveats - <<~EOS - iftop requires root privileges so you will need to run `sudo iftop`. - You should be certain that you trust any software you grant root privileges. - EOS - end - - test do - assert_match "interface:", pipe_output("#{sbin}/iftop -t -s 1 2>&1") - end -end diff --git a/Formula/ifuse.rb b/Formula/ifuse.rb deleted file mode 100644 index 013a3a1a08aca..0000000000000 --- a/Formula/ifuse.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Ifuse < Formula - desc "FUSE module for iOS devices" - homepage "https://www.libimobiledevice.org/" - url "https://github.com/libimobiledevice/ifuse/archive/1.1.4.tar.gz" - sha256 "2a00769e8f1d8bad50898b9d00baf12c8ae1cda2d19ff49eaa9bf580e5dbe78c" - license "LGPL-2.1" - head "https://cgit.sukimashita.com/ifuse.git" - - bottle do - cellar :any - sha256 "cdce9fc5dbaf44641743b4a77434d340ae11cb8ed98f17b1a86a5653d2b6e1a2" => :catalina - sha256 "e14e4f8e0f73324dc662b47f091261f682eddc73961e3d71a07bfeb62826a1f8" => :mojave - sha256 "ff5577f28749cf18671eecd953e96f0c52a06dccf827dcf08e2d64f894dfdd5e" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libimobiledevice" - depends_on "libplist" - depends_on :osxfuse - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # Actual test of functionality requires osxfuse, so test for expected failure instead - assert_match "ERROR: No device found!", shell_output("#{bin}/ifuse --list-apps", 1) - end -end diff --git a/Formula/igraph.rb b/Formula/igraph.rb deleted file mode 100644 index d6a5578ffa9aa..0000000000000 --- a/Formula/igraph.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Igraph < Formula - desc "Network analysis package" - homepage "https://igraph.org/" - url "https://github.com/igraph/igraph/releases/download/0.8.2/igraph-0.8.2.tar.gz" - sha256 "718a471e7b8cbf02e3e8006153b7be6a22f85bb804283763a0016280e8a60e95" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "3005e637b6cb7cbed28b6dc997d480f8a1917c4118852a107ae0b59936d20698" => :catalina - sha256 "81181b904e63af33766a9c967f5ae42a11dadc8e72ba80604804636e663414ce" => :mojave - sha256 "40791d18478711af9cc497917ce7b34af179538bd719108d04be073faec57db9" => :high_sierra - end - - depends_on "glpk" - depends_on "gmp" - - on_linux do - depends_on "openblas" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-external-blas", - "--with-external-lapack", - "--with-external-glpk" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) { - igraph_integer_t diameter; - igraph_t graph; - igraph_rng_seed(igraph_rng_default(), 42); - igraph_erdos_renyi_game(&graph, IGRAPH_ERDOS_RENYI_GNP, 1000, 5.0/1000, IGRAPH_UNDIRECTED, IGRAPH_NO_LOOPS); - igraph_diameter(&graph, &diameter, 0, 0, 0, IGRAPH_UNDIRECTED, 1); - printf("Diameter = %d\\n", (int) diameter); - igraph_destroy(&graph); - } - EOS - system ENV.cc, "test.c", "-I#{include}/igraph", "-L#{lib}", - "-ligraph", "-o", "test" - assert_match "Diameter = 9", shell_output("./test") - end -end diff --git a/Formula/igv.rb b/Formula/igv.rb deleted file mode 100644 index 542d6be2ab452..0000000000000 --- a/Formula/igv.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Igv < Formula - desc "Interactive Genomics Viewer" - homepage "https://www.broadinstitute.org/software/igv" - url "https://data.broadinstitute.org/igv/projects/downloads/2.8/IGV_2.8.6.zip" - sha256 "a6ba9d001c201ff3f8984b9e30cd977a1212870e201bd9d3d14f02d363b64572" - - bottle :unneeded - - depends_on "openjdk" - - def install - inreplace ["igv.sh", "igvtools"], /^prefix=.*/, "prefix=#{libexec}" - bin.install "igv.sh" => "igv" - bin.install "igvtools" - libexec.install "igv.args", "lib" - bin.env_script_all_files libexec, :JAVA_HOME => Formula["openjdk"].opt_prefix - end - - test do - assert_match "Usage:", shell_output("#{bin}/igvtools") - assert_match "org/broad/igv/ui/IGV.class", shell_output("#{Formula["openjdk"].bin}/jar tf #{libexec}/lib/igv.jar") - # Fails on Jenkins with Unhandled exception: java.awt.HeadlessException - unless ENV["CI"] - (testpath/"script").write "exit" - assert_match "Version", shell_output("#{bin}/igv -b script") - end - end -end diff --git a/Formula/ii.rb b/Formula/ii.rb deleted file mode 100644 index 8f7e465940b72..0000000000000 --- a/Formula/ii.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Ii < Formula - desc "Minimalist IRC client" - homepage "https://tools.suckless.org/ii/" - url "https://dl.suckless.org/tools/ii-1.8.tar.gz" - sha256 "b9d9e1eae25e63071960e921af8b217ab1abe64210bd290994aca178a8dc68d2" - license "MIT" - head "https://git.suckless.org/ii", :using => :git - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "deb41b4c38d4b8e6cd2f3e9d8acea872a8daa694486ee59edd684248a7e74f4b" => :catalina - sha256 "c8e535b535af9adf8c3c3e760849f581d3e93ec227ae9f0ae2f30490b44e9c4d" => :mojave - sha256 "dcc9e7c86395491f5a62dd87dfcfb0f1b8b89a8f5ceb4e767ac70cf60ef350cd" => :high_sierra - sha256 "a83511296e08d8ec1d126bb09574b02856f382f3f504b6f2b256cab6bd645ed1" => :sierra - sha256 "eeba4fb4ec437895a9946bbbb00186ff05277ce9d57e8bbe29e1db5596d8a70f" => :el_capitan - end - - def install - # Fixed upstream, drop for next version - inreplace "Makefile", "SRC = ii.c strlcpy.c", "SRC = ii.c" - - system "make", "install", "PREFIX=#{prefix}" - end -end diff --git a/Formula/ike-scan.rb b/Formula/ike-scan.rb deleted file mode 100644 index 3ccc4fec00da3..0000000000000 --- a/Formula/ike-scan.rb +++ /dev/null @@ -1,36 +0,0 @@ -class IkeScan < Formula - desc "Discover and fingerprint IKE hosts" - homepage "https://github.com/royhills/ike-scan" - url "https://github.com/royhills/ike-scan/archive/1.9.4.tar.gz" - sha256 "2865014185c129ac443beb7bf80f3c5eb93adb504cd307c5b6709199abf7c121" - license "GPL-3.0" - revision 1 - - head "https://github.com/royhills/ike-scan.git" - - bottle do - sha256 "11f8717a655e0279957d3b4464b5074e1b75b17d0b882a93c9375b116f513deb" => :catalina - sha256 "684cd449c88f873dec2719d9423f42732006631b923aec133c5c2a447895b241" => :mojave - sha256 "9be05676d382198f99911601aa83008e5a27371669728c4d70cc98e9564bd2f3" => :high_sierra - sha256 "cd6e8435040dd728e6dbd62c161d0c6b48d19e0f5fe69ce9bef48991cccb91f1" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "openssl@1.1" - - def install - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-openssl=#{Formula["openssl@1.1"].opt_prefix}" - system "make", "install" - end - - test do - # We probably shouldn't probe any host for VPN servers, so let's keep this simple. - system bin/"ike-scan", "--version" - end -end diff --git a/Formula/ilmbase.rb b/Formula/ilmbase.rb deleted file mode 100644 index d7bb669a53a31..0000000000000 --- a/Formula/ilmbase.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Ilmbase < Formula - desc "OpenEXR ILM Base libraries (high dynamic-range image file format)" - homepage "https://www.openexr.com/" - url "https://github.com/openexr/openexr/archive/v2.5.2.tar.gz" - sha256 "5da8dff448d0c4a529e52c97daf238a461d01cd233944f75095668d6d7528761" - - bottle do - sha256 "13a8f951e15caa1f4f633ec718e4f5b9c19d741a6e8ec2c015f1c59d466f2005" => :catalina - sha256 "f21663911237058c5c531d806456ebc23e30020f838145d8b13010515364647a" => :mojave - sha256 "854208849e5fa1be263e25031ad21308582d57999c643baef67b8ec40d32cfb3" => :high_sierra - end - - depends_on "cmake" => :build - - def install - cd "IlmBase" do - system "cmake", ".", *std_cmake_args, "-DBUILD_TESTING=OFF" - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~'EOS' - #include - #include - #include - - int main(int argc, char *argv[]) - { - double x[2] = {0.0, 0.0}; - int n = IMATH_NAMESPACE::solveQuadratic(1.0, 3.0, 2.0, x); - - if (x[0] > x[1]) - std::swap(x[0], x[1]); - - std::cout << n << ", " << x[0] << ", " << x[1] << "\n"; - } - EOS - system ENV.cxx, "-I#{include}/OpenEXR", "-o", testpath/"test", "test.cpp" - assert_equal "2, -2, -1\n", shell_output("./test") - end -end diff --git a/Formula/imagejs.rb b/Formula/imagejs.rb deleted file mode 100644 index 6f5c9c3954449..0000000000000 --- a/Formula/imagejs.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Imagejs < Formula - desc "Tool to hide JavaScript inside valid image files" - homepage "https://jklmnn.de/imagejs/" - url "https://github.com/jklmnn/imagejs/archive/0.7.2.tar.gz" - sha256 "ba75c7ea549c4afbcb2a516565ba0b762b5fc38a03a48e5b94bec78bac7dab07" - license "GPL-3.0" - head "https://github.com/jklmnn/imagejs.git" - - bottle do - cellar :any_skip_relocation - sha256 "2e758f8cb396b7dde6e80ff4115798122739418868b36d05a19231ff103c3028" => :catalina - sha256 "4129ad096d0f6c28d40dd7e99749eaaa519b08db6bf708bea9b97c56cb45f6db" => :mojave - sha256 "5abd3ddcc69f1d44205b5f66b01850c5469cc982643711f3a37f13f7bd0d649b" => :high_sierra - sha256 "7e56845664f1d00cb460effbc723aa6a4df38e34e3a654f9c9e9485037f086ff" => :sierra - sha256 "9f98ec026ce971a312606d06acbdeabcc38c842e6f4fdbd1d7631a76e3f3307d" => :el_capitan - sha256 "47dc7fa5f0b5706b0c952522b897652758ccedcb7169bcd25e551204bb19da27" => :yosemite - end - - def install - system "make" - bin.install "imagejs" - end - - test do - (testpath/"test.js").write "alert('Hello World!')" - system "#{bin}/imagejs", "bmp", "test.js", "-l" - end -end diff --git a/Formula/imagemagick.rb b/Formula/imagemagick.rb deleted file mode 100644 index b61e8e24e9af4..0000000000000 --- a/Formula/imagemagick.rb +++ /dev/null @@ -1,82 +0,0 @@ -class Imagemagick < Formula - desc "Tools and libraries to manipulate images in many formats" - homepage "https://www.imagemagick.org/" - url "https://dl.bintray.com/homebrew/mirror/ImageMagick-7.0.10-23.tar.xz" - mirror "https://www.imagemagick.org/download/releases/ImageMagick-7.0.10-23.tar.xz" - sha256 "882cecda27265526eb4e7ce7e2cf6f74c018bcbbd34bc9ddd3c67fb3e9184103" - head "https://github.com/ImageMagick/ImageMagick.git" - - bottle do - sha256 "bf19ce6c826be9ab5a42d4e02b74d2f6cd8f5d9402276dae5428ac3c1dc08c6d" => :catalina - sha256 "d2acf6bbf71aa2128b30feb968f19b96e9b0878700bebe15c2cbe2523a76f631" => :mojave - sha256 "9ce075b1ff714f828747d6b564d95c85d269795b75bbcd6129bd3628ea596b60" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "ghostscript" - depends_on "jpeg" - depends_on "libheif" - depends_on "liblqr" - depends_on "libomp" - depends_on "libpng" - depends_on "libtiff" - depends_on "libtool" - depends_on "little-cms2" - depends_on "openexr" - depends_on "openjpeg" - depends_on "webp" - depends_on "xz" - - uses_from_macos "bzip2" - uses_from_macos "libxml2" - - skip_clean :la - - def install - # Avoid references to shim - inreplace Dir["**/*-config.in"], "@PKG_CONFIG@", Formula["pkg-config"].opt_bin/"pkg-config" - - args = %W[ - --disable-osx-universal-binary - --prefix=#{prefix} - --disable-dependency-tracking - --disable-silent-rules - --disable-opencl - --enable-shared - --enable-static - --with-freetype=yes - --with-modules - --with-openjp2 - --with-openexr - --with-webp=yes - --with-heic=yes - --with-gslib - --with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts - --with-lqr - --without-fftw - --without-pango - --without-x - --without-wmf - --enable-openmp - ac_cv_prog_c_openmp=-Xpreprocessor\ -fopenmp - ac_cv_prog_cxx_openmp=-Xpreprocessor\ -fopenmp - LDFLAGS=-lomp - ] - - # versioned stuff in main tree is pointless for us - inreplace "configure", "${PACKAGE_NAME}-${PACKAGE_VERSION}", "${PACKAGE_NAME}" - system "./configure", *args - system "make", "install" - end - - test do - assert_match "PNG", shell_output("#{bin}/identify #{test_fixtures("test.png")}") - # Check support for recommended features and delegates. - features = shell_output("#{bin}/convert -version") - %w[Modules freetype jpeg png tiff].each do |feature| - assert_match feature, features - end - assert_match "Helvetica", shell_output("#{bin}/identify -list font") - end -end diff --git a/Formula/imagemagick@6.rb b/Formula/imagemagick@6.rb deleted file mode 100644 index b9ca2fc6e9991..0000000000000 --- a/Formula/imagemagick@6.rb +++ /dev/null @@ -1,73 +0,0 @@ -class ImagemagickAT6 < Formula - desc "Tools and libraries to manipulate images in many formats" - homepage "https://www.imagemagick.org/" - # Please always keep the Homebrew mirror as the primary URL as the - # ImageMagick site removes tarballs regularly which means we get issues - # unnecessarily and older versions of the formula are broken. - url "https://dl.bintray.com/homebrew/mirror/imagemagick%406-6.9.11-23.tar.xz" - mirror "https://www.imagemagick.org/download/releases/ImageMagick-6.9.11-23.tar.xz" - sha256 "c7a6d4b114d2199657195a0dbdc708ce5209c482c6c291e523d2b976fce909e9" - head "https://github.com/imagemagick/imagemagick6.git" - - bottle do - sha256 "f83762f913953039ebfee2dd03c6a564800d0f15adb159e2c7a323dea4bd76d2" => :catalina - sha256 "08d80fa867ff1499e13c57d39ac4eeb0dc71ce552a4ea036c94993389b3da3c2" => :mojave - sha256 "6bf08be13c5d0d6d8ab76a676ddbb7d86065de6654d3445222c648d2c3d3bb8c" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - - depends_on "freetype" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "libtool" - depends_on "little-cms2" - depends_on "openjpeg" - depends_on "webp" - depends_on "xz" - - skip_clean :la - - def install - # Avoid references to shim - inreplace Dir["**/*-config.in"], "@PKG_CONFIG@", Formula["pkg-config"].opt_bin/"pkg-config" - - args = %W[ - --disable-osx-universal-binary - --prefix=#{prefix} - --disable-dependency-tracking - --disable-silent-rules - --disable-opencl - --disable-openmp - --enable-shared - --enable-static - --with-freetype=yes - --with-modules - --with-webp=yes - --with-openjp2 - --without-gslib - --with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts - --without-fftw - --without-pango - --without-x - --without-wmf - ] - - # versioned stuff in main tree is pointless for us - inreplace "configure", "${PACKAGE_NAME}-${PACKAGE_VERSION}", "${PACKAGE_NAME}" - system "./configure", *args - system "make", "install" - end - - test do - assert_match "PNG", shell_output("#{bin}/identify #{test_fixtures("test.png")}") - # Check support for recommended features and delegates. - features = shell_output("#{bin}/convert -version") - %w[Modules freetype jpeg png tiff].each do |feature| - assert_match feature, features - end - end -end diff --git a/Formula/imageoptim-cli.rb b/Formula/imageoptim-cli.rb deleted file mode 100644 index f951f291aa419..0000000000000 --- a/Formula/imageoptim-cli.rb +++ /dev/null @@ -1,30 +0,0 @@ -require "language/node" - -class ImageoptimCli < Formula - desc "CLI for ImageOptim, ImageAlpha and JPEGmini" - homepage "https://jamiemason.github.io/ImageOptim-CLI/" - url "https://github.com/JamieMason/ImageOptim-CLI/archive/3.0.2.tar.gz" - sha256 "957261d38fa85e0ec377efb2eceae695e3d87b621bae64853f9f5163efd3594b" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "56a9b2dba8f47850a26c335311f8c436b683c0b92ef5ab0b83e91688cf64ec7a" => :catalina - sha256 "b7b1923ed31ab32540a5dffcf798675401ca48249fae54f49d67bc6c78feede9" => :mojave - sha256 "6f1aa4b2e4de3e7a1502f1f8747283589697e5f0f0506f4d24acd53381311706" => :high_sierra - end - - depends_on "node@10" => :build - depends_on "yarn" => :build - - def install - system "yarn" - system "npm", "run", "build" - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - assert_equal version.to_s, shell_output("#{bin}/imageoptim -V").chomp - end -end diff --git a/Formula/imagesnap.rb b/Formula/imagesnap.rb deleted file mode 100644 index 967cfb5a563cb..0000000000000 --- a/Formula/imagesnap.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Imagesnap < Formula - desc "Tool to capture still images from an iSight or other video source" - homepage "https://iharder.sourceforge.io/current/macosx/imagesnap/" - url "https://github.com/rharder/imagesnap/archive/0.2.6.tar.gz" - sha256 "e55c9f8c840c407b7441c16279c39e004f6225b96bb64ff0c2734da18a759033" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "472f24d660d9a7ca82041b10aac43250e44b84ebb469cf8d8f349b462bd3aaf4" => :catalina - sha256 "f407afef9b42d250115f21c69a28a9e4fd143619d71cac9f4d92c0d17d3512ad" => :mojave - sha256 "6b40f134d9180d7874db92f4a79dad69a74669791f13233e435eed8710c2f4d2" => :high_sierra - sha256 "6cd7d838362754709f98d28c3fe45736f188bfdc8662cf1986089091c5d1e3d0" => :sierra - sha256 "bbe0115174e191a6eaeedcdb3136e4c9248e7bab649bb30ddd4e07d27ea4e553" => :el_capitan - end - - depends_on :xcode => :build - - # Fixes running on 10.13+: https://github.com/rharder/imagesnap/issues/16 - # Merged into master, will be in the next release. - patch do - url "https://github.com/rharder/imagesnap/commit/cd33ff8963006c37170872a7bdd0f29a7eae9a29.patch?full_index=1" - sha256 "2747d93a27892fcc585e014365f6081e56904e23dcdb84c581ba94b0c061f41a" - end - - # Fixes filename specification: https://github.com/rharder/imagesnap/issues/19 - # Merged into master, will be in the next release. - patch do - url "https://github.com/rharder/imagesnap/commit/c727968f278d09a792fd0dbbb19903c48518ba24.patch?full_index=1" - sha256 "b43cb2be1a577a472af1bc990007411860c451c0bca9528340598eeb2cb36ff5" - end - - def install - xcodebuild "-project", "ImageSnap.xcodeproj", "SYMROOT=build", "-sdk", MacOS.sdk_path - bin.install "build/Release/imagesnap" - end - - test do - assert_match "imagesnap", shell_output("#{bin}/imagesnap -h") - end -end diff --git a/Formula/imageworsener.rb b/Formula/imageworsener.rb deleted file mode 100644 index cf721f562b4a5..0000000000000 --- a/Formula/imageworsener.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Imageworsener < Formula - desc "Utility and library for image scaling and processing" - homepage "https://entropymine.com/imageworsener/" - url "https://entropymine.com/imageworsener/imageworsener-1.3.3.tar.gz" - sha256 "7c4b6e5f3da333e336f014805c441bc08aded652dd9dde2abd40be33b1aa3e25" - - bottle do - cellar :any - sha256 "fd72a318b2e8b398544d23b384cc4070f181537816647a16129dbbb3628dcc4e" => :catalina - sha256 "b5e6ce352f0e698cf10452d273ae0e61f50554565f77010de4e62a6fdddd911f" => :mojave - sha256 "2332dd0ecedf78344ee5fbd3d00abb0eccc7b28b7e8609c9a18e8e6ab81669de" => :high_sierra - sha256 "847f3211aba4095e280d589a87698234b7cd6e3ec77a6a50cf578a3fa6d0236e" => :sierra - end - - head do - url "https://github.com/jsummers/imageworsener.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "jpeg" - depends_on "libpng" - - def install - if build.head? - inreplace "./scripts/autogen.sh", "libtoolize", "glibtoolize" - system "./scripts/autogen.sh" - end - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--without-webp" - system "make", "install" - pkgshare.install "tests" - end - - test do - cp_r Dir["#{pkgshare}/tests/*"], testpath - system "./runtest", bin/"imagew" - end -end diff --git a/Formula/imake.rb b/Formula/imake.rb deleted file mode 100644 index 5793cd8049b95..0000000000000 --- a/Formula/imake.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Imake < Formula - desc "Build automation system written for X11" - homepage "https://xorg.freedesktop.org/" - url "https://xorg.freedesktop.org/releases/individual/util/imake-1.0.8.tar.bz2" - sha256 "b8d2e416b3f29cd6482bcffaaf19286d32917a164d07102a0e531ccd41a2a702" - revision 2 - - bottle do - sha256 "9397e56fac8b92243e8dbd73e9bf96d6bb932832a4571e8b571098ea251eb1e2" => :catalina - sha256 "857384a54365558b10ca72836f6367027f28eb7ce480c5bb3266f5630bb3530f" => :mojave - sha256 "ad17ed4504f421c25c474e005e9595745719f4448f55cbfdee0c3fd42ad44b76" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gcc" - depends_on :x11 - - resource "xorg-cf-files" do - url "https://xorg.freedesktop.org/releases/individual/util/xorg-cf-files-1.0.6.tar.bz2" - sha256 "4dcf5a9dbe3c6ecb9d2dd05e629b3d373eae9ba12d13942df87107fdc1b3934d" - end - - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/patches/a0bb3a4/imake/patch-imakemdep.h.diff" - sha256 "1f7a24f625d2611c31540d4304a45f228767becafa37af01e1695d74e612459e" - end - - def install - ENV.deparallelize - - # imake runtime is broken when used with clang's cpp - cpp_program = Formula["gcc"].opt_bin/"cpp-#{Formula["gcc"].version_suffix}" - inreplace "imakemdep.h", /::CPPCMD::/, cpp_program - inreplace "imake.man", /__cpp__/, cpp_program - - # also use gcc's cpp during buildtime to pass ./configure checks - ENV["RAWCPP"] = cpp_program - - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - - resource("xorg-cf-files").stage do - # Fix for different X11 locations. - inreplace "X11.rules", "define TopXInclude /**/", - "define TopXInclude -I#{MacOS::X11.include}" - system "./configure", "--with-config-dir=#{lib}/X11/config", - "--prefix=#{HOMEBREW_PREFIX}" - system "make", "install" - end - end - - test do - # Use pipe_output because the return code is unimportant here. - output = pipe_output("#{bin}/imake -v -s/dev/null -f/dev/null -T/dev/null 2>&1") - gcc_major_ver = Formula["gcc"].version_suffix - assert_match "#{Formula["gcc"].opt_bin}/cpp-#{gcc_major_ver}", output - end -end diff --git a/Formula/imap-uw.rb b/Formula/imap-uw.rb deleted file mode 100644 index 29634b1c6c68c..0000000000000 --- a/Formula/imap-uw.rb +++ /dev/null @@ -1,64 +0,0 @@ -class ImapUw < Formula - # imap-uw is unmaintained software; the author has passed away and there is - # no active successor project. - desc "University of Washington IMAP toolkit" - homepage "https://web.archive.org/web/20191028114408/https://www.washington.edu/imap/" - url "https://mirrorservice.org/sites/ftp.cac.washington.edu/imap/imap-2007f.tar.gz" - mirror "https://fossies.org/linux/misc/old/imap-2007f.tar.gz" - sha256 "53e15a2b5c1bc80161d42e9f69792a3fa18332b7b771910131004eb520004a28" - revision 1 - - livecheck do - skip "Not maintained" - end - - bottle do - cellar :any - sha256 "df3de76ba2934218f8f484f2d7e6c760956ba52eecacdb1b623d0b54d872165f" => :catalina - sha256 "19d971ab778840ba44c24c3eef1316d1c65e6e0b6e1540933ad051c77ee745e0" => :mojave - sha256 "8c1c4d2cbbd6df372f258d7cc95b040db4f3c759c8928cfbde7c54da4fa6a426" => :sierra - end - - depends_on "openssl@1.1" - - # Two patches below are from Debian, to fix OpenSSL 1.1 compatibility - # https://salsa.debian.org/holmgren/uw-imap/tree/master/debian/patches - patch do - url "https://salsa.debian.org/holmgren/uw-imap/raw/master/debian/patches/1006_openssl1.1_autoverify.patch" - sha256 "7c41c4aec4f25546c998593a09386bbb1d6c526ba7d6f65e3f55a17c20644d0a" - end - - patch do - url "https://salsa.debian.org/holmgren/uw-imap/raw/master/debian/patches/2014_openssl1.1.1_sni.patch" - sha256 "9db45ba5462292acd04793ac9fa856e332b37506f1e0991960136dff170a2cd3" - end - - def install - ENV.deparallelize - inreplace "Makefile" do |s| - s.gsub! "SSLINCLUDE=/usr/include/openssl", - "SSLINCLUDE=#{Formula["openssl@1.1"].opt_include}/openssl" - s.gsub! "SSLLIB=/usr/lib", - "SSLLIB=#{Formula["openssl@1.1"].opt_lib}" - s.gsub! "-DMAC_OSX_KLUDGE=1", "" - end - inreplace "src/osdep/unix/ssl_unix.c", "#include \n#include ", - "#include \n#include " - system "make", "oxp" - - # email servers: - sbin.install "imapd/imapd", "ipopd/ipop2d", "ipopd/ipop3d" - - # mail utilities: - bin.install "dmail/dmail", "mailutil/mailutil", "tmail/tmail" - - # c-client library: - # Note: Installing the headers from the root c-client directory is not - # possible because they are symlinks and homebrew dutifully copies them - # as such. Pulling from within the src dir achieves the desired result. - doc.install Dir["docs/*"] - lib.install "c-client/c-client.a" => "libc-client.a" - (include + "imap").install "c-client/osdep.h", "c-client/linkage.h" - (include + "imap").install Dir["src/c-client/*.h", "src/osdep/unix/*.h"] - end -end diff --git a/Formula/imapfilter.rb b/Formula/imapfilter.rb deleted file mode 100644 index 6fbd8147b2097..0000000000000 --- a/Formula/imapfilter.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Imapfilter < Formula - desc "IMAP message processor/filter" - homepage "https://github.com/lefcha/imapfilter/" - url "https://github.com/lefcha/imapfilter/archive/v2.6.16.tar.gz" - sha256 "90af9bc9875e03fb5a09a3233287b74dd817867cb18ec9ff52fead615755563e" - license "MIT" - - bottle do - sha256 "bc61c3bb6e5679d7b4f8b767e659c0cb3d4ff2f4fdd9e66a0ae38bc7df693965" => :catalina - sha256 "5982d6a5404868c41dda6e3d2dedc2781ea45cebac19c8f58546d2f99865f492" => :mojave - sha256 "651e44b6067c219ac07da7770c3aade81536ce36cb16b574c4a6d88d3498d6e2" => :high_sierra - end - - depends_on "lua" - depends_on "openssl@1.1" - depends_on "pcre" - - def install - # find Homebrew's libpcre and lua - ENV.append "CPPFLAGS", "-I#{Formula["lua"].opt_include}/lua" - ENV.append "LDFLAGS", "-L#{Formula["pcre"].opt_lib}" - ENV.append "LDFLAGS", "-L#{Formula["lua"].opt_lib}" - ENV.append "LDFLAGS", "-liconv" - system "make", "PREFIX=#{prefix}", "MANDIR=#{man}", "MYCFLAGS=#{ENV.cflags}", "MYLDFLAGS=#{ENV.ldflags}" - system "make", "PREFIX=#{prefix}", "MANDIR=#{man}", "install" - - prefix.install "samples" - end - - def caveats - <<~EOS - You will need to create a ~/.imapfilter/config.lua file. - Samples can be found in: - #{prefix}/samples - EOS - end - - test do - system "#{bin}/imapfilter", "-V" - end -end diff --git a/Formula/imapsync.rb b/Formula/imapsync.rb deleted file mode 100644 index 9c13308f7c037..0000000000000 --- a/Formula/imapsync.rb +++ /dev/null @@ -1,130 +0,0 @@ -class Imapsync < Formula - desc "Migrate or backup IMAP mail accounts" - homepage "https://imapsync.lamiral.info/" - url "https://imapsync.lamiral.info/dist2/imapsync-1.977.tgz" - # Note the mirror will return 404 until the version becomes outdated. - sha256 "1ce601150568a6b13a5d8730bee07fdc05b35f3f4e35775f1b471ba221940c2a" - head "https://github.com/imapsync/imapsync.git" - - bottle do - cellar :any_skip_relocation - sha256 "6c1a1bed4c3ad926f34a5efe6b6bfe5d2776ed4ee0d000679b21679c47ff81cb" => :catalina - sha256 "5b259d1a7096a887af61eef5a379122c8e94e71f912b2670a35031e6c159351c" => :mojave - sha256 "fa0a19bf66b24d332f6e0f4f827b2abdff2b904b483c4927f2ed7d6d944ab261" => :high_sierra - end - - uses_from_macos "perl" - - resource "Encode::IMAPUTF7" do - url "https://cpan.metacpan.org/authors/id/P/PM/PMAKHOLM/Encode-IMAPUTF7-1.05.tar.gz" - sha256 "470305ddc37483cfe8d3c16d13770a28011f600bf557acb8c3e07739997c37e1" - end - - resource "Unicode::String" do - url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/GAAS/Unicode-String-2.10.tar.gz" - sha256 "894a110ece479546af8afec0972eec7320c86c4dea4e6b354dff3c7526ba9b68" - end - - resource "File::Copy::Recursive" do - url "https://cpan.metacpan.org/authors/id/D/DM/DMUEY/File-Copy-Recursive-0.44.tar.gz" - sha256 "ae19a0b58dc1b3cded9ba9cfb109288d8973d474c0b4bfd28b27cf60e8ca6ee4" - end - - resource "Authen::NTLM" do - url "https://cpan.metacpan.org/authors/id/N/NB/NBEBOUT/NTLM-1.09.tar.gz" - sha256 "c823e30cda76bc15636e584302c960e2b5eeef9517c2448f7454498893151f85" - end - - resource "Mail::IMAPClient" do - url "https://cpan.metacpan.org/authors/id/P/PL/PLOBBES/Mail-IMAPClient-3.42.tar.gz" - sha256 "1c2264d50c54c839a3e38ce2f8edda3d24f30cc607940d7574beab19cb00ce7e" - end - - resource "IO::Tee" do - url "https://cpan.metacpan.org/authors/id/N/NE/NEILB/IO-Tee-0.65.tar.gz" - sha256 "c63dcd109b268962f867407da2654282e3c85113dc7e9655fe8a62331d490c12" - 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 "JSON" do - url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.02.tar.gz" - sha256 "444a88755a89ffa2a5424ab4ed1d11dca61808ebef57e81243424619a9e8627c" - end - - resource "Test::MockObject" do - url "https://cpan.metacpan.org/authors/id/C/CH/CHROMATIC/Test-MockObject-1.20180705.tar.gz" - sha256 "4516058d5d511155c1c462dab4027d762d6a474b99f73bf7da20b5ffbd024518" - end - - resource "JSON::WebToken" do - url "https://cpan.metacpan.org/authors/id/X/XA/XAICRON/JSON-WebToken-0.10.tar.gz" - sha256 "77c182a98528f1714d82afc548d5b3b4dc93e67069128bb9b9413f24cf07248b" - 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 "Readonly" do - url "https://cpan.metacpan.org/authors/id/S/SA/SANKO/Readonly-2.05.tar.gz" - sha256 "4b23542491af010d44a5c7c861244738acc74ababae6b8838d354dfb19462b5e" - end - - resource "Sys::MemInfo" do - url "https://cpan.metacpan.org/authors/id/S/SC/SCRESTO/Sys-MemInfo-0.99.tar.gz" - sha256 "0786319d3a3a8bae5d727939244bf17e140b714f52734d5e9f627203e4cf3e3b" - end - - resource "File::Tail" do - url "https://cpan.metacpan.org/authors/id/M/MG/MGRABNAR/File-Tail-1.3.tar.gz" - sha256 "26d09f81836e43eae40028d5283fe5620fe6fe6278bf3eb8eb600c48ec34afc7" - end - - resource "IO::Socket::IP" do - url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/IO-Socket-IP-0.39.tar.gz" - sha256 "11950da7636cb786efd3bfb5891da4c820975276bce43175214391e5c32b7b96" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - build_pl = ["JSON::WebToken", "Module::Build::Tiny", "Readonly"] - - 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", "-c", "imapsync" - system "pod2man", "imapsync", "imapsync.1" - inreplace "imapsync", "#!/usr/bin/env perl", "#!/usr/bin/perl" - bin.install "imapsync" - man1.install "imapsync.1" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - assert_match version.to_s, pipe_output("#{bin}/imapsync --dry") - shell_output("#{bin}/imapsync --dry \ - --host1 test1.lamiral.info --user1 test1 --password1 secret1 \ - --host2 test2.lamiral.info --user2 test2 --password2 secret2") - end -end diff --git a/Formula/imessage-ruby.rb b/Formula/imessage-ruby.rb deleted file mode 100644 index f03b69773a168..0000000000000 --- a/Formula/imessage-ruby.rb +++ /dev/null @@ -1,27 +0,0 @@ -class ImessageRuby < Formula - desc "Command-line tool to send iMessage" - homepage "https://github.com/linjunpop/imessage" - url "https://github.com/linjunpop/imessage/archive/v0.3.1.tar.gz" - sha256 "74ccd560dec09dcf0de28cd04fc4d512812c3348fc5618cbb73b6b36c43e14ef" - license "MIT" - head "https://github.com/linjunpop/imessage.git" - - bottle do - cellar :any_skip_relocation - sha256 "64987077d2b09f6c2fc5f88161514d1ce988d44baa5b622a41192cad72982b3b" => :catalina - sha256 "ae557de18880f38b34b4e47046b6c1d72d135167c10a1250479c575b3a6747fb" => :mojave - sha256 "e287b21ce1694d5ec9c5376fb142232b2df72fb907b12cb5b0ff22bd2fc04ab2" => :high_sierra - sha256 "446892e091382593a46ee69b8fb01354f1cc363a97b8a967332553a577bab8f6" => :sierra - sha256 "0e7fd4f055a6ba4e81273a5952504ceb74b835387c144a24e61f020e55e6018e" => :el_capitan - sha256 "1024e6cee26ed9fc8ae4ef1941edc64d0e6d16006bd2a530d5644e7c00f8a350" => :yosemite - sha256 "7b546ccf5cf13a7d474c635a57eebc8e74ff61ea6c7c3cdfefffe4c78737ab47" => :mavericks - end - - def install - system "rake", "standalone:install", "prefix=#{prefix}" - end - - test do - system "#{bin}/imessage", "--version" - end -end diff --git a/Formula/imgproxy.rb b/Formula/imgproxy.rb deleted file mode 100644 index 4e4fdf1f122c3..0000000000000 --- a/Formula/imgproxy.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Imgproxy < Formula - desc "Fast and secure server for resizing and converting remote images" - homepage "https://imgproxy.net/" - url "https://github.com/imgproxy/imgproxy/archive/v2.13.1.tar.gz" - sha256 "1a65fd8579e9a9f6a393d4d768f517e48e090707a11cc02bb46153e26ac0c833" - license "MIT" - revision 1 - head "https://github.com/imgproxy/imgproxy.git" - - bottle do - cellar :any - sha256 "1d689272611de42065d737bc031d2bad4b1b0218e753e1291a194f476ebd4323" => :catalina - sha256 "a250050aa34ac48c89246349cee3321f3e6bdfa2ee89d6f03a21997df33cb394" => :mojave - sha256 "b817b2307645cb4148b64575fe99630f7a5b197ca4b28ac217a855fc79aa5ebf" => :high_sierra - end - - depends_on "go" => :build - depends_on "pkg-config" => :build - depends_on "vips" - - def install - ENV["CGO_LDFLAGS_ALLOW"]="-s|-w" - ENV["CGO_CFLAGS_ALLOW"]="-Xpreprocessor" - - system "go", "build", "-o", "#{bin}/#{name}" - end - - test do - port = free_port - - cp(test_fixtures("test.jpg"), testpath/"test.jpg") - - ENV["IMGPROXY_BIND"] = "127.0.0.1:#{port}" - ENV["IMGPROXY_LOCAL_FILESYSTEM_ROOT"] = testpath - - pid = fork do - exec bin/"imgproxy" - end - sleep 3 - - output = testpath/"test-converted.png" - - system "curl", "-s", "-o", output, - "http://127.0.0.1/#{port}/insecure/fit/100/100/no/0/plain/local:///test.jpg@png" - assert_equal 0, $CHILD_STATUS - assert_predicate output, :exist? - - file_output = shell_output("file #{output}") - assert_match "PNG image data", file_output - assert_match "1 x 1", file_output - ensure - Process.kill("TERM", pid) - Process.wait(pid) - end -end diff --git a/Formula/imgur-screenshot.rb b/Formula/imgur-screenshot.rb deleted file mode 100644 index 1a4a24d43df7f..0000000000000 --- a/Formula/imgur-screenshot.rb +++ /dev/null @@ -1,18 +0,0 @@ -class ImgurScreenshot < Formula - desc "Take screenshot selection, upload to imgur. + more cool things" - homepage "https://github.com/jomo/imgur-screenshot" - url "https://github.com/jomo/imgur-screenshot/archive/v1.7.4.tar.gz" - sha256 "1f0f2d5e201f1fdc1472f201f04430d809bf442ad034c194e70d8921823e990e" - license "MIT" - head "https://github.com/jomo/imgur-screenshot.git" - - bottle :unneeded - - def install - bin.install "imgur-screenshot.sh" - end - - test do - system "#{bin}/imgur-screenshot.sh", "--check" # checks deps - end -end diff --git a/Formula/imlib2.rb b/Formula/imlib2.rb deleted file mode 100644 index 57a728441977c..0000000000000 --- a/Formula/imlib2.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Imlib2 < Formula - desc "Image loading and rendering library" - homepage "https://sourceforge.net/projects/enlightenment/" - url "https://downloads.sourceforge.net/project/enlightenment/imlib2-src/1.6.1/imlib2-1.6.1.tar.bz2" - sha256 "4d393a77e13da883c8ee2da3b029da3570210fe37d000c9ac33d9fce751b166d" - - bottle do - sha256 "3f02ff8333cfc8a046432fb078a7ede7d45f0bcda7b7b1dfb7726306eee91a13" => :catalina - sha256 "5134d4a325c2af69112bd5f3b5408843b513a6546f32f4840671a3575deddb6a" => :mojave - sha256 "8bf5d8afb1f8a34db501bc46301fd6bbbef3b3a3f9c9863dea180e8f1288f485" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "giflib" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on :x11 - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --enable-amd64=no - --without-id3 - ] - - system "./configure", *args - system "make", "install" - end - - test do - system "#{bin}/imlib2_conv", test_fixtures("test.png"), "imlib2_test.png" - end -end diff --git a/Formula/immortal.rb b/Formula/immortal.rb deleted file mode 100644 index a3f7cf6e38bc6..0000000000000 --- a/Formula/immortal.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Immortal < Formula - desc "OS agnostic (*nix) cross-platform supervisor" - homepage "https://immortal.run/" - url "https://github.com/immortal/immortal/archive/0.24.3.tar.gz" - sha256 "e31d5afb9028fb5047b5a2cc5f96c844f6480d600643a12075550f497e65f5cb" - license "BSD-3-Clause" - head "https://github.com/immortal/immortal.git" - - bottle do - cellar :any_skip_relocation - sha256 "4b1f289dbe2b0998f091ebf9fbf6df2894f0eb3d447df2b5840915a53cdb3c09" => :catalina - sha256 "c35c0718289bac0d3557ac5d17af6895765557d2c5a7124f389653163b40bb36" => :mojave - sha256 "702cb544d23450cf258ef7b9287e99925e8cf715e1708513694f9068233a5cba" => :high_sierra - end - - depends_on "go" => :build - - def install - ldflags = "-s -w -X main.version=#{version}" - system "go", "build", "-ldflags", ldflags, "-o", "#{bin}/immortal", "cmd/immortal/main.go" - system "go", "build", "-ldflags", ldflags, "-o", "#{bin}/immortalctl", "cmd/immortalctl/main.go" - system "go", "build", "-ldflags", ldflags, "-o", "#{bin}/immortaldir", "cmd/immortaldir/main.go" - man8.install Dir["man/*.8"] - prefix.install_metafiles - end - - test do - system bin/"immortal", "-v" - system bin/"immortalctl", "-v" - system bin/"immortaldir", "-v" - end -end diff --git a/Formula/immudb.rb b/Formula/immudb.rb deleted file mode 100644 index a22c807537ac0..0000000000000 --- a/Formula/immudb.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Immudb < Formula - desc "Lightweight, high-speed immutable database" - homepage "https://www.codenotary.io/" - url "https://github.com/codenotary/immudb/archive/v0.6.1.tar.gz" - sha256 "313f09b82f89208705daaf0be16238e1a4f90e590edd038c1719d181ce0ed653" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "769e04db2fd4329c20b6c0a608a3929f774b380071bac36e98a0416457077276" => :catalina - sha256 "de2a723ef1e42c3b4757951280bc74d8af0d615221fd9513fd423d48c33c29b0" => :mojave - sha256 "0594c1e0fb1a8dafaf8f8b06f768c3626704260d07a328891a72c2db59834887" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "all" - bin.install %w[immudb immuclient immugw immuadmin] - end - - test do - immudb_port = free_port - fork do - exec bin/"immudb", "-p", immudb_port.to_s - end - sleep 3 - - immugw_port = free_port - fork do - exec bin/"immugw", "-p", immugw_port.to_s, "-j", immudb_port.to_s - end - sleep 3 - - system bin/"immuclient", "safeset", "hello", "world", "-p", immudb_port.to_s - assert_match "world", shell_output("#{bin}/immuclient safeget hello -p #{immudb_port}") - - command = %W[ - curl -s -XPOST -d '#{JSON.generate({ "key" => Base64.encode64("hello") })}' - http://localhost:#{immugw_port}/v1/immurestproxy/item/safe/get - ] - response = shell_output(command.join(" ")) - assert_equal "world", Base64.decode64(JSON.parse(response)["value"]) - - assert_match "Uptime", shell_output("#{bin}/immuadmin stats -t -p #{immudb_port}") - end -end diff --git a/Formula/inadyn.rb b/Formula/inadyn.rb deleted file mode 100644 index 857cd8dc01619..0000000000000 --- a/Formula/inadyn.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Inadyn < Formula - desc "Dynamic DNS client with IPv4, IPv6, and SSL/TLS support" - homepage "https://troglobit.com/projects/inadyn/" - url "https://github.com/troglobit/inadyn/releases/download/v2.7/inadyn-2.7.tar.xz" - sha256 "eb03bc9d9c09dfbbc651b43a2eb5a967d0454a8293576df23784710dac50c6a4" - license "GPL-2.0" - - bottle do - sha256 "15adb75ac20d48ad952fce27a06f8b8ce8728d5084b9e1b3632215aa7ed2fc64" => :catalina - sha256 "0100708fe3e5bd57607af7168ba0a02e30d01a79e8af60f86be20717377b5153" => :mojave - sha256 "892f0bb649feb54f000aa9b5c22a812aeff22b1530f5e54a8783896b88d9ced3" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "cmake" => :build - depends_on "libtool" => :build - depends_on "confuse" - depends_on "gnutls" - depends_on "pkg-config" - - def install - mkdir_p buildpath/"inadyn/m4" - system "autoreconf", "-vif" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}" - system "make", "install" - end - - test do - system "#{sbin}/inadyn", "--check-config", "--config=#{HOMEBREW_PREFIX}/share/doc/inadyn/examples/inadyn.conf" - end -end diff --git a/Formula/include-what-you-use.rb b/Formula/include-what-you-use.rb deleted file mode 100644 index 6c5826f71f730..0000000000000 --- a/Formula/include-what-you-use.rb +++ /dev/null @@ -1,98 +0,0 @@ -class IncludeWhatYouUse < Formula - desc "Tool to analyze #includes in C and C++ source files" - homepage "https://include-what-you-use.org/" - url "https://include-what-you-use.org/downloads/include-what-you-use-0.14.src.tar.gz" - sha256 "43184397db57660c32e3298a6b1fd5ab82e808a1f5ab0591d6745f8d256200ef" - - bottle do - sha256 "045a0b40290cc8da9122eef0a51c8badbd972ae1a90a3bf101f9e26f90fb6b25" => :catalina - sha256 "4624e7bc1b0c8775db0ab2a48c6bdafcf51dea562e3e9f227940746db375c783" => :mojave - sha256 "8ae01240a58564995908d2ffae8a87cf678be65511b36ad29da804ba93509aa9" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "llvm@9" # include-what-you-use 0.14 is compatible with llvm 9.0 - - uses_from_macos "ncurses" - uses_from_macos "zlib" - - # patch to make the build work with llvm9 - patch do - url "https://github.com/include-what-you-use/include-what-you-use/pull/807.patch?full_index=1" - sha256 "afcc5bdf1377e36feacd699c194ef8e6645c8590d79f8cb15a57b43fa03c9102" - end - - def install - # We do not want to symlink clang or libc++ headers into HOMEBREW_PREFIX, - # so install to libexec to ensure that the resource path, which is always - # computed relative to the location of the include-what-you-use executable - # and is not configurable, is also located under libexec. - args = std_cmake_args + %W[ - -DCMAKE_INSTALL_PREFIX=#{libexec} - -DCMAKE_PREFIX_PATH=#{Formula["llvm@9"].opt_lib} - ] - - mkdir "build" do - system "cmake", *args, ".." - system "make" - system "make", "install" - end - - bin.write_exec_script Dir["#{libexec}/bin/*"] - - # include-what-you-use needs a copy of the clang and libc++ headers to be - # located in specific folders under its resource path. These may need to be - # updated when new major versions of llvm are released, i.e., by - # incrementing the version of include-what-you-use or the revision of this - # formula. This would be indicated by include-what-you-use failing to - # locate stddef.h and/or stdlib.h when running the test block below. - # https://clang.llvm.org/docs/LibTooling.html#libtooling-builtin-includes - mkdir_p libexec/"lib/clang/#{Formula["llvm@9"].version}" - cp_r Formula["llvm@9"].opt_lib/"clang/#{Formula["llvm@9"].version}/include", - libexec/"lib/clang/#{Formula["llvm@9"].version}" - mkdir_p libexec/"include" - cp_r Formula["llvm@9"].opt_include/"c++", libexec/"include" - end - - test do - (testpath/"direct.h").write <<~EOS - #include - size_t function() { return (size_t)0; } - EOS - (testpath/"indirect.h").write <<~EOS - #include "direct.h" - EOS - (testpath/"main.c").write <<~EOS - #include "indirect.h" - int main() { - return (int)function(); - } - EOS - expected_output = <<~EOS - main.c should add these lines: - #include "direct.h" // for function - - main.c should remove these lines: - - #include "indirect.h" // lines 1-1 - - The full include-list for main.c: - #include "direct.h" // for function - --- - EOS - assert_match expected_output, - shell_output("#{bin}/include-what-you-use main.c 2>&1", 4) - - (testpath/"main.cc").write <<~EOS - #include - int main() { - std::cout << "Hello, world!" << std::endl; - return 0; - } - EOS - expected_output = <<~EOS - (main.cc has correct #includes/fwd-decls) - EOS - assert_match expected_output, - shell_output("#{bin}/include-what-you-use main.cc 2>&1", 2) - end -end diff --git a/Formula/inetutils.rb b/Formula/inetutils.rb deleted file mode 100644 index b546c632b69fe..0000000000000 --- a/Formula/inetutils.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Inetutils < Formula - desc "GNU utilities for networking" - homepage "https://www.gnu.org/software/inetutils/" - url "https://ftp.gnu.org/gnu/inetutils/inetutils-1.9.4.tar.xz" - mirror "https://ftpmirror.gnu.org/inetutils/inetutils-1.9.4.tar.xz" - sha256 "849d96f136effdef69548a940e3e0ec0624fc0c81265296987986a0dd36ded37" - revision 2 - - bottle do - sha256 "9f227bd3a357e822a8fbc399828a5ac3c06cc32c1d8d8e8da9a03a11f3df92e8" => :catalina - sha256 "cd8d9c2d67518442b03bd4c6573a22408136fbfa54822db89db9236dca9d31bb" => :mojave - sha256 "52c3e2f7e4d62cf0e0c742e81c026f591b9c331a338d110619b285d02a9d8b2f" => :high_sierra - sha256 "40fc6bf3589516e420a3452c7effc46cb9463150680ab08ceed27206ddfe0b2a" => :sierra - end - - depends_on "libidn" - - def noshadow - # List of binaries that do not shadow macOS utils - list = %w[dnsdomainname rcp rexec rlogin rsh] - list += %w[ftp telnet] if MacOS.version >= :high_sierra - list - end - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --program-prefix=g - --with-idn - ] - - system "./configure", *args - system "make", "install" - - # Binaries not shadowing macOS utils symlinked without 'g' prefix - noshadow.each do |cmd| - bin.install_symlink "g#{cmd}" => cmd - man1.install_symlink "g#{cmd}.1" => "#{cmd}.1" - end - - # Symlink commands without 'g' prefix into libexec/gnubin and - # man pages into libexec/gnuman - bin.find.each do |path| - next unless File.executable?(path) && !File.directory?(path) - - cmd = path.basename.to_s.sub(/^g/, "") - (libexec/"gnubin").install_symlink bin/"g#{cmd}" => cmd - (libexec/"gnuman"/"man1").install_symlink man1/"g#{cmd}.1" => "#{cmd}.1" - end - - libexec.install_symlink "gnuman" => "man" - end - - def caveats - <<~EOS - The following commands have been installed with the prefix 'g'. - - #{noshadow.sort.join("\n ")} - - If you really 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" - EOS - end - - test do - output = pipe_output("#{libexec}/gnubin/ftp -v", - "open ftp.gnu.org\nanonymous\nls\nquit\n") - assert_match "Connected to ftp.gnu.org.\n220 GNU FTP server ready", output - end -end diff --git a/Formula/infer.rb b/Formula/infer.rb deleted file mode 100644 index 359c380c5bec4..0000000000000 --- a/Formula/infer.rb +++ /dev/null @@ -1,164 +0,0 @@ -class Infer < Formula - desc "Static analyzer for Java, C, C++, and Objective-C" - homepage "https://fbinfer.com/" - # pull from git tag to get submodules - url "https://github.com/facebook/infer.git", - :tag => "v0.17.0", - :revision => "99464c01da5809e7159ed1a75ef10f60d34506a4" - license "MIT" - - bottle do - cellar :any - rebuild 1 - sha256 "1dc9c75c759611c8fe0efa8f63d7e55bbaa35d8dc2863f7a527069b11759f244" => :catalina - sha256 "74b2dddff2bea362066395e28a797078d33514774511cc64771d0f89eea2466d" => :mojave - sha256 "7630571f8e391ce0ba991ffe7a5d7b2b4a1029cda1d56497800d8ae0a260d4b6" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "cmake" => :build - depends_on :java => ["1.8", :build, :test] - depends_on "libtool" => :build - depends_on "ocaml" => :build - depends_on "ocaml-findlib" => :build - depends_on "ocaml-num" => :build - depends_on "opam" => :build - depends_on "pkg-config" => :build - depends_on "gmp" - depends_on :macos # Due to Python 2 (https://github.com/facebook/infer/issues/934) - depends_on "mpfr" - depends_on "sqlite" - - uses_from_macos "m4" => :build - uses_from_macos "unzip" => :build - uses_from_macos "ncurses" - uses_from_macos "xz" - uses_from_macos "zlib" - - # Remove camlp4 dependency, which is deprecated - # Addressed in 0.18.x - patch do - url "https://github.com/facebook/infer/commit/f52b5fc981c692776210d7eb9681c2b8c3117c93.patch?full_index=1" - sha256 "5487b9b39607c94821bede8d4f0ec2a0ed08d5213d5f048b1344819dac53b2f5" - end - - def install - # needed to build clang - ENV.permit_arch_flags - - # Apple's libstdc++ is too old to build LLVM - ENV.libcxx if ENV.compiler == :clang - - opamroot = buildpath/"opamroot" - opamroot.mkpath - ENV["OPAMROOT"] = opamroot - ENV["OPAMYES"] = "1" - ENV["OPAMVERBOSE"] = "1" - - system "opam", "init", "--no-setup", "--disable-sandboxing" - - # do not attempt to use the clang in facebook-clang-plugins/ as it hasn't been built yet - ENV["INFER_CONFIGURE_OPTS"] = "--prefix=#{prefix} --without-fcp-clang" - - # Let's try build clang faster - ENV["JOBS"] = ENV.make_jobs.to_s - - ENV["CLANG_CMAKE_ARGS"] = "-DLLVM_OCAML_INSTALL_PATH=#{`opam var lib`.chomp}/ocaml" - - # Release build - touch ".release" - - # Pin updated dependencies which are required to build on brew ocaml - # Remove from this when Infer updates their opam.locked to use at least these versions - pinned_deps = { - "mlgmpidl" => "1.2.12", - "octavius" => "1.2.1", - "parmap" => "1.0-rc11", - "ppx_tools" => "5.3+4.08.0", - } - pinned_deps.each { |dep, ver| system "opam", "pin", "add", dep, ver, "--locked" } - - # Unfortunately, opam can't cope if a system ocaml-num happens to be installed. - # Instead, we depend on Homebrew's ocaml-num and fool opam into using it. - # https://github.com/ocaml/opam-repository/issues/14646 - system "opam", "pin", "add", "ocamlfind", Formula["ocaml-findlib"].version.to_s, "--locked", "--fake" - system "opam", "pin", "add", "num", Formula["ocaml-num"].version.to_s, "--locked", "--fake" - - # Relax the dependency lock on a specific ocaml - # Also ignore anything we pinned above - ENV["OPAMIGNORECONSTRAINTS"] = "ocaml,ocamlfind,num,#{pinned_deps.keys.join(",")}" - - # Remove ocaml-variants dependency (we won't be using it) - inreplace "opam.locked", /^ +"ocaml-variants" \{= ".*?"\}$\n/, "" - - system "opam", "exec", "--", "./build-infer.sh", "all", "--yes", "--user-opam-switch" - system "opam", "exec", "--", "make", "install-with-libs" - end - - test do - (testpath/"FailingTest.c").write <<~EOS - #include - - int main() { - int *s = NULL; - *s = 42; - - return 0; - } - EOS - - (testpath/"PassingTest.c").write <<~EOS - #include - - int main() { - int *s = NULL; - if (s != NULL) { - *s = 42; - } - - return 0; - } - EOS - - shell_output("#{bin}/infer --fail-on-issue -P -- clang -c FailingTest.c", 2) - shell_output("#{bin}/infer --fail-on-issue -P -- clang -c PassingTest.c") - - (testpath/"FailingTest.java").write <<~EOS - class FailingTest { - - String mayReturnNull(int i) { - if (i > 0) { - return "Hello, Infer!"; - } - return null; - } - - int mayCauseNPE() { - String s = mayReturnNull(0); - return s.length(); - } - } - EOS - - (testpath/"PassingTest.java").write <<~EOS - class PassingTest { - - String mayReturnNull(int i) { - if (i > 0) { - return "Hello, Infer!"; - } - return null; - } - - int mayCauseNPE() { - String s = mayReturnNull(0); - return s == null ? 0 : s.length(); - } - } - EOS - - shell_output("#{bin}/infer --fail-on-issue -P -- javac FailingTest.java", 2) - shell_output("#{bin}/infer --fail-on-issue -P -- javac PassingTest.java") - end -end diff --git a/Formula/influxdb.rb b/Formula/influxdb.rb deleted file mode 100644 index 8d85db9251b61..0000000000000 --- a/Formula/influxdb.rb +++ /dev/null @@ -1,109 +0,0 @@ -class Influxdb < Formula - desc "Time series, events, and metrics database" - homepage "https://influxdata.com/time-series-platform/influxdb/" - url "https://github.com/influxdata/influxdb.git", - :tag => "v1.8.0", - :revision => "781490de48220d7695a05c29e5a36f550a4568f5" - license "MIT" - head "https://github.com/influxdata/influxdb.git" - - bottle do - cellar :any_skip_relocation - sha256 "79c4ceedc4829159bafc592b9363e33719ecbd105c681db0d49217a5d276e354" => :catalina - sha256 "6393249a983631cde5bb524dfbf2f92c3b53e5984e88082ea38d157db54d32ad" => :mojave - sha256 "7c8070708d95ed863c5fc37eefed541624410feb58ec3d20cc46f349528d9e8a" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - influxdb_path = buildpath/"src/github.com/influxdata/influxdb" - influxdb_path.install Dir["*"] - revision = `git rev-parse HEAD`.strip - version = `git describe --tags`.strip - - cd influxdb_path do - system "go", "install", - "-ldflags", "-X main.version=#{version} -X main.commit=#{revision} -X main.branch=master-1.x", - "./..." - end - - inreplace influxdb_path/"etc/config.sample.toml" do |s| - s.gsub! "/var/lib/influxdb/data", "#{var}/influxdb/data" - s.gsub! "/var/lib/influxdb/meta", "#{var}/influxdb/meta" - s.gsub! "/var/lib/influxdb/wal", "#{var}/influxdb/wal" - end - - bin.install "bin/influxd" - bin.install "bin/influx" - bin.install "bin/influx_tsm" - bin.install "bin/influx_stress" - bin.install "bin/influx_inspect" - etc.install influxdb_path/"etc/config.sample.toml" => "influxdb.conf" - - (var/"influxdb/data").mkpath - (var/"influxdb/meta").mkpath - (var/"influxdb/wal").mkpath - end - - plist_options :manual => "influxd -config #{HOMEBREW_PREFIX}/etc/influxdb.conf" - - def plist - <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/influxd - -config - #{HOMEBREW_PREFIX}/etc/influxdb.conf - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/influxdb.log - StandardOutPath - #{var}/log/influxdb.log - SoftResourceLimits - - NumberOfFiles - 10240 - - - - EOS - end - - test do - (testpath/"config.toml").write shell_output("#{bin}/influxd config") - inreplace testpath/"config.toml" do |s| - s.gsub! %r{/.*/.influxdb/data}, "#{testpath}/influxdb/data" - s.gsub! %r{/.*/.influxdb/meta}, "#{testpath}/influxdb/meta" - s.gsub! %r{/.*/.influxdb/wal}, "#{testpath}/influxdb/wal" - end - - begin - pid = fork do - exec "#{bin}/influxd -config #{testpath}/config.toml" - end - sleep 6 - output = shell_output("curl -Is localhost:8086/ping") - assert_match /X-Influxdb-Version:/, output - ensure - Process.kill("SIGTERM", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/inform6.rb b/Formula/inform6.rb deleted file mode 100644 index 2a40d19c0c71b..0000000000000 --- a/Formula/inform6.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Inform6 < Formula - desc "Design system for interactive fiction" - homepage "https://inform-fiction.org/inform6.html" - url "https://ifarchive.org/if-archive/infocom/compilers/inform6/source/inform-6.34-6.12.2.tar.gz" - mirror "https://ifarchive.org/if-archive/infocom/compilers/inform6/source/old/inform-6.34-6.12.2.tar.gz" - version "6.34-6.12.2" - sha256 "c149f143f2c29a4cb071e578afef8097647cc9e823f7fcfab518ac321d9d259f" - head "https://gitlab.com/DavidGriffith/inform6unix.git" - - bottle do - cellar :any_skip_relocation - sha256 "961725b635b0a0bec6c5ee2de80485cc2ae54c6704692095bf73afb45d4934a0" => :catalina - sha256 "be06ad010ef37eb03a5ec804cd6547087772350ccc1c03d6854cd4bebd8a5b9d" => :mojave - sha256 "087ee415674833ac532a1fe70c30d8d84015d91e1eeab76273707e7754ef8be4" => :high_sierra - end - - resource "Adventureland.inf" do - url "https://inform-fiction.org/examples/Adventureland/Adventureland.inf" - sha256 "3961388ff00b5dfd1ccc1bb0d2a5c01a44af99bdcf763868979fa43ba3393ae7" - end - - def install - system "make", "PREFIX=#{prefix}", "MAN_PREFIX=#{man}", "install" - end - - test do - resource("Adventureland.inf").stage do - system "#{bin}/inform", "Adventureland.inf" - assert_predicate Pathname.pwd/"Adventureland.z5", :exist? - end - end -end diff --git a/Formula/infrakit.rb b/Formula/infrakit.rb deleted file mode 100644 index 016a645316e0d..0000000000000 --- a/Formula/infrakit.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Infrakit < Formula - desc "Toolkit for creating and managing declarative infrastructure" - homepage "https://github.com/docker/deploykit" - url "https://github.com/docker/deploykit.git", - :tag => "v0.5", - :revision => "3d2670e484176ce474d4b3d171994ceea7054c02" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "1ad3128e68d1c83ca103eb1469138f3a0d40722b1a9c300babcd50533ff9342a" => :catalina - sha256 "a20e2268d7d92cb9fcdb136c0940a7bfa62faf6bdc33f79f89639bc08e7d7cb1" => :mojave - sha256 "3d188727e1be0bdf150e152b0939560a209415fa9d3b5c2275eea163510d4994" => :high_sierra - sha256 "8db80c4d2d7842486a4cedfa4952ed06e453f2e61f4e6818a08b17fa694d1a1c" => :sierra - end - - depends_on "go" => :build - depends_on "libvirt" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/docker/infrakit").install buildpath.children - cd "src/github.com/docker/infrakit" do - system "make", "cli" - bin.install "build/infrakit" - prefix.install_metafiles - end - end - - test do - ENV["INFRAKIT_HOME"] = testpath - ENV["INFRAKIT_CLI_DIR"] = testpath - assert_match revision.to_s, shell_output("#{bin}/infrakit version") - end -end diff --git a/Formula/iniparser.rb b/Formula/iniparser.rb deleted file mode 100644 index a138a4ec488bc..0000000000000 --- a/Formula/iniparser.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Iniparser < Formula - desc "Library for parsing ini files" - homepage "http://ndevilla.free.fr/iniparser/" - url "https://github.com/ndevilla/iniparser/archive/v4.1.tar.gz" - sha256 "960daa800dd31d70ba1bacf3ea2d22e8ddfc2906534bf328319495966443f3ae" - license "MIT" - head "https://github.com/ndevilla/iniparser.git" - - bottle do - cellar :any_skip_relocation - sha256 "bcda9d9c41e5ecf09a748eae0c6054c92ce858df53d835e5454310ea4f731a8c" => :catalina - sha256 "69dde8e886645f5b89f83f36835c18449afe7f6c4f119d466d7f204e994952c7" => :mojave - sha256 "cec20d33114e7a5811acb41f9f9a36a411ffd2eebb7d537167b9b541b03fff8d" => :high_sierra - sha256 "7ad8eb3b8a66c08b78d2d9d3db18bd50e842d1c5962600ad0c9c8244d296dea8" => :sierra - end - - conflicts_with "fastbit", :because => "both install `include/dictionary.h`" - - def install - # Only make the *.a file; the *.so target is useless (and fails). - system "make", "libiniparser.a", "CC=#{ENV.cc}", "RANLIB=ranlib" - lib.install "libiniparser.a" - include.install Dir["src/*.h"] - end -end diff --git a/Formula/inko.rb b/Formula/inko.rb deleted file mode 100644 index 2a9d6117e00db..0000000000000 --- a/Formula/inko.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Inko < Formula - desc "The Inko programming language" - homepage "https://inko-lang.org/" - url "https://gitlab.com/inko-lang/inko/-/archive/v0.6.0/inko-v0.6.0.tar.gz" - sha256 "3560023128675db5f76698e546e7f3fce70f45816735fb3fa71d103ae383fc61" - license "MPL-2.0" - head "https://gitlab.com/inko-lang/inko.git" - - bottle do - cellar :any_skip_relocation - sha256 "f3191304d3390550d8c47e063ca84e204d571f398c6034fda2395487f8aa81ea" => :catalina - sha256 "be14d156158816f1389f2b18e04f06f8a6bc9310c9ff6286e1045d9a98f27f18" => :mojave - sha256 "751dd81d09fcbd7aff9fe9580997d04f8c96ea45c064a18b94455c7508a3ba7e" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "coreutils" => :build - depends_on "libtool" => :build - depends_on "make" => :build - depends_on "rust" => :build - - uses_from_macos "ruby", :since => :sierra - - def install - make = Formula["make"].opt_bin/"gmake" - system make, "install", "PREFIX=#{libexec}" - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files libexec/"bin", :INKOC_HOME => libexec/"lib/inko" - end - - test do - (testpath/"hello.inko").write <<~EOS - import std::stdio::stdout - - stdout.print('Hello, world!') - EOS - assert_equal "Hello, world!\n", shell_output("#{bin}/inko hello.inko") - end -end diff --git a/Formula/inlets.rb b/Formula/inlets.rb deleted file mode 100644 index 7891e8de6882a..0000000000000 --- a/Formula/inlets.rb +++ /dev/null @@ -1,109 +0,0 @@ -class Inlets < Formula - desc "Expose your local endpoints to the Internet" - homepage "https://github.com/inlets/inlets" - url "https://github.com/inlets/inlets.git", - :tag => "2.7.3", - :revision => "2934c3c247ea28996ebb50889403befced94b29a" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "8706b38a917c0acfa8343479db33c206a78132d01992834a39816400d65949f9" => :catalina - sha256 "20ee65ae593585ac381997df0862a2267383a216a14440e75f775373df9117fb" => :mojave - sha256 "43a486286ab55be362fd2c2a5c3a5764b00fd671fc93077d82b70b2719a62e5a" => :high_sierra - end - - depends_on "go" => :build - - uses_from_macos "ruby" => :test - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/inlets/inlets").install buildpath.children - cd "src/github.com/inlets/inlets" do - commit = Utils.safe_popen_read("git", "rev-parse", "HEAD").chomp - system "go", "build", "-ldflags", - "-s -w -X main.GitCommit=#{commit} -X main.Version=#{version}", - "-a", - "-installsuffix", "cgo", "-o", bin/"inlets" - prefix.install_metafiles - end - end - - def cleanup(name, pid) - puts "Tearing down #{name} on PID #{pid}" - Process.kill("TERM", pid) - Process.wait(pid) - end - - test do - upstream_port = free_port - remote_port = free_port - MOCK_RESPONSE = "INLETS OK".freeze - SECRET_TOKEN = "itsasecret-sssshhhhh".freeze - - (testpath/"mock_upstream_server.rb").write <<~EOS - require 'socket' - server = TCPServer.new('localhost', #{upstream_port}) - loop do - socket = server.accept - request = socket.gets - STDERR.puts request - response = "OK\\n" - shutdown = false - if request.include? "inlets-test" - response = "#{MOCK_RESPONSE}\\n" - shutdown = true - end - socket.print "HTTP/1.1 200 OK\\r\\n" + - "Host: localhost:#{upstream_port}\\r\\n" + - "Content-Type: text/plain\\r\\n" + - "Content-Length: \#\{response.bytesize\}\\r\\n" + - "Connection: close\\r\\n" - socket.print "\\r\\n" - socket.print response - socket.close - if shutdown - puts "Exiting test server" - exit 0 - end - end - EOS - - mock_upstream_server_pid = fork do - exec "ruby mock_upstream_server.rb" - end - - begin - stable_resource = stable.instance_variable_get(:@resource) - commit = stable_resource.instance_variable_get(:@specs)[:revision] - - # Basic --version test - inlets_version = shell_output("#{bin}/inlets version") - assert_match /\s#{commit}$/, inlets_version - assert_match /\s#{version}$/, inlets_version - - # Client/Server e2e test - # This test involves establishing a client-server inlets tunnel on the - # remote_port, running a mock server on the upstream_port and then - # testing that we can hit the mock server upstream_port via the tunnel remote_port - sleep 3 # Waiting for mock server - server_pid = fork do - exec "#{bin}/inlets server --port #{remote_port} --token #{SECRET_TOKEN}" - end - - client_pid = fork do - # Starting inlets client - exec "#{bin}/inlets client --remote localhost:#{remote_port} " \ - "--upstream localhost:#{upstream_port} --token #{SECRET_TOKEN}" - end - - sleep 3 # Waiting for inlets websocket tunnel - assert_match MOCK_RESPONSE, shell_output("curl -s http://localhost:#{remote_port}/inlets-test") - ensure - cleanup("Mock Server", mock_upstream_server_pid) - cleanup("Inlets Server", server_pid) - cleanup("Inlets Client", client_pid) - end - end -end diff --git a/Formula/innoextract.rb b/Formula/innoextract.rb deleted file mode 100644 index 98139bebfbaa1..0000000000000 --- a/Formula/innoextract.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Innoextract < Formula - desc "Tool to unpack installers created by Inno Setup" - homepage "https://constexpr.org/innoextract/" - head "https://github.com/dscharrer/innoextract.git" - stable do - url "https://constexpr.org/innoextract/files/innoextract-1.8.tar.gz" - sha256 "5e78f6295119eeda08a54dcac75306a1a4a40d0cb812ff3cd405e9862c285269" - - # Boost 1.70+ compatibility. Remove with next release. b47f46 is - # already in master. - patch do - url "https://github.com/dscharrer/innoextract/commit/b47f46102bccf1d813ca159230029b0cd820ceff.patch?full_index=1" - sha256 "92d321d552a65e16ae6df992a653839fb19de79aa77388c651bf57b3c582d546" - end - end - - bottle do - cellar :any - sha256 "d3a81822f7925b57904c0c669c4296b3ed0df8551c1cc3039c58341af674bf01" => :catalina - sha256 "c83524adccf3e591b2e72a7cc72668972f379a9aad9f8a555cc2ce3fa0a90143" => :mojave - sha256 "92323fd4044aae1db881b3e18ce58b8c51e77a8b745b4e9c120e500cf2cb3ed1" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "xz" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system "#{bin}/innoextract", "--version" - end -end diff --git a/Formula/innotop.rb b/Formula/innotop.rb deleted file mode 100644 index bd2493c36135f..0000000000000 --- a/Formula/innotop.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Innotop < Formula - desc "Top clone for MySQL" - homepage "https://github.com/innotop/innotop/" - url "https://github.com/innotop/innotop/archive/v1.12.0.tar.gz" - sha256 "f56d51b2c33a9c03f1b9d4fc5f7480f1c2104ef1e8f04def84a16f35d0bc42f6" - license "GPL-2.0" - revision 2 - head "https://github.com/innotop/innotop.git" - - bottle do - cellar :any - sha256 "937b00c65e3a404671911927fb6822401d1ee7d7d485519522cd98c4cf3c3f4b" => :catalina - sha256 "c121ba3fb8b300e6504f82d09f37845ddec1b3e7bdcf351c4f803bb44b922bc2" => :mojave - sha256 "34c26eaa153e3412c1d4426a3f8df76661dc260b454f06943a2e75dcee329140" => :high_sierra - end - - depends_on "mysql-client" - depends_on "openssl@1.1" - - resource "DBI" do - url "https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.636.tar.gz" - sha256 "8f7ddce97c04b4b7a000e65e5d05f679c964d62c8b02c94c1a7d815bb2dd676c" - 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 "TermReadKey" 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" - resources.each do |r| - r.stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - end - - # Disable dynamic selection of perl which may cause segfault when an - # incompatible perl is picked up. - inreplace "innotop", "#!/usr/bin/env perl", "#!/usr/bin/perl" - - system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}" - system "make", "install" - share.install prefix/"man" - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - # Calling commands throws up interactive GUI, which is a pain. - assert_match version.to_s, shell_output("#{bin}/innotop --version") - end -end diff --git a/Formula/insect.rb b/Formula/insect.rb deleted file mode 100644 index ac32517002a88..0000000000000 --- a/Formula/insect.rb +++ /dev/null @@ -1,31 +0,0 @@ -require "language/node" - -class Insect < Formula - desc "High precision scientific calculator with support for physical units" - homepage "https://insect.sh/" - url "https://registry.npmjs.org/insect/-/insect-5.4.0.tgz" - sha256 "c810e50c473439b04b2b3b7e580e6a2781f1c8747eb4261c262e413d6a145c2c" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "1a7bbd56f97d661e4e236e8375db1614659cf2a35d2112feab11c258d437b054" => :catalina - sha256 "8ba4c9bce3fa2fa0dc6546910d0ed7afff432f2e7938e63638c6494a197bba23" => :mojave - sha256 "d0efc8426a611811210f093f7a91671fd3f741619709ca88f04274ce7f8e9c06" => :high_sierra - end - - depends_on "psc-package" => :build - depends_on "pulp" => :build - depends_on "purescript" => :build - 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 "120000 ms", shell_output("#{bin}/insect '1 min + 60 s -> ms'").chomp - assert_equal "299792458 m/s", shell_output("#{bin}/insect speedOfLight").chomp - end -end diff --git a/Formula/inspectrum.rb b/Formula/inspectrum.rb deleted file mode 100644 index 69e39700a6c3e..0000000000000 --- a/Formula/inspectrum.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Inspectrum < Formula - desc "Offline radio signal analyser" - homepage "https://github.com/miek/inspectrum" - url "https://github.com/miek/inspectrum/archive/v0.2.2.tar.gz" - sha256 "9e513101a59822c86b84cb7717f395c59bb27a6c192fe021cf4ffb7cf1d09c78" - license "GPL-3.0" - head "https://github.com/miek/inspectrum.git" - - bottle do - cellar :any - sha256 "e9f494bf8e1e9efa17e2a5d1903f48098ee25208a64593a041a46b2fdf8d7b72" => :catalina - sha256 "54282d4f9ec25f3573d93b497197c5b240561321525fea3617a28efe02e3c16a" => :mojave - sha256 "e54bcce14f93b2c84b738ca978b4b931df3b59d8c444288c5619a759b378a04c" => :high_sierra - sha256 "0877551fa20ea67f1aab886ccd90577760ad7ab295787dd37e509283cb2129d2" => :sierra - sha256 "ae97d37f999dab31422a9a9dac70756e8f5b97a0f6520cb59ae94bee5a992755" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "fftw" - depends_on "liquid-dsp" - depends_on "qt" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - assert_match "-r, --rate Set sample rate.", shell_output("#{bin}/inspectrum -h").strip - end -end diff --git a/Formula/inspircd.rb b/Formula/inspircd.rb deleted file mode 100644 index 48e6c9d1193e5..0000000000000 --- a/Formula/inspircd.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Inspircd < Formula - desc "Modular C++ Internet Relay Chat daemon" - homepage "https://www.inspircd.org/" - url "https://github.com/inspircd/inspircd/archive/v3.6.0.tar.gz" - sha256 "f9a80ddfd8354163e0935ec65ea2c596c93152560ebb56dbeb5f8b3e1b53eb1e" - - bottle do - sha256 "5ffffc7ee1d4a804d3bea62c0daacbc37113504cd540b107c7845c001613ea91" => :catalina - sha256 "72807c0b16c0a71fc272a67dc0ab0678f8978443e37d2492bf758263d1a29526" => :mojave - sha256 "10773bb68411503c25a83bf09b6ba3bbdb7ba0f40ff10bc5afe4b07c9b0e81e3" => :high_sierra - end - - depends_on "pkg-config" => :build - - skip_clean "data" - skip_clean "logs" - - def install - system "./configure", "--enable-extras=m_ldapauth.cpp,m_ldapoper.cpp" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match("ERROR: Cannot open config file", shell_output("#{bin}/inspircd", 2)) - end -end diff --git a/Formula/instalooter.rb b/Formula/instalooter.rb deleted file mode 100644 index 5ef51eb491d59..0000000000000 --- a/Formula/instalooter.rb +++ /dev/null @@ -1,106 +0,0 @@ -class Instalooter < Formula - include Language::Python::Virtualenv - - desc "Download any picture or video associated from an Instagram profile" - homepage "https://github.com/althonos/instalooter" - url "https://files.pythonhosted.org/packages/72/ea/9d4d3321ec44cbb41738f8a0b89f14437f474008beaad31d23df6e0f9d20/instalooter-2.4.3.tar.gz" - sha256 "092049a6f8d3da6c25d1ce9773ac5802ce56d9cc80e32f28f99bb47a240f1532" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "406c7f00325e2c57ea064d5e04356b6297a41576beb9a487c6d221d71d9cb47d" => :catalina - sha256 "e0186165b707d32f738f4be750e41b01c15ee5f61de04099c3a7e9ef1354a0ed" => :mojave - sha256 "8c3b6d15eb810012c5b14249ed2a04b423e40e1b7637292c2bdd000541da2bc2" => :high_sierra - end - - depends_on "python@3.8" - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" - sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "coloredlogs" do - url "https://files.pythonhosted.org/packages/63/09/1da37a51b232eaf9707919123b2413662e95edd50bace5353a548910eb9d/coloredlogs-10.0.tar.gz" - sha256 "b869a2dda3fa88154b9dd850e27828d8755bfab5a838a1c97fbc850c6e377c36" - end - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "fs" do - url "https://files.pythonhosted.org/packages/1d/a1/8813629b38a8d97e8f1eceb6c7da03b37633c93104fbd8e30e09d195425a/fs-2.4.11.tar.gz" - sha256 "cc99d476b500f993df8ef697b96dc70928ca2946a455c396a566efe021126767" - end - - resource "humanfriendly" do - url "https://files.pythonhosted.org/packages/6c/19/8e3b4c6fa7cca4788817db398c05274d98ecc6a35e0eaad2846fde90c863/humanfriendly-8.2.tar.gz" - sha256 "bf52ec91244819c780341a3438d5d7b09f431d3f113a475147ac9b7b167a3d12" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "tenacity" do - url "https://files.pythonhosted.org/packages/a9/26/dfe61bbfbe7d723fe76ff41960c96161fd32ff303be88bbbdfb428250cd4/tenacity-6.2.0.tar.gz" - sha256 "29ae90e7faf488a8628432154bb34ace1cca58244c6ea399fd33f066ac71339a" - end - - resource "tqdm" do - url "https://files.pythonhosted.org/packages/a9/03/df1d77e852dd697c0ff7b7b1b9888739517e5f97dfbd2cf7ebd13234084c/tqdm-4.46.1.tar.gz" - sha256 "cd140979c2bebd2311dfb14781d8f19bd5a9debb92dcab9f6ef899c987fcf71f" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "verboselogs" do - url "https://files.pythonhosted.org/packages/29/15/90ffe9bdfdd1e102bc6c21b1eea755d34e69772074b6e706cab741b9b698/verboselogs-1.7.tar.gz" - sha256 "e33ddedcdfdafcb3a174701150430b11b46ceb64c2a9a26198c76a156568e427" - end - - def install - virtualenv_install_with_resources - end - - test do - system bin/"instalooter", "logout" - end -end diff --git a/Formula/instead.rb b/Formula/instead.rb deleted file mode 100644 index 1fc62344b58dc..0000000000000 --- a/Formula/instead.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Instead < Formula - desc "Interpreter of simple text adventures" - homepage "https://instead.syscall.ru/" - url "https://github.com/instead-hub/instead/archive/3.3.2.tar.gz" - sha256 "bdb827f36e693dc7b443e69d4678d24f1ccc20dc093c22f58b8d78192da15f2e" - - bottle do - sha256 "e447bee8716c692d07e6d58b337639a64334dfa921326810c5ae0d64b14fe72e" => :catalina - sha256 "128a389655c4361f48dd8ee81344682a3d4433485cf91569a71961bed0885e06" => :mojave - sha256 "e9029b89e6133d0f233a679a684e64d0195b283aabb6c55640f8a95ed1297f50" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "lua" - depends_on "sdl2" - depends_on "sdl2_image" - depends_on "sdl2_mixer" - depends_on "sdl2_ttf" - - def install - mkdir "build" do - system "cmake", "..", "-DWITH_GTK2=OFF", - "-DLUA_INCLUDE_DIR=#{Formula["lua"].opt_include}/lua", - "-DLUA_LIBRARY=#{Formula["lua"].opt_lib}/liblua.dylib", - *std_cmake_args - system "make", "install" - end - end - - test do - assert_match /INSTEAD #{version} /, shell_output("#{bin}/instead -h 2>&1") - end -end diff --git a/Formula/intercal.rb b/Formula/intercal.rb deleted file mode 100644 index 8fd45639815f4..0000000000000 --- a/Formula/intercal.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Intercal < Formula - desc "Esoteric, parody programming language" - homepage "http://catb.org/~esr/intercal/" - url "http://catb.org/~esr/intercal/intercal-0.31.tar.gz" - sha256 "93d842b81ecdc82b352beb463fbf688749b0c04445388a999667e1958bba4ffc" - license "GPL-2.0" - - bottle do - sha256 "a2c1673fbed3d331e725694196acf9ea4cd6bc6df3b86568af3e67ee90d70b30" => :catalina - sha256 "d048d5c58fd1fc3b17c44103b3bbddd445a657415c215916587d9eb8e7f9c2da" => :mojave - sha256 "c0569e08915adc912bdc3fb149d0d3c50e7a2d941fff8b2d951b22fcfaf4539f" => :high_sierra - sha256 "b00c959878aaead39f9106ef199d7082b4e1a62ef6957f11796a99650678c9b2" => :sierra - end - - head do - url "https://gitlab.com/esr/intercal.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - if build.head? - cd "buildaux" do - system "./regenerate-build-system.sh" - end - end - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - (etc/"intercal").install Dir["etc/*"] - pkgshare.install "pit" - end - - test do - (testpath/"lib").mkpath - (testpath/"test").mkpath - cp pkgshare/"pit/beer.i", "test" - cd "test" do - system bin/"ick", "beer.i" - system "./beer" - end - end -end diff --git a/Formula/internetarchive.rb b/Formula/internetarchive.rb deleted file mode 100644 index f21e19ddd5bd6..0000000000000 --- a/Formula/internetarchive.rb +++ /dev/null @@ -1,104 +0,0 @@ -class Internetarchive < Formula - include Language::Python::Virtualenv - - desc "Python wrapper for the various Internet Archive APIs" - homepage "https://github.com/jjjake/internetarchive" - url "https://files.pythonhosted.org/packages/35/de/16bc726cb5f328d1cab5d4abd7ea7537749346ea410ec8979bd1961ca162/internetarchive-1.9.4.tar.gz" - sha256 "db2322d71b13c557d387bdf080253f131662ae3dcebba703b328868808c9605b" - license "AGPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "29143e0646a76b758ab3c2237a2dff1cd3b3daec589fdffd78185b7d7a28ebb3" => :catalina - sha256 "39083e62f37c3b06fb397601ede192d8c60dbbb65f11398933594e131242ab9c" => :mojave - sha256 "32d59ff6566c18d997d4558aef73c9f6ae4ea076ec302fb8c8cfcd312b43d563" => :high_sierra - end - - depends_on "python@3.8" - - resource "args" do - url "https://files.pythonhosted.org/packages/e5/1c/b701b3f4bd8d3667df8342f311b3efaeab86078a840fb826bd204118cc6b/args-0.1.0.tar.gz" - sha256 "a785b8d837625e9b61c39108532d95b85274acd679693b71ebb5156848fcf814" - end - - resource "backports.csv" do - url "https://files.pythonhosted.org/packages/79/0c/d0eaa9380189a292121acab65199ac95b9209b45006ad8aa5266abd36943/backports.csv-1.0.7.tar.gz" - sha256 "1277dfff73130b2e106bf3dd347adb3c5f6c4340882289d88f31240da92cbd6d" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "clint" do - url "https://files.pythonhosted.org/packages/3d/b4/41ecb1516f1ba728f39ee7062b9dac1352d39823f513bb6f9e8aeb86e26d/clint-0.5.1.tar.gz" - sha256 "05224c32b1075563d0b16d0015faaf9da43aa214e4a2140e51f08789e7a4c5aa" - end - - # requires 0.5.5 - resource "contextlib2" do - url "https://files.pythonhosted.org/packages/6e/db/41233498c210b03ab8b072c8ee49b1cd63b3b0c76f8ea0a0e5d02df06898/contextlib2-0.5.5.tar.gz" - sha256 "509f9419ee91cdd00ba34443217d5ca51f5a364a404e1dce9e8979cea969ca48" - 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/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "jsonpatch" do - url "https://files.pythonhosted.org/packages/70/9f/6f0bfbb4cc1401ce994d336bcb4ed2aa924f395e7fd1926511c04a52eee1/jsonpatch-1.25.tar.gz" - sha256 "ddc0f7628b8bfdd62e3cbfbc24ca6671b0b6265b50d186c2cf3659dc0f78fd6a" - end - - resource "jsonpointer" do - url "https://files.pythonhosted.org/packages/52/e7/246d9ef2366d430f0ce7bdc494ea2df8b49d7a2a41ba51f5655f68cfe85f/jsonpointer-2.0.tar.gz" - sha256 "c192ba86648e05fdae4f08a17ec25180a9aef5008d973407b581798a83975362" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "schema" do - url "https://files.pythonhosted.org/packages/f7/95/db0f50583e47d8b8cf346599880734de980a9f4bf040a0b5fb236e891c71/schema-0.7.1.tar.gz" - sha256 "c9dc8f4624e287c7d1435f8fd758f6a0aabbb7eff442db9192cd46f0e2b6d959" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "tqdm" do - url "https://files.pythonhosted.org/packages/12/67/e736c012c6c8b4092dd54bb9bdd7737acf9a140a98c58b87c35363d0105d/tqdm-4.45.0.tar.gz" - sha256 "00339634a22c10a7a22476ee946bbde2dbe48d042ded784e4d88e0236eca5d81" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - end - - def install - virtualenv_install_with_resources - bin.install_symlink libexec/"bin/ia" - end - - test do - metadata = JSON.parse shell_output("#{bin}/ia metadata tigerbrew") - assert_equal metadata["metadata"]["uploader"], "mistydemeo@gmail.com" - end -end diff --git a/Formula/intltool.rb b/Formula/intltool.rb deleted file mode 100644 index bb2b459a30903..0000000000000 --- a/Formula/intltool.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Intltool < Formula - desc "String tool" - homepage "https://wiki.freedesktop.org/www/Software/intltool" - url "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz" - sha256 "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "853b0f355c1bb6bdfc41d2ad17026d75c93aecb7581e711d7db3edab4ca6b5d4" => :catalina - sha256 "52ccb5bfce1cda123f30c84335172335cee0706973e6769ec9a5358cb160f364" => :mojave - sha256 "7924c9c7dc7b3eee0056171df8c6b66c2e0e8888e4638232e967a5ea31ca5b86" => :high_sierra - sha256 "e587e46b6ebdebb7864eb4f9cb17c221024d9167ae0148899adedb6127b2bdfb" => :sierra - sha256 "14bb0680842b8b392cb1a5f5baf142e99a54a538d1a587f6d1158785b276ffc6" => :el_capitan - sha256 "da6c24f1cc40fdf6ae286ec003ecd779d0f866fe850e36f5e5953786fa45a561" => :yosemite - sha256 "5deeef3625d52f71d633e7510396d0028ec7b7ccf40c78b5d254bdf4214e6363" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-silent-rules" - system "make", "install" - end - - test do - system bin/"intltool-extract", "--help" - end -end diff --git a/Formula/inxi.rb b/Formula/inxi.rb deleted file mode 100644 index de74523e310e9..0000000000000 --- a/Formula/inxi.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Inxi < Formula - desc "Full featured CLI system information tool" - homepage "https://smxi.org/docs/inxi.htm" - url "https://github.com/smxi/inxi/archive/3.1.04-1.tar.gz" - version "3.1.04" - sha256 "9661ee7120a5bdc5b7cd0b36a56aa18924283490e5430216d2ed8dc685cfc68c" - license "GPL-3.0" - head "https://github.com/smxi/inxi.git" - - bottle :unneeded - - def install - bin.install "inxi" - man1.install "inxi.1" - - ["LICENSE.txt", "README.txt", "inxi.changelog"].each do |file| - prefix.install file - end - end - - test do - inxi_output = shell_output("#{bin}/inxi") - - uname = shell_output("uname").strip - assert_match uname.to_str, inxi_output.to_s - - uname_r = shell_output("uname -r").strip - assert_match uname_r.to_str, inxi_output.to_s - end -end diff --git a/Formula/io.rb b/Formula/io.rb deleted file mode 100644 index a1ff721c25c8b..0000000000000 --- a/Formula/io.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Io < Formula - desc "Small prototype-based programming language" - homepage "http://iolanguage.com/" - url "https://github.com/IoLanguage/io/archive/2017.09.06.tar.gz" - sha256 "9ac5cd94bbca65c989cd254be58a3a716f4e4f16480f0dc81070457aa353c217" - revision 1 - head "https://github.com/IoLanguage/io.git" - - bottle do - sha256 "c4c862d20a8e4ddb1e6e588414a9e23ae2a17baa490e3beb621614aca7a8ca87" => :catalina - sha256 "48c37d6f30d8b01d391e7f4ef777b5087425d89a9df0077414769a59333db420" => :mojave - sha256 "a061482b97c1ada8eea9d658f13fe0cfbfa223d97762b51611c4cab2de4c0273" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - - uses_from_macos "libxml2" - - def install - ENV.deparallelize - - # FSF GCC needs this to build the ObjC bridge - ENV.append_to_cflags "-fobjc-exceptions" - - unless build.head? - # Turn off all add-ons in main cmake file - inreplace "CMakeLists.txt", "add_subdirectory(addons)", - "#add_subdirectory(addons)" - end - - mkdir "buildroot" do - system "cmake", "..", "-DCMAKE_DISABLE_FIND_PACKAGE_ODE=ON", - "-DCMAKE_DISABLE_FIND_PACKAGE_Theora=ON", - *std_cmake_args - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.io").write <<~EOS - "it works!" println - EOS - - assert_equal "it works!\n", shell_output("#{bin}/io test.io") - end -end diff --git a/Formula/ioke.rb b/Formula/ioke.rb deleted file mode 100644 index 737495d29ba7a..0000000000000 --- a/Formula/ioke.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Ioke < Formula - desc "Dynamic language targeted at virtual machines" - homepage "https://ioke.org/" - url "https://ioke.org/dist/ioke-P-ikj-0.4.0.tar.gz" - sha256 "701d24d8a8d0901cde64f11c79605c21d43cafbfb2bdd86765b664df13daec7c" - - bottle :unneeded - - def install - # Remove windows files - rm_f Dir["bin/*.bat"] - # Install jars in libexec to avoid conflicts - libexec.install Dir["*"] - - # Point IOKE_HOME to libexec - inreplace libexec/"bin/ioke" do |s| - s.change_make_var! "IOKE_HOME", libexec - end - - bin.install_symlink libexec/"bin/ioke", - libexec/"bin/ispec", - libexec/"bin/dokgen" - end - - test do - system "#{bin}/ioke", "-e", '"test" println' - end -end diff --git a/Formula/ioping.rb b/Formula/ioping.rb deleted file mode 100644 index 10ba98540aa34..0000000000000 --- a/Formula/ioping.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Ioping < Formula - desc "Tool to monitor I/O latency in real time" - homepage "https://github.com/koct9i/ioping" - url "https://github.com/koct9i/ioping/archive/v1.2.tar.gz" - sha256 "d3e4497c653a1e96df67c72ce2b70da18e9f5e3b93179a5bb57a6e30ceacfa75" - license "GPL-3.0" - head "https://github.com/koct9i/ioping.git" - - bottle do - cellar :any_skip_relocation - sha256 "622678afe9bf88bae08cc264dece76f0abefc854915f5b3d5355cde767aa61e1" => :catalina - sha256 "4c88038d68f17bbc405c5ed253542890e0fc1e44ece8650f1a68b6ff6df7fabf" => :mojave - sha256 "9a5ee7cd526c89d70c75fe6fcf61d7b0a777d8bf3a823fe99348864a9838b6ff" => :high_sierra - end - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/ioping", "-c", "1", testpath - end -end diff --git a/Formula/ios-class-guard.rb b/Formula/ios-class-guard.rb deleted file mode 100644 index c3e00c2bed1c3..0000000000000 --- a/Formula/ios-class-guard.rb +++ /dev/null @@ -1,41 +0,0 @@ -class IosClassGuard < Formula - desc "Objective-C obfuscator for Mach-O executables" - homepage "https://github.com/Polidea/ios-class-guard/" - url "https://github.com/Polidea/ios-class-guard/archive/0.8.tar.gz" - sha256 "4446993378f1e84ce1d1b3cbace0375661e3fe2fa1a63b9bf2c5e9370a6058ff" - head "https://github.com/Polidea/ios-class-guard.git" - - bottle do - cellar :any_skip_relocation - sha256 "807b425c949e9a25331abd13967721d6f58d3a1674fcc8175744e713e81ee5d3" => :catalina - sha256 "480f0437e5217cb8a47fcc0e9ffb6ffc62e4f81a79d5df9529320edeed479217" => :mojave - sha256 "1962e7dde167e41141680b1347318396c0878fb8eeae55ec9f09460fcee33142" => :high_sierra - sha256 "a7843a0767e916aa6be1509a984eb698bb54d125d06ad762fd25f4a3d6a55db1" => :sierra - sha256 "0bb9abaac82cbc4e66a12493548659197559a01a779db6ceda4cf6c4439ea0bb" => :el_capitan - sha256 "4cada6d32bb82fbd8ad2afa58b7041bd5da12dc5d9fceab6277eec97459a2d33" => :yosemite - sha256 "4eddde784c843628cb8bcb8c971142683c5a17373058f5bda62356b432dec00a" => :mavericks - end - - depends_on :xcode => :build - - def install - xcodebuild "-workspace", "ios-class-guard.xcworkspace", - "-scheme", "ios-class-guard", - "-configuration", "Release", - "SYMROOT=build", "PREFIX=#{prefix}", "ONLY_ACTIVE_ARCH=YES" - bin.install "build/Release/ios-class-guard" - end - - test do - (testpath/"crashdump").write <<~EOS - 1 MYAPP 0x0006573a -[C03B setR02:] + 42 - EOS - (testpath/"symbols.json").write <<~EOS - { - "C03B" : "MyViewController", - "setR02" : "setRightButtons" - } - EOS - system "#{bin}/ios-class-guard", "-c", "crashdump", "-m", "symbols.json" - end -end diff --git a/Formula/ios-deploy.rb b/Formula/ios-deploy.rb deleted file mode 100644 index 4731f90a4e205..0000000000000 --- a/Formula/ios-deploy.rb +++ /dev/null @@ -1,30 +0,0 @@ -class IosDeploy < Formula - desc "Install and debug iPhone apps from the command-line" - homepage "https://github.com/ios-control/ios-deploy" - url "https://github.com/ios-control/ios-deploy/archive/1.10.0.tar.gz" - sha256 "619176b0a78f631be169970a5afc9ec94b206d48ec7cb367bb5bf9d56b098290" - license "GPL-3.0" - head "https://github.com/ios-control/ios-deploy.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "1b6bb2f1d4f8267797575e5fb2d42fcc4aef8798605b7ccd6a0b77362d37203d" => :catalina - sha256 "14e96bd659a3d47bed7d2e893f9912e5201c04fea54ce56df3642a5037ff621a" => :mojave - sha256 "f810b5465871c66bc706f06edef3fc1570b1c9e92c806d75742c4998f9c27ee6" => :high_sierra - end - - depends_on :xcode => :build - - def install - xcodebuild "-configuration", "Release", "SYMROOT=build" - - xcodebuild "test", "-scheme", "ios-deploy-tests", "-configuration", "Release", "SYMROOT=build" - - bin.install "build/Release/ios-deploy" - end - - test do - system "#{bin}/ios-deploy", "-V" - end -end diff --git a/Formula/ios-sim.rb b/Formula/ios-sim.rb deleted file mode 100644 index 6713b14f9a9cf..0000000000000 --- a/Formula/ios-sim.rb +++ /dev/null @@ -1,28 +0,0 @@ -require "language/node" - -class IosSim < Formula - desc "Command-line application launcher for the iOS Simulator" - homepage "https://github.com/phonegap/ios-sim" - url "https://github.com/ios-control/ios-sim/archive/9.0.0.tar.gz" - sha256 "8c72c8c5f9b0682c218678549c08ca01b3ac2685417fc2ab5b4b803d65a21958" - license "Apache-2.0" - head "https://github.com/phonegap/ios-sim.git" - - bottle do - cellar :any_skip_relocation - sha256 "8c48bcbabb9ddb5b3781c16a2af67518881ff23bd5d7f0723436cb438ef7088e" => :catalina - sha256 "87ddbe7f7341fa207ac5d4a1212e81a3fe838c474bdbcbc2c7239ac2bf8ccc7e" => :mojave - sha256 "ddbe9d541710ab4dd219db3f766e878ff8698dcd88c25a247e5c44e165ea2773" => :high_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/"ios-sim", "--help" - end -end diff --git a/Formula/ios-webkit-debug-proxy.rb b/Formula/ios-webkit-debug-proxy.rb deleted file mode 100644 index 478a63e2d5598..0000000000000 --- a/Formula/ios-webkit-debug-proxy.rb +++ /dev/null @@ -1,43 +0,0 @@ -class IosWebkitDebugProxy < Formula - desc "DevTools proxy for iOS devices" - homepage "https://github.com/google/ios-webkit-debug-proxy" - url "https://github.com/google/ios-webkit-debug-proxy/archive/v1.8.7.tar.gz" - sha256 "e82dcb75b262807c03f12c2eb100f184d0091b2dcada169b5faf4104937c0e6e" - revision 1 - head "https://github.com/google/ios-webkit-debug-proxy.git" - - bottle do - cellar :any - sha256 "6de03a2d656a94b02c930dc3d2213e9399c8b9179e6257a7e2bac636e5190999" => :catalina - sha256 "fe4c5d52840074e86516f5de37a44c89bb4419058b4f3b2023d5cfbb3f16b84a" => :mojave - sha256 "20cab0ad99a2c2559330eb505876c9eaabc42d97709f1ad039dba2b5e54437f5" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libimobiledevice" - depends_on "libplist" - depends_on "openssl@1.1" - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - base_port = free_port - (testpath/"config.csv").write <<~EOS - null:#{base_port},:#{base_port + 1}-#{base_port + 101} - EOS - - fork do - exec "#{bin}/ios_webkit_debug_proxy", "-c", testpath/"config.csv" - end - - sleep(2) - assert_match "iOS Devices:", shell_output("curl localhost:#{base_port}") - end -end diff --git a/Formula/iozone.rb b/Formula/iozone.rb deleted file mode 100644 index e942cc0e2470b..0000000000000 --- a/Formula/iozone.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Iozone < Formula - desc "File system benchmark tool" - homepage "http://www.iozone.org/" - url "http://www.iozone.org/src/current/iozone3_489.tar" - sha256 "6155850d1019f2450dc926bbdb5a24abf423ee3bb928ab1e68569cf60a908584" - - bottle do - cellar :any_skip_relocation - sha256 "01780007c0b535d058e5431c6cc42fc89f9c7caeb08b2a930e37618e3dacae30" => :catalina - sha256 "2f1b2aa83dc4844aea07d2317da1e10c8649b1e654ef2a01e668f754db4ea0e0" => :mojave - sha256 "665363653cd2fcee68332a8f872c4aa94bbe1a3b2b131a95a23f49833727dde6" => :high_sierra - end - - def install - cd "src/current" do - system "make", "macosx", "CC=#{ENV.cc}" - bin.install "iozone" - pkgshare.install %w[Generate_Graphs client_list gengnuplot.sh gnu3d.dem - gnuplot.dem gnuplotps.dem iozone_visualizer.pl - report.pl] - end - man1.install "docs/iozone.1" - end - - test do - assert_match "File size set to 16384 kB", - shell_output("#{bin}/iozone -I -s 16M") - end -end diff --git a/Formula/ip_relay.rb b/Formula/ip_relay.rb deleted file mode 100644 index bf6c4b0f55c3a..0000000000000 --- a/Formula/ip_relay.rb +++ /dev/null @@ -1,16 +0,0 @@ -class IpRelay < Formula - desc "TCP traffic shaping relay application" - homepage "http://www.stewart.com.au/ip_relay/" - url "http://www.stewart.com.au/ip_relay/ip_relay-0.71.tgz" - sha256 "0cf6c7db64344b84061c64e848e8b4f547b5576ad28f8f5e67163fc0382d9ed3" - - bottle :unneeded - - def install - bin.install "ip_relay.pl" => "ip_relay" - end - - test do - shell_output("#{bin}/ip_relay -b", 1) - end -end diff --git a/Formula/ipbt.rb b/Formula/ipbt.rb deleted file mode 100644 index e00605da1d4d5..0000000000000 --- a/Formula/ipbt.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Ipbt < Formula - desc "Program for recording a UNIX terminal session" - homepage "https://www.chiark.greenend.org.uk/~sgtatham/ipbt/" - url "https://www.chiark.greenend.org.uk/~sgtatham/ipbt/ipbt-20190601.d1519e0.tar.gz" - version "20190601" - sha256 "a519507fccda5e3054d3639e9abedb482a108fa8ee6fc3b1c03ba0d6a4ba48aa" - - bottle do - cellar :any_skip_relocation - sha256 "367536bc0020cd8b4313936070ec9539bcfe56de061a40b6bfc4aa0533d82a5a" => :catalina - sha256 "e68f7a1286319ca19382bef65cbf2d80fd1f15bc46dc623cbe9b8f73b5d9d848" => :mojave - sha256 "9ae5d95807ead91cb2bd746fb2f3d4fee82cb39dba42f67bdea9eede792b7261" => :high_sierra - end - - uses_from_macos "ncurses" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking" - system "make", "install" - end - - test do - system "#{bin}/ipbt" - end -end diff --git a/Formula/ipcalc.rb b/Formula/ipcalc.rb deleted file mode 100644 index bbfdec3c303d1..0000000000000 --- a/Formula/ipcalc.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Ipcalc < Formula - desc "Calculate various network masks, etc. from a given IP address" - homepage "http://jodies.de/ipcalc" - url "http://jodies.de/ipcalc-archive/ipcalc-0.41.tar.gz" - sha256 "dda9c571ce3369e5b6b06e92790434b54bec1f2b03f1c9df054c0988aa4e2e8a" - - bottle :unneeded - - def install - bin.install "ipcalc" - end - - test do - system "#{bin}/ipcalc", "--nobinary", "192.168.0.1/24" - end -end diff --git a/Formula/iperf.rb b/Formula/iperf.rb deleted file mode 100644 index 29bde67b114de..0000000000000 --- a/Formula/iperf.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Iperf < Formula - desc "Tool to measure maximum TCP and UDP bandwidth" - homepage "https://sourceforge.net/projects/iperf2/" - url "https://downloads.sourceforge.net/project/iperf2/iperf-2.0.13.tar.gz" - sha256 "c88adec966096a81136dda91b4bd19c27aae06df4d45a7f547a8e50d723778ad" - - bottle do - cellar :any_skip_relocation - sha256 "0b9b36d65f113055e86b158f62daa64bf5c177e27abec34c51cbb60bf2a7d4d7" => :catalina - sha256 "8c24a0392dcda9d134c1d1121671875da4b67905321eb6e67053d6e965f92bee" => :mojave - sha256 "7cee5824d4c70a302b3830eaf6615f52e5a1b41fdcbfbcabb46c5dd3ee00ec2c" => :high_sierra - sha256 "4b29283a8f69c773d307501a5f89af2a0f5804ce62874b7bd2e6ea89145cf73a" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - server = IO.popen("#{bin}/iperf --server") - sleep 1 - assert_match "Bandwidth", pipe_output("#{bin}/iperf --client 127.0.0.1 --time 1") - ensure - Process.kill("SIGINT", server.pid) - Process.wait(server.pid) - end -end diff --git a/Formula/iperf3.rb b/Formula/iperf3.rb deleted file mode 100644 index f3f73f209609a..0000000000000 --- a/Formula/iperf3.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Iperf3 < Formula - desc "Update of iperf: measures TCP, UDP, and SCTP bandwidth" - homepage "https://github.com/esnet/iperf" - url "https://github.com/esnet/iperf/archive/3.7.tar.gz" - sha256 "c349924a777e8f0a70612b765e26b8b94cc4a97cc21a80ed260f65e9823c8fc5" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "b1d4d9506ebfb8ae48882cf4f810b6d52fbbd388211f372e5d56f08abaf61ad3" => :catalina - sha256 "32763a4631055100f4c0e5787aedf3f5c73ebc8a9d238b3b08ba66f052a035a3" => :mojave - sha256 "657bce37d98fbe976445e58f0ef70cd637c5a5223a1a580af3ab33508d07e8a7" => :high_sierra - end - - head do - url "https://github.com/esnet/iperf.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "openssl@1.1" - - def install - system "./bootstrap.sh" if build.head? - system "./configure", "--prefix=#{prefix}", - "--disable-profiling", - "--with-openssl=#{Formula["openssl@1.1"].opt_prefix}" - system "make", "clean" # there are pre-compiled files in the tarball - system "make", "install" - end - - test do - server = IO.popen("#{bin}/iperf3 --server") - sleep 1 - assert_match "Bitrate", pipe_output("#{bin}/iperf3 --client 127.0.0.1 --time 1") - ensure - Process.kill("SIGINT", server.pid) - Process.wait(server.pid) - end -end diff --git a/Formula/ipfs.rb b/Formula/ipfs.rb deleted file mode 100644 index 8b4bcbe0b33d4..0000000000000 --- a/Formula/ipfs.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Ipfs < Formula - desc "Peer-to-peer hypermedia protocol" - homepage "https://ipfs.io/" - url "https://github.com/ipfs/go-ipfs.git", - :tag => "v0.6.0", - :revision => "d6e036a888ba95c15ce243a45c0cacb4a5bb8ee4" - head "https://github.com/ipfs/go-ipfs.git" - - bottle do - cellar :any_skip_relocation - sha256 "e5c9d5a386a83e4e6a9893be6729625902c7eea07ec109fce83b6864a0512bbf" => :catalina - sha256 "cbe22d6554e50f65e202e8b65d3bd41b1a18793cc6d33316397c062dd3ddcd79" => :mojave - sha256 "7efd7e625d8eeb59c6d8ac3c4a582b77024c7f64f46809996404bb7fd9f2be5a" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/ipfs/go-ipfs").install buildpath.children - cd("src/github.com/ipfs/go-ipfs") { system "make", "install" } - bin.install "bin/ipfs" - - cd("src/github.com/ipfs/go-ipfs") { bash_completion.install "misc/completion/ipfs-completion.bash" } - end - - plist_options :manual => "ipfs daemon" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/ipfs - daemon - - RunAtLoad - - - - EOS - end - - test do - assert_match "initializing IPFS node", shell_output(bin/"ipfs init") - end -end diff --git a/Formula/iphotoexport.rb b/Formula/iphotoexport.rb deleted file mode 100644 index 414fd6320e82a..0000000000000 --- a/Formula/iphotoexport.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Iphotoexport < Formula - desc "Export and synchronize iPhoto library to a folder tree" - homepage "https://code.google.com/archive/p/iphotoexport/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/iphotoexport/iphotoexport-1.6.4.zip" - sha256 "85644b5be1541580a35f1ea6144d832267f1284ac3ca23fe9bcd9eda5aaea5d3" - - bottle :unneeded - - depends_on "exiftool" - - def install - unzip_dir = "#{name}-#{version}" - # Change hardcoded exiftool path - inreplace "#{unzip_dir}/tilutil/exiftool.py", "/usr/bin/exiftool", "exiftool" - - prefix.install Dir["#{unzip_dir}/*"] - bin.install_symlink prefix+"iphotoexport.py" => "iphotoexport" - end - - test do - system "#{bin}/iphotoexport", "--help" - end -end diff --git a/Formula/ipinfo.rb b/Formula/ipinfo.rb deleted file mode 100644 index 1ca2d48f370a3..0000000000000 --- a/Formula/ipinfo.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Ipinfo < Formula - desc "Tool for calculation of IP networks" - homepage "https://kyberdigi.cz/projects/ipinfo/" - url "https://kyberdigi.cz/projects/ipinfo/files/ipinfo-1.2.tar.gz" - sha256 "19e6659f781a48b56062a5527ff463a29c4dcc37624fab912d1dce037b1ddf2d" - - bottle do - cellar :any_skip_relocation - sha256 "b2202f465e419b0bc7e3667d75247cc37a46b49d9a4eb5f23f1f63cb361fd366" => :catalina - sha256 "33fdb805793a8566f7f6adca7a1c3b7d0c67071fc846977bacf6629a8e63c9b2" => :mojave - sha256 "c06a0c771b66def2758aad30e8331cc56f751478715e12b25b9e46d9b64090f9" => :high_sierra - sha256 "255c10eb2f0f885ba301fa2977ae3c45b5f7117388739adb58ce4312515ff98f" => :sierra - sha256 "ecb331ae035cf5963afc8e8adf371d80f936960bf0d5ba379b18761263a1b040" => :el_capitan - sha256 "e1ce332c726d060521e97a5402746a60778d91beaf28704d9ce5bb6e17451fb3" => :yosemite - sha256 "686fe99fef85ecbfdcc9c922f6cda898362d70bb9f5b9b7e1aeba8e30c284196" => :mavericks - end - - def install - system "make", "BINDIR=#{bin}", "MANDIR=#{man1}", "install" - end - - test do - system bin/"ipinfo", "127.0.0.1" - end -end diff --git a/Formula/ipmitool.rb b/Formula/ipmitool.rb deleted file mode 100644 index c1d3bbc94b321..0000000000000 --- a/Formula/ipmitool.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Ipmitool < Formula - desc "Utility for IPMI control with kernel driver or LAN interface" - homepage "https://github.com/ipmitool/ipmitool" - url "https://downloads.sourceforge.net/project/ipmitool/ipmitool/1.8.18/ipmitool-1.8.18.tar.bz2" - mirror "https://deb.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.18.orig.tar.bz2" - sha256 "0c1ba3b1555edefb7c32ae8cd6a3e04322056bc087918f07189eeedfc8b81e01" - revision 3 - - bottle do - cellar :any - sha256 "926d5c49a0a1b9411e45c54e412403003266c27127059edb50b40e07adaf2260" => :catalina - sha256 "3bf8d00d62c2e1dc781493d448062ad365ac8e7c73010ee37ba2040a48513c10" => :mojave - sha256 "04462f0b4129d34cbf7e8e5c72591360e89dd6d6cef20008567015d57ab611c4" => :high_sierra - sha256 "f08f0e5717ff8ccf031ca738eb4995b39db5d37b802800b6e0b6c154f6fed830" => :sierra - end - - depends_on "openssl@1.1" - - # https://sourceforge.net/p/ipmitool/bugs/433/#89ea and - # https://sourceforge.net/p/ipmitool/bugs/436/ (prematurely closed): - # Fix segfault when prompting for password - # Re-reported 12 July 2017 https://sourceforge.net/p/ipmitool/mailman/message/35942072/ - patch do - url "https://gist.githubusercontent.com/adaugherity/87f1466b3c93d5aed205a636169d1c58/raw/29880afac214c1821e34479dad50dca58a0951ef/ipmitool-getpass-segfault.patch" - sha256 "fc1cff11aa4af974a3be191857baeaf5753d853024923b55c720eac56f424038" - end - - # Patch for compatibility with OpenSSL 1.1.1 - # https://reviews.freebsd.org/D17527 - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/10f4f68f/ipmitool/openssl-1.1.diff" - sha256 "8ad4e19d7c39d1bf95a0219d03f4d8490727ac79cb297a36639443ef030bb76a" - end - - def install - # Fix ipmi_cfgp.c:33:10: fatal error: 'malloc.h' file not found - # Upstream issue from 8 Nov 2016 https://sourceforge.net/p/ipmitool/bugs/474/ - inreplace "lib/ipmi_cfgp.c", "#include ", "" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --mandir=#{man} - --disable-intf-usb - ] - system "./configure", *args - system "make", "check" - system "make", "install" - end - - test do - # Test version print out - system bin/"ipmitool", "-V" - end -end diff --git a/Formula/ipmiutil.rb b/Formula/ipmiutil.rb deleted file mode 100644 index 9cdc8180e50a6..0000000000000 --- a/Formula/ipmiutil.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Ipmiutil < Formula - desc "IPMI server management utility" - homepage "https://ipmiutil.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ipmiutil/ipmiutil-3.1.6.tar.gz" - sha256 "8814828c6c245140a5c867d8def8e88a72e90f67c79282008303de1c1d598e4a" - - bottle do - cellar :any_skip_relocation - sha256 "d9c1f45ad31e61093e3ba002c3494d61e762666733c6f5d03c53e6860e9aaf14" => :catalina - sha256 "e1862f31ab6cc95f37dda09ff7250e8b7f84750b075428e517779d37066f3c01" => :mojave - sha256 "e6d9bf95fd37500104f94fb640f6ac71d922227190b05b4ccbbf70abc942612c" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "openssl@1.1" - - conflicts_with "renameutils", :because => "both install `icmd` binaries" - - def install - # Darwin does not exist only on PowerPC - inreplace "configure.ac", "test \"$archp\" = \"powerpc\"", "true" - system "autoreconf", "-fiv" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-sha256", - "--enable-gpl" - - system "make", "TMPDIR=#{ENV["TMPDIR"]}" - # DESTDIR is needed to make everything go where we want it. - system "make", "prefix=/", - "DESTDIR=#{prefix}", - "varto=#{var}/lib/#{name}", - "initto=#{etc}/init.d", - "sysdto=#{prefix}/#{name}", - "install" - end - - test do - system "#{bin}/ipmiutil", "delloem", "help" - end -end diff --git a/Formula/ipopt.rb b/Formula/ipopt.rb deleted file mode 100644 index 9d93a4b19be9b..0000000000000 --- a/Formula/ipopt.rb +++ /dev/null @@ -1,85 +0,0 @@ -class Ipopt < Formula - desc "Interior point optimizer" - homepage "https://projects.coin-or.org/Ipopt/" - url "https://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.13.tgz" - sha256 "aac9bb4d8a257fdfacc54ff3f1cbfdf6e2d61fb0cf395749e3b0c0664d3e7e96" - license "EPL-1.0" - revision 8 - head "https://github.com/coin-or/Ipopt.git" - - bottle do - cellar :any - sha256 "a5817c890786d3585f85f718a95fdaec4e148d5e21ee6febb013410478a20ea3" => :catalina - sha256 "35760d1bf4676d2fcc54b8175754b2cdb7129f64739cac1a87755660c458ef66" => :mojave - sha256 "f5d21e4fdf87a1002a87d99954dc13b796187a0b5e8cf84177ad9ffa2d0e6f77" => :high_sierra - end - - depends_on "pkg-config" => [:build, :test] - depends_on "gcc" - depends_on "openblas" - - resource "mumps" do - url "http://mumps.enseeiht.fr/MUMPS_5.2.1.tar.gz" - sha256 "d988fc34dfc8f5eee0533e361052a972aa69cc39ab193e7f987178d24981744a" - - # MUMPS does not provide a Makefile.inc customized for macOS. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/ab96a8b8e510a8a022808a9be77174179ac79e85/ipopt/mumps-makefile-inc-generic-seq.patch" - sha256 "0c570ee41299073ec2232ad089d8ee10a2010e6dfc9edc28f66912dae6999d75" - end - end - - def install - ENV.delete("MPICC") - ENV.delete("MPICXX") - ENV.delete("MPIFC") - - resource("mumps").stage do - cp "Make.inc/Makefile.inc.generic.SEQ", "Makefile.inc" - inreplace "Makefile.inc", "@rpath/", "#{opt_lib}/" - - # Fix for GCC 10 - inreplace "Makefile.inc", "OPTF = -fPIC", "OPTF = -fPIC -fallow-argument-mismatch" - - ENV.deparallelize { system "make", "d" } - - (buildpath/"mumps_include").install Dir["include/*.h", "libseq/mpi.h"] - lib.install Dir["lib/*.dylib", "libseq/*.dylib", "PORD/lib/*.dylib"] - end - - args = [ - "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--enable-shared", - "--prefix=#{prefix}", - "--with-blas=-L#{Formula["openblas"].opt_lib} -lopenblas", - "--with-mumps-incdir=#{buildpath}/mumps_include", - "--with-mumps-lib=-L#{lib} -ldmumps -lmpiseq -lmumps_common -lopenblas -lpord", - ] - - system "./configure", *args - system "make" - - ENV.deparallelize - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - int main() { - Ipopt::SmartPtr app = IpoptApplicationFactory(); - const Ipopt::ApplicationReturnStatus status = app->Initialize(); - assert(status == Ipopt::Solve_Succeeded); - return 0; - } - EOS - pkg_config_flags = `pkg-config --cflags --libs ipopt`.chomp.split - system ENV.cxx, "test.cpp", *pkg_config_flags - system "./a.out" - end -end diff --git a/Formula/iprint.rb b/Formula/iprint.rb deleted file mode 100644 index 8db8aab514b9f..0000000000000 --- a/Formula/iprint.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Iprint < Formula - desc "Provides a print_one function" - homepage "https://www.samba.org/ftp/unpacked/junkcode/i.c" - url "https://deb.debian.org/debian/pool/main/i/iprint/iprint_1.3.orig.tar.gz" - version "1.3-9" - sha256 "1079b2b68f4199bc286ed08abba3ee326ce3b4d346bdf77a7b9a5d5759c243a3" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "e5fba1fa985ad96aac02d36f50e0985c14248655fd810c15c053e1ff7d5a1981" => :catalina - sha256 "8b1752455e0ff26b804070e3eb710493342fc2b2897a132a26433f4cabf5ec17" => :mojave - sha256 "c71f0b21d59a21fdc1e86e0a2016f79d862e838eb0fb7c92c50ed56e8aa1a163" => :high_sierra - sha256 "3fc40e5d2ee26c7b8709bf61e651ec3506561b98fcbf6ca52b8d353dd4be356d" => :sierra - sha256 "caa018741bb84409295f4fec33bcf427df199e717abf1323c9325d44238548ff" => :el_capitan - sha256 "eb0a1df1375a29fd3a88cddbe844820c9650b4ee14406245ee5d93ad41e48586" => :yosemite - sha256 "dfc0ad66122de0187db789cdafde75a367dc02748eede381567ca8f8a9208bde" => :mavericks - end - - patch do - url "https://deb.debian.org/debian/pool/main/i/iprint/iprint_1.3-9.diff.gz" - sha256 "3a1ff260e6d639886c005ece754c2c661c0d3ad7f1f127ddb2943c092e18ab74" - end - - def install - system "make" - bin.install "i" - man1.install "i.1" - end - - test do - assert_equal shell_output("#{bin}/i 1234"), "1234 0x4D2 02322 0b10011010010\n" - end -end diff --git a/Formula/iproute2mac.rb b/Formula/iproute2mac.rb deleted file mode 100644 index 54628b48dd356..0000000000000 --- a/Formula/iproute2mac.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Iproute2mac < Formula - desc "CLI wrapper for basic network utilities on macOS - ip command" - homepage "https://github.com/brona/iproute2mac" - url "https://github.com/brona/iproute2mac/releases/download/v1.2.3/iproute2mac-1.2.3.tar.gz" - sha256 "95ef8d4b0e32e4d3e3d975afa11d7aa0797d59b0f2c21b73a4e26d357bd6f93f" - license "MIT" - - bottle :unneeded - - def install - bin.install "src/ip.py" => "ip" - end - - test do - system "#{bin}/ip", "route" - system "#{bin}/ip", "address" - system "#{bin}/ip", "neigh" - end -end diff --git a/Formula/ipsumdump.rb b/Formula/ipsumdump.rb deleted file mode 100644 index aa2c7abf6e941..0000000000000 --- a/Formula/ipsumdump.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Ipsumdump < Formula - desc "Summarizes TCP/IP dump files into a self-describing ASCII format" - homepage "https://read.seas.harvard.edu/~kohler/ipsumdump/" - url "https://read.seas.harvard.edu/~kohler/ipsumdump/ipsumdump-1.86.tar.gz" - sha256 "e114cd01b04238b42cd1d0dc6cfb8086a6b0a50672a866f3d0d1888d565e3b9c" - head "https://github.com/kohler/ipsumdump.git" - - bottle do - sha256 "bf3d17d0d8bd97b75c44fd7929e348e096f3f1ac6a94ff31e785eb1f685db041" => :catalina - sha256 "1ca321c3b11654d07e0f2f6a13e6e36ccc28b550a42515cd495777f15f1e05e9" => :mojave - sha256 "16c995a9158257d8390cda7223f4d0620b6189c331177336b81f81077ee81620" => :high_sierra - sha256 "96148641aa0430d8b80cb3ebad8994d1911d61cad9557155172490579e210eaf" => :sierra - sha256 "a98b6116340b9b459f53310c030e99b8022f546c78cda7fcb040ea87c6e2a5f6" => :el_capitan - sha256 "83b145e153aa8e0680e9329035fb9ad55ce8875a2a6c8d35879821f51e394c7e" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/ipsumdump", "-c", "-r", test_fixtures("test.pcap").to_s - end -end diff --git a/Formula/ipv6calc.rb b/Formula/ipv6calc.rb deleted file mode 100644 index dc56ed4aad909..0000000000000 --- a/Formula/ipv6calc.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Ipv6calc < Formula - desc "Small utility for manipulating IPv6 addresses" - homepage "https://www.deepspace6.net/projects/ipv6calc.html" - url "https://github.com/pbiering/ipv6calc/archive/2.2.0.tar.gz" - sha256 "1935352f6171b07f18ce0487ee95ffcc006ea3f653f7cba564d2d8e135f04ca1" - - bottle do - cellar :any_skip_relocation - sha256 "f38b9f04ac49b301c599a497b2c4cbc562bc2fcfb73db76ba787fa10d185be76" => :catalina - sha256 "df70a9f7bb60eb8c65ed1b7ef6d850f3c2d57321e9be3e814c2480edac3c89df" => :mojave - sha256 "8e1168b64a282ce94ded17806bd16142920411f9515f17cd5bb7ed1eb272635c" => :high_sierra - end - - def install - # This needs --mandir, otherwise it tries to install to /share/man/man8. - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - assert_equal "192.168.251.97", - shell_output("#{bin}/ipv6calc -q --action conv6to4 --in ipv6 2002:c0a8:fb61::1 --out ipv4").strip - end -end diff --git a/Formula/ipv6toolkit.rb b/Formula/ipv6toolkit.rb deleted file mode 100644 index 96b56b770ffd4..0000000000000 --- a/Formula/ipv6toolkit.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Ipv6toolkit < Formula - desc "Security assessment and troubleshooting tool for IPv6" - homepage "https://www.si6networks.com/tools/ipv6toolkit/" - url "https://www.si6networks.com/tools/ipv6toolkit/ipv6toolkit-v2.0.tar.gz" - sha256 "16f13d3e7d17940ff53f028ef0090e4aa3a193a224c97728b07ea6e26a19e987" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "cf001c12f138a06ba8e4a68935ef1f2e9da358cc2af2326d4faa6ff8a156f1be" => :catalina - sha256 "c46d5e8c7752380d8416e916a6b71c2630ed2a150fb3ecddea24bf559587aa04" => :mojave - sha256 "1d1069f07134e882a0d670210ea607f209007f89325e0d414a45c4423c7eaebf" => :high_sierra - sha256 "347e2904a6adc26c82a9a123636234cbc95694f4d94b948b922e137073c7081d" => :sierra - sha256 "1d7d0b6b4d248ccff98362f4d7707821ae2109591717d56d3b49f0c1d6b83b16" => :el_capitan - sha256 "d337148bcff3080cd4e94fee0adb1b5226421020bcc6296f97bcf1986dcbea6a" => :yosemite - sha256 "cd4b85ebae536aea022ab34174c36d360b2db31a9f5c11ad58ae6aa4644ff2b0" => :mavericks - end - - def install - system "make" - system "make", "install", "DESTDIR=#{prefix}", "PREFIX=", "MANPREFIX=/share" - end - - test do - system "#{bin}/addr6", "-a", "fc00::1" - end -end diff --git a/Formula/ipython.rb b/Formula/ipython.rb deleted file mode 100644 index 61efa566271b8..0000000000000 --- a/Formula/ipython.rb +++ /dev/null @@ -1,169 +0,0 @@ -class Ipython < Formula - include Language::Python::Virtualenv - - desc "Interactive computing in Python" - homepage "https://ipython.org/" - url "https://files.pythonhosted.org/packages/88/91/666a7fa24bab1396537fcd8e2b287a2d773605ad16020af81036c8c1438c/ipython-7.16.1.tar.gz" - sha256 "9f4fcb31d3b2c533333893b9172264e4821c1ac91839500f31bd43f2c59b3ccf" - head "https://github.com/ipython/ipython.git" - - bottle do - cellar :any - sha256 "64952de0a43734998f64448e2f86a5a8fdc791e612ce48e36ab4f5da94af6bdf" => :catalina - sha256 "5efff9953522d63025fba1292624d8af65f0091324a72fbf460d284cca0a3877" => :mojave - sha256 "bde71aa9020abd0ab0500e30a2c25ca52a5987c912a268906f4eafec4c32df49" => :high_sierra - end - - depends_on "python@3.8" - depends_on "zeromq" - - resource "appnope" do - url "https://files.pythonhosted.org/packages/26/34/0f3a5efac31f27fabce64645f8c609de9d925fe2915304d1a40f544cff0e/appnope-0.1.0.tar.gz" - sha256 "8b995ffe925347a2138d7ac0fe77155e4311a0ea6d6da4f5128fe4b3cbe5ed71" - end - - resource "backcall" do - url "https://files.pythonhosted.org/packages/84/71/c8ca4f5bb1e08401b916c68003acf0a0655df935d74d93bf3f3364b310e0/backcall-0.1.0.tar.gz" - sha256 "38ecd85be2c1e78f77fd91700c76e14667dc21e2713b63876c0eb901196e01e4" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "ipykernel" do - url "https://files.pythonhosted.org/packages/4f/e1/c2e346b3bc3710fa5c63dbd6a6c408a407210fbb15367f06dbd55ea3765b/ipykernel-5.3.0.tar.gz" - sha256 "731adb3f2c4ebcaff52e10a855ddc87670359a89c9c784d711e62d66fccdafae" - end - - resource "ipython_genutils" do - url "https://files.pythonhosted.org/packages/e8/69/fbeffffc05236398ebfcfb512b6d2511c622871dca1746361006da310399/ipython_genutils-0.2.0.tar.gz" - sha256 "eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8" - end - - resource "jedi" do - url "https://files.pythonhosted.org/packages/2e/86/3ea824e61de521b2abd9ada9a080375c01721e66266ccc8ba8b3576ad88a/jedi-0.17.1.tar.gz" - sha256 "807d5d4f96711a2bcfdd5dfa3b1ae6d09aa53832b182090b222b5efb81f52f63" - end - - resource "jupyter-client" do - url "https://files.pythonhosted.org/packages/fa/84/440ef480bb829ac648f8e9d7f17c9e2b2470de18ccab989ffa25a64c8c9f/jupyter_client-6.1.3.tar.gz" - sha256 "3a32fa4d0b16d1c626b30c3002a62dfd86d6863ed39eaba3f537fade197bb756" - end - - resource "jupyter-core" do - url "https://files.pythonhosted.org/packages/28/64/8bdde111be57a2a3d54376db29b5f25ab9c68ffd3d6554989db24d5c1b7a/jupyter_core-4.6.3.tar.gz" - sha256 "394fd5dd787e7c8861741880bdf8a00ce39f95de5d18e579c74b882522219e7e" - end - - resource "parso" do - url "https://files.pythonhosted.org/packages/fe/24/c30eb4be8a24b965cfd6e2e6b41180131789b44042112a16f9eb10c80f6e/parso-0.7.0.tar.gz" - sha256 "908e9fae2144a076d72ae4e25539143d40b8e3eafbaeae03c1bfe226f4cdf12c" - end - - resource "pexpect" do - url "https://files.pythonhosted.org/packages/e5/9b/ff402e0e930e70467a7178abb7c128709a30dfb22d8777c043e501bc1b10/pexpect-4.8.0.tar.gz" - sha256 "fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" - end - - resource "pickleshare" do - url "https://files.pythonhosted.org/packages/d8/b6/df3c1c9b616e9c0edbc4fbab6ddd09df9535849c64ba51fcb6531c32d4d8/pickleshare-0.7.5.tar.gz" - sha256 "87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca" - end - - resource "prompt-toolkit" do - url "https://files.pythonhosted.org/packages/69/19/3aa4bf17e1cbbdfe934eb3d5b394ae9a0a7fb23594a2ff27e0fdaf8b4c59/prompt_toolkit-3.0.5.tar.gz" - sha256 "563d1a4140b63ff9dd587bda9557cffb2fe73650205ab6f4383092fb882e7dc8" - end - - resource "ptyprocess" do - url "https://files.pythonhosted.org/packages/7d/2d/e4b8733cf79b7309d84c9081a4ab558c89d8c89da5961bf4ddb050ca1ce0/ptyprocess-0.6.0.tar.gz" - sha256 "923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pyzmq" do - url "https://files.pythonhosted.org/packages/86/08/e5fc492317cc9d65b32d161c6014d733e8ab20b5e78e73eca63f53b17004/pyzmq-19.0.1.tar.gz" - sha256 "13a5638ab24d628a6ade8f794195e1a1acd573496c3b85af2f1183603b7bf5e0" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/95/84/119a46d494f008969bf0c775cb2c6b3579d3c4cc1bb1b41a022aa93ee242/tornado-6.0.4.tar.gz" - sha256 "0fe2d45ba43b00a41cd73f8be321a44936dc1aba233dee979f17a042b83eb6dc" - end - - resource "traitlets" do - url "https://files.pythonhosted.org/packages/75/b0/43deb021bc943f18f07cbe3dac1d681626a48997b7ffa1e7fb14ef922b21/traitlets-4.3.3.tar.gz" - sha256 "d023ee369ddd2763310e4c3eae1ff649689440d4ae59d7485eb4cfbbe3e359f7" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/89/38/459b727c381504f361832b9e5ace19966de1a235d73cdbdea91c771a1155/wcwidth-0.2.5.tar.gz" - sha256 "c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83" - end - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - - # install other resources - ipykernel = resource("ipykernel") - (resources - [ipykernel]).each do |r| - r.stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - # install and link IPython - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec) - bin.install libexec/"bin/ipython" - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"] + "${PYTHONPATH:+:}$PYTHONPATH") - - # install IPython man page - man1.install libexec/"share/man/man1/ipython.1" - - # install IPyKernel - ipykernel.stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec/"vendor") - end - - # install kernel - kernel_dir = Dir.mktmpdir - system libexec/"bin/ipython", "kernel", "install", "--prefix", kernel_dir - (share/"jupyter/kernels/python3").install Dir["#{kernel_dir}/share/jupyter/kernels/python3/*"] - inreplace share/"jupyter/kernels/python3/kernel.json", "]", <<~EOS - ], - "env": { - "PYTHONPATH": "#{ENV["PYTHONPATH"]}" - } - EOS - end - - def post_install - rm_rf etc/"jupyter/kernels/python3" - (etc/"jupyter/kernels/python3").install Dir[share/"jupyter/kernels/python3/*"] - end - - test do - assert_equal "4", shell_output("#{bin}/ipython -c 'print(2+2)'").chomp - - system bin/"ipython", "kernel", "install", "--prefix", testpath - assert_predicate testpath/"share/jupyter/kernels/python3/kernel.json", :exist?, "Failed to install kernel" - end -end diff --git a/Formula/ircd-hybrid.rb b/Formula/ircd-hybrid.rb deleted file mode 100644 index 64f25821222de..0000000000000 --- a/Formula/ircd-hybrid.rb +++ /dev/null @@ -1,70 +0,0 @@ -class IrcdHybrid < Formula - desc "High-performance secure IRC server" - homepage "http://www.ircd-hybrid.org/" - url "https://downloads.sourceforge.net/project/ircd-hybrid/ircd-hybrid/ircd-hybrid-8.2.31/ircd-hybrid-8.2.31.tgz" - sha256 "ab8dbd2152cb9c7f228d1efa9f9f1c1e3fc545959c9a9df0dc3ebb1e087d708f" - license "GPL-2.0" - - bottle do - sha256 "547457f864424055dca2cea8503012e2b9847aebbc1ee21fda02100d357cef3e" => :catalina - sha256 "abce429d77cb8c9949cd25f1c3560642eadf264906d05340779acea9e92c35dd" => :mojave - sha256 "444b6c2610188e971e583200ed8f243ce1609682690cd8e1775b9b98321f2f48" => :high_sierra - end - - depends_on "openssl@1.1" - - conflicts_with "ircd-irc2", :because => "both install an `ircd` binary" - - # ircd-hybrid needs the .la files - skip_clean :la - - def install - ENV.deparallelize # build system trips over itself - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--localstatedir=#{var}", - "--sysconfdir=#{etc}", - "--enable-openssl=#{Formula["openssl@1.1"].opt_prefix}" - system "make", "install" - etc.install "doc/reference.conf" => "ircd.conf" - end - - def caveats - <<~EOS - You'll more than likely need to edit the default settings in the config file: - #{etc}/ircd.conf - EOS - end - - plist_options :manual => "ircd" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/ircd - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/ircd.log - - - EOS - end - - test do - system "#{bin}/ircd", "-version" - end -end diff --git a/Formula/ircd-irc2.rb b/Formula/ircd-irc2.rb deleted file mode 100644 index d29259f257dca..0000000000000 --- a/Formula/ircd-irc2.rb +++ /dev/null @@ -1,94 +0,0 @@ -class IrcdIrc2 < Formula - desc "Original IRC server daemon" - homepage "http://www.irc.org/" - url "http://www.irc.org/ftp/irc/server/irc2.11.2p3.tgz" - version "2.11.2p3" - sha256 "be94051845f9be7da0e558699c4af7963af7e647745d339351985a697eca2c81" - - bottle do - sha256 "8508a48308449f51d7190eccc640b9351de2d30379b99b4fe0595cb185458204" => :catalina - sha256 "81e5c21532c98066b89bddc0ec6285eba22d2fcfb2c620b00ada8a6f4d641c7f" => :mojave - sha256 "ebc4e1007b994ae418cd522ecc70fa2c738dbf7eb52a883f775e7dcc9b06892e" => :high_sierra - sha256 "72b85345931772dc3ac1fe96201906db0c70c24e129e9ee7006253080926bd2f" => :sierra - sha256 "259ddceb29a5d5e0705c3b0a130368053de98282ecec2036c17d30062bd6f9f4" => :el_capitan - sha256 "af6c845d852e4a525d64f1cfbd551377c90da201c2ef3e521d48fc1513a58064" => :yosemite - sha256 "9fd885d98218c6e570f16b238cb72546130f5ca1bbe2e06f260b7a672dba02e2" => :mavericks - end - - def default_ircd_conf - <<~EOS - # M-Line - M:irc.localhost::Darwin ircd default configuration::000A - - # A-Line - A:This is Darwin's default ircd configurations:Please edit your /usr/local/etc/ircd.conf file:Contact for questions::ExampleNet - - # Y-Lines - Y:1:90::100:512000:5.5:100.100 - Y:2:90::300:512000:5.5:250.250 - - # I-Line - I:*:::0:1 - I:127.0.0.1/32:::0:1 - - # P-Line - P::::6667: - EOS - end - - conflicts_with "ircd-hybrid", :because => "both install `ircd` binaries" - - def install - system "./configure", "--prefix=#{prefix}", - "--localstatedir=#{var}", - "--sysconfdir=#{etc}", - "--mandir=#{man}", - "CFLAGS=-DRLIMIT_FDMAX=0" - - build_dir = `./support/config.guess`.chomp - - # Disable netsplit detection. In a netsplit, joins to new channels do not - # give chanop status. - inreplace "#{build_dir}/config.h", /#define DEFAULT_SPLIT_USERS\s+65000/, - "#define DEFAULT_SPLIT_USERS 0" - inreplace "#{build_dir}/config.h", /#define DEFAULT_SPLIT_SERVERS\s+80/, - "#define DEFAULT_SPLIT_SERVERS 0" - - # The directory is something like `i686-apple-darwin13.0.2' - system "make", "install", "-C", build_dir - - (etc/"ircd.conf").write default_ircd_conf - end - - plist_options :manual => "ircd" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/ircd - -t - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{var}/ircd.log - - - EOS - end - - test do - system "#{sbin}/ircd", "-version" - end -end diff --git a/Formula/ircii.rb b/Formula/ircii.rb deleted file mode 100644 index 2cb2dfe9872a8..0000000000000 --- a/Formula/ircii.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Ircii < Formula - desc "IRC and ICB client" - homepage "http://www.eterna.com.au/ircii/" - url "https://ircii.warped.com/ircii-20190117.tar.bz2" - mirror "https://deb.debian.org/debian/pool/main/i/ircii/ircii_20190117.orig.tar.bz2" - sha256 "10316f0a3723e4ce3d67fd5a7df10e6bcf30dd0750fb96d5437cacb16b0e9617" - revision 1 - - bottle do - sha256 "fea5e21aa100bda1104f1d4947376e9af68be118caf89d8b9468b51cbd2059b4" => :catalina - sha256 "95424df7e321088386df0d493fdc9a29c0f1955201ce0ce6ba9640a6c9678a9e" => :mojave - sha256 "ff375e444386f89ee0ae5f3aa3b6f38bfaa8818c3cd2db8065669f8a0f7d0165" => :high_sierra - sha256 "d0739ce549eb581ca3bb13de8c3aa164657235814e3c1edb2a050fde5dbf24f2" => :sierra - end - - depends_on "openssl@1.1" - - def install - ENV.append "LIBS", "-liconv" - system "./configure", "--prefix=#{prefix}", - "--with-default-server=irc.freenode.net", - "--enable-ipv6" - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - IO.popen("#{bin}/irc -d", "r+") do |pipe| - assert_match "Connecting to port 6667 of server irc.freenode.net", pipe.gets - pipe.puts "/quit" - pipe.close_write - pipe.close - end - end -end diff --git a/Formula/ired.rb b/Formula/ired.rb deleted file mode 100644 index 2eb2152c08c8b..0000000000000 --- a/Formula/ired.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ired < Formula - desc "Minimalistic hexadecimal editor designed to be used in scripts" - homepage "https://github.com/radare/ired" - url "https://github.com/radare/ired/archive/0.6.tar.gz" - sha256 "c15d37b96b1a25c44435d824bd7ef1f9aea9dc191be14c78b689d3156312d58a" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "e74475e811c38aa46bf3e7e69e0a264a2d30c08cfcbd801433e03c14944b8366" => :catalina - sha256 "7821d818af4c7d28b4cbf26c627685b77f18a1004369d4a57bee2582620008b7" => :mojave - sha256 "f6af714455a74c02769c9726855a92832e43c37c79a0c589a0c7744beac8956c" => :high_sierra - sha256 "5d10dfac87e4a4ca589a9fa76e8f9aff62625ef6358b6ab29360e79fe4a6dc35" => :sierra - sha256 "4fc558225913b629b144661385841e63ebb167beb9900475fadb0c0e886b4997" => :el_capitan - end - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - input = <<~EOS - w"hello wurld" - s+7 - r-4 - w"orld" - q - EOS - pipe_output("#{bin}/ired test.text", input) - assert_equal "hello world", (testpath/"test.text").read.chomp - end -end diff --git a/Formula/ironcli.rb b/Formula/ironcli.rb deleted file mode 100644 index fccd8a2052180..0000000000000 --- a/Formula/ironcli.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Ironcli < Formula - desc "Go version of the Iron.io command-line tools" - homepage "https://github.com/iron-io/ironcli" - url "https://github.com/iron-io/ironcli/archive/0.1.6.tar.gz" - sha256 "2b9e65c36e4f57ccb47449d55adc220d1c8d1c0ad7316b6afaf87c8d393caae6" - - bottle do - cellar :any_skip_relocation - sha256 "232ec828638d85d59736812abb50c879000f430724fe1575375ef0a41777a52e" => :catalina - sha256 "99be404dee323b0bb405e77576414392ce3ff66462230efa129636e6a4e2c2a3" => :mojave - sha256 "c4f4ad82734f93b32a2f64e1adaaf493fa38b4e34cbc9298fbbdc02851003343" => :high_sierra - sha256 "14d4bcd4ac89e89fb09b27994ba372d1e25690724c99b7ffbfb0231466c01bca" => :sierra - sha256 "62bed7f56cf23a148407527ff2b1234638ae0b365806ccc79c602ee081eed1dc" => :el_capitan - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/iron-io/ironcli").install buildpath.children - cd "src/github.com/iron-io/ironcli" do - system "dep", "ensure", "-vendor-only" - system "go", "build", "-o", bin/"iron" - prefix.install_metafiles - end - end - - test do - system bin/"iron", "-help" - end -end diff --git a/Formula/irrlicht.rb b/Formula/irrlicht.rb deleted file mode 100644 index a72fb15a5fea9..0000000000000 --- a/Formula/irrlicht.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Irrlicht < Formula - desc "Realtime 3D engine" - homepage "https://irrlicht.sourceforge.io/" - url "https://downloads.sourceforge.net/project/irrlicht/Irrlicht%20SDK/1.8/1.8.4/irrlicht-1.8.4.zip" - sha256 "f42b280bc608e545b820206fe2a999c55f290de5c7509a02bdbeeccc1bf9e433" - head "https://svn.code.sf.net/p/irrlicht/code/trunk" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "665031602d338528055bfb7dba5c1a4c94c0deaea6c3db8d4d4cddb061a54e7d" => :catalina - sha256 "e5b9b3d8b58f26c138b9dcd421fad9769e6ab7833bbf668cdeac909fd204a601" => :mojave - sha256 "508d300a52f1f1d5b1d5193f07559ca3da5aa3286181ae88b415bf5468c521bc" => :high_sierra - sha256 "d2236f351b11847d960909fa0e96d83ab0448228de30cd21014fea47a2c636a5" => :sierra - end - - depends_on :xcode => :build - - def install - # Fix "error: cannot initialize a parameter of type - # 'id _Nullable' with an rvalue of type - # 'id'" - # Reported 5 Oct 2016 https://irrlicht.sourceforge.io/forum/viewtopic.php?f=7&t=51562 - inreplace "source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm", - "[NSApp setDelegate:(id)", - "[NSApp setDelegate:(id)" - - # Fix "error: ZLIB_VERNUM != PNG_ZLIB_VERNUM" on Mojave (picking up system zlib) - # Reported 21 Oct 2018 https://sourceforge.net/p/irrlicht/bugs/442/ - inreplace "source/Irrlicht/libpng/pngpriv.h", - "# error ZLIB_VERNUM != PNG_ZLIB_VERNUM \\", - "# warning ZLIB_VERNUM != PNG_ZLIB_VERNUM \\" - - xcodebuild "-project", "source/Irrlicht/MacOSX/MacOSX.xcodeproj", - "-configuration", "Release", - "-target", "libIrrlicht.a", - "SYMROOT=build" - lib.install "source/Irrlicht/MacOSX/build/Release/libIrrlicht.a" - include.install "include" => "irrlicht" - end - - test do - assert_match "x86_64", shell_output("lipo -info #{lib}/libIrrlicht.a") - end -end diff --git a/Formula/irrtoolset.rb b/Formula/irrtoolset.rb deleted file mode 100644 index 438ff222ee283..0000000000000 --- a/Formula/irrtoolset.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Irrtoolset < Formula - desc "Tools to work with Internet routing policies" - homepage "https://github.com/irrtoolset/irrtoolset" - url "https://github.com/irrtoolset/irrtoolset/archive/release-5.1.3.tar.gz" - sha256 "a3eff14c2574f21be5b83302549d1582e509222d05f7dd8e5b68032ff6f5874a" - head "https://github.com/irrtoolset/irrtoolset.git" - - bottle do - cellar :any_skip_relocation - sha256 "958df309df54264b13dba2185761e5d4ce1397e3c6b079dbd9396e054d02d306" => :catalina - sha256 "fd790b230ed1c3559d79c5e86080a6c5163d71817c13980a3abc904e15535d98" => :mojave - sha256 "250f93336659350a65426d86c28053763f530b56ae9513b44f086196a91a59c3" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "bison" => :build # Uses newer syntax than system Bison supports - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - def install - system "autoreconf", "-iv" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/peval", "ANY" - end -end diff --git a/Formula/irssi.rb b/Formula/irssi.rb deleted file mode 100644 index 68b10584c0f1b..0000000000000 --- a/Formula/irssi.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Irssi < Formula - desc "Modular IRC client" - homepage "https://irssi.org/" - url "https://github.com/irssi/irssi/releases/download/1.2.2/irssi-1.2.2.tar.xz" - sha256 "6727060c918568ba2ff4295ad736128dba0b995d7b20491bca11f593bd857578" - license "GPL-2.0" - revision 1 - - bottle do - rebuild 1 - sha256 "a8d0caa726da8abaa3942e154ea6d6501df46ea3ae7c24d3583d3a229fd92727" => :catalina - sha256 "e25efab5dc0b20925d920aca182f713fa54b3d781bbea7ff0ff98606a29e8553" => :mojave - sha256 "92ce3e102445bc1248daf5404b9045088dde6a8f4e185c5f2a98982e692b4b26" => :high_sierra - sha256 "5f2f66c2581189d52bab585f5a1731f2382a29d7125d782856b6b0944515b1bd" => :sierra - end - - head do - url "https://github.com/irssi/irssi.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "lynx" => :build - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "openssl@1.1" - - uses_from_macos "perl" - - def install - ENV.delete "HOMEBREW_SDKROOT" if MacOS.version == :high_sierra - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --sysconfdir=#{etc} - --with-bot - --with-proxy - --enable-true-color - --with-socks=no - --with-ncurses=#{MacOS.sdk_path}/usr - --with-perl=yes - --with-perl-lib=#{lib}/perl5/site_perl - ] - - if build.head? - ENV["NOCONFIGURE"] = "yes" - system "./autogen.sh", *args - end - - system "./configure", *args - # "make" and "make install" must be done separately on some systems - system "make" - system "make", "install" - end - - test do - IO.popen("#{bin}/irssi --connect=irc.freenode.net", "w") do |pipe| - pipe.puts "/quit\n" - pipe.close_write - end - - # This is not how you'd use Perl with Irssi but it is enough to be - # sure the Perl element didn't fail to compile, which is needed - # because upstream treats Perl build failures as non-fatal. - # To debug a Perl problem copy the following test at the end of the install - # block to surface the relevant information from the build warnings. - ENV["PERL5LIB"] = lib/"perl5/site_perl" - system "perl", "-e", "use Irssi" - end -end diff --git a/Formula/isc-dhcp.rb b/Formula/isc-dhcp.rb deleted file mode 100644 index 4368498bdd706..0000000000000 --- a/Formula/isc-dhcp.rb +++ /dev/null @@ -1,141 +0,0 @@ -class IscDhcp < Formula - desc "Production-grade DHCP solution" - homepage "https://www.isc.org/software/dhcp" - url "https://ftp.isc.org/isc/dhcp/4.4.2/dhcp-4.4.2.tar.gz" - sha256 "1a7ccd64a16e5e68f7b5e0f527fd07240a2892ea53fe245620f4f5f607004521" - - bottle do - sha256 "26591c29130891dfe5a7ebe686c800bda76fdf5113885a801c3a30730a119130" => :catalina - sha256 "0d61b17cc0bbac751ded99a66948e880c64fe6ba47a8d1613c470ee6c4e54fec" => :mojave - sha256 "b0894db278d509c8615da4df71e26bce91daf300bba6380095f291bd2daa642c" => :high_sierra - end - - def install - # use one dir under var for all runtime state. - dhcpd_dir = var+"dhcpd" - - # Change the locations of various files to match Homebrew - # we pass these in through CFLAGS since some cannot be changed - # via configure args. - path_opts = { - "_PATH_DHCPD_CONF" => etc+"dhcpd.conf", - "_PATH_DHCLIENT_CONF" => etc+"dhclient.conf", - "_PATH_DHCPD_DB" => dhcpd_dir+"dhcpd.leases", - "_PATH_DHCPD6_DB" => dhcpd_dir+"dhcpd6.leases", - "_PATH_DHCLIENT_DB" => dhcpd_dir+"dhclient.leases", - "_PATH_DHCLIENT6_DB" => dhcpd_dir+"dhclient6.leases", - "_PATH_DHCPD_PID" => dhcpd_dir+"dhcpd.pid", - "_PATH_DHCPD6_PID" => dhcpd_dir+"dhcpd6.pid", - "_PATH_DHCLIENT_PID" => dhcpd_dir+"dhclient.pid", - "_PATH_DHCLIENT6_PID" => dhcpd_dir+"dhclient6.pid", - "_PATH_DHCRELAY_PID" => dhcpd_dir+"dhcrelay.pid", - "_PATH_DHCRELAY6_PID" => dhcpd_dir+"dhcrelay6.pid", - } - - path_opts.each do |symbol, path| - ENV.append "CFLAGS", "-D#{symbol}='\"#{path}\"'" - end - - # See discussion at: https://gist.github.com/1157223 - ENV.append "CFLAGS", "-D__APPLE_USE_RFC_3542" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--localstatedir=#{dhcpd_dir}" - - ENV.deparallelize { system "make", "-C", "bind" } - - # build everything else - inreplace "Makefile", "SUBDIRS = ${top_srcdir}/bind", "SUBDIRS = " - system "make" - system "make", "install" - - # rename all the installed sample etc/* files so they don't clobber - # any existing config files at symlink time. - Dir.open("#{prefix}/etc") do |dir| - dir.each do |f| - file = "#{dir.path}/#{f}" - File.rename(file, "#{file}.sample") if File.file?(file) - end - end - - # create the state dir and lease files else dhcpd will not start up. - dhcpd_dir.mkpath - %w[dhcpd dhcpd6 dhclient dhclient6].each do |f| - file = "#{dhcpd_dir}/#{f}.leases" - File.new(file, File::CREAT|File::RDONLY).close - end - - # dhcpv6 plists - (prefix+"homebrew.mxcl.dhcpd6.plist").write plist_dhcpd6 - (prefix+"homebrew.mxcl.dhcpd6.plist").chmod 0644 - end - - def caveats - <<~EOS - This install of dhcpd expects config files to be in #{etc}. - All state files (leases and pids) are stored in #{var}/dhcpd. - - Dhcpd needs to run as root since it listens on privileged ports. - - There are two plists because a single dhcpd process may do either - DHCPv4 or DHCPv6 but not both. Use one or both as needed. - - Note that you must create the appropriate config files before starting - the services or dhcpd will refuse to run. - DHCPv4: #{etc}/dhcpd.conf - DHCPv6: #{etc}/dhcpd6.conf - - Sample config files may be found in #{etc}. - EOS - end - - plist_options :startup => true - - def plist - <<~EOS - - - - - Label#{plist_name} - ProgramArguments - - #{opt_sbin}/dhcpd - -f - - Disabled - KeepAlive - RunAtLoad - LowPriorityIO - - - EOS - end - - def plist_dhcpd6 - <<~EOS - - - - - Label#{plist_name} - ProgramArguments - - #{opt_sbin}/dhcpd - -f - -6 - -cf - #{etc}/dhcpd6.conf - - Disabled - KeepAlive - RunAtLoad - LowPriorityIO - - - EOS - end -end diff --git a/Formula/isl.rb b/Formula/isl.rb deleted file mode 100644 index 0a342227ad013..0000000000000 --- a/Formula/isl.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Isl < Formula - desc "Integer Set Library for the polyhedral model" - homepage "https://isl.gforge.inria.fr/" - # Note: Always use tarball instead of git tag for stable version. - # - # Currently isl detects its version using source code directory name - # and update isl_version() function accordingly. All other names will - # result in isl_version() function returning "UNKNOWN" and hence break - # package detection. - url "http://isl.gforge.inria.fr/isl-0.22.1.tar.xz" - mirror "https://deb.debian.org/debian/pool/main/i/isl/isl_0.22.1.orig.tar.xz" - sha256 "28658ce0f0bdb95b51fd2eb15df24211c53284f6ca2ac5e897acc3169e55b60f" - license "MIT" - - bottle do - cellar :any - sha256 "b5319e3bbbb36ef3536d841999b7497b3dce4bf9e07fb04f6b0db716e087896d" => :catalina - sha256 "29213891860c971e084d1e2a3d1ad00c92371140dea599aae2894e26ec0d6874" => :mojave - sha256 "a1193c8b06c31abc4bf9c1ef9bb93c4879ff5ba4050b4a06c22c2a0048d3c87f" => :high_sierra - end - - head do - url "https://repo.or.cz/isl.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "gmp" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-gmp=system", - "--with-gmp-prefix=#{Formula["gmp"].opt_prefix}" - system "make", "install" - (share/"gdb/auto-load").install Dir["#{lib}/*-gdb.py"] - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - isl_ctx* ctx = isl_ctx_alloc(); - isl_ctx_free(ctx); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lisl", "-o", "test" - system "./test" - end -end diff --git a/Formula/iso-codes.rb b/Formula/iso-codes.rb deleted file mode 100644 index 504385da8c9ac..0000000000000 --- a/Formula/iso-codes.rb +++ /dev/null @@ -1,29 +0,0 @@ -class IsoCodes < Formula - desc "Provides lists of various ISO standards" - homepage "https://salsa.debian.org/iso-codes-team/iso-codes" - url "https://deb.debian.org/debian/pool/main/i/iso-codes/iso-codes_4.5.0.orig.tar.xz" - sha256 "2a63118f8c91faa2102e6381ae498e7fa83b2bdf667963e0f7dbae2a23b827dd" - license "LGPL-2.1" - head "https://salsa.debian.org/iso-codes-team/iso-codes.git" - - bottle do - cellar :any_skip_relocation - sha256 "de9e461920f45e7a41272e45c365bc03fce3897a52b14b22b5953967d595e313" => :catalina - sha256 "de9e461920f45e7a41272e45c365bc03fce3897a52b14b22b5953967d595e313" => :mojave - sha256 "de9e461920f45e7a41272e45c365bc03fce3897a52b14b22b5953967d595e313" => :high_sierra - end - - depends_on "gettext" => :build - depends_on "python@3.8" => :build - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - output = shell_output("grep domains #{share}/pkgconfig/iso-codes.pc") - assert_match "iso_639-2 iso_639-3 iso_639-5 iso_3166-1", output - end -end diff --git a/Formula/ispc.rb b/Formula/ispc.rb deleted file mode 100644 index 198e912f8199f..0000000000000 --- a/Formula/ispc.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Ispc < Formula - desc "Compiler for SIMD programming on the CPU" - homepage "https://ispc.github.io/" - url "https://github.com/ispc/ispc/archive/v1.13.0.tar.gz" - sha256 "cc74c4c490ddf4e0a63f01948ec8d6eb575d85ab5932d30ca4ad01c0e8f079ce" - license "BSD-3-Clause" - revision 1 - - bottle do - cellar :any - sha256 "ebe58acbd4a6925ed70887050ed7343e3d1da97b5973d6790560f333a08e2299" => :catalina - sha256 "abbe12e825e7cc8e965886cd8a0e16407d7b0bfb34c419948b7e5455695747c1" => :mojave - sha256 "16ab84a2e4d41dee3f6b4a3367dc7257c841cdcd73794379c2a56b02ad37dcb1" => :high_sierra - end - - depends_on "bison" => :build - depends_on "cmake" => :build - depends_on "flex" => :build - depends_on "python@3.8" => :build - depends_on "llvm" - - def install - args = std_cmake_args + %W[ - -DISPC_INCLUDE_EXAMPLES=OFF - -DISPC_INCLUDE_TESTS=OFF - -DISPC_INCLUDE_UTILS=OFF - -DLLVM_TOOLS_BINARY_DIR='#{Formula["llvm"].opt_bin}' - -DISPC_NO_DUMPS=ON - ] - - mkdir "build" do - system "cmake", *args, ".." - system "make" - system "make", "install" - end - end - - test do - (testpath/"simple.ispc").write <<~EOS - export void simple(uniform float vin[], uniform float vout[], uniform int count) { - foreach (index = 0 ... count) { - float v = vin[index]; - if (v < 3.) - v = v * v; - else - v = sqrt(v); - vout[index] = v; - } - } - EOS - system bin/"ispc", "--arch=x86-64", "--target=sse2", testpath/"simple.ispc", - "-o", "simple_ispc.o", "-h", "simple_ispc.h" - - (testpath/"simple.cpp").write <<~EOS - #include "simple_ispc.h" - int main() { - float vin[9], vout[9]; - for (int i = 0; i < 9; ++i) vin[i] = static_cast(i); - ispc::simple(vin, vout, 9); - return 0; - } - EOS - system ENV.cxx, "-I#{testpath}", "-c", "-o", testpath/"simple.o", testpath/"simple.cpp" - system ENV.cxx, "-o", testpath/"simple", testpath/"simple.o", testpath/"simple_ispc.o" - - system testpath/"simple" - end -end diff --git a/Formula/ispell.rb b/Formula/ispell.rb deleted file mode 100644 index 804f229143980..0000000000000 --- a/Formula/ispell.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Ispell < Formula - desc "International Ispell" - homepage "https://www.cs.hmc.edu/~geoff/ispell.html" - url "https://www.cs.hmc.edu/~geoff/tars/ispell-3.4.00.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/i/ispell/ispell_3.4.00.orig.tar.gz" - sha256 "5dc42e458635f218032d3ae929528e5587b1e7247564f0e9f9d77d5ccab7aec2" - - bottle do - sha256 "c4a726692b88e792bd82ee0b4cd527e8f69ab0a244f839486087e2b291947afe" => :catalina - sha256 "5e4a1b0bd20714be296012b2b90c7bb92bfa01b997a4d4efccc369b9553a8eb8" => :mojave - sha256 "67142ae321c800cc9f4941e8d4e665f195dad06cc483cde11d51fed7a0cde426" => :high_sierra - sha256 "697a51b2d4e5d568ef18fdfe5943691a534145829522e3d4bb7d25f2f7978c9f" => :sierra - sha256 "81d9f6f9aca0f92ba3bece2ad22d0b0bca29c719304c6c5e8e59b02a3c8763da" => :el_capitan - sha256 "ff46baf7aa6daf42fddde68897bd80dbb073922b4556c502e7b0072656b48498" => :yosemite - sha256 "f1ee90dcc76682d17c2b758d2a896493448753acc0e556e9b0c8bf7ec0f552df" => :mavericks - end - - uses_from_macos "ncurses" - - def install - ENV.deparallelize - - # No configure script, so do this all manually - cp "local.h.macos", "local.h" - chmod 0644, "local.h" - inreplace "local.h" do |s| - s.gsub! "/usr/local", prefix - s.gsub! "/man/man", "/share/man/man" - s.gsub! "/lib", "/lib/ispell" - end - - chmod 0644, "correct.c" - inreplace "correct.c", "getline", "getline_ispell" - - system "make", "config.sh" - chmod 0644, "config.sh" - inreplace "config.sh", "/usr/share/dict", "#{share}/dict" - - (lib/"ispell").mkpath - system "make", "install" - end - - test do - assert_equal "BOTHER BOTHE/R BOTH/R", - `echo BOTHER | #{bin}/ispell -c`.chomp - end -end diff --git a/Formula/istioctl.rb b/Formula/istioctl.rb deleted file mode 100644 index 394b958db624a..0000000000000 --- a/Formula/istioctl.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Istioctl < Formula - desc "Istio configuration command-line utility" - homepage "https://github.com/istio/istio" - url "https://github.com/istio/istio.git", - :tag => "1.6.4", - :revision => "58f551e08f08addfd81783e1c2ed1eabeb836168" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "c4ee60917aa4016dcf01df38ac018bd86634a0c3a5986c14808dbc4091c65529" => :catalina - sha256 "c4ee60917aa4016dcf01df38ac018bd86634a0c3a5986c14808dbc4091c65529" => :mojave - sha256 "c4ee60917aa4016dcf01df38ac018bd86634a0c3a5986c14808dbc4091c65529" => :high_sierra - end - - depends_on "go" => :build - depends_on "go-bindata" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["TAG"] = version.to_s - ENV["ISTIO_VERSION"] = version.to_s - ENV["HUB"] = "docker.io/istio" - ENV["BUILD_WITH_CONTAINER"] = "0" - - srcpath = buildpath/"src/istio.io/istio" - outpath = srcpath/"out/darwin_amd64" - srcpath.install buildpath.children - - cd srcpath do - system "make", "gen-charts", "istioctl", "istioctl.completion" - prefix.install_metafiles - bin.install outpath/"istioctl" - bash_completion.install outpath/"release/istioctl.bash" - zsh_completion.install outpath/"release/_istioctl" - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/istioctl version --remote=false") - end -end diff --git a/Formula/isync.rb b/Formula/isync.rb deleted file mode 100644 index 6c52ea5d376e2..0000000000000 --- a/Formula/isync.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Isync < Formula - desc "Synchronize a maildir with an IMAP server" - homepage "https://isync.sourceforge.io/" - url "https://downloads.sourceforge.net/project/isync/isync/1.3.2/isync-1.3.2.tar.gz" - sha256 "9106d1428c912f421a659a22c3c4dbe9fe110f3f4da1498038e6ebf8d284e805" - head "https://git.code.sf.net/p/isync/isync.git" - - bottle do - cellar :any - sha256 "a962b44d6115447a76213e3671710a087c962301c5e238ef9ed942fa9b1ebb59" => :catalina - sha256 "c29fd93d72cd3edc638949433305b3298ebdd125ad1a87a4cb7d8fb6344e10e8" => :mojave - sha256 "469834994c352a202afd451688c5475328910dfce811c88c6e0f0dadbf3e8e09" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "berkeley-db" - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - # Regenerated for HEAD, and because of our patch - if build.head? - system "./autogen.sh" - else - system "autoreconf", "-fiv" - end - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-silent-rules - ] - - system "./configure", *args - system "make", "install" - end - - plist_options :manual => "isync" - - def plist - <<~EOS - - - - - EnvironmentVariables - - PATH - /usr/bin:/bin:/usr/sbin:/sbin:#{HOMEBREW_PREFIX}/bin - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mbsync - -a - - StartInterval - 300 - RunAtLoad - - StandardErrorPath - /dev/null - StandardOutPath - /dev/null - - - EOS - end - - test do - system bin/"mbsync-get-cert", "duckduckgo.com:443" - end -end diff --git a/Formula/itex2mml.rb b/Formula/itex2mml.rb deleted file mode 100644 index 7aba446460bf8..0000000000000 --- a/Formula/itex2mml.rb +++ /dev/null @@ -1,31 +0,0 @@ -# From: Jacques Distler -# You can always find the latest version by checking -# https://golem.ph.utexas.edu/~distler/code/itexToMML/view/head:/itex-src/itex2MML.h -# The corresponding versioned archive is -# https://golem.ph.utexas.edu/~distler/blog/files/itexToMML-x.x.x.tar.gz - -class Itex2mml < Formula - desc "Text filter to convert itex equations to MathML" - homepage "https://golem.ph.utexas.edu/~distler/blog/itex2MML.html" - url "https://golem.ph.utexas.edu/~distler/blog/files/itexToMML-1.6.0.tar.gz" - sha256 "5b85b7d77da36af6aba1a56588ce9209b2309d1e99a1b3e6ae8a6d602c30efbb" - - bottle do - cellar :any_skip_relocation - sha256 "61a85ab2e9536209e49b3225f98fc55c0fae709683d0f2662be459f99718bbef" => :catalina - sha256 "df578788807a4ee50d332c710ad96c174e570362fd8c2dab01f1da328b53ba96" => :mojave - sha256 "95e76b0109c7bc8407c32f12ef1d7f43e62c6c09363840e7b8fee35a56520312" => :high_sierra - end - - def install - bin.mkpath - cd "itex-src" do - system "make" - system "make", "install", "prefix=#{prefix}", "BINDIR=#{bin}" - end - end - - test do - system "#{bin}/itex2MML", "--version" - end -end diff --git a/Formula/itk.rb b/Formula/itk.rb deleted file mode 100644 index cc056dd283892..0000000000000 --- a/Formula/itk.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Itk < Formula - desc "Insight Toolkit is a toolkit for performing registration and segmentation" - homepage "https://itk.org/" - url "https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.1.0/InsightToolkit-5.1.0.tar.gz" - sha256 "121020a1611508cec8123eb5226215598cec07be627d843a2e6b6da891e61d13" - head "https://github.com/InsightSoftwareConsortium/ITK.git" - - bottle do - sha256 "a164746cce8e23e169a967bae3c8b455f63674ee3e74f677d7e1214253db3975" => :catalina - sha256 "e633ca1823a1f35e0d2e025a4f2ce7e1cad26342d934e9a41a29396e0808f374" => :mojave - sha256 "d7e3580065e5c49d5af1a403bbb7a3a0532471494c87e15f50ca295c74a30123" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "fftw" - depends_on "gdcm" - depends_on "hdf5" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "vtk" - - def install - args = std_cmake_args + %W[ - -DBUILD_SHARED_LIBS=ON - -DBUILD_TESTING=OFF - -DCMAKE_INSTALL_RPATH:STRING=#{lib} - -DCMAKE_INSTALL_NAME_DIR:STRING=#{lib} - -DITK_USE_64BITS_IDS=ON - -DITK_USE_STRICT_CONCEPT_CHECKING=ON - -DITK_USE_SYSTEM_ZLIB=ON - -DITK_USE_SYSTEM_EXPAT=ON - -DModule_SCIFIO=ON - -DITKV3_COMPATIBILITY:BOOL=OFF - -DITK_USE_SYSTEM_FFTW=ON - -DITK_USE_FFTWF=ON - -DITK_USE_FFTWD=ON - -DITK_USE_SYSTEM_HDF5=ON - -DITK_USE_SYSTEM_JPEG=ON - -DITK_USE_SYSTEM_PNG=ON - -DITK_USE_SYSTEM_TIFF=ON - -DITK_USE_SYSTEM_GDCM=ON - -DITK_LEGACY_REMOVE=ON - -DModule_ITKLevelSetsv4Visualization=ON - -DModule_ITKReview=ON - -DModule_ITKVtkGlue=ON - -DITK_USE_GPU=ON - ] - - # Avoid references to the Homebrew shims directory - inreplace "Modules/Core/Common/src/CMakeLists.txt" do |s| - s.gsub!(/MAKE_MAP_ENTRY\(\s*\\"CMAKE_C_COMPILER\\", - \s*\\"\${CMAKE_C_COMPILER}\\".*\);/x, - "MAKE_MAP_ENTRY(\\\"CMAKE_C_COMPILER\\\", " \ - "\\\"#{ENV.cc}\\\", \\\"The C compiler.\\\");") - - s.gsub!(/MAKE_MAP_ENTRY\(\s*\\"CMAKE_CXX_COMPILER\\", - \s*\\"\${CMAKE_CXX_COMPILER}\\".*\);/x, - "MAKE_MAP_ENTRY(\\\"CMAKE_CXX_COMPILER\\\", " \ - "\\\"#{ENV.cxx}\\\", \\\"The CXX compiler.\\\");") - end - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.cxx").write <<-EOS - #include "itkImage.h" - int main(int argc, char* argv[]) - { - typedef itk::Image ImageType; - ImageType::Pointer image = ImageType::New(); - image->Update(); - return EXIT_SUCCESS; - } - EOS - - v = version.to_s.split(".")[0..1].join(".") - # Build step - system ENV.cxx, "-std=c++11", "-isystem", "#{include}/ITK-#{v}", "-o", "test.cxx.o", "-c", "test.cxx" - # Linking step - system ENV.cxx, "-std=c++11", "test.cxx.o", "-o", "test", - "#{lib}/libITKCommon-#{v}.1.dylib", - "#{lib}/libITKVNLInstantiation-#{v}.1.dylib", - "#{lib}/libitkvnl_algo-#{v}.1.dylib", - "#{lib}/libitkvnl-#{v}.1.dylib" - system "./test" - end -end diff --git a/Formula/itpp.rb b/Formula/itpp.rb deleted file mode 100644 index 642b6e997813d..0000000000000 --- a/Formula/itpp.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Itpp < Formula - desc "Library of math, signal, and communication classes and functions" - homepage "https://itpp.sourceforge.io/" - url "https://downloads.sourceforge.net/project/itpp/itpp/4.3.1/itpp-4.3.1.tar.bz2" - sha256 "50717621c5dfb5ed22f8492f8af32b17776e6e06641dfe3a3a8f82c8d353b877" - license "GPL-3.0" - head "https://git.code.sf.net/p/itpp/git.git" - - bottle do - cellar :any - sha256 "b2e1462473404d4c01645da0c7602e75395942a7478a337d70c969fa888c6dcd" => :catalina - sha256 "cc0a4a3787d616440ff284f97f87742327a5293b439195143a909b7764eb3ae4" => :mojave - sha256 "357a4ee1ed9d2c7509a8ae7a22bda393942c6c40d56dc60468fdeec39b675ad5" => :high_sierra - sha256 "168b61ba02bd54e625ccbcac998595dc2e96a4210a0709a7b7296a8ed9b985b5" => :sierra - sha256 "c9f2f041dbdbea87029180a253fa0cd470aee6a2144a848b10f9fb5c40f01b8e" => :el_capitan - sha256 "6e772c61104760fcf2c9500fa06fb2d032d4db1f53ef44d090e18aca54ee75f0" => :yosemite - sha256 "c9e5ed1ab5febb67c61139b451ac70c501e6dd8fe656f7658d9e6aaa3f025e2a" => :mavericks - end - - depends_on "cmake" => :build - depends_on "fftw" - - def install - mkdir "build" do - args = std_cmake_args - args.delete "-DCMAKE_BUILD_TYPE=None" - args << "-DCMAKE_BUILD_TYPE=Release" - system "cmake", "..", *args - system "make" - system "make", "install" - end - end -end diff --git a/Formula/itstool.rb b/Formula/itstool.rb deleted file mode 100644 index d14f2949298ec..0000000000000 --- a/Formula/itstool.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Itstool < Formula - desc "Make XML documents translatable through PO files" - homepage "http://itstool.org/" - url "https://github.com/itstool/itstool/archive/2.0.6.tar.gz" - sha256 "bda0b08e9a1db885c9d7d1545535e9814dd8931d5b8dd5ab4a47bd769d0130c6" - revision 1 - head "https://github.com/itstool/itstool.git" - - bottle do - cellar :any_skip_relocation - sha256 "73238debce4f4c1e9922427a22312161d0400d70f22b642137689b4431ba0a20" => :catalina - sha256 "73238debce4f4c1e9922427a22312161d0400d70f22b642137689b4431ba0a20" => :mojave - sha256 "73238debce4f4c1e9922427a22312161d0400d70f22b642137689b4431ba0a20" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libxml2" - depends_on "python@3.8" - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].opt_lib}/python#{xy}/site-packages" - - system "./autogen.sh", "--prefix=#{libexec}", - "PYTHON=#{Formula["python@3.8"].opt_bin}/python3" - system "make", "install" - - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - pkgshare.install_symlink libexec/"share/itstool/its" - man1.install_symlink libexec/"share/man/man1/itstool.1" - end - - test do - (testpath/"test.xml").write <<~EOS - Homebrew - EOS - system bin/"itstool", "-o", "test.pot", "test.xml" - assert_match "msgid \"Homebrew\"", File.read("test.pot") - end -end diff --git a/Formula/ivy.rb b/Formula/ivy.rb deleted file mode 100644 index c8125f2801675..0000000000000 --- a/Formula/ivy.rb +++ /dev/null @@ -1,15 +0,0 @@ -class Ivy < Formula - desc "Agile dependency manager" - homepage "https://ant.apache.org/ivy/" - url "https://www.apache.org/dyn/closer.lua?path=ant/ivy/2.5.0/apache-ivy-2.5.0-bin.tar.gz" - mirror "https://archive.apache.org/dist/ant/ivy/2.5.0/apache-ivy-2.5.0-bin.tar.gz" - sha256 "3855a5769b5dbeafa9fb6a00f130467fd0f89da684a0b33a91e3dc5dae2715c7" - - bottle :unneeded - - def install - libexec.install Dir["ivy*"] - doc.install Dir["doc/*"] - bin.write_jar_script libexec/"ivy-#{version}.jar", "ivy", "$JAVA_OPTS" - end -end diff --git a/Formula/ivykis.rb b/Formula/ivykis.rb deleted file mode 100644 index 262a60b424197..0000000000000 --- a/Formula/ivykis.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Ivykis < Formula - desc "Async I/O-assisting library" - homepage "https://sourceforge.net/projects/libivykis/" - url "https://github.com/buytenh/ivykis/archive/v0.42.4-trunk.tar.gz" - sha256 "b724516d6734f4d5c5f86ad80bde8fc7213c5a70ce2d46b9a2d86e8d150402b5" - license "LGPL-2.1" - - bottle do - cellar :any - rebuild 1 - sha256 "5da36891f20e60db1a94b7eafeaf35605a0a4b18e833721aec01ab68399653a3" => :catalina - sha256 "dd4fa86f2988dd4c913fc443131ce519ebf034ff492b4760f323ca663fb1744c" => :mojave - sha256 "1409aa60298ac27959cf5370b70d158843524e5f5638e28e9607ac7e8783b11e" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-i" - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test_ivykis.c").write <<~EOS - #include - #include - int main() - { - iv_init(); - iv_deinit(); - return 0; - } - EOS - system ENV.cc, "test_ivykis.c", "-L#{lib}", "-livykis", "-o", "test_ivykis" - system "./test_ivykis" - end -end diff --git a/Formula/j/jabba.rb b/Formula/j/jabba.rb new file mode 100644 index 0000000000000..47225a63e1ca3 --- /dev/null +++ b/Formula/j/jabba.rb @@ -0,0 +1,49 @@ +class Jabba < Formula + desc "Cross-platform Java Version Manager" + # fork blessed by previous maintener https://github.com/shyiko/jabba/issues/833#issuecomment-1338648294 + homepage "https://github.com/Jabba-Team/jabba" + url "https://github.com/Jabba-Team/jabba/archive/refs/tags/0.14.0.tar.gz" + sha256 "9de92172ba62cbdf6e38cc9831466682717b3573bc2dfa8213baa5766c9ce2e3" + license "Apache-2.0" + head "https://github.com/Jabba-Team/jabba.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ca270e89401f037f27bbba15909d74e3bd2caaaaec257a68720fec024b53e3fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d7ca771e6e62bfe218b66cca1345f0fadf74231d6b5b0264816582102ade7ec4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e3e0407cf46ffb79d431e20da70d23080391585438fef6681415d4bde01f8094" + sha256 cellar: :any_skip_relocation, arm64_monterey: "12f33d23591f130fcd82fb08d02ef355cc359819e9f690a8412b4c46486feadf" + sha256 cellar: :any_skip_relocation, sonoma: "beb282b92dc05fdbc6547d8abb9c1adcb4af6baf23182faa40272090b6fd1d29" + sha256 cellar: :any_skip_relocation, ventura: "030068b5dbb9d739d9020d94f038bdfa0263fc7b96d6c1986a93322d9ff6972d" + sha256 cellar: :any_skip_relocation, monterey: "bdd8ffb05d7136a668b135865e4ec2e3a3d76d04fd89352113ad94664c7de909" + sha256 cellar: :any_skip_relocation, arm64_linux: "3245fe15e6e1f23e23ac3a4dcd94634399e0c0ed5898550a3784c11f2c0fcee8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7c3d858b92c8729670829b405334bcdec1a46e375133996510e0a318afa5f9dc" + end + + depends_on "go" => :build + + def install + ENV["JABBA_GET"] = "false" + inreplace "Makefile", " bash install.sh", " bash install.sh --skip-rc" + system "make", "install", "VERSION=#{version}", "JABBA_HOME=#{prefix}" + end + + def caveats + <<~EOS + Add the following line to your ~/.bashrc or ~/.zshrc file: + [ -s "#{opt_pkgshare}/jabba.sh" ] && . "#{opt_pkgshare}/jabba.sh" + + If you use the Fish shell then add the following line to your ~/.config/fish/config.fish: + [ -s "#{opt_pkgshare}/jabba.fish" ]; and source "#{opt_pkgshare}/jabba.fish" + EOS + end + + test do + ENV["JABBA_HOME"] = testpath/"jabba_home" + jdk_version = "zulu@17" + system bin/"jabba", "install", jdk_version + jdk_path = assert_match(/^export JAVA_HOME="([^"]+)"/, + shell_output("#{bin}/jabba use #{jdk_version} 3>&1"))[1] + assert_match 'openjdk version "17', + shell_output("#{jdk_path}/bin/java -version 2>&1") + end +end diff --git a/Formula/j/jack.rb b/Formula/j/jack.rb new file mode 100644 index 0000000000000..e95e46cea1a78 --- /dev/null +++ b/Formula/j/jack.rb @@ -0,0 +1,76 @@ +class Jack < Formula + desc "Audio Connection Kit" + homepage "https://jackaudio.org/" + url "https://github.com/jackaudio/jack2/archive/refs/tags/v1.9.22.tar.gz" + sha256 "1e42b9fc4ad7db7befd414d45ab2f8a159c0b30fcd6eee452be662298766a849" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "e3cd7f8ab3b70baa1766b3a131b16ffe7a62a398f20a3ce7b6d6935c222b5925" + sha256 arm64_sonoma: "39affd1f135d3745a22bf4907e46509cdb4b1b3a8e654e23179e1a1ad92193bc" + sha256 arm64_ventura: "6210ae0eeab831aa965d6d737f22b7476224d1cd1daa1105cee116dd37a3627a" + sha256 arm64_monterey: "e9ff1f4cef83787cd63bb788cd2c1818b64798d85c7081ed3b2ba42a8f40b149" + sha256 sonoma: "15b133b0d5b27e9a1e054fec07cd8c0c3e4972ace51ca2d6ec9b57b8ee4c5c85" + sha256 ventura: "6d6e8934386e7609ad4ab4af7ba321ffc0bf8673f93b2d2deca7fb3bc3207688" + sha256 monterey: "5079ca572c21ee6acc9574a0db44938e2c6099242d38a3cbd39bc4e4bc643c08" + sha256 arm64_linux: "13cdb9547db6f443c750059b2f230085bac7465964ff22d88aeb4b2eb5e08873" + sha256 x86_64_linux: "1632a4f4ebdf3e82dd5186dd71dd498a83bf47f4ef610b319d22bb201727e463" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "berkeley-db@5" # keep berkeley-db < 6 to avoid AGPL-3.0 restrictions + depends_on "libsamplerate" + + uses_from_macos "python" => :build + + on_macos do + depends_on "aften" + end + + on_linux do + depends_on "alsa-lib" + depends_on "systemd" + end + + # Backport new waf to fix build on Python 3.12 + patch do + url "https://github.com/jackaudio/jack2/commit/250420381b1a6974798939ad7104ab1a4b9a9994.patch?full_index=1" + sha256 "919f94a5eb4a00854f90b6618a35be4ba9ab3d8cc56f09a1fba2277030363b20" + end + + def install + if OS.mac? && MacOS.version <= :high_sierra + # See https://github.com/jackaudio/jack2/issues/640#issuecomment-723022578 + ENV.append "LDFLAGS", "-Wl,-compatibility_version,1" + ENV.append "LDFLAGS", "-Wl,-current_version,#{version}" + end + + system "python3", "./waf", "configure", "--prefix=#{prefix}" + system "python3", "./waf", "build" + system "python3", "./waf", "install" + end + + service do + run [opt_bin/"jackd", "-X", "coremidi", "-d", "coreaudio"] + keep_alive true + working_dir opt_prefix + environment_variables PATH: "/usr/bin:/bin:/usr/sbin:/sbin:#{HOMEBREW_PREFIX}/bin" + end + + test do + args = ["-d", "dummy"] + args += ["-X", "coremidi"] if OS.mac? + spawn bin/"jackd", *args + + assert_match "jackdmp version #{version}", shell_output("#{bin}/jackd --version") + end +end diff --git a/Formula/j/jackett.rb b/Formula/j/jackett.rb new file mode 100644 index 0000000000000..afc13469ecd9b --- /dev/null +++ b/Formula/j/jackett.rb @@ -0,0 +1,73 @@ +class Jackett < Formula + desc "API Support for your favorite torrent trackers" + homepage "https://github.com/Jackett/Jackett" + url "https://github.com/Jackett/Jackett/archive/refs/tags/v0.22.1900.tar.gz" + sha256 "08e4538f480a70b4e17f967ae973b763c9dee1a217431a8bcf1ff7da954a0827" + license "GPL-2.0-only" + head "https://github.com/Jackett/Jackett.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "65341c2ef7b5cb44a95fe24d016125dcfa816e13d56176dc705c35853de59a6f" + sha256 cellar: :any, arm64_sonoma: "776a1214452e1efda935f7fb884f90b42361bd14831573d4af4b07e9ddad5c3e" + sha256 cellar: :any, arm64_ventura: "d811ccad64985b595b5401faebdc269400ec7b9be9c54c9b6611b8fca58a0059" + sha256 cellar: :any, ventura: "ebb75f52465ca092fefd07dd6481ef8f5b98e61973e5fa20cd60fa5b9047da96" + sha256 cellar: :any_skip_relocation, arm64_linux: "cce5f086f80b4a69f12d3b6a179c4e388a3b5076d36cc28aa17371f343f6f6c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e24ca35afb17346d309b1fa1c2c87e6e4b664123bf35b1d382e7bbb92cbcdb6" + end + + depends_on "dotnet@8" + + def install + ENV["DOTNET_CLI_TELEMETRY_OPTOUT"] = "1" + ENV["DOTNET_SYSTEM_GLOBALIZATION_INVARIANT"] = "1" + + dotnet = Formula["dotnet@8"] + + args = %W[ + --configuration Release + --framework net#{dotnet.version.major_minor} + --output #{libexec} + --no-self-contained + --use-current-runtime + ] + if build.stable? + args += %W[ + /p:AssemblyVersion=#{version} + /p:FileVersion=#{version} + /p:InformationalVersion=#{version} + /p:Version=#{version} + ] + end + + system "dotnet", "publish", "src/Jackett.Server", *args + + (bin/"jackett").write_env_script libexec/"jackett", "--NoUpdates", + DOTNET_ROOT: "${DOTNET_ROOT:-#{dotnet.opt_libexec}}" + end + + service do + run opt_bin/"jackett" + keep_alive true + working_dir opt_libexec + log_path var/"log/jackett.log" + error_log_path var/"log/jackett.log" + end + + test do + assert_match(/^Jackett v#{Regexp.escape(version)}$/, shell_output("#{bin}/jackett --version 2>&1; true")) + + port = free_port + + pid = fork do + exec bin/"jackett", "-d", testpath, "-p", port.to_s + end + + begin + sleep 15 + assert_match "Jackett", shell_output("curl -b cookiefile -c cookiefile -L --silent http://localhost:#{port}") + ensure + Process.kill "TERM", pid + Process.wait pid + end + end +end diff --git a/Formula/j/jadx.rb b/Formula/j/jadx.rb new file mode 100644 index 0000000000000..ca875ccac2c5e --- /dev/null +++ b/Formula/j/jadx.rb @@ -0,0 +1,41 @@ +class Jadx < Formula + desc "Dex to Java decompiler" + homepage "https://github.com/skylot/jadx" + url "https://github.com/skylot/jadx/releases/download/v1.5.1/jadx-1.5.1.zip" + sha256 "12fd966431903b8e15c36e5007f19343475be7d8f2a55f082e7a929eeabc937e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "735427c63f8e20f067a5a50d4273cea56b5fd528bb0ad656d91a76762e774997" + end + + head do + url "https://github.com/skylot/jadx.git", branch: "master" + depends_on "gradle" => :build + end + + depends_on "openjdk" + + resource "homebrew-test.apk" do + url "https://raw.githubusercontent.com/facebook/redex/fa32d542d4074dbd485584413d69ea0c9c3cbc98/test/instr/redex-test.apk" + sha256 "7851cf2a15230ea6ff076639c2273bc4ca4c3d81917d2e13c05edcc4d537cc04" + end + + def install + if build.head? + system "gradle", "clean", "dist" + libexec.install Dir["build/jadx/*"] + else + libexec.install Dir["*"] + end + bin.install libexec/"bin/jadx" + bin.install libexec/"bin/jadx-gui" + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + end + + test do + resource("homebrew-test.apk").stage do + system bin/"jadx", "-d", "out", "redex-test.apk" + end + end +end diff --git a/Formula/j/jags.rb b/Formula/j/jags.rb new file mode 100644 index 0000000000000..ece50a3d2065b --- /dev/null +++ b/Formula/j/jags.rb @@ -0,0 +1,58 @@ +class Jags < Formula + desc "Just Another Gibbs Sampler for Bayesian MCMC simulation" + homepage "https://mcmc-jags.sourceforge.io/" + url "https://downloads.sourceforge.net/project/mcmc-jags/JAGS/4.x/Source/JAGS-4.3.2.tar.gz" + sha256 "871f556af403a7c2ce6a0f02f15cf85a572763e093d26658ebac55c4ab472fc8" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/JAGS[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9ec17a748448aef193d0e71ca36c578a4b2b587d2a020d88331d38c07ea0f557" + sha256 cellar: :any, arm64_sonoma: "576bfc31090a7cc7bbae18111b04dd83bea17682c2262d287614727f72410e63" + sha256 cellar: :any, arm64_ventura: "c8ba96c00fb39ab7f4c3089238a555e27ce43f6ab60e9b6999584280340ecb21" + sha256 cellar: :any, arm64_monterey: "3f1eacf3e53bf3189c9d196eb6de1d65a05f7e57f9b25d6d160941fe57325825" + sha256 cellar: :any, arm64_big_sur: "3c606af0d9e40ccd6b0760ded88dc5900c5a8c8c9c5dd0b1a4854a53a804865c" + sha256 cellar: :any, sonoma: "4a4faf34b75030cefcc11cf429718f3615c49ffebf4c0b77acbbb0edf478dc96" + sha256 cellar: :any, ventura: "d40f5a21bf78129d3b7f2971599820cd314abc833845cbf26873ca46898354c3" + sha256 cellar: :any, monterey: "d839d57ae5b36275eef12c902e66b29321085f025795f2c074e5d65eda01f984" + sha256 cellar: :any, big_sur: "0cd7d7d301775a3efdaa8dc7aa1c10100b7aba983a22a1b08a68a76f8aa0b434" + sha256 cellar: :any_skip_relocation, arm64_linux: "32a23e1ae56951dfc6202a6c02642cb8d12bba5c831573848cb07ebec7dd091a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e3f035c69478626479915a42deb8a4e329e3eebef4db5ab7f44e7c23dad34958" + end + + depends_on "gcc" # for gfortran + + on_linux do + depends_on "openblas" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"model.bug").write <<~EOS + data { + obs <- 1 + } + model { + parameter ~ dunif(0,1) + obs ~ dbern(parameter) + } + EOS + (testpath/"script").write <<~EOS + model in model.bug + compile + initialize + monitor parameter + update 100 + coda * + EOS + system bin/"jags", "script" + end +end diff --git a/Formula/j/jaguar.rb b/Formula/j/jaguar.rb new file mode 100644 index 0000000000000..44381cfd8c824 --- /dev/null +++ b/Formula/j/jaguar.rb @@ -0,0 +1,47 @@ +class Jaguar < Formula + desc "Live reloading for your ESP32" + homepage "https://toitlang.org/" + url "https://github.com/toitlang/jaguar/archive/refs/tags/v1.51.0.tar.gz" + sha256 "87cd58bca9d8ff4d6be6c22a3b5c62b76aab81e8298cd3cd5f7b265f5947e5f3" + license "MIT" + head "https://github.com/toitlang/jaguar.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "963d22d8a13fae117c811c0ca722640d4a2b3d3bbd47dba0029fe1d2f7291404" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "963d22d8a13fae117c811c0ca722640d4a2b3d3bbd47dba0029fe1d2f7291404" + sha256 cellar: :any_skip_relocation, arm64_ventura: "963d22d8a13fae117c811c0ca722640d4a2b3d3bbd47dba0029fe1d2f7291404" + sha256 cellar: :any_skip_relocation, sonoma: "88a4001106d27e68ae85e818910ad7c269fb4211d43f2e2be41143f785b77eec" + sha256 cellar: :any_skip_relocation, ventura: "88a4001106d27e68ae85e818910ad7c269fb4211d43f2e2be41143f785b77eec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d13bc01462df5a7e34f7390b3d86b4ef2ee0b121687a9c2b1a7459c985277e42" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.buildDate=#{time.iso8601} + -X main.buildMode=release + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"jag"), "./cmd/jag" + + generate_completions_from_executable(bin/"jag", "completion") + end + + test do + assert_match "Version:\t v#{version}", shell_output(bin/"jag --no-analytics version 2>&1") + + (testpath/"hello.toil").write <<~TOIL + main: + print "Hello, world!" + TOIL + + # Cannot do anything without installing SDK to $HOME/.cache/jaguar/ + assert_match "You must setup the SDK", shell_output(bin/"jag run #{testpath}/hello.toil 2>&1", 1) + end +end diff --git a/Formula/j/jailkit.rb b/Formula/j/jailkit.rb new file mode 100644 index 0000000000000..f19ddea0b45c5 --- /dev/null +++ b/Formula/j/jailkit.rb @@ -0,0 +1,33 @@ +class Jailkit < Formula + desc "Utilities to create limited user accounts in a chroot jail" + homepage "https://olivier.sessink.nl/jailkit/" + url "https://olivier.sessink.nl/jailkit/jailkit-2.23.tar.bz2" + sha256 "aa27dc1b2dbbbfcec2b970731f44ced7079afc973dc066757cea1beb4e8ce59c" + license all_of: ["BSD-3-Clause", "LGPL-2.0-or-later"] + revision 1 + + livecheck do + url :homepage + regex(/href=.*?jailkit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 3 + sha256 arm64_sequoia: "076d8ccde7798b91dd5d4180fc2d2debb7ef02e2db89cd365c6deebf6bc6efdf" + sha256 arm64_sonoma: "025053b284193b9d1c95198481f1590ff9215c899c37ef815af7112adf48be5d" + sha256 arm64_ventura: "0d93bf91fbfa2c9b28872305a2fffdedb7ea4a92c9e0322804f4ec876e77f65c" + sha256 sonoma: "a06284e555f1de8ca3efe295422941c5707a6584ee0290db9c81bf65b73f16ed" + sha256 ventura: "7f29c2242dee1509abeef79da62ae9a5f34b74185042157895ef13184aa9c7c4" + sha256 arm64_linux: "7608787263a84503149fc6dffa46ba57ddd1a2b72856d40035b3eab5611aa507" + sha256 x86_64_linux: "d8f26d192338a7f45ef9a376c983cc97d873249106c78807cacd7964c7007b8e" + end + + depends_on "python@3.13" + + def install + ENV["PYTHONINTERPRETER"] = which("python3.13") + + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/j/jam.rb b/Formula/j/jam.rb new file mode 100644 index 0000000000000..2f330da3bd619 --- /dev/null +++ b/Formula/j/jam.rb @@ -0,0 +1,66 @@ +class Jam < Formula + desc "Make-like build tool" + homepage "https://www.perforce.com/documentation/jam-documentation" + url "https://swarm.workshop.perforce.com/downloads/guest/perforce_software/jam/jam-2.6.1.zip" + sha256 "72ea48500ad3d61877f7212aa3d673eab2db28d77b874c5a0b9f88decf41cb73" + license "Jam" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2ecb702317e3639199260d2431cb4df895ba1e72ca13fbd18d74526926f67c5a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "750191fa0660e62dee16dca7e7105fa4cbc783fa3b5dd87bddb727bddcbaa5a3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae7aceb6a763b9da9860724b7347f2449f4983c004d3b58bdb21580deeb45482" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c63b8dd9caebb84eed84bd05412e698106c41dae126fefe7b5c4e713edcf827a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4c203e7cd06975b4a931ef7f79b150f3275c2b875aefc050893e7f7ffab76293" + sha256 cellar: :any_skip_relocation, sonoma: "b40493167fccdb8af709e58449f9ff771cc058e57f0854e3e39703d5a135a981" + sha256 cellar: :any_skip_relocation, ventura: "4a163487e3a73e5df99989d796356585e204928634e96c708199f49d68feb864" + sha256 cellar: :any_skip_relocation, monterey: "e523ce38232f61b98a93132faba3c61f5a1ef8cfd08d9d650a716d6b6c90daa0" + sha256 cellar: :any_skip_relocation, big_sur: "8ec0896e57af05a0d2e6bfdb508e77b2b45d8fcea5baa82f00f5d0a8cf2b75d4" + sha256 cellar: :any_skip_relocation, catalina: "0f2f2b4cac48c2ef9b11d86867c4e9d941a41a582754bfc470da25a7174dde9f" + sha256 cellar: :any_skip_relocation, mojave: "c19a32cbe0ffa2e7d2d826ee542a74307ca29b34ba28dc5ec6aea7ff7a9127c1" + sha256 cellar: :any_skip_relocation, high_sierra: "2927cebface8a3cbc00a23e7badb9e1676fda9bae282e78a1772b99aafba5014" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3ff63ae4c707cc78f68f75b1ce99759a3c854ac61ad9774484eec62b235a2cf" + end + + # 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." + disable! date: "2024-11-03", because: :unmaintained + + # * 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/formula-patches/42252ab3d438f7ada66e83b92bb51a9178d3df10/jam/2.6.1-undeclared_functions.diff" + sha256 "d567cbaf3914f38bb8c5017ff01cc40fe85970c34d3ad84dbeda8c893518ffae" + end + + def install + # Workaround for newer Clang + ENV.append "CC", "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", "LOCATE_TARGET=bin" + bin.install "bin/jam", "bin/mkjambase" + end + + test do + (testpath/"Jamfile").write <<~EOS + Main jamtest : jamtest.c ; + EOS + + (testpath/"jamtest.c").write <<~C + #include + + int main(void) + { + printf("Jam Test\\n"); + return 0; + } + C + + assert_match "Cc jamtest.o", shell_output(bin/"jam") + assert_equal "Jam Test", shell_output("./jamtest").strip + end +end diff --git a/Formula/j/janet.rb b/Formula/j/janet.rb new file mode 100644 index 0000000000000..36c1fb6d7edcb --- /dev/null +++ b/Formula/j/janet.rb @@ -0,0 +1,72 @@ +class Janet < Formula + desc "Dynamic language and bytecode vm" + homepage "https://janet-lang.org/" + url "https://github.com/janet-lang/janet/archive/refs/tags/v1.38.0.tar.gz" + sha256 "84dbf7db9c09677618549fb4be23631fd64f527af21051db02753241a2f6f752" + license "MIT" + head "https://github.com/janet-lang/janet.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3d5aceab74176cbe27ffae5a7fa4f9485c2694989188fcd5f7c4a83ff2a4495d" + sha256 cellar: :any, arm64_sonoma: "2afce57bcb9348d81aa482af206fbfa1d6b1985f028be51fef0d5e6f6ccc42e3" + sha256 cellar: :any, arm64_ventura: "ccdaeff23165fc3b9fc964a18a010dd0804a91cc615c25be653f0f59f401886c" + sha256 cellar: :any, sonoma: "02fb4e9f90e09f7ba732c33f5db175650f074f42a2d144d2ec140ac4594d0972" + sha256 cellar: :any, ventura: "db28b206bd0846582f5d299e02879624716b1ba5d87ebdc3819b1dd202c3ad6d" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3c3fe2618d5ca8b0458ecb473531c16f9deb97a8bd4de18228507f97252fae1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "029c616c9c076e8fcc8a8a144df67dc5427dbad79903329a5accaadf26bc487a" + end + + resource "jpm" do + url "https://github.com/janet-lang/jpm/archive/refs/tags/v1.1.0.tar.gz" + sha256 "337c40d9b8c087b920202287b375c2962447218e8e127ce3a5a12e6e47ac6f16" + end + + def syspath + HOMEBREW_PREFIX/"lib/janet" + end + + def install + # Replace lines in the Makefile that attempt to create the `syspath` + # directory (which is a directory outside the sandbox). + inreplace "Makefile", /^.*?\bmkdir\b.*?\$\(JANET_PATH\).*?$/, "#" + + ENV["PREFIX"] = prefix + ENV["JANET_BUILD"] = "\\\"homebrew\\\"" + ENV["JANET_PATH"] = syspath + + system "make" + system "make", "install" + end + + def post_install + mkdir_p syspath unless syspath.exist? + + resource("jpm").stage do + ENV["PREFIX"] = prefix + ENV["JANET_BINPATH"] = HOMEBREW_PREFIX/"bin" + ENV["JANET_HEADERPATH"] = HOMEBREW_PREFIX/"include/janet" + ENV["JANET_LIBPATH"] = HOMEBREW_PREFIX/"lib" + ENV["JANET_MANPATH"] = HOMEBREW_PREFIX/"share/man/man1" + ENV["JANET_MODPATH"] = syspath + system bin/"janet", "bootstrap.janet" + end + end + + def caveats + <<~EOS + When uninstalling Janet, please delete the following manually: + - #{HOMEBREW_PREFIX}/lib/janet + - #{HOMEBREW_PREFIX}/bin/jpm + - #{HOMEBREW_PREFIX}/share/man/man1/jpm.1 + EOS + end + + test do + janet = bin/"janet" + jpm = HOMEBREW_PREFIX/"bin/jpm" + assert_equal "12", shell_output("#{janet} -e '(print (+ 5 7))'").strip + assert_path_exists jpm, "jpm must exist" + assert_predicate jpm, :executable?, "jpm must be executable" + assert_match syspath.to_s, shell_output("#{jpm} show-paths") + end +end diff --git a/Formula/j/jansson.rb b/Formula/j/jansson.rb new file mode 100644 index 0000000000000..6a3ae73f263bb --- /dev/null +++ b/Formula/j/jansson.rb @@ -0,0 +1,41 @@ +class Jansson < Formula + desc "C library for encoding, decoding, and manipulating JSON" + homepage "https://digip.org/jansson/" + url "https://github.com/akheron/jansson/releases/download/v2.14.1/jansson-2.14.1.tar.gz" + sha256 "2521cd51a9641d7a4e457f7215a4cd5bb176f690bc11715ddeec483e85d9e2b3" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2bc5197c2d2b866df7f529962479d0af3a81524fb84235c055d6a10ad21edd88" + sha256 cellar: :any, arm64_sonoma: "613dd35360b87dc3b327f0129ab3b0d5758b056ac1413adb5bd073a2630044b8" + sha256 cellar: :any, arm64_ventura: "5d11fa69aa185323b0937cad8ed81a5159328c24acf171dd68ee5b3704c91eae" + sha256 cellar: :any, sonoma: "e79d8c86563b8ef4e9b019c7cb39c2504cdaacdaf6fbb81bfa395ed7a642fb30" + sha256 cellar: :any, ventura: "ea5ea240729d0dfd637dfee2d14fab5b047301b8a062d44a8d78597351e0aeaa" + sha256 cellar: :any_skip_relocation, arm64_linux: "b915682e024ec87c583bf32398fb164a3978dbe2f7b6512fa9b8e684bac76c7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a841f8b0d0f57190fc62c0045e42b6e38a321ebe1949607e5771ef71b20aaf21" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + json_t *json; + json_error_t error; + json = json_loads("\\"foo\\"", JSON_DECODE_ANY, &error); + assert(json && json_is_string(json)); + json_decref(json); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-ljansson", "-o", "test" + system "./test" + end +end diff --git a/Formula/j/jaq.rb b/Formula/j/jaq.rb new file mode 100644 index 0000000000000..3d5cc57073058 --- /dev/null +++ b/Formula/j/jaq.rb @@ -0,0 +1,36 @@ +class Jaq < Formula + desc "JQ clone focussed on correctness, speed, and simplicity" + homepage "https://github.com/01mf02/jaq" + url "https://github.com/01mf02/jaq/archive/refs/tags/v2.2.0.tar.gz" + sha256 "00a527fb3d22ad5c780b119fa07afa1b57910b1aa664b5ad426db29582f118e3" + license "MIT" + head "https://github.com/01mf02/jaq.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1a88eae586f0f550edefdede3dbe5eb4dafe1494ad6ca1c3854717ea2f33a68a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "47d3015eb4dd65b8c251584b09b919bc7027f7801b7b4a237c099da132740134" + sha256 cellar: :any_skip_relocation, arm64_ventura: "86cbfe55e27a8a5f04f91e5fd681b669ff77d803fe527d883676c6671e1a2183" + sha256 cellar: :any_skip_relocation, sonoma: "ddb554c49794835e4026c08f6deaef40c6d020ddda11c401bd11c7f55236ad30" + sha256 cellar: :any_skip_relocation, ventura: "5ea5145d04cf1280b22be95c9c17d6cef7fd2a963877ff5f246278f0253a8bb2" + sha256 cellar: :any_skip_relocation, arm64_linux: "546055076d28825ed7ec74446178133bf8e131ef6c8700fd9f726cbbe1ee0d5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "67a3577419fc262cc767dba1ce37cbe764f0861ff4ac915c193cb32a71cad023" + end + + depends_on "rust" => :build + + conflicts_with "json2tsv", because: "both install `jaq` binaries" + + def install + system "cargo", "install", *std_cargo_args(path: "jaq") + end + + test do + assert_match "1", shell_output("echo '{\"a\": 1, \"b\": 2}' | #{bin}/jaq '.a'") + assert_match "2.5", shell_output("echo '1 2 3 4' | #{bin}/jaq -s 'add / length'") + end +end diff --git a/Formula/j/jasmin.rb b/Formula/j/jasmin.rb new file mode 100644 index 0000000000000..9925bf48cba75 --- /dev/null +++ b/Formula/j/jasmin.rb @@ -0,0 +1,45 @@ +class Jasmin < Formula + desc "Assembler for the Java Virtual Machine" + homepage "https://jasmin.sourceforge.net/" + url "https://downloads.sourceforge.net/project/jasmin/jasmin/jasmin-2.4/jasmin-2.4.zip" + sha256 "eaa10c68cec68206fd102e9ec7113739eccd790108a1b95a6e8c3e93f20e449d" + license "BSD-4-Clause" + revision 2 + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "5ca0d0e4caaf51963cbbc63ffa2b3b2506737c8c0cc8a2773acb76f185221b11" + end + + depends_on "openjdk" + + def install + # Remove Windows scripts + rm_r(Dir["*.bat"]) + + libexec.install Dir["*.jar"] + prefix.install %w[Readme.txt license-ant.txt license-jasmin.txt] + bin.write_jar_script libexec/"jasmin.jar", "jasmin" + end + + test do + (testpath/"test.j").write <<~EOS + .class public HomebrewTest + .super java/lang/Object + .method public ()V + aload_0 + invokespecial java/lang/Object/()V + return + .end method + .method public static main([Ljava/lang/String;)V + .limit stack 2 + getstatic java/lang/System/out Ljava/io/PrintStream; + ldc "Hello Homebrew" + invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V + return + .end method + EOS + system bin/"jasmin", "#{testpath}/test.j" + assert_equal "Hello Homebrew\n", shell_output("#{Formula["openjdk"].bin}/java HomebrewTest") + end +end diff --git a/Formula/j/jasper.rb b/Formula/j/jasper.rb new file mode 100644 index 0000000000000..454c1a9596389 --- /dev/null +++ b/Formula/j/jasper.rb @@ -0,0 +1,64 @@ +class Jasper < Formula + desc "Library for manipulating JPEG-2000 images" + homepage "https://ece.engr.uvic.ca/~frodo/jasper/" + url "https://github.com/jasper-software/jasper/releases/download/version-4.2.5/jasper-4.2.5.tar.gz" + sha256 "6e49075b47204a9879600f85628a248cdb19abc1bb74d0b7a2177bcdb87c95eb" + license "JasPer-2.0" + + livecheck do + url :stable + regex(/^version[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5bf7fb8303c35cca02e48faa33254cc9d65306985bd4186d8141dc61bf3b643f" + sha256 cellar: :any, arm64_sonoma: "466fe76a53eec75539fd035ff2f360ce80c1996eab9a3e0fb5d376e27c8b2248" + sha256 cellar: :any, arm64_ventura: "237c33c5a1af11e1944a0a23ec034e00796abec9fb1abd95fca207028d17b2ba" + sha256 cellar: :any, sonoma: "ba6b449339961161ac625af3590a931be960f4c2275d5cb37fbdef2b87ff37bc" + sha256 cellar: :any, ventura: "708052ec8c1dbc2af569e6598cd15be3c3ee591883fd32ab83d81f454a220b06" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f4941da41b0df9cb13644bcf1ae1743d8f322fa981909c4424e1671349513a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b6a0215c5f685c113b3920ff802d935d0a6a1853bb1f859e058421dcac0f4d2f" + end + + depends_on "cmake" => :build + depends_on "jpeg-turbo" + + def install + mkdir "tmp_cmake" do + args = std_cmake_args + args << "-DJAS_ENABLE_DOC=OFF" + + if OS.mac? + # Make sure macOS's GLUT.framework is used, not XQuartz or freeglut + # Reported to CMake upstream 4 Apr 2016 https://gitlab.kitware.com/cmake/cmake/issues/16045 + glut_lib = "#{MacOS.sdk_path}/System/Library/Frameworks/GLUT.framework" + args << "-DGLUT_glut_LIBRARY=#{glut_lib}" + else + args << "-DJAS_ENABLE_OPENGL=OFF" + end + + system "cmake", "..", + "-DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=false", + "-DJAS_ENABLE_SHARED=ON", + *args + system "make" + system "make", "install" + system "make", "clean" + + system "cmake", "..", + "-DJAS_ENABLE_SHARED=OFF", + *args + system "make" + lib.install "src/libjasper/libjasper.a" + end + + # Avoid rebuilding dependents that hard-code the prefix. + inreplace lib/"pkgconfig/jasper.pc", prefix, opt_prefix + end + + test do + system bin/"jasper", "--input", test_fixtures("test.jpg"), + "--output", "test.bmp" + assert_path_exists testpath/"test.bmp" + end +end diff --git a/Formula/j/java-service-wrapper.rb b/Formula/j/java-service-wrapper.rb new file mode 100644 index 0000000000000..f2ba37504df83 --- /dev/null +++ b/Formula/j/java-service-wrapper.rb @@ -0,0 +1,83 @@ +class JavaServiceWrapper < Formula + desc "Simplify the deployment, launch and monitoring of Java applications" + homepage "https://wrapper.tanukisoftware.com/" + url "https://downloads.sourceforge.net/project/wrapper/wrapper_src/Wrapper_3.6.1_20250514/wrapper_3.6.1_src.tar.gz" + sha256 "c33ea05d6bff80632d0b7edbd2e63e694deafc65dfaddfd08b4605f4da22f658" + license any_of: ["GPL-2.0-only", "GPL-3.0-only"] + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "216727d5e12c520318201c389543c03c5bd95b88e71b4cf913fb24892bb54105" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3dc80b5bae66308592d533ccc343410e01c8881b827151df7348e4050cb3edb6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "13ec420a894efa500568e39a4caf2e26f14f07cdcaf4e9bd97c2196ab6a7036d" + sha256 cellar: :any_skip_relocation, sonoma: "3dbadd579880550a0844754cc268e0cd4917fadd7694534a464fa867dcd8ad8d" + sha256 cellar: :any_skip_relocation, ventura: "57045f6e4b0f1a153696aa693870f811a811626b87427bae6e55b23ed60cbfd5" + sha256 cellar: :any_skip_relocation, arm64_linux: "41df4f16608c9f6447efd063c415391ae0dfd2eff7d906ee5adab5dd2976b58e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4cb5d428b2a9b22b01b0379e0e85e38ca3c825d3fdad2a7f73320128c04222cf" + end + + depends_on "ant" => :build + depends_on "openjdk" => [:build, :test] + + on_linux do + depends_on "cunit" => :build + end + + def install + ENV["JAVA_HOME"] = Language::Java.java_home + + # Default javac target version is 1.4, use 1.8 which is the minimum available on newer openjdk + system "ant", "-Dbits=64", "-Djavac.target.version=1.8" + + libexec.install "lib", "bin", "src/bin" => "scripts" + + if OS.mac? + if Hardware::CPU.arm? + ln_s "libwrapper.dylib", libexec/"lib/libwrapper.jnilib" + else + ln_s "libwrapper.jnilib", libexec/"lib/libwrapper.dylib" + end + end + end + + test do + ENV["JAVA_HOME"] = java_home = Language::Java.java_home + + output = shell_output("#{libexec}/bin/testwrapper status", 1) + assert_equal "Test Wrapper Sample Application (not installed) is not running.\n", output + + (testpath/"bin").install_symlink libexec/"bin/wrapper" + cp libexec/"scripts/App.sh.in", testpath/"bin/helloworld" + chmod "+x", testpath/"bin/helloworld" + inreplace testpath/"bin/helloworld" do |s| + s.gsub! "@app.name@", "helloworld" + s.gsub! "@app.long.name@", "Hello World" + end + + (testpath/"conf/wrapper.conf").write <<~INI + wrapper.java.command=#{java_home}/bin/java + wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp + wrapper.jarfile=#{libexec}/lib/wrapper.jar + wrapper.java.classpath.1=#{testpath} + wrapper.java.library.path.1=#{libexec}/lib + wrapper.java.additional.auto_bits=TRUE + wrapper.java.additional.1=-Xms128M + wrapper.java.additional.2=-Xmx512M + wrapper.app.parameter.1=HelloWorld + wrapper.logfile=#{testpath}/wrapper.log + INI + + (testpath/"HelloWorld.java").write <<~JAVA + public class HelloWorld { + public static void main(String args[]) { + System.out.println("Hello, world!"); + } + } + JAVA + + system "#{java_home}/bin/javac", "HelloWorld.java" + console_output = shell_output("bin/helloworld console") + assert_match "Hello, world!", console_output + end +end diff --git a/Formula/j/javacc.rb b/Formula/j/javacc.rb new file mode 100644 index 0000000000000..1b9be97a5764d --- /dev/null +++ b/Formula/j/javacc.rb @@ -0,0 +1,57 @@ +class Javacc < Formula + desc "Parser generator for use with Java applications" + homepage "https://javacc.github.io/javacc/" + url "https://github.com/javacc/javacc/archive/refs/tags/javacc-7.0.13.tar.gz" + sha256 "d1bfebb4ca9261c5c3b16b00280b3278a41b193ca8503f2987f72de453bf99c6" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/javacc[._-]v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9095c2d3b973f05a81fc336594a9adcab73f8a65634827167fad98f831719fff" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f625a9b59d0fd505b1d69243c0147c292e4cd354550df5b352bcae140f7a2cbd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "afb3bbdbbd9c451870e427fe76fedb3e4b4ae7016656281f55df63c3529590ac" + sha256 cellar: :any_skip_relocation, arm64_monterey: "daa582720875aecf351ec74ada244f93398fa25baf84eae2ef97c42c55476978" + sha256 cellar: :any_skip_relocation, sonoma: "b84312451176ab1a2df3d822798ca872ad17e94463cfa36711a5e2cfc4ff906b" + sha256 cellar: :any_skip_relocation, ventura: "ecd5ae75666cee39459c65063a32d4c24a27be79ae2125b12fa3ad5042bcb0d3" + sha256 cellar: :any_skip_relocation, monterey: "d4c07d3a5e68b54df0a7de796394bb9d765d9d863249f51e81a1921a38ca89cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "546e4c009d4fda3ed41b4a229d77059fb613c9558e158a037ddf47f7d6488c49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8cfcf0b2f8d787fe06ac54aea4134722f7a4222f17b5402238a37177a0d73cc8" + end + + depends_on "ant" => :build + depends_on "openjdk" + + def install + system "ant" + libexec.install "target/javacc.jar" + doc.install Dir["www/doc/*"] + (share/"examples").install Dir["examples/*"] + %w[javacc jjdoc jjtree].each do |script| + (bin/script).write <<~SH + #!/bin/bash + export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" + exec "${JAVA_HOME}/bin/java" -classpath '#{libexec}/javacc.jar' #{script} "$@" + SH + end + end + + test do + src_file = share/"examples/SimpleExamples/Simple1.jj" + + output_file_stem = testpath/"Simple1" + + system bin/"javacc", src_file + assert_path_exists output_file_stem.sub_ext(".java") + + system bin/"jjtree", src_file + assert_path_exists output_file_stem.sub_ext(".jj.jj") + + system bin/"jjdoc", src_file + assert_path_exists output_file_stem.sub_ext(".html") + end +end diff --git a/Formula/j/jbake.rb b/Formula/j/jbake.rb new file mode 100644 index 0000000000000..6f3b16bb14dc9 --- /dev/null +++ b/Formula/j/jbake.rb @@ -0,0 +1,25 @@ +class Jbake < Formula + desc "Java based static site/blog generator" + homepage "https://jbake.org/" + url "https://github.com/jbake-org/jbake/releases/download/v2.6.7/jbake-2.6.7-bin.zip" + sha256 "8d9c2b70fbf26415c5b3e530088b8b7fd1d236d3ce2c98a9c03fff4734bced39" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "1dba6c35944fe67596c7203fcbf3e291f0a48ce159afde7b943a446ed61c76b9" + end + + depends_on "openjdk" + + def install + rm(Dir["bin/*.bat"]) + libexec.install Dir["*"] + bin.install libexec/"bin/jbake" + bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix + end + + test do + assert_match "Usage: jbake", shell_output(bin/"jbake") + end +end diff --git a/Formula/j/jbang.rb b/Formula/j/jbang.rb new file mode 100644 index 0000000000000..1d42c9951eee6 --- /dev/null +++ b/Formula/j/jbang.rb @@ -0,0 +1,30 @@ +class Jbang < Formula + desc "Tool to create, edit and run self-contained source-only Java programs" + homepage "https://jbang.dev/" + url "https://github.com/jbangdev/jbang/releases/download/v0.126.1/jbang-0.126.1.zip" + sha256 "1aebd2c3f1883089349492f2e3ef951de2927a05c764d26874730821be529511" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "e42bc087e9a6973908d9d69b426c2af12be22af4338ab2a31a6b51eb8bcb0ff9" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + inreplace "#{libexec}/bin/jbang", /^abs_jbang_dir=.*/, "abs_jbang_dir=#{libexec}/bin" + bin.install_symlink libexec/"bin/jbang" + end + + test do + system bin/"jbang", "init", "--template=cli", testpath/"hello.java" + assert_match "hello made with jbang", (testpath/"hello.java").read + assert_match version.to_s, shell_output("#{bin}/jbang --version 2>&1") + end +end diff --git a/Formula/j/jbig2dec.rb b/Formula/j/jbig2dec.rb new file mode 100644 index 0000000000000..bc4b6b30b8d3d --- /dev/null +++ b/Formula/j/jbig2dec.rb @@ -0,0 +1,49 @@ +class Jbig2dec < Formula + desc "JBIG2 decoder and library (for monochrome documents)" + homepage "https://github.com/ArtifexSoftware/jbig2dec" + url "https://github.com/ArtifexSoftware/jbig2dec/archive/refs/tags/0.20.tar.gz" + sha256 "a9705369a6633aba532693450ec802c562397e1b824662de809ede92f67aff21" + license "AGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f581562914f78e334b62715f38a94884e133a0f5fd9f865bd51a6404250a650b" + sha256 cellar: :any, arm64_sonoma: "30f0053c48d777cdbf482bcffeb449fe173e3471e344c97bc129b8fe2f883629" + sha256 cellar: :any, arm64_ventura: "973a40cc673a331249be09ddef83537889f45f8934925c36e9b17e73cb852c40" + sha256 cellar: :any, arm64_monterey: "7e52f5520ff0970c61fea2293db287b162b4de29c69f5032ae17a2cdab8fed22" + sha256 cellar: :any, arm64_big_sur: "8830470637ded079e4de807b63d8970b2e1020451b781f42a5dc0a6da7742479" + sha256 cellar: :any, sonoma: "8017bcda4a2d530aad05946e2196907a8fd52992aa3043001764adea0e2cf58b" + sha256 cellar: :any, ventura: "daab35fae8429496d00b301717837f656c4e166a3f384d8ccc0a2e1ae69f6c30" + sha256 cellar: :any, monterey: "907cf171d3bf5816be1036330bd09b93df351fde2ea414f99c388668e2637222" + sha256 cellar: :any, big_sur: "e2a6dc6113dda3fb85111dcc72c6f89fbac0800260cf4110956b3c984f74530e" + sha256 cellar: :any_skip_relocation, arm64_linux: "43fda0fa722603abe04fe456472b593fcbcfb933ebab2bedea48e2cc77e5cbfa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb3732eb4744293f9354ab856ea2f9b350897fa5408ae9c07330ba454f3ec95c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + resource("test") do + url "https://github.com/apache/tika/raw/master/tika-parsers/src/test/resources/test-documents/testJBIG2.jb2" + sha256 "40764aed6c185f1f82123f9e09de8e4d61120e35d2b5c6ede082123749c22d91" + end + + def install + args = %W[ + --disable-dependency-tracking + --prefix=#{prefix} + --disable-silent-rules + --without-libpng + ] + + system "./autogen.sh", *args + system "make", "install" + end + + test do + resource("test").stage testpath + output = shell_output("#{bin}/jbig2dec -t pbm --hash testJBIG2.jb2") + assert_match "aa35470724c946c7e953ddd49ff5aab9f8289aaf", output + assert_path_exists testpath/"testJBIG2.pbm" + end +end diff --git a/Formula/j/jbig2enc.rb b/Formula/j/jbig2enc.rb new file mode 100644 index 0000000000000..ef31a3c1d0bcd --- /dev/null +++ b/Formula/j/jbig2enc.rb @@ -0,0 +1,44 @@ +class Jbig2enc < Formula + desc "JBIG2 encoder (for monochrome documents)" + homepage "https://github.com/agl/jbig2enc" + url "https://github.com/agl/jbig2enc/archive/refs/tags/0.30.tar.gz" + sha256 "4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b" + license "Apache-2.0" + head "https://github.com/agl/jbig2enc.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c3277ead02053270075af72039bcd3f2e2d712fddda586284f9b5b00a6ea672f" + sha256 cellar: :any, arm64_sonoma: "bde53a1f5b1257541002a926ab14fcfefe91b3408df67eb9dbc2e27584d6b596" + sha256 cellar: :any, arm64_ventura: "3e12cce5a16f9427104fa24c1b8665d8d0cc58b22b77d2d1b7d74ef4dbba5d46" + sha256 cellar: :any, sonoma: "73b88ab1c2f8c17beda9109e62935813bce19ce84970b935ef810715c48d21f6" + sha256 cellar: :any, ventura: "988b1d72ea105c139b59ba60e4cd00beac878f647f1594d2657340878acb135b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8f1cda60e433c0a9e450ebac66c1cd12646f57a5fe691969870a45f96c21352" + sha256 cellar: :any_skip_relocation, x86_64_linux: "11281bffe9b33acf9e62c446ae9af7332b4154a87d9d58f3ba15b9d550198d93" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + depends_on "leptonica" + + on_macos do + depends_on "giflib" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "webp" + end + + def install + system "./autogen.sh" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + output = shell_output("#{bin}/jbig2 -s -S -p -v -O out.png #{test_fixtures("test.jpg")} 2>&1") + assert_match "no graphics found in input image", output + assert_path_exists testpath/"out.png" + end +end diff --git a/Formula/j/jbigkit.rb b/Formula/j/jbigkit.rb new file mode 100644 index 0000000000000..5feba18ddbaab --- /dev/null +++ b/Formula/j/jbigkit.rb @@ -0,0 +1,56 @@ +class Jbigkit < Formula + desc "JBIG1 data compression standard implementation" + homepage "https://www.cl.cam.ac.uk/~mgk25/jbigkit/" + url "https://www.cl.cam.ac.uk/~mgk25/jbigkit/download/jbigkit-2.1.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/j/jbigkit/jbigkit_2.1.orig.tar.gz" + sha256 "de7106b6bfaf495d6865c7dd7ac6ca1381bd12e0d81405ea81e7f2167263d932" + license "GPL-2.0-or-later" + head "https://www.cl.cam.ac.uk/~mgk25/git/jbigkit", using: :git, branch: "master" + + livecheck do + url :homepage + regex(/href=.*?jbigkit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "589c8a946d59e05dc1d23a0225efc605234fe4095bed2f5bce170c90b346ab96" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42da4c2b5a8509fbd035ccb074f3e83eaab33eb9a87916406ad92a4fb40b994b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b66862e0d5f29e5aea07adc1162de3f0cd4c43eeea409d6b5db990b977cf4f6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "602ec1a2e779e96d08344017bb931518b8c4ae9b367d7d63dbbb6ffefaaf5299" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cda73dea9c469f1ad380c7fe90b75dfe22d1dcc9ba51593ba59493656cf76c94" + sha256 cellar: :any_skip_relocation, sonoma: "5677beabb52b051e5c999c984ddf98bfae65d22c88883d5e36fdc1e3799fe40f" + sha256 cellar: :any_skip_relocation, ventura: "e8b8409f08c1507a31e0d016adef4bba4089e05c23c5652977051289a6609c9c" + sha256 cellar: :any_skip_relocation, monterey: "ed0440252fa7dc1d13a985498d56037c1bcb0c56fdc7220081ebf7a623524bd6" + sha256 cellar: :any_skip_relocation, big_sur: "568ea0a6734dc1da5d50b5261f43753f7cf1089fae9c786e7859a8ec22562144" + sha256 cellar: :any_skip_relocation, catalina: "16936e06d59fe44d40a3829bc60fec43cb7ca23d54b5fdf9510aca78df648460" + sha256 cellar: :any_skip_relocation, mojave: "887d4f100ed2264220232720a7732a969ee97df32a1c87f03897952920b6019a" + sha256 cellar: :any_skip_relocation, high_sierra: "c8a003d12559b6f506fbd912c3b68163f7ab6022fd53e069bfbd55c813f52df5" + sha256 cellar: :any_skip_relocation, sierra: "831dd1ec7e8013ddc6c23641a21292eae26f397e8b61d95382a6240f18fc5602" + sha256 cellar: :any_skip_relocation, el_capitan: "bdec08cd92dd59183b698c6bbd9072881fdfce64b4ecb6182e405e0f2ad26c00" + sha256 cellar: :any_skip_relocation, arm64_linux: "e211cb4b191e33b3b01f40a4fabb35a59d770ccc8f4f873ba0ade76780598bc1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d787da566c3d674b9ebc93fcf4291ca28325366fad703f3a90451bd6fbfbac1" + end + + conflicts_with "netpbm", because: "both install `pbm.5` and `pgm.5` files" + + def install + system "make", "CC=#{ENV.cc}", "CCFLAGS=#{ENV.cflags}" + + cd "pbmtools" do + bin.install %w[pbmtojbg jbgtopbm pbmtojbg85 jbgtopbm85] + man1.install %w[pbmtojbg.1 jbgtopbm.1] + man5.install %w[pbm.5 pgm.5] + end + cd "libjbig" do + lib.install Dir["lib*.a"] + (prefix/"src").install Dir["j*.c", "j*.txt"] + include.install Dir["j*.h"] + end + pkgshare.install "examples", "contrib" + end + + test do + system "#{bin}/jbgtopbm #{pkgshare}/examples/ccitt7.jbg | #{bin}/pbmtojbg - testoutput.jbg" + system "/usr/bin/cmp", pkgshare/"examples/ccitt7.jbg", "testoutput.jbg" + end +end diff --git a/Formula/j/jboss-forge.rb b/Formula/j/jboss-forge.rb new file mode 100644 index 0000000000000..5f27a3b12f246 --- /dev/null +++ b/Formula/j/jboss-forge.rb @@ -0,0 +1,37 @@ +class JbossForge < Formula + desc "Tools to help set up and configure a project" + homepage "https://forge.jboss.org/" + url "https://downloads.jboss.org/forge/releases/3.10.0.Final/forge-distribution-3.10.0.Final-offline.zip" + sha256 "0c57ea7ad90cbc5e654dd09623f385c192c6fabe366a30c11597b49bb09f7fb3" + license "EPL-1.0" + + # The first-party download page (https://forge.jboss.org/download) uses + # JavaScript to render the download links and the version information comes + # from the /api/metadata endpoint in JSON format. + livecheck do + url "https://forge.jboss.org/api/metadata" + strategy :json do |json| + json["latestVersion"] + end + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "f94f4ca9e8be07c5fbcf13f5c685b071091e4ee55dbe6e0bb33cbfc378fa9d07" + end + + depends_on "openjdk" + + conflicts_with "foundry", because: "both install `forge` binaries" + + def install + rm(Dir["bin/*.bat"]) + libexec.install %w[addons bin lib logging.properties] + bin.install libexec/"bin/forge" + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + end + + test do + assert_match "org.jboss.forge.addon:core", shell_output("#{bin}/forge --list") + end +end diff --git a/Formula/j/jc.rb b/Formula/j/jc.rb new file mode 100644 index 0000000000000..6d505eb98f51c --- /dev/null +++ b/Formula/j/jc.rb @@ -0,0 +1,50 @@ +class Jc < Formula + include Language::Python::Virtualenv + + desc "Serializes the output of command-line tools to structured JSON output" + homepage "https://github.com/kellyjonbrazil/jc" + url "https://files.pythonhosted.org/packages/1b/da/f6ec6a79f8dea70671f41d7162cfefdfe97e9c5b6c2227c1737183c05cd6/jc-1.25.5.tar.gz" + sha256 "f8ac0e4bc427b0ee8a3bdb07a254cc9df6b6036cd440f6c425e2e519cdbda78a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d283b769ba50e6f01a9771f33f2df071c8dea6f80ddeb3e73e25cae1ca371ab6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d283b769ba50e6f01a9771f33f2df071c8dea6f80ddeb3e73e25cae1ca371ab6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d283b769ba50e6f01a9771f33f2df071c8dea6f80ddeb3e73e25cae1ca371ab6" + sha256 cellar: :any_skip_relocation, sonoma: "de7d28f7e778744293e40308f5e155665433ce7117ce070b857b9f5c0d17b4a1" + sha256 cellar: :any_skip_relocation, ventura: "de7d28f7e778744293e40308f5e155665433ce7117ce070b857b9f5c0d17b4a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "d283b769ba50e6f01a9771f33f2df071c8dea6f80ddeb3e73e25cae1ca371ab6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d283b769ba50e6f01a9771f33f2df071c8dea6f80ddeb3e73e25cae1ca371ab6" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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 "xmltodict" do + url "https://files.pythonhosted.org/packages/50/05/51dcca9a9bf5e1bce52582683ce50980bcadbc4fa5143b9f2b19ab99958f/xmltodict-0.14.2.tar.gz" + sha256 "201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553" + end + + def install + virtualenv_install_with_resources + + man1.install "man/jc.1" + generate_completions_from_executable(bin/"jc", "--bash-comp", shells: [:bash], shell_parameter_format: :none) + generate_completions_from_executable(bin/"jc", "--zsh-comp", shells: [:zsh], shell_parameter_format: :none) + end + + test do + assert_equal "[{\"header1\":\"data1\",\"header2\":\"data2\"}]\n", + pipe_output("#{bin}/jc --csv", "header1, header2\n data1, data2") + end +end diff --git a/Formula/j/jcal.rb b/Formula/j/jcal.rb new file mode 100644 index 0000000000000..cbd6b95e3a97b --- /dev/null +++ b/Formula/j/jcal.rb @@ -0,0 +1,50 @@ +class Jcal < Formula + desc "UNIX-cal-like tool to display Jalali calendar" + homepage "https://savannah.nongnu.org/projects/jcal/" + url "https://download.savannah.gnu.org/releases/jcal/jcal-0.4.1.tar.gz" + sha256 "e8983ecad029b1007edc98458ad13cd9aa263d4d1cf44a97e0a69ff778900caa" + license "GPL-3.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/jcal/" + regex(/href=.*?jcal[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "31377fb6a087e5e70e9ae8a1bc7ac390db8efa860f7a956a759b27e710fe21e2" + sha256 cellar: :any, arm64_sonoma: "45f6803d072d0989897f3f1995abd33b4f1036b8b7921fb9abfa59ee9467df90" + sha256 cellar: :any, arm64_ventura: "199711a3aa65d8d6b5d7ae804e99f0025ad8eb59c77f37d4058566edc6c0d1eb" + sha256 cellar: :any, arm64_monterey: "6f1986d499d27fd07525390066318239e9efdac990a58578ef3fe2147d32563b" + sha256 cellar: :any, arm64_big_sur: "6995c49236be96cf2adcf11cd03a88f46436ca66061de24d087c1c69aa4b9f6c" + sha256 cellar: :any, sonoma: "ec81894b74a70c48921e691f448f6d30e12d04cbfd84d1463d6419464f1cedfc" + sha256 cellar: :any, ventura: "feac90459a79da88e1fc37a090d811e5c76a43cae3f1fc6075c2da8e6a3e3fcb" + sha256 cellar: :any, monterey: "2ebbf3f00eaedd9e2a539af5eab274bc5a1417cf3e7d44d889272bef86c83a79" + sha256 cellar: :any, big_sur: "00a9eec192b14b6b4a442e1268bd7727df19923901d36ca225a32e69477df5de" + sha256 cellar: :any, catalina: "0544ee162b480d5999a312cf721b40007901f964b20edbdd8e062b2e95c64157" + sha256 cellar: :any, mojave: "4274c678ae3c2110c94b474aa56fcbb6b121645f9a91352b7c24bf028750f3d9" + sha256 cellar: :any, high_sierra: "348fdd02ce58859bf75ebe00feaf5c90e1f4f052d531e7667343f4c220d8e7bb" + sha256 cellar: :any, sierra: "d6f50844723751f0de8181f751ffc0912013b518b5ac60777a3ade7e1aaa3179" + sha256 cellar: :any, el_capitan: "4d876e18cb50c7aa31211b60b66e42637ca3c9eeed9c688c1945dc4755977597" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7566343f085ff5aa380a9a52b6ef5299c1b09f6dfc629fdcd9fe1937fb424f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7b67ec668f4880126342f70bb106b66744773ebbe8afc9e11eacf96d5a11108" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + shell_name = OS.mac? ? "/bin/sh" : "/bin/bash" + system shell_name, "autogen.sh" + system "./configure", "--prefix=#{prefix}", + "--disable-debug", + "--disable-dependency-tracking" + system "make" + system "make", "install" + end + + test do + system bin/"jcal", "-y" + system bin/"jdate" + end +end diff --git a/Formula/j/jd.rb b/Formula/j/jd.rb new file mode 100644 index 0000000000000..93891b20e259f --- /dev/null +++ b/Formula/j/jd.rb @@ -0,0 +1,36 @@ +class Jd < Formula + desc "JSON diff and patch" + homepage "https://github.com/josephburnett/jd" + url "https://github.com/josephburnett/jd/archive/refs/tags/v2.2.3.tar.gz" + sha256 "eb15f4eef5d418ef002c388f1c30b5802cea3f30609185ce4d12ef05e5148711" + license "MIT" + head "https://github.com/josephburnett/jd.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b454b956683fdb424faf9d899e9f27a319949ca30cc8629ec297bb86fd231db3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b454b956683fdb424faf9d899e9f27a319949ca30cc8629ec297bb86fd231db3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b454b956683fdb424faf9d899e9f27a319949ca30cc8629ec297bb86fd231db3" + sha256 cellar: :any_skip_relocation, sonoma: "427da10a6b21d60ee3df226cc974018fda3eedd6af251af383f27af80f5253d9" + sha256 cellar: :any_skip_relocation, ventura: "427da10a6b21d60ee3df226cc974018fda3eedd6af251af383f27af80f5253d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "55039aa88fc295cffebda6c27d4a536fc605a4ab10c5ee1570967d0ae6de570c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"a.json").write('{"foo":"bar"}') + (testpath/"b.json").write('{"foo":"baz"}') + (testpath/"c.json").write('{"foo":"baz"}') + expected = <<~EOF + @ ["foo"] + - "bar" + + "baz" + EOF + assert_equal expected, shell_output("#{bin}/jd a.json b.json", 1) + assert_empty shell_output("#{bin}/jd b.json c.json") + end +end diff --git a/Formula/j/jdnssec-tools.rb b/Formula/j/jdnssec-tools.rb new file mode 100644 index 0000000000000..c5747c79d9921 --- /dev/null +++ b/Formula/j/jdnssec-tools.rb @@ -0,0 +1,40 @@ +class JdnssecTools < Formula + desc "Java command-line tools for DNSSEC" + homepage "https://github.com/dblacka/jdnssec-tools" + url "https://github.com/dblacka/jdnssec-tools/releases/download/v0.20/jdnssec-tools-0.20.tar.gz" + sha256 "cddc024726e11e014ff02c04135743f3cb3964ed8fe2487d17544e60230f10d6" + license "LGPL-2.1-or-later" + head "https://github.com/dblacka/jdnssec-tools.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "15408395c8e88ae2baa48cfbe3f2cd2850b6805f8b42fe1613734f6fdc131d3b" + end + + depends_on "openjdk" + + def install + inreplace Dir["bin/*"], /basedir=.*/, "basedir=#{libexec}" + bin.install Dir["bin/*"] + bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix + (libexec/"lib").install Dir["lib/*"] + end + + test do + (testpath/"powerdns.com.key").write <<~EOS + powerdns.com. 10773 IN DNSKEY 257 3 8 (AwEAAb/+pXOZWYQ8mv9WM5dFva8 + WU9jcIUdDuEjldbyfnkQ/xlrJC5zA EfhYhrea3SmIPmMTDimLqbh3/4SMTNPTUF+9+U1vp + NfIRTFadqsmuU9F ddz3JqCcYwEpWbReg6DJOeyu+9oBoIQkPxFyLtIXEPGlQzrynKubn04 + Cx83I6NfzDTraJT3jLHKeW5PVc1ifqKzHz5TXdHHTA7NkJAa0sPcZCoNE 1LpnJI/wcUpRU + iuQhoLFeT1E432GuPuZ7y+agElGj0NnBxEgnHrhrnZW UbULpRa/il+Cr5Taj988HqX9Xdm + 6FjcP4Lbuds/44U7U8du224Q8jTrZ 57Yvj4VDQKc=) + EOS + + assert_match "D4C3D5552B8679FAEEBC317E5F048B614B2E5F607DC57F1553182D49AB2179F7", + shell_output("#{bin}/jdnssec-dstool -d 2 powerdns.com.key") + end +end diff --git a/Formula/j/jdtls.rb b/Formula/j/jdtls.rb new file mode 100644 index 0000000000000..f7140faca6d14 --- /dev/null +++ b/Formula/j/jdtls.rb @@ -0,0 +1,52 @@ +class Jdtls < Formula + include Language::Python::Shebang + + desc "Java language specific implementation of the Language Server Protocol" + homepage "https://github.com/eclipse-jdtls/eclipse.jdt.ls" + url "https://www.eclipse.org/downloads/download.php?file=/jdtls/milestones/1.46.1/jdt-language-server-1.46.1-202504011455.tar.gz" + version "1.46.1" + sha256 "f435fdf6db3aa0d1598ef0f11f80bb20e09e67009001382719c313eff07de02c" + license "EPL-2.0" + version_scheme 1 + + livecheck do + url "https://download.eclipse.org/jdtls/milestones/" + regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "b6038663dbf3eee0cf4affe79abf61cbcea58db60bda32e025fc7482ca4cb5e4" + end + + depends_on "openjdk" + depends_on "python@3.13" + + def install + libexec.install buildpath.glob("*") - buildpath.glob("config*win*") + rewrite_shebang detected_python_shebang, libexec/"bin/jdtls" + (bin/"jdtls").write_env_script libexec/"bin/jdtls", Language::Java.overridable_java_home_env + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + Open3.popen3(bin/"jdtls", "-configuration", testpath/"config", "-data", testpath/"data") 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/j/jdupes.rb b/Formula/j/jdupes.rb new file mode 100644 index 0000000000000..ab1f36bfd0517 --- /dev/null +++ b/Formula/j/jdupes.rb @@ -0,0 +1,53 @@ +class Jdupes < Formula + desc "Duplicate file finder and an enhanced fork of 'fdupes'" + homepage "https://codeberg.org/jbruchon/jdupes" + url "https://codeberg.org/jbruchon/jdupes/archive/v1.28.0.tar.gz" + sha256 "a8f21c04fff5e3ff0a92e8ac76114b2195ed43dc32b84bf343f5256e7ba9cb04" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "be36bdaad3510fc56343d42b0fc7038d9341c4ae9e0ce27cc51f6a793abf5b3a" + sha256 cellar: :any, arm64_sonoma: "994e52bf99877c30b8e1dff40cb68b15107837c98f81f0dc4bae9ac4b7996270" + sha256 cellar: :any, arm64_ventura: "316c3597188922ed828074195528feddb5e1dde7729c5d95171f42cedf12ef3e" + sha256 cellar: :any, arm64_monterey: "f9b2117f8e9af15c7f2daa38462b5eb20c5016698969bc320eb3129faa928ad3" + sha256 cellar: :any, sonoma: "774795c0281215f51a2bd98e1310de9777ff88d44c812c7b4bf747915215aeae" + sha256 cellar: :any, ventura: "a5fae3ac3b3c576f4f5a0b84b2f213251963eee770f94cd486b26f5122dd3513" + sha256 cellar: :any, monterey: "8a2e86e7e6492f65534900bf6dee5bbff26ca910df3db5113b31d9393fccd710" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7e25093e68309582dbad8c1d255f38c74196379ecc77dce91c9c1d8d1e4e744" + sha256 cellar: :any_skip_relocation, x86_64_linux: "efe8c6c3991ddf495a9b1d393818204927ab07da57de6ca47c3177197bded579" + end + + depends_on macos: :catalina # requires aligned_alloc + + resource "libjodycode" do + url "https://codeberg.org/jbruchon/libjodycode.git", + tag: "v3.1.1", + revision: "0dc008e8d95c4899c9fc66fdb3ee5fc029df0470" + end + + def install + ENV.append_to_cflags "-I#{include}" + ENV.append "LDFLAGS", "-L#{lib}" + + resource("libjodycode").stage do + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + system "make", "ENABLE_DEDUPE=1" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + touch "a" + touch "b" + (testpath/"c").write("unique file") + dupes = shell_output("#{bin}/jdupes --zero-match .").strip.split("\n").sort + assert_equal ["./a", "./b"], dupes + end +end diff --git a/Formula/j/jed.rb b/Formula/j/jed.rb new file mode 100644 index 0000000000000..cbf27b08a2976 --- /dev/null +++ b/Formula/j/jed.rb @@ -0,0 +1,64 @@ +class Jed < Formula + desc "Powerful editor for programmers" + homepage "https://www.jedsoft.org/jed/" + url "https://www.jedsoft.org/releases/jed/jed-0.99-19.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/j/jed/jed_0.99.19.orig.tar.gz" + sha256 "5eed5fede7a95f18b33b7b32cb71be9d509c6babc1483dd5c58b1a169f2bdf52" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.jedsoft.org/releases/jed/" + regex(/href=.*?jed.?v?(\d+(?:\.\d+)+(?:-\d+)?)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "fb9ec5628c166beb0d57337b4c0fb126d53b57b2dd310f81dd8fb5e78d231c93" + sha256 arm64_sonoma: "17269b0bce430a0b636c27b6be4ecd349864794d546352a714d2862b5c56bb1f" + sha256 arm64_ventura: "bea3094bb9b2ba88a2b58c29c3b230674187d3b9ac0dbaf86b38495da3b69b2c" + sha256 arm64_monterey: "1ffc68641f689cad733309255377425ffc6acf28d2bafa65dd6cd725489d52e2" + sha256 arm64_big_sur: "0705ef662941dc6f4ebd34eae2fc7c02f640d34ac7edbd53eb1d51384cb7c204" + sha256 sonoma: "184b189be42a01585cba0885dbe541ab9addae589b5e9cf42e19bb05b143dbf3" + sha256 ventura: "cf04039833c1a2f231bf358772e699682547a0193098afd88d32c9a270cd5ffa" + sha256 monterey: "c40801b7807e578cad490de05853fcd73cbb1b5c2a762d6948d99e99fb5d4797" + sha256 big_sur: "9ed592a6977c9df053eb31b380d31d32af3d3963c005e4feadb5402208193bf8" + sha256 catalina: "1b349ce808e1a1a0d2ce8327ef3a68f3ea7678af0bef98c499bbb8d0db9c9a7f" + sha256 mojave: "74df74658f783e6de97ed841b1e2532ead3681c7816d55c52e56d4d5056050b9" + sha256 high_sierra: "b8e8f13a1936067960fd2040019d30fc3cedabba4f5c3c22712990f64e09c752" + sha256 sierra: "caa1269eeac2bd84b2287426c77d501956632f01f92c44605bf8b5d76ab7550a" + sha256 arm64_linux: "a38ab025d8320824a54a21c5c2c7819ddc29f81f6b5b6e60603cfccd279fa635" + sha256 x86_64_linux: "4f1c9d8427fbce7053ed60f13fdcaa4b2dcde1398595d37cfc2fcce4a16669dc" + end + + head do + url "git://git.jedsoft.org/git/jed.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "s-lang" + + def install + args = ["--with-slang=#{Formula["s-lang"].opt_prefix}"] + + if build.head? + cd "autoconf" do + system "make" + end + 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" + ENV.deparallelize + system "make", "install" + end + + test do + (testpath/"test.sl").write "flush (\"Hello, world!\");" + assert_equal "Hello, world!", + shell_output("#{bin}/jed -script test.sl").chomp + end +end diff --git a/Formula/j/jello.rb b/Formula/j/jello.rb new file mode 100644 index 0000000000000..0ad66a96173c2 --- /dev/null +++ b/Formula/j/jello.rb @@ -0,0 +1,30 @@ +class Jello < Formula + include Language::Python::Virtualenv + + desc "Filter JSON and JSON Lines data with Python syntax" + homepage "https://github.com/kellyjonbrazil/jello" + url "https://files.pythonhosted.org/packages/8a/1d/25e13e337f0c5c8076a4fc42db02b726529b611a69d816b71f8d591cf0f5/jello-1.6.0.tar.gz" + sha256 "f0a369b2bd0c1db6cb07abbfd014034c22158c160e3df2a9d55b258bc6fbfa42" + license "MIT" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "43347f90e4a60a965ce88773aad8fc8bebed4a5ee29f20adc7a31d921b5ce507" + end + + depends_on "python@3.13" + + resource "pygments" do + url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + def install + virtualenv_install_with_resources + man1.install "man/jello.1" + end + + test do + assert_equal "1\n", pipe_output("#{bin}/jello _.foo", "{\"foo\":1}") + end +end diff --git a/Formula/j/jellyfish.rb b/Formula/j/jellyfish.rb new file mode 100644 index 0000000000000..672556bfdd333 --- /dev/null +++ b/Formula/j/jellyfish.rb @@ -0,0 +1,44 @@ +class Jellyfish < Formula + desc "Fast, memory-efficient counting of DNA k-mers" + homepage "https://github.com/gmarcais/Jellyfish" + url "https://github.com/gmarcais/Jellyfish/releases/download/v2.3.1/jellyfish-2.3.1.tar.gz" + sha256 "ee032b57257948ca0f0610883099267572c91a635eecbd88ae5d8974c2430fcd" + license any_of: ["BSD-3-Clause", "GPL-3.0-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "5e944e1abeae0a321ff68872f400954fb3ba458043a0a2234e993168ecca40c7" + sha256 cellar: :any, arm64_sonoma: "0417631105929539a2126368a9bc8128eaa1f97ad30819bfc9a9cb72e5313e28" + sha256 cellar: :any, arm64_ventura: "12d4462803ed8c86dde8eb3079fa40f0e921605f484317b2fdbb9ea01ba381c1" + sha256 cellar: :any, arm64_monterey: "e348f51e3326d59d9944bcf7778c876d83aa4e6a5173a8f967e8284751bb5b31" + sha256 cellar: :any, sonoma: "5cea64914e0780caa84ed59a40def3e32711715e5459f4a49b29e9bdcdf374c4" + sha256 cellar: :any, ventura: "55f9ba9cc23d3f238d711973cad51e2db5e9805f2abb9b2c2016ecb183dfd55c" + sha256 cellar: :any, monterey: "ef1f0988a3d81bc9fe2179887d4b49b585f98fdaa130567626c594b3dc92c012" + sha256 cellar: :any_skip_relocation, arm64_linux: "a85634ad3dd7342122d1298e2ff0971e6a0807da1b36c46997a01d25a39bae19" + sha256 cellar: :any_skip_relocation, x86_64_linux: "105fae95b5a56dea674d9e6f97e6dadde81372f86b3c3dc8303548460dfb376e" + end + + depends_on "pkgconf" => :build + depends_on "htslib" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.fa").write <<~EOS + >Homebrew + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + system bin/"jellyfish", "count", "-m17", "-s100M", "-t2", "-C", "test.fa" + assert_match "1 54", shell_output("#{bin}/jellyfish histo mer_counts.jf") + assert_match(/Unique:\s+54/, shell_output("#{bin}/jellyfish stats mer_counts.jf")) + end +end diff --git a/Formula/j/jemalloc.rb b/Formula/j/jemalloc.rb new file mode 100644 index 0000000000000..d9e1ee7f3abf8 --- /dev/null +++ b/Formula/j/jemalloc.rb @@ -0,0 +1,73 @@ +class Jemalloc < Formula + desc "Implementation of malloc emphasizing fragmentation avoidance" + homepage "https://jemalloc.net/" + url "https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2" + sha256 "2db82d1e7119df3e71b7640219b6dfe84789bc0537983c3b7ac4f7189aecfeaa" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e5e0394bcc4feeb5db140387352090773761aebe3ff8ae42faf4990b2360fec6" + sha256 cellar: :any, arm64_sonoma: "f70f02aa2f1b858ed5e5cef84a271efeaaa27e79f266844997aab95daa66a7fa" + sha256 cellar: :any, arm64_ventura: "33e0c3fbe56642e081018a9674df734d34afdc35af7d03f5dd2b484a804555e3" + sha256 cellar: :any, arm64_monterey: "b7ef9abad498e6eb53fb476fde4396fc9ab99a23092ea14bcf576548e198f9bd" + sha256 cellar: :any, arm64_big_sur: "b24e4a9413b347397a10ebc9a7a2d309d88c0f9479c1cdebe6c302acba9a43a9" + sha256 cellar: :any, sonoma: "cb1d95640b85ec863d457722af363119b9a16274ce6f9e968f939fcf85bdd350" + sha256 cellar: :any, ventura: "66b5f3a4c4ad9f7801e6ad2e76d1586e7b57e2cc64b24c2684dd1c2af8bc82f3" + sha256 cellar: :any, monterey: "27ae29c02d718c38ee5f623c3ef08ad3530a6fd3595d16d2ddadd6552bf32c12" + sha256 cellar: :any, big_sur: "72aef17aa140b457400c4f2b74d0473bf1160616c3df7cb8604ac2bf734afea5" + sha256 cellar: :any, catalina: "3f5cf334d16ab432bf210c7e171510d0edcd834f939b57bddfd428af5ed248ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a0c9835c0efd14f2e79a8ce59ef17cd0ba160f50db1f359e4a690b4f43abd6a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "240b20cc078b21d90c32bd34447952b9b464958b1858ae109f168558993f9278" + end + + head do + url "https://github.com/jemalloc/jemalloc.git", branch: "dev" + + depends_on "autoconf" => :build + depends_on "docbook-xsl" => :build + end + + def install + args = %W[ + --disable-debug + --prefix=#{prefix} + --with-jemalloc-prefix= + ] + + if build.head? + args << "--with-xslroot=#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl" + system "./autogen.sh", *args + system "make", "dist" + else + system "./configure", *args + end + + system "make" + # Do not run checks with Xcode 15, they fail because of + # overly eager optimization in the new compiler: + # https://github.com/jemalloc/jemalloc/issues/2540 + # Reported to Apple as FB13209585 + system "make", "check" if DevelopmentTools.clang_build_version < 1500 + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(void) { + + for (size_t i = 0; i < 1000; i++) { + // Leak some memory + malloc(i * 100); + } + + // Dump allocator statistics to stderr + malloc_stats_print(NULL, NULL, NULL); + } + C + system ENV.cc, "test.c", "-L#{lib}", "-ljemalloc", "-o", "test" + system "./test" + end +end diff --git a/Formula/j/jena.rb b/Formula/j/jena.rb new file mode 100644 index 0000000000000..116993a5f52ae --- /dev/null +++ b/Formula/j/jena.rb @@ -0,0 +1,41 @@ +class Jena < Formula + desc "Framework for building semantic web and linked data apps" + homepage "https://jena.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=jena/binaries/apache-jena-5.4.0.tar.gz" + mirror "https://archive.apache.org/dist/jena/binaries/apache-jena-5.4.0.tar.gz" + sha256 "290a0128f01eb4a237c925afb119f9cabb5fe53e657568aa286ad10caf0eff84" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "00ea7c0c9ed0be99c6b6fa7d69317494ba642b4ad7b68b728d75f75e744018cd" + end + + depends_on "openjdk" + + conflicts_with "pwntools", because: "both install `update` binaries" + conflicts_with "samba", because: "both install `tdbbackup` binaries" + conflicts_with "tdb", because: "both install `tdbbackup`, `tdbdump` binaries" + + def install + env = { + JAVA_HOME: Formula["openjdk"].opt_prefix, + JENA_HOME: libexec, + } + + rm_r("bat") # Remove Windows scripts + + 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 + + test do + system bin/"sparql", "--version" + end +end diff --git a/Formula/j/jenkins-cli.rb b/Formula/j/jenkins-cli.rb new file mode 100644 index 0000000000000..f8de67232d3bb --- /dev/null +++ b/Formula/j/jenkins-cli.rb @@ -0,0 +1,47 @@ +class JenkinsCli < Formula + desc "CLI for jenkins" + homepage "https://github.com/jenkins-zh/jenkins-cli" + url "https://github.com/jenkins-zh/jenkins-cli/archive/refs/tags/v0.0.47.tar.gz" + sha256 "4e78600e214c357c08a0a83fe9cc59214b0d050de07dbb469d9f226c8c37eabc" + license "MIT" + head "https://github.com/jenkins-zh/jenkins-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "85ed47aaf4a16751608eef650d8b7cab3e8af8c8133ed82bf6a7305004adb110" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "85ed47aaf4a16751608eef650d8b7cab3e8af8c8133ed82bf6a7305004adb110" + sha256 cellar: :any_skip_relocation, arm64_ventura: "85ed47aaf4a16751608eef650d8b7cab3e8af8c8133ed82bf6a7305004adb110" + sha256 cellar: :any_skip_relocation, sonoma: "61397dd36ee2b9195bbef96430a8aed787a0a38e733ed397c425400e03304848" + sha256 cellar: :any_skip_relocation, ventura: "61397dd36ee2b9195bbef96430a8aed787a0a38e733ed397c425400e03304848" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b253ad3ba372e8bf59b0724c656e5ce77b8b522cd9651e731aaea6d846309e78" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/linuxsuren/cobra-extension/version.version=#{version} + -X github.com/linuxsuren/cobra-extension/version.commit=#{tap.user} + -X github.com/linuxsuren/cobra-extension/version.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"jcli") + + generate_completions_from_executable(bin/"jcli", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/jcli version") + + (testpath/".jenkins-cli.yaml").write <<~EOS + current: default + configurations: + default: + url: http://localhost:8080 + username: admin + token: admin + EOS + + assert_equal "Name URL Description", shell_output("#{bin}/jcli config list").chomp + assert_match "Cannot found Jenkins", shell_output("#{bin}/jcli plugin list 2>&1", 1) + end +end diff --git a/Formula/j/jenkins-job-builder.rb b/Formula/j/jenkins-job-builder.rb new file mode 100644 index 0000000000000..33ba3987504e3 --- /dev/null +++ b/Formula/j/jenkins-job-builder.rb @@ -0,0 +1,117 @@ +class JenkinsJobBuilder < Formula + include Language::Python::Virtualenv + + desc "Configure Jenkins jobs with YAML files stored in Git" + homepage "https://docs.openstack.org/infra/jenkins-job-builder/" + url "https://files.pythonhosted.org/packages/0d/a9/0ae4ef563aae6bfe21f316f4915b05e4b2c0edbb63b17eac9ed9398630df/jenkins-job-builder-6.4.2.tar.gz" + sha256 "1be0d545dea8dc6c13745367264a2d22276bc5ec496527600865d30382a72490" + license "Apache-2.0" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "466d288ce985277fabc03dc07dcf8a14bdfd1e938caab7a85bd9c3753103bd25" + sha256 cellar: :any, arm64_sonoma: "e5a926b49ab3229738c88e48238ac4bc8044a38661d77c9d7e35eaf379c88e19" + sha256 cellar: :any, arm64_ventura: "bb40c3437843345877eaa8855552e404d01de9b79864cfdc31eea072e0bc1d7d" + sha256 cellar: :any, sonoma: "7fd8695bedd1e037d7a4a15c51ff31fba6415830471dfc69c4035073b5847816" + sha256 cellar: :any, ventura: "00617cf898606deaa7e7859c3b6b015b6fadbeb8b096f37f962cf79f6422420e" + sha256 cellar: :any_skip_relocation, arm64_linux: "34b0e66ad76aedc5b9c813ebb7ce8840611eb9a011afb3ae75cb71b750a36216" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13ff9e3be7f4ff98f0ca825084a4737fb4b5ad8c07caaa5a9f42f38c7e72ad96" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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 "multi-key-dict" do + url "https://files.pythonhosted.org/packages/6d/97/2e9c47ca1bbde6f09cb18feb887d5102e8eacd82fbc397c77b221f27a2ab/multi_key_dict-2.0.3.tar.gz" + sha256 "deebdec17aa30a1c432cb3f437e81f8621e1c0542a0c0617a74f71e232e9939e" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/01/d2/510cc0d218e753ba62a1bc1434651db3cd797a9716a0a66cc714cb4f0935/pbr-6.1.1.tar.gz" + sha256 "93ea72ce6989eb2eed99d0f75721474f69ad88128afdef5ac377eb797c4bf76b" + end + + resource "python-jenkins" do + url "https://files.pythonhosted.org/packages/45/ac/2bc1d844609302f7f907594961ffba7d6edd5848705f958683a9c2d87901/python-jenkins-1.8.2.tar.gz" + sha256 "56e7dabb0607bdb8e1d6fc6d2d4301abedbed9165da2b206facbd3071cb6eecb" + 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 "setuptools" do + url "https://files.pythonhosted.org/packages/d1/53/43d99d7687e8cdef5ab5f9ec5eaf2c0423c2b35133a2b7e7bc276fc32b21/setuptools-75.8.2.tar.gz" + sha256 "4880473a969e5f23f2a2be3646b2dfd84af9028716d398e46192f84bc36900d2" + 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/28/3f/13cacea96900bbd31bb05c6b74135f85d15564fc583802be56976c940470/stevedore-5.4.1.tar.gz" + sha256 "3135b5ae50fe12816ef291baff420acb727fcd356106e3e9cbfa9e5985cd6f4b" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + virtualenv_install_with_resources + end + + test do + command = "#{bin}/jenkins-jobs test /dev/stdin 2>&1" + if OS.mac? + output = pipe_output(command, "- job: { name: test-job }", 0) + assert_match "Managed by Jenkins Job Builder", output + else + output = pipe_output(command, "- job: { name: test-job }", 1) + assert_match "WARNING:jenkins_jobs.config:Config file", output + end + + output = shell_output("#{bin}/jenkins-jobs --version") + assert_match "Jenkins Job Builder version: #{version}", output + end +end diff --git a/Formula/j/jenkins-lts.rb b/Formula/j/jenkins-lts.rb new file mode 100644 index 0000000000000..c6062f6869167 --- /dev/null +++ b/Formula/j/jenkins-lts.rb @@ -0,0 +1,50 @@ +class JenkinsLts < Formula + desc "Extendable open source continuous integration server" + homepage "https://www.jenkins.io/" + url "https://get.jenkins.io/war-stable/2.504.1/jenkins.war" + sha256 "81026db18b0c4aad6b62cf408e4c42e5797661b41c517b37df606238e89b9df1" + license "MIT" + + livecheck do + url "https://www.jenkins.io/download/" + regex(%r{href=.*?/war-stable/v?(\d+(?:\.\d+)+)/jenkins\.war}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "4e7ca4c87b1b50fcb03bb35f62b7a0c008d631d97e4011e5de52d0194a601251" + end + + depends_on "openjdk@21" + + def install + system "#{Formula["openjdk@21"].opt_bin}/jar", "xvf", "jenkins.war" + libexec.install "jenkins.war", "WEB-INF/lib/cli-#{version}.jar" + bin.write_jar_script libexec/"jenkins.war", "jenkins-lts", java_version: "21" + bin.write_jar_script libexec/"cli-#{version}.jar", "jenkins-lts-cli", java_version: "21" + end + + def caveats + <<~EOS + Note: When using launchctl the port will be 8080. + EOS + end + + service do + run [Formula["openjdk@21"].opt_bin/"java", "-Dmail.smtp.starttls.enable=true", "-jar", opt_libexec/"jenkins.war", + "--httpListenAddress=127.0.0.1", "--httpPort=8080"] + end + + test do + ENV["JENKINS_HOME"] = testpath + ENV.prepend "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}" + + port = free_port + fork do + exec "#{bin}/jenkins-lts --httpPort=#{port}" + end + sleep 60 + + output = shell_output("curl localhost:#{port}/") + assert_match(/Welcome to Jenkins!|Unlock Jenkins|Authentication required/, output) + end +end diff --git a/Formula/j/jenkins.rb b/Formula/j/jenkins.rb new file mode 100644 index 0000000000000..8a918adad6e1c --- /dev/null +++ b/Formula/j/jenkins.rb @@ -0,0 +1,63 @@ +class Jenkins < Formula + desc "Extendable open source continuous integration server" + homepage "https://www.jenkins.io/" + url "https://get.jenkins.io/war/2.510/jenkins.war" + sha256 "d927b218f024395fe341cbb7296ee40687ca5e5fba2866284ebf40aa9d1fefec" + license "MIT" + + livecheck do + url "https://www.jenkins.io/download/" + regex(%r{href=.*?/war/v?(\d+(?:\.\d+)+)/jenkins\.war}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "3b909f98b24ae1acaf23a0a5080bfe0e428ce0bc96632f7fc32b2d72f4f9e78f" + end + + head do + url "https://github.com/jenkinsci/jenkins.git", branch: "master" + depends_on "maven" => :build + end + + depends_on "openjdk@21" + + def install + if build.head? + system "mvn", "clean", "install", "-pl", "war", "-am", "-DskipTests" + else + system "#{Formula["openjdk@21"].opt_bin}/jar", "xvf", "jenkins.war" + end + libexec.install Dir["**/jenkins.war", "**/cli-#{version}.jar"] + bin.write_jar_script libexec/"jenkins.war", "jenkins", java_version: "21" + bin.write_jar_script libexec/"cli-#{version}.jar", "jenkins-cli", java_version: "21" + + (var/"log/jenkins").mkpath + end + + def caveats + <<~EOS + Note: When using launchctl the port will be 8080. + EOS + end + + service do + run [opt_bin/"jenkins", "--httpListenAddress=127.0.0.1", "--httpPort=8080"] + keep_alive true + log_path var/"log/jenkins/output.log" + error_log_path var/"log/jenkins/error.log" + end + + test do + ENV["JENKINS_HOME"] = testpath + ENV.prepend "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}" + + port = free_port + fork do + exec "#{bin}/jenkins --httpPort=#{port}" + end + sleep 60 + + output = shell_output("curl localhost:#{port}/") + assert_match(/Welcome to Jenkins!|Unlock Jenkins|Authentication required/, output) + end +end diff --git a/Formula/j/jenv.rb b/Formula/j/jenv.rb new file mode 100644 index 0000000000000..5e040ba34f25c --- /dev/null +++ b/Formula/j/jenv.rb @@ -0,0 +1,31 @@ +class Jenv < Formula + desc "Manage your Java environment" + homepage "https://www.jenv.be/" + url "https://github.com/jenv/jenv/archive/refs/tags/0.5.7.tar.gz" + sha256 "5865f7839eda303467fb1ad3dfb606b31566001beeb05360f653905346c2624f" + license "MIT" + head "https://github.com/jenv/jenv.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "35224b1400c377abd56e99f5e6caec0b48672a935cd3eb250046cf5ab107948e" + end + + def install + libexec.install Dir["*"] + bin.write_exec_script libexec/"bin/jenv" + fish_function.install_symlink Dir[libexec/"fish/*.fish"] + end + + def caveats + <<~EOS + To activate jenv, add the following to your shell profile e.g. ~/.profile + or ~/.zshrc: + export PATH="$HOME/.jenv/bin:$PATH" + eval "$(jenv init -)" + EOS + end + + test do + shell_output("eval \"$(#{bin}/jenv init -)\" && jenv versions") + end +end diff --git a/Formula/j/jerm.rb b/Formula/j/jerm.rb new file mode 100644 index 0000000000000..6907a228f8651 --- /dev/null +++ b/Formula/j/jerm.rb @@ -0,0 +1,36 @@ +class Jerm < Formula + desc "Communication terminal through serial and TCP/IP interfaces" + homepage "https://web.archive.org/web/20160719014241/bsddiary.net/jerm/" + url "https://web.archive.org/web/20160719014241/bsddiary.net/jerm/jerm-8096.tar.gz" + mirror "https://dotsrc.dl.osdn.net/osdn/fablib/62057/jerm-8096.tar.gz" + version "0.8096" + sha256 "8a63e34a2c6a95a67110a7a39db401f7af75c5c142d86d3ba300a7b19cbcf0e9" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "584ce1292fc18f70a010cd4bc311630e44113232c7ab10b30b24c90e2c967e32" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "96b7c79c29b63fe4f2819bb547c97c77d870aedc601d90e5e92a6b6657d89b45" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5e46c7e764bb5fe86fb48dda5fe2b9f03624357f726c93399f5752ff5f6ee60b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c94b2dab39c4117d7099e34eb303fb3477247163b37d19b7601348cb7917d315" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3aeeab223b7e4375ecd06ff91d422d7e00981501f09ad448b7c99f74bdc571d0" + sha256 cellar: :any_skip_relocation, sonoma: "5d1ca7129e6eb221c5a83ab2a5f631be2d9acf0a7aa1897fd1f481924373497e" + sha256 cellar: :any_skip_relocation, ventura: "d577776b3f4fe4763f65dd44608660703ba446404125d5f645f16c727251898c" + sha256 cellar: :any_skip_relocation, monterey: "7d90c12f4c72c6d13fb1f5eac37ddf2c1f92db2781b16c666e84fa90e3a58a7c" + sha256 cellar: :any_skip_relocation, big_sur: "15802029e8244b41d39836347f57e0f7020b06a7a8463ffece0b418a28b28050" + sha256 cellar: :any_skip_relocation, catalina: "679f37e7f92c4eb64a0c94e11e8fc1bdc1b28f3bb7fbefafc38a955318d2f03d" + sha256 cellar: :any_skip_relocation, mojave: "3141c6a52da59f5b0ee5cb514fc797b5979e4ddb4e71b36f56c133ff5311dce8" + sha256 cellar: :any_skip_relocation, high_sierra: "dd2a0ae44a1aa671a62ccc7461e7550df48d656beeac35b7bc61c732350ece3b" + sha256 cellar: :any_skip_relocation, sierra: "ee9a8a2e559bf9ab82ba413e8741759fed6d59cfe82a063c82b72b81a56cfe5e" + sha256 cellar: :any_skip_relocation, el_capitan: "5c8409bfdeba7b55199659f4b82b8df9ec2ca8685435703bf1ddff29f9e027e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "5179ab5a7d5299398a5c70934bf177a1537dbd4f05db4f37be578978f056e379" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2396a1d6257e20a5115a14f270c4c4039b91a3f9fd86fb8ad8437735bd98869d" + end + + deprecate! date: "2024-07-03", because: :repo_removed + + def install + system "make", "all" + bin.install %w[jerm tiocdtr] + man1.install Dir["*.1"] + end +end diff --git a/Formula/j/jerryscript.rb b/Formula/j/jerryscript.rb new file mode 100644 index 0000000000000..a82b7c3425e41 --- /dev/null +++ b/Formula/j/jerryscript.rb @@ -0,0 +1,70 @@ +class Jerryscript < Formula + desc "Ultra-lightweight JavaScript engine for the Internet of Things" + homepage "https://jerryscript.net/" + url "https://github.com/jerryscript-project/jerryscript/archive/refs/tags/v3.0.0.tar.gz" + sha256 "4d586d922ba575d95482693a45169ebe6cb539c4b5a0d256a6651a39e47bf0fc" + license "Apache-2.0" + head "https://github.com/jerryscript-project/jerryscript.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2c9278894af0e7dd27da2735af8ed66408de529fe2b896c9308ff2ffe10b695e" + sha256 cellar: :any, arm64_sonoma: "de8fb8e81f6cc123a414bd905c7f3d0da65f88b35d533a3cda511f88fcbef0dc" + sha256 cellar: :any, arm64_ventura: "54b1c8bc94bc0c5f125e8f7ebab191540df56987dfc2e1a58c61ac6a5e25d2a9" + sha256 cellar: :any, sonoma: "28aa15489cdb4c63a3ca8dcabeb18bbf0937d16d7e627a19a3376936e2f1adbb" + sha256 cellar: :any, ventura: "2426c72ce0d91dd244fc0a4eb59a4912d6c753f090707a71367f9dd36f503751" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e969a7aa188293a61c458794e5673f6bc1012c48badcaeddfccb379bcc84e80" + sha256 cellar: :any_skip_relocation, x86_64_linux: "700fa052538ab63fbaa0c9f8fda9ec3491777d6a65c4698e7ad488297bbbadcf" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + + # rpath patch, upstream pr ref, https://github.com/jerryscript-project/jerryscript/pull/5204 + patch do + url "https://github.com/jerryscript-project/jerryscript/commit/e8948ac3f34079ac6f3d6f47f8998b82f16b1621.patch?full_index=1" + sha256 "ebce75941e1f34118fed14e317500b0ab69f48182ba9cce8635e9f62fe9aa4d1" + end + + def install + args = %w[ + -DCMAKE_BUILD_TYPE=MinSizeRel + -DJERRY_CMDLINE=ON + -DBUILD_SHARED_LIBS=ON + ] + + system "cmake", "-S", ".", "-B", ".", *args, *std_cmake_args + system "cmake", "--build", "." + system "cmake", "--install", "." + end + + test do + (testpath/"test.js").write "print('Hello, Homebrew!');" + assert_equal "Hello, Homebrew!", shell_output("#{bin}/jerry test.js").strip + + (testpath/"test.c").write <<~C + #include + #include "jerryscript.h" + + int main (void) + { + const jerry_char_t script[] = "1 + 2"; + const jerry_length_t script_size = sizeof(script) - 1; + + jerry_init(JERRY_INIT_EMPTY); + jerry_value_t eval_ret = jerry_eval(script, script_size, JERRY_PARSE_NO_OPTS); + bool run_ok = !jerry_value_is_error(eval_ret); + if (run_ok) { + printf("1 + 2 = %d\\n", (int) jerry_value_as_number(eval_ret)); + } + + jerry_value_free(eval_ret); + jerry_cleanup(); + return (run_ok ? 0 : 1); + } + C + + pkg_config_flags = shell_output("pkgconf --cflags --libs libjerry-core libjerry-port libjerry-ext").chomp.split + system ENV.cc, "test.c", "-o", "test", *pkg_config_flags + assert_equal "1 + 2 = 3", shell_output("./test").strip, "JerryScript can add number" + end +end diff --git a/Formula/j/jet.rb b/Formula/j/jet.rb new file mode 100644 index 0000000000000..1a9dd062168bb --- /dev/null +++ b/Formula/j/jet.rb @@ -0,0 +1,29 @@ +class Jet < Formula + desc "Type safe SQL builder with code generation and auto query result data mapping" + homepage "https://github.com/go-jet/jet" + url "https://github.com/go-jet/jet/archive/refs/tags/v2.13.0.tar.gz" + sha256 "c894001609443aa970cf19744e1cfe968eddc9bdb42b5fa29944842a5309c02b" + license "Apache-2.0" + head "https://github.com/go-jet/jet.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6bc8620eb569a95d635d373a9e4aba5a5701cb3e65f01be861c487113e8320c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b6470f69cfe07e82ff68c810ae85a2f38cac94879cedd617ebefdc3609a875e9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a3b7a7b6d1e9ab19982340dc4b6057f055168dd0f5366ffa6acdd3a6fafd2ec" + sha256 cellar: :any_skip_relocation, sonoma: "6a605164b15e304d64a64330e9efe19f8310a83e1820bceebf011de1a0a7eccb" + sha256 cellar: :any_skip_relocation, ventura: "a2f0f05fe960b81a9a9c94045714607f094f3b212a8455fa7c707075c62906c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "c738afe099cb763de8c2c7ce03c6286e84b5765fbf99b4debc0e24bc7b7fc1d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "047e7b158e3854c321f6df0e440a8fc3173ecf583293d716c131c22ecc5e03d7" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/jet" + end + + test do + cmd = "#{bin}/jet -source=mysql -host=localhost -port=3306 -user=jet -password=jet -dbname=jetdb -path=./gen 2>&1" + assert_match "connection refused", shell_output(cmd, 2) + end +end diff --git a/Formula/j/jetty-runner.rb b/Formula/j/jetty-runner.rb new file mode 100644 index 0000000000000..969776768d960 --- /dev/null +++ b/Formula/j/jetty-runner.rb @@ -0,0 +1,42 @@ +class JettyRunner < Formula + desc "Use Jetty without an installed distribution" + homepage "https://jetty.org/" + url "https://search.maven.org/remotecontent?filepath=org/eclipse/jetty/jetty-runner/11.0.25/jetty-runner-11.0.25.jar" + sha256 "40549bd12c0b8818ad1c93e588d3482f9f110a182405684563f5d4e381958993" + license any_of: ["Apache-2.0", "EPL-1.0"] + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/eclipse/jetty/jetty-runner/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+(?:[._-]v?\d+)?)}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "15aef216430d1b1c1a0d7823e12102cf7a8d5b1974bb8611ee6bbc3363394844" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + bin.write_jar_script libexec/"jetty-runner-#{version}.jar", "jetty-runner" + end + + test do + ENV.append "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}" + touch "#{testpath}/test.war" + + port = free_port + pid = fork do + exec "#{bin}/jetty-runner --port #{port} test.war" + end + sleep 10 + + begin + output = shell_output("curl -I http://localhost:#{port}") + assert_match %r{HTTP/1\.1 200 OK}, output + ensure + Process.kill 9, pid + Process.wait pid + end + end +end diff --git a/Formula/j/jetty.rb b/Formula/j/jetty.rb new file mode 100644 index 0000000000000..9c9066424b9ea --- /dev/null +++ b/Formula/j/jetty.rb @@ -0,0 +1,100 @@ +class Jetty < Formula + desc "Java servlet engine and webserver" + homepage "https://jetty.org/" + url "https://search.maven.org/remotecontent?filepath=org/eclipse/jetty/jetty-distribution/9.4.57.v20241219/jetty-distribution-9.4.57.v20241219.tar.gz" + version "9.4.57.v20241219" + sha256 "1cfc73128848282f1f7220660fc191be09b6a1c184e02587c46f189212ed9681" + license any_of: ["Apache-2.0", "EPL-1.0"] + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/eclipse/jetty/jetty-distribution/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+(?:[._-]v?\d+)?)}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "7e7c790eaeadb9bd6e0ef648117963620bc9515c80a46285206c9c409a3e879a" + sha256 cellar: :any, arm64_sonoma: "601f49357f56efe738abdd75c5d08e180c953fbdde53b84c0d5e99709a89ff94" + sha256 cellar: :any, arm64_ventura: "9856be3e6041b17203fe6053cd0740fe906b7f8f0a41d4042e2d3539b69dc787" + sha256 cellar: :any, sonoma: "4168e1d01e872605f106067c547b1bcf78354df0975d5937571d911658135ca0" + sha256 cellar: :any, ventura: "4168e1d01e872605f106067c547b1bcf78354df0975d5937571d911658135ca0" + sha256 cellar: :any_skip_relocation, arm64_linux: "a9dbbb51964c592d7b53a3aefb6ab3ced9dd94bcfbcf00277a80a97322889b0b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8b9972b6503efa46f902c552d6760d9196a9f1d136ca2d1d37238f9a9e82c15" + end + + depends_on "openjdk" + + on_arm do + depends_on "maven" => :build + + # We get jetty-setuid source code from the jetty.toolchain repo to build a native ARM binary. + # The last jetty-setuid-1.0.4 release has some issues building, so we pick a more recent commit. + # The particular commit was selected as it aligned to jetty version at time of PR. + # Once 1.0.5 is available, we can switch to stable versions. Afterward, the version should + # probably match the jetty-setuid version that is included with jetty. + resource "jetty.toolchain" do + url "https://github.com/eclipse/jetty.toolchain/archive/ce0f110e0b95baf85775897aa90f5b6c0cc6cd4d.tar.gz" + sha256 "9a19e7f3c947bbc1979cfef1f8dfc038fb0df4aa518396b9b84b44c69b79332f" + + # Fix header paths on macOS to follow modern JDKs rather than old system Java. + # PR ref: https://github.com/eclipse/jetty.toolchain/pull/211 + patch do + url "https://github.com/eclipse/jetty.toolchain/commit/4c3744d79f414f43fe45636fdabd5595f17daab6.patch?full_index=1" + sha256 "6a7f3f16f7fb5f3d8ccf1562612da0d1091049bbafa4a0bf2ff0754551743312" + end + end + end + + def install + libexec.install Dir["*"] + (libexec/"logs").mkpath + + env = Language::Java.overridable_java_home_env + env["JETTY_HOME"] = libexec + Dir.glob(libexec/"bin/*.sh") do |f| + (bin/File.basename(f, ".sh")).write_env_script f, env + end + return if Hardware::CPU.intel? + + # We build a native ARM libsetuid to enable Jetty's SetUID feature. + # https://www.eclipse.org/jetty/documentation/jetty-9/index.html#configuring-jetty-setuid-feature + libexec.glob("lib/setuid/libsetuid-*.so").map(&:unlink) + resource("jetty.toolchain").stage do + cd "jetty-setuid" + system "mvn", "clean", "install", "-Penv-#{OS.mac? ? "mac" : "linux"}" + libsetuid = "libsetuid-#{OS.mac? ? "osx" : "linux"}" + (libexec/"lib/setuid").install "#{libsetuid}/target/#{libsetuid}.so" + end + end + + test do + http_port = free_port + ENV["JETTY_ARGS"] = "jetty.http.port=#{http_port} jetty.ssl.port=#{free_port}" + ENV["JETTY_BASE"] = testpath + ENV["JETTY_RUN"] = testpath + cp_r Dir[libexec/"demo-base/*"], testpath + + log = testpath/"jetty.log" + pid = fork do + $stdout.reopen(log) + $stderr.reopen(log) + exec bin/"jetty", "run" + end + + begin + sleep 20 # grace time for server start + assert_match "webapp is deployed. DO NOT USE IN PRODUCTION!", log.read + assert_match "Welcome to Jetty #{version.major}", shell_output("curl --silent localhost:#{http_port}") + ensure + Process.kill 9, pid + Process.wait pid + end + + # Do a basic check that SetUID can run native library. Actually running command + # requires creating a separate user account and running with sudo + java = Formula["openjdk"].opt_bin/"java" + system java, "-jar", libexec/"start.jar", "--add-to-start=setuid" + output = shell_output("#{java} -Djava.library.path=#{libexec}/lib/setuid -jar #{libexec}/start.jar 2>&1", 254) + refute_match "java.lang.UnsatisfiedLinkError", output + assert_match "User jetty is not found", output + end +end diff --git a/Formula/j/jflex.rb b/Formula/j/jflex.rb new file mode 100644 index 0000000000000..af3f50925cf31 --- /dev/null +++ b/Formula/j/jflex.rb @@ -0,0 +1,30 @@ +class Jflex < Formula + desc "Lexical analyzer generator for Java, written in Java" + homepage "https://jflex.de/" + url "https://github.com/jflex-de/jflex/releases/download/v1.9.1/jflex-1.9.1.tar.gz" + sha256 "e0c1e9eef91ff6df04d73fa5eaff13f3a02b679fee1474e5ccae007224df6df6" + license "BSD-3-Clause" + + livecheck do + url "https://jflex.de/download.html" + regex(/href=.*?jflex[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0e6a95ad6f0aa8fbe269ef4f17eb27227c43456e925a39baafa5bca7e25c151f" + end + + depends_on "openjdk" + + def install + pkgshare.install "examples" + libexec.install "lib/jflex-full-#{version}.jar" => "jflex-#{version}.jar" + bin.write_jar_script libexec/"jflex-#{version}.jar", "jflex" + end + + test do + system bin/"jflex", "-d", testpath, pkgshare/"examples/cup-java/src/main/jflex/java.flex" + assert_match "public static void", (testpath/"Scanner.java").read + end +end diff --git a/Formula/j/jfrog-cli.rb b/Formula/j/jfrog-cli.rb new file mode 100644 index 0000000000000..d3ef42f8cd51d --- /dev/null +++ b/Formula/j/jfrog-cli.rb @@ -0,0 +1,43 @@ +class JfrogCli < Formula + desc "Command-line interface for JFrog products" + homepage "https://www.jfrog.com/confluence/display/CLI/JFrog+CLI" + url "https://github.com/jfrog/jfrog-cli/archive/refs/tags/v2.75.1.tar.gz" + sha256 "ec3e9e87d89163afbeaaf4019510c24db3b9614599e4ff45a7af1d60cb015a48" + license "Apache-2.0" + head "https://github.com/jfrog/jfrog-cli.git", branch: "v2" + + # 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_sequoia: "2bd715f6e84a63cb4fb1c8709f9d37d6aa2b4c17c92c5ca2c72df5af75924fd4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2bd715f6e84a63cb4fb1c8709f9d37d6aa2b4c17c92c5ca2c72df5af75924fd4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2bd715f6e84a63cb4fb1c8709f9d37d6aa2b4c17c92c5ca2c72df5af75924fd4" + sha256 cellar: :any_skip_relocation, sonoma: "409623dbbae34169b7e14c8ea2d3c146227f73c7df2cc85f2dc4c422e442e02c" + sha256 cellar: :any_skip_relocation, ventura: "409623dbbae34169b7e14c8ea2d3c146227f73c7df2cc85f2dc4c422e442e02c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5299524cc36404cf42b169e1b8bb8d335d3843d70c2d7cdcd18083cf9e3a6f3" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"jf") + bin.install_symlink "jf" => "jfrog" + + generate_completions_from_executable(bin/"jf", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/jf -v") + assert_match version.to_s, shell_output("#{bin}/jfrog -v") + with_env(JFROG_CLI_REPORT_USAGE: "false", CI: "true") do + assert_match "build name must be provided in order to generate build-info", + shell_output("#{bin}/jf rt bp --dry-run --url=http://127.0.0.1 2>&1", 1) + end + end +end diff --git a/Formula/j/jhead.rb b/Formula/j/jhead.rb new file mode 100644 index 0000000000000..01ad709b98c4e --- /dev/null +++ b/Formula/j/jhead.rb @@ -0,0 +1,31 @@ +class Jhead < Formula + desc "Extract Digicam setting info from EXIF JPEG headers" + homepage "https://github.com/Matthias-Wandel/jhead" + url "https://github.com/Matthias-Wandel/jhead/archive/refs/tags/3.08.tar.gz" + sha256 "999a81b489c7b2a7264118f194359ecf4c1b714996a2790ff6d5d2f3940f1e9f" + license :public_domain + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "891f4ab79df46ae9c29264f4cedff94944b4864c60db72d0e22ee015a381f3dc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "71ace969a83c578f9c0c891286904fed354829f5cb0a44f9314e0d75972e615a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "355d4bae9c9af01078c7c52425ab63e562d6b648c070b0a80e7504367fad0be6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8e1b0e10fee8f443caaa68cb131a4f1e073e006a1f944b07d58caae3320e6e82" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "995000c4bad760394f3f48b3147ae6b9daee454c0b61d93ce24d9212d72b7aee" + sha256 cellar: :any_skip_relocation, sonoma: "7727656b5e0ea923e453169baa7231383c37b737c4db88efc621b5593184283c" + sha256 cellar: :any_skip_relocation, ventura: "1507b2155ce500002fc776d8c336cc687cb515d0186bd1a1f2215ca4361e17c8" + sha256 cellar: :any_skip_relocation, monterey: "8c2f978dcaaad8d009b1b700dece3f9f06f74bb1139f0223883e7e4683a3de10" + sha256 cellar: :any_skip_relocation, big_sur: "c05e7a3d19073edea0839214f4b35cc892b8b9fcaf74d589e16dcf3fd31dabe3" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c46927009697d53acc508449ef4b8127be41cb030a7e0fddb15561fff516b88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d662d7006eb88363b9c973252bc744915503dafa662ef2dc75d1892918101cc2" + end + + def install + ENV.deparallelize + system "make", "install", "PREFIX=#{prefix}" + end + + test do + cp test_fixtures("test.jpg"), testpath + system bin/"jhead", "-autorot", "test.jpg" + end +end diff --git a/Formula/j/jhiccup.rb b/Formula/j/jhiccup.rb new file mode 100644 index 0000000000000..b425bcf20f4a4 --- /dev/null +++ b/Formula/j/jhiccup.rb @@ -0,0 +1,40 @@ +class Jhiccup < Formula + desc "Measure pauses and stalls of an app's Java runtime platform" + homepage "https://www.azul.com/products/components/jhiccup/" + url "https://www.azul.com/files/jHiccup-2.0.10-dist.zip" + sha256 "7bb1145d211d140b4f81184df7eb9cea90f56720ad7504fac43c0c398f38a7d8" + license any_of: ["CC0-1.0", "BSD-2-Clause"] + + livecheck do + url :homepage + regex(/href=.*?jHiccup[._-]v?(\d+(?:\.\d+)+)-dist(?:-\d+)?\.zip/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "010529211ca43ed531a37e60a1c33ee7a38b823038d204992713461c4ef4b56c" + end + + def install + bin.install "jHiccup", "jHiccupLogProcessor" + + # Simple script to create and open a new plotter spreadsheet + (bin+"jHiccupPlotter").write <<~EOS + #!/bin/sh + TMPFILE="/tmp/jHiccupPlotter.$$.xls" + cp "#{prefix}/jHiccupPlotter.xls" $TMPFILE + open $TMPFILE + EOS + + prefix.install "jHiccup.jar" + prefix.install "jHiccupPlotter.xls" + inreplace "#{bin}/jHiccup" do |s| + s.gsub!(/^JHICCUP_JAR_FILE=.*$/, + "JHICCUP_JAR_FILE=#{prefix}/jHiccup.jar") + end + end + + test do + assert_match "CSV", shell_output("#{bin}/jHiccup -h", 255) + end +end diff --git a/Formula/j/jhipster.rb b/Formula/j/jhipster.rb new file mode 100644 index 0000000000000..bf2049a3ff413 --- /dev/null +++ b/Formula/j/jhipster.rb @@ -0,0 +1,34 @@ +class Jhipster < Formula + desc "Generate, develop and deploy Spring Boot + Angular/React applications" + homepage "https://www.jhipster.tech/" + url "https://registry.npmjs.org/generator-jhipster/-/generator-jhipster-8.11.0.tgz" + sha256 "6b78675f33769a5581b716bebbeb8ef651e0be1a93c5010478cf9d7b0c1a0c1e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b542ed1ef9eeb700b746105c2a49eaba3395328332796085f3ea15d7352ae900" + sha256 cellar: :any, arm64_sonoma: "b542ed1ef9eeb700b746105c2a49eaba3395328332796085f3ea15d7352ae900" + sha256 cellar: :any, arm64_ventura: "b542ed1ef9eeb700b746105c2a49eaba3395328332796085f3ea15d7352ae900" + sha256 cellar: :any, sonoma: "0398b0c32194ef0283ab8f10c82b6b21b78bd83973eb792f34db42788c91ee51" + sha256 cellar: :any, ventura: "0398b0c32194ef0283ab8f10c82b6b21b78bd83973eb792f34db42788c91ee51" + sha256 cellar: :any_skip_relocation, arm64_linux: "d98b6871e0ae6b7f5b09e464e22f1eafc67ff56805370961800c9a20ebb56a49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1836ddf0f3d7cafecc18aed020773448e2a88c86c6ff2f2d195d0b2fa9800cb6" + end + + depends_on "node" + depends_on "openjdk" + + def install + system "npm", "install", *std_npm_args + 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}/jhipster info 2>&1") + assert_match "JHipster configuration not found", output + assert_match "execution is complete", output + + assert_match version.to_s, shell_output("#{bin}/jhipster --version") + end +end diff --git a/Formula/j/jid.rb b/Formula/j/jid.rb new file mode 100644 index 0000000000000..4593644fa74fb --- /dev/null +++ b/Formula/j/jid.rb @@ -0,0 +1,36 @@ +class Jid < Formula + desc "Json incremental digger" + homepage "https://github.com/simeji/jid" + url "https://github.com/simeji/jid/archive/refs/tags/v0.7.6.tar.gz" + sha256 "0912050b3be3760804afaf7ecd6b42bfe79e7160066587fbc0afa5324b03fb48" + license "MIT" + head "https://github.com/simeji/jid.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "285b46fb790b33b8516dbd0a7053fa76e64b54a04006f50c74b1539dca991cb9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9835df7952c4170d1bfd899026e1cace590dce8abaa64b01f8784760533ae5d9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2aa9387c65b9577a1e7d6fa2a73e9da8102809d2275fa1d97db02c0ed6622bc0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "af3284fbdac510d46260cd52b4b1db36cb2baa71f02ee68758bea6be4af5ffb3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "37f25dc38d57a971fb609224c33802bfa4213b58d825b188a67eb653af1c9e2f" + sha256 cellar: :any_skip_relocation, sonoma: "c50129673b66bb9cee8ce889ea95082e1d479e605ce7a99c18c522c2b54150a5" + sha256 cellar: :any_skip_relocation, ventura: "0966f7f8749c7aa40838d6658054292523d414aa2edf01d9483c35092fac2d23" + sha256 cellar: :any_skip_relocation, monterey: "ad33b70ab6cbfb324c1842d3b1294beb011b04c85086e9c8aa4fdfbe1c6aedc4" + sha256 cellar: :any_skip_relocation, big_sur: "703bee89d514891dec82186680f2ee9837b1599721c3d68405fd4c72d015a811" + sha256 cellar: :any_skip_relocation, catalina: "0b45fe9c59facbc6b2bbacf4b52927934b09d6e2050ad3a5b5a32434a4bd4751" + sha256 cellar: :any_skip_relocation, mojave: "2980bf16f4376b7bdfc27e0e6bbe45d9e1f8aca8a143f6f7b6fd939eb6892617" + sha256 cellar: :any_skip_relocation, high_sierra: "d429ac5400fd67dcee12e5fe962e84f535858c7ecb3235ee01f8a54dc44e7a9e" + sha256 cellar: :any_skip_relocation, arm64_linux: "440c0003187faeac72ff82a00fd05eb4de6cc849d82a21e1a07c30b319320abc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c2d04634a851f7ad8d10869571b6820cd31da2ef068a5c7fd6b03f512f5dc4c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "cmd/jid/jid.go" + end + + test do + assert_match "jid version v#{version}", shell_output("#{bin}/jid --version") + end +end diff --git a/Formula/j/jigdo.rb b/Formula/j/jigdo.rb new file mode 100644 index 0000000000000..7e097ab7675f0 --- /dev/null +++ b/Formula/j/jigdo.rb @@ -0,0 +1,68 @@ +class Jigdo < Formula + desc "Tool to distribute very large files over the internet" + homepage "https://www.einval.com/~steve/software/jigdo/" + url "https://www.einval.com/~steve/software/jigdo/download/jigdo-0.8.2.tar.xz" + sha256 "36f286d93fa6b6bf7885f4899c997894d21da3a62176592ac162d9c6a8644f9e" + license "GPL-2.0-only" => { with: "openvpn-openssl-exception" } + head "https://git.einval.com/git/jigdo.git", branch: "upstream" + + livecheck do + url "https://www.einval.com/~steve/software/jigdo/download/" + regex(/href=.*?jigdo[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "e4c58215aeb8305e4d249afd5ec3319dd15e947d312080883d3dcc97cdd77bc0" + sha256 arm64_sonoma: "73202ee80753c8807409b9db634f4d2c7cddf7035557fc1c0473c29e80b8afce" + sha256 arm64_ventura: "f650c19b6f867d73389a9c4454bd323cadc57d683962bae896aa6c8e37d56068" + sha256 arm64_monterey: "423d86a7a9b3825164c2d82cd04c21bb1014745c821cc0b27cdff29eca1d6c90" + sha256 arm64_big_sur: "5dcea0cd87545e2112f787892e70ca69a2202044271ffe89f580a21b58ba5f0f" + sha256 sonoma: "c08640009f0243d184980b7822d439426b4fe6dce4167247d0a2b2544f181d3a" + sha256 ventura: "5a247d726d179602b3249137efa25d13c025d3a9bc2bbb24d923b57f022cc6f4" + sha256 monterey: "037de4d08cf85ffb4dd2a698a01f16ea31e1eada585544d8f803e6f266a757ae" + sha256 big_sur: "be8f640734494f2a4daf4bac0407b80ddf8b56e8136456732d4c5693355b2ccf" + sha256 arm64_linux: "6670ac99a8894d24976bea482ef00cd7f7be95aa8b151406b9cb097285f72a82" + sha256 x86_64_linux: "244d944cf955deef5bfb200e61e3fae6cfc49038883f2c542e534b0c498dc4c6" + end + + depends_on "gettext" => :build # for msgfmt + depends_on "pkgconf" => :build + depends_on "berkeley-db@5" # keep berkeley-db < 6 to avoid AGPL incompatibility + depends_on "wget" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + # Find our docbook catalog + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + system "./configure", "--mandir=#{man}", *std_configure_args + + # disable documentation building + (buildpath/"doc/Makefile").atomic_write "all:\n\techo hello" + + # disable documentation installing + inreplace "Makefile", "$(INSTALL) \"$$x\" $(DESTDIR)$(mandir)/man1", "echo \"$$x\"" + + system "make" + system "make", "install" + end + + test do + system bin/"jigdo-file", "make-template", "--image=#{test_fixtures("test.png")}", + "--template=#{testpath}/template.tmp", + "--jigdo=#{testpath}/test.jigdo" + + assert_path_exists testpath/"test.jigdo" + assert_path_exists testpath/"template.tmp" + system bin/"jigdo-file", "make-image", "--image=#{testpath/"test.png"}", + "--template=#{testpath}/template.tmp", + "--jigdo=#{testpath}/test.jigdo" + system bin/"jigdo-file", "verify", "--image=#{testpath/"test.png"}", + "--template=#{testpath}/template.tmp" + end +end diff --git a/Formula/j/jikken.rb b/Formula/j/jikken.rb new file mode 100644 index 0000000000000..0a1855ed3d56b --- /dev/null +++ b/Formula/j/jikken.rb @@ -0,0 +1,37 @@ +class Jikken < Formula + desc "Powerful, source control friendly REST API testing toolkit" + homepage "https://jikken.io/" + url "https://github.com/jikkenio/jikken/archive/refs/tags/v0.8.2.tar.gz" + sha256 "c1e8080c238d4aed349bf30a54ee8181661cb4cc846ad9bf16118ede5bd7939c" + license "MIT" + head "https://github.com/jikkenio/jikken.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8c2a6084031ab54a84caaa798e46fe8d1cf8ea7a50b8b8c141ceafed2944196d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4dfcac83e5e02f29b3486e03c4c4128e02e6e09a1b6d85b26e5521e515a289ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bf277333fd50c994440977d4302f217f7e607971071c06d0bec1a79cda240bae" + sha256 cellar: :any_skip_relocation, sonoma: "11bd0cf32af6ea9f71290b1d4b286558e6c1844039bcac9c47a717ee635e4d7a" + sha256 cellar: :any_skip_relocation, ventura: "bbc3a2c09c827fa77c5835d2c0fddde53e1f96f32ddfdc34325ee1b868fbc01f" + sha256 cellar: :any_skip_relocation, arm64_linux: "0895649db77b4f15a4ef8486c389c85b3ef24a0299a9080f29a6e6627e68526a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21a00686c078cf599d5cdd70c453104551c618eb5390025ef30db5c24ad72ffc" + 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 + output = shell_output("#{bin}/jk new test") + assert_match "Successfully created test (`test.jkt`).", output + assert_match "status: 200", (testpath/"test.jkt").read + + assert_match version.to_s, shell_output("#{bin}/jk --version") + end +end diff --git a/Formula/j/jimtcl.rb b/Formula/j/jimtcl.rb new file mode 100644 index 0000000000000..97ab7e82a9683 --- /dev/null +++ b/Formula/j/jimtcl.rb @@ -0,0 +1,48 @@ +class Jimtcl < Formula + desc "Small footprint implementation of Tcl" + homepage "https://jim.tcl.tk/index.html" + url "https://github.com/msteveb/jimtcl/archive/refs/tags/0.83.tar.gz" + sha256 "6f2df00009f5ac4ad654c1ae1d2f8ed18191de38d1f5a88a54ea99cc16936686" + license "BSD-2-Clause" + + bottle do + sha256 arm64_sequoia: "855f8a678aa16fa313e1e74b4ca765afb34f3fce0a5eb130bc8f4d14da5aed6f" + sha256 arm64_sonoma: "73774db53edbfc7791a6f2c328f63ef7a7555b103c1ada101e110590aeeea3d4" + sha256 arm64_ventura: "a5a65010c3d6c3d72a8d6bdf0dc6a230232d1d5477e065f3bc4a631f6b4e3c1a" + sha256 arm64_monterey: "cde5346b6488d9224d512b678eb500ee9f63c95b16eea5001775f998ad9c789a" + sha256 sonoma: "802498062a817cb2055c3d30c5a5945f369ca08b08bc8945d36aec2942b711b9" + sha256 ventura: "37aeca2006f2608fd5d788839b4c51505df48b4bbe94bbb44f3122404993adfc" + sha256 monterey: "4b9b6ed2f15335aebba924e148b4907c9b199634b718ad9460270ebc8f434d8d" + sha256 arm64_linux: "d48ad33e08260ec0ae9acbe19e9f473fc04d2381196b5b603ee7743716892af4" + sha256 x86_64_linux: "66fc34a8124311fd4888cfbadf04c6bb1a1f4804ed20f19fb08a39417322ca62" + end + + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "sqlite" + uses_from_macos "zlib" + + # patch to include `stdio.h`` + patch do + url "https://github.com/msteveb/jimtcl/commit/35e0e1f9b1f018666e5170a35366c5fc3b97309c.patch?full_index=1" + sha256 "50f66a70d130c578f57d9569b62cf7071f7a3a285ca15efefd3485fa385469ba" + end + + def install + system "./configure", "--disable-silent-rules", + "--with-ext=readline,rlprompt,sqlite3", + "--shared", + "--docdir=#{doc}", + "--ssl", + *std_configure_args + system "make" + system "make", "install" + pkgshare.install Dir["examples*"] + end + + test do + (testpath/"test.tcl").write "puts {Hello world}" + assert_match "Hello world", shell_output("#{bin}/jimsh test.tcl") + end +end diff --git a/Formula/j/jing-trang.rb b/Formula/j/jing-trang.rb new file mode 100644 index 0000000000000..846356439252b --- /dev/null +++ b/Formula/j/jing-trang.rb @@ -0,0 +1,76 @@ +class JingTrang < Formula + desc "Schema validation and conversion based on RELAX NG" + homepage "http://www.thaiopensource.com/relaxng/" + url "https://github.com/relaxng/jing-trang.git", + tag: "V20241231", + revision: "a6bc0041035988325dfbfe7823ef2c098fc56597" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0890bae04b71b2979b5e95bcc055476ef225a24e02db05288c514c63542606fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4c64de5b7fc48a47a2fea2e480330ca435a177346f7ef4465ebf21312a1387f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e7b9d4dea1561b777b9fe73f26774cab635683266d5da7b1c5996a11e1604aef" + sha256 cellar: :any_skip_relocation, sonoma: "073e593cac616bbae9b72dd5fbd417540b5c7019259a969965d3a0f64e567978" + sha256 cellar: :any_skip_relocation, ventura: "0a99746daf81cd2730cb3a5eb6a387e3f48c274cdc6b6431d37c1bc1cf1e342f" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc69a11eb46ce257e3c4e390b5f7f6e925cf6f1de2b5958016dabdd96fc57811" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1215b5eaf1160829b26fcb226de0a9050c40c6e29e291d6c339f7408faf900ab" + end + + depends_on "ant" => :build + depends_on "openjdk" + + uses_from_macos "unzip" => :build + + def install + system "ant", "jing-dist" + system "ant", "trang-dist" + system "unzip", "-o", "-d", "build/dist", "build/dist/jing-#{version}.zip" + system "unzip", "-o", "-d", "build/dist", "build/dist/trang-#{version}.zip" + libexec.install Dir["build/dist/jing-#{version}"] + libexec.install Dir["build/dist/trang-#{version}"] + bin.write_jar_script libexec/"jing-#{version}/bin/jing.jar", "jing" + bin.write_jar_script libexec/"trang-#{version}/trang.jar", "trang" + end + + test do + (testpath/"test.rnc").write <<~EOS + 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 }? + } + EOS + (testpath/"test.xml").write <<~XML + + + + + Technology + Technology + Tecnología + ٹیکنالوجی + News about computers, the internet, electronics etc. + + + Science + Science + Ciencia + سائنس + Systematic enterprise + + + + XML + + system bin/"jing", "-c", "test.rnc", "test.xml" + system bin/"trang", "-I", "rnc", "-O", "rng", "test.rnc", "test.rng" + end +end diff --git a/Formula/j/jinja2-cli.rb b/Formula/j/jinja2-cli.rb new file mode 100644 index 0000000000000..896f3e224f876 --- /dev/null +++ b/Formula/j/jinja2-cli.rb @@ -0,0 +1,87 @@ +class Jinja2Cli < Formula + include Language::Python::Virtualenv + + desc "CLI for the Jinja2 templating language" + homepage "https://github.com/mattrobenolt/jinja2-cli" + url "https://files.pythonhosted.org/packages/a4/22/c922839761b311b72ccc95c2ca2239311a3e80916458878962626f96922a/jinja2-cli-0.8.2.tar.gz" + sha256 "a16bb1454111128e206f568c95938cdef5b5a139929378f72bb8cf6179e18e50" + license "BSD-2-Clause" + revision 3 + + bottle do + sha256 cellar: :any, arm64_sequoia: "69847d8dd63445895938e9a787d879a81c933764fea8b3df683ae18a3c0465e9" + sha256 cellar: :any, arm64_sonoma: "883bb7f1ecae9adf6e224cec532dac1738f95c82e3a414d2d29be0d6555eed31" + sha256 cellar: :any, arm64_ventura: "81a8d22c74237ad6b2117cd41b7d21ee621d6c6cfad796408300b09c298f6e0f" + sha256 cellar: :any, sonoma: "fab5b3eb00bbcd5be43140b924899df658422035a7480014310701456637fa67" + sha256 cellar: :any, ventura: "8d5a194592d04897522819d11b4983d8ed5580726ab8133318c73c4c47eea334" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0c9dfceb1281a4939a5ce38733836fdc431e8ed9cfcee1141b02cffa59a245f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3614f38dc9f33988fbdb1e3a5bce147e5e315f6a1aafa54bbf8252723e7d79a0" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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 "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "toml" do + url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" + sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/50/05/51dcca9a9bf5e1bce52582683ce50980bcadbc4fa5143b9f2b19ab99958f/xmltodict-0.14.2.tar.gz" + sha256 "201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/jinja2 --version") + + expected_result = <<~EOS + The Beatles: + - Ringo Starr + - George Harrison + - Paul McCartney + - John Lennon + EOS + template_file = testpath/"my-template.tmpl" + template_file.write <<~EOS + {{ band.name }}: + {% for member in band.members -%} + - {{ member.first_name }} {{ member.last_name }} + {% endfor -%} + EOS + template_variables_file = testpath/"my-template-variables.json" + template_variables_file.write <<~JSON + { + "band": { + "name": "The Beatles", + "members": [ + {"first_name": "Ringo", "last_name": "Starr"}, + {"first_name": "George", "last_name": "Harrison"}, + {"first_name": "Paul", "last_name": "McCartney"}, + {"first_name": "John", "last_name": "Lennon"} + ] + } + } + JSON + output = shell_output("#{bin}/jinja2 #{template_file} #{template_variables_file}") + assert_equal expected_result, output + end +end diff --git a/Formula/j/jinx.rb b/Formula/j/jinx.rb new file mode 100644 index 0000000000000..0aac80d8f424c --- /dev/null +++ b/Formula/j/jinx.rb @@ -0,0 +1,63 @@ +class Jinx < Formula + desc "Embeddable scripting language for real-time applications" + homepage "https://github.com/JamesBoer/Jinx" + url "https://github.com/JamesBoer/Jinx/archive/refs/tags/v1.3.10.tar.gz" + sha256 "5b3a3e6c2c4b976dfdb16519aee7299c98dbf417b8179099a5509a5fd4d513ac" + license "MIT" + head "https://github.com/JamesBoer/Jinx.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "640fd3707ccc9262904729a97da5789a22e9cb46c658b7d20aecbb323749a1a2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "24313e091b9222029e7d5e6e4aea87ef70e20facef9a6b82e0a0d4abfffcc511" + sha256 cellar: :any_skip_relocation, arm64_ventura: "76c5986afd50a5bbe9ee092ab25dfe8633ae63e1895b5ee90107f508a6297673" + sha256 cellar: :any_skip_relocation, arm64_monterey: "362834274bbb963b081203c47ece5ccbae44ab6959177d293f2d6af86b2063bf" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2cc147cfcb7b0769a0570f011806266e8762eea26cc751fc49df4749f5e73de8" + sha256 cellar: :any_skip_relocation, sonoma: "3353d9402dd94c01eaaa937bcb58590824f144027f54fadacdaa4584b6f03979" + sha256 cellar: :any_skip_relocation, ventura: "6f9d56b84c16029fbec98ffe69d6fcf84e83effbeabde98cd2c3a553cbb366ff" + sha256 cellar: :any_skip_relocation, monterey: "cafc3ac794c99f4e0a74380927681bd35eb465eb22d940a99cee23aae2f8ea61" + sha256 cellar: :any_skip_relocation, big_sur: "eb75b3db57ce5a1349190419c5e1f7e880c74c0d0f8ae5485a708739358592ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "56ecdc57ff29b8f45c0539ebbcef8608581644a619014cb6058c8d01b8aa3422" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca7c15cf146241f441cf37fd695dbae391da90bdb5cf6b3fcf7d3c1f05be2270" + end + + depends_on "cmake" => :build + + def install + # disable building tests + inreplace "CMakeLists.txt", "if(NOT jinx_is_subproject)", "if(FALSE)" + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + lib.install "build/libJinx.a" + + include.install Dir["Source/*.h"] + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "Jinx.h" + + int main() { + // Create the Jinx runtime object + auto runtime = Jinx::CreateRuntime(); + + // Text containing our Jinx script + const char * scriptText = + u8R"( + + -- Use the core library + import core + + -- Write to the debug output + write line "Hello, world!" + + )"; + + // Create and execute a script object + auto script = runtime->ExecuteScript(scriptText); + } + CPP + system ENV.cxx, "-std=c++17", "test.cpp", "-I#{include}", "-L#{lib}", "-lJinx", "-o", "test" + assert_match "Hello, world!", shell_output("./test") + end +end diff --git a/Formula/j/jira-cli.rb b/Formula/j/jira-cli.rb new file mode 100644 index 0000000000000..7f2d6fc294309 --- /dev/null +++ b/Formula/j/jira-cli.rb @@ -0,0 +1,41 @@ +class JiraCli < Formula + desc "Feature-rich interactive Jira CLI" + homepage "https://github.com/ankitpokhrel/jira-cli" + url "https://github.com/ankitpokhrel/jira-cli/archive/refs/tags/v1.6.0.tar.gz" + sha256 "89989534ae3f254be7a13dde51bfcf1c58f36cbf26ad3de9e333ead36579c007" + license "MIT" + head "https://github.com/ankitpokhrel/jira-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8250d45b6be6e7f897d704248a10ce708fc0987b499f634b483452046ad4074a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "826e1dd2a64baab107b3447068ec9a61dd59e0f59155a26c5eb85b38d78cf9e8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4355e65a165d7a3266454843f6d94ff14457e3e7206aca7da56ab073759eee8" + sha256 cellar: :any_skip_relocation, sonoma: "2e8948a461c557c4907131efb2f052a215c8e7b205b3294bbc1d148a84eb4e92" + sha256 cellar: :any_skip_relocation, ventura: "59ac40e5f7e4e2b5d53ee7a64c7c3d49e55fff62b26eee766351252e616c2144" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c56844f974a3625d3ecd9ff4fc37aadb196c691511f701e101db611d944f74fd" + end + + depends_on "go" => :build + + conflicts_with "go-jira", because: "both install `jira` binaries" + + def install + ldflags = %W[ + -s -w + -X github.com/ankitpokhrel/jira-cli/internal/version.Version=#{version} + -X github.com/ankitpokhrel/jira-cli/internal/version.GitCommit=#{tap.user} + -X github.com/ankitpokhrel/jira-cli/internal/version.SourceDateEpoch=#{time.to_i} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"jira"), "./cmd/jira" + + generate_completions_from_executable(bin/"jira", "completion") + (man7/"jira.7").write Utils.safe_popen_read(bin/"jira", "man") + end + + test do + assert_match version.to_s, shell_output("#{bin}/jira version") + + output = shell_output("#{bin}/jira serverinfo 2>&1", 1) + assert_match "The tool needs a Jira API token to function", output + end +end diff --git a/Formula/j/jj.rb b/Formula/j/jj.rb new file mode 100644 index 0000000000000..64d3457d8ed79 --- /dev/null +++ b/Formula/j/jj.rb @@ -0,0 +1,60 @@ +class Jj < Formula + desc "Git-compatible distributed version control system" + homepage "https://github.com/jj-vcs/jj" + url "https://github.com/jj-vcs/jj/archive/refs/tags/v0.29.0.tar.gz" + sha256 "57df34a06b1d2125ccd6e8383ea08f24160c48e33e9daecd883a2e59567a9fd9" + license "Apache-2.0" + head "https://github.com/jj-vcs/jj.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "50c511670ee40fa1da2d8b18029bad69223ee3d8e50a3009d4607ac94390fc48" + sha256 cellar: :any, arm64_sonoma: "5d6c168d37c55fdfcaaa4c95b3e380cc859296ef9d114ff5830ff8aa2291bbae" + sha256 cellar: :any, arm64_ventura: "48f0c95193b1714f59799528db6ae6069148fdc21963dcf76c205f9b5b377579" + sha256 cellar: :any, sonoma: "33a01d5e4b4cd52ae2dcb1830288cbde9a9560f56c2205fb267140797ffa2d42" + sha256 cellar: :any, ventura: "62b3be14fd3c750708c27a70c1edea19c893a67cdd45154ea259583661459970" + sha256 cellar: :any_skip_relocation, arm64_linux: "439cd35809f8b0eb10150b5598be56d1afbfa9aa5a2c26aecbd1dcaad1414a46" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2140f62549e58a6938ee9d265d926223bdfca139485464958e89340279f3af47" + 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" + + system "cargo", "install", *std_cargo_args(path: "cli") + + generate_completions_from_executable(bin/"jj", shell_parameter_format: :clap) + system bin/"jj", "util", "install-man-pages", man + end + + test do + require "utils/linkage" + + touch testpath/"README.md" + system bin/"jj", "git", "init" + system bin/"jj", "describe", "-m", "initial commit" + assert_match "README.md", shell_output("#{bin}/jj file list") + assert_match "initial commit", shell_output("#{bin}/jj log") + + [ + 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/"jj", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/j/jjui.rb b/Formula/j/jjui.rb new file mode 100644 index 0000000000000..b895c56239758 --- /dev/null +++ b/Formula/j/jjui.rb @@ -0,0 +1,28 @@ +class Jjui < Formula + desc "TUI for interacting with the Jujutsu version control system" + homepage "https://github.com/idursun/jjui" + url "https://github.com/idursun/jjui/archive/refs/tags/v0.8.8.tar.gz" + sha256 "66963f2b091855d1e4116bdf45dbbde728ff6b2a65e4adb879e32249a3693242" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "54e7a15721fb267acdaeb43aa73068361593666de8219496e1f19043547662b2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "54e7a15721fb267acdaeb43aa73068361593666de8219496e1f19043547662b2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "54e7a15721fb267acdaeb43aa73068361593666de8219496e1f19043547662b2" + sha256 cellar: :any_skip_relocation, sonoma: "60186d9a662096c177aea03a42b2fc7b17045f8f04b6a250d39003d6cd0350b5" + sha256 cellar: :any_skip_relocation, ventura: "60186d9a662096c177aea03a42b2fc7b17045f8f04b6a250d39003d6cd0350b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c619c378089dea967033ea1e753b09eed71dd8807e4dd10fb505547fdbeb3327" + end + + depends_on "go" => :build + depends_on "jj" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}"), "./cmd/jjui" + end + + test do + assert_match version.to_s, shell_output("#{bin}/jjui -version") + assert_match "Error: There is no jj repo in", shell_output("#{bin}/jjui 2>&1", 1) + end +end diff --git a/Formula/j/jless.rb b/Formula/j/jless.rb new file mode 100644 index 0000000000000..257324a58d43d --- /dev/null +++ b/Formula/j/jless.rb @@ -0,0 +1,40 @@ +class Jless < Formula + desc "Command-line pager for JSON data" + homepage "https://jless.io/" + url "https://github.com/PaulJuliusMartinez/jless/archive/refs/tags/v0.9.0.tar.gz" + sha256 "43527a78ba2e5e43a7ebd8d0da8b5af17a72455c5f88b4d1134f34908a594239" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6227a6ccd685510fd4a4db69ac652e12b785dfb320afab4dfdced92ca546f6a5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ce76bc45d945ae9210c3ede829ae8dbf7087faffa41f8edd18887566aca9a944" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5950521cf007e81591e09fb2f7f2b85e704609fa7cf9aa035125343e2fc7657e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d1c870a901478c8084488d128b0baf7a3859e5d53b6cfcc048fe0418d96e1552" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ef4ca6e6317cf02257759c994f95cb3a35aef960cb7abb2babd3c94f49eeff1e" + sha256 cellar: :any_skip_relocation, sonoma: "4ec22c222b62c7e7439eff8d357a841aff831c1e544c58de3bf0c8d56ba32f45" + sha256 cellar: :any_skip_relocation, ventura: "5fd473bb7164c9c5ea0ce8695e0c1aa7976a7acf914455c3ddde42c24d3c25c4" + sha256 cellar: :any_skip_relocation, monterey: "d89da34d0330ce44f59bc97d83fff9c2e1851210587d1e5fa69b4b9d6ec784e8" + sha256 cellar: :any_skip_relocation, big_sur: "ebeed1f09b8a73d3918d0123d2d9dbc26da31d40be642f6dc6a9d9d02a7ae972" + sha256 cellar: :any_skip_relocation, arm64_linux: "5dd5790c437fc0b474aaf0e9e2add485ebc5867d64955e99d72aa0920aaf0e05" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0502fb07b111d0bd0b5bb2983225e8f2e313329fd7dad6287aac989dac9f8e1" + end + + depends_on "rust" => :build + + uses_from_macos "python" => :build # for xcb < 0.10.0 + + on_linux do + depends_on "libxcb" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"example.json").write('{"hello": "world"}') + res, process = Open3.capture2("#{bin}/jless example.json") + assert_equal("world", JSON.parse(res)["hello"]) + assert_equal(process.exitstatus, 0) + end +end diff --git a/Formula/j/jlog.rb b/Formula/j/jlog.rb new file mode 100644 index 0000000000000..d515dbda0aef0 --- /dev/null +++ b/Formula/j/jlog.rb @@ -0,0 +1,70 @@ +class Jlog < Formula + desc "Pure C message queue with subscribers and publishers for logs" + homepage "https://labs.omniti.com/labs/jlog" + url "https://github.com/omniti-labs/jlog/archive/refs/tags/2.6.0.tar.gz" + sha256 "c3c6e745557f789c2cef3e3760e3c68ee585727a0d55c14ad9cb3e8232f4e46b" + license "BSD-3-Clause" + head "https://github.com/omniti-labs/jlog.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2a78a80b0f6624a86af2e2f4ac2ddff08d2182d801d88213c14a816225b66e45" + sha256 cellar: :any, arm64_sonoma: "29000316d005c75482135908e0b6f8ba9ed9bc5046b449133725237ad981b3ca" + sha256 cellar: :any, arm64_ventura: "1ea5287e2fb6f3cfe8fc0c2b91f4012ac92756408132d0543fe9fb5db2726d4c" + sha256 cellar: :any, arm64_monterey: "500e84aeed8bcdd929bef2023db9b040d0e1ba5043362f91dfdc5238a1d258d8" + sha256 cellar: :any, sonoma: "61f8f9bd4bc83160c4680f9df02462d64c06a2125488b3f421e80753218bc786" + sha256 cellar: :any, ventura: "ed19d61911e281161bfd89926aa405a3b50b0519c5d0c9b9016685c862cc3255" + sha256 cellar: :any, monterey: "c856df10689f774ee8a7ee58c80edf754573b509c8769e477bbfc05735332def" + sha256 cellar: :any_skip_relocation, arm64_linux: "3bad683d45631a54ba97c2191786efcd88bb8e7ad1bbf0e8e97b417607f5c61c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b59c62ae218826677a96203de736d341929e2f7490957eeb125d9b720e698ec" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + def install + system "autoconf" + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"jlogtest.c").write <<~C + #include + #include + int main() { + jlog_ctx *ctx; + const char *path = "#{testpath}/jlogexample"; + int rv; + + // First, ensure that the jlog is created + ctx = jlog_new(path); + if (jlog_ctx_init(ctx) != 0) { + if(jlog_ctx_err(ctx) != JLOG_ERR_CREATE_EXISTS) { + fprintf(stderr, "jlog_ctx_init failed: %d %s\\n", jlog_ctx_err(ctx), jlog_ctx_err_string(ctx)); + exit(1); + } + // Make sure it knows about our subscriber(s) + jlog_ctx_add_subscriber(ctx, "one", JLOG_BEGIN); + jlog_ctx_add_subscriber(ctx, "two", JLOG_BEGIN); + } + + // Now re-open for writing + jlog_ctx_close(ctx); + ctx = jlog_new(path); + if (jlog_ctx_open_writer(ctx) != 0) { + fprintf(stderr, "jlog_ctx_open_writer failed: %d %s\\n", jlog_ctx_err(ctx), jlog_ctx_err_string(ctx)); + exit(0); + } + + // Send in some data + rv = jlog_ctx_write(ctx, "hello\\n", strlen("hello\\n")); + if (rv != 0) { + fprintf(stderr, "jlog_ctx_write_message failed: %d %s\\n", jlog_ctx_err(ctx), jlog_ctx_err_string(ctx)); + } + jlog_ctx_close(ctx); + } + C + system ENV.cc, "jlogtest.c", "-I#{include}", "-L#{lib}", "-ljlog", "-o", "jlogtest" + system testpath/"jlogtest" + end +end diff --git a/Formula/j/jmeter.rb b/Formula/j/jmeter.rb new file mode 100644 index 0000000000000..3e5c99a236a43 --- /dev/null +++ b/Formula/j/jmeter.rb @@ -0,0 +1,71 @@ +class Jmeter < Formula + desc "Load testing and performance measurement application" + homepage "https://jmeter.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=jmeter/binaries/apache-jmeter-5.6.3.tgz" + mirror "https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.6.3.tgz" + sha256 "f68efc17fe060f698c48a6abe2599a933927486bda2924dbe14c74895318ddde" + license "Apache-2.0" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "13c89a34f46a525ba7131741a8c7c8f0ea789ed231762b20ac6e5dc5f0757b04" + end + + depends_on "openjdk@21" + + resource "jmeter-plugins-manager" do + url "https://search.maven.org/remotecontent?filepath=kg/apc/jmeter-plugins-manager/1.9/jmeter-plugins-manager-1.9.jar" + sha256 "b74ea9f498ec90cb48ea2de4c19b71007f2b33a9c2808febaf7c32b35412c13d" + end + + def install + # Remove windows files + rm(Dir["bin/*.bat"]) + + libexec.install Dir["*"] + (bin/"jmeter").write_env_script libexec/"bin/jmeter", JAVA_HOME: Formula["openjdk@21"].opt_prefix + + resource("jmeter-plugins-manager").stage do + (libexec/"lib/ext").install Dir["*"] + end + end + + test do + (testpath/"test.jmx").write <<~EOS + + + + + + + + continue + + false + 1 + + 1 + + + + + + + true + import java.util.Random + Random rand = new Random(); + // This will break unless Groovy accepts the current version of the JDK + int rand_int1 = rand.nextInt(1000); + + groovy + + + + + + + + EOS + refute_match "Uncaught Exception", shell_output("#{bin}/jmeter -n -t test.jmx 2>&1") + end +end diff --git a/Formula/j/jmxterm.rb b/Formula/j/jmxterm.rb new file mode 100644 index 0000000000000..5df992433c3c4 --- /dev/null +++ b/Formula/j/jmxterm.rb @@ -0,0 +1,23 @@ +class Jmxterm < Formula + desc "Open source, command-line based interactive JMX client" + homepage "https://docs.cyclopsgroup.org/jmxterm" + url "https://github.com/jiaqi/jmxterm/releases/download/v1.0.4/jmxterm-1.0.4-uber.jar" + sha256 "ce3e78c732a8632f084f8114d50ca5022cef4a69d68a74b45f5007d34349872b" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "03113ff040a52832b1202c64ba4b784662b455e6aea16641d42206fa7c770661" + end + + depends_on "openjdk" + + def install + libexec.install "jmxterm-#{version}-uber.jar" + bin.write_jar_script libexec/"jmxterm-#{version}-uber.jar", "jmxterm", "" + end + + test do + assert_match(/"software\.name".=."jmxterm";/, pipe_output("#{bin}/jmxterm -n", "about")) + end +end diff --git a/Formula/j/jmxtrans.rb b/Formula/j/jmxtrans.rb new file mode 100644 index 0000000000000..c82af739bf92f --- /dev/null +++ b/Formula/j/jmxtrans.rb @@ -0,0 +1,67 @@ +class Jmxtrans < Formula + desc "Tool to connect to JVMs and query their attributes" + homepage "https://github.com/jmxtrans/jmxtrans" + url "https://github.com/jmxtrans/jmxtrans/archive/refs/tags/jmxtrans-parent-272.tar.gz" + sha256 "73691dc634be8ff504ed33867807266545d9ff9402e365c09fcf0272720cc160" + license "MIT" + version_scheme 1 + + bottle do + sha256 cellar: :any_skip_relocation, sonoma: "f55c75730632187661589592bc60ce5846195fa7b90bea0d6f680bb0d1e3b37f" + sha256 cellar: :any_skip_relocation, ventura: "bfb7084ad1740683f32109d720b9b0e19b0c33ce75c67cb41b4e943f9a2c6454" + sha256 cellar: :any_skip_relocation, monterey: "2014fcd1c2a53a9f3a396c039f3ad1b530548dabf8e55f8648819b8581c1e0a2" + sha256 cellar: :any_skip_relocation, big_sur: "f83bb65c93c0149c4af9b3277d2ec1eee6fd0e94f2a27af0de47c18d3932e9fb" + sha256 cellar: :any_skip_relocation, catalina: "f8e5ac84ca621fbb2c0b0c9715899c8e7b2e86f198330b49c7ba7e3d993ec24c" + sha256 cellar: :any_skip_relocation, mojave: "8dd69723155a4f2580b7327ca2babc8389cc9678f21dc1934ce3b73e7c67c89b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33004f7a6ece9cc9b0c6a0fa1640bf3176237a860012a2df0b2c71ce0a722396" + end + + # no new commits since March 31 2021, lots of bug reports in https://github.com/jmxtrans/jmxtrans/issues + deprecate! date: "2024-07-26", because: :unmaintained + + depends_on "maven" => :build + depends_on arch: :x86_64 # openjdk@8 is not supported on ARM + depends_on "openjdk@8" + + uses_from_macos "netcat" => :test + + def install + ENV["JAVA_HOME"] = Formula["openjdk@8"].opt_prefix + + system "mvn", "package", "-DskipTests=true", + "-Dmaven.javadoc.skip=true", + "-Dcobertura.skip=true", + "-Duser.home=#{buildpath}" + + cd "jmxtrans" do + # Point JAR_FILE into Cellar where we've installed the jar file + inreplace "jmxtrans.sh", "$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )/../lib\" " \ + ">/dev/null && pwd )/jmxtrans-all.jar", + libexec/"target/jmxtrans-#{version}-all.jar" + + # Exec java to avoid forking the server into a new process + inreplace "jmxtrans.sh", "${JAVA} -server", "exec ${JAVA} -server" + + chmod 0755, "jmxtrans.sh" + libexec.install %w[jmxtrans.sh target] + pkgshare.install %w[bin example.json src tools vagrant] + doc.install Dir["doc/*"] + end + + (bin/"jmxtrans").write_env_script libexec/"jmxtrans.sh", JAVA_HOME: Formula["openjdk@8"].opt_prefix + + # Delete 32-bit Linux binaries + rm Dir[libexec/"target/generated-resources/appassembler/jsw/jmxtrans/{bin,lib}/*wrapper-linux-x86-32*"] + end + + test do + jmx_port = free_port + fork do + ENV["JMX_PORT"] = jmx_port.to_s + exec bin/"jmxtrans", pkgshare/"example.json" + end + sleep 2 + + system "nc", "-z", "localhost", jmx_port + end +end diff --git a/Formula/j/jnethack.rb b/Formula/j/jnethack.rb new file mode 100644 index 0000000000000..7dec0ad4b2abc --- /dev/null +++ b/Formula/j/jnethack.rb @@ -0,0 +1,87 @@ +class Jnethack < Formula + desc "Japanese localization of NetHack" + homepage "https://github.com/jnethack/jnethack-release" + # We use a git checkout to avoid patching the upstream NetHack tarball. + url "https://github.com/jnethack/jnethack-release.git", + tag: "v3.6.7-0.1", + revision: "3b3a9c4e25df60f9bce2ad09ce368410b4360e85" + license "NGPL" + head "https://github.com/jnethack/jnethack-release.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "05dc1796a9fb75fac1d0d63a9fc31a7773f1ddd4e3a0351301899847ca6aba48" + sha256 arm64_sonoma: "bae280dd42e8d357d686b2482676de03a1acd4b65b5eefcae753bba91fc42951" + sha256 arm64_ventura: "44ca7f443ece59eef081c6d4a270d6aa63f6bd4d6bc173c7cfbd991dd2fb743b" + sha256 arm64_monterey: "3f4432dcdbf52b38e53446c0f35ec23d6d7438cc019b3b7587aaf5a28187e799" + sha256 sonoma: "3b46b1e5f270af3786dcebde6c0fc008dd22ffdf0a51a3aaa6daa08fd96a0696" + sha256 ventura: "84ac8940603749b3f1e3dbf11f8bdef227307c0e34bb9f0d2b227dd138223ac4" + sha256 monterey: "82edd9a68cc86d599b8eb70f23b6e813c3b587af96b9986eb51679d82f6b1f83" + sha256 arm64_linux: "48967c39f0adeb6f89b7adef4b086372e4faa33b27218c314b2acbc5943cb246" + sha256 x86_64_linux: "b9d9a667b5f140032db12e1384be61894be2bc94340bba0fd08dfcfd5ec16031" + end + + depends_on "nkf" => :build + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "ncurses" + + # Don't remove save folder + skip_clean "libexec/save" + + def install + # Build everything in-order; no multi builds. + ENV.deparallelize + ENV.O0 + + # Enable wizard mode for all users + inreplace "sys/unix/sysconf", /^WIZARDS=.*/, "WIZARDS=*" + + platform = OS.mac? ? "macosx10.10" : OS.kernel_name.downcase + + # Only this file is touched by jNetHack, so don't switch on macOS versions + inreplace "sys/unix/hints/#{platform}" do |s| + # macOS clang doesn't support code page 932 + s.gsub! "-fexec-charset=cp932", "" if OS.mac? + s.change_make_var! "HACKDIR", libexec + s.change_make_var! "CHOWN", "true" + s.change_make_var! "CHGRP", "true" + # Setting VAR_PLAYGROUND preserves saves across upgrades. With a bit of + # work this could share leaderboards with English NetHack, however bones + # and save files are much tricker. We could set those separately but + # it's probably not worth the extra trouble. New curses backend is not + # supported by jNetHack. + replace_string = OS.mac? ? "#WANT_WIN_CURSES=1" : "#CFLAGS+=-DEXTRA_SANITY_CHECKS" + s.gsub! replace_string, "CFLAGS+=-DVAR_PLAYGROUND='\"#{HOMEBREW_PREFIX}/share/jnethack\"'" + end + + # We use the Linux version due to code page 932 issues, but point the + # hints file to macOS + inreplace "japanese/set_lnx.sh", "linux", "macosx10.10" if OS.mac? + system "sh", "japanese/set_lnx.sh" + system "make", "install" + bin.install_symlink libexec/"jnethack" + end + + def post_install + # These need to exist (even if empty) otherwise NetHack won't start + savedir = HOMEBREW_PREFIX/"share/jnethack" + 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/"jnethack", "-s" + assert_match (HOMEBREW_PREFIX/"share/jnethack").to_s, + shell_output("#{bin}/jnethack --showpaths") + end +end diff --git a/Formula/j/jnettop.rb b/Formula/j/jnettop.rb new file mode 100644 index 0000000000000..dc8f88d274450 --- /dev/null +++ b/Formula/j/jnettop.rb @@ -0,0 +1,63 @@ +class Jnettop < Formula + desc "View hosts/ports taking up the most network traffic" + homepage "https://sourceforge.net/projects/jnettop/" + url "https://downloads.sourceforge.net/project/jnettop/jnettop/0.13/jnettop-0.13.0.tar.gz" + sha256 "a005d6fa775a85ff9ee91386e25505d8bdd93bc65033f1928327c98f5e099a62" + license "GPL-2.0-or-later" + revision 2 + + livecheck do + url :stable + regex(%r{url=.*?/jnettop[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "9660bd7bea038b091d0e0fdee7bbc5daf4c764ef2869282e6bf8e619f4a8d3f0" + sha256 cellar: :any, arm64_sonoma: "a06b56e12cf6bb3d313090095bdcc0b3e899d23dcd122cc80af8c36e4ba6b474" + sha256 cellar: :any, arm64_ventura: "d9309bcae09fec8961c974c65107b4d6cab9761d171c7d4d54cd0c8bc7842337" + sha256 cellar: :any, arm64_monterey: "f2c6e3fed7a82f036acdf944ac6f27d11946995d961be3a0e804b8a9099a946a" + sha256 cellar: :any, arm64_big_sur: "1f1f3c5e26f7fc52b331300926a4aa93e1081b31cc20cb533f9b0791477cc101" + sha256 cellar: :any, sonoma: "9cd2a14ec9e61fff8a91107b290aa603066f3f613cd3a95c9c7311eb3355e307" + sha256 cellar: :any, ventura: "a37b6e72480a3c0945b6e13fb651e2797199aeae23fe73e85804e84c3b1db723" + sha256 cellar: :any, monterey: "9e14b85dd45a7b23d5548948dff568bde0f0db0ec59c91baff292c896c804423" + sha256 cellar: :any, big_sur: "1a077d39b05adcb4ba5a5e777e6ff054ad3b910876ff3d49172057f050e8b39c" + sha256 cellar: :any, catalina: "13d9effd79e9b18faa659af615a7b68c7a940adf5eaee5e30806553e1a237f0f" + sha256 cellar: :any, mojave: "5b4a91804760ca7e39c76cbd16cd7612ed002d429f8996004e1da49d92839c1a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a06d489b070670f237da6659aa5c1803bd5ec72b8b07540b00b14d392879402c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e3617c2641b35e01517e783554157ece0999367fccf494fc9824618277464eb" + end + + depends_on "pkgconf" => :build + depends_on "glib" + + uses_from_macos "libpcap" + uses_from_macos "ncurses" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "berkeley-db@5" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + + # Fix undefined reference to `g_thread_init' + if OS.linux? + inreplace "Makefile.in", "$(jnettop_LDFLAGS) $(jnettop_OBJECTS)", + "$(jnettop_OBJECTS) $(AM_LDFLAGS) $(LDFLAGS) $(jnettop_LDFLAGS)" + end + + system "./configure", "--man=#{man}", *std_configure_args + system "make", "install" + end + + test do + # need sudo access to capture packets + assert_match version.to_s, shell_output("#{bin}/jnettop --version") + end +end diff --git a/Formula/j/jnv.rb b/Formula/j/jnv.rb new file mode 100644 index 0000000000000..79670ad686a5b --- /dev/null +++ b/Formula/j/jnv.rb @@ -0,0 +1,36 @@ +class Jnv < Formula + desc "Interactive JSON filter using jq" + homepage "https://github.com/ynqa/jnv" + url "https://github.com/ynqa/jnv/archive/refs/tags/v0.6.0.tar.gz" + sha256 "8220bf433728b57ddb174920a48c1750c5087b52154567074020b6800d6579d3" + license "MIT" + head "https://github.com/ynqa/jnv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "868d0e7996d85cc836e6c960afdeb90c99b169ee2c23e0070988e8957439cd4b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dcdfa08801f21e518a4266af55108d88408b25dbf74a5dc454997bf973458ba5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6aa1d7c82025eb2e7f3bfdcc9a9a0f18b71336048df06cc4798b5d93f3fbd944" + sha256 cellar: :any_skip_relocation, sonoma: "462b69793597865aa518a58d74c292897b48a240e5a674bd27012de6ef69741d" + sha256 cellar: :any_skip_relocation, ventura: "fe8abec51096410939da83933523f5a2dd2be3f5eb5e7c3a24cebf7439ce6876" + sha256 cellar: :any_skip_relocation, arm64_linux: "133259d9690645a87aab683e8d09a6e7f269df570f15cf6c91a427ca04f120d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5bea05489eb962c26df754b18931fb62752d741db352789d64b4199ba666da71" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output(bin/"jnv --version") + + output = pipe_output("#{bin}/jnv 2>&1", "homebrew", 1) + expected_output = if OS.mac? + "Error: The cursor position could not be read within a normal duration" + else + "Error: No such device or address" + end + assert_match expected_output, output + end +end diff --git a/Formula/j/jo.rb b/Formula/j/jo.rb new file mode 100644 index 0000000000000..5842a03ae81fa --- /dev/null +++ b/Formula/j/jo.rb @@ -0,0 +1,37 @@ +class Jo < Formula + desc "JSON output from a shell" + homepage "https://github.com/jpmens/jo" + url "https://github.com/jpmens/jo/releases/download/1.9/jo-1.9.tar.gz" + sha256 "0195cd6f2a41103c21544e99cd9517b0bce2d2dc8cde31a34867977f8a19c79f" + license all_of: ["GPL-2.0-or-later", "MIT"] + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "92ff2f6f6fb52d6ceb30e458a3a402eb49094671947f028a2abe78dc822ffd58" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd76f20d3d909585dd3341f1776e8fd9869c4c52d06f67e7d8583a0e230846e4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f76a57de3814c4a9b5fb87fb9e63e6d20cca457a94467783033b27d293229bc7" + sha256 cellar: :any_skip_relocation, sonoma: "9698e023bb10fc36d11eab06ef66d5abf087b0cb247c13ac363fd97afa2cdf6f" + sha256 cellar: :any_skip_relocation, ventura: "c654746fff530ccfe66809a4eff3d15f0f29cee2fed75abf7e1296a4c539321f" + sha256 cellar: :any_skip_relocation, arm64_linux: "e4aca359801025e506796ecf3bd3aa58077b599244f6d210e1562c5354420eb5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd4209b90b9732f0602cdbbaf598f1cc61676dcdb2fc7e0ee7c094a290555fad" + end + + head do + url "https://github.com/jpmens/jo.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + bash_completion.install bash_completion/"jo.bash" => "jo" + end + + test do + assert_equal %Q({"success":true,"result":"pass"}\n), shell_output("#{bin}/jo success=true result=pass") + end +end diff --git a/Formula/j/jobber.rb b/Formula/j/jobber.rb new file mode 100644 index 0000000000000..d704967634c97 --- /dev/null +++ b/Formula/j/jobber.rb @@ -0,0 +1,57 @@ +class Jobber < Formula + desc "Alternative to cron, with better status-reporting and error-handling" + homepage "https://dshearer.github.io/jobber/" + url "https://github.com/dshearer/jobber/archive/refs/tags/v1.4.4.tar.gz" + sha256 "fd88a217a413c5218316664fab5510ace941f4fdb68dcb5428385ff09c68dcc2" + license "MIT" + head "https://github.com/dshearer/jobber.git", branch: "master" + + bottle do + rebuild 1 + sha256 arm64_sequoia: "fc6d39f5ff894aca7a8c037fcb599a2aaa4c5293614e56d6c4aaa6edca572be2" + sha256 arm64_sonoma: "b304010d591795e383764a1bc522eb495dfbe61dd6d864393443f3e8a08e4f91" + sha256 arm64_ventura: "bf6c94807680d1fefa82b1a1bda602454ccd86a6981ef3d4042cac8beaf209c0" + sha256 arm64_monterey: "14087e07df78fd1e53fa44cc873df0db56eee9b0c89154161ee1a4c617c8ae9d" + sha256 arm64_big_sur: "c751dfdc4e8a2336eb4441dde62d3fc83d8ca869fe95e4804cecb99112551361" + sha256 sonoma: "61efe802a50d3eeb5183a2643bf2f48f6c4405e667a9796b5597baf7dd35c181" + sha256 ventura: "52cb55ed06ba90923ec1fc7c022b653bd48138c233f35d0d7fd2efa7b86b152e" + sha256 monterey: "d54b324e8914c637f54418851308b825241d2c3142c8c13e9a6316ff31ab6e99" + sha256 big_sur: "669af998fd35ba85849f725ba8360cffbadfba87a8bd5f7adc43aa3a830caba5" + sha256 catalina: "993170495768a40b7f86927bfc14a66397b9109c3d9520815727f0123409b1e0" + sha256 mojave: "3767f3c9fa38a4ad1d8df745f8e5451bef3fea39e0f758a081e414f7d87feafa" + sha256 x86_64_linux: "e8d9630a84c0fce0514498c0379961df72d461ad3eb2d82847b66ea34732188c" + end + + depends_on "go" => :build + + def install + system "./configure", "--prefix=#{prefix}", "--libexecdir=#{libexec}", "--sysconfdir=#{etc}", + "--localstatedir=#{var}" + system "make", "install" + end + + service do + run opt_libexec/"jobbermaster" + keep_alive true + require_root true + log_path var/"log/jobber.log" + error_log_path var/"log/jobber.log" + end + + test do + (testpath/".jobber").write <<~EOS + version: 1.4 + jobs: + Test: + cmd: 'echo "Hi!" > "#{testpath}/output"' + time: '*' + EOS + + fork do + exec libexec/"jobberrunner", "#{testpath}/.jobber" + end + sleep 3 + + assert_match "Hi!", (testpath/"output").read + end +end diff --git a/Formula/j/joe.rb b/Formula/j/joe.rb new file mode 100644 index 0000000000000..18b918ce4fb5f --- /dev/null +++ b/Formula/j/joe.rb @@ -0,0 +1,42 @@ +class Joe < Formula + desc "Full featured terminal-based screen editor" + homepage "https://joe-editor.sourceforge.io/" + url "https://downloads.sourceforge.net/project/joe-editor/JOE%20sources/joe-4.6/joe-4.6.tar.gz" + sha256 "495a0a61f26404070fe8a719d80406dc7f337623788e445b92a9f6de512ab9de" + license "GPL-1.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/joe[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "f38fa4459c7448db87ddfa85c7baeb98202c4e8b64b189607606f1fce906bef5" + sha256 arm64_sonoma: "3ec4da98c72ff269ce6a608524a8463ec43ed55c081b859f0b172cb44ad1dad2" + sha256 arm64_ventura: "5e8ac5942ca4dd172e198fe4f756d9b8bfb7f614766485dbf361aa77c6843c42" + sha256 arm64_monterey: "affefc197630adfb4ae357d8e144dabd0920022d9b9a9e4a3cad537629c3048b" + sha256 arm64_big_sur: "24bd1c0ba2e1f70bf85d2cf403612dfefed70fa1d1441121e560184146b8a036" + sha256 sonoma: "80843ad7715fd67b88449dfcf1db5e28b2f99ebb953503d11353c179b5b835de" + sha256 ventura: "910933a1873d8f2debe547b5f6f2ff67726938e73d2dd79a060088637cf34b69" + sha256 monterey: "4eca39a7205e80d0be7c9eacad34c1af5c2b2f7ac062b803a7245762efec9498" + sha256 big_sur: "f108312e44e035b6475a7dc91096eb65cea4567cf00a9ad9b21f69da06af65ec" + sha256 catalina: "ec0e97a7a7ce9b63775dcc978f23efe2780a7319f1746246b092378f04e2caf6" + sha256 arm64_linux: "4b9a2c586152f8f8b238b0ea531b5dc7982eeb2b5cc7e3bb76d7ce32c87cc96d" + sha256 x86_64_linux: "ca9c9790b7d1c6b64cec4974c90d6855bd2e977b80399a7240d2a3392551a874" + end + + conflicts_with "jupp", because: "both install the same binaries" + + def install + # fix implicit declaration errors https://sourceforge.net/p/joe-editor/bugs/408/ + inreplace "joe/tty.c", "#include \"types.h\"", "#include \"types.h\"\n#include " if OS.mac? + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match "Joe's Own Editor v#{version}", shell_output("TERM=tty #{bin}/joe -help") + end +end diff --git a/Formula/j/joern.rb b/Formula/j/joern.rb new file mode 100644 index 0000000000000..ff01822a8ff66 --- /dev/null +++ b/Formula/j/joern.rb @@ -0,0 +1,68 @@ +class Joern < Formula + desc "Open-source code analysis platform based on code property graphs" + homepage "https://joern.io/" + url "https://github.com/joernio/joern/archive/refs/tags/v4.0.350.tar.gz" + sha256 "6db653308c64adebbeab897e669d2694c23da74c199c46fac1ba639dc13541f0" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + throttle 10 + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5fa1e17efad83113128dd5c3e5b50fb8c97bc1690c99395e450a6e731dea1f13" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5fa1e17efad83113128dd5c3e5b50fb8c97bc1690c99395e450a6e731dea1f13" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9568db3c6f0ac665f590321bce14af3de3f248c40bfdb3d9d76f41b321e2cc04" + sha256 cellar: :any_skip_relocation, sonoma: "c240e39dbf2299dc801f3e1a8508b08653fe71fcb0e34e9c6fead688bc240b7f" + sha256 cellar: :any_skip_relocation, ventura: "cc5758d8ed9b0189497fbe4840690028a872ecaef3b08b9beac403afb40b7cff" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2bbbb2f2a0274e67f3f49eb64fa7d434626256521310d49563fe7bff302d7c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5a616205aa0eade3cb2dee3616c6928841a5138109c1e8b5e514ce5657aea3b2" + end + + depends_on "sbt" => :build + depends_on "astgen" + depends_on "coreutils" + depends_on "openjdk" + depends_on "php" + + uses_from_macos "zlib" + + def install + system "sbt", "stage" + + cd "joern-cli/target/universal/stage" do + rm(Dir["**/*.bat"]) + libexec.install Pathname.pwd.children + end + + # Remove incompatible pre-built binaries + os = OS.mac? ? "macos" : OS.kernel_name.downcase + astgen_suffix = Hardware::CPU.intel? ? [os] : ["#{os}-#{Hardware::CPU.arch}", "#{os}-arm"] + libexec.glob("frontends/{csharp,go,js}src2cpg/bin/astgen/{dotnet,go,}astgen-*").each do |f| + f.unlink unless f.basename.to_s.end_with?(*astgen_suffix) + end + + libexec.children.select { |f| f.file? && f.executable? }.each do |f| + (bin/f.basename).write_env_script f, Language::Java.overridable_java_home_env + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + void print_number(int x) { + std::cout << x << std::endl; + } + + int main(void) { + print_number(42); + return 0; + } + CPP + + assert_match "Parsing code", shell_output("#{bin}/joern-parse test.cpp") + assert_path_exists testpath/"cpg.bin" + end +end diff --git a/Formula/j/john-jumbo.rb b/Formula/j/john-jumbo.rb new file mode 100644 index 0000000000000..ac38590232e51 --- /dev/null +++ b/Formula/j/john-jumbo.rb @@ -0,0 +1,109 @@ +class JohnJumbo < Formula + desc "Enhanced version of john, a UNIX password cracker" + homepage "https://www.openwall.com/john/" + url "https://openwall.com/john/k/john-1.9.0-jumbo-1.tar.xz" + version "1.9.0" + sha256 "f5d123f82983c53d8cc598e174394b074be7a77756f5fb5ed8515918c81e7f3b" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://github.com/openwall/john.git" + regex(/^v?(\d+(?:\.\d+)+)-jumbo-\d$/i) + end + + bottle do + rebuild 2 + sha256 arm64_sequoia: "60a5968b96000102a72df069793e756067af2b87d862ce01b9cd1e24bb1a4b05" + sha256 arm64_sonoma: "865c20ab8f23bf0c8213cc88014e36bf907f17a9f924d477d4866e8ea0e76e64" + sha256 arm64_ventura: "f70a5308db1137f69fa0da915a2d4898453db9339467044b224b64df1c9feb53" + sha256 sonoma: "9579793b2cc5a9f493d4f45e92c509981dad449817f390df62fad67163656bd1" + sha256 ventura: "5a03775927f3e4d2bbb843ba2fb614674f2342143d5e6b0644ceb852e7ad8da7" + sha256 arm64_linux: "83af0cd09a6c71fc6b6a424a3346907678d9846c6e625c19148db1ce8dce05d2" + sha256 x86_64_linux: "9c218a9de0a672e13bd10012a4b7f6257bb1cb9e4e3c094b8444ade22cefb2d2" + end + + depends_on "pkgconf" => :build + depends_on "gmp" + depends_on "openssl@3" + + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + conflicts_with "john", because: "both install the same binaries" + + # Fixed setup `-mno-sse4.1` for some machines. + # See details for example from here: https://github.com/openwall/john/pull/4100 + patch do + url "https://github.com/openwall/john/commit/a537bbca37c1c2452ffcfccea6d2366447ec05c2.patch?full_index=1" + sha256 "bb6cfff297f1223dd1177a515657b8f1f780c55f790e5b6e6518bb2cb0986b7b" + end + + # Fixed setup of openssl@1.1 over series of patches + # See details for example from here: https://github.com/openwall/john/pull/4101 + patch do + url "https://github.com/openwall/john/commit/4844c79bf43dbdbb6ae3717001173355b3de5517.patch?full_index=1" + sha256 "8469b8eb1d880365121491d45421d132b634983fdcaf4028df8ae8b9085c98ae" + end + patch do + url "https://github.com/openwall/john/commit/26750d4cff0e650f836974dc3c9c4d446f3f8d0e.patch?full_index=1" + sha256 "43d259266b6b986a0a3daff484cfb90214ca7f57cd4703175e3ff95d48ddd3e2" + end + patch do + url "https://github.com/openwall/john/commit/f03412b789d905b1a8d50f5f4b76d158b01c81c1.patch?full_index=1" + sha256 "65a4aacc22f82004e102607c03149395e81c7b6104715e5b90b4bbc016e5e0f7" + end + + # Upstream M1/ARM64 Support. + # Combined diff of the following four commits, minus the doc changes + # that block this formula from using these commits otherwise. + # https://github.com/openwall/john/commit/d6c87924b85323b82994ce01724d6e458223fd36 + # https://github.com/openwall/john/commit/d531f97180a6e5ae52e21db177727a17a76bd2b4 + # https://github.com/openwall/john/commit/c9825e688d1fb9fdd8942ceb0a6b4457b0f9f9b4 + # https://github.com/openwall/john/commit/716279addd5a0870620fac8a6e944916b2228cc2 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/50a00afbf4549fbc0ffd3855c884f7d045cf4f93/john-jumbo/john_jumbo_m1.diff" + sha256 "6658f02056fd6d54231d3fdbf84135b32d47c09345fc07c6f861a1feebd00902" + end + + # Fix alignment compile errors on GCC 11. Remove in the next release + patch do + url "https://github.com/openwall/john/commit/8152ac071bce1ebc98fac6bed962e90e9b92d8cf.patch?full_index=1" + sha256 "efb4e3597c47930d63f51efbf18c409f436ea6bd0012a4290b05135a54d7edd4" + end + + def install + ENV.append "CFLAGS", "-DJOHN_SYSTEMWIDE=1" + ENV.append "CFLAGS", "-DJOHN_SYSTEMWIDE_EXEC='\"#{share}/john\"'" + ENV.append "CFLAGS", "-DJOHN_SYSTEMWIDE_HOME='\"#{share}/john\"'" + + if build.bottle? && Hardware::CPU.intel? && (!OS.mac? || !MacOS.version.requires_sse4?) + ENV.append "CFLAGS", "-mno-sse4.1" + end + + ENV["OPENSSL_LIBS"] = "-L#{Formula["openssl@3"].opt_lib}" + ENV["OPENSSL_CFLAGS"] = "-I#{Formula["openssl@3"].opt_include}" + + cd "src" do + system "./configure", "--disable-native-tests" + system "make", "clean" + system "make" + end + + doc.install Dir["doc/*"] + + # Only symlink the main binary into bin + (share/"john").install Dir["run/*"] + bin.install_symlink share/"john/john" + + bash_completion.install share/"john/john.bash_completion" => "john" + zsh_completion.install share/"john/john.zsh_completion" => "_john" + end + + test do + touch "john2.pot" + (testpath/"test").write "dave:#{`printf secret | /usr/bin/openssl md5 -r | cut -d' ' -f1`}" + assert_match(/secret/, shell_output("#{bin}/john --pot=#{testpath}/john2.pot --format=raw-md5 test")) + assert_match(/secret/, (testpath/"john2.pot").read) + end +end diff --git a/Formula/j/john.rb b/Formula/j/john.rb new file mode 100644 index 0000000000000..71bedd2726335 --- /dev/null +++ b/Formula/j/john.rb @@ -0,0 +1,67 @@ +class John < Formula + desc "Featureful UNIX password cracker" + homepage "https://www.openwall.com/john/" + url "https://www.openwall.com/john/k/john-1.9.0.tar.xz" + sha256 "0b266adcfef8c11eed690187e71494baea539efbd632fe221181063ba09508df" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?john[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "838f0767e0ffb76971a2a0c05c76edb7c0bcd457446ac25eb6b6ac003668197e" + sha256 arm64_sonoma: "01e64e35c816560c4a058c4686fa08b821dee81418b56560ab8afdb42d83a567" + sha256 arm64_ventura: "08bdd817308d691493a5766687aef952d5f2310bed7342b0f8f9a6de10d9a73d" + sha256 sonoma: "5bcb36b0fe61d6b2b432944ce913e6f04230ea487b857d931555cba2ab6d37f1" + sha256 ventura: "452c5df9c3715d40aa5297a1b3b07f53eb03cff46601f4293904a9d07335d473" + sha256 arm64_linux: "24e50afd7e32fae180e8cc88443bb9fbf2328f39e427e7f3999cba7a8cd8d085" + sha256 x86_64_linux: "5eed6eadc7ebee51813a7909faf2d436c7c66291f20e0ef1880936faa8b03269" + end + + uses_from_macos "libxcrypt" + + conflicts_with "john-jumbo", because: "both install the same binaries" + + # Backport of official patch from jumbo fork (https://www.openwall.com/lists/john-users/2016/01/04/1) + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/cd039571f9a3e9ecabbe68bdfb443e3abaae6270/john/1.9.0.patch" + sha256 "3137169c7f3c25bf58a4f4db46ddf250e49737fc2816a72264dfe87a7f89b6a1" + end + + def install + inreplace "src/params.h" do |s| + s.gsub!(/#define JOHN_SYSTEMWIDE[[:space:]]*0/, "#define JOHN_SYSTEMWIDE 1") + s.gsub!(/#define JOHN_SYSTEMWIDE_EXEC.*/, "#define JOHN_SYSTEMWIDE_EXEC \"#{pkgshare}\"") + s.gsub!(/#define JOHN_SYSTEMWIDE_HOME.*/, "#define JOHN_SYSTEMWIDE_HOME \"#{pkgshare}\"") + end + + ENV.deparallelize + + target = if OS.mac? + "macosx-x86-64" + else + "linux-x86-64" + end + + system "make", "-C", "src", "clean", "CC=#{ENV.cc}", target + + prefix.install "doc/README" + doc.install Dir["doc/*"] + %w[john unafs unique unshadow].each do |b| + bin.install "run/#{b}" + end + pkgshare.install Dir["run/*"] + end + + test do + (testpath/"passwd").write <<~EOS + root:$1$brew$dOoH2.7QsPufgT8T.pihw/:0:0:System Administrator:/var/root:/bin/sh + EOS + system bin/"john", "--wordlist=#{pkgshare}/password.lst", "passwd" + assert_match(/snoopy/, shell_output("#{bin}/john --show passwd")) + end +end diff --git a/Formula/j/johnnydep.rb b/Formula/j/johnnydep.rb new file mode 100644 index 0000000000000..d5a2926de2834 --- /dev/null +++ b/Formula/j/johnnydep.rb @@ -0,0 +1,82 @@ +class Johnnydep < Formula + include Language::Python::Virtualenv + + desc "Display dependency tree of Python distribution" + homepage "https://github.com/wimglenn/johnnydep" + url "https://files.pythonhosted.org/packages/96/70/9c3b8bc5ef6620efd46fd3b075439a8068637f4b4176a59d81e9d2373685/johnnydep-1.20.6.tar.gz" + sha256 "751a1d74d81992c45b31d4094ef42ec4287b0628a443d02a21523f1175b82e2f" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "f8a1c7e9a1e998a436515dee6d884184825809cb8b28e0e3ada0535741623cd2" + sha256 cellar: :any, arm64_sonoma: "0129fb3e931ed3daf34bc8a3f8ee2f8c977f5bca3715e2217bcebf4b892cee40" + sha256 cellar: :any, arm64_ventura: "e2db6a6d86bd35707bcb6c59374ec6c2e2028762608f277765c5c231ef7968f5" + sha256 cellar: :any, sonoma: "91989a32152c46c1679308e47df4f09324d553c367bb6a8831e10c28d6219d9e" + sha256 cellar: :any, ventura: "16c7f002b8f7e9b8c62f364bd7eef09fd86d1b97d71527eae9fd3ceba81a7840" + sha256 cellar: :any_skip_relocation, arm64_linux: "abf004439db78ed17e882aabbaea88c03f86de37985d2cc31673fcffcee291e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e599029b28fd894192f6cc5fc57df31f6e1b3bf3d2ceae69aa8763c3037a352" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "anytree" do + url "https://files.pythonhosted.org/packages/bc/a8/eb55fab589c56f9b6be2b3fd6997aa04bb6f3da93b01154ce6fc8e799db2/anytree-2.13.0.tar.gz" + sha256 "c9d3aa6825fdd06af7ebb05b4ef291d2db63e62bb1f9b7d9b71354be9d362714" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/6c/81/3747dad6b14fa2cf53fcf10548cf5aea6913e96fab41a3c198676f8948a5/cachetools-5.5.2.tar.gz" + sha256 "1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4" + end + + resource "oyaml" do + url "https://files.pythonhosted.org/packages/00/71/c721b9a524f6fe6f73469c90ec44784f0b2b1b23c438da7cc7daac1ede76/oyaml-1.0.tar.gz" + sha256 "ed8fc096811f4763e1907dce29c35895d6d5936c4d0400fe843a91133d4744ed" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "structlog" do + url "https://files.pythonhosted.org/packages/78/b8/d3670aec25747e32d54cd5258102ae0d69b9c61c79e7aa326be61a570d0d/structlog-25.2.0.tar.gz" + sha256 "d9f9776944207d1035b8b26072b9b140c63702fd7aa57c2f85d28ab701bd8e92" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + resource "toml" do + url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" + sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz" + sha256 "661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729" + end + + resource "wimpy" do + url "https://files.pythonhosted.org/packages/6e/bc/88b1b2abdd0086354a54fb0e9d2839dd1054b740a3381eb2517f1e0ace81/wimpy-0.6.tar.gz" + sha256 "5d82b60648861e81cab0a1868ae6396f678d7eeb077efbd7c91524de340844b3" + end + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/johnnydep -v0 --output-format=pinned pip==25.0.1") + assert_match "pip==25.0.1", output + end +end diff --git a/Formula/j/joker.rb b/Formula/j/joker.rb new file mode 100644 index 0000000000000..ae036ee9922c1 --- /dev/null +++ b/Formula/j/joker.rb @@ -0,0 +1,40 @@ +class Joker < Formula + desc "Small Clojure interpreter, linter and formatter" + homepage "https://joker-lang.org/" + url "https://github.com/candid82/joker/archive/refs/tags/v1.4.1.tar.gz" + sha256 "041535d734db2927aa8c32794c012fd1636d2a5aec15aaf2e7b2f33fc8973808" + license "EPL-1.0" + head "https://github.com/candid82/joker.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "69cf78e5e0c26b880056f48624622827ee4c2204a9233d24726a66bdacd1d1a8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69cf78e5e0c26b880056f48624622827ee4c2204a9233d24726a66bdacd1d1a8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "69cf78e5e0c26b880056f48624622827ee4c2204a9233d24726a66bdacd1d1a8" + sha256 cellar: :any_skip_relocation, sonoma: "81f87cda13426f96a91bc65de5a0b4e4adec4bcd742d7aae4c5e2f742197eeea" + sha256 cellar: :any_skip_relocation, ventura: "81f87cda13426f96a91bc65de5a0b4e4adec4bcd742d7aae4c5e2f742197eeea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ad596d08da5809cb57325e07aeff635d96f459ea686310c26157251888a5677" + end + + depends_on "go" => :build + + def install + system "go", "generate", "./..." + system "go", "build", *std_go_args + end + + test do + test_file = testpath/"test.clj" + test_file.write <<~CLOJURE + (ns brewtest) + (defn -main [& args] + (let [a 1])) + CLOJURE + + system bin/"joker", "--format", test_file + output = shell_output("#{bin}/joker --lint #{test_file} 2>&1", 1) + assert_match "Parse warning: let form with empty body", output + assert_match "Parse warning: unused binding: a", output + + assert_match version.to_s, shell_output("#{bin}/joker -v 2>&1") + end +end diff --git a/Formula/j/jolie.rb b/Formula/j/jolie.rb new file mode 100644 index 0000000000000..4e9cbcc3714a1 --- /dev/null +++ b/Formula/j/jolie.rb @@ -0,0 +1,64 @@ +class Jolie < Formula + desc "Service-oriented programming language" + homepage "https://www.jolie-lang.org/" + url "https://github.com/jolie/jolie/releases/download/v1.12.5/jolie-1.12.5.jar" + sha256 "69dfaf3724da1202a10e0a44068778da8b5c2258f0e7166365ea7e9522320de8" + license "LGPL-2.1-only" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "690e57262402203f7eea7feeeb08cb23c8f6ddc4c6680c998d1b141ed42b4ec2" + end + + depends_on "openjdk" + + def install + system Formula["openjdk"].opt_bin/"java", + "-jar", "jolie-#{version}.jar", + "--jolie-home", libexec, + "--jolie-launchers", libexec/"bin" + bin.install Dir["#{libexec}/bin/*"] + bin.env_script_all_files libexec/"bin", + JOLIE_HOME: "${JOLIE_HOME:-#{libexec}}", + JAVA_HOME: "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" + end + + test do + file = testpath/"test.ol" + file.write <<~EOS + from console import Console, ConsoleIface + + interface PowTwoInterface { OneWay: powTwo( int ) } + + service main(){ + + outputPort Console { interfaces: ConsoleIface } + embed Console in Console + + inputPort In { + location: "local://testPort" + interfaces: PowTwoInterface + } + + outputPort Self { + location: "local://testPort" + interfaces: PowTwoInterface + } + + init { + powTwo@Self( 4 ) + } + + main { + powTwo( x ) + println@Console( x * x )() + } + + } + EOS + + out = shell_output("#{bin}/jolie #{file}").strip + + assert_equal "16", out + end +end diff --git a/Formula/j/joplin-cli.rb b/Formula/j/joplin-cli.rb new file mode 100644 index 0000000000000..5ba4087ada346 --- /dev/null +++ b/Formula/j/joplin-cli.rb @@ -0,0 +1,61 @@ +class JoplinCli < Formula + desc "Note taking and to-do application with synchronization capabilities" + homepage "https://joplinapp.org/" + url "https://registry.npmjs.org/joplin/-/joplin-3.3.1.tgz" + sha256 "b0cc8590966d01eaa5a5d60bdec870ed51c342c80b1ebcbfb33eef222a1c4b01" + license "MIT" + + bottle do + sha256 arm64_sequoia: "76470d9d9c29307d8b35f53a13a7754fc6575d78386de65caaa91ab3ca9f3527" + sha256 arm64_sonoma: "6f3c853e5d2f9be1bd6f0266fbb64be2c7018cbca3d3577adbd75c1f95ee538a" + sha256 arm64_ventura: "36d5c93be1e4e9db96eb44ea46e3d20ddc68540474e3233e57581cf35fa7b9ff" + sha256 sonoma: "f18ca7fe37ccf6a4744fa00541bf8fabb95fffcc5907eb9f8403cb9d8ae91d70" + sha256 ventura: "44a51b383c515b2634a21c66ac5c96d45a39832db7bb55aade89b822b44a6f39" + sha256 cellar: :any_skip_relocation, arm64_linux: "9fa082d02615325e6393d5d1d559c1f6243fb165240a7f7a396c23a4b235a5db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9738157fd59266c3a6622d6444de5446d3c5fdbfb1c1ef0ec983e57b3478659" + end + + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build # for node-gyp + depends_on "python@3.13" => :build + depends_on "glib" + depends_on "node" + depends_on "sqlite" + depends_on "vips" + + on_macos do + depends_on "gettext" + depends_on "terminal-notifier" + end + + on_linux do + depends_on "libsecret" + end + + def install + # Need node-addon-api v7+: https://github.com/lovell/sharp/issues/3920 + system "npm", "add", "node-addon-api@8.0.0" + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + + node_notifier_vendor_dir = libexec/"lib/node_modules/joplin/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 + + # All joplin commands rely on the system keychain and so they cannot run + # unattended. The version command was specially modified in order to allow it + # to be run in homebrew tests. Hence we test with `joplin version` here. This + # does assert that joplin runs successfully on the environment. + test do + assert_match "joplin #{version}", shell_output("#{bin}/joplin version") + end +end diff --git a/Formula/j/jose.rb b/Formula/j/jose.rb new file mode 100644 index 0000000000000..4b876e467c348 --- /dev/null +++ b/Formula/j/jose.rb @@ -0,0 +1,51 @@ +class Jose < Formula + desc "C-language implementation of Javascript Object Signing and Encryption" + homepage "https://github.com/latchset/jose" + url "https://github.com/latchset/jose/releases/download/v14/jose-14.tar.xz" + sha256 "cee329ef9fce97c4c025604a8d237092f619aaa9f6d35fdf9d8c9052bc1ff95b" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2bc631abff8a3ef0688dad54e842ea31860feb6c6b4b4ea01fcc3a22044dd16d" + sha256 cellar: :any, arm64_sonoma: "1af1eb0f697cd897bbedac36674670646b82cae369c752f4718500f5f1f324ef" + sha256 cellar: :any, arm64_ventura: "77b2d20d1a63a7f669930cdb9d8804722ed939a10efa9634c1f7635e61643634" + sha256 cellar: :any, arm64_monterey: "4e01f021271f496483c1ce088c3c717eca63cee78498a2ecc778ca75e65f76bd" + sha256 cellar: :any, sonoma: "8bf8223dfd601b5631333198719e64e9c7b529e4a5d9e86192d181d6c8926f99" + sha256 cellar: :any, ventura: "1a670df4a652c8ffd615947a16be8a8867135d4b34e2081744a075c898d6cd79" + sha256 cellar: :any, monterey: "4301c9a1347a66f4b8065e0e78725bab058a264f1031c35cf4c92881af350492" + sha256 arm64_linux: "8a7e9b9bcc8ad20d55fb7fd4e393d83ecd51962cadcebd467d357ceade17ddf6" + sha256 x86_64_linux: "ebb309c88f0a9cf0d4a2ab3c13015ebecf876991941b9ed6a2de2dbc9f6a7adb" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "jansson" + depends_on "openssl@3" + + uses_from_macos "zlib" + + # Apply upstream PR to fix build on macOS to use `-exported_symbol` + # PR ref: https://github.com/latchset/jose/pull/163 + patch do + url "https://github.com/latchset/jose/commit/228d6782235238ed0d03eb2443caf530b377ffd5.patch?full_index=1" + sha256 "14e147b1541a915badefa46535999c17fe3f04d2ba4754775b928e4d5e97ce1a" + 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/"jose", "jwk", "gen", "-i", '{"alg": "A128GCM"}', "-o", "oct.jwk" + system bin/"jose", "jwk", "gen", "-i", '{"alg": "RSA1_5"}', "-o", "rsa.jwk" + system bin/"jose", "jwk", "pub", "-i", "rsa.jwk", "-o", "rsa.pub.jwk" + system "echo hi | #{bin}/jose jwe enc -I - -k rsa.pub.jwk -o msg.jwe" + output = shell_output("#{bin}/jose jwe dec -i msg.jwe -k rsa.jwk 2>&1") + assert_equal "hi", output.chomp + output = shell_output("#{bin}/jose jwe dec -i msg.jwe -k oct.jwk 2>&1", 1) + assert_equal "Unwrapping failed!", output.chomp + end +end diff --git a/Formula/j/joshuto.rb b/Formula/j/joshuto.rb new file mode 100644 index 0000000000000..ac0d961d3bc73 --- /dev/null +++ b/Formula/j/joshuto.rb @@ -0,0 +1,44 @@ +class Joshuto < Formula + desc "Ranger-like terminal file manager written in Rust" + homepage "https://github.com/kamiyaa/joshuto" + license "LGPL-3.0-or-later" + head "https://github.com/kamiyaa/joshuto.git", branch: "main" + + stable do + url "https://github.com/kamiyaa/joshuto/archive/refs/tags/v0.9.8.tar.gz" + sha256 "877d841b2e26d26d0f0f2e6f1dab3ea2fdda38c345abcd25085a3f659c24e013" + + # rust 1.80 build patch + patch do + url "https://github.com/kamiyaa/joshuto/commit/1245124fcd264e25becfd75258840708d7b8b4bb.patch?full_index=1" + sha256 "089a7b5ab92aafa6ed9472328c0ad4401db415cc1b08e102c0751430f0f61465" + end + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "05358a2a7b19b860ee8a0f96183f86587d0db37bb0d3caded154c7cf92c09f42" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ce1ddf54bfdc995486062ed770d1c80f1343c6df4f15bd120fb05ea57633b383" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f514471db634eef5bc7be735708cb9a3d3adc731c0bd17536b9bdf659a2db118" + sha256 cellar: :any_skip_relocation, sonoma: "87d5f791245b275fef1e0ea33481a5ead7ce2ee3ff8b3335d48ccc1ea767e552" + sha256 cellar: :any_skip_relocation, ventura: "e1bf0abd5d2379a4611cf2860282f8d456816c57c103ba59af215499e4a67a95" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea5cf4a2e5805fc10747db4e9b7b5c00a99171bac7967fca974879e0110779ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f5fd70baa48a4e36ac7c6be47c6c4517ddd39af97e88509cd3e0dad8f6efcdc" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + pkgetc.install Dir["config/*.toml"] + + generate_completions_from_executable(bin/"joshuto", "completions") + end + + test do + (testpath/"test.txt").write("Hello World!") + fork { exec bin/"joshuto", "--path", testpath } + + assert_match "joshuto-#{version}", shell_output(bin/"joshuto --version") + end +end diff --git a/Formula/j/jot.rb b/Formula/j/jot.rb new file mode 100644 index 0000000000000..458dc29915731 --- /dev/null +++ b/Formula/j/jot.rb @@ -0,0 +1,39 @@ +class Jot < Formula + desc "Rapid note management for the terminal" + homepage "https://github.com/shashwatah/jot" + url "https://github.com/shashwatah/jot/archive/refs/tags/v0.1.2.tar.gz" + sha256 "d7da3220c29102ee7c51e2a5656ceb6672ae3b85be22c5ddcd176b330c6029c9" + license "MIT" + head "https://github.com/shashwatah/jot.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93a520809e6790b6d9c41fedf1ef0702112bad61affb1b23cf51c9d8ef030cc3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "beec04c6b8b43d679fc4bdfc9d079c2b4ae7fa6d07b526372f37fd56fa52b2b5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "763cda455c13e6b801488dbf52e57ddceddfbf5e24937f247545a44b37558460" + sha256 cellar: :any_skip_relocation, arm64_monterey: "652c81a8996f43e8c8bca51bffa6f2c27f2253aeb3b5d1280628d674de263a97" + sha256 cellar: :any_skip_relocation, sonoma: "75eb2d10462b9b9161c3a6830062fe83ec63907f53b2c1b1f42d11e44d532e62" + sha256 cellar: :any_skip_relocation, ventura: "4b7c7e29dff1a8057b628f43452439d02df492dee6e526269aca874f7158a883" + sha256 cellar: :any_skip_relocation, monterey: "a90a251a9a3a0644dd527374e199e13a70441b3a4020f0db95421b60995f4bb1" + sha256 cellar: :any_skip_relocation, arm64_linux: "85fbebdda3af0b8454bb99e24e6151c2eed317242fc23f0e5737f90b0c446467" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f99f5f3de62fcb33cda952afcfabc511d11bc30614f0795d7d15808ea1b6c13b" + end + + depends_on "rust" => :build + + conflicts_with "json-table", because: "both install `jt` binaries" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"jt", "vault", "testvault", testpath + system bin/"jt", "enter", "testvault" + + system bin/"jt", "note", "testnote" + assert_path_exists testpath/"testvault/testnote.md" + + system bin/"jt", "remove", "note", "testnote" + refute_path_exists testpath/"testvault/testnote.md" + end +end diff --git a/Formula/j/jove.rb b/Formula/j/jove.rb new file mode 100644 index 0000000000000..57df34f1a5ab6 --- /dev/null +++ b/Formula/j/jove.rb @@ -0,0 +1,36 @@ +class Jove < Formula + desc "Emacs-style editor with vi-like memory, CPU, and size requirements" + homepage "https://directory.fsf.org/wiki/Jove" + url "https://github.com/jonmacs/jove/archive/refs/tags/4.17.5.5.tar.gz" + sha256 "4261d7cab02816eb03f3f356a0a2869d7f6168fce53478ede8e5fdd06a9ecfb9" + # license ref, https://github.com/jonmacs/jove/blob/4_17/LICENSE + license :cannot_represent + + bottle do + sha256 arm64_sequoia: "718cb56f6abe1b157dc232e68f311473651619b07d09491ef7515f4879ef79fe" + sha256 arm64_sonoma: "2727f000de388acb8e1d2c1681af7d994e2b3f11b8d9820b485dddf061ec6853" + sha256 arm64_ventura: "6e9cfd50901196b64ab92526a1be8591bfe9d1155b4bac1e40e9c4919b613119" + sha256 sonoma: "e72bb81fde21a1e8681fcfbf6255894438e4169d7b2e7947f83be7ec99a28929" + sha256 ventura: "1a7d7b4b004063ba6099ed680695c1b18ac9f73d3ef83e2b45d703186df468af" + sha256 arm64_linux: "0682f731ffeeaf52b72dc4e5c43f8e22c098ad845d5021f59ed7f4c589d989a7" + sha256 x86_64_linux: "ae68e348cd028def90d76ae9065520fc1f9812874aa0d61fad3274acc09529fc" + end + + uses_from_macos "ncurses" + + on_system :linux, macos: :ventura_or_newer do + depends_on "groff" => :build + end + + def install + bin.mkpath + man1.mkpath + (lib/"jove").mkpath + + system "make", "install", "JOVEHOME=#{prefix}", "DMANDIR=#{man1}" + end + + test do + assert_match "There's nothing to recover.", shell_output("#{lib}/jove/recover") + end +end diff --git a/Formula/j/jp.rb b/Formula/j/jp.rb new file mode 100644 index 0000000000000..f2fd25656bda4 --- /dev/null +++ b/Formula/j/jp.rb @@ -0,0 +1,65 @@ +class Jp < Formula + desc "Dead simple terminal plots from JSON data" + homepage "https://github.com/sgreben/jp" + url "https://github.com/sgreben/jp/archive/refs/tags/1.1.12.tar.gz" + sha256 "8c9cddf8b9d9bfae72be448218ca0e18d24e755d36c915842b12398fefdc7a64" + license "MIT" + head "https://github.com/sgreben/jp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "01da1efbfd32691e7a34fa8e13108bfd327d52cc9b76a349a900df7f3a6411c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7f3a46aca24fd10a6f170d25b5f59ec1247a393f0aa71fa2e6d7d0994f4e3631" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ea0dcfefb673157d2c4492bfa9e2bc012f475e7dfa23e28b6c18ce5805474a59" + sha256 cellar: :any_skip_relocation, arm64_monterey: "37b85d8d9876ffae1cdf4a3897ca558f2586a826a229d9b85d5799b33e338a89" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2aa9562dff431b094f70d345de3957b0732ccb1695647575fe34d027d2130938" + sha256 cellar: :any_skip_relocation, sonoma: "eabebf5cde6cd8194096698286fb9170e265dd0acab15cce4e5ebca0815a7aa3" + sha256 cellar: :any_skip_relocation, ventura: "4ab9a9c62daeea0f88e6fbfaa6fccfb630ff4845f9d6fbf587ba4f2d36a015ba" + sha256 cellar: :any_skip_relocation, monterey: "bc42ad4f32e4380b871408f010259e4e25f10db71d61d7a739a0e4c12325cef0" + sha256 cellar: :any_skip_relocation, big_sur: "821c7e9f81aced60be498ca8820c76c0bc5ae825f1de4d1b1b67a7376e1cff6a" + sha256 cellar: :any_skip_relocation, catalina: "ee325c2512d2a069983175999db20d55c8718fd0f0ea000692e6517ac67b32b9" + sha256 cellar: :any_skip_relocation, mojave: "53127a663b20c7c0ac893d991330ca862a6eaa8f235586019e1b8ac33159bcf3" + sha256 cellar: :any_skip_relocation, high_sierra: "51045489ba9e8790a83a2a366709bd941d3a9e7c190f6c184bcf308b888496b3" + sha256 cellar: :any_skip_relocation, sierra: "b75e4ab3a48e2212babba26a4258645ae55eefa50a9ccac463991b05ce4c08d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "475d898241d31bf3a521ebd1dceec1c13d9772fe049d60bab9efab3bd450f7ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b35ee0680b137a2202b4ce685bbfa80ccd9dca2ec2e7ab550b2f3384b2b8f68" + end + + depends_on "go" => :build + + # Fix build on ARM by adding a corresponding Makefile target + patch :DATA + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "auto" + build_root = buildpath/"src/github.com/sgreben/jp" + build_root.install Dir["*"] + cd build_root do + arch = Hardware::CPU.arch.to_s + os = OS.mac? ? "osx" : OS.kernel_name.downcase + system "make", "binaries/#{os}_#{arch}/jp" + bin.install "binaries/#{os}_#{arch}/jp" + end + end + + test do + pipe_output("#{bin}/jp -input csv -xy '[*][0,1]'", "0,0\n1,1\n", 0) + end +end + +__END__ +diff --git a/Makefile b/Makefile +index adc9d13..664b6af 100644 +--- a/Makefile ++++ b/Makefile +@@ -90,3 +90,10 @@ release/$(APP)_$(VERSION)_linux_arm64.zip: binaries/linux_arm64/$(APP) + + binaries/linux_arm64/$(APP): $(GOFILES) + GOOS=linux GOARCH=arm64 go build -ldflags "-X main.version=$(VERSION)" -o binaries/linux_arm64/$(APP) ./cmd/$(APP) ++ ++release/$(APP)_$(VERSION)_osx_arm64.zip: binaries/osx_arm64/$(APP) ++ mkdir -p release ++ cd ./binaries/osx_arm64 && zip -r -D ../../release/$(APP)_$(VERSION)_osx_arm64.zip $(APP) ++ ++binaries/osx_arm64/$(APP): $(GOFILES) ++ GOOS=darwin GOARCH=arm64 go build -ldflags "-X main.version=$(VERSION)" -o binaries/osx_arm64/$(APP) ./cmd/$(APP) diff --git a/Formula/j/jp2a.rb b/Formula/j/jp2a.rb new file mode 100644 index 0000000000000..01e346e8c77f7 --- /dev/null +++ b/Formula/j/jp2a.rb @@ -0,0 +1,36 @@ +class Jp2a < Formula + desc "Convert JPG images to ASCII" + homepage "https://github.com/Talinx/jp2a" + url "https://github.com/Talinx/jp2a/releases/download/v1.3.2/jp2a-1.3.2.tar.bz2" + sha256 "e2aabc4df8f003035059996f0768b4543fd483ab8cffa5f62286a1d00ddb0439" + license "GPL-2.0-or-later" + version_scheme 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "c57c32d5a9a823615408c17fc7692cf918beac96cd9557c54f905da5803b9f31" + sha256 cellar: :any, arm64_sonoma: "daf37f1570a9e1b2bd46b2cc0ccf57af00a813a0de9022a106e89fc7fe829ddc" + sha256 cellar: :any, arm64_ventura: "1b7dbe456e302277e7ff10a79e3999b35672855ca3a04425cf89572df87bf5b4" + sha256 cellar: :any, sonoma: "1c5b176bba2e8ae0d825761da452a334d11411637342a159fecc6c9add83c5bf" + sha256 cellar: :any, ventura: "e9b1cca5d32321539eec19f0e0c037a8e137cee43448a04b135f620df806478d" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e7349e6c5c24351b4b2881ff6f3b14fa25e8eb7c0301f640a9a5664c8257da8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00f6f42f5d2ef84ddc1a42004e9c44789be388385a454215e02dfa9b07c1bf43" + end + + depends_on "pkgconf" => :build + depends_on "jpeg-turbo" + depends_on "libexif" + depends_on "libpng" + depends_on "webp" + + uses_from_macos "curl" + uses_from_macos "ncurses" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"jp2a", test_fixtures("test.jpg") + end +end diff --git a/Formula/j/jpdfbookmarks.rb b/Formula/j/jpdfbookmarks.rb new file mode 100644 index 0000000000000..ddae77b4e999b --- /dev/null +++ b/Formula/j/jpdfbookmarks.rb @@ -0,0 +1,40 @@ +class Jpdfbookmarks < Formula + desc "Create and edit bookmarks on existing PDF files" + homepage "https://sourceforge.net/projects/jpdfbookmarks/" + url "https://downloads.sourceforge.net/project/jpdfbookmarks/JPdfBookmarks-2.5.2/jpdfbookmarks-2.5.2.tar.gz" + sha256 "8ab51c20414591632e48ad3817e6c97e9c029db8aaeff23d74c219718cfe19f9" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "60bddeddc1d35f34e2bcd8a56d86d52153532cbb26ffaadc4c286f72cae60a82" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d99055fa011a56f11a4fdcdcca268d9a1e7dbb524d0f474142ce2de853c3b21" + sha256 cellar: :any_skip_relocation, arm64_ventura: "13bd17ff83235a1e154915b59a521ffe910ecb2ca4ae837203441813b32eb176" + sha256 cellar: :any_skip_relocation, arm64_monterey: "13bd17ff83235a1e154915b59a521ffe910ecb2ca4ae837203441813b32eb176" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "91470e2dbd04216a27d182e0645399b3460744315b564f2a6ae5b86d76da2b14" + sha256 cellar: :any_skip_relocation, sonoma: "92c6082ce06992ac99cef66c517dc59d8540d01b05cbe8434954e4009e9a785c" + sha256 cellar: :any_skip_relocation, ventura: "f059129d0e91d4b1791c25c19bf52e20ba971b34167af63993e3f4ae9667ae50" + sha256 cellar: :any_skip_relocation, monterey: "f059129d0e91d4b1791c25c19bf52e20ba971b34167af63993e3f4ae9667ae50" + sha256 cellar: :any_skip_relocation, big_sur: "849a02893bc8fea3cd3813695f7c6d30598e53dccb4bba7933d745d221258a24" + sha256 cellar: :any_skip_relocation, catalina: "849a02893bc8fea3cd3813695f7c6d30598e53dccb4bba7933d745d221258a24" + sha256 cellar: :any_skip_relocation, mojave: "849a02893bc8fea3cd3813695f7c6d30598e53dccb4bba7933d745d221258a24" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2ef9f91dcad1ef2c9d33cce7827509c4cb88039dc51f7f3514505522d4fb882" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a55444d161c8b6a7186b252fd79e2f63831bca8f54e4a0d4633c76988cce96c6" + end + + depends_on "openjdk" + + def install + libexec.install Dir["jpdfbookmarks.jar", "lib"] + bin.write_jar_script libexec/"jpdfbookmarks.jar", "jpdfbookmarks" + end + + test do + test_bookmark = "Test/1,Black,notBold,notItalic,open,FitPage" + (testpath/"in.txt").write(test_bookmark) + + system bin/"jpdfbookmarks", test_fixtures("test.pdf"), "-a", "in.txt", "-o", "out.pdf" + assert_path_exists testpath/"out.pdf" + + assert_equal test_bookmark, shell_output("#{bin}/jpdfbookmarks out.pdf -d").strip + end +end diff --git a/Formula/j/jpeg-archive.rb b/Formula/j/jpeg-archive.rb new file mode 100644 index 0000000000000..fd9dc9f5e754b --- /dev/null +++ b/Formula/j/jpeg-archive.rb @@ -0,0 +1,40 @@ +class JpegArchive < Formula + desc "Utilities for archiving JPEGs for long term storage" + homepage "https://github.com/danielgtaylor/jpeg-archive" + url "https://github.com/danielgtaylor/jpeg-archive/archive/refs/tags/v2.2.0.tar.gz" + sha256 "3da16a5abbddd925dee0379aa51d9fe0cba33da0b5703be27c13a2dda3d7ed75" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "01115c8c03cc35f2460ef29b711a0a2bb26c847d7363e352a720c2c6d71d62e6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "baf9261d5b80bc442cbf7ea1e7f4f98f8e52339009dfecad4175e8622f283382" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fab1849787fa6dc209963175b418748a9b92bdb64f0a39a4329afac2d8b262f0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cbaf592384b0d9906eb44217daa1971ec19d571cbc4cd25c2a14caa2451428e8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6608df468a7af8298e39f54afc7b391cd9660bdd88783850577d86862b6ccb51" + sha256 cellar: :any_skip_relocation, sonoma: "93023158605c8b8a20c8551a84b43755b5890371c720ec9173bd316fd71307df" + sha256 cellar: :any_skip_relocation, ventura: "0009726c390613fd0ed7f47a95383df4454efd2291da691129539f6ab32422f6" + sha256 cellar: :any_skip_relocation, monterey: "3461975fc932a94798f2d7c6cad3f030081a29a24a31bc391e2344c6aa6ed177" + sha256 cellar: :any_skip_relocation, big_sur: "41ac0d9c5bd290d77e7e5548a2257c6455f9f87265b06b5dc4e02ac7836dfc22" + sha256 cellar: :any_skip_relocation, catalina: "222d7258f63f000794693bc5912c88ce42d0a33473a8acbbc585821655c9b8dd" + sha256 cellar: :any_skip_relocation, mojave: "2df1b3a007b7553addc977582d0c38d5007892f9e8a866a4fc9cda9b8f3b2af2" + sha256 cellar: :any_skip_relocation, high_sierra: "6f873847a8c7ad6420fe7700219ae13be39d12075c92921b364cb059ed5bf552" + sha256 cellar: :any_skip_relocation, arm64_linux: "df29c9474117299a63359908e72c5693102a56fd57245a9d60f844427473a28b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "620b18311f4e6b970b2b9ae2c2cd6ee5625a791f158b3c2f219e617920d94796" + end + + depends_on "mozjpeg" + + def install + # Work around failure from GCC 10+ using default of `-fno-common` + # multiple definition of `progname'; /tmp/ccMJX1Ay.o:(.bss+0x0): first defined here + # multiple definition of `VERSION'; /tmp/ccMJX1Ay.o:(.bss+0x8): first defined here + ENV.append_to_cflags "-fcommon" if OS.linux? + + system "make", "install", "PREFIX=#{prefix}", "MOZJPEG_PREFIX=#{Formula["mozjpeg"].opt_prefix}" + end + + test do + system bin/"jpeg-recompress", test_fixtures("test.jpg"), "output.jpg" + end +end diff --git a/Formula/j/jpeg-turbo.rb b/Formula/j/jpeg-turbo.rb new file mode 100644 index 0000000000000..e264f927d8a12 --- /dev/null +++ b/Formula/j/jpeg-turbo.rb @@ -0,0 +1,74 @@ +class JpegTurbo < Formula + desc "JPEG image codec that aids compression and decompression" + homepage "https://www.libjpeg-turbo.org/" + url "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.1.0/libjpeg-turbo-3.1.0.tar.gz" + sha256 "9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93" + license all_of: [ + "IJG", # libjpeg API library and programs + "Zlib", # libjpeg-turbo SIMD source code + "BSD-3-Clause", # TurboJPEG API library and programs + ] + head "https://github.com/libjpeg-turbo/libjpeg-turbo.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c43b108ab9895d7aa1f649d9d3b10da482657eb1216d060577142b805cfe490c" + sha256 cellar: :any, arm64_sonoma: "03d179652a6d36ece4f02bbbc091ff6e3bb1d9454ba4e7a160c8d2fbab83b7d6" + sha256 cellar: :any, arm64_ventura: "a9b6c86773453e3973ce817c15357acd3d16c6d839dd2b4b27b8ecd46efd5ac9" + sha256 cellar: :any, sonoma: "71334a8545e4e669f06c88c11e9b0adddce19a797f088dcc3db5d6513d0861bb" + sha256 cellar: :any, ventura: "9bd429d9b147fb9f042b70e907c50f5287572282c1f29bb243082c7a13e24ff4" + sha256 cellar: :any_skip_relocation, arm64_linux: "0583a5c8c9f128982bebc437fc1e3f9dbab4b62c6f4ef0479b71f3cb04615cba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87e49b8d9e91e96ab8a404ab29746f5705c204001ff745d2aa2c93e55b2798d8" + end + + depends_on "cmake" => :build + + on_intel do + # Required only for x86 SIMD extensions. + depends_on "nasm" => :build + end + + # These conflict with `jpeg`, which is now keg-only. + link_overwrite "bin/cjpeg", "bin/djpeg", "bin/jpegtran", "bin/rdjpgcom", "bin/wrjpgcom" + link_overwrite "include/jconfig.h", "include/jerror.h", "include/jmorecfg.h", "include/jpeglib.h" + link_overwrite "lib/libjpeg.dylib", "lib/libjpeg.so", "lib/libjpeg.a", "lib/pkgconfig/libjpeg.pc" + link_overwrite "share/man/man1/cjpeg.1", "share/man/man1/djpeg.1", "share/man/man1/jpegtran.1", + "share/man/man1/rdjpgcom.1", "share/man/man1/wrjpgcom.1" + + def install + args = ["-DWITH_JPEG8=1", "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,#{rpath}"] + if Hardware::CPU.arm? && OS.mac? + if MacOS.version >= :ventura + # https://github.com/libjpeg-turbo/libjpeg-turbo/issues/709 + args += ["-DFLOATTEST8=fp-contract", + "-DFLOATTEST12=fp-contract"] + elsif MacOS.version == :monterey + # https://github.com/libjpeg-turbo/libjpeg-turbo/issues/734 + args << "-DFLOATTEST12=no-fp-contract" + end + end + args += std_cmake_args.reject { |arg| arg["CMAKE_INSTALL_LIBDIR"].present? } + + system "cmake", "-S", ".", "-B", "build", *args + system "cmake", "--build", "build" + system "ctest", "--test-dir", "build", "--rerun-failed", "--output-on-failure", "--parallel", ENV.make_jobs + system "cmake", "--install", "build" + + # Avoid rebuilding dependents that hard-code the prefix. + inreplace [lib/"pkgconfig/libjpeg.pc", lib/"pkgconfig/libturbojpeg.pc"], + prefix, opt_prefix + end + + test do + system bin/"jpegtran", "-crop", "1x1", + "-transpose", + "-perfect", + "-outfile", "out.jpg", + test_fixtures("test.jpg") + assert_path_exists testpath/"out.jpg" + end +end diff --git a/Formula/j/jpeg-xl.rb b/Formula/j/jpeg-xl.rb new file mode 100644 index 0000000000000..9660ba18b1a2e --- /dev/null +++ b/Formula/j/jpeg-xl.rb @@ -0,0 +1,115 @@ +class JpegXl < Formula + desc "New file format for still image compression" + homepage "https://jpeg.org/jpegxl/index.html" + url "https://github.com/libjxl/libjxl/archive/refs/tags/v0.11.1.tar.gz" + sha256 "1492dfef8dd6c3036446ac3b340005d92ab92f7d48ee3271b5dac1d36945d3d9" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c3aceba825400a7d64dbd95d622ce59f0414e54cdedb792afc51d9278dae65b6" + sha256 cellar: :any, arm64_sonoma: "d512c7b32e5c14337646f39e27187d4a241b8d7efaad2003b5cca543012c43fd" + sha256 cellar: :any, arm64_ventura: "d4fc2bbf1f0568e60fb5c05b49dbbd9d989ede967b33d5d120894530f9861af3" + sha256 cellar: :any, sonoma: "5f403648ee1450951c0b2eaba9ea50be2599b35bdaf86f3fb7bf5b46d007e229" + sha256 cellar: :any, ventura: "d2e83758ff6899cc13588431ccfc1d00c63d317b6aad75316d76930ae139dd71" + sha256 cellar: :any_skip_relocation, arm64_linux: "dfc962a42c39eb4f6bac85124841d838fc97bd70710b3801fd9cae9d84422f09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e68aaa4bcb4ebad81d8ff0e3ef8556852e2a5434069ebcfb1887f34babc9075a" + end + + depends_on "asciidoc" => :build + depends_on "cmake" => :build + depends_on "docbook-xsl" => :build + depends_on "doxygen" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "sphinx-doc" => :build + depends_on "brotli" + depends_on "giflib" + depends_on "highway" + depends_on "imath" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "little-cms2" + depends_on "openexr" + depends_on "webp" + + uses_from_macos "libxml2" => :build + uses_from_macos "libxslt" => :build # for xsltproc + uses_from_macos "python" + + # These resources are versioned according to the script supplied with jpeg-xl to download the dependencies: + # https://github.com/libjxl/libjxl/tree/v#{version}/third_party + resource "sjpeg" do + url "https://github.com/webmproject/sjpeg.git", + revision: "94e0df6d0f8b44228de5be0ff35efb9f946a13c9" + end + + def install + ENV.append_path "XML_CATALOG_FILES", HOMEBREW_PREFIX/"etc/xml/catalog" + resources.each { |r| r.stage buildpath/"third_party"/r.name } + system "cmake", "-S", ".", "-B", "build", + "-DJPEGXL_FORCE_SYSTEM_BROTLI=ON", + "-DJPEGXL_FORCE_SYSTEM_LCMS2=ON", + "-DJPEGXL_FORCE_SYSTEM_HWY=ON", + "-DJPEGXL_ENABLE_DEVTOOLS=ON", + "-DJPEGXL_ENABLE_JNI=OFF", + "-DJPEGXL_ENABLE_JPEGLI=OFF", + "-DJPEGXL_ENABLE_SKCMS=OFF", + "-DJPEGXL_VERSION=#{version}", + "-DJPEGXL_ENABLE_MANPAGES=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DPython_EXECUTABLE=#{Formula["asciidoc"].libexec/"bin/python"}", + "-DPython3_EXECUTABLE=#{Formula["asciidoc"].libexec/"bin/python3"}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--build", "build", "--target", "install" + + # Avoid rebuilding dependents that hard-code the prefix. + inreplace (lib/"pkgconfig").glob("*.pc"), prefix, opt_prefix + end + + test do + system bin/"cjxl", test_fixtures("test.jpg"), "test.jxl" + assert_path_exists testpath/"test.jxl" + + (testpath/"jxl_test.c").write <<~C + #include + #include + + int main() + { + JxlEncoder* enc = JxlEncoderCreate(NULL); + if (enc == NULL) { + return EXIT_FAILURE; + } + JxlEncoderDestroy(enc); + return EXIT_SUCCESS; + } + C + jxl_flags = shell_output("pkgconf --cflags --libs libjxl").chomp.split + system ENV.cc, "jxl_test.c", *jxl_flags, "-o", "jxl_test" + system "./jxl_test" + + (testpath/"jxl_threads_test.c").write <<~C + #include + #include + + int main() + { + void* runner = JxlThreadParallelRunnerCreate(NULL, 1); + if (runner == NULL) { + return EXIT_FAILURE; + } + JxlThreadParallelRunnerDestroy(runner); + return EXIT_SUCCESS; + } + C + jxl_threads_flags = shell_output("pkgconf --cflags --libs libjxl_threads").chomp.split + system ENV.cc, "jxl_threads_test.c", *jxl_threads_flags, "-o", "jxl_threads_test" + system "./jxl_threads_test" + end +end diff --git a/Formula/j/jpeg.rb b/Formula/j/jpeg.rb new file mode 100644 index 0000000000000..b5a83f8a4ea71 --- /dev/null +++ b/Formula/j/jpeg.rb @@ -0,0 +1,36 @@ +class Jpeg < Formula + desc "Image manipulation library" + homepage "https://www.ijg.org/" + url "https://www.ijg.org/files/jpegsrc.v9f.tar.gz" + mirror "https://fossies.org/linux/misc/jpegsrc.v9f.tar.gz" + sha256 "04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b" + license "IJG" + + livecheck do + url "https://www.ijg.org/files/" + regex(/href=.*?jpegsrc[._-]v?(\d+[a-z]?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0c2e03678c6b74d190096c547c337769d6678bd41eda71d6688e465825c4b003" + sha256 cellar: :any, arm64_sonoma: "15c7bc3002bdb1f9281a9621d4d9c7722142aab09cc983e950b24d78c7a8744b" + sha256 cellar: :any, arm64_ventura: "3492c054e815cb4843932d27bb943b5ae325acc25219049afd1790c2d549787e" + sha256 cellar: :any, arm64_monterey: "f698f979cdbeb8590ff70cc40ab87a747bf955f37473767673a1f315cce0503c" + sha256 cellar: :any, sonoma: "bcdf0adaf6ef9dca1cf1dbf1416e1009cb5b1770ec9116d0e2f4d8c757784131" + sha256 cellar: :any, ventura: "73cc0431645e763135f43442f3c9e135069a491eff2d885f4b91cece123482cf" + sha256 cellar: :any, monterey: "b582d67ae81e6e165fe33ab760f557c06399f963b345d6a68ff6b63abbfdca24" + sha256 cellar: :any_skip_relocation, arm64_linux: "beeefc584dc196ae25fdd83cbbc19d803aa076f9094a405002d4d37ad5a2a6d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0da8a41595d64ce98d7ce8ec9c8bfd0a60ffd0da99313ab923387fb588f0a29a" + end + + keg_only "it conflicts with `jpeg-turbo`" + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + system bin/"djpeg", test_fixtures("test.jpg") + end +end diff --git a/Formula/j/jpeginfo.rb b/Formula/j/jpeginfo.rb new file mode 100644 index 0000000000000..8c6a473547479 --- /dev/null +++ b/Formula/j/jpeginfo.rb @@ -0,0 +1,41 @@ +class Jpeginfo < Formula + desc "Prints information and tests integrity of JPEG/JFIF files" + homepage "https://www.kokkonen.net/tjko/projects.html" + url "https://www.kokkonen.net/tjko/src/jpeginfo-1.7.1.tar.gz" + sha256 "274f6be23fd089bd9e8715b67643a66ca2f63a503028bdea3e571228d50b669e" + license "GPL-3.0-or-later" + head "https://github.com/tjko/jpeginfo.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?jpeginfo[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "4f5080a068fc3c4e0dbd1f4a1797a633ed8c28e50ab57eecf33b2ee70eb464ae" + sha256 cellar: :any, arm64_sonoma: "d2ea4f763ff7c44c860bcc04fb737e0a5e258faf6931775349542160ee034e55" + sha256 cellar: :any, arm64_ventura: "37e8663841268bae70369793b49e98ab351b9213c4e80577042d17e9e45df308" + sha256 cellar: :any, arm64_monterey: "428ba50fee1f9a5a20af595fc15de9482f27c5d81321caf6c96abb7b627757b8" + sha256 cellar: :any, sonoma: "16807913afe7a5d80b2d64e9f4bdba35ce5a7b8165f14253c3cd176fa977e982" + sha256 cellar: :any, ventura: "e247c0e359e49aa543b37db1ded9799d2372e03e3c02e5db2462ff01d210e552" + sha256 cellar: :any, monterey: "92c32a4cffe40740ce0a5ba86a7fe8f521c7230b8d41d6fa0a260afbf00c46d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "671ef654c483d5e351547a8d551a48ba36a66e726fe7ffbeffdc19ac6504142f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7634d933e1769a53a9efe1e9ac4398512efda30266ec24db06bace7f36f95a3c" + end + + depends_on "autoconf" => :build + depends_on "jpeg-turbo" + + def install + ENV.deparallelize + + # The ./configure file inside the tarball is too old to work with Xcode 12, regenerate: + system "autoconf", "--force" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"jpeginfo", "--help" + end +end diff --git a/Formula/j/jpegoptim.rb b/Formula/j/jpegoptim.rb new file mode 100644 index 0000000000000..51dea2b6fcf1c --- /dev/null +++ b/Formula/j/jpegoptim.rb @@ -0,0 +1,35 @@ +class Jpegoptim < Formula + desc "Utility to optimize JPEG files" + homepage "https://github.com/tjko/jpegoptim" + url "https://github.com/tjko/jpegoptim/archive/refs/tags/v1.5.5.tar.gz" + sha256 "90a309d1c092de358bb411d702281ac3039b489d03adb0bc3c4ef04cf0067d38" + license "GPL-3.0-or-later" + head "https://github.com/tjko/jpegoptim.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6f2da3ecfcd521abededbff7aa2d8578773ef9951e9ad2b859fd5cdc05470102" + sha256 cellar: :any, arm64_sonoma: "ca3a05d563b803911fcec6940ee9a26bd6e7bb21519e5841947635c856e1bc50" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ebded7c6ca4bc0d67213156202bf36cecf058ed16552c085f6b48dd57a334fd2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2b388ed2fb35def26b59849050da22ba28c31a94f6a820ea39d396e322c9d70a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "45382d1e4a3a561835928eb98d0d6de7dcc8318845ecd34f8ff539b9581703c9" + sha256 cellar: :any, sonoma: "8e12fb740776885920bf38fd79497df975e3dc2e062c5b8f59f2cace99ea1812" + sha256 cellar: :any_skip_relocation, ventura: "86fb1ec394a43558d382fbc2544050d361e9586dd5dacdf4257a20c1f9244e34" + sha256 cellar: :any_skip_relocation, monterey: "aa1622b89c22a2d162c211d818828fa0ef1577e9235f936d36643c8ff02f9494" + sha256 cellar: :any_skip_relocation, big_sur: "99529c2dccf16f25d1b31ca8a9d20e638c75a8a13af5875b30fc4174a757c7f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "0547e662487a78c35cbb4e864224380730a6793cad67414959572cd7c30f08cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e35ae062ab96e9a8bd73a41cdfc896d2366db52f2ed2eb9a67a7a99167f49a2" + end + + depends_on "jpeg-turbo" + + def install + system "./configure", *std_configure_args + ENV.deparallelize # Install is not parallel-safe + system "make", "install" + end + + test do + source = test_fixtures("test.jpg") + assert_match "OK", shell_output("#{bin}/jpegoptim --noaction #{source}") + end +end diff --git a/Formula/j/jpegrescan.rb b/Formula/j/jpegrescan.rb new file mode 100644 index 0000000000000..9025a30d2f62c --- /dev/null +++ b/Formula/j/jpegrescan.rb @@ -0,0 +1,58 @@ +class Jpegrescan < Formula + desc "Losslessly shrink any JPEG file" + homepage "https://github.com/kud/jpegrescan" + url "https://github.com/kud/jpegrescan/archive/refs/tags/1.1.0.tar.gz" + sha256 "a8522e971d11c904f4b61af665c3be800f26404e2b14f5f80c675b4a72a42b32" + license :public_domain + revision 1 + head "https://github.com/kud/jpegrescan.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2bdbe245fbd20be8c2d34f4ce46408effedd4e7c99d516fbbd78e2321284219c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aaf688d3c8d50fc17fbe0f5a8ca91c700785478bc47e063535216822b9ec8593" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7431fe05859f4cd0b88e7aa736e9b455a99fb06f09503f16e32ba84538227863" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b7e337050c5026743c9ef33c6b49423de22348cbac8f28f2a49f4635a52232d5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b7e337050c5026743c9ef33c6b49423de22348cbac8f28f2a49f4635a52232d5" + sha256 cellar: :any_skip_relocation, sonoma: "aaf688d3c8d50fc17fbe0f5a8ca91c700785478bc47e063535216822b9ec8593" + sha256 cellar: :any_skip_relocation, ventura: "7431fe05859f4cd0b88e7aa736e9b455a99fb06f09503f16e32ba84538227863" + sha256 cellar: :any_skip_relocation, monterey: "b7e337050c5026743c9ef33c6b49423de22348cbac8f28f2a49f4635a52232d5" + sha256 cellar: :any_skip_relocation, big_sur: "b7e337050c5026743c9ef33c6b49423de22348cbac8f28f2a49f4635a52232d5" + sha256 cellar: :any_skip_relocation, catalina: "b7e337050c5026743c9ef33c6b49423de22348cbac8f28f2a49f4635a52232d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "bac1bb840c090e49e0d900a61448ba4ed094fa29e758f6f7f3803e0e1d89ab3e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e57f2d0e5e4c03913297ea1c9d1c41164756dffd1899e89b4024125bf81477f2" + end + + deprecate! date: "2024-04-05", because: :repo_archived + disable! date: "2025-04-08", because: :repo_archived + + depends_on "jpeg-turbo" + + uses_from_macos "perl" + + resource "File::Slurp" do + on_linux do + url "https://cpan.metacpan.org/authors/id/C/CA/CAPOEIRAB/File-Slurp-9999.32.tar.gz" + sha256 "4c3c21992a9d42be3a79dd74a3c83d27d38057269d65509a2f555ea0fb2bc5b0" + end + end + + def install + env = { PATH: "#{Formula["jpeg-turbo"].opt_bin}:$PATH" } + if OS.linux? + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + env["PERL5LIB"] = ENV["PERL5LIB"] + resource("File::Slurp").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + end + end + bin.install "jpegrescan" + bin.env_script_all_files libexec/"bin", env + end + + test do + system bin/"jpegrescan", "-v", test_fixtures("test.jpg"), testpath/"out.jpg" + assert_path_exists testpath/"out.jpg" + end +end diff --git a/Formula/j/jprq.rb b/Formula/j/jprq.rb new file mode 100644 index 0000000000000..1b66e72c8104f --- /dev/null +++ b/Formula/j/jprq.rb @@ -0,0 +1,32 @@ +class Jprq < Formula + desc "Join Public Router, Quickly" + homepage "https://jprq.io/" + url "https://github.com/azimjohn/jprq/archive/refs/tags/2.4.tar.gz" + sha256 "a3fc5a804851129c79a02deb3e5b7f5b84c0f351d688ca0088b571407399ff30" + license "BSD-3-Clause" + head "https://github.com/azimjohn/jprq.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dccb9dad79cf8951cceb2c9d53e25a393b796bcf34470f538715054fc1005236" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dccb9dad79cf8951cceb2c9d53e25a393b796bcf34470f538715054fc1005236" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dccb9dad79cf8951cceb2c9d53e25a393b796bcf34470f538715054fc1005236" + sha256 cellar: :any_skip_relocation, sonoma: "d0061191f55e023d50c1bc33534c827564d6f1e9dbf82e5adabf6fac707eccd0" + sha256 cellar: :any_skip_relocation, ventura: "d0061191f55e023d50c1bc33534c827564d6f1e9dbf82e5adabf6fac707eccd0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e246f6c4571348c952e771002559477ef11baf395722922e74038113a20ea012" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cli" + end + + test do + assert_match "auth token has been set", shell_output("#{bin}/jprq auth jprqbolmagin 2>&1") + output = shell_output("#{bin}/jprq serve #{testpath} 2>&1", 1) + assert_match "authentication failed", output + + assert_match version.to_s, shell_output("#{bin}/jprq --version 2>&1") + end +end diff --git a/Formula/j/jq.rb b/Formula/j/jq.rb new file mode 100644 index 0000000000000..c6c42f53df0c8 --- /dev/null +++ b/Formula/j/jq.rb @@ -0,0 +1,47 @@ +class Jq < Formula + desc "Lightweight and flexible command-line JSON processor" + homepage "https://jqlang.github.io/jq/" + url "https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-1.7.1.tar.gz" + sha256 "478c9ca129fd2e3443fe27314b455e211e0d8c60bc8ff7df703873deeee580c2" + license "MIT" + + livecheck do + url :stable + regex(/^(?:jq[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "a10c82b07e393869d4467ad3e8ba26346d026b1ad3533d31dbb5e72abe9a7968" + sha256 cellar: :any, arm64_sonoma: "7d01bc414859db57e055c814daa10e9c586626381ea329862ad4300f9fee78ce" + sha256 cellar: :any, arm64_ventura: "b1a185e72ca020f08a8de22fabe1ad2425bf48d2e0378c5e07a6678020fa3e15" + sha256 cellar: :any, arm64_monterey: "8f8c06332f413f5259b360ed65dc3ef21b5d3f2fff35160bc12367e53cbd06bf" + sha256 cellar: :any, sonoma: "6bc01de99fd7f091b86880534842132a876f2d3043e3932ea75efc5f51c40aea" + sha256 cellar: :any, ventura: "03227348d3845fe16ed261ad020402c1f23c56e73f65799ce278af4bac63c799" + sha256 cellar: :any, monterey: "25aab2c539a41e4d67cd3d44353aac3cdd159ea815fec2b8dd82fbf038c559cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "843a48d2e76247b33f28189973245dffb356459ff019e5721b4c8ab4f374befa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9559d8278cf20ad0294f2059855e1bc9d2bcabfd2bd5b5774c66006d1f201ad8" + end + + head do + url "https://github.com/jqlang/jq.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "oniguruma" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--disable-maintainer-mode" + system "make", "install" + end + + test do + assert_equal "2\n", pipe_output("#{bin}/jq .bar", '{"foo":1, "bar":2}') + end +end diff --git a/Formula/j/jql.rb b/Formula/j/jql.rb new file mode 100644 index 0000000000000..683be71abd940 --- /dev/null +++ b/Formula/j/jql.rb @@ -0,0 +1,34 @@ +class Jql < Formula + desc "JSON query language CLI tool" + homepage "https://github.com/yamafaktory/jql" + url "https://github.com/yamafaktory/jql/archive/refs/tags/jql-v8.0.6.tar.gz" + sha256 "8af2f6c794cffeba9bc2604cf68cd7ddaa6126ec038786060b463474e8a88b5b" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/yamafaktory/jql.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6860a78f88ccd0e124b2bbbfa76708fdebe1914ceaaa250dedfd9f67815d56f4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "225736c377075e9be9729971fc07a841f9d1e4e4da3620483a671901a3bbbb9e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "abc6c4a072ffee1cf7636a9999883b22d95a64958e2c6a12da3e00b7ca07c5ee" + sha256 cellar: :any_skip_relocation, sonoma: "4307e9108391a1645b879d2a1f62fcf037da7479d468b52af69a76b42918cf05" + sha256 cellar: :any_skip_relocation, ventura: "697f882b3ab3a92135f9f7275abdad329ed1d14a2fefebc807a24f837696db4d" + sha256 cellar: :any_skip_relocation, arm64_linux: "da2bac1654b7d3f89fab1a54e01f756b36de4618db8074ccab83e4e9127d185f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a247dea0d088ee3a9262d80e9ceb7b204209a6bdddba5bb98ce72aea24abfde" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/jql") + end + + test do + (testpath/"example.json").write <<~JSON + { + "cats": [{ "first": "Pixie" }, { "second": "Kitkat" }, { "third": "Misty" }] + } + JSON + output = shell_output("#{bin}/jql --inline --raw-string '\"cats\" [2:1] [0]' example.json") + assert_equal '{"third":"Misty"}', output.chomp + end +end diff --git a/Formula/j/jr.rb b/Formula/j/jr.rb new file mode 100644 index 0000000000000..21627791000e5 --- /dev/null +++ b/Formula/j/jr.rb @@ -0,0 +1,32 @@ +class Jr < Formula + desc "CLI program that helps you to create quality random data for your applications" + homepage "https://jrnd.io/" + url "https://github.com/jrnd-io/jr/archive/refs/tags/v0.4.0.tar.gz" + sha256 "ae8f8e8fecef16f2e95b69d25460ff4f4d28b112c9877eeaf37993addf18a46d" + license "MIT" + head "https://github.com/jrnd-io/jr.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "57e21753c12cd216a40b151e9809df074adeb66b0b2a72c488a86406d1ae4be2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9e94a9e1c57902aa030fa1f7f1994539fcd0708717c4b058f7ab1882f03ec70f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2252647355b1043206b7e16cfca108b678cedc0065090307823c6bb2a1e68ddd" + sha256 cellar: :any_skip_relocation, sonoma: "5eadf3422a042e814b16b5f35e4f98213ed8d7ee2356eba584b693422edb2ec7" + sha256 cellar: :any_skip_relocation, ventura: "eb0c2a1c04d87eef167d2fb8717fbd2cdcb4112bd36cdae0c8462d234a813c3b" + sha256 cellar: :any_skip_relocation, arm64_linux: "16cb5724b5db44f4cdc64875571ca63528412b92cf239117b9333fee77f826fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a947f3670797436fd4b1e4657433063fa943e04d276ffbae00b20107d72e06b1" + end + + depends_on "go" => :build + + def install + ENV.deparallelize { system "make", "all" } + libexec.install Dir["build/*"] + pkgetc.install "config/jrconfig.json" + pkgetc.install "templates" + (bin/"jr").write_env_script libexec/"jr", JR_SYSTEM_DIR: pkgetc + end + + test do + assert_match "net_device", shell_output("#{bin}/jr template list").strip + end +end diff --git a/Formula/j/jreleaser.rb b/Formula/j/jreleaser.rb new file mode 100644 index 0000000000000..fe1a314567a78 --- /dev/null +++ b/Formula/j/jreleaser.rb @@ -0,0 +1,29 @@ +class Jreleaser < Formula + desc "Release projects quickly and easily with JReleaser" + homepage "https://jreleaser.org/" + url "https://github.com/jreleaser/jreleaser/releases/download/v1.18.0/jreleaser-1.18.0.zip" + sha256 "581b6089f2fecc3eefa33da530df54cbf8e8fe57f2c2c85d8d29d1b111a84424" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b8249c488b5d074db84cbed0a58418bccec6eb38f8bf32f60022997d2d51b99e" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + (bin/"jreleaser").write_env_script libexec/"bin/jreleaser", Language::Java.overridable_java_home_env + end + + test do + expected = <<~EOS + [INFO] Writing file #{testpath}/jreleaser.toml + [INFO] JReleaser initialized at #{testpath} + EOS + assert_match expected, shell_output("#{bin}/jreleaser init -f toml") + assert_match "description = \"Awesome App\"", (testpath/"jreleaser.toml").read + + assert_match "jreleaser #{version}", shell_output("#{bin}/jreleaser --version") + end +end diff --git a/Formula/j/jrnl.rb b/Formula/j/jrnl.rb new file mode 100644 index 0000000000000..c101435420c0b --- /dev/null +++ b/Formula/j/jrnl.rb @@ -0,0 +1,149 @@ +class Jrnl < Formula + include Language::Python::Virtualenv + + desc "Command-line note taker" + homepage "https://jrnl.sh/en/stable/" + url "https://files.pythonhosted.org/packages/d6/b4/00ce3af0d836cd17fe869639fe31ee325038d38ac3ef403e378b1eae1a1f/jrnl-4.2.1.tar.gz" + sha256 "5d1edca3e3c48cf2929eb0c51f8fad2887b747fe3267a24d8faa0b02d6fbc1dd" + license "GPL-3.0-only" + head "https://github.com/jrnl-org/jrnl.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "25ebc4285ec83ca5d14e3b82dac44745c7eab8e3ba799e3224379bccc18da0d3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "25ebc4285ec83ca5d14e3b82dac44745c7eab8e3ba799e3224379bccc18da0d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "25ebc4285ec83ca5d14e3b82dac44745c7eab8e3ba799e3224379bccc18da0d3" + sha256 cellar: :any_skip_relocation, sonoma: "f949633a884a972b1b95e8d23f68a7530642d4a205de43e1e1c5497d56607ed7" + sha256 cellar: :any_skip_relocation, ventura: "f949633a884a972b1b95e8d23f68a7530642d4a205de43e1e1c5497d56607ed7" + sha256 cellar: :any_skip_relocation, arm64_linux: "f01d2c733150b3597a4fbc1153605db8bd40542bd2a3741127ccb8310f3e8982" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9eeb3e076ae9f7c2098d01e6712b1d8a78dfd5175827efefa6e947e9a1cd3c2c" + end + + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/d6/f4/154cf374c2daf2020e05c3c6a03c91348d59b23c5366e968feb198306fdf/jeepney-0.8.0.tar.gz" + sha256 "5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806" + 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/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz" + sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" + 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/88/3b/7fa1fe835e2e93fd6d7b52b2f95ae810cf5ba133e1845f726f5a992d62c2/more-itertools-10.6.0.tar.gz" + sha256 "2cd7fad1009c31cc9fb6a035108509e6547547a7a738374f10bd49a09eb3ee3b" + end + + resource "parsedatetime" do + url "https://files.pythonhosted.org/packages/a8/20/cb587f6672dbe585d101f590c3871d16e7aec5a576a1694997a3777312ac/parsedatetime-2.6.tar.gz" + sha256 "4cb368fbb18a0b7231f4d76119165451c8d2e35951455dfee97c62a87b04d455" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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 "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + 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 "secretstorage" do + url "https://files.pythonhosted.org/packages/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz" + sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/33/cc/11360404b20a6340b9b4ed39a3338c4af47bc63f87f6cea94dbcbde07029/tzlocal-5.3.tar.gz" + sha256 "2fafbfc07e9d8b49ade18f898d6bcd37ae88ce3ad6486842a2e4f03af68323d2" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + # Write the journal + input = "#{testpath}/journal.txt\nn\nn" + assert_match "Journal 'default' created", pipe_output("#{bin}/jrnl My journal entry 2>&1", input, 0) + assert_path_exists testpath/"journal.txt" + + # Read the journal + assert_match "#{testpath}/journal.txt", shell_output("#{bin}/jrnl --list 2>&1") + + # Encrypt the journal. Needs a TTY to read password. + require "expect" + require "pty" + timeout = 3 + PTY.spawn(bin/"jrnl", "--encrypt") do |r, w, pid| + refute_nil r.expect("Enter password for journal 'default': ", timeout), "Expected password input" + w.write "homebrew\r" + refute_nil r.expect("Enter password again: ", timeout), "Expected password confirmation input" + w.write "homebrew\r" + refute_nil r.expect("store the password in your keychain? [Y/n] ", timeout), "Expected keychain input" + w.write "n\r" + refute_nil r.expect("Journal encrypted to ", timeout), "Expected result output" + Process.wait pid + end + + assert_path_exists testpath/".config/jrnl/jrnl.yaml" + assert_match "encrypt: true", (testpath/".config/jrnl/jrnl.yaml").read + end +end diff --git a/Formula/j/jrsonnet.rb b/Formula/j/jrsonnet.rb new file mode 100644 index 0000000000000..811a55d5fbb32 --- /dev/null +++ b/Formula/j/jrsonnet.rb @@ -0,0 +1,44 @@ +class Jrsonnet < Formula + desc "Rust implementation of Jsonnet language" + homepage "https://github.com/CertainLach/jrsonnet" + url "https://github.com/CertainLach/jrsonnet/archive/refs/tags/v0.4.2.tar.gz" + sha256 "2396c57a49a20db99da17b8ddd1b0b283f1a6e7c5ae1dc94823e7503cbb6ce3f" + license "MIT" + head "https://github.com/CertainLach/jrsonnet.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "84d48f262c1a5d6c4c8054bc435c7ed3c125ea6eff0ac44758c4d6d5d7a902be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8612efbafac8310f5542bc1a928c064853db67955dfd30c7678afa8d21ef9fbc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9d0249acf621ed487cffb828cc63c2210749a30de553f0f0cb48c9b00a15c545" + sha256 cellar: :any_skip_relocation, arm64_monterey: "662dbf19789e9f681e4c325d2814b1e77ef88174e6b9083d6793192bd5ac1523" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "66be41438ed1da22c922c59d3da10a1852b89491898881c2bcd25c114abd4852" + sha256 cellar: :any_skip_relocation, sonoma: "b149496a8055b9dffca8be4eb576f62af266ac219c7010603924fca8ddd06f79" + sha256 cellar: :any_skip_relocation, ventura: "9fc6a73c2b9c251038f317bef54054b598620d687872ccae2da6cad585ecb14d" + sha256 cellar: :any_skip_relocation, monterey: "89080991d6ec832d7fa2d868a4323e08921291a01100797a7343790b3ab30088" + sha256 cellar: :any_skip_relocation, big_sur: "8e96db079868f110cd8b9fc4b29a1340bd5539ab1740928d8c2a8d8a7c34b25e" + sha256 cellar: :any_skip_relocation, catalina: "fbbaf136a231569a619722188c22fed49d586431ee1a1515e9cfc84bac0eafd2" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2c0b31f422bd414ea9a03f66e47131e10513157ce995499770e364a6b944692" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a04748fc43150da3210809034f82864313d7706869ec78265462a22cf2a4812" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "cmds/jrsonnet") + if build.head? + generate_completions_from_executable(bin/"jrsonnet", "generate") + else + generate_completions_from_executable(bin/"jrsonnet", "-", "--generate") + end + end + + test do + assert_equal "2\n", shell_output("#{bin}/jrsonnet -e '({ x: 1, y: self.x } { x: 2 }).y'") + end +end diff --git a/Formula/j/jrtplib.rb b/Formula/j/jrtplib.rb new file mode 100644 index 0000000000000..314e09e5c1f94 --- /dev/null +++ b/Formula/j/jrtplib.rb @@ -0,0 +1,54 @@ +class Jrtplib < Formula + desc "Fully featured C++ Library for RTP (Real-time Transport Protocol)" + homepage "https://research.edm.uhasselt.be/jori/jrtplib" + url "https://research.edm.uhasselt.be/jori/jrtplib/jrtplib-3.11.2.tar.bz2" + sha256 "2c01924c1f157fb1a4616af5b9fb140acea39ab42bfb28ac28d654741601b04c" + license "MIT" + + livecheck do + skip "No longer developed" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "ef88fc08dc41b679c8ccdcaebabab8303f7eb30ccc8cddb2776e4952f335d2f0" + sha256 cellar: :any, arm64_sonoma: "c21691446176fd07d6163eece3a708d9088739e61fa29671cdeacdb3737fabc5" + sha256 cellar: :any, arm64_ventura: "82b8535c4b305e27653d742b771ba387c09e937be9917a8e53a8aa2c04034e2f" + sha256 cellar: :any, arm64_monterey: "66a2c5923fb2f9999ea1a5adcacbceb38398231be4536f51f8902e4f84b5cdc4" + sha256 cellar: :any, arm64_big_sur: "b00a6b5d09b1eb5d8e6a72e548cff53f2834b4b07d235f3cb4ee346b9d4a0dbc" + sha256 cellar: :any, sonoma: "a6115879d309f486c2cccccd0564c24632a3393ad6b462892ee5e83ccef4479c" + sha256 cellar: :any, ventura: "86f675039a7b9e13b2da96de3f126ddc1cc0e4c6a9851bd4388663b194799d80" + sha256 cellar: :any, monterey: "f45e63073ae1de1f32605d885a92565dff5297205c875c27dfe36b270ca826b6" + sha256 cellar: :any, big_sur: "c025524ef889d74cc261768b9e12f8d3ffe57802adef254e2a01850db983e269" + sha256 cellar: :any, catalina: "05fc5e0747f7d5f725f9dda22cf39d414e8ee751829d14e9c32fa12279834cfc" + sha256 cellar: :any, mojave: "1b48b36e9011b4aa675f1d581e900c64bcad93ba15fc86d1e27db09ed2c75ce9" + sha256 cellar: :any, high_sierra: "420016bd3f9981189dc8bf69dc7520da8d9cbde848147dde495792c1a5a984fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b43949d28bbbce5b86915445eafbd3bf25b40f38e8439487ccb3f7b54da00b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c3a63a9f2e44c207522cb93a0bd93e429ed65937d74ea2b5d7a4110e46d9284" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "jthread" + + 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 + using namespace jrtplib; + int main() { + RTPSessionParams sessionparams; + sessionparams.SetOwnTimestampUnit(1.0/8000.0); + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-ljrtp", + "-o", "test" + system "./test" + end +end diff --git a/Formula/j/jruby.rb b/Formula/j/jruby.rb new file mode 100644 index 0000000000000..07083035925da --- /dev/null +++ b/Formula/j/jruby.rb @@ -0,0 +1,60 @@ +class Jruby < Formula + desc "Ruby implementation in pure Java" + homepage "https://www.jruby.org/" + url "https://search.maven.org/remotecontent?filepath=org/jruby/jruby-dist/10.0.0.1/jruby-dist-10.0.0.1-bin.tar.gz" + sha256 "0ba34ac5dfec7c22659b14db668a06284db7fc1c820c49c04b92271a6636bafb" + license any_of: ["EPL-2.0", "GPL-2.0-only", "LGPL-2.1-only"] + + livecheck do + url "https://www.jruby.org/download" + regex(%r{href=.*?/jruby-dist[._-]v?(\d+(?:\.\d+)+)-bin\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c82c17f18e1078d370cb8ca36dce63593a500bef026a4367a76e18919d909818" + sha256 cellar: :any, arm64_sonoma: "c82c17f18e1078d370cb8ca36dce63593a500bef026a4367a76e18919d909818" + sha256 cellar: :any, arm64_ventura: "c82c17f18e1078d370cb8ca36dce63593a500bef026a4367a76e18919d909818" + sha256 cellar: :any, sonoma: "592788c3ca665d10bd368ad18aef56ee21ea79b799c05122027c9e29fc7b958b" + sha256 cellar: :any, ventura: "592788c3ca665d10bd368ad18aef56ee21ea79b799c05122027c9e29fc7b958b" + sha256 cellar: :any_skip_relocation, arm64_linux: "47a46c4290e0a4645eca1156283f62dd5d7cc565bff0c3cf9b00eb714afaed54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3412f241bda3335c86a77ca999e6460c41a90a698135de8c2cbd289fe1b8c4a" + end + + depends_on "openjdk" + + def install + # Remove Windows files + rm Dir["bin/*.{bat,dll,exe}"] + + cd "bin" do + # Prefix a 'j' on some commands to avoid clashing with other rubies + %w[ast erb bundle bundler rake rdoc ri racc].each { |f| mv f, "j#{f}" } + # Delete some unnecessary commands + rm "gem" # gem is a wrapper script for jgem + rm "irb" # irb is an identical copy of jirb + end + + # Only keep the macOS native libraries + rm_r(Dir["lib/jni/*"] - ["lib/jni/Darwin"]) + libexec.install Dir["*"] + bin.install Dir["#{libexec}/bin/*"] + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + + # Remove incompatible libfixposix library + os = OS.kernel_name.downcase + if OS.linux? + arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s + end + libfixposix_binary = libexec/"lib/ruby/stdlib/libfixposix/binary" + libfixposix_binary.children + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{arch}-#{os}" } + + # Replace (prebuilt!) universal binaries with their native slices + # FIXME: Build libjffi-1.2.jnilib from source. + deuniversalize_machos + end + + test do + assert_equal "hello\n", shell_output("#{bin}/jruby -e \"puts 'hello'\"") + end +end diff --git a/Formula/j/js-beautify.rb b/Formula/j/js-beautify.rb new file mode 100644 index 0000000000000..e7b4c515b777c --- /dev/null +++ b/Formula/j/js-beautify.rb @@ -0,0 +1,37 @@ +class JsBeautify < Formula + desc "JavaScript, CSS and HTML unobfuscator and beautifier" + homepage "https://beautifier.io/" + url "https://registry.npmjs.org/js-beautify/-/js-beautify-1.15.4.tgz" + sha256 "5feefb437c9467e789d179fc4cbc4f942008c05222f6b573a4f03ee41e31d9a6" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7c7e52487e23c2cd2674a6cc83610b8509209489fc632b86f69f936bc596aafd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7c7e52487e23c2cd2674a6cc83610b8509209489fc632b86f69f936bc596aafd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7c7e52487e23c2cd2674a6cc83610b8509209489fc632b86f69f936bc596aafd" + sha256 cellar: :any_skip_relocation, sonoma: "21cbc33bb8e2b885663dfcc5bd5219dd571ea648ac5ad4b29833b45951824c78" + sha256 cellar: :any_skip_relocation, ventura: "21cbc33bb8e2b885663dfcc5bd5219dd571ea648ac5ad4b29833b45951824c78" + sha256 cellar: :any_skip_relocation, arm64_linux: "7c7e52487e23c2cd2674a6cc83610b8509209489fc632b86f69f936bc596aafd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7c7e52487e23c2cd2674a6cc83610b8509209489fc632b86f69f936bc596aafd" + end + + depends_on "node" + + conflicts_with "jsbeautifier", because: "both install `js-beautify` binaries" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + javascript = "if ('this_is'==/an_example/){of_beautifier();}else{var a=b?(c%d):e[f];}" + assert_equal <<~EOS.chomp, pipe_output(bin/"js-beautify", javascript) + if ('this_is' == /an_example/) { + of_beautifier(); + } else { + var a = b ? (c % d) : e[f]; + } + EOS + end +end diff --git a/Formula/j/jsawk.rb b/Formula/j/jsawk.rb new file mode 100644 index 0000000000000..ebc3929ded6e2 --- /dev/null +++ b/Formula/j/jsawk.rb @@ -0,0 +1,24 @@ +class Jsawk < Formula + desc "Like awk, but for JSON, using JavaScript objects and arrays" + homepage "https://github.com/micha/jsawk" + url "https://github.com/micha/jsawk/archive/refs/tags/1.4.tar.gz" + sha256 "3d38ffb4b9c6ff7f17072a12c5817ffe68bd0ab58d6182de300fc1e587d34530" + license "BSD-3-Clause" + head "https://github.com/micha/jsawk.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ad82c5334cd78f71f7faa8835d7c3315e0ea98f26a9a2615d8425a72d77242a5" + end + + depends_on "spidermonkey" + + def install + bin.install "jsawk" + end + + test do + cmd = %Q(#{bin}/jsawk 'this.a = "foo"') + assert_equal %Q({"a":"foo"}\n), pipe_output(cmd, "{}") + end +end diff --git a/Formula/j/jsbeautifier.rb b/Formula/j/jsbeautifier.rb new file mode 100644 index 0000000000000..31e6d1bc13676 --- /dev/null +++ b/Formula/j/jsbeautifier.rb @@ -0,0 +1,42 @@ +class Jsbeautifier < Formula + include Language::Python::Virtualenv + + desc "JavaScript unobfuscator and beautifier" + homepage "https://beautifier.io/" + url "https://files.pythonhosted.org/packages/ea/98/d6cadf4d5a1c03b2136837a435682418c29fdeb66be137128544cecc5b7a/jsbeautifier-1.15.4.tar.gz" + sha256 "5bb18d9efb9331d825735fbc5360ee8f1aac5e52780042803943aa7f854f7592" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "cfa936f6a98eda6de5121e7cd9ccf0513039230f59e0d2cabc159526f98e19ec" + end + + depends_on "python@3.13" + + conflicts_with "js-beautify", because: "both install `js-beautify` binaries" + + resource "editorconfig" do + url "https://files.pythonhosted.org/packages/b4/29/785595a0d8b30ab8d2486559cfba1d46487b8dcbd99f74960b6b4cca92a4/editorconfig-0.17.0.tar.gz" + sha256 "8739052279699840065d3a9f5c125d7d5a98daeefe53b0e5274261d77cb49aa2" + 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 + javascript = "if ('this_is'==/an_example/){of_beautifier();}else{var a=b?(c%d):e[f];}" + assert_equal <<~EOS.chomp, pipe_output(bin/"js-beautify", javascript) + if ('this_is' == /an_example/) { + of_beautifier(); + } else { + var a = b ? (c % d) : e[f]; + } + EOS + end +end diff --git a/Formula/j/jscpd.rb b/Formula/j/jscpd.rb new file mode 100644 index 0000000000000..a5c69950d774e --- /dev/null +++ b/Formula/j/jscpd.rb @@ -0,0 +1,43 @@ +class Jscpd < Formula + desc "Copy/paste detector for programming source code" + homepage "https://github.com/kucherenko/jscpd" + url "https://registry.npmjs.org/jscpd/-/jscpd-4.0.5.tgz" + sha256 "e284fc35166ee0cd5f0db3d5c15b8e9bf8bbc2914d498f361c65e259cf15ae67" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e98285802ac160668e23cd901cec1b45ff0d66fbbaa7e9e4ea1798b317dcf180" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "541ad78931d710438b9489495ff9c534354286e397e20b9c5998af960512d04c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "541ad78931d710438b9489495ff9c534354286e397e20b9c5998af960512d04c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "541ad78931d710438b9489495ff9c534354286e397e20b9c5998af960512d04c" + sha256 cellar: :any_skip_relocation, sonoma: "2e76cf1e82fe5ae1995207ff03b8ef0856452f10febcb7b00305897b8e20bc8a" + sha256 cellar: :any_skip_relocation, ventura: "2e76cf1e82fe5ae1995207ff03b8ef0856452f10febcb7b00305897b8e20bc8a" + sha256 cellar: :any_skip_relocation, monterey: "2e76cf1e82fe5ae1995207ff03b8ef0856452f10febcb7b00305897b8e20bc8a" + sha256 cellar: :any_skip_relocation, arm64_linux: "25641d2af5043374c2dc7fe30d38290923e380fe2673219e8d9320afa3d87c79" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3659994d220039eff175732b7ba2d5cd3c0213e6ff2d4129e2b9b3b93611efe1" + 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.js" + test_file2 = testpath/"test2.js" + test_file.write <<~EOS + console.log("Hello, world!"); + EOS + test_file2.write <<~EOS + console.log("Hello, brewtest!"); + EOS + + output = shell_output("#{bin}/jscpd --min-lines 1 #{testpath}/*.js 2>&1") + assert_match "Found 0 clones", output + + assert_match version.to_s, shell_output("#{bin}/jscpd --version") + end +end diff --git a/Formula/j/jsdoc3.rb b/Formula/j/jsdoc3.rb new file mode 100644 index 0000000000000..19e783a11cad7 --- /dev/null +++ b/Formula/j/jsdoc3.rb @@ -0,0 +1,33 @@ +class Jsdoc3 < Formula + desc "API documentation generator for JavaScript" + homepage "https://jsdoc.app/" + url "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.4.tgz" + sha256 "900416d5ed87a94ea35b886d9e2b0265c541082d904c0b1bf38cbdcbe58f7933" + license "Apache-2.0" + head "https://github.com/jsdoc3/jsdoc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "940d76a15d22ce61510764ebe2464657586e7e7be3a1602f0e6cf372df6a43d4" + 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 <<~JS + /** + * Represents a formula. + * @constructor + * @param {string} name - the name of the formula. + * @param {string} version - the version of the formula. + **/ + function Formula(name, version) {} + JS + + system bin/"jsdoc", "--verbose", "test.js" + end +end diff --git a/Formula/j/jshon.rb b/Formula/j/jshon.rb new file mode 100644 index 0000000000000..54082cb64b0c6 --- /dev/null +++ b/Formula/j/jshon.rb @@ -0,0 +1,42 @@ +class Jshon < Formula + desc "Parse, read, and create JSON from the shell" + homepage "http://kmkeen.com/jshon/" + url "https://github.com/keenerd/jshon/archive/refs/tags/20131105.tar.gz" + sha256 "28420f6f02c6b762732898692cc0b0795cfe1a59fbfb24e67b80f332cf6d4fa2" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c71de9488ca461a0438c85645c42ba5e5c8b81c9272c2639c258a5e6b80d5432" + sha256 cellar: :any, arm64_sonoma: "9f0b7bc5a2120f0ee203a1398bf9f35b45e3ba143adf38a6220c066db09e48f6" + sha256 cellar: :any, arm64_ventura: "143f521901ed3810e8b535bfe42acdb099026a2560c96a65095d977f5e1bb331" + sha256 cellar: :any, arm64_monterey: "61a74bb42fb52712f535d63e3a7e3f9b0e06c372ce6d4b0c20e07af22d360620" + sha256 cellar: :any, arm64_big_sur: "cda0d78d58a0f23419cef2718919688bef98ec7461e750e60f9a10dd528c02ff" + sha256 cellar: :any, sonoma: "5368b1d8cdca07e75d70b448bb6414f62876344d82c8c26c0c5785def3fc0dc0" + sha256 cellar: :any, ventura: "642bbf1d65f96c69316ce7e0294bb750107912515d47d92417a5482e73ba7e2b" + sha256 cellar: :any, monterey: "9f42af851267206d434ccbd1765c6bf9044ddcca29682b3a8b88947dbb8f5dab" + sha256 cellar: :any, big_sur: "301ae5b178d603c79eb0ae2316647ea558c0eaea4331a525a9bc52f6f6387203" + sha256 cellar: :any, catalina: "ec755371878b6471b6d5fb0dac981f7969dad3a42b9aa2e9be60f7a303b3fffe" + sha256 cellar: :any, mojave: "5aa1d640857651175a6fe692f31c0a28b58c7d5b02aac1dc6945c2fce7b76a81" + sha256 cellar: :any, high_sierra: "c32084666ea13118a66803175575de9b74ca5a04d5a32bdd91883007ef6822b8" + sha256 cellar: :any, sierra: "3215b76a79af85c6ae21b7de4e2eff0eb83098c0c5e1ae5b8c870d912498ed13" + sha256 cellar: :any, el_capitan: "bab45017500667c7f8cf3b73c513f043cd04da04610cb2dc8a117ad5c9a5b99a" + sha256 cellar: :any_skip_relocation, arm64_linux: "0afe7df1a37e88dd5f3f54e74c972fb4e8233722b321b6e67f5a0318720fe7be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75afb2192ca7b1257b811c27359474bed0d281e1d67eb3fdb86fbf04005563db" + end + + depends_on "jansson" + + def install + system "make" + bin.install "jshon" + man1.install "jshon.1" + end + + test do + (testpath/"test.json").write <<~JSON + {"a":1,"b":2} + JSON + + assert_equal "2", pipe_output("#{bin}/jshon -l < test.json").strip + end +end diff --git a/Formula/j/jsign.rb b/Formula/j/jsign.rb new file mode 100644 index 0000000000000..68a4f951633de --- /dev/null +++ b/Formula/j/jsign.rb @@ -0,0 +1,58 @@ +class Jsign < Formula + desc "Tool for signing Windows executable files, installers and scripts" + homepage "https://ebourg.github.io/jsign/" + url "https://github.com/ebourg/jsign/archive/refs/tags/7.1.tar.gz" + sha256 "bb6a6cc0fdcc9802b5ab47e7080601c94c545fa235c0feac242d11b9a2524d7d" + license "Apache-2.0" + head "https://github.com/ebourg/jsign.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "398d1b30442ae333b029ad878b635c9f1301be644aa5b2b838de8eb93b039eda" + end + + depends_on "maven" => :build + depends_on "openjdk@21" # The build fails with more recent JDKs + + def install + ENV["JAVA_HOME"] = Language::Java.java_home("21") + system "mvn", "--batch-mode", "package", + "--projects", "jsign-core,jsign-cli,jsign-ant,jsign", + "--also-make", + "-DskipTests", + "-Djdeb.skip", + "-Dmaven.javadoc.skip" + + # Fetch the version from the pom (required to build from HEAD) + require "rexml/document" + pom = REXML::Document.new(File.new("pom.xml")) + version = REXML::XPath.first(pom, "string(/pom:project/pom:version)", "pom" => "http://maven.apache.org/POM/4.0.0") + + libexec.install "jsign/target/jsign-#{version}.jar" + args = %w[ + -Djava.net.useSystemProxies=true + -Dbasename=jsign + -Dlog4j2.loggerContextFactory=net.jsign.log4j.simple.SimpleLoggerContextFactory + ] + bin.write_jar_script libexec/"jsign-#{version}.jar", "jsign", args.join(" ") + bash_completion.install "jsign/src/deb/data/usr/share/bash-completion/completions/jsign" + man1.install "jsign/src/deb/data/usr/share/man/man1/jsign.1" + end + + test do + stable.stage testpath + res = "jsign-core/src/test/resources" + + system bin/"jsign", "--keystore", "#{res}/keystores/keystore.p12", + "--storepass", "password", + "#{res}/wineyes.exe" + + system bin/"jsign", "--keystore", "#{res}/keystores/keystore.jks", + "--storepass", "password", + "#{res}/minimal.msi" + + system bin/"jsign", "--keyfile", "#{res}/keystores/privatekey.pvk", + "--certfile", "#{res}/keystores/jsign-test-certificate-full-chain.spc", + "--storepass", "password", + "#{res}/hello-world.vbs" + end +end diff --git a/Formula/jslint4java.rb b/Formula/j/jslint4java.rb similarity index 79% rename from Formula/jslint4java.rb rename to Formula/j/jslint4java.rb index 0608d0a892999..205670b85b9e6 100644 --- a/Formula/jslint4java.rb +++ b/Formula/j/jslint4java.rb @@ -3,8 +3,14 @@ class Jslint4java < Formula homepage "https://code.google.com/archive/p/jslint4java/" url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jslint4java/jslint4java-2.0.5-dist.zip" sha256 "078240b17256a0472f9981d68f11556238658ebaa67be49ea49958adafc96a81" + license "BSD-2-Clause" - bottle :unneeded + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "96eda9ffe32e9dae5f01ef6dbad6c26ae7deeff1ad79163c18c0331819d44e46" + end + + depends_on "openjdk" def install doc.install Dir["docs/*"] diff --git a/Formula/j/jsmn.rb b/Formula/j/jsmn.rb new file mode 100644 index 0000000000000..5f5b3f0e5643a --- /dev/null +++ b/Formula/j/jsmn.rb @@ -0,0 +1,95 @@ +class Jsmn < Formula + desc "World fastest JSON parser/tokenizer" + homepage "https://zserge.com/jsmn/" + url "https://github.com/zserge/jsmn/archive/refs/tags/v1.1.0.tar.gz" + sha256 "5f0913a10657fe7ec8d5794ccf00a01000e3e1f2f1e1f143c34a0f7b47edcb38" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "14d421cf40a85a3edc9d909bf6ea5be806deee891e3f08b086292f1c1a9eee57" + end + + def install + include.install "jsmn.h" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + static const char *JSON_STRING = + "{\\"user\\": \\"johndoe\\", \\"admin\\": false, \\"uid\\": 1000,\\n " + "\\"groups\\": [\\"users\\", \\"wheel\\", \\"audio\\", \\"video\\"]}"; + + static int jsoneq(const char *json, jsmntok_t *tok, const char *s) { + if (tok->type == JSMN_STRING && (int)strlen(s) == tok->end - tok->start && + strncmp(json + tok->start, s, tok->end - tok->start) == 0) { + return 0; + } + return -1; + } + + int main() { + int i; + int r; + jsmn_parser p; + jsmntok_t t[128]; /* We expect no more than 128 tokens */ + + jsmn_init(&p); + r = jsmn_parse(&p, JSON_STRING, strlen(JSON_STRING), t, + sizeof(t) / sizeof(t[0])); + if (r < 0) { + printf("Failed to parse JSON: %d\\n", r); + return 1; + } + + /* Assume the top-level element is an object */ + if (r < 1 || t[0].type != JSMN_OBJECT) { + printf("Object expected\\n"); + return 1; + } + + /* Loop over all keys of the root object */ + for (i = 1; i < r; i++) { + if (jsoneq(JSON_STRING, &t[i], "user") == 0) { + /* We may use strndup() to fetch string value */ + printf("- User: %.*s\\n", t[i + 1].end - t[i + 1].start, + JSON_STRING + t[i + 1].start); + i++; + } else if (jsoneq(JSON_STRING, &t[i], "admin") == 0) { + /* We may additionally check if the value is either "true" or "false" */ + printf("- Admin: %.*s\\n", t[i + 1].end - t[i + 1].start, + JSON_STRING + t[i + 1].start); + i++; + } else if (jsoneq(JSON_STRING, &t[i], "uid") == 0) { + /* We may want to do strtol() here to get numeric value */ + printf("- UID: %.*s\\n", t[i + 1].end - t[i + 1].start, + JSON_STRING + t[i + 1].start); + i++; + } else if (jsoneq(JSON_STRING, &t[i], "groups") == 0) { + int j; + printf("- Groups:\\n"); + if (t[i + 1].type != JSMN_ARRAY) { + continue; /* We expect groups to be an array of strings */ + } + for (j = 0; j < t[i + 1].size; j++) { + jsmntok_t *g = &t[i + j + 2]; + printf(" * %.*s\\n", g->end - g->start, JSON_STRING + g->start); + } + i += t[i + 1].size + 1; + } else { + printf("Unexpected key: %.*s\\n", t[i].end - t[i].start, + JSON_STRING + t[i].start); + } + } + return EXIT_SUCCESS; + } + C + system ENV.cc, "test.c", "-o", "test" + system "./test" + end +end diff --git a/Formula/j/json-c.rb b/Formula/j/json-c.rb new file mode 100644 index 0000000000000..98fb5f3dbaded --- /dev/null +++ b/Formula/j/json-c.rb @@ -0,0 +1,52 @@ +class JsonC < Formula + desc "JSON parser for C" + homepage "https://github.com/json-c/json-c/wiki" + url "https://github.com/json-c/json-c/archive/refs/tags/json-c-0.18-20240915.tar.gz" + version "0.18" + sha256 "3112c1f25d39eca661fe3fc663431e130cc6e2f900c081738317fba49d29e298" + license "MIT" + head "https://github.com/json-c/json-c.git", branch: "master" + + livecheck do + url :stable + regex(/^json-c[._-](\d+(?:\.\d+)+)(?:[._-]\d{6,8})?$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c5514d30b5249b6d2a92e4dff45f56e2b081aa8811d13a20c84a3b911f6604d7" + sha256 cellar: :any, arm64_sonoma: "16b53cbbfaa2361f7e68f112f8ce706bc3d59738f377a26a1341c7122956e9b3" + sha256 cellar: :any, arm64_ventura: "e6da2f2e625b6d6cf141bb4c3fe05ff0d1d42617321da078b48f32c9b01ddb0b" + sha256 cellar: :any, sonoma: "9630b473e74aa113e050b6ba4d3760d3f0d7c67c6460855217b312c597253eea" + sha256 cellar: :any, ventura: "91286eebfd88f8989056b56dad509e5b42aadda51e29708ef550da8a6b3314ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e3fe7e9e1412e97926ce0716633d5f7ee5f8f22de5f9d59cbb31900b4cd6c46" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6afd63b22756b317e0dd21aa71644f47ec11996366bc60c8d5c9306f87044caa" + end + + depends_on "cmake" => :build + + def install + # We pass `BUILD_APPS=OFF` since any built apps are never installed. See: + # https://github.com/json-c/json-c/blob/master/apps/CMakeLists.txt#L119-L121 + system "cmake", "-S", ".", "-B", "build", "-DBUILD_APPS=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~'EOS' + #include + #include + + int main() { + json_object *obj = json_object_new_object(); + json_object *value = json_object_new_string("value"); + json_object_object_add(obj, "key", value); + printf("%s\n", json_object_to_json_string(obj)); + return 0; + } + EOS + + system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-ljson-c", "-o", "test" + assert_equal '{ "key": "value" }', shell_output("./test").chomp + end +end diff --git a/Formula/j/json-fortran.rb b/Formula/j/json-fortran.rb new file mode 100644 index 0000000000000..bd2aeea31c518 --- /dev/null +++ b/Formula/j/json-fortran.rb @@ -0,0 +1,56 @@ +class JsonFortran < Formula + desc "Fortran 2008 JSON API" + homepage "https://github.com/jacobwilliams/json-fortran" + url "https://github.com/jacobwilliams/json-fortran/archive/refs/tags/9.0.3.tar.gz" + sha256 "ea6e02ab4873d43e2059d51d8392422d6f746a7a9ea0fb18ab28a3beb4fef13c" + license "BSD-3-Clause" + head "https://github.com/jacobwilliams/json-fortran.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "431800da5e3125fabc45e0694e5f038427c5730e7819c8172979aa30208f03ee" + sha256 cellar: :any, arm64_sonoma: "fda27b3d2119ec2f4b33851c3ea7df66ee9d40ee60db229f9f8131eb33bc0fa9" + sha256 cellar: :any, arm64_ventura: "a5f19471c0343e161e383982b38652b099e3a1bd6c334b305f8965d4e87cc582" + sha256 cellar: :any, sonoma: "d8a62d6d7cd520d8d614d097ddb33611a7d234874733a93ee7f5c143fe7f3c09" + sha256 cellar: :any, ventura: "414fd1579e8b0a005d62dc650f733b96459003989144813942154091b506a41a" + sha256 cellar: :any_skip_relocation, arm64_linux: "909feb913cf7a36c8ab7c4c10243e5f5a8500c57ba6ccf519fad0f8dc1561391" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b0f3c60aa5ce457a0bd8775db131a05d97ea280219cb5012408cf4bb2703250" + end + + depends_on "cmake" => :build + depends_on "ford" => :build + depends_on "gcc" # for gfortran + + def install + args = %w[ + -DUSE_GNU_INSTALL_CONVENTION:BOOL=TRUE + -DENABLE_UNICODE:BOOL=TRUE + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"json_test.f90").write <<~FORTRAN + program example + use json_module, RK => json_RK + use iso_fortran_env, only: stdout => output_unit + implicit none + type(json_core) :: json + type(json_value),pointer :: p, inp + call json%initialize() + call json%create_object(p,'') + call json%create_object(inp,'inputs') + call json%add(p, inp) + call json%add(inp, 't0', 0.1_RK) + call json%print(p,stdout) + call json%destroy(p) + if (json%failed()) error stop 'error' + end program example + FORTRAN + system "gfortran", "-o", "test", "json_test.f90", "-I#{include}", + "-L#{lib}", "-ljsonfortran" + system "./test" + end +end diff --git a/Formula/j/json-glib.rb b/Formula/j/json-glib.rb new file mode 100644 index 0000000000000..5089b01aa6e70 --- /dev/null +++ b/Formula/j/json-glib.rb @@ -0,0 +1,53 @@ +class JsonGlib < Formula + desc "Library for JSON, based on GLib" + homepage "https://wiki.gnome.org/Projects/JsonGlib" + url "https://download.gnome.org/sources/json-glib/1.10/json-glib-1.10.6.tar.xz" + sha256 "77f4bcbf9339528f166b8073458693f0a20b77b7059dbc2db61746a1928b0293" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_sequoia: "3d00d4a1266924534b5adcc93273d5e8ce51a6342aa2f9c956a3860bc9ee218c" + sha256 arm64_sonoma: "c6b20089f3b7f27bd3f8d8a7bbc4c1b5e73ac3677c3cb78db538e70a329627b5" + sha256 arm64_ventura: "589f8ee092ec28365af94a19290a8c81e6801ffab80ba903df2eeff613a1ae4f" + sha256 sonoma: "5946d972c9810bd218ca76da8209e2f54f99db9c34614e93ab0c387b368393a2" + sha256 ventura: "121e1fcafb0fb6c77e9bbc8dec4e1b19a22325e20b9780a07edf149ee0038851" + sha256 arm64_linux: "b9434fd258c9196dc5a2108c2d0de4a46f520496048182f4a1757384b6b094c8" + sha256 x86_64_linux: "76ef98939b04b41babd95e8b680b43266986d73dbc783bd5e79d8dadc296df4c" + end + + depends_on "docutils" => :build # for rst2man + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "glib" + + on_macos do + depends_on "gettext" + end + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + system "meson", "setup", "build", "-Dintrospection=enabled", "-Dman=true", *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[]) { + JsonParser *parser = json_parser_new(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs json-glib-1.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/j/json-table.rb b/Formula/j/json-table.rb new file mode 100644 index 0000000000000..eb53aaf4a3c35 --- /dev/null +++ b/Formula/j/json-table.rb @@ -0,0 +1,38 @@ +class JsonTable < Formula + desc "Transform nested JSON data into tabular data in the shell" + homepage "https://github.com/micha/json-table" + url "https://github.com/micha/json-table/archive/refs/tags/4.3.3.tar.gz" + sha256 "0ab7bb2a705ad3399132060b30b32903762473ff79b5a6e6f52f086e507b0911" + license "EPL-1.0" + head "https://github.com/micha/json-table.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2a0e4783bbce7faa941caf2506f8b7d00503c2fd904f4902add6f3e1f29882f6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a11c671903d3c7095c3c9f650e1162afd2f6ccc189c8109162886182d8fd68f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2e92d06b25f370ab9811406799e31be9e8f775e88ae9a9417940f4e8a54940c3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b90e09e62cd09817662e86c0c9854cd7a6e02b128dec008eeaa24d6c89482f11" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "23e482349f2641ceb4b17f3c05bba8dcbef599a2d3b7eba981dbcce14989e157" + sha256 cellar: :any_skip_relocation, sonoma: "2c3cdf120fa2be2558c5e2b2fefb059ca2fbe676522bf59c595f5cecd75b1af4" + sha256 cellar: :any_skip_relocation, ventura: "1f355223e0eacbec654b62e3df5525aed0bf8b5fea393e7ccba4bb48d02d8453" + sha256 cellar: :any_skip_relocation, monterey: "91ed4ccbdeaf3571036d17d31f6a093e867fc8ec6f1c254c7f79342fcb3ab7cb" + sha256 cellar: :any_skip_relocation, big_sur: "56d0c75307c1bfff97077e37070ee7a0532b09614226e5716e7d6a5ad2e2b113" + sha256 cellar: :any_skip_relocation, catalina: "61d89ff5426049b2f0fbb237862ec1227cd36c8f00ce81f9a382e8b7d1c2792a" + sha256 cellar: :any_skip_relocation, mojave: "49f7c1f8e757456f63d5e8b9cb7ef0f2b1cdb22303b2ae799595305cb7e65c5b" + sha256 cellar: :any_skip_relocation, high_sierra: "2afef9b965070bcde986759dbd03cfd8fe3e77aec5a12158fb4aa189626ab977" + sha256 cellar: :any_skip_relocation, sierra: "e5ed8ece1e10ede4417f347703f1e62bb417c65a11f6cac5f10915d44359eb5b" + sha256 cellar: :any_skip_relocation, el_capitan: "3240813838be9e797fd443e5f51d6bb53fc56a8d958dd361cbc865de003619bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "c564b0eb11b11de703ca70ad8ab48319c67053309ccfbac1c569184098d27c2d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2a8b0576a8a0be8e8bc9bcafcb70ad0fd98197a2f465d4713163fff48ba7696" + end + + conflicts_with "jot", because: "both install `jt` binaries" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + output = pipe_output("#{bin}/jt x y %", '{"x":{"y":[1,2,3]}}', 0) + assert_equal "3", output.lines.last.chomp + end +end diff --git a/Formula/j/json2hcl.rb b/Formula/j/json2hcl.rb new file mode 100644 index 0000000000000..9a399f27224f7 --- /dev/null +++ b/Formula/j/json2hcl.rb @@ -0,0 +1,42 @@ +class Json2hcl < Formula + desc "Convert JSON to HCL, and vice versa" + homepage "https://github.com/kvz/json2hcl" + url "https://github.com/kvz/json2hcl/archive/refs/tags/v0.2.0.tar.gz" + sha256 "ac10155d2d86a196a97e9cfb98e7a66f0b0505dee8904bbd3e32979370b81f34" + license "MIT" + head "https://github.com/kvz/json2hcl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3a798a235db04843eee5ce55e66bc4bd3b1c197b9868fe945fba5137be4f190e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3a798a235db04843eee5ce55e66bc4bd3b1c197b9868fe945fba5137be4f190e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3a798a235db04843eee5ce55e66bc4bd3b1c197b9868fe945fba5137be4f190e" + sha256 cellar: :any_skip_relocation, sonoma: "62798fba3369e97896eb088773cef0d613b1ce3caa6b952b19f780038a8dad65" + sha256 cellar: :any_skip_relocation, ventura: "62798fba3369e97896eb088773cef0d613b1ce3caa6b952b19f780038a8dad65" + sha256 cellar: :any_skip_relocation, arm64_linux: "303143d4460ea51e1170665de7e9fe7a7ceca23b2db82b0a8679ebd32d95772a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2948c8a75a038d66472436983a09b1e32cab8b7dc9a5d3d3b8dfec86a75a2eaa" + 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}/json2hcl -version") + + (testpath/"input.json").write <<~JSON + { + "hello": "world" + } + JSON + + assert_equal "\"hello\" = \"world\"", shell_output("#{bin}/json2hcl < input.json") + + (testpath/"input.tf").write <<~HCL + hello = "world" + HCL + + assert_equal "{\n \"hello\": \"world\"\n}", shell_output("#{bin}/json2hcl -reverse < input.tf").chomp + end +end diff --git a/Formula/j/json2ts.rb b/Formula/j/json2ts.rb new file mode 100644 index 0000000000000..3e59e88ab5929 --- /dev/null +++ b/Formula/j/json2ts.rb @@ -0,0 +1,68 @@ +class Json2ts < Formula + desc "Compile JSONSchema to TypeScript type declarations" + homepage "https://github.com/bcherny/json-schema-to-typescript" + url "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-15.0.4.tgz" + sha256 "7eee96dfe76a9f96f063b7d8cff17d019becb4da0ec9e0aeef1b823845b38780" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2591902ae40724331ae9835b1af0ea4ef80d7a7d196077f8f25c902774ec41d4" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + schema = <<~JSON + { + "title": "Example Schema", + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "age": { + "description": "Age in years", + "type": "integer", + "minimum": 0 + }, + "hairColor": { + "enum": ["black", "brown", "blue"], + "type": "string" + } + }, + "additionalProperties": false, + "required": ["firstName", "lastName"] + } + JSON + + typescript = <<~TS + /* eslint-disable */ + /** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + + export interface ExampleSchema { + firstName: string; + lastName: string; + /** + * Age in years + */ + age?: number; + hairColor?: "black" | "brown" | "blue"; + } + TS + + output = pipe_output(bin/"json2ts", schema) + assert_equal output, typescript + end +end diff --git a/Formula/j/json2tsv.rb b/Formula/j/json2tsv.rb new file mode 100644 index 0000000000000..a449f34671985 --- /dev/null +++ b/Formula/j/json2tsv.rb @@ -0,0 +1,43 @@ +class Json2tsv < Formula + desc "JSON to TSV converter" + homepage "https://codemadness.org/json2tsv.html" + url "https://codemadness.org/releases/json2tsv/json2tsv-1.2.tar.gz" + sha256 "113e5a7aeb295e7f8135f231cad900091f99aebd6c98316f761d377e9b50fd84" + license "ISC" + + livecheck do + url "https://codemadness.org/releases/json2tsv/" + regex(/href=.*?json2tsv[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f649f0d640ed1845545c98ff35aa5a07a4356d973fb294b4f088bdd7d2925222" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c11b56c49a1d5b59c1649b9524d63b7e44ec3205e50024decc99c4fd9be50155" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ff1e44a2251c7e15b30b0da83a6a5a47b7d1575372c95b934c429ac484acba61" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a84d66b1c1a8e36f64657560363d472a0461278a9782d15f4b250f3fadd5c983" + sha256 cellar: :any_skip_relocation, sonoma: "5732c14998d7ab8666e00b7b3e3696fb482ea87fe64d5d2aeed9675b468586d5" + sha256 cellar: :any_skip_relocation, ventura: "9703a23fa98d4ef797b35b6a3a1fcd338725489db90e477d53dc39ad8ee2f9ba" + sha256 cellar: :any_skip_relocation, monterey: "470c686211ab55c5e4637c46d0a2b61b1a4453ab89053d145b612bc50728053c" + sha256 cellar: :any_skip_relocation, arm64_linux: "744844b893e1c8a3c5e7d7986cfbac7815668b2fd78a57eeb5eac4f1a8c94207" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e86703c3724095305d07a924a8a8b69a919959df6f0456cb85d1442023c989e" + end + + conflicts_with "jaq", because: "both install `jaq` binaries" + + def install + system "make", "install", "PREFIX=#{prefix}", "MANPREFIX=#{man}" + end + + test do + input = "{\"foo\": \"bar\", \"baz\": [12, 34]}" + expected_output = <<~EOS + \to\t + .foo\ts\tbar + .baz\ta\t + .baz[]\tn\t12 + .baz[]\tn\t34 + EOS + + assert_equal expected_output, pipe_output(bin/"json2tsv", input) + end +end diff --git a/Formula/j/json5.rb b/Formula/j/json5.rb new file mode 100644 index 0000000000000..27b5b747e8648 --- /dev/null +++ b/Formula/j/json5.rb @@ -0,0 +1,38 @@ +class Json5 < Formula + desc "JSON enhanced with usability features" + homepage "https://json5.org/" + url "https://github.com/json5/json5/archive/refs/tags/v2.2.3.tar.gz" + sha256 "a98d1dd7c6b101fd99ae692102dc05a65f072b3e6f8077d3658819440bf76637" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "549882eb4bc333f0952050c2578e929cf4d653d3834467aa364ef0b07f4133d3" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + # Example taken from the official README + (testpath/"test.json5").write <<~EOF + { + // comments + unquoted: 'and you can quote me on that', + singleQuotes: 'I can use "double quotes" here', + lineBreaks: "Look, Mom! \ + No \\n's!", + hexadecimal: 0xdecaf, + leadingDecimalPoint: .8675309, andTrailing: 8675309., + positiveSign: +1, + trailingComma: 'in objects', andIn: ['arrays',], + "backwardsCompatible": "with JSON", + } + EOF + system bin/"json5", "--validate", "test.json5" + end +end diff --git a/Formula/j/json_spirit.rb b/Formula/j/json_spirit.rb new file mode 100644 index 0000000000000..079c12efd171b --- /dev/null +++ b/Formula/j/json_spirit.rb @@ -0,0 +1,49 @@ +class JsonSpirit < Formula + desc "C++ JSON parser/generator" + homepage "https://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented" + url "https://github.com/png85/json_spirit/archive/refs/tags/json_spirit-4.0.8.tar.gz" + # Current release is misnamed on GitHub. Previous versioning scheme and + # homepage dictate the release as "4.08". + version "4.08" + sha256 "43829f55755f725c06dd75d626d9e57d0ce68c2f0d5112fe9a01562c0501e94c" + license "MIT" + + livecheck do + url :stable + regex(/^json_spirit[._-]v?(\d+(?:\.\d+)+)$/i) + strategy :git do |tags, regex| + # Convert versions like `4.0.8` to `4.08` + tags.filter_map { |tag| tag[regex, 1]&.gsub(/(\d+)\.(\d+)\.(\d+)/, '\1.\2\3') } + end + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "260f8a8fa379f57ff36cc4a962698ff2c68028b2534f1bfb001f4308cb7e9781" + sha256 cellar: :any, arm64_sonoma: "e12a59472b1b8e24ae7d91467d5355c21df6cc09a3f833c2668de6da38179bd3" + sha256 cellar: :any, arm64_ventura: "b6a402f81d1433720746b73094e02b2160f47761ef3849ef42352aa374e9b45f" + sha256 cellar: :any, sonoma: "8d6aebd68c1f523e42e9eef02d3feb3116b5995ae781f02d5be5a31ce1beb51a" + sha256 cellar: :any, ventura: "0d753bf6024d053de0a479e014234dd2bf6c3cf05613385f2c80b768dcc06fed" + sha256 cellar: :any_skip_relocation, arm64_linux: "c566f08e81cb1b691dc3d853865e14786593f4226a51ab830502812425df5b05" + sha256 cellar: :any_skip_relocation, x86_64_linux: "968fe8f76818664ec719fa71cfee0f4c520f42b192ad61ad7b747f1f893ce557" + end + + depends_on "cmake" => :build + depends_on "boost" + + def install + args = %w[ + -DCMAKE_CXX_STANDARD=14 + -DJSON_SPIRIT_DEMOS=OFF + -DJSON_SPIRIT_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build_static", "-DBUILD_STATIC_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build_static" + system "cmake", "--install", "build_static" + + system "cmake", "-S", ".", "-B", "build_shared", "-DBUILD_STATIC_LIBS=OFF", *args, *std_cmake_args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + end +end diff --git a/Formula/j/jsoncpp.rb b/Formula/j/jsoncpp.rb new file mode 100644 index 0000000000000..3e2b74b73938c --- /dev/null +++ b/Formula/j/jsoncpp.rb @@ -0,0 +1,72 @@ +class Jsoncpp < Formula + desc "Library for interacting with JSON" + homepage "https://github.com/open-source-parsers/jsoncpp" + url "https://github.com/open-source-parsers/jsoncpp/archive/refs/tags/1.9.6.tar.gz" + sha256 "f93b6dd7ce796b13d02c108bc9f79812245a82e577581c4c9aabe57075c90ea2" + license "MIT" + head "https://github.com/open-source-parsers/jsoncpp.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "09ac35efeac2249064d84ab26a79ac116aa9b25b91baedaf065ce7a66d9d20ef" + sha256 cellar: :any, arm64_sonoma: "a6436e046cdede285aee56208380f24d37ef592671901d7cea131f00998a5000" + sha256 cellar: :any, arm64_ventura: "15a94fe13490a723ab78a54a39129e7cc39ad3e3d5e9ea67e17d6b3c3a67e021" + sha256 cellar: :any, sonoma: "8917f4a14ef0bd4f4d59f8d1a4689c653dd69180fe6ae7c3915bcd904db1d056" + sha256 cellar: :any, ventura: "22fff7a8f16806ace94150ddf11d88ccc58a86326404cd018ad3b87852df7bf3" + sha256 cellar: :any_skip_relocation, arm64_linux: "9447d9e39e2d2af144df7436aad79a6f7c3bb9cf75bb21e2409dfcae273fa4e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "460d3286f4bdf820e9426b66e3773551420c1a1dd1b3bf62d7f20bf2e7e955c1" + end + + # NOTE: Do not change this to use CMake, because the CMake build is deprecated. + # See: https://github.com/open-source-parsers/jsoncpp/wiki/Building#building-and-testing-with-cmake + # https://github.com/Homebrew/homebrew-core/pull/103386 + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "cmake" => :test + + # remove check_required_components for meson build + # upstream pr ref, https://github.com/open-source-parsers/jsoncpp/pull/1570 + patch do + url "https://github.com/open-source-parsers/jsoncpp/commit/3d47db0edcfa5cb5a6237c43efbe443221a32702.patch?full_index=1" + sha256 "1d042632c3272e6946ac9ac1a7cb3b1f0b2a61f901bd20001bed53fc6892d0e0" + 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/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.10) + project(TestJsonCpp) + + set(CMAKE_CXX_STANDARD 11) + find_package(jsoncpp REQUIRED) + + add_executable(test test.cpp) + target_link_libraries(test jsoncpp_lib) + CMAKE + + (testpath/"test.cpp").write <<~CPP + #include + int main() { + Json::Value root; + Json::CharReaderBuilder builder; + std::string errs; + std::istringstream stream1; + stream1.str("[1, 2, 3]"); + return Json::parseFromStream(builder, stream1, &root, &errs) ? 0: 1; + } + CPP + + system "cmake", "-S", ".", "-B", "build" + system "cmake", "--build", "build" + system "./build/test" + end +end diff --git a/Formula/j/jsonlint.rb b/Formula/j/jsonlint.rb new file mode 100644 index 0000000000000..ed403535522dd --- /dev/null +++ b/Formula/j/jsonlint.rb @@ -0,0 +1,24 @@ +class Jsonlint < Formula + desc "JSON parser and validator with a CLI" + homepage "https://github.com/zaach/jsonlint" + url "https://github.com/zaach/jsonlint/archive/refs/tags/v1.6.0.tar.gz" + sha256 "a7f763575d3e3ecc9b2a24b18ccbad2b4b38154c073ac63ebc9517c4cb2de06f" + license "MIT" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "97762cc27f840903d10f585400d3a9019ff18813ce89ffc25cf4d13390479a13" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test.json").write('{"name": "test"}') + system bin/"jsonlint", "test.json" + end +end diff --git a/Formula/j/jsonnet-bundler.rb b/Formula/j/jsonnet-bundler.rb new file mode 100644 index 0000000000000..f774ed472a495 --- /dev/null +++ b/Formula/j/jsonnet-bundler.rb @@ -0,0 +1,39 @@ +class JsonnetBundler < Formula + desc "Package manager for Jsonnet" + homepage "https://github.com/jsonnet-bundler/jsonnet-bundler" + url "https://github.com/jsonnet-bundler/jsonnet-bundler.git", + tag: "v0.6.0", + revision: "ddded59c7066658f3d5abc7fcfc6be2220c92cad" + license "Apache-2.0" + head "https://github.com/jsonnet-bundler/jsonnet-bundler.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "68bb147a2c42552de0ad48ba06125c83402858c56650e29f266443cf9974e11a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "254dc86b4ec480db94c7e1a529d71a1ccdb72924137cb9ea5a5264ec266aeed9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "254dc86b4ec480db94c7e1a529d71a1ccdb72924137cb9ea5a5264ec266aeed9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "254dc86b4ec480db94c7e1a529d71a1ccdb72924137cb9ea5a5264ec266aeed9" + sha256 cellar: :any_skip_relocation, sonoma: "c4c52bef64a185727912ff7b00236894042acbc88e5ecd25796eed36b98296a4" + sha256 cellar: :any_skip_relocation, ventura: "c4c52bef64a185727912ff7b00236894042acbc88e5ecd25796eed36b98296a4" + sha256 cellar: :any_skip_relocation, monterey: "c4c52bef64a185727912ff7b00236894042acbc88e5ecd25796eed36b98296a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "2399698bd1950f20494f2d50bfb636503c34d404781473749688abbc0e2e09ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2bb12716302170c607b6887c0ba3601668b3855f29c4041588e8228d754fe6bd" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}", output: bin/"jb"), "./cmd/jb" + end + + test do + assert_match "A jsonnet package manager", shell_output("#{bin}/jb 2>&1") + + system bin/"jb", "init" + assert_path_exists testpath/"jsonnetfile.json" + + system bin/"jb", "install", "https://github.com/grafana/grafonnet-lib" + assert_predicate testpath/"vendor", :directory? + assert_path_exists testpath/"jsonnetfile.lock.json" + end +end diff --git a/Formula/j/jsonnet.rb b/Formula/j/jsonnet.rb new file mode 100644 index 0000000000000..d4ed64139e618 --- /dev/null +++ b/Formula/j/jsonnet.rb @@ -0,0 +1,58 @@ +class Jsonnet < Formula + desc "Domain specific configuration language for defining JSON data" + homepage "https://jsonnet.org/" + url "https://github.com/google/jsonnet/archive/refs/tags/v0.21.0.tar.gz" + sha256 "a12ebca72e43e7061ffe4ef910e572b95edd7778a543d6bf85f6355bd290300e" + license "Apache-2.0" + head "https://github.com/google/jsonnet.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5d833d4f2134eb94e5062bf1286da9b53e8054e32710f8b6677de914b92b83e9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d5b11fba2474e6e24a697467b232c5cebb6721f71892996162fa138e79a0188b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9d0d5b81bb0fe59cf6dbea23813ef6f069d25cec0138a8cb4710657dbf89b57c" + sha256 cellar: :any_skip_relocation, sonoma: "d779b7d3f5968eef74405f45d0fa213246baff6167d5b30332ae58c0e40ae433" + sha256 cellar: :any_skip_relocation, ventura: "938b8bfa969c79fc6112292dcd90ee25d6ea4b4fe3472aeb33718ca92ec6d9b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "d1dbbf7eef0126d88c484d629eb06569f318808e133120cf98478c31befdc8f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d40920e6c3486ac5d0e52355bd7ad9709439be11676e791e6b5eb31881dca4e" + end + + conflicts_with "go-jsonnet", because: "both install binaries with the same name" + + def install + ENV.cxx11 + system "make" + bin.install "jsonnet" + bin.install "jsonnetfmt" + end + + test do + (testpath/"example.jsonnet").write <<~JSONNET + { + person1: { + name: "Alice", + welcome: "Hello " + self.name + "!", + }, + person2: self.person1 { name: "Bob" }, + } + JSONNET + + expected_output = { + "person1" => { + "name" => "Alice", + "welcome" => "Hello Alice!", + }, + "person2" => { + "name" => "Bob", + "welcome" => "Hello Bob!", + }, + } + + output = shell_output("#{bin}/jsonnet #{testpath}/example.jsonnet") + assert_equal expected_output, JSON.parse(output) + end +end diff --git a/Formula/j/jsonpp.rb b/Formula/j/jsonpp.rb new file mode 100644 index 0000000000000..90dcaa0205489 --- /dev/null +++ b/Formula/j/jsonpp.rb @@ -0,0 +1,45 @@ +class Jsonpp < Formula + desc "Command-line JSON pretty-printer" + homepage "https://jmhodges.github.io/jsonpp/" + url "https://github.com/jmhodges/jsonpp/archive/refs/tags/1.3.0.tar.gz" + sha256 "dde8ea9b270a79cd2b2f40824f89abc5270bd360122d87ab04b4361c0015d941" + license "MIT" + revision 1 + head "https://github.com/jmhodges/jsonpp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fee3f13de44648f26cf9c2928e2c0908117749ebed6265109b099c1259d7af2c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8abe179d20a4dfc3ced5d5f13d51480f284ee6bc1229025d643d22516321c2ce" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef3e05f55a21df7fe9b26309694de0a4678e3d6ada76dcad471687eb1a75ed99" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cfd08d7ebb70b60ae0c00f7d260f9c441112b28475e9411b12457f5190513018" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3837bd3507a7ab6565e04c1d9b1d551d62be51f14233ba92405ca21d4d0e4633" + sha256 cellar: :any_skip_relocation, sonoma: "f984da385f225f15b03895f559483a34550ceb288da12b7187dca663014be424" + sha256 cellar: :any_skip_relocation, ventura: "113145c638ca1c14c22b8de4161f040df61b8502893b9849f4f84ec4ca54500f" + sha256 cellar: :any_skip_relocation, monterey: "e884870ae68df0759df35eaeaee0dddeff2f4746c709201c88efaf285dd9a45c" + sha256 cellar: :any_skip_relocation, big_sur: "3711ce93b4d3874fbfe7967755b587f5787534dbdc12ab6f36eea6a41b54b712" + sha256 cellar: :any_skip_relocation, catalina: "2b84ea4f8d4a4177064c1fbf024876439175c4e8c6576b33f93399c72afe3a5a" + sha256 cellar: :any_skip_relocation, mojave: "7c8dd8c69321e42c29e075a658840167138d16820ba6a0dd5f2f2425c87a569b" + sha256 cellar: :any_skip_relocation, high_sierra: "d81995103192bb58f66d7089939eb6682f117a7044d3a84804db62b4c31a3c81" + sha256 cellar: :any_skip_relocation, sierra: "219f8a6bfdf1d0e8435fa1c1fdf0cc22b91cae8ec7d62581d312927fabcf9388" + sha256 cellar: :any_skip_relocation, el_capitan: "3161f55711eea589c5036078fbf3a5df47484767f025adda7c0692d4dda5f2b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "064faa34fd4233b2a5f5cde23b7fb616c52fda23154de729e38cdd71a04bdb13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ce50b5e577a2ed5e00005a6e629b68715d30bbe5a5ea86fb68bcf7702e436eb" + end + + depends_on "go" => :build + + def install + ENV["GO111MODULE"] = "auto" + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + expected = <<~EOS.chomp + { + "foo": "bar", + "baz": "qux" + } + EOS + assert_equal expected, pipe_output(bin/"jsonpp", '{"foo":"bar","baz":"qux"}') + end +end diff --git a/Formula/j/jsonrpc-glib.rb b/Formula/j/jsonrpc-glib.rb new file mode 100644 index 0000000000000..3b159ac7097a2 --- /dev/null +++ b/Formula/j/jsonrpc-glib.rb @@ -0,0 +1,52 @@ +class JsonrpcGlib < Formula + desc "GNOME library to communicate with JSON-RPC based peers" + homepage "https://gitlab.gnome.org/GNOME/jsonrpc-glib" + url "https://download.gnome.org/sources/jsonrpc-glib/3.44/jsonrpc-glib-3.44.1.tar.xz" + sha256 "1361d17e9c805646afe5102e59baf8ca450238600fcabd01586c654b78bb30df" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "86e923e83351dc15ea3f8e42f004b43b42ccb4948e77d5765130f30c119c667a" + sha256 cellar: :any, arm64_sonoma: "2f74a9be30520cf2db1b7bb27ec12561b14d77dad8673fde2b3ca360d7c60388" + sha256 cellar: :any, arm64_ventura: "c4a222df659e62204a4d37afe1e07a380b2e1418cc2a99b9a445d3a5a3a77238" + sha256 cellar: :any, arm64_monterey: "a820e5106b6a5683afa616cc68aa1dd09a94fa48a47c154ebb8fc3b3c6ae5284" + sha256 cellar: :any, sonoma: "001dd9f46c106194cdb65ab86ca327af3639d88d7e569339d972f0989204c5b8" + sha256 cellar: :any, ventura: "327ea36ff03c446861852f77250db9c4aaffd6c63bb0538d2af0a274d7f2e300" + sha256 cellar: :any, monterey: "d6b2438a15f0a4c0dfb464bbc5cfa277deadad086bab02da55d453d6eb1f8c5b" + sha256 arm64_linux: "76f3560d772429e907e88673aa54186b036f790723638d9b1703141d4eff37d6" + sha256 x86_64_linux: "a4403578f986fa53a5f8c41444aeb7ba65f34e2e5685ab58c0424457c2f2eddd" + 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 "json-glib" + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", "-Dwith_vapi=true", *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[]) { + JsonrpcInputStream *stream = jsonrpc_input_stream_new(NULL); + return 0; + } + C + pkg_config_cflags = shell_output("pkgconf --cflags --libs jsonrpc-glib-1.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *pkg_config_cflags + system "./test" + end +end diff --git a/Formula/j/jsonschema2pojo.rb b/Formula/j/jsonschema2pojo.rb new file mode 100644 index 0000000000000..7ed7432fef6cb --- /dev/null +++ b/Formula/j/jsonschema2pojo.rb @@ -0,0 +1,45 @@ +class Jsonschema2pojo < Formula + desc "Generates Java types from JSON Schema (or example JSON)" + homepage "https://www.jsonschema2pojo.org/" + url "https://github.com/joelittlejohn/jsonschema2pojo/releases/download/jsonschema2pojo-1.2.2/jsonschema2pojo-1.2.2.tar.gz" + sha256 "0a5ee12fe7a413643a4afdf93d37714c8514b98cd67c17e83264df2fb2b1abc2" + license "Apache-2.0" + + livecheck do + url :stable + regex(/jsonschema2pojo[._-]v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "ad532cb32089ba32d3c1725c429053620ce47eb5ecffeceaa92abb2513fe9280" + end + + depends_on "openjdk" + + def install + libexec.install "jsonschema2pojo-#{version}-javadoc.jar", "lib" + bin.write_jar_script libexec/"lib/jsonschema2pojo-cli-#{version}.jar", "jsonschema2pojo" + end + + test do + (testpath/"src/jsonschema.json").write <<~JSON + { + "type":"object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "type": "integer" + }, + "baz": { + "type": "boolean" + } + } + } + JSON + system bin/"jsonschema2pojo", "-s", "src", "-t", testpath + assert_path_exists testpath/"Jsonschema.java", "Failed to generate Jsonschema.java" + end +end diff --git a/Formula/j/jsontoolkit.rb b/Formula/j/jsontoolkit.rb new file mode 100644 index 0000000000000..0f0c3deeeec20 --- /dev/null +++ b/Formula/j/jsontoolkit.rb @@ -0,0 +1,104 @@ +class Jsontoolkit < Formula + desc "Swiss-army knife library for expressive JSON programming in modern C++" + homepage "https://jsontoolkit.sourcemeta.com/" + url "https://github.com/sourcemeta/jsontoolkit/archive/refs/tags/v2.0.0.tar.gz" + sha256 "00f82f02166beabec80522e2bbc7b839ee9b7ccb631411c42e6fab65186e80ba" + license "AGPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4bdb1c92bc5d58c6ecff06644af109f714e087e7005bfd86db5cb623610d0be3" + sha256 cellar: :any, arm64_sonoma: "db44ed711e76947fdcb106dbc0501306e04cb649e66c523ad68b79513b5b5128" + sha256 cellar: :any, arm64_ventura: "cdfad362acd1612e6bfca265a162775f56839029cba214b98caa4dd68d65ca7f" + sha256 cellar: :any, arm64_monterey: "ffe5e64bf78410c1467804c862b83156c47d455f53bbd941f256324f13ccb627" + sha256 cellar: :any, sonoma: "1eb414104958725535408765ecc618e76bdaacaf07a491e1361799200dde54a4" + sha256 cellar: :any, ventura: "82f13b513c2f80a41b9362e5dd116f413cdf5d1d4d603664c36884d7149855ed" + sha256 cellar: :any, monterey: "ab1e654b6af6f056ed2bfaa18ee9f220be238166e965f343ef23ba0ee43f06ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7201211ab61aa4766b12221174fd6fa7215e99571a2f898395d1fedbe19432c7" + end + + # Original source is no longer available after repo change + deprecate! date: "2025-04-17", because: :does_not_build + + depends_on "cmake" => :build + + def install + args = %W[ + -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF + -DJSONTOOLKIT_CONTRIB=OFF + -DJSONTOOLKIT_TESTS=OFF + -DJSONTOOLKIT_DOCS=OFF + -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/"test.cpp").write <<~CPP + #include + #include + #include + #include + + #include + #include + #include + + int main() { + // JSON + const sourcemeta::jsontoolkit::JSON json_doc = + sourcemeta::jsontoolkit::parse(R"([ { "foo": 1 }, { "bar": 2 } ])"); + assert(json_doc.is_array()); + + // JSON Pointer + const sourcemeta::jsontoolkit::Pointer pointer{1, "bar"}; + const sourcemeta::jsontoolkit::JSON &value{ + sourcemeta::jsontoolkit::get(json_doc, pointer)}; + assert(value.is_integer()); + assert(value.to_integer() == 2); + + // JSONL + std::istringstream jsonl_input( + R"JSON({ "foo": 1 } + { "bar": 2 } + { "baz": 3 })JSON"); + for (const auto &document : sourcemeta::jsontoolkit::JSONL{jsonl_input}) { + assert(document.is_object()); + } + + // JSON Schema + const sourcemeta::jsontoolkit::JSON schema{ + sourcemeta::jsontoolkit::parse(R"JSON({ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "string" + })JSON")}; + + const auto compiled_schema{sourcemeta::jsontoolkit::compile( + schema, sourcemeta::jsontoolkit::default_schema_walker, + sourcemeta::jsontoolkit::official_resolver, + sourcemeta::jsontoolkit::default_schema_compiler)}; + + const sourcemeta::jsontoolkit::JSON instance{"foo bar"}; + const auto result{ + sourcemeta::jsontoolkit::evaluate(compiled_schema, instance)}; + assert(result); + + std::cout << "JSON Toolkit works!" << std::endl; + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++20", "-I#{include}", + "-L#{lib}", + "-lsourcemeta_jsontoolkit_json", + "-lsourcemeta_jsontoolkit_jsonschema", + "-lsourcemeta_jsontoolkit_jsonl", + "-lsourcemeta_jsontoolkit_jsonpointer", + "-lsourcemeta_jsontoolkit_uri", + "-o", "test" + system "./test" + end +end diff --git a/Formula/j/jsrepo.rb b/Formula/j/jsrepo.rb new file mode 100644 index 0000000000000..ae94ee047e30a --- /dev/null +++ b/Formula/j/jsrepo.rb @@ -0,0 +1,31 @@ +class Jsrepo < Formula + desc "Build and distribute your code" + homepage "https://jsrepo.dev/" + url "https://registry.npmjs.org/jsrepo/-/jsrepo-2.0.2.tgz" + sha256 "cbc072816a6a93aa0512e8af916b9ea6c553f171bf32ae0f8b02fce6762fbb48" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "8ddcc6bd6f62707a2237e3206b90cc2bb28958e407edef227f4bcae7d0e0ab84" + sha256 cellar: :any, arm64_sonoma: "8ddcc6bd6f62707a2237e3206b90cc2bb28958e407edef227f4bcae7d0e0ab84" + sha256 cellar: :any, arm64_ventura: "8ddcc6bd6f62707a2237e3206b90cc2bb28958e407edef227f4bcae7d0e0ab84" + sha256 cellar: :any, sonoma: "d0fe19ebf1d227b733f6a7648ee95b63f1c3aa8ebfbdbbb11b17829b5ffd5ae6" + sha256 cellar: :any, ventura: "d0fe19ebf1d227b733f6a7648ee95b63f1c3aa8ebfbdbbb11b17829b5ffd5ae6" + sha256 cellar: :any_skip_relocation, arm64_linux: "bfe204ea1a6b00d462eaf8d98b7c6c77dbadd6521f390c7408f03f02f7d5d0c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea0d94bb206db1541adfe36feec240929be8d6d325476487c2a5abb385626a4c" + 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}/jsrepo --version") + + system bin/"jsrepo", "build" + assert_match "\"categories\": []", (testpath/"jsrepo-manifest.json").read + end +end diff --git a/Formula/j/jsvc.rb b/Formula/j/jsvc.rb new file mode 100644 index 0000000000000..e548c13c02b16 --- /dev/null +++ b/Formula/j/jsvc.rb @@ -0,0 +1,40 @@ +class Jsvc < Formula + desc "Wrapper to launch Java applications as daemons" + homepage "https://commons.apache.org/daemon/jsvc.html" + url "https://www.apache.org/dyn/closer.lua?path=commons/daemon/source/commons-daemon-1.4.1-src.tar.gz" + mirror "https://archive.apache.org/dist/commons/daemon/source/commons-daemon-1.4.1-src.tar.gz" + sha256 "c8fb223456ea6df0c61f3c65afb4a8f2c66ddfde4100160427b8ce98b1215131" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3ae96a8f546da4a7badc391467ad2807a629ecb76bd3ff649de0f2d406d85ebd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69f8618c8cbd2f9d20e02bf7e7a241375a41d20816ee2859b8a73fc413070595" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f86b48615d15ad2559ed1f46207bbf801be90db8e1402fc98a10670e38923db0" + sha256 cellar: :any_skip_relocation, sonoma: "4be28d772d108728d3ddc06017a22b8848649e86a55d53e6123aa1c4c7779fa2" + sha256 cellar: :any_skip_relocation, ventura: "369d45598b76c1c87b4f511095ef4b53e17364255ee1218192dcf5d79c1ac642" + sha256 cellar: :any_skip_relocation, arm64_linux: "74d1d873adb94b9c89f94d985bd35b88e5a723544d3b8d3d790eab699f7c50d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20801baa244214c265bfb7c71e6601b44141b658851fce801e0e52de7e6a829b" + end + + depends_on "openjdk@21" + + def install + prefix.install %w[NOTICE.txt LICENSE.txt RELEASE-NOTES.txt] + + cd "src/native/unix" do + # https://github.com/Homebrew/homebrew-core/pull/168294#issuecomment-2104388230 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + system "./configure", "--with-java=#{Formula["openjdk@21"].opt_prefix}" + system "make" + + libexec.install "jsvc" + (bin/"jsvc").write_env_script libexec/"jsvc", Language::Java.overridable_java_home_env("21") + end + end + + test do + output = shell_output("#{bin}/jsvc -help") + assert_match "jsvc (Apache Commons Daemon)", output + end +end diff --git a/Formula/j/jtbl.rb b/Formula/j/jtbl.rb new file mode 100644 index 0000000000000..8748147f4a3d7 --- /dev/null +++ b/Formula/j/jtbl.rb @@ -0,0 +1,43 @@ +class Jtbl < Formula + include Language::Python::Virtualenv + + desc "Convert JSON and JSON Lines to terminal, CSV, HTTP, and markdown tables" + homepage "https://github.com/kellyjonbrazil/jtbl" + url "https://files.pythonhosted.org/packages/9e/7c/b21f3383ca611b56dbc281081cca73a24274c3f39654e7fe196d73a67af6/jtbl-1.6.0.tar.gz" + sha256 "7de0cb08ebb2b3a0658229a8edd4204c6944cbd9e3e04724a9ea235a61c115a5" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d36c946d8efc31ba345e4b8933c3b460034df431373eb632837778ade53378ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d36c946d8efc31ba345e4b8933c3b460034df431373eb632837778ade53378ec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d36c946d8efc31ba345e4b8933c3b460034df431373eb632837778ade53378ec" + sha256 cellar: :any_skip_relocation, sonoma: "6070ec308bdd9b1030b07c7dd4846bb5b09bd268879b21aeeb352453d1fe0f8f" + sha256 cellar: :any_skip_relocation, ventura: "6070ec308bdd9b1030b07c7dd4846bb5b09bd268879b21aeeb352453d1fe0f8f" + sha256 cellar: :any_skip_relocation, arm64_linux: "ebc3fe830e2fe701963c723a4fdfb96e8a9acbedb5a1ec4588b66067466d7172" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d36c946d8efc31ba345e4b8933c3b460034df431373eb632837778ade53378ec" + end + + depends_on "python@3.13" + + 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 + man1.install "man/jtbl.1" + end + + test do + assert_match <<~EOS, pipe_output(bin/"jtbl", "[{\"a\":1,\"b\":1},{\"a\":2,\"b\":2}]") + a b + --- --- + 1 1 + 2 2 + EOS + + assert_match version.to_s, shell_output("#{bin}/jtbl --version 2>&1", 1) + end +end diff --git a/Formula/j/jthread.rb b/Formula/j/jthread.rb new file mode 100644 index 0000000000000..6ef88e6888eb6 --- /dev/null +++ b/Formula/j/jthread.rb @@ -0,0 +1,59 @@ +class Jthread < Formula + desc "C++ class to make use of threads easy" + homepage "https://research.edm.uhasselt.be/jori/page/CS/Jthread.html" + url "https://research.edm.uhasselt.be/jori/jthread/jthread-1.3.3.tar.bz2" + sha256 "17560e8f63fa4df11c3712a304ded85870227b2710a2f39692133d354ea0b64f" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?jthread[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0b2a1b4160a03bae62a73f61bd3e2bbedd3a4080f4e2650060a05bb445301c4b" + sha256 cellar: :any, arm64_sonoma: "4cbc30a2ad38f097c8955fc49b84005364fda4ecc67b24fa3e545394543a2aff" + sha256 cellar: :any, arm64_ventura: "1f6f395e12547fcfcafcfcf52501dce17024aacb8fcb8a2270e42595ac5a80c2" + sha256 cellar: :any, arm64_monterey: "7a786a2608afa79835cab95860405402c716916bb2f79b5e562c838269e178b4" + sha256 cellar: :any, arm64_big_sur: "12a85b410fa6b4c3e47e518813e0907b09ea01ed917ecb39354488ba1afb8ee8" + sha256 cellar: :any, sonoma: "24b7509e05939b0bbbcea8ef151073522022d59632838c29a5cbeb759ac63eb4" + sha256 cellar: :any, ventura: "0e4540078fce3d303b3a5cc1aa147f1eacb41367d39fdbeccd15e8d9c125d86f" + sha256 cellar: :any, monterey: "9c27b5547869cf439f7d5fa99b8bc7de3931f3ea73d113e14d1ad013dbb189d8" + sha256 cellar: :any, big_sur: "8932e35ce2fd13b2ba082af71db656adc9c9413280b279067773ceea8542dc3b" + sha256 cellar: :any, catalina: "e228f81df252c35872df1c6e0711857ad7a7312aae17304a7bcefa0905106b61" + sha256 cellar: :any, mojave: "e2dcd37c6dbeda04e3a9408d9f09f8d00ff669a3eb7ee8b098742887d800162e" + sha256 cellar: :any, high_sierra: "2d9c8a2d9e52f9419cd1015d982e06d58963e29c43a44f7ddfbbf6f149e20cc0" + sha256 cellar: :any, sierra: "099b841458d4d6f4ac3f5e7b453d4ec5b2a50f4dd1a6ccac9614ac72a1c1c90f" + sha256 cellar: :any, el_capitan: "0e846e47e0350f6dc4ca15f5eb6f9e9d2cf7345c115476bc93fc78ac2cb056af" + sha256 cellar: :any_skip_relocation, arm64_linux: "629245be8b81ca21008f231fbda9b316d87b06d94b42df62fbd00b8a600efd38" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0288eb31c63b100814238cd97f4fb9ac7e26fde1bd284b2dfacee67df8de337f" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :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 + using namespace jthread; + + int main() { + JMutex* jm = new JMutex(); + jm->Init(); + jm->Lock(); + jm->Unlock(); + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-ljthread", + "-o", "test" + system "./test" + end +end diff --git a/Formula/j/judy.rb b/Formula/j/judy.rb new file mode 100644 index 0000000000000..898988fa89754 --- /dev/null +++ b/Formula/j/judy.rb @@ -0,0 +1,69 @@ +class Judy < Formula + desc "State-of-the-art C library that implements a sparse dynamic array" + homepage "https://judy.sourceforge.net/" + url "https://downloads.sourceforge.net/project/judy/judy/Judy-1.0.5/Judy-1.0.5.tar.gz" + sha256 "d2704089f85fdb6f2cd7e77be21170ced4b4375c03ef1ad4cf1075bd414a63eb" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9c845c66e4c08af1feb840119e2013109cbfba280a96022e15aa1fe703fa8c61" + sha256 cellar: :any, arm64_sonoma: "a4aae192c5fb922c184bb6468f445a680549206575f4e78a3494430234465d00" + sha256 cellar: :any, arm64_ventura: "624e8a5e7c44ff6c509097ee350f165247701cedd4fd67541fe9ca48aafad391" + sha256 cellar: :any, arm64_monterey: "fb900402a39c752744d668c072a7e62fc4ad51468d2fad49dae6f49c8721e96d" + sha256 cellar: :any, arm64_big_sur: "02383b315256e97e2f0a622b94cae472765e1570442e62b13f14eeaf381c1ebd" + sha256 cellar: :any, sonoma: "61dde56d3082d456189fb9aa0beaa11c9eada260c76f12a164d23be1a9cc9965" + sha256 cellar: :any, ventura: "816a9e40b00d33093c747cb4d9c72799441d80e2992dce13630abf1e54b91572" + sha256 cellar: :any, monterey: "9c9b94476cd3939a95e1f0382c7f6a3033bc23f75e08bad7b4e68e23cce8009a" + sha256 cellar: :any, big_sur: "c353fdde22d413989196e464793606a163782bd7b14b25932f3809a84291d0d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "0be75692a449169f95f155215d8e9adc714f38f486c63888ee5d6149296cb7c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15200428f8b8b7ceae78d45b6b9d8a6ca48170243f3ed3d3ae80bfde4f938e15" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + # Regenrate configure script as it is too old for libtool patch + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + ENV.deparallelize + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + Pvoid_t judyArray = (Pvoid_t) NULL; + Word_t index; + PWord_t pValue; + + for (index = 0; index < 10; index++) { + JLI(pValue, judyArray, index); + *pValue = index * index; + } + + for (index = 0; index < 10; index++) { + JLG(pValue, judyArray, index); + if (pValue != NULL) { + printf("Square of %lu is %lu\\n", index, *pValue); + } else { + printf("Value not found for index %lu\\n", index); + } + } + + Word_t byteCount = 0; + JLFA(byteCount, judyArray); + printf("Freed %lu bytes\\n", byteCount); + + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lJudy", "-o", "test" + system "./test" + end +end diff --git a/Formula/j/juicefs.rb b/Formula/j/juicefs.rb new file mode 100644 index 0000000000000..dad1aa544f245 --- /dev/null +++ b/Formula/j/juicefs.rb @@ -0,0 +1,36 @@ +class Juicefs < Formula + desc "Cloud-based, distributed POSIX file system built on top of Redis and S3" + homepage "https://juicefs.com/" + url "https://github.com/juicedata/juicefs/archive/refs/tags/v1.2.3.tar.gz" + sha256 "a29145a17deed9b753ad2a48e779bee1d5b17e39980317039bacb089d1c1c85c" + license "Apache-2.0" + head "https://github.com/juicedata/juicefs.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93d6b6b234746b745ed9875b75b33761e7c816d1aa2d623c71728c6b7bf27097" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a06e6e368690d5b35fbeb088abdb73211e192333fb34996c296a27c2ac10860e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8341307ec2aa713208726abbe0ed2cb3b85d80d185834592fb46e64b7286e2b6" + sha256 cellar: :any_skip_relocation, sonoma: "f91870ae7f84be5ccbe478b60000e7067ef9c86ee8b39f8bc6566a7e01531dcf" + sha256 cellar: :any_skip_relocation, ventura: "a605622dbbe72e1fba6c22f09ee1a88cd23e9de73edc2c7129fc4da9b80bb61c" + sha256 cellar: :any_skip_relocation, arm64_linux: "38d6bafea8444498f5b639a953c2c8b32087619915197275f9803c0516cce597" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb7e512f60b0e0d1cc328b7977ce081c3d02567db4bb1d9c98525417e7ae85ab" + end + + depends_on "go" => :build + + def install + system "make" + bin.install "juicefs" + end + + test do + output = shell_output("#{bin}/juicefs format sqlite3://test.db testfs 2>&1") + assert_path_exists testpath/"test.db" + assert_match "Meta address: sqlite3://test.db", output + end +end diff --git a/Formula/j/juise.rb b/Formula/j/juise.rb new file mode 100644 index 0000000000000..af93519638c2e --- /dev/null +++ b/Formula/j/juise.rb @@ -0,0 +1,45 @@ +class Juise < Formula + desc "JUNOS user interface scripting environment" + homepage "https://github.com/Juniper/juise/wiki" + url "https://github.com/Juniper/juise/releases/download/3.0.0/juise-3.0.0.tar.gz" + sha256 "54d641789bf9a531bc262876914e76888382522ad193eace132d16203546d51e" + license "BSD-3-Clause" + + bottle do + sha256 arm64_sequoia: "2013383bad9ecb913d1888a0cb957fa78044bf13aa30ba2a3bf52275d0009c49" + sha256 arm64_sonoma: "666efd51556692b16cd32582a0aacf68272c8f5c5bb4315e188f59f73bea6ca4" + sha256 arm64_ventura: "a13e8825285d6e81d404b71bbced2b2e64b90074077c8862366c1f44acb8e409" + sha256 sonoma: "1e3b075c24e4fa37d85fbf1adee7d01520ae0bb37167e13f8d8369431292309f" + sha256 ventura: "0c88f52098999814254d35f3a82b7d61d40ab6dea598ff8924be683debc31c66" + end + + head do + url "https://github.com/Juniper/juise.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "libssh2" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libslax" + + def install + system "sh", "./bin/setup.sh" if build.head? + + # Prevent sandbox violation where juise's `make install` tries to + # write to "/usr/local/Cellar/libslax/0.20.1/lib/slax/extensions" + # Reported 5th May 2016: https://github.com/Juniper/juise/issues/34 + inreplace "configure", + "SLAX_EXTDIR=\"`$SLAX_CONFIG --extdir | head -1`\"", + "SLAX_EXTDIR=\"#{lib}/slax/extensions\"" + + system "./configure", "--enable-libedit", *std_configure_args + system "make", "install" + end + + test do + assert_match "libjuice version #{version}", shell_output("#{bin}/juise -V") + end +end diff --git a/Formula/j/juju-wait.rb b/Formula/j/juju-wait.rb new file mode 100644 index 0000000000000..77546822eefd1 --- /dev/null +++ b/Formula/j/juju-wait.rb @@ -0,0 +1,51 @@ +class JujuWait < Formula + include Language::Python::Virtualenv + + desc "Juju plugin for waiting for deployments to settle" + homepage "https://launchpad.net/juju-wait" + url "https://files.pythonhosted.org/packages/0c/2b/f4bd0138f941e4ba321298663de3f1c8d9368b75671b17aa1b8d41a154dc/juju-wait-2.8.4.tar.gz" + sha256 "9e84739056e371ab41ee59086313bf357684bc97aae8308716c8fe3f19df99be" + license "GPL-3.0-only" + revision 3 + + bottle do + rebuild 6 + sha256 cellar: :any, arm64_sequoia: "7d8a37c0c1be688c222abe9d980a5368887f18f7436de14e82f526fe4e023d66" + sha256 cellar: :any, arm64_sonoma: "00e147b7a8901e7434e87712e73a684261f4e04e52f1fd6223db7dc767adf59b" + sha256 cellar: :any, arm64_ventura: "50c5aa7e7a321b875f71e65536c52f9a6df5863a2f7d83ce20094eb9bafb3679" + sha256 cellar: :any, sonoma: "56133b32e2f328bf3933a4391207659ee41e43dff840a516fa001a7c5022ce0d" + sha256 cellar: :any, ventura: "81e3a1f0207ec945ec9b9cf4411a83c17a70c343ebe5d99d01d2400919b697d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ec1653bfe939709f0ebe1cffb1bd16f84da710adc34e301ec028849f4c92fd1" + end + + # From homepage: + # [DEPRECATED] Since Juju 3, there's a native Juju command covering this - + # https://juju.is/docs/olm/juju-wait-for. Please use that instead. + deprecate! date: "2024-02-22", because: :deprecated_upstream + disable! date: "2025-02-24", because: :deprecated_upstream + + depends_on "juju" + depends_on "libyaml" + depends_on "python@3.13" + + 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/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + end + + def install + virtualenv_install_with_resources + end + + test do + # NOTE: Testing this plugin requires a Juju environment that's in the + # process of deploying big software. This plugin relies on those application + # statuses to determine if an environment is completely deployed or not. + system bin/"juju-wait", "--version" + end +end diff --git a/Formula/j/juju.rb b/Formula/j/juju.rb new file mode 100644 index 0000000000000..b4c702bad3d1d --- /dev/null +++ b/Formula/j/juju.rb @@ -0,0 +1,43 @@ +class Juju < Formula + desc "DevOps management tool" + homepage "https://juju.is/" + url "https://launchpad.net/juju/3.6/3.6.5/+download/juju-core_3.6.5.tar.gz" + sha256 "7e2eec738d7b8114e76d889d3f3f815fe4da4f95be73015ff524d9b5b2e9a72f" + license "AGPL-3.0-only" + version_scheme 1 + head "https://github.com/juju/juju.git", branch: "develop" + + # We check the Launchpad download page for Juju because the latest version + # listed on the main project page isn't always a stable version. + livecheck do + url "https://launchpad.net/juju/+download" + regex(/href=.*?juju-core[._-]v?(\d+(?:\.\d+)+)\.t/i) + strategy :page_match + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e6fc9077bb6dd002473731d0cdb04996402fea9399a71d21f293ec3638dca045" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b4404abc60c50ff07949e41329289701d0f35a89bc81f51d7f61d98d4824ce05" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eafebce6b2a34de189beedf0bca7e0534647ee74e5d138e06353c3462f452209" + sha256 cellar: :any_skip_relocation, sonoma: "bf4441427c2948c8d015b8fe321a5f12e88d54815eb870d916468a45c30384a2" + sha256 cellar: :any_skip_relocation, ventura: "6893e3f3fb4a89dd29967ff0a3cf317b5390813ba2e35d73df6da632c1788788" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e8dd1c48a3846ba95477f444e58e5a7465b0574fa112fd5d397a67dd664a1c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a91fb9eec0c17c8ff0c9112a0920d5831e3a63bd620415c443c659a26405d35" + end + + depends_on "go" => :build + + def install + cd "src/github.com/juju/juju" do + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/juju" + system "go", "build", *std_go_args(output: bin/"juju-metadata", ldflags: "-s -w"), "./cmd/plugins/juju-metadata" + bash_completion.install "etc/bash_completion.d/juju" + end + end + + test do + system bin/"juju", "version" + assert_match "No controllers registered", shell_output("#{bin}/juju list-users 2>&1", 1) + assert_match "No controllers registered", shell_output("#{bin}/juju-metadata list-images 2>&1", 2) + end +end diff --git a/Formula/j/julia.rb b/Formula/j/julia.rb new file mode 100644 index 0000000000000..d4d112d54674d --- /dev/null +++ b/Formula/j/julia.rb @@ -0,0 +1,267 @@ +class Julia < Formula + desc "Fast, Dynamic Programming Language" + homepage "https://julialang.org/" + license all_of: ["MIT", "BSD-3-Clause", "Apache-2.0", "BSL-1.0"] + + stable do + # Use the `-full` tarball to avoid having to download during the build. + # TODO: Check if we can unbundle `curl`: https://github.com/JuliaLang/Downloads.jl/issues/260 + url "https://github.com/JuliaLang/julia/releases/download/v1.11.5/julia-1.11.5-full.tar.gz" + sha256 "147626db6b6887bfb6612cb6cd2a48d689806649fae34dc749fddc8375c2c625" + + depends_on "libgit2@1.8" + + # Link against libgcc_s.1.1.dylib, not libgcc_s.1.dylib + # https://github.com/JuliaLang/julia/pull/56965#event-15826575851 + # Remove in 1.12 + patch do + url "https://github.com/JuliaLang/julia/commit/75cdffeb0f37b438950534712755a4f7cebbdd8c.patch?full_index=1" + sha256 "7b62554131a2627c70570b800c8fea35048e863ba2e11fc6c93d6fe26920cda8" + end + end + + # Upstream creates GitHub releases for both stable and LTS versions, so the + # "latest" release on GitHub may be an LTS version instead of a "stable" + # version. This checks the first-party download page, which links to the + # `stable` tarballs from the newest releases on GitHub. + livecheck do + url "https://julialang.org/downloads/" + regex(/href=.*?julia[._-]v?(\d+(?:\.\d+)+)[._-]full\.t/i) + end + + bottle do + sha256 arm64_sequoia: "fff9bac64500a16448e97bab12228d2cd3981a7c9c8d861c3a687670338bd6ce" + sha256 cellar: :any, arm64_sonoma: "791f0898da48873ef1657063aa5f5c771cf044b76532d4b6b90a902baa12977c" + sha256 cellar: :any, arm64_ventura: "473b46f21f2299a9c1b40e05b86c451a7f8430b39c68954a863df1e18d2bee9f" + sha256 cellar: :any, sonoma: "febaa008940f15e71b5728953ce561930b0cbf1f6a2e468cf9e2142c2d15f9e9" + sha256 ventura: "87dff6175625d649b7286cb870f5713fd49c32ceae760fa5ffa6bdb84472901d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e910379b335ae1cbe40fc342ceba229ddd9fc4ad76d685d6ef53718e68c8756f" + end + + head do + url "https://github.com/JuliaLang/julia.git", branch: "master" + + depends_on "curl" + depends_on "libgit2" + depends_on "openssl@3" + end + + depends_on "cmake" => :build # Needed to build LLVM + depends_on "gcc" => :build # for gfortran + depends_on "ca-certificates" + depends_on "gmp" + depends_on "libblastrampoline" + depends_on "libnghttp2" + depends_on "libssh2" + depends_on "mpfr" + depends_on "openblas" + depends_on "openlibm" + depends_on "p7zip" + depends_on "pcre2" + depends_on "suite-sparse" + depends_on "utf8proc" + depends_on "zstd" + + uses_from_macos "perl" => :build + uses_from_macos "python" => :build + uses_from_macos "ncurses" # for terminfo + uses_from_macos "zlib" + + on_linux do + depends_on "patchelf" => :build + end + + conflicts_with "juliaup", because: "both install `julia` binaries" + + def install + # Build documentation available at + # https://github.com/JuliaLang/julia/blob/v#{version}/doc/build/build.md + args = %W[ + prefix=#{prefix} + sysconfdir=#{etc} + LOCALBASE=#{HOMEBREW_PREFIX} + PYTHON=python3 + USE_BINARYBUILDER=0 + USE_SYSTEM_BLAS=1 + USE_SYSTEM_CSL=1 + USE_SYSTEM_GMP=1 + USE_SYSTEM_LAPACK=1 + USE_SYSTEM_LIBBLASTRAMPOLINE=1 + USE_SYSTEM_LIBGIT2=1 + USE_SYSTEM_LIBSSH2=1 + USE_SYSTEM_LIBSUITESPARSE=1 + USE_SYSTEM_MPFR=1 + USE_SYSTEM_NGHTTP2=1 + USE_SYSTEM_OPENLIBM=1 + USE_SYSTEM_OPENSSL=1 + USE_SYSTEM_P7ZIP=1 + USE_SYSTEM_PATCHELF=1 + USE_SYSTEM_PCRE=1 + USE_SYSTEM_UTF8PROC=1 + USE_SYSTEM_ZLIB=1 + VERBOSE=1 + LIBBLAS=-lopenblas + LIBBLASNAME=libopenblas + LIBLAPACK=-lopenblas + LIBLAPACKNAME=libopenblas + USE_BLAS64=0 + WITH_TERMINFO=0 + ] + + args << "MACOSX_VERSION_MIN=#{MacOS.version}" if OS.mac? + + # Set MARCH and JULIA_CPU_TARGET to ensure Julia works on machines we distribute to. + # Values adapted from https://github.com/JuliaCI/julia-buildkite/blob/main/utilities/build_envs.sh + args << "MARCH=#{Hardware.oldest_cpu}" if Hardware::CPU.intel? + + cpu_targets = %w[generic] + if Hardware::CPU.arm? + if OS.mac? + # For Apple Silicon, we don't care about other hardware + cpu_targets << "apple-m1,clone_all" + else + cpu_targets += %w[cortex-a57 thunderx2t99 carmel,clone_all + apple-m1,base(3) neoverse-512tvb,base(3)] + end + end + if Hardware::CPU.intel? + cpu_targets += %w[sandybridge,-xsaveopt,clone_all + haswell,-rdrnd,base(1) + x86-64-v4,-rdrnd,base(1)] + end + args << "JULIA_CPU_TARGET=#{cpu_targets.join(";")}" + user = begin + tap.user + rescue + "unknown user" + end + args << "TAGGED_RELEASE_BANNER=Built by #{user} (v#{pkg_version})" + + ENV.append "LDFLAGS", "-Wl,-rpath,#{lib}/julia" + # Help Julia find keg-only dependencies + deps.map(&:to_formula).select(&:keg_only?).map(&:opt_lib).each do |libdir| + ENV.append "LDFLAGS", "-Wl,-rpath,#{libdir}" + end + + gcc = Formula["gcc"] + gcclibdir = gcc.opt_lib/"gcc/current" + if OS.mac? + ENV.append "LDFLAGS", "-Wl,-rpath,#{gcclibdir}" + # List these two last, since we want keg-only libraries to be found first + ENV.append "LDFLAGS", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib" + ENV.append "LDFLAGS", "-Wl,-rpath,/usr/lib" # Needed to find macOS zlib. + ENV["SDKROOT"] = MacOS.sdk_path + else + ENV.append "LDFLAGS", "-Wl,-rpath,#{lib}" + end + + # Remove library versions from nghttp2_jll and others + # https://git.archlinux.org/svntogit/community.git/tree/trunk/julia-hardcoded-libs.patch?h=packages/julia + stdlib_deps = %w[nghttp2 LibGit2 OpenLibm SuiteSparse] + stdlib_deps.each do |dep| + inreplace (buildpath/"stdlib").glob("**/#{dep}_jll.jl") do |s| + s.gsub!(%r{@rpath/lib(\w+)(\.\d+)*\.dylib}, "@rpath/lib\\1.dylib") + s.gsub!(/lib(\w+)\.so(\.\d+)*/, "lib\\1.so") + end + end + + # Make Julia use a CA cert from `ca-certificates` + (buildpath/"usr/share/julia").install_symlink Formula["ca-certificates"].pkgetc/"cert.pem" + + if build.head? + args << "USE_SYSTEM_CURL=1" + else + # Fix for cmake version 4 compatibility + inreplace "deps/tools/common.mk", "CMAKE_COMMON :=", "CMAKE_COMMON := -DCMAKE_POLICY_VERSION_MINIMUM=3.5" + args += ["USE_SYSTEM_CURL=0", "USE_SYSTEM_MBEDTLS=0"] + # Julia 1.11 is incompatible with curl >= 8.10 + # Issue ref: https://github.com/JuliaLang/Downloads.jl/issues/260 + odie "Try unbundling curl and removing mbedtls references!" if version >= "1.12" + # Workaround to install bundled curl without bundling other libs + system "make", "-C", "deps", "install-mbedtls", *args + system "make", "-C", "deps", "install-curl", *args + end + + system "make", *args, "install" + + if OS.linux? + # Replace symlinks referencing Cellar paths with ones using opt paths + deps.reject(&:build?).map(&:to_formula).map(&:opt_lib).each do |libdir| + libdir.glob(shared_library("*")) do |so| + next unless (lib/"julia"/so.basename).exist? + + ln_sf so.relative_path_from(lib/"julia"), lib/"julia" + end + end + end + + # Create copies of the necessary gcc libraries in `buildpath/"usr/lib"` + system "make", "-C", "deps", "USE_SYSTEM_CSL=1", "install-csl" + # Install gcc library symlinks where Julia expects them + gcclibdir.glob(shared_library("*")) do |so| + next unless (buildpath/"usr/lib"/so.basename).exist? + + # Use `ln_sf` instead of `install_symlink` to avoid referencing + # gcc's full version and revision number in the symlink path + ln_sf so.relative_path_from(lib/"julia"), lib/"julia" + end + + # Some Julia packages look for libopenblas as libopenblas64_ + (lib/"julia").install_symlink shared_library("libopenblas") => shared_library("libopenblas64_") + + # Keep Julia's CA cert in sync with ca-certificates' + pkgshare.install_symlink Formula["ca-certificates"].pkgetc/"cert.pem" + end + + test do + args = %W[ + --startup-file=no + --history-file=no + --project=#{testpath} + --procs #{ENV.make_jobs} + ] + + assert_equal "4", shell_output("#{bin}/julia #{args.join(" ")} --print '2 + 2'").chomp + + if OS.linux? || Hardware::CPU.arm? + # Setting up test suite is slow and causes Intel macOS to exceed 5 min limit + with_env(CI: nil) do + system bin/"julia", *args, "--eval", 'Base.runtests("core")' + end + end + + # Check that installing packages works. + # https://github.com/orgs/Homebrew/discussions/2749 + system bin/"julia", *args, "--eval", 'using Pkg; Pkg.add("Example")' + + # Check that Julia can load stdlibs that load non-Julia code. + # Most of these also check that Julia can load Homebrew-provided libraries. + jlls = %w[ + MPFR_jll SuiteSparse_jll Zlib_jll OpenLibm_jll + nghttp2_jll LibGit2_jll GMP_jll + OpenBLAS_jll CompilerSupportLibraries_jll dSFMT_jll LibUV_jll + LibSSH2_jll LibCURL_jll libLLVM_jll PCRE2_jll + ] + system bin/"julia", *args, "--eval", "using #{jlls.join(", ")}" + + # Check that Julia can load libraries in lib/"julia". + # Most of these are symlinks to Homebrew-provided libraries. + # This also checks that these libraries can be loaded even when + # the symlinks are broken (e.g. by version bumps). + libs = (lib/"julia").glob(shared_library("*")) + .map { |library| library.basename.to_s } + .reject do |name| + name.start_with?("sys", "libjulia-internal", "libccalltest") + end + + (testpath/"library_test.jl").write <<~JULIA + using Libdl + libraries = #{libs} + for lib in libraries + handle = dlopen(lib) + @assert dlclose(handle) "Unable to close $(lib)!" + end + JULIA + system bin/"julia", *args, "library_test.jl" + end +end diff --git a/Formula/j/juliaup.rb b/Formula/j/juliaup.rb new file mode 100644 index 0000000000000..ee5911df55098 --- /dev/null +++ b/Formula/j/juliaup.rb @@ -0,0 +1,41 @@ +class Juliaup < Formula + desc "Julia installer and version multiplexer" + homepage "https://github.com/JuliaLang/juliaup" + url "https://github.com/JuliaLang/juliaup/archive/refs/tags/v1.17.19.tar.gz" + sha256 "5bcc9d9145e0d60d47aace5104805f6a21cab75ba19d8cfda88e1b7573291c7e" + license "MIT" + head "https://github.com/JuliaLang/juliaup.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "124719225451633c8388a76501cc32a5d401f06d1b21ac804d04c1daab9231b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5dad7c0608bb8e22d61de78a207ce79f74b41790dfd9291dd702dc239e825ab1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "87736debfa797f45c848d407d861b2dc7121654e81a9cf03250bce6b1c288e98" + sha256 cellar: :any_skip_relocation, sonoma: "0a2b4b9859f51aebafcfa5d2301e609e820d38713826814b18be7040d158638e" + sha256 cellar: :any_skip_relocation, ventura: "102798492a832de134d646511331b043f51fe3c32fc31bb3c0dbf98e0d1b58b3" + sha256 cellar: :any_skip_relocation, arm64_linux: "50726ad6aa8c3a2b97ac85eb1e116a4c8a9870d8ac6fde7e9321684beb8b92f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "729ff8e288917edca87e6a4c0b9b7077be3ede3cba8d2028185c4897bd5d96ad" + end + + depends_on "rust" => :build + + conflicts_with "julia", because: "both install `julia` binaries" + + def install + system "cargo", "install", "--bin", "juliaup", *std_cargo_args + system "cargo", "install", "--bin", "julialauncher", "--features", "binjulialauncher", *std_cargo_args + + bin.install_symlink "julialauncher" => "julia" + + generate_completions_from_executable(bin/"juliaup", "completions") + end + + test do + expected = "Default Channel Version Update" + assert_equal expected, shell_output("#{bin}/juliaup status").lines.first.strip + end +end diff --git a/Formula/j/julius.rb b/Formula/j/julius.rb new file mode 100644 index 0000000000000..bb02665ece3eb --- /dev/null +++ b/Formula/j/julius.rb @@ -0,0 +1,70 @@ +class Julius < Formula + desc "Two-pass large vocabulary continuous speech recognition engine" + homepage "https://github.com/julius-speech/julius" + url "https://github.com/julius-speech/julius/archive/refs/tags/v4.6.tar.gz" + sha256 "74447d7adb3bd119adae7915ba9422b7da553556f979ac4ee53a262d94d47b47" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d0918ba6c8c4c755b0a7ad73e0efcc5e6a20924490acebf3ff0af45aef2dcfd1" + sha256 cellar: :any, arm64_sonoma: "3b9b28223b4853e92cc9be12a3e46ab876cdf7e48fe7fce4ce2c22459ce91db3" + sha256 cellar: :any, arm64_ventura: "345963770e4eaa6cd0a4308d657f4b0a45b00d30e23d5e7aba9143dee08f418b" + sha256 cellar: :any, arm64_monterey: "61e0a2f95974a4fdfaee2253963fe3ab20284c4325e0f34aa22bc4a9e40a09c0" + sha256 cellar: :any, arm64_big_sur: "dcbb2b7bfd4ba078ec6473c2193ca6fefd3f1cbe6375bd662401a5b607d99387" + sha256 cellar: :any, sonoma: "96912e179e82c1ddfd15c1f1174ca38ae3ce8121912ce3d9f4a8faf6316bb9c5" + sha256 cellar: :any, ventura: "c4229059cd82483a8bb92be7fdaadb2d1958e4be61001fa539f71fde025eada6" + sha256 cellar: :any, monterey: "73f943f1011686778fdae712733eb0987f97976c6f0ab26d9771c57eccf304c9" + sha256 cellar: :any, big_sur: "4b8251857584f844fe5469a0283a773428383053f8d80eaeff885b745578aa1d" + sha256 cellar: :any, catalina: "b06b9ca71df4cccff10e36a4a75a55f7d5bdb009f4dba9f940044da6ba0c258d" + sha256 cellar: :any, mojave: "041d7a3185850375ef67148a74ab9513e9a4eb6de05deeb3595f3941c41010d6" + sha256 cellar: :any, high_sierra: "d699dbf645c69f795421569e21c9d676e0db534a8d72fabfb721d5864e391549" + sha256 cellar: :any_skip_relocation, arm64_linux: "47883d170fbc7ce73b8498ce37bb9e26ba3d57e5574f8ed03d11af3bc8ed81be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "576576ac4069a3fd9e89e71ac2cefe9f3d1e666b9aa92915f248f8bffcf19de5" + end + + depends_on "libsndfile" + + uses_from_macos "zlib" + + conflicts_with "cmuclmtk", because: "both install `binlm2arpa` binaries" + + # A pull request to fix this has been submitted upstream: + # https://github.com/julius-speech/julius/pull/184 + patch :DATA + + def install + # Workaround for Xcode 15 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + # https://github.com/julius-speech/julius/issues/153 fixes implicit declaration error + inreplace "libsent/src/adin/adin_mic_darwin_coreaudio.c", + "#include ", "#include \n#include " + + args = ["--disable-silent-rules", "--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" + system "make", "install" + end + + test do + shell_output("#{bin}/julius --help", 1) + end +end + +__END__ +diff --git a/libsent/src/phmm/calc_dnn.c b/libsent/src/phmm/calc_dnn.c +index aed91ef..a8a9f35 100644 +--- a/libsent/src/phmm/calc_dnn.c ++++ b/libsent/src/phmm/calc_dnn.c +@@ -45,7 +45,7 @@ static void cpu_id_check() + + use_simd = USE_SIMD_NONE; + +-#if defined(__arm__) || TARGET_OS_IPHONE ++#if defined(__arm__) || TARGET_OS_IPHONE || defined(__aarch64__) + /* on ARM NEON */ + + #if defined(HAS_SIMD_NEONV2) diff --git a/Formula/j/juman.rb b/Formula/j/juman.rb new file mode 100644 index 0000000000000..4d58791f2dae7 --- /dev/null +++ b/Formula/j/juman.rb @@ -0,0 +1,87 @@ +class Juman < Formula + desc "Japanese morphological analysis system" + homepage "https://nlp.ist.i.kyoto-u.ac.jp/index.php?JUMAN" + license "BSD-3-Clause" + + stable do + url "https://nlp.ist.i.kyoto-u.ac.jp/nl-resource/juman/juman-7.01.tar.bz2" + sha256 "64bee311de19e6d9577d007bb55281e44299972637bd8a2a8bc2efbad2f917c6" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + end + + bottle do + sha256 arm64_sequoia: "8db93b953c7cb1eac967bb6b7ef3cce0479f2ebecca298de87b92aa8e5324013" + sha256 arm64_sonoma: "0fe537854a305d8678893c6e15fea60516513470425844c61c33cd378892ca86" + sha256 arm64_ventura: "1b844be8a1ab2d3d1a10245fb3c887c9175a7836c86275ea67b3dfdd8e3abc7e" + sha256 arm64_monterey: "cf0f825ad7796245c453f7993f4b7f5d069c4e4eb190ee5fcc46f86ad74f61b5" + sha256 arm64_big_sur: "9b0c1166c946ef258a558961fa82660502d705bbbecf6b8735a805b093802432" + sha256 sonoma: "d2a2aa1611d8028a63e9d2cd8d3eea9c9cf9b66e2e5ee05e4ff5e91b4a34ffa0" + sha256 ventura: "fea60e1ecb3168344e4d5576680b79b76036e6bf19d24553c5cde0c914ec8b1d" + sha256 monterey: "b8076e4c5626f942eff9a9e95ef8f06a9a2e013c344b626b2dc7c30756eb64aa" + sha256 big_sur: "69ca5acb9395c257b591bd6eedde58c0707929af25b767d470dcb5fef786c054" + sha256 catalina: "0cb4d99f79b907922d8352e841096301a132ab0f385c75910ab53198b1f72ab7" + sha256 mojave: "36bae86cd2b24c5b3b4e75aed31ab0cf5da261b7a77e7ffe8a9b279ca3b801d6" + sha256 high_sierra: "7e2b144bf77ccdb11ae0166827dd45feae62a950de00310dcb863d7f926a9510" + sha256 sierra: "5c1dfea7f62d1afce55c9d1ed2478f9ff3b1744285fbbf08c29eb171cc672fa7" + sha256 el_capitan: "6bd46cdc6ff4e159463f8d4fecda2b803c3054ec28305f3baa1ea4969c4da723" + sha256 arm64_linux: "e04f2b077fb8fbaa2064b621c875966f1c6f8424f5f9c7d6d4ab2cd162b484bd" + sha256 x86_64_linux: "dc72214b5b06cb06dee3a256586b433541d36d3c1af89282952dbdc5e1f232b4" + end + + head do + url "https://github.com/ku-nlp/juman.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + uses_from_macos "llvm" => :build + + on_linux do + depends_on "libnsl" + end + + fails_with :gcc do + cause "makemat/.libs/makemat: U00005f62U00005bb9U00008a5e is undefined in JUMAN.grammar ." + end + + def install + # Fix compile with newer Clang + if DevelopmentTools.clang_build_version >= 1403 || ENV.compiler == :llvm_clang + ENV.append_to_cflags "-Wno-implicit-int -Wno-implicit-function-declaration" + end + + args = [] + if build.head? + inreplace "configure.ac", /^AC_PROG_CC$/, "\\0\nAC_PROG_CPP" + system "autoreconf", "--force", "--install", "--verbose" + # Work around macOS case-insensitive filesystem causing errors for HEAD build + if OS.mac? + mv "VERSION", "VERSION.txt" + inreplace ["Makefile.in", "juman/Makefile.in"], /\bVERSION\b/, "VERSION.txt" + end + 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" + system "make", "install" + end + + test do + assert_equal <<~EXPECT, pipe_output(bin/"juman", "\xe4\xba\xac\xe9\x83\xbd\xe5\xa4\xa7\xe5\xad\xa6") + 京都 きょうと 京都 名詞 6 地名 4 * 0 * 0 "代表表記:京都/きょうと 地名:日本:府" + @ 京都 きょうと 京都 名詞 6 地名 4 * 0 * 0 "代表表記:京都/きょうと 地名:日本:京都府:市" + 大学 だいがく 大学 名詞 6 普通名詞 1 * 0 * 0 "代表表記:大学/だいがく 組織名末尾 カテゴリ:場所-施設 ドメイン:教育・学習" + EOS + EXPECT + end +end diff --git a/Formula/j/jumanpp.rb b/Formula/j/jumanpp.rb new file mode 100644 index 0000000000000..53640147c8a92 --- /dev/null +++ b/Formula/j/jumanpp.rb @@ -0,0 +1,52 @@ +class Jumanpp < Formula + desc "Japanese Morphological Analyzer based on RNNLM" + homepage "https://nlp.ist.i.kyoto-u.ac.jp/EN/index.php?JUMAN%2B%2B" + url "https://lotus.kuee.kyoto-u.ac.jp/nl-resource/jumanpp/jumanpp-1.02.tar.xz" + sha256 "01fa519cb1b66c9cccc9778900a4048b69b718e190a17e054453ad14c842e690" + license "Apache-2.0" + + livecheck do + url :homepage + regex(/href=.*?jumanpp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "6ea43f4832aa25047b071cc99cb91995b249db44017818191fd106b0c50f901d" + sha256 arm64_sonoma: "9fa8968d1e8332287161611d534e060d383cd5e732dc56015fe681cbe38d88fd" + sha256 arm64_ventura: "a4f9b268938b28a53c03143114f43e12f5a158007a2d3fca46c79811daec00f8" + sha256 arm64_monterey: "c4db4776b58c04151f749e3e4254a437abc02fb0f284a8a1eccfa02e50b6651f" + sha256 arm64_big_sur: "e9b65ec6cbc79b48a403d5a9c30a59eedfe9cb412be6a4d6ccf65f653e96e8d4" + sha256 sonoma: "05fca93313e1b88047e24f57fcd565e2e03e0f1c21944bbeba431f118c6dbc78" + sha256 ventura: "6d2b11b21bafc965f703c292afee992e65b3a77089f2c05629eff5a397f83de5" + sha256 monterey: "1a49398ad2c6ace6827869ff87bb0b6018e4cbdf5259b79febdb761b6019be30" + sha256 big_sur: "9c97f442fdad1ae3ab776ef16de98876db768134d50235e9ea683579fa8a85b7" + sha256 catalina: "4b2c208b0954536aa3f2b838a525e2542a547a192a03951c0f8a7f69c082a60d" + sha256 mojave: "248e639859582dcf3613eb4eaf491e5ada0ed527e89595d6ba110219e8f8ab28" + sha256 high_sierra: "87555f0efa065cd86d3344c8304972567d4b8a84ef1c0e53acb09afabbd1fa9e" + sha256 sierra: "afddd3445d86fa1969611b413d0ae460fdaa7b106cdf5edf6ce0bf9d14689a49" + sha256 el_capitan: "4b4dd5ca55ba7d380a9a6bc7dda462c3825aa8650e9dc6b131e53fadbf64dc63" + sha256 arm64_linux: "01ef3b82e6f1036bda9466e2ab2cf2b314eca2fc59640006870d0499960cff38" + sha256 x86_64_linux: "a646201910dc5c938adcd64559fc0ce85dd8f13017ddadb1b65965f4cc2f4afe" + end + + depends_on "boost" => :build + depends_on "boost-build" => :build + depends_on "gperftools" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + ENV["LANG"] = "C.UTF-8" # prevent "invalid byte sequence in UTF-8" on sierra build + system bin/"jumanpp", "--version" + + output = <<~EOS + こんにち こんにち こんにち 名詞 6 時相名詞 10 * 0 * 0 "代表表記:今日/こんにち カテゴリ:時間" + は は は 助詞 9 副助詞 2 * 0 * 0 NIL + EOS + + assert_match output, pipe_output(bin/"jumanpp", "echo こんにちは") + end +end diff --git a/Formula/j/jump.rb b/Formula/j/jump.rb new file mode 100644 index 0000000000000..c30672f3f2ba3 --- /dev/null +++ b/Formula/j/jump.rb @@ -0,0 +1,37 @@ +class Jump < Formula + desc "Helps you navigate your file system faster by learning your habits" + homepage "https://github.com/gsamokovarov/jump" + url "https://github.com/gsamokovarov/jump/archive/refs/tags/v0.51.0.tar.gz" + sha256 "ce297cada71e1dca33cd7759e55b28518d2bf317cdced1f3b3f79f40fa1958b5" + license "MIT" + head "https://github.com/gsamokovarov/jump.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ecddcb16acf0ec0cfd882ba188e731b1a82afc22aa30131f15331ccea1135ece" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ecddcb16acf0ec0cfd882ba188e731b1a82afc22aa30131f15331ccea1135ece" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ecddcb16acf0ec0cfd882ba188e731b1a82afc22aa30131f15331ccea1135ece" + sha256 cellar: :any_skip_relocation, sonoma: "3a6bef70aca4c86f24e680096a7137ebba478b1420acca74e131987f3fdb2fc8" + sha256 cellar: :any_skip_relocation, ventura: "3a6bef70aca4c86f24e680096a7137ebba478b1420acca74e131987f3fdb2fc8" + sha256 cellar: :any_skip_relocation, arm64_linux: "705352accfdad579ce325bda4651dc9190a67437b026fd20f07d67e9fa0a23fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5db113fb8a6cb2652adb039f6cc0056341c95df09201ead5d5dd306e2c7f5921" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"jump", "shell") + man1.install "man/jump.1" + man1.install "man/j.1" + end + + test do + (testpath/"test_dir").mkpath + ENV["JUMP_HOME"] = testpath.to_s + system bin/"jump", "chdir", "#{testpath}/test_dir" + + assert_equal (testpath/"test_dir").to_s, shell_output("#{bin}/jump cd tdir").chomp + end +end diff --git a/Formula/j/jupp.rb b/Formula/j/jupp.rb new file mode 100644 index 0000000000000..8b439949dfeb6 --- /dev/null +++ b/Formula/j/jupp.rb @@ -0,0 +1,62 @@ +class Jupp < Formula + desc "Professional screen editor for programmers" + homepage "https://mbsd.evolvis.org/jupp.htm" + url "https://mbsd.evolvis.org/MirOS/dist/jupp/joe-3.1jupp41.tgz" + version "3.1jupp41" + sha256 "7bb8ea8af519befefff93ec3c9e32108d7f2b83216c9bc7b01aef5098861c82f" + license "GPL-1.0-or-later" + # Upstream HEAD in CVS: http://www.mirbsd.org/cvs.cgi/contrib/code/jupp/ + + livecheck do + url :homepage + regex(/href=.*?joe[._-]v?(\d+(?:\.\d+)+jupp\d+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "69af220c327528966dd893daab6d625a5b5241b9273f7b53decb37c5f1e33efe" + sha256 arm64_sonoma: "501d87f4b79bf8ae4a8a67b811fbca484e6bc68f6b1e04d9abfb0b1948430880" + sha256 arm64_ventura: "821daf3c2f840c5a9942de15a4b0c226928e35808079db3f0d48e686a474f08d" + sha256 arm64_monterey: "b5732141fc6bfe41e312ee4492c2680a3dcfba4a3951c8f6ab590b2e6c887a01" + sha256 arm64_big_sur: "f50e0562ad9f204659b90c6fe30d96708bcb59100e049770ca1da0c8668ebf0a" + sha256 sonoma: "67aeb4c92738d070ab3401d6282d122a95a257a0c6d5572a6da184764a2018ab" + sha256 ventura: "df22aefb2425b9730ca87ff48af85ef2a6660e8b2e6e6d8c68be5a20690553e7" + sha256 monterey: "d4a1370a276e3e6dbe6194ec7d99a488cf79e9a03e7bdef06a347c9210c4f365" + sha256 big_sur: "c2666e8966b8fc4322e70d4b5ccfe363b30ebb0166fc619cc354214bad9718f1" + sha256 arm64_linux: "51d77066bd02369aac33dda74c4ed5c2dc66873e11ae1f64f329fb4872a7c5b5" + sha256 x86_64_linux: "903a19653cafcf340fce69eff4be1d4a5574dde54d87c5934aa269cb25050311" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + uses_from_macos "ncurses" + + on_macos do + depends_on "gnu-sed" => :build + end + + conflicts_with "joe", because: "both install the same binaries" + + def install + ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin" if OS.mac? + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--enable-sysconfjoesubdir=/jupp", *std_configure_args + system "make", "install" + end + + test do + require "pty" + output = "" + PTY.spawn({ "TERM" => "xterm" }, bin/"jupp", "test") do |r, w, _pid| + w.write "brew x" + begin + r.each { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + assert_match "File test saved", output + assert_equal "brew", (testpath/"test").read + end +end diff --git a/Formula/j/jupyter-r.rb b/Formula/j/jupyter-r.rb new file mode 100644 index 0000000000000..e59c07caac7c0 --- /dev/null +++ b/Formula/j/jupyter-r.rb @@ -0,0 +1,215 @@ +class JupyterR < Formula + desc "R support for Jupyter" + homepage "https://irkernel.github.io/" + url "https://github.com/IRkernel/IRkernel/archive/refs/tags/1.3.2.tar.gz", using: :nounzip + sha256 "4ef2df1371e4b80dc1520da9186242998eb89eb0acfbc7d78de9aef4416bc358" + license "MIT" + revision 3 + + bottle do + sha256 cellar: :any, arm64_sequoia: "9e60d5223a4c0794c025996a7c56b33ffbed5618aa930246c32cf13726b98cb8" + sha256 cellar: :any, arm64_sonoma: "f5e53d2e1c07fada5048527bf93c183650f8f4b5ec3bb088d2f27136d06ce3c3" + sha256 cellar: :any, arm64_ventura: "6b747fb9bf5f4b4cc3d115143b213ed41cefeb8afb2254f0cb643a621f20f87e" + sha256 cellar: :any, arm64_monterey: "8aa1108c74e5910e683727b8b4a793fa5c0108361f8dbf8f199f5c105957c531" + sha256 cellar: :any, sonoma: "0316f97858c3952691008a53a36107235976bc213a24c894d89de8890c8822eb" + sha256 cellar: :any, ventura: "7d99a0c04195211aaad73759ee745a55823854e0d326e34627220103fbf4d545" + sha256 cellar: :any, monterey: "a10453cf63c2b498366e1a90dd42d47b828502a870e527684558d1bef37e07ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "20d47dc1d9832690199b9db766244d9a9a2fa8bf54b09441744b5dac333a8209" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c5b13b7b57330d27afc80e134f7d27c2b5207a9abc00a92f081d2fa21f834ede" + end + + depends_on "pkgconf" => :build + depends_on "jupyterlab" + depends_on "r" + depends_on "zeromq" + + on_macos do + depends_on "gettext" + end + + resource "rlang" do + url "https://cloud.r-project.org/src/contrib/rlang_1.1.4.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/rlang/rlang_1.1.4.tar.gz" + sha256 "f2d74527508bf3287102470beb27de0d234c3cbba399c28d3312f2c83c64a6e1" + end + + resource "fastmap" do + url "https://cloud.r-project.org/src/contrib/fastmap_1.2.0.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/fastmap/fastmap_1.2.0.tar.gz" + sha256 "b1da04a2915d1d057f3c2525e295ef15016a64e6667eac83a14641bbd83b9246" + end + + resource "ellipsis" do + url "https://cloud.r-project.org/src/contrib/ellipsis_0.3.2.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/ellipsis/ellipsis_0.3.2.tar.gz" + sha256 "a90266e5eb59c7f419774d5c6d6bd5e09701a26c9218c5933c9bce6765aa1558" + end + + resource "cli" do + url "https://cloud.r-project.org/src/contrib/cli_3.6.3.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/cli/cli_3.6.3.tar.gz" + sha256 "4295085f11221c54b1dd2b1d39a675a85dfd9f900294297567e1d36f65ac4841" + end + + resource "fansi" do + url "https://cloud.r-project.org/src/contrib/fansi_1.0.6.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/fansi/fansi_1.0.6.tar.gz" + sha256 "ea9dc690dfe50a7fad7c5eb863c157d70385512173574c56f4253b6dfe431863" + end + + resource "glue" do + url "https://cloud.r-project.org/src/contrib/glue_1.8.0.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/glue/glue_1.8.0.tar.gz" + sha256 "c86f364ba899b8662f5da3e1a75f43ae081ab04e0d51171d052356e7ee4b72a0" + end + + resource "lifecycle" do + url "https://cloud.r-project.org/src/contrib/lifecycle_1.0.4.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/lifecycle/lifecycle_1.0.4.tar.gz" + sha256 "ada4d3c7e84b0c93105e888647c5754219a8334f6e1f82d5afaf83d4855b91cc" + end + + resource "utf8" do + url "https://cloud.r-project.org/src/contrib/utf8_1.2.4.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/utf8/utf8_1.2.4.tar.gz" + sha256 "418f824bbd9cd868d2d8a0d4345545c62151d321224cdffca8b1ffd98a167b7d" + end + + resource "vctrs" do + url "https://cloud.r-project.org/src/contrib/vctrs_0.6.5.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/vctrs/vctrs_0.6.5.tar.gz" + sha256 "43167d2248fd699594044b5c8f1dbb7ed163f2d64761e08ba805b04e7ec8e402" + end + + resource "base64enc" do + url "https://cloud.r-project.org/src/contrib/base64enc_0.1-3.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/base64enc/base64enc_0.1-3.tar.gz" + sha256 "6d856d8a364bcdc499a0bf38bfd283b7c743d08f0b288174fba7dbf0a04b688d" + end + + resource "digest" do + url "https://cloud.r-project.org/src/contrib/digest_0.6.37.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/digest/digest_0.6.37.tar.gz" + sha256 "82c4d149994b8a4a9af930f5a8e47420829935abed41f3f9030e94b6a48f0321" + end + + resource "htmltools" do + url "https://cloud.r-project.org/src/contrib/htmltools_0.5.8.1.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/htmltools/htmltools_0.5.8.1.tar.gz" + sha256 "f9f62293ec06c353c4584db6ccedb06a2da12e485208bd26b856f17dd013f176" + end + + resource "pillar" do + url "https://cloud.r-project.org/src/contrib/pillar_1.10.0.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/pillar/pillar_1.10.0.tar.gz" + sha256 "97f6bb5d54388e9fbc2d6e5d3c883374105fadbc9c9aad38e7b4e1389970eadb" + end + + resource "jsonlite" do + url "https://cloud.r-project.org/src/contrib/jsonlite_1.8.9.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/jsonlite/jsonlite_1.8.9.tar.gz" + sha256 "89f130e0e1163328c01decd54e7712b5ebf3d0a667da0052833722cb9a6e90b0" + end + + resource "repr" do + url "https://cloud.r-project.org/src/contrib/repr_1.1.7.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/repr/repr_1.1.7.tar.gz" + sha256 "73bd696b4d4211096e0d1e382d5ce6591527d2ff400cc7ae8230f0235eed021b" + end + + resource "evaluate" do + url "https://cloud.r-project.org/src/contrib/evaluate_1.0.1.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/evaluate/evaluate_1.0.1.tar.gz" + sha256 "436cc3e55b53e3c618b2f31324840875b5d66076c737af6fb31c650c783171e2" + end + + resource "IRdisplay" do + url "https://cloud.r-project.org/src/contrib/IRdisplay_1.1.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/IRdisplay/IRdisplay_1.1.tar.gz" + sha256 "83eb030ff91f546cb647899f8aa3f5dc9fe163a89a981696447ea49cc98e8d2b" + end + + resource "pbdZMQ" do + url "https://cloud.r-project.org/src/contrib/pbdZMQ_0.3-13.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/pbdZMQ/pbdZMQ_0.3-13.tar.gz" + sha256 "4139a88323642b734a83a8d73ea34550f8ef279389e794a5a3a5f3e8f579839a" + end + + resource "crayon" do + url "https://cloud.r-project.org/src/contrib/crayon_1.5.3.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/crayon/crayon_1.5.3.tar.gz" + sha256 "3e74a0685541efb5ea763b92cfd5c859df71c46b0605967a0b5dbb7326e9da69" + end + + resource "uuid" do + url "https://cloud.r-project.org/src/contrib/uuid_1.2-1.tar.gz" + mirror "https://cloud.r-project.org/src/contrib/Archive/uuid/uuid_1.2-1.tar.gz" + sha256 "f90e49733d7d6ea7cf91abdc07b7d0e9a34a4b993e6914d754f0621281fc4b96" + end + + def install + rscript = Formula["r"].opt_bin/"Rscript" + site_library = lib/"R/site-library" + site_library.mkpath + + resources.each do |r| + if r.patches.empty? + # no need to decompress the resource at all + system rscript, "-e", + "install.packages(pkgs='#{r.cached_download}', lib='#{site_library}', type='source', repos=NULL)" + else + # staging automatically applies the patch + r.stage do + system rscript, "-e", + "install.packages(pkgs='.', lib='#{site_library}', type='source', repos=NULL)" + end + end + end + + system rscript, "-e", + "install.packages(pkgs='#{buildpath}/IRkernel-#{version}.tar.gz', lib='#{site_library}', type='source', repos=NULL)" + + inreplace "#{site_library}/pbdZMQ/etc/Makeconf" do |s| + s.gsub!(/PKG_CONFIG = .+/, "PKG_CONFIG = #{HOMEBREW_PREFIX}/bin/pkg-config") + s.gsub! Formula["zeromq"].prefix.realpath, Formula["zeromq"].opt_prefix + end + + ENV["R_LIBS"] = site_library + system rscript, "-e", "library(IRkernel); IRkernel::installspec(user=FALSE, prefix='#{prefix}')" + inreplace share/"jupyter/kernels/ir/kernel.json", Formula["r"].prefix.realpath, Formula["r"].opt_prefix + end + + test do + r_version = Formula["r"].version + jupyter = Formula["jupyterlab"].opt_bin/"jupyter" + + ENV["JUPYTER_PATH"] = share/"jupyter" + ENV["R_LIBS_SITE"] = lib/"R/site-library" + assert_match " ir ", shell_output("#{jupyter} kernelspec list") + + require "expect" + require "pty" + PTY.spawn(jupyter, "console", "--kernel=ir") do |r, w, pid| + timeout = 30 + r.expect("In [1]:", timeout) do |result| + refute_nil result, "Expected In [1] prompt" + assert_match "R version #{r_version}", result.first + end + w.write "print('Hello Homebrew')\r" + r.expect("In [2]:", timeout) do |result| + refute_nil result, "Expected In [2] prompt" + assert_match '[1] "Hello Homebrew"', result.first + end + w.write "mean(c(1, 2, 3, 4))\r" + r.expect("In [3]:", timeout) do |result| + refute_nil result, "Expected In [3] prompt" + assert_match "[1] 2.5", result.first + end + w.write "quit()\r" + ensure + r.close + w.close + Process.wait(pid) + end + end +end diff --git a/Formula/j/jupyterlab.rb b/Formula/j/jupyterlab.rb new file mode 100644 index 0000000000000..2bf3e24f21798 --- /dev/null +++ b/Formula/j/jupyterlab.rb @@ -0,0 +1,606 @@ +class Jupyterlab < Formula + include Language::Python::Virtualenv + + desc "Interactive environments for writing and running code" + homepage "https://jupyter.org/" + url "https://files.pythonhosted.org/packages/f4/3c/12a8b27ff2c3b4005bbb5e11c7747246965776d2b821193e53ffd61f1332/jupyterlab-4.4.2.tar.gz" + sha256 "afa9caf28c0cb966488be18e5e8daba9f018a1c4273a406b7d5006344cbc6d16" + license all_of: [ + "BSD-3-Clause", + "MIT", # semver.py + ] + + bottle do + sha256 cellar: :any, arm64_sequoia: "ac07cfbd54eeb2639c0879eb6bc1d5d4ab2d920795cb445695f3f0e743396485" + sha256 cellar: :any, arm64_sonoma: "5642e10aa0bd2ca49057c7c4fde5f7b64471352deb805004ddc2470a70697184" + sha256 cellar: :any, arm64_ventura: "8e27bc172a0781d0da8c04397fb9d93cf15b05d9f1b6bcce54102817b0fc6243" + sha256 cellar: :any, sonoma: "b1caaa2c44246e66228dde57c32f5b6081af922dc9bc23deff5c63f633546b0e" + sha256 cellar: :any, ventura: "6be28bd343d4c18caab8af90ef6ee73254d5576be4debe00d6b2b7ad8dbe173e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2b0cf21eff4deafd6444007ab9887ef068ac1b1087b254f32e7e97aedabc5f7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7812ef354c0408112c7e8152a67561fe5d2b45e9b0c5ac02a7dba1a212ede01e" + end + + depends_on "cmake" => :build # for ipykernel + depends_on "ninja" => :build # for ipykernel + depends_on "rust" => :build # for rpds-py + depends_on "certifi" + depends_on "libyaml" + depends_on "node" + depends_on "pandoc" + depends_on "python@3.13" + depends_on "zeromq" + + uses_from_macos "libffi" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "appnope" do + url "https://files.pythonhosted.org/packages/35/5d/752690df9ef5b76e169e68d6a129fa6d08a7100ca7f754c89495db3c6019/appnope-0.1.4.tar.gz" + sha256 "1de3860566df9caf38f01f86f65e0e13e379af54f9e4bee1e66b48f2efffd1ee" + end + + resource "argon2-cffi" do + url "https://files.pythonhosted.org/packages/31/fa/57ec2c6d16ecd2ba0cf15f3c7d1c3c2e7b5fcb83555ff56d7ab10888ec8f/argon2_cffi-23.1.0.tar.gz" + sha256 "879c3e79a2729ce768ebb7d36d4609e3a78a4ca2ec3a9f12286ca057e3d0db08" + 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 "arrow" do + url "https://files.pythonhosted.org/packages/2e/00/0f6e8fcdb23ea632c866620cc872729ff43ed91d284c866b515c6342b173/arrow-1.3.0.tar.gz" + sha256 "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" + end + + resource "asttokens" do + url "https://files.pythonhosted.org/packages/4a/e7/82da0a03e7ba5141f05cce0d302e6eed121ae055e0456ca228bf693984bc/asttokens-3.0.0.tar.gz" + sha256 "0dcd8baa8d62b0c1d118b399b2ddba3c4aff271d0d7a9e0d4c1681c79035bbc7" + end + + resource "async-lru" do + url "https://files.pythonhosted.org/packages/b2/4d/71ec4d3939dc755264f680f6c2b4906423a304c3d18e96853f0a595dfe97/async_lru-2.0.5.tar.gz" + sha256 "481d52ccdd27275f42c43a928b4a50c3bfb2d67af4e78b170e3e0bb39c66e5bb" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "babel" do + url "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz" + sha256 "0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/d8/e4/0c4c39e18fd76d6a628d4dd8da40543d136ce2d1752bd6eeeab0791f4d6b/beautifulsoup4-4.13.4.tar.gz" + sha256 "dbb3c4e1ceae6aefebdaf2423247260cd062430a410e38c66f2baa50a8437195" + end + + resource "bleach" do + url "https://files.pythonhosted.org/packages/76/9a/0e33f5054c54d349ea62c277191c020c2d6ef1d65ab2cb1993f91ec846d1/bleach-6.2.0.tar.gz" + sha256 "123e894118b8a599fd80d3ec1a6d4cc7ce4e5882b1317a7e1ba69b56e95f991f" + 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 "comm" do + url "https://files.pythonhosted.org/packages/e9/a8/fb783cb0abe2b5fded9f55e5703015cdf1c9c85b3669087c538dd15a6a86/comm-0.2.2.tar.gz" + sha256 "3fd7a84065306e07bea1773df6eb8282de51ba82f77c72f9c85716ab11fe980e" + end + + resource "debugpy" do + url "https://files.pythonhosted.org/packages/bd/75/087fe07d40f490a78782ff3b0a30e3968936854105487decdb33446d4b0e/debugpy-1.8.14.tar.gz" + sha256 "7cd287184318416850aa8b60ac90105837bb1e59531898c07569d197d2ed5322" + 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 "executing" do + url "https://files.pythonhosted.org/packages/91/50/a9d80c47ff289c611ff12e63f7c5d13942c65d68125160cefd768c73e6e4/executing-2.2.0.tar.gz" + sha256 "5d108c028108fe2551d1a7b2e8b713341e2cb4fc0aa7dcf966fa4327a5226755" + end + + resource "fastjsonschema" do + url "https://files.pythonhosted.org/packages/8b/50/4b769ce1ac4071a1ef6d86b1a3fb56cdc3a37615e8c5519e1af96cdac366/fastjsonschema-2.21.1.tar.gz" + sha256 "794d4f0a58f848961ba16af7b9c85a3e88cd360df008c59aac6fc5ae9323b5d4" + end + + resource "fqdn" do + url "https://files.pythonhosted.org/packages/30/3e/a80a8c077fd798951169626cde3e239adeba7dab75deb3555716415bd9b0/fqdn-1.5.1.tar.gz" + sha256 "105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz" + sha256 "4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" + end + + resource "hatch-jupyter-builder" do + url "https://files.pythonhosted.org/packages/5b/f6/8c8b353e7c6476ca28caea0408b0a3778d8849cda16f3e8e8f3145162dae/hatch_jupyter_builder-0.9.1.tar.gz" + sha256 "79278198d124c646b799c5e8dca8504aed9dcaaa88d071a09eb0b5c2009a58ad" + end + + resource "hatch-nodejs-version" do + url "https://files.pythonhosted.org/packages/af/b6/c9406cfa9edf740c6b3de6173408a159228eac0cee80eead4a5b9cc88848/hatch_nodejs_version-0.3.2.tar.gz" + sha256 "8a7828d817b71e50bbbbb01c9bfc0b329657b7900c56846489b9c958de15b54c" + end + + resource "hatchling" do + url "https://files.pythonhosted.org/packages/8f/8a/cc1debe3514da292094f1c3a700e4ca25442489731ef7c0814358816bb03/hatchling-1.27.0.tar.gz" + sha256 "971c296d9819abb3811112fc52c7a9751c8d381898f36533bb16f9791e941fd6" + 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 "ipykernel" do + url "https://files.pythonhosted.org/packages/e9/5c/67594cb0c7055dc50814b21731c22a601101ea3b1b50a9a1b090e11f5d0f/ipykernel-6.29.5.tar.gz" + sha256 "f093a22c4a40f8828f8e330a9c297cb93dcab13bd9678ded6de8e5cf81c56215" + end + + resource "ipython" do + url "https://files.pythonhosted.org/packages/9d/02/63a84444a7409b3c0acd1de9ffe524660e0e5d82ee473e78b45e5bfb64a4/ipython-9.2.0.tar.gz" + sha256 "62a9373dbc12f28f9feaf4700d052195bf89806279fc8ca11f3f54017d04751b" + end + + resource "ipython-pygments-lexers" do + url "https://files.pythonhosted.org/packages/ef/4c/5dd1d8af08107f88c7f741ead7a40854b8ac24ddf9ae850afbcf698aa552/ipython_pygments_lexers-1.1.1.tar.gz" + sha256 "09c0138009e56b6854f9535736f4171d855c8c08a563a0dcd8022f78355c7e81" + end + + resource "isoduration" do + url "https://files.pythonhosted.org/packages/7c/1a/3c8edc664e06e6bd06cce40c6b22da5f1429aa4224d0c590f3be21c91ead/isoduration-20.11.0.tar.gz" + sha256 "ac2f9015137935279eac671f94f89eb00584f940f5dc49462a0c4ee692ba1bd9" + end + + resource "jedi" do + url "https://files.pythonhosted.org/packages/72/3a/79a912fbd4d8dd6fbb02bf69afd3bb72cf0c729bb3063c6f4498603db17a/jedi-0.19.2.tar.gz" + sha256 "4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" + sha256 "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + end + + resource "json5" do + url "https://files.pythonhosted.org/packages/12/be/c6c745ec4c4539b25a278b70e29793f10382947df0d9efba2fa09120895d/json5-0.12.0.tar.gz" + sha256 "0b4b6ff56801a1c7dc817b0241bca4ce474a0e6a163bfef3fc594d3fd263ff3a" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + 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 "jupyter-client" do + url "https://files.pythonhosted.org/packages/71/22/bf9f12fdaeae18019a468b68952a60fe6dbab5d67cd2a103cac7659b41ca/jupyter_client-8.6.3.tar.gz" + sha256 "35b3a0947c4a6e9d589eb97d7d4cd5e90f910ee73101611f01283732bd6d9419" + end + + resource "jupyter-console" do + url "https://files.pythonhosted.org/packages/bd/2d/e2fd31e2fc41c14e2bcb6c976ab732597e907523f6b2420305f9fc7fdbdb/jupyter_console-6.6.3.tar.gz" + sha256 "566a4bf31c87adbfadf22cdf846e3069b59a71ed5da71d6ba4d8aaad14a53539" + end + + resource "jupyter-core" do + url "https://files.pythonhosted.org/packages/00/11/b56381fa6c3f4cc5d2cf54a7dbf98ad9aa0b339ef7a601d6053538b079a7/jupyter_core-5.7.2.tar.gz" + sha256 "aa5f8d32bbf6b431ac830496da7392035d6f61b4f54872f15c4bd2a9c3f536d9" + end + + resource "jupyter-events" do + url "https://files.pythonhosted.org/packages/9d/c3/306d090461e4cf3cd91eceaff84bede12a8e52cd821c2d20c9a4fd728385/jupyter_events-0.12.0.tar.gz" + sha256 "fc3fce98865f6784c9cd0a56a20644fc6098f21c8c33834a8d9fe383c17e554b" + end + + resource "jupyter-lsp" do + url "https://files.pythonhosted.org/packages/85/b4/3200b0b09c12bc3b72d943d923323c398eff382d1dcc7c0dbc8b74630e40/jupyter-lsp-2.2.5.tar.gz" + sha256 "793147a05ad446f809fd53ef1cd19a9f5256fd0a2d6b7ce943a982cb4f545001" + end + + resource "jupyter-server" do + url "https://files.pythonhosted.org/packages/61/8c/df09d4ab646141f130f9977b32b206ba8615d1969b2eba6a2e84b7f89137/jupyter_server-2.15.0.tar.gz" + sha256 "9d446b8697b4f7337a1b7cdcac40778babdd93ba614b6d68ab1c0c918f1c4084" + end + + resource "jupyter-server-terminals" do + url "https://files.pythonhosted.org/packages/fc/d5/562469734f476159e99a55426d697cbf8e7eb5efe89fb0e0b4f83a3d3459/jupyter_server_terminals-0.5.3.tar.gz" + sha256 "5ae0295167220e9ace0edcfdb212afd2b01ee8d179fe6f23c899590e9b8a5269" + end + + resource "jupyterlab-pygments" do + url "https://files.pythonhosted.org/packages/90/51/9187be60d989df97f5f0aba133fa54e7300f17616e065d1ada7d7646b6d6/jupyterlab_pygments-0.3.0.tar.gz" + sha256 "721aca4d9029252b11cfa9d185e5b5af4d54772bb8072f9b7036f4170054d35d" + end + + resource "jupyterlab-server" do + url "https://files.pythonhosted.org/packages/0a/c9/a883ce65eb27905ce77ace410d83587c82ea64dc85a48d1f7ed52bcfa68d/jupyterlab_server-2.27.3.tar.gz" + sha256 "eb36caca59e74471988f0ae25c77945610b887f777255aa21f8065def9e51ed4" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "matplotlib-inline" do + url "https://files.pythonhosted.org/packages/99/5b/a36a337438a14116b16480db471ad061c36c3694df7c2084a0da7ba538b7/matplotlib_inline-0.1.7.tar.gz" + sha256 "8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90" + end + + resource "mistune" do + url "https://files.pythonhosted.org/packages/c4/79/bda47f7dd7c3c55770478d6d02c9960c430b0cf1773b72366ff89126ea31/mistune-3.1.3.tar.gz" + sha256 "a7035c21782b2becb6be62f8f25d3df81ccb4d6fa477a6525b15af06539f02a0" + end + + resource "nbclient" do + url "https://files.pythonhosted.org/packages/87/66/7ffd18d58eae90d5721f9f39212327695b749e23ad44b3881744eaf4d9e8/nbclient-0.10.2.tar.gz" + sha256 "90b7fc6b810630db87a6d0c2250b1f0ab4cf4d3c27a299b0cde78a4ed3fd9193" + end + + resource "nbconvert" do + url "https://files.pythonhosted.org/packages/a3/59/f28e15fc47ffb73af68a8d9b47367a8630d76e97ae85ad18271b9db96fdf/nbconvert-7.16.6.tar.gz" + sha256 "576a7e37c6480da7b8465eefa66c17844243816ce1ccc372633c6b71c3c0f582" + end + + resource "nbformat" do + url "https://files.pythonhosted.org/packages/6d/fd/91545e604bc3dad7dca9ed03284086039b294c6b3d75c0d2fa45f9e9caf3/nbformat-5.10.4.tar.gz" + sha256 "322168b14f937a5d11362988ecac2a4952d3d8e3a2cbeb2319584631226d5b3a" + 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 "notebook" do + url "https://files.pythonhosted.org/packages/91/89/1b4636280f01ec948c007e700e24921135b9b76221148a405fd5287c3c17/notebook-7.4.1.tar.gz" + sha256 "96894962b230013ea0c0a466e4e642c5aace25ba8c86686175b69990ef628ff9" + end + + resource "notebook-shim" do + url "https://files.pythonhosted.org/packages/54/d2/92fa3243712b9a3e8bafaf60aac366da1cada3639ca767ff4b5b3654ec28/notebook_shim-0.2.4.tar.gz" + sha256 "b4b2cfa1b65d98307ca24361f5b30fe785b53c3fd07b7a47e89acb5e6ac638cb" + 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 "pandocfilters" do + url "https://files.pythonhosted.org/packages/70/6f/3dd4940bbe001c06a65f88e36bad298bc7a0de5036115639926b0c5c0458/pandocfilters-1.5.1.tar.gz" + sha256 "002b4a555ee4ebc03f8b66307e287fa492e4a77b4ea14d3f934328297bb4939e" + end + + resource "parso" do + url "https://files.pythonhosted.org/packages/66/94/68e2e17afaa9169cf6412ab0f28623903be73d1b32e208d9e8e541bb086d/parso-0.8.4.tar.gz" + sha256 "eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d" + 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 "platformdirs" do + url "https://files.pythonhosted.org/packages/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "prometheus-client" do + url "https://files.pythonhosted.org/packages/62/14/7d0f567991f3a9af8d1cd4f619040c93b68f09a02b6d0b6ab1b2d1ded5fe/prometheus_client-0.21.1.tar.gz" + sha256 "252505a722ac04b0456be05c05f75f45d760c2911ffc45f2a06bcaed9f3ae3fb" + 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 "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 "pure-eval" do + url "https://files.pythonhosted.org/packages/cd/05/0a34433a064256a578f1783a10da6df098ceaa4a57bbeaa96a6c0352786b/pure_eval-0.2.3.tar.gz" + sha256 "5f4e983f40564c576c7c8635ae88db5956bb2229d7e9237d03b3c0b0190eaf42" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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-json-logger" do + url "https://files.pythonhosted.org/packages/9e/de/d3144a0bceede957f961e975f3752760fbe390d57fbe194baf709d8f1f7b/python_json_logger-3.3.0.tar.gz" + sha256 "12b7e74b17775e7d565129296105bbe3910842d9d0eb083fc83a6a617aa8df84" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "pyzmq" do + url "https://files.pythonhosted.org/packages/b1/11/b9213d25230ac18a71b39b3723494e57adebe36e066397b961657b3b41c1/pyzmq-26.4.0.tar.gz" + sha256 "4bd13f85f80962f91a651a7356fe0472791a5f7a92f227822b5acf44795c626d" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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 "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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/70/dc/3976b322de9d2e87ed0007cf04cc7553969b6c7b3f48a565d0333748fbcd/setuptools-80.3.1.tar.gz" + sha256 "31e2c58dbb67c99c289f51c16d899afedae292b978f8051efaf6262d8212f927" + 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 "soupsieve" do + url "https://files.pythonhosted.org/packages/3f/f4/4a80cd6ef364b2e8b65b15816a843c0980f7a5a2b4dc701fc574952aa19f/soupsieve-2.7.tar.gz" + sha256 "ad282f9b6926286d2ead4750552c8a6142bc4c783fd66b0293547c8fe6ae126a" + end + + resource "stack-data" do + url "https://files.pythonhosted.org/packages/28/e3/55dcc2cfbc3ca9c29519eb6884dd1415ecb53b0e934862d3559ddcb7e20b/stack_data-0.6.3.tar.gz" + sha256 "836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9" + end + + resource "terminado" do + url "https://files.pythonhosted.org/packages/8a/11/965c6fd8e5cc254f1fe142d547387da17a8ebfd75a3455f637c663fb38a0/terminado-0.18.1.tar.gz" + sha256 "de09f2c4b85de4765f7714688fff57d3e75bad1f909b589fde880460c753fd2e" + end + + resource "tinycss2" do + url "https://files.pythonhosted.org/packages/7a/fd/7a5ee21fd08ff70d3d33a5781c255cbe779659bd03278feb98b19ee550f4/tinycss2-1.4.0.tar.gz" + sha256 "10c0972f6fc0fbee87c3edb76549357415e94548c1ae10ebccdea16fb404a9b7" + end + + resource "tornado" do + url "https://files.pythonhosted.org/packages/59/45/a0daf161f7d6f36c3ea5fc0c2de619746cc3dd4c76402e9db545bd920f63/tornado-6.4.2.tar.gz" + sha256 "92bad5b4746e9879fd7bf1eb21dce4e3fc5128d71601f80005afa39237ad620b" + end + + resource "traitlets" do + url "https://files.pythonhosted.org/packages/eb/79/72064e6a701c2183016abbbfedaba506d81e30e232a68c9f0d6f6fcd1574/traitlets-5.14.3.tar.gz" + sha256 "9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7" + end + + resource "trove-classifiers" do + url "https://files.pythonhosted.org/packages/dc/81/a43db75173e49b1204d2a826b2a3a0e2dee45fb0d9abfac2ce1ff928eebf/trove_classifiers-2025.5.1.12.tar.gz" + sha256 "28d24c3d043dc6b0459813d6bf4a231e788509b55ee3d54ba08ce72638031182" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/a9/60/47d92293d9bc521cd2301e423a358abfac0ad409b3a1606d8fbae1321961/types_python_dateutil-2.9.0.20241206.tar.gz" + sha256 "18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "webcolors" do + url "https://files.pythonhosted.org/packages/7b/29/061ec845fb58521848f3739e466efd8250b4b7b98c1b6c5bf4d40b419b7e/webcolors-24.11.1.tar.gz" + sha256 "ecb3d768f32202af770477b8b65f318fa4f566c22948673a977b00d589dd80f6" + 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/e6/30/fba0d96b4b5fbf5948ed3f4681f7da2f9f64512e1d303f94b4cc174c24a5/websocket_client-1.8.0.tar.gz" + sha256 "3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da" + end + + def python3 + "python3.13" + end + + def install + ENV["JUPYTER_PATH"] = etc/"jupyter" + + # install packages into virtualenv and link all jupyter extensions + skipped = %w[hatch-jupyter-builder hatch-nodejs-version jupyterlab-pygments notebook] + venv = virtualenv_install_with_resources without: skipped + bin.install_symlink (libexec/"bin").glob("jupyter*") + + # These resources require `jupyterlab` to build, causing a build loop + # with pip's --no-binary. They need `jlpm` in PATH, so we need to add it. + # https://github.com/jupyterlab/jupyterlab_pygments/issues/23 + ENV.prepend_path "PATH", bin + skipped.each do |r| + venv.pip_install(resource(r), build_isolation: false) + end + + # remove bundled kernel + rm_r(libexec/"share/jupyter/kernels") + + # install completion + resource("jupyter-core").stage do + bash_completion.install "examples/jupyter-completion.bash" => "jupyter" + zsh_completion.install "examples/completions-zsh" => "_jupyter" + end + end + + def caveats + <<~EOS + Additional kernels can be installed into the shared jupyter directory + #{etc}/jupyter + EOS + end + + service do + run [opt_bin/"jupyter-lab"] + keep_alive true + log_path var/"log/jupyterlab.log" + error_log_path var/"log/jupyterlab.log" + end + + test do + assert_match "The Jupyter terminal-based Console", shell_output("#{bin}/jupyter-console --help") + assert_match python3, shell_output("#{bin}/jupyter kernelspec list") + assert_match(/In \[1\]:.*exit.*Shutting down/m, pipe_output("#{bin}/jupyter-console 2>&1", "exit")) + + require "expect" + require "open3" + Open3.popen3(bin/"jupyter", "notebook", "--no-browser") do |_stdin, _stdout, stderr, wait_thread| + timeout = (OS.mac? && Hardware::CPU.intel?) ? 30 : 15 + refute_nil stderr.expect("Serving notebooks from local directory:", timeout), "Expected running message" + ensure + Process.kill "TERM", wait_thread.pid + end + + (testpath/"nbconvert.ipynb").write <<~JSON + { + "cells": [] + } + JSON + system bin/"jupyter-nbconvert", "nbconvert.ipynb", "--to", "html" + assert_path_exists testpath/"nbconvert.html", "Failed to export HTML" + + assert_match "-F _jupyter", shell_output("bash -c 'source #{bash_completion}/jupyter && complete -p jupyter'") + + # Ensure that jupyter can load the jupyter lab package. + assert_match(/^jupyterlab *: #{version}$/, shell_output(bin/"jupyter --version")) + + # Ensure that jupyter-lab binary was installed by pip. + assert_equal version.to_s, shell_output(bin/"jupyter-lab --version").strip + + port = free_port + spawn "#{bin}/jupyter-lab", "-y", "--port=#{port}", "--no-browser", "--ip=127.0.0.1", "--LabApp.token=''" + sleep 15 + assert_match "JupyterLab", shell_output("curl --silent --fail http://localhost:#{port}/lab") + end +end diff --git a/Formula/j/jupytext.rb b/Formula/j/jupytext.rb new file mode 100644 index 0000000000000..6a7e7b1813859 --- /dev/null +++ b/Formula/j/jupytext.rb @@ -0,0 +1,129 @@ +class Jupytext < Formula + include Language::Python::Virtualenv + + desc "Jupyter notebooks as Markdown documents, Julia, Python or R scripts" + homepage "https://jupytext.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/6e/d9/b7acd3bed66c194cec1915c5bbec30994dbb50693ec209e5b115c28ddf63/jupytext-1.17.1.tar.gz" + sha256 "c02fda8af76ffd6e064a04cf2d3cc8aae242b2f0e38c42b4cd80baf89c3325d3" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5ce194de72ca6c8357b22c5b5b360e77c3a63634ec268e8d9bf555472bef40f5" + sha256 cellar: :any, arm64_sonoma: "e7c77b385f26f38af19888adf99292501cbae4e7af476e7dede2b0d56224c3c3" + sha256 cellar: :any, arm64_ventura: "fe60a7d034fbce8ec3a004d4e74d25b6fc345ee9ce4c4a5db2caafc8b491e67e" + sha256 cellar: :any, sonoma: "4726493052daecc270357f717b1abdc5da3b9b853b59716f37ffeb9d29d4bd51" + sha256 cellar: :any, ventura: "c895f236d503d64dff854a75a64c1f07a17447378285f9777cdd4c1a61346f49" + sha256 cellar: :any_skip_relocation, arm64_linux: "037ec64acac01cd7abac9f45ea81e47544c8e3843062064f98b60fb77228ddc7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4602499865c5689bc5d8774f1187648c38c88209573f841ef78167df235145bc" + end + + depends_on "rust" => :build # for rpds-py + depends_on "libyaml" + depends_on "python@3.13" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "fastjsonschema" do + url "https://files.pythonhosted.org/packages/8b/50/4b769ce1ac4071a1ef6d86b1a3fb56cdc3a37615e8c5519e1af96cdac366/fastjsonschema-2.21.1.tar.gz" + sha256 "794d4f0a58f848961ba16af7b9c85a3e88cd360df008c59aac6fc5ae9323b5d4" + 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/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" + sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" + end + + resource "jupyter-core" do + url "https://files.pythonhosted.org/packages/00/11/b56381fa6c3f4cc5d2cf54a7dbf98ad9aa0b339ef7a601d6053538b079a7/jupyter_core-5.7.2.tar.gz" + sha256 "aa5f8d32bbf6b431ac830496da7392035d6f61b4f54872f15c4bd2a9c3f536d9" + 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 "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/19/03/a2ecab526543b152300717cf232bb4bb8605b6edb946c845016fa9c9c9fd/mdit_py_plugins-0.4.2.tar.gz" + sha256 "5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5" + end + + resource "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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 "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + end + + resource "traitlets" do + url "https://files.pythonhosted.org/packages/eb/79/72064e6a701c2183016abbbfedaba506d81e30e232a68c9f0d6f6fcd1574/traitlets-5.14.3.tar.gz" + sha256 "9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/jupytext --version") + + (testpath/"notebook.ipynb").write <<~JSON + { + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print('Hello, World!')" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 + } + JSON + + system bin/"jupytext", "--to", "py", "notebook.ipynb" + assert_path_exists testpath/"notebook.py" + assert_match "print('Hello, World!')", (testpath/"notebook.py").read + end +end diff --git a/Formula/j/just.rb b/Formula/j/just.rb new file mode 100644 index 0000000000000..e2b5e6a30cf73 --- /dev/null +++ b/Formula/j/just.rb @@ -0,0 +1,43 @@ +class Just < Formula + desc "Handy way to save and run project-specific commands" + homepage "https://github.com/casey/just" + url "https://github.com/casey/just/archive/refs/tags/1.40.0.tar.gz" + sha256 "e0d48dcc7a086c5746b7f281a40e615c290cddf9c06134198c703dff2f62c1c4" + license "CC0-1.0" + head "https://github.com/casey/just.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7a6b6b8404100d3132208479921a4ed09c8def48bde2b738c93ca8eaadd54830" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e51dd382131ac203f0031498dd5ebabe6fc54efeba7df046695beac6a716c145" + sha256 cellar: :any_skip_relocation, arm64_ventura: "df2df15534cc802e940b5afe8cf8aadfd6e3c92bae5d6efd1126a6c5a2143c88" + sha256 cellar: :any_skip_relocation, sonoma: "b7d5f3f11e49b4db8a2e5e716dfa932f891bbbb186c38dfd3e295f1f9b7deb15" + sha256 cellar: :any_skip_relocation, ventura: "07a909e8ef87bd072a539a478dc9e29ae920e5883fe7a468ed415c573837f066" + sha256 cellar: :any_skip_relocation, arm64_linux: "7bf41ddbe82dba608da75e9f3c87c13dfac9f6e0fbfc524ee7e256e73eb9454f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "72485691bcbe738efc4a6c7928230bced747df97fdd6327dbeac65524dfccfcc" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"just", "--completions") + (man1/"just.1").write Utils.safe_popen_read(bin/"just", "--man") + end + + test do + (testpath/"justfile").write <<~EOS + default: + touch it-worked + EOS + system bin/"just" + assert_path_exists testpath/"it-worked" + + assert_match version.to_s, shell_output("#{bin}/just --version") + end +end diff --git a/Formula/j/jvgrep.rb b/Formula/j/jvgrep.rb new file mode 100644 index 0000000000000..e60a58525b6e3 --- /dev/null +++ b/Formula/j/jvgrep.rb @@ -0,0 +1,30 @@ +class Jvgrep < Formula + desc "Grep for Japanese users of Vim" + homepage "https://github.com/mattn/jvgrep" + url "https://github.com/mattn/jvgrep/archive/refs/tags/v5.8.12.tar.gz" + sha256 "7e24a6954db1874f226054d1ca2e720945a1c92f9b6aac219e20ed4c3ab6e79c" + license "MIT" + head "https://github.com/mattn/jvgrep.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b09906823a2d2bd6a90b0fcf9881cadfadf72693749f7431c787c910d74fb106" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b09906823a2d2bd6a90b0fcf9881cadfadf72693749f7431c787c910d74fb106" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b09906823a2d2bd6a90b0fcf9881cadfadf72693749f7431c787c910d74fb106" + sha256 cellar: :any_skip_relocation, sonoma: "3bf79835ac8078c953f7f86e12bed6dc332e268a22455349531945b2ca3414d1" + sha256 cellar: :any_skip_relocation, ventura: "3bf79835ac8078c953f7f86e12bed6dc332e268a22455349531945b2ca3414d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "783f014d41c4fd1ed3dc1ada0024f9b8b62677e05218f2c83535d99b3ce1469e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d60b337f4a9d97f4107e04eaa49ca7cdca98cb44a158df7664b55a33724639ed" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"Hello.txt").write("Hello World!") + system bin/"jvgrep", "Hello World!", testpath + end +end diff --git a/Formula/j/jvm-mon.rb b/Formula/j/jvm-mon.rb new file mode 100644 index 0000000000000..16f8ddae79ea9 --- /dev/null +++ b/Formula/j/jvm-mon.rb @@ -0,0 +1,43 @@ +class JvmMon < Formula + desc "Console-based JVM monitoring" + homepage "https://github.com/ajermakovics/jvm-mon" + url "https://github.com/ajermakovics/jvm-mon/archive/refs/tags/1.3.tar.gz" + sha256 "71f27098bc130525c837ce5821481d795be1b315464f327dbe9d828a221338dd" + license "Apache-2.0" + head "https://github.com/ajermakovics/jvm-mon.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "61c0f2de3ba96b85b364c0c6df8a11dfca3a61790a19b105f5579ffba96f8fb5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "569d3b771bab87123faac0038aa194a79788b5f5b8a5e1b73974baf70daf30c0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "45ed63d60bbb978e2a1916675d38f7240ce6ea0d69b3510b05b9d3bc1e86e6a5" + sha256 cellar: :any_skip_relocation, sonoma: "1041bf832360e6d61b4a229e64d3db2ea3e210ce52c5de8285c3a53cd3783a9c" + sha256 cellar: :any_skip_relocation, ventura: "e5f8b80e136462bc508d6b3089048ecbeb0ef70ff38d9fabd20f23234a6b471a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "102d1f23f51c01a4c4959f508ad1d6c6b012ddfbaac2f142710fd04b2bfbb371" + end + + depends_on "go" => :build + depends_on "openjdk" => :build + + def install + cd "jvm-mon-go" do + system "./make-agent.sh" + system "go", "build", *std_go_args(ldflags: "-s -w") + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/jvm-mon -v 2>&1") + + require "pty" + ENV["TERM"] = "xterm" + PTY.spawn(bin/"jvm-mon") do |_r, w, _pid| + sleep 1 + w.write "q" + end + end +end diff --git a/Formula/j/jvmtop.rb b/Formula/j/jvmtop.rb new file mode 100644 index 0000000000000..748179cc04093 --- /dev/null +++ b/Formula/j/jvmtop.rb @@ -0,0 +1,24 @@ +class Jvmtop < Formula + desc "Console application for monitoring all running JVMs on a machine" + homepage "https://github.com/patric-r/jvmtop" + url "https://github.com/patric-r/jvmtop/releases/download/0.8.0/jvmtop-0.8.0.tar.gz" + sha256 "f9de8159240b400a51b196520b4c4f0ddbcaa8e587fab1f0a59be8a00dc128c4" + license "GPL-2.0-only" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "b9fabbeac0618290d38994f556f5de9288b33c2e23c7dd00e1892d111c23c4ce" + end + + depends_on "openjdk@8" + + def install + rm Dir["*.bat"] + mv "jvmtop.sh", "jvmtop" + chmod 0755, "jvmtop" + + libexec.install Dir["*"] + (bin/"jvmtop").write_env_script(libexec/"jvmtop", Language::Java.java_home_env("1.8")) + end +end diff --git a/Formula/j/jwt-cli.rb b/Formula/j/jwt-cli.rb new file mode 100644 index 0000000000000..e9f1aa4a6ca27 --- /dev/null +++ b/Formula/j/jwt-cli.rb @@ -0,0 +1,34 @@ +class JwtCli < Formula + desc "Super fast CLI tool to decode and encode JWTs built in Rust" + homepage "https://github.com/mike-engel/jwt-cli" + url "https://github.com/mike-engel/jwt-cli/archive/refs/tags/6.2.0.tar.gz" + sha256 "49d67d920391978684dc32b75e553a2abbd46c775365c0fb4b232d22c0ed653a" + license "MIT" + head "https://github.com/mike-engel/jwt-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7620546fab86ed26262f53659f420a2a52a61137895e26c1e90ae0c8f93701e0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fbf28074fe942a8b9e56efdaa6a92bd420557f9e52efd34e20d0d8425081f99c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b47ec1157a9dea61645c802355907945b40fce48536af4adb46f7ebc99cb5b6" + sha256 cellar: :any_skip_relocation, sonoma: "680cbbcf2e399fe52e9b2439cfa52ee5bce2b17ac2773bc4a82067e72a823092" + sha256 cellar: :any_skip_relocation, ventura: "60ffb058e6075cbbddd0b23ce137bc00679553f0d875e9db5addbf903dfb478d" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2908de84a0365cdd926afea4a2fd75884d5ac24b757f17577c800fb6dc2015e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0489c4208b5020bee00984994a5ce2d8a2a1f80f67de14a43520f38e918f9b8c" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"jwt", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/jwt --version") + + encoded = shell_output("#{bin}/jwt encode --secret 'test' '{\"sub\":\"1234567890\"}'").strip + decoded = shell_output("#{bin}/jwt decode --secret 'test' --ignore-exp '#{encoded}'") + assert_match '"sub": "1234567890"', decoded + end +end diff --git a/Formula/j/jxl-oxide.rb b/Formula/j/jxl-oxide.rb new file mode 100644 index 0000000000000..82425dba36029 --- /dev/null +++ b/Formula/j/jxl-oxide.rb @@ -0,0 +1,37 @@ +class JxlOxide < Formula + desc "JPEG XL decoder" + homepage "https://github.com/tirr-c/jxl-oxide" + url "https://github.com/tirr-c/jxl-oxide/archive/refs/tags/0.12.2.tar.gz" + sha256 "0d2b812051b64ab443c444035e7ccf4a53e8d823608c1c6b9997c3e6c43f729c" + license any_of: ["MIT", "Apache-2.0"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "2ef5a846c6ce8e8e8819712bb097782e9670bdfd293aba5973524abf76b2c4e2" + sha256 cellar: :any, arm64_sonoma: "cb4acba8480cab4a2a20b4347d687d6eb8980ce2ed69d50cc8f19adde2347327" + sha256 cellar: :any, arm64_ventura: "01886bc00349b81cc6c11d6e2ee8f3b0a1b1bdea0c023368d8c3bf88ab1cbdd0" + sha256 cellar: :any, sonoma: "57ed9baf6520a635a01710a29b5e21bcd26a7fab8c62595deef5faa1c4c8e836" + sha256 cellar: :any, ventura: "7320c637ed90444b0b060a962efcf0801f127cc859717f4d9d97b0a08bcfc8ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "39164022d29a53a18003247a47cd45ff1d53d01cf1b8c15851a8fb655ca5efaa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b7d8cd9590f564c7766f13eb9e348be38cad7ad26cacb9f0fb8d56845008c429" + end + + depends_on "rust" => :build + depends_on "little-cms2" + + def install + ENV["LCMS2_LIB_DIR"] = Formula["little-cms2"].opt_lib.to_s + system "cargo", "install", *std_cargo_args(path: "crates/jxl-oxide-cli") + end + + test do + resource "sunset-logo-jxl" do + url "https://github.com/libjxl/conformance/blob/5399ecf01e50ec5230912aa2df82286dc1c379c9/testcases/sunset_logo/input.jxl?raw=true" + sha256 "6617480923e1fdef555e165a1e7df9ca648068dd0bdbc41a22c0e4213392d834" + end + + resource("sunset-logo-jxl").stage do + system bin/"jxl-oxide", "input.jxl", "-o", testpath/"out.png" + end + assert_path_exists testpath/"out.png" + end +end diff --git a/Formula/j/jxrlib.rb b/Formula/j/jxrlib.rb new file mode 100644 index 0000000000000..3f975c06dd7c8 --- /dev/null +++ b/Formula/j/jxrlib.rb @@ -0,0 +1,55 @@ +class Jxrlib < Formula + desc "Tools for JPEG-XR image encoding/decoding" + homepage "https://tracker.debian.org/pkg/jxrlib" + url "https://deb.debian.org/debian/pool/main/j/jxrlib/jxrlib_1.2~git20170615.f752187.orig.tar.xz" + version "1.2_git20170615-f752187" + sha256 "3e3c9d3752b0bbf018ed9ce01b43dcd4be866521dc2370dc9221520b5bd440d4" + license "BSD-2-Clause" + version_scheme 1 + + livecheck do + url "https://deb.debian.org/debian/pool/main/j/jxrlib/" + regex(/href=.*?jxrlib[._-]v?(\d+(?:\.\d+)+[^"' >]*?)\.orig\.t/i) + strategy :page_match do |page, regex| + page.scan(regex).map do |match| + match[0].tr("~", "_").sub(/\.(\h{7})$/, '-\1') + end + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e7aae93b96e812a888ab0a4da737a40fef17bb389a7e3bcc5106ff81c33a7841" + sha256 cellar: :any, arm64_sonoma: "437e4ba50db36d58d3c043f6a3a1e34939f0e80f1318160d9d142da27f222e47" + sha256 cellar: :any, arm64_ventura: "a81a86a6bc199eac66b8c9ae3b40a942c2acd8986b2c901e165f2ebb99e466f1" + sha256 cellar: :any, arm64_monterey: "2faf5cbf70c5f9fc6d93dd9449b53db9304bbfcb73a48bf58e935f5cee6f9939" + sha256 cellar: :any, sonoma: "212c5e081a76c9e8e669e025a09bc57a2ca86454eb18dc902809af560a0530fc" + sha256 cellar: :any, ventura: "449029d8100d5ed878755410d3c23b3044f4033afb5a384886fd2db2b0994434" + sha256 cellar: :any, monterey: "1b98aa039650e79119c061342a8ccf2e6ef8d0872893ad12c1bfefac67a8d88d" + sha256 cellar: :any_skip_relocation, arm64_linux: "0db591f53b1290c104b0f916fc03d356174efe49822436a3548a0aadb4110b43" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8b4edc2fe9b2af8b4ac16fc72f1ac97c7c2bd61186250e2edb55c2cd632527d" + end + + depends_on "cmake" => :build + + # Enable building with CMake. Adapted from Debian patch. + patch do + url "https://raw.githubusercontent.com/Gcenx/macports-wine/1b310a17497f9a49cc82789cc5afa2d22bb67c0c/graphics/jxrlib/files/0001-Add-ability-to-build-using-cmake.patch" + sha256 "beebe13d40bc5b0ce645db26b3c8f8409952d88495bbab8bc3bebc954bdecffe" + end + + def install + inreplace "CMakeLists.txt", "@VERSION@", version.to_s + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + bmp = "Qk06AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABgAAAAAAAQAAADDDgAAww4AAAAAAAAAAAAA////AA==".unpack1("m") + infile = "test.bmp" + outfile = "test.jxr" + File.binwrite(infile, bmp) + system bin/"JxrEncApp", "-i", infile, "-o", outfile + system bin/"JxrDecApp", "-i", outfile, "-o", infile + end +end diff --git a/Formula/j/jython.rb b/Formula/j/jython.rb new file mode 100644 index 0000000000000..7557571605c45 --- /dev/null +++ b/Formula/j/jython.rb @@ -0,0 +1,37 @@ +class Jython < Formula + desc "Python implementation written in Java (successor to JPython)" + homepage "https://www.jython.org/" + url "https://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.4/jython-installer-2.7.4.jar" + sha256 "6001f0741ed5f4a474e5c5861bcccf38dc65819e25d46a258cbc0278394a070b" + license "PSF-2.0" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=org/python/jython-installer/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "13e057d004350aeb89d008269280f5342064efc7cb4e66779bbb7661097a4492" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f4cdcbf4f97999a663ea4251aa810cf84835e70da8a50c4bb4b0fc378a476b9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4d0f3bf41ef89c336e81c06e08d2aff10a9e9917459b0a4a7a5e1dd1f6f5a9c6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1c85fbc0ccfa9e3ba0b11fc2996716ed2da5578d6b385b921a50100882604d33" + sha256 cellar: :any_skip_relocation, sonoma: "fd1fb28373af09ab635cf1ba9a4531bdfd0ca61f777c880844daa8d6df426673" + sha256 cellar: :any_skip_relocation, ventura: "c24c368c2bdd03928c74e6807c2954343c05d72ea0bde7d048add87354d49d12" + sha256 cellar: :any_skip_relocation, monterey: "48be7bdcbcd3be1e5733a1181eb4f1a02f75d7d3a442a7a52e0aef7b7a29fb4f" + sha256 cellar: :any_skip_relocation, arm64_linux: "64f495d1221b38c43ba23f2855c15d7953774602701abc80d843254b2e9646d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ace9b3d90e73ef28c68731acdb4ace7ff14889380da8c07c0b3ddb425e8d43b0" + end + + depends_on "openjdk" + + def install + system "java", "-jar", cached_download, "-s", "-d", libexec + (bin/"jython").write_env_script libexec/"bin/jython", Language::Java.overridable_java_home_env + end + + test do + jython = shell_output("#{bin}/jython -c \"from java.util import Date; print Date()\"") + # This will break in the year 2100. The test will need updating then. + assert_match jython.match(/20\d\d/).to_s, shell_output("/bin/date +%Y") + end +end diff --git a/Formula/jabba.rb b/Formula/jabba.rb deleted file mode 100644 index 68bef55681b93..0000000000000 --- a/Formula/jabba.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Jabba < Formula - desc "Cross-platform Java Version Manager" - homepage "https://github.com/shyiko/jabba" - url "https://github.com/shyiko/jabba/archive/0.11.2.tar.gz" - sha256 "33874c81387f03fe1a27c64cb6fb585a458c1a2c1548b4b86694da5f81164355" - head "https://github.com/shyiko/jabba.git" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "7eddb409c7bb2784db21756e624a18b19977bb4df53ab547eaedd8abe876651e" => :catalina - sha256 "3101ea25ce49c3ed96b3c8595a5441fec3aeb536b56eca21c1dea56f6c1fd86b" => :mojave - sha256 "8454f5aa9b8832908b1c889531118ea058b2e675ef7f7f37eeb282f454aeec1e" => :high_sierra - 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/shyiko/jabba" - dir.install buildpath.children - cd dir do - ldflags = "-X main.version=#{version}" - system "glide", "install" - system "go", "build", "-ldflags", ldflags, "-o", bin/"jabba" - prefix.install_metafiles - end - end - - test do - ENV["JABBA_HOME"] = testpath/"jabba_home" - system bin/"jabba", "install", "openjdk@1.14.0" - jdk_path = shell_output("#{bin}/jabba which openjdk@1.14.0").strip - assert_match 'openjdk version "14', - shell_output("#{jdk_path}/Contents/Home/bin/java -version 2>&1") - end -end diff --git a/Formula/jack.rb b/Formula/jack.rb deleted file mode 100644 index 5c3298fd1caf8..0000000000000 --- a/Formula/jack.rb +++ /dev/null @@ -1,89 +0,0 @@ -# This now builds a version of JACKv1 which matches the current API -# for JACKv2. JACKv2 is not buildable on a number of macOS -# distributions, and the JACK team instead suggests installation of -# JACKOSX, a pre-built binary form for which the source is not available. -# If you require JACKv2, you should use that. Otherwise, this formula should -# operate fine. -# Please see https://github.com/Homebrew/homebrew/pull/22043 for more info -class Jack < Formula - desc "Audio Connection Kit" - homepage "https://jackaudio.org/" - # pull from git tag to get submodules - url "https://github.com/jackaudio/jack1.git", - :tag => "0.125.0", - :revision => "f5e00e485e7aa4c5baa20355b27e3b84a6912790" - revision 4 - head "https://github.com/jackaudio/jack1.git" - - bottle do - sha256 "69f9c5215e993b4b6eee2b31b3585d4df92160ec162a433df76a4a66e9f72b71" => :catalina - sha256 "fc489e40c89bfe3315b7d9f6dc1f243aeb03e57741faeb7b4b8f8adfc769c0a7" => :mojave - sha256 "169ce5413c397a9cea4d346fd33d5120f1411d92105f39722b2ae8c9ebd881df" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "berkeley-db" - depends_on "libsamplerate" - depends_on "libsndfile" - - on_linux do - depends_on "util-linux" - end - - def install - sdk = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" - - # Makefile hardcodes Carbon header location - inreplace Dir["drivers/coreaudio/Makefile.{am,in}"], - "/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h", - "#{sdk}/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h" - - # https://github.com/jackaudio/jack1/issues/81 - inreplace "configure.ac", "-mmacosx-version-min=10.4", - "-mmacosx-version-min=#{MacOS.version}" - - system "./autogen.sh" - ENV["LINKFLAGS"] = ENV.ldflags - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - plist_options :manual => "jackd -d coreaudio" - - def plist - <<~EOS - - - - - Label - #{plist_name} - WorkingDirectory - #{opt_prefix} - EnvironmentVariables - - PATH - /usr/bin:/bin:/usr/sbin:/sbin:#{HOMEBREW_PREFIX}/bin - - ProgramArguments - - #{opt_bin}/jackd - -d - coreaudio - - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/jackd --version") - end -end diff --git a/Formula/jadx.rb b/Formula/jadx.rb deleted file mode 100644 index 5d0a75a8e6c78..0000000000000 --- a/Formula/jadx.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Jadx < Formula - desc "Dex to Java decompiler" - homepage "https://github.com/skylot/jadx" - url "https://github.com/skylot/jadx/releases/download/v1.1.0/jadx-1.1.0.zip" - sha256 "91948067a60feee36512e043b288f726678ddd760aa11a01496b53df95465b16" - license "Apache-2.0" - revision 1 - - head do - url "https://github.com/skylot/jadx.git" - depends_on "gradle" => :build - end - - bottle :unneeded - - depends_on "openjdk" - - resource "sample.apk" do - url "https://github.com/downloads/stephanenicolas/RoboDemo/robodemo-sample-1.0.1.apk" - sha256 "bf3ec04631339538c8edb97ebbd5262c3962c5873a2df9022385156c775eb81f" - end - - def install - if build.head? - system "gradle", "clean", "dist" - libexec.install Dir["build/jadx/*"] - else - libexec.install Dir["*"] - end - bin.install libexec/"bin/jadx" - bin.install libexec/"bin/jadx-gui" - bin.env_script_all_files libexec/"bin", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - end - - test do - resource("sample.apk").stage do - system "#{bin}/jadx", "-d", "out", "robodemo-sample-1.0.1.apk" - end - end -end diff --git a/Formula/jags.rb b/Formula/jags.rb deleted file mode 100644 index e9d9237df88db..0000000000000 --- a/Formula/jags.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Jags < Formula - desc "Just Another Gibbs Sampler for Bayesian MCMC simulation" - homepage "https://mcmc-jags.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mcmc-jags/JAGS/4.x/Source/JAGS-4.3.0.tar.gz" - sha256 "8ac5dd57982bfd7d5f0ee384499d62f3e0bb35b5f1660feb368545f1186371fc" - revision 2 - - bottle do - cellar :any - sha256 "f40e6af27e11d70df8d967dfdf56b9f51f97b6d7b26922efc1e0a7c564d6a82e" => :catalina - sha256 "73dd05de303d75d9a252fd9cf40242036d6227d20ff0e40bdad8a9b4fb5ac093" => :mojave - sha256 "6f3e40e482b03deb728487e3b9c7089d900f1aa518c74de0859a2877833b16b0" => :high_sierra - sha256 "0651db81905348bb0c48c20529c5bab0d4eb735da50fcc9ec26aef38672cf26f" => :sierra - sha256 "6c82f61d6cacec46e7863f9b9cb92f33eac63339822fd196e6a029a75dfb01f7" => :el_capitan - end - - depends_on "gcc" # for gfortran - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"model.bug").write <<~EOS - data { - obs <- 1 - } - model { - parameter ~ dunif(0,1) - obs ~ dbern(parameter) - } - EOS - (testpath/"script").write <<~EOS - model in model.bug - compile - initialize - monitor parameter - update 100 - coda * - EOS - system "#{bin}/jags", "script" - end -end diff --git a/Formula/jailkit.rb b/Formula/jailkit.rb deleted file mode 100644 index 71f2de9f00b1a..0000000000000 --- a/Formula/jailkit.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Jailkit < Formula - desc "Utilities to create limited user accounts in a chroot jail" - homepage "https://olivier.sessink.nl/jailkit/" - url "https://olivier.sessink.nl/jailkit/jailkit-2.21.tar.bz2" - sha256 "db3bb090a4fffdef59b5eafd594478d576cacf84306f9929d0dfbed090cf3687" - - bottle do - rebuild 1 - sha256 "1bdfd57d829a6b90286601b2b13660b53cc14fe6443d0d23fa15636171c79439" => :catalina - sha256 "43811f3b792ddd4039767cf81882e0c46c2851ba95546c01d7c1a052c3e99f3e" => :mojave - sha256 "dd348dd5721fc813bb1556f13b196b684f5ef805f3c03c2bab1e3df4eef41376" => :high_sierra - end - - depends_on "python@3.8" - - def install - ENV["PYTHONINTERPRETER"] = Formula["python@3.8"].opt_bin/"python3" - - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" - system "make", "install" - end -end diff --git a/Formula/jam.rb b/Formula/jam.rb deleted file mode 100644 index 8903e8a71abaf..0000000000000 --- a/Formula/jam.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Jam < Formula - desc "Make-like build tool" - homepage "https://www.perforce.com/documentation/jam-documentation" - url "https://swarm.workshop.perforce.com/projects/perforce_software-jam/download/main/jam-2.6.1.zip" - sha256 "72ea48500ad3d61877f7212aa3d673eab2db28d77b874c5a0b9f88decf41cb73" - - bottle do - cellar :any_skip_relocation - sha256 "0f2f2b4cac48c2ef9b11d86867c4e9d941a41a582754bfc470da25a7174dde9f" => :catalina - sha256 "c19a32cbe0ffa2e7d2d826ee542a74307ca29b34ba28dc5ec6aea7ff7a9127c1" => :mojave - sha256 "2927cebface8a3cbc00a23e7badb9e1676fda9bae282e78a1772b99aafba5014" => :high_sierra - end - - conflicts_with "ftjam", :because => "both install a `jam` binary" - - def install - system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", "LOCATE_TARGET=bin" - bin.install "bin/jam", "bin/mkjambase" - end - - test do - (testpath/"Jamfile").write <<~EOS - Main jamtest : jamtest.c ; - EOS - - (testpath/"jamtest.c").write <<~EOS - #include - - int main(void) - { - printf("Jam Test\\n"); - return 0; - } - EOS - - assert_match /Cc jamtest.o/, shell_output(bin/"jam").strip - assert_equal "Jam Test", shell_output("./jamtest").strip - end -end diff --git a/Formula/janet.rb b/Formula/janet.rb deleted file mode 100644 index 46bd7f301e9b5..0000000000000 --- a/Formula/janet.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Janet < Formula - desc "Dynamic language and bytecode vm" - homepage "https://janet-lang.org/" - url "https://github.com/janet-lang/janet/archive/v1.10.1.tar.gz" - sha256 "5d830a01ced5b97f99b9c71a9d869751df72266a88eb7b3ff7a8bff9da39afde" - license "MIT" - head "https://github.com/janet-lang/janet.git" - - bottle do - cellar :any - sha256 "a766c0f5fa6d207c030813e03abf3b09ab13e8dcb6a5ce4bad3912017435685b" => :catalina - sha256 "b6d8f7dd18cf760657d46121b6290402008d4ac21a03a1bac88ff6fb697976dd" => :mojave - sha256 "6ab63abf4e3f1cd5d4c5bacb367c779bf776153c37c4bfad3c85cf02b52678dd" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - - def install - system "meson", "setup", "build", "--buildtype=release", *std_meson_args - cd "build" do - system "ninja" - system "ninja", "install" - end - end - - test do - assert_equal "12", shell_output("#{bin}/janet -e '(print (+ 5 7))'").strip - end -end diff --git a/Formula/jansson.rb b/Formula/jansson.rb deleted file mode 100644 index db1fce557c50b..0000000000000 --- a/Formula/jansson.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Jansson < Formula - desc "C library for encoding, decoding, and manipulating JSON" - homepage "https://www.digip.org/jansson/" - url "https://www.digip.org/jansson/releases/jansson-2.13.1.tar.gz" - sha256 "f4f377da17b10201a60c1108613e78ee15df6b12016b116b6de42209f47a474f" - license "MIT" - - bottle do - cellar :any - sha256 "e6a942f77821fd65810d4bc20e6938364a5e40cd7c8510c4b090731573bd0088" => :catalina - sha256 "587acdadd1ea8bcf22c316f55a32084f530280a7e24f0864e0e420718d0d1b7f" => :mojave - sha256 "38085c147eb40d58df8a91a44e7544d4ceb248aa25f54bdd8a3b10c1a214d9e9" => :high_sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - json_t *json; - json_error_t error; - json = json_loads("\\"foo\\"", JSON_DECODE_ANY, &error); - assert(json && json_is_string(json)); - json_decref(json); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-ljansson", "-o", "test" - system "./test" - end -end diff --git a/Formula/jasmin.rb b/Formula/jasmin.rb deleted file mode 100644 index 3878561a77e6b..0000000000000 --- a/Formula/jasmin.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Jasmin < Formula - desc "Assembler for the Java Virtual Machine" - homepage "https://jasmin.sourceforge.io/" - url "https://downloads.sourceforge.net/project/jasmin/jasmin/jasmin-2.4/jasmin-2.4.zip" - sha256 "eaa10c68cec68206fd102e9ec7113739eccd790108a1b95a6e8c3e93f20e449d" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - # Remove Windows scripts - rm_rf Dir["*.bat"] - - libexec.install Dir["*.jar"] - prefix.install %w[Readme.txt license-ant.txt license-jasmin.txt] - (bin/"jasmin").write <<~EOS - #!/bin/bash - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - exec "${JAVA_HOME}/bin/java" -jar "#{libexec}/jasmin.jar" "$@" - EOS - end - - test do - (testpath/"test.j").write <<~EOS - .class public HomebrewTest - .super java/lang/Object - .method public ()V - aload_0 - invokespecial java/lang/Object/()V - return - .end method - .method public static main([Ljava/lang/String;)V - .limit stack 2 - getstatic java/lang/System/out Ljava/io/PrintStream; - ldc "Hello Homebrew" - invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V - return - .end method - EOS - system "#{bin}/jasmin", "#{testpath}/test.j" - assert_equal "Hello Homebrew\n", shell_output("java HomebrewTest") - end -end diff --git a/Formula/jasper.rb b/Formula/jasper.rb deleted file mode 100644 index d2094b0259ec3..0000000000000 --- a/Formula/jasper.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Jasper < Formula - desc "Library for manipulating JPEG-2000 images" - homepage "https://www.ece.uvic.ca/~frodo/jasper/" - url "https://github.com/mdadams/jasper/archive/version-2.0.16.tar.gz" - sha256 "f1d8b90f231184d99968f361884e2054a1714fdbbd9944ba1ae4ebdcc9bbfdb1" - revision 1 - - bottle do - sha256 "eb5d0888be36aa8afb0eccc43957eeda99ded64ec5a5531240a4ec99450ba183" => :catalina - sha256 "ed0856ff9b2429852401e658f4045c9e39cd05fa77b5ea7a6a3c2e21b4d8c460" => :mojave - sha256 "630b86c544fda0a769815637e37b34e587a6d070b26d642b0d50401f609c744f" => :high_sierra - sha256 "15ccd9ba448e5de3468d6be07c41106ed77e45d65adbea74a524c042e8791b06" => :sierra - end - - depends_on "cmake" => :build - depends_on "jpeg" - - def install - mkdir "build" do - # Make sure macOS's GLUT.framework is used, not XQuartz or freeglut - # Reported to CMake upstream 4 Apr 2016 https://gitlab.kitware.com/cmake/cmake/issues/16045 - glut_lib = "#{MacOS.sdk_path}/System/Library/Frameworks/GLUT.framework" - system "cmake", "..", "-DGLUT_glut_LIBRARY=#{glut_lib}", *std_cmake_args - system "make" - system "make", "test" - system "make", "install" - system "make", "clean" - system "cmake", "..", "-DGLUT_glut_LIBRARY=#{glut_lib}", "-DJAS_ENABLE_SHARED=OFF", *std_cmake_args - system "make" - lib.install "src/libjasper/libjasper.a" - end - end - - test do - system bin/"jasper", "--input", test_fixtures("test.jpg"), - "--output", "test.bmp" - assert_predicate testpath/"test.bmp", :exist? - end -end diff --git a/Formula/javacc.rb b/Formula/javacc.rb deleted file mode 100644 index d682990a41c9d..0000000000000 --- a/Formula/javacc.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Javacc < Formula - desc "Parser generator for use with Java applications" - homepage "https://javacc.org/" - url "https://github.com/javacc/javacc/archive/javacc-7.0.9.tar.gz" - sha256 "8f16103c741761f8fb6b9caef1c941ba9dd2d0cca01fd0bee26cdadf19a5af14" - - bottle do - cellar :any_skip_relocation - sha256 "6eebc2e971b6ec0bd1fd0010541833623c24b4d6f2fb6f83026b927a209f0bc1" => :catalina - sha256 "73510c8870303d486394d2ec540a2f1c48432da6ed795de25b13f2d4f079c16e" => :mojave - sha256 "e1bd0b87cb040d9d7d07be29fc66b4c0b82a530cff669a620009d4bc739281d3" => :high_sierra - end - - depends_on "ant" => :build - depends_on "openjdk" - - def install - system "ant" - libexec.install "target/javacc.jar" - doc.install Dir["www/doc/*"] - (share/"examples").install Dir["examples/*"] - %w[javacc jjdoc jjtree].each do |script| - (bin/script).write <<~SH - #!/bin/bash - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - exec "${JAVA_HOME}/bin/java" -classpath '#{libexec}/javacc.jar' #{script} "$@" - SH - end - end - - test do - src_file = share/"examples/SimpleExamples/Simple1.jj" - - output_file_stem = testpath/"Simple1" - - system bin/"javacc", src_file - assert_predicate output_file_stem.sub_ext(".java"), :exist? - - system bin/"jjtree", src_file - assert_predicate output_file_stem.sub_ext(".jj.jj"), :exist? - - system bin/"jjdoc", src_file - assert_predicate output_file_stem.sub_ext(".html"), :exist? - end -end diff --git a/Formula/javarepl.rb b/Formula/javarepl.rb deleted file mode 100644 index 3c1c1fd71753c..0000000000000 --- a/Formula/javarepl.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Javarepl < Formula - desc "Read Eval Print Loop (REPL) for Java" - homepage "https://github.com/albertlatacz/java-repl" - url "https://github.com/albertlatacz/java-repl/releases/download/428/javarepl-428.jar" - sha256 "d42de9405aa69ea6c4eb0e28a6b3cb09e3bd008649d9ac6c55a4aa798e284734" - license "Apache-2.0" - revision 1 - - bottle :unneeded - - depends_on :java => "1.8" - - def install - libexec.install "javarepl-#{version}.jar" - (libexec/"bin").write_jar_script libexec/"javarepl-#{version}.jar", "javarepl" - (libexec/"bin/javarepl").chmod 0755 - (bin/"javarepl").write_env_script libexec/"bin/javarepl", Language::Java.java_home_env("1.8") - end - - test do - assert_match "65536", pipe_output("#{bin}/javarepl", "System.out.println(64*1024)\n:quit\n") - end -end diff --git a/Formula/jbake.rb b/Formula/jbake.rb deleted file mode 100644 index e927bb00de862..0000000000000 --- a/Formula/jbake.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Jbake < Formula - desc "Java based static site/blog generator" - homepage "https://jbake.org/" - url "https://dl.bintray.com/jbake/binary/jbake-2.6.5-bin.zip" - sha256 "a2a7b885749f622cf68c10484291cbd2592d10fd80281caa6766f3d872932632" - - bottle :unneeded - - depends_on "openjdk" - - def install - rm_f Dir["bin/*.bat"] - libexec.install Dir["*"] - bin.install libexec/"bin/jbake" - bin.env_script_all_files libexec/"bin", :JAVA_HOME => Formula["openjdk"].opt_prefix - end - - test do - assert_match "Usage: jbake", shell_output("#{bin}/jbake") - end -end diff --git a/Formula/jbig2dec.rb b/Formula/jbig2dec.rb deleted file mode 100644 index 38da1ced6c74a..0000000000000 --- a/Formula/jbig2dec.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Jbig2dec < Formula - desc "JBIG2 decoder and library (for monochrome documents)" - homepage "https://jbig2dec.com/" - url "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs951/jbig2dec-0.18.tar.gz" - sha256 "9e19775237350e299c422b7b91b0c045e90ffa4ba66abf28c8fb5eb005772f5e" - - bottle do - cellar :any - sha256 "fcf5e2f4d25c553c6cdada4364e37d08850eea59cda5e2177503d8eb7ecf0aef" => :catalina - sha256 "e437d5f1391cb3b85a1f11246fa87ab9b3396ce10f3b25801d2a614b79d09cfc" => :mojave - sha256 "7bbc9569c46647373ca333801e335d8839078eb61c94e36a3d53e1e2c323c58c" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - resource("test") do - url "https://github.com/apache/tika/raw/master/tika-parsers/src/test/resources/test-documents/testJBIG2.jb2" - sha256 "40764aed6c185f1f82123f9e09de8e4d61120e35d2b5c6ede082123749c22d91" - end - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-silent-rules - --without-libpng - ] - - system "./autogen.sh", *args - system "make", "install" - end - - test do - resource("test").stage testpath - output = shell_output("#{bin}/jbig2dec -t pbm --hash testJBIG2.jb2") - assert_match "aa35470724c946c7e953ddd49ff5aab9f8289aaf", output - assert_predicate testpath/"testJBIG2.pbm", :exist? - end -end diff --git a/Formula/jbig2enc.rb b/Formula/jbig2enc.rb deleted file mode 100644 index 740b9302578f8..0000000000000 --- a/Formula/jbig2enc.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Jbig2enc < Formula - desc "JBIG2 encoder (for monochrome documents)" - homepage "https://github.com/agl/jbig2enc" - url "https://github.com/agl/jbig2enc/archive/0.29.tar.gz" - sha256 "bfcf0d0448ee36046af6c776c7271cd5a644855723f0a832d1c0db4de3c21280" - head "https://github.com/agl/jbig2enc.git" - - bottle do - cellar :any - sha256 "1c24750a1e84a128012a71d0cc47812c29c32136b31dc9c8a15d71d124701c90" => :catalina - sha256 "62cbf2c1eab2eb5cfe0060887f96d8408fb05a4214580bef8da8a593962b436d" => :mojave - sha256 "7431e5b6cf8354ab27bbb7710b2133eb3d381f3c6a30b7143332fba5e7fe82f7" => :high_sierra - sha256 "53d757dc93193756cc90f94a6ca2f4bad2b77610e5b93d5d74f95899019771be" => :sierra - sha256 "f903109f6f2da89af11e576c8776f10e16eadb71c0a60edb9f35157b965edd98" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "leptonica" - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/jbigkit.rb b/Formula/jbigkit.rb deleted file mode 100644 index 2d48b78fcc20f..0000000000000 --- a/Formula/jbigkit.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Jbigkit < Formula - desc "JBIG1 data compression standard implementation" - homepage "https://www.cl.cam.ac.uk/~mgk25/jbigkit/" - url "https://www.cl.cam.ac.uk/~mgk25/jbigkit/download/jbigkit-2.1.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/j/jbigkit/jbigkit_2.1.orig.tar.gz" - sha256 "de7106b6bfaf495d6865c7dd7ac6ca1381bd12e0d81405ea81e7f2167263d932" - license "GPL-2.0" - head "https://www.cl.cam.ac.uk/~mgk25/git/jbigkit", - :using => :git - - bottle do - cellar :any_skip_relocation - sha256 "16936e06d59fe44d40a3829bc60fec43cb7ca23d54b5fdf9510aca78df648460" => :catalina - sha256 "887d4f100ed2264220232720a7732a969ee97df32a1c87f03897952920b6019a" => :mojave - sha256 "c8a003d12559b6f506fbd912c3b68163f7ab6022fd53e069bfbd55c813f52df5" => :high_sierra - sha256 "831dd1ec7e8013ddc6c23641a21292eae26f397e8b61d95382a6240f18fc5602" => :sierra - sha256 "bdec08cd92dd59183b698c6bbd9072881fdfce64b4ecb6182e405e0f2ad26c00" => :el_capitan - sha256 "764396342e87b84253aa06f5046f90c778cacca998ce970900cb2fdf1cfdc3fa" => :yosemite - sha256 "0ce925915b984307d2e679622138143c5cc5baf832b0a16003fa1e6111a5df9f" => :mavericks - end - - conflicts_with "netpbm", :because => "both install `pbm.5` and `pgm.5` files" - - def install - system "make", "CC=#{ENV.cc}", "CCFLAGS=#{ENV.cflags}" - - cd "pbmtools" do - bin.install %w[pbmtojbg jbgtopbm pbmtojbg85 jbgtopbm85] - man1.install %w[pbmtojbg.1 jbgtopbm.1] - man5.install %w[pbm.5 pgm.5] - end - cd "libjbig" do - lib.install Dir["lib*.a"] - (prefix/"src").install Dir["j*.c", "j*.txt"] - include.install Dir["j*.h"] - end - pkgshare.install "examples", "contrib" - end - - test do - system "#{bin}/jbgtopbm #{pkgshare}/examples/ccitt7.jbg | #{bin}/pbmtojbg - testoutput.jbg" - system "/usr/bin/cmp", pkgshare/"examples/ccitt7.jbg", "testoutput.jbg" - end -end diff --git a/Formula/jboss-forge.rb b/Formula/jboss-forge.rb deleted file mode 100644 index 5badb17c3584d..0000000000000 --- a/Formula/jboss-forge.rb +++ /dev/null @@ -1,21 +0,0 @@ -class JbossForge < Formula - desc "Tools to help set up and configure a project" - homepage "https://forge.jboss.org/" - url "https://downloads.jboss.org/forge/releases/3.9.7.Final/forge-distribution-3.9.7.Final-offline.zip" - sha256 "d9ed822e48ef40147ef3e33d3c5998f027109f4d901d809065503f86076f4bbf" - - bottle :unneeded - - depends_on "openjdk" - - def install - rm_f Dir["bin/*.bat"] - libexec.install %w[addons bin lib logging.properties] - bin.install libexec/"bin/forge" - bin.env_script_all_files libexec/"bin", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - end - - test do - assert_match "org.jboss.forge.addon:core", shell_output("#{bin}/forge --list") - end -end diff --git a/Formula/jc.rb b/Formula/jc.rb deleted file mode 100644 index 7b12c1cf779a7..0000000000000 --- a/Formula/jc.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Jc < Formula - include Language::Python::Virtualenv - - desc "Serializes the output of command-line tools to structured JSON output" - homepage "https://github.com/kellyjonbrazil/jc" - url "https://files.pythonhosted.org/packages/7a/66/b3615391a0505ed535c304def859e9bef5b65997d52d9608954bca948ef8/jc-1.11.8.tar.gz" - sha256 "2cd97b995dc485ccf135ecd84cef56348b0345b61b40f4f1f8e5a7c3681fe0dd" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "60a60aeaf7f54b9e6423524435c7b453ac6c77690bb93c143043dd03cdb894a1" => :catalina - sha256 "7dd80c7e1e7d42224431f6f02f77408f44c3f3cfd3b139a4bc766b95b832dcb5" => :mojave - sha256 "cee1045e557a0383b06a786c2602505dfac9b9e91d728221770675397d57a61e" => :high_sierra - end - - depends_on "python@3.8" - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/16/8b/54a26c1031595e5edd0e616028b922d78d8ffba8bc775f0a4faeada846cc/ruamel.yaml-0.16.10.tar.gz" - sha256 "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954" - end - - resource "ruamel.yaml.clib" do - url "https://files.pythonhosted.org/packages/92/28/612085de3fae9f82d62d80255d9f4cf05b1b341db1e180adcf28c1bf748d/ruamel.yaml.clib-0.2.0.tar.gz" - sha256 "b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c" - end - - resource "xmltodict" do - url "https://files.pythonhosted.org/packages/58/40/0d783e14112e064127063fbf5d1fe1351723e5dfe9d6daad346a305f6c49/xmltodict-0.12.0.tar.gz" - sha256 "50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_equal "[{\"header1\": \"data1\", \"header2\": \"data2\"}]\n", \ - pipe_output("#{bin}/jc --csv", "header1, header2\n data1, data2") - end -end diff --git a/Formula/jcal.rb b/Formula/jcal.rb deleted file mode 100644 index b2d143396e7e3..0000000000000 --- a/Formula/jcal.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Jcal < Formula - desc "UNIX-cal-like tool to display Jalali calendar" - homepage "https://savannah.nongnu.org/projects/jcal/" - url "https://download.savannah.gnu.org/releases/jcal/jcal-0.4.1.tar.gz" - sha256 "e8983ecad029b1007edc98458ad13cd9aa263d4d1cf44a97e0a69ff778900caa" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "0544ee162b480d5999a312cf721b40007901f964b20edbdd8e062b2e95c64157" => :catalina - sha256 "4274c678ae3c2110c94b474aa56fcbb6b121645f9a91352b7c24bf028750f3d9" => :mojave - sha256 "348fdd02ce58859bf75ebe00feaf5c90e1f4f052d531e7667343f4c220d8e7bb" => :high_sierra - sha256 "d6f50844723751f0de8181f751ffc0912013b518b5ac60777a3ade7e1aaa3179" => :sierra - sha256 "4d876e18cb50c7aa31211b60b66e42637ca3c9eeed9c688c1945dc4755977597" => :el_capitan - sha256 "3640b058b034b519a5aa3bb1dde36b4efb2ec7bb8124bdbd106617202bf87b22" => :yosemite - sha256 "f3c61ee0a88644c66be60de5d0d0c3ec0118aa4762797baab398363c948a0536" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "/bin/sh", "autogen.sh" - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-dependency-tracking" - system "make" - system "make", "install" - end - - test do - system "#{bin}/jcal", "-y" - system "#{bin}/jdate" - end -end diff --git a/Formula/jd.rb b/Formula/jd.rb deleted file mode 100644 index 85a08a00c46a3..0000000000000 --- a/Formula/jd.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Jd < Formula - desc "JSON diff and patch" - homepage "https://github.com/josephburnett/jd" - url "https://github.com/josephburnett/jd/archive/v1.1.tar.gz" - sha256 "5192f471658ef1af38060ccd74d767bc7f1b60ba8de04335a6cccb88a1d28e20" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "e096231d88fa92e9215345a34de8b5dceb5e3217a22681107f81b935b9090619" => :catalina - sha256 "0a33823d7919a0218e895685903d718bc3013e13710166797cfa332895c6a4e1" => :mojave - sha256 "fed5e72e199dd94ef0f34b506f689de867ac8f938641a9738e99dc8f4c27cbe6" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/josephburnett/jd" - dir.install buildpath.children - - cd dir do - system "go", "build", "-o", bin/"jd" - prefix.install_metafiles - end - end - - test do - (testpath/"a.json").write('{"foo":"bar"}') - (testpath/"b.json").write('{"foo":"baz"}') - expected = <<~EOF - @ ["foo"] - - "bar" - + "baz" - EOF - output = shell_output("#{bin}/jd a.json b.json") - assert_equal output, expected - end -end diff --git a/Formula/jdnssec-tools.rb b/Formula/jdnssec-tools.rb deleted file mode 100644 index d6fbe51025351..0000000000000 --- a/Formula/jdnssec-tools.rb +++ /dev/null @@ -1,38 +0,0 @@ -class JdnssecTools < Formula - desc "Java command-line tools for DNSSEC" - homepage "https://github.com/dblacka/jdnssec-tools" - url "https://github.com/dblacka/jdnssec-tools/releases/download/v0.15/jdnssec-tools-0.15.tar.gz" - sha256 "1d4905652639b8b23084366eb2e2b33d5f534bf29fbf9b4becbf9e29f9b39fdf" - revision 1 - head "https://github.com/dblacka/jdnssec-tools.git" - - bottle do - cellar :any_skip_relocation - sha256 "c12eafadb12264e88ef14fe4e93cdb41f0afccbb24b8cff892e8747d8ad2d73b" => :catalina - sha256 "c12eafadb12264e88ef14fe4e93cdb41f0afccbb24b8cff892e8747d8ad2d73b" => :mojave - sha256 "c12eafadb12264e88ef14fe4e93cdb41f0afccbb24b8cff892e8747d8ad2d73b" => :high_sierra - end - - depends_on "openjdk" - - def install - inreplace Dir["bin/*"], /basedir=.*/, "basedir=#{libexec}" - bin.install Dir["bin/*"] - bin.env_script_all_files libexec/"bin", :JAVA_HOME => Formula["openjdk"].opt_prefix - (libexec/"lib").install Dir["lib/*"] - end - - test do - (testpath/"powerdns.com.key").write( - "powerdns.com. 10773 IN DNSKEY 257 3 8 (AwEAAb/+pXOZWYQ8mv9WM5dFva8 - WU9jcIUdDuEjldbyfnkQ/xlrJC5zA EfhYhrea3SmIPmMTDimLqbh3/4SMTNPTUF+9+U1vp - NfIRTFadqsmuU9F ddz3JqCcYwEpWbReg6DJOeyu+9oBoIQkPxFyLtIXEPGlQzrynKubn04 - Cx83I6NfzDTraJT3jLHKeW5PVc1ifqKzHz5TXdHHTA7NkJAa0sPcZCoNE 1LpnJI/wcUpRU - iuQhoLFeT1E432GuPuZ7y+agElGj0NnBxEgnHrhrnZW UbULpRa/il+Cr5Taj988HqX9Xdm - 6FjcP4Lbuds/44U7U8du224Q8jTrZ 57Yvj4VDQKc=)", - ) - - assert_match /D4C3D5552B8679FAEEBC317E5F048B614B2E5F607DC57F1553182D49AB2179F7/, - shell_output("#{bin}/jdnssec-dstool -d 2 powerdns.com.key") - end -end diff --git a/Formula/jdupes.rb b/Formula/jdupes.rb deleted file mode 100644 index cee77660e33f2..0000000000000 --- a/Formula/jdupes.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Jdupes < Formula - desc "Duplicate file finder and an enhanced fork of 'fdupes'" - homepage "https://github.com/jbruchon/jdupes" - url "https://github.com/jbruchon/jdupes/archive/v1.18.1.tar.gz" - sha256 "94b4822af20e632130c0ad75ba6183ab8009c4920718cf951805f5a49fe07954" - - bottle do - cellar :any_skip_relocation - sha256 "da7bc84d87ece56b7892c5a4f37cb0e1e655101958d2976ecb4670b262408f60" => :catalina - sha256 "985df42db7e61d0fc3b5fcb4228b0de86bbdebeddfb716e996c552d87ac83d7e" => :mojave - sha256 "9d7f49fb217514118c62e3437960955a6ce1acc3925a2cdb561f2861a0355545" => :high_sierra - end - - def install - system "make", "install", "PREFIX=#{prefix}", "ENABLE_DEDUPE=1" - end - - test do - touch "a" - touch "b" - (testpath/"c").write("unique file") - dupes = shell_output("#{bin}/jdupes --zeromatch .").strip.split("\n").sort - assert_equal ["./a", "./b"], dupes - end -end diff --git a/Formula/jed.rb b/Formula/jed.rb deleted file mode 100644 index dfce17ed0a967..0000000000000 --- a/Formula/jed.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Jed < Formula - desc "Powerful editor for programmers" - homepage "https://www.jedsoft.org/jed/" - url "https://www.jedsoft.org/releases/jed/jed-0.99-19.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/j/jed/jed_0.99.19.orig.tar.gz" - sha256 "5eed5fede7a95f18b33b7b32cb71be9d509c6babc1483dd5c58b1a169f2bdf52" - - bottle do - rebuild 1 - sha256 "1b349ce808e1a1a0d2ce8327ef3a68f3ea7678af0bef98c499bbb8d0db9c9a7f" => :catalina - sha256 "74df74658f783e6de97ed841b1e2532ead3681c7816d55c52e56d4d5056050b9" => :mojave - sha256 "b8e8f13a1936067960fd2040019d30fc3cedabba4f5c3c22712990f64e09c752" => :high_sierra - sha256 "caa1269eeac2bd84b2287426c77d501956632f01f92c44605bf8b5d76ab7550a" => :sierra - end - - head do - url "git://git.jedsoft.org/git/jed.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "s-lang" - - def install - if build.head? - cd "autoconf" do - system "make" - end - end - system "./configure", "--prefix=#{prefix}", - "--with-slang=#{Formula["s-lang"].opt_prefix}" - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - (testpath/"test.sl").write "flush (\"Hello, world!\");" - assert_equal "Hello, world!", - shell_output("#{bin}/jed -script test.sl").chomp - end -end diff --git a/Formula/jemalloc.rb b/Formula/jemalloc.rb deleted file mode 100644 index 0d705f6fd823b..0000000000000 --- a/Formula/jemalloc.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Jemalloc < Formula - desc "Implementation of malloc emphasizing fragmentation avoidance" - homepage "http://jemalloc.net/" - url "https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2" - sha256 "34330e5ce276099e2e8950d9335db5a875689a4c6a56751ef3b1d8c537f887f6" - revision 1 - - bottle do - cellar :any - sha256 "b1b211e5bead798c236d478dd74310a97a7b59470f607b608c07222648b08bf5" => :catalina - sha256 "d3f6f85e74b08c8c97448e289734df484f884af35cd10ce9d9db43cf721fbf94" => :mojave - sha256 "8080c98844153da08346431fe0a0592f6f718cb7a17525f9ffb909c395bc0b6d" => :high_sierra - end - - head do - url "https://github.com/jemalloc/jemalloc.git", :branch => "dev" - - depends_on "autoconf" => :build - depends_on "docbook-xsl" => :build - end - - # Fixes an issue where jemalloc's types conflict with the system - # types, preventing their use. Merged upstream. - # https://github.com/jemalloc/jemalloc/commit/3b4a03b92b2e415415a08f0150fdb9eeb659cd52 - patch do - url "https://github.com/Homebrew/formula-patches/raw/d3d5ad2b5683c1a435a185eec9c593749c7ca41a/jemalloc/fix_nothrow_type.patch" - sha256 "d79f5c8767695059ff541f291db3fbc57c9b67299dc129848dd365c2f51b214a" - end - - def install - args = %W[ - --disable-debug - --prefix=#{prefix} - --with-jemalloc-prefix= - ] - - if build.head? - args << "--with-xslroot=#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl" - system "./autogen.sh", *args - system "make", "dist" - else - system "./configure", *args - end - - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(void) { - - for (size_t i = 0; i < 1000; i++) { - // Leak some memory - malloc(i * 100); - } - - // Dump allocator statistics to stderr - malloc_stats_print(NULL, NULL, NULL); - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-ljemalloc", "-o", "test" - system "./test" - end -end diff --git a/Formula/jena.rb b/Formula/jena.rb deleted file mode 100644 index 30cd4fb5b4874..0000000000000 --- a/Formula/jena.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Jena < Formula - desc "Framework for building semantic web and linked data apps" - homepage "https://jena.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=jena/binaries/apache-jena-3.15.0.tar.gz" - mirror "https://archive.apache.org/dist/jena/binaries/apache-jena-3.15.0.tar.gz" - sha256 "6e50f7426d7d607db93ded55e8f6d3b928fedf5cfc80a4b56be646bb45f42a9d" - - bottle :unneeded - - def shim_script(target) - <<~EOS - #!/usr/bin/env bash - export JENA_HOME="#{libexec}" - "$JENA_HOME/bin/#{target}" "$@" - EOS - end - - def install - rm_rf "bat" # Remove Windows scripts - - prefix.install %w[LICENSE NOTICE README] - libexec.install Dir["*"] - Dir.glob("#{libexec}/bin/*") do |path| - bin_name = File.basename(path) - (bin/bin_name).write shim_script(bin_name) - end - end - - test do - system "#{bin}/sparql", "--version" - end -end diff --git a/Formula/jenkins-job-builder.rb b/Formula/jenkins-job-builder.rb deleted file mode 100644 index 248b5a5433ad5..0000000000000 --- a/Formula/jenkins-job-builder.rb +++ /dev/null @@ -1,113 +0,0 @@ -class JenkinsJobBuilder < Formula - desc "Configure Jenkins jobs with YAML files stored in Git" - homepage "https://docs.openstack.org/infra/jenkins-job-builder/" - url "https://files.pythonhosted.org/packages/48/8e/5859e69abcd1df0ea8981fbea48865d52200faf2b7ca33bfb4412920169b/jenkins-job-builder-3.4.0.tar.gz" - sha256 "80a7e8d3bebb1e792ff347e9dd072879ce105424224fe804e6671c32a2e8e4bf" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "401635aba7c452a9a11df19f5643e29486ec94a99d0c77f4e17853bc5b19f913" => :catalina - sha256 "15b76a21bc0d7eccf50a9a8865451e84c01e03021bda785eb1c07b555b7529ce" => :mojave - sha256 "0628969ca2bc6f5c8bc17ff2b048572ca6e1ec85e940f9179bb060fa9ba1dd8f" => :high_sierra - end - - depends_on "python@3.8" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "fasteners" do - url "https://files.pythonhosted.org/packages/15/d7/1e8b3270f21dffcaaf5a2889675e8b2fa35f8a43a5817a31d3820e8e9495/fasteners-0.15.tar.gz" - sha256 "3a176da6b70df9bb88498e1a18a9e4a8579ed5b9141207762368a1017bf8f5ef" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "monotonic" do - url "https://files.pythonhosted.org/packages/19/c1/27f722aaaaf98786a1b338b78cf60960d9fe4849825b071f4e300da29589/monotonic-1.5.tar.gz" - sha256 "23953d55076df038541e648a53676fb24980f7a1be290cdda21300b3bc21dfb0" - end - - resource "multi_key_dict" do - url "https://files.pythonhosted.org/packages/6d/97/2e9c47ca1bbde6f09cb18feb887d5102e8eacd82fbc397c77b221f27a2ab/multi_key_dict-2.0.3.tar.gz" - sha256 "deebdec17aa30a1c432cb3f437e81f8621e1c0542a0c0617a74f71e232e9939e" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/8a/a8/bb34d7997eb360bc3e98d201a20b5ef44e54098bb2b8e978ae620d933002/pbr-5.4.5.tar.gz" - sha256 "07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c" - end - - resource "python-jenkins" do - url "https://files.pythonhosted.org/packages/85/8e/52223d8eebe35a3d86579df49405f096105328a9d80443eaed809f6c374f/python-jenkins-1.7.0.tar.gz" - sha256 "deed8fa79d32769a615984a5dde5e01eda04914d3f4091bd9a23d30474695106" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "stevedore" do - url "https://files.pythonhosted.org/packages/be/19/83fd12828f879f53b85fe820925776aecda710944279e47a2dac53444adc/stevedore-1.32.0.tar.gz" - sha256 "18afaf1d623af5950cc0f7e75e70f917784c73b652a34a12d90b309451b5500b" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - 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 |resource| - resource.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("Managed by Jenkins Job Builder", - pipe_output("#{bin}/jenkins-jobs test /dev/stdin", - "- job:\n name: test-job\n\n", 0)) - end -end diff --git a/Formula/jenkins-lts.rb b/Formula/jenkins-lts.rb deleted file mode 100644 index dcfbf6768ddfe..0000000000000 --- a/Formula/jenkins-lts.rb +++ /dev/null @@ -1,63 +0,0 @@ -class JenkinsLts < Formula - desc "Extendable open-source CI server" - homepage "https://jenkins.io/index.html#stable" - url "http://mirrors.jenkins.io/war-stable/2.235.1/jenkins.war" - sha256 "6375eb3a09bfde4c1fb3a7296985e225bfe2007153990a8b587e3f5f926f675d" - - bottle :unneeded - - depends_on "openjdk@11" - - def install - system "#{Formula["openjdk@11"].opt_bin}/jar", "xvf", "jenkins.war" - libexec.install "jenkins.war", "WEB-INF/lib/cli-#{version}.jar" - bin.write_jar_script libexec/"jenkins.war", "jenkins-lts", :java_version => "11" - bin.write_jar_script libexec/"cli-#{version}.jar", "jenkins-lts-cli", :java_version => "11" - end - - def caveats - <<~EOS - Note: When using launchctl the port will be 8080. - EOS - end - - plist_options :manual => "jenkins-lts" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{Formula["openjdk@11"].opt_bin}/java - -Dmail.smtp.starttls.enable=true - -jar - #{opt_libexec}/jenkins.war - --httpListenAddress=127.0.0.1 - --httpPort=8080 - - RunAtLoad - - - - EOS - end - - test do - ENV["JENKINS_HOME"] = testpath - ENV.prepend "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}" - - port = free_port - fork do - exec "#{bin}/jenkins-lts --httpPort=#{port}" - end - sleep 60 - - output = shell_output("curl localhost:#{port}/") - assert_match /Welcome to Jenkins!|Unlock Jenkins|Authentication required/, output - end -end diff --git a/Formula/jenkins.rb b/Formula/jenkins.rb deleted file mode 100644 index 8be78c8bad3cf..0000000000000 --- a/Formula/jenkins.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Jenkins < Formula - desc "Extendable open source continuous integration server" - homepage "https://jenkins.io/" - url "http://mirrors.jenkins.io/war/2.244/jenkins.war" - sha256 "91525d94e80f2cff29d5a43ebbf68a3e4e478810109b2947a79ea26a735a04b6" - license "MIT" - - head do - url "https://github.com/jenkinsci/jenkins.git" - depends_on "maven" => :build - end - - bottle :unneeded - - depends_on "openjdk@11" - - def install - if build.head? - system "mvn", "clean", "install", "-pl", "war", "-am", "-DskipTests" - else - system "#{Formula["openjdk@11"].opt_bin}/jar", "xvf", "jenkins.war" - end - libexec.install Dir["**/jenkins.war", "**/jenkins-cli.jar"] - bin.write_jar_script libexec/"jenkins.war", "jenkins", :java_version => "11" - bin.write_jar_script libexec/"jenkins-cli.jar", "jenkins-cli", :java_version => "11" - end - - def caveats - <<~EOS - Note: When using launchctl the port will be 8080. - EOS - end - - plist_options :manual => "jenkins" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{Formula["openjdk@11"].opt_bin}/java - -Dmail.smtp.starttls.enable=true - -jar - #{opt_libexec}/jenkins.war - --httpListenAddress=127.0.0.1 - --httpPort=8080 - - RunAtLoad - - - - EOS - end - - test do - ENV["JENKINS_HOME"] = testpath - ENV.prepend "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}" - - port = free_port - fork do - exec "#{bin}/jenkins --httpPort=#{port}" - end - sleep 60 - - output = shell_output("curl localhost:#{port}/") - assert_match /Welcome to Jenkins!|Unlock Jenkins|Authentication required/, output - end -end diff --git a/Formula/jenv.rb b/Formula/jenv.rb deleted file mode 100644 index 8ba60ac98ffd4..0000000000000 --- a/Formula/jenv.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Jenv < Formula - desc "Manage your Java environment" - homepage "https://www.jenv.be/" - url "https://github.com/jenv/jenv/archive/0.5.3.tar.gz" - sha256 "b30b1a4c2a213f01c89ac111df1be7e027a93512e34d14cdbdd263a0fbec5fff" - license "MIT" - - head "https://github.com/gcuisinier/jenv.git" - - bottle :unneeded - - def install - libexec.install Dir["*"] - bin.write_exec_script libexec/"bin/jenv" - end - - def caveats - <<~EOS - To activate jenv, add the following to your #{shell_profile}: - - export PATH="$HOME/.jenv/bin:$PATH" - eval "$(jenv init -)" - EOS - end - - test do - shell_output("eval \"$(#{bin}/jenv init -)\" && jenv versions") - end -end diff --git a/Formula/jerasure.rb b/Formula/jerasure.rb deleted file mode 100644 index 3d482ebbbb8c5..0000000000000 --- a/Formula/jerasure.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Jerasure < Formula - desc "Library in C that supports erasure coding in storage applications" - homepage "https://web.archive.org/web/20191024182742/jerasure.org/" - url "https://bitbucket.org/tsg-/jerasure/get/v2.0.0.tar.bz2" - sha256 "f736646c1844c4e50dfe41ebd63c7d7b30c6e66a4aa7d3beea244871b0e43b9d" - revision 1 - - bottle do - cellar :any - sha256 "9e653391281dc30c18579c7a6158744a025a9aab8861454bafe221ebfc652c0b" => :catalina - sha256 "1ae9b78eb70cf790c5a2e182508487746b3008ef9b0727b377cb3fd01faa8e29" => :mojave - sha256 "8e63bf431836395466d91ef947126a39c8193b274ab22156cf421d6958508607" => :high_sierra - sha256 "603646521f0255877f611df53e30ccbc071b07cba6e0f33025404332e9677ffa" => :sierra - sha256 "1db6ef4631512bf3b155d614588689b2bacc911178cedf828db8f810d9e18d43" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "gf-complete" - - 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/"jerasure_01", "2", "5", "3" - end -end diff --git a/Formula/jerm.rb b/Formula/jerm.rb deleted file mode 100644 index 8b300c4a1bd68..0000000000000 --- a/Formula/jerm.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Jerm < Formula - desc "Communication terminal through serial and TCP/IP interfaces" - homepage "https://web.archive.org/web/20160719014241/bsddiary.net/jerm/" - url "https://web.archive.org/web/20160719014241/bsddiary.net/jerm/jerm-8096.tar.gz" - mirror "https://dotsrc.dl.osdn.net/osdn/fablib/62057/jerm-8096.tar.gz" - version "0.8096" - sha256 "8a63e34a2c6a95a67110a7a39db401f7af75c5c142d86d3ba300a7b19cbcf0e9" - - bottle do - cellar :any_skip_relocation - sha256 "679f37e7f92c4eb64a0c94e11e8fc1bdc1b28f3bb7fbefafc38a955318d2f03d" => :catalina - sha256 "3141c6a52da59f5b0ee5cb514fc797b5979e4ddb4e71b36f56c133ff5311dce8" => :mojave - sha256 "dd2a0ae44a1aa671a62ccc7461e7550df48d656beeac35b7bc61c732350ece3b" => :high_sierra - sha256 "ee9a8a2e559bf9ab82ba413e8741759fed6d59cfe82a063c82b72b81a56cfe5e" => :sierra - sha256 "5c8409bfdeba7b55199659f4b82b8df9ec2ca8685435703bf1ddff29f9e027e5" => :el_capitan - sha256 "bce73bc0790565d58c129116833c2bf6dab677c95287036f4b3717a02792da12" => :yosemite - sha256 "e7a2ed29af497e459175ac4b7bf9d4e0b9a367c653ee3d7798b316a95d8e5cbe" => :mavericks - end - - def install - system "make", "all" - bin.install %w[jerm tiocdtr] - man1.install Dir["*.1"] - end -end diff --git a/Formula/jerryscript.rb b/Formula/jerryscript.rb deleted file mode 100644 index 44fcbcabbeb02..0000000000000 --- a/Formula/jerryscript.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Jerryscript < Formula - desc "Ultra-lightweight JavaScript engine for the Internet of Things" - homepage "https://jerryscript.net/" - url "https://github.com/jerryscript-project/jerryscript/archive/v2.3.0.tar.gz" - sha256 "75f039f2e7eb55e3ce5d48fd6f9c4e8ec643a94654070125a6d76a906218e0fa" - head "https://github.com/jerryscript-project/jerryscript.git" - - bottle do - cellar :any_skip_relocation - sha256 "30cce6deddb3cd879374dd6e80fc0a7ec7fcf32aa5b940713c60ee520b9b030a" => :catalina - sha256 "aecaf8cb9cc69ed2ac8694691f3f8b40b16fe72ce30f1a571244aa9cbe0c0591" => :mojave - sha256 "8c9890bfc739d8903d493316d3d1e258f6883d15115d247a8493aa259823cf47" => :high_sierra - end - - depends_on "cmake" => :build - - def install - args = std_cmake_args + %w[ - -DCMAKE_BUILD_TYPE=MinSizeRel - -DJERRY_CMDLINE=ON - ] - - mkdir "build" do - system "cmake", "..", *args - system "cmake", "--build", "." - system "make", "install" - end - end - - test do - (testpath/"test.js").write "print('Hello, Homebrew!');" - assert_equal "Hello, Homebrew!", shell_output("#{bin}/jerry test.js").strip - - (testpath/"test.c").write <<~EOS - #include - #include "jerryscript.h" - - int main (void) - { - const jerry_char_t script[] = "1 + 2"; - const jerry_length_t script_size = sizeof(script) - 1; - - jerry_init(JERRY_INIT_EMPTY); - jerry_value_t eval_ret = jerry_eval(script, script_size, JERRY_PARSE_NO_OPTS); - bool run_ok = !jerry_value_is_error(eval_ret); - if (run_ok) { - printf("1 + 2 = %d\\n", (int) jerry_get_number_value(eval_ret)); - } - - jerry_release_value(eval_ret); - jerry_cleanup(); - return (run_ok ? 0 : 1); - } - EOS - system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", - "-ljerry-core", "-ljerry-port-default", "-ljerry-ext" - assert_equal "1 + 2 = 3", shell_output("./test").strip, "JerryScript can add number" - end -end diff --git a/Formula/jetty-runner.rb b/Formula/jetty-runner.rb deleted file mode 100644 index 570eb6fd97be6..0000000000000 --- a/Formula/jetty-runner.rb +++ /dev/null @@ -1,40 +0,0 @@ -class JettyRunner < Formula - desc "Use Jetty without an installed distribution" - homepage "https://www.eclipse.org/jetty/" - url "https://search.maven.org/remotecontent?filepath=org/eclipse/jetty/jetty-runner/9.4.30.v20200611/jetty-runner-9.4.30.v20200611.jar" - version "9.4.30.v20200611" - sha256 "5322b5232f48a7cacd1bc77f958140df75c2d550156316ef10901a9415d5ac17" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"] - - (bin/"jetty-runner").write <<~EOS - #!/bin/bash - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - exec "${JAVA_HOME}/bin/java" -jar "#{libexec}/jetty-runner-#{version}.jar" "$@" - EOS - end - - test do - ENV.append "_JAVA_OPTIONS", "-Djava.io.tmpdir=#{testpath}" - touch "#{testpath}/test.war" - - port = free_port - pid = fork do - exec "#{bin}/jetty-runner --port #{port} test.war" - end - sleep 5 - - begin - output = shell_output("curl -I http://localhost:#{port}") - assert_match %r{HTTP/1\.1 200 OK}, output - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/jetty.rb b/Formula/jetty.rb deleted file mode 100644 index dd59d0ddcaa2a..0000000000000 --- a/Formula/jetty.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Jetty < Formula - desc "Java servlet engine and webserver" - homepage "https://www.eclipse.org/jetty/" - url "https://search.maven.org/remotecontent?filepath=org/eclipse/jetty/jetty-distribution/9.4.30.v20200611/jetty-distribution-9.4.30.v20200611.tar.gz" - version "9.4.30.v20200611" - sha256 "d300a0814417f21c3ffcf666db2e79e0701045e7d35cd827b5f5971f08c4a1fa" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"] - (libexec/"logs").mkpath - - bin.mkpath - Dir.glob("#{libexec}/bin/*.sh") do |f| - scriptname = File.basename(f, ".sh") - (bin/scriptname).write <<~EOS - #!/bin/bash - export JETTY_HOME='#{libexec}' - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - exec #{f} "$@" - EOS - chmod 0755, bin/scriptname - end - end - - test do - ENV["JETTY_BASE"] = testpath - cp_r Dir[libexec/"*"], testpath - pid = fork { exec bin/"jetty", "start" } - sleep 5 # grace time for server start - begin - assert_match /Jetty running pid=\d+/, shell_output("#{bin}/jetty check") - assert_equal "Stopping Jetty: OK\n", shell_output("#{bin}/jetty stop") - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/jflex.rb b/Formula/jflex.rb deleted file mode 100644 index 87e301b67ddb4..0000000000000 --- a/Formula/jflex.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Jflex < Formula - desc "Lexical analyzer generator for Java, written in Java" - homepage "https://jflex.de/" - url "https://jflex.de/release/jflex-1.8.2.tar.gz" - sha256 "a1e0d25e341d01de6b93ec32b45562905e69d06598113934b74f76b1be7927ab" - - bottle :unneeded - - depends_on "openjdk" - - def install - pkgshare.install "examples" - libexec.install "lib/jflex-full-#{version}.jar" => "jflex-#{version}.jar" - (bin/"jflex").write <<~EOS - #!/bin/bash - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - exec "${JAVA_HOME}/bin/java" -jar "#{libexec}/jflex-#{version}.jar" "$@" - EOS - end - - test do - system bin/"jflex", "-d", testpath, pkgshare/"examples/cup-java/src/main/jflex/java.flex" - assert_match /public static void/, (testpath/"Scanner.java").read - end -end diff --git a/Formula/jfrog-cli.rb b/Formula/jfrog-cli.rb deleted file mode 100644 index 31368d6da0ed2..0000000000000 --- a/Formula/jfrog-cli.rb +++ /dev/null @@ -1,28 +0,0 @@ -class JfrogCli < Formula - desc "Command-line interface for Jfrog Artifactory and Bintray" - homepage "https://github.com/jfrog/jfrog-cli" - url "https://github.com/jfrog/jfrog-cli/archive/1.37.1.tar.gz" - sha256 "8f40d56a20a26ad5f59e1b355c22b726ffeacc2dfceaa2b808e7258ff68e41df" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "bfabac91df7c7ef240471c9abbbf64fdbb91a39ca7076fdbf0db5f39a242d08f" => :catalina - sha256 "075d434d00e81a8baa9e531757f37ab37923ab0173e32baab3050ed2f8eebca2" => :mojave - sha256 "c266c9d63c404e8fc550442eb24063a26d568aba27c8e58a1ac1df3c48a12a78" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w -extldflags '-static'", "-trimpath", "-o", bin/"jfrog" - prefix.install_metafiles - system "go", "generate", "./completion/shells/..." - bash_completion.install "completion/shells/bash/jfrog" - zsh_completion.install "completion/shells/zsh/jfrog" => "_jfrog" - end - - test do - assert_match version.to_s, shell_output("#{bin}/jfrog -v") - end -end diff --git a/Formula/jhead.rb b/Formula/jhead.rb deleted file mode 100644 index b698ec8f453d9..0000000000000 --- a/Formula/jhead.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Jhead < Formula - desc "Extract Digicam setting info from EXIF JPEG headers" - homepage "https://www.sentex.net/~mwandel/jhead/" - url "https://www.sentex.net/~mwandel/jhead/jhead-3.04.tar.gz" - sha256 "ef89bbcf4f6c25ed88088cf242a47a6aedfff4f08cc7dc205bf3e2c0f10a03c9" - - bottle do - cellar :any_skip_relocation - sha256 "1d7d67316306e727fd5b5df4949eb66039462a6887276130a380fa81f17453f7" => :catalina - sha256 "bfc94a4d1c62e2df62ef63298c0ecff674a2cf5cb5d58e75b03dfa947485df6e" => :mojave - sha256 "09cf431f5e58b7c07e0cab702c1f38c3c9ce10ca22c749e496b4947207157952" => :high_sierra - end - - # Patch to provide a proper install target to the Makefile. The patch has - # been submitted upstream through email. We need to carry this patch until - # upstream decides to incorporate it. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e37226eb9575636a728461fdc469c6706d81f564/jhead/3.04.patch" - sha256 "2812e109fff8c0215faaa5a443d4b0aaa2b3a913aaac6b42c106903f1d62381b" - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - cp test_fixtures("test.jpg"), testpath - system "#{bin}/jhead", "-autorot", "test.jpg" - end -end diff --git a/Formula/jhiccup.rb b/Formula/jhiccup.rb deleted file mode 100644 index bd7e19da4d5ab..0000000000000 --- a/Formula/jhiccup.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Jhiccup < Formula - desc "Measure pauses and stalls of an app's Java runtime platform" - homepage "https://www.azul.com/jhiccup/" - url "https://www.azul.com/files/jHiccup-2.0.10-dist.zip" - sha256 "7bb1145d211d140b4f81184df7eb9cea90f56720ad7504fac43c0c398f38a7d8" - - bottle :unneeded - - def install - bin.install "jHiccup", "jHiccupLogProcessor" - - # Simple script to create and open a new plotter spreadsheet - (bin+"jHiccupPlotter").write <<~EOS - #!/bin/sh - TMPFILE="/tmp/jHiccupPlotter.$$.xls" - cp "#{prefix}/jHiccupPlotter.xls" $TMPFILE - open $TMPFILE - EOS - - prefix.install "jHiccup.jar" - prefix.install "jHiccupPlotter.xls" - inreplace "#{bin}/jHiccup" do |s| - s.gsub! /^JHICCUP_JAR_FILE=.*$/, - "JHICCUP_JAR_FILE=#{prefix}/jHiccup.jar" - end - end - - test do - assert_match "CSV", shell_output("#{bin}/jHiccup -h", 255) - end -end diff --git a/Formula/jhipster.rb b/Formula/jhipster.rb deleted file mode 100644 index fb4fd9930cd10..0000000000000 --- a/Formula/jhipster.rb +++ /dev/null @@ -1,29 +0,0 @@ -require "language/node" - -class Jhipster < Formula - desc "Generate, develop and deploy Spring Boot + Angular/React applications" - homepage "https://www.jhipster.tech/" - url "https://registry.npmjs.org/generator-jhipster/-/generator-jhipster-6.10.1.tgz" - sha256 "65304b03bb52f8a7501e4074475b386c8c6e57692e30c878f49335e1d1dd9afd" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "fdcadb5944ca4be17d94e7d1fbefea22aa7957458e3224e9ad72366004aac4f7" => :catalina - sha256 "16cd02713525c612bec9231ae73a05a9390c6f520710847e14d00043ca5c0761" => :mojave - sha256 "5631dcc3e065ad2e7b3df58534a89175688358c5482b7133f5410dc7ea11c353" => :high_sierra - end - - depends_on "node" - depends_on "openjdk" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files libexec/"bin", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - end - - test do - assert_match "execution is complete", shell_output("#{bin}/jhipster info") - end -end diff --git a/Formula/jid.rb b/Formula/jid.rb deleted file mode 100644 index 89a4c63a62bd0..0000000000000 --- a/Formula/jid.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Jid < Formula - desc "Json incremental digger" - homepage "https://github.com/simeji/jid" - url "https://github.com/simeji/jid/archive/v0.7.6.tar.gz" - sha256 "0912050b3be3760804afaf7ecd6b42bfe79e7160066587fbc0afa5324b03fb48" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "0b45fe9c59facbc6b2bbacf4b52927934b09d6e2050ad3a5b5a32434a4bd4751" => :catalina - sha256 "2980bf16f4376b7bdfc27e0e6bbe45d9e1f8aca8a143f6f7b6fd939eb6892617" => :mojave - sha256 "d429ac5400fd67dcee12e5fe962e84f535858c7ecb3235ee01f8a54dc44e7a9e" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"jid", "cmd/jid/jid.go" - prefix.install_metafiles - end - - test do - assert_match "jid version v#{version}", shell_output("#{bin}/jid --version") - end -end diff --git a/Formula/jigdo.rb b/Formula/jigdo.rb deleted file mode 100644 index 78654254fa6a8..0000000000000 --- a/Formula/jigdo.rb +++ /dev/null @@ -1,41 +0,0 @@ -# Jigdo is dead upstream. It consists of two components: Jigdo, a GTK+ using GUI, -# which is LONG dead and completely unfunctional, and jigdo-lite, a command-line -# tool that has been on life support and still works. Only build the CLI tool. -class Jigdo < Formula - desc "Tool to distribute very large files over the internet" - homepage "http://atterer.org/jigdo/" - url "http://atterer.org/sites/atterer/files/2009-08/jigdo/jigdo-0.7.3.tar.bz2" - sha256 "875c069abad67ce67d032a9479228acdb37c8162236c0e768369505f264827f0" - revision 6 - - bottle do - sha256 "bcde67883304312dcb904e44b17928a16ec9cb1c8a469e37b2832104178eb7b1" => :catalina - sha256 "eb44dc4044f003304fa8dcbf29a607b79e82e62ed1f106fb2172d1af30c139a0" => :mojave - sha256 "dd14191d456b799e759d7adad19a1ca25a1791f63188d60db48460f76d4650fd" => :high_sierra - sha256 "2a08598075af594b3d31b957f6fdbb6f86d90d3ad542545eaa5ffc6417085600" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "berkeley-db" - depends_on "wget" - - # Use MacPorts patch for compilation on 10.9; this software is no longer developed. - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e101570/jigdo/patch-src-compat.hh.diff" - sha256 "a21aa8bcc5a03a6daf47e0ab4e04f16e611e787a7ada7a6a87c8def738585646" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-x11", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make" - system "make", "install" - end - - test do - assert_match "version #{version}", shell_output("#{bin}/jigdo-file -v") - end -end diff --git a/Formula/jing-trang.rb b/Formula/jing-trang.rb deleted file mode 100644 index f86869e1e71d4..0000000000000 --- a/Formula/jing-trang.rb +++ /dev/null @@ -1,66 +0,0 @@ -class JingTrang < Formula - desc "Schema validation and conversion based on RELAX NG" - homepage "http://www.thaiopensource.com/relaxng/" - url "https://github.com/relaxng/jing-trang.git", - :tag => "V20181222", - :revision => "a3ec4cd650f48ec00189578f314fbe94893cd92d" - - bottle do - cellar :any_skip_relocation - sha256 "beca56be27f7e897bc7f8ede1f7b1a3e07decb0f247bbebd5612c95b6814ef13" => :catalina - sha256 "041409b5ddb20a932c66d390b06fde4d25f89373f1d386b28e4e592686cc3ed9" => :mojave - sha256 "c73af2f82d10dd5a7e11818c41ac687b52f4c6128157323e211ab499dc22eaa5" => :high_sierra - sha256 "da34fcbed6b7c8700f3384a83224c20bb47cff05c6ff0ff2a7cdaaa3b89792c4" => :sierra - end - - depends_on "ant" => :build - depends_on :java => "1.8" - - def install - system "./ant", "jar" - libexec.install Dir["*"] - bin.write_jar_script libexec/"build/jing.jar", "jing" - bin.write_jar_script libexec/"build/trang.jar", "trang" - end - - test do - (testpath/"test.rnc").write <<~EOS - 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 }? - } - EOS - (testpath/"test.xml").write <<~EOS - - - - - Technology - Technology - Tecnología - ٹیکنالوجی - News about computers, the internet, electronics etc. - - - Science - Science - Ciencia - سائنس - Systematic enterprise - - - - EOS - - system bin/"jing", "-c", "test.rnc", "test.xml" - system bin/"trang", "-I", "rnc", "-O", "rng", "test.rnc", "test.rng" - end -end diff --git a/Formula/jinja2-cli.rb b/Formula/jinja2-cli.rb deleted file mode 100644 index f859d45cde59a..0000000000000 --- a/Formula/jinja2-cli.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Jinja2Cli < Formula - include Language::Python::Virtualenv - - desc "CLI for the Jinja2 templating language" - homepage "https://github.com/mattrobenolt/jinja2-cli" - url "https://files.pythonhosted.org/packages/23/67/6f05f5f8a9fc108c58e4eac9b9b7876b400985d33149fe2faa87a9ca502b/jinja2-cli-0.7.0.tar.gz" - sha256 "9ccd8d530dad5d031230afd968cf54637b49842a13ececa6e17c2f67f6e9336e" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "31848f994850d25890342ec76c1259e6b19738105cf7cb8d58eae1f3abb29252" => :catalina - sha256 "c1f403a72668b4ffdc5da4e02d6d35cdb712a3b0cd8cf2b91a844b34e5b21370" => :mojave - sha256 "972f68142054b8201968d19962ad237b29f9ab2d15b1f5b7b27d5798685db797" => :high_sierra - end - - depends_on "python@3.8" - - resource "jinja2" do - url "https://files.pythonhosted.org/packages/93/ea/d884a06f8c7f9b7afbc8138b762e80479fb17aedbbe2b06515a12de9378d/Jinja2-2.10.1.tar.gz" - sha256 "065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match version.to_s, shell_output("script -q /dev/null #{bin}/jinja2 --version") - expected_result = <<~EOS - The Beatles: - - Ringo Starr - - George Harrison - - Paul McCartney - - John Lennon - EOS - template_file = testpath/"my-template.tmpl" - template_file.write <<~EOS - {{ band.name }}: - {% for member in band.members -%} - - {{ member.first_name }} {{ member.last_name }} - {% endfor -%} - EOS - template_variables_file = testpath/"my-template-variables.json" - template_variables_file.write <<~EOS - { - "band": { - "name": "The Beatles", - "members": [ - {"first_name": "Ringo", "last_name": "Starr"}, - {"first_name": "George", "last_name": "Harrison"}, - {"first_name": "Paul", "last_name": "McCartney"}, - {"first_name": "John", "last_name": "Lennon"} - ] - } - } - EOS - output = shell_output("#{bin}/jinja2 #{template_file} #{template_variables_file}") - assert_equal output, expected_result - end -end diff --git a/Formula/jlog.rb b/Formula/jlog.rb deleted file mode 100644 index 6c00449ff7959..0000000000000 --- a/Formula/jlog.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Jlog < Formula - desc "Pure C message queue with subscribers and publishers for logs" - homepage "https://labs.omniti.com/labs/jlog" - url "https://github.com/omniti-labs/jlog/archive/2.5.2.tar.gz" - sha256 "f649e289bcecd72341713fc5c0562037433aabaad47831a1249bd4f78bb24e58" - head "https://github.com/omniti-labs/jlog.git" - - bottle do - cellar :any - sha256 "2db582029e1e911ae614e5b3ecd91269c68c1826da086a82c0d53a9b92ae5a0b" => :catalina - sha256 "3703ad59209dd6753353d32a02c83a17f71103c524eb0080ca0472b71a1c2971" => :mojave - sha256 "82fbc6c978b3bc35238f584fa161362cc5f77b5df23e8ff22ecebeda57e82a58" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "autoconf" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"jlogtest.c").write <<~EOS - #include - #include - int main() { - jlog_ctx *ctx; - const char *path = "#{testpath}/jlogexample"; - int rv; - - // First, ensure that the jlog is created - ctx = jlog_new(path); - if (jlog_ctx_init(ctx) != 0) { - if(jlog_ctx_err(ctx) != JLOG_ERR_CREATE_EXISTS) { - fprintf(stderr, "jlog_ctx_init failed: %d %s\\n", jlog_ctx_err(ctx), jlog_ctx_err_string(ctx)); - exit(1); - } - // Make sure it knows about our subscriber(s) - jlog_ctx_add_subscriber(ctx, "one", JLOG_BEGIN); - jlog_ctx_add_subscriber(ctx, "two", JLOG_BEGIN); - } - - // Now re-open for writing - jlog_ctx_close(ctx); - ctx = jlog_new(path); - if (jlog_ctx_open_writer(ctx) != 0) { - fprintf(stderr, "jlog_ctx_open_writer failed: %d %s\\n", jlog_ctx_err(ctx), jlog_ctx_err_string(ctx)); - exit(0); - } - - // Send in some data - rv = jlog_ctx_write(ctx, "hello\\n", strlen("hello\\n")); - if (rv != 0) { - fprintf(stderr, "jlog_ctx_write_message failed: %d %s\\n", jlog_ctx_err(ctx), jlog_ctx_err_string(ctx)); - } - jlog_ctx_close(ctx); - } - EOS - system ENV.cc, "jlogtest.c", "-I#{include}", "-L#{lib}", "-ljlog", "-o", "jlogtest" - system testpath/"jlogtest" - end -end diff --git a/Formula/jmeter.rb b/Formula/jmeter.rb deleted file mode 100644 index c64cdd23dd61b..0000000000000 --- a/Formula/jmeter.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Jmeter < Formula - desc "Load testing and performance measurement application" - homepage "https://jmeter.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=jmeter/binaries/apache-jmeter-5.3.tgz" - mirror "https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.3.tgz" - sha256 "d0611b46268c4e24220fed56e76d770077713ff863665c271ed6521046f2f0d0" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e3f6544d4e7485525fa4cf8fd377f00ce7f7350fdbeeb1cfaba3b9539a6c1a88" => :catalina - sha256 "e3f6544d4e7485525fa4cf8fd377f00ce7f7350fdbeeb1cfaba3b9539a6c1a88" => :mojave - sha256 "e3f6544d4e7485525fa4cf8fd377f00ce7f7350fdbeeb1cfaba3b9539a6c1a88" => :high_sierra - end - - resource "jmeter-plugins-manager" do - url "https://search.maven.org/remotecontent?filepath=kg/apc/jmeter-plugins-manager/1.3/jmeter-plugins-manager-1.3.jar" - sha256 "482b8a9cd82a69ef1b633fc4235bfa9bee96894f663e5085df7061410d6ab99a" - end - - def install - # Remove windows files - rm_f Dir["bin/*.bat"] - prefix.install_metafiles - libexec.install Dir["*"] - bin.write_exec_script libexec/"bin/jmeter" - - resource("jmeter-plugins-manager").stage do - (libexec/"lib/ext").install Dir["*"] - end - end - - test do - system "#{bin}/jmeter", "--version" - end -end diff --git a/Formula/jmxterm.rb b/Formula/jmxterm.rb deleted file mode 100644 index 3721a6952d5e0..0000000000000 --- a/Formula/jmxterm.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Jmxterm < Formula - desc "Open source, command-line based interactive JMX client" - homepage "https://docs.cyclopsgroup.org/jmxterm" - url "https://github.com/jiaqi/jmxterm/releases/download/v1.0.1/jmxterm-1.0.1-uber.jar" - sha256 "76e0dae56b410c77724b561897e9073f088bd0b6158d668147d466debac6e9b0" - license "Apache-2.0" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - libexec.install "jmxterm-#{version}-uber.jar" - bin.write_jar_script libexec/"jmxterm-#{version}-uber.jar", "jmxterm", "", :java_version => "1.8" - end - - test do - assert_match(/"software\.name".=."jmxterm";/, shell_output("echo about | #{bin}/jmxterm -n")) - end -end diff --git a/Formula/jmxtrans.rb b/Formula/jmxtrans.rb deleted file mode 100644 index e0a0930b81f1d..0000000000000 --- a/Formula/jmxtrans.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Jmxtrans < Formula - desc "Tool to connect to JVMs and query their attributes" - homepage "https://github.com/jmxtrans/jmxtrans" - url "https://github.com/jmxtrans/jmxtrans/archive/jmxtrans-parent-271.tar.gz" - sha256 "4aee400641eaeee7f33e1253043b1e644f8a9ec18f95ddc911ff8d35e2ca6530" - license "MIT" - version_scheme 1 - - bottle do - cellar :any_skip_relocation - sha256 "775e5443bc4570f5af09ff033609193c69c05d0ab80150cd67811dd1cc3a7e56" => :catalina - sha256 "8ef8263d13b6dc9d913cf2c13f4c75ecc63c20dab9c7d977d1ecfa0e86977eb1" => :mojave - sha256 "97546c9316f94cfa738e4bba4363adaa0b3838e3f8bc4aed6b8ae4822b57a182" => :high_sierra - end - - depends_on "maven" => :build - depends_on :java => "1.8" - - def install - cmd = Language::Java.java_home_cmd("1.8") - ENV["JAVA_HOME"] = Utils.safe_popen_read(cmd).chomp - - system "mvn", "package", "-DskipTests=true", - "-Dmaven.javadoc.skip=true", - "-Dcobertura.skip=true", - "-Duser.home=#{buildpath}" - - cd "jmxtrans" do - # Point JAR_FILE into Cellar where we've installed the jar file - vers = version.to_s.split("-").last - inreplace "jmxtrans.sh", "$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )/../lib\" "\ - ">/dev/null && pwd )/jmxtrans-all.jar", - libexec/"target/jmxtrans-#{vers}-all.jar" - - # Exec java to avoid forking the server into a new process - inreplace "jmxtrans.sh", "${JAVA} -server", "exec ${JAVA} -server" - - chmod 0755, "jmxtrans.sh" - libexec.install %w[jmxtrans.sh target] - pkgshare.install %w[bin example.json src tools vagrant] - doc.install Dir["doc/*"] - end - - (bin/"jmxtrans").write_env_script libexec/"jmxtrans.sh", Language::Java.java_home_env("1.8") - end - - test do - jmx_port = free_port - fork do - ENV["JMX_PORT"] = jmx_port.to_s - exec bin/"jmxtrans", pkgshare/"example.json" - end - sleep 2 - - system "nc", "-z", "localhost", jmx_port - end -end diff --git a/Formula/jnethack.rb b/Formula/jnethack.rb deleted file mode 100644 index ba74c956889dc..0000000000000 --- a/Formula/jnethack.rb +++ /dev/null @@ -1,87 +0,0 @@ -require "etc" - -# Nethack the way God intended it to be played: from a terminal. -# This formula is based on Nethack formula. - -class Jnethack < Formula - desc "Japanese localization of Nethack" - homepage "https://jnethack.osdn.jp/" - url "https://downloads.sourceforge.net/project/nethack/nethack/3.4.3/nethack-343-src.tgz" - version "3.4.3-0.11" - sha256 "bb39c3d2a9ee2df4a0c8fdde708fbc63740853a7608d2f4c560b488124866fe4" - - bottle do - sha256 "22c77a0b903452c595e324b04dc5cf09d37fa56af922fc438e8aad3e4899082d" => :catalina - sha256 "54890df9ae6c932ed1ec36deb7892e5ddd28857e3740dd0c36f9d20f231caf3d" => :mojave - sha256 "7422717258f234810d99d330df0a0e99b90da7328db9324a92d39a63869e008b" => :high_sierra - sha256 "89c2fed343614d39084a8c59908032fe929e78c1572e92f50b9eafa4aca3860d" => :sierra - sha256 "c11837932635f89762360ad449e189c44e8213cb74f981ccb7908671a0e3ad4b" => :el_capitan - sha256 "f0c7c0c5bbf5c7d5b2d733fd76d49f31039b15c982a7ef7530444f734a41ec7c" => :yosemite - end - - # needs X11 locale for i18n - depends_on :x11 - - # Don't remove save folder - skip_clean "libexec/save" - - patch do - # Canonical: https://osdn.net/dl/jnethack/jnethack-3.4.3-0.11.diff.gz - url "https://dotsrc.dl.osdn.net/osdn/jnethack/58545/jnethack-3.4.3-0.11.diff.gz" - sha256 "fbc071f6b33c53d89e8f13319ced952e605499a21d2086077296c631caff7389" - end - - # Patch from MacPorts' jnethack portfile - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/e9653f1/jnethack/3.4.3-0.11.patch" - sha256 "6340de3784ee7b4d35fcf715ebbf08ec8e20214b0c2ae53f9c717afdae467c46" - end - - def install - # Build everything in-order; no multi builds. - ENV.deparallelize - - ENV["HOMEBREW_CFLAGS"] = ENV.cflags - - # 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 - system "make" - - %w[perm logfile].each do |f| - touch f - libexec.install f - end - - # Stage the data - libexec.install %w[jhelp jhh jcmdhelp jhistory jopthelp jwizhelp dungeon license data - jdata.base joracles options jrumors.tru jrumors.fal quest.dat jquest.txt] - libexec.install Dir["*.lev"] - end - - # Make the game - ENV.append_to_cflags "-I../include" - cd "src" do - system "make" - end - - bin.install "src/jnethack" - (libexec+"save").mkpath - end -end diff --git a/Formula/jnettop.rb b/Formula/jnettop.rb deleted file mode 100644 index 947884b6a7b32..0000000000000 --- a/Formula/jnettop.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Jnettop < Formula - desc "View hosts/ports taking up the most network traffic" - homepage "https://web.archive.org/web/20161127214942/jnettop.kubs.info/wiki/" - url "https://downloads.sourceforge.net/project/jnettop/jnettop/0.13/jnettop-0.13.0.tar.gz" - sha256 "a005d6fa775a85ff9ee91386e25505d8bdd93bc65033f1928327c98f5e099a62" - revision 2 - - bottle do - cellar :any - rebuild 1 - sha256 "d519f88b031322183f9cfd7303f9d139aecd807037f5d5043997acb2d3324cab" => :catalina - sha256 "902b1e9e69c982a84e38b09e2f0b15bc84af94028fb32138fd769efffbc6ddbc" => :mojave - sha256 "944957cbac7c457d3c4ee130e8ac457ebf0f2387c7231fa2b85ead897cc77e8a" => :high_sierra - sha256 "190334e1019dc9957918164f3fe920607f735edcba3a24296cc634fdd4a70e54" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--man=#{man}" - system "make", "install" - end - - test do - system "#{bin}/jnettop", "-h" - end -end diff --git a/Formula/jo.rb b/Formula/jo.rb deleted file mode 100644 index f621a41741057..0000000000000 --- a/Formula/jo.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Jo < Formula - desc "JSON output from a shell" - homepage "https://github.com/jpmens/jo" - url "https://github.com/jpmens/jo/releases/download/1.3/jo-1.3.tar.gz" - sha256 "de25c95671a3b392c6bcaba0b15d48eb8e2435508008c29477982d2d2f5ade64" - - bottle do - cellar :any_skip_relocation - sha256 "7bbe7df2da77374b644e9909da0bbd356a8e8b2bbc49addf5593c2ee783c69e6" => :catalina - sha256 "3003ca4f6f3650f6f67be5e4debadfb50d9e55ba41f792b9c37eaeb78a6241ab" => :mojave - sha256 "ca189874bb16f024bc804fb167da2a8cfd0839fddd415aae964ee27ac112ba43" => :high_sierra - end - - head do - url "https://github.com/jpmens/jo.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "autoreconf", "-i" if build.head? - - system "./configure", "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal %Q({"success":true,"result":"pass"}\n), pipe_output("#{bin}/jo success=true result=pass") - end -end diff --git a/Formula/jobber.rb b/Formula/jobber.rb deleted file mode 100644 index 931ef05b7857f..0000000000000 --- a/Formula/jobber.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Jobber < Formula - desc "Alternative to cron, with better status-reporting and error-handling" - homepage "https://dshearer.github.io/jobber/" - url "https://github.com/dshearer/jobber/archive/v1.4.4.tar.gz" - sha256 "fd88a217a413c5218316664fab5510ace941f4fdb68dcb5428385ff09c68dcc2" - head "https://github.com/dshearer/jobber.git" - - bottle do - sha256 "f34fec60aef5e18cfc6f5bb8f1e0dbb00a866a01e3e0041d6c8e055ee7c4e27e" => :catalina - sha256 "6bb3016d2f4200636cd51c237d04039b8bbf285d473acb37589e45fc602caf30" => :mojave - sha256 "1fafbf17e64ac28355dd28758441f97fbe8b7e633bde0cf48a744918c281f8da" => :high_sierra - end - - depends_on "go" => :build - - def install - system "./configure", "--prefix=#{prefix}", "--libexecdir=#{libexec}", "--sysconfdir=#{etc}", - "--localstatedir=#{var}" - system "make", "install" - end - - plist_options :startup => true - - def plist - <<~EOS - - - - - Label - #{plist_name} - Program - #{libexec}/jobbermaster - RunAtLoad - - KeepAlive - - StandardOutPath - #{var}/log/jobber.log - StandardErrorPath - #{var}/log/jobber.log - - - EOS - end - - test do - (testpath/".jobber").write <<~EOS - version: 1.4 - jobs: - Test: - cmd: 'echo "Hi!" > "#{testpath}/output"' - time: '*' - EOS - - fork do - exec libexec/"jobberrunner", "#{testpath}/.jobber" - end - sleep 3 - - assert_match "Hi!", (testpath/"output").read - end -end diff --git a/Formula/joe.rb b/Formula/joe.rb deleted file mode 100644 index 461b17ba039d7..0000000000000 --- a/Formula/joe.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Joe < Formula - desc "Joe's Own Editor (JOE)" - homepage "https://joe-editor.sourceforge.io/" - url "https://downloads.sourceforge.net/project/joe-editor/JOE%20sources/joe-4.6/joe-4.6.tar.gz" - sha256 "495a0a61f26404070fe8a719d80406dc7f337623788e445b92a9f6de512ab9de" - license "GPL-2.0" - - bottle do - sha256 "71f2361108e6227cffff406825e8b96e6ce85a4e1a688ecf397eb00ca3d25357" => :catalina - sha256 "aa448106d8769cf8d1b9adc8154dc420c94dbdc434be45b27e6a8a3268d2740b" => :mojave - sha256 "02c1d1372565747bc21abe3b28ea7b3f2461068041e2d67037a9c1cbce12779d" => :high_sierra - sha256 "f97df02a316a9e137e3391f42ff1118f67cd051008ef92c030fe54b5948a29bb" => :sierra - sha256 "1d02a0b1f7df9846b0472bb3a5ea69aece88007fed4b32843318caa41cae3f9d" => :el_capitan - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "Joe's Own Editor v#{version}", shell_output("TERM=tty #{bin}/joe -help") - end -end diff --git a/Formula/john-jumbo.rb b/Formula/john-jumbo.rb deleted file mode 100644 index b43f8ff5e74b5..0000000000000 --- a/Formula/john-jumbo.rb +++ /dev/null @@ -1,73 +0,0 @@ -class JohnJumbo < Formula - desc "Enhanced version of john, a UNIX password cracker" - homepage "https://www.openwall.com/john/" - url "https://openwall.com/john/k/john-1.9.0-jumbo-1.tar.xz" - version "1.9.0" - sha256 "f5d123f82983c53d8cc598e174394b074be7a77756f5fb5ed8515918c81e7f3b" - - bottle do - rebuild 1 - sha256 "e7a19321df5d635dab8f7049d96ee032c7536f1f2bf41b2b1d032e1665bfd127" => :catalina - sha256 "51f7b265d83da1db5c2a34e77d2f376e1fa7730ecde5c9cfcda181ccab084f8e" => :mojave - sha256 "0719a701b7280ccd2bd1e2f834ffb6518d183f80c5df2afcb956f374e6d032c3" => :high_sierra - sha256 "6349fe1f1c0524382ab6ed36a4ceeb795c67cacb310688e2759cf33efab82609" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gmp" - depends_on "openssl@1.1" - - conflicts_with "john", :because => "both install the same binaries" - - # https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/doc/INSTALL#L133-L143 - fails_with :gcc do - cause "Upstream have a hacky workaround for supporting gcc that we can't use." - end - - # Fixed setup `-mno-sse4.1` for some machines. - # See details for example from here: https://github.com/magnumripper/JohnTheRipper/pull/4100 - patch do - url "https://github.com/magnumripper/JohnTheRipper/commit/a537bbca37c1c2452ffcfccea6d2366447ec05c2.diff?full_index=1" - sha256 "c246b7a4b06436810dee66d324fa550c5f6bc2dabcb09a2f5f7836c6633a549a" - end - - # Fixed setup of openssl@1.1 over series of patches - # See details for example from here: https://github.com/magnumripper/JohnTheRipper/pull/4101 - patch do - url "https://github.com/magnumripper/JohnTheRipper/pull/4101.diff?full_index=1" - sha256 "c21ba72b1267752c8fe70b6f48baf6a36bf4f4796a58e5b2f5998a3a42f96126" - end - - def install - ENV.append "CFLAGS", "-DJOHN_SYSTEMWIDE=1" - ENV.append "CFLAGS", "-DJOHN_SYSTEMWIDE_EXEC='\"#{share}/john\"'" - ENV.append "CFLAGS", "-DJOHN_SYSTEMWIDE_HOME='\"#{share}/john\"'" - - ENV.append "CFLAGS", "-mno-sse4.1" unless MacOS.version.requires_sse4? - - ENV["OPENSSL_LIBS"] = "-L#{Formula["openssl@1.1"].opt_lib}" - ENV["OPENSSL_CFLAGS"] = "-I#{Formula["openssl@1.1"].opt_include}" - - cd "src" do - system "./configure", "--disable-native-tests" - system "make", "clean" - system "make" - end - - doc.install Dir["doc/*"] - - # Only symlink the main binary into bin - (share/"john").install Dir["run/*"] - bin.install_symlink share/"john/john" - - bash_completion.install share/"john/john.bash_completion" => "john.bash" - zsh_completion.install share/"john/john.zsh_completion" => "_john" - end - - test do - touch "john2.pot" - (testpath/"test").write "dave:#{`printf secret | /usr/bin/openssl md5`}" - assert_match(/secret/, shell_output("#{bin}/john --pot=#{testpath}/john2.pot --format=raw-md5 test")) - assert_match(/secret/, (testpath/"john2.pot").read) - end -end diff --git a/Formula/john.rb b/Formula/john.rb deleted file mode 100644 index 52284eb16d70e..0000000000000 --- a/Formula/john.rb +++ /dev/null @@ -1,48 +0,0 @@ -class John < Formula - desc "Featureful UNIX password cracker" - homepage "https://www.openwall.com/john/" - url "https://www.openwall.com/john/k/john-1.9.0.tar.xz" - sha256 "0b266adcfef8c11eed690187e71494baea539efbd632fe221181063ba09508df" - revision 1 - - bottle do - sha256 "bc61b94c66cd5e711cfb069f2f7dc8f448d717cd1179cbe2fed954f0786a0023" => :catalina - sha256 "6bc29b809b272d370240703ab20715a7e57c651cdcf27b918a49cc9232c386eb" => :mojave - sha256 "96fad56c615dad3f07b2c4babf9e03a0dce6533e3e4cc11e7c37e99ef9379253" => :high_sierra - end - - conflicts_with "john-jumbo", :because => "both install the same binaries" - - # Backport of official patch from jumbo fork (https://www.openwall.com/lists/john-users/2016/01/04/1) - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/cd039571f9a3e9ecabbe68bdfb443e3abaae6270/john/1.9.0.patch" - sha256 "3137169c7f3c25bf58a4f4db46ddf250e49737fc2816a72264dfe87a7f89b6a1" - end - - def install - inreplace "src/params.h" do |s| - s.gsub! /#define JOHN_SYSTEMWIDE[[:space:]]*0/, "#define JOHN_SYSTEMWIDE 1" - s.gsub! /#define JOHN_SYSTEMWIDE_EXEC.*/, "#define JOHN_SYSTEMWIDE_EXEC \"#{pkgshare}\"" - s.gsub! /#define JOHN_SYSTEMWIDE_HOME.*/, "#define JOHN_SYSTEMWIDE_HOME \"#{pkgshare}\"" - end - - ENV.deparallelize - - system "make", "-C", "src", "clean", "CC=#{ENV.cc}", "macosx-x86-64" - - prefix.install "doc/README" - doc.install Dir["doc/*"] - %w[john unafs unique unshadow].each do |b| - bin.install "run/#{b}" - end - pkgshare.install Dir["run/*"] - end - - test do - (testpath/"passwd").write <<~EOS - root:$1$brew$dOoH2.7QsPufgT8T.pihw/:0:0:System Administrator:/var/root:/bin/sh - EOS - system "john", "--wordlist=#{pkgshare}/password.lst", "passwd" - assert_match /snoopy/, shell_output("john --show passwd") - end -end diff --git a/Formula/jolie.rb b/Formula/jolie.rb deleted file mode 100644 index b88552e7e64b6..0000000000000 --- a/Formula/jolie.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Jolie < Formula - desc "The Jolie Language Interpreter" - homepage "https://www.jolie-lang.org/" - url "https://github.com/jolie/jolie/releases/download/v1.9.1/jolie-1.9.1.jar" - sha256 "e4b43f2b247102f49c05fb48d64ca294141b3488de38bd089c99653ca83c644d" - license "LGPL-2.1" - - bottle do - cellar :any_skip_relocation - sha256 "f8aecb9822259d55665704df3939d474d4c86de04979d4f8cf244a4cf2ba3150" => :catalina - sha256 "f8aecb9822259d55665704df3939d474d4c86de04979d4f8cf244a4cf2ba3150" => :mojave - sha256 "f8aecb9822259d55665704df3939d474d4c86de04979d4f8cf244a4cf2ba3150" => :high_sierra - end - - depends_on "openjdk" - - def install - system Formula["openjdk"].opt_bin/"java", - "-jar", "jolie-#{version}.jar", - "--jolie-home", libexec, - "--jolie-launchers", libexec/"bin" - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files libexec/"bin", - :JOLIE_HOME => "${JOLIE_HOME:-#{libexec}}", - :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - end - - test do - file = testpath/"test.ol" - file.write <<~EOS - include "console.iol" - - interface EchoInterface { - OneWay: echo( int ) - } - - inputPort In { - location: "local://testPort" - interfaces: EchoInterface - } - - outputPort Self { - location: "local://testPort" - interfaces: EchoInterface - } - - init{ - echo@Self( 4 ) - } - - main { - echo( x ) - println@Console( x * x )() - } - EOS - - out = shell_output("#{bin}/jolie #{file}").strip - - assert_equal "16", out - end -end diff --git a/Formula/jooby-bootstrap.rb b/Formula/jooby-bootstrap.rb deleted file mode 100644 index 7d63f05cbfc82..0000000000000 --- a/Formula/jooby-bootstrap.rb +++ /dev/null @@ -1,22 +0,0 @@ -class JoobyBootstrap < Formula - desc "Script to simplify the creation of jooby apps" - homepage "https://github.com/jooby-project/jooby-bootstrap" - url "https://github.com/jooby-project/jooby-bootstrap/archive/0.2.2.tar.gz" - sha256 "ba662dcbe9022205cdb147a1c4e0931191eb902477ca40f3cba0170dfad54fda" - license "Apache-2.0" - revision 1 - - bottle :unneeded - - depends_on :java => "1.8" - depends_on "maven" - - def install - libexec.install "jooby" - (bin/"jooby").write_env_script libexec/"jooby", Language::Java.java_home_env("1.8") - end - - test do - system "#{bin}/jooby", "version" - end -end diff --git a/Formula/joplin.rb b/Formula/joplin.rb deleted file mode 100644 index d07dc9ee146c5..0000000000000 --- a/Formula/joplin.rb +++ /dev/null @@ -1,30 +0,0 @@ -require "language/node" - -class Joplin < Formula - desc "Note taking and to-do application with synchronisation capabilities" - homepage "https://joplin.cozic.net/" - url "https://registry.npmjs.org/joplin/-/joplin-1.0.164.tgz" - sha256 "d4292ee33a108dd917d951644d0be7fe63b50d8108504758b1ad7c0b798c0539" - - bottle do - sha256 "b1db2009b91e989c0fef249e97cd6510061bc76d7deb4156c5b0ff48cf1b25f6" => :catalina - sha256 "db19b4eaf3006ab2d5854cfe40385f5786f67038f593fa8f250ad62af9326c0d" => :mojave - sha256 "20a106fc8277d35fbc9fab011d62e3c3184249c9c87a30282094717294145bf8" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "node" - depends_on "sqlite" - depends_on "vips" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec), - "--sqlite=#{Formula["sqlite"].opt_prefix}" - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - system bin/"joplin", "config", "editor", "subl" - assert_match "editor = subl", shell_output("#{bin}/joplin config") - end -end diff --git a/Formula/jose.rb b/Formula/jose.rb deleted file mode 100644 index c0fe11ca8c5c3..0000000000000 --- a/Formula/jose.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Jose < Formula - desc "C-language implementation of Javascript Object Signing and Encryption" - homepage "https://github.com/latchset/jose" - url "https://github.com/latchset/jose/releases/download/v10/jose-10.tar.bz2" - sha256 "5c9cdcfb535c4d9f781393d7530521c72b1dd81caa9934cab6dd752cc7efcd72" - license "Apache-2.0" - revision 1 - - bottle do - cellar :any - sha256 "359c58b36bb631623273a77d13431f29ff467e9602f1500f9e4fa761ed0719be" => :catalina - sha256 "358a06afd49f1390ca917969dbb434a75a91bd0de3d8ac981d3eab969670cfe2" => :mojave - sha256 "7a84bdaece281b98dc4a7b0a7fbf05976297126966d14ee2862e007521cdd4ea" => :high_sierra - sha256 "1669bf780ac07ee9a7d216185139aaa6e5c44add352e6da25f02c079694e7ad1" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "jansson" - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - system bin/"jose", "jwk", "gen", "-i", '{"alg": "A128GCM"}', "-o", "oct.jwk" - system bin/"jose", "jwk", "gen", "-i", '{"alg": "RSA1_5"}', "-o", "rsa.jwk" - system bin/"jose", "jwk", "pub", "-i", "rsa.jwk", "-o", "rsa.pub.jwk" - system "echo hi | #{bin}/jose jwe enc -I - -k rsa.pub.jwk -o msg.jwe" - output = shell_output("#{bin}/jose jwe dec -i msg.jwe -k rsa.jwk 2>&1") - assert_equal "hi", output.chomp - output = shell_output("#{bin}/jose jwe dec -i msg.jwe -k oct.jwk 2>&1", 1) - assert_equal "Unwrapping failed!", output.chomp - end -end diff --git a/Formula/joshua.rb b/Formula/joshua.rb deleted file mode 100644 index 3bf0343514417..0000000000000 --- a/Formula/joshua.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Joshua < Formula - desc "Statistical machine translation decoder" - homepage "https://joshua.incubator.apache.org/" - url "https://cs.jhu.edu/~post/files/joshua-6.0.5.tgz" - sha256 "972116a74468389e89da018dd985f1ed1005b92401907881a14bdcc1be8bd98a" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "126f37758cb9f1ace827883911906cab4976bf5f211b200ed0e2f307fae87982" => :catalina - sha256 "126f37758cb9f1ace827883911906cab4976bf5f211b200ed0e2f307fae87982" => :mojave - sha256 "126f37758cb9f1ace827883911906cab4976bf5f211b200ed0e2f307fae87982" => :high_sierra - end - - depends_on "openjdk" - - def install - rm Dir["lib/*.{gr,tar.gz}"] - rm_rf "lib/README" - rm_rf "bin/.gitignore" - - 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 "test_OOV\n", pipe_output("#{bin}/joshua-decoder -v 0 -output-format %s -mark-oovs", "test") - end -end diff --git a/Formula/jove.rb b/Formula/jove.rb deleted file mode 100644 index 8ad689c078a8a..0000000000000 --- a/Formula/jove.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Jove < Formula - desc "Emacs-style editor with vi-like memory, CPU, and size requirements" - homepage "https://directory.fsf.org/wiki/Jove" - url "http://ftp.cs.toronto.edu/cs/ftp/pub/hugh/jove-dev/jove4.16.0.73.tgz" - mirror "https://ftp.openbsd.org/pub/OpenBSD/distfiles/jove4.16.0.73.tgz" - sha256 "9c9e202607f5972c382098d10b63c815ac01e578f432626c982e6aa65000c630" - - bottle do - sha256 "c232b6742b25b3ca53a7c5da2c2577d4bed34e244b2cf90a61e5a5a8ade20e7a" => :catalina - sha256 "8ee0b5bfd6d4dab4b56551dc1bd5cf8b03909f833d90fb213be0c16babbb88af" => :mojave - sha256 "852bb69e61f542d5741b4a442c72c8f72304468d0c1101c2843b1c272111a6d1" => :high_sierra - sha256 "a4559511caca50cf08e01049dda2a35a9423b5c976bf0d930ba819afebc1387b" => :sierra - sha256 "c083761f33516e9d18718b6f78f6468b9aa72c0c80bb625987c60c05cc4f1895" => :el_capitan - sha256 "4e741042364faa5ef07f7957d9e811c204561ecad03ebbcd98f82761211ec78c" => :yosemite - sha256 "260e22d1b9cabcc9b8cacd415d8e5cf840c6970e302a2840cb4076f3583a591d" => :mavericks - end - - # Per MacPorts, avoid clash with libc getline - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/3cada68f/jove/patch-getline.diff" - sha256 "96e557370d6e8924cc73bda8dbe65e54f4cc902785ffcf0056d8925bb4e77bf6" - end - - def install - bin.mkpath - man1.mkpath - (lib/"jove").mkpath - - system "make", "install", "JOVEHOME=#{prefix}", "MANDIR=#{man1}" - end - - test do - assert_match /There's nothing to recover./, shell_output("#{lib}/jove/recover") - end -end diff --git a/Formula/jp.rb b/Formula/jp.rb deleted file mode 100644 index b5b3b517d5bc3..0000000000000 --- a/Formula/jp.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Jp < Formula - desc "Dead simple terminal plots from JSON data" - homepage "https://github.com/sgreben/jp" - url "https://github.com/sgreben/jp/archive/1.1.12.tar.gz" - sha256 "8c9cddf8b9d9bfae72be448218ca0e18d24e755d36c915842b12398fefdc7a64" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "ee325c2512d2a069983175999db20d55c8718fd0f0ea000692e6517ac67b32b9" => :catalina - sha256 "53127a663b20c7c0ac893d991330ca862a6eaa8f235586019e1b8ac33159bcf3" => :mojave - sha256 "51045489ba9e8790a83a2a366709bd941d3a9e7c190f6c184bcf308b888496b3" => :high_sierra - sha256 "b75e4ab3a48e2212babba26a4258645ae55eefa50a9ccac463991b05ce4c08d6" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - build_root = buildpath/"src/github.com/sgreben/jp" - build_root.install Dir["*"] - cd build_root do - system "make", "binaries/osx_x86_64/jp" - bin.install "binaries/osx_x86_64/jp" - end - end - - test do - pipe_output("#{bin}/jp -input csv -xy '[*][0,1]'", "0,0\n1,1\n", 0) - end -end diff --git a/Formula/jp2a.rb b/Formula/jp2a.rb deleted file mode 100644 index f0fea14a0e96d..0000000000000 --- a/Formula/jp2a.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Jp2a < Formula - desc "Convert JPG images to ASCII" - homepage "https://csl.name/jp2a/" - # Do not change source from SourceForge to GitHub until this issue is resolved: - # https://github.com/cslarsen/jp2a/issues/8 - # Currently, GitHub only has jp2a v1.0.7, which is broken as described above. - # jp2a v1.0.6 is stable, but it is only available on SourceForge, not GitHub. - url "https://downloads.sourceforge.net/project/jp2a/jp2a/1.0.6/jp2a-1.0.6.tar.gz" - sha256 "0930ac8a9545c8a8a65dd30ff80b1ae0d3b603f2ef83b04226da0475c7ccce1c" - revision 1 - version_scheme 1 - - bottle do - cellar :any - rebuild 1 - sha256 "a9aa7c8893c63ad5621788af3813ed9758e09e0c79b9ba3a8262d5c17b2272f9" => :catalina - sha256 "4e62b310889a384daf9058267ac0b1bdc73d2cb408f05b9e3d3072be52355bfd" => :mojave - sha256 "8400fccf2a4459fe37ce0f3856459127f4f66ff002c356f36942462c0c9c3809" => :high_sierra - end - - depends_on "jpeg" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"jp2a", test_fixtures("test.jpg") - end -end diff --git a/Formula/jpeg-archive.rb b/Formula/jpeg-archive.rb deleted file mode 100644 index 5157c49e219a9..0000000000000 --- a/Formula/jpeg-archive.rb +++ /dev/null @@ -1,25 +0,0 @@ -class JpegArchive < Formula - desc "Utilities for archiving JPEGs for long term storage" - homepage "https://github.com/danielgtaylor/jpeg-archive" - url "https://github.com/danielgtaylor/jpeg-archive/archive/v2.2.0.tar.gz" - sha256 "3da16a5abbddd925dee0379aa51d9fe0cba33da0b5703be27c13a2dda3d7ed75" - - bottle do - cellar :any_skip_relocation - sha256 "a48ad5ec6802a9a1ba2e689b49c2dd4f6e8edd98950c3e3104ff495953d32e34" => :catalina - sha256 "1fe424d0224c4d76e83aadcdbdbe7b2a4e63873651049ee13c66bc8c55fa916c" => :mojave - sha256 "2bb41fa08a695f6552524c21bd5e32434f248f8e41bd11574ce8a9d4cf104ea1" => :high_sierra - sha256 "fe29c7341dffa1ac8d52635ca217e5808c25a98c74748d71c389d951a46fe1cd" => :sierra - sha256 "0f70f902c57261d92bcb9c8602d46b939ca8f7a55bb535cce67324ae3f3920c7" => :el_capitan - end - - depends_on "mozjpeg" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system "#{bin}/jpeg-recompress", test_fixtures("test.jpg"), "output.jpg" - end -end diff --git a/Formula/jpeg-turbo.rb b/Formula/jpeg-turbo.rb deleted file mode 100644 index d1e1a6ef681a2..0000000000000 --- a/Formula/jpeg-turbo.rb +++ /dev/null @@ -1,30 +0,0 @@ -class JpegTurbo < Formula - desc "JPEG image codec that aids compression and decompression" - homepage "https://www.libjpeg-turbo.org/" - url "https://downloads.sourceforge.net/project/libjpeg-turbo/2.0.5/libjpeg-turbo-2.0.5.tar.gz" - sha256 "16f8f6f2715b3a38ab562a84357c793dd56ae9899ce130563c72cd93d8357b5d" - head "https://github.com/libjpeg-turbo/libjpeg-turbo.git" - - bottle do - sha256 "8e5ea85c9b9e2c35badbae2ac326871779438d92d89caedf4a454ae31699c65f" => :catalina - sha256 "705f3e434a0e2d28360ae63fe99cca55b552bee2e95eac737a49b825946b91dd" => :mojave - sha256 "4d564fd7620edb99c656a964cdd53aeb3c93d9f61ff1a94c68bf568cce789f67" => :high_sierra - end - - keg_only "libjpeg-turbo is not linked to prevent conflicts with the standard libjpeg" - - depends_on "cmake" => :build - depends_on "nasm" => :build - - def install - system "cmake", ".", "-DWITH_JPEG8=1", *std_cmake_args - system "make" - system "make", "test" - system "make", "install" - end - - test do - system "#{bin}/jpegtran", "-crop", "1x1", "-transpose", "-perfect", - "-outfile", "out.jpg", test_fixtures("test.jpg") - end -end diff --git a/Formula/jpeg.rb b/Formula/jpeg.rb deleted file mode 100644 index 77113cd8d8296..0000000000000 --- a/Formula/jpeg.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Jpeg < Formula - desc "Image manipulation library" - homepage "https://www.ijg.org/" - url "https://www.ijg.org/files/jpegsrc.v9d.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/jpeg-9d.tar.gz" - mirror "https://fossies.org/linux/misc/jpegsrc.v9d.tar.gz" - sha256 "99cb50e48a4556bc571dadd27931955ff458aae32f68c4d9c39d624693f69c32" - - bottle do - cellar :any - sha256 "8f7b82a952fb3937889c7f22da1403e5338cd320495917eb26b0c5b2e614791c" => :catalina - sha256 "b931e7725c83275c56f962b51b83c10f31a01ac8d823c6722edaf16d893970b1" => :mojave - sha256 "64286932634fbe1e0d07eacda334d2f4967b20bce0737424df56ec5eaa34ccca" => :high_sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/djpeg", test_fixtures("test.jpg") - end -end diff --git a/Formula/jpeginfo.rb b/Formula/jpeginfo.rb deleted file mode 100644 index c49cc0896a425..0000000000000 --- a/Formula/jpeginfo.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Jpeginfo < Formula - desc "Prints information and tests integrity of JPEG/JFIF files" - homepage "https://www.kokkonen.net/tjko/projects.html" - url "https://www.kokkonen.net/tjko/src/jpeginfo-1.6.1.tar.gz" - sha256 "629e31cf1da0fa1efe4a7cc54c67123a68f5024f3d8e864a30457aeaed1d7653" - revision 1 - - bottle do - cellar :any - sha256 "db2e64acdf22c4013155ed4947696891967973819f60aa735911d079bc7bb93d" => :catalina - sha256 "ea481ba295f3e6a7dcaa4b220dc63ecbada6b652b5f4f83ad01d49dbbde96aaf" => :mojave - sha256 "afafe6f163b0e058975470f6281907d125408e0c1c678ade5ef141024b6d20ed" => :high_sierra - sha256 "0ec9e97f1ce99e36c9e5d4de8be48ca6b5bfc2d807ee590115426a7c57e26d00" => :sierra - sha256 "ca1548c5ed9e3f18cf2e013f49d22a00276c9ef0b3d829fd256ae48178ed9974" => :el_capitan - sha256 "d28d3fcbf355139760d15d1869f57d180940e8114b150446214b18270275dcf8" => :yosemite - end - - depends_on "jpeg" - - def install - ENV.deparallelize - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/jpeginfo", "--help" - end -end diff --git a/Formula/jpegoptim.rb b/Formula/jpegoptim.rb deleted file mode 100644 index 9b79720235ee5..0000000000000 --- a/Formula/jpegoptim.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Jpegoptim < Formula - desc "Utility to optimize JPEG files" - homepage "https://github.com/tjko/jpegoptim" - url "https://github.com/tjko/jpegoptim/archive/RELEASE.1.4.6.tar.gz" - sha256 "c44dcfac0a113c3bec13d0fc60faf57a0f9a31f88473ccad33ecdf210b4c0c52" - head "https://github.com/tjko/jpegoptim.git" - - bottle do - cellar :any - sha256 "f6acdfbe5b3ff49f922bfccb936c39609bb1a0f9dbebd1289d1679bf7fe5b2a4" => :catalina - sha256 "c60d59cfe20db5ad448c4da58d7c43ca072f15a31502b989a51b9020da445880" => :mojave - sha256 "9588bffa63f2041939e480ff8dbce25a004ef2414fc7ea9d5b5177a38bfb8eaf" => :high_sierra - sha256 "89b7f8465e95066c6bf19515affed14037841ea5d0a86b8c3d6cf026f507e938" => :sierra - sha256 "cc6c60a27cba7bb5f0e1b4a7c8ae3567db4eeaf1e1384488b818da7a1409f837" => :el_capitan - end - - depends_on "jpeg" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - ENV.deparallelize # Install is not parallel-safe - system "make", "install" - end - - test do - source = test_fixtures("test.jpg") - assert_match "OK", shell_output("#{bin}/jpegoptim --noaction #{source}") - end -end diff --git a/Formula/jpegrescan.rb b/Formula/jpegrescan.rb deleted file mode 100644 index a8c856504caf3..0000000000000 --- a/Formula/jpegrescan.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Jpegrescan < Formula - desc "Losslessly shrink any JPEG file" - homepage "https://github.com/kud/jpegrescan" - url "https://github.com/kud/jpegrescan/archive/1.1.0.tar.gz" - sha256 "a8522e971d11c904f4b61af665c3be800f26404e2b14f5f80c675b4a72a42b32" - head "https://github.com/kud/jpegrescan.git" - - bottle :unneeded - - depends_on "jpeg" - - def install - bin.install "jpegrescan" - end - - test do - system bin/"jpegrescan", "-v", test_fixtures("test.jpg"), testpath/"out.jpg" - assert_predicate testpath/"out.jpg", :exist? - end -end diff --git a/Formula/jq.rb b/Formula/jq.rb deleted file mode 100644 index c6db7b28f029f..0000000000000 --- a/Formula/jq.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Jq < Formula - desc "Lightweight and flexible command-line JSON processor" - homepage "https://stedolan.github.io/jq/" - url "https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz" - sha256 "5de8c8e29aaa3fb9cc6b47bb27299f271354ebb72514e3accadc7d38b5bbaa72" - - bottle do - cellar :any - rebuild 1 - sha256 "820a3c85fcbb63088b160c7edf125d7e55fc2c5c1d51569304499c9cc4b89ce8" => :catalina - sha256 "71f0e76c5b22e5088426c971d5e795fe67abee7af6c2c4ae0cf4c0eb98ed21ff" => :mojave - sha256 "dffcffa4ea13e8f0f2b45c5121e529077e135ae9a47254c32182231662ee9b72" => :high_sierra - sha256 "bb4d19dc026c2d72c53eed78eaa0ab982e9fcad2cd2acc6d13e7a12ff658e877" => :sierra - end - - head do - url "https://github.com/stedolan/jq.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "oniguruma" - - def install - system "autoreconf", "-iv" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-maintainer-mode", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal "2\n", pipe_output("#{bin}/jq .bar", '{"foo":1, "bar":2}') - end -end diff --git a/Formula/jrnl.rb b/Formula/jrnl.rb deleted file mode 100644 index 7f334bac3000c..0000000000000 --- a/Formula/jrnl.rb +++ /dev/null @@ -1,175 +0,0 @@ -class Jrnl < Formula - include Language::Python::Virtualenv - - desc "Command-line note taker" - homepage "https://jrnl.sh/" - url "https://files.pythonhosted.org/packages/d9/69/5b296efcdd95214f3377de40b5d7fdcf1a6a8e00646e94f703f37c0db16f/jrnl-2.4.3.tar.gz" - sha256 "2e4b08973f4205e5d66cb1e0aac6f550c6aad2046cfe92be911d8699d4861652" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "b3f7dd1f487839f2273a0712ac0a9d657f7b48d3df3d738758cf0687553e02fa" => :catalina - sha256 "ac70ed6ad6dce9b1a6b50e31044c1e61122c92ddf17ee94d79b3ddcb8615a426" => :mojave - sha256 "510441890267a12380241808df81fd063ebda4d9328d01cc33e17b60b16d9b7c" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "expect" => :test - - on_linux do - depends_on "pkg-config" => :build - end - - resource "ansiwrap" do - url "https://files.pythonhosted.org/packages/7c/45/2616341cfcace37d4619d5106a85fcc24f2170d1a161bc5f7fdb81772fbc/ansiwrap-0.8.4.zip" - sha256 "ca0c740734cde59bf919f8ff2c386f74f9a369818cdc60efe94893d01ea8d9b7" - end - - resource "asteval" do - url "https://files.pythonhosted.org/packages/e4/3b/8aaee90977588fa3e88d7a495af306d6f4a1c1c01c8f0fe0de1fc43d0908/asteval-0.9.18.tar.gz" - sha256 "5d64e18b8a72c2c7ae8f9b70d1f80b68bbcaa98c1c0d7047c35489d03209bc86" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "keyring" do - url "https://files.pythonhosted.org/packages/a6/52/eb8a0e13b54ec9240c7dd68fcd0951c52f62033d438af372831af770f7cc/keyring-21.2.1.tar.gz" - sha256 "c53e0e5ccde3ad34284a40ce7976b5b3a3d6de70344c3f8ee44364cc340976ec" - end - - resource "parsedatetime" do - url "https://files.pythonhosted.org/packages/a8/20/cb587f6672dbe585d101f590c3871d16e7aec5a576a1694997a3777312ac/parsedatetime-2.6.tar.gz" - sha256 "4cb368fbb18a0b7231f4d76119165451c8d2e35951455dfee97c62a87b04d455" - end - - resource "passlib" do - url "https://files.pythonhosted.org/packages/6d/6b/4bfca0c13506535289b58f9c9761d20f56ed89439bfe6b8e07416ce58ee1/passlib-1.7.2.tar.gz" - sha256 "8d666cef936198bc2ab47ee9b0410c94adf2ba798e5a84bf220be079ae7ab6a8" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - - resource "pyxdg" do - url "https://files.pythonhosted.org/packages/47/6e/311d5f22e2b76381719b5d0c6e9dc39cd33999adae67db71d7279a6d70f4/pyxdg-0.26.tar.gz" - sha256 "fe2928d3f532ed32b39c32a482b54136fe766d19936afc96c8f00645f9da1a06" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "textwrap3" do - url "https://files.pythonhosted.org/packages/4d/02/cef645d4558411b51700e3f56cefd88f05f05ec1b8fa39a3142963f5fcd2/textwrap3-0.9.2.zip" - sha256 "5008eeebdb236f6303dcd68f18b856d355f6197511d952ba74bc75e40e0c3414" - end - - resource "tzlocal" do - url "https://files.pythonhosted.org/packages/ce/73/99e4cc30db6b21cba6c3b3b80cffc472cc5a0feaf79c290f01f1ac460710/tzlocal-2.1.tar.gz" - sha256 "643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44" - end - - def install - # Avoid error "ModuleNotFoundError: No module named 'clikit'", which is only used in Poetry build process - rm_f "pyproject.toml" - - virtualenv_install_with_resources - end - - test do - (testpath/"tests.sh").write <<~EOS - #!/usr/bin/expect -f - - set timeout 3 - match_max 100000 - - # Write the journal - spawn "#{bin}/jrnl" "This is the fanciest test in the world." - - expect { - "/.local/share/jrnl/journal.txt" { send -- "#{testpath}/test.txt\r" } - timeout { exit 1 } - } - - expect { - "You can always change this later" { send -- "n\r" } - timeout { exit 1 } - } - - expect { - eof { exit } - timeout { exit 1 } - } - - # Read the journal - spawn "#{bin}/jrnl" -1 - - expect { - "This is the fanciest test in the world." { exit } - timeout { exit 1 } - eof { exit 1 } - } - - # Encrypt the journal - spawn "#{bin}/jrnl" --encrypt - - expect { - -exact "Enter password for new journal: " { send -- "homebrew\r" } - timeout { exit 1 } - } - - expect { - -exact "Enter password again: " { send -- "homebrew\r" } - timeout { exit 1 } - } - - expect { - -exact "Do you want to store the password in your keychain? \[Y/n\] " { send -- "n\r" } - timeout { exit 1 } - } - - expect { - -re "Journal encrypted to .*/test.txt." { exit } - timeout { exit 1 } - eof { exit 1 } - } - EOS - - system "expect", "./tests.sh" - assert_predicate testpath/".config/jrnl/jrnl.yaml", :exist? - assert_predicate testpath/"test.txt", :exist? - end -end diff --git a/Formula/jrtplib.rb b/Formula/jrtplib.rb deleted file mode 100644 index 560117eb36458..0000000000000 --- a/Formula/jrtplib.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Jrtplib < Formula - desc "Fully featured C++ Library for RTP (Real-time Transport Protocol)" - homepage "https://research.edm.uhasselt.be/jori/jrtplib" - url "https://research.edm.uhasselt.be/jori/jrtplib/jrtplib-3.11.2.tar.bz2" - sha256 "2c01924c1f157fb1a4616af5b9fb140acea39ab42bfb28ac28d654741601b04c" - - bottle do - cellar :any - sha256 "05fc5e0747f7d5f725f9dda22cf39d414e8ee751829d14e9c32fa12279834cfc" => :catalina - sha256 "1b48b36e9011b4aa675f1d581e900c64bcad93ba15fc86d1e27db09ed2c75ce9" => :mojave - sha256 "420016bd3f9981189dc8bf69dc7520da8d9cbde848147dde495792c1a5a984fa" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "jthread" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - using namespace jrtplib; - int main() { - RTPSessionParams sessionparams; - sessionparams.SetOwnTimestampUnit(1.0/8000.0); - return 0; - } - EOS - - system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-ljrtp", - "-o", "test" - system "./test" - end -end diff --git a/Formula/jruby.rb b/Formula/jruby.rb deleted file mode 100644 index 896d79f787b69..0000000000000 --- a/Formula/jruby.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Jruby < Formula - desc "Ruby implementation in pure Java" - homepage "https://www.jruby.org/" - url "https://search.maven.org/remotecontent?filepath=org/jruby/jruby-dist/9.2.12.0/jruby-dist-9.2.12.0-bin.tar.gz" - sha256 "307f6124c4301d723e2d0ff4c0105fa9eee8950c3f9971e14bbe8862030e6c04" - - bottle :unneeded - - depends_on "openjdk" - - def install - # Remove Windows files - rm Dir["bin/*.{bat,dll,exe}"] - - cd "bin" do - # Prefix a 'j' on some commands to avoid clashing with other rubies - %w[ast rake rdoc ri testrb].each { |f| mv f, "j#{f}" } - # Delete some unnecessary commands - rm "gem" # gem is a wrapper script for jgem - rm "irb" # irb is an identical copy of jirb - end - - # Only keep the macOS native libraries - rm_rf Dir["lib/jni/*"] - ["lib/jni/Darwin"] - libexec.install Dir["*"] - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files libexec/"bin", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - end - - test do - assert_equal "hello\n", shell_output("#{bin}/jruby -e \"puts 'hello'\"") - end -end diff --git a/Formula/jsawk.rb b/Formula/jsawk.rb deleted file mode 100644 index b8502d0f729d7..0000000000000 --- a/Formula/jsawk.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Jsawk < Formula - desc "Like awk, but for JSON, using JavaScript objects and arrays" - homepage "https://github.com/micha/jsawk" - url "https://github.com/micha/jsawk/archive/1.4.tar.gz" - sha256 "3d38ffb4b9c6ff7f17072a12c5817ffe68bd0ab58d6182de300fc1e587d34530" - head "https://github.com/micha/jsawk.git" - - bottle :unneeded - - depends_on "spidermonkey" - - def install - bin.install "jsawk" - end - - test do - cmd = %Q(#{bin}/jsawk 'this.a = "foo"') - assert_equal %Q({"a":"foo"}\n), pipe_output(cmd, "{}") - end -end diff --git a/Formula/jsdoc3.rb b/Formula/jsdoc3.rb deleted file mode 100644 index e1cda982499fd..0000000000000 --- a/Formula/jsdoc3.rb +++ /dev/null @@ -1,37 +0,0 @@ -require "language/node" - -class Jsdoc3 < Formula - desc "API documentation generator for JavaScript" - homepage "https://jsdoc.app/" - url "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.4.tgz" - sha256 "c2300f92bff732407c2dfd6241002f9dc221c311ec24d205e6bb6b95c826ec02" - head "https://github.com/jsdoc3/jsdoc.git" - - bottle do - cellar :any_skip_relocation - sha256 "8f873274000b4e3d0959b91bfc67e7019861171d980194e65bdeec2295f6699c" => :catalina - sha256 "55423238074c5cef313aee63947353a5f785af4fba129ab26c21d49654c81b43" => :mojave - sha256 "babfa75687211cb6aa6e7d9466bed814eb43b25ef0f5c6ada5352e5179a7eae2" => :high_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 <<~EOS - /** - * Represents a formula. - * @constructor - * @param {string} name - the name of the formula. - * @param {string} version - the version of the formula. - **/ - function Formula(name, version) {} - EOS - - system bin/"jsdoc", "--verbose", "test.js" - end -end diff --git a/Formula/jshon.rb b/Formula/jshon.rb deleted file mode 100644 index 0757bd7a5535d..0000000000000 --- a/Formula/jshon.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Jshon < Formula - desc "Parse, read, and create JSON from the shell" - homepage "http://kmkeen.com/jshon/" - url "https://github.com/keenerd/jshon/archive/20131105.tar.gz" - sha256 "28420f6f02c6b762732898692cc0b0795cfe1a59fbfb24e67b80f332cf6d4fa2" - license "MIT" - - bottle do - cellar :any - sha256 "ec755371878b6471b6d5fb0dac981f7969dad3a42b9aa2e9be60f7a303b3fffe" => :catalina - sha256 "5aa1d640857651175a6fe692f31c0a28b58c7d5b02aac1dc6945c2fce7b76a81" => :mojave - sha256 "c32084666ea13118a66803175575de9b74ca5a04d5a32bdd91883007ef6822b8" => :high_sierra - sha256 "3215b76a79af85c6ae21b7de4e2eff0eb83098c0c5e1ae5b8c870d912498ed13" => :sierra - sha256 "bab45017500667c7f8cf3b73c513f043cd04da04610cb2dc8a117ad5c9a5b99a" => :el_capitan - sha256 "a97e9310af44fae5cdd60a0bcbae2bc0190c4d773d6290db3b5e970cd9999395" => :yosemite - end - - depends_on "jansson" - - def install - system "make" - bin.install "jshon" - man1.install "jshon.1" - end - - test do - (testpath/"test.json").write <<~EOS - {"a":1,"b":2} - EOS - - assert_equal "2", pipe_output("#{bin}/jshon -l < test.json").strip - end -end diff --git a/Formula/jsmin.rb b/Formula/jsmin.rb deleted file mode 100644 index 3cd681c178301..0000000000000 --- a/Formula/jsmin.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Jsmin < Formula - desc "Minify JavaScript code" - homepage "https://www.crockford.com/javascript/jsmin.html" - url "https://github.com/douglascrockford/JSMin/archive/1bf6ce5f74a9f8752ac7f5d115b8d7ccb31cfe1b.tar.gz" - version "2013-03-29" - sha256 "aae127bf7291a7b2592f36599e5ed6c6423eac7abe0cd5992f82d6d46fe9ed2d" - - bottle do - cellar :any_skip_relocation - sha256 "d72944720c9ec82c18cc5bba48c54292cd6ef625b5817d6493a410ce97d48a9e" => :catalina - sha256 "40fb75c3bff520391b1e9c6b163f41ece401ed3aafaeb5231c3c116ffd597000" => :mojave - sha256 "333b2cb7e9b9b575580cf9a100760641117e2c178b766eee49dcd18854f40d8f" => :high_sierra - sha256 "21ce8792fb1bb8b004f884953b2ab97ebd0d00568f5507c3b168f594ebbbd084" => :sierra - sha256 "7672c92faa52fbc0684808da9803ebfa8883df0e0243e63a9a0b7c6441218b85" => :el_capitan - sha256 "92ce35c390c8a2723e7b7cef8655e61ab9373f274c719ab4c04256cab1c42d1d" => :yosemite - sha256 "248da380666e6e08f25b75588c32d1dcad3952978e31d2a08c59c99756946bb4" => :mavericks - end - - def install - system ENV.cc, "jsmin.c", "-o", "jsmin" - bin.install "jsmin" - end - - test do - assert_equal "\nvar i=0;", pipe_output(bin/"jsmin", "var i = 0; // comment") - end -end diff --git a/Formula/json-c.rb b/Formula/json-c.rb deleted file mode 100644 index 66646b63d0c07..0000000000000 --- a/Formula/json-c.rb +++ /dev/null @@ -1,41 +0,0 @@ -class JsonC < Formula - desc "JSON parser for C" - homepage "https://github.com/json-c/json-c/wiki" - url "https://github.com/json-c/json-c/archive/json-c-0.14-20200419.tar.gz" - version "0.14" - sha256 "ec4eb70e0f6c0d707b9b1ec646cf7c860f4abb3562a90ea6e4d78d177fd95303" - head "https://github.com/json-c/json-c.git" - - bottle do - cellar :any - sha256 "50a8093fa52bf5a78391eaaede3565bd94769739bcb638ead50ef8ce5f36bd03" => :catalina - sha256 "8555eff999bab67ad77f403902e2a4410fa5d55f53d808218d677d08f7fcc9a1" => :mojave - sha256 "0d34251aac5183c121629d4a2506697d91cb56aac3ca247002594b6ac4054d96" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~'EOS' - #include - #include - - int main() { - json_object *obj = json_object_new_object(); - json_object *value = json_object_new_string("value"); - json_object_object_add(obj, "key", value); - printf("%s\n", json_object_to_json_string(obj)); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-ljson-c", "test.c", "-o", "test" - assert_equal '{ "key": "value" }', shell_output("./test").chomp - end -end diff --git a/Formula/json-fortran.rb b/Formula/json-fortran.rb deleted file mode 100644 index f08d588c4a0a6..0000000000000 --- a/Formula/json-fortran.rb +++ /dev/null @@ -1,51 +0,0 @@ -class JsonFortran < Formula - desc "Fortran 2008 JSON API" - homepage "https://github.com/jacobwilliams/json-fortran" - url "https://github.com/jacobwilliams/json-fortran/archive/8.1.0.tar.gz" - sha256 "4f4b3bf102d7e22327b0e4b8a3cadd8c3e453c969547ec21cd2429ed7d4c5404" - revision 1 - head "https://github.com/jacobwilliams/json-fortran.git" - - bottle do - cellar :any - sha256 "6a0de94db085feec3b791b9b154e0608be45dcee56bdebed1a40f1d2b01f6db1" => :catalina - sha256 "0eba6baf8fc61081bef4fe113cab288c48b15db82b3bf6046123078092d94d60" => :mojave - sha256 "0bfa26c79959e2963fb3a60a95c13e4199c914c5390d438aac1f0e9e1b8e7359" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "ford" => :build - depends_on "gcc" # for gfortran - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DUSE_GNU_INSTALL_CONVENTION:BOOL=TRUE", - "-DENABLE_UNICODE:BOOL=TRUE" - system "make", "install" - end - end - - test do - (testpath/"json_test.f90").write <<~EOS - program example - use json_module, RK => json_RK - use iso_fortran_env, only: stdout => output_unit - implicit none - type(json_core) :: json - type(json_value),pointer :: p, inp - call json%initialize() - call json%create_object(p,'') - call json%create_object(inp,'inputs') - call json%add(p, inp) - call json%add(inp, 't0', 0.1_RK) - call json%print(p,stdout) - call json%destroy(p) - if (json%failed()) error stop 'error' - end program example - EOS - system "gfortran", "-o", "test", "json_test.f90", "-I#{include}", - "-L#{lib}", "-ljsonfortran" - system "./test" - end -end diff --git a/Formula/json-glib.rb b/Formula/json-glib.rb deleted file mode 100644 index e8a2675aab82b..0000000000000 --- a/Formula/json-glib.rb +++ /dev/null @@ -1,83 +0,0 @@ -class JsonGlib < Formula - desc "Library for JSON, based on GLib" - homepage "https://wiki.gnome.org/Projects/JsonGlib" - url "https://download.gnome.org/sources/json-glib/1.4/json-glib-1.4.4.tar.xz" - sha256 "720c5f4379513dc11fd97dc75336eb0c0d3338c53128044d9fabec4374f4bc47" - revision 1 - - bottle do - sha256 "643ce68e84c094e77597f2f1b83678d3675b74b1a2e11c43804290d30fa456e6" => :catalina - sha256 "223b5472cc71a1eea8efc818d66fa8e6ff05a4aff45d60d4deccba54f82d39dd" => :mojave - sha256 "ad30f6f204dd27504d70e9ac22dcfdd482975a5e97879c0b4095527bde68d985" => :high_sierra - sha256 "08dbbf2bcef7fdeccfbcd7a0391c4eafa67f914ba0f021c8a41298a6359f7c24" => :sierra - 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", *std_meson_args, ".." - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - JsonParser *parser = json_parser_new(); - 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}/json-glib-1.0 - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - -ljson-glib-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end - -__END__ -diff --git a/meson.build b/meson.build -index cee6389..50808cf 100644 ---- a/meson.build -+++ b/meson.build -@@ -145,14 +145,6 @@ if host_system == 'linux' - endforeach - endif - --# Maintain compatibility with autotools --if host_system == 'darwin' -- common_ldflags += [ -- '-compatibility_version 1', -- '-current_version @0@.@1@'.format(json_binary_age - json_interface_age, json_interface_age), -- ] --endif -- - root_dir = include_directories('.') - - gnome = import('gnome') diff --git a/Formula/json-table.rb b/Formula/json-table.rb deleted file mode 100644 index b5d86fe14ac58..0000000000000 --- a/Formula/json-table.rb +++ /dev/null @@ -1,26 +0,0 @@ -class JsonTable < Formula - desc "Transform nested JSON data into tabular data in the shell" - homepage "https://github.com/micha/json-table" - url "https://github.com/micha/json-table/archive/4.3.3.tar.gz" - sha256 "0ab7bb2a705ad3399132060b30b32903762473ff79b5a6e6f52f086e507b0911" - license "EPL-1.0" - head "https://github.com/micha/json-table.git" - - bottle do - cellar :any_skip_relocation - sha256 "61d89ff5426049b2f0fbb237862ec1227cd36c8f00ce81f9a382e8b7d1c2792a" => :catalina - sha256 "49f7c1f8e757456f63d5e8b9cb7ef0f2b1cdb22303b2ae799595305cb7e65c5b" => :mojave - sha256 "2afef9b965070bcde986759dbd03cfd8fe3e77aec5a12158fb4aa189626ab977" => :high_sierra - sha256 "e5ed8ece1e10ede4417f347703f1e62bb417c65a11f6cac5f10915d44359eb5b" => :sierra - sha256 "3240813838be9e797fd443e5f51d6bb53fc56a8d958dd361cbc865de003619bd" => :el_capitan - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - output = pipe_output("#{bin}/jt x y %", '{"x":{"y":[1,2,3]}}', 0) - assert_equal "3", output.lines.last.chomp - end -end diff --git a/Formula/json11.rb b/Formula/json11.rb deleted file mode 100644 index c2b39da47943c..0000000000000 --- a/Formula/json11.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Json11 < Formula - desc "Tiny JSON library for C++11" - homepage "https://github.com/dropbox/json11" - url "https://github.com/dropbox/json11/archive/v1.0.0.tar.gz" - sha256 "bab960eebc084d26aaf117b8b8809aecec1e86e371a173655b7dffb49383b0bf" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "8d7a4ff704262d3f47402e0f2be7e94c3e05ab253131673d65daf0f3b23c5561" => :catalina - sha256 "fa88a6f0691e52c7b7830f08287c3c8379337b66694161175ec85f1ded4b40ae" => :mojave - sha256 "3c6b7776a4702bb90d046f3c6f4ace063ea04d3355c7ce51127824292cb4506f" => :high_sierra - sha256 "e7a717f73162477010c156c2e4d281bb4b5f26ea3c53a5aaffc82998954d119c" => :sierra - sha256 "d5345ad5224fb7aeda2562d1a46350c44f66cf98486d142bc81b8186e5aa74cc" => :el_capitan - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - using namespace json11; - - int main() { - Json my_json = Json::object { - { "key1", "value1" }, - { "key2", false }, - { "key3", Json::array { 1, 2, 3 } }, - }; - auto json_str = my_json.dump(); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", - "-ljson11", "-o", "test" - system "./test" - end -end diff --git a/Formula/json_spirit.rb b/Formula/json_spirit.rb deleted file mode 100644 index b424946c75c17..0000000000000 --- a/Formula/json_spirit.rb +++ /dev/null @@ -1,34 +0,0 @@ -class JsonSpirit < Formula - desc "C++ JSON parser/generator" - homepage "https://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented" - url "https://github.com/png85/json_spirit/archive/json_spirit-4.0.8.tar.gz" - # Current release is misnamed on GitHub, previous versioning scheme and homepage - # dictate the release as "4.08". - version "4.08" - sha256 "43829f55755f725c06dd75d626d9e57d0ce68c2f0d5112fe9a01562c0501e94c" - license "MIT" - - bottle do - cellar :any - sha256 "31aaf302e4238b13797722028ac46a7deade1df4f042b46feb7d455cb05e4599" => :catalina - sha256 "2cec376e843919e2f3693e73be0e3a2c6a6f3b283e503b51d42108c5471e8091" => :mojave - sha256 "55299a7931b4bbbcf1ee5c576fe35283373279cc95b3b5126696ad5741f3d072" => :high_sierra - sha256 "0dc2370a736a065b47f6f83f8ed292209fc978005a720de8653e32cc1c568cce" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - - def install - args = std_cmake_args - args << "-DBUILD_STATIC_LIBRARIES=ON" - - system "cmake", *args - system "make" - - args = std_cmake_args - args << "-DBUILD_STATIC_LIBRARIES=OFF" - system "cmake", *args - system "make", "install" - end -end diff --git a/Formula/jsoncpp.rb b/Formula/jsoncpp.rb deleted file mode 100644 index a9b29715fef3e..0000000000000 --- a/Formula/jsoncpp.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Jsoncpp < Formula - desc "Library for interacting with JSON" - homepage "https://github.com/open-source-parsers/jsoncpp" - url "https://github.com/open-source-parsers/jsoncpp/archive/v1.9.3.tar.gz" - sha256 "8593c1d69e703563d94d8c12244e2e18893eeb9a8a9f8aa3d09a327aa45c8f7d" - head "https://github.com/open-source-parsers/jsoncpp.git" - - bottle do - cellar :any - sha256 "0e937647ccad5ed68b70aa059027e367f120f7b6ad8657bfbd17ab4835a134a8" => :catalina - sha256 "c235548c34fbf5359a780f292b20c13e17ff6a4f2de02ec5cb2116bff2b6cbf1" => :mojave - sha256 "a31ea936169d1e199425e5125cea17ff5d61467e3825ce988a610adec0cc027b" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "python@3.8" => :build - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Dpython=#{Formula["python@3.8"].opt_bin}/python3", ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - Json::Value root; - Json::CharReaderBuilder builder; - std::string errs; - std::istringstream stream1; - stream1.str("[1, 2, 3]"); - return Json::parseFromStream(builder, stream1, &root, &errs) ? 0: 1; - } - EOS - system ENV.cxx, "-std=c++11", testpath/"test.cpp", "-o", "test", - "-I#{include}/jsoncpp", - "-L#{lib}", - "-ljsoncpp" - system "./test" - end -end diff --git a/Formula/jsonlint.rb b/Formula/jsonlint.rb deleted file mode 100644 index 978ae8894d472..0000000000000 --- a/Formula/jsonlint.rb +++ /dev/null @@ -1,30 +0,0 @@ -require "language/node" - -class Jsonlint < Formula - desc "JSON parser and validator with a CLI" - homepage "https://github.com/zaach/jsonlint" - url "https://github.com/zaach/jsonlint/archive/v1.6.0.tar.gz" - sha256 "a7f763575d3e3ecc9b2a24b18ccbad2b4b38154c073ac63ebc9517c4cb2de06f" - - bottle do - cellar :any_skip_relocation - sha256 "9aca65ec76aea3e9cea0bbe2ac305574a143cf07b20a612d0c34533c9970b44b" => :catalina - sha256 "bff395a213ccea80834bc638e5aaa7428dd09c9dbef56d728f07dba752935bbe" => :mojave - sha256 "1dbe9eacf1dbff45c1dcd194fc72090791a8ed2b434e783c2783adc28e6f571b" => :high_sierra - sha256 "4ad85c01eba9de2051b70abdef8c1ba6b922725da2663681ad37e3594ff66768" => :sierra - sha256 "20de901256ea772ee7bb13745f797e94ad3c9376e2031165c40acf4af747cec5" => :el_capitan - sha256 "c8ea1b10f689263798806fa33d2f004000490b9014393f2a472b0cc76d6e9ac3" => :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.json").write('{"name": "test"}') - system "#{bin}/jsonlint", "test.json" - end -end diff --git a/Formula/jsonnet.rb b/Formula/jsonnet.rb deleted file mode 100644 index d91cd87d159df..0000000000000 --- a/Formula/jsonnet.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Jsonnet < Formula - desc "Domain specific configuration language for defining JSON data" - homepage "https://jsonnet.org/" - url "https://github.com/google/jsonnet/archive/v0.16.0.tar.gz" - sha256 "fa1a4047942797b7c4ed39718a20d63d1b98725fb5cf563efbc1ecca3375426f" - license "Apache-2.0" - head "https://github.com/google/jsonnet.git" - - bottle do - cellar :any_skip_relocation - sha256 "af01487239fc6947ef6c27d9b4b18772d2b7773393d7e48704001bf09d380e5b" => :catalina - sha256 "2255443d01048798797696161de2ddf435565348d7a246647a37b5ec0919dc2b" => :mojave - sha256 "7cc0ca007b2d56160e93437779f7214f44caef1a76b0647c911b1ca6ac6ab4c5" => :high_sierra - end - - def install - ENV.cxx11 - system "make" - bin.install "jsonnet" - bin.install "jsonnetfmt" - end - - test do - (testpath/"example.jsonnet").write <<~EOS - { - person1: { - name: "Alice", - welcome: "Hello " + self.name + "!", - }, - person2: self.person1 { name: "Bob" }, - } - EOS - - expected_output = { - "person1" => { - "name" => "Alice", - "welcome" => "Hello Alice!", - }, - "person2" => { - "name" => "Bob", - "welcome" => "Hello Bob!", - }, - } - - output = shell_output("#{bin}/jsonnet #{testpath}/example.jsonnet") - assert_equal expected_output, JSON.parse(output) - end -end diff --git a/Formula/jsonpp.rb b/Formula/jsonpp.rb deleted file mode 100644 index 55b04ba35c90f..0000000000000 --- a/Formula/jsonpp.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Jsonpp < Formula - desc "Command-line JSON pretty-printer" - homepage "https://jmhodges.github.io/jsonpp/" - url "https://github.com/jmhodges/jsonpp/archive/1.3.0.tar.gz" - sha256 "dde8ea9b270a79cd2b2f40824f89abc5270bd360122d87ab04b4361c0015d941" - license "MIT" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "2b84ea4f8d4a4177064c1fbf024876439175c4e8c6576b33f93399c72afe3a5a" => :catalina - sha256 "7c8dd8c69321e42c29e075a658840167138d16820ba6a0dd5f2f2425c87a569b" => :mojave - sha256 "d81995103192bb58f66d7089939eb6682f117a7044d3a84804db62b4c31a3c81" => :high_sierra - sha256 "219f8a6bfdf1d0e8435fa1c1fdf0cc22b91cae8ec7d62581d312927fabcf9388" => :sierra - sha256 "3161f55711eea589c5036078fbf3a5df47484767f025adda7c0692d4dda5f2b4" => :el_capitan - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"jsonpp" - end - - test do - expected = <<~EOS.chomp - { - "foo": "bar", - "baz": "qux" - } - EOS - assert_equal expected, pipe_output(bin/"jsonpp", '{"foo":"bar","baz":"qux"}') - end -end diff --git a/Formula/jsonrpc-glib.rb b/Formula/jsonrpc-glib.rb deleted file mode 100644 index f1bcd4449490b..0000000000000 --- a/Formula/jsonrpc-glib.rb +++ /dev/null @@ -1,69 +0,0 @@ -class JsonrpcGlib < Formula - desc "GNOME library to communicate with JSON-RPC based peers" - homepage "https://gitlab.gnome.org/GNOME/jsonrpc-glib" - url "https://download.gnome.org/sources/jsonrpc-glib/3.34/jsonrpc-glib-3.34.0.tar.xz" - sha256 "d1ceb24b503e49e7bfe6e44630c03abc65f2d047a68271eb62e332b13be90548" - revision 1 - - bottle do - cellar :any - sha256 "a51dd608adcefb9e3514534e49a5db64ad1e38b407b8d9349df7f3eb08bc5fe7" => :catalina - sha256 "b0ef1160532600a75471bb0e4cc3f48e7f092111ffa7d494534e46db43accabc" => :mojave - sha256 "298d4a37194ab19bc753bb4f7022ec0d34d12a30dd4860806582cda4406b62ec" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "glib" - depends_on "json-glib" - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Dwith_vapi=true", ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - JsonrpcInputStream *stream = jsonrpc_input_stream_new(NULL); - return 0; - } - EOS - gettext = Formula["gettext"] - glib = Formula["glib"] - json_glib = Formula["json-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}/jsonrpc-glib-1.0 - -I#{json_glib.opt_include}/json-glib-1.0 - -I#{pcre.opt_include} - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{json_glib.opt_lib} - -L#{lib} - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - -ljson-glib-1.0 - -ljsonrpc-glib-1.0 - -Wl,-framework - -Wl,CoreFoundation - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/jsonschema2pojo.rb b/Formula/jsonschema2pojo.rb deleted file mode 100644 index 323187623169a..0000000000000 --- a/Formula/jsonschema2pojo.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Jsonschema2pojo < Formula - desc "Generates Java types from JSON Schema (or example JSON)" - homepage "http://www.jsonschema2pojo.org/" - url "https://github.com/joelittlejohn/jsonschema2pojo/releases/download/jsonschema2pojo-1.0.2/jsonschema2pojo-1.0.2.tar.gz" - sha256 "158e927558e3ae4779dc2b7cd00e2010e43465af5a5aebdb55c889ccacb4d6e3" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "jsonschema2pojo-#{version}-javadoc.jar", "lib" - (bin/"jsonschema2pojo").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/lib/jsonschema2pojo-cli-#{version}.jar" "$@" - EOS - end - - test do - (testpath/"src/jsonschema.json").write <<~EOS - { - "type":"object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "integer" - }, - "baz": { - "type": "boolean" - } - } - } - EOS - system bin/"jsonschema2pojo", "-s", "src", "-t", testpath - assert_predicate testpath/"Jsonschema.java", :exist?, "Failed to generate Jsonschema.java" - end -end diff --git a/Formula/jsvc.rb b/Formula/jsvc.rb deleted file mode 100644 index 2444dae07ed2e..0000000000000 --- a/Formula/jsvc.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Jsvc < Formula - desc "Wrapper to launch Java applications as daemons" - homepage "https://commons.apache.org/daemon/jsvc.html" - url "https://www.apache.org/dyn/closer.lua?path=commons/daemon/source/commons-daemon-1.2.2-src.tar.gz" - mirror "https://archive.apache.org/dist/commons/daemon/source/commons-daemon-1.2.2-src.tar.gz" - sha256 "ebd9d50989ee2009cc83f501e6793ad5978672ecea97be5198135a081a8aac71" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "d394dda87f296a36c2e39b8954db0f8496285dfdf94cd07bf236fec7df1edf3d" => :catalina - sha256 "bea286d1d134d91bc5e7a8596cbf015f29c09e6ba4bef9f356e51dfa8777fb9d" => :mojave - sha256 "73b144be1f0b0dabfabb254515d250ce310405ca8c975e072109c75e5f6debd5" => :high_sierra - end - - depends_on "openjdk" - - def install - prefix.install %w[NOTICE.txt LICENSE.txt RELEASE-NOTES.txt] - - cd "src/native/unix" do - system "./configure", "--with-java=#{Formula["openjdk"].opt_prefix}" - system "make" - - libexec.install "jsvc" - (bin/"jsvc").write_env_script libexec/"jsvc", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - end - end - - test do - output = shell_output("#{bin}/jsvc -help") - assert_match "jsvc (Apache Commons Daemon)", output - end -end diff --git a/Formula/jthread.rb b/Formula/jthread.rb deleted file mode 100644 index 4f0ddd43143d2..0000000000000 --- a/Formula/jthread.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Jthread < Formula - desc "C++ class to make use of threads easy" - homepage "https://research.edm.uhasselt.be/jori/jthread" - url "https://research.edm.uhasselt.be/jori/jthread/jthread-1.3.3.tar.bz2" - sha256 "17560e8f63fa4df11c3712a304ded85870227b2710a2f39692133d354ea0b64f" - - bottle do - cellar :any - sha256 "e228f81df252c35872df1c6e0711857ad7a7312aae17304a7bcefa0905106b61" => :catalina - sha256 "e2dcd37c6dbeda04e3a9408d9f09f8d00ff669a3eb7ee8b098742887d800162e" => :mojave - sha256 "2d9c8a2d9e52f9419cd1015d982e06d58963e29c43a44f7ddfbbf6f149e20cc0" => :high_sierra - sha256 "099b841458d4d6f4ac3f5e7b453d4ec5b2a50f4dd1a6ccac9614ac72a1c1c90f" => :sierra - sha256 "0e846e47e0350f6dc4ca15f5eb6f9e9d2cf7345c115476bc93fc78ac2cb056af" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - using namespace jthread; - - int main() { - JMutex* jm = new JMutex(); - jm->Init(); - jm->Lock(); - jm->Unlock(); - return 0; - } - EOS - - system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-ljthread", - "-o", "test" - system "./test" - end -end diff --git a/Formula/juise.rb b/Formula/juise.rb deleted file mode 100644 index f2ee0a676a40a..0000000000000 --- a/Formula/juise.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Juise < Formula - desc "JUNOS user interface scripting environment" - homepage "https://github.com/Juniper/juise/wiki" - url "https://github.com/Juniper/juise/releases/download/0.9.0/juise-0.9.0.tar.gz" - sha256 "7eb7985944b7322fe290f4e5a080a4018ed84bf576e23b8a32e3f94eb13f4c27" - - bottle do - sha256 "fdc8151a4937275308e7d353b0f42007e5a371a58551c2609351ac9ae0647bbb" => :catalina - sha256 "7895026372337e9a86c906b364f5a3bda3c217e6def31b6e51ada8ab14c9334b" => :mojave - sha256 "6c4e884c63521014cd059e59372130ea70a06067769aaaf79497cb1f6877c41a" => :high_sierra - end - - head do - url "https://github.com/Juniper/juise.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "libtool" => :build - depends_on "libslax" - - def install - system "sh", "./bin/setup.sh" if build.head? - - # Prevent sandbox violation where juise's `make install` tries to - # write to "/usr/local/Cellar/libslax/0.20.1/lib/slax/extensions" - # Reported 5th May 2016: https://github.com/Juniper/juise/issues/34 - inreplace "configure", - "SLAX_EXTDIR=\"`$SLAX_CONFIG --extdir | head -1`\"", - "SLAX_EXTDIR=\"#{lib}/slax/extensions\"" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-libedit" - system "make", "install" - end - - test do - assert_equal "libjuice version #{version}", shell_output("#{bin}/juise -V").lines.first.chomp - end -end diff --git a/Formula/juju-wait.rb b/Formula/juju-wait.rb deleted file mode 100644 index 91aa06e42b2ad..0000000000000 --- a/Formula/juju-wait.rb +++ /dev/null @@ -1,36 +0,0 @@ -class JujuWait < Formula - include Language::Python::Virtualenv - - desc "Juju plugin for waiting for deployments to settle" - homepage "https://launchpad.net/juju-wait" - url "https://files.pythonhosted.org/packages/d6/01/381cc24aabf820ff306b738a01b11aed5ac365a6438d46792f9fee2fe5f8/juju-wait-2.7.0.tar.gz" - sha256 "1e00cb75934defa50a2cc404574d4b633049f1fa011a197dfac33e3071840e98" - revision 1 - - bottle do - cellar :any - sha256 "a969b35744d3fad4f45802d53bf1dd5da96eed56ae01e0ba6d246ea4b4a89a32" => :catalina - sha256 "88d585b8cf738d97549f138d0fc49195d78e55ce4eaa4e2596e8e7af19827e68" => :mojave - sha256 "d7b4c5a6f83f55f5f5084d6a2c58d8119923ee203f2770fb4affa3cebeefe96e" => :high_sierra - end - - depends_on "juju" - depends_on "libyaml" - depends_on "python@3.8" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/3d/d9/ea9816aea31beeadccd03f1f8b625ecf8f645bd66744484d162d84803ce5/PyYAML-5.3.tar.gz" - sha256 "e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615" - end - - def install - virtualenv_install_with_resources - end - - test do - # Note: Testing this plugin requires a Juju environment that's in the - # process of deploying big software. This plugin relies on those application - # statuses to determine if an environment is completely deployed or not. - system "#{bin}/juju-wait", "--version" - end -end diff --git a/Formula/juju.rb b/Formula/juju.rb deleted file mode 100644 index 2a3803c24e342..0000000000000 --- a/Formula/juju.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Juju < Formula - desc "DevOps management tool" - homepage "https://jujucharms.com/" - url "https://github.com/juju/juju.git", - :tag => "juju-2.8.1", - :revision => "16439b3d1c528b7a0e019a16c2122ccfcf6aa41f" - - bottle do - cellar :any_skip_relocation - sha256 "299b35b832c49540bcc373cab47ed16f066280927877e0712d914e6b6e981a70" => :catalina - sha256 "a896b2f3489774392f4d0c6d640d0ea222d99f54d7b74b583ec35d81e01dc81a" => :mojave - sha256 "6b37fe65c0e41cce1ac0089d8b4fc55c4dee87acd9a3c5e342233801551b6666" => :high_sierra - end - - depends_on "go" => :build - - def install - git_commit = Utils.safe_popen_read("git", "rev-parse", "HEAD").chomp - ld_flags = %W[ - -s -w - -X version.GitCommit=#{git_commit} - -X version.GitTreeState=clean - ] - system "go", "build", *std_go_args, - "-ldflags", ld_flags.join(" "), - "./cmd/juju" - system "go", "build", *std_go_args, - "-ldflags", ld_flags.join(" "), - "-o", bin/"juju-metadata", - "./cmd/plugins/juju-metadata" - bash_completion.install "etc/bash_completion.d/juju" - end - - test do - system "#{bin}/juju", "version" - assert_match "No controllers registered", shell_output("#{bin}/juju list-users 2>&1", 1) - assert_match "No controllers registered", shell_output("#{bin}/juju-metadata list-images 2>&1", 2) - end -end diff --git a/Formula/julius.rb b/Formula/julius.rb deleted file mode 100644 index ebbcf7f41e4a5..0000000000000 --- a/Formula/julius.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Julius < Formula - desc "Two-pass large vocabulary continuous speech recognition engine" - homepage "https://github.com/julius-speech/julius" - url "https://github.com/julius-speech/julius/archive/v4.5.tar.gz" - sha256 "d6a087a8c55b656c018638b4d2f7e58c534d4aa87b4dda4dd8a200232dbd0161" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "f336509726e71d8e0a2b0588d8d84833934d75193168e133dd9b647f7cc775e5" => :catalina - sha256 "c21148f0df6124ddb3f790bd2283971dcbac0f56e6679e2fdc8ebbfa0d025a39" => :mojave - sha256 "10b892fb25a00b80bece10ab1bf218f6fad4466d9c5ddc5395ddcf9e6a40df73" => :high_sierra - sha256 "c49edc3178b6d6582a0a82fa3b172acdf7ab7c4b275011853341fa17651ead5f" => :sierra - end - - depends_on "libsndfile" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--mandir=#{man}", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - shell_output("#{bin}/julius --help", 1) - end -end diff --git a/Formula/juman.rb b/Formula/juman.rb deleted file mode 100644 index 5476a0d47b80f..0000000000000 --- a/Formula/juman.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Juman < Formula - desc "Japanese morphological analysis system" - homepage "http://nlp.ist.i.kyoto-u.ac.jp/index.php?JUMAN" - url "http://nlp.ist.i.kyoto-u.ac.jp/nl-resource/juman/juman-7.01.tar.bz2" - sha256 "64bee311de19e6d9577d007bb55281e44299972637bd8a2a8bc2efbad2f917c6" - - bottle do - sha256 "0cb4d99f79b907922d8352e841096301a132ab0f385c75910ab53198b1f72ab7" => :catalina - sha256 "36bae86cd2b24c5b3b4e75aed31ab0cf5da261b7a77e7ffe8a9b279ca3b801d6" => :mojave - sha256 "7e2b144bf77ccdb11ae0166827dd45feae62a950de00310dcb863d7f926a9510" => :high_sierra - sha256 "5c1dfea7f62d1afce55c9d1ed2478f9ff3b1744285fbbf08c29eb171cc672fa7" => :sierra - sha256 "6bd46cdc6ff4e159463f8d4fecda2b803c3054ec28305f3baa1ea4969c4da723" => :el_capitan - sha256 "b2ccfe90011dead77ca0789cbdcdf30aa24e2ebcd3dd19c8d01b6adacbf7c816" => :yosemite - sha256 "f959168856e884fcdadea2d19e9ebfa3ee6cdafb6e133588fce001de677fbe2a" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - result = `echo \xe4\xba\xac\xe9\x83\xbd\xe5\xa4\xa7\xe5\xad\xa6 | juman | md5`.chomp - assert_equal "a5dd58c8ffa618649c5791f67149ab56", result - end -end diff --git a/Formula/jumanpp.rb b/Formula/jumanpp.rb deleted file mode 100644 index 0c46618cc936c..0000000000000 --- a/Formula/jumanpp.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Jumanpp < Formula - desc "Japanese Morphological Analyzer based on RNNLM" - homepage "http://nlp.ist.i.kyoto-u.ac.jp/EN/index.php?JUMAN%2B%2B" - url "https://lotus.kuee.kyoto-u.ac.jp/nl-resource/jumanpp/jumanpp-1.02.tar.xz" - sha256 "01fa519cb1b66c9cccc9778900a4048b69b718e190a17e054453ad14c842e690" - license "Apache-2.0" - - bottle do - sha256 "4b2c208b0954536aa3f2b838a525e2542a547a192a03951c0f8a7f69c082a60d" => :catalina - sha256 "248e639859582dcf3613eb4eaf491e5ada0ed527e89595d6ba110219e8f8ab28" => :mojave - sha256 "87555f0efa065cd86d3344c8304972567d4b8a84ef1c0e53acb09afabbd1fa9e" => :high_sierra - sha256 "afddd3445d86fa1969611b413d0ae460fdaa7b106cdf5edf6ce0bf9d14689a49" => :sierra - sha256 "4b4dd5ca55ba7d380a9a6bc7dda462c3825aa8650e9dc6b131e53fadbf64dc63" => :el_capitan - sha256 "d53d25e49f4bd8cddd2657ee09eeaec56844996b10445c15561be1a12977a888" => :yosemite - end - - depends_on "boost-build" => :build - depends_on "boost" - depends_on "gperftools" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - ENV["LANG"] = "C.UTF-8" # prevent "invalid byte sequence in UTF-8" on sierra build - system bin/"jumanpp", "--version" - - output = <<~EOS - こんにち こんにち こんにち 名詞 6 時相名詞 10 * 0 * 0 "代表表記:今日/こんにち カテゴリ:時間" - は は は 助詞 9 副助詞 2 * 0 * 0 NIL - EOS - - assert_match output, pipe_output(bin/"jumanpp", "echo こんにちは") - end -end diff --git a/Formula/jump.rb b/Formula/jump.rb deleted file mode 100644 index 0a569aae22719..0000000000000 --- a/Formula/jump.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Jump < Formula - desc "Helps you navigate your file system faster by learning your habits" - homepage "https://github.com/gsamokovarov/jump" - url "https://github.com/gsamokovarov/jump/archive/v0.30.1.tar.gz" - sha256 "76d6453246c047b49e669499dc1b6a7e4c4520653627461d84ad40c6afb45562" - license "MIT" - head "https://github.com/gsamokovarov/jump.git" - - bottle do - cellar :any_skip_relocation - sha256 "7399051ba9939abcfbca29e7f371315de6d55d1bd6fa9e1f7aa7d9ee947dd836" => :catalina - sha256 "ba0fecff57b7efe0b984f55ad372bcb06c249f6df9353bab2cc648aef5c48ccf" => :mojave - sha256 "450233293f93a80152625bfa6b965d7aa17dd5ee74f775e8adae414b41177250" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", "#{bin}/jump" - man1.install "man/jump.1" - man1.install "man/j.1" - end - - test do - (testpath/"test_dir").mkpath - ENV["JUMP_HOME"] = testpath.to_s - system "#{bin}/jump", "chdir", "#{testpath}/test_dir" - - assert_equal (testpath/"test_dir").to_s, shell_output("#{bin}/jump cd tdir").chomp - end -end diff --git a/Formula/jupyterlab.rb b/Formula/jupyterlab.rb deleted file mode 100644 index 490e681e430ed..0000000000000 --- a/Formula/jupyterlab.rb +++ /dev/null @@ -1,332 +0,0 @@ -class Jupyterlab < Formula - include Language::Python::Virtualenv - - desc "Interactive environments for writing and running code" - homepage "https://jupyter.org/" - url "https://files.pythonhosted.org/packages/7d/38/d087ace0fee69ea7da3e1bc20c84321a4cde6c8b24629afce247ac828149/jupyterlab-2.1.5.tar.gz" - sha256 "ca7b92491c32b66ad97be4a44d79aa702e4b6c59167e4189d5ce8cc742b15298" - - bottle do - cellar :any - sha256 "8e8a3daa940995cb18659793e481d641bd8390e41655c2460ef3d528fabeafc6" => :catalina - sha256 "b3b56b58eefa6950dfa33654b9df707947d61d0cb87236e61d7973714b8272ac" => :mojave - sha256 "18c303cbf415b8b7860c9e292058929a09b8103b17cf03f4d21188b864a3396d" => :high_sierra - end - - depends_on "ipython" - depends_on "node" - depends_on "pandoc" - depends_on "python@3.8" - depends_on "zeromq" - - uses_from_macos "expect" => :test - - resource "appnope" do - url "https://files.pythonhosted.org/packages/26/34/0f3a5efac31f27fabce64645f8c609de9d925fe2915304d1a40f544cff0e/appnope-0.1.0.tar.gz" - sha256 "8b995ffe925347a2138d7ac0fe77155e4311a0ea6d6da4f5128fe4b3cbe5ed71" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "backcall" do - url "https://files.pythonhosted.org/packages/a2/40/764a663805d84deee23043e1426a9175567db89c8b3287b5c2ad9f71aa93/backcall-0.2.0.tar.gz" - sha256 "5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e" - end - - resource "bleach" do - url "https://files.pythonhosted.org/packages/a9/ac/dc881fca3ac66d6f2c4c3ac46633af4e9c05ed5a0aa2e7e36dc096687dd7/bleach-3.1.5.tar.gz" - sha256 "3c4c520fdb9db59ef139915a5db79f8b51bc2a7257ea0389f30c846883430a4b" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "defusedxml" do - url "https://files.pythonhosted.org/packages/a4/5f/f8aa58ca0cf01cbcee728abc9d88bfeb74e95e6cb4334cfd5bed5673ea77/defusedxml-0.6.0.tar.gz" - sha256 "f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5" - end - - resource "entrypoints" do - url "https://files.pythonhosted.org/packages/b4/ef/063484f1f9ba3081e920ec9972c96664e2edb9fdc3d8669b0e3b8fc0ad7c/entrypoints-0.3.tar.gz" - sha256 "c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "ipykernel" do - url "https://files.pythonhosted.org/packages/4f/e1/c2e346b3bc3710fa5c63dbd6a6c408a407210fbb15367f06dbd55ea3765b/ipykernel-5.3.0.tar.gz" - sha256 "731adb3f2c4ebcaff52e10a855ddc87670359a89c9c784d711e62d66fccdafae" - end - - resource "ipython" do - url "https://files.pythonhosted.org/packages/22/2b/49a79bcd466b50aa0ea12411fa752e74984935363bb93ed5931fd0449309/ipython-7.15.0.tar.gz" - sha256 "0ef1433879816a960cd3ae1ae1dc82c64732ca75cec8dab5a4e29783fb571d0e" - end - - resource "ipython_genutils" do - url "https://files.pythonhosted.org/packages/e8/69/fbeffffc05236398ebfcfb512b6d2511c622871dca1746361006da310399/ipython_genutils-0.2.0.tar.gz" - sha256 "eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8" - end - - resource "jedi" do - url "https://files.pythonhosted.org/packages/2e/86/3ea824e61de521b2abd9ada9a080375c01721e66266ccc8ba8b3576ad88a/jedi-0.17.1.tar.gz" - sha256 "807d5d4f96711a2bcfdd5dfa3b1ae6d09aa53832b182090b222b5efb81f52f63" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - end - - resource "json5" do - url "https://files.pythonhosted.org/packages/8d/b4/d09c00cb7bc88b17118be48f94d4b8d0ce7b572690625ca2b5477e05ce0e/json5-0.9.5.tar.gz" - sha256 "703cfee540790576b56a92e1c6aaa6c4b0d98971dc358ead83812aa4d06bdb96" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" - sha256 "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" - end - - resource "jupyter-client" do - url "https://files.pythonhosted.org/packages/fa/84/440ef480bb829ac648f8e9d7f17c9e2b2470de18ccab989ffa25a64c8c9f/jupyter_client-6.1.3.tar.gz" - sha256 "3a32fa4d0b16d1c626b30c3002a62dfd86d6863ed39eaba3f537fade197bb756" - end - - resource "jupyter-core" do - url "https://files.pythonhosted.org/packages/28/64/8bdde111be57a2a3d54376db29b5f25ab9c68ffd3d6554989db24d5c1b7a/jupyter_core-4.6.3.tar.gz" - sha256 "394fd5dd787e7c8861741880bdf8a00ce39f95de5d18e579c74b882522219e7e" - end - - resource "jupyterlab-server" do - url "https://files.pythonhosted.org/packages/9c/07/72cba43dba5d76edd6ba9552253628cca69f53b7246d0a71a7e22a870d65/jupyterlab_server-1.1.5.tar.gz" - sha256 "3398e401b95da868bc96bdaa44fa61252bf3e68fc9dd1645bd93293cce095f6c" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "mistune" do - url "https://files.pythonhosted.org/packages/2d/a4/509f6e7783ddd35482feda27bc7f72e65b5e7dc910eca4ab2164daf9c577/mistune-0.8.4.tar.gz" - sha256 "59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e" - end - - resource "nbconvert" do - url "https://files.pythonhosted.org/packages/04/f2/299fa4b15155ecbe2aefe7412249f0dd91f953b7a9b37c336317d564a1ca/nbconvert-5.6.1.tar.gz" - sha256 "21fb48e700b43e82ba0e3142421a659d7739b65568cc832a13976a77be16b523" - end - - resource "nbformat" do - url "https://files.pythonhosted.org/packages/95/8e/8ffd07ed059a6277fe2f72d1fa411b49a8e512ad62f2ed20b9c2438192dd/nbformat-5.0.7.tar.gz" - sha256 "54d4d6354835a936bad7e8182dcd003ca3dc0cedfee5a306090e04854343b340" - end - - resource "notebook" do - url "https://files.pythonhosted.org/packages/a9/c8/77ab314f1a0102c50762efcc2b58be99780ddffb88bcd5820e2715e1799e/notebook-6.0.3.tar.gz" - sha256 "47a9092975c9e7965ada00b9a20f0cf637d001db60d241d479f53c0be117ad48" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/55/fd/fc1aca9cf51ed2f2c11748fa797370027babd82f87829c7a8e6dbe720145/packaging-20.4.tar.gz" - sha256 "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8" - end - - resource "pandocfilters" do - url "https://files.pythonhosted.org/packages/4c/ea/236e2584af67bb6df960832731a6e5325fd4441de001767da328c33368ce/pandocfilters-1.4.2.tar.gz" - sha256 "b3dd70e169bb5449e6bc6ff96aea89c5eea8c5f6ab5e207fc2f521a2cf4a0da9" - end - - resource "parso" do - url "https://files.pythonhosted.org/packages/fe/24/c30eb4be8a24b965cfd6e2e6b41180131789b44042112a16f9eb10c80f6e/parso-0.7.0.tar.gz" - sha256 "908e9fae2144a076d72ae4e25539143d40b8e3eafbaeae03c1bfe226f4cdf12c" - end - - resource "pexpect" do - url "https://files.pythonhosted.org/packages/e5/9b/ff402e0e930e70467a7178abb7c128709a30dfb22d8777c043e501bc1b10/pexpect-4.8.0.tar.gz" - sha256 "fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" - end - - resource "pickleshare" do - url "https://files.pythonhosted.org/packages/d8/b6/df3c1c9b616e9c0edbc4fbab6ddd09df9535849c64ba51fcb6531c32d4d8/pickleshare-0.7.5.tar.gz" - sha256 "87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca" - end - - resource "prometheus-client" do - url "https://files.pythonhosted.org/packages/d4/e4/04c85d441194059e063e866847c04dbba11b9428bee8d3b8d086fb9a8c51/prometheus_client-0.8.0.tar.gz" - sha256 "c6e6b706833a6bd1fd51711299edee907857be10ece535126a158f911ee80915" - end - - resource "prompt-toolkit" do - url "https://files.pythonhosted.org/packages/69/19/3aa4bf17e1cbbdfe934eb3d5b394ae9a0a7fb23594a2ff27e0fdaf8b4c59/prompt_toolkit-3.0.5.tar.gz" - sha256 "563d1a4140b63ff9dd587bda9557cffb2fe73650205ab6f4383092fb882e7dc8" - end - - resource "ptyprocess" do - url "https://files.pythonhosted.org/packages/7d/2d/e4b8733cf79b7309d84c9081a4ab558c89d8c89da5961bf4ddb050ca1ce0/ptyprocess-0.6.0.tar.gz" - sha256 "923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "pyrsistent" do - url "https://files.pythonhosted.org/packages/9f/0d/cbca4d0bbc5671822a59f270e4ce3f2195f8a899c97d0d5abb81b191efb5/pyrsistent-0.16.0.tar.gz" - sha256 "28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pyzmq" do - url "https://files.pythonhosted.org/packages/86/08/e5fc492317cc9d65b32d161c6014d733e8ab20b5e78e73eca63f53b17004/pyzmq-19.0.1.tar.gz" - sha256 "13a5638ab24d628a6ade8f794195e1a1acd573496c3b85af2f1183603b7bf5e0" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "Send2Trash" do - url "https://files.pythonhosted.org/packages/13/2e/ea40de0304bb1dc4eb309de90aeec39871b9b7c4bd30f1a3cdcb3496f5c0/Send2Trash-1.5.0.tar.gz" - sha256 "60001cc07d707fe247c94f74ca6ac0d3255aabcb930529690897ca2a39db28b2" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "terminado" do - url "https://files.pythonhosted.org/packages/13/5b/57e995382718d176aba6168632bd15cf5371a7b1205c83a7e4aae0bc6c2e/terminado-0.8.3.tar.gz" - sha256 "4804a774f802306a7d9af7322193c5390f1da0abb429e082a10ef1d46e6fb2c2" - end - - resource "testpath" do - url "https://files.pythonhosted.org/packages/2c/b3/5d57205e896d8998d77ad12aa42ebce75cd97d8b9a97d00ba078c4c9ffeb/testpath-0.4.4.tar.gz" - sha256 "60e0a3261c149755f4399a1fff7d37523179a70fdc3abdf78de9fc2604aeec7e" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/95/84/119a46d494f008969bf0c775cb2c6b3579d3c4cc1bb1b41a022aa93ee242/tornado-6.0.4.tar.gz" - sha256 "0fe2d45ba43b00a41cd73f8be321a44936dc1aba233dee979f17a042b83eb6dc" - end - - resource "traitlets" do - url "https://files.pythonhosted.org/packages/75/b0/43deb021bc943f18f07cbe3dac1d681626a48997b7ffa1e7fb14ef922b21/traitlets-4.3.3.tar.gz" - sha256 "d023ee369ddd2763310e4c3eae1ff649689440d4ae59d7485eb4cfbbe3e359f7" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/2e/30/268d9d3ed18439b6983a8e630cd52d81fd7460a152d6e801d1b8394e51a1/wcwidth-0.2.4.tar.gz" - sha256 "8c6b5b6ee1360b842645f336d9e5d68c55817c26d3050f46b235ef2bc650e48f" - 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, Formula["python@3.8"].opt_bin/"python3") - ENV["JUPYTER_PATH"] = etc/"jupyter" - - # gather packages to link based on options - linked = %w[jupyter-core jupyter-client nbformat ipykernel jupyter-console nbconvert notebook] - dependencies = resources.map(&:name).to_set - linked - dependencies.each do |r| - venv.pip_install resource(r) - end - venv.pip_install_and_link linked - venv.pip_install_and_link buildpath - - # remove bundled kernel - rm_rf Dir["#{libexec}/share/jupyter/kernels"] - - # install completion - resource("jupyter-core").stage do - bash_completion.install "examples/jupyter-completion.bash" => "jupyter" - zsh_completion.install "examples/completions-zsh" => "_jupyter" - end - end - - def caveats - <<~EOS - Additional kernels can be installed into the shared jupyter directory - #{etc}/jupyter - EOS - end - - test do - system bin/"jupyter-console --help" - assert_match "python3", shell_output("#{bin}/jupyter kernelspec list") - - (testpath/"console.exp").write <<~EOS - spawn #{bin}/jupyter-console - expect "In " - send "exit\r" - EOS - assert_match "Jupyter console", shell_output("expect -f console.exp") - - (testpath/"notebook.exp").write <<~EOS - spawn #{bin}/jupyter-notebook --no-browser - expect "NotebookApp" - EOS - assert_match "NotebookApp", shell_output("expect -f notebook.exp") - - (testpath/"nbconvert.ipynb").write <<~EOS - { - "cells": [] - } - EOS - system bin/"jupyter-nbconvert", "nbconvert.ipynb" - assert_predicate testpath/"nbconvert.html", :exist?, "Failed to export HTML" - - assert_match "-F _jupyter", - shell_output("source #{bash_completion}/jupyter && complete -p jupyter") - - version_regexp = Regexp.quote(version.to_s) - - # Ensure that jupyter can load the jupyter lab package. - assert_match /^jupyter lab *: #{version_regexp}$/, - shell_output(bin/"jupyter --version") - - # Ensure that jupyter-lab binary was installed by pip. - assert_match /^#{version_regexp}$/, - shell_output(bin/"jupyter-lab --version") - end -end diff --git a/Formula/just.rb b/Formula/just.rb deleted file mode 100644 index e7adb2355a445..0000000000000 --- a/Formula/just.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Just < Formula - desc "Handy way to save and run project-specific commands" - homepage "https://github.com/casey/just" - url "https://github.com/casey/just/archive/v0.6.1.tar.gz" - sha256 "3707b202a16bc4541cccb26316bc13b3b3853055c47a7a50e7a0e64dca33062a" - - bottle do - cellar :any_skip_relocation - sha256 "f059c7de861f0535890893627ea4b55460cc87b426d3b463acc0769b9dc1fbdb" => :catalina - sha256 "bfa8b1e92a14768ac366411dd78fba441bd13843b11b8199633a0705b115128a" => :mojave - sha256 "f29b4e5b9ad9e4ae72963956293b61b2b7c0f1d01703cc1c57f53486cd4bedce" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - (testpath/"justfile").write <<~EOS - default: - touch it-worked - EOS - system "#{bin}/just" - assert_predicate testpath/"it-worked", :exist? - end -end diff --git a/Formula/jvgrep.rb b/Formula/jvgrep.rb deleted file mode 100644 index 351d7ee5443f4..0000000000000 --- a/Formula/jvgrep.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Jvgrep < Formula - desc "Grep for Japanese users of Vim" - homepage "https://github.com/mattn/jvgrep" - url "https://github.com/mattn/jvgrep/archive/v5.8.8.tar.gz" - sha256 "dc3b5f77189bf8f91d7c8f48e3908dcf4dfea9fd12cd23e71deb54e3ea64d724" - head "https://github.com/mattn/jvgrep.git" - - bottle do - cellar :any_skip_relocation - sha256 "fa73d4fa22c06a91abae4fb577d8000897a95687de102fa09258a2f726801791" => :catalina - sha256 "fa73d4fa22c06a91abae4fb577d8000897a95687de102fa09258a2f726801791" => :mojave - sha256 "fa73d4fa22c06a91abae4fb577d8000897a95687de102fa09258a2f726801791" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args - end - - test do - (testpath/"Hello.txt").write("Hello World!") - system bin/"jvgrep", "Hello World!", testpath - end -end diff --git a/Formula/jvm-mon.rb b/Formula/jvm-mon.rb deleted file mode 100644 index cf0c123d4ed8b..0000000000000 --- a/Formula/jvm-mon.rb +++ /dev/null @@ -1,24 +0,0 @@ -class JvmMon < Formula - desc "Console-based JVM monitoring" - homepage "https://github.com/ajermakovics/jvm-mon" - url "https://github.com/ajermakovics/jvm-mon/releases/download/0.3/jvm-mon-0.3.tar.gz" - sha256 "9b5dd3d280cb52b6e2a9a491451da2ee41c65c770002adadb61b02aa6690c940" - revision 1 - - bottle :unneeded - - depends_on :java => "1.8" - - def install - rm_f Dir["bin/*.bat"] - libexec.install Dir["*"] - - (bin/"jvm-mon").write_env_script "#{libexec}/bin/jvm-mon", - Language::Java.java_home_env("1.8") - system "unzip", "-j", libexec/"lib/j2v8_macosx_x86_64-4.6.0.jar", "libj2v8_macosx_x86_64.dylib", "-d", libexec - end - - test do - system "echo q | #{bin}/jvm-mon" - end -end diff --git a/Formula/jvmtop.rb b/Formula/jvmtop.rb deleted file mode 100644 index bc986009e8df0..0000000000000 --- a/Formula/jvmtop.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Jvmtop < Formula - desc "Console application for monitoring all running JVMs on a machine" - homepage "https://github.com/patric-r/jvmtop" - url "https://github.com/patric-r/jvmtop/releases/download/0.8.0/jvmtop-0.8.0.tar.gz" - sha256 "f9de8159240b400a51b196520b4c4f0ddbcaa8e587fab1f0a59be8a00dc128c4" - license "GPL-2.0" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - rm Dir["*.bat"] - mv "jvmtop.sh", "jvmtop" - chmod 0755, "jvmtop" - - libexec.install Dir["*"] - (bin/"jvmtop").write_env_script(libexec/"jvmtop", Language::Java.java_home_env) - end -end diff --git a/Formula/jxrlib.rb b/Formula/jxrlib.rb deleted file mode 100644 index 9c7b53c3af9fa..0000000000000 --- a/Formula/jxrlib.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Jxrlib < Formula - desc "Tools for JPEG-XR image encoding/decoding" - homepage "https://archive.codeplex.com/?p=jxrlib" - url "https://deb.debian.org/debian/pool/main/j/jxrlib/jxrlib_1.1.orig.tar.gz" - sha256 "c7287b86780befa0914f2eeb8be2ac83e672ebd4bd16dc5574a36a59d9708303" - - bottle do - cellar :any_skip_relocation - sha256 "51c5db55544b873ddbb50eb5681ab3d6ce1552df452bc31f3865d33e36176888" => :catalina - sha256 "923729f8257b2ff225affe4a2a822f2dd40e799ca45be9ac423f04b5e4e603f0" => :mojave - sha256 "6d24053d591022594ab92f880c56da4057a9e4f8d8ecb6f942e3558900385def" => :high_sierra - sha256 "0eb8602ab389d9fff5bce803b085af322309592dc41aa0902b223e353a9f8abc" => :sierra - sha256 "47c308b47ec8227d813a21c8092b32ada9b7f862aef102bf619d6bb19f0144e1" => :el_capitan - sha256 "0dae977caf9e34289c9dd09f7e12bdf7158ccc42d9fa2dc00b4164b82c1caf3f" => :yosemite - sha256 "cc49654146951a561ca6fce7c485f7f3f3511ab5549a7db8263e4e8ddc95e740" => :mavericks - end - - def install - system "make" - # The current stable release (1.1) doesn't have a make 'install' target - lib.install %w[libjxrglue.a libjpegxr.a] - bin.install %w[JxrEncApp JxrDecApp] - include.install %w[common image] - include.install "jxrgluelib" => "glue" - include.install "jxrtestlib" => "test" - doc.install Dir["doc/*"] - end - - test do - bmp = "Qk06AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABgAAAAAAAQAAADDDgAAww4AAAAAAAAAAAAA////AA==".unpack1("m") - infile = "test.bmp" - outfile = "test.jxr" - File.open(infile, "wb") { |f| f.write bmp } - system bin/"JxrEncApp", "-i", infile, "-o", outfile - system bin/"JxrDecApp", "-i", outfile, "-o", infile - end -end diff --git a/Formula/jython.rb b/Formula/jython.rb deleted file mode 100644 index 356dc2880b61f..0000000000000 --- a/Formula/jython.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Jython < Formula - desc "Python implementation written in Java (successor to JPython)" - homepage "https://www.jython.org/" - url "https://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.2/jython-installer-2.7.2.jar" - sha256 "36e40609567ce020a1de0aaffe45e0b68571c278c14116f52e58cc652fb71552" - - # This isn't accidental; there is actually a compile process here. - bottle do - cellar :any_skip_relocation - sha256 "ecac33d533e405e4bd45cdf7023cd334fa655e17446cbfa5231dbf1e580166c5" => :catalina - sha256 "3bd7cbb55035525c113c7608b9e18215b1a214c0f21e45203c900029765ba09f" => :mojave - sha256 "644da593101c796e9b39e10ad7cd65f96e8e0d9ccf19109c8337a1f262ef005a" => :high_sierra - end - - def install - system "java", "-jar", cached_download, "-s", "-d", libexec - bin.install_symlink libexec/"bin/jython" - end - - test do - jython = shell_output("#{bin}/jython -c \"from java.util import Date; print Date()\"") - # This will break in the year 2100. The test will need updating then. - assert_match jython.match(/20\d\d/).to_s, shell_output("/bin/date +%Y") - end -end diff --git a/Formula/k/k2tf.rb b/Formula/k/k2tf.rb new file mode 100644 index 0000000000000..ef0ba192ef8e6 --- /dev/null +++ b/Formula/k/k2tf.rb @@ -0,0 +1,42 @@ +class K2tf < Formula + desc "Kubernetes YAML to Terraform HCL converter" + homepage "https://github.com/sl1pm4t/k2tf" + url "https://github.com/sl1pm4t/k2tf/archive/refs/tags/v0.8.0.tar.gz" + sha256 "9efdac448a99dbdda558eb93b63ed0b3ccabbac43c14df21ef3ba9bd402a4003" + license "MPL-2.0" + head "https://github.com/sl1pm4t/k2tf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2d808b0a5af45f1ef97f4e8da0bfd7d479d255df1e3defb967181ec464507b85" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9e666bb71c6081a4ee995830eb2461f9acce7dc59effc322caec0009d1798b16" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0374e106ff77fb303c7d3a44429f0479b35b15bbc9c8c2548bf9da1189282e8c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "38a42b34afc2e1ab54c527689f0a5ba88a815b99bbd9f5049577d53f57170422" + sha256 cellar: :any_skip_relocation, sonoma: "85b15961f36f64d617228cfac86c173c3a5aa80c40e64442481f053e4647876e" + sha256 cellar: :any_skip_relocation, ventura: "8a1f65789b5060b8e020770642231486d6b9d563645bc4f2ffe9337dfb2d36f0" + sha256 cellar: :any_skip_relocation, monterey: "641bb527c2a11bb9aa649e747b19075098ca04e0575c187b2bf35e0036fc0cae" + sha256 cellar: :any_skip_relocation, arm64_linux: "21ada95d25defedff835157ba130ff2c7ada2bfeef49da4aaf56facb5c11bad3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e36e46f8c6a0361f338cd665cb5b2899a95cd70acf46d2280367b206b24096d" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + + pkgshare.install "test-fixtures" + end + + test do + resource "homebrew-test" do + url "https://raw.githubusercontent.com/sl1pm4t/k2tf/b1ea03a68bd27b34216c080297924c8fa2a2ad36/test-fixtures/service.tf.golden" + sha256 "c970a1f15d2e318a6254b4505610cf75a2c9887e1a7ba3d24489e9e03ea7fe90" + end + + cp pkgshare/"test-fixtures/service.yaml", testpath + testpath.install resource("homebrew-test") + system bin/"k2tf", "-f", "service.yaml", "-o", testpath/"service.tf" + assert compare_file(testpath/"service.tf.golden", testpath/"service.tf") + + assert_match version.to_s, shell_output(bin/"k2tf --version") + end +end diff --git a/Formula/k/k3d.rb b/Formula/k/k3d.rb new file mode 100644 index 0000000000000..68af7f63e9fda --- /dev/null +++ b/Formula/k/k3d.rb @@ -0,0 +1,51 @@ +class K3d < Formula + desc "Little helper to run CNCF's k3s in Docker" + homepage "https://k3d.io/" + url "https://github.com/k3d-io/k3d/archive/refs/tags/v5.8.3.tar.gz" + sha256 "2ef51e029f43e70dcda616de98980017ca7de18848265525bf7882d2bd66f9f2" + license "MIT" + head "https://github.com/k3d-io/k3d.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "227589aab818a49ba6c9238bbd924270a947991be82c54291246720726e15f76" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "227589aab818a49ba6c9238bbd924270a947991be82c54291246720726e15f76" + sha256 cellar: :any_skip_relocation, arm64_ventura: "227589aab818a49ba6c9238bbd924270a947991be82c54291246720726e15f76" + sha256 cellar: :any_skip_relocation, sonoma: "fd519b1002c4600dfa993d201afed7f16e073052ae7e1ebb082a459a4fb1de69" + sha256 cellar: :any_skip_relocation, ventura: "fd519b1002c4600dfa993d201afed7f16e073052ae7e1ebb082a459a4fb1de69" + sha256 cellar: :any_skip_relocation, x86_64_linux: "335ce09025bb68e0a22cc8d22fd89543345a2b6b485a7d6527ef356f7c109984" + end + + depends_on "go" => :build + + def install + require "net/http" + uri = URI("https://update.k3s.io/v1-release/channels") + resp = Net::HTTP.get(uri) + resp_json = JSON.parse(resp) + k3s_version = resp_json["data"].find { |channel| channel["id"]=="stable" }["latest"].sub("+", "-") + + ldflags = %W[ + -s -w + -X github.com/k3d-io/k3d/v#{version.major}/version.Version=v#{version} + -X github.com/k3d-io/k3d/v#{version.major}/version.K3sVersion=#{k3s_version} + ] + + system "go", "build", "-mod=readonly", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"k3d", "completion") + end + + test do + assert_match "k3d version v#{version}", shell_output("#{bin}/k3d version") + # Either docker is not present or it is, where the command will fail in the first case. + # In any case I wouldn't expect a cluster with name 6d6de430dbd8080d690758a4b5d57c86 to be present + # (which is the md5sum of 'homebrew-failing-test') + output = shell_output("#{bin}/k3d cluster get 6d6de430dbd8080d690758a4b5d57c86 2>&1", 1).split("\n").pop + assert_match "No nodes found for given cluster", output + end +end diff --git a/Formula/k/k3sup.rb b/Formula/k/k3sup.rb new file mode 100644 index 0000000000000..42fd9e27ba653 --- /dev/null +++ b/Formula/k/k3sup.rb @@ -0,0 +1,41 @@ +class K3sup < Formula + desc "Utility to create k3s clusters on any local or remote VM" + homepage "https://k3sup.dev/" + url "https://github.com/alexellis/k3sup.git", + tag: "0.13.8", + revision: "ac8e81477f83d2752295fbc7fbd4a2f6f04e7055" + license "MIT" + head "https://github.com/alexellis/k3sup.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f81f7777a1e1f345106e595b7ceffe60aa5bbcb0a9834d3f58eb85bd3c82f9f1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f81f7777a1e1f345106e595b7ceffe60aa5bbcb0a9834d3f58eb85bd3c82f9f1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f81f7777a1e1f345106e595b7ceffe60aa5bbcb0a9834d3f58eb85bd3c82f9f1" + sha256 cellar: :any_skip_relocation, sonoma: "80db85fd32871b46186ad6ac54059ca2eb2a5fb85424ea2107b86402f1cdf8f1" + sha256 cellar: :any_skip_relocation, ventura: "80db85fd32871b46186ad6ac54059ca2eb2a5fb85424ea2107b86402f1cdf8f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "850bc78212e8626eb5062a6589991c31bcf0f02c88485bf615d7b6b07ee9255c" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/alexellis/k3sup/cmd.Version=#{version} + -X github.com/alexellis/k3sup/cmd.GitCommit=#{Utils.git_short_head} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"k3sup", "completion") + end + + test do + output = shell_output("#{bin}/k3sup install 2>&1", 1).split("\n").pop + assert_match "unable to load the ssh key", output + end +end diff --git a/Formula/k/k6.rb b/Formula/k/k6.rb new file mode 100644 index 0000000000000..c5236e71d216d --- /dev/null +++ b/Formula/k/k6.rb @@ -0,0 +1,37 @@ +class K6 < Formula + desc "Modern load testing tool, using Go and JavaScript" + homepage "https://k6.io/" + url "https://github.com/grafana/k6/archive/refs/tags/v1.0.0.tar.gz" + sha256 "790e8a1d1171262095edbd5df5a74f18406d11ea88098560d0f18b7614c8b880" + license "AGPL-3.0-or-later" + head "https://github.com/grafana/k6.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "38ad23f362dcc33ac2b99cc9c5c50a2f8bd46bea7bd79ca32818584f381776b0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "38ad23f362dcc33ac2b99cc9c5c50a2f8bd46bea7bd79ca32818584f381776b0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "38ad23f362dcc33ac2b99cc9c5c50a2f8bd46bea7bd79ca32818584f381776b0" + sha256 cellar: :any_skip_relocation, sonoma: "cf258efa6b268478028b8e1cf2bdc902dafb3d32079fb47602897256a74b72cb" + sha256 cellar: :any_skip_relocation, ventura: "cf258efa6b268478028b8e1cf2bdc902dafb3d32079fb47602897256a74b72cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a23290c9ad12400f796b7a0028190c78938b932610204c3d7d33ad1002850610" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"k6", "completion") + end + + test do + (testpath/"whatever.js").write <<~JS + export default function() { + console.log("whatever"); + } + JS + + assert_match "whatever", shell_output("#{bin}/k6 run whatever.js 2>&1") + + assert_match version.to_s, shell_output("#{bin}/k6 version") + end +end diff --git a/Formula/k/k8sgpt.rb b/Formula/k/k8sgpt.rb new file mode 100644 index 0000000000000..617b77230cf83 --- /dev/null +++ b/Formula/k/k8sgpt.rb @@ -0,0 +1,34 @@ +class K8sgpt < Formula + desc "Scanning your k8s clusters, diagnosing, and triaging issues in simple English" + homepage "https://k8sgpt.ai/" + url "https://github.com/k8sgpt-ai/k8sgpt/archive/refs/tags/v0.4.17.tar.gz" + sha256 "7e2b8649051f10a7b0d5229e7f81cf8d436d4feb6100d152202521f3b271c7c5" + license "Apache-2.0" + head "https://github.com/k8sgpt-ai/k8sgpt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c735ac98d8205eea964e0cfd3c43d952495c50aa6ac417092aaa6d9af5942abb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c2193174a3b3b1e922f2349fc38fa00fa97a08631a55e5bdcb24015ec319d4c3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6876ab18c6d5f548f6df9227d848e94ebb7ceb57d1a1d4f882067730af0b72ef" + sha256 cellar: :any_skip_relocation, sonoma: "3d08733d4899cd6c3a5d82ecd05488ff04176e5b82abddc0339edbb1eedaef61" + sha256 cellar: :any_skip_relocation, ventura: "07e9dd30802b27a9ae2ac8a81889a2ccf3759ac16c02d947499779252562a20d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3ee62d99af2ed6fffc3449f8533b78a02bf194473533f3b086b5ef512580519" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb3871f189c8f9f400ca743015878abb6b10272339b1efb482932de0398464e1" + 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/"k8sgpt", "completion") + end + + test do + output = shell_output("#{bin}/k8sgpt analyze --explain --filter=Service", 1) + assert_match "try setting KUBERNETES_MASTER environment variable", output + + assert_match version.to_s, shell_output("#{bin}/k8sgpt version") + end +end diff --git a/Formula/k/k9s.rb b/Formula/k/k9s.rb new file mode 100644 index 0000000000000..baff3405c3708 --- /dev/null +++ b/Formula/k/k9s.rb @@ -0,0 +1,42 @@ +class K9s < Formula + desc "Kubernetes CLI To Manage Your Clusters In Style!" + homepage "https://k9scli.io/" + url "https://github.com/derailed/k9s.git", + tag: "v0.50.6", + revision: "13cb55bb66272ac4c872a1f6bfa3e820d7d0ca5b" + license "Apache-2.0" + head "https://github.com/derailed/k9s.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5b4782a6a36187c4be44627ea3b1fdf55a5920d891f63ce2c3f26a07635b727a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "000b37707c256307e87a5ce8ad5cdb7e3ee9fc267ce467a8f9106ffba942e9ac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "39d137be443dd9d3cde514cf08d00172499c3caaceecca5cb9af6c0dea77e5de" + sha256 cellar: :any_skip_relocation, sonoma: "f88480359dd74b5bf2e531ac2d559ff3dcd26dc85f6f983e13dd03d0d2b06002" + sha256 cellar: :any_skip_relocation, ventura: "13516cb513b257c631e0901fb0b9a458897a4389dcfaa379c10bfda17f4e0439" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ba23fb906e9c11de1f99f002718e3b27cc81949959b5a6e397a8ff2dda3f384" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92298d177ec5184d1c96a15b658d4c23ed6dee80c09fa51e795028fb3e5b3a7c" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/derailed/k9s/cmd.version=#{version} + -X github.com/derailed/k9s/cmd.commit=#{Utils.git_head} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"k9s", "completion") + end + + test do + assert_match "K9s is a CLI to view and manage your Kubernetes clusters.", + shell_output("#{bin}/k9s --help") + end +end diff --git a/Formula/k/kafka.rb b/Formula/k/kafka.rb new file mode 100644 index 0000000000000..eaecba8a4f477 --- /dev/null +++ b/Formula/k/kafka.rb @@ -0,0 +1,121 @@ +class Kafka < Formula + desc "Open-source distributed event streaming platform" + homepage "https://kafka.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=kafka/4.0.0/kafka_2.13-4.0.0.tgz" + mirror "https://archive.apache.org/dist/kafka/4.0.0/kafka_2.13-4.0.0.tgz" + sha256 "7b852e938bc09de10cd96eca3755258c7d25fb89dbdd76305717607e1835e2aa" + license "Apache-2.0" + + livecheck do + url "https://kafka.apache.org/downloads" + regex(/href=.*?kafka[._-]v?\d+(?:\.\d+)+-(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "73ba51ee035a8ffecc3b205a8272ac62c0529a4e52f48f114ad3e8404405b288" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "73ba51ee035a8ffecc3b205a8272ac62c0529a4e52f48f114ad3e8404405b288" + sha256 cellar: :any_skip_relocation, arm64_ventura: "73ba51ee035a8ffecc3b205a8272ac62c0529a4e52f48f114ad3e8404405b288" + sha256 cellar: :any_skip_relocation, sonoma: "0a40fd21ee87eb2d0bf44f106f3a7d599ebc3a47e64892151b49f76f00897fb0" + sha256 cellar: :any_skip_relocation, ventura: "0a40fd21ee87eb2d0bf44f106f3a7d599ebc3a47e64892151b49f76f00897fb0" + sha256 cellar: :any_skip_relocation, arm64_linux: "73ba51ee035a8ffecc3b205a8272ac62c0529a4e52f48f114ad3e8404405b288" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73ba51ee035a8ffecc3b205a8272ac62c0529a4e52f48f114ad3e8404405b288" + end + + depends_on "openjdk" + + def install + data = var/"lib" + + inreplace "config/server.properties", + "log.dirs=/tmp/kraft-combined-logs", "log.dirs=#{data}/kraft-combined-logs" + inreplace "config/controller.properties", + "log.dirs=/tmp/kraft-controller-logs", "log.dirs=#{data}/kraft-controller-logs" + inreplace "config/connect-standalone.properties", + "filename=/tmp/connect.offsets", "filename=#{data}/connect.offsets" + inreplace "config/broker.properties", + "log.dirs=/tmp/kraft-broker-logs", "log.dirs=#{data}/kraft-broker-logs" + + # remove Windows scripts + rm_r("bin/windows") + + libexec.install "libs" + + prefix.install "bin" + bin.env_script_all_files(libexec/"bin", Language::Java.overridable_java_home_env) + Dir["#{bin}/*.sh"].each { |f| mv f, f.to_s.gsub(/.sh$/, "") } + + mv "config", "kafka" + etc.install "kafka" + libexec.install_symlink etc/"kafka" => "config" + end + + def post_install + # create directory for kafka stdout+stderr output logs when run by launchd + (var/"log/kafka").mkpath + + generate_log_dir(etc/"kafka/server.properties") unless (var/"lib/kraft-combined-logs/meta.properties").exist? + end + + def generate_log_dir(path) + uuid = Utils.safe_popen_read(bin/"kafka-storage", "random-uuid").strip + system bin/"kafka-storage", "format", "--standalone", + "-t", uuid, "-c", path + end + + service do + run [opt_bin/"kafka-server-start", etc/"kafka/server.properties"] + keep_alive true + working_dir HOMEBREW_PREFIX + log_path var/"log/kafka/kafka_output.log" + error_log_path var/"log/kafka/kafka_output.log" + end + + test do + ENV["LOG_DIR"] = "#{testpath}/kafkalog" + + # Workaround for https://issues.apache.org/jira/browse/KAFKA-15413 + # See https://github.com/Homebrew/homebrew-core/pull/133887#issuecomment-1679907729 + ENV.delete "COLUMNS" + + (testpath/"kafka").mkpath + cp "#{etc}/kafka/server.properties", testpath/"kafka" + + kafka_port = free_port + controller_port = free_port + inreplace "#{testpath}/kafka/server.properties" do |s| + s.gsub! "#{var}/lib", testpath + s.gsub! "controller.quorum.bootstrap.servers=localhost:9093", + "controller.quorum.bootstrap.servers=localhost:#{controller_port}" + s.gsub! "listeners=PLAINTEXT://:9092,CONTROLLER://:9093", + "listeners=PLAINTEXT://:#{kafka_port},CONTROLLER://:#{controller_port}" + s.gsub! "advertised.listeners=PLAINTEXT://localhost:9092,CONTROLLER://localhost:9093", + "advertised.listeners=PLAINTEXT://localhost:#{kafka_port},CONTROLLER://localhost:#{controller_port}" + end + + generate_log_dir(testpath/"kafka/server.properties") + + begin + fork do + exec "#{bin}/kafka-server-start #{testpath}/kafka/server.properties " \ + "> #{testpath}/test.kafka-server-start.log 2>&1" + end + + sleep 30 + + system "#{bin}/kafka-topics --bootstrap-server localhost:#{kafka_port} --create --if-not-exists " \ + "--replication-factor 1 --partitions 1 --topic test > #{testpath}/kafka/demo.out " \ + "2>/dev/null" + pipe_output "#{bin}/kafka-console-producer --bootstrap-server localhost:#{kafka_port} --topic test 2>/dev/null", + "test message" + system "#{bin}/kafka-console-consumer --bootstrap-server localhost:#{kafka_port} --topic test " \ + "--from-beginning --max-messages 1 >> #{testpath}/kafka/demo.out 2>/dev/null" + system "#{bin}/kafka-topics --bootstrap-server localhost:#{kafka_port} --delete --topic test " \ + ">> #{testpath}/kafka/demo.out 2>/dev/null" + ensure + system bin/"kafka-server-stop" + sleep 10 + end + + assert_match(/test message/, File.read("#{testpath}/kafka/demo.out")) + end +end diff --git a/Formula/k/kafkactl.rb b/Formula/k/kafkactl.rb new file mode 100644 index 0000000000000..dc51083e032f0 --- /dev/null +++ b/Formula/k/kafkactl.rb @@ -0,0 +1,38 @@ +class Kafkactl < Formula + desc "CLI for managing Apache Kafka" + homepage "https://deviceinsight.github.io/kafkactl/" + url "https://github.com/deviceinsight/kafkactl/archive/refs/tags/v5.7.0.tar.gz" + sha256 "fa3b55d4179ab0c100a9d3d539b1e262ee619d1f99344c89468215bb41474c6d" + license "Apache-2.0" + head "https://github.com/deviceinsight/kafkactl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4685763409834c52c3fbcb962b14d1deb3f0b9df7a5de1c9c1a0675c0aff2e0c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4685763409834c52c3fbcb962b14d1deb3f0b9df7a5de1c9c1a0675c0aff2e0c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4685763409834c52c3fbcb962b14d1deb3f0b9df7a5de1c9c1a0675c0aff2e0c" + sha256 cellar: :any_skip_relocation, sonoma: "5691e36f0f70866d0df11cd1b1fc69e421b9ff327842683f63566d1b66f8c1ab" + sha256 cellar: :any_skip_relocation, ventura: "5691e36f0f70866d0df11cd1b1fc69e421b9ff327842683f63566d1b66f8c1ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1fce6d1066b6b908d8ef983a2b9bf63001c898176d07a2a1b03ffa266985c2c4" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/deviceinsight/kafkactl/v5/cmd.Version=#{version} + -X github.com/deviceinsight/kafkactl/v5/cmd.GitCommit=#{tap.user} + -X github.com/deviceinsight/kafkactl/v5/cmd.BuildTime=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"kafkactl", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/kafkactl version") + + output = shell_output("#{bin}/kafkactl produce greetings 2>&1", 1) + assert_match "Failed to open Kafka producer", output + end +end diff --git a/Formula/k/kahip.rb b/Formula/k/kahip.rb new file mode 100644 index 0000000000000..249783a1e6687 --- /dev/null +++ b/Formula/k/kahip.rb @@ -0,0 +1,40 @@ +class Kahip < Formula + desc "Karlsruhe High Quality Partitioning" + homepage "https://algo2.iti.kit.edu/documents/kahip/index.html" + url "https://github.com/KaHIP/KaHIP/archive/refs/tags/v3.19.tar.gz" + sha256 "ab128104d198061b4dcad76f760aca240b96de781c1b586235ee4f12fd6829c6" + license "MIT" + head "https://github.com/KaHIP/KaHIP.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e35ec707621f77c3931c1ea5a1fc5391aca68b6b17ccd0c2a0939bdc55efd0b5" + sha256 cellar: :any, arm64_sonoma: "70237608f0031ea32bc841583f0f2bd6541b68db482cd91b635b3cbf84375796" + sha256 cellar: :any, arm64_ventura: "b694039fe2f48ddc68966e89b6fbcbc09864eb2bcc3e88edcf38f9da66ccb74a" + sha256 cellar: :any, sonoma: "8d60453b8a94e0ade7f3d3548bc557a0dfd81cead02ad90743fdea32e00ac510" + sha256 cellar: :any, ventura: "0d3b5371c8287d213dfcb1b3414885dd7bd52e1736f6ac4f3c3c27f10468408b" + sha256 cellar: :any_skip_relocation, arm64_linux: "18f3208834cbc20617007ced155eaa640defb1a5a25f9f985226eff7d6278678" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de4b05fc30581f8d2d30972c19d088a25980d69eaf81e657c0f54321a146add5" + end + + depends_on "cmake" => :build + depends_on "open-mpi" + + on_macos do + depends_on "gcc" + end + + fails_with :clang do + cause "needs OpenMP support" + 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}/interface_test") + assert_match "edge cut 2", output + end +end diff --git a/Formula/k/kaitai-struct-compiler.rb b/Formula/k/kaitai-struct-compiler.rb new file mode 100644 index 0000000000000..d1d3ab08d283e --- /dev/null +++ b/Formula/k/kaitai-struct-compiler.rb @@ -0,0 +1,40 @@ +class KaitaiStructCompiler < Formula + desc "Compiler for generating binary data parsers" + homepage "https://kaitai.io/" + # Move to packages.kaitai.io when available. + url "https://github.com/kaitai-io/kaitai_struct_compiler/releases/download/0.10/kaitai-struct-compiler-0.10.zip" + sha256 "3d11d6cc46d058afb4680fda2e7195f645ca03b2843501d652a529646e55d16b" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?kaitai-struct-compiler[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7e88fea45af08e6beb052d86e17199f3a459673089185dbd25904024f430aa6b" + end + + depends_on "openjdk" + + def install + libexec.install Dir["*"] + (bin/"kaitai-struct-compiler").write_env_script libexec/"bin/kaitai-struct-compiler", + JAVA_HOME: Formula["openjdk"].opt_prefix + end + + test do + (testpath/"Test.ksy").write <<~EOS + meta: + id: test + endian: le + file-extension: test + seq: + - id: header + type: u4 + EOS + system bin/"kaitai-struct-compiler", "Test.ksy", "-t", "java", "--outdir", testpath + assert_path_exists testpath/"Test.java" + end +end diff --git a/Formula/k/kakoune.rb b/Formula/k/kakoune.rb new file mode 100644 index 0000000000000..051a1a3f5a003 --- /dev/null +++ b/Formula/k/kakoune.rb @@ -0,0 +1,52 @@ +class Kakoune < Formula + desc "Selection-based modal text editor" + homepage "https://github.com/mawww/kakoune" + url "https://github.com/mawww/kakoune/releases/download/v2024.05.18/kakoune-2024.05.18.tar.bz2" + sha256 "dae8ac2e61d21d9bcd10145aa70b421234309a7b0bc57fad91bc34dbae0cb9fa" + license "Unlicense" + head "https://github.com/mawww/kakoune.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "574e7864ad00cf1450df98b4e6e442d6809018fc3f2f03e517cbb90f512bbb81" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "42850e284b85aad3865b80947c8a2b74644148ec3b05f8e1470f5438453a4f4b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f261b85b550552526b4d3fef66f1da40c4e4d84089196b6d066b3c2a271fbd21" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8a9bde4e123c7b07770794f92dc225da5da862d42c739cbae0d2498d3280a0d7" + sha256 cellar: :any_skip_relocation, sonoma: "301f7dba32850275799750dedaef50a525d004cca2d6439d9aa609a4d00689e1" + sha256 cellar: :any_skip_relocation, ventura: "f4a32d5ed1213ddc0ed831e9974c154023fc623d0fddc2af4aae718115f79482" + sha256 cellar: :any_skip_relocation, monterey: "331edc367fa3a3905e1456d9dea0b3699bc0358281a7ae88f7adf1466ee90c11" + sha256 cellar: :any_skip_relocation, arm64_linux: "44986966430f14e95529bc4403f326e39f14863bbdb3f20bd30cb8b43d134874" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdf7a8135634ef2b09dd76b622d9d852b51c156c09b6e1e0fa11b801cf376310" + end + + uses_from_macos "llvm" => :build, since: :big_sur + + on_linux do + depends_on "binutils" => :build + end + + fails_with :clang do + build 1200 + cause "Requires C++20" + end + + # See + fails_with :gcc do + version "10.2" + cause "Requires GCC >= 10.3" + end + + def install + system "make", "install", "debug=no", "PREFIX=#{prefix}" + end + + test do + system bin/"kak", "-ui", "dummy", "-e", "q" + + assert_match version.to_s, shell_output("#{bin}/kak -version") + end +end diff --git a/Formula/k/kalign.rb b/Formula/k/kalign.rb new file mode 100644 index 0000000000000..fb4fa2e4eb44a --- /dev/null +++ b/Formula/k/kalign.rb @@ -0,0 +1,39 @@ +class Kalign < Formula + desc "Fast multiple sequence alignment program for biological sequences" + homepage "https://github.com/TimoLassmann/kalign" + url "https://github.com/TimoLassmann/kalign/archive/refs/tags/v3.4.0.tar.gz" + sha256 "67d1a562d54b3b7622cc3164588c05b9e2bf8f1a5140bb48a4e816c61a87d4a8" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bc9e036810b16032845850321289b1a916eecb4dfbe3456792c4440f487f5287" + sha256 cellar: :any, arm64_sonoma: "9f9ae5f0efca17061afa699b3e9e489e9cdc5c4a1367658c2dd771ab697820de" + sha256 cellar: :any, arm64_ventura: "5931fed281e39a795d5efcb0f796ef1b9d87ed6962d99d1e593a5360bf919c66" + sha256 cellar: :any, arm64_monterey: "05f998084e702cf47c8db2b57b1ecfbb4339200f66e4279f5a0d343073ae76a7" + sha256 cellar: :any, sonoma: "7f80ae18ffe360b1d6f31d42d77cce95163d1ec97fde57b974cbee067f29a5bf" + sha256 cellar: :any, ventura: "313d8092a9f6e0e471e9a97dca2fdae70ceee837d141957bb092641cf5966b55" + sha256 cellar: :any, monterey: "ee2778193930dbae36b213362a4a7fa8f2aac300d2f570e3b3bb7b54271bbcef" + sha256 cellar: :any_skip_relocation, arm64_linux: "e098fef40fd1ec0ba2a905937c1ca874f0b2cca7c57af25936a6224950e361b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08273483bf1bc24ebef8145163d6e9fa050164951b20988a21829e40ebb8abbf" + end + + depends_on "cmake" => :build + + def install + args = std_cmake_args + %w[ + -DENABLE_AVX=OFF + -DENABLE_AVX2=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + input = ">1\nA\n>2\nA" + (testpath/"test.fa").write(input) + output = shell_output("#{bin}/kalign test.fa") + assert_match input, output + end +end diff --git a/Formula/k/kalker.rb b/Formula/k/kalker.rb new file mode 100644 index 0000000000000..a64698c472bca --- /dev/null +++ b/Formula/k/kalker.rb @@ -0,0 +1,32 @@ +class Kalker < Formula + desc "Full-featured calculator with math syntax" + homepage "https://kalker.strct.net/" + url "https://github.com/PaddiM8/kalker/archive/refs/tags/v2.2.1.tar.gz" + sha256 "a6ccf096301a37d2bbb14fdacfc8c801a8b058b0fd38929639d03c4868564adf" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91f75ce981113d7d6b63574b888ae22023185635dfb5968643fc2b43fca91fea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b0ee506655ff64b7b980067d810d059f9c9be9edf6092a3d74bb234e4212e92b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ec9f56867f6ee6c7e6ad1db5fb877dbbad8c54be4aca84a8a94aa358761eea71" + sha256 cellar: :any_skip_relocation, sonoma: "c091228e608726810a31e9e7e338e7d852c4e0a275218e78bcda94c711a81cf2" + sha256 cellar: :any_skip_relocation, ventura: "f131822bae272a41dc67c5b38459e6dd839858c75002d5f9971753d177c9044e" + sha256 cellar: :any_skip_relocation, arm64_linux: "14aee6e73447828a17a0353fadf9d1d76dcda870509ff84119ba33cd62e05a52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4750ee527662c50e8d604af19a2db3d29c35f5ba40323fa8cbc6755abb7ccdc" + end + + depends_on "rust" => :build + + uses_from_macos "m4" => :build + + def install + cd "cli" do + system "cargo", "install", *std_cargo_args + end + end + + test do + assert_equal shell_output("#{bin}/kalker 'sum(n=1, 3, 2n+1)'").chomp, "= 15" + assert_match version.to_s, shell_output("#{bin}/kalker -h") + end +end diff --git a/Formula/k/kallisto.rb b/Formula/k/kallisto.rb new file mode 100644 index 0000000000000..f1ba0e8326666 --- /dev/null +++ b/Formula/k/kallisto.rb @@ -0,0 +1,42 @@ +class Kallisto < Formula + desc "Quantify abundances of transcripts from RNA-Seq data" + homepage "https://pachterlab.github.io/kallisto/" + url "https://github.com/pachterlab/kallisto/archive/refs/tags/v0.51.1.tar.gz" + sha256 "a8bcc23bca6ac758f15e30bb77e9e169e628beff2da3be2e34a53e1d42253516" + license "BSD-2-Clause" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "952ef6635a1537aeb609ea82597d95e6411a5cf351e5916a5507acf833f9fa0b" + sha256 cellar: :any, arm64_sonoma: "bd9eb12bce6d33e5640a0e0c0fc3f76f8f68c4732e09e22398740132d42af405" + sha256 cellar: :any, arm64_ventura: "1628bb7528f5118ab8a2739b279604dd01fcb6b1175e01fc6c93246e5b6a62eb" + sha256 cellar: :any, sonoma: "872bfc8d27e0c9d83e7c35e67904492807acae02d145d79491289cd1f343fa91" + sha256 cellar: :any, ventura: "368d851057292860af1245b39a7daa8ec873a2bcd64fdc8a6bdbf5186d1f53f8" + sha256 cellar: :any_skip_relocation, arm64_linux: "136b6889873455553eab3ecbd9eafac5180005427d8698309d3c1f53a5cca76a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a85a57db730f00c05d2adeff1493065baa6d23480bd36db9ca5f5e17634f42b9" + end + + depends_on "cmake" => :build + depends_on "hdf5" + + uses_from_macos "zlib" + + def install + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? + ENV.deparallelize + + system "cmake", "-S", ".", "-B", "build", "-DUSE_HDF5=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.fasta").write <<~EOS + >seq0 + FQTWEEFSRAAEKLYLADPMKVRVVLKYRHVDGNLCIKVTDDLVCLVYRTDQAQDVKKIEKF + EOS + + output = shell_output("#{bin}/kallisto index -i test.index test.fasta 2>&1") + assert_match "has 1 contigs and contains 32 k-mers", output + end +end diff --git a/Formula/k/kamal-proxy.rb b/Formula/k/kamal-proxy.rb new file mode 100644 index 0000000000000..eed8f4ec938f7 --- /dev/null +++ b/Formula/k/kamal-proxy.rb @@ -0,0 +1,45 @@ +class KamalProxy < Formula + desc "Lightweight proxy server for Kamal" + homepage "https://kamal-deploy.org/" + url "https://github.com/basecamp/kamal-proxy/archive/refs/tags/v0.9.1.tar.gz" + sha256 "12d8a7ac96c71cbcb46b51b7d004f268a86cb45a44da010a1e524fb6ccd924a7" + license "MIT" + head "https://github.com/basecamp/kamal-proxy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4ef131344c9f0f105992aec587df576bbf7c2413f0ac17993785b3efe1a0e8c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e17166f0d9e23a46713cb7282fc3fb7b8b9ba77abf563760666bf89b8a30e10f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "060e0f6992d77247bb4daf6dcbaaeb0bc53768469c0d1fc1e67dc46b57f01cda" + sha256 cellar: :any_skip_relocation, sonoma: "14815fff3c55b5a86faf522f9f3d060ea30d059908f1ed0fb8c448866fa451ec" + sha256 cellar: :any_skip_relocation, ventura: "7dbb7ea2b7ed3dc7a06fedb1a563ecdb89d18f992d691a14a013398f343f4b83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf8e6876771e9d510a93a42ce58dfed4f1b017ca0895c0ae11016a34168a9feb" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/kamal-proxy" + end + + test do + assert_match "HTTP proxy for zero downtime deployments", shell_output(bin/"kamal-proxy") + + read, write = IO.pipe + port = free_port + pid = fork do + exec "#{bin}/kamal-proxy run --http-port=#{port}", out: write + end + + system "curl -A 'HOMEBREW' http://localhost:#{port} > /dev/null 2>&1" + sleep 2 + + output = read.gets + assert_match "No previous state to restore", output + output = read.gets + assert_match "Server started", output + output = read.gets + assert_match "user_agent\":\"HOMEBREW", output + ensure + Process.kill("HUP", pid) + end +end diff --git a/Formula/k/kamel.rb b/Formula/k/kamel.rb new file mode 100644 index 0000000000000..8617faf2bb8db --- /dev/null +++ b/Formula/k/kamel.rb @@ -0,0 +1,54 @@ +class Kamel < Formula + desc "Apache Camel K CLI" + homepage "https://camel.apache.org/" + url "https://github.com/apache/camel-k/archive/refs/tags/v2.6.0.tar.gz" + sha256 "64cbac848a8dc789062718ec8bc55e51fc95d176587c0c11719560d4d6d22304" + license "Apache-2.0" + head "https://github.com/apache/camel-k.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b0cb6f257d777d5a16c296a1d2f99b072f797930884a08984baf2f6174420329" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b0cb6f257d777d5a16c296a1d2f99b072f797930884a08984baf2f6174420329" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b0cb6f257d777d5a16c296a1d2f99b072f797930884a08984baf2f6174420329" + sha256 cellar: :any_skip_relocation, sonoma: "6f7272988866ceefaa6f9877bdd6cabdbdcc7b35a163c2deb4235fefd8cd3988" + sha256 cellar: :any_skip_relocation, ventura: "6f7272988866ceefaa6f9877bdd6cabdbdcc7b35a163c2deb4235fefd8cd3988" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93d45b6b754b21fdd7ad23ed720227b918d5fd74d2897323c800e7e7417c26f6" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/apache/camel-k/v2/pkg/util/defaults.GitCommit=#{tap.user}-#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/kamel" + + generate_completions_from_executable(bin/"kamel", "completion", shells: [:bash, :zsh]) + end + + test do + run_output = shell_output("#{bin}/kamel 2>&1") + assert_match "Apache Camel K is a lightweight", run_output + + help_output = shell_output("echo $(#{bin}/kamel help 2>&1)") + assert_match "kamel [command] --help", help_output.chomp + + get_output = shell_output("echo $(#{bin}/kamel get 2>&1)") + assert_match "Error: cannot get command client: invalid configuration", get_output + + version_output = shell_output("echo $(#{bin}/kamel version 2>&1)") + assert_match version.to_s, version_output + + reset_output = shell_output("echo $(#{bin}/kamel reset 2>&1)") + assert_match "Error: cannot get command client: invalid configuration", reset_output + + rebuild_output = shell_output("echo $(#{bin}/kamel rebuild 2>&1)") + assert_match "Error: cannot get command client: invalid configuration", rebuild_output + + reset_output = shell_output("echo $(#{bin}/kamel reset 2>&1)") + assert_match "Error: cannot get command client: invalid configuration", reset_output + end +end diff --git a/Formula/k/kanata.rb b/Formula/k/kanata.rb new file mode 100644 index 0000000000000..9dbadfc01fe89 --- /dev/null +++ b/Formula/k/kanata.rb @@ -0,0 +1,53 @@ +class Kanata < Formula + desc "Cross-platform software keyboard remapper for Linux, macOS and Windows" + homepage "https://github.com/jtroo/kanata" + url "https://github.com/jtroo/kanata/archive/refs/tags/v1.8.1.tar.gz" + sha256 "77ca650559fd9b5af283404c9582ffe89182ee9d4ff4154e7e2e483e68eeff8d" + license "LGPL-3.0-only" + head "https://github.com/jtroo/kanata.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "df97ed1a656d62fcba8d9bdc9d5a8904c8dfbbd82b630723b296ce564868151f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c0b74a5893bc0f6bff10502462dac37f9842b47f0bd77cb22cb8148dcefccd07" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ca911a4ad48e270eb8d68f37f02bd447ddca389fcc8dc6138b795408abd3c9d" + sha256 cellar: :any_skip_relocation, sonoma: "0adac8827b4cf033a98aa81e6470a235ba54479e93f075db66ba3c4c0497747d" + sha256 cellar: :any_skip_relocation, ventura: "77ea8034460b27ba5eaa3589cf32af346699dab214334d801d90707fa612c96b" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3a2eb12be9dbf1cb2e431f9ae84554863b6c136fbe48a593dfd1f6e42928201" + sha256 cellar: :any_skip_relocation, x86_64_linux: "924dbdd95380eae94d5e732fa3f0686b1b07c4c34d60f8838b7caab820f706a2" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"kanata.kbd").write <<~LISP + (defsrc + caps grv i + j k l + lsft rsft + ) + + (deflayer default + @cap @grv _ + _ _ _ + _ _ + ) + + (deflayer arrows + _ _ up + left down rght + _ _ + ) + + (defalias + cap (tap-hold-press 200 200 caps lctl) + grv (tap-hold-press 200 200 grv (layer-toggle arrows)) + ) + LISP + + system bin/"kanata", "--check" + end +end diff --git a/Formula/k/kanif.rb b/Formula/k/kanif.rb new file mode 100644 index 0000000000000..371d9ac8e47ef --- /dev/null +++ b/Formula/k/kanif.rb @@ -0,0 +1,32 @@ +class Kanif < Formula + desc "Cluster management and administration tool" + homepage "https://packages.debian.org/stable/net/kanif" + url "https://deb.debian.org/debian/pool/main/k/kanif/kanif_1.2.2.orig.tar.gz" + sha256 "3f0c549428dfe88457c1db293cfac2a22b203f872904c3abf372651ac12e5879" + license "GPL-2.0-or-later" + + livecheck do + url "https://deb.debian.org/debian/pool/main/k/kanif/" + regex(/href=.*?kanif[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f8e0c833384c4479f288c31b55223157190f271ca6489bbcc47cfb8c9c2042e8" + end + + depends_on "taktuk" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match "taktuk -s -c 'ssh' -l brew", + shell_output("#{bin}/kash -q -l brew -r ssh") + end +end diff --git a/Formula/k/kapacitor.rb b/Formula/k/kapacitor.rb new file mode 100644 index 0000000000000..29bd5a6a2607d --- /dev/null +++ b/Formula/k/kapacitor.rb @@ -0,0 +1,134 @@ +class Kapacitor < Formula + desc "Open source time series data processor" + homepage "https://github.com/influxdata/kapacitor" + license "MIT" + head "https://github.com/influxdata/kapacitor.git", branch: "master" + + stable do + url "https://github.com/influxdata/kapacitor.git", + tag: "v1.7.6", + revision: "3347c7d9aec8e031a3eb05f501461fb106c20529" + + # TODO: Remove when release uses flux >= 0.195.0 to get following fix for rust >= 1.78 + # Ref: https://github.com/influxdata/flux/commit/68c831c40b396f0274f6a9f97d77707c39970b02 + resource "flux" do + url "https://github.com/influxdata/flux/archive/refs/tags/v0.194.5.tar.gz" + sha256 "85229c86d307fdecccc7d940902fb83bfbd7cff7a308ace831e2487d36a6a8ca" + + # patch to fix build with rust 1.83, upstream pr ref, https://github.com/influxdata/flux/pull/5516 + patch do + url "https://github.com/influxdata/flux/commit/08b6cb784759242fd1455f1d28e653194745c0c6.patch?full_index=1" + sha256 "3c40b88897c1bd34c70f277e13320148cbee44b8ac7b8029be6bf4f541965302" + end + end + + # build patch to upgrade flux so that it can be built with rust 1.72.0+ + # upstream PR ref, https://github.com/influxdata/kapacitor/pull/2811 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/e1d275be21f72a5d07dfe920c4ce7692f818761e/kapacitor/1.7.6-rust-1.72.patch" + sha256 "4e82470590dcaaac7e56c52f659e31107116e426456b74789daf9364039907f0" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a8247430a0e749413545540c04d418b0adeed5d37d83319e69751596322a1c9d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d56568c7ae7bca2be7324da1c5bdc4fc7f086ff1054a786f0fed2670225ca710" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b5b98fcf4136a43925d791c4c803dbaabd62e5167dca2863343551b6e4a3ac70" + sha256 cellar: :any_skip_relocation, sonoma: "33549402f35a9bb69c36a731c6b24ecf9ac57cec0ecb790a3f8a301b4ced507e" + sha256 cellar: :any_skip_relocation, ventura: "de2e14999f1f6714d3504c183bd35f8b37fed4a4d886b266cf175040fcd37bc0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e963db4b37cde0cba4449f211213422a9ebba18f121a77e2cacfc90e6eb2fc5" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build # for `pkg-config-wrapper` + depends_on "rust" => :build + + # NOTE: The version here is specified in the go.mod of kapacitor. + # If you're upgrading to a newer kapacitor version, check to see if this needs upgraded too. + resource "pkg-config-wrapper" do + url "https://github.com/influxdata/pkg-config/archive/refs/tags/v0.2.12.tar.gz" + sha256 "23b2ed6a2f04d42906f5a8c28c8d681d03d47a1c32435b5df008adac5b935f1a" + end + + def install + if build.stable? + # Workaround to skip dead_code lint. RUSTFLAGS workarounds didn't work. + flux_module = "github.com/influxdata/flux" + flux_version = File.read("go.mod")[/#{flux_module} v(\d+(?:\.\d+)+)/, 1] + odie "Check if `flux` resource can be removed!" if flux_version.blank? || Version.new(flux_version) >= "0.195" + (buildpath/"vendored_flux").install resource("flux") + inreplace "vendored_flux/libflux/flux-core/src/lib.rs", "#![allow(\n", "\\0 dead_code,\n" + (buildpath/"go.work").write <<~GOWORK + go 1.22 + use . + replace #{flux_module} => ./vendored_flux + GOWORK + end + + resource("pkg-config-wrapper").stage do + system "go", "build", *std_go_args, "-o", buildpath/"bootstrap/pkg-config" + end + ENV.prepend_path "PATH", buildpath/"bootstrap" + + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{Utils.git_head} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/kapacitor" + system "go", "build", *std_go_args(ldflags:, output: bin/"kapacitord"), "./cmd/kapacitord" + + inreplace "etc/kapacitor/kapacitor.conf" do |s| + s.gsub! "/var/lib/kapacitor", "#{var}/kapacitor" + s.gsub! "/var/log/kapacitor", "#{var}/log" + end + + etc.install "etc/kapacitor/kapacitor.conf" + end + + def post_install + (var/"kapacitor/replay").mkpath + (var/"kapacitor/tasks").mkpath + end + + service do + run [opt_bin/"kapacitord", "-config", etc/"kapacitor.conf"] + keep_alive successful_exit: false + error_log_path var/"log/kapacitor.log" + log_path var/"log/kapacitor.log" + working_dir var + end + + test do + (testpath/"config.toml").write shell_output("#{bin}/kapacitord config") + + inreplace testpath/"config.toml" do |s| + s.gsub! "disable-subscriptions = false", "disable-subscriptions = true" + s.gsub! %r{data_dir = "/.*/.kapacitor"}, "data_dir = \"#{testpath}/kapacitor\"" + s.gsub! %r{/.*/.kapacitor/replay}, "#{testpath}/kapacitor/replay" + s.gsub! %r{/.*/.kapacitor/tasks}, "#{testpath}/kapacitor/tasks" + s.gsub! %r{/.*/.kapacitor/kapacitor.db}, "#{testpath}/kapacitor/kapacitor.db" + end + + http_port = free_port + ENV["KAPACITOR_URL"] = "http://localhost/#{http_port}" + ENV["KAPACITOR_HTTP_BIND_ADDRESS"] = ":#{http_port}" + ENV["KAPACITOR_INFLUXDB_0_ENABLED"] = "false" + ENV["KAPACITOR_REPORTING_ENABLED"] = "false" + + begin + pid = spawn "#{bin}/kapacitord -config #{testpath}/config.toml" + sleep 20 + shell_output("#{bin}/kapacitor list tasks") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/k/kapp.rb b/Formula/k/kapp.rb new file mode 100644 index 0000000000000..57f885372bb64 --- /dev/null +++ b/Formula/k/kapp.rb @@ -0,0 +1,41 @@ +class Kapp < Formula + desc "CLI tool for Kubernetes users to group and manage bulk resources" + homepage "https://carvel.dev/kapp/" + url "https://github.com/carvel-dev/kapp/archive/refs/tags/v0.64.1.tar.gz" + sha256 "32f79f2e25a8b67e2f8456e1446acaa8bd9a6593680a1afadd33179a87f95d67" + license "Apache-2.0" + head "https://github.com/carvel-dev/kapp.git", branch: "develop" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7ff0deb34460ced94c830822c2afeec04d2f02be064c44cd317f9b1024a3bb7d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ff0deb34460ced94c830822c2afeec04d2f02be064c44cd317f9b1024a3bb7d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7ff0deb34460ced94c830822c2afeec04d2f02be064c44cd317f9b1024a3bb7d" + sha256 cellar: :any_skip_relocation, sonoma: "42dc350969ed21ec5b85cdc93dac10a05b52a8181237260cfb20e0a6f38b9836" + sha256 cellar: :any_skip_relocation, ventura: "42dc350969ed21ec5b85cdc93dac10a05b52a8181237260cfb20e0a6f38b9836" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6cdfdd87b0b11d42bd1e2a77d01e6b054254c89b1d5b412a0e698788f8024757" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X carvel.dev/kapp/pkg/kapp/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/kapp" + + generate_completions_from_executable(bin/"kapp", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/kapp version") + + output = shell_output("#{bin}/kapp list 2>&1", 1) + assert_match "try setting KUBERNETES_MASTER environment variable", output + + output = shell_output("#{bin}/kapp deploy-config") + assert_match "Copy over all metadata (with resourceVersion, etc.)", output + end +end diff --git a/Formula/k/karchive.rb b/Formula/k/karchive.rb new file mode 100644 index 0000000000000..6b4c6fafcfba2 --- /dev/null +++ b/Formula/k/karchive.rb @@ -0,0 +1,77 @@ +class Karchive < Formula + desc "Reading, creating, and manipulating file archives" + homepage "https://api.kde.org/frameworks/karchive/html/index.html" + url "https://download.kde.org/stable/frameworks/6.14/karchive-6.14.0.tar.xz" + sha256 "2cb2f54cb9f8132daf688a5d4acd7f4bec40203b01551ff06e6da1e9f87f0ef9" + license all_of: [ + "BSD-2-Clause", + "LGPL-2.0-only", + "LGPL-2.0-or-later", + any_of: ["LGPL-2.0-only", "LGPL-3.0-only"], + ] + head "https://invent.kde.org/frameworks/karchive.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_sonoma: "0e651267de4d5b6c51562e4ce989ae9b721ef8dbac1fe4168d395a3d16fe4622" + sha256 cellar: :any, arm64_ventura: "d665606c22c83b6fa3e20cdd68457958e73779acd85047e58b7d6c0614adffb0" + sha256 cellar: :any, sonoma: "f57c761c61d43cc49670e32d5e4e1046ca0db4b20130aa5c93a3e98d59dea51d" + sha256 cellar: :any, ventura: "ebba0a022d8b60093901ee21fb0a756d49b302064f8a4f02e743034f5e1e15a9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e1a2d679c1073e15fbe05c9a16d675077b606a39b637775a6f8399725e1e3182" + end + + depends_on "cmake" => [:build, :test] + depends_on "doxygen" => :build + depends_on "extra-cmake-modules" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "qt" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + 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").children, testpath + + examples = %w[ + bzip2gzip + helloworld + tarlocalfiles + unzipper + ] + + examples.each do |example| + inreplace testpath/example/"CMakeLists.txt", /^project\(/, <<~CMAKE + cmake_minimum_required(VERSION 3.5) + \\0 + CMAKE + + system "cmake", "-S", example, "-B", example, *std_cmake_args + system "cmake", "--build", example + end + + ENV["LC_ALL"] = "en_US.UTF-8" + assert_match "The whole world inside a hello.", shell_output("helloworld/helloworld 2>&1") + assert_path_exists testpath/"hello.zip" + + system "unzipper/unzipper", "hello.zip" + assert_path_exists testpath/"world" + + system "tarlocalfiles/tarlocalfiles", "world" + assert_path_exists testpath/"myFiles.tar.gz" + end +end diff --git a/Formula/k/karmadactl.rb b/Formula/k/karmadactl.rb new file mode 100644 index 0000000000000..49ef103ce60f3 --- /dev/null +++ b/Formula/k/karmadactl.rb @@ -0,0 +1,43 @@ +class Karmadactl < Formula + desc "CLI for Karmada control plane" + homepage "https://karmada.io/" + url "https://github.com/karmada-io/karmada/archive/refs/tags/v1.13.2.tar.gz" + sha256 "a5318a196437728b381802bc46237d9b7b6563a3259a19eba85c1e4de03ad425" + license "Apache-2.0" + head "https://github.com/karmada-io/karmada.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "33bf7253e7453dc5742c1b7234c365b84e0a1a6e8c2869cb961b47aa21f68a3f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9e8c55cdc92e41c0a71b92eb6358b0eca97ec602bc5859245460e593e2225038" + sha256 cellar: :any_skip_relocation, arm64_ventura: "26653dd1634b3306c039d057b49fc78e5228793008b34f68d53a594c1af935ab" + sha256 cellar: :any_skip_relocation, sonoma: "ad80360ee1252a9b99de5403bde29d7d75c4559b17ae2d0c9707c1df5fb0204f" + sha256 cellar: :any_skip_relocation, ventura: "4cfade08a6b011814844ad08f6a5eaf8bc0a2beb18608f56015336e684c41ab9" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea7b627988c96f7e68e046543c6c428ae023e332ba074dc150381dc08c4deaf5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b1017bbbf5e977c309b5767d8d037427878bd40fd179adf89d59a161f2f17fce" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/karmada-io/karmada/pkg/version.gitVersion=#{version} + -X github.com/karmada-io/karmada/pkg/version.gitCommit= + -X github.com/karmada-io/karmada/pkg/version.gitTreeState=clean + -X github.com/karmada-io/karmada/pkg/version.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/karmadactl" + + generate_completions_from_executable(bin/"karmadactl", "completion", shells: [:bash, :zsh]) + end + + test do + output = shell_output("#{bin}/karmadactl init 2>&1", 1) + assert_match "Missing or incomplete configuration info", output + + output = shell_output("#{bin}/karmadactl token list 2>&1", 1) + assert_match "failed to list bootstrap tokens", output + + assert_match version.to_s, shell_output("#{bin}/karmadactl version") + end +end diff --git a/Formula/k/karn.rb b/Formula/k/karn.rb new file mode 100644 index 0000000000000..be7f0a5321cd9 --- /dev/null +++ b/Formula/k/karn.rb @@ -0,0 +1,42 @@ +class Karn < Formula + desc "Manage multiple Git identities" + homepage "https://github.com/prydonius/karn" + url "https://github.com/prydonius/karn/archive/refs/tags/v0.1.0.tar.gz" + sha256 "96f10ff263468b9f91244edf16d8ea548c9d281cba9b2597eaf5270f9e6127e3" + license "MIT" + head "https://github.com/prydonius/karn.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "56a2e364302364891e18fb7856a51e2d9bc3143ad3b98d59367b07e632ddd817" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "95ff52d86e20f7f6a02c095f5ad5de883d40d80dc11b40551d9e9ebc8024a590" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2ddacad3313683762032b2d8eb15463f175ed266c8774618c85950eb05492740" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2ddacad3313683762032b2d8eb15463f175ed266c8774618c85950eb05492740" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2ddacad3313683762032b2d8eb15463f175ed266c8774618c85950eb05492740" + sha256 cellar: :any_skip_relocation, sonoma: "5817038e6b709fd657d220bee3d5d9bf8e8824e21e095e9381ff2e4ac5c09eb2" + sha256 cellar: :any_skip_relocation, ventura: "39702da4deba9720c8e7559835351012e44c5906c7f06d9bff276b845d58c573" + sha256 cellar: :any_skip_relocation, monterey: "39702da4deba9720c8e7559835351012e44c5906c7f06d9bff276b845d58c573" + sha256 cellar: :any_skip_relocation, big_sur: "39702da4deba9720c8e7559835351012e44c5906c7f06d9bff276b845d58c573" + sha256 cellar: :any_skip_relocation, arm64_linux: "395f8506a10581db8267170b33441c3728f6f12234905bb64dc60635c4dee024" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d05d6010fc0025f1200c6cb81deac286e22b1a5633833fb3eb99619cd0c2fc8" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/karn/karn.go" + end + + test do + (testpath/".karn.yml").write <<~YAML + --- + #{testpath}: + name: Homebrew Test + email: test@brew.sh + YAML + system "git", "init" + system "git", "config", "--global", "user.name", "Test" + system "git", "config", "--global", "user.email", "test@test.com" + system "git", "config", "--global", "user.signingkey", "test" + system bin/"karn", "update" + end +end diff --git a/Formula/k/kaskade.rb b/Formula/k/kaskade.rb new file mode 100644 index 0000000000000..c545595756a30 --- /dev/null +++ b/Formula/k/kaskade.rb @@ -0,0 +1,212 @@ +class Kaskade < Formula + include Language::Python::Virtualenv + + desc "TUI for Kafka" + homepage "https://github.com/sauljabin/kaskade" + url "https://files.pythonhosted.org/packages/34/1d/468734b0d4acf041dbc50a25562694de23dd732761376b18083b940b1bbf/kaskade-4.0.4.tar.gz" + sha256 "42090569c7b2ad5baf62568dba6bd23064daec643ae12d2d5022651d78edc785" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "c00562049cb58617b3798384fed7ea9e8db238c7d633701e57e9739adb6abc90" + sha256 cellar: :any, arm64_sonoma: "107ff0c7891f36d910c34168507dcdf8769192369b36ed1b57d57ac29d30b797" + sha256 cellar: :any, arm64_ventura: "351c74b3f7245557f61ccf947d6df69343ba18ce4ba51e0d1c8f25c555e75947" + sha256 cellar: :any, sonoma: "b7ff26fd48b6bf67fdbdedf3406a64ebae118f197bc87d6cc520f8d1220702b1" + sha256 cellar: :any, ventura: "9bdeeddf745f71de0099a38552342bd12f059fe6f61712d3390496958c855caa" + sha256 cellar: :any_skip_relocation, arm64_linux: "44bc034f676456efa843e6f02877ed65e465e0316dd0317f5c7d90e7f1626fe9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f14167a9744c12b9595a97e6ae5eca082e18d92fadf4e6155d607063300b182" + end + + depends_on "rust" => :build # for rpds-py + depends_on "certifi" + depends_on "cryptography" + depends_on "librdkafka" + depends_on "python@3.13" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "authlib" do + url "https://files.pythonhosted.org/packages/2a/b3/5f5bc73c6558a21f951ffd267f41c6340d15f5fe0ff4b6bf37694f3558b8/authlib-1.5.2.tar.gz" + sha256 "fe85ec7e50c5f86f1e2603518bb3b4f632985eb4a355e52256530790e326c512" + end + + resource "avro" do + url "https://files.pythonhosted.org/packages/e6/73/48668732bbc8ae1e79b237f84e761204c8dd266c5e16e7601000aba471d3/avro-1.12.0.tar.gz" + sha256 "cad9c53b23ceed699c7af6bddced42e2c572fd6b408c257a7d4fc4e8cf2e2d6b" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "cloup" do + url "https://files.pythonhosted.org/packages/86/c9/3c621e0b7898403556e807244104095df1132a6094384f80c272bba4e4e4/cloup-3.0.7.tar.gz" + sha256 "c852e0a0541aa433c6ab31a9b8b503f63d9881e91ddaf0384d6927965f2b421c" + end + + resource "confluent-kafka" do + url "https://files.pythonhosted.org/packages/a0/c5/22087627478d2cc97b864dd1774c1e2d4007acc22b8f78aec5a7a41f6436/confluent_kafka-2.10.0.tar.gz" + sha256 "30a346908f3ad49c4bc1cb5557e7a8ce484190f8633aa18f9b87b2620809ac13" + end + + resource "fastavro" do + url "https://files.pythonhosted.org/packages/f3/67/7121d2221e998706cac00fa779ec44c1c943cb65e8a7ed1bd57d78d93f2c/fastavro-1.10.0.tar.gz" + sha256 "47bf41ac6d52cdfe4a3da88c75a802321321b37b663a900d12765101a5d6886f" + 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 "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 "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/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" + sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" + 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 "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/19/03/a2ecab526543b152300717cf232bb4bb8605b6edb946c845016fa9c9c9fd/mdit_py_plugins-0.4.2.tar.gz" + sha256 "5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/c8/8c/cf2ac658216eebe49eaedf1e06bc06cbf6a143469236294a1171a51357c3/protobuf-6.30.2.tar.gz" + sha256 "35c859ae076d8c56054c25b59e5e59638d86545ed6e2b6efac6be0b6ea3ba048" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyrsistent" do + url "https://files.pythonhosted.org/packages/ce/3a/5031723c09068e9c8c2f0bc25c3a9245f2b1d1aea8396c787a408f2b95ca/pyrsistent-0.20.0.tar.gz" + sha256 "4c48f78f62ab596c679086084d0dd13254ae4f3d6c72a83ffdf5ebdef8f265a4" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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/d2/c9/b36f65d15452bdca2b186526262ce8759ee8089ae76c3cc8e3fe303cc527/textual-3.1.1.tar.gz" + sha256 "cfb40a820edf77cae1c11fa15056d9e1a731c7bcbc6ab293aafcc139a4e46b6a" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + virtualenv_install_with_resources + end + + test do + r, _w, pid = PTY.spawn("#{bin}/kaskade admin -b localhost:9092") + assert_match "\e[?1049h\e[?1000h\e[?1003h\e[?1015h\e[?1006h\e[?25l", r.readline + + assert_match version.to_s, shell_output("#{bin}/kaskade --version") + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end +end diff --git a/Formula/k/katago.rb b/Formula/k/katago.rb new file mode 100644 index 0000000000000..6f876295f94b9 --- /dev/null +++ b/Formula/k/katago.rb @@ -0,0 +1,93 @@ +class Katago < Formula + desc "Neural Network Go engine with no human-provided knowledge" + homepage "https://github.com/lightvector/KataGo" + # Occasionally check upstream docs in case recommended model/network is changed. + # Ref: https://github.com/lightvector/KataGo?tab=readme-ov-file#other-questions + url "https://github.com/lightvector/KataGo/archive/refs/tags/v1.16.0.tar.gz" + sha256 "1786772c8490fb513522319554dfb41d93ecae4fb35e1b70249f3fe3c75c6cc1" + license all_of: [ + "MIT", + "CC0-1.0", # g170 resources + ] + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5a264e055e864eaac12bd6aaa4319c241ec4aec9d11f0498628ea355ed1fe574" + sha256 cellar: :any, arm64_sonoma: "88a641dbc9b421342f20d11a9cb5fd5e5f7ba73c7dc73548262d83ea026ebffc" + sha256 cellar: :any, arm64_ventura: "b6013659e4c2b58a85154c37561c0411398cf4cf110f80c0403de328b602beb0" + sha256 cellar: :any, sonoma: "4823886c8e5743624206fc1ba979cffbc8becda48dbaf7c08dedf016985e05a9" + sha256 cellar: :any, ventura: "227ee91388879da2b90df699da6fedb7af4179fc184d123b910d79dfbd087c13" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb188bd4509aa99306c47c5b517ad9363aefc52454aa4e8a0882b9e78b800f1d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a51477be4ab6623346dfb2d55f8ec53d14c91f4bee616f26a2515ba4c087ca3d" + end + + depends_on "cmake" => :build + depends_on "libzip" + depends_on macos: :mojave + + uses_from_macos "zlib" + + on_macos do + depends_on "ninja" => :build + end + + on_linux do + depends_on "eigen" => :build + end + + # Using most recent b18c384nbt rather than strongest as it is easier to track + resource "b18c384nbt" do + url "https://media.katagotraining.org/uploaded/networks/models/kata1/kata1-b18c384nbt-s9996604416-d4316597426.bin.gz", using: :nounzip + version "s9996604416-d4316597426" + sha256 "9d7a6afed8ff5b74894727e156f04f0cd36060a24824892008fbb6e0cba51f1d" + + livecheck do + url "https://katagotraining.org/networks/" + regex(/href=.*?kata1[._-]b18c384nbt[._-](s\d+[._-]d\d+)\.bin\.gz/i) + end + end + + # Following resources are final g170 so shouldn't need to be updated + resource "20b-network" do + url "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170e-b20c256x2-s5303129600-d1228401921.bin.gz", using: :nounzip + sha256 "7c8a84ed9ee737e9c7e741a08bf242d63db37b648e7f64942f3a8b1b5101e7c2" + + livecheck do + skip "Final g170 20-block network" + end + end + + resource "40b-network" do + url "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b40c256x2-s5095420928-d1229425124.bin.gz", using: :nounzip + sha256 "2b3a78981d2b6b5fae1cf8972e01bf3e48d2b291bc5e52ef41c9b65c53d59a71" + + livecheck do + skip "Final g170 40-block network" + end + end + + def install + args = ["-DNO_GIT_REVISION=1"] + args += if OS.mac? + ["-DUSE_BACKEND=METAL", "-GNinja"] + else + ["-DUSE_BACKEND=EIGEN"] + end + + system "cmake", "-S", "cpp", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + bin.install "build/katago" + + pkgshare.install "cpp/configs" + resources.each { |r| pkgshare.install r } + end + + test do + system bin/"katago", "version" + assert_match(/All tests passed$/, shell_output("#{bin}/katago runtests").strip) + end +end diff --git a/Formula/k/katana.rb b/Formula/k/katana.rb new file mode 100644 index 0000000000000..0b7f9431bc212 --- /dev/null +++ b/Formula/k/katana.rb @@ -0,0 +1,29 @@ +class Katana < Formula + desc "Crawling and spidering framework" + homepage "https://github.com/projectdiscovery/katana" + url "https://github.com/projectdiscovery/katana/archive/refs/tags/v1.1.3.tar.gz" + sha256 "94d72b9132b536b1125f51c6ee4ddf6b11bf55013a88172fe0fed979799410fc" + license "MIT" + head "https://github.com/projectdiscovery/katana.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6c758ca0022728b3168f6331fb5579737afc480b0b76a5cf894a58bcc5f7b037" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "baa7d2200c443194fff7293766f5b7835a2ebc866d2dff2cfabd0d1ba82198d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0cbaf79f1f6899140543daed881e22daa43e592efb51d24ac240add06c82e087" + sha256 cellar: :any_skip_relocation, sonoma: "f41e84b88cfda58a0f8a6f5e4308e877b9849a532c2e8a81915e698908c58558" + sha256 cellar: :any_skip_relocation, ventura: "a57ed8ac69c5a8c7dd6d43c24e4b5e03c1dd8ef8fd79d65dfbc0b1337abcea0d" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9f1cbff466397ee43e7d860cbb37ab798fcb3d08b4960a0f96f2811f34cc8ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "648813a8db57086ba07fe0957d72b33411e5e48d8169c44933737346a729683c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/katana" + end + + test do + assert_match version.to_s, shell_output("#{bin}/katana -version 2>&1") + assert_match "Started standard crawling", shell_output("#{bin}/katana -u 127.0.0.1 2>&1") + end +end diff --git a/Formula/k/kawa.rb b/Formula/k/kawa.rb new file mode 100644 index 0000000000000..81e6f701f8738 --- /dev/null +++ b/Formula/k/kawa.rb @@ -0,0 +1,34 @@ +class Kawa < Formula + desc "Programming language for Java (implementation of Scheme)" + homepage "https://www.gnu.org/software/kawa/" + url "https://ftp.gnu.org/gnu/kawa/kawa-3.1.1.zip" + mirror "https://ftpmirror.gnu.org/kawa/kawa-3.1.1.zip" + sha256 "dab1f41da968191fc68be856f133e3d02ce65d2dbd577a27e0490f18ca00fa22" + license "MIT" + revision 1 + + livecheck do + url :stable + regex(/href=.*?kawa[._-]v?(\d+(?:\.\d+)+)\.(?:t|zip)/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c7ea8432d31f2ae8fdcf5307d328016c728f51db2bc2c76f10161d7c40fcb962" + end + + depends_on "openjdk" + + def install + rm Dir["bin/*.bat"] + inreplace "bin/kawa", "thisfile=`command -v $0`", + "thisfile=#{libexec}/bin/kawa" + libexec.install "bin", "lib" + (bin/"kawa").write_env_script libexec/"bin/kawa", JAVA_HOME: Formula["openjdk"].opt_prefix + doc.install Dir["doc/*"] + end + + test do + system bin/"kawa", "-e", "(import (srfi 1))" + end +end diff --git a/Formula/k/kbld.rb b/Formula/k/kbld.rb new file mode 100644 index 0000000000000..cac4ad1cacc54 --- /dev/null +++ b/Formula/k/kbld.rb @@ -0,0 +1,47 @@ +class Kbld < Formula + desc "Tool for building and pushing container images in development workflows" + homepage "https://carvel.dev/kbld/" + url "https://github.com/carvel-dev/kbld/archive/refs/tags/v0.46.0.tar.gz" + sha256 "e3cdfe735e1711c321b86bf93176125fa262765f1e2df91368615e0fcb9cd41c" + license "Apache-2.0" + head "https://github.com/carvel-dev/kbld.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e5914c94a7d11a87cb50da141d7913119bc5fbddce61e675f7cfe1f089f6b763" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e5914c94a7d11a87cb50da141d7913119bc5fbddce61e675f7cfe1f089f6b763" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e5914c94a7d11a87cb50da141d7913119bc5fbddce61e675f7cfe1f089f6b763" + sha256 cellar: :any_skip_relocation, sonoma: "e16f16bb84b8253db8d6880a2f7fd0b17453304854f5616eebc79b3309cee1a5" + sha256 cellar: :any_skip_relocation, ventura: "e16f16bb84b8253db8d6880a2f7fd0b17453304854f5616eebc79b3309cee1a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0563374feb038a4750aabfa4bad29dd930832fec19cbfae4f9d0d8b12eb963f" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X carvel.dev/kbld/pkg/kbld/version.Version=#{version} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/kbld" + end + + test do + assert_match version.to_s, shell_output("#{bin}/kbld --version") + + test_yaml = testpath/"test.yml" + test_yaml.write <<~YAML + --- + apiVersion: v1 + kind: Pod + metadata: + name: test + spec: + containers: + - name: test + image: nginx:1.14.2 + YAML + + output = shell_output("#{bin}/kbld -f #{test_yaml}") + assert_match "image: index.docker.io/library/nginx@sha256", output + end +end diff --git a/Formula/k/kcat.rb b/Formula/k/kcat.rb new file mode 100644 index 0000000000000..959076fbb8380 --- /dev/null +++ b/Formula/k/kcat.rb @@ -0,0 +1,50 @@ +class Kcat < Formula + desc "Generic command-line non-JVM Apache Kafka producer and consumer" + homepage "https://github.com/edenhill/kcat" + url "https://github.com/edenhill/kcat.git", + tag: "1.7.0", + revision: "f2236ae5d985b9f31631b076df24ca6c33542e61" + license "BSD-2-Clause" + head "https://github.com/edenhill/kcat.git", branch: "master" + + # Upstream sometimes creates a tag with a stable version format but does not + # create a release on GitHub. Versions that are tagged but not released don't + # appear to be appropriate for this formula, so we check releases instead. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "57b88a17bd2e28ef99b15bfb5ae143537a1e8d080ee21d17f10b31331f6ee8ab" + sha256 cellar: :any, arm64_sonoma: "35b9f6d34ab91b4b9ddb69cc07145e3ec1de687b846b3b3d9e670b04f823d2c2" + sha256 cellar: :any, arm64_ventura: "91a40bc28ce360a9fa3d40f9a16917cc91e553f13b8cc6bcecbff98827c9d15d" + sha256 cellar: :any, arm64_monterey: "fd220a7e002772622e581f636e59c4a198ec883cbb813d2b31857d0bf24d089d" + sha256 cellar: :any, arm64_big_sur: "f930080248bb0eff245599536bbc12465c6bf6e256acb283e6d2d5a5d047f11e" + sha256 cellar: :any, sonoma: "a858a7a77b3bed33e236cd61207c56940ca0e98247b535be55558cd851c78fef" + sha256 cellar: :any, ventura: "7f2f0da947ecd7fd93bea3a0b53d4e2f0e2d51e5bd9f2b93b870c20c22f88e26" + sha256 cellar: :any, monterey: "5629c17a2d26e8e36c1e7aa8e54430e004e2d7ef080df3ce6ff6edee4a4eb0e4" + sha256 cellar: :any, big_sur: "c6d947fa5cbdd948ab09082f1c961d21e5a6e565c36cb6ffffdc9712456cafad" + sha256 cellar: :any, catalina: "7125450d67cedf6116bc7e2afb22be2b860a715dc1de6663e4e75936d7eb466e" + sha256 cellar: :any, mojave: "f403c10fd0970ed617e43cbf6fa107cac70cba94633e04c47586a586505b7ec6" + sha256 cellar: :any_skip_relocation, arm64_linux: "79c4bf2db9103177c5ece5c518f0d4d868d7d9a78c1a302c76c6d3b17c7ea456" + sha256 cellar: :any_skip_relocation, x86_64_linux: "954186ec95e9963cafa13f2ec0ac95591adc1a6ab1b82df116468c973c1ba51f" + end + + depends_on "avro-c" + depends_on "librdkafka" + depends_on "libserdes" + depends_on "yajl" + + def install + system "./configure", "--prefix=#{prefix}", + "--enable-json", + "--enable-avro" + system "make" + system "make", "install" + end + + test do + system bin/"kcat", "-X", "list" + end +end diff --git a/Formula/k/kcgi.rb b/Formula/k/kcgi.rb new file mode 100644 index 0000000000000..90dbe3e4e01db --- /dev/null +++ b/Formula/k/kcgi.rb @@ -0,0 +1,66 @@ +class Kcgi < Formula + desc "Minimal CGI and FastCGI library for C/C++" + homepage "https://kristaps.bsd.lv/kcgi/" + url "https://kristaps.bsd.lv/kcgi/snapshots/kcgi-0.13.4.tgz" + sha256 "cc5f75ea75e42ed4f67e9ef831c0387717cedbc65c2261a828bee7956e46a259" + license "ISC" + + livecheck do + url "https://kristaps.bsd.lv/kcgi/snapshots/" + regex(/href=.*?kcgi[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1ede6da1f7d9ea340cc19bf6a539948dd87a0aa20bb179e4c669a7fa94a6bd99" + sha256 cellar: :any, arm64_sonoma: "9da91cadc2de7c8b9736dd73a28f2e9f39f5d7fb25acae212efdb5d6e52a25ef" + sha256 cellar: :any, arm64_ventura: "0314195b4c86b877610fd9035b7906122316bddd3cfaa2982395797a4bb75912" + sha256 cellar: :any, sonoma: "4bd93297c59a4102abb6ddb1ef0e1d53de162e7c71aeb53e8da29824d3a1dbbe" + sha256 cellar: :any, ventura: "ea274424cd3b9f8b69bb7e7a78c89aeda17728716a4b4576b73bdfb8253f5ad1" + sha256 arm64_linux: "a4c08753b73661aee4fd7422ddc709a14bcdf9268a7e1243a20d70a8dafc2fdc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be1d317a28397ff207c48149f3b9d4241bbf44b88f6f712091dfcb5b1f6963a2" + end + + depends_on "bmake" => :build + + uses_from_macos "zlib" + + on_linux do + depends_on "libseccomp" + end + + def install + system "./configure", "MANDIR=#{man}", + "PREFIX=#{prefix}" + # Uncomment CPPFLAGS to enable libseccomp support on Linux, as instructed to in Makefile. + inreplace "Makefile", "#CPPFLAGS", "CPPFLAGS" unless OS.mac? + system "bmake" + system "bmake", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + + int + main(void) + { + struct kreq r; + const char *pages = ""; + + khttp_parse(&r, NULL, 0, &pages, 1, 0); + return 0; + } + C + flags = %W[ + -L#{lib} + -lkcgi + -lz + ] + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/k/kconf.rb b/Formula/k/kconf.rb new file mode 100644 index 0000000000000..f72bfbc76bba7 --- /dev/null +++ b/Formula/k/kconf.rb @@ -0,0 +1,42 @@ +class Kconf < Formula + desc "CLI for managing multiple kubeconfigs" + homepage "https://github.com/particledecay/kconf" + url "https://github.com/particledecay/kconf/archive/refs/tags/v2.0.0.tar.gz" + sha256 "e7fe6750c719caf227890a31e2fd5446972ec3e1e5492180d0a387fe1c3394c0" + license "MIT" + head "https://github.com/particledecay/kconf.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c7ff80bea648574258dd8824d20fba4332346ddb89dc566b6286a674a3a730a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed57d62a2cfcb32f238460071f886311c492f9587ab87cfa3f23eb524e1ef490" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e32cdeb9dfbc9027d5dbce3599fed6d051b2d5a64519b09a766c219b4c829934" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a495204a9089651402915a598e0771df6f1e4818ff7cf37847976f06f0487289" + sha256 cellar: :any_skip_relocation, sonoma: "7c3acf1e1e4b50f0768139f778540093c96566a5524c910b1aeb990ad480180f" + sha256 cellar: :any_skip_relocation, ventura: "3458e12b3ab15a5590da0c8967da531406be70c60c1e701bf40e60a8e42dce70" + sha256 cellar: :any_skip_relocation, monterey: "9c32f638d936965c04287be80f5b25b0a6252b6d87e3a1dabc23db18b57589b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "116d253ca110da35e26bd037ccbec2286fb5d01fb8dfb2d1ced726cb371bc7ec" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/particledecay/kconf/build.Version=#{version} + -X github.com/particledecay/kconf/build.Commit=#{tap.user} + -X github.com/particledecay/kconf/build.Date=#{time.iso8601}" + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"kconf", "completion") + end + + test do + assert_match version.to_s, shell_output(bin/"kconf version") + + output = shell_output(bin/"kconf namespace homebrew 2>&1", 1) + expected = "you must first set a current context before setting a preferred namespace" + assert_match expected, output + end +end diff --git a/Formula/k/kcov.rb b/Formula/k/kcov.rb new file mode 100644 index 0000000000000..ba3342be413be --- /dev/null +++ b/Formula/k/kcov.rb @@ -0,0 +1,57 @@ +class Kcov < Formula + desc "Code coverage tester for compiled programs, Python, and shell scripts" + homepage "https://simonkagstrom.github.io/kcov/" + url "https://github.com/SimonKagstrom/kcov/archive/refs/tags/v43.tar.gz" + sha256 "4cbba86af11f72de0c7514e09d59c7927ed25df7cebdad087f6d3623213b95bf" + license "GPL-2.0-or-later" + head "https://github.com/SimonKagstrom/kcov.git", branch: "master" + + # We check the Git tags because, as of writing, the "latest" release on GitHub + # is a prerelease version (`pre-v40`), so we can't rely on it being correct. + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)*)$/i) + end + + bottle do + sha256 arm64_sequoia: "8687e60acb3aa483967eefded7ad447f69f322af6ce818d183adf1d51eacdf02" + sha256 arm64_sonoma: "94d6789bde6e8890e31d5b572b72fac76ade148172c0899c502349678c5835bf" + sha256 arm64_ventura: "9b67dcb9cc579b68aff46237a149dce6e17f7be5b584b5a9f2b162858b80e29a" + sha256 arm64_monterey: "791011db4ed3b46ab785f7553249de53f848841aeecba334a5a35766e7e80bca" + sha256 sonoma: "2c1319f3032eed31ecd3c41452383a525a44b1a2aa4e7a0a2c0a9094d0e58f91" + sha256 ventura: "62dfd4348ff4fe56aeb5960c04c5e52f25dd3605964c6d9f4a7e460e3b34ff90" + sha256 monterey: "b7205b776c7509a7fa80a4788308604ec44b8bb37496716e547ee7fc0dad1ab4" + sha256 arm64_linux: "d774a02f750227979778f9370a7d24fac97cba505d94fc314d7e73b2bee66042" + sha256 x86_64_linux: "e2854f13f8bf4b6ff6db16c274f95e558eaa9bd61e80f0074556c543b6a4ac5f" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "dwarfutils" + depends_on "openssl@3" + + uses_from_macos "python" => :build + uses_from_macos "curl" + uses_from_macos "zlib" + + on_linux do + depends_on "elfutils" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DSPECIFY_RPATH=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"hello.bash").write <<~EOS + #!/bin/bash + echo "Hello, world!" + EOS + + system bin/"kcov", testpath/"out", testpath/"hello.bash" + assert_path_exists testpath/"out/hello.bash/coverage.json" + end +end diff --git a/Formula/k/kcptun.rb b/Formula/k/kcptun.rb new file mode 100644 index 0000000000000..da469a585a536 --- /dev/null +++ b/Formula/k/kcptun.rb @@ -0,0 +1,57 @@ +class Kcptun < Formula + desc "Stable & Secure Tunnel based on KCP with N:M multiplexing and FEC" + homepage "https://github.com/xtaci/kcptun" + url "https://github.com/xtaci/kcptun/archive/refs/tags/v20250427.tar.gz" + sha256 "345f3df927d9496e1266699e4ab8bea1b559b3874ebea1e240b4cfd3578d2561" + license "MIT" + head "https://github.com/xtaci/kcptun.git", branch: "master" + + # 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(/^v?(\d+(?:\.\d+)*)$/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "919ab411c452e95d7038a9b85fc8543e4371c6ba4302702c8411efd01b4b8ba0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "919ab411c452e95d7038a9b85fc8543e4371c6ba4302702c8411efd01b4b8ba0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "919ab411c452e95d7038a9b85fc8543e4371c6ba4302702c8411efd01b4b8ba0" + sha256 cellar: :any_skip_relocation, sonoma: "a6c2f08ebfb334fcd1574b9cf4a0bf006faabb2b62cb06e2fdb05b33adb892d0" + sha256 cellar: :any_skip_relocation, ventura: "a6c2f08ebfb334fcd1574b9cf4a0bf006faabb2b62cb06e2fdb05b33adb892d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afb4443a3e692c4426a07556a051c32473cf3d539624103b7c0acacf1fc87565" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.VERSION=#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"kcptun_client"), "./client" + system "go", "build", *std_go_args(ldflags:, output: bin/"kcptun_server"), "./server" + + etc.install "dist/local.json.example" => "kcptun_client.json" + end + + service do + run [opt_bin/"kcptun_client", "-c", etc/"kcptun_client.json"] + keep_alive true + log_path var/"log/kcptun.log" + error_log_path var/"log/kcptun.log" + end + + test do + server = fork { exec bin/"kcptun_server", "-t", "1.1.1.1:80" } + client = fork { exec bin/"kcptun_client", "-r", "127.0.0.1:29900", "-l", ":12948" } + sleep 5 + begin + assert_match "cloudflare", shell_output("curl -vI http://127.0.0.1:12948/") + ensure + Process.kill 9, server + Process.wait server + Process.kill 9, client + Process.wait client + end + end +end diff --git a/Formula/k/kdoctools.rb b/Formula/k/kdoctools.rb new file mode 100644 index 0000000000000..ade754803c0f3 --- /dev/null +++ b/Formula/k/kdoctools.rb @@ -0,0 +1,108 @@ +class Kdoctools < Formula + desc "Create documentation from DocBook" + homepage "https://api.kde.org/frameworks/kdoctools/html/index.html" + url "https://download.kde.org/stable/frameworks/6.14/kdoctools-6.14.0.tar.xz" + sha256 "acb9c761e8e10c30f2c32061f64096965459a0513250edf4432f40831a0f536e" + license all_of: [ + "BSD-3-Clause", + "GPL-2.0-or-later", + "LGPL-2.1-or-later", + any_of: ["LGPL-2.1-only", "LGPL-3.0-only"], + ] + head "https://invent.kde.org/frameworks/kdoctools.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_sonoma: "8b4a91f87bf8f1c209c052c502b13cac6dc72d54473c86b05303114c8e0388bc" + sha256 cellar: :any, arm64_ventura: "67a86914bb79cdc6281b39c2773aada61c7f1265ef0148de75669c13920a1e8a" + sha256 cellar: :any, sonoma: "3f8b2ced702ccee1bd044d7aa489dfa5b98d9eeda82c92c6bc649851496bc74c" + sha256 cellar: :any, ventura: "56a3d3e6d77ec3a6a517d6a469f1ac136573a29153f8b7021e5c55d67b740526" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99af23b7ef2bcb011b0d31bb265cace00fd5603a4d602aee7dc6954fb74df70e" + end + + depends_on "cmake" => [:build, :test] + depends_on "doxygen" => :build + depends_on "extra-cmake-modules" => [:build, :test] + depends_on "gettext" => :build + depends_on "ki18n" => :build + depends_on "docbook-xsl" + depends_on "karchive" + depends_on "qt" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "perl" + + resource "URI::Escape" do + on_linux do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.27.tar.gz" + sha256 "11962d8a8a8496906e5d34774affc235a1c95c112d390c0b4171f3e91e9e2a97" + end + end + + def install + if OS.linux? + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + ENV.prepend_path "PERL5LIB", libexec/"lib" + + resource("URI::Escape").stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + end + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_QCH=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install ["cmake", "autotests", "tests"] + end + + test do + qt = Formula["qt"] + qt_major = qt.version.major + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + include(FeatureSummary) + find_package(ECM #{version} NO_MODULE) + set_package_properties(ECM PROPERTIES TYPE REQUIRED) + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "#{pkgshare}/cmake") + find_package(Qt#{qt_major} #{qt.version} REQUIRED Core) + find_package(KF#{qt_major}DocTools REQUIRED) + + find_package(LibXslt) + set_package_properties(LibXslt PROPERTIES TYPE REQUIRED) + + find_package(LibXml2) + set_package_properties(LibXml2 PROPERTIES TYPE REQUIRED) + + if (NOT LIBXML2_XMLLINT_EXECUTABLE) + message(FATAL_ERROR "xmllint is required to process DocBook XML") + endif() + + find_package(DocBookXML4 "4.5") + set_package_properties(DocBookXML4 PROPERTIES TYPE REQUIRED) + + find_package(DocBookXSL) + set_package_properties(DocBookXSL PROPERTIES TYPE REQUIRED) + + remove_definitions(-DQT_NO_CAST_FROM_ASCII) + add_definitions(-DQT_NO_FOREACH) + + add_subdirectory(autotests) + add_subdirectory(tests/create-from-current-dir-test) + add_subdirectory(tests/kdoctools_install-test) + CMAKE + + cp_r (pkgshare/"autotests"), testpath + cp_r (pkgshare/"tests"), testpath + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + end +end diff --git a/Formula/k/kdoctor.rb b/Formula/k/kdoctor.rb new file mode 100644 index 0000000000000..01824b8551355 --- /dev/null +++ b/Formula/k/kdoctor.rb @@ -0,0 +1,45 @@ +class Kdoctor < Formula + desc "Environment diagnostics for Kotlin Multiplatform Mobile app development" + homepage "https://github.com/kotlin/kdoctor" + url "https://github.com/Kotlin/kdoctor/archive/refs/tags/v1.1.0.tar.gz" + sha256 "d0c8cfeb84c49f98e0069aff55897ebdd5b79e6fc2f52744659377732769c7b9" + license "Apache-2.0" + head "https://github.com/Kotlin/kdoctor.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e41df6918eb2c57cc4b16ef1687fb7c1aac3907e93613c166921d00993432ffa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae7b5e68925f38cb7ba4dbe3503da29bffa7b863afb2062cc1bd08b3ed119627" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2bb2c0149a4c88f6e80b7431d5a2bb8a4552a36524127976091655a678cccdd4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "243b8e7f3d9e352eea87a69763ae977a27fd109bbd3d092190ce8080d469f70b" + sha256 cellar: :any_skip_relocation, sonoma: "1109e4a03e28acc679a4816ae81348af33609ed2304d2fed74d8b331e58b4601" + sha256 cellar: :any_skip_relocation, ventura: "a83d0b999afc56ea71f884bf7d23e54cd5b96d5b8ce13e1183fd16616510a0a7" + sha256 cellar: :any_skip_relocation, monterey: "e2ad6b016b9f6ca3904aa6a08c2b98f873836f7b55dfe22706b6657e2a480002" + end + + depends_on "gradle" => :build + depends_on "openjdk" => :build + depends_on xcode: ["12.5", :build] + depends_on :macos + + def install + ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix + mac_suffix = Hardware::CPU.intel? ? "X64" : Hardware::CPU.arch.to_s.capitalize + build_task = "linkReleaseExecutableMacos#{mac_suffix}" + system "gradle", "clean", build_task + bin.install "kdoctor/build/bin/macos#{mac_suffix}/releaseExecutable/kdoctor.kexe" => "kdoctor" + end + + test do + output = shell_output("#{bin}/kdoctor --team-ids") + assert_match "Certificates are not found", output + + output = shell_output(bin/"kdoctor") + assert_match "System", output + assert_match "Java", output + assert_match "Android Studio", output + assert_match "Xcode", output + assert_match "CocoaPods", output + + assert_match version.to_s, shell_output("#{bin}/kdoctor --version") + end +end diff --git a/Formula/k/kea.rb b/Formula/k/kea.rb new file mode 100644 index 0000000000000..7dbc6ba66e89b --- /dev/null +++ b/Formula/k/kea.rb @@ -0,0 +1,67 @@ +class Kea < Formula + desc "DHCP server" + homepage "https://www.isc.org/kea/" + license "MPL-2.0" + + stable do + # NOTE: the livecheck block is a best guess at excluding development versions. + # Check https://www.isc.org/download/#Kea to make sure we're using a stable version. + url "https://ftp.isc.org/isc/kea/2.6.2/kea-2.6.2.tar.gz" + mirror "https://dl.cloudsmith.io/public/isc/kea-2-6/raw/versions/2.6.2/kea-2.6.2.tar.gz" + sha256 "8a50b63103734b59c3b8619ccd6766d2dfee3f02e3a5f9f3abc1cd55f70fa424" + + # Backport support for Boost 1.87.0 + patch do + url "https://gitlab.isc.org/isc-projects/kea/-/commit/81edc181f85395c39964104ef049a195bafb9737.diff" + sha256 "17fd38148482e61be2192b19f7d05628492397d3f7c54e9097a89aeacf030072" + end + end + + livecheck do + url "ftp://ftp.isc.org/isc/kea/" + # Match the final component lazily to avoid matching versions like `1.9.10` as `9.10`. + regex(/v?(\d+\.\d*[02468](?:\.\d+)+?)$/i) + strategy :page_match + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "0140ea7c9ede2d94efc51caadaf12c062c853d7d3d5cc68a26221b7a37226e83" + sha256 arm64_sonoma: "59d717d80b87a2e491e1107105e04f9ef4caaf4d269f458558808777cfceed2e" + sha256 arm64_ventura: "e6a283e858cc2f08b3db91c7941f2eb0cacda7be81e58b00b8520356fe35e394" + sha256 sonoma: "058ce5aeb4d71d54ebf0f6ff98ce7732c8e14d9d509588d48a05d23d488fe8bd" + sha256 ventura: "a9bb4722c39d136fcc2641e78ffacdd58cbe1f3e3fb0fe1120e3141a046242a9" + sha256 arm64_linux: "ceef0b2966ea631be071f02fb710cf6c3eaf319112203dec5977c45a7d30b0f1" + sha256 x86_64_linux: "3db7bc8bbb9a06006c008c199d5412c1e76a771b5d96a769d8014fc65c9ebf4a" + end + + head do + url "https://gitlab.isc.org/isc-projects/kea.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "log4cplus" + depends_on "openssl@3" + + def install + # Workaround to build with Boost 1.87.0+ + ENV.append "CXXFLAGS", "-std=gnu++14" + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + "--sysconfdir=#{etc}", + "--localstatedir=#{var}", + *std_configure_args + system "make", "install" + end + + test do + system sbin/"keactrl", "status" + end +end diff --git a/Formula/k/keep-sorted.rb b/Formula/k/keep-sorted.rb new file mode 100644 index 0000000000000..dbaa61e14d8dc --- /dev/null +++ b/Formula/k/keep-sorted.rb @@ -0,0 +1,50 @@ +class KeepSorted < Formula + desc "Language-agnostic formatter that sorts selected lines" + homepage "https://github.com/google/keep-sorted" + url "https://github.com/google/keep-sorted.git", + tag: "v0.6.1", + revision: "3f9cf7d52cc6832a6752433472925981f89d516f" + license "Apache-2.0" + head "https://github.com/google/keep-sorted.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1d466d5e894f29a85aba011c84521034b3617336ff4197b8212b70f31b4c8344" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d466d5e894f29a85aba011c84521034b3617336ff4197b8212b70f31b4c8344" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d466d5e894f29a85aba011c84521034b3617336ff4197b8212b70f31b4c8344" + sha256 cellar: :any_skip_relocation, sonoma: "8813fb328d8ad157bdbdba961434a978838da64c12fdbffb85b9f620a322c7d9" + sha256 cellar: :any_skip_relocation, ventura: "8813fb328d8ad157bdbdba961434a978838da64c12fdbffb85b9f620a322c7d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9c2b478a8886f9dd91f3b696ceb74843317e782cd5f6793d9658d6f2373efbb" + 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}/keep-sorted --version") + test_file = testpath + "test_input" + test_file.write <<~EOS + line will not be touched. + # keep-sorted start + line 3 + line 1 + line 2 + # keep-sorted end + line will also not be touched. + EOS + expected = <<~EOS + line will not be touched. + # keep-sorted start + line 1 + line 2 + line 3 + # keep-sorted end + line will also not be touched. + EOS + + system bin/"keep-sorted", test_file + assert_equal expected, test_file.read + end +end diff --git a/Formula/k/keepassc.rb b/Formula/k/keepassc.rb new file mode 100644 index 0000000000000..fb573d6de6ea9 --- /dev/null +++ b/Formula/k/keepassc.rb @@ -0,0 +1,44 @@ +class Keepassc < Formula + include Language::Python::Virtualenv + + desc "Curses-based password manager for KeePass v.1.x and KeePassX" + homepage "https://github.com/raymontag/keepassc" + url "https://files.pythonhosted.org/packages/c8/87/a7d40d4a884039e9c967fb2289aa2aefe7165110a425c4fb74ea758e9074/keepassc-1.8.2.tar.gz" + sha256 "2e1fc6ccd5325c6f745f2d0a3bb2be26851b90d2095402dd1481a5c197a7b24e" + license "ISC" + revision 5 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2447d5f8a051b1d15efec850c60e58bd372e871270fe494c9a4882309783fc11" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "95ceec5e889bfc089f375a75b99b516efdf0bfc88a09a2d0ddbee81c53812e5d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "86f49118750ea97315199c2d5b3822e27886649707d35705f51fca775654916c" + sha256 cellar: :any_skip_relocation, sonoma: "57a9a7e5649c8cf0a95930e8ecc11db4f7348bf3de3c532e4c224d9347e67cf8" + sha256 cellar: :any_skip_relocation, ventura: "653a4503ecbbc3d060c0ec6154e5fd564f5ee7496959578796416c057c1228c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "a1a753f9db30ef23098f6e140910789845ffbab1e93af025cc5e98a0ca354166" + sha256 cellar: :any_skip_relocation, x86_64_linux: "46c34fbb29c6d70d3966fb5a4b0e8afa57fe9a58aa68f1a41f2c534dd94c7932" + end + + depends_on "python@3.13" + + resource "kppy" do + url "https://files.pythonhosted.org/packages/c8/d9/6ced04177b4790ccb1ba44e466c5b67f3a1cfe4152fb05ef5f990678f94f/kppy-1.5.2.tar.gz" + sha256 "08fc48462541a891debe8254208fe162bcc1cd40aba3f4ca98286401faf65f28" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/11/dc/e66551683ade663b5f07d7b3bc46434bf703491dbd22ee12d1f979ca828f/pycryptodomex-3.21.0.tar.gz" + sha256 "222d0bd05381dd25c32dd6065c071ebf084212ab79bab4599ba9e6a3e0009e6c" + end + + def install + virtualenv_install_with_resources + man1.install_symlink libexec.glob("share/man/man1/*.1") + end + + test do + # Fetching help is the only non-interactive action we can perform, and since + # interactive actions are un-scriptable, there nothing more we can do. + system bin/"keepassc", "--help" + end +end diff --git a/Formula/k/keeper-commander.rb b/Formula/k/keeper-commander.rb new file mode 100644 index 0000000000000..12697332d1f0d --- /dev/null +++ b/Formula/k/keeper-commander.rb @@ -0,0 +1,213 @@ +class KeeperCommander < Formula + include Language::Python::Virtualenv + + desc "Command-line and SDK interface to Keeper Password Manager" + homepage "https://docs.keeper.io/en/privileged-access-manager/commander-cli/overview" + url "https://files.pythonhosted.org/packages/e9/15/800c62255244e49cdce534099480361c27dcd7ba2003cfeaa1fd6bf6a412/keepercommander-17.0.18.tar.gz" + sha256 "7f94a46a713f25fadbe8d6becad1df142ad03d365b122855f81f3d2891ab7386" + license "MIT" + head "https://github.com/Keeper-Security/Commander.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "8d785f1c5fbd9e803396345751f42e84ab06743bd9242ce78d5232415819114f" + sha256 cellar: :any, arm64_sonoma: "6372e7c40a3fcfe70ccc9a1eec51eb0a6fa810a2b8ece07975474e32a287d2e4" + sha256 cellar: :any, arm64_ventura: "6f9d22ca208b9c443f3e78d40b6b43ba762de953c3cda2d3ff1c1ebf60c05041" + sha256 cellar: :any, sonoma: "f7d29973c9850daa170e3a7987408f723c60e400e14672ceb6337b9333de36b6" + sha256 cellar: :any, ventura: "38bbc586c05a03dff45f9cb666861ac78996d9e4935c82eea295237e21d82b74" + sha256 cellar: :any_skip_relocation, arm64_linux: "918fada16bb8b251a514ab467519fb21a220a7d16081e05cbb755fd34b087cfc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "915908752e6638083e356b5e23cc68036ce9c76542867b37fbb9b010738941ab" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build # bcrypt dependencies + + depends_on "certifi" + depends_on "cryptography" + depends_on "ffmpeg" + depends_on "libvpx" + depends_on "opus" + depends_on "python@3.13" + depends_on "srtp" + + on_macos do + depends_on "openssl@3" + end + + resource "aioice" do + url "https://files.pythonhosted.org/packages/95/a2/45dfab1d5a7f96c48595a5770379acf406cdf02a2cd1ac1729b599322b08/aioice-0.10.1.tar.gz" + sha256 "5c8e1422103448d171925c678fb39795e5fe13d79108bebb00aa75a899c2094a" + end + + resource "aiortc" do + url "https://files.pythonhosted.org/packages/91/60/7bb59c28c6e65e5d74258d392f531f555f12ab519b0f467ffd6b76650c20/aiortc-1.11.0.tar.gz" + sha256 "50b9d86f6cba87d95ce7c6b051949208b48f8062b231837aed8f049045f11a28" + 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 "asciitree" do + url "https://files.pythonhosted.org/packages/2d/6a/885bc91484e1aa8f618f6f0228d76d0e67000b0fdd6090673b777e311913/asciitree-0.3.3.tar.gz" + sha256 "4aa4b9b649f85e3fcb343363d97564aa1fb62e249677f2e18a96765145cc0f6e" + end + + resource "av" do + url "https://files.pythonhosted.org/packages/f8/b6/83129e0337376214b0304893cbf0ad0a54718bb47845517fa5870439ca0b/av-14.2.0.tar.gz" + sha256 "132b5d52ca262b97b0356e8f48cbbe54d0ac232107a722ab8cc8c0c19eafa17b" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/bb/5d/6d7433e0f3cd46ce0b43cd65e1db465ea024dbb8216fb2404e919c2ad77b/bcrypt-4.3.0.tar.gz" + sha256 "3a3fd2204178b6d2adcf09cb4f6426ffef54762577a7c9b54c159008cb288c18" + 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 "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + end + + resource "fido2" do + url "https://files.pythonhosted.org/packages/eb/cc/4529123364d41f342145f2fd775307eaed817cd22810895dea10e15a4d06/fido2-1.2.0.tar.gz" + sha256 "e39f95920122d64283fda5e5581d95a206e704fa42846bfa4662f86aa0d3333b" + 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 "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 "importlib-metadata" do + url "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz" + sha256 "d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000" + end + + resource "keeper-secrets-manager-core" do + url "https://files.pythonhosted.org/packages/c4/b2/1e0fe5d7b64ddb98609a16e35ded1234bd2bb48a67bc302facb27adbdda1/keeper_secrets_manager_core-16.6.6.tar.gz" + sha256 "bda9e733908b34edbac956825fc062e6934894f210d49b0bba1679d167d7be80" + 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 "protobuf" do + url "https://files.pythonhosted.org/packages/c8/8c/cf2ac658216eebe49eaedf1e06bc06cbf6a143469236294a1171a51357c3/protobuf-6.30.2.tar.gz" + sha256 "35c859ae076d8c56054c25b59e5e59638d86545ed6e2b6efac6be0b6ea3ba048" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/ba/d5/861a7daada160fcf6b0393fb741eeb0d0910b039ad7f0cd56c39afdd4a20/pycryptodomex-3.22.0.tar.gz" + sha256 "a1da61bacc22f93a91cbe690e3eb2022a03ab4123690ab16c46abb693a9df63d" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/42/fa/5f682f3db14e14f7b5b7f5008ac24594b93943d1da4facbacff5876624cf/pydantic_core-2.34.1.tar.gz" + sha256 "6bf31628ab6d0e7c7c0372419898c52ef0a447b33ab47c7f62053bd013cc5b09" + end + + resource "pyee" do + url "https://files.pythonhosted.org/packages/95/03/1fd98d5841cd7964a27d729ccf2199602fe05eb7a405c1462eb7277945ed/pyee-13.0.0.tar.gz" + sha256 "b391e3c5a434d1f5118a25615001dbc8f669cf410ab67d04c4d4e07c55481c37" + end + + resource "pylibsrtp" do + url "https://files.pythonhosted.org/packages/54/c8/a59e61f5dd655f5f21033bd643dd31fe980a537ed6f373cdfb49d3a3bd32/pylibsrtp-0.12.0.tar.gz" + sha256 "f5c3c0fb6954e7bb74dc7e6398352740ca67327e6759a199fe852dbc7b84b8ac" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz" + sha256 "b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310" + 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/88/2c/7bb1416c5620485aa793f2de31d3df393d3686aa8a8506d11e10e13c5baf/python_dotenv-1.1.0.tar.gz" + sha256 "41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "keepersecurity.com", shell_output("#{bin}/keeper server") + end +end diff --git a/Formula/k/keepkey-agent.rb b/Formula/k/keepkey-agent.rb new file mode 100644 index 0000000000000..627b83d8e3470 --- /dev/null +++ b/Formula/k/keepkey-agent.rb @@ -0,0 +1,145 @@ +class KeepkeyAgent < Formula + include Language::Python::Virtualenv + + desc "Keepkey Hardware-based SSH/GPG agent" + homepage "https://github.com/romanz/trezor-agent" + url "https://files.pythonhosted.org/packages/65/72/4bf47a7bc8dc93d2ac21672a0db4bc58a78ec5cee3c4bcebd0b4092a9110/keepkey_agent-0.9.0.tar.gz" + sha256 "47c85de0c2ffb53c5d7bd2f4d2230146a416e82511259fad05119c4ef74be70c" + license "LGPL-3.0-only" + revision 9 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "7e90d14fa8b17a73432c81dd5263c8938d838a9c2ca07a6efe92d395ec0afd18" + sha256 cellar: :any, arm64_sonoma: "25a71155c8223d39c8771688dca8688cd393dbdd7576d2bf5c5fc422b395e0ce" + sha256 cellar: :any, arm64_ventura: "bacd017684971a7c487abacccd142604b9e95dbb87feaa33f4df4708b90dcb02" + sha256 cellar: :any, sonoma: "3cb946e6ed2147b95a96498286e46cc78789e84e563d8f7b2d28746835e47da8" + sha256 cellar: :any, ventura: "1d37cf891ee502ab5651ef1dd2a9abd198424ac0968cc81637101ef17f1f17f8" + sha256 cellar: :any_skip_relocation, arm64_linux: "e400a52a8cc55f8dbbc6b782829df1ccbdde1c1a825c496d61572684d679ab7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2d977a585788997b34e907e44f9857618969c795401963147cd53bc9430b09c5" + end + + depends_on "pkgconf" => :build # for hidapi resource + depends_on "cryptography" + depends_on "hidapi" + depends_on "libsodium" # for pynacl + depends_on "libusb" # for libusb1 + depends_on "python@3.13" + + uses_from_macos "libffi" + + 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 "configargparse" do + url "https://files.pythonhosted.org/packages/70/8a/73f1008adfad01cb923255b924b1528727b8270e67cb4ef41eabdc7d783e/ConfigArgParse-1.7.tar.gz" + sha256 "e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + end + + resource "ecdsa" do + url "https://files.pythonhosted.org/packages/5e/d0/ec8ac1de7accdcf18cfe468653ef00afd2f609faf67c423efbd02491051b/ecdsa-0.19.0.tar.gz" + sha256 "60eaad1199659900dd0af521ed462b793bbdf867432b3948e87416ae4caf6bf8" + end + + resource "hidapi" do + url "https://files.pythonhosted.org/packages/bf/6f/90c536b020a8e860f047a2839830a1ade3e1490e67336ecf489b4856eb7b/hidapi-0.14.0.post2.tar.gz" + sha256 "6c0e97ba6b059a309d51b495a8f0d5efbcea8756b640d98b6f6bb9fdef2458ac" + end + + resource "keepkey" do + url "https://files.pythonhosted.org/packages/30/38/558d9a2dd1fd74f50ff4587b4054496ffb69e21ab1138eb448f3e8e2f4a7/keepkey-6.3.1.tar.gz" + sha256 "cef1e862e195ece3e42640a0f57d15a63086fd1dedc8b5ddfcbc9c2657f0bb1e" + 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/af/19/53ecbfb96d6832f2272d13b84658c360802fcfff7c0c497ab8f6bf15ac40/libusb1-3.1.0.tar.gz" + sha256 "4ee9b0a55f8bd0b3ea7017ae919a6c1f439af742c4a4b04543c5fd7af89b828c" + 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 "protobuf" do + url "https://files.pythonhosted.org/packages/55/5b/e3d951e34f8356e5feecacd12a8e3b258a1da6d9a03ad1770f28925f29bc/protobuf-3.20.3.tar.gz" + sha256 "2e3427429c9cffebf259491be0af70189607f365c2f41c7c3764af6f337105f2" + end + + resource "pymsgbox" do + url "https://files.pythonhosted.org/packages/7d/ff/4c6f31a4f08979f12a663f2aeb6c8b765d3bd592e66eaaac445f547bb875/PyMsgBox-1.0.9.tar.gz" + sha256 "2194227de8bff7a3d6da541848705a155dcbb2a06ee120d9f280a1d7f51263ff" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "python-daemon" do + url "https://files.pythonhosted.org/packages/54/cd/d62884732e5d6ff6906234169d06338d53e37243c60cf73679c8942f9e42/python_daemon-3.1.0.tar.gz" + sha256 "fdb621d7e5f46e74b4de1ad6b0fff6e69cd91b4f219de1476190ebdd0f4781df" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/41/6c/a536cc008f38fd83b3c1b98ce19ead13b746b5588c9a0cb9dd9f6ea434bc/semver-3.0.2.tar.gz" + sha256 "6253adb39c70f6e51afed2fa7152bcd414c411286088fb4b9effb133885ab4cc" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/07/37/b31be7e4b9f13b59cde9dcaeff112d401d49e0dc5b37ed4a9fc8fb12f409/setuptools-75.2.0.tar.gz" + sha256 "753bb6ebf1f465a1912e19ed1d41f403a79173a9acf66a42e7e6aec45c3c16ec" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "unidecode" do + url "https://files.pythonhosted.org/packages/f7/89/19151076a006b9ac0dd37b1354e031f5297891ee507eb624755e58e10d3e/Unidecode-1.3.8.tar.gz" + sha256 "cfdb349d46ed3873ece4586b96aa75258726e2fa8ec21d6f00a591d98806c2f4" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/b7/a0/95e9e962c5fd9da11c1e28aa4c0d8210ab277b1ada951d2aee336b505813/wheel-0.44.0.tar.gz" + sha256 "a29c3f2817e95ab89aa4660681ad547c0e9547f20e75b0562fe7723c9a2a9d49" + end + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/keepkey-agent identity@myhost 2>&1", 1) + assert_match "KeepKey not connected", output + end +end diff --git a/Formula/k/keploy.rb b/Formula/k/keploy.rb new file mode 100644 index 0000000000000..17d9e9178307b --- /dev/null +++ b/Formula/k/keploy.rb @@ -0,0 +1,33 @@ +class Keploy < Formula + desc "Testing Toolkit creates test-cases and data mocks from API calls, DB queries" + homepage "https://keploy.io/" + url "https://github.com/keploy/keploy/archive/refs/tags/v2.6.4.tar.gz" + sha256 "5690138639f75cb68448fbd19abee404611503b4eb4657c1120f03fb918ddd17" + license "Apache-2.0" + head "https://github.com/keploy/keploy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c0ee4c9f0ce893e7318c7a3478adaea6451e516eb071446a4b1db1d673c1fb1f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c0ee4c9f0ce893e7318c7a3478adaea6451e516eb071446a4b1db1d673c1fb1f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c0ee4c9f0ce893e7318c7a3478adaea6451e516eb071446a4b1db1d673c1fb1f" + sha256 cellar: :any_skip_relocation, sonoma: "0f579a32870e9180713811cacccfd76edecd54f3f6a6b3e9ab377c6afdc8efea" + sha256 cellar: :any_skip_relocation, ventura: "0f579a32870e9180713811cacccfd76edecd54f3f6a6b3e9ab377c6afdc8efea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ce6eed90000af405c4b91245cc3e4294d5e1086de6f80e0c72c9faddcdd6935" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + end + + test do + system bin/"keploy", "config", "--generate", "--path", testpath + assert_match "# Generated by Keploy", (testpath/"keploy.yml").read + + output = shell_output("#{bin}/keploy templatize --path #{testpath}") + assert_match "No test sets found to templatize", output + + assert_match version.to_s, shell_output("#{bin}/keploy --version") + end +end diff --git a/Formula/k/keptn.rb b/Formula/k/keptn.rb new file mode 100644 index 0000000000000..114f10666148f --- /dev/null +++ b/Formula/k/keptn.rb @@ -0,0 +1,49 @@ +class Keptn < Formula + desc "CLI for keptn.sh, a message-driven control-plane for application delivery" + homepage "https://keptn.sh/" + url "https://github.com/keptn/keptn/archive/refs/tags/1.4.5.tar.gz" + sha256 "2b767fedf0ac9581b914bb6c89720749023cf102d154c283697a653103a3318c" + license "Apache-2.0" + head "https://github.com/keptn/keptn.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6890b7bf9d1147ffb7b3399b83f07fe7302594687bdc560e61ff94bcbcd01483" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "423b33841420a90882c5969217d114ab5deab10ef1c06c79b32b4629daff77ca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c1b1139e9d32bcf7c1cc2f576952aae560568efcb57267267d682944945f0345" + sha256 cellar: :any_skip_relocation, arm64_monterey: "736007fe68b58bc08c475c4cfe1297c609216eb289d507b746652a3737511abb" + sha256 cellar: :any_skip_relocation, sonoma: "6c44a452fe99b5dd940d2cc5ca32d9d38aed9486de7b49e730646ada4b74e4c3" + sha256 cellar: :any_skip_relocation, ventura: "df51b37cc88aeef3a096468048c533c9bec399e0e51630ef0d4b99b00e1f98ca" + sha256 cellar: :any_skip_relocation, monterey: "b70fb2caa668ef82dcb5a46340bb831d055f6922e200edd74f8d6dbc19910b73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9fc0beacc9f716d912ecc6cb638b023c98a87cb079ea782e787f6de36b50b2c1" + end + + disable! date: "2024-12-21", because: :repo_archived + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/keptn/keptn/cli/cmd.Version=#{version} + -X main.KubeServerVersionConstraints="" + ] + + cd buildpath/"cli" do + system "go", "build", *std_go_args(ldflags:) + end + end + + test do + system bin/"keptn", "set", "config", "AutomaticVersionCheck", "false" + system bin/"keptn", "set", "config", "kubeContextCheck", "false" + + assert_match "Keptn CLI version: #{version}", shell_output(bin/"keptn version 2>&1") + + output = shell_output(bin/"keptn status 2>&1", 1) + if OS.mac? + assert_match "Error: credentials not found in native keychain", output + else + assert_match ".keptn/.keptn____keptn: no such file or directory", output + end + end +end diff --git a/Formula/k/kepubify.rb b/Formula/k/kepubify.rb new file mode 100644 index 0000000000000..f4a7dbfb22646 --- /dev/null +++ b/Formula/k/kepubify.rb @@ -0,0 +1,44 @@ +class Kepubify < Formula + desc "Convert ebooks from epub to kepub" + homepage "https://pgaskin.net/kepubify/" + url "https://github.com/pgaskin/kepubify/archive/refs/tags/v4.0.4.tar.gz" + sha256 "a3bf118a8e871b989358cb598746efd6ff4e304cba02fd2960fe35404a586ed5" + license "MIT" + head "https://github.com/pgaskin/kepubify.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "29e8dc9bcdbb61a0f99ebf14a051b7022b216debcbf110352dd68904d935609e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8be21c3880319f056357894fc1f425efd3daf2375f126ab5395e5a4182c74c3e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "254db72d4558093188d4b9e164494549590e7edfa6ec59923db9f73722d1d972" + sha256 cellar: :any_skip_relocation, arm64_monterey: "190fcf71bfa7069608000948821b08e64ebf230bef805c6285d365bf3bc22a04" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "813a2a57f898d3146f374a6c77e15eeba052d434e78d881602d88e5cb8162d1c" + sha256 cellar: :any_skip_relocation, sonoma: "3b3c3a7973aae7ff8579ed1e0cef31cf891d8d7e36defc7b1956bc01a21928f1" + sha256 cellar: :any_skip_relocation, ventura: "44e8ad81f4b4a79af66a6a342a61d2cc35f6fb7266ac7d31eb789761035c95c2" + sha256 cellar: :any_skip_relocation, monterey: "b9944734812a60b9fff0895d49385d3ce15321da417a292e23760ab31ac54135" + sha256 cellar: :any_skip_relocation, big_sur: "07e78d188d1c64ac4ab876f6afb18458419ac056c791c1e2227788136639c3d2" + sha256 cellar: :any_skip_relocation, catalina: "420b866883a73bc7fd2dff37105f09805b4d9f983aee5aec4583dd14a68e609f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e247e97968a140a0ce04a70e3b750e1c6d7e8f50b402fb712cefd20837cfc27a" + end + + depends_on "go" => :build + + def install + %w[ + kepubify + covergen + seriesmeta + ].each do |p| + system "go", "build", *std_go_args(output: bin/p, ldflags: "-s -w -X main.version=#{version}"), "./cmd/#{p}" + end + end + + test do + pdf = test_fixtures("test.pdf") + output = shell_output("#{bin}/kepubify #{pdf} 2>&1", 1) + assert_match "Error: invalid extension", output + + system bin/"kepubify", test_fixtures("test.epub") + assert_path_exists testpath/"test_converted.kepub.epub" + end +end diff --git a/Formula/k/kerl.rb b/Formula/k/kerl.rb new file mode 100644 index 0000000000000..161562b929807 --- /dev/null +++ b/Formula/k/kerl.rb @@ -0,0 +1,24 @@ +class Kerl < Formula + desc "Easy building and installing of Erlang/OTP instances" + homepage "https://github.com/kerl/kerl" + url "https://github.com/kerl/kerl/archive/refs/tags/4.3.1.tar.gz" + sha256 "f1e761fbf49b08c468999a41684f292b943852131fe2cb68a76ea65aaaae9a31" + license "MIT" + head "https://github.com/kerl/kerl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d34f3efbff5f758fdb3677a1c7465fdfd781af94c4b0c87e5fedcc364241f644" + end + + def install + bin.install "kerl" + + bash_completion.install "bash_completion/kerl" + zsh_completion.install "zsh_completion/_kerl" + fish_completion.install "fish_completion/kerl.fish" + end + + test do + system bin/"kerl", "list", "releases" + end +end diff --git a/Formula/k/kertish-dos.rb b/Formula/k/kertish-dos.rb new file mode 100644 index 0000000000000..6c0007d2577b8 --- /dev/null +++ b/Formula/k/kertish-dos.rb @@ -0,0 +1,38 @@ +class KertishDos < Formula + desc "Kertish Object Storage and Cluster Administration CLI" + homepage "https://github.com/freakmaxi/kertish-dos" + url "https://github.com/freakmaxi/kertish-dos/archive/refs/tags/v22.2.0147.tar.gz" + version "22.2.0147-532592" + sha256 "fe76b525762a3240e8c4bc8e6d7caedebf466aec81c1a22f8014d6881c2bdaf6" + license "GPL-3.0-only" + head "https://github.com/freakmaxi/kertish-dos.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7b3abc8c569185063a1ba3d2e6d634c446cad8ee07d4ae36c31221aa875dd6bd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "db21c167e067540fd373e1c963f5ab5b55ed94e642541b457a5806ceb7546db5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "66e15349b37cc6586d55d102d5941565aa0db46e4a5c1cbaa87f5c45b946180d" + sha256 cellar: :any_skip_relocation, sonoma: "58bf87f97fb1e1399d1a09a0de3d9db3ba783c821343ef8de762ba835417b6fe" + sha256 cellar: :any_skip_relocation, ventura: "bfd2942609310c775b5ae27df2a982300f03603edd8745856c3ab0c2d544b3eb" + sha256 cellar: :any_skip_relocation, arm64_linux: "35615629ee3146399af7190ed267eacbad3123c2b0515a91c35b518d41c9dea7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bbca4d722bae4b3f940401a080bdf08f664411b93c161dba75f06686c52e2c94" + end + + depends_on "go" => :build + + def install + cd "fs-tool" do + system "go", "build", *std_go_args(output: bin/"krtfs", ldflags: "-X main.version=#{version}") + end + cd "admin-tool" do + system "go", "build", *std_go_args(output: bin/"krtadm", ldflags: "-X main.version=#{version}") + end + end + + test do + port = free_port + assert_match("failed.\nlocalhost:#{port}: head node is not reachable", + shell_output("#{bin}/krtfs -t localhost:#{port} ls")) + assert_match("localhost:#{port}: manager node is not reachable", + shell_output("#{bin}/krtadm -t localhost:#{port} -get-clusters", 70)) + end +end diff --git a/Formula/k/kettle.rb b/Formula/k/kettle.rb new file mode 100644 index 0000000000000..7cd5047d3b207 --- /dev/null +++ b/Formula/k/kettle.rb @@ -0,0 +1,54 @@ +class Kettle < Formula + desc "Pentaho Data Integration software" + homepage "https://www.hitachivantara.com/en-us/products/pentaho-plus-platform/data-integration-analytics.html" + url "https://privatefilesbucket-community-edition.s3.us-west-2.amazonaws.com/9.4.0.0-343/ce/client-tools/pdi-ce-9.4.0.0-343.zip" + sha256 "e6804fae1a9aa66b92e781e9b2e835d72d56a6adc53dc03e429a847991a334e8" + license "Apache-2.0" + + livecheck do + url "https://www.hitachivantara.com/en-us/products/pentaho-plus-platform/data-integration-analytics/pentaho-community-edition.html" + regex(/href=.*?pdi-ce[._-]v?(\d+(?:\.\d+)+(?:-\d+)?)\.(?:t|zip)/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6844f00620d72aea96200ed1d2abae15a9ade480b7cdbe2fe30e023a18efb4b1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6844f00620d72aea96200ed1d2abae15a9ade480b7cdbe2fe30e023a18efb4b1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6844f00620d72aea96200ed1d2abae15a9ade480b7cdbe2fe30e023a18efb4b1" + sha256 cellar: :any_skip_relocation, sonoma: "47eb4cc6af16734644e1fb4d184deec13348f16e432194842d084309169e202a" + sha256 cellar: :any_skip_relocation, ventura: "47eb4cc6af16734644e1fb4d184deec13348f16e432194842d084309169e202a" + sha256 cellar: :any_skip_relocation, arm64_linux: "6844f00620d72aea96200ed1d2abae15a9ade480b7cdbe2fe30e023a18efb4b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6844f00620d72aea96200ed1d2abae15a9ade480b7cdbe2fe30e023a18efb4b1" + end + + depends_on "openjdk" + + def install + rm_r(Dir["*.{bat}"]) + libexec.install Dir["*"] + + (etc+"kettle").install libexec+"pwd/carte-config-master-8080.xml" => "carte-config.xml" + (etc+"kettle/.kettle").install libexec+"pwd/kettle.pwd" + (etc+"kettle/simple-jndi").mkpath + + (var+"log/kettle").mkpath + + # We don't assume that carte, kitchen or pan are in anyway unique command names so we'll prepend "pdi" + env = { BASEDIR: libexec, JAVA_HOME: Language::Java.java_home } + %w[carte kitchen pan].each do |command| + (bin+"pdi#{command}").write_env_script libexec+"#{command}.sh", env + end + end + + service do + run [opt_bin/"pdicarte", etc/"kettle/carte-config.xml"] + working_dir etc/"kettle" + log_path var/"log/kettle/carte.log" + error_log_path var/"log/kettle/carte.log" + environment_variables KETTLE_HOME: etc/"kettle" + end + + test do + system bin/"pdipan", "-file=#{libexec}/samples/transformations/Encrypt Password.ktr", "-level=RowLevel" + end +end diff --git a/Formula/k/kew.rb b/Formula/k/kew.rb new file mode 100644 index 0000000000000..6aaf54defc41e --- /dev/null +++ b/Formula/k/kew.rb @@ -0,0 +1,58 @@ +class Kew < Formula + desc "Command-line music player" + homepage "https://github.com/ravachol/kew" + url "https://github.com/ravachol/kew/archive/refs/tags/v3.3.2.tar.gz" + sha256 "fb9370e78da2861cbae9ebf2b16e77a4fbba964999fd19e311184b50b117a6ca" + license "GPL-2.0-only" + head "https://github.com/ravachol/kew.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bc78f3d99403655dca8757cb5e8e6de8a21290a112843bd342d7cfdf7793ba93" + sha256 cellar: :any, arm64_sonoma: "7305c92588e8a78f5ae84351952dcb21dc39ca35a89052e44f6db3e2a804e630" + sha256 cellar: :any, arm64_ventura: "cd64bf2f2f29e329eb6f3e8a55d3d11ef7c15493707900388924ca911e77df36" + sha256 cellar: :any, sonoma: "219bd573818a01d2fab477890d823c11f196d8b21888ff0c16418a159931d04b" + sha256 cellar: :any, ventura: "3f0696160fa9fcf6fbbc56de1ae1f51859638fdbedb30d73eeb902f4fbbcc353" + sha256 cellar: :any_skip_relocation, arm64_linux: "82081ff98ae1497433c8c234b17475f5301f56e2b03951ab63f7f2119bfae6e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "822a8fde5ed035a1d31eb4ba714958ec871a3561e3eeac489143f4bbb60c5d76" + end + + depends_on "pkgconf" => :build + depends_on "chafa" + depends_on "faad2" + depends_on "fftw" + depends_on "glib" + depends_on "libogg" + depends_on "libvorbis" + depends_on "opusfile" + depends_on "taglib" + + uses_from_macos "curl" + + on_macos do + depends_on "gettext" + depends_on "opus" + end + + on_linux do + depends_on "libnotify" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + man1.install "docs/kew.1" + end + + test do + ENV["XDG_CONFIG_HOME"] = testpath/".config" + + (testpath/".config/kew").mkpath + (testpath/".config/kew/kewrc").write "" + + system bin/"kew", "path", testpath + + output = shell_output("#{bin}/kew song") + assert_match "No Music found.\nPlease make sure the path is set correctly", output + + assert_match version.to_s, shell_output("#{bin}/kew --version") + end +end diff --git a/Formula/k/keychain.rb b/Formula/k/keychain.rb new file mode 100644 index 0000000000000..f35c2a309ec08 --- /dev/null +++ b/Formula/k/keychain.rb @@ -0,0 +1,29 @@ +class Keychain < Formula + desc "User-friendly front-end to ssh-agent(1)" + homepage "https://www.funtoo.org/Keychain" + url "https://github.com/funtoo/keychain/archive/refs/tags/2.9.4.tar.gz" + sha256 "c233cbb676d72d07c5c7e65ec472a55eae089e5bfa81e0b2714f9cb125835905" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "3560662259f9289c4dc58390e603855d68f68e69bfa0c23f2553bd8c738e50d9" + end + + def install + system "make" + bin.install "keychain" + man1.install "keychain.1" + end + + test do + system bin/"keychain" + hostname = shell_output("hostname").chomp + assert_match "SSH_AGENT_PID", File.read(testpath/".keychain/#{hostname}-sh") + system bin/"keychain", "--stop", "mine" + end +end diff --git a/Formula/k/keydb.rb b/Formula/k/keydb.rb new file mode 100644 index 0000000000000..93a1640660479 --- /dev/null +++ b/Formula/k/keydb.rb @@ -0,0 +1,50 @@ +class Keydb < Formula + desc "Multithreaded fork of Redis" + homepage "https://keydb.dev/" + url "https://github.com/Snapchat/KeyDB/archive/refs/tags/v6.3.4.tar.gz" + sha256 "229190b251f921e05aff7b0d2f04b5676c198131e2abbec1e2cfb2e61215e2f3" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "40b960924a1ec659a01d19cdbc55a99b1f9f25c12920394f4406f602bf364544" + sha256 cellar: :any, arm64_sonoma: "38437979dd3b609815380178028c57880e4e7c4e743aadd5da7721aef2502d3a" + sha256 cellar: :any, arm64_ventura: "010db9d77cfd61aa2195db11eb21e7e30be2b565a2b92c837c69c82bd325a237" + sha256 cellar: :any, arm64_monterey: "eefed6df2c14cfbab28ac8ce65f888d011bed8a1edec7095b891ba2b418ea733" + sha256 cellar: :any, sonoma: "9c96a66a65ad45e31aded15e6a4306d1fc4c97d707a060a3c31bba357310449c" + sha256 cellar: :any, ventura: "0b94cbbcf2ba980719309b3545c5b63fa7328f3067d66dc8686e6db64a13a745" + sha256 cellar: :any, monterey: "ca35b258a5ae50f171e31795616d4fb569a40ae72c12566b511b4442ff91de8a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a30afa2a2f443a1ca41ce65f95f7b5e0db62d12c8048f200dbfbe58324a554f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66f4992328aeaa000bb75107076cb9d05eb8b3ce229e94a51262d33d853af1b7" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "snappy" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "curl" + + on_linux do + depends_on "util-linux" + end + + # Backport fixes for ARM Sonoma + patch do + url "https://github.com/Snapchat/KeyDB/commit/674d9fb7eea1e6cca6ac8da3b2d1a63dc38c9d2b.patch?full_index=1" + sha256 "aa175e61c8a8b5c12f8608afdb20985a558c14cc94f69be43ab3e0e0c999a3bc" + end + patch do + url "https://github.com/Snapchat/KeyDB/commit/603ebb27fb82a27fb98b0feb6749b0f7661a1c4b.patch?full_index=1" + sha256 "3cece0a51cc74606bcfa32f1b745b615078be5c67ba3e97287ce9c5c982c1ba7" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + output = shell_output("#{bin}/keydb-server --test-memory 2") + assert_match "Your memory passed this test", output + end +end diff --git a/Formula/k/keyring.rb b/Formula/k/keyring.rb new file mode 100644 index 0000000000000..153510c220ff3 --- /dev/null +++ b/Formula/k/keyring.rb @@ -0,0 +1,72 @@ +class Keyring < Formula + include Language::Python::Virtualenv + + desc "Easy way to access the system keyring service from python" + homepage "https://github.com/jaraco/keyring" + url "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz" + sha256 "0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b6751512859d21a591e9a129a2ae7280e4d7eebec85895469fac19bb600b8bf6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b6751512859d21a591e9a129a2ae7280e4d7eebec85895469fac19bb600b8bf6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b6751512859d21a591e9a129a2ae7280e4d7eebec85895469fac19bb600b8bf6" + sha256 cellar: :any_skip_relocation, sonoma: "72d5f42d57266df2bf90fdb718f3f4c2198a37afe1dd27d7331ddfd8e6d7eef2" + sha256 cellar: :any_skip_relocation, ventura: "72d5f42d57266df2bf90fdb718f3f4c2198a37afe1dd27d7331ddfd8e6d7eef2" + sha256 cellar: :any_skip_relocation, arm64_linux: "a823152b79eed15240ea7ac5456139abcb62dd5c5c9a2b875b2fdfd965a9e6f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a0f4e4498be2d9179f945f490d44fda8e5621171f578c7610e71d9e2ad70d45" + end + + depends_on "python@3.13" + + on_linux do + depends_on "cryptography" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/d6/f4/154cf374c2daf2020e05c3c6a03c91348d59b23c5366e968feb198306fdf/jeepney-0.8.0.tar.gz" + sha256 "5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/51/78/65922308c4248e0eb08ebcbe67c95d48615cc6f27854b6f2e57143e9178f/more-itertools-10.5.0.tar.gz" + sha256 "5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz" + sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77" + end + + resource "shtab" do + url "https://files.pythonhosted.org/packages/a9/e4/13bf30c7c30ab86a7bc4104b1c943ff2f56c1a07c6d82a71ad034bcef1dc/shtab-1.7.1.tar.gz" + sha256 "4e4bcb02eeb82ec45920a5d0add92eac9c9b63b2804c9196c1f1fdc2d039243c" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"keyring", "--print-completion", shells: [:bash, :zsh]) + end + + test do + assert_empty shell_output("#{bin}/keyring get https://example.com HomebrewTest2", 1) + assert_match "-F _shtab_keyring", + shell_output("bash -c 'source #{bash_completion}/keyring && complete -p keyring'") + end +end diff --git a/Formula/k/keystone.rb b/Formula/k/keystone.rb new file mode 100644 index 0000000000000..7305e80b09242 --- /dev/null +++ b/Formula/k/keystone.rb @@ -0,0 +1,36 @@ +class Keystone < Formula + desc "Assembler framework: Core + bindings" + homepage "https://www.keystone-engine.org/" + url "https://github.com/keystone-engine/keystone/archive/refs/tags/0.9.2.tar.gz" + sha256 "c9b3a343ed3e05ee168d29daf89820aff9effb2c74c6803c2d9e21d55b5b7c24" + license "GPL-2.0-only" + head "https://github.com/keystone-engine/keystone.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ccd260480e31343df08f282b31c71ba54088029cccf2e210afd58ef404a64be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26489f253fff8ad2046ff3c2faf2f8a7d2601a2daddbe512944deb882a17402b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a1b296425709c379e4ba6e27054a06aafa876b1fea1f4a5e8d72ff131faf2e86" + sha256 cellar: :any_skip_relocation, sonoma: "51d036d346993a190ad6e348e4188590bd9c953a440d4dcf2e044e2e3c700ebd" + sha256 cellar: :any_skip_relocation, ventura: "eba0bcccc49e5776fe9e53cdf27c2577c150ff5628d6596da02d8dd1d95f3b24" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b6e10619b3e6bfcf7ae709db1d468690f5afd260516c982df46d1180ed414ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7bc74b3742a7af0e95d1bda251428ebd57ff0bb6062fca7ca14d54c4ea92a176" + end + + depends_on "cmake" => :build + depends_on "python@3.13" => :build + + def python + which("python3.13") + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DPYTHON_EXECUTABLE=#{python}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_equal "nop = [ 90 ]", shell_output("#{bin}/kstool x16 nop").strip + end +end diff --git a/Formula/k/keyutils.rb b/Formula/k/keyutils.rb new file mode 100644 index 0000000000000..a65158aeddeff --- /dev/null +++ b/Formula/k/keyutils.rb @@ -0,0 +1,49 @@ +class Keyutils < Formula + desc "Linux key management utilities" + homepage "https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git" + url "https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/snapshot/keyutils-1.6.3.tar.gz" + sha256 "a61d5706136ae4c05bd48f86186bcfdbd88dd8bd5107e3e195c924cfc1b39bb4" + license all_of: ["GPL-2.0-or-later", "LGPL-2.0-or-later"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "569fc190618bdad81896e66145fe832b1d858644d19c87a59ce417158e0cea7e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5b06c4e38d2c4b7decb5b7bc0431b3416993231e5fa688950e4df83686a298d" + end + + depends_on :linux + + def install + inreplace "request-key.conf" do |s| + s.gsub! %r{(\s)/bin/key}, "\\1#{opt_bin}/key" + s.gsub! %r{(\s)/sbin/key}, "\\1#{opt_sbin}/key" + s.gsub! %r{(\s)/usr/share/#{name}/}, "\\1#{opt_pkgshare}/" + end + + args = %W[ + BINDIR=#{bin} + ETCDIR=#{etc} + INCLUDEDIR=#{include} + LIBDIR=#{lib} + MANDIR=#{man} + SBINDIR=#{sbin} + SHAREDIR=#{pkgshare} + USRLIBDIR=#{lib} + ] + system "make", "install", *args + end + + test do + assert_match version.to_s, shell_output("#{bin}/keyctl --version") + system bin/"keyctl", "supports" + + # CI container doesn't have permissions to modify keys/keyrings + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + (testpath/"test.sh").write <<~SHELL + keyring=$(#{bin}/keyctl new_session) + key=$(#{bin}/keyctl add user home brew "$keyring") + #{bin}/keyctl print "$key" + SHELL + assert_equal "brew\n", shell_output("bash -e test.sh") + end +end diff --git a/Formula/k/kfr.rb b/Formula/k/kfr.rb new file mode 100644 index 0000000000000..50af4aa07cac6 --- /dev/null +++ b/Formula/k/kfr.rb @@ -0,0 +1,58 @@ +class Kfr < Formula + desc "Fast, modern C++ DSP framework" + homepage "https://www.kfrlib.com/" + url "https://github.com/kfrlib/kfr/archive/refs/tags/6.2.0.tar.gz" + sha256 "bc9507e1dde17a86b68fb045404b66c5c486e61e324d9209468ea1e6cac7173c" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "49dfce65d905f955ed60d8bad7b38d2620a6bb40bd98723c1be210a4c948e884" + sha256 cellar: :any, arm64_sonoma: "e1b3da51969be438e36b97e61d8c3fbf4852f311fa7fbc5e9036fef6372b3979" + sha256 cellar: :any, arm64_ventura: "16cc7a6ed047cde918b0496f1291cdc6328dcd3c667d88b8a2ef0d037a54486c" + sha256 cellar: :any, sonoma: "c2ec1d0472a1920e6e51778354826ba8c7b6af29304f806f72cc6562e093ecbe" + sha256 cellar: :any, ventura: "da39d967e80fe3337c02545da188b66ad0d6d2ed0e29bc6d49883b6d2e5e1524" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7a18abab374376bdaaef8200d8d26e0a13c04d4445d6f4b1391eb7bb00164e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8cbe7ca4c62fb5258d9433f7b6c690cc02bec561b057b5844e1942e7d0d8a28d" + end + + depends_on "cmake" => :build + + on_arm do + # FIXME: `uses_from_macos` is not allowed in `on_arm` block + on_linux do + depends_on "llvm" + end + + fails_with :gcc do + cause "ARM builds require Clang compiler" + end + end + + def install + args = [] + # C API requires some clang extensions. + args << "-DKFR_ENABLE_CAPI_BUILD=ON" if ENV.compiler == :clang + + 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 + + using namespace kfr; + + int main() { + println("Hello KFR!"); + return 0; + } + CPP + + ENV.clang if OS.linux? && Hardware::CPU.arm? + system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-L#{lib}", "-lkfr_io", + "-o", "test" + assert_equal "Hello KFR!", shell_output("./test").chomp + end +end diff --git a/Formula/k/khal.rb b/Formula/k/khal.rb new file mode 100644 index 0000000000000..184b2a19e05f3 --- /dev/null +++ b/Formula/k/khal.rb @@ -0,0 +1,130 @@ +class Khal < Formula + include Language::Python::Virtualenv + + desc "CLI calendar application" + homepage "https://lostpackets.de/khal/" + url "https://files.pythonhosted.org/packages/5b/e4/c0a322d4d7880c518a0db84e5e5c57c7a8c3633e142e037921a57814d95a/khal-0.13.0.tar.gz" + sha256 "68fea8cd704e387e81b669c90322a8dafb4374f5876b07170c9c6e23415a3ee0" + license "MIT" + head "https://github.com/pimutils/khal.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "18cf8d3d72969bf1da0e4cb64248f66a0438b0ebacf7e4254bd987191639cfee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "18cf8d3d72969bf1da0e4cb64248f66a0438b0ebacf7e4254bd987191639cfee" + sha256 cellar: :any_skip_relocation, arm64_ventura: "18cf8d3d72969bf1da0e4cb64248f66a0438b0ebacf7e4254bd987191639cfee" + sha256 cellar: :any_skip_relocation, sonoma: "d78b0935110727286c3a7cbb62f0bda1ebaa0c8290b8f14ac4494a8f2427bfb8" + sha256 cellar: :any_skip_relocation, ventura: "d78b0935110727286c3a7cbb62f0bda1ebaa0c8290b8f14ac4494a8f2427bfb8" + sha256 cellar: :any_skip_relocation, arm64_linux: "18cf8d3d72969bf1da0e4cb64248f66a0438b0ebacf7e4254bd987191639cfee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18cf8d3d72969bf1da0e4cb64248f66a0438b0ebacf7e4254bd987191639cfee" + end + + depends_on "python@3.13" + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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 "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "icalendar" do + url "https://files.pythonhosted.org/packages/4f/3b/6532b45eef165c32fad5db2ce9b2a5669a4faeff232ab0bf0be2c576e9f5/icalendar-6.1.3.tar.gz" + sha256 "4aef710ff205925b3947fe69ed00f4e142c6a49b5533fca6cc2fdde5a6f62e66" + 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 "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 "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + 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 "urwid" do + url "https://files.pythonhosted.org/packages/98/21/ad23c9e961b2d36d57c63686a6f86768dd945d406323fb58c84f09478530/urwid-2.6.16.tar.gz" + sha256 "93ad239939e44c385e64aa00027878b9e5c486d59e855ec8ab5b1e1adcdb32a2" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + virtualenv_install_with_resources + + %w[khal ikhal].each do |cmd| + generate_completions_from_executable(bin/cmd, shells: [:fish, :zsh], shell_parameter_format: :click) + end + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + ENV["LANG"] = "en_US.UTF-8" + + (testpath/".calendar/test/01ef8547.ics").write <<~EOS + BEGIN:VCALENDAR + VERSION:2.0 + BEGIN:VEVENT + DTSTART;VALUE=DATE:20130726 + SUMMARY:testevent + DTEND;VALUE=DATE:20130727 + LAST-MODIFIED:20130725T142824Z + DTSTAMP:20130725T142824Z + CREATED:20130725T142824Z + UID:01ef8547 + END:VEVENT + END:VCALENDAR + EOS + + (testpath/".config/khal/config").write <<~EOS + [calendars] + [[test]] + path = #{testpath}/.calendar/test/ + color = light gray + [sqlite] + path = #{testpath}/.calendar/khal.db + [locale] + firstweekday = 0 + [default] + default_calendar = test + EOS + + system bin/"khal", "--no-color", "search", "testevent" + end +end diff --git a/Formula/k/khard.rb b/Formula/k/khard.rb new file mode 100644 index 0000000000000..9610bc3c4aa32 --- /dev/null +++ b/Formula/k/khard.rb @@ -0,0 +1,89 @@ +class Khard < Formula + include Language::Python::Virtualenv + + desc "Console carddav client" + homepage "https://github.com/lucc/khard" + url "https://files.pythonhosted.org/packages/0d/00/215a69d2ae96cac511a6594116958bf13e210dd24f78c48f5ffaf039edec/khard-0.19.1.tar.gz" + sha256 "59f30a0da3c3da3eb04f4dbe18ee4763913b685d99ec8418fd574a88c491c490" + license "GPL-3.0-only" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "fb20881e405b6a35eb802c83225d7099e6ca99c8979ab2dac3159412318aa1b5" + end + + depends_on "python@3.13" + + resource "atomicwrites" do + url "https://files.pythonhosted.org/packages/87/c6/53da25344e3e3a9c01095a89f16dbcda021c609ddb42dd6d7c0528236fb2/atomicwrites-1.4.1.tar.gz" + sha256 "81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + 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 "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/29/81/4dfc17eb6ebb1aac314a3eb863c1325b907863a1b8b1382cdffcb6ac0ed9/ruamel.yaml-0.18.6.tar.gz" + sha256 "8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "unidecode" do + url "https://files.pythonhosted.org/packages/f7/89/19151076a006b9ac0dd37b1354e031f5297891ee507eb624755e58e10d3e/Unidecode-1.3.8.tar.gz" + sha256 "cfdb349d46ed3873ece4586b96aa75258726e2fa8ec21d6f00a591d98806c2f4" + end + + resource "vobject" do + url "https://files.pythonhosted.org/packages/47/06/c477d9a8b75471243f2b4eeef39cb639a1cf978990c11e9e56359ab01c82/vobject-0.9.8.tar.gz" + sha256 "db00a7f4db49397155dd8a6871e8a2a0175a6eba5a654c30e910f82b29514b58" + end + + def install + virtualenv_install_with_resources + + (etc/"khard").install "doc/source/examples/khard.conf.example" + zsh_completion.install "misc/zsh/_khard" + pkgshare.install (buildpath/"misc").children - [buildpath/"misc/zsh"] + end + + test do + (testpath/".config/khard/khard.conf").write <<~EOS + [addressbooks] + [[default]] + path = ~/.contacts/ + [general] + editor = /usr/bin/vi + merge_editor = /usr/bin/vi + default_country = Germany + default_action = list + show_nicknames = yes + EOS + (testpath/".contacts/dummy.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 + assert_match "Address book: default", shell_output("#{bin}/khard list user") + end +end diff --git a/Formula/k/khiva.rb b/Formula/k/khiva.rb new file mode 100644 index 0000000000000..4305437daef49 --- /dev/null +++ b/Formula/k/khiva.rb @@ -0,0 +1,54 @@ +class Khiva < Formula + desc "Algorithms to analyse time series" + homepage "https://khiva.readthedocs.io/" + url "https://github.com/shapelets/khiva.git", + tag: "v0.5.0", + revision: "c2c72474f98ce3547cbde5f934deabb1b4eda1c9" + license "MPL-2.0" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_ventura: "79129c3668a37ad0c60c3225717337bd43e5bd453d8ada10ca36edc3eb0a6efd" + sha256 cellar: :any, arm64_monterey: "520d5879468b0454190fce7fa890fb98cc169c917c0f72975fd97e5d2a5f1a77" + sha256 cellar: :any, arm64_big_sur: "9ff14629f60e6ed2f278774c30ed9348d3965e8bfbe90cc31ea605bf475c747a" + sha256 cellar: :any, ventura: "c3eefd4690eadad3ec6286d3ae1a95d354ed008612ffabbbbfcd82a1970794c4" + sha256 cellar: :any, monterey: "3c3fc743e58f62b1355ac3e942e1141cbf09b56de5e3516f522432c2de841491" + sha256 cellar: :any, big_sur: "9341225ecc460b464de3760bd654165199b598e6393bd2b92ffd24a6cdc0f7b6" + sha256 cellar: :any, catalina: "798a2bd7f9071245ce4c0b7c6058ade9f815e071e549ef07145cffbe59d2dc40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1a6a2fad78cda325494014e7c43de7175b2e4859a4fdf4410febd7415e30f7e2" + end + + # Not compatible with newer `arrayfire` 3.9.0+ after changes in + # https://github.com/arrayfire/arrayfire/commit/be7f2d93de3796050e56037cc0c340a2ef34e813 + # Last release on 2020-04-29 and last commit on 2020-05-20. + deprecate! date: "2024-09-27", because: :does_not_build + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "arrayfire" + depends_on "eigen" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DKHIVA_USE_CONAN=OFF", + "-DKHIVA_BUILD_TESTS=OFF", + "-DKHIVA_BUILD_BENCHMARKS=OFF", + "-DKHIVA_BUILD_JNI_BINDINGS=OFF" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples" + end + + test do + cp pkgshare/"examples/matrixExample.cpp", testpath + system ENV.cxx, "-std=c++11", "matrixExample.cpp", + "-L#{Formula["arrayfire"].opt_lib}", "-laf", + "-L#{lib}", "-lkhiva", + "-o", "test" + # OpenCL does not work on ephemeral ARM CI. + return if Hardware::CPU.arm? && OS.mac? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + system "./test" + end +end diff --git a/Formula/k/ki.rb b/Formula/k/ki.rb new file mode 100644 index 0000000000000..5c3d975e9e7bd --- /dev/null +++ b/Formula/k/ki.rb @@ -0,0 +1,36 @@ +class Ki < Formula + desc "Kotlin Language Interactive Shell" + homepage "https://github.com/Kotlin/kotlin-interactive-shell" + url "https://github.com/Kotlin/kotlin-interactive-shell/archive/refs/tags/v0.5.2.tar.gz" + sha256 "5b65d784a66b6e7aa7e6bc427e2886435747cb9b2969f239d3be1f2190929fe7" + license "Apache-2.0" + head "https://github.com/Kotlin/kotlin-interactive-shell.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b4f17d3db413634dc6b07e462760db4358c8ec02012342c3048c52728ab71888" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "08da91f35d7ce64edc948fda63ef969592e9e299c2fe713559b300cb95d73f57" + sha256 cellar: :any_skip_relocation, arm64_ventura: "34f86ba275df07618724236322138b5b53027a6c4b772e178660460be2362cf1" + sha256 cellar: :any_skip_relocation, sonoma: "39be21332141ebf86fd1b73ba0d6bfe8f8dec07caf5ddc8e8d9734f513681c5d" + sha256 cellar: :any_skip_relocation, ventura: "f44890a5523df5d74707bdedead4d8c617cbddea01322d541371235b878c402d" + sha256 cellar: :any_skip_relocation, arm64_linux: "6cc92adaeb7461ca30e6ae9a0fc64724d8ea9ed6a31717d2a7f7919c3dc9981f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f6c23ecade167e9a2e175a6b34693c45fbbd2b7b4b9565554aa34ddcf1988d74" + end + + depends_on "maven" => :build + depends_on "openjdk" + + def install + ENV["JAVA_HOME"] = Language::Java.java_home + + system "mvn", "-DskipTests", "package" + libexec.install "lib/ki-shell.jar" + bin.write_jar_script libexec/"ki-shell.jar", "ki" + end + + test do + output = pipe_output(bin/"ki", ":q") + assert_match "ki-shell", output + assert_match "Bye!", output + end +end diff --git a/Formula/k/ki18n.rb b/Formula/k/ki18n.rb new file mode 100644 index 0000000000000..8799b05861df8 --- /dev/null +++ b/Formula/k/ki18n.rb @@ -0,0 +1,88 @@ +class Ki18n < Formula + desc "KDE Gettext-based UI text internationalization" + homepage "https://api.kde.org/frameworks/ki18n/html/index.html" + url "https://download.kde.org/stable/frameworks/6.14/ki18n-6.14.0.tar.xz" + sha256 "2a5135412caf0a07eba4eeb60867ac6929df1c83c145ae757a6a1230f842e669" + license all_of: [ + "BSD-3-Clause", + "LGPL-2.0-or-later", + any_of: ["LGPL-2.1-only", "LGPL-3.0-only"], + ] + head "https://invent.kde.org/frameworks/ki18n.git", branch: "master" + + livecheck do + url "https://download.kde.org/stable/frameworks/" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_sonoma: "813a3949fbec80841d7cdc7c13cf389843827da1de60ad2f41ad1d3090967403" + sha256 arm64_ventura: "30ab036fee1e082ef2a20a60f62b1cc556bbb50777fc0094767a74ab5bad50d2" + sha256 sonoma: "00a85043356ed0e53aaa97b53201afe7a1e2930d4c135a03f0a340f021affee1" + sha256 ventura: "97f1d16b5670dd1cf927ad43f8100ca94352c18809a2d3a8150b6b99deb1a9fa" + sha256 x86_64_linux: "481f2625a6848c04d8bd956f54d0d9ff15530e11df285c0480382367718ae105" + end + + depends_on "cmake" => [:build, :test] + depends_on "doxygen" => :build + depends_on "extra-cmake-modules" => [:build, :test] + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "iso-codes" + depends_on "qt" + + uses_from_macos "python" => :build, since: :catalina + + def install + args = %W[ + -DBUILD_QCH=ON + -DBUILD_WITH_QML=ON + -DPython3_EXECUTABLE=#{which("python3")} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "autotests" + (pkgshare/"cmake").install "cmake/FindLibIntl.cmake" + end + + test do + qt = Formula["qt"] + qt_major = qt.version.major + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + include(FeatureSummary) + find_package(ECM #{version} NO_MODULE) + set_package_properties(ECM PROPERTIES TYPE REQUIRED) + set(CMAKE_AUTOMOC ON) + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "#{pkgshare}/cmake") + set(CMAKE_CXX_STANDARD 17) + set(QT_MAJOR_VERSION #{qt_major}) + set(BUILD_WITH_QML ON) + set(REQUIRED_QT_VERSION #{qt.version}) + find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} REQUIRED Core Qml) + find_package(KF#{qt_major}I18n REQUIRED) + INCLUDE(CheckCXXSourceCompiles) + find_package(LibIntl) + set_package_properties(LibIntl PROPERTIES TYPE REQUIRED) + add_subdirectory(autotests) + CMAKE + + cp_r (pkgshare/"autotests"), testpath + + args = if OS.mac? + %W[ + -DLibIntl_INCLUDE_DIRS=#{Formula["gettext"].include} + -DLibIntl_LIBRARIES=#{Formula["gettext"].lib}/libintl.dylib + ] + else + [] + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + end +end diff --git a/Formula/k/kickstart.rb b/Formula/k/kickstart.rb new file mode 100644 index 0000000000000..b82c755d4bc72 --- /dev/null +++ b/Formula/k/kickstart.rb @@ -0,0 +1,54 @@ +class Kickstart < Formula + desc "Scaffolding tool to get new projects up and running quickly" + homepage "https://github.com/Keats/kickstart" + url "https://github.com/Keats/kickstart/archive/refs/tags/v0.5.0.tar.gz" + sha256 "2a1a335c70b81757abf4240a52ebce231501f731f3d73decbed4133d18ad1386" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "43978e06cd88f0b1422d79ce521cf807884df6f31f05b196865ec1a1662a463c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "403b3eb69425af095c2a5fa75fd1590cfba5190627ce95b8394f18aa89983d01" + sha256 cellar: :any_skip_relocation, arm64_ventura: "471f9a6ff9f0fe541dd13da8727d4cddca404cdea11698ebff5ca34abe6ddb1b" + sha256 cellar: :any_skip_relocation, sonoma: "a33b98800a5c86dd562706faaa5c4f1b9b4d4be00f1b073d2f79f88c70c683a1" + sha256 cellar: :any_skip_relocation, ventura: "2192bb7a80449ad9c47bab27f5347b3a07a634b2e0a06c342bf5d83e9411c805" + sha256 cellar: :any_skip_relocation, arm64_linux: "b17daab4bf60200fa04cc9af345b9f9c3788911a925137a69e63fa4f1bf40c4a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0e8ed4eb9366108b3e1da2a2792bae23572462b90ab47756e0b0e4e3c93a9eb" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", "--features", "cli", *std_cargo_args + end + + test do + # Create a basic template file and project, and check that kickstart + # actually interpolates both the filename and its content. + template_dir = testpath/"template" + output_dir = testpath/"output" + + (template_dir/"{{file_name}}.txt").write("{{software_project}} is awesome!") + + (template_dir/"template.toml").write <<~TOML + name = "Super basic" + description = "A very simple template" + kickstart_version = 1 + + [[variables]] + name = "file_name" + default = "myfilename" + prompt = "File name?" + + [[variables]] + name = "software_project" + default = "kickstart" + prompt = "Which software project is awesome?" + TOML + + # Run template interpolation + system bin/"kickstart", "--no-input", "--output-dir", output_dir, template_dir + + assert_path_exists output_dir/"myfilename.txt" + assert_equal "kickstart is awesome!", (output_dir/"myfilename.txt").read + end +end diff --git a/Formula/k/kics.rb b/Formula/k/kics.rb new file mode 100644 index 0000000000000..4c667894caac6 --- /dev/null +++ b/Formula/k/kics.rb @@ -0,0 +1,59 @@ +class Kics < Formula + desc "Detect vulnerabilities, compliance issues, and misconfigurations" + homepage "https://kics.io/" + url "https://github.com/Checkmarx/kics/archive/refs/tags/v2.1.7.tar.gz" + sha256 "1598e29d32de41e43c498ec21ecd676d7951672b787314303d6e9adad4e4614d" + license "Apache-2.0" + head "https://github.com/Checkmarx/kics.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "19f5bc8940ed8eab35678a45cfab172290ba167a44846b8f0dcc12eb99a6ce16" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1551e9cfa03e62f8250cb8d738a0f61f78db2467c2fbab4d546a1d8e319f3b54" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c3999744d59ff3700ae6280bbdab8e67d4b202d52cc3e4ce7fa6470894bf01f3" + sha256 cellar: :any_skip_relocation, sonoma: "5e163c6758cdddec2c1722dcf09a03bcff2c826b7e3c6965c9914885508b6101" + sha256 cellar: :any_skip_relocation, ventura: "c031f2af1f874e8f86497638d5b9f630283e78b116b5db79359350ddb0749630" + sha256 cellar: :any_skip_relocation, arm64_linux: "d7feaf70aaac4f6a8e37a85f46f622493b550ae6fc77c86af936209412fc97ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ea8b65d0899c8436dbaf0187a757f9c438442cd7d781a3e8331e98b6f61472e" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/Checkmarx/kics/v#{version.major}/internal/constants.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/console" + + pkgshare.install "assets" + end + + def caveats + <<~EOS + KICS queries are placed under #{opt_pkgshare}/assets/queries + To use KICS default queries add KICS_QUERIES_PATH env to your ~/.zshrc or ~/.zprofile: + "echo 'export KICS_QUERIES_PATH=#{opt_pkgshare}/assets/queries' >> ~/.zshrc" + usage of CLI flag --queries-path takes precedence. + EOS + end + + test do + ENV["KICS_QUERIES_PATH"] = pkgshare/"assets/queries" + ENV["DISABLE_CRASH_REPORT"] = "0" + ENV["NO_COLOR"] = "1" + + assert_match <<~EOS, shell_output("#{bin}/kics scan -p #{testpath}") + Results Summary: + CRITICAL: 0 + HIGH: 0 + MEDIUM: 0 + LOW: 0 + INFO: 0 + TOTAL: 0 + EOS + + assert_match version.to_s, shell_output("#{bin}/kics version") + end +end diff --git a/Formula/k/killport.rb b/Formula/k/killport.rb new file mode 100644 index 0000000000000..8210f34d49450 --- /dev/null +++ b/Formula/k/killport.rb @@ -0,0 +1,31 @@ +class Killport < Formula + desc "Command-line tool to kill processes listening on a specific port" + homepage "https://github.com/jkfran/killport" + url "https://github.com/jkfran/killport/archive/refs/tags/v1.1.0.tar.gz" + sha256 "07bdc3d36b0cefd9c03c78a04fea46e5e9f487942c99cd70fcaf71676c45bf16" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "885c694ffb6da77a98deccc68e4eb85a289a8aa11126270599991e53c20ad431" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b468626ea9766cd30304bc5e526e2f1068a96ca5d261d27423f5ebe70d04a697" + sha256 cellar: :any_skip_relocation, arm64_ventura: "febe4f0877f477aa1648b4343ed1dcbbeb839753bd27fd36dd27a891951678de" + sha256 cellar: :any_skip_relocation, arm64_monterey: "21e41ff2e07c5ef20fdd2cda28dca4777d595084cd455b6dfa79d782498e9514" + sha256 cellar: :any_skip_relocation, sonoma: "b2451687c821568ddb1c706eefa036ebb0551932a5d73ccbc10f88611d5250ce" + sha256 cellar: :any_skip_relocation, ventura: "728f9068e54e92a9fbba90fe0f4e82762ad550c6f0538c8a9cddaa8791533207" + sha256 cellar: :any_skip_relocation, monterey: "93c2b4529c5fe54fac39f4edae90efd19d92a238e7f0ebd5cced1ca56b298425" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab337ebd0cf408b03c3a765581986c92baf8fe0f230d8e90f3ee158c81997dc6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "788d987c23de2c4d5ba55833462bc7cf60a5f6844e5682e827a242fa5837e3ef" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + port = free_port + output = shell_output("#{bin}/killport --signal sigkill #{port}") + assert_match "No service found using port #{port}", output + end +end diff --git a/Formula/k/killswitch.rb b/Formula/k/killswitch.rb new file mode 100644 index 0000000000000..021b63edf2287 --- /dev/null +++ b/Formula/k/killswitch.rb @@ -0,0 +1,30 @@ +class Killswitch < Formula + desc "VPN kill switch for macOS" + homepage "https://vpn-kill-switch.com/" + url "https://github.com/vpn-kill-switch/killswitch/archive/refs/tags/v0.7.3.tar.gz" + sha256 "dbc1fc04e9945049e0cad3aa18740394cac9d93a0aacca00d45c82ec891346f1" + license "BSD-3-Clause" + head "https://github.com/vpn-kill-switch/killswitch.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "774a26f0fc7ef071f5b5ff472ac6dba6f0ef5e117096f2de5bd558f1398ac464" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "94166ec9298fa9ecabd8f1f736c7a1105aba2ee0cc3188d290206c3192977846" + sha256 cellar: :any_skip_relocation, arm64_ventura: "db44f0faa40d85df1ced75869c6fa1246cfb8b9b46ca509f70a18feb8c5e0bdc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c9dffd3626a47003a56db382b174ccfb1d02457ec762fc7d8d16df999fcb71a8" + sha256 cellar: :any_skip_relocation, sonoma: "00e16e045b4dd9f5d1f5013c9194b4d94954289a8d54a581165fe8dcf9a8924c" + sha256 cellar: :any_skip_relocation, ventura: "70b9b5e586bcf54547835f5a9f56f5230080846446768d5fe2611c69b7c7eabb" + sha256 cellar: :any_skip_relocation, monterey: "d942fff71b6a5c2178f10dd222bb6fb5e52d2bd01d537f85e3b4ea1dff53cdab" + end + + depends_on "go" => :build + depends_on :macos + + def install + system "go", "build", "-mod=readonly", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), + "cmd/killswitch/main.go" + end + + test do + assert_match "No VPN interface found", shell_output("#{bin}/killswitch 2>&1", 1) + end +end diff --git a/Formula/k/kim-api.rb b/Formula/k/kim-api.rb new file mode 100644 index 0000000000000..43d81aee558af --- /dev/null +++ b/Formula/k/kim-api.rb @@ -0,0 +1,61 @@ +class KimApi < Formula + desc "Knowledgebase of Interatomic Models (KIM) API" + homepage "https://openkim.org/" + url "https://s3.openkim.org/kim-api/kim-api-2.4.1.txz" + sha256 "225e3136d43e416a4424551e9e5f6d92cc6ecfe11389a1b6e97d6dcdfed83d44" + license "CDDL-1.0" + + livecheck do + url "https://openkim.org/kim-api/previous-versions/" + regex(/href=.*?kim-api[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c8214b21245469eccfe7693dacb9146bd28a71c0dbcf60f2655cc664e2ae65bc" + sha256 cellar: :any, arm64_sonoma: "19feb0d8847607b24f869cb2d82c7378d4196a7c7ae2224e6f33f5d54aa47e3d" + sha256 cellar: :any, arm64_ventura: "67b165f2b4604391a1fefb0554bbe3a3260ef5ddd789479925f857ee7cb59893" + sha256 cellar: :any, sonoma: "238895ca76d8aeb1e2759426a25d726a5e5754cbd77ae48fecc871dfe4aa94e4" + sha256 cellar: :any, ventura: "594b5361fb31557732acdb6d373be537aafca3e39731e6eecae5c4d4f63b0f08" + sha256 cellar: :any_skip_relocation, arm64_linux: "591e234dddd71d0bbbf44bf0b3c948279f10822b5bfb6d437b53597ab6b030a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b9c0aa802b5478594414159c28c7dbe8304ac91d965b176f20ffbd269fc131f" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "gcc" # for gfortran + + uses_from_macos "xz" + + def install + args = [ + "-DCMAKE_INSTALL_RPATH=#{rpath}", + # adjust libexec dir + "-DCMAKE_INSTALL_LIBEXECDIR=lib", + # adjust directories for system collection + "-DKIM_API_SYSTEM_MODEL_DRIVERS_DIR=:#{HOMEBREW_PREFIX}/lib/openkim-models/model-drivers", + "-DKIM_API_SYSTEM_PORTABLE_MODELS_DIR=:#{HOMEBREW_PREFIX}/lib/openkim-models/portable-models", + "-DKIM_API_SYSTEM_SIMULATOR_MODELS_DIR=:#{HOMEBREW_PREFIX}/lib/openkim-models/simulator-models", + # adjust zsh completion install + "-DZSH_COMPLETION_COMPLETIONSDIR=#{zsh_completion}", + "-DBASH_COMPLETION_COMPLETIONSDIR=#{bash_completion}", + ] + # adjust compiler settings for package + if OS.mac? + args << "-DKIM_API_CMAKE_C_COMPILER=/usr/bin/clang" + args << "-DKIM_API_CMAKE_CXX_COMPILER=/usr/bin/clang++" + else + args << "-DKIM_API_CMAKE_C_COMPILER=/usr/bin/gcc" + args << "-DKIM_API_CMAKE_CXX_COMPILER=/usr/bin/g++" + end + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--build", "build", "--target", "docs" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{bin}/kim-api-collections-management list") + assert_match "ex_model_Ar_P_Morse_07C_w_Extensions", output + end +end diff --git a/Formula/k/kimwitu++.rb b/Formula/k/kimwitu++.rb new file mode 100644 index 0000000000000..540692a8e61fd --- /dev/null +++ b/Formula/k/kimwitu++.rb @@ -0,0 +1,104 @@ +class Kimwituxx < Formula + desc "Tool for processing trees (i.e. terms)" + homepage "https://savannah.nongnu.org/projects/kimwitu-pp" + url "https://download.savannah.gnu.org/releases/kimwitu-pp/kimwitu++-2.3.13.tar.gz" + sha256 "3f6d9fbb35cc4760849b18553d06bc790466ca8b07884ed1a1bdccc3a9792a73" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/kimwitu-pp/" + regex(/href=.*?kimwitu\+\+[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3861ff2b9ae3eacfcb277bc50b6a3b1e16c608c807ff082ea2b2fe6d739f6608" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "35b17dd52015ae03a53788fc887c4b4943ab78b18f16fa6194b697e16fc69c3c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1a97df5c3b9f227ae34a2e87b7a4a4ec12988efeceabd2137b0dfe619da8ded6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b54a601b646e3e2b70d0ef3042a6c2180c51dbb0371078134463de043be1d4d3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2291141a641d3529702fae53de9669d0b557694157b5c196eda1c56484ec67a7" + sha256 cellar: :any_skip_relocation, sonoma: "ab6ad6f27ecf0cffb9459cb6dcdc8cb5272deace442b41f261807ac7dc8e180a" + sha256 cellar: :any_skip_relocation, ventura: "d434374974309b23dcf7aabe1778ac02b2328173c8723db794f9b22b8309db8c" + sha256 cellar: :any_skip_relocation, monterey: "6f02b1694547ba1ade265cbfaf9cf8357c64260e551abb34d8f5b3341dd16eaa" + sha256 cellar: :any_skip_relocation, big_sur: "0dcd1be78b92b98d73dad285fbaaf507bdc23805835a51f56236ddd8b0eb73f5" + sha256 cellar: :any_skip_relocation, catalina: "470e06521034cea8db6ad07e8aab45c5bfbe3969cd03891799348eb4e9279c90" + sha256 cellar: :any_skip_relocation, mojave: "067f8d375baa815645201a091c2f8325b469e59d9b2793e5a0dd83bfd9350aa2" + sha256 cellar: :any_skip_relocation, high_sierra: "26ba22bbcdbea896f4af405631bed60dfc198757b6f879765e8d85e373b122db" + sha256 cellar: :any_skip_relocation, sierra: "a5dfd8382b50fc856ba741b79cf7077ae741549b8b8ff32ce727cfd7e8bd2a69" + sha256 cellar: :any_skip_relocation, el_capitan: "98c3516d1f3a9b17397354d8dde712f8a8c0f97ac919c65fc468ab4569534cc4" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0031ff223a86e82dfb9450e9d0b0f9a9f77a07f3ce4d4a1c7ed8d7103aff4fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cece1163e971acd007363d1bd70c61a0d85a056b85cd878d53b520c330479754" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + bin.mkpath + man1.mkpath + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/kc++ --version") + + # from: https://www.nongnu.org/kimwitu-pp/example/main.k.html + (testpath/"main.k").write <<~EOS + // Reverse Polish Notation, main.k + // © 2001, Michael Piefel + + %{ + #include + #include "k.h" + #include "rk.h" + #include "unpk.h" + #include "csgiok.h" + + int yyparse(); + line TheLine; + %} + %{ KC_TYPES_HEADER + extern line TheLine; + %} + + // Yes, create YYSTYPE union for the bison parser. + %option yystype + + // Trivial printer function (ignores view) + void + printer(const char *s, uview v) + { + std::cout << s; + } + + int + main(int argc, char **argv) + { + FILE* f; + + std::cout << " RPN Parser and reformatter " << std::endl; + // If a saved tree is given on command line, read it + if (argc==2) { + f=fopen(argv[1], "r"); + kc::CSGIOread(f, TheLine); + fclose(f); + } else yyparse(); + + line TheCanonLine=TheLine->rewrite(canon); + line TheShortLine=TheCanonLine->rewrite(calculate); + + std::cout << "\nInfix notation:\n"; + TheCanonLine->unparse(printer, infix); + + std::cout << "\n\nCanonical postfix notation:\n"; + TheCanonLine->unparse(printer, postfix); + + std::cout << "\n\nCalculated infix notation:\n"; + TheShortLine->unparse(printer, infix); + + std::cout << "\n\nCalculated canonical postfix notation:\n"; + TheShortLine->unparse(printer, postfix); + + std::cout << std::endl; + } + EOS + system bin/"kc++", testpath/"main.k" + end +end diff --git a/Formula/k/kin.rb b/Formula/k/kin.rb new file mode 100644 index 0000000000000..64de956f4cd4e --- /dev/null +++ b/Formula/k/kin.rb @@ -0,0 +1,47 @@ +class Kin < Formula + include Language::Python::Virtualenv + + desc "Sane PBXProj files" + homepage "https://github.com/Serchinastico/Kin" + url "https://files.pythonhosted.org/packages/71/8c/f3916cf3cbc3785ebca47506d50e3b586516f58331832682035a4e23f18c/kin-2.1.14.tar.gz" + sha256 "de2c22863a2a5e6eedbe88dc351b913b7666b16528020e6178a72f1e85e1b2d9" + license "Apache-2.0" + head "https://github.com/Serchinastico/Kin.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0c894495b31a506a8c1b6a3340733708be4fd0f86825b788e421156ad604984e" + end + + depends_on "python@3.13" + + 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 + + def install + virtualenv_install_with_resources + end + + test do + (testpath/"Good.xcodeproj/project.pbxproj").write <<~EOS + { + archiveVersion = 1; + classes = {}; + objectVersion = 46; + objects = { + FE870E28DC2371E7ACA886F03F460581 = {isa = PBXFileReference; explicitFileType = text.xcconfig; name = "Something.xcconfig"; path = "Configurations/Something.xcconfig"; sourceTree = ""; }; + 78452DDA02BFEF5D6BA29AEFB4B1266A = {isa = PBXGroup; children = (FE870E28DC2371E7ACA886F03F460581,); name = Configurations; sourceTree = ""; }; + 49FBBF861C10C2A200A1A4BB = {isa = PBXProject; buildConfigurationList = 49FBBF891C10C2A200A1A4BB; compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 0; mainGroup = 49FBBF851C10C2A200A1A4BB; productRefGroup = 49FBBF8F1C10C2A200A1A4BB; projectDirPath = ""; projectRoot = ""; targets = (49FBBF8D1C10C2A200A1A4BB, 4973659B1C19BC6E00837617,); }; + 49FBBF951C10C2A200A1A4BB = {isa = PBXVariantGroup; children = (49FBBF961C10C2A200A1A4BB,); name = Main.storyboard; sourceTree = ""; }; + 49FBBF9A1C10C2A200A1A4BB = {isa = PBXVariantGroup; children = (49FBBF9B1C10C2A200A1A4BB,); name = LaunchScreen.storyboard; sourceTree = ""; }; + 497365A41C19BC6E00837617 = {isa = XCBuildConfiguration; baseConfigurationReference = 274E42B0193BA6FEFA8FD71C; buildSettings = { FRAMEWORK_SEARCH_PATHS = ("$(inherited)", "$(PROJECT_DIR)/build/Debug-iphoneos",); }; name = Debug; }; + 49FBBFB61C10C2A200A1A4BB = {isa = XCConfigurationList; buildConfigurations = (49FBBFB71C10C2A200A1A4BB, 49FBBFB81C10C2A200A1A4BB,); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + }; + rootObject = 49FBBF861C10C2A200A1A4BB; + } + EOS + output = shell_output("#{bin}/kin Good.xcodeproj/project.pbxproj") + assert_match output, "CORRECT\n" + end +end diff --git a/Formula/k/kind.rb b/Formula/k/kind.rb new file mode 100644 index 0000000000000..c7c1d30df3230 --- /dev/null +++ b/Formula/k/kind.rb @@ -0,0 +1,34 @@ +class Kind < Formula + desc "Run local Kubernetes cluster in Docker" + homepage "https://kind.sigs.k8s.io/" + url "https://github.com/kubernetes-sigs/kind/archive/refs/tags/v0.27.0.tar.gz" + sha256 "841dd2fdc5c194e1ea49f36204cce33a943285862303713a1baa5d2073cdb0d9" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/kind.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0d29d64fafa1fd5d0ab3c05b16377049ec3aa96f3a585fc6d99337f021e85336" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0d29d64fafa1fd5d0ab3c05b16377049ec3aa96f3a585fc6d99337f021e85336" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d29d64fafa1fd5d0ab3c05b16377049ec3aa96f3a585fc6d99337f021e85336" + sha256 cellar: :any_skip_relocation, sonoma: "11b0e1e99d27d8de32953e4ccf1e7f6220d8a9ee25627a5af787de3ba192b22e" + sha256 cellar: :any_skip_relocation, ventura: "11b0e1e99d27d8de32953e4ccf1e7f6220d8a9ee25627a5af787de3ba192b22e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b9c80cc6262219f16d293334fe91d258cfd4c43b98d746d1b6e4c311db7e895" + end + + depends_on "go" => :build + depends_on "docker" => :test + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"kind", "completion") + end + + test do + ENV["DOCKER_HOST"] = "unix://#{testpath}/invalid.sock" + + # Should error out as creating a kind cluster requires root + status_output = shell_output("#{bin}/kind get kubeconfig --name homebrew 2>&1", 1) + assert_match "Cannot connect to the Docker daemon", status_output + end +end diff --git a/Formula/k/kiota.rb b/Formula/k/kiota.rb new file mode 100644 index 0000000000000..be1dee8a86d07 --- /dev/null +++ b/Formula/k/kiota.rb @@ -0,0 +1,48 @@ +class Kiota < Formula + desc "OpenAPI based HTTP Client code generator" + homepage "https://aka.ms/kiota/docs" + url "https://github.com/microsoft/kiota/archive/refs/tags/v1.26.0.tar.gz" + sha256 "0712d0161ae202e1908270f40796059557ef90e5637e9d62bdbcdb2edf6caf0d" + license "MIT" + head "https://github.com/microsoft/kiota.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6d61e141396bc587f59cb3d7e98d2f44dbdcce7a2eff565bb2bca308d083578" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cbd891ee1058b47315f9f7e42c5ca59af94ac20177a53624fca5ea4ab605091c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4f4a0255170bb56fd218c3e406c12230a45c1abffd3a0cc1736d305da4e3a4aa" + sha256 cellar: :any_skip_relocation, ventura: "46ccb1700ea995273eeef20e84fee68263ac8333f9b730c537063881cc06a4f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "174bc3e465c1ce9974f3943a1a7bba61f5897f73dedd2fe454561679ed34e182" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c30f4bb5fb23c99aff8590089dfe461f66b4707dae158bbc2b3e94d450e22654" + end + + depends_on "dotnet" + + def install + dotnet = Formula["dotnet"] + + args = %W[ + --configuration Release + --framework net#{dotnet.version.major_minor} + --output #{libexec} + --no-self-contained + --use-current-runtime + -p:TargetFramework=net#{dotnet.version.major_minor} + -p:PublishSingleFile=true + ] + args << "-p:Version=#{version}" if build.stable? + + system "dotnet", "publish", "src/kiota/kiota.csproj", *args + (bin/"kiota").write_env_script libexec/"kiota", DOTNET_ROOT: dotnet.opt_libexec + end + + test do + assert_match version.to_s, shell_output("#{bin}/kiota --version") + + info_output = shell_output("#{bin}/kiota info") + assert_match "Go Stable", info_output + assert_match "Python Stable", info_output + + search_output = shell_output("#{bin}/kiota search github") + assert_match "apisguru::github.com GitHub v3 REST API", search_output + end +end diff --git a/Formula/k/kirimase.rb b/Formula/k/kirimase.rb new file mode 100644 index 0000000000000..cc51589b349eb --- /dev/null +++ b/Formula/k/kirimase.rb @@ -0,0 +1,31 @@ +class Kirimase < Formula + desc "CLI for building full-stack Next.js apps" + homepage "https://kirimase.dev/" + url "https://registry.npmjs.org/kirimase/-/kirimase-0.0.62.tgz" + sha256 "5d6d0e43b8bd07bcae71b279820491053b8a1445c5e6f8f66f5f0d158a67d16c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2bb5a1ace88dffb207488229a4e1d18fc2b637154ce6f66604c2dfac5a8ef0ab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2bb5a1ace88dffb207488229a4e1d18fc2b637154ce6f66604c2dfac5a8ef0ab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2bb5a1ace88dffb207488229a4e1d18fc2b637154ce6f66604c2dfac5a8ef0ab" + sha256 cellar: :any_skip_relocation, sonoma: "65d1f5094b1cee9827cad481203142f0529725823e5ea708b2881f49208f5a61" + sha256 cellar: :any_skip_relocation, ventura: "65d1f5094b1cee9827cad481203142f0529725823e5ea708b2881f49208f5a61" + sha256 cellar: :any_skip_relocation, arm64_linux: "247c4dabf7c49ec1076c4a160ce30520ae2bba151f82396df778e4bfb8ae581b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2bb5a1ace88dffb207488229a4e1d18fc2b637154ce6f66604c2dfac5a8ef0ab" + 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}/kirimase --version") + + output = shell_output("#{bin}/kirimase init test-app 2>&1") + assert_match "[fatal] No Next.js project detected", output + end +end diff --git a/Formula/k/kitchen-completion.rb b/Formula/k/kitchen-completion.rb new file mode 100644 index 0000000000000..ddf81600aa6ce --- /dev/null +++ b/Formula/k/kitchen-completion.rb @@ -0,0 +1,22 @@ +class KitchenCompletion < Formula + desc "Bash completion for Kitchen" + homepage "https://github.com/MarkBorcherding/test-kitchen-bash-completion" + url "https://github.com/MarkBorcherding/test-kitchen-bash-completion/archive/refs/tags/v1.0.0.tar.gz" + sha256 "6a9789359dab220df0afad25385dd3959012cfa6433c8c96e4970010b8cfc483" + license "MIT" + head "https://github.com/MarkBorcherding/test-kitchen-bash-completion.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2db54abff94a93a95e8cee31a46ad86210e556d2f2c25d1f7f3d8a8dd1853514" + end + + def install + bash_completion.install "kitchen-completion.bash" => "kitchen" + end + + test do + assert_match "-F __kitchen_options", + shell_output("bash -c 'source #{bash_completion}/kitchen && complete -p kitchen'") + end +end diff --git a/Formula/k/kitchen-sync.rb b/Formula/k/kitchen-sync.rb new file mode 100644 index 0000000000000..b5c0784395e9c --- /dev/null +++ b/Formula/k/kitchen-sync.rb @@ -0,0 +1,45 @@ +class KitchenSync < Formula + desc "Fast efficiently sync database without dumping & reloading" + homepage "https://github.com/willbryant/kitchen_sync" + url "https://github.com/willbryant/kitchen_sync/archive/refs/tags/v2.21.tar.gz" + sha256 "0a2c25001069c90135a91b1cc70c1b9096c3c6e127f6a14f1b45cdbb0c209f09" + license "MIT" + head "https://github.com/willbryant/kitchen_sync.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "7a4ef7280430f9a4bf5464e8b516f53af6eb9e8307cd5070b9d51e4373be601f" + sha256 cellar: :any, arm64_sonoma: "12c2064e9e97f09562912a635453b0b015071117ae19062ab3cd804435139072" + sha256 cellar: :any, arm64_ventura: "541760108930e985207dae586caeed9aeddacfd348295a5f5af26bebc225246c" + sha256 cellar: :any, sonoma: "d5c53943f1d960045b1fbd64124d2004531f9c046b3ed7cae5246b4d813c0cc5" + sha256 cellar: :any, ventura: "d73ae2d23fd13510fd8b6fba2130dd2761587cc505866a8e2bb4686be1d14ad0" + sha256 cellar: :any_skip_relocation, arm64_linux: "afb7f3f8129476eec9257b88dda07e647af4209af5784b9b3758a37e95786f54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7884a6d66df364341ac6ee59613ed1a1198f8171fbb22a53f2849194cf4ac728" + end + + depends_on "cmake" => :build + depends_on "libpq" + depends_on "mariadb-connector-c" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DMySQL_INCLUDE_DIR=#{Formula["mariadb-connector-c"].opt_include}/mariadb", + "-DMySQL_LIBRARY_DIR=#{Formula["mariadb-connector-c"].opt_lib}", + "-DPostgreSQL_INCLUDE_DIR=#{Formula["libpq"].opt_include}", + "-DPostgreSQL_LIBRARY_DIR=#{Formula["libpq"].opt_lib}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{bin}/ks --from mysql://b/ --to mysql://d/ 2>&1", 1) + + assert_match "Unknown server host", output + assert_match "Kitchen Syncing failed.", output + end +end diff --git a/Formula/k/kitex.rb b/Formula/k/kitex.rb new file mode 100644 index 0000000000000..30c93a7f74e28 --- /dev/null +++ b/Formula/k/kitex.rb @@ -0,0 +1,53 @@ +class Kitex < Formula + desc "Golang RPC framework for microservices" + homepage "https://github.com/cloudwego/kitex" + url "https://github.com/cloudwego/kitex/archive/refs/tags/v0.13.1.tar.gz" + sha256 "8979aab324a0e5c71bbc4a985716df2f43079d83e4c61840611bf69ae25873e1" + license "Apache-2.0" + head "https://github.com/cloudwego/kitex.git", branch: "develop" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e977ed56c97e8d0d2c32aad83ecd614b852d05c8fd36559d38e71d7d4a4f799d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e977ed56c97e8d0d2c32aad83ecd614b852d05c8fd36559d38e71d7d4a4f799d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e977ed56c97e8d0d2c32aad83ecd614b852d05c8fd36559d38e71d7d4a4f799d" + sha256 cellar: :any_skip_relocation, sonoma: "abb62f18d9cd5aa89b0b6e4c0a0fbfc0562d763e22d451c819b316b62b386f52" + sha256 cellar: :any_skip_relocation, ventura: "abb62f18d9cd5aa89b0b6e4c0a0fbfc0562d763e22d451c819b316b62b386f52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "835f7e5d40ea401fcdb85aa90244a328d3d44eb46668025144ca1ba6ae8e1f63" + end + + depends_on "go" => [:build, :test] + depends_on "thriftgo" => :test + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./tool/cmd/kitex" + end + + test do + output = shell_output("#{bin}/kitex --version 2>&1") + assert_match "v#{version}", output + + thriftfile = testpath/"test.thrift" + thriftfile.write <<~EOS + namespace go api + struct Request { + 1: string message + } + struct Response { + 1: string message + } + service Hello { + Response echo(1: Request req) + } + EOS + system bin/"kitex", "-module", "test", "test.thrift" + assert_path_exists testpath/"go.mod" + refute_predicate (testpath/"go.mod").size, :zero? + assert_path_exists testpath/"kitex_gen"/"api"/"test.go" + refute_predicate (testpath/"kitex_gen"/"api"/"test.go").size, :zero? + end +end diff --git a/Formula/k/klavaro.rb b/Formula/k/klavaro.rb new file mode 100644 index 0000000000000..b60ddb8679430 --- /dev/null +++ b/Formula/k/klavaro.rb @@ -0,0 +1,59 @@ +class Klavaro < Formula + desc "Free touch typing tutor program" + homepage "https://klavaro.sourceforge.io/" + url "https://downloads.sourceforge.net/project/klavaro/klavaro-3.14.tar.bz2" + sha256 "87187e49d301c510e6964098cdb612126bf030d2a875fd799eadcad3eae56dab" + license "GPL-3.0-or-later" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/klavaro[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_sequoia: "f51c0783c7004a02723e01896663c837923fe3ef5efc576821e68deb3383387c" + sha256 arm64_sonoma: "da78d9074c10ef13c0c188880d8c66d72aa130734a240d696a5ff67676f1557c" + sha256 arm64_ventura: "df780d1ae34c336fc12c7facbb053a3466cfa0a458d11744fd9cf8b650420cf5" + sha256 arm64_monterey: "7ed497aacf317e009ccaf17e06e2652d7b1a51e2dd4621edeebead557513197e" + sha256 sonoma: "9a3e25bfb9566643a127ceccd4b646b90cfbbe733f0416fcd0f8ad46f9e6759b" + sha256 ventura: "756f253d5890c66e7ed6554ed23b6f16fb18f305afe73cbfd3e33f964e8b4d8b" + sha256 monterey: "609d595507d40c138aa3d3e565d6e92826f4b8ab570b5dbc389b917b3991b297" + sha256 arm64_linux: "a42fad29e4aba488b46ffc11945cef3d1210d85efb853a3469b3b27e40f68a0f" + sha256 x86_64_linux: "847abc58af56c8af7a36c95f7ea4a239906b0078b2fe39393750397c8c03db53" + end + + depends_on "gettext" => :build + depends_on "intltool" => :build + depends_on "pkgconf" => :build + + depends_on "adwaita-icon-theme" + depends_on "glib" + depends_on "gtk+3" + depends_on "gtkdatabox" + depends_on "pango" + + uses_from_macos "perl" => :build + uses_from_macos "curl" + + on_macos do + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"klavaro", "--help-gtk" + end +end diff --git a/Formula/k/klee.rb b/Formula/k/klee.rb new file mode 100644 index 0000000000000..43d93307ebfbf --- /dev/null +++ b/Formula/k/klee.rb @@ -0,0 +1,178 @@ +class Klee < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "Symbolic Execution Engine" + homepage "https://klee-se.org/" + url "https://github.com/klee/klee/archive/refs/tags/v3.1.tar.gz" + sha256 "ae3d97209fa480ce6498ffaa7eaa7ecbbe22748c739cb7b2389391d0d9c940f7" + license "NCSA" + revision 4 + head "https://github.com/klee/klee.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "ca3c457d1beb7493b543de0e7f437e553d3f8e4b3189e1cf8aed4af2def34b43" + sha256 arm64_sonoma: "acae2eb29a27f2dba222d8a9ac0f7bd4e04c5f88f181a98f4acc8519817a9f1a" + sha256 arm64_ventura: "7681f61b63db83b4d972127364af4787b34cec6820e26f997bf955c2a5b7e277" + sha256 sonoma: "529fb661a9bbab5e12aab061ccb627029807e2b66c08b567eadc0f1f4752f965" + sha256 ventura: "3141e8037c193771a86ef0ec281a4d90dc7a1b41b6f23645d21f4a70f4308a68" + sha256 x86_64_linux: "21be2951cd4759590f36a5c021c1531a595fd3b80e2813f41ff336625f4efabd" + end + + depends_on "cmake" => :build + + depends_on "gperftools" + depends_on "llvm@16" # LLVM 17+ issue: https://github.com/klee/klee/issues/1754 + depends_on "python@3.13" + depends_on "sqlite" + depends_on "stp" + depends_on "wllvm" + depends_on "z3" + + uses_from_macos "zlib" + + on_macos do + depends_on "cryptominisat" + depends_on "gmp" + depends_on "minisat" + end + + # klee needs a version of libc++ compiled with wllvm + resource "libcxx" do + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.6/llvm-project-16.0.6.src.tar.xz" + sha256 "ce5e71081d17ce9e86d7cbcfa28c4b04b9300f8fb7e78422b1feb6bc52c3028e" + end + + resource "tabulate" do + url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" + sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" + end + + def llvm + deps.map(&:to_formula).find { |f| f.name.match? "^llvm" } + end + + def install + libcxx_install_dir = libexec/"libcxx" + libcxx_src_dir = buildpath/"libcxx" + resource("libcxx").stage libcxx_src_dir + + # Use build configuration at + # https://github.com/klee/klee/blob/v#{version}/scripts/build/p-libcxx.inc + libcxx_args = std_cmake_args(install_prefix: libcxx_install_dir) + %W[ + -DRUNTIMES_CMAKE_ARGS=-DCMAKE_INSTALL_RPATH=#{rpath} + -DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi + -DLLVM_ENABLE_PROJECTS= + -DLLVM_ENABLE_PROJECTS_USED:BOOL=ON + -DLLVM_ENABLE_THREADS:BOOL=OFF + -DLLVM_ENABLE_EH:BOOL=OFF + -DLLVM_ENABLE_RTTI:BOOL=OFF + -DLIBCXX_ENABLE_THREADS:BOOL=OFF + -DLIBCXX_ENABLE_SHARED:BOOL=ON + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY:BOOL=#{OS.mac? ? "OFF" : "ON"} + -DLIBCXXABI_ENABLE_THREADS:BOOL=OFF + ] + + with_env( + CC: "wllvm", + CXX: "wllvm++", + LLVM_COMPILER: "clang", + LLVM_COMPILER_PATH: llvm.opt_bin, + ) do + system "cmake", "-S", libcxx_src_dir/"llvm", "-B", "libcxx_build", *libcxx_args + system "cmake", "--build", "libcxx_build", "--target", "runtimes" + system "cmake", "--install", "libcxx_build/runtimes" + end + + libcxx_libs = libcxx_install_dir.glob("lib/{#{shared_library("*")},*.a}").reject(&:symlink?) + libcxx_libs.each { |sl| system "extract-bc", sl } + + # Avoid building 32-bit runtime + inreplace "CMakeLists.txt", "M32_SUPPORTED 1", "M32_SUPPORTED 0" + + # CMake options are documented at + # https://github.com/klee/klee/blob/v#{version}/README-CMake.md + args = %W[ + -DKLEE_RUNTIME_BUILD_TYPE=Release + -DKLEE_LIBCXX_DIR=#{libcxx_install_dir} + -DKLEE_LIBCXX_BC_PATH=#{libcxx_install_dir}/lib + -DKLEE_LIBCXX_INCLUDE_DIR=#{libcxx_install_dir}/include + -DKLEE_LIBCXX_INCLUDE_PATH=#{libcxx_install_dir}/include/c++/v1 + -DKLEE_LIBCXXABI_SRC_DIR=#{libcxx_src_dir}/libcxxabi + -DLLVM_CONFIG_BINARY=#{llvm.opt_bin}/llvm-config + -DM32_SUPPORTED=OFF + -DENABLE_KLEE_ASSERTS=ON + -DENABLE_KLEE_LIBCXX=ON + -DENABLE_SOLVER_STP=ON + -DENABLE_TCMALLOC=ON + -DENABLE_SOLVER_Z3=ON + -DENABLE_ZLIB=ON + -DENABLE_DOCS=OFF + -DENABLE_SYSTEM_TESTS=OFF + -DENABLE_KLEE_EH_CXX=OFF + -DENABLE_KLEE_UCLIBC=OFF + -DENABLE_POSIX_RUNTIME=OFF + -DENABLE_SOLVER_METASMT=OFF + -DENABLE_UNIT_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + venv = virtualenv_create(libexec/"venv", "python3.13") + venv.pip_install resource("tabulate") + rewrite_shebang python_shebang_rewrite_info(venv.root/"bin/python"), *bin.children + end + + # Test adapted from + # http://klee.github.io/tutorials/testing-function/ + test do + (testpath/"get_sign.c").write <<~C + #include "klee/klee.h" + + int get_sign(int x) { + if (x == 0) + return 0; + if (x < 0) + return -1; + else + return 1; + } + + int main() { + int a; + klee_make_symbolic(&a, sizeof(a), "a"); + return get_sign(a); + } + C + + ENV["CC"] = llvm.opt_bin/"clang" + + system ENV.cc, "-I#{opt_include}", "-emit-llvm", + "-c", "-g", "-O0", "-Xclang", "-disable-O0-optnone", + testpath/"get_sign.c" + + total_instructions = 32 + expected_output = <<~EOS + KLEE: done: total instructions = #{total_instructions} + KLEE: done: completed paths = 3 + KLEE: done: partially completed paths = 0 + KLEE: done: generated tests = 3 + EOS + assert_match expected_output, shell_output("#{bin}/klee get_sign.bc 2>&1") + assert_path_exists testpath/"klee-out-0" + + assert_match "['get_sign.bc']", shell_output("#{bin}/ktest-tool klee-last/test000001.ktest") + + system ENV.cc, "-I#{opt_include}", "-L#{opt_lib}", "-lkleeRuntest", testpath/"get_sign.c" + with_env(KTEST_FILE: "klee-last/test000001.ktest") do + system "./a.out" + end + + assert_match <<~EOS, shell_output("#{bin}/klee-stats --print-columns='Instrs' --table-format=csv klee-out-0") + Instrs + #{total_instructions} + EOS + end +end diff --git a/Formula/k/kmod.rb b/Formula/k/kmod.rb new file mode 100644 index 0000000000000..5de759e2f857a --- /dev/null +++ b/Formula/k/kmod.rb @@ -0,0 +1,45 @@ +class Kmod < Formula + desc "Linux kernel module handling" + homepage "https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git" + url "https://mirrors.edge.kernel.org/pub/linux/utils/kernel/kmod/kmod-34.2.tar.xz" + sha256 "5a5d5073070cc7e0c7a7a3c6ec2a0e1780850c8b47b3e3892226b93ffcb9cb54" + license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"] + + livecheck do + url "https://mirrors.edge.kernel.org/pub/linux/utils/kernel/kmod/" + regex(/href=.*?kmod[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_linux: "53e61505bc84ed9434888a1e295f538a63e2aa6edcf0ea0130dd89ae54809f70" + sha256 x86_64_linux: "f9dc4575dbb5fff814a124bcdea9f0d01788ebbdf00c64e63ca14af901e761a7" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "scdoc" => :build + depends_on :linux + depends_on "openssl@3" + depends_on "xz" + depends_on "zlib" + depends_on "zstd" + + def install + args = %W[ + -Dbashcompletiondir=#{bash_completion} + -Dfishcompletiondir=#{fish_completion} + -Dzshcompletiondir=#{zsh_completion} + -Dsysconfdir=#{etc} + -Dmanpages=true + ] + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system bin/"kmod", "help" + assert_match "Module", shell_output("#{bin}/kmod list") + end +end diff --git a/Formula/k/kn.rb b/Formula/k/kn.rb new file mode 100644 index 0000000000000..d6adfd322c23c --- /dev/null +++ b/Formula/k/kn.rb @@ -0,0 +1,53 @@ +class Kn < Formula + desc "Command-line interface for managing Knative Serving and Eventing resources" + homepage "https://github.com/knative/client" + url "https://github.com/knative/client.git", + tag: "knative-v1.18.0", + revision: "96721e598f770d3cd9ee1f0a437bf45bb7951b54" + license "Apache-2.0" + head "https://github.com/knative/client.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3034a9a7ed80e2919485a4e85ec962d428a0c0cbb9864d77589db2b5f5ccfb97" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "297d162c0faefc3c0dec04a54d9dd4b1a49e434dccb9d5b25896ac112da6f28c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "82101a5958dc2f085b875e8ef6cc879e4cb9238e295355ee6f8ad44fe1cd2aad" + sha256 cellar: :any_skip_relocation, sonoma: "d348f6ac06a0d063cd4790f2adcdb328dea432e3a97ffb8442ac70c8bf9505c1" + sha256 cellar: :any_skip_relocation, ventura: "3dabd5c19f652132ad80cf8a811b6dd00675547bd1a0b9b8956bb0f00754ab58" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ab87d14d46a95b677faf2948df6704540e3fdd1558640c9cd2c7ab48ec48820" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3161226ee2880c1f8c650d8ad4cb13d1cc8f69fc7d2e8563566b1e77bb113250" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + + ldflags = %W[ + -s -w + -X knative.dev/client/pkg/commands/version.Version=v#{version} + -X knative.dev/client/pkg/commands/version.GitRevision=#{Utils.git_head(length: 8)} + -X knative.dev/client/pkg/commands/version.BuildDate=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/kn" + + generate_completions_from_executable(bin/"kn", "completion") + end + + test do + system bin/"kn", "service", "create", "foo", + "--namespace", "bar", + "--image", "gcr.io/cloudrun/hello", + "--target", "." + + yaml = File.read(testpath/"bar/ksvc/foo.yaml") + assert_match("name: foo", yaml) + assert_match("namespace: bar", yaml) + assert_match("image: gcr.io/cloudrun/hello", yaml) + + version_output = shell_output("#{bin}/kn version") + assert_match("Version: v#{version}", version_output) + assert_match("Build Date: ", version_output) + assert_match(/Git Revision: [a-f0-9]{8}/, version_output) + end +end diff --git a/Formula/k/knock.rb b/Formula/k/knock.rb new file mode 100644 index 0000000000000..59071ab70f025 --- /dev/null +++ b/Formula/k/knock.rb @@ -0,0 +1,48 @@ +class Knock < Formula + desc "Port-knock server" + homepage "https://github.com/jvinet/knock" + url "https://github.com/jvinet/knock/releases/download/v0.8/knock-0.8.tar.gz" + sha256 "698d8c965624ea2ecb1e3df4524ed05afe387f6d20ded1e8a231209ad48169c7" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6918a15821559b226ee8e3844a439277a1cf6b4dcd6fa503fd71531fe541fe8d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c0705f9179784dc82526bc20a47df2b3a39b1b5e476cca49d4406c9c0e3f1ea1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "326959f0e368e3b38816abdc5b45d483d1c4d46f0d26775171bd7d5ebeaa059d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4f84095e2b3b16af1f3d2263b79dd3432f9dbc9db27654377d520fdb54a0c520" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "81bcc7e4f700f88fd52678bcb97fe0eddf0a562e28bd406268ae263e286903dd" + sha256 cellar: :any_skip_relocation, sonoma: "6cffa8fa11e0df3dd002848ae504e67dec0064e8d8d37787020a5b3b068e14f7" + sha256 cellar: :any_skip_relocation, ventura: "765d3a0f6ae6560d5c274cda7330e50faaa3412d11251594a8463b5acd9a0539" + sha256 cellar: :any_skip_relocation, monterey: "964a0505b7d815efb5be3a9ecf3e935d19e07e8fb9245fc292dda30501d089cd" + sha256 cellar: :any_skip_relocation, big_sur: "b8d423345658b70c35b16a032ace493f1da244144dbfe0f4c4b0ed79ce0ac560" + sha256 cellar: :any_skip_relocation, catalina: "2c9a3167f4b08e9b4ed890f6cc165eda8e813da9c911e741fd9cdb5d3742de31" + sha256 cellar: :any_skip_relocation, mojave: "5af91e5dcf61f216105c1562c032f2d06decbf6f6653171793d6af2101e27f0b" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb2b4fc229f51debb0a56914b078a7c10f9ce2bd479e14104bf2c8d8e520abdf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92ee3bfd7171b2fd896bda24b35ccb710365acf17e8c87b01d6a119a5133d996" + end + + head do + url "https://github.com/jvinet/knock.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + uses_from_macos "libpcap" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"knock", "localhost", "123:tcp" + end +end diff --git a/Formula/k/knot-resolver.rb b/Formula/k/knot-resolver.rb new file mode 100644 index 0000000000000..0cd2934b69738 --- /dev/null +++ b/Formula/k/knot-resolver.rb @@ -0,0 +1,68 @@ +class KnotResolver < Formula + desc "Minimalistic, caching, DNSSEC-validating DNS resolver" + homepage "https://www.knot-resolver.cz/" + url "https://secure.nic.cz/files/knot-resolver/knot-resolver-5.7.5.tar.xz" + sha256 "80239cf9aa92599d9cbad4642dea5520b2ccfbc9c6f968886ea46179cb3cdf66" + license all_of: ["CC0-1.0", "GPL-3.0-or-later", "LGPL-2.1-or-later", "MIT"] + head "https://gitlab.labs.nic.cz/knot/knot-resolver.git", branch: "master" + + livecheck do + url "https://www.knot-resolver.cz/download/" + regex(/href=.*?knot-resolver[._-]v?(\d+(?:\.\d+)+)\.t[^>]*?>[^<]*?stable/i) + end + + bottle do + sha256 arm64_sequoia: "7c9948c0d651f2f405019d6520a7bdabd3ed904ecff54a92073acbc1ab014e12" + sha256 arm64_sonoma: "3382cbd84482ce8d977890d16dc5fd139d84162211b01f33ecf641d7d865a257" + sha256 arm64_ventura: "5e7d78a4ab9ecbbaf643eb14ade1dfa991a2ffc149d6635a6cf515ed3376de13" + sha256 sonoma: "99b6758c6c51f508e4b8600a6c6346c3f69f564d39147c70e9b9de417f92e757" + sha256 ventura: "8a6308b7ae198d484897098798ec9e33689daa69ecd398400bfa46c48bad2845" + sha256 arm64_linux: "7595f507c065b5d75db23481182422861f43dafdde405d6cba8c87dff9284518" + sha256 x86_64_linux: "4fb9a214783e990eae3f0eac0160b441c13c7083545c78db400d49258cbcba44" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "fstrm" + depends_on "gnutls" + depends_on "knot" + depends_on "libnghttp2" + depends_on "libuv" + depends_on "lmdb" + depends_on "luajit" + depends_on "protobuf-c" + + on_linux do + depends_on "libcap-ng" + depends_on "libedit" + depends_on "systemd" + end + + def install + args = ["--default-library=static"] + args << "-Dsystemd_files=enabled" if OS.linux? + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def post_install + (var/"knot-resolver").mkpath + end + + service do + run [opt_sbin/"kresd", "-c", etc/"knot-resolver/kresd.conf", "-n"] + require_root true + working_dir var/"knot-resolver" + input_path File::NULL + log_path File::NULL + error_log_path var/"log/knot-resolver.log" + end + + test do + assert_path_exists var/"knot-resolver" + system sbin/"kresd", "--version" + end +end diff --git a/Formula/k/knot.rb b/Formula/k/knot.rb new file mode 100644 index 0000000000000..3fdce94f01726 --- /dev/null +++ b/Formula/k/knot.rb @@ -0,0 +1,108 @@ +class Knot < Formula + desc "High-performance authoritative-only DNS server" + homepage "https://www.knot-dns.cz/" + url "https://knot-dns.nic.cz/release/knot-3.4.6.tar.xz" + sha256 "d19c5a1ff94b4f26027d635de108dbfc88f5652be86ccb3ba9a44ee9be0e5839" + license all_of: ["GPL-3.0-or-later", "0BSD", "BSD-3-Clause", "LGPL-2.0-or-later", "MIT"] + + livecheck do + url "https://www.knot-dns.cz/download/" + regex(/href=.*?knot[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "62241ba2192c8ffce58930ecd47a88899eaccc4251bfb9f7ba23fe18f2e60c03" + sha256 arm64_sonoma: "94f5f562fe7533cb29fc2e53fb6f9308fe16b36b4f1cf41bb7caa273c16f0bfb" + sha256 arm64_ventura: "d7b76b9ed9be9a503cc6a21c5c896f0125411dbf119e4f225894f8d2a1d03867" + sha256 sonoma: "9d65336182f586b314fd29bfee25c8652839c3032f9f9afa405e02ae502c8d63" + sha256 ventura: "f2353253ac4781bbb3436823a9e56389edf0091d03874caa3157e042fb7cba2d" + sha256 arm64_linux: "719cc905109bf0ca8a68b009af89ba49a9e2b6f0caa1d90c82a845abd1d1ef55" + sha256 x86_64_linux: "8e0bf75312b54c8edd092dd36139829eaefb5b0f0160f5053d5b47d3a65dedf2" + end + + head do + url "https://gitlab.nic.cz/knot/knot-dns.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + depends_on "fstrm" + depends_on "gnutls" + depends_on "libidn2" + depends_on "libnghttp2" + depends_on "lmdb" + depends_on "protobuf-c" + depends_on "userspace-rcu" + + uses_from_macos "libedit" + + # Fix 'knot/modules/rrl/./kru.inc.c:250:7: error: always_inline function' on macOS 13 and 14, + # see https://github.com/Homebrew/homebrew-core/pull/219163. + # Remove in next release. + patch do + url "https://gitlab.nic.cz/knot/knot-dns/-/commit/509d9d82b51c58ea572dccb09f4fdbe1a3c2571e.diff" + sha256 "c9b0d2dd5dddbe3d2fc0b817bbc3171f34fb73d0b099bf2b52cf101f4d0239ff" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", + "--with-configdir=#{etc}", + "--with-storage=#{var}/knot", + "--with-rundir=#{var}/run/knot", + "--with-module-dnstap", + "--enable-dnstap", + "--enable-quic", + *std_configure_args + + inreplace "samples/Makefile", "install-data-local:", "disable-install-data-local:" + + system "make" + system "make", "install" + system "make", "install-singlehtml" + + (buildpath/"knot.conf").write(knot_conf) + etc.install "knot.conf" + end + + def post_install + (var/"knot").mkpath + end + + def knot_conf + <<~EOS + server: + rundir: "#{var}/knot" + listen: [ "0.0.0.0@53", "::@53" ] + + log: + - target: "stderr" + any: "info" + + control: + listen: "knot.sock" + + template: + - id: "default" + storage: "#{var}/knot" + EOS + end + + service do + run opt_sbin/"knotd" + require_root true + input_path File::NULL + log_path File::NULL + error_log_path var/"log/knot.log" + end + + test do + system bin/"kdig", "@94.140.14.140", "www.knot-dns.cz", "+quic" + system bin/"khost", "brew.sh" + system sbin/"knotc", "conf-check" + end +end diff --git a/Formula/k/ko.rb b/Formula/k/ko.rb new file mode 100644 index 0000000000000..a374b91505aaa --- /dev/null +++ b/Formula/k/ko.rb @@ -0,0 +1,30 @@ +class Ko < Formula + desc "Build and deploy Go applications on Kubernetes" + homepage "https://ko.build/" + url "https://github.com/ko-build/ko/archive/refs/tags/v0.18.0.tar.gz" + sha256 "4499c8a65f9474443bcf9c194cd0406b03887a7c36557a94f22f040a33a95608" + license "Apache-2.0" + head "https://github.com/ko-build/ko.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "51ebbf1f9c0117c708c6837f964c9cd66192d0d40b6bf70be489b232c2b97e90" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "51ebbf1f9c0117c708c6837f964c9cd66192d0d40b6bf70be489b232c2b97e90" + sha256 cellar: :any_skip_relocation, arm64_ventura: "51ebbf1f9c0117c708c6837f964c9cd66192d0d40b6bf70be489b232c2b97e90" + sha256 cellar: :any_skip_relocation, sonoma: "ede5eb93a54e739e5d2a957ae57c26aa5ca6e58bcf4dcae69985f968ea2e8a06" + sha256 cellar: :any_skip_relocation, ventura: "72711771259318dce21574c99cee46c9ffcaeec187f307875e0d45327359601e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ab0a89bed6ceefe2fd0d40f46e086e105c43e76ea50c94f7bca1ae217a188a8" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/google/ko/pkg/commands.Version=#{version}") + + generate_completions_from_executable(bin/"ko", "completion") + end + + test do + output = shell_output("#{bin}/ko login reg.example.com -u brew -p test 2>&1") + assert_match "logged in via #{testpath}/.docker/config.json", output + end +end diff --git a/Formula/k/koji.rb b/Formula/k/koji.rb new file mode 100644 index 0000000000000..6c1463e082ba6 --- /dev/null +++ b/Formula/k/koji.rb @@ -0,0 +1,72 @@ +class Koji < Formula + desc "Interactive CLI for creating conventional commits" + homepage "https://github.com/cococonscious/koji" + url "https://github.com/cococonscious/koji/archive/refs/tags/v3.2.0.tar.gz" + sha256 "648b9d47de121895a79e3d963f5fc6e781d82a1531eeec6b3aa91db5951e058a" + license "MIT" + head "https://github.com/cococonscious/koji.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6ad589d2ccaf89bbc8e56b42cc1ea81757a914c29447f77f6862ef84f3a5a064" + sha256 cellar: :any, arm64_sonoma: "5655e3a07a057391e84ed1fbfabc7887d6d37d511581c59e5b9c49b6bff3ec93" + sha256 cellar: :any, arm64_ventura: "9fd26b1e044fb57e2d8ef0d7bbe1ea57aa7ab8b124277bd89adbfc67f7cdd467" + sha256 cellar: :any, sonoma: "b4b2066c3785fb96b1fc5f280a586a553ba3af079b6536020b4b7ba61073adaa" + sha256 cellar: :any, ventura: "cdbc54030a73304779b4f7456a7d51bbcfa257cf818043eb63c09171f98f238b" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e129ea2ee03bde87de5c0b3f167dd223feacd4815c20bcff21e5e240283b926" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3439dfc748254b2ca5f525304e3d329899829bd11a1cfe7593d2a45e38ac4ccd" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + 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 + + generate_completions_from_executable(bin/"koji", "completions") + end + + test do + require "utils/linkage" + + assert_match version.to_s, shell_output("#{bin}/koji --version") + + require "pty" + ENV["TERM"] = "xterm" + + # setup git + system "git", "init" + system "git", "config", "user.name", "BrewTestBot" + system "git", "config", "user.email", "BrewTestBot@test.com" + touch "foo" + system "git", "add", "foo" + + PTY.spawn(bin/"koji") do |r, w, _pid| + w.puts "feat" + w.puts "test" + w.puts "test" + w.puts "test" + w.puts "No" + w.puts "No" + begin + output = r.read + assert_match "Does this change affect any open issues", output + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end + + [ + 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/"koji", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + end +end diff --git a/Formula/k/koka.rb b/Formula/k/koka.rb new file mode 100644 index 0000000000000..2de7b484dccdd --- /dev/null +++ b/Formula/k/koka.rb @@ -0,0 +1,80 @@ +class Koka < Formula + desc "Compiler for the Koka language" + homepage "http://koka-lang.org/" + license "Apache-2.0" + head "https://github.com/koka-lang/koka.git", branch: "dev" + + stable do + url "https://github.com/koka-lang/koka.git", + tag: "v3.1.2", + revision: "3c4e721dd48d48b409a3740b42fc459bf6d7828e" + + # Backport fix to build with Cabal + patch do + url "https://github.com/koka-lang/koka/commit/86eb069440aa3e7da79b4f9b88867cfab4464354.patch?full_index=1" + sha256 "97229ae11d735963a29ded3c10adfa6d12672b7d07277190d1af3a898ee6045d" + end + + # Backport part of commit to build arm64 linux + # https://github.com/koka-lang/koka/commit/cd1d644b73a9683554f97bcea2e0ca2469a7bb39 + patch :DATA + end + + livecheck do + url :stable + regex(/v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d47eb2b41f0cd8cdb0d07acbbd4382b6ddb89cd4497af5b51d556bf8bab62b06" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7506daa434b459eaa217e10e77c4307fc598661ee4d9545a4c48916c0a0dda56" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b55493dad80f6ba85a9f2352982e88f863eb4ea69052816b66675a3ff9da564" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e16c7b9fa5a1e94040b624e47f04e2149771f77c36cf713ee3e6967cf16e4c83" + sha256 cellar: :any_skip_relocation, sonoma: "1e6fa5200d8ea7e94d81c7b13f29860d70b4101a17f7f7d78d6bf528288c1781" + sha256 cellar: :any_skip_relocation, ventura: "a0ac5fddcd21811e58fdcc7964d6f6268436bc5227c5610688e817747bc711b3" + sha256 cellar: :any_skip_relocation, monterey: "090a3e3eab5c76f9eda70e6518cb9014324602b4791f4b96ea398cec9e93c818" + sha256 cellar: :any_skip_relocation, x86_64_linux: "40d8791bbc514bb4bee3c4177bcc16fc865de042a5a53627caabbe774c9daa43" + end + + depends_on "cabal-install" => :build + depends_on "ghc" => :build + depends_on "pcre2" => :build + depends_on "gmp" + + uses_from_macos "libffi" + + def install + inreplace "src/Compile/Options.hs" do |s| + s.gsub! '["/usr/local/lib"', "[\"#{HOMEBREW_PREFIX}/lib\"" + s.gsub! '"-march=haswell"', "\"-march=#{ENV.effective_arch}\"" if Hardware::CPU.intel? && build.bottle? + end + + system "cabal", "v2-update" + system "cabal", "v2-build", *std_cabal_v2_args.reject { |s| s["install"] } + system "cabal", "v2-run", "koka", "--", + "-e", "util/bundle.kk", "--", + "--prefix=#{prefix}", "--install", "--system-ghc" + end + + test do + (testpath/"hellobrew.kk").write('pub fun main() println("Hello Homebrew")') + assert_match "Hello Homebrew", shell_output("#{bin}/koka -e hellobrew.kk") + assert_match "420000", shell_output("#{bin}/koka -O2 -e samples/basic/rbtree") + end +end + +__END__ +diff --git a/kklib/include/kklib/bits.h b/kklib/include/kklib/bits.h +index 670cf2eaf8fc779fd7792b09a5919480bfe2a3a6..d5ede971c858d18e7aca9336556d7b8562119fd8 100644 +--- a/kklib/include/kklib/bits.h ++++ b/kklib/include/kklib/bits.h +@@ -933,7 +933,7 @@ static inline uint64_t kk_clmul64_wide(uint64_t x, uint64_t y, uint64_t* hi) { + return _mm_extract_epi64(res, 0); + } + +-#elif KK_ARCH_ARM64 && defined(__ARM_NEON) // (defined(__ARM_FEATURE_SME) || defined(__ARM_FEATURE_SVE)) ++#elif KK_ARCH_ARM64 && defined(__ARM_NEON) && defined(__ARM_FEATURE_AES) + #define KK_BITS_HAS_FAST_CLMUL64 1 + #include + #include diff --git a/Formula/k/kommit.rb b/Formula/k/kommit.rb new file mode 100644 index 0000000000000..465ee70ace62f --- /dev/null +++ b/Formula/k/kommit.rb @@ -0,0 +1,22 @@ +class Kommit < Formula + desc "More detailed commit messages without committing!" + homepage "https://github.com/vigo/kommit" + url "https://github.com/vigo/kommit/archive/refs/tags/v1.1.0.tar.gz" + sha256 "c51e87c9719574feb9841fdcbd6d1a43b73a45afeca25e1312d2699fdf730161" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "e27d05c078699c3a5c3ba379e6a598cd4b96142358bf41fca14cf2faa83251ff" + end + + def install + bin.install "bin/git-kommit" + end + + test do + system "git", "init" + system bin/"git-kommit", "-m", "Hello" + assert_match "Hello", shell_output("#{bin}/git-kommit -s /dev/null 2>&1") + end +end diff --git a/Formula/k/kompose.rb b/Formula/k/kompose.rb new file mode 100644 index 0000000000000..cb3f6cd0143b7 --- /dev/null +++ b/Formula/k/kompose.rb @@ -0,0 +1,29 @@ +class Kompose < Formula + desc "Tool to move from `docker-compose` to Kubernetes" + homepage "https://kompose.io/" + url "https://github.com/kubernetes/kompose/archive/refs/tags/v1.36.0.tar.gz" + sha256 "b97616e412f29b7bc7a7a6431f27c9ad565c05298f7927d9bb588321e5da53d7" + license "Apache-2.0" + head "https://github.com/kubernetes/kompose.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "328f85907fa8a4e2f36c434d441ab901181d36da837163eb9d7b24880f338236" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "328f85907fa8a4e2f36c434d441ab901181d36da837163eb9d7b24880f338236" + sha256 cellar: :any_skip_relocation, arm64_ventura: "328f85907fa8a4e2f36c434d441ab901181d36da837163eb9d7b24880f338236" + sha256 cellar: :any_skip_relocation, sonoma: "0f1963be82154e27dcf9be0340ad8636d4b13905cf67b4d8ba6226d5d0930557" + sha256 cellar: :any_skip_relocation, ventura: "0f1963be82154e27dcf9be0340ad8636d4b13905cf67b4d8ba6226d5d0930557" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6de242b6fdabbff5cf33b7e409bc17e1062fafa575e42d4305e3dcf9523af22f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"kompose", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/kompose version") + end +end diff --git a/Formula/k/kona.rb b/Formula/k/kona.rb new file mode 100644 index 0000000000000..a035e5072aab6 --- /dev/null +++ b/Formula/k/kona.rb @@ -0,0 +1,38 @@ +class Kona < Formula + desc "Open-source implementation of the K programming language" + homepage "https://github.com/kevinlawler/kona" + url "https://github.com/kevinlawler/kona/archive/refs/tags/Win64-20211225.tar.gz" + sha256 "cd5dcc03394af275f0416b3cb2914574bf51ec60d1c857020fbd34b5427c5faf" + license "ISC" + head "https://github.com/kevinlawler/kona.git", branch: "master" + + livecheck do + url :stable + regex(/(?:Win(?:64)?[._-])?v?(\d+(?:\.\d+)*)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "84c61f1623af99fce59ff37ac3310eeb4c20bfa9ed42b78eec9dcacb8c9d57c5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3173ebdcc5b42b89e00caa74715d04512069ef0fd7d124f0c9b8fb92fd2a54a0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b0943e3d66400117a41dd547e627750c8c98ae95a1430831343995151cf3349" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8b1a6b849baa2c0423981e8a528551d49ce8a18f0772a6381038e0b3f27adb9f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "97493e1f57dc878702ebf3a34af7621a5f655104d684e7c50ef316c8cb30f97d" + sha256 cellar: :any_skip_relocation, sonoma: "eb1310b9df64a4a40b537f6e473c757109cc29cb2647771af3246afff8bab55b" + sha256 cellar: :any_skip_relocation, ventura: "90ed66c0f504012d6b9842882fde439a4be1c63c7d460aa9e046ffedba2b578a" + sha256 cellar: :any_skip_relocation, monterey: "73330e436e416c19f9a4abdd920173c99725bc5e8ca4b18ef3ebf1df20a561c5" + sha256 cellar: :any_skip_relocation, big_sur: "bc727b02b917dc2a6b81d8ad679618ed7128320bbb177cbba4967ff75d35a810" + sha256 cellar: :any_skip_relocation, catalina: "39a59be89532f96362eeeef2d5be14770da588944666ce3a178926f04b0f6e1c" + sha256 cellar: :any_skip_relocation, arm64_linux: "d6b3318bcb3e9c9129958230cc0884fdf263255e07f96d1a62acdb872c0d28d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e0418f26e5be870a8be5747b920ae20db61707f110c3e63c992ab397b8b87dc" + end + + def install + system "make" + bin.install "k" + end + + test do + assert_match "Hello, world!", pipe_output("#{bin}/k", '`0: "Hello, world!"') + end +end diff --git a/Formula/k/kondo.rb b/Formula/k/kondo.rb new file mode 100644 index 0000000000000..c7c2d027527ec --- /dev/null +++ b/Formula/k/kondo.rb @@ -0,0 +1,73 @@ +class Kondo < Formula + desc "Save disk space by cleaning non-essential files from software projects" + homepage "https://github.com/tbillington/kondo" + url "https://github.com/tbillington/kondo/archive/refs/tags/v0.8.tar.gz" + sha256 "4054c90e679a379a735b3166df4633fb86a33725175ebe23d7b659dcb7155b26" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7f7ed792db60c8e6dab1cd65a717e23443a509f37fc9a5c3fc2c5b2be86fdf65" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef1a8de9ec5ee7d8099bee48808e2472f8f7c328771b356961d1e3d901e247ad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6bbcb5abe74d2fb632d317a608adde42f9bbf59bec13eb3895f19811d6169ff3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b919fa810c7d632db59ab6b58757794eefae749feb39707fe7051d6bd95922ae" + sha256 cellar: :any_skip_relocation, sonoma: "b0410e25e8402df9f2eb72277ac60caa2c9ae253b78f24cfb2a4e95ef977c259" + sha256 cellar: :any_skip_relocation, ventura: "805778bce56c10cd81b39677875a74313f518f88afe139a809113ec63f761f58" + sha256 cellar: :any_skip_relocation, monterey: "d62701b1f0dc9b3fcf5c7b54fedf7d2a42fab755c26370ebc3be1426e7abb616" + sha256 cellar: :any_skip_relocation, arm64_linux: "84b9186af58150de46e72013a47b54df1d190a2ffcaa3e37be7bce9bc038ec2a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4127563df7eadb5c588ca4a1d32795acf107ebc693fe225cd5d7f201caba636" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "kondo") + generate_completions_from_executable(bin/"kondo", "--completions") + end + + test do + require "open3" + + # Write a Cargo.toml file so kondo will interpret this directory as a Cargo project. + (testpath/"Cargo.toml").write("") + + # Create a dummy file which we will delete via kondo. + dummy_artifact_path = (testpath/"target/foo") + + # Write 10 bytes into the dummy file. + dummy_artifact_path.write("0123456789") + + # Run kondo. It should detect the Cargo.toml file and interpret the directory as a Cargo project. + # The output should look roughly like the following: + # + # /private/tmp/kondo-test-20200731-55654-i9otaa Cargo project + # target (10.0B) + # delete above artifact directories? ([y]es, [n]o, [a]ll, [q]uit): + # + # We're going to simulate a user pressing "n" for no. + # The result of this should be that the dummy file still exists after kondo has exited. + Open3.popen3(bin/"kondo") do |stdin, _stdout, _, wait_thr| + # Simulate a user pressing "n" then pressing return/enter. + stdin.write("n\n") + + # Wait for the kondo process to exit. + wait_thr.value + + # Check that the dummy file still exists. + assert_equal true, dummy_artifact_path.exist? + end + + # The concept is the same as the above test, except this time we will simulate pressing "y" for yes. + # The result of this should be that the dummy file still no longer exists after kondo has exited. + Open3.popen3(bin/"kondo") do |stdin, _stdout, _, wait_thr| + # Simulate a user pressing "y" then pressing return/enter. + stdin.write("y\n") + + # Wait for the kondo process to exit. + wait_thr.value + + # Check that the dummy file no longer exists. + assert_equal false, dummy_artifact_path.exist? + end + end +end diff --git a/Formula/k/kool.rb b/Formula/k/kool.rb new file mode 100644 index 0000000000000..450268434af60 --- /dev/null +++ b/Formula/k/kool.rb @@ -0,0 +1,30 @@ +class Kool < Formula + desc "Web apps development with containers made easy" + homepage "https://kool.dev/" + url "https://github.com/kool-dev/kool/archive/refs/tags/3.4.0.tar.gz" + sha256 "706051161e8b97a79e9144e58a59a1bfae0553febc13de65726f0e3e67727be6" + license "MIT" + head "https://github.com/kool-dev/kool.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6eeec48a93221e8c641a1eda7f6954fa3a22764152678dc2d707fbc7433a1a04" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6eeec48a93221e8c641a1eda7f6954fa3a22764152678dc2d707fbc7433a1a04" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6eeec48a93221e8c641a1eda7f6954fa3a22764152678dc2d707fbc7433a1a04" + sha256 cellar: :any_skip_relocation, sonoma: "5e16937382c6f8f7c99575b832a5990c6881ae73bc46348f45e2a1bf41ff86bb" + sha256 cellar: :any_skip_relocation, ventura: "5e16937382c6f8f7c99575b832a5990c6881ae73bc46348f45e2a1bf41ff86bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "082b32596a7d62e8e53034608a8d96e8056d5cacb5343f65a24ed655ff436c20" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X kool-dev/kool/commands.version=#{version}") + + generate_completions_from_executable(bin/"kool", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/kool --version") + assert_match "docker doesn't seem to be installed", shell_output("#{bin}/kool status 2>&1", 1) + end +end diff --git a/Formula/k/kopia.rb b/Formula/k/kopia.rb new file mode 100644 index 0000000000000..87fc57262d9b5 --- /dev/null +++ b/Formula/k/kopia.rb @@ -0,0 +1,55 @@ +class Kopia < Formula + desc "Fast and secure open-source backup" + homepage "https://kopia.io/" + url "https://github.com/kopia/kopia.git", + tag: "v0.19.0", + revision: "1f8f728c4133d4f419df93e58a5b54c3bf9c75e3" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "db9430645f7e2915c3aa6a0016dd5e37c5b42bdaec0f7657653665c6802e8c5d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6ed432634abf977bbd40485a564fc89502e10b8d499264c5a40ca5de3d3fe462" + sha256 cellar: :any_skip_relocation, arm64_ventura: "53ec2d045ae77a30f91ac81b7c2cba5a36a4a98e90a2cb1b7d990ec43f8a1414" + sha256 cellar: :any_skip_relocation, sonoma: "b9d3710d308a6ddf5e3684454455da513fd6539d9ba05f47218e83ee45fad26f" + sha256 cellar: :any_skip_relocation, ventura: "60c61bf2914531a25a8be8342902d00bce084c5e5f45e1d19ac529392502e65b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "604ba9ec6d6e0c540946fb571881cdfec3572c6851945039b471a79455e52b94" + end + + depends_on "go" => :build + + def install + # removed github.com/kopia/kopia/repo.BuildGitHubRepo to disable + # update notifications + ldflags = %W[ + -s -w + -X github.com/kopia/kopia/repo.BuildInfo=#{Utils.git_head} + -X github.com/kopia/kopia/repo.BuildVersion=#{version} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"kopia", shells: [:bash, :zsh], + shell_parameter_format: "--completion-script-") + + output = Utils.safe_popen_read(bin/"kopia", "--help-man") + (man1/"kopia.1").write output + end + + test do + mkdir testpath/"repo" + (testpath/"testdir/testfile").write("This is a test.") + + ENV["KOPIA_PASSWORD"] = "dummy" + + output = shell_output("#{bin}/kopia --version").strip + + # verify version output, note we're unable to verify the git hash in tests + assert_match(%r{#{version} build: .* from:}, output) + + system bin/"kopia", "repository", "create", "filesystem", "--path", testpath/"repo", "--no-persist-credentials" + assert_path_exists testpath/"repo/kopia.repository.f" + system bin/"kopia", "snapshot", "create", testpath/"testdir" + system bin/"kopia", "snapshot", "list" + system bin/"kopia", "repository", "disconnect" + end +end diff --git a/Formula/k/kops.rb b/Formula/k/kops.rb new file mode 100644 index 0000000000000..b8ee623f1f1dd --- /dev/null +++ b/Formula/k/kops.rb @@ -0,0 +1,38 @@ +class Kops < Formula + desc "Production Grade K8s Installation, Upgrades, and Management" + homepage "https://kops.sigs.k8s.io/" + url "https://github.com/kubernetes/kops/archive/refs/tags/v1.31.0.tar.gz" + sha256 "6687c727bdd71246de400676e6e67885c93d398f0e45a3b82678cdf5306f0394" + license "Apache-2.0" + head "https://github.com/kubernetes/kops.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "90aa555089355545b2ee0eb2cbe1620702788be8fb56a43f69dc82b3abf0efe9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "612d14180651d082f1a0827bbdffcf101b8a84bef431abe501b0156efab5ae1c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d12c4dd89b31639208e19c00202c36284b305949732f72535d00a325b7b17f9e" + sha256 cellar: :any_skip_relocation, sonoma: "9fd9650885b9c9fe60cafdf12f4de3f3f6e17638c301e44c6106388a0afaecf1" + sha256 cellar: :any_skip_relocation, ventura: "395a35c5bf453f323d7f1e1f85e95c18d6020c4f6f6d15c17b50608d65b7744b" + sha256 cellar: :any_skip_relocation, arm64_linux: "0be861aa0bb5f6628cc6ab8c888a0e1d76503ebd06538dad258f6f1207463433" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9d8719838d0b38957785ec0a793ea18042c847c27a730e90d41088127df92e0" + end + + depends_on "go" => :build + depends_on "kubernetes-cli" + + def install + ldflags = "-s -w -X k8s.io/kops.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "k8s.io/kops/cmd/kops" + + generate_completions_from_executable(bin/"kops", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/kops version") + assert_match "no context set in kubecfg", shell_output("#{bin}/kops validate cluster 2>&1", 1) + end +end diff --git a/Formula/k/kor.rb b/Formula/k/kor.rb new file mode 100644 index 0000000000000..4348fba36304b --- /dev/null +++ b/Formula/k/kor.rb @@ -0,0 +1,54 @@ +class Kor < Formula + desc "CLI tool to discover unused Kubernetes resources" + homepage "https://github.com/yonahd/kor" + url "https://github.com/yonahd/kor/archive/refs/tags/v0.6.1.tar.gz" + sha256 "d6c123fbaa0f1ad32e75cb0f33b493672845a4373b3fd116c369a9bcdcdf5940" + license "MIT" + head "https://github.com/yonahd/kor.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9059c95c7a0fe71096bcd717a097be83d2cef975bf57c2fcd3d66fdfdebf7d3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "356db7a3454ae138d2055130f995eb4518716c8419e79aa0676d49f0ce4b1beb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "90b853401b7021051d2c9ea707a02bc5bd2954236b5168e62027464dfb93b171" + sha256 cellar: :any_skip_relocation, sonoma: "7c115047ad5faed758af251530e8686ff325ea28fae879dab427497489e0c452" + sha256 cellar: :any_skip_relocation, ventura: "5bcb1866d0bc23e5db1c8173b1c55c0c66566dd72d1000378c4474f8696ac531" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17832fb24098cd7448a0c72c2c7dce7dc17e20c5028a791cdbb9e3eee53bab5c" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/yonahd/kor/pkg/utils.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"kor", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/kor version") + + (testpath/"mock-kubeconfig").write <<~YAML + apiVersion: v1 + clusters: + - cluster: + server: https://mock-server:6443 + name: mock-server:6443 + contexts: + - context: + cluster: mock-server:6443 + namespace: default + user: mockUser/mock-server:6443 + name: default/mock-server:6443/mockUser + current-context: default/mock-server:6443/mockUser + kind: Config + preferences: {} + users: + - name: kube:admin/mock-server:6443 + user: + token: sha256~QTYGVumELfyzLS9H9gOiDhVA2B1VnlsNaRsiztOnae0 + YAML + + out = shell_output("#{bin}/kor all -k #{testpath}/mock-kubeconfig 2>&1", 1) + assert_match "Failed to retrieve namespaces: Get \"https://mock-server:6443/api/v1/namespaces/"", out + end +end diff --git a/Formula/k/kore.rb b/Formula/k/kore.rb new file mode 100644 index 0000000000000..6b44b0025f497 --- /dev/null +++ b/Formula/k/kore.rb @@ -0,0 +1,58 @@ +class Kore < Formula + desc "Web application framework for writing web APIs in C" + homepage "https://kore.io/" + url "https://kore.io/releases/kore-4.2.3.tar.gz" + sha256 "f9a9727af97441ae87ff9250e374b9fe3a32a3348b25cb50bd2b7de5ec7f5d82" + license "ISC" + head "https://github.com/jorisvink/kore.git", branch: "master" + + livecheck do + url "https://kore.io/source" + regex(/href=.*?kore[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "b25dd99e236b7cf5cdfec8d1128dfb125d271400aef79e29a6877fd47f86a4a2" + sha256 arm64_sonoma: "d984004ecf128c881234240035fe13f5e2c9af10c9bb0552f4ee0a321d2f5bdb" + sha256 arm64_ventura: "2079b1a823ee0915cb18e0148f04514d04638dc91807d2b3ef27c32129f7303a" + sha256 arm64_monterey: "0a22c98bd62f85f7cb1dcd41ef763c95bb97c4d77592432770de250e97dde75c" + sha256 arm64_big_sur: "37860487cb7c2ec1efeb924857b32da30d3bd6dd07f7eff4da3ad42d24134252" + sha256 sonoma: "87b0774ca1be1fadbe6353582a6af3fc01e53e80f31891fc152458584e3ac9b0" + sha256 ventura: "a826de0cab4f5e9b7cef6d7a08573d38b476cefda028e3ace20a8c1b79b7d414" + sha256 monterey: "4a013753ae526626e4afd5519a41521c5c2e2a004b741306617b7d23f6c7b218" + sha256 big_sur: "13917b8cf36d5fb5b57fb5028aa49fd421bd4ec930742b697d194ee0c0e1bb21" + sha256 arm64_linux: "38438db7080ee244c41fb90a46e7515d73171187f3e2ea7bc8a6c6b26277dda9" + sha256 x86_64_linux: "8f982ba054916139a8560c8826a450b30784e08c672aaebcc8736d6ca88e4eb0" + end + + depends_on "pkgconf" => :build + depends_on macos: :sierra # needs clock_gettime + depends_on "openssl@3" + + def install + openssl = Formula["openssl@3"] + + # We modify Makefile variables to save OpenSSL paths which get used at runtime. + # We don't directly override FEATURES_INC as Makefile uses 'FEATURES_INC+='. + # This is not needed on macOS where the Makefile already saves pkg-config output. + unless OS.mac? + inreplace "Makefile", /^FEATURES_INC=$/, "FEATURES_INC=-I#{openssl.opt_include}" + ENV["OPENSSL_PATH"] = openssl.opt_prefix + end + + ENV.deparallelize { system "make", "PREFIX=#{prefix}", "TASKS=1" } + system "make", "install", "PREFIX=#{prefix}" + + # Remove openssl cellar references, which breaks kore on openssl updates + inreplace [pkgshare/"features", pkgshare/"linker"], openssl.prefix.realpath, openssl.opt_prefix if OS.mac? + end + + test do + system bin/"kodev", "create", "test" + cd "test" do + system bin/"kodev", "build" + system bin/"kodev", "clean" + end + end +end diff --git a/Formula/k/kosli-cli.rb b/Formula/k/kosli-cli.rb new file mode 100644 index 0000000000000..02f7ca2084668 --- /dev/null +++ b/Formula/k/kosli-cli.rb @@ -0,0 +1,43 @@ +class KosliCli < Formula + desc "CLI for managing Kosli" + homepage "https://docs.kosli.com/client_reference/" + url "https://github.com/kosli-dev/cli/archive/refs/tags/v2.11.14.tar.gz" + sha256 "b38c16a701587c91451c9a3719151907c9c3335e1c51b2216d8e6ae5d4879626" + license "MIT" + head "https://github.com/kosli-dev/cli.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5acc2fbc94039e0024cef383b6c713fab9df08e1840921649dedd085c2b6e709" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c364e5bc655683168c3b49a17fa5a3983a8b619ed56a0fd9965b0fde90dbd130" + sha256 cellar: :any_skip_relocation, arm64_ventura: "08edfbc7dd9f5a284522beb740e5ef5b9a4928b4048d3ae1c4b5a54d9b25351f" + sha256 cellar: :any_skip_relocation, sonoma: "dab9b468a53a11b219b3b9041fadfecafd2350135cb9dd5ee5a365ac8d288aa8" + sha256 cellar: :any_skip_relocation, ventura: "46d51d5437cef0844aa6511f3a878ce01f4813f5f81cdb58b765bddbb723293d" + sha256 cellar: :any_skip_relocation, arm64_linux: "dedbb48c919edf8c8e50043e3710eae3e7fcaced7cbba69dd6f106b81cdf3fa6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2fb32d0378078d48ed7e4dbd0b5a8b8d96f6fa48c5e8340d5fc1e19e68e8aa8d" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/kosli-dev/cli/internal/version.version=#{version} + -X github.com/kosli-dev/cli/internal/version.gitCommit=#{tap.user} + -X github.com/kosli-dev/cli/internal/version.gitTreeState=clean + ] + system "go", "build", *std_go_args(output: bin/"kosli", ldflags:), "./cmd/kosli" + + generate_completions_from_executable(bin/"kosli", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/kosli version") + + assert_match "OK", shell_output("#{bin}/kosli status") + end +end diff --git a/Formula/k/kotlin-language-server.rb b/Formula/k/kotlin-language-server.rb new file mode 100644 index 0000000000000..d845c2c65a04d --- /dev/null +++ b/Formula/k/kotlin-language-server.rb @@ -0,0 +1,52 @@ +class KotlinLanguageServer < Formula + desc "Intelligent Kotlin support for any editor/IDE using the Language Server Protocol" + homepage "https://github.com/fwcd/kotlin-language-server" + url "https://github.com/fwcd/kotlin-language-server/archive/refs/tags/1.3.13.tar.gz" + sha256 "4cb346f989ef114f6073cb9401968a7dd27eb5cd96993fa6856203610a13f96e" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8a8f715a1cb3d08aba2c7691f832a7d7f080a456b31b7ad27c319e82eaa7b276" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1bb973d9967acd621079bc932a5ad6bf2971020a9b2c75f4f4c2ba56d3d51157" + sha256 cellar: :any_skip_relocation, arm64_ventura: "70751b17fc9cb655dfff1b5d05c18bdc2ee8de66a41fbc5e9d4882cc0b13b3f5" + sha256 cellar: :any_skip_relocation, sonoma: "1aa692e029744e16e952cf8de40b9dfd63f19416e9d5532445cc038745df83b5" + sha256 cellar: :any_skip_relocation, ventura: "06b601dfae36e4909787d1c2f9c01509c4573eb5a35b617806cd36faaf6c3bfb" + sha256 cellar: :any_skip_relocation, arm64_linux: "68f9f6eff3f823259f8fdd3f93272ac79cdccfc4e4e7b5586e148b6302899a24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61b0bc6b824959b614df4e0cc31463ab4d8d3a95030c11dd9263921e2c5c5325" + end + + depends_on "gradle" => :build + depends_on "openjdk@21" + + # file permission literal patch, upstream pr ref, https://github.com/fwcd/kotlin-language-server/pull/611 + patch do + url "https://github.com/fwcd/kotlin-language-server/commit/a788e5f7b449dd701adc642c7cfb129f1895bd3e.patch?full_index=1" + sha256 "cc9f6c68a09c76017099ffdd9bfe242a81b51221131bc33f3a7e2baa5bea6d01" + end + + def install + ENV["JAVA_HOME"] = Language::Java.java_home("21") + # Remove Windows files + rm "gradlew.bat" + + system "gradle", ":server:installDist", "-PjavaVersion=#{Formula["openjdk@21"].version.major}" + + libexec.install Dir["server/build/install/server/*"] + + (bin/"kotlin-language-server").write_env_script libexec/"bin/kotlin-language-server", + Language::Java.overridable_java_home_env("21") + 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" + + output = pipe_output(bin/"kotlin-language-server", input, 0) + + assert_match(/^Content-Length: \d+/i, output) + end +end diff --git a/Formula/k/kotlin.rb b/Formula/k/kotlin.rb new file mode 100644 index 0000000000000..1960f0bd4a56a --- /dev/null +++ b/Formula/k/kotlin.rb @@ -0,0 +1,42 @@ +class Kotlin < Formula + desc "Statically typed programming language for the JVM" + homepage "https://kotlinlang.org/" + url "https://github.com/JetBrains/kotlin/releases/download/v2.1.21/kotlin-compiler-2.1.21.zip" + sha256 "1ba08a8b45da99339a0601134cc037b54cf85e9bc0edbe76dcbd27c2d684a977" + license "Apache-2.0" + + # 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, all: "6e6e5ee2272357a918c3b94dea13c00f9a943dac1d80becb8ed8d70e6e3ec876" + end + + depends_on "openjdk" + + conflicts_with cask: "kotlin-native" + + def install + libexec.install "bin", "build.txt", "lib" + rm Dir[libexec/"bin/*.bat"] + bin.install Dir[libexec/"bin/*"] + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + prefix.install "license" + end + + test do + (testpath/"test.kt").write <<~KOTLIN + fun main(args: Array) { + println("Hello World!") + } + KOTLIN + + system bin/"kotlinc", "test.kt", "-include-runtime", "-d", "test.jar" + system bin/"kotlinc-jvm", "test.kt", "-include-runtime", "-d", "test.jar" + end +end diff --git a/Formula/k/kpcli.rb b/Formula/k/kpcli.rb new file mode 100644 index 0000000000000..303519b16695d --- /dev/null +++ b/Formula/k/kpcli.rb @@ -0,0 +1,130 @@ +class Kpcli < Formula + desc "Command-line interface to KeePass database files" + homepage "https://kpcli.sourceforge.io/" + url "https://downloads.sourceforge.net/project/kpcli/kpcli-4.1.3.pl" + sha256 "c91363e4e07f3521a867f68db602c95b53dc167e4366ee7ff254252b4176c62f" + license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] + + livecheck do + url :stable + regex(%r{url=.*?/kpcli[._-]v?(\d+(?:\.\d+)+)\.pl}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "07acbda85e763997f4f4350cb67ee904413309b57132dd9b528fd73913dc6320" + sha256 cellar: :any, arm64_sonoma: "ccc808e72ee497400ca548656f35fa746f00c43acafa9000a2c82608e2d9a23e" + sha256 cellar: :any, arm64_ventura: "e749db8f89b0c44e1f4bdf8939f17d17588d0ad085b80eec57133550180974d9" + sha256 cellar: :any, sonoma: "7e4fbc43db9b559627b88caeaac89eb1c0a7b3bf94830cc47fb52498a9121c71" + sha256 cellar: :any, ventura: "5b6f7ccdcd16433c960df66d0219223f9b16879052f3762b632ded2f51ea104d" + sha256 cellar: :any_skip_relocation, arm64_linux: "fdd8b44c6fd748f5c76213ec6913259e1fbbd1c04a3d565672a06d503757fca1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "194893adad47f2845c789a032750b49f46ce0900a6d72858305f9f820de97a04" + end + + depends_on "readline" + + uses_from_macos "ncurses" + uses_from_macos "perl" + + resource "Mac::Pasteboard" do + on_macos do + url "https://cpan.metacpan.org/authors/id/W/WY/WYANT/Mac-Pasteboard-0.105.tar.gz" + sha256 "2d5592abb1f015273eaa6d832edd922f8695368bc69fea8f413b826bb1e68633" + end + end + + resource "Clone" do + on_linux do + url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/Clone-0.47.tar.gz" + sha256 "4c2c0cb9a483efbf970cb1a75b2ca75b0e18cb84bcb5c09624f86e26b09c211d" + end + end + + resource "Term::ReadKey" do + on_linux do + url "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.38.tar.gz" + sha256 "5a645878dc570ac33661581fbb090ff24ebce17d43ea53fd22e105a856a47290" + end + 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 "File::KeePass" do + url "https://cpan.metacpan.org/authors/id/R/RH/RHANDOM/File-KeePass-2.03.tar.gz" + sha256 "c30c688027a52ff4f58cd69d6d8ef35472a7cf106d4ce94eb73a796ba7c7ffa7" + end + + resource "Crypt::Rijndael" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Crypt-Rijndael-1.16.tar.gz" + sha256 "6540085e3804b82a6f0752c1122cf78cadd221990136dd6fd4c097d056c84d40" + 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::ShellUI" do + url "https://cpan.metacpan.org/authors/id/B/BR/BRONSON/Term-ShellUI-0.92.tar.gz" + sha256 "3279c01c76227335eeff09032a40f4b02b285151b3576c04cacd15be05942bdb" + 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 "Data::Password" do + url "https://cpan.metacpan.org/authors/id/R/RA/RAZINF/Data-Password-1.12.tar.gz" + sha256 "830cde81741ff384385412e16faba55745a54a7cc019dd23d7ed4f05d551a961" + end + + resource "Clipboard" do + url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Clipboard-0.31.tar.gz" + sha256 "af6dc25cf8299d3ed612a2182d0c98e7a011f12ac5f6634c1e9180d3204c2cd8" + end + + resource "Capture::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.50.tar.gz" + sha256 "ca6e8d7ce7471c2be54e1009f64c367d7ee233a2894cacf52ebe6f53b04e81e5" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + ENV.prepend_path "PERL5LIB", libexec/"lib" + + res = resources.to_set(&:name) - ["Clipboard", "Term::Readline::Gnu"] + res.each do |r| + resource(r).stage do + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make", "install" + end + end + + resource("Clipboard").stage do + system "perl", "Build.PL", "--install_base", libexec + system "./Build" + system "./Build", "install" + 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 + + libexec.install "kpcli-#{version}.pl" => "kpcli" + chmod 0755, libexec/"kpcli" + (bin/"kpcli").write_env_script(libexec/"kpcli", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + system bin/"kpcli", "--help" + end +end diff --git a/Formula/k/kqwait.rb b/Formula/k/kqwait.rb new file mode 100644 index 0000000000000..197dd7c1d9ed3 --- /dev/null +++ b/Formula/k/kqwait.rb @@ -0,0 +1,36 @@ +class Kqwait < Formula + desc "Wait for events on files or directories on macOS" + homepage "https://github.com/sschober/kqwait" + url "https://github.com/sschober/kqwait/archive/refs/tags/kqwait-v1.0.3.tar.gz" + sha256 "878560936d473f203c0ccb3d42eadccfb50cff15e6f15a59061e73704474c531" + license "BSD-2-Clause" + head "https://github.com/sschober/kqwait.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "69088af879a12bce91e41c0f70c063c27778c4668db657edd7b99062e14f9c34" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "61eda480313a8450e8629464371f24d6ab7f223fc8eb56290666164e572a6792" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3747581e5e96f01908dc6bc5b5368e1f40e714821c69ea8884ced4cace9b0fc8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "647d43de225f13a8d44c1b496bea51d180645b5c51cee5de9c82484117549d7b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cfd6026d7a40557bb6e2e660af989426984359a1a18af842237b46a7b8af10b7" + sha256 cellar: :any_skip_relocation, sonoma: "30bea99e246e8c62407490ef3ccf3ce5ce5df3cbb39a8672a6654f14f7bbc025" + sha256 cellar: :any_skip_relocation, ventura: "46fdfbeb3a8961f18b4da5e0d1b94ae232b45ea789a701d963317a496c5542a8" + sha256 cellar: :any_skip_relocation, monterey: "f348cb75f4cc2ebc25a690de447dee670a144707256a08a252454d27fe52a042" + sha256 cellar: :any_skip_relocation, big_sur: "d628f1544a08964c38352d12b7d7c8eab0317391e7eceab195d11882852b4ee3" + sha256 cellar: :any_skip_relocation, catalina: "a126094dabbb2fd9a2c539b1515657c1855bb0c971492ca0d6c56aa97bfebe48" + sha256 cellar: :any_skip_relocation, mojave: "474c5ae5f69ca9a2a239d601733b88ad2eeca8701bae1b5431385bb05fff6b24" + sha256 cellar: :any_skip_relocation, high_sierra: "dff2354e240808ec604ebd457c45ca9f2fe540fc235fc30c71c7d4effae5d0a3" + sha256 cellar: :any_skip_relocation, sierra: "cdf423b95df66f4875df6355e1bef51c41132d1de83205d2a1f87663be5edfb8" + sha256 cellar: :any_skip_relocation, el_capitan: "889401570c96026d7e343d48165cd2bc61735678e0125902e7d36680fa64d9a9" + end + + depends_on :macos + + def install + system "make" + bin.install "kqwait" + end + + test do + system bin/"kqwait", "-v" + end +end diff --git a/Formula/k/kraftkit.rb b/Formula/k/kraftkit.rb new file mode 100644 index 0000000000000..ba1bd41f1a980 --- /dev/null +++ b/Formula/k/kraftkit.rb @@ -0,0 +1,54 @@ +class Kraftkit < Formula + desc "Build and use highly customized and ultra-lightweight unikernel VMs" + homepage "https://unikraft.org/docs/cli" + url "https://github.com/unikraft/kraftkit/archive/refs/tags/v0.11.6.tar.gz" + sha256 "7a0cd9b656c34ec801c8bef6716787292f7ab8eada15f6919002e2db267b0801" + license "BSD-3-Clause" + head "https://github.com/unikraft/kraftkit.git", branch: "staging" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "634c8de8441fb3c5cbfd4a0063321c7a3ad051f618cf97a738ffe794b7bed9e5" + sha256 cellar: :any, arm64_sonoma: "7fd1a6fc14424f9a0fca6d3f4fc64a367072b43c6c7ba91a54f5180b51f44a10" + sha256 cellar: :any, arm64_ventura: "17bae80e0c3fc125743e8169c0c0d5c86fb63d66e35d8c3e45142e39e509e4c8" + sha256 cellar: :any, sonoma: "4974ca4f7496b959ae1c88c6cd68c7cb64a18ed64a1838f195243638bf924011" + sha256 cellar: :any, ventura: "4e11acfa52b9b89b9e8897b31ed7d62391b9d183344ce29b0f97ac32289acf17" + sha256 cellar: :any_skip_relocation, arm64_linux: "4057001b3954f809d3293f25d80054f50ee8502f14cd3b8bbb059397c512bf24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6abe02b5b41416d128059d71e7a2ef503d2152bd89c71a2daeb09088fdc8e3ef" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + depends_on "gpgme" + + on_linux do + depends_on "btrfs-progs" + end + + def install + ldflags = %W[ + -s -w + -X kraftkit.sh/internal/version.version=#{version} + -X kraftkit.sh/internal/version.commit=#{tap.user} + -X kraftkit.sh/internal/version.buildTime=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"kraft"), "./cmd/kraft" + + generate_completions_from_executable(bin/"kraft", "completion") + end + + test do + expected = if OS.mac? + "could not determine hypervisor and system mode" + else + "finding unikraft.org/helloworld:latest" + end + assert_match expected, shell_output("#{bin}/kraft run unikraft.org/helloworld:latest 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/kraft version") + end +end diff --git a/Formula/k/krakend.rb b/Formula/k/krakend.rb new file mode 100644 index 0000000000000..ca5076e04b819 --- /dev/null +++ b/Formula/k/krakend.rb @@ -0,0 +1,86 @@ +class Krakend < Formula + desc "Ultra-High performance API Gateway built in Go" + homepage "https://www.krakend.io/" + url "https://github.com/krakendio/krakend-ce/archive/refs/tags/v2.10.0.tar.gz" + sha256 "3495b24b7a4506b9c6eccdc39e2fb21f0425170ac0942185d975260dc9cf4069" + license "Apache-2.0" + head "https://github.com/krakendio/krakend-ce.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e1936b4b8e16dd401160e37fc64147b173cb1a229c783323ce8490b344796b06" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f67025ccba882e898086723f95ac596be9b8a732d092c1aec063928ca8f8fa9d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "724406a542178c49e459a8d593da7eb4d38c582e1953f0c4f33c50e54e7a10e2" + sha256 cellar: :any_skip_relocation, sonoma: "3a6b852318ad17ef331310546c8436ec2836687d0fe10690ae9c6ab30ebd9dc7" + sha256 cellar: :any_skip_relocation, ventura: "a16f3aa8a6fb755e7c753cfcc78cd8a028a2efcae819876314eac05d95aff2db" + sha256 cellar: :any_skip_relocation, arm64_linux: "e284a7d0101c7194b71bbaa6d44ed27128eab2e920495ebd5b17ebd82b483497" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e662d80c809c9c872301a6d7a451db4242849bb6826fd423f7f2dc9606a6a30d" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/krakendio/krakend-ce/v2/pkg.Version=#{version} + -X github.com/luraproject/lura/v2/core.KrakendVersion=#{version} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/krakend-ce" + end + + test do + (testpath/"krakend_unsupported_version.json").write <<~JSON + { + "version": 2, + "extra_config": { + "github_com/devopsfaith/krakend-gologging": { + "level": "WARNING", + "prefix": "[KRAKEND]", + "syslog": false, + "stdout": true + } + } + } + JSON + assert_match "unsupported version", + shell_output("#{bin}/krakend check -c krakend_unsupported_version.json 2>&1", 1) + + (testpath/"krakend_bad_file.json").write <<~JSON + { + "version": 3, + "bad": file + } + JSON + assert_match "ERROR", + shell_output("#{bin}/krakend check -c krakend_bad_file.json 2>&1", 1) + + (testpath/"krakend.json").write <<~JSON + { + "version": 3, + "extra_config": { + "telemetry/logging": { + "level": "WARNING", + "prefix": "[KRAKEND]", + "syslog": false, + "stdout": true + } + }, + "endpoints": [ + { + "endpoint": "/test", + "backend": [ + { + "url_pattern": "/backend", + "host": [ + "http://some-host/" + ] + } + ] + } + ] + } + JSON + assert_match "Syntax OK", + shell_output("#{bin}/krakend check -c krakend.json 2>&1") + end +end diff --git a/Formula/k/krb5.rb b/Formula/k/krb5.rb new file mode 100644 index 0000000000000..bb7aed7750d8d --- /dev/null +++ b/Formula/k/krb5.rb @@ -0,0 +1,49 @@ +class Krb5 < Formula + desc "Network authentication protocol" + homepage "https://web.mit.edu/kerberos/" + url "https://kerberos.org/dist/krb5/1.21/krb5-1.21.3.tar.gz" + sha256 "b7a4cd5ead67fb08b980b21abd150ff7217e85ea320c9ed0c6dadd304840ad35" + license :cannot_represent + + livecheck do + url :homepage + regex(/Current release: .*?>krb5[._-]v?(\d+(?:\.\d+)+) :build + uses_from_macos "libedit" + + def install + cd "src" do + system "./configure", *std_configure_args, + "--disable-nls", + "--disable-silent-rules", + "--without-system-verto", + "--without-keyutils" + system "make" + system "make", "install" + end + end + + test do + system bin/"krb5-config", "--version" + assert_match include.to_s, + shell_output("#{bin}/krb5-config --cflags") + end +end diff --git a/Formula/k/krep.rb b/Formula/k/krep.rb new file mode 100644 index 0000000000000..8afc40caffb3b --- /dev/null +++ b/Formula/k/krep.rb @@ -0,0 +1,31 @@ +class Krep < Formula + desc "High-Performance String Search Utility" + homepage "https://github.com/davidesantangelo/krep" + url "https://github.com/davidesantangelo/krep/archive/refs/tags/v1.2.1.tar.gz" + sha256 "eea570981c9c24ade2c9bdebfd3ff144a5d4d30ba940e1bcf2f0e3355421886f" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "abeeaebb1a7106686f09dd6cd76eb69c7aa572d89658810236476531ec284e06" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e830eb2e2ed1a1886ecf0f296f06b72649624973c86f36b3f50736802463e124" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a6cf7e9459a67144232b853108c03b92b07668b9640c8da92f45fd3f377f4eca" + sha256 cellar: :any_skip_relocation, sonoma: "a2010747f0a200256ae54812a2043cfb7162e53158e4d63b74ed0c58e5e34612" + sha256 cellar: :any_skip_relocation, ventura: "fb742f1f5789a0ca58e285aebc035b3d4c8c7864e5be9b8104f2909f27938de3" + sha256 cellar: :any_skip_relocation, arm64_linux: "ccc749c33a0d9108badfbd1c08ed20bfe09d4cfbebb1bf1addc40ac357209ecb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d952331a6b919b3fb98d9ff2071038d83de71d2242fe39a1672133fc6b726360" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match version.major_minor.to_s, shell_output("#{bin}/krep -v") + + text_file = testpath/"file.txt" + text_file.write "This should result in one match" + + output = shell_output("#{bin}/krep -c 'match' #{text_file}").strip + assert_match "1", output + end +end diff --git a/Formula/k/krew.rb b/Formula/k/krew.rb new file mode 100644 index 0000000000000..7b7eb6cd10460 --- /dev/null +++ b/Formula/k/krew.rb @@ -0,0 +1,46 @@ +class Krew < Formula + desc "Package manager for kubectl plugins" + homepage "https://sigs.k8s.io/krew/" + url "https://github.com/kubernetes-sigs/krew.git", + tag: "v0.4.5", + revision: "e7e5b619d0defd3fe53f66ce7e7330b21386e944" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/krew.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2612180540b05504e2f9c3aae82cb6335ffa55e88ac9e27f2bdad18390c22dc0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2612180540b05504e2f9c3aae82cb6335ffa55e88ac9e27f2bdad18390c22dc0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2612180540b05504e2f9c3aae82cb6335ffa55e88ac9e27f2bdad18390c22dc0" + sha256 cellar: :any_skip_relocation, sonoma: "97a497441f46ee46bd7c458d3d369697ca2fe43c75fc58a861db755a2d205ff5" + sha256 cellar: :any_skip_relocation, ventura: "97a497441f46ee46bd7c458d3d369697ca2fe43c75fc58a861db755a2d205ff5" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b31068dbe7492c0fd237c55bf3f6be3bdeab2af67074466c700c3c240f45617" + sha256 cellar: :any_skip_relocation, x86_64_linux: "67e4f1ed2eb1d0d9871d87749e10251448e279bafbfe74ab1e13229cb3151841" + end + + depends_on "go" => :build + depends_on "kubernetes-cli" + + def install + ENV["CGO_ENABLED"] = "0" + + ldflags = %W[ + -w + -X sigs.k8s.io/krew/internal/version.gitCommit=#{Utils.git_short_head(length: 8)} + -X sigs.k8s.io/krew/internal/version.gitTag=v#{version} + ] + + system "go", "build", *std_go_args(output: bin/"kubectl-krew", ldflags:, tags: "netgo"), "./cmd/krew" + end + + test do + ENV["KREW_ROOT"] = testpath + kubectl = Formula["kubernetes-cli"].opt_bin/"kubectl" + + system bin/"kubectl-krew", "update" + system bin/"kubectl-krew", "install", "ctx" + assert_path_exists testpath/"bin/kubectl-ctx" + + assert_match "v#{version}", shell_output("#{bin}/kubectl-krew version") + assert_match (HOMEBREW_PREFIX/"bin/kubectl-krew").to_s, shell_output("#{kubectl} plugin list") + end +end diff --git a/Formula/k/ksh93.rb b/Formula/k/ksh93.rb new file mode 100644 index 0000000000000..a5c55cad751dd --- /dev/null +++ b/Formula/k/ksh93.rb @@ -0,0 +1,36 @@ +class Ksh93 < Formula + desc "KornShell, ksh93" + homepage "https://github.com/ksh93/ksh" + url "https://github.com/ksh93/ksh/archive/refs/tags/v1.0.10.tar.gz" + sha256 "9f4c7a9531cec6941d6a9fd7fb70a4aeda24ea32800f578fd4099083f98b4e8a" + license "EPL-2.0" + head "https://github.com/ksh93/ksh.git", branch: "dev" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5deb3b81fd3f590988dd88c80311891ca93a33af176c47156a1451bd7aabac87" + sha256 cellar: :any, arm64_sonoma: "c19642595db560b792a462a2754cdd1c9dcf9cce1206f831e9445f364ddeee9d" + sha256 cellar: :any, arm64_ventura: "35617322f558cb0e43a0f265eefaffbe447061bc24acd75452b2b5b084e56acd" + sha256 cellar: :any, arm64_monterey: "2f7f6d16223a34599d8f5d7a109e3c0b9bf16dbd98758b8c643d9c43ba40001d" + sha256 sonoma: "b15cd1a4a1052c29217a92cdcc890755a1af17031b0375d2c48218e37de17ed3" + sha256 ventura: "fd2c2ab5ef6b79db5b99b18775c36806ab45f06dbfde1a19dbba879c88ff02a3" + sha256 monterey: "4a18d30f5bd6874f925b389150c77864955c33d546025ab87ba95dc36e6287be" + sha256 cellar: :any_skip_relocation, arm64_linux: "a533071501bda03b7663eaf76acaee427fd6ad410521db8f3d42b349a4a8938c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e1e57baceef185a21b476c489ec150cbf00729c4b0b31243dd13d5f560376b1" + end + + def install + ENV.append "LDFLAGS", "-Wl,-rpath,#{lib}" + system "bin/package", "verbose", "make" + system "bin/package", "verbose", "install", prefix + %w[ksh93 rksh rksh93].each do |alt| + bin.install_symlink "ksh" => alt + man1.install_symlink "ksh.1" => "#{alt}.1" + end + doc.install "ANNOUNCE" + doc.install %w[COMPATIBILITY README RELEASE TYPES].map { |f| "src/cmd/ksh93/#{f}" } + end + + test do + system "#{bin}/ksh93 -c 'A=$(((1./3)+(2./3)));test $A -eq 1'" + end +end diff --git a/Formula/k/ksops.rb b/Formula/k/ksops.rb new file mode 100644 index 0000000000000..c906a6a14e895 --- /dev/null +++ b/Formula/k/ksops.rb @@ -0,0 +1,39 @@ +class Ksops < Formula + desc "Flexible Kustomize Plugin for SOPS Encrypted Resources" + homepage "https://github.com/viaduct-ai/kustomize-sops" + url "https://github.com/viaduct-ai/kustomize-sops/archive/refs/tags/v4.4.0.tar.gz" + sha256 "d498284ee6a523fd4b87d284693b313fea289b4a374f2c0d1b5023f2b18bf77a" + license "Apache-2.0" + head "https://github.com/viaduct-ai/kustomize-sops.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3aa747b7c1f4bcfabfd3942ff92a66ee859762d82a495509742df676e0682a48" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3aa747b7c1f4bcfabfd3942ff92a66ee859762d82a495509742df676e0682a48" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3aa747b7c1f4bcfabfd3942ff92a66ee859762d82a495509742df676e0682a48" + sha256 cellar: :any_skip_relocation, sonoma: "c9665ddf3104edd404a8a6b8bdf7e4aa823327c976584a0ea0fe7ed9f8b33456" + sha256 cellar: :any_skip_relocation, ventura: "c9665ddf3104edd404a8a6b8bdf7e4aa823327c976584a0ea0fe7ed9f8b33456" + sha256 cellar: :any_skip_relocation, x86_64_linux: "03ac64e22aa36b5d1664fbf1748a08b76d3f984f00277c1ac329757cffaa475a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + (testpath/"secret-generator.yaml").write <<~YAML + apiVersion: viaduct.ai/v1 + kind: ksops + metadata: + name: secret-generator + annotations: + config.kubernetes.io/function: | + exec: + path: ksops + files: [] + YAML + + system bin/"ksops", testpath/"secret-generator.yaml" + end +end diff --git a/Formula/k/kstart.rb b/Formula/k/kstart.rb new file mode 100644 index 0000000000000..fa70f0081546c --- /dev/null +++ b/Formula/k/kstart.rb @@ -0,0 +1,41 @@ +class Kstart < Formula + desc "Modified version of kinit that can use keytabs to authenticate" + homepage "https://www.eyrie.org/~eagle/software/kstart/" + url "https://archives.eyrie.org/software/kerberos/kstart-4.3.tar.xz" + sha256 "7a3388ae79927c6698dc1bf20b29717e6bc34f692e00f12b3369d896f6702060" + license all_of: ["MIT", "FSFAP", "ISC"] + + livecheck do + url :homepage + regex(/href=.*?kstart[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4406b6bbb8c07dce6d556cafddb099811130501c3c377dd057f4c997ba2033c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c7ca3f10529d5a1651d1e2d0a5a2940720825e35f996cb46b52ad543f7f63328" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a9e3c45b4365b8c742dd32f9117cc04f297136162ce1a533c0d6d5c6ed96182b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "95e851996c1269e8e1bff896243972ccfb236db690f448aad6b2369b84f366de" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "dd2e41cf3cd5cf097f960909259741728d215c4d2ed563a4657a4c209d94bb11" + sha256 cellar: :any_skip_relocation, sonoma: "dfbf8bcdaf53103406b72504c67972378e7ca86cf5731e3911ade0c481ee9556" + sha256 cellar: :any_skip_relocation, ventura: "fc55d53dc7331b351749f1bfd22268e8c035b8997d3c7408d422dfb898f2265a" + sha256 cellar: :any_skip_relocation, monterey: "69dc607481b782c4e341764acacd28362ce93a64c4769ab9bbaa70f9b9e827f5" + sha256 cellar: :any_skip_relocation, big_sur: "d34ef88ac1505c9590dd1848fd62688af3fdfef8fae4975025cae75684879c99" + sha256 cellar: :any_skip_relocation, catalina: "a4fe5ae0036a4ace4191f41553d3d85ba6278e933f3792eb45ad234e10046e2c" + sha256 cellar: :any_skip_relocation, mojave: "c024af687ae576958110ee27c4f8437c6893f4c25cec966e9f5a6e13f2aea8e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4035780cf66ac0182d3ce1cfe54dff488f916cf2622b71cbd18f9b021da3a77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "167f4e4df9e62e2e2e0f251dccfc043d993ee47ed0d41c60ebc7916c00e3b2cc" + end + + uses_from_macos "krb5" + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"k5start", "-h" + end +end diff --git a/Formula/k/ksync.rb b/Formula/k/ksync.rb new file mode 100644 index 0000000000000..cfefec48c786a --- /dev/null +++ b/Formula/k/ksync.rb @@ -0,0 +1,80 @@ +class Ksync < Formula + desc "Sync files between your local system and a kubernetes cluster" + homepage "https://ksync.github.io/ksync/" + url "https://github.com/ksync/ksync.git", + tag: "0.4.7-hotfix", + revision: "14ec9e24670b90ee45d4571984e58d3bff02c50e" + license "Apache-2.0" + head "https://github.com/ksync/ksync.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1620949d8da595167314a38d77d648496ae8f643d95b41020ac84618cbc341a2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a3552681fcab8cb7f7dfe63812571245c0da18d06393a41bf561f9e812342085" + sha256 cellar: :any_skip_relocation, arm64_ventura: "270b540aa1ca3ebc1986174383b922ca0c6d8638f86b782bf7f1318d5f537574" + sha256 cellar: :any_skip_relocation, arm64_monterey: "728e06453e95f4ec8cc1e96f0f9c3f651595dd2c23e72e9ed755fef4c3d87031" + sha256 cellar: :any_skip_relocation, sonoma: "d2af057006526b92353cb99608b2cb06565b9a08d3e72783d33a948df7c031ed" + sha256 cellar: :any_skip_relocation, ventura: "d3aa2e52fe35f59dc31ce6b1db46f74d8212b2f266c0255a6c28e3752a7dc79b" + sha256 cellar: :any_skip_relocation, monterey: "45a3f6d24f45ff5b154e4729d7ebd9017c8c328c5a991c9e1c9def407c84fc53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8252f654f5d54ab8b359866a358f2e439c7dcc2f061c8330fe42917a5b00724e" + end + + # no release since 2021-03-23, https://github.com/ksync/ksync/issues/616 + deprecate! date: "2024-08-02", because: :unmaintained + + depends_on "go@1.22" => :build + + # Support go 1.17, remove after next release + # Patch is equivalent to https://github.com/ksync/ksync/pull/544, + # but does not apply cleanly + patch :DATA + + def install + project = "github.com/ksync/ksync" + ldflags = %W[ + -w + -X #{project}/pkg/ksync.GitCommit=#{Utils.git_short_head} + -X #{project}/pkg/ksync.GitTag=#{version} + -X #{project}/pkg/ksync.BuildDate=#{time.iso8601(9)} + -X #{project}/pkg/ksync.VersionString=#{tap.user} + -X #{project}/pkg/ksync.GoVersion=go#{Formula["go"].version} + ] + system "go", "build", *std_go_args(ldflags:), "#{project}/cmd/ksync" + end + + test do + # Basic build test. Potential for more sophisticated tests in the future + # Initialize the local client and see if it completes successfully + expected = "level=fatal" + assert_match expected.to_s, shell_output("#{bin}/ksync init --local --log-level debug", 1) + end +end + +__END__ +diff --git a/go.mod b/go.mod +index e2ff1b7..dd4bed9 100644 +--- a/go.mod ++++ b/go.mod +@@ -51,6 +51,7 @@ require ( + github.com/timfallmk/overseer v0.0.0-20200214205711-64f40ac3a421 + golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 + golang.org/x/net v0.0.0-20201031054903-ff519b6c9102 ++ golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c // indirect + google.golang.org/grpc v1.36.0 + gopkg.in/ini.v1 v1.52.0 // indirect + gopkg.in/resty.v1 v1.12.0 +diff --git a/go.sum b/go.sum +index babd1b5..063f1af 100644 +--- a/go.sum ++++ b/go.sum +@@ -813,8 +813,9 @@ golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7w + golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= + golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= + golang.org/x/sys v0.0.0-20201024232916-9f70ab9862d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +-golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 h1:a/mKvvZr9Jcc8oKfcmgzyp7OwF73JPWsQLvH1z2Kxck= + golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= ++golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c h1:Lyn7+CqXIiC+LOR9aHD6jDK+hPcmAuCfuXztd1v4w1Q= ++golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= + golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= + golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/Formula/k/kt-connect.rb b/Formula/k/kt-connect.rb new file mode 100644 index 0000000000000..e64976679ebf3 --- /dev/null +++ b/Formula/k/kt-connect.rb @@ -0,0 +1,40 @@ +class KtConnect < Formula + desc "Toolkit for integrating with kubernetes dev environment more efficiently" + homepage "https://alibaba.github.io/kt-connect" + url "https://github.com/alibaba/kt-connect/archive/refs/tags/v0.3.7.tar.gz" + sha256 "f32a9eebb65bd6c43caaf7219a0424dcf9e70389c9a471dad7dc6c64260f3194" + license "GPL-3.0-or-later" + head "https://github.com/alibaba/kt-connect.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dee23d253f401d36476a08a6150c453eb9ad696f2523cd71f3bc35a35159dd88" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5774ca3a0f1d79dc09389bb90a27b34f7c41521f77f834995db7b6e3ad325364" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e9512325d69b9c0894706ea7f328ab385e707357127db8d55445119ed24891e7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8a4ac7a4168713b0571a261a19c63bacf773098a4aa1740d8ba6af11ea45ac78" + sha256 cellar: :any_skip_relocation, sonoma: "4e331766638f80e9b35725fa47c6f49064800c79a1e8498e955c836f01efa5df" + sha256 cellar: :any_skip_relocation, ventura: "fe2ab936924603f41a8e57c108006002ec83bec88e2e8bdb2b26f0bf83c693b0" + sha256 cellar: :any_skip_relocation, monterey: "dffdfcff2dea1eab76dabc61a48edc7a41ba08bfcdddb53f94c1e2e750111555" + sha256 cellar: :any_skip_relocation, big_sur: "6b9f8b923ec3fef27e04e07785d0b2dfc837ff3daf944063a8f2a8990fe213b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ac819a53007214f4d5e59877c0e5caacb17bd4e777993a89cbdd6383884ed45" + end + + # upstream go1.20 support report, https://github.com/alibaba/kt-connect/issues/398 + disable! date: "2024-08-24", because: :unmaintained + + # https://github.com/alibaba/kt-connect/issues/398 + depends_on "go@1.19" => :build + + def install + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"ktctl"), "./cmd/ktctl" + + generate_completions_from_executable(bin/"ktctl", "completion", base_name: "ktctl") + end + + test do + assert_match version.to_s, shell_output("#{bin}/ktctl --version") + # Should error out as exchange require a service name + assert_match "name of service to exchange is required", shell_output("#{bin}/ktctl exchange 2>&1") + end +end diff --git a/Formula/k/ktexttemplate.rb b/Formula/k/ktexttemplate.rb new file mode 100644 index 0000000000000..c1e5c018a1f28 --- /dev/null +++ b/Formula/k/ktexttemplate.rb @@ -0,0 +1,32 @@ +class Ktexttemplate < Formula + desc "Libraries for text templating with Qt" + homepage "https://api.kde.org/frameworks/ktexttemplate/html/index.html" + url "https://download.kde.org/stable/frameworks/6.14/ktexttemplate-6.14.0.tar.xz" + sha256 "65a908aa573e40cf9884a9d42a4b8d5574baf2f402a19764cda2cccde27c897a" + license "LGPL-2.1-or-later" + head "https://invent.kde.org/frameworks/ktexttemplate.git", branch: "master" + + bottle do + sha256 arm64_sonoma: "ef59740aa92c1579775fdcc04836fe979eda07145aac1557767a18f187b0bf02" + sha256 arm64_ventura: "a77f2e54f701f0edb1f9ba10a01e496ca680605fbf34d0e279b5d944d133cea6" + sha256 sonoma: "a2e80acb4e2facfc78451ffd8aaef4439803477db57519d80986c35e03b30efb" + sha256 ventura: "0082012c54a68652ab1ed417a5853634d4b1e4170715d48743eb28b55e1eea43" + sha256 x86_64_linux: "010e0dcbd03bf87200e3a485d8ef23177dcfc017c7b4b0b0cc7e7888a1446b1a" + end + + depends_on "cmake" => [:build, :test] + depends_on "extra-cmake-modules" => :build + depends_on "qt" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples" + end + + test do + system "cmake", pkgshare/"examples/codegen", *std_cmake_args + system "cmake", "--build", "." + end +end diff --git a/Formula/k/ktfmt.rb b/Formula/k/ktfmt.rb new file mode 100644 index 0000000000000..69883cb65a9ab --- /dev/null +++ b/Formula/k/ktfmt.rb @@ -0,0 +1,42 @@ +class Ktfmt < Formula + desc "Kotlin code formatter" + homepage "https://facebook.github.io/ktfmt/" + url "https://github.com/facebook/ktfmt/archive/refs/tags/v0.54.tar.gz" + sha256 "604e7bd519856c3e2a8b44accf6ed9fd4c4b86ae7f7dd0a9b598d483dce18206" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "75c4e2473e6cf2ae1216da62f998bd965dc703b0fab27aacc51631ca9d147195" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d59ea16d67f657484e8a242e031a194331c82b7d634fc076088a91aaaa2ec105" + sha256 cellar: :any_skip_relocation, arm64_ventura: "520a806c81cf73b9114cde115eed478a12fe16408ce479025e59145ed9fb7b3e" + sha256 cellar: :any_skip_relocation, sonoma: "70c27859a5649fbdb01d3c6ba3353458a4fc2cfd586a26bd41d95d3871586650" + sha256 cellar: :any_skip_relocation, ventura: "96f291159d94270a217eafb0ae97e47c78ab52d333db38b3abdf5698b68ce92f" + sha256 cellar: :any_skip_relocation, arm64_linux: "af8fd3794aba5fceb429d7d23aefb92c594ebcec2f5529cee7ad3fc69a568b04" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24e562f6d2d1c82a7cbd980cbd70506a60f7d873b23e03e120ac861aa8fac226" + end + + depends_on "maven" => :build + depends_on "openjdk" + + def install + ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix + system "mvn", "clean", "package", "-DskipTests=true", "-Dmaven.javadoc.skip=true" + libexec.install "core/target/ktfmt-#{version}-jar-with-dependencies.jar" + bin.write_jar_script libexec/"ktfmt-#{version}-jar-with-dependencies.jar", "ktfmt" + end + + test do + test_file = testpath/"Test.kt" + test_file.write <<~EOS + fun main() { println("Hello, World!") } + EOS + + output = shell_output("#{bin}/ktfmt --google-style #{test_file} 2>&1") + assert_match "Done formatting #{test_file}", output + assert_equal <<~EOS, test_file.read + fun main() { + println("Hello, World!") + } + EOS + end +end diff --git a/Formula/k/ktlint.rb b/Formula/k/ktlint.rb new file mode 100644 index 0000000000000..26e09a3c129d8 --- /dev/null +++ b/Formula/k/ktlint.rb @@ -0,0 +1,32 @@ +class Ktlint < Formula + desc "Anti-bikeshedding Kotlin linter with built-in formatter" + homepage "https://ktlint.github.io/" + url "https://github.com/pinterest/ktlint/releases/download/1.5.0/ktlint-1.5.0.zip" + sha256 "3958a51ca45a82baf3d03aefd3ea199058d1e170df022b0c47605ef0c9a048e7" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "362b95a52606c0d580ff4937513417ca9996028ede7204b5869ab6078114786b" + end + + depends_on "openjdk" + + def install + libexec.install "bin/ktlint" + (libexec/"ktlint").chmod 0755 + (bin/"ktlint").write_env_script libexec/"ktlint", Language::Java.java_home_env + end + + test do + (testpath/"Main.kt").write <<~KOTLIN + fun main( ) + KOTLIN + + (testpath/"Out.kt").write <<~KOTLIN + fun main() + KOTLIN + + system bin/"ktlint", "-F", "Main.kt" + assert_equal shell_output("cat Main.kt"), shell_output("cat Out.kt") + end +end diff --git a/Formula/k/ktmpl.rb b/Formula/k/ktmpl.rb new file mode 100644 index 0000000000000..41707d0fdbf8d --- /dev/null +++ b/Formula/k/ktmpl.rb @@ -0,0 +1,58 @@ +class Ktmpl < Formula + desc "Parameterized templates for Kubernetes manifests" + homepage "https://github.com/jimmycuadra/ktmpl" + url "https://github.com/jimmycuadra/ktmpl/archive/refs/tags/0.9.1.tar.gz" + sha256 "3377f10477775dd40e78f9b3d65c3db29ecd0553e9ce8a5bdcb8d09414c782e9" + license "MIT" + head "https://github.com/jimmycuadra/ktmpl.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2dc088f8bdd186bd390a9f26861ce4eaad7188aa36c5d8e269d0db6e4ca8dcb8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fbc4a95ff205822979bb6e785ae794efdeca86bdede06b3bc8c805a08536ce04" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e549a6d1bf1f7d482349d5fcd6b592f7fe2281e2299ac0d8ecc1e8b45c3be605" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1714ecf6633220ed65b1c3283862d889552d8c189500614586501f72d4a6e863" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "248f481ecd9cd1354cc55fe07877c6212fe2ffc3e031ea05c67ac42b621cfe5c" + sha256 cellar: :any_skip_relocation, sonoma: "397b73eda60395e553fa2c0b251c030f51be17cd6a742356d50b0720613a148d" + sha256 cellar: :any_skip_relocation, ventura: "8191182f4620f45a4f092d7a854b3535a4f7bd9ded1103cddafd7b80662963da" + sha256 cellar: :any_skip_relocation, monterey: "058e0b3999bd65c216e64d22e57f2fd82d4a602cf4f39ef6d84c3de5d47deb78" + sha256 cellar: :any_skip_relocation, big_sur: "8339361fc53cd0ede0a635cb1dfb808068b4615b477de71a3df35607edec9149" + sha256 cellar: :any_skip_relocation, catalina: "77dbcd12d216cfa5bfc3ac870046630a86e13ce9936a92c3f7a99d1a91dd3a9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a12fdd012882fd444cee9c9d8e17f5f1d2a55542bde2a4564b3617a640ebc80" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee2d87ec29cf08bcbc3c0c32d4a818f45cda4ce17ae6006e1185b1fa3cd25db1" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.yml").write <<~YAML + --- + kind: "Template" + apiVersion: "v1" + metadata: + name: "test" + objects: + - kind: "Service" + apiVersion: "v1" + metadata: + name: "test" + spec: + ports: + - name: "test" + protocol: "TCP" + targetPort: "$((PORT))" + selector: + app: "test" + parameters: + - name: "PORT" + description: "The port the service should run on" + required: true + parameterType: "int" + YAML + system bin/"ktmpl", "test.yml", "-p", "PORT", "8080" + end +end diff --git a/Formula/k/ktoblzcheck.rb b/Formula/k/ktoblzcheck.rb new file mode 100644 index 0000000000000..8b3eb58a3e4b3 --- /dev/null +++ b/Formula/k/ktoblzcheck.rb @@ -0,0 +1,67 @@ +class Ktoblzcheck < Formula + desc "Library for German banks" + homepage "https://ktoblzcheck.sourceforge.net/" + url "https://downloads.sourceforge.net/project/ktoblzcheck/ktoblzcheck-1.57.tar.gz" + sha256 "4c3b782e5d8e31e219c3e2ece0c6e84a93929ae0b2f36080d4c183a644d05672" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/ktoblzcheck[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "5b4500f5a3ebbd8c92500f18c84d5be4e91eb7522e2c46874b7272ae7f9aa7ab" + sha256 arm64_sonoma: "bf7974d2901add8dc0aaef564956b8a493efb58a8993456b48fcb4f374dbb201" + sha256 arm64_ventura: "8abf58282c84ee2934cb1e3606814ee447dafb475e4206afdeddb05f0d410bcf" + sha256 sonoma: "dd3466c3a53c28c91005e0f610bfe634f7209577810cbc2d077ac3ba9aa39751" + sha256 ventura: "a99501a6e0001ab7e134a3687565454286231e435dc88b96eb2012e61e78debc" + sha256 arm64_linux: "e15de18b01a09811a3b5c99d095023c2a3a969365fe33ba0978dfd0ccdddb112" + sha256 x86_64_linux: "5b60fa4082c972f35e50f36319ee833f278ceb1e39b04ab008d796b2ddaee501" + end + + depends_on "cmake" => :build + depends_on "python@3.13" + depends_on "sqlite" + + uses_from_macos "curl" + + resource "et-xmlfile" do + url "https://files.pythonhosted.org/packages/3d/5d/0413a31d184a20c763ad741cc7852a659bf15094c24840c5bdd1754765cd/et_xmlfile-1.1.0.tar.gz" + sha256 "8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c" + end + + resource "openpyxl" do + url "https://files.pythonhosted.org/packages/3d/f9/88d94a75de065ea32619465d2f77b29a0469500e99012523b91cc4141cd1/openpyxl-3.1.5.tar.gz" + sha256 "cf0e3cf56142039133628b5acffe8ef0c12bc902d2aadd3e0fe5878dc08d1050" + end + + def python3 + "python3.13" + end + + def install + ENV.append_path "PYTHONPATH", buildpath/Language::Python.site_packages(python3) + resources.each do |r| + r.stage do + system python3, "-m", "pip", "install", *std_pip_args(prefix: buildpath, build_isolation: true), "." + end + end + + # Work around to help Python bindings find shared library on macOS. + # OSError: dlopen(ktoblzcheck, 0x0006): tried: 'ktoblzcheck' (no such file), ... + # OSError: dlopen(libktoblzcheck.so.1, 0x0006): tried: 'libktoblzcheck.so.1' (no such file), ... + inreplace "src/python/ktoblzcheck.py", /'libktoblzcheck\.so\.(\d+)'/, "'libktoblzcheck.\\1.dylib'" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DCMAKE_INSTALL_RPATH=#{opt_lib}" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "Ok", shell_output("#{bin}/ktoblzcheck --outformat=oneline 10000000 123456789") + assert_match "unknown", shell_output("#{bin}/ktoblzcheck --outformat=oneline 12345678 100000000", 3) + system python3, "-c", "import ktoblzcheck" + end +end diff --git a/Formula/k/ktor.rb b/Formula/k/ktor.rb new file mode 100644 index 0000000000000..93f69410179ab --- /dev/null +++ b/Formula/k/ktor.rb @@ -0,0 +1,37 @@ +class Ktor < Formula + desc "Generates Ktor projects through the command-line interface" + homepage "https://github.com/ktorio/ktor-cli" + url "https://github.com/ktorio/ktor-cli/archive/refs/tags/0.5.0.tar.gz" + sha256 "6bc452b6aa7e4a911649f10359a0c00d0017e8ab3a3c70b0e1412c026794f6a3" + license "Apache-2.0" + head "https://github.com/ktorio/ktor-cli.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ae5827c1b6127ef87c86509969b51b57e264b3a86e2ff7f89f1ae2dd2d61fe7d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "320e97018245a83890d9d43f902bc9d3c15b052ce0168b0156d1046c26df271d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "67e92b3134de86c1f73851c12756d0b60b8d395d62eb599cc0688e2539d92ce4" + sha256 cellar: :any_skip_relocation, sonoma: "b348f62c90905932ac7a0758eddb06ba18f61415034790c0d1cfb867e3512d5e" + sha256 cellar: :any_skip_relocation, ventura: "40853271a7712e7914374bbe56cbf5eba3f14586b5568991a78bff8d46283643" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e3d5add07175e7adaab1079cd90d759fedd35ab162f57268c511a23d388164c1" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/ktor" + generate_completions_from_executable(bin/"ktor", "completions") + end + + test do + assert_match "Ktor CLI version #{version}", shell_output("#{bin}/ktor --version") + assert_match "Ktor CLI version #{version}", shell_output("#{bin}/ktor version") + system bin/"ktor", "new", "project" + assert_path_exists testpath/"project/build.gradle.kts" + assert_path_exists testpath/"project/settings.gradle.kts" + assert_path_exists testpath/"project/gradle.properties" + assert_path_exists testpath/"project/src" + assert_path_exists testpath/"project/gradle" + end +end diff --git a/Formula/k/kty.rb b/Formula/k/kty.rb new file mode 100644 index 0000000000000..e46ecfddc8de3 --- /dev/null +++ b/Formula/k/kty.rb @@ -0,0 +1,37 @@ +class Kty < Formula + desc "Terminal for Kubernetes" + homepage "https://kty.dev/" + url "https://github.com/grampelberg/kty/archive/refs/tags/v0.3.1.tar.gz" + sha256 "050c8b0df88f65e1a06863bea99495b77bf2045829825e7e130756f1828c6aa6" + license "Apache-2.0" + head "https://github.com/grampelberg/kty.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bb4ba6e5d3a1002a498075b31b9ffc694425ba048333ecf2ee662db7f08d1d64" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a01a6547caa11fd487eb9470ed8552bd699731eb3011eabc38c4ce1fe9bc07d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "773957f43cf0e1a552700e177d52a0c4dc9a16738e6d33fad6fc1b3981f33e0f" + sha256 cellar: :any_skip_relocation, sonoma: "d5dbd72cf1840b254b2ac815e8dad173883c8cb83140634976e29a14fcf8b65d" + sha256 cellar: :any_skip_relocation, ventura: "844450842762cb450a2885857744a5ea3a095d781db143312f3ff4607ec7b890" + sha256 cellar: :any_skip_relocation, arm64_linux: "12eaaeecb6106661c66894aca09a5f73eb77d9be2ba51419f1d78eed9872aed0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdd2bbe08fcd0a77a2402d91f009d13d4c9ddd5b51d533d4810e26aee40fccb9" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + inreplace "Cargo.toml", "0.0.0-UNSTABLE", version.to_s + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/kty -V") + + assert_match "failed to read an incluster environment variable", + shell_output("#{bin}/kty users check brew 2>&1", 1) + end +end diff --git a/Formula/k/kube-bench.rb b/Formula/k/kube-bench.rb new file mode 100644 index 0000000000000..888ae2d9dd13f --- /dev/null +++ b/Formula/k/kube-bench.rb @@ -0,0 +1,32 @@ +class KubeBench < Formula + desc "Checks Kubernetes deployment against security best practices (CIS Benchmark)" + homepage "https://github.com/aquasecurity/kube-bench" + url "https://github.com/aquasecurity/kube-bench/archive/refs/tags/v0.10.6.tar.gz" + sha256 "0b6ba3e7cda64de606a091bbb7a24ed5e5e34c7413ef0574895812a86e868ec7" + license "Apache-2.0" + head "https://github.com/aquasecurity/kube-bench.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "99c1056199fb24036403acd6de4cc8d24f42206f1c80389e0d56397b2fc201ec" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "99c1056199fb24036403acd6de4cc8d24f42206f1c80389e0d56397b2fc201ec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "99c1056199fb24036403acd6de4cc8d24f42206f1c80389e0d56397b2fc201ec" + sha256 cellar: :any_skip_relocation, sonoma: "446492b022d51ca3c7d57ce81931475b74d57171721df9b4f9934176403ffbeb" + sha256 cellar: :any_skip_relocation, ventura: "446492b022d51ca3c7d57ce81931475b74d57171721df9b4f9934176403ffbeb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21370ca6054be4c33195271d9b52773536b75e15cca1c9ff55123b05713ba39a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/aquasecurity/kube-bench/cmd.KubeBenchVersion=#{version}") + + generate_completions_from_executable(bin/"kube-bench", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/kube-bench version") + + output = shell_output("#{bin}/kube-bench run 2>&1", 1) + assert_match "error: config file is missing 'version_mapping' section", output + end +end diff --git a/Formula/k/kube-linter.rb b/Formula/k/kube-linter.rb new file mode 100644 index 0000000000000..3279c9b8b59a1 --- /dev/null +++ b/Formula/k/kube-linter.rb @@ -0,0 +1,58 @@ +class KubeLinter < Formula + desc "Static analysis tool for Kubernetes YAML files and Helm charts" + homepage "https://github.com/stackrox/kube-linter" + url "https://github.com/stackrox/kube-linter/archive/refs/tags/v0.7.2.tar.gz" + sha256 "e6718eef1f964cd9ef82144deb79db4c4bf0907115613f77091951cbabd4e8bb" + license "Apache-2.0" + head "https://github.com/stackrox/kube-linter.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "87b59ecf25a7798396243cea61f112484c033d51b3a0f6f114504caa0de38f8b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "87b59ecf25a7798396243cea61f112484c033d51b3a0f6f114504caa0de38f8b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "87b59ecf25a7798396243cea61f112484c033d51b3a0f6f114504caa0de38f8b" + sha256 cellar: :any_skip_relocation, sonoma: "4188d431207630a63971c36d03d615f5e223bf22278aaa607c8b706c4454c818" + sha256 cellar: :any_skip_relocation, ventura: "4188d431207630a63971c36d03d615f5e223bf22278aaa607c8b706c4454c818" + sha256 cellar: :any_skip_relocation, arm64_linux: "9af5b3f787bfc216c4a89f846d4c3cea9dba854e1032895e090113d7a1f9c7ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9664b67c1bbdf51da6e5fc9c5d3350211f3893a86586e8cfee6a5260933e6565" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + ldflags = "-s -w -X golang.stackrox.io/kube-linter/internal/version.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/kube-linter" + + generate_completions_from_executable(bin/"kube-linter", "completion") + end + + test do + (testpath/"pod.yaml").write <<~YAML + apiVersion: v1 + kind: Pod + metadata: + name: homebrew-demo + spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + containers: + - name: homebrew-test + image: busybox:stable + resources: + limits: + memory: "128Mi" + cpu: "500m" + requests: + memory: "64Mi" + cpu: "250m" + securityContext: + readOnlyRootFilesystem: true + YAML + + # Lint pod.yaml for default errors + assert_match "No lint errors found!", shell_output("#{bin}/kube-linter lint pod.yaml 2>&1").chomp + assert_equal version.to_s, shell_output("#{bin}/kube-linter version").chomp + end +end diff --git a/Formula/k/kube-ps1.rb b/Formula/k/kube-ps1.rb new file mode 100644 index 0000000000000..99131c8e0cada --- /dev/null +++ b/Formula/k/kube-ps1.rb @@ -0,0 +1,34 @@ +class KubePs1 < Formula + desc "Kubernetes prompt info for bash and zsh" + homepage "https://github.com/jonmosco/kube-ps1" + url "https://github.com/jonmosco/kube-ps1/archive/refs/tags/v0.9.0.tar.gz" + sha256 "f922c24eb4a6b41d1cd7839ac419a704694686c21472d9687da1592951d32681" + license "Apache-2.0" + head "https://github.com/jonmosco/kube-ps1.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8b7dbe43c977fc6410a1c076cdd9d488a42201b62be6389e0f09b63030bf5e1b" + end + + depends_on "kubernetes-cli" + + uses_from_macos "zsh" => :test + + def install + share.install "kube-ps1.sh" + end + + def caveats + <<~EOS + Make sure kube-ps1 is loaded from your ~/.zshrc and/or ~/.bashrc: + source "#{opt_share}/kube-ps1.sh" + PS1='$(kube_ps1)'$PS1 + EOS + end + + test do + ENV["LC_CTYPE"] = "en_CA.UTF-8" + assert_equal "bash", shell_output("bash -c '. #{opt_share}/kube-ps1.sh && echo $(_kube_ps1_shell_type)'").chomp + assert_match "zsh", shell_output("zsh -c '. #{opt_share}/kube-ps1.sh && echo $(_kube_ps1_shell_type)'").chomp + end +end diff --git a/Formula/k/kube-score.rb b/Formula/k/kube-score.rb new file mode 100644 index 0000000000000..48efb30bc4523 --- /dev/null +++ b/Formula/k/kube-score.rb @@ -0,0 +1,53 @@ +class KubeScore < Formula + desc "Kubernetes object analysis recommendations for improved reliability and security" + homepage "https://kube-score.com/" + url "https://github.com/zegl/kube-score.git", + tag: "v1.20.0", + revision: "81371e9f53b633bec69423fc298295bd71bd869a" + license "MIT" + head "https://github.com/zegl/kube-score.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8c59a7d469dad58f1fa600c7e28fd9355ea66991c5c96921c72408eb631c8823" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8c59a7d469dad58f1fa600c7e28fd9355ea66991c5c96921c72408eb631c8823" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8c59a7d469dad58f1fa600c7e28fd9355ea66991c5c96921c72408eb631c8823" + sha256 cellar: :any_skip_relocation, sonoma: "5c6eef05adc999c965abb8fbfe2e87845b4ae9dcd48109648350823fb755c861" + sha256 cellar: :any_skip_relocation, ventura: "5c6eef05adc999c965abb8fbfe2e87845b4ae9dcd48109648350823fb755c861" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69f6522e699234368ab760c7c0f55b66cb5fa9c020c923d9656248c56de0e169" + 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} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/kube-score" + end + + test do + assert_match version.to_s, shell_output("#{bin}/kube-score version") + + (testpath/"test.yaml").write <<~YAML + apiVersion: v1 + kind: Service + metadata: + name: node-port-service-with-ignore + namespace: foospace + annotations: + kube-score/ignore: service-type + spec: + selector: + app: my-app + ports: + - protocol: TCP + port: 80 + targetPort: 8080 + type: NodePort + YAML + assert_match "The services selector does not match any pods", shell_output("#{bin}/kube-score score test.yaml", 1) + end +end diff --git a/Formula/k/kubeaudit.rb b/Formula/k/kubeaudit.rb new file mode 100644 index 0000000000000..453c594672f46 --- /dev/null +++ b/Formula/k/kubeaudit.rb @@ -0,0 +1,41 @@ +class Kubeaudit < Formula + desc "Helps audit your Kubernetes clusters against common security controls" + homepage "https://github.com/Shopify/kubeaudit" + url "https://github.com/Shopify/kubeaudit/archive/refs/tags/v0.22.2.tar.gz" + sha256 "90752d42c4d502ab6776af3358ae87a02d2893fc2bb7a0364d6c1fdcd8ff0570" + license "MIT" + head "https://github.com/Shopify/kubeaudit.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0e3522037f91f1ec9aaff02d095c6c9da7cd4b1b13fa88f7531d7be68f880432" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "009138418c76bbb04d6a36a782c0c5723716f96490d97d97787de7d86862a4a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "009138418c76bbb04d6a36a782c0c5723716f96490d97d97787de7d86862a4a5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "009138418c76bbb04d6a36a782c0c5723716f96490d97d97787de7d86862a4a5" + sha256 cellar: :any_skip_relocation, sonoma: "c1bf1c8cf11944344d9002d983def83ba27189cc5f29f248afcbabb1c2db6750" + sha256 cellar: :any_skip_relocation, ventura: "c1bf1c8cf11944344d9002d983def83ba27189cc5f29f248afcbabb1c2db6750" + sha256 cellar: :any_skip_relocation, monterey: "c1bf1c8cf11944344d9002d983def83ba27189cc5f29f248afcbabb1c2db6750" + sha256 cellar: :any_skip_relocation, x86_64_linux: "36c94b606075a297fd812aa94fa7c8c95f5cac0dcec866d0f3d6d7c6ec6e8a74" + end + + # https://github.com/Shopify/kubeaudit/pull/594 + deprecate! date: "2025-01-10", because: :repo_archived, replacement_formula: "kube-bench" + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/Shopify/kubeaudit/cmd.Version=#{version} + -X github.com/Shopify/kubeaudit/cmd.BuildDate=#{time.strftime("%F")} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd" + + generate_completions_from_executable(bin/"kubeaudit", "completion") + end + + test do + output = shell_output(bin/"kubeaudit --kubeconfig /some-file-that-does-not-exist all 2>&1", 1).chomp + assert_match "failed to open kubeconfig file /some-file-that-does-not-exist", output + end +end diff --git a/Formula/k/kubebuilder.rb b/Formula/k/kubebuilder.rb new file mode 100644 index 0000000000000..85cf8fcaec6cf --- /dev/null +++ b/Formula/k/kubebuilder.rb @@ -0,0 +1,58 @@ +class Kubebuilder < Formula + desc "SDK for building Kubernetes APIs using CRDs" + homepage "https://github.com/kubernetes-sigs/kubebuilder" + url "https://github.com/kubernetes-sigs/kubebuilder.git", + tag: "v4.5.2", + revision: "7c707052daa2e8bd51f47548c02710b1f1f7a77e" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/kubebuilder.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4eb39ab13ebaeb91d38858d972533967057123f05b11ac9c1471777d94039a97" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4eb39ab13ebaeb91d38858d972533967057123f05b11ac9c1471777d94039a97" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4eb39ab13ebaeb91d38858d972533967057123f05b11ac9c1471777d94039a97" + sha256 cellar: :any_skip_relocation, sonoma: "12b4ea064e71982f7830f3cd1cf73c7281a52b060abe2d383520d9a6953edd8f" + sha256 cellar: :any_skip_relocation, ventura: "12b4ea064e71982f7830f3cd1cf73c7281a52b060abe2d383520d9a6953edd8f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18f0e43e72941720bf85430c3e8781a908dbb898d4dd937ee95d270896000cb5" + end + + depends_on "go" + + def install + goos = Utils.safe_popen_read("#{Formula["go"].bin}/go", "env", "GOOS").chomp + goarch = Utils.safe_popen_read("#{Formula["go"].bin}/go", "env", "GOARCH").chomp + + ldflags = %W[ + -s -w + -X sigs.k8s.io/kubebuilder/v4/cmd.kubeBuilderVersion=#{version} + -X sigs.k8s.io/kubebuilder/v4/cmd.goos=#{goos} + -X sigs.k8s.io/kubebuilder/v4/cmd.goarch=#{goarch} + -X sigs.k8s.io/kubebuilder/v4/cmd.gitCommit=#{Utils.git_head} + -X sigs.k8s.io/kubebuilder/v4/cmd.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"kubebuilder", "completion") + end + + test do + mkdir "test" do + system "go", "mod", "init", "example.com" + system bin/"kubebuilder", "init", + "--plugins", "go.kubebuilder.io/v4", + "--project-version", "3", + "--skip-go-version-check" + end + + assert_match <<~YAML, (testpath/"test/PROJECT").read + domain: my.domain + layout: + - go.kubebuilder.io/v4 + projectName: test + repo: example.com + version: "3" + YAML + + assert_match version.to_s, shell_output("#{bin}/kubebuilder version") + end +end diff --git a/Formula/k/kubecfg.rb b/Formula/k/kubecfg.rb new file mode 100644 index 0000000000000..8a3b7e5ce80ef --- /dev/null +++ b/Formula/k/kubecfg.rb @@ -0,0 +1,33 @@ +class Kubecfg < Formula + desc "Manage complex enterprise Kubernetes environments as code" + homepage "https://github.com/kubecfg/kubecfg" + url "https://github.com/kubecfg/kubecfg/archive/refs/tags/v0.36.0.tar.gz" + sha256 "0f135465c512f8d5017f30f595669bed6a1c65b39b10178ede6989e15cbc84a9" + license "Apache-2.0" + head "https://github.com/kubecfg/kubecfg.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5d7373d5b92e6d7fa40d26f346278f9946d7ddf773c8312ca49b1e13d06a85df" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "895b4c9f01632ae07409dee040f42fb73ee784a6726cdfbcf22bced5beeb3718" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0910ce4d7d1fe0cedfa2c3947b21e1b53a88a863ccbb97e42dafb05abccc12f2" + sha256 cellar: :any_skip_relocation, sonoma: "afcc53d1d2bdae49341594f9eaf3741194d1ba7b918a4a65aa21ef4ba39e5110" + sha256 cellar: :any_skip_relocation, ventura: "f693e55e6ca8a34c770b67807e92969817a2a4ee015c84d07057285779d57249" + sha256 cellar: :any_skip_relocation, arm64_linux: "03813301e8958ac9dfb657e548d38d919609aef21593df3bcc9917adccfa27bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b82e88d3134489324a448c33bed9315a57878b9aab5b2508ce678a6e2be31a5a" + end + + depends_on "go" => :build + + def install + system "make", "VERSION=v#{version}" + bin.install "kubecfg" + pkgshare.install Pathname("examples").children + pkgshare.install Pathname("testdata").children + + generate_completions_from_executable(bin/"kubecfg", "completion", "--shell") + end + + test do + system bin/"kubecfg", "show", "--alpha", pkgshare/"kubecfg_test.jsonnet" + end +end diff --git a/Formula/k/kubecm.rb b/Formula/k/kubecm.rb new file mode 100644 index 0000000000000..132360ff987b1 --- /dev/null +++ b/Formula/k/kubecm.rb @@ -0,0 +1,32 @@ +class Kubecm < Formula + desc "KubeConfig Manager" + homepage "https://kubecm.cloud/" + url "https://github.com/sunny0826/kubecm/archive/refs/tags/v0.33.0.tar.gz" + sha256 "23d347a00285f3a59a3866d02507fe0945c1a46cbef059be249fa436e6cde2c2" + license "Apache-2.0" + head "https://github.com/sunny0826/kubecm.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "13643edd76ccfd2122c2c60fb9fc4aee73a45f7cedfd3ee0b95d4108c3edb848" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "13643edd76ccfd2122c2c60fb9fc4aee73a45f7cedfd3ee0b95d4108c3edb848" + sha256 cellar: :any_skip_relocation, arm64_ventura: "13643edd76ccfd2122c2c60fb9fc4aee73a45f7cedfd3ee0b95d4108c3edb848" + sha256 cellar: :any_skip_relocation, sonoma: "8f453c725f95b8516df976d255b4b7ca052904b53771dae175162c8c84a5bfc6" + sha256 cellar: :any_skip_relocation, ventura: "8f453c725f95b8516df976d255b4b7ca052904b53771dae175162c8c84a5bfc6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e645b9de456ad66f084ac983eb98fcb2eed017ca6dd20967af5f44b41e112e7" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/sunny0826/kubecm/version.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"kubecm", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/kubecm version") + # Should error out as switch context need kubeconfig + assert_match "Error: open", shell_output("#{bin}/kubecm switch 2>&1", 1) + end +end diff --git a/Formula/k/kubecolor.rb b/Formula/k/kubecolor.rb new file mode 100644 index 0000000000000..af0da43d83281 --- /dev/null +++ b/Formula/k/kubecolor.rb @@ -0,0 +1,32 @@ +class Kubecolor < Formula + desc "Colorize your kubectl output" + homepage "https://kubecolor.github.io/" + url "https://github.com/kubecolor/kubecolor/archive/refs/tags/v0.5.1.tar.gz" + sha256 "cd68aad8c1f62f05bce06416e928c2922b76b608bd8af8311f518e2941acfd76" + license "MIT" + head "https://github.com/kubecolor/kubecolor.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "795369e861c4fd5cad6c14bcb2aefff51654cce635abf17daf52cbc60c0c7110" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "795369e861c4fd5cad6c14bcb2aefff51654cce635abf17daf52cbc60c0c7110" + sha256 cellar: :any_skip_relocation, arm64_ventura: "795369e861c4fd5cad6c14bcb2aefff51654cce635abf17daf52cbc60c0c7110" + sha256 cellar: :any_skip_relocation, sonoma: "ce7ebb36f732a599e5fa3f41e6dcb2d3ba0d35b654524f54276bd2ef885d6739" + sha256 cellar: :any_skip_relocation, ventura: "ce7ebb36f732a599e5fa3f41e6dcb2d3ba0d35b654524f54276bd2ef885d6739" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a29ee32f9a398c5bfcb5aa8b38d24caae5015ff722fdfa712b6bbaefc21bfbc" + end + + depends_on "go" => :build + depends_on "kubernetes-cli" => :test + + def install + ldflags = "-s -w -X main.Version=v#{version}" + + system "go", "build", *std_go_args(output: bin/"kubecolor", ldflags:) + end + + test do + assert_match "v#{version}", shell_output("#{bin}/kubecolor --kubecolor-version 2>&1") + # kubecolor should consume the '--plain' flag + assert_match "get pods -o yaml", shell_output("KUBECTL_COMMAND=echo #{bin}/kubecolor get pods --plain -o yaml") + end +end diff --git a/Formula/k/kubeconform.rb b/Formula/k/kubeconform.rb new file mode 100644 index 0000000000000..6a5e503121d18 --- /dev/null +++ b/Formula/k/kubeconform.rb @@ -0,0 +1,37 @@ +class Kubeconform < Formula + desc "FAST Kubernetes manifests validator, with support for Custom Resources!" + homepage "https://github.com/yannh/kubeconform" + url "https://github.com/yannh/kubeconform/archive/refs/tags/v0.7.0.tar.gz" + sha256 "9cb00e6385346c9de21e8fe318a4ec9854a8c7165d08b10b20ed32e28faef9a8" + license "Apache-2.0" + head "https://github.com/yannh/kubeconform.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "daf8891c42d9a174f5b407e5a54ad7a18ec39e1413386738ad44a7f4a0e66257" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "daf8891c42d9a174f5b407e5a54ad7a18ec39e1413386738ad44a7f4a0e66257" + sha256 cellar: :any_skip_relocation, arm64_ventura: "daf8891c42d9a174f5b407e5a54ad7a18ec39e1413386738ad44a7f4a0e66257" + sha256 cellar: :any_skip_relocation, sonoma: "c4a2a5d5b68ca69d05ce2ead6c5e67e282c4a25bd31bee697ff0d8356ad38324" + sha256 cellar: :any_skip_relocation, ventura: "c4a2a5d5b68ca69d05ce2ead6c5e67e282c4a25bd31bee697ff0d8356ad38324" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b430e93e88f9c3182f8e7a7c511c220e3e469564b4413d600815fc72d336bdb" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=v#{version}"), "./cmd/kubeconform" + + (pkgshare/"examples").install Dir["fixtures/*"] + end + + test do + cp_r pkgshare/"examples/.", testpath + + system bin/"kubeconform", testpath/"valid.yaml" + assert_equal 0, $CHILD_STATUS.exitstatus + + assert_match "ReplicationController bob is invalid", + shell_output("#{bin}/kubeconform #{testpath}/invalid.yaml", 1) + + assert_match version.to_s, shell_output("#{bin}/kubeconform -v") + end +end diff --git a/Formula/k/kubectl-ai.rb b/Formula/k/kubectl-ai.rb new file mode 100644 index 0000000000000..3aa6e9c9d9cdf --- /dev/null +++ b/Formula/k/kubectl-ai.rb @@ -0,0 +1,40 @@ +class KubectlAi < Formula + desc "AI powered Kubernetes Assistant" + homepage "https://github.com/GoogleCloudPlatform/kubectl-ai" + url "https://github.com/GoogleCloudPlatform/kubectl-ai/archive/refs/tags/v0.0.8.tar.gz" + sha256 "d4547d69a2b1014ed23989349eb210829373d43b94514896d2d4fecb6bb3488a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ecddd7b1d507131d8eee3d2d0d96a752328c8e8b36eca148d3e9358a97f1699c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ecddd7b1d507131d8eee3d2d0d96a752328c8e8b36eca148d3e9358a97f1699c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ecddd7b1d507131d8eee3d2d0d96a752328c8e8b36eca148d3e9358a97f1699c" + sha256 cellar: :any_skip_relocation, sonoma: "22491d946f000e2cc97310fba5748fcdb955f49635ba4556b7927dad682fd69d" + sha256 cellar: :any_skip_relocation, ventura: "22491d946f000e2cc97310fba5748fcdb955f49635ba4556b7927dad682fd69d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e894616c1423a4a1a75ddcee5782445bf4d6ddfd5e93b7efa1239baf9ee4b7c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + assert_match "kubectl-ai [flags]", shell_output("#{bin}/kubectl-ai --help") + + ENV["GEMINI_API_KEY"] = "test" + + PTY.spawn(bin/"kubectl-ai") do |r, w, pid| + sleep 1 + w.puts "test" + sleep 1 + output = r.read_nonblock(1024) + assert_match "Error 400, Message: API key not valid", output + rescue Errno::EIO + # End of input, ignore + ensure + Process.kill("TERM", pid) + end + end +end diff --git a/Formula/k/kubectl-cnpg.rb b/Formula/k/kubectl-cnpg.rb new file mode 100644 index 0000000000000..be07772800ac5 --- /dev/null +++ b/Formula/k/kubectl-cnpg.rb @@ -0,0 +1,46 @@ +class KubectlCnpg < Formula + desc "CloudNativePG plugin for kubectl" + homepage "https://cloudnative-pg.io/" + url "https://github.com/cloudnative-pg/cloudnative-pg.git", + tag: "v1.25.1", + revision: "c56e00d462c3899ab305540953ec541dfe0f762a" + license "Apache-2.0" + head "https://github.com/cloudnative-pg/cloudnative-pg.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eef1ff7ca53af3891f898f520735df2e69fe4fcb24841d3a447f99d0f5a2061b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4226559582506b3252d8d45e811c29435227c1b5cf78a6d163d2d65bb32d7729" + sha256 cellar: :any_skip_relocation, arm64_ventura: "655ed874d5339f320386c7f72f4fa695c73a999384ed26972edeb2dba05b8f0d" + sha256 cellar: :any_skip_relocation, sonoma: "366ab715e16ca498fdf42c74dff96d6b27866c58e4382e3d8fcf6c7d1bf5ac92" + sha256 cellar: :any_skip_relocation, ventura: "39ede94e7eb67365e4405dc6e02f937c955b21615e010316dee16b67141b3357" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad28fc9e4d7c06afae38b2ce371c56d41516456abb2931f1509dc75608c804ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "844c03ae717e2cdbfc127e39e8d97d8560dedc708f8ba8af8471262a950152cb" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildVersion=#{version} + -X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildCommit=#{Utils.git_head} + -X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/kubectl-cnpg" + generate_completions_from_executable(bin/"kubectl-cnpg", "completion") + + kubectl_plugin_completion = <<~EOS + #!/usr/bin/env sh + # Call the __complete command passing it all arguments + kubectl cnpg __complete "$@" + EOS + + (bin/"kubectl_complete-cnpg").write(kubectl_plugin_completion) + chmod 0755, bin/"kubectl_complete-cnpg" + end + + test do + assert_match version.to_s, shell_output("#{bin}/kubectl-cnpg version") + assert_match "connect: connection refused", shell_output("#{bin}/kubectl-cnpg status dummy-cluster 2>&1", 1) + end +end diff --git a/Formula/k/kubectl-rook-ceph.rb b/Formula/k/kubectl-rook-ceph.rb new file mode 100644 index 0000000000000..373879464ca58 --- /dev/null +++ b/Formula/k/kubectl-rook-ceph.rb @@ -0,0 +1,34 @@ +class KubectlRookCeph < Formula + desc "Rook plugin for Ceph management" + homepage "https://rook.io/" + url "https://github.com/rook/kubectl-rook-ceph/archive/refs/tags/v0.9.4.tar.gz" + sha256 "178b12b7beb225243cdedc7bb43b7ae7b475c9ab365b23f4a785d5a4ff75042f" + license "Apache-2.0" + head "https://github.com/rook/kubectl-rook-ceph.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "66846017ec19f2ad1b58b8124eb7a9ebe8a4974ae2e56258b28ab46d159630e7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "66846017ec19f2ad1b58b8124eb7a9ebe8a4974ae2e56258b28ab46d159630e7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "66846017ec19f2ad1b58b8124eb7a9ebe8a4974ae2e56258b28ab46d159630e7" + sha256 cellar: :any_skip_relocation, sonoma: "de8ab2a58f43a6ef500d7e1606c56c5a01f946661195e8d739676f50cceb9fc9" + sha256 cellar: :any_skip_relocation, ventura: "de8ab2a58f43a6ef500d7e1606c56c5a01f946661195e8d739676f50cceb9fc9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "417f22e25f795938c98bd6ce4d979aaa043696f3305f4ff2579a9a5d8ff46e61" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w" + system "go", "build", *std_go_args(ldflags:, output: "#{bin}/kubectl-rook_ceph"), "./cmd" + end + + test do + assert_match <<~EOS, shell_output("#{bin}/kubectl-rook_ceph health 2>&1", 1) + Error: invalid configuration: no configuration has been provided, \ + try setting KUBERNETES_MASTER environment variable + EOS + + output = shell_output("#{bin}/kubectl-rook_ceph --help") + assert_match("kubectl rook-ceph provides common management and troubleshooting tools for Ceph", output) + end +end diff --git a/Formula/k/kubectx.rb b/Formula/k/kubectx.rb new file mode 100644 index 0000000000000..a10c5a4cf52fb --- /dev/null +++ b/Formula/k/kubectx.rb @@ -0,0 +1,33 @@ +class Kubectx < Formula + desc "Tool that can switch between kubectl contexts easily and create aliases" + homepage "https://github.com/ahmetb/kubectx" + url "https://github.com/ahmetb/kubectx/archive/refs/tags/v0.9.5.tar.gz" + sha256 "c94392fba8dfc5c8075161246749ef71c18f45da82759084664eb96027970004" + license "Apache-2.0" + head "https://github.com/ahmetb/kubectx.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "6552e91e68ff8abda73be837c80539b47e3aadc73e5f8bab57cbb3bf0356c682" + end + + depends_on "kubernetes-cli" + + def install + bin.install "kubectx", "kubens" + + ln_s bin/"kubectx", bin/"kubectl-ctx" + ln_s bin/"kubens", bin/"kubectl-ns" + + %w[kubectx kubens].each do |cmd| + bash_completion.install "completion/#{cmd}.bash" => cmd.to_s + zsh_completion.install "completion/_#{cmd}.zsh" => "_#{cmd}" + fish_completion.install "completion/#{cmd}.fish" + end + end + + test do + assert_match "USAGE:", shell_output("#{bin}/kubectx -h 2>&1") + assert_match "USAGE:", shell_output("#{bin}/kubens -h 2>&1") + end +end diff --git a/Formula/k/kubefirst.rb b/Formula/k/kubefirst.rb new file mode 100644 index 0000000000000..5dbdbb92edbca --- /dev/null +++ b/Formula/k/kubefirst.rb @@ -0,0 +1,48 @@ +class Kubefirst < Formula + desc "GitOps Infrastructure & Application Delivery Platform for kubernetes" + homepage "https://kubefirst.konstruct.io/docs/" + url "https://github.com/konstructio/kubefirst/archive/refs/tags/v2.8.4.tar.gz" + sha256 "020a245191e8e247a417e623bd467e98644fe4456c0a2ca3cefa7ba0cda81c45" + license "MIT" + head "https://github.com/konstructio/kubefirst.git", branch: "main" + + # Upstream appears to use GitHub releases to indicate that a version is + # released, 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_sequoia: "802f8bcd8cef477f962c58d2640fa06bbe993bf5c4499f0bd4b32f30e5b73895" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6193337592081faa0bd3c7aa1f0881e4a1a09ff0ba7eec7e76ba49c20a4f1a62" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f824f371e912db8d34c3cb87b03fa27dd41bff1d590deaef592ee4a75c49b39" + sha256 cellar: :any_skip_relocation, sonoma: "5cd14a498f4fde2cca1f8b90bbe81eb05efe280dd75e408db4299b2cacfa650c" + sha256 cellar: :any_skip_relocation, ventura: "940edbf4ddbe5edeca5ca6118bba9e2cdd463354af9f2770990346252674cdf6" + sha256 cellar: :any_skip_relocation, arm64_linux: "bce88d2189bc3e4c77516411f23e792ccdb25ac24ef7a27823b5f713a006a3ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d6cfe745f9bd922a71b445721c8acb18afe7cf538188dcd41c4f6a14c91bdf2" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/konstructio/kubefirst-api/configs.K1Version=v#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"kubefirst", "completion") + end + + test do + system bin/"kubefirst", "info" + assert_match "k1-paths:", (testpath/".kubefirst").read + assert_path_exists testpath/".k1/logs" + + output = shell_output("#{bin}/kubefirst version 2>&1") + expected = if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + "" + else + version.to_s + end + assert_match expected, output + end +end diff --git a/Formula/k/kubehound.rb b/Formula/k/kubehound.rb new file mode 100644 index 0000000000000..5aa79bde89a08 --- /dev/null +++ b/Formula/k/kubehound.rb @@ -0,0 +1,48 @@ +class Kubehound < Formula + desc "Tool for building Kubernetes attack paths" + homepage "https://kubehound.io/" + url "https://github.com/DataDog/KubeHound/archive/refs/tags/v1.6.4.tar.gz" + sha256 "63cb38cc12f33842a255852a45d2c795f8b20cd7de546154af1dc6a7c9fa0441" + license "Apache-2.0" + head "https://github.com/DataDog/KubeHound.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46205128162d5b6426da41d995af1a4b7ffc80922bf7be21d88b53b051b0bfde" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4efa0e3d2f31f208b9f6362e9d5a9a45dec95f63c1cffcc627e847aad8fc428b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "83b3bc446f6498809bb4aec69bd21599647b687bfe0070531d5242da25213adc" + sha256 cellar: :any_skip_relocation, sonoma: "2030af4d1926d7e5b4030e2b2e50af328ebe5a9cf9f3240aeddc19122e745513" + sha256 cellar: :any_skip_relocation, ventura: "673c01749b813c570f2044863796057528a5f032780f2e29dfc5579328dd24d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ff86c1799aba7da91ebd19693f46c67286d75ec041bf6b0a650455e634ebc68" + end + + depends_on "go" => [:build, :test] + + def install + goos = Utils.safe_popen_read("#{Formula["go"].bin}/go", "env", "GOOS").chomp + goarch = Utils.safe_popen_read("#{Formula["go"].bin}/go", "env", "GOARCH").chomp + + ldflags = %W[ + -s -w + -X github.com/DataDog/KubeHound/pkg/config.BuildVersion=v#{version} + -X github.com/DataDog/KubeHound/pkg/config.BuildBranch=main + -X github.com/DataDog/KubeHound/pkg/config.BuildOs=#{goos} + -X github.com/DataDog/KubeHound/pkg/config.BuildArch=#{goarch} + ] + system "go", "build", *std_go_args(ldflags:, tags: "no_backend"), "./cmd/kubehound/" + + generate_completions_from_executable(bin/"kubehound", "completion") + end + + test do + assert_match "kubehound version: v#{version}", shell_output("#{bin}/kubehound version") + + ENV["DOCKER_HOST"] = "unix://#{testpath}/invalid.sock" + error_message = "error starting the kubehound stack" + assert_match error_message, shell_output("#{bin}/kubehound backend up 2>&1", 1) + end +end diff --git a/Formula/k/kubekey.rb b/Formula/k/kubekey.rb new file mode 100644 index 0000000000000..00a26e6d1d784 --- /dev/null +++ b/Formula/k/kubekey.rb @@ -0,0 +1,62 @@ +class Kubekey < Formula + desc "Installer for Kubernetes and / or KubeSphere, and related cloud-native add-ons" + homepage "https://kubesphere.io/" + url "https://github.com/kubesphere/kubekey.git", + tag: "v3.1.9", + revision: "f7f74890ec51db1e4c35b54af8ecc87d7f807deb" + license "Apache-2.0" + head "https://github.com/kubesphere/kubekey.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_sequoia: "34911d6cbc0a8ef3df9777103ce7ff8a54a192be3952649950df9562ac3463c5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "33571c95cfcc2aa8faae95c7b02686b500dd8b7aa424a2f60641a190e615225f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d89ea31c4a8a5ebc0c335e22a644244dfd3ba027233d092d9428dfc2d33f8175" + sha256 cellar: :any_skip_relocation, sonoma: "2606d1eeaa6809dd66d79e638a298986c2c4c7c2f914006439ecac3c9170342f" + sha256 cellar: :any_skip_relocation, ventura: "8b753f7e1ebc78e9104e3e35e96ce7aae18fa02cabe3f2d42cd85c60b7aece09" + sha256 cellar: :any_skip_relocation, arm64_linux: "411ac990cce752ae9a7e6182c8410bcea94369f756daa026907194848c07e393" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e24a6c088935ac2fcf1028ea3bdf7ee4ee2672585a1a5c1105ad67aaf2819c91" + end + + depends_on "go" => :build + depends_on "gpgme" + + on_linux do + depends_on "pkgconf" => :build + depends_on "btrfs-progs" + depends_on "device-mapper" + end + + def install + tags = "exclude_graphdriver_devicemapper exclude_graphdriver_btrfs containers_image_openpgp" + project = "github.com/kubesphere/kubekey/v3" + ldflags = %W[ + -s -w + -X #{project}/version.gitMajor=#{version.major} + -X #{project}/version.gitMinor=#{version.minor} + -X #{project}/version.gitVersion=v#{version} + -X #{project}/version.gitCommit=#{Utils.git_head} + -X #{project}/version.gitTreeState=clean + -X #{project}/version.buildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:, tags:, output: bin/"kk"), "./cmd/kk" + + generate_completions_from_executable(bin/"kk", "completion", "--type", shells: [:bash, :zsh]) + end + + test do + version_output = shell_output(bin/"kk version") + assert_match "Version:\"v#{version}\"", version_output + assert_match "GitTreeState:\"clean\"", version_output + + system bin/"kk", "create", "config", "-f", "homebrew.yaml" + assert_path_exists testpath/"homebrew.yaml" + end +end diff --git a/Formula/k/kubelogin.rb b/Formula/k/kubelogin.rb new file mode 100644 index 0000000000000..60561f7cc353c --- /dev/null +++ b/Formula/k/kubelogin.rb @@ -0,0 +1,53 @@ +class Kubelogin < Formula + desc "OpenID Connect authentication plugin for kubectl" + homepage "https://github.com/int128/kubelogin" + url "https://github.com/int128/kubelogin/archive/refs/tags/v1.32.4.tar.gz" + sha256 "3d3f7bb52eba25885a760b51ea517514e77ab0c4f6b9fa796be3b9abc1268ded" + license "Apache-2.0" + head "https://github.com/int128/kubelogin.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6745733c6cbb50b53d96798bbbd038454486557fc0db3527238ea7ea76dd1d1e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6745733c6cbb50b53d96798bbbd038454486557fc0db3527238ea7ea76dd1d1e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6745733c6cbb50b53d96798bbbd038454486557fc0db3527238ea7ea76dd1d1e" + sha256 cellar: :any_skip_relocation, sonoma: "ca38437fbdabe9f4bbb434e7b2d84ad9db3790305549d2fbc2ac9ce0c84a616f" + sha256 cellar: :any_skip_relocation, ventura: "ca38437fbdabe9f4bbb434e7b2d84ad9db3790305549d2fbc2ac9ce0c84a616f" + sha256 cellar: :any_skip_relocation, arm64_linux: "25fa0e56eb6d2b9a4c3a4794b5a1947caf5cebb348463d5ecb03393cace40bfb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc48a0537d00c6f18c8c50f335716436d536369dd203322316b4fd1d099c2382" + end + + depends_on "go" => :build + depends_on "kubernetes-cli" => :test + + def install + ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" + ldflags = "-s -w -X main.version=#{version}" + system "go", "build", *std_go_args(ldflags:, output: bin/"kubectl-oidc_login") + + generate_completions_from_executable(bin/"kubectl-oidc_login", "completion") + end + + test do + version_output = shell_output("#{bin}/kubectl-oidc_login --version") + assert_match version.to_s, version_output + + assert_equal version_output, shell_output("kubectl oidc-login --version") + + # Connect to non-existant OIDC endpoint + get_token_output = shell_output("kubectl oidc-login get-token " \ + "--oidc-issuer-url=https://fake.domain.invalid/ " \ + "--oidc-client-id=test-invalid" \ + "--skip-open-browser 2>&1 || :") + assert_match "fake.domain.invalid/.well-known/openid-configuration", get_token_output + assert_match "no such host", get_token_output + + # Connect to real test OIDC endpoint, with invalid client-id + # This is a public test server: https://openidconnect.net + get_token_output = shell_output("kubectl oidc-login get-token " \ + "--oidc-issuer-url=https://samples.auth0.com/ " \ + "--oidc-client-id=test-invalid " \ + "--skip-open-browser --authentication-timeout-sec 1 2>&1 || :") + assert_match "Please visit the following URL in your browser: http://localhost", get_token_output + assert_match "authorization error: context deadline exceeded", get_token_output + end +end diff --git a/Formula/k/kubent.rb b/Formula/k/kubent.rb new file mode 100644 index 0000000000000..e955b2365c4f8 --- /dev/null +++ b/Formula/k/kubent.rb @@ -0,0 +1,41 @@ +class Kubent < Formula + desc "Easily check your clusters for use of deprecated APIs" + homepage "https://github.com/doitintl/kube-no-trouble" + url "https://github.com/doitintl/kube-no-trouble.git", + tag: "0.7.3", + revision: "57480c07b3f91238f12a35d0ec88d9368aae99aa" + license "MIT" + head "https://github.com/doitintl/kube-no-trouble.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "68db3486daaf6ba9c4a84482b1592bff93a67767d0b12b2766d09619a65e1691" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "13d2768c1c54c75eb61b9509441b74a2046fb0e296f7e4186a5123250a74d61c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "13d2768c1c54c75eb61b9509441b74a2046fb0e296f7e4186a5123250a74d61c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "13d2768c1c54c75eb61b9509441b74a2046fb0e296f7e4186a5123250a74d61c" + sha256 cellar: :any_skip_relocation, sonoma: "b9f9a862ec8458c562ec9643e4c6876475d1e77071730f2c6876b29403d641f1" + sha256 cellar: :any_skip_relocation, ventura: "b9f9a862ec8458c562ec9643e4c6876475d1e77071730f2c6876b29403d641f1" + sha256 cellar: :any_skip_relocation, monterey: "b9f9a862ec8458c562ec9643e4c6876475d1e77071730f2c6876b29403d641f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a54e603d5dca3dd7c708ce765318b460eef6b5ca4407a28356edc0c16ae2bbe" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.gitSha=#{Utils.git_head} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/kubent" + end + + test do + assert_match "no configuration has been provided", shell_output("#{bin}/kubent 2>&1") + assert_match version.to_s, shell_output("#{bin}/kubent --version 2>&1") + end +end diff --git a/Formula/k/kubeone.rb b/Formula/k/kubeone.rb new file mode 100644 index 0000000000000..a1fd66fd1b37a --- /dev/null +++ b/Formula/k/kubeone.rb @@ -0,0 +1,48 @@ +class Kubeone < Formula + desc "Automate cluster operations on all your environments" + homepage "https://kubeone.io/" + url "https://github.com/kubermatic/kubeone/archive/refs/tags/v1.10.0.tar.gz" + sha256 "19285f09a1376a5aed273eb194c09183e54a189bbd5cb508037c795d7de0802b" + license "Apache-2.0" + head "https://github.com/kubermatic/kubeone.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "36f5d2aad6e3b0c41ecf17d806add66c5ab018f73537263671bf93ed78ccb386" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2ae5ecb59f8747d30d9567a4675e8c4a35c0ac9cf44bb33d4e4e6a0738327943" + sha256 cellar: :any_skip_relocation, arm64_ventura: "385191f7d3f8776ff6d5c864c438581ffd954b4a07f6eba06021bbf681d81c9f" + sha256 cellar: :any_skip_relocation, sonoma: "d6033965e81705d23de2b464206a48845fcdc1e07a66ffe06f9a0a971510dabe" + sha256 cellar: :any_skip_relocation, ventura: "aa43641df3b8e5bbb025ee6cff6a45d70ce5b994aa4e8a0a69d4e13d5a318df7" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa2f8360539d850334fd9b14fe28a29aad16704da5a41c6c8b3ea245ee536682" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e20f15b4ea34552ce781b8dc04c8139c46de03e9a2cf79c0859f2bbc4a025c6" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X k8c.io/kubeone/pkg/cmd.version=#{version} + -X k8c.io/kubeone/pkg/cmd.date=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"kubeone", "completion") + end + + test do + test_config = testpath/"kubeone.yaml" + + test_config.write <<~YAML + apiVersion: kubeone.k8c.io/v1beta2 + kind: KubeOneCluster + + versions: + kubernetes: 1.30.1 + YAML + + assert_match "apiEndpoint.port must be greater than 0", shell_output("#{bin}/kubeone status 2>&1", 15) + + assert_match version.to_s, shell_output("#{bin}/kubeone version") + end +end diff --git a/Formula/k/kubergrunt.rb b/Formula/k/kubergrunt.rb new file mode 100644 index 0000000000000..2c6696884511c --- /dev/null +++ b/Formula/k/kubergrunt.rb @@ -0,0 +1,41 @@ +class Kubergrunt < Formula + desc "Collection of commands to fill in the gaps between Terraform, Helm, and Kubectl" + homepage "https://github.com/gruntwork-io/kubergrunt" + url "https://github.com/gruntwork-io/kubergrunt/archive/refs/tags/v0.17.3.tar.gz" + sha256 "5945d96546464061503cfe4033f12b23140c50fa01f696fdfb2e26c634dbdb37" + license "Apache-2.0" + head "https://github.com/gruntwork-io/kubergrunt.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_sequoia: "81891380ce3a7234b8de9560a87351bd83944484669c95eec8216d038a0f6210" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "81891380ce3a7234b8de9560a87351bd83944484669c95eec8216d038a0f6210" + sha256 cellar: :any_skip_relocation, arm64_ventura: "81891380ce3a7234b8de9560a87351bd83944484669c95eec8216d038a0f6210" + sha256 cellar: :any_skip_relocation, sonoma: "d1142ebf81f673bc9e0c55cfa8c86c4b4a9232ff0a7e12b1b02ec097fcf75940" + sha256 cellar: :any_skip_relocation, ventura: "d1142ebf81f673bc9e0c55cfa8c86c4b4a9232ff0a7e12b1b02ec097fcf75940" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87686a336af3a417ff05ed4c12cfd1ffac42e3e657750897d29e05f7ea785e3e" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.VERSION=v#{version}"), "./cmd" + end + + test do + output = shell_output("#{bin}/kubergrunt eks verify --eks-cluster-arn " \ + "arn:aws:eks:us-east-1:123:cluster/brew-test 2>&1", 1) + assert_match "ERROR: Error finding AWS credentials", output + + output = shell_output("#{bin}/kubergrunt tls gen --namespace test " \ + "--secret-name test --ca-secret-name test 2>&1", 1) + assert_match "ERROR: --tls-common-name is required", output + end +end diff --git a/Formula/k/kubernetes-cli.rb b/Formula/k/kubernetes-cli.rb new file mode 100644 index 0000000000000..837bd5c447f89 --- /dev/null +++ b/Formula/k/kubernetes-cli.rb @@ -0,0 +1,56 @@ +class KubernetesCli < Formula + desc "Kubernetes command-line interface" + homepage "https://kubernetes.io/docs/reference/kubectl/" + url "https://github.com/kubernetes/kubernetes.git", + tag: "v1.33.1", + revision: "8adc0f041b8e7ad1d30e29cc59c6ae7a15e19828" + license "Apache-2.0" + head "https://github.com/kubernetes/kubernetes.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dfe3b28b44ac119c76b7d68396eea2dc5715208317ba8d70024a292908a66795" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ee2df9d9511bdc5b3a7e38e6427d0aab88ad999501d727032828dfbe751e0ef8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a4446ef3c48d701b20eaf392eee1a83c815f394bbee6168d8b481e0805bda603" + sha256 cellar: :any_skip_relocation, sonoma: "fee0b134359e6e6f7cab5aace688b3eed584b771ded17ee2da6ea7c8f0a44c0c" + sha256 cellar: :any_skip_relocation, ventura: "6099cff31f345023541bef208efdf936fa8888f2666ba39c3ba197dd5f75517f" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8003784d44c5a4db1360535383ee2b91f1924ec14dedf8d6ce29cd59dd0823b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f253773fdd67c1a68f07b59f0a924b5b88d3b091f22a6f9c7f377261688f3b4" + end + + depends_on "bash" => :build + depends_on "go" => :build + + uses_from_macos "rsync" => :build + + on_macos do + depends_on "coreutils" => :build + end + + def install + ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" if OS.mac? # needs GNU date + ENV["FORCE_HOST_GO"] = "1" + system "make", "WHAT=cmd/kubectl" + bin.install "_output/bin/kubectl" + + generate_completions_from_executable(bin/"kubectl", "completion") + + # Install man pages + # Leave this step for the end as this dirties the git tree + system "hack/update-generated-docs.sh" + man1.install Dir["docs/man/man1/*.1"] + end + + test do + run_output = shell_output("#{bin}/kubectl 2>&1") + assert_match "kubectl controls the Kubernetes cluster manager.", run_output + + version_output = shell_output("#{bin}/kubectl version --client --output=yaml 2>&1") + assert_match "gitTreeState: clean", version_output + assert_match stable.specs[:revision].to_s, version_output + end +end diff --git a/Formula/k/kubernetes-cli@1.29.rb b/Formula/k/kubernetes-cli@1.29.rb new file mode 100644 index 0000000000000..f22c4375e8962 --- /dev/null +++ b/Formula/k/kubernetes-cli@1.29.rb @@ -0,0 +1,54 @@ +class KubernetesCliAT129 < Formula + desc "Kubernetes command-line interface" + homepage "https://kubernetes.io/docs/reference/kubectl/" + url "https://github.com/kubernetes/kubernetes.git", + tag: "v1.29.14", + revision: "4f359b2e16764ab5e175195ee6992dfb53b36acf" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "087825baacb21eea7f0ba0d335a06cbaa73d20bfd0009e2b3081a5accf173017" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "987a7f47b50c4f231a6de7e4065166f0798691f5f2e2181eaba0f30f73528706" + sha256 cellar: :any_skip_relocation, arm64_ventura: "012e7da38f9e4c2cce90e002c22d06efee4f6852db983a791e20560e6925d5a5" + sha256 cellar: :any_skip_relocation, sonoma: "f9606000e748fc77c6bc48e15a9adef96b758c4db52f8ee4713cdfc6767f07f7" + sha256 cellar: :any_skip_relocation, ventura: "9c5619fccd97cd9d7f94cd7b4fd2ddc76f62d14986c07b80b2a8b7dd1256b2b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac6094fad9dcfdcad7f85f0bd6cd7227fd2747616082cc4f6460ef8aaaf6264b" + end + + keg_only :versioned_formula + + # https://kubernetes.io/releases/patch-releases/#1-29 + disable! date: "2025-02-28", because: :deprecated_upstream + + depends_on "bash" => :build + depends_on "go" => :build + + uses_from_macos "rsync" => :build + + on_macos do + depends_on "coreutils" => :build + end + + def install + ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" if OS.mac? # needs GNU date + ENV["FORCE_HOST_GO"] = "1" + system "make", "WHAT=cmd/kubectl" + bin.install "_output/bin/kubectl" + + generate_completions_from_executable(bin/"kubectl", "completion") + + # Install man pages + # Leave this step for the end as this dirties the git tree + system "hack/update-generated-docs.sh" + man1.install Dir["docs/man/man1/*.1"] + end + + test do + run_output = shell_output("#{bin}/kubectl 2>&1") + assert_match "kubectl controls the Kubernetes cluster manager.", run_output + + version_output = shell_output("#{bin}/kubectl version --client --output=yaml 2>&1") + assert_match "gitTreeState: clean", version_output + assert_match stable.specs[:revision].to_s, version_output + end +end diff --git a/Formula/k/kubernetes-cli@1.30.rb b/Formula/k/kubernetes-cli@1.30.rb new file mode 100644 index 0000000000000..c92a02658bb09 --- /dev/null +++ b/Formula/k/kubernetes-cli@1.30.rb @@ -0,0 +1,60 @@ +class KubernetesCliAT130 < Formula + desc "Kubernetes command-line interface" + homepage "https://kubernetes.io/docs/reference/kubectl/" + url "https://github.com/kubernetes/kubernetes.git", + tag: "v1.30.13", + revision: "50af91c466658b6a33d123fae8a487db1630971c" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(1\.30(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "449a3876eac5b7508ae83162e78df0cc0ab7c7e849a8637beb5fa0a21b547e60" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d5b7b3e0df3acf0fb2e27f40369396f0e9b3f848dec675bfaa9af47330271992" + sha256 cellar: :any_skip_relocation, arm64_ventura: "da1188cec14b2b23fbf60944bf20b4bb6ccf286631c9b27230af67c98cd226c7" + sha256 cellar: :any_skip_relocation, sonoma: "9b221c81f9fa3df54591ab48d787b164adf37b8e19c7144045ee3b90d83bdce2" + sha256 cellar: :any_skip_relocation, ventura: "f4cae26ad2e69c8999f723671fe85feb2284a3185afdd3d688ab51182e5bdef5" + sha256 cellar: :any_skip_relocation, arm64_linux: "7355e559217d879541552e3ca34fba6ff7bcc75a64fe6284d761ba65bd80e2b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8b4d29bbb01ca18b79ef79d9210ce4677dde1675fef4a83a8a887ed68a8feac" + end + + keg_only :versioned_formula + + # https://kubernetes.io/releases/patch-releases/#1-30 + disable! date: "2025-06-28", because: :deprecated_upstream + + depends_on "bash" => :build + depends_on "go" => :build + + uses_from_macos "rsync" => :build + + on_macos do + depends_on "coreutils" => :build + end + + def install + ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" if OS.mac? # needs GNU date + ENV["FORCE_HOST_GO"] = "1" + system "make", "WHAT=cmd/kubectl" + bin.install "_output/bin/kubectl" + + generate_completions_from_executable(bin/"kubectl", "completion") + + # Install man pages + # Leave this step for the end as this dirties the git tree + system "hack/update-generated-docs.sh" + man1.install Dir["docs/man/man1/*.1"] + end + + test do + run_output = shell_output("#{bin}/kubectl 2>&1") + assert_match "kubectl controls the Kubernetes cluster manager.", run_output + + version_output = shell_output("#{bin}/kubectl version --client --output=yaml 2>&1") + assert_match "gitTreeState: clean", version_output + assert_match stable.specs[:revision].to_s, version_output + end +end diff --git a/Formula/k/kubernetes-cli@1.31.rb b/Formula/k/kubernetes-cli@1.31.rb new file mode 100644 index 0000000000000..5e23a5026d965 --- /dev/null +++ b/Formula/k/kubernetes-cli@1.31.rb @@ -0,0 +1,60 @@ +class KubernetesCliAT131 < Formula + desc "Kubernetes command-line interface" + homepage "https://kubernetes.io/docs/reference/kubectl/" + url "https://github.com/kubernetes/kubernetes.git", + tag: "v1.31.9", + revision: "8f3800390d488f54f74111f22973059e133f9cba" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(1\.31(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4b868f3355eadb2dd769a00c1fd8a97ebcf987f301762ff462480b050255e2dc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "390c9629b186a77d9f90779a7243c663f4da25b2c6ebac9e40ea6b63bffb02b2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8fe29490ff60fb7c22043b8fd6c911234449af478e484970ae39534720b1f953" + sha256 cellar: :any_skip_relocation, sonoma: "0c2e89e779fa6e217ba2130a9f17076fa84806d9de02042afa97c76a023693cf" + sha256 cellar: :any_skip_relocation, ventura: "28db6bcfd866cdc8f5eb4f02a0229e5900661351ebfb35dcdf1ba6f5ff62c952" + sha256 cellar: :any_skip_relocation, arm64_linux: "c0fb8d7bef6dfd59e89f9316935c196fbd7b79cc82d379c4b7cb45e357b6cf0e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12ffefa4495d40ae3887995b66586b4d5d40506040d48d2de31b2c14e6ad90c9" + end + + keg_only :versioned_formula + + # https://kubernetes.io/releases/patch-releases/#1-31 + disable! date: "2025-10-28", because: :deprecated_upstream + + depends_on "bash" => :build + depends_on "go" => :build + + uses_from_macos "rsync" => :build + + on_macos do + depends_on "coreutils" => :build + end + + def install + ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" if OS.mac? # needs GNU date + ENV["FORCE_HOST_GO"] = "1" + system "make", "WHAT=cmd/kubectl" + bin.install "_output/bin/kubectl" + + generate_completions_from_executable(bin/"kubectl", "completion") + + # Install man pages + # Leave this step for the end as this dirties the git tree + system "hack/update-generated-docs.sh" + man1.install Dir["docs/man/man1/*.1"] + end + + test do + run_output = shell_output("#{bin}/kubectl 2>&1") + assert_match "kubectl controls the Kubernetes cluster manager.", run_output + + version_output = shell_output("#{bin}/kubectl version --client --output=yaml 2>&1") + assert_match "gitTreeState: clean", version_output + assert_match stable.specs[:revision].to_s, version_output + end +end diff --git a/Formula/k/kubernetes-cli@1.32.rb b/Formula/k/kubernetes-cli@1.32.rb new file mode 100644 index 0000000000000..d40b78a86acd1 --- /dev/null +++ b/Formula/k/kubernetes-cli@1.32.rb @@ -0,0 +1,60 @@ +class KubernetesCliAT132 < Formula + desc "Kubernetes command-line interface" + homepage "https://kubernetes.io/docs/reference/kubectl/" + url "https://github.com/kubernetes/kubernetes.git", + tag: "v1.32.4", + revision: "59526cd4867447956156ae3a602fcbac10a2c335" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(1\.32(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b622184d551539afc287c7191f7f1e8213da397fd9724bd3d300371a30579b4f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e07c9dc801ddf59f9123bb779e6602b994f56c8856435e7e831d9b7d29300156" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3e2260b43334e1bba161f67eb37ec7913b2ef464f05fab19199b52a968f53236" + sha256 cellar: :any_skip_relocation, sonoma: "fed174d3474938938cf32ab1bb69191855dc57d549da9b90569008e4a82dbcad" + sha256 cellar: :any_skip_relocation, ventura: "c032723a41d2e7682eb7a8bc0fcf89953efc69f2dcdc8819dbd55eeebb9f6ce5" + sha256 cellar: :any_skip_relocation, arm64_linux: "56affb9b50d5a9711213eba78cfaacfa405d1268efebb30064c0c02dd7c214c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84168419122fef29efc6f801aaf6900fef6391a21fc232a3e73ce157a652b581" + end + + keg_only :versioned_formula + + # https://kubernetes.io/releases/patch-releases/#1-32 + disable! date: "2026-02-28", because: :deprecated_upstream + + depends_on "bash" => :build + depends_on "go" => :build + + uses_from_macos "rsync" => :build + + on_macos do + depends_on "coreutils" => :build + end + + def install + ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" if OS.mac? # needs GNU date + ENV["FORCE_HOST_GO"] = "1" + system "make", "WHAT=cmd/kubectl" + bin.install "_output/bin/kubectl" + + generate_completions_from_executable(bin/"kubectl", "completion") + + # Install man pages + # Leave this step for the end as this dirties the git tree + system "hack/update-generated-docs.sh" + man1.install Dir["docs/man/man1/*.1"] + end + + test do + run_output = shell_output("#{bin}/kubectl 2>&1") + assert_match "kubectl controls the Kubernetes cluster manager.", run_output + + version_output = shell_output("#{bin}/kubectl version --client --output=yaml 2>&1") + assert_match "gitTreeState: clean", version_output + assert_match stable.specs[:revision].to_s, version_output + end +end diff --git a/Formula/k/kubescape.rb b/Formula/k/kubescape.rb new file mode 100644 index 0000000000000..078c057c44c60 --- /dev/null +++ b/Formula/k/kubescape.rb @@ -0,0 +1,43 @@ +class Kubescape < Formula + desc "Kubernetes testing according to Hardening Guidance by NSA and CISA" + homepage "https://kubescape.io/" + url "https://github.com/kubescape/kubescape/archive/refs/tags/v3.0.34.tar.gz" + sha256 "1da5a3a7b1ef8f38569ee6277fa8cf9d747f9fe379c9283011c7464b7c1003de" + license "Apache-2.0" + head "https://github.com/kubescape/kubescape.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "978a9d1af0ac3dc951a11516b5828b7d9f67c1c349a454a3594f61ca02b6235e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e1e3f19f5e4d999fa10312b0e9c68c33663591e1ffed4c6b398caadc60757e3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "97f4f10187c6469e5dc070572bf44930c9a82f71e8ba84be658a915fd0263ac6" + sha256 cellar: :any_skip_relocation, sonoma: "dc1d6cc50adbbbe6d83642c1fd76a8678d5e1660e30a3c5b8516d214f7c4ee83" + sha256 cellar: :any_skip_relocation, ventura: "ed137c92e456eb2837ab35a8a2cfa916cb00a5cd0b5f6813b0085088948e7d14" + sha256 cellar: :any_skip_relocation, arm64_linux: "9706c3860f04ca34a9497bfa19bfdf73950635242f8c42496546e93b48a7cf49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73e1a79f01f78472ceb10029afad1e8fcc209f692d94f92a8dd5033f3a55f396" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/kubescape/kubescape/v3/core/cautils.BuildNumber=v#{version} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"kubescape", "completion") + end + + test do + manifest = "https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/main/release/kubernetes-manifests.yaml" + assert_match "Failed resources by severity:", shell_output("#{bin}/kubescape scan framework nsa #{manifest}") + + assert_match version.to_s, shell_output("#{bin}/kubescape version") + end +end diff --git a/Formula/kubeseal.rb b/Formula/k/kubeseal.rb similarity index 75% rename from Formula/kubeseal.rb rename to Formula/k/kubeseal.rb index 369dd4ef9efb9..e0feec0cd83dc 100644 --- a/Formula/kubeseal.rb +++ b/Formula/k/kubeseal.rb @@ -2,16 +2,23 @@ class Kubeseal < Formula desc "Kubernetes controller and tool for one-way encrypted Secrets" homepage "https://github.com/bitnami-labs/sealed-secrets" url "https://github.com/bitnami-labs/sealed-secrets.git", - :tag => "v0.12.4", - :revision => "29441fc8416fd2e1363904ddd481859deed37d07" - sha256 "753f9084a0bf5dfccfe84dff036e87b899a3be921c1d33a497a4b44ac582f00d" + tag: "v0.29.0", + revision: "0d9cfaf99f23a344df8be86cf62d4aaad0d81be8" license "Apache-2.0" + head "https://github.com/bitnami-labs/sealed-secrets.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end bottle do - cellar :any_skip_relocation - sha256 "f80b7f12a29cebb0372c28370cd18991cfdb9ea0c6dc0a9ee41265aee393f0f1" => :catalina - sha256 "91902a7c652021076f8ac8582bcce22ae77d321411adf67d21603eb6dbc1d0af" => :mojave - sha256 "6285fd829b58dbf2802698d112b86a45b996e60c477dd8a218901020428aed95" => :high_sierra + sha256 cellar: :any_skip_relocation, arm64_sequoia: "44b58bb79b672df2daddcabfc8ef2af45ef9a215e9b58bc45e31ba2e8a81344d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7dcf342a052a073cc0be51f67ff9881a94887648df08afed02b02821d25c5796" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0fa498ed0743946732c9d05e8a1ef9d1582f33c2bd64991357acf7bf0b05637b" + sha256 cellar: :any_skip_relocation, sonoma: "f5f78e950774f72d8c03e420358088ea1a1cbd0065d568724d13416a814e5410" + sha256 cellar: :any_skip_relocation, ventura: "cc698cd9a4cb7bfdbb3201bd536f94e32804e2859bf0ee91dade320db3582a70" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02789863cb082b05977dd7f67095fc5367fa43351628f44056a0d6eb169cd2b7" end depends_on "go" => :build diff --git a/Formula/k/kubesess.rb b/Formula/k/kubesess.rb new file mode 100644 index 0000000000000..917689a31b3c4 --- /dev/null +++ b/Formula/k/kubesess.rb @@ -0,0 +1,56 @@ +class Kubesess < Formula + desc "Manage multiple kubernetes cluster at the same time" + homepage "https://blog.rentarami.se/posts/2022-08-05-kube-context-2/" + url "https://github.com/Ramilito/kubesess/archive/refs/tags/2.0.3-1.tar.gz" + sha256 "a5cfbf0637968124d9655109a44222de49b97a882831b56ccf3f11360872dfcd" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "344f52b08299ed4b08e8af8ae17d5d75ab56cd8c8f2bb017ded8ef2de861eb44" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3da56f2c3569d78ebba5c172eed393c45c528a6dd08562317496b152ba114481" + sha256 cellar: :any_skip_relocation, arm64_ventura: "789022cb8bd1473a7fde65f34f13cff32fda018872b98dc2e399a90de058cb3d" + sha256 cellar: :any_skip_relocation, sonoma: "b8e0d2cad2d5ca85325a13a99672b71cf4fae01e677a8e9b55036c4e050614a8" + sha256 cellar: :any_skip_relocation, ventura: "0430737333abb2ec5cba2abb5c222dbb2c2a03a288b47dce7b6b3f7042b3740d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b048c156580c152238c72864e731433a1efd29372470df0f78b0fadc26ac6b01" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3837dc2f129ab4793fb7d69dfabc3f1830b085991b7cf8faabf04b04f5d6e443" + end + + depends_on "rust" => :build + depends_on "kubernetes-cli" => :test + + def install + system "cargo", "install", *std_cargo_args + bash_completion.install "scripts/sh/completion.sh" + zsh_function.install "scripts/sh/kubesess.sh" + + %w[kc kn knd kcd].each do |basename| + fish_completion.install "scripts/fish/completions/#{basename}.fish" + fish_function.install "scripts/fish/functions/#{basename}.fish" + end + end + + test do + (testpath/".kube/config").write <<~YAML + kind: Config + apiVersion: v1 + current-context: docker-desktop + preferences: {} + clusters: + - cluster: + server: https://kubernetes.docker.internal:6443 + name: docker-desktop + contexts: + - context: + namespace: monitoring + cluster: docker-desktop + user: docker-desktop + name: docker-desktop + users: + - user: + name: docker-desktop + YAML + + output = shell_output("#{bin}/kubesess -v docker-desktop context 2>&1") + assert_match "docker-desktop", output + end +end diff --git a/Formula/k/kubeshark.rb b/Formula/k/kubeshark.rb new file mode 100644 index 0000000000000..471962a6793ea --- /dev/null +++ b/Formula/k/kubeshark.rb @@ -0,0 +1,48 @@ +class Kubeshark < Formula + desc "API Traffic Analyzer providing real-time visibility into Kubernetes network" + homepage "https://www.kubeshark.co/" + url "https://github.com/kubeshark/kubeshark/archive/refs/tags/v52.7.0.tar.gz" + sha256 "95352f8e7ac71c570b1dc23e2504d6eed70952af6c4d352fbc3dc276c613f7ce" + license "Apache-2.0" + head "https://github.com/kubeshark/kubeshark.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_sequoia: "11c4aff6f7604d4b12dd72e875a950e422d2eeddc920048e7e18fa89f92da13e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "742f2d7552d895d2453b9e677fccceeb31cd0759fa9538b6b4f77da5e0793ea0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1eca067494bcae2976ba547e30f339a0b86021dc6b0d83e7e73b962ba859edca" + sha256 cellar: :any_skip_relocation, sonoma: "879f5828040e1eaf58815b6ba001598a4d43e23057123be77b6052646783bf85" + sha256 cellar: :any_skip_relocation, ventura: "dc05e98a496777e3183afbfa8e9000db2360083bc59adf418b6a93fd75a5b09a" + sha256 cellar: :any_skip_relocation, arm64_linux: "d85015784abc15bb2f5506d007018c86cb4ff72b5bcb15d78cd6c6adde04957e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e27bbc7ba14bc4baf3bc15e2b2c7244b8eb0356af83b16f5f79d2edc92850710" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X "github.com/kubeshark/kubeshark/misc.Platform=#{OS.kernel_name}_#{Hardware::CPU.arch}" + -X "github.com/kubeshark/kubeshark/misc.BuildTimestamp=#{time}" + -X "github.com/kubeshark/kubeshark/misc.Ver=v#{version}" + ] + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"kubeshark", "completion") + end + + test do + version_output = shell_output("#{bin}/kubeshark version") + assert_equal "v#{version}", version_output.strip + + tap_output = shell_output("#{bin}/kubeshark tap 2>&1") + assert_match ".kube/config: no such file or directory", tap_output + end +end diff --git a/Formula/k/kubespy.rb b/Formula/k/kubespy.rb new file mode 100644 index 0000000000000..b2ba5611e4a27 --- /dev/null +++ b/Formula/k/kubespy.rb @@ -0,0 +1,34 @@ +class Kubespy < Formula + desc "Tools for observing Kubernetes resources in realtime" + homepage "https://github.com/pulumi/kubespy" + url "https://github.com/pulumi/kubespy/archive/refs/tags/v0.6.3.tar.gz" + sha256 "1975bf0a0aeb03e69c42ac626c16cd404610226cc5f50fab96d611d9eb6a6d29" + license "Apache-2.0" + head "https://github.com/pulumi/kubespy.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d88d6926bf09883789531fe1cc9956908ae7ce115ef2a4a2ddccd932ca2323d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "350da84eb2954134ad621f85dd0619c00d76730835fbd03409b9d93bdff50543" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5f330bfacc517d413078b720bd062241fa133473261bc683d9817e7a0b102d73" + sha256 cellar: :any_skip_relocation, sonoma: "f9759118bb4059b89ddc15eeffde235cf2f38e6c43e3e8ab3f3c0963360da5d8" + sha256 cellar: :any_skip_relocation, ventura: "efee99c55ca31291aab9dad8badf602a0d8eae65f201f407ec40eaed9362f1cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e00ec0730211581e28e9ce51a735efc19081821f363c0541e74917384544384" + sha256 cellar: :any_skip_relocation, x86_64_linux: "36b1c1fb59db56e36ca01cfb315313a94796d679d7ae85988132f20b6706ffe3" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/pulumi/kubespy/version.Version=#{version}") + + generate_completions_from_executable(bin/"kubespy", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/kubespy version") + + assert_match "invalid configuration: no configuration has been provided", + shell_output("#{bin}/kubespy status v1 Pod nginx 2>&1", 1) + end +end diff --git a/Formula/k/kubetail.rb b/Formula/k/kubetail.rb new file mode 100644 index 0000000000000..a0c0e7b0697cb --- /dev/null +++ b/Formula/k/kubetail.rb @@ -0,0 +1,41 @@ +class Kubetail < Formula + desc "Logging tool for Kubernetes with a real-time web dashboard" + homepage "https://www.kubetail.com/" + url "https://github.com/kubetail-org/kubetail/archive/refs/tags/cli/v0.5.3.tar.gz" + sha256 "e4035d0f11851d772c579a4cb5d42456ef3b6c96a7eb1bf772fcfa923b724153" + license "Apache-2.0" + head "https://github.com/kubetail-org/kubetail.git", branch: "main" + + livecheck do + url :stable + regex(%r{^cli/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5bc3b788305f61351514c2c8438f7cffd024ed41f46d593b7b7db518350c1ee3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2a4cbaad2f2a32b0c955eacfd9b75aa55977139acfe0810cce7fd94dcd940144" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a2ce969b576ac163b71dc49ca7b1ae80c1c156e0795e10be76e4f41146c9fab7" + sha256 cellar: :any_skip_relocation, sonoma: "8061b2d530fc683dc6d787593bfd216bba3a1821a0564d893c93029ce7a372f5" + sha256 cellar: :any_skip_relocation, ventura: "c8c8d86d99c1fde5e45c08076562a6c3190bab0b344c544338b854efe0790ca4" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e5c659e814364a4f89234f030523fb35c3fcd93d5ae18d3cb84ea393b054333" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4f5b1aa8b28ef8dd93b185288c898b8a03f907fd3c68710585d402afe3f057b" + end + + depends_on "go" => :build + depends_on "make" => :build + depends_on "node" => :build + depends_on "pnpm" => :build + + def install + system "make", "build", "VERSION=#{version}" + bin.install "bin/kubetail" + generate_completions_from_executable(bin/"kubetail", "completion") + end + + test do + command_output = shell_output("#{bin}/kubetail serve --test") + assert_match "ok", command_output + + assert_match version.to_s, shell_output("#{bin}/kubetail --version") + end +end diff --git a/Formula/k/kubetrim.rb b/Formula/k/kubetrim.rb new file mode 100644 index 0000000000000..df75c50e75927 --- /dev/null +++ b/Formula/k/kubetrim.rb @@ -0,0 +1,53 @@ +class Kubetrim < Formula + desc "Trim your KUBECONFIG automatically" + homepage "https://github.com/alexellis/kubetrim" + url "https://github.com/alexellis/kubetrim/archive/refs/tags/v0.0.1.tar.gz" + sha256 "fb1c127efa8c927e74627bae9a043e2cf505183d607cbfacf6eea8c8449a3383" + license "MIT" + head "https://github.com/alexellis/kubetrim.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "acbcdd0bef57b7bebf823e4a8188e92008bd28ff5bddad717c6d730e4931a30e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "acbcdd0bef57b7bebf823e4a8188e92008bd28ff5bddad717c6d730e4931a30e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "acbcdd0bef57b7bebf823e4a8188e92008bd28ff5bddad717c6d730e4931a30e" + sha256 cellar: :any_skip_relocation, sonoma: "c713518860291419d0aeaad5f01749956988e7ad1f633f99f5fc016048cd8bd5" + sha256 cellar: :any_skip_relocation, ventura: "c713518860291419d0aeaad5f01749956988e7ad1f633f99f5fc016048cd8bd5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6e37b854d49f12f623eaa6ab5f2415d096b9fe0c6e319e7b62212d34e627332" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/alexellis/kubetrim/pkg.Version=#{version} -X github.com/alexellis/kubetrim/pkg.GitCommit=#{tap.user}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/kubetrim --help") + + # fake k8s configuration + (testpath/".kube/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: {} + users: + - name: test-user + user: + token: test-token + YAML + + output = shell_output("#{bin}/kubetrim -write=false") + assert_match "failed to connect to cluster", output + end +end diff --git a/Formula/k/kubetui.rb b/Formula/k/kubetui.rb new file mode 100644 index 0000000000000..254380824ccb9 --- /dev/null +++ b/Formula/k/kubetui.rb @@ -0,0 +1,44 @@ +class Kubetui < Formula + desc "TUI tool for monitoring and exploration of Kubernetes resources" + homepage "https://github.com/sarub0b0/kubetui" + url "https://github.com/sarub0b0/kubetui/archive/refs/tags/v1.7.1.tar.gz" + sha256 "9789a466d85ff336d2485e772a3b47a0d1ff0b8869e6bf868005eb8daca611f4" + license "MIT" + head "https://github.com/sarub0b0/kubetui.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3c299dc728b56a5c5528f1b947cbf2a330a7cdef295c85c9d2849f42aab011f3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9bb4850601fc8e85a69e2274bd08399c3db48664fe4d4e5a4e75ae365602dced" + sha256 cellar: :any_skip_relocation, arm64_ventura: "12e4b37cb9d80f27ae380fabaa506e3cd45eaff1f5c131ddb0797e51561d2842" + sha256 cellar: :any_skip_relocation, sonoma: "1047745793b341dd3f759571538e2dc00664fe8c6057128edd2551da8ebc65ee" + sha256 cellar: :any_skip_relocation, ventura: "f94b9c90dd1d9ab5358f6a1090234b58340b7beaf58b6e9833da9ceb089178ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "d806a43449d52f2a516e7d7fd778ad4615541ce6c26b30306df34e964ab602c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "490708ebb34caeb214dfff4efcb2d19be630e23cb25bd1cb427bb3b0c9b75431" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/kubetui --version") + + # Use pty because it fails with this error in Linux CI: + # failed to enable raw mode: Os { code: 6, kind: Uncategorized, message: "No such device or address" } + r, _w, pid = PTY.spawn("#{bin}/kubetui --kubeconfig not_exist") + + output = "" + begin + r.each_line { |line| output += line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + ensure + Process.wait(pid) + end + + assert_match "failed to read kubeconfig", output + assert_equal 1, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/k/kubevela.rb b/Formula/k/kubevela.rb new file mode 100644 index 0000000000000..b0d8b4d6d7146 --- /dev/null +++ b/Formula/k/kubevela.rb @@ -0,0 +1,65 @@ +class Kubevela < Formula + desc "Application Platform based on Kubernetes and Open Application Model" + homepage "https://kubevela.io/" + url "https://github.com/kubevela/kubevela.git", + tag: "v1.10.3", + revision: "ef9b6f3cc10a4b6871b5698ca41fea3f6b3bcaec" + license "Apache-2.0" + head "https://github.com/kubevela/kubevela.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0cabadfd79656b59d2eb525d54b4653664062a35f75b0cb4f862d2105d514b26" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0cabadfd79656b59d2eb525d54b4653664062a35f75b0cb4f862d2105d514b26" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0cabadfd79656b59d2eb525d54b4653664062a35f75b0cb4f862d2105d514b26" + sha256 cellar: :any_skip_relocation, sonoma: "3a22ac50dbab34cb2083bf1e3bc0bc3162d21385eddc3abf9748d0c272ec4392" + sha256 cellar: :any_skip_relocation, ventura: "3a22ac50dbab34cb2083bf1e3bc0bc3162d21385eddc3abf9748d0c272ec4392" + sha256 cellar: :any_skip_relocation, arm64_linux: "b5bacd3f4cdb33aaac5b4bcd1e3478413406f2336a3375f60475dfcd4f848f8f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2251670c7e47e8fd9c02a25295e7e03c16aa269a151f5f3321e8b16662c3e539" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + ldflags = %W[ + -s -w + -X github.com/oam-dev/kubevela/version.VelaVersion=#{version} + -X github.com/oam-dev/kubevela/version.GitRevision=#{Utils.git_head} + ] + + system "go", "build", *std_go_args(output: bin/"vela", ldflags:), "./references/cmd/cli" + + generate_completions_from_executable(bin/"vela", "completion", shells: [:bash, :zsh]) + end + + test do + # Should error out as vela up need kubeconfig + status_output = shell_output("#{bin}/vela up 2>&1", 1) + assert_match "error: either app name or file should be set", status_output + + (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 + + ENV["KUBECONFIG"] = testpath/"kube-config" + version_output = shell_output("#{bin}/vela version 2>&1") + assert_match "Version: #{version}", version_output + end +end diff --git a/Formula/k/kubevious.rb b/Formula/k/kubevious.rb new file mode 100644 index 0000000000000..e18d46d9eee78 --- /dev/null +++ b/Formula/k/kubevious.rb @@ -0,0 +1,108 @@ +class Kubevious < Formula + desc "Detects and prevents Kubernetes misconfigurations and violations" + homepage "https://github.com/kubevious/cli" + url "https://registry.npmjs.org/kubevious/-/kubevious-1.0.64.tgz" + sha256 "f67bb559bd0aee165186307e678cf03141ade8f8b79127bd10be0f47d85d0348" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bf541437312693b6b7eb8c2e24d522381e69939b41e2e708bd9ac1c459bd1620" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bf541437312693b6b7eb8c2e24d522381e69939b41e2e708bd9ac1c459bd1620" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bf541437312693b6b7eb8c2e24d522381e69939b41e2e708bd9ac1c459bd1620" + sha256 cellar: :any_skip_relocation, sonoma: "174afab940f90a87e14b1f4e257044b0598400c24cf204e046a89708b4d01495" + sha256 cellar: :any_skip_relocation, ventura: "174afab940f90a87e14b1f4e257044b0598400c24cf204e046a89708b4d01495" + sha256 cellar: :any_skip_relocation, arm64_linux: "bf541437312693b6b7eb8c2e24d522381e69939b41e2e708bd9ac1c459bd1620" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf541437312693b6b7eb8c2e24d522381e69939b41e2e708bd9ac1c459bd1620" + 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}/kubevious --version") + + (testpath/"deployment.yml").write <<~YAML + apiVersion: apps/v1 + kind: Deployment + metadata: + name: nginx + spec: + selector: + matchLabels: + app: nginx + replicas: 1 + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:1.14.2 + ports: + - containerPort: 80 + YAML + + assert_match "Lint Succeeded", + shell_output("#{bin}/kubevious lint #{testpath}/deployment.yml") + + (testpath/"bad-deployment.yml").write <<~YAML + apiVersion: apps/v1 + kind: BadDeployment + metadata: + name: nginx + spec: + selector: + matchLabels: + app: nginx + replicas: 1 + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:1.14.2 + ports: + - containerPort: 80 + YAML + + assert_match "Lint Failed", + shell_output("#{bin}/kubevious lint #{testpath}/bad-deployment.yml", 100) + + assert_match "Guard Succeeded", + shell_output("#{bin}/kubevious guard #{testpath}/deployment.yml") + + assert_match "Guard Failed", + shell_output("#{bin}/kubevious guard #{testpath}/bad-deployment.yml", 100) + + (testpath/"service.yml").write <<~YAML + apiVersion: v1 + kind: Service + metadata: + labels: + app: nginx + name: nginx + spec: + type: ClusterIP + ports: + - name: http + port: 80 + targetPort: 8080 + selector: + app: nginx + YAML + + assert_match "Guard Failed", + shell_output("#{bin}/kubevious guard #{testpath}/service.yml", 100) + + assert_match "Guard Succeeded", + shell_output("#{bin}/kubevious guard #{testpath}/service.yml #{testpath}/deployment.yml") + end +end diff --git a/Formula/k/kubevpn.rb b/Formula/k/kubevpn.rb new file mode 100644 index 0000000000000..22076d82c49ad --- /dev/null +++ b/Formula/k/kubevpn.rb @@ -0,0 +1,44 @@ +class Kubevpn < Formula + desc "Offers a Cloud-Native Dev Environment that connects to your K8s cluster network" + homepage "https://www.kubevpn.dev/" + url "https://github.com/kubenetworks/kubevpn/archive/refs/tags/v2.7.10.tar.gz" + sha256 "27f8770f400882c7bf6ff93de7597af1e289147a693133e51109c8d089b6756b" + license "MIT" + head "https://github.com/kubenetworks/kubevpn.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bbc59ab6412102a6ef0aed8b8a48f33f6e89fc189bbc694a8c9ec2c1e52bcde4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5aaa0333d33743c9ffe77161911b772a3f9fa7a922ec534b3442daf54d177642" + sha256 cellar: :any_skip_relocation, arm64_ventura: "820e333ad7715179164988f451da6a78d4b1a1482f1fc0b1a2d1b10d9031070f" + sha256 cellar: :any_skip_relocation, sonoma: "0295001f6a420589671e7b5ed96084a05e1359e37841331c41dc2f571dbba120" + sha256 cellar: :any_skip_relocation, ventura: "3315e95b34b9b703924d6ed8bd29fe3455cae21cc497f9ed5886dd412fde2593" + sha256 cellar: :any_skip_relocation, arm64_linux: "edd877a845a043cbf8722d508517d978b9a55eae82c87c4eb890d27ec3294bf3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88eeb73f0ec27a445488798d0bcaab61dc656f52ff0da51f36e1818b3c4bb4a6" + end + + depends_on "go" => :build + + def install + goos = Utils.safe_popen_read("#{Formula["go"].bin}/go", "env", "GOOS").chomp + goarch = Utils.safe_popen_read("#{Formula["go"].bin}/go", "env", "GOARCH").chomp + project = "github.com/wencaiwulue/kubevpn/v2" + ldflags = %W[ + -s -w + -X #{project}/pkg/config.Image=ghcr.io/kubenetworks/kubevpn:v#{version} + -X #{project}/pkg/config.Version=v#{version} + -X #{project}/pkg/config.GitCommit=brew + -X #{project}/cmd/kubevpn/cmds.BuildTime=#{time.iso8601} + -X #{project}/cmd/kubevpn/cmds.Branch=master + -X #{project}/cmd/kubevpn/cmds.OsArch=#{goos}/#{goarch} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/kubevpn" + + generate_completions_from_executable(bin/"kubevpn", "completion") + end + + test do + assert_match "Version: v#{version}", shell_output("#{bin}/kubevpn version") + assert_path_exists testpath/".kubevpn/config.yaml" + assert_path_exists testpath/".kubevpn/daemon" + end +end diff --git a/Formula/k/kubie.rb b/Formula/k/kubie.rb new file mode 100644 index 0000000000000..cfc03e01dcac3 --- /dev/null +++ b/Formula/k/kubie.rb @@ -0,0 +1,57 @@ +class Kubie < Formula + desc "Much more powerful alternative to kubectx and kubens" + homepage "https://blog.sbstp.ca/introducing-kubie/" + url "https://github.com/sbstp/kubie/archive/refs/tags/v0.25.2.tar.gz" + sha256 "4d41e441eb006999f91f962b264730ec092a1352b16e45094f703144e855857e" + license "Zlib" + head "https://github.com/sbstp/kubie.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "162563da6d7eda341e64f02a2c8a6bc7990316f5b44d3bd0011baae7f4824bfc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef35d6d5916a20e7e40049f29f5f482c69931f36601002a77e2d2edb884270ba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "69a9ea8f4288fe18075f1b1c71815f94554ad168cb9c8ce0dfb639e677234392" + sha256 cellar: :any_skip_relocation, sonoma: "32d2c5ec2ce7902d06cf859253fecf9489d779529f32e318d68a15a16a87a7fc" + sha256 cellar: :any_skip_relocation, ventura: "ec6940cb0934fc87b51cb10448b84970752589ef6fd06963ffedcba9e4177617" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c53608c2b438262b8d14adbc31cb2524e4e5c75e1b8d4e6791ff9405472392c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "988ef522300b19560127b32022aa92d7d27ece39087c747aed21781c22c74812" + end + + depends_on "rust" => :build + depends_on "kubernetes-cli" => :test + + def install + system "cargo", "install", *std_cargo_args + bash_completion.install "./completion/kubie.bash" => "kubie" + fish_completion.install "./completion/kubie.fish" + end + + test do + (testpath/".kube/kubie-test.yaml").write <<~YAML + apiVersion: v1 + clusters: + - cluster: + server: http://0.0.0.0/ + name: kubie-test-cluster + contexts: + - context: + cluster: kubie-test-cluster + user: kubie-test-user + namespace: kubie-test-namespace + name: kubie-test + current-context: baz + kind: Config + preferences: {} + users: + - user: + name: kubie-test-user + YAML + + assert_match "The connection to the server 0.0.0.0 was refused - did you specify the right host or port?", + shell_output("#{bin}/kubie exec kubie-test kubie-test-namespace kubectl get pod 2>&1") + end +end diff --git a/Formula/k/kumactl.rb b/Formula/k/kumactl.rb new file mode 100644 index 0000000000000..46c31984d05e6 --- /dev/null +++ b/Formula/k/kumactl.rb @@ -0,0 +1,46 @@ +class Kumactl < Formula + desc "Kuma control plane command-line utility" + homepage "https://kuma.io/" + url "https://github.com/kumahq/kuma/archive/refs/tags/2.10.1.tar.gz" + sha256 "03f49ee94353fd80c997929be338ebe0abeaad60286710fffa9d996e03ef1484" + license "Apache-2.0" + head "https://github.com/kumahq/kuma.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "548d25075d89dd21a554620901d30b7b55ea5753469a149df0df672283b114b1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "16645e8ceaba12d28c82ecc7d381455dd5b4def4a1154ecf7df3bc937dbd3772" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0ea2dd6fd6548204f49e9139789141bb8138a5e67ea1e3b18d5cda0474704e6b" + sha256 cellar: :any_skip_relocation, sonoma: "926c128e61c5c464d7517039e93d5f34670e63350f8f62d9edd2c70e1a870230" + sha256 cellar: :any_skip_relocation, ventura: "cfaf56b0ade925a990e1365f08a7fb6bd1fbb72d3b21f3f707c0f5c7ef1e31b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bb6be09826e5f76aa3d812c8f28ba7e68f603ad3694a1088b6c2b3d46cca3af" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/kumahq/kuma/pkg/version.version=#{version} + -X github.com/kumahq/kuma/pkg/version.gitTag=#{version} + -X github.com/kumahq/kuma/pkg/version.buildDate=#{time.strftime("%F")} + ] + + system "go", "build", *std_go_args(ldflags:), "./app/kumactl" + + generate_completions_from_executable(bin/"kumactl", "completion") + end + + test do + assert_match "Management tool for Kuma.", shell_output(bin/"kumactl") + assert_match version.to_s, shell_output("#{bin}/kumactl version 2>&1") + + touch testpath/"config.yml" + assert_match "Error: no resource(s) passed to apply", + shell_output("#{bin}/kumactl apply -f config.yml 2>&1", 1) + end +end diff --git a/Formula/k/kumo.rb b/Formula/k/kumo.rb new file mode 100644 index 0000000000000..ac7ff3be8a999 --- /dev/null +++ b/Formula/k/kumo.rb @@ -0,0 +1,29 @@ +class Kumo < Formula + desc "Word Clouds in Java" + homepage "https://github.com/kennycason/kumo" + url "https://search.maven.org/remotecontent?filepath=com/kennycason/kumo-cli/1.28/kumo-cli-1.28.jar" + sha256 "43e4e2ea9da62a2230deed9151d8484f80bd6ae5fef304eaadf3301378f45fb6" + license "MIT" + + livecheck do + url "https://search.maven.org/remotecontent?filepath=com/kennycason/kumo-cli/maven-metadata.xml" + regex(%r{v?(\d+(?:\.\d+)+)}i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "964493ca566d7dc73ab4519fa820e7360981acd9d8d343920f843b83642cc008" + end + + depends_on "openjdk" + + def install + libexec.install "kumo-cli-#{version}.jar" + bin.write_jar_script libexec/"kumo-cli-#{version}.jar", "kumo" + end + + test do + system bin/"kumo", "-i", "https://wikipedia.org/", "-o", testpath/"wikipedia.png" + assert_path_exists testpath/"wikipedia.png", "Wordcloud was not generated!" + end +end diff --git a/Formula/k/kustomize.rb b/Formula/k/kustomize.rb new file mode 100644 index 0000000000000..432c64c522fe1 --- /dev/null +++ b/Formula/k/kustomize.rb @@ -0,0 +1,67 @@ +class Kustomize < Formula + desc "Template-free customization of Kubernetes YAML manifests" + homepage "https://github.com/kubernetes-sigs/kustomize" + url "https://github.com/kubernetes-sigs/kustomize/archive/refs/tags/kustomize/v5.6.0.tar.gz" + sha256 "80822d3227c0dbbd38bff19c4630f4fa7eccbacd0ff269a1795a63aa3a45714f" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/kustomize.git", branch: "master" + + livecheck do + url :stable + regex(%r{^kustomize/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd6b8ee41eaa7b659064ed70af60dd3c79b4064465f66074cf9d5dfc5301dcaa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e8887e642d4af6754b15728feaebd0e326d45547ebd1a6a53ae299d88cce48a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ec32849849c7f51ee4606b6beaad41c83a0e49cdf2b2ce641c201eecaddb83ac" + sha256 cellar: :any_skip_relocation, sonoma: "ce706ccba85d5dc14c50cbd7c91dc99ab27489e5d4fb67880da064d4546f88c9" + sha256 cellar: :any_skip_relocation, ventura: "9f0d69b382c07d38e432cd49d1f141d2e456e87f31f5d8d4d7674ab2c833dea2" + sha256 cellar: :any_skip_relocation, arm64_linux: "9ddbb6a01895d449ad69ae591edcb1001c37b549181a1c8daec166c72f4c1d98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f480a2f4d778df050f01c6344d9777c8ce2ee729e44694695732ff064050e2a6" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X sigs.k8s.io/kustomize/api/provenance.version=#{name}/v#{version} + -X sigs.k8s.io/kustomize/api/provenance.buildDate=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:), "./kustomize" + + generate_completions_from_executable(bin/"kustomize", "completion") + end + + test do + assert_match "v#{version}", shell_output("#{bin}/kustomize version") + + (testpath/"kustomization.yaml").write <<~YAML + resources: + - service.yaml + patches: + - path: patch.yaml + YAML + (testpath/"patch.yaml").write <<~YAML + apiVersion: v1 + kind: Service + metadata: + name: brew-test + spec: + selector: + app: foo + YAML + (testpath/"service.yaml").write <<~YAML + apiVersion: v1 + kind: Service + metadata: + name: brew-test + spec: + type: LoadBalancer + YAML + output = shell_output("#{bin}/kustomize build #{testpath}") + assert_match(/type:\s+"?LoadBalancer"?/, output) + end +end diff --git a/Formula/k/kustomizer.rb b/Formula/k/kustomizer.rb new file mode 100644 index 0000000000000..cd4fb22e5906c --- /dev/null +++ b/Formula/k/kustomizer.rb @@ -0,0 +1,39 @@ +class Kustomizer < Formula + desc "Package manager for distributing Kubernetes configuration as OCI artifacts" + homepage "https://github.com/stefanprodan/kustomizer" + url "https://github.com/stefanprodan/kustomizer/archive/refs/tags/v2.2.1.tar.gz" + sha256 "bba48e2eed5b84111c39b34d9892ffc9f0575b6f6470d50f832f47ff6417bf03" + license "Apache-2.0" + head "https://github.com/stefanprodan/kustomizer.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0614a810f33b3319820a68d23aee72b4af6f04d937435e2b9df8c3a6c8991caa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "db4028189fa70a68b0c6c33a0837b864a9fce38f0b9e232c8adc3adfbf7a6efc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3ba254b8051b47aa5f1fb36236027a7ba73cda8218c504b43065ab3ad7677584" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cc06563ebe12218833949dd690e7c3ffbe71d815e16581657ba4971af6ad1a64" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "34ca6d21c6761b9732b0bd0cbb3bdc7bfa8c0701ba7edf2bd236f820be1ef44b" + sha256 cellar: :any_skip_relocation, sonoma: "49f39ea95d4c027c7ca8808b0d05258a3d6905debd124f198f34c20e95427231" + sha256 cellar: :any_skip_relocation, ventura: "417bce8bb8cb178b6fcc5386ecbf4a01405253abfca33c036a03f99058ce9dd7" + sha256 cellar: :any_skip_relocation, monterey: "826930275079d88859fd26976d3e7d8d7e9ebf57edeae256e232ce4c3603ce2f" + sha256 cellar: :any_skip_relocation, big_sur: "8f9ac16b04e1da34901f680da8c8f481e605d374822cf77752d68777f9cd9cf1" + sha256 cellar: :any_skip_relocation, catalina: "e954a47cd5a1e00b299a62432ec532ddd4545a7c2de6c4d669e2242af9080eb8" + sha256 cellar: :any_skip_relocation, arm64_linux: "b48f88c7d495d1eeb79bd63cff70648d07c4ca9615fa4d9a7ff89ea3e66bc1b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ed1242aaec95d97b1c835476b50556d96a6f8902d1bcdeca14fa7625243b437" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.VERSION=#{version}"), "./cmd/kustomizer" + + generate_completions_from_executable(bin/"kustomizer", "completion") + end + + test do + system bin/"kustomizer", "config", "init" + assert_match "apiVersion: kustomizer.dev/v1", (testpath/".kustomizer/config").read + + output = shell_output("#{bin}/kustomizer list artifact 2>&1", 1) + assert_match "you must specify an artifact repository e.g. 'oci://docker.io/user/repo'", output + end +end diff --git a/Formula/k/kuto.rb b/Formula/k/kuto.rb new file mode 100644 index 0000000000000..35c8b7cd89fee --- /dev/null +++ b/Formula/k/kuto.rb @@ -0,0 +1,54 @@ +class Kuto < Formula + desc "Reverse JS bundler" + homepage "https://github.com/samthor/kuto" + url "https://registry.npmjs.org/kuto/-/kuto-0.3.6.tgz" + sha256 "4e4ac78f04caebf634674fea2266d1701b20aa0a132513e58b25f8875d0b81e1" + license "Apache-2.0" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "d0b642c13ec7b23fd229ef06d6ab335cb2cb3eaea4785644006ab84572b0d8bf" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + ENV["TERM"] = "xterm" + + test_file = testpath/"bundled.js" + test_file.write <<~EOS + (function() { + console.log("Hello, World!"); + })(); + EOS + + assert_match <<~EOS, shell_output("#{bin}/kuto split #{test_file} out") + stats { + source: { size: 54 }, + sizes: { './bundled.js': 53 }, + disused: [], + lift: { fn: 0, class: 0, expr: 0, assignment: 0, _skip: 0 } + } + EOS + + assert_match <<~EOS, shell_output("#{bin}/kuto info #{test_file}") + "./#{test_file}" + + Side-effects: Unknown + + Imports: + + Exports: + + Globals used at top-level: + - console + + Globals used in callables: + EOS + end +end diff --git a/Formula/k/kuttl.rb b/Formula/k/kuttl.rb new file mode 100644 index 0000000000000..00c3aa9a06f13 --- /dev/null +++ b/Formula/k/kuttl.rb @@ -0,0 +1,56 @@ +class Kuttl < Formula + desc "KUbernetes Test TooL" + homepage "https://kuttl.dev/" + url "https://github.com/kudobuilder/kuttl/archive/refs/tags/v0.22.0.tar.gz" + sha256 "45777fdca82d14030b9661a2819b15e6380a9f4b0f8bbcfd826d8b21ffae7803" + license "Apache-2.0" + head "https://github.com/kudobuilder/kuttl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a200c41971635ed7a3653587e733f9ba432eef06741e418c9ca76ff8f8164d54" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a200c41971635ed7a3653587e733f9ba432eef06741e418c9ca76ff8f8164d54" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a200c41971635ed7a3653587e733f9ba432eef06741e418c9ca76ff8f8164d54" + sha256 cellar: :any_skip_relocation, sonoma: "02527ab79b8757cbdef026cf010d835ab249bcc7eef92c23900490afa334521f" + sha256 cellar: :any_skip_relocation, ventura: "02527ab79b8757cbdef026cf010d835ab249bcc7eef92c23900490afa334521f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bda78e3404303c5bfcdc8f9a7d0c9b39c1315be6bce046589de118146e587712" + end + + depends_on "go" => :build + depends_on "kubernetes-cli" => :test + + def install + project = "github.com/kudobuilder/kuttl" + ldflags = %W[ + -s -w + -X #{project}/pkg/version.gitVersion=v#{version} + -X #{project}/pkg/version.gitCommit=#{tap.user} + -X #{project}/pkg/version.buildDate=#{time.iso8601} + ] + + system "go", "build", *std_go_args(output: bin/"kubectl-kuttl", ldflags:), "./cmd/kubectl-kuttl" + generate_completions_from_executable(bin/"kubectl-kuttl", "completion") + end + + test do + version_output = shell_output("#{bin}/kubectl-kuttl version") + assert_match version.to_s, version_output + assert_match stable.specs[:revision].to_s, version_output + + kubectl = Formula["kubernetes-cli"].opt_bin / "kubectl" + assert_equal version_output, shell_output("#{kubectl} kuttl version") + + (testpath / "kuttl-test.yaml").write <<~YAML + apiVersion: kuttl.dev/v1beta1 + kind: TestSuite + testDirs: + - #{testpath} + parallel: 1 + YAML + + output = shell_output("#{kubectl} kuttl test --config #{testpath}/kuttl-test.yaml", 1) + assert_match "running tests using configured kubeconfig", output + assert_match "fatal error getting client: " \ + "invalid configuration: " \ + "no configuration has been provided, try setting KUBERNETES_MASTER environment variable", output + end +end diff --git a/Formula/k/kuzco.rb b/Formula/k/kuzco.rb new file mode 100644 index 0000000000000..6c3f2a68cd6e5 --- /dev/null +++ b/Formula/k/kuzco.rb @@ -0,0 +1,48 @@ +class Kuzco < Formula + desc "Reviews Terraform and OpenTofu resources and uses AI to suggest improvements" + homepage "https://github.com/RoseSecurity/Kuzco" + url "https://github.com/RoseSecurity/Kuzco/archive/refs/tags/v1.4.0.tar.gz" + sha256 "03d8a3bd5265be55e7d3cc862eeba7672bd27f04bffab2f14824ebf98e35ac7f" + license "Apache-2.0" + head "https://github.com/RoseSecurity/Kuzco.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "843597dc532c472bbc088673a68e60a58902e9084dbdc2c115ad29cf45a48e2a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "843597dc532c472bbc088673a68e60a58902e9084dbdc2c115ad29cf45a48e2a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "843597dc532c472bbc088673a68e60a58902e9084dbdc2c115ad29cf45a48e2a" + sha256 cellar: :any_skip_relocation, sonoma: "0350b15b9784103662da14cf4bb05684ca2b48d2e85124b5d43198e4c41f024e" + sha256 cellar: :any_skip_relocation, ventura: "0350b15b9784103662da14cf4bb05684ca2b48d2e85124b5d43198e4c41f024e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e40231c893f224e21d1d430c7286c2adceadf4cff0eb12d2322d4c7bbcbd9f6" + end + + depends_on "go" => :build + depends_on "opentofu" => :test + + def install + ldflags = "-s -w -X github.com/RoseSecurity/kuzco/cmd.Version=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"kuzco", "completion") + end + + test do + test_file = testpath/"main.tf" + test_file.write <<~EOS + resource "aws_s3_bucket" "cloudtrail_logs" { + bucket = "my-cloudtrail-logs-bucket" + object_lock_enabled = true + + tags = { + Name = "My CloudTrail Bucket" + Environment = "Dev" + Region = "us-west-2" + } + } + EOS + + output = shell_output("#{bin}/kuzco recommend -t opentofu -f #{test_file} --dry-run") + assert_match "version block", output + + assert_match version.to_s, shell_output("#{bin}/kuzco version") + end +end diff --git a/Formula/k/kuzu.rb b/Formula/k/kuzu.rb new file mode 100644 index 0000000000000..bdf87f7f1ffdf --- /dev/null +++ b/Formula/k/kuzu.rb @@ -0,0 +1,93 @@ +class Kuzu < Formula + desc "Embeddable graph database management system built for query speed & scalability" + homepage "https://kuzudb.com/" + url "https://github.com/kuzudb/kuzu/archive/refs/tags/v0.10.0.tar.gz" + sha256 "df185b2688ccbfebfddf11520532caf2965300fd91c0c2b9d096da59c925228f" + license "MIT" + head "https://github.com/kuzudb/kuzu.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bb7aa1820a91f16e0bdeb5f7c53712283bd554ae81620d1ba88fe42659ba463d" + sha256 cellar: :any, arm64_sonoma: "98c6ea68a10e431295b2462087c3708c9d2bc20f0692183cd6a20afd742a3e87" + sha256 cellar: :any, arm64_ventura: "e08626d3676a27d8bb7982947ef08ff583c1a85bbb2d6d41354ca367b2b25dd2" + sha256 cellar: :any, sonoma: "8eb48a39122afdeb15918d77e0e9ffc0317d439ca31e417bc9cc1fd45b8d4c62" + sha256 cellar: :any, ventura: "2d313770379129941835d3af9c31b8b3c4b2681330179ef30b1fee40ddf14374" + sha256 cellar: :any_skip_relocation, arm64_linux: "b79e4eb188a959d8a693738357983cbffab94b17219276bc57692b7bc76f323d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56c16f0f1a7ee33ad239617882f1282a04a62606ded34fbbfdb7de79e0e9427c" + end + + depends_on "cmake" => :build + + uses_from_macos "python" => :build + + on_macos do + depends_on "llvm" if DevelopmentTools.clang_build_version <= 1400 + end + + on_linux do + depends_on "gcc@12" if DevelopmentTools.gcc_version("/usr/bin/gcc") < 12 + end + + fails_with :clang do + build 1400 + cause "Requires C++20" + end + + fails_with :gcc do + version "11" + cause "needs GCC 12 or newer" + end + + def install + if OS.mac? && 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]... + ENV.prepend_path "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib/"c++" + end + + args = %w[ + -DAUTO_UPDATE_GRAMMAR=0 + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + db_path = testpath/"testdb/" + cypher_path = testpath/"test.cypher" + cypher_path.write <<~EOS + CREATE NODE TABLE Person(name STRING, age INT64, PRIMARY KEY(name)); + CREATE (:Person {name: 'Alice', age: 25}); + CREATE (:Person {name: 'Bob', age: 30}); + MATCH (a:Person) RETURN a.name AS NAME, a.age AS AGE ORDER BY a.name ASC; + EOS + + output = shell_output("#{bin}/kuzu #{db_path} < #{cypher_path}") + + expected_1 = <<~EOS + ┌────────────────────────────────┐ + │ result │ + │ STRING │ + ├────────────────────────────────┤ + │ Table Person has been created. │ + └────────────────────────────────┘ + EOS + expected_2 = <<~EOS + ┌────────┬───────┐ + │ NAME │ AGE │ + │ STRING │ INT64 │ + ├────────┼───────┤ + │ Alice │ 25 │ + │ Bob │ 30 │ + └────────┴───────┘ + EOS + + assert_match expected_1, output + assert_match expected_2, output + end +end diff --git a/Formula/k/kvazaar.rb b/Formula/k/kvazaar.rb new file mode 100644 index 0000000000000..c97e3c4c11f97 --- /dev/null +++ b/Formula/k/kvazaar.rb @@ -0,0 +1,49 @@ +class Kvazaar < Formula + desc "Ultravideo HEVC encoder" + homepage "https://github.com/ultravideo/kvazaar" + url "https://github.com/ultravideo/kvazaar/archive/refs/tags/v2.3.1.tar.gz" + sha256 "c5a1699d0bd50bc6bdba485b3438a5681a43d7b2c4fd6311a144740bfa59c9cc" + license "BSD-3-Clause" + head "https://github.com/ultravideo/kvazaar.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8d9e19a77635ecf9a1c6b496b498b6a6c3e571bae726e440dd14dbf9aa6f15d6" + sha256 cellar: :any, arm64_sonoma: "1cbad0414bceb5d09a08e111e35cfae189f36a14979126346195b9c2885a08af" + sha256 cellar: :any, arm64_ventura: "0c93533adcc570792d6c19c12e1aba452de88a7b8145bdf07c17109108c07e9c" + sha256 cellar: :any, arm64_monterey: "b196d9cb2d8f16c21e392b7580a19e5f74c1e485eb793083a2bfafbd65a84b30" + sha256 cellar: :any, sonoma: "c881324ae98a472927554e4bf70a17a58a1b3379d25001f3a568b2ab1fcb6cab" + sha256 cellar: :any, ventura: "3ece2ea661d18cb5918f69e7195bd81099410e791cd0dedbcc45804228359262" + sha256 cellar: :any, monterey: "d76eeeebbdb79194bb39d0d0fe3936b2cef84defc4291a2ce7b39c2605d5ed8d" + sha256 cellar: :any_skip_relocation, arm64_linux: "394c7735ec112aa22c3963fd37f0a106671da91184545c7b3eb6f279f7cf17d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0146faec0f382d38334e44d177ce0c75c5de2b1eb042e00040c4e1cc3a401575" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "yasm" => :build + + resource "homebrew-videosample" do + url "https://samples.mplayerhq.hu/V-codecs/lm20.avi" + sha256 "a0ab512c66d276fd3932aacdd6073f9734c7e246c8747c48bf5d9dd34ac8b392" + end + + def install + system "./autogen.sh" + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + # download small sample and try to encode it + resource("homebrew-videosample").stage do + system bin/"kvazaar", "-i", "lm20.avi", "--input-res", "16x16", "-o", "lm20.hevc" + assert_path_exists Pathname.pwd/"lm20.hevc" + end + end +end diff --git a/Formula/k/kwctl.rb b/Formula/k/kwctl.rb new file mode 100644 index 0000000000000..2072e8d6b2034 --- /dev/null +++ b/Formula/k/kwctl.rb @@ -0,0 +1,89 @@ +class Kwctl < Formula + desc "CLI tool for the Kubewarden policy engine for Kubernetes" + homepage "https://www.kubewarden.io/" + url "https://github.com/kubewarden/kwctl/archive/refs/tags/v1.25.0.tar.gz" + sha256 "bcc1eb12b77d50c059353e6a78d7b4d7965cebd20bb7e6d69c7419ea1922e7d6" + license "Apache-2.0" + head "https://github.com/kubewarden/kwctl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "306ff1c2e1386cc48ff5569a1a9f7803348cfd9928c75868b4cbc1600c402f88" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4aa9af4a64641e86d1a5a3054b39fc609dff1824e6866bb367baa26fce56608b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5679c39c525e4f5c909741aba6645e4cc573bc617b535bebe27e937c6ef7b414" + sha256 cellar: :any_skip_relocation, sonoma: "f2b17fbe3cdebb992fae1602654fccfff5173ea9d7bc66a029103a7ca4dd806b" + sha256 cellar: :any_skip_relocation, ventura: "bd0824dc4e1d600722945fbff47277802af5ffffa4835ee752d341e2df0939f5" + sha256 cellar: :any_skip_relocation, arm64_linux: "23cbc4c5f71c6e9c8978e402c4f6e909361fd8698138c82e0a527348770331e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c49165293a7977e3930a5f68832b45a212eba9b94cd3215f9af3d1fab98dde89" + end + + depends_on "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + end + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"kwctl", "completions", "--shell") + end + + test do + test_policy = "ghcr.io/kubewarden/policies/safe-labels:v0.1.7" + assert_equal "kwctl #{version}", shell_output("#{bin}/kwctl --version").strip.split("\n")[0] + system bin/"kwctl", "pull", test_policy + assert_match test_policy, shell_output("#{bin}/kwctl policies") + + (testpath/"ingress.json").write <<~JSON + { + "uid": "1299d386-525b-4032-98ae-1949f69f9cfc", + "kind": { + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" + }, + "resource": { + "group": "networking.k8s.io", + "version": "v1", + "resource": "ingresses" + }, + "name": "foobar", + "operation": "CREATE", + "userInfo": { + "username": "kubernetes-admin", + "groups": [ + "system:masters", + "system:authenticated" + ] + }, + "object": { + "apiVersion": "networking.k8s.io/v1", + "kind": "Ingress", + "metadata": { + "name": "tls-example-ingress", + "labels": { + "owner": "team" + } + }, + "spec": { + } + } + } + JSON + (testpath/"policy-settings.json").write <<~JSON + { + "denied_labels": [ + "owner" + ] + } + JSON + + output = shell_output( + "#{bin}/kwctl run " \ + "registry://#{test_policy} " \ + "--request-path #{testpath}/ingress.json " \ + "--settings-path #{testpath}/policy-settings.json", + ) + assert_match "The following labels are denied: owner", output + end +end diff --git a/Formula/k/kwok.rb b/Formula/k/kwok.rb new file mode 100644 index 0000000000000..322f51d5e4675 --- /dev/null +++ b/Formula/k/kwok.rb @@ -0,0 +1,41 @@ +class Kwok < Formula + desc "Kubernetes WithOut Kubelet - Simulates thousands of Nodes and Clusters" + homepage "https://kwok.sigs.k8s.io/" + url "https://github.com/kubernetes-sigs/kwok/archive/refs/tags/v0.6.1.tar.gz" + sha256 "cb43f7574205448a7c89b53201c40db6055f1ceebf011051248f092c893fa1cb" + license "Apache-2.0" + head "https://github.com/kubernetes-sigs/kwok.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "96bf4a8c5613e2a57f32ac3929d6817a5fc4bd0f6f8bce0a6c9d397011f00362" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "967d9e8944681c9a88a17d7322d127d87a84ac1cf2c29dfe055ace293b174e64" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d09a56e0bf39b14b8bcde6a84224797d31c5b18162f563b18393ee232717442c" + sha256 cellar: :any_skip_relocation, sonoma: "22651fd3b826e95d6891b50343655997d2f1213edef8725543b7223c9260720c" + sha256 cellar: :any_skip_relocation, ventura: "41d1ff97bd7d4880746520a000bbd24027375bc25f058e6e6232baa91ffb06ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57268c303d4a0b742d35ec91665f00b1bbfff8dd53d3ae9ad82cc197ce47b1a2" + end + + depends_on "go" => :build + depends_on "docker" => :test + + def install + system "make", "build", "VERSION=v#{version}" + + arch = Hardware::CPU.arm? ? "arm64" : "amd64" + bin.install "bin/#{OS.kernel_name.downcase}/#{arch}/kwok" + bin.install "bin/#{OS.kernel_name.downcase}/#{arch}/kwokctl" + + generate_completions_from_executable("#{bin}/kwokctl", "completion") + end + + test do + ENV["DOCKER_HOST"] = "unix://#{testpath}/invalid.sock" + + assert_match version.to_s, shell_output("#{bin}/kwok --version") + assert_match version.to_s, shell_output("#{bin}/kwokctl --version") + + create_cluster_cmd = "#{bin}/kwokctl --name=brew-test create cluster 2>&1" + output = shell_output(create_cluster_cmd) + assert_match "Cluster is creating", output + end +end diff --git a/Formula/k/kyma-cli.rb b/Formula/k/kyma-cli.rb new file mode 100644 index 0000000000000..0b19cc35bb25b --- /dev/null +++ b/Formula/k/kyma-cli.rb @@ -0,0 +1,45 @@ +class KymaCli < Formula + desc "Kyma command-line interface" + homepage "https://kyma-project.io/" + url "https://github.com/kyma-project/cli/archive/refs/tags/3.0.0.tar.gz" + sha256 "b92eb18d96d4a47e581dde9fca3fc084c5d52af342a8dc6eb682a09b3e5b12ef" + license "Apache-2.0" + head "https://github.com/kyma-project/cli.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_sequoia: "4014dd109281c286199191b2b2fc55413c4693db0580a192c02cfc4a94b96594" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4014dd109281c286199191b2b2fc55413c4693db0580a192c02cfc4a94b96594" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4014dd109281c286199191b2b2fc55413c4693db0580a192c02cfc4a94b96594" + sha256 cellar: :any_skip_relocation, sonoma: "06ffb6fe90d8c3bc33e677490a6296f83aae63ac35a6656d5f2bd94ebb279a7a" + sha256 cellar: :any_skip_relocation, ventura: "06ffb6fe90d8c3bc33e677490a6296f83aae63ac35a6656d5f2bd94ebb279a7a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45737ddf5c24904e45ed8059c0fd608b43e8b58669c3a755053a2f4195c7f150" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/kyma-project/cli.v#{version.major}/internal/cmd/version.version=#{version} + ] + + system "go", "build", *std_go_args(output: bin/"kyma", ldflags:) + + generate_completions_from_executable(bin/"kyma", "completion") + end + + test do + assert_match "failed to create cluster connection", + shell_output("#{bin}/kyma alpha kubeconfig generate --token test-token --skip-extensions 2>&1", 1) + + assert_match "Kyma-CLI Version: #{version}", shell_output("#{bin}/kyma version") + end +end diff --git a/Formula/k/kyoto-cabinet.rb b/Formula/k/kyoto-cabinet.rb new file mode 100644 index 0000000000000..1e63f28d71db6 --- /dev/null +++ b/Formula/k/kyoto-cabinet.rb @@ -0,0 +1,55 @@ +class KyotoCabinet < Formula + desc "Library of routines for managing a database" + homepage "https://dbmx.net/kyotocabinet/" + url "https://dbmx.net/kyotocabinet/pkg/kyotocabinet-1.2.80.tar.gz" + sha256 "4c85d736668d82920bfdbdb92ac3d66b7db1108f09581a769dd9160a02def349" + license "GPL-3.0-or-later" + + livecheck do + url "https://dbmx.net/kyotocabinet/pkg/" + regex(/href=.*?kyotocabinet[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "e2094e4b5871b1aab91c2877eccc2be6fa719fccd3f7cbf741682d15b47b2733" + sha256 arm64_sonoma: "c7f6a7ff504412e535d711652f9dfa3a998681ce1d30339e60b56d41932b86dc" + sha256 arm64_ventura: "3f771335b64a4362f2b48aba77a2599e342725aee13c066830a713cd19dd1bcd" + sha256 arm64_monterey: "dc57e5dd4befc2604e975c32e31387b892ac9a1d328ef20d15bbc2c7020c45bd" + sha256 arm64_big_sur: "48787ff1ea4af71c49229e67fe4e147229f8bac86376f1f54057edde098020db" + sha256 sonoma: "8db7c00ff046d2cabfd2efcdf2b277cebe6006e01617ab85e8d5c9f751d60402" + sha256 ventura: "90c2584ed35710ac0d4827dd373f533e313b1c562057aa76a727d2c1d963f772" + sha256 monterey: "362b63259bb9f6d81d8320f741b8d4238cfbd1800bb7c4b1a7653abdba172bcb" + sha256 big_sur: "c6572ef13f91e704d480f0a4ad4353168160a3b8d33d05b299e97c4c9f5399b7" + sha256 arm64_linux: "d8b85343a89770b3b65f6179c3ebd12e261cf51980faf78ee4b2ae9e4edca85e" + sha256 x86_64_linux: "e5da4592e6cd893f7c1955a3d07b28e1ab97fc39ef1a41ea0550cdd4f84d3d0f" + end + + uses_from_macos "zlib" + + patch :DATA + + def install + if OS.linux? + ENV.append_to_cflags "-I#{Formula["zlib"].opt_include}" + ENV.append "LDFLAGS", "-L#{Formula["zlib"].opt_lib}" + end + ENV.cxx11 + system "./configure", *std_configure_args + system "make" # Separate steps required + system "make", "install" + end +end + + +__END__ +--- a/kccommon.h 2013-11-08 09:27:37.000000000 -0500 ++++ b/kccommon.h 2013-11-08 09:27:47.000000000 -0500 +@@ -82,7 +82,7 @@ + using ::snprintf; + } + +-#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_MSC_VER) ++#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_MSC_VER) || defined(_LIBCPP_VERSION) + + #include + #include diff --git a/Formula/k/kyoto-tycoon.rb b/Formula/k/kyoto-tycoon.rb new file mode 100644 index 0000000000000..0c1bb02ec8b9d --- /dev/null +++ b/Formula/k/kyoto-tycoon.rb @@ -0,0 +1,77 @@ +class KyotoTycoon < Formula + desc "Database server with interface to Kyoto Cabinet" + homepage "https://dbmx.net/kyototycoon/" + url "https://dbmx.net/kyototycoon/pkg/kyototycoon-0.9.56.tar.gz" + sha256 "553e4ea83237d9153cc5e17881092cefe0b224687f7ebcc406b061b2f31c75c6" + license "GPL-3.0-or-later" + revision 5 + + livecheck do + url "https://dbmx.net/kyototycoon/pkg/" + regex(/href=.*?kyototycoon[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "f3b2c1708ea58985f5d0e9e70e17d44cd80eaaade96f77b298202356bc0b493c" + sha256 arm64_sonoma: "53cb82d8fa4502c0041623ae8cfbb609b37625963c1eea87e43e48c0b0a1d4dc" + sha256 arm64_ventura: "29d41775017c933fc6c6298daf48ea1d0e6c5b7158fb323f461e42672549ccc6" + sha256 arm64_monterey: "887e108eab14901d52e4e0a8b6553bc9a4bf8dc04ae7814e0aa25da08492fec4" + sha256 arm64_big_sur: "244a150072e722f1ee861425fdfd1cb12a6a09ee27899b998b0794bd01cd1f12" + sha256 sonoma: "37f40428e931a8c134cc731d14cc0234ca4356aede7ce80629be3cf539ae15e4" + sha256 ventura: "147129037cdc09136b01f8dc8ca155c968ba9a4a9b9b0e980bc65b4df970a556" + sha256 monterey: "01ea2b5572500293e6d2be3fc51d8852a3be3e0a6a0a918f11224a39d5e0d133" + sha256 big_sur: "30c5a805f4e4f672814b210a28567424b23af490a8d9555286dae17ee41506c4" + sha256 catalina: "575c025f8a4479503833b3d90c8054ed3b67e8f4a14a96978ec585a76bbf7963" + sha256 mojave: "aafcc936bd17bade9714e200c0e713ec4cd6ddc8f38a08d258cbf09437adec75" + sha256 arm64_linux: "0e31023e2383c98b9d8bbdb65bc35613522a5c16de2e65d3bd0f2ae95d814be2" + sha256 x86_64_linux: "bb1a1af50e64ab1cf5d39182e0ea8ef10869ecf4f995fd7b6fc31969dab97c9b" + end + + depends_on "lua" => :build + depends_on "pkgconf" => :build + depends_on "kyoto-cabinet" + + uses_from_macos "zlib" + + # Build patch (submitted upstream) + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/955ce09/kyoto-tycoon/0.9.56.patch" + sha256 "7a5efe02a38e3f5c96fd5faa81d91bdd2c1d2ffeb8c3af52878af4a2eab3d830" + end + + # Homebrew-specific patch to support testing with ephemeral ports (submitted upstream) + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/9925c07/kyoto-tycoon/ephemeral-ports.patch" + sha256 "736603b28e9e7562837d0f376d89c549f74a76d31658bf7d84b57c5e66512672" + end + + def install + ENV.append_to_cflags "-fpermissive" if OS.linux? + ENV.append "CXXFLAGS", "-std=c++98" + system "./configure", "--prefix=#{prefix}", + "--with-kc=#{Formula["kyoto-cabinet"].opt_prefix}", + "--with-lua=#{Formula["lua"].opt_prefix}" + system "make" + system "make", "install" + end + + test do + (testpath/"test.lua").write <<~LUA + kt = __kyototycoon__ + db = kt.db + -- echo back the input data as the output data + function echo(inmap, outmap) + for key, value in pairs(inmap) do + outmap[key] = value + end + return kt.RVSUCCESS + end + LUA + port = free_port + + spawn bin/"ktserver", "-port", port.to_s, "-scr", testpath/"test.lua" + sleep 10 + + assert_match "Homebrew\tCool", shell_output("#{bin}/ktremotemgr script -port #{port} echo Homebrew Cool 2>&1") + end +end diff --git a/Formula/k/kytea.rb b/Formula/k/kytea.rb new file mode 100644 index 0000000000000..4763cebcd955b --- /dev/null +++ b/Formula/k/kytea.rb @@ -0,0 +1,62 @@ +class Kytea < Formula + desc "Toolkit for analyzing text, especially Japanese and Chinese" + homepage "https://www.phontron.com/kytea/" + license "Apache-2.0" + + stable do + url "https://www.phontron.com/kytea/download/kytea-0.4.7.tar.gz" + sha256 "534a33d40c4dc5421f053c71a75695c377df737169f965573175df5d2cff9f46" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + end + + livecheck do + url :homepage + regex(/href=.*?kytea[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "0afb996003e2ad0e1443b6a260fcebf6ae349022a1e082ae467bc96d77000b1f" + sha256 arm64_sonoma: "80b6a9d85ab58a17b68cf889c413a5bae57c27839ec5e77a787a2a4ae7753c71" + sha256 arm64_ventura: "ef9042105ea5b55cfc0dde6e495c287601ec8aad58d8e14342702e127a7d97dd" + sha256 arm64_monterey: "5de2fbf7e068e2c61aac03c0b672990f22280ab377d7034dc708d96b5ce76ce6" + sha256 arm64_big_sur: "e6507d77b03cee09e01eed90d0eb1c724c8acce9ffb7ad0d75a4dfc7ba434fe8" + sha256 sonoma: "e6493b3a4ba931b1ae013e07f3bb2fd642ee195eaaa31ba30a0511b3ba3e24cd" + sha256 ventura: "0ec4d5bde1d09dd1b51f2cd047b8e586b1aebadc0a8d418025f778ef68ce1c72" + sha256 monterey: "98ff434e2b5ebf881d6090accee434dd9fb6912319cd4113b34fbd59fead6e78" + sha256 big_sur: "2efc4bc6d1c77859c5012819331672e30b9e8c4491c696aac132e8356e08b483" + sha256 catalina: "927aac3d562cc2977f84670c850ab262a05a010bfe7e7f16aa0eb7d9532eae7b" + sha256 mojave: "57c8c3acf60417d44d7df27445d667dd03095f1afdad70aeb63cf68e0cbc64c0" + sha256 high_sierra: "bcdb450698d5065cf82b7726d6dc21381632c41352237dc547c05cc62e4b7e59" + sha256 sierra: "d29c61f74da5f4d88f09d8b540943599ce8b6e5062af88b7d5725ea84fb4c603" + sha256 el_capitan: "3e0c66a7efb34ddb8e4f80d9b95562779e224271b8d63d38f9bc8176103427e2" + sha256 arm64_linux: "17f10a2914f947e7ddb494eaae7e76d3d6e36887db809a894f9d824776a47aa3" + sha256 x86_64_linux: "91e9f57d0c837e62f789d7189349120d1925eca4fa05479072f89b4f617c2ffd" + end + + head do + url "https://github.com/neubig/kytea.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", *args, *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/kytea --version 2>&1") + end +end diff --git a/Formula/k/kyverno.rb b/Formula/k/kyverno.rb new file mode 100644 index 0000000000000..0030884cf3d64 --- /dev/null +++ b/Formula/k/kyverno.rb @@ -0,0 +1,46 @@ +class Kyverno < Formula + desc "Kubernetes Native Policy Management" + homepage "https://kyverno.io/" + url "https://github.com/kyverno/kyverno/archive/refs/tags/v1.14.1.tar.gz" + sha256 "e6661e8f2f2fbd547baec0af3836715a40adf5f999232d72947951b982e7daf7" + license "Apache-2.0" + head "https://github.com/kyverno/kyverno.git", branch: "main" + + # This regex is intended to match Kyverno version tags (e.g., `v1.2.3`) and + # omit unrelated tags (e.g., `helm-chart-v2.0.3`). + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9fd79bae583d821d1c544ee86ff3ca08c8fcdd527d6679afc1a97c9932810b03" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "953b3d0653e25e06bb58434786ffc9e7ed2991c0578d0da120f75d1a14d29594" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fb70f26d97ffc9698deb17da2cebcbeb7ee730ec5ee09a84c1b2b0dafe557956" + sha256 cellar: :any_skip_relocation, sonoma: "f157efa9d703915a49585a112f33c9dc10a4495799b867cdd238cd0071b5b6ae" + sha256 cellar: :any_skip_relocation, ventura: "f1308a91d03ef6c5237b0517a5984918e72d2cf22fa99b3b4a89c47b85e517b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "233d3372548328672739978736660ce743192289d0d05aa1fcca56401ed01344" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cefd0aedf72054584bcbc66eb4674d0851c7c0730f14d6017809ff6c545f8141" + end + + depends_on "go" => :build + + def install + project = "github.com/kyverno/kyverno" + ldflags = %W[ + -s -w + -X #{project}/pkg/version.BuildVersion=#{version} + -X #{project}/pkg/version.BuildHash= + -X #{project}/pkg/version.BuildTime=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:), "./cmd/cli/kubectl-kyverno" + + generate_completions_from_executable(bin/"kyverno", "completion") + end + + test do + assert_match "No test yamls available", shell_output("#{bin}/kyverno test .") + + assert_match version.to_s, shell_output("#{bin}/kyverno version") + end +end diff --git a/Formula/k3d.rb b/Formula/k3d.rb deleted file mode 100644 index 6380b9111c1e3..0000000000000 --- a/Formula/k3d.rb +++ /dev/null @@ -1,35 +0,0 @@ -class K3d < Formula - desc "Little helper to run Rancher Lab's k3s in Docker" - homepage "https://github.com/rancher/k3d" - url "https://github.com/rancher/k3d/archive/v1.7.0.tar.gz" - sha256 "e741809eb27f707c0f22c19a41ebbd6be7c20ec275285bb12bbf437a675aafb7" - license "MIT" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "3c1dd20b30c4a51347c2c01a5dc4346e4aa4ffc9162cb9f187df43d333192c28" => :catalina - sha256 "0039236f61e40518ebfc684b45a5f13aa3ac9c6da15128b7a67fb020961e1605" => :mojave - sha256 "3e63ce46a496a7fe264aa10583115f4fa5e51eaa04020ffbe1c73962fe55b755" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", - "-mod", "vendor", - "-ldflags", "-s -w -X github.com/rancher/k3d/version.Version=v#{version}", - "-trimpath", "-o", bin/"k3d" - prefix.install_metafiles - end - - test do - assert_match "k3d version v#{version}", shell_output("#{bin}/k3d --version") - code = if File.exist?("/var/run/docker.sock") - 0 - else - 1 - end - assert_match "Checking docker...", shell_output("#{bin}/k3d check-tools 2>&1", code) - end -end diff --git a/Formula/k6.rb b/Formula/k6.rb deleted file mode 100644 index 736084cedf53c..0000000000000 --- a/Formula/k6.rb +++ /dev/null @@ -1,37 +0,0 @@ -class K6 < Formula - desc "Modern load testing tool, using Go and JavaScript" - homepage "https://k6.io/" - url "https://github.com/loadimpact/k6.git", - :tag => "v0.26.2", - :revision => "459da79ef51b37e5eaba4575c9065d9e592e5c49" - license "AGPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "70f6f2d4386f07c89b1139a5d3feedeea8eba9a443ff6c9ac88b6d88d7120416" => :catalina - sha256 "6f70e79b736f65282837f018405e5a414d87cb8bcb49e7d1b852ad5d3771fece" => :mojave - sha256 "a809b4232be33515a8d5038745daac93caa94141ab8787772fd034df392378fe" => :high_sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - dir = buildpath/"src/github.com/loadimpact/k6" - dir.install buildpath.children - - cd dir do - system "dep", "ensure", "-vendor-only" - system "go", "build", "-o", bin/"k6" - prefix.install_metafiles - end - end - - test do - output = "Test finished" - assert_match output, shell_output("#{bin}/k6 run github.com/loadimpact/k6/samples/http_get.js 2>&1") - assert_match version.to_s, shell_output("#{bin}/k6 version") - end -end diff --git a/Formula/k9s.rb b/Formula/k9s.rb deleted file mode 100644 index 626ba1628b511..0000000000000 --- a/Formula/k9s.rb +++ /dev/null @@ -1,33 +0,0 @@ -class K9s < Formula - desc "Kubernetes CLI To Manage Your Clusters In Style!" - homepage "https://k9scli.io/" - url "https://github.com/derailed/k9s.git", - :tag => "v0.21.2", - :revision => "977791627860a0febb3c217a5322702da109ecbb" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "713ce4d49670c5ee47425bed9b9437d3d5fa47ad84691a38e9cdc5f73364aa7b" => :catalina - sha256 "71dc6a54bf42b169d4f1001a30fd07008ccd82907101b906af9c9c74eb8b64c1" => :mojave - sha256 "d6f54aab8f27a08e4d640e7180e42aa070816b15e82a51e13e6e4d6942fdeab2" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", - "-s -w -X github.com/derailed/k9s/cmd.version=#{version} - -X github.com/derailed/k9s/cmd.commit=#{stable.specs[:revision]}", - *std_go_args - end - - test do - # k9s consumes the Kubernetes configuration which per default is located at ~/.kube/config - # Its location can also be set with the KUBECONFIG environment variable - # Setting it to a non-existing location makes sure the test always fails as expected - ENV["KUBECONFIG"] = "testpath" - assert_equal "\e[31mBoom!! \e[0m\e[37mInvalid kubeconfig context detected.\e[0m", - shell_output("#{bin}/k9s").split("\n").pop - end -end diff --git a/Formula/kafka.rb b/Formula/kafka.rb deleted file mode 100644 index af0dcde9ab325..0000000000000 --- a/Formula/kafka.rb +++ /dev/null @@ -1,124 +0,0 @@ -class Kafka < Formula - desc "Publish-subscribe messaging rethought as a distributed commit log" - homepage "https://kafka.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=kafka/2.5.0/kafka_2.12-2.5.0.tgz" - mirror "https://archive.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz" - sha256 "4a857fe348e39d1cefa71bc4f61da9ffa59efbb1ff79d41709dc3dbca5f04baf" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "73988ab14de02fa338846206583dacadeea66585d23efbebbaf9180b8542cc29" => :catalina - sha256 "73988ab14de02fa338846206583dacadeea66585d23efbebbaf9180b8542cc29" => :mojave - sha256 "73988ab14de02fa338846206583dacadeea66585d23efbebbaf9180b8542cc29" => :high_sierra - end - - # Related to https://issues.apache.org/jira/browse/KAFKA-2034 - # Since Kafka does not currently set the source or target compability version inside build.gradle - # if you do not have Java 1.8 installed you cannot used the bottled version of Kafka - pour_bottle? do - reason "The bottle requires Java 1.8." - satisfy { quiet_system("/usr/libexec/java_home --version 1.8 --failfast") } - end - - depends_on :java => "1.8" - depends_on "zookeeper" - - conflicts_with "confluent-platform", :because => "both install identically named Kafka related executables" - - def install - data = var/"lib" - inreplace "config/server.properties", - "log.dirs=/tmp/kafka-logs", "log.dirs=#{data}/kafka-logs" - - inreplace "config/zookeeper.properties", - "dataDir=/tmp/zookeeper", "dataDir=#{data}/zookeeper" - - # remove Windows scripts - rm_rf "bin/windows" - - libexec.install "libs" - - prefix.install "bin" - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - Dir["#{bin}/*.sh"].each { |f| mv f, f.to_s.gsub(/.sh$/, "") } - - mv "config", "kafka" - etc.install "kafka" - libexec.install_symlink etc/"kafka" => "config" - - # create directory for kafka stdout+stderr output logs when run by launchd - (var+"log/kafka").mkpath - end - - plist_options :manual => "zookeeper-server-start #{HOMEBREW_PREFIX}/etc/kafka/zookeeper.properties & kafka-server-start #{HOMEBREW_PREFIX}/etc/kafka/server.properties" - - def plist - <<~EOS - - - - - Label - #{plist_name} - WorkingDirectory - #{HOMEBREW_PREFIX} - ProgramArguments - - #{opt_bin}/kafka-server-start - #{etc}/kafka/server.properties - - RunAtLoad - - KeepAlive - - StandardErrorPath - #{var}/log/kafka/kafka_output.log - StandardOutPath - #{var}/log/kafka/kafka_output.log - - - EOS - end - - test do - ENV["LOG_DIR"] = "#{testpath}/kafkalog" - - (testpath/"kafka").mkpath - cp "#{etc}/kafka/zookeeper.properties", testpath/"kafka" - cp "#{etc}/kafka/server.properties", testpath/"kafka" - inreplace "#{testpath}/kafka/zookeeper.properties", "#{var}/lib", testpath - inreplace "#{testpath}/kafka/server.properties", "#{var}/lib", testpath - - begin - fork do - exec "#{bin}/zookeeper-server-start #{testpath}/kafka/zookeeper.properties " \ - "> #{testpath}/test.zookeeper-server-start.log 2>&1" - end - - sleep 15 - - fork do - exec "#{bin}/kafka-server-start #{testpath}/kafka/server.properties " \ - "> #{testpath}/test.kafka-server-start.log 2>&1" - end - - sleep 30 - - system "#{bin}/kafka-topics --zookeeper localhost:2181 --create --if-not-exists --replication-factor 1 " \ - "--partitions 1 --topic test > #{testpath}/kafka/demo.out 2>/dev/null" - pipe_output "#{bin}/kafka-console-producer --broker-list localhost:9092 --topic test 2>/dev/null", - "test message" - system "#{bin}/kafka-console-consumer --bootstrap-server localhost:9092 --topic test --from-beginning " \ - "--max-messages 1 >> #{testpath}/kafka/demo.out 2>/dev/null" - system "#{bin}/kafka-topics --zookeeper localhost:2181 --delete --topic test >> #{testpath}/kafka/demo.out " \ - "2>/dev/null" - ensure - system "#{bin}/kafka-server-stop" - system "#{bin}/zookeeper-server-stop" - sleep 10 - end - - assert_match(/test message/, IO.read("#{testpath}/kafka/demo.out")) - end -end diff --git a/Formula/kafkacat.rb b/Formula/kafkacat.rb deleted file mode 100644 index d9713ec4a4cc1..0000000000000 --- a/Formula/kafkacat.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Kafkacat < Formula - desc "Generic command-line non-JVM Apache Kafka producer and consumer" - homepage "https://github.com/edenhill/kafkacat" - url "https://github.com/edenhill/kafkacat.git", - :tag => "1.5.0", - :revision => "3b4bcf00d322533c374e226f2a4eb16501e8a441" - - bottle do - cellar :any - rebuild 2 - sha256 "af4674858fa32d4c39346018f441609647f35071ef9d7615f214ad47594e1b6f" => :catalina - sha256 "169186d382345c58af1a3a616493ce305f7abb808420ac95a8230e9bcbcec2d9" => :mojave - sha256 "60bca6aa0aae36980bcd917cb0ff1b042d7cb3317c5e6e6446488c25ac1edf29" => :high_sierra - end - - depends_on "avro-c" - depends_on "librdkafka" - depends_on "libserdes" - depends_on "yajl" - - def install - system "./configure", "--prefix=#{prefix}", - "--enable-json", - "--enable-avro" - system "make" - system "make", "install" - end - - test do - system bin/"kafkacat", "-X", "list" - end -end diff --git a/Formula/kahip.rb b/Formula/kahip.rb deleted file mode 100644 index 3ffe0dc698dc4..0000000000000 --- a/Formula/kahip.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Kahip < Formula - desc "Karlsruhe High Quality Partitioning" - homepage "https://algo2.iti.kit.edu/documents/kahip/index.html" - url "https://algo2.iti.kit.edu/schulz/software_releases/KaHIP_2.12.tar.gz" - sha256 "b91abdbf9420e2691ed73cea999630e38dfaf0e03157c7a690a998564c652aac" - revision 1 - - bottle do - cellar :any - sha256 "a05c9bfbd38225e3730e10756f1515d833f09f61eccd7745c55dd8b78690b790" => :catalina - sha256 "57e35f0a81e0d22f9d8d4438994efcc30295e54865525ba89236f58647f66174" => :mojave - sha256 "78fda0b177b22dc65d0d9b5116dc842aa023cb027afccd4c2f968f42ac55fada" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "gcc" - depends_on "open-mpi" - - def install - ENV["CC"] = Formula["gcc"].opt_bin/"gcc-#{Formula["gcc"].version_suffix}" - ENV["CXX"] = Formula["gcc"].opt_bin/"g++-#{Formula["gcc"].version_suffix}" - mkdir "build" do - system "cmake", *std_cmake_args, ".." - system "make", "install" - end - end - - test do - output = shell_output("#{bin}/interface_test") - assert_match "edge cut 2", output - end -end diff --git a/Formula/kaitai-struct-compiler.rb b/Formula/kaitai-struct-compiler.rb deleted file mode 100644 index 0a149af465e36..0000000000000 --- a/Formula/kaitai-struct-compiler.rb +++ /dev/null @@ -1,31 +0,0 @@ -class KaitaiStructCompiler < Formula - desc "Compiler for generating binary data parsers" - homepage "https://kaitai.io/" - url "https://bintray.com/artifact/download/kaitai-io/universal/0.8/kaitai-struct-compiler-0.8.zip" - sha256 "545fc10e134db2901cad8817be1b440fca6f2bad8b92b2948ebe0647f3ffa2c9" - revision 2 - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"] - (bin/"kaitai-struct-compiler").write_env_script libexec/"bin/kaitai-struct-compiler", - :JAVA_HOME => Formula["openjdk"].opt_prefix - end - - test do - (testpath/"Test.ksy").write <<~EOS - meta: - id: test - endian: le - file-extension: test - seq: - - id: header - type: u4 - EOS - system bin/"kaitai-struct-compiler", "Test.ksy", "-t", "java", "--outdir", testpath - assert_predicate testpath/"src/Test.java", :exist? - end -end diff --git a/Formula/kakasi.rb b/Formula/kakasi.rb deleted file mode 100644 index 67a31ba5b3506..0000000000000 --- a/Formula/kakasi.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Kakasi < Formula - desc "Convert Kanji characters to Hiragana, Katakana, or Romaji" - homepage "http://kakasi.namazu.org/" - url "http://kakasi.namazu.org/stable/kakasi-2.3.6.tar.gz" - sha256 "004276fd5619c003f514822d82d14ae83cd45fb9338e0cb56a44974b44961893" - - bottle do - rebuild 1 - sha256 "e6b0a1d2bc6f7796cce6b66ab84dce9fbca176a9f266e9e1c3784b85c9665f2c" => :catalina - sha256 "01b3ca16f856fce7cd71cc752b083589f8267ecc3b44bd6b5800cd1a53cb7700" => :mojave - sha256 "4ac657051323e642a248aaa4cdf7bc464374e0901bf0b87f458e89b0c3233f76" => :high_sierra - sha256 "a50761a65d9b64f65d81b6045e992dbfb99746815433f7fc187b43bb0aa36f85" => :sierra - sha256 "7fca04e65ce14fa8d18d19e197525063274057a2760e4841d4e8a9b06f4b0fa3" => :el_capitan - sha256 "da407c10d807cf72679df6555d29b53f388dd32abf674f1ae0ecbace44fc3372" => :yosemite - sha256 "86403b2e2a45e2ea81b78bbe7edc7bf2b01d464f351ea265441413e63bf85822" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - hiragana = "\xa4\xa2 \xa4\xab \xa4\xb5" - romanji = pipe_output("#{bin}/kakasi -rh -ieuc -Ha", hiragana).chomp - assert_equal "a ka sa", romanji - end -end diff --git a/Formula/kakoune.rb b/Formula/kakoune.rb deleted file mode 100644 index 1c0255c23f195..0000000000000 --- a/Formula/kakoune.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Kakoune < Formula - desc "Selection-based modal text editor" - homepage "https://github.com/mawww/kakoune" - url "https://github.com/mawww/kakoune/releases/download/v2020.01.16/kakoune-2020.01.16.tar.bz2" - sha256 "a094f1689f0228308f631e371b382b0c0522391fc8b6c23a6cbc71ff404a0dae" - license "Unlicense" - revision 1 - head "https://github.com/mawww/kakoune.git" - - bottle do - cellar :any - sha256 "4190698871db5696c3dbbdcca4c15d26ed8858451db4e0a4ddb8a10fff71afab" => :catalina - sha256 "c62c3102bbed733f1f00ed64fafa1f07353b78d59f1a35e7a1746d2e35bc698c" => :mojave - sha256 "7fc5a7b69fe56f47b24a2e4c1074319963e3b7c0a0c92f3c0d0688f57eb2a278" => :high_sierra - end - - depends_on :macos => :high_sierra # needs C++17 - depends_on "ncurses" - - def install - cd "src" do - system "make", "install", "debug=no", "PREFIX=#{prefix}" - end - end - - test do - system bin/"kak", "-ui", "dummy", "-e", "q" - end -end diff --git a/Formula/kallisto.rb b/Formula/kallisto.rb deleted file mode 100644 index f3fdb8e70931c..0000000000000 --- a/Formula/kallisto.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Kallisto < Formula - desc "Quantify abundances of transcripts from RNA-Seq data" - homepage "https://pachterlab.github.io/kallisto/" - url "https://github.com/pachterlab/kallisto/archive/v0.46.2.tar.gz" - sha256 "c447ca8ddc40fcbd7d877d7c868bc8b72807aa8823a8a8d659e19bdd515baaf2" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "7ef1f941663072b0a57597992acf8203ba3664129f305cb8626c0c346e51bf0c" => :catalina - sha256 "b2e59c1cc0fc1b07d02bab1cbc1533bcca1edf4bc0b81791d5ac597a7b84cce0" => :mojave - sha256 "8491424ec8d4f8e170315e13c5f3bb92895b608c9c7108f260459e06bbbf73f9" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "cmake" => :build - depends_on "hdf5" - - def install - # Upstream issue 15 Feb 2018 "cmake does not run autoreconf for htslib" - # https://github.com/pachterlab/kallisto/issues/159 - system "autoreconf", "-fiv", "ext/htslib" - - system "cmake", ".", *std_cmake_args - - # Upstream issue 15 Feb 2018 "parallelized build failure" - # https://github.com/pachterlab/kallisto/issues/160 - # Upstream issue 15 Feb 2018 "cannot use system htslib" - # https://github.com/pachterlab/kallisto/issues/161 - system "make", "htslib" - - system "make", "install" - end - - test do - (testpath/"test.fasta").write <<~EOS - >seq0 - FQTWEEFSRAAEKLYLADPMKVRVVLKYRHVDGNLCIKVTDDLVCLVYRTDQAQDVKKIEKF - EOS - output = shell_output("#{bin}/kallisto index -i test.index test.fasta 2>&1") - assert_match "has 1 contigs and contains 32 k-mers", output - end -end diff --git a/Formula/kamel.rb b/Formula/kamel.rb deleted file mode 100644 index 121c2f325620e..0000000000000 --- a/Formula/kamel.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Kamel < Formula - desc "Apache Camel K CLI" - homepage "https://camel.apache.org/" - - url "https://github.com/apache/camel-k.git", - :tag => "1.0.1", - :revision => "21b88a3bfc07ae9fd9ff5f129ce3a22f1dfc5318" - license "Apache-2.0" - head "https://github.com/apache/camel-k.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "01164390550da7b036a9cd497ad88586e27d5a3aaffb6fd334e4218316c02ea0" => :catalina - sha256 "34c301e095a815674dc5ef55a0c43a5b57b3d3d8d81cb10172c0099eb56a7431" => :mojave - sha256 "1c56fdfed7981d65a67690ebc188959b920c17acc31dcbabf484d576937a149c" => :high_sierra - end - - depends_on "go" => :build - depends_on "openjdk" => :build - - def install - system "make" - bin.install "kamel" - - prefix.install_metafiles - - output = Utils.safe_popen_read("#{bin}/kamel", "completion", "bash") - (bash_completion/"kamel").write output - - output = Utils.safe_popen_read("#{bin}/kamel", "completion", "zsh") - (zsh_completion/"_kamel").write output - end - - test do - run_output = shell_output("#{bin}/kamel 2>&1") - assert_match "Apache Camel K is a lightweight", run_output - - help_output = shell_output("echo $(#{bin}/kamel help 2>&1)") - assert_match "Error: cannot get command client: could not locate a kubeconfig", help_output.chomp - - get_output = shell_output("echo $(#{bin}/kamel get 2>&1)") - assert_match "Error: cannot get command client: could not locate a kubeconfig", get_output - - version_output = shell_output("echo $(#{bin}/kamel version 2>&1)") - assert_match version.to_s, version_output - - run_output = shell_output("echo $(#{bin}/kamel run 2>&1)") - assert_match "Error: run expects at least 1 argument, received 0", run_output - - run_none_output = shell_output("echo $(#{bin}/kamel run None.java 2>&1)") - assert_match "Error: cannot read file None.java: open None.java: no such file or directory", run_none_output - - reset_output = shell_output("echo $(#{bin}/kamel reset 2>&1)") - assert_match "Error: cannot get command client: could not locate a kubeconfig", reset_output - - rebuild_output = shell_output("echo $(#{bin}/kamel rebuild 2>&1)") - assert_match "Config not found", rebuild_output - - reset_output = shell_output("echo $(#{bin}/kamel reset 2>&1)") - assert_match "Config not found", reset_output - end -end diff --git a/Formula/kanif.rb b/Formula/kanif.rb deleted file mode 100644 index ab26b1311c5b4..0000000000000 --- a/Formula/kanif.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Kanif < Formula - desc "Cluster management and administration tool" - homepage "http://taktuk.gforge.inria.fr/kanif/" - url "https://gforge.inria.fr/frs/download.php/26773/kanif-1.2.2.tar.gz" - sha256 "3f0c549428dfe88457c1db293cfac2a22b203f872904c3abf372651ac12e5879" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e69f751ab52a8f0892e452bcd3e2e43df27a94cd5e3a5b8cc972529758e0ebf0" => :catalina - sha256 "4de62a3ee570ed87d4a6c5ec559e901323bfc333e67714b618f9bafc9eb6b6e9" => :mojave - sha256 "adcf3a42f6db8afb8011bbc0e5bcae234ad1d218b0f3b9a0ea884ff6499ab4f0" => :high_sierra - sha256 "8a89062ef7794743c32bc611c1969f42941af573c8dd9973abee7d4255293df1" => :sierra - sha256 "ebe67d82aa8745a8ff29a82b9520e0fb4892a9645e17a12e8aeae4fda96cc8b4" => :el_capitan - sha256 "7fc9517feb23867afe77730cdf28bb386570ccb5368d3b0c6b396214abf07e69" => :yosemite - sha256 "3c003b7621fdef7d8451c3bab928e5b7bb0db0ff1fbe2c5d83b160a021ef93e6" => :mavericks - end - - depends_on "taktuk" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "taktuk -s -c 'ssh' -l brew", - shell_output("#{bin}/kash -q -l brew -r ssh") - end -end diff --git a/Formula/kapacitor.rb b/Formula/kapacitor.rb deleted file mode 100644 index f8911164c30d8..0000000000000 --- a/Formula/kapacitor.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Kapacitor < Formula - desc "Open source time series data processor" - homepage "https://github.com/influxdata/kapacitor" - url "https://github.com/influxdata/kapacitor.git", - :tag => "v1.5.5", - :revision => "71a67c40348a8dfdad3f76d4c699ff8ef938da2b" - head "https://github.com/influxdata/kapacitor.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "9cf1f89971eb2ff7b016229515a46a311caeb7dbb0ee2d169b8213681e9a6559" => :catalina - sha256 "194c1ec63fcb673233ba211cbe3a3f18edfe55427495c4bf4087b4fa1b23cd6c" => :mojave - sha256 "d0156fd04235ac01d286a9acc929bbcf627ab1f46be675f743054c6808b8e713" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - kapacitor_path = buildpath/"src/github.com/influxdata/kapacitor" - kapacitor_path.install Dir["*"] - revision = Utils.safe_popen_read("git", "rev-parse", "HEAD").strip - version = Utils.safe_popen_read("git", "describe", "--tags").strip - - cd kapacitor_path do - system "go", "install", - "-ldflags", "-X main.version=#{version} -X main.commit=#{revision}", - "./cmd/..." - end - - inreplace kapacitor_path/"etc/kapacitor/kapacitor.conf" do |s| - s.gsub! "/var/lib/kapacitor", "#{var}/kapacitor" - s.gsub! "/var/log/kapacitor", "#{var}/log" - end - - bin.install "bin/kapacitord" - bin.install "bin/kapacitor" - etc.install kapacitor_path/"etc/kapacitor/kapacitor.conf" => "kapacitor.conf" - - (var/"kapacitor/replay").mkpath - (var/"kapacitor/tasks").mkpath - end - - plist_options :manual => "kapacitord -config #{HOMEBREW_PREFIX}/etc/kapacitor.conf" - - def plist - <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/kapacitord - -config - #{HOMEBREW_PREFIX}/etc/kapacitor.conf - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/kapacitor.log - StandardOutPath - #{var}/log/kapacitor.log - - - EOS - end - - test do - (testpath/"config.toml").write shell_output("#{bin}/kapacitord config") - - inreplace testpath/"config.toml" do |s| - s.gsub! /disable-subscriptions = false/, "disable-subscriptions = true" - s.gsub! %r{data_dir = "/.*/.kapacitor"}, "data_dir = \"#{testpath}/kapacitor\"" - s.gsub! %r{/.*/.kapacitor/replay}, "#{testpath}/kapacitor/replay" - s.gsub! %r{/.*/.kapacitor/tasks}, "#{testpath}/kapacitor/tasks" - s.gsub! %r{/.*/.kapacitor/kapacitor.db}, "#{testpath}/kapacitor/kapacitor.db" - end - - begin - pid = fork do - exec "#{bin}/kapacitord -config #{testpath}/config.toml" - end - sleep 2 - shell_output("#{bin}/kapacitor list tasks") - ensure - Process.kill("SIGINT", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/karn.rb b/Formula/karn.rb deleted file mode 100644 index 75ca30cd75c94..0000000000000 --- a/Formula/karn.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Karn < Formula - desc "Manage multiple Git identities" - homepage "https://github.com/prydonius/karn" - url "https://github.com/prydonius/karn/archive/v0.0.4.tar.gz" - sha256 "68d244558ef62cf1da2b87927a0a2fbf907247cdd770fc8c84bf72057195a6cb" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "dbe143cddeeb74fa8cbac57f8f28f9280ce6ba554fe00d02b44f68316a229710" => :catalina - sha256 "3a353fc809699b904cdbc845138518fddabfac7250b22d68a47f9ecdd98de967" => :mojave - sha256 "a837fd65265db402d67fda5ff5bb4337822d1efd945bee56f7a664e6bc67c343" => :high_sierra - sha256 "0b29500ed8d75753402ea041190021d679624b739665b3a4d11df3d4a3100e59" => :sierra - sha256 "bc217bf56d073ffabd11c81382387029aa09d216ef8060b3134a6190997ef0f5" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/prydonius/karn").install buildpath.children - - cd "src/github.com/prydonius/karn" do - system "go", "build", "-o", bin/"karn", "./cmd/karn/karn.go" - prefix.install_metafiles - end - end - - test do - (testpath/".karn.yml").write <<~EOS - --- - #{testpath}: - name: Homebrew Test - email: test@brew.sh - EOS - system "git", "init" - system "git", "config", "--global", "user.name", "Test" - system "git", "config", "--global", "user.email", "test@test.com" - system "#{bin}/karn", "update" - end -end diff --git a/Formula/katago.rb b/Formula/katago.rb deleted file mode 100644 index e272ffbfad6f0..0000000000000 --- a/Formula/katago.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Katago < Formula - desc "Neural Network Go engine with no human-provided knowledge" - homepage "https://github.com/lightvector/KataGo" - url "https://github.com/lightvector/KataGo/archive/v1.4.5.tar.gz" - sha256 "6d29ed8acb45bc4b1b0f39a9a3212f94708d3e2770642aefc3e3dfcf332e8c78" - - bottle do - cellar :any - sha256 "c45535348f0a10f88414dc1e99e43b4c6e62534a790d2deb0422ecc52178eb9f" => :catalina - sha256 "813b95e5bd6e1e1828e4624daab8ef63fdb3f610fda611b5f6406c3d7e44d78d" => :mojave - sha256 "8fbf9ccd531dcc1ba21b01259a50f3c11de9dc586e80191637b903ab598143b5" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "libzip" - - resource "20b-network" do - url "https://github.com/lightvector/KataGo/releases/download/v1.4.0/g170-b20c256x2-s4384473088-d968438914.bin.gz", :using => :nounzip - sha256 "da070fddb45e4d798a63b0be1960d604ad422690d82ac66b1d4ee41e8bf42536" - end - - resource "30b-network" do - url "https://github.com/lightvector/KataGo/releases/download/v1.4.0/g170-b30c320x2-s3530176512-d968463914.bin.gz", :using => :nounzip - sha256 "67bd8f67a0ed251d78626ccd23cd4cdbcc880ffc29b641f65cf79ec9d9be83e5" - end - - resource "40b-network" do - url "https://github.com/lightvector/KataGo/releases/download/v1.4.0/g170-b40c256x2-s3708042240-d967973220.bin.gz", :using => :nounzip - sha256 "9053c1f0f7834533b34556d3454fe0de8736d5951a2fe5d02c3aebd3fc20240e" - end - - def install - cd "cpp" do - system "cmake", ".", "-DBUILD_MCTS=1", "-DUSE_BACKEND=OPENCL", "-DNO_GIT_REVISION=1", - "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_path}", *std_cmake_args - system "make" - bin.install "katago" - pkgshare.install "configs" - end - pkgshare.install resource("20b-network") - pkgshare.install resource("30b-network") - pkgshare.install resource("40b-network") - end - - test do - system "#{bin}/katago", "version" - assert_match /All tests passed$/, shell_output("#{bin}/katago runtests").strip - end -end diff --git a/Formula/kawa.rb b/Formula/kawa.rb deleted file mode 100644 index 1f5021227849b..0000000000000 --- a/Formula/kawa.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Kawa < Formula - desc "Programming language for Java (implementation of Scheme)" - homepage "https://www.gnu.org/software/kawa/" - url "https://ftp.gnu.org/gnu/kawa/kawa-3.1.1.zip" - mirror "https://ftpmirror.gnu.org/kawa/kawa-3.1.1.zip" - sha256 "dab1f41da968191fc68be856f133e3d02ce65d2dbd577a27e0490f18ca00fa22" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - rm Dir["bin/*.bat"] - inreplace "bin/kawa", "thisfile=`command -v $0`", - "thisfile=#{libexec}/bin/kawa" - libexec.install "bin", "lib" - (bin/"kawa").write_env_script libexec/"bin/kawa", :JAVA_HOME => Formula["openjdk"].opt_prefix - doc.install Dir["doc/*"] - end - - test do - system bin/"kawa", "-e", "(import (srfi 1))" - end -end diff --git a/Formula/kcov.rb b/Formula/kcov.rb deleted file mode 100644 index 149e9071b38d1..0000000000000 --- a/Formula/kcov.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Kcov < Formula - desc "Code coverage tester for compiled programs, Python, and shell scripts" - homepage "https://simonkagstrom.github.io/kcov/" - url "https://github.com/SimonKagstrom/kcov/archive/38.tar.gz" - sha256 "b37af60d81a9b1e3b140f9473bdcb7975af12040feb24cc666f9bb2bb0be68b4" - head "https://github.com/SimonKagstrom/kcov.git" - - bottle do - cellar :any_skip_relocation - sha256 "7a3af28e85c85c6f1dc684086884c724dfdbcf72efca48add536c5dd08bda4c0" => :catalina - sha256 "833750a5d75e99a392010b305841daca6d0007e5a9b2ccd2ab5d54f18c01b6ad" => :mojave - sha256 "e5c6cc5b5ed21b5609107cb80ac67dec4ffc9b9227e272464b9eeade66932bd3" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on :macos # Due to Python 2 - - def install - mkdir "build" do - system "cmake", "-DSPECIFY_RPATH=ON", *std_cmake_args, ".." - system "make" - system "make", "install" - end - end - - test do - (testpath/"hello.bash").write <<~EOS - #!/bin/bash - echo "Hello, world!" - EOS - system "#{bin}/kcov", testpath/"out", testpath/"hello.bash" - assert_predicate testpath/"out/hello.bash/coverage.json", :exist? - end -end diff --git a/Formula/kcptun.rb b/Formula/kcptun.rb deleted file mode 100644 index 2d59edeee6def..0000000000000 --- a/Formula/kcptun.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Kcptun < Formula - desc "Stable & Secure Tunnel based on KCP with N:M multiplexing and FEC" - homepage "https://github.com/xtaci/kcptun" - url "https://github.com/xtaci/kcptun/archive/v20200701.tar.gz" - sha256 "d5b2d212c6806f1c4eba5fbce8797734eaa8ae0f8cdd90dd06d0844392888ff0" - license "MIT" - head "https://github.com/xtaci/kcptun.git" - - bottle do - cellar :any_skip_relocation - sha256 "6b2353c5753b2266b6dc9cbdfe8f4bc9266b299f1bcf2fea100b8276fa2c4074" => :catalina - sha256 "e5fb829f053fd71f14b8f290fabd22f87fd6961be01f1feb75df2c43c6753150" => :mojave - sha256 "872b2cc7078e268c38a78ed3e98cc7d6b201426584f57f11ee7c231cdcbdfe16" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-X main.VERSION=#{version} -s -w", - "-o", bin/"kcptun_client", "github.com/xtaci/kcptun/client" - system "go", "build", "-ldflags", "-X main.VERSION=#{version} -s -w", - "-o", bin/"kcptun_server", "github.com/xtaci/kcptun/server" - - etc.install "examples/local.json" => "kcptun_client.json" - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/kcptun/bin/kcptun_client -c #{HOMEBREW_PREFIX}/etc/kcptun_client.json" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/kcptun_client - -c - #{etc}/kcptun_client.json - - RunAtLoad - - KeepAlive - - Crashed - - SuccessfulExit - - - ProcessType - Background - StandardErrorPath - #{var}/log/kcptun.log - StandardOutPath - #{var}/log/kcptun.log - - - EOS - end - - test do - server = fork { exec bin/"kcptun_server", "-t", "1.1.1.1:80" } - client = fork { exec bin/"kcptun_client", "-r", "127.0.0.1:29900", "-l", ":12948" } - sleep 1 - begin - assert_match "cloudflare", shell_output("curl -vI http://127.0.0.1:12948/") - ensure - Process.kill 9, server - Process.wait server - Process.kill 9, client - Process.wait client - end - end -end diff --git a/Formula/kde-extra-cmake-modules.rb b/Formula/kde-extra-cmake-modules.rb deleted file mode 100644 index 6ab940f486522..0000000000000 --- a/Formula/kde-extra-cmake-modules.rb +++ /dev/null @@ -1,37 +0,0 @@ -class KdeExtraCmakeModules < Formula - desc "Extra modules and scripts for CMake" - homepage "https://api.kde.org/frameworks/extra-cmake-modules/html/index.html" - url "https://download.kde.org/stable/frameworks/5.71/extra-cmake-modules-5.71.0.tar.xz" - sha256 "64f41c0b4b3164c7be8fcab5c0181253d97d1e9d62455fd540cb463afd051878" - head "https://invent.kde.org/frameworks/extra-cmake-modules.git" - - bottle do - cellar :any_skip_relocation - sha256 "e6fd8d26ecc86d032459031b2216c8d7f6f9cab439082d83bc8a2c45c16207ad" => :catalina - sha256 "1be9e7b07aa5287cf1aad620e68fb4d3a751eaa745e486df7583ae906ac1fbe5" => :mojave - sha256 "1be9e7b07aa5287cf1aad620e68fb4d3a751eaa745e486df7583ae906ac1fbe5" => :high_sierra - end - - depends_on "cmake" => [:build, :test] - depends_on "qt" => :build - depends_on "sphinx-doc" => :build - - def install - args = std_cmake_args - args << "-DBUILD_HTML_DOCS=ON" - args << "-DBUILD_MAN_DOCS=ON" - args << "-DBUILD_QTHELP_DOCS=ON" - args << "-DBUILD_TESTING=OFF" - - system "cmake", ".", *args - system "make", "install" - end - - test do - (testpath/"CMakeLists.txt").write("find_package(ECM REQUIRED)") - system "cmake", ".", "-Wno-dev" - - expected="ECM_DIR:PATH=#{HOMEBREW_PREFIX}/share/ECM/cmake" - assert_match expected, File.read(testpath/"CMakeCache.txt") - end -end diff --git a/Formula/kde-karchive.rb b/Formula/kde-karchive.rb deleted file mode 100644 index bb7aed072b25b..0000000000000 --- a/Formula/kde-karchive.rb +++ /dev/null @@ -1,52 +0,0 @@ -class KdeKarchive < Formula - desc "Reading, creating, and manipulating file archives" - homepage "https://api.kde.org/frameworks/karchive/html/index.html" - url "https://download.kde.org/stable/frameworks/5.71/karchive-5.71.0.tar.xz" - sha256 "cc81e856365dec2bcf3ec78aa01d42347ca390a2311ea12050f309dfbdb09624" - head "https://invent.kde.org/frameworks/karchive.git" - - bottle do - sha256 "fcaac3ae2d0a0e3913655045d10bd67cfda22b75cb614ca5e2489f6279a0ef1e" => :catalina - sha256 "05298d1069248c3d538d0281b671e4eb6a5d33bacc7129f94248fa7ee9b10f86" => :mojave - sha256 "25eb5f0d49e82b034040b70ec209ce10fbf19825d4f0960795127cb5e96b3522" => :high_sierra - end - - depends_on "cmake" => [:build, :test] - depends_on "doxygen" => :build - depends_on "graphviz" => :build - depends_on "kde-extra-cmake-modules" => [:build, :test] - - depends_on "qt" - depends_on "xz" - - uses_from_macos "bzip2" - uses_from_macos "zlib" - - def install - args = std_cmake_args - args << "-DBUILD_TESTING=OFF" - args << "-DBUILD_QCH=ON" - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - - pkgshare.install "examples" - end - - test do - args = std_cmake_args - args << "-DQt5Core_DIR=#{Formula["qt"].opt_prefix/"lib/cmake/Qt5Core"}" - - %w[bzip2gzip - helloworld - tarlocalfiles - unzipper].each do |test_name| - mkdir test_name.to_s do - system "cmake", (pkgshare/"examples/#{test_name}"), *args - system "make" - end - end - end -end diff --git a/Formula/kde-kdoctools.rb b/Formula/kde-kdoctools.rb deleted file mode 100644 index ad48b8c1dfbf3..0000000000000 --- a/Formula/kde-kdoctools.rb +++ /dev/null @@ -1,96 +0,0 @@ -class KdeKdoctools < Formula - desc "Create documentation from DocBook" - homepage "https://api.kde.org/frameworks/kdoctools/html/index.html" - url "https://download.kde.org/stable/frameworks/5.71/kdoctools-5.71.0.tar.xz" - sha256 "1e2fcaa97a014e82f68c0c36591ce84568ead7abd59b66e534789103e162cd09" - head "https://invent.kde.org/frameworks/kdoctools.git" - - bottle do - sha256 "6b636f850e020efd10cb8fe21f664a7b48f8272cc4a8a8bc5f80332b28137e0b" => :catalina - sha256 "58a392e5aa24c73a9bb2a13ea85acc6bb5b32299082406f21b43c70bd92b9ba7" => :mojave - sha256 "cfcced0c94a18793e000f91c120fcc2b4a2661bb10c83210104d0a0d188aa368" => :high_sierra - end - - depends_on "cmake" => [:build, :test] - depends_on "docbook-xsl" => [:build, :test] - depends_on "doxygen" => :build - depends_on "gettext" => :build - depends_on "kde-extra-cmake-modules" => [:build, :test] - depends_on "kde-ki18n" => :build - - depends_on "kde-karchive" - - uses_from_macos "libxml2" - uses_from_macos "libxslt" - uses_from_macos "perl" - - resource "URI::Escape" do - url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-1.76.tar.gz" - sha256 "b2c98e1d50d6f572483ee538a6f4ccc8d9185f91f0073fd8af7390898254413e" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - ENV.prepend_path "PERL5LIB", libexec/"lib" - - resource("URI::Escape").stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make", "install" - end - - args = std_cmake_args - args << "-DBUILD_TESTING=OFF" - args << "-DBUILD_QCH=ON" - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - - pkgshare.install ["cmake", "autotests", "tests"] - end - - test do - (testpath/"CMakeLists.txt").write <<~EOS - cmake_minimum_required(VERSION 3.5) - include(FeatureSummary) - find_package(ECM 5.71.0 NO_MODULE) - set_package_properties(ECM PROPERTIES TYPE REQUIRED) - set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "#{pkgshare}/cmake") - find_package(Qt5 5.12.0 REQUIRED Core) - find_package(KF5DocTools REQUIRED) - - find_package(LibXslt) - set_package_properties(LibXslt PROPERTIES TYPE REQUIRED) - - find_package(LibXml2) - set_package_properties(LibXml2 PROPERTIES TYPE REQUIRED) - - if (NOT LIBXML2_XMLLINT_EXECUTABLE) - message(FATAL_ERROR "xmllint is required to process DocBook XML") - endif() - - find_package(DocBookXML4 "4.5") - set_package_properties(DocBookXML4 PROPERTIES TYPE REQUIRED) - - find_package(DocBookXSL) - set_package_properties(DocBookXSL PROPERTIES TYPE REQUIRED) - - remove_definitions(-DQT_NO_CAST_FROM_ASCII) - add_definitions(-DQT_NO_FOREACH) - - add_subdirectory(autotests) - add_subdirectory(tests/create-from-current-dir-test) - add_subdirectory(tests/kdoctools_install-test) - EOS - - cp_r (pkgshare/"autotests"), testpath - cp_r (pkgshare/"tests"), testpath - - args = std_cmake_args - args << "-DQt5_DIR=#{Formula["qt"].opt_prefix/"lib/cmake/Qt5"}" - - system "cmake", testpath.to_s, *args - system "make" - end -end diff --git a/Formula/kde-ki18n.rb b/Formula/kde-ki18n.rb deleted file mode 100644 index 6e3d519965df3..0000000000000 --- a/Formula/kde-ki18n.rb +++ /dev/null @@ -1,60 +0,0 @@ -class KdeKi18n < Formula - desc "KDE Gettext-based UI text internationalization" - homepage "https://api.kde.org/frameworks/ki18n/html/index.html" - url "https://download.kde.org/stable/frameworks/5.71/ki18n-5.71.0.tar.xz" - sha256 "f2fc8c40c10576da8b74070b7dc8e752fdd04204cb2bfe522f37a0458fbaf881" - head "https://invent.kde.org/frameworks/ki18n.git" - - bottle do - sha256 "16899d7c7150e4a75c32651410c54b27fe94fcdbcbf36d4158e64f8e5fc522ff" => :catalina - sha256 "9d232a966808e5bebddc00819eece8f8e779aec8419589acb48c636eba56ca2c" => :mojave - sha256 "939d483a02fd119a3baa75e2218f96f539aacc6c620aa1870282255ca22677f0" => :high_sierra - end - - depends_on "cmake" => [:build, :test] - depends_on "doxygen" => :build - depends_on "graphviz" => :build - depends_on "kde-extra-cmake-modules" => [:build, :test] - depends_on "gettext" - depends_on "qt" - - def install - args = std_cmake_args - args << "-DBUILD_TESTING=OFF" - args << "-DBUILD_QCH=ON" - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - - pkgshare.install "autotests" - (pkgshare/"cmake").install "cmake/FindLibIntl.cmake" - end - - test do - (testpath/"CMakeLists.txt").write <<~EOS - cmake_minimum_required(VERSION 3.5) - include(FeatureSummary) - find_package(ECM 5.71.0 NO_MODULE) - set_package_properties(ECM PROPERTIES TYPE REQUIRED) - set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "#{pkgshare}/cmake") - find_package(Qt5 5.12.0 REQUIRED Core) - find_package(KF5I18n REQUIRED) - INCLUDE(CheckCXXSourceCompiles) - find_package(LibIntl) - set_package_properties(LibIntl PROPERTIES TYPE REQUIRED) - add_subdirectory(autotests) - EOS - - cp_r (pkgshare/"autotests"), testpath - - args = std_cmake_args - args << "-DQt5_DIR=#{Formula["qt"].opt_prefix/"lib/cmake/Qt5"}" - args << "-DLibIntl_INCLUDE_DIRS=#{Formula["gettext"].include}" - args << "-DLibIntl_LIBRARIES=#{Formula["gettext"].lib/"libintl.dylib"}" - - system "cmake", testpath.to_s, *args - system "make" - end -end diff --git a/Formula/kde-threadweaver.rb b/Formula/kde-threadweaver.rb deleted file mode 100644 index eb7fe847e020c..0000000000000 --- a/Formula/kde-threadweaver.rb +++ /dev/null @@ -1,40 +0,0 @@ -class KdeThreadweaver < Formula - desc "Helper for multithreaded programming" - homepage "https://api.kde.org/frameworks/threadweaver/html/index.html" - url "https://download.kde.org/stable/frameworks/5.71/threadweaver-5.71.0.tar.xz" - sha256 "039e73d70f38af38a63235cfb554111ee0d58a6ac168bff0745f0d029c5c528d" - head "https://invent.kde.org/frameworks/threadweaver.git" - - bottle do - sha256 "87579bb26c763b47653d130f43f5c4d8f9ea0978542f4876eda324b453a38abf" => :catalina - sha256 "1370c4617d49a84e6614ffc1b388cf3bf27f128b939002c3f6d4b45176f137b7" => :mojave - sha256 "0cae32c5ea529e53f14898571c63198a77f3b480d12ca1135c5cc3e93952c2aa" => :high_sierra - end - - depends_on "cmake" => [:build, :test] - depends_on "doxygen" => :build - depends_on "graphviz" => :build - depends_on "kde-extra-cmake-modules" => [:build, :test] - depends_on "qt" - - def install - args = std_cmake_args - args << "-DBUILD_TESTING=OFF" - args << "-DBUILD_QCH=ON" - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - - pkgshare.install "examples" - end - - test do - qt5_arg = "-DQt5Core_DIR=#{Formula["qt"].opt_prefix/"lib/cmake/Qt5Core"}" - system "cmake", (pkgshare/"examples/HelloWorld"), *std_cmake_args, qt5_arg - system "make" - - assert_equal "Hello World!", shell_output("./ThreadWeaver_HelloWorld 2>&1").strip - end -end diff --git a/Formula/kedge.rb b/Formula/kedge.rb deleted file mode 100644 index 342aaa2761de4..0000000000000 --- a/Formula/kedge.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Kedge < Formula - desc "Deployment tool for Kubernetes artifacts" - homepage "https://github.com/kedgeproject/kedge" - url "https://github.com/kedgeproject/kedge/archive/v0.12.0.tar.gz" - sha256 "3c01880ba9233fe5b0715527ba32f0c59b25b73284de8cfb49914666a158487b" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "3edff5947ad6460ff5132a9f1722d12e9da6c3644138275b0f3423dc14efac3b" => :catalina - sha256 "2302d114b01411cef00669faf00e32f1db551a9ba10402398720ca7a56cac0ec" => :mojave - sha256 "ff1bf61801e5c5e17ba83abe714c4d30914a458291cdc0fc4654ee952a919c4c" => :high_sierra - sha256 "39f193757913fc743191091a86b5d162b4cb4af618975db1ecd649dce7a08941" => :sierra - sha256 "1ff9804be018e8bf5bd0668ce1e1a647ab04005b4ea34fb22f49c50c215b4e13" => :el_capitan - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/kedgeproject").mkpath - ln_s buildpath, buildpath/"src/github.com/kedgeproject/kedge" - system "make", "bin" - bin.install "kedge" - end - - test do - (testpath/"kedgefile.yml").write <<~EOS - name: test - deployments: - - containers: - - image: test - EOS - output = shell_output("#{bin}/kedge generate -f kedgefile.yml") - assert_match "name: test", output - end -end diff --git a/Formula/keepassc.rb b/Formula/keepassc.rb deleted file mode 100644 index b9901c407dca7..0000000000000 --- a/Formula/keepassc.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Keepassc < Formula - desc "Curses-based password manager for KeePass v.1.x and KeePassX" - homepage "https://raymontag.github.com/keepassc/" - url "https://files.pythonhosted.org/packages/c8/87/a7d40d4a884039e9c967fb2289aa2aefe7165110a425c4fb74ea758e9074/keepassc-1.8.2.tar.gz" - sha256 "2e1fc6ccd5325c6f745f2d0a3bb2be26851b90d2095402dd1481a5c197a7b24e" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "d45c0751c541f70f630d57b6de4be54c7e404fa447b00c645da081baecf4ef07" => :catalina - sha256 "278b472373d6b75a37833a23a7bfe472c4bdd56ee582534a82a28b0a9dcd5248" => :mojave - sha256 "6304afecfb788ee22bf327d47ca046fc905db8383b348393eb7907f7b1479ce4" => :high_sierra - end - - depends_on "python@3.8" - - resource "kppy" do - url "https://files.pythonhosted.org/packages/c8/d9/6ced04177b4790ccb1ba44e466c5b67f3a1cfe4152fb05ef5f990678f94f/kppy-1.5.2.tar.gz" - sha256 "08fc48462541a891debe8254208fe162bcc1cd40aba3f4ca98286401faf65f28" - end - - resource "pycryptodomex" do - url "https://files.pythonhosted.org/packages/7f/3c/80cfaec41c3a9d0f524fe29bca9ab22d02ac84b5bfd6e22ade97d405bdba/pycryptodomex-3.9.7.tar.gz" - sha256 "50163324834edd0c9ce3e4512ded3e221c969086e10fdd5d3fdcaadac5e24a78" - end - - def install - pyver = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python#{pyver}/site-packages" - install_args = %W[setup.py install --prefix=#{libexec}] - - resource("pycryptodomex").stage { system "python3", *install_args } - resource("kppy").stage { system "python3", *install_args } - - system "python3", *install_args - - man1.install Dir["*.1"] - - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - # Fetching help is the only non-interactive action we can perform, and since - # interactive actions are un-scriptable, there nothing more we can do. - system "#{bin}/keepassc", "--help" - end -end diff --git a/Formula/keepkey-agent.rb b/Formula/keepkey-agent.rb deleted file mode 100644 index 04673d9a5f7ea..0000000000000 --- a/Formula/keepkey-agent.rb +++ /dev/null @@ -1,112 +0,0 @@ -class KeepkeyAgent < Formula - include Language::Python::Virtualenv - - desc "Keepkey Hardware-based SSH/GPG agent" - homepage "https://github.com/romanz/trezor-agent" - url "https://files.pythonhosted.org/packages/65/72/4bf47a7bc8dc93d2ac21672a0db4bc58a78ec5cee3c4bcebd0b4092a9110/keepkey_agent-0.9.0.tar.gz" - sha256 "47c85de0c2ffb53c5d7bd2f4d2230146a416e82511259fad05119c4ef74be70c" - revision 3 - - bottle do - cellar :any_skip_relocation - sha256 "d63b20fa73ca477c96862ff34e60bd54ff52ba88408212960dd4a772e8fa5643" => :catalina - sha256 "143afaf234c996ac776b3eb09cf271bdf8d70f91ce17de9dfb6f60b08f6dfe98" => :mojave - sha256 "90f8bed92a8c541ae0d3b4ba75f03094249d2081abd92be51a90feb4dbf2e401" => :high_sierra - end - - depends_on "python@3.8" - - 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 "ConfigArgParse" do - url "https://files.pythonhosted.org/packages/77/61/ae928ce6ab85d4479ea198488cf5ffa371bd4ece2030c0ee85ff668deac5/ConfigArgParse-0.13.0.tar.gz" - sha256 "e6441aa58e23d3d122055808e5e2220fd742dff6e1e51082d2a4e4ed145dd788" - 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 "keepkey" do - url "https://files.pythonhosted.org/packages/bd/7c/8edc3d017b4b02f11533083d9987d11707fcf82ab6606c9b9aedd2e95b4c/keepkey-4.0.2.tar.gz" - sha256 "cddee60ae405841cdff789cbc54168ceaeb2282633420f2be155554c25c69138" - end - - resource "libagent" do - url "https://files.pythonhosted.org/packages/63/57/39df4b80036657c9d57a17fe94902965a20543569e9bef0bb7cd89e8fa4a/libagent-0.11.2.tar.gz" - sha256 "51f36116dacab1df8672a876bb2ddbf08a717e0afc8276406bd23aeda79d5030" - 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/73/73/4f133a31d67b27431fe4b9cc5e2f74d0644bce0327a743093f3cc27864ce/protobuf-3.5.2.post1.tar.gz" - sha256 "3b60685732bd0cbdc802dfcb6071efbcf5d927ce3127c13c33ea1a8efae3aa76" - end - - resource "PyMsgBox" do - url "https://files.pythonhosted.org/packages/b6/65/86379ede1db26c40e7972d7a41c69cdf12cc6a0f143749aabf67ab8a41a1/PyMsgBox-1.0.6.zip" - sha256 "3888116a60812d01d44529c402014bf0896d2a9262617cb18faa9a7b3800ad4e" - end - - resource "python-daemon" do - url "https://files.pythonhosted.org/packages/b2/fb/a280d65f81e9d69989c8d6c4e0bb18d7280cdcd6d406a2cc3f4eb47d4402/python-daemon-2.1.2.tar.gz" - sha256 "261c859be5c12ae7d4286dc6951e87e9e1a70a882a8b41fd926efc1ec4214f73" - end - - resource "semver" do - url "https://files.pythonhosted.org/packages/43/07/4a7470398de2d33547b54b4848d18fde88aa434883cb255e01630c8f7f65/semver-2.8.0.tar.gz" - sha256 "b881cbbadaa83af20a6984d5e75b6db4bf388065515cf97d44661c21b80946c3" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "Unidecode" do - url "https://files.pythonhosted.org/packages/9d/36/49d0ee152b6a1631f03a541532c6201942430060aa97fe011cf01a2cce64/Unidecode-1.0.22.tar.gz" - sha256 "8c33dd588e0c9bc22a76eaa0c715a5434851f726131bd44a6c26471746efabf5" - end - - def install - virtualenv_install_with_resources - end - - test do - output = shell_output("#{bin}/keepkey-agent identity@myhost 2>&1", 1) - assert_match "KeepKey not connected", output - end -end diff --git a/Formula/kepubify.rb b/Formula/kepubify.rb deleted file mode 100644 index aa3b9a1ffe829..0000000000000 --- a/Formula/kepubify.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Kepubify < Formula - desc "Convert ebooks from epub to kepub" - homepage "https://pgaskin.net/kepubify/" - url "https://github.com/geek1011/kepubify/archive/v3.1.3.tar.gz" - sha256 "f178c46b08a6211ed353c2cf625918d582dafce2b76349a0b4c0181c8ff9622b" - license "MIT" - head "https://github.com/geek1011/kepubify.git" - - bottle do - cellar :any_skip_relocation - sha256 "2d723073619c7c2fd4000031f8e62aa870f794117bd98532848077609a8a98e2" => :catalina - sha256 "ecc1280cfd43109a6f7de135d1dc2997476c78b4736323ae29724433762547b2" => :mojave - sha256 "d08879854f7231ec647220e05df13f33f5b58865243a0254e318dfdda761db6f" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - - %w[ - kepubify - covergen - seriesmeta - ].each do |p| - system "go", "build", "-o", bin/p, - "-ldflags", "-s -w -X main.version=#{version}", - "./cmd/#{p}" - end - - pkgshare.install "kepub/test.epub" - end - - test do - pdf = test_fixtures("test.pdf") - output = shell_output("#{bin}/kepubify #{pdf} 2>&1", 1) - assert_match "Error: invalid extension", output - - system bin/"kepubify", pkgshare/"test.epub" - assert_predicate testpath/"test_converted.kepub.epub", :exist? - end -end diff --git a/Formula/kerl.rb b/Formula/kerl.rb deleted file mode 100644 index 04ed5e70a1933..0000000000000 --- a/Formula/kerl.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Kerl < Formula - desc "Easy building and installing of Erlang/OTP instances" - homepage "https://github.com/kerl/kerl" - url "https://github.com/kerl/kerl/archive/2.0.0.tar.gz" - sha256 "76579a934d918e26731d7b0c7e2f41bb89512175b70886825ceb40f05110544f" - head "https://github.com/kerl/kerl.git" - - bottle :unneeded - - def install - bin.install "kerl" - bash_completion.install "bash_completion/kerl" - zsh_completion.install "zsh_completion/_kerl" - end - - test do - system "#{bin}/kerl", "list", "releases" - end -end diff --git a/Formula/kestrel.rb b/Formula/kestrel.rb deleted file mode 100644 index 364d2cb66099a..0000000000000 --- a/Formula/kestrel.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Kestrel < Formula - desc "Distributed message queue" - homepage "https://twitter-archive.github.io/kestrel/" - url "https://twitter-archive.github.io/kestrel/download/kestrel-2.4.1.zip" - sha256 "5d72a301737cc6cc3908483ce73d4bdb6e96521f3f8c96f93b732d740aaea80c" - - bottle :unneeded - - def install - inreplace "scripts/kestrel.sh" do |s| - s.change_make_var! "APP_HOME", libexec - # Fix var paths. - s.gsub! "/var", var - # Fix path to script in help message. - s.gsub! "Usage: /etc/init.d/${APP_NAME}.sh", "Usage: kestrel" - # Don't call ulimit as not root. - s.gsub! "ulimit -", "# ulimit -" - end - - inreplace "config/production.scala", "/var", var - - libexec.install Dir["*"] - (libexec/"scripts/kestrel.sh").chmod 0755 - (libexec/"scripts/devel.sh").chmod 0755 - - (bin/"kestrel").write <<~EOS - #!/bin/bash - exec "#{libexec}/scripts/kestrel.sh" "$@" - EOS - end - - def post_install - (var/"log/kestrel").mkpath - (var/"run/kestrel").mkpath - (var/"spool/kestrel").mkpath - end - - test do - system bin/"kestrel", "status" - end -end diff --git a/Formula/kettle.rb b/Formula/kettle.rb deleted file mode 100644 index 770284c41ad50..0000000000000 --- a/Formula/kettle.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Kettle < Formula - desc "Pentaho Data Integration software" - homepage "https://community.hitachivantara.com/docs/DOC-1009931-downloads" - url "https://downloads.sourceforge.net/project/pentaho/Pentaho%208.3/client-tools/pdi-ce-8.3.0.0-371.zip" - sha256 "c0dbb17248135423fe6336bc8f45b01c2cf15a9b0498fa1d27c24588b3fa2872" - - bottle :unneeded - - def install - rm_rf Dir["*.{bat}"] - libexec.install Dir["*"] - - (etc+"kettle").install libexec+"pwd/carte-config-master-8080.xml" => "carte-config.xml" - (etc+"kettle/.kettle").install libexec+"pwd/kettle.pwd" - (etc+"kettle/simple-jndi").mkpath - - (var+"log/kettle").mkpath - - # We don't assume that carte, kitchen or pan are in anyway unique command names so we'll prepend "pdi" - %w[carte kitchen pan].each do |command| - (bin+"pdi#{command}").write_env_script libexec+"#{command}.sh", :BASEDIR => libexec - end - end - - plist_options :manual => "pdicarte #{HOMEBREW_PREFIX}/etc/kettle/carte-config.xml" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/pdicarte - #{etc}/kettle/carte-config.xml - - EnvironmentVariables - - KETTLE_HOME - #{etc}/kettle - - WorkingDirectory - #{etc}/kettle - StandardOutPath - #{var}/log/kettle/carte.log - StandardErrorPath - #{var}/log/kettle/carte.log - RunAtLoad - - - - EOS - end - - test do - system "#{bin}/pdipan", "-file=#{libexec}/samples/transformations/Encrypt\ Password.ktr", "-level=RowLevel" - end -end diff --git a/Formula/keychain.rb b/Formula/keychain.rb deleted file mode 100644 index 4e1d75c7939a8..0000000000000 --- a/Formula/keychain.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Keychain < Formula - desc "User-friendly front-end to ssh-agent(1)" - homepage "https://www.funtoo.org/Keychain" - url "https://build.funtoo.org/distfiles/keychain/keychain-2.8.5.tar.bz2" - mirror "https://fossies.org/linux/privat/keychain-2.8.5.tar.bz2" - sha256 "16f5949b606691dea6e1832a77e697b8c0b2a536abfbd29e3a3f47222259c3b2" - - bottle :unneeded - - def install - bin.install "keychain" - man1.install "keychain.1" - end - - test do - system "#{bin}/keychain", "--version" - end -end diff --git a/Formula/keydb.rb b/Formula/keydb.rb deleted file mode 100644 index d8ad8cf4cd487..0000000000000 --- a/Formula/keydb.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Keydb < Formula - desc "Multithreaded fork of Redis" - homepage "https://keydb.dev/" - url "https://github.com/JohnSully/KeyDB/archive/v5.3.3.tar.gz" - sha256 "07ad8344984ed8c896b75d19863c11cd7e9786220d93c9abaa3a65c34df075a3" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "0a2d66e4fd69d66c6d398a622a2faa3d3d4cf1e48b541a07cd29d707f0af50ba" => :catalina - sha256 "0556a15e5bc0e1782b636e318d221142d0ed80bf74698cd60205b0fae1c9cc4b" => :mojave - sha256 "9e9ab237fe2ca11d815652b4f8f08bc2bfe3b0054a3a1e59fe2b58f6659233fb" => :high_sierra - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - output = shell_output("#{bin}/keydb-server --test-memory 2") - assert_match "Your memory passed this test", output - end -end diff --git a/Formula/keystone.rb b/Formula/keystone.rb deleted file mode 100644 index 9cb228c48dc21..0000000000000 --- a/Formula/keystone.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Keystone < Formula - desc "Assembler framework: Core + bindings" - homepage "https://www.keystone-engine.org/" - url "https://github.com/keystone-engine/keystone/archive/0.9.2.tar.gz" - sha256 "c9b3a343ed3e05ee168d29daf89820aff9effb2c74c6803c2d9e21d55b5b7c24" - head "https://github.com/keystone-engine/keystone.git" - - bottle do - cellar :any_skip_relocation - sha256 "84cdef2aa8a5697ce2fc62e6ae1316f2dcca6fcd0f92d2bba68b399af9c48440" => :catalina - sha256 "814feeee85e111a21fdd287fbed3fca3e1cd86be396dcba7612c3e1aec7dd4d3" => :mojave - sha256 "77740af9b9e48baaf0a7d1dc4d74b883c1babbaab6a7e9bf65a00035b59c546d" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - assert_equal "nop = [ 90 ]", shell_output("#{bin}/kstool x16 nop").strip - end -end diff --git a/Formula/khal.rb b/Formula/khal.rb deleted file mode 100644 index 383a88a1281a5..0000000000000 --- a/Formula/khal.rb +++ /dev/null @@ -1,111 +0,0 @@ -class Khal < Formula - include Language::Python::Virtualenv - - desc "CLI calendar application" - homepage "https://lostpackets.de/khal/" - url "https://files.pythonhosted.org/packages/f7/45/555398810c14f572ea9ff8e92cd4f6e492ba8c50da1241fad58e58234463/khal-0.10.1.tar.gz" - sha256 "d450f9da70ddead28d794eed81c2d2a074655980a16cbd9f47f1c0c9e59b0be5" - license "MIT" - revision 2 - head "https://github.com/pimutils/khal.git" - - bottle do - cellar :any_skip_relocation - sha256 "4fd8c3901fc6dc40fb4cca2b1724fc8c2f06aad6984c46a5f5cabd38549938ae" => :catalina - sha256 "fa5e0a274c6e3cfd849fc8022f0dd94332f2f1e324b7d205b993cae5ed9c6a36" => :mojave - sha256 "09300aa3a7c4f1d8840e039f8530fad8ccb716798abd34fc7a1f1a7398899339" => :high_sierra - end - - depends_on "python@3.8" - - resource "atomicwrites" do - url "https://files.pythonhosted.org/packages/55/8d/74a75635f2c3c914ab5b3850112fd4b0c8039975ecb320e4449aa363ba54/atomicwrites-1.4.0.tar.gz" - sha256 "ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a" - 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/22/44/3d73579b547f0790a2723728088c96189c8b52bd2ee3c3de8040efc3c1b8/click-log-0.3.2.tar.gz" - sha256 "16fd1ca3fc6b16c98cea63acf1ab474ea8e676849dc669d86afafb0ed7003124" - end - - resource "configobj" do - url "https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz" - sha256 "a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902" - end - - resource "icalendar" do - url "https://files.pythonhosted.org/packages/e4/dd/67c363b99c4384c66bcf94c1abf9b749dd4e809a44bd6db575ec8e22be89/icalendar-4.0.6.tar.gz" - sha256 "7e6fe7232622abe32d8f54d0936ffcd5a9087198a4c2f1ec1803a7dd9fdd979f" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - 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/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "tzlocal" do - url "https://files.pythonhosted.org/packages/ce/73/99e4cc30db6b21cba6c3b3b80cffc472cc5a0feaf79c290f01f1ac460710/tzlocal-2.1.tar.gz" - sha256 "643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/45/dd/d57924f77b0914f8a61c81222647888fbb583f89168a376ffeb5613b02a6/urwid-2.1.0.tar.gz" - sha256 "0896f36060beb6bf3801cb554303fef336a79661401797551ba106d23ab4cd86" - end - - def install - virtualenv_install_with_resources - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - ENV["LANG"] = "en_US.UTF-8" - (testpath/".calendar/test/01ef8547.ics").write <<~EOS - BEGIN:VCALENDAR - VERSION:2.0 - BEGIN:VEVENT - DTSTART;VALUE=DATE:20130726 - SUMMARY:testevent - DTEND;VALUE=DATE:20130727 - LAST-MODIFIED:20130725T142824Z - DTSTAMP:20130725T142824Z - CREATED:20130725T142824Z - UID:01ef8547 - END:VEVENT - END:VCALENDAR - EOS - (testpath/".config/khal/config").write <<~EOS - [calendars] - [[test]] - path = #{testpath}/.calendar/test/ - color = light gray - [sqlite] - path = #{testpath}/.calendar/khal.db - [locale] - firstweekday = 0 - [default] - default_calendar = test - EOS - system "#{bin}/khal", "--no-color", "search", "testevent" - end -end diff --git a/Formula/khard.rb b/Formula/khard.rb deleted file mode 100644 index 82dc7f9f6ea2b..0000000000000 --- a/Formula/khard.rb +++ /dev/null @@ -1,94 +0,0 @@ -class Khard < Formula - include Language::Python::Virtualenv - - desc "Console carddav client" - homepage "https://github.com/scheibler/khard/" - url "https://files.pythonhosted.org/packages/5e/55/a4b34562af0f604b703fde449e18d4b452205daa303aeff832b6387f8849/khard-0.16.1.tar.gz" - sha256 "0d9f67a575ac945365c7748cf71f39d3b2281462977254d2e325ceff0ac4e439" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "077ace786816be18db01618f82524bcaa63713f769588cdec5c3a7db7dc5db98" => :catalina - sha256 "ccfb049a7e5887d37f3c7359b700ac36769422afe56f6422e326adf214dcda89" => :mojave - sha256 "0b9d4ed54176ca9340d9605fdb9eb5fa19a96c461de05d6767ebe7fdf342c535" => :high_sierra - end - - depends_on "python@3.8" - - resource "atomicwrites" do - url "https://files.pythonhosted.org/packages/ec/0f/cd484ac8820fed363b374af30049adc8fd13065720fd4f4c6be8a2309da7/atomicwrites-1.3.0.tar.gz" - sha256 "75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6" - end - - resource "configobj" do - url "https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz" - sha256 "a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/16/8b/54a26c1031595e5edd0e616028b922d78d8ffba8bc775f0a4faeada846cc/ruamel.yaml-0.16.10.tar.gz" - sha256 "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954" - end - - resource "ruamel.yaml.clib" do - url "https://files.pythonhosted.org/packages/92/28/612085de3fae9f82d62d80255d9f4cf05b1b341db1e180adcf28c1bf748d/ruamel.yaml.clib-0.2.0.tar.gz" - sha256 "b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "Unidecode" do - url "https://files.pythonhosted.org/packages/b1/d6/7e2a98e98c43cf11406de6097e2656d31559f788e9210326ce6544bd7d40/Unidecode-1.1.1.tar.gz" - sha256 "2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8" - end - - resource "vobject" do - url "https://files.pythonhosted.org/packages/da/ce/27c48c0e39cc69ffe7f6e3751734f6073539bf18a0cfe564e973a3709a52/vobject-0.9.6.1.tar.gz" - sha256 "96512aec74b90abb71f6b53898dd7fe47300cc940104c4f79148f0671f790101" - end - - def install - virtualenv_install_with_resources - (etc/"khard").install "doc/source/examples/khard.conf.example" - zsh_completion.install "misc/zsh/_khard" - pkgshare.install (buildpath/"misc").children - [buildpath/"misc/zsh"] - end - - test do - (testpath/".config/khard/khard.conf").write <<~EOS - [addressbooks] - [[default]] - path = ~/.contacts/ - [general] - editor = /usr/bin/vi - merge_editor = /usr/bin/vi - default_country = Germany - default_action = list - show_nicknames = yes - EOS - (testpath/".contacts/dummy.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 - assert_match /Address book: default/, shell_output("#{bin}/khard list user") - end -end diff --git a/Formula/kibana.rb b/Formula/kibana.rb deleted file mode 100644 index c05f8d846c075..0000000000000 --- a/Formula/kibana.rb +++ /dev/null @@ -1,92 +0,0 @@ -class Kibana < Formula - desc "Analytics and search dashboard for Elasticsearch" - homepage "https://www.elastic.co/products/kibana" - url "https://github.com/elastic/kibana.git", - :tag => "v7.6.2", - :revision => "c14a620411be7e6e463520eafa61fa8d7efb84ce" - head "https://github.com/elastic/kibana.git" - - bottle do - cellar :any_skip_relocation - sha256 "c5ce7fd2c2cb57b276d3fd61609712e5b4171ae65e45ad8f4ba114912c9513d0" => :catalina - sha256 "50a13ed2c843f98cea0f0a7067236c33295021074ffec07099912f675ec36625" => :mojave - sha256 "93c8a343c2122142b977c64c9c178f2c96bb1b8fdc03446f71a0961387f928e5" => :high_sierra - end - - depends_on "python@3.8" => :build - depends_on "yarn" => :build - depends_on "node@10" - - def install - # remove non open source files - rm_rf "x-pack" - - inreplace "package.json", /"node": "10\.\d+\.\d+"/, %Q("node": "#{Formula["node@10"].version}") - system "yarn", "kbn", "bootstrap" - system "node", "scripts/build", "--oss", "--release", "--skip-os-packages", "--skip-archives" - - prefix.install Dir - .glob("build/oss/kibana-#{version}-darwin-x86_64/**") - .reject { |f| File.fnmatch("build/oss/kibana-#{version}-darwin-x86_64/{node, data, plugins}", f) } - mv "licenses/APACHE-LICENSE-2.0.txt", "LICENSE.txt" # install OSS license - - cd prefix do - inreplace "config/kibana.yml", "/var/run/kibana.pid", var/"run/kibana.pid" - (etc/"kibana").install Dir["config/*"] - rm_rf "config" - end - end - - def post_install - ln_s etc/"kibana", prefix/"config" - (prefix/"data").mkdir - (prefix/"plugins").mkdir - end - - def caveats - <<~EOS - Config: #{etc}/kibana/ - If you wish to preserve your plugins upon upgrade, make a copy of - #{opt_prefix}/plugins before upgrading, and copy it into the - new keg location after upgrading. - EOS - end - - plist_options :manual => "kibana" - - def plist - <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/kibana - RunAtLoad - - - - EOS - end - - test do - ENV["BABEL_CACHE_PATH"] = testpath/".babelcache.json" - - (testpath/"data").mkdir - (testpath/"config.yml").write <<~EOS - path.data: #{testpath}/data - EOS - - port = free_port - fork do - exec bin/"kibana", "-p", port.to_s, "-c", testpath/"config.yml" - end - sleep 5 - output = shell_output("curl -s 127.0.0.1:#{port}") - # Kibana returns this message until it connects to Elasticsearch - assert_equal "Kibana server is not ready yet", output - end -end diff --git a/Formula/kibana@5.6.rb b/Formula/kibana@5.6.rb deleted file mode 100644 index ddc24893bcaba..0000000000000 --- a/Formula/kibana@5.6.rb +++ /dev/null @@ -1,101 +0,0 @@ -require "language/node" - -class KibanaAT56 < Formula - desc "Analytics and search dashboard for Elasticsearch" - homepage "https://www.elastic.co/products/kibana" - url "https://github.com/elastic/kibana.git", - :tag => "v5.6.16", - :revision => "e4c8b3e8245cbf4f81d0d31476c61125e366c2d9" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "f451a8784dc52182670152d040f6533d4dc2f1b251ef3797eed6c6ff565db8af" => :catalina - sha256 "9e10c72574cde3b0ab08d668f6f4c3ecbe626da70648c1682bf0974196f198cb" => :mojave - sha256 "49b180f5e405662651596a97c603e79653852205a9002853775c21e23787bf5a" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! :date => "2019-03-11" - - resource "node" do - url "https://nodejs.org/dist/v6.17.0/node-v6.17.0.tar.xz" - sha256 "c1dac78ea71c2e622cea6f94ba97a4be49329a1d36cd05945a1baf1ae8652748" - end - - def install - resource("node").stage do - system "./configure", "--prefix=#{libexec}/node" - system "make", "install" - end - - # do not build packages for other platforms - inreplace buildpath/"tasks/config/platforms.js", /('(linux-x64|windows-x64)',?(?!;))/, "// \\1" - - # trick the build into thinking we've already downloaded the Node.js binary - mkdir_p buildpath/".node_binaries/#{resource("node").version}/darwin-x64" - - # set MACOSX_DEPLOYMENT_TARGET to compile native addons against libc++ - inreplace libexec/"node/include/node/common.gypi", "'MACOSX_DEPLOYMENT_TARGET': '10.7',", - "'MACOSX_DEPLOYMENT_TARGET': '#{MacOS.version}'," - ENV["npm_config_nodedir"] = libexec/"node" - - # set npm env and fix cache edge case (https://github.com/Homebrew/brew/pull/37#issuecomment-208840366) - ENV.prepend_path "PATH", prefix/"libexec/node/bin" - system "npm", "install", "-ddd", "--build-from-source", "--#{Language::Node.npm_cache_config}" - system "npm", "run", "build", "--", "--release", "--skip-os-packages", "--skip-archives" - - prefix.install Dir["build/kibana-#{version}-darwin-x86_64/"\ - "{bin,config,node_modules,optimize,package.json,src,ui_framework,webpackShims}"] - - inreplace "#{bin}/kibana", %r{/node/bin/node}, "/libexec/node/bin/node" - inreplace "#{bin}/kibana-plugin", %r{/node/bin/node}, "/libexec/node/bin/node" - - cd prefix do - inreplace "config/kibana.yml", "/var/run/kibana.pid", var/"run/kibana.pid" - (etc/"kibana").install Dir["config/*"] - rm_rf "config" - end - end - - def post_install - ln_s etc/"kibana", prefix/"config" - (prefix/"data").mkdir - (prefix/"plugins").mkdir - end - - def caveats - <<~EOS - Config: #{etc}/kibana/ - If you wish to preserve your plugins upon upgrade, make a copy of - #{opt_prefix}/plugins before upgrading, and copy it into the - new keg location after upgrading. - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/kibana@5.6/bin/kibana" - - def plist - <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/kibana - RunAtLoad - - - - EOS - end - - test do - ENV["BABEL_CACHE_PATH"] = testpath/".babelcache.json" - assert_match /#{version}/, shell_output("#{bin}/kibana -V") - end -end diff --git a/Formula/kibana@6.8.rb b/Formula/kibana@6.8.rb deleted file mode 100644 index 5fcf8f6eb06b8..0000000000000 --- a/Formula/kibana@6.8.rb +++ /dev/null @@ -1,87 +0,0 @@ -class KibanaAT68 < Formula - desc "Analytics and search dashboard for Elasticsearch" - homepage "https://www.elastic.co/products/kibana" - url "https://github.com/elastic/kibana.git", - :tag => "v6.8.8", - :revision => "dc91d17ffcdc72efa4fe5944ac5abd22f9a8620d" - - bottle do - cellar :any_skip_relocation - sha256 "acb7329389a28b42f4f81aed6f7db97be4c55fe2cc56eb7c453e2816d56db32a" => :catalina - sha256 "d2cc64615d62ab22fc0a1429c4931b57e0fd9f7e0c1dea45f04c231702cc7688" => :mojave - sha256 "d3daa0cbb3da0a9472955578258ee438ed09a55c3f2a7fb269ce612641bf8049" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "yarn" => :build - depends_on :macos # Due to Python 2 - depends_on "node@10" - - def install - # remove non open source files - rm_rf "x-pack" - inreplace "package.json", /"x-pack":.*/, "" - - # patch build to not try to read tsconfig.json's from the removed x-pack folder - inreplace "src/dev/typescript/projects.ts" do |s| - s.gsub! "new Project(resolve(REPO_ROOT, 'x-pack/tsconfig.json')),", "" - s.gsub! "new Project(resolve(REPO_ROOT, 'x-pack/test/tsconfig.json'), 'x-pack/test'),", "" - end - - inreplace "package.json", /"node": "10\.\d+\.\d+"/, %Q("node": "#{Formula["node@10"].version}") - system "yarn", "kbn", "bootstrap" - system "yarn", "build", "--oss", "--release", "--skip-os-packages", "--skip-archives" - - prefix.install Dir - .glob("build/oss/kibana-#{version}-darwin-x86_64/**") - .reject { |f| File.fnmatch("build/oss/kibana-#{version}-darwin-x86_64/{node, data, plugins}", f) } - mv "licenses/APACHE-LICENSE-2.0.txt", "LICENSE.txt" # install OSS license - - cd prefix do - inreplace "config/kibana.yml", "/var/run/kibana.pid", var/"run/kibana.pid" - (etc/"kibana").install Dir["config/*"] - rm_rf "config" - end - end - - def post_install - ln_s etc/"kibana", prefix/"config" - (prefix/"data").mkdir - (prefix/"plugins").mkdir - end - - def caveats - <<~EOS - Config: #{etc}/kibana/ - If you wish to preserve your plugins upon upgrade, make a copy of - #{opt_prefix}/plugins before upgrading, and copy it into the - new keg location after upgrading. - EOS - end - - plist_options :manual => "kibana" - - def plist - <<~EOS - - - - - Label - #{plist_name} - Program - #{opt_bin}/kibana - RunAtLoad - - - - EOS - end - - test do - ENV["BABEL_CACHE_PATH"] = testpath/".babelcache.json" - assert_match /#{version}/, shell_output("#{bin}/kibana -V") - end -end diff --git a/Formula/killswitch.rb b/Formula/killswitch.rb deleted file mode 100644 index 93e22310bb00e..0000000000000 --- a/Formula/killswitch.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Killswitch < Formula - desc "VPN kill switch for macOS" - homepage "https://vpn-kill-switch.com/" - url "https://github.com/vpn-kill-switch/killswitch/archive/v0.7.2.tar.gz" - sha256 "21b5f755fd5f23f9785bab6815f83056b0291ea9200706debd490a69aa565558" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "3e00a8591a897509a48c65d76e529c6f4ef6fc910ebb762c8e5e7f54e2e03a43" => :catalina - sha256 "4cdbf573342205befe4e908ae318125be61850d2346c5ca649cdd867067eab63" => :mojave - sha256 "82a98dbef512e928dfcee02d0c7c50889856ce88740645ec1af0fcac7edfab12" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-mod=readonly", "-ldflags", "-s -w -X main.version=#{version}", - "-o", "#{bin}/killswitch", "cmd/killswitch/main.go" - end - - test do - assert_match "No VPN interface found", shell_output("#{bin}/killswitch 2>&1", 1) - end -end diff --git a/Formula/kim-api.rb b/Formula/kim-api.rb deleted file mode 100644 index 3366d2d59b629..0000000000000 --- a/Formula/kim-api.rb +++ /dev/null @@ -1,39 +0,0 @@ -class KimApi < Formula - desc "The Knowledgebase of Interatomic Models (KIM) API" - homepage "https://openkim.org/" - url "https://s3.openkim.org/kim-api/kim-api-2.1.3.txz" - sha256 "88a5416006c65a2940d82fad49de0885aead05bfa8b59f87d287db5516b9c467" - revision 1 - - bottle do - sha256 "585be65f52b6c5dd3b9c5ea0da1af889e24ef085f8174485d9256b84d9b01d84" => :catalina - sha256 "29743babbc332f529773cba2962512e3d29c0e269675bbb033effedbe1f92da3" => :mojave - sha256 "8f64683177ac688908e33c98ca57ae3b2c3c59215e70b77296b40843b6e69a0f" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "gcc" # for gfortran - - def install - args = std_cmake_args - # adjust compiler settings for package - args << "-DKIM_API_CMAKE_C_COMPILER=/usr/bin/clang" - args << "-DKIM_API_CMAKE_CXX_COMPILER=/usr/bin/clang++" - # adjust directories for system collection - args << "-DKIM_API_SYSTEM_MODEL_DRIVERS_DIR=:#{HOMEBREW_PREFIX}/lib/openkim-models/model-drivers" - args << "-DKIM_API_SYSTEM_PORTABLE_MODELS_DIR=:#{HOMEBREW_PREFIX}/lib/openkim-models/portable-models" - args << "-DKIM_API_SYSTEM_SIMULATOR_MODELS_DIR=:#{HOMEBREW_PREFIX}/lib/openkim-models/simulator-models" - # adjust zsh completion install - args << "-DZSH_COMPLETION_COMPLETIONSDIR=#{zsh_completion}" - system "cmake", ".", *args - system "make" - system "make", "docs" - system "make", "install" - end - - test do - output = shell_output("#{bin}/kim-api-collections-management list") - assert_match "ex_model_Ar_P_Morse_07C_w_Extensions", output - end -end diff --git a/Formula/kimwitu++.rb b/Formula/kimwitu++.rb deleted file mode 100644 index cead27f21cff7..0000000000000 --- a/Formula/kimwitu++.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Kimwituxx < Formula - desc "Tool for processing trees (i.e. terms)" - homepage "https://www2.informatik.hu-berlin.de/sam/kimwitu++/" - url "https://download.savannah.gnu.org/releases/kimwitu-pp/kimwitu++-2.3.13.tar.gz" - sha256 "3f6d9fbb35cc4760849b18553d06bc790466ca8b07884ed1a1bdccc3a9792a73" - - bottle do - cellar :any_skip_relocation - sha256 "470e06521034cea8db6ad07e8aab45c5bfbe3969cd03891799348eb4e9279c90" => :catalina - sha256 "067f8d375baa815645201a091c2f8325b469e59d9b2793e5a0dd83bfd9350aa2" => :mojave - sha256 "26ba22bbcdbea896f4af405631bed60dfc198757b6f879765e8d85e373b122db" => :high_sierra - sha256 "a5dfd8382b50fc856ba741b79cf7077ae741549b8b8ff32ce727cfd7e8bd2a69" => :sierra - sha256 "98c3516d1f3a9b17397354d8dde712f8a8c0f97ac919c65fc468ab4569534cc4" => :el_capitan - sha256 "6b396c209bc1bc9df74df57f86e2d27a36817f2ed3a6ba2c5101879dec6ffb43" => :yosemite - sha256 "850a6609b75b222e5443a2c293ecaec376dfa6fe2a3ba708d742c6fdb2537af7" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - bin.mkpath - man1.mkpath - system "make", "install" - end -end diff --git a/Formula/kind.rb b/Formula/kind.rb deleted file mode 100644 index 797fd8d39d034..0000000000000 --- a/Formula/kind.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Kind < Formula - desc "Run local Kubernetes cluster in Docker" - homepage "https://kind.sigs.k8s.io/" - url "https://github.com/kubernetes-sigs/kind/archive/v0.8.1.tar.gz" - sha256 "2a04a6427d45fa558fc4bfe90fde0b7ea2c7f2d6fcf3b7c581fc281ae49b5447" - license "Apache-2.0" - head "https://github.com/kubernetes-sigs/kind.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b3df2d17b1e04549456c846b4e6821b9ba944cc9d960a4cd503281b1d180c6f4" => :catalina - sha256 "f91154348256db372a2dc67fde509072693993338acb34b89374df138e6c53b8" => :mojave - sha256 "50ea3dd46ea5e1965bd3cc94e95d30b855ddf64c0a103ee83980ba356a6b2625" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"kind" - prefix.install_metafiles - - # Install bash completion - output = Utils.safe_popen_read("#{bin}/kind", "completion", "bash") - (bash_completion/"kind").write output - - # Install zsh completion - output = Utils.safe_popen_read("#{bin}/kind", "completion", "zsh") - (zsh_completion/"_kind").write output - end - - test do - # Should error out as creating a kind cluster requires root - status_output = shell_output("#{bin}/kind get kubeconfig --name homebrew 2>&1", 1) - assert_match "failed to list clusters", status_output - end -end diff --git a/Formula/kitchen-completion.rb b/Formula/kitchen-completion.rb deleted file mode 100644 index fee0f6edce350..0000000000000 --- a/Formula/kitchen-completion.rb +++ /dev/null @@ -1,18 +0,0 @@ -class KitchenCompletion < Formula - desc "Bash completion for Kitchen" - homepage "https://github.com/MarkBorcherding/test-kitchen-bash-completion" - url "https://github.com/MarkBorcherding/test-kitchen-bash-completion/archive/v1.0.0.tar.gz" - sha256 "6a9789359dab220df0afad25385dd3959012cfa6433c8c96e4970010b8cfc483" - head "https://github.com/MarkBorcherding/test-kitchen-bash-completion.git" - - bottle :unneeded - - def install - bash_completion.install "kitchen-completion.bash" => "kitchen" - end - - test do - assert_match "-F __kitchen_options", - shell_output("source #{bash_completion}/kitchen && complete -p kitchen") - end -end diff --git a/Formula/kitchen-sync.rb b/Formula/kitchen-sync.rb deleted file mode 100644 index 89c9548859ea0..0000000000000 --- a/Formula/kitchen-sync.rb +++ /dev/null @@ -1,35 +0,0 @@ -class KitchenSync < Formula - desc "Fast efficiently sync database without dumping & reloading" - homepage "https://github.com/willbryant/kitchen_sync" - url "https://github.com/willbryant/kitchen_sync/archive/v2.5.tar.gz" - sha256 "27ada2dd86fe4c9487fda52e5e1cffab74e2d1478b952a1054184614102dbbc3" - license "MIT" - head "https://github.com/willbryant/kitchen_sync.git" - - bottle do - cellar :any - sha256 "8c3c2ba6fb38f6370e67d1e918a3ca4f5713fec820dd6c137249bcec03a5723b" => :catalina - sha256 "23bb7a19a76b078547ff55cd8eefbca86b2a8492aaba3d05db399108612303e2" => :mojave - sha256 "7f9606657ef1c18612bb832d97c03d988037705b5714c35f8f14b2eff2f71c62" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libpq" - depends_on "mysql-client" - - def install - system "cmake", ".", - "-DMySQL_INCLUDE_DIR=#{Formula["mysql-client"].opt_include}/mysql", - "-DMySQL_LIBRARY_DIR=#{Formula["mysql-client"].opt_lib}", - "-DPostgreSQL_INCLUDE_DIR=#{Formula["libpq"].opt_include}", - "-DPostgreSQL_LIBRARY_DIR=#{Formula["libpq"].opt_lib}", - *std_cmake_args - - system "make", "install" - end - - test do - output = shell_output("#{bin}/ks --from a://b/ --to c://d/ 2>&1") - assert_match "Finished Kitchen Syncing", output - end -end diff --git a/Formula/kite.rb b/Formula/kite.rb deleted file mode 100644 index 1ef9d06467923..0000000000000 --- a/Formula/kite.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Kite < Formula - desc "Programming language designed to minimize programmer experience" - homepage "http://www.kite-language.org/" - url "http://www.kite-language.org/files/kite-1.0.4.tar.gz" - sha256 "8f97e777c3ea8cb22fa1236758df3c479bba98be3deb4483ae9aff4cd39c01d5" - revision 2 - - bottle do - sha256 "b55449bb1c1b6a3f190926a44dcf090479a190bad3389372157137b46c1e20ca" => :mojave - sha256 "3b293d215be3d011ec9110b6b3f8fad331f36eb8a4062cafa7c0601315454bfc" => :high_sierra - sha256 "5f090153489b27969c99e30a3be64e747da75738d9377f830a717bd856df3a72" => :sierra - sha256 "0c4b034731a0b3fa2f492f1a435122e78bdda3508d778507de3679c353894ad8" => :el_capitan - end - - depends_on "bdw-gc" - - # patch to build against bdw-gc 7.2, sent upstream - patch :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - output = pipe_output("#{bin}/kite", "'hello, world'|print;", 0) - assert_equal "hello, world", output.chomp - end -end - -__END__ ---- a/backend/common/kite_vm.c 2010-08-21 01:20:25.000000000 +0200 -+++ b/backend/common/kite_vm.c 2012-02-11 02:29:37.000000000 +0100 -@@ -152,7 +152,12 @@ - #endif - - #ifdef HAVE_GC_H -+#if GC_VERSION_MAJOR >= 7 && GC_VERSION_MINOR >= 2 -+ ret->old_proc = GC_get_warn_proc(); -+ GC_set_warn_proc ((GC_warn_proc)kite_ignore_gc_warnings); -+#else - ret->old_proc = GC_set_warn_proc((GC_warn_proc)kite_ignore_gc_warnings); -+#endif - #endif /* HAVE_GC_H */ - - return ret; diff --git a/Formula/klavaro.rb b/Formula/klavaro.rb deleted file mode 100644 index c4326246a9f8b..0000000000000 --- a/Formula/klavaro.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Klavaro < Formula - desc "Free touch typing tutor program" - homepage "https://klavaro.sourceforge.io/" - url "https://downloads.sourceforge.net/project/klavaro/klavaro-3.10.tar.bz2" - sha256 "25e1387aa1553447fa759f364e5930985cf8ca3f27b5f8f802d5e0d86c6edf4a" - license "GPL-3.0" - revision 1 - - bottle do - sha256 "fcdf087c22fed79c28c0c43aa8c82af9d631770040011b55c47c7c140d5200fa" => :catalina - sha256 "0884d8ae7d2c1cbf535afda565b06b2ae27e675b2e91c2b403d229508dd337d0" => :mojave - sha256 "4e34ed13b02cf0a6f2226a01f5b32a1ff3a59cd197ec52506ef5fc5299d45004" => :high_sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gtk+3" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - rm_rf include - end - - test do - system bin/"klavaro", "--help-gtk" - end -end diff --git a/Formula/knock.rb b/Formula/knock.rb deleted file mode 100644 index 97270377e95f4..0000000000000 --- a/Formula/knock.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Knock < Formula - desc "Port-knock server" - homepage "https://zeroflux.org/projects/knock" - url "https://zeroflux.org/proj/knock/files/knock-0.7.tar.gz" - sha256 "9938479c321066424f74c61f6bee46dfd355a828263dc89561a1ece3f56578a4" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "d6d7e20fa46d9587c9e8f6f80cef047cb21997f9bd914f5999c02d345255e760" => :catalina - sha256 "41badbc87fee76251158416bd506d8ee30e9997e673a64a57e5e039a8facb11e" => :mojave - sha256 "06b02ba999daee09e6588a8edb4af78a41b8ab135ac1b618b4ab2b02b7646acf" => :high_sierra - sha256 "5f29acd295f83fadd436423f61c58ad8a2682dd9f9a3f89740eeee1eb55c6373" => :sierra - sha256 "030dc0a7c3ea623eb3d8e11374f744ad79f8aee8b7b75210f1a183b4d6d978de" => :el_capitan - sha256 "aac645d3c392386d99cb19200465a439639c8d3e7f8eac7021dbb677939cf155" => :yosemite - sha256 "eb180c87d84707199ef6279a4709d76630a2089b331fb9ebc6c2bf58389fc921" => :mavericks - end - - head do - url "https://github.com/jvinet/knock.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - def install - system "autoreconf", "-fi" if build.head? - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - system "#{bin}/knock", "localhost", "123:tcp" - end -end diff --git a/Formula/knot-resolver.rb b/Formula/knot-resolver.rb deleted file mode 100644 index 72010540312e6..0000000000000 --- a/Formula/knot-resolver.rb +++ /dev/null @@ -1,74 +0,0 @@ -class KnotResolver < Formula - desc "Minimalistic, caching, DNSSEC-validating DNS resolver" - homepage "https://www.knot-resolver.cz/" - url "https://secure.nic.cz/files/knot-resolver/knot-resolver-5.1.2.tar.xz" - sha256 "caa4f941caf39080184554fb1310f383eba4b30d9c4c2215670d6b0a2de8f836" - head "https://gitlab.labs.nic.cz/knot/knot-resolver.git" - - bottle do - sha256 "341d13941123e359dc5f1cb6147e6058296691c95ea2cfe4a2a436d1125ae9e1" => :catalina - sha256 "7a861d87a84b2e8572bb9b76fbd3768b516821dc046c1a34f1d27caa4b511748" => :mojave - sha256 "5050ebacd49658cde25168edc4e40575dfb1934b554eac5b1e28c29dfc520cea" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gnutls" - depends_on "knot" - depends_on "libuv" - depends_on "lmdb" - depends_on "luajit" - - def install - mkdir "build" do - system "meson", *std_meson_args, "--default-library=static", ".." - system "ninja" - system "ninja", "install" - end - end - - # DNSSEC root anchor published by IANA (https://www.iana.org/dnssec/files) - def root_keys - <<~EOS - . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d - EOS - end - - plist_options :startup => true - - def plist - <<~EOS - - - - - Label - #{plist_name} - WorkingDirectory - #{var}/kresd - RunAtLoad - - ProgramArguments - - #{sbin}/kresd - -c - #{etc}/kresd/config - -f - 1 - - StandardInPath - /dev/null - StandardOutPath - /dev/null - StandardErrorPath - #{var}/log/kresd.log - - - EOS - end - - test do - system sbin/"kresd", "--version" - end -end diff --git a/Formula/knot.rb b/Formula/knot.rb deleted file mode 100644 index 6319186834fb5..0000000000000 --- a/Formula/knot.rb +++ /dev/null @@ -1,108 +0,0 @@ -class Knot < Formula - desc "High-performance authoritative-only DNS server" - homepage "https://www.knot-dns.cz/" - url "https://secure.nic.cz/files/knot-dns/knot-2.9.5.tar.xz" - sha256 "1109a8ba212ff8ddfdbaf44a6f8fc13a2b880a98a9e54c19112ba72a1aacbf76" - license "GPL-3.0" - - bottle do - sha256 "1f2c208e2bd5f7451865d8f923e68a21ff023e87349f51d710432d25056b8a6c" => :catalina - sha256 "10cff141d8b38bb6b06426f08cb85eb8ce67035b5da7ed222cf9edcdb6d1d661" => :mojave - sha256 "47a8b4bfaab5f1db40e72c552ebf274242f804b84672e040580f37c50ba0451a" => :high_sierra - end - - head do - url "https://gitlab.labs.nic.cz/knot/knot-dns.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - depends_on "fstrm" - depends_on "gnutls" - depends_on "libidn2" - depends_on "protobuf-c" - depends_on "userspace-rcu" - - def install - system "autoreconf", "-fvi" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--with-configdir=#{etc}", - "--with-storage=#{var}/knot", - "--with-rundir=#{var}/run/knot", - "--prefix=#{prefix}", - "--with-module-dnstap", - "--enable-dnstap" - - inreplace "samples/Makefile", "install-data-local:", "disable-install-data-local:" - - system "make" - system "make", "install" - system "make", "install-singlehtml" - - (buildpath/"knot.conf").write(knot_conf) - etc.install "knot.conf" - end - - def post_install - (var/"knot").mkpath - end - - def knot_conf - <<~EOS - server: - rundir: "#{var}/knot" - listen: [ "0.0.0.0@53", "::@53" ] - - log: - - target: "stderr" - any: "info" - - control: - listen: "knot.sock" - - template: - - id: "default" - storage: "#{var}/knot" - EOS - end - - plist_options :startup => true - - def plist - <<~EOS - - - - - EnableTransactions - - Label - #{plist_name} - RunAtLoad - - ProgramArguments - - #{opt_sbin}/knotd - - StandardInPath - /dev/null - StandardOutPath - /dev/null - StandardErrorPath - #{var}/log/knot.log - - - EOS - end - - test do - system bin/"kdig", "www.knot-dns.cz" - system bin/"khost", "brew.sh" - system sbin/"knotc", "conf-check" - end -end diff --git a/Formula/known_hosts.rb b/Formula/known_hosts.rb deleted file mode 100644 index 99fc1f85a0c4b..0000000000000 --- a/Formula/known_hosts.rb +++ /dev/null @@ -1,30 +0,0 @@ -class KnownHosts < Formula - desc "Command-line manager for known hosts" - homepage "https://github.com/markmcconachie/known_hosts" - url "https://github.com/markmcconachie/known_hosts/archive/1.0.0.tar.gz" - sha256 "80a080aa3850af927fd332e5616eaf82e6226d904c96c6949d6034deb397ac63" - head "https://github.com/markmcconachie/known_hosts.git" - - bottle do - cellar :any_skip_relocation - sha256 "dcf7fb7a2fc7436eb50d0ded0dd0059f082cb6652ea107c6f37696d1fe08bd70" => :catalina - sha256 "62e7b000f7c4ba73c10a879a8ad9c1b14e356799204de92249f1e3bdcd577359" => :mojave - sha256 "8e823e73e385c7d11c19e02a0fad28751447a96332222fed825505b98e5c4003" => :high_sierra - sha256 "729e8dc06654b9dae55b1f4ff15a40ee28de3642285f82deb2f67f08a031f9b2" => :sierra - sha256 "b1f7982e9fb744226dcdf2be12467613ca97fa9a05f92673a4c785f6f445333c" => :el_capitan - sha256 "be8ddf7bec2c25ee2de9f84db383b56e25e45825386e6726bedbda41824c9d6a" => :yosemite - sha256 "826d0ac6e5b61f6fa5278710b0acda82f474d9e81c85b644815a5963a296938f" => :mavericks - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make" - system "make", "install" - end - - test do - system "#{bin}/known_hosts", "version" - end -end diff --git a/Formula/kobalt.rb b/Formula/kobalt.rb deleted file mode 100644 index 5b20e857ed445..0000000000000 --- a/Formula/kobalt.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Kobalt < Formula - desc "Build system" - homepage "https://beust.com/kobalt/" - url "https://github.com/cbeust/kobalt/releases/download/1.0.129/kobalt-1.0.129.zip" - sha256 "0b4db9992f18f3b04503aa09dbb690bb12761552b392e24d49b04cc77b8bff68" - license "Apache-2.0" - - bottle :unneeded - - def install - libexec.install "kobalt-#{version}/kobalt" - - (bin/"kobaltw").write <<~EOS - #!/bin/bash - java -jar #{libexec}/kobalt/wrapper/kobalt-wrapper.jar $* - EOS - end - - test do - (testpath/"src/main/kotlin/com/A.kt").write <<~EOS - package com - class A - EOS - - (testpath/"kobalt/src/Build.kt").write <<~EOS - import com.beust.kobalt.* - import com.beust.kobalt.api.* - import com.beust.kobalt.plugin.packaging.* - - val p = project { - name = "test" - version = "1.0" - assemble { - jar {} - } - } - EOS - - system "#{bin}/kobaltw", "assemble" - output = "kobaltBuild/libs/test-1.0.jar" - assert_predicate testpath/output, :exist?, "Couldn't find #{output}" - end -end diff --git a/Formula/kommit.rb b/Formula/kommit.rb deleted file mode 100644 index 046f4e37543de..0000000000000 --- a/Formula/kommit.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Kommit < Formula - desc "More detailed commit messages without committing!" - homepage "https://github.com/vigo/kommit" - url "https://github.com/vigo/kommit/archive/v1.1.0.tar.gz" - sha256 "c51e87c9719574feb9841fdcbd6d1a43b73a45afeca25e1312d2699fdf730161" - license "MIT" - - bottle :unneeded - - def install - bin.install "bin/git-kommit" - end - - test do - system "git", "init" - system "#{bin}/git-kommit", "-m", "Hello" - assert_match /Hello/, shell_output("#{bin}/git-kommit -s /dev/null 2>&1") - end -end diff --git a/Formula/kompose.rb b/Formula/kompose.rb deleted file mode 100644 index 4b5e5b8d9b85d..0000000000000 --- a/Formula/kompose.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Kompose < Formula - desc "Tool to move from `docker-compose` to Kubernetes" - homepage "https://kompose.io/" - url "https://github.com/kubernetes/kompose/archive/v1.21.0.tar.gz" - sha256 "64bcb4705e8312c83faaefd8ff4399936e69413662344a683becc2c34d8679f6" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "49e2f40f406d9de4c53a4cdfe4c5e33f2725521dd6e37b42fbe27ee2e004ac89" => :catalina - sha256 "90a31f44f8dfc99b19485f753c27150e693882f2e35f2f5baaadb7c0e367ebf9" => :mojave - sha256 "753239b64a99b54c4e808d628b6ecb697a5f3f91b7c2211b0a666254472c8a14" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - mkdir_p buildpath/"src/github.com/kubernetes" - ln_s buildpath, buildpath/"src/github.com/kubernetes/kompose" - system "make", "bin" - bin.install "kompose" - - output = Utils.safe_popen_read("#{bin}/kompose", "completion", "bash") - (bash_completion/"kompose").write output - - output = Utils.safe_popen_read("#{bin}/kompose", "completion", "zsh") - (zsh_completion/"_kompose").write output - end - - test do - assert_match version.to_s, shell_output("#{bin}/kompose version") - end -end diff --git a/Formula/komposition.rb b/Formula/komposition.rb deleted file mode 100644 index 7115f4b2d8161..0000000000000 --- a/Formula/komposition.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Komposition < Formula - desc "Video editor built for screencasters" - homepage "https://github.com/owickstrom/komposition" - url "https://github.com/owickstrom/komposition/archive/v0.2.0.tar.gz" - sha256 "cedb41c68866f8d6a87579f566909fcd32697b03f66c0e2a700a94b6a9263b88" - license "MPL-2.0" - revision 3 - head "https://github.com/owickstrom/komposition.git" - - bottle do - cellar :any - sha256 "dc76316ff64beb2d4756ba554844a57d546a0bbe8a300ce1879a6cddcb72ebf8" => :catalina - sha256 "e78904afced48a6365ec5cec4b9e97ecccf4bf81401c5576a0c3b21fa1078264" => :mojave - sha256 "137747b62de4e68164bceccd009beb65606ae6ba2c94fbe9a72b0eee50ae0961" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.8" => :build - depends_on "pkg-config" => :build - depends_on "ffmpeg" - depends_on "gobject-introspection" - depends_on "gst-libav" - depends_on "gst-plugins-base" - depends_on "gst-plugins-good" - depends_on "gstreamer" - depends_on "gstreamer" - depends_on "gtk+3" - depends_on "sox" - - uses_from_macos "libffi" - - # fix a constraint issue with protolude - # remove once new version with - # https://github.com/owickstrom/komposition/pull/102 is included - patch do - url "https://github.com/owickstrom/komposition/pull/102.diff?full_index=1" - sha256 "bdf561d07f1b8d41a4c030e121becab3b70882da8ccee53c1e91c6c0931fee0c" - end - - def install - system "cabal", "v2-update" - system "cabal", "v2-install", *std_cabal_v2_args - end - - test do - output = shell_output "#{bin}/komposition doesnotexist 2>&1" - assert_match "[ERROR] Opening existing project failed: ProjectDirectoryDoesNotExist \"doesnotexist\"", output - end -end diff --git a/Formula/kops.rb b/Formula/kops.rb deleted file mode 100644 index d04e6579d7aea..0000000000000 --- a/Formula/kops.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Kops < Formula - desc "Production Grade K8s Installation, Upgrades, and Management" - homepage "https://github.com/kubernetes/kops" - url "https://github.com/kubernetes/kops/archive/1.17.1.tar.gz" - sha256 "880414505447ae8ff4b91ea5c75e5de1a532a66f113e51db15b83672c8cb78d2" - license "Apache-2.0" - head "https://github.com/kubernetes/kops.git" - - bottle do - cellar :any_skip_relocation - sha256 "4d0383ddcb2f85780a0be412d6dd3fcfd9bc33655dc371b500ef6bf2267fcdf8" => :catalina - sha256 "d8c1de857e2c053e4091042949b0a09ecb1c69f6a085884fac29861489a11ed1" => :mojave - sha256 "921c6742f69758f41d1decff640dc1fa42237f0056c5d3c905a5194d8f5b7b33" => :high_sierra - end - - depends_on "go" => :build - depends_on "kubernetes-cli" - - def install - ENV["VERSION"] = version unless build.head? - ENV["GOPATH"] = buildpath - kopspath = buildpath/"src/k8s.io/kops" - kopspath.install Dir["*"] - system "make", "-C", kopspath - bin.install("bin/kops") - - # Install bash completion - output = Utils.safe_popen_read("#{bin}/kops", "completion", "bash") - (bash_completion/"kops").write output - - # Install zsh completion - output = Utils.safe_popen_read("#{bin}/kops", "completion", "zsh") - (zsh_completion/"_kops").write output - end - - test do - system "#{bin}/kops", "version" - end -end diff --git a/Formula/kore.rb b/Formula/kore.rb deleted file mode 100644 index 3d91cf112f97d..0000000000000 --- a/Formula/kore.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Kore < Formula - desc "Web application framework for writing web APIs in C" - homepage "https://kore.io/" - url "https://kore.io/releases/kore-3.3.1.tar.gz" - sha256 "c80d7a817883e631adf9eb5271b4ffa6ebb06c2e2fca40ce6c3c75638c08b67a" - license "ISC" - revision 1 - head "https://github.com/jorisvink/kore.git" - - bottle do - sha256 "abbcf36f378af2db9914b9f6edf1a4e4808723a9d0421056bd6de645f5393dd2" => :catalina - sha256 "760a9977cc46ad5f46e5d9b3397af22e0ff1df60e33acc622851d7a8babb2234" => :mojave - sha256 "0c76cfc29a1c006207b09015550a0f33b5c54a1aaff542c1e8843a6531c083c8" => :high_sierra - sha256 "719bd8b11d2757fec07aa6558c95c500f2a7b6148a0ebbf2563d1012dc4eece2" => :sierra - end - - depends_on :macos => :sierra # needs clock_gettime - - depends_on "openssl@1.1" - - def install - # Ensure make finds our OpenSSL when Homebrew isn't in /usr/local. - # Current Makefile hardcodes paths for default MacPorts/Homebrew. - ENV.prepend "CFLAGS", "-I#{Formula["openssl@1.1"].opt_include}" - ENV.prepend "LDFLAGS", "-L#{Formula["openssl@1.1"].opt_lib}" - # Also hardcoded paths in src/cli.c at compile. - inreplace "src/cli.c", "/usr/local/opt/openssl/include", - Formula["openssl@1.1"].opt_include - - system "make", "PREFIX=#{prefix}", "TASKS=1" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system bin/"kodev", "create", "test" - cd "test" do - system bin/"kodev", "build" - system bin/"kodev", "clean" - end - end -end diff --git a/Formula/kotlin.rb b/Formula/kotlin.rb deleted file mode 100644 index 65c6be3f86fdb..0000000000000 --- a/Formula/kotlin.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Kotlin < Formula - desc "Statically typed programming language for the JVM" - homepage "https://kotlinlang.org/" - url "https://github.com/JetBrains/kotlin/releases/download/v1.3.72/kotlin-compiler-1.3.72.zip" - sha256 "ccd0db87981f1c0e3f209a1a4acb6778f14e63fe3e561a98948b5317e526cc6c" - - bottle :unneeded - - def install - libexec.install "bin", "build.txt", "lib" - rm Dir["#{libexec}/bin/*.bat"] - bin.install_symlink Dir["#{libexec}/bin/*"] - prefix.install "license" - end - - test do - (testpath/"test.kt").write <<~EOS - fun main(args: Array) { - println("Hello World!") - } - EOS - system "#{bin}/kotlinc", "test.kt", "-include-runtime", "-d", "test.jar" - system "#{bin}/kotlinc-js", "test.kt", "-output", "test.js" - system "#{bin}/kotlinc-jvm", "test.kt", "-include-runtime", "-d", "test.jar" - end -end diff --git a/Formula/kpcli.rb b/Formula/kpcli.rb deleted file mode 100644 index 26f48ef585146..0000000000000 --- a/Formula/kpcli.rb +++ /dev/null @@ -1,108 +0,0 @@ -require "language/perl" - -class Kpcli < Formula - include Language::Perl::Shebang - - desc "Command-line interface to KeePass database files" - homepage "https://kpcli.sourceforge.io/" - url "https://downloads.sourceforge.net/project/kpcli/kpcli-3.4.pl" - sha256 "403e5d73cc4685722a5e4207c5fcbdad8e30475434cfba151c095e13a2658668" - - bottle do - cellar :any - sha256 "efd9da40a0733bc1da58ab3ba12149743cc4bf034b1e91bb4cc00d09e8532552" => :catalina - sha256 "416401e644f180dc05d3da14486c1c281e860752d5e525888bfaa2ea34d83e5e" => :mojave - sha256 "40f4fe9bf01d09f432bb55c4d1f4c52d3a8466e2b62b0793b65c20ef4bd3ee4d" => :high_sierra - end - - depends_on "readline" - - uses_from_macos "perl" - - resource "File::KeePass" do - url "https://cpan.metacpan.org/authors/id/R/RH/RHANDOM/File-KeePass-2.03.tar.gz" - sha256 "c30c688027a52ff4f58cd69d6d8ef35472a7cf106d4ce94eb73a796ba7c7ffa7" - end - - resource "Crypt::Rijndael" do - url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Crypt-Rijndael-1.14.tar.gz" - sha256 "6451c3dffe8703523be2bb08d1adca97e77df2a8a4dd46944d18a99330b7850e" - 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::ShellUI" do - url "https://cpan.metacpan.org/authors/id/B/BR/BRONSON/Term-ShellUI-0.92.tar.gz" - sha256 "3279c01c76227335eeff09032a40f4b02b285151b3576c04cacd15be05942bdb" - end - - resource "Term::Readline::Gnu" do - url "https://cpan.metacpan.org/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.36.tar.gz" - sha256 "9a08f7a4013c9b865541c10dbba1210779eb9128b961250b746d26702bab6925" - end - - resource "Data::Password" do - url "https://cpan.metacpan.org/authors/id/R/RA/RAZINF/Data-Password-1.12.tar.gz" - sha256 "830cde81741ff384385412e16faba55745a54a7cc019dd23d7ed4f05d551a961" - end - - resource "Clipboard" do - url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Clipboard-0.22.tar.gz" - sha256 "9fdb4dfc2e9bc2f3990b5b71649094dfe83aa12172c5a1809cf7e8b3be295ca7" - end - - resource "Mac::Pasteboard" do - url "https://cpan.metacpan.org/authors/id/W/WY/WYANT/Mac-Pasteboard-0.011.tar.gz" - sha256 "bd8c4510b1e805c43e4b55155c0beaf002b649fe30b6a7841ff05e7399ba02a9" - end - - resource "Capture::Tiny" do - url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.48.tar.gz" - sha256 "6c23113e87bad393308c90a207013e505f659274736638d8c79bac9c67cc3e19" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - ENV.prepend_path "PERL5LIB", libexec/"lib" - - resources = [ - "File::KeePass", - "Crypt::Rijndael", - "Sort::Naturally", - "Term::ShellUI", - "Data::Password", - "Clipboard", - "Mac::Pasteboard", - "Capture::Tiny", - ] - resources.each do |r| - resource(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 - - rewrite_shebang detected_perl_shebang, "kpcli-#{version}.pl" - - libexec.install "kpcli-#{version}.pl" => "kpcli" - chmod 0755, libexec/"kpcli" - (bin/"kpcli").write_env_script("#{libexec}/kpcli", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - system bin/"kpcli", "--help" - end -end diff --git a/Formula/kqwait.rb b/Formula/kqwait.rb deleted file mode 100644 index 0eeb02c1c0f79..0000000000000 --- a/Formula/kqwait.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Kqwait < Formula - desc "Wait for events on files or directories on macOS" - homepage "https://github.com/sschober/kqwait" - url "https://github.com/sschober/kqwait/archive/kqwait-v1.0.3.tar.gz" - sha256 "878560936d473f203c0ccb3d42eadccfb50cff15e6f15a59061e73704474c531" - head "https://github.com/sschober/kqwait.git" - - bottle do - cellar :any_skip_relocation - sha256 "a126094dabbb2fd9a2c539b1515657c1855bb0c971492ca0d6c56aa97bfebe48" => :catalina - sha256 "474c5ae5f69ca9a2a239d601733b88ad2eeca8701bae1b5431385bb05fff6b24" => :mojave - sha256 "dff2354e240808ec604ebd457c45ca9f2fe540fc235fc30c71c7d4effae5d0a3" => :high_sierra - sha256 "cdf423b95df66f4875df6355e1bef51c41132d1de83205d2a1f87663be5edfb8" => :sierra - sha256 "889401570c96026d7e343d48165cd2bc61735678e0125902e7d36680fa64d9a9" => :el_capitan - sha256 "c65e153f40c8f7a3e8732f4cb386e2758cdff079e7600524011ca7c6d1da4a0d" => :yosemite - sha256 "12b37969bfe8cabc32eef282d25cab5c5f973f91d29345c9d1a6ea9a61de0c68" => :mavericks - end - - def install - system "make" - bin.install "kqwait" - end - - test do - system "#{bin}/kqwait", "-v" - end -end diff --git a/Formula/krakend.rb b/Formula/krakend.rb deleted file mode 100644 index 909fc59457e26..0000000000000 --- a/Formula/krakend.rb +++ /dev/null @@ -1,103 +0,0 @@ -class Krakend < Formula - desc "Ultra-High performance API Gateway built in Go" - homepage "https://www.krakend.io/" - url "https://github.com/devopsfaith/krakend-ce/archive/v1.1.1.tar.gz" - sha256 "43f02c1ff1dbb8d0627f84d5332ab0974763e529b8fb154f72ca780ac562f858" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "3b2c4d19653b8c43580f994349beb23e70d5b2a1c2c187d54d8c1481d072a7ea" => :catalina - sha256 "d7dcdd8038f317dba6b12533b5750235f3e12fd2e584de5b4e5a56f29428e092" => :mojave - sha256 "db6cc9c73c230995752276f410b742b848d718ab9e6c6b783a6dfc3035f96dc9" => :high_sierra - end - - depends_on "go" => :build - - def install - (buildpath/"src/github.com/devopsfaith/krakend-ce").install buildpath.children - cd "src/github.com/devopsfaith/krakend-ce" do - system "make", "build" - bin.install "krakend" - prefix.install_metafiles - end - end - - test do - (testpath/"krakend_unsupported_version.json").write <<~EOS - { - "version": 1, - "extra_config": { - "github_com/devopsfaith/krakend-gologging": { - "level": "WARNING", - "prefix": "[KRAKEND]", - "syslog": false, - "stdout": true - } - } - } - EOS - assert_match "Unsupported version", - shell_output("#{bin}/krakend check -c krakend_unsupported_version.json 2>&1", 1) - - (testpath/"krakend_bad_file.json").write <<~EOS - { - "version": 2, - "bad": file - } - EOS - assert_match "ERROR", - shell_output("#{bin}/krakend check -c krakend_bad_file.json 2>&1", 1) - - (testpath/"krakend.json").write <<~EOS - { - "version": 2, - "extra_config": { - "github_com/devopsfaith/krakend-gologging": { - "level": "WARNING", - "prefix": "[KRAKEND]", - "syslog": false, - "stdout": true - } - }, - "endpoints": [ - { - "endpoint": "/test", - "method": "GET", - "concurrent_calls": 1, - "extra_config": { - "github_com/devopsfaith/krakend-httpsecure": { - "disable": true, - "allowed_hosts": [], - "ssl_proxy_headers": {} - }, - "github.com/devopsfaith/krakend-ratelimit/juju/router": { - "maxRate": 0, - "clientMaxRate": 0 - } - }, - "backend": [ - { - "url_pattern": "/backend", - "extra_config": { - "github.com/devopsfaith/krakend-oauth2-clientcredentials": { - "is_disabled": true, - "endpoint_params": {} - } - }, - "encoding": "json", - "sd": "dns", - "host": [ - "host1" - ], - "disable_host_sanitize": true - } - ] - } - ] - } - EOS - assert_match "OK", - shell_output("#{bin}/krakend check -c krakend.json 2>&1") - end -end diff --git a/Formula/krb5.rb b/Formula/krb5.rb deleted file mode 100644 index c1bcb8171f039..0000000000000 --- a/Formula/krb5.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Krb5 < Formula - desc "Network authentication protocol" - homepage "https://web.mit.edu/kerberos/" - url "https://kerberos.org/dist/krb5/1.18/krb5-1.18.2.tar.gz" - sha256 "c6e4c9ec1a98141c3f5d66ddf1a135549050c9fab4e9a4620ee9b22085873ae0" - - bottle do - sha256 "db39e4570abab6459fb857cb41fdd0a375810d25a4c712f4504585255397d150" => :catalina - sha256 "e35ce1f9da67683b70fa075f4317a476c8356860c0a1c935d6a56eaee6716e8e" => :mojave - sha256 "972a37782e92d2dec91a9f6cd90d2a98f4004101268579e1a1d6c3650014bed4" => :high_sierra - end - - keg_only :provided_by_macos - - depends_on "openssl@1.1" - - uses_from_macos "bison" - - def install - cd "src" do - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--without-system-verto" - system "make" - system "make", "install" - end - end - - test do - system "#{bin}/krb5-config", "--version" - assert_match include.to_s, - shell_output("#{bin}/krb5-config --cflags") - end -end diff --git a/Formula/krew.rb b/Formula/krew.rb deleted file mode 100644 index 7628ae22be225..0000000000000 --- a/Formula/krew.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Krew < Formula - desc "Package manager for kubectl plugins" - homepage "https://sigs.k8s.io/krew/" - url "https://github.com/kubernetes-sigs/krew.git", - :tag => "v0.3.4", - :revision => "324f5ed8fa7c2469ed6cd5a3dadbcbc0ce1d8b97" - sha256 "d63e0ccc08f32bfc314b3bc574f20842041e2f58ab89ddc88a24cb25c1caee38" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "530b8df4b6c973f2aa45b8e4ed565979963771b1f5d3638231f8705a97c162b3" => :catalina - sha256 "e51ee6903e65b289910dbccb11ac8de741a9f52d8ac3adb555a6b5684e6ec938" => :mojave - sha256 "ee763d27b51175e050bb3bd00335c7f950eaf823d6b73aeb03e8d67f41240227" => :high_sierra - end - - depends_on "go" => :build - depends_on "kubernetes-cli" - - def install - commit = Utils.safe_popen_read("git", "rev-parse", "--short=8", "HEAD").chomp - ENV["CGO_ENABLED"] = "0" - # build in local dir to avoid this error: - # go build: cannot write multiple packages to non-directory /usr/local/Cellar/krew/0.3.2/bin/krew - mkdir "build" - - ldflags = %W[ - -w - -X sigs.k8s.io/krew/pkg/version.gitCommit=#{commit} - -X sigs.k8s.io/krew/pkg/version.gitTag=v#{version} - ] - - system "go", "build", "-o", "build", "-tags", "netgo", - "-ldflags", ldflags.join(" "), "./cmd/krew" - # install as kubectl-krew for kubectl to find as plugin - bin.install "build/krew" => "kubectl-krew" - end - - test do - ENV["KREW_ROOT"] = testpath - ENV["PATH"] = "#{ENV["PATH"]}:#{testpath}/bin" - system "#{bin}/kubectl-krew", "version" - system "#{bin}/kubectl-krew", "update" - system "#{bin}/kubectl-krew", "install", "ctx" - assert_predicate testpath/"bin/kubectl-ctx", :exist? - end -end diff --git a/Formula/ksh.rb b/Formula/ksh.rb deleted file mode 100644 index 7035ffd1b300c..0000000000000 --- a/Formula/ksh.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Ksh < Formula - desc "KornShell, ksh93" - homepage "http://www.kornshell.com/" - url "https://github.com/att/ast/releases/download/2020.0.0/ksh-2020.0.0.tar.gz" - sha256 "8701c27211b0043ddd485e35f2ba7f4075fc8fc2818d0545e38b1dda4288b6f7" - license "EPL-1.0" - - bottle do - cellar :any_skip_relocation - sha256 "ea7be886a6acee55713ca673ce1578a1303389fb2a964734c38137d3610d7f2b" => :catalina - sha256 "3bc3469d43fba904b3045722d43bb52444f88c2e6745af977bae9b52d1f0090e" => :mojave - sha256 "733e1c6bdd05054bf8d0097a6ae9ea2ca21e74b4676df7b424d4b9f43078afd4" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - assert_equal "Hello World!", pipe_output("#{bin}/ksh -e 'echo Hello World!'").chomp - end -end diff --git a/Formula/kstart.rb b/Formula/kstart.rb deleted file mode 100644 index 48b2a01dc2b80..0000000000000 --- a/Formula/kstart.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Kstart < Formula - desc "Modified version of kinit that can use keytabs to authenticate" - homepage "https://www.eyrie.org/~eagle/software/kstart/" - url "https://archives.eyrie.org/software/kerberos/kstart-4.2.tar.gz" - sha256 "2698bc1ab2fb36d49cc946b0cb864c56dd3a2f9ef596bfff59592e13d35315cd" - - bottle do - cellar :any_skip_relocation - sha256 "2f12abc9ac0bdbfca86072d55b28e475be772f9fe910082ef3050212565ec17f" => :catalina - sha256 "6c78dc7caaf8986ecf39687e5aee453aa451f885a9e1b39416a1f294a0aba12f" => :mojave - sha256 "1e587dc42a73f770ae6a6793de1fbc46a540fbbdf0935be7505b8da8646965d6" => :high_sierra - sha256 "271ec8468ad4aa1e46dbe4674f9e214d563fc2ea689279e860b4b8324d2196d8" => :sierra - sha256 "493a3dcca4b6b50ba44687c8b4d78cebf044a9c6ab465eb344aa3d29c64a39fc" => :el_capitan - sha256 "c90ef2d0808350085d616f7cfae6001b47e04ec3d2ced85bd0f7427abba6ff6f" => :yosemite - sha256 "983306746f5c1273ffb86eb4719c01527e4df317fee1c01daf371c6d60e6f8be" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/k5start", "-h" - end -end diff --git a/Formula/ktlint.rb b/Formula/ktlint.rb deleted file mode 100644 index b349c0372f436..0000000000000 --- a/Formula/ktlint.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Ktlint < Formula - desc "Anti-bikeshedding Kotlin linter with built-in formatter" - homepage "https://ktlint.github.io/" - url "https://github.com/pinterest/ktlint/releases/download/0.37.2/ktlint" - sha256 "1b301e7c6bd0b90f7541ec7ce118b497312bc5bcc37118ce33fe0571f7661ec2" - license "MIT" - - bottle :unneeded - - def install - bin.install "ktlint" - end - - test do - (testpath/"In.kt").write <<~EOS - fun main( ) - EOS - (testpath/"Out.kt").write <<~EOS - fun main() - EOS - system bin/"ktlint", "-F", "In.kt" - assert_equal shell_output("cat In.kt"), shell_output("cat Out.kt") - end -end diff --git a/Formula/ktmpl.rb b/Formula/ktmpl.rb deleted file mode 100644 index 0aef6198f91d8..0000000000000 --- a/Formula/ktmpl.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Ktmpl < Formula - desc "Parameterized templates for Kubernetes manifests" - homepage "https://github.com/jimmycuadra/ktmpl" - url "https://github.com/jimmycuadra/ktmpl/archive/0.9.0.tar.gz" - sha256 "b2f05ae4b36f31f6801f4dcd2f5aec31d7b53b8b6dea6ddf974b22c88d8bc62b" - license "MIT" - head "https://github.com/jimmycuadra/ktmpl.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d8c1e6fd18fc96f615e119c64cd7df67940cb0a9b3113450e49f567b9875c9ee" => :catalina - sha256 "7c91c4a9674effc29e0ef187fc05163500a81ac5a7c0502552b12098c72633dd" => :mojave - sha256 "2cc0b69a68bbd12cfd02e17d079363f773006a7bd07b77588cf83d7207950b3f" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - (testpath/"test.yml").write <<~EOS - --- - kind: "Template" - apiVersion: "v1" - metadata: - name: "test" - objects: - - kind: "Service" - apiVersion: "v1" - metdata: - name: "test" - spec: - ports: - - name: "test" - protocol: "TCP" - targetPort: "$((PORT))" - selector: - app: "test" - parameters: - - name: "PORT" - description: "The port the service should run on" - required: true - parameterType: "int" - EOS - system bin/"ktmpl", "test.yml", "-p", "PORT", "8080" - end -end diff --git a/Formula/ktoblzcheck.rb b/Formula/ktoblzcheck.rb deleted file mode 100644 index 82e9cb09a3c19..0000000000000 --- a/Formula/ktoblzcheck.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Ktoblzcheck < Formula - desc "Library for German banks" - homepage "https://ktoblzcheck.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ktoblzcheck/ktoblzcheck-1.53.tar.gz" - sha256 "18b9118556fe83240f468f770641d2578f4ff613cdcf0a209fb73079ccb70c55" - license "LGPL-2.1" - - bottle do - sha256 "93495421d21c635d04637865d68c922d70ed0112b01929d113d21cd533afabc1" => :catalina - sha256 "447d1889a2350c704d8c4d276c8122f8ecd24b906f5b4944e39bdbb77bf39962" => :mojave - sha256 "242eca7d985cf7d70b78a2838d96a7b91b1e67b68ca7376919296bc253a99540" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "python@3.8" - - def install - system "cmake", ".", *std_cmake_args - system "make" - system "make", "install" - end - - test do - assert_match /Ok/, shell_output("#{bin}/ktoblzcheck --outformat=oneline 10000000 123456789") - assert_match /unknown/, shell_output("#{bin}/ktoblzcheck --outformat=oneline 12345678 100000000", 3) - end -end diff --git a/Formula/kube-aws.rb b/Formula/kube-aws.rb deleted file mode 100644 index 730e85b856ddf..0000000000000 --- a/Formula/kube-aws.rb +++ /dev/null @@ -1,41 +0,0 @@ -class KubeAws < Formula - desc "Command-line tool to declaratively manage Kubernetes clusters on AWS" - homepage "https://kubernetes-incubator.github.io/kube-aws/" - url "https://github.com/kubernetes-incubator/kube-aws.git", - :tag => "v0.16.2", - :revision => "4c8ca963a4af9c4f1f0bde0e29eb39a9b4455f99" - license "Apache-2.0" - head "https://github.com/kubernetes-incubator/kube-aws.git" - - bottle do - cellar :any_skip_relocation - sha256 "15bd23749f4ee8eee545263c9a22962f7cdf7c22bbc8c44d2fa8e396947d03fb" => :catalina - sha256 "048147da6c013e2f5a3d589c17188a3bf5b54bc7aef8ef3b887bb19521c1d16d" => :mojave - sha256 "248c00b9ccc58108d71da68e1ff8a077b3f5d88dcace6bf1fd8439a4b7a73bfc" => :high_sierra - end - - depends_on "go" => :build - depends_on "packr" => :build - - def install - system "make", "OUTPUT_PATH=#{bin}/kube-aws" - end - - test do - system "#{bin}/kube-aws" - system "#{bin}/kube-aws", "init", "--cluster-name", "test-cluster", - "--external-dns-name", "dns", "--region", "us-west-1", - "--availability-zone", "zone", "--key-name", "key", - "--kms-key-arn", "arn", "--no-record-set", - "--s3-uri", "s3://examplebucket/mydir" - cluster_yaml = (testpath/"cluster.yaml").read - assert_match "clusterName: test-cluster", cluster_yaml - assert_match "dnsName: dns", cluster_yaml - assert_match "region: us-west-1", cluster_yaml - assert_match "availabilityZone: zone", cluster_yaml - assert_match "keyName: key", cluster_yaml - assert_match "kmsKeyArn: \"arn\"", cluster_yaml - installed_version = shell_output("#{bin}/kube-aws version 2>&1") - assert_match "kube-aws version v#{version}", installed_version - end -end diff --git a/Formula/kube-ps1.rb b/Formula/kube-ps1.rb deleted file mode 100644 index 9dcd4eb68456c..0000000000000 --- a/Formula/kube-ps1.rb +++ /dev/null @@ -1,30 +0,0 @@ -class KubePs1 < Formula - desc "Kubernetes prompt info for bash and zsh" - homepage "https://github.com/jonmosco/kube-ps1" - url "https://github.com/jonmosco/kube-ps1/archive/v0.7.0.tar.gz" - sha256 "f5ccaf6537e944db5b9cf40d3f01cf99732dce5adaaaf840780aa38b1b030471" - license "Apache-2.0" - head "https://github.com/jonmosco/kube-ps1.git" - - bottle :unneeded - - depends_on "kubernetes-cli" - - def install - share.install "kube-ps1.sh" - end - - def caveats - <<~EOS - Make sure kube-ps1 is loaded from your ~/.zshrc and/or ~/.bashrc: - source "#{opt_share}/kube-ps1.sh" - PS1='$(kube_ps1)'$PS1 - EOS - end - - test do - ENV["LC_CTYPE"] = "en_CA.UTF-8" - assert_equal "bash", shell_output("bash -c '. #{opt_share}/kube-ps1.sh && echo $KUBE_PS1_SHELL'").chomp - assert_match "zsh", shell_output("zsh -c '. #{opt_share}/kube-ps1.sh && echo $KUBE_PS1_SHELL'").chomp - end -end diff --git a/Formula/kubeaudit.rb b/Formula/kubeaudit.rb deleted file mode 100644 index c0e4e327fa595..0000000000000 --- a/Formula/kubeaudit.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Kubeaudit < Formula - desc "Helps audit your Kubernetes clusters against common security controls" - homepage "https://github.com/Shopify/kubeaudit" - url "https://github.com/Shopify/kubeaudit/archive/v0.8.0.tar.gz" - sha256 "0efcbc176803e7a5ebc864b82d4cc6011f85f4d63778f0bae010f1d09b7e4d66" - license "MIT" - head "https://github.com/Shopify/kubeaudit.git" - - bottle do - cellar :any_skip_relocation - sha256 "3d788171cf4f563cd2010525027e2f2359687610aed37e6af8c089a6eaeb69d4" => :catalina - sha256 "6b7bc21fb975da2d7fdf2c43ca68821b5e1a4006f19ba5faa11fd16b2c19b2ed" => :mojave - sha256 "4a88db513c8ba3ea81129cb64c620e0835e11eaadb03745630b00d414fbe76fd" => :high_sierra - end - - depends_on "go" => :build - - def install - ldflags = %W[ - -s -w - -X github.com/Shopify/kubeaudit/cmd.Version=#{version} - -X github.com/Shopify/kubeaudit/cmd.BuildDate=#{Date.today} - ] - - system "go", "build", "-ldflags", ldflags.join(" "), "-trimpath", "-o", bin/"kubeaudit" - prefix.install_metafiles - end - - test do - output = shell_output(bin/"kubeaudit -c /some-file-that-does-not-exist all 2>&1", 1).chomp - assert_match "Unable to load kubeconfig. Could not open file /some-file-that-does-not-exist.", output - end -end diff --git a/Formula/kubebuilder.rb b/Formula/kubebuilder.rb deleted file mode 100644 index 5046af78005de..0000000000000 --- a/Formula/kubebuilder.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Kubebuilder < Formula - desc "SDK for building Kubernetes APIs using CRDs" - homepage "https://github.com/kubernetes-sigs/kubebuilder" - url "https://github.com/kubernetes-sigs/kubebuilder.git", - :tag => "v2.3.1", - :revision => "8b53abeb4280186e494b726edf8f54ca7aa64a49" - license "Apache-2.0" - head "https://github.com/kubernetes-sigs/kubebuilder.git" - - bottle do - cellar :any_skip_relocation - sha256 "b587ddd6d67b12a7fd2635f8f4da56402133a036fe79e635b08427b401a9b71b" => :catalina - sha256 "7de399f00ecd47e3150e05d213a44886f499456ed5480c095100e329203ab399" => :mojave - sha256 "62040031af53761dbe639796b5dc95278be2a048380f691563fb9cd4ef7f8041" => :high_sierra - end - - depends_on "git-lfs" => :build - depends_on "go" - - def install - system "make", "build" - bin.install "bin/kubebuilder" - prefix.install_metafiles - end - - test do - mkdir "test" do - system "#{bin}/kubebuilder", "init", - "--repo=github.com/example/example-repo", "--domain=example.com", - "--license=apache2", "--owner='The Example authors'", "--fetch-deps=false" - end - end -end diff --git a/Formula/kubecfg.rb b/Formula/kubecfg.rb deleted file mode 100644 index e44a693375c42..0000000000000 --- a/Formula/kubecfg.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Kubecfg < Formula - desc "Manage complex enterprise Kubernetes environments as code" - homepage "https://github.com/bitnami/kubecfg" - url "https://github.com/bitnami/kubecfg/archive/v0.16.0.tar.gz" - sha256 "08846d19db0250a21d553cdaf1f0461dc398031b9ac76ccd360b169703f63567" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "4b1c21dd475b3d66051e4413173991f7825876fa09f82b0e0b913c2355ad3de1" => :catalina - sha256 "18a96eba78f47594337dc07a87ba17c90c3562eb665e5318bdc660b7556f1bf6" => :mojave - sha256 "1a504128fd97438fc4e35ef265bbc2b7693ddd11dc343c0a6b1dca55df593ab3" => :high_sierra - end - - depends_on "go" => :build - - def install - (buildpath/"src/github.com/bitnami/kubecfg").install buildpath.children - - cd "src/github.com/bitnami/kubecfg" do - system "make", "VERSION=v#{version}" - bin.install "kubecfg" - pkgshare.install Dir["examples/*"], "testdata/kubecfg_test.jsonnet" - prefix.install_metafiles - end - - output = Utils.safe_popen_read("#{bin}/kubecfg", "completion", "--shell", "bash") - (bash_completion/"kubecfg").write output - output = Utils.safe_popen_read("#{bin}/kubecfg", "completion", "--shell", "zsh") - (zsh_completion/"_kubecfg").write output - end - - test do - system bin/"kubecfg", "show", pkgshare/"kubecfg_test.jsonnet" - end -end diff --git a/Formula/kubectx.rb b/Formula/kubectx.rb deleted file mode 100644 index 586b71dc3bb77..0000000000000 --- a/Formula/kubectx.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Kubectx < Formula - desc "Tool that can switch between kubectl contexts easily and create aliases" - homepage "https://github.com/ahmetb/kubectx" - url "https://github.com/ahmetb/kubectx/archive/v0.9.1.tar.gz" - sha256 "8f68e19b841a1f1492536dc27f9b93ea3204c7e4fd0ad2e3c483d1b8e95be675" - license "Apache-2.0" - head "https://github.com/ahmetb/kubectx.git" - - bottle :unneeded - - depends_on "kubernetes-cli" - - def install - bin.install "kubectx", "kubens" - - bash_completion.install "completion/kubectx.bash" => "kubectx" - bash_completion.install "completion/kubens.bash" => "kubens" - zsh_completion.install "completion/kubectx.zsh" => "_kubectx" - zsh_completion.install "completion/kubens.zsh" => "_kubens" - fish_completion.install "completion/kubectx.fish" - fish_completion.install "completion/kubens.fish" - end - - test do - assert_match "USAGE:", shell_output("#{bin}/kubectx -h 2>&1") - assert_match "USAGE:", shell_output("#{bin}/kubens -h 2>&1") - end -end diff --git a/Formula/kubeless.rb b/Formula/kubeless.rb deleted file mode 100644 index eeabc7a0e842a..0000000000000 --- a/Formula/kubeless.rb +++ /dev/null @@ -1,109 +0,0 @@ -class Kubeless < Formula - desc "Kubernetes Native Serverless Framework" - homepage "https://kubeless.io/" - url "https://github.com/kubeless/kubeless/archive/v1.0.7.tar.gz" - sha256 "8aedb768da672e60c489cce1a8757cb21841c9651bfe3ef7112570eaa13720fa" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "94927a41f4778a3e99934154bda7db05c4048e83d49a840ecf7eca6ddfbc32e4" => :catalina - sha256 "0b0f24835a3fb21b5a5459a030f821f2c13691ad8978a02067dfb38f15d8ac6f" => :mojave - sha256 "ec427f71d144c616cfc1803da51caf69f6ead7cefd5ade2f8c23129d73eec705" => :high_sierra - end - - depends_on "go" => :build - depends_on "kubernetes-cli" - - def install - ldflags = %W[ - -s -w -X github.com/kubeless/kubeless/pkg/version.Version=v#{version} - ] - system "go", "build", "-ldflags", ldflags.join(" "), "-trimpath", - "-o", bin/"kubeless", "./cmd/kubeless" - prefix.install_metafiles - end - - test do - port = free_port - server = TCPServer.new("127.0.0.1", port) - - pid = fork do - loop do - socket = server.accept - request = socket.gets - request_path = request.split(" ")[1] - if request_path == "/api/v1/namespaces/kubeless/configmaps/kubeless-config" - response = '{ - "kind": "ConfigMap", - "apiVersion": "v1", - "metadata": { "name": "kubeless-config", "namespace": "kubeless" }, - "data": { - "runtime-images": "[{' \ - '\"ID\": \"python\",' \ - '\"versions\": [{' \ - '\"name\": \"python27\",' \ - '\"version\": \"2.7\",' \ - '\"httpImage\": \"kubeless/python\"' \ - "}]" \ - '}]" - } - }' - elsif request_path == "/apis/kubeless.io/v1beta1/namespaces/default/functions" - response = '{ - "apiVersion": "kubeless.io/v1beta1", - "kind": "Function", - "metadata": { "name": "get-python", "namespace": "default" } - }' - elsif request_path == "/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/functions.kubeless.io" - response = '{ - "apiVersion": "apiextensions.k8s.io/v1beta1", - "kind": "CustomResourceDefinition", - "metadata": { "name": "functions.kubeless.io" } - }' - else - response = "OK" - end - socket.print "HTTP/1.1 200 OK\r\n" \ - "Content-Length: #{response.bytesize}\r\n" \ - "Connection: close\r\n" - socket.print "\r\n" - socket.print response - socket.close - end - end - - (testpath/"kube-config").write <<~EOS - apiVersion: v1 - clusters: - - cluster: - certificate-authority-data: test - server: http://127.0.0.1:#{port} - name: test - contexts: - - context: - cluster: test - user: test - name: test - current-context: test - kind: Config - preferences: {} - users: - - name: test - user: - token: test - EOS - - (testpath/"test.py").write "function_code" - - begin - ENV["KUBECONFIG"] = testpath/"kube-config" - system bin/"kubeless", "function", "deploy", "--from-file", "test.py", - "--runtime", "python2.7", "--handler", "test.foo", - "test" - ensure - Process.kill("TERM", pid) - Process.wait(pid) - end - end -end diff --git a/Formula/kubeprod.rb b/Formula/kubeprod.rb deleted file mode 100644 index b46ed4fa55879..0000000000000 --- a/Formula/kubeprod.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Kubeprod < Formula - desc "Installer for the Bitnami Kubernetes Production Runtime (BKPR)" - homepage "https://kubeprod.io/" - url "https://github.com/bitnami/kube-prod-runtime/archive/v1.5.1.tar.gz" - sha256 "247a37f9526bdec49377be4f1eefd1f37e4f8380cc515d73246518f2731ff8fc" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "202ec0c87aed643fe5532a6146b066f5958233e4143aab4b539504b7645891e1" => :catalina - sha256 "1b6ba93ae6fd9f13a5d14f7ac8732f77fe28469df4b6762f3e8426c0698bae69" => :mojave - sha256 "55aebc70fa724478dd1eb45829872dcb960e65e3c00606a4b640c4798675b4ac" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["TARGETS"] = "darwin/amd64" - dir = buildpath/"src/github.com/bitnami/kube-prod-runtime" - dir.install buildpath.children - - cd dir do - system "make", "-C", "kubeprod", "release", "VERSION=v#{version}" - bin.install "kubeprod/_dist/darwin-amd64/bkpr-v#{version}/kubeprod" - end - end - - test do - version_output = shell_output("#{bin}/kubeprod version") - assert_match "Installer version: v#{version}", version_output - - (testpath/"kube-config").write <<~EOS - 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 - EOS - - authz_domain = "castle-black.com" - project = "white-walkers" - oauth_client_id = "jon-snow" - oauth_client_secret = "king-of-the-north" - contact_email = "jon@castle-black.com" - - ENV["KUBECONFIG"] = testpath/"kube-config" - system "#{bin}/kubeprod", "install", "gke", - "--authz-domain", authz_domain, - "--project", project, - "--oauth-client-id", oauth_client_id, - "--oauth-client-secret", oauth_client_secret, - "--email", contact_email, - "--only-generate" - - json = File.read("kubeprod-autogen.json") - assert_match "\"authz_domain\": \"#{authz_domain}\"", json - assert_match "\"client_id\": \"#{oauth_client_id}\"", json - assert_match "\"client_secret\": \"#{oauth_client_secret}\"", json - assert_match "\"contactEmail\": \"#{contact_email}\"", json - - jsonnet = File.read("kubeprod-manifest.jsonnet") - assert_match "https://releases.kubeprod.io/files/v#{version}/manifests/platforms/gke.jsonnet", jsonnet - end -end diff --git a/Formula/kubernetes-cli.rb b/Formula/kubernetes-cli.rb deleted file mode 100644 index 47059370dfd20..0000000000000 --- a/Formula/kubernetes-cli.rb +++ /dev/null @@ -1,65 +0,0 @@ -class KubernetesCli < Formula - desc "Kubernetes command-line interface" - homepage "https://kubernetes.io/" - url "https://github.com/kubernetes/kubernetes.git", - :tag => "v1.18.5", - :revision => "e6503f8d8f769ace2f338794c914a96fc335df0f" - license "Apache-2.0" - head "https://github.com/kubernetes/kubernetes.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "23c3217506d45d24de95a35c5faf1ebbea2de5f0808b5f9188d4b0e8478b7193" => :catalina - sha256 "46294501a1e6a1a18869323b41b7982e8ca62f0b500ecfde7cfef2db181071d7" => :mojave - sha256 "2b76da4664aa250550fe1b1fc4c46f9faad7cbc8597ba43ec31c78bbec85afa7" => :high_sierra - end - - depends_on "go" => :build - - uses_from_macos "rsync" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/k8s.io/kubernetes" - dir.install buildpath.children - [buildpath/".brew_home"] - - cd dir do - # Race condition still exists in OS X Yosemite - # Filed issue: https://github.com/kubernetes/kubernetes/issues/34635 - ENV.deparallelize { system "make", "generated_files" } - - # Make binary - system "make", "kubectl" - bin.install "_output/local/bin/darwin/amd64/kubectl" - - # Install bash completion - output = Utils.safe_popen_read("#{bin}/kubectl", "completion", "bash") - (bash_completion/"kubectl").write output - - # Install zsh completion - output = Utils.safe_popen_read("#{bin}/kubectl", "completion", "zsh") - (zsh_completion/"_kubectl").write output - - prefix.install_metafiles - - # Install man pages - # Leave this step for the end as this dirties the git tree - system "hack/generate-docs.sh" - man1.install Dir["docs/man/man1/*.1"] - end - end - - test do - run_output = shell_output("#{bin}/kubectl 2>&1") - assert_match "kubectl controls the Kubernetes cluster manager.", run_output - - version_output = shell_output("#{bin}/kubectl version --client 2>&1") - assert_match "GitTreeState:\"clean\"", version_output - if build.stable? - assert_match stable.instance_variable_get(:@resource) - .instance_variable_get(:@specs)[:revision], - version_output - end - end -end diff --git a/Formula/kubernetes-service-catalog-client.rb b/Formula/kubernetes-service-catalog-client.rb deleted file mode 100644 index ba3624e227d48..0000000000000 --- a/Formula/kubernetes-service-catalog-client.rb +++ /dev/null @@ -1,33 +0,0 @@ -class KubernetesServiceCatalogClient < Formula - desc "Consume Services in k8s using the OSB API" - homepage "https://svc-cat.io/" - url "https://github.com/kubernetes-sigs/service-catalog/archive/v0.3.0.tar.gz" - sha256 "3f79365cbe9c63513ddf3ad836177f0bd9ecee5b36cad015a3e9353e47cc874e" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "d17afa1cc5c192ba9ff73777a71d288744b52f08d49c3ca3eb0b57d46f529873" => :catalina - sha256 "0fc4e96709b5f3a71afe4a526e70842b28b5aad677af9c6de7f3dcc62b94d891" => :mojave - sha256 "4dda09b950c138a452a3a66d6742ef912761ac0365cc725ca9fad39189496690" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["NO_DOCKER"] = "1" - - ldflags = %W[ - -s -w - -X github.com/kubernetes-sigs/service-catalog/pkg.VERSION=v#{version} - ] - system "go", "build", "-ldflags", ldflags.join(" "), "-o", - bin/"svcat", "./cmd/svcat" - prefix.install_metafiles - end - - test do - version_output = shell_output("#{bin}/svcat version --client 2>&1", 1) - assert_match "Error: could not get Kubernetes config for context", version_output - end -end diff --git a/Formula/kubespy.rb b/Formula/kubespy.rb deleted file mode 100644 index 15889090c25f6..0000000000000 --- a/Formula/kubespy.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Kubespy < Formula - desc "Tools for observing Kubernetes resources in realtime" - homepage "https://github.com/pulumi/kubespy" - url "https://github.com/pulumi/kubespy.git", - :tag => "v0.5.1", - :revision => "438edbfd5a9a72992803d45addb1f45b10a0b62f" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "783702f8de5226fb50d35d30ee4f600f3c8ba82006e2ec52c6f643994f97ed65" => :catalina - sha256 "0793f861231c44c23578b3c6d8faab29c868eb3ca4cc5786ad76536863fb04e0" => :mojave - sha256 "a39ae5031e190cf58be0863d51738225366da5d36ede449af4146bd782b48e7a" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - dir = buildpath/"src/github.com/pulumi/kubespy" - dir.install buildpath.children - - cd dir do - system "make", "build" - bin.install "kubespy" - prefix.install_metafiles - end - end - - test do - assert_match "v#{version}", shell_output("#{bin}/kubespy version") - end -end diff --git a/Formula/kumactl.rb b/Formula/kumactl.rb deleted file mode 100644 index b62e0d474d9bd..0000000000000 --- a/Formula/kumactl.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Kumactl < Formula - desc "Kuma control plane command-line utility" - homepage "https://kuma.io/" - url "https://github.com/Kong/kuma/archive/0.6.0.tar.gz" - sha256 "c9087793f10ce094ae2910bffae62b5df8f108854d9b8950fa8bdc74f058b3da" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "63c8e3034a5a549b768dd7103fc7b390317e02e336f5f13b858aa050d3a4356b" => :catalina - sha256 "d284fa873525a9e5f0abed0f3c1bcbe2a0be14ebe667d08e52185749d660136f" => :mojave - sha256 "5d680c089eea27d8c03f26006a4c74eb321c84bb3f96608cec22063b663f69ca" => :high_sierra - end - - depends_on "go" => :build - - def install - srcpath = buildpath/"src/kuma.io/kuma" - outpath = srcpath/"build/artifacts-darwin-amd64/kumactl" - srcpath.install buildpath.children - - cd srcpath do - system "make", "build/kumactl", "BUILD_INFO_VERSION=#{version}" - prefix.install_metafiles - bin.install outpath/"kumactl" - end - end - - test do - assert_match "Management tool for Kuma.", shell_output("#{bin}/kumactl") - assert_match version.to_s, shell_output("#{bin}/kumactl version 2>&1") - - touch testpath/"config" - assert_match "Error: YAML contains invalid resource: Name field cannot be empty", - shell_output("#{bin}/kumactl apply -f config 2>&1", 1) - end -end diff --git a/Formula/kumo.rb b/Formula/kumo.rb deleted file mode 100644 index 745f00f9dd172..0000000000000 --- a/Formula/kumo.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Kumo < Formula - desc "Word Clouds in Java" - homepage "https://github.com/kennycason/kumo" - url "https://search.maven.org/remotecontent?filepath=com/kennycason/kumo-cli/1.27/kumo-cli-1.27.jar" - sha256 "f3643a734e6f8d9c31b0a50f7d4df3f99ea0bf81377efd5a79291b2fff51f1e6" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "kumo-cli-#{version}.jar" - (bin/"kumo").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/kumo-cli-#{version}.jar" "$@" - EOS - end - - test do - system bin/"kumo", "-i", "https://wikipedia.org/", "-o", testpath/"wikipedia.png" - assert_predicate testpath/"wikipedia.png", :exist?, "Wordcloud was not generated!" - end -end diff --git a/Formula/kustomize.rb b/Formula/kustomize.rb deleted file mode 100644 index 2d3e8e27bf408..0000000000000 --- a/Formula/kustomize.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Kustomize < Formula - desc "Template-free customization of Kubernetes YAML manifests" - homepage "https://github.com/kubernetes-sigs/kustomize" - url "https://github.com/kubernetes-sigs/kustomize.git", - :tag => "kustomize/v3.8.0", - :revision => "6a50372dd5686df22750b0c729adaf369fbf193c" - license "Apache-2.0" - head "https://github.com/kubernetes-sigs/kustomize.git" - - bottle do - cellar :any_skip_relocation - sha256 "e7cb7a07b3c3e2740178700b024f17a8c1bd93d99a4ddb253dcd24c5d077ab11" => :catalina - sha256 "a52447ddab6a6120c585a3b655d17547103db00e227a6a6350c5488ef6c19f5c" => :mojave - sha256 "45c4afd89bf791b35a260639408090d680a7384eac0567ec343532ff2138a5d7" => :high_sierra - end - - depends_on "go" => :build - - def install - revision = Utils.safe_popen_read("git", "rev-parse", "HEAD").strip - - cd "kustomize" do - ldflags = %W[ - -s -X sigs.k8s.io/kustomize/api/provenance.version=#{version} - -X sigs.k8s.io/kustomize/api/provenance.gitCommit=#{revision} - -X sigs.k8s.io/kustomize/api/provenance.buildDate=#{Time.now.iso8601} - ] - system "go", "build", "-ldflags", ldflags.join(" "), "-o", bin/"kustomize" - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/kustomize version") - - (testpath/"kustomization.yaml").write <<~EOS - resources: - - service.yaml - patchesStrategicMerge: - - patch.yaml - EOS - (testpath/"patch.yaml").write <<~EOS - apiVersion: v1 - kind: Service - metadata: - name: brew-test - spec: - selector: - app: foo - EOS - (testpath/"service.yaml").write <<~EOS - apiVersion: v1 - kind: Service - metadata: - name: brew-test - spec: - type: LoadBalancer - EOS - output = shell_output("#{bin}/kustomize build #{testpath}") - assert_match /type:\s+"?LoadBalancer"?/, output - end -end diff --git a/Formula/kvazaar.rb b/Formula/kvazaar.rb deleted file mode 100644 index 9f569a4a7bd33..0000000000000 --- a/Formula/kvazaar.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Kvazaar < Formula - desc "Ultravideo HEVC encoder" - homepage "https://github.com/ultravideo/kvazaar" - url "https://github.com/ultravideo/kvazaar/archive/v2.0.0.tar.gz" - sha256 "213edca448f127f9c6d194cdfd21593d10331f9061d95751424e1001bae60b5d" - head "https://github.com/ultravideo/kvazaar.git" - - bottle do - cellar :any - sha256 "75467ab21cc9bb1a3f81f41949a0312300f9d470b4547e827111379b94a237d8" => :catalina - sha256 "d146e6aa5dda30a3353f72bae18356622fe613e1a7a43ae6d5d5e2fa8bfc2aba" => :mojave - sha256 "50723e7fbe1dfb25f2ba39b84f4059b208bed481ae0832d00f24c7221bdde905" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "yasm" => :build - - resource "videosample" do - url "https://samples.mplayerhq.hu/V-codecs/lm20.avi" - sha256 "a0ab512c66d276fd3932aacdd6073f9734c7e246c8747c48bf5d9dd34ac8b392" - end - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - # download small sample and try to encode it - resource("videosample").stage do - system bin/"kvazaar", "-i", "lm20.avi", "--input-res", "16x16", "-o", "lm20.hevc" - assert_predicate Pathname.pwd/"lm20.hevc", :exist? - end - end -end diff --git a/Formula/kyma-cli.rb b/Formula/kyma-cli.rb deleted file mode 100644 index 8b02b049d0aaf..0000000000000 --- a/Formula/kyma-cli.rb +++ /dev/null @@ -1,35 +0,0 @@ -class KymaCli < Formula - desc "Kyma command-line interface" - homepage "https://kyma-project.io/" - url "https://github.com/kyma-project/cli.git", - :tag => "1.13.0", - :revision => "4b943c861be35b5d563be4a5ebb6108752128c81" - license "Apache-2.0" - head "https://github.com/kyma-project/cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "31250ef53da7d2d54659867bbb41122a8aced78fbdf7afac97a7cdbc755e2232" => :catalina - sha256 "75b428267bd96bece87a36e4d57b5915406ea5669a825b5d2c7d31d460de58dd" => :mojave - sha256 "bd8d44c4b6ea8f2ca516e795e33ece1a399cf93ab078902e24ac969494a5230e" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "build-darwin" - bin.install "bin/kyma-darwin" => "kyma" - end - - test do - assert_match "Kyma is a flexible and easy way to connect and extend enterprise applications", - shell_output("#{bin}/kyma --help") - - assert_match "Kyma CLI version", - shell_output("#{bin}/kyma version --client") - - touch testpath/"kubeconfig" - assert_match "invalid configuration", - shell_output("#{bin}/kyma install --kubeconfig ./kubeconfig 2>&1", 1) - end -end diff --git a/Formula/kyoto-cabinet.rb b/Formula/kyoto-cabinet.rb deleted file mode 100644 index 2ac40ef3febf3..0000000000000 --- a/Formula/kyoto-cabinet.rb +++ /dev/null @@ -1,36 +0,0 @@ -class KyotoCabinet < Formula - desc "Library of routines for managing a database" - homepage "https://fallabs.com/kyotocabinet/" - url "https://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.77.tar.gz" - sha256 "56899329384cc6f0f1f8aa3f1b41001071ca99c1d79225086a7f3575c0209de6" - license "GPL-3.0" - - bottle do - sha256 "444a9c86b36b081cc9ad31ef68d8c4e03f0861b9f0603a7fe5c99780cdab3926" => :catalina - sha256 "ddd2f1b0f1985ad81b04b29dbd54f95c5f7c88f7427b559e9f298a6473a820b0" => :mojave - sha256 "e4b99c22b5aebf85986e5c172ec61768833708acbb04318335f6641bea1f77ef" => :high_sierra - sha256 "04ef198a6638dabdee27e881df9b16970eadc724f2f663a01edee7950b38b85a" => :sierra - end - - patch :DATA - - def install - system "./configure", "--disable-debug", "--prefix=#{prefix}" - system "make" # Separate steps required - system "make", "install" - end -end - - -__END__ ---- a/kccommon.h 2013-11-08 09:27:37.000000000 -0500 -+++ b/kccommon.h 2013-11-08 09:27:47.000000000 -0500 -@@ -82,7 +82,7 @@ - using ::snprintf; - } - --#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_MSC_VER) -+#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_MSC_VER) || defined(_LIBCPP_VERSION) - - #include - #include diff --git a/Formula/kyoto-tycoon.rb b/Formula/kyoto-tycoon.rb deleted file mode 100644 index c8145635fcd3b..0000000000000 --- a/Formula/kyoto-tycoon.rb +++ /dev/null @@ -1,41 +0,0 @@ -class KyotoTycoon < Formula - desc "Database server with interface to Kyoto Cabinet" - homepage "https://fallabs.com/kyototycoon/" - url "https://fallabs.com/kyototycoon/pkg/kyototycoon-0.9.56.tar.gz" - sha256 "553e4ea83237d9153cc5e17881092cefe0b224687f7ebcc406b061b2f31c75c6" - revision 3 - - bottle do - sha256 "2f430dc00ac505a7098596c769cc1c03d6d7a3fdc35ba7bc55fcd707576ac9a2" => :catalina - sha256 "04d72b5c55be3c26c688eda6c0cc9f88c85855ba6fe81aa36e210fc29afe7572" => :mojave - sha256 "ce7db5082c632bef982d5463f3a8507d786fd3bcae7f7cccf8663ab36c3571bd" => :high_sierra - sha256 "e75c60a4417bc00d04e1f24241320329f01b0d3076de2585e92375b12c4ef31d" => :sierra - end - - depends_on "kyoto-cabinet" - depends_on "lua" - - patch :DATA - - def install - system "./configure", "--prefix=#{prefix}", - "--with-kc=#{Formula["kyoto-cabinet"].opt_prefix}", - "--with-lua=#{Formula["lua"].opt_prefix}" - system "make" - system "make", "install" - end -end - - -__END__ ---- 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/Formula/kytea.rb b/Formula/kytea.rb deleted file mode 100644 index 7eaa6b0a03331..0000000000000 --- a/Formula/kytea.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Kytea < Formula - desc "Toolkit for analyzing text, especially Japanese and Chinese" - homepage "http://www.phontron.com/kytea/" - url "http://www.phontron.com/kytea/download/kytea-0.4.7.tar.gz" - sha256 "534a33d40c4dc5421f053c71a75695c377df737169f965573175df5d2cff9f46" - - bottle do - sha256 "927aac3d562cc2977f84670c850ab262a05a010bfe7e7f16aa0eb7d9532eae7b" => :catalina - sha256 "57c8c3acf60417d44d7df27445d667dd03095f1afdad70aeb63cf68e0cbc64c0" => :mojave - sha256 "bcdb450698d5065cf82b7726d6dc21381632c41352237dc547c05cc62e4b7e59" => :high_sierra - sha256 "d29c61f74da5f4d88f09d8b540943599ce8b6e5062af88b7d5725ea84fb4c603" => :sierra - sha256 "3e0c66a7efb34ddb8e4f80d9b95562779e224271b8d63d38f9bc8176103427e2" => :el_capitan - sha256 "2f2dda314728cd74750db339ebc2d166b8b611ad54668cc3e7b6225d39aec3f5" => :yosemite - sha256 "045d0c9ad0cf35e003b8839cb0213e3f49d9107dfbc955e449b36fd4b6596640" => :mavericks - end - - head do - url "https://github.com/neubig/kytea.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "autoreconf", "-i" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/kytea", "--version" - end -end diff --git a/Formula/kyua.rb b/Formula/kyua.rb deleted file mode 100644 index 479685e0059bb..0000000000000 --- a/Formula/kyua.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Kyua < Formula - desc "Testing framework for infrastructure software" - homepage "https://github.com/jmmv/kyua" - url "https://github.com/jmmv/kyua/releases/download/kyua-0.13/kyua-0.13.tar.gz" - sha256 "db6e5d341d5cf7e49e50aa361243e19087a00ba33742b0855d2685c0b8e721d6" - license "BSD-3-Clause" - revision 1 - - bottle do - sha256 "181ef5174cbb2f2ab2dd0e011d597a1124bd0e359de33967d89730cd5d708529" => :catalina - sha256 "a210c64c138b1656093b103ae27d9354972d7c2ec1e7220b0d94a9bc6806522c" => :mojave - sha256 "ecf3850322d6a575b63519a21f6bfe7eb652c67564f7292f017306d468cbf49d" => :high_sierra - sha256 "b533f71a13a6b8bdbbc4778515f5701774175879d6171804f43c1da8e12b4217" => :sierra - sha256 "e2449019eb1bd161b222fc73136990a4bed0ab4349b288ceff49add0b8958572" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "atf" - depends_on "lua" - depends_on "lutok" - depends_on "sqlite" - - def install - ENV.append "CPPFLAGS", "-I#{Formula["lua"].opt_include}/lua" - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - ENV.deparallelize - system "make", "install" - end -end diff --git a/Formula/l-smash.rb b/Formula/l-smash.rb deleted file mode 100644 index 586f22c610d39..0000000000000 --- a/Formula/l-smash.rb +++ /dev/null @@ -1,37 +0,0 @@ -class LSmash < Formula - desc "Tool for working with MP4 files" - homepage "https://l-smash.github.io/l-smash/" - url "https://github.com/l-smash/l-smash.git", - :shallow => false, - :tag => "v2.9.1", - :revision => "4cea08d264933634db5bc06da9d8d88fb5ddae07" - license "ISC" - head "https://github.com/l-smash/l-smash.git" - - bottle do - cellar :any - sha256 "504caa461b4bc44e2d22420bf21ac7242145f1edd6e982d22ae08d3291c82a99" => :catalina - sha256 "811e696583af5a78ec288d46f8815d5a5db246f335d2ba2e0d4f3fce9a98e2a2" => :mojave - sha256 "eae1dfce4f50c3b48d2a3fabf415ad7ec98de0937d610fec98d700e517e18934" => :high_sierra - sha256 "57802892865529a99658bd4da1b29eb5287259183658131cc215ef80fcd0cfbe" => :sierra - sha256 "5751796e42e7d544f4976bc304a0ae7407dc5217b2b4218b0a6afdc18ea3eeaf" => :el_capitan - sha256 "3703bdeb1dfe66aef898e60a990f4e64f0ab3c1fe26a49cf824b3c6998acaacc" => :yosemite - sha256 "78c5c52a90e1609694b43a45240126515f97be8a1d129a57215d4a7ba9e3717f" => :mavericks - end - - # failed to upgrade since 02-11-2018 - # upstream patch never got merged, https://github.com/l-smash/l-smash/issues/80 - disable! - - def install - system "./configure", "--prefix=#{prefix}", "--enable-shared" - system "make", "install" - end - - test do - system bin/"boxdumper", "-v" - system bin/"muxer", "-v" - system bin/"remuxer", "-v" - system bin/"timelineeditor", "-v" - end -end diff --git a/Formula/l/lab.rb b/Formula/l/lab.rb new file mode 100644 index 0000000000000..e26a23dabd672 --- /dev/null +++ b/Formula/l/lab.rb @@ -0,0 +1,47 @@ +class Lab < Formula + desc "Git wrapper for GitLab" + homepage "https://zaquestion.github.io/lab" + url "https://github.com/zaquestion/lab/archive/refs/tags/v0.25.1.tar.gz" + sha256 "f8cccdfbf1ca5a2c76f894321a961dfe0dc7a781d95baff5181eafd155707d79" + license "CC0-1.0" + head "https://github.com/zaquestion/lab.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ad4754373780ae61c444bdfd9505479639b7d12a60613b3514e4f888335b347" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f11a5e58b8158bd43d1e4f93e4c85e398f6ba34308957b6e5b868c58d582cdb2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eee3b3d1a309b0a61a5224cc1c13b0de765518b86015f6985a09347e86554b00" + sha256 cellar: :any_skip_relocation, arm64_monterey: "31e8b682f99fd9f456d298e09d20521317f3b04248f53029d04ce5f8b3f3b75a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9cc2420cd4dd1db173333ff7c51530deee73b47a8fb5d3d36d60893dfd4c35ae" + sha256 cellar: :any_skip_relocation, sonoma: "9806b52adc5a587c7992ca6e1fc86da47bdd71020c93d24c8d1ceb118d419fa1" + sha256 cellar: :any_skip_relocation, ventura: "5509e7f37eb68c9404e0f862fc87535091b7928a891fa38deede63fefcf314f5" + sha256 cellar: :any_skip_relocation, monterey: "d1e3f02ef9e1748260a2ba5d9eefc79312b77f8d3ae223485aab7a025e7638e5" + sha256 cellar: :any_skip_relocation, big_sur: "f20ca44b476a3d6a3ef9a74047d4dd863403d72a427f1baa0dc19a9df5b33667" + sha256 cellar: :any_skip_relocation, catalina: "0ce4baa79e79a77dd30d3e7e839ef41c414329dc21ffa9386e74d7a0f69c7501" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22981b2ebc3d41dd9b1905ab8f8f715d38d09c85f173e848473a8f731039653d" + end + + depends_on "go" => :build + + def install + ldflags = "-X main.version=#{version} -s -w" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"lab", "completion") + end + + test do + ENV["LAB_CORE_USER"] = "test_user" + ENV["LAB_CORE_HOST"] = "https://gitlab.com/" + ENV["LAB_CORE_TOKEN"] = "dummy" + + 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" + + output = shell_output("#{bin}/lab todo done 1 2>&1", 1) + assert_match "POST https://gitlab.com/api/v4/todos/1/mark_as_done", output + + assert_match version.to_s, shell_output("#{bin}/lab version") + end +end diff --git a/Formula/l/lacework-cli.rb b/Formula/l/lacework-cli.rb new file mode 100644 index 0000000000000..8c8c84c59b7e5 --- /dev/null +++ b/Formula/l/lacework-cli.rb @@ -0,0 +1,48 @@ +class LaceworkCli < Formula + desc "CLI for managing Lacework" + homepage "https://docs.lacework.com/cli" + url "https://github.com/lacework/go-sdk.git", + tag: "v2.1.10", + revision: "440ad70d1542465900fcb65af669c7c03596f87a" + license "Apache-2.0" + head "https://github.com/lacework/go-sdk.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_sequoia: "8f63863b99cd5c77447902d3925d83c82c4d749a26e2449ae95ca3aa4168e911" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f63863b99cd5c77447902d3925d83c82c4d749a26e2449ae95ca3aa4168e911" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f63863b99cd5c77447902d3925d83c82c4d749a26e2449ae95ca3aa4168e911" + sha256 cellar: :any_skip_relocation, sonoma: "d3edab0b764b3b2748c51488d285e78f7d7924e4287fa396b56ff4179c9dd836" + sha256 cellar: :any_skip_relocation, ventura: "d3edab0b764b3b2748c51488d285e78f7d7924e4287fa396b56ff4179c9dd836" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e0b89651613f7b35454546cf8af7a0f7172fafb5b16be998277714acacbf6d9" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/lacework/go-sdk/v2/cli/cmd.Version=#{version} + -X github.com/lacework/go-sdk/v2/cli/cmd.GitSHA=#{Utils.git_head} + -X github.com/lacework/go-sdk/v2/cli/cmd.HoneyDataset=lacework-cli-prod + -X github.com/lacework/go-sdk/v2/cli/cmd.BuildTime=#{time.iso8601} + ] + system "go", "build", *std_go_args(output: bin/"lacework", ldflags:), "./cli" + + generate_completions_from_executable(bin/"lacework", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/lacework version") + + output = shell_output("#{bin}/lacework configure list 2>&1", 1) + assert_match "ERROR unable to load profiles. No configuration file found.", output + end +end diff --git a/Formula/l/ladspa-sdk.rb b/Formula/l/ladspa-sdk.rb new file mode 100644 index 0000000000000..a06cbf4f93b77 --- /dev/null +++ b/Formula/l/ladspa-sdk.rb @@ -0,0 +1,58 @@ +class LadspaSdk < Formula + desc "Linux Audio Developer's Simple Plugin" + homepage "https://www.ladspa.org/" + url "https://www.ladspa.org/download/ladspa_sdk_1.17.tgz" + sha256 "27d24f279e4b81bd17ecbdcc38e4c42991bb388826c0b200067ce0eb59d3da5b" + license "LGPL-2.1-only" + + livecheck do + url "https://www.ladspa.org/download/index.html" + regex(/href=.*?ladspa[._-]sdk[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 2 + sha256 arm64_linux: "c040c53ca46e36809ad0b9729b4fc3381d9ffb665bf9deb81726d27bb847170c" + sha256 x86_64_linux: "f05cf54a06c2c0e50295cd52f63f5fc096a5812470e0a3248c790c228cd5db8f" + end + + depends_on "libsndfile" + depends_on :linux + + def install + args = %W[ + INSTALL_PLUGINS_DIR=#{lib}/ladspa + INSTALL_INCLUDE_DIR=#{include} + INSTALL_BINARY_DIR=#{bin} + ] + cd "src" do + system "make", "install", *args + end + bin.env_script_all_files libexec/"bin", LADSPA_PATH: opt_lib/"ladspa" + end + + test do + output = shell_output("#{bin}/listplugins") + assert_match "Mono Amplifier", output + assert_match "Simple Delay Line", output + assert_match "Simple Low Pass Filter", output + assert_match "Simple High Pass Filter", output + assert_match "Sine Oscillator", output + assert_match "Stereo Amplifier", output + assert_match "White Noise Source", output + + expected_output = <<~EOS + Plugin Name: "Mono Amplifier" + Plugin Label: "amp_mono" + Plugin Unique ID: 1048 + Maker: "Richard Furse (LADSPA example plugins)" + Copyright: "None" + Must Run Real-Time: No + Has activate() Function: No + Has deactivate() Function: No + Has run_adding() Function: No + Environment: Normal or Hard Real-Time + EOS + assert_match expected_output, shell_output("#{bin}/analyseplugin amp") + end +end diff --git a/Formula/l/lager.rb b/Formula/l/lager.rb new file mode 100644 index 0000000000000..716fda709b88f --- /dev/null +++ b/Formula/l/lager.rb @@ -0,0 +1,53 @@ +class Lager < Formula + desc "C++ lib for value-oriented design using unidirectional data-flow architecture" + homepage "https://sinusoid.es/lager/" + url "https://github.com/arximboldi/lager/archive/refs/tags/v0.1.1.tar.gz" + sha256 "9e4743c3fe2c95c1653c3fd088a2200108f09d758725697831852dc91d15d174" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "092b29ac8e64b817faba834b6b03d4970ce7cf939a271e812bdfcfd09dd081ff" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "zug" + + def install + args = %w[ + -Dlager_BUILD_DEBUGGER_EXAMPLES=OFF + -Dlager_BUILD_EXAMPLES=OFF + -Dlager_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() { + using model = int; + + auto state = lager::make_state(model{}); + std::cout << state.get() << std::endl; // 0 + state.set(1); + std::cout << state.get() << std::endl; // 0 + lager::commit(state); + std::cout << state.get() << std::endl; // 1 + + auto state2 = lager::make_state(model{}, lager::automatic_tag{}); + state2.set(2); + std::cout << state2.get() << std::endl; // 2 + } + CPP + + system ENV.cxx, "-std=c++17", "-I#{include}", "test.cpp", "-o", "test" + system "./test" + end +end diff --git a/Formula/l/lame.rb b/Formula/l/lame.rb new file mode 100644 index 0000000000000..e043fb11491de --- /dev/null +++ b/Formula/l/lame.rb @@ -0,0 +1,49 @@ +class Lame < Formula + desc "High quality MPEG Audio Layer III (MP3) encoder" + homepage "https://lame.sourceforge.io/" + url "https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz" + sha256 "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e" + license "LGPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/lame[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0ae0dcb09c908b80ffbdb1bb168674e5190d6b9ae006d5282b7ab4f06eac9f36" + sha256 cellar: :any, arm64_sonoma: "a5116a219d70f3bb6728a0dfe6801413b9fd70e6c864257691cdb0ea272c2c1e" + sha256 cellar: :any, arm64_ventura: "dde2fd627f56465b34aa521ec5ea789a2b6672f0336f5f9a0b6b831342b1052e" + sha256 cellar: :any, arm64_monterey: "67ee7aa900fa0b411c3731783ee53b17517145a03a90b1f35068b01d17b5c347" + sha256 cellar: :any, arm64_big_sur: "2ff2c6ad3cfd26e1ba53230631e2f04734a4638c344cce50ff0b8fc36b45c403" + sha256 cellar: :any, sonoma: "931beb6c95eab8c908ed21a041cfd6e3295e63d91c076d5d376d65a7984b09ae" + sha256 cellar: :any, ventura: "745542d02ea729f40b4919b73b2a716e21c7ff0f502068ebd25ab02edcf13ba4" + sha256 cellar: :any, monterey: "11e516ec779a6f469e9853dbdf65c57e5514177474d70f38cef9c4163b92dfab" + sha256 cellar: :any, big_sur: "6ceaf88479ce365df8c29140359984ad8debcc44898b99424b39d729e923279b" + sha256 cellar: :any, catalina: "02b6a2cbf9b902225308bc90c8314699761cbdcd13628271579f5345d8160af2" + sha256 cellar: :any, mojave: "737751faa513a68ac2499bb5cc607bc366e15dab8ff3bff5443567a455af5c3f" + sha256 cellar: :any, high_sierra: "9e65c67b83efa5a686aea0506dc44935cd2af2d4fe55fe38dc19610a0ccd80dd" + sha256 cellar: :any, sierra: "c2d7bce53be2efb5d19d99ea00fbe69613885cce46009e8ab6099f8d5925c3ba" + sha256 cellar: :any, el_capitan: "73c4d677b4e5357dc5baf30c96ac5f33cf7902e9c77869834b7cd9d17f3415bc" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e9bc793b37a72ce61d28dbbdb8dd160a0785e91b7d9ab6e964ba9e6a8a549d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee8318f10b1b986d57826f0f59800c43f62d58e8d52cf9c94b8924e28739e656" + end + + uses_from_macos "ncurses" + + def install + # Fix undefined symbol error _lame_init_old + # https://sourceforge.net/p/lame/mailman/message/36081038/ + inreplace "include/libmp3lame.sym", "lame_init_old\n", "" + + system "./configure", "--disable-dependency-tracking", + "--disable-debug", + "--prefix=#{prefix}", + "--enable-nasm" + system "make", "install" + end + + test do + system bin/"lame", "--genre-list", test_fixtures("test.mp3") + end +end diff --git a/Formula/l/lammps.rb b/Formula/l/lammps.rb new file mode 100644 index 0000000000000..cb9339615076d --- /dev/null +++ b/Formula/l/lammps.rb @@ -0,0 +1,93 @@ +class Lammps < Formula + desc "Molecular Dynamics Simulator" + homepage "https://docs.lammps.org/" + url "https://github.com/lammps/lammps/archive/refs/tags/stable_29Aug2024_update2.tar.gz" + # lammps releases are named after their release date. We transform it to + # YYYY-MM-DD (year-month-day) so that we get a sane version numbering. + # We only track stable releases as announced on the LAMMPS homepage. + version "20240829-update2" + sha256 "f8ca3f021a819ced8658055f7750e235c51b4937ddb621cf1bd7bee08e0b6266" + license "GPL-2.0-only" + + # The `strategy` block below is used to massage upstream tags into the + # YYYY-MM-DD format we use in the `version`. This is necessary for livecheck + # to be able to do proper `Version` comparison. + livecheck do + url :stable + regex(/^stable[._-](\d{1,2}\w+\d{2,4})(?:[._-](update\d*))?$/i) + strategy :git do |tags, regex| + tags.map do |tag| + match = tag.match(regex) + next if match.blank? || match[1].blank? + + date_str = Date.parse(match[1]).strftime("%Y%m%d") + match[2].present? ? "#{date_str}-#{match[2]}" : date_str + end + end + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "68dadea5323f428530fce56d1ee3f59f1c198d781e7460a22ec4cc9f3f3f96a8" + sha256 cellar: :any, arm64_sonoma: "724c532f8d3f41e5ecf955d9afd5a06dabe5b244bf953cc3877b668e7f7573fd" + sha256 cellar: :any, arm64_ventura: "af826f4ddd364978c779bc4d85d74ab47e19de0aad783c1f98cbf2c0085f5bbc" + sha256 cellar: :any, sonoma: "e12baae2c10968d8eba18ea3e5db1b3de2fbac84cf6174add5628b8231a3b99e" + sha256 cellar: :any, ventura: "6ee483146f85ba818c42f9fde3d019d90e2bbefea837878eade1251d97132286" + sha256 cellar: :any_skip_relocation, arm64_linux: "706eeb925bed4dc64a9d6c0b1b2de2292c54eabbd0fa7174f6323fda5add0c22" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96fae09fc6dbb95cfa7c4506565cdcc9873ea710e3ddf38fc0361fc5cd18806b" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "fftw" + depends_on "gcc" # for gfortran + depends_on "gsl" + depends_on "jpeg-turbo" + depends_on "kim-api" + depends_on "libpng" + depends_on "open-mpi" + depends_on "voro++" + + uses_from_macos "curl" + + on_macos do + depends_on "libomp" + end + + def install + %w[serial mpi].each do |variant| + args = [ + "-S", "cmake", "-B", "build_#{variant}", + "-C", "cmake/presets/all_on.cmake", + "-C", "cmake/presets/nolib.cmake", + "-DPKG_INTEL=no", + "-DPKG_KIM=yes", + "-DPKG_VORONOI=yes", + "-DLAMMPS_MACHINE=#{variant}", + "-DBUILD_MPI=#{(variant == "mpi") ? "yes" : "no"}", + "-DBUILD_OMP=#{(variant == "serial") ? "no" : "yes"}", + "-DBUILD_SHARED_LIBS=yes", + "-DFFT=FFTW3", + "-DWITH_GZIP=yes", + "-DWITH_JPEG=yes", + "-DWITH_PNG=yes", + "-DCMAKE_INSTALL_RPATH=#{rpath}" + ] + args << "-DOpenMP_CXX_FLAGS=-I#{Formula["libomp"].opt_include}" if OS.mac? + system "cmake", *args, *std_cmake_args + system "cmake", "--build", "build_#{variant}" + system "cmake", "--install", "build_#{variant}" + end + + pkgshare.install %w[doc tools bench examples] + end + + test do + system bin/"lmp_serial", "-in", pkgshare/"bench/in.lj" + output = shell_output("#{bin}/lmp_serial -h") + %w[KSPACE POEMS VORONOI].each do |pkg| + assert_match pkg, output + end + end +end diff --git a/Formula/l/lando-cli.rb b/Formula/l/lando-cli.rb new file mode 100644 index 0000000000000..c64235203b1f6 --- /dev/null +++ b/Formula/l/lando-cli.rb @@ -0,0 +1,43 @@ +class LandoCli < Formula + desc "Cli part of Lando" + homepage "https://docs.lando.dev/cli" + url "https://github.com/lando/core/archive/refs/tags/v3.24.3.tar.gz" + sha256 "f40c9613fd6c6317bcbe335d24008b4fb07772a926d68e0d2b9de129781e5b6f" + license "GPL-3.0-or-later" + head "https://github.com/lando/core.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "f488966079911f317384cc2893862868d21d481f5d1ee22fc51a9e17f8cae845" + sha256 arm64_sonoma: "938521548f81a6e9229d66a1a853adc1326980b1d1554b10b02dd97e9e71ec31" + sha256 arm64_ventura: "20a446e841e400bb6c65d79f814107eed6ff2fca85b76e7553ecd50cd870ff0a" + sha256 sonoma: "56f81b05f6be0c15b132b83c4782272b238e2654859ae40d6b06954506561364" + sha256 ventura: "cb8bfcbaeb6290de377b60947d738579b12b0ae6acbc5c83fa2346636a83431d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d0289b9fd03eeef95270ad2a7f534d2f2e2b3c68c0749a79f2450a64d393662" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d0289b9fd03eeef95270ad2a7f534d2f2e2b3c68c0749a79f2450a64d393662" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install libexec.glob("bin/*") + bin.env_script_all_files libexec/"bin", LANDO_CHANNEL: "none" + end + + def caveats + <<~EOS + To complete the installation: + lando setup + EOS + end + + test do + assert_match "none", shell_output("#{bin}/lando config --path channel") + assert_match "127.0.0.1", shell_output("#{bin}/lando config --path proxyIp") + end +end diff --git a/Formula/l/langgraph-cli.rb b/Formula/l/langgraph-cli.rb new file mode 100644 index 0000000000000..96feef6ee9be1 --- /dev/null +++ b/Formula/l/langgraph-cli.rb @@ -0,0 +1,57 @@ +class LanggraphCli < Formula + include Language::Python::Virtualenv + + desc "Command-line interface for deploying apps to the LangGraph platform" + homepage "https://www.github.com/langchain-ai/langgraph" + url "https://files.pythonhosted.org/packages/8d/5e/b12bc8140cd4f797ad7f596bf90558994fd6891df8974bc3fc4747eabdc7/langgraph_cli-0.2.10.tar.gz" + sha256 "0c215b364daeaf10de681e4960ecaafc7c9cd2a4100b41052d78d95cababf422" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "07a250dd1c29400cfef5c7da506224617b487ff1beeabc0c5832157036456a8e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "07a250dd1c29400cfef5c7da506224617b487ff1beeabc0c5832157036456a8e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "07a250dd1c29400cfef5c7da506224617b487ff1beeabc0c5832157036456a8e" + sha256 cellar: :any_skip_relocation, sonoma: "25c261b92fc1711046a983453b8af2bd1ccec43724e591ce93c226f532ec6ca8" + sha256 cellar: :any_skip_relocation, ventura: "25c261b92fc1711046a983453b8af2bd1ccec43724e591ce93c226f532ec6ca8" + sha256 cellar: :any_skip_relocation, arm64_linux: "07a250dd1c29400cfef5c7da506224617b487ff1beeabc0c5832157036456a8e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07a250dd1c29400cfef5c7da506224617b487ff1beeabc0c5832157036456a8e" + end + + depends_on "python@3.13" + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"langgraph", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + (testpath/"graph.py").write <<~PYTHON + from langgraph.graph import StateGraph + builder = StateGraph(list) + builder.add_node("anode", lambda x: ["foo"]) + builder.add_edge("__start__", "anode") + graph = builder.compile() + PYTHON + + (testpath/"langgraph.json").write <<~JSON + { + "graphs": { + "agent": "graph.py:graph" + }, + "env": {}, + "dependencies": ["."] + } + JSON + + system bin/"langgraph", "dockerfile", "DOCKERFILE" + assert_path_exists "DOCKERFILE" + dockerfile_content = File.read("DOCKERFILE") + assert_match "FROM", dockerfile_content, "DOCKERFILE should contain 'FROM'" + end +end diff --git a/Formula/l/languagetool-rust.rb b/Formula/l/languagetool-rust.rb new file mode 100644 index 0000000000000..caa38905e0ca3 --- /dev/null +++ b/Formula/l/languagetool-rust.rb @@ -0,0 +1,41 @@ +class LanguagetoolRust < Formula + desc "LanguageTool API in Rust" + homepage "https://docs.rs/languagetool-rust" + url "https://github.com/jeertmans/languagetool-rust/archive/refs/tags/v2.1.5.tar.gz" + sha256 "db1da3e821976c2e5e85c26037301dd43fe8baff6bff243c498f74f7c5e57d37" + license "MIT" + head "https://github.com/jeertmans/languagetool-rust.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "58375defa38ac43d3943c08967a4fab9ac2bec7ffd69d042f02296defb1abbe2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "088c12e33f0960eca09b131d46e8e821947d7d330efdef500f6bf31c1587e295" + sha256 cellar: :any_skip_relocation, arm64_ventura: "353bb7ad7e99b30e66312284a0ee1b8058479f3892da5a3ee336b80a9d58cf10" + sha256 cellar: :any_skip_relocation, sonoma: "b2dcfbb19328a045c4a6bebea59fa674bfcb6d4827938cd4d5ff2b0f6a63c095" + sha256 cellar: :any_skip_relocation, ventura: "53961fe44f3a0564943b62dd179df6e2760bc33b7ecef8927cc6d6c20f44b8fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "020bb11bed660cc4710f5eeeda2c37becfd66ef9a69b3d8e8fb25d7750bd463f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c575d0c3dbfe53942702f762527241952714188e2952e05c3a7f08e0273da048" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + on_linux do + depends_on "openssl@3" + end + + def install + system "cargo", "install", "--features", "full", *std_cargo_args + + generate_completions_from_executable(bin/"ltrs", "completions") + end + + test do + assert_match version.to_s, shell_output("#{bin}/ltrs --version") + + system bin/"ltrs", "ping" + assert_match "\"name\": \"Arabic\"", shell_output("#{bin}/ltrs languages") + + output = shell_output("#{bin}/ltrs check --text \"Some phrase with a smal mistake\"") + assert_match "error[MORFOLOGIK_RULE_EN_US]: Possible spelling mistake found", output + end +end diff --git a/Formula/l/languagetool.rb b/Formula/l/languagetool.rb new file mode 100644 index 0000000000000..1f8c123a94a73 --- /dev/null +++ b/Formula/l/languagetool.rb @@ -0,0 +1,72 @@ +class Languagetool < Formula + desc "Style and grammar checker" + homepage "https://www.languagetool.org/" + url "https://github.com/languagetool-org/languagetool.git", + tag: "v6.6", + revision: "f13e71a7fe85a122290826fd691d267d64e97c33" + license "LGPL-2.1-or-later" + head "https://github.com/languagetool-org/languagetool.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)(-branch)?$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "227a97bd8f1d5d0758c39333e83b6592d7fd0e32ecf16c12ce672153ec61ae46" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4fab8a1497d501d34cbe092a4f654fc48f723c7987e98de03668a592f85fffaf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7f834002277b32d58c770d84ff8b8cb79b375f7556baea3c22d429b83e453401" + sha256 cellar: :any_skip_relocation, sonoma: "7f926f87d50925e4d80b5e76f7c5949bb7fe394f94877d3256240291364d543d" + sha256 cellar: :any_skip_relocation, ventura: "3ec986752ccb42e85971b148a753f7e65ee62eeb89252191837145daf6f8ce37" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a63b1434847e5fdcd826799840eac2d22bba23ea4b2aa8f5e03bb1be59a916f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90f387a97cc6c4814c309a52f251ceb576225d6fe16734ad44f56f7180761a1d" + end + + depends_on "maven" => :build + depends_on "openjdk@17" + + def install + java_version = "17" + ENV["JAVA_HOME"] = Language::Java.java_home(java_version) + system "mvn", "clean", "package", "-DskipTests" + + # We need to strip one path level from the distribution zipball, + # so extract it into a temporary directory then install it. + mktemp "zip" do + system "unzip", Dir["#{buildpath}/languagetool-standalone/target/*.zip"].first, "-d", "." + libexec.install Dir["*/*"] + end + + bin.write_jar_script(libexec/"languagetool-commandline.jar", "languagetool", java_version:) + bin.write_jar_script(libexec/"languagetool.jar", "languagetool-gui", java_version:) + (bin/"languagetool-server").write <<~EOS + #!/bin/bash + export JAVA_HOME="#{Language::Java.overridable_java_home_env(java_version)[:JAVA_HOME]}" + exec "${JAVA_HOME}/bin/java" -cp "#{libexec}/languagetool-server.jar" org.languagetool.server.HTTPServer "$@" + EOS + + touch buildpath/"server.properties" + pkgetc.install "server.properties" + end + + def post_install + (var/"log/languagetool").mkpath + end + + service do + run [opt_bin/"languagetool-server", "--config", etc/"languagetool/server.properties", "--port", "8081", + "--allow-origin"] + keep_alive true + log_path var/"log/languagetool/languagetool-server.log" + error_log_path var/"log/languagetool/languagetool-server.log" + end + + test do + (testpath/"test.txt").write <<~EOS + Homebrew, this is an test + EOS + output = shell_output("#{bin}/languagetool -l en-US test.txt 2>&1") + assert_match(/Message: Use \Wa\W instead of \Wan\W/, output) + end +end diff --git a/Formula/l/lanraragi.rb b/Formula/l/lanraragi.rb new file mode 100644 index 0000000000000..e996db395b9cc --- /dev/null +++ b/Formula/l/lanraragi.rb @@ -0,0 +1,93 @@ +class Lanraragi < Formula + desc "Web application for archival and reading of manga/doujinshi" + homepage "https://github.com/Difegue/LANraragi" + url "https://github.com/Difegue/LANraragi/archive/refs/tags/v.0.9.40.tar.gz" + sha256 "6d26a92a0054e83da92d5e73d074ed69dd79539be410b6d77b04e470062fd503" + license "MIT" + head "https://github.com/Difegue/LANraragi.git", branch: "dev" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c2bcdc9e4877bbf3aeed731c76137ea29f58651c3072beccb4b39fca3abd3488" + sha256 cellar: :any, arm64_sonoma: "1eb212c64a8320fe0c04132b7628e2030615daa7e044bb8d4c14a766d93cf584" + sha256 cellar: :any, arm64_ventura: "22fa3648a0c9d44ab98d6aca81849bfdbee6c2f06c965dffcc8744006ca3ec16" + sha256 cellar: :any, sonoma: "79c7c96f06283f5bf40a25bdb52256a47d0d3e8a48c76de812422b42b1c924f5" + sha256 cellar: :any, ventura: "52806a1a7f163ee977e893fdb7ab82e0768874a5a5a5a8deb5df7c01fa788682" + sha256 cellar: :any_skip_relocation, arm64_linux: "1feee998a2a39c37e4fe44e5b3334cceeba64ddca96a0098b654a0c79b6c61bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5fb1326998ad168d3f1d015f897f78df696b7f87bc192d2ded96cb0b922f9c4" + end + + depends_on "pkgconf" => :build + + depends_on "cpanminus" + depends_on "ghostscript" + depends_on "imagemagick" + depends_on "libarchive" + depends_on "node" + depends_on "openssl@3" + depends_on "perl" + depends_on "redis" # TODO: migrate to `valkey` + depends_on "zstd" + + uses_from_macos "libffi" + + resource "Image::Magick" do + url "https://cpan.metacpan.org/authors/id/J/JC/JCRISTY/Image-Magick-7.1.1-28.tar.gz" + sha256 "bc54137346c1d45626e7075015f7d1dae813394af885457499f54878cfc19e0b" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + ENV["OPENSSL_PREFIX"] = Formula["openssl@3"].opt_prefix + ENV["ARCHIVE_LIBARCHIVE_LIB_DLL"] = Formula["libarchive"].opt_lib/shared_library("libarchive") + ENV["ALIEN_INSTALL_TYPE"] = "system" + + imagemagick = Formula["imagemagick"] + resource("Image::Magick").stage do + inreplace "Makefile.PL", + "/usr/local/include/ImageMagick-#{imagemagick.version.major}", + "#{imagemagick.opt_include}/ImageMagick-#{imagemagick.version.major}" + + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" + system "make" + system "make", "install" + end + + system "cpanm", "Config::AutoConf", "--notest", "-l", libexec + system "npm", "install", *std_npm_args(prefix: false) + system "perl", "./tools/install.pl", "install-full" + + # Modify Archive::Libarchive to help find brew `libarchive`. Although environment + # variables like `ARCHIVE_LIBARCHIVE_LIB_DLL` and `FFI_CHECKLIB_PATH` exist, + # it is difficult to guarantee every way of running (like `npm start`) uses them. + inreplace libexec/"lib/perl5/Archive/Libarchive/Lib.pm", + "$ENV{ARCHIVE_LIBARCHIVE_LIB_DLL}", + "'#{ENV["ARCHIVE_LIBARCHIVE_LIB_DLL"]}'" + + (libexec/"lib").install Dir["lib/*"] + libexec.install "script", "package.json", "public", "locales", "templates", "tests", "lrr.conf" + libexec.install "tools/build/homebrew/redis.conf" + bin.install "tools/build/homebrew/lanraragi" + end + + test do + # Make sure lanraragi writes files to a path allowed by the sandbox + ENV["LRR_LOG_DIRECTORY"] = ENV["LRR_TEMP_DIRECTORY"] = testpath + %w[server.pid shinobu.pid minion.pid].each { |file| touch file } + + # Set PERL5LIB as we're not calling the launcher script + ENV["PERL5LIB"] = libexec/"lib/perl5" + + # This can't have its _user-facing_ functionality tested in the `brew test` + # environment because it needs Redis. It fails spectacularly tho with some + # table flip emoji. So let's use those to confirm _some_ functionality. + output = <<~EOS + キタ━━━━━━(゚∀゚)━━━━━━!!!!! + (╯・_>・)╯︵ ┻━┻ + It appears your Redis database is currently not running. + The program will cease functioning now. + EOS + # Execute through npm to avoid starting a redis-server + return_value = OS.mac? ? 61 : 111 + assert_match output, shell_output("npm start --prefix #{libexec}", return_value) + end +end diff --git a/Formula/l/lapack.rb b/Formula/l/lapack.rb new file mode 100644 index 0000000000000..baad9ab3cc528 --- /dev/null +++ b/Formula/l/lapack.rb @@ -0,0 +1,62 @@ +class Lapack < Formula + desc "Linear Algebra PACKage" + homepage "https://www.netlib.org/lapack/" + url "https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v3.12.1.tar.gz" + sha256 "2ca6407a001a474d4d4d35f3a61550156050c48016d949f0da0529c0aa052422" + # LAPACK is BSD-3-Clause-Open-MPI while LAPACKE is BSD-3-Clause + license all_of: ["BSD-3-Clause-Open-MPI", "BSD-3-Clause"] + head "https://github.com/Reference-LAPACK/lapack.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "b28ffd5a179cb39c06903720a05f76129b23d7269c6d7ab1c32d80e73dbc3549" + sha256 arm64_sonoma: "ca2ffc67818891b7dd4fca4063b12582e4fd5d1c547a298e52d94ee0ae45da5d" + sha256 arm64_ventura: "fe4b0a8f8d36fe2351183e4760e1b79e60e4acabf6820bdd56b42a3fe64d55d1" + sha256 cellar: :any, sonoma: "ca9ab67cbfe96618babf11e67e0471c710cd7a3bb1f2f94aa6dcd5252e2a477e" + sha256 cellar: :any, ventura: "7d8b411cb368aaf73b9d16b83e5293aec80dd86a53696d35a8336ec013688369" + sha256 cellar: :any_skip_relocation, arm64_linux: "733c1a52d5e40d17d54d87706534e013f5fb5505a52194b3d792ea13d7b0423f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a687f1b7990d523993bc1e4ee24c025206c11b9995f9172128142e98a6fc147" + end + + keg_only :shadowed_by_macos, "macOS provides LAPACK in Accelerate.framework" + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + + on_linux do + keg_only "it conflicts with openblas" + end + + def install + ENV.delete("MACOSX_DEPLOYMENT_TARGET") + + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DLAPACKE=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/"lp.c").write <<~C + #include "lapacke.h" + int main() { + void *p = LAPACKE_malloc(sizeof(char)*100); + if (p) { + LAPACKE_free(p); + } + return 0; + } + C + system ENV.cc, "lp.c", "-I#{include}", "-L#{lib}", "-llapacke", "-o", "lp" + system "./lp" + end +end diff --git a/Formula/l/largetifftools.rb b/Formula/l/largetifftools.rb new file mode 100644 index 0000000000000..303151ddf6f2e --- /dev/null +++ b/Formula/l/largetifftools.rb @@ -0,0 +1,41 @@ +class Largetifftools < Formula + desc "Collection of software that can help managing (very) large TIFF files" + homepage "https://pperso.ijclab.in2p3.fr/page_perso/Deroulers/software/largetifftools/" + url "https://pperso.ijclab.in2p3.fr/page_perso/Deroulers/software/largetifftools/download/largetifftools-1.4.2/largetifftools-1.4.2.tar.bz2" + sha256 "a7544d79a93349ebbc755f2b7b6c5fbcd71a01f68d2939dbcba749ba6069fabb" + license "GPL-3.0-only" + + livecheck do + url :homepage + regex(/href=.*?largetifftools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e7ad30862ae1b715271064e5487dacac835007e1d1465a61796192d33849ef69" + sha256 cellar: :any, arm64_sonoma: "8e289d1b6b87e41764c8ff7831fffd5ad6b2871a97531344de0379f7a29719fa" + sha256 cellar: :any, arm64_ventura: "d6aa8ea83b7d6ed7f73c35dcbb531f3088d4a07e419a9b6945848249874cb6fb" + sha256 cellar: :any, sonoma: "1d4d9cce695d92295f325ca875c16b7a4c2cf57223ce8e28f05beca25de519ee" + sha256 cellar: :any, ventura: "58bde27fe7d7cf8a22ae7feac74afb4c88d54af82b1d254f5b8ffcf6a563193d" + sha256 cellar: :any_skip_relocation, arm64_linux: "fba139ab0c3a04448191f5596e5d233824f672fb3e3bacb166c4b7e5e9363fb1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd6458d660821a0038f8ce37977442e31e638dd8a0e0f408f2cc3512eb1ea404" + end + + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + + on_macos do + depends_on "webp" + depends_on "zstd" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"tifffastcrop", "-p", "-E", "0,0,-1,-1", test_fixtures("test.tiff"), testpath/"output.png" + assert File.size?(testpath/"output.png") + end +end diff --git a/Formula/l/lasi.rb b/Formula/l/lasi.rb new file mode 100644 index 0000000000000..abc08e6783f4d --- /dev/null +++ b/Formula/l/lasi.rb @@ -0,0 +1,51 @@ +class Lasi < Formula + desc "C++ stream output interface for creating Postscript documents" + homepage "https://www.unifont.org/lasi/" + url "https://downloads.sourceforge.net/project/lasi/lasi/1.1.3%20Source/libLASi-1.1.3.tar.gz" + sha256 "5e5d2306f7d5a275949fb8f15e6d79087371e2a1caa0d8f00585029d1b47ba3b" + license "GPL-2.0-or-later" + revision 2 + head "https://svn.code.sf.net/p/lasi/code/trunk" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "cacfb48c1b73960804bf1471d86942b79e306cbf737242f31456fd41588798c0" + sha256 cellar: :any, arm64_sonoma: "784a47e3a5a0eba53a4a1ffcc00b0aecddf0b04a588ef2ad10b0ee8d90803c61" + sha256 cellar: :any, arm64_ventura: "b13ac894940a19c92183c5fad1f5058232af01fb4d6a7c8c1a490d5f289c3fc2" + sha256 cellar: :any, arm64_monterey: "7316df1ac91816fd9ee342a973b4b96dd3e2bb4ce9eb93fedfe96b30a109d8f8" + sha256 cellar: :any, arm64_big_sur: "f6f4ac7da7af9beba184fff05fd4419335c07710beb3a2e3646afdde31745770" + sha256 cellar: :any, sonoma: "3ba98494b45476be8d8b75f2b2d2f2e8fe366618b7cc26b2ced89ba5bb5124f8" + sha256 cellar: :any, ventura: "219654bc604d3071f1cbf7c5b39855af57ecaafe12088bd5e805373098fb2b7f" + sha256 cellar: :any, monterey: "d70d80fbc43693c3df3b1256ad7779d0cc7a5776cef1502faf9fa4868c1e9fee" + sha256 cellar: :any, big_sur: "d4d9a1f05e4acef822930f62b4dd5b5f87f815e01523eb41b91df079af35b69b" + sha256 cellar: :any, catalina: "9c9b3d4df3fef9c27ccc60f51583976cfb7093c5ea345c0dced428e0539b7ede" + sha256 cellar: :any, mojave: "95eed6a78b95300f4b496bdba60b0542c9b66e5ce96ca7c8fcd081e76eebc675" + sha256 cellar: :any_skip_relocation, arm64_linux: "70ef82ea6ebb0ad9deea3e12e5a88db9f24653599a256d0577422b2481f8d498" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a81717d41a1ac50a3f35199b82877d62fce7abb1da670c98cd2abb762e2a1b8b" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "glib" + depends_on "pango" + + on_macos do + depends_on "fontconfig" + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + # If we build/install examples they result in shim/cellar paths in the + # installed files. Instead we don't build them at all. + inreplace "CMakeLists.txt", "add_subdirectory(examples)", "" + + # std_cmake_args tries to set CMAKE_INSTALL_LIBDIR to a prefix-relative + # directory, but lasi's cmake scripts don't like that + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_CXX_STANDARD=11", *std_cmake_args(install_libdir: lib) + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end +end diff --git a/Formula/l/lasso.rb b/Formula/l/lasso.rb new file mode 100644 index 0000000000000..0882ec362bb74 --- /dev/null +++ b/Formula/l/lasso.rb @@ -0,0 +1,205 @@ +class Lasso < Formula + include Language::Python::Virtualenv + + desc "Library for Liberty Alliance and SAML protocols" + homepage "https://lasso.entrouvert.org/" + url "https://dev.entrouvert.org/releases/lasso/lasso-2.8.2.tar.gz" + sha256 "6a1831bfdbf8f424c7508aba47b045d51341ec0fde9122f38b0b86b096ef533e" + license "GPL-2.0-or-later" + revision 2 + + livecheck do + url :homepage + regex(/href=.*?lasso[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "d11f5c5002eea8bf352df2eb6d3e903a25cf985c624d764d908646b7193d7787" + sha256 cellar: :any, arm64_sonoma: "bae175f8483fcb721716c04489109384cf80f7b1b3e2dfddfe2bbb785e0cbddf" + sha256 cellar: :any, arm64_ventura: "1d90d46ff6490946d1f8e156038fb83fe63c59f7bebab3b712ee6eeaf73175c9" + sha256 cellar: :any, arm64_monterey: "9b7b4aaf4ebb484bc9965c44ec60b5688bf07160fd21009b3698c9906339ceca" + sha256 cellar: :any, sonoma: "1ae094adf28b557f503e6902eba7782fc3f06851f99af55bb719cd1ef5421acc" + sha256 cellar: :any, ventura: "c70b29501fec372898d179cc2b90a8778135b1b90679cedbc9d04967c23be6ca" + sha256 cellar: :any, monterey: "c502d05c3014a4bc43418345944c10ad4f5aa7e65743a83b374b51f8f44d2eff" + sha256 cellar: :any_skip_relocation, arm64_linux: "06aec249f21d3077204ca46f10391df23570448ff47650cbeefd69455dad5a78" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9adf24a05cbf953ad5f3d3bca3f388eadb08480aaf9f100663504c2ea83ff025" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libxml2" + depends_on "libxmlsec1" + depends_on "openssl@3" + + uses_from_macos "python" => :build + uses_from_macos "libxslt" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + resource "six" do + on_linux do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + end + + # patch from upstream issue: https://dev.entrouvert.org/issues/85339 + # Remove when https://git.entrouvert.org/entrouvert/lasso/pulls/10/ is merged + # + # Backport https://git.entrouvert.org/entrouvert/lasso/commit/cbe2c45455d93ed793dc4be59e3d2d26f1bd1111 + # Remove on the next release (starting from "diff --git a/lasso/lasso.c b/lasso/lasso.c") + patch :DATA + + def install + ENV["PYTHON"] = if OS.linux? + venv = virtualenv_create(buildpath/"venv", "python3") + venv.pip_install resources + venv.root/"bin/python" + else + DevelopmentTools.locate("python3") || DevelopmentTools.locate("python") + end + + system "./configure", "--disable-silent-rules", + "--disable-java", + "--disable-perl", + "--disable-php5", + "--disable-php7", + "--disable-python", + "--with-pkg-config=#{ENV["PKG_CONFIG_PATH"]}", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() { + return lasso_init(); + } + C + system ENV.cc, "test.c", + "-I#{Formula["glib"].include}/glib-2.0", + "-I#{Formula["glib"].lib}/glib-2.0/include", + "-I#{Formula["libxml2"].include}/libxml2", + "-I#{Formula["libxmlsec1"].include}/xmlsec1", + "-L#{lib}", "-llasso", "-o", "test" + system "./test" + end +end + +__END__ +diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c +index 4d5fa78a..0478f3f4 100644 +--- a/lasso/xml/tools.c ++++ b/lasso/xml/tools.c +@@ -64,6 +64,7 @@ + #include + #include "xml.h" + #include "xml_enc.h" ++#include "id-ff/server.h" + #include "saml-2.0/saml2_assertion.h" + #include + #include "../debug.h" +@@ -309,7 +310,7 @@ xmlSecKeyPtr lasso_get_public_key_from_pem_file(const char *file) { + pub_key = lasso_get_public_key_from_pem_cert_file(file); + break; + case LASSO_PEM_FILE_TYPE_PUB_KEY: +- pub_key = xmlSecCryptoAppKeyLoad(file, ++ pub_key = xmlSecCryptoAppKeyLoadEx(file, xmlSecKeyDataTypePublic | xmlSecKeyDataTypePrivate, + xmlSecKeyDataFormatPem, NULL, NULL, NULL); + break; + case LASSO_PEM_FILE_TYPE_PRIVATE_KEY: +@@ -378,7 +379,7 @@ lasso_get_public_key_from_pem_cert_file(const char *pem_cert_file) + static xmlSecKeyPtr + lasso_get_public_key_from_private_key_file(const char *private_key_file) + { +- return xmlSecCryptoAppKeyLoad(private_key_file, ++ return xmlSecCryptoAppKeyLoadEx(private_key_file, xmlSecKeyDataTypePrivate | xmlSecKeyDataTypePublic, + xmlSecKeyDataFormatPem, NULL, NULL, NULL); + } + +@@ -2704,7 +2705,7 @@ cleanup: + xmlSecKeyPtr + lasso_xmlsec_load_key_info(xmlNode *key_descriptor) + { +- xmlSecKeyPtr key, result = NULL; ++ xmlSecKeyPtr key = NULL, result = NULL; + xmlNodePtr key_info = NULL; + xmlSecKeyInfoCtx ctx = {0}; + xmlSecKeysMngr *keys_mngr = NULL; +@@ -2738,6 +2739,17 @@ lasso_xmlsec_load_key_info(xmlNode *key_descriptor) + ctx.keyReq.keyUsage = xmlSecKeyDataUsageAny; + ctx.certsVerificationDepth = 0; + ++ if((xmlSecPtrListAdd(&ctx.enabledKeyData, BAD_CAST xmlSecKeyDataX509Id) < 0) || ++ (xmlSecPtrListAdd(&ctx.enabledKeyData, BAD_CAST xmlSecKeyDataValueId) < 0) || ++ (xmlSecPtrListAdd(&ctx.enabledKeyData, BAD_CAST xmlSecKeyDataRsaId) < 0) || ++ (xmlSecPtrListAdd(&ctx.enabledKeyData, BAD_CAST xmlSecKeyDataDsaId) < 0) || ++ (xmlSecPtrListAdd(&ctx.enabledKeyData, BAD_CAST xmlSecKeyDataHmacId) < 0)) { ++ message(G_LOG_LEVEL_CRITICAL, "Could not enable needed KeyData"); ++ goto next; ++ } ++ ++ ++ + key = xmlSecKeyCreate(); + if (lasso_flag_pem_public_key) { + xmlSecErrorsDefaultCallbackEnableOutput(FALSE); +diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c +index 0d5c6e31..09cc3037 100644 +--- a/lasso/xml/xml.c ++++ b/lasso/xml/xml.c +@@ -620,6 +620,10 @@ lasso_node_encrypt(LassoNode *lasso_node, xmlSecKey *encryption_public_key, + goto cleanup; + } + ++#if (XMLSEC_MAJOR > 1) || (XMLSEC_MAJOR == 1 && XMLSEC_MINOR > 3) || (XMLSEC_MAJOR == 1 && XMLSEC_MINOR == 3 && XMLSEC_SUBMINOR >= 0) ++ enc_ctx->keyInfoWriteCtx.flags |= XMLSEC_KEYINFO_FLAGS_LAX_KEY_SEARCH; ++#endif ++ + /* generate a symetric key */ + switch (encryption_sym_key_type) { + case LASSO_ENCRYPTION_SYM_KEY_TYPE_AES_256: +diff --git a/lasso/lasso.c b/lasso/lasso.c +index 42b7d6bb..bc75f5e6 100644 +--- a/lasso/lasso.c ++++ b/lasso/lasso.c +@@ -138,7 +138,13 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) + #include "types.c" + + static void +-lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data, xmlErrorPtr error) ++lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data, ++#if LIBXML_VERSION >= 21200 ++ const xmlError *error ++#else ++ xmlErrorPtr error ++#endif ++ ) + { + g_log("libxml2", G_LOG_LEVEL_DEBUG, "libxml2: %s", error->message); + } +diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c +index bbc87d9f..4d5fa78a 100644 +--- a/lasso/xml/tools.c ++++ b/lasso/xml/tools.c +@@ -1450,7 +1450,14 @@ lasso_concat_url_query(const char *url, const char *query) + } + } + +-static void structuredErrorFunc (void *userData, xmlErrorPtr error) { ++static void structuredErrorFunc (void *userData, ++#if LIBXML_VERSION >= 21200 ++ const xmlError *error ++#else ++ xmlErrorPtr error ++#endif ++ ) ++{ + *(int*)userData = error->code; + } + diff --git a/Formula/l/lastpass-cli.rb b/Formula/l/lastpass-cli.rb new file mode 100644 index 0000000000000..e2f2b0c036800 --- /dev/null +++ b/Formula/l/lastpass-cli.rb @@ -0,0 +1,50 @@ +class LastpassCli < Formula + desc "LastPass command-line interface tool" + homepage "https://github.com/lastpass/lastpass-cli" + url "https://github.com/lastpass/lastpass-cli/releases/download/v1.6.1/lastpass-cli-1.6.1.tar.gz" + sha256 "5e4ff5c9fef8aa924547c565c44e5b4aa31e63d642873847b8e40ce34558a5e1" + license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } + head "https://github.com/lastpass/lastpass-cli.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5ef0e66dd2a0206034d4750a932bdf7b3842ad64bf394791cbb7b4de5e0ebfdc" + sha256 cellar: :any, arm64_sonoma: "b381ad7ecd30a993342cf22f59f91de72a6f9a7006225f2ee76a3c9abb10bc80" + sha256 cellar: :any, arm64_ventura: "c015a4006f07dd1dc19005a042712559699c49a687e251583e2307e1f00a21d2" + sha256 cellar: :any, sonoma: "a7610f932a5e2cb85bd7aaf671cab2c9ee6e00c6775ae6dc0268e115b77218f4" + sha256 cellar: :any, ventura: "043a2e2ed36e33158ea8318ee177294c4064151cb053834a4eb4bf00d36420b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "d146e7c5eabe5ce158e610cf34a0ba6b853a3afe1e16673d4c785d97223e5f21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4503fb1a86f94795f9ccd9433497cde32a9186968873dae16782e53adcb61d79" + end + + depends_on "asciidoc" => :build + depends_on "cmake" => :build + depends_on "docbook-xsl" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "pinentry" + + uses_from_macos "curl" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + # Avoid crashes on Mojave's version of libcurl (https://github.com/lastpass/lastpass-cli/issues/427) + on_mojave :or_newer do + depends_on "curl" + end + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_MANDIR=#{man}", *std_cmake_args + system "cmake", "--build", "build", "--target", "install", "--target", "install-doc" + + bash_completion.install "contrib/lpass_bash_completion" + zsh_completion.install "contrib/lpass_zsh_completion" => "_lpass" + fish_completion.install "contrib/completions-lpass.fish" => "lpass.fish" + end + + test do + assert_equal("Error: Could not find decryption key. Perhaps you need to login with `#{bin}/lpass login`.", + shell_output("#{bin}/lpass passwd 2>&1", 1).chomp) + end +end diff --git a/Formula/l/lastz.rb b/Formula/l/lastz.rb new file mode 100644 index 0000000000000..c3ec9b4fa8544 --- /dev/null +++ b/Formula/l/lastz.rb @@ -0,0 +1,31 @@ +class Lastz < Formula + desc "Pairwise aligner for DNA sequences" + homepage "https://lastz.github.io/lastz/" + url "https://github.com/lastz/lastz/archive/refs/tags/1.04.52.tar.gz" + sha256 "274bf0d774e3f4da87c23ca0b5cc4269f3dcaecf71a1c6289d426e24fbccf4c8" + license "MIT" + head "https://github.com/lastz/lastz.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0d663670926ee95d2ef1724b63284c96fb3f3a0a1c517f67a3066aaf9f2c03ee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "591be15975aa9dd43fd51b15ed647d79dc22724fbf206af81baf67b3d8fe4877" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7f64eee65d64b28cf1cdbaf97b1c1f59289aa1add290e394d778377245645f57" + sha256 cellar: :any_skip_relocation, sonoma: "cbf9f6ac6360306a7d16069ba875c3b7bbc8bf519eeeae744d1e3fd2a9b67ed9" + sha256 cellar: :any_skip_relocation, ventura: "87ed31cf1d1be9434962ea5261dedf49c514a452fa6f98e4e0c59219cb41c34c" + sha256 cellar: :any_skip_relocation, arm64_linux: "def54adb8c80103f68796212aa25a879efef110fc751f811c821e1508793772a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b99c52372809d20f0228dc754d73c23fb5bf8bf0654025b472eba065b4341aec" + end + + def install + system "make", "install", "definedForAll=-Wall", "LASTZ_INSTALL=#{bin}" + doc.install "README.lastz.html" + pkgshare.install "test_data", "tools" + end + + test do + assert_match version.to_s, shell_output("#{bin}/lastz --version", 1) + assert_match "MAF", shell_output("#{bin}/lastz --help=formats", 1) + dir = pkgshare/"test_data" + assert_match "#:lav", shell_output("#{bin}/lastz #{dir}/pseudocat.fa #{dir}/pseudopig.fa") + end +end diff --git a/Formula/l/laszip.rb b/Formula/l/laszip.rb new file mode 100644 index 0000000000000..e84a1de88d3fd --- /dev/null +++ b/Formula/l/laszip.rb @@ -0,0 +1,35 @@ +class Laszip < Formula + desc "Lossless LiDAR compression" + homepage "https://laszip.org/" + url "https://github.com/LASzip/LASzip/archive/refs/tags/3.4.4.tar.gz" + sha256 "6d034bf3a400f81317a5dbad59d1b7ce82d971e887ca22d15813b914f0a5c281" + license "Apache-2.0" + head "https://github.com/LASzip/LASzip.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f32216b11c820816beb5bda485e46f0ea163222543e705be3d1e41c13758b9c6" + sha256 cellar: :any, arm64_sonoma: "d24b59e358170d493bd3d48a8ed99a0253195542510c155f5fd7e9bf329bd733" + sha256 cellar: :any, arm64_ventura: "0a0374c802376297013a20f8af6c2d0f5fc82ff0b7818fea82da2fcc22d02155" + sha256 cellar: :any, arm64_monterey: "402a088a63bc2da1186342b6a88d71b6a86c744b18ee7b35de3ac95fa8b881a8" + sha256 cellar: :any, sonoma: "1eeb4c8027b05035f4fb2bb3b0fdbb3acd4b6c9844f879dc4395ab5ca0020860" + sha256 cellar: :any, ventura: "48dca372c53c8af440ff82b56fd5d71b5ab290bddfda5741764a8ba53eac016b" + sha256 cellar: :any, monterey: "e92cdbac9a9e25e57e27387fda8a8c97da3a7b1c23b725bb3beeaad383fc559a" + sha256 cellar: :any_skip_relocation, arm64_linux: "30274fa432851f4ca9c57197037455092c5cf26808f763d8ee0d256a090cab1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3fc1dd011f2793d3971409a52eeba03e7353141112a441a60fa317c70175856" + 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 "example" + end + + test do + system ENV.cxx, pkgshare/"example/laszipdllexample.cpp", "-L#{lib}", "-I#{include}/laszip", + "-llaszip", "-llaszip_api", "-Wno-format", "-ldl", "-o", "test" + assert_match "LASzip DLL", shell_output("./test -h 2>&1", 1) + end +end diff --git a/Formula/l/latex2html.rb b/Formula/l/latex2html.rb new file mode 100644 index 0000000000000..9dd84593329cc --- /dev/null +++ b/Formula/l/latex2html.rb @@ -0,0 +1,46 @@ +class Latex2html < Formula + desc "LaTeX-to-HTML translator" + homepage "https://www.latex2html.org/" + url "https://github.com/latex2html/latex2html/archive/refs/tags/v2025.tar.gz" + sha256 "d6f4e9f674994c82cbdff5a39441258add4a8822087fc0d418c0a697dbf3d191" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)*)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "17359f64ba9559377a577436aae9ef6c06a785ea4e20211354c2ec535ead3252" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f65e97b803180688a72967591e566bf69017534278f1a53510b99bb726e129a0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "167d02851e14c9c60d894dc40c32bc263dd2eac9356023d67123eea9f5197b31" + sha256 cellar: :any_skip_relocation, sonoma: "07acb63ae7523f8a1d3f389a155966303ed115ef9b3601a41adba50599cc5a8f" + sha256 cellar: :any_skip_relocation, ventura: "e0d9a77d2410693bb2fe2d55e8dbfba133f8ee636a35948f71eb789b2c5168d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "c68c62432cff6fb7f8b197127af925705e61fbec1873d31e281e930855a1b39b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a492ae0e47fef2bb2331f68488a82d22cab36afb649c82af28a34b5532b8e0e" + end + + depends_on "ghostscript" + depends_on "netpbm" + + def install + system "./configure", "--prefix=#{prefix}", + "--without-mktexlsr", + "--with-texpath=#{share}/texmf/tex/latex/html" + system "make", "install" + end + + test do + (testpath/"test.tex").write <<~'TEX' + \documentclass{article} + \usepackage[utf8]{inputenc} + \title{Experimental Setup} + \date{\today} + \begin{document} + \maketitle + \end{document} + TEX + system bin/"latex2html", "test.tex" + assert_match "Experimental Setup", File.read("test/test.html") + end +end diff --git a/Formula/l/latex2rtf.rb b/Formula/l/latex2rtf.rb new file mode 100644 index 0000000000000..f3ea3f52cde91 --- /dev/null +++ b/Formula/l/latex2rtf.rb @@ -0,0 +1,63 @@ +class Latex2rtf < Formula + desc "Translate LaTeX to RTF" + homepage "https://latex2rtf.sourceforge.net/" + # TODO: Switch to GitHub repo tarballs when upstream does a new release + url "https://deb.debian.org/debian/pool/main/l/latex2rtf/latex2rtf_2.3.18a.orig.tar.gz" + sha256 "338ba2e83360f41ded96a0ceb132db9beaaf15018b36101be2bae8bb239017d9" + license "GPL-2.0-or-later" + + livecheck do + skip "New git repository doesn't have 2.x tags yet" + end + + bottle do + sha256 arm64_sequoia: "1401d5794081fccd0385a9a5fbbb53428c2e5a6e0ea52faf745d3b08223f5ae1" + sha256 arm64_sonoma: "0b89a54487cfef6b584b706ed87e270fcbf3a36a840a7f349b2352e82ee0588c" + sha256 arm64_ventura: "b4199f9894249b485a39086d881a86500f17a61bd54c268ca8a06bba188551ca" + sha256 arm64_monterey: "5205d467451011ecb588b38bf923bff4c50f4598ae9ede9629f7336ab4eb1dff" + sha256 arm64_big_sur: "29b2cd9987d2362995534aed209cf84ff93cb307de474bbe2ff16c5e94bfc9cb" + sha256 sonoma: "23c3852f97936ec12ff0c47a4e6711a70cd4d729f4ee6bfbecfe438d2482af8b" + sha256 ventura: "b4a170771dcabf60d657f8f9ac69b7bfebcc9986dcbd226d4a99909fe66bf29d" + sha256 monterey: "fb208afd2ae6bbb1cf5b9edfc255c46224cfdce8617220a5ce0a14686f5a503b" + sha256 big_sur: "fedf28c8cd7113f639a32776b9b55bbbae3ccfa7aa15e142d08004d39cf56d23" + sha256 catalina: "a4f536a8f9a6001fe955727e7d9473b5294daf416b422dab70b489067dad35f3" + sha256 mojave: "e57496652dd135bddb2d28f88d96e6207b69551f040ac4436cb6d043557e90c3" + sha256 arm64_linux: "8b1a51c757de5ad53a56a566565e86c7e51311927b111d16dcdf9bf15ff04e9c" + sha256 x86_64_linux: "4614b529d342e3e532c2c36fc3b6090dd889261c05ba3ea21847a276a063e4c5" + end + + head do + url "https://github.com/latex2rtf/latex2rtf.git", branch: "main" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + end + + def install + touch "doc/latex2rtf.pdf" if build.head? # avoid texlive + + inreplace "Makefile", "cp -p doc/latex2rtf.html $(DESTDIR)$(SUPPORTDIR)", + "cp -p doc/web/* $(DESTDIR)$(SUPPORTDIR)" + system "make", "DESTDIR=", + "BINDIR=#{bin}", + "MANDIR=#{man1}", + "INFODIR=#{info}", + "SUPPORTDIR=#{pkgshare}", + "CFGDIR=#{pkgshare}/cfg", + "install" + end + + test do + (testpath/"test.tex").write <<~'TEX' + \documentclass{article} + \title{LaTeX to RTF} + \begin{document} + \maketitle + \end{document} + TEX + system bin/"latex2rtf", "test.tex" + assert_path_exists testpath/"test.rtf" + assert_match "LaTeX to RTF", (testpath/"test.rtf").read + end +end diff --git a/Formula/l/latexdiff.rb b/Formula/l/latexdiff.rb new file mode 100644 index 0000000000000..7ddd0797b9828 --- /dev/null +++ b/Formula/l/latexdiff.rb @@ -0,0 +1,58 @@ +class Latexdiff < Formula + desc "Compare and mark up LaTeX file differences" + homepage "https://www.ctan.org/pkg/latexdiff" + url "https://github.com/ftilmann/latexdiff/releases/download/1.3.4/latexdiff-1.3.4.tar.gz" + sha256 "aed1c39d51e5c7a8894a5e4b7190106e93968dd90edcc0dde803fcbffe01b2b4" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2733f594fcc18b912a6ed5085f365f2c18e441986ef76941df61692ae6104280" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fd4029165843d24c4a920c3d66a9ae972b5b7be28b4a304d742d718e513be702" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fd4029165843d24c4a920c3d66a9ae972b5b7be28b4a304d742d718e513be702" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fd4029165843d24c4a920c3d66a9ae972b5b7be28b4a304d742d718e513be702" + sha256 cellar: :any_skip_relocation, sonoma: "a25ecc5e1e606ed064a253fe450afef53dd94d9a43a8c5113f8ee2e226af1a47" + sha256 cellar: :any_skip_relocation, ventura: "a25ecc5e1e606ed064a253fe450afef53dd94d9a43a8c5113f8ee2e226af1a47" + sha256 cellar: :any_skip_relocation, monterey: "a25ecc5e1e606ed064a253fe450afef53dd94d9a43a8c5113f8ee2e226af1a47" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a230eb09bffbf99ebf1b39acc145a728223d5c97a4ade526295743f02fa1a97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e878eba7d85094fc7b5622f3d7eef4e9ff0d9dc1c97e4babc0f474ac26520485" + end + + # osx default perl cause compilation error + depends_on "perl" + + def install + bin.install %w[latexdiff-fast latexdiff-so latexdiff-vc latexrevise] + man1.install %w[latexdiff-vc.1 latexdiff.1 latexrevise.1] + doc.install Dir["doc/*"] + pkgshare.install %w[contrib example] + + # Install latexdiff-so (with inlined Algorithm::Diff) as the + # preferred version, more portable + bin.install_symlink "latexdiff-so" => "latexdiff" + end + + test do + (testpath/"test1.tex").write <<~'TEX' + \documentclass{article} + \begin{document} + Hello, world. + \end{document} + TEX + + (testpath/"test2.tex").write <<~'TEX' + \documentclass{article} + \begin{document} + Goodnight, moon. + \end{document} + TEX + + expect = /^\\DIFdelbegin \s+ + \\DIFdel \{ Hello,[ ]world \} + \\DIFdelend \s+ + \\DIFaddbegin \s+ + \\DIFadd \{ Goodnight,[ ]moon \} + \\DIFaddend \s+ + \.$/x + assert_match expect, shell_output("#{bin}/latexdiff test[12].tex") + end +end diff --git a/Formula/l/latexindent.rb b/Formula/l/latexindent.rb new file mode 100644 index 0000000000000..c4045c8193d76 --- /dev/null +++ b/Formula/l/latexindent.rb @@ -0,0 +1,229 @@ +class Latexindent < Formula + desc "Add indentation to LaTeX files" + homepage "https://latexindentpl.readthedocs.io/" + url "https://github.com/cmhughes/latexindent.pl/archive/refs/tags/V3.24.5.tar.gz" + sha256 "3bafd91da0bfd8c530cd9e8bd8dd98948d95850d314cfb459bb180f12a608b83" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e2bf72b8cc5d67a8afe53a67cef85c8fcaee2699677e304f43b0fdc83064d4f4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e828c85b94bcef9e778fe159dd7abc4e104af9a6786c7e89ebdebb97fc544b3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f6934be9ae329867d95351426800ffd0bd99543811fd612ceb2d14dbec380a4b" + sha256 cellar: :any_skip_relocation, sonoma: "4544e9da8ec45f93c96438daa746d829b91239ddc01af35d6983ef4013fb895d" + sha256 cellar: :any_skip_relocation, ventura: "9efa31412f1197251a1ede89fd5f2e8fdb7ec250a11b193f578305143651878a" + sha256 cellar: :any_skip_relocation, arm64_linux: "22901bdb127e5eb4a8d01630ca2116bbc32d18564acbbab9f971b4eb515d7e40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12aef561c51f10cdf8241733bc21a6f70abcdc229dd30f9933dedd2184972879" + end + + depends_on "perl" + + resource "Mac::SystemDirectory" do + on_macos do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Mac-SystemDirectory-0.14.tar.gz" + sha256 "b3c336fe20850042d30e1db1e8d191d3c056cc1072a472eb4e5bd7229056dee1" + end + 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 "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::GlobalDestruction" do + url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Devel-GlobalDestruction-0.14.tar.gz" + sha256 "34b8a5f29991311468fe6913cadaba75fd5d2b0b3ee3bb41fe5b53efab9154ab" + 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 "Dist::CheckConflicts" do + url "https://cpan.metacpan.org/authors/id/D/DO/DOY/Dist-CheckConflicts-0.11.tar.gz" + sha256 "ea844b9686c94d666d9d444321d764490b2cde2f985c4165b4c2c77665caedc4" + 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 "Exception::Class" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Exception-Class-1.45.tar.gz" + sha256 "5482a77ef027ca1f9f39e1f48c558356e954936fc8fbbdee6c811c512701b249" + end + + resource "File::HomeDir" do + url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/File-HomeDir-1.006.tar.gz" + sha256 "593737c62df0f6dab5d4122e0b4476417945bb6262c33eedc009665ef1548852" + 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 "Log::Dispatch" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Log-Dispatch-2.71.tar.gz" + sha256 "9d60d9648c35ce2754731eb4deb7f05809ece1bd633b74d74795aed9ec732570" + 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 "MIME::Charset" do + url "https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/MIME-Charset-1.013.1.tar.gz" + sha256 "1bb7a6e0c0d251f23d6e60bf84c9adefc5b74eec58475bfee4d39107e60870f0" + 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 "Module::Build" do + url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4234.tar.gz" + sha256 "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f" + 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 "Package::Stash" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-0.40.tar.gz" + sha256 "5a9722c6d9cb29ee133e5f7b08a5362762a0b5633ff5170642a5b0686e95e066" + 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 "Params::ValidationCompiler" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Params-ValidationCompiler-0.31.tar.gz" + sha256 "7b6497173f1b6adb29f5d51d8cf9ec36d2f1219412b4b2410e9d77a901e84a6d" + 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 "Specio" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Specio-0.50.tar.gz" + sha256 "467baf0582681626266318e3154727497d7205996fbd76674ba58ed79e10640e" + 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 "Sub::Identify" do + url "https://cpan.metacpan.org/authors/id/R/RG/RGARCIA/Sub-Identify-0.14.tar.gz" + sha256 "068d272086514dd1e842b6a40b1bedbafee63900e5b08890ef6700039defad6f" + 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 "Test::Fatal" do + url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Test-Fatal-0.017.tar.gz" + sha256 "37dfffdafb84b762efe96b02fb2aa41f37026c73e6b83590db76229697f3c4a6" + 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 "Unicode::LineBreak" do + url "https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/Unicode-LineBreak-2019.001.tar.gz" + sha256 "486762e4cacddcc77b13989f979a029f84630b8175e7fef17989e157d4b6318a" + 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 "XString" do + url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/XString-0.005.tar.gz" + sha256 "f247f55c19aee6ba4a1ae73c0804259452e02ea85a9be07f8acf700a5138f884" + 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 "namespace::autoclean" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/namespace-autoclean-0.31.tar.gz" + sha256 "d3b32c82e1d2caa9d58b8c8075965240e6cab66ab9350bd6f6bea4ca07e938d6" + end + + resource "namespace::clean" do + url "https://cpan.metacpan.org/authors/id/R/RI/RIBASUSHI/namespace-clean-0.27.tar.gz" + sha256 "8a10a83c3e183dc78f9e7b7aa4d09b47c11fb4e7d3a33b9a12912fd22e31af9d" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |r| + r.stage do + args = ["INSTALL_BASE=#{libexec}"] + args.unshift "--defaultdeps" if r.name == "MIME::Charset" + system "perl", "Makefile.PL", *args + system "make", "install" + end + end + + (libexec/"lib/perl5").install "LatexIndent" + (libexec/"bin").install "latexindent.pl" + (libexec/"bin").install "defaultSettings.yaml" + (bin/"latexindent").write_env_script(libexec/"bin/latexindent.pl", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + (testpath/"test.tex").write <<~'TEX' + \documentclass{article} + \title{latexindent Homebrew Test} + \begin{document} + \maketitle + \begin{itemize} + \item Hello + \item World + \end{itemize} + \end{document} + TEX + assert_match <<~'TEX', shell_output("#{bin}/latexindent #{testpath}/test.tex") + \documentclass{article} + \title{latexindent Homebrew Test} + \begin{document} + \maketitle + \begin{itemize} + \item Hello + \item World + \end{itemize} + \end{document} + TEX + end +end diff --git a/Formula/l/latexml.rb b/Formula/l/latexml.rb new file mode 100644 index 0000000000000..dc6b1b693e78f --- /dev/null +++ b/Formula/l/latexml.rb @@ -0,0 +1,292 @@ +class Latexml < Formula + desc "LaTeX to XML/HTML/MathML Converter" + homepage "https://dlmf.nist.gov/LaTeXML/" + url "https://dlmf.nist.gov/LaTeXML/releases/LaTeXML-0.8.8.tar.gz" + sha256 "7d2bbe2ce252baf86ba3f388cd0dec3aa4838f49d612b9ec7cc4ff88105badcc" + license :public_domain + revision 1 + head "https://github.com/brucemiller/LaTeXML.git", branch: "master" + + livecheck do + url "https://dlmf.nist.gov/LaTeXML/get.html" + regex(/href=.*?LaTeXML[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a37c6fd0d637c43e26e452ceb11ae7dcb92c395fb857a031e49530e3cd3a1f14" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb545c7e7242db92803f0576ed29431209e64bdfccd0247a6d23afa5cc39cd82" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e38b026b0b334cc52d75564b715319a30001d6399acd836d19c7024d98ee0372" + sha256 cellar: :any_skip_relocation, sonoma: "fdb835e5e6e8f1c7036f8660d177b7d1010a6409734f2171993f7a76ff5a32f4" + sha256 cellar: :any_skip_relocation, ventura: "b2273557c72715d4b7705c008f0baf9c6c20e5e2cb91fe35c26246e9bc452f82" + sha256 cellar: :any_skip_relocation, arm64_linux: "78da7de6a0e0b354b9cf56fc3aadcd7825879af459e71188569c027aaf32981a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ccca1cfac575c937655ad5ae0482606378c56aa463d303a91493983727f584f" + end + + depends_on "pkgconf" => :build + # macOS system perl hits an issue on Big Sur due to XML::LibXSLT + # Ref: https://github.com/Homebrew/homebrew-core/pull/94387 + depends_on "perl" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + # Only the following perl resources are needed when using macOS system perl + + resource "Image::Size" do + url "https://cpan.metacpan.org/authors/id/R/RJ/RJRAY/Image-Size-3.300.tar.gz" + sha256 "53c9b1f86531cde060ee63709d1fda73cabc0cf2d581d29b22b014781b9f026b" + end + + resource "Text::Unidecode" do + url "https://cpan.metacpan.org/authors/id/S/SB/SBURKE/Text-Unidecode-1.30.tar.gz" + sha256 "6c24f14ddc1d20e26161c207b73ca184eed2ef57f08b5fb2ee196e6e2e88b1c6" + end + + # The remaining perl resources are needed when using Homebrew perl, + # which we have switched to due to an issue in Big Sur's XML::LibXSLT: + # Can't load '.../LibXSLT.bundle' for module XML::LibXSLT: + # symbol '_exsltRegisterAll' not found, expected in flat namespace + + resource "Archive::Zip" do + url "https://cpan.metacpan.org/authors/id/P/PH/PHRED/Archive-Zip-1.68.tar.gz" + sha256 "984e185d785baf6129c6e75f8eb44411745ac00bf6122fb1c8e822a3861ec650" + 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 "IO::String" do + url "https://cpan.metacpan.org/authors/id/G/GA/GAAS/IO-String-1.08.tar.gz" + sha256 "2a3f4ad8442d9070780e58ef43722d19d1ee21a803bf7c8206877a10482de5a0" + end + + # JSON::XS build dependency + resource "Canary::Stability" do + url "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/Canary-Stability-2013.tar.gz" + sha256 "a5c91c62cf95fcb868f60eab5c832908f6905221013fea2bce3ff57046d7b6ea" + end + + # JSON::XS dependencies + resource "common::sense" do + url "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/common-sense-3.75.tar.gz" + sha256 "a86a1c4ca4f3006d7479064425a09fa5b6689e57261fcb994fe67d061cba0e7e" + end + resource "Types::Serialiser" do + url "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/Types-Serialiser-1.01.tar.gz" + sha256 "f8c7173b0914d0e3d957282077b366f0c8c70256715eaef3298ff32b92388a80" + end + + resource "JSON::XS" do + url "https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/JSON-XS-4.03.tar.gz" + sha256 "515536f45f2fa1a7e88c8824533758d0121d267ab9cb453a1b5887c8a56b9068" + 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 "Pod::Parser" do + url "https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Parser-1.67.tar.gz" + sha256 "5deccbf55d750ce65588cd211c1a03fa1ef3aaa15d1ac2b8d85383a42c1427ea" + end + + resource "URI" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.27.tar.gz" + sha256 "11962d8a8a8496906e5d34774affc235a1c95c112d390c0b4171f3e91e9e2a97" + end + + # XML::LibXML build dependencies + resource "Capture::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.48.tar.gz" + sha256 "6c23113e87bad393308c90a207013e505f659274736638d8c79bac9c67cc3e19" + 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 "Path::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Path-Tiny-0.144.tar.gz" + sha256 "f6ea094ece845c952a02c2789332579354de8d410a707f9b7045bd241206487d" + 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.80.tar.gz" + sha256 "d9edc936b06705bb5cb5ee5a2ea8bcf6111a3e8815914f177e15e3c0fed301f3" + end + resource "Alien::Libxml2" do + url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/Alien-Libxml2-0.19.tar.gz" + sha256 "f4a674099bbd5747c0c3b75ead841f3b244935d9ef42ba35368024bd611174c9" + end + + # XML::LibXML dependencies + 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::LibXSLT" do + url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/XML-LibXSLT-2.002001.tar.gz" + sha256 "df8927c4ff1949f62580d1c1e6f00f0cd56b53d3a957ee4b171b59bffa63b2c0" + end + + # LWP dependencies + 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.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 "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 "HTML::Tagset" do + url "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/HTML-Tagset-3.20.tar.gz" + sha256 "adb17dac9e36cd011f5243881c9739417fd102fce760f8de4e9be4c7131108e2" + end + resource "HTTP::Request" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Message-6.45.tar.gz" + sha256 "01cb8406612a3f738842d1e97313ae4d874870d1b8d6d66331f16000943d4cbe" + 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 "HTTP::Cookies" do + url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Cookies-6.11.tar.gz" + sha256 "8c9a541a4a39f6c0c7e3d0b700b05dfdb830bd490a1b1942a7dedd1b50d9a8c8" + 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 "Try::Tiny" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Try-Tiny-0.31.tar.gz" + sha256 "3300d31d8a4075b26d8f46ce864a1d913e0e8467ceeba6655d5d2b2e206c11be" + 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.76.tar.gz" + sha256 "75c2e57d6102eea540f3611b56fd86268a59b022dd00ea6562ac36412fcdf8e1" + end + + resource "Clone" do + url "https://cpan.metacpan.org/authors/id/G/GA/GARU/Clone-0.46.tar.gz" + sha256 "aadeed5e4c8bd6bbdf68c0dd0066cb513e16ab9e5b4382dc4a0aafd55890697b" + end + + def perl_build(install_base) + system "perl", "Makefile.PL", "INSTALL_BASE=#{install_base}" + system "make" + system "make", "install" + end + + def install + install_perl5lib = libexec/"lib/perl5" + ENV.prepend_create_path "PERL5LIB", install_perl5lib + ENV.prepend_create_path "PERL5LIB", buildpath/"build/lib/perl5" + ENV["PERL_CANARY_STABILITY_NOPROMPT"] = "1" + + # File::Which is a runtime dependency but also needed by Alien::Build, so install it first + # URI needed by `Alien::Build::Plugin::PkgConfig::CommandLine` + %w[File::Which URI].each do |r| + resource(r).stage do + perl_build(libexec) + end + end + + # Install build-only resources into temporary directory + build_resources = %w[ + Canary::Stability + Path::Tiny + File::chdir + FFI::CheckLib + Capture::Tiny + Alien::Build::Plugin::Download::GitLab + Alien::Build + Alien::Libxml2 + ] + build_resources.each do |r| + resource(r).stage do + perl_build(buildpath/"build") + end + end + + # Install runtime resources into libexec + runtime_resources = resources.to_set(&:name) - build_resources - ["File::Which", "URI"] + runtime_resources.each do |r| + resource(r).stage do + perl_build(libexec) + end + end + + bin_before = Dir[libexec/"bin/*"].to_set + perl_build(libexec) + bin_after = Dir[libexec/"bin/*"].to_set + (bin_after - bin_before).each do |path| + next if File.directory?(path) + + program = File.basename(path) + (bin/program).write_env_script libexec/"bin"/program, PERL5LIB: install_perl5lib + man1.install_symlink libexec/"man/man1/#{program}.1" + end + doc.install "manual.pdf" + end + + test do + (testpath/"test.tex").write <<~'TEX' + \documentclass{article} + \title{LaTeXML Homebrew Test} + \begin{document} + \maketitle + \end{document} + TEX + assert_match %r{LaTeXML Homebrew Test}, + shell_output("#{bin}/latexml --quiet #{testpath}/test.tex") + end +end diff --git a/Formula/l/latino.rb b/Formula/l/latino.rb new file mode 100644 index 0000000000000..4df2497f1a903 --- /dev/null +++ b/Formula/l/latino.rb @@ -0,0 +1,43 @@ +class Latino < Formula + desc "Open source programming language for Latinos and Hispanic speakers" + homepage "https://www.lenguajelatino.org/" + url "https://github.com/lenguaje-latino/latino.git", + tag: "v1.4.4", + revision: "4d8ed2e690dd1efcc47a9f8f790b8a9aeba4b808" + license "MIT" + head "https://github.com/lenguaje-latino/latino.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sonoma: "3f71439866df37de2cbe8fb5c711b770d70186e57a2e3a586dfddd95264aa3df" + sha256 cellar: :any, arm64_ventura: "dbe2fc1ead1951d6c44a9b96638e3ae889322eb7ebb634a826618bed50b16e06" + sha256 cellar: :any, sonoma: "63944aac895d9ec94344a647f9adeab4f4fb9a8d2bb548999d39aa7eb874af0b" + sha256 cellar: :any, ventura: "5a940fde4f7577543fefc1c54ddd0b56b9b09078b9b77acc70b957b8cbc14631" + sha256 cellar: :any_skip_relocation, arm64_linux: "76af2f42cfac533a45afa82f95b24ee0b58a233ad7d96396d3c170f300fcdcc4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8732dbdcbb9723660ff9261f790d3f48f929a6e4d95842471d2a3076fe6618c9" + end + + depends_on "cmake" => :build + + on_linux do + depends_on "readline" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test1.lat").write "poner('hola mundo')" + (testpath/"test2.lat").write <<~EOS + desde (i = 0; i <= 10; i++) + escribir(i) + fin + EOS + output = shell_output("#{bin}/latino test1.lat") + assert_equal "hola mundo", output.chomp + output2 = shell_output("#{bin}/latino test2.lat") + assert_equal "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10", output2.chomp + end +end diff --git a/Formula/l/launch.rb b/Formula/l/launch.rb new file mode 100644 index 0000000000000..9017783a72d75 --- /dev/null +++ b/Formula/l/launch.rb @@ -0,0 +1,45 @@ +class Launch < Formula + desc "Command-line launcher for macOS, in the spirit of `open`" + homepage "https://sabi.net/nriley/software/#launch" + url "https://sabi.net/nriley/software/launch-1.2.5.tar.gz" + sha256 "486632b11bee04d9f6bcb595fd2a68b5fde2f748ebdc182274778cc5cf97ff70" + license "BSD-3-Clause" + head "https://github.com/nriley/launch.git", branch: "master" + + livecheck do + url "https://sabi.net/nriley/software/" + regex(/href=.*?launch[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "54d531c3c1a2663b5666ac7f0b7089173994b80420fcbfff0245810e46c26121" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b4635ec437a42cd80e46447ec0e86fd3744d5c4a338369c88ccb9128113febdc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "df847f012511a511c1e2b9b70dd171a7a8e3d8a829cc58cb20a113ef6dc5a526" + sha256 cellar: :any_skip_relocation, arm64_monterey: "37a22a51899be9434558af2a787f253c90af7b1dc5dc17017096b221c0b85dc3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a8bc9136d5da0270c108662086bebfd5cf74cd5eb82a773318e9be1b7a61b986" + sha256 cellar: :any_skip_relocation, sonoma: "6730cf208e9a8c8e771c8f20ca6e39228096a893cb476e3d25ff81e33e77ccce" + sha256 cellar: :any_skip_relocation, ventura: "55dd24d6048328483994c1d22a56a4c26317399322ec52fbf81968bc1b64a4d0" + sha256 cellar: :any_skip_relocation, monterey: "4813f636dd057ce7e61e02019d3886e2519ca4189c2ee1a98a2f9fa111412225" + sha256 cellar: :any_skip_relocation, big_sur: "0190475edf924787849170f68ab44589bbb41e8eb8e72dc86fefb4f15954ce00" + sha256 cellar: :any_skip_relocation, catalina: "1d48da3f7c9c226fe622e83b1ff37bca0b960ab6979b01f2bf2e4b8010febacc" + sha256 cellar: :any_skip_relocation, mojave: "d9eddaed19bcf6f70a4d6039028cc95693a616006541bd07e3ccea619f462ad8" + end + + depends_on xcode: :build + depends_on :macos + + def install + rm_r("launch") # We'll build it ourself, thanks. + xcodebuild "-configuration", "Deployment", "SYMROOT=build", "clean" + xcodebuild "-arch", Hardware::CPU.arch, "-configuration", "Deployment", "SYMROOT=build", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + + man1.install Utils::Gzip.compress("launch.1") + bin.install "build/Deployment/launch" + end + + test do + assert_equal "/", shell_output("#{bin}/launch -n /").chomp + end +end diff --git a/Formula/l/launch4j.rb b/Formula/l/launch4j.rb new file mode 100644 index 0000000000000..f623025f8cd0b --- /dev/null +++ b/Formula/l/launch4j.rb @@ -0,0 +1,41 @@ +class Launch4j < Formula + desc "Cross-platform Java executable wrapper" + homepage "https://launch4j.sourceforge.net/" + url "https://git.code.sf.net/p/launch4j/git.git", + tag: "Release_launch4j-3_50", + revision: "0b6f1c1ffe4e83dc47fa866a733dbf0125237937" + license all_of: ["BSD-3-Clause", "MIT"] + + livecheck do + url :stable + regex(/^(?:Release_launch4j[._-])?v?(\d+(?:[._]\d+)+)$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + bottle do + sha256 cellar: :any_skip_relocation, sonoma: "bc152d6a1c145f2f6242ebcd9e772809e739e23b13b241f2a995d118a7199251" + sha256 cellar: :any_skip_relocation, ventura: "15f9a731ba37cfd7cf90365c98f8d59ac5c5e482d2caf7561c83adccb81e8f16" + sha256 cellar: :any_skip_relocation, monterey: "65e2841bc477c9fb1368d5fb38fa875a1f4233d75885a4a6e61eadf1e2eea2ae" + sha256 cellar: :any_skip_relocation, big_sur: "23513b54485b601791605269df164cdf4c77c84d122c61fff6db3bb5b65c8e59" + sha256 cellar: :any_skip_relocation, catalina: "8c114ad97d89fad8a9a1a9c6e54d1ce0604f28b71929438db26e97bda57eb58e" + end + + depends_on "ant" => :build + depends_on arch: :x86_64 + # Installs a pre-built `ld` and `windres` file with linkage to zlib + depends_on :macos + depends_on "openjdk" + + def install + system "ant", "compile" + system "ant", "jar" + libexec.install Dir["*"] - ["src", "web"] + bin.write_jar_script libexec/"launch4j.jar", "launch4j" + end + + test do + system bin/"launch4j", "--version" + end +end diff --git a/Formula/l/launch_socket_server.rb b/Formula/l/launch_socket_server.rb new file mode 100644 index 0000000000000..8955ea2f46c2f --- /dev/null +++ b/Formula/l/launch_socket_server.rb @@ -0,0 +1,47 @@ +class LaunchSocketServer < Formula + desc "Bind to privileged ports without running a server as root" + homepage "https://github.com/mistydemeo/launch_socket_server" + url "https://github.com/mistydemeo/launch_socket_server/archive/refs/tags/v2.0.0.tar.gz" + sha256 "507184544d170dab63e6112198212033aaa84edf0e092c1dfe641087f092f365" + license "MIT" + head "https://github.com/mistydemeo/launch_socket_server.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4dc5f49b22d19b1a6d79d1697b52883dfb9ef8f39d2777a49c6aed182b9ef0be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ce6af2c7124bc91494a306292073b296f109482869a4c01870ef97e81d5d62d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f097f91e97343b78e0208793705506ccec3ea9deddb38d9a15d11c11103888cf" + sha256 cellar: :any_skip_relocation, arm64_monterey: "055953e5098f4c8e2c823d58e123eb3a905174c9619791b3fa54de1d671b193d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b95b2bbe04b54feb6b103b5ead74f984160ff920a8914619004b40c1402bceb7" + sha256 cellar: :any_skip_relocation, sonoma: "0fd45ecadc044db17343dcbd89327fd2324512e7055f9b30e26f40dc4c513bc2" + sha256 cellar: :any_skip_relocation, ventura: "1201c5615810d1e37d6c6c2c26ccadf8ffd9a346905cbf064ea637aab8f04629" + sha256 cellar: :any_skip_relocation, monterey: "165fd5a279db8b88e586ca82f2c1017946a7675c8f0c158921d9cb48d152e13b" + sha256 cellar: :any_skip_relocation, big_sur: "0d490a674d736272ea67f2289d5eb715b5aa48acf5e289a6a8e8327cd4cbc4a4" + sha256 cellar: :any_skip_relocation, catalina: "ff86499103ad1d9d33cdc039e24f065aa08405bda980c9e242c46ed157bc33ff" + sha256 cellar: :any_skip_relocation, mojave: "823d84eddeb72fdabeccdc189bc19269485bfeb23d0a57824cdbf95c92a6ccb8" + sha256 cellar: :any_skip_relocation, high_sierra: "ef58f2afc33d6454282d1e1b92e4d16269885464707ae58079c29514f4cadc60" + end + + depends_on "go" => :build + depends_on :macos + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "auto" + system "make", "install", "PREFIX=#{prefix}" + end + + service do + run [opt_sbin/"launch_socket_server", "-"] + environment_variables LAUNCH_PROGRAM_TCP_ADDRESS: "127.0.0.1:8080" + keep_alive true + require_root true + error_log_path var/"log/launch_socket_server.log" + log_path var/"log/launch_socket_server.log" + sockets "tcp://0.0.0.0:80" + end + + test do + assert_includes shell_output("#{opt_sbin}/launch_socket_server 2>&1; true"), + "usage: #{opt_sbin}/launch_socket_server" + end +end diff --git a/Formula/l/launchctl-completion.rb b/Formula/l/launchctl-completion.rb new file mode 100644 index 0000000000000..c412aaa7f1079 --- /dev/null +++ b/Formula/l/launchctl-completion.rb @@ -0,0 +1,21 @@ +class LaunchctlCompletion < Formula + desc "Bash completion for Launchctl" + homepage "https://github.com/CamJN/launchctl-completion" + url "https://github.com/CamJN/launchctl-completion/archive/refs/tags/v1.0.tar.gz" + sha256 "b21c39031fa41576d695720b295dce57358c320964f25d19a427798d0f0df7a0" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2a7e390f88b9c9af6385e775f96d855d40ebe4bf821a3f14de9903d8f30bad7c" + end + + def install + bash_completion.install "launchctl-completion.sh" => "launchctl" + end + + test do + assert_match "-F _launchctl", + shell_output("bash -c 'source #{bash_completion}/launchctl && complete -p launchctl'") + end +end diff --git a/Formula/l/launchdns.rb b/Formula/l/launchdns.rb new file mode 100644 index 0000000000000..8b4a5f7a4f75a --- /dev/null +++ b/Formula/l/launchdns.rb @@ -0,0 +1,53 @@ +class Launchdns < Formula + desc "Mini DNS server designed solely to route queries to localhost" + homepage "https://github.com/josh/launchdns" + url "https://github.com/josh/launchdns/archive/refs/tags/v1.0.4.tar.gz" + sha256 "60f6010659407e3d148c021c88e1c1ce0924de320e99a5c58b21c8aece3888aa" + license "MIT" + revision 2 + head "https://github.com/josh/launchdns.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "17fe53b3739164de794cbd74b1b7ef2f7c0272a364b3d6f76de1ba9a2d4d8941" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b8227cba91d4fc649472990903523d886123ac2809504aa4d9a2c286d06182fd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "480788e6d0135672b26a62c84111d1d6cc1e3f8407da7338cd1ea334767679bd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "76976e31629220e8697a50b0e52d080cef29a6b761a987175b07438d35225ff8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1b7e3e37f394c83c8957c6c2253260805a3abcbb843890c90208d7d743da3328" + sha256 cellar: :any_skip_relocation, sonoma: "1ae43b6504da445d2c882ff643ab8064a6e50b89817391ec5740b40838bfcd40" + sha256 cellar: :any_skip_relocation, ventura: "13f7711fc211beda24f6150ce03ded562696f8748c484e92608574308b9e2474" + sha256 cellar: :any_skip_relocation, monterey: "7883b009f177ae1ede81bc9d27706e26fc8d8bde4cd3e1c45c5cd8f4021cbafd" + sha256 cellar: :any_skip_relocation, big_sur: "87785cae4d4966c318e8fb8424749261b16bb543576e1c45d5fa2bae7f4c3f0e" + sha256 cellar: :any_skip_relocation, catalina: "ebae3446c46a7a6662c3e9b95d61bbee372f1f277a07a4beea1eafc00d64570a" + sha256 cellar: :any_skip_relocation, mojave: "38ad8be46847983774ec6b50896560517bb027b6fe5e5543395f168e489c9c27" + end + + deprecate! date: "2024-03-07", because: :repo_archived + disable! date: "2025-03-24", because: :repo_archived + + depends_on :macos # uses launchd, a component of macOS + + def install + ENV["PREFIX"] = prefix + system "./configure", "--with-launch-h", "--with-launch-h-activate-socket" + system "make", "install" + + (prefix/"etc/resolver/localhost").write <<~EOS + nameserver 127.0.0.1 + port 55353 + EOS + end + + service do + run [opt_bin/"launchdns", "--socket=Listeners", "--timeout=30"] + error_log_path var/"log/launchdns.log" + log_path var/"log/launchdns.log" + sockets "tcp://127.0.0.1:55353" + end + + test do + output = shell_output("#{bin}/launchdns --version") + refute_match(/without socket activation/, output) + system bin/"launchdns", "-p0", "-t1" + end +end diff --git a/Formula/l/lavat.rb b/Formula/l/lavat.rb new file mode 100644 index 0000000000000..da0e67909ec92 --- /dev/null +++ b/Formula/l/lavat.rb @@ -0,0 +1,35 @@ +class Lavat < Formula + desc "Lava lamp simulation using metaballs in the terminal" + homepage "https://github.com/AngelJumbo/lavat" + url "https://github.com/AngelJumbo/lavat/archive/refs/tags/v2.2.0.tar.gz" + sha256 "e8ccda9798270838244bf60497062507cae75b6ab9fb198c54b5a005bea8b87f" + license "MIT" + head "https://github.com/AngelJumbo/lavat.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a7cb9e3e77b1074841570a1bd0b037bcee8d74e05784c8bd9a3f2a4ec4c6c915" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "741edf089aad5dc7dcb7c206daa13fb4e1dceca2bf2d6aeae3a5acedc68cbe5a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "05a6148c956b3d20ab3f27654ad1adbb0e7bd33c11d8af285beb289544d3aaea" + sha256 cellar: :any_skip_relocation, sonoma: "97af569d6ba26c924ae070218cbf6ffd2c53931b9f46b84433e2bf364fcc6c1e" + sha256 cellar: :any_skip_relocation, ventura: "0616d061e0e343fe7cc539b1dba77c3ca50e448788abf7df28c77ba95e6d379c" + sha256 cellar: :any_skip_relocation, arm64_linux: "00a81e2dd91c2cb54242affeb77d967eb3af4f4b8394f6a4b97b7d8bc737b21f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b1f70e38f1cd377a86a965c50ae36662081e0ad44d171d41e5683b26d0da384" + end + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + test do + # GUI app + assert_match "Usage: lavat [OPTIONS]", shell_output("#{bin}/lavat -h") + + require "pty" + + PTY.spawn(bin/"lavat") do |_r, _w, pid| + sleep 5 + ensure + Process.kill("TERM", pid) + end + end +end diff --git a/Formula/l/lazydocker.rb b/Formula/l/lazydocker.rb new file mode 100644 index 0000000000000..ce40c0b8af45b --- /dev/null +++ b/Formula/l/lazydocker.rb @@ -0,0 +1,31 @@ +class Lazydocker < Formula + desc "Lazier way to manage everything docker" + homepage "https://github.com/jesseduffield/lazydocker" + url "https://github.com/jesseduffield/lazydocker/archive/refs/tags/v0.24.1.tar.gz" + sha256 "f54197d333a28e658d2eb4d9b22461ae73721ec9e4106ba23ed177fc530c21f4" + license "MIT" + head "https://github.com/jesseduffield/lazydocker.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d56e3e9243fcce363bcc3af848e66be911f855a1b00c52cfdfe6dce245a7c60e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d56e3e9243fcce363bcc3af848e66be911f855a1b00c52cfdfe6dce245a7c60e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d56e3e9243fcce363bcc3af848e66be911f855a1b00c52cfdfe6dce245a7c60e" + sha256 cellar: :any_skip_relocation, sonoma: "223526b606bffcc7ff56767b65e135fdc82b6df8575a8c21897a7ec4608404c8" + sha256 cellar: :any_skip_relocation, ventura: "223526b606bffcc7ff56767b65e135fdc82b6df8575a8c21897a7ec4608404c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43b3ee2215c9e3f64e30c9a06037fbac3cf78c58e9cb150ff1e3e42f657a67bf" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.date=#{time.iso8601} -X main.buildSource=#{tap.user}" + system "go", "build", "-mod=vendor", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/lazydocker --version") + + assert_match "language: auto", shell_output("#{bin}/lazydocker --config") + end +end diff --git a/Formula/l/lazygit.rb b/Formula/l/lazygit.rb new file mode 100644 index 0000000000000..6baccb7c6b07c --- /dev/null +++ b/Formula/l/lazygit.rb @@ -0,0 +1,38 @@ +class Lazygit < Formula + desc "Simple terminal UI for git commands" + homepage "https://github.com/jesseduffield/lazygit/" + url "https://github.com/jesseduffield/lazygit/archive/refs/tags/v0.50.0.tar.gz" + sha256 "4fec66f33609898dbceffc02a38375f5b965b68d0eaf3f5afbe1a44481a5c72b" + license "MIT" + head "https://github.com/jesseduffield/lazygit.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b070dcf7835e4b889cf570379e5b4287f9593d3e8a0f6b6ed5098f167349574a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b070dcf7835e4b889cf570379e5b4287f9593d3e8a0f6b6ed5098f167349574a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b070dcf7835e4b889cf570379e5b4287f9593d3e8a0f6b6ed5098f167349574a" + sha256 cellar: :any_skip_relocation, sonoma: "63bc6f8aebc85132c9ed24fab7e6f19ec0b95e9a7cbca1549837a12780f12cc5" + sha256 cellar: :any_skip_relocation, ventura: "63bc6f8aebc85132c9ed24fab7e6f19ec0b95e9a7cbca1549837a12780f12cc5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee9c1a96bdd15717d8cadb43b9c32247dd0db77b6493257a3699eafdb4c57541" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.version=#{version} -X main.buildSource=#{tap.user}" + system "go", "build", "-mod=vendor", *std_go_args(ldflags:) + end + + test do + system "git", "init", "--initial-branch=main" + + output = shell_output("#{bin}/lazygit log 2>&1", 1) + assert_match "errors.errorString terminal not cursor addressable", output + + assert_match version.to_s, shell_output("#{bin}/lazygit -v") + end +end diff --git a/Formula/l/lazyjj.rb b/Formula/l/lazyjj.rb new file mode 100644 index 0000000000000..2ea94a1b3ff0d --- /dev/null +++ b/Formula/l/lazyjj.rb @@ -0,0 +1,35 @@ +class Lazyjj < Formula + desc "TUI for Jujutsu/jj" + homepage "https://github.com/Cretezy/lazyjj" + url "https://github.com/Cretezy/lazyjj/archive/refs/tags/v0.5.0.tar.gz" + sha256 "67cb6363e40e97fdbced8a789d93a4fde14ac12a74baf83a600ecc48b8baa0ef" + license "Apache-2.0" + head "https://github.com/Cretezy/lazyjj.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0212c6dc5663065e4ddd53929fdc6d3810b7b7f762f17cc52e1f02c32231073e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9285414913cafe9776fee472824deffa0b6f03c86fac4e531e62a8c58a10fd9a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa4a9daca65ca854f3ca9cbc5505b076a16a61f53ba7145d99036316bbac6de6" + sha256 cellar: :any_skip_relocation, sonoma: "78a96d3afef172a336db8e721539341a500d8e373134f1c67ff5afded93a66e1" + sha256 cellar: :any_skip_relocation, ventura: "fa1c36a2ae1e1ffb1e341fd27fac8de8aa28898a00d4ed7e8d304803eddf911d" + sha256 cellar: :any_skip_relocation, arm64_linux: "7c0a6d3272ad035c14e7c141c8a56b304a4039b63e9294cf5a78f94dd33693fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c3dddf8d87fbefae71b6c798e8848a16ba81fd04c3eeb349b889d200ae65105" + end + + depends_on "rust" => :build + depends_on "jj" + + def install + system "cargo", "install", *std_cargo_args + end + + test do + ENV["LAZYJJ_LOG"] = "1" + + assert_match version.to_s, shell_output("#{bin}/lazyjj --version") + + output = shell_output("#{bin}/lazyjj 2>&1", 1) + assert_match "Error: No jj repository found", output + assert_path_exists testpath/"lazyjj.log" + end +end diff --git a/Formula/l/lazyjournal.rb b/Formula/l/lazyjournal.rb new file mode 100644 index 0000000000000..47316c23c9726 --- /dev/null +++ b/Formula/l/lazyjournal.rb @@ -0,0 +1,41 @@ +class Lazyjournal < Formula + desc "TUI for logs from journalctl, file system, Docker, Podman and Kubernetes pods" + homepage "https://github.com/Lifailon/lazyjournal" + url "https://github.com/Lifailon/lazyjournal/archive/refs/tags/0.7.8.tar.gz" + sha256 "64b23ee8a4d2c0588f0ffc372f8aa0a4841cc9bc2ec7b5d6a4cd0603b4feb687" + license "MIT" + head "https://github.com/Lifailon/lazyjournal.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b92cbb1579960d97d75b36935f47b688423ec630b434524b01e34767bafd54d8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b92cbb1579960d97d75b36935f47b688423ec630b434524b01e34767bafd54d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b92cbb1579960d97d75b36935f47b688423ec630b434524b01e34767bafd54d8" + sha256 cellar: :any_skip_relocation, sonoma: "abf19ab18b8b575c78a4d8842d05eae04be71183046e929088faa0f9f2f7ae27" + sha256 cellar: :any_skip_relocation, ventura: "abf19ab18b8b575c78a4d8842d05eae04be71183046e929088faa0f9f2f7ae27" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dac6108176eb6a1339d7415547394ec4fb46f8e60e73205bf85654ed2757f493" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.date=#{time.iso8601} + -X main.buildSource=#{tap.user} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match version.to_s, shell_output("#{bin}/lazyjournal --version") + + require "pty" + PTY.spawn bin/"lazyjournal" do |_r, _w, pid| + sleep 3 + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/l/lazysql.rb b/Formula/l/lazysql.rb new file mode 100644 index 0000000000000..365648b403b2c --- /dev/null +++ b/Formula/l/lazysql.rb @@ -0,0 +1,47 @@ +class Lazysql < Formula + desc "Cross-platform TUI database management tool" + homepage "https://github.com/jorgerojas26/lazysql" + url "https://github.com/jorgerojas26/lazysql/archive/refs/tags/v0.3.7.tar.gz" + sha256 "de14848d91db3bd70dac399030fd7f5053b8fd6479d2b15fdafcda03ff136724" + license "MIT" + head "https://github.com/jorgerojas26/lazysql.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f80bf40ed7c5573d1fc5c22026043110c1820cf02274dcf7d434f3829d17252f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f80bf40ed7c5573d1fc5c22026043110c1820cf02274dcf7d434f3829d17252f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f80bf40ed7c5573d1fc5c22026043110c1820cf02274dcf7d434f3829d17252f" + sha256 cellar: :any_skip_relocation, sonoma: "cb4e54f06a410993248d8f300f67da31a84e31976d899eda2872df2fe2405f9f" + sha256 cellar: :any_skip_relocation, ventura: "cb4e54f06a410993248d8f300f67da31a84e31976d899eda2872df2fe2405f9f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "680e0bf2cdf005493e942aa6460d453dc2e697259f86317272d1517c04155428" + end + + depends_on "go" => :build + uses_from_macos "sqlite" => :test + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}") + 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("sqlite3 test.db < #{path}").strip.split("\n") + assert_equal %w[Sue Tim Bob], names + + assert_match "terminal not cursor addressable", shell_output("#{bin}/lazysql test.db 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/lazysql -version 2>&1") + end +end diff --git a/Formula/l/lbdb.rb b/Formula/l/lbdb.rb new file mode 100644 index 0000000000000..30b065fc20fa4 --- /dev/null +++ b/Formula/l/lbdb.rb @@ -0,0 +1,36 @@ +class Lbdb < Formula + desc "Little brother's database for the mutt mail reader" + homepage "https://www.spinnaker.de/lbdb/" + url "https://www.spinnaker.de/lbdb/download/lbdb-0.56.tar.gz" + sha256 "baa6a23b61394d792b7b221e1961d9ba5710614c9324e8f59b35c126c2b4e74e" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.spinnaker.de/lbdb/download/" + regex(/href=.*?lbdb[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5fa1d425e1b6b4496d75679fefc7d0d0967ebc9c4654e495603c04950dd262ad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bf0613f346c74e4ac7f78c08297114d87b5b583f541768e8765a9ffffd55c3e1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b613432087627ec2139888a3a2c7e024fd88fefee630e61e54a6048b8434ca22" + sha256 cellar: :any_skip_relocation, sonoma: "799de569aa9a50d882d5bb452351bc7fba0eb60f874024166a9696da6bd6ae40" + sha256 cellar: :any_skip_relocation, ventura: "e0f4a17ce22453b7aa2187bc18563bdc00aa05b65648523d5e9e944ce9c28f60" + sha256 cellar: :any_skip_relocation, arm64_linux: "4ec1911ba656b63107d2c2784b460c56781f35371e0b8895c86f9e645593d4bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f780ddee05060ddb5b7c9263c2a89d9ce686995f021df5b9eb610445c2709975" + end + + depends_on "abook" + depends_on "khard" + + def install + system "./configure", "--libexecdir=#{lib}/lbdb", *std_configure_args + system "make", "install" + end + + test do + assert_match version.major_minor.to_s, shell_output("#{bin}/lbdbq -v") + assert_path_exists lib/"lbdb/m_abook", "m_abook module is missing!" + assert_path_exists lib/"lbdb/m_khard", "m_khard module is missing!" + end +end diff --git a/Formula/l/lbfgspp.rb b/Formula/l/lbfgspp.rb new file mode 100644 index 0000000000000..7b6d3b74595aa --- /dev/null +++ b/Formula/l/lbfgspp.rb @@ -0,0 +1,68 @@ +class Lbfgspp < Formula + desc "Header-only C++ library for L-BFGS and L-BFGS-B algorithms" + homepage "https://lbfgspp.statr.me/" + url "https://github.com/yixuan/LBFGSpp/archive/refs/tags/v0.4.0.tar.gz" + sha256 "39c4aaebd8b94ccdc98191d51913a31cddd618cc0869d99f07a4b6da83ca6254" + license "MIT" + head "https://github.com/yixuan/LBFGSpp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "915d14792b76cd42afb89064bd50c8119dcf4ba0f500d3d06032c6126a349011" + 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" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + using Eigen::VectorXd; + using namespace LBFGSpp; + + class Rosenbrock { + private: + int n; + public: + Rosenbrock(int n_) : n(n_) {} + double operator()(const VectorXd& x, VectorXd& grad) { + double fx = 0.0; + for(int i = 0; i < n; i += 2) { + double t1 = 1.0 - x[i]; + double t2 = 10 * (x[i + 1] - x[i] * x[i]); + grad[i + 1] = 20 * t2; + grad[i] = -2.0 * (x[i] * grad[i + 1] + t1); + fx += t1 * t1 + t2 * t2; + } + return fx; + } + }; + + int main() { + const int n = 10; + LBFGSParam param; + param.epsilon = 1e-6; + param.max_iterations = 100; + LBFGSSolver solver(param); + Rosenbrock fun(n); + VectorXd x = VectorXd::Zero(n); + double fx; + solver.minimize(fun, x, fx); + std::cout << x.transpose() << std::endl; + return 0; + } + CPP + system ENV.cxx, testpath/"test.cpp", "-std=c++11", + "-I#{include}", "-I#{Formula["eigen"].opt_include}/eigen3", + "-o", "test" + assert_equal "1 1 1 1 1 1 1 1 1 1", shell_output(testpath/"test").chomp + end +end diff --git a/Formula/l/lbzip2.rb b/Formula/l/lbzip2.rb new file mode 100644 index 0000000000000..9affb78ac3b79 --- /dev/null +++ b/Formula/l/lbzip2.rb @@ -0,0 +1,51 @@ +class Lbzip2 < Formula + desc "Parallel bzip2 utility" + homepage "https://github.com/kjn/lbzip2" + url "https://web.archive.org/web/20170304050514/archive.lbzip2.org/lbzip2-2.5.tar.bz2" + mirror "https://fossies.org/linux/privat/lbzip2-2.5.tar.bz2" + sha256 "eec4ff08376090494fa3710649b73e5412c3687b4b9b758c93f73aa7be27555b" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f4e8b2e54ff8947f156f0d1bf226b86e6d0b205aacdca7becb7082e4c0ca39d6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "abab60638d8631dbc39b92e1a9061c2b5d2e6ef40259efe4173eae99de6668e2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a41953244b7b781c4620ef0b757648ee8f0cd43ef5d616f44a9f4aebf9a5342a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9815b21683195fdeda12fe2ec7b2f4336d34e7a4b44a4a318c67efed6f9e035e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e9ecc58d178f18ab33d500ed768c156058589fed3132bf804314e76715730333" + sha256 cellar: :any_skip_relocation, sonoma: "8bba55baf05a8fe5d172a3e1c77de927e35013a88b2f79347e808639b7cc2404" + sha256 cellar: :any_skip_relocation, ventura: "494a45ea5c053b6bcf63fada0b93c4400ef887d3016eab7e1cee20dd75054763" + sha256 cellar: :any_skip_relocation, monterey: "b9882075d6ce9ed47c0e18cc27c9b23706a8ceedc8ff42977b614f8fc92cdb57" + sha256 cellar: :any_skip_relocation, big_sur: "4bb02d26e53336134329f3aaacf2ce045375b926b283520788ecdf2ae4d778e6" + sha256 cellar: :any_skip_relocation, catalina: "6643ba1c0f17a13e742383c69112df62c1d6bce80e6833d717df4e112922deb5" + sha256 cellar: :any_skip_relocation, mojave: "5f7f053aac95586cdcacb2528fe4540bd16522707e9d7bbbf8e6d38012378e06" + sha256 cellar: :any_skip_relocation, high_sierra: "3d4e0de242b81f83ba2addd163688647288fb17f3a3ae3ccd37a2e62f20871d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "6dd348d4b4186cbf9268a4467b0d364ad90d364284862ed58b9d2ccc246bdbaa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88137d3cccfc08f362d926aeaad73312aa4d5265dd89fc92c881b1da20097f6f" + end + + deprecate! date: "2024-07-03", because: :unmaintained + + # Fix crash on macOS >= 10.13. + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/6b276429dbe68323349e1eda09b7e5d5a1082671/lbzip2/gnulib-vasnprintf-port-to-macOS-10-13.diff" + sha256 "5b931e071e511a9c56e529278c249d7b2c82bbc3deda3dd9b739b3bd67d3d969" + end + + # Apply Arch Linux fix for newer glibc + patch do + url "https://gitlab.archlinux.org/archlinux/packaging/packages/lbzip2/-/raw/e707d24e8b5681f9d824e1141e41323ccd0a714d/lbzip2-gnulib-build-fix.patch" + sha256 "5eca4665b147655ce99f9ae5eff50e7db2714ba957e41e20b50d80533aeb6bef" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + touch "fish" + system bin/"lbzip2", "fish" + system bin/"lbunzip2", "fish.bz2" + end +end diff --git a/Formula/l/lc0.rb b/Formula/l/lc0.rb new file mode 100644 index 0000000000000..3402a0950abf0 --- /dev/null +++ b/Formula/l/lc0.rb @@ -0,0 +1,65 @@ +class Lc0 < Formula + desc "Open source neural network based chess engine" + homepage "https://lczero.org/" + url "https://github.com/LeelaChessZero/lc0.git", + tag: "v0.31.2", + revision: "8ba8aa426460bbeda452754ff7d6a9bb60bb0e54" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f25d5b0e4a549bbc2e1dae7af722c5aec25016ce421b160f4619121b22286c19" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3f528105e9e803ce4fc4e710d3a94b02b192b0d055ec105cd460ca9c5ecaea1f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2aeb4b6042e63d1caba7f44e7a753b54032fe2c3a5b9d30b1c49db4149adc0dd" + sha256 cellar: :any_skip_relocation, sonoma: "23318830a811ab5d1047779f6c3fe6bd9d1c2cc4e8ede7713c8027624b36a445" + sha256 cellar: :any_skip_relocation, ventura: "fdf20fa39a246862aa429134e633763fa585b0a9b23865fa82bbbddd29a96596" + sha256 arm64_linux: "c4a48bea8d7085a67ff4bfea83e3536b0944bbf78f5deb997e7a37f51439797b" + sha256 x86_64_linux: "4f996c61da081b7421b72a5b1a7c47e0d69ccc0f626185c1016b3df45aca48a4" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "eigen" + + uses_from_macos "python" => :build # required to compile .pb files + uses_from_macos "zlib" + + on_linux do + depends_on "openblas" + end + + # We use "753723" network with 15 blocks x 192 filters (from release notes) + # Downloaded from https://training.lczero.org/networks/?show_all=0 + resource "network" do + url "https://training.lczero.org/get_network?sha=3e3444370b9fe413244fdc79671a490e19b93d3cca1669710ffeac890493d198", using: :nounzip + sha256 "ca9a751e614cc753cb38aee247972558cf4dc9d82c5d9e13f2f1f464e350ec23" + end + + def install + args = ["-Dgtest=false", "-Dbindir=libexec"] + + if OS.mac? + # Disable metal backend for older macOS + # Ref https://github.com/LeelaChessZero/lc0/issues/1814 + args << "-Dmetal=disabled" if MacOS.version <= :big_sur + else + args << "-Dopenblas_include=#{Formula["openblas"].opt_include}" + args << "-Dopenblas_libdirs=#{Formula["openblas"].opt_lib}" + end + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + bin.write_exec_script libexec/"lc0" + resource("network").stage { libexec.install Dir["*"].first => "42850.pb.gz" } + end + + test do + assert_match "Creating backend [blas]", + shell_output("#{bin}/lc0 benchmark --backend=blas --nodes=1 --num-positions=1 2>&1") + assert_match "Creating backend [eigen]", + shell_output("#{bin}/lc0 benchmark --backend=eigen --nodes=1 --num-positions=1 2>&1") + end +end diff --git a/Formula/l/lcdf-typetools.rb b/Formula/l/lcdf-typetools.rb new file mode 100644 index 0000000000000..d9f1e6f4aafad --- /dev/null +++ b/Formula/l/lcdf-typetools.rb @@ -0,0 +1,47 @@ +class LcdfTypetools < Formula + desc "Manipulate OpenType and multiple-master fonts" + homepage "https://www.lcdf.org/type/" + url "https://www.lcdf.org/type/lcdf-typetools-2.110.tar.gz" + sha256 "517f9ee879208679d3224a14d5e6eb20598fc648d5c3562708083d003088a934" + license "GPL-2.0-or-later" + head "https://github.com/kohler/lcdf-typetools.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?lcdf-typetools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "5e354428d6719b3944d45a3836a61964221ae31b65a35cdc04d92a89c72bcd10" + sha256 arm64_sonoma: "adebc013b9cd122099069d78f3da8eca8c86f585e2e08476f4fafe852acc6414" + sha256 arm64_ventura: "8236a9837f726de7f4134db255df5df0c74b6d3aa0827a583e5c3d121e2170c1" + sha256 arm64_monterey: "be7523e73f08148f0848d41a93ae2443227d06d88da621f576c7fe346070224d" + sha256 arm64_big_sur: "bfdcd6b8f33e4a552a0ddc6eb20ee8311332477647ac02c96ce92eb0f3a0f10f" + sha256 sonoma: "ad5b178aa2847ac19ed1dd15d43137d90758d84978ff8b36df9db66437323be8" + sha256 ventura: "1dd345c1b3f20d16d2303573c9324047172f728999ecb497cb6e13c56e31c96a" + sha256 monterey: "81daa75ad3bfaf2257c2967749981284d2a9076bbdd60176f6ee845b6419a90e" + sha256 big_sur: "34f194d4996198a1c3f5ffb49b65c2e00af73e88db861d49a22f7ee9dcf3ea3c" + sha256 arm64_linux: "934b2e2900efd242c6ca0f1d6a4b4c25e92e5ba0f6548fb6899fd8ae83a529f6" + sha256 x86_64_linux: "bc299e560c0228488ee8205b9e9a91d007d205beddd06c0461fa6e8d4e9d2589" + end + + conflicts_with "texlive", because: "both install a `cfftot1` executable" + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--without-kpathsea" + system "make", "install" + end + + test do + if OS.mac? + font_name = (MacOS.version >= :catalina) ? "Arial Unicode" : "Arial" + font_dir = "/Library/Fonts" + else + font_name = "DejaVuSans" + font_dir = "/usr/share/fonts/truetype/dejavu" + end + assert_includes shell_output("#{bin}/otfinfo -p '#{font_dir}/#{font_name}.ttf'"), font_name.delete(" ") + end +end diff --git a/Formula/l/lcdproc.rb b/Formula/l/lcdproc.rb new file mode 100644 index 0000000000000..42b8de128cb06 --- /dev/null +++ b/Formula/l/lcdproc.rb @@ -0,0 +1,44 @@ +class Lcdproc < Formula + desc "Display real-time system information on a LCD" + homepage "https://www.lcdproc.org/" + url "https://github.com/lcdproc/lcdproc/releases/download/v0.5.9/lcdproc-0.5.9.tar.gz" + sha256 "d48a915496c96ff775b377d2222de3150ae5172bfb84a6ec9f9ceab962f97b83" + license "GPL-2.0-or-later" + revision 2 + + bottle do + sha256 sonoma: "16efc1c9a35bf0563aa2c66a8f653c56e1ef4694956533c31acc722af6834f86" + sha256 ventura: "ff2675dfa714a9de7e8d5a9f40c214cf5547c85c402337e7376a54631f43020a" + sha256 monterey: "90bb0544163a3966aac4de0dffaff4a9cc59cb05e08c314a28829fcf8df8e38b" + sha256 big_sur: "937564e19f5e45fd49b02e83577a4e217abf89ca3884958b3f9e80b2132fa8df" + sha256 catalina: "8899d5c5afebdf222f014f383e009071bda3f075a08e5f0d729a81f99c9c8086" + sha256 arm64_linux: "31e9cdd685bcf637f916a0f897c8bf9da80b89da8440b66a21fead876ed3f9c2" + sha256 x86_64_linux: "d869dec7aa2e03b2c6bc21a281ac56537d5a596e0a87442fc79fda035f000282" + end + + depends_on "pkgconf" => :build + + depends_on "libftdi" + depends_on "libusb" + depends_on "libusb-compat" # Remove when all drivers migrated https://github.com/lcdproc/lcdproc/issues/13 + + uses_from_macos "ncurses" + + on_macos do + depends_on arch: :x86_64 + end + + def install + ENV.append_to_cflags "-fcommon" if ENV.compiler.to_s.start_with?("gcc") + + system "./configure", "--disable-silent-rules", + "--enable-drivers=all", + "--enable-libftdi=yes", + *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/lcdproc -v 2>&1") + end +end diff --git a/Formula/l/lci.rb b/Formula/l/lci.rb new file mode 100644 index 0000000000000..1778ae52bb750 --- /dev/null +++ b/Formula/l/lci.rb @@ -0,0 +1,31 @@ +class Lci < Formula + desc "Interpreter for the lambda calculus" + homepage "https://www.chatzi.org/lci/" + url "https://github.com/chatziko/lci/releases/download/v1.1/lci-v1.1.tar.gz" + sha256 "51725e33a7066100757b7da84b2290a651a5f47b985eb3e3647acd871964cd58" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_sequoia: "13a9869c2bc147eb19005e15ed2ccd27a6afec14b8ec661b535e6a8a288b47bc" + sha256 arm64_sonoma: "46ba0405d0111869ea90bd1fd0148807a65bda00be35589b8d67701b57ffcbf4" + sha256 arm64_ventura: "2cfa4820068d0e4495d3cf8bad083fb4a4fc5ba8b9e141f86fee1887b24bc38c" + sha256 sonoma: "e32fad6844ab4a93730432d96c263980089464b7f382bf485903b79352d3538b" + sha256 ventura: "0821036d4af1bfc500f333725f6caf28c1d2fc75a212d66131658f63ffdcd8fe" + sha256 arm64_linux: "2d8de81c217d9624bbbdb63f6375d685cd43d08ddcc299fe2ff9a8143ea345d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19652d5516ba04ec5519854bdfb56b38156890fa066d6ced1a8d6d228e60c509" + end + + depends_on "cmake" => :build + + conflicts_with "lolcode", because: "both install `lci` binaries" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "[I, 2]", pipe_output(bin/"lci", "Append [1] [2]\n") + end +end diff --git a/Formula/l/lcm.rb b/Formula/l/lcm.rb new file mode 100644 index 0000000000000..d4995ed704790 --- /dev/null +++ b/Formula/l/lcm.rb @@ -0,0 +1,73 @@ +class Lcm < Formula + desc "Libraries and tools for message passing and data marshalling" + homepage "https://lcm-proj.github.io/" + url "https://github.com/lcm-proj/lcm/archive/refs/tags/v1.5.1.tar.gz" + sha256 "40ba0b7fb7c9ad06d05e06b4787d743cf11be30eb4f1a03abf4a92641c5b1203" + license "LGPL-2.1-or-later" + head "https://github.com/lcm-proj/lcm.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2244b5fa7c8e7c9fad69837d8c87e21b6b934bdb35d730cd29388add2258c388" + sha256 cellar: :any, arm64_sonoma: "ae864e359da145328a10f94d4c231a86f4b199d9727d43c15699bdb2024a56a1" + sha256 cellar: :any, arm64_ventura: "1cd041a8337c350c38de47ce7c2ac015a1819b2a1efb090f6563f42a729fa7fb" + sha256 cellar: :any, sonoma: "c442066258d99654dfcc78ba143cb04d5fc74ef1306a14be1d70baafba7ba6bb" + sha256 cellar: :any, ventura: "b07445d9724d1e720b4fb24983df5adbbab9fff80cc0621f97aa1429485e8dbb" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a79f1fdc4e500d5b9d21c79802b3d17a9d1c5150ba0a4c11e1fb2b6c7553485" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2140c559088413340306e19ad843419a48fa5e5747269a25ed975c2945b4340" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "lua" + depends_on "openjdk" + depends_on "python@3.13" + + def python3 + which("python3.13") + end + + def install + # Adding RPATH in #{lib}/lua/X.Y/lcm.so and some #{bin}/*. + args = %W[ + -DCMAKE_INSTALL_RPATH=#{lib} + -DLCM_ENABLE_EXAMPLES=OFF + -DLCM_ENABLE_TESTS=OFF + -DLCM_JAVA_TARGET_VERSION=8 + -DPYTHON_EXECUTABLE=#{python3} + ] + + # `lcm-lua/lualcm_lcm.c:577:9: error: ‘subscription’ may be used uninitialized` + # See discussions in https://github.com/lcm-proj/lcm/issues/457 + ENV.append_to_cflags "-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 + (testpath/"example_t.lcm").write <<~EOS + package exlcm; + struct example_t { + int64_t timestamp; + double position[3]; + string name; + } + EOS + system bin/"lcm-gen", "-c", "example_t.lcm" + assert_path_exists testpath/"exlcm_example_t.h", "lcm-gen did not generate C header file" + assert_path_exists testpath/"exlcm_example_t.c", "lcm-gen did not generate C source file" + system bin/"lcm-gen", "-x", "example_t.lcm" + assert_path_exists testpath/"exlcm/example_t.hpp", "lcm-gen did not generate C++ header file" + system bin/"lcm-gen", "-j", "example_t.lcm" + assert_path_exists testpath/"exlcm/example_t.java", "lcm-gen did not generate Java source file" + system bin/"lcm-gen", "-p", "example_t.lcm" + assert_path_exists testpath/"exlcm/example_t.py", "lcm-gen did not generate Python source file" + end +end diff --git a/Formula/l/lcov.rb b/Formula/l/lcov.rb new file mode 100644 index 0000000000000..0fafebf4db98f --- /dev/null +++ b/Formula/l/lcov.rb @@ -0,0 +1,211 @@ +class Lcov < Formula + desc "Graphical front-end for GCC's coverage testing tool (gcov)" + homepage "https://github.com/linux-test-project/lcov" + url "https://github.com/linux-test-project/lcov/releases/download/v2.3.1/lcov-2.3.1.tar.gz" + sha256 "b3017679472d5fcca727254493d0eb44253c564c2c8384f86965ba9c90116704" + license "GPL-2.0-or-later" + head "https://github.com/linux-test-project/lcov.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fcedc02edaf2f1741c7dba360cc56e57804bf0c004c42e4d6c52978cccdeb741" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e6384fc41ccaeec619e775f181d0ca1563b392a47a9f757ab823d612ed3f449b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1e6dc5a8c51db813d1c8384b244b889dba77bcace71887d3a59058fea5de0f39" + sha256 cellar: :any_skip_relocation, sonoma: "09faa3e1fbcd6f505f10ef0b3c26ad1560dfb277f376083f9098fe4d058742af" + sha256 cellar: :any_skip_relocation, ventura: "50ac9094176effcd564bbbe34000a9b96f60d6b55666dbe0350fdc26f3c094f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "5927d4b4e3665b83bfcec3f33325d96fc4987ce7dd35ba830c1d5e9970a4001b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b5a406c9e0e4dffd1a92e34b1c2aee555dcdcafeff8c2ccbdcdab88897399b1" + end + + uses_from_macos "perl" + uses_from_macos "zlib" + + on_linux do + resource "Capture::Tiny" do + url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.48.tar.gz" + sha256 "6c23113e87bad393308c90a207013e505f659274736638d8c79bac9c67cc3e19" + end + + resource "Specio::Exporter" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Specio-0.48.tar.gz" + sha256 "0c85793580f1274ef08173079131d101f77b22accea7afa8255202f0811682b2" + 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 "DateTime" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-1.65.tar.gz" + sha256 "0bfda7ff0253fb3d88cf4bdb5a14afb8cea24d147975d5bdf3c88b40e7ab140e" + end + + resource "DateTime::Locale" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Locale-1.42.tar.gz" + sha256 "7d8a138fa32faf24af30a1dbdee4dd11988ddb6a129138004d220b6cc4053cb0" + end + + resource "DateTime::TimeZone" do + url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-TimeZone-2.62.tar.gz" + sha256 "6214f9c9c8dfa2000bae912ef2b8ebc5b163a83a0b5b2a82705162dad63466fa" + 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.28.tar.gz" + sha256 "edac77a17fc36620c8324cc194ce1fad2f02e9fcbe72d08ad0b2c47f0c7fd8ef" + 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.64.tar.gz" + sha256 "9f7853249c9ea3b4df92fb6b790c03a60680fc029f44c8bf9894dccf019516bd" + 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.4234.tar.gz" + sha256 "66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f" + 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::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.05.tar.gz" + sha256 "63cb6196e986a7e578c4d28b3c780e7194835bfc78b68eeb8f00599d4444888c" + 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 "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 "JSON" do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.10.tar.gz" + sha256 "df8b5143d9a7de99c47b55f1a170bd1f69f711935c186a6dc0ab56dd05758e35" + end + + resource "PerlIO::gzip" do + url "https://cpan.metacpan.org/authors/id/N/NW/NWCLARK/PerlIO-gzip-0.20.tar.gz" + sha256 "4848679a3f201e3f3b0c5f6f9526e602af52923ffa471a2a3657db786bd3bdc5" + 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 + + system "make", "PREFIX=#{prefix}", "install" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + (testpath/"hello.c").write <<~C + #include + int main() { + puts("hello world"); + return 0; + } + C + + system ENV.cc, "-g", "-O2", "--coverage", "-o", "hello", "hello.c" + system "./hello" + system bin/"lcov", "--gcov-tool", "gcov", "--directory", ".", "--capture", "--output-file", "all_coverage.info" + + assert_path_exists testpath/"all_coverage.info" + assert_includes (testpath/"all_coverage.info").read, testpath/"hello.c" + end +end diff --git a/Formula/l/lcs.rb b/Formula/l/lcs.rb new file mode 100644 index 0000000000000..98b5c3494fd0e --- /dev/null +++ b/Formula/l/lcs.rb @@ -0,0 +1,49 @@ +class Lcs < Formula + desc "Satirical console-based political role-playing/strategy game" + homepage "https://sourceforge.net/projects/lcsgame/" + url "https://svn.code.sf.net/p/lcsgame/code/trunk", revision: "738" + version "4.07.4b" + license "GPL-2.0-or-later" + head "https://svn.code.sf.net/p/lcsgame/code/trunk" + + # This formula is using an unstable trunk version and we can't reliably + # identify new versions in this case, so we skip it unless/until it's updated + # to use a stable version in the future. + livecheck do + skip "Formula uses an unstable trunk version" + end + + bottle do + sha256 arm64_sequoia: "1b4eaae7da86c0a3882c11642d4dd5cdeac07f63742c7714e9cc1a57a88baf5b" + sha256 arm64_sonoma: "53c3857d8a8d4fbe45e84b0489f9a9b50da8078fc037f470473272ff36d7cb4d" + sha256 arm64_ventura: "af4b1c073592ae9b4f5f168b00c13fd02fddd09be18938c0d392812ae36a507b" + sha256 arm64_monterey: "fe4700d7dbd9901cd46e1fdd19453b308d918391914bac529059b25f229b7bc9" + sha256 arm64_big_sur: "1ec069485376de05c00be777102bcef25f3f1349d84ecfc2e53990d6c6e403dd" + sha256 sonoma: "ad71dc194ad2f21f033c2415649ff165266aef24aa10f60c94f7add9f82256f2" + sha256 ventura: "3ee4e2b8a059045bf17d7d0b32860c1ec4ae23a996c9babf5a58efa0871659d6" + sha256 monterey: "a90a57e3001f38f79b787bbaad00e38099fcac09da06780f2996ae0666d80420" + sha256 big_sur: "9e3c6957bab58eaf828f8420fd7e493bb352544ec552c96eb24c8d1ec8d4adc6" + sha256 catalina: "65391613e5fd3ea3d8e5f7a2d5586105e3408bb09cddb77aebcfd4bcb7e3396a" + sha256 mojave: "91469578607a9f4d1ae989ee523f2b5dd97c976d32d9a822769129df828163e5" + sha256 high_sierra: "5b640b7b87dfe6603670addce1b6af77b0cd7ebbda10c445fddc6d365960e761" + sha256 sierra: "a8fa614ec5adc3ee2d7417a024bf5e9c78e9f8d4e043e0b916dc5a99f1bb1d9c" + sha256 el_capitan: "621487b12c93a9b37e1330041f979a28d3d310c1d8c9efecf274808d081d510e" + sha256 arm64_linux: "102e4a404dd5be9cd65c41bf4eb03c582c405037360447d381baa173d2e52f4e" + sha256 x86_64_linux: "ce3d505b47a5ada5e5b895876e51c224c3c716117c2f84e9853c05347ecddc4c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + uses_from_macos "ncurses" + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-c++11-narrowing" if DevelopmentTools.clang_build_version >= 1403 + + system "./bootstrap" + libs = OS.mac? ? "-liconv" : "" + system "./configure", "LIBS=#{libs}", "--prefix=#{prefix}" + system "make", "install" + end +end diff --git a/Formula/l/ld-find-code-refs.rb b/Formula/l/ld-find-code-refs.rb new file mode 100644 index 0000000000000..48449362792a8 --- /dev/null +++ b/Formula/l/ld-find-code-refs.rb @@ -0,0 +1,37 @@ +class LdFindCodeRefs < Formula + desc "Build tool for sending feature flag code references to LaunchDarkly" + homepage "https://github.com/launchdarkly/ld-find-code-refs" + url "https://github.com/launchdarkly/ld-find-code-refs/archive/refs/tags/v2.13.0.tar.gz" + sha256 "9367921a6ceb0e00b236f0e6bfc0e7815aa5588c78850abc38015dc9dfaf6091" + license "Apache-2.0" + head "https://github.com/launchdarkly/ld-find-code-refs.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1a042bbee68be9ce54f73a66ab62347c5188b29da378751c69b36c754800859a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1a042bbee68be9ce54f73a66ab62347c5188b29da378751c69b36c754800859a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1a042bbee68be9ce54f73a66ab62347c5188b29da378751c69b36c754800859a" + sha256 cellar: :any_skip_relocation, sonoma: "1e1fbd6b0122cb078632226abecd6ef639b967661556e9014d00c06bfa76b6f2" + sha256 cellar: :any_skip_relocation, ventura: "1e1fbd6b0122cb078632226abecd6ef639b967661556e9014d00c06bfa76b6f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b8cb73e822ef55794009be3aa1a4cbc1921b634b6abc493c9b2fcd54b31bc274" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/ld-find-code-refs" + + generate_completions_from_executable(bin/"ld-find-code-refs", "completion") + 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" + + assert_match "could not retrieve flag key", + shell_output(bin/"ld-find-code-refs --dryRun " \ + "--ignoreServiceErrors -t=xx -p=test -r=test -d=. 2>&1", 1) + end +end diff --git a/Formula/l/ldapvi.rb b/Formula/l/ldapvi.rb new file mode 100644 index 0000000000000..60fe62bd093d3 --- /dev/null +++ b/Formula/l/ldapvi.rb @@ -0,0 +1,67 @@ +class Ldapvi < Formula + desc "Update LDAP entries with a text editor" + homepage "http://www.lichteblau.com/ldapvi/" + url "http://www.lichteblau.com/download/ldapvi-1.7.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/l/ldapvi/ldapvi_1.7.orig.tar.gz" + sha256 "6f62e92d20ff2ac0d06125024a914b8622e5b8a0a0c2d390bf3e7990cbd2e153" + license "GPL-2.0-or-later" + revision 9 + + livecheck do + url :homepage + regex(/href=.*?ldapvi[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "619197cac0a0f9f7c8df2d5ced5e42f95e421c645ae87b7ae0d44048cbec6359" + sha256 cellar: :any, arm64_sonoma: "1a498cb6fd5153f82c0cfd2a9133dcaf68c280f3da4fa641abdcde5d0d2c4311" + sha256 cellar: :any, arm64_ventura: "a3ad41b60a3da8e819b1abec997f49b3912addab32ffde4c5e12b7b747c5e86f" + sha256 cellar: :any, arm64_monterey: "63919baa17c57b8a12fa108dbfe0f4c8dbf3c591be3b8fad01f0750cca17be95" + sha256 cellar: :any, arm64_big_sur: "5489222c138f0e9d354ab8aa153d30baa870a2c15410bb18a134a396563c1645" + sha256 cellar: :any, sonoma: "fbb82855e629c75015862b1f4210a318181b11e0b964ebc6b3355d77437c9965" + sha256 cellar: :any, ventura: "2f876c4180027df3eb3f619f62a72b46969292b348f8c8944d3adb99117746ea" + sha256 cellar: :any, monterey: "d0a155ea5d43cf0f5917acd48cccd30383cab9b9dd7754eeca465da2b15da8dc" + sha256 cellar: :any, big_sur: "e7738f50126f4a4b5890215ddb63e85d246729a31e1cd8a260e7dfc45251db9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "f686aa703ff6be2ac2d15a1624e129e168f89f96a9853dbae572c3c16d170004" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b2deb6f280d0b64a18c53e61aa77b2e46d0907ffe56f30ca81e71ae4447e3a5" + end + + depends_on "pkgconf" => :build + depends_on "xz" => :build # Homebrew bug. Shouldn't need declaring explicitly. + + depends_on "gettext" + depends_on "glib" + depends_on "openssl@3" + depends_on "popt" + depends_on "readline" + + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "openldap" + + # These patches are applied upstream but release process seems to be dead. + # http://www.lichteblau.com/git/?p=ldapvi.git;a=commit;h=256ced029c235687bfafdffd07be7d47bf7af39b + # http://www.lichteblau.com/git/?p=ldapvi.git;a=commit;h=a2717927f297ff9bc6752f281d4eecab8bd34aad + patch do + url "https://deb.debian.org/debian/pool/main/l/ldapvi/ldapvi_1.7-10.debian.tar.xz" + sha256 "93be20cf717228d01272eab5940337399b344bb262dc8bc9a59428ca604eb6cb" + apply "patches/05_getline-conflict", + "patches/06_fix-vim-modeline" + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + # Fix compilation with clang by changing `return` to `return 0`. + inreplace "ldapvi.c", "if (lstat(sasl, &st) == -1) return;", + "if (lstat(sasl, &st) == -1) return 0;" + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"ldapvi", "--version" + end +end diff --git a/Formula/l/ldc.rb b/Formula/l/ldc.rb new file mode 100644 index 0000000000000..4bd5cfbb93594 --- /dev/null +++ b/Formula/l/ldc.rb @@ -0,0 +1,126 @@ +class Ldc < Formula + desc "Portable D programming language compiler" + homepage "https://wiki.dlang.org/LDC" + license "BSD-3-Clause" + revision 1 + head "https://github.com/ldc-developers/ldc.git", branch: "master" + + stable do + url "https://github.com/ldc-developers/ldc/releases/download/v1.40.1/ldc-1.40.1-src.tar.gz" + sha256 "b643bee2ee6f9819084ef7468cf739257974a99f3980364d20201bc806a4a454" + + # Backport fix for CMake 4 + patch do + url "https://github.com/ldc-developers/ldc/commit/06b2e42a1b8436faae2b7976a1d41a635df116d5.patch?full_index=1" + sha256 "80fd42d77217b16866e262008f283406bb597fee16cb6ade250d6d27f870ce5c" + end + + # Backport fix for segmentation fault on macOS 15.4 + patch do + url "https://github.com/ldc-developers/ldc/commit/60079c3b596053b1a70f9f2e0cf38a287089df56.patch?full_index=1" + sha256 "44d281573a42e82ecdd48a6381fec4dde7aa6196f314e9eee7b1111ae6c54844" + end + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 2 + sha256 arm64_sequoia: "9384ccb16954cc0bd4cdc10cbff3b88f7c4198376adca1180d96f7f7ebd2ba43" + sha256 arm64_sonoma: "97f6afa4dab17754196e9b29885721d61ce6244cdc2c627ac2d2e4a2ab9f62bc" + sha256 arm64_ventura: "284c606878e28375d5a6bd4dcba1ab090be8022d5fee5e974942c29a383a8e2b" + sha256 sonoma: "46bb2adaf6f60942728c169eb3ab1c3951133ecdd6816c5ac3ba4aa32b7c7f02" + sha256 ventura: "212beef9d9dd8f73794f2ca9a6c1786a1920d4f5c21f5800d2b17b09297e8417" + sha256 arm64_linux: "eccf24bbebc2f4960b38f37612e16316b5cc1941d97930d27418eda01ae38240" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9d640a656f11e1f2e421a1d093a7d8bb183e0052aeca6101176b7b7c14adbed" + end + + depends_on "cmake" => :build + depends_on "libconfig" => :build + depends_on "pkgconf" => :build + depends_on "lld@19" => :test + depends_on "llvm@19" # LLVM 20 PR: https://github.com/ldc-developers/ldc/pull/4843 + depends_on "zstd" + + uses_from_macos "libxml2" => :build + + resource "ldc-bootstrap" do + on_macos do + # Do not use 1.29 - 1.40 to bootstrap as it segfaults on macOS 15.4. + # Ref: https://github.com/dlang/dmd/issues/21126#issuecomment-2775948553 + on_arm do + url "https://github.com/ldc-developers/ldc/releases/download/v1.28.1/ldc2-1.28.1-osx-arm64.tar.xz" + sha256 "9bddeb1b2c277019cf116b2572b5ee1819d9f99fe63602c869ebe42ffb813aed" + end + on_intel do + url "https://github.com/ldc-developers/ldc/releases/download/v1.28.1/ldc2-1.28.1-osx-x86_64.tar.xz" + sha256 "9aa43e84d94378f3865f69b08041331c688e031dd2c5f340eb1f3e30bdea626c" + end + end + on_linux do + on_arm do + url "https://github.com/ldc-developers/ldc/releases/download/v1.40.0/ldc2-1.40.0-linux-aarch64.tar.xz" + sha256 "28d183a99ab9f0790f5597c5c125f41338390f8bed5ed3164138958c18479c82" + end + on_intel do + url "https://github.com/ldc-developers/ldc/releases/download/v1.40.0/ldc2-1.40.0-linux-x86_64.tar.xz" + sha256 "0da61ed2ea96583aa0ccbeb00f8d78983b23d1e87b84a6f2098eb12059475b27" + end + end + end + + def llvm + deps.reject { |d| d.build? || d.test? } + .map(&:to_formula) + .find { |f| f.name.match?(/^llvm(@\d+)?$/) } + end + + def install + ENV.cxx11 + # Fix ldc-bootstrap/bin/ldmd2: error while loading shared libraries: libxml2.so.2 + ENV.prepend_path "LD_LIBRARY_PATH", Formula["libxml2"].opt_lib if OS.linux? + # Work around LLVM 16+ build failure due to missing -lzstd when linking lldELF + # Issue ref: https://github.com/ldc-developers/ldc/issues/4478 + inreplace "CMakeLists.txt", " -llldELF ", " -llldELF -lzstd " + + (buildpath/"ldc-bootstrap").install resource("ldc-bootstrap") + + args = %W[ + -DLLVM_ROOT_DIR=#{llvm.opt_prefix} + -DINCLUDE_INSTALL_DIR=#{include}/dlang/ldc + -DD_COMPILER=#{buildpath}/ldc-bootstrap/bin/ldmd2 + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # Don't set CC=llvm_clang since that won't be in PATH, + # nor should it be used for the test. + ENV.method(DevelopmentTools.default_compiler).call + + (testpath/"test.d").write <<~D + import std.stdio; + void main() { + writeln("Hello, world!"); + } + D + system bin/"ldc2", "test.d" + assert_match "Hello, world!", shell_output("./test") + lld = deps.map(&:to_formula).find { |f| f.name.match?(/^lld(@\d+(\.\d+)*)?$/) } + with_env(PATH: "#{lld.opt_bin}:#{ENV["PATH"]}") do + system bin/"ldc2", "-flto=thin", "--linker=lld", "test.d" + assert_match "Hello, world!", shell_output("./test") + system bin/"ldc2", "-flto=full", "--linker=lld", "test.d" + assert_match "Hello, world!", shell_output("./test") + end + system bin/"ldmd2", "test.d" + assert_match "Hello, world!", shell_output("./test") + end +end diff --git a/Formula/l/ldeep.rb b/Formula/l/ldeep.rb new file mode 100644 index 0000000000000..a613ece02ef79 --- /dev/null +++ b/Formula/l/ldeep.rb @@ -0,0 +1,99 @@ +class Ldeep < Formula + include Language::Python::Virtualenv + + desc "LDAP enumeration utility" + homepage "https://github.com/franc-pentest/ldeep" + url "https://files.pythonhosted.org/packages/e3/92/2914cb11ae0a1ee1aca4c6e7c5036c3ce83d0b20613ba13e9519e00cecdb/ldeep-1.0.86.tar.gz" + sha256 "4baeea7d1bcaa29867214c47992b2108c5ad0bb7cd09f82ca1c9270d538ae1f7" + license "MIT" + head "https://github.com/franc-pentest/ldeep.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "82bf16581a7e37876280738dbc31a2e17d697d05078b65aff8b7b5d6d0c8c871" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "83461409b70bf0a9152c2fb620d8c7779febb0315304ceeb0d745242adfab8ad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1dcb56e2d8d6ebb2a983fdebfaf591a47c3f3f0647cb94ec30d87c2bd1fb0cac" + sha256 cellar: :any_skip_relocation, sonoma: "a559b26b2f5ac8fab7ebc490754ddb7d03f1760815128ac407f7a463f802d1c7" + sha256 cellar: :any_skip_relocation, ventura: "bd7a6866236560c1c0fac00466ce22dd655f50087c1bca9b1fefca7c32397972" + sha256 cellar: :any_skip_relocation, arm64_linux: "88cdcf3d796d293dad800ea38741a7ed0bece5a53e4ff89e81911dd6115c27cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d833e14e6074206f1aa205241c59e8b77fafa45fd675883dd832ea8ea523e6ad" + end + + depends_on "cryptography" + depends_on "python@3.13" + + uses_from_macos "krb5" + + resource "asn1crypto" do + url "https://files.pythonhosted.org/packages/de/cf/d547feed25b5244fcb9392e288ff9fdc3280b10260362fc45d37a798a6ee/asn1crypto-1.5.1.tar.gz" + sha256 "13ae38502be632115abf8a24cbe5f4da52e3b5231990aff31123c805306ccb9c" + end + + resource "commandparse" do + url "https://files.pythonhosted.org/packages/79/6b/6f1879101e405e2a5c7d352b340bc97d1936f8d54a8934ae32aac1828e50/commandparse-1.1.2.tar.gz" + sha256 "4bd7bdd01b52eaa32316d6149a00b4c3820a40ff2ad62476b46aaae65dbe9faa" + 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/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + end + + resource "gssapi" do + url "https://files.pythonhosted.org/packages/04/2f/fcffb772a00e658f608e657791484e3111a19a722b464e893fef35f35097/gssapi-1.9.0.tar.gz" + sha256 "f468fac8f3f5fca8f4d1ca19e3cd4d2e10bd91074e7285464b22715d13548afe" + end + + resource "ldap3-bleeding-edge" do + url "https://files.pythonhosted.org/packages/b6/72/1f50f58d90ebc3900159db6b313f600b08460300543dab20f4087aa81eee/ldap3_bleeding_edge-2.10.1.1337.tar.gz" + sha256 "8f887372ac0e38da25e98a98f4b773f58a618cf99a705a15caa5273075b56999" + end + + resource "oscrypto" do + url "https://files.pythonhosted.org/packages/06/81/a7654e654a4b30eda06ef9ad8c1b45d1534bfd10b5c045d0c0f6b16fecd2/oscrypto-1.3.0.tar.gz" + sha256 "6f5fef59cb5b3708321db7cca56aed8ad7e662853351e7991fcf60ec606d47a4" + 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/44/e6/099310419df5ada522ff34ffc2f1a48a11b37fc6a76f51a6854c182dbd3e/pycryptodome-3.22.0.tar.gz" + sha256 "fd7ab568b3ad7b77c908d7c3f7e167ec5a8f035c64ff74f10d47a4edd043d723" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/ba/d5/861a7daada160fcf6b0393fb741eeb0d0910b039ad7f0cd56c39afdd4a20/pycryptodomex-3.22.0.tar.gz" + sha256 "a1da61bacc22f93a91cbe690e3eb2022a03ab4123690ab16c46abb693a9df63d" + 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 "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 + end + + test do + output = shell_output("#{bin}/ldeep ldap -d brew.ad -s ldap://127.0.0.1:389 enum_users test 2>&1", 1) + assert_match "[!] Unable to open connection with ldap://127.0.0.1:389", output + end +end diff --git a/Formula/l/ldid-procursus.rb b/Formula/l/ldid-procursus.rb new file mode 100644 index 0000000000000..c3bbd1ab83000 --- /dev/null +++ b/Formula/l/ldid-procursus.rb @@ -0,0 +1,62 @@ +class LdidProcursus < Formula + desc "Put real or fake signatures in a Mach-O binary" + homepage "https://github.com/ProcursusTeam/ldid" + license "AGPL-3.0-or-later" + revision 2 + head "https://github.com/ProcursusTeam/ldid.git", branch: "master" + + stable do + version "2.1.5-procursus7" + url "https://github.com/ProcursusTeam/ldid.git", + tag: "v2.1.5-procursus7", + revision: "aaf8f23d7975ecdb8e77e3a8f22253e0a2352cef" + + patch do + # Fix memory issues with various entitlements, remove in next release + # See ProcursusTeam/ldid#34 and ProcursusTeam/ldid#14 for more info + url "https://github.com/ProcursusTeam/ldid/commit/f38a095aa0cc721c40050cb074116c153608a11b.patch?full_index=1" + sha256 "848caded901d4686444aec79cdae550832cfd3633b2090ad92cd3dd8aa6e98cf" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "ab86601fb7c96f9099bf3d9b0634bd347de629fa7de675086efafc732c5e07ee" + sha256 cellar: :any, arm64_sonoma: "2caaa28ed7a37de86484d25e95c81190b1856472ddaff524b10cb98e69ced503" + sha256 cellar: :any, arm64_ventura: "bca4374f9d61c9b1185cfce5d40350672f17c6e2239f9a475ab84688a356df72" + sha256 cellar: :any, sonoma: "d588f650e0f38f7837ee7d4cda733442b0ef723e5d7664a5cd6d9b8e808d6cb4" + sha256 cellar: :any, ventura: "ab39755f672f5634c6555ae6822dae83813a50c1205a37774beb2e35d0552122" + sha256 cellar: :any_skip_relocation, arm64_linux: "3a581a508009e4854e8790a0f246baaac0ec570945e331fc6aac65ab4a1a9a81" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8277afbe297f7153901815514ad120e29b9ca67b891287c4ee133868d43b84f7" + end + + depends_on "pkgconf" => :build + depends_on "libplist" + depends_on "openssl@3" + + conflicts_with "ldid", because: "ldid installs a conflicting ldid binary" + + def install + system "make", "install", "PREFIX=#{prefix}" + zsh_completion.install "_ldid" + end + + test do + (testpath/"test.xml").write <<~XML + + + + + platform-application + + com.apple-private.security.no-container + + com.apple-private.skip-library-validation + + + + XML + cp test_fixtures("mach/a.out"), testpath + system bin/"ldid", "-Stest.xml", "a.out" + assert_match (testpath/"test.xml").read, shell_output("#{bin}/ldid -arch x86_64 -e a.out") + end +end diff --git a/Formula/l/ldid.rb b/Formula/l/ldid.rb new file mode 100644 index 0000000000000..ba5534645ed30 --- /dev/null +++ b/Formula/l/ldid.rb @@ -0,0 +1,48 @@ +class Ldid < Formula + desc "Lets you manipulate the signature block in a Mach-O binary" + homepage "https://cydia.saurik.com/info/ldid/" + url "git://git.saurik.com/ldid.git", + tag: "v2.1.5", + revision: "a23f0faadd29ec00a6b7fb2498c3d15af15a7100" + license "AGPL-3.0-or-later" + revision 1 + head "git://git.saurik.com/ldid.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "84258b91d4f2085704b5d30a0a3cd50d32bebe0ca6e8e3adde999632afd63f4e" + sha256 cellar: :any, arm64_sonoma: "e3c26343041639b82e88edf54d3af9f579876f800b7aeada94d36c807e441c27" + sha256 cellar: :any, arm64_ventura: "552c265e507a066ffec6f2476dc9d6057a2ba41537f44f067a50c74ece9429bf" + sha256 cellar: :any, arm64_monterey: "a14aa56dab553afd69f82c3b63a167edb6ae2c3355a8f393e9a6c6c3c05e8432" + sha256 cellar: :any, arm64_big_sur: "a5f4fffe051e8b54f8c0158ce937802297a76af4dad9140c13ad25a935f4f38d" + sha256 cellar: :any, sonoma: "a2b4c79cc1cdc1cc91cd7a9474f5edbdd7ed299aad720c65a8e63bbb68d594b0" + sha256 cellar: :any, ventura: "b6aba3db5dd5aab6835280e0fe777a566cc5eb524290482602ee2b8018145760" + sha256 cellar: :any, monterey: "2adcc78190f359d7c5485a29cc84c37f5bf3360c39e2cd2cc975a5449bf3db6c" + sha256 cellar: :any, big_sur: "7373fc777890c829de08c79475c3b2caa55f68c30f97398201ff3dd9c55638ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "81c37cabe7538847906e84785f70a8592c5853374424e5866e124dabde43ea2d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4519a8fb688fea614c230562638a0d4704e7f1aad8d9372845d0b28cc5281479" + end + + depends_on "libplist" + depends_on "openssl@3" + uses_from_macos "libxml2" + + conflicts_with "ldid-procursus", because: "ldid-proucursus installs a conflicting ldid binary" + + def install + ENV.append_to_cflags "-I." + ENV.append "CXXFLAGS", "-std=c++11" + linker_flags = %w[lookup2.o -lcrypto -lplist-2.0 -lxml2] + linker_flags += %w[-framework CoreFoundation -framework Security] if OS.mac? + + system "make", "lookup2.o" + system "make", "ldid", "LDLIBS=#{linker_flags.join(" ")}" + + bin.install "ldid" + bin.install_symlink "ldid" => "ldid2" + end + + test do + cp test_fixtures("mach/a.out"), testpath + system bin/"ldid", "-S", "a.out" + end +end diff --git a/Formula/l/ldns.rb b/Formula/l/ldns.rb new file mode 100644 index 0000000000000..240efae19c5dc --- /dev/null +++ b/Formula/l/ldns.rb @@ -0,0 +1,103 @@ +class Ldns < Formula + desc "DNS library written in C" + homepage "https://nlnetlabs.nl/projects/ldns/" + url "https://nlnetlabs.nl/downloads/ldns/ldns-1.8.4.tar.gz" + sha256 "838b907594baaff1cd767e95466a7745998ae64bc74be038dccc62e2de2e4247" + license "BSD-3-Clause" + + # https://nlnetlabs.nl/downloads/ldns/ since the first-party site has a + # tendency to lead to an `execution expired` error. + livecheck do + url "https://github.com/NLnetLabs/ldns.git" + regex(/^(?:release-)?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "2707eaadad1873f87ee5f9daf71f7710aee3be3ca4116768c2f1514f59704d65" + sha256 cellar: :any, arm64_sonoma: "3006f0623486121db7991757fa52fc933f285aa0d98439ffe75a053dc4c7dcc7" + sha256 cellar: :any, arm64_ventura: "eb53602f7be7e1ba9d42c2a1dcb3f70e926a85007d1338dceebb43b81f65598c" + sha256 cellar: :any, sonoma: "40cbf3faab35cbab0f7b832df080aa47f972131042eb0be3ec5fc6ac44d5f4ab" + sha256 cellar: :any, ventura: "2d2f7f630d32e895bf745396161bdfbb24b6cca7d0bf9e9528f461376c19ddfc" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e068612edda67b9d8024855a41b7133e4af0003173e741f80e2f45abdaaab7c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0677ecaba9460fa437cc99fe78a048ec2acceb109f9ccc6e414bcb5ded94cdac" + end + + depends_on "swig" => :build + depends_on "openssl@3" + depends_on "python@3.13" + + conflicts_with "drill", because: "both install a `drill` binary" + + # build patch to work with swig 4.3.0, upstream pr ref, https://github.com/NLnetLabs/ldns/pull/257 + patch do + url "https://github.com/NLnetLabs/ldns/commit/49b2e4a938d263bb8c532e64f33690551e43ca0c.patch?full_index=1" + sha256 "e7dd20b06cf1b0728d0822118a8ae231405579a9f35b0d66ac6422249c2be518" + end + + def python3 + "python3.13" + end + + def install + args = %W[ + --with-drill + --with-examples + --with-ssl=#{Formula["openssl@3"].opt_prefix} + --with-pyldns + PYTHON_PLATFORM_SITE_PKG=#{prefix/Language::Python.site_packages(python3)} + top_builddir=#{buildpath} + --disable-dane-verify + --without-xcode-sdk + ] + + # Fixes: ./contrib/python/ldns_wrapper.c:2746:10: fatal error: 'ldns.h' file not found + inreplace "contrib/python/ldns.i", "#include \"ldns.h\"", "#include " + + ENV["PYTHON"] = which(python3) + + # Exclude unrecognized options + args += std_configure_args.reject { |s| s["--disable-debug"] || s["--disable-dependency-tracking"] } + + system "./configure", *args + + if OS.mac? + # FIXME: Turn this into a proper patch and send it upstream. + inreplace "Makefile" do |s| + s.change_make_var! "PYTHON_LIBS", "-undefined dynamic_lookup" + s.gsub!(/(\$\(PYTHON_CFLAGS\).*) -no-undefined/, "\\1") + end + end + + system "make" + system "make", "install" + system "make", "install-pyldns" + (lib/"pkgconfig").install "packaging/libldns.pc" + end + + test do + l1 = <<~EOS + AwEAAbQOlJUPNWM8DQown5y/wFgDVt7jskfEQcd4pbLV/1osuBfBNDZX + qnLI+iLb3OMLQTizjdscdHPoW98wk5931pJkyf2qMDRjRB4c5d81sfoZ + Od6D7Rrx + EOS + l2 = <<~EOS + AwEAAb/+pXOZWYQ8mv9WM5dFva8WU9jcIUdDuEjldbyfnkQ/xlrJC5zA + EfhYhrea3SmIPmMTDimLqbh3/4SMTNPTUF+9+U1vpNfIRTFadqsmuU9F + ddz3JqCcYwEpWbReg6DJOeyu+9oBoIQkPxFyLtIXEPGlQzrynKubn04C + x83I6NfzDTraJT3jLHKeW5PVc1ifqKzHz5TXdHHTA7NkJAa0sPcZCoNE + 1LpnJI/wcUpRUiuQhoLFeT1E432GuPuZ7y+agElGj0NnBxEgnHrhrnZW + UbULpRa/il+Cr5Taj988HqX9Xdm6FjcP4Lbuds/44U7U8du224Q8jTrZ + 57Yvj4VDQKc= + EOS + (testpath/"powerdns.com.dnskey").write <<~EOS + powerdns.com. 10773 IN DNSKEY 256 3 8 #{l1.tr!("\n", " ")} + powerdns.com. 10773 IN DNSKEY 257 3 8 #{l2.tr!("\n", " ")} + EOS + + system bin/"ldns-key2ds", "powerdns.com.dnskey" + + match = "d4c3d5552b8679faeebc317e5f048b614b2e5f607dc57f1553182d49ab2179f7" + assert_match match, File.read("Kpowerdns.com.+008+44030.ds") + end +end diff --git a/Formula/l/ldpl.rb b/Formula/l/ldpl.rb new file mode 100644 index 0000000000000..c0a704692bbdc --- /dev/null +++ b/Formula/l/ldpl.rb @@ -0,0 +1,63 @@ +class Ldpl < Formula + desc "Compiled programming language inspired by COBOL" + homepage "https://www.ldpl-lang.org/" + url "https://github.com/Lartu/ldpl/archive/refs/tags/4.4.tar.gz" + sha256 "c34fb7d67d45050c7198f83ec9bb0b7790f78df8c6d99506c37141ccd2ac9ff1" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6e33c979551ec86b80944f16b45b337ff39010f021aea26a1e150156abbbbeea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8e793d5e90093676f1a1f9fe3d4919d50602c91d078e567af2b17deb6ebcc7f5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bf6959046e581454ad99a0916570bb6ec7891ad1666829ee926d14ae9029886b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bf32d6e3ea635273e2b9489962bbaf8e0cb635baf2f683ce140ca7b678e4b4dc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5c7715953497aa0104ad8262e84757529b33d1af90b9a41288895018515bea7f" + sha256 cellar: :any_skip_relocation, sonoma: "84d39d38f0c81fbbab1f11df1fa5fb2d804f8338a97b1ce85f086d59aae56d1f" + sha256 cellar: :any_skip_relocation, ventura: "f9e3a39562bdfcbc8d90486286ff19bbb0163c4df653c9e808c509c2a4ac9f00" + sha256 cellar: :any_skip_relocation, monterey: "cde038edd67c523982be570ffb9ad84615a66731fb7de753c58c5b33bda1691e" + sha256 cellar: :any_skip_relocation, big_sur: "528888090d44cc065bcd6fdb941bfa751dba25e66c086cf4b427cc1e86549783" + sha256 cellar: :any_skip_relocation, catalina: "7e5cd92ebf4f0babb34d7af78189e7915731fad5fac39e66d63ecbbce86a72d0" + sha256 cellar: :any_skip_relocation, mojave: "b9a0fdeb6134828ef4f60d81339185c5ac5a86123d6301035cbfb3b45c1a91ed" + sha256 cellar: :any_skip_relocation, high_sierra: "01f2a987ba4b74d1b50374c7a9a616703a2a8ad479aaad8b80ed8e936af91d80" + sha256 cellar: :any_skip_relocation, arm64_linux: "b190c24dcb32397a94cf2e8b715ab0501730f2b09a8a82dfadc818271306eb45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "efdc08bf31ea1c1540603ef30480dd816dd9d62f62f1d352b67936d1d7e005fc" + end + + on_linux do + # Disable running mandb as it needs to modify /var/cache/man + # Copied from AUR: https://aur.archlinux.org/cgit/aur.git/tree/dont-do-mandb.patch?h=ldpl + # Upstream ref: https://github.com/Lartu/ldpl/commit/66c1513a38fba8048c209c525335ce0e3a32dbe5 + # Remove in the next release. + patch :DATA + end + + def install + cd "src" do + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + end + + test do + (testpath/"hello.ldpl").write <<~EOS + PROCEDURE: + display "Hello World!" crlf + EOS + system bin/"ldpl", "hello.ldpl", "-o=hello" + assert_match "Hello World!", shell_output("./hello") + end +end + +__END__ +diff --unified --recursive --text ldpl-4.4.orig/src/makefile ldpl-4.4/src/makefile +--- ldpl-4.4.orig/src/makefile 2019-12-16 13:09:46.441774536 -0300 ++++ ldpl-4.4/src/makefile 2019-12-16 13:10:01.648441421 -0300 +@@ -51,9 +51,6 @@ + install -m 775 lpm $(DESTDIR)$(PREFIX)/bin/ + install -d $(DESTDIR)$(PREFIX)/share/man/man1/ + install ../man/ldpl.1 $(DESTDIR)$(PREFIX)/share/man/man1/ +-ifneq ($(shell uname -s),Darwin) +- mandb +-endif + + uninstall: + rm $(DESTDIR)$(PREFIX)/bin/ldpl diff --git a/Formula/l/le.rb b/Formula/l/le.rb new file mode 100644 index 0000000000000..84d2d9b806b3f --- /dev/null +++ b/Formula/l/le.rb @@ -0,0 +1,72 @@ +class Le < Formula + desc "Text editor with block and binary operations" + homepage "https://github.com/lavv17/le" + url "https://github.com/lavv17/le/releases/download/v1.16.7/le-1.16.7.tar.gz" + sha256 "1cbe081eba31e693363c9b8a8464af107e4babfd2354a09a17dc315b3605af41" + license all_of: ["GPL-3.0-or-later", "GPL-2.0-or-later"] + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "4c5be48a3e8a62904eae2419ba95fa1146897cdc9946c8d388b7d610fa888f0b" + sha256 arm64_sonoma: "edfcd9c9eb3db9ca955cf89fdc062ea3fcbc146468fcfbc41dc5903ad50ce4a5" + sha256 arm64_ventura: "95468ba644bd4a29069f7f58a73b43565ce4b1938d6f8abfe71f867375c26844" + sha256 arm64_monterey: "75bbbb7067c4bbd3eb4e262e694ee0293f83558a0b1393f43ecaab4659b50891" + sha256 arm64_big_sur: "0ccb086bab740c6761a159f82e0cadb1ed09e7fc702afd148a6055615d3478a8" + sha256 sonoma: "a390f3638590d77c06fdab55ac6795616bbdc950c23c33d101c544736a46f74e" + sha256 ventura: "dbd85e597501a053d50b15d5a2be4d2627a4c2b78bfa6d520d9fb0cd87320c79" + sha256 monterey: "3a776a4b3b24e8a3bac7d1669aecde9790e5bea72c116422af0c5795997c94d5" + sha256 big_sur: "5e783b96b482837243218a8c69f0bf5be7a7afa3ed19cb9950fc88342dd65e5a" + sha256 catalina: "704e7762fb13634aa7b2fe4cc271747894d8ffcf5028abd0d27497bceb6bc378" + sha256 mojave: "aa1144661f13ab5fbe4eb132415da66785ab1b903c8d517df03f40826d08632f" + sha256 high_sierra: "b6fad9458d040f9a47a0d3ff003ab5f77cdb9508a5b653c3cddc201cfb5310e2" + sha256 arm64_linux: "1141446f014f63ea9dc676cdc5a5244a6a4a9161f521ad8a8bae9e5d76b5d9f4" + sha256 x86_64_linux: "e51d99aa9b68a5ba6ec8fb1679f2dd79efd171d01a0921f268ad4247e41a50d4" + end + + uses_from_macos "ncurses" + + # Backport fix for hex conflict with std::hex + patch :DATA # part of https://github.com/lavv17/le/commit/f5582ae199e4c4b80d32e4764715d630203b44f6 + patch do + url "https://github.com/lavv17/le/commit/f5582ae199e4c4b80d32e4764715d630203b44f6.patch?full_index=1" + sha256 "aa7ce012a03b86a5e3e7724fcd1c4d3cd304a92193510905eb71e614473c66ef" + end + + def install + # Configure script makes bad assumptions about curses locations. + # Future versions allow this to be manually specified: + # https://github.com/lavv17/le/commit/d921a3cdb3e1a0b50624d17e5efeb5a76d64f29d + ncurses = OS.mac? ? MacOS.sdk_path/"usr/include" : Formula["ncurses"].include + inreplace "configure", "/usr/local/include/ncurses", ncurses + + ENV.deparallelize + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match "Usage", shell_output("#{bin}/le --help", 1) + end +end + +__END__ +diff --git a/src/screen.cc b/src/screen.cc +index fcac4e1..0d429f2 100644 +--- a/src/screen.cc ++++ b/src/screen.cc +@@ -408,9 +408,9 @@ void StatusLine() + + + if(hex) +- sprintf(status,"OctOffs:0%-11lo",(unsigned long)(Offset())); ++ snprintf(status,sizeof(status),"OctOffs:0%-11lo",(unsigned long)(Offset())); + else +- sprintf(status,"Line=%-5lu Col=%-4lu", ++ snprintf(status,sizeof(status),"Line=%-5lu Col=%-4lu", + (unsigned long)(GetLine()+1), + (unsigned long)(((Text&&Eol())?GetStdCol():GetCol())+1)); diff --git a/Formula/l/leaf-proxy.rb b/Formula/l/leaf-proxy.rb new file mode 100644 index 0000000000000..5f220143156e6 --- /dev/null +++ b/Formula/l/leaf-proxy.rb @@ -0,0 +1,41 @@ +class LeafProxy < Formula + desc "Lightweight and fast proxy utility" + homepage "https://github.com/eycorsican/leaf" + url "https://github.com/eycorsican/leaf/archive/refs/tags/v0.11.0.tar.gz" + sha256 "f80d110ac56a0ffcdbcdcd1cc3631b6bf079ea18191d9a1c9f819cfff5b0c2fa" + license "Apache-2.0" + head "https://github.com/eycorsican/leaf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b0cc5c4e172c32e79c24a0b7659d73e9bf8e7b64f67620da095a3c32abe345e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7c32be304499e78ae7fb2a2b19a0fe5b4a61c8fd647c6dfd6972e58bd475cdfe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fc98199bee56bf76f3948fea9b29c18e643bc106fae7bfa1358162490d4c3ec1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6ddf82b5e08cf21b37d7df581fba6f0353fbfd97d3f6538c5a98de00571903ba" + sha256 cellar: :any_skip_relocation, sonoma: "5f377ef7e09d7475844392754783e9a391154834c112fd7603960122108f61ab" + sha256 cellar: :any_skip_relocation, ventura: "7229899b4c36d25c75621c24a05581147c2870bd67425e5dbd34f9a47b08ae00" + sha256 cellar: :any_skip_relocation, monterey: "82a9e3aa050d2c96b66390624ec83cffe0c53602508cf9a4b8e24f7e285ba344" + sha256 cellar: :any_skip_relocation, arm64_linux: "489b29cf5b18105d375ed06e21466be47a8dd5e4f890bc95bd9e806be68b19ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d39f8f3b4e0717ea0cfda518612b34cb02000441844685d689506cc9e453e4a9" + end + + depends_on "rust" => :build + + conflicts_with "leaf", because: "both install a `leaf` binary" + + def install + system "cargo", "install", *std_cargo_args(path: "leaf-cli") + end + + test do + (testpath/"config.conf").write <<~EOS + [General] + dns-server = 8.8.8.8 + + [Proxy] + SS = ss, 127.0.0.1, #{free_port}, encrypt-method=chacha20-ietf-poly1305, password=123456 + EOS + output = shell_output "#{bin}/leaf -c #{testpath}/config.conf -t SS" + + assert_match "TCP failed: all attempts failed", output + end +end diff --git a/Formula/l/leaf.rb b/Formula/l/leaf.rb new file mode 100644 index 0000000000000..cf3279cdc7a98 --- /dev/null +++ b/Formula/l/leaf.rb @@ -0,0 +1,46 @@ +class Leaf < Formula + desc "General purpose reloader for all projects" + homepage "https://pkg.go.dev/github.com/vrongmeal/leaf" + url "https://github.com/vrongmeal/leaf/archive/refs/tags/v1.3.0.tar.gz" + sha256 "00ba86c1670e4a547d6f584350d41d174452d0679be25828e7835a8da1fe100a" + license "MIT" + head "https://github.com/vrongmeal/leaf.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "09207a280786c059e1101f26dd85aab2ae159a8f295de090825959f88671e165" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "41ac38180d691799c039e350fe1a9b3f6231b55bb7e3081495709c07cd69a3d9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5bd1b00e0418f45e3d96f7f2bfab43c68dda0d3f667335c64f4427bc6dad12ce" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2bb7a962b8708d9d607dcff6ed3dba9e485a0963164608662bfcf70e84ad1d5d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a7880e0f8658071b6040d8e32161e77ef72b6bf7b96489443acfa6b9852af31a" + sha256 cellar: :any_skip_relocation, sonoma: "9ddc73292bbcf5bc74b2d18739cdd64310ffcd86b3e6d7a3110558bff462dce1" + sha256 cellar: :any_skip_relocation, ventura: "310126fc24bf1b5141c5b17ea0e824fc9a424d61f0b80dbcafccfc2adb3eeb27" + sha256 cellar: :any_skip_relocation, monterey: "6f6e8b0d0775041da2e114e277d6f4790ae4e2b72b1ed409398bc39507b437f1" + sha256 cellar: :any_skip_relocation, big_sur: "395fbe11a4e482bf227e460f239ee008f2f6b50e9d071699c703c87d452b8ec0" + sha256 cellar: :any_skip_relocation, catalina: "995eb379b3e25e45108bd3c2166baef1fcd6f6ede329572133b8b203261ff9fc" + sha256 cellar: :any_skip_relocation, mojave: "c35970131c185aba296c242bc4366eac4636f3c3ab6f791e020bb1024d7c63ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a84a9c0400bd35d736290ce97440f83c844e728b0b79ab95c2b9f88446b2b127" + end + + depends_on "go" => :build + + conflicts_with "leaf-proxy", because: "both install `leaf` binaries" + + def install + system "go", "build", *std_go_args, "./cmd/leaf/main.go" + end + + test do + (testpath/"a").write "foo" + fork do + exec bin/"leaf", "-f", "+ a", "-x", "cp a b" + end + sleep 1 + + assert_equal (testpath/"a").read, (testpath/"b").read + (testpath/"a").append_lines "bar" + sleep 1 + + assert_equal (testpath/"a").read, (testpath/"b").read + end +end diff --git a/Formula/l/leakcanary-shark.rb b/Formula/l/leakcanary-shark.rb new file mode 100644 index 0000000000000..51d446b8f14f6 --- /dev/null +++ b/Formula/l/leakcanary-shark.rb @@ -0,0 +1,32 @@ +class LeakcanaryShark < Formula + desc "CLI Java memory leak explorer for LeakCanary" + homepage "https://square.github.io/leakcanary/shark/" + url "https://github.com/square/leakcanary/releases/download/v2.14/shark-cli-2.14.zip" + sha256 "4a1022a4610fd6a4a1306b264f95985c4210e169e2bd4b0ad19bbdcc16d6beef" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0cebacc85e3f690e603a7f298e342d248c5ed6068da7edff8cfac07d4c59ab43" + end + + depends_on "openjdk" + + def install + # Remove Windows scripts + rm(Dir["bin/*.bat"]) + + libexec.install Dir["*"] + (bin/"shark-cli").write_env_script libexec/"bin/shark-cli", Language::Java.overridable_java_home_env + end + + test do + resource "homebrew-sample_hprof" do + url "https://github.com/square/leakcanary/raw/v2.6/shark-android/src/test/resources/leak_asynctask_m.hprof" + sha256 "7575158108b701e0f7233bc208decc243e173c75357bf0be9231a1dcb5b212ab" + end + + testpath.install resource("homebrew-sample_hprof") + assert_match "1 APPLICATION LEAKS", + shell_output("#{bin}/shark-cli --hprof ./leak_asynctask_m.hprof analyze").strip + end +end diff --git a/Formula/l/lean-cli.rb b/Formula/l/lean-cli.rb new file mode 100644 index 0000000000000..9b1be6d2d8043 --- /dev/null +++ b/Formula/l/lean-cli.rb @@ -0,0 +1,41 @@ +class LeanCli < Formula + desc "Command-line tool to develop and manage LeanCloud apps" + homepage "https://github.com/leancloud/lean-cli" + url "https://github.com/leancloud/lean-cli/archive/refs/tags/v1.2.4.tar.gz" + sha256 "1d7c355b3060a35a8679e446cbe504423e09b55296c044a51a27a23c9298329b" + license "Apache-2.0" + head "https://github.com/leancloud/lean-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "da8e921555f9680a60ed796184600b597561f9e34342a2737307dabcfa1d8993" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9cc9aafc5e0974457ebcc7547750e85e25ebb50e5bb89340130e8b3d17fef9d4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7a358c0da0dd02839e235b9d2d4174be5bf5f9f397a0e2e8efddb4f958d95dbd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7a358c0da0dd02839e235b9d2d4174be5bf5f9f397a0e2e8efddb4f958d95dbd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7a358c0da0dd02839e235b9d2d4174be5bf5f9f397a0e2e8efddb4f958d95dbd" + sha256 cellar: :any_skip_relocation, sonoma: "b24963b1955e9d3d152bfb741bce058b0e4f941386288cf99fc751028032d0e5" + sha256 cellar: :any_skip_relocation, ventura: "0eb771d51928d4ebdbdd14c689eabea88ec3bb726f4d63c86df37351cfe2b10b" + sha256 cellar: :any_skip_relocation, monterey: "0eb771d51928d4ebdbdd14c689eabea88ec3bb726f4d63c86df37351cfe2b10b" + sha256 cellar: :any_skip_relocation, big_sur: "0eb771d51928d4ebdbdd14c689eabea88ec3bb726f4d63c86df37351cfe2b10b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8df5522cc644bc6a8fe47738c5a27f58acdb143d7015bd5f7088b6b6422359b" + end + + depends_on "go" => :build + + conflicts_with "elan-init", because: "both install `lean` binaries" + + def install + build_from = build.head? ? "homebrew-head" : "homebrew" + system "go", "build", *std_go_args(output: bin/"lean", ldflags: "-s -w -X main.pkgType=#{build_from}"), "./lean" + + bin.install_symlink "lean" => "tds" + + bash_completion.install "misc/lean-bash-completion" => "lean" + zsh_completion.install "misc/lean-zsh-completion" => "_lean" + end + + test do + assert_match "lean version #{version}", shell_output("#{bin}/lean --version") + output = shell_output("#{bin}/lean login --region us-w1 --token foobar 2>&1", 1) + assert_match "[ERROR] User doesn't sign in.", output + end +end diff --git a/Formula/l/lean.rb b/Formula/l/lean.rb new file mode 100644 index 0000000000000..2410c0d4df591 --- /dev/null +++ b/Formula/l/lean.rb @@ -0,0 +1,61 @@ +class Lean < Formula + desc "Theorem prover" + homepage "https://leanprover-community.github.io/" + url "https://github.com/leanprover-community/lean/archive/refs/tags/v3.51.1.tar.gz" + sha256 "5a4734bf345d6c5ba6eacd2d33d86d9540eea7d008b4ebf8dde126e729fcbcaf" + license "Apache-2.0" + head "https://github.com/leanprover-community/lean.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "a5568b994d186b0a5e50a10dcfaa7e7ada0106308a8f80412eea4e71662729cf" + sha256 cellar: :any, arm64_ventura: "0525ce214174c28a6604f69a8ccf14477dcf311b587572c19729d8b7302dfd8e" + sha256 cellar: :any, arm64_monterey: "fdf55df69720f665834f8b31e8071e0d0802552a265aa0075bbe60676faf7a0a" + sha256 cellar: :any, arm64_big_sur: "d231fbba7c033640f2f5f912a4e23a92831217d7a374f54836b8075707ab263b" + sha256 cellar: :any, sonoma: "500529aa863acd0c4d5f1257d391bd496d40cafa6aba87595071d786c38d7f47" + sha256 cellar: :any, ventura: "2cab4d1b6b3a2386333dce3b836f47e815747fd95d5cd3ce84e1b094be7f8278" + sha256 cellar: :any, monterey: "418e91f115eda2f2956ec13d4ba57101e55d1cfee8154518db90f5fbbda48344" + sha256 cellar: :any, big_sur: "e101719fb4712cbe706aa8a32d1335b3b6b5211a2e741eb2fb714f079814b2ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc9024e8785665fa3529e7a02d4488b49bfd713a0c46a9173224eb84859ffb42" + end + + # Lean 3 is now at end of life. + # The `elan-init` formula provides a Lean installation manager + # which continues to support Lean 3 users, but also provides Lean 4. + disable! date: "2024-06-28", because: :deprecated_upstream + + depends_on "cmake" => :build + depends_on "coreutils" + depends_on "gmp" + depends_on "jemalloc" + depends_on macos: :mojave + + conflicts_with "elan-init", because: "`lean` and `elan-init` install the same binaries" + + def install + args = std_cmake_args + %w[ + -DCMAKE_CXX_FLAGS='-std=c++14' + ] + + system "cmake", "-S", "src", "-B", "src/build", *args + system "cmake", "--build", "src/build" + system "cmake", "--install", "src/build" + end + + test do + (testpath/"hello.lean").write <<~EOS + def id' {α : Type} (x : α) : α := x + + inductive tree (α : Type) : Type + | node : α → list tree → tree + + example (a b : Prop) : a ∧ b -> b ∧ a := + begin + intro h, cases h, + split, repeat { assumption } + end + EOS + system bin/"lean", testpath/"hello.lean" + system bin/"leanpkg", "help" + end +end diff --git a/Formula/l/leapp-cli.rb b/Formula/l/leapp-cli.rb new file mode 100644 index 0000000000000..e3de7ac77d529 --- /dev/null +++ b/Formula/l/leapp-cli.rb @@ -0,0 +1,50 @@ +class LeappCli < Formula + desc "Cloud credentials manager cli" + homepage "https://github.com/noovolari/leapp" + url "https://registry.npmjs.org/@noovolari/leapp-cli/-/leapp-cli-0.1.65.tgz" + sha256 "a770256e2ce62f08c17650a30e785e46f92e7acb03e2bcbdec949054467b711c" + license "MPL-2.0" + + bottle do + rebuild 1 + sha256 arm64_sequoia: "a9f0381ebb60002b45fb92808def37bb0d636c0b3f843277e24e96f8a5b5b3de" + sha256 arm64_sonoma: "db6a98507e65188b1fe4eb7708746e9a0e9e5fb7966a0f824b6f70ab2ca7891f" + sha256 arm64_ventura: "1a9d83cc2ab81ea856376671c9cf61dfa0274030cd58db67a63b5233d8b055f8" + sha256 arm64_monterey: "b418a493285d50efe1cce5809193c085243026e22664ac795c8c352dcc60fa01" + sha256 sonoma: "ee8f75982419c3a730061d07335b51a2911c3c22dc21a398c8d68f3bcfe8f0ba" + sha256 ventura: "fe8abfb2954f71fb7c34d7611235983d0878086a378e1945d62f8686963616fb" + sha256 monterey: "d53b9cb4420f95a20647b6d0ca02da15c005941889272b7aa00e4a2d1e5206cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3b894178f3e5aacfefb391d2ad86beaee359c2ef6d5263338ec6e69eaaa9af6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9b5a0a0f4dfdef5663463397ef4b2d68d917de753f7bc0ccafeda392a1356d7" + end + + depends_on "pkgconf" => :build + depends_on "node" + + uses_from_macos "python" => :build + + on_linux do + depends_on "python-setuptools" => :build + depends_on "glib" + depends_on "libsecret" + end + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + def caveats + on_macos do + <<~EOS + Only the `leap` CLI is installed. For Leapp.app: + brew install --cask leapp + EOS + end + end + + test do + assert_match "Leapp app must be running to use this CLI", + shell_output("#{bin}/leapp idp-url create --idpUrl https://example.com 2>&1", 2).strip + end +end diff --git a/Formula/l/leaps.rb b/Formula/l/leaps.rb new file mode 100644 index 0000000000000..b35088d41ec5f --- /dev/null +++ b/Formula/l/leaps.rb @@ -0,0 +1,47 @@ +class Leaps < Formula + desc "Collaborative web-based text editing service written in Golang" + homepage "https://github.com/jeffail/leaps" + url "https://github.com/Jeffail/leaps/archive/refs/tags/v0.9.1.tar.gz" + sha256 "8335e2a939ac5928a05f71df4014529b5b0f2097152017d691a0fb6d5ae27be4" + license "MIT" + head "https://github.com/jeffail/leaps.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "43d3cbf4a3539d7309b2d12ddab84541f1360921b6d67d7b727096998329d952" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3bfac2abd2f5b64411fce7e91201e7680047747405ba719836d78fb74d8004c5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cadf303cd8afe3342acaa332833315822118c46e5a7bd0e2ac7f03d839c9b529" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a50cb3d2e58261495fc33607825dade069b92d7f6fdb70cae7f1052182895d34" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "2602cc2c500cc446b5ceb72ffbb6dab1d339ffda72b5be20c73e33a432378e3e" + sha256 cellar: :any_skip_relocation, sonoma: "da2312d241d0de20edb44ec000d71972e548030ff9d47ebceb3ed5d7d8078487" + sha256 cellar: :any_skip_relocation, ventura: "de49d3372e65ed4129bbf915d3220cd88a4e5bfe0ee468702d05cdacc85174cf" + sha256 cellar: :any_skip_relocation, monterey: "2417b908a0c2934b3d68ebddfabcdc2d59dbe08ba42d2521a66f107af9a74e98" + sha256 cellar: :any_skip_relocation, big_sur: "8ed65478fa14879ff6c24e7e6710d09a8143fe33aad4f8f353bb4ab91e393824" + sha256 cellar: :any_skip_relocation, catalina: "3b5cbe1f1da86d1cf1a3603fd6b0697a8fbe3bdffe6083dfc5b16c60cb5c3798" + sha256 cellar: :any_skip_relocation, mojave: "1f777329b3f9c45a8d94ad10af2183067ca6d28c8f5db48d6c26d33e7d381961" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c1f94e5c2315b93194e5b5573de8ac9d57fe7b791e20538839df29b940d4824" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/leaps" + end + + test do + port = ":#{free_port}" + + # Start the server in a fork + leaps_pid = fork do + exec bin/"leaps", "-address", port + end + + # Give the server some time to start serving + sleep(1) + + # Check that the server is responding correctly + assert_match "You are alone", shell_output("curl -o- http://localhost#{port}") + ensure + # Stop the server gracefully + Process.kill("HUP", leaps_pid) + end +end diff --git a/Formula/l/ledger.rb b/Formula/l/ledger.rb new file mode 100644 index 0000000000000..73d3d2748780c --- /dev/null +++ b/Formula/l/ledger.rb @@ -0,0 +1,118 @@ +class Ledger < Formula + desc "Command-line, double-entry accounting tool" + homepage "https://ledger-cli.org/" + license "BSD-3-Clause" + revision 8 + head "https://github.com/ledger/ledger.git", branch: "master" + + stable do + url "https://github.com/ledger/ledger/archive/refs/tags/v3.3.2.tar.gz" + sha256 "555296ee1e870ff04e2356676977dcf55ebab5ad79126667bc56464cb1142035" + + # Support building with mandoc + # Remove with v3.4.x + patch do + url "https://github.com/ledger/ledger/commit/f40cee6c3af4c9cec05adf520fc7077a45060434.patch?full_index=1" + sha256 "d5be89dbadff7e564a750c10cdb04b83e875452071a2115dd70aae6e7a8ee76c" + end + patch do + url "https://github.com/ledger/ledger/commit/14b90d8d952b40e0a474223e7f74a1e6505d5450.patch?full_index=1" + sha256 "d250557e385163e3ad3002117ebe985af040d915aab49ae1ea342db82398aeda" + end + + # Backport fix to build with `boost` 1.85.0 + patch do + url "https://github.com/ledger/ledger/commit/46207852174feb5c76c7ab894bc13b4f388bf501.patch?full_index=1" + sha256 "8aaf8daf4748f359946c64488c96345f4a4bdf928f6ec7a1003610174428599f" + end + + # Backport fixes to build with `boost` 1.86.0 + # Ref: https://github.com/ledger/ledger/pull/2381 + patch do + url "https://github.com/ledger/ledger/commit/ad93c185644cfcb14fe4a673e74a0cb5c954a4b4.patch?full_index=1" + sha256 "3d2db6b116cd7e8a1051ac7f92853f72c145ff0487f2f4e12e650ee7ec9e67b0" + end + patch do + url "https://github.com/ledger/ledger/commit/4f4cc1688a8e8a7c03f18603cc5a4159d9c89ca3.patch?full_index=1" + sha256 "938d62974ee507b851239b6525c98c8cb1c81e24e8ae2939d4675d97a8ec8f67" + end + patch do + url "https://github.com/ledger/ledger/commit/5320c9f719a309ddacdbe77181cabeb351949013.patch?full_index=1" + sha256 "9794113b28eabdcfc8b900eafc8dc2c0698409c0b3d856083ed5e38818289ba1" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "6fe371a5bcfa9830acbaaebc0ef8610f397f56025b3eec0b4cfac1d05d66f3d0" + sha256 cellar: :any, arm64_sonoma: "a13069588287ee7022d4ecbd79b3a3f62454b7bdcb4f8521d81dd5db0745b056" + sha256 cellar: :any, arm64_ventura: "95ad23162c58e1de9ba100d26d7547a209f8ac0b9ad7f5e56a456aa7b68e46fe" + sha256 cellar: :any, sonoma: "75d9f373ddf42a8af5b71354e863caa4a40229cf0bf8e1f9eb189c6554c794e4" + sha256 cellar: :any, ventura: "0873ee5b14e44585ca2f8ddb6e4ad6cb3d42a303f3d10890867ce39421c2dd62" + sha256 cellar: :any_skip_relocation, arm64_linux: "b64fcec6b6d14d1c34bac6d8b4173bc03069a4a2c0ffbb498723aa6a411ece38" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9502395a997808405f2d380c04d2c73fc57d15323179944092491c5c4ccfd7c" + end + + depends_on "cmake" => :build + depends_on "texinfo" => :build # for makeinfo + depends_on "boost" + depends_on "gmp" + depends_on "gpgme" + depends_on "mpfr" + depends_on "python@3.13" + + uses_from_macos "mandoc" => :build + uses_from_macos "libedit" + + on_macos do + depends_on "libassuan" + end + + def install + # Workaround until next release as commit doesn't apply + # https://github.com/ledger/ledger/commit/956d8ea37247b34a5300c9d55abc7c75324fff33 + if build.stable? + inreplace "CMakeLists.txt", "cmake_minimum_required(VERSION 3.0)", + "cmake_minimum_required(VERSION 3.5)" + end + + ENV.cxx11 + ENV.prepend_path "PATH", Formula["python@3.13"].opt_libexec/"bin" + + args = %W[ + --jobs=#{ENV.make_jobs} + --output=build + --prefix=#{prefix} + --boost=#{Formula["boost"].opt_prefix} + -- + -DBUILD_DOCS=1 + -DBUILD_WEB_DOCS=1 + -DBoost_NO_BOOST_CMAKE=ON + -DPython_FIND_VERSION_MAJOR=3 + -DUSE_GPGME=1 + ] + std_cmake_args + + system "./acprep", "opt", "make", *args + system "./acprep", "opt", "make", "doc", *args + system "./acprep", "opt", "make", "install", *args + + (pkgshare/"examples").install Dir["test/input/*.dat"] + pkgshare.install "contrib" + elisp.install Dir["lisp/*.el", "lisp/*.elc"] + bash_completion.install pkgshare/"contrib/ledger-completion.bash" => "ledger" + end + + test do + balance = testpath/"output" + system bin/"ledger", + "--args-only", + "--file", pkgshare/"examples/sample.dat", + "--output", balance, + "balance", "--collapse", "equity" + assert_equal " $-2,500.00 Equity", balance.read.chomp + end +end diff --git a/Formula/l/ledit.rb b/Formula/l/ledit.rb new file mode 100644 index 0000000000000..010bd0c70ff67 --- /dev/null +++ b/Formula/l/ledit.rb @@ -0,0 +1,51 @@ +class Ledit < Formula + desc "Line editor for interactive commands" + homepage "https://pauillac.inria.fr/~ddr/ledit/" + url "https://github.com/chetmurthy/ledit/archive/refs/tags/ledit-2-07.tar.gz" + sha256 "0252dc8d3eb40ba20b6792f9d23b3a736b1b982b674a90efb913795f02225877" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^ledit[._-]v?(\d+(?:[.-]\d+)+)$/i) + strategy :git do |tags, regex| + tags.filter_map { |tag| tag[regex, 1]&.tr("-", ".") } + end + end + + bottle do + sha256 arm64_sequoia: "a1c09fdb10ac873836f1f3370f77f8d87f9db7adb3ff0118ac0ba97b96cdb15e" + sha256 arm64_sonoma: "6659da41bcf927019dbd40f4e9c201e964ad63fae3dd19a1425313f3b51672ad" + sha256 arm64_ventura: "62f4ceec2f8e79b0be37a14ffa16ae6741722cb0bb0868d5aac2d12988b5c6bb" + sha256 cellar: :any_skip_relocation, sonoma: "59699dfa06f09eb79a2fd6b500757c7384b27d73cc44f2e5d05c30bc122cb9d5" + sha256 cellar: :any_skip_relocation, ventura: "6db3815932944204f44ab9e31bd34a678c8fc81d92c3b86e5518fc1bc8cffbcd" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd2c6e9eb1c5672a81399729bdaa9700876b024c24fd74bc982424790d9d2c01" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd2c6e9eb1c5672a81399729bdaa9700876b024c24fd74bc982424790d9d2c01" + end + + depends_on "ocaml-findlib" => :build + depends_on "camlp-streams" + depends_on "camlp5" + 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 + + # like camlp5, this build fails if the jobs are parallelized + ENV.deparallelize + args = %W[BINDIR=#{bin} LIBDIR=#{lib} MANDIR=#{man1}] + args << "CUSTOM=" if OS.linux? # Work around brew corrupting appended bytecode + system "make", *args + system "make", "install", *args + end + + test do + history = testpath/"history" + pipe_output("#{bin}/ledit -x -h #{history} bash", "exit\n", 0) + assert_path_exists history + assert_equal "exit\n", history.read + end +end diff --git a/Formula/l/leela-zero.rb b/Formula/l/leela-zero.rb new file mode 100644 index 0000000000000..fec0bfb170b6e --- /dev/null +++ b/Formula/l/leela-zero.rb @@ -0,0 +1,54 @@ +class LeelaZero < Formula + desc "Neural Network Go engine with no human-provided knowledge" + homepage "https://zero.sjeng.org/" + # pull from git tag to get submodules + url "https://github.com/leela-zero/leela-zero.git", + tag: "v0.17", + revision: "3f297889563bcbec671982c655996ccff63fa253" + license "GPL-3.0-or-later" + revision 10 + + bottle do + sha256 cellar: :any, arm64_sequoia: "89c9cd32fe6c7a9c5239fd79cb4478b59c3fab520ef41b6eac2420c549d485c2" + sha256 cellar: :any, arm64_sonoma: "d53fa2be94dea4d05c53dec8fe788b9d0592ba2fe9a1859f469a3561514b0503" + sha256 cellar: :any, arm64_ventura: "6be25e10e1be034a3b7aef791fba5d45e1b288c818035b997a9d26f0742ef463" + sha256 cellar: :any, sonoma: "0a10d9190312af4f6f6469d57163a463cd99f52fc16100f6c145a107001e1a5e" + sha256 cellar: :any, ventura: "da90734e4217838d1e9ccb08df23b9d841eea2f5daf3107e17a45a1af8e4db8f" + sha256 cellar: :any_skip_relocation, arm64_linux: "75cf01a629f8eeecf1e21f43b6ed281aad1ab5bd434fbd25e762c2ee1ff6e47b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e5ee03297c6c74f7bc78ed0ce6f77a798720c27e099f2949b855db92dac4086" + end + + depends_on "cmake" => :build + depends_on "boost" + + uses_from_macos "zlib" + + on_linux do + depends_on "opencl-headers" => :build + depends_on "opencl-icd-loader" + depends_on "pocl" + end + + resource "network" do + url "https://zero.sjeng.org/networks/00ff08ebcdc92a2554aaae815fbf5d91e8d76b9edfe82c9999427806e30eae77.gz", using: :nounzip + sha256 "5302f23818c23e1961dff986ba00f5df5c58dc9c780ed74173402d58fdb6349c" + end + + def install + # Workaround as upstream targets C++14 for older distros but Boost.Spirit 1.88.0 needs C++17 std::optional + # https://github.com/leela-zero/leela-zero/blob/next/CONTRIBUTING.md#upgrading-dependencies + inreplace "CMakeLists.txt", "set(CMAKE_CXX_STANDARD 14)", "set(CMAKE_CXX_STANDARD 17)" + ENV.append "CXXFLAGS", "-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION" if ENV.compiler == :clang + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install resource("network") + end + + test do + system bin/"leelaz", "--help" + assert_match(/^= [A-T][0-9]+$/, + pipe_output("#{bin}/leelaz --cpu-only --gtp -w #{pkgshare}/*.gz", "genmove b\n", 0)) + end +end diff --git a/Formula/l/leetcode-cli.rb b/Formula/l/leetcode-cli.rb new file mode 100644 index 0000000000000..be7d625a9962f --- /dev/null +++ b/Formula/l/leetcode-cli.rb @@ -0,0 +1,39 @@ +class LeetcodeCli < Formula + desc "May the code be with you" + homepage "https://github.com/clearloop/leetcode-cli" + url "https://github.com/clearloop/leetcode-cli/archive/refs/tags/v0.4.6.tar.gz" + sha256 "0b7af5782947a2ae5fab7233c8ca6dd59441287033e9116e332673ee6613a9e3" + license "MIT" + head "https://github.com/clearloop/leetcode-cli.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "74e049034f26697cbb450932850add1cbfd9d9dccb52d61d2109184f04987f6d" + sha256 cellar: :any, arm64_sonoma: "02fb5ce2daa5f0c662fc4b69b4dd82f6f7ac7ce12f4f1507e449fb91107d20e8" + sha256 cellar: :any, arm64_ventura: "56de48e4618446f7e796e118826eab3da85760eddbd170c360ec85cf0d12b85c" + sha256 cellar: :any, sonoma: "54a05fea76f766c5f43250de16f9e54ed10f1866f00e9108d356e81a2aa3d42e" + sha256 cellar: :any, ventura: "c945df73ce1df6261bd90a466813d1c70403e073ced3122d8c7c06e1b4c6b281" + sha256 cellar: :any_skip_relocation, arm64_linux: "35d29d17bc0a58d8de02b0e86d492c9d298c66060b44ecfda2b65d5d65c6b984" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24708a20685911223a7b8b32575473081a36fe6bc0135f415d27b5343cdb96a6" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "sqlite" + + 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/"leetcode", "completions") + end + + test do + assert_match version.to_s, shell_output("#{bin}/leetcode --version") + assert_match "[INFO leetcode_cli::config] Generate root dir", shell_output("#{bin}/leetcode list 2>&1", 101) + end +end diff --git a/Formula/l/leetgo.rb b/Formula/l/leetgo.rb new file mode 100644 index 0000000000000..4bf9291b365b1 --- /dev/null +++ b/Formula/l/leetgo.rb @@ -0,0 +1,36 @@ +class Leetgo < Formula + desc "CLI tool for LeetCode" + homepage "https://github.com/j178/leetgo" + url "https://github.com/j178/leetgo/archive/refs/tags/v1.4.13.tar.gz" + sha256 "b92f1708b1420e85c6b97e41f8a09b127a42c387918cba950543e1713195384d" + license "MIT" + head "https://github.com/j178/leetgo.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "45954b389fe71222e902d09271fe5c63ed72eeda290e26a000c830465e9650f9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bef911600ab27a0d9c98a62412b782428956cec8e1c32f631a3584e827f2dd0f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d1d12037661ed2e29b7998acffcc8c066a59d18484aa2940cf91e14716c20cf4" + sha256 cellar: :any_skip_relocation, sonoma: "54c98bfa56553cb85c4afba062b9f947d8667bd1fb62a3af96289a7c017ddd84" + sha256 cellar: :any_skip_relocation, ventura: "422f21ec5d06681330648c798867db1d630ba57d488850ec3c0a1ef839e733e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8671f9912142c044cf26bd06920dac2cf01c1949090b4e09573e7b3fb424a299" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/j178/leetgo/constants.Version=#{version} + -X github.com/j178/leetgo/constants.Commit=#{tap.user} + -X github.com/j178/leetgo/constants.BuildDate=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + generate_completions_from_executable(bin/"leetgo", "completion") + end + + test do + assert_match "leetgo version #{version}", shell_output("#{bin}/leetgo --version") + system bin/"leetgo", "init" + assert_path_exists testpath/"leetgo.yaml" + end +end diff --git a/Formula/l/leetup.rb b/Formula/l/leetup.rb new file mode 100644 index 0000000000000..e23bbd9a8e76f --- /dev/null +++ b/Formula/l/leetup.rb @@ -0,0 +1,49 @@ +class Leetup < Formula + desc "Command-line tool to solve Leetcode problems" + homepage "https://github.com/dragfire/leetup" + url "https://github.com/dragfire/leetup/archive/refs/tags/v1.2.5.tar.gz" + sha256 "f7fd0fed6cab7e352bf6ca5e4d0dd5631d90ef4451e27787236ff4ade36de3b8" + license "MIT" + head "https://github.com/dragfire/leetup.git", branch: "master" + + # This repository also contains tags with a trailing letter (e.g., `0.1.5-d`) + # but it's unclear whether these are stable. If this situation clears up in + # the future, we may need to modify this to use a regex that also captures + # the trailing text (i.e., `/^v?(\d+(?:\.\d+)+(?:[._-][a-z])?)$/i`). + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d1b4514ce4129a82214372e208fcc2e6d6dc746fb60ed69675d69628c7fbdd72" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8869f57b3f3a3c9de61c30dd2ab987ec81c82b46bcaa9a6426c44ff1ca05c967" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2310aadadf29ce3199edf0b7d749208b282916355fe00d8fb2f39bb645b355f1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c300dbf7a8021139b8113ca134d001ea57c2438598f7e8957807fba0966c7e15" + sha256 cellar: :any_skip_relocation, sonoma: "1934aa6e87b0d6b10a688cab48469b40387536d8cb57cfd4f6e4fdd976f4f437" + sha256 cellar: :any_skip_relocation, ventura: "9cf0c87808ed0962e2fdb6b1ccb1c4527c1007883912a2b9d1df26d2dedf6569" + sha256 cellar: :any_skip_relocation, monterey: "6d28bd176e651bce4d0eda8cc74f78b8dcc74453e1c165000e6f28b8984d7ca1" + sha256 cellar: :any_skip_relocation, arm64_linux: "4ea3eaa914822acc5f7759fee87fef3ecce87cb7c2105a797c640a09032c20a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f06e66d4529f7489b4ca0b9bcf9976c376015d6ea635c0c00a09adcd4439dca" + 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 <<~EOS, shell_output("#{bin}/leetup user --logout") + User not logged in! + User logged out! + EOS + + assert_match version.to_s, shell_output("#{bin}/leetup --version") + end +end diff --git a/Formula/l/lefthook.rb b/Formula/l/lefthook.rb new file mode 100644 index 0000000000000..443cd68915813 --- /dev/null +++ b/Formula/l/lefthook.rb @@ -0,0 +1,33 @@ +class Lefthook < Formula + desc "Fast and powerful Git hooks manager for any type of projects" + homepage "https://github.com/evilmartians/lefthook" + url "https://github.com/evilmartians/lefthook/archive/refs/tags/v1.11.12.tar.gz" + sha256 "725f048940791dd56acd2c54e2d0896e7cbb65a5b9896a12e797ef52e3cd0fef" + license "MIT" + head "https://github.com/evilmartians/lefthook.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa031368754a5a721b38c306a9f90fc7fde36b3dd8c8b34cecad51b263766195" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa031368754a5a721b38c306a9f90fc7fde36b3dd8c8b34cecad51b263766195" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa031368754a5a721b38c306a9f90fc7fde36b3dd8c8b34cecad51b263766195" + sha256 cellar: :any_skip_relocation, sonoma: "cfaeb2f8868af83402711efc09bd7868a963731b12ffc044108444e8f86a2431" + sha256 cellar: :any_skip_relocation, ventura: "cfaeb2f8868af83402711efc09bd7868a963731b12ffc044108444e8f86a2431" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66b684d44aa8c064a47764aec66bc3f7d17507a191d3f61196a4ec1945d1957a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", tags: "no_self_update") + + generate_completions_from_executable(bin/"lefthook", "completion") + end + + test do + system "git", "init" + system bin/"lefthook", "install" + + assert_path_exists testpath/"lefthook.yml" + assert_match version.to_s, shell_output("#{bin}/lefthook version") + end +end diff --git a/Formula/l/legba.rb b/Formula/l/legba.rb new file mode 100644 index 0000000000000..e56d287f87fd8 --- /dev/null +++ b/Formula/l/legba.rb @@ -0,0 +1,40 @@ +class Legba < Formula + desc "Multiprotocol credentials bruteforcer/password sprayer and enumerator" + homepage "https://github.com/evilsocket/legba" + url "https://github.com/evilsocket/legba/archive/refs/tags/v0.10.0.tar.gz" + sha256 "9755ec21539ec31dfc6c314dde1416c9b2bc79199f5aceb937e84bafc445b208" + license "AGPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0bb1be7ca5dfde3d92f8edf755edbd2cea4129c60730055612f4cd863a637252" + sha256 cellar: :any, arm64_sonoma: "21bbb2235762909ae76b3ac1222b183c5f2f05a8ae07b779001fd90e683b3d73" + sha256 cellar: :any, arm64_ventura: "2667efc81b47fa5e6d8c157207f6c6a9f192066766b0aab1f6a4aed02b18e02a" + sha256 cellar: :any, sonoma: "6fae915b3b92936d1b9eb6a6ed584f7c0b64a86e032e33f0ffe4aa7ac9dce696" + sha256 cellar: :any, ventura: "5039e6dc3df7510c9a1fdbd3fa5d4badfcbf32da1a285e7d0bdf9650e8d03124" + sha256 cellar: :any_skip_relocation, arm64_linux: "406ceb16704065ba75035184bb193ed451550edc9fac885d345f652ec3b51184" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca0f43ae1e6737997497dedf44a3de25a00de76f1a90a159f90acfaa2e890035" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "openssl@3" + depends_on "samba" + + 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/"legba", "--generate-completions") + end + + test do + assert_match version.to_s, shell_output("#{bin}/legba --version") + + output = shell_output("#{bin}/legba --list-plugins") + assert_match "Samba password authentication", output + end +end diff --git a/Formula/l/legit.rb b/Formula/l/legit.rb new file mode 100644 index 0000000000000..d1d39953938cd --- /dev/null +++ b/Formula/l/legit.rb @@ -0,0 +1,97 @@ +class Legit < Formula + include Language::Python::Virtualenv + + desc "Command-line interface for Git, optimized for workflow simplicity" + homepage "https://frostming.github.io/legit/" + url "https://files.pythonhosted.org/packages/cb/e4/8cc5904c486241bf2edc4dd84f357fa96686dc85f48eedb835af65f821bf/legit-1.2.0.post0.tar.gz" + sha256 "949396b68029a8af405ab20c901902341ef6bd55c7fec6dab71141d63d406b11" + license "BSD-3-Clause" + revision 8 + head "https://github.com/frostming/legit.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7e42ca33477abbbd0614ebe49a653974aeeda576e2ea6341f47c6c8a871eed61" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7e42ca33477abbbd0614ebe49a653974aeeda576e2ea6341f47c6c8a871eed61" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7e42ca33477abbbd0614ebe49a653974aeeda576e2ea6341f47c6c8a871eed61" + sha256 cellar: :any_skip_relocation, sonoma: "aeceabb740479fc3464b46e9fc3e88bfdfa3e893615637cc7d001ad76a5122ee" + sha256 cellar: :any_skip_relocation, ventura: "aeceabb740479fc3464b46e9fc3e88bfdfa3e893615637cc7d001ad76a5122ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "9257305158412190881553a43bb05030c1660044521defd3aec90c009acc1393" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e42ca33477abbbd0614ebe49a653974aeeda576e2ea6341f47c6c8a871eed61" + end + + depends_on "python@3.13" + + resource "args" do + url "https://files.pythonhosted.org/packages/e5/1c/b701b3f4bd8d3667df8342f311b3efaeab86078a840fb826bd204118cc6b/args-0.1.0.tar.gz" + sha256 "a785b8d837625e9b61c39108532d95b85274acd679693b71ebb5156848fcf814" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "clint" do + url "https://files.pythonhosted.org/packages/3d/b4/41ecb1516f1ba728f39ee7062b9dac1352d39823f513bb6f9e8aeb86e26d/clint-0.5.1.tar.gz" + sha256 "05224c32b1075563d0b16d0015faaf9da43aa214e4a2140e51f08789e7a4c5aa" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "crayons" do + url "https://files.pythonhosted.org/packages/b8/6b/12a1dea724c82f1c19f410365d3e25356625b48e8009a7c3c9ec4c42488d/crayons-0.4.0.tar.gz" + sha256 "bd33b7547800f2cfbd26b38431f9e64b487a7de74a947b0fafc89b45a601813f" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/19/0d/bbb5b5ee188dec84647a4664f3e11b06ade2bde568dbd489d9d64adef8ed/gitdb-4.0.11.tar.gz" + sha256 "bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/b6/a1/106fd9fa2dd989b6fb36e5893961f82992cf676381707253e0bf93eb1662/GitPython-3.1.43.tar.gz" + sha256 "35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/88/04/b5bf6d21dc4041000ccba7eb17dd3055feb237e7ffc2c20d3fae3af62baa/smmap-5.0.1.tar.gz" + sha256 "dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62" + end + + def install + virtualenv_install_with_resources + bash_completion.install "extra/bash-completion/legit" + zsh_completion.install "extra/zsh-completion/_legit" + man1.install "extra/man/legit.1" + end + + test do + (testpath/".gitconfig").write <<~EOS + [user] + name = Real Person + email = notacat@hotmail.cat + EOS + system "git", "init" + (testpath/"foo").write("woof") + system "git", "add", "foo" + system "git", "commit", "-m", "init" + system "git", "remote", "add", "origin", "https://github.com/git/git.git" + system "git", "branch", "test" + inreplace "foo", "woof", "meow" + assert_match "test", shell_output("#{bin}/legit branches") + output = shell_output("#{bin}/legit switch test") + assert_equal "Switched to branch 'test'", output.strip.lines.last + assert_equal "woof", (testpath/"foo").read + system "git", "stash", "pop" + assert_equal "meow", (testpath/"foo").read + end +end diff --git a/Formula/l/legitify.rb b/Formula/l/legitify.rb new file mode 100644 index 0000000000000..45b7fd4ec06aa --- /dev/null +++ b/Formula/l/legitify.rb @@ -0,0 +1,44 @@ +class Legitify < Formula + desc "Tool to detect/remediate misconfig and security risks of GitHub/GitLab assets" + homepage "https://legitify.dev/" + url "https://github.com/Legit-Labs/legitify/archive/refs/tags/v1.0.11.tar.gz" + sha256 "f63809a93571a72269aed6c10fa3cb1a0f384802857c21740386773690b696bb" + license "Apache-2.0" + head "https://github.com/Legit-Labs/legitify.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d5ed91407468d73ad21a6bd719e4c194fcb4e30d2a06cbbfeac97244e3ed59ef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "508603a0320179fd5861ad68d64c4617e13b786ab4f6fc2015902bbb605f3cdf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e81db6ed3a3d93d450a249904b883b7b77affdc9d91db30f4134bc705a66ae4b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a1b329b77085126fb22636d4a9a5ef12c62361c6f5d747713584f227d6c202b7" + sha256 cellar: :any_skip_relocation, sonoma: "4da2d4b8cfda747f0c5e4737b420ed649668c3e99e166d6bb09b5ac3ab6987fa" + sha256 cellar: :any_skip_relocation, ventura: "b84b18b0af6e823a7e1702a2ae93ddc159c4a663d3a2355736d0d496e1598e79" + sha256 cellar: :any_skip_relocation, monterey: "7cd2d8b32f4bf1ab2639d0b62d8400b1bbb7d338961ab5360bfd3e351ab61522" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a5928ac45988d42f507bda79350361ac1e2e157ba1957b94df70e1701c1bd9c" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/Legit-Labs/legitify/internal/version.Version=#{version} + -X github.com/Legit-Labs/legitify/internal/version.Commit=#{tap.user} + ] + + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"legitify", "completion") + end + + test do + output = shell_output("#{bin}/legitify generate-docs") + assert_match "policy_name: actions_can_approve_pull_requests", output + assert_match version.to_s, shell_output("#{bin}/legitify version") + end +end diff --git a/Formula/l/lego.rb b/Formula/l/lego.rb new file mode 100644 index 0000000000000..69d8affcc7c91 --- /dev/null +++ b/Formula/l/lego.rb @@ -0,0 +1,40 @@ +class Lego < Formula + desc "Let's Encrypt client and ACME library" + homepage "https://go-acme.github.io/lego/" + url "https://github.com/go-acme/lego/archive/refs/tags/v4.23.1.tar.gz" + sha256 "e86e62946397964d6f2db2a2487cc75acac08e9ad7811c2302d56c35ca521699" + license "MIT" + head "https://github.com/go-acme/lego.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "949df3c4a3249e34ba50ff646a843c7108902b2db207efcdab1e173534253edb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "949df3c4a3249e34ba50ff646a843c7108902b2db207efcdab1e173534253edb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "949df3c4a3249e34ba50ff646a843c7108902b2db207efcdab1e173534253edb" + sha256 cellar: :any_skip_relocation, sonoma: "f391914bc2388a4f46ec084b668e451d00260febda14f479b0bce6bdd056d2e4" + sha256 cellar: :any_skip_relocation, ventura: "f391914bc2388a4f46ec084b668e451d00260febda14f479b0bce6bdd056d2e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68b1c2c9033779e35513cd2455aee66188b6e77ccfffbcbacdce0cb52eecb1d6" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/lego" + end + + test do + output = shell_output("#{bin}/lego -a --email test@brew.sh --dns digitalocean -d brew.test run 2>&1", 1) + assert_match "some credentials information are missing: DO_AUTH_TOKEN", output + + output = shell_output( + "DO_AUTH_TOKEN=xx #{bin}/lego -a --email test@brew.sh --dns digitalocean -d brew.test run 2>&1", 1 + ) + assert_match "Could not obtain certificates", output + + assert_match version.to_s, shell_output("#{bin}/lego -v") + end +end diff --git a/Formula/l/leiningen.rb b/Formula/l/leiningen.rb new file mode 100644 index 0000000000000..e1f59d8440ca3 --- /dev/null +++ b/Formula/l/leiningen.rb @@ -0,0 +1,76 @@ +class Leiningen < Formula + desc "Build tool for Clojure" + homepage "https://github.com/technomancy/leiningen" + url "https://github.com/technomancy/leiningen/archive/refs/tags/2.11.2.tar.gz" + sha256 "fe9ee17786be6c3cf4615688a2a82c173369657d84c1b2ffc00b7cd5fd7df1bc" + license "EPL-1.0" + head "https://github.com/technomancy/leiningen.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "131114eee9aa0c25867ebf065360d52bbfaef43906308b747ea6cd9b033326f6" + end + + depends_on "openjdk" + + resource "jar" do + url "https://github.com/technomancy/leiningen/releases/download/2.11.2/leiningen-2.11.2-standalone.jar" + sha256 "7d31ae23ae769e927438b0cd55d15a93e7dabab09fd4fc15877979161e108774" + + livecheck do + formula :parent + end + end + + def install + odie "jar resource needs to be updated" if build.stable? && version != resource("jar").version + + libexec.install resource("jar") + jar = "leiningen-#{version}-standalone.jar" + + # bin/lein autoinstalls and autoupdates, which doesn't work too well for us + inreplace "bin/lein-pkg" do |s| + s.change_make_var! "LEIN_JAR", libexec/jar + end + + (libexec/"bin").install "bin/lein-pkg" => "lein" + (libexec/"bin/lein").chmod 0755 + (bin/"lein").write_env_script libexec/"bin/lein", Language::Java.overridable_java_home_env + bash_completion.install "bash_completion.bash" => "lein" + zsh_completion.install "zsh_completion.zsh" => "_lein" + end + + def caveats + <<~EOS + Dependencies will be installed to: + $HOME/.m2/repository + To play around with Clojure run `lein repl` or `lein help`. + EOS + end + + test do + (testpath/"project.clj").write <<~CLOJURE + (defproject brew-test "1.0" + :dependencies [[org.clojure/clojure "1.10.3"]]) + CLOJURE + + (testpath/"src/brew_test/core.clj").write <<~CLOJURE + (ns brew-test.core) + (defn adds-two + "I add two to a number" + [x] + (+ x 2)) + CLOJURE + + (testpath/"test/brew_test/core_test.clj").write <<~CLOJURE + (ns brew-test.core-test + (:require [clojure.test :refer :all] + [brew-test.core :as t])) + (deftest canary-test + (testing "adds-two yields 4 for input of 2" + (is (= 4 (t/adds-two 2))))) + CLOJURE + + system bin/"lein", "test" + end +end diff --git a/Formula/l/lemmeknow.rb b/Formula/l/lemmeknow.rb new file mode 100644 index 0000000000000..748ef59d0e1ad --- /dev/null +++ b/Formula/l/lemmeknow.rb @@ -0,0 +1,32 @@ +class Lemmeknow < Formula + desc "Fastest way to identify anything!" + homepage "https://github.com/swanandx/lemmeknow" + url "https://github.com/swanandx/lemmeknow/archive/refs/tags/v0.8.0.tar.gz" + sha256 "46f42e80cf2c142641fc52826bcf73e00e26dbb93f20397a282e04b786a7cfe8" + license "MIT" + head "https://github.com/swanandx/lemmeknow.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "03fae36a6ddc5d004cc3eaadbf554dacfb3a5d968835708de4b595e9acdbc90f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c283216680e3331f7630e128ae29070f4710ee6175b237f8449cde10482a9d0b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "90517e35b64697b70153db585ce845aa789762a3dd0aeec955a6ef4f516194f9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "67edad348c761e6fb74da22ecd3fcfa511eed0b3239a9eb5ed5ac4df71abdf4d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "293c3d179f7122f7eeefdde492a5c2a77024ca46c458d1f1186baa7078202062" + sha256 cellar: :any_skip_relocation, sonoma: "4e9560ef44e088f3b7ff0edebeb7963da55f0858be3365ee9313982c512dab8d" + sha256 cellar: :any_skip_relocation, ventura: "8b5b5766ec6bb2c0392759b960b21613a46cbecdd4a06b696197fd2b18b63e69" + sha256 cellar: :any_skip_relocation, monterey: "d1999def59b9c186a9310cd18f6a55fd6ac565f4330b8c1800bdc6a1dc035aea" + sha256 cellar: :any_skip_relocation, big_sur: "9233947a40343e7512dbc090981151ef1e9fd009ca09fc60b9b510036b4e133a" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b3e0ddcfc0903619d6b4ae27306d8c047df8fb325882eda53c2e70674140c9a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8d597d9d5a7512e3c5ccb9bca3efc519f1e9d1445cbac41ea4a9faea38caf7e" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "Internet Protocol (IP)", shell_output("#{bin}/lemmeknow 127.0.0.1").strip + end +end diff --git a/Formula/l/lemon.rb b/Formula/l/lemon.rb new file mode 100644 index 0000000000000..7b335b3d7bea6 --- /dev/null +++ b/Formula/l/lemon.rb @@ -0,0 +1,73 @@ +class Lemon < Formula + desc "LALR(1) parser generator like yacc or bison" + homepage "https://www.hwaci.com/sw/lemon/" + url "https://www.sqlite.org/2025/sqlite-src-3490200.zip" + version "3.49.2" + sha256 "c3101978244669a43bc09f44fa21e47a4e25cdf440f1829e9eff176b9a477862" + license "blessing" + + livecheck do + formula "sqlite" + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7d2a76e2c08439261c82871c9f07dda15a0c3eb49630ff32722a76ecbdfe6544" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "281a30a1db4b546955430194d7b4875adb0b0b645c089f2bdc4eaefc4553dbb0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5e8b103446b7650c049ce821232303b5fc628e4f17753162d3ed5c22ed757c81" + sha256 cellar: :any_skip_relocation, sequoia: "acf3a9e67f1831df7b4ef3b2964c864d3a2f69c7101dfdbac049eb8fd2e3c727" + sha256 cellar: :any_skip_relocation, sonoma: "9362506ffa703973a49a3a8d9f5ff2d4b3fd1c50d18db55c9508ae96499a7d5f" + sha256 cellar: :any_skip_relocation, ventura: "6c80e973fc996f2f054c9e86ba23590a01496e2ba863a34e72eba8227f578b08" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b29791edc131d0ea499c79cb006a49a40fbb1fdb998d74c6fcb2719ccf1e3aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "051ffd81a05525589d6b28b14a049dca4fb4f5e8f3ee0bff7764e47e809213cd" + end + + # Submitted the patch via email to the upstream + patch :DATA + + def install + pkgshare.install "tool/lempar.c" + + # patch the parser generator to look for the 'lempar.c' template file where we've installed it + inreplace "tool/lemon.c", "lempar.c", "#{pkgshare}/lempar.c" + + system ENV.cc, "-o", "lemon", "tool/lemon.c" + bin.install "lemon" + + pkgshare.install "test/lemon-test01.y" + doc.install "doc/lemon.html" + end + + test do + system bin/"lemon", "-d#{testpath}", "#{pkgshare}/lemon-test01.y" + system ENV.cc, "lemon-test01.c" + assert_match "tests pass", shell_output("./a.out") + end +end + +__END__ +diff --git a/test/lemon-test01.y b/test/lemon-test01.y +index 0fd514f..67a3752 100644 +--- a/test/lemon-test01.y ++++ b/test/lemon-test01.y +@@ -54,8 +54,8 @@ all ::= error B. + Parse(&xp, 0, 0); + ParseFinalize(&xp); + testCase(200, 1, nSyntaxError); +- testCase(210, 1, nAccept); +- testCase(220, 0, nFailure); ++ testCase(210, 0, nAccept); ++ testCase(220, 3, nFailure); + nSyntaxError = nAccept = nFailure = 0; + ParseInit(&xp); + Parse(&xp, TK_A, 0); +@@ -64,7 +64,7 @@ all ::= error B. + ParseFinalize(&xp); + testCase(200, 1, nSyntaxError); + testCase(210, 0, nAccept); +- testCase(220, 0, nFailure); ++ testCase(220, 2, nFailure); + if( nErr==0 ){ + printf("%d tests pass\n", nTest); + }else{ diff --git a/Formula/l/lensfun.rb b/Formula/l/lensfun.rb new file mode 100644 index 0000000000000..1beb5b1809d8c --- /dev/null +++ b/Formula/l/lensfun.rb @@ -0,0 +1,77 @@ +class Lensfun < Formula + include Language::Python::Shebang + + desc "Remove defects from digital images" + homepage "https://lensfun.github.io/" + url "https://github.com/lensfun/lensfun/archive/refs/tags/v0.3.4.tar.gz" + sha256 "dafb39c08ef24a0e2abd00d05d7341b1bf1f0c38bfcd5a4c69cf5f0ecb6db112" + license all_of: [ + "LGPL-3.0-only", + "GPL-3.0-only", + "CC-BY-3.0", + :public_domain, + ] + version_scheme 1 + head "https://github.com/lensfun/lensfun.git", branch: "master" + + # Versions with a 90+ patch are unstable and this regex should only match the + # stable versions. + livecheck do + url :stable + regex(/^v?(\d+\.\d+(?:\.(?:\d|[1-8]\d+)(?:\.\d+)*)?)$/i) + end + + bottle do + rebuild 4 + sha256 arm64_sequoia: "19e6455ae24f5deb3f96089c18cf11b77f4fc3d03ca77761e2985d33aeea3e63" + sha256 arm64_sonoma: "06508767287b05cd51b631ea7b6c4d01b3176ba7cbe14412b79df9f3c47dd252" + sha256 arm64_ventura: "e54fe0c3f77d0a79a0d9b6850807db5ce3ce136790d4947bda4420e2c4f0596a" + sha256 sonoma: "33b45fe0015b3aa498efbd6d83557352f1646750e6fa137e611d10c56329c14f" + sha256 ventura: "79f780f2be84affa0ec87493db70a520cfd2e675c7c3ecc4f001c16f66bef454" + sha256 arm64_linux: "59a7a77209ba18eb6b81d5965159eb16ff10b83ed6ac49e2afce1118a4b1f2ab" + sha256 x86_64_linux: "c668142f49f3abd0b1dcbfd48d6dbe43ea7faaf69ff2462cb5bbfafba1f060c4" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libpng" + depends_on "python@3.13" + + on_macos do + depends_on "gettext" + end + + def python3 + "python3.13" + end + + def install + # Workaround to build with CMake 4 + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + # Homebrew's python "prefix scheme" patch tries to install into + # HOMEBREW_PREFIX/lib, which fails due to sandbox. As a workaround, + # we disable the install step and manually run pip install later. + inreplace "apps/CMakeLists.txt" do |s| + s.gsub!("${PYTHON} ${SETUP_PY} build", "mkdir build") + s.gsub!(/^\s*INSTALL\(CODE "execute_process\(.*SETUP_PY/, "#\\0") + end + + args = %W[ + -DBUILD_LENSTOOL=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + rewrite_shebang detected_python_shebang, *bin.children + + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "./build/apps" + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + system bin/"lensfun-update-data" + end +end diff --git a/Formula/l/leptonica.rb b/Formula/l/leptonica.rb new file mode 100644 index 0000000000000..f1c145eb0113b --- /dev/null +++ b/Formula/l/leptonica.rb @@ -0,0 +1,48 @@ +class Leptonica < Formula + desc "Image processing and image analysis library" + homepage "http://www.leptonica.org/" + url "https://github.com/DanBloomberg/leptonica/releases/download/1.85.0/leptonica-1.85.0.tar.gz" + sha256 "3745ae3bf271a6801a2292eead83ac926e3a9bc1bf622e9cd4dd0f3786e17205" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d2d966918337ee5feda18544d4546734f77aeaf4dde87ae8979589bd97c799c1" + sha256 cellar: :any, arm64_sonoma: "4b742a3445f7a24454ebf897551b8d49fc5cdc2ab7c93fc5a5c6ec4695292ef0" + sha256 cellar: :any, arm64_ventura: "c63d4257101ed2af4aca050ce013a6825ca189ec0f4cea03bdd650ecea77cc71" + sha256 cellar: :any, sonoma: "97b295e17239dca10dbc284995b439594ad857afa84b9e81b12b6dd597e8daa8" + sha256 cellar: :any, ventura: "b85f75996d77b388e32d762a3b5c9d70f6a4d6be088353822b57b52c71a4d8b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "1337f4e47a28be51760dc07833dd60892c01687e62cdcbe04dffec94f5fb20fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b2c01e724c093ba4b4bf19bdd65edcc3ff70dbc5071e5e801f07b9f24cc2d63" + end + + depends_on "pkgconf" => :build + depends_on "giflib" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "openjpeg" + depends_on "webp" + + uses_from_macos "zlib" + + def install + system "./configure", "--with-libwebp", "--with-libopenjpeg", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main(int argc, char **argv) { + fprintf(stdout, "%d.%d.%d", LIBLEPT_MAJOR_VERSION, LIBLEPT_MINOR_VERSION, LIBLEPT_PATCH_VERSION); + return 0; + } + CPP + + flags = ["-I#{include}/leptonica"] + ENV.cflags.to_s.split + system ENV.cxx, "test.cpp", *flags + assert_equal version.to_s, shell_output("./a.out") + end +end diff --git a/Formula/l/lerna.rb b/Formula/l/lerna.rb new file mode 100644 index 0000000000000..9f0a83730218d --- /dev/null +++ b/Formula/l/lerna.rb @@ -0,0 +1,31 @@ +class Lerna < Formula + desc "Tool for managing JavaScript projects with multiple packages" + homepage "https://lerna.js.org/" + url "https://registry.npmjs.org/lerna/-/lerna-8.2.2.tgz" + sha256 "92412a5122008cfa811d53b1a12d5c35445800ad9537c0227ed17fc6336caa8a" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ea39248d03d000d57165e3879a00ae1dcb6fc8617210fa44d9e177358027a4bc" + sha256 cellar: :any, arm64_sonoma: "ea39248d03d000d57165e3879a00ae1dcb6fc8617210fa44d9e177358027a4bc" + sha256 cellar: :any, arm64_ventura: "ea39248d03d000d57165e3879a00ae1dcb6fc8617210fa44d9e177358027a4bc" + sha256 cellar: :any, sonoma: "eabd4097f10cbb4ac97c2716d1e9ef044f4b31873685d3b5f12fbd2c1aeaed9e" + sha256 cellar: :any, ventura: "eabd4097f10cbb4ac97c2716d1e9ef044f4b31873685d3b5f12fbd2c1aeaed9e" + sha256 cellar: :any_skip_relocation, arm64_linux: "59c69e98e03fbc56a220bda1e14ab2a20ba27e80d8c85418a7eead84005b709c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4848224c3a5fe8df2069b2e329fb0f76793ba3e100c01361bfb092ccff0a2e29" + 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}/lerna --version") + + output = shell_output("#{bin}/lerna init --independent 2>&1") + assert_match "lerna success Initialized Lerna files", output + end +end diff --git a/Formula/l/less.rb b/Formula/l/less.rb new file mode 100644 index 0000000000000..54bfb475c0dd5 --- /dev/null +++ b/Formula/l/less.rb @@ -0,0 +1,42 @@ +class Less < Formula + desc "Pager program similar to more" + homepage "https://www.greenwoodsoftware.com/less/index.html" + url "https://www.greenwoodsoftware.com/less/less-668.tar.gz" + sha256 "2819f55564d86d542abbecafd82ff61e819a3eec967faa36cd3e68f1596a44b8" + license "GPL-3.0-or-later" + + livecheck do + url :homepage + regex(/less[._-]v?(\d+(?:\.\d+)*).+?released.+?general use/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "d697a1fe935515da404479a4886cf9f44f377cf09d93b5b85596774030efc2b3" + sha256 cellar: :any, arm64_sonoma: "a187e2013023daa1910e3ba51e317c7958b14eff51ae7f0ac50b0c239062a70f" + sha256 cellar: :any, arm64_ventura: "58a76058176707e39b5065c4a105b2f7f45c868845a411d81b15ce613cbb3ecb" + sha256 cellar: :any, sonoma: "1194fae6d84f21aa62a7872af689067e67acc4f3c95baa5a75c04cf2a1946931" + sha256 cellar: :any, ventura: "704d6a4b11de0f6e2662a7363c1793499bd4855b16e5ff63039b7bdba24ac902" + sha256 cellar: :any_skip_relocation, arm64_linux: "6a45ea206d3258be6b1d99b09aecdc72d19a5ecac6e462207feea6e3ce364d24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e86542d7e69cbe139d7cb84746d0567fc997ace251a2e443600c5957af7eb9c" + end + + head do + url "https://github.com/gwsw/less.git", branch: "master" + depends_on "autoconf" => :build + depends_on "groff" => :build + uses_from_macos "perl" => :build + end + + depends_on "ncurses" + depends_on "pcre2" + + def install + system "make", "-f", "Makefile.aut", "distfiles" if build.head? + system "./configure", "--prefix=#{prefix}", "--with-regex=pcre2" + system "make", "install" + end + + test do + system bin/"lesskey", "-V" + end +end diff --git a/Formula/l/lesspipe.rb b/Formula/l/lesspipe.rb new file mode 100644 index 0000000000000..1553a805371f2 --- /dev/null +++ b/Formula/l/lesspipe.rb @@ -0,0 +1,44 @@ +class Lesspipe < Formula + desc "Input filter for the pager less" + homepage "https://www-zeuthen.desy.de/~friebel/unix/lesspipe.html" + url "https://github.com/wofr06/lesspipe/archive/refs/tags/v2.18.tar.gz" + sha256 "a78c5c2841771adb5cdc7eb918ca8e4865be88cb9f7a53622ca3fa064d5ec5bc" + license all_of: [ + "GPL-2.0-only", + "GPL-2.0-or-later", # sxw2txt + "MIT", # code2color + any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"], # vimcolor + ] + + bottle do + sha256 cellar: :any_skip_relocation, all: "7f22b2da49eb3d1351d4ed294dc21a75b794d4db4b10e91f0f4c28903ab32056" + end + + uses_from_macos "perl" + + on_macos do + depends_on "bash" + end + + def install + system "./configure", "--all-completions", "--prefix=#{prefix}" + man1.mkpath + system "make", "install" + end + + def caveats + <<~EOS + add the following to your shell profile e.g. ~/.profile or ~/.zshrc: + export LESSOPEN="|#{HOMEBREW_PREFIX}/bin/lesspipe.sh %s" + EOS + end + + test do + touch "file1.txt" + touch "file2.txt" + system "tar", "-cvzf", "homebrew.tar.gz", "file1.txt", "file2.txt" + + assert_path_exists testpath/"homebrew.tar.gz" + assert_match "file2.txt", pipe_output(bin/"archive_color", shell_output("tar -tvzf homebrew.tar.gz")) + end +end diff --git a/Formula/l/levant.rb b/Formula/l/levant.rb new file mode 100644 index 0000000000000..69406b2e81331 --- /dev/null +++ b/Formula/l/levant.rb @@ -0,0 +1,57 @@ +class Levant < Formula + desc "Templating and deployment tool for HashiCorp Nomad jobs" + homepage "https://github.com/hashicorp/levant" + url "https://github.com/hashicorp/levant/archive/refs/tags/v0.3.3.tar.gz" + sha256 "0e87c27e2d4be7cd2a24cb0459d0a55f1bb7b5d65e6f7da4a2babd7d95d1bd92" + license "MPL-2.0" + head "https://github.com/hashicorp/levant.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cea6e51299dcb25689bb89534f249efced99ea5caf759edca53099bd0507a978" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a8cb3d327f3a6c17677eab41ee6563397989c678c6db90894684c2e0979a46ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c58edcdb61ded77c7f1852bfa19f172d9c72bfa5de19afac3b351f73af2e98e8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "36afeec80aadd0c4eec3df654890e5675006f0b291f7c0072a77e212fc08598a" + sha256 cellar: :any_skip_relocation, sonoma: "63cc9da15372b6135f3f99f167c54198eb2e02e0e3cfaa062cb2955decf86d4c" + sha256 cellar: :any_skip_relocation, ventura: "3d7966e44708d954216fbc9cfdd5a3a25fa354cf43614101fa0f2b4405a7d52a" + sha256 cellar: :any_skip_relocation, monterey: "7ee4456e9545bc4e175f848a5e5f91af3964180b4f8ec0137dcbe0ba7c420a22" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37422a0f475593fbd1213d9ff47edc4dc2258d0bc507733b71443547c5a79815" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/hashicorp/levant/version.Version=#{version} + -X github.com/hashicorp/levant/version.VersionPrerelease=#{tap.user} + ] + + system "go", "build", *std_go_args(ldflags:) + end + + test do + (testpath/"template.nomad").write <<~HCL + resources { + cpu = [[.resources.cpu]] + memory = [[.resources.memory]] + } + HCL + + (testpath/"variables.json").write <<~JSON + { + "resources":{ + "cpu":250, + "memory":512, + "network":{ + "mbits":10 + } + } + } + JSON + + assert_match "resources {\n cpu = 250\n memory = 512\n}\n", + shell_output("#{bin}/levant render -var-file=#{testpath}/variables.json #{testpath}/template.nomad") + + assert_match "Levant v#{version}-#{tap.user}", shell_output("#{bin}/levant --version") + end +end diff --git a/Formula/l/leveldb.rb b/Formula/l/leveldb.rb new file mode 100644 index 0000000000000..44aa5a326c684 --- /dev/null +++ b/Formula/l/leveldb.rb @@ -0,0 +1,45 @@ +class Leveldb < Formula + desc "Key-value storage library with ordered mapping" + homepage "https://github.com/google/leveldb/" + url "https://github.com/google/leveldb/archive/refs/tags/1.23.tar.gz" + sha256 "9a37f8a6174f09bd622bc723b55881dc541cd50747cbd08831c2a82d620f6d76" + license "BSD-3-Clause" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "9ddcdcdaef16a4ecf52daefeea18623f769da2728bff6fcffff130ec130136e8" + sha256 cellar: :any, arm64_sonoma: "8ae60cb6aaa09c5508c3606a2f6666aaa12bafb44b56cbb262b5fdb0b7234e8d" + sha256 cellar: :any, arm64_ventura: "c0970a965d039a1f3ad15c7db01b80b9e8851c59f63fe55f0eaa8633d083530c" + sha256 cellar: :any, sonoma: "5a757793bb447bf5a91ee7fc38864c7dd4d870f857324524a4bd016c767afdda" + sha256 cellar: :any, ventura: "b20dad4e906b5c65f7b52e4a61293c22b8324925b24c982c0c4baad2c77e13c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7e65c084c1d96f275941227d504bf22bc4e8b0733d01658e7c5d6e0efc61a21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff14a180346c9cece9aa3ddaaab5882eb6f9fa5074cde29d874ab640b351fed2" + end + + depends_on "cmake" => :build + depends_on "snappy" + + def install + args = %W[ + -DLEVELDB_BUILD_TESTS=OFF + -DLEVELDB_BUILD_BENCHMARKS=OFF + -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build_shared", + *args, "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + bin.install "build_shared/leveldbutil" + + system "cmake", "-S", ".", "-B", "build_static", + *args, "-DBUILD_SHARED_LIBS=OFF", *std_cmake_args + system "cmake", "--build", "build_static" + lib.install "build_static/libleveldb.a" + end + + test do + assert_match "dump files", shell_output("#{bin}/leveldbutil 2>&1", 1) + end +end diff --git a/Formula/l/lexbor.rb b/Formula/l/lexbor.rb new file mode 100644 index 0000000000000..d3f71b7c1ae6a --- /dev/null +++ b/Formula/l/lexbor.rb @@ -0,0 +1,43 @@ +class Lexbor < Formula + desc "Fast embeddable web browser engine written in C with no dependencies" + homepage "https://lexbor.com/" + url "https://github.com/lexbor/lexbor/archive/refs/tags/v2.4.0.tar.gz" + sha256 "8949744d425743828891de6d80327ccb64b5146f71ff6c992644e6234e63930e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "49a5de0e67837102472154ebdb9ce26676d570eadf6a2180ebe9cacc32bb0526" + sha256 cellar: :any, arm64_sonoma: "b76a6858424ef6ac2dd368d3ef7dcac3203c5767aff21e0a3b12eeb6b10c264a" + sha256 cellar: :any, arm64_ventura: "18858851e6b62f275a59fd82917f88895783e7efc81ab44bd3dc8bf0e99ced57" + sha256 cellar: :any, sonoma: "5cfa710c1d1eeb449f5572a62145485b4f4f15f2bb13b481d8c8970b8a7b33de" + sha256 cellar: :any, ventura: "20518f3481290a5b5e6ea9caa2e5e41ba64b2bb3c4d75ee797cd0061c8b1ac6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a061a2d6bf59442960ee085412491903f0090062bc8145b2496537033764ea6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a6f152a6789ce2fb0139d1c576976c987aee305f5d8e902fc87c939a7fe9b4a" + 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() { + static const lxb_char_t html[] = "
Hello, World!
"; + lxb_html_document_t *document = lxb_html_document_create(); + if (document == NULL) { exit(EXIT_FAILURE); } + lxb_status_t status = lxb_html_document_parse(document, html, sizeof(html) - 1); + if (status != LXB_STATUS_OK) { exit(EXIT_FAILURE); } + lxb_html_document_destroy(document); + return EXIT_SUCCESS; + } + CPP + + system ENV.cc, "test.cpp", "-L#{lib}", "-llexbor", "-o", "test" + system "./test" + end +end diff --git a/Formula/l/lexicon.rb b/Formula/l/lexicon.rb new file mode 100644 index 0000000000000..d0f45c527e594 --- /dev/null +++ b/Formula/l/lexicon.rb @@ -0,0 +1,242 @@ +class Lexicon < Formula + include Language::Python::Virtualenv + + desc "Manipulate DNS records on various DNS providers in a standardized way" + homepage "https://github.com/AnalogJ/lexicon" + url "https://files.pythonhosted.org/packages/60/58/055f9552cafeeac094a5e0334fe0eaf4cbf8e1485cc545a26c079ca632f1/dns_lexicon-3.21.1.tar.gz" + sha256 "7cd19f692b384fe5eaa47cce334d24c78ae2eba1d2fb24d2b8a05e04fe294497" + license "MIT" + head "https://github.com/AnalogJ/lexicon.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1279e212e7a8c27715e3c5fbf79b9dd4d21ee5ea408bbb4f6f4e340363393239" + sha256 cellar: :any, arm64_sonoma: "a4b8667c85a43d053a101ce0e4ca0d6e8ae0a5c7a35f099e6dd940441f0a0427" + sha256 cellar: :any, arm64_ventura: "00190768fe6155a1e6f3109b6b02e12ce7c4697e0c7d14acfae45cde8447eb8b" + sha256 cellar: :any, sonoma: "4a95275855b9289106cfa0d8f05987867d84b02ab80de2ec7fdd3505d642b37e" + sha256 cellar: :any, ventura: "b2e57c3673c863ea7020da54b49f5459de33511179be4cfaa8454bb2a3a4f688" + sha256 cellar: :any_skip_relocation, arm64_linux: "1362360f4b26209edf99bfea8e9c62d4cad0f16f47a064e3d07c64d870e8b1c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38a8b549515e729c2cdb5baf3b10cab77e24095427fdbf6cb2945feeef7db52d" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/d8/e4/0c4c39e18fd76d6a628d4dd8da40543d136ce2d1752bd6eeeab0791f4d6b/beautifulsoup4-4.13.4.tar.gz" + sha256 "dbb3c4e1ceae6aefebdaf2423247260cd062430a410e38c66f2baa50a8437195" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/61/ce/d6fbf9cdda1b40023ef60507adc1de1d7ba0786dc73ddca59f4bed487e40/boto3-1.38.3.tar.gz" + sha256 "655d51abcd68a40a33c52dbaa2ca73fc63c746b894e2ae22ed8ddc1912ddd93f" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/92/ee/b47c0286ada750271897f5cc3e40b4405f1218ff392cd15df993893f0099/botocore-1.38.3.tar.gz" + sha256 "790f8f966201781f5fcf486d48b4492e9f734446bbf9d19ef8159d08be854243" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + 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 "jmespath" do + url "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz" + sha256 "90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" + 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/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + 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 "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/99/4b/73deb6b688ebeeca06f4d05238f3c114370bb61f9d3a3907fc929ea01e67/oci-2.150.2.tar.gz" + sha256 "5f875e8606defa9576106748a813be2b6b9cce42730151edfe14a14978948926" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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/bb/6e/9d084c929dfe9e3bfe0c6a47e31f78a25c54627d64a66e884a8bf5474f1c/prompt_toolkit-3.0.51.tar.gz" + sha256 "931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/c1/d4/1067b82c4fc674d6f6e9e8d26b3dff978da46d351ca3bac171544693e085/pyopenssl-24.3.0.tar.gz" + sha256 "49f7a019577d834746bc55c5fce6ecbcec0f2b4ec5ce1cf43a9a173b8138bb36" + end + + resource "pyotp" do + url "https://files.pythonhosted.org/packages/f3/b2/1d5994ba2acde054a443bd5e2d384175449c7d2b6d1a0614dbca3a63abfc/pyotp-2.9.0.tar.gz" + sha256 "346b6642e0dbdde3b4ff5a930b664ca82abfa116356ed48cc42c7d6590d36f63" + 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/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 "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/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/fc/9e/73b14aed38ee1f62cd30ab93cd0072dec7fb01f3033d116875ae3e7b8b44/s3transfer-0.12.0.tar.gz" + sha256 "8ac58bc1989a3fdb7c7f3ee0918a66b160d038a147c7b5db1500930a607e9a1c" + 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/fa/5a/316006203339a08d3871a1494e75e266e39ba0ccc6cf857d20e05d2fcdc8/softlayer-6.2.6.tar.gz" + sha256 "6e9d874648cbf234d49ee4f5b0829f6bcd4d706adf88318ed1b27a47debc7e5d" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/3f/f4/4a80cd6ef364b2e8b65b15816a843c0980f7a5a2b4dc701fc574952aa19f/soupsieve-2.7.tar.gz" + sha256 "ad282f9b6926286d2ead4750552c8a6142bc4c783fd66b0293547c8fe6ae126a" + end + + resource "tencentcloud-sdk-python" do + url "https://files.pythonhosted.org/packages/47/5e/666cfbdf32f04d93222d57e45a3ab9e91e89a999f8e3c09b9277fb8b64d9/tencentcloud-sdk-python-3.0.1369.tar.gz" + sha256 "613dd83cf2e41ab909190e4aa4b5fbb4298b92dc6ac1ceaf3a5e16587ed76dcd" + 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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "zeep" do + url "https://files.pythonhosted.org/packages/09/35/4a91181499a1e098cb01e04a26a053714adf2fb1c25b40fdc5f46cfe2e4f/zeep-4.3.1.tar.gz" + sha256 "f45385e9e1b09d5550e0f51ab9fa7c6842713cab7194139372fd82a99c56a06e" + end + + def install + virtualenv_install_with_resources + end + + test do + output = shell_output("#{bin}/lexicon route53 list brew.sh TXT 2>&1", 1) + assert_match "Unable to locate credentials", output + + output = shell_output("#{bin}/lexicon cloudflare create domain.net TXT --name foo --content bar 2>&1", 1) + assert_match "400 Client Error: Bad Request for url", output + + assert_match "lexicon #{version}", shell_output("#{bin}/lexicon --version") + end +end diff --git a/Formula/l/lexido.rb b/Formula/l/lexido.rb new file mode 100644 index 0000000000000..bec42481460bf --- /dev/null +++ b/Formula/l/lexido.rb @@ -0,0 +1,33 @@ +class Lexido < Formula + desc "Innovative assistant for the command-line" + homepage "https://github.com/micr0-dev/lexido" + url "https://github.com/micr0-dev/lexido/archive/refs/tags/v1.4.3.tar.gz" + sha256 "c39cf8f93cce2480773c9099ece1d8a90c1e350cf48cad56eebea96fbc04981f" + license "AGPL-3.0-or-later" + head "https://github.com/micr0-dev/lexido.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f118ba60cdf4e4e921ff03359e5e57e481f6c2178e098cd3192305c1792ba054" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a51785bc7e8fd96ff436d69daec2f2786a68e99ec94ce184d7e7caddcc84dd84" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5ca1e9acbf1452480bd301384bc7b9ac24a3465303cb8466edd0f81a2e34b5f3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4956489fa0eb3d6f1df286b265bf38740151b82fefd1712e7be166f611128b2e" + sha256 cellar: :any_skip_relocation, sonoma: "2b7dd651047def2a657583caae2eb6210bcbd838014f5d305e07f847a5e51206" + sha256 cellar: :any_skip_relocation, ventura: "0e2c3248e36b02b6e0fa26b5a200874d2c92d426f7675bafbda92506d69abdc5" + sha256 cellar: :any_skip_relocation, monterey: "38a2ef2f276bb0874d48c8ce96b783f3cc6cfe489df34cf89c81b1b9894d1001" + sha256 cellar: :any_skip_relocation, x86_64_linux: "89a7971e9b13dc59d9539c08bef80de9abb3873743315c34a5a95c640a4f5a5a" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + # Run the `lexido` command and ensure it outputs the expected error message + output = shell_output("#{bin}/lexido -l 2>&1", 1) + assert_match "Error initializing ollama: ollama not installed on system,", output + assert_match "please install it first using the guide on", output + assert_match "https://github.com/micr0-dev/lexido?tab=readme-ov-file#running-locally", output + end +end diff --git a/Formula/l/lf.rb b/Formula/l/lf.rb new file mode 100644 index 0000000000000..18d0651abb0d2 --- /dev/null +++ b/Formula/l/lf.rb @@ -0,0 +1,33 @@ +class Lf < Formula + desc "Terminal file manager" + homepage "https://godoc.org/github.com/gokcehan/lf" + url "https://github.com/gokcehan/lf/archive/refs/tags/r35.tar.gz" + sha256 "bf2ecd63eb75ceeb88f42977d49515bbd755b7f3d4db651a097c6ba47fd2d989" + license "MIT" + head "https://github.com/gokcehan/lf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bb2fd1277994cd58d26058b7b79b560563b1733f86ef7b1931afb091ea5f8929" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bb2fd1277994cd58d26058b7b79b560563b1733f86ef7b1931afb091ea5f8929" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bb2fd1277994cd58d26058b7b79b560563b1733f86ef7b1931afb091ea5f8929" + sha256 cellar: :any_skip_relocation, sonoma: "72d2ccadb950ce041d90cd51412d923023acb6be4f95a7e71b479dfc99a5e83c" + sha256 cellar: :any_skip_relocation, ventura: "72d2ccadb950ce041d90cd51412d923023acb6be4f95a7e71b479dfc99a5e83c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f19fd571e8a2c1ea5277641ed7d335078643cc7a6e7cfa40ba6a1021778f86c1" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.gVersion=#{version}") + + man1.install "lf.1" + bash_completion.install "etc/lf.bash" => "lf" + fish_completion.install "etc/lf.fish" + zsh_completion.install "etc/lf.zsh" => "_lf" + end + + test do + assert_equal version.to_s, shell_output("#{bin}/lf -version").chomp + assert_match "file manager", shell_output("#{bin}/lf -doc") + end +end diff --git a/Formula/l/lfe.rb b/Formula/l/lfe.rb new file mode 100644 index 0000000000000..0a6a667d75958 --- /dev/null +++ b/Formula/l/lfe.rb @@ -0,0 +1,38 @@ +class Lfe < Formula + desc "Concurrent Lisp for the Erlang VM" + homepage "https://lfe.io/" + url "https://github.com/lfe/lfe/archive/refs/tags/v2.2.0.tar.gz" + sha256 "5c9de979c64de245ac3ae2f9694559a116b538ca7d18bb3ef07716e0e3a696f3" + license "Apache-2.0" + head "https://github.com/lfe/lfe.git", branch: "develop" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1aee8b425cbd76428a038e8d9d1a074c2e7c3f9c2944673fd9267c77e8d154fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b7c9d4f4a7d9ba6a61e9affb3d8ec94161ac3411c14da462879c348fa59859d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e257ff304896fce1182b709f35b56112c28eba8e43ac6a149725b42917a9bab7" + sha256 cellar: :any_skip_relocation, sonoma: "ed17738b499109261be99c6cd273acf572c4b4a2ea05828aed6ebeaa076f30ec" + sha256 cellar: :any_skip_relocation, ventura: "9e047588e594f9c78f18d8be1966a1987639f98d07e57dcb47f0b2bde46e8199" + sha256 cellar: :any_skip_relocation, arm64_linux: "a8d62b19bbae7750b68d0c2a91bfb0e6c478e66cd2a5c889048d355bcfeed117" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9aceec9c08993a9e551d5b1657a2162afae1f8a248054e6eba1fc4eb5781386c" + end + + depends_on "emacs" => :build + depends_on "erlang" + + def install + system "make" + system "make", "MANINSTDIR=#{man}", "install-man" + system "make", "emacs" + + libexec.install "bin", "ebin" + bin.install_symlink (libexec/"bin").children + pkgshare.install "dev", "examples", "test" + doc.install Pathname.glob("doc/*.txt") + elisp.install Pathname.glob("emacs/*.elc") + end + + test do + system bin/"lfe", "-eval", '"(io:format \"~p\" (list (* 2 (lists:foldl #\'+/2 0 (lists:seq 1 6)))))"' + end +end diff --git a/Formula/l/lft.rb b/Formula/l/lft.rb new file mode 100644 index 0000000000000..c0022c3d2d951 --- /dev/null +++ b/Formula/l/lft.rb @@ -0,0 +1,43 @@ +class Lft < Formula + desc "Layer Four Traceroute (LFT), an advanced traceroute tool" + homepage "https://pwhois.org/lft/" + url "https://pwhois.org/dl/index.who?file=lft-3.91.tar.gz" + sha256 "aad13e671adcfc471ab99417161964882d147893a54664f3f465ec5c8398e6af" + license "VOSTROM" + + livecheck do + url :homepage + regex(/value=.*?lft[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a4af876936c86efc3ca9b7be19fb9092f3b948548fd0692cc5bc305254ccfb19" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1a390234c6e3a17e0739170ed9ebff073fdad5507c7a77f31be0effd72b16538" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d4998dceece639fbf748a880b3d4f5c7305d749c5fa32c1b414e7bc6e88c8a33" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4acd9a1fbaaafb14cd67002cf70cb78e262150995f7deea1f32c4f616de322b5" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fef7ddeb57e6b035f5eda5cf55180152cd77f531e1672a5d443fcac2e7f7d7dd" + sha256 cellar: :any_skip_relocation, sonoma: "ef489c915cebd0e098b3f7652b9560a412f7747be088d4c067186080f756e816" + sha256 cellar: :any_skip_relocation, ventura: "8f253b7dc9de81f3e984e34c5a888d6657d3768bb689f1aa0c7aabc136caef7e" + sha256 cellar: :any_skip_relocation, monterey: "4500b7cf6a00acc2b8edb3a7f608508e23e4102feddbd5bdadf6b4a9edf3066f" + sha256 cellar: :any_skip_relocation, big_sur: "d54a6ac61b9a1f7d1106dc0d8fbff8223b606baeb2ccca9a325f8f79e443fb77" + sha256 cellar: :any_skip_relocation, catalina: "c0b69000709a507f2ec0cc2ff286910e6f2629169367828cfdc26e184654f787" + sha256 cellar: :any_skip_relocation, mojave: "83d6fa2b78fb9780fecb9287407825d1731f1c91da30bb75b15f26e632e0720b" + sha256 cellar: :any_skip_relocation, high_sierra: "e0370a6053bedd5c24f62583c2d19c3d0d2fab2fa5cf9003561e60694dad8642" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4745d9fd33ab816b785c90883a2b69e0e3e70b5176246e66adff849aada2eddf" + end + + 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 + assert_match "isn't available to LFT", shell_output("#{bin}/lft -S -d 443 brew.sh 2>&1") + end +end diff --git a/Formula/l/lftp.rb b/Formula/l/lftp.rb new file mode 100644 index 0000000000000..1251d0fd49992 --- /dev/null +++ b/Formula/l/lftp.rb @@ -0,0 +1,52 @@ +class Lftp < Formula + desc "Sophisticated file transfer program" + homepage "https://lftp.yar.ru/" + url "https://github.com/lavv17/lftp/releases/download/v4.9.3/lftp-4.9.3.tar.gz" + sha256 "68116cc184ab660a78a4cef323491e89909e5643b59c7b5f0a14f7c2b20e0a29" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "275b333b0e01dc1bc87f11332d5ee33d1399d73f36e3123f97a7a16d229c5d37" + sha256 arm64_sonoma: "91e89854b82451fcd1dc6bfb2182b344adec778d5951224242aee4de60324034" + sha256 arm64_ventura: "47191323a1e714ea7534413bdc8d4dc90960cebe01cd634c85f44d100790c438" + sha256 sonoma: "e4cb328becffa3416e370bd627bbea0e29505fe162f3d1c4ff54ad1da50ebb3b" + sha256 ventura: "91432c67fc43b779976229a1c2982e4cfa32cff893d68cfe0e382fd175259ea3" + sha256 arm64_linux: "ad07c842761f21a2452fe69d76b1212725274ce09df5061bacd09ac77667b6b5" + sha256 x86_64_linux: "a4b7a6b989cdc30e9f5070e0d3669e2717e53b13984aef179035b99f0e2c2ab6" + end + + depends_on "libidn2" + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + # Work around "error: no member named 'fpclassify' in the global namespace" + if OS.mac? && MacOS.version == :high_sierra + ENV.delete("HOMEBREW_SDKROOT") + ENV.delete("SDKROOT") + end + + # Fix compile with newer Clang + # https://github.com/lavv17/lftp/issues/611 + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + "--with-readline=#{Formula["readline"].opt_prefix}", + "--with-libidn2=#{Formula["libidn2"].opt_prefix}" + + system "make", "install" + end + + test do + system bin/"lftp", "-c", "open https://ftp.gnu.org/; ls" + end +end diff --git a/Formula/l/lgeneral.rb b/Formula/l/lgeneral.rb new file mode 100644 index 0000000000000..c77ba9210fd9f --- /dev/null +++ b/Formula/l/lgeneral.rb @@ -0,0 +1,60 @@ +class Lgeneral < Formula + desc "Turn-based strategy engine heavily inspired by Panzer General" + homepage "https://lgames.sourceforge.io/LGeneral/" + url "https://downloads.sourceforge.net/lgeneral/lgeneral/lgeneral-1.4.4.tar.gz" + sha256 "0a26b495716cdcab63b49a294ba31649bc0abe74ce0df48276e52f4a6f323a95" + license "GPL-2.0-or-later" + + bottle do + rebuild 2 + sha256 arm64_sequoia: "0b33e1f556a20a71c72b472bbfa2fdd9461253d584cb97e47a9eb8173c376ea5" + sha256 arm64_sonoma: "0c3cbf2cd89161d1af99f75d4d33091f7732cc458861977f4a91eb96af230154" + sha256 arm64_ventura: "f256bf5c22611e15d3322bc501e1d877a4b2f8c1a471fe298399a255fc44490b" + sha256 sonoma: "a5f8cf09603365a6a8187b3d296d7dcba9ee1fb44993f5ef81285c145ef36995" + sha256 ventura: "7f2a5e68361f78343b88f04dae2b0ec5a0da7be4753f8c66bdcd54e02f8bd8ea" + sha256 arm64_linux: "bb380cd4fea9e821acc6f40ea22fe206fae58caed0b0ca7c437e0a03fdc4b44e" + sha256 x86_64_linux: "7839691573fb754a1c1b7e6befc77027256bcc1908b11268474e59de60de804d" + end + + depends_on "gettext" + depends_on "sdl12-compat" + depends_on "sdl2" + + def install + # Applied in community , to remove in next release + inreplace "configure", "#include ", "#include \n#include " + + args = ["--disable-silent-rules", "--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 "./configure", *args, *std_configure_args + system "make", "install" + end + + def post_install + %w[nations scenarios units sounds maps gfx].each { |dir| (pkgshare/dir).mkpath } + %w[flags units terrain].each { |dir| (pkgshare/"gfx"/dir).mkpath } + end + + def caveats + <<~EOS + Requires pg-data.tar.gz or the original DOS version of Panzer General. Can be downloaded from + https://sourceforge.net/projects/lgeneral/files/lgeneral-data/pg-data.tar.gz/download + To install use: + lgc-pg -s -d #{opt_pkgshare} + ⚠️ Note: Sound and music are not supported in this build + EOS + end + + test do + system bin/"lgeneral", "--version" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + pid = fork do + exec bin/"lgeneral" + end + sleep 3 + Process.kill "TERM", pid + end +end diff --git a/Formula/l/lgogdownloader.rb b/Formula/l/lgogdownloader.rb new file mode 100644 index 0000000000000..cc17e4d92aeb1 --- /dev/null +++ b/Formula/l/lgogdownloader.rb @@ -0,0 +1,68 @@ +class Lgogdownloader < Formula + desc "Unofficial downloader for GOG.com games" + homepage "https://sites.google.com/site/gogdownloader/" + url "https://github.com/Sude-/lgogdownloader/releases/download/v3.17/lgogdownloader-3.17.tar.gz" + sha256 "fefda26206ebb1e2a6d734b76f6f07977da150064141f29ed1f90450daf4e69e" + license "WTFPL" + revision 3 + head "https://github.com/Sude-/lgogdownloader.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?lgogdownloader[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9d9bd03b6293d5fb17fabd54655dd7600fab608240b114a460754c2407fc1296" + sha256 cellar: :any, arm64_sonoma: "49fba152c84c5e9e6e516f82a9a6366ba73548871e6564b0db48c90d9e8ec328" + sha256 cellar: :any, arm64_ventura: "692d0544791fa9386a7150277006a65c686521ff5075d9f0ae883c8799dc42c6" + sha256 cellar: :any, sonoma: "27cb3ba5d66a26fdacfbfc84f701958a72470e5e41e4aeef15232862b919fd55" + sha256 cellar: :any, ventura: "4e1cb55ac54c01e2796b2a153799af05ed69cc9adb2929fc82cfdedcc8b886b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b29ed9cb8fddf7bb558b03a5959f6686c74dff40609a75b7c03e27798a29f34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "94f0094701d17088889b2a00d2764c26b0dd0b1ff020295e4b36b996e2d65b1e" + end + + depends_on "cmake" => :build + depends_on "help2man" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "htmlcxx" + depends_on "jsoncpp" + depends_on "rhash" + depends_on "tidy-html5" + depends_on "tinyxml2" + + uses_from_macos "curl" + + def install + args = %W[ + -DJSONCPP_INCLUDE_DIR=#{Formula["jsoncpp"].opt_include} + -DBoost_INCLUDE_DIR=#{Formula["boost"].opt_include} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + require "pty" + + ENV["XDG_CONFIG_HOME"] = testpath + reader, writer = PTY.spawn(bin/"lgogdownloader", "--list", "--retries", "1") + writer.write <<~EOS + test@example.com + secret + https://auth.gog.com/auth?client_id=xxx + EOS + writer.close + lastline = "" + begin + reader.each_line { |line| lastline = line } + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + assert_equal "Galaxy: Login failed", lastline.chomp + reader.close + end +end diff --git a/Formula/l/lhasa.rb b/Formula/l/lhasa.rb new file mode 100644 index 0000000000000..96dce989c53df --- /dev/null +++ b/Formula/l/lhasa.rb @@ -0,0 +1,44 @@ +class Lhasa < Formula + desc "LHA implementation to decompress .lzh and .lzs archives" + homepage "https://fragglet.github.io/lhasa/" + url "https://github.com/fragglet/lhasa/archive/refs/tags/v0.4.0.tar.gz" + sha256 "b0ef13e6511044ecb50483b06e630eaa7867473ec563204fe0098c00beeca4f8" + license "ISC" + head "https://github.com/fragglet/lhasa.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7091b3e54583531d962d3d632496d8bb7d0fb5ee9904dda89504910ba9a1cdd4" + sha256 cellar: :any, arm64_sonoma: "ba490379926bcfe5bbff0186c4a65a0a6b5c7da25bd4b7f02ed37691466b0aed" + sha256 cellar: :any, arm64_ventura: "7e94d6c751e1ca42e17bee1949f2133cb5323691ff355881e7efeeb47e74cbcb" + sha256 cellar: :any, arm64_monterey: "73a6401a84fc6108220d4e621b974b233fd47e3f87a7ade8f4117322f0679939" + sha256 cellar: :any, arm64_big_sur: "30047c8030fb9cf3c874b2c688df088b4b992ade61566a8df0eb55dceff9fce3" + sha256 cellar: :any, sonoma: "7297a2924981f20648b56d4150485872c1230ffad2a84dec1ac4bcff8b589bea" + sha256 cellar: :any, ventura: "ff83cb798608b1449fade603eeea29336d2e26c9a6c15cd7685416c2fbd43862" + sha256 cellar: :any, monterey: "9263082424c274662632b1c8e1a1c321a6fca8ed859e0a137f795c3579b564e4" + sha256 cellar: :any, big_sur: "ebb0a2f44f7d1a50d22a7599e52f859d42773a181c41eb1abe52ac6a261626e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "11128ff960405bd86482164ee889d2a3a4523ff6e923302550c74b4889b94d00" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d2389e91a008a7fe1bf3cf80ea0398679d6fc783208261a60459b3851b65622" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + def install + system "./autogen.sh", "--prefix=#{prefix}" + system "make", "install" + end + + test do + data = [ + %w[ + 31002d6c68302d0400000004000000f59413532002836255050000865a060001666f6f0 + 50050a4810700511400f5010000666f6f0a00 + ].join, + ].pack("H*") + + pipe_output("#{bin}/lha x -", data) + assert_equal "foo\n", (testpath/"foo").read + end +end diff --git a/Formula/l/license-eye.rb b/Formula/l/license-eye.rb new file mode 100644 index 0000000000000..1635d06018829 --- /dev/null +++ b/Formula/l/license-eye.rb @@ -0,0 +1,35 @@ +class LicenseEye < Formula + desc "Tool to check and fix license headers and resolve dependency licenses" + homepage "https://github.com/apache/skywalking-eyes" + url "https://www.apache.org/dyn/closer.lua?path=skywalking/eyes/0.7.0/skywalking-license-eye-0.7.0-src.tgz" + mirror "https://archive.apache.org/dist/skywalking/eyes/0.7.0/skywalking-license-eye-0.7.0-src.tgz" + sha256 "d4663ac8222aa9610abba48670c22bb1ab4fb893bd2f9592c2efd4b6c0225b50" + license "Apache-2.0" + head "https://github.com/apache/skywalking-eyes.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "967c6117d179e994b401c6e503c477dec9b3b783a27cbcc30e69f44b7f91fbc2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "967c6117d179e994b401c6e503c477dec9b3b783a27cbcc30e69f44b7f91fbc2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "967c6117d179e994b401c6e503c477dec9b3b783a27cbcc30e69f44b7f91fbc2" + sha256 cellar: :any_skip_relocation, sonoma: "1b919d6615ed5fa1169c192a1142a853d643b93a954cd9491a199775e8127994" + sha256 cellar: :any_skip_relocation, ventura: "1b919d6615ed5fa1169c192a1142a853d643b93a954cd9491a199775e8127994" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3cdd6daeda967110aec797de72b28d868a1b8620755dfb1cdab2031a78817c8e" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/apache/skywalking-eyes/commands.version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./cmd/license-eye" + + generate_completions_from_executable(bin/"license-eye", "completion") + end + + test do + output = shell_output("#{bin}/license-eye dependency check") + assert_match "Loading configuration from file: .licenserc.yaml", output + assert_match "Config file .licenserc.yaml does not exist, using the default config", output + + assert_match version.to_s, shell_output("#{bin}/license-eye --version") + end +end diff --git a/Formula/l/licensed.rb b/Formula/l/licensed.rb new file mode 100644 index 0000000000000..fa5439725ec1d --- /dev/null +++ b/Formula/l/licensed.rb @@ -0,0 +1,71 @@ +class Licensed < Formula + desc "Cache and verify the licenses of dependencies" + homepage "https://github.com/github/licensed" + url "https://github.com/github/licensed.git", + tag: "v5.0.4", + revision: "6f7a4675fdf69647f524af3facd1d55f6f221d46" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "543bec232b40015977c4333399b598789a8f9ac60b7595ba6e7b807d03d81c67" + sha256 cellar: :any, arm64_sonoma: "3467c73fc50b835d6b2b3796690358f82dc32f32cb62a1aadcf7efe457593151" + sha256 cellar: :any, arm64_ventura: "7682dce3e7873abeb6fac39d330cfbc31fa42f2624dd9f5ab61975aa593d15d1" + sha256 cellar: :any, sonoma: "3e4f67c15d5a96ca3902b719b31fd71ffe667f73ff988a76dba79f3619ef8f78" + sha256 cellar: :any, ventura: "0b4aa564d2e769211cd7cf49606b5742b31c518c2c4a4e70d00c683452e19dff" + sha256 cellar: :any_skip_relocation, arm64_linux: "698bdaab6300aac978818d9eb3df3bf2572b6bc37d5406ff0c50a279de70e421" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c9220f30c3818fae859fc15e013631c34d0fef0ea2bec69116b5bbc9d5eeffc" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "ruby" + depends_on "xz" + + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + 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"]) + + # Avoid references to the Homebrew shims directory + shims_references = Dir[ + libexec/"extensions/**/rugged-*/gem_make.out", + libexec/"extensions/**/rugged-*/mkmf.log", + libexec/"gems/rugged-*/vendor/libgit2/build/CMakeCache.txt", + libexec/"gems/rugged-*/vendor/libgit2/build/**/CMakeFiles/**/*", + ].select { |f| File.file? f } + inreplace shims_references, + Superenv.shims_path.to_s, + "<**Reference to the Homebrew shims directory**>", + audit_result: false + end + + test do + assert_equal version.to_s, shell_output("#{bin}/licensed version").strip + + (testpath/"Gemfile").write <<~EOS + source 'https://rubygems.org/' + gem 'licensed', '#{version}' + EOS + + (testpath/".licensed.yml").write <<~YAML + name: 'test' + allowed: + - mit + YAML + + assert_match "Caching dependency records for test", shell_output("#{bin}/licensed cache") + end +end diff --git a/Formula/l/licensefinder.rb b/Formula/l/licensefinder.rb new file mode 100644 index 0000000000000..9ebc2edb50936 --- /dev/null +++ b/Formula/l/licensefinder.rb @@ -0,0 +1,55 @@ +class Licensefinder < Formula + desc "Find licenses for your project's dependencies" + homepage "https://github.com/pivotal/LicenseFinder" + # pull from git tag as gemspec uses `git ls-files` + # For versions following v7.1.0, may be able to remove 4cac18e5 patch. + url "https://github.com/pivotal/LicenseFinder.git", + tag: "v7.2.1", + revision: "00b04cb91e8ec9021c939ccfceb69d4047f4c8ca" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "79f4e016ce9a7863fb1a8af0b6d05fbddda4d7bd73e0eb88e5fcdc167c0576be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f393a73ba947c00a0a5c85d6ad643711f88b8432a8b02240e95fbc6897ae7b0c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d67039d8af9f8d4cb432b87d702b63596c32a3df5ee9873c827a2d65c73c387c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "94181e5784a74c2ce1c6ef53ca3036abfdacaf79a44c4cc0a36bacd316e57f67" + sha256 cellar: :any_skip_relocation, sonoma: "77ac7350b5c910ef956d6fac8ffe98232bce930476f6b462e8fcf31379e2254d" + sha256 cellar: :any_skip_relocation, ventura: "1c03235aa33eb51bee7344de88c4e16808a8f6283a0845c873784d37ec14a406" + sha256 cellar: :any_skip_relocation, monterey: "076664ad53828cc598b55fa5dc0177bc57fd2a808d0c0ab20d85fac4e98dd3f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "51eb4b6c26c2d5088c2f382ffff159e64d3c54b1c1cecc539200024f31217171" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f8093e28fbd29078317ad298dd33971cd32950e5c56204eb2bff5de074b6ed9" + end + + depends_on "ruby" + + # Ruby 3.3 introduced changes that mean we now need to manually require + # racc. See https://bugs.ruby-lang.org/issues/19702 for details. + # LicenseFinder versions after v7.1.0 may address this requirement. + patch do + url "https://github.com/pivotal/LicenseFinder/commit/4cac18e5c7a48f72700b8de4db97d3150637a20d.patch?full_index=1" + sha256 "7a7a9b201cd34a5f868901841ba5f144f0e75580664c8ec024792449348f5875" + end + + def install + ENV["GEM_HOME"] = libexec + system "gem", "build", "license_finder.gemspec" + system "gem", "install", "license_finder-#{version}.gem" + bin.install libexec/"bin/license_finder" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + end + + test do + ENV["GEM_PATH"] = ENV["GEM_HOME"] = testpath + ENV.prepend_path "PATH", Formula["ruby"].opt_bin + + (testpath/"Gemfile").write <<~EOS + source 'https://rubygems.org/' + gem 'license_finder', '#{version}' + gem 'racc' + EOS + + system "bundle", "install" + assert_match "license_finder, #{version}, #{license}", + shell_output(bin/"license_finder", 1) + end +end diff --git a/Formula/l/licenseplist.rb b/Formula/l/licenseplist.rb new file mode 100644 index 0000000000000..4a3c783bac558 --- /dev/null +++ b/Formula/l/licenseplist.rb @@ -0,0 +1,31 @@ +class Licenseplist < Formula + desc "License list generator of all your dependencies for iOS applications" + homepage "https://www.slideshare.net/mono0926/licenseplist-a-license-list-generator-of-all-your-dependencies-for-ios-applications" + url "https://github.com/mono0926/LicensePlist/archive/refs/tags/3.27.1.tar.gz" + sha256 "6faabde2834f2d45f6467ed34d404a8ee73dcb505f00a8f1a84c55b369a7029b" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "455aa974e950c7e0f19ea4ae8dc0666a01b663b07eea474fcb515cc20e3cad99" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ccc055b2f25c05d5f8f0c236530382463e98ea751b1136958ba8460d7fa7aa7" + sha256 cellar: :any, arm64_ventura: "d5bb44b8bacf9ef76ab5b2f97ba75586d76c5096c60617547ea76c664ec6e6b4" + sha256 cellar: :any_skip_relocation, sonoma: "88ad0ab2826148ae09d5157e172c44585d974eed16be9c9829bd2453b2dee227" + sha256 cellar: :any, ventura: "b2ff6995c345cbcc2eee53878b7740b910c88a3551504f4560ebd9c8c64e8d74" + end + + depends_on :macos + + uses_from_macos "swift" => :build, since: :sonoma # swift 6.0+ + + def install + system "swift", "build", "--disable-sandbox", "--configuration", "release" + bin.install ".build/release/license-plist" + end + + test do + (testpath/"Cartfile.resolved").write <<~EOS + github "realm/realm-swift" "v10.20.2" + EOS + assert_match "None", shell_output("#{bin}/license-plist --suppress-opening-directory") + end +end diff --git a/Formula/l/licensor.rb b/Formula/l/licensor.rb new file mode 100644 index 0000000000000..ac057cdb0f955 --- /dev/null +++ b/Formula/l/licensor.rb @@ -0,0 +1,37 @@ +class Licensor < Formula + desc "Write licenses to stdout" + homepage "https://github.com/raftario/licensor" + url "https://github.com/raftario/licensor/archive/refs/tags/v2.1.0.tar.gz" + sha256 "d061ce9fd26d58b0c6ababa7acdaf35222a4407f0b5ea9c4b78f6835527611fd" + license "MIT" + head "https://github.com/raftario/licensor.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ac1e3430727502de790d4320731f6108f02d5514a81e9577f963ce4f8294d39c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "71b1af76e7d61bd12f4386ea45b16998895aba60a4b3a2ed0403fc2d25b569e0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f184aff71bc45ecea1244c55c2f7f01271ac80a46942a3e60f176d0e86ec36f0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9e6fbe393ce18e98a319aedae21997dce223fc2979deb761d97ce4437f77b7e0" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7ad74bf60d659d3523554d44db1ab486d0eee708d13bea561afff99f167a6e46" + sha256 cellar: :any_skip_relocation, sonoma: "edca5ae2dce5225627989bf5e5ac16b479e2332974ece8ce413e23c6982eb49e" + sha256 cellar: :any_skip_relocation, ventura: "b3f3ac98e20289e69e860ca0b4508c126dda52be3facc3810177cdaf2b82fff1" + sha256 cellar: :any_skip_relocation, monterey: "3603cf3a10496131f6cdff4987b18c336b9c7b34afec1e31d722d34a58aa9187" + sha256 cellar: :any_skip_relocation, big_sur: "167b3b40cc8af7b009ef8e9e61d886dd3bc356e3197c6672cf4d59edc0bbe6db" + sha256 cellar: :any_skip_relocation, catalina: "4c7e0923605a57a9e9855f0d3f30d695af99f87baf1eb5e216797ba7f9760845" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1056cd569d727dd376987b9dba21aa0d108a4db550d7a88b2db93a87b72d2bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7cd9933ef3863a349b7e364bcd9e135606d0b7468d2fe7402c3c688a8b3afd4c" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/licensor --version") + + assert_match "MIT License", shell_output("#{bin}/licensor MIT") + assert_match "Bobby Tables", shell_output("#{bin}/licensor MIT 'Bobby Tables'") + end +end diff --git a/Formula/l/lifelines.rb b/Formula/l/lifelines.rb new file mode 100644 index 0000000000000..24465b8c1bb74 --- /dev/null +++ b/Formula/l/lifelines.rb @@ -0,0 +1,42 @@ +class Lifelines < Formula + desc "Text-based genealogy software" + homepage "https://lifelines.sourceforge.net/" + url "https://downloads.sourceforge.net/project/lifelines/lifelines/3.0.62/lifelines-3.0.62.tar.gz" + sha256 "2f00441ac0ed64aab8f76834c055e2b95600ed4c6f5845b9f6e5284ac58a9a52" + license "MIT" + + bottle do + sha256 arm64_sequoia: "1f6bdc9020d5710b880583b1282be16a381ccc06e507fa708bba260fd5a256a0" + sha256 arm64_sonoma: "c7d6412aa87b5b3926d5bd6b04db7ca8005b31420b23120f76e5322b5b314fcf" + sha256 arm64_ventura: "a47b652141dd91cf3c2f88fc0fac232b93355645ce0319b9547504c6b8244145" + sha256 arm64_monterey: "9be7a6bb235edd9eec5362c010a521403d4cb617e4ce3d18a4c94caf1df37a4d" + sha256 arm64_big_sur: "0d4bbac64c9f9bb282761727298fbe0b04c8c520a9641ae7d16cf69453a0db48" + sha256 sonoma: "80c4e7bab14f13997695abe0a742939d9c730c249ba11a357e472c7f92eafddf" + sha256 ventura: "15f81348e81a721825b03d29e15cb709a41620183d342a23322c6f3558b9aa65" + sha256 monterey: "c2cd11c23d01c15b708d86073bda0baa8b9a3891fd553ac8a31917371edcee83" + sha256 big_sur: "171cd3764cc895c2b4c7b9507a44da2aa2e13fe3a75df80af345500f81da3572" + sha256 catalina: "3aa3d5f87691e0cffd46c05c0093164d6b2ea7cf3f99099fd98b40762654751d" + sha256 mojave: "ab730940d142073ed9424d0cf480a6a752d10ec54af14c54569b23292e1e503e" + sha256 high_sierra: "95457e5f439d945c32e65a32a43a5396b8c7f33466f0c83a0671936f095d649a" + sha256 sierra: "1a974d23d51da7a7d2aedaec195291195a9eb442839a9bb9e5574ed6d8c01199" + sha256 el_capitan: "20b13125e3312866baed38e6f6ffd706a6f4a0436617e8a6055f1f776a76b9a2" + sha256 arm64_linux: "532a5dbb1bc790b73bff79343958cc3ee07ece8171406a059a86af2db1fd8edc" + sha256 x86_64_linux: "4372b0ed3cfd9ca0d9a89696a502f7ba9e989698dd7064761296dabcc47003f3" + end + + uses_from_macos "bison" => :build + 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 + assert_match version.to_s, shell_output("#{bin}/llines --version") + end +end diff --git a/Formula/l/lightgbm.rb b/Formula/l/lightgbm.rb new file mode 100644 index 0000000000000..eba7b13d2d6b4 --- /dev/null +++ b/Formula/l/lightgbm.rb @@ -0,0 +1,38 @@ +class Lightgbm < Formula + desc "Fast, distributed, high performance gradient boosting framework" + homepage "https://github.com/microsoft/LightGBM" + url "https://github.com/microsoft/LightGBM.git", + tag: "v4.6.0", + revision: "d02a01ac6f51d36c9e62388243bcb75c3b1b1774" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "af06af6e8c5957e2e0285816921478539a819d1a48f7ef9336812afaf1129bcd" + sha256 cellar: :any, arm64_sonoma: "924638eeabc00965e741df6e5444b0139dea77fee9316ea4b13aee12e43baeda" + sha256 cellar: :any, arm64_ventura: "b34c5223a88dbc4875008eb7a1f3015df5481f68a3d79b10ab7a1f6e8d74a792" + sha256 cellar: :any, sonoma: "f385bfe479b4c3c5bbe7547807124b2d9ca3b4d3866105e96f9bcaee8c199494" + sha256 cellar: :any, ventura: "80b5259b0063771afbd9d458c6fb1a4d0c8ca3e731d73eaf6386b726a331c001" + sha256 cellar: :any_skip_relocation, arm64_linux: "68e47a0dca38a807ab030626f65d442a6f89852040d6292cc8e53b181c490664" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1915c11735c5ebf8f666c1895c6f7d5430777352c10ed5eb96f7692ba18bc130" + end + + depends_on "cmake" => :build + + on_macos do + depends_on "libomp" + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples" + end + + test do + cp_r (pkgshare/"examples/regression"), testpath + cd "regression" do + system bin/"lightgbm", "config=train.conf" + end + end +end diff --git a/Formula/l/lighthouse.rb b/Formula/l/lighthouse.rb new file mode 100644 index 0000000000000..3bacf95469b3b --- /dev/null +++ b/Formula/l/lighthouse.rb @@ -0,0 +1,63 @@ +class Lighthouse < Formula + desc "Rust Ethereum 2.0 Client" + homepage "https://lighthouse.sigmaprime.io/" + url "https://github.com/sigp/lighthouse/archive/refs/tags/v6.0.1.tar.gz" + sha256 "8a8f43f099bed624318aaabbf3811e78a0171c7fb4e5e30f7e66ab70bbe40a1c" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3d954767cb910dab184563e101c3e2934e51287e6b3ba9f553b8c971793ff312" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "525081531d039db97d4c886d50c9fdf833d16e96615a9e2c7a2437c46f3f366e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2ac78b89e96056435847f5af0df3793fc282cb94a5ef17f6bf307a56ef231fdb" + sha256 cellar: :any_skip_relocation, sonoma: "b4d405ce97f4d561c210dd94989f083c23410424a55654243a4b2094777f193b" + sha256 cellar: :any_skip_relocation, ventura: "32cd06195c94fef42f6078342ab25184595d6b29a3b671db7e94ec7160c1cfcf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c67153d7446c16ed236cc6c540860604e961ab04791e1b634ec0f1d23ca26f27" + end + + depends_on "cmake" => :build + depends_on "protobuf" => :build + depends_on "rust" => :build + + uses_from_macos "llvm" => :build + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + depends_on "openssl@3" + end + + def install + ENV["PROTOC_NO_VENDOR"] = "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", "--no-default-features", *std_cargo_args(path: "./lighthouse") + end + + test do + assert_match "Lighthouse", shell_output("#{bin}/lighthouse --version") + + (testpath/"jwt.hex").write <<~EOS + d6a1572e2859ba87a707212f0cc9170f744849b08d7456fe86492cbf93807092 + EOS + + http_port = free_port + args = [ + "--execution-endpoint", "http://localhost:8551/", + "--execution-jwt", "jwt.hex", + "--allow-insecure-genesis-sync", "--http", + "--http-port=#{http_port}", "--port=#{free_port}" + ] + spawn bin/"lighthouse", "beacon_node", *args + sleep 18 + + output = shell_output("curl -sS -XGET http://127.0.0.1:#{http_port}/eth/v1/node/syncing") + assert_match "is_syncing", output + end +end diff --git a/Formula/l/lightning.rb b/Formula/l/lightning.rb new file mode 100644 index 0000000000000..0520d466be0d4 --- /dev/null +++ b/Formula/l/lightning.rb @@ -0,0 +1,63 @@ +class Lightning < Formula + desc "Generates assembly language code at run-time" + homepage "https://www.gnu.org/software/lightning/" + url "https://ftp.gnu.org/gnu/lightning/lightning-2.2.3.tar.gz" + mirror "https://ftpmirror.gnu.org/lightning/lightning-2.2.3.tar.gz" + sha256 "c045c7a33a00affbfeb11066fa502c03992e474a62ba95977aad06dbc14c6829" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "d1d35078fe7268b6f043717f1e8e855ac36bc227f78bae0ee3db7dac45cfbfb0" + sha256 cellar: :any, arm64_sonoma: "c473bf328b70cd3d6e61088ced3ecd303dbd240e86e01e3bdfa84d9f41180022" + sha256 cellar: :any, arm64_ventura: "e9068aa64aad7d959c4b20534a8b0e2cab3bc5187b5ccf66e0f800ac0fb65cad" + sha256 cellar: :any, arm64_monterey: "315b27475a274908edb9c5a9f391efacf0888d8ddea0f5b2374a07c11d888978" + sha256 cellar: :any, sonoma: "6bbab88edb452016502a26349f899eb4c4a5547b698c6496d78df6ed7c012fb8" + sha256 cellar: :any, ventura: "4b560322ed7277918cc27b34064730088f37560d0aec5f8b6e7389db5c5813c2" + sha256 cellar: :any, monterey: "149a92d3f323b5f4b52481c3eeba41aad3ba6fede45859159ac3a4de041e0a17" + sha256 cellar: :any_skip_relocation, arm64_linux: "5af0fa5ffd268c4d721624a01ee21826d6a5bbcccd277be7f12a6ce1df7f32ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f8a31092e058742cf79549bb7d50979296326151bec52214ea580dc823748a20" + end + + depends_on "binutils" => :build + + # upstream patch for fixing `Correct wrong ifdef causing missing mprotect call if NDEBUG is not defined` + patch do + url "https://git.savannah.gnu.org/cgit/lightning.git/patch/?id=bfd695a94668861a9447b29d2666f8b9c5dcd5bf" + sha256 "a049de1c08a3d2d364e7f10e9c412c69a68cbf30877705406cf1ee7c4448f3c5" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + test do + # from https://www.gnu.org/software/lightning/manual/lightning.html#incr + (testpath/"test.c").write <<~C + #include + #include + static jit_state_t *_jit; + typedef int (*pifi)(int); + int main(int argc, char *argv[]) { + jit_node_t *in; + pifi incr; + init_jit(argv[0]); + _jit = jit_new_state(); + jit_prolog(); + in = jit_arg(); + jit_getarg(JIT_R0, in); + jit_addi(JIT_R0, JIT_R0, 1); + jit_retr(JIT_R0); + incr = jit_emit(); + jit_clear_state(); + printf("%d + 1 = %d\\n", 5, incr(5)); + jit_destroy_state(); + finish_jit(); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-llightning", "-o", "test" + system "./test" + end +end diff --git a/Formula/l/lighttpd.rb b/Formula/l/lighttpd.rb new file mode 100644 index 0000000000000..3db903abd47c0 --- /dev/null +++ b/Formula/l/lighttpd.rb @@ -0,0 +1,104 @@ +class Lighttpd < Formula + desc "Small memory footprint, flexible web-server" + homepage "https://www.lighttpd.net/" + url "https://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.79.tar.xz" + sha256 "3b29a625b3ad88702d1fea4f5f42bb7d87488f2e4efc977d7f185329ca6084bd" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?lighttpd[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "50c419b3361e407c1956497d53960b05a72a448093882a1e53dc3805346d021b" + sha256 arm64_sonoma: "07e2f69e04f336b621075b886a5a288b67b3ca6858c0ad5fc7346f3f4666b925" + sha256 arm64_ventura: "d11b6b1f78f2859fe5f9b02430270ca7f2d20ac163c351559d14a9db928015c3" + sha256 sonoma: "5aa2eee0ea627f8cacbdec4fee3a2e0817d0e8b685d4e5962369b9111b280b69" + sha256 ventura: "6ebfd055d75b29c1bc064b8ac17af12b3b5b2a8f1a72805ec0e0a8792298fbc4" + sha256 arm64_linux: "5107665d7c99118c795ab233c6c2d61d4a64ec47614f855d1160d066f0ee8ef4" + sha256 x86_64_linux: "733e3515ee988266ce1c34b49350c844b9bd0a7f810a8d266b7f6bff3290e2d4" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "openldap" + depends_on "openssl@3" + depends_on "pcre2" + + uses_from_macos "bzip2" + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + # default max. file descriptors; this option will be ignored if the server is not started as root + MAX_FDS = 512 + + def install + args = %W[ + --disable-silent-rules + --sbindir=#{bin} + --with-bzip2 + --with-ldap + --with-openssl + --without-pcre + --with-pcre2 + --with-zlib + ] + + # autogen must be run, otherwise prebuilt configure may complain + # about a version mismatch between included automake and Homebrew's + system "./autogen.sh" + system "./configure", *args, *std_configure_args + system "make", "install" + + unless File.exist? etc/"lighttpd" + (etc/"lighttpd").install "doc/config/lighttpd.conf", "doc/config/lighttpd.annotated.conf", + "doc/config/modules.conf" + (etc/"lighttpd/conf.d/").install Dir["doc/config/conf.d/*.conf"] + inreplace etc + "lighttpd/lighttpd.annotated.conf" do |s| + s.sub!(/^var\.log_root\s*=\s*".+"$/, "var.log_root = \"#{var}/log/lighttpd\"") + s.sub!(/^var\.server_root\s*=\s*".+"$/, "var.server_root = \"#{var}/www\"") + s.sub!(/^var\.state_dir\s*=\s*".+"$/, "var.state_dir = \"#{var}/lighttpd\"") + s.sub!(/^var\.home_dir\s*=\s*".+"$/, "var.home_dir = \"#{var}/lighttpd\"") + s.sub!(/^var\.conf_dir\s*=\s*".+"$/, "var.conf_dir = \"#{etc}/lighttpd\"") + s.sub!(/^#server\.port\s*=\s*80$/, "server.port = 8080") + s.sub!(%r{^server\.document-root\s*=\s*server_root \+ "/htdocs"$}, "server.document-root = server_root") + + s.sub!(/^server\.username\s*=\s*".+"$/, 'server.username = "_www"') + s.sub!(/^server\.groupname\s*=\s*".+"$/, 'server.groupname = "_www"') + s.sub!(/^#server\.network-backend\s*=\s*"sendfile"$/, 'server.network-backend = "writev"') + + # "max-connections == max-fds/2", + # https://redmine.lighttpd.net/projects/1/wiki/Server_max-connectionsDetails + s.sub!(/^#server\.max-connections = .+$/, "server.max-connections = " + (MAX_FDS / 2).to_s) + end + end + + (var/"log/lighttpd").mkpath + (var/"www/htdocs").mkpath + (var/"lighttpd").mkpath + end + + def caveats + <<~EOS + Docroot is: #{var}/www + + The default port has been set in #{etc}/lighttpd/lighttpd.conf to 8080 so that + lighttpd can run without sudo. + EOS + end + + service do + run [opt_bin/"lighttpd", "-D", "-f", etc/"lighttpd/lighttpd.conf"] + keep_alive false + error_log_path var/"log/lighttpd/output.log" + log_path var/"log/lighttpd/output.log" + working_dir HOMEBREW_PREFIX + end + + test do + system bin/"lighttpd", "-t", "-f", etc/"lighttpd/lighttpd.conf" + end +end diff --git a/Formula/l/lilv.rb b/Formula/l/lilv.rb new file mode 100644 index 0000000000000..7955478cb4d18 --- /dev/null +++ b/Formula/l/lilv.rb @@ -0,0 +1,66 @@ +class Lilv < Formula + desc "C library to use LV2 plugins" + homepage "https://drobilla.net/software/lilv.html" + url "https://download.drobilla.net/lilv-0.24.26.tar.xz" + sha256 "22feed30bc0f952384a25c2f6f4b04e6d43836408798ed65a8a934c055d5d8ac" + license "ISC" + + livecheck do + url "https://download.drobilla.net/" + regex(/href=.*?lilv[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "3d7ca1236fe7b85cce89cbe85925978028bf312d872e59be8adbba6db9d4b2e3" + sha256 cellar: :any, arm64_sonoma: "9123841283fe4c867f2ba7f393c8b09668ce3cc4d2bffa1ba401c5c6f6f48e0b" + sha256 cellar: :any, arm64_ventura: "d431fdcb61334aa6cc1c87690d60fb8c7c797323ee1367a76f7dc21d90191897" + sha256 cellar: :any, sonoma: "7b52532cfaf18e979cba4759c99b09613da4a5a26dac78961fe2f3f49ce3f240" + sha256 cellar: :any, ventura: "60b045f4327237d0bc4913bfd0f5628efb2c19a86a26f939eb65100a0aa2da4c" + sha256 arm64_linux: "7ba6affd762fbf6e51a685e9c1eb5e763a820ead40d96f1d3eb9e744378ebed2" + sha256 x86_64_linux: "061f4cfac8ca9ea8567fd399f092805e3ec13a29403e36e46345d371d3103447" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "libsndfile" + depends_on "lv2" + depends_on "serd" + depends_on "sord" + depends_on "sratom" + depends_on "zix" + + def python3 + "python3.13" + end + + def install + # FIXME: Meson tries to install into `prefix/HOMEBREW_PREFIX/lib/pythonX.Y/site-packages` + # without setting `python.*libdir`. + prefix_site_packages = prefix/Language::Python.site_packages(python3) + system "meson", "setup", "build", "-Dtests=disabled", + "-Dbindings_py=enabled", + "-Dtools=enabled", + "-Dpython.platlibdir=#{prefix_site_packages}", + "-Dpython.purelibdir=#{prefix_site_packages}", + *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) { + LilvWorld* const world = lilv_world_new(); + lilv_world_free(world); + } + C + system ENV.cc, "test.c", "-I#{include}/lilv-0", "-L#{lib}", "-llilv-0", "-o", "test" + system "./test" + + system python3, "-c", "import lilv" + end +end diff --git a/Formula/l/lilypond.rb b/Formula/l/lilypond.rb new file mode 100644 index 0000000000000..8ced711f42078 --- /dev/null +++ b/Formula/l/lilypond.rb @@ -0,0 +1,127 @@ +class Lilypond < Formula + desc "Music engraving system" + homepage "https://lilypond.org/" + url "https://lilypond.org/download/sources/v2.24/lilypond-2.24.4.tar.gz" + sha256 "e96fa03571c79f20e1979653afabdbe4ee42765a3d9fd14953f0cd9eea51781c" + license all_of: [ + "GPL-3.0-or-later", + "GPL-3.0-only", + "OFL-1.1-RFN", + "GFDL-1.3-no-invariants-or-later", + :public_domain, + "MIT", + "AGPL-3.0-only", + "LPPL-1.3c", + ] + + livecheck do + url "https://lilypond.org/source.html" + regex(/href=.*?lilypond[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "186ccba4e185bdb0160e66bc68c4e70594d77b9d18a863718886667817b0f8b0" + sha256 arm64_sonoma: "80da0e56c2e27506e4a82b7cfcdfe9ca5e819ce2a52bc9c1cbdcc597557862db" + sha256 arm64_ventura: "38a76fb76615646d4b43b6578d368fac8daee24834dc049ea0f50ffaeca73b33" + sha256 sonoma: "b31020b0176335c832d55556e5709b45b54ac04b2c0d04129d16a6a25ef8e6e7" + sha256 ventura: "a4112ff2f62a0b79a6de8ba3c34db2167d0076949ac617eeb81f9335dd461607" + sha256 arm64_linux: "23b8fdf9318178b066af933b4a82a96438d6a0096d368dd213544e13b9f67e50" + sha256 x86_64_linux: "d3bd2174c750e48ee24e19959f3587eaeaca0e155ba8d8dc973e3d43511d89d5" + end + + head do + url "https://gitlab.com/lilypond/lilypond.git", branch: "master" + mirror "https://github.com/lilypond/lilypond.git" + mirror "https://git.savannah.gnu.org/git/lilypond.git" + + depends_on "autoconf" => :build + depends_on "make" => :build # make >= 4.2 is required + end + + depends_on "bison" => :build # bison >= 2.4.1 is required + depends_on "fontforge" => :build + depends_on "pkgconf" => :build + depends_on "t1utils" => :build + depends_on "texinfo" => :build # makeinfo >= 6.1 is required + depends_on "texlive" => :build + depends_on "bdw-gc" + depends_on "fontconfig" + depends_on "freetype" + depends_on "ghostscript" + depends_on "glib" + depends_on "guile" + depends_on "pango" + depends_on "python@3.13" + + uses_from_macos "flex" => :build + uses_from_macos "perl" => :build + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "gettext" => :build + end + + resource "font-urw-base35" do + url "https://github.com/ArtifexSoftware/urw-base35-fonts/archive/refs/tags/20200910.tar.gz" + sha256 "e0d9b7f11885fdfdc4987f06b2aa0565ad2a4af52b22e5ebf79e1a98abd0ae2f" + end + + def install + system "./autogen.sh", "--noconfigure" if build.head? + + system "./configure", "--datadir=#{share}", + "--disable-documentation", + *("--with-flexlexer-dir=#{Formula["flex"].include}" if OS.linux?), + "GUILE_FLAVOR=guile-3.0", + *std_configure_args + + system "make" + system "make", "install" + + system "make", "bytecode" + system "make", "install-bytecode" + + elisp.install share.glob("emacs/site-lisp/*.el") + + fonts = pkgshare/(build.head? ? File.read("out/VERSION").chomp : version)/"fonts/otf" + + resource("font-urw-base35").stage do + ["C059", "NimbusMonoPS", "NimbusSans"].each do |name| + Dir["fonts/#{name}-*.otf"].each do |font| + fonts.install font + end + end + end + + ["cursor", "heros", "schola"].each do |name| + cp Dir[Formula["texlive"].share/"texmf-dist/fonts/opentype/public/tex-gyre/texgyre#{name}-*.otf"], fonts + end + end + + test do + (testpath/"test.ly").write "\\relative { c' d e f g a b c }" + system bin/"lilypond", "--loglevel=ERROR", "test.ly" + assert_path_exists testpath/"test.pdf" + + output = shell_output("#{bin}/lilypond --define-default=show-available-fonts 2>&1") + .encode("UTF-8", invalid: :replace, replace: "\ufffd") + common_styles = ["Regular", "Bold", "Italic", "Bold Italic"] + { + "C059" => ["Roman", *common_styles[1..]], + "Nimbus Mono PS" => common_styles, + "Nimbus Sans" => common_styles, + "TeX Gyre Cursor" => common_styles, + "TeX Gyre Heros" => common_styles, + "TeX Gyre Schola" => common_styles, + }.each do |family, styles| + styles.each do |style| + assert_match(/^\s*#{family}:style=#{style}$/, output) + end + end + end +end diff --git a/Formula/l/lima.rb b/Formula/l/lima.rb new file mode 100644 index 0000000000000..691561b5820fa --- /dev/null +++ b/Formula/l/lima.rb @@ -0,0 +1,49 @@ +class Lima < Formula + desc "Linux virtual machines" + homepage "https://lima-vm.io/" + url "https://github.com/lima-vm/lima/archive/refs/tags/v1.0.7.tar.gz" + sha256 "90f682e96a370c342c3b16deb1858f37ee28ce88e888e1d6b2634ba24228fdbb" + license "Apache-2.0" + head "https://github.com/lima-vm/lima.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7a99cf98dbfdbd0b3ad62f4d84640c5cfcef5242cbaa4b8d043c1d12c41809b0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fd766f555146d659f9841554a8270e704156b48ae3502c584b0e1f4af076688a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "69ef12a79d1a2057073cdb7e659d6f903fc02cb816f49c856e032df853b549fa" + sha256 cellar: :any_skip_relocation, sonoma: "bfabc4017b8412a0d6d69445c2a398a387af58c5b5c232542d07689d00e1c345" + sha256 cellar: :any_skip_relocation, ventura: "2f04d37e54c94d413434f5e0ac74f52d7c2714df72f12198e86545b7aa71310d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b6385e14aa7c7b095f780d3143121353dd63383cac97f050e0b45e86ea7975ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7dee156f0206d0ddb735d4da04a1eeade34799dd9b5e37db32da404a14fb49cf" + end + + depends_on "go" => :build + + on_linux do + depends_on "qemu" + end + + def install + if build.head? + system "make" + else + # VERSION has to be explicitly specified when building from tar.gz, as it does not contain git tags + system "make", "VERSION=#{version}" + end + + bin.install Dir["_output/bin/*"] + share.install Dir["_output/share/*"] + + # Install shell completions + generate_completions_from_executable(bin/"limactl", "completion") + end + + test do + info = JSON.parse shell_output("#{bin}/limactl info") + # Verify that the VM drivers are compiled in + assert_includes info["vmTypes"], "qemu" + assert_includes info["vmTypes"], "vz" if OS.mac? + # Verify that the template files are installed + template_names = info["templates"].map { |x| x["name"] } + assert_includes template_names, "default" + end +end diff --git a/Formula/l/limbo.rb b/Formula/l/limbo.rb new file mode 100644 index 0000000000000..8e62e3e0da1ff --- /dev/null +++ b/Formula/l/limbo.rb @@ -0,0 +1,54 @@ +class Limbo < Formula + desc "Interactive SQL shell for Limbo" + homepage "https://github.com/tursodatabase/limbo" + url "https://github.com/tursodatabase/limbo/archive/refs/tags/v0.0.20.tar.gz" + sha256 "1b5bde3f8ee0a5ea54eb33dea27df9c86c8b226dec01d74dce62c990fe5589cd" + license "MIT" + head "https://github.com/tursodatabase/limbo.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "151ce76e01f46e828b333da56e5120a4e10c3a027d4b49d53b4de714ee3a5247" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "86d6cab373448e8a7c3200633ccae438b49da6a72d8aa2d1ba6c6b2cacc4a731" + sha256 cellar: :any_skip_relocation, arm64_ventura: "189ddde739900ae00b7b95742167f5d69bfb9c3fa9e65d02d58a325920738bee" + sha256 cellar: :any_skip_relocation, sonoma: "9c67d54ad8fa5c62511973d7f28b9601027872edd8c72e3188566dff42696865" + sha256 cellar: :any_skip_relocation, ventura: "d9eb614c8b11174ee05f49459bb3848f16f5821949c62c8a657b3d3cb6d9953d" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f4094731275793859efdfacb07ef6f87a56690c015f9a4007010f2c056298c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "14f48085d8fb88fda947b9ed250c5ef42cfee504f1845eac283f082d1186cb3c" + end + + depends_on "rust" => :build + uses_from_macos "sqlite" => :test + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + end + + test do + assert_match version.to_s, shell_output("#{bin}/limbo --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/"limbo", "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/l/limesuite.rb b/Formula/l/limesuite.rb new file mode 100644 index 0000000000000..e696796254e92 --- /dev/null +++ b/Formula/l/limesuite.rb @@ -0,0 +1,53 @@ +class Limesuite < Formula + desc "Device drivers utilities, and interface layers for LimeSDR" + homepage "https://myriadrf.org/projects/software/lime-suite/" + url "https://github.com/myriadrf/LimeSuite/archive/refs/tags/v23.11.0.tar.gz" + sha256 "fd8a448b92bc5ee4012f0ba58785f3c7e0a4d342b24e26275318802dfe00eb33" + license "Apache-2.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sonoma: "412a1287101507e62517f810b903e5dfd619fd0ccac3c23c6fe5e8580221b0b1" + sha256 cellar: :any, arm64_ventura: "26c22dc6a7143e5006e5d5ccf28ce807b5e77c4a66648aec9b7afc529c38f1ae" + sha256 cellar: :any, sonoma: "a0c8528c441e6f09eb54397549907bc5481fc96a24e3853683807e450111dc1f" + sha256 cellar: :any, ventura: "500ddb9fa793b9cf9b85945b0459e70199b1ece8afc9220bcd312e42b011d962" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61e7dc45e90a1e1237bc7f423548a8af0760fe61bb473469fea5de0ab5d4a624" + end + + depends_on "cmake" => :build + depends_on "fltk" + depends_on "gnuplot" + depends_on "libusb" + depends_on "soapysdr" + uses_from_macos "sqlite" + + def install + args = %W[ + -DENABLE_OCTAVE=OFF + -DENABLE_SOAPY_LMS7=ON + -DENABLE_STREAM=ON + -DENABLE_GUI=ON + -DENABLE_DESKTOP=ON + -DENABLE_LIME_UTIL=ON + -DENABLE_QUICKTEST=ON + -DENABLE_NOVENARF7=ON + -DENABLE_MCU_TESTBENCH=OFF + -DENABLE_API_DOXYGEN=OFF + -DDOWNLOAD_IMAGES=TRUE + -DLIME_SUITE_EXTVER=release + -DLIME_SUITE_ROOT='#{HOMEBREW_PREFIX}' + -DSOAPY_SDR_ROOT=#{HOMEBREW_PREFIX} + -DCMAKE_INSTALL_RPATH=#{rpath} + -DCMAKE_INSTALL_NAME_DIR=#{lib} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "Checking driver 'lime'... PRESENT", + shell_output("#{Formula["soapysdr"].bin}/SoapySDRUtil --check=lime") + end +end diff --git a/Formula/l/link-grammar.rb b/Formula/l/link-grammar.rb new file mode 100644 index 0000000000000..cf11b42831b29 --- /dev/null +++ b/Formula/l/link-grammar.rb @@ -0,0 +1,53 @@ +class LinkGrammar < Formula + desc "Carnegie Mellon University's link grammar parser" + homepage "https://github.com/opencog/link-grammar" + url "https://github.com/opencog/link-grammar/archive/refs/tags/link-grammar-5.12.5.tar.gz" + sha256 "04d04c6017a99f38e1cef1fee8238d2c444fffc90989951cfd64331f156d0340" + license "LGPL-2.1-or-later" + head "https://github.com/opencog/link-grammar.git", branch: "master" + + bottle do + rebuild 1 + sha256 arm64_sequoia: "b26e4fb3730ac1335febb636248f4a6dcf31b76b328a49ff7404e3586d9d4a51" + sha256 arm64_sonoma: "5563be9ea4470cc7ae91162e1c545eb00f6ea20a942750233c4723d0a8a09bc1" + sha256 arm64_ventura: "094dbdda6530047c3088035b5b16c9315b43c1e6252fcbcbbbb706c075dc1487" + sha256 sonoma: "a6ef066ddfc0d3bb883ca2b8344f2a54d293d1c418856a9e607735a0230de93f" + sha256 ventura: "87d8eeae3531cc7a818c7667df6856941cafa353fc71c38edcfa2c5462da7268" + sha256 arm64_linux: "4dce0e98628d42ff1cb3df7ac9f73a37b96c5d28f43e82cb37740ea35a527f6b" + sha256 x86_64_linux: "46e825822f99d43ea7eeab2751ba0e4bc36a63de3dbfed1446cb5639b5814fe1" + end + + depends_on "ant" => :build + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :build + depends_on "swig" => :build + + uses_from_macos "flex" => :build + uses_from_macos "libedit" + uses_from_macos "sqlite" + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + ENV["PYTHON_LIBS"] = "-undefined dynamic_lookup" + inreplace "bindings/python/Makefile.am", "$(PYTHON_LDFLAGS) -module -no-undefined", + "$(PYTHON_LDFLAGS) -module" + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--with-regexlib=c", *std_configure_args + + # Work around error due to install using detected path inside Python formula. + # install: .../site-packages/linkgrammar.pth: Operation not permitted + site_packages = prefix/Language::Python.site_packages("python3.13") + system "make", "install", "pythondir=#{site_packages}", + "pyexecdir=#{site_packages}" + end + + test do + system bin/"link-parser", "--version" + end +end diff --git a/Formula/l/linkerd.rb b/Formula/l/linkerd.rb new file mode 100644 index 0000000000000..d7456ef15d709 --- /dev/null +++ b/Formula/l/linkerd.rb @@ -0,0 +1,53 @@ +class Linkerd < Formula + desc "Command-line utility to interact with linkerd" + homepage "https://linkerd.io/" + url "https://github.com/linkerd/linkerd2.git", + tag: "stable-2.14.10", + revision: "1ea6b271718f90182bdf747490895784988e980e" + license "Apache-2.0" + head "https://github.com/linkerd/linkerd2.git", branch: "main" + + livecheck do + url :stable + regex(/^stable[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "38c1c491271ea2f1e76a50c01f919f24528b409311a6c5e0b5801b8d7b4df78e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4dd8a49fcb56e1eab62825fa310ffe6966d9aac27ebf4356b0f2be56ccb7d2ca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ecd3045e2d699c0bb1a16619ec5b045fae1d92293a3276c754354c3d201cc2aa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e5e275b3c5a026354bc0db5683f6044b75e551dafc0d40dd70144a9bc374b61c" + sha256 cellar: :any_skip_relocation, sonoma: "a805f780856c04434e1cf56bf9722ff2d72e78ccbd4cd2bfec4b4667dca06084" + sha256 cellar: :any_skip_relocation, ventura: "e5c1ac2ba88949aa2e98ca4e39d5532a33d14cfad608d8776bb2f10e47cd4f8e" + sha256 cellar: :any_skip_relocation, monterey: "0d982f58ff4958cc8a9cfabb65325d72dceb0c01c3b2c6200473868fb526a650" + sha256 cellar: :any_skip_relocation, arm64_linux: "77bc80d5bd80767167b7895ab1afb69da5b45ef309cbd29db4956208ed8af55a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1695ba96f330ebb2cfe3267a5e3cb4e77b092410ac9dac2465a977317d00945" + end + + depends_on "go" => :build + + # upstream PR to bump go to v1.22, https://github.com/linkerd/linkerd2/pull/12114 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/8e0c96d6f54eb3e6b6a690b7800995f3a3a6bb9c/linkerd/stable-2.14.10.patch" + sha256 "0d634f7ca5036e75435a10318f3e6a7d6a5c40ee0c21689a5f1814dbc5ba6911" + end + + def install + ENV["CI_FORCE_CLEAN"] = "1" + + system "bin/build-cli-bin" + bin.install Dir["target/cli/*/linkerd"] + + generate_completions_from_executable(bin/"linkerd", "completion") + end + + test do + run_output = shell_output("#{bin}/linkerd 2>&1") + assert_match "linkerd manages the Linkerd service mesh.", run_output + + version_output = shell_output("#{bin}/linkerd version --client 2>&1") + assert_match "Client version: #{stable.specs[:tag]}", version_output + + system bin/"linkerd", "install", "--ignore-cluster" + end +end diff --git a/Formula/l/linklint.rb b/Formula/l/linklint.rb new file mode 100644 index 0000000000000..26648ee95d692 --- /dev/null +++ b/Formula/l/linklint.rb @@ -0,0 +1,25 @@ +class Linklint < Formula + desc "Link checker and web site maintenance tool" + homepage "http://linklint.org/" + url "http://linklint.org/download/linklint-2.3.5.tar.gz" + sha256 "ecaee456a3c2d6a3bd18a580d6b09b6b7b825df3e59f900270fe3f84ec3ac9c7" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ef392eb8173eedd8caad7b9ac1d3aa0354fe9aeec2c6fe902b02bf1e9966518a" + end + + deprecate! date: "2024-08-03", because: :repo_removed + + def install + mv "READ_ME.txt", "README" + + doc.install "README" + bin.install "linklint-#{version}" => "linklint" + end + + test do + (testpath/"index.html").write('Home') + system bin/"linklint", "/" + end +end diff --git a/Formula/l/links.rb b/Formula/l/links.rb new file mode 100644 index 0000000000000..66a8a1f6f0e16 --- /dev/null +++ b/Formula/l/links.rb @@ -0,0 +1,43 @@ +class Links < Formula + desc "Lynx-like WWW browser that supports tables, menus, etc." + homepage "http://links.twibright.com/" + url "http://links.twibright.com/download/links-2.30.tar.bz2" + sha256 "c4631c6b5a11527cdc3cb7872fc23b7f2b25c2b021d596be410dadb40315f166" + license "GPL-2.0-or-later" => { with: "openvpn-openssl-exception" } + + livecheck do + url "http://links.twibright.com/download.php" + regex(/Current version is v?(\d+(?:\.\d+)+)\. /i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8b643d830760363e4ff40491b2c1476dfdd28cdfbf1d2290f6a33ef8b025f717" + sha256 cellar: :any, arm64_sonoma: "b73e7b5fcce9fa2b81c1d05c3ad32e5e891c548f5c4980e6e44e674930680f5b" + sha256 cellar: :any, arm64_ventura: "1e3c4427a90752290d9277535ed94089b9ecef307afa6d8853c643b4e9b01fd3" + sha256 cellar: :any, arm64_monterey: "5a1c32ba972a310b39aea75b5025652f0dfac0e673b0a72ac201ca98b9afd0e1" + sha256 cellar: :any, sonoma: "5a3d86b0541eb8d09cb5b704967a44a8b78f691185b678096ff1cb82c019a2dd" + sha256 cellar: :any, ventura: "9ccae93d12e61c3c65069c915d5fef38e61f8f40d3e984de2b4a3867d55b3106" + sha256 cellar: :any, monterey: "4f077dd57e8eab5969cf9382c5a262eaba325b48fa68e8ad8f9221bebedeab43" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f2ee4a9703ed6de5122fac5f7b4ad3bf81853366f500e3487dffde0025c03e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4e5d1f0bddfee851800eedbefc4a4e97d7563cc00910ecf74ddcdce4b56a415" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "./configure", "--mandir=#{man}", + "--with-ssl=#{Formula["openssl@3"].opt_prefix}", + "--without-lzma", + *std_configure_args + system "make", "install" + doc.install Dir["doc/*"] + end + + test do + system bin/"links", "-dump", "https://duckduckgo.com/" + end +end diff --git a/Formula/l/linode-cli.rb b/Formula/l/linode-cli.rb new file mode 100644 index 0000000000000..e79b995461b84 --- /dev/null +++ b/Formula/l/linode-cli.rb @@ -0,0 +1,129 @@ +class LinodeCli < Formula + include Language::Python::Virtualenv + + desc "CLI for the Linode API" + homepage "https://github.com/linode/linode-cli" + url "https://files.pythonhosted.org/packages/4c/b8/f65c0d0c578fc5c7e0fa85aa62c5da6fb60ecc661d54672b72c01602df26/linode_cli-5.57.1.tar.gz" + sha256 "ed5a338ca8c1a0db36710d04f169d6563f3359d6f728796c70852d71ce0fbe8e" + license "BSD-3-Clause" + head "https://github.com/linode/linode-cli.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f26ad5d56e16125ef42b100ebe11411d7bd806b6a8b23762fd88dc9cf1976908" + sha256 cellar: :any, arm64_sonoma: "d9aa4b0ac9912b19e8452c28607052ae037a793b51d5b8b0489b8f441bcbc332" + sha256 cellar: :any, arm64_ventura: "c921d403bc8f5557c880664f56f105b2299bbfbd6e00d043a1a9686acc51f692" + sha256 cellar: :any, sonoma: "0a17b48c1719e7c080dc68909d3a42a4e0df3c3718361213ab213cde919661de" + sha256 cellar: :any, ventura: "422e4cccdb44913f39e0ae6b593a90ac74bb6eb1cee6c4e25bb01aba45732168" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa09fcb2501cb07798d264d83fd93939c8bb21fee84402c73d13030a7b45e50d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37ddec4541b30490a9263cc443a558705ba5ab164256b3543630e62af7ad48c9" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + 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 "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 "linode-metadata" do + url "https://files.pythonhosted.org/packages/37/d0/648f568aac2d016bc3c8c7e88934181d679d84c49dcd808b2398f0eddb5f/linode_metadata-0.3.0.tar.gz" + sha256 "6450aff5fe216e205a26e2afcecfc1185a0ffa6005c156bc385176d9bdb6be82" + 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 "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "openapi3" do + url "https://files.pythonhosted.org/packages/94/0a/e7862c7870926ecb86d887923e36b7853480a2a97430162df1b972bd9d5b/openapi3-1.8.2.tar.gz" + sha256 "a21a490573d89ca69ada7cbe585adb2fca4964257f6f3a1df531f12815455d2c" + 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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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 "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + def install + virtualenv_install_with_resources + generate_completions_from_executable(bin/"linode-cli", "completion", shells: [:bash, :fish]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/linode-cli --version") + + require "securerandom" + random_token = SecureRandom.hex(32) + with_env( + LINODE_CLI_TOKEN: random_token, + ) do + json_text = shell_output("#{bin}/linode-cli regions view --json us-east") + region = JSON.parse(json_text)[0] + assert_equal region["id"], "us-east" + assert_equal region["country"], "us" + end + end +end diff --git a/Formula/l/linux-headers@4.4.rb b/Formula/l/linux-headers@4.4.rb new file mode 100644 index 0000000000000..56b01bbf5d7bc --- /dev/null +++ b/Formula/l/linux-headers@4.4.rb @@ -0,0 +1,26 @@ +class LinuxHeadersAT44 < Formula + desc "Header files of the Linux kernel" + homepage "https://kernel.org/" + url "https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.302.tar.gz" + sha256 "66271f9d9fce8596622e8154ca0ea160e46b78a5a6c967a15b55855f744d1b0b" + license "GPL-2.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "b809f68c023e71c860af7b6fa6f57f6e3e55130fc69b20fc42f8c4c9685b7b3e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b2ca7202c544d6a14778915175fc811e370cd7a5249c6d0216c83d78cc421ed" + end + + keg_only :versioned_formula + + depends_on :linux + + def install + system "make", "headers_install", "INSTALL_HDR_PATH=#{prefix}" + rm Dir[prefix/"**/{.install,..install.cmd}"] + end + + test do + assert_match "KERNEL_VERSION", File.read(include/"linux/version.h") + end +end diff --git a/Formula/l/linux-headers@5.15.rb b/Formula/l/linux-headers@5.15.rb new file mode 100644 index 0000000000000..8d95ff8c5866c --- /dev/null +++ b/Formula/l/linux-headers@5.15.rb @@ -0,0 +1,33 @@ +class LinuxHeadersAT515 < Formula + desc "Header files of the Linux kernel" + homepage "https://kernel.org/" + url "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.182.tar.gz" + sha256 "eb4fe85945691cb705bac0e58564b8991e3ef7707eb0c1bf60def62f879d5556" + license "GPL-2.0-only" + + livecheck do + url :homepage + regex(/href=.*?linux[._-]v?(5\.15(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "c148928c9cb84159a5f35fbb8b980a79684e1926e12eabb04d914b8ab4dd1b98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33f742cffed587c14dcca8cc34f4993c5bb707c39356ff53612a0f0891264159" + end + + depends_on :linux + + def install + system "make", "headers" + + cd "usr/include" do + Pathname.glob("**/*.h").each do |header| + (include/header.dirname).install header + end + end + end + + test do + assert_match "KERNEL_VERSION", (include/"linux/version.h").read + end +end diff --git a/Formula/l/linux-pam.rb b/Formula/l/linux-pam.rb new file mode 100644 index 0000000000000..763ea6fd06a8d --- /dev/null +++ b/Formula/l/linux-pam.rb @@ -0,0 +1,33 @@ +class LinuxPam < Formula + desc "Pluggable Authentication Modules for Linux" + homepage "https://github.com/linux-pam/linux-pam" + url "https://github.com/linux-pam/linux-pam/releases/download/v1.7.0/Linux-PAM-1.7.0.tar.xz" + sha256 "57dcd7a6b966ecd5bbd95e1d11173734691e16b68692fa59661cdae9b13b1697" + license any_of: ["BSD-3-Clause", "GPL-1.0-only"] + head "https://github.com/linux-pam/linux-pam.git", branch: "master" + + bottle do + rebuild 1 + sha256 arm64_linux: "397ff4ee01be3b3ce59d057bafd45489c9d08a0d9ae8d2003ea2b433431e9bf6" + sha256 x86_64_linux: "25349579d56222786116f3d058bf872934732859e6744a74037d064f23df040d" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libnsl" + depends_on "libtirpc" + depends_on "libxcrypt" + depends_on :linux + + def install + system "meson", "setup", "build", "--sysconfdir=#{etc}", "-Dsecuredir=#{lib}/security", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + assert_match "Usage: #{sbin}/mkhomedir_helper ", + shell_output("#{sbin}/mkhomedir_helper 2>&1", 14) + end +end diff --git a/Formula/l/liqoctl.rb b/Formula/l/liqoctl.rb new file mode 100644 index 0000000000000..75f1bd917deec --- /dev/null +++ b/Formula/l/liqoctl.rb @@ -0,0 +1,39 @@ +class Liqoctl < Formula + desc "Is a CLI tool to install and manage Liqo-enabled clusters" + homepage "https://liqo.io/" + url "https://github.com/liqotech/liqo/archive/refs/tags/v1.0.0.tar.gz" + sha256 "0fc334ed6a1f0b7afa337b6a76796c1485e93af9cdd35c562fc52136b32611bf" + license "Apache-2.0" + head "https://github.com/liqotech/liqo.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bcad183bb34ecb46edefd59e25cf15c4552e932d7f4cb569de63378f53f07786" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bcad183bb34ecb46edefd59e25cf15c4552e932d7f4cb569de63378f53f07786" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bcad183bb34ecb46edefd59e25cf15c4552e932d7f4cb569de63378f53f07786" + sha256 cellar: :any_skip_relocation, sonoma: "96949d366b79720d97ce1522d92f85b8b6ab4b8ab0db7d463876a07c6d583c1d" + sha256 cellar: :any_skip_relocation, ventura: "96949d366b79720d97ce1522d92f85b8b6ab4b8ab0db7d463876a07c6d583c1d" + sha256 cellar: :any_skip_relocation, arm64_linux: "6a01acb84b85d5daff6c3ec55240259e19e3b9dfaa83fab447342f0d2e00a1c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9296a3d5c4b001e8fe66fddc076dc06f6044bea2a1d985b54c74f5d0acb0894e" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + + ldflags = %W[ + -s -w + -X github.com/liqotech/liqo/pkg/liqoctl/version.LiqoctlVersion=v#{version} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/liqoctl" + + generate_completions_from_executable(bin/"liqoctl", "completion") + end + + test do + run_output = shell_output("#{bin}/liqoctl 2>&1") + assert_match "liqoctl is a CLI tool to install and manage Liqo.", run_output + assert_match version.to_s, shell_output("#{bin}/liqoctl version --client") + end +end diff --git a/Formula/l/liquibase.rb b/Formula/l/liquibase.rb new file mode 100644 index 0000000000000..0d34ff5f81685 --- /dev/null +++ b/Formula/l/liquibase.rb @@ -0,0 +1,44 @@ +class Liquibase < Formula + desc "Library for database change tracking" + homepage "https://www.liquibase.org/" + url "https://github.com/liquibase/liquibase/releases/download/v4.31.1/liquibase-4.31.1.tar.gz" + sha256 "0555808b59941d497f0c1114c3f2225698afde11c60d191c88e449506a60a3ea" + license "Apache-2.0" + + livecheck do + url "https://www.liquibase.com/download" + regex(/href=.*?liquibase[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b25c49301574fe40a67ab16d944c363dffec2de0c8ad8680835dcd44c648837b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b25c49301574fe40a67ab16d944c363dffec2de0c8ad8680835dcd44c648837b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b25c49301574fe40a67ab16d944c363dffec2de0c8ad8680835dcd44c648837b" + sha256 cellar: :any_skip_relocation, sonoma: "cb951450860829e9d7ba103ca5df2a5c7ab2aef156ac9799e45fbd088374307b" + sha256 cellar: :any_skip_relocation, ventura: "cb951450860829e9d7ba103ca5df2a5c7ab2aef156ac9799e45fbd088374307b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b25c49301574fe40a67ab16d944c363dffec2de0c8ad8680835dcd44c648837b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b25c49301574fe40a67ab16d944c363dffec2de0c8ad8680835dcd44c648837b" + end + + depends_on "openjdk" + + def install + rm(Dir["*.bat"]) + + chmod 0755, "liquibase" + libexec.install Dir["*"] + (bin/"liquibase").write_env_script libexec/"liquibase", Language::Java.overridable_java_home_env + (libexec/"lib").install_symlink Dir["#{libexec}/sdk/lib-sdk/slf4j*"] + end + + def caveats + <<~EOS + You should set the environment variable LIQUIBASE_HOME to + #{opt_libexec} + EOS + end + + test do + system bin/"liquibase", "--version" + end +end diff --git a/Formula/l/liquid-dsp.rb b/Formula/l/liquid-dsp.rb new file mode 100644 index 0000000000000..7c0049c875235 --- /dev/null +++ b/Formula/l/liquid-dsp.rb @@ -0,0 +1,46 @@ +class LiquidDsp < Formula + desc "Digital signal processing library for software-defined radios" + homepage "https://liquidsdr.org/" + url "https://github.com/jgaeddert/liquid-dsp/archive/refs/tags/v1.7.0.tar.gz" + sha256 "33c42ebc2e6088570421e282c6332e899705d42b4f73ebd1212e6a11da714dd4" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b8a80ea89fa4390be08e71b263f9117e094277ca8832db34a2ade2acc4442766" + sha256 cellar: :any, arm64_sonoma: "1959fe41645657d0d27b65a27e4106b8ebb7453b6b4933dc89f4e971df308c1d" + sha256 cellar: :any, arm64_ventura: "ef0b0fffea38cbbd424d1cea2398c998f62fc1b000bd990217fec502b25514d8" + sha256 cellar: :any, sonoma: "45c2eacbc105dc60a05650f8a26b1030d8d68f2e1ad5658b3aac69e55a935fac" + sha256 cellar: :any, ventura: "034053ad567403a05e58d450dc7d5c717a663f1ed8e2f46dfebe0a3e4830c70f" + sha256 cellar: :any_skip_relocation, arm64_linux: "17cc4d0a408358eaa7c80819e7ac7ba89142626be83feeea495252b0b73a0653" + sha256 cellar: :any_skip_relocation, x86_64_linux: "677337e96a58a18d51ac014d4471b111a0b00ce735eea54cc1a788fac95cccd1" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "fftw" + + # Backport fix for ARM64 Linux + patch do + url "https://github.com/jgaeddert/liquid-dsp/commit/3a5e1f578ad5e73d7665e71781e764765608c2a2.patch?full_index=1" + sha256 "8dcece1e5e612b5dad77030dfd453f0f47755fdb41e6201c0c8b6b7123f053b9" + end + + def install + system "./bootstrap.sh" + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + if (!liquid_is_prime(3)) + return 1; + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lliquid" + system "./test" + end +end diff --git a/Formula/l/liquidctl.rb b/Formula/l/liquidctl.rb new file mode 100644 index 0000000000000..411065099de90 --- /dev/null +++ b/Formula/l/liquidctl.rb @@ -0,0 +1,83 @@ +class Liquidctl < Formula + include Language::Python::Virtualenv + + desc "Cross-platform tool and drivers for liquid coolers and other devices" + homepage "https://github.com/liquidctl/liquidctl" + url "https://files.pythonhosted.org/packages/1d/87/8b80a72696a906fde5ead01398291c4ae67353d8d445b3828af4217b7d2c/liquidctl-1.15.0.tar.gz" + sha256 "82243acf320c2686b274c13e804e8dd56ec97eaa0a9347d4107974428fb548d1" + license "GPL-3.0-or-later" + head "https://github.com/liquidctl/liquidctl.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d510764a83983ce82305ca97ae0d5b7937829925bd64bb994be24bf7f0f0136c" + sha256 cellar: :any, arm64_sonoma: "c80266cf95b59a392b3ba9d6eaefd1c54c7e26781e9f644080bf488ca334dfb4" + sha256 cellar: :any, arm64_ventura: "2df40c607570625a1e9df040d40d9591508367f43bd0d505059a79b47b6faf81" + sha256 cellar: :any, sonoma: "f3aea3bc6615019e4e161c517ec821d8172a16306acc388b4bcf8e1e07ab893d" + sha256 cellar: :any, ventura: "e548f1e3d0a29346377db2ce72f320ae08905ba1fe14d339d0ccf2dcdc9e346a" + sha256 cellar: :any_skip_relocation, arm64_linux: "07653b2aedc53c8f7d76a79ab2fb11f13dcd80205e58e76fb510fddc45893670" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e6bfb0f85eabaada1792f71d1a2852a777ffb9ba95da8f6cafaa1178e6ca0852" + end + + depends_on "pkgconf" => :build + depends_on "hidapi" + depends_on "libusb" + depends_on "pillow" + depends_on "python@3.13" + + on_linux do + depends_on "i2c-tools" + end + + resource "colorlog" do + url "https://files.pythonhosted.org/packages/d3/7a/359f4d5df2353f26172b3cc39ea32daa39af8de522205f512f458923e677/colorlog-6.9.0.tar.gz" + sha256 "bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2" + end + + resource "crcmod" do + url "https://files.pythonhosted.org/packages/6b/b0/e595ce2a2527e169c3bcd6c33d2473c1918e0b7f6826a043ca1245dd4e5b/crcmod-1.7.tar.gz" + sha256 "dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e" + end + + resource "docopt" do + url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" + sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" + end + + resource "hidapi" do + url "https://files.pythonhosted.org/packages/47/72/21ccaaca6ffb06f544afd16191425025d831c2a6d318635e9c8854070f2d/hidapi-0.14.0.post4.tar.gz" + sha256 "48fce253e526d17b663fbf9989c71c7ef7653ced5f4be65f1437c313fb3dbdf6" + end + + resource "pyusb" do + url "https://files.pythonhosted.org/packages/00/6b/ce3727395e52b7b76dfcf0c665e37d223b680b9becc60710d4bc08b7b7cb/pyusb-1.3.1.tar.gz" + sha256 "3af070b607467c1c164f49d5b0caabe8ac78dbed9298d703a8dbf9df4052d17e" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + end + + resource "smbus" do + on_linux do + url "https://files.pythonhosted.org/packages/4d/5c/70e14aa4f0c586efc017e1d1aa6e2f7921eefc7602fc2d03368ff912aa91/smbus-1.1.post2.tar.gz" + sha256 "f96d345e0aa10053a8a4917634f1dc37ba1f656fa5cace7629b71777e90855c6" + end + end + + def install + ENV["HIDAPI_SYSTEM_HIDAPI"] = ENV["HIDAPI_WITH_LIBUSB"] = "1" + virtualenv_install_with_resources + + man_page = buildpath/"liquidctl.8" + # setting the is_macos register to 1 adjusts the man page for macOS + inreplace man_page, ".nr is_macos 0", ".nr is_macos 1" if OS.mac? + man8.install man_page + + (lib/"udev/rules.d").install Dir["extra/linux/*.rules"] if OS.linux? + end + + test do + system bin/"liquidctl", "list", "--verbose", "--debug" + end +end diff --git a/Formula/l/liquidprompt.rb b/Formula/l/liquidprompt.rb new file mode 100644 index 0000000000000..7b05e4553200e --- /dev/null +++ b/Formula/l/liquidprompt.rb @@ -0,0 +1,33 @@ +class Liquidprompt < Formula + desc "Adaptive prompt for bash and zsh shells" + homepage "https://liquidprompt.readthedocs.io/en/stable/" + url "https://github.com/liquidprompt/liquidprompt/archive/refs/tags/v2.2.1.tar.gz" + sha256 "56e9ee1c057638795eea31c7d91a81b8e0c4afd5b57c7dc3a5e3df98fd89b483" + license "AGPL-3.0-or-later" + head "https://github.com/liquidprompt/liquidprompt.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6d5297bbb97be2159592d2a5442626ce46f9057b06c31007ea89fea658a132ac" + end + + def install + share.install "liquidprompt" + end + + def caveats + <<~EOS + Add the following lines to your bash or zsh config (e.g. ~/.bash_profile): + if [ -f #{HOMEBREW_PREFIX}/share/liquidprompt ]; then + . #{HOMEBREW_PREFIX}/share/liquidprompt + fi + + If you'd like to reconfigure options, you may do so in ~/.liquidpromptrc. + EOS + end + + test do + liquidprompt = "#{HOMEBREW_PREFIX}/share/liquidprompt" + output = shell_output("/bin/bash -c '. #{liquidprompt} --no-activate; lp_theme --list'") + assert_match "default\n", output + end +end diff --git a/Formula/l/lit.rb b/Formula/l/lit.rb new file mode 100644 index 0000000000000..c62d2033a64e0 --- /dev/null +++ b/Formula/l/lit.rb @@ -0,0 +1,72 @@ +class Lit < Formula + desc "Portable tool for LLVM- and Clang-style test suites" + homepage "https://llvm.org/" + url "https://files.pythonhosted.org/packages/47/b4/d7e210971494db7b9a9ac48ff37dfa59a8b14c773f9cf47e6bda58411c0d/lit-18.1.8.tar.gz" + sha256 "47c174a186941ae830f04ded76a3444600be67d5e5fb8282c3783fba671c4edb" + license "Apache-2.0" => { with: "LLVM-exception" } + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "8df66dee8e2126345dc2b15090cbafab63258ff6323159976fddff635824824b" + end + + depends_on "llvm" => :test + depends_on "python@3.13" + + def python3 + which("python3.13") + end + + conflicts_with "luvit", because: "both install `lit` binaries" + + def install + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + + # Install symlinks so that `import lit` works with multiple versions of Python + python_versions = Formula.names + .select { |name| name.start_with? "python@" } + .map { |py| py.delete_prefix("python@") } + .reject { |xy| xy == Language::Python.major_minor_version(python3) } + site_packages = Language::Python.site_packages(python3).delete_prefix("lib/") + python_versions.each do |xy| + (lib/"python#{xy}/site-packages").install_symlink (lib/site_packages).children + end + end + + test do + ENV.prepend_path "PATH", Formula["llvm"].opt_bin + + (testpath/"example.c").write <<~C + // RUN: cc %s -o %t + // RUN: %t | FileCheck %s + // CHECK: hello world + #include + + int main() { + printf("hello world"); + return 0; + } + C + + (testpath/"lit.site.cfg.py").write <<~PYTHON + import lit.formats + + config.name = "Example" + config.test_format = lit.formats.ShTest(True) + + config.suffixes = ['.c'] + PYTHON + + system bin/"lit", "-v", "." + + if OS.mac? + ENV.prepend_path "PYTHONPATH", prefix/Language::Python.site_packages(python3) + else + python = deps.reject { |d| d.build? || d.test? } + .find { |d| d.name.match?(/^python@\d+(\.\d+)*$/) } + .to_formula + ENV.prepend_path "PATH", python.opt_bin + end + system python3, "-c", "import lit" + end +end diff --git a/Formula/l/litani.rb b/Formula/l/litani.rb new file mode 100644 index 0000000000000..72cc5d6655772 --- /dev/null +++ b/Formula/l/litani.rb @@ -0,0 +1,71 @@ +class Litani < Formula + include Language::Python::Virtualenv + + desc "Metabuild system" + homepage "https://awslabs.github.io/aws-build-accumulator/" + url "https://github.com/awslabs/aws-build-accumulator.git", + tag: "1.29.0", + revision: "8002c240ef4f424039ed3cc32e076c0234d01768" + license "Apache-2.0" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_sonoma: "783a2098086de5ae5bd6da1c2861405a9f9e6c81d39b610a588303b35afa5d32" + sha256 cellar: :any, arm64_ventura: "335b32520084699755377ea966edd1110db54ce778add5be4c3c3f1a15ea696e" + sha256 cellar: :any, sonoma: "5e8d434b3d2fb389ad937ac3e97aba8896c9e1e99ed3d1537d5e3daa03ea3e50" + sha256 cellar: :any, ventura: "a548833f41ce2331f2bec2a29b70e93d51fe934afd5344b339e2967372233c0c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1826fff1a8601653ed3cf9a4dd461f98650705be353ebea060a0f583e0826ab" + end + + depends_on "coreutils" => :build + depends_on "mandoc" => :build + depends_on "scdoc" => :build + depends_on "gnuplot" + depends_on "graphviz" + depends_on "libyaml" + depends_on "ninja" + depends_on "python@3.13" + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz" + sha256 "4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/87/5b/aae44c6655f3801e81aa3eef09dbbf012431987ba564d7231722f68df02d/MarkupSafe-2.1.5.tar.gz" + sha256 "d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + def install + ENV.prepend_path "PATH", libexec/"vendor/bin" + venv = virtualenv_create(libexec/"vendor", "python3.13") + venv.pip_install resources + + libexec.install Dir["*"] - ["test", "examples"] + (bin/"litani").write_env_script libexec/"litani", PATH: "\"#{libexec}/vendor/bin:${PATH}\"" + + cd libexec/"doc" do + system libexec/"vendor/bin/python3", "configure" + system "ninja", "--verbose" + end + man1.install libexec.glob("doc/out/man/*.1") + man5.install libexec.glob("doc/out/man/*.5") + man7.install libexec.glob("doc/out/man/*.7") + doc.install libexec/"doc/out/html/index.html" + rm_r(libexec/"doc") + end + + test do + system bin/"litani", "init", "--project-name", "test-installation" + system bin/"litani", "add-job", + "--command", "/usr/bin/true", + "--pipeline-name", "test-installation", + "--ci-stage", "test" + system bin/"litani", "run-build" + end +end diff --git a/Formula/l/litecli.rb b/Formula/l/litecli.rb new file mode 100644 index 0000000000000..558bfdd0983bf --- /dev/null +++ b/Formula/l/litecli.rb @@ -0,0 +1,110 @@ +class Litecli < Formula + include Language::Python::Virtualenv + + desc "CLI for SQLite Databases with auto-completion and syntax highlighting" + homepage "https://github.com/dbcli/litecli" + url "https://files.pythonhosted.org/packages/7b/22/fdcf997419c9e359da587d2fddd4a7d0cc18783c3f0b08ca179bef5efd04/litecli-1.15.0.tar.gz" + sha256 "3285997f57b2d72dc70e9856cb302cddd8de07b0cebf5c90a60ecd20a053cd79" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "00e6275a871d0b4f4a923cd74de9ba4d04739c799d8ce75744408822089a09cc" + end + + depends_on "python@3.13" + + uses_from_macos "sqlite" + + resource "cli-helpers" do + url "https://files.pythonhosted.org/packages/f9/7c/3344a9b856b9582df36c7a525f5710294f349499d16dcbf343453f70bdb8/cli_helpers-2.4.0.tar.gz" + sha256 "55903b705a212a473731db20fa26f58655e354078b99cb13c99ec06940287a4d" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/e1/bd15cb8ffdcfeeb2bdc215de3c3cffca11408d829e4b8416dcfe71ba8854/prompt_toolkit-3.0.50.tar.gz" + sha256 "544748f3860a2623ca5cd6d2795e7a14f3d0e1c3c9728359013f79877fc89bab" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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 "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"litecli", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + (testpath/".config/litecli/config").write <<~INI + [main] + table_format = tsv + less_chatty = True + INI + + (testpath/"test.sql").write <<~SQL + CREATE TABLE IF NOT EXISTS package_manager ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name VARCHAR(256) + ); + INSERT INTO + package_manager (name) + VALUES + ('Homebrew'); + SQL + system "sqlite3 test.db < test.sql" + + require "pty" + output = "" + PTY.spawn("#{bin}/litecli test.db") do |r, w, _pid| + sleep 2 + w.puts "SELECT name FROM package_manager" + 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 + end + + # remove ANSI colors + output.gsub!(/\e\[([;\d]+)?m/, "") + # normalize line endings + output.gsub!("\r\n", "\n") + + expected = <<~EOS + name + Homebrew + 1 row in set + EOS + + assert_match expected, output + end +end diff --git a/Formula/l/literate-git.rb b/Formula/l/literate-git.rb new file mode 100644 index 0000000000000..10ac86a057a71 --- /dev/null +++ b/Formula/l/literate-git.rb @@ -0,0 +1,84 @@ +class LiterateGit < Formula + include Language::Python::Virtualenv + + desc "Render hierarchical git repositories into HTML" + homepage "https://github.com/bennorth/literate-git" + url "https://files.pythonhosted.org/packages/67/0e/e37f96177ca5227416bbf06e96d23077214fbb3968b02fe2a36c835bf49e/literategit-0.5.1.tar.gz" + sha256 "3db9099c9618afd398444562738ef3142ef3295d1f6ce56251ba8d22385afe44" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c78fca9768aa28cc91c7fcd0fdb6f74e6d2edab8ff267912ee079a0d13667188" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "97beb2e869acd67d690d1a51a32f49366b73e3cc6aaad8ea0e7384b8ee493645" + sha256 cellar: :any_skip_relocation, arm64_ventura: "72e3eb02cd1b9f4656d7c2a1cc941f9c61caebc5c3d134f18364bc0cd896f889" + sha256 cellar: :any_skip_relocation, sonoma: "2d21c7e6ada9f49184787a19d7fd67dda9e933e3c267f5af318ad90fad3a9aa4" + sha256 cellar: :any_skip_relocation, ventura: "4719c71162e17145fcafbd29a0b78341fbba740191ea2b4533072350560db2dd" + sha256 cellar: :any_skip_relocation, arm64_linux: "44e546f0a8bcc036eb4925142d5f5c60b41ac909d6bba3cd89b21e800a02fb33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98a17d82f86fca6482e0d1ef72023b9f8ba90837247c7116661a2c8b8cc9e001" + end + + depends_on "pygit2" + depends_on "python@3.13" + + uses_from_macos "libffi" + + on_linux do + depends_on "pkgconf" => :build + 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 "markdown2" do + url "https://files.pythonhosted.org/packages/44/52/d7dcc6284d59edb8301b8400435fbb4926a9b0f13a12b5cbaf3a4a54bb7b/markdown2-2.5.3.tar.gz" + sha256 "4d502953a4633408b0ab3ec503c5d6984d1b14307e32b325ec7d16ea57524895" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + end + + test do + system "git", "init" + (testpath/"foo.txt").write "Hello" + system "git", "add", "foo.txt" + system "git", "commit", "-m", "foo" + system "git", "branch", "one" + (testpath/"bar.txt").write "World" + system "git", "add", "bar.txt" + system "git", "commit", "-m", "bar" + system "git", "branch", "two" + (testpath/"create_url.py").write <<~PYTHON + class CreateUrl: + @staticmethod + def result_url(https://github.com/sha1): + return '' + @staticmethod + def source_url(https://github.com/sha1): + return '' + PYTHON + assert_match "", + shell_output("git literate-render test one two create_url.CreateUrl") + end +end diff --git a/Formula/l/litmusctl.rb b/Formula/l/litmusctl.rb new file mode 100644 index 0000000000000..57b29610ee85c --- /dev/null +++ b/Formula/l/litmusctl.rb @@ -0,0 +1,51 @@ +class Litmusctl < Formula + desc "Command-line interface for interacting with LitmusChaos" + homepage "https://litmuschaos.io/" + url "https://github.com/litmuschaos/litmusctl/archive/refs/tags/1.15.0.tar.gz" + sha256 "4814973152ccd3070159285c65cfef19ad185cbc2ac9a14cd58b9a474008d494" + license "Apache-2.0" + head "https://github.com/litmuschaos/litmusctl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d243e765daeba1934f2fc20c785d1d32de4f599109deb03da0c58747ca971c90" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d243e765daeba1934f2fc20c785d1d32de4f599109deb03da0c58747ca971c90" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d243e765daeba1934f2fc20c785d1d32de4f599109deb03da0c58747ca971c90" + sha256 cellar: :any_skip_relocation, sonoma: "e532f7c2f9ddd18272a8f78f41cbf41ba57a27200b2e5ceb899d03ebb500c5fa" + sha256 cellar: :any_skip_relocation, ventura: "e532f7c2f9ddd18272a8f78f41cbf41ba57a27200b2e5ceb899d03ebb500c5fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e699fcb14e1e4ec9f2e0f1a84e96a2000d22c84e794723b74acd3854a739f1f" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.CLIVersion=#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"litmusctl", "completion") + end + + test do + assert_match version.to_s, shell_output("#{bin}/litmusctl version") + + # add the config file in the main directory + (testpath/".litmusconfig").write <<~EOS + accounts: + - users: + - expires_in: "1705404092" + token: faketoken + username: admin + endpoint: testEndpoint:test + serverEndpoint: testServerEndpoint:test + apiVersion: v1 + current-account: http://192.168.49.2:30186 + current-user: admin + kind: Config + EOS + + output_endpoint = shell_output("#{bin}/litmusctl config get-accounts") + assert_match "testEndpoint:test", output_endpoint + + output_user = shell_output("#{bin}/litmusctl config use-account --endpoint=something --username=something", 1) + assert_match "Account not exists", output_user + end +end diff --git a/Formula/l/little-cms2.rb b/Formula/l/little-cms2.rb new file mode 100644 index 0000000000000..c0de5b3b10cf4 --- /dev/null +++ b/Formula/l/little-cms2.rb @@ -0,0 +1,45 @@ +class LittleCms2 < Formula + desc "Color management engine supporting ICC profiles" + homepage "https://www.littlecms.com/" + # Ensure release is announced at https://www.littlecms.com/categories/releases/ + # (or https://www.littlecms.com/blog/) + url "https://downloads.sourceforge.net/project/lcms/lcms/2.17/lcms2-2.17.tar.gz" + sha256 "d11af569e42a1baa1650d20ad61d12e41af4fead4aa7964a01f93b08b53ab074" + license "MIT" + version_scheme 1 + + # The Little CMS website has been redesigned and there's no longer a + # "Download" page we can check for releases. As of writing this, checking the + # "Releases" blog posts seems to be our best option and we just have to hope + # that the post URLs, headings, etc. maintain a consistent format. + livecheck do + url "https://www.littlecms.com/categories/releases/" + regex(/Little\s*CMS\s+v?(\d+(?:\.\d+)+)\s+released/im) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "3827b5a8583f0e92987bd0e7c721bda834157ad366d2cb66596559dd8654c9ac" + sha256 cellar: :any, arm64_sonoma: "aeb24e3f0d025808da8a3c0d9c4e42b0aa58a3dbc51813baf90940fcddf20be9" + sha256 cellar: :any, arm64_ventura: "a4edffc61a638164f92c20dbb084eb00a82ce81cb2e58aa18ad5f1d73c843c5e" + sha256 cellar: :any, sonoma: "6f3a75284dcdd815c90822ac2d7ca5da326f9b1caa429b57bc95bc1f49d76881" + sha256 cellar: :any, ventura: "0d73b47c0c2bc4974127934587472e9a6a7dc1c54ef6eaa409f64c99568c2edc" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ec5e7088ce3f220f3607200e7e9fb111359569de78eaf4c2ac2b7f5dbb9d9bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "667006576a5da32e7984c0c310cba11d63970e9f4f501200ef949ab9b0559709" + end + + depends_on "jpeg-turbo" + depends_on "libtiff" + + def install + system "./configure", *std_configure_args + system "make", "install" + + # Avoid rebuilding dependents that hard-code the prefix. + inreplace lib/"pkgconfig/lcms2.pc", prefix, opt_prefix + end + + test do + system bin/"jpgicc", test_fixtures("test.jpg"), "out.jpg" + assert_path_exists testpath/"out.jpg" + end +end diff --git a/Formula/l/livekit-cli.rb b/Formula/l/livekit-cli.rb new file mode 100644 index 0000000000000..508304062a2f0 --- /dev/null +++ b/Formula/l/livekit-cli.rb @@ -0,0 +1,36 @@ +class LivekitCli < Formula + desc "Command-line interface to LiveKit" + homepage "https://livekit.io/" + url "https://github.com/livekit/livekit-cli/archive/refs/tags/v2.4.9.tar.gz" + sha256 "92d017478f4b95e2756ed6292932a2668ac027c0bef7a0748d72192cbd48a9cf" + license "Apache-2.0" + head "https://github.com/livekit/livekit-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b571a9f3b3e7c4d4eac1eeaf9486ba6b3ff558d717b01bcc722deec829e75cd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2b571a9f3b3e7c4d4eac1eeaf9486ba6b3ff558d717b01bcc722deec829e75cd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2b571a9f3b3e7c4d4eac1eeaf9486ba6b3ff558d717b01bcc722deec829e75cd" + sha256 cellar: :any_skip_relocation, sonoma: "84040615d95c96e1cae68405db375adbd2601131312d0c6e5b5cfbad82e099f8" + sha256 cellar: :any_skip_relocation, ventura: "84040615d95c96e1cae68405db375adbd2601131312d0c6e5b5cfbad82e099f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e3b830b1ec80a6e37c241810cfbb1c0d4e10201952ed43e372c2871c6a644eb" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w" + system "go", "build", *std_go_args(ldflags:, output: bin/"lk"), "./cmd/lk" + + bin.install_symlink "lk" => "livekit-cli" + + bash_completion.install "autocomplete/bash_autocomplete" => "lk" + fish_completion.install "autocomplete/fish_autocomplete" => "lk.fish" + zsh_completion.install "autocomplete/zsh_autocomplete" => "_lk" + end + + test do + output = shell_output("#{bin}/lk token create --list --api-key key --api-secret secret") + assert output.start_with?("valid for (mins): 5") + assert_match "lk version #{version}", shell_output("#{bin}/lk --version") + end +end diff --git a/Formula/l/livekit.rb b/Formula/l/livekit.rb new file mode 100644 index 0000000000000..f358bf1846813 --- /dev/null +++ b/Formula/l/livekit.rb @@ -0,0 +1,45 @@ +class Livekit < Formula + desc "Scalable, high-performance WebRTC server" + homepage "https://livekit.io/" + url "https://github.com/livekit/livekit/archive/refs/tags/v1.8.4.tar.gz" + sha256 "81e8b7c6ed90fe98f91bb0b1dd48bf254f564f3cc925ce5d25e335e2e03fd648" + license "Apache-2.0" + head "https://github.com/livekit/livekit.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_sequoia: "8ef82db04363d45ab654267b6b6d42f3ebaf963e32fe85822a3de975526120a3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8a3282abaaa1488019c591bd9c0af765fca1c12fae0ea1a6aede0ac76fdf1c9c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "17290cbafc8372a9bde48ff0bc2c25ad4b704ed23624fed7ee97cc9e5301ae6b" + sha256 cellar: :any_skip_relocation, sonoma: "d99f165e20d63341da6610299223e86b198e8f54cc119e543e68e101b37d0a3b" + sha256 cellar: :any_skip_relocation, ventura: "5cb46dad2113e234e365fdb6ee29c43064e6ba485dedadf81e68fdc7f7d7f9fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f57e6e5585699ced285f226bd879f8c6846c6b3dc97299991537a423de62488" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b4945600f64b103b53f77d28bc891d482788efbccdc4db5eda55894a5cec3ab" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"livekit-server"), "./cmd/server" + end + + test do + http_port = free_port + random_key = "R4AA2dwX3FrMbyY@My3X&Hsmz7W)LuQy" + fork do + exec bin/"livekit-server", "--keys", "test: #{random_key}", "--config-body", "port: #{http_port}" + end + sleep 3 + assert_match "OK", shell_output("curl -s http://localhost:#{http_port}") + + output = shell_output("#{bin}/livekit-server --version") + assert_match "livekit-server version #{version}", output + end +end diff --git a/Formula/l/lizard-analyzer.rb b/Formula/l/lizard-analyzer.rb new file mode 100644 index 0000000000000..0a1873e6eb629 --- /dev/null +++ b/Formula/l/lizard-analyzer.rb @@ -0,0 +1,48 @@ +class LizardAnalyzer < Formula + include Language::Python::Virtualenv + + desc "Extensible Cyclomatic Complexity Analyzer" + homepage "https://github.com/terryyin/lizard" + url "https://files.pythonhosted.org/packages/f0/29/ff8f58e4e495cb31d6826e89b26d9aa411c211f46edb1625a7aa061af609/lizard-1.17.30.tar.gz" + sha256 "fbe1cfadb28402baaf6c858ec1eca1b9e1b62ca9826a16471e2e1045c66c1b77" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "72d8bd9ef95b63bf0f47784f9bd0117ee6c3b8d57cc5052c71440b69bd08e697" + end + + depends_on "python@3.13" + + conflicts_with "lizard", because: "both install `lizard` binaries" + + resource "pathspec" do + url "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz" + sha256 "a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + def install + virtualenv_install_with_resources + end + + test do + (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 + } + } + SWIFT + + assert_match "1 file analyzed.", shell_output("#{bin}/lizard -l swift #{testpath}/test.swift") + end +end diff --git a/Formula/l/lizard.rb b/Formula/l/lizard.rb new file mode 100644 index 0000000000000..2a5bc989e3854 --- /dev/null +++ b/Formula/l/lizard.rb @@ -0,0 +1,52 @@ +class Lizard < Formula + desc "Efficient compressor with very fast decompression" + homepage "https://github.com/inikep/lizard" + url "https://github.com/inikep/lizard/archive/refs/tags/v2.1.tar.gz" + sha256 "0c1a7efceeb8ae66bfa2b7b659f01dec120925d846b01ce4dfc6960ba8cd61e5" + license all_of: ["BSD-2-Clause", "GPL-2.0-or-later"] + version_scheme 1 + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "a9de7741a01031727be56d4e8114c07ca8b108607393e7fc81de10a3ef38ac2c" + sha256 cellar: :any, arm64_sonoma: "f0096c7097d15b80a8b1380e9875f01dc9c774f9c4486037079e87614179b32f" + sha256 cellar: :any, arm64_ventura: "6e41f950c3122da4196d7f1f9501e9c32f095465587090615bba4be931543f07" + sha256 cellar: :any, sonoma: "9bd2c13adb64d92944260e290b9416218f4eeb424487ea49ae83bb015ffd9f81" + sha256 cellar: :any, ventura: "39b3961d0fc7b870dcc7d375782ccd5c51ac716e4a3ef8bb6ffa16431409ae37" + sha256 cellar: :any_skip_relocation, arm64_linux: "6212d114544ae8160922823d29a649f51b2bb89fe30a114e93b6b063e9ebac0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "baf6aa7976a0ebf3f70dca4b20b19dac4cebcf104d40806af223fa0be2b0607f" + end + + conflicts_with "lizard-analyzer", because: "both install `lizard` binaries" + + def install + system "make", "PREFIX=#{prefix}", "install" + cd "examples" do + system "make" + (pkgshare/"tests").install "ringBufferHC", "ringBuffer", "lineCompress", "doubleBuffer" + end + end + + test do + (testpath/"tests/test.txt").write <<~EOS + Homebrew is a free and open-source software package management system that simplifies the installation + of software on Apple's macOS operating system and Linux. The name means building software on your Mac + depending on taste. Originally written by Max Howell, the package manager has gained popularity in the + Ruby on Rails community and earned praise for its extensibility. Homebrew has been recommended for its + ease of use as well as its integration into the command line. Homebrew is a non-profit project member + of the Software Freedom Conservancy, and is run entirely by unpaid volunteers. + EOS + + cp_r pkgshare/"tests", testpath + cd "tests" do + system "./ringBufferHC", "./test.txt" + system "./ringBuffer", "./test.txt" + system "./lineCompress", "./test.txt" + system "./doubleBuffer", "./test.txt" + end + end +end diff --git a/Formula/l/lla.rb b/Formula/l/lla.rb new file mode 100644 index 0000000000000..311c1943e29f7 --- /dev/null +++ b/Formula/l/lla.rb @@ -0,0 +1,62 @@ +class Lla < Formula + desc "High-performance, extensible alternative to ls" + homepage "https://github.com/triyanox/lla" + url "https://github.com/triyanox/lla/archive/refs/tags/v0.3.11.tar.gz" + sha256 "dde64fa4acd90f4ae86ed485576cdfe42aab0de2cb674c88712e471968f8ae0a" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5e6086be36189064123934678e72b6f112ba16e0141d02df8e91b76823d1dd12" + sha256 cellar: :any, arm64_sonoma: "da9e98371b47e3ce8d55fcac671e4cd39623708152929f1314c1c98f23445803" + sha256 cellar: :any, arm64_ventura: "632df0323c808438e232975387a9fd26f59d39b8f75f02fb8d227381da0dc5e4" + sha256 cellar: :any, sonoma: "b8b01b6484412158f42dee86bc72c763525e487b38edcc6feb133c7d66c592ac" + sha256 cellar: :any, ventura: "e4fcf542d5549c7c157374783fec280836cbc02e863c1cb6d92d81805c02793b" + sha256 cellar: :any_skip_relocation, arm64_linux: "205e741b2830b2d6ea538d36fb9041c430726b19a843634153d22bcb2ec8f4b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "05c5b2b33af4772ed8ad30c783f2c25ef7dbe9729f3fb76bafab77d40768c51c" + end + + depends_on "protobuf" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "lla") + + (buildpath/"plugins").each_child do |plugin| + next unless plugin.directory? + + plugin_path = plugin/"Cargo.toml" + next unless plugin_path.exist? + + system "cargo", "build", "--jobs", ENV.make_jobs.to_s, + "--locked", "--lib", "--release", + "--manifest-path=#{plugin_path}" + end + lib.install Dir["target/release/*.{dylib,so}"] + end + + def caveats + <<~EOS + The Lla plugins have been installed in the following directory: + #{opt_lib} + EOS + end + + test do + test_config = testpath/".config/lla/config.toml" + + system bin/"lla", "init" + + output = shell_output("#{bin}/lla config") + assert_match "Current configuration at \"#{test_config}\"", output + + system bin/"lla" + + # test lla plugins + system bin/"lla", "config", "--set", "plugins_dir", opt_lib + + system bin/"lla", "--enable-plugin", "git_status", "categorizer" + system bin/"lla" + + assert_match "lla #{version}", shell_output("#{bin}/lla --version") + end +end diff --git a/Formula/l/llama.cpp.rb b/Formula/l/llama.cpp.rb new file mode 100644 index 0000000000000..230d5b6afddc8 --- /dev/null +++ b/Formula/l/llama.cpp.rb @@ -0,0 +1,76 @@ +class LlamaCpp < Formula + desc "LLM inference in C/C++" + homepage "https://github.com/ggerganov/llama.cpp" + # CMake uses Git to generate version information. + url "https://github.com/ggerganov/llama.cpp.git", + tag: "b5400", + revision: "c6a2c9e7411f54b0770b319740561bbd6a2ebd27" + license "MIT" + head "https://github.com/ggerganov/llama.cpp.git", branch: "master" + + # llama.cpp publishes new tags too often + # Having multiple updates in one day is not very convenient + # Update formula only after 10 new tags (1 update per ≈2 days) + # + # `trottle 10` doesn't work + livecheck do + url :stable + regex(/^v?b(\d+(?:\.\d+)*0)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "929141688c8b9ec50a9b525ecf35c550f92bb917b12614a4c5cd1d2004fd2aef" + sha256 cellar: :any, arm64_sonoma: "8a24eff28a2b42e05f1bd2a82c663fe4a95b6ec2be9cc8bfbffb71157da45a50" + sha256 cellar: :any, arm64_ventura: "411984af41ff068e7f0b720717ee7798a91a1ce65345b19dedeedfa1d3efa27e" + sha256 cellar: :any, sonoma: "0525a49ea5d6b3c554e6e94453ba82c6862e43bd86a4b00b61b8dc819ecf8ff2" + sha256 cellar: :any, ventura: "4dc6349a43dbd9fab290740df7dc2e45db35ac6f434451637ea242cf9a94900e" + sha256 cellar: :any_skip_relocation, arm64_linux: "f6c060f4d8fab7be7f346573de2376bac9f4bb80546eb8a1433d1fe63fb23412" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cfa016f9677c997baa195d081ee2b853955cfefd02755f7fdcd949ec49345d63" + end + + depends_on "cmake" => :build + uses_from_macos "curl" + + on_linux do + depends_on "pkgconf" => :build + depends_on "openblas" + end + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -DGGML_ACCELLERATE=#{OS.mac? ? "ON" : "OFF"} + -DGGML_ALL_WARNINGS=OFF + -DGGML_BLAS=ON + -DGGML_BLAS_VENDOR=#{OS.mac? ? "Apple" : "OpenBLAS"} + -DGGML_CCACHE=OFF + -DGGML_LTO=ON + -DGGML_METAL=#{(OS.mac? && !Hardware::CPU.intel?) ? "ON" : "OFF"} + -DGGML_METAL_EMBED_LIBRARY=#{OS.mac? ? "ON" : "OFF"} + -DGGML_NATIVE=#{build.bottle? ? "OFF" : "ON"} + -DLLAMA_ALL_WARNINGS=OFF + -DLLAMA_CURL=ON + ] + args << "-DLLAMA_METAL_MACOSX_VERSION_MIN=#{MacOS.version}" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + libexec.install bin.children + bin.install_symlink libexec.children.select { |file| + file.executable? && !file.basename.to_s.start_with?("test-") + } + end + + test do + system libexec/"test-sampling" + # The test below is flaky on slower hardware. + return if OS.mac? && Hardware::CPU.intel? && MacOS.version <= :monterey + + system bin/"llama-cli", "--hf-repo", "ggml-org/tiny-llamas", + "-m", "stories260K.gguf", + "-n", "400", "-p", "I", "-ngl", "0" + end +end diff --git a/Formula/l/lld.rb b/Formula/l/lld.rb new file mode 100644 index 0000000000000..b52f6d0d91bf3 --- /dev/null +++ b/Formula/l/lld.rb @@ -0,0 +1,79 @@ +class Lld < Formula + desc "LLVM Project Linker" + homepage "https://lld.llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.4/llvm-project-20.1.4.src.tar.xz" + sha256 "a95365b02536ed4aef29b325c205dd89c268cba41503ab2fc05f81418613ab63" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + head "https://github.com/llvm/llvm-project.git", branch: "main" + + livecheck do + formula "llvm" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "af338dfd47da2958de32a020142b4b8b9c0b1ea32f1216b7ef459c0ca805eb3c" + sha256 cellar: :any, arm64_sonoma: "e238933909923d9ac14dbea6b53c9eb6f6cbece4c853a252ccfde6ee69b267bb" + sha256 cellar: :any, arm64_ventura: "bf18cd3f07323945386ac997a2e984d263f76e9f2a922663d49d8336153cc0b5" + sha256 cellar: :any, sonoma: "335ad97ce49f995d6e2a8ce9781b78526156b4d66e465c2c007ab5a58a65ceb7" + sha256 cellar: :any, ventura: "81a96d2e88a4d43c24ec9ba5c7cd2b2fbd82f49839f20f18116d27fd4ad9b968" + sha256 cellar: :any_skip_relocation, arm64_linux: "7545d0d40fadeece53aa5989c150b60133d78ae877b05dda815058982f2f27dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d29278d55ecfe5078dcbe0470d5bf58aa66251141750a27dadad8f00b4312739" + end + + depends_on "cmake" => :build + depends_on "llvm" + depends_on "zstd" + uses_from_macos "zlib" + + # These used to be part of LLVM. + link_overwrite "bin/lld", "bin/ld64.lld", "bin/ld.lld", "bin/lld-link", "bin/wasm-ld" + link_overwrite "include/lld/*", "lib/cmake/lld/*" + + def install + system "cmake", "-S", "lld", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DLLD_BUILT_STANDALONE=ON", + "-DLLD_VENDOR=#{tap&.user}", + "-DLLVM_ENABLE_LTO=ON", + "-DLLVM_INCLUDE_TESTS=OFF", + "-DLLVM_USE_SYMLINKS=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"bin/lld").write <<~BASH + #!/bin/bash + exit 1 + BASH + chmod "+x", "bin/lld" + + (testpath/"bin").install_symlink "lld" => "ld64.lld" + (testpath/"bin").install_symlink "lld" => "ld.lld" + + (testpath/"test.c").write <<~C + #include + int main() { + printf("hello, world!"); + return 0; + } + C + + error_message = case ENV.compiler + when /^gcc(-\d+)?$/ then "ld returned 1 exit status" + when :clang then "linker command failed" + else odie "unexpected compiler" + end + + # Check that the `-fuse-ld=lld` flag actually picks up LLD from PATH. + with_env(PATH: "#{testpath}/bin:#{ENV["PATH"]}") do + assert_match error_message, shell_output("#{ENV.cc} -v -fuse-ld=lld test.c 2>&1", 1) + end + + system ENV.cc, "-v", "-fuse-ld=lld", "test.c", "-o", "test" + assert_match "hello, world!", shell_output("./test") + end +end diff --git a/Formula/l/lld@19.rb b/Formula/l/lld@19.rb new file mode 100644 index 0000000000000..e5a3a409c251e --- /dev/null +++ b/Formula/l/lld@19.rb @@ -0,0 +1,80 @@ +class LldAT19 < Formula + desc "LLVM Project Linker" + homepage "https://lld.llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/llvm-project-19.1.7.src.tar.xz" + sha256 "82401fea7b79d0078043f7598b835284d6650a75b93e64b6f761ea7b63097501" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + + livecheck do + formula "llvm@19" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e8e71f728007bf1d4b8941fd08e8f80ba22c4828671145bd59c6358c750cb92f" + sha256 cellar: :any, arm64_sonoma: "083f908ec5c6b6d667a5c43cb737d2a826a83be781dda8856640e372ac4c0b2b" + sha256 cellar: :any, arm64_ventura: "5bc9959a85616afc59418594aae9cae42e907738c2f57beac74332132c791619" + sha256 cellar: :any, sonoma: "ed20ffe6301dcc2dc7c2e7e1197cdb4d3b210fe75e9b3f525edf6fe2f29929e0" + sha256 cellar: :any, ventura: "d7395e5c60ce34541002e3be335463a81cb168f859dbcdbbaa01d985fb451c5b" + sha256 cellar: :any_skip_relocation, arm64_linux: "aae1ed5877dbc2837f9b02547fed455965914eb45bf6d6e40d8ffce97f0ee77f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f8d2ef191e0b229ac246866dc5e017f9e39ce350410ce2e1141c468924314bdb" + end + + keg_only :versioned_formula + + depends_on "cmake" => :build + depends_on "llvm@19" + depends_on "zstd" + uses_from_macos "zlib" + + def install + rpaths = [rpath] + rpaths << Formula["llvm@19"].opt_lib.to_s if OS.linux? + + system "cmake", "-S", "lld", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}", + "-DLLD_BUILT_STANDALONE=ON", + "-DLLD_VENDOR=#{tap&.user}", + "-DLLVM_ENABLE_LTO=ON", + "-DLLVM_INCLUDE_TESTS=OFF", + "-DLLVM_USE_SYMLINKS=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"bin/lld").write <<~BASH + #!/bin/bash + exit 1 + BASH + chmod "+x", "bin/lld" + + (testpath/"bin").install_symlink "lld" => "ld64.lld" + (testpath/"bin").install_symlink "lld" => "ld.lld" + + (testpath/"test.c").write <<~C + #include + int main() { + printf("hello, world!"); + return 0; + } + C + + error_message = case ENV.compiler + when /^gcc(-\d+)?$/ then "ld returned 1 exit status" + when :clang then "linker command failed" + else odie "unexpected compiler" + end + + # Check that the `-fuse-ld=lld` flag actually picks up LLD from PATH. + ENV.prepend_path "PATH", bin + with_env(PATH: "#{testpath}/bin:#{ENV["PATH"]}") do + assert_match error_message, shell_output("#{ENV.cc} -v -fuse-ld=lld test.c 2>&1", 1) + end + + system ENV.cc, "-v", "-fuse-ld=lld", "test.c", "-o", "test" + assert_match "hello, world!", shell_output("./test") + end +end diff --git a/Formula/l/lldpd.rb b/Formula/l/lldpd.rb new file mode 100644 index 0000000000000..5ac828ecf6c5a --- /dev/null +++ b/Formula/l/lldpd.rb @@ -0,0 +1,60 @@ +class Lldpd < Formula + desc "Implementation of IEEE 802.1ab (LLDP)" + homepage "https://lldpd.github.io/" + url "https://media.luffy.cx/files/lldpd/lldpd-1.0.19.tar.gz" + sha256 "f87df3163d5e5138da901d055b384009785d1eb50fdb17a2343910fcf30a997f" + license "ISC" + + livecheck do + url :homepage + regex(/href=.*?lldpd[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "59cc7f981a6fe7f35eb309d7fdeb5964015f051261c9a67cedb2cd55cdf58cda" + sha256 arm64_sonoma: "86793748eb50ee46faa3ba6243a46ddba2f12c5166d9d073483e32ee0c5082e9" + sha256 arm64_ventura: "a05f4c8be6b40da8dbc10ec8275ecf4a070e4f3323b88f346f2af0a3915ad744" + sha256 sonoma: "56faf4f3d7d021301e0c4cfc3f3839392dcc60580eef6640aa95b9e1d06c67b9" + sha256 ventura: "d0512084df8dff94554d29f70d007b87ebb5bdd2c38828e5f5a5df35efdd247f" + sha256 arm64_linux: "4209af75c9145720691edc613bd7b2b739b42e1f43afb029966452be50e7e92f" + sha256 x86_64_linux: "95e2f798c865fa7e2bea24e503f66ec931e7851ab9146e2f4c0821de360fe8c8" + end + + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "readline" + + uses_from_macos "libxml2" + + def install + readline = Formula["readline"] + args = %W[ + --prefix=#{prefix} + --sysconfdir=#{etc} + --localstatedir=#{var} + --with-launchddaemonsdir=no + --with-privsep-chroot=/var/empty + --with-privsep-group=nogroup + --with-privsep-user=nobody + --with-readline + --with-xml + --without-snmp + CPPFLAGS=-I#{readline.include}\ -DRONLY=1 + LDFLAGS=-L#{readline.lib} + ] + + system "./configure", *args + system "make" + system "make", "install" + end + + def post_install + (var/"run").mkpath + end + + service do + run opt_sbin/"lldpd" + keep_alive true + require_root true + end +end diff --git a/Formula/l/llgo.rb b/Formula/l/llgo.rb new file mode 100644 index 0000000000000..4682dc2568de8 --- /dev/null +++ b/Formula/l/llgo.rb @@ -0,0 +1,139 @@ +class Llgo < Formula + desc "Go compiler based on LLVM integrate with the C ecosystem and Python" + homepage "https://github.com/goplus/llgo" + url "https://github.com/goplus/llgo/archive/refs/tags/v0.11.3.tar.gz" + sha256 "6e51c300d49b33ce66f562b721fcf4f27d7ed6502382682d02b83786ba49e313" + license "Apache-2.0" + head "https://github.com/goplus/llgo.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "301657dfac614b209cd41e7aedd01cf62825c8e116646ee93d0e527425be39ef" + sha256 cellar: :any, arm64_sonoma: "58f7518f88c21c764fbe885a02327514603d452675a457da96932d8036bd7d44" + sha256 cellar: :any, arm64_ventura: "a658c43e1e63d797813cb58bde26a6f650adfd967614501b4899b67909ed5e35" + sha256 cellar: :any, sonoma: "adc0711a8f6bd9a31d4d17e8e50e72d29748428006b5816bccea197bb0c64bf6" + sha256 cellar: :any, ventura: "019af6713d1f25c979971a7759d5b50fdd2f25b4d41eac2bf93087a98863fb64" + sha256 x86_64_linux: "84a8c66af302faace3159e60537e9f1b7e40cbd1215deb3c5c4ef46d0d5d535a" + end + + depends_on "bdw-gc" + depends_on "go" + depends_on "libffi" + depends_on "libuv" + depends_on "lld@19" + depends_on "llvm@19" + depends_on "openssl@3" + depends_on "pkgconf" + uses_from_macos "zlib" + + on_linux do + depends_on "libunwind" + end + + def find_dep(name) + deps.map(&:to_formula).find { |f| f.name.match?(/^#{name}(@\d+)?$/) } + end + + def install + llvm = find_dep("llvm") + ldflags = %W[ + -s -w + -X github.com/goplus/llgo/internal/env.buildVersion=v#{version} + -X github.com/goplus/llgo/internal/env.buildTime=#{time.iso8601} + -X github.com/goplus/llgo/xtool/env/llvm.ldLLVMConfigBin=#{llvm.opt_bin/"llvm-config"} + ] + tags = nil + if OS.linux? + ENV.prepend "CGO_CPPFLAGS", + "-I#{llvm.opt_include} " \ + "-D_GNU_SOURCE " \ + "-D__STDC_CONSTANT_MACROS " \ + "-D__STDC_FORMAT_MACROS " \ + "-D__STDC_LIMIT_MACROS" + ENV.prepend "CGO_LDFLAGS", "-L#{llvm.opt_lib} -lLLVM" + tags = "byollvm" + end + + system "go", "build", *std_go_args(ldflags:, tags:), "-o", libexec/"bin/", "./cmd/llgo" + + libexec.install "LICENSE", "README.md", "go.mod", "go.sum", "runtime" + + path_deps = %w[lld llvm go pkgconf].map { |name| find_dep(name).opt_bin } + script_env = { PATH: "#{path_deps.join(":")}:$PATH" } + + if OS.linux? + libunwind = find_dep("libunwind") + script_env[:CFLAGS] = "-I#{libunwind.opt_include} $CFLAGS" + script_env[:LDFLAGS] = "-L#{libunwind.opt_lib} -rpath #{libunwind.opt_lib} $LDFLAGS" + end + + (libexec/"bin").children.each do |f| + next if f.directory? + + cmd = File.basename(f) + (bin/cmd).write_env_script libexec/"bin"/cmd, script_env + end + end + + test do + goos = shell_output("go env GOOS").chomp + goarch = shell_output("go env GOARCH").chomp + assert_equal "llgo v#{version} #{goos}/#{goarch}", shell_output("#{bin}/llgo version").chomp + + # Add bdw-gc library path to LD_LIBRARY_PATH, this is a workaround for the libgc.so not found issue + # Will be fixed in the next release + bdwgc = find_dep("bdw-gc") + ENV.prepend_path "LD_LIBRARY_PATH", bdwgc.opt_lib + + (testpath/"hello.go").write <<~GO + package main + + import ( + "fmt" + + "github.com/goplus/lib/c" + ) + + func Foo() string { + return "Hello LLGO by Foo" + } + + func main() { + fmt.Println("Hello LLGO by fmt.Println") + c.Printf(c.Str("Hello LLGO by c.Printf\\n")) + } + GO + (testpath/"hello_test.go").write <<~GO + package main + + import "testing" + + func Test_Foo(t *testing.T) { + got := Foo() + want := "Hello LLGO by Foo" + if got != want { + t.Errorf("foo() = %q, want %q", got, want) + } + } + GO + (testpath/"go.mod").write <<~GOMOD + module hello + GOMOD + system "go", "get", "github.com/goplus/lib" + # Test llgo run + assert_equal "Hello LLGO by fmt.Println\n" \ + "Hello LLGO by c.Printf\n", + shell_output("#{bin}/llgo run .") + # Test llgo build + system bin/"llgo", "build", "-o", "hello", "." + assert_equal "Hello LLGO by fmt.Println\n" \ + "Hello LLGO by c.Printf\n", + shell_output("./hello") + # Test llgo test + assert_match "PASS", shell_output("#{bin}/llgo test .") + end +end diff --git a/Formula/l/llm.rb b/Formula/l/llm.rb new file mode 100644 index 0000000000000..50e682fe85049 --- /dev/null +++ b/Formula/l/llm.rb @@ -0,0 +1,183 @@ +class Llm < Formula + include Language::Python::Virtualenv + + desc "Access large language models from the command-line" + homepage "https://llm.datasette.io/" + url "https://files.pythonhosted.org/packages/13/26/32f2936ad4efacaf3d401508c12c6214ec5e2d3a30cc24e216f2af6692ba/llm-0.25.tar.gz" + sha256 "fe0bbe759cd57c678f82cf525573281f4a954867f45c303a24c573d73fed137a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ec7f9934ed86e768a9a8dbf05925772b6d4233f156c5396b3354ce47fd26360a" + sha256 cellar: :any, arm64_sonoma: "d03c6fe04f0e5685e8102578917f6053d5280d755620f90e1439ecd6ca64173b" + sha256 cellar: :any, arm64_ventura: "5b0e11719d11e405bcf65a091af97a04d71b22720314fcc0d260a987bcfe6940" + sha256 cellar: :any, sonoma: "4786ce6a802e2ade6934ce18447764de857686dcb1f40563fa3020ba07c7cece" + sha256 cellar: :any, ventura: "c4725a6d8d3675fe711f7427b7219c0a68589e09dfbfb0f8adac6a26ca94ff8d" + sha256 cellar: :any_skip_relocation, arm64_linux: "46ea9c722ae6199398997fd5d99faa0a2a437bc300b4eeedb5786aa53964f4f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63f2e968ade02fa2bdb4e1eefde1b25385c39b6d5b80d8ea62085b2a5fef4adc" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/ca/c7/fb14dfac23e6e27170f8a94bf13355987d15f8db62df99146f81bf6b2508/condense_json-0.1.2.tar.gz" + sha256 "a161e1984122ad35801cc14ecfe2b38d9d638c8c089e04cb545d26300fdc485e" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "jiter" do + url "https://files.pythonhosted.org/packages/1e/c2/e4562507f52f0af7036da125bb699602ead37a2332af0788f8e0a3417f36/jiter-0.9.0.tar.gz" + sha256 "aadba0964deb424daa24492abc3d229c60c4a31bfee205aedbf1acc7639d7893" + end + + resource "openai" do + url "https://files.pythonhosted.org/packages/cc/c0/ea2e9a78bf88404b97e7b708f0823b4699ab2ee3f5564425b8531a890a43/openai-1.77.0.tar.gz" + sha256 "897969f927f0068b8091b4b041d1f8175bcf124f7ea31bab418bf720971223bc" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "puremagic" do + url "https://files.pythonhosted.org/packages/d6/de/c9dbb741a2e0e657147c6125699e4a2a3b9003840fed62528e17c87c0989/puremagic-1.29.tar.gz" + sha256 "67c115db3f63d43b13433860917b11e2b767e5eaec696a491be2fb544f224f7a" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "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/9a/db/e5e67aeca9c2420cb91f94007f30693cc3628ae9783a565fd33ffb3fbfdd/python_ulid-3.0.0.tar.gz" + sha256 "e50296a47dc8209d28629a22fc81ca26c00982c78934bd7766377ba37ea49a9f" + 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/70/dc/3976b322de9d2e87ed0007cf04cc7553969b6c7b3f48a565d0333748fbcd/setuptools-80.3.1.tar.gz" + sha256 "31e2c58dbb67c99c289f51c16d899afedae292b978f8051efaf6262d8212f927" + 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 "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 "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-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"llm", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + ENV["OPENAI_API_BASE"] = "https://openai-canned-completion.vercel.app/v1" + ENV["OPENAI_API_KEY"] = "x" + assert_match "Incorrect API key provided", shell_output("#{bin}/llm hello --no-log 2>&1", 1) + + assert_match "llm, version", shell_output("#{bin}/llm --version") + end +end diff --git a/Formula/l/llnode.rb b/Formula/l/llnode.rb new file mode 100644 index 0000000000000..17b0f99a25d62 --- /dev/null +++ b/Formula/l/llnode.rb @@ -0,0 +1,75 @@ +class Llnode < Formula + desc "LLDB plugin for live/post-mortem debugging of node.js apps" + homepage "https://github.com/nodejs/llnode" + url "https://github.com/nodejs/llnode/archive/refs/tags/v4.0.0.tar.gz" + sha256 "abc295c077443f823444faffb165ada4c6ca377f2b1af4c002e8a9eea0f30135" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "33bb56546706b569104a07631b10c2b57fd0c6a95ddb5cfc8fed017856e2f57a" + sha256 cellar: :any, arm64_sonoma: "7215a957ceb5664321af92bfcc1b8cc9e42ae9911a7b91ffacbd9127270b1552" + sha256 cellar: :any, arm64_ventura: "c11ee956c445277d3a77bfe5ab6b3fa9553c922aabf22731af6e2135d1c2b361" + sha256 cellar: :any, arm64_monterey: "e1c93fd5aefebd887138fd244b50db737433cc30c278c6d18a3e87f0d6316f29" + sha256 cellar: :any, arm64_big_sur: "a86c196564ac07429bc188fbeb4780d408865721cc7e929e9aceaf24f8e79109" + sha256 cellar: :any, sonoma: "3551ad8a5cc42a007da92190d786a92e3aacffa7c017ada497ddaef17dd3ab69" + sha256 cellar: :any, ventura: "ec584fb90528046e31353b134abf6e017a72da189ff394a72d3d9e1affc6b9f6" + sha256 cellar: :any, monterey: "0737158c515f49e2cb56c68df835f789daa8d13f5b85a9a300532078318a86e5" + sha256 cellar: :any, big_sur: "fb32b0d19ff9f0c760a79bafdc830f0574a85165601ab493a9b8c7737e5dfef7" + sha256 cellar: :any, catalina: "d8d1926e4447e8a07e56744001bccd5661fce6186fbb33e75218d11bf57c4908" + sha256 cellar: :any_skip_relocation, arm64_linux: "6259affcb6b5e18c934eae0510775580d184ca9e1e9a3c4a19c19400bdcb10b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "343c83b8b3a42ad4496c3866dda8da056a4cea95a09bebdec3280cbe3c301484" + end + + depends_on "llvm" => :build + depends_on "node" => [:build, :test] + depends_on "llvm" => :test if DevelopmentTools.clang_build_version == 1403 + uses_from_macos "llvm" + + def llnode_so(root = lib) + root/"llnode"/shared_library("llnode") + end + + def install + ENV.append_path "PATH", Formula["node"].libexec/"lib/node_modules/npm/node_modules/node-gyp/bin" + inreplace "Makefile", "node-gyp", "node-gyp.js" + + ENV["LLNODE_LLDB_INCLUDE_DIR"] = Formula["llvm"].opt_include + system "make", "plugin" + bin.install "llnode.js" => "llnode" + llnode_so.dirname.install shared_library("llnode") + + # Needed by the `llnode` script. + (lib/"node_modules/llnode").install_symlink llnode_so + end + + def caveats + llnode = llnode_so(opt_lib) + <<~EOS + `brew install llnode` does not link the plugin to LLDB PlugIns dir. + + To load this plugin in LLDB, one will need to either + + * Type `plugin load #{llnode}` on each run of lldb + * Install plugin into PlugIns dir manually (macOS only): + + mkdir -p "$HOME/Library/Application Support/LLDB/PlugIns" + ln -sf '#{llnode}' "$HOME/Library/Application Support/LLDB/PlugIns/" + EOS + end + + test do + ENV.prepend_path "PATH", Formula["llvm"].opt_bin if DevelopmentTools.clang_build_version == 1403 + lldb_out = pipe_output "lldb", <<~EOS + plugin load #{llnode_so} + help v8 + quit + EOS + assert_match "v8 bt", lldb_out + + llnode_out = pipe_output bin/"llnode", <<~EOS + help v8 + quit + EOS + assert_match "v8 bt", llnode_out + end +end diff --git a/Formula/l/llvm.rb b/Formula/l/llvm.rb new file mode 100644 index 0000000000000..b102822357d06 --- /dev/null +++ b/Formula/l/llvm.rb @@ -0,0 +1,836 @@ +class Llvm < Formula + desc "Next-gen compiler infrastructure" + homepage "https://llvm.org/" + # TODO: Rebase `clang-cl` patch. + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.4/llvm-project-20.1.4.src.tar.xz" + sha256 "a95365b02536ed4aef29b325c205dd89c268cba41503ab2fc05f81418613ab63" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + revision 1 + head "https://github.com/llvm/llvm-project.git", branch: "main" + + livecheck do + url :stable + regex(/^llvmorg[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0667ffd061d205a72185d22440f30c6a9e98ac8b1b2f09b022b93c893ae40298" + sha256 cellar: :any, arm64_sonoma: "7b1ea996ecb0cd8ef01675f8433bdea114011a1c09371f650fe0a654077e52f5" + sha256 cellar: :any, arm64_ventura: "e6265f0747fc7fe4eb1ce9ecd9ef22e424e9d48abf1557174c243d721f1640fb" + sha256 cellar: :any, sonoma: "84f59a3579e744f9b3dd23d279b6cc766d8c493066e147fcd2f68d1b5fd84d9d" + sha256 cellar: :any, ventura: "195d7206aad6cc25bc276dada61f0e78c3584d77fcbb7267ab596b033445ce03" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d1c4864a0f3e89e30698dc8df7321dcc893b89fafe48fe3374ea94ca80c712d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c7ae63af9ccee6db95ef0328658bee903f966d7e99f774a554a73d2abf2d37c" + end + + keg_only :provided_by_macos + + # https://llvm.org/docs/GettingStarted.html#requirement + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "swig" => :build + depends_on "python@3.13" + depends_on "xz" + depends_on "z3" + depends_on "zstd" + + uses_from_macos "libedit" + uses_from_macos "libffi", since: :catalina + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + depends_on "binutils" # needed for gold + depends_on "elfutils" # openmp requires + end + + def python3 + "python3.13" + end + + def clang_config_file_dir + etc/"clang" + end + + def install + # The clang bindings need a little help finding our libclang. + inreplace "clang/bindings/python/clang/cindex.py", + /^(\s*library_path\s*=\s*)None$/, + "\\1'#{lib}'" + + projects = %w[ + clang + clang-tools-extra + mlir + polly + ] + runtimes = %w[ + compiler-rt + libcxx + libcxxabi + libunwind + pstl + ] + + unless versioned_formula? + projects << "lldb" + + if OS.mac? + runtimes << "openmp" + else + projects << "openmp" + end + end + + python_versions = Formula.names + .select { |name| name.start_with? "python@" } + .map { |py| py.delete_prefix("python@") } + site_packages = Language::Python.site_packages(python3).delete_prefix("lib/") + + # Work around build failure (maybe from CMake 4 update) by using environment + # variable for https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_SYSROOT.html + # TODO: Consider if this should be handled in superenv as impacts other formulae + ENV["SDKROOT"] = MacOS.sdk_for_formula(self).path if OS.mac? && MacOS.sdk_root_needed? + + # Apple's libstdc++ is too old to build LLVM + ENV.libcxx if ENV.compiler == :clang + + # compiler-rt has some iOS simulator features that require i386 symbols + # I'm assuming the rest of clang needs support too for 32-bit compilation + # to work correctly, but if not, perhaps universal binaries could be + # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt + # can almost be treated as an entirely different build from llvm. + ENV.permit_arch_flags + + # we install the lldb Python module into libexec to prevent users from + # accidentally importing it with a non-Homebrew Python or a Homebrew Python + # in a non-default prefix. See https://lldb.llvm.org/resources/caveats.html + args = %W[ + -DLLVM_ENABLE_PROJECTS=#{projects.join(";")} + -DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")} + -DLLVM_POLLY_LINK_INTO_TOOLS=ON + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_ENABLE_EH=OFF + -DLLVM_ENABLE_FFI=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_INCLUDE_DOCS=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_ENABLE_Z3_SOLVER=#{versioned_formula? ? "OFF" : "ON"} + -DLLVM_OPTIMIZED_TABLEGEN=ON + -DLLVM_TARGETS_TO_BUILD=all + -DLLVM_USE_RELATIVE_PATHS_IN_FILES=ON + -DLLVM_SOURCE_PREFIX=. + -DLLDB_USE_SYSTEM_DEBUGSERVER=ON + -DLLDB_ENABLE_PYTHON=ON + -DLLDB_ENABLE_LUA=OFF + -DLLDB_ENABLE_LZMA=ON + -DLLDB_PYTHON_RELATIVE_PATH=libexec/#{site_packages} + -DLIBOMP_INSTALL_ALIASES=OFF + -DLIBCXX_INSTALL_MODULES=ON + -DCLANG_PYTHON_BINDINGS_VERSIONS=#{python_versions.join(";")} + -DLLVM_CREATE_XCODE_TOOLCHAIN=OFF + -DCLANG_FORCE_MATCHING_LIBCLANG_SOVERSION=OFF + -DCLANG_CONFIG_FILE_SYSTEM_DIR=#{clang_config_file_dir.relative_path_from(bin)} + -DCLANG_CONFIG_FILE_USER_DIR=~/.config/clang + ] + + if tap.present? + args += %W[ + -DPACKAGE_VENDOR=#{tap.user} + -DBUG_REPORT_URL=#{tap.issues_url} + ] + args << "-DCLANG_VENDOR_UTI=sh.brew.clang" if tap.official? + end + + runtimes_cmake_args = [] + builtins_cmake_args = [] + + if OS.mac? + macos_sdk = MacOS.sdk_path_if_needed + if MacOS.version >= :catalina + args << "-DFFI_INCLUDE_DIR=#{macos_sdk}/usr/include/ffi" + args << "-DFFI_LIBRARY_DIR=#{macos_sdk}/usr/lib" + end + + libcxx_install_libdir = lib/"c++" + libunwind_install_libdir = lib/"unwind" + libcxx_rpaths = [loader_path, rpath(source: libcxx_install_libdir, target: libunwind_install_libdir)] + + args << "-DLLVM_BUILD_LLVM_C_DYLIB=ON" + args << "-DLLVM_ENABLE_LIBCXX=ON" + args << "-DLIBCXX_PSTL_BACKEND=libdispatch" + args << "-DLIBCXX_INSTALL_LIBRARY_DIR=#{libcxx_install_libdir}" + args << "-DLIBUNWIND_INSTALL_LIBRARY_DIR=#{libunwind_install_libdir}" + args << "-DLIBCXXABI_INSTALL_LIBRARY_DIR=#{libcxx_install_libdir}" + runtimes_cmake_args << "-DCMAKE_INSTALL_RPATH=#{libcxx_rpaths.join("|")}" + + # Disable builds for OSes not supported by the CLT SDK. + clt_sdk_support_flags = %w[I WATCH TV].map { |os| "-DCOMPILER_RT_ENABLE_#{os}OS=OFF" } + builtins_cmake_args += clt_sdk_support_flags + else + args << "-DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_include}" + args << "-DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib}" + + # Disable `libxml2` which isn't very useful. + args << "-DLLVM_ENABLE_LIBXML2=OFF" + args << "-DLLVM_ENABLE_LIBCXX=OFF" + args << "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++" + # Enable llvm gold plugin for LTO + args << "-DLLVM_BINUTILS_INCDIR=#{Formula["binutils"].opt_include}" + # Parts of Polly fail to correctly build with PIC when being used for DSOs. + args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + runtimes_cmake_args += %w[ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON + -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON + -DLIBCXX_USE_COMPILER_RT=ON + -DLIBCXX_HAS_ATOMIC_LIB=OFF + + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON + -DLIBCXXABI_USE_COMPILER_RT=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + + -DLIBUNWIND_USE_COMPILER_RT=ON + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON + -DCOMPILER_RT_USE_LLVM_UNWINDER=ON + + -DSANITIZER_CXX_ABI=libc++ + -DSANITIZER_TEST_CXX=libc++ + ] + + # Prevent compiler-rt from building i386 targets, as this is not portable. + builtins_cmake_args << "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" + end + + # Skip the PGO build on HEAD installs, non-bottle source builds, or versioned formulae. + # Catalina and earlier requires too many hacks to build with PGO. + pgo_build = build.stable? && build.bottle? && OS.mac? && (MacOS.version > :catalina) && !versioned_formula? + lto_build = pgo_build && OS.mac? + + if ENV.cflags.present? + args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" unless pgo_build + runtimes_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + builtins_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + end + + if ENV.cxxflags.present? + args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" unless pgo_build + runtimes_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + builtins_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + end + + args << "-DRUNTIMES_CMAKE_ARGS=#{runtimes_cmake_args.join(";")}" if runtimes_cmake_args.present? + args << "-DBUILTINS_CMAKE_ARGS=#{builtins_cmake_args.join(";")}" if builtins_cmake_args.present? + + llvmpath = buildpath/"llvm" + if pgo_build + # We build LLVM a few times first for optimisations. See + # https://github.com/Homebrew/homebrew-core/issues/77975 + + # PGO build adapted from: + # https://llvm.org/docs/HowToBuildWithPGO.html#building-clang-with-pgo + # https://github.com/llvm/llvm-project/blob/33ba8bd2/llvm/utils/collect_and_build_with_pgo.py + # https://github.com/facebookincubator/BOLT/blob/01f471e7/docs/OptimizingClang.md + + # We build the basic parts of a toolchain to profile. + # The extra targets on macOS are part of a default Compiler-RT build. + extra_args = [ + "-DLLVM_TARGETS_TO_BUILD=Native#{";AArch64;ARM;X86" if OS.mac?}", + "-DLLVM_ENABLE_PROJECTS=clang;lld", + "-DLLVM_ENABLE_RUNTIMES=compiler-rt", + ] + + # Our stage1 compiler includes the minimum necessary to bootstrap. + # `llvm-profdata` is needed for profile data pre-processing, and + # `compiler-rt` to consume profile data. + stage1_targets = ["clang", "llvm-profdata", "compiler-rt"] + stage1_targets += if OS.mac? + extra_args << "-DLLVM_ENABLE_LIBCXX=ON" + extra_args += clt_sdk_support_flags + + args << "-DLLVM_ENABLE_LTO=Thin" if lto_build + # LTO creates object files not recognised by Apple libtool. + args << "-DCMAKE_LIBTOOL=#{llvmpath}/stage1/bin/llvm-libtool-darwin" + + # These are needed to enable LTO. + ["llvm-libtool-darwin", "LTO"] + else + # Make sure CMake doesn't try to pass C++-only flags to C compiler. + extra_args << "-DCMAKE_C_COMPILER=#{ENV.cc}" + extra_args << "-DCMAKE_CXX_COMPILER=#{ENV.cxx}" + + # We use this as the linker on Linux to control RPATH. + ["lld"] + end + + cflags = ENV.cflags&.split || [] + cxxflags = ENV.cxxflags&.split || [] + extra_args << "-DCMAKE_C_FLAGS=#{cflags.join(" ")}" unless cflags.empty? + extra_args << "-DCMAKE_CXX_FLAGS=#{cxxflags.join(" ")}" unless cxxflags.empty? + + # First, build a stage1 compiler. It might be possible to skip this step on macOS + # and use system Clang instead, but this stage does not take too long, and we want + # to avoid incompatibilities from generating profile data with a newer Clang than + # the one we consume the data with. + mkdir llvmpath/"stage1" do + system "cmake", "-G", "Ninja", "..", *extra_args, *std_cmake_args + system "cmake", "--build", ".", "--target", *stage1_targets + end + + # Barring the stage where we generate the profile data, there is no benefit to + # rebuilding these. + extra_args << "-DCLANG_TABLEGEN=#{llvmpath}/stage1/bin/clang-tblgen" + extra_args << "-DLLVM_TABLEGEN=#{llvmpath}/stage1/bin/llvm-tblgen" + + if OS.linux? + # Make sure brewed glibc will be used if it is installed. + linux_library_paths = [ + Formula["glibc"].opt_lib, + HOMEBREW_PREFIX/"lib", + ] + linux_linker_flags = linux_library_paths.map { |path| "-L#{path} -Wl,-rpath,#{path}" } + # Add opt_libs for dependencies to RPATH. + linux_linker_flags += deps.map(&:to_formula).map { |dep| "-Wl,-rpath,#{dep.opt_lib}" } + + [args, extra_args].each do |arg_array| + # Add the linker paths to the arguments passed to the temporary compilers and installed toolchain. + arg_array << "-DCMAKE_EXE_LINKER_FLAGS=#{linux_linker_flags.join(" ")}" + arg_array << "-DCMAKE_MODULE_LINKER_FLAGS=#{linux_linker_flags.join(" ")}" + arg_array << "-DCMAKE_SHARED_LINKER_FLAGS=#{linux_linker_flags.join(" ")}" + + # Use stage1 lld instead of ld shim so that we can control RPATH. + arg_array << "-DLLVM_USE_LINKER=lld" + end + + # We also need to make sure we can find headers for other formulae on Linux. + linux_include_paths = [ + HOMEBREW_PREFIX/"include", + ] + linux_include_paths.each { |path| cxxflags << "-isystem#{path}" } + + # Unset CMAKE_C_COMPILER and CMAKE_CXX_COMPILER so we can set them below. + extra_args.reject! { |s| s[/CMAKE_C(XX)?_COMPILER/] } + extra_args.reject! { |s| s["CMAKE_CXX_FLAGS"] } + extra_args << "-DCMAKE_CXX_FLAGS=#{cxxflags.join(" ")}" + end + + # Next, build an instrumented stage2 compiler + mkdir llvmpath/"stage2" do + # LLVM Profile runs out of static counters + # https://reviews.llvm.org/D92669, https://reviews.llvm.org/D93281 + # Without this, the build produces many warnings of the form + # LLVM Profile Warning: Unable to track new values: Running out of static counters. + instrumented_cflags = cflags + %w[-Xclang -mllvm -Xclang -vp-counters-per-site=6] + instrumented_cxxflags = cxxflags + %w[-Xclang -mllvm -Xclang -vp-counters-per-site=6] + instrumented_extra_args = extra_args.reject { |s| s[/CMAKE_C(XX)?_FLAGS/] } + + system "cmake", "-G", "Ninja", "..", + "-DCMAKE_C_COMPILER=#{llvmpath}/stage1/bin/clang", + "-DCMAKE_CXX_COMPILER=#{llvmpath}/stage1/bin/clang++", + "-DLLVM_BUILD_INSTRUMENTED=IR", + "-DLLVM_BUILD_RUNTIME=NO", + "-DCMAKE_C_FLAGS=#{instrumented_cflags.join(" ")}", + "-DCMAKE_CXX_FLAGS=#{instrumented_cxxflags.join(" ")}", + *instrumented_extra_args, *std_cmake_args + system "cmake", "--build", ".", "--target", "clang", "lld", "runtimes" + + # We run some `check-*` targets to increase profiling + # coverage. These do not need to succeed. + # NOTE: If using `Unix Makefiles` generator, `-k 0` needs to replaced with `--keep-going`. + begin + system "cmake", "--build", ".", "--target", "check-clang", "check-llvm", "--", "-k", "0" + rescue BuildError + nil + end + end + + # Then, generate the profile data + mkdir llvmpath/"stage2-profdata" do + system "cmake", "-G", "Ninja", "..", + "-DCMAKE_C_COMPILER=#{llvmpath}/stage2/bin/clang", + "-DCMAKE_CXX_COMPILER=#{llvmpath}/stage2/bin/clang++", + "-DLLVM_BUILD_RUNTIMES=OFF", + *extra_args.reject { |s| s["TABLEGEN"] }, + *std_cmake_args + + # This build is for profiling, so it is safe to ignore errors. + # NOTE: If using `Unix Makefiles` generator, `-k 0` needs to replaced with `--keep-going`. + begin + system "cmake", "--build", ".", "--", "-k", "0" + rescue BuildError + nil + end + end + + # Merge the generated profile data + profpath = llvmpath/"stage2/profiles" + pgo_profile = profpath/"pgo_profile.prof" + system llvmpath/"stage1/bin/llvm-profdata", "merge", "-output=#{pgo_profile}", *profpath.glob("*.profraw") + + # Make sure to build with our profiled compiler and use the profile data + args << "-DCMAKE_C_COMPILER=#{llvmpath}/stage1/bin/clang" + args << "-DCMAKE_CXX_COMPILER=#{llvmpath}/stage1/bin/clang++" + args << "-DLLVM_PROFDATA_FILE=#{pgo_profile}" + # `llvm-tblgen` is an install target, so let's build that. + args << "-DCLANG_TABLEGEN=#{llvmpath}/stage1/bin/clang-tblgen" + + # Silence some warnings + cflags << "-Wno-backend-plugin" + cxxflags << "-Wno-backend-plugin" + + args << "-DCMAKE_C_FLAGS=#{cflags.join(" ")}" + args << "-DCMAKE_CXX_FLAGS=#{cxxflags.join(" ")}" + end + + # Now, we can build. + mkdir llvmpath/"build" do + system "cmake", "-G", "Ninja", "..", *(std_cmake_args + args) + system "cmake", "--build", "." + system "cmake", "--build", ".", "--target", "install" + end + + if OS.mac? + # Get the version from `llvm-config` to get the correct HEAD or RC version too. + llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip + soversion = Version.new(llvm_version).major.to_s + soversion << "git" if llvm_version.end_with?("git") + if (match = llvm_version.match(/-rc\d*$/)) + soversion << match[0] + end + + # Install versioned symlink, or else `llvm-config` doesn't work properly + lib.install_symlink "libLLVM.dylib" => "libLLVM-#{soversion}.dylib" + + # Install Xcode toolchain. See: + # https://github.com/llvm/llvm-project/blob/main/llvm/tools/xcode-toolchain/CMakeLists.txt + # We do this manually in order to avoid: + # 1. installing duplicates of files in the prefix + # 2. requiring an existing Xcode installation + xctoolchain = prefix/"Toolchains/LLVM#{llvm_version}.xctoolchain" + + system "/usr/libexec/PlistBuddy", "-c", "Add:CFBundleIdentifier string org.llvm.#{llvm_version}", "Info.plist" + system "/usr/libexec/PlistBuddy", "-c", "Add:CompatibilityVersion integer 2", "Info.plist" + xctoolchain.install "Info.plist" + (xctoolchain/"usr").install_symlink [bin, include, lib, libexec, share] + + # Install a major-versioned symlink that can be used across minor/patch version upgrades. + xctoolchain.parent.install_symlink xctoolchain.basename.to_s => "LLVM#{soversion}.xctoolchain" + + # Write config files for each macOS major version so that this works across OS upgrades. + MacOSVersion::SYMBOLS.each_value do |v| + macos_version = MacOSVersion.new(v) + write_config_files(macos_version, MacOSVersion.kernel_major_version(macos_version), Hardware::CPU.arch) + end + + # Also write an unversioned config file as fallback + write_config_files("", "", Hardware::CPU.arch) + end + + # Install Vim plugins + %w[ftdetect ftplugin indent syntax].each do |dir| + (share/"vim/vimfiles"/dir).install Pathname.glob("*/utils/vim/#{dir}/*.vim") + end + + # Install Emacs modes + elisp.install llvmpath.glob("utils/emacs/*.el") + share.glob("clang/*.el") + + return unless lto_build + + # Convert LTO-generated bitcode in our static archives to MachO. Adapted from Fedora: + # https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/brp-llvm-compile-lto-elf + lib.glob("*.a").each do |static_archive| + mktemp do + system bin/"llvm-ar", "x", static_archive + rebuilt_files = [] + + Pathname.glob("*.o").each do |bc_file| + file_type = Utils.safe_popen_read("file", "--brief", bc_file) + next unless file_type.match?(/^LLVM (IR )?bitcode/) + + rebuilt_files << bc_file + system bin/"clang", "-fno-lto", "-Wno-unused-command-line-argument", + "-x", "ir", bc_file, "-c", "-o", bc_file + end + + system bin/"llvm-ar", "r", static_archive, *rebuilt_files if rebuilt_files.present? + end + end + end + + # We use the extra layer of indirection in `arch` because the FormulaAudit/OnSystemConditionals + # doesn't want to let us use `Hardware::CPU.arch` outside of `install` or `post_install` blocks. + def write_config_files(macos_version, kernel_version, arch) + clang_config_file_dir.mkpath + + arches = Set.new([:arm64, :x86_64, :aarch64]) + arches << arch + + sysroot = if macos_version.blank? || (MacOS.version > macos_version && MacOS::CLT.separate_header_package?) + "#{MacOS::CLT::PKG_PATH}/SDKs/MacOSX.sdk" + elsif macos_version >= "10.14" + "#{MacOS::CLT::PKG_PATH}/SDKs/MacOSX#{macos_version}.sdk" + else + "/" + end + + { + darwin: kernel_version, + macosx: macos_version, + }.each do |system, version| + arches.each do |target_arch| + config_file = "#{target_arch}-apple-#{system}#{version}.cfg" + (clang_config_file_dir/config_file).atomic_write <<~CONFIG + -isysroot #{sysroot} + CONFIG + end + end + end + + def post_install + return unless OS.mac? + + config_files = { + darwin: OS.kernel_version.major, + macosx: MacOS.version, + }.map do |system, version| + clang_config_file_dir/"#{Hardware::CPU.arch}-apple-#{system}#{version}.cfg" + end + return if config_files.all?(&:exist?) + + write_config_files(MacOS.version, OS.kernel_version.major, Hardware::CPU.arch) + end + + def caveats + s = <<~EOS + CLANG_CONFIG_FILE_SYSTEM_DIR: #{clang_config_file_dir} + CLANG_CONFIG_FILE_USER_DIR: ~/.config/clang + + LLD is now provided in a separate formula: + brew install lld + EOS + + on_macos do + s += <<~EOS + + Using `clang`, `clang++`, etc., requires a CLT installation at `/Library/Developer/CommandLineTools`. + If you don't want to install the CLT, you can write appropriate configuration files pointing to your + SDK at ~/.config/clang. + + To use the bundled libunwind please use the following LDFLAGS: + LDFLAGS="-L#{opt_lib}/unwind -lunwind" + + To use the bundled libc++ please use the following LDFLAGS: + LDFLAGS="-L#{opt_lib}/c++ -L#{opt_lib}/unwind -lunwind" + + NOTE: You probably want to use the libunwind and libc++ provided by macOS unless you know what you're doing. + EOS + end + + s + end + + test do + alt_location_libs = [ + shared_library("libc++", "*"), + shared_library("libc++abi", "*"), + shared_library("libunwind", "*"), + ] + assert_empty lib.glob(alt_location_libs) if OS.mac? + + llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip + llvm_version_major = Version.new(llvm_version).major.to_s + soversion = llvm_version_major.dup + + if llvm_version.end_with?("git") + soversion << "git" + elsif (match = llvm_version.match(/-rc\d*$/)) + soversion << match[0] + else + assert_equal version, llvm_version + end + + assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp + assert_equal "-lLLVM-#{soversion}", shell_output("#{bin}/llvm-config --libs").chomp + assert_equal (lib/shared_library("libLLVM-#{soversion}")).to_s, + shell_output("#{bin}/llvm-config --libfiles").chomp + + (testpath/"test.c").write <<~C + #include + int main() + { + printf("Hello World!\\n"); + return 0; + } + C + + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + std::cout << "Hello World!" << std::endl; + return 0; + } + CPP + + system bin/"clang-cpp", "-v", "test.c" + system bin/"clang-cpp", "-v", "test.cpp" + + # Testing default toolchain and SDK location. + system bin/"clang++", "-v", + "-std=c++11", "test.cpp", "-o", "test++" + assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" if OS.mac? + assert_equal "Hello World!", shell_output("./test++").chomp + system bin/"clang", "-v", "test.c", "-o", "test" + assert_equal "Hello World!", shell_output("./test").chomp + + # These tests should ignore the usual SDK includes + with_env(CPATH: nil) do + # Testing Command Line Tools + if OS.mac? && MacOS::CLT.installed? + toolchain_path = "/Library/Developer/CommandLineTools" + cpp_base = (MacOS.version >= :big_sur) ? MacOS::CLT.sdk_path : toolchain_path + system bin/"clang++", "-v", + "--no-default-config", + "-isysroot", MacOS::CLT.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::CLT.sdk_path}/usr/include", + "-isystem", "#{toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testCLT++" + assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testCLT++").chomp + system bin/"clang", "-v", "test.c", "-o", "testCLT" + assert_equal "Hello World!", shell_output("./testCLT").chomp + + targets = ["#{Hardware::CPU.arch}-apple-macosx#{MacOS.full_version}"] + + # The test tends to time out on Intel, so let's do these only for ARM macOS. + if Hardware::CPU.arm? + old_macos_version = HOMEBREW_MACOS_OLDEST_SUPPORTED.to_i - 1 + targets << "#{Hardware::CPU.arch}-apple-macosx#{old_macos_version}" + + old_kernel_version = MacOSVersion.kernel_major_version(MacOSVersion.new(old_macos_version.to_s)) + targets << "#{Hardware::CPU.arch}-apple-darwin#{old_kernel_version}" + end + + targets.each do |target| + system bin/"clang-cpp", "-v", "--target=#{target}", "test.c" + system bin/"clang-cpp", "-v", "--target=#{target}", "test.cpp" + + system bin/"clang", "-v", "--target=#{target}", "test.c", "-o", "test-macosx" + assert_equal "Hello World!", shell_output("./test-macosx").chomp + + system bin/"clang++", "-v", "--target=#{target}", "-std=c++11", "test.cpp", "-o", "test++-macosx" + assert_equal "Hello World!", shell_output("./test++-macosx").chomp + end + end + + # Testing Xcode + if OS.mac? && MacOS::Xcode.installed? + cpp_base = (MacOS::Xcode.version >= "12.5") ? MacOS::Xcode.sdk_path : MacOS::Xcode.toolchain_path + system bin/"clang++", "-v", + "--no-default-config", + "-isysroot", MacOS::Xcode.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::Xcode.sdk_path}/usr/include", + "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testXC++" + assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testXC++").chomp + system bin/"clang", "-v", + "-isysroot", MacOS.sdk_path, + "test.c", "-o", "testXC" + assert_equal "Hello World!", shell_output("./testXC").chomp + end + + # link against installed libc++ + # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 + cxx_libdir = OS.mac? ? opt_lib/"c++" : opt_lib + system bin/"clang++", "-v", + "-isystem", "#{opt_include}/c++/v1", + "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", + "-rtlib=compiler-rt", "-L#{cxx_libdir}", "-Wl,-rpath,#{cxx_libdir}" + assert_includes (testpath/"testlibc++").dynamically_linked_libraries, + (cxx_libdir/shared_library("libc++", "1")).to_s + (testpath/"testlibc++").dynamically_linked_libraries.each do |lib| + refute_match(/libstdc\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + end + assert_equal "Hello World!", shell_output("./testlibc++").chomp + end + + if OS.linux? + # Link installed libc++, libc++abi, and libunwind archives both into + # a position independent executable (PIE), as well as into a fully + # position independent (PIC) DSO for things like plugins that export + # a C-only API but internally use C++. + # + # FIXME: It'd be nice to be able to use flags like `-static-libstdc++` + # together with `-stdlib=libc++` (the latter one we need anyways for + # headers) to achieve this but those flags don't set up the correct + # search paths or handle all of the libraries needed by `libc++` when + # linking statically. + + system bin/"clang++", "-v", "-o", "test_pie_runtimes", + "-pie", "-fPIC", "test.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + assert_equal "Hello World!", shell_output("./test_pie_runtimes").chomp + (testpath/"test_pie_runtimes").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + + (testpath/"test_plugin.cpp").write <<~CPP + #include + __attribute__((visibility("default"))) + extern "C" void run_plugin() { + std::cout << "Hello Plugin World!" << std::endl; + } + CPP + (testpath/"test_plugin_main.c").write <<~C + extern void run_plugin(); + int main() { + run_plugin(); + } + C + system bin/"clang++", "-v", "-o", "test_plugin.so", + "-shared", "-fPIC", "test_plugin.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + system bin/"clang", "-v", + "test_plugin_main.c", "-o", "test_plugin_libc++", + "test_plugin.so", "-Wl,-rpath=#{testpath}", "-rtlib=compiler-rt" + assert_equal "Hello Plugin World!", shell_output("./test_plugin_libc++").chomp + (testpath/"test_plugin.so").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + end + + # Testing mlir + (testpath/"test.mlir").write <<~MLIR + func.func @main() {return} + + // ----- + + // expected-note @+1 {{see existing symbol definition here}} + func.func @foo() { return } + + // ---- + + // expected-error @+1 {{redefinition of symbol named 'foo'}} + func.func @foo() { return } + MLIR + system bin/"mlir-opt", "--split-input-file", "--verify-diagnostics", "test.mlir" + + (testpath/"scanbuildtest.cpp").write <<~CPP + #include + int main() { + int *i = new int; + *i = 1; + delete i; + std::cout << *i << std::endl; + return 0; + } + CPP + assert_includes shell_output("#{bin}/scan-build make scanbuildtest 2>&1"), + "warning: Use of memory after it is freed" + + (testpath/"clangformattest.c").write <<~C + int main() { + printf("Hello world!"); } + C + assert_equal "int main() { printf(\"Hello world!\"); }\n", + shell_output("#{bin}/clang-format -style=google clangformattest.c") + + # This will fail if the clang bindings cannot find `libclang`. + with_env(PYTHONPATH: prefix/Language::Python.site_packages(python3)) do + system python3, "-c", <<~PYTHON + from clang import cindex + cindex.Config().get_cindex_library() + PYTHON + end + + unless versioned_formula? + (testpath/"omptest.c").write <<~C + #include + #include + #include + int main() { + #pragma omp parallel num_threads(4) + { + printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); + } + return EXIT_SUCCESS; + } + C + + rpath_flag = "-Wl,-rpath,#{lib/Utils.safe_popen_read(bin/"clang", "--print-target-triple").chomp}" if OS.linux? + system bin/"clang", "-L#{lib}", "-fopenmp", "-nobuiltininc", + "-I#{lib}/clang/#{llvm_version_major}/include", + rpath_flag.to_s, "omptest.c", "-o", "omptest" + testresult = shell_output("./omptest") + + sorted_testresult = testresult.split("\n").sort.join("\n") + expected_result = <<~EOS + Hello from thread 0, nthreads 4 + Hello from thread 1, nthreads 4 + Hello from thread 2, nthreads 4 + Hello from thread 3, nthreads 4 + EOS + assert_equal expected_result.strip, sorted_testresult.strip + + # Test static analyzer + (testpath/"unreachable.c").write <<~C + unsigned int func(unsigned int a) { + unsigned int *z = 0; + if ((a & 1) && ((a & 1) ^1)) + return *z; // unreachable + return 0; + } + C + system bin/"clang", "--analyze", "-Xanalyzer", "-analyzer-constraints=z3", "unreachable.c" + + # Check that lldb can use Python + lldb_script_interpreter_info = JSON.parse(shell_output("#{bin}/lldb --print-script-interpreter-info")) + assert_equal "python", lldb_script_interpreter_info["language"] + python_test_cmd = "import pathlib, sys; print(pathlib.Path(sys.prefix).resolve())" + assert_match shell_output("#{python3} -c '#{python_test_cmd}'"), + pipe_output("#{bin}/lldb", <<~EOS) + script + #{python_test_cmd} + EOS + end + + # Ensure LLVM did not regress output of `llvm-config --system-libs` which for a time + # was known to output incorrect linker flags; e.g., `-llibxml2.tbd` instead of `-lxml2`. + # On the other hand, note that a fully qualified path to `dylib` or `tbd` is OK, e.g., + # `/usr/local/lib/libxml2.tbd` or `/usr/local/lib/libxml2.dylib`. + abs_path_exts = [".tbd", ".dylib"] + shell_output("#{bin}/llvm-config --system-libs").chomp.strip.split.each do |lib| + if lib.start_with?("-l") + assert !lib.end_with?(".tbd"), "expected abs path when lib reported as .tbd" + assert !lib.end_with?(".dylib"), "expected abs path when lib reported as .dylib" + else + p = Pathname.new(lib) + if abs_path_exts.include?(p.extname) + assert p.absolute?, "expected abs path when lib reported as .tbd or .dylib" + end + end + end + end +end diff --git a/Formula/l/llvm@12.rb b/Formula/l/llvm@12.rb new file mode 100644 index 0000000000000..f22f7e3450d1a --- /dev/null +++ b/Formula/l/llvm@12.rb @@ -0,0 +1,428 @@ +class LlvmAT12 < Formula + desc "Next-gen compiler infrastructure" + homepage "https://llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/llvm-project-12.0.1.src.tar.xz" + sha256 "129cb25cd13677aad951ce5c2deb0fe4afc1e9d98950f53b51bdcfb5a73afa0e" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_ventura: "a450c4527222e41c437ea4986d12d808b26af73bb72cf90ac0e4aab91a72061c" + sha256 cellar: :any, arm64_monterey: "ff433ce6b78be82fae375dc3735c19272a14d7f62f0724e31d5e6fb438716700" + sha256 cellar: :any, arm64_big_sur: "4424885d3b2d3dbfef7a9ceb64e4d6f325f6aa88b66a334f89409c27a6054787" + sha256 cellar: :any, ventura: "e59faa5fc23a597bfc3d9649bfe968bdaa3f753ab125ef4fad40484ebb0a16ca" + sha256 cellar: :any, monterey: "ea1bd6a3e69f76a43f7acb9ca9e2fb4ef14c444cfc854ccba4188e88b6a28c8b" + sha256 cellar: :any, big_sur: "4635d7fab2baae3b65c031c7d9afb107554a9e529347160164c44ae960726699" + sha256 cellar: :any, catalina: "ac5f61a1bc47001ebb52dec1a3278b4fce04a1a579b855245a3aa533cff63ad3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8786b4ef7bd5d287feda6aa51aedd29a1856116895f1893066b44040e2a81c87" + end + + # Clang cannot find system headers if Xcode CLT is not installed + pour_bottle? only_if: :clt_installed + + keg_only :versioned_formula + + disable! date: "2025-07-01", because: :versioned_formula + + # https://llvm.org/docs/GettingStarted.html#requirement + # We intentionally use Make instead of Ninja. + # See: Homebrew/homebrew-core/issues/35513 + depends_on "cmake" => :build + # sanitizer_mac.cpp:615:15: error: constexpr function never produces a constant expression [-Winvalid-constexpr] + # constexpr u16 GetOSMajorKernelOffset() { + # ^ + # sanitizer_mac.cpp:619:1: note: control reached end of constexpr function + depends_on maximum_macos: [:ventura, :build] + depends_on "python@3.11" => :build + depends_on "swig" => :build + + uses_from_macos "libedit" + uses_from_macos "libffi", since: :catalina + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + depends_on "binutils" # needed for gold + depends_on "elfutils" # openmp requires + depends_on "glibc" if Formula["glibc"].any_version_installed? + + # Apply patches slated for the 12.0.x release stream + # to allow building with GCC 5 and 6. Upstream bug: + # https://bugs.llvm.org/show_bug.cgi?id=50732 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/f0b8ff8b7ad4c2e1d474b214cd615a98e0caa796/llvm/llvm.patch" + sha256 "084adce7711b07d94197a75fb2162b253186b38d612996eeb6e2bc9ce5b1e6e2" + end + end + + # Fix crash in clangd when built with GCC <6. Remove in LLVM 13 + # https://github.com/clangd/clangd/issues/800 + # https://github.com/Homebrew/homebrew-core/issues/84365 + patch do + url "https://github.com/llvm/llvm-project/commit/ec1fb9533305e9bd69294ede7e5e7d9befbb2225.patch?full_index=1" + sha256 "b80a5718420c789588f3392366ac15485e43bea8e81adb14424c3cad4afa7315" + end + + # Fix parallel builds. Remove in LLVM 13. + # https://reviews.llvm.org/D106305 + # https://lists.llvm.org/pipermail/llvm-dev/2021-July/151665.html + patch do + url "https://github.com/llvm/llvm-project/commit/b31080c596246bc26d2493cfd5e07f053cf9541c.patch?full_index=1" + sha256 "b4576303404e68100dc396d2414d6740c5bfd0162979d22152a688d1e7307379" + end + + def install + python3 = "python3.11" + + projects = %w[ + clang + clang-tools-extra + lld + mlir + polly + openmp + ] + # LLDB fails to build on arm64 linux: + # NativeRegisterContextLinux_arm.cpp:60:64: error: no matching function for call to + # 'lldb_private::process_linux::NativeRegisterContextLinux::NativeRegisterContextLinux()' + projects << "lldb" if !OS.linux? || !Hardware::CPU.arm? + runtimes = %w[ + compiler-rt + libcxx + libcxxabi + libunwind + ] + + py_ver = Language::Python.major_minor_version(python3) + site_packages = Language::Python.site_packages(python3).delete_prefix("lib/") + + # Apple's libstdc++ is too old to build LLVM + ENV.libcxx if ENV.compiler == :clang + + # compiler-rt has some iOS simulator features that require i386 symbols + # I'm assuming the rest of clang needs support too for 32-bit compilation + # to work correctly, but if not, perhaps universal binaries could be + # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt + # can almost be treated as an entirely different build from llvm. + ENV.permit_arch_flags + + args = %W[ + -DLLVM_ENABLE_PROJECTS=#{projects.join(";")} + -DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")} + -DLLVM_POLLY_LINK_INTO_TOOLS=ON + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_FFI=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_INCLUDE_DOCS=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_ENABLE_Z3_SOLVER=OFF + -DLLVM_OPTIMIZED_TABLEGEN=ON + -DLLVM_TARGETS_TO_BUILD=all + -DLLDB_USE_SYSTEM_DEBUGSERVER=ON + -DLLDB_ENABLE_PYTHON=OFF + -DLLDB_ENABLE_LUA=OFF + -DLLDB_ENABLE_LZMA=OFF + -DLIBOMP_INSTALL_ALIASES=OFF + -DCLANG_PYTHON_BINDINGS_VERSIONS=#{py_ver} + -DLLVM_CREATE_XCODE_TOOLCHAIN=#{MacOS::Xcode.installed? ? "ON" : "OFF"} + -DPACKAGE_VENDOR=#{tap.user} + -DBUG_REPORT_URL=#{tap.issues_url} + -DCLANG_VENDOR_UTI=org.#{tap.user.downcase}.clang + ] + + # gcc-5 fails at building compiler-rt. Enable PGO + # build on Linux when we switch to Ubuntu 18.04. + if OS.mac? + macos_sdk = MacOS.sdk_path_if_needed + if MacOS.version >= :catalina + args << "-DFFI_INCLUDE_DIR=#{macos_sdk}/usr/include/ffi" + args << "-DFFI_LIBRARY_DIR=#{macos_sdk}/usr/lib" + end + + args << "-DLLVM_BUILD_LLVM_C_DYLIB=ON" + args << "-DLLVM_ENABLE_LIBCXX=ON" + args << "-DRUNTIMES_CMAKE_ARGS=-DCMAKE_INSTALL_RPATH=#{rpath}" + args << "-DDEFAULT_SYSROOT=#{macos_sdk}" if macos_sdk + else + ENV.append_to_cflags "-fpermissive -Wno-free-nonheap-object" + + args << "-DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_include}" + args << "-DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib}" + + # Disable `libxml2`, which isn't very useful. + args << "-DLLVM_ENABLE_LIBXML2=OFF" + args << "-DLLVM_ENABLE_LIBCXX=OFF" + args << "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++" + # Enable llvm gold plugin for LTO + args << "-DLLVM_BINUTILS_INCDIR=#{Formula["binutils"].opt_include}" + # Parts of Polly fail to correctly build with PIC when being used for DSOs. + args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + runtime_args = %w[ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON + -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON + -DLIBCXX_USE_COMPILER_RT=ON + -DLIBCXX_HAS_ATOMIC_LIB=OFF + + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON + -DLIBCXXABI_USE_COMPILER_RT=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + + -DLIBUNWIND_USE_COMPILER_RT=ON + ] + args << "-DRUNTIMES_CMAKE_ARGS=#{runtime_args.join(";")}" + end + + llvmpath = buildpath/"llvm" + mkdir llvmpath/"build" do + system "cmake", "-G", "Unix Makefiles", "..", *(std_cmake_args + args) + system "cmake", "--build", "." + system "cmake", "--build", ".", "--target", "install" + system "cmake", "--build", ".", "--target", "install-xcode-toolchain" if MacOS::Xcode.installed? + end + + # Install versioned symlink, or else `llvm-config` doesn't work properly + lib.install_symlink "libLLVM.dylib" => "libLLVM-#{version.major}.dylib" if OS.mac? + + # Install LLVM Python bindings + # Clang Python bindings are installed by CMake + (lib/site_packages).install llvmpath/"bindings/python/llvm" + + # Install Vim plugins + %w[ftdetect ftplugin indent syntax].each do |dir| + (share/"vim/vimfiles"/dir).install Dir["*/utils/vim/#{dir}/*.vim"] + end + + # Install Emacs modes + elisp.install Dir[llvmpath/"utils/emacs/*.el"] + Dir[share/"clang/*.el"] + end + + def caveats + <<~EOS + To use the bundled libc++ please add the following LDFLAGS: + LDFLAGS="-L#{opt_lib} -Wl,-rpath,#{opt_lib}" + EOS + end + + test do + assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp + assert_equal "-lLLVM-#{version.major}", shell_output("#{bin}/llvm-config --libs").chomp + assert_equal (lib/shared_library("libLLVM-#{version.major}")).to_s, + shell_output("#{bin}/llvm-config --libfiles").chomp + + (testpath/"omptest.c").write <<~C + #include + #include + #include + int main() { + #pragma omp parallel num_threads(4) + { + printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); + } + return EXIT_SUCCESS; + } + C + + clean_version = version.to_s[/(\d+\.?)+/] + + system bin/"clang", "-L#{lib}", "-fopenmp", "-nobuiltininc", + "-I#{lib}/clang/#{clean_version}/include", + "omptest.c", "-o", "omptest" + testresult = shell_output("./omptest") + + sorted_testresult = testresult.split("\n").sort.join("\n") + expected_result = <<~EOS + Hello from thread 0, nthreads 4 + Hello from thread 1, nthreads 4 + Hello from thread 2, nthreads 4 + Hello from thread 3, nthreads 4 + EOS + assert_equal expected_result.strip, sorted_testresult.strip + + (testpath/"test.c").write <<~C + #include + int main() + { + printf("Hello World!\\n"); + return 0; + } + C + + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + std::cout << "Hello World!" << std::endl; + return 0; + } + CPP + + # Testing default toolchain and SDK location. + system bin/"clang++", "-v", + "-std=c++11", "test.cpp", "-o", "test++" + assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" if OS.mac? + assert_equal "Hello World!", shell_output("./test++").chomp + system bin/"clang", "-v", "test.c", "-o", "test" + assert_equal "Hello World!", shell_output("./test").chomp + + # These tests should ignore the usual SDK includes + with_env(CPATH: nil) do + # Testing Command Line Tools + if OS.mac? && MacOS::CLT.installed? + toolchain_path = "/Library/Developer/CommandLineTools" + cpp_base = (MacOS.version >= :big_sur) ? MacOS::CLT.sdk_path : toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::CLT.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::CLT.sdk_path}/usr/include", + "-isystem", "#{toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testCLT++" + assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testCLT++").chomp + system bin/"clang", "-v", "test.c", "-o", "testCLT" + assert_equal "Hello World!", shell_output("./testCLT").chomp + end + + # Testing Xcode + if OS.mac? && MacOS::Xcode.installed? + cpp_base = (MacOS::Xcode.version >= "12.5") ? MacOS::Xcode.sdk_path : MacOS::Xcode.toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::Xcode.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::Xcode.sdk_path}/usr/include", + "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testXC++" + assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testXC++").chomp + system bin/"clang", "-v", + "-isysroot", MacOS.sdk_path, + "test.c", "-o", "testXC" + assert_equal "Hello World!", shell_output("./testXC").chomp + end + + # link against installed libc++ + # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 + system bin/"clang++", "-v", + "-isystem", "#{opt_include}/c++/v1", + "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", + "-rtlib=compiler-rt", "-L#{opt_lib}", "-Wl,-rpath,#{opt_lib}" + assert_includes (testpath/"testlibc++").dynamically_linked_libraries, + (opt_lib/shared_library("libc++", "1")).to_s + (testpath/"testlibc++").dynamically_linked_libraries.each do |lib| + refute_match(/libstdc\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + end + assert_equal "Hello World!", shell_output("./testlibc++").chomp + end + + if OS.linux? + # Link installed libc++, libc++abi, and libunwind archives both into + # a position independent executable (PIE), as well as into a fully + # position independent (PIC) DSO for things like plugins that export + # a C-only API but internally use C++. + # + # FIXME: It'd be nice to be able to use flags like `-static-libstdc++` + # together with `-stdlib=libc++` (the latter one we need anyways for + # headers) to achieve this but those flags don't set up the correct + # search paths or handle all of the libraries needed by `libc++` when + # linking statically. + + system bin/"clang++", "-v", "-o", "test_pie_runtimes", + "-pie", "-fPIC", "test.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + assert_equal "Hello World!", shell_output("./test_pie_runtimes").chomp + (testpath/"test_pie_runtimes").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + + (testpath/"test_plugin.cpp").write <<~CPP + #include + __attribute__((visibility("default"))) + extern "C" void run_plugin() { + std::cout << "Hello Plugin World!" << std::endl; + } + CPP + (testpath/"test_plugin_main.c").write <<~C + extern void run_plugin(); + int main() { + run_plugin(); + } + C + system bin/"clang++", "-v", "-o", "test_plugin.so", + "-shared", "-fPIC", "test_plugin.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + system bin/"clang", "-v", + "test_plugin_main.c", "-o", "test_plugin_libc++", + "test_plugin.so", "-Wl,-rpath=#{testpath}", "-rtlib=compiler-rt" + assert_equal "Hello Plugin World!", shell_output("./test_plugin_libc++").chomp + (testpath/"test_plugin.so").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + end + + # Testing mlir + (testpath/"test.mlir").write <<~MLIR + func @bad_branch() { + br ^missing // expected-error {{reference to an undefined block}} + } + MLIR + system bin/"mlir-opt", "--verify-diagnostics", "test.mlir" + + (testpath/"scanbuildtest.cpp").write <<~CPP + #include + int main() { + int *i = new int; + *i = 1; + delete i; + std::cout << *i << std::endl; + return 0; + } + CPP + assert_includes shell_output("#{bin}/scan-build #{bin}/clang++ scanbuildtest.cpp 2>&1"), + "warning: Use of memory after it is freed" + + (testpath/"clangformattest.c").write <<~C + int main() { + printf("Hello world!"); } + C + assert_equal "int main() { printf(\"Hello world!\"); }\n", + shell_output("#{bin}/clang-format -style=google clangformattest.c") + + # Ensure LLVM did not regress output of `llvm-config --system-libs` which for a time + # was known to output incorrect linker flags; e.g., `-llibxml2.tbd` instead of `-lxml2`. + # On the other hand, note that a fully qualified path to `dylib` or `tbd` is OK, e.g., + # `/usr/local/lib/libxml2.tbd` or `/usr/local/lib/libxml2.dylib`. + abs_path_exts = [".tbd", ".dylib"] + shell_output("#{bin}/llvm-config --system-libs").chomp.strip.split.each do |lib| + if lib.start_with?("-l") + assert !lib.end_with?(".tbd"), "expected abs path when lib reported as .tbd" + assert !lib.end_with?(".dylib"), "expected abs path when lib reported as .dylib" + else + p = Pathname.new(lib) + if abs_path_exts.include?(p.extname) + assert p.absolute?, "expected abs path when lib reported as .tbd or .dylib" + end + end + end + end +end diff --git a/Formula/l/llvm@13.rb b/Formula/l/llvm@13.rb new file mode 100644 index 0000000000000..256aa18d73e44 --- /dev/null +++ b/Formula/l/llvm@13.rb @@ -0,0 +1,494 @@ +class LlvmAT13 < Formula + desc "Next-gen compiler infrastructure" + homepage "https://llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/llvm-project-13.0.1.src.tar.xz" + sha256 "326335a830f2e32d06d0a36393b5455d17dc73e0bd1211065227ee014f92cbf8" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + revision 2 + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_sonoma: "db9efb0df5d75d654e23e0699cc26c0ccd2b873e2f4b806c9009f499e2f451da" + sha256 cellar: :any, arm64_ventura: "ef709ae700f432ef0276155a638829209fdcf962534a098a136104236b0f7a63" + sha256 cellar: :any, arm64_monterey: "aa340cdabef508ad825ff0536591509d358d0f415934ba60503d884a1394b1ae" + sha256 cellar: :any, sonoma: "8ab60dd1c20eb7703ead39f4941341e7d05a79070bd4371c935f32754ee3e452" + sha256 cellar: :any, ventura: "c35559d766684ab3bec45d5fb193889e5747559b881d8ce59b957143404a29c6" + sha256 cellar: :any, monterey: "eac8512d5dcaf83f34d9c50b9a9a0d136eb01660081e429bc44f748f68663362" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a6a082798274468805b9a1c19e165a9dd78d2043b80a2c97d289010967316a77" + end + + # Clang cannot find system headers if Xcode CLT is not installed + pour_bottle? only_if: :clt_installed + + keg_only :versioned_formula + + disable! date: "2024-12-31", because: :versioned_formula + + # https://llvm.org/docs/GettingStarted.html#requirement + # We intentionally use Make instead of Ninja. + # See: Homebrew/homebrew-core/issues/35513 + depends_on "cmake" => :build + # sanitizer_mac.cpp:635:15: error: constexpr function never produces a constant expression [-Winvalid-constexpr] + # constexpr u16 GetOSMajorKernelOffset() { + depends_on maximum_macos: [:sonoma, :build] + depends_on "python@3.11" => :build + + uses_from_macos "python" => :test + uses_from_macos "libedit" + uses_from_macos "libffi", since: :catalina + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + depends_on "binutils" # needed for gold + depends_on "elfutils" # openmp requires + end + + # Fix build with Xcode 15 + # https://github.com/spack/spack/issues/40158 + # Backport of https://reviews.llvm.org/D130060 + patch :DATA + + def install + python3 = "python3.11" + + # The clang bindings need a little help finding our libclang. + inreplace "clang/bindings/python/clang/cindex.py", + /^(\s*library_path\s*=\s*)None$/, + "\\1'#{lib}'" + + projects = %w[ + clang + clang-tools-extra + lld + lldb + mlir + polly + ] + runtimes = %w[ + compiler-rt + libcxx + libcxxabi + libunwind + ] + if OS.mac? + runtimes << "openmp" + else + projects << "openmp" + end + + python_versions = Formula.names + .select { |name| name.start_with? "python@" } + .map { |py| py.delete_prefix("python@") } + site_packages = Language::Python.site_packages(python3).delete_prefix("lib/") + + # Apple's libstdc++ is too old to build LLVM + ENV.libcxx if ENV.compiler == :clang + + # compiler-rt has some iOS simulator features that require i386 symbols + # I'm assuming the rest of clang needs support too for 32-bit compilation + # to work correctly, but if not, perhaps universal binaries could be + # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt + # can almost be treated as an entirely different build from llvm. + ENV.permit_arch_flags + + args = %W[ + -DLLVM_ENABLE_PROJECTS=#{projects.join(";")} + -DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")} + -DLLVM_POLLY_LINK_INTO_TOOLS=ON + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_FFI=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_INCLUDE_DOCS=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_ENABLE_Z3_SOLVER=OFF + -DLLVM_OPTIMIZED_TABLEGEN=ON + -DLLVM_TARGETS_TO_BUILD=all + -DLLDB_USE_SYSTEM_DEBUGSERVER=ON + -DLLDB_ENABLE_PYTHON=OFF + -DLLDB_ENABLE_LUA=OFF + -DLLDB_ENABLE_LZMA=OFF + -DLIBOMP_INSTALL_ALIASES=OFF + -DCLANG_PYTHON_BINDINGS_VERSIONS=#{python_versions.join(";")} + -DLLVM_CREATE_XCODE_TOOLCHAIN=OFF + -DPACKAGE_VENDOR=#{tap.user} + -DBUG_REPORT_URL=#{tap.issues_url} + -DCLANG_VENDOR_UTI=org.#{tap.user.downcase}.clang + ] + + runtimes_cmake_args = [] + builtins_cmake_args = [] + + if OS.mac? + macos_sdk = MacOS.sdk_path_if_needed + if MacOS.version >= :catalina + args << "-DFFI_INCLUDE_DIR=#{macos_sdk}/usr/include/ffi" + args << "-DFFI_LIBRARY_DIR=#{macos_sdk}/usr/lib" + end + + args << "-DLLVM_BUILD_LLVM_C_DYLIB=ON" + args << "-DLLVM_ENABLE_LIBCXX=ON" + args << "-DLIBCXX_INSTALL_LIBRARY_DIR=#{lib}/c++" + args << "-DLIBCXXABI_INSTALL_LIBRARY_DIR=#{lib}/c++" + args << "-DDEFAULT_SYSROOT=#{macos_sdk}" if macos_sdk + runtimes_cmake_args << "-DCMAKE_INSTALL_RPATH=#{loader_path}" + + # Prevent CMake from defaulting to `lld` when it's found next to `clang`. + # This can be removed after CMake 3.25. See: + # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7671 + args << "-DLLVM_USE_LINKER=ld" + [args, runtimes_cmake_args, builtins_cmake_args].each do |arg_array| + arg_array << "-DCMAKE_LINKER=ld" + end + else + args << "-DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_include}" + args << "-DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib}" + + # Disable `libxml2` which isn't very useful. + args << "-DLLVM_ENABLE_LIBXML2=OFF" + args << "-DLLVM_ENABLE_LIBCXX=OFF" + args << "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++" + # Enable llvm gold plugin for LTO + args << "-DLLVM_BINUTILS_INCDIR=#{Formula["binutils"].opt_include}" + # Parts of Polly fail to correctly build with PIC when being used for DSOs. + args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + runtimes_cmake_args += %w[ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON + -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON + -DLIBCXX_USE_COMPILER_RT=ON + -DLIBCXX_HAS_ATOMIC_LIB=OFF + + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON + -DLIBCXXABI_USE_COMPILER_RT=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + + -DLIBUNWIND_USE_COMPILER_RT=ON + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON + + -DSANITIZER_CXX_ABI=libc++ + -DSANITIZER_TEST_CXX=libc++ + ] + + # Prevent compiler-rt from building i386 targets, as this is not portable. + builtins_cmake_args << "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" + end + + if ENV.cflags.present? + args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + runtimes_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + builtins_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + end + + if ENV.cxxflags.present? + args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + runtimes_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + builtins_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + end + + args << "-DRUNTIMES_CMAKE_ARGS=#{runtimes_cmake_args.join(";")}" if runtimes_cmake_args.present? + args << "-DBUILTINS_CMAKE_ARGS=#{builtins_cmake_args.join(";")}" if builtins_cmake_args.present? + + llvmpath = buildpath/"llvm" + + # Now, we can build. + mkdir llvmpath/"build" do + system "cmake", "-G", "Unix Makefiles", "..", *(std_cmake_args + args) + system "cmake", "--build", "." + system "cmake", "--build", ".", "--target", "install" + end + + if OS.mac? + # Install versioned symlink, or else `llvm-config` doesn't work properly + lib.install_symlink "libLLVM.dylib" => "libLLVM-#{version.major}.dylib" + + # Install Xcode toolchain. See: + # https://github.com/llvm/llvm-project/blob/main/llvm/tools/xcode-toolchain/CMakeLists.txt + # We do this manually in order to avoid: + # 1. installing duplicates of files in the prefix + # 2. requiring an existing Xcode installation + xctoolchain = prefix/"Toolchains/LLVM#{version}.xctoolchain" + xcode_version = MacOS::Xcode.installed? ? MacOS::Xcode.version : Version.new(MacOS::Xcode.latest_version) + compat_version = (xcode_version < 8) ? "1" : "2" + + system "/usr/libexec/PlistBuddy", "-c", "Add:CFBundleIdentifier string org.llvm.#{version}", "Info.plist" + system "/usr/libexec/PlistBuddy", "-c", "Add:CompatibilityVersion integer #{compat_version}", "Info.plist" + xctoolchain.install "Info.plist" + (xctoolchain/"usr").install_symlink [bin, include, lib, libexec, share] + end + + # Install LLVM Python bindings + # Clang Python bindings are installed by CMake + (lib/site_packages).install llvmpath/"bindings/python/llvm" + + # Create symlinks so that the Python bindings can be used with alternative Python versions + python_versions.each do |py_ver| + next if py_ver == Language::Python.major_minor_version(python3).to_s + + (lib/"python#{py_ver}/site-packages").install_symlink (lib/site_packages).children + end + + # Install Vim plugins + %w[ftdetect ftplugin indent syntax].each do |dir| + (share/"vim/vimfiles"/dir).install Pathname.glob("*/utils/vim/#{dir}/*.vim") + end + + # Install Emacs modes + elisp.install llvmpath.glob("utils/emacs/*.el") + share.glob("clang/*.el") + end + + def caveats + on_macos do + <<~EOS + To use the bundled libc++ please add the following LDFLAGS: + LDFLAGS="-L#{opt_lib}/c++ -Wl,-rpath,#{opt_lib}/c++" + EOS + end + end + + test do + llvm_version = Version.new(Utils.safe_popen_read(bin/"llvm-config", "--version").strip) + soversion = llvm_version.major.to_s + + assert_equal version, llvm_version + assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp + assert_equal "-lLLVM-#{soversion}", shell_output("#{bin}/llvm-config --libs").chomp + assert_equal (lib/shared_library("libLLVM-#{soversion}")).to_s, + shell_output("#{bin}/llvm-config --libfiles").chomp + + (testpath/"omptest.c").write <<~C + #include + #include + #include + int main() { + #pragma omp parallel num_threads(4) + { + printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); + } + return EXIT_SUCCESS; + } + C + + system bin/"clang", "-L#{lib}", "-fopenmp", "-nobuiltininc", + "-I#{lib}/clang/#{llvm_version.major_minor_patch}/include", + "omptest.c", "-o", "omptest" + testresult = shell_output("./omptest") + + sorted_testresult = testresult.split("\n").sort.join("\n") + expected_result = <<~EOS + Hello from thread 0, nthreads 4 + Hello from thread 1, nthreads 4 + Hello from thread 2, nthreads 4 + Hello from thread 3, nthreads 4 + EOS + assert_equal expected_result.strip, sorted_testresult.strip + + (testpath/"test.c").write <<~C + #include + int main() + { + printf("Hello World!\\n"); + return 0; + } + C + + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + std::cout << "Hello World!" << std::endl; + return 0; + } + CPP + + # Testing default toolchain and SDK location. + system bin/"clang++", "-v", + "-std=c++11", "test.cpp", "-o", "test++" + assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" if OS.mac? + assert_equal "Hello World!", shell_output("./test++").chomp + system bin/"clang", "-v", "test.c", "-o", "test" + assert_equal "Hello World!", shell_output("./test").chomp + + # These tests should ignore the usual SDK includes + with_env(CPATH: nil) do + # Testing Command Line Tools + if OS.mac? && MacOS::CLT.installed? + toolchain_path = "/Library/Developer/CommandLineTools" + cpp_base = (MacOS.version >= :big_sur) ? MacOS::CLT.sdk_path : toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::CLT.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::CLT.sdk_path}/usr/include", + "-isystem", "#{toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testCLT++" + assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testCLT++").chomp + system bin/"clang", "-v", "test.c", "-o", "testCLT" + assert_equal "Hello World!", shell_output("./testCLT").chomp + end + + # Testing Xcode + if OS.mac? && MacOS::Xcode.installed? + cpp_base = (MacOS::Xcode.version >= "12.5") ? MacOS::Xcode.sdk_path : MacOS::Xcode.toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::Xcode.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::Xcode.sdk_path}/usr/include", + "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testXC++" + assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testXC++").chomp + system bin/"clang", "-v", + "-isysroot", MacOS.sdk_path, + "test.c", "-o", "testXC" + assert_equal "Hello World!", shell_output("./testXC").chomp + end + + # link against installed libc++ + # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 + cxx_libdir = opt_lib + cxx_libdir /= "c++" if OS.mac? + system bin/"clang++", "-v", + "-isystem", "#{opt_include}/c++/v1", + "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", + "-rtlib=compiler-rt", "-L#{cxx_libdir}", "-Wl,-rpath,#{cxx_libdir}" + assert_includes (testpath/"testlibc++").dynamically_linked_libraries, + (cxx_libdir/shared_library("libc++", "1")).to_s + (testpath/"testlibc++").dynamically_linked_libraries.each do |lib| + refute_match(/libstdc\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + end + assert_equal "Hello World!", shell_output("./testlibc++").chomp + end + + if OS.linux? + # Link installed libc++, libc++abi, and libunwind archives both into + # a position independent executable (PIE), as well as into a fully + # position independent (PIC) DSO for things like plugins that export + # a C-only API but internally use C++. + # + # FIXME: It'd be nice to be able to use flags like `-static-libstdc++` + # together with `-stdlib=libc++` (the latter one we need anyways for + # headers) to achieve this but those flags don't set up the correct + # search paths or handle all of the libraries needed by `libc++` when + # linking statically. + + system bin/"clang++", "-v", "-o", "test_pie_runtimes", + "-pie", "-fPIC", "test.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + assert_equal "Hello World!", shell_output("./test_pie_runtimes").chomp + (testpath/"test_pie_runtimes").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + + (testpath/"test_plugin.cpp").write <<~CPP + #include + __attribute__((visibility("default"))) + extern "C" void run_plugin() { + std::cout << "Hello Plugin World!" << std::endl; + } + CPP + (testpath/"test_plugin_main.c").write <<~C + extern void run_plugin(); + int main() { + run_plugin(); + } + C + system bin/"clang++", "-v", "-o", "test_plugin.so", + "-shared", "-fPIC", "test_plugin.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + system bin/"clang", "-v", + "test_plugin_main.c", "-o", "test_plugin_libc++", + "test_plugin.so", "-Wl,-rpath=#{testpath}", "-rtlib=compiler-rt" + assert_equal "Hello Plugin World!", shell_output("./test_plugin_libc++").chomp + (testpath/"test_plugin.so").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + end + + # Testing mlir + (testpath/"test.mlir").write <<~MLIR + func @bad_branch() { + br ^missing // expected-error {{reference to an undefined block}} + } + MLIR + system bin/"mlir-opt", "--verify-diagnostics", "test.mlir" + + (testpath/"scanbuildtest.cpp").write <<~CPP + #include + int main() { + int *i = new int; + *i = 1; + delete i; + std::cout << *i << std::endl; + return 0; + } + CPP + assert_includes shell_output("#{bin}/scan-build make scanbuildtest 2>&1"), + "warning: Use of memory after it is freed" + + (testpath/"clangformattest.c").write <<~C + int main() { + printf("Hello world!"); } + C + assert_equal "int main() { printf(\"Hello world!\"); }\n", + shell_output("#{bin}/clang-format -style=google clangformattest.c") + + # This will fail if the clang bindings cannot find `libclang`. + with_env(PYTHONPATH: prefix/Language::Python.site_packages("python3")) do + system "python3", "-c", <<~PYTHON + from clang import cindex + cindex.Config().get_cindex_library() + PYTHON + end + + # Ensure LLVM did not regress output of `llvm-config --system-libs` which for a time + # was known to output incorrect linker flags; e.g., `-llibxml2.tbd` instead of `-lxml2`. + # On the other hand, note that a fully qualified path to `dylib` or `tbd` is OK, e.g., + # `/usr/local/lib/libxml2.tbd` or `/usr/local/lib/libxml2.dylib`. + abs_path_exts = [".tbd", ".dylib"] + shell_output("#{bin}/llvm-config --system-libs").chomp.strip.split.each do |lib| + if lib.start_with?("-l") + assert !lib.end_with?(".tbd"), "expected abs path when lib reported as .tbd" + assert !lib.end_with?(".dylib"), "expected abs path when lib reported as .dylib" + else + p = Pathname.new(lib) + if abs_path_exts.include?(p.extname) + assert p.absolute?, "expected abs path when lib reported as .tbd or .dylib" + end + end + end + end +end + +__END__ +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -1250,7 +1250,7 @@ CHECK_SIZE_AND_OFFSET(group, gr_passwd); + CHECK_SIZE_AND_OFFSET(group, gr_gid); + CHECK_SIZE_AND_OFFSET(group, gr_mem); + +-#if HAVE_RPC_XDR_H ++#if HAVE_RPC_XDR_H && !SANITIZER_MAC + CHECK_TYPE_SIZE(XDR); + CHECK_SIZE_AND_OFFSET(XDR, x_op); + CHECK_SIZE_AND_OFFSET(XDR, x_ops); diff --git a/Formula/l/llvm@14.rb b/Formula/l/llvm@14.rb new file mode 100644 index 0000000000000..25ef215262fc1 --- /dev/null +++ b/Formula/l/llvm@14.rb @@ -0,0 +1,503 @@ +class LlvmAT14 < Formula + desc "Next-gen compiler infrastructure" + homepage "https://llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/llvm-project-14.0.6.src.tar.xz" + sha256 "8b3cfd7bc695bd6cea0f37f53f0981f34f87496e79e2529874fd03a2f9dd3a8a" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + + livecheck do + skip "No longer developed or maintained" + end + + bottle do + rebuild 4 + sha256 cellar: :any, arm64_sonoma: "1b081d8bd775b69b5c95e98df2689844a3c44a77509bfd9adc1f169e9502c6a7" + sha256 cellar: :any, arm64_ventura: "89591ec1b0a6bcafe0e2bba53852eef97ad8d99c4135a96442e85892b02356b4" + sha256 cellar: :any, arm64_monterey: "f384ea62cf9c9a18add6ab68a96ada4a4639a0b52d906304cb961d5a1c96df1b" + sha256 cellar: :any, sonoma: "88ef0c0f3a9876fe2831f1b7f38aee95b43fadd816b6622b76583461d685bbae" + sha256 cellar: :any, ventura: "e66da1e873688670be544c1bd796edaabfb1bd75704bf0726ec0eeb4001c9a20" + sha256 cellar: :any, monterey: "a17201d682ba0390cf148afa82e0796cfb95c8d0bd0029abd4553a4a16cd041b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f022789750bb9997fc7bfa5810d35cd3dbae901787885e92e4ef16e3b13a7ae9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "584cd6ac9de19540bce25bfb1e35af872d34f0ad5723dbb5a63c7561dfd1091d" + end + + # Clang cannot find system headers if Xcode CLT is not installed + pour_bottle? only_if: :clt_installed + + keg_only :versioned_formula + + # https://llvm.org/docs/GettingStarted.html#requirement + # We intentionally use Make instead of Ninja. + # See: Homebrew/homebrew-core/issues/35513 + depends_on "cmake" => :build + # sanitizer_mac.cpp:621:15: error: constexpr function never produces a constant expression [-Winvalid-constexpr] + # constexpr u16 GetOSMajorKernelOffset() { + depends_on maximum_macos: [:ventura, :build] + depends_on "python@3.12" => [:build, :test] + + uses_from_macos "libedit" + uses_from_macos "libffi", since: :catalina + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "binutils" # needed for gold + depends_on "elfutils" # openmp requires + end + + # Fix build with Xcode 15 + # https://github.com/spack/spack/issues/40158 + # Backport of https://reviews.llvm.org/D130060 + patch :DATA + + def python3 + "python3.12" + end + + def install + # The clang bindings need a little help finding our libclang. + inreplace "clang/bindings/python/clang/cindex.py", + /^(\s*library_path\s*=\s*)None$/, + "\\1'#{lib}'" + + projects = %w[ + clang + clang-tools-extra + lld + lldb + mlir + polly + ] + runtimes = %w[ + compiler-rt + libcxx + libcxxabi + libunwind + ] + if OS.mac? + runtimes << "openmp" + else + projects << "openmp" + end + + python_versions = Formula.names + .select { |name| name.start_with? "python@" } + .map { |py| py.delete_prefix("python@") } + site_packages = Language::Python.site_packages(python3).delete_prefix("lib/") + + # Apple's libstdc++ is too old to build LLVM + ENV.libcxx if ENV.compiler == :clang + + # compiler-rt has some iOS simulator features that require i386 symbols + # I'm assuming the rest of clang needs support too for 32-bit compilation + # to work correctly, but if not, perhaps universal binaries could be + # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt + # can almost be treated as an entirely different build from llvm. + ENV.permit_arch_flags + + # we install the lldb Python module into libexec to prevent users from + # accidentally importing it with a non-Homebrew Python or a Homebrew Python + # in a non-default prefix. See https://lldb.llvm.org/resources/caveats.html + args = %W[ + -DLLVM_ENABLE_PROJECTS=#{projects.join(";")} + -DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")} + -DLLVM_POLLY_LINK_INTO_TOOLS=ON + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_FFI=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_INCLUDE_DOCS=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_ENABLE_Z3_SOLVER=OFF + -DLLVM_OPTIMIZED_TABLEGEN=ON + -DLLVM_TARGETS_TO_BUILD=all + -DLLDB_USE_SYSTEM_DEBUGSERVER=ON + -DLLDB_ENABLE_PYTHON=OFF + -DLLDB_ENABLE_LUA=OFF + -DLLDB_ENABLE_LZMA=OFF + -DLIBOMP_INSTALL_ALIASES=OFF + -DCLANG_PYTHON_BINDINGS_VERSIONS=#{python_versions.join(";")} + -DLLVM_CREATE_XCODE_TOOLCHAIN=OFF + -DPACKAGE_VENDOR=#{tap.user} + -DBUG_REPORT_URL=#{tap.issues_url} + -DCLANG_VENDOR_UTI=org.#{tap.user.downcase}.clang + ] + + runtimes_cmake_args = [] + builtins_cmake_args = [] + + if OS.mac? + macos_sdk = MacOS.sdk_path_if_needed + if MacOS.version >= :catalina + args << "-DFFI_INCLUDE_DIR=#{macos_sdk}/usr/include/ffi" + args << "-DFFI_LIBRARY_DIR=#{macos_sdk}/usr/lib" + end + + args << "-DLLVM_BUILD_LLVM_C_DYLIB=ON" + args << "-DLLVM_ENABLE_LIBCXX=ON" + args << "-DLIBCXX_INSTALL_LIBRARY_DIR=#{lib}/c++" + args << "-DLIBCXXABI_INSTALL_LIBRARY_DIR=#{lib}/c++" + args << "-DDEFAULT_SYSROOT=#{macos_sdk}" if macos_sdk + runtimes_cmake_args << "-DCMAKE_INSTALL_RPATH=#{loader_path}" + + # Prevent CMake from defaulting to `lld` when it's found next to `clang`. + # This can be removed after CMake 3.25. See: + # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7671 + args << "-DLLVM_USE_LINKER=ld" + [args, runtimes_cmake_args, builtins_cmake_args].each do |arg_array| + arg_array << "-DCMAKE_LINKER=ld" + end + else + ENV.append_to_cflags "-fpermissive -Wno-free-nonheap-object" + + args << "-DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_include}" + args << "-DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib}" + + # Disable `libxml2`, which isn't very useful. + args << "-DLLVM_ENABLE_LIBXML2=OFF" + args << "-DLLVM_ENABLE_LIBCXX=OFF" + args << "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++" + # Enable llvm gold plugin for LTO + args << "-DLLVM_BINUTILS_INCDIR=#{Formula["binutils"].opt_include}" + # Parts of Polly fail to correctly build with PIC when being used for DSOs. + args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + runtimes_cmake_args += %w[ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON + -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON + -DLIBCXX_USE_COMPILER_RT=ON + -DLIBCXX_HAS_ATOMIC_LIB=OFF + + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON + -DLIBCXXABI_USE_COMPILER_RT=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + + -DLIBUNWIND_USE_COMPILER_RT=ON + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON + -DCOMPILER_RT_USE_LLVM_UNWINDER=ON + + -DSANITIZER_CXX_ABI=libc++ + -DSANITIZER_TEST_CXX=libc++ + ] + + # Prevent compiler-rt from building i386 targets, as this is not portable. + builtins_cmake_args << "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" + end + + if ENV.cflags.present? + args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + runtimes_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + builtins_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + end + + if ENV.cxxflags.present? + args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + runtimes_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + builtins_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + end + + args << "-DRUNTIMES_CMAKE_ARGS=#{runtimes_cmake_args.join(";")}" if runtimes_cmake_args.present? + args << "-DBUILTINS_CMAKE_ARGS=#{builtins_cmake_args.join(";")}" if builtins_cmake_args.present? + + llvmpath = buildpath/"llvm" + mkdir llvmpath/"build" do + system "cmake", "-G", "Unix Makefiles", "..", *(std_cmake_args + args) + system "cmake", "--build", "." + system "cmake", "--build", ".", "--target", "install" + end + + if OS.mac? + llvm_version = Version.new(Utils.safe_popen_read(bin/"llvm-config", "--version").strip) + soversion = llvm_version.major.to_s + + # Install versioned symlink, or else `llvm-config` doesn't work properly + lib.install_symlink "libLLVM.dylib" => "libLLVM-#{soversion}.dylib" + + # Install Xcode toolchain. See: + # https://github.com/llvm/llvm-project/blob/main/llvm/tools/xcode-toolchain/CMakeLists.txt + # We do this manually in order to avoid: + # 1. installing duplicates of files in the prefix + # 2. requiring an existing Xcode installation + xctoolchain = prefix/"Toolchains/LLVM#{llvm_version}.xctoolchain" + + system "/usr/libexec/PlistBuddy", "-c", "Add:CFBundleIdentifier string org.llvm.#{llvm_version}", "Info.plist" + system "/usr/libexec/PlistBuddy", "-c", "Add:CompatibilityVersion integer 2", "Info.plist" + xctoolchain.install "Info.plist" + (xctoolchain/"usr").install_symlink [bin, include, lib, libexec, share] + end + + # Install LLVM Python bindings + # Clang Python bindings are installed by CMake + (lib/site_packages).install llvmpath/"bindings/python/llvm" + + # Create symlinks so that the Python bindings can be used with alternative Python versions + python_versions.each do |py_ver| + next if py_ver == Language::Python.major_minor_version(python3).to_s + + (lib/"python#{py_ver}/site-packages").install_symlink (lib/site_packages).children + end + + # Install Vim plugins + %w[ftdetect ftplugin indent syntax].each do |dir| + (share/"vim/vimfiles"/dir).install Pathname.glob("*/utils/vim/#{dir}/*.vim") + end + + # Install Emacs modes + elisp.install llvmpath.glob("utils/emacs/*.el") + share.glob("clang/*.el") + end + + def caveats + on_macos do + <<~EOS + To use the bundled libc++ please add the following LDFLAGS: + LDFLAGS="-L#{opt_lib}/c++ -Wl,-rpath,#{opt_lib}/c++" + EOS + end + end + + test do + llvm_version = Version.new(Utils.safe_popen_read(bin/"llvm-config", "--version").strip) + soversion = llvm_version.major.to_s + + assert_equal version, llvm_version + assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp + assert_equal "-lLLVM-#{soversion}", shell_output("#{bin}/llvm-config --libs").chomp + assert_equal (lib/shared_library("libLLVM-#{soversion}")).to_s, + shell_output("#{bin}/llvm-config --libfiles").chomp + + (testpath/"omptest.c").write <<~C + #include + #include + #include + int main() { + #pragma omp parallel num_threads(4) + { + printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); + } + return EXIT_SUCCESS; + } + C + + system bin/"clang", "-L#{lib}", "-fopenmp", "-nobuiltininc", + "-I#{lib}/clang/#{llvm_version.major_minor_patch}/include", + "omptest.c", "-o", "omptest" + testresult = shell_output("./omptest") + + sorted_testresult = testresult.split("\n").sort.join("\n") + expected_result = <<~EOS + Hello from thread 0, nthreads 4 + Hello from thread 1, nthreads 4 + Hello from thread 2, nthreads 4 + Hello from thread 3, nthreads 4 + EOS + assert_equal expected_result.strip, sorted_testresult.strip + + (testpath/"test.c").write <<~C + #include + int main() + { + printf("Hello World!\\n"); + return 0; + } + C + + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + std::cout << "Hello World!" << std::endl; + return 0; + } + CPP + + # Testing default toolchain and SDK location. + system bin/"clang++", "-v", + "-std=c++11", "test.cpp", "-o", "test++" + assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" if OS.mac? + assert_equal "Hello World!", shell_output("./test++").chomp + system bin/"clang", "-v", "test.c", "-o", "test" + assert_equal "Hello World!", shell_output("./test").chomp + + # These tests should ignore the usual SDK includes + with_env(CPATH: nil) do + # Testing Command Line Tools + if OS.mac? && MacOS::CLT.installed? + toolchain_path = "/Library/Developer/CommandLineTools" + cpp_base = (MacOS.version >= :big_sur) ? MacOS::CLT.sdk_path : toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::CLT.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::CLT.sdk_path}/usr/include", + "-isystem", "#{toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testCLT++" + assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testCLT++").chomp + system bin/"clang", "-v", "test.c", "-o", "testCLT" + assert_equal "Hello World!", shell_output("./testCLT").chomp + end + + # Testing Xcode + if OS.mac? && MacOS::Xcode.installed? + cpp_base = (MacOS::Xcode.version >= "12.5") ? MacOS::Xcode.sdk_path : MacOS::Xcode.toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::Xcode.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::Xcode.sdk_path}/usr/include", + "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testXC++" + assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testXC++").chomp + system bin/"clang", "-v", + "-isysroot", MacOS.sdk_path, + "test.c", "-o", "testXC" + assert_equal "Hello World!", shell_output("./testXC").chomp + end + + # link against installed libc++ + # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 + cxx_libdir = OS.mac? ? opt_lib/"c++" : opt_lib + system bin/"clang++", "-v", + "-isystem", "#{opt_include}/c++/v1", + "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", + "-rtlib=compiler-rt", "-L#{cxx_libdir}", "-Wl,-rpath,#{cxx_libdir}" + assert_includes (testpath/"testlibc++").dynamically_linked_libraries, + (cxx_libdir/shared_library("libc++", "1")).to_s + (testpath/"testlibc++").dynamically_linked_libraries.each do |lib| + refute_match(/libstdc\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + end + assert_equal "Hello World!", shell_output("./testlibc++").chomp + end + + if OS.linux? + # Link installed libc++, libc++abi, and libunwind archives both into + # a position independent executable (PIE), as well as into a fully + # position independent (PIC) DSO for things like plugins that export + # a C-only API but internally use C++. + # + # FIXME: It'd be nice to be able to use flags like `-static-libstdc++` + # together with `-stdlib=libc++` (the latter one we need anyways for + # headers) to achieve this but those flags don't set up the correct + # search paths or handle all of the libraries needed by `libc++` when + # linking statically. + + system bin/"clang++", "-v", "-o", "test_pie_runtimes", + "-pie", "-fPIC", "test.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + assert_equal "Hello World!", shell_output("./test_pie_runtimes").chomp + (testpath/"test_pie_runtimes").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + + (testpath/"test_plugin.cpp").write <<~CPP + #include + __attribute__((visibility("default"))) + extern "C" void run_plugin() { + std::cout << "Hello Plugin World!" << std::endl; + } + CPP + (testpath/"test_plugin_main.c").write <<~C + extern void run_plugin(); + int main() { + run_plugin(); + } + C + system bin/"clang++", "-v", "-o", "test_plugin.so", + "-shared", "-fPIC", "test_plugin.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + system bin/"clang", "-v", + "test_plugin_main.c", "-o", "test_plugin_libc++", + "test_plugin.so", "-Wl,-rpath=#{testpath}", "-rtlib=compiler-rt" + assert_equal "Hello Plugin World!", shell_output("./test_plugin_libc++").chomp + (testpath/"test_plugin.so").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + else + # FIXME: scan-build test appears to be broken on Linux. + (testpath/"scanbuildtest.cpp").write <<~CPP + #include + int main() { + int *i = new int; + *i = 1; + delete i; + std::cout << *i << std::endl; + return 0; + } + CPP + assert_includes shell_output("#{bin}/scan-build clang++ scanbuildtest.cpp 2>&1"), + "warning: Use of memory after it is freed" + end + + # Testing mlir + (testpath/"test.mlir").write <<~MLIR + func @bad_branch() { + br ^missing // expected-error {{reference to an undefined block}} + } + MLIR + system bin/"mlir-opt", "--verify-diagnostics", "test.mlir" + + (testpath/"clangformattest.c").write <<~C + int main() { + printf("Hello world!"); } + C + assert_equal "int main() { printf(\"Hello world!\"); }\n", + shell_output("#{bin}/clang-format -style=google clangformattest.c") + + # This will fail if the clang bindings cannot find `libclang`. + with_env(PYTHONPATH: prefix/Language::Python.site_packages(python3)) do + system python3, "-c", <<~PYTHON + from clang import cindex + cindex.Config().get_cindex_library() + PYTHON + end + + # Ensure LLVM did not regress output of `llvm-config --system-libs` which for a time + # was known to output incorrect linker flags; e.g., `-llibxml2.tbd` instead of `-lxml2`. + # On the other hand, note that a fully qualified path to `dylib` or `tbd` is OK, e.g., + # `/usr/local/lib/libxml2.tbd` or `/usr/local/lib/libxml2.dylib`. + abs_path_exts = [".tbd", ".dylib"] + shell_output("#{bin}/llvm-config --system-libs").chomp.strip.split.each do |lib| + if lib.start_with?("-l") + assert !lib.end_with?(".tbd"), "expected abs path when lib reported as .tbd" + assert !lib.end_with?(".dylib"), "expected abs path when lib reported as .dylib" + else + p = Pathname.new(lib) + if abs_path_exts.include?(p.extname) + assert p.absolute?, "expected abs path when lib reported as .tbd or .dylib" + end + end + end + end +end + +__END__ +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -1250,7 +1250,7 @@ CHECK_SIZE_AND_OFFSET(group, gr_passwd); + CHECK_SIZE_AND_OFFSET(group, gr_gid); + CHECK_SIZE_AND_OFFSET(group, gr_mem); + +-#if HAVE_RPC_XDR_H ++#if HAVE_RPC_XDR_H && !SANITIZER_MAC + CHECK_TYPE_SIZE(XDR); + CHECK_SIZE_AND_OFFSET(XDR, x_op); + CHECK_SIZE_AND_OFFSET(XDR, x_ops); diff --git a/Formula/l/llvm@15.rb b/Formula/l/llvm@15.rb new file mode 100644 index 0000000000000..719e0e493b783 --- /dev/null +++ b/Formula/l/llvm@15.rb @@ -0,0 +1,477 @@ +class LlvmAT15 < Formula + desc "Next-gen compiler infrastructure" + homepage "https://llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.7/llvm-project-15.0.7.src.tar.xz" + sha256 "8b5fcb24b4128cf04df1b0b9410ce8b1a729cb3c544e6da885d234280dedeac6" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + + livecheck do + skip "No longer developed or maintained" + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "b767f1c1ae0719c1a8d1b5f7e7c7d9cead4eca26cab4b204c72800e824c06845" + sha256 cellar: :any, arm64_ventura: "e276f3ea90967ffe838f28280405e98ceb6c0b1452fde16019fd4bce899575f4" + sha256 cellar: :any, arm64_monterey: "08432060d1e42f11dc887211a2ccc5ab7785d9283dccc37534b207c50a9aba54" + sha256 cellar: :any, sonoma: "08430f7b9a8b839fbc65b90f6e2ba5f7969daa8a6f05a6863a39b2af500527c1" + sha256 cellar: :any, ventura: "14244325d6f28f97dc28b77b668696c113696f8abc2e3c334a886c24a62e9f1b" + sha256 cellar: :any, monterey: "d1cb79d95fc313205141a904d2f631c0e8fea32957f7ddbf91566c2839e81675" + sha256 cellar: :any_skip_relocation, arm64_linux: "3a07622bd1154081b35df3aada0d62da27528a5d6fda372aaddb266ba143e6db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d478121e56352a43a1942f8d93e2a3283772aee536eec2b358907e7e81af912c" + end + + # Clang cannot find system headers if Xcode CLT is not installed + pour_bottle? only_if: :clt_installed + + keg_only :versioned_formula + + # https://llvm.org/docs/GettingStarted.html#requirement + # We intentionally use Make instead of Ninja. + # See: Homebrew/homebrew-core/issues/35513 + depends_on "cmake" => :build + # sanitizer_mac.cpp:630:15: error: constexpr function never produces a constant expression [-Winvalid-constexpr] + # constexpr u16 GetOSMajorKernelOffset() { + depends_on maximum_macos: [:ventura, :build] + depends_on "python@3.12" => [:build, :test] + depends_on "zstd" + + uses_from_macos "libedit" + uses_from_macos "libffi", since: :catalina + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + depends_on "binutils" # needed for gold + depends_on "elfutils" # openmp requires + end + + def python3 + "python3.12" + end + + def install + # The clang bindings need a little help finding our libclang. + inreplace "clang/bindings/python/clang/cindex.py", + /^(\s*library_path\s*=\s*)None$/, + "\\1'#{lib}'" + + projects = %w[ + clang + clang-tools-extra + lld + mlir + polly + ] + runtimes = %w[ + compiler-rt + libcxx + libcxxabi + libunwind + ] + + python_versions = Formula.names + .select { |name| name.start_with? "python@" } + .map { |py| py.delete_prefix("python@") } + site_packages = Language::Python.site_packages(python3).delete_prefix("lib/") + + # Apple's libstdc++ is too old to build LLVM + ENV.libcxx if ENV.compiler == :clang + + # compiler-rt has some iOS simulator features that require i386 symbols + # I'm assuming the rest of clang needs support too for 32-bit compilation + # to work correctly, but if not, perhaps universal binaries could be + # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt + # can almost be treated as an entirely different build from llvm. + ENV.permit_arch_flags + + # we install the lldb Python module into libexec to prevent users from + # accidentally importing it with a non-Homebrew Python or a Homebrew Python + # in a non-default prefix. See https://lldb.llvm.org/resources/caveats.html + args = %W[ + -DLLVM_ENABLE_PROJECTS=#{projects.join(";")} + -DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")} + -DLLVM_POLLY_LINK_INTO_TOOLS=ON + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_FFI=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_INCLUDE_DOCS=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_ENABLE_Z3_SOLVER=OFF + -DLLVM_OPTIMIZED_TABLEGEN=ON + -DLLVM_TARGETS_TO_BUILD=all + -DLLDB_USE_SYSTEM_DEBUGSERVER=ON + -DLLDB_ENABLE_PYTHON=OFF + -DLLDB_ENABLE_LUA=OFF + -DLLDB_ENABLE_LZMA=OFF + -DLIBOMP_INSTALL_ALIASES=OFF + -DCLANG_PYTHON_BINDINGS_VERSIONS=#{python_versions.join(";")} + -DLLVM_CREATE_XCODE_TOOLCHAIN=OFF + -DCLANG_FORCE_MATCHING_LIBCLANG_SOVERSION=OFF + -DPACKAGE_VENDOR=#{tap.user} + -DBUG_REPORT_URL=#{tap.issues_url} + -DCLANG_VENDOR_UTI=org.#{tap.user.downcase}.clang + ] + + runtimes_cmake_args = [] + builtins_cmake_args = [] + + if OS.mac? + macos_sdk = MacOS.sdk_path_if_needed + if MacOS.version >= :catalina + args << "-DFFI_INCLUDE_DIR=#{macos_sdk}/usr/include/ffi" + args << "-DFFI_LIBRARY_DIR=#{macos_sdk}/usr/lib" + end + + args << "-DLLVM_BUILD_LLVM_C_DYLIB=ON" + args << "-DLLVM_ENABLE_LIBCXX=ON" + args << "-DLIBCXX_INSTALL_LIBRARY_DIR=#{lib}/c++" + args << "-DLIBCXXABI_INSTALL_LIBRARY_DIR=#{lib}/c++" + args << "-DDEFAULT_SYSROOT=#{macos_sdk}" if macos_sdk + runtimes_cmake_args << "-DCMAKE_INSTALL_RPATH=#{loader_path}" + + # Prevent CMake from defaulting to `lld` when it's found next to `clang`. + # This can be removed after CMake 3.25. See: + # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7671 + args << "-DLLVM_USE_LINKER=ld" + [args, runtimes_cmake_args, builtins_cmake_args].each do |arg_array| + arg_array << "-DCMAKE_LINKER=ld" + end + + # Disable builds for OSes not supported by the CLT SDK. + clt_sdk_support_flags = %w[I WATCH TV].map { |os| "-DCOMPILER_RT_ENABLE_#{os}OS=OFF" } + builtins_cmake_args += clt_sdk_support_flags + else + args << "-DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_include}" + args << "-DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib}" + + # Disable `libxml2` which isn't very useful. + args << "-DLLVM_ENABLE_LIBXML2=OFF" + args << "-DLLVM_ENABLE_LIBCXX=OFF" + args << "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++" + # Enable llvm gold plugin for LTO + args << "-DLLVM_BINUTILS_INCDIR=#{Formula["binutils"].opt_include}" + # Parts of Polly fail to correctly build with PIC when being used for DSOs. + args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + runtimes_cmake_args += %w[ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON + -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON + -DLIBCXX_USE_COMPILER_RT=ON + -DLIBCXX_HAS_ATOMIC_LIB=OFF + + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON + -DLIBCXXABI_USE_COMPILER_RT=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + + -DLIBUNWIND_USE_COMPILER_RT=ON + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON + -DCOMPILER_RT_USE_LLVM_UNWINDER=ON + + -DSANITIZER_CXX_ABI=libc++ + -DSANITIZER_TEST_CXX=libc++ + ] + + # Prevent compiler-rt from building i386 targets, as this is not portable. + builtins_cmake_args << "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" + end + + if ENV.cflags.present? + args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + runtimes_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + builtins_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + end + + if ENV.cxxflags.present? + args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + runtimes_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + builtins_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + end + + args << "-DRUNTIMES_CMAKE_ARGS=#{runtimes_cmake_args.join(";")}" if runtimes_cmake_args.present? + args << "-DBUILTINS_CMAKE_ARGS=#{builtins_cmake_args.join(";")}" if builtins_cmake_args.present? + + llvmpath = buildpath/"llvm" + mkdir llvmpath/"build" do + system "cmake", "-G", "Unix Makefiles", "..", *(std_cmake_args + args) + # Linux fails with: + # No rule to make target '#{buildpath}/llvm/build/lib/libunwind.so' + ENV.deparallelize if OS.linux? + system "cmake", "--build", "." + system "cmake", "--build", ".", "--target", "install" + end + + if OS.mac? + llvm_version = Version.new(Utils.safe_popen_read(bin/"llvm-config", "--version").strip) + soversion = llvm_version.major.to_s + + # Install versioned symlink, or else `llvm-config` doesn't work properly + lib.install_symlink "libLLVM.dylib" => "libLLVM-#{soversion}.dylib" + + # Install Xcode toolchain. See: + # https://github.com/llvm/llvm-project/blob/main/llvm/tools/xcode-toolchain/CMakeLists.txt + # We do this manually in order to avoid: + # 1. installing duplicates of files in the prefix + # 2. requiring an existing Xcode installation + xctoolchain = prefix/"Toolchains/LLVM#{llvm_version}.xctoolchain" + + system "/usr/libexec/PlistBuddy", "-c", "Add:CFBundleIdentifier string org.llvm.#{llvm_version}", "Info.plist" + system "/usr/libexec/PlistBuddy", "-c", "Add:CompatibilityVersion integer 2", "Info.plist" + xctoolchain.install "Info.plist" + (xctoolchain/"usr").install_symlink [bin, include, lib, libexec, share] + end + + # Install LLVM Python bindings + # Clang Python bindings are installed by CMake + (lib/site_packages).install llvmpath/"bindings/python/llvm" + + # Create symlinks so that the Python bindings can be used with alternative Python versions + python_versions.each do |py_ver| + next if py_ver == Language::Python.major_minor_version(python3).to_s + + (lib/"python#{py_ver}/site-packages").install_symlink (lib/site_packages).children + end + + # Install Vim plugins + %w[ftdetect ftplugin indent syntax].each do |dir| + (share/"vim/vimfiles"/dir).install Pathname.glob("*/utils/vim/#{dir}/*.vim") + end + + # Install Emacs modes + elisp.install llvmpath.glob("utils/emacs/*.el") + share.glob("clang/*.el") + end + + def caveats + on_macos do + <<~EOS + To use the bundled libc++ please add the following LDFLAGS: + LDFLAGS="-L#{opt_lib}/c++ -Wl,-rpath,#{opt_lib}/c++" + EOS + end + end + + test do + llvm_version = Version.new(Utils.safe_popen_read(bin/"llvm-config", "--version").strip) + soversion = llvm_version.major.to_s + + assert_equal version, llvm_version + assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp + assert_equal "-lLLVM-#{soversion}", shell_output("#{bin}/llvm-config --libs").chomp + assert_equal (lib/shared_library("libLLVM-#{soversion}")).to_s, + shell_output("#{bin}/llvm-config --libfiles").chomp + + (testpath/"test.c").write <<~C + #include + int main() + { + printf("Hello World!\\n"); + return 0; + } + C + + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + std::cout << "Hello World!" << std::endl; + return 0; + } + CPP + + # Testing default toolchain and SDK location. + system bin/"clang++", "-v", + "-std=c++11", "test.cpp", "-o", "test++" + assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" if OS.mac? + assert_equal "Hello World!", shell_output("./test++").chomp + system bin/"clang", "-v", "test.c", "-o", "test" + assert_equal "Hello World!", shell_output("./test").chomp + + # To test `lld`, we mock a broken `ld` to make sure it's not what's being used. + (testpath/"fake_ld.c").write <<~C + int main() { return 1; } + C + (testpath/"bin").mkpath + system ENV.cc, "-v", "fake_ld.c", "-o", "bin/ld" + with_env(PATH: "#{testpath}/bin:#{ENV["PATH"]}") do + # Our fake `ld` will produce a compilation error if it is used instead of `lld`. + system bin/"clang", "-v", "test.c", "-o", "test_lld", "-fuse-ld=lld" + end + assert_equal "Hello World!", shell_output("./test_lld").chomp + + # These tests should ignore the usual SDK includes + with_env(CPATH: nil) do + # Testing Command Line Tools + if OS.mac? && MacOS::CLT.installed? + toolchain_path = "/Library/Developer/CommandLineTools" + cpp_base = (MacOS.version >= :big_sur) ? MacOS::CLT.sdk_path : toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::CLT.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::CLT.sdk_path}/usr/include", + "-isystem", "#{toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testCLT++" + assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testCLT++").chomp + system bin/"clang", "-v", "test.c", "-o", "testCLT" + assert_equal "Hello World!", shell_output("./testCLT").chomp + end + + # Testing Xcode + if OS.mac? && MacOS::Xcode.installed? + cpp_base = (MacOS::Xcode.version >= "12.5") ? MacOS::Xcode.sdk_path : MacOS::Xcode.toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::Xcode.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::Xcode.sdk_path}/usr/include", + "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testXC++" + assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testXC++").chomp + system bin/"clang", "-v", + "-isysroot", MacOS.sdk_path, + "test.c", "-o", "testXC" + assert_equal "Hello World!", shell_output("./testXC").chomp + end + + # link against installed libc++ + # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 + cxx_libdir = OS.mac? ? opt_lib/"c++" : opt_lib + system bin/"clang++", "-v", + "-isystem", "#{opt_include}/c++/v1", + "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", + "-rtlib=compiler-rt", "-L#{cxx_libdir}", "-Wl,-rpath,#{cxx_libdir}" + assert_includes (testpath/"testlibc++").dynamically_linked_libraries, + (cxx_libdir/shared_library("libc++", "1")).to_s + (testpath/"testlibc++").dynamically_linked_libraries.each do |lib| + refute_match(/libstdc\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + end + assert_equal "Hello World!", shell_output("./testlibc++").chomp + end + + if OS.linux? + # Link installed libc++, libc++abi, and libunwind archives both into + # a position independent executable (PIE), as well as into a fully + # position independent (PIC) DSO for things like plugins that export + # a C-only API but internally use C++. + # + # FIXME: It'd be nice to be able to use flags like `-static-libstdc++` + # together with `-stdlib=libc++` (the latter one we need anyways for + # headers) to achieve this but those flags don't set up the correct + # search paths or handle all of the libraries needed by `libc++` when + # linking statically. + + system bin/"clang++", "-v", "-o", "test_pie_runtimes", + "-pie", "-fPIC", "test.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + assert_equal "Hello World!", shell_output("./test_pie_runtimes").chomp + (testpath/"test_pie_runtimes").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + + (testpath/"test_plugin.cpp").write <<~CPP + #include + __attribute__((visibility("default"))) + extern "C" void run_plugin() { + std::cout << "Hello Plugin World!" << std::endl; + } + CPP + (testpath/"test_plugin_main.c").write <<~C + extern void run_plugin(); + int main() { + run_plugin(); + } + C + system bin/"clang++", "-v", "-o", "test_plugin.so", + "-shared", "-fPIC", "test_plugin.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + system bin/"clang", "-v", + "test_plugin_main.c", "-o", "test_plugin_libc++", + "test_plugin.so", "-Wl,-rpath=#{testpath}", "-rtlib=compiler-rt" + assert_equal "Hello Plugin World!", shell_output("./test_plugin_libc++").chomp + (testpath/"test_plugin.so").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + end + + # Testing mlir + (testpath/"test.mlir").write <<~MLIR + func.func @main() {return} + + // ----- + + // expected-note @+1 {{see existing symbol definition here}} + func.func @foo() { return } + + // ---- + + // expected-error @+1 {{redefinition of symbol named 'foo'}} + func.func @foo() { return } + MLIR + system bin/"mlir-opt", "--split-input-file", "--verify-diagnostics", "test.mlir" + + (testpath/"scanbuildtest.cpp").write <<~CPP + #include + int main() { + int *i = new int; + *i = 1; + delete i; + std::cout << *i << std::endl; + return 0; + } + CPP + assert_includes shell_output("#{bin}/scan-build make scanbuildtest 2>&1"), + "warning: Use of memory after it is freed" + + (testpath/"clangformattest.c").write <<~C + int main() { + printf("Hello world!"); } + C + assert_equal "int main() { printf(\"Hello world!\"); }\n", + shell_output("#{bin}/clang-format -style=google clangformattest.c") + + # This will fail if the clang bindings cannot find `libclang`. + with_env(PYTHONPATH: prefix/Language::Python.site_packages(python3)) do + system python3, "-c", <<~PYTHON + from clang import cindex + cindex.Config().get_cindex_library() + PYTHON + end + + # Ensure LLVM did not regress output of `llvm-config --system-libs` which for a time + # was known to output incorrect linker flags; e.g., `-llibxml2.tbd` instead of `-lxml2`. + # On the other hand, note that a fully qualified path to `dylib` or `tbd` is OK, e.g., + # `/usr/local/lib/libxml2.tbd` or `/usr/local/lib/libxml2.dylib`. + abs_path_exts = [".tbd", ".dylib"] + shell_output("#{bin}/llvm-config --system-libs").chomp.strip.split.each do |lib| + if lib.start_with?("-l") + assert !lib.end_with?(".tbd"), "expected abs path when lib reported as .tbd" + assert !lib.end_with?(".dylib"), "expected abs path when lib reported as .dylib" + else + p = Pathname.new(lib) + if abs_path_exts.include?(p.extname) + assert p.absolute?, "expected abs path when lib reported as .tbd or .dylib" + end + end + end + end +end diff --git a/Formula/l/llvm@16.rb b/Formula/l/llvm@16.rb new file mode 100644 index 0000000000000..ee2f441937268 --- /dev/null +++ b/Formula/l/llvm@16.rb @@ -0,0 +1,523 @@ +class LlvmAT16 < Formula + desc "Next-gen compiler infrastructure" + homepage "https://llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.6/llvm-project-16.0.6.src.tar.xz" + sha256 "ce5e71081d17ce9e86d7cbcfa28c4b04b9300f8fb7e78422b1feb6bc52c3028e" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + revision 1 + + livecheck do + url :stable + regex(/^llvmorg[._-]v?(16(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e1ce859ba79150008eaa5cab5aa6cd78da4e4955627c00c6f0f2b48779c379bc" + sha256 cellar: :any, arm64_sonoma: "e799fe5056da9a07d79474f7a7290e0a465474eb004cfc614775f290197e10e5" + sha256 cellar: :any, arm64_ventura: "1814e78f92d133918a597c4f7c30fef32f3665989951c1cefdda331eb4402ed1" + sha256 cellar: :any, arm64_monterey: "37035d480d967046905bc5e1cb71b96310a3096b4b066e7542c22cccc4abaf3f" + sha256 cellar: :any, sequoia: "631414eb9a75735243d652e4efe8a0fd73eee014d3aa904f614ec0f3a216c988" + sha256 cellar: :any, sonoma: "16844a4822d3afecf5783a368abf980636d8a3a110100ca4e8b06de383a44b56" + sha256 cellar: :any, ventura: "eec48597281d704edb178eccb4180ffaba79418ff7e478b138097a1a9b3aaa62" + sha256 cellar: :any, monterey: "332da3b9d1d8d75a82c77fc84802f72ba2e8f39db4728df3d4fa7c1dfb5bef08" + sha256 cellar: :any_skip_relocation, arm64_linux: "51b310d34b3d1c14a603cce73761c682d747e42188fbb6a96510d54d4006d2ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8dc1596bb9da879a127448ef1811b6c093348139f0408c2f9b80cd55cf26ce4b" + end + + # Clang cannot find system headers if Xcode CLT is not installed + pour_bottle? only_if: :clt_installed + + keg_only :versioned_formula + + # https://llvm.org/docs/GettingStarted.html#requirement + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "swig" => :build + depends_on "python@3.12" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "libedit" + uses_from_macos "libffi", since: :catalina + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + depends_on "binutils" # needed for gold + depends_on "elfutils" # openmp requires + end + + # Fixes https://github.com/mesonbuild/meson/issues/11642 + patch do + url "https://github.com/llvm/llvm-project/commit/ab8d4f5a122fde5740f8c084c8165f51a26c93c7.patch?full_index=1" + sha256 "9b01de9708e4eb5cef10c18f25dd42e126306ed8cbd9d9a26bb5fbb91ac7d7a3" + end + + # Fix build failure on Sonoma. + patch do + url "https://github.com/llvm/llvm-project/commit/73e15b5edb4fa4a77e68c299a6e3b21e610d351f.patch?full_index=1" + sha256 "b540ef6e3728d7881d95775a163314fac6e2f9207f5d5e8b79c8c73c73ba4dc3" + end + + def python3 + "python3.12" + end + + def install + # The clang bindings need a little help finding our libclang. + inreplace "clang/bindings/python/clang/cindex.py", + /^(\s*library_path\s*=\s*)None$/, + "\\1'#{lib}'" + + projects = %w[ + clang + clang-tools-extra + lld + lldb + mlir + polly + ] + runtimes = %w[ + compiler-rt + libcxx + libcxxabi + libunwind + ] + if OS.mac? + runtimes << "openmp" + else + projects << "openmp" + end + + python_versions = Formula.names + .select { |name| name.start_with? "python@" } + .map { |py| py.delete_prefix("python@") } + site_packages = Language::Python.site_packages(python3).delete_prefix("lib/") + + # Apple's libstdc++ is too old to build LLVM + ENV.libcxx if ENV.compiler == :clang + + # compiler-rt has some iOS simulator features that require i386 symbols + # I'm assuming the rest of clang needs support too for 32-bit compilation + # to work correctly, but if not, perhaps universal binaries could be + # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt + # can almost be treated as an entirely different build from llvm. + ENV.permit_arch_flags + + # we install the lldb Python module into libexec to prevent users from + # accidentally importing it with a non-Homebrew Python or a Homebrew Python + # in a non-default prefix. See https://lldb.llvm.org/resources/caveats.html + args = %W[ + -DLLVM_ENABLE_PROJECTS=#{projects.join(";")} + -DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")} + -DLLVM_POLLY_LINK_INTO_TOOLS=ON + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_FFI=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_INCLUDE_DOCS=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_ENABLE_Z3_SOLVER=OFF + -DLLVM_OPTIMIZED_TABLEGEN=ON + -DLLVM_TARGETS_TO_BUILD=all + -DLLDB_USE_SYSTEM_DEBUGSERVER=ON + -DLLDB_ENABLE_PYTHON=ON + -DLLDB_ENABLE_LUA=OFF + -DLLDB_ENABLE_LZMA=ON + -DLLDB_PYTHON_RELATIVE_PATH=libexec/#{site_packages} + -DLIBOMP_INSTALL_ALIASES=OFF + -DCLANG_PYTHON_BINDINGS_VERSIONS=#{python_versions.join(";")} + -DLLVM_CREATE_XCODE_TOOLCHAIN=OFF + -DCLANG_FORCE_MATCHING_LIBCLANG_SOVERSION=OFF + -DPACKAGE_VENDOR=#{tap.user} + -DBUG_REPORT_URL=#{tap.issues_url} + -DCLANG_VENDOR_UTI=org.#{tap.user.downcase}.clang + ] + + runtimes_cmake_args = [] + builtins_cmake_args = [] + + if OS.mac? + macos_sdk = MacOS.sdk_path_if_needed + if MacOS.version >= :catalina + args << "-DFFI_INCLUDE_DIR=#{macos_sdk}/usr/include/ffi" + args << "-DFFI_LIBRARY_DIR=#{macos_sdk}/usr/lib" + end + + args << "-DLLVM_BUILD_LLVM_C_DYLIB=ON" + args << "-DLLVM_ENABLE_LIBCXX=ON" + args << "-DLIBCXX_INSTALL_LIBRARY_DIR=#{lib}/c++" + args << "-DLIBCXXABI_INSTALL_LIBRARY_DIR=#{lib}/c++" + args << "-DDEFAULT_SYSROOT=#{macos_sdk}" if macos_sdk + runtimes_cmake_args << "-DCMAKE_INSTALL_RPATH=#{loader_path}" + + # Disable builds for OSes not supported by the CLT SDK. + clt_sdk_support_flags = %w[I WATCH TV].map { |os| "-DCOMPILER_RT_ENABLE_#{os}OS=OFF" } + builtins_cmake_args += clt_sdk_support_flags + else + args << "-DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_include}" + args << "-DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib}" + + # Disable `libxml2` which isn't very useful. + args << "-DLLVM_ENABLE_LIBXML2=OFF" + args << "-DLLVM_ENABLE_LIBCXX=OFF" + args << "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++" + # Enable llvm gold plugin for LTO + args << "-DLLVM_BINUTILS_INCDIR=#{Formula["binutils"].opt_include}" + # Parts of Polly fail to correctly build with PIC when being used for DSOs. + args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + runtimes_cmake_args += %w[ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON + -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON + -DLIBCXX_USE_COMPILER_RT=ON + -DLIBCXX_HAS_ATOMIC_LIB=OFF + + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON + -DLIBCXXABI_USE_COMPILER_RT=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + + -DLIBUNWIND_USE_COMPILER_RT=ON + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON + -DCOMPILER_RT_USE_LLVM_UNWINDER=ON + + -DSANITIZER_CXX_ABI=libc++ + -DSANITIZER_TEST_CXX=libc++ + ] + + # Prevent compiler-rt from building i386 targets, as this is not portable. + builtins_cmake_args << "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" + end + + if ENV.cflags.present? + args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + runtimes_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + builtins_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + end + + if ENV.cxxflags.present? + args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + runtimes_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + builtins_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + end + + args << "-DRUNTIMES_CMAKE_ARGS=#{runtimes_cmake_args.join(";")}" if runtimes_cmake_args.present? + args << "-DBUILTINS_CMAKE_ARGS=#{builtins_cmake_args.join(";")}" if builtins_cmake_args.present? + + llvmpath = buildpath/"llvm" + mkdir llvmpath/"build" do + system "cmake", "-G", "Ninja", "..", *(std_cmake_args + args) + system "cmake", "--build", "." + system "cmake", "--build", ".", "--target", "install" + end + + if OS.mac? + # Get the version from `llvm-config` to get the correct HEAD or RC version too. + llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip + soversion = Version.new(llvm_version).major.to_s + soversion << "git" if llvm_version.end_with?("git") + soversion << "rc" if llvm_version.end_with?("rc") + + # Install versioned symlink, or else `llvm-config` doesn't work properly + lib.install_symlink "libLLVM.dylib" => "libLLVM-#{soversion}.dylib" + + # Install Xcode toolchain. See: + # https://github.com/llvm/llvm-project/blob/main/llvm/tools/xcode-toolchain/CMakeLists.txt + # We do this manually in order to avoid: + # 1. installing duplicates of files in the prefix + # 2. requiring an existing Xcode installation + xctoolchain = prefix/"Toolchains/LLVM#{llvm_version}.xctoolchain" + + system "/usr/libexec/PlistBuddy", "-c", "Add:CFBundleIdentifier string org.llvm.#{llvm_version}", "Info.plist" + system "/usr/libexec/PlistBuddy", "-c", "Add:CompatibilityVersion integer 2", "Info.plist" + xctoolchain.install "Info.plist" + (xctoolchain/"usr").install_symlink [bin, include, lib, libexec, share] + end + + # Install Vim plugins + %w[ftdetect ftplugin indent syntax].each do |dir| + (share/"vim/vimfiles"/dir).install Pathname.glob("*/utils/vim/#{dir}/*.vim") + end + + # Install Emacs modes + elisp.install llvmpath.glob("utils/emacs/*.el") + share.glob("clang/*.el") + end + + def caveats + on_macos do + <<~EOS + To use the bundled libc++ please add the following LDFLAGS: + LDFLAGS="-L#{opt_lib}/c++ -Wl,-rpath,#{opt_lib}/c++" + EOS + end + end + + test do + llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip + llvm_version_major = Version.new(llvm_version).major.to_s + soversion = llvm_version_major.dup + + if llvm_version.end_with?("git") + soversion << "git" + elsif llvm_version.end_with?("rc") + soversion << "rc" + else + assert_equal version, llvm_version + end + + assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp + assert_equal "-lLLVM-#{soversion}", shell_output("#{bin}/llvm-config --libs").chomp + assert_equal (lib/shared_library("libLLVM-#{soversion}")).to_s, + shell_output("#{bin}/llvm-config --libfiles").chomp + + (testpath/"omptest.c").write <<~C + #include + #include + #include + int main() { + #pragma omp parallel num_threads(4) + { + printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); + } + return EXIT_SUCCESS; + } + C + + system bin/"clang", "-L#{lib}", "-fopenmp", "-nobuiltininc", + "-I#{lib}/clang/#{llvm_version_major}/include", + "omptest.c", "-o", "omptest" + testresult = shell_output("./omptest") + + sorted_testresult = testresult.split("\n").sort.join("\n") + expected_result = <<~EOS + Hello from thread 0, nthreads 4 + Hello from thread 1, nthreads 4 + Hello from thread 2, nthreads 4 + Hello from thread 3, nthreads 4 + EOS + assert_equal expected_result.strip, sorted_testresult.strip + + (testpath/"test.c").write <<~C + #include + int main() + { + printf("Hello World!\\n"); + return 0; + } + C + + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + std::cout << "Hello World!" << std::endl; + return 0; + } + CPP + + # Testing default toolchain and SDK location. + system bin/"clang++", "-v", + "-std=c++11", "test.cpp", "-o", "test++" + assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" if OS.mac? + assert_equal "Hello World!", shell_output("./test++").chomp + system bin/"clang", "-v", "test.c", "-o", "test" + assert_equal "Hello World!", shell_output("./test").chomp + + # To test `lld`, we mock a broken `ld` to make sure it's not what's being used. + (testpath/"fake_ld.c").write <<~C + int main() { return 1; } + C + (testpath/"bin").mkpath + system ENV.cc, "-v", "fake_ld.c", "-o", "bin/ld" + with_env(PATH: "#{testpath}/bin:#{ENV["PATH"]}") do + # Our fake `ld` will produce a compilation error if it is used instead of `lld`. + system bin/"clang", "-v", "test.c", "-o", "test_lld", "-fuse-ld=lld" + end + assert_equal "Hello World!", shell_output("./test_lld").chomp + + # These tests should ignore the usual SDK includes + with_env(CPATH: nil) do + # Testing Command Line Tools + if OS.mac? && MacOS::CLT.installed? + toolchain_path = "/Library/Developer/CommandLineTools" + cpp_base = (MacOS.version >= :big_sur) ? MacOS::CLT.sdk_path : toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::CLT.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::CLT.sdk_path}/usr/include", + "-isystem", "#{toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testCLT++" + assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testCLT++").chomp + system bin/"clang", "-v", "test.c", "-o", "testCLT" + assert_equal "Hello World!", shell_output("./testCLT").chomp + end + + # Testing Xcode + if OS.mac? && MacOS::Xcode.installed? + cpp_base = (MacOS::Xcode.version >= "12.5") ? MacOS::Xcode.sdk_path : MacOS::Xcode.toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::Xcode.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::Xcode.sdk_path}/usr/include", + "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testXC++" + assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testXC++").chomp + system bin/"clang", "-v", + "-isysroot", MacOS.sdk_path, + "test.c", "-o", "testXC" + assert_equal "Hello World!", shell_output("./testXC").chomp + end + + # link against installed libc++ + # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 + cxx_libdir = OS.mac? ? opt_lib/"c++" : opt_lib + system bin/"clang++", "-v", + "-isystem", "#{opt_include}/c++/v1", + "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", + "-rtlib=compiler-rt", "-L#{cxx_libdir}", "-Wl,-rpath,#{cxx_libdir}" + assert_includes (testpath/"testlibc++").dynamically_linked_libraries, + (cxx_libdir/shared_library("libc++", "1")).to_s + (testpath/"testlibc++").dynamically_linked_libraries.each do |lib| + refute_match(/libstdc\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + end + assert_equal "Hello World!", shell_output("./testlibc++").chomp + end + + if OS.linux? + # Link installed libc++, libc++abi, and libunwind archives both into + # a position independent executable (PIE), as well as into a fully + # position independent (PIC) DSO for things like plugins that export + # a C-only API but internally use C++. + # + # FIXME: It'd be nice to be able to use flags like `-static-libstdc++` + # together with `-stdlib=libc++` (the latter one we need anyways for + # headers) to achieve this but those flags don't set up the correct + # search paths or handle all of the libraries needed by `libc++` when + # linking statically. + + system bin/"clang++", "-v", "-o", "test_pie_runtimes", + "-pie", "-fPIC", "test.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + assert_equal "Hello World!", shell_output("./test_pie_runtimes").chomp + (testpath/"test_pie_runtimes").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + + (testpath/"test_plugin.cpp").write <<~CPP + #include + __attribute__((visibility("default"))) + extern "C" void run_plugin() { + std::cout << "Hello Plugin World!" << std::endl; + } + CPP + (testpath/"test_plugin_main.c").write <<~C + extern void run_plugin(); + int main() { + run_plugin(); + } + C + system bin/"clang++", "-v", "-o", "test_plugin.so", + "-shared", "-fPIC", "test_plugin.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + system bin/"clang", "-v", + "test_plugin_main.c", "-o", "test_plugin_libc++", + "test_plugin.so", "-Wl,-rpath=#{testpath}", "-rtlib=compiler-rt" + assert_equal "Hello Plugin World!", shell_output("./test_plugin_libc++").chomp + (testpath/"test_plugin.so").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + end + + # Testing mlir + (testpath/"test.mlir").write <<~MLIR + func.func @main() {return} + + // ----- + + // expected-note @+1 {{see existing symbol definition here}} + func.func @foo() { return } + + // ---- + + // expected-error @+1 {{redefinition of symbol named 'foo'}} + func.func @foo() { return } + MLIR + system bin/"mlir-opt", "--split-input-file", "--verify-diagnostics", "test.mlir" + + (testpath/"scanbuildtest.cpp").write <<~CPP + #include + int main() { + int *i = new int; + *i = 1; + delete i; + std::cout << *i << std::endl; + return 0; + } + CPP + assert_includes shell_output("#{bin}/scan-build make scanbuildtest 2>&1"), + "warning: Use of memory after it is freed" + + (testpath/"clangformattest.c").write <<~C + int main() { + printf("Hello world!"); } + C + assert_equal "int main() { printf(\"Hello world!\"); }\n", + shell_output("#{bin}/clang-format -style=google clangformattest.c") + + # This will fail if the clang bindings cannot find `libclang`. + with_env(PYTHONPATH: prefix/Language::Python.site_packages(python3)) do + system python3, "-c", <<~PYTHON + from clang import cindex + cindex.Config().get_cindex_library() + PYTHON + end + + # Check that lldb can use Python + lldb_script_interpreter_info = JSON.parse(shell_output("#{bin}/lldb --print-script-interpreter-info")) + assert_equal "python", lldb_script_interpreter_info["language"] + python_test_cmd = "import pathlib, sys; print(pathlib.Path(sys.prefix).resolve())" + assert_match shell_output("#{python3} -c '#{python_test_cmd}'"), + pipe_output("#{bin}/lldb", <<~EOS) + script + #{python_test_cmd} + EOS + + # Ensure LLVM did not regress output of `llvm-config --system-libs` which for a time + # was known to output incorrect linker flags; e.g., `-llibxml2.tbd` instead of `-lxml2`. + # On the other hand, note that a fully qualified path to `dylib` or `tbd` is OK, e.g., + # `/usr/local/lib/libxml2.tbd` or `/usr/local/lib/libxml2.dylib`. + abs_path_exts = [".tbd", ".dylib"] + shell_output("#{bin}/llvm-config --system-libs").chomp.strip.split.each do |lib| + if lib.start_with?("-l") + assert !lib.end_with?(".tbd"), "expected abs path when lib reported as .tbd" + assert !lib.end_with?(".dylib"), "expected abs path when lib reported as .dylib" + else + p = Pathname.new(lib) + if abs_path_exts.include?(p.extname) + assert p.absolute?, "expected abs path when lib reported as .tbd or .dylib" + end + end + end + end +end diff --git a/Formula/l/llvm@17.rb b/Formula/l/llvm@17.rb new file mode 100644 index 0000000000000..daeb2bd754700 --- /dev/null +++ b/Formula/l/llvm@17.rb @@ -0,0 +1,466 @@ +class LlvmAT17 < Formula + desc "Next-gen compiler infrastructure" + homepage "https://llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/llvm-project-17.0.6.src.tar.xz" + sha256 "58a8818c60e6627064f312dbf46c02d9949956558340938b71cf731ad8bc0813" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + + livecheck do + url :stable + regex(/^llvmorg[._-]v?(17(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "4cf50ede64cdc9cf05227501e8b0893a4feb0b86843fcd77b12a5cff1e539522" + sha256 cellar: :any, arm64_sonoma: "a86a41bd356df1fdbd8eef983fff672937a39cad37b00ef37ca94365fc636e1d" + sha256 cellar: :any, arm64_ventura: "d39b580c5e17bb4f103937122a64f81f7961bbd5b25f9467226c04ff557a45c6" + sha256 cellar: :any, arm64_monterey: "0915b164989e297186d51766ba11451d6066a2a85a52629acc296d75cbb25159" + sha256 cellar: :any, sequoia: "baf5cd93bcb8db112c6742d520660d61c206693e1597cbdf4fc11204d6746809" + sha256 cellar: :any, sonoma: "d98f672996f75861190b139397b1623af1f41b624d2a9515a22505592aeed2fa" + sha256 cellar: :any, ventura: "e46fd200b88e080bf18cdddbb140b1052a168b8c91debc895f0ce66d1db7c4aa" + sha256 cellar: :any, monterey: "77fa86ddbbdaa8abd9afa9e3e1b3471ebf3817ce6a8f018901d5d2889a2d8e0d" + sha256 cellar: :any_skip_relocation, arm64_linux: "962b81c61096772a725e4990a3ee995f17c954f0bc029ef24dce7c4d93da016c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "087832db6b7abee3997e2b13501e98025273ebfc64368ba97917a37739d65392" + end + + # Clang cannot find system headers if Xcode CLT is not installed + pour_bottle? only_if: :clt_installed + + keg_only :versioned_formula + + # https://llvm.org/docs/GettingStarted.html#requirement + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "zstd" + + uses_from_macos "libedit" + uses_from_macos "libffi", since: :catalina + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + depends_on "binutils" # needed for gold + depends_on "elfutils" # openmp requires + end + + # Fix arm64 misoptimisation in some cases. + # https://github.com/Homebrew/homebrew-core/issues/158957 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/23704400c86976aaa4f421f56928484a270ac79c/llvm/17.x-arm64-opt.patch" + sha256 "0e312207fd9474bd26f4a283ee23d94b334d3ec8732086d30bce95f7c8dc2201" + end + + def python3 + "python3.12" + end + + def install + # The clang bindings need a little help finding our libclang. + inreplace "clang/bindings/python/clang/cindex.py", + /^(\s*library_path\s*=\s*)None$/, + "\\1'#{lib}'" + + projects = %w[ + clang + clang-tools-extra + lld + mlir + polly + ] + runtimes = %w[ + compiler-rt + libcxx + libcxxabi + libunwind + ] + + python_versions = Formula.names + .select { |name| name.start_with? "python@" } + .map { |py| py.delete_prefix("python@") } + + # Apple's libstdc++ is too old to build LLVM + ENV.libcxx if ENV.compiler == :clang + + # compiler-rt has some iOS simulator features that require i386 symbols + # I'm assuming the rest of clang needs support too for 32-bit compilation + # to work correctly, but if not, perhaps universal binaries could be + # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt + # can almost be treated as an entirely different build from llvm. + ENV.permit_arch_flags + + # we install the lldb Python module into libexec to prevent users from + # accidentally importing it with a non-Homebrew Python or a Homebrew Python + # in a non-default prefix. See https://lldb.llvm.org/resources/caveats.html + args = %W[ + -DLLVM_ENABLE_PROJECTS=#{projects.join(";")} + -DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")} + -DLLVM_POLLY_LINK_INTO_TOOLS=ON + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_FFI=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_INCLUDE_DOCS=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_ENABLE_Z3_SOLVER=OFF + -DLLVM_OPTIMIZED_TABLEGEN=ON + -DLLVM_TARGETS_TO_BUILD=all + -DLIBOMP_INSTALL_ALIASES=OFF + -DCLANG_PYTHON_BINDINGS_VERSIONS=#{python_versions.join(";")} + -DLLVM_CREATE_XCODE_TOOLCHAIN=OFF + -DCLANG_FORCE_MATCHING_LIBCLANG_SOVERSION=OFF + -DPACKAGE_VENDOR=#{tap.user} + -DBUG_REPORT_URL=#{tap.issues_url} + -DCLANG_VENDOR_UTI=org.#{tap.user.downcase}.clang + ] + + runtimes_cmake_args = [] + builtins_cmake_args = [] + + if OS.mac? + macos_sdk = MacOS.sdk_path_if_needed + if MacOS.version >= :catalina + args << "-DFFI_INCLUDE_DIR=#{macos_sdk}/usr/include/ffi" + args << "-DFFI_LIBRARY_DIR=#{macos_sdk}/usr/lib" + end + + args << "-DLLVM_BUILD_LLVM_C_DYLIB=ON" + args << "-DLLVM_ENABLE_LIBCXX=ON" + args << "-DLIBCXX_INSTALL_LIBRARY_DIR=#{lib}/c++" + args << "-DLIBCXXABI_INSTALL_LIBRARY_DIR=#{lib}/c++" + args << "-DDEFAULT_SYSROOT=#{macos_sdk}" if macos_sdk + runtimes_cmake_args << "-DCMAKE_INSTALL_RPATH=#{loader_path}" + + # Disable builds for OSes not supported by the CLT SDK. + clt_sdk_support_flags = %w[I WATCH TV].map { |os| "-DCOMPILER_RT_ENABLE_#{os}OS=OFF" } + builtins_cmake_args += clt_sdk_support_flags + else + args << "-DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_include}" + args << "-DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib}" + + # Disable `libxml2` which isn't very useful. + args << "-DLLVM_ENABLE_LIBXML2=OFF" + args << "-DLLVM_ENABLE_LIBCXX=OFF" + args << "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++" + # Enable llvm gold plugin for LTO + args << "-DLLVM_BINUTILS_INCDIR=#{Formula["binutils"].opt_include}" + # Parts of Polly fail to correctly build with PIC when being used for DSOs. + args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + runtimes_cmake_args += %w[ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON + -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON + -DLIBCXX_USE_COMPILER_RT=ON + -DLIBCXX_HAS_ATOMIC_LIB=OFF + + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON + -DLIBCXXABI_USE_COMPILER_RT=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + + -DLIBUNWIND_USE_COMPILER_RT=ON + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON + -DCOMPILER_RT_USE_LLVM_UNWINDER=ON + + -DSANITIZER_CXX_ABI=libc++ + -DSANITIZER_TEST_CXX=libc++ + ] + + # Prevent compiler-rt from building i386 targets, as this is not portable. + builtins_cmake_args << "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" + end + + if ENV.cflags.present? + args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + runtimes_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + builtins_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + end + + if ENV.cxxflags.present? + args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + runtimes_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + builtins_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + end + + args << "-DRUNTIMES_CMAKE_ARGS=#{runtimes_cmake_args.join(";")}" if runtimes_cmake_args.present? + args << "-DBUILTINS_CMAKE_ARGS=#{builtins_cmake_args.join(";")}" if builtins_cmake_args.present? + + llvmpath = buildpath/"llvm" + mkdir llvmpath/"build" do + system "cmake", "-G", "Ninja", "..", *(std_cmake_args + args) + system "cmake", "--build", "." + system "cmake", "--build", ".", "--target", "install" + end + + if OS.mac? + # Get the version from `llvm-config` to get the correct HEAD or RC version too. + llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip + soversion = Version.new(llvm_version).major.to_s + soversion << "git" if llvm_version.end_with?("git") + soversion << "rc" if llvm_version.end_with?("rc") + + # Install versioned symlink, or else `llvm-config` doesn't work properly + lib.install_symlink "libLLVM.dylib" => "libLLVM-#{soversion}.dylib" + + # Install Xcode toolchain. See: + # https://github.com/llvm/llvm-project/blob/main/llvm/tools/xcode-toolchain/CMakeLists.txt + # We do this manually in order to avoid: + # 1. installing duplicates of files in the prefix + # 2. requiring an existing Xcode installation + xctoolchain = prefix/"Toolchains/LLVM#{llvm_version}.xctoolchain" + + system "/usr/libexec/PlistBuddy", "-c", "Add:CFBundleIdentifier string org.llvm.#{llvm_version}", "Info.plist" + system "/usr/libexec/PlistBuddy", "-c", "Add:CompatibilityVersion integer 2", "Info.plist" + xctoolchain.install "Info.plist" + (xctoolchain/"usr").install_symlink [bin, include, lib, libexec, share] + end + + # Install Vim plugins + %w[ftdetect ftplugin indent syntax].each do |dir| + (share/"vim/vimfiles"/dir).install Pathname.glob("*/utils/vim/#{dir}/*.vim") + end + + # Install Emacs modes + elisp.install llvmpath.glob("utils/emacs/*.el") + share.glob("clang/*.el") + end + + def caveats + on_macos do + <<~EOS + To use the bundled libc++ please add the following LDFLAGS: + LDFLAGS="-L#{opt_lib}/c++ -Wl,-rpath,#{opt_lib}/c++" + EOS + end + end + + test do + llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip + llvm_version_major = Version.new(llvm_version).major.to_s + soversion = llvm_version_major.dup + + if llvm_version.end_with?("git") + soversion << "git" + elsif llvm_version.end_with?("rc") + soversion << "rc" + else + assert_equal version, llvm_version + end + + assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp + assert_equal "-lLLVM-#{soversion}", shell_output("#{bin}/llvm-config --libs").chomp + assert_equal (lib/shared_library("libLLVM-#{soversion}")).to_s, + shell_output("#{bin}/llvm-config --libfiles").chomp + + (testpath/"test.c").write <<~C + #include + int main() + { + printf("Hello World!\\n"); + return 0; + } + C + + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + std::cout << "Hello World!" << std::endl; + return 0; + } + CPP + + # Testing default toolchain and SDK location. + system bin/"clang++", "-v", + "-std=c++11", "test.cpp", "-o", "test++" + assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" if OS.mac? + assert_equal "Hello World!", shell_output("./test++").chomp + system bin/"clang", "-v", "test.c", "-o", "test" + assert_equal "Hello World!", shell_output("./test").chomp + + # To test `lld`, we mock a broken `ld` to make sure it's not what's being used. + (testpath/"fake_ld.c").write <<~C + int main() { return 1; } + C + (testpath/"bin").mkpath + system ENV.cc, "-v", "fake_ld.c", "-o", "bin/ld" + with_env(PATH: "#{testpath}/bin:#{ENV["PATH"]}") do + # Our fake `ld` will produce a compilation error if it is used instead of `lld`. + system bin/"clang", "-v", "test.c", "-o", "test_lld", "-fuse-ld=lld" + end + assert_equal "Hello World!", shell_output("./test_lld").chomp + + # These tests should ignore the usual SDK includes + with_env(CPATH: nil) do + # Testing Command Line Tools + if OS.mac? && MacOS::CLT.installed? + toolchain_path = "/Library/Developer/CommandLineTools" + cpp_base = (MacOS.version >= :big_sur) ? MacOS::CLT.sdk_path : toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::CLT.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::CLT.sdk_path}/usr/include", + "-isystem", "#{toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testCLT++" + assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testCLT++").chomp + system bin/"clang", "-v", "test.c", "-o", "testCLT" + assert_equal "Hello World!", shell_output("./testCLT").chomp + end + + # Testing Xcode + if OS.mac? && MacOS::Xcode.installed? + cpp_base = (MacOS::Xcode.version >= "12.5") ? MacOS::Xcode.sdk_path : MacOS::Xcode.toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::Xcode.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::Xcode.sdk_path}/usr/include", + "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testXC++" + assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testXC++").chomp + system bin/"clang", "-v", + "-isysroot", MacOS.sdk_path, + "test.c", "-o", "testXC" + assert_equal "Hello World!", shell_output("./testXC").chomp + end + + # link against installed libc++ + # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 + cxx_libdir = OS.mac? ? opt_lib/"c++" : opt_lib + system bin/"clang++", "-v", + "-isystem", "#{opt_include}/c++/v1", + "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", + "-rtlib=compiler-rt", "-L#{cxx_libdir}", "-Wl,-rpath,#{cxx_libdir}" + assert_includes (testpath/"testlibc++").dynamically_linked_libraries, + (cxx_libdir/shared_library("libc++", "1")).to_s + (testpath/"testlibc++").dynamically_linked_libraries.each do |lib| + refute_match(/libstdc\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + end + assert_equal "Hello World!", shell_output("./testlibc++").chomp + end + + if OS.linux? + # Link installed libc++, libc++abi, and libunwind archives both into + # a position independent executable (PIE), as well as into a fully + # position independent (PIC) DSO for things like plugins that export + # a C-only API but internally use C++. + # + # FIXME: It'd be nice to be able to use flags like `-static-libstdc++` + # together with `-stdlib=libc++` (the latter one we need anyways for + # headers) to achieve this but those flags don't set up the correct + # search paths or handle all of the libraries needed by `libc++` when + # linking statically. + + system bin/"clang++", "-v", "-o", "test_pie_runtimes", + "-pie", "-fPIC", "test.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + assert_equal "Hello World!", shell_output("./test_pie_runtimes").chomp + (testpath/"test_pie_runtimes").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + + (testpath/"test_plugin.cpp").write <<~CPP + #include + __attribute__((visibility("default"))) + extern "C" void run_plugin() { + std::cout << "Hello Plugin World!" << std::endl; + } + CPP + (testpath/"test_plugin_main.c").write <<~C + extern void run_plugin(); + int main() { + run_plugin(); + } + C + system bin/"clang++", "-v", "-o", "test_plugin.so", + "-shared", "-fPIC", "test_plugin.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + system bin/"clang", "-v", + "test_plugin_main.c", "-o", "test_plugin_libc++", + "test_plugin.so", "-Wl,-rpath=#{testpath}", "-rtlib=compiler-rt" + assert_equal "Hello Plugin World!", shell_output("./test_plugin_libc++").chomp + (testpath/"test_plugin.so").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + end + + # Testing mlir + (testpath/"test.mlir").write <<~MLIR + func.func @main() {return} + + // ----- + + // expected-note @+1 {{see existing symbol definition here}} + func.func @foo() { return } + + // ---- + + // expected-error @+1 {{redefinition of symbol named 'foo'}} + func.func @foo() { return } + MLIR + system bin/"mlir-opt", "--split-input-file", "--verify-diagnostics", "test.mlir" + + (testpath/"scanbuildtest.cpp").write <<~CPP + #include + int main() { + int *i = new int; + *i = 1; + delete i; + std::cout << *i << std::endl; + return 0; + } + CPP + assert_includes shell_output("#{bin}/scan-build make scanbuildtest 2>&1"), + "warning: Use of memory after it is freed" + + (testpath/"clangformattest.c").write <<~C + int main() { + printf("Hello world!"); } + C + assert_equal "int main() { printf(\"Hello world!\"); }\n", + shell_output("#{bin}/clang-format -style=google clangformattest.c") + + # This will fail if the clang bindings cannot find `libclang`. + with_env(PYTHONPATH: prefix/Language::Python.site_packages(python3)) do + system python3, "-c", <<~PYTHON + from clang import cindex + cindex.Config().get_cindex_library() + PYTHON + end + + # Ensure LLVM did not regress output of `llvm-config --system-libs` which for a time + # was known to output incorrect linker flags; e.g., `-llibxml2.tbd` instead of `-lxml2`. + # On the other hand, note that a fully qualified path to `dylib` or `tbd` is OK, e.g., + # `/usr/local/lib/libxml2.tbd` or `/usr/local/lib/libxml2.dylib`. + abs_path_exts = [".tbd", ".dylib"] + shell_output("#{bin}/llvm-config --system-libs").chomp.strip.split.each do |lib| + if lib.start_with?("-l") + assert !lib.end_with?(".tbd"), "expected abs path when lib reported as .tbd" + assert !lib.end_with?(".dylib"), "expected abs path when lib reported as .dylib" + else + p = Pathname.new(lib) + if abs_path_exts.include?(p.extname) + assert p.absolute?, "expected abs path when lib reported as .tbd or .dylib" + end + end + end + end +end diff --git a/Formula/l/llvm@18.rb b/Formula/l/llvm@18.rb new file mode 100644 index 0000000000000..14b8461e9a6ec --- /dev/null +++ b/Formula/l/llvm@18.rb @@ -0,0 +1,463 @@ +class LlvmAT18 < Formula + desc "Next-gen compiler infrastructure" + homepage "https://llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/llvm-project-18.1.8.src.tar.xz" + sha256 "0b58557a6d32ceee97c8d533a59b9212d87e0fc4d2833924eb6c611247db2f2a" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + + livecheck do + url :stable + regex(/^llvmorg[._-]v?(18(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c7bb3e7186411468c2b7af59fb5abd5108805078280f8144f8cf53b9c0b93cbf" + sha256 cellar: :any, arm64_sonoma: "c9daaee40a1b1c85a35af2a64c3577257740554df1d8bbf629103a9994b288b4" + sha256 cellar: :any, arm64_ventura: "b4cb7eba8d8acc3602e08c10a79ac8b584bfa7cde3f7dad3e8ecd618245de840" + sha256 cellar: :any, sonoma: "9066365b4f1e822123b399eaa4f53fea875e64f78243fa737d6a3cc28e67479b" + sha256 cellar: :any, ventura: "84b0c6e7c40e9ee5ca0935e464fcf83fdc508fa1a45834a425c6a7ffbf3d0d23" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ec0521e2b13ac478b9d16ebf35a4d43064e9f7d4e44d35f817ce304546c84e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "79b1083ab5c1f62b6b192b680618a50d06e72594a93d859835f7a30b8fb71271" + end + + # Clang cannot find system headers if Xcode CLT is not installed + pour_bottle? only_if: :clt_installed + + keg_only :versioned_formula + + # https://llvm.org/docs/GettingStarted.html#requirement + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "zstd" + + uses_from_macos "libedit" + uses_from_macos "libffi", since: :catalina + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + depends_on "binutils" # needed for gold + depends_on "elfutils" # openmp requires + end + + def python3 + "python3.12" + end + + def install + # The clang bindings need a little help finding our libclang. + inreplace "clang/bindings/python/clang/cindex.py", + /^(\s*library_path\s*=\s*)None$/, + "\\1'#{lib}'" + + projects = %w[ + clang + clang-tools-extra + lld + mlir + polly + ] + runtimes = %w[ + compiler-rt + libcxx + libcxxabi + libunwind + ] + + python_versions = Formula.names + .select { |name| name.start_with? "python@" } + .map { |py| py.delete_prefix("python@") } + + # Apple's libstdc++ is too old to build LLVM + ENV.libcxx if ENV.compiler == :clang + + # compiler-rt has some iOS simulator features that require i386 symbols + # I'm assuming the rest of clang needs support too for 32-bit compilation + # to work correctly, but if not, perhaps universal binaries could be + # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt + # can almost be treated as an entirely different build from llvm. + ENV.permit_arch_flags + + # we install the lldb Python module into libexec to prevent users from + # accidentally importing it with a non-Homebrew Python or a Homebrew Python + # in a non-default prefix. See https://lldb.llvm.org/resources/caveats.html + args = %W[ + -DLLVM_ENABLE_PROJECTS=#{projects.join(";")} + -DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")} + -DLLVM_POLLY_LINK_INTO_TOOLS=ON + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_FFI=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_INCLUDE_DOCS=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_ENABLE_Z3_SOLVER=OFF + -DLLVM_OPTIMIZED_TABLEGEN=ON + -DLLVM_TARGETS_TO_BUILD=all + -DLIBOMP_INSTALL_ALIASES=OFF + -DLIBCXX_INSTALL_MODULES=ON + -DCLANG_PYTHON_BINDINGS_VERSIONS=#{python_versions.join(";")} + -DLLVM_CREATE_XCODE_TOOLCHAIN=OFF + -DCLANG_FORCE_MATCHING_LIBCLANG_SOVERSION=OFF + -DPACKAGE_VENDOR=#{tap.user} + -DBUG_REPORT_URL=#{tap.issues_url} + -DCLANG_VENDOR_UTI=org.#{tap.user.downcase}.clang + ] + + runtimes_cmake_args = [] + builtins_cmake_args = [] + + if OS.mac? + macos_sdk = MacOS.sdk_path_if_needed + if MacOS.version >= :catalina + args << "-DFFI_INCLUDE_DIR=#{macos_sdk}/usr/include/ffi" + args << "-DFFI_LIBRARY_DIR=#{macos_sdk}/usr/lib" + end + + libcxx_install_libdir = lib/"c++" + libcxx_rpaths = [loader_path, rpath(source: libcxx_install_libdir)] + + args << "-DLLVM_BUILD_LLVM_C_DYLIB=ON" + args << "-DLLVM_ENABLE_LIBCXX=ON" + args << "-DLIBCXX_PSTL_CPU_BACKEND=libdispatch" + args << "-DLIBCXX_INSTALL_LIBRARY_DIR=#{libcxx_install_libdir}" + args << "-DLIBCXXABI_INSTALL_LIBRARY_DIR=#{libcxx_install_libdir}" + args << "-DDEFAULT_SYSROOT=#{macos_sdk}" if macos_sdk + runtimes_cmake_args << "-DCMAKE_INSTALL_RPATH=#{libcxx_rpaths.join("|")}" + + # Disable builds for OSes not supported by the CLT SDK. + clt_sdk_support_flags = %w[I WATCH TV].map { |os| "-DCOMPILER_RT_ENABLE_#{os}OS=OFF" } + builtins_cmake_args += clt_sdk_support_flags + else + args << "-DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_include}" + args << "-DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib}" + + # Disable `libxml2` which isn't very useful. + args << "-DLLVM_ENABLE_LIBXML2=OFF" + args << "-DLLVM_ENABLE_LIBCXX=OFF" + args << "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++" + # Enable llvm gold plugin for LTO + args << "-DLLVM_BINUTILS_INCDIR=#{Formula["binutils"].opt_include}" + # Parts of Polly fail to correctly build with PIC when being used for DSOs. + args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + runtimes_cmake_args += %w[ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON + -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON + -DLIBCXX_USE_COMPILER_RT=ON + -DLIBCXX_HAS_ATOMIC_LIB=OFF + + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON + -DLIBCXXABI_USE_COMPILER_RT=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + + -DLIBUNWIND_USE_COMPILER_RT=ON + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON + -DCOMPILER_RT_USE_LLVM_UNWINDER=ON + + -DSANITIZER_CXX_ABI=libc++ + -DSANITIZER_TEST_CXX=libc++ + ] + + # Prevent compiler-rt from building i386 targets, as this is not portable. + builtins_cmake_args << "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" + end + + if ENV.cflags.present? + args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + runtimes_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + builtins_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + end + + if ENV.cxxflags.present? + args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + runtimes_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + builtins_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + end + + args << "-DRUNTIMES_CMAKE_ARGS=#{runtimes_cmake_args.join(";")}" if runtimes_cmake_args.present? + args << "-DBUILTINS_CMAKE_ARGS=#{builtins_cmake_args.join(";")}" if builtins_cmake_args.present? + + llvmpath = buildpath/"llvm" + + # Now, we can build. + mkdir llvmpath/"build" do + system "cmake", "-G", "Ninja", "..", *(std_cmake_args + args) + system "cmake", "--build", "." + system "cmake", "--build", ".", "--target", "install" + end + + if OS.mac? + # Get the version from `llvm-config` to get the correct HEAD or RC version too. + llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip + soversion = Version.new(llvm_version).major.to_s + soversion << "git" if llvm_version.end_with?("git") + soversion << "rc" if llvm_version.end_with?("rc") + + # Install versioned symlink, or else `llvm-config` doesn't work properly + lib.install_symlink "libLLVM.dylib" => "libLLVM-#{soversion}.dylib" + + # Install Xcode toolchain. See: + # https://github.com/llvm/llvm-project/blob/main/llvm/tools/xcode-toolchain/CMakeLists.txt + # We do this manually in order to avoid: + # 1. installing duplicates of files in the prefix + # 2. requiring an existing Xcode installation + xctoolchain = prefix/"Toolchains/LLVM#{llvm_version}.xctoolchain" + + system "/usr/libexec/PlistBuddy", "-c", "Add:CFBundleIdentifier string org.llvm.#{llvm_version}", "Info.plist" + system "/usr/libexec/PlistBuddy", "-c", "Add:CompatibilityVersion integer 2", "Info.plist" + xctoolchain.install "Info.plist" + (xctoolchain/"usr").install_symlink [bin, include, lib, libexec, share] + end + + # Install Vim plugins + %w[ftdetect ftplugin indent syntax].each do |dir| + (share/"vim/vimfiles"/dir).install Pathname.glob("*/utils/vim/#{dir}/*.vim") + end + + # Install Emacs modes + elisp.install llvmpath.glob("utils/emacs/*.el") + share.glob("clang/*.el") + end + + def caveats + on_macos do + <<~EOS + To use the bundled libc++ please add the following LDFLAGS: + LDFLAGS="-L#{opt_lib}/c++ -L#{opt_lib} -lunwind" + EOS + end + end + + test do + llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip + llvm_version_major = Version.new(llvm_version).major.to_s + soversion = llvm_version_major.dup + + if llvm_version.end_with?("git") + soversion << "git" + elsif llvm_version.end_with?("rc") + soversion << "rc" + else + assert_equal version, llvm_version + end + + assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp + assert_equal "-lLLVM-#{soversion}", shell_output("#{bin}/llvm-config --libs").chomp + assert_equal (lib/shared_library("libLLVM-#{soversion}")).to_s, + shell_output("#{bin}/llvm-config --libfiles").chomp + + (testpath/"test.c").write <<~C + #include + int main() + { + printf("Hello World!\\n"); + return 0; + } + C + + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + std::cout << "Hello World!" << std::endl; + return 0; + } + CPP + + # Testing default toolchain and SDK location. + system bin/"clang++", "-v", + "-std=c++11", "test.cpp", "-o", "test++" + assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" if OS.mac? + assert_equal "Hello World!", shell_output("./test++").chomp + system bin/"clang", "-v", "test.c", "-o", "test" + assert_equal "Hello World!", shell_output("./test").chomp + + # To test `lld`, we mock a broken `ld` to make sure it's not what's being used. + (testpath/"fake_ld.c").write <<~C + int main() { return 1; } + C + (testpath/"bin").mkpath + system ENV.cc, "-v", "fake_ld.c", "-o", "bin/ld" + with_env(PATH: "#{testpath}/bin:#{ENV["PATH"]}") do + # Our fake `ld` will produce a compilation error if it is used instead of `lld`. + system bin/"clang", "-v", "test.c", "-o", "test_lld", "-fuse-ld=lld" + end + assert_equal "Hello World!", shell_output("./test_lld").chomp + + # These tests should ignore the usual SDK includes + with_env(CPATH: nil) do + # Testing Command Line Tools + if OS.mac? && MacOS::CLT.installed? + toolchain_path = "/Library/Developer/CommandLineTools" + cpp_base = (MacOS.version >= :big_sur) ? MacOS::CLT.sdk_path : toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::CLT.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::CLT.sdk_path}/usr/include", + "-isystem", "#{toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testCLT++" + assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testCLT++").chomp + system bin/"clang", "-v", "test.c", "-o", "testCLT" + assert_equal "Hello World!", shell_output("./testCLT").chomp + end + + # Testing Xcode + if OS.mac? && MacOS::Xcode.installed? + cpp_base = (MacOS::Xcode.version >= "12.5") ? MacOS::Xcode.sdk_path : MacOS::Xcode.toolchain_path + system bin/"clang++", "-v", + "-isysroot", MacOS::Xcode.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::Xcode.sdk_path}/usr/include", + "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testXC++" + assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testXC++").chomp + system bin/"clang", "-v", + "-isysroot", MacOS.sdk_path, + "test.c", "-o", "testXC" + assert_equal "Hello World!", shell_output("./testXC").chomp + end + + # link against installed libc++ + # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 + cxx_libdir = OS.mac? ? opt_lib/"c++" : opt_lib + system bin/"clang++", "-v", + "-isystem", "#{opt_include}/c++/v1", + "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", + "-rtlib=compiler-rt", "-L#{cxx_libdir}", "-Wl,-rpath,#{cxx_libdir}" + assert_includes (testpath/"testlibc++").dynamically_linked_libraries, + (cxx_libdir/shared_library("libc++", "1")).to_s + (testpath/"testlibc++").dynamically_linked_libraries.each do |lib| + refute_match(/libstdc\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + end + assert_equal "Hello World!", shell_output("./testlibc++").chomp + end + + if OS.linux? + # Link installed libc++, libc++abi, and libunwind archives both into + # a position independent executable (PIE), as well as into a fully + # position independent (PIC) DSO for things like plugins that export + # a C-only API but internally use C++. + # + # FIXME: It'd be nice to be able to use flags like `-static-libstdc++` + # together with `-stdlib=libc++` (the latter one we need anyways for + # headers) to achieve this but those flags don't set up the correct + # search paths or handle all of the libraries needed by `libc++` when + # linking statically. + + system bin/"clang++", "-v", "-o", "test_pie_runtimes", + "-pie", "-fPIC", "test.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + assert_equal "Hello World!", shell_output("./test_pie_runtimes").chomp + (testpath/"test_pie_runtimes").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + + (testpath/"test_plugin.cpp").write <<~CPP + #include + __attribute__((visibility("default"))) + extern "C" void run_plugin() { + std::cout << "Hello Plugin World!" << std::endl; + } + CPP + (testpath/"test_plugin_main.c").write <<~C + extern void run_plugin(); + int main() { + run_plugin(); + } + C + system bin/"clang++", "-v", "-o", "test_plugin.so", + "-shared", "-fPIC", "test_plugin.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + system bin/"clang", "-v", + "test_plugin_main.c", "-o", "test_plugin_libc++", + "test_plugin.so", "-Wl,-rpath=#{testpath}", "-rtlib=compiler-rt" + assert_equal "Hello Plugin World!", shell_output("./test_plugin_libc++").chomp + (testpath/"test_plugin.so").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + end + + # Testing mlir + (testpath/"test.mlir").write <<~MLIR + func.func @main() {return} + + // ----- + + // expected-note @+1 {{see existing symbol definition here}} + func.func @foo() { return } + + // ---- + + // expected-error @+1 {{redefinition of symbol named 'foo'}} + func.func @foo() { return } + MLIR + system bin/"mlir-opt", "--split-input-file", "--verify-diagnostics", "test.mlir" + + (testpath/"scanbuildtest.cpp").write <<~CPP + #include + int main() { + int *i = new int; + *i = 1; + delete i; + std::cout << *i << std::endl; + return 0; + } + CPP + assert_includes shell_output("#{bin}/scan-build make scanbuildtest 2>&1"), + "warning: Use of memory after it is freed" + + (testpath/"clangformattest.c").write <<~C + int main() { + printf("Hello world!"); } + C + assert_equal "int main() { printf(\"Hello world!\"); }\n", + shell_output("#{bin}/clang-format -style=google clangformattest.c") + + # This will fail if the clang bindings cannot find `libclang`. + with_env(PYTHONPATH: prefix/Language::Python.site_packages(python3)) do + system python3, "-c", <<~PYTHON + from clang import cindex + cindex.Config().get_cindex_library() + PYTHON + end + + # Ensure LLVM did not regress output of `llvm-config --system-libs` which for a time + # was known to output incorrect linker flags; e.g., `-llibxml2.tbd` instead of `-lxml2`. + # On the other hand, note that a fully qualified path to `dylib` or `tbd` is OK, e.g., + # `/usr/local/lib/libxml2.tbd` or `/usr/local/lib/libxml2.dylib`. + abs_path_exts = [".tbd", ".dylib"] + shell_output("#{bin}/llvm-config --system-libs").chomp.strip.split.each do |lib| + if lib.start_with?("-l") + assert !lib.end_with?(".tbd"), "expected abs path when lib reported as .tbd" + assert !lib.end_with?(".dylib"), "expected abs path when lib reported as .dylib" + else + p = Pathname.new(lib) + if abs_path_exts.include?(p.extname) + assert p.absolute?, "expected abs path when lib reported as .tbd or .dylib" + end + end + end + end +end diff --git a/Formula/l/llvm@19.rb b/Formula/l/llvm@19.rb new file mode 100644 index 0000000000000..083176c1b7694 --- /dev/null +++ b/Formula/l/llvm@19.rb @@ -0,0 +1,592 @@ +class LlvmAT19 < Formula + desc "Next-gen compiler infrastructure" + homepage "https://llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/llvm-project-19.1.7.src.tar.xz" + sha256 "82401fea7b79d0078043f7598b835284d6650a75b93e64b6f761ea7b63097501" + # The LLVM Project is under the Apache License v2.0 with LLVM Exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + + livecheck do + url :stable + regex(/^llvmorg[._-]v?(19(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "7b14323528280fe8da37c282cfe3b5b34a9a56f0730c3ce599d165f2c5353a8a" + sha256 cellar: :any, arm64_sonoma: "5fdcbc697b42d0559d5d5c76ae2f9a17e3a30014eab679b6b591336ce7072dea" + sha256 cellar: :any, arm64_ventura: "db184348dbb58b9b9a466664a19747201a36574f9380dfa6158b0ed7cd5b1ca0" + sha256 cellar: :any, sonoma: "005ea2af7ececed09684ca0cb19542503edbf849aa9698f3eaa8c0ea5e407fa3" + sha256 cellar: :any, ventura: "a4d34e93625d78b8f9766ed561c230dede8302a167e5f6204a6287cc9667149d" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb59a5239d343eddc315c28f2860a34405d113b5a8c6db96373e55cf11b14e87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "371be1cba0e7b3b688e80d9e80d529e30bc8f149ba6492a36cd20233f41b6b16" + end + + keg_only :versioned_formula + + # https://llvm.org/docs/GettingStarted.html#requirement + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "swig" => :build + depends_on "xz" + depends_on "zstd" + + uses_from_macos "libedit" + uses_from_macos "libffi", since: :catalina + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + depends_on "binutils" # needed for gold + depends_on "elfutils" # openmp requires + end + + # Backport relative `CLANG_CONFIG_FILE_SYSTEM_DIR` patch. + # https://github.com/llvm/llvm-project/pull/110962 + patch do + url "https://github.com/llvm/llvm-project/commit/1682c99a8877364f1d847395cef501e813804caa.patch?full_index=1" + sha256 "2d0a185e27ff2bc46531fc2c18c61ffab521ae8ece2db5b5bed498a15f3f3758" + end + + # Support simplified triples in version config files. + # https://github.com/llvm/llvm-project/pull/111387 + patch do + url "https://github.com/llvm/llvm-project/commit/88dd0d33147a7f46a3c9df4aed28ad4e47ef597c.patch?full_index=1" + sha256 "0acaa80042055ad194306abb9843a94da24f53ee2bb819583d624391a6329b90" + end + + # Fix triple config loading for clang-cl + # https://github.com/llvm/llvm-project/pull/111397 + patch do + url "https://github.com/llvm/llvm-project/commit/a3e8b860788934d7cc1489f850f00dcfd9d8b595.patch?full_index=1" + sha256 "6d8403fec7be55004e94de90b074c2c166811903ad4921fd76274498c5a60a23" + end + + def python3 + "python3.13" + end + + def clang_config_file_dir + etc/"clang" + end + + def install + # The clang bindings need a little help finding our libclang. + inreplace "clang/bindings/python/clang/cindex.py", + /^(\s*library_path\s*=\s*)None$/, + "\\1'#{lib}'" + + projects = %w[ + clang + clang-tools-extra + mlir + polly + ] + runtimes = %w[ + compiler-rt + libcxx + libcxxabi + libunwind + pstl + ] + + python_versions = Formula.names + .select { |name| name.start_with? "python@" } + .map { |py| py.delete_prefix("python@") } + + # Work around build failure (maybe from CMake 4 update) by using environment + # variable for https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_SYSROOT.html + # TODO: Consider if this should be handled in superenv as impacts other formulae + ENV["SDKROOT"] = MacOS.sdk_for_formula(self).path if OS.mac? && MacOS.sdk_root_needed? + + # Apple's libstdc++ is too old to build LLVM + ENV.libcxx if ENV.compiler == :clang + + # compiler-rt has some iOS simulator features that require i386 symbols + # I'm assuming the rest of clang needs support too for 32-bit compilation + # to work correctly, but if not, perhaps universal binaries could be + # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt + # can almost be treated as an entirely different build from llvm. + ENV.permit_arch_flags + + # we install the lldb Python module into libexec to prevent users from + # accidentally importing it with a non-Homebrew Python or a Homebrew Python + # in a non-default prefix. See https://lldb.llvm.org/resources/caveats.html + args = %W[ + -DLLVM_ENABLE_PROJECTS=#{projects.join(";")} + -DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")} + -DLLVM_POLLY_LINK_INTO_TOOLS=ON + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_FFI=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_INCLUDE_DOCS=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_ENABLE_Z3_SOLVER=OFF + -DLLVM_OPTIMIZED_TABLEGEN=ON + -DLLVM_TARGETS_TO_BUILD=all + -DLLVM_USE_RELATIVE_PATHS_IN_FILES=ON + -DLLVM_SOURCE_PREFIX=. + -DLLDB_USE_SYSTEM_DEBUGSERVER=ON + -DLLDB_ENABLE_PYTHON=OFF + -DLLDB_ENABLE_LUA=OFF + -DLLDB_ENABLE_LZMA=ON + -DLIBOMP_INSTALL_ALIASES=OFF + -DLIBCXX_INSTALL_MODULES=ON + -DCLANG_PYTHON_BINDINGS_VERSIONS=#{python_versions.join(";")} + -DLLVM_CREATE_XCODE_TOOLCHAIN=OFF + -DCLANG_FORCE_MATCHING_LIBCLANG_SOVERSION=OFF + -DCLANG_CONFIG_FILE_SYSTEM_DIR=#{clang_config_file_dir.relative_path_from(bin)} + -DCLANG_CONFIG_FILE_USER_DIR=~/.config/clang + ] + + if tap.present? + args += %W[ + -DPACKAGE_VENDOR=#{tap.user} + -DBUG_REPORT_URL=#{tap.issues_url} + ] + args << "-DCLANG_VENDOR_UTI=sh.brew.clang" if tap.official? + end + + runtimes_cmake_args = [] + builtins_cmake_args = [] + + if OS.mac? + macos_sdk = MacOS.sdk_path_if_needed + if MacOS.version >= :catalina + args << "-DFFI_INCLUDE_DIR=#{macos_sdk}/usr/include/ffi" + args << "-DFFI_LIBRARY_DIR=#{macos_sdk}/usr/lib" + end + + libcxx_install_libdir = lib/"c++" + libunwind_install_libdir = lib/"unwind" + libcxx_rpaths = [loader_path, rpath(source: libcxx_install_libdir, target: libunwind_install_libdir)] + + args << "-DLLVM_BUILD_LLVM_C_DYLIB=ON" + args << "-DLLVM_ENABLE_LIBCXX=ON" + args << "-DLIBCXX_PSTL_BACKEND=libdispatch" + args << "-DLIBCXX_INSTALL_LIBRARY_DIR=#{libcxx_install_libdir}" + args << "-DLIBUNWIND_INSTALL_LIBRARY_DIR=#{libunwind_install_libdir}" + args << "-DLIBCXXABI_INSTALL_LIBRARY_DIR=#{libcxx_install_libdir}" + runtimes_cmake_args << "-DCMAKE_INSTALL_RPATH=#{libcxx_rpaths.join("|")}" + + # Disable builds for OSes not supported by the CLT SDK. + clt_sdk_support_flags = %w[I WATCH TV].map { |os| "-DCOMPILER_RT_ENABLE_#{os}OS=OFF" } + builtins_cmake_args += clt_sdk_support_flags + else + args << "-DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_include}" + args << "-DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib}" + + # Disable `libxml2` which isn't very useful. + args << "-DLLVM_ENABLE_LIBXML2=OFF" + args << "-DLLVM_ENABLE_LIBCXX=OFF" + args << "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++" + # Enable llvm gold plugin for LTO + args << "-DLLVM_BINUTILS_INCDIR=#{Formula["binutils"].opt_include}" + # Parts of Polly fail to correctly build with PIC when being used for DSOs. + args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + runtimes_cmake_args += %w[ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON + -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON + -DLIBCXX_USE_COMPILER_RT=ON + -DLIBCXX_HAS_ATOMIC_LIB=OFF + + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF + -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=ON + -DLIBCXXABI_USE_COMPILER_RT=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + + -DLIBUNWIND_USE_COMPILER_RT=ON + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON + -DCOMPILER_RT_USE_LLVM_UNWINDER=ON + + -DSANITIZER_CXX_ABI=libc++ + -DSANITIZER_TEST_CXX=libc++ + ] + + # Prevent compiler-rt from building i386 targets, as this is not portable. + builtins_cmake_args << "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" + end + + if ENV.cflags.present? + args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + runtimes_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + builtins_cmake_args << "-DCMAKE_C_FLAGS=#{ENV.cflags}" + end + + if ENV.cxxflags.present? + args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + runtimes_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + builtins_cmake_args << "-DCMAKE_CXX_FLAGS=#{ENV.cxxflags}" + end + + args << "-DRUNTIMES_CMAKE_ARGS=#{runtimes_cmake_args.join(";")}" if runtimes_cmake_args.present? + args << "-DBUILTINS_CMAKE_ARGS=#{builtins_cmake_args.join(";")}" if builtins_cmake_args.present? + + llvmpath = buildpath/"llvm" + mkdir llvmpath/"build" do + system "cmake", "-G", "Ninja", "..", *(std_cmake_args + args) + system "cmake", "--build", "." + system "cmake", "--build", ".", "--target", "install" + end + + if OS.mac? + # Get the version from `llvm-config` to get the correct HEAD or RC version too. + llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip + soversion = Version.new(llvm_version).major.to_s + + # Install versioned symlink, or else `llvm-config` doesn't work properly + lib.install_symlink "libLLVM.dylib" => "libLLVM-#{soversion}.dylib" + + # Install Xcode toolchain. See: + # https://github.com/llvm/llvm-project/blob/main/llvm/tools/xcode-toolchain/CMakeLists.txt + # We do this manually in order to avoid: + # 1. installing duplicates of files in the prefix + # 2. requiring an existing Xcode installation + xctoolchain = prefix/"Toolchains/LLVM#{llvm_version}.xctoolchain" + + system "/usr/libexec/PlistBuddy", "-c", "Add:CFBundleIdentifier string org.llvm.#{llvm_version}", "Info.plist" + system "/usr/libexec/PlistBuddy", "-c", "Add:CompatibilityVersion integer 2", "Info.plist" + xctoolchain.install "Info.plist" + (xctoolchain/"usr").install_symlink [bin, include, lib, libexec, share] + + # Install a major-versioned symlink that can be used across minor/patch version upgrades. + xctoolchain.parent.install_symlink xctoolchain.basename.to_s => "LLVM#{soversion}.xctoolchain" + + # Write config files for each macOS major version so that this works across OS upgrades. + MacOSVersion::SYMBOLS.each_value do |v| + macos_version = MacOSVersion.new(v) + write_config_files(macos_version, MacOSVersion.kernel_major_version(macos_version), Hardware::CPU.arch) + end + + # Also write an unversioned config file as fallback + write_config_files("", "", Hardware::CPU.arch) + end + + # Install Vim plugins + %w[ftdetect ftplugin indent syntax].each do |dir| + (share/"vim/vimfiles"/dir).install Pathname.glob("*/utils/vim/#{dir}/*.vim") + end + + # Install Emacs modes + elisp.install llvmpath.glob("utils/emacs/*.el") + share.glob("clang/*.el") + end + + # We use the extra layer of indirection in `arch` because the FormulaAudit/OnSystemConditionals + # doesn't want to let us use `Hardware::CPU.arch` outside of `install` or `post_install` blocks. + def write_config_files(macos_version, kernel_version, arch) + clang_config_file_dir.mkpath + + arches = Set.new([:arm64, :x86_64, :aarch64]) + arches << arch + + sysroot = if macos_version.blank? || (MacOS.version > macos_version && MacOS::CLT.separate_header_package?) + "#{MacOS::CLT::PKG_PATH}/SDKs/MacOSX.sdk" + elsif macos_version >= "10.14" + "#{MacOS::CLT::PKG_PATH}/SDKs/MacOSX#{macos_version}.sdk" + else + "/" + end + + { + darwin: kernel_version, + macosx: macos_version, + }.each do |system, version| + arches.each do |target_arch| + config_file = "#{target_arch}-apple-#{system}#{version}.cfg" + (clang_config_file_dir/config_file).atomic_write <<~CONFIG + -isysroot #{sysroot} + CONFIG + end + end + end + + def post_install + return unless OS.mac? + + config_files = { + darwin: OS.kernel_version.major, + macosx: MacOS.version, + }.map do |system, version| + clang_config_file_dir/"#{Hardware::CPU.arch}-apple-#{system}#{version}.cfg" + end + return if config_files.all?(&:exist?) + + write_config_files(MacOS.version, OS.kernel_version.major, Hardware::CPU.arch) + end + + def caveats + s = <<~EOS + CLANG_CONFIG_FILE_SYSTEM_DIR: #{clang_config_file_dir} + CLANG_CONFIG_FILE_USER_DIR: ~/.config/clang + + LLD is now provided in a separate formula: + brew install lld@19 + EOS + + on_macos do + s += <<~EOS + + Using `clang`, `clang++`, etc., requires a CLT installation at `/Library/Developer/CommandLineTools`. + If you don't want to install the CLT, you can write appropriate configuration files pointing to your + SDK at ~/.config/clang. + + To use the bundled libunwind please use the following LDFLAGS: + LDFLAGS="-L#{opt_lib}/unwind -lunwind" + + To use the bundled libc++ please use the following LDFLAGS: + LDFLAGS="-L#{opt_lib}/c++ -L#{opt_lib}/unwind -lunwind" + + NOTE: You probably want to use the libunwind and libc++ provided by macOS unless you know what you're doing. + EOS + end + + s + end + + test do + alt_location_libs = [ + shared_library("libc++", "*"), + shared_library("libc++abi", "*"), + shared_library("libunwind", "*"), + ] + assert_empty lib.glob(alt_location_libs) if OS.mac? + + llvm_version = Utils.safe_popen_read(bin/"llvm-config", "--version").strip + llvm_version_major = Version.new(llvm_version).major.to_s + soversion = llvm_version_major.dup + assert_equal version, llvm_version + + assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp + assert_equal "-lLLVM-#{soversion}", shell_output("#{bin}/llvm-config --libs").chomp + assert_equal (lib/shared_library("libLLVM-#{soversion}")).to_s, + shell_output("#{bin}/llvm-config --libfiles").chomp + + (testpath/"test.c").write <<~C + #include + int main() + { + printf("Hello World!\\n"); + return 0; + } + C + + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + std::cout << "Hello World!" << std::endl; + return 0; + } + CPP + + system bin/"clang-cpp", "-v", "test.c" + system bin/"clang-cpp", "-v", "test.cpp" + + # Testing default toolchain and SDK location. + system bin/"clang++", "-v", + "-std=c++11", "test.cpp", "-o", "test++" + assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" if OS.mac? + assert_equal "Hello World!", shell_output("./test++").chomp + system bin/"clang", "-v", "test.c", "-o", "test" + assert_equal "Hello World!", shell_output("./test").chomp + + # These tests should ignore the usual SDK includes + with_env(CPATH: nil) do + # Testing Command Line Tools + if OS.mac? && MacOS::CLT.installed? + toolchain_path = "/Library/Developer/CommandLineTools" + cpp_base = (MacOS.version >= :big_sur) ? MacOS::CLT.sdk_path : toolchain_path + system bin/"clang++", "-v", + "--no-default-config", + "-isysroot", MacOS::CLT.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::CLT.sdk_path}/usr/include", + "-isystem", "#{toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testCLT++" + assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testCLT++").chomp + system bin/"clang", "-v", "test.c", "-o", "testCLT" + assert_equal "Hello World!", shell_output("./testCLT").chomp + + targets = ["#{Hardware::CPU.arch}-apple-macosx#{MacOS.full_version}"] + + # The test tends to time out on Intel, so let's do these only for ARM macOS. + if Hardware::CPU.arm? + old_macos_version = HOMEBREW_MACOS_OLDEST_SUPPORTED.to_i - 1 + targets << "#{Hardware::CPU.arch}-apple-macosx#{old_macos_version}" + + old_kernel_version = MacOSVersion.kernel_major_version(MacOSVersion.new(old_macos_version.to_s)) + targets << "#{Hardware::CPU.arch}-apple-darwin#{old_kernel_version}" + end + + targets.each do |target| + system bin/"clang-cpp", "-v", "--target=#{target}", "test.c" + system bin/"clang-cpp", "-v", "--target=#{target}", "test.cpp" + + system bin/"clang", "-v", "--target=#{target}", "test.c", "-o", "test-macosx" + assert_equal "Hello World!", shell_output("./test-macosx").chomp + + system bin/"clang++", "-v", "--target=#{target}", "-std=c++11", "test.cpp", "-o", "test++-macosx" + assert_equal "Hello World!", shell_output("./test++-macosx").chomp + end + end + + # Testing Xcode + if OS.mac? && MacOS::Xcode.installed? + cpp_base = (MacOS::Xcode.version >= "12.5") ? MacOS::Xcode.sdk_path : MacOS::Xcode.toolchain_path + system bin/"clang++", "-v", + "--no-default-config", + "-isysroot", MacOS::Xcode.sdk_path, + "-isystem", "#{cpp_base}/usr/include/c++/v1", + "-isystem", "#{MacOS::Xcode.sdk_path}/usr/include", + "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", + "-std=c++11", "test.cpp", "-o", "testXC++" + assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" + assert_equal "Hello World!", shell_output("./testXC++").chomp + system bin/"clang", "-v", + "-isysroot", MacOS.sdk_path, + "test.c", "-o", "testXC" + assert_equal "Hello World!", shell_output("./testXC").chomp + end + + # link against installed libc++ + # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 + cxx_libdir = OS.mac? ? opt_lib/"c++" : opt_lib + system bin/"clang++", "-v", + "-isystem", "#{opt_include}/c++/v1", + "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", + "-rtlib=compiler-rt", "-L#{cxx_libdir}", "-Wl,-rpath,#{cxx_libdir}" + assert_includes (testpath/"testlibc++").dynamically_linked_libraries, + (cxx_libdir/shared_library("libc++", "1")).to_s + (testpath/"testlibc++").dynamically_linked_libraries.each do |lib| + refute_match(/libstdc\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + end + assert_equal "Hello World!", shell_output("./testlibc++").chomp + end + + if OS.linux? + # Link installed libc++, libc++abi, and libunwind archives both into + # a position independent executable (PIE), as well as into a fully + # position independent (PIC) DSO for things like plugins that export + # a C-only API but internally use C++. + # + # FIXME: It'd be nice to be able to use flags like `-static-libstdc++` + # together with `-stdlib=libc++` (the latter one we need anyways for + # headers) to achieve this but those flags don't set up the correct + # search paths or handle all of the libraries needed by `libc++` when + # linking statically. + + system bin/"clang++", "-v", "-o", "test_pie_runtimes", + "-pie", "-fPIC", "test.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + assert_equal "Hello World!", shell_output("./test_pie_runtimes").chomp + (testpath/"test_pie_runtimes").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + + (testpath/"test_plugin.cpp").write <<~CPP + #include + __attribute__((visibility("default"))) + extern "C" void run_plugin() { + std::cout << "Hello Plugin World!" << std::endl; + } + CPP + (testpath/"test_plugin_main.c").write <<~C + extern void run_plugin(); + int main() { + run_plugin(); + } + C + system bin/"clang++", "-v", "-o", "test_plugin.so", + "-shared", "-fPIC", "test_plugin.cpp", "-L#{opt_lib}", + "-stdlib=libc++", "-rtlib=compiler-rt", + "-static-libstdc++", "-lpthread", "-ldl" + system bin/"clang", "-v", + "test_plugin_main.c", "-o", "test_plugin_libc++", + "test_plugin.so", "-Wl,-rpath=#{testpath}", "-rtlib=compiler-rt" + assert_equal "Hello Plugin World!", shell_output("./test_plugin_libc++").chomp + (testpath/"test_plugin.so").dynamically_linked_libraries.each do |lib| + refute_match(/lib(std)?c\+\+/, lib) + refute_match(/libgcc/, lib) + refute_match(/libatomic/, lib) + refute_match(/libunwind/, lib) + end + end + + # Testing mlir + (testpath/"test.mlir").write <<~MLIR + func.func @main() {return} + + // ----- + + // expected-note @+1 {{see existing symbol definition here}} + func.func @foo() { return } + + // ---- + + // expected-error @+1 {{redefinition of symbol named 'foo'}} + func.func @foo() { return } + MLIR + system bin/"mlir-opt", "--split-input-file", "--verify-diagnostics", "test.mlir" + + (testpath/"scanbuildtest.cpp").write <<~CPP + #include + int main() { + int *i = new int; + *i = 1; + delete i; + std::cout << *i << std::endl; + return 0; + } + CPP + assert_includes shell_output("#{bin}/scan-build make scanbuildtest 2>&1"), + "warning: Use of memory after it is freed" + + (testpath/"clangformattest.c").write <<~C + int main() { + printf("Hello world!"); } + C + assert_equal "int main() { printf(\"Hello world!\"); }\n", + shell_output("#{bin}/clang-format -style=google clangformattest.c") + + # This will fail if the clang bindings cannot find `libclang`. + with_env(PYTHONPATH: prefix/Language::Python.site_packages(python3)) do + system python3, "-c", <<~PYTHON + from clang import cindex + cindex.Config().get_cindex_library() + PYTHON + end + + # Ensure LLVM did not regress output of `llvm-config --system-libs` which for a time + # was known to output incorrect linker flags; e.g., `-llibxml2.tbd` instead of `-lxml2`. + # On the other hand, note that a fully qualified path to `dylib` or `tbd` is OK, e.g., + # `/usr/local/lib/libxml2.tbd` or `/usr/local/lib/libxml2.dylib`. + abs_path_exts = [".tbd", ".dylib"] + shell_output("#{bin}/llvm-config --system-libs").chomp.strip.split.each do |lib| + if lib.start_with?("-l") + assert !lib.end_with?(".tbd"), "expected abs path when lib reported as .tbd" + assert !lib.end_with?(".dylib"), "expected abs path when lib reported as .dylib" + else + p = Pathname.new(lib) + if abs_path_exts.include?(p.extname) + assert p.absolute?, "expected abs path when lib reported as .tbd or .dylib" + end + end + end + end +end diff --git a/Formula/l/lm-sensors.rb b/Formula/l/lm-sensors.rb new file mode 100644 index 0000000000000..a92508857f977 --- /dev/null +++ b/Formula/l/lm-sensors.rb @@ -0,0 +1,33 @@ +class LmSensors < Formula + desc "Tools for monitoring the temperatures, voltages, and fans" + homepage "https://github.com/lm-sensors/lm-sensors" + url "https://github.com/lm-sensors/lm-sensors/archive/refs/tags/V3-6-0.tar.gz" + version "3.6.0" + sha256 "0591f9fa0339f0d15e75326d0365871c2d4e2ed8aa1ff759b3a55d3734b7d197" + license any_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + bottle do + rebuild 1 + sha256 arm64_linux: "43d3fcb049210f0b67b6341f5e65645c69ddbfa3ecc8bf5926d612990f3fac35" + sha256 x86_64_linux: "9edce5d98c2e1541cba56961443f4bdb01ea6ab8b7bfd8aa4515c7eec9d17541" + end + + depends_on "bison" => :build + depends_on "flex" => :build + depends_on :linux + + def install + args = %W[ + PREFIX=#{prefix} + BUILD_STATIC_LIB=0 + MANDIR=#{man} + ETCDIR=#{prefix}/etc + ] + system "make", *args + system "make", *args, "install" + end + + test do + assert_match("Usage", shell_output("#{bin}/sensors --help")) + end +end diff --git a/Formula/l/lm4tools.rb b/Formula/l/lm4tools.rb new file mode 100644 index 0000000000000..5dc87eed08a2e --- /dev/null +++ b/Formula/l/lm4tools.rb @@ -0,0 +1,49 @@ +class Lm4tools < Formula + desc "Tools for TI Stellaris Launchpad boards" + homepage "https://github.com/utzig/lm4tools" + url "https://github.com/utzig/lm4tools/archive/refs/tags/v0.1.3.tar.gz" + sha256 "e8064ace3c424b429b7e0b50e58b467d8ed92962b6a6dfa7f6a39942416b1627" + license all_of: ["GPL-2.0-or-later", "BSD-3-Clause"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "4a41adde94def1ccf78e3ef033a1e121ab98ec9960db57ba2244a5ba0136d7df" + sha256 cellar: :any, arm64_sonoma: "13fcc858d9be77a53c1d7a541d3c314c1b98e03b48c2391850912f6dba3d6c85" + sha256 cellar: :any, arm64_ventura: "fe9a6bc3e16b5d44eb6eb84c108c47b2b6a766b0160326627596c339697ac862" + sha256 cellar: :any, arm64_monterey: "ebc1bb78c1f8f5db4ecefbebed152042612d512d92e3339836410bfcbe3888a4" + sha256 cellar: :any, arm64_big_sur: "62a47721a948ccb49f1429fd8649daf1e894e90dacbd45566564b8cbac749a9c" + sha256 cellar: :any, sonoma: "e0ba1978e09cb4307a5caf782622db027b1e2af93f929c3b9a73b0ed8d3fed32" + sha256 cellar: :any, ventura: "7c481d7dfe7be9b57aae020c7a46fafd5de306cfd687b02ec4857e4db9d694cc" + sha256 cellar: :any, monterey: "1bef37edda64611296ac2ba9df91d92d082dd2da0cac5673ef8735d0704330a8" + sha256 cellar: :any, big_sur: "2fca09b10fef4d8304ba4acdce164bbfc5f4fa9b8dd1eb6fcb60b8a58c7ac8d3" + sha256 cellar: :any, catalina: "5d2e503a9c94226f9d3c6d1da1a54424be1c9a16279bcc94253ab0e2da2a3718" + sha256 cellar: :any, mojave: "a0bb88705b97875de770b1979b5480521007b25efd627f092e178941b8ecd4ec" + sha256 cellar: :any, high_sierra: "9c65eb6694f74b513b707c237cf13bb6a54b9e4a188582355f78e94f9ac53407" + sha256 cellar: :any, sierra: "3238455d6329e9749700b9c12c2e7459b63ea400fb0e7e6818b8c7c9b77b4e6d" + sha256 cellar: :any, el_capitan: "7c6bd7ec1a220de95089d71f79baa61ce459ffa0d00d32af727435594ac7603a" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ecfca1688d68be5eebd7cde61d6e6fcd55a2e614e70a5c3a2a0943dc1591da9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5afa96bcdab63596529b9202a6c985a4a1cd634235b2a3ab099805046384e405" + end + + depends_on "pkgconf" => :build + depends_on "libusb" + + def install + # Fix for https://github.com/utzig/lm4tools/issues/32 + libusb = Formula["libusb"] + inreplace "lmicdiusb/Makefile", + "LIBUSB_CFLAGS := -I/usr/local/include/libusb-1.0", + "LIBUSB_CFLAGS := -I#{libusb.opt_include}/libusb-#{libusb.version.major_minor}" + inreplace "lmicdiusb/Makefile", + "LIBUSB_LIBDIR := /usr/local/lib", + "LIBUSB_LIBDIR := #{libusb.opt_lib}" + inreplace "lmicdiusb/Makefile", + "lmicdi: lmicdi.o socket.o gdb.o $(LIBUSB_LIBS)", + "lmicdi: lmicdi.o socket.o gdb.o #{libusb.opt_lib}/#{shared_library("libusb-1.0")}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + output = pipe_output("#{bin}/lm4flash - 2>&1", "data", 2) + assert_equal "Unable to find any ICDI devices\n", output + end +end diff --git a/Formula/l/lmdb.rb b/Formula/l/lmdb.rb new file mode 100644 index 0000000000000..cac6d3be60196 --- /dev/null +++ b/Formula/l/lmdb.rb @@ -0,0 +1,63 @@ +class Lmdb < Formula + desc "Lightning memory-mapped database: key-value data store" + homepage "https://www.symas.com/symas-embedded-database-lmdb" + url "https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.33/openldap-LMDB_0.9.33.tar.bz2" + sha256 "d19d52725800177b89d235161c0af8ae8b2932207e3c9eb87e95b61f1925206d" + license "OLDAP-2.8" + version_scheme 1 + head "https://git.openldap.org/openldap/openldap.git", branch: "mdb.master" + + livecheck do + url :stable + regex(/^LMDB[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "793c48c12fba8c6c49a9a390f1d142f9e21fbd67a300b89db0ad14e8c2b0b799" + sha256 cellar: :any, arm64_sonoma: "03945de1d7a1c49c341852a1efb8eaa431b4024a9920734b7e580c762be685cc" + sha256 cellar: :any, arm64_ventura: "013c00a97026bc02ebc64c1064ec4d91c8b0ca88e7de8905e7474ff04ad7bb17" + sha256 cellar: :any, arm64_monterey: "6eb88efa4257b87f20ce077361aeef457f6939de01bb4131b33692e272fa3340" + sha256 cellar: :any, sonoma: "2b91b9e0509dfaaa6d8519023f398f294f512165e8df13e3bd61090bef0843a1" + sha256 cellar: :any, ventura: "f6669607cf9b8d2aa52c0c1bf3a98cd0246da69b249cd1d265b80275d3ab0846" + sha256 cellar: :any, monterey: "affb1315fdb4fa6bfa23af3340cbf58cdc1d66911c39e5beb0e26b68d9b34c83" + sha256 cellar: :any_skip_relocation, arm64_linux: "38ec12a50b6addec5f94a800a82f29349b6674e5ba1d44c73e5ca159e771f1d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8505f02598426843842d04507a63658185cb0ec0abb2e4f561eda10719bf564" + end + + depends_on "pkgconf" => :test + + def install + cd "libraries/liblmdb" do + args = [] + args << "SOEXT=.dylib" if OS.mac? + system "make", *args + system "make", "install", *args, "prefix=#{prefix}" + end + + (lib/"pkgconfig/lmdb.pc").write pc_file + (lib/"pkgconfig").install_symlink "lmdb.pc" => "liblmdb.pc" + end + + def pc_file + <<~EOS + prefix=#{opt_prefix} + exec_prefix=${prefix} + libdir=${prefix}/lib + includedir=${prefix}/include + + Name: lmdb + Description: #{desc} + URL: #{homepage} + Version: #{version} + Libs: -L${libdir} -llmdb + Cflags: -I${includedir} + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/mdb_dump -V") + + # Make sure our `lmdb.pc` can be read by `pkg-config`. + system "pkg-config", "lmdb" + end +end diff --git a/Formula/l/lmfit.rb b/Formula/l/lmfit.rb new file mode 100644 index 0000000000000..26bfb79008c76 --- /dev/null +++ b/Formula/l/lmfit.rb @@ -0,0 +1,37 @@ +class Lmfit < Formula + desc "C library for Levenberg-Marquardt minimization and least-squares fitting" + homepage "https://jugit.fz-juelich.de/mlz/lmfit" + url "https://jugit.fz-juelich.de/mlz/lmfit/-/archive/v9.0/lmfit-v9.0.tar.bz2" + sha256 "773d8c9f8755727e70cb3e6b70069e3e0b7a3cb163183e44f2cff6dc1ea503fb" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "678ab0ff988a722324b6fb23e6504914de679a9b19c5ee9ff97f025d5057d0a8" + sha256 cellar: :any, arm64_sonoma: "7fbb6f1db8f3fddf49cdfcdab7c35f3ac4b1e42ee8eb86c251bdf4d78b267f64" + sha256 cellar: :any, arm64_ventura: "d19ccd618608a60bf8de2fe961409cf5615f7003500e88a2157dfffbed40aac5" + sha256 cellar: :any, arm64_monterey: "b987b349c6ebe7de26d3df3f1533a8b2aaed6e021e30478a623be0d84654304b" + sha256 cellar: :any, arm64_big_sur: "5847e9700579b8e38168fe822e779f1c1e4b74d0acc41b2571e44d67da62f5ee" + sha256 cellar: :any, sonoma: "fc733a85db84f8fe9c465a703ed4e637cdd5c4b966f83f8299554373c28b1096" + sha256 cellar: :any, ventura: "9ba40546fc4b1ac3a04517312788ec9650b11379fcf0ed66fad8599a5a6f01b7" + sha256 cellar: :any, monterey: "4da2bb131ad773aa9b58d27a850619efd8e5fbcb13549c2b02fd2644af59fe63" + sha256 cellar: :any, big_sur: "08be04ba47f0947f21704736cc71f61fee920de95ebfcedba5ef8091cce34f49" + sha256 cellar: :any, catalina: "b523a336000b11de635407d0f824068219b298043bf39a520e6777bcfbf18fa2" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc5543aacaf3285a695422558a58c624d789a7b91da09b8442095682e4cb5dde" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d3fd83e276cd33f98bd50f5ff20b8ba67e4b1782a808bd057684fe72996db4d" + 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 "demo/curve1.c" + end + + test do + system ENV.cc, pkgshare/"curve1.c", "-I#{include}", "-L#{lib}", "-llmfit", "-o", "test" + assert_match "converged (the relative error in the sum of squares is at most tol)", shell_output("./test") + end +end diff --git a/Formula/l/lmod.rb b/Formula/l/lmod.rb new file mode 100644 index 0000000000000..31fa98a485f9d --- /dev/null +++ b/Formula/l/lmod.rb @@ -0,0 +1,103 @@ +class Lmod < Formula + desc "Lua-based environment modules system to modify PATH variable" + homepage "https://lmod.readthedocs.io/" + url "https://github.com/TACC/Lmod/archive/refs/tags/8.7.60.tar.gz" + sha256 "340bdafedc0d5cdad812ca7372667df95078fd068a09e4fdff23a3fb8a560572" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "056e1f1a964646ac14d49ea7463066a37c5ea71873a836c5802101f9a06e9bc2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0e69aa68c80897631eacfd5ed83c07182b82975a4d0fde7100755a4aa10c7938" + sha256 cellar: :any_skip_relocation, arm64_ventura: "20d42e35cc836b2204c75160076b8bfc0c0cfdc5fbb7293163ffd67e0597930a" + sha256 cellar: :any_skip_relocation, sonoma: "cb736a1c3863b7aa0246026ae92dacb5ec939a834ae7eaca361552db00c571ad" + sha256 cellar: :any_skip_relocation, ventura: "59362099789a5b6df054b487fd8596dbb67b005373e5a335142352c28a53aff1" + sha256 cellar: :any_skip_relocation, arm64_linux: "571adc367cb5532a142d29f691cbdc2d786493830916326b7f25270cb07f2d94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d3908106cdce8f914f9ba1add655afa9fc909812a047c3cfa3b83d72857412b" + end + + depends_on "luarocks" => :build + depends_on "pkgconf" => :build + depends_on "lua" + + uses_from_macos "bc" => :build + uses_from_macos "libxcrypt" + uses_from_macos "tcl-tk" + + on_macos do + depends_on "gnu-sed" => :build + end + + resource "lua-term" do + url "https://github.com/hoelzro/lua-term/archive/refs/tags/0.8.tar.gz" + sha256 "0cb270be22dfc262beec2f4ffc66b878ccaf236f537d693fa36c8f578fc51aa6" + end + + resource "luafilesystem" do + url "https://github.com/keplerproject/luafilesystem/archive/refs/tags/v1_8_0.tar.gz" + sha256 "16d17c788b8093f2047325343f5e9b74cccb1ea96001e45914a58bbae8932495" + end + + resource "luaposix" do + url "https://github.com/luaposix/luaposix/archive/refs/tags/v36.3.tar.gz" + sha256 "82cd9a96c41a4a3205c050206f0564ff4456f773a8f9ffc9235ff8f1907ca5e6" + end + + def install + luaversion = Formula["lua"].version.major_minor + luapath = libexec/"vendor" + ENV["LUA_PATH"] = "?.lua;" \ + "#{luapath}/share/lua/#{luaversion}/?.lua;" \ + "#{luapath}/share/lua/#{luaversion}/?/init.lua;;" + ENV["LUA_CPATH"] = "#{luapath}/lib/lua/#{luaversion}/?.so;;" + + resources.each do |r| + r.stage do + system "luarocks", "make", "--tree=#{luapath}" + end + end + + # pkgconf cannot find tcl-tk on Linux correctly, so we manually set the include and libs + if OS.linux? + tcltk_version = Formula["tcl-tk"].version.major_minor + ENV["TCL_INCLUDE"] = "-I#{Formula["tcl-tk"].opt_include}/tcl-tk" + ENV["TCL_LIBS"] = "-L#{Formula["tcl-tk"].opt_lib} -ltcl#{tcltk_version} -ltclstub" + # Homebrew installed tcl-tk library has major_minor version suffix + inreplace "configure", "'' tcl tcl8.8 tcl8.7 tcl8.6 tcl8.5", "'' tcl#{tcltk_version}" + end + + system "./configure", "--with-siteControlPrefix=yes", "--prefix=#{prefix}" + system "make", "install" + + # Remove man page which conflicts with `modules` formula + rm man1/"module.1" + end + + def caveats + <<~EOS + To use Lmod, you should add the init script to the shell you are using. + + For example, the bash setup script is here: #{opt_prefix}/init/profile + and you can source it in your bash setup or link to it. + + If you use fish, use #{opt_prefix}/init/fish, such as: + ln -s #{opt_prefix}/init/fish ~/.config/fish/conf.d/00_lmod.fish + EOS + end + + test do + sh_init = "#{prefix}/init/sh" + + (testpath/"lmodtest.sh").write <<~SHELL + #!/bin/sh + . #{sh_init} + module list + SHELL + + assert_match "No modules loaded", shell_output("sh #{testpath}/lmodtest.sh 2>&1") + + system sh_init + output = shell_output("#{prefix}/libexec/spider #{prefix}/modulefiles/Core/") + assert_match "lmod", output + assert_match "settarg", output + end +end diff --git a/Formula/l/lnav.rb b/Formula/l/lnav.rb new file mode 100644 index 0000000000000..1b52bf8dd276e --- /dev/null +++ b/Formula/l/lnav.rb @@ -0,0 +1,58 @@ +class Lnav < Formula + desc "Curses-based tool for viewing and analyzing log files" + homepage "https://lnav.org/" + url "https://github.com/tstack/lnav/releases/download/v0.12.4/lnav-0.12.4.tar.gz" + sha256 "e1e70c9e5a2fce21da80eec9b9c3adb09fd05e03986285098a9f2567c1eb4792" + license "BSD-2-Clause" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e4c9cb81635f0fc220f9bca74d6ad1d3942744bc1f2251bb7e6475441a5a242e" + sha256 cellar: :any, arm64_sonoma: "c5d123bf1eaf7d5600fdea80e7bd01951e0bb6d18138c49345ccdf53f67c2c59" + sha256 cellar: :any, arm64_ventura: "886782b7082477516598d6b9c7bec174f1edbcd3cd475a32a5cd16e2106a6414" + sha256 cellar: :any, sonoma: "d37b40a1558c099d62eb51a11a85d03662b2112019204ed584463dd6026d82ce" + sha256 cellar: :any, ventura: "7ba09f2325ae17889ec1f4e5798bb34d2db92b31d2d99874e52543b1240192c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "dece4fd9feb77c9de00fa499d7d943f234fb3ac46c0adc4beabcd64458f6087e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f808305b7e2f68c68823cc5623f399ef17e9daceaf258aa3fc36a175495db30" + end + + head do + url "https://github.com/tstack/lnav.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "re2c" => :build + end + + depends_on "rust" => :build + depends_on "libarchive" + depends_on "libunistring" + depends_on "ncurses" + depends_on "pcre2" + depends_on "readline" + depends_on "sqlite" + + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + system "./autogen.sh" if build.head? + system "./configure", "--with-sqlite3=#{Formula["sqlite"].opt_prefix}", + "--with-readline=#{Formula["readline"].opt_prefix}", + "--with-libarchive=#{Formula["libarchive"].opt_prefix}", + "--with-ncurses=#{Formula["ncurses"].opt_prefix}", + *std_configure_args + system "make", "install", "V=1" + end + + test do + system bin/"lnav", "-V" + + assert_match "col1", pipe_output("#{bin}/lnav -n -c ';from [{ col1=1 }] | take 1'", "foo") + end +end diff --git a/Formula/l/lndir.rb b/Formula/l/lndir.rb new file mode 100644 index 0000000000000..9707100fb4ac3 --- /dev/null +++ b/Formula/l/lndir.rb @@ -0,0 +1,34 @@ +class Lndir < Formula + desc "Create a shadow directory of symbolic links to another directory tree" + homepage "https://gitlab.freedesktop.org/xorg/util/lndir" + url "https://www.x.org/releases/individual/util/lndir-1.0.5.tar.xz" + sha256 "3b65577a5575cce095664f5492164a96941800fe6290a123731d47f3e7104ddb" + license "MIT-open-group" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c4ac20b2d9c5af28a153829cb9f890628143e5d025e6c45c1d41553f9e060b79" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b81f2833d3ba3403ff4827293c28af1770b455766d407f4541c9b950b8298085" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d0c6d45c23ed0b7b0db075165b1d86ee34add3e07c60149d2153dd57987a1a2e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5de50a05e4ae19512b58bcda8dc8552f9fa4c6cc62dcedd928b583b0638c5d8b" + sha256 cellar: :any_skip_relocation, sonoma: "0775ac61f0fa93c88554dc25c9e0f040fca75acb151b1cdc93b08004c6ee633c" + sha256 cellar: :any_skip_relocation, ventura: "375be2c049506f9b438a76ebb32e971d7cc481d5be857ab94052ccfc93f185bf" + sha256 cellar: :any_skip_relocation, monterey: "b2ee287f8e0a07e6afb468a63ae4a053a532620fcf78348bc9363de5bc9969a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ed64c18f82fc9ab722824a0090e4feffc0bec9a8eb1f2f85876e6fc41485f0b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ecf4313dfc583a1197e94925c502cdfe08d777e5aead7dd44bc3ab360f9c8b3d" + end + + depends_on "pkgconf" => :build + depends_on "xorgproto" => :build + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + mkdir "test" + system bin/"lndir", bin, "test" + assert_path_exists testpath/"test/lndir" + end +end diff --git a/Formula/l/loc.rb b/Formula/l/loc.rb new file mode 100644 index 0000000000000..ae4c2f4fd17dc --- /dev/null +++ b/Formula/l/loc.rb @@ -0,0 +1,40 @@ +class Loc < Formula + desc "Count lines of code quickly" + homepage "https://github.com/cgag/loc" + url "https://github.com/cgag/loc/archive/refs/tags/v0.4.1.tar.gz" + sha256 "1e8403fd9a3832007f28fb389593cd6a572f719cd95d85619e7bbcf3dbea18e5" + license "MIT" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c6ae78cec03b96c009895477324beb0d58d4cd6bcb8d351f144d9e4fb32808db" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7f54147fb89ffd9decbd59b458277b6ac58cfa4c6807d33d42a5c653884f1947" + sha256 cellar: :any_skip_relocation, arm64_ventura: "62bf06390749dffb96ea6219f9d578dcf9b95ef774a5a6b1eaa4f8bc3dda143b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "668081ed1d522d9eb49322dac5986bad986db29732cbe42bea12e4276044e37a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4f44244fb86c35bd48654f2a517ecb8550a8d291baf8919f602fd88f50b15677" + sha256 cellar: :any_skip_relocation, sonoma: "aa590454053f91c0e4db2a257fb082ee4ce32498dd38fc3a3f50c20c480bc424" + sha256 cellar: :any_skip_relocation, ventura: "40c3ca943d6c518203f669d6597945f4019eb87ee0ec2e42c158ae67157b6083" + sha256 cellar: :any_skip_relocation, monterey: "8d372339b2ef67c179fcf00d33e167715dd41c729b7a50fd6026e32a5529338b" + sha256 cellar: :any_skip_relocation, big_sur: "b3fa9372c95f88ca42e456d2f9c451cca28c4e894afd9257fc4069215b74d8a4" + sha256 cellar: :any_skip_relocation, catalina: "d87bc0b8b2122f5c9a03b98ab759283882d2fb898009668d0e6f79d22cc3c4c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "d254ba1cf64886376923d5ec23edbd92a70a3bc1d6ec5c9fad3c8f08be255a91" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f463ece47552bb4e58ffe4c4ff6e62dae3b57fb3b9a1e3fad3ea728b07bc660f" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + println("Hello World"); + return 0; + } + CPP + system bin/"loc", "test.cpp" + end +end diff --git a/Formula/l/localai.rb b/Formula/l/localai.rb new file mode 100644 index 0000000000000..1e02bd93bc8e2 --- /dev/null +++ b/Formula/l/localai.rb @@ -0,0 +1,62 @@ +class Localai < Formula + include Language::Python::Virtualenv + + desc "OpenAI alternative" + homepage "https://localai.io/" + url "https://github.com/mudler/LocalAI/archive/refs/tags/v2.28.0.tar.gz" + sha256 "b75f7cffb3b105c1f5e7cd4aa2d5c18cf461b6af0977d150d654d596f1dc8d79" + license "MIT" + head "https://github.com/mudler/LocalAI.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b50f832facfac7f166ca59de5d3b7f241b10bcfe0dcdee6afec90b3d557e1812" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c82bb99e40beb0bb781ecf1087d0a0c3deeca7f2423d177c831e5ee639db516" + sha256 cellar: :any_skip_relocation, arm64_ventura: "27a1f5a845087a4604800f0eee1642747f95f68a4f9eb268f6180aba2cbd4638" + sha256 cellar: :any_skip_relocation, sonoma: "dc8a9eb26fe99a47a098f82f050302a548f6f529b86c14f1b90f5f602e204b07" + sha256 cellar: :any_skip_relocation, ventura: "71df6ef43bb378c2fac806673579b47e5a717e0805a17227fd9ddea6b0070043" + sha256 x86_64_linux: "3a36fc178cc6108855d3f75d2c7751d616e9a176901ecc5dc6dca9e2ff5e134e" + end + + depends_on "abseil" => :build + depends_on "cmake" => :build + depends_on "go" => :build + depends_on "grpc" => :build + depends_on "protobuf" => :build + depends_on "protoc-gen-go" => :build + depends_on "protoc-gen-go-grpc" => :build + depends_on "python@3.13" => :build + + resource "grpcio-tools" do + url "https://files.pythonhosted.org/packages/05/d2/c0866a48c355a6a4daa1f7e27e210c7fa561b1f3b7c0bce2671e89cfa31e/grpcio_tools-1.71.0.tar.gz" + sha256 "38dba8e0d5e0fb23a034e09644fdc6ed862be2371887eee54901999e8f6792a8" + end + + def python3 + which("python3.13") + end + + def install + # Fix to CMake Error at encodec.cpp/ggml/CMakeLists.txt:1 (cmake_minimum_required): + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? + + venv = virtualenv_create(buildpath/"venv", python3) + venv.pip_install resources + ENV.prepend_path "PATH", venv.root/"bin" + + system "make", "build", "VERSION=#{version}" + bin.install "local-ai" + end + + test do + addr = "127.0.0.1:#{free_port}" + + spawn bin/"local-ai", "run", "--address", addr + sleep 5 + sleep 20 if OS.mac? && Hardware::CPU.intel? + + response = shell_output("curl -s -i #{addr}") + assert_match "HTTP/1.1 200 OK", response + end +end diff --git a/Formula/l/localstack.rb b/Formula/l/localstack.rb new file mode 100644 index 0000000000000..426d6d4f94da8 --- /dev/null +++ b/Formula/l/localstack.rb @@ -0,0 +1,187 @@ +class Localstack < Formula + include Language::Python::Virtualenv + + desc "Fully functional local AWS cloud stack" + homepage "https://localstack.cloud/" + url "https://files.pythonhosted.org/packages/21/78/44c19a8ac78a5ff3ebf336593ac1f58c42f13da9c1a68ed4944d5c3b646e/localstack-4.4.0.tar.gz" + sha256 "d304dcbd025af1b67e1e50972446e5f5f875d9cf8f86ed947c86349228f0e8c9" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5e016059881bd0593c98d739e2b6f3c76c4643f628a7838b7329f425e894b010" + sha256 cellar: :any, arm64_sonoma: "edb73dfa7116e32f969cfedeeb173d038f5a56c1e0f72b1b15d488260048743b" + sha256 cellar: :any, arm64_ventura: "10930be4b785cd9191a4ac39f5855e9a83af264446f8d8e123125ed2f101c0cb" + sha256 cellar: :any, sonoma: "121fed99d0ba585fdd952cec67b1b900bdebecf9c1fd066a50a3087813f473d3" + sha256 cellar: :any, ventura: "446780d9fa301a9c5f6a2c8626c3988f52f6001d759e11c94f7f53302c020a70" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9016027b0d67e9e842f045f3bd465f56ff7d9ed29786a550ae121a6f232955c6" + end + + depends_on "docker" => :test + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + resource "build" do + url "https://files.pythonhosted.org/packages/7d/46/aeab111f8e06793e4f0e421fcad593d547fb8313b50990f31681ee2fb1ad/build-1.2.2.post1.tar.gz" + sha256 "b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7" + 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/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "dill" do + url "https://files.pythonhosted.org/packages/7c/e7/364a09134e1062d4d5ff69b853a56cf61c223e0afcc6906b6832bcd51ea8/dill-0.3.6.tar.gz" + sha256 "e5db55f3687856d8fbdab002ed78544e1c4559a130302693d839dfe8f93f2373" + end + + resource "dnslib" do + url "https://files.pythonhosted.org/packages/a2/71/269f74ef9bc8ca453af2e1768d4f4c8e7ef5f894d058d27fd1b69c754d7f/dnslib-0.9.26.tar.gz" + sha256 "be56857534390b2fbd02935270019bacc5e6b411d156cb3921ac55a7fb51f1a8" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "localstack-core" do + url "https://files.pythonhosted.org/packages/d8/7f/5fc41099382be3bc7f92427e0ea165b8ad50075cb01963769af6d8f96f58/localstack_core-4.4.0.tar.gz" + sha256 "02ed647d51946c09f2f77ff6dbec358eae676cbe2779ce13418133727fc00b37" + end + + resource "localstack-ext" do + url "https://files.pythonhosted.org/packages/a8/52/4ec536ece083fb7127f8b88087ec1d383c8bdc2e7b463cc276808ab323cc/localstack_ext-4.4.0.tar.gz" + sha256 "cbf8a733dec7fa7b984f2796d7a64b93b1280774dbe549cd26415a8d2def0088" + 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 "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 "plux" do + url "https://files.pythonhosted.org/packages/dd/aa/d40ba10368d566c8e4bf62ac7ce0dcea2e6b7cc1102c1b39e07495b2d347/plux-1.12.1.tar.gz" + sha256 "1ed44a6edbb7343f4711ff75ddaf87bed066c53625d41b63a0b4edd3f77792ba" + 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/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 "pyotp" do + url "https://files.pythonhosted.org/packages/f3/b2/1d5994ba2acde054a443bd5e2d384175449c7d2b6d1a0614dbca3a63abfc/pyotp-2.9.0.tar.gz" + sha256 "346b6642e0dbdde3b4ff5a930b664ca82abfa116356ed48cc42c7d6590d36f63" + 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-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/88/2c/7bb1416c5620485aa793f2de31d3df393d3686aa8a8506d11e10e13c5baf/python_dotenv-1.1.0.tar.gz" + sha256 "41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5" + 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 "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/72/d1/d3159231aec234a59dd7d601e9dd9fe96f3afff15efd33c1070019b26132/semver-3.0.4.tar.gz" + sha256 "afc7d8c584a5ed0a11033af086e8af226a9c0b206f313e0301f8dd7b6b589602" + 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 "tailer" do + url "https://files.pythonhosted.org/packages/dd/05/01de24d6393d6da0c27857c76b0f9ae97b42cd6102bbdf76cce95e031295/tailer-0.4.1.tar.gz" + sha256 "78d60f23a1b8a2d32f400b3c8c06b01142ac7841b75d8a1efcb33515877ba531" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + def install + virtualenv_install_with_resources + bin.install_symlink libexec/"bin/localstack" + + generate_completions_from_executable(bin/"localstack", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + ENV["DOCKER_HOST"] = "unix://" + (testpath/"invalid.sock") + ENV["LOCALSTACK_API_KEY"] = "brewtest" + + assert_match version.to_s, shell_output("#{bin}/localstack --version") + + output = shell_output("#{bin}/localstack start --docker 2>&1", 1) + + assert_match "License activation failed!", output + end +end diff --git a/Formula/l/localtunnel.rb b/Formula/l/localtunnel.rb new file mode 100644 index 0000000000000..fb1998c90979d --- /dev/null +++ b/Formula/l/localtunnel.rb @@ -0,0 +1,32 @@ +class Localtunnel < Formula + desc "Exposes your localhost to the world for easy testing and sharing" + homepage "https://theboroer.github.io/localtunnel-www/" + url "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.2.tgz" + sha256 "6fb76f0ac6b92989669a5b7bb519361e07301965ea1f5a04d813ed59ab2e0c34" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "b5425789666cab50aa13978b6bec08b978f7be5d53e13b9e447ed712dc2b3c60" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink libexec.glob("bin/*") + end + + test do + # Suppress node warning during runtime + ENV["NODE_NO_WARNINGS"] = "1" + + require "pty" + port = free_port + + stdout, _stdin, _pid = PTY.spawn("#{bin}/lt --port #{port}") + assert_match "your url is:", stdout.readline + + assert_match version.to_s, shell_output("#{bin}/lt --version") + end +end diff --git a/Formula/l/locateme.rb b/Formula/l/locateme.rb new file mode 100644 index 0000000000000..6bb58370c0559 --- /dev/null +++ b/Formula/l/locateme.rb @@ -0,0 +1,41 @@ +class Locateme < Formula + desc "Find your location using Apple's geolocation services" + homepage "https://iharder.sourceforge.net/current/macosx/locateme/" + url "https://downloads.sourceforge.net/project/iharder/locateme/LocateMe-v0.2.1.zip" + sha256 "137016e6c1a847bbe756d8ed294b40f1d26c1cb08869940e30282e933e5aeecd" + license :public_domain + + livecheck do + url :stable + regex(%r{url=.*?/LocateMe[._-]v?(\d+(?:\.\d+)+)\.(?:t|zip)}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fb9d44f815969d55f09881d36089f4a34a43f7d63ad665a5dec05d8c39c55d59" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "078afab4984cf539ac2a9f02d3c13c0756587637293c5b5db7399e835d12092d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ee7e0709959839eb57d29307a2f835a93cb69e36eddd389bd62fb2d58d7e95be" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5c3de0a8398901fcfa93cce0b7dbaeb38989029d1eb2b76cac4246b042b3ef27" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1f946f1ef48eae5f8cbbdcd78655f3baf0cae307f2730b4aea76360044ed315e" + sha256 cellar: :any_skip_relocation, sonoma: "d7b44e5cf6385428d8523b2429a53fd2a607be98d663dd5420bb96576320abf2" + sha256 cellar: :any_skip_relocation, ventura: "db1688ffa07905231ed8d2c04fe43c2eabd575541ef596e16a67eec803275250" + sha256 cellar: :any_skip_relocation, monterey: "df78b2ec950567f3c9889e73c1b0885d6b840569f76cd2a798bdff4c190e337a" + sha256 cellar: :any_skip_relocation, big_sur: "e4f5de110206a157b8deebb41782e6be482cab8649dfbc5aa6eedae39a7f1374" + sha256 cellar: :any_skip_relocation, catalina: "20c927c90ce8813ed161667367c75f8235705fe9fe4c8e5cc6e0b0505b19c978" + sha256 cellar: :any_skip_relocation, mojave: "3ece081d7d799312e2f1afb6cdc210a5915a89e30143412fa30f2d1953701ede" + sha256 cellar: :any_skip_relocation, high_sierra: "e5be4f7b94d001483320c2445739e26deb3007f8fb54185eac4c1cdf941114a3" + sha256 cellar: :any_skip_relocation, sierra: "cb5fe0b740f04c036726e546481f0eed603873ce57b063e0621ae8f73f66645d" + sha256 cellar: :any_skip_relocation, el_capitan: "5f8e1febc1886565bfa9691cb3ffc0486999f8b682a52276c1d9ea6e0f1f4470" + end + + depends_on :macos + + def install + system ENV.cc, "-framework", "Foundation", "-framework", "CoreLocation", "LocateMe.m", "-o", "LocateMe" + bin.install "LocateMe" + man1.install "LocateMe.1" + end + + test do + system bin/"LocateMe", "-h" + end +end diff --git a/Formula/l/lockrun.rb b/Formula/l/lockrun.rb new file mode 100644 index 0000000000000..80ee1ed64b916 --- /dev/null +++ b/Formula/l/lockrun.rb @@ -0,0 +1,43 @@ +class Lockrun < Formula + desc "Run cron jobs with overrun protection" + homepage "http://unixwiz.net/tools/lockrun.html" + url "http://unixwiz.net/tools/lockrun.c" + version "1.1.3" + sha256 "cea2e1e64c57cb3bb9728242c2d30afeb528563e4d75b650e8acae319a2ec547" + license :public_domain + + # The upstream website doesn't publish version information, so we check the + # version history comment in `lockrun.c` itself. + livecheck do + url :stable + regex(%r{v?(\d+(?:\.\d+)+)\s+\d{4}[/-]\d{2}[/-]\d{2}}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa9f904cbb5c509a1aeef7afb173599b212352054380f017c9ff657a90aa866c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "60567111dd2a82dc49b2c4687b16cf29a21543d68f533e2ec8b34e4f1da2bd77" + sha256 cellar: :any_skip_relocation, arm64_ventura: "faddfa34e58f779eb9881ab52b8623f41a875b6198a40a6588e7048c42d210a3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "64cb6e7d6280221f945c12e4489844d66757705911ff807932073c91a06e60fd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "62c427c531d8c221639c456a7d57723bb8b1c832b4738b4173400988b5c9c54a" + sha256 cellar: :any_skip_relocation, sonoma: "7dcc0b0790ef1ff21ab7cf7e17273007c575335c4c954265a6c3d98fc732f621" + sha256 cellar: :any_skip_relocation, ventura: "f6898ae5b1113480d59d39f49709a50759290b7ac0ce53545cf9d63cbf602d45" + sha256 cellar: :any_skip_relocation, monterey: "3aaf8d6393b298b453118399d2134c5833e32d3f22e21dda03cac778e10fa373" + sha256 cellar: :any_skip_relocation, big_sur: "e1c592ed7a2bef68c8e35b119bf3f3b60654461bbb15b59d6ed29e026c6298d2" + sha256 cellar: :any_skip_relocation, catalina: "8873fc021c96ed98f60c72b3a467aaa41f831c4c875e322efbb73343138ea829" + sha256 cellar: :any_skip_relocation, mojave: "0bacda6dd0fb9ab16f5a53191506132b338ce85e3367a0d150486a3c406ced5e" + sha256 cellar: :any_skip_relocation, high_sierra: "8e2764324f3709946ee1dc7b9c2135dca1e6c94b265d79fdb3f171809d88dfc4" + sha256 cellar: :any_skip_relocation, sierra: "5c37b3e9c3f55cfa50379c72fc00259bffa8d3d48688bcaaa44122805ffa4c3a" + sha256 cellar: :any_skip_relocation, el_capitan: "10782346442c28b235f80579c1b0dac3ec784fb151f7bef475757c1bde944b16" + sha256 cellar: :any_skip_relocation, arm64_linux: "141fc5e4c50953b8ed382b7c3cee817d578808ccaed0c72e00d7fc3c0eda8942" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f98a31a7651fbacfd1ccd1085b99fd53d1f4a5a981e4ed2702f2cbf1293126dc" + end + + def install + system ENV.cc, "lockrun.c", "-o", "lockrun" + bin.install "lockrun" + end + + test do + system bin/"lockrun", "--version" + end +end diff --git a/Formula/l/locust.rb b/Formula/l/locust.rb new file mode 100644 index 0000000000000..cb0b189c035ab --- /dev/null +++ b/Formula/l/locust.rb @@ -0,0 +1,215 @@ +class Locust < Formula + include Language::Python::Virtualenv + + desc "Scalable user load testing tool written in Python" + homepage "https://locust.io/" + url "https://files.pythonhosted.org/packages/69/e2/9d5d89c91a8bfbded69d3b2f55005adeb2b073a799839906354213c471f7/locust-2.37.3.tar.gz" + sha256 "860d0fee8438cd215fac1f33dca32090e11aa72364c0f84546267ced23d1b2de" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "594b2c2568a9d8c9fc1f830160db9ef0b49d8fa8f6eceb38a5d90aae8d7fee0e" + sha256 cellar: :any, arm64_sonoma: "8cee920bb78fb9cbae9107860df7897669e8e199b2e5bb38cf0006c817156e3e" + sha256 cellar: :any, arm64_ventura: "e5cc4970140248054f9700e7c2ed39de13e00cd4d5e343381d6c4846fd33fdf8" + sha256 cellar: :any, sonoma: "f5b5c85c57fb89777c8af2f761f48e399d40a2a0f6c2d8964e115f8e1322c8b5" + sha256 cellar: :any, ventura: "dec129c75a5891157c60958dba5d7f21832e73c8e957aac66803fbc10e93b586" + sha256 cellar: :any_skip_relocation, arm64_linux: "66bae80156cd6e8da5ea9cd78b8b4698914ab5df27c279712875645ccf6b7129" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88425288ca9a98502a4dfb91ff41659dfece9be101f230559da5003d180562d9" + end + + depends_on "cmake" => :build # for pyzmq + depends_on "ninja" => :build # for pyzmq + depends_on "certifi" + depends_on "python@3.13" + depends_on "zeromq" + + resource "bidict" do + url "https://files.pythonhosted.org/packages/9a/6e/026678aa5a830e07cd9498a05d3e7e650a4f56a42f267a53d22bcda1bdc9/bidict-0.23.1.tar.gz" + sha256 "03069d763bc387bbd20e7d49914e75fc4132a41937fa3405417e1a5a2d006d71" + end + + resource "blinker" do + url "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz" + sha256 "b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf" + end + + 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/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/70/8a/73f1008adfad01cb923255b924b1528727b8270e67cb4ef41eabdc7d783e/ConfigArgParse-1.7.tar.gz" + sha256 "e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1" + end + + resource "flask" do + url "https://files.pythonhosted.org/packages/c0/de/e47735752347f4128bcf354e0da07ef311a78244eba9e3dc1d4a5ab21a98/flask-3.1.1.tar.gz" + sha256 "284c7b8f2f58cb737f0cf1c30fd7eaf0ccfcde196099d24ecede3fc2005aa59e" + end + + resource "flask-cors" do + url "https://files.pythonhosted.org/packages/32/d8/667bd90d1ee41c96e938bafe81052494e70b7abd9498c4a0215c103b9667/flask_cors-5.0.1.tar.gz" + sha256 "6ccb38d16d6b72bbc156c1c3f192bc435bfcc3c2bc864b2df1eb9b2d97b2403c" + end + + resource "flask-login" do + url "https://files.pythonhosted.org/packages/c3/6e/2f4e13e373bb49e68c02c51ceadd22d172715a06716f9299d9df01b6ddb2/Flask-Login-0.6.3.tar.gz" + sha256 "5e23d14a607ef12806c699590b89d0f0e0d67baeec599d75947bf9c147330333" + end + + resource "gevent" do + url "https://files.pythonhosted.org/packages/ab/75/a53f1cb732420f5e5d79b2563fc3504d22115e7ecfe7966e5cf9b3582ae7/gevent-24.11.1.tar.gz" + sha256 "8bd1419114e9e4a3ed33a5bad766afff9a3cf765cb440a582a1b3a9bc80c1aca" + end + + resource "geventhttpclient" do + url "https://files.pythonhosted.org/packages/29/26/018524ea81b2021dc2fe60e1a9c3f5eb347e09a5364cdcb7b92d7e7d3c28/geventhttpclient-2.3.3.tar.gz" + sha256 "3e74c1570d01dd09cabdfe2667fbf072520ec9bb3a31a0fd1eae3d0f43847f9b" + end + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/34/c1/a82edae11d46c0d83481aacaa1e578fea21d94a1ef400afd734d47ad95ad/greenlet-3.2.2.tar.gz" + sha256 "ad053d34421a2debba45aa3cc39acf454acbcd025b3fc1a9f8a0dee237abd485" + 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 "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 "locust-cloud" do + url "https://files.pythonhosted.org/packages/30/65/e3dfd66ede886b5f84f7767e97539aab65946a29d4dfba41039df9933989/locust_cloud-1.21.5.tar.gz" + sha256 "f5347c0ab7c22c151fbb9a93001c107ed3f2662584af0af9f159563df1866464" + 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 "platformdirs" do + url "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + resource "python-engineio" do + url "https://files.pythonhosted.org/packages/3c/9d/8492fbde3d4cb0e052de8a91a09754f222b5093f0342ef2dac92d60c751f/python_engineio-4.12.1.tar.gz" + sha256 "9f2b5a645c416208a9c727254316d487252493de52bee0ff70dc29ca9210397e" + end + + resource "python-socketio" do + url "https://files.pythonhosted.org/packages/21/1a/396d50ccf06ee539fa758ce5623b59a9cb27637fc4b2dc07ed08bf495e77/python_socketio-5.13.0.tar.gz" + sha256 "ac4e19a0302ae812e23b712ec8b6427ca0521f7c582d6abb096e36e24a263029" + end + + resource "pyzmq" do + url "https://files.pythonhosted.org/packages/b1/11/b9213d25230ac18a71b39b3723494e57adebe36e066397b961657b3b41c1/pyzmq-26.4.0.tar.gz" + sha256 "4bd13f85f80962f91a651a7356fe0472791a5f7a92f227822b5acf44795c626d" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/95/32/0cc40fe41fd2adb80a2f388987f4f8db3c866c69e33e0b4c8b093fdf700e/setuptools-80.4.0.tar.gz" + sha256 "5a78f61820bc088c8e4add52932ae6b8cf423da2aff268c23f813cfbb13b4006" + 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 "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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 "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + resource "wsproto" do + url "https://files.pythonhosted.org/packages/c9/4a/44d3c295350d776427904d73c189e10aeae66d7f555bb2feee16d1e4ba5a/wsproto-1.2.0.tar.gz" + sha256 "ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065" + end + + resource "zope-event" do + url "https://files.pythonhosted.org/packages/46/c2/427f1867bb96555d1d34342f1dd97f8c420966ab564d58d18469a1db8736/zope.event-5.0.tar.gz" + sha256 "bac440d8d9891b4068e2b5a2c5e2c9765a9df762944bda6955f96bb9b91e67cd" + end + + resource "zope-interface" do + url "https://files.pythonhosted.org/packages/30/93/9210e7606be57a2dfc6277ac97dcc864fd8d39f142ca194fdc186d596fda/zope.interface-7.2.tar.gz" + sha256 "8b49f1a3d1ee4cdaf5b32d2e738362c7f5e40ac8b46dd7d1a65e82a4872728fe" + end + + def install + # skip frontend build + ENV["SKIP_PRE_BUILD"] = "true" + + virtualenv_install_with_resources + end + + test do + (testpath/"locustfile.py").write <<~PYTHON + from locust import HttpUser, task + + class HelloWorldUser(HttpUser): + @task + def hello_world(self): + self.client.get("/headers") + self.client.get("/ip") + PYTHON + + ENV["LOCUST_LOCUSTFILE"] = testpath/"locustfile.py" + ENV["LOCUST_HOST"] = "http://httpbin.org/" + ENV["LOCUST_USERS"] = "2" + + system bin/"locust", "--headless", "--run-time", "3s" + end +end diff --git a/Formula/l/log4c.rb b/Formula/l/log4c.rb new file mode 100644 index 0000000000000..582d8d71b5ec2 --- /dev/null +++ b/Formula/l/log4c.rb @@ -0,0 +1,47 @@ +class Log4c < Formula + desc "Logging Framework for C" + homepage "https://log4c.sourceforge.net/" + url "https://downloads.sourceforge.net/project/log4c/log4c/1.2.4/log4c-1.2.4.tar.gz" + sha256 "5991020192f52cc40fa852fbf6bbf5bd5db5d5d00aa9905c67f6f0eadeed48ea" + license "LGPL-2.1-only" + head "https://git.code.sf.net/p/log4c/log4c.git", branch: "master" + + livecheck do + url :stable + regex(%r{url=.*?/log4c[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_sequoia: "83103a56bdf9b8b2105f679fbeb44dca1c36c46d7afcc542b080e59e6e205f51" + sha256 arm64_sonoma: "0a21d82a2a2ee563678a110e2462a9236de30c358b8cfa62c9b919ca09e74ba8" + sha256 arm64_ventura: "3d35b584c96f856ebdc672621ae867fc0d14c56b193bc25fcd3f4b122cd9e250" + sha256 arm64_monterey: "df3a6f744304902108b48717a9bde9c4f1f19b25f04dbf4b99afb5ca8b55b9f8" + sha256 arm64_big_sur: "13c3c642cb9d105c742bb313fde02b1968dee00017ac5fa96e46a908ae43e996" + sha256 sonoma: "79b5631ab866eb7263b716c5ef6d5103b9b1c8b0a9c87319661037e52ffcc384" + sha256 ventura: "11db7e7c463f17035e79dfd31d906a8b52dbca9802ba7a45239290d337e0a4b7" + sha256 monterey: "26f216931900e3f177c8f9158afc9d1beddab45327606f35e180577ec3b4ca27" + sha256 big_sur: "fa93c7beb25097d19cd6408e88e1d5bf8019386cdee22beb0f30d1fa7956286e" + sha256 catalina: "25859511ac3302318ca6eed1eaa89c5a9b1e91b611da4233604e443d9c016dec" + sha256 mojave: "8e35c261de43e25fe934f9f77875ff9c5fa6bdc4297fd0dd2fc657a5acd680ae" + sha256 high_sierra: "4019efd84d56e2390feff696e1fa3305b788fdcb3105c5b6117913e81a16a7f2" + sha256 sierra: "171a6c3f12f957d5442998f0f02df959aa4376ef543338765930ed4e062ef0ea" + sha256 el_capitan: "2334e58e3ae201b28362707d2b64701e2e1378695e915baad886956e4edea50a" + sha256 arm64_linux: "f5dda797e597bdf6ee587b2f8ad7b70403eff0f0069fce0d4bd9544e382c4bf2" + sha256 x86_64_linux: "5182c7b11972d29559087012a708f71137b9795294afb833aff1cf9d40168a9a" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"log4c-config", "--version" + end +end diff --git a/Formula/l/log4cplus.rb b/Formula/l/log4cplus.rb new file mode 100644 index 0000000000000..27a169bd9e599 --- /dev/null +++ b/Formula/l/log4cplus.rb @@ -0,0 +1,56 @@ +class Log4cplus < Formula + desc "Logging Framework for C++" + homepage "https://sourceforge.net/p/log4cplus/wiki/Home/" + url "https://downloads.sourceforge.net/project/log4cplus/log4cplus-stable/2.1.2/log4cplus-2.1.2.tar.xz" + sha256 "fbdabb4ef734fe1cc62169b23f0b480cc39127ac7b09b810a9c1229490d67e9e" + license all_of: ["Apache-2.0", "BSD-2-Clause"] + + livecheck do + url :stable + regex(/url=.*?log4cplus-stable.*?log4cplus[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c2330f21e0b3c6f379e155d8270f758067c67d5086bad74350dd6841114f70ac" + sha256 cellar: :any, arm64_sonoma: "8035d145371eff042f792dc7a2627c9b67a3f20530fb2f66e07e7b4bd25eeb93" + sha256 cellar: :any, arm64_ventura: "b60bac8e9aaf34f6b81055d7ebc3578462e1e144855e1e3d416e54fa87346fab" + sha256 cellar: :any, sonoma: "b3cbcf75711ecb77bbf59942f30e8e6767105753b5363cc8cd8ca5d13201314b" + sha256 cellar: :any, ventura: "7c62fc3ea51cc81fae1f97f5649898fdb567667b67d99fd419347e237b636fcf" + sha256 cellar: :any_skip_relocation, arm64_linux: "d789ed4a5d65789a09539bb155c14708acd9f7037318c43233933690d10cf474" + sha256 cellar: :any_skip_relocation, x86_64_linux: "038cc5359e99cc5e80a899304e02f22c54156539c5b3db4e03516982ebdb3c12" + end + + depends_on "pkgconf" => [:build, :test] + + def install + ENV.cxx11 + system "./configure", *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + test do + # https://github.com/log4cplus/log4cplus/blob/65e4c3/docs/examples.md + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + + int main() + { + log4cplus::Initializer initializer; + log4cplus::BasicConfigurator config; + config.configure(); + + log4cplus::Logger logger = log4cplus::Logger::getInstance( + LOG4CPLUS_TEXT("main")); + LOG4CPLUS_WARN(logger, LOG4CPLUS_TEXT("Hello, World!")); + return 0; + } + CPP + + pkgconf_flags = shell_output("pkgconf --cflags --libs log4cplus").chomp.split + system ENV.cxx, "-std=c++11", "-o", "test", "test.cpp", *pkgconf_flags + assert_match "Hello, World!", shell_output("./test") + end +end diff --git a/Formula/l/log4cpp.rb b/Formula/l/log4cpp.rb new file mode 100644 index 0000000000000..cc8d133281409 --- /dev/null +++ b/Formula/l/log4cpp.rb @@ -0,0 +1,72 @@ +class Log4cpp < Formula + desc "Configurable logging for C++" + homepage "https://log4cpp.sourceforge.net/" + url "https://downloads.sourceforge.net/project/log4cpp/log4cpp-1.1.x%20%28new%29/log4cpp-1.1/log4cpp-1.1.4.tar.gz" + sha256 "696113659e426540625274a8b251052cc04306d8ee5c42a0c7639f39ca90c9d6" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/log4cpp[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "f8421676fbd3fc123bca6932dfe2d92f2eafaa4757a1a3d287260ea2fdb72e75" + sha256 cellar: :any, arm64_sonoma: "9dd6710dd93d90ad62742ef724afe56aab75d6686a7b67ba450945c96b64638b" + sha256 cellar: :any, arm64_ventura: "f742bcb2025862fa184116e5c431aab3da949bad797a8d4f9192549c154277a2" + sha256 cellar: :any, arm64_monterey: "2e2b6848ed9ffa3265133841967798d4ffd0d7ef8c0d19ebcbdc92c828c00749" + sha256 cellar: :any, arm64_big_sur: "0aeb4d8a835632b533aae93a869073f981e236484cf6de0d909e12c72bd6fcd0" + sha256 cellar: :any, sonoma: "a8dc9b265c9f0e076dc183b600a898d6c5911597582f17ce249d39cd7cfbbb3c" + sha256 cellar: :any, ventura: "a91172e8e2ce71ce7f02272721f010923fbaa860922b516e5f5ab27ea6a7e6a7" + sha256 cellar: :any, monterey: "68f55e83feff7de8701a8f995c33468cc267b238808b195c4929a32430e1fa35" + sha256 cellar: :any, big_sur: "70a13ba2b47676203ab6affca7cecd19df2568c59df1bf6886d94bedc2d57a75" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1e8877b5575ca2bfc5bbda57e8d09f236ae2be4b7c3b9247839fff34f7b1f26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cce5ef111899b449de8806d1ba7a63ad3f841219c7b0d8734e94a18ee67e8983" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + ENV.cxx11 + 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 + + test do + (testpath/"log4cpp.cpp").write <<~CPP + #include + #include + #include + #include + #include + #include + #include + + int main(int argc, char* argv[]) { + log4cpp::OstreamAppender* osAppender = new log4cpp::OstreamAppender("osAppender", &std::cout); + osAppender->setLayout(new log4cpp::BasicLayout()); + + log4cpp::Category& root = log4cpp::Category::getRoot(); + root.addAppender(osAppender); + root.setPriority(log4cpp::Priority::INFO); + + root.info("This is an informational log message"); + + // Clean up + root.removeAllAppenders(); + log4cpp::Category::shutdown(); + + return 0; + } + CPP + system ENV.cxx, "log4cpp.cpp", "-L#{lib}", "-llog4cpp", "-o", "log4cpp" + system "./log4cpp" + end +end diff --git a/Formula/l/log4cxx.rb b/Formula/l/log4cxx.rb new file mode 100644 index 0000000000000..1e628950ede9f --- /dev/null +++ b/Formula/l/log4cxx.rb @@ -0,0 +1,67 @@ +class Log4cxx < Formula + desc "Library of C++ classes for flexible logging" + homepage "https://logging.apache.org/log4cxx/index.html" + url "https://www.apache.org/dyn/closer.lua?path=logging/log4cxx/1.4.0/apache-log4cxx-1.4.0.tar.gz" + mirror "https://archive.apache.org/dist/logging/log4cxx/1.4.0/apache-log4cxx-1.4.0.tar.gz" + sha256 "3d2d1f356a546c14562763aaf15fcc3fd59d4ffeb5a2f68fcb0bbd7571ed6f96" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6b6a997c8d90c6512afae918d7b44b86bb7d01f76d23b74ff2e78f85b37fe874" + sha256 cellar: :any, arm64_sonoma: "485bed48c83644ecb085b6484dfe3649ed67fbad384c8eb9218f1bf434743887" + sha256 cellar: :any, arm64_ventura: "317df9001cb2c399dff56f52a27c5a5bc97e1b6c94916f5adae651270980b36c" + sha256 cellar: :any, sonoma: "daaa2bc0fd4e9a91892c625d9f41f6e87237d54811eb5b4afec1bd35d84a482c" + sha256 cellar: :any, ventura: "da0e6890b5b2188e034584dbeea0327f475dfa305e1e482d457c93d5708bbc12" + sha256 cellar: :any_skip_relocation, arm64_linux: "47823f5f2c6cb811c3c8b853b5989dba6277d0344adae7adde4d34dffd49b4c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b594119142a0c99175b561b2048a7272e93091a039ea3f1d45671eddec0a625" + end + + depends_on "cmake" => :build + depends_on "apr" + depends_on "apr-util" + + 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 + #include + int main() { + log4cxx::PropertyConfigurator::configure("log4cxx.config"); + + log4cxx::LoggerPtr log = log4cxx::Logger::getLogger("Test"); + log->setLevel(log4cxx::Level::getInfo()); + LOG4CXX_ERROR(log, "Foo"); + + return 1; + } + CPP + + (testpath/"log4cxx.config").write <<~EOS + log4j.rootLogger=debug, stdout, R + + log4j.appender.stdout=org.apache.log4j.ConsoleAppender + log4j.appender.stdout.layout=org.apache.log4j.PatternLayout + + # Pattern to output the caller's file name and line number. + log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n + + log4j.appender.R=org.apache.log4j.RollingFileAppender + log4j.appender.R.File=example.log + + log4j.appender.R.MaxFileSize=100KB + # Keep one backup file + log4j.appender.R.MaxBackupIndex=1 + + log4j.appender.R.layout=org.apache.log4j.PatternLayout + log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n + EOS + + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", "-L#{lib}", "-llog4cxx" + assert_match(/ERROR.*Foo/, shell_output("./test", 1)) + end +end diff --git a/Formula/l/log4shib.rb b/Formula/l/log4shib.rb new file mode 100644 index 0000000000000..a679d629a41a7 --- /dev/null +++ b/Formula/l/log4shib.rb @@ -0,0 +1,45 @@ +class Log4shib < Formula + desc "Forked version of log4cpp for the Shibboleth project" + homepage "https://wiki.shibboleth.net/confluence/display/OpenSAML/log4shib" + url "https://shibboleth.net/downloads/log4shib/2.0.1/log4shib-2.0.1.tar.gz" + sha256 "aad37f3929bd3d4c16f09831ff109c20ae8c7cb8b577917e3becb12f873f26df" + license "LGPL-2.1-only" + + livecheck do + url "https://shibboleth.net/downloads/log4shib/latest/" + regex(/href=.*?log4shib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8f3ca9cfd6b2cdc5d7487bcba05d48704e32a91a976addec41677d45525522a6" + sha256 cellar: :any, arm64_sonoma: "b4e8f90a884b5a2afc47ee2fb0a1d13a4731b4e03df4d3f5d432bf6b5ae41196" + sha256 cellar: :any, arm64_ventura: "c2bc8d9323dd44d769a0b9f139951bdd648467e8eb89d75dd47154751ef8e72d" + sha256 cellar: :any, arm64_monterey: "0a24e1932a0b752006d448741f713646761e8d827e8615aa69575b3de674a85f" + sha256 cellar: :any, arm64_big_sur: "450ddfec54aca621297964385847c9ac0207dd1cf41d67222bf9f0fcb1207360" + sha256 cellar: :any, sonoma: "426c449a2af448af0262f97986cf4f60c23fa570501568526708a8010c9c5be2" + sha256 cellar: :any, ventura: "5eca207602aa861957c57cc05e191ee5d22fc2cec69761c9b4d78d7429369b7e" + sha256 cellar: :any, monterey: "7a8f70e280df362c5f85191ee9586c40436da110824674fb7e451d0a177b165f" + sha256 cellar: :any, big_sur: "0eddc0326cf4fbbf0eafe1bf6ebf1c69f55eabc218527624f47871be8fad3d04" + sha256 cellar: :any, catalina: "dd41c1980bae36dbbfd7c5ae5fc896354a95592a78f3b3f76b7b8ab35ab02329" + sha256 cellar: :any_skip_relocation, arm64_linux: "3bdf6274c47d7e6b14b257917453edcdf85fb1b3295e39b7ad1819d2759b4c4d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b91c63f0b4e7b7aeeddfee541c3e7a0392438d9fa8ec2576b8f08e1bf7a711f" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" + system "make", "install" + (pkgshare/"test").install %w[tests/log4shib.init tests/testConfig.cpp tests/testConfig.log4shib.properties] + end + + test do + cp_r (pkgshare/"test").children, testpath + system ENV.cxx, "testConfig.cpp", "-I#{include}", "-L#{lib}", "-llog4shib", "-o", "test", "-pthread" + system "./test" + end +end diff --git a/Formula/l/logcheck.rb b/Formula/l/logcheck.rb new file mode 100644 index 0000000000000..93ffb6561c23a --- /dev/null +++ b/Formula/l/logcheck.rb @@ -0,0 +1,37 @@ +class Logcheck < Formula + desc "Mail anomalies in the system logfiles to the administrator" + homepage "https://packages.debian.org/sid/logcheck" + url "https://deb.debian.org/debian/pool/main/l/logcheck/logcheck_1.4.4.tar.xz" + sha256 "d40e1a92707e19581cdc5f1596a56d26396f18b061612e84fb0fbd957bc03864" + license "GPL-2.0-only" + + livecheck do + url "https://packages.debian.org/unstable/logcheck" + regex(/href=.*?logcheck[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "e864079731abec3d06b575a68ab48bbf59267493962665690bae3aa55ad43502" + end + + on_macos do + depends_on "gnu-sed" => :build + end + + def install + # use gnu-sed on macOS + ENV.prepend_path "PATH", Formula["gnu-sed"].libexec/"gnubin" if OS.mac? + + # Fix dependency on `dpkg-parsechangelog` + inreplace "Makefile", "$$(dpkg-parsechangelog -S version)", version.to_s + inreplace "Makefile", "$(DESTDIR)/$(CONFDIR)", "$(CONFDIR)" + system "make", "install", "--always-make", "DESTDIR=#{prefix}", + "SBINDIR=sbin", "BINDIR=bin", "CONFDIR=#{etc}/logcheck" + end + + test do + (testpath/"README").write "Boaty McBoatface" + output = shell_output("#{sbin}/logtail -f #{testpath}/README") + assert_match "Boaty McBoatface", output + end +end diff --git a/Formula/l/logcli.rb b/Formula/l/logcli.rb new file mode 100644 index 0000000000000..ccc77959692f7 --- /dev/null +++ b/Formula/l/logcli.rb @@ -0,0 +1,61 @@ +class Logcli < Formula + desc "Run LogQL queries against a Loki server" + homepage "https://grafana.com/loki" + url "https://github.com/grafana/loki/archive/refs/tags/v3.5.0.tar.gz" + sha256 "584d7f45cc85f884e8eb7e8ed8c35eacd2157c6edd0f2a2d0161ba39d22b86ae" + 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_sequoia: "125a104cd08d4e7aa2a4af5126c43b2d22c914fbc8de5a0768358f47c641835c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0d5bd5893bc08627c396a0761c98a3a9171db34bf14b6f50a15954bdb7d77649" + sha256 cellar: :any_skip_relocation, arm64_ventura: "488967a06f5dcb951c86a91c281e64f23edf059c4409f6e0aa9f050cca30fc62" + sha256 cellar: :any_skip_relocation, sonoma: "4b65cce5ef283bb64b058c0ee61c86f6ac2426bf1501cd0aae96f28a3e3684ae" + sha256 cellar: :any_skip_relocation, ventura: "a3d1a04e565e67a2eb866bb12e074d328fa3e8a7c9dc3f16207640e3df38cdcd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b12e70b100056f7c668660a1024fedf32a52cde9cae531963b5a19e1a6d2294" + end + + depends_on "go" => :build + depends_on "loki" => :test + + def install + ldflags = %W[ + -s -w + -X github.com/grafana/loki/pkg/util/build.Branch=main + -X github.com/grafana/loki/pkg/util/build.Version=#{version} + -X github.com/grafana/loki/pkg/util/build.BuildUser=#{tap.user} + -X github.com/grafana/loki/pkg/util/build.BuildDate=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:), "./cmd/logcli" + + generate_completions_from_executable( + bin/"logcli", + shell_parameter_format: "--completion-script-", shells: [:bash, :zsh], + ) + end + + test do + resource "homebrew-testdata" do + url "https://raw.githubusercontent.com/grafana/loki/5c8542036609f157fee45da7efafbba72308e829/cmd/loki/loki-local-config.yaml" + sha256 "14557cd65634314d4eec22cf1bac212f3281854156f669b61b17f2784c895ab1" + end + + port = free_port + + testpath.install resource("homebrew-testdata") + inreplace "loki-local-config.yaml" do |s| + s.gsub! "3100", port.to_s + s.gsub! "/tmp", testpath + end + + fork { exec Formula["loki"].bin/"loki", "-config.file=loki-local-config.yaml" } + sleep 3 + + assert_empty shell_output("#{bin}/logcli --addr=http://localhost:#{port} labels") + end +end diff --git a/Formula/l/logdy.rb b/Formula/l/logdy.rb new file mode 100644 index 0000000000000..9ed93c149da3b --- /dev/null +++ b/Formula/l/logdy.rb @@ -0,0 +1,34 @@ +class Logdy < Formula + desc "Web based real-time log viewer" + homepage "https://logdy.dev/" + url "https://github.com/logdyhq/logdy-core/archive/refs/tags/v0.16.0.tar.gz" + sha256 "c9db35d4dfe619ec7af79324568c17db373eb3266f88a25de291cec636a5a1d0" + license "Apache-2.0" + head "https://github.com/logdyhq/logdy-core.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f824b88435510732a6b795cf100cd9de6249febc70afa7d339d817a7d7f31739" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f824b88435510732a6b795cf100cd9de6249febc70afa7d339d817a7d7f31739" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f824b88435510732a6b795cf100cd9de6249febc70afa7d339d817a7d7f31739" + sha256 cellar: :any_skip_relocation, sonoma: "e48f5faaa1c82aff7dffaa7d9fc55b1b2552b60ca51c3921133eb950402d2891" + sha256 cellar: :any_skip_relocation, ventura: "e48f5faaa1c82aff7dffaa7d9fc55b1b2552b60ca51c3921133eb950402d2891" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dee1e1e42f5737edbf37da5cb2c2a16882702063a656436e71af979d6c2ed31f" + 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/"logdy", "completion") + end + + test do + port = free_port + r, _, pid = PTY.spawn("#{bin}/logdy stdin --port=#{port}") + assert_match "Listen to stdin (from pipe)", r.readline + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/l/logrotate.rb b/Formula/l/logrotate.rb new file mode 100644 index 0000000000000..7708b65eaa507 --- /dev/null +++ b/Formula/l/logrotate.rb @@ -0,0 +1,54 @@ +class Logrotate < Formula + desc "Rotates, compresses, and mails system logs" + homepage "https://github.com/logrotate/logrotate" + url "https://github.com/logrotate/logrotate/releases/download/3.22.0/logrotate-3.22.0.tar.xz" + sha256 "42b4080ee99c9fb6a7d12d8e787637d057a635194e25971997eebbe8d5e57618" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "90ddfc2708f68326d05446c86b053187949aeaa8c3ed5463e7e827018a9ada51" + sha256 cellar: :any, arm64_sonoma: "0439009653f0b4d9a2c3e0d298e4ffd2f784757c4f185dd6e6b87e0afe3e35d0" + sha256 cellar: :any, arm64_ventura: "9526d7d94fbbf4d77d45a5b1c9b997c1f9a837479ed26e19e0dace4ef8fe0f8b" + sha256 cellar: :any, sonoma: "0cd0fdec8b7db339f1b64a71581284c69473956763a0cae5fcd7f79ae8d488fb" + sha256 cellar: :any, ventura: "631dce1810fd6010e337ad777501f7806f607083069d2bb493b17f9fa760a073" + sha256 cellar: :any_skip_relocation, arm64_linux: "c047f99df0fdd830943259ac9e82e6313e759b9e6bd9305dd838424c594861f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fcd529f16cb51591df2b5697669cba2847f8230dda31a92a36718479a78c7913" + end + + depends_on "popt" + + def install + system "./configure", "--with-compress-command=/usr/bin/gzip", + "--with-uncompress-command=/usr/bin/gunzip", + "--with-state-file-path=#{var}/lib/logrotate.status", + *std_configure_args + system "make", "install" + + inreplace "examples/logrotate.conf", "/etc/logrotate.d", "#{etc}/logrotate.d" + etc.install "examples/logrotate.conf" => "logrotate.conf" + end + + def post_install + (etc/"logrotate.d").mkpath + (var/"lib").mkpath + end + + service do + run [opt_sbin/"logrotate", etc/"logrotate.conf"] + run_type :cron + cron "25 6 * * *" + end + + test do + (testpath/"test.log").write("testlograndomstring") + (testpath/"testlogrotate.conf").write <<~EOS + #{testpath}/test.log { + size 1 + copytruncate + } + EOS + system "#{sbin}/logrotate", "-s", "logstatus", "testlogrotate.conf" + assert(File.size?("test.log").nil?, "File is not zero length!") + end +end diff --git a/Formula/l/logstalgia.rb b/Formula/l/logstalgia.rb new file mode 100644 index 0000000000000..d483316f3a020 --- /dev/null +++ b/Formula/l/logstalgia.rb @@ -0,0 +1,58 @@ +class Logstalgia < Formula + desc "Web server access log visualizer with retro style" + homepage "https://logstalgia.io/" + url "https://github.com/acaudwell/Logstalgia/releases/download/logstalgia-1.1.4/logstalgia-1.1.4.tar.gz" + sha256 "c049eff405e924035222edb26bcc6c7b5f00a08926abdb7b467e2449242790a9" + license "GPL-3.0-or-later" + revision 7 + + bottle do + sha256 arm64_sequoia: "768960af5482c74e6126145fa692ff49292fb22d0648a9851dbb5100d23a3147" + sha256 arm64_sonoma: "0c14a3f043b5c93602f4c95fcd20db618161a14f6f8ccb2c2cef7be97e54295f" + sha256 arm64_ventura: "22e4603221b1a7a1a33fe226239c57bca7250112faad244223a2c7c60db7339e" + sha256 sonoma: "5090c058761cccc7936e6f9c311fd132e03929be2d4b999fda72cc2e70a49935" + sha256 ventura: "fd28fb16ed3c1b59c82b70241ae6672cb92eb8a84e7700ba5021d815b0e05bad" + sha256 arm64_linux: "8bff97fc0e0999bb92e37a2dbb672dbfb18c1f540f299c797fa0ecbed101e8c2" + sha256 x86_64_linux: "336dd49091c4ce92ee67c14b1c793c9caba7417537c5bc98c0e89f97fdae3c8e" + end + + head do + url "https://github.com/acaudwell/Logstalgia.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "glm" => :build + depends_on "pkgconf" => :build + + depends_on "boost" + depends_on "freetype" + depends_on "glew" + depends_on "libpng" + depends_on "pcre2" + depends_on "sdl2" + depends_on "sdl2_image" + + on_linux do + depends_on "mesa" + depends_on "mesa-glu" + end + + def install + ENV.cxx11 # to build with boost>=1.85 + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", + "--with-boost-libdir=#{Formula["boost"].opt_lib}", + "--without-x", + *std_configure_args + system "make" + system "make", "install" + end + + test do + assert_match "Logstalgia v1.", shell_output("#{bin}/logstalgia --help") + end +end diff --git a/Formula/l/logstash.rb b/Formula/l/logstash.rb new file mode 100644 index 0000000000000..9eb26f1f7c91a --- /dev/null +++ b/Formula/l/logstash.rb @@ -0,0 +1,115 @@ +class Logstash < Formula + desc "Tool for managing events and logs" + homepage "https://www.elastic.co/products/logstash" + url "https://github.com/elastic/logstash/archive/refs/tags/v9.0.1.tar.gz" + sha256 "3812e73ae35e2789cbd7a3abbbaac9e5d8cb32837cc7a626b132961f69a454b6" + license "Apache-2.0" + version_scheme 1 + head "https://github.com/elastic/logstash.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "41da786a1557aff86546c0d7f739966d0c74c6f8cfd356a36da31eaf741c8f09" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2ff5d7c62e6e42182bed122c7ff4bcd9984ce063cb233429f738876ab791a246" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b4ae0c79428e9ad980dbe4fb19138f3137885bc68818053b92dce2310e7295b" + sha256 cellar: :any, sonoma: "074083b379e7decca3fa47e22cc13e8f32a8a647bda323f38703771f64d04ed2" + sha256 cellar: :any, ventura: "f0b8bc8f5bc1c1f9d7321f2c354eee0f057143cc3c5560f11055e5ed80fd9c50" + sha256 cellar: :any_skip_relocation, arm64_linux: "47eb2491f13b1d0c3fa1118ea34a906a63b37421739f36cfc04aa6844f2ee0ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "717ace083163fa7c78bdb19a4945691af85566cc0962622af1363e598a853615" + end + + depends_on "openjdk@21" + + uses_from_macos "ruby" => :build + + def install + # remove non open source files + rm_r("x-pack") + ENV["OSS"] = "true" + + # Build the package from source + system "rake", "artifact:no_bundle_jdk_tar" + # Extract the package to the current directory + mkdir "tar" + system "tar", "--strip-components=1", "-xf", Dir["build/logstash-*.tar.gz"].first, "-C", "tar" + cd "tar" + + inreplace "bin/logstash", + %r{^\. "\$\(cd `dirname \$\{SOURCEPATH\}`/\.\.; pwd\)/bin/logstash\.lib\.sh"}, + ". #{libexec}/bin/logstash.lib.sh" + inreplace "bin/logstash-plugin", + %r{^\. "\$\(cd `dirname \$0`/\.\.; pwd\)/bin/logstash\.lib\.sh"}, + ". #{libexec}/bin/logstash.lib.sh" + inreplace "bin/logstash.lib.sh", + /^LOGSTASH_HOME=.*$/, + "LOGSTASH_HOME=#{libexec}" + + # Delete Windows and other Arch/OS files + paths_to_keep = OS.linux? ? "#{Hardware::CPU.arch}-#{OS.kernel_name}" : OS.kernel_name + rm Dir["bin/*.bat"] + Dir["vendor/jruby/tmp/lib/jni/*"].each do |path| + rm_r path unless path.include? paths_to_keep + end + + libexec.install Dir["*"] + + # Move config files into etc + (etc/"logstash").install Dir[libexec/"config/*"] + rm_r(libexec/"config") + + bin.install libexec/"bin/logstash", libexec/"bin/logstash-plugin" + bin.env_script_all_files libexec/"bin", LS_JAVA_HOME: "${LS_JAVA_HOME:-#{Language::Java.java_home("21")}}" + + # remove non-native architecture pre-built libraries + paths = [ + libexec/"vendor/jruby/lib/ruby/stdlib/libfixposix/binary", + ] + paths.each do |path| + path.each_child { |dir| rm_r(dir) unless dir.to_s.include? Hardware::CPU.arch.to_s } + end + rm_r libexec/"vendor/jruby/lib/ruby/stdlib/libfixposix/binary/arm64-darwin" if OS.mac? && Hardware::CPU.arm? + end + + def post_install + ln_s etc/"logstash", libexec/"config" unless (libexec/"config").exist? + end + + def caveats + <<~EOS + Configuration files are located in #{etc}/logstash/ + EOS + end + + service do + run opt_bin/"logstash" + keep_alive false + working_dir var + log_path var/"log/logstash.log" + error_log_path var/"log/logstash.log" + end + + test do + # workaround https://github.com/elastic/logstash/issues/6378 + (testpath/"config").mkpath + ["jvm.options", "log4j2.properties", "startup.options"].each do |f| + cp prefix/"libexec/config/#{f}", testpath/"config" + end + (testpath/"config/logstash.yml").write <<~YAML + path.queue: #{testpath}/queue + YAML + (testpath/"data").mkpath + (testpath/"logs").mkpath + (testpath/"queue").mkpath + + data = "--path.data=#{testpath}/data" + logs = "--path.logs=#{testpath}/logs" + settings = "--path.settings=#{testpath}/config" + + output = pipe_output("#{bin}/logstash -e '' #{data} #{logs} #{settings} --log.level=fatal", "hello world\n") + assert_match "hello world", output + end +end diff --git a/Formula/l/logswan.rb b/Formula/l/logswan.rb new file mode 100644 index 0000000000000..e655212c8e09f --- /dev/null +++ b/Formula/l/logswan.rb @@ -0,0 +1,33 @@ +class Logswan < Formula + desc "Fast Web log analyzer using probabilistic data structures" + homepage "https://www.logswan.org/" + url "https://github.com/fcambus/logswan/archive/refs/tags/2.1.15.tar.gz" + sha256 "6e500f33b741fce766225048ec2197e57047f91baa42ecd55ec2b94cdc2c3b5d" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7723c48f946745fda128783c73682abcd538a34b87512f17ab7a48c2ec7d7b95" + sha256 cellar: :any, arm64_sonoma: "1c26389b0b04f97cdf2c79edd4ee731dd7660ae8565bbc02cc79b2818774258d" + sha256 cellar: :any, arm64_ventura: "1706e833e83efa99e5376328bd2562b541661bcfd7b7b07e16c1632e983a82f8" + sha256 cellar: :any, sonoma: "e9c9114e2891d2c055a7ba55fc456b269082c11e32aadc7c894e8104b18c59cf" + sha256 cellar: :any, ventura: "397fd860ac0ce631568275746eab2407c2351c5c6cdf489e2363b64f7d996bfd" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d6c645f860d61304eafebf743fbfd4a2854c2e390bd9873c5e9defd8f917c09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "339fb70c5c850f38feb2410126b57ea5b4b03e813aac818a28d2050ddb8c6f35" + end + + depends_on "cmake" => :build + depends_on "jansson" + depends_on "libmaxminddb" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "examples" + end + + test do + assert_match "visits", shell_output("#{bin}/logswan #{pkgshare}/examples/logswan.log") + end +end diff --git a/Formula/l/logtalk.rb b/Formula/l/logtalk.rb new file mode 100644 index 0000000000000..b1b2607d24e01 --- /dev/null +++ b/Formula/l/logtalk.rb @@ -0,0 +1,55 @@ +class Logtalk < Formula + desc "Declarative object-oriented logic programming language" + homepage "https://logtalk.org/" + url "https://github.com/LogtalkDotOrg/logtalk3/archive/refs/tags/lgt3911stable.tar.gz" + version "3.91.1" + sha256 "fcebf7696a2dfc102f1f1b08a1a69c15fdcd020e8df17cccec0f1c08c97b4e58" + license "Apache-2.0" + head "https://github.com/LogtalkDotOrg/logtalk3.git", branch: "master" + + livecheck do + url "https://logtalk.org/download.html" + regex(/Latest stable version:.*?v?(\d+(?:\.\d+)+)/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "32146ca005f05687b4920d0b85838c0dd7f5e0446092ba3e568400d38e8dc135" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "96722265d944e0f6399ed816d6ac98a17340a00a625ee68897b51b9a09ea727b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "879202363a40674bc711921069c5d5669940cb2ae629e9414f47b06aa6f85855" + sha256 cellar: :any_skip_relocation, sonoma: "55008a9b41f8de8d7285ad61c088c951d197d52df7a61afc1f71f789811b4278" + sha256 cellar: :any_skip_relocation, ventura: "83018b7d88da453f590c69fa50ee27eca5004c064e752e717f40ba8142497888" + sha256 cellar: :any_skip_relocation, arm64_linux: "183f2918f6db041c3d39c7c6a883f79f622ced9120c05cbe58d5bfb569426a7e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7aebac4c6f05b1823e51201318d7fb2f27d982ccc1c1593d833ea28f6382b900" + end + + depends_on "gnu-prolog" + + def install + system "./scripts/install.sh", "-p", prefix + + # Resolve relative symlinks for env script + bin.each_child do |f| + next unless f.symlink? + + realpath = f.realpath + f.unlink + ln_s realpath, f + end + bin.env_script_all_files libexec/"bin", LOGTALKHOME: HOMEBREW_PREFIX/"share/logtalk", + LOGTALKUSER: "${LOGTALKUSER:-$HOME/logtalk}" + end + + def caveats + <<~EOS + Logtalk has been configured with the following environment variables: + LOGTALKHOME=#{HOMEBREW_PREFIX}/share/logtalk + LOGTALKUSER=$HOME/logtalk + EOS + end + + test do + output = pipe_output("#{bin}/gplgt 2>&1", "logtalk_load(hello_world(loader)).") + assert_match "Hello World!", output + refute_match "LOGTALKUSER should be defined first", output + end +end diff --git a/Formula/l/loki.rb b/Formula/l/loki.rb new file mode 100644 index 0000000000000..c344a286d4095 --- /dev/null +++ b/Formula/l/loki.rb @@ -0,0 +1,71 @@ +class Loki < Formula + desc "Horizontally-scalable, highly-available log aggregation system" + homepage "https://grafana.com/loki" + url "https://github.com/grafana/loki/archive/refs/tags/v3.5.0.tar.gz" + sha256 "584d7f45cc85f884e8eb7e8ed8c35eacd2157c6edd0f2a2d0161ba39d22b86ae" + license "AGPL-3.0-only" + head "https://github.com/grafana/loki.git", branch: "main" + + livecheck do + url :stable + regex(/^v(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b472639552be01c08671d53b3f0329a974d6569b6ceb84c97843527fc588bb7d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b31a16d28e23ddf58d161137f9e57df15cad81871e872ad0deefbcd4a8cff41" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9b3b614e4c1b48be24de3fc96d2961dc3fe8dd5276a5f8dc6f1b855455e40175" + sha256 cellar: :any_skip_relocation, sonoma: "cd2314b675908d900ee612474c0bc86ccfe83231a718ef89e90683f615e33ced" + sha256 cellar: :any_skip_relocation, ventura: "1bed2c651792241aae177908aedb871ee72e64acefa38dc0c694fb317e7a2f49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43e36493663cf7c83661e26883b5e74df898313b988c9de28b770eddd09566fd" + end + + depends_on "go" => :build + + # Fix to failed parsing config: loki-local-config.yaml: yaml: unmarshal errors: + # PR ref: https://github.com/grafana/loki/pull/16991 + patch do + url "https://github.com/grafana/loki/commit/974d8cf5b04c0043ded02cfc3ee360cdff219674.patch?full_index=1" + sha256 "56a06b0cae70464d738f7aa7c306446f73ceea4badef0502826de9fd1d0c3475" + end + patch do + url "https://github.com/grafana/loki/commit/cc34c48732229f2edf742b5f69536aaa607edc56.patch?full_index=1" + sha256 "d8f35a91af95d5fe2c1a3c77fa4f2394cb279b88a6c4f8cf22fd2b9d8376dca8" + end + patch do + url "https://github.com/grafana/loki/commit/8ca1db1d24799468c0c6d0cd6b640a60eb246646.patch?full_index=1" + sha256 "4e2925424bcd7a093f4986d3005c888b98edcdae82b71ec4d71b957f4a9cbcfb" + end + + def install + cd "cmd/loki" do + system "go", "build", *std_go_args(ldflags: "-s -w") + inreplace "loki-local-config.yaml", "/tmp", var + etc.install "loki-local-config.yaml" + end + end + + service do + run [opt_bin/"loki", "-config.file=#{etc}/loki-local-config.yaml"] + keep_alive true + working_dir var + log_path var/"log/loki.log" + error_log_path var/"log/loki.log" + end + + test do + port = free_port + + cp etc/"loki-local-config.yaml", testpath + inreplace "loki-local-config.yaml" do |s| + s.gsub! "3100", port.to_s + s.gsub! var, testpath + end + + fork { exec bin/"loki", "-config.file=loki-local-config.yaml" } + sleep 8 + + output = shell_output("curl -s localhost:#{port}/metrics") + assert_match "log_messages_total", output + end +end diff --git a/Formula/l/lol-html.rb b/Formula/l/lol-html.rb new file mode 100644 index 0000000000000..f94a83ce398c9 --- /dev/null +++ b/Formula/l/lol-html.rb @@ -0,0 +1,75 @@ +class LolHtml < Formula + desc "Low output latency streaming HTML parser/rewriter with CSS selector-based API" + homepage "https://github.com/cloudflare/lol-html" + url "https://github.com/cloudflare/lol-html/archive/refs/tags/v2.3.0.tar.gz" + sha256 "b36ad8ccafce9da350f4d9c32bb31bf46dddae0798d4ad6213cabd7e166e159e" + license "BSD-3-Clause" + head "https://github.com/cloudflare/lol-html.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d4cadd58a4d682208b314cc60b00179588b8f97108232ef9ff53fa70af6155d8" + sha256 cellar: :any, arm64_sonoma: "91d1f354c3cc9be65d141f16fbb1af71ebbbd8faf83160522665289b3c25d6dd" + sha256 cellar: :any, arm64_ventura: "1cfa2ca138b7cbae4d243b2614035731dec1957d4240d59bdb94c5c3f57d01e9" + sha256 cellar: :any, sonoma: "f98f2ef369748568691b5c543947a28a9578f49622df800ed41a3fc74329f0b6" + sha256 cellar: :any, ventura: "a3a0fecd1225ec17fd595d6837a6068c4fa67a4b994a1cd2c8649b90682d73e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "51e1689d13719659a73ab392aa50c4aed0cc1e9a53ac4cc58d02f04355917f35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39fbe4d09f2a5713cd82bccfb637cb7178edb9b34ce23b31a53c783c98631f8e" + end + + depends_on "cargo-c" => :build + depends_on "rust" => :build + depends_on "pkgconf" => :test + + # update cargo.lock, upstream pr ref, https://github.com/cloudflare/lol-html/pull/266 + patch :DATA + + def install + system "cargo", "cinstall", "--jobs", ENV.make_jobs.to_s, "--release", "--locked", + "--manifest-path", "c-api/Cargo.toml", + "--prefix", prefix, "--libdir", lib + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + lol_html_str_t err = lol_html_take_last_error(); + if (err.data == NULL && err.len == 0) { + return 0; + } + + return 1; + } + C + + flags = shell_output("pkgconf --cflags --libs lol-html").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end + +__END__ +diff --git a/c-api/Cargo.lock b/c-api/Cargo.lock +index 954418c..14d2c9c 100644 +--- a/c-api/Cargo.lock ++++ b/c-api/Cargo.lock +@@ -176,7 +176,7 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + + [[package]] + name = "lol_html" +-version = "2.2.0" ++version = "2.3.0" + dependencies = [ + "bitflags 2.6.0", + "cfg-if", +@@ -191,7 +191,7 @@ dependencies = [ + + [[package]] + name = "lol_html_c_api" +-version = "1.1.2" ++version = "1.3.0" + dependencies = [ + "encoding_rs", + "libc", diff --git a/Formula/l/lolcat.rb b/Formula/l/lolcat.rb new file mode 100644 index 0000000000000..ea5080e99483d --- /dev/null +++ b/Formula/l/lolcat.rb @@ -0,0 +1,45 @@ +class Lolcat < Formula + desc "Rainbows and unicorns in your console!" + homepage "https://github.com/busyloop/lolcat" + url "https://github.com/busyloop/lolcat.git", + tag: "v100.0.1", + revision: "27441adfb51bc16073d65dbef300c8d3d7e86dc7" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5fbed8371f5d94b68f747973aa5c5f2d5fa5a9d0fb7a389d0417af3eac6924e9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7951f0c60d29956b4b12ba502297f0fa75210d66ed59a6d4f9819f14579d254d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f9525a05daefb242035ef0eebe35f63b4a6fd1c90b8a2d7aaec906d770aa4997" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f9525a05daefb242035ef0eebe35f63b4a6fd1c90b8a2d7aaec906d770aa4997" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9a910107509f0e2b478d97837822deb1297155bcba4622b696ef19d424382346" + sha256 cellar: :any_skip_relocation, sonoma: "7951f0c60d29956b4b12ba502297f0fa75210d66ed59a6d4f9819f14579d254d" + sha256 cellar: :any_skip_relocation, ventura: "f9525a05daefb242035ef0eebe35f63b4a6fd1c90b8a2d7aaec906d770aa4997" + sha256 cellar: :any_skip_relocation, monterey: "f9525a05daefb242035ef0eebe35f63b4a6fd1c90b8a2d7aaec906d770aa4997" + sha256 cellar: :any_skip_relocation, big_sur: "df80796c28d2084b48ee2045954dbb2685eaa46935238b6b2a2cd1f41a546860" + sha256 cellar: :any_skip_relocation, catalina: "c0e179d579938e4301f04b4896bb2c234f4b643e53e53cbd4a7f796978d2ea6d" + sha256 cellar: :any_skip_relocation, mojave: "ac56190c6ec7e25d49f979aff7f6cc3e45820002ef22fbc444196b64de2590f9" + sha256 cellar: :any_skip_relocation, high_sierra: "1eb5cf4cd5565e07659f37e2531be1e72b0e2e8e57587af229e230fa00315ed3" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a08e03669527c3536a86119c90576a9b984ec3c772a36f88cab1f16a5d71f09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8110115e78f3bcb1aca5f3aee73cb81726e59a1293236a780ce99af733a8f524" + end + + uses_from_macos "ruby", since: :high_sierra + + def install + ENV["GEM_HOME"] = libexec + system "gem", "build", "lolcat.gemspec" + system "gem", "install", "lolcat-#{version}.gem" + bin.install libexec/"bin/lolcat" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + man6.install "man/lolcat.6" + end + + test do + (testpath/"test.txt").write <<~EOS + This is + a test + EOS + + system bin/"lolcat", "test.txt" + end +end diff --git a/Formula/l/lolcode.rb b/Formula/l/lolcode.rb new file mode 100644 index 0000000000000..348750040e608 --- /dev/null +++ b/Formula/l/lolcode.rb @@ -0,0 +1,56 @@ +class Lolcode < Formula + desc "Esoteric programming language" + homepage "http://www.lolcode.org/" + # NOTE: 0.10.* releases are stable, 0.11.* is dev. We moved over to + # 0.11.x accidentally, should move back to stable when possible. + url "https://github.com/justinmeza/lci/archive/refs/tags/v0.11.2.tar.gz" + sha256 "cb1065936d3a7463928dcddfc345a8d7d8602678394efc0e54981f9dd98c27d2" + license "GPL-3.0-or-later" + head "https://github.com/justinmeza/lci.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8c4074b5d6a8c5412c5be4a9cfc5c2ee4ab4e5ac12338fdd05141d98fbcea538" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "41bf236e028b388c85213b0e45f10fa83aea6c4b283c96f86426313646424a52" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f7bf8def14baaebde0558f5a5d7355d41dc46c1d62ad00fe36bf33b40735c3ed" + sha256 cellar: :any_skip_relocation, arm64_monterey: "65cf3b809d4ad69918a45976eb04f22f93c785638336e2ae1ba862ef8eeade4a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3da1a3ea810fb481b1a6e3e62f81fa5a24ce593b2f69630d6b523a63449531c8" + sha256 cellar: :any_skip_relocation, sonoma: "3a28a3eac2937e9e8a36e92f3fd592b53efd1c9aa65965986603e5b90f0dc2cc" + sha256 cellar: :any_skip_relocation, ventura: "6d050e28b462cc3d4466fd98cb7160e589e1efa9c3e163084c16660c8777557a" + sha256 cellar: :any_skip_relocation, monterey: "147cc9048722688b7b2744f316db94899843959e1d9a94ce91593087a3e6f1a3" + sha256 cellar: :any_skip_relocation, big_sur: "0fe2dd80ac746019da7ebba97a43f010c54ac64fcdff6d87dffffd1e06b43dd3" + sha256 cellar: :any_skip_relocation, catalina: "546e86a771457249146ea07ff5669f0e19bd26b3d3e3818ed33925497ae6cfda" + sha256 cellar: :any_skip_relocation, mojave: "766522d1d3730e62d1a05e54962b0493db19d62a3cd7ce66328861630508c4ee" + sha256 cellar: :any_skip_relocation, high_sierra: "e6cb7d51d26fe4b54f41a14bf183216bb9ca87a6d0b8db25ebf55e64227ac5aa" + sha256 cellar: :any_skip_relocation, sierra: "47b268e8334d901868a6498738772b1c776fe34ab249befa702658489e53dff9" + sha256 cellar: :any_skip_relocation, el_capitan: "74920cea828644c7ad0fe3b12ee5c9a4c06a46ec37c2826280327e37e30f5513" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3b96d74e84ab5da91383bcd19579be2b02dd7da68a240f2d8685195d80ffa21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb5c917e5a669e5fa18ee60946f30fd1bcbd4a257489e440ba694444f9beaf1d" + end + + depends_on "cmake" => :build + + on_linux do + depends_on "readline" + end + + conflicts_with "lci", because: "both install `lci` binaries" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + + # Don't use `make install` for this one file + bin.install "build/lci" + end + + test do + path = testpath/"test.lol" + path.write <<~EOS + HAI 1.2 + CAN HAS STDIO? + VISIBLE "HAI WORLD" + KTHXBYE + EOS + assert_equal "HAI WORLD\n", shell_output("#{bin}/lci #{path}") + end +end diff --git a/Formula/l/lorem.rb b/Formula/l/lorem.rb new file mode 100644 index 0000000000000..599e140329185 --- /dev/null +++ b/Formula/l/lorem.rb @@ -0,0 +1,26 @@ +class Lorem < Formula + include Language::Python::Shebang + + desc "Python generator for the console" + homepage "https://github.com/per9000/lorem" + url "https://github.com/per9000/lorem/archive/refs/tags/v0.8.0.tar.gz" + sha256 "3eec439d616a044e61a6733730b1fc009972466f869dae358991f95abd57e8b3" + license "GPL-3.0-or-later" + head "https://github.com/per9000/lorem.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "8b19f09aa8ff1a1e6e6dae8a356ac8ae90992a3435540b0fd71b7d39a7d3f360" + end + + uses_from_macos "python" + + def install + bin.install "lorem" + rewrite_shebang detected_python_shebang(use_python_from_path: true), bin/"lorem" + end + + test do + assert_equal "lorem ipsum", shell_output("#{bin}/lorem -n 2").strip.downcase + end +end diff --git a/Formula/l/loudmouth.rb b/Formula/l/loudmouth.rb new file mode 100644 index 0000000000000..dbc018c7467a3 --- /dev/null +++ b/Formula/l/loudmouth.rb @@ -0,0 +1,72 @@ +class Loudmouth < Formula + desc "Lightweight C library for the Jabber protocol" + homepage "https://mcabber.com/" + license "LGPL-2.1-or-later" + + stable do + url "https://mcabber.com/files/loudmouth/loudmouth-1.5.4.tar.bz2" + sha256 "31cbc91c1fddcc5346b3373b8fb45594e9ea9cc7fe36d0595e8912c47ad94d0d" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + livecheck do + url :homepage + regex(/href=.*?loudmouth[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "43729c1c6d565d8c39c43603f74ed9d9cec9c0245449e2b8e19f9b991fc44ea1" + sha256 cellar: :any, arm64_sonoma: "5c27c1b17205765db82cf291a090e65e50b6a5194fda067d000d70d58cf3717e" + sha256 cellar: :any, arm64_ventura: "439e0305cb6c6fa9305ef3ddeb6d35e330d35d245ac836fce6435c34bfa88e89" + sha256 cellar: :any, arm64_monterey: "56ce5d15bd9625075e7160268936d0197a1116c1b3a095ebbbf190d2ac9becc7" + sha256 cellar: :any, arm64_big_sur: "0b60046b8a592ab656ed824b75774f2e9e8f9749b0a5edb024190019c36da766" + sha256 cellar: :any, sonoma: "923446f9175c19b756f93a709597f676dc328b754899fecabf0ae7a4835dc02e" + sha256 cellar: :any, ventura: "7fbed66f2d4ded808afb89a793ae6355a9134fd361fdba0ab0e930be4535743d" + sha256 cellar: :any, monterey: "890ebdd35bf9275e771984de61b38557ff279e61d15e8c9d11813def0b65689a" + sha256 cellar: :any, big_sur: "d770f0cd1a81375c306d0bc6fdd81610d27bc844fd5086518aaa7f8fa6252a14" + sha256 cellar: :any, catalina: "b83be4ad6fce30f484015b344d21e3e425860b3c8a2cb6a609e059611d03caf9" + sha256 cellar: :any, mojave: "681944a95c5642a4651110e5d91d88acf335176b34d85f0f159aef291f07b38d" + sha256 cellar: :any_skip_relocation, arm64_linux: "c68d8c7b9f5a4437ceb7697484a3609635d8b93fd24a37e1e7a5b973b8c2c9dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6052693231034f7a87a85eb4e56755786089171b9ce5ad1e0babe0a891af55d9" + end + + head do + url "https://github.com/mcabber/loudmouth.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "glib" + depends_on "gnutls" + depends_on "libidn" + + uses_from_macos "krb5" + + def install + system "./autogen.sh", "-n" if build.head? + system "./configure", "--with-ssl=gnutls", *std_configure_args + system "make" + system "make", "check" + system "make", "install" + (pkgshare/"examples").install Dir["examples/*.c"] + end + + test do + cp pkgshare/"examples/lm-send-async.c", testpath + system ENV.cc, "lm-send-async.c", "-o", "test", + "-L#{lib}", "-L#{Formula["glib"].opt_lib}", "-lloudmouth-1", "-lglib-2.0", + "-I#{include}/loudmouth-1.0", + "-I#{Formula["glib"].opt_include}/glib-2.0", + "-I#{Formula["glib"].opt_lib}/glib-2.0/include" + system "./test", "--help" + end +end diff --git a/Formula/l/lout.rb b/Formula/l/lout.rb new file mode 100644 index 0000000000000..662f7d49a8599 --- /dev/null +++ b/Formula/l/lout.rb @@ -0,0 +1,36 @@ +class Lout < Formula + desc "Text formatting like TeX, but simpler" + homepage "https://savannah.nongnu.org/projects/lout" + url "https://github.com/william8000/lout/archive/refs/tags/3.43.1.tar.gz" + sha256 "e18e220d69726f1375164334107bc33237f05bd82a6d8ff11741bebdee924540" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "e9ed13c897900b56cba3a52f2fa83d11e6868917ca964b6aad735df9ddc72c19" + sha256 arm64_sonoma: "db75b1eb4376ba587377030f1c154a1c5dc1026c3e69ccf7f3f4bca310ab09d2" + sha256 arm64_ventura: "36d4dbcfb60cd3e34ef95b0149b63c95d0f6c80d3a1f091077f2099dc6d059c0" + sha256 sonoma: "557fabce8567fc87281e2fca29f967ba46a52e99e30263a37dfd106eb41505e4" + sha256 ventura: "2fdb333adee5e2d4c51b1357b60887993cebb74c00e6ec90dbff285ba7e11b29" + sha256 arm64_linux: "ab6bc86fa05d9dc8246468b734aaeebf39cd8ecb2d023e5affc0a742fc225c51" + sha256 x86_64_linux: "4066e6e926425dd434b6f48343e4cdf8a8a0e1ecf54638f16d483aeda4183b26" + end + + def install + bin.mkpath + man1.mkpath + (doc/"lout").mkpath + system "make", "PREFIX=#{prefix}", "LOUTLIBDIR=#{lib}", "LOUTDOCDIR=#{doc}", "MANDIR=#{man}", "allinstall" + end + + test do + input = "test.lout" + (testpath/input).write <<~EOS + @SysInclude { doc } + @Doc @Text @Begin + @Display @Heading { Blindtext } + The quick brown fox jumps over the lazy dog. + @End @Text + EOS + assert_match(/^\s+Blindtext\s+The quick brown fox.*\n+$/, shell_output("#{bin}/lout -p #{input}")) + end +end diff --git a/Formula/l/lowdown.rb b/Formula/l/lowdown.rb new file mode 100644 index 0000000000000..9b99261f6a4d9 --- /dev/null +++ b/Formula/l/lowdown.rb @@ -0,0 +1,57 @@ +class Lowdown < Formula + desc "Simple markdown translator" + homepage "https://kristaps.bsd.lv/lowdown" + url "https://github.com/kristapsdz/lowdown/archive/refs/tags/VERSION_2_0_2.tar.gz" + sha256 "9718c0f6c99a2cef923357feced0e0f86d8047260238c5c37fd2b51ca620e373" + license "ISC" + + bottle do + sha256 cellar: :any, arm64_sequoia: "72539b273d1f011b41a404ec609e5e5f90d95ecfed55de488ca96a599e7aa671" + sha256 cellar: :any, arm64_sonoma: "db56e9a27e486ab120cfb60b6c0c35906bebedbde3542c0228413bd2c7327659" + sha256 cellar: :any, arm64_ventura: "682e3e2c5bb4100111aa12a3295758a33c9ef0fb688026730ba72c38d0e4a618" + sha256 cellar: :any, sonoma: "39ca5b7e92d47aedfd37487c61560c0bf81952682a2f210c75e430532ee0f3fb" + sha256 cellar: :any, ventura: "939b0d8f64b94d96ba9e865a89872d4f031b2c538fb20ba215f9be95ca3ab5d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "a643fc2ad9a4c717c3a5c507cd05cd48e31a521e8d5912c753e68745f89df2ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8ccef0a88b45b09cebd38dd16dff22a85e83475e036a539cbff5c7d948dcb08" + end + + depends_on "bmake" => :build + + def install + configure_args = %W[MANDIR=#{man} PREFIX=#{prefix}] + if OS.mac? + File.open("configure.local", "a") do |configure_local| + configure_local.puts "HAVE_SANDBOX_INIT=0" + end + configure_args << "LINKER_SONAME=-install_name" + end + + system "./configure", *configure_args + system "bmake" + system "bmake", "install", "install_libs" + end + + test do + expected_html = <<~HTML + + + + + + + + +

Title

+

Hello, World

+ + + HTML + markdown = <<~MARKDOWN + # Title + + Hello, World + MARKDOWN + html = pipe_output("#{bin}/lowdown -s", markdown) + assert_equal expected_html, html + end +end diff --git a/Formula/l/lp_solve.rb b/Formula/l/lp_solve.rb new file mode 100644 index 0000000000000..ab8a64eff7168 --- /dev/null +++ b/Formula/l/lp_solve.rb @@ -0,0 +1,67 @@ +class LpSolve < Formula + desc "Mixed integer linear programming solver" + homepage "https://sourceforge.net/projects/lpsolve/" + url "https://downloads.sourceforge.net/lpsolve/lp_solve_5.5.2.11_source.tar.gz" + sha256 "6d4abff5cc6aaa933ae8e6c17a226df0fc0b671c438f69715d41d09fe81f902f" + license "LGPL-2.1-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "749a0bf9100c0d7ae567f6c119bec2320764c8a898300ffb352c0810e8c1886c" + sha256 cellar: :any, arm64_sonoma: "4612a045dc9d01f8edcc1d9a81c3696e665e2ff3f990de158e6e34fff0644241" + sha256 cellar: :any, arm64_ventura: "94b01c00f2c0fab83fef56cf4e1cfe30e400db29e33007cfcf0fa95a5737df2e" + sha256 cellar: :any, arm64_monterey: "e496fe2ab54f35a44e66c68c54124260554b23194f38880fa934ff20d5a17b2b" + sha256 cellar: :any, arm64_big_sur: "064364e4edd599066792e63f44649f9986d3b3ef10e83b91c68d756aaac2f543" + sha256 cellar: :any, sonoma: "3a9afe5491f9c2f45637cec9f3b8de48defe38bb55ad57714a8bdf8c25a41a8e" + sha256 cellar: :any, ventura: "d25c84ab6d67b5d6e223179202b5a07fe41825ab550205739d20173b948d6ca3" + sha256 cellar: :any, monterey: "4f875e5986e06b7b231f9f9ceb797becd8ddd04acc040097c82284efba44cbff" + sha256 cellar: :any, big_sur: "04e8e54a2c3c58d7430337dc2b0f9ca6c2db2d144bb98a6b91312cd63faf834d" + sha256 cellar: :any, catalina: "ac4e07a9e144e2ef6ed34e340a9d9eb769ae7184723df790a8b78ef32d46e753" + sha256 cellar: :any, mojave: "4abc54efe795496f3114edcdaaf3b90e55632bbe92c5816b5372b9743366e62f" + sha256 cellar: :any_skip_relocation, arm64_linux: "85d77ec6b61b0d962b0ba1d4f7baa264b9ced5ab0f78a208472055c12acd1a53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "866347d7fd1625067ac3643d61249354dbe64c38fc9028f0e0a576968437460a" + end + + def install + subdir = if OS.mac? + target = ".osx" + "osx64" + else + "ux64" + end + + # Workaround for newer Clang + if DevelopmentTools.clang_build_version >= 1403 + inreplace %W[lpsolve55/ccc#{target} lp_solve/ccc#{target}], + /^c=cc$/, + 'c="cc -Wno-implicit-int"' + end + + cd "lpsolve55" do + system "sh", "ccc#{target}" + lib.install "bin/#{subdir}/liblpsolve55.a" + lib.install "bin/#{subdir}/#{shared_library("liblpsolve55")}" + end + + cd "lp_solve" do + system "sh", "ccc#{target}" + bin.install "bin/#{subdir}/lp_solve" + end + + include.install Dir["*.h"], Dir["shared/*.h"], Dir["bfp/bfp_LUSOL/LUSOL/lusol*.h"] + end + + test do + (testpath/"test.lp").write <<~EOS + max: 143 x + 60 y; + + 120 x + 210 y <= 15000; + 110 x + 30 y <= 4000; + x + y <= 75; + EOS + output = shell_output("#{bin}/lp_solve test.lp") + assert_match "Value of objective function: 6315.6250", output + assert_match(/x\s+21\.875/, output) + assert_match(/y\s+53\.125/, output) + end +end diff --git a/Formula/l/lpc21isp.rb b/Formula/l/lpc21isp.rb new file mode 100644 index 0000000000000..69257f2748e1a --- /dev/null +++ b/Formula/l/lpc21isp.rb @@ -0,0 +1,32 @@ +class Lpc21isp < Formula + desc "In-circuit programming (ISP) tool for several NXP microcontrollers" + homepage "https://lpc21isp.sourceforge.net/" + url "https://downloads.sourceforge.net/project/lpc21isp/lpc21isp/1.97/lpc21isp_197.tar.gz" + version "1.97" + sha256 "9f7d80382e4b70bfa4200233466f29f73a36fea7dc604e32f05b9aa69ef591dc" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dc0f9ced6f8764ed8c4b7502ea6a4643621c3a4694530fbb9cfa02378b5ac760" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d7c6c595025ea9682779d982ece6f0bd5038a5e1284724aba37f93274ef35077" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4ab5cc792a65bd498458aa93dc79e77e921c2cff17e1f17629915332b4e4134b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "df672a0be96a7703b2f4ff5db9c8c5b322de22822ea0fc6749becea3d3a0cc21" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b6f26711684bfbf3ddde4574aab70336278338b206a5fe3e278d868903bd8910" + sha256 cellar: :any_skip_relocation, sonoma: "44b03359d767803f0f50dadc0dbc1c4ddaae4b320018328b53e5d7bf314d43bf" + sha256 cellar: :any_skip_relocation, ventura: "5f30330abb1e75c57fdbfe0177bda58a25c64598a8af7d008d04cfcbc930d6f0" + sha256 cellar: :any_skip_relocation, monterey: "60c1dfa18f24845046fd13390aab73665d086859831c999a75bed2dbb37d902f" + sha256 cellar: :any_skip_relocation, big_sur: "47edc941f73249c62b66a4d795bcec7c2916082ab60f1cc1e1c0c46ebe99b694" + sha256 cellar: :any_skip_relocation, catalina: "e5231b41e3d08d835d4c3a457b594c60576c42802347c01555acc94c04067d94" + sha256 cellar: :any_skip_relocation, mojave: "bf40168803e67310ecdf47f5ad8f1c8738d6775a91b99b5cda221fdc85e65a51" + sha256 cellar: :any_skip_relocation, high_sierra: "fa1c7462808e18f1b2a180c5db6c0ccd4481b5c0d29c5e834dd1feb888c96dba" + sha256 cellar: :any_skip_relocation, sierra: "68c3756fd99268814cfdc861e971d1201bac42bf5b922ab37119fcb082c86a1c" + sha256 cellar: :any_skip_relocation, el_capitan: "c12b33d514be2490a3a5bb9d3c1f8468e7e24d13eee0a636a9d067f486af59fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "2d7b449d040a4108099e8d6569fed602400b95b762da98e134867185b3d6419b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b431e013e9df59ee8888f46bc8b972285c7f4c7d559c7441162179d7d920f66" + end + + def install + system "make" + bin.install ["lpc21isp"] + end +end diff --git a/Formula/l/lpeg.rb b/Formula/l/lpeg.rb new file mode 100644 index 0000000000000..3d910b87a2055 --- /dev/null +++ b/Formula/l/lpeg.rb @@ -0,0 +1,59 @@ +class Lpeg < Formula + desc "Parsing Expression Grammars For Lua" + homepage "https://www.inf.puc-rio.br/~roberto/lpeg/" + url "https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz" + mirror "https://github.com/neovim/deps/raw/master/opt/lpeg-1.1.0.tar.gz" + sha256 "4b155d67d2246c1ffa7ad7bc466c1ea899bbc40fef0257cc9c03cecbaed4352a" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?lpeg[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "af50e5ff5ff953cb182ffb7657fdbf5fbfc9958f12be114c6713d7e62190c421" + sha256 cellar: :any, arm64_sonoma: "d725e7feeb5c96970d64781282c5c4ae56e9e1b2e824280c9ac2d4098acd18cb" + sha256 cellar: :any, arm64_ventura: "032f19654879a0542eb5836fa19da7ae278fb1709375f4b17e8a24b219e54293" + sha256 cellar: :any, arm64_monterey: "d9b65ef2160677f986634fb433681bab43f7f87d2510884e373dab0d7bbd86a2" + sha256 cellar: :any, arm64_big_sur: "940a61e43f0f916e029a4afa277f55f95f2d780a5e88cbb255d9d7ca24d3a25d" + sha256 cellar: :any, sonoma: "8d5ac91544867d83ce0ec6f407e6a3ead572ccbd523234d2673322da355435fb" + sha256 cellar: :any, ventura: "0bd6d115782c46c0a09e07a4d27429211bef1a251ceb8d33f14a5530ce530c9e" + sha256 cellar: :any, monterey: "66c950f321432b109386fa6182bdfe6afb26d59f38d2d70e3d1087f5cf1637ed" + sha256 cellar: :any, big_sur: "cb3e28c5aacd7007606fedac99181a819081e5bb80fe2eee6689b6a30dc1768b" + sha256 cellar: :any_skip_relocation, arm64_linux: "e53aaa71544d8b622b5de93bc94ec6df302180ff3c89df5f25ddc5fc8da75dac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e9143038c664866b58c882ed78450fc005c6169d32d9bf2ded09f2af664b3c4" + end + + depends_on "lua" => [:build, :test] + depends_on "luajit" => [:build, :test] + + def make_install_lpeg_so(luadir, dllflags, abi_version) + system "make", "LUADIR=#{luadir}", "DLLFLAGS=#{dllflags.join(" ")}", "lpeg.so" + (share/"lua"/abi_version).install_symlink pkgshare/"re.lua" + (lib/"lua"/abi_version).install "lpeg.so" + system "make", "clean" + end + + def install + dllflags = %w[-shared -fPIC] + dllflags << "-Wl,-undefined,dynamic_lookup" if OS.mac? + + luajit = Formula["luajit"] + lua = Formula["lua"] + + make_install_lpeg_so(luajit.opt_include/"luajit-2.1", dllflags, "5.1") + make_install_lpeg_so(lua.opt_include/"lua", dllflags, lua.version.major_minor) + + doc.install "lpeg.html", "re.html" + pkgshare.install "test.lua", "re.lua" + # Needed by neovim. + lib.install_symlink lib/"lua/5.1/lpeg.so" => shared_library("liblpeg") + end + + test do + system "lua", pkgshare/"test.lua" + system "luajit", pkgshare/"test.lua" + end +end diff --git a/Formula/l/lr.rb b/Formula/l/lr.rb new file mode 100644 index 0000000000000..eafa0da516f0f --- /dev/null +++ b/Formula/l/lr.rb @@ -0,0 +1,30 @@ +class Lr < Formula + desc "File list utility with features from ls(1), find(1), stat(1), and du(1)" + homepage "https://github.com/leahneukirchen/lr" + url "https://github.com/leahneukirchen/lr/archive/refs/tags/v1.6.tar.gz" + sha256 "5c1160848b5379e2a51c56be5642b382f4ba2b579b7f43834c80e6d856c09b10" + license "MIT" + head "https://github.com/leahneukirchen/lr.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bcb50db8cfcc644da655e8b676a18d7bc7345a98e0ed1fb6fea7ab59079ff6f5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4f6e26a4e87af89c61b15d5b15dd275393b411153c40a35cd3e5e79bf9ccc10a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "501cd972976041e65e066e2fcd49b0d6be2627ca686e230ee987dd3042bb3ea4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c380adb162fc049ad50a96ea2277feffefbf014d3038b1ce62190bbbd6fb08a8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c0e7b1a762a2194579ccff17c52b287b69f59162d6182c7c84ef6859286f4459" + sha256 cellar: :any_skip_relocation, sonoma: "67ffe810e8a771b05f063f8e914370bb033d31d398d3a97139781ef149e91353" + sha256 cellar: :any_skip_relocation, ventura: "b6497f9afd4b1f50b47399ea5d6f82e8bacb4e890b861d07f6c57a113cf7db16" + sha256 cellar: :any_skip_relocation, monterey: "829cf70a931246edf6f238bc929ee9381eafb41aece7d3017ca402115fa0e6d7" + sha256 cellar: :any_skip_relocation, big_sur: "8bce6806f73a80466046ae85376607765322c51e7e3b9296581834c2135b743e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c00d1e405cf7d67b30d1e7d4140b3a1bb93844885970cb3d868fa39bae550fbe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f26c65c91cd102e17c2efdc919d67ba4a65c44dda54c47faffb2f3ca23187e69" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + assert_match(/^\.\n(.*\n)?\.bazelrc\n/, shell_output("#{bin}/lr -1")) + end +end diff --git a/Formula/l/lrdf.rb b/Formula/l/lrdf.rb new file mode 100644 index 0000000000000..b9a9e647007c7 --- /dev/null +++ b/Formula/l/lrdf.rb @@ -0,0 +1,48 @@ +class Lrdf < Formula + desc "RDF library for accessing plugin metadata in the LADSPA plugin system" + homepage "https://github.com/swh/LRDF" + url "https://github.com/swh/LRDF/archive/refs/tags/v0.6.1.tar.gz" + sha256 "d579417c477ac3635844cd1b94f273ee2529a8c3b6b21f9b09d15f462b89b1ef" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e4f7f5611084a0b10affb934cbec578c9b021da49d439b605539da12666ee47c" + sha256 cellar: :any, arm64_sonoma: "2088f2cfbf3cac00eccd96cc9b7afdc8462d2e8a8e191cd2832f476270fd6daa" + sha256 cellar: :any, arm64_ventura: "8a0af2e4b47ceacad5f819b793adc705ffa969031d21959cfa415f5d94ab6899" + sha256 cellar: :any, arm64_monterey: "a335b0fe4f73626b825bae7a510a08837ca43989b8642bc99a6d97c0560cea14" + sha256 cellar: :any, arm64_big_sur: "f8caf3278cac4e40b255d362d064ec73ea2f92f0580fa2c34f50165279219c49" + sha256 cellar: :any, sonoma: "ea821b325e68ec373f605f434dc4bf99fa2ecc98dee3a1c4fa7b28051ab2e183" + sha256 cellar: :any, ventura: "d4e96a7ee4204f0e4a230563201bf725de915d560eee4465a18e09ecf8810254" + sha256 cellar: :any, monterey: "72177ed02a2a3e336775a7e0296f29bbe9923b8a4b3d1a994f9ffd8f29c3d928" + sha256 cellar: :any, big_sur: "860779b7babd494a2fa8833581bf5b518a7a8ec9c9b9ad7815f33fca52087e57" + sha256 cellar: :any, catalina: "38b2c487542d1e264b31f560eb582829f178f2aa1abb28ce055475c9dffce9f4" + sha256 cellar: :any, mojave: "1940f0eb408453bc179cc15c2588ad90eedeef608ec830a10881faee75c00d87" + sha256 cellar: :any, high_sierra: "e15d0f6129cd4ba502860f0ab0367eceadf2a377be9dd25af30c52ebffd064c6" + sha256 cellar: :any, sierra: "27f0d95eed42b70eb6685ffe8608465b0f39b88b544dbee080fe3decf81512ed" + sha256 cellar: :any, el_capitan: "f615e775140216eff74cd0fe751ace5993030c00921574da635a44b41d8bba57" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ebc904f67f824e682d13f0ca1f0176c17b8aadcea4270c1cf476a4bcfd40835" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4cb0169c0f75331b17aedb8d9f54283c5487230015b284429f6a6ee9f72344d2" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "raptor" + + def install + system "./autogen.sh" + system "./configure", *std_configure_args + system "make", "install" + (pkgshare/"examples").install Dir["examples/*"] - Dir["examples/Makefile*"] + end + + test do + cp_r pkgshare/"examples/.", testpath + system ENV.cc, "add_test.c", "-o", "test", "-I#{include}", + "-I#{Formula["raptor"].opt_include}/raptor2", + "-L#{lib}", "-llrdf" + system "./test" + assert_match " \"4\"", File.read("test-out.n3") + end +end diff --git a/Formula/l/lrzip.rb b/Formula/l/lrzip.rb new file mode 100644 index 0000000000000..6dcf870f9b7dc --- /dev/null +++ b/Formula/l/lrzip.rb @@ -0,0 +1,77 @@ +class Lrzip < Formula + desc "Compression program with a very high compression ratio" + homepage "http://lrzip.kolivas.org/" + url "http://ck.kolivas.org/apps/lrzip/lrzip-0.641.tar.xz" + sha256 "2c6389a513a05cba3bcc18ca10ca820d617518f5ac6171e960cda476b5553e7e" + license "GPL-2.0-or-later" + + livecheck do + url "http://ck.kolivas.org/apps/lrzip/" + regex(/href=.*?lrzip[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "34d8b5415f33f6227a73dbc8ab1957c2b1e3591e1c3ee5b8d01ca6123b9d9525" + sha256 cellar: :any, arm64_sonoma: "06cde83e30ff4c3ceb76cf9c855fe24540429fb009ab3b4d9cf92a470138240d" + sha256 cellar: :any, arm64_ventura: "ad6e28ccfb37ce81646fb1b40b000e7172906ff50da4e9804c8d41f3562e0e63" + sha256 cellar: :any, arm64_monterey: "187914857fc2edba04f069d8fbd4d69bb8d140a9194b77b5bf45dd0295682c96" + sha256 cellar: :any, arm64_big_sur: "d9e67f4c880ecfe1e59f0714073f1dab6ce921a0585e763ab009bac21d545335" + sha256 cellar: :any, sonoma: "9c25ec5991ba62aa0f522b11b3c9197f323362326eea09f1a5d30c0bde48e234" + sha256 cellar: :any, ventura: "f9b6f58f250151a2c6b859e0c7ce5fc55ba1e721a1bebb879ce7f16f3eb60337" + sha256 cellar: :any, monterey: "d270d7085f30f8d07e32f746e8e9a10a09729ef6e60d0fbad9a5af85b1193522" + sha256 cellar: :any, big_sur: "33d561fad2bba643625d358fc65cfa2d8f37ae51d3329887da76e884d43b1515" + sha256 cellar: :any, catalina: "701705808812d442dbd211235510a039a53cd4de9a4b28c014da5ad8a000014d" + sha256 cellar: :any, mojave: "a3230ecfa68e08deb5f1414cb67736cffcde179ba34748df8e0fcdcb0d2c1ef7" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f8dfe3dd08b7231d134922f66dca8c88575590259bc3646d6582f2b4c6fb011" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5515b974789a0665b67ceb99c09d7c2b4edae560c5d7e4d7aee765fe95a563e0" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "lz4" + depends_on "lzo" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_intel do + depends_on "nasm" => :build + end + + conflicts_with "lrzsz", because: "both install `lrz` binaries" + + def install + # Attempting to build the ASM/x86 folder as a compilation unit fails (even on Intel). Removing this compilation + # unit doesn't disable ASM usage though, since ASM is still included in the C build process. + # See https://github.com/ckolivas/lrzip/issues/193 + inreplace "lzma/Makefile.am", "SUBDIRS = C ASM/x86", "SUBDIRS = C" + + # Set nasm format correctly on macOS. See https://github.com/ckolivas/lrzip/pull/211 + inreplace "configure.ac", "-f elf64", "-f macho64" if OS.mac? + + system "autoreconf", "--force", "--install", "--verbose" + + args = [] + args << "--disable-asm" unless Hardware::CPU.intel? + + system "./configure", *args, *std_configure_args + system "make", "SHELL=bash" + system "make", "install" + end + + test do + path = testpath/"data.txt" + original_contents = "." * 1000 + path.write original_contents + + # compress: data.txt -> data.txt.lrz + system bin/"lrzip", "-o", "#{path}.lrz", path + path.unlink + + # decompress: data.txt.lrz -> data.txt + system bin/"lrzip", "-d", "#{path}.lrz" + assert_equal original_contents, path.read + end +end diff --git a/Formula/l/lrzsz.rb b/Formula/l/lrzsz.rb new file mode 100644 index 0000000000000..a84d099a1fa88 --- /dev/null +++ b/Formula/l/lrzsz.rb @@ -0,0 +1,87 @@ +class Lrzsz < Formula + desc "Tools for zmodem/xmodem/ymodem file transfer" + homepage "https://www.ohse.de/uwe/software/lrzsz.html" + url "https://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz" + sha256 "c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?lrzsz[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6009c2f7058febf2aff37e82a6b2c3fd7d553948facff288e10b7c9b681b75dd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "427b498d1c8853fdcd90bc96572f5f622c7c17b229101382fa235aad6e95fd40" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e482e9c98553b62eb062bc44af16fe368ab8d58eea5802619e6f88c75204bbeb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d103f9f4cfdf4f19a69c5d47b80ab8bfcfa2e19ead1c187a25d89e49b70120a3" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "af1dde66f4c633e9fdfa3b5108987626f79d3f8e3c5efc80b55f29c4720cef04" + sha256 cellar: :any_skip_relocation, sonoma: "7e142df2d83321df66df998711fd74b4e69394064e11851506cefe77acdeb7b5" + sha256 cellar: :any_skip_relocation, ventura: "4136c5c9b7272acc2d6bc646e25b100eac45357b83ad6c12dada8307ae138a8d" + sha256 cellar: :any_skip_relocation, monterey: "7cdda25c0645a005a715e99bfd591c575425cb8eb4667b4c51aadaab097154dd" + sha256 cellar: :any_skip_relocation, big_sur: "8030d909e2c336ada4563b4bb7e052f8ab382e3ea1325599bcf52b14a35fcbd0" + sha256 cellar: :any_skip_relocation, catalina: "e8d2badf80013a07d43d89b2a2e2f99c2feb3abd2b6eeb579a52f01b39a9dd49" + sha256 cellar: :any_skip_relocation, mojave: "c828fb5694c30334ccd6dd68da5136e2d6c9d53d2e8ac558ef3ba246a7824ef8" + sha256 cellar: :any_skip_relocation, high_sierra: "c23cc0b0c9a0a7fae5a2e3d69ba01a7e6d09ad5e5a7d06c76620b72773ffebed" + sha256 cellar: :any_skip_relocation, sierra: "997f5b81f84b7814b0f4f78f056404f6c309eba1e62136e5f8ddf4b34d953b59" + sha256 cellar: :any_skip_relocation, el_capitan: "1d6517842b64582f629f36e469b61ee91563e1ef1a1b1841a8a4634759dcb0f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "93671f7f8b73b5f063b8ac4aecfa47e907635368904089aa1ed55bfa693dc7b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f5db00a0b2cdc4920a809f4aa1f352eb6962980270d15e65dd418a99ac61ab2" + end + + conflicts_with "lrzip", because: "both install `lrz` binaries" + + patch :p0 do + url "https://raw.githubusercontent.com/macports/macports-ports/2319730/comms/lrzsz/files/patch-man-lsz.diff" + sha256 "71783e1d004661c03a1cdf77d0d76a378332272ea47bf29b1eb4c58cbf050a8d" + end + + patch :p0 do + url "https://raw.githubusercontent.com/macports/macports-ports/2319730/comms/lrzsz/files/patch-po-Makefile.in.in.diff" + sha256 "132facaeb102588e16d4ceecca67bc86b5a98b3c0cb6ffec7e7c4549abec574d" + end + + patch :p0 do + url "https://raw.githubusercontent.com/macports/macports-ports/2319730/comms/lrzsz/files/patch-src-Makefile.in.diff" + sha256 "51e5b0b9f0575c1dad18774e4a2c3ddf086c8e81c8fb7407a44584cfc18f73f6" + end + + patch :p0 do + url "https://raw.githubusercontent.com/macports/macports-ports/ed7e89dfbf638daf6f217274e7a366ebc3c7e34e/comms/lrzsz/files/patch-zglobal.h.diff" + sha256 "16c2097ceb2c5c9a6c4872aa9f903b57b557b428765d0f981579206c68f927b9" + end + + patch :p0 do + url "https://raw.githubusercontent.com/macports/macports-ports/1dc9c770d34f9f235e5ed619d9284e521d4bbeb8/comms/lrzsz/files/implicit.patch" + sha256 "215bcf3d21f8cb310c1a3de9a35184effe7f10d2e6ab4d91a65cfb436ddc5c4e" + end + + # Patch CVE-2018-10195. + # https://bugzilla.novell.com/show_bug.cgi?id=1090051 + patch :p0 do + url "https://raw.githubusercontent.com/macports/macports-ports/2319730/comms/lrzsz/files/patch-CVE-2018-10195.diff" + sha256 "97f8ac95ebe4068250e18836ab5ad44f067ead90f8389d593d2dd8659a630099" + end + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-implicit-int" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--prefix=#{prefix}", + "--mandir=#{man}", + "--disable-nls" + system "make" + + # there's a bug in lrzsz when using custom --prefix + # must install the binaries manually first + bin.install "src/lrz", "src/lsz" + + system "make", "install" + bin.install_symlink "lrz" => "rz", "lsz" => "sz" + end + + test do + assert_match version.to_s, shell_output("#{bin}/lrb --help 2>&1") + end +end diff --git a/Formula/l/ls-lint.rb b/Formula/l/ls-lint.rb new file mode 100644 index 0000000000000..ad647e6a9f638 --- /dev/null +++ b/Formula/l/ls-lint.rb @@ -0,0 +1,35 @@ +class LsLint < Formula + desc "Extremely fast file and directory name linter" + homepage "https://ls-lint.org/" + url "https://github.com/loeffel-io/ls-lint/archive/refs/tags/v2.3.0.tar.gz" + sha256 "b68b924ee8a8bea41a8508824555455a001af48df3f1f60d7f4fc55b2abe7188" + license "MIT" + head "https://github.com/loeffel-io/ls-lint.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5755722b1e46c3e058c2a42dca4e79a4602fcaeb69be97bb8c0b01193b23b9f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5755722b1e46c3e058c2a42dca4e79a4602fcaeb69be97bb8c0b01193b23b9f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5755722b1e46c3e058c2a42dca4e79a4602fcaeb69be97bb8c0b01193b23b9f8" + sha256 cellar: :any_skip_relocation, sonoma: "7dbbc2b20c13dee5e1d75420bfb443086d049fccd84651fd79ceb3a4092a3c19" + sha256 cellar: :any_skip_relocation, ventura: "7dbbc2b20c13dee5e1d75420bfb443086d049fccd84651fd79ceb3a4092a3c19" + sha256 cellar: :any_skip_relocation, arm64_linux: "494b0d8df7cf9b9fb421600b8e16d4dda2f06862733d46bdf3409b72f6f62f1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56648b3a5981cbd825079b534e4a3764eb2606bf251394a7926bc7f4f22b4f3f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}"), "./cmd/ls_lint" + pkgshare.install ".ls-lint.yml" + end + + test do + (testpath/"Library").mkdir + touch testpath/"Library/test.py" + + output = shell_output("#{bin}/ls-lint -config #{pkgshare}/.ls-lint.yml -workdir #{testpath} 2>&1", 1) + assert_match "Library failed for `.dir` rules: snakecase", output + + assert_match version.to_s, shell_output("#{bin}/ls-lint -version") + end +end diff --git a/Formula/l/lsd.rb b/Formula/l/lsd.rb new file mode 100644 index 0000000000000..423264b3d241f --- /dev/null +++ b/Formula/l/lsd.rb @@ -0,0 +1,41 @@ +class Lsd < Formula + desc "Clone of ls with colorful output, file type icons, and more" + homepage "https://github.com/lsd-rs/lsd" + url "https://github.com/lsd-rs/lsd/archive/refs/tags/v1.1.5.tar.gz" + sha256 "120935c7e98f9b64488fde39987154a6a5b2236cb65ae847917012adf5e122d1" + license "Apache-2.0" + head "https://github.com/lsd-rs/lsd.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c24da4584b7d539fe43d4a9bc0b685ca163098415ffcddd6498222d4f94878b8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f163dc5b5f3d5d4f6aad560a96d3a8997c98083e062eac8136aa27d844fec65b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1f7ad3497b4db2afca045c3434cfc3e35acf17f70f668d4fd507de802b8dee04" + sha256 cellar: :any_skip_relocation, sonoma: "79225362c0448dd2843651be28b9e57060f37087a77db5fffc8db3f3f84c26d4" + sha256 cellar: :any_skip_relocation, ventura: "c045403b8d14a78e2f5305832c33ff4d88d0f85e2752776640857a301b0f1912" + sha256 cellar: :any_skip_relocation, arm64_linux: "15edeee954289721ebb15f60c1346e7b89a579527e4fed32f9caf66b1e7b7379" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30ecd9a9aee174a461e3b57e6e0ebcb4098fedf788a95eae69bdb03f00f6529d" + end + + depends_on "pandoc" => :build + depends_on "rust" => :build + + uses_from_macos "zlib" + + def install + ENV["SHELL_COMPLETIONS_DIR"] = buildpath + system "cargo", "install", *std_cargo_args + bash_completion.install "lsd.bash" => "lsd" + fish_completion.install "lsd.fish" + zsh_completion.install "_lsd" + pwsh_completion.install "_lsd.ps1" + + system "pandoc", "doc/lsd.md", "--standalone", "--to=man", "-o", "doc/lsd.1" + man1.install "doc/lsd.1" + end + + test do + output = shell_output("#{bin}/lsd -l #{prefix}") + assert_match "README.md", output + end +end diff --git a/Formula/l/lsdvd.rb b/Formula/l/lsdvd.rb new file mode 100644 index 0000000000000..cd207a95c425d --- /dev/null +++ b/Formula/l/lsdvd.rb @@ -0,0 +1,37 @@ +class Lsdvd < Formula + desc "Read the content info of a DVD" + homepage "https://sourceforge.net/projects/lsdvd/" + url "https://downloads.sourceforge.net/project/lsdvd/lsdvd/lsdvd-0.17.tar.gz" + sha256 "7d2c5bd964acd266b99a61d9054ea64e01204e8e3e1a107abe41b1274969e488" + license "GPL-2.0-only" + revision 4 + + bottle do + sha256 cellar: :any, arm64_sequoia: "f9de3cf67cf812897d4afa2c329e1d9677a3f86977c4d8f359b9a2c259da2ca4" + sha256 cellar: :any, arm64_sonoma: "f1cd3a4917d6825315999218d37b76414eef62bf994f959250f0f95ca97d4659" + sha256 cellar: :any, arm64_ventura: "ba757936a28fde65072032578477812044621f4f8f73d9b9919c547ea902b402" + sha256 cellar: :any, arm64_monterey: "0d71d460c8eaa5c01899c164df92f07d04648ca2807511be675cd08b161dbba5" + sha256 cellar: :any, arm64_big_sur: "d581725cf2628d8c123d3f6f54d1baf06cb33362d9f6dc7d033a4f7768729474" + sha256 cellar: :any, sonoma: "3520dc9651fd11c1f553b91e0c4ddd6665c9cb3a6ca5b6cbe331b372d708a4b6" + sha256 cellar: :any, ventura: "c1cad4dfbf96e83e2112dfabc98bff8b7482e3dfd79bd9a93286dc27436ac790" + sha256 cellar: :any, monterey: "5268aec2b5e5e3c89840661870ac95821c77aef6bfbe38447355402fae4b86f3" + sha256 cellar: :any, big_sur: "0d5d1a272ba88ff70ce68ddc35fca9811e2ca5222696373aaf3d2ffc0126a471" + sha256 cellar: :any, catalina: "986e89fe0980a78d7d7ef18fd646d3176edbaa7fd6531c38f698d3bdf2aed5dd" + sha256 cellar: :any, mojave: "66cbfc0e273fc63813c4948638ab849357ef9d3f72ce5b6322a27f5f614507f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c5ab420a6644e37a5fa5788e79b0a707f5f3407a0986fa288b74c0f2d4b33d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd9145daad69de5b544d8e9824b42829c74b048322044a35b76bd9b2b355f1eb" + end + + depends_on "pkgconf" => :build + depends_on "libdvdcss" + depends_on "libdvdread" + + def install + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + system bin/"lsdvd", "--help" + end +end diff --git a/Formula/l/lsix.rb b/Formula/l/lsix.rb new file mode 100644 index 0000000000000..284ec72ad9331 --- /dev/null +++ b/Formula/l/lsix.rb @@ -0,0 +1,24 @@ +class Lsix < Formula + desc "Shows thumbnails in terminal using sixel graphics" + homepage "https://github.com/hackerb9/lsix" + url "https://github.com/hackerb9/lsix/archive/refs/tags/1.9.1.tar.gz" + sha256 "310e25389da13c19a0793adcea87f7bc9aa8acc92d9534407c8fbd5227a0e05d" + license "GPL-3.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "1236a71809bd24fd1cedb055f51286a8af6ce959d54c6669b8849eee706b050e" + end + + depends_on "bash" + depends_on "imagemagick" + + def install + bin.install "lsix" + end + + test do + output = shell_output "#{bin}/lsix 2>&1" + assert_match "Error: Your terminal does not report having sixel graphics support.", output + end +end diff --git a/Formula/l/lsof.rb b/Formula/l/lsof.rb new file mode 100644 index 0000000000000..9a01eced40970 --- /dev/null +++ b/Formula/l/lsof.rb @@ -0,0 +1,50 @@ +class Lsof < Formula + desc "Utility to list open files" + homepage "https://github.com/lsof-org/lsof" + url "https://github.com/lsof-org/lsof/archive/refs/tags/4.99.4.tar.gz" + sha256 "90d02ae35cd14341bfb04ce80e0030767476b0fc414a0acb115d49e79b13d56c" + license "lsof" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "036464108e88a5a4dad168d55f6723cba3d08596af58cebf3ade61aefea71483" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d50c9dfb75c471b274c2511d0f58991ef9322e55767cc0aab21c5498a79a1ae9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "03d4db66c9789321451d318f624429d10ecb8eb4e6a6f8673a7cfa77d0417901" + sha256 cellar: :any_skip_relocation, sonoma: "6b39fb2ccf6675270d8c3ab4e4e28b25622b5416b6772e53c59bb8c49f72bb06" + sha256 cellar: :any_skip_relocation, ventura: "140084e5e184dc4a3543bee49fb67183a440c998d28c8f9c1ac3089b02f557f7" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e24fc77e7ff568fda5a3a5bc1866c763b99949d5cafed8e01f33dfb10028d16" + sha256 cellar: :any_skip_relocation, x86_64_linux: "888180a7668c87bd0f636a1c3699e4221c1fcf2ffc9def34538f7687def47a09" + end + + keg_only :provided_by_macos + + on_linux do + depends_on "libtirpc" + end + + def install + if OS.mac? + ENV["LSOF_INCLUDE"] = MacOS.sdk_path/"usr/include" + + # Source hardcodes full header paths at /usr/include + inreplace "lib/dialects/darwin/machine.h", "/usr/include", MacOS.sdk_path/"usr/include" + else + ENV["LSOF_INCLUDE"] = HOMEBREW_PREFIX/"include" + end + + ENV["LSOF_CC"] = ENV.cc + ENV["LSOF_CCV"] = ENV.cxx + + mv "00README", "README" + system "./Configure", "-n", OS.kernel_name.downcase + + system "make" + bin.install "lsof" + man8.install "Lsof.8" + end + + test do + (testpath/"test").open("w") do + system bin/"lsof", testpath/"test" + end + end +end diff --git a/Formula/l/lsusb-laniksj.rb b/Formula/l/lsusb-laniksj.rb new file mode 100644 index 0000000000000..eafea3ed48e19 --- /dev/null +++ b/Formula/l/lsusb-laniksj.rb @@ -0,0 +1,25 @@ +class LsusbLaniksj < Formula + desc "List USB devices, just like the Linux lsusb command" + homepage "https://github.com/LanikSJ/lsusb" + url "https://github.com/LanikSJ/lsusb/archive/refs/tags/1.1.4.tar.gz" + sha256 "14eb90962515c4f63aacc56750d0d221e57a5bb7cf12577193de6bc261e70be6" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "478e380b7221d17b4ec6d9de9c843f500032e00ec521bfd539805927e1141914" + end + + depends_on :macos + + conflicts_with "lsusb", "usbutils", because: "both provide an `lsusb` binary" + + def install + bin.install "lsusb" + man8.install "man/lsusb.8" + end + + test do + output = shell_output("#{bin}/lsusb") + assert_match(/^Bus [0-9]+ Device [0-9]+:/, output) + end +end diff --git a/Formula/l/lsusb.rb b/Formula/l/lsusb.rb new file mode 100644 index 0000000000000..b9dd4a94b6311 --- /dev/null +++ b/Formula/l/lsusb.rb @@ -0,0 +1,26 @@ +class Lsusb < Formula + desc "List USB devices, just like the Linux lsusb command" + homepage "https://github.com/jlhonora/lsusb" + url "https://github.com/jlhonora/lsusb/releases/download/1.0/lsusb-1.0.tar.gz" + sha256 "68cfa4a820360ecf3bbd2a24a58f287d41f66c62ada99468c36d5bf33f9a3b94" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "2bb1064f475b6066dde9e1ad55789b66bbc7335765f22ccd7e5961d20af59508" + end + + depends_on :macos + + conflicts_with "lsusb-laniksj", "usbutils", because: "both provide an `lsusb` binary" + + def install + bin.install "lsusb" + man8.install "man/lsusb.8" + end + + test do + output = shell_output(bin/"lsusb") + assert_match(/^Bus [0-9]+ Device [0-9]+:/, output) + end +end diff --git a/Formula/l/lsyncd.rb b/Formula/l/lsyncd.rb new file mode 100644 index 0000000000000..4bcdb65ab9e32 --- /dev/null +++ b/Formula/l/lsyncd.rb @@ -0,0 +1,82 @@ +class Lsyncd < Formula + desc "Synchronize local directories with remote targets" + homepage "https://github.com/lsyncd/lsyncd" + url "https://github.com/lsyncd/lsyncd/archive/refs/tags/release-2.3.1.tar.gz" + sha256 "fc19a77b2258dc6dbb16a74f023de7cd62451c26984cedbec63e20ff22bcbdd8" + license "GPL-2.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "b1de715ecf63cc59a9f4725b7800e039d417d297dbaf6a8f3643d95979dc1cfd" + sha256 cellar: :any, arm64_sonoma: "815e36a145bfecbd20023f55bd910b2223cb54a39c51e276a97ee19f717a1c94" + sha256 cellar: :any, arm64_ventura: "eaf1cd2a7576eed88ab68e26b93b234132a1cf9e6ddf63f0883fa0b859fb798f" + sha256 cellar: :any, arm64_monterey: "e4ed253d0a0792a3c2e22f82a40c1627a8fcb6c15ed62f62cca24b1b965fdc81" + sha256 cellar: :any, arm64_big_sur: "e818e3e8cafb4f9d8cf82f6ec29b8d247b2e17276f92f9e8bef9364f740fca85" + sha256 cellar: :any, sonoma: "2d6b3bc50d43c3de3cfc0cdc104a4a69570f7b13465aecbb478006ef6e2bda75" + sha256 cellar: :any, ventura: "36f5613aab337d30135d232e5abf5bc5baa63470537cbaa7917fd202fdf45b3e" + sha256 cellar: :any, monterey: "453140f96382bf6eb4b4ecc9df475ef25ea690f27a870f0b457619d0fc15a69c" + sha256 cellar: :any, big_sur: "c221932f57a2ddbda8c4722cbd4c547244fd4492a1eb46959aea03244897566f" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed00787f9706cd469cc6314c2af9edf287432a308870c52f0cb46347009952bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de8ec6eb7f7122c422cb82bf5c1f1051ce23bde9dc48bb2327da7dca1573f757" + end + + depends_on "cmake" => :build + depends_on "lua" + + resource "xnu" do + # From https://opensource.apple.com/releases/ + on_sonoma :or_newer do + url "https://github.com/apple-oss-distributions/xnu/archive/refs/tags/xnu-10002.41.9.tar.gz" + sha256 "f158a10e01702aa59a90af60ab097c3253123ab3f05d9953530730d241a9cba4" + end + on_ventura do + url "https://github.com/apple-oss-distributions/xnu/archive/refs/tags/xnu-8792.61.2.tar.gz" + sha256 "61c5758d4423ede45e3cbe70b4316d982af59dc91fc482cd9afc145b2ad2226a" + end + on_monterey do + url "https://github.com/apple-oss-distributions/xnu/archive/refs/tags/xnu-8020.140.41.tar.gz" + sha256 "b11e05d6529806aa6ec046ae462d997dfb36a26df6c0eb0452d7a67cc08ad9e7" + end + on_big_sur do + url "https://github.com/apple-oss-distributions/xnu/archive/refs/tags/xnu-7195.141.2.tar.gz" + sha256 "ec5aa94ebbe09afa6a62d8beb8d15e4e9dd8eb0a7e7e82c8b8cf9ca427004b6d" + end + on_catalina do + url "https://github.com/apple-oss-distributions/xnu/archive/refs/tags/xnu-6153.141.1.tar.gz" + sha256 "886388632a7cc1e482a4ca4921db3c80344792e7255258461118652e8c632d34" + end + on_mojave do + url "https://github.com/apple-oss-distributions/xnu/archive/refs/tags/xnu-4903.270.47.tar.gz" + sha256 "099c1c50c4cef4db5fcf4df6a6314498693ad52ed5e813201e2cf442e22985fe" + end + on_high_sierra do + url "https://github.com/apple-oss-distributions/xnu/archive/refs/tags/xnu-4570.71.2.tar.gz" + sha256 "b9e2c84c3ee62819917d3bc845e10c2f4bde1194e731c192b6cf0239da5a5a14" + end + on_sierra do + url "https://github.com/apple-oss-distributions/xnu/archive/refs/tags/xnu-3789.70.16.tar.gz" + sha256 "0bc4cf425513dd16f3032f189d93cdb6bef48696951bd2e5bf4878dacdcd10d2" + end + on_el_capitan :or_older do + url "https://github.com/apple-oss-distributions/xnu/archive/refs/tags/xnu-3248.60.10.tar.gz" + sha256 "a4f646c6d34814df5a729a2c0b380c541dd5282b5d82e35e31bf66c034c2b761" + end + end + + def install + args = ["-DCMAKE_INSTALL_MANDIR=#{man}"] + if OS.mac? + resource("xnu").stage buildpath/"xnu" + args += %W[-DWITH_INOTIFY=OFF -DWITH_FSEVENTS=ON -DXNU_DIR=#{buildpath}/xnu] + else + args += %w[-DWITH_INOTIFY=ON -DWITH_FSEVENTS=OFF] + end + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"lsyncd", "--version" + end +end diff --git a/Formula/l/ltc-tools.rb b/Formula/l/ltc-tools.rb new file mode 100644 index 0000000000000..6338419e6a457 --- /dev/null +++ b/Formula/l/ltc-tools.rb @@ -0,0 +1,41 @@ +class LtcTools < Formula + desc "Tools to deal with linear-timecode (LTC)" + homepage "https://github.com/x42/ltc-tools" + url "https://github.com/x42/ltc-tools/archive/refs/tags/v0.7.0.tar.gz" + sha256 "5b7a2ab7f98bef6c99bafbbc5605a3364e01c9c19fe81411ddea0e1a01cd6287" + license "GPL-2.0-or-later" + head "https://github.com/x42/ltc-tools.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "50128bae6264b3239c9d2e8e0f9952e72c364349438382c36f35252c35eedcaa" + sha256 cellar: :any, arm64_sonoma: "539c3a74d0e1da9b7680063d41e735d3240bd2bb8454b2e93a7c42118b73c147" + sha256 cellar: :any, arm64_ventura: "bb595fe27ddac376f1ea097a824c17712c34dde20e01cb310388897b52f3f57d" + sha256 cellar: :any, arm64_monterey: "d8d6d714abdb13a7c1a42503b1f367af936975d51454967bb445acb631b58259" + sha256 cellar: :any, arm64_big_sur: "2131abaab3877ab6a2425fe8b635612c5d7235026d6098a3eea78d266038378a" + sha256 cellar: :any, sonoma: "3a92ea1ce6d7e1090c583abbab1c5332f1f016d34e7b8932693c7d263e706279" + sha256 cellar: :any, ventura: "c118c95af01d6294a78e22dcbc2ea901ce5c7bf52a62912895c2ed3c344df105" + sha256 cellar: :any, monterey: "84e20bc4899a76f661ff8bde1ec354a3d32f6f53b4aa434782095868971a2cc7" + sha256 cellar: :any, big_sur: "b31fe1140d71357035fd130e73c286d8892cda1103fccd96971205bd860cd9a7" + sha256 cellar: :any, catalina: "bcd064f64a21f101f6599646306ba65c40ce7ec44fd7b6e2d8f29b4fefeebcc9" + sha256 cellar: :any, mojave: "ae65212fa593ee7015eb7bfa63b4e7e7691e56a7db0fc1a82a311aef184aae55" + sha256 cellar: :any, high_sierra: "15da8efd84adb9d9eb9c7b4450c75e326679b20bed258c8e7011fc6eb2cc9b20" + sha256 cellar: :any, sierra: "51df0ba95565d43955bbdf0cfbc216696b4002f8cc95c80d8f6b387eece034d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "5cf1b3ebc4b537434144fb06a19917cf47f63f368a6376ad0c78bcc1f42c6695" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f067afb9aec069b45d0c8025574d673d701140d4262ba2530337a868c016bd81" + end + + depends_on "help2man" => :build + depends_on "pkgconf" => :build + depends_on "jack" + depends_on "libltc" + depends_on "libsndfile" + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + system bin/"ltcgen", "test.wav" + system bin/"ltcdump", "test.wav" + end +end diff --git a/Formula/l/ltex-ls-plus.rb b/Formula/l/ltex-ls-plus.rb new file mode 100644 index 0000000000000..244ec0a20a97e --- /dev/null +++ b/Formula/l/ltex-ls-plus.rb @@ -0,0 +1,63 @@ +class LtexLsPlus < Formula + desc "LTeX+ Language Server: maintained fork of LTeX Language Server" + homepage "https://ltex-plus.github.io/ltex-plus/" + url "https://github.com/ltex-plus/ltex-ls-plus/archive/refs/tags/18.5.1.tar.gz" + sha256 "dbfc83d7e82f5d1f4be9d266248728e11628bd307858adfec20c5dbfda031f90" + license "MPL-2.0" + head "https://github.com/ltex-plus/ltex-ls-plus.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "506aba208fad07d55de203b9f5a8d4c587c6a24f1cec7c8ed200b60e2c8fb142" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dab59816c40ffc74f2a2f90d051924fbe27bbdcdcfd938fe00b4ce9ddcc5d600" + sha256 cellar: :any_skip_relocation, arm64_ventura: "af2a52c0a38ddeb1c39900a1cc97d196398adf1a66658483df86b0a296ac2771" + sha256 cellar: :any_skip_relocation, sonoma: "b43aad065cf4a263cab53ac7d8efaf5c4cca648e9e2e724729aa051fdffe7afd" + sha256 cellar: :any_skip_relocation, ventura: "3a31edc7885eca0427172411de04e77c7d81609e04ab8e01f49941059ce89fa3" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e07514acee82176329bbcb45c652a2c781b3e40becf1fa3724795819b3384fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "54de365156f8b7fa5138195e66affa4c46e71482fa345e6a3f33efd8646ed268" + end + + depends_on "maven" => :build + depends_on "python@3.13" => :build + depends_on "openjdk" + + def install + # Fix build with `openjdk` 20. + # Reported upstream at https://github.com/valentjn/ltex-ls/issues/244. + inreplace "pom.xml", "-Werror", "" + + ENV.prepend_path "PATH", Formula["python@3.13"].opt_libexec/"bin" + ENV["JAVA_HOME"] = Language::Java.java_home + ENV["TMPDIR"] = buildpath + + system "python3.13", "-u", "tools/createCompletionLists.py" + + system "mvn", "-B", "-e", "-DskipTests", "package" + + mkdir "build" do + system "tar", "xzf", "../target/ltex-ls-plus-#{version}.tar.gz", "-C", "." + + # remove Windows files + rm Dir["ltex-ls-plus#{version}/bin/*.bat"] + bin.install Dir["ltex-ls-plus-#{version}/bin/*"] + libexec.install Dir["ltex-ls-plus-#{version}/*"] + end + + bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env + end + + test do + (testpath/"test").write <<~EOS + She say wrong. + EOS + + (testpath/"expected").write <<~EOS + #{testpath}/test:1:5: info: The pronoun 'She' is usually used with a third-person or a past tense verb. [HE_VERB_AGR] + She say wrong. + Use 'says' + Use 'said' + EOS + + got = shell_output("#{bin}/ltex-cli-plus '#{testpath}/test'", 3) + assert_equal (testpath/"expected").read, got + end +end diff --git a/Formula/l/ltex-ls.rb b/Formula/l/ltex-ls.rb new file mode 100644 index 0000000000000..9dca83c6d4247 --- /dev/null +++ b/Formula/l/ltex-ls.rb @@ -0,0 +1,69 @@ +class LtexLs < Formula + desc "LSP for LanguageTool with support for Latex, Markdown and Others" + homepage "https://valentjn.github.io/ltex/" + url "https://github.com/valentjn/ltex-ls/archive/refs/tags/16.0.0.tar.gz" + sha256 "0cd67495ee4695493fc2a0b37d14146325aa6b9f45d767d16c60abdefdd2dc1d" + license "MPL-2.0" + head "https://github.com/valentjn/ltex-ls.git", branch: "develop" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a1881ebd3e1edfa27cf0c9be1b1855e96dfddcd97a97a5c1110e0872dd223f40" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dd285ef472ccca59e7ada11920cca1bee19ce80a1da8bf1a67802c7085ece1e9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "978b9bf4f8cff66fb486159e9c03515dd4c62d3aed644d8a865f92b94dab443e" + sha256 cellar: :any_skip_relocation, sonoma: "2863fd23602c84bc942bdc4fdf6a058591364fbf2d49930d85a76d969fc16083" + sha256 cellar: :any_skip_relocation, ventura: "60d86af9722182838c19b87d08bfc3b49905c3d3ff06cd5d050c1e49341f18b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "5737e77d4ca8e5d3cb76090b2f03fa017ec2eefbea97482d2ba7467adefedbc3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab843f15b78c1675d75099d2edfe7a4f2b0f957ba89f401c2db6f5e101894988" + end + + depends_on "maven" => :build + depends_on "python@3.13" => :build + depends_on "openjdk" + + def install + # Fix build with `openjdk` 20. + # Reported upstream at https://github.com/valentjn/ltex-ls/issues/244. + inreplace "pom.xml", "-Werror", "" + + ENV.prepend_path "PATH", Formula["python@3.13"].opt_libexec/"bin" + ENV["JAVA_HOME"] = Language::Java.java_home + ENV["TMPDIR"] = buildpath + + system "python3.13", "-u", "tools/createCompletionLists.py" + + system "mvn", "-B", "-e", "-DskipTests", "package" + + mkdir "build" do + system "tar", "xzf", "../target/ltex-ls-#{version}.tar.gz", "-C", "." + + # remove Windows files + rm Dir["ltex-ls-#{version}/bin/*.bat"] + bin.install Dir["ltex-ls-#{version}/bin/*"] + libexec.install Dir["ltex-ls-#{version}/*"] + end + + # Fix run with `openjdk` 24. + # Reported upstream at https://github.com/valentjn/ltex-ls/issues/322. + envs = Language::Java.overridable_java_home_env.merge({ + "JAVA_OPTS" => "${JAVA_OPTS:--Djdk.xml.totalEntitySizeLimit=50000000}", + }) + bin.env_script_all_files libexec/"bin", envs + end + + test do + (testpath/"test").write <<~EOS + She say wrong. + EOS + + (testpath/"expected").write <<~EOS + #{testpath}/test:1:5: info: The pronoun 'She' is usually used with a third-person or a past tense verb. [HE_VERB_AGR] + She say wrong. + Use 'says' + Use 'said' + EOS + + got = shell_output("#{bin}/ltex-cli '#{testpath}/test'", 3) + assert_equal (testpath/"expected").read, got + end +end diff --git a/Formula/l/ltl2ba.rb b/Formula/l/ltl2ba.rb new file mode 100644 index 0000000000000..d3da83fa2053f --- /dev/null +++ b/Formula/l/ltl2ba.rb @@ -0,0 +1,41 @@ +class Ltl2ba < Formula + desc "Translate LTL formulae to Buchi automata" + homepage "http://www.lsv.fr/~gastin/ltl2ba/" + url "http://www.lsv.fr/~gastin/ltl2ba/ltl2ba-1.3.tar.gz" + mirror "https://pkg.freebsd.org/ports-distfiles/ltl2ba-1.3.tar.gz" + sha256 "912877cb2929cddeadfd545a467135a2c61c507bbd5ae0edb695f8b5af7ce9af" + license "GPL-2.0-or-later" + + livecheck do + url "http://www.lsv.fr/~gastin/ltl2ba/download.php", post_form: { + getltl2ba: "Get LTL2BA", + } + regex(/href=.*?ltl2ba[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "18b178bd47a42ca3c5ab755e80cb5ec5a087807c1bef4fc064aa97a3ff18d76a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5527191de9afab610f9d220b2c62ceed062df2e5e2c99b1743381c57067b9535" + sha256 cellar: :any_skip_relocation, arm64_ventura: "89c79976b12030dc618c9466ad4f1f9f14fe9dff815850ac6ecc38ab10f63981" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1e35ea05ee9b358df863d969c190abea48b61ec737c7aaa5fb01f9f7de455330" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "577639caaf79515113fee790d593bc735b9f54bbb2bf93ae2788655a455aecaa" + sha256 cellar: :any_skip_relocation, sonoma: "075820e7ecfee9fb538889ee1f2a32e0f3e4b0aa8ba8194c22418eb7d856abe3" + sha256 cellar: :any_skip_relocation, ventura: "18f8eb78ca95bd4217b9ca697e608c62cc0f0fb8a632585f3ce57f75e82b2b66" + sha256 cellar: :any_skip_relocation, monterey: "287ea81802bff62078478fccce3b85695feb945996f59bbf17d3e28712bb51ac" + sha256 cellar: :any_skip_relocation, big_sur: "c85c152985dcdd33f028941a0b2e62d20d5f247142111b9fb30c11ea9dd424b7" + sha256 cellar: :any_skip_relocation, catalina: "ede3b5e5b22b886bce4f6f2ead352dc4a676e3d8a95f9543930f2be2b3a0b4b4" + sha256 cellar: :any_skip_relocation, mojave: "3e5ddce23730195799dfe85c97a57d63e892f168cda5207c72c68b459e5a92a0" + sha256 cellar: :any_skip_relocation, high_sierra: "533a278e70570b8f83550c784ccb7c921d9fb5b93ac613c3f971703090dd7921" + sha256 cellar: :any_skip_relocation, arm64_linux: "7dcc015888d23a53ef7cb653015c0a93abad381753c277e6f76f535a13351e82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "948ef5632a4054316599f6361411d994459971c64749fe99609f13c3c51b9fe7" + end + + def install + system "make" + bin.install "ltl2ba" + end + + test do + assert_match ":: (p) -> goto accept_all", shell_output("#{bin}/ltl2ba -f 'p if p ∈ w(0)'") + end +end diff --git a/Formula/l/lttng-ust.rb b/Formula/l/lttng-ust.rb new file mode 100644 index 0000000000000..3cb64737591aa --- /dev/null +++ b/Formula/l/lttng-ust.rb @@ -0,0 +1,33 @@ +class LttngUst < Formula + desc "Linux Trace Toolkit Next Generation Userspace Tracer" + homepage "https://lttng.org/" + url "https://lttng.org/files/lttng-ust/lttng-ust-2.13.9.tar.bz2" + sha256 "2ad6d69a54a1d924c18a4aa7a233db104e3cc332bcdd240e196bf7adbed3f712" + license all_of: ["LGPL-2.1-only", "MIT", "GPL-2.0-only", "BSD-3-Clause", "BSD-2-Clause", "GPL-3.0-or-later"] + + livecheck do + url "https://lttng.org/download/" + regex(/href=.*?lttng-ust[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "82999691af90f0e37ed955ac223e6d13eb1122cddf8ca193800073ead4e20872" + sha256 cellar: :any_skip_relocation, x86_64_linux: "40ac3ae63f09a24a74a2a4a944cb18d3fcc546b5fb805501fdded29449b9efcb" + end + + depends_on "pkgconf" => :build + depends_on :linux + depends_on "numactl" + depends_on "userspace-rcu" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + cp_r (share/"doc/lttng-ust/examples/demo").children, testpath + system "make" + system "./demo" + end +end diff --git a/Formula/l/lua-language-server.rb b/Formula/l/lua-language-server.rb new file mode 100644 index 0000000000000..33d656ae6e967 --- /dev/null +++ b/Formula/l/lua-language-server.rb @@ -0,0 +1,57 @@ +class LuaLanguageServer < Formula + desc "Language Server for the Lua language" + homepage "https://github.com/LuaLS/lua-language-server" + # pull from git tag to get submodules + url "https://github.com/LuaLS/lua-language-server.git", + tag: "3.14.0", + revision: "485835e2a89004e1ffc5feb4484dc798a12af69e" + license "MIT" + head "https://github.com/LuaLS/lua-language-server.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c24a86f8a6cf59821965f398d5c3d4654a714cfdd0544b6523408eff61b7f14e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6bcbb78953a2688a19c58da05b82ce658f551b44c2c729555582ee4c55d353cf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9638941d4a7b086d993e351d8381e42bd8a70580816156fce52c551cef39c3b4" + sha256 cellar: :any_skip_relocation, sonoma: "c5ea319456b4e4c57b6c9f8e4f57c6d3b3f7f7795a4069bf6578dba33a7d56a2" + sha256 cellar: :any_skip_relocation, ventura: "7d65ee2d3dd4b4a48924d17094187d7ce96355967b407f48ea80e8a51efe4e37" + sha256 cellar: :any_skip_relocation, arm64_linux: "63a579898faea51de39d3193affba5adcfc965c44e005f0d33b1cc04690df135" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cdc5ef22c1980bae8b517ef18f34e1b31bf6a5faa21ba4c94890ce716e3bec7a" + end + + depends_on "ninja" => :build + + def install + ENV.cxx11 + + # disable all tests by build script (fail in build environment) + inreplace buildpath.glob("**/3rd/bee.lua/test/test.lua"), + "os.exit(lt.run(), true)", + "os.exit(true, true)" + + chdir "3rd/luamake" do + system "compile/install.sh" + end + system "3rd/luamake/luamake", "rebuild" + + (libexec/"bin").install "bin/lua-language-server", "bin/main.lua" + libexec.install "main.lua", "debugger.lua", "locale", "meta", "script" + + # Make sure `lua-language-server` does not need to write into the Cellar. + (bin/"lua-language-server").write <<~BASH + #!/bin/bash + exec -a lua-language-server #{libexec}/bin/lua-language-server \ + --logpath="${XDG_CACHE_HOME:-${HOME}/.cache}/lua-language-server/log" \ + --metapath="${XDG_CACHE_HOME:-${HOME}/.cache}/lua-language-server/meta" \ + "$@" + BASH + end + + test do + pid = spawn bin/"lua-language-server", "--logpath=." + sleep 5 + assert_path_exists testpath/"service.log" + refute_predicate testpath/"service.log", :empty? + ensure + Process.kill "TERM", pid + end +end diff --git a/Formula/l/lua.rb b/Formula/l/lua.rb new file mode 100644 index 0000000000000..1b4de4551ab8f --- /dev/null +++ b/Formula/l/lua.rb @@ -0,0 +1,124 @@ +class Lua < Formula + desc "Powerful, lightweight programming language" + homepage "https://www.lua.org/" + url "https://www.lua.org/ftp/lua-5.4.7.tar.gz" + sha256 "9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30" + license "MIT" + + livecheck do + url "https://www.lua.org/ftp/" + regex(/href=.*?lua[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "925b155912162179d777cde03b60fdd8b5507f0bfc3c7adf2f7a49e1b3b00461" + sha256 cellar: :any, arm64_sonoma: "84862c80e0cba6ae50dc62a560bbff91a2607a2952d037da127588b5582bb272" + sha256 cellar: :any, arm64_ventura: "751b91605496a0ca76301b9dbfbdd151b6dd807dfd0acc3d517f631bf7dac110" + sha256 cellar: :any, arm64_monterey: "9fa819a1bf2476966556690ca374e34543e33395af8147c7d9fc163bec02fc0b" + sha256 cellar: :any, sonoma: "e683482576a98b94e06c2049e874da06b2fe6a27fd6ad1076d280af7c8f9ad8d" + sha256 cellar: :any, ventura: "21f349c23444c0f74e7626e6837b4236f1617c3f0828157efe7438ed941cfb3d" + sha256 cellar: :any, monterey: "b3efe2d96158718df6a5255bf92e2809565cab7ede49d1631fa0247040fa148e" + sha256 cellar: :any_skip_relocation, arm64_linux: "542e289c463b5252729f03346724f17c1e22a4d34db457457075bb812ff6c284" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e21c57b663809dfdbf18aa773bac852c0206c728e73daab48767c60bb8b1a7c" + end + + uses_from_macos "unzip" => :build + + on_linux do + depends_on "readline" + end + + # Be sure to build a dylib, or else runtime modules will pull in another static copy of liblua = crashy + # See: https://github.com/Homebrew/legacy-homebrew/pull/5043 + patch do + on_macos do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/11c8360432f471f74a9b2d76e012e3b36f30b871/lua/lua-dylib.patch" + sha256 "a39e2ae1066f680e5c8bf1749fe09b0e33a0215c31972b133a73d43b00bf29dc" + end + + # Add shared library for linux. Equivalent to the mac patch above. + # Inspired from https://www.linuxfromscratch.org/blfs/view/cvs/general/lua.html + on_linux do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/0dcd11880c7d63eb395105a5cdddc1ca05b40f4a/lua/lua-so.patch" + sha256 "522dc63a0c1d87bf127c992dfdf73a9267890fd01a5a17e2bcf06f7eb2782942" + end + end + + def install + if OS.linux? + # Fix: /usr/bin/ld: lapi.o: relocation R_X86_64_32 against `luaO_nilobject_' can not be used + # when making a shared object; recompile with -fPIC + # See https://www.linuxfromscratch.org/blfs/view/cvs/general/lua.html + ENV.append_to_cflags "-fPIC" + end + + # Substitute formula prefix in `src/Makefile` for install name (dylib ID). + # Use our CC/CFLAGS to compile. + inreplace "src/Makefile" do |s| + s.gsub! "@OPT_LIB@", opt_lib if OS.mac? + s.remove_make_var! "CC" + s.change_make_var! "MYCFLAGS", ENV.cflags || "" + s.change_make_var! "MYLDFLAGS", ENV.ldflags || "" + end + + # Fix path in the config header + inreplace "src/luaconf.h", "/usr/local", HOMEBREW_PREFIX + + os = if OS.mac? + "macosx" + else + "linux-readline" + end + + system "make", os, "INSTALL_TOP=#{prefix}" + system "make", "install", "INSTALL_TOP=#{prefix}" + + # We ship our own pkg-config file as Lua no longer provide them upstream. + libs = %w[-llua -lm] + libs << "-ldl" if OS.linux? + (lib/"pkgconfig/lua.pc").write <<~EOS + V= #{version.major_minor} + R= #{version} + prefix=#{HOMEBREW_PREFIX} + INSTALL_BIN= ${prefix}/bin + INSTALL_INC= ${prefix}/include/lua + INSTALL_LIB= ${prefix}/lib + INSTALL_MAN= ${prefix}/share/man/man1 + INSTALL_LMOD= ${prefix}/share/lua/${V} + INSTALL_CMOD= ${prefix}/lib/lua/${V} + exec_prefix=${prefix} + libdir=${exec_prefix}/lib + includedir=${prefix}/include/lua + + Name: Lua + Description: An Extensible Extension Language + Version: #{version} + Requires: + Libs: -L${libdir} #{libs.join(" ")} + Cflags: -I${includedir} + EOS + + # Fix some software potentially hunting for different pc names. + bin.install_symlink "lua" => "lua#{version.major_minor}" + bin.install_symlink "lua" => "lua-#{version.major_minor}" + bin.install_symlink "luac" => "luac#{version.major_minor}" + bin.install_symlink "luac" => "luac-#{version.major_minor}" + (include/"lua#{version.major_minor}").install_symlink Dir[include/"lua/*"] + lib.install_symlink shared_library("liblua", version.major_minor.to_s) => shared_library("liblua#{version.major_minor}") + (lib/"pkgconfig").install_symlink "lua.pc" => "lua#{version.major_minor}.pc" + (lib/"pkgconfig").install_symlink "lua.pc" => "lua-#{version.major_minor}.pc" + + lib.install Dir[shared_library("src/liblua", "*")] if OS.linux? + end + + def caveats + <<~EOS + You may also want luarocks: + brew install luarocks + EOS + end + + test do + assert_match "Homebrew is awesome!", shell_output("#{bin}/lua -e \"print ('Homebrew is awesome!')\"") + end +end diff --git a/Formula/l/lua@5.3.rb b/Formula/l/lua@5.3.rb new file mode 100644 index 0000000000000..cc98d68248d97 --- /dev/null +++ b/Formula/l/lua@5.3.rb @@ -0,0 +1,190 @@ +class LuaAT53 < Formula + desc "Powerful, lightweight programming language" + homepage "https://www.lua.org/" + url "https://www.lua.org/ftp/lua-5.3.6.tar.gz" + sha256 "fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "5ff953a8fbc268b3b142fe27c9f33166412f4abb9e3270e37466ab11da65727d" + sha256 cellar: :any, arm64_sonoma: "7c5ee711b59688b6d0663a06fbe7029d5f82b3bb17203883f7359eeef70cc23c" + sha256 cellar: :any, arm64_ventura: "7644320966d9d947a316aaf416a4f8584b300b8e69d504756b36dab4174d2624" + sha256 cellar: :any, arm64_monterey: "c8b7e58e974dbd961e98ca2454e079834d9ab587a8793421541d9f3819b94499" + sha256 cellar: :any, arm64_big_sur: "e06800c163acfcb6a1d0201ca303a631b8fef9c9047855c59795f015d23bd52b" + sha256 cellar: :any, sonoma: "8b7fbef25a004a71dbaaccd0fba7ede0b038e89c5e0f5b3ec10bdd33f2540512" + sha256 cellar: :any, ventura: "a6929c7f125dd6fd6bf764956325bc5d0067808eb1300ebe42e5a8e90815f8e1" + sha256 cellar: :any, monterey: "dd559951c01f28022e4d2a9729f4eb2f94803d365ff272ab3c361e06490cdfee" + sha256 cellar: :any, big_sur: "ce0820b10f9329826746487c3d69c475241cc7153dcbae1b250e853320256c27" + sha256 cellar: :any, catalina: "7ac8234731edf3b0eb86a20cda2bdb6c0de637529790263d076de7da6cc7ab93" + sha256 cellar: :any, mojave: "564c6e085e6a2bc744982dbdb1934ace6332231b1190e56a08e11248d6b416e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dab7e95e006b66d91b3dd4328202d5fe4769be8be19c72a02f63a94fa838ba5e" + end + + keg_only :versioned_formula + + # See: https://www.lua.org/versions.html#5.3 + # Last release on 2020-09-25 + disable! date: "2024-12-14", because: :deprecated_upstream + + uses_from_macos "unzip" => :build + + on_macos do + # Be sure to build a dylib, or else runtime modules will pull in another static copy of liblua = crashy + # See: https://github.com/Homebrew/legacy-homebrew/pull/5043 + # ***Update me with each version bump!*** + patch :DATA + end + + on_linux do + depends_on "readline" + + # Add shared library for linux + # Equivalent to the mac patch carried around here ... that will probably never get upstreamed + # Inspired from https://www.linuxfromscratch.org/blfs/view/cvs/general/lua.html + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/c2d33768512f73b3590e15c47b319af50576b24c/lua@5.3/lua-so.patch" + sha256 "b9bba9d10ed5d34335c831972a02ec48471ca1dbf95230edc13fe5f575d5542c" + end + end + + def install + if OS.linux? + # Fix: /usr/bin/ld: lapi.o: relocation R_X86_64_32 against `luaO_nilobject_' can not be used + # when making a shared object; recompile with -fPIC + # See https://www.linuxfromscratch.org/blfs/view/cvs/general/lua.html + ENV.append_to_cflags "-fPIC" + end + + # Substitute formula prefix in `src/Makefile` for install name (dylib ID). + # Use our CC/CFLAGS to compile. + inreplace "src/Makefile" do |s| + s.gsub! "@LUA_PREFIX@", prefix if OS.mac? + s.remove_make_var! "CC" + s.change_make_var! "CFLAGS", "#{ENV.cflags} -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)" + s.change_make_var! "MYLDFLAGS", ENV.ldflags || "" + end + + # Fix path in the config header + inreplace "src/luaconf.h", "/usr/local", HOMEBREW_PREFIX + + os = if OS.mac? + "macosx" + else + "linux" + end + + system "make", os, "INSTALL_TOP=#{prefix}", "INSTALL_INC=#{include}/lua", "INSTALL_MAN=#{man1}" + system "make", "install", "INSTALL_TOP=#{prefix}", "INSTALL_INC=#{include}/lua", "INSTALL_MAN=#{man1}" + + # We ship our own pkg-config file as Lua no longer provide them upstream. + libs = %W[-llua#{version.major_minor} -lm] + libs << "-ldl" if OS.linux? + (lib/"pkgconfig/lua.pc").write <<~EOS + V= #{version.major_minor} + R= #{version} + prefix=#{opt_prefix} + INSTALL_BIN= ${prefix}/bin + INSTALL_INC= ${prefix}/include/lua + INSTALL_LIB= ${prefix}/lib + INSTALL_MAN= ${prefix}/share/man/man1 + INSTALL_LMOD= ${prefix}/share/lua/${V} + INSTALL_CMOD= ${prefix}/lib/lua/${V} + exec_prefix=${prefix} + libdir=${exec_prefix}/lib + includedir=${prefix}/include/lua + + Name: Lua + Description: An Extensible Extension Language + Version: #{version} + Requires: + Libs: -L${libdir} #{libs.join(" ")} + Cflags: -I${includedir} + EOS + + # Fix some software potentially hunting for different pc names. + bin.install_symlink "lua" => "lua#{version.major_minor}" + bin.install_symlink "lua" => "lua-#{version.major_minor}" + bin.install_symlink "luac" => "luac#{version.major_minor}" + bin.install_symlink "luac" => "luac-#{version.major_minor}" + (include/"lua#{version.major_minor}").install_symlink Dir[include/"lua/*"] + lib.install_symlink shared_library("liblua", version.major_minor.to_s) => shared_library("liblua#{version.major_minor}") + (lib/"pkgconfig").install_symlink "lua.pc" => "lua#{version.major_minor}.pc" + (lib/"pkgconfig").install_symlink "lua.pc" => "lua-#{version.major_minor}.pc" + + lib.install Dir[shared_library("src/liblua", "*")] if OS.linux? + end + + def caveats + <<~EOS + You may also want luarocks: + brew install luarocks + EOS + end + + test do + assert_match "Ducks are terrifying.", shell_output("#{bin}/lua -e \"print ('Ducks are terrifying.')\"") + end +end + +__END__ +diff --git a/Makefile b/Makefile +index 7fa91c8..a825198 100644 +--- a/Makefile ++++ b/Makefile +@@ -41,7 +41,7 @@ PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris + # 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.5.3.6.dylib + TO_MAN= lua.1 luac.1 + + # Lua version and release. +@@ -63,6 +63,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) ++ ln -s -f liblua.5.3.6.dylib $(INSTALL_LIB)/liblua.5.3.dylib ++ ln -s -f liblua.5.3.dylib $(INSTALL_LIB)/liblua.dylib + + uninstall: + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) +diff --git a/src/Makefile b/src/Makefile +index 2e7a412..d0c4898 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -28,7 +28,7 @@ MYOBJS= + + PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris + +-LUA_A= liblua.a ++LUA_A= liblua.5.3.6.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 +@@ -56,11 +56,12 @@ o: $(ALL_O) + a: $(ALL_A) + + $(LUA_A): $(BASE_O) +- $(AR) $@ $(BASE_O) +- $(RANLIB) $@ ++ $(CC) -dynamiclib -install_name @LUA_PREFIX@/lib/liblua.5.3.dylib \ ++ -compatibility_version 5.3 -current_version 5.3.6 \ ++ -o liblua.5.3.6.dylib $^ + + $(LUA_T): $(LUA_O) $(LUA_A) +- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) ++ $(CC) -fno-common $(MYLDFLAGS) -o $@ $(LUA_O) $(LUA_A) -L. -llua.5.3.6 $(LIBS) + + $(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) +@@ -110,7 +111,7 @@ linux: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" + + macosx: +- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" ++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -fno-common" SYSLIBS="-lreadline" + + mingw: + $(MAKE) "LUA_A=lua53.dll" "LUA_T=lua.exe" \ diff --git a/Formula/l/luacheck.rb b/Formula/l/luacheck.rb new file mode 100644 index 0000000000000..32019a8fc8470 --- /dev/null +++ b/Formula/l/luacheck.rb @@ -0,0 +1,51 @@ +class Luacheck < Formula + desc "Tool for linting and static analysis of Lua code" + homepage "https://luacheck.readthedocs.io/" + url "https://github.com/lunarmodules/luacheck/archive/refs/tags/v1.2.0.tar.gz" + sha256 "8efe62a7da4fdb32c0c22ec1f7c9306cbc397d7d40493c29988221a059636e25" + license "MIT" + head "https://github.com/lunarmodules/luacheck.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a169aee2121f7c2ed0b06c929b7d7af23ffc3307bdbf0422d55320eb28c4ada7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "15a92f15305c2dd68712f301650a1e4dd44f125d877cce6805fe7c350a3d6846" + sha256 cellar: :any_skip_relocation, arm64_ventura: "afb2f3120e5fe5f65c04b23fb0b0c71b11aae1f568b0ee089ff571aa8f646760" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c6e14232fc83825fc5e95905a1494ff3871ea0b714304a1bbdd1341aa9a23e77" + sha256 cellar: :any_skip_relocation, sonoma: "5c001a53a3e07a42f1feb1e8357d10413acabfb687b3b91aebd5f04e576c1332" + sha256 cellar: :any_skip_relocation, ventura: "2a8e782aac328d196dab06ac9da394d11d8c613c9057ef7392abdb44e3839e3a" + sha256 cellar: :any_skip_relocation, monterey: "94a98b05bfa94bb3ec210d38328b18028f764bd1024efe56c738dd8b9c481e72" + sha256 cellar: :any_skip_relocation, arm64_linux: "f911cc67b563f4f04f2cb3239c05dda795bc53542a2dfa2d4667d35b39aeda8d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eaba85e939f4055b051482af96f2009a1a86fc113f69b12abc4d6a10ec887e64" + 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_foo = testpath/"foo.lua" + test_foo.write <<~EOS + local a = 1 + local b = 2 + local c = a + b + EOS + assert_match "unused variable \e[0m\e[1mc\e[0m\n\n", + shell_output("#{bin}/luacheck #{test_foo}", 1) + + test_bar = testpath/"bar.lua" + test_bar.write <<~EOS + local a = 1 + print("a is", a) + EOS + assert_match "\e[0m\e[0m\e[1m0\e[0m errors in 1 file", + shell_output("#{bin}/luacheck #{test_bar}") + + assert_match version.to_s, shell_output("#{bin}/luacheck --version") + end +end diff --git a/Formula/l/luajit-openresty.rb b/Formula/l/luajit-openresty.rb new file mode 100644 index 0000000000000..c24be151b81b6 --- /dev/null +++ b/Formula/l/luajit-openresty.rb @@ -0,0 +1,82 @@ +class LuajitOpenresty < Formula + desc "OpenResty's Branch of LuaJIT 2" + homepage "https://github.com/openresty/luajit2" + url "https://github.com/openresty/luajit2/archive/refs/tags/v2.1-20250117.tar.gz" + sha256 "68ff3dc2cc97969f7385679da7c9ff96738aa9cc275fa6bab77316eb3340ea8e" + license "MIT" + version_scheme 1 + head "https://github.com/openresty/luajit2.git", branch: "v2.1-agentzh" + + # The latest LuaJIT release is unstable (2.1.0-beta3, from 2017-05-01) and + # OpenResty is making releases using the latest LuaJIT Git commits. With this + # in mind, the regex below is very permissive and will match any tags + # starting with a numeric version, ensuring that we match unstable versions. + # We should consider restricting the regex to stable versions if it ever + # becomes feasible in the future. + livecheck do + url :stable + regex(/^v?(\d+(?:[.-]\d+)+[^{}]*)/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "b42b35a476341208be769e5e52c3c5b2a50c36ff95cc6f782174bb1c0a17a9af" + sha256 cellar: :any, arm64_sonoma: "4865cd2c57125dedbce70d3af6921a798f4d81a27000a7d20c4a758ff8e6763b" + sha256 cellar: :any, arm64_ventura: "6bd280a7968c4bec58727904d802d4ac9f16040ffd8db04b29c65d020b9ed50b" + sha256 cellar: :any, sonoma: "eb292ec2d73a634bcf712fa76c13c320904d70c2b1b68cf84da3db830bf273cc" + sha256 cellar: :any, ventura: "527754b4089eae5a0c0209244ddf2dd33d51662d97354375adba05635f2386be" + sha256 cellar: :any_skip_relocation, arm64_linux: "f283cd3e249222122c19164bd157939f39e59dad641b5b8feba7727a2a524375" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c707e14c0302d7affc41d37e59e652003277fc06569239ce22f466e90175f0f" + end + + keg_only "it conflicts with the LuaJIT formula" + + def install + # 1 - Override the hardcoded gcc. + # 2 - Remove the "-march=i686" so we can set the march in cflags. + # Both changes should persist and were discussed upstream. + inreplace "src/Makefile" do |f| + f.change_make_var! "CC", ENV.cc + f.change_make_var! "CCOPT_x86", "" + end + + # 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.to_s if OS.mac? + + # Fix for clang >= 16, see https://github.com/LuaJIT/LuaJIT/issues/1266 + ENV.append "LDFLAGS", "-Wl,-no_deduplicate" if DevelopmentTools.clang_build_version >= 1600 + + args = %W[ + PREFIX=#{prefix} + XCFLAGS=-DLUAJIT_ENABLE_GC64 + ] + + system "make", "amalg", *args + system "make", "install", *args + + # LuaJIT doesn't automatically symlink unversioned libraries: + # https://github.com/Homebrew/homebrew/issues/45854. + lib.install_symlink lib/"libluajit-5.1.dylib" => "libluajit.dylib" + lib.install_symlink lib/"libluajit-5.1.a" => "libluajit.a" + + # Fix path in pkg-config so modules are installed + # to permanent location rather than inside the Cellar. + inreplace lib/"pkgconfig/luajit.pc" do |s| + s.gsub! "INSTALL_LMOD=${prefix}/share/lua/${abiver}", + "INSTALL_LMOD=#{HOMEBREW_PREFIX}/share/lua/${abiver}" + s.gsub! "INSTALL_CMOD=${prefix}/${multilib}/lua/${abiver}", + "INSTALL_CMOD=#{HOMEBREW_PREFIX}/${multilib}/lua/${abiver}" + end + + # Having an empty Lua dir in lib/share can mess with other Homebrew Luas. + %W[#{lib}/lua #{share}/lua].each { |d| rm_r(d) } + end + + test do + system bin/"luajit", "-e", <<~EOS + local ffi = require("ffi") + ffi.cdef("int printf(const char *fmt, ...);") + ffi.C.printf("Hello %s!\\n", "#{ENV["USER"]}") + EOS + end +end diff --git a/Formula/l/luajit.rb b/Formula/l/luajit.rb new file mode 100644 index 0000000000000..392c6db21cfaa --- /dev/null +++ b/Formula/l/luajit.rb @@ -0,0 +1,103 @@ +# NOTE: We have a policy of building only from tagged commits, but make a +# singular exception for luajit. This exception will not be extended +# to other formulae. See: +# https://github.com/Homebrew/homebrew-core/pull/99580 +# TODO: Add an audit in `brew` for this. https://github.com/Homebrew/homebrew-core/pull/104765 +class Luajit < Formula + desc "Just-In-Time Compiler (JIT) for the Lua programming language" + homepage "https://luajit.org/luajit.html" + # Update this to the tip of the `v2.1` branch at the start of every month. + # Get the latest commit with: + # `git ls-remote --heads https://github.com/LuaJIT/LuaJIT.git v2.1` + # This is a rolling release model so take care not to ignore CI failures that may be regressions. + url "https://github.com/LuaJIT/LuaJIT/archive/eec7a8016c3381b949b5d84583800d05897fa960.tar.gz" + # Use the version scheme `2.1.timestamp` where `timestamp` is the Unix timestamp of the + # latest commit at the time of updating. + # `brew livecheck luajit` will generate the correct version for you automatically. + version "2.1.1744318430" + sha256 "220e2fd49f3a50abda874b888ac31e6cf86dd7ed3f221ebb47515315d9815eeb" + license "MIT" + head "https://luajit.org/git/luajit.git", branch: "v2.1" + + livecheck do + url "https://api.github.com/repos/LuaJIT/LuaJIT/branches/v2.1" + strategy :json do |json| + date = json.dig("commit", "commit", "author", "date") + "2.1.#{DateTime.parse(date).strftime("%s")}" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "72a8213363c598f8ed1bcd607ed934d591fe97f22f06bffdd8f3b97fd34c5e44" + sha256 cellar: :any, arm64_sonoma: "fafd405325997dcaf1ff648ec750794bb83a62e5b52d911bb920cee28a8151b4" + sha256 cellar: :any, arm64_ventura: "65fb2e5005959c041cbfcb1669fdca0960bfbbb8a684f4d6a0813c602dd472f6" + sha256 cellar: :any, sonoma: "a1565173276235def2da905dac20b5910832e1f7cb2f1fd5c0d044274abdb9fa" + sha256 cellar: :any, ventura: "01a586a33c65dcec232c617605cc5b9de72df6374431f4875972a991cac58c06" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b651274c3fba110cc0191622b85ccee3562539c00e122422ac35efb2ce6950c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef64f5a9b05feadf53ec9350bf2984bd3758f9db7b48bd6aafb267ca6cfc05b1" + end + + def install + # 1 - Override the hardcoded gcc. + # 2 - Remove the "-march=i686" so we can set the march in cflags. + # Both changes should persist and were discussed upstream. + inreplace "src/Makefile" do |f| + f.change_make_var! "CC", ENV.cc + f.gsub!(/-march=\w+\s?/, "") + end + + # 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.to_s if OS.mac? + + # Help the FFI module find Homebrew-installed libraries. + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath(target: HOMEBREW_PREFIX/"lib")}" + + # Pass `Q= E=@:` to build verbosely. + verbose_args = %w[Q= E=@:] + + # Build with PREFIX=$HOMEBREW_PREFIX so that luajit can find modules outside its own keg. + # This allows us to avoid having to set `LUA_PATH` and `LUA_CPATH` for non-vendored modules. + system "make", "amalg", "PREFIX=#{HOMEBREW_PREFIX}", *verbose_args + system "make", "install", "PREFIX=#{prefix}", *verbose_args + doc.install (buildpath/"doc").children + + # LuaJIT doesn't automatically symlink unversioned libraries: + # https://github.com/Homebrew/homebrew/issues/45854. + lib.install_symlink lib/shared_library("libluajit-5.1") => shared_library("libluajit") + lib.install_symlink lib/"libluajit-5.1.a" => "libluajit.a" + + # Fix path in pkg-config so modules are installed + # to permanent location rather than inside the Cellar. + inreplace lib/"pkgconfig/luajit.pc" do |s| + s.gsub! "INSTALL_LMOD=${prefix}/share/lua/${abiver}", + "INSTALL_LMOD=#{HOMEBREW_PREFIX}/share/lua/${abiver}" + s.gsub! "INSTALL_CMOD=${prefix}/${multilib}/lua/${abiver}", + "INSTALL_CMOD=#{HOMEBREW_PREFIX}/${multilib}/lua/${abiver}" + end + end + + test do + assert_includes shell_output("#{bin}/luajit -v"), " #{version} " + + system bin/"luajit", "-e", <<~EOS + local ffi = require("ffi") + ffi.cdef("int printf(const char *fmt, ...);") + ffi.C.printf("Hello %s!\\n", "#{ENV["USER"]}") + EOS + + # Check that LuaJIT can find its own `jit.*` modules + touch "empty.lua" + system bin/"luajit", "-b", "-o", "osx", "empty.lua", "empty.o" + assert_path_exists testpath/"empty.o" + + # Check that we're not affected by LuaJIT/LuaJIT/issues/865. + require "macho" + machobj = MachO.open("empty.o") + # always generate 64 bit non-FAT Mach-O object files + # per https://github.com/LuaJIT/LuaJIT/commit/7110b935672489afd6ba3eef3e5139d2f3bd05b6 + assert_kind_of MachO::MachOFile, machobj + assert_predicate machobj, :object? + assert_equal Hardware::CPU.arch, machobj.cputype + end +end diff --git a/Formula/l/luanti.rb b/Formula/l/luanti.rb new file mode 100644 index 0000000000000..ab4cfc47ead44 --- /dev/null +++ b/Formula/l/luanti.rb @@ -0,0 +1,85 @@ +class Luanti < Formula + desc "Free, open source voxel game engine and game" + homepage "https://www.luanti.org/" + license "LGPL-2.1-or-later" + + stable do + url "https://github.com/luanti-org/luanti/archive/refs/tags/5.11.0.tar.gz" + sha256 "70e531d0776988ce6e579ea5490fdf6be3e349a4ade5281f5111aa4fdd8ee510" + + resource "minetest_game" do + url "https://github.com/luanti-org/minetest_game/archive/refs/tags/5.8.0.tar.gz" + sha256 "33a3bb43b08497a0bdb2f49f140a2829e582d5c16c0ad52be1595c803f706912" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_linux: "b99c0038fa9684ceebf2e258fd0dc7f46cf2e84338afde2890d906654903b7ab" + sha256 x86_64_linux: "a569fcf42e7b1541322d1e6164eb8e15331efc65d8accb33418629b62fbb525a" + end + + head do + url "https://github.com/luanti-org/luanti.git", branch: "master" + + resource "minetest_game" do + url "https://github.com/luanti-org/minetest_game.git", branch: "master" + end + end + + depends_on "cmake" => :build + depends_on "curl" + depends_on "freetype" + depends_on "gettext" + depends_on "gmp" + depends_on "jpeg-turbo" + depends_on "jsoncpp" + depends_on "libogg" + depends_on "libpng" + depends_on "libvorbis" + depends_on "libx11" + depends_on "libxi" + depends_on "libxxf86vm" + depends_on :linux + depends_on "luajit" + depends_on "mesa" + depends_on "ncurses" + depends_on "openal-soft" + depends_on "openssl@3" + depends_on "sqlite" + depends_on "xinput" + depends_on "zlib" + depends_on "zstd" + + def install + # Remove bundled libraries to prevent fallback + %w[lua gmp jsoncpp].each { |lib| rm_r(buildpath/"lib"/lib) } + + (buildpath/"games/minetest_game").install resource("minetest_game") + + args = %W[ + -DBUILD_CLIENT=1 + -DBUILD_SERVER=0 + -DENABLE_FREETYPE=1 + -DCMAKE_EXE_LINKER_FLAGS='-L#{Formula["freetype"].opt_lib}' + -DENABLE_GETTEXT=1 + -DCUSTOM_GETTEXT_PATH=#{Formula["gettext"].opt_prefix} + ] + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + # engine got changed from minetest to luanti with 5.10.0 release + output = shell_output("#{bin}/luanti --version") + assert_match "USE_CURL=1", output + assert_match "USE_GETTEXT=1", output + assert_match "USE_SOUND=1", output + end +end diff --git a/Formula/l/luaradio.rb b/Formula/l/luaradio.rb new file mode 100644 index 0000000000000..7a19d3c5e306d --- /dev/null +++ b/Formula/l/luaradio.rb @@ -0,0 +1,60 @@ +class Luaradio < Formula + desc "Lightweight, embeddable flow graph signal processing framework for SDR" + homepage "https://luaradio.io/" + url "https://github.com/vsergeev/luaradio/archive/refs/tags/v0.11.0.tar.gz" + sha256 "abd6077d32a2e83ec9e4bbda1f84ccb540c9d5195d30d7a8ebeb12676e33eb2e" + license "MIT" + head "https://github.com/vsergeev/luaradio.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c0760817c9d2a148d351f6a4c054ec481610487fe82571551622e5bcc6a65b68" + sha256 cellar: :any, arm64_sonoma: "f3c7d2ea4db37fc295db8a6643fb14b44b3e45c2716a113c546039b8c69e50e5" + sha256 cellar: :any, arm64_ventura: "2425ad1e4cc63d76223da8d3b4d3c7ce2d13eada579b4c9fb33e52714fa3d2cc" + sha256 cellar: :any, arm64_monterey: "ea3c5a2a64239596ddbcedca7bf98f38a2c3e7142c0bb9e15e371394a8bc3f48" + sha256 cellar: :any, arm64_big_sur: "d8a8170a23202d459a0bc42f7f128d98bbc5ca0c683245703193250aa971663e" + sha256 cellar: :any, sonoma: "a296107480f79b35bc759fa7cdb985238f795ed9ba24ab1a03e3b08dc224e041" + sha256 cellar: :any, ventura: "32603d888a275632c553b1508ea3da7817b4264a5e9cc5754ebca63a20010867" + sha256 cellar: :any, monterey: "19dafaaeba49dfb959160cbe219045edcb4cf3b23accc5a024a09522c63d820a" + sha256 cellar: :any, big_sur: "0eb6b7bb4b742724c4edc84caec47e2409a0eeb0543d61ac4b9dc69b9e341ae7" + sha256 cellar: :any, catalina: "a4d29caa526850bfc74f55efe829e10279d840986183c2f8ff1a80a97bd6b0c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3a853344ab46cee8a3364ee489bcb3b34cac26e987ec9a311e762e660118a33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d7cf352a29e4917fb03b64ced6278562518ec30fec3a189f3e75b869f560150" + end + + depends_on "pkgconf" => :build + depends_on "fftw" + depends_on "liquid-dsp" + depends_on "luajit" + + def install + system "make", "-C", "embed", "PREFIX=#{prefix}", "INSTALL_CMOD=#{lib}/lua/5.1", "install" + end + + test do + (testpath/"hello").write("Hello, world!") + (testpath/"test.lua").write <<~LUA + local radio = require('radio') + + local PrintBytes = radio.block.factory("PrintBytes") + + function PrintBytes:instantiate() + self:add_type_signature({radio.block.Input("in", radio.types.Byte)}, {}) + end + + function PrintBytes:process(c) + for i = 0, c.length - 1 do + io.write(string.char(c.data[i].value)) + end + end + + local source = radio.RawFileSource("hello", radio.types.Byte, 1e6) + local sink = PrintBytes() + local top = radio.CompositeBlock() + + top:connect(source, sink) + top:run() + LUA + + assert_equal "Hello, world!", shell_output("#{bin}/luaradio test.lua") + end +end diff --git a/Formula/l/luarocks.rb b/Formula/l/luarocks.rb new file mode 100644 index 0000000000000..82dc4cbf16b13 --- /dev/null +++ b/Formula/l/luarocks.rb @@ -0,0 +1,89 @@ +class Luarocks < Formula + desc "Package manager for the Lua programming language" + homepage "https://luarocks.org/" + url "https://luarocks.org/releases/luarocks-3.11.1.tar.gz" + sha256 "c3fb3d960dffb2b2fe9de7e3cb004dc4d0b34bb3d342578af84f84325c669102" + license "MIT" + head "https://github.com/luarocks/luarocks.git", branch: "master" + + livecheck do + url :homepage + regex(%r{/luarocks[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "0cf000ae5081eff2d53ed7fe0e7becdb59151b022afe68502954f52bae71b555" + end + + depends_on "luajit" => :test + depends_on "lua" + + uses_from_macos "unzip" + + def install + # Fix the lua config file missing issue for luarocks-admin build + ENV.deparallelize + + system "./configure", "--prefix=#{prefix}", + "--sysconfdir=#{etc}", + "--rocks-tree=#{HOMEBREW_PREFIX}" + system "make", "install" + generate_completions_from_executable(bin/"luarocks", "completion") + + # Make bottles uniform to make an `:all` bottle + luaversion = Formula["lua"].version.major_minor + inreplace_files = %w[ + cmd/config + cmd/which + core/cfg + core/path + deps + loader + ].map { |file| share/"lua"/luaversion/"luarocks/#{file}.lua" } + inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX + end + + test do + luas = [ + Formula["lua"], + Formula["luajit"], + ] + + luas.each do |lua| + luaversion, luaexec = case lua.name + when "luajit" then ["5.1", lua.opt_bin/"luajit"] + else [lua.version.major_minor, lua.opt_bin/"lua-#{lua.version.major_minor}"] + end + + ENV["LUA_PATH"] = "#{testpath}/share/lua/#{luaversion}/?.lua" + ENV["LUA_CPATH"] = "#{testpath}/lib/lua/#{luaversion}/?.so" + + system bin/"luarocks", "install", + "luafilesystem", + "--tree=#{testpath}", + "--lua-dir=#{lua.opt_prefix}" + + system luaexec, "-e", "require('lfs')" + + case luaversion + when "5.1" + (testpath/"lfs_#{luaversion}test.lua").write <<~LUA + require("lfs") + lfs.mkdir("blank_space") + LUA + + system luaexec, "lfs_#{luaversion}test.lua" + assert_predicate testpath/"blank_space", :directory?, + "Luafilesystem failed to create the expected directory" + else + (testpath/"lfs_#{luaversion}test.lua").write <<~LUA + require("lfs") + print(lfs.currentdir()) + LUA + + assert_match testpath.to_s, shell_output("#{luaexec} lfs_#{luaversion}test.lua") + end + end + end +end diff --git a/Formula/l/luau.rb b/Formula/l/luau.rb new file mode 100644 index 0000000000000..7c349c63822a9 --- /dev/null +++ b/Formula/l/luau.rb @@ -0,0 +1,43 @@ +class Luau < Formula + desc "Fast, safe, gradually typed embeddable scripting language derived from Lua" + homepage "https://luau.org/" + url "https://github.com/luau-lang/luau/archive/refs/tags/0.673.tar.gz" + sha256 "7587065619c1e63e781dcec895d9df9d8286730016d1ce2e51408f2b7e639314" + license "MIT" + version_scheme 1 + head "https://github.com/luau-lang/luau.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8389f4f6ca16c43f280b76c6300c8a3efcdc9d7b836022c26da67ddc85774d17" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bf325cbc685f669853db8d14a710844c2738ed7f89f7c1e7d2d3b5687a913ad0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7d396499134fe9ef7773e4131d2e05408f4fed3dde55f1b9e29c3c7ec216859c" + sha256 cellar: :any_skip_relocation, sonoma: "96eb28dd46713ba04521675f7963c67b6d7990eb35104ac054ba95165b255992" + sha256 cellar: :any_skip_relocation, ventura: "10354dd9e6fadef0747e17c0007f8a5f514de3aa3981a4b2a76cd36d5a259806" + sha256 cellar: :any_skip_relocation, arm64_linux: "81815c5c2d2b7d87dd42a5a00eb9e2d3ab67c348da55851ec8be35360661a702" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4750f18ba0da6dbd39a4c31ed8d89cd367e773695f28a1f56fcbde6bb640c3fe" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DLUAU_BUILD_TESTS=OFF", *std_cmake_args + system "cmake", "--build", "build" + bin.install %w[ + build/luau + build/luau-analyze + build/luau-ast + build/luau-compile + build/luau-reduce + ] + end + + test do + (testpath/"test.lua").write "print ('Homebrew is awesome!')\n" + assert_match "Homebrew is awesome!", shell_output("#{bin}/luau test.lua") + end +end diff --git a/Formula/l/luaver.rb b/Formula/l/luaver.rb new file mode 100644 index 0000000000000..43ab89483e9a9 --- /dev/null +++ b/Formula/l/luaver.rb @@ -0,0 +1,34 @@ +class Luaver < Formula + desc "Manage and switch between versions of Lua, LuaJIT, and Luarocks" + homepage "https://github.com/DhavalKapil/luaver" + url "https://github.com/DhavalKapil/luaver/archive/refs/tags/v1.1.0.tar.gz" + sha256 "441b1b72818889593d15a035807c95321118ac34270da49cf8d5d64f5f2e486d" + license "MIT" + head "https://github.com/DhavalKapil/luaver.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "9bf33058878e1a0fcbec847bf8b5ec06912eda98647f05ab96e08e4c1197f93a" + end + + depends_on "wget" + + def install + bin.install "luaver" + end + + def caveats + <<~EOS + Add the following at the end of the correct file yourself: + if which luaver > /dev/null; then . `which luaver`; fi + EOS + end + + test do + lua_versions = %w[5.3.3 5.2.4 5.1.5] + lua_versions.each do |v| + ENV.deparallelize { system "bash", "-c", ". #{bin}/luaver install #{v} < /dev/null" } + system "bash", "-c", ". #{bin}/luaver use #{v} && lua -v" + end + end +end diff --git a/Formula/l/lucky-commit.rb b/Formula/l/lucky-commit.rb new file mode 100644 index 0000000000000..4cf4f53223f20 --- /dev/null +++ b/Formula/l/lucky-commit.rb @@ -0,0 +1,39 @@ +class LuckyCommit < Formula + desc "Customize your git commit hashes!" + homepage "https://github.com/not-an-aardvark/lucky-commit" + url "https://github.com/not-an-aardvark/lucky-commit/archive/refs/tags/v2.2.5.tar.gz" + sha256 "cab69b87afac8b2e8db3949397695809977199ccc4894b8af53e59da7f917126" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c93d4a4678944faa2b8d4a7144081fbb2e58cb2fd90a9738f955f257ad604d1f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4df456578bbb007849607cecb96e916bc4df5201846a2ea5b57cc6cf033c0250" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eabaed3df8acebb03dfc099f24ab40d7a070346c5b9d926bb9a4cf8afca6987b" + sha256 cellar: :any_skip_relocation, sonoma: "1cad169a029b5a10886af7b82d32f3a353df1ffdb4c253feff12fb99ed3efcbf" + sha256 cellar: :any_skip_relocation, ventura: "ddc33a6a32fa743b4a6137716900a09736fa291bbdff36799637050d625e06d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f1b4db17c27f0b29b0aa25395e3849f2869ad538371a813c695b794a4dc4257" + sha256 cellar: :any_skip_relocation, x86_64_linux: "71e04671feeb1d045a3eb1ddc47ff6f4b765b0f5f4512b6e975a3bb8be79de6a" + end + + depends_on "rust" => :build + + on_linux do + depends_on "opencl-icd-loader" + depends_on "pocl" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + system "git", "init" + touch "foo" + system "git", "add", "foo" + system "git", "config", "user.email", "you@example.com" + system "git", "config", "user.name", "Your Name" + system "git", "commit", "-m", "Initial commit" + system bin/"lucky_commit", "1010101" + assert_equal "1010101", Utils.git_short_head + end +end diff --git a/Formula/l/ludusavi.rb b/Formula/l/ludusavi.rb new file mode 100644 index 0000000000000..48270840559b0 --- /dev/null +++ b/Formula/l/ludusavi.rb @@ -0,0 +1,36 @@ +class Ludusavi < Formula + desc "Backup tool for PC game saves" + homepage "https://github.com/mtkennerly/ludusavi" + url "https://github.com/mtkennerly/ludusavi/archive/refs/tags/v0.29.1.tar.gz" + sha256 "6f1ea88f2483a1179d6797239fc4a57339e8c870add807ceacaa50a239031f0c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d7c3a1659aea16888d65dd44b04a5736feaa9a9694b2da1fdf374f184c8a505b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a6d6e9fc1a8e8ad4623a7c1de10c853154e9cf27c1e29c9c15db9976f8dc821" + sha256 cellar: :any_skip_relocation, arm64_ventura: "08182afdde260dca52f78cc5963030cb3e592c0b8aa98c10a2f2a5fec90d4bec" + sha256 cellar: :any_skip_relocation, sonoma: "41c247766a740b47f75a8c179d46bde5b7cbfd24994207dfe1210e9eb4efda0b" + sha256 cellar: :any_skip_relocation, ventura: "a2f42cfcafa79a56216f8054d18c27264ddfd898876e050c3defa888d83579b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "27ce8f9c00d42db1ad10a5dbfbf3e690b908e42dae62bc98972d80ae1c1739a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "173211d56a87aad433661256fe23e6fef6e7c8460320714f2f4702415062d6b9" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + on_linux do + depends_on "glib" + depends_on "gtk+3" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/ludusavi -V") + assert_empty shell_output("#{bin}/ludusavi backups").strip + end +end diff --git a/Formula/l/luit.rb b/Formula/l/luit.rb new file mode 100644 index 0000000000000..0655f103e23c6 --- /dev/null +++ b/Formula/l/luit.rb @@ -0,0 +1,42 @@ +class Luit < Formula + desc "Filter run between arbitrary application and UTF-8 terminal emulator" + homepage "https://invisible-island.net/luit/" + url "https://invisible-mirror.net/archives/luit/luit-20240910.tgz" + sha256 "a15d7fcbfc25ae1453d61aec23ff6ba04145d6e7b7b3b0071eb5cfda3a3a49d5" + license "MIT" + + livecheck do + url "https://invisible-mirror.net/archives/luit/" + regex(/href=.*?luit[._-]v?(\d+(?:[.-]\d+)*)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2cf2f64b1e6e8c0f651be99800c33bb43bce794d6d794620bccdddf8abff46d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4773607117055df4f056d073763f69474bf9711d0e99707b878fb612968c4f88" + sha256 cellar: :any_skip_relocation, arm64_ventura: "292d7861ad2364235c5767308dcb30756732a95d83f73602c47da7e48199db86" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c936932f270a6ab28c19d92d40fa77e24878ae706b98faf4935439c08f6e108c" + sha256 cellar: :any_skip_relocation, sonoma: "c0592ebe8ed9e681825751321c0e3ab8673d25ac47e22c4ea6b9cb1bb792f237" + sha256 cellar: :any_skip_relocation, ventura: "25a7cc8a54ca686cc97a010ac512a1130ef5b6fc4f8c7701436b6d0de96dc8e5" + sha256 cellar: :any_skip_relocation, monterey: "98ee90ca679b3b451df2dd122cc1846f1ca41af22ffd56bad142eb9944feb733" + sha256 cellar: :any_skip_relocation, arm64_linux: "16768af2646e4b9ea7a1841eaf353ebb1ea82d6bd752e18d557484ab9503b4cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "731e2b4330c98ecd23d1cb1220bd123c5561a91e8e43a0c8f7ac42ac68e14896" + end + + uses_from_macos "zlib" + + def install + system "./configure", "--without-x", + *std_configure_args + system "make", "install" + end + + test do + require "pty" + (testpath/"input").write("#end {bye}\n") + PTY.spawn(bin/"luit", "-encoding", "GBK", "echo", "foobar") do |r, _w, _pid| + assert_match "foobar", r.read + rescue Errno::EIO + # GNU/Linux raises EIO when read is done on closed pty + end + end +end diff --git a/Formula/l/lume.rb b/Formula/l/lume.rb new file mode 100644 index 0000000000000..077320b96fc75 --- /dev/null +++ b/Formula/l/lume.rb @@ -0,0 +1,44 @@ +class Lume < Formula + desc "Create and manage Apple Silicon-native virtual machines" + homepage "https://github.com/trycua/cua" + url "https://github.com/trycua/cua/archive/refs/tags/lume-v0.2.14.tar.gz" + sha256 "974dd0dc00c1bf387ff174afc3cf767014251755aacf1f793345e8639f7bd290" + license "MIT" + head "https://github.com/trycua/cua.git", branch: "main" + + livecheck do + url :stable + regex(/^(?:lume[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c9f5647807cc84126eb98db2503cf9ea25efa32375926d2d7a67d6bdbe12eb80" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3448eab1082d9bd9f9f721695e00787f98bd620ada6c636f4f626e6251eb3974" + end + + depends_on xcode: ["16.0", :build] + depends_on arch: :arm64 # For Swift 6.0 + depends_on :macos + + def install + cd "libs/lume" do + system "swift", "build", "--disable-sandbox", "-c", "release", "--product", "lume" + system "/usr/bin/codesign", "-f", "-s", "-", + "--entitlement", "resources/lume.entitlements", + ".build/release/lume" + bin.install ".build/release/lume" + end + end + + test do + # Test ipsw command + assert_match "Found latest IPSW URL", shell_output("#{bin}/lume ipsw") + + # Test management HTTP server + # Serves 404 Not found if no machines created + port = free_port + fork { exec bin/"lume", "serve", "--port", port.to_s } + sleep 5 + assert_match %r{^HTTP/\d(.\d)? (200|404)}, shell_output("curl -si localhost:#{port}/lume").lines.first + end +end diff --git a/Formula/l/lunar-date.rb b/Formula/l/lunar-date.rb new file mode 100644 index 0000000000000..cecc22d3a9989 --- /dev/null +++ b/Formula/l/lunar-date.rb @@ -0,0 +1,46 @@ +class LunarDate < Formula + desc "Chinese lunar date library" + homepage "https://github.com/yetist/lunar-date" + url "https://github.com/yetist/lunar-date/releases/download/v3.0.2/lunar-date-3.0.2.tar.xz" + sha256 "608d6e984d4eadae836706c0099f3721b878506b04e053058f694e9fd93933bc" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_sequoia: "634d979674acaa436cee47c3edf4415e5e968981794e7dfbc68f2c5c752127c0" + sha256 arm64_sonoma: "be6e44e2a216af958c79583e1112699f5a63ec5455b51e6f0427907a7d51390f" + sha256 arm64_ventura: "8b07143441c3dcdc7fcc54ed39f3351a65f3fb81f3ef7702b4f746f2a37c5b91" + sha256 sonoma: "a6c02f073c90d347bdf0eb0e54a3abfbd448ae1910be9f867cbb484764efe986" + sha256 ventura: "e64cb24b075865917e0649a3e3c991cdd1648837d9b17728f4fef67ed11c9916" + sha256 arm64_linux: "b9817d81e38b2153d296cc8b244a3f867ca514ddbb38967dc05a956e7264039a" + sha256 x86_64_linux: "42994fbe6ca011c300209f9bf534268e858ec4d5e147063cf3d7dfb4cfb31179" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + 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" + + pkgshare.install "tests" + + # Fix missing #include in testing.c + inreplace pkgshare/"tests/testing.c", "#include ", + "#include \n#include " + end + + test do + pkgconf_flags = Utils.safe_popen_read("pkgconf", "--cflags", "--libs", "lunar-date-3.0", "glib-2.0").chomp.split + system ENV.cc, pkgshare/"tests/testing.c", *pkgconf_flags, + "-I#{include}/lunar-date-3.0/lunar-date", + "-L#{lib}", "-o", "testing" + assert_match "End of date tests", shell_output("#{testpath}/testing") + end +end diff --git a/Formula/l/lunchy-go.rb b/Formula/l/lunchy-go.rb new file mode 100644 index 0000000000000..82e45b62a4e8b --- /dev/null +++ b/Formula/l/lunchy-go.rb @@ -0,0 +1,65 @@ +class LunchyGo < Formula + desc "Friendly wrapper for launchctl" + homepage "https://github.com/sosedoff/lunchy-go" + url "https://github.com/sosedoff/lunchy-go/archive/refs/tags/v0.2.1.tar.gz" + sha256 "58f10dd7d823eff369a3181b7b244e41c09ad8fec2820c9976b822b3daee022e" + license "MIT" + head "https://github.com/sosedoff/lunchy-go.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fba65395dd87db751184f0d6a5023465484f321d47b4cd62ff0095837656c1e6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ce24f8e0a143748b271ad64e33834336cc504c8e14f8dd61ebaac7b06f4eafd5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bf0dbfac8d527789d752334946988aba0d6bc4a1858e1d94963a8214ee291041" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9dadf4a849956c4f09eba6b8c18aed458686138e91254675004e7d15caf4a2a6" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b08ba310aca8771aeeafc4b83bba77cfb57a5bb776752528035e21177c079e03" + sha256 cellar: :any_skip_relocation, sonoma: "1ba8cd414b18ac0bb9855f2df7b3a910e6bf312176cc6eec0ca099c134593e61" + sha256 cellar: :any_skip_relocation, ventura: "0eee3b43e4891dadceba85ae87c572308196b55082423a97046b81814a67c2c2" + sha256 cellar: :any_skip_relocation, monterey: "1dcf57a3daf16341b4ef6e321cf64f1be1e65242b7f2b32f534fa358b2a83f03" + sha256 cellar: :any_skip_relocation, big_sur: "c6da299c289b38ba1a7ae8fdf081adedb1460b94d15016b0d641ffe898afac35" + sha256 cellar: :any_skip_relocation, catalina: "3a3db921e9e82d0b87f24c5763980b6fec6e332fbb6ce4833b57e58aa8402f71" + sha256 cellar: :any_skip_relocation, mojave: "e372d1c35dbb73f11c6a826bd3bc5385f3376ebaa809972b8799a3c8483bcd09" + sha256 cellar: :any_skip_relocation, high_sierra: "7c2f3349ecf308bb53264577a1061714731126210996d17c2f7578c3bfc56056" + end + + depends_on "go" => :build + depends_on :macos + + conflicts_with "lunchy", because: "both install a `lunchy` binary" + + def install + ENV["GO111MODULE"] = "auto" + system "go", "build", *std_go_args + bin.install bin/"lunchy-go" => "lunchy" + end + + test do + plist = testpath/"Library/LaunchAgents/com.example.echo.plist" + plist.write <<~EOS + + + + + KeepAlive + + Label + com.example.echo + ProgramArguments + + /bin/cat + + RunAtLoad + + + + EOS + + assert_equal "com.example.echo\n", shell_output("#{bin}/lunchy list echo") + + system "launchctl", "load", plist + assert_equal <<~EOS, shell_output("#{bin}/lunchy remove com.example.echo") + removed #{plist} + EOS + + refute_path_exists plist + end +end diff --git a/Formula/l/lunchy.rb b/Formula/l/lunchy.rb new file mode 100644 index 0000000000000..f45efac51425c --- /dev/null +++ b/Formula/l/lunchy.rb @@ -0,0 +1,65 @@ +class Lunchy < Formula + desc "Friendly wrapper for launchctl" + homepage "https://github.com/eddiezane/lunchy" + url "https://github.com/eddiezane/lunchy.git", + tag: "v0.10.4", + revision: "c78e554b60e408449937893b3054338411af273f" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0c17a734e1506ea38877dc23b77d843b7975ab2502a459716c1252eb5569d2a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0c17a734e1506ea38877dc23b77d843b7975ab2502a459716c1252eb5569d2a4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0c17a734e1506ea38877dc23b77d843b7975ab2502a459716c1252eb5569d2a4" + sha256 cellar: :any_skip_relocation, sonoma: "185916bb389986bfc7c1e52fab8cd544590dd16860271c12a0665131c4d27314" + sha256 cellar: :any_skip_relocation, ventura: "185916bb389986bfc7c1e52fab8cd544590dd16860271c12a0665131c4d27314" + end + + depends_on :macos + + uses_from_macos "ruby" + + conflicts_with "lunchy-go", because: "both install a `lunchy` binary" + + def install + ENV["GEM_HOME"] = libexec + system "gem", "build", "lunchy.gemspec" + system "gem", "install", "lunchy-#{version}.gem" + bin.install libexec/"bin/lunchy" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + bash_completion.install "extras/lunchy-completion.bash" => "lunchy" + zsh_completion.install "extras/lunchy-completion.zsh" => "_lunchy" + end + + test do + plist = testpath/"Library/LaunchAgents/com.example.echo.plist" + plist.write <<~XML + + + + + KeepAlive + + Label + com.example.echo + ProgramArguments + + /bin/cat + + RunAtLoad + + + + XML + + assert_equal "com.example.echo\n", shell_output("#{bin}/lunchy list echo") + + system "launchctl", "load", plist + assert_equal <<~EOS, shell_output("#{bin}/lunchy uninstall com.example.echo") + stopped com.example.echo + uninstalled com.example.echo + EOS + + refute_path_exists plist + end +end diff --git a/Formula/l/lune.rb b/Formula/l/lune.rb new file mode 100644 index 0000000000000..17a4b47babb80 --- /dev/null +++ b/Formula/l/lune.rb @@ -0,0 +1,29 @@ +class Lune < Formula + desc "Standalone Luau script runtime" + homepage "https://lune-org.github.io/docs" + url "https://github.com/lune-org/lune/archive/refs/tags/v0.9.3.tar.gz" + sha256 "e3473cd9cbb0a6233fb96f230c0cbe4d19a2ced4bf833393957fa529c2c24b00" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c5b3d61c7ebbcb715bd7bf9a9632015a52fa09e0410d89975a84a7b89ac4678e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e72bdde48fa6b8ad6ffa7b6cf62689c2da86f25952d655e986d8ae8db80658d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1a7b8dc47047ab805fc37366edd7a5f14fd193fd78390d6763bf763ce83e1841" + sha256 cellar: :any_skip_relocation, sonoma: "1d6a98a73cd6346d95c9fd8ceb6cad2c23699a5ce2de7098210241ae28af8695" + sha256 cellar: :any_skip_relocation, ventura: "58e3d58db4d133fccba1fbd11c8d82c80bf4034a599de7c51529a60ac4e2bafc" + sha256 cellar: :any_skip_relocation, arm64_linux: "889879e810be625eb12d81b35185cb87c9fef6dd27074c004c8770f012c45fa1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02542d2394acfd0c723b91ad514bc9a97f20e77c3856bd057f8f28a4e6514452" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", "--all-features", *std_cargo_args(path: "crates/lune") + end + + test do + (testpath/"test.lua").write("print(2 + 2)") + assert_equal "4", shell_output("#{bin}/lune run test.lua").chomp + end +end diff --git a/Formula/l/lunzip.rb b/Formula/l/lunzip.rb new file mode 100644 index 0000000000000..32eb8890f0383 --- /dev/null +++ b/Formula/l/lunzip.rb @@ -0,0 +1,43 @@ +class Lunzip < Formula + desc "Decompressor for lzip files" + homepage "https://www.nongnu.org/lzip/lunzip.html" + url "https://download-mirror.savannah.gnu.org/releases/lzip/lunzip/lunzip-1.15.tar.gz" + sha256 "fdb930b87672a238a54c4b86d63df1c86038ff577d512adbc8e2c754c046d8f2" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/lzip/lunzip/" + regex(/href=.*?lunzip[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d2485e72af992bc5c7b2cdb9be3383c1aeb9bde5f07f35e17964d8ba962ee5f9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1f3c9cc0617cdea5815738623129348ae40566793c31c1d9d2788f43f32eb5a6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f061dbeb231b41011d5c925239ec0679c7456eb9242bab6155c55553930bd7b8" + sha256 cellar: :any_skip_relocation, sonoma: "71198791087ef6380858c64097848d8f9d8860e65fd6fbab3fa1c45e018f39b4" + sha256 cellar: :any_skip_relocation, ventura: "1a41f6efcd7b83a0ee333075ab595c66eabd0e7228ee2fdd3629d34e1d474d74" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c3ce13001ea04a7c88a7611cb9f2447bd2cbfa654cef5382a461b42538d0218" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33207f9159131abd7656dc1f657bca8a18b90853a83f32506fa82996296d265a" + end + + depends_on "lzip" => :test + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + path = testpath/"data.txt" + original_contents = "." * 1000 + path.write original_contents + + # compress: data.txt -> data.txt.lz + system Formula["lzip"].opt_bin/"lzip", path + refute_path_exists path + + # decompress: data.txt.lz -> data.txt + system bin/"lunzip", "#{path}.lz" + assert_equal original_contents, path.read + end +end diff --git a/Formula/l/lutok.rb b/Formula/l/lutok.rb new file mode 100644 index 0000000000000..3723dbcaacbf5 --- /dev/null +++ b/Formula/l/lutok.rb @@ -0,0 +1,63 @@ +class Lutok < Formula + desc "Lightweight C++ API for Lua" + homepage "https://github.com/freebsd/lutok" + url "https://github.com/freebsd/lutok/releases/download/lutok-0.6.1/lutok-0.6.1.tar.gz" + sha256 "509c43c240ba47b8c452b45f3423a416fa91bdfc0341bfb806e0b78f65ce452d" + license "BSD-3-Clause" + + # 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_sequoia: "622214005100c49c8927563ebc9643a45ca09e6c2a046a3423f90536bf5c4fd8" + sha256 cellar: :any, arm64_sonoma: "512239a68c9a297b3058e6218407cc08e3b893255afa64e1e6227ad7d7c54bf5" + sha256 cellar: :any, arm64_ventura: "4c01cfb8ed37128e7ff3319734958694600672c2885a9145f0199ba80f15c418" + sha256 cellar: :any, sonoma: "5c6514ff4cddd77e9a5899ee67d7639ed0df16fcd40799f4b5a864996fc22be5" + sha256 cellar: :any, ventura: "6cad6e4dd588227c1cba484e7b3eee3deb60350a50fa7a536359f95a9c804c53" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5bd35200c2438896dac87fd370af4be0a5f2fee03c23c6659f427523128f048" + sha256 cellar: :any_skip_relocation, x86_64_linux: "398180c13b8203f6004840922d92ef7d7d1893f7d3f5874580132089083cf5f3" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "atf" + depends_on "lua" + + def install + system "glibtoolize", "--force", "--install" + system "autoreconf", "--force", "--install", "--verbose" + + system "./configure", "--disable-silent-rules", "--enable-atf", *std_configure_args + system "make" + ENV.deparallelize + system "make", "check" + system "make", "install" + system "make", "installcheck" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + lutok::state lua; + lua.open_base(); + lua.load_string("print('Hello from Lua')"); + lua.pcall(0, 0, 0); + return 0; + } + CPP + + flags = shell_output("pkgconf --cflags --libs lutok").chomp.split + system ENV.cxx, "test.cpp", "-std=c++11", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/l/luv.rb b/Formula/l/luv.rb new file mode 100644 index 0000000000000..2978008ebfcd4 --- /dev/null +++ b/Formula/l/luv.rb @@ -0,0 +1,76 @@ +class Luv < Formula + desc "Bare libuv bindings for lua" + homepage "https://github.com/luvit/luv" + url "https://github.com/luvit/luv/archive/refs/tags/1.51.0-0.tar.gz" + sha256 "61f49840c067a8dec288dc841ea5cc20e81852d295068805c4ca1d744c82da7d" + license "Apache-2.0" + head "https://github.com/luvit/luv.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "645494821fe3ea9437886f9fae19acb1aecaa12e4de44188ca412e5699723c03" + sha256 cellar: :any, arm64_sonoma: "f7712722a40fb8b61d679db25c253c2a85f75dda7aa468d1896f66efb56b2b15" + sha256 cellar: :any, arm64_ventura: "ae484b1ae8dc52607dec941d0a7bd400f5f7690f9711eeca1d8faeca786522d9" + sha256 cellar: :any, sonoma: "cdfb1618a657456b48619a0b2a16021b819bf8254fe1347a45c1f90e11e75d4b" + sha256 cellar: :any, ventura: "dec71cd096c782dbf401af937315c0d77c1bb88c7803c94bcad51d3db358ae43" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f2c03a600a7c1b36ef5fa75aed8ec902b3b7ccba2d985bb3258344a6e8455dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d770b219ac23b64adca73fc1fbc68543f03c88d0c5b6edd7f12865a718cb2a4" + end + + depends_on "cmake" => :build + depends_on "lua" => [:build, :test] + depends_on "luajit" => [:build, :test] + depends_on "libuv" + + resource "lua-compat-5.3" do + url "https://github.com/lunarmodules/lua-compat-5.3/archive/refs/tags/v0.14.4.tar.gz" + sha256 "a9afa2eb812996039a05c5101067e6a31af9a75eded998937a1ce814afe1b150" + end + + def install + resource("lua-compat-5.3").stage buildpath/"deps/lua-compat-5.3" unless build.head? + + args = %W[ + -DWITH_SHARED_LIBUV=ON + -DLUA_BUILD_TYPE=System + -DLUA_COMPAT53_DIR=#{buildpath}/deps/lua-compat-5.3 + -DBUILD_MODULE=ON + ] + + system "cmake", "-S", ".", "-B", "buildjit", + "-DWITH_LUA_ENGINE=LuaJIT", + "-DBUILD_STATIC_LIBS=ON", + "-DBUILD_SHARED_LIBS=ON", + *args, *std_cmake_args + system "cmake", "--build", "buildjit" + system "cmake", "--install", "buildjit" + + system "cmake", "-S", ".", "-B", "buildlua", + "-DWITH_LUA_ENGINE=Lua", + "-DBUILD_STATIC_LIBS=OFF", + "-DBUILD_SHARED_LIBS=OFF", + *args, *std_cmake_args + system "cmake", "--build", "buildlua" + system "cmake", "--install", "buildlua" + end + + test do + (testpath/"test.lua").write <<~LUA + local uv = require('luv') + local timer = uv.new_timer() + timer:start(1000, 0, function() + print("Awake!") + timer:close() + end) + print("Sleeping"); + uv.run() + LUA + + expected = <<~EOS + Sleeping + Awake! + EOS + + assert_equal expected, shell_output("luajit test.lua") + assert_equal expected, shell_output("lua test.lua") + end +end diff --git a/Formula/l/luvit.rb b/Formula/l/luvit.rb new file mode 100644 index 0000000000000..1191e39980632 --- /dev/null +++ b/Formula/l/luvit.rb @@ -0,0 +1,152 @@ +class Luvit < Formula + desc "Asynchronous I/O for Lua" + homepage "https://luvit.io/" + url "https://github.com/luvit/luvit/archive/refs/tags/2.18.1.tar.gz" + sha256 "b792781d77028edb7e5761e96618c96162bd68747b8fced9a6fc52f123837c2c" + license "Apache-2.0" + revision 2 + head "https://github.com/luvit/luvit.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "f004efa20e48708ea7d0a1ea8bfa25bbe3d799ee20984e44f961021364d1dd92" + sha256 cellar: :any, arm64_sonoma: "cb68897cf4876b88d1d6f4145fc9ede06ef04f4b882c7eff6a9ca8a10e0eb668" + sha256 cellar: :any, arm64_ventura: "7cd6942821d45baa652c413d10d4ad521828d0a86ee581f0f72ff06098491c27" + sha256 cellar: :any, sonoma: "6f261a667091381e962a5ff45a4080328c111bfe5883ec9d988b08b4eefaa8e5" + sha256 cellar: :any, ventura: "c18b8fc2393a68b9b37f5ad5676fd619cca659348fb16938574a0a3b2731ce91" + sha256 cellar: :any_skip_relocation, x86_64_linux: "39109c056556f13c412c554fd1b421812b32e6d2bd01c4e103d71188612c21e9" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libuv" + depends_on "luajit" + # TODO: depends_on "luv" + depends_on "openssl@3" + depends_on "pcre" + + conflicts_with "lit", because: "both install `lit` binaries" + + # To update this resource, check LIT_VERSION in the Makefile: + # https://github.com/luvit/luvit/blob/#{version}/Makefile + resource "lit" do + url "https://github.com/luvit/lit.git", + tag: "3.8.5", + revision: "84fc5d729f1088b3b93bc9a55d1f7a245bca861d" + + livecheck do + url "https://raw.githubusercontent.com/luvit/luvit/#{LATEST_VERSION}/Makefile" + regex(/LIT_VERSION=["']?(\d+(?:\.\d+)+)["']?$/i) + end + end + + # To update this resource, check LUVI_VERSION in + # https://github.com/luvit/lit/raw/$(LIT_VERSION)/get-lit.sh + resource "luvi" do + url "https://github.com/luvit/luvi.git", + tag: "v2.12.0", + revision: "5d1052f11e813ff9edc3ec75b5282b3e6cb0f3bf" + + livecheck do + url "https://raw.githubusercontent.com/luvit/luvit/#{LATEST_VERSION}/Makefile" + regex(/LIT_VERSION=["']?(\d+(?:\.\d+)+)["']?$/i) + strategy :page_match do |page, regex| + lit_version = page[regex, 1] + next if lit_version.blank? + + get_lit_page = Homebrew::Livecheck::Strategy.page_content( + "https://raw.githubusercontent.com/luvit/lit/#{lit_version}/get-lit.sh", + ) + next if get_lit_page[:content].blank? + + get_lit_page[:content][/LUVI_VERSION:-v?(\d+(?:\.\d+)+)/i, 1] + end + end + + # Remove outdated linker flags that break the ARM build. + # https://github.com/luvit/luvi/pull/261 + patch do + url "https://github.com/luvit/luvi/commit/b2e501deb407c44a9a3e7f4d8e4b5dc500e7a196.patch?full_index=1" + sha256 "be3315f7cf8a9e43f1db39d0ef55698f09e871bea0f508774d0135c6375f4291" + end + end + + # Needed for OpenSSL 3 support. Remove when the `luvi` + # resource has a new enough version as a submodule. + resource "lua-openssl" do + url "https://github.com/zhaozg/lua-openssl/releases/download/0.8.3-1/openssl-0.8.3-1.tar.gz" + sha256 "d8c50601cb0a04e2dfbd8d8e57f4cf16a4fe59bdca8036deb8bc26f700f2eb8c" + end + + def install + if DevelopmentTools.clang_build_version >= 1500 + # Work around build error in current `lua-openssl` resource with newer Clang + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" + # Use ld_classic to work around 'ld: multiple errors: LINKEDIT overlap of start of + # LINKEDIT and symbol table in '.../jitted_tmp/src/lua/luvibundle.lua_luvi_generated.o' + ENV.append "LDFLAGS", "-Wl,-ld_classic" + end + + ENV["PREFIX"] = prefix + luajit = Formula["luajit"] + + resource("luvi").stage do + # Build scripts set LUA_PATH before invoking LuaJIT, but that causes errors. + # Reported at https://github.com/luvit/luvi/issues/242 + inreplace "cmake/Modules/LuaJITAddExecutable.cmake", + "COMMAND \"LUA_PATH=${LUA_PATH}\" luajit", "COMMAND luajit" + + # Build scripts double the prefix of this directory, so we set it manually. + # Reported in the issue linked above. + ENV["LPEGLIB_DIR"] = "deps/lpeg" + + rm_r "deps/lua-openssl" + Pathname("deps/lua-openssl").install resource("lua-openssl") + + # Build the bundled `luv` as `luvi` is not compatible with newer version. + # We cannot use `-DWithSharedLibluv=OFF` as it will bundle `luajit` too. + # TODO: Restore brew `luv` once support is available + system "cmake", "-S", "deps/luv", "-B", "build_luv", + "-DBUILD_MODULE=ON", + "-DBUILD_SHARED_LIBS=ON", + "-DBUILD_STATIC_LIBS=OFF", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DLUA_BUILD_TYPE=System", + "-DWITH_LUA_ENGINE=LuaJIT", + "-DWITH_SHARED_LIBUV=ON", + *std_cmake_args(install_prefix: libexec) + system "cmake", "--build", "build_luv" + system "cmake", "--install", "build_luv" + + # CMake flags adapted from + # https://github.com/luvit/luvi/blob/#{luvi_version}/Makefile#L73-L74 + luvi_args = %W[ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DWithOpenSSL=ON + -DWithSharedOpenSSL=ON + -DWithPCRE=ON + -DWithLPEG=ON + -DWithSharedPCRE=ON + -DWithSharedLibluv=ON + -DLIBLUV_INCLUDE_DIR=#{libexec}/include/luv + -DLIBLUV_LIBRARIES=#{libexec}/lib/#{shared_library("libluv")} + -DLUAJIT_INCLUDE_DIR=#{luajit.opt_include}/luajit-2.1 + -DLUAJIT_LIBRARIES=#{luajit.opt_lib/shared_library("libluajit")} + ] + + system "cmake", "-S", ".", "-B", "build", *luvi_args, *std_cmake_args + system "cmake", "--build", "build" + buildpath.install "build/luvi" + end + + resource("lit").stage do + system buildpath/"luvi", ".", "--", "make", ".", buildpath/"lit", buildpath/"luvi" + end + + system "make", "install" + end + + test do + assert_equal "Hello World\n", shell_output("#{bin}/luvit -e 'print(\"Hello World\")'") + end +end diff --git a/Formula/l/lux.rb b/Formula/l/lux.rb new file mode 100644 index 0000000000000..203844d48f79e --- /dev/null +++ b/Formula/l/lux.rb @@ -0,0 +1,34 @@ +class Lux < Formula + desc "Fast and simple video downloader" + homepage "https://github.com/iawia002/lux" + url "https://github.com/iawia002/lux/archive/refs/tags/v0.24.1.tar.gz" + sha256 "69d4fe58c588cc6957b8682795210cd8154170ac51af83520c6b1334901c6d3d" + license "MIT" + head "https://github.com/iawia002/lux.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "098c398f3aab12f2479004b768757b98ec66c4473c392345b0bc5b5b37c690b7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ec6c1ee606e93f2a6d69f052926d6646ea9b3d55b818392ce48b60bcbd2b5464" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7efda3117e78deb37e8131758ebaac2ad7956ee9f874703baa273416d9854763" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ca4e5eb68eb6190a9121273861c7e54224ad8845854b3e28a57d775fc5ee5f70" + sha256 cellar: :any_skip_relocation, sonoma: "9d09d3f7176d099619dd6f5578c65af77e9e74a0604cc248f879959c204136a8" + sha256 cellar: :any_skip_relocation, ventura: "06dac67a49a44e204415365d22dec09363c2ad4247fc8e787791960ad25da706" + sha256 cellar: :any_skip_relocation, monterey: "3293e792b745857668443f88fdbd7cbb50f599e2c5720da0419a0765e897e049" + sha256 cellar: :any_skip_relocation, x86_64_linux: "52fd63821ac62400e3c1a1ade593edd328d4f6136d44a21309fd9d188120c115" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/iawia002/lux/app.version=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + system bin/"lux", "-i", "https://upload.wikimedia.org/wikipedia/commons/c/c2/GitHub_Invertocat_Logo.svg" + end +end diff --git a/Formula/l/lv.rb b/Formula/l/lv.rb new file mode 100644 index 0000000000000..d77d1788fd731 --- /dev/null +++ b/Formula/l/lv.rb @@ -0,0 +1,46 @@ +class Lv < Formula + desc "Powerful multi-lingual file viewer/grep" + # The upstream homepage was "https://web.archive.org/web/20160310122517/www.ff.iij4u.or.jp/~nrt/lv/" + homepage "https://salsa.debian.org/debian/lv" + url "https://salsa.debian.org/debian/lv/-/archive/debian/4.51-10/lv-debian-4.51-10.tar.gz" + sha256 "c935150583df6f2cea596fdd116d82ec634d96e99f2f7e4dc5b7b1a6f638aba1" + license "GPL-2.0-or-later" + head "https://salsa.debian.org/debian/lv.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "d8fff4f49ad72ed22fe3b335d3a780a6ecc7e97d14e49d9a0cfdb459ab40fc77" + sha256 arm64_sonoma: "103c91e238509bcb1862409cb3483b12311309b98dc0bccd3cdb485866ca6d73" + sha256 arm64_ventura: "aa3867a4900aedf77e796f681676e22fc595dcaa8fb6fb9d20cdecd25f688c0c" + sha256 sonoma: "1d572a28261e7bb59a07d707ce3f28299d297442c09c90735196a08525db2c01" + sha256 ventura: "f737ea5ead2f1e11e7e2830e5acb65c2e2228775298dc855d30c4072cdafe83c" + sha256 arm64_linux: "192fa6eb2d9d0076d20e695110731f03e55633592e090db713ec81a81f2296e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "46f6669252eb821a07cd2648d0356449e22906673c9abbbbd8c604c98a827b27" + end + + uses_from_macos "ncurses" + + on_linux do + depends_on "gzip" + end + + def install + File.read("debian/patches/series").each_line do |line| + line.chomp! + system "patch", "-p1", "-i", "debian/patches/"+line + end + + cd "build" do + system "../src/configure", "--prefix=#{prefix}" + system "make" + bin.install "lv" + bin.install_symlink "lv" => "lgrep" + end + + man1.install "lv.1" + (lib+"lv").install "lv.hlp" + end + + test do + system bin/"lv", "-V" + end +end diff --git a/Formula/l/lv2.rb b/Formula/l/lv2.rb new file mode 100644 index 0000000000000..478f4a44a1b3d --- /dev/null +++ b/Formula/l/lv2.rb @@ -0,0 +1,37 @@ +class Lv2 < Formula + desc "Portable plugin standard for audio systems" + homepage "https://lv2plug.in/" + url "https://lv2plug.in/spec/lv2-1.18.10.tar.xz" + sha256 "78c51bcf21b54e58bb6329accbb4dae03b2ed79b520f9a01e734bd9de530953f" + license any_of: ["0BSD", "ISC"] + head "https://gitlab.com/lv2/lv2.git", branch: "master" + + livecheck do + url "https://lv2plug.in/spec/" + regex(/href=.*?lv2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "25dce655720f7e01dee8e5b7db09049d887a4a0633ffac40a5333eec39283ce8" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + def install + system "meson", "setup", "build", "-Dplugins=disabled", "-Dlv2dir=#{lib}/lv2", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + (pkgshare/"example").install "plugins/eg-amp.lv2/amp.c" + end + + test do + # Try building a simple lv2 plugin + dynamic_flag = OS.mac? ? "-dynamiclib" : "-shared" + system ENV.cc, pkgshare/"example/amp.c", "-I#{include}", + "-DEG_AMP_LV2_VERSION=1.0.0", "-DHAVE_LV2=1", "-fPIC", dynamic_flag, + "-o", shared_library("amp") + end +end diff --git a/Formula/l/lwtools.rb b/Formula/l/lwtools.rb new file mode 100644 index 0000000000000..00b7462718fcb --- /dev/null +++ b/Formula/l/lwtools.rb @@ -0,0 +1,45 @@ +class Lwtools < Formula + desc "Cross-development tools for Motorola 6809 and Hitachi 6309" + homepage "http://www.lwtools.ca/" + url "http://www.lwtools.ca/releases/lwtools/lwtools-4.24.tar.gz" + sha256 "e18c01841be3b149b79df38a67b59c51247ec40df0740b972eb724a3a3c72869" + license "GPL-3.0-only" + + livecheck do + url "http://www.lwtools.ca/releases/lwtools/" + regex(/href=.*?lwtools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2c535cbdfccc0f0d70af61a64eaed21800db4c8874ad4749d4a5de66fffc0cc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "df2d82ee525776c58d4ce6a558472296880e4e188705913b14f30df5f7d9fc3d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a095d8215eff8b61b2695ec8bbc9abe05f0eec83760a84ca89a5fafcc9f46ab5" + sha256 cellar: :any_skip_relocation, sonoma: "2ccfad0b580bd6f209e0b7a30c9dcd79f97af82736eff0fd746da510e567aa14" + sha256 cellar: :any_skip_relocation, ventura: "5e82da67fdba591dd1f30154d20cf56af219a6c8b28ad061f508c795c8b9f33e" + sha256 cellar: :any_skip_relocation, arm64_linux: "0928f64aa46c2c2ef89c78918d2c0c6512a76156109fdaa49dbd2cf0ebd7b249" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ae555d8339dd78feb3172793c8d69442c77297217b867a4e87fd6c40260f79c" + end + + def install + system "make" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + # lwasm + (testpath/"foo.asm").write " SECTION foo\n stb $1234,x\n" + system bin/"lwasm", "--obj", "--output=foo.obj", "foo.asm" + + # lwlink + system bin/"lwlink", "--format=raw", "--output=foo.bin", "foo.obj" + code = File.open("foo.bin", "rb") { |f| f.read.unpack("C*") } + assert_equal [0xe7, 0x89, 0x12, 0x34], code + + # lwobjdump + assert_match(/^SECTION foo/, shell_output("#{bin}/lwobjdump foo.obj")) + + # lwar + system bin/"lwar", "--create", "foo.lwa", "foo.obj" + assert_match(/^foo.obj/, shell_output("#{bin}/lwar --list foo.lwa")) + end +end diff --git a/Formula/l/lxc.rb b/Formula/l/lxc.rb new file mode 100644 index 0000000000000..38a83eeeda23e --- /dev/null +++ b/Formula/l/lxc.rb @@ -0,0 +1,33 @@ +class Lxc < Formula + desc "CLI client for interacting with LXD" + homepage "https://ubuntu.com/lxd" + url "https://github.com/canonical/lxd/releases/download/lxd-6.3/lxd-6.3.tar.gz" + sha256 "68b379e94884f859fbfe078e4c0a46322ffd6f23209fa0b28d936676e7eada4d" + license "AGPL-3.0-only" + head "https://github.com/canonical/lxd.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e959fd595d3b3a797f4eeb8bf8f4407bd2df3fb268fb638cc8db154c9c9a6127" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e959fd595d3b3a797f4eeb8bf8f4407bd2df3fb268fb638cc8db154c9c9a6127" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e959fd595d3b3a797f4eeb8bf8f4407bd2df3fb268fb638cc8db154c9c9a6127" + sha256 cellar: :any_skip_relocation, sonoma: "53c3fb571b80c2fb5b093bc32ed2502631f65cd0cab1ba1bf2b1917ae6163e3d" + sha256 cellar: :any_skip_relocation, ventura: "53c3fb571b80c2fb5b093bc32ed2502631f65cd0cab1ba1bf2b1917ae6163e3d" + sha256 cellar: :any_skip_relocation, arm64_linux: "68b507578c65c458e8fd003351ed5027c867ae978067f41ec0a2b34b3f2451c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da7dc438ebb5bb7d3941f69c550f92a689f64ec460db812871d619fd11a05e4c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./lxc" + + generate_completions_from_executable(bin/"lxc", "completion") + end + + test do + output = JSON.parse(shell_output("#{bin}/lxc remote list --format json")) + assert_equal "https://cloud-images.ubuntu.com/releases/", output["ubuntu"]["Addr"] + + assert_match version.to_s, shell_output("#{bin}/lxc --version") + end +end diff --git a/Formula/l/lxi-tools.rb b/Formula/l/lxi-tools.rb new file mode 100644 index 0000000000000..623d23ad51de7 --- /dev/null +++ b/Formula/l/lxi-tools.rb @@ -0,0 +1,55 @@ +class LxiTools < Formula + desc "Open source tools for managing network attached LXI compatible instruments" + homepage "https://github.com/lxi-tools/lxi-tools" + url "https://github.com/lxi-tools/lxi-tools/archive/refs/tags/v2.8.tar.gz" + sha256 "ef9d013189c9449f850d467dd35ac3840929e76a888cdb77e0edbce067da0b2d" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "be6069943c2ea42d4bbe08093d302097c6b845daf5715a3c48fe53fc6af9d613" + sha256 cellar: :any, arm64_sonoma: "aa7dcfd5abb6be73394e6de4e178852da17b4d77c9e2ac92e0526e166f8aa146" + sha256 cellar: :any, arm64_ventura: "2d6da719bc67d07ecaa3c90eba4adfb710287f1a658dc6f430c7218ca47a5cfe" + sha256 cellar: :any, sonoma: "2072bc9693447a72bf3fa53f4b7fe44e1eaae6d86c7f451b51005a5613b20182" + sha256 cellar: :any, ventura: "1007e5d715fa7d3dd46a13354eb0403e21de7062914650da8ebd4b0d58011678" + sha256 arm64_linux: "339c24ce23a508409b7ecf4a42e7581742e9b4a12be98dadc33efc7ce5a26070" + sha256 x86_64_linux: "ec4ad53dd83db6db87bae92862f289e2e098aabaf94a2c1f056562e9b8b6293f" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "desktop-file-utils" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk4" + depends_on "gtksourceview5" + depends_on "hicolor-icon-theme" + depends_on "json-glib" + depends_on "libadwaita" + depends_on "liblxi" + depends_on "lua" + depends_on "readline" + + 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["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" + system Formula["desktop-file-utils"].opt_bin/"update-desktop-database", HOMEBREW_PREFIX/"share/applications" + end + + test do + assert_match "Error: Missing address", shell_output("#{bin}/lxi screenshot 2>&1", 1) + end +end diff --git a/Formula/l/lxsplit.rb b/Formula/l/lxsplit.rb new file mode 100644 index 0000000000000..4514e57fe8995 --- /dev/null +++ b/Formula/l/lxsplit.rb @@ -0,0 +1,33 @@ +class Lxsplit < Formula + desc "Tool for splitting or joining files" + homepage "https://lxsplit.sourceforge.net/" + url "https://downloads.sourceforge.net/project/lxsplit/lxsplit/0.2.4/lxsplit-0.2.4.tar.gz" + sha256 "858fa939803b2eba97ccc5ec57011c4f4b613ff299abbdc51e2f921016845056" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "af8c07cc79161f9f81048ef1dadeff7098887526cf5e178ae9d80383d2a2fa53" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cc985c81d249f7a8c5f38060e5e6e8c36bdb3a0aaa7c668fe44f18b587e4efcd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4428d45c02da1ebb867b6319a97c9f6be29ee09cca1ad88f17c744427d864919" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ab46abecb79808403233fab3047c75f0ca630b4925d8c704a7bf087ef9ddc671" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7a37c06c81b1160f5fee4c742537310afe07cccac1251384739f4340189ec4a2" + sha256 cellar: :any_skip_relocation, sonoma: "9a4e4db3c7ba11af86422226f11e4d373e6c8e2a1b24831bcaca5910b1026f26" + sha256 cellar: :any_skip_relocation, ventura: "cc04acafa5e324481217f2ca6356f87e29418a169ba28042173be4650b8ee3af" + sha256 cellar: :any_skip_relocation, monterey: "5f89046f6987581afc236ac944ab9585136160a6f8f5d7f559a4fd18e45f43d4" + sha256 cellar: :any_skip_relocation, big_sur: "6fc68ea7f529c0d6d5a5efb98f9644c93cfb6472798e1686a4384be56381bfcd" + sha256 cellar: :any_skip_relocation, catalina: "8f2c02d85a1aec1e2ec692564896c668cb6d7c4cd28b0d3b1f08da1be7070b07" + sha256 cellar: :any_skip_relocation, mojave: "ffc9b9b7e9669e1cff8a46b3930d052ffa149179897134439b1228d8ee178777" + sha256 cellar: :any_skip_relocation, high_sierra: "da1b73f5843b77ce947ce546fb77a47f2c1b989efbf70fdd61b9d05f81a386b5" + sha256 cellar: :any_skip_relocation, sierra: "f4d271c94546ca73b9e5262ff53bf7b51dcde2a83998d5a2e4b663109f2f69d8" + sha256 cellar: :any_skip_relocation, el_capitan: "25699d54183a01f446015fb02521a50b3967ef2d250e56bb1fe3fd0a5aaec2e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "25abf3d459e971588c1d58365ca4afdb710abd0a26a1dcdbb8470205e2d5bf9e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5be1da254e8200601318c6258e63e4052dea5d43446d10872f8aab55e83abd4b" + end + + def install + bin.mkpath + inreplace "Makefile", "/usr/local/bin", bin + system "make" + system "make", "install" + end +end diff --git a/Formula/l/ly.rb b/Formula/l/ly.rb new file mode 100644 index 0000000000000..22f10e5cb3742 --- /dev/null +++ b/Formula/l/ly.rb @@ -0,0 +1,29 @@ +class Ly < Formula + desc "Parse, manipulate or create documents in LilyPond format" + homepage "https://github.com/frescobaldi/python-ly" + url "https://files.pythonhosted.org/packages/b6/25/d82a762b4c8f068303259f9555fe6f8725f930318a64679a6bb9ffdf21c8/python_ly-0.9.9.tar.gz" + sha256 "cf1780fe53d367efc1f2642cb77c57246106ea7517f8c2d1126f0a36ee26567a" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "9a28dcdb3270423db13b9b8eb52ef1b65beffa23cd684672e6ebfa8b992cd413" + end + + 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 + (testpath/"test.ly").write "\\relative { c' d e f g a b c }" + output = shell_output("#{bin}/ly 'transpose c d' #{testpath}/test.ly") + assert_equal "\\relative { d' e fis g a b cis d }", output + + system python3, "-c", "import ly" + end +end diff --git a/Formula/l/lychee.rb b/Formula/l/lychee.rb new file mode 100644 index 0000000000000..1ef5d789a171a --- /dev/null +++ b/Formula/l/lychee.rb @@ -0,0 +1,35 @@ +class Lychee < Formula + desc "Fast, async, resource-friendly link checker" + homepage "https://lychee.cli.rs/" + url "https://github.com/lycheeverse/lychee/archive/refs/tags/lychee-v0.18.1.tar.gz" + sha256 "f04f4cd3dc2ac190a5d28134362e9ea44409013ab372086dbe2c73792dc4b462" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/lycheeverse/lychee.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "cca5846ef8febbb417f1fcb9cd1d28dd43c1cefb2a565eaa791d2219a9bef958" + sha256 cellar: :any, arm64_sonoma: "39793095082c16fe8e10a056f059ab0a4e8859cc9c65c9db3f79fc8bddc4f149" + sha256 cellar: :any, arm64_ventura: "94c85e54bdd71f1764c33c11a6ee4b9b19bba527bf59492e932aae02868a285d" + sha256 cellar: :any, sonoma: "fb140a3ad491c505eefb9ce6b077d86b489cf6f1bc9d409aaf1a589a88d743b7" + sha256 cellar: :any, ventura: "7a13344d2c35163a49407c26ba58e3c740b4c0951711c11e375d15407fc26a23" + sha256 cellar: :any_skip_relocation, arm64_linux: "b21cc1f26204144b8b40601878203f137b906eb561db96d52067862c2558935f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0e41b80889f77ca79c1865b7cd8f9d588d4f9d2954fd3da559f6a982dc87e60" + end + + depends_on "rust" => :build + depends_on "openssl@3" + + on_linux do + depends_on "pkgconf" => :build + end + + def install + system "cargo", "install", *std_cargo_args(path: "lychee-bin") + end + + test do + (testpath/"test.md").write "[This](https://example.com) is an example.\n" + output = shell_output(bin/"lychee #{testpath}/test.md") + assert_match "🔍 1 Total (in 0s) ✅ 0 OK 🚫 0 Errors 👻 1 Excluded", output + end +end diff --git a/Formula/l/lynis.rb b/Formula/l/lynis.rb new file mode 100644 index 0000000000000..7eb0a2c2a3eaa --- /dev/null +++ b/Formula/l/lynis.rb @@ -0,0 +1,45 @@ +class Lynis < Formula + desc "Security and system auditing tool to harden systems" + homepage "https://cisofy.com/lynis/" + url "https://github.com/CISOfy/lynis/archive/refs/tags/3.1.4.tar.gz" + sha256 "db00e26cfb1e04ca70af48d106c3e2968eb468adbef17a2ab18b0028a3d1e3b7" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "448e2184da51869bdca5a42fec0e7852206a7fad0d80aa787dc4041576c571cc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "448e2184da51869bdca5a42fec0e7852206a7fad0d80aa787dc4041576c571cc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "448e2184da51869bdca5a42fec0e7852206a7fad0d80aa787dc4041576c571cc" + sha256 cellar: :any_skip_relocation, sonoma: "4c0cbf50ffba77355d533005be8ba0facafe499df94991533979643431ed8028" + sha256 cellar: :any_skip_relocation, ventura: "4c0cbf50ffba77355d533005be8ba0facafe499df94991533979643431ed8028" + sha256 cellar: :any_skip_relocation, arm64_linux: "448e2184da51869bdca5a42fec0e7852206a7fad0d80aa787dc4041576c571cc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "448e2184da51869bdca5a42fec0e7852206a7fad0d80aa787dc4041576c571cc" + end + + def install + inreplace "lynis" do |s| + s.gsub! 'tINCLUDE_TARGETS="/usr/local/include/lynis ' \ + '/usr/local/lynis/include /usr/share/lynis/include ./include"', + %Q(tINCLUDE_TARGETS="#{include}") + s.gsub! 'tPLUGIN_TARGETS="/usr/local/lynis/plugins ' \ + "/usr/local/share/lynis/plugins /usr/share/lynis/plugins " \ + '/etc/lynis/plugins ./plugins"', + %Q(tPLUGIN_TARGETS="#{prefix}/plugins") + s.gsub! 'tDB_TARGETS="/usr/local/share/lynis/db /usr/local/lynis/db ' \ + '/usr/share/lynis/db ./db"', + %Q(tDB_TARGETS="#{prefix}/db") + end + inreplace "include/functions" do |s| + s.gsub! 'tPROFILE_TARGETS="/usr/local/etc/lynis /etc/lynis ' \ + '/usr/local/lynis ."', + %Q(tPROFILE_TARGETS="#{prefix}") + end + + prefix.install "db", "include", "plugins", "default.prf" + bin.install "lynis" + man8.install "lynis.8" + end + + test do + assert_match "lynis", shell_output("#{bin}/lynis --invalid 2>&1", 64) + end +end diff --git a/Formula/l/lynx.rb b/Formula/l/lynx.rb new file mode 100644 index 0000000000000..a3538908e14de --- /dev/null +++ b/Formula/l/lynx.rb @@ -0,0 +1,55 @@ +class Lynx < Formula + desc "Text-based web browser" + homepage "https://invisible-island.net/lynx/" + url "https://invisible-mirror.net/archives/lynx/tarballs/lynx2.9.2.tar.bz2" + mirror "https://fossies.org/linux/www/lynx2.9.2.tar.bz2" + sha256 "7374b89936d991669e101f4e97f2c9592036e1e8cdaa7bafc259a77ab6fb07ce" + license "GPL-2.0-only" + + livecheck do + url "https://invisible-mirror.net/archives/lynx/tarballs/?C=M&O=D" + regex(/href=.*?lynx[._-]?v?(\d+(?:\.\d+)+(?:rel\.?\d+)?)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "d19f769a462343c54bade40fe15b7a3a6ea52a927dd1e3494ea1b2301fe63b81" + sha256 arm64_sonoma: "4bf5b522776f2578692e8a19f113007fd9849131731782e9b681a6317103b945" + sha256 arm64_ventura: "20953b360eb23fd1ef4b7a7ee5f3b846e01d7d6c1190280aabf202d68245a46e" + sha256 sonoma: "37094ec003457ab4fed45872f08bd9452331c57421c46c7fe2e59c494ef7f936" + sha256 ventura: "f54a50e56b2b754653afdffde634524b10bc607fc5f6f24d8b4c1cd417fbd48d" + sha256 arm64_linux: "f31950d24b91885f8887fe341be40af6f9fd33ec2ffab1f3c41def4ec48cbab9" + sha256 x86_64_linux: "2d30e3d55c3916b4a3c488034680170553d4ef090e717cf74d6782348115cdd6" + end + + # Move to brew ncurses to fix screen related bugs + depends_on "ncurses" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + # Using --with-screen=ncurses to due to behaviour change in Big Sur + # https://github.com/Homebrew/homebrew-core/pull/58019 + + system "./configure", *std_configure_args, + "--mandir=#{man}", + "--disable-echo", + "--enable-default-colors", + "--with-zlib", + "--with-bzlib", + "--with-ssl=#{Formula["openssl@3"].opt_prefix}", + "--enable-ipv6", + "--with-screen=ncurses", + "--with-curses-dir=#{Formula["ncurses"].opt_prefix}", + "--enable-externs", + "--disable-config-info" + system "make", "install" + end + + test do + system bin/"lynx", "-dump", "https://example.org/" + end +end diff --git a/Formula/l/lz4.rb b/Formula/l/lz4.rb new file mode 100644 index 0000000000000..f7ad2e3b079b0 --- /dev/null +++ b/Formula/l/lz4.rb @@ -0,0 +1,44 @@ +class Lz4 < Formula + desc "Extremely Fast Compression algorithm" + homepage "https://lz4.github.io/lz4/" + url "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz" + mirror "http://fresh-center.net/linux/misc/lz4-1.10.0.tar.gz" + mirror "http://fresh-center.net/linux/misc/legacy/lz4-1.10.0.tar.gz" + sha256 "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b" + license "BSD-2-Clause" + head "https://github.com/lz4/lz4.git", branch: "dev" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "5bd143b7b784989e549637ea4e484af85ba481e640dde69bc35f3843ae25abc6" + sha256 cellar: :any, arm64_sonoma: "6590245dc4a919c46afa16366914cd4b5c0c4a8f4fb35a4f6ab89053f289ae5d" + sha256 cellar: :any, arm64_ventura: "03119aa78b7a96d4b8fde7553f5601ff104d59156aca4086a2af7aaec6cba5a4" + sha256 cellar: :any, arm64_monterey: "3ace9946a02899abcc0b8852863a62e70e1eec91deffa579512f0e6c493738a3" + sha256 cellar: :any, sequoia: "f75cb29a4d25d37e1db38d95c5970cc45de7ec63ce43cfa881a877b424154a42" + sha256 cellar: :any, sonoma: "96c1ed07b013308a9c205a56c0232e45ae7da70e28200c9adb03ec78b294bffd" + sha256 cellar: :any, ventura: "c7bd3ba214fd8713268012f5bd71a95dee9623de0e373a38dc3426ea8b9293c3" + sha256 cellar: :any, monterey: "f78cc448808d04a0c31b108d7da962020e062179e29c7d0a2303db7866d8e449" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1d4b1bd9069ee0a313d2813d59b3e9217a893aba519707da2ba0b848bc1f727" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8082c2e40dc6d63850f43ea8fa095e55adf18fb0f25ec66bcaee2c4b4438205" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + # Prevent dependents from hardcoding Cellar paths. + inreplace lib/"pkgconfig/liblz4.pc", prefix, opt_prefix + end + + test do + input = "testing compression and decompression" + input_file = testpath/"in" + input_file.write input + output_file = testpath/"out" + system "sh", "-c", "cat #{input_file} | #{bin}/lz4 | #{bin}/lz4 -d > #{output_file}" + assert_equal output_file.read, input + end +end diff --git a/Formula/l/lzfse.rb b/Formula/l/lzfse.rb new file mode 100644 index 0000000000000..7e1d6dbccc482 --- /dev/null +++ b/Formula/l/lzfse.rb @@ -0,0 +1,43 @@ +class Lzfse < Formula + desc "Apple LZFSE compression library and command-line tool" + homepage "https://github.com/lzfse/lzfse" + url "https://github.com/lzfse/lzfse/archive/refs/tags/lzfse-1.0.tar.gz" + sha256 "cf85f373f09e9177c0b21dbfbb427efaedc02d035d2aade65eb58a3cbf9ad267" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4ece33c62d9b2e19ea17089e85b380c3e124413d45fab40e307231c6defec609" + sha256 cellar: :any, arm64_sonoma: "a10f2fce7192b49ddf9b0c34370dfd50d2a12264104342f36c731a9d6a69941b" + sha256 cellar: :any, arm64_ventura: "e6932c59d8f1f9462445d06f243af20c1c2a09c6eaaea3c5cc4ec8efb9466ce1" + sha256 cellar: :any, arm64_monterey: "33351619d36c622d4fbd63cd02f475e4f88da26a46351f62466003536f417cb4" + sha256 cellar: :any, arm64_big_sur: "99a83dce436e46d4d13a9825155abec9105857b23037a555bc399728c925d5c7" + sha256 cellar: :any, sonoma: "8a0c25ee34291e5de716920b58d6b25846edbea682b3434ffecc406d667a3ce3" + sha256 cellar: :any, ventura: "907f55be17f387f646e1bf8e95b60cd64534ea8b39210bcdf29aa9fcde331a61" + sha256 cellar: :any, monterey: "11e09e89227d27ecba48954e45077fcc0d0b4c5f6e55e8540be252ffb3050770" + sha256 cellar: :any, big_sur: "77feda1fad9da3e2e867fb1a7ca2c56b9beb300cf9d5fa6c383c516f4613c34e" + sha256 cellar: :any, catalina: "bf5a9fba1911206046cb4698e9b23ac23f247bcd1c47cdd779fa7a786c40aa27" + sha256 cellar: :any, mojave: "2f42a21db8de9f71535a0a9b7ca084f1a0e89174cbda174915f5da2e1ec5d3d2" + sha256 cellar: :any, high_sierra: "e2a28bc48a8d90dd26cf2fe92d9186cbe0f19c8a58a5d15c8591826cd047b43b" + sha256 cellar: :any, sierra: "2da23959f27fe8a141b2967a591052c6ec081224b7b3c9c65c4a854faba77456" + sha256 cellar: :any, el_capitan: "4fcadd0779483cf14e95f7566002af22e9b488585c37fba1b5e75f715b930c01" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ed34f88c34b8be3427102200be747817b78462cc251f02bd29b5cc3df6180d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13f5733f570ee2f8d436c66beed32cbece59522b57653fba497c9dda82bd0aed" + 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/"original").write Random.new.bytes(0xFFFF) + + system bin/"lzfse", "-encode", "-i", "original", "-o", "encoded" + system bin/"lzfse", "-decode", "-i", "encoded", "-o", "decoded" + + assert_equal (testpath/"original").read, (testpath/"decoded").read + end +end diff --git a/Formula/l/lzip.rb b/Formula/l/lzip.rb new file mode 100644 index 0000000000000..b67d247afe1e3 --- /dev/null +++ b/Formula/l/lzip.rb @@ -0,0 +1,46 @@ +class Lzip < Formula + desc "LZMA-based compression program similar to gzip or bzip2" + homepage "https://www.nongnu.org/lzip/" + url "https://download-mirror.savannah.gnu.org/releases/lzip/lzip-1.25.tar.gz" + sha256 "09418a6d8fb83f5113f5bd856e09703df5d37bae0308c668d0f346e3d3f0a56f" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/lzip/" + regex(/href=.*?lzip[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bc54609160314b30e5aed34e8d2a05fc49850a5ad3440837aaf99692bbbbbb6d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b78f49d3c8ac2bf3247ae3d1940d221f9d957a2a1440c64b2350e864ce9d7df1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f5b0a4e60ba4c516752d4f3584be960eb6f5403669cedf58b91bc37b4e312d20" + sha256 cellar: :any_skip_relocation, sequoia: "4340cae9c90716b62b003cd132c85702875e8ee904e91043d68ac78d68e6b830" + sha256 cellar: :any_skip_relocation, sonoma: "c4e8fc78d0c7151b6f22ca94ab07306a693bf0ae7c1c9e8ee0850c118fe5339c" + sha256 cellar: :any_skip_relocation, ventura: "ac49101bfc627f72d28324f6bd2572c5ece36e1b3966e345407220573e68b426" + sha256 cellar: :any_skip_relocation, arm64_linux: "0621b36f1732ed0d6c39a932dc5c9d5f137299c45e2c866e8f5630ccc7fbc7ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "308786bcb638bd26b84aeef239c9fbbd03c221922bcd2cc595fdc9fd2a3e758f" + end + + def install + system "./configure", "--prefix=#{prefix}", + "CXX=#{ENV.cxx}", + "CXXFLAGS=#{ENV.cflags}" + system "make", "check" + ENV.deparallelize + system "make", "install" + end + + test do + path = testpath/"data.txt" + original_contents = "." * 1000 + path.write original_contents + + # compress: data.txt -> data.txt.lz + system bin/"lzip", path + refute_path_exists path + + # decompress: data.txt.lz -> data.txt + system bin/"lzip", "-d", "#{path}.lz" + assert_equal original_contents, path.read + end +end diff --git a/Formula/l/lziprecover.rb b/Formula/l/lziprecover.rb new file mode 100644 index 0000000000000..1bd2361f9516c --- /dev/null +++ b/Formula/l/lziprecover.rb @@ -0,0 +1,61 @@ +class Lziprecover < Formula + desc "Data recovery tool and decompressor for files in the lzip compressed data format" + homepage "https://www.nongnu.org/lzip/lziprecover.html" + url "https://download-mirror.savannah.gnu.org/releases/lzip/lziprecover/lziprecover-1.25.tar.gz" + sha256 "4f392f9c780ae266ee3d0db166b0f1b4d3ae07076e401dc2b199dc3a0fff8b45" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/lzip/lziprecover/" + regex(/href=.*?lziprecover[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b9dfd6b15c1d4d1ab02c6aed05ef8ca2b6f21bb9ffd5feed204c06ec606b6770" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd20c214e86a0a66aafe279db858e5806a775567490e22a92f68c2048dfe5728" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ddd6ef5287bb52ddc1b4140743e599d6cb821971f3b824e668da2dd9532dfad3" + sha256 cellar: :any_skip_relocation, sonoma: "1965cecf72d16347675ff1f64c278d4fb723e65a505981583d0d5efae7ac0f78" + sha256 cellar: :any_skip_relocation, ventura: "aaba0e8d69a176034618c16c1926e522665fbe7ebfdef634dd22a63302e0c47e" + sha256 cellar: :any_skip_relocation, arm64_linux: "8bcf5ca43c008386255623253b393737a1be103f63c617a65eed8c77892320f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3f14cf600fd5f4353371429ab79056f48c7f42c95868bd9332a29059b64fa4d" + end + + depends_on "lzip" => :test + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + filename = "data.txt" + fixed_filename = "#{filename}_fixed" + path = testpath/filename + fixed_path = testpath/fixed_filename + + original_contents = "." * 1000 + path.write original_contents + + # Compress data into archive + system Formula["lzip"].opt_bin/"lzip", path + refute_path_exists path + + # Corrupt the archive to test the recovery process + File.open("#{path}.lz", "r+b") do |file| + file.seek(7) + data = file.read(1).unpack1("C*") + data = ~data + file.write([data].pack("C*")) + end + + # Verify that file corruption is detected + assert_match "Decoder error", shell_output("#{bin}/lziprecover -t #{path}.lz 2>&1", 2) + + # Attempt to recover the corrupted archive + system bin/"lziprecover", "-B", "#{path}.lz" + + # Verify that recovered data is unchanged + system bin/"lziprecover", "-d", "#{fixed_path}.lz" + assert_equal original_contents, fixed_path.read + end +end diff --git a/Formula/l/lzlib.rb b/Formula/l/lzlib.rb new file mode 100644 index 0000000000000..5704ff738f49e --- /dev/null +++ b/Formula/l/lzlib.rb @@ -0,0 +1,46 @@ +class Lzlib < Formula + desc "Data compression library" + homepage "https://www.nongnu.org/lzip/lzlib.html" + url "https://download.savannah.gnu.org/releases/lzip/lzlib/lzlib-1.15.tar.gz" + mirror "https://download-mirror.savannah.gnu.org/releases/lzip/lzlib/lzlib-1.15.tar.gz" + sha256 "4afab907a46d5a7d14e927a1080c3f4d7e3ca5a0f9aea81747d8fed0292377ff" + license "BSD-2-Clause" + + livecheck do + url "https://download.savannah.gnu.org/releases/lzip/lzlib/" + regex(/href=.*?lzlib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "87bcb4061bb953be6a3a89673b3671923af705d5cb38856b5859fb71f6dc1128" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e7d49c0b61af344aec1da7f037ec59ce9c36f79a9b7606794e15697c7b04f0ca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f957b6e8a1170b0fe93bfca8004cb9467d8496688f56999c6088aecd90ad59e6" + sha256 cellar: :any_skip_relocation, sonoma: "9e294db70263a4a544a032cb1574a8493d0a0e1830ccaccd5181b8b793fd87ba" + sha256 cellar: :any_skip_relocation, ventura: "37d32f4cd2440fa0f6a73492c7e585f037fc6cb189f57dfeb6023e9cd3d7403e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a91ac1ac39e250d4245285e4db6581ab1c801b329537933661e418eda81ab976" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e55a6c95515ea3ffc18c2486dfbb3819cdfddc6fc7b0a86b11c0c62f81f2cc0" + end + + def install + system "./configure", "--prefix=#{prefix}", + "CC=#{ENV.cc}", + "CFLAGS=#{ENV.cflags}" + system "make" + system "make", "check" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include "lzlib.h" + int main (void) { + printf ("%s", LZ_version()); + } + C + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-llz", + "-o", "test" + assert_equal version.to_s, shell_output("./test") + end +end diff --git a/Formula/l/lzo.rb b/Formula/l/lzo.rb new file mode 100644 index 0000000000000..f90a6937d164e --- /dev/null +++ b/Formula/l/lzo.rb @@ -0,0 +1,56 @@ +class Lzo < Formula + desc "Real-time data compression library" + homepage "https://www.oberhumer.com/opensource/lzo/" + url "https://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz" + sha256 "c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.oberhumer.com/opensource/lzo/download/" + regex(/href=.*?lzo[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "6bb0401c41a18fd37071ec9591fe053a808f07552ff7ea22542faa470eb8e589" + sha256 cellar: :any, arm64_sonoma: "167749edd2052e4c577f27c79a41eb1cb4b79302b1e4bef1e4cfb29bd50aedd9" + sha256 cellar: :any, arm64_ventura: "a565c627b13f2dc7fc4550aa8290a4c3feb2f48fcaa45c9f7f4bc4fe4535aa66" + sha256 cellar: :any, arm64_monterey: "e16072e8ef7a8810284ccea232a7333a2b620367814b133a455217d22e89ae8e" + sha256 cellar: :any, arm64_big_sur: "76d0933f626d8a1645b559b1709396a2a6fd57dbd556d2f1f1848b5fddfcd327" + sha256 cellar: :any, sonoma: "11b8557744feb28974cb4caa92a16a89f3ead77468778cc17c2f349502df495e" + sha256 cellar: :any, ventura: "ac88f2fdcb7eb5f82e1e6b2459408f2ca3db299d2366b7af64e410a3c6629b52" + sha256 cellar: :any, monterey: "0a20a578e6a31ebbe3c5d708af38b1c3ca5ba503612ed28a197cd326505d31dd" + sha256 cellar: :any, big_sur: "fcd3c9f7042104ca13be96fd0ec53acdc7da1480c16140441b2e66d4e7c5eb78" + sha256 cellar: :any, catalina: "c8f55ba0de85273c1851136f47b89f43ba3cce9cbf0ba9f2bba7db311544a000" + sha256 cellar: :any, mojave: "84f4e3223c03375b0be93bd87be98f512e092621b4f6b4216e3da7210c56ddad" + sha256 cellar: :any, high_sierra: "2420aac02d4765ecfd5e9b4d05402f42416c438e8bbaa43dca19e03ecff2a670" + sha256 cellar: :any, sierra: "26969f416ec79374e074f8434d6b7eece891fcbc8bee386e9bbd6d418149bc52" + sha256 cellar: :any, el_capitan: "77abd933fd899707c99b88731a743d5289cc6826bd4ff854a30e088fbbc61222" + sha256 cellar: :any_skip_relocation, arm64_linux: "d090d9756c7eb1a5371f8eff88273c0301b0102c8bf6f47d9fad7d876a466902" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8413f94bb69f337f7e1837e7f525e703cac105d27ceeb29de5c08c7bbfa77b29" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--enable-shared" + system "make" + system "make", "check" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + printf("Testing LZO v%s in Homebrew.\\n", + LZO_VERSION_STRING); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-o", "test" + assert_match "Testing LZO v#{version} in Homebrew.", shell_output("./test") + end +end diff --git a/Formula/l/lzop.rb b/Formula/l/lzop.rb new file mode 100644 index 0000000000000..cfd7cd51baf97 --- /dev/null +++ b/Formula/l/lzop.rb @@ -0,0 +1,52 @@ +class Lzop < Formula + desc "File compressor" + homepage "https://www.lzop.org/" + url "https://www.lzop.org/download/lzop-1.04.tar.gz" + sha256 "7e72b62a8a60aff5200a047eea0773a8fb205caf7acbe1774d95147f305a2f41" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.lzop.org/download/" + regex(/href=.*?lzop[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e29c398855c02fe9980a6365c4285c941988a3baa6fae5357dde1ae2ffed178e" + sha256 cellar: :any, arm64_sonoma: "3cb9969e29778a627ab2a0c634bc43f30c73ffff9960c51fa27f6eb1945b3ea1" + sha256 cellar: :any, arm64_ventura: "f797bf586d6db6240f6984be8f115a91f0218e3db024668f926b8a694ff2b57a" + sha256 cellar: :any, arm64_monterey: "32f4ffb33fda5a32802c7a37dcf41eef9b74185e726c6332912dc7d0d524381a" + sha256 cellar: :any, arm64_big_sur: "32390eb8141791296e84ed7c6a39edb5bb2ded9b04581c301d32a6dfa322db4d" + sha256 cellar: :any, sonoma: "8b4755580fbfe632a03e98de0944036593c62852c4b9dc60756037594776608d" + sha256 cellar: :any, ventura: "b521542f32669d0890bd66a3a77cb8517df3f6a619563fb3817be6c7a77acc90" + sha256 cellar: :any, monterey: "5a74762d3592fc992174fff54cb221db8a4c104f185ac3eff12deda7e97563be" + sha256 cellar: :any, big_sur: "f04a876a2b69220632fb027546104d9c6cb9ee8bdb1d9f6a2845a054500d8bb7" + sha256 cellar: :any, catalina: "3aa57a50254d383c0fe0e4d0d0585e1525d50d0cd30f87390d087523348044a0" + sha256 cellar: :any, mojave: "0ec93aa163500d45c456bce3ee100dbe61c4db080494ee41383286ca10f4d246" + sha256 cellar: :any, high_sierra: "d42fafd3f1f39d9ab512f755bd216edd24002caf8a4da82f80818fe2c29f0556" + sha256 cellar: :any, sierra: "73c2ce334be9317ca79509aec3acef2fa1eff0ffb69fdc10b3850b7f51101f72" + sha256 cellar: :any, el_capitan: "26e49bf0d06fb60d7cd5c431634966f28993edc250c4d06b0db26b28aae3cd0d" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe1868793eded05a6b15a8015c7859cbd527f183d319469b2dc25981d667e6ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15ba7328bdcb1e9789b03851966efb4cd6ccc3feb35cfbc37a364be6fc4c77e7" + end + + depends_on "lzo" + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + path = testpath/"test" + text = "This is Homebrew" + path.write text + + system bin/"lzop", "test" + assert_path_exists testpath/"test.lzo" + rm path + + system bin/"lzop", "-d", "test.lzo" + assert_equal text, path.read + end +end diff --git a/Formula/lablgtk.rb b/Formula/lablgtk.rb deleted file mode 100644 index 719fff6d41fc9..0000000000000 --- a/Formula/lablgtk.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Lablgtk < Formula - desc "Objective Caml interface to gtk+" - homepage "http://lablgtk.forge.ocamlcore.org/" - url "https://github.com/garrigue/lablgtk/archive/2.18.11.tar.gz" - sha256 "ff3c551df4e220b0c0fb9a3da6429413bff14f8fc93f4dd6807a35463982c863" - - bottle do - cellar :any - sha256 "5b78b8453ba24346aa344c059f2fecf115818e84c61d688164d423de5b0351be" => :catalina - sha256 "2e0cfbc7bbb653c2f757de7847712a0fb334f404225f1c1836266ae67c253844" => :mojave - sha256 "1d8a6f6da14b92e38b4fe9c999c43ae05ee3d355c58d77ef6ad04161004a7880" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - depends_on "gtksourceview" - depends_on "librsvg" - depends_on "ocaml" - - def install - system "./configure", "--bindir=#{bin}", - "--libdir=#{lib}", - "--mandir=#{man}", - "--with-libdir=#{lib}/ocaml" - ENV.deparallelize - system "make", "world" - system "make", "old-install" - end - - test do - (testpath/"test.ml").write <<~EOS - let _ = - GtkMain.Main.init () - EOS - ENV["CAML_LD_LIBRARY_PATH"] = "#{lib}/ocaml/stublibs" - system "ocamlc", "-I", "#{opt_lib}/ocaml/lablgtk2", "lablgtk.cma", "gtkInit.cmo", "test.ml", "-o", "test", - "-cclib", "-latk-1.0", - "-cclib", "-lcairo", - "-cclib", "-lgdk-quartz-2.0", - "-cclib", "-lgdk_pixbuf-2.0", - "-cclib", "-lgio-2.0", - "-cclib", "-lglib-2.0", - "-cclib", "-lgobject-2.0", - "-cclib", "-lgtk-quartz-2.0", - "-cclib", "-lgtksourceview-2.0", - "-cclib", "-lintl", - "-cclib", "-lpango-1.0", - "-cclib", "-lpangocairo-1.0" - system "./test" - end -end diff --git a/Formula/lame.rb b/Formula/lame.rb deleted file mode 100644 index 4b9f9a8c5d95e..0000000000000 --- a/Formula/lame.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Lame < Formula - desc "High quality MPEG Audio Layer III (MP3) encoder" - homepage "https://lame.sourceforge.io/" - url "https://downloads.sourceforge.net/sourceforge/lame/lame-3.100.tar.gz" - sha256 "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e" - - bottle do - cellar :any - sha256 "02b6a2cbf9b902225308bc90c8314699761cbdcd13628271579f5345d8160af2" => :catalina - sha256 "737751faa513a68ac2499bb5cc607bc366e15dab8ff3bff5443567a455af5c3f" => :mojave - sha256 "9e65c67b83efa5a686aea0506dc44935cd2af2d4fe55fe38dc19610a0ccd80dd" => :high_sierra - sha256 "c2d7bce53be2efb5d19d99ea00fbe69613885cce46009e8ab6099f8d5925c3ba" => :sierra - sha256 "73c4d677b4e5357dc5baf30c96ac5f33cf7902e9c77869834b7cd9d17f3415bc" => :el_capitan - end - - uses_from_macos "ncurses" - - def install - # Fix undefined symbol error _lame_init_old - # https://sourceforge.net/p/lame/mailman/message/36081038/ - inreplace "include/libmp3lame.sym", "lame_init_old\n", "" - - system "./configure", "--disable-dependency-tracking", - "--disable-debug", - "--prefix=#{prefix}", - "--enable-nasm" - system "make", "install" - end - - test do - system "#{bin}/lame", "--genre-list", test_fixtures("test.mp3") - end -end diff --git a/Formula/lammps.rb b/Formula/lammps.rb deleted file mode 100644 index 28f543db70efc..0000000000000 --- a/Formula/lammps.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Lammps < Formula - desc "Molecular Dynamics Simulator" - homepage "https://lammps.sandia.gov/" - url "https://github.com/lammps/lammps/archive/stable_3Mar2020.tar.gz" - # lammps releases are named after their release date. We transform it to - # YYYY-MM-DD (year-month-day) so that we get a sane version numbering. - # We only track stable releases as announced on the LAMMPS homepage. - version "2020-03-03" - sha256 "a1a2e3e763ef5baecea258732518d75775639db26e60af1634ab385ed89224d1" - license "GPL-2.0" - - bottle do - sha256 "9434567739e6497752d8b2e76b7dd06723b2d9773510e92d3e00aa601208c532" => :catalina - sha256 "6c450ea6fd0261adb9b18a8c09f69763b84f51d696c5bb269bf3b141f01bd484" => :mojave - sha256 "1a3ecf33da4145a48ab4c645bdb762ef8997c79e2ddaba33b6a12db898c8e73f" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "fftw" - depends_on "gcc" # for gfortran - depends_on "jpeg" - depends_on "kim-api" - depends_on "libpng" - depends_on "open-mpi" - - def install - %w[serial mpi].each do |variant| - cd "src" do - system "make", "clean-all" - system "make", "yes-standard" - - # Disable some packages for which we do not have dependencies, that are - # deprecated or require too much configuration. - %w[gpu kokkos latte mscg message mpiio poems voronoi].each do |package| - system "make", "no-#{package}" - end - - system "make", variant, - "LMP_INC=-DLAMMPS_GZIP", - "FFT_INC=-DFFT_FFTW3 -I#{Formula["fftw"].opt_include}", - "FFT_PATH=-L#{Formula["fftw"].opt_lib}", - "FFT_LIB=-lfftw3", - "JPG_INC=-DLAMMPS_JPEG -I#{Formula["jpeg"].opt_include} " \ - "-DLAMMPS_PNG -I#{Formula["libpng"].opt_include}", - "JPG_PATH=-L#{Formula["jpeg"].opt_lib} -L#{Formula["libpng"].opt_lib}", - "JPG_LIB=-ljpeg -lpng" - - bin.install "lmp_#{variant}" - end - end - - pkgshare.install(%w[doc potentials tools bench examples]) - end - - test do - system "#{bin}/lmp_serial", "-in", "#{pkgshare}/bench/in.lj" - end -end diff --git a/Formula/landscaper.rb b/Formula/landscaper.rb deleted file mode 100644 index 4abb9c330a0e8..0000000000000 --- a/Formula/landscaper.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Landscaper < Formula - desc "Manage the application landscape in a Kubernetes cluster" - homepage "https://github.com/Eneco/landscaper" - url "https://github.com/Eneco/landscaper.git", - :tag => "v1.0.24", - :revision => "1199b098bcabc729c885007d868f38b2cf8d2370" - license "Apache-2.0" - revision 1 - head "https://github.com/Eneco/landscaper.git" - - bottle do - cellar :any_skip_relocation - sha256 "74decffaf180e0e0dd9bfa2312877da01443a3418afe0f485c1b655c4af1da41" => :catalina - sha256 "ff82cdb7be6329f9a4a5ce34bcbb04bc9356ab46fa3ecd30b830cf35df268529" => :mojave - sha256 "68302c1748fe4eb063855df24420a8681a54b8ce484f2e030616bd4c4a812d52" => :high_sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - depends_on "helm@2" - depends_on "kubernetes-cli" - - def install - ENV["GOPATH"] = buildpath - ENV.prepend_create_path "PATH", buildpath/"bin" - ENV["TARGETS"] = "darwin/amd64" - dir = buildpath/"src/github.com/eneco/landscaper" - dir.install buildpath.children - [buildpath/".brew_home"] - - cd dir do - system "make", "bootstrap" - system "make", "build" - bin.install "build/landscaper" - bin.env_script_all_files(libexec/"bin", :PATH => "#{Formula["helm@2"].opt_bin}:$PATH") - prefix.install_metafiles - end - end - - test do - output = shell_output("#{bin}/landscaper apply --dry-run 2>&1", 1) - assert_match "This is Landscaper v#{version}", output - assert_match "dryRun=true", output - end -end diff --git a/Formula/languagetool.rb b/Formula/languagetool.rb deleted file mode 100644 index d2e09419fc85e..0000000000000 --- a/Formula/languagetool.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Languagetool < Formula - desc "Style and grammar checker" - homepage "https://www.languagetool.org/" - url "https://languagetool.org/download/LanguageTool-5.0.zip" - sha256 "212eb275cf9df8b6f49d8ce2bb386246081be7f01d907577fbd09a9f27055628" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"] - (bin/"languagetool").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/languagetool-commandline.jar" "$@" - EOS - (bin/"languagetool-server").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -cp "#{libexec}/languagetool-server.jar" org.languagetool.server.HTTPServer "$@" - EOS - (bin/"languagetool-gui").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/languagetool.jar" "$@" - EOS - end - - test do - pipe_output("#{bin}/languagetool -l en-US -", "This is a test.") - end -end diff --git a/Formula/lanraragi.rb b/Formula/lanraragi.rb deleted file mode 100644 index 408fe7df7fb7f..0000000000000 --- a/Formula/lanraragi.rb +++ /dev/null @@ -1,113 +0,0 @@ -require "language/node" - -class Lanraragi < Formula - desc "Web application for archival and reading of manga/doujinshi" - homepage "https://github.com/Difegue/LANraragi" - url "https://github.com/Difegue/LANraragi/archive/v.0.7.0.tar.gz" - sha256 "e0ba954c80e6c2c16994e52b310234b3ee013c7076797c5d9eaf216bda182af6" - license "MIT" - revision 1 - head "https://github.com/Difegue/LANraragi.git" - - bottle do - cellar :any - sha256 "51856ce718708fde4dc2809f5d7264a567d53fa94d2a5c3f993720c54002e58c" => :catalina - sha256 "6d73ba34a5dc3ba0af8e2b7e6776d1f445f65b810db7df7ffc69547c075cf877" => :mojave - sha256 "e4cd2814953c1d239f3379347f5b20475e367881ce079c6a5bda536f37cbb098" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "cpanminus" - depends_on "ghostscript" - depends_on "giflib" - depends_on "imagemagick@6" - depends_on "jpeg" - depends_on "libpng" - depends_on "node" - depends_on "openssl@1.1" - depends_on "perl" - depends_on "redis" - uses_from_macos "libarchive" - - resource "Image::Magick" do - url "https://cpan.metacpan.org/authors/id/J/JC/JCRISTY/PerlMagick-6.89-1.tar.gz" - sha256 "c8f81869a4f007be63e67fddf724b23256f6209f16aa95e14d0eaef283772a59" - end - - # libarchive headers from macOS 10.15 source - resource "libarchive-headers-10.15" do - url "https://opensource.apple.com/tarballs/libarchive/libarchive-72.11.2.tar.gz" - sha256 "655b9270db794ba0b27052fd37b1750514b06769213656ab81e30727322e401f" - end - - resource "Archive::Peek::Libarchive" do - url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/Archive-Peek-Libarchive-0.38.tar.gz" - sha256 "332159603c5cd560da27fd80759da84dad7d8c5b3d96fbf7586de2b264f11b70" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - ENV.prepend_path "PERL5LIB", libexec/"lib" - ENV["CFLAGS"] = "-I"+libexec/"include" - - resource("Image::Magick").stage do - inreplace "Makefile.PL" do |s| - s.gsub! "/usr/local/include/ImageMagick-6", "#{Formula["imagemagick@6"].opt_include}/ImageMagick-6" - end - - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - - resource("libarchive-headers-10.15").stage do - (libexec/"include").install "libarchive/libarchive/archive.h" - (libexec/"include").install "libarchive/libarchive/archive_entry.h" - end - - resource("Archive::Peek::Libarchive").stage do - inreplace "Makefile.PL" do |s| - s.gsub! "$autoconf->_get_extra_compiler_flags", "$autoconf->_get_extra_compiler_flags .$ENV{CFLAGS}" - end - - system "cpanm", "Config::AutoConf", "--notest", "-l", libexec - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" - system "make" - system "make", "install" - end - - system "npm", "install", *Language::Node.local_npm_install_args - system "perl", "./tools/install.pl", "install-full" - - prefix.install "README.md" - bin.install "tools/build/homebrew/lanraragi" - (libexec/"lib").install Dir["lib/*"] - libexec.install "script" - libexec.install "package.json" - libexec.install "public" - libexec.install "templates" - libexec.install "tests" - libexec.install "tools/build/homebrew/redis.conf" - libexec.install "lrr.conf" - end - - def caveats - <<~EOS - Automatic thumbnail generation will not work properly on macOS < 10.15 due to the bundled Libarchive being too old. - Opening archives for reading will generate thumbnails normally. - EOS - end - - test do - # This can't have its _user-facing_ functionality tested in the `brew test` - # environment because it needs Redis. It fails spectacularly tho with some - # table flip emoji. So let's use those to confirm _some_ functionality. - output = <<~EOS - キタ━━━━━━(゚∀゚)━━━━━━!!!!! - (╯・_>・)╯︵ ┻━┻ - It appears your Redis database is currently not running. - The program will cease functioning now. - EOS - assert_match output, shell_output("#{bin}/lanraragi", 1) - end -end diff --git a/Formula/lapack.rb b/Formula/lapack.rb deleted file mode 100644 index 79cb4f0e83786..0000000000000 --- a/Formula/lapack.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Lapack < Formula - desc "Linear Algebra PACKage" - homepage "https://www.netlib.org/lapack/" - url "https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz" - sha256 "106087f1bb5f46afdfba7f569d0cbe23dacb9a07cd24733765a0e89dbe1ad573" - revision 1 - head "https://github.com/Reference-LAPACK/lapack.git" - - bottle do - sha256 "be00d33447ab0bb47a05f89517640c984cafb7723fd6fff9749de773c304f2df" => :catalina - sha256 "ad84de82af78dc5ee4b305c76a79a3fc18420beeac2be72d1c262936d5a9110e" => :mojave - sha256 "fd360d9073e8a483e88a0bca6c8dc96a8159488fa3a6009bb8cbe03747f20f4f" => :high_sierra - end - - keg_only :shadowed_by_macos, "macOS provides LAPACK in Accelerate.framework" - - depends_on "cmake" => :build - depends_on "gcc" # for gfortran - - def install - ENV.delete("MACOSX_DEPLOYMENT_TARGET") - - mkdir "build" do - system "cmake", "..", - "-DBUILD_SHARED_LIBS:BOOL=ON", - "-DLAPACKE:BOOL=ON", - *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"lp.c").write <<~EOS - #include "lapacke.h" - int main() { - void *p = LAPACKE_malloc(sizeof(char)*100); - if (p) { - LAPACKE_free(p); - } - return 0; - } - EOS - system ENV.cc, "lp.c", "-I#{include}", "-L#{lib}", "-llapacke", "-o", "lp" - system "./lp" - end -end diff --git a/Formula/lasi.rb b/Formula/lasi.rb deleted file mode 100644 index 585f4b0c5ac3a..0000000000000 --- a/Formula/lasi.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Lasi < Formula - desc "C++ stream output interface for creating Postscript documents" - homepage "https://www.unifont.org/lasi/" - url "https://downloads.sourceforge.net/project/lasi/lasi/1.1.3%20Source/libLASi-1.1.3.tar.gz" - sha256 "5e5d2306f7d5a275949fb8f15e6d79087371e2a1caa0d8f00585029d1b47ba3b" - revision 1 - head "https://svn.code.sf.net/p/lasi/code/trunk" - - bottle do - cellar :any - rebuild 1 - sha256 "65a46c00e8cef9b98bf1b36229a3da7cf69038b5e1d8cccbb620cb1431d27319" => :catalina - sha256 "5ef18cc43b46bf548f42925b3b2beb4993461ba78d5078f1cacaf8ac7b7af169" => :mojave - sha256 "447ee1c538c34cb9f06c5dc743ad86807ddb4e05ea6e345b6db085705324da6d" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "pkg-config" => :build - depends_on "pango" - - def install - # None is valid, but lasi's CMakeFiles doesn't think so for some reason - args = std_cmake_args - %w[-DCMAKE_BUILD_TYPE=None] - - system "cmake", ".", "-DCMAKE_BUILD_TYPE=Release", *args - system "make", "install" - end -end diff --git a/Formula/lasso.rb b/Formula/lasso.rb deleted file mode 100644 index 83a7f0eecb3ae..0000000000000 --- a/Formula/lasso.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Lasso < Formula - desc "Library for Liberty Alliance and SAML protocols" - homepage "https://lasso.entrouvert.org/" - url "https://dev.entrouvert.org/releases/lasso/lasso-2.6.1.tar.gz" - sha256 "f8a8dbce238802f6bb9c3b8bd528b4dce2a1dc44e2d34d8d839aa54fbc8ed1de" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "aecca2fc642d36e34cd455c69c22e9218c7189069cfebeeedace812308d3b09c" => :catalina - sha256 "aa800d43d4a10ef664f5cfbd323d1417bbafe5a59f6110814b74cd4eecfc51be" => :mojave - sha256 "ef80d2303bf630a7c077f404f948eaf0e960afb81b8dced7853cee50ccc2b7dc" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "glib" - depends_on "libxmlsec1" - depends_on "openssl@1.1" - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - 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 "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-java", - "--disable-perl", - "--disable-php5", - "--disable-python", - "--prefix=#{prefix}", - "--with-pkg-config=#{ENV["PKG_CONFIG_PATH"]}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() { - return lasso_init(); - } - EOS - system ENV.cc, "test.c", - "-I#{Formula["glib"].include}/glib-2.0", - "-I#{Formula["glib"].lib}/glib-2.0/include", - "-I#{MacOS.sdk_path}/usr/include/libxml2", - "-I#{Formula["libxmlsec1"].include}/xmlsec1", - "-L#{lib}", "-llasso", "-o", "test" - system "./test" - end -end diff --git a/Formula/lastpass-cli.rb b/Formula/lastpass-cli.rb deleted file mode 100644 index d63151aca6ae7..0000000000000 --- a/Formula/lastpass-cli.rb +++ /dev/null @@ -1,43 +0,0 @@ -class LastpassCli < Formula - desc "LastPass command-line interface tool" - homepage "https://github.com/lastpass/lastpass-cli" - url "https://github.com/lastpass/lastpass-cli/releases/download/v1.3.3/lastpass-cli-1.3.3.tar.gz" - sha256 "b94f591627e06c9fed3bc38007b1adc6ea77127e17c7175c85d497096768671b" - revision 1 - head "https://github.com/lastpass/lastpass-cli.git" - - bottle do - cellar :any - rebuild 2 - sha256 "3739dcc590577eaeaecf182f3d6b354173f4dbda632a3b34b7fb35c16831b65c" => :catalina - sha256 "2edb88e5308ec6f93a5c23d4cf85263a65fe5cde36e9d2c9c524441c6917ac6f" => :mojave - sha256 "ccd3658c9ae5b54e1c9584971de3c47fbe399a3032c3db878317c1b853d7f22a" => :high_sierra - end - - depends_on "asciidoc" => :build - depends_on "cmake" => :build - depends_on "docbook-xsl" => :build - depends_on "pkg-config" => :build - # Avoid crashes on Mojave's version of libcurl (https://github.com/lastpass/lastpass-cli/issues/427) - depends_on "curl" if MacOS.version >= :mojave - depends_on "openssl@1.1" - depends_on "pinentry" - - def install - ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" - - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DCMAKE_INSTALL_MANDIR:PATH=#{man}" - system "make", "install", "install-doc" - end - - bash_completion.install "contrib/lpass_bash_completion" - zsh_completion.install "contrib/lpass_zsh_completion" => "_lpass" - fish_completion.install "contrib/completions-lpass.fish" - end - - test do - assert_equal("Error: Could not find decryption key. Perhaps you need to login with `#{bin}/lpass login`.", - shell_output("#{bin}/lpass passwd 2>&1", 1).chomp) - end -end diff --git a/Formula/laszip.rb b/Formula/laszip.rb deleted file mode 100644 index f51653e37b8b4..0000000000000 --- a/Formula/laszip.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Laszip < Formula - desc "Lossless LiDAR compression" - homepage "https://laszip.org/" - url "https://github.com/LASzip/LASzip/releases/download/3.4.3/laszip-src-3.4.3.tar.gz" - sha256 "53f546a7f06fc969b38d1d71cceb1862b4fc2c4a0965191a0eee81a57c7b373d" - license "LGPL-2.1" - head "https://github.com/LASzip/LASzip.git" - - bottle do - sha256 "df73f3c2c8be13bc0fab13f28cbb22262a24c283f4da85cf6b21c55531516e7f" => :catalina - sha256 "3a9bc6d5931145800cb5792740a3cae118d27c4879144f3c74a44c2aee75ce64" => :mojave - sha256 "a32459a4896bdc365fae55b70744bb7ae2a05b552e3bb0b0097345e0ea423014" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - pkgshare.install "example" - end - - test do - system ENV.cxx, pkgshare/"example/laszipdllexample.cpp", "-L#{lib}", - "-llaszip", "-llaszip_api", "-Wno-format", "-o", "test" - assert_match "LASzip DLL", shell_output("./test -h 2>&1", 1) - end -end diff --git a/Formula/latex2html.rb b/Formula/latex2html.rb deleted file mode 100644 index 59551ca24cc9c..0000000000000 --- a/Formula/latex2html.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Latex2html < Formula - desc "LaTeX-to-HTML translator" - homepage "https://www.latex2html.org/" - url "https://github.com/latex2html/latex2html/archive/v2020.2.tar.gz" - sha256 "09f2d7f086fee9538523fd5074ada8ebadbdbc2227ca11d9d36189e698e5cfaf" - - bottle do - cellar :any_skip_relocation - sha256 "f5448ddd27e175bc6cf388581f3332a188bc52a15c69d41b8002cc5303471cf4" => :catalina - sha256 "fc170658ac170d9bf484a05d99fc052fdefdf9d39ada1cb0b2cffa20950e7ed5" => :mojave - sha256 "1057bbb3c6c991e3ce62425b2b11852558d40be5fab478560784ee2b60ec2591" => :high_sierra - end - - depends_on "ghostscript" - depends_on "netpbm" - - def install - system "./configure", "--prefix=#{prefix}", - "--without-mktexlsr", - "--with-texpath=#{share}/texmf/tex/latex/html" - system "make", "install" - end - - test do - (testpath/"test.tex").write <<~EOS - \\documentclass{article} - \\usepackage[utf8]{inputenc} - \\title{Experimental Setup} - \\date{\\today} - \\begin{document} - \\maketitle - \\end{document} - EOS - system "#{bin}/latex2html", "test.tex" - assert_match /Experimental Setup/, File.read("test/test.html") - end -end diff --git a/Formula/latex2rtf.rb b/Formula/latex2rtf.rb deleted file mode 100644 index e6675ed7df051..0000000000000 --- a/Formula/latex2rtf.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Latex2rtf < Formula - desc "Translate LaTeX to RTF" - homepage "https://latex2rtf.sourceforge.io/" - url "https://downloads.sourceforge.net/project/latex2rtf/latex2rtf-unix/2.3.18/latex2rtf-2.3.18.tar.gz" - sha256 "c0b6a9f5877b3b24b1571c5f2c42afd22f0db5448448d4de7379e67d284ca0b1" - - bottle do - sha256 "be21a155b6d80c651312135de1348e1847ac57b1b1d612bf820e92fe663e9b10" => :catalina - sha256 "7c933531921ef07cc2471938266c91380d2364761b01fad8680bc70648812b19" => :mojave - sha256 "cf6c89983b5c8593a74f62e86825f4a9e7cc7f31fb83639c8247c51fa4d3975a" => :high_sierra - end - - def install - inreplace "Makefile", "cp -p doc/latex2rtf.html $(DESTDIR)$(SUPPORTDIR)", - "cp -p doc/web/* $(DESTDIR)$(SUPPORTDIR)" - system "make", "DESTDIR=", - "BINDIR=#{bin}", - "MANDIR=#{man1}", - "INFODIR=#{info}", - "SUPPORTDIR=#{pkgshare}", - "CFGDIR=#{pkgshare}/cfg", - "install" - end - - test do - (testpath/"test.tex").write <<~EOS - \\documentclass{article} - \\title{LaTeX to RTF} - \\begin{document} - \\maketitle - \\end{document} - EOS - system bin/"latex2rtf", "test.tex" - assert_predicate testpath/"test.rtf", :exist? - assert_match "LaTeX to RTF", File.read(testpath/"test.rtf") - end -end diff --git a/Formula/latexdiff.rb b/Formula/latexdiff.rb deleted file mode 100644 index 3ba86daa632a3..0000000000000 --- a/Formula/latexdiff.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Latexdiff < Formula - desc "Compare and mark up LaTeX file differences" - homepage "https://www.ctan.org/pkg/latexdiff" - url "https://github.com/ftilmann/latexdiff/releases/download/1.3.1.1/latexdiff-1.3.1.1.tar.gz" - sha256 "5e55ee205750ccbea8d69cf98791707e7a42ab88e92d3a1101f9de53643aa1d3" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "8eb979b1b52125f102bbc56bbc4611d5b8075f003318307a2205485d95c789aa" => :catalina - sha256 "8eb979b1b52125f102bbc56bbc4611d5b8075f003318307a2205485d95c789aa" => :mojave - sha256 "8eb979b1b52125f102bbc56bbc4611d5b8075f003318307a2205485d95c789aa" => :high_sierra - end - - # osx default perl cause compilation error - depends_on "perl" - - def install - bin.install %w[latexdiff-fast latexdiff-so latexdiff-vc latexrevise] - man1.install %w[latexdiff-vc.1 latexdiff.1 latexrevise.1] - doc.install Dir["doc/*"] - pkgshare.install %w[contrib example] - - # Install latexdiff-so (with inlined Algorithm::Diff) as the - # preferred version, more portable - bin.install_symlink "latexdiff-so" => "latexdiff" - end - - test do - (testpath/"test1.tex").write <<~EOS - \\documentclass{article} - \\begin{document} - Hello, world. - \\end{document} - EOS - - (testpath/"test2.tex").write <<~EOS - \\documentclass{article} - \\begin{document} - Goodnight, moon. - \\end{document} - EOS - - expect = /^\\DIFdelbegin \s+ - \\DIFdel \{ Hello,[ ]world \} - \\DIFdelend \s+ - \\DIFaddbegin \s+ - \\DIFadd \{ Goodnight,[ ]moon \} - \\DIFaddend \s+ - \.$/x - assert_match expect, shell_output("#{bin}/latexdiff test[12].tex") - end -end diff --git a/Formula/latexindent.rb b/Formula/latexindent.rb deleted file mode 100644 index 8c5012e1c0cdc..0000000000000 --- a/Formula/latexindent.rb +++ /dev/null @@ -1,223 +0,0 @@ -class Latexindent < Formula - desc "Add indentation to LaTeX files" - homepage "https://ctan.org/pkg/latexindent" - url "https://github.com/cmhughes/latexindent.pl/archive/V3.8.2.tar.gz" - sha256 "a134e27d56b7daee2bea37563424f996fc559bc8019e92213261b25cdb84a688" - - bottle do - cellar :any_skip_relocation - sha256 "f1fda32a3d8d74e5f6c39bc946bd47c554a293a13ed2c44fbc1c4c3498dd5128" => :catalina - sha256 "f8e5d09a084bb0f2b6d79363978963b9be3d3a5c0213208d579eba641fb1be30" => :mojave - sha256 "938feab923be39cef8430038b8db9e86f86b37955f812b64a6d8743ce4f63ad9" => :high_sierra - end - - depends_on "perl" - - resource "B::Hooks::EndOfScope" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/B-Hooks-EndOfScope-0.24.tar.gz" - sha256 "03aa3dfe5d0aa6471a96f43fe8318179d19794d4a640708f0288f9216ec7acc6" - end - - resource "Class::Data::Inheritable" do - url "https://cpan.metacpan.org/authors/id/T/TM/TMTM/Class-Data-Inheritable-0.08.tar.gz" - sha256 "9967feceea15227e442ec818723163eb6d73b8947e31f16ab806f6e2391af14a" - 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 "Devel::StackTrace" do - url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Devel-StackTrace-2.04.tar.gz" - sha256 "cd3c03ed547d3d42c61fa5814c98296139392e7971c092e09a431f2c9f5d6855" - end - - resource "Dist::CheckConflicts" do - url "https://cpan.metacpan.org/authors/id/D/DO/DOY/Dist-CheckConflicts-0.11.tar.gz" - sha256 "ea844b9686c94d666d9d444321d764490b2cde2f985c4165b4c2c77665caedc4" - 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 "Exception::Class" do - url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Exception-Class-1.44.tar.gz" - sha256 "33f3fbf8b138d3b04ea4ec0ba83fb0df6ba898806bcf4ef393d4cafc1a23ee0d" - end - - resource "File::HomeDir" do - url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/File-HomeDir-1.004.tar.gz" - sha256 "45f67e2bb5e60a7970d080e8f02079732e5a8dfc0c7c3cbdb29abfb3f9f791ad" - 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 "Log::Dispatch" do - url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Log-Dispatch-2.69.tar.gz" - sha256 "58624c0a0c4c620873efb7ce2f11dde55fa2e24c22be2551f548ff3624585277" - end - - resource "Log::Log4perl" do - url "https://cpan.metacpan.org/authors/id/M/MS/MSCHILLI/Log-Log4perl-1.49.tar.gz" - sha256 "b739187f519146cb6bebcfc427c64b1f4138b35c5f4c96f46a21ed4a43872e16" - end - - resource "MIME::Charset" do - url "https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/MIME-Charset-1.012.2.tar.gz" - sha256 "878c779c0256c591666bd06c0cde4c0d7820eeeb98fd1183082aee9a1e7b1d13" - end - - resource "MRO::Compat" do - url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/MRO-Compat-0.13.tar.gz" - sha256 "8a2c3b6ccc19328d5579d02a7d91285e2afd85d801f49d423a8eb16f323da4f8" - end - - resource "Mac::SystemDirectory" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Mac-SystemDirectory-0.13.tar.gz" - sha256 "8730740e4ff3ea4812139b0787dbd1b544e093a08218d908071629b70fde3684" - 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 "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 "Package::Stash" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-0.38.tar.gz" - sha256 "c58ee8844df2dda38e3bf66fdf443439aaefaef1a33940edf2055f0afd223a7f" - end - - resource "Package::Stash::XS" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-XS-0.29.tar.gz" - sha256 "d3676ba94641e03d6a30e951f09266c4c3ca3f5b58aa7b314a67f28e419878aa" - 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 "Role::Tiny" do - url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Role-Tiny-2.001004.tar.gz" - sha256 "92ba5712850a74102c93c942eb6e7f62f7a4f8f483734ed289d08b324c281687" - end - - resource "Specio" do - url "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Specio-0.46.tar.gz" - sha256 "0bf42aa116076d6efc18f72b72c7acb5638bd41c0aa09aecc12fc8bf9ceb9596" - 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 "Sub::Identify" do - url "https://cpan.metacpan.org/authors/id/R/RG/RGARCIA/Sub-Identify-0.14.tar.gz" - sha256 "068d272086514dd1e842b6a40b1bedbafee63900e5b08890ef6700039defad6f" - 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 "Test::Fatal" do - url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Test-Fatal-0.014.tar.gz" - sha256 "bcdcef5c7b2790a187ebca810b0a08221a63256062cfab3c3b98685d91d1cbb0" - 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 "Unicode::LineBreak" do - url "https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/Unicode-LineBreak-2019.001.tar.gz" - sha256 "486762e4cacddcc77b13989f979a029f84630b8175e7fef17989e157d4b6318a" - 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 "XString" do - url "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/XString-0.002.tar.gz" - sha256 "260e252f7367228c9b4e43ef50c0becb04c4781de660577b3086cc106c0028c0" - 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 "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 - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - resources.each do |r| - r.stage do - args = ["INSTALL_BASE=#{libexec}"] - args.unshift "--defaultdeps" if r.name == "MIME::Charset" - system "perl", "Makefile.PL", *args - system "make", "install" - end - end - - (libexec/"lib/perl5").install "LatexIndent" - (libexec/"bin").install "latexindent.pl" - (libexec/"bin").install "defaultSettings.yaml" - (bin/"latexindent").write_env_script("#{libexec}/bin/latexindent.pl", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - (testpath/"test.tex").write <<~EOS - \\documentclass{article} - \\title{latexindent Homebrew Test} - \\begin{document} - \\maketitle - \\begin{itemize} - \\item Hello - \\item World - \\end{itemize} - \\end{document} - EOS - assert_match <<~EOS, shell_output("#{bin}/latexindent #{testpath}/test.tex") - \\documentclass{article} - \\title{latexindent Homebrew Test} - \\begin{document} - \\maketitle - \\begin{itemize} - \\item Hello - \\item World - \\end{itemize} - \\end{document} - EOS - end -end diff --git a/Formula/latexml.rb b/Formula/latexml.rb deleted file mode 100644 index 2b4ea3b3dfe61..0000000000000 --- a/Formula/latexml.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Latexml < Formula - desc "LaTeX to XML/HTML/MathML Converter" - homepage "https://dlmf.nist.gov/LaTeXML/" - url "https://dlmf.nist.gov/LaTeXML/releases/LaTeXML-0.8.4.tar.gz" - sha256 "92599b45fb587ac14b2ba9cc84b85d9ddc2deaf1cbdc2e89e7a6559e1fbb34cc" - head "https://github.com/brucemiller/LaTeXML.git" - - bottle do - cellar :any_skip_relocation - sha256 "89177de9fcad665602e176c80095dc52ad5faebe5db384348ac7afaa67a37aab" => :catalina - sha256 "e7c78acf6bb580fdb949777719972a806c1d7d349d9e826b338572bedde6cf5c" => :mojave - sha256 "388dbf99df85e55879cccfa48eed9b6ef362d13f3ffe83dbfd09b1e7fb12fa1f" => :high_sierra - sha256 "b911ac9897012edcc7c32d96785e4ca3830ce8cbddff78da0942263c7fb0d0bb" => :sierra - end - - uses_from_macos "libxml2" - uses_from_macos "libxslt" - uses_from_macos "perl" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "Image::Size" do - url "https://cpan.metacpan.org/authors/id/R/RJ/RJRAY/Image-Size-3.300.tar.gz" - sha256 "53c9b1f86531cde060ee63709d1fda73cabc0cf2d581d29b22b014781b9f026b" - end - - resource "Text::Unidecode" do - url "https://cpan.metacpan.org/authors/id/S/SB/SBURKE/Text-Unidecode-1.30.tar.gz" - sha256 "6c24f14ddc1d20e26161c207b73ca184eed2ef57f08b5fb2ee196e6e2e88b1c6" - 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", "INSTALL_BASE=#{libexec}" - system "make", "install" - doc.install "manual.pdf" - (libexec+"bin").find.each do |path| - next if path.directory? - - program = path.basename - (bin+program).write_env_script("#{libexec}/bin/#{program}", :PERL5LIB => ENV["PERL5LIB"]) - end - end - - test do - (testpath/"test.tex").write <<~EOS - \\documentclass{article} - \\title{LaTeXML Homebrew Test} - \\begin{document} - \\maketitle - \\end{document} - EOS - assert_match %r{LaTeXML Homebrew Test}, - shell_output("#{bin}/latexml --quiet #{testpath}/test.tex") - end -end diff --git a/Formula/launch.rb b/Formula/launch.rb deleted file mode 100644 index 7364e03873e24..0000000000000 --- a/Formula/launch.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Launch < Formula - desc "Command-line launcher for macOS, in the spirit of `open`" - homepage "https://sabi.net/nriley/software/#launch" - url "https://sabi.net/nriley/software/launch-1.2.5.tar.gz" - sha256 "486632b11bee04d9f6bcb595fd2a68b5fde2f748ebdc182274778cc5cf97ff70" - license "BSD-3-Clause" - head "https://github.com/nriley/launch.git" - - bottle do - cellar :any_skip_relocation - sha256 "e6e543dda95bf0eea6d817e5df484f91493f84bc49bedf5d73420be8452f3f05" => :catalina - sha256 "39473462b7b66e86f4d3abfef40f6b9314793ae6d621dba3ca61ccf9f06f1d0f" => :mojave - sha256 "7ea743ebff2392770ebb7bd7ff0a420ad9a3f6bc50d1181df7518a5fe46a8000" => :high_sierra - sha256 "4fa06c0d934752695a0c823c51569063b50f8826c7fb9cbd302f731b059e4225" => :sierra - sha256 "9905b0dd99460cd88d48a1cf4c230ec03db380262001fa7a2ba54cbcbb84fad0" => :el_capitan - end - - depends_on :xcode => :build - - def install - rm_rf "launch" # We'll build it ourself, thanks. - xcodebuild "-configuration", "Deployment", "SYMROOT=build", "clean" - xcodebuild "-configuration", "Deployment", "SYMROOT=build" - - man1.install gzip("launch.1") - bin.install "build/Deployment/launch" - end - - test do - assert_equal "/", shell_output("#{bin}/launch -n /").chomp - end -end diff --git a/Formula/launch4j.rb b/Formula/launch4j.rb deleted file mode 100644 index 624f255eaf73c..0000000000000 --- a/Formula/launch4j.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Launch4j < Formula - desc "Cross-platform Java executable wrapper" - homepage "https://launch4j.sourceforge.io/" - url "https://downloads.sourceforge.net/project/launch4j/launch4j-3/3.12/launch4j-3.12-macosx-x86.tgz" - version "3.12" - sha256 "754e557036ff4a469b4a24443c809113f85b9a0689a5ffdcf35a8a6e986c458f" - - bottle :unneeded - - def install - libexec.install Dir["*"] - ["src", "web"] - bin.write_jar_script libexec/"launch4j.jar", "launch4j" - end - - test do - system "#{bin}/launch4j", "--version" - end -end diff --git a/Formula/launch_socket_server.rb b/Formula/launch_socket_server.rb deleted file mode 100644 index 591355415e8ca..0000000000000 --- a/Formula/launch_socket_server.rb +++ /dev/null @@ -1,69 +0,0 @@ -class LaunchSocketServer < Formula - desc "Bind to privileged ports without running a server as root" - homepage "https://github.com/mistydemeo/launch_socket_server" - url "https://github.com/mistydemeo/launch_socket_server/archive/v2.0.0.tar.gz" - sha256 "507184544d170dab63e6112198212033aaa84edf0e092c1dfe641087f092f365" - license "MIT" - head "https://github.com/mistydemeo/launch_socket_server.git" - - bottle do - cellar :any_skip_relocation - sha256 "ff86499103ad1d9d33cdc039e24f065aa08405bda980c9e242c46ed157bc33ff" => :catalina - sha256 "823d84eddeb72fdabeccdc189bc19269485bfeb23d0a57824cdbf95c92a6ccb8" => :mojave - sha256 "ef58f2afc33d6454282d1e1b92e4d16269885464707ae58079c29514f4cadc60" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - plist_options :startup => true - - def plist - <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_sbin}/launch_socket_server - - - - Sockets - - Socket - - SockNodeName - 0.0.0.0 - SockServiceName - 80 - - - EnvironmentVariables - - LAUNCH_PROGRAM_TCP_ADDRESS - 127.0.0.1:8080 - - StandardErrorPath - #{var}/log/launch_socket_server.log - StandardOutPath - #{var}/log/launch_socket_server.log - - - EOS - end - - test do - assert_includes shell_output("#{opt_sbin}/launch_socket_server 2>&1; true"), - "usage: #{opt_sbin}/launch_socket_server" - end -end diff --git a/Formula/launchctl-completion.rb b/Formula/launchctl-completion.rb deleted file mode 100644 index 56c282a971411..0000000000000 --- a/Formula/launchctl-completion.rb +++ /dev/null @@ -1,17 +0,0 @@ -class LaunchctlCompletion < Formula - desc "Bash completion for Launchctl" - homepage "https://github.com/CamJN/launchctl-completion" - url "https://github.com/CamJN/launchctl-completion/archive/v1.0.tar.gz" - sha256 "b21c39031fa41576d695720b295dce57358c320964f25d19a427798d0f0df7a0" - - bottle :unneeded - - def install - bash_completion.install "launchctl-completion.sh" => "launchctl" - end - - test do - assert_match "-F _launchctl", - shell_output("bash -c 'source #{bash_completion}/launchctl && complete -p launchctl'") - end -end diff --git a/Formula/launchdns.rb b/Formula/launchdns.rb deleted file mode 100644 index 0139dda8b4fcb..0000000000000 --- a/Formula/launchdns.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Launchdns < Formula - desc "Mini DNS server designed solely to route queries to localhost" - homepage "https://github.com/josh/launchdns" - url "https://github.com/josh/launchdns/archive/v1.0.4.tar.gz" - sha256 "60f6010659407e3d148c021c88e1c1ce0924de320e99a5c58b21c8aece3888aa" - license "MIT" - revision 1 - head "https://github.com/josh/launchdns.git" - - bottle do - cellar :any_skip_relocation - sha256 "cfa7f2fc765e5f4137df7fbb3f212cb1a3822edeecc095a2e5c75901e82526e8" => :catalina - sha256 "1572081e53a9b2234321ac9f4bb4f48507bbafcd781f29549907e7ded4873526" => :mojave - sha256 "9379f60efc2a0984c79a3b59dab5093ca3fdaad89a8f697a7623abda15801293" => :high_sierra - sha256 "ced5d6c6bdb3074c29dd65b244fc4325cc4799820d7dd38c6dedf04c2555f3cb" => :sierra - end - - def install - ENV["PREFIX"] = prefix - system "./configure", "--with-launch-h", "--with-launch-h-activate-socket" - system "make", "install" - - (prefix/"etc/resolver/localhost").write("nameserver 127.0.0.1\nport 55353\n") - end - - plist_options :manual => "launchdns" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/launchdns - --socket=Listeners - --timeout=30 - - Sockets - - Listeners - - SockType - dgram - SockNodeName - 127.0.0.1 - SockServiceName - 55353 - - - StandardErrorPath - #{var}/log/launchdns.log - StandardOutPath - #{var}/log/launchdns.log - - - EOS - end - - test do - output = shell_output("#{bin}/launchdns --version") - assert_no_match(/without socket activation/, output) - system bin/"launchdns", "-p0", "-t1" - end -end diff --git a/Formula/lazydocker.rb b/Formula/lazydocker.rb deleted file mode 100644 index 3cdec0bcf33fe..0000000000000 --- a/Formula/lazydocker.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Lazydocker < Formula - desc "The lazier way to manage everything docker" - homepage "https://github.com/jesseduffield/lazydocker" - url "https://github.com/jesseduffield/lazydocker.git", - :tag => "v0.9.1", - :revision => "10617da5608990bf4911142745d31566bac6964a" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "0a32a3111697ccba3b9f1d959f206c23a6b2fdc2fdb968f5eed12575c67e56b4" => :catalina - sha256 "efe1cebae9966e4cbe0b55cfd28f6625d37b821827c7954168e80fc932ec57e2" => :mojave - sha256 "79c56a22d891d09ce3b08ef1c400768dc68f2c5244b9a33070aae6f33e3d1e7b" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-mod=vendor", "-o", bin/"lazydocker", - "-ldflags", "-X main.version=#{version} -X main.buildSource=homebrew" - end - - test do - assert_match version.to_s, shell_output("#{bin}/lazydocker --version") - - assert_match "reporting: undetermined", shell_output("#{bin}/lazydocker --config") - end -end diff --git a/Formula/lazygit.rb b/Formula/lazygit.rb deleted file mode 100644 index 7f2ab1c6d9f27..0000000000000 --- a/Formula/lazygit.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Lazygit < Formula - desc "Simple terminal UI for git commands" - homepage "https://github.com/jesseduffield/lazygit/" - url "https://github.com/jesseduffield/lazygit/archive/v0.20.4.tar.gz" - sha256 "8af316bf9d0916e8b19ce590a80664314a38652af9ef115083686bc9720fa7b9" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "e1208b282f14c75a93a01f791009ea644e7438ea812e411fef6a8a47f63acbe5" => :catalina - sha256 "2a8ca3c11245e60ea115b0e7c4a24c85724096e4146040ea88a4b679af8a4b07" => :mojave - sha256 "fb0346d006b244733af581f5e249e643d8653cc1b1d9c42bec7e71e8b3c39bae" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-mod=vendor", "-o", bin/"lazygit", - "-ldflags", "-X main.version=#{version} -X main.buildSource=homebrew" - end - - # lazygit is a terminal GUI, but it can be run in 'client mode' for example to write to git's todo file - test do - (testpath/"git-rebase-todo").write "" - ENV["LAZYGIT_CLIENT_COMMAND"] = "INTERACTIVE_REBASE" - ENV["LAZYGIT_REBASE_TODO"] = "foo" - system "#{bin}/lazygit", "git-rebase-todo" - assert_match "foo", (testpath/"git-rebase-todo").read - end -end diff --git a/Formula/lbdb.rb b/Formula/lbdb.rb deleted file mode 100644 index 602f251508a3f..0000000000000 --- a/Formula/lbdb.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Lbdb < Formula - desc "Little brother's database for the mutt mail reader" - homepage "https://www.spinnaker.de/lbdb/" - url "https://www.spinnaker.de/lbdb/download/lbdb_0.48.1.tar.gz" - sha256 "b0cbc68abeb70be779b234f736dd7eb14bf3f7cd1a2ea41e636de1949da025bf" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "838c923b4c208ace533b34a2eba8b78c348bd3cc89fdbdb36c42a45b7e592f52" => :catalina - sha256 "a02ea4967e809c9254dac7726c7ee9365e1ba99a8eef68fe6dfd4de34d2fa5af" => :mojave - sha256 "0e5c126d7cb1c5ed3211ee1758a388597b00f32c3fb22c0420919e3667371ee2" => :high_sierra - sha256 "d22e5b8b66ab51d8c6d324330178284c9b35e3ef17362724089e1e979e9c05d4" => :sierra - end - - depends_on "abook" - - def install - system "./configure", "--prefix=#{prefix}", "--libdir=#{lib}/lbdb" - system "make", "install" - end - - test do - ver = version.to_s.split(".") - assert_match "#{ver[0]}.#{ver[1]}", shell_output("#{bin}/lbdbq -v") - end -end diff --git a/Formula/lbzip2.rb b/Formula/lbzip2.rb deleted file mode 100644 index ea1674efe6898..0000000000000 --- a/Formula/lbzip2.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Lbzip2 < Formula - desc "Parallel bzip2 utility" - homepage "https://github.com/kjn/lbzip2" - url "https://web.archive.org/web/20170304050514/archive.lbzip2.org/lbzip2-2.5.tar.bz2" - mirror "https://fossies.org/linux/privat/lbzip2-2.5.tar.bz2" - sha256 "eec4ff08376090494fa3710649b73e5412c3687b4b9b758c93f73aa7be27555b" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "680d9be89102168fac9b4ae8403486d99c7337423f0774721a620ffb338d226a" => :catalina - sha256 "e9a936e34f1b42f2b7c57deb4eebfa76ee9dd8967960fad81babef5ac8f23867" => :mojave - sha256 "d297c1d65f6d255c8fec3afa0b79b9b24e92b5462f47673ba8950a8c81a06b90" => :high_sierra - sha256 "e30a2f0d1bb044183857ea0f6c0b314f97b66b800916f71c0788cbdcf58fcdbc" => :sierra - sha256 "91c1fb0593205365ff4ada30a34fe7f3afcb1c4e684a3bf239e9168d9fdfc4f7" => :el_capitan - sha256 "983c8fe1c23dbfdb73d9e7320e776521c4998169a2d17cd1c6f3035674d8a147" => :yosemite - sha256 "7e521c70fadae71ad2e7807cc844183c05751e4a2433d9f1210069fb2a34333e" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - - system "make", "install" - end - - test do - touch "fish" - system "#{bin}/lbzip2", "fish" - system "#{bin}/lbunzip2", "fish.bz2" - end -end diff --git a/Formula/lc0.rb b/Formula/lc0.rb deleted file mode 100644 index e2b4c0619284b..0000000000000 --- a/Formula/lc0.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Lc0 < Formula - desc "Open source neural network based chess engine" - homepage "https://lczero.org/" - - url "https://github.com/LeelaChessZero/lc0.git", - :tag => "v0.26.0", - :revision => "09edc73cf177f5f1d00e54549b6fa491e0507b56" - license "GPL-3.0" - revision 1 - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "468c173bd7435f97d516b9b4fb1817402a807de7f918a1683747b03fd8885d8c" => :catalina - sha256 "c39b2e6a6c154e7a82c358faa46ff878ef6334e9e58638a550baef78a6fe0db1" => :mojave - sha256 "7db068bc2f8104a9fa487e91ff06add704d2c491b1894a343fa6d8bc39a8b0e6" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "python@3.8" => :build # required to compile .pb files - - resource "network" do - url "https://training.lczero.org/get_network?sha=00af53b081e80147172e6f281c01daf5ca19ada173321438914c730370aa4267", :using => :nounzip - sha256 "12df03a12919e6392f3efbe6f461fc0ff5451b4105f755503da151adc7ab6d67" - end - - def install - system "meson", *std_meson_args, "-Dgtest=false", "--buildtype", "release", "build/release" - - cd "build/release" do - system "ninja", "-v" - libexec.install "lc0" - end - - bin.write_exec_script libexec/"lc0" - libexec.install resource("network") - end - - test do - assert_match /^bestmove e2e4$/, - shell_output("lc0 benchmark --backend=blas --nodes=1 --num-positions=1") - end -end diff --git a/Formula/lcdf-typetools.rb b/Formula/lcdf-typetools.rb deleted file mode 100644 index e0156fc9ace7e..0000000000000 --- a/Formula/lcdf-typetools.rb +++ /dev/null @@ -1,26 +0,0 @@ -class LcdfTypetools < Formula - desc "Manipulate OpenType and multiple-master fonts" - homepage "https://www.lcdf.org/type/" - url "https://www.lcdf.org/type/lcdf-typetools-2.108.tar.gz" - sha256 "fb09bf45d98fa9ab104687e58d6e8a6727c53937e451603662338a490cbbcb26" - license "GPL-2.0" - - bottle do - sha256 "e7ce2d4d16d2b79e482cb862231519653e6d3c09cd5e310573b04f804323e1e3" => :catalina - sha256 "0fd983396dbcf027e560753e6f25797500d085762edcf59a1a2034cd55c24cfd" => :mojave - sha256 "cdff1c16d03fd920033f85dd2e2180f91791057729fbd26b6f193ac7cd0ce9f4" => :high_sierra - sha256 "2bfe28f9e869eec676cada56bcf6efe97024e0e1f93b126a7b26ac2a292db2af" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-kpathsea" - system "make", "install" - end - - test do - font_name = (MacOS.version >= :catalina) ? "Arial\\ Unicode.ttf" : "Arial.ttf" - assert_include shell_output("#{bin}/otfinfo -p /Library/Fonts/#{font_name}"), "Arial" - end -end diff --git a/Formula/lcdproc.rb b/Formula/lcdproc.rb deleted file mode 100644 index d6047d453d57d..0000000000000 --- a/Formula/lcdproc.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Lcdproc < Formula - desc "Display real-time system information on a LCD" - homepage "http://www.lcdproc.org/" - url "https://github.com/lcdproc/lcdproc/releases/download/v0.5.9/lcdproc-0.5.9.tar.gz" - sha256 "d48a915496c96ff775b377d2222de3150ae5172bfb84a6ec9f9ceab962f97b83" - license "GPL-2.0" - - bottle do - sha256 "73cd6420af4af10ee768e8aa5e9fd17621d9216d55a3cb9d3b96a94955166a16" => :catalina - sha256 "1a875cd265136e02f28f31cd9138c8814deaf793704792be5f2cccf5aa6736fb" => :mojave - sha256 "59439a9e18e3e8e636a60e1710cd10f8a4bad8632d08782fc4442a2427fe1ddb" => :high_sierra - sha256 "2371b10dc3bd2644ac83ced35dcde1960110217385f9f5547917ebbbb823e332" => :sierra - sha256 "1de4bece6e781dc6d88d000039095cbf6edbd10313163ef9644152d67778171c" => :el_capitan - sha256 "2ac794ede644c1c86b321af648eb2b0197762cb7e5eb09cd0a31e8eed842e2f9" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "libftdi0" - depends_on "libhid" - depends_on "libusb" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-drivers=all", - "--enable-libftdi=yes" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/lcdproc -v 2>&1") - end -end diff --git a/Formula/lci.rb b/Formula/lci.rb deleted file mode 100644 index cb9380658898b..0000000000000 --- a/Formula/lci.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Lci < Formula - desc "Interpreter for the lambda calculus" - homepage "https://lci.sourceforge.io/" - url "https://downloads.sourceforge.net/project/lci/lci/0.6/lci-0.6.tar.gz" - sha256 "204f1ca5e2f56247d71ab320246811c220ed511bf08c9cb7f305cf180a93948e" - license "GPL-2.0" - - bottle do - sha256 "a666107791ca81169da0ef403abeb77f5081baa97347d589c49c41c36650db7e" => :catalina - sha256 "b2bf5e93bb4fdf90b6169b03fe046500fbc196c6d13068160bc92585e66384b3" => :mojave - sha256 "f6a6d06cb581a5b3c00b05f8785ee33b2c9b69d5b920e8a7234aab3374ca988b" => :high_sierra - sha256 "207ba1b6eec2e084af44e03c96a25db72fc6fc6a265824a8aad0550bd3178167" => :sierra - sha256 "88603e7d22fa41138940318a9ce703087062a5466e796a17d636f9ca212a9fc3" => :el_capitan - sha256 "46a84d5644606edb37c1f915df039901ac96d6728345bb95d57ed52fe783a34d" => :yosemite - sha256 "d9c2381543f5fff02005a66d07f5c8fb925e4c2c40d87392816947c3c1b22816" => :mavericks - end - - conflicts_with "lolcode", :because => "both install `lci` binaries" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/lcm.rb b/Formula/lcm.rb deleted file mode 100644 index bff0c53e9e3b7..0000000000000 --- a/Formula/lcm.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Lcm < Formula - desc "Libraries and tools for message passing and data marshalling" - homepage "https://lcm-proj.github.io/" - url "https://github.com/lcm-proj/lcm/releases/download/v1.4.0/lcm-1.4.0.zip" - sha256 "e249d7be0b8da35df8931899c4a332231aedaeb43238741ae66dc9baf4c3d186" - license "LGPL-2.1" - revision 4 - head "https://github.com/lcm-proj/lcm.git" - - bottle do - cellar :any - sha256 "aa4335f0aebe0e8cd91d939d682dbf04ee7f25461967b377ff75133717be9fd4" => :catalina - sha256 "8186cc599f880aa2028db0af661119beb7fa8a4422557d63837ab2937d265af5" => :mojave - sha256 "46c787c483e3f1c9cfb62b64c3ffab3b83688d00156046d67208071b9b048e8a" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "lua" - depends_on "openjdk" - depends_on "python@3.8" - - def install - args = std_cmake_args + %W[ - -DLCM_ENABLE_EXAMPLES=OFF - -DLCM_ENABLE_TESTS=OFF - -DLCM_JAVA_TARGET_VERSION=8 - -DPYTHON_EXECUTABLE=#{Formula["python@3.8"].opt_bin}/python3 - ] - - mkdir "build" do - system "cmake", *args, ".." - system "make" - system "make", "install" - end - end - - test do - (testpath/"example_t.lcm").write <<~EOS - package exlcm; - struct example_t { - int64_t timestamp; - double position[3]; - string name; - } - EOS - system bin/"lcm-gen", "-c", "example_t.lcm" - assert_predicate testpath/"exlcm_example_t.h", :exist?, "lcm-gen did not generate C header file" - assert_predicate testpath/"exlcm_example_t.c", :exist?, "lcm-gen did not generate C source file" - system bin/"lcm-gen", "-x", "example_t.lcm" - assert_predicate testpath/"exlcm/example_t.hpp", :exist?, "lcm-gen did not generate C++ header file" - system bin/"lcm-gen", "-j", "example_t.lcm" - assert_predicate testpath/"exlcm/example_t.java", :exist?, "lcm-gen did not generate Java source file" - system bin/"lcm-gen", "-p", "example_t.lcm" - assert_predicate testpath/"exlcm/example_t.py", :exist?, "lcm-gen did not generate Python source file" - end -end diff --git a/Formula/lcov.rb b/Formula/lcov.rb deleted file mode 100644 index b6bf28fbb66cc..0000000000000 --- a/Formula/lcov.rb +++ /dev/null @@ -1,87 +0,0 @@ -class Lcov < Formula - desc "Graphical front-end for GCC's coverage testing tool (gcov)" - homepage "https://github.com/linux-test-project/lcov" - url "https://github.com/linux-test-project/lcov/releases/download/v1.14/lcov-1.14.tar.gz" - sha256 "14995699187440e0ae4da57fe3a64adc0a3c5cf14feab971f8db38fb7d8f071a" - license "GPL-2.0" - revision 2 - head "https://github.com/linux-test-project/lcov.git" - - bottle do - cellar :any_skip_relocation - sha256 "90c994926b62eed98249982152fdc763805c14f700dab908410a2a7c66f1cce6" => :catalina - sha256 "4ffc0d4d6051ae4f8e3f53526433725f270e8dabca57acf41f7e99773b5a8889" => :mojave - sha256 "efa4bb222f6e9f8b12ca687d470b2c4f4ff2e23e88287bc2fe8c07eb81460f8d" => :high_sierra - end - - depends_on "gcc" => :test - - uses_from_macos "perl" - - resource "JSON" do - url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.02.tar.gz" - sha256 "444a88755a89ffa2a5424ab4ed1d11dca61808ebef57e81243424619a9e8627c" - end - - resource "PerlIO::gzip" do - url "https://cpan.metacpan.org/authors/id/N/NW/NWCLARK/PerlIO-gzip-0.20.tar.gz" - sha256 "4848679a3f201e3f3b0c5f6f9526e602af52923ffa471a2a3657db786bd3bdc5" - end - - # The following 2 patches fix compatibiliry with gcc-9 - # Remove in the next release - patch do - url "https://github.com/linux-test-project/lcov/commit/ebfeb3e179e450c69c3532f98cd5ea1fbf6ccba7.patch?full_index=1" - sha256 "83d380e753eda054d73da08774e9ca01aa642440ffb93a0f8f3d1ac81e35d006" - end - - patch do - url "https://github.com/linux-test-project/lcov/commit/75fbae1cfc5027f818a0bb865bf6f96fab3202da.patch?full_index=1" - sha256 "72cf3f356a4ac0ff98a66ef7bc085b5be3b41f155decc9ef4eca8ec140840e7f" - 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 %w[bin/genhtml bin/geninfo bin/lcov], - "/etc/lcovrc", "#{prefix}/etc/lcovrc" - system "make", "PREFIX=#{prefix}", "BIN_DIR=#{bin}", "MAN_DIR=#{man}", "install" - - # Disable dynamic selection of perl which may cause segfault when an - # incompatible perl is picked up. - # https://github.com/Homebrew/homebrew-core/issues/4936 - perl_files = Dir["#{bin}/*"] - inreplace perl_files, "#!/usr/bin/env perl", "#!/usr/bin/perl" - - bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - gcc = Formula["gcc"].opt_bin/"gcc-#{Formula["gcc"].version_suffix}" - gcov = Formula["gcc"].opt_bin/"gcov-#{Formula["gcc"].version_suffix}" - - (testpath/"hello.c").write <<~EOS - #include - int main(void) - { - puts("hello world"); - return 0; - } - EOS - - system gcc, "-g", "-O2", "--coverage", "-o", "hello", "hello.c" - system "./hello" - system "#{bin}/lcov", "--gcov-tool", gcov, "--directory", ".", "--capture", "--output-file", "all_coverage.info" - - assert_predicate testpath/"all_coverage.info", :exist? - assert_include (testpath/"all_coverage.info").read, testpath/"hello.c" - end -end diff --git a/Formula/lcrack.rb b/Formula/lcrack.rb deleted file mode 100644 index c0b747d337d45..0000000000000 --- a/Formula/lcrack.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Lcrack < Formula - desc "Generic password cracker" - homepage "https://packages.debian.org/sid/lcrack" - url "https://deb.debian.org/debian/pool/main/l/lcrack/lcrack_20040914.orig.tar.gz" - version "20040914" - sha256 "63fe93dfeae92677007f1e1022841d25086b92d29ad66435ab3a80a0705776fe" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "229ccd2408afb62d18a8ea9f68cf7d065720fb9137b1b14f9d4e7aaffc178865" => :catalina - sha256 "d1d84ad9e2d7a9c6c8ed9eaedb70362ef362efa72c236aa9610ece7cefcd6029" => :mojave - sha256 "9d903ca15b5614ebfef876b53ddba7bc6b7798d0a79a56fceb86b6518844103e" => :high_sierra - sha256 "8e5fb5b2ad952ea17bc314a9ae49ce4baf736868448e833600c394b60d326846" => :sierra - sha256 "2bd1de3426e4bd4ebfc6fb6026dc9a9fd046a5d9345459700a2361b7fe53f49c" => :el_capitan - sha256 "443e64bdb0307e12f4ef990abea7941239784cb7c9798929880a7973f86cf5bc" => :yosemite - sha256 "7ce0dcf84e40ecf7bffc05b068f8c5109d055e654fba8a8c918cbfada447e19e" => :mavericks - end - - def install - system "./configure" - system "make" - bin.install "lcrack" - - # This prevents installing slightly generic names (regex) - # and also mimics Debian's installation of lcrack. - %w[mktbl mkword regex].each do |prog| - bin.install prog => "lcrack_#{prog}" - end - end - - test do - (testpath/"secrets.txt").write "root:5ebe2294ecd0e0f08eab7690d2a6ee69:SECRET" - (testpath/"dict.txt").write "secret" - - output = pipe_output("#{bin}/lcrack -m md5 -d dict.txt -xf+ -s a-z -l 1-8 secrets.txt 2>&1") - assert_match "Found: 1", output - end -end diff --git a/Formula/lcs.rb b/Formula/lcs.rb deleted file mode 100644 index e66e05e7a5661..0000000000000 --- a/Formula/lcs.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Lcs < Formula - desc "Satirical console-based political role-playing/strategy game" - homepage "https://sourceforge.net/projects/lcsgame/" - url "https://svn.code.sf.net/p/lcsgame/code/trunk", :revision => "738" - version "4.07.4b" - license "GPL-2.0" - head "https://svn.code.sf.net/p/lcsgame/code/trunk" - - bottle do - sha256 "65391613e5fd3ea3d8e5f7a2d5586105e3408bb09cddb77aebcfd4bcb7e3396a" => :catalina - sha256 "91469578607a9f4d1ae989ee523f2b5dd97c976d32d9a822769129df828163e5" => :mojave - sha256 "5b640b7b87dfe6603670addce1b6af77b0cd7ebbda10c445fddc6d365960e761" => :high_sierra - sha256 "a8fa614ec5adc3ee2d7417a024bf5e9c78e9f8d4e043e0b916dc5a99f1bb1d9c" => :sierra - sha256 "621487b12c93a9b37e1330041f979a28d3d310c1d8c9efecf274808d081d510e" => :el_capitan - sha256 "9ca23650e17e177c4c9fa5352dc81a9f415bc3778b2fd8a55330936eb4d7d28c" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - system "./bootstrap" - system "./configure", "LIBS=-liconv", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/ldapvi.rb b/Formula/ldapvi.rb deleted file mode 100644 index 4ab4dc53b7104..0000000000000 --- a/Formula/ldapvi.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Ldapvi < Formula - desc "Update LDAP entries with a text editor" - homepage "http://www.lichteblau.com/ldapvi/" - url "http://www.lichteblau.com/download/ldapvi-1.7.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/l/ldapvi/ldapvi_1.7.orig.tar.gz" - sha256 "6f62e92d20ff2ac0d06125024a914b8622e5b8a0a0c2d390bf3e7990cbd2e153" - revision 7 - - bottle do - cellar :any - sha256 "945ba55247fff673cc497f0ef27761790044f9cd337df3d395ca0043ef2ee651" => :catalina - sha256 "b227a947ef652d2f335f7ccc7a1334efa2db1fc3a3a6666b35e91310c17548f0" => :mojave - sha256 "4da9e2cc356624f5b6ad3e6b1c36e934329d80f385d31ac712693d4e8734a4c1" => :high_sierra - sha256 "e6babe3042fee412c0ad7cf89dd95a13d2530d9cd8f6d02c7380bae408ed0040" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "xz" => :build # Homebrew bug. Shouldn't need declaring explicitly. - depends_on "gettext" - depends_on "glib" - depends_on "openssl@1.1" - depends_on "popt" - depends_on "readline" - - # These patches are applied upstream but release process seems to be dead. - # http://www.lichteblau.com/git/?p=ldapvi.git;a=commit;h=256ced029c235687bfafdffd07be7d47bf7af39b - # http://www.lichteblau.com/git/?p=ldapvi.git;a=commit;h=a2717927f297ff9bc6752f281d4eecab8bd34aad - patch do - url "https://deb.debian.org/debian/pool/main/l/ldapvi/ldapvi_1.7-10.debian.tar.xz" - sha256 "93be20cf717228d01272eab5940337399b344bb262dc8bc9a59428ca604eb6cb" - apply "patches/05_getline-conflict", - "patches/06_fix-vim-modeline" - end - - def install - # Fix compilation with clang by changing `return` to `return 0`. - inreplace "ldapvi.c", "if (lstat(sasl, &st) == -1) return;", - "if (lstat(sasl, &st) == -1) return 0;" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/ldapvi", "--version" - end -end diff --git a/Formula/ldc.rb b/Formula/ldc.rb deleted file mode 100644 index fbab644345539..0000000000000 --- a/Formula/ldc.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Ldc < Formula - desc "Portable D programming language compiler" - homepage "https://wiki.dlang.org/LDC" - url "https://github.com/ldc-developers/ldc/releases/download/v1.20.1/ldc-1.20.1-src.tar.gz" - sha256 "2b21dfffb6efd2c2158bc83422765335aae34b709ebdc406bb026c21967a1aaf" - head "https://github.com/ldc-developers/ldc.git", :shallow => false - - bottle do - sha256 "122d9a37cccbd671d223a2ce683ad141489633d2f11fa8f662635f6ba4a49027" => :catalina - sha256 "67f9bdd412e9ee9e6864f52ae5b52358a01b93de359fe8aad4b9d7bed73a572a" => :mojave - sha256 "7945dba30bfac0ced442b69a46a477593ee04e3b3f28cc6fdb56b94f58e94706" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libconfig" => :build - depends_on "llvm" - - uses_from_macos "libxml2" => :build - - on_linux do - depends_on "pkg-config" => :build - end - - resource "ldc-bootstrap" do - url "https://github.com/ldc-developers/ldc/releases/download/v1.20.1/ldc2-1.20.1-osx-x86_64.tar.xz" - version "1.20.1" - sha256 "b0e711b97d7993ca77fed0f49a7d2cf279249406d46e9cf005dd77d5a4e23956" - end - - def install - ENV.cxx11 - (buildpath/"ldc-bootstrap").install resource("ldc-bootstrap") - - mkdir "build" do - args = std_cmake_args + %W[ - -DLLVM_ROOT_DIR=#{Formula["llvm"].opt_prefix} - -DINCLUDE_INSTALL_DIR=#{include}/dlang/ldc - -DD_COMPILER=#{buildpath}/ldc-bootstrap/bin/ldmd2 - ] - - system "cmake", "..", *args - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.d").write <<~EOS - import std.stdio; - void main() { - writeln("Hello, world!"); - } - EOS - system bin/"ldc2", "test.d" - assert_match "Hello, world!", shell_output("./test") - system bin/"ldc2", "-flto=thin", "test.d" - assert_match "Hello, world!", shell_output("./test") - system bin/"ldc2", "-flto=full", "test.d" - assert_match "Hello, world!", shell_output("./test") - system bin/"ldmd2", "test.d" - assert_match "Hello, world!", shell_output("./test") - end -end diff --git a/Formula/ldid.rb b/Formula/ldid.rb deleted file mode 100644 index 3ce2c05d0167e..0000000000000 --- a/Formula/ldid.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Ldid < Formula - desc "Lets you manipulate the signature block in a Mach-O binary" - homepage "https://cydia.saurik.com/info/ldid/" - url "https://git.saurik.com/ldid.git", - :tag => "v2.1.2", - :revision => "c2f8abf013b22c335f44241a6a552a7767e73419" - license "AGPL-3.0" - revision 1 - head "https://git.saurik.com/ldid.git" - - bottle do - cellar :any - sha256 "fdd2c5d784f91bcbe6117d16763c3b552f08c8aa1783cb0d7017fb1832f353d3" => :catalina - sha256 "b76050d24afe9f92eb6a7f53233c27a530ae59454f7193ff82bcade593022645" => :mojave - sha256 "2a0dd3dd8e0b34980260054420212932e4010eea4e4245307919527aaca7df58" => :high_sierra - end - - depends_on "libplist" - depends_on "openssl@1.1" - - def install - system ENV.cc, "-c", - "-o", "lookup2.o", "lookup2.c", - "-I." - system ENV.cxx, "-std=c++11", - "-o", "ldid", "lookup2.o", "ldid.cpp", - "-I.", - "-framework", "CoreFoundation", - "-framework", "Security", - "-lcrypto", "-lplist-2.0", "-lxml2" - bin.install "ldid" - ln_s bin/"ldid", bin/"ldid2" - end - - test do - (testpath/"test.c").write <<~EOS - int main(int argc, char **argv) { return 0; } - EOS - - system ENV.cc, "test.c", "-o", "test" - system bin/"ldid", "-S", "test" - end -end diff --git a/Formula/ldns.rb b/Formula/ldns.rb deleted file mode 100644 index 040da0880b61c..0000000000000 --- a/Formula/ldns.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Ldns < Formula - desc "DNS library written in C" - homepage "https://nlnetlabs.nl/projects/ldns/" - url "https://nlnetlabs.nl/downloads/ldns/ldns-1.7.1.tar.gz" - sha256 "8ac84c16bdca60e710eea75782356f3ac3b55680d40e1530d7cea474ac208229" - revision 2 - - bottle do - cellar :any - sha256 "0446a8f1f3bc55d5d618c5bb2137d45dd3784d69e575ebabacf3dddb0d61055a" => :catalina - sha256 "1df2448c33ca744971061cecc782c7fe464b449eb9852c8b6287a59b8f696938" => :mojave - sha256 "da38537015dd33fa5ee0b5a5239cfc57a83aa4806a59b8d2111f7a498595d40a" => :high_sierra - end - - depends_on "swig" => :build - depends_on "openssl@1.1" - depends_on "python@3.8" - - def install - args = %W[ - --prefix=#{prefix} - --with-drill - --with-examples - --with-ssl=#{Formula["openssl@1.1"].opt_prefix} - --with-pyldns - PYTHON_SITE_PKG=#{lib}/python3.8/site-packages - --disable-dane-verify - ] - - if MacOS.version == :mojave - # Fixes: ./contrib/python/ldns_wrapper.c:2746:10: fatal error: 'ldns.h' file not found - inreplace "contrib/python/ldns.i", "#include \"ldns.h\"", "#include " - end - - ENV["PYTHON"] = Formula["python@3.8"].opt_bin/"python3" - system "./configure", *args - - inreplace "Makefile" do |s| - s.change_make_var! "PYTHON_LDFLAGS", "-undefined dynamic_lookup" - s.gsub! /(\$\(PYTHON_LDFLAGS\).*) -no-undefined/, "\\1" - end - - system "make" - system "make", "install" - system "make", "install-pyldns" - (lib/"pkgconfig").install "packaging/libldns.pc" - end - - test do - l1 = <<~EOS - AwEAAbQOlJUPNWM8DQown5y/wFgDVt7jskfEQcd4pbLV/1osuBfBNDZX - qnLI+iLb3OMLQTizjdscdHPoW98wk5931pJkyf2qMDRjRB4c5d81sfoZ - Od6D7Rrx - EOS - l2 = <<~EOS - AwEAAb/+pXOZWYQ8mv9WM5dFva8WU9jcIUdDuEjldbyfnkQ/xlrJC5zA - EfhYhrea3SmIPmMTDimLqbh3/4SMTNPTUF+9+U1vpNfIRTFadqsmuU9F - ddz3JqCcYwEpWbReg6DJOeyu+9oBoIQkPxFyLtIXEPGlQzrynKubn04C - x83I6NfzDTraJT3jLHKeW5PVc1ifqKzHz5TXdHHTA7NkJAa0sPcZCoNE - 1LpnJI/wcUpRUiuQhoLFeT1E432GuPuZ7y+agElGj0NnBxEgnHrhrnZW - UbULpRa/il+Cr5Taj988HqX9Xdm6FjcP4Lbuds/44U7U8du224Q8jTrZ - 57Yvj4VDQKc= - EOS - (testpath/"powerdns.com.dnskey").write <<~EOS - powerdns.com. 10773 IN DNSKEY 256 3 8 #{l1.tr!("\n", " ")} - powerdns.com. 10773 IN DNSKEY 257 3 8 #{l2.tr!("\n", " ")} - EOS - - system "#{bin}/ldns-key2ds", "powerdns.com.dnskey" - - match = "d4c3d5552b8679faeebc317e5f048b614b2e5f607dc57f1553182d49ab2179f7" - assert_match match, File.read("Kpowerdns.com.+008+44030.ds") - end -end diff --git a/Formula/le.rb b/Formula/le.rb deleted file mode 100644 index ddb84c3bcd001..0000000000000 --- a/Formula/le.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Le < Formula - desc "Text editor with block and binary operations" - homepage "https://github.com/lavv17/le" - url "https://github.com/lavv17/le/releases/download/v1.16.7/le-1.16.7.tar.gz" - sha256 "1cbe081eba31e693363c9b8a8464af107e4babfd2354a09a17dc315b3605af41" - license "GPL-3.0" - - bottle do - sha256 "704e7762fb13634aa7b2fe4cc271747894d8ffcf5028abd0d27497bceb6bc378" => :catalina - sha256 "aa1144661f13ab5fbe4eb132415da66785ab1b903c8d517df03f40826d08632f" => :mojave - sha256 "b6fad9458d040f9a47a0d3ff003ab5f77cdb9508a5b653c3cddc201cfb5310e2" => :high_sierra - end - - def install - # Configure script makes bad assumptions about curses locations. - # Future versions allow this to be manually specified: - # https://github.com/lavv17/le/commit/d921a3cdb3e1a0b50624d17e5efeb5a76d64f29d - inreplace "configure", "/usr/local/include/ncurses", "#{MacOS.sdk_path}/usr/include" - - ENV.deparallelize - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "Usage", shell_output("#{bin}/le --help", 1) - end -end diff --git a/Formula/leakcanary-shark.rb b/Formula/leakcanary-shark.rb deleted file mode 100644 index ef882f792e255..0000000000000 --- a/Formula/leakcanary-shark.rb +++ /dev/null @@ -1,31 +0,0 @@ -class LeakcanaryShark < Formula - desc "CLI Java memory leak explorer for LeakCanary" - homepage "https://square.github.io/leakcanary/shark/" - url "https://github.com/square/leakcanary/releases/download/v2.4/shark-cli-2.4.zip" - sha256 "5f9854868873ac6c63da5903082fe4bc3e08a8e46fe5de1335a2122d8e827a9f" - license "Apache-2.0" - - bottle :unneeded - - depends_on "openjdk" - - resource "sample_hprof" do - url "https://github.com/square/leakcanary/raw/v2.2/shark-android/src/test/resources/leak_asynctask_m.hprof" - sha256 "7575158108b701e0f7233bc208decc243e173c75357bf0be9231a1dcb5b212ab" - end - - def install - # Remove Windows scripts - rm_rf Dir["bin/*.bat"] - - libexec.install Dir["*"] - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - resource("sample_hprof").stage do - assert_match "1 APPLICATION LEAKS", - shell_output("#{bin}/shark-cli --hprof ./leak_asynctask_m.hprof analyze").strip - end - end -end diff --git a/Formula/lean-cli.rb b/Formula/lean-cli.rb deleted file mode 100644 index c28159ee82882..0000000000000 --- a/Formula/lean-cli.rb +++ /dev/null @@ -1,33 +0,0 @@ -class LeanCli < Formula - desc "Command-line tool to develop and manage LeanCloud apps" - homepage "https://github.com/leancloud/lean-cli" - url "https://github.com/leancloud/lean-cli/archive/v0.22.0.tar.gz" - sha256 "c00aa7f6510aa9d19e4299acdadd8f726b37d5ce7c664514e6e44c287c5a2cf1" - license "Apache-2.0" - head "https://github.com/leancloud/lean-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "7a5f55ee2ee2f7ec1cc0da511cede9245b8410f0639da8eab0e7d5b47f7a9060" => :catalina - sha256 "b5804747a881fe183502f58486d3e1a27336690c25f2a8aff6b08037409c7100" => :mojave - sha256 "601dc511053b0af1c74b09354812f083293e0fb8c6eab7686949dabe17813cf6" => :high_sierra - end - - depends_on "go" => :build - - def install - build_from = build.head? ? "homebrew-head" : "homebrew" - ENV["GOPATH"] = buildpath - mkdir_p buildpath/"src/github.com/leancloud/" - ln_s buildpath, buildpath/"src/github.com/leancloud/lean-cli" - system "go", "build", "-o", bin/"lean", - "-ldflags", "-X main.pkgType=#{build_from}", - "github.com/leancloud/lean-cli/lean" - bash_completion.install "misc/lean-bash-completion" => "lean" - zsh_completion.install "misc/lean-zsh-completion" => "_lean" - end - - test do - assert_match "lean version #{version}", shell_output("#{bin}/lean --version") - end -end diff --git a/Formula/lean.rb b/Formula/lean.rb deleted file mode 100644 index a38df3b5bd596..0000000000000 --- a/Formula/lean.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Lean < Formula - desc "Theorem prover" - homepage "https://leanprover.github.io/" - url "https://github.com/leanprover/lean/archive/v3.4.2.tar.gz" - sha256 "ec4488be8473577666f38dec81123d0f7b26476139d3caa2e175a571f6c00d87" - license "Apache-2.0" - head "https://github.com/leanprover/lean.git" - - bottle do - cellar :any - sha256 "93067a139b696eec75222a9f14209b1221576281f52238dec585d11f7a39a1c0" => :catalina - sha256 "a4e42293767b2c39d46ededd68ccdbae0deddc8280a8d5a0004390091e91acd4" => :mojave - sha256 "31506dc58b1108625510415a551fea963739898ad675d8cb3023af6e3922e109" => :high_sierra - sha256 "a5df8afdccd0db40f4a9c8184d9197a8a66a47b2c2bbf7451e05976b13274025" => :sierra - end - - depends_on "cmake" => :build - depends_on "gmp" - depends_on "jemalloc" - - def install - mkdir "src/build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"hello.lean").write <<~EOS - def id' {α : Type} (x : α) : α := x - - inductive tree (α : Type) : Type - | node : α → list tree → tree - - example (a b : Prop) : a ∧ b -> b ∧ a := - begin - intro h, cases h, - split, repeat { assumption } - end - EOS - system "#{bin}/lean", testpath/"hello.lean" - end -end diff --git a/Formula/leaps.rb b/Formula/leaps.rb deleted file mode 100644 index 5e4cab4b935d5..0000000000000 --- a/Formula/leaps.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Leaps < Formula - desc "Collaborative web-based text editing service written in Golang" - homepage "https://github.com/jeffail/leaps" - url "https://github.com/Jeffail/leaps.git", - :tag => "v0.9.0", - :revision => "89d8ab9e9130238e56a0df283edbcd1115ec9225" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "5cecda6732be6b32d1184038a5e1ad008c438053eabed0880c2f2ad194c4fefb" => :catalina - sha256 "9e40e4b5b75c73411f6ab74bea028f72f25f8b788eadf032f0f5cfed03baefae" => :mojave - sha256 "37343e978d4035fa9b2881c038748ec4704bf8a57308c59e64592dd404166e36" => :high_sierra - sha256 "d269ec8f0e492e2a9c7804ca2cc6d9211a9be7c3dfbb0daaab19c5b14bef5b24" => :sierra - sha256 "e36259af15ec8cf6546b1f7d99a105efb9a30c198f549a67964417e31892fe97" => :el_capitan - end - - depends_on "dep" => :build - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/jeffail/leaps").install buildpath.children - cd "src/github.com/jeffail/leaps" do - system "dep", "ensure", "-vendor-only" - system "go", "build", "-o", bin/"leaps", "./cmd/leaps" - prefix.install_metafiles - end - end - - test do - port = ":#{free_port}" - - # Start the server in a fork - leaps_pid = fork do - exec "#{bin}/leaps", "-address", port - end - - # Give the server some time to start serving - sleep(1) - - # Check that the server is responding correctly - assert_match "You are alone", shell_output("curl -o- http://localhost#{port}") - ensure - # Stop the server gracefully - Process.kill("HUP", leaps_pid) - end -end diff --git a/Formula/ledger.rb b/Formula/ledger.rb deleted file mode 100644 index 3d94ff50841b7..0000000000000 --- a/Formula/ledger.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Ledger < Formula - desc "Command-line, double-entry accounting tool" - homepage "https://ledger-cli.org/" - url "https://github.com/ledger/ledger/archive/v3.2.1.tar.gz" - sha256 "92bf09bc385b171987f456fe3ee9fa998ed5e40b97b3acdd562b663aa364384a" - head "https://github.com/ledger/ledger.git" - - bottle do - sha256 "66d5a0700f708ed2030db289e5fb9437185f3f0cebc03d24a5a18ba299c94063" => :catalina - sha256 "a39a1ce36e416f8d8b920173d598a2635a51e6a15d86da5eee8a02c55c88744b" => :mojave - sha256 "442b0e1736797ca9686168635e991ba36924759e889c3a01052b4e39ba1b7d51" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "gmp" - depends_on "mpfr" - depends_on "python@3.8" - - uses_from_macos "groff" - - def install - ENV.cxx11 - ENV.prepend_path "PATH", Formula["python@3.8"].opt_libexec/"bin" - - args = %W[ - --jobs=#{ENV.make_jobs} - --output=build - --prefix=#{prefix} - --boost=#{Formula["boost"].opt_prefix} - -- - -DBUILD_DOCS=1 - -DBUILD_WEB_DOCS=1 - -DBoost_NO_BOOST_CMAKE=ON - -DPython_FIND_VERSION_MAJOR=3 - ] + std_cmake_args - system "./acprep", "opt", "make", *args - system "./acprep", "opt", "make", "doc", *args - system "./acprep", "opt", "make", "install", *args - - (pkgshare/"examples").install Dir["test/input/*.dat"] - pkgshare.install "contrib" - elisp.install Dir["lisp/*.el", "lisp/*.elc"] - bash_completion.install pkgshare/"contrib/ledger-completion.bash" - end - - test do - balance = testpath/"output" - system bin/"ledger", - "--args-only", - "--file", "#{pkgshare}/examples/sample.dat", - "--output", balance, - "balance", "--collapse", "equity" - assert_equal " $-2,500.00 Equity", balance.read.chomp - assert_equal 0, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/ledit.rb b/Formula/ledit.rb deleted file mode 100644 index abdecfe371d65..0000000000000 --- a/Formula/ledit.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Ledit < Formula - desc "Line editor for interactive commands" - homepage "http://pauillac.inria.fr/~ddr/ledit/" - url "http://pauillac.inria.fr/~ddr/ledit/distrib/src/ledit-2.04.tgz" - sha256 "484897016b001b6d64eb24e38a213177b230ebf8e0d9808a969b62f012e70ee4" - - bottle do - cellar :any_skip_relocation - sha256 "084768158bc35e6f6eb496d0adea9253cbbb18738c8ef03318a079fef179fc80" => :catalina - sha256 "10b506580124bb9ac062675ae72d70d95b73ee67483d6968b8628b7a01cd6653" => :mojave - sha256 "55df7d80dfcfb5c04274f9a33a5fc03a4a1b9b2b1fb4f3b08c0cef83759c74a3" => :high_sierra - sha256 "b7e2b19079d843f9704572bf21de6251e7a6619d809ce230e22be5440517ab57" => :sierra - sha256 "952162580a2542b7038b2702b8a2ed9223e519ca703b221daf054566723ecd59" => :el_capitan - end - - depends_on "camlp5" - depends_on "ocaml" - - def install - # like camlp5, this build fails if the jobs are parallelized - ENV.deparallelize - args = %W[BINDIR=#{bin} LIBDIR=#{lib} MANDIR=#{man}] - system "make", *args - system "make", "install", *args - end - - test do - history = testpath/"history" - pipe_output("#{bin}/ledit -x -h #{history} bash", "exit\n", 0) - assert_predicate history, :exist? - assert_equal "exit\n", history.read - end -end diff --git a/Formula/leela-zero.rb b/Formula/leela-zero.rb deleted file mode 100644 index 33a66397e9bce..0000000000000 --- a/Formula/leela-zero.rb +++ /dev/null @@ -1,41 +0,0 @@ -class LeelaZero < Formula - desc "Neural Network Go engine with no human-provided knowledge" - homepage "https://zero.sjeng.org/" - # pull from git tag to get submodules - url "https://github.com/leela-zero/leela-zero.git", - :tag => "v0.17", - :revision => "3f297889563bcbec671982c655996ccff63fa253" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "b9764e2ebdade7c55ffb44f29f3c546be8003348ecca7b6ea0e93969cdce9032" => :catalina - sha256 "6e95d7ef2f671bc404fcafd426b47cf3c4c9a9f2ab577772c03a1cf721a20444" => :mojave - sha256 "ddb11b34f4a1e210e52ad13c4e789b2f0958278fe3cadfc94dc22afcce59bfa4" => :high_sierra - sha256 "decf1639a96bb4fd9a198f74f7c20413cde1109d913769f0a32cc2a6c9527778" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - - resource "network" do - url "https://zero.sjeng.org/networks/00ff08ebcdc92a2554aaae815fbf5d91e8d76b9edfe82c9999427806e30eae77.gz", :using => :nounzip - sha256 "5302f23818c23e1961dff986ba00f5df5c58dc9c780ed74173402d58fdb6349c" - end - - def install - mkdir "build" - cd "build" do - system "cmake", "..", *std_cmake_args - system "cmake", "--build", "." - bin.install "leelaz" - end - pkgshare.install resource("network") - end - - test do - system "#{bin}/leelaz", "--help" - assert_match /^= [A-T][0-9]+$/, - pipe_output("#{bin}/leelaz --cpu-only --gtp -w #{pkgshare}/*.gz", "genmove b\n", 0) - end -end diff --git a/Formula/legit.rb b/Formula/legit.rb deleted file mode 100644 index 3bb7463bff726..0000000000000 --- a/Formula/legit.rb +++ /dev/null @@ -1,92 +0,0 @@ -class Legit < Formula - include Language::Python::Virtualenv - - desc "Command-line interface for Git, optimized for workflow simplicity" - homepage "https://frostming.github.io/legit/" - url "https://files.pythonhosted.org/packages/cb/e4/8cc5904c486241bf2edc4dd84f357fa96686dc85f48eedb835af65f821bf/legit-1.2.0.post0.tar.gz" - version "1.2.0.post0" - sha256 "949396b68029a8af405ab20c901902341ef6bd55c7fec6dab71141d63d406b11" - head "https://github.com/frostming/legit.git", :branch => "master" - - bottle do - cellar :any_skip_relocation - sha256 "f8e751f24ec29945d19282e2ba4ebbde289f29365c62e2083792bae79b1be7b9" => :catalina - sha256 "3cf90c6383f7a7f0be82aeef8605775de297b3911484d2472970562031d2d008" => :mojave - sha256 "cec24c2e497d9b8c162a06fb867778da3ecb08fe8ff7299a386c8abf1a03f895" => :high_sierra - end - - depends_on "python@3.8" - - resource "args" do - url "https://files.pythonhosted.org/packages/e5/1c/b701b3f4bd8d3667df8342f311b3efaeab86078a840fb826bd204118cc6b/args-0.1.0.tar.gz" - sha256 "a785b8d837625e9b61c39108532d95b85274acd679693b71ebb5156848fcf814" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz" - sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b" - end - - resource "clint" do - url "https://files.pythonhosted.org/packages/3d/b4/41ecb1516f1ba728f39ee7062b9dac1352d39823f513bb6f9e8aeb86e26d/clint-0.5.1.tar.gz" - sha256 "05224c32b1075563d0b16d0015faaf9da43aa214e4a2140e51f08789e7a4c5aa" - 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 "gitdb2" do - url "https://files.pythonhosted.org/packages/c5/62/ed7205331e8d7cc377e2512cb32f8f8f075c0defce767551d0a76e102ce2/gitdb2-2.0.6.tar.gz" - sha256 "1b6df1433567a51a4a9c1a5a0de977aa351a405cc56d7d35f3388bad1f630350" - end - - resource "GitPython" do - url "https://files.pythonhosted.org/packages/1c/08/a2b5ba4ad43c4c33066ced2c45958593ab2554bb0d09f7ecb9bf9092e5f6/GitPython-2.1.8.tar.gz" - sha256 "ad61bc25deadb535b047684d06f3654c001d9415e1971e51c9c20f5b510076e9" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz" - sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" - end - - resource "smmap2" do - url "https://files.pythonhosted.org/packages/3b/ba/e49102b3e8ffff644edded25394b2d22ebe3e645f3f6a8139129c4842ffe/smmap2-2.0.5.tar.gz" - sha256 "29a9ffa0497e7f2be94ca0ed1ca1aa3cd4cf25a1f6b4f5f87f74b46ed91d609a" - end - - def install - virtualenv_install_with_resources - bash_completion.install "extra/bash-completion/legit" - zsh_completion.install "extra/zsh-completion/_legit" - man1.install "extra/man/legit.1" - end - - test do - (testpath/".gitconfig").write <<~EOS - [user] - name = Real Person - email = notacat@hotmail.cat - EOS - system "git", "init" - (testpath/"foo").write("woof") - system "git", "add", "foo" - system "git", "commit", "-m", "init" - system "git", "remote", "add", "origin", "https://github.com/git/git.git" - system "git", "branch", "test" - inreplace "foo", "woof", "meow" - assert_match "test", shell_output("#{bin}/legit branches") - output = shell_output("#{bin}/legit switch test") - assert_equal "Switched to branch 'test'", output.strip.lines.last - assert_equal "woof", (testpath/"foo").read - system "git", "stash", "pop" - assert_equal "meow", (testpath/"foo").read - end -end diff --git a/Formula/lego.rb b/Formula/lego.rb deleted file mode 100644 index 35262ac434725..0000000000000 --- a/Formula/lego.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Lego < Formula - desc "Let's Encrypt client" - homepage "https://go-acme.github.io/lego/" - url "https://github.com/go-acme/lego.git", - :tag => "v3.8.0", - :revision => "bcb5be49c87bab63f9bab23823fd79c7f3d4390a" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "17099d47c1ca1215737ad2a61cfe812f1c3051dfb27f6741c2600d9f94a2a35b" => :catalina - sha256 "c6aec7bc9b37aecf4fd683134ec2e8229d9ab26a4a0a8077cb4190c8c3c5507f" => :mojave - sha256 "4e4f09df739135f9b06b618923d125bfa44d634c38f0170ce7a7bac1e126f801" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", "-trimpath", - "-o", bin/"lego", "cmd/lego/main.go" - prefix.install_metafiles - end - - test do - assert_match version.to_s, shell_output("#{bin}/lego -v") - end -end diff --git a/Formula/leiningen.rb b/Formula/leiningen.rb deleted file mode 100644 index 0dcc7fd185bcd..0000000000000 --- a/Formula/leiningen.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Leiningen < Formula - desc "Build tool for Clojure" - homepage "https://github.com/technomancy/leiningen" - url "https://github.com/technomancy/leiningen/archive/2.9.3.tar.gz" - sha256 "98cc1e58ebe0d71fede73ae6c7699f1b9b944650d57a220e576bc95a3185b846" - head "https://github.com/technomancy/leiningen.git" - - bottle do - cellar :any_skip_relocation - sha256 "70a6ab2365ebf7efd3d2d84fd89d88b59c6417df9225562784f8b6184653a49b" => :catalina - sha256 "70a6ab2365ebf7efd3d2d84fd89d88b59c6417df9225562784f8b6184653a49b" => :mojave - sha256 "70a6ab2365ebf7efd3d2d84fd89d88b59c6417df9225562784f8b6184653a49b" => :high_sierra - end - - resource "jar" do - url "https://github.com/technomancy/leiningen/releases/download/2.9.3/leiningen-2.9.3-standalone.zip", :using => :nounzip - sha256 "23e1df18bc97226d570f47335a8d543e1b759ea303544ea57d5309be3dedcbbb" - end - - def install - jar = "leiningen-#{version}-standalone.jar" - resource("jar").stage do - libexec.install "leiningen-#{version}-standalone.zip" => jar - end - - # bin/lein autoinstalls and autoupdates, which doesn't work too well for us - inreplace "bin/lein-pkg" do |s| - s.change_make_var! "LEIN_JAR", libexec/jar - end - - bin.install "bin/lein-pkg" => "lein" - bash_completion.install "bash_completion.bash" => "lein-completion.bash" - zsh_completion.install "zsh_completion.zsh" => "_lein" - end - - def caveats - <<~EOS - Dependencies will be installed to: - $HOME/.m2/repository - To play around with Clojure run `lein repl` or `lein help`. - EOS - end - - test do - (testpath/"project.clj").write <<~EOS - (defproject brew-test "1.0" - :dependencies [[org.clojure/clojure "1.5.1"]]) - EOS - (testpath/"src/brew_test/core.clj").write <<~EOS - (ns brew-test.core) - (defn adds-two - "I add two to a number" - [x] - (+ x 2)) - EOS - (testpath/"test/brew_test/core_test.clj").write <<~EOS - (ns brew-test.core-test - (:require [clojure.test :refer :all] - [brew-test.core :as t])) - (deftest canary-test - (testing "adds-two yields 4 for input of 2" - (is (= 4 (t/adds-two 2))))) - EOS - system "#{bin}/lein", "test" - end -end diff --git a/Formula/lemon.rb b/Formula/lemon.rb deleted file mode 100644 index e259786537fcd..0000000000000 --- a/Formula/lemon.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Lemon < Formula - desc "LALR(1) parser generator like yacc or bison" - homepage "https://www.hwaci.com/sw/lemon/" - url "https://tx97.net/pub/distfiles/lemon-1.69.tar.bz2" - mirror "https://mirror.amdmi3.ru/distfiles/lemon-1.69.tar.bz2" - sha256 "bc7c1cae233b6af48f4b436ee900843106a15bdb1dc810bc463d8c6aad0dd916" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "286af27372fde1ea7ea8e0eb910a3707b622e73cfc1e66f23e7fbe4bf7d3d59c" => :catalina - sha256 "99d4d1999862af18af2c16f3b80564e2202e3fbb17012283f0c9bdf87ef403b3" => :mojave - sha256 "239bfe217ab89f4e6ef9fbfcc0f82996c3d5ab835324c3b91e42314e1cb002d3" => :high_sierra - end - - def install - pkgshare.install "lempar.c" - - # patch the parser generator to look for the 'lempar.c' template file where we've installed it - inreplace "lemon.c", / = pathsearch\([^)]*\);/, " = \"#{pkgshare}/lempar.c\";" - - system ENV.cc, "-o", "lemon", "lemon.c" - bin.install "lemon" - end - - test do - (testpath/"gram.y").write <<~EOS - %token_type {int} - %left PLUS. - %include { - #include - #include "example1.h" - } - %syntax_error { - std::cout << "Syntax error!" << std::endl; - } - program ::= expr(A). { std::cout << "Result=" << A << std::endl; } - expr(A) ::= expr(B) PLUS expr(C). { A = B + C; } - expr(A) ::= INTEGER(B). { A = B; } - EOS - - system "#{bin}/lemon", "gram.y" - assert_predicate testpath/"gram.c", :exist? - end -end diff --git a/Formula/lensfun.rb b/Formula/lensfun.rb deleted file mode 100644 index f6c45d70a00d4..0000000000000 --- a/Formula/lensfun.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Lensfun < Formula - include Language::Python::Shebang - - desc "Remove defects from digital images" - homepage "https://lensfun.github.io/" - url "https://downloads.sourceforge.net/project/lensfun/0.3.95/lensfun-0.3.95.tar.gz" - sha256 "82c29c833c1604c48ca3ab8a35e86b7189b8effac1b1476095c0529afb702808" - revision 2 - - bottle do - sha256 "66ab460c11f7476a85c31f9941d2b2f35a416d1f2db9a75b029ed038ff63cf0c" => :catalina - sha256 "913b9cebd837443975420bf43b32076b6cd52ca3358599f5ea05229f08e4cc9e" => :mojave - sha256 "6c9f55d9fcc97aeb95654086f739b0ddfc95febb76e9c68037a262a535b3f87e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "libpng" - depends_on "python@3.8" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - - rewrite_shebang detected_python_shebang, - bin/"lensfun-add-adapter", bin/"lensfun-convert-lcp", bin/"lensfun-update-data" - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - system bin/"lensfun-update-data" - end -end diff --git a/Formula/lepton.rb b/Formula/lepton.rb deleted file mode 100644 index b9ee6bf92cbb8..0000000000000 --- a/Formula/lepton.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Lepton < Formula - desc "Tool and file format for losslessly compressing JPEGs" - homepage "https://github.com/dropbox/lepton" - url "https://github.com/dropbox/lepton/archive/1.2.1.tar.gz" - sha256 "c4612dbbc88527be2e27fddf53aadf1bfc117e744db67e373ef8940449cdec97" - license "Apache-2.0" - head "https://github.com/dropbox/lepton.git" - - bottle do - cellar :any_skip_relocation - sha256 "61424564a043a4a02ac9beab50a3c57dc454d4c301e536cf17d1457aac82bba9" => :catalina - sha256 "5b3d88dced1ee91a38ba4a7ede4f21cac5e0ce2d9d5cc3b5f89775c36fbbb177" => :mojave - sha256 "496840db331a445a5ba66475a58782a26d5a910b9d7ed8fb1aa2e0f9b98c68b9" => :high_sierra - sha256 "6713be0e881459057b561cbfd6902d167dc9601be856b8715e9abd6ffc02b605" => :sierra - sha256 "a6a1a47dd2f80fe66d5dfbde97b91ba93d054f6934ba2a950ede603e405e6eed" => :el_capitan - sha256 "700264c93fab4bba78cf62ac3a77ea60099cd38399f00d6972f8093b89dd8404" => :yosemite - sha256 "fc7f77f9ed19af975e747b8eb8e39b6187f12ed226e2b1c15553a8c0e470bdff" => :mavericks - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - cp test_fixtures("test.jpg"), "test.jpg" - system "#{bin}/lepton", "test.jpg", "compressed.lep" - system "#{bin}/lepton", "compressed.lep", "test_restored.jpg" - cmp "test.jpg", "test_restored.jpg" - end -end diff --git a/Formula/leptonica.rb b/Formula/leptonica.rb deleted file mode 100644 index 292482c9d51df..0000000000000 --- a/Formula/leptonica.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Leptonica < Formula - desc "Image processing and image analysis library" - homepage "http://www.leptonica.org/" - url "http://www.leptonica.org/source/leptonica-1.79.0.tar.gz" - sha256 "045966c9c5d60ebded314a9931007a56d9d2f7a6ac39cb5cc077c816f62300d8" - - bottle do - cellar :any - sha256 "2e53934abea2e776f9b532f4ea9d56c12e0bbbd83a54f56aa74de3393450dc11" => :catalina - sha256 "29985739b8eb8fdc9e927bfe95f5ed63c0f11a48f693b8af0210efce4b5d7742" => :mojave - sha256 "715a73dfeab21b60423385a51a400e815857742c4902b4d875083a50bc971354" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "giflib" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "openjpeg" - depends_on "webp" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --with-libwebp - --with-libopenjpeg - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - int main(int argc, char **argv) { - std::fprintf(stdout, "%d.%d.%d", LIBLEPT_MAJOR_VERSION, LIBLEPT_MINOR_VERSION, LIBLEPT_PATCH_VERSION); - return 0; - } - EOS - - flags = ["-I#{include}/leptonica"] + ENV.cflags.to_s.split - system ENV.cxx, "test.cpp", *flags - assert_equal version.to_s, `./a.out` - end -end diff --git a/Formula/lerna.rb b/Formula/lerna.rb deleted file mode 100644 index 054e6fb1001d4..0000000000000 --- a/Formula/lerna.rb +++ /dev/null @@ -1,30 +0,0 @@ -require "language/node" - -class Lerna < Formula - desc "Tool for managing JavaScript projects with multiple packages" - homepage "https://lerna.js.org/" - url "https://registry.npmjs.org/lerna/-/lerna-3.22.1.tgz" - sha256 "77a036b03fafd7a6915ef32ad9e0f5cb1950ae8c86ee27fa886e2e1bad4004ac" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "5f2b51b458e4379c8f4bf192eb532e567fa2a209eff59fc78aa4a73a2c95c9a4" => :catalina - sha256 "363088564849de9b6c79ac5cdbbb872ca43841b0d80af27c85c696cbd2dc75bb" => :mojave - sha256 "833823b45ebd250a74b170f980861ae9cc6831040e5362309e637d13291a97af" => :high_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_match version.to_s, shell_output("#{bin}/lerna --version") - - output = shell_output("#{bin}/lerna init --independent 2>&1") - assert_match "lerna success Initialized Lerna files", output - end -end diff --git a/Formula/less.rb b/Formula/less.rb deleted file mode 100644 index c6921b12b8a31..0000000000000 --- a/Formula/less.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Less < Formula - desc "Pager program similar to more" - homepage "http://www.greenwoodsoftware.com/less/index.html" - url "http://www.greenwoodsoftware.com/less/less-551.tar.gz" - sha256 "ff165275859381a63f19135a8f1f6c5a194d53ec3187f94121ecd8ef0795fe3d" - - bottle do - cellar :any - sha256 "a76b3f1fb43e1e0ab566a70eca5430afa744d6d87430b55e9a5b98160834c8b9" => :catalina - sha256 "2ee3f16d15855ab88ad87067085c0f2dd58c90c5b91ae51499ae0548a24693b2" => :mojave - sha256 "46cd5ba33b6a1d00cfa3993712ea617bce5b6c9908b016a72413f370eda714be" => :high_sierra - end - - depends_on "pcre" - - uses_from_macos "ncurses" - - def install - system "./configure", "--prefix=#{prefix}", "--with-regex=pcre" - system "make", "install" - end - - test do - system "#{bin}/lesskey", "-V" - end -end diff --git a/Formula/lesspipe.rb b/Formula/lesspipe.rb deleted file mode 100644 index dc9ce44b6579b..0000000000000 --- a/Formula/lesspipe.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Lesspipe < Formula - desc "Input filter for the pager less" - homepage "https://www-zeuthen.desy.de/~friebel/unix/lesspipe.html" - url "https://github.com/wofr06/lesspipe/archive/1.84.tar.gz" - sha256 "5eb4811cc8ded108e98448bd83057e730906f643ad689ccd695828f2a46c4410" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ddefc7bc6202699c00fc69d5bf4e22c06a05cc6ad7c49dca5ff84c32b88ad190" => :catalina - sha256 "ddefc7bc6202699c00fc69d5bf4e22c06a05cc6ad7c49dca5ff84c32b88ad190" => :mojave - sha256 "ddefc7bc6202699c00fc69d5bf4e22c06a05cc6ad7c49dca5ff84c32b88ad190" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}", "--yes" - man1.mkpath - system "make", "install" - end - - def caveats - <<~EOS - Append the following to your #{shell_profile}: - export LESSOPEN="|#{HOMEBREW_PREFIX}/bin/lesspipe.sh %s" LESS_ADVANCED_PREPROCESSOR=1 - EOS - end - - test do - touch "file1.txt" - touch "file2.txt" - system "tar", "-cvzf", "homebrew.tar.gz", "file1.txt", "file2.txt" - - assert_predicate testpath/"homebrew.tar.gz", :exist? - assert_match /file2.txt/, shell_output("tar tvzf homebrew.tar.gz | #{bin}/tarcolor") - end -end diff --git a/Formula/lesstif.rb b/Formula/lesstif.rb deleted file mode 100644 index f2a3bee150fa5..0000000000000 --- a/Formula/lesstif.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Lesstif < Formula - desc "Open source implementation of OSF/Motif" - homepage "https://lesstif.sourceforge.io/" - url "https://downloads.sourceforge.net/project/lesstif/lesstif/0.95.2/lesstif-0.95.2.tar.bz2" - sha256 "eb4aa38858c29a4a3bcf605cfe7d91ca41f4522d78d770f69721e6e3a4ecf7e3" - license "GPL-2.0" - - bottle do - rebuild 2 - sha256 "c38e2d072aeade356f5bab6e974fbbeb910259c1fe9d2ed8c352f7b67ca5bd0c" => :catalina - sha256 "a7b26f9ad83bbca9c88de347bc96c616eee9c6d5f0a68caca19b4cffa1347def" => :mojave - sha256 "bb253ab1835a89928a7c9edb904416b75876cedd50f62647e2d6044fcb55f4f4" => :high_sierra - end - - depends_on "freetype" - depends_on :x11 - - conflicts_with "openmotif", - :because => "both Lesstif and Openmotif are complete replacements for each other" - - def install - # LessTif does naughty, naughty, things by assuming we want autoconf macros - # to live in wherever `aclocal --print-ac-dir` says they should. - # Shame on you LessTif! *wags finger* - inreplace "configure", "`aclocal --print-ac-dir`", "#{share}/aclocal" - - # 'sed' fails if LANG=en_US.UTF-8 as is often the case on Macs. - # The configure script finds our superenv sed wrapper, sets SED, - # but then doesn't use that variable. - ENV["LANG"] = "C" - - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--enable-production", - "--disable-dependency-tracking", - "--enable-shared", - "--enable-static" - - system "make" - - # LessTif won't install in parallel 'cause several parts of the Makefile will - # try to make the same directory and `mkdir` will fail. - ENV.deparallelize - system "make", "install" - - # LessTif ships Core.3, which causes a conflict with CORE.3 from - # Perl in case-insensitive file systems. Rename it to LessTifCore.3 - # to avoid this problem. - mv man3/"Core.3", man3/"LessTifCore.3" - end - - def caveats - <<~EOS - The man page for Core.3 has been renamed to LessTifCore.3 to - avoid conflicts with CORE.3 from Perl in case-insensitive file - systems. Please use "man LessTifCore" instead. - EOS - end -end diff --git a/Formula/leveldb.rb b/Formula/leveldb.rb deleted file mode 100644 index 481811714ef0f..0000000000000 --- a/Formula/leveldb.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Leveldb < Formula - desc "Key-value storage library with ordered mapping" - homepage "https://github.com/google/leveldb/" - url "https://github.com/google/leveldb/archive/1.22.tar.gz" - sha256 "55423cac9e3306f4a9502c738a001e4a339d1a38ffbee7572d4a07d5d63949b2" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "908fb99544bbc0906134bc9677fbd91c6948324c4de6cd1315fc7e5e6f6634cc" => :catalina - sha256 "22e4a129bedd5030525f749a5b5ec978bf6da0a9b0625fe829da482a5ab85755" => :mojave - sha256 "b1cf697cad28caac418d2e0ef49bc90863f389402185d3cc0f1f7079516d02c2" => :high_sierra - sha256 "810dbeba5e3f7d72d4772b9eff4d9022a1240c0abc6235afbd343c199741e6f7" => :sierra - end - - depends_on "cmake" => :build - depends_on "gperftools" - depends_on "snappy" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON" - system "make", "install" - bin.install "leveldbutil" - - system "make", "clean" - system "cmake", "..", *std_cmake_args, "-DBUILD_SHARED_LIBS=OFF" - system "make" - lib.install "libleveldb.a" - end - end - - test do - assert_match "dump files", shell_output("#{bin}/leveldbutil 2>&1", 1) - end -end diff --git a/Formula/lf.rb b/Formula/lf.rb deleted file mode 100644 index 4892e4f4c4b4c..0000000000000 --- a/Formula/lf.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Lf < Formula - desc "Terminal file manager" - homepage "https://godoc.org/github.com/gokcehan/lf" - url "https://github.com/gokcehan/lf/archive/r14.tar.gz" - sha256 "5266afa808f4612733af65289024c9eb182864f6a224fdfdf58f405a30c79644" - license "MIT" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "d53611f5c7f78e947eeed932abd4cd64591b416815043e62c971257f1d300cd7" => :catalina - sha256 "9d08c5d7c877993c3a47108fa36f27290c16fd92e198aaff4ab8494a92337f8a" => :mojave - sha256 "6d4f60d4005731fa3c0851caed566add13a11899271523c6815f88b0907e8c1c" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["version"] = version - (buildpath/"src/github.com/gokcehan/lf").install buildpath.children - cd "src/github.com/gokcehan/lf" do - system "./gen/build.sh", "-o", bin/"lf" - prefix.install_metafiles - man1.install "lf.1" - zsh_completion.install "etc/lf.zsh" => "_lf" - fish_completion.install "etc/lf.fish" - end - end - - test do - assert_equal version.to_s, shell_output("#{bin}/lf -version").chomp - assert_match "file manager", shell_output("#{bin}/lf -doc") - end -end diff --git a/Formula/lfe.rb b/Formula/lfe.rb deleted file mode 100644 index ddbab0189ec34..0000000000000 --- a/Formula/lfe.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Lfe < Formula - desc "Concurrent Lisp for the Erlang VM" - homepage "http://lfe.io/" - url "https://github.com/rvirding/lfe/archive/v1.3.tar.gz" - sha256 "1946c0df595ae49ac33fe583f359812dec6349da6acf43c1458534de3267036b" - license "Apache-2.0" - head "https://github.com/rvirding/lfe.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "c57baaef29be1d30231cbc3ff14c4ee103c89bcd86f1b09eb8cd43f8bc9e8dc6" => :catalina - sha256 "d0fd48d72bf02ce31f39aabd5c7ec89aa4bb7f22f7bee979419ba59eabf0bbf5" => :mojave - sha256 "ef0d47df833ea4c17bb07e1287129bb8bebbc870dfffe09b5f4a6f7875ccea52" => :high_sierra - end - - depends_on "emacs" if MacOS.version >= :catalina - depends_on "erlang" - - def install - system "make" - system "make", "MANINSTDIR=#{man}", "install-man" - system "make", "emacs" - libexec.install "bin", "ebin" - bin.install_symlink (libexec/"bin").children - doc.install Dir["doc/*.txt"] - pkgshare.install "dev", "examples", "test" - elisp.install Dir["emacs/*.elc"] - end - - test do - system bin/"lfe", "-eval", '"(io:format \"~p\" (list (* 2 (lists:foldl #\'+/2 0 (lists:seq 1 6)))))"' - end -end diff --git a/Formula/lft.rb b/Formula/lft.rb deleted file mode 100644 index 7b6c7ccbc6f98..0000000000000 --- a/Formula/lft.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Lft < Formula - desc "Layer Four Traceroute (LFT), an advanced traceroute tool" - homepage "https://pwhois.org/lft/" - url "https://pwhois.org/dl/index.who?file=lft-3.91.tar.gz" - sha256 "aad13e671adcfc471ab99417161964882d147893a54664f3f465ec5c8398e6af" - - bottle do - cellar :any_skip_relocation - sha256 "c0b69000709a507f2ec0cc2ff286910e6f2629169367828cfdc26e184654f787" => :catalina - sha256 "83d6fa2b78fb9780fecb9287407825d1731f1c91da30bb75b15f26e632e0720b" => :mojave - sha256 "e0370a6053bedd5c24f62583c2d19c3d0d2fab2fa5cf9003561e60694dad8642" => :high_sierra - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match "isn't available to LFT", shell_output("#{bin}/lft -S -d 443 brew.sh 2>&1") - end -end diff --git a/Formula/lftp.rb b/Formula/lftp.rb deleted file mode 100644 index 30294841ea3a0..0000000000000 --- a/Formula/lftp.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Lftp < Formula - desc "Sophisticated file transfer program" - homepage "https://lftp.yar.ru/" - url "https://lftp.yar.ru/ftp/lftp-4.9.1.tar.xz" - sha256 "5969fcaefd102955dd882f3bcd8962198bc537224749ed92f206f415207a024b" - license "GPL-3.0" - - bottle do - sha256 "88341463e443203acace85f22c68bfecc1e374e97c3bc61a4d55992a7894dbdc" => :catalina - sha256 "7fb04159e36521d586e023c99ac6f63d3a695e6043ae62645c68da964776eebc" => :mojave - sha256 "54a5bfc00d589ffec053ceb367cb1acee8ad1d13a5549eeda097f9b3fb5c92e2" => :high_sierra - end - - depends_on "libidn" - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "zlib" - - def install - # Work around "error: no member named 'fpclassify' in the global namespace" - if MacOS.version == :high_sierra - ENV.delete("HOMEBREW_SDKROOT") - ENV.delete("SDKROOT") - end - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-openssl=#{Formula["openssl@1.1"].opt_prefix}", - "--with-readline=#{Formula["readline"].opt_prefix}", - "--with-libidn=#{Formula["libidn"].opt_prefix}", - # Work around a gnulib issue with macOS Catalina - "gl_cv_func_ftello_works=yes" - - system "make", "install" - end - - test do - system "#{bin}/lftp", "-c", "open https://ftp.gnu.org/; ls" - end -end diff --git a/Formula/lgogdownloader.rb b/Formula/lgogdownloader.rb deleted file mode 100644 index 4c3d5f0b1780c..0000000000000 --- a/Formula/lgogdownloader.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Lgogdownloader < Formula - desc "Unofficial downloader for GOG.com games" - homepage "https://sites.google.com/site/gogdownloader/" - url "https://sites.google.com/site/gogdownloader/lgogdownloader-3.7.tar.gz" - sha256 "984859eb2e0802cfe6fe76b1fe4b90e7354e95d52c001b6b434e0a9f5ed23bf0" - revision 1 - - bottle do - cellar :any - sha256 "bca44f870354015fcb3eb10d3f92ab89d53e9ab5105162a5516bb2e35124328e" => :catalina - sha256 "fd1a8455473243e5d239fdfca4ef143acf5b09633f08fa67cc56e9196d8fd722" => :mojave - sha256 "cacd049687f57f97e7de0c0a00601b1f7e3bfdcb1418a633e9bebcf5b402f3ea" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "help2man" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "htmlcxx" - depends_on "jsoncpp" - depends_on "liboauth" - depends_on "rhash" - depends_on "tinyxml2" - - def install - system "cmake", ".", *std_cmake_args, "-DJSONCPP_INCLUDE_DIR=#{Formula["jsoncpp"].opt_include}" - - system "make", "install" - end - - test do - require "pty" - - ENV["XDG_CONFIG_HOME"] = testpath - reader, writer = PTY.spawn(bin/"lgogdownloader", "--list", "--retries", "1") - writer.write <<~EOS - test@example.com - secret - EOS - writer.close - assert_equal "HTTP: Login failed", reader.read.lines.last.chomp - reader.close - end -end diff --git a/Formula/lha.rb b/Formula/lha.rb deleted file mode 100644 index 526a48a78791f..0000000000000 --- a/Formula/lha.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Lha < Formula - desc "Utility for creating and opening lzh archives" - homepage "https://lha.osdn.jp/" - # Canonical: https://osdn.net/dl/lha/lha-1.14i-ac20050924p1.tar.gz - url "https://dotsrc.dl.osdn.net/osdn/lha/22231/lha-1.14i-ac20050924p1.tar.gz" - version "1.14i-ac20050924p1" - sha256 "b5261e9f98538816aa9e64791f23cb83f1632ecda61f02e54b6749e9ca5e9ee4" - - bottle do - cellar :any_skip_relocation - sha256 "27d0090517f08c929e062ea580515f38297ac00ff403830bc78c2b85caea0447" => :catalina - sha256 "2b5e8d256e2d232014ee9b4dc08a52188dc8e5369f61290f5cdb7381e78b3561" => :mojave - sha256 "f1dac02888773ade3d6c35eeb69c6cb25e08bf91584ae66fec7a362f80583e78" => :high_sierra - sha256 "450fa8188af44eef619302c402860dfd2debab864487424211fbbfa7ff065955" => :sierra - sha256 "35f3e193c1bf0d26c62ea6897721c559191fea64f27d71781a90f670d9a23557" => :el_capitan - sha256 "9cb516a73d1d117c39f63d16b3211df626783c9bb1a7038f524dd9c36045b1ac" => :yosemite - sha256 "bd26a5a48396d06019f7998f4c9bf511a74ef237814fee5f5c8ba9df31b30a37" => :mavericks - end - - head do - url "https://github.com/jca02266/lha.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - conflicts_with "lhasa", :because => "both install a `lha` binary" - - def install - system "autoreconf", "-is" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"foo").write "test" - system "#{bin}/lha", "c", "foo.lzh", "foo" - assert_equal "::::::::\nfoo\n::::::::\ntest", - shell_output("#{bin}/lha p foo.lzh") - end -end diff --git a/Formula/lhasa.rb b/Formula/lhasa.rb deleted file mode 100644 index 9ac46e3eb243a..0000000000000 --- a/Formula/lhasa.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Lhasa < Formula - desc "LHA implementation to decompress .lzh and .lzs archives" - homepage "https://fragglet.github.io/lhasa/" - url "https://github.com/fragglet/lhasa/archive/v0.3.1.tar.gz" - sha256 "ad76d763c7e91f47fde455a1baef4bfb0d1debba424039eabe0140fa8f115c5e" - license "ISC" - head "https://github.com/fragglet/lhasa.git" - - bottle do - cellar :any - sha256 "066d1b549b96700d8b7509e1f90b1564ddc66fc3b1dd18247b450c9990124f36" => :catalina - sha256 "9b7b3503673097759714a75dc5ebc5a4c4e1184c88a80fa036bb39b2d896f0d8" => :mojave - sha256 "36f6530ca2f2908bed047741ce52e41f4ec0d0d726bdd8ecb664958da821b527" => :high_sierra - sha256 "d0abfc9315cfeff37781861e8c7ba2d3eb34003684560ee22a5dfb2acc4dfd5a" => :sierra - sha256 "0d407f1058853c656a4aef717c1e72ff57472e0622fb344a5ef57c4c9ad8c3ee" => :el_capitan - sha256 "afd0b2c24f4e4103c6ab8e918a972fda1b614890fc527bf314cc253e199013ee" => :yosemite - sha256 "eecde92149160d0ec03d5b2f88408d67a4bc03b415ed4a78ff12474f6aa965f4" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - conflicts_with "lha", :because => "both install a `lha` binary" - - def install - system "./autogen.sh", "--prefix=#{prefix}" - system "make", "install" - end - - test do - data = [ - %w[ - 31002d6c68302d0400000004000000f59413532002836255050000865a060001666f6f0 - 50050a4810700511400f5010000666f6f0a00 - ].join, - ].pack("H*") - - pipe_output("#{bin}/lha x -", data) - assert_equal "foo\n", (testpath/"foo").read - end -end diff --git a/Formula/lib/lib3ds.rb b/Formula/lib/lib3ds.rb new file mode 100644 index 0000000000000..1c5687f7f445f --- /dev/null +++ b/Formula/lib/lib3ds.rb @@ -0,0 +1,48 @@ +class Lib3ds < Formula + desc "Library for managing 3D-Studio Release 3 and 4 '.3DS' files" + homepage "https://code.google.com/archive/p/lib3ds/" + url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/lib3ds/lib3ds-1.3.0.zip" + sha256 "f5b00c302955a67fa5fb1f2d3f2583767cdc61fdbc6fd843c0c7c9d95c5629e3" + license "LGPL-2.1-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "7cac898d78de339d70d5aba02ebdfc2703b341f251206f8cb1ebb6c35eac984d" + sha256 cellar: :any, arm64_sonoma: "3eb97f0b621af19c2c00dd8590357fe234954bbaddc81ca0d43323837ce1d50e" + sha256 cellar: :any, arm64_ventura: "065e64a374733b5c8fe9a37c2897e5c366bc2e41bdbcc92708e130eb0a446f88" + sha256 cellar: :any, arm64_monterey: "630075c7c6f6a5d80d39592ed47c6f6a7694a02f32eb5ac0f7de12ddc15d4a56" + sha256 cellar: :any, arm64_big_sur: "2959476e3f2e5a95ca23aa6a9fc4b11f9e8ca202e460d6b00ce2906f043c8936" + sha256 cellar: :any, sonoma: "9acd8d134ef5efb47d11722256f0012be94562994fc87f70f89a9a13d9bb72ed" + sha256 cellar: :any, ventura: "43e5029413555b545a6b4177acdc9b254f3e6a82251ea5bded95dfa5b7f4d93f" + sha256 cellar: :any, monterey: "745bdb83e2fd03b6f96e163055971471f3f4e1ef6ea465adcb765e799b9a01d1" + sha256 cellar: :any, big_sur: "175e42127a596271ed3347b35eeb8088d684b1b46f6efa4d1bbb8d8ef9776605" + sha256 cellar: :any, catalina: "0a5a1fdac0c459e011ef64556c872fdc61678ccc7e06d507239d03729a0a8613" + sha256 cellar: :any, mojave: "61004e5169608ab48287024f45c10f9f95eebd3117edce42cf3a3bf509b93166" + sha256 cellar: :any, high_sierra: "1c6d7e3a2e800cf8fc9f6050032f28eec15bcc7c617622d58ba502c9c1afa740" + sha256 cellar: :any, sierra: "4338a4f81ccc33ad78b30f051085594606b74fe5f7773e197a36f08e0b8967ba" + sha256 cellar: :any, el_capitan: "e5810afd47dd88fb769e6ef62ef558b4ee4e643d4f5ae3fddb019257642b3375" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f4f7ee247f3625649c17b51c43edff23d98d7d3e84dc388a509ab1775ae43d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7adf7c63871e56081abf7ecbf0327d77970aa925812d04082152d32a13d229e5" + end + + 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 + + test do + # create a raw empty 3ds file. + (testpath/"test.3ds").write("\x4d\x4d\x06\x00\x00\x00") + system bin/"3dsdump", "test.3ds" + end +end diff --git a/Formula/lib/libaacs.rb b/Formula/lib/libaacs.rb new file mode 100644 index 0000000000000..48d9b4f4ad592 --- /dev/null +++ b/Formula/lib/libaacs.rb @@ -0,0 +1,83 @@ +class Libaacs < Formula + desc "Implements the Advanced Access Content System specification" + homepage "https://www.videolan.org/developers/libaacs.html" + url "https://get.videolan.org/libaacs/0.11.1/libaacs-0.11.1.tar.bz2" + mirror "https://download.videolan.org/pub/videolan/libaacs/0.11.1/libaacs-0.11.1.tar.bz2" + sha256 "a88aa0ebe4c98a77f7aeffd92ab3ef64ac548c6b822e8248a8b926725bea0a39" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?libaacs[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "ff23fb9dd6dd26f6dde8ac12c298be21546d2e3696fe7b064af1647b3788156d" + sha256 cellar: :any, arm64_sonoma: "7299a85edecb49ec7e77d70dbda59f4ef4d4879f7c7c28f01b7ccfe213675c2b" + sha256 cellar: :any, arm64_ventura: "17fb11e42e6b614543f8bdb7f79ab5ed918a5d2fac7442b9abc46c0bcbab3712" + sha256 cellar: :any, arm64_monterey: "821c6fed1af02d4446d3e376bf8eda6ef671e9623ff1332b5d299a60ef1f2dbc" + sha256 cellar: :any, arm64_big_sur: "9205c7991ff5459dea68e115f5b09d95a937e06798c8ab536b07f554057c4261" + sha256 cellar: :any, sonoma: "8a98b41aa3b27875fc6bde0468647b2dfa0e5dce93e36539db11e587058e7ba4" + sha256 cellar: :any, ventura: "4f0ca503d8c661f8a4dfc42f288ee0e6238207caa4b112d86b244bb59fcbbb4e" + sha256 cellar: :any, monterey: "32d350f3eb0294166767cf9f6f4f65c48e4619a635c8450bea42330d071e74ed" + sha256 cellar: :any, big_sur: "cb432910cc4b313478eeb21e71035f82310189f54090723c9bc4167dc25ada9e" + sha256 cellar: :any, catalina: "75e631b79c6ba6115572a390dd1c2ae75653449b8bd1edc27c549745b3d03ba8" + sha256 cellar: :any_skip_relocation, arm64_linux: "bef6e8371ad31a24f757a5b645cc6ec1c608da65e05a5da1c09a7256cc47af27" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc5a1b4925f4a25d7714f9ddebdd14478d2c75d7d292153a709a412dbb3ba63d" + end + + head do + url "https://code.videolan.org/videolan/libaacs.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "bison" => :build + depends_on "libgcrypt" + + uses_from_macos "flex" => :build + + # Fix missing include. + patch :DATA + + def install + system "./bootstrap" if build.head? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "libaacs/aacs.h" + #include + + int main() { + int major_v = 0, minor_v = 0, micro_v = 0; + + aacs_get_version(&major_v, &minor_v, µ_v); + + printf("%d.%d.%d", major_v, minor_v, micro_v); + return(0); + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-laacs", + "-o", "test" + system "./test" + end +end +__END__ +diff --git a/src/devtools/read_file.h b/src/devtools/read_file.h +index 953b2ef..d218417 100644 +--- a/src/devtools/read_file.h ++++ b/src/devtools/read_file.h +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + static size_t _read_file(const char *name, off_t min_size, off_t max_size, uint8_t **pdata) + { diff --git a/Formula/lib/libabigail.rb b/Formula/lib/libabigail.rb new file mode 100644 index 0000000000000..38c945b2dcd84 --- /dev/null +++ b/Formula/lib/libabigail.rb @@ -0,0 +1,42 @@ +class Libabigail < Formula + desc "ABI Generic Analysis and Instrumentation Library" + homepage "https://sourceware.org/libabigail/" + url "https://mirrors.kernel.org/sourceware/libabigail/libabigail-2.7.tar.xz" + sha256 "467c5b91b655fe82c54f92b35a7c2155e0dd9f5f052a4e4e21caf245e092c2ca" + license "Apache-2.0" => { with: "LLVM-exception" } + + livecheck do + url "https://mirrors.kernel.org/sourceware/libabigail/" + regex(/href=.*?libabigail[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_linux: "7de8d14d00c8437fa48029c8b8ba3a4cdd7e9d7730d30f130b57d98f1ba77f76" + sha256 x86_64_linux: "c285f7fac9ec608cbde9846f968103f6c8df6a94c786399ee2c66e270d1fb631" + end + + head do + url "https://sourceware.org/git/libabigail.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "elfutils" + depends_on "libxml2" + depends_on :linux + depends_on "xxhash" + depends_on "xz" + + 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 "", shell_output("#{bin}/abilint #{test_fixtures("elf/hello")}") + end +end diff --git a/Formula/lib/libabw.rb b/Formula/lib/libabw.rb new file mode 100644 index 0000000000000..9ca0ee7de1b83 --- /dev/null +++ b/Formula/lib/libabw.rb @@ -0,0 +1,123 @@ +class Libabw < Formula + desc "Library for parsing AbiWord documents" + homepage "https://wiki.documentfoundation.org/DLP/Libraries/libabw" + url "https://dev-www.libreoffice.org/src/libabw/libabw-0.1.3.tar.xz" + sha256 "e763a9dc21c3d2667402d66e202e3f8ef4db51b34b79ef41f56cacb86dcd6eed" + license "MPL-2.0" + + livecheck do + url "https://dev-www.libreoffice.org/src/libabw/" + regex(/href=.*?libabw[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "a458a7c83461966a67f75a3cb31fa042af7e20befe3ef21de818ca036a8263e7" + sha256 cellar: :any, arm64_sonoma: "8ac829af4a67294bc85e6959843282df8944dc88c3d295dca20a1f7914881119" + sha256 cellar: :any, arm64_ventura: "6ad85dc29ed6262c148bd70631ea06886e1e7fce5d6c8abf66b9486d85e8055b" + sha256 cellar: :any, arm64_monterey: "32cfa5aeedc8f7bff68a474f0bb6cc8d3501b301bb57c3a13c2a3bf535bedada" + sha256 cellar: :any, arm64_big_sur: "7218127205f7f8cc1032b769e29ec9d12aba7d24c919b5afecde92b5e877953d" + sha256 cellar: :any, sonoma: "86c2fb927daac6b886d4262e5ee7481bb783fe76495c3cee38fc156b61531b9b" + sha256 cellar: :any, ventura: "8e7b0a87423c367ac899cb7459b8d28604f3f75988de7ba3daea77ef2bf70bb0" + sha256 cellar: :any, monterey: "79862a34d53145dcd6c2435578500f6fa01f8697e294d20001430d07ee4fcde6" + sha256 cellar: :any, big_sur: "cb183a618afaa39fca1c827c37d3e93c163b160af94290a65f87ca226a129415" + sha256 cellar: :any, catalina: "01cfa53a2e623a95444477cc924aaa67f362dcf18b5c0780ed271284fa66174b" + sha256 cellar: :any_skip_relocation, arm64_linux: "974b1ad55085f776105bd4bd54436690dc75fe3552769d18da5babf6288e5ad0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3080aed8222be7eb35addd5e04c18ed6c0b322832059a07d029ab1c814c2190e" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + depends_on "librevenge" + + uses_from_macos "gperf" => :build + uses_from_macos "libxml2" + uses_from_macos "zlib" + + def install + system "./configure", "--disable-silent-rules", "--without-docs", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.abw").write <<~EOS + + + + + + application/x-abiword + AbiWord + + + + + + + + +
+

+ This word is bold.

+
+
+ EOS + + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + #include + + int main() { + librevenge::RVNGFileStream input("#{testpath}/test.abw"); + if (!libabw::AbiDocument::isFileFormatSupported(&input)) { + printf("invalid file\\n"); + return 1; + } + + librevenge::RVNGString document; + librevenge::RVNGTextTextGenerator documentGenerator(document, false); + if (!libabw::AbiDocument::parse(&input, &documentGenerator)) { + printf("failed to parse file\\n"); + return 1; + } + + printf("ok\\n"); + return 0; + } + CPP + + assert_equal "This word is bold.\n", shell_output("#{bin}/abw2text test.abw") + + args = %W[ + -I#{include/"libabw-0.1"} -I#{Formula["librevenge"].opt_include/"librevenge-0.0"} + -L#{lib} -L#{Formula["librevenge"].opt_lib} + -labw-0.1 -lrevenge-stream-0.0 -lrevenge-generators-0.0 -lrevenge-0.0 + ] + system ENV.cxx, "test.cpp", *args, "-o", "test" + assert_equal "ok\n", shell_output(testpath/"test") + end +end diff --git a/Formula/lib/libadwaita.rb b/Formula/lib/libadwaita.rb new file mode 100644 index 0000000000000..88f54536b06d2 --- /dev/null +++ b/Formula/lib/libadwaita.rb @@ -0,0 +1,71 @@ +class Libadwaita < Formula + desc "Building blocks for modern adaptive GNOME applications" + homepage "https://gnome.pages.gitlab.gnome.org/libadwaita/" + url "https://download.gnome.org/sources/libadwaita/1.7/libadwaita-1.7.2.tar.xz" + sha256 "28ee2ff589c6debe47af9da7a56e37c97d6849e003918a4b223f690d25f960be" + license "LGPL-2.1-or-later" + + # libadwaita doesn't use GNOME's "even-numbered minor is stable" version + # scheme. This regex is the same as the one generated by the `Gnome` strategy + # but it's necessary to avoid the related version scheme logic. + livecheck do + url :stable + regex(/libadwaita-(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "a6cd29f65a2523969a6ce60b4b55c26bae9e6d3774280b3a6f8704e7035ab478" + sha256 arm64_sonoma: "8d3b6c45f883b8dbb3f795adf483307beb460543d4f08f684e1dfe35f8ffc700" + sha256 arm64_ventura: "ffa104fca831bb0954dcf9a1a8c2ec837d785c9fb1e8fa61b0bffde29dfd05c7" + sha256 sonoma: "91be86a27e9585bcf6f2dc8c0e3f351c06ebc03cc353324595c63d3713ceabb8" + sha256 ventura: "38b6d3aa98ef9557fea75603fb9f794a0d6c8b8f16329803c82d21b05447e54b" + sha256 arm64_linux: "6157e7bb3add9ea9b45493cad6b4f6cb5f9a9d1f2f7e968285bf1d4a40703685" + sha256 x86_64_linux: "9522ec872c8c4e0b87c7d37e7b311f675b066a8548b66c1187dfa38a314189cc" + 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 "sassc" => :build + depends_on "vala" => :build + + depends_on "appstream" + depends_on "fribidi" + depends_on "glib" + depends_on "graphene" + depends_on "gtk4" + depends_on "libsass" + depends_on "pango" + + uses_from_macos "python" => :build + + on_macos do + depends_on "gettext" + end + + 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.c").write <<~C + #include + + int main(int argc, char *argv[]) { + g_autoptr (AdwApplication) app = NULL; + app = adw_application_new ("org.example.Hello", G_APPLICATION_DEFAULT_FLAGS); + return g_application_run (G_APPLICATION (app), argc, argv); + } + C + flags = shell_output("#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs libadwaita-1").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test", "--help" + + # include a version check for the pkg-config files + assert_match version.to_s, (lib/"pkgconfig/libadwaita-1.pc").read + end +end diff --git a/Formula/lib/libaec.rb b/Formula/lib/libaec.rb new file mode 100644 index 0000000000000..13961de5e3a22 --- /dev/null +++ b/Formula/lib/libaec.rb @@ -0,0 +1,95 @@ +class Libaec < Formula + desc "Adaptive Entropy Coding implementing Golomb-Rice algorithm" + homepage "https://gitlab.dkrz.de/k202009/libaec" + url "https://gitlab.dkrz.de/k202009/libaec/-/archive/v1.1.3/libaec-v1.1.3.tar.bz2" + sha256 "46216f9d2f2d3ffea4c61c9198fe0236f7f316d702f49065c811447186d18222" + license "BSD-2-Clause" + head "https://gitlab.dkrz.de/k202009/libaec.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "541259dd6c03672bfbfe4a251ebe70643d5c9a72f264c94315a54b3aafd3e815" + sha256 cellar: :any, arm64_sonoma: "a663972f5eec805fe10beac16c80701375f3f192c4efd7c42788716437fc113d" + sha256 cellar: :any, arm64_ventura: "6eb5fcc80ba76dbf96d4c686d1596124c2f1cc21648e3b25b95e9a459fa982b4" + sha256 cellar: :any, sonoma: "60215c8f7af6e44926030f05c6ebc1344f2b23766c234268bf7ea5eb2fc2a1ad" + sha256 cellar: :any, ventura: "ea401973cd11d71d719097d9611d243ea5eaff7cc110a97136c18d8c74fb2c9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a279f9bb15a0800669f7ac3283c0e46760e09ea1489ae8871d35b9e4a80381e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "abf37dff4d0fd06ecc1086b33ed1a6fe308509c5b65dd063ff4ef0ca212d8d7e" + end + + depends_on "cmake" => [:build, :test] + + # These may have been linked by `szip` before keg_only change + link_overwrite "include/szlib.h" + link_overwrite "lib/libsz.a" + link_overwrite "lib/libsz.dylib" + link_overwrite "lib/libsz.2.dylib" + link_overwrite "lib/libsz.so" + link_overwrite "lib/libsz.so.2" + + def install + # run ctest for libraries, also added `"-DBUILD_TESTING=ON` in the end as + # `std_cmake_args` has `BUILD_TESTING` off + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DBUILD_TESTING=ON" + system "cmake", "--build", "build" + system "ctest", "--test-dir", "build", "--verbose" + system "cmake", "--install", "build" + + # Symlink CMake files to a common linked location. Similar to Linux distros + # like Arch Linux[^1] and Alpine[^2], but we add an extra subdirectory so that + # CMake can automatically find them using the default search procedure[^3]. + # + # [^1]: https://gitlab.archlinux.org/archlinux/packaging/packages/libaec/-/blob/main/PKGBUILD?ref_type=heads#L25 + # [^2]: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/libaec/APKBUILD#L43 + # [^3]: https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure + (lib/"cmake").install_symlink prefix/"cmake" => "libaec" + end + + test do + # Check directory structure of CMake file in case new release changed layout + assert_path_exists lib/"cmake/libaec/libaec-config.cmake" + + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + int main() { + unsigned char * data = (unsigned char *) calloc(1024, sizeof(unsigned char)); + unsigned char * compressed = (unsigned char *) calloc(1024, sizeof(unsigned char)); + for(int i = 0; i < 1024; i++) { data[i] = (unsigned char)(i); } + struct aec_stream strm; + strm.bits_per_sample = 16; + strm.block_size = 64; + strm.rsi = 129; + strm.flags = AEC_DATA_PREPROCESS | AEC_DATA_MSB; + strm.next_in = data; + strm.avail_in = 1024; + strm.next_out = compressed; + strm.avail_out = 1024; + assert(aec_encode_init(&strm) == 0); + assert(aec_encode(&strm, AEC_FLUSH) == 0); + assert(strm.total_out > 0); + assert(aec_encode_end(&strm) == 0); + free(data); + free(compressed); + return 0; + } + CPP + + # Test CMake config package can be automatically found + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + project(test LANGUAGES CXX) + + find_package(libaec CONFIG REQUIRED) + + add_executable(test test.cpp) + target_link_libraries(test libaec::aec) + CMAKE + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "./build/test" + end +end diff --git a/Formula/lib/libagg.rb b/Formula/lib/libagg.rb new file mode 100644 index 0000000000000..970ce383015d6 --- /dev/null +++ b/Formula/lib/libagg.rb @@ -0,0 +1,72 @@ +class Libagg < Formula + desc "High fidelity 2D graphics library for C++" + homepage "https://agg.sourceforge.net/antigrain.com/" + # Canonical URL inaccessible: https://antigrain.com/agg-2.5.tar.gz + url "https://ftp.osuosl.org/pub/blfs/8.0/a/agg-2.5.tar.gz" + sha256 "ab1edc54cc32ba51a62ff120d501eecd55fceeedf869b9354e7e13812289911f" + license "GPL-2.0-or-later" + revision 1 + + # The homepage for this formula is a copy of the original and was created + # after the original was discontinued. There will be no further releases of + # the copy of this software used in the formula, as the developer is deceased. + # New development of libagg occurs in a fork of v2.4 and can be found at: + # https://sourceforge.net/projects/agg/ + livecheck do + skip "No longer developed/maintained" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "057104fa9a817af5b41e424b9faa49446cc8c40b4d61c41186afd3a71e7e2e2c" + sha256 cellar: :any, arm64_sonoma: "eabb00483a8c5c955cc4f4b6351692d4c97709c7a1a14cf465767c7d52c132a7" + sha256 cellar: :any, arm64_ventura: "65786b5cc83db391b6f39b5032498024cd710832705934d34030f780bd239914" + sha256 cellar: :any, arm64_monterey: "397cc6cc076ad6e8105a1888112e7e0c5cc310d4f192ad2f3b479eb13a41c4b3" + sha256 cellar: :any, arm64_big_sur: "fe56ee8021062f9fc853290fa07ffbcc9adab30eeffd566cbdbb041fca7d5044" + sha256 cellar: :any, sonoma: "fdf64bc8570ca6c042299e9f40486aeb6f510327406e5ece26f67ecc41d6075d" + sha256 cellar: :any, ventura: "4c449bc35ecb76cc867700f885087c22abeccc8840a00adfeda0c36b1cf32a0b" + sha256 cellar: :any, monterey: "af427a27e940353797d88a3b3224a43ad15ad51681494902dad975d5c5270d27" + sha256 cellar: :any, big_sur: "12d797bfc9b2a1414787aa3028c1704a5b6f1f000b80ed5e4cd200029f10f160" + sha256 cellar: :any, catalina: "d6770fea6a2589b7641fbeda183ff58835ae463cbbab3178096654b36a99b232" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3fbb4b5c878b6566d343983213d2f21df250d77193d207637942d457bb8e049" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cee5823d550698b94dc7e494af8b5f8a83acebec701264a4c20dec2d828c2240" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "sdl12-compat" + + # Fix build with clang; last release was in 2006 + patch :DATA + + def install + # AM_C_PROTOTYPES was removed in automake 1.12, as it's only needed for + # pre-ANSI compilers + inreplace "configure.in", "AM_C_PROTOTYPES", "" + inreplace "autogen.sh", "libtoolize", "glibtoolize" + + system "sh", "autogen.sh", + "--disable-platform", # Causes undefined symbols + "--disable-ctrl", # No need to run these during configuration + "--disable-examples", + "--disable-sdltest", + *std_configure_args + system "make", "install" + end +end + +__END__ +diff --git a/include/agg_renderer_outline_aa.h b/include/agg_renderer_outline_aa.h +index ce25a2e..9a12d35 100644 +--- a/include/agg_renderer_outline_aa.h ++++ b/include/agg_renderer_outline_aa.h +@@ -1375,7 +1375,7 @@ namespace agg + //--------------------------------------------------------------------- + void profile(const line_profile_aa& prof) { m_profile = &prof; } + const line_profile_aa& profile() const { return *m_profile; } +- line_profile_aa& profile() { return *m_profile; } ++ const line_profile_aa& profile() { return *m_profile; } + + //--------------------------------------------------------------------- + int subpixel_width() const { return m_profile->subpixel_width(); } diff --git a/Formula/lib/libaio.rb b/Formula/lib/libaio.rb new file mode 100644 index 0000000000000..8dc0c87677608 --- /dev/null +++ b/Formula/lib/libaio.rb @@ -0,0 +1,46 @@ +class Libaio < Formula + desc "Linux-native asynchronous I/O access library" + homepage "https://pagure.io/libaio" + url "https://pagure.io/libaio/archive/libaio-0.3.113/libaio-libaio-0.3.113.tar.gz" + sha256 "716c7059703247344eb066b54ecbc3ca2134f0103307192e6c2b7dab5f9528ab" + license "LGPL-2.1-or-later" + head "https://pagure.io/libaio.git", branch: "master" + + # This regex only captures the first three numeric parts of the version + # (e.g., 0.3.110) and omits the optional trailing number (e.g., 0.3.110-1 or + # 0-3-107.1). + livecheck do + url :head + regex(/^libaio[._-]v?(\d+(?:[.-]\d+){1,2})(?:[.-]\d+)*$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("-", ".") } + end + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "f4a891153d9b7a34ea5f63cf64361f78c81c3a56a9cb8af6c94f0911dda3d4ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16a507765ad5025007d29b1a251ca01567a5e25ca82fe01aa4aae87e324646fc" + end + + depends_on :linux + + def install + system "make" + system "make", "prefix=#{prefix}", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) + { + struct io_event *event; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-laio", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libansilove.rb b/Formula/lib/libansilove.rb new file mode 100644 index 0000000000000..9a8f2ddaf8a1b --- /dev/null +++ b/Formula/lib/libansilove.rb @@ -0,0 +1,47 @@ +class Libansilove < Formula + desc "Library for converting ANSI, ASCII, and other formats to PNG" + homepage "https://www.ansilove.org/" + url "https://github.com/ansilove/libansilove/releases/download/1.4.2/libansilove-1.4.2.tar.gz" + sha256 "8bd4d0775ff558aacfebd7e7e284baa96d781183bf767283bf8410f44a2e2434" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "dfb18e4ee2a90aede28ee22f8b97de7eb9fa957b0619658788b4e562ba01391e" + sha256 cellar: :any, arm64_sonoma: "a1cafdd2cb1445925addb324d92288e4f238905416d384571d9769641fc34034" + sha256 cellar: :any, arm64_ventura: "6dec1d8b0d8b0a0ad22327e1d0674bbc557c48999c2f92c6126636f7247475f4" + sha256 cellar: :any, sonoma: "6e9222974a1c639e44e28db4d3c0e128a95dd0cf4fd7f85254ab649062ead51b" + sha256 cellar: :any, ventura: "30ee13455efb6991e98ce76c3446a2010bf8ef20bb5c4dda3a6cc04100d865bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "175358f696c2f5286e866f812b7890f15e30555fe5c12bd7eadeb4a8e050db35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "464592e648d31ec4ade3ee710dde95d5059bec8c3fe47bb9881a05cf3b87d449" + end + + depends_on "cmake" => :build + depends_on "gd" + + 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 argc, char *argv[]) + { + struct ansilove_ctx ctx; + struct ansilove_options options; + + ansilove_init(&ctx, &options); + ansilove_loadfile(&ctx, "example.c"); + ansilove_ansi(&ctx, &options); + ansilove_savefile(&ctx, "example.png"); + ansilove_clean(&ctx); + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lansilove", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libantlr3c.rb b/Formula/lib/libantlr3c.rb new file mode 100644 index 0000000000000..acedca0b68fda --- /dev/null +++ b/Formula/lib/libantlr3c.rb @@ -0,0 +1,59 @@ +class Libantlr3c < Formula + desc "ANTLRv3 parsing library for C" + homepage "https://www.antlr3.org/" + url "https://github.com/antlr/antlr3/archive/refs/tags/3.5.3.tar.gz" + sha256 "a0892bcf164573d539b930e57a87ea45333141863a0dd3a49e5d8c919c8a58ab" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^(?:(?:antlr|release)[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0b28c958040567aca016c773fe2d184aaf8bfe2a849a20265cae9e8980685ae9" + sha256 cellar: :any, arm64_sonoma: "c6fe962be8632362af50b3eb0bf10fe363ddc153d3624c29d0b5d7fdc8e443b0" + sha256 cellar: :any, arm64_ventura: "f3a6b9556e0e61c22a8602a2a593fc286716a1613567476af5c534a443844e57" + sha256 cellar: :any, arm64_monterey: "ee99e528c204f5aaa77e00b6ec513992a663b20077ca6c916e53e759c6d5b544" + sha256 cellar: :any, arm64_big_sur: "af63f0824ce2f3a819d2ddccbc92339a4f83432df923964ab2ce8d735ee682fd" + sha256 cellar: :any, sonoma: "44452d698280968ce15b8d7711a1ef1afc33d94cbecce5e1cfaebfe6d1a11393" + sha256 cellar: :any, ventura: "8fefe8f54568cd3eb22e0d5ac36fe8cbb13b9d1c3be7dda36c6c343b092515fb" + sha256 cellar: :any, monterey: "6f84f798670e1dc4e99d4633c05ec77a29c2f31075be4fd479f446bbb1468d7e" + sha256 cellar: :any, big_sur: "74fe108eded5a9480d78624421c87ebdcf4ea8e55ea95b994f00935f9c7016d2" + sha256 cellar: :any_skip_relocation, arm64_linux: "23ffc02de7c8d3dd2b5db131e584aafd3d12c580a81ff7ff37f905d06214c54a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "89ea3b6e05a369ef0cf3d5ab56e1d98bd9a1507a77f5344da79b5ea12f7123f6" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + cd "runtime/C" do + args = %w[ + --disable-antlrdebug + --disable-debuginfo + --enable-64bit + ] + args << "--disable-abiflags" if OS.linux? && Hardware::CPU.arm? + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *args, *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + end + + test do + (testpath/"hello.c").write <<~C + #include + int main() { + if (0) { + antlr3GenericSetupStream(NULL); + } + return 0; + } + C + system ENV.cc, "hello.c", "-L#{lib}", "-lantlr3c", "-o", "hello", "-O0" + system testpath/"hello" + end +end diff --git a/Formula/lib/libao.rb b/Formula/lib/libao.rb new file mode 100644 index 0000000000000..3c3fd984ba681 --- /dev/null +++ b/Formula/lib/libao.rb @@ -0,0 +1,49 @@ +class Libao < Formula + desc "Cross-platform Audio Library" + homepage "https://www.xiph.org/ao/" + url "https://gitlab.xiph.org/xiph/libao/-/archive/1.2.2/libao-1.2.2.tar.gz" + sha256 "df8a6d0e238feeccb26a783e778716fb41a801536fe7b6fce068e313c0e2bf4d" + license "GPL-2.0-or-later" + head "https://gitlab.xiph.org/xiph/libao.git", branch: "master" + + bottle do + rebuild 3 + sha256 arm64_sequoia: "18630c73a7d4187e4ed527096e9450a4d26bcc4a5918bf94656fe641be16922a" + sha256 arm64_sonoma: "c3252aa3672c5a52882ad70a94219a4284b53415d996ebd21b334ea063ff4e58" + sha256 arm64_ventura: "cca7befa22b09e8ecfb3746d8c6de3cd1a519cf76ab970c8e78acde4dd92cef3" + sha256 arm64_monterey: "87276ccd471ed61409cc6b1fc45b33e3b9ae60414695629cb519a2d7f03bb7e4" + sha256 arm64_big_sur: "4ffbc11b951c7c833881d1a60d20d8969e30bfb85e817b660e38a3fc581ccb9c" + sha256 sonoma: "f6cb690857cde255ac71d09df367afc6de502bd9e7f27081e55116d9e174a075" + sha256 ventura: "9eda661b1d28f5da8c205660cf2c2b9a4ad71d086c39b186cb12d18ff81f9551" + sha256 monterey: "14bc27effce651df160ad5efbb377773479c6ea28b65f585760aa5316c3dc6ad" + sha256 big_sur: "f27a782e33661e2aa75cbfcbe775a2da08f7f781c6e7608e8f1e3a4a354c4cde" + sha256 catalina: "b6ccd4915aa272b58f267995ce3c87ad42388926535fedea0243c9b0b9941089" + sha256 mojave: "cb57d05c66a19dcfac7e45e6a80f195dfd050ca52a9b316133d131c0c8165cf7" + sha256 arm64_linux: "4afd643a9b5267277711e6d28a42d52f0bf7968d3973d3e325b4681a0b966929" + sha256 x86_64_linux: "bdb709d63e9de2e2dc947887fdc3a383b626d24c200cf80ce58eeaffa5ff7eb2" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + def install + ENV["AUTOMAKE_FLAGS"] = "--include-deps" + system "./autogen.sh" + system "./configure", "--enable-static", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + ao_initialize(); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lao", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libapplewm.rb b/Formula/lib/libapplewm.rb new file mode 100644 index 0000000000000..edfaf88eff520 --- /dev/null +++ b/Formula/lib/libapplewm.rb @@ -0,0 +1,62 @@ +class Libapplewm < Formula + desc "Xlib-based library for the Apple-WM extension" + homepage "https://www.x.org/" + url "https://www.x.org/releases/individual/lib/libAppleWM-1.4.1.tar.bz2" + sha256 "5e5c85bcd81152b7bd33083135bfe2287636e707bba25f43ea09e1422c121d65" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9aed87eee9abadbc7e94ee746f6b54588d3eacd9fb455b2d94a96c4b7a19425e" + sha256 cellar: :any, arm64_sonoma: "a85cafdda17d42585277fa6d22fb7b7d71d030c9ec591d4cbcc528a32ef5410e" + sha256 cellar: :any, arm64_ventura: "5292c56db7842b7784fc2d8cb11ca61ea9cfc1ec4c8293c4faeeaf9a8b8de876" + sha256 cellar: :any, arm64_monterey: "054032d8ea48004ed41b659815c0d934cb386280d7651ea304118395bafdc360" + sha256 cellar: :any, arm64_big_sur: "0356059f0accd7c74e4082d944d1404c5b36457d8b3ecc7bee80faeb7523b16b" + sha256 cellar: :any, sonoma: "beefb395695ff755d3d88c6ce1373f03954888d22a737d353059500673605d3d" + sha256 cellar: :any, ventura: "dff0dd7ef1cf645b88d606c7580c60294693c9ebe8a59ccfe477c66ab1765e37" + sha256 cellar: :any, monterey: "05a90d77f0c0803ee859872051157b3070f97b8ab7999d7f4c7ed02e1df57a24" + sha256 cellar: :any, big_sur: "33eb76e5d25de65e9970f5cb9795c8933090ce9eb4e2c9574d589c0b222dde39" + sha256 cellar: :any, catalina: "c3e392ce25599cfe0929f1cd14a24a4d512697c952f15dea0533c2dbb8755b23" + end + + depends_on "pkgconf" => :build + + depends_on "libx11" + depends_on "libxext" + depends_on :macos + + def install + # Use -iframeworkwithsysroot rather than -F to pick up + # system headers from the SDK rather than the live filesystem + # https://gitlab.freedesktop.org/xorg/lib/libapplewm/-/commit/be972ebc3a97292e7d2b2350eff55ae12df99a42 + # TODO: Remove in the next release + inreplace "src/Makefile.in", "-F", "-iframeworkwithsysroot " + system "./configure", "--with-sysroot=#{MacOS.sdk_path}", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(void) { + Display* disp = XOpenDisplay(NULL); + if (disp == NULL) { + fprintf(stderr, "Unable to connect to display\\n"); + return 0; + } + + XAppleWMSetFrontProcess(disp); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", + "-I#{include}", "-L#{lib}", "-L#{Formula["libx11"].lib}", + "-lX11", "-lAppleWM" + system "./test" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libarchive.rb b/Formula/lib/libarchive.rb new file mode 100644 index 0000000000000..48c52ae77d170 --- /dev/null +++ b/Formula/lib/libarchive.rb @@ -0,0 +1,67 @@ +class Libarchive < Formula + desc "Multi-format archive and compression library" + homepage "https://www.libarchive.org/" + url "https://www.libarchive.org/downloads/libarchive-3.7.9.tar.xz" + sha256 "ed8b5732e4cd6e30fae909fb945cad8ff9cb7be5c6cdaa3944ec96e4a200c04c" + license "BSD-2-Clause" + + livecheck do + url :homepage + regex(/href=.*?libarchive[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "237ddde1af210e9168d6a681dd3f96370f7a19eba17af214b099b4dbf9cda0b1" + sha256 cellar: :any, arm64_sonoma: "a475e438093c6505e53fff1ad3e82f532c2b2adcc59db02e799ecbffa5247058" + sha256 cellar: :any, arm64_ventura: "65a9834753334f5bd18f742eee279941621ae35401380f9ccf9c1124358202de" + sha256 cellar: :any, sonoma: "7b661a676a926cdc8d2154d4ac64a7b8124ab9c56ba16b8e4a20fb8b8dc9c507" + sha256 cellar: :any, ventura: "5d8c93941f22f60f2ac5785c1bba35f2679851907e85e3216ff3f5ba1b7a42e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "32a7c58ea92157c4aa069ca4c70385fb52dd40534cd0872c073462c3bcc4161a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1dbe4a7b46dfb122975676b7e69936ef36156c41ddb759742134e2afcdd932b" + end + + keg_only :provided_by_macos + + depends_on "libb2" + depends_on "lz4" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "zlib" + + def install + system "./configure", *std_configure_args, + "--without-lzo2", # Use lzop binary instead of lzo2 due to GPL + "--without-nettle", # xar hashing option but GPLv3 + "--without-xml2", # xar hashing option but tricky dependencies + "--without-openssl", # mtree hashing now possible without OpenSSL + "--with-expat" # best xar hashing option + + system "make", "install" + + # Avoid hardcoding Cellar paths in dependents. + inreplace lib/"pkgconfig/libarchive.pc", prefix.to_s, opt_prefix.to_s + + return unless OS.mac? + + # fixes https://github.com/libarchive/libarchive/issues/1819 + inreplace lib/"pkgconfig/libarchive.pc" do |s| + s.gsub! "Libs.private: ", "Libs.private: -liconv " + s.gsub! "Requires.private: iconv", "" + end + + # Just as apple does it. + ln_s bin/"bsdtar", bin/"tar" + ln_s bin/"bsdcpio", bin/"cpio" + ln_s man1/"bsdtar.1", man1/"tar.1" + ln_s man1/"bsdcpio.1", man1/"cpio.1" + end + + test do + (testpath/"test").write("test") + system bin/"bsdtar", "-czvf", "test.tar.gz", "test" + assert_match "test", shell_output("#{bin}/bsdtar -xOzf test.tar.gz") + end +end diff --git a/Formula/lib/libaribcaption.rb b/Formula/lib/libaribcaption.rb new file mode 100644 index 0000000000000..d75d84b33aa35 --- /dev/null +++ b/Formula/lib/libaribcaption.rb @@ -0,0 +1,52 @@ +class Libaribcaption < Formula + desc "Portable ARIB STD-B24 Caption Decoder/Renderer" + homepage "https://github.com/xqq/libaribcaption" + url "https://github.com/xqq/libaribcaption/archive/refs/tags/v1.1.1.tar.gz" + sha256 "278d03a0a662d00a46178afc64f32535ede2d78c603842b6fd1c55fa9cd44683" + license "MIT" + head "https://github.com/xqq/libaribcaption.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ee6159957adc5a0d51c97ea3ff269abb39c5eafb0a8bddf7c14033827f22a6d0" + sha256 cellar: :any, arm64_sonoma: "350944da4a91c77f3a44925b3f563b97b763f71c9a3ca42d0a6a47d064f27a8c" + sha256 cellar: :any, arm64_ventura: "b4ed009d3d15f9b1ea86896330e05298282388ebaf4865d9629416d0ee61c27c" + sha256 cellar: :any, arm64_monterey: "b36c2311bd81f867b0a7d901b583b037598319d96057f55ad20fd6140fbfc063" + sha256 cellar: :any, sonoma: "9789d6fea6f6dfd1443d067eec9591d3e67b0f68b724e2db60b0aae6ff77f605" + sha256 cellar: :any, ventura: "9c3435a993b489b7b25d02c1c586cc6df386fc1ad9d7563d5b46c84e26560430" + sha256 cellar: :any, monterey: "00512bb7e8fcb54f7b407a0eb1a32620dc364a0a87a6d78374bd9942a4ac4fe1" + sha256 cellar: :any_skip_relocation, arm64_linux: "84244a732beff5af9dd11ecc22abe0c05a665a091bbc98727f2b07a608439945" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b6f81f903e8e95519c2f783bc8749cf9513e684545230d518f445b8e407b8764" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + + on_linux do + depends_on "pkgconf" => :build + depends_on "fontconfig" + depends_on "freetype" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DARIBCC_SHARED_LIBRARY=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + aribcc_context_t* ctx = aribcc_context_alloc(); + if (!ctx) + return 1; + aribcc_context_free(ctx); + return 0; + } + C + flags = shell_output("pkgconf --cflags --libs libaribcaption").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libart.rb b/Formula/lib/libart.rb new file mode 100644 index 0000000000000..61b8450752da3 --- /dev/null +++ b/Formula/lib/libart.rb @@ -0,0 +1,62 @@ +class Libart < Formula + desc "Library for high-performance 2D graphics" + homepage "https://github.com/armon/libart" + url "https://download.gnome.org/sources/libart_lgpl/2.3/libart_lgpl-2.3.21.tar.bz2" + sha256 "fdc11e74c10fc9ffe4188537e2b370c0abacca7d89021d4d303afdf7fd7476fa" + license "LGPL-2.0-or-later" + + # We use a common regex because libart doesn't use GNOME's "even-numbered + # minor is stable" version scheme. + livecheck do + url :stable + regex(/libart_lgpl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "3a01d5d537487e82c16a96a58e50cbfc189c6e2312fc9b93ce3d0ae110585a00" + sha256 cellar: :any, arm64_sonoma: "b966bb5a144183755880f3256404abc104d91444d10620c9cafd847bcc76265d" + sha256 cellar: :any, arm64_ventura: "6264e9bdd039ee87e34893b8565f776309f21d9e0730a1cf48fa801453369cd5" + sha256 cellar: :any, arm64_monterey: "5dc4edf96205d8064d34eca369566f41be1b0df69c4a598bece713550e5aeb26" + sha256 cellar: :any, arm64_big_sur: "8daf6e0691d2fc7f919716cb760a80bbba53295aa5c92d8b05aef4aa1172b09b" + sha256 cellar: :any, sonoma: "084ad1df397fb243b05af1b4d7a6c8856f2d6687c2cf60bdc31dbc9a3c3cf63c" + sha256 cellar: :any, ventura: "9547ae5b20144048c3c37a7486a06cc50e6b4d6b4924c2a15fda580765b2abb3" + sha256 cellar: :any, monterey: "0d0cecb8fccc2fc80a1268bda9c863dae95b45c1cacd73da5e8182d513d41241" + sha256 cellar: :any, big_sur: "1204889805658d4aeb3ec37251e8ab064e995654008be97588bc034505b77314" + sha256 cellar: :any, catalina: "54ca46ebc37bba1fdc39e8b28c166202e7d488d93cc5b4acfb042a14adec84f9" + sha256 cellar: :any, mojave: "5fc8b240a975efcb5bd3992afd4d01c0a393a306a4a66192cb9a10e580bcf4d3" + sha256 cellar: :any, high_sierra: "c5ae59f4955fd1b4e3c49976b06609d56c5079d2b0f6e0675b356b1eb09181cd" + sha256 cellar: :any, sierra: "e9e14623ba0284a89dd09c7be72393619582c5d0489891cd1f654b6c26b0fabc" + sha256 cellar: :any, el_capitan: "18fb7a842650151fef102efadefa52aa12dc3f597ace95b8e25efe6518a65d2e" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd57523ef3d776e1c33ceb83f155ed36426f1f109847b004052cd748f8c20146" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b28ae4a3601b0bace6e40c19e616e2e321f17231a378241dae4aa9db9764d75" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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 + assert_match version.to_s, shell_output("#{bin}/libart2-config --version") + + (testpath/"test.c").write <<~EOS + #include + int main(void) { + return 0; + } + EOS + + system ENV.cc, "-o", "test", "test.c", "-I#{include}/libart-2.0", "-L#{lib}", "-lart_lgpl_2" + system "./test" + end +end diff --git a/Formula/lib/libass.rb b/Formula/lib/libass.rb new file mode 100644 index 0000000000000..ea96a4c3a45a5 --- /dev/null +++ b/Formula/lib/libass.rb @@ -0,0 +1,78 @@ +class Libass < Formula + desc "Subtitle renderer for the ASS/SSA subtitle format" + homepage "https://github.com/libass/libass" + url "https://github.com/libass/libass/releases/download/0.17.3/libass-0.17.3.tar.xz" + sha256 "eae425da50f0015c21f7b3a9c7262a910f0218af469e22e2931462fed3c50959" + license "ISC" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2c948ddd9b7a94dd267cdc24cd684903b292d26d6ce92e6d2d7c68136b071e4d" + sha256 cellar: :any, arm64_sonoma: "9e8889c7d434e4a56a0f9abbb1fded340dae984d05121ad5413715e3abb03fd3" + sha256 cellar: :any, arm64_ventura: "d0724c2ba6a6aa6f1ffb604a5cde5bf341e835369e72216042bbb2587acb83cf" + sha256 cellar: :any, arm64_monterey: "f16d796553df4b3ae94c458ae687ce824ea8e66a75bd66ff6df2f0bfe4202ab7" + sha256 cellar: :any, sonoma: "4db6c9473a71166cd6cc5d95b5fab7da9432e081855aad495fe2eb7c0b51bf31" + sha256 cellar: :any, ventura: "1284a21e45e033cf6df87e7fc01e3d9fb3204e24ba5580bdfac941fff69e9a63" + sha256 cellar: :any, monterey: "07a27068fd1c52b021d39b0cd9daa99b2fd6f0ac8f70e05b20b9116c5d848507" + sha256 cellar: :any_skip_relocation, arm64_linux: "e92f33c8e54a1e66f87a3aa40b1f64095f739fa7dd38272c41e1c3ade66e391e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45ef7e90470c2f9a0304b343b6216b9632be26599ca0cbadd3705d5cbf11851b" + end + + head do + url "https://github.com/libass/libass.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "fribidi" + depends_on "harfbuzz" + depends_on "libunibreak" + + on_linux do + depends_on "fontconfig" + end + + on_intel do + depends_on "nasm" => :build + end + + def install + # libass uses coretext on macOS, fontconfig on Linux + args = OS.mac? ? ["--disable-fontconfig"] : [] + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "ass/ass.h" + int main() { + ASS_Library *library; + ASS_Renderer *renderer; + library = ass_library_init(); + if (library) { + renderer = ass_renderer_init(library); + if (renderer) { + ass_renderer_done(renderer); + ass_library_done(library); + return 0; + } + else { + ass_library_done(library); + return 1; + } + } + else { + return 1; + } + } + CPP + system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lass", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libassuan.rb b/Formula/lib/libassuan.rb new file mode 100644 index 0000000000000..df110a0a39ccd --- /dev/null +++ b/Formula/lib/libassuan.rb @@ -0,0 +1,48 @@ +class Libassuan < Formula + desc "Assuan IPC Library" + homepage "https://www.gnupg.org/related_software/libassuan/" + # TODO: On next release, check if `-std=gnu89` workaround can be removed. + # Ref: https://dev.gnupg.org/T7246 + url "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-3.0.2.tar.bz2" + mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libassuan/libassuan-3.0.2.tar.bz2" + sha256 "d2931cdad266e633510f9970e1a2f346055e351bb19f9b78912475b8074c36f6" + license all_of: [ + "LGPL-2.1-or-later", + "GPL-3.0-or-later", # assuan.info + "FSFULLR", # libassuan-config, libassuan.m4 + ] + + livecheck do + url "https://gnupg.org/ftp/gcrypt/libassuan/" + regex(/href=.*?libassuan[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1430611fe9f337d6a7568a12321f125c567ca8d4d2bdcd7ff0717bdcd82a32dc" + sha256 cellar: :any, arm64_sonoma: "59e577c969d60c328976822c4d5bdfa5b5b11231453573e9c1bddc308e211126" + sha256 cellar: :any, arm64_ventura: "2c97f2188ef55d1de16938e270797b3ecc59315cd09f03ca347a533c6e57efd4" + sha256 cellar: :any, sonoma: "0ec4ad2607107d27bb8b0acb1f7fb3a81c8bea66ed17b69afbd6bec70a9a5b98" + sha256 cellar: :any, ventura: "be83f28dfef1934dd05a2a2f1523398bf9a6927b0b80c42447f4b18583e6dc25" + sha256 cellar: :any_skip_relocation, arm64_linux: "c1cc44ec4ce43e405be679fbee9a434a7bdbf86f267ac946cb4a8642cdf89df7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "620108c517ecfeb00c843bd34f86b75bf84c1bd92be9b554c86424fad3b99f08" + end + + depends_on "libgpg-error" + + def install + # Fixes duplicate symbols errors - https://lists.gnupg.org/pipermail/gnupg-devel/2024-July/035614.html + ENV.append_to_cflags "-std=gnu89" + + system "./configure", "--disable-silent-rules", + "--enable-static", + *std_configure_args + system "make", "install" + + # avoid triggering mandatory rebuilds of software that hard-codes this path + inreplace bin/"libassuan-config", prefix, opt_prefix + end + + test do + system bin/"libassuan-config", "--version" + end +end diff --git a/Formula/lib/libassuan@2.rb b/Formula/lib/libassuan@2.rb new file mode 100644 index 0000000000000..ef2b5a5479abf --- /dev/null +++ b/Formula/lib/libassuan@2.rb @@ -0,0 +1,45 @@ +class LibassuanAT2 < Formula + desc "Assuan IPC Library" + homepage "https://www.gnupg.org/related_software/libassuan/" + url "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.7.tar.bz2" + mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libassuan/libassuan-2.5.7.tar.bz2" + sha256 "0103081ffc27838a2e50479153ca105e873d3d65d8a9593282e9c94c7e6afb76" + # NOTE: We exclude LGPL-3.0-or-later as corresponding code is only used on Windows CE. + license all_of: [ + "LGPL-2.1-or-later", + "GPL-3.0-or-later", # assuan.info + "FSFULLR", # libassuan-config, libassuan.m4 + ] + + bottle do + sha256 cellar: :any, arm64_sequoia: "24910ee0977d721b85bd2df1372698beaa6d11716b81e7a49512ccc9c79ba4da" + sha256 cellar: :any, arm64_sonoma: "0d4fd656fbf3db20892da64bec2eb966842de215a23c2008ecdf9198a68d5211" + sha256 cellar: :any, arm64_ventura: "22fd67c9fe966a0dfb7b26546828ef966ce53ece9ef297114932ea657927395f" + sha256 cellar: :any, arm64_monterey: "bfb5e94cf8e6416253a63a0161fd1ae6f3665d71b4f83bacefea4043ae2f46b4" + sha256 cellar: :any, sonoma: "bbe02b3b1091f71a05a2849bc67427e99073dcdede197a16bd18b679306d65c9" + sha256 cellar: :any, ventura: "f74779f1dc1d827a4a57186d83e2398c524ff4b82abdefd4e5f7148b7fd46612" + sha256 cellar: :any, monterey: "8827e9ad490c7273044aef10a0342cd85c0d72c6407f515b38445d53e4cc2605" + sha256 cellar: :any_skip_relocation, arm64_linux: "67dc8df4e57fde8c74851d163d6a1716eb9fdebbc884b8a2be0a2363f92f1b82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a769126855958b4ffa4793c21b0d5e6f8281459dbd42d9931adfb9768b0350d" + end + + keg_only :versioned_formula + + deprecate! date: "2025-01-11", because: :versioned_formula + + depends_on "libgpg-error" + + def install + system "./configure", "--disable-silent-rules", + "--enable-static", + *std_configure_args + system "make", "install" + + # avoid triggering mandatory rebuilds of software that hard-codes this path + inreplace bin/"libassuan-config", prefix, opt_prefix + end + + test do + system bin/"libassuan-config", "--version" + end +end diff --git a/Formula/lib/libatomic_ops.rb b/Formula/lib/libatomic_ops.rb new file mode 100644 index 0000000000000..adbe6794511b5 --- /dev/null +++ b/Formula/lib/libatomic_ops.rb @@ -0,0 +1,43 @@ +class LibatomicOps < Formula + desc "Implementations for atomic memory update operations" + homepage "https://github.com/bdwgc/libatomic_ops/" + url "https://github.com/bdwgc/libatomic_ops/releases/download/v7.8.2/libatomic_ops-7.8.2.tar.gz" + sha256 "d305207fe207f2b3fb5cb4c019da12b44ce3fcbc593dfd5080d867b1a2419b51" + license all_of: ["GPL-2.0-or-later", "MIT"] + head "https://github.com/bdwgc/libatomic_ops.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "27c948cb8ca7db52ae09a76402fd1180ca110ece2ba7a20c88b16902967980f4" + sha256 cellar: :any, arm64_sonoma: "b1b86350238369d9aeec01fe06db92fa0bda5aadabdc6867e4d7f34eca09b72f" + sha256 cellar: :any, arm64_ventura: "df3aefc169055fa94ec868131c894b8fcae8dc7ea33e64a700e3746576e93ebb" + sha256 cellar: :any, arm64_monterey: "81dde253b3f27f98a1b64110ec13ba9181e8ab34bc0060fc878e98e6090777ba" + sha256 cellar: :any, sonoma: "4f402b92483d9647fc328a8b02e2ea1abeb25d3460720f4530d3cc432c5c5550" + sha256 cellar: :any, ventura: "37d4fa5e739558798fc23471ba5efe49043ec46a8c07242fcc790f28f9940806" + sha256 cellar: :any, monterey: "e673e4f5126a4c2d43a98209bd9165413fc6d189d22e3481824bca60f74ec4c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "f35abbec6820d8c0597494560dff420dfd416511f4538c81eea5e3ab599c4fb3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1eac8d8ea0bd234b72ce311c92d02dc2ca33029b819327b6c2236309d549bca" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-Dbuild_tests=ON", + *std_cmake_args, + "-DBUILD_TESTING=ON" # Pass this last to override `std_cmake_args` + system "cmake", "--build", "build" + system "ctest", "--test-dir", "build", + "--parallel", ENV.make_jobs, + "--rerun-failed", + "--output-on-failure" + system "cmake", "--install", "build" + end +end diff --git a/Formula/lib/libavif.rb b/Formula/lib/libavif.rb new file mode 100644 index 0000000000000..98a8cba082f1f --- /dev/null +++ b/Formula/lib/libavif.rb @@ -0,0 +1,54 @@ +class Libavif < Formula + desc "Library for encoding and decoding .avif files" + homepage "https://github.com/AOMediaCodec/libavif" + url "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.3.0.tar.gz" + sha256 "0a545e953cc049bf5bcf4ee467306a2f113a75110edf59e61248873101cd26c1" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "79ac7837d5f965f0df486a3551aa4efbc0472f9a8a4c89f4748f6c423044c51e" + sha256 cellar: :any, arm64_sonoma: "3d278f7e6324456dcf4e25f596e6f3063078e3b77ec0a6f709aecc985f7ad7b2" + sha256 cellar: :any, arm64_ventura: "8c9b7da2440de5d6ef334c1ec5345436a7206d9594ff3c7e242b66bd3fbadafe" + sha256 cellar: :any, sonoma: "7f0fbb053b843800ebf5edc64a14d5bfd4fc4c38f63e0c9c23aa1df0e5502d1f" + sha256 cellar: :any, ventura: "e1b76ac7c6960e689f40202c9ef2519a557414ae4ac577b94ddf0ad217a9b7ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "77dcc8b63ad0eaa65bc4c710b88734228cb0d4884722f60200d10998c4c394f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e238743363e2d2706f9cb5671d01bb89a8ce19832f95842b228f786ab156bd67" + end + + depends_on "cmake" => :build + depends_on "nasm" => :build + depends_on "aom" + depends_on "jpeg-turbo" + depends_on "libpng" + + uses_from_macos "zlib" + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DAVIF_CODEC_AOM=SYSTEM + -DAVIF_BUILD_APPS=ON + -DAVIF_BUILD_EXAMPLES=OFF + -DAVIF_BUILD_TESTS=OFF + -DAVIF_LIBYUV=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples" + end + + test do + system bin/"avifenc", test_fixtures("test.png"), testpath/"test.avif" + assert_path_exists testpath/"test.avif" + + system bin/"avifdec", testpath/"test.avif", testpath/"test.jpg" + assert_path_exists testpath/"test.jpg" + + example = pkgshare/"examples/avif_example_decode_file.c" + system ENV.cc, example, "-I#{include}", "-L#{lib}", "-lavif", "-o", "avif_example_decode_file" + output = shell_output("#{testpath}/avif_example_decode_file #{testpath}/test.avif") + assert_match "Parsed AVIF: 8x8", output + end +end diff --git a/Formula/lib/libb2.rb b/Formula/lib/libb2.rb new file mode 100644 index 0000000000000..b29619e292fbf --- /dev/null +++ b/Formula/lib/libb2.rb @@ -0,0 +1,77 @@ +class Libb2 < Formula + desc "Secure hashing function" + homepage "https://blake2.net/" + url "https://github.com/BLAKE2/libb2/releases/download/v0.98.1/libb2-0.98.1.tar.gz" + sha256 "53626fddce753c454a3fea581cbbc7fe9bbcf0bc70416d48fdbbf5d87ef6c72e" + license "CC0-1.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "cc4304b760722128b914944f85788795f1f02de3072d1fd8e921b836b508776f" + sha256 cellar: :any, arm64_sonoma: "52cef2730b3520e99f75f1478f2b953dc46e362a8dbf90f2c6a9028b47bbb8bd" + sha256 cellar: :any, arm64_ventura: "6c9ffaf08fde8879febf2998a289d6e9bfa505ed29cdf5f4c41d52a632c11f1e" + sha256 cellar: :any, arm64_monterey: "fa45f83dfa716f0f69bb395eeb3016c9cc3223c975b64bed5544304e0eb4cd2c" + sha256 cellar: :any, arm64_big_sur: "7713b483f3474a3531c5830bbc8de7ad1903989e55e5da3ff5bfd85e87c5c045" + sha256 cellar: :any, sonoma: "747d5e721f9fae99dbc96b9091a4e9f237919f812723d24965846523782b7381" + sha256 cellar: :any, ventura: "cc245560dda3edceb402702f3066f6aeb5c526e93dbb2a1e06bc02139d6154c2" + sha256 cellar: :any, monterey: "f526645f4114ef85c577d611383bb7e0acdc2697719caa73cd8677260b516a25" + sha256 cellar: :any, big_sur: "7e21b980288ef9449cb44a4b2d33a0d0772b0482165c9ee5f12d42b71b357bc0" + sha256 cellar: :any, catalina: "fb9f331b6c556a09558cf8098c3934f3f9196c3076e2511fd6ed816439fb8936" + sha256 cellar: :any, mojave: "bbd333a0a89e6a38445aba0170b14b516edad300c30d6f4239b66a130c446959" + sha256 cellar: :any, high_sierra: "6e9156db268cea377f7050c4e9ebf1ee3065fef76a11c40e03e700a23b1bef36" + sha256 cellar: :any, sierra: "9b909b878c01b5bb3284ba4d0937352e0df54b27e491fa796dfb6d3e67f989a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f8a1caf5720effd14148816a8f1fef82f164f3122848b41fa9eb1674ebbaa02" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e12bfdb9ca31174e1f644bd68f89f7de0354b7661569b59cde6c8a6de2d8a24" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + # SSE detection is broken on arm64 macos + # https://github.com/BLAKE2/libb2/issues/36 + extra_args = [] + extra_args << "--enable-fat" unless Hardware::CPU.arm? + + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + *extra_args + system "make", "install" + end + + test do + (testpath/"blake2test.c").write <<~C + #include + #include + #include + + int main(void) { + uint8_t out[64]; + uint8_t expected[64] = + { + 0xb2, 0x02, 0xb4, 0x77, 0xa7, 0x97, 0xe9, 0x84, 0xe6, 0xa2, 0xb9, 0x76, + 0xca, 0x4c, 0xb7, 0xd3, 0x94, 0x40, 0x04, 0xb3, 0xef, 0x6c, 0xde, 0x80, + 0x34, 0x1c, 0x78, 0x53, 0xa2, 0xdd, 0x7e, 0x2f, 0x9e, 0x08, 0xcd, 0xa6, + 0xd7, 0x37, 0x28, 0x12, 0xcf, 0x75, 0xe8, 0xc7, 0x74, 0x1f, 0xb6, 0x56, + 0xce, 0xc3, 0xa1, 0x19, 0x77, 0x2e, 0x2e, 0x71, 0x5c, 0xeb, 0xc7, 0x64, + 0x33, 0xfa, 0xfd, 0x4d + }; + int res = blake2b(out, "blake2", "blake2", 64, 6, 6); + if (res == 0) { + if (memcmp(out, expected, 64) == 0) { + return 0; + } else { + return 1; + } + } else { + return 1; + } + } + C + system ENV.cc, "blake2test.c", "-L#{lib}", "-lb2", "-o", "b2test" + system "./b2test" + end +end diff --git a/Formula/lib/libb64.rb b/Formula/lib/libb64.rb new file mode 100644 index 0000000000000..ef432fec8c00c --- /dev/null +++ b/Formula/lib/libb64.rb @@ -0,0 +1,48 @@ +class Libb64 < Formula + desc "Base64 encoding/decoding library" + homepage "https://libb64.sourceforge.net/" + url "https://downloads.sourceforge.net/project/libb64/libb64/libb64/libb64-1.2.1.zip" + sha256 "20106f0ba95cfd9c35a13c71206643e3fb3e46512df3e2efb2fdbf87116314b2" + license "CC-PDDC" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "210e5acb036ffda3a85af650cdcbda27c8ca804cb099d556a1dfd4779ec17fb7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a7471a04a5dd363f1ee8f2ee6c215cb99760698a34c73a5a6ce0dbefd519a66a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "899db1753787af2de66e4ac321d5d750190a8357576611d59644eaa9ed0f852f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cf8f611b34a951b0c3930f8c3714e0f24aa4074c79a3cb483810b7325461f1df" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "acd1c54a87e5e659d5a2d907f650cd9a3d1f160403805d8d84f7bc620546df0b" + sha256 cellar: :any_skip_relocation, sonoma: "488c12e6ee679e7aeab34d38888ce9887086fef109f5d5cf96d40cf4e02ad682" + sha256 cellar: :any_skip_relocation, ventura: "2c8d53e819863560658ef3a9ec30d5472430d00b93cb165d12f4e2c12eef12c6" + sha256 cellar: :any_skip_relocation, monterey: "3b2acebf1e9432ef07e0035bfc410fdb8530aace59513ad9fad36fe35a661880" + sha256 cellar: :any_skip_relocation, big_sur: "50dafb7c970bfd56ab7c88100df7876d1590c806295987a8268029eb87b7ca2b" + sha256 cellar: :any_skip_relocation, catalina: "4f357626774a02fae97f7668665a8e41c96b4cdf041a8b8ba658dbd5f8a86bd9" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3308134e879205166e277b0139eed2ac6a73ccdaf5dce0cea2b087469e698a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8da3dbc95cbf4c396038b3b71fbb2b6b583f72f46277cb6deea7b7afb410e9f7" + end + + def install + system "make", "all_src" + include.install "include/b64" + lib.install "src/libb64.a" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() + { + base64_encodestate B64STATE; + base64_init_encodestate(&B64STATE); + char buf[32]; + int c = base64_encode_block("\x01\x02\x03\x04", 4, buf, &B64STATE); + c += base64_encode_blockend(buf+c, &B64STATE); + if (memcmp(buf,"AQIDBA==",8)) return(-1); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lb64", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libbdplus.rb b/Formula/lib/libbdplus.rb new file mode 100644 index 0000000000000..18ac044312c59 --- /dev/null +++ b/Formula/lib/libbdplus.rb @@ -0,0 +1,60 @@ +class Libbdplus < Formula + desc "Implements the BD+ System Specifications" + homepage "https://www.videolan.org/developers/libbdplus.html" + url "https://get.videolan.org/libbdplus/0.2.0/libbdplus-0.2.0.tar.bz2" + mirror "https://download.videolan.org/pub/videolan/libbdplus/0.2.0/libbdplus-0.2.0.tar.bz2" + sha256 "b93eea3eaef33d6e9155d2c34b068c505493aa5a4936e63274f4342ab0f40a58" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?libbdplus[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9cc87d2f97a8450b3757c16b409e1c13a562e2d0e52492ab9d9cb032c908d600" + sha256 cellar: :any, arm64_sonoma: "ea38d1a6e93c8fcf4d08039d40e2fdc5fc681a66f1e3377c8e9f56a4992136d2" + sha256 cellar: :any, arm64_ventura: "f47c8d29158db9c810a1f037d3335ba5cb5b8c8c3769c5435d516f07cef44c73" + sha256 cellar: :any, arm64_monterey: "c5e53b35cf902a1b1bed758850dc351c5fa005f78147a39085e284b02ddded9f" + sha256 cellar: :any, arm64_big_sur: "f4b3ecf7789e87ae8ebc97cf9a3c00321c79a3cca58d7a6679ea686da6c415e3" + sha256 cellar: :any, sonoma: "71cae25b96b7723171f93ab33b2508cff5f8b081165d124dae5a6639b78a62aa" + sha256 cellar: :any, ventura: "b4b549364f9d64a044ef9e90f7896f1214fef2c8303dfe3bd376af7b95387233" + sha256 cellar: :any, monterey: "6e72efd19ac6ebf39f3c22240a1e706cd101540a2c2b55c1c83cf4048642339f" + sha256 cellar: :any, big_sur: "d0e37545cdc9aa4e23e56dfead1e17ed894431e06bcdc06dec76a4ffb32b6deb" + sha256 cellar: :any, catalina: "f4887dd87e0d8ef822f629b603436db20ce331bf4105c2b3d5d2864ac82c9e3c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f77338b5c92c9187e9ceccd4c0d073227b7e86edac29204f72da202a89259de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a6adab3c63417c05c7b4e68bebd99dd6e0d133d7d60e1dcfe29552150cb484e0" + end + + head do + url "https://code.videolan.org/videolan/libbdplus.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "libgcrypt" + + def install + system "./bootstrap" if build.head? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + int major = -1; + int minor = -1; + int micro = -1; + bdplus_get_version(&major, &minor, µ); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lbdplus", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libbi.rb b/Formula/lib/libbi.rb new file mode 100644 index 0000000000000..598842185fd4d --- /dev/null +++ b/Formula/lib/libbi.rb @@ -0,0 +1,154 @@ +class Libbi < Formula + desc "Bayesian state-space modelling on parallel computer hardware" + homepage "https://libbi.org/" + url "https://github.com/lawmurray/LibBi/archive/refs/tags/1.4.5.tar.gz" + sha256 "af2b6d30e1502f99a3950d63ceaf7d7275a236f4d81eff337121c24fbb802fbe" + license "GPL-2.0-only" + revision 5 + head "https://github.com/lawmurray/LibBi.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5fef4f3574955d3f11d14e49034c502988764eb169d5b4a74fc8dbbfce461225" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a6cacb6474adcb43e3e4cc0434721b474a8a9749102c397fd0e69fe3ff4e8333" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ccf5a58e1570912775cc3899a89e5567ac5f657956833947bb2888c4949b4169" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c0882b756fb10921769635c9c858998d5cf85630a954af71eb7e2380c888937a" + sha256 cellar: :any_skip_relocation, sonoma: "d5dcac53e5859b062603ed726c70d2d4fb9d46e317a9238ec5e4ff3c973f41cc" + sha256 cellar: :any_skip_relocation, ventura: "ef73bed34be4fd7cb1579190d6422266e84aca5bb7da499720bce3ff3f56f7c9" + sha256 cellar: :any_skip_relocation, monterey: "70f2987d8bc35f8d6dc5004e02c46e4d8936e30dd2472821f2247126b56bba10" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d7b9882a40417f97c719dee775dd0fdf9c54d25c0717a96101105f4cd82540a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20f25556a4e78e00b4cfd286563a225f5ccb4c200510461dbd21925b662f6e89" + end + + depends_on "automake" + depends_on "boost" + depends_on "gsl" + depends_on "netcdf" + depends_on "qrupdate" + + uses_from_macos "perl" + + resource "Test::Simple" do + url "https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302133.tar.gz" + sha256 "02bc2b4ec299886efcc29148308c9afb64e0f2c2acdeaa2dee33c3adfe6f96e2" + end + + resource "Getopt::ArgvFile" do + url "https://cpan.metacpan.org/authors/id/J/JS/JSTENZEL/Getopt-ArgvFile-1.11.tar.gz" + sha256 "3709aa513ce6fd71d1a55a02e34d2f090017d5350a9bd447005653c9b0835b22" + end + + resource "Carp::Assert" do + url "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Carp-Assert-0.21.tar.gz" + sha256 "924f8e2b4e3cb3d8b26246b5f9c07cdaa4b8800cef345fa0811d72930d73a54e" + end + + resource "File::Slurp" do + url "https://cpan.metacpan.org/authors/id/U/UR/URI/File-Slurp-9999.19.tar.gz" + sha256 "ce29ebe995097ebd6e9bc03284714cdfa0c46dc94f6b14a56980747ea3253643" + end + + resource "Parse::Yapp" do + url "https://cpan.metacpan.org/authors/id/W/WB/WBRASWELL/Parse-Yapp-1.21.tar.gz" + sha256 "3810e998308fba2e0f4f26043035032b027ce51ce5c8a52a8b8e340ca65f13e5" + end + + resource "Parse::Template" do + url "https://cpan.metacpan.org/authors/id/P/PS/PSCUST/ParseTemplate-3.08.tar.gz" + sha256 "3c7734f53999de8351a77cb09631d7a4a0482b6f54bca63d69d5a4eec8686d51" + end + + resource "Parse::Lex" do + url "https://cpan.metacpan.org/authors/id/P/PS/PSCUST/ParseLex-2.21.tar.gz" + sha256 "f55f0a7d1e2a6b806a47840c81c16d505c5c76765cb156e5f5fd703159a4492d" + 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 "Math::Symbolic" do + url "https://cpan.metacpan.org/authors/id/S/SM/SMUELLER/Math-Symbolic-0.612.tar.gz" + sha256 "a9af979956c4c28683c535b5e5da3cde198c0cac2a11b3c9a129da218b3b9c08" + 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 "File::Remove" do + url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/File-Remove-1.57.tar.gz" + sha256 "b3becd60165c38786d18285f770b8b06ebffe91797d8c00cc4730614382501ad" + end + + resource "inc::Module::Install::DSL" do + url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Module-Install-1.19.tar.gz" + sha256 "1a53a78ddf3ab9e3c03fc5e354b436319a944cba4281baf0b904fa932a13011b" + 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.104.tar.gz" + sha256 "07b628efcdf902d6a32e6a8e084497e8593d125c03ad12ef5cc03c87c7841caf" + end + + resource "Template" do + url "https://cpan.metacpan.org/authors/id/A/AB/ABW/Template-Toolkit-2.27.tar.gz" + sha256 "1311a403264d0134c585af0309ff2a9d5074b8ece23ece5660d31ec96bf2c6dc" + end + + resource "Graph" do + url "https://cpan.metacpan.org/authors/id/J/JH/JHI/Graph-0.9704.tar.gz" + sha256 "325e8eb07be2d09a909e450c13d3a42dcb2a2e96cc3ac780fe4572a0d80b2a25" + end + + resource "thrust" do + url "https://github.com/NVIDIA/thrust/archive/refs/tags/1.8.2.tar.gz" + sha256 "83bc9e7b769daa04324c986eeaf48fcb53c2dda26bcc77cb3c07f4b1c359feb8" + end + + def install + ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" + + resources.each do |r| + r.stage do + next if r.name == "thrust" + + # need to set TT_ACCEPT=y for Template library for non-interactive install + perl_flags = (r.name == "Template") ? "TT_ACCEPT=y" : "" + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", perl_flags + system "make" + system "make", "install" + end + end + + resource("thrust").stage { (include/"thrust").install Dir["thrust/*"] } + + # make Homebrew packages discoverable for compilation/linking + inreplace "share/configure.ac" do |s| + cppflags = s.get_make_var("CPPFLAGS").delete('"') + ldflags = s.get_make_var("LDFLAGS").delete('"') + s.change_make_var! "CPPFLAGS", "\"#{cppflags} -I#{HOMEBREW_PREFIX}/include\"" + s.change_make_var! "LDFLAGS", "\"#{ldflags} -L#{HOMEBREW_PREFIX}/lib\"" + end + + system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", "INSTALLSITESCRIPT=#{bin}" + system "make" + system "make", "install" + + pkgshare.install "Test.bi", "test.conf" + bin.env_script_all_files(libexec/"bin", PERL5LIB: ENV["PERL5LIB"]) + end + + test do + ENV.append "LDFLAGS", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib" if OS.linux? + cp Dir[pkgshare/"Test.bi", pkgshare/"test.conf"], testpath + system bin/"libbi", "sample", "@test.conf" + assert_path_exists testpath/"test.nc" + end +end diff --git a/Formula/lib/libbinio.rb b/Formula/lib/libbinio.rb new file mode 100644 index 0000000000000..271e7beaea899 --- /dev/null +++ b/Formula/lib/libbinio.rb @@ -0,0 +1,56 @@ +class Libbinio < Formula + desc "Binary I/O stream class library" + homepage "https://adplug.github.io/libbinio/" + url "https://github.com/adplug/libbinio/releases/download/libbinio-1.5/libbinio-1.5.tar.bz2" + sha256 "398b2468e7838d2274d1f62dbc112e7e043433812f7ae63ef29f5cb31dc6defd" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b907d94fd656bef05130d427f7327462a255838a0c36fbfa5dd3402053415a91" + sha256 cellar: :any, arm64_sonoma: "88b5cda150fa3563cdc3f7093ac8626c10f014ff5030b8e3a8e456b3eae509a2" + sha256 cellar: :any, arm64_ventura: "d47d5255715fc0638111c50a4ec1fe4eea4fd90409389331874df8ef76f61c08" + sha256 cellar: :any, arm64_monterey: "3b66d91c0bc97b7ade4576bb7d54403ebbf4e22a46c1ad7a1eb165a5cec24368" + sha256 cellar: :any, arm64_big_sur: "6490acae30e6e1047e5770b4aab37e4c043488c5c2e8a8919962208c1da2cdd4" + sha256 cellar: :any, sonoma: "3936ef9646f007d48ddd044360f068e963f59e2cf7eed07f5de8a716cc7a18e7" + sha256 cellar: :any, ventura: "79dab1370400b3395c8370da7895c60ab281d3410820852787e8e16851bd22ee" + sha256 cellar: :any, monterey: "f2f87992d693266d8fc333fc9c583b8c372657da0018b24538d771598c76570c" + sha256 cellar: :any, big_sur: "5ca7b1faccab23de4efee72cfe82244e419c40c78775f09a01e5669aeed4a8e1" + sha256 cellar: :any, catalina: "157efedae7e8169175623b12f91d8a786fdde524075a2a98a956e910aed5e507" + sha256 cellar: :any, mojave: "4c5b9085fdfe812e664f342e9da9504c24f2f2055c2ef939764dd4bd96025a23" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e8aaef5849696b37c580d313eb29fd32a274eac256c9b83ad495bab4c06128d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d8b2aeba35080348293ad101e8f4751c17e1d5b9e53adcc7e539f571bc19b01" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", "--infodir=#{info}" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + // test + // do not change the line above! + #include + #include + + int main(void) + { + binifstream file("test.cpp"); + char string[256]; + + file.readString(string, 256, '\\n'); + + return strcmp (string, "// test"); + } + CPP + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lbinio", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libbitcoin-blockchain.rb b/Formula/lib/libbitcoin-blockchain.rb new file mode 100644 index 0000000000000..c98db465c3223 --- /dev/null +++ b/Formula/lib/libbitcoin-blockchain.rb @@ -0,0 +1,67 @@ +class LibbitcoinBlockchain < Formula + desc "Bitcoin Blockchain Library" + homepage "https://github.com/libbitcoin/libbitcoin-blockchain" + url "https://github.com/libbitcoin/libbitcoin-blockchain/archive/refs/tags/v3.8.0.tar.gz" + sha256 "e7a3f2d2ea8275946218d734cd3d5d805c61e69eb29d1fb16e3064554bd2b584" + license "AGPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "872a37910f440a950ae0f4e9307e7c022c05fa521bf44a34c9bf1d048b08c96b" + sha256 cellar: :any, arm64_sonoma: "98b05bbaaa471ed07081871007711a310f4d3cadcde0fd6ac7390f89d4fb4f1d" + sha256 arm64_ventura: "643036ef5fdad2d2686dfd0e943e7427f2921a679ca6b65dc2d7520702f607b6" + sha256 arm64_monterey: "87003f5fe6734526014672e39ffa2e9654962fa068aff56fac817b31b1191b47" + sha256 arm64_big_sur: "b578deb82d92c0a638e03b3c275550235ae86b4124ffd0ad80b080cbfcde9268" + sha256 cellar: :any, sonoma: "2ae4f59b8adc73b1f5b8c74dc1213bfe712de9d8560d339222c815366d10a3cc" + sha256 ventura: "2442e4da6b10806fe090df445baf70eb1b8fc02402af7bfe0381b116cdc5da47" + sha256 monterey: "e41010dcffc1263b452d253b58ab955fff3d117621d28d600b1095e42d0ef564" + sha256 big_sur: "1098628c8c88b9ab9b82188e9b048d442080242c1b77766b474eaf405765d8fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0f806a8129d3d225515cb2c5c789f29c26b756df83e4ea3139f3baddd353a288" + end + + # About 2 years since request for release with support for recent `boost`. + # Ref: https://github.com/libbitcoin/libbitcoin-system/issues/1234 + disable! date: "2024-12-14", because: "uses deprecated `boost@1.76`" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + # https://github.com/libbitcoin/libbitcoin-system/issues/1234 + depends_on "boost@1.76" + depends_on "libbitcoin-consensus" + depends_on "libbitcoin-database" + + def install + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" + + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-boost-libdir=#{Formula["boost@1.76"].opt_lib}" + system "make", "install" + end + + test do + boost = Formula["boost@1.76"] + (testpath/"test.cpp").write <<~CPP + #include + int main() { + static const auto default_block_hash = libbitcoin::hash_literal("14508459b221041eab257d2baaa7459775ba748246c8403609eb708f0e57e74b"); + const auto block = std::make_shared(); + libbitcoin::blockchain::block_entry instance(block); + assert(instance.block() == block); + assert(instance.hash() == default_block_hash); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", + "-I#{boost.include}", + "-I#{libexec}/include", + "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin-system", + "-L#{lib}", "-L#{libexec}/lib", "-lbitcoin-blockchain", + "-L#{boost.lib}", "-lboost_system" + system "./test" + end +end diff --git a/Formula/lib/libbitcoin-client.rb b/Formula/lib/libbitcoin-client.rb new file mode 100644 index 0000000000000..8439d890bcbff --- /dev/null +++ b/Formula/lib/libbitcoin-client.rb @@ -0,0 +1,111 @@ +class LibbitcoinClient < Formula + desc "Bitcoin Client Query Library" + homepage "https://github.com/libbitcoin/libbitcoin-client" + url "https://github.com/libbitcoin/libbitcoin-client/archive/refs/tags/v3.8.0.tar.gz" + sha256 "cfd9685becf620eec502ad53774025105dda7947811454e0c9fea30b27833840" + license "AGPL-3.0-or-later" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "cb3c6f9dfbbc5aa63e4eed52279f6fe51adb275a0116661eac8e250297c0d205" + sha256 cellar: :any, arm64_sonoma: "7aab15e9fbacb91b793be00809efb2634813fb719f171d698d8acdc9b73bab9d" + sha256 cellar: :any, arm64_ventura: "82d9f59cee3f405fe35961470c6404a1a44d026935414bdce4baff5401c2b2e9" + sha256 cellar: :any, arm64_monterey: "30cfca391b2f95c09305b27b952c23151e59e9a85c767ec314ac125dee9985ab" + sha256 cellar: :any, sonoma: "20713787a1372dedb7546febdf4bca454d8249068bc6a189a6644b513e9d90f0" + sha256 cellar: :any, ventura: "8a2ce6e56369b086d124c1247f7bb7656cbe8f67676663b5c6d6f133313d941a" + sha256 cellar: :any, monterey: "787b413db3f35739c3f8a5acc11533eeb7225d4f4f85f61218fe50fe0d3b3311" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f069aba8a3b4a0d5b25866f9122b9958456610c93bb1bb26f984736e4a1f24a" + end + + # About 2 years since request for release with support for recent `boost`. + # Ref: https://github.com/libbitcoin/libbitcoin-system/issues/1234 + disable! date: "2024-12-14", because: "uses deprecated `boost@1.76`" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + # https://github.com/libbitcoin/libbitcoin-system/issues/1234 + depends_on "boost@1.76" + depends_on "libbitcoin-protocol" + depends_on "libsodium" + depends_on "zeromq" + + def install + ENV.cxx11 + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" + + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-boost-libdir=#{Formula["boost@1.76"].opt_lib}" + system "make", "install" + end + + test do + boost = Formula["boost@1.76"] + (testpath/"test.cpp").write <<~CPP + #include + class stream_fixture + : public libbitcoin::client::stream + { + public: + libbitcoin::data_stack out; + + virtual int32_t refresh() override + { + return 0; + } + + virtual bool read(stream& stream) override + { + return false; + } + + virtual bool write(const libbitcoin::data_stack& data) override + { + out = data; + return true; + } + }; + static std::string to_string(libbitcoin::data_slice data) + { + return std::string(data.begin(), data.end()) + "\0"; + } + static void remove_optional_delimiter(libbitcoin::data_stack& stack) + { + if (!stack.empty() && stack.front().empty()) + stack.erase(stack.begin()); + } + static const uint32_t test_height = 0x12345678; + static const char address_satoshi[] = "1PeChFbhxDD9NLbU21DfD55aQBC4ZTR3tE"; + #define PROXY_TEST_SETUP \ + static const uint32_t retries = 0; \ + static const uint32_t timeout_ms = 2000; \ + static const auto on_error = [](const libbitcoin::code&) {}; \ + static const auto on_unknown = [](const std::string&) {}; \ + stream_fixture capture; \ + libbitcoin::client::proxy proxy(capture, on_unknown, timeout_ms, retries) + #define HANDLE_ROUTING_FRAMES(stack) \ + remove_optional_delimiter(stack); + int main() { + PROXY_TEST_SETUP; + + const auto on_reply = [](const libbitcoin::chain::history::list&) {}; + proxy.blockchain_fetch_history3(on_error, on_reply, libbitcoin::wallet::payment_address(address_satoshi), test_height); + + HANDLE_ROUTING_FRAMES(capture.out); + assert(capture.out.size() == 3u); + assert(to_string(capture.out[0]) == "blockchain.fetch_history3"); + assert(libbitcoin::encode_base16(capture.out[2]) == "f85beb6356d0813ddb0dbb14230a249fe931a13578563412"); + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", + "-I#{boost.include}", + "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin-system", + "-L#{lib}", "-lbitcoin-client", + "-L#{boost.lib}", "-lboost_system" + system "./test" + end +end diff --git a/Formula/lib/libbitcoin-consensus.rb b/Formula/lib/libbitcoin-consensus.rb new file mode 100644 index 0000000000000..46b39d66ca13a --- /dev/null +++ b/Formula/lib/libbitcoin-consensus.rb @@ -0,0 +1,115 @@ +class LibbitcoinConsensus < Formula + desc "Bitcoin Consensus Library (optional)" + homepage "https://github.com/libbitcoin/libbitcoin-consensus" + url "https://github.com/libbitcoin/libbitcoin-consensus/archive/refs/tags/v3.8.0.tar.gz" + sha256 "3f63b233a25323ff81de71a6c96455a6f5141e21cb0678a2304b36b56e771ca2" + license "AGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0becb75eb0a0540a4cb6554887c3b345777278ec8ed8e5fafd76057722c755c6" + sha256 cellar: :any, arm64_sonoma: "12ab6ca60756919e7347031905778cf42151bc6d5294cf9826a7341a69c6b3dc" + sha256 cellar: :any, arm64_ventura: "495b1ee3bc1d01755b48ced48c019b2bf40f1361c529a1186c66449801f25708" + sha256 cellar: :any, arm64_monterey: "82cdc41015f185c56a5c317ec125d1f6d74e298611afd8e0efb05135668c9a47" + sha256 cellar: :any, arm64_big_sur: "dbb11bd9f43f28ff31be7248a0c443d7359c7ceeb01227c1c099ea613d869f35" + sha256 cellar: :any, sonoma: "6f7adeb8f31361a7962ec8130c23829f8a8c5efe265d54c541bce38642a9fbb4" + sha256 cellar: :any, ventura: "2f8f5925ff397fd8b1f6f1c499e3828c25830b551e678bbb24898912825fc328" + sha256 cellar: :any, monterey: "3b0a76702e478bae5a2b864b2bfaf4cbc2f658582454fa4ab0ccf534d4c9fae5" + sha256 cellar: :any, big_sur: "1ef57e9412ff7a67edd7e7557b8848f321f1355c0841dfb0cf6167a0d2e37447" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f14d11d115821d69e9aff1270ad08ef647468621148af9693b71d8d59fa0a57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32b0d72b5ff1f2de8effc219182d08b8e3a4a92ec714ddea76691196ca42df61" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "boost" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + resource "secp256k1" do + url "https://github.com/libbitcoin/secp256k1/archive/refs/tags/v0.1.0.20.tar.gz" + sha256 "61583939f1f25b92e6401e5b819e399da02562de663873df3056993b40148701" + end + + def install + ENV.cxx11 + resource("secp256k1").stage do + system "./autogen.sh" + system "./configure", "--disable-silent-rules", + "--enable-module-recovery", + "--with-bignum=no", + *std_configure_args(prefix: libexec) + system "make", "install" + end + + ENV.prepend_path "PKG_CONFIG_PATH", "#{libexec}/lib/pkgconfig" + + system "./autogen.sh" + system "./configure", "--disable-silent-rules", + "--with-boost-libdir=#{Formula["boost"].opt_lib}", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + typedef std::vector data_chunk; + static unsigned from_hex(const char ch) + { + if ('A' <= ch && ch <= 'F') + return 10 + ch - 'A'; + if ('a' <= ch && ch <= 'f') + return 10 + ch - 'a'; + return ch - '0'; + } + static bool decode_base16_private(uint8_t* out, size_t size, const char* in) + { + for (size_t i = 0; i < size; ++i) + { + if (!isxdigit(in[0]) || !isxdigit(in[1])) + return false; + out[i] = (from_hex(in[0]) << 4) + from_hex(in[1]); + in += 2; + } + return true; + } + static bool decode_base16(data_chunk& out, const std::string& in) + { + // This prevents a last odd character from being ignored: + if (in.size() % 2 != 0) + return false; + data_chunk result(in.size() / 2); + if (!decode_base16_private(result.data(), result.size(), in.data())) + return false; + out = result; + return true; + } + static libbitcoin::consensus::verify_result test_verify(const std::string& transaction, + const std::string& prevout_script, uint64_t prevout_value=0, + uint32_t tx_input_index=0, const uint32_t flags=libbitcoin::consensus::verify_flags_p2sh, + int32_t tx_size_hack=0) + { + data_chunk tx_data, prevout_script_data; + assert(decode_base16(tx_data, transaction)); + assert(decode_base16(prevout_script_data, prevout_script)); + return libbitcoin::consensus::verify_script(&tx_data[0], tx_data.size() + tx_size_hack, + &prevout_script_data[0], prevout_script_data.size(), prevout_value, + tx_input_index, flags); + } + int main() { + const libbitcoin::consensus::verify_result result = test_verify("42", "42"); + assert(result == libbitcoin::consensus::verify_result_tx_invalid); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", + "-I#{libexec}/include", + "-L#{lib}", "-L#{libexec}/lib", + "-lbitcoin-consensus", + "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libbitcoin-database.rb b/Formula/lib/libbitcoin-database.rb new file mode 100644 index 0000000000000..329c2a2f3a6f7 --- /dev/null +++ b/Formula/lib/libbitcoin-database.rb @@ -0,0 +1,66 @@ +class LibbitcoinDatabase < Formula + desc "Bitcoin High Performance Blockchain Database" + homepage "https://github.com/libbitcoin/libbitcoin-database" + url "https://github.com/libbitcoin/libbitcoin-database/archive/refs/tags/v3.8.0.tar.gz" + sha256 "37dba4c01515fba82be125d604bbe55dbdcc69e41d41f8cf6fbaddaaab68c038" + license "AGPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "891d6ba155b3dec6d7760d1147cbe3fa3448ba722c33a8363913ac7e3fe337f6" + sha256 cellar: :any, arm64_sonoma: "7d1a6883674ad006e2233445adc8c47ef8505acdb097ce666bb91e83b4e38e1c" + sha256 arm64_ventura: "d5aaf977086d6ae540c4726ce77eed25538d1bcba722d34d69dfefa42a531600" + sha256 arm64_monterey: "f238610033ae744928597b0719dd7eb2347e5470ebd23c81638cac3d9368799a" + sha256 arm64_big_sur: "ffb0d03c1e8a283039a15e3ca8f5d4dcac8b394146658803e512960f655d9f87" + sha256 cellar: :any, sonoma: "81f2ed2a08808be901616743e9ab7b9b22969af3fe2e038b08502c48b2dc4d49" + sha256 ventura: "cdd90d1627d1371f7c4fcd5c31419ca884ce5b39ce139180a285a206415f0da5" + sha256 monterey: "df0d64f7244474c78af515e30944fd727b3c2565e8a2aae7d2db32e8b06b7dbe" + sha256 big_sur: "035abb92965ca29b24b7ebaace65626c803e8c7a5771debfbb011d5460de6a73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f2ceee2a4bc6ac4b0b67af2b97916eb79e0ed1aeee66a4a8695beee59e44a50" + end + + # About 2 years since request for release with support for recent `boost`. + # Ref: https://github.com/libbitcoin/libbitcoin-system/issues/1234 + disable! date: "2024-12-14", because: "uses deprecated `boost@1.76`" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + # https://github.com/libbitcoin/libbitcoin-system/issues/1234 + depends_on "boost@1.76" + depends_on "libbitcoin-system" + + def install + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" + + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-boost-libdir=#{Formula["boost@1.76"].opt_lib}" + system "make", "install" + end + + test do + boost = Formula["boost@1.76"] + (testpath/"test.cpp").write <<~CPP + #include + using namespace libbitcoin::database; + using namespace libbitcoin::chain; + int main() { + static const transaction tx{ 0, 0, input::list{}, output::list{ output{} } }; + unspent_outputs cache(42); + cache.add(tx, 0, 0, false); + assert(cache.size() == 1u); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", + "-I#{boost.include}", + "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin-system", + "-L#{lib}", "-lbitcoin-database", + "-L#{boost.lib}", "-lboost_system" + system "./test" + end +end diff --git a/Formula/lib/libbitcoin-explorer.rb b/Formula/lib/libbitcoin-explorer.rb new file mode 100644 index 0000000000000..24b03547370ac --- /dev/null +++ b/Formula/lib/libbitcoin-explorer.rb @@ -0,0 +1,62 @@ +class LibbitcoinExplorer < Formula + desc "Bitcoin command-line tool" + homepage "https://github.com/libbitcoin/libbitcoin-explorer" + url "https://github.com/libbitcoin/libbitcoin-explorer/archive/refs/tags/v3.8.0.tar.gz" + sha256 "c10993ab4846e98ec4618ca2d2aab31669dc091fa2feb17d421eb96b9c35c340" + license "AGPL-3.0-or-later" + revision 2 + + bottle do + sha256 arm64_sequoia: "92fd7ff6e8e5caaaf8da563fc8c024fd9d29501a3b46a52eb2275370a9ccfa6f" + sha256 arm64_sonoma: "7ce16a07286ba0403891fe6db304e4d2db29d5358b1d8b8b8eb827e6568756bb" + sha256 arm64_ventura: "b273e60879e4345bfd9c2eb9f82261748db1eafbbe108d81b5fb97e829b29196" + sha256 arm64_monterey: "b7685b9d3f2bce471a847685b0bd22a66066af0f8e9540c7904d48e475fe1d48" + sha256 sonoma: "e39834054ba8fcf5c32e72cfa74daa87fb0c1c3ecccde48f722581798c3fa2ae" + sha256 ventura: "fbf0b96e5c4908e3bc0aadf17845694c7bf1ea29a7b25c7c651c74013d950386" + sha256 monterey: "f98a3cee4322b881f2f77b07e2384a0d42f84777b8a4dc1665b10c8f5e55ed0d" + sha256 x86_64_linux: "847b8b76af5d255821ff814d26846bbeb2b1d86bd2c47a3a5ce98314e701843c" + end + + # About 2 years since request for release with support for recent `boost`. + # Ref: https://github.com/libbitcoin/libbitcoin-system/issues/1234 + disable! date: "2024-12-14", because: "uses deprecated `boost@1.76`" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libbitcoin-client" + depends_on "libbitcoin-network" + depends_on "libsodium" + depends_on "zeromq" + + def install + ENV.cxx11 + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" + + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-boost-libdir=#{Formula["boost@1.76"].opt_lib}" + system "make", "install" + + bash_completion.install "data/bx" + end + + test do + seed = "7aaa07602b34e49dd9fd13267dcc0f368effe0b4ce15d107" + expected_private_key = "5b4e3cba38709f0d80aff509c1cc87eea9dad95bb34b09eb0ce3e8dbc083f962" + expected_public_key = "023b899a380c81b35647fff5f7e1988c617fe8417a5485217e653cda80bc4670ef" + expected_address = "1AxX5HyQi7diPVXUH2ji7x5k6jZTxbkxfW" + + private_key = shell_output("#{bin}/bx ec-new #{seed}").chomp + assert_equal expected_private_key, private_key + + public_key = shell_output("#{bin}/bx ec-to-public #{private_key}").chomp + assert_equal expected_public_key, public_key + + address = shell_output("#{bin}/bx ec-to-address #{public_key}").chomp + assert_equal expected_address, address + end +end diff --git a/Formula/lib/libbitcoin-network.rb b/Formula/lib/libbitcoin-network.rb new file mode 100644 index 0000000000000..6a229b1dccc7d --- /dev/null +++ b/Formula/lib/libbitcoin-network.rb @@ -0,0 +1,65 @@ +class LibbitcoinNetwork < Formula + desc "Bitcoin P2P Network Library" + homepage "https://github.com/libbitcoin/libbitcoin-network" + url "https://github.com/libbitcoin/libbitcoin-network/archive/refs/tags/v3.8.0.tar.gz" + sha256 "d317582bc6d00cba99a0ef01903a542c326c2a4262ef78a4aa682d3826fd14ad" + license "AGPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "5102e0cf354692cdc217fd8ef1e07a8a1d1b75e3e317b77426cc9149e6a10a2e" + sha256 cellar: :any, arm64_sonoma: "8f97c5b13b85764dd830ddf34945a61bee5ea9e3f75e19abc8651ce710c7120f" + sha256 arm64_ventura: "16b09472dc3bd572e592f5e9259757bec8e4b6a1879c1b8794387ad4b1fa9557" + sha256 arm64_monterey: "f93418e45de4ce25ab34c1f3d169ad78efe671418695004e97af7431d429481b" + sha256 arm64_big_sur: "67c9775428fb88ce12557586ec8cf4e5247716b17fe79e8d24155d91e84cf665" + sha256 cellar: :any, sonoma: "544b52b5104d7299cfa8195c9a4104ca1a8e3087d5b674fcd6616aca2792f4e7" + sha256 ventura: "4971627e0520e2e63cc3eddcf14cfdefe96b2b8561872770e39d143f2991484b" + sha256 monterey: "548e67436072c1a9de5807fcdeeea64f44ebc5eb7a17720068ac137dafd0b62a" + sha256 big_sur: "23c335f851dcd0f1c7b06ac29e9ea8e864dfbae66469c326efa237ea3bb51197" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56adc9c14bfac95a6b2169fd0d190164ed77a405f2bdb1a89eb5929842748fb8" + end + + # About 2 years since request for release with support for recent `boost`. + # Ref: https://github.com/libbitcoin/libbitcoin-system/issues/1234 + disable! date: "2024-12-14", because: "uses deprecated `boost@1.76`" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + # https://github.com/libbitcoin/libbitcoin-system/issues/1234 + depends_on "boost@1.76" + depends_on "libbitcoin-system" + + def install + ENV.cxx11 + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" + + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-boost-libdir=#{Formula["boost@1.76"].opt_lib}" + system "make", "install" + end + + test do + boost = Formula["boost@1.76"] + (testpath/"test.cpp").write <<~CPP + #include + int main() { + const bc::network::settings configuration; + bc::network::p2p network(configuration); + assert(network.top_block().height() == 0); + assert(network.top_block().hash() == bc::null_hash); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", + "-I#{boost.include}", + "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin-system", + "-L#{lib}", "-lbitcoin-network", + "-L#{boost.lib}", "-lboost_system" + system "./test" + end +end diff --git a/Formula/lib/libbitcoin-node.rb b/Formula/lib/libbitcoin-node.rb new file mode 100644 index 0000000000000..9ab41f597f9cd --- /dev/null +++ b/Formula/lib/libbitcoin-node.rb @@ -0,0 +1,67 @@ +class LibbitcoinNode < Formula + desc "Bitcoin Full Node" + homepage "https://github.com/libbitcoin/libbitcoin-node" + url "https://github.com/libbitcoin/libbitcoin-node/archive/refs/tags/v3.8.0.tar.gz" + sha256 "49a2c83a01c3fe2f80eb22dd48b2a2ea77cbb963bcc5b98f07d0248dbb4ee7a9" + license "AGPL-3.0-or-later" + revision 1 + + bottle do + sha256 arm64_sequoia: "7c10e910f41ba2ef7150fac8778aebfab7e561f517adb19c2b3def228559c2d8" + sha256 arm64_sonoma: "af98941d96c71ee8c0c6f155e5cc1d1cb1a6fed85eae311a663671f0baf8fc4d" + sha256 arm64_ventura: "b77eab1650d04674e86c7b794bc0e96f70fffcb2549008bdba0f278c1aa4b589" + sha256 arm64_monterey: "456c03407d6cb891359d728d6303b2d668bc1a1cf7cfe0d878874fc110b40a65" + sha256 arm64_big_sur: "c198ecbe4bcab7fafd39a9ed847abccd84f26c8b3de45ae11c13f7e8bd07341d" + sha256 sonoma: "904ab97f4921e3d7c5f68d7f6fdcb17a67d487d7e9d3ce8073b09fb276ae1e41" + sha256 ventura: "97e1d00dab5e9da0a73c52d6abffa612753d09117a31729fc31262c5d0e88c1b" + sha256 monterey: "6a12ab524605ea8714c35c49f037f54ce53250516d875e132b0c9efad8b1d40c" + sha256 big_sur: "4a38fdcc76528e657974a00fcd98cf80947cfdc4834af7fe5307c8b734eefd1a" + sha256 x86_64_linux: "1f8fc0a015f1ee935c9731a9d58940eeec0c9b5f641f2dad229e8c71f5c09f4d" + end + + # About 2 years since request for release with support for recent `boost`. + # Ref: https://github.com/libbitcoin/libbitcoin-system/issues/1234 + disable! date: "2024-12-14", because: "uses deprecated `boost@1.76`" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + # https://github.com/libbitcoin/libbitcoin-system/issues/1234 + depends_on "boost@1.76" + depends_on "libbitcoin-blockchain" + depends_on "libbitcoin-network" + + def install + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" + + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-boost-libdir=#{Formula["boost@1.76"].opt_lib}" + system "make", "install" + + bash_completion.install "data/bn" + end + + test do + boost = Formula["boost@1.76"] + (testpath/"test.cpp").write <<~CPP + #include + int main() { + libbitcoin::node::settings configuration; + assert(configuration.sync_peers == 0u); + assert(configuration.sync_timeout_seconds == 5u); + assert(configuration.refresh_transactions == true); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", + "-I#{boost.include}", + "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin-system", + "-L#{lib}", "-lbitcoin-node", + "-L#{boost.lib}", "-lboost_system" + system "./test" + end +end diff --git a/Formula/lib/libbitcoin-protocol.rb b/Formula/lib/libbitcoin-protocol.rb new file mode 100644 index 0000000000000..999361de75967 --- /dev/null +++ b/Formula/lib/libbitcoin-protocol.rb @@ -0,0 +1,64 @@ +class LibbitcoinProtocol < Formula + desc "Bitcoin Blockchain Query Protocol" + homepage "https://github.com/libbitcoin/libbitcoin-protocol" + url "https://github.com/libbitcoin/libbitcoin-protocol/archive/refs/tags/v3.8.0.tar.gz" + sha256 "654aee258d7e110cce3c445906684f130c7dc6b8be2273c8dab4b46a49d8f741" + license "AGPL-3.0-or-later" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "6764b79e7494c3d693c5d961230bf1adfeeff13fa453af700e2095200795af2b" + sha256 cellar: :any, arm64_sonoma: "32d61b8663e5fab859bee922db71b16ccdeab283690837513a432187a151e38c" + sha256 cellar: :any, arm64_ventura: "5be699a3d80e31a8eb398fa12a578e895f6c205a3a142e7dfb05d772c14e9106" + sha256 cellar: :any, arm64_monterey: "742149127e38e37075f9781f33281a939216bc506574fd3cc93c7f45cf692516" + sha256 cellar: :any, sonoma: "0dfab6ce1f61c24a8382d91827cef7b2159bfc6a1ced7650ca122f74acd58dbe" + sha256 cellar: :any, ventura: "d4b8881f4efbffac9c05558a89779bdfced6bb15a7ab4b25ad3d4e38014a5d41" + sha256 cellar: :any, monterey: "edb6856e737a04bc92421a3520f35b9db06b234ec7aa0385b4e5fb26e66dff9b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "746249bddfec92921117988b74797a1bf4797bf954693fc36c04af6b6946bab1" + end + + # About 2 years since request for release with support for recent `boost`. + # Ref: https://github.com/libbitcoin/libbitcoin-system/issues/1234 + disable! date: "2024-12-14", because: "uses deprecated `boost@1.76`" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + # https://github.com/libbitcoin/libbitcoin-system/issues/1234 + depends_on "boost@1.76" + depends_on "libbitcoin-system" + depends_on "libsodium" + depends_on "zeromq" + + def install + ENV.cxx11 + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" + + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-boost-libdir=#{Formula["boost@1.76"].opt_lib}" + system "make", "install" + end + + test do + boost = Formula["boost@1.76"] + (testpath/"test.cpp").write <<~CPP + #include + int main() { + libbitcoin::protocol::zmq::message instance; + instance.enqueue(); + assert(!instance.empty()); + assert(instance.size() == 1u); + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", + "-I#{boost.include}", + "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin-system", + "-L#{lib}", "-lbitcoin-protocol", + "-L#{boost.lib}", "-lboost_system" + system "./test" + end +end diff --git a/Formula/lib/libbitcoin-server.rb b/Formula/lib/libbitcoin-server.rb new file mode 100644 index 0000000000000..0e61ab98092d8 --- /dev/null +++ b/Formula/lib/libbitcoin-server.rb @@ -0,0 +1,66 @@ +class LibbitcoinServer < Formula + desc "Bitcoin Full Node and Query Server" + homepage "https://github.com/libbitcoin/libbitcoin-server" + url "https://github.com/libbitcoin/libbitcoin-server/archive/refs/tags/v3.8.0.tar.gz" + sha256 "17e6f72606a2d132a966727c87f8afeef652b0e882b6e961673e06af89c56516" + license "AGPL-3.0-or-later" + revision 2 + + bottle do + sha256 arm64_sequoia: "92810fc107acf9da79c29882ef3e0e68ce4579d8de73870d110be12e28c08f6b" + sha256 arm64_sonoma: "fd1942df520a583e95d6ad957bfa1e22922ea7c5716e5ca6ab3bb5194bb8c8ea" + sha256 arm64_ventura: "8ca606e26ec8127227ef7397f16886d84e79b459272fac5f4a1f7206f2019a4d" + sha256 arm64_monterey: "3cd9b1de869b049995f5db8ecf2885c8b8b1f4e8511e1c067c868022812c80be" + sha256 sonoma: "920adcf91e6630683855a81d532478fcdf5915806607ee15433648b43c17c6c3" + sha256 ventura: "182667a8d5d2d523db0c4e4ce50da3b5f03c5c301823f4f503971e8fdcd4f9c4" + sha256 monterey: "7437aebdff9448085b44ff4a2de92dd228642b35af9c75cfb484c355f48e1d4e" + sha256 x86_64_linux: "f6962cd5d1c1b6d33e3ecd3f2a7f680ad6a985f2defc221db20fdad01d0e0553" + end + + # About 2 years since request for release with support for recent `boost`. + # Ref: https://github.com/libbitcoin/libbitcoin-system/issues/1234 + disable! date: "2024-12-14", because: "uses deprecated `boost@1.76`" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + # https://github.com/libbitcoin/libbitcoin-system/issues/1234 + depends_on "boost@1.76" + depends_on "libbitcoin-node" + depends_on "libbitcoin-protocol" + depends_on "libsodium" + depends_on "zeromq" + + def install + ENV.cxx11 + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" + + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-boost-libdir=#{Formula["boost@1.76"].opt_lib}" + system "make", "install" + + bash_completion.install "data/bs" + end + + test do + boost = Formula["boost@1.76"] + (testpath/"test.cpp").write <<~CPP + #include + int main() { + libbitcoin::server::message message(true); + assert(message.secure() == true); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", + "-I#{boost.include}", + "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin-system", + "-L#{lib}", "-lbitcoin-server", + "-L#{boost.lib}", "-lboost_system" + system "./test" + end +end diff --git a/Formula/lib/libbitcoin-system.rb b/Formula/lib/libbitcoin-system.rb new file mode 100644 index 0000000000000..f75e950364a49 --- /dev/null +++ b/Formula/lib/libbitcoin-system.rb @@ -0,0 +1,80 @@ +class LibbitcoinSystem < Formula + desc "Bitcoin Cross-Platform C++ Development Toolkit" + homepage "https://github.com/libbitcoin/libbitcoin-system" + url "https://github.com/libbitcoin/libbitcoin-system/archive/refs/tags/v3.8.0.tar.gz" + sha256 "b5dd2a97289370fbb93672dd3114383f30d877061de1d1683fa8bdda5309bfa2" + license "AGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "cb0bbe2d1b5692e930dcb817ed09fa8b1fa392ede7eab0dc856c2d6fa7017c65" + sha256 cellar: :any, arm64_sonoma: "3324919582f6ab687cbf681f056347985f63c06c7f525e0aa283dc592197a000" + sha256 arm64_ventura: "aed49e03846e0be62e5e605ca01179ba431dfb35d3f1b844ff8fce859549862f" + sha256 arm64_monterey: "0a300abdc05543b90b2b5db0e0d6117ca3d8c97cce089349350435d169321525" + sha256 arm64_big_sur: "346c920f79aca4136d57b17deee022f6d12938b9813b4ee90a5f41a1019d7ef9" + sha256 cellar: :any, sonoma: "8392a926e0bb32374ffea7d4253a32582a48d0289e01289c395b059d04317fa9" + sha256 ventura: "60aea6392017d5e69d5a8c3474c3561929286300fe3b174eacad804669451523" + sha256 monterey: "e93abbec391254c0b3687735eede748b0efd90426730f51fb30b6fa0838bc756" + sha256 big_sur: "a4a7556454aee07df23327dc93fa861b9a7fc429577adbc3b7788ae8430262c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9f1a6063cdcb6c35a069eb546968520935ad2addcc25e4d76229dcc8b61806a" + end + + # About 2 years since request for release with support for recent `boost`. + # Ref: https://github.com/libbitcoin/libbitcoin-system/issues/1234 + disable! date: "2024-12-14", because: "uses deprecated `boost@1.76`" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + # https://github.com/libbitcoin/libbitcoin-system/issues/1234 + depends_on "boost@1.76" + + resource "secp256k1" do + url "https://github.com/libbitcoin/secp256k1/archive/refs/tags/v0.1.0.20.tar.gz" + sha256 "61583939f1f25b92e6401e5b819e399da02562de663873df3056993b40148701" + end + + def install + ENV.cxx11 + resource("secp256k1").stage do + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{libexec}", + "--enable-module-recovery", + "--with-bignum=no" + system "make", "install" + end + + ENV.prepend_path "PKG_CONFIG_PATH", "#{libexec}/lib/pkgconfig" + + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-boost-libdir=#{Formula["boost@1.76"].opt_lib}" + system "make", "install" + end + + test do + boost = Formula["boost@1.76"] + (testpath/"test.cpp").write <<~CPP + #include + int main() { + const auto block = bc::chain::block::genesis_mainnet(); + const auto& tx = block.transactions().front(); + const auto& input = tx.inputs().front(); + const auto script = input.script().to_data(false); + std::string message(script.begin() + sizeof(uint64_t), script.end()); + std::cout << message << std::endl; + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", + "-I#{boost.include}", + "-L#{lib}", "-lbitcoin-system", + "-L#{boost.lib}", "-lboost_system", + "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libbladerf.rb b/Formula/lib/libbladerf.rb new file mode 100644 index 0000000000000..3db433d10a7d6 --- /dev/null +++ b/Formula/lib/libbladerf.rb @@ -0,0 +1,49 @@ +class Libbladerf < Formula + desc "USB 3.0 Superspeed Software Defined Radio Source" + homepage "https://nuand.com/" + url "https://github.com/Nuand/bladeRF.git", + tag: "2023.02", + revision: "41ef63460956e833c9b321252245257ab3946055" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later", "MIT"] + revision 1 + head "https://github.com/Nuand/bladeRF.git", branch: "master" + + # Upstream uses GitHub releases to indicate that a version is released + # and they may retag a stable version before release, so the `GithubLatest` + # strategy is necessary. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2651db296521b2728bc29c789eeb500044d640a0a9a8483c089412154577701e" + sha256 cellar: :any, arm64_sonoma: "a1f53b13340f34c10cd6472165c539b94c6b99ccfc2dd0e0b010ae989276223e" + sha256 cellar: :any, arm64_ventura: "981e3c3b94703b88a9d9f7e341a16ad8ea969fdcc1ce06ce9edf514d8bd9d7e0" + sha256 cellar: :any, arm64_monterey: "c2a39382f86a2a39efc8e8c136f5a2aa9b350b46fda72a395f36800f92bceff6" + sha256 cellar: :any, arm64_big_sur: "198b025b353d6fc684abacc3b9521cb614e75f262d2f7bc15241a011cc421c1c" + sha256 cellar: :any, sonoma: "1d3f7838eda5b2ab9c9f1f984ae36241f436261ffe98375e578cb359db1ae366" + sha256 cellar: :any, ventura: "447589cd895d154bf6ce5b1cf0ed762b03cec1fb237d75b6c16e012257589ba9" + sha256 cellar: :any, monterey: "a6eb04e265dbc9f484faed50f3d7c779311d23010343e23b3b266d5150092985" + sha256 cellar: :any, big_sur: "acc0fcce7eceb0ae5fcf57777d4eed7c73bca6583841967cf82593d2c51e3ceb" + sha256 cellar: :any_skip_relocation, arm64_linux: "b1d15c52df67382a53ec8d17a7a717710d2e5aedfa50b93b7f7701ecac71ac0e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "841a063c843f054272069b435c58f3c665c1c1190e489f7e7c34729d3a0662b1" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + + uses_from_macos "libedit" + + def install + ENV.prepend "CFLAGS", "-I#{MacOS.sdk_path}/usr/include/malloc" if OS.mac? + system "cmake", "-S", "host", "-B", "build", "-DUDEV_RULES_PATH=#{lib}/udev/rules.d", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"bladeRF-cli", "--version" + end +end diff --git a/Formula/lib/libblastrampoline.rb b/Formula/lib/libblastrampoline.rb new file mode 100644 index 0000000000000..cec5f0bce9ff8 --- /dev/null +++ b/Formula/lib/libblastrampoline.rb @@ -0,0 +1,74 @@ +class Libblastrampoline < Formula + desc "Using PLT trampolines to provide a BLAS and LAPACK demuxing library" + homepage "https://github.com/JuliaLinearAlgebra/libblastrampoline" + url "https://github.com/JuliaLinearAlgebra/libblastrampoline/archive/refs/tags/v5.12.0.tar.gz" + sha256 "12f9d186bc844a21dfa2a6ea1f38a039227554330c43230d72f721c330cf6018" + license all_of: [ + "MIT", + "BSD-2-Clause-Views", # include/common/f77blas.h + "BSD-3-Clause", # include/common/lapacke* + ] + + bottle do + sha256 cellar: :any, arm64_sequoia: "a41f25d661d33658eec04d2a320c20e885db2ad5bcdbcb30ef62e7c41d534ceb" + sha256 cellar: :any, arm64_sonoma: "e3816dc15789f1b23444a81fa39e2f143de139244c42df036df1bdf713df4ca3" + sha256 cellar: :any, arm64_ventura: "1cdd282eb257880f3b04ae12ac6715bc4407bf49b14dc4ae4a190755840f4de9" + sha256 cellar: :any, sonoma: "b8eb22f07216cfc835aad8f48ac29fdb19ed2dfb162f5c2559f56bbe15c46ce3" + sha256 cellar: :any, ventura: "ee9c185e49e8f405ba2335f661593d3838130b6a20415143a7984f0d0af21f1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "5bd84148c9d508220b588ef6eaf80e82dbf1ede283221de412b1c9fac52824b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8df6fd7523f579b6110937096f0b9d21d430fffc0924cdc1f742364c94d88a84" + end + + depends_on "openblas" => :test + + # Apply commit from open PR to fix build with Xcode 16+ / LLVM 17+ + # PR ref: https://github.com/JuliaLinearAlgebra/libblastrampoline/pull/148 + patch do + url "https://github.com/JuliaLinearAlgebra/libblastrampoline/commit/c7e71924f47f4d016afe7ef994e30b46080ac918.patch?full_index=1" + sha256 "320360db93fe46e52ee21e8b817752ec3b1717b64a0f33b45617bcc6dfa206ae" + end + + def install + system "make", "-C", "src", "install", "prefix=#{prefix}" + (pkgshare/"test").install "test/dgemm_test/dgemm_test.c" + end + + test do + cp pkgshare/"test/dgemm_test.c", testpath + + (testpath/"api_test.c").write <<~C + #include + #include + #include + + int main() { + const lbt_config_t * config = lbt_get_config(); + assert(config != NULL); + + lbt_library_info_t ** libs = config->loaded_libs; + assert(libs != NULL); + assert(sizeof(libs) == sizeof(lbt_library_info_t *)); + assert(libs[0] != NULL); + + printf("%s", libs[0]->libname); + return 0; + } + C + + system ENV.cc, "dgemm_test.c", "-I#{include}", "-L#{lib}", "-lblastrampoline", "-o", "dgemm_test" + system ENV.cc, "api_test.c", "-I#{include}", "-L#{lib}", "-lblastrampoline", "-o", "api_test" + + test_libs = [shared_library("libopenblas")] + if OS.mac? + test_libs << "/System/Library/Frameworks/Accelerate.framework/Accelerate" + ENV["DYLD_LIBRARY_PATH"] = Formula["openblas"].opt_lib.to_s + end + + test_libs.each do |test_lib| + with_env(LBT_DEFAULT_LIBS: test_lib) do + assert_equal test_lib, shell_output("./api_test") + system "./dgemm_test" + end + end + end +end diff --git a/Formula/lib/libbluray.rb b/Formula/lib/libbluray.rb new file mode 100644 index 0000000000000..6728336f172d7 --- /dev/null +++ b/Formula/lib/libbluray.rb @@ -0,0 +1,64 @@ +class Libbluray < Formula + desc "Blu-Ray disc playback library for media players like VLC" + homepage "https://www.videolan.org/developers/libbluray.html" + url "https://download.videolan.org/videolan/libbluray/1.3.4/libbluray-1.3.4.tar.bz2" + sha256 "478ffd68a0f5dde8ef6ca989b7f035b5a0a22c599142e5cd3ff7b03bbebe5f2b" + license "LGPL-2.1-or-later" + + livecheck do + url "https://download.videolan.org/pub/videolan/libbluray/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "82b771563b1348e8121ceb5156d5457207147e8ac851aea9d70d31c058f8a98e" + sha256 cellar: :any, arm64_sonoma: "385b5460b56cb7c811c661a39509c62436d7a60f388bd960782f23192ade074a" + sha256 cellar: :any, arm64_ventura: "c51fc3248e75d1cf23f9d3d2856d719e6298b913e4b161f066993b2485a79b66" + sha256 cellar: :any, arm64_monterey: "3369218f1258be668eca6975f82ac25b8a906e984d8a8344e9ed4d93657debfc" + sha256 cellar: :any, arm64_big_sur: "b321152d681e4fcd8c7fe06dfbc6f5f2f66460b19bef0faffff975fcd98b791f" + sha256 cellar: :any, sonoma: "252cb3fcb309c45ef22d9c297f5c2dc3978407eca32fa332d55e60d2051671a4" + sha256 cellar: :any, ventura: "4f07968528f3799faa411a4fc304bb762a4b2d90eda3d0292dc322fcdbeadccf" + sha256 cellar: :any, monterey: "675911bf2b50a1f33112fb2fb76acf33c03d56d465477439c34c54088eda848e" + sha256 cellar: :any, big_sur: "18490d577635a9975be2e1f06efaa5d7b33fc238af966d3587758f3a13ceb6bf" + sha256 cellar: :any, catalina: "ea15b923a467441fd884d25c339e12a5cdd6a71b39d670b301456af6428fcd0e" + sha256 cellar: :any_skip_relocation, arm64_linux: "fbf92a392c04e7ea08208af7eace86c7e320256ee4227762fab7208c3d37e2da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5777913be5f68fb71aa0e5ed057ced402b9f8ab119a8ea74623bca2b5475f04" + end + + head do + url "https://code.videolan.org/videolan/libbluray.git" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "fontconfig" + depends_on "freetype" + + uses_from_macos "libxml2" + + def install + args = %w[--disable-silent-rules --disable-bdjava-jar] + + system "./bootstrap" if build.head? + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) { + BLURAY *bluray = bd_init(); + bd_close(bluray); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lbluray", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libbpf.rb b/Formula/lib/libbpf.rb new file mode 100644 index 0000000000000..cf5e221a7822d --- /dev/null +++ b/Formula/lib/libbpf.rb @@ -0,0 +1,36 @@ +class Libbpf < Formula + desc "Berkeley Packet Filter library" + homepage "https://github.com/libbpf/libbpf" + url "https://github.com/libbpf/libbpf/archive/refs/tags/v1.5.0.tar.gz" + sha256 "53492aff6dd47e4da04ef5e672d753b9743848bdb38e9d90eafbe190b7983c44" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "96c808c8f6a5b908a3a1702404a7461f8ce9981173f937a45ee0ef1adef9dd5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff0139bb799097722a2a15a5593ebb0c6e13ba2e8f61f8add855bef223329c33" + end + + depends_on "pkgconf" => :build + depends_on "elfutils" + depends_on :linux + depends_on "zlib" + + def install + system "make", "-C", "src" + system "make", "-C", "src", "install", "PREFIX=#{prefix}", "LIBDIR=#{lib}" + end + + test do + (testpath/"test.c").write <<~C + #include "bpf/libbpf.h" + #include + + int main() { + printf("%s", libbpf_version_string()); + return(0); + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lbpf", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libbpg.rb b/Formula/lib/libbpg.rb new file mode 100644 index 0000000000000..edec03c1cadb8 --- /dev/null +++ b/Formula/lib/libbpg.rb @@ -0,0 +1,45 @@ +class Libbpg < Formula + desc "Image format meant to improve on JPEG quality and file size" + homepage "https://bellard.org/bpg/" + url "https://bellard.org/bpg/libbpg-0.9.8.tar.gz" + sha256 "c0788e23bdf1a7d36cb4424ccb2fae4c7789ac94949563c4ad0e2569d3bf0095" + license all_of: ["MIT", "BSD-3-Clause", "LGPL-2.1-or-later", "GPL-2.0-or-later"] + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "8141450054340a9cab2a9a349c2a8445eb31e7312a918f90e20c9b06d60754fd" + sha256 cellar: :any, arm64_sonoma: "bf5d06c9fc78777d99c50c65585e3f295046d2619adcaa0c93c5349e1a650d15" + sha256 cellar: :any, arm64_ventura: "6efc300826fc1217ec39625cd01b93617fb9ea95f11a88c990751fed2e27eabb" + sha256 cellar: :any, arm64_monterey: "6a4d3e8d365795072c819aaca5b6e662e047b80ebe05b555a8f0fb1e6d898ad7" + sha256 cellar: :any, arm64_big_sur: "d83f7a8c9da692ea920d82e7a3f67708525e719133b69175343087aa71ceadc0" + sha256 cellar: :any, monterey: "54e0eb081753ff784595e6df85d47e691481cdf05101c3e7f8032aca9ae61024" + sha256 cellar: :any, big_sur: "193409ef7e3a3ad3a2913a075b9d53a6aa1aa8d45ddb7ce299dd660fa6d67c66" + sha256 cellar: :any, catalina: "f7d21d83158c5122b604bbe9641014628257dbc754fdc66ebf2ffc237bdd9893" + end + + # Test fails, email sent to upstream on Aug 2023, no response + disable! date: "2024-09-26", because: :unmaintained + + depends_on "cmake" => :build + depends_on "yasm" => :build + depends_on "jpeg-turbo" + depends_on "libpng" + + def install + # Work around "-Werror,-Wimplicit-function-declaration" on Xcode 14 + # The Makefile does not allow modifying CFLAGS with an env variable, so we + # have to inject the flag manually + inreplace "Makefile", "CFLAGS+=-g", "CFLAGS+=-g -Wno-implicit-function-declaration" + + bin.mkpath + extra_args = [] + extra_args << "CONFIG_APPLE=y" if OS.mac? + system "make", "install", "prefix=#{prefix}", *extra_args + pkgshare.install Dir["html/bpgdec*.js"] + end + + test do + system bin/"bpgenc", test_fixtures("test.png") + assert_path_exists testpath/"out.bpg" + end +end diff --git a/Formula/lib/libbs2b.rb b/Formula/lib/libbs2b.rb new file mode 100644 index 0000000000000..2b0416e53ac43 --- /dev/null +++ b/Formula/lib/libbs2b.rb @@ -0,0 +1,60 @@ +class Libbs2b < Formula + desc "Bauer stereophonic-to-binaural DSP" + homepage "https://bs2b.sourceforge.net/" + url "https://downloads.sourceforge.net/project/bs2b/libbs2b/3.1.0/libbs2b-3.1.0.tar.gz" + sha256 "6aaafd81aae3898ee40148dd1349aab348db9bfae9767d0e66e0b07ddd4b2528" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "45676722780a091419361b9966b69511a1f0c7c6d9703ab72d7178711fbf749a" + sha256 cellar: :any, arm64_sonoma: "63ef89f0f1b41aea4ca096bba70fc2995da8c28845ffe9f57de8b0e51a3407c3" + sha256 cellar: :any, arm64_ventura: "550fc0d9af3d05be26435c1e7393a2d523775d0e2ed9af1cbe4791ed324ea9ca" + sha256 cellar: :any, arm64_monterey: "be6c28752ed45916a1e7aec26599d0b08248d5b5409df335f1df1287956fcbd6" + sha256 cellar: :any, arm64_big_sur: "348394113062af5f31f9dfd6617f8d248b9bdeba11d28711d83e3e5d9326437f" + sha256 cellar: :any, sonoma: "1f07651dd674bbccd300375b9c2405f6e116444763f1964be66cc64ee905c6c3" + sha256 cellar: :any, ventura: "cb6f81bd34f41b0722bcc53e37f07bdb2b6c876dacdb56056de8c59368eca7da" + sha256 cellar: :any, monterey: "f4089cd8eb97c9f9f446b3402aa11a2cf920cfe95dc818534c9444b6fd2bba4a" + sha256 cellar: :any, big_sur: "b7cd734ae3c6870fc16092a076d343efd1325ff1188062d2a63971df783507c0" + sha256 cellar: :any, catalina: "61ba0d4bf4a016a7634256d2c7eef59d55dacb3f33730d8f2905f9fa35db0108" + sha256 cellar: :any, mojave: "b1236f81550a661e9b6ca6db5c828465d32cf0ca8e7db9504cb94871760c4a22" + sha256 cellar: :any, high_sierra: "0d2faffb7452ddd66d306746065dc7264d66c3e8f60a3525ee4eb911cd546bcd" + sha256 cellar: :any, sierra: "0431cb3f7cac90d18d854abe956ad296ba399832b733293e55ea58f0f11ba1b1" + sha256 cellar: :any, el_capitan: "7949aa7768466a789d992d079a63d5933d19e76ebfb330b38d3b4822929a71ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "2595f81bf293833f6aea6611164a1ca362517cf89e3ed64862c9171cb9390ea2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d6af3a009939d61fdec9ddd863c4c6e8b51d4f3bd5bc73f55dfc76ac2f48231" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libsndfile" + + def install + # fix 'error: support for lzma-compressed distribution archives has been removed' + inreplace "configure.ac", "dist-lzma", "" + system "autoreconf", "--force", "--verbose", "--install" + + system "./configure", "--disable-static", "--enable-shared", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + t_bs2bdp info = bs2b_open(); + if (info == 0) + { + return 1; + } + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lbs2b", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libbsd.rb b/Formula/lib/libbsd.rb new file mode 100644 index 0000000000000..2e1d9bad4f5da --- /dev/null +++ b/Formula/lib/libbsd.rb @@ -0,0 +1,38 @@ +class Libbsd < Formula + desc "Utility functions from BSD systems" + homepage "https://libbsd.freedesktop.org/" + url "https://libbsd.freedesktop.org/releases/libbsd-0.12.2.tar.xz" + sha256 "b88cc9163d0c652aaf39a99991d974ddba1c3a9711db8f1b5838af2a14731014" + license "BSD-3-Clause" + + livecheck do + url "https://libbsd.freedesktop.org/releases/" + regex(/href=.*?libbsd[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "e9bd43f6679707dbe86536dd3d9daefd9988db71b911d9b1fd7bbb04658b446c" + sha256 cellar: :any, arm64_sonoma: "aa3c342efa7b87672ed780f3ac53680a5493f0e267eab9d71cd4d4380146342c" + sha256 cellar: :any, arm64_ventura: "3f8b9f7545d170c69e15ba9e24edb7cf7cb98ccda39dd3c8a4ed0d28c75b7bb5" + sha256 cellar: :any, sonoma: "4fc8e8c21ed393023cae19ff35ec7b5faf7df85c9bc843dafcb7f96b5b1f8537" + sha256 cellar: :any, ventura: "110fd177f3769fc485f1deff7a88c1f268d588fffcc9c58c0919ce4a3a30b6d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "c6c6c7d6349ce9b9aab5c6a6db366e4538d0911e4619e14ce51838a683ad3d92" + sha256 cellar: :any_skip_relocation, x86_64_linux: "31fb2290fe313559d9de741089809ea8d5bc8cffdaf8237f350c6d2f836bba95" + end + + depends_on "libmd" + + def install + system "./configure", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + libbsd = lib/shared_library("libbsd", version.major.to_s) + assert_match "strtonum", shell_output("nm #{libbsd}") + end +end diff --git a/Formula/lib/libbtbb.rb b/Formula/lib/libbtbb.rb new file mode 100644 index 0000000000000..621ac716c3034 --- /dev/null +++ b/Formula/lib/libbtbb.rb @@ -0,0 +1,40 @@ +class Libbtbb < Formula + include Language::Python::Shebang + + desc "Bluetooth baseband decoding library" + homepage "https://github.com/greatscottgadgets/libbtbb" + url "https://github.com/greatscottgadgets/libbtbb/archive/refs/tags/2020-12-R1.tar.gz" + version "2020-12-R1" + sha256 "9478bb51a38222921b5b1d7accce86acd98ed37dbccb068b38d60efa64c5231f" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/greatscottgadgets/libbtbb.git", branch: "master" + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_sequoia: "64901cfb8edd8d6ccbb685335ef735d0de585d4e2d82b246a9e720fde31a60cb" + sha256 cellar: :any, arm64_sonoma: "e726852f1f39301c67986c7b6dbfb0c182b8c5fb409c59a0c0cae4f3871ce0bb" + sha256 cellar: :any, arm64_ventura: "cf6b1a34c31a753e2ff677dad8b5668c05a3c7f857ab4d961e8ed5218b83313c" + sha256 cellar: :any, sonoma: "9328d6ce06defac48d51045a420021f25b7ce7165c766d702c14611ae8c2fc92" + sha256 cellar: :any, ventura: "f82f1bcc5ad54c8fc3c86295050bcab0f570b99904f1582464b6c0131d10cc5f" + sha256 cellar: :any_skip_relocation, arm64_linux: "85e0a063f6196f8022335ecb838bfc169e2116533ced2ac80b510bb032694507" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bb29f005dbfc0f47754c839a37d3812f1c872409e7918426c5e1ed9bf345d744" + end + + depends_on "cmake" => :build + depends_on "python@3.13" + + def install + system "cmake", "-S", ".", "-B", "build", "-DENABLE_PYTHON=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + system "python3.13", "-m", "pip", "install", *std_pip_args(build_isolation: true), "./python/pcaptools" + bin.install "python/pcaptools/btaptap" + rewrite_shebang detected_python_shebang, bin/"btaptap" + end + + test do + system bin/"btaptap", "-r", test_fixtures("test.pcap") + end +end diff --git a/Formula/lib/libcaca.rb b/Formula/lib/libcaca.rb new file mode 100644 index 0000000000000..eb1cc37f66db8 --- /dev/null +++ b/Formula/lib/libcaca.rb @@ -0,0 +1,67 @@ +class Libcaca < Formula + desc "Convert pixel information into colored ASCII art" + homepage "http://caca.zoy.org/wiki/libcaca" + url "https://github.com/cacalabs/libcaca/releases/download/v0.99.beta20/libcaca-0.99.beta20.tar.bz2" + mirror "https://fossies.org/linux/privat/libcaca-0.99.beta20.tar.bz2" + version "0.99b20" + sha256 "ff9aa641af180a59acedc7fc9e663543fb397ff758b5122093158fd628125ac1" + license "WTFPL" + + livecheck do + url :stable + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.gsub(/\.?beta/, "b") } + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5352a2e3f1f3e752955b499071b1b38521b7dcce378f51c8c20d5a6a3c9a57b7" + sha256 cellar: :any, arm64_sonoma: "b61b6d0e7c9d1d7faf96997ce20a046aa71915c3a1132fb5a8f32cbdccd5e6ce" + sha256 cellar: :any, arm64_ventura: "27d36a5457f9d98cf925cb402e9abb784c0d3453c8036fe74ebdeae04b7a9063" + sha256 cellar: :any, arm64_monterey: "b29bc6f1dd407411eab8689bfe190574b9fdc487d00dbdc7636e9483de867e56" + sha256 cellar: :any, arm64_big_sur: "afa31ed628299e9d3fb4109b8f05b5b00fc2820c22804f85993eebda9a3097c0" + sha256 cellar: :any, sonoma: "40a0eb8832b801282057e1260110740d38a911f9011ee1d88ab7575a4d6eab7f" + sha256 cellar: :any, ventura: "a0fcaf753907e6dabf7d1a2038cdc95444fddf00f7dafd2b6ca88b7f552336ad" + sha256 cellar: :any, monterey: "c7f6b2b19aaaa1417feac203e5c3676b6c0e70fb72816e16e1b85343e8cf55fb" + sha256 cellar: :any, big_sur: "efe390bae78561024c804ac37bb5c0cf9f3397229bd91732cb59f9f4e32ecc8c" + sha256 cellar: :any, catalina: "f0f86157174d749eedaec913f4d8d1b6d00824b6e580498847ac9e00c9c53d9e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c591f85155b4b4bc5efa7b98f5e43a638c2a6b9b5a771d26fe56ce31adb7285d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7dab49e0d6bf0ed46dcc831c783da0124e5329f7e0e69f7d8cf847f9b825ebe2" + end + + head do + url "https://github.com/cacalabs/libcaca.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "imlib2" + + def install + system "./bootstrap" if build.head? + + args = %w[ + --disable-cocoa + --disable-csharp + --disable-doc + --disable-java + --disable-python + --disable-ruby + --disable-slang + --disable-x11 + ] + + system "./configure", *args, *std_configure_args + system "make" + ENV.deparallelize # Or install can fail making the same folder at the same time + system "make", "install" + end + + test do + cp test_fixtures("test.png"), "test.png" + assert_match "\e[0;5;34;44m", shell_output("#{bin}/img2txt test.png") + end +end diff --git a/Formula/lib/libcanberra.rb b/Formula/lib/libcanberra.rb new file mode 100644 index 0000000000000..c79318f87716b --- /dev/null +++ b/Formula/lib/libcanberra.rb @@ -0,0 +1,77 @@ +class Libcanberra < Formula + desc "Implementation of XDG Sound Theme and Name Specifications" + homepage "https://0pointer.de/lennart/projects/libcanberra/" + license "LGPL-2.1-or-later" + + stable do + url "https://0pointer.de/lennart/projects/libcanberra/libcanberra-0.30.tar.xz" + sha256 "c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + end + + livecheck do + url :homepage + regex(/href=.*?libcanberra[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "710648952f9dde5a4292a1d0911d3da6d471684f86eb2c0192b9a6110ae28acd" + sha256 cellar: :any, arm64_sonoma: "41b031dfdc5078762fa0e135ef5846d6a067999e1d2fa3ab567846dd19f5ef78" + sha256 cellar: :any, arm64_ventura: "1874b238a6e087b86523eec9845e8ea16934041295bf2833ae676261dc186204" + sha256 cellar: :any, arm64_monterey: "2407b2f3645eb6d00b7aec1ea237c48a0e7131c8b8d7e5b5d3e8f97d4e07b8ad" + sha256 cellar: :any, arm64_big_sur: "2183cecb64492002ff553ea1e4cc74be23921dec369d86c37c0950b8cdfa2fcd" + sha256 cellar: :any, sonoma: "a2822a52008b3d1fdac3f9f1486072a356b17b91149fa747846eea2c44839d3e" + sha256 cellar: :any, ventura: "07441e73895530de938f0a567885882ed7eef3a3709266b641ab60690f253f84" + sha256 cellar: :any, monterey: "0da5077b448fcb7b6971cf9544872d5670aff827c8150ea9782c0aebbcb6b1c1" + sha256 cellar: :any, big_sur: "37f03c26282f804ee5d3c1ae6335c53b494cc89418c017ea3ff3e7c1025dcd12" + sha256 cellar: :any, catalina: "34ff83c6dc8af0afc1f1988ebde1ccb4c17d4604fa6d36567daedef43da3047d" + sha256 cellar: :any, mojave: "3d32a254ac069ef41b785f6950e3eea625de6faaf99d2402236b451f8c765b05" + sha256 cellar: :any, high_sierra: "561aa9aba4e6b5f191b74d3dd1c96de9951e3dc5b696d93abaeaa301aa117bae" + sha256 cellar: :any_skip_relocation, arm64_linux: "74befcfd2bc08601e7ec7cff6548d6a6a8960a9d904340948fbe9513cfc1b620" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8c25edecba69fd90fbd847fede6df5a01107e469422a2f937fff082a43d6073" + end + + head do + url "git://git.0pointer.de/libcanberra", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gtk-doc" + end + + depends_on "pkgconf" => :build + depends_on "libtool" + depends_on "libvorbis" + + def install + system "./autogen.sh" if build.head? + + # ld: unknown option: --as-needed" and then the same for `--gc-sections` + # Reported 7 May 2016: lennart@poettering.net and mzyvopnaoreen@0pointer.de + system "./configure", "--prefix=#{prefix}", "--no-create" + inreplace "config.status", "-Wl,--as-needed -Wl,--gc-sections", "" + system "./config.status" + + system "make", "install" + end + + test do + (testpath/"lc.c").write <<~C + #include + int main() + { + ca_context *ctx = NULL; + (void) ca_context_create(&ctx); + return (ctx == NULL); + } + C + system ENV.cc, "lc.c", "-I#{include}", "-L#{lib}", "-lcanberra", "-o", "lc" + system "./lc" + end +end diff --git a/Formula/lib/libcap-ng.rb b/Formula/lib/libcap-ng.rb new file mode 100644 index 0000000000000..da817563a90ae --- /dev/null +++ b/Formula/lib/libcap-ng.rb @@ -0,0 +1,60 @@ +class LibcapNg < Formula + desc "Library for Linux that makes using posix capabilities easy" + homepage "https://people.redhat.com/sgrubb/libcap-ng/" + url "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-0.8.5.tar.gz" + sha256 "3ba5294d1cbdfa98afaacfbc00b6af9ed2b83e8a21817185dfd844cc8c7ac6ff" + license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"] + + livecheck do + url :homepage + regex(/href=.*?libcap-ng[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "981ae5326e20f2844c171f30110902780b64b3860c8f96e4e631434434a230bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9213f1b147c170ebc3b4cb8e900562183885668dd745d0888d985d9fd0cfdbe3" + end + + head do + url "https://github.com/stevegrubb/libcap-ng.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "m4" => :build + end + + depends_on "python-setuptools" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "swig" => :build + depends_on :linux + + def python3 + "python3.13" + end + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--with-python3" + system "make", "install", "py3execdir=#{prefix/Language::Python.site_packages(python3)}" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char *argv[]) + { + if(capng_have_permitted_capabilities() > -1) + printf("ok"); + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcap-ng", "-o", "test" + assert_equal "ok", `./test` + system python3, "-c", "import capng" + end +end diff --git a/Formula/lib/libcap.rb b/Formula/lib/libcap.rb new file mode 100644 index 0000000000000..47b666aa89915 --- /dev/null +++ b/Formula/lib/libcap.rb @@ -0,0 +1,27 @@ +class Libcap < Formula + desc "User-space interfaces to POSIX 1003.1e capabilities" + homepage "https://sites.google.com/site/fullycapable/" + url "https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.76.tar.xz" + sha256 "629da4ab29900d0f7fcc36227073743119925fd711c99a1689bbf5c9b40c8e6f" + license all_of: ["BSD-3-Clause", "GPL-2.0-or-later"] + + livecheck do + url "https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/" + regex(/href=.*?libcap[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "daf16aeef1862c06a0fb6fea160d8a9f7ccf14a4459ff21e2ddf1c8904bef9ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1b39367526d90d20f2456fa3a443f12b2b80f325dcd0c7d755d2136ce824541" + end + + depends_on :linux + + def install + system "make", "install", "prefix=#{prefix}", "lib=lib", "RAISE_SETFCAP=no" + end + + test do + assert_match "usage", shell_output("#{sbin}/getcap 2>&1", 1) + end +end diff --git a/Formula/lib/libcbor.rb b/Formula/lib/libcbor.rb new file mode 100644 index 0000000000000..7ad61ee689102 --- /dev/null +++ b/Formula/lib/libcbor.rb @@ -0,0 +1,53 @@ +class Libcbor < Formula + desc "CBOR protocol implementation for C and others" + homepage "https://github.com/PJK/libcbor" + url "https://github.com/PJK/libcbor/archive/refs/tags/v0.12.0.tar.gz" + sha256 "5368add109db559f546d7ed10f440f39a273b073daa8da4abffc83815069fa7f" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a4b607654d91133a0a38fcc6106bfe3504e82101f6a3ebcba6ca81109645ffd0" + sha256 cellar: :any, arm64_sonoma: "4702c138e675003b441360be3cb2933d759f54988e592f9646cf3fac08b24780" + sha256 cellar: :any, arm64_ventura: "8e069118ed51f891cab2278d3c9e43d4a0b4a64a166bf5936b71c82d426a9b00" + sha256 cellar: :any, sonoma: "21328c3ce137192785b4c98e5fdc8d4e1ec5ec3055012dc1a8c0b3ba47c76f00" + sha256 cellar: :any, ventura: "c0ae5159e74053c98a47f273cf6765351e75c6218f08ad93ef3f491f6ac46a73" + sha256 cellar: :any_skip_relocation, arm64_linux: "8c927b338e13e1ed044b7832773076fb068dc602f535f87f47cb6343852262d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db399e91ac8ece593925568d7c87be22096e2a2ce0a7b1dcc8fef67aea4166d4" + end + + depends_on "cmake" => :build + + # Fix to cmake 4 compatibility + # PR ref: https://github.com/PJK/libcbor/pull/355 + patch do + url "https://github.com/PJK/libcbor/commit/1183292d4695300785b272532c1e02d68840e4b8.patch?full_index=1" + sha256 "54c1984fa401a4bf85e9d9cfd1500bfd1f3106cf39e1f72cfdf762dd30643098" + end + + def install + args = %w[ + -DWITH_EXAMPLES=OFF + -DBUILD_SHARED_LIBS=ON + ] + + system "cmake", "-S", ".", "-B", "builddir", *args, *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + end + + test do + (testpath/"example.c").write <<~C + #include "cbor.h" + #include + + int main() { + printf("Hello from libcbor %s\\n", CBOR_VERSION); + printf("Pretty-printer support: %s\\n", CBOR_PRETTY_PRINTER ? "yes" : "no"); + printf("Buffer growth factor: %f\\n", (float) CBOR_BUFFER_GROWTH); + } + C + + system ENV.cc, "-std=c99", "example.c", "-o", "test", "-L#{lib}", "-lcbor" + system "./test" + end +end diff --git a/Formula/lib/libccd.rb b/Formula/lib/libccd.rb new file mode 100644 index 0000000000000..1d2a620ac7cc5 --- /dev/null +++ b/Formula/lib/libccd.rb @@ -0,0 +1,51 @@ +class Libccd < Formula + desc "Collision detection between two convex shapes" + homepage "https://github.com/danfis/libccd" + url "https://github.com/danfis/libccd/archive/refs/tags/v2.1.tar.gz" + sha256 "542b6c47f522d581fbf39e51df32c7d1256ac0c626e7c2b41f1040d4b9d50d1e" + license "BSD-3-Clause" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "69d7221dceabfe62cded58442a541ed7b4e40dc91195ddc1032d9219d6d4eb80" + sha256 cellar: :any, arm64_sonoma: "0a6c12b8b5b369018a4186622359a2b9bc8ce40a4c0fe2452263e2d4ef03d92a" + sha256 cellar: :any, arm64_ventura: "9db2e87ee4c5b69faa9269a54f22046b5c4d18a72a65bc0dd4164c35a23edbe1" + sha256 cellar: :any, arm64_monterey: "95bbd2e402b8388a6b348fd755b6997ae765568357115013996efe9e596f982f" + sha256 cellar: :any, arm64_big_sur: "69d8c269bc6c5f60d141eaebe6bdff9cf333f789c4d3b72cd69b1e61edff3ea3" + sha256 cellar: :any, sonoma: "5123a16281a3d428e8ad649027bc6749139b484c1dc6257a9a8e2883a29ee859" + sha256 cellar: :any, ventura: "6c11cd8ecc1c3434badf237f5b2169731ce62698f07e3dea3fe2420c57186deb" + sha256 cellar: :any, monterey: "b07fdb5107c0a1e3b912f441d338729ff2d58a50b65f3d6f5d013e26fa1c9dc2" + sha256 cellar: :any, big_sur: "8257a7f8ab8f5eca8fced2e881b96a68202c08ce94a4aa169d1d80149b61eb0f" + sha256 cellar: :any, catalina: "caa0aba8d2ba740998b54c73d3ab038747ac984e4d27797b9f768195a487dc4e" + sha256 cellar: :any, mojave: "47c19c5f277ecc9016ef1e62a3ce1a0c4aafd1c91e6893fb4f251183ebd505ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "01cc57b08faa7b8a20a6d84a3cbe0908b7c5490d2223eea64b0f57df8fc8aa8d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6bee053612267522f0eb8c55c24a68dddb787126f46771fc8459d4d3460aa077" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DENABLE_DOUBLE_PRECISION=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() { + #ifndef CCD_DOUBLE + assert(false); + #endif + ccdVec3PointSegmentDist2( + ccd_vec3_origin, ccd_vec3_origin, + ccd_vec3_origin, NULL); + return 0; + } + C + system ENV.cc, "-o", "test", "test.c", "-L#{lib}", "-lccd" + system "./test" + end +end diff --git a/Formula/lib/libcddb.rb b/Formula/lib/libcddb.rb new file mode 100644 index 0000000000000..cf11606024221 --- /dev/null +++ b/Formula/lib/libcddb.rb @@ -0,0 +1,49 @@ +class Libcddb < Formula + desc "CDDB server access library" + homepage "https://libcddb.sourceforge.net/" + url "https://downloads.sourceforge.net/project/libcddb/libcddb/1.3.2/libcddb-1.3.2.tar.bz2" + sha256 "35ce0ee1741ea38def304ddfe84a958901413aa829698357f0bee5bb8f0a223b" + license "LGPL-2.0-or-later" + revision 4 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "eef9f2fe8b5a7994d21a6b2f53103e6a85b116c94c5f7bf69aa1f990a14c30d5" + sha256 cellar: :any, arm64_sonoma: "a12e153d3e00e99bbd7ccde361edd5ae2a1bf7aba9fa24c86478181d246385a8" + sha256 cellar: :any, arm64_ventura: "6955c8dbcc4de9ca756070ac11c0ea5da3d873f974d53b477bda94a09835f388" + sha256 cellar: :any, arm64_monterey: "f12def876ae4aef3aed938fea3342da5eefd80ee164c05926b4bac8b7ea9d93a" + sha256 cellar: :any, arm64_big_sur: "5c01ee6149ed61a23ad7d8a2c09250fedf3b605638552fe82057cf77b0ac61f1" + sha256 cellar: :any, sonoma: "ffd7868a8476a26e39995963a2732f1b9737052a0b6e3c4bb18bfee923617742" + sha256 cellar: :any, ventura: "6756f179196e583816d73f558fe1dcf52a98406895d4f8402b51e993f49d3bd9" + sha256 cellar: :any, monterey: "134c99dc37719b7fbb915c17afcc5e9f08256ba2ecd295f3f0375d69f764dd8e" + sha256 cellar: :any, big_sur: "e19fbf67a440482346f40076ceae29a8b72590ef1376e6c5454d9f7814984e3b" + sha256 cellar: :any, catalina: "ca3cb9caeed526ef59a167293871d7b739c2ee6271571225dd1640f4af101140" + sha256 cellar: :any, mojave: "534e9e7afc756a552c414b224d86ffa84c9966bbccf3a7d781a6b55a482e9bdf" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f420c361caf0d48657e9f488aab6fcb7abc5929b7c24e05494952b2c24bcb44" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a96b2ab16f2b983fa13921bc81d7b368a594620efd857d84ee8fb1667a18799d" + end + + depends_on "pkgconf" => :build + depends_on "libcdio" + + 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.c").write <<~C + #include + int main(void) { + cddb_track_t *track = cddb_track_new(); + cddb_track_destroy(track); + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lcddb", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libcdio-paranoia.rb b/Formula/lib/libcdio-paranoia.rb new file mode 100644 index 0000000000000..2fe6e0936829d --- /dev/null +++ b/Formula/lib/libcdio-paranoia.rb @@ -0,0 +1,33 @@ +class LibcdioParanoia < Formula + desc "CD paranoia on top of libcdio" + homepage "https://github.com/libcdio/libcdio-paranoia" + url "https://github.com/libcdio/libcdio-paranoia/releases/download/release-10.2%2B2.0.2/libcdio-paranoia-10.2+2.0.2.tar.gz" + # Plus sign is not a valid version character + version "10.2-2.0.2" + sha256 "99488b8b678f497cb2e2f4a1a9ab4a6329c7e2537a366d5e4fef47df52907ff6" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fb138d8a79b5fa0eecf89a7ca0bcd3b294120aeb05200767558b61d3e4e51533" + sha256 cellar: :any, arm64_sonoma: "d91bce7e9b1ecda7021bea7ede886f35e7414f691f06e7f5ca76ffce1d8693f3" + sha256 cellar: :any, arm64_ventura: "0d2130ca34ade60885f0838c9032563a1cac1267b9c88c99c6e87c1922f8b513" + sha256 cellar: :any, sonoma: "8b89fb7bf1812fb9bd7910ab0a323996aade2c07bc46a8a163843fff6c531776" + sha256 cellar: :any, ventura: "7b9d73af248b22fab2504e019d3c62daf93e8c6beb91ed9f463905f1e066b514" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a1ec8c229b09241872472ddddea228bd4a8aff3ea7406a8148a12ca78c7b333" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d1e9aab49489534af51d75d1b222be76479ab2d15cfebc930ca570be8dd0d95" + end + + depends_on "pkgconf" => :build + depends_on "libcdio" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match(/^cdparanoia /, shell_output("#{bin}/cd-paranoia -V 2>&1")) + # Ensure it errors properly with no disc drive. + assert_match(/Unable find or access a CD-ROM drive/, shell_output("#{bin}/cd-paranoia -BX 2>&1", 1)) + end +end diff --git a/Formula/lib/libcdio.rb b/Formula/lib/libcdio.rb new file mode 100644 index 0000000000000..951e30eae02d2 --- /dev/null +++ b/Formula/lib/libcdio.rb @@ -0,0 +1,28 @@ +class Libcdio < Formula + desc "Compact Disc Input and Control Library" + homepage "https://savannah.gnu.org/projects/libcdio/" + url "https://github.com/libcdio/libcdio/releases/download/2.2.0/libcdio-2.2.0.tar.gz" + sha256 "1b6c58137f71721ddb78773432d26252ee6500d92d227d4c4892631c30ea7abb" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "04bc4ddb58d98fa51c6fa0a8eed1b943b7d503432232c87ff3543d9f4377950a" + sha256 cellar: :any, arm64_sonoma: "df4a0ca43f3cb7081a13dd27af54539628259a55b00903d33c57e025d9674ee7" + sha256 cellar: :any, arm64_ventura: "ee59e92928e52ec430a22e42664cb30312c77b89a5f9142a984841c129b03b6d" + sha256 cellar: :any, sonoma: "40dfe0a999ecbb9daf288bd22512152d4bd51de75c6970ced86bffa556e5cd3a" + sha256 cellar: :any, ventura: "082c88816cd181eb9b11f93a8efc07b699fa2bc07ee6891c98d2ec2250dc4392" + sha256 cellar: :any_skip_relocation, arm64_linux: "8db10577fa1ee081c45c704784b84e16671813ac8030890989b6673808337efc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9526b1ceafc1de7a14e44eef691aa7c863b68d6df90f33cdfd5d5763022c4aa7" + end + + depends_on "pkgconf" => :build + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/cd-info -v", 1) + end +end diff --git a/Formula/lib/libcdr.rb b/Formula/lib/libcdr.rb new file mode 100644 index 0000000000000..f9e01f5f60b45 --- /dev/null +++ b/Formula/lib/libcdr.rb @@ -0,0 +1,61 @@ +class Libcdr < Formula + desc "C++ library to parse the file format of CorelDRAW documents" + homepage "https://wiki.documentfoundation.org/DLP/Libraries/libcdr" + url "https://dev-www.libreoffice.org/src/libcdr/libcdr-0.1.8.tar.xz" + sha256 "ced677c8300b29c91d3004bb1dddf0b99761bf5544991c26c2ee8f427e87193c" + license "MPL-2.0" + revision 1 + + livecheck do + url "https://dev-www.libreoffice.org/src/" + regex(/href=["']?libcdr[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c92d2906e9c17ed5a9e0a12541a9f57f9af90a159a8c415ac93f0849f1cf502b" + sha256 cellar: :any, arm64_sonoma: "78d0a8ac7a817bdf7fccecae5b1914bc2c54e6e42049277e3118b5ecb7a8a8a6" + sha256 cellar: :any, arm64_ventura: "47f696438e82d0a76e5a9e571dc9805fffd5699e99cee039593cbea2797631da" + sha256 cellar: :any, sonoma: "d44ec2dbff4e7e9f375100722196a1d2598f494544da3324574fb807ff267cc8" + sha256 cellar: :any, ventura: "baebcf4d51a1ec8b9eb06eb5f08ed637604b54c62bfdf0a85d158e97656c824a" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf43c9de53346d4c5916d81221c17d46af2a5b56688f279b560090c0d71ecf39" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e3b5db26db8975d499f3838c57e8e62320f90cf4040297eebcf7799948afea7" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + depends_on "librevenge" + depends_on "little-cms2" + + uses_from_macos "zlib" + + def install + # icu4c 75+ needs C++17 and icu4c 76+ needs icu-uc + # TODO: Remove after https://gerrit.libreoffice.org/c/libcdr/+/175709/1 + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + ENV["ICU_LIBS"] = "-L#{icu4c.opt_lib} -licui18n -licuuc" + ENV.append "CXXFLAGS", "-std=gnu++17" + + system "./configure", "--disable-silent-rules", + "--disable-tests", + "--disable-werror", + "--without-docs", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + libcdr::CDRDocument::isSupported(0); + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", + "-I#{Formula["librevenge"].include}/librevenge-0.0", + "-I#{include}/libcdr-0.1", + "-L#{lib}", "-lcdr-0.1" + system "./test" + end +end diff --git a/Formula/lib/libcds.rb b/Formula/lib/libcds.rb new file mode 100644 index 0000000000000..9d6d7384f0e9f --- /dev/null +++ b/Formula/lib/libcds.rb @@ -0,0 +1,52 @@ +class Libcds < Formula + desc "C++ library of Concurrent Data Structures" + homepage "https://libcds.sourceforge.net/doc/cds-api/index.html" + url "https://github.com/khizmax/libcds/archive/refs/tags/v2.3.3.tar.gz" + sha256 "f090380ecd6b63a3c2b2f0bdb27260de2ccb22486ef7f47cc1175b70c6e4e388" + license "BSL-1.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "03307db4af7a248e4eed5333726ee17188845f0a28403a8a716816155835d411" + sha256 cellar: :any, arm64_sonoma: "b5c6a40402166f60d1d31f28a902a6bdc80c5a878cd5fca5f7f3bca2a02edb99" + sha256 cellar: :any, arm64_ventura: "3bfa1c273ba782515935e77ada3723426fc290f26b6bf046e9a03410895c6328" + sha256 cellar: :any, arm64_monterey: "e7edddfac2c3ecf31d6a7acfd6d261019c47bf67a603dcbcdd8cbea524c632fc" + sha256 cellar: :any, arm64_big_sur: "52e6bee0d1b0f1dfea3ae69573b6a3a92c0ff42ddb41634c464fc35672e94bf4" + sha256 cellar: :any, sonoma: "6357fbeba885fc7a4dd9a00ddf4e9513003776ee14501aaf30d1df3ce8ae2731" + sha256 cellar: :any, ventura: "dfabb0ee38a1df24e86ae49ae157e0995ba40379a462bffc2b1b09302301eb6a" + sha256 cellar: :any, monterey: "c5308e1c184a4a60063671305eadb56462fd60af510e437491640d9faee0f95d" + sha256 cellar: :any, big_sur: "029e18020211d4f155d07a9716303309c1b3f8d685cbd167d87f476dfe8f77a1" + sha256 cellar: :any, catalina: "9962a58f2df627f74d0c248397cc8bb8a501f0380d99bfc3a84365070ab902fc" + sha256 cellar: :any, mojave: "1667d75383b82cd2365808502c9468ca1e47aad4d6c5943b02e1aa258cad3fe4" + sha256 cellar: :any_skip_relocation, arm64_linux: "d241b0700d0649100b84c884571e4a5880fc5a04698a86a428cc0d057f6c3554" + sha256 cellar: :any_skip_relocation, x86_64_linux: "403e15797cf8fd6c2caea7427e964fe4e3392eb1685d7ff9203a0d72cde26aac" + end + + depends_on "cmake" => :build + depends_on "boost" + + def install + # Change the install library directory for x86_64 arch to `lib` + inreplace "CMakeLists.txt", "set(LIB_SUFFIX \"64\")", "" + + 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() { + cds::Initialize(); + cds::threading::Manager::attachThread(); + cds::Terminate(); + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-L#{lib}", "-lcds", "-lpthread" + system "./test" + end +end diff --git a/Formula/lib/libcec.rb b/Formula/lib/libcec.rb new file mode 100644 index 0000000000000..c1a031d9dd057 --- /dev/null +++ b/Formula/lib/libcec.rb @@ -0,0 +1,53 @@ +class Libcec < Formula + desc "Control devices with TV remote control and HDMI cabling" + homepage "https://libcec.pulse-eight.com/" + url "https://github.com/Pulse-Eight/libcec/archive/refs/tags/libcec-7.0.0.tar.gz" + sha256 "7f9e57ae9fad37649adb6749b8f1310a71ccf3e92ae8b2d1cc9e8ae2d1da83f8" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6c3e6496b7aa4fc0b2ccb840c23b2881ce4f0d1a4419854c1e21e6e316a98b7f" + sha256 cellar: :any, arm64_sonoma: "de4f26ed875eb592e3fc420963d62ffe939f38745951eacdb431517d3c297eed" + sha256 cellar: :any, arm64_ventura: "a3f634f61d5a27f31057a3e5deec39973d7bbdda09a8cefeeb903bf155411587" + sha256 cellar: :any, sonoma: "559cbd188d933dad82b923434da5cbdcbc8f59972f157d04b518e968a05a62dc" + sha256 cellar: :any, ventura: "a942eaf1c28a2ac335203421541da6347dc4f5bd5da1ce5015241d79dc845d73" + sha256 cellar: :any_skip_relocation, arm64_linux: "8dc79b71ae7d6917a919038ee0aa6a75adf4f97a6ea49dd389ee54efc53d5e9d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "916e33306e1006b5a8c5337c8ed5341c445598bb5eb90de65137ff1bbc0a1225" + end + + depends_on "cmake" => :build + + uses_from_macos "ncurses" + + resource "p8-platform" do + url "https://github.com/Pulse-Eight/platform/archive/refs/tags/p8-platform-2.1.0.1.tar.gz" + sha256 "064f8d2c358895c7e0bea9ae956f8d46f3f057772cb97f2743a11d478a0f68a0" + end + + def install + ENV.cxx11 + + # The CMake scripts don't work well with some common LIBDIR values: + # - `CMAKE_INSTALL_LIBDIR=lib` is interpreted as path relative to build dir + # - `CMAKE_INSTALL_LIBDIR=#{lib}` breaks pkg-config and cmake config files + # - Setting no value uses UseMultiArch.cmake to set platform-specific paths + # To avoid these issues, we can specify the type of input as STRING + cmake_args = std_cmake_args.map do |s| + s.gsub "-DCMAKE_INSTALL_LIBDIR=", "-DCMAKE_INSTALL_LIBDIR:STRING=" + end + + resource("p8-platform").stage do + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "libCEC version: #{version}", shell_output("#{bin}/cec-client --info") + end +end diff --git a/Formula/lib/libcello.rb b/Formula/lib/libcello.rb new file mode 100644 index 0000000000000..172d095523e6d --- /dev/null +++ b/Formula/lib/libcello.rb @@ -0,0 +1,55 @@ +class Libcello < Formula + desc "Higher-level programming in C" + homepage "https://libcello.org/" + url "https://libcello.org/static/libCello-2.1.0.tar.gz" + sha256 "49acf6525ac6808c49f2125ecdc101626801cffe87da16736afb80684b172b28" + license "BSD-2-Clause" + head "https://github.com/orangeduck/libCello.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?libCello[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0e380cf6073b22792954d22559177ff5ff3cbaf11fbe00948c27b675338ff116" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1a2bbf7d05757a81aabb00b595b864d6a531004d0d0d02f70ef6763fe2621ab9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "38071f3aa78102240020ea1e40db1c431f87fbf8d6d07308cb3952bd46577b41" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a700988ca7ac195700131c8ff6f2c1b555d0446351c01cc2e2a6f22a65b70c2a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "788079e8b941d6af2ee4c7f1fb84e1ed04072e85fb76a915203e04b0d0bfaaa6" + sha256 cellar: :any_skip_relocation, sonoma: "a7df5b2e7c6043f55d4645de61b2948a57607f2269e78769fd9a616d1b5fc00c" + sha256 cellar: :any_skip_relocation, ventura: "2a9787e8b4a681876780ed84d5f5966c13ebcf754d14b6bd3a4ee4310cd3520b" + sha256 cellar: :any_skip_relocation, monterey: "96b8179944a4750d50e977d1b721569287476fa08fa8af3d832934c12c77761f" + sha256 cellar: :any_skip_relocation, big_sur: "171593b100ed2671982457816482a474c3be1223bad986a68df71803f3f6b435" + sha256 cellar: :any_skip_relocation, catalina: "a6ad4a498c30ce4713cf0a76800cabe412f1471a4262459ce38a477f163354e9" + sha256 cellar: :any_skip_relocation, mojave: "53ef17fbae26388e22354b9c5d536dfc0f0e0b604281878fbccbad7e6db5c30e" + sha256 cellar: :any_skip_relocation, high_sierra: "1c7719b74c5507dfd84ec93c043c11a4113e13a66f06e9d6f32349ec83042ad2" + sha256 cellar: :any_skip_relocation, sierra: "561319859455b756f53013090f91d6b06b1093c00d59593519ec09210f6bf830" + sha256 cellar: :any_skip_relocation, el_capitan: "05384667bb4d98a603406b3bc35962651af06d44eb55f2080c80f8dd979a9d80" + sha256 cellar: :any_skip_relocation, arm64_linux: "563e0e5d5ee43073bccca6c732787f32af5a864fc9bcbf3854049cfc0f99ff37" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d935c25174d4315105cccb0a72dd60f184881d7929f9ca51aaaea2dd7262f28b" + end + + def install + system "make", "check" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.c").write <<~C + #include "Cello.h" + + int main(int argc, char** argv) { + var i0 = $(Int, 5); + var i1 = $(Int, 3); + var items = new(Array, Int, i0, i1); + foreach (item in items) { + print("Object %$ is of type %$\\n", item, type_of(item)); + } + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lCello", "-lpthread", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libcerf.rb b/Formula/lib/libcerf.rb new file mode 100644 index 0000000000000..430ff8763e73e --- /dev/null +++ b/Formula/lib/libcerf.rb @@ -0,0 +1,53 @@ +class Libcerf < Formula + desc "Numeric library for complex error functions" + homepage "https://jugit.fz-juelich.de/mlz/libcerf" + url "https://jugit.fz-juelich.de/mlz/libcerf/-/archive/v3.0/libcerf-v3.0.tar.gz" + sha256 "c6108fbda89af37f588119c0c542b6c1e824845a36bea2fa31f7ed2cc1a246db" + license "MIT" + version_scheme 1 + head "https://jugit.fz-juelich.de/mlz/libcerf.git", branch: "master" + + livecheck do + url "https://jugit.fz-juelich.de/api/v4/projects/269/releases" + regex(/libcerf[._-]v?((?!2\.0)\d+(?:\.\d+)+)/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "093e9b7e5a294c1064d174f62b4a17e09bfb57f0fe2dd97b8b6091cf9e6d4ff6" + sha256 cellar: :any, arm64_sonoma: "8abb6bed129a07ae4601cd1bd84f1c4c062ad8eca2bdb15ea3fa33c1dd8e8f39" + sha256 cellar: :any, arm64_ventura: "05f13dcf138876b29e6a9ac49b356ee1afdaae3671a19973cdc6688b73f1cc07" + sha256 cellar: :any, sonoma: "d1f71ef6427fe87f8c1fca1ac83ff534a4b01086ae8835d8b14c2ea72710c97f" + sha256 cellar: :any, ventura: "52409e3c2993db96a2edcb1a9229530fb9b5d1f3375c1dfafe18476ccb087e5b" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b2e39bf56ebf87f61fdb69caf20157ee0c20f1f55d0c57cd5676de672969ae5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b1181cfb82445d2b1fb89fbc80a2337d598ce59d8f71e9159344851eb05288e9" + 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 + #include + #include + #include + #include + + int main (void) { + double _Complex a = 1.0 - 0.4I; + a = cerf(a); + if (fabs(creal(a)-0.910867) > 1.e-6) abort(); + if (fabs(cimag(a)+0.156454) > 1.e-6) abort(); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcerf", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libchaos.rb b/Formula/lib/libchaos.rb new file mode 100644 index 0000000000000..0dcdf49896e0d --- /dev/null +++ b/Formula/lib/libchaos.rb @@ -0,0 +1,93 @@ +class Libchaos < Formula + desc "Advanced library for randomization, hashing and statistical analysis" + homepage "https://github.com/maciejczyzewski/libchaos" + url "https://github.com/maciejczyzewski/libchaos/releases/download/v1.0/libchaos-1.0.tar.gz" + sha256 "29940ff014359c965d62f15bc34e5c182a6d8a505dc496c636207675843abd15" + license "BSD-2-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "a06f03544d61ba6c17a360992f7397fcb0ed1eafb1027bb561cbe9e71c0bf2ad" + sha256 cellar: :any, arm64_sonoma: "e6b159ec85602b056a5cae0bda11203c4296f72fa6850e54e94067cf3360263d" + sha256 cellar: :any, arm64_ventura: "0e01bcaadb5cb22391c9671eed7f0a8a4852717f4ce45962f5bf088bcc025ca9" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5cbe23d7c195b8cb1e7336596112bb1f84b3579cca069b5bc9b61e41c640e32f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e1b5eff28e28622055d915653c66c2448cba0cb207a8b8f243525c2deb1dd246" + sha256 cellar: :any, sonoma: "f3d5c1a274d22e7d33b85e239bcbbd91e9032a6e4a3dc733b4de47aae84326f2" + sha256 cellar: :any, ventura: "7941f781d63a2ee566c5c0ba5f171f9f5026d4da819fc111ad3915d631bcd7df" + sha256 cellar: :any_skip_relocation, monterey: "018d34f680d426fab143744ab7413cfdb8db204ac5bc0a77de9767a2802bbf5c" + sha256 cellar: :any_skip_relocation, big_sur: "2b51e7e88ad2f47cdb860d3edbf65a9db6a1a0feeefbb46dae978f3b4311f20f" + sha256 cellar: :any_skip_relocation, catalina: "8cd295f6ccf1c6a09ab87bef06331424da21b0b44da8f4440a11f4fccaf1370a" + sha256 cellar: :any_skip_relocation, mojave: "3add0509ec493248105ad81354c4ffccef85f37c0cc445db24f115b0b8fb3576" + sha256 cellar: :any_skip_relocation, high_sierra: "8d1f167a096fae20de66286d9f33a7b93e03fcfccaecd5b15611e3fcd7c4b09c" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d694020ddee200b924b4c7e82acb8993096e7afd2749c590fecf642302fd6cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a1add1c600d4abf7d5cb5e4268810c4f3f8f29a6a4a5ea267c95202230881b8f" + end + + depends_on "cmake" => :build + + # Support for Xcode 15+ (LLVM 16+) + patch :DATA + + def install + args = %w[ + -DLIBCHAOS_ENABLE_TESTING=OFF + -DSKIP_CCACHE=ON + ] + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=OFF", *args, *std_cmake_args + system "cmake", "--build", "build" + lib.install "build/libchaos.a" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include + #include + + int main(void) { + std::cout << CHAOS_META_NAME(CHAOS_MACHINE_XORRING64) << std::endl; + std::string hash = chaos::password( + "some secret password", "my private salt"); + std::cout << hash << std::endl; + if (hash.size() != 40) + return 1; + return 0; + } + CPP + + system ENV.cxx, "test.cc", "-std=c++11", "-L#{lib}", "-lchaos", "-o", "test" + system "./test" + end +end + +__END__ +diff --git a/include/chaos/analysis.hh b/include/chaos/analysis.hh +index 2b24d01..57423d1 100755 +--- a/include/chaos/analysis.hh ++++ b/include/chaos/analysis.hh +@@ -37,15 +37,17 @@ class basic_adapter { + AP adapter; + + public: ++ using result_type = uint32_t; ++ + void connect(AP func) { adapter = func; } + constexpr static size_t max(void) { +- return std::numeric_limits::max(); ++ return std::numeric_limits::max(); + } + constexpr static size_t min(void) { +- return std::numeric_limits::lowest(); ++ return std::numeric_limits::lowest(); + } +- uint32_t operator()(void) noexcept { +- return (uint32_t)(adapter() * (double)UINT32_MAX); ++ result_type operator()(void) noexcept { ++ return (result_type)(adapter() * (double)max()); + } + }; diff --git a/Formula/lib/libchewing.rb b/Formula/lib/libchewing.rb new file mode 100644 index 0000000000000..4c11bf20cc85b --- /dev/null +++ b/Formula/lib/libchewing.rb @@ -0,0 +1,57 @@ +class Libchewing < Formula + desc "Intelligent phonetic input method library" + homepage "https://chewing.im/" + url "https://github.com/chewing/libchewing/releases/download/v0.9.1/libchewing-0.9.1.tar.zst" + sha256 "e98b76c306552148b7d85f0e596860751d9eef4bc8f2dfc053177b14f421c31f" + license "LGPL-2.1-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "32135dee630c01d5a8d9a4e9bbaaa2d162d1487b422a71b7c9df375c95d54f5f" + sha256 cellar: :any, arm64_sonoma: "dda2fc0363058909c7de62a6cfdd59db89f30c6b6a6bf291da227d8beb045b7d" + sha256 cellar: :any, arm64_ventura: "2698f929ef06c474f8f08f5729a6a923c89aef36b572163f353360158188f51d" + sha256 cellar: :any, sonoma: "a8bb15dfebb22f402c3bd8182b90324c273f363474c9d7ebc170e1c672e800a8" + sha256 cellar: :any, ventura: "99d2a65e3971de39db1e15f8c63c8b2b944cc25f762c903a6f161fae2d15c33f" + sha256 cellar: :any_skip_relocation, arm64_linux: "608ffd3001265904a295d4b66d02764cbf5b63be4b8fb3e5eaa477f3ae8bfa87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d104abaa34a16aeb177b1c644b01bf8480b372405c3ca4d02ff90b9aad661196" + end + + depends_on "cmake" => :build + depends_on "corrosion" => :build + depends_on "rust" => :build + + uses_from_macos "sqlite" + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + 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 + #include + int main() + { + ChewingContext *ctx = chewing_new(); + chewing_handle_Default(ctx, 'x'); + chewing_handle_Default(ctx, 'm'); + chewing_handle_Default(ctx, '4'); + chewing_handle_Default(ctx, 't'); + chewing_handle_Default(ctx, '8'); + chewing_handle_Default(ctx, '6'); + chewing_handle_Enter(ctx); + char *buf = chewing_commit_String(ctx); + free(buf); + chewing_delete(ctx); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-L#{lib}", "-lchewing", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libclc.rb b/Formula/lib/libclc.rb new file mode 100644 index 0000000000000..265aeb1b1c37a --- /dev/null +++ b/Formula/lib/libclc.rb @@ -0,0 +1,56 @@ +class Libclc < Formula + desc "Implementation of the library requirements of the OpenCL C programming language" + homepage "https://libclc.llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.5/libclc-20.1.5.src.tar.xz" + sha256 "7aabcc31eff12bc54778c38752192939df8d983002c961cb1ac97f57e50ccff1" + license "Apache-2.0" => { with: "LLVM-exception" } + + livecheck do + url :stable + regex(/^llvmorg[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5bfc4156222dfcef2378951f8d8e7825b040c4bd7bc6aee3b2c5e0351dce0408" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5bfc4156222dfcef2378951f8d8e7825b040c4bd7bc6aee3b2c5e0351dce0408" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5bfc4156222dfcef2378951f8d8e7825b040c4bd7bc6aee3b2c5e0351dce0408" + sha256 cellar: :any_skip_relocation, sonoma: "5bfc4156222dfcef2378951f8d8e7825b040c4bd7bc6aee3b2c5e0351dce0408" + sha256 cellar: :any_skip_relocation, ventura: "5bfc4156222dfcef2378951f8d8e7825b040c4bd7bc6aee3b2c5e0351dce0408" + sha256 cellar: :any_skip_relocation, arm64_linux: "5bfc4156222dfcef2378951f8d8e7825b040c4bd7bc6aee3b2c5e0351dce0408" + sha256 cellar: :any_skip_relocation, x86_64_linux: "91c6dbbb914a3f24ca32b20f59cbeaa8ab7ca800fe240ab4ecdf6af48d81d54f" + end + + depends_on "cmake" => :build + depends_on "llvm" => [:build, :test] + depends_on "spirv-llvm-translator" => :build + + def install + llvm_spirv = Formula["spirv-llvm-translator"].opt_bin/"llvm-spirv" + system "cmake", "-S", ".", "-B", "build", + "-DLLVM_SPIRV=#{llvm_spirv}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + inreplace share/"pkgconfig/libclc.pc", prefix, opt_prefix + end + + test do + clang_args = %W[ + -target nvptx--nvidiacl + -c -emit-llvm + -Xclang -mlink-bitcode-file + -Xclang #{share}/clc/nvptx--nvidiacl.bc + ] + llvm_bin = Formula["llvm"].opt_bin + + (testpath/"add_sat.cl").write <<~EOS + __kernel void foo(__global char *a, __global char *b, __global char *c) { + *a = add_sat(*b, *c); + } + EOS + + system llvm_bin/"clang", *clang_args, "./add_sat.cl" + assert_match "@llvm.sadd.sat.i8", shell_output("#{llvm_bin}/llvm-dis ./add_sat.bc -o -") + end +end diff --git a/Formula/lib/libcmph.rb b/Formula/lib/libcmph.rb new file mode 100644 index 0000000000000..5df3061631c74 --- /dev/null +++ b/Formula/lib/libcmph.rb @@ -0,0 +1,80 @@ +class Libcmph < Formula + desc "C minimal perfect hashing library" + homepage "https://cmph.sourceforge.net/" + url "https://downloads.sourceforge.net/project/cmph/v2.0.2/cmph-2.0.2.tar.gz" + sha256 "365f1e8056400d460f1ee7bfafdbf37d5ee6c78e8f4723bf4b3c081c89733f1e" + license any_of: ["LGPL-2.1-only", "MPL-1.1"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "43f6a25f51d2e29fc992882901b8fae82353d80efe71305bc6acf5bd852ff6c7" + sha256 cellar: :any, arm64_sonoma: "72be852d28eec60c8526c263938023f4eb33dfd58edbbcd77b33d1e319816f82" + sha256 cellar: :any, arm64_ventura: "dc5c4b140ee2e3ed459271e26f0fc47b9294626fbcad98a86d6326593a2ca764" + sha256 cellar: :any, arm64_monterey: "85743179d6c3127e57f41d11b451f708a653b3b033e1b725b30fa0c1c6712b9e" + sha256 cellar: :any, arm64_big_sur: "30d22ddad3521ec07248910864e8caae7f8d959597663a9d21d2447c56e6639c" + sha256 cellar: :any, sonoma: "05fc67c97082d41ca49ab0819e8c385fff73d953877ab6cd0d6b8fcd0a8c6467" + sha256 cellar: :any, ventura: "c839119e4df7eb3ac96d33dd388c25000bece07e3b74ce9caa4ff3867ec54b07" + sha256 cellar: :any, monterey: "248ea1c47707f4baf30f540f50803e1f3678ebaf5c80215ed4871f96cf77b314" + sha256 cellar: :any, big_sur: "f1cc2211ac56a2702405246535a55613855c3879885ca73aa65d76890c2aa0e5" + sha256 cellar: :any, catalina: "c38019c153c728a28acbfe340cc86764285ec24edbdba5234b0593f83d355c22" + sha256 cellar: :any, mojave: "d02c761bd6b52424528bfdcd56b8d469d7cdd2e55f625c719229edb7f011889c" + sha256 cellar: :any, high_sierra: "abffeaf075db6387e636d43eb8fda9b76f02091bdb5533368306f899a46406c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "09b7ae4a3fe814126fff575f57ba2cfac5599eb86cded4d810ae777d2e4c229e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6b4a556fa47365d3ebf9312acddf3fc64921094161bd6d6e1bcda3df92be70cd" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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.c").write <<~C + #include + #include + #include + int main(int argc, char **argv) + { + unsigned int i = 0; + const char *vector[] = {"aaaaaaaaaa", "bbbbbbbbbb", "cccccccccc", "dddddddddd", "eeeeeeeeee", + "ffffffffff", "gggggggggg", "hhhhhhhhhh", "iiiiiiiiii", "jjjjjjjjjj"}; + unsigned int nkeys = 10; + FILE* mphf_fd = fopen("temp.mph", "w"); + cmph_io_adapter_t *source = cmph_io_vector_adapter((char **)vector, nkeys); + cmph_config_t *config = cmph_config_new(source); + cmph_config_set_algo(config, CMPH_BRZ); + cmph_config_set_mphf_fd(config, mphf_fd); + cmph_t *hash = cmph_new(config); + cmph_config_destroy(config); + cmph_dump(hash, mphf_fd); + cmph_destroy(hash); + fclose(mphf_fd); + mphf_fd = fopen("temp.mph", "r"); + hash = cmph_load(mphf_fd); + while (i < nkeys) { + const char *key = vector[i]; + unsigned int id = cmph_search(hash, key, (cmph_uint32)strlen(key)); + fprintf(stdout, "%s %u\\n", key, id); + i++; + } + cmph_destroy(hash); + cmph_io_vector_adapter_destroy(source); + fclose(mphf_fd); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcmph", "-o", "test" + output = shell_output(testpath/"test").lines + assert_equal 10, output.length + letters = output.map { |line| line.split.first } + numbers = output.map { |line| line.split.last.to_i } + ("a".."j").each { |letter| assert_equal 1, letters.count(letter * 10) } + (0..9).each { |i| assert_equal 1, numbers.count(i) } + end +end diff --git a/Formula/lib/libcoap.rb b/Formula/lib/libcoap.rb new file mode 100644 index 0000000000000..b7ee5dff0ca96 --- /dev/null +++ b/Formula/lib/libcoap.rb @@ -0,0 +1,39 @@ +class Libcoap < Formula + desc "Lightweight application-protocol for resource-constrained devices" + homepage "https://github.com/obgm/libcoap" + url "https://github.com/obgm/libcoap/archive/refs/tags/v4.3.5.tar.gz" + sha256 "a417ed26ec6c95c041b42353b5b6fad1602e2bf42a6e26c09863450e227b7b5f" + license "BSD-2-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "a98670de3fe4ec6aa76bce6909dcb2e4508d965d16f8d5087e08d11561dc3f8a" + sha256 cellar: :any, arm64_sonoma: "3e1ccc1ecda3c10ba83e6c427e83cf30166cc8693821914426ef5b35e024d12f" + sha256 cellar: :any, arm64_ventura: "3509f77235a4648fb6242af0573ab2d864f5347b78e941b70d3695f4c8c1970c" + sha256 cellar: :any, sonoma: "7c1e314e9154f828266e6e6077564e0f87450ee55047f7d1f96d99a8c4b7047b" + sha256 cellar: :any, ventura: "cd74e8814cc3d2fe124bc986455a778412efde46f3a4487038c8b634e291882f" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c7fcac4998b5144353646f90861e0261a84882480e2bc98f0805e4fc676bfce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5ede5117a7134ea1750a9ae100837280ff4b971c00e995196b2f669dde62320d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + def install + system "./autogen.sh" + system "./configure", "--disable-manpages", "--disable-doxygen", *std_configure_args + system "make" + system "make", "install" + end + + test do + port = free_port + spawn bin/"coap-server", "-p", port.to_s + sleep 1 + output = shell_output(bin/"coap-client -B 5 -m get coap://localhost:#{port}") + assert_match "This is a test server made with libcoap", output + end +end diff --git a/Formula/lib/libconfig.rb b/Formula/lib/libconfig.rb new file mode 100644 index 0000000000000..ffa7719b12976 --- /dev/null +++ b/Formula/lib/libconfig.rb @@ -0,0 +1,49 @@ +class Libconfig < Formula + desc "Configuration file processing library" + homepage "https://hyperrealm.github.io/libconfig/" + url "https://github.com/hyperrealm/libconfig/archive/refs/tags/v1.8.tar.gz" + sha256 "22e13253e652ec583ba0dd5b474bd9c7bd85dc724f2deb0d76a6299c421358ef" + license "LGPL-2.1-or-later" + head "https://github.com/hyperrealm/libconfig.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f1582c0c9117c9a775cdc0898fe45f8c543bcb5236035228a1150dfc7a9ed7ce" + sha256 cellar: :any, arm64_sonoma: "7b5064bff1eb6a30a0172c2050dc6a29f0a8e15b038bfea0336def3363b08672" + sha256 cellar: :any, arm64_ventura: "4ef4fe93b31d05bd5849c306010fe6b00c0e9836fff6d9004add313db4b56cc9" + sha256 cellar: :any, sonoma: "021fe870c6883aa87b7295dbc0f8ab0a9043809fbeb18079b592d07989d09025" + sha256 cellar: :any, ventura: "80ad14edf165d87fe442a3583ab2d3ca5aef504ff31ea634a4511da198d724b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "5931f3faddd9baa428b034285bf08357765a69e54e8a4e49160f866d88bab368" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e597a3334e1b4e1043d909232489cc1ef255a49522e9bdc1849be4afb968ab3f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + uses_from_macos "flex" => :build + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + config_t cfg; + config_init(&cfg); + config_destroy(&cfg); + return 0; + } + C + system ENV.cc, testpath/"test.c", "-I#{include}", + "-L#{lib}", "-lconfig", "-o", testpath/"test" + system "./test" + end +end diff --git a/Formula/lib/libconfini.rb b/Formula/lib/libconfini.rb new file mode 100644 index 0000000000000..a8d82b6e4be08 --- /dev/null +++ b/Formula/lib/libconfini.rb @@ -0,0 +1,55 @@ +class Libconfini < Formula + desc "Yet another INI parser" + homepage "https://madmurphy.github.io/libconfini/" + url "https://github.com/madmurphy/libconfini/releases/download/1.16.4/libconfini-1.16.4-with-configure.tar.gz" + sha256 "f4ba881e68d0d14f4f11f27c7dd9a9567c549f1bf155f4f8158119fb9bc9efd6" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fbb299d21214fdc73d660ee6cc61ea6a6aff2d85558db6095558be0202c30440" + sha256 cellar: :any, arm64_sonoma: "34cbf810ecbd056e906847dafb23c8a8dba3d6f1af918c1a99e9b278b5c0af84" + sha256 cellar: :any, arm64_ventura: "6bdad3efe351d8dd2c80092ddcbeee38766d1a5cdc28b8ab797279bdb6af411a" + sha256 cellar: :any, arm64_monterey: "1909d5da9729d0787b5178444f5da844a389c143f810edee022bec357f7d29a3" + sha256 cellar: :any, sonoma: "805ea288421a60b74cfe73fac192319c29a405dc634940c0f21e50094db6faeb" + sha256 cellar: :any, ventura: "0a41e42e70833201fc9cf7689489981aa3befb03fcd01fabdf0615636f0987a8" + sha256 cellar: :any, monterey: "4c8e5280349538270ca6ae1ccf257a27bc0232b26573415ffc5841838c161350" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8cebbb4371e80a06465b9bbd9e33973b8f752b529979c99a40911e665cd32dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f5987375e6a2d5de8d24c0dcb1dc175fa778fd52fd0000ca213ba989a6d42fc" + end + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + (testpath/"test.ini").write "[users]\nknown_users = alice, bob, carol\n" + (testpath/"test.c").write <<~C + #include + + static int callback (IniDispatch * disp, void * v_other) { + #define IS_KEY(SECTION, KEY) \ + (ini_array_match(SECTION, disp->append_to, '.', disp->format) && \ + ini_string_match_ii(KEY, disp->data, disp->format)) + if (disp->type == INI_KEY) { + if (IS_KEY("users", "known_users")) { + printf("Known Users: %s\\n", disp->value); + } + } + #undef IS_KEY + return 0; + } + + int main () { + if (load_ini_path("test.ini", INI_DEFAULT_FORMAT, NULL, callback, NULL)) { + fprintf(stderr, "Error while loading test.ini\\n"); + return 1; + } + return 0; + } + C + + system ENV.cc, testpath/"test.c", "-I#{include}", "-L#{lib}", "-lconfini", "-o", "test" + assert_match "Known Users: alice, bob, carol", shell_output(testpath/"test").chomp + end +end diff --git a/Formula/lib/libcotp.rb b/Formula/lib/libcotp.rb new file mode 100644 index 0000000000000..830a83020a6f8 --- /dev/null +++ b/Formula/lib/libcotp.rb @@ -0,0 +1,57 @@ +class Libcotp < Formula + desc "C library that generates TOTP and HOTP" + homepage "https://github.com/paolostivanin/libcotp" + url "https://github.com/paolostivanin/libcotp/archive/refs/tags/v3.1.0.tar.gz" + sha256 "a48bbfd95b7ec12d23e4e2c4a017f8acddecc14bf10541ff144563cee044b39c" + license "Apache-2.0" + head "https://github.com/paolostivanin/libcotp.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a55767669aadfbc33ca5047a9bf5a1371ebaf4ccb3c9e3e14a3296516f0702e9" + sha256 cellar: :any, arm64_sonoma: "3c1f7d889c8212c2a7e8763c9bc712ce98ce0e8cd2520a27e6ed13468bdfa922" + sha256 cellar: :any, arm64_ventura: "626c19565338f9e6ebf991ffdb7c7acb0beea6fb5ce65317ea12a08cdaea63d8" + sha256 cellar: :any, sonoma: "6a56e1465c12f7f4a88da73e4feb96255e03b2739a4a9e2d7fe176c9a9290960" + sha256 cellar: :any, ventura: "540f3a6ecfea711699139ec94e16bf0e194094a0508e7e111777632c637388b9" + sha256 cellar: :any_skip_relocation, arm64_linux: "b7b568b96cf41f1440fb120c229765e4d092f1425a286fe067b907a367a7f9c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc3ff644b09e647890b68df9d726edcc2a8d18e293cc4773d921141147a6ffc4" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libgcrypt" + + 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 + #include + #include + + int main() { + const char *K = "12345678901234567890"; + const int64_t counter[] = {59, 1111111109, 1111111111, 1234567890, 2000000000, 20000000000}; + + cotp_error_t cotp_err; + char *K_base32 = base32_encode((const uchar *)K, strlen(K)+1, &cotp_err); + + cotp_error_t err; + for (int i = 0; i < 6; i++) { + printf("%s\\n", get_totp_at(K_base32, counter[i], 8, 30, SHA1, &err)); + } + + free(K_base32); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcotp", "-o", "test" + + expected_output = %w[94287082 07081804 14050471 89005924 69279037 65353130] + assert_equal expected_output, shell_output("./test").split("\n") + end +end diff --git a/Formula/lib/libcouchbase.rb b/Formula/lib/libcouchbase.rb new file mode 100644 index 0000000000000..73a34a4ae89f5 --- /dev/null +++ b/Formula/lib/libcouchbase.rb @@ -0,0 +1,50 @@ +class Libcouchbase < Formula + desc "C library for Couchbase" + homepage "https://docs.couchbase.com/c-sdk/current/hello-world/start-using-sdk.html" + url "https://packages.couchbase.com/clients/c/libcouchbase-3.3.15.tar.gz" + sha256 "68ea4d39387b1c2af0305be30bf60b88126cb714e84b441c57ba2b3e81ca2626" + license "Apache-2.0" + head "https://github.com/couchbase/libcouchbase.git", branch: "master" + + # github_releases is used here as there have been tags pushed for new + # releases but without a corresponding GitHub release + livecheck do + url :head + regex(/^?(\d+(?:\.\d+)+)$/i) + strategy :github_releases + end + + bottle do + sha256 arm64_sequoia: "b0f45a14e9bb074bab8038ec75d5ea4fe6d4d203e85b54619da3d69e0ef6a313" + sha256 arm64_sonoma: "62879676667a388eb5ef7abe6a8fbb4095841df3441074d0b53c4ac931467c05" + sha256 arm64_ventura: "dea2be789f4fce7680b8a62fb0a60224f3ab06810a4a803e696d3c806ac02490" + sha256 sonoma: "bd03bb25ad1acfd696e23ec686072d75e06ed47ba85b98351ec388fd92963400" + sha256 ventura: "22845abcd8b1c14325329560cb4adb2508dfad518751253a37e4905274ede095" + sha256 arm64_linux: "27e661f832c9a0f7de8a33a96751a5499e85969c913c90796eef54198540ff2e" + sha256 x86_64_linux: "0d9872703a7cc16316688c9a3768edff6fee8db561a3ae752e442179817c399c" + end + + depends_on "cmake" => :build + depends_on "libev" + depends_on "libevent" + depends_on "libuv" + depends_on "openssl@3" + + conflicts_with "cbc", because: "both install `cbc` binaries" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DLCB_NO_TESTS=1", + "-DLCB_BUILD_LIBEVENT=ON", + "-DLCB_BUILD_LIBEV=ON", + "-DLCB_BUILD_LIBUV=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "LCB_ERR_CONNECTION_REFUSED", + shell_output("#{bin}/cbc cat document_id -U couchbase://localhost:1 2>&1", 1).strip + end +end diff --git a/Formula/lib/libcpuid.rb b/Formula/lib/libcpuid.rb new file mode 100644 index 0000000000000..8d4ea0a3f5654 --- /dev/null +++ b/Formula/lib/libcpuid.rb @@ -0,0 +1,36 @@ +class Libcpuid < Formula + desc "Small C library for x86 CPU detection and feature extraction" + homepage "https://github.com/anrieff/libcpuid" + url "https://github.com/anrieff/libcpuid/archive/refs/tags/v0.8.0.tar.gz" + sha256 "a5fe37d79bda121cbdf385ae3f6fa621da6a3102aa609400a718a4b8b82ed8aa" + license "BSD-2-Clause" + head "https://github.com/anrieff/libcpuid.git", branch: "master" + + bottle do + sha256 cellar: :any, sonoma: "a96631f0f039e5fbdac221e14ee15515a85e07cb0244e8bb975f97661fbf7c95" + sha256 cellar: :any, ventura: "aeed3eaa6c57348a2e14f9889c933e08623b446a84090a2c91a9d78f6a700d9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbfd10fe0ec68c63934be68907409b761eeabadfdbc36903e9eb85fcfdaf2b15" + sha256 cellar: :any_skip_relocation, x86_64_linux: "abd065dd786dcd3f4c4343f418e810502bdebf0674b0f01a05f58c06d98fd4e1" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + on_macos do + depends_on arch: :x86_64 + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"cpuid_tool" + assert_path_exists testpath/"raw.txt" + assert_path_exists testpath/"report.txt" + assert_match "CPUID is present", File.read(testpath/"report.txt") + end +end diff --git a/Formula/lib/libcroco.rb b/Formula/lib/libcroco.rb new file mode 100644 index 0000000000000..55886876c2f27 --- /dev/null +++ b/Formula/lib/libcroco.rb @@ -0,0 +1,57 @@ +class Libcroco < Formula + desc "CSS parsing and manipulation toolkit for GNOME" + homepage "https://gitlab.gnome.org/Archive/libcroco" + url "https://download.gnome.org/sources/libcroco/0.6/libcroco-0.6.13.tar.xz" + sha256 "767ec234ae7aa684695b3a735548224888132e063f92db585759b422570621d4" + license "LGPL-2.1-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "3e12a1334fe355c94acfe3f0bb286825a508b50164619031f7cd3ade763b303c" + sha256 cellar: :any, arm64_sonoma: "7b0586fbf8a45f772b65aad663dd6c6331657ede394f58bc789bf42f15c26c4e" + sha256 cellar: :any, arm64_ventura: "1936cc9609cb8de2360e762984a4a40d7c6ba2c92c6b2fd4133243a0b93426b0" + sha256 cellar: :any, arm64_monterey: "0c7ea7611c087cead41eabbc6e7680a7d47c8c3fd6736d7f97742f1311f61eaf" + sha256 cellar: :any, arm64_big_sur: "d6cced1a48822aac65fbb995159f26ed0552217d125969bcae4bd61bdf223407" + sha256 cellar: :any, sonoma: "7695f1be3f909e98e882a967bb9cb770808d4c6206969f966a00c888acc05c59" + sha256 cellar: :any, ventura: "ce5d64ff6d4425936d3bd5a3f8af048edfe077b7fdb8fdf09fe0a831f1474af8" + sha256 cellar: :any, monterey: "c8404e365ec027cb735e158ea042d5c338f6d0f6594e8a7196722801059df193" + sha256 cellar: :any, big_sur: "001998f7977aa0e07aa26ab431422e56b2de76dcb7b75dee392f0d0f3674197a" + sha256 cellar: :any, catalina: "bc64de8725726ae0188ec23dc9946759565f06e45d3eb10e510d5d42d0888e28" + sha256 cellar: :any, mojave: "edf97f493296bfe01b2a8cfe156f1e8052e181bed6ea34cabaf18ed59ef28b17" + sha256 cellar: :any, high_sierra: "f6e7d7d608dfcf6e57eaad77eef3cca27c15db0746e102f6dc33cccdd5a8a7bc" + sha256 cellar: :any, sierra: "a95e3733bd72b789cc9a3cb9dfc9a92153939b984c4d1d47b8aa806e99e99552" + sha256 cellar: :any_skip_relocation, arm64_linux: "18d8a961f813c3a2b4f52a0e06371dcc7a2344cec1461507fe00446aa7d5e05d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0b5c4b0de56d524a572a2bd8c93f65ed827c80093776bfd7681fd6351df6e13" + end + + # Ref: https://gitlab.gnome.org/Archive/libcroco/-/issues/8 + deprecate! date: "2024-08-04", because: :repo_archived + + depends_on "intltool" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + + uses_from_macos "libxml2" + + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--disable-Bsymbolic", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.css").write ".brew-pr { color: green }" + assert_equal ".brew-pr {\n color : green\n}", + shell_output("#{bin}/csslint-0.6 test.css").chomp + end +end diff --git a/Formula/lib/libcss.rb b/Formula/lib/libcss.rb new file mode 100644 index 0000000000000..69808320f2a77 --- /dev/null +++ b/Formula/lib/libcss.rb @@ -0,0 +1,67 @@ +class Libcss < Formula + desc "CSS parser and selection engine" + homepage "https://www.netsurf-browser.org/projects/libcss/" + url "https://download.netsurf-browser.org/libs/releases/libcss-0.9.2-src.tar.gz" + sha256 "2df215bbec34d51d60c1a04b01b2df4d5d18f510f1f3a7af4b80cddb5671154e" + license "MIT" + head "https://git.netsurf-browser.org/libcss.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?libcss[._-]v?(\d+(?:\.\d+)+)[._-]src\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "f065539111cfaeb57ffaa1f1918d0a5eb40a27193a0de07a976d8822941bb5a0" + sha256 cellar: :any, arm64_sonoma: "c7083640028fdeeed54ea337f87d86686a92659392ed2939ed60947f06c95e43" + sha256 cellar: :any, arm64_ventura: "50b100529a9304753171f567a8099c347d5f538d89b5fc0a673fa22c7a2ca347" + sha256 cellar: :any, sonoma: "69f0f19a1a2b2cd7e9493620542a5a2479035e2c2366889993091240366f21c5" + sha256 cellar: :any, ventura: "3b327a9d304d9964c5b98157661b194ba5156f4a32ca01af4e0ae835655aebbf" + sha256 cellar: :any_skip_relocation, arm64_linux: "c725d0e2a77a61777ee7704025ff633f09efd3011f99c456a855db6122744f81" + sha256 cellar: :any_skip_relocation, x86_64_linux: "459691f366d4877a30ac535cf1767ed6f681a922435c3b7893d52eb6871c93a8" + end + + depends_on "netsurf-buildsystem" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "libparserutils" + depends_on "libwapcaplet" + + def install + args = %W[ + NSSHARED=#{Formula["netsurf-buildsystem"].opt_pkgshare} + PREFIX=#{prefix} + ] + + system "make", "install", "COMPONENT_TYPE=lib-shared", *args + end + + test do + (testpath/"test.css").write <<~CSS + body { + background-color: #FFFFFF; + } + CSS + + (testpath/"test.c").write <<~C + #include + #include + + int main() { + css_error error; + css_select_ctx *ctx; + + error = css_select_ctx_create(&ctx); + if (error != CSS_OK) { + return 1; + } + + css_select_ctx_destroy(ctx); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libcss").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libcsv.rb b/Formula/lib/libcsv.rb new file mode 100644 index 0000000000000..e009ecedb66ca --- /dev/null +++ b/Formula/lib/libcsv.rb @@ -0,0 +1,54 @@ +class Libcsv < Formula + desc "CSV library in ANSI C89" + homepage "https://sourceforge.net/projects/libcsv/" + url "https://downloads.sourceforge.net/project/libcsv/libcsv/libcsv-3.0.3/libcsv-3.0.3.tar.gz" + sha256 "d9c0431cb803ceb9896ce74f683e6e5a0954e96ae1d9e4028d6e0f967bebd7e4" + license "LGPL-2.1-or-later" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "c515471cacac39d4bdb089b73f0ca8f2405a7c90b7973203fda68ab10c28a630" + sha256 cellar: :any, arm64_sonoma: "5ffc7fff79c22779c3c5e74f553511a5d160be80d2fa147f675db2631af542fa" + sha256 cellar: :any, arm64_ventura: "98c6f484207a9291a7d5696a9eff9ecdb6c6579834b86f8df8731ae61d8f3f4e" + sha256 cellar: :any, arm64_monterey: "37da5ecb6f4175cf6e044d2cd5a5797ffd20ddac9631d5b2bb54b2db53f3dab1" + sha256 cellar: :any, arm64_big_sur: "5fab325e7caac0db2cb892eebd55b5ef1094b92eaa3413bdd9ce85f47d82ff17" + sha256 cellar: :any, sonoma: "1f49d10bf54d93ac9b3ea032385ed32d9e148adb401bd004b8698cc4fe715529" + sha256 cellar: :any, ventura: "975bc0968b6d54eb26b6d21983086472cd473159163e525080e6ece157a3cc58" + sha256 cellar: :any, monterey: "6c4f06b89f9dea054ca3ee012d70b83268b9df1943b7e002a58b442f55ea126e" + sha256 cellar: :any, big_sur: "4edab615e912a3a0e931fff1b4f594093cfa1c4bc4869340046300b181f9ebc5" + sha256 cellar: :any, catalina: "e596efc37a1bf77cdbbab5fdc904e6ffa796f221b3ffa531f3ac24f56237d18a" + sha256 cellar: :any, mojave: "ad3c84168c138aef88134f7666f870dcb17f8b779b5e5b54417515f7c9b740af" + sha256 cellar: :any, high_sierra: "6946a6ff37a03f75d464cdc1229eb72251ae6b5d2726a658a016e39e862f0e33" + sha256 cellar: :any, sierra: "6d89efd634be6551134f099e458225325d76d69f55ba37676a3ccf7bea6c4e59" + sha256 cellar: :any, el_capitan: "3f69bb369fafd5c207f1c8ea500dc1e725e8e7dfe005215ff14b61fc25ac28e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "a313d8dd11bc697e7f0f45e36572a38c6a86c827b0309a564849c443ea573a78" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a66bd666958e3125f08377688cf86c94cd38e077bedea9a70cb17c721794211f" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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 + (testpath/"test.c").write <<~C + #include + int main(void) { + struct csv_parser p; + csv_init(&p, CSV_STRICT); + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcsv", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libcue.rb b/Formula/lib/libcue.rb new file mode 100644 index 0000000000000..1689d9f2bdb91 --- /dev/null +++ b/Formula/lib/libcue.rb @@ -0,0 +1,41 @@ +class Libcue < Formula + desc "Cue sheet parser library for C" + homepage "https://github.com/lipnitsk/libcue" + url "https://github.com/lipnitsk/libcue/archive/refs/tags/v2.3.0.tar.gz" + sha256 "cc1b3a65c60bd88b77a1ddd1574042d83cf7cc32b85fe9481c99613359eb7cfe" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a981b4ff3dfc99ea87cd08ec0caef79fc30b4bed4255841555fcbc3a02454b86" + sha256 cellar: :any, arm64_sonoma: "82934a84b7755323aef43356f8239523839e05e42005233046994d33376ef104" + sha256 cellar: :any, arm64_ventura: "a5037a18c0f6d957a866a5e897ed52b07121f5484a0dad00725566d17dc7ff8c" + sha256 cellar: :any, arm64_monterey: "668a55590220069e7b7711d37ff033aa36102a27cacd715bfabd0699bd3c2a22" + sha256 cellar: :any, sonoma: "0f391c7328b30c5e10263e59f1f313f9d5898a47fec936530b233734bdda5e24" + sha256 cellar: :any, ventura: "924e97f8e5171a7bfa973ad1032983ed58f99c610c691a4bfddbaaeab8b2b358" + sha256 cellar: :any, monterey: "799c04b2053d44ef0be1bea0b458612e8bde94f2dd6bd1165acb558b09a46267" + sha256 cellar: :any_skip_relocation, arm64_linux: "3474394b89c9462d00db5ce4d0c0bf90de7fe657256288a4600cf90f21c78b2e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "981c06a396357ab4014a50e803216c936cd5d6f3da3befa199a5e6926ad3b42a" + end + + depends_on "cmake" => :build + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + (pkgshare/"tests").install Dir["t/*"] + end + + test do + cp_r (pkgshare/"tests").children, testpath + Dir["*.c"].each do |f| + system ENV.cc, f, "-o", "test", "-L#{lib}", "-lcue", "-I#{include}" + system "./test" + rm "test" + end + end +end diff --git a/Formula/lib/libcuefile.rb b/Formula/lib/libcuefile.rb new file mode 100644 index 0000000000000..684657252211e --- /dev/null +++ b/Formula/lib/libcuefile.rb @@ -0,0 +1,45 @@ +class Libcuefile < Formula + desc "Library to work with CUE files" + homepage "https://www.musepack.net/" + url "https://files.musepack.net/source/libcuefile_r475.tar.gz" + version "r475" + sha256 "b681ca6772b3f64010d24de57361faecf426ee6182f5969fcf29b3f649133fe7" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.musepack.net/index.php?pg=src" + regex(/href=.*?libcuefile[._-](r\d+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "34a5359939dfb84fbbfff58f7ddfc220c7dde287dcda457facbd29e8fe91f0de" + sha256 cellar: :any, arm64_sonoma: "fe51d6a9722425e0e85648a22805f4f74d800bc97083d44c290075f6fdd0655b" + sha256 cellar: :any, arm64_ventura: "9329d1062814c86b9e6f85060654e962c06b4de6359756f6cdea2842c4280dc5" + sha256 cellar: :any, arm64_monterey: "5c3e4f0219de1b452bdb4e6684a6a71520d6fe2ba6634d6c2a740d062110a292" + sha256 cellar: :any, arm64_big_sur: "2d73e0ee1f734eb35034383fa5e0697ace0684f0a1586832613227a6769b07d6" + sha256 cellar: :any, sonoma: "3e4c6861199211e904b725e50a8a03b4f0592ee5c01355f7ae2190dce3370522" + sha256 cellar: :any, ventura: "716c579255d43e25cc737a655a136a966cfed604e97497547d949e052b961db5" + sha256 cellar: :any, monterey: "06a8a88fee28e5288aa1219f8bc5eb1b6f0a3d153dcb250d453d008dd98cbeab" + sha256 cellar: :any, big_sur: "2d4ea14db508f6439073daa64338f884249c7479af688ec91e4a286a3c42591e" + sha256 cellar: :any, catalina: "3069cf9b0261d8cedee8979348227f5c77a5c6dcb8942f9fbea20b3e3f190374" + sha256 cellar: :any, mojave: "1e64fe68ce178b904ac44a7a2c017a030c6f0ff87fb18b7c943c8c766f23d186" + sha256 cellar: :any, high_sierra: "a0b9b31c26ac9dc2704e71834259c0f9d0a12dce4ad4bbcdaae64fea5004ceae" + sha256 cellar: :any, sierra: "66ec2d9281a5459326a1b2d220b9f68fa241a6b9f8370324377af6751d60b7fd" + sha256 cellar: :any, el_capitan: "fc48e0953e3df489f37ee30214bd50b07020955b02f957a90c699474f09ef974" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd236ed5afb1c8db194b07b9c36560b0f03871415f79244c431322f8aea62cd4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a8324a43e9b1e4782de409dacf6f82de5fa7b955ff871d2d10e56b2dd1324bb" + end + + depends_on "cmake" => :build + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + include.install "include/cuetools/" + end +end diff --git a/Formula/lib/libcutl.rb b/Formula/lib/libcutl.rb new file mode 100644 index 0000000000000..43029d1797e59 --- /dev/null +++ b/Formula/lib/libcutl.rb @@ -0,0 +1,36 @@ +class Libcutl < Formula + desc "C++ utility library" + homepage "https://www.codesynthesis.com/projects/libcutl/" + url "https://www.codesynthesis.com/download/xsd/4.2/libcutl-1.11.0.tar.gz" + sha256 "bb78ff87d6cb1a2544543ffe7941f0aeb8f9dcaf7dd46e9acef3e032ed7881dc" + license "MIT" + head "https://git.codesynthesis.com/libcutl/libcutl.git", branch: "master" + + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "085cbb14470957513c5a48765d1f0f924cd6646b7cb6e5070863b3fe756f54d2" + sha256 cellar: :any, arm64_sonoma: "e20cc790ca579e8ae7ab5f69774ad67bd58f1eb6343f1fd87db494beb7cfb3ba" + sha256 cellar: :any, arm64_ventura: "bb7b24cba44acb490f955c4961d91bca0f8d32cef0fbd789288d267965f87df7" + sha256 cellar: :any, sonoma: "a392b127303ec453757aa05d8cae2dbac76dba151c4b443a292fbbf87f49ee53" + sha256 cellar: :any, ventura: "f3aabe420e6e8761a2b0ba98be18baed7d109ab1322a607372c774127ac7bc74" + sha256 cellar: :any_skip_relocation, arm64_linux: "581f7b0d2ce59b1b8c006e97a0dd4724542b9842add5c14fbc09546d7b53239f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f2f825e2f1b6e5e519c80bc8de1fcd0f65def78498b5c9c07e7f6acf436081ac" + end + + depends_on "build2" => :build + + def install + system "b", "configure", "config.install.root=#{prefix}" + system "b", "install", "--jobs=#{ENV.make_jobs}", "-V" + pkgshare.install "tests/re/driver.cxx" => "test.cxx" + end + + test do + system ENV.cxx, "-std=c++11", pkgshare/"test.cxx", "-o", "test", "-L#{lib}", "-lcutl" + system "./test" + end +end diff --git a/Formula/lib/libcyaml.rb b/Formula/lib/libcyaml.rb new file mode 100644 index 0000000000000..a0395cee234ca --- /dev/null +++ b/Formula/lib/libcyaml.rb @@ -0,0 +1,41 @@ +class Libcyaml < Formula + desc "C library for reading and writing YAML" + homepage "https://github.com/tlsa/libcyaml" + url "https://github.com/tlsa/libcyaml/archive/refs/tags/v1.4.2.tar.gz" + sha256 "3211b2a0589ebfe02c563c96adce9246c0787be2af30353becbbd362998d16dc" + license "ISC" + + bottle do + sha256 cellar: :any, arm64_sequoia: "326caffc3d633d21af0cb1c24096ada03d9d485b2d089b9214b96db7951e5dea" + sha256 cellar: :any, arm64_sonoma: "a9147c54f5f0996413c8ae21ad22549d6ebdd3271fcd72c9e4e73c80f4db8067" + sha256 cellar: :any, arm64_ventura: "b3cf670ef44d98d11d9d9d84faeb1ebcf48bbc109ba6ab6b3e96b7297bed015e" + sha256 cellar: :any, arm64_monterey: "a87c89eb5de04774d6ac71b0934791c3040c4f326b6f51f4e1717ce5bfa1a64a" + sha256 cellar: :any, sonoma: "1c92fa081bb054a3f92a8c37b3bf9c6504240c7a06935c3661aaf7b1afdfd2e1" + sha256 cellar: :any, ventura: "d04c058836bbd8fe0cac928c000836884c80f7ded2f3addfbb66e3b63030e644" + sha256 cellar: :any, monterey: "4b56dac4eca00856bd125610014ef2ed230bda981e910a37ee67118874b85219" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4deac758411695b4c3a5c1b9860d3098d38ac10040bcfd920ca6022f21f6b6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9941417c37c0d014a1ca1bf23c83275c5f36e5edbd75c320c4f0124d6964b87b" + end + + depends_on "libyaml" + + def install + system "make", "install", "PREFIX=#{prefix}" + pkgshare.install "examples/numerical/main.c" => "test.c" + end + + test do + flags = %W[ + -I#{include} -I#{Formula["libyaml"].opt_include} + -L#{lib} -L#{Formula["libyaml"].opt_lib} + -lcyaml -lyaml + -o test + ] + + system ENV.cc, pkgshare/"test.c", *flags + + (testpath/"test.yaml").write "name: Numbers\ndata:\n- 1\n- 2\n- 4\n- 8\n" + expected_output = "Numbers:\n - 1\n - 2\n - 4\n - 8\n" + assert_equal expected_output, shell_output("#{testpath}/test #{testpath}/test.yaml") + end +end diff --git a/Formula/lib/libdaemon.rb b/Formula/lib/libdaemon.rb new file mode 100644 index 0000000000000..b45d7e1c3f9a0 --- /dev/null +++ b/Formula/lib/libdaemon.rb @@ -0,0 +1,45 @@ +class Libdaemon < Formula + desc "C library that eases writing UNIX daemons" + homepage "https://0pointer.de/lennart/projects/libdaemon/" + url "https://0pointer.de/lennart/projects/libdaemon/libdaemon-0.14.tar.gz" + sha256 "fd23eb5f6f986dcc7e708307355ba3289abe03cc381fc47a80bca4a50aa6b834" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?libdaemon[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "5bb178b81ecf063f093a88970d991bd20550e492496e317a8617b1fb7c8874d4" + sha256 cellar: :any, arm64_sonoma: "e3311382ce2231961c035a35b3376f3d8ce9c852ca565fe35a971f6d9539b6ef" + sha256 cellar: :any, arm64_ventura: "48e59b83b13317a14504cc36b820781a8e55e2e11509eeacb3632535daa98988" + sha256 cellar: :any, arm64_monterey: "0ba92f47214e34c065723f4dc24f0a0391b8d0cb9af18b4a0262ab74d6629757" + sha256 cellar: :any, arm64_big_sur: "d5bebb62e8788d3e229a9022c600d3abc7b93843c854070a6296e6962979a2f0" + sha256 cellar: :any, sonoma: "7d725995c1dd243717fa590f3dc3bb5996d9584c7e6ed490695f80e4f00357a4" + sha256 cellar: :any, ventura: "0920b6d606e3afaa3ac023790dc9e7c3f89c99297ae54ae3b9d20cf10e27aee8" + sha256 cellar: :any, monterey: "90500c4d405d8c04cccb7d06c6c45bed48646e49700d160d44659a22577007fa" + sha256 cellar: :any, big_sur: "e33a72add1413b788a607ae16413c3434da9d2faca96b9201504121b03a7ff73" + sha256 cellar: :any, catalina: "ad96f0b0e09c3e0c178d3e903659d65ae34fea18365197924a4911c291d02531" + sha256 cellar: :any, mojave: "1fe52d810eca4471b4d285de02a09ea9e4b78d762f1a2a292d6da1eb10e9626d" + sha256 cellar: :any, high_sierra: "0933bb1dde0237f4079fefcd228ea644be36fbf814aa96762ebbae3537886558" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f6cddfcdcd44cbd7592ef623e20fffcf98471f6e375e25f23c99b8c0c7198cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66573e3e026fca5fab4dd7e1f7c9712e837fd65ca21cfc1e0687e719d8905c90" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + 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", *std_configure_args, *args + system "make", "install" + end +end diff --git a/Formula/lib/libdap.rb b/Formula/lib/libdap.rb new file mode 100644 index 0000000000000..3e02f58aba96f --- /dev/null +++ b/Formula/lib/libdap.rb @@ -0,0 +1,57 @@ +class Libdap < Formula + desc "Framework for scientific data networking" + homepage "https://www.opendap.org/" + url "https://www.opendap.org/pub/source/libdap-3.21.1.tar.gz" + sha256 "1f6c084bdbf2686121f9b2f5e767275c1e37d9ccf67c8faabc762389f95a0c38" + license "LGPL-2.1-or-later" + + livecheck do + url "https://www.opendap.org/pub/source/" + regex(/href=.*?libdap[._-]v?(\d+(?:[.-]\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "1f8e9cd58ca9ef263b5a028262a32a1b06b8903cb2e7166446d25d60f7bbb5bd" + sha256 arm64_sonoma: "d8886f6fbec0a65ec3ed25dfd1bd13c7ac2f2a71c1b7674bd1b4897508477f8c" + sha256 arm64_ventura: "3cef6f6506acf42d24cf9d0bf55b8b194ce5938d5d2d6d7e82a155c86e031a8a" + sha256 sonoma: "aecc5c17befb043a3cbf6939b0011190d4b4ebd8ecfe42748c67a0b35fc7e920" + sha256 ventura: "4b9be029b474845cfd29aedbf47548189fed0c2b977687c8778f5180b895a1b4" + sha256 arm64_linux: "bd0b6ca36a3f872a08c4401e9f1b24dbde3c08e2b97514d6175f7779815344ea" + sha256 x86_64_linux: "c0bbde3c7deb1480fe9d54028a7ce000692e28784c7e3b926d8c8234ff79c742" + end + + head do + url "https://github.com/OPENDAP/libdap4.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "bison" => :build + depends_on "pkgconf" => :build + depends_on "libxml2" + depends_on "openssl@3" + + uses_from_macos "flex" => :build + uses_from_macos "curl" + + on_linux do + depends_on "libtirpc" + depends_on "util-linux" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--with-included-regex", *std_configure_args + system "make" + system "make", "check" + system "make", "install" + end + + test do + # Versions like `1.2.3-4` with a suffix appear as `1.2.3` in the output, so + # we have to remove the suffix (if any) from the formula version to match. + assert_match version.to_s.sub(/-\d+$/, ""), shell_output("#{bin}/dap-config --version") + end +end diff --git a/Formula/lib/libdazzle.rb b/Formula/lib/libdazzle.rb new file mode 100644 index 0000000000000..7fc2f277da79b --- /dev/null +++ b/Formula/lib/libdazzle.rb @@ -0,0 +1,59 @@ +class Libdazzle < Formula + desc "GNOME companion library to GObject and Gtk+" + homepage "https://gitlab.gnome.org/GNOME/libdazzle" + url "https://download.gnome.org/sources/libdazzle/3.44/libdazzle-3.44.0.tar.xz" + sha256 "3cd3e45eb6e2680cb05d52e1e80dd8f9d59d4765212f0e28f78e6c1783d18eae" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 arm64_sequoia: "87f5700425b73e8a64c2b6af4f2f1ee74028b1921d147ba239a298c10ea12b05" + sha256 arm64_sonoma: "f79987d1cba7d798fe6cb2c824439ddb41dbac57df64c75dc8cf72e66a9c0d25" + sha256 arm64_ventura: "e08d05fceceacb8f02483c79711d7320d9d1888c2307cfb1b65b9a1524f27722" + sha256 arm64_monterey: "a3553a76ef15ac7c2268e9ce059d1321c44b8d7fbdf13013f08b8d5f5d23de23" + sha256 sonoma: "2fca358ca672c44ed32595ce7769e77d777e3c62073ed4c445210614d030280a" + sha256 ventura: "2e8a40dcec28ed8a7cdae08bb4d1c1844b9d0dfff1c2da917d75e9259b42cff7" + sha256 monterey: "648477570e7a597bc703e6cfa2ee418aba691ec253e7f40c79c33b3b2e95b8b9" + sha256 arm64_linux: "6f85bbfc14f0f732331e2e93c24df2ebd97bf9e3356189f4eb6777735d411a15" + sha256 x86_64_linux: "7a8395fdb2257d54ffc90ebcb1a95796c87fba132b602c14ed0c42e384bb90e8" + 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 "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 + system "meson", "setup", "build", "-Dwith_vapi=true", *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[]) { + g_assert_false(dzl_file_manager_show(NULL, NULL)); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libdazzle-1.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libdbi.rb b/Formula/lib/libdbi.rb new file mode 100644 index 0000000000000..819a6c7feefc5 --- /dev/null +++ b/Formula/lib/libdbi.rb @@ -0,0 +1,58 @@ +class Libdbi < Formula + desc "Database-independent abstraction layer in C, similar to DBI/DBD in Perl" + homepage "https://libdbi.sourceforge.net/" + url "https://downloads.sourceforge.net/project/libdbi/libdbi/libdbi-0.9.0/libdbi-0.9.0.tar.gz" + sha256 "dafb6cdca524c628df832b6dd0bf8fabceb103248edb21762c02d3068fca4503" + license "LGPL-2.1-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "2ad28ca963e05bb6c228aa9d10507b53b2ff673a3a2953f6eb05f89a36bbccd9" + sha256 cellar: :any, arm64_sonoma: "c108e50e26857c7fc725363e27c4b069c5c2271b1b7a04e7603d1977bc53eb9b" + sha256 cellar: :any, arm64_ventura: "65d1ef64a864021ad09a860db2dc4388216dc840d565c7a9a1e24e6dfe5b30e8" + sha256 cellar: :any, arm64_monterey: "3e46a3c790195ad94277912f505bce7d29aee03dddc112f1473e5094b6f1de97" + sha256 cellar: :any, arm64_big_sur: "61c6d495c3d1459c663a25e3436401f57a4b8df6745befa5214076fa3555979e" + sha256 cellar: :any, sonoma: "cdf90b9046bd5a55387817114d6623f0e1f7273381891b8aede70ae02e7c1f66" + sha256 cellar: :any, ventura: "31885b42cd8d58dfc149999219b6b741aee0fab16c19f1e6d9f60b5b2d7c9376" + sha256 cellar: :any, monterey: "4a524cd1c3ee5cb9c053b01f01125ecca43d4def593b5afcca64b84307dcf505" + sha256 cellar: :any, big_sur: "af53bebb0b59917b87468a5cc52b168c01e40b83c5eff987ffa2655c9e64ac3b" + sha256 cellar: :any, catalina: "ce66e90000681c5f9174c3698ac4ceefd5d1be6ca4ffa574053f0705217c6837" + sha256 cellar: :any, mojave: "3aff10515535dc3f99dfa56644229daba74f719838d3e580754b3bbdc3c0429d" + sha256 cellar: :any, high_sierra: "eb3d8474601267d835b74b5a29944dc6d987486745dcfd17389be3a44b2c0175" + sha256 cellar: :any_skip_relocation, arm64_linux: "161533543dcd589103b5e76e2bfb222e287dfe9b62816d2213d64858cf8da873" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac0e87e837a96a2147f0f95157ecbf6df333145cbbbfec466a9c18d794ffe8c1" + end + + on_arm do + # Added automake as a build dependency to update config files for ARM support. + depends_on "automake" => :build + end + + def install + if Hardware::CPU.arm? + # Workaround for ancient config files not recognizing aarch64 macos. + %w[config.guess config.sub].each do |fn| + (buildpath/fn).unlink + cp Formula["automake"].share/"automake-#{Formula["automake"].version.major_minor}"/fn, fn + end + end + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main(void) { + dbi_inst instance; + dbi_initialize_r(NULL, &instance); + printf("dbi version = %s\\n", dbi_version()); + dbi_shutdown_r(instance); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-ldbi", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libdc1394.rb b/Formula/lib/libdc1394.rb new file mode 100644 index 0000000000000..a4cca8fba4d33 --- /dev/null +++ b/Formula/lib/libdc1394.rb @@ -0,0 +1,42 @@ +class Libdc1394 < Formula + desc "Provides API for IEEE 1394 cameras" + homepage "https://damien.douxchamps.net/ieee1394/libdc1394/" + url "https://downloads.sourceforge.net/project/libdc1394/libdc1394-2/2.2.7/libdc1394-2.2.7.tar.gz" + sha256 "537ceb78dd3cef271a183f4a176191d1cecf85f025520e6bd3758b0e19e6609f" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "78ede809109f1cdc74263480e2088879534546d1a2ef2e85abe793d9bb053546" + sha256 cellar: :any, arm64_sonoma: "36f71e3ace8c9a94a732f397eda9e2c703c8ea45f02cd9ce3a87ca5b9d961770" + sha256 cellar: :any, arm64_ventura: "38a5b54a9c968f7cf4ad345b6c679cf752c3634492158dfbe120c6f5e086cefd" + sha256 cellar: :any, arm64_monterey: "48b4198b7d90c2a14d4a66075e2342c1cf4d6c03fb88670b0424a51b3dd9a4b3" + sha256 cellar: :any, arm64_big_sur: "6dc506be57b363bf54f40304cb87e0a70827786087d0bb355401a45b49121d46" + sha256 cellar: :any, sonoma: "dd54c0cb229eb1f90e63bf99b74f78e13e2d2caada3d77d3af6fdaa32fcd6022" + sha256 cellar: :any, ventura: "1b71b1a62895a6223862b1e0a0a052032c8ce358245926befec4a7a1210091ed" + sha256 cellar: :any, monterey: "5eb178bc37614499766470dda514437cbcfd00516619b7dd3d63308d0c297ec8" + sha256 cellar: :any, big_sur: "b292acc61a9a2acd0fb61b52e3d0ff624adb9c482871982cb1ebd696d581ae58" + sha256 cellar: :any_skip_relocation, arm64_linux: "09b0c2e25a503714836dcf4afa1bf1f32e89cb2e3947c868d93845d8251dc046" + sha256 cellar: :any_skip_relocation, x86_64_linux: "53fba90024fafc156e594ce967d376cb60f86ca1f0fed7f3416abbc7bb023bd1" + end + + depends_on "sdl12-compat" + + # fix issue due to bug in OSX Firewire stack + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/b8275aa07f/libdc1394/capture.patch" + sha256 "6e3675b7fb1711c5d7634a76d723ff25e2f7ae73cd1fbf3c4e49ba8e5dcf6c39" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", *std_configure_args, + "--disable-examples", + "--disable-sdltest" + system "make", "install" + end +end diff --git a/Formula/lib/libdca.rb b/Formula/lib/libdca.rb new file mode 100644 index 0000000000000..90fc4058602a6 --- /dev/null +++ b/Formula/lib/libdca.rb @@ -0,0 +1,57 @@ +class Libdca < Formula + desc "Library for decoding DTS Coherent Acoustics streams" + homepage "https://www.videolan.org/developers/libdca.html" + url "https://download.videolan.org/pub/videolan/libdca/0.0.7/libdca-0.0.7.tar.bz2" + sha256 "3a0b13815f582c661d2388ffcabc2f1ea82f471783c400f765f2ec6c81065f6a" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.videolan.org/pub/videolan/libdca/" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)[/"'>]}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0737b7bd914efce32ae323ecbb5fca30b14b39ef31d704a482883598303518b5" + sha256 cellar: :any, arm64_sonoma: "f8040bc44c93b05569e5f2cbce08e3b2377bd2445c4f305c2fb49f63a22850be" + sha256 cellar: :any, arm64_ventura: "d7c6080f57c3de053cb1e94bfc535b783389d9fde51c1cfe6e5c0e8b0c5245d8" + sha256 cellar: :any, arm64_monterey: "505dbd9ed35b7bede454672385472ed725d6fd84f15a984d3d3e1025725d996b" + sha256 cellar: :any, arm64_big_sur: "d20b5e52384fcbb0da4501eb109e3aac6be3eb6f0e6a8f09de0c61b2f3c83361" + sha256 cellar: :any, sonoma: "f0cf65d1a7c35c4f90798eb1522341a6f9441ecaaa62bb68b1b3afbd8194ec43" + sha256 cellar: :any, ventura: "09bb7d9235fe77b84f724ddeb66c7b2a54a6448a99741ad89368722b526ee972" + sha256 cellar: :any, monterey: "d3e058da247c2b2976a7c28da8102792b56cbe4abfda68cf6960f94961907ad8" + sha256 cellar: :any, big_sur: "123d7863f98b6fc1f56aaca440db706764b43c99fe1a5bd5286badf160f76d62" + sha256 cellar: :any, catalina: "d9c4b3a350744867f5782db738d25d1212b9be89449030492083364574f914d7" + sha256 cellar: :any, mojave: "594d6b26eb3ca16c3046ff2792de4f78a0f038dc94b1972c8827e86331a46fde" + sha256 cellar: :any, high_sierra: "f8ba469ce443efa0e9fc87b51a87c6b4d510bd3e7bb91ae11d1f91e99f760acc" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2f265e353b2c9fb8073ce2a4a5eafc96b615c9e30acde2045cfdeb0b754a657" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d7ec4a08990df38fb26a4c719e6bd669bd35e3e5e89d49d43fea007b74e3edf" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + conflicts_with "dcadec", because: "both install `dcadec` binaries" + + def install + # Fixes "duplicate symbol ___sputc" error when building with clang + # https://github.com/Homebrew/homebrew/issues/31456 + ENV.append_to_cflags "-std=gnu89" + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make" + system "make", "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", "-o", "null", resource("homebrew-testdata").cached_download + end + end +end diff --git a/Formula/lib/libde265.rb b/Formula/lib/libde265.rb new file mode 100644 index 0000000000000..2d07a74254749 --- /dev/null +++ b/Formula/lib/libde265.rb @@ -0,0 +1,44 @@ +class Libde265 < Formula + desc "Open h.265 video codec implementation" + homepage "https://github.com/strukturag/libde265" + url "https://github.com/strukturag/libde265/releases/download/v1.0.16/libde265-1.0.16.tar.gz" + sha256 "b92beb6b53c346db9a8fae968d686ab706240099cdd5aff87777362d668b0de7" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3ae5875dd16e86734c59ff156ef6f03f0cc11f972193e678241ec10ac19dbf48" + sha256 cellar: :any, arm64_sonoma: "08a3fd4a3e01254f12590f292157a8b92a898d9b4d31659f3e25d34a164f9cd6" + sha256 cellar: :any, arm64_ventura: "2837e8b323ed255ca2efb59a266cd5da0740524758df2d51e5a9834da79720f8" + sha256 cellar: :any, sonoma: "dcee9a83c604fc27ccb54af849fe45124e12dbf66b63c53d5775aa0c1a49e34c" + sha256 cellar: :any, ventura: "55f13980c54642c830932f317c1e458882daca74f80118cff8e4bb204ac1b0cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "650fa2c9ab2bd73545addb81842bb9442d929b25af4eef7fedfb34a4f93cfe87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1bca710186d841ef99740adb1bdd747ae4b0bebb4ffcfa4bc4024199b26c0a5d" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + extra_args = [] + extra_args << "--build=aarch64-apple-darwin#{OS.kernel_version}" if OS.mac? && Hardware::CPU.arm? + + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--disable-sherlock265", + "--disable-dec265", + "--prefix=#{prefix}", + *extra_args + system "make", "install" + + # Install the test-related executables in libexec. + (libexec/"bin").install bin/"block-rate-estim", + bin/"tests" + end + + test do + system libexec/"bin/tests" + end +end diff --git a/Formula/lib/libdeflate.rb b/Formula/lib/libdeflate.rb new file mode 100644 index 0000000000000..13909725d74d5 --- /dev/null +++ b/Formula/lib/libdeflate.rb @@ -0,0 +1,32 @@ +class Libdeflate < Formula + desc "Heavily optimized DEFLATE/zlib/gzip compression and decompression" + homepage "https://github.com/ebiggers/libdeflate" + url "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.24.tar.gz" + sha256 "ad8d3723d0065c4723ab738be9723f2ff1cb0f1571e8bfcf0301ff9661f475e8" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "187850054c03e9417b2234ab30efa87b93a029b31e28fcb95b169579217ad333" + sha256 cellar: :any, arm64_sonoma: "b0672b22ba14406d032136734bb5852125bbe61c651253a3ed1820d7196557a2" + sha256 cellar: :any, arm64_ventura: "66411c4bcde1c756aaa09c46dd3e70e3b3992843efd5c795c23b0750a2f58002" + sha256 cellar: :any, sonoma: "2e7067afa9095766f5ea81162c05028e50d433bd334162874974598841fb9415" + sha256 cellar: :any, ventura: "879ece3dc6bbe8171520d17bb94f234df0a0eed235c99397ff053d8596ecd20a" + sha256 cellar: :any_skip_relocation, arm64_linux: "552ea942fcb9f35324efe30f6465f1938987c80d9a391c34b22f3e81a1191a2d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "784b1c1d1259c7b078883e0e14aabed1df975bf4eb483faea843cf2526032020" + 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/"foo").write "test" + system bin/"libdeflate-gzip", "foo" + system bin/"libdeflate-gunzip", "-d", "foo.gz" + assert_equal "test", (testpath/"foo").read + end +end diff --git a/Formula/lib/libdex.rb b/Formula/lib/libdex.rb new file mode 100644 index 0000000000000..3bab8b0cb6dc3 --- /dev/null +++ b/Formula/lib/libdex.rb @@ -0,0 +1,61 @@ +class Libdex < Formula + desc "Future-based programming for GLib-based applications" + homepage "https://gitlab.gnome.org/GNOME/libdex" + url "https://gitlab.gnome.org/GNOME/libdex/-/archive/0.10.0/libdex-0.10.0.tar.gz" + sha256 "1795d8cb281df4e4d292725d4ed8982a424bf258f13e866bd1a3818c5bd4ea4c" + license "LGPL-2.1-or-later" + head "https://gitlab.gnome.org/GNOME/libdex.git", branch: "main" + + # We restrict matching to versions with an even-numbered minor version number, + # as an odd-numbered minor version number indicates a development version: + # https://gitlab.gnome.org/GNOME/libdex/-/issues/22#note_2368290 + livecheck do + url :stable + regex(/^v?(\d+\.\d*[02468](?:\.\d+)*)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c0e9bbf2bcc49dc00563b61dc7d7af875afb2238a4ba624888507fa78497036a" + sha256 cellar: :any, arm64_sonoma: "7225def607ef3bf0c9e4ef35c5a4e342bfd2c50316fc6801261568d6abc7741d" + sha256 cellar: :any, arm64_ventura: "d028731c282bd751c94e87bec4f93a3657b6b48b3f318f9cfa28f7eb3cd29bf5" + sha256 cellar: :any, sonoma: "b1442c9ce97b8d63af832cb2b9a0b6e0c340433e8b212131a7abf2e52034f6c4" + sha256 cellar: :any, ventura: "7a6ac6f6fe4b4225cec26e320f583eaba048f5091ebeda8ce983d4529c5a33cd" + sha256 arm64_linux: "4a02e4429ff5407511b8ed686677109a083179c634528c6079434195dc082d62" + sha256 x86_64_linux: "6015425230e2435737f5a901fea985eec735f26e60c0d788a0a989378a73dd50" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build # for vapigen + depends_on "glib" + + def install + args = %w[ + -Dexamples=false + -Dtests=false + ] + + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + pkgshare.install "examples", "build/config.h" + end + + test do + cp %w[examples/cp.c config.h].map { |file| pkgshare/file }, "." + + ENV.append_to_cflags "-I." + ENV.append_to_cflags shell_output("pkgconf --cflags libdex-1").chomp + ENV.append "LDFLAGS", shell_output("pkgconf --libs-only-L libdex-1").chomp + ENV.append "LDLIBS", shell_output("pkgconf --libs-only-l libdex-1").chomp + + system "make", "cp" + + text = Random.rand.to_s + (testpath/"test").write text + system "./cp", "test", "not-test" + assert_equal text, (testpath/"not-test").read + end +end diff --git a/Formula/lib/libdicom.rb b/Formula/lib/libdicom.rb new file mode 100644 index 0000000000000..773fa3db5b68c --- /dev/null +++ b/Formula/lib/libdicom.rb @@ -0,0 +1,40 @@ +class Libdicom < Formula + desc "DICOM WSI read library" + homepage "https://github.com/ImagingDataCommons/libdicom" + url "https://github.com/ImagingDataCommons/libdicom/releases/download/v1.2.0/libdicom-1.2.0.tar.xz" + sha256 "3b8c05ceb6bf667fed997f23b476dd32c3dc6380eee1998185c211d86a7b4918" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a0ebd3a3367d71d0334a7891bcfd592e2b3afb155ee06ef53147132dfcefd60e" + sha256 cellar: :any, arm64_sonoma: "f375601773df0c5094df266775394c93aa72f5b48fb05cf1fc05b5af5cc9c3af" + sha256 cellar: :any, arm64_ventura: "878c5957cfd9c3a44b204f9917c2dcdde618abbab7038a7b60052d4c9a5ac504" + sha256 cellar: :any, sonoma: "070a0a036117b34c98f56cd86327d70572bbb0131df4b2b0c31d3c32d585009e" + sha256 cellar: :any, ventura: "24ecd6d69b3020110e55b0a6d70737dec2df074a9568b65b1c7bf5a5f7e5d381" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2123321b416caf06cb685ed6307a53ada4d8eace6429595d99a1249caf171f7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a12c2177e7519f1cd98ed1d88e227eeabdee7236532fa270b1a780b16a068020" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + depends_on "uthash" + + 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 + resource "homebrew-sample.dcm" do + url "https://raw.githubusercontent.com/dangom/sample-dicom/master/MR000000.dcm" + sha256 "4efd3edd2f5eeec2f655865c7aed9bc552308eb2bc681f5dd311b480f26f3567" + end + testpath.install resource("homebrew-sample.dcm") + + assert_match "File Meta Information", shell_output("#{bin}/dcm-dump #{testpath}/MR000000.dcm") + + assert_match version.to_s, shell_output("#{bin}/dcm-getframe -v") + end +end diff --git a/Formula/lib/libdill.rb b/Formula/lib/libdill.rb new file mode 100644 index 0000000000000..a3087c3b2de93 --- /dev/null +++ b/Formula/lib/libdill.rb @@ -0,0 +1,76 @@ +class Libdill < Formula + desc "Structured concurrency in C" + homepage "https://libdill.org/" + url "https://github.com/sustrik/libdill/archive/refs/tags/2.14.tar.gz" + sha256 "ebba0e5b433ec123b74a57d49b89dfa673aa258e03e6a452959e556b4c4529b9" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "cfe256a0ada19b9c8405be0b3b95885137548fe38e0f3938f28bb50b8245b561" + sha256 cellar: :any, arm64_sonoma: "e7e3f7443e7a91dc15164f1ddfba535a2d61992c9ea0e8ee6097e42f47742c5e" + sha256 cellar: :any, arm64_ventura: "b6196fd106aa6de14be8a61b18cdeb4244a721eaf03fb2512188d50248f9061a" + sha256 cellar: :any, arm64_monterey: "091479e5dd7d08123896444b8a398cb4bec0b7ee72cc24bef0903919a2ceedd1" + sha256 cellar: :any, arm64_big_sur: "709ff85bcf90ca86729fec8a0e01fe9b98e0f42a5e215de469d4f95a6eb93f6a" + sha256 cellar: :any, sonoma: "c7b0d0f62b509ddf55dcd6f59eb31e5d6e301c4c6cd1e2abd5e139d3db8c7681" + sha256 cellar: :any, ventura: "ada9dbf183f0b016fcbb7f2eeeb155ae5ffd68b32dbee479b8a976b0c93a5359" + sha256 cellar: :any, monterey: "f3d32c4b24787b52512ae841b0daf82e256bb7f7e42dad115bbc059541103507" + sha256 cellar: :any, big_sur: "d0bc288a3ce54ab333f48ae08d127aa78300f6ee4921f0a9b59ca7f685649a93" + sha256 cellar: :any, catalina: "124f2fd7aa4ba68e528bd2700637511943ae55ec9c2b2c9dcdb3bff1f2e34909" + sha256 cellar: :any, mojave: "7ebbbe85ab5989b48664688c9fdc833b4bbc7846ea94f3f73c34ef620026b878" + sha256 cellar: :any, high_sierra: "062d2f9f6fdeb5588036d3e06752ecfd95b5f4e7b6008b727208fc0a2e7f50a6" + sha256 cellar: :any, sierra: "6f75a82c15eafe6818b0d79e9c55df0654c6665f37841ee21cf7fb90ac578a92" + sha256 cellar: :any_skip_relocation, arm64_linux: "78f6fb6cd777dc91a61a369bb50c7a6879c50b209391429c7f160a7dea9569f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a7a4c9cd3cfe580d823fe85732058bbce181f915f348e1d9629bd93e86880f7" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + on_arm do + # Using Apple clang to compile test results in executable that + # causes a segmentation fault, but LLVM clang or GCC seem to work. + # Issue ref: https://github.com/sustrik/libdill/issues/208 + depends_on "llvm" => :test + end + + # Apply upstream commit to fix build with newer GCC. + # Remove with next release. + patch do + url "https://github.com/sustrik/libdill/commit/775bc53e2cf92672cf03cc43019e12948e669c04.patch?full_index=1" + sha256 "4002852086909a5572c406f3c629df994d06647690e3db113f2701a42e976413" + end + + def install + system "./autogen.sh" + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + # Issue ref: https://github.com/sustrik/libdill/issues/208 + ENV["CC"] = Formula["llvm"].opt_bin/"clang" if Hardware::CPU.arm? + + (testpath/"test.c").write <<~C + #include + #include + #include + + coroutine void worker(const char *text) { + while(1) { + printf("%s\\n", text); + msleep(now() + random() % 500); + } + } + + int main() { + go(worker("Hello!")); + go(worker("World!")); + msleep(now() + 5000); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-ldill", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libdiscid.rb b/Formula/lib/libdiscid.rb new file mode 100644 index 0000000000000..4ee5fe091a8e1 --- /dev/null +++ b/Formula/lib/libdiscid.rb @@ -0,0 +1,32 @@ +class Libdiscid < Formula + desc "C library for creating MusicBrainz and freedb disc IDs" + homepage "https://musicbrainz.org/doc/libdiscid" + url "https://ftp.musicbrainz.org/pub/musicbrainz/libdiscid/libdiscid-0.6.4.tar.gz" + sha256 "dd5e8f1c9aead442e23b749a9cc9336372e62e88ad7079a2b62895b0390cb282" + license "LGPL-2.1-or-later" + + livecheck do + url "https://ftp.musicbrainz.org/pub/musicbrainz/libdiscid/" + regex(/href=.*?libdiscid[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "d75c302e47eb78bf4d56bc4e0cde309a944890f1d046b7078a2be9ea6c4f7f10" + sha256 cellar: :any, arm64_sonoma: "906bf782b5afdaa39be07081bfcf814c58987cd261b18689bb945dcd0bcc30b8" + sha256 cellar: :any, arm64_ventura: "ab8bab81ac4ed46d45902acfea78260d20e2ce0616d6073ebc8025ff6fa7979b" + sha256 cellar: :any, arm64_monterey: "896b72d31f4c99fa8e1064807501c1588002c2d1d651cf3179ee5052504dea7f" + sha256 cellar: :any, arm64_big_sur: "65809091e9b8c9e8fdbc3e68995a7d93e4d367d798e19bd48a6f8a87c87fce0b" + sha256 cellar: :any, sonoma: "48c1bfeb601d5d5a85af2ebea67e247d0a92db023268de10ee8b1e4622a2629a" + sha256 cellar: :any, ventura: "88e97449648d49fafdff023e74d9841090c8194f7d1a311eb1c16920dfa7221c" + sha256 cellar: :any, monterey: "b2d8bb666d78a7c0a3b3d32fbdc86524cee0d0f080f138de868d31979aca627b" + sha256 cellar: :any, big_sur: "c4d364091f700f65e2fd53f70b23f243cab80cf991d0e7febbd78b0dfb029e9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "230baa95caab005a124e4a4a3031f625417b141c357acb80916ae10f08926528" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0408adf6b787c2260b62aa1235ec0b42d8ee8a8892a035fd56e1392cebe41303" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end +end diff --git a/Formula/lib/libdivecomputer.rb b/Formula/lib/libdivecomputer.rb new file mode 100644 index 0000000000000..e5f4469ec2c50 --- /dev/null +++ b/Formula/lib/libdivecomputer.rb @@ -0,0 +1,65 @@ +class Libdivecomputer < Formula + desc "Library for communication with various dive computers" + homepage "https://www.libdivecomputer.org/" + url "https://www.libdivecomputer.org/releases/libdivecomputer-0.8.0.tar.gz" + sha256 "275ecce7923644ed581faab9dcb4f1a69ad251bceb0721c4e5f85fb631617a0e" + license "LGPL-2.1-or-later" + head "https://github.com/libdivecomputer/libdivecomputer.git", branch: "master" + + livecheck do + url "https://www.libdivecomputer.org/releases/" + regex(/href=.*?libdivecomputer[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2d1fcffb41e208dda7721558578c6c6f212d758b9782449ce1f800d89e05c1cb" + sha256 cellar: :any, arm64_sonoma: "8dd4c53baa97fba521444635e28477af5651cb22ab242ce6a6cb3725175b7056" + sha256 cellar: :any, arm64_ventura: "94af44c0b407fae8f45e0d5f5fb86fe92f5464efe57d316eb71526aa68eac264" + sha256 cellar: :any, arm64_monterey: "84b1aab56409e9842deab38dab5dc8a9f7ddd1c7f0ea5ad68b9bcd31733645fb" + sha256 cellar: :any, arm64_big_sur: "dadcbc9e4225a70a0a508f68d69dd033cd4c146eed0a8b35c9ab4f6883111683" + sha256 cellar: :any, sonoma: "1e6e3c6a14b6a9bdfa7cd4c28b37926409820fb356db44e697f4cb57fcd4273b" + sha256 cellar: :any, ventura: "5a831d39e6851ac0f0aa879321f2da7734f40b6f0b66f9824c59766547ed4857" + sha256 cellar: :any, monterey: "03dd6bece702dbd9128822bc7e58bffaa7ddbab2e1c154416c8843068ddc9512" + sha256 cellar: :any, big_sur: "0daa371bb5f9f96bd3c2c02f02181f77004e5326d4975e04fd441d01593c6f20" + sha256 cellar: :any_skip_relocation, arm64_linux: "333344a78a1b09b9c81e369dead55c584f39ec02c7f24d31c7993f0c81a5c78d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a564c1072cacd56aacdeddb41032cce203e2d59cf375448e160007c619204245" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + int main(int argc, char *argv[]) { + dc_iterator_t *iterator; + dc_descriptor_t *descriptor; + dc_descriptor_iterator(&iterator); + while (dc_iterator_next(iterator, &descriptor) == DC_STATUS_SUCCESS) + { + dc_descriptor_free(descriptor); + } + dc_iterator_free(iterator); + return 0; + } + C + flags = %W[ + -I#{include} + -L#{lib} + -ldivecomputer + ] + system ENV.cc, "-v", "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libdivide.rb b/Formula/lib/libdivide.rb new file mode 100644 index 0000000000000..a3f8aa7441edc --- /dev/null +++ b/Formula/lib/libdivide.rb @@ -0,0 +1,56 @@ +class Libdivide < Formula + desc "Optimized integer division" + homepage "https://libdivide.com/" + url "https://github.com/ridiculousfish/libdivide/archive/refs/tags/v5.2.0.tar.gz" + sha256 "73ae910c4cdbda823b7df2c1e0e1e7427464ebc43fc770b1a30bb598cb703f49" + license any_of: ["Zlib", "BSL-1.0"] + head "https://github.com/ridiculousfish/libdivide.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1bcba36eed605054470693093dd47baf69817c8aaa85d9a046e5f665e124fce8" + end + + depends_on "cmake" => :build + + # include sanitisers for release build, upstream pr ref, https://github.com/ridiculousfish/libdivide/pull/129 + patch do + url "https://github.com/ridiculousfish/libdivide/commit/41c04ea14b9c661e891ef35b122c5cce74837c8a.patch?full_index=1" + sha256 "e431c9dd5163d1636dc53e689b33d27f38f9dce674532f8e1df1ff90ae112efc" + end + + def install + # Skip `cmake --build`, as this is only for building tests. + system "cmake", "-S", ".", "-B", "build", "-DLIBDIVIDE_BUILD_TESTS=OFF", *std_cmake_args + system "cmake", "--install", "build" + end + + test do + (testpath/"libdivide-test.c").write <<~C + #include "libdivide.h" + #include + + int sum_of_quotients(const int *numers, size_t count, int d) { + int result = 0; + struct libdivide_s32_t fast_d = libdivide_s32_gen(d); + for (size_t i = 0; i < count; i++) + result += libdivide_s32_do(numers[i], &fast_d); + return result; + } + + int main(void) { + const int numers[] = {2, 4, 6, 8, 10}; + size_t count = sizeof(numers) / sizeof(int); + int d = 2; + int result = sum_of_quotients(numers, count, d); + assert(result == 15); + return 0; + } + C + + macro_suffix = Hardware::CPU.arm? ? "NEON" : "SSE2" + ENV.append_to_cflags "-I#{include} -DLIBDIVIDE_#{macro_suffix}" + + system "make", "libdivide-test" + system "./libdivide-test" + end +end diff --git a/Formula/lib/libdivsufsort.rb b/Formula/lib/libdivsufsort.rb new file mode 100644 index 0000000000000..cf329301765b4 --- /dev/null +++ b/Formula/lib/libdivsufsort.rb @@ -0,0 +1,83 @@ +class Libdivsufsort < Formula + desc "Lightweight suffix-sorting library" + homepage "https://github.com/y-256/libdivsufsort" + url "https://github.com/y-256/libdivsufsort/archive/refs/tags/2.0.1.tar.gz" + sha256 "9164cb6044dcb6e430555721e3318d5a8f38871c2da9fd9256665746a69351e0" + license "MIT" + head "https://github.com/y-256/libdivsufsort.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e8710aed1b1bedf305651973aefa5b7b1323fb3e4fd636865974d06661c83977" + sha256 cellar: :any, arm64_sonoma: "2145e6e2de3065a7942885e0bcdb17384c0e4c52e7c946cf71df4c65f6591d04" + sha256 cellar: :any, arm64_ventura: "edc1f4556c1ca60d17bb8978df3f6e39ed61b3e0e00ba71a7361d8ca3325122d" + sha256 cellar: :any, arm64_monterey: "b0e87c7f348bc9fabdcc4f5075459e6431159a820fc073925c5bc3cfd0fd93c3" + sha256 cellar: :any, arm64_big_sur: "5cb97264be66ff96dcb36dc4c243e11e0ea33ee58e4c8fa1c826c98ef11fc776" + sha256 cellar: :any, sonoma: "8e606142a047b8801fb49e7880be49a47f7638ff6a2b57ced99166a39c3ff309" + sha256 cellar: :any, ventura: "533545e33e84e9bd49a354154c4371f4c299da6f66c674fc72ce2ae77479f091" + sha256 cellar: :any, monterey: "61dfa387e2bf7536cd1e0296d54664f08e5414074166c884ab8ff8bffe7d7705" + sha256 cellar: :any, big_sur: "93a32e9897b4b9c35fa13d5d6e87ed28d1d6ba62ded97a7e31e98c62eaab1b1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "58c77deac3c2e8838698dccf6f116d21b32542b1768cabdc7fb412d330b9710e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8dd08aad6b719e629af05911116cadfa9436beb1e0231280cfd2ad9d11ff8cc4" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DBUILD_EXAMPLES=OFF + -DBUILD_DIVSUFSORT64=ON + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + expected_output = <<~EOS + SA[ 0] = 10: a$ + SA[ 1] = 7: abra$ + SA[ 2] = 0: abracadabra$ + SA[ 3] = 3: acadabra$ + SA[ 4] = 5: adabra$ + SA[ 5] = 8: bra$ + SA[ 6] = 1: bracadabra$ + SA[ 7] = 4: cadabra$ + SA[ 8] = 6: dabra$ + SA[ 9] = 9: ra$ + SA[10] = 2: racadabra$ + EOS + + ["", "64"].each do |suffix| + (testpath/"test#{suffix}.c").write <<~C + #include + #include + #include + #include + #include + + int main() { + char *Text = "abracadabra"; + int n = strlen(Text); + int i, j; + + saidx#{suffix}_t *SA = (saidx#{suffix}_t *) malloc(n * sizeof(saidx#{suffix}_t)); + divsufsort#{suffix}((unsigned char *) Text, SA, n); + for (i = 0; i < n; ++i) { + printf("SA[%2d] = %2" #{(suffix == "64") ? "PRId64" : "PRId32"} ": ", i, SA[i]); + for(j = SA[i]; j < n; ++j) { + printf("%c", Text[j]); + } + printf("$\\n"); + } + + free(SA); + return 0; + } + C + + system ENV.cc, "test#{suffix}.c", "-I#{include}", "-L#{lib}", "-ldivsufsort#{suffix}", "-o", "test#{suffix}" + assert_equal expected_output, shell_output(testpath/"test#{suffix}") + end + end +end diff --git a/Formula/lib/libdmtx.rb b/Formula/lib/libdmtx.rb new file mode 100644 index 0000000000000..25c8b7730e160 --- /dev/null +++ b/Formula/lib/libdmtx.rb @@ -0,0 +1,28 @@ +class Libdmtx < Formula + desc "Data Matrix library" + homepage "https://libdmtx.sourceforge.net/" + url "https://github.com/dmtx/libdmtx/archive/refs/tags/v0.7.8.tar.gz" + sha256 "2394bf1d1d693a5a4ca3cfcc1bb28a4d878bdb831ea9ca8f3d5c995d274bdc39" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "df99e1993d7ed98ff3d11e02eea48940d0eaf29c81f74c45a381832c7e714de0" + sha256 cellar: :any, arm64_sonoma: "172a87d5ad2bb9e501480bdbb7af5542079729747cd71d2086a8d5025a56e082" + sha256 cellar: :any, arm64_ventura: "b503e7c2c698a420f523d34104850f33ab1f36ddb2f47cc474801ded26bb6d96" + sha256 cellar: :any, sonoma: "44c8a0c8b7ea70f42368c2633bd4569072dc724f7e38c21cd16ed567a510ce55" + sha256 cellar: :any, ventura: "e19afbbbf3e0eaed8f35a854f465611e53fcf2865164776a8e7302c9e55a6a7c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a368525adad2afbfc932f8d332f840b7bd5bafde75da5b8639974236123d73e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db8cf01939d9ca1f8c7e6fd7fc6f9c3f243a20893052dbe4e8861eb2b67a7ce0" + 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" + system "make", "install" + end +end diff --git a/Formula/lib/libdmx.rb b/Formula/lib/libdmx.rb new file mode 100644 index 0000000000000..900ee11178e42 --- /dev/null +++ b/Formula/lib/libdmx.rb @@ -0,0 +1,52 @@ +class Libdmx < Formula + desc "X.Org: X Window System DMX (Distributed Multihead X) extension library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libdmx-1.1.5.tar.xz" + sha256 "35a4e26a8b0b2b4fe36441dca463645c3fa52d282ac3520501a38ea942cbf74f" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e5034cca46b4ff523130888f6d8bf0d75937e0f1b490a0cf0c0c175f32d8be2d" + sha256 cellar: :any, arm64_sonoma: "f9beee8dec503a6ecc7479eaec0f9f567d03d38076e4b0237e75969155df0006" + sha256 cellar: :any, arm64_ventura: "bd69993016d92420d1f32df152e891cadf75c3693e2d4d6573e4f651ca6dab10" + sha256 cellar: :any, arm64_monterey: "62fcb302aec2c914524a9d00e43ccc8846f259b4a018fde0d8ef95fc32941058" + sha256 cellar: :any, arm64_big_sur: "e824b4f937e2c9a730247a738046126f1c8e8b51dac6e51cccee49bdf9f5e4e4" + sha256 cellar: :any, sonoma: "83ed6adf20c3aab46389e50e31f5dbe2927b0407f39023309f0e5097eeb93281" + sha256 cellar: :any, ventura: "b8a120ca8adc82fa6710b97eafb56d98d33dca6d74a08945dbabe23f16d52b5f" + sha256 cellar: :any, monterey: "93a1a47cac82b6c89aca67977bd4cad5ee431645f21a95a5cf887bae551e93ee" + sha256 cellar: :any, big_sur: "a64715d90ff7d190ce1e5dd29620c267363349bb46f5fc6749faaee4c950b628" + sha256 cellar: :any_skip_relocation, arm64_linux: "65707936ba8f81c9f0a9fc9666f9d1783dd658353e30fe98c263a30705757fd4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0296a0ca6fde5ca5ba12b45505db769743916188a47d0b876049488f31185833" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/extensions/dmxext.h" + + int main(int argc, char* argv[]) { + DMXScreenAttributes attributes; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libdnet.rb b/Formula/lib/libdnet.rb new file mode 100644 index 0000000000000..d4647d2c5fa1e --- /dev/null +++ b/Formula/lib/libdnet.rb @@ -0,0 +1,42 @@ +class Libdnet < Formula + desc "Portable low-level networking library" + homepage "https://github.com/ofalk/libdnet" + url "https://github.com/ofalk/libdnet/archive/refs/tags/libdnet-1.18.0.tar.gz" + sha256 "a4a82275c7d83b85b1daac6ebac9461352731922161f1dcdcccd46c318f583c9" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/^libdnet[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e135b6343bf2e3a75c50e48663806ac62e315fd4cb8502e5e277bbf9b6e9f31a" + sha256 cellar: :any, arm64_sonoma: "d35b638124bc8708333c6d2db7958d11a29cdb4da95492586ce24b387b8d0e9b" + sha256 cellar: :any, arm64_ventura: "e00bca472fb8213147b83b87fd4df39acd20a50c0d35814f1d8ae1b50b0070d2" + sha256 cellar: :any, arm64_monterey: "8ffb26e94d885f4091d9c3b93628e21dc795a12e53069b880cb69e93b0f2e47d" + sha256 cellar: :any, sonoma: "92dfd382f45ba91995439a36df8289d9e16e7c27b1557be332c5eaf7b1626fbe" + sha256 cellar: :any, ventura: "110beea72752872b45e6533cb1ecb27cadf330f1912de6e42fd65d8a45afb584" + sha256 cellar: :any, monterey: "339dc34fbcb96bfcad077e02d7ee58b3c3ace1281688338d1b728705b4523bb9" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3388d28e073fe0bf7484176c63fb93b845b0afc4966ac2e63844fe9fc2dc6dd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cde1b26c6ac0ae9caf126bc85ece887d50cfd7e9aa32c6a734b56da7dafa720b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + def install + # autoreconf to get '.dylib' extension on shared lib + ENV.append_path "ACLOCAL_PATH", "config" + system "autoreconf", "--force", "--install", "--verbose" + + system "./configure", "--mandir=#{man}", "--disable-check", *std_configure_args + system "make", "install" + end + + test do + system bin/"dnet-config", "--version" + end +end diff --git a/Formula/lib/libdom.rb b/Formula/lib/libdom.rb new file mode 100644 index 0000000000000..a9f7e4c83f0c8 --- /dev/null +++ b/Formula/lib/libdom.rb @@ -0,0 +1,57 @@ +class Libdom < Formula + desc "Implementation of the W3C DOM" + homepage "https://www.netsurf-browser.org/projects/libdom/" + url "https://download.netsurf-browser.org/libs/releases/libdom-0.4.2-src.tar.gz" + sha256 "d05e45af16547014c2b0a3aecf3670fa13d419f505b3f5fc7ac8a1491fc30f3c" + license "MIT" + + livecheck do + url "https://download.netsurf-browser.org/libs/releases/" + regex(/href=.*?libdom[._-]v?(\d+(?:\.\d+)+)[._-]src\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5305da928bb33e1c7fe5b85b44e644d17237c0e368fcc0bf159d82dd42626485" + sha256 cellar: :any, arm64_sonoma: "496e88188a61218223af1157766d192764aeb9c36ef5bfb2e057fc403e7d2793" + sha256 cellar: :any, arm64_ventura: "67205b439af8580d452d27c87f291f8345d3deb3c194505527fdd426bd75d0db" + sha256 cellar: :any, sonoma: "d71ecaff24c596ef7f918e9f025e95f969d4f4368823106bdb7ab99d7f31ce64" + sha256 cellar: :any, ventura: "e55aa034a7edd4f1d7aab94e7e1e4eb21bad5c9816aea969c6ddc561fbc1b60f" + sha256 cellar: :any_skip_relocation, arm64_linux: "677af5b19154760fd5048c6acecffdfe1596c60ea79520f9e3e9412f1870af55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65f04a61a7747e494540603b837878cb887eda1c01e2d744caa9a19a30213204" + end + + depends_on "netsurf-buildsystem" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "libhubbub" + depends_on "libparserutils" + depends_on "libwapcaplet" + + uses_from_macos "expat" + + def install + args = %W[ + NSSHARED=#{Formula["netsurf-buildsystem"].opt_pkgshare} + PREFIX=#{prefix} + ] + + system "make", "install", "COMPONENT_TYPE=lib-shared", *args + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + const uint8_t *data = (const uint8_t *)"test"; + dom_string *str; + dom_exception ex = dom_string_create(data, 4, &str); + return ex == DOM_NO_ERR ? 0 : 1; + } + C + + flags = shell_output("pkgconf --cflags --libs libdom").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libdpp.rb b/Formula/lib/libdpp.rb new file mode 100644 index 0000000000000..585496b7ab61a --- /dev/null +++ b/Formula/lib/libdpp.rb @@ -0,0 +1,73 @@ +class Libdpp < Formula + desc "C++ Discord API Bot Library" + homepage "https://github.com/brainboxdotcc/DPP" + url "https://github.com/brainboxdotcc/DPP/releases/download/v10.1.2/DPP-10.1.2.tar.gz" + sha256 "587ef044775e6bdd560ec17afc302c1048ebb3454455116d7241431fbb16a823" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bd5ca9c17dac9e5569aa51cf3dce3c6f4a3796c131474c6e99732d9c4834ce08" + sha256 cellar: :any, arm64_sonoma: "c8ea3bc7e0797ef5c9b7d9d4c5cb2bb3772d79eb8b6ce807d3ee02d0be9cfeeb" + sha256 cellar: :any, arm64_ventura: "f622d491be1b229606a29223fccb0f1a118ea0593b7074afc23e92ccfa806f9b" + sha256 cellar: :any, sonoma: "920148455d24bf5e5e9f74855ae96aaf513f63516b253a6351844014265034d7" + sha256 cellar: :any, ventura: "2da37488f353e467fc7004b609e06afe24d039fea1e48e1f9c31e54aa3bba5ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8e511ba2aa3be34220a05f641bf48aece828c0ac8d7b518b27083b1b713639b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "505666b971cc6cb3928342b78b0290f5f046374385ff69a16e3e228314300cb3" + end + + depends_on "cmake" => :build + depends_on "nlohmann-json" => :build + depends_on "openssl@3" + depends_on "opus" + depends_on "pkgconf" + + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DDPP_BUILD_TEST=OFF", + "-DDPP_NO_CONAN=ON", + "-DDPP_NO_VCPKG=ON", + "-DDPP_USE_EXTERNAL_JSON=ON", + "-DRUN_LDCONFIG=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include // for alarm + + void timeout_handler(int signum) { + std::cerr << "Connection error: timed out" << std::endl; + exit(1); + } + + int main() { + std::signal(SIGALRM, timeout_handler); + alarm(2); + + dpp::cluster bot("invalid_token"); + + bot.on_log(dpp::utility::cout_logger()); + + try { + bot.start(dpp::st_wait); + } + catch (const dpp::connection_exception &e) { + std::cout << "Connection error: " << e.what() << std::endl; + return 1; + } + catch (const dpp::invalid_token_exception &e) { + std::cout << "Invalid token." << std::endl; + return 1; + } + return 0; + } + CPP + system ENV.cxx, "-std=c++20", "-L#{lib}", "-I#{include}", "test.cpp", "-o", "test", "-ldpp" + assert_match "Connection error", shell_output("./test 2>&1", 1) + end +end diff --git a/Formula/lib/libdrawtext.rb b/Formula/lib/libdrawtext.rb new file mode 100644 index 0000000000000..6f71adfbd7993 --- /dev/null +++ b/Formula/lib/libdrawtext.rb @@ -0,0 +1,57 @@ +class Libdrawtext < Formula + desc "Library for anti-aliased text rendering in OpenGL" + homepage "http://nuclear.mutantstargoat.com/sw/libdrawtext/" + url "https://github.com/jtsiomb/libdrawtext/archive/refs/tags/v0.6.tar.gz" + sha256 "714d94473622d756bfe7d70ad6340db3de7cc48f4f356a060e3cb48900c6da01" + license "LGPL-3.0-or-later" + head "https://github.com/jtsiomb/libdrawtext.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4aead494f4798e4f16eaec6f6c8c251c8de2604995969537295e9d4d0447f2a3" + sha256 cellar: :any, arm64_sonoma: "8a58fb6c5c3b800f97788698dde639a9fd99cf3beb4bd8bb56f781ca816ab5cd" + sha256 cellar: :any, arm64_ventura: "4b01f03d8831ce1af64b7ee299948ebcbc719f07482925519a6ee53ce283ff9e" + sha256 cellar: :any, arm64_monterey: "ab6261d82ad121caeeb5945709def507dcef52d04afd1162f1473e973bc97a90" + sha256 cellar: :any, arm64_big_sur: "c61a83f7c2be18d086863edd67880e588dd16fee1154367aa25eb4c0537f14f5" + sha256 cellar: :any, sonoma: "4262d5949883ebe79316117398c332490f435c4da74a8ccaf195a6d0479ce4f8" + sha256 cellar: :any, ventura: "74941e09f6cb06ab0fa44b92cd40e37e340d51f8781c61ed8f7d086093d470ce" + sha256 cellar: :any, monterey: "6588852f6f1c6fb9585c4c0cb16d9fe2d503fd68c94d08f982a7de5d0af87adf" + sha256 cellar: :any, big_sur: "2f01264e3b9729a123e24c71078c5b7b5c2189c2a2ed2a8481763080ed213ce1" + sha256 cellar: :any_skip_relocation, arm64_linux: "e4c5a798ccb89fb7d2872b427347e85d6d7239bd2c3a46563dab045fa7c63b10" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1a5d0e7c72c57d294d27e5f80dfd4371c7b3d37be3645f77103b7233025d366e" + end + + depends_on "pkgconf" => :build + depends_on "freetype" + + on_linux do + depends_on "mesa" + depends_on "mesa-glu" + end + + def install + system "./configure", "--disable-dbg", "--enable-opt", "--prefix=#{prefix}" + + # Avoid errors with Xcode 15 + inreplace "Makefile", "CFLAGS =", "CFLAGS = -Wno-implicit-function-declaration" + + system "make", "install" + system "make", "-C", "tools/font2glyphmap" + system "make", "-C", "tools/font2glyphmap", "PREFIX=#{prefix}", "install" + pkgshare.install "examples" + end + + test do + ext = "ttf" + font_name = "DejaVuSans" + font_path = "/usr/share/fonts/truetype/dejavu" + if OS.mac? + ext = "otf" if MacOS.version >= :high_sierra + font_name = "LastResort" + font_path = "/System/Library/Fonts" + end + + cp "#{font_path}/#{font_name}.#{ext}", testpath + system bin/"font2glyphmap", "#{font_name}.#{ext}" + assert_match(/P5\n512 (256|512)\n# size: 12/, shell_output("head -3 #{font_name}_s12.glyphmap")) + end +end diff --git a/Formula/lib/libdrm.rb b/Formula/lib/libdrm.rb new file mode 100644 index 0000000000000..1b40348bbc114 --- /dev/null +++ b/Formula/lib/libdrm.rb @@ -0,0 +1,41 @@ +class Libdrm < Formula + desc "Library for accessing the direct rendering manager" + homepage "https://dri.freedesktop.org/" + url "https://dri.freedesktop.org/libdrm/libdrm-2.4.124.tar.xz" + sha256 "ac36293f61ca4aafaf4b16a2a7afff312aa4f5c37c9fbd797de9e3c0863ca379" + license "MIT" + + livecheck do + url "https://dri.freedesktop.org/libdrm/" + regex(/href=.*?libdrm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_linux: "7e34283152be0c624b5deeff223055257a46661a42c48e66937d6016ad494f00" + sha256 x86_64_linux: "86ba0f90e6e249493c742a624ddc849a75dce477bb7a065fafb814279b2e400f" + end + + depends_on "docutils" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libpciaccess" + depends_on :linux + + def install + system "meson", "setup", "build", "-Dcairo-tests=disabled", "-Dvalgrind=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(int argc, char* argv[]) { + struct drm_gem_open open; + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-ldrm" + end +end diff --git a/Formula/lib/libdshconfig.rb b/Formula/lib/libdshconfig.rb new file mode 100644 index 0000000000000..bca6ea4fc23d9 --- /dev/null +++ b/Formula/lib/libdshconfig.rb @@ -0,0 +1,59 @@ +class Libdshconfig < Formula + desc "Distributed shell library" + homepage "https://www.netfort.gr.jp/~dancer/software/dsh.html.en" + url "https://www.netfort.gr.jp/~dancer/software/downloads/libdshconfig-0.20.13.tar.gz" + sha256 "6f372686c5d8d721820995d2b60d2fda33fdb17cdddee9fce34795e7e98c5384" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.netfort.gr.jp/~dancer/software/downloads/" + regex(/href=.*?libdshconfig[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "97fa8df11dd460eff2f15e043cd7529eae0fbbedb5f06419c1f05471381505eb" + sha256 cellar: :any, arm64_sonoma: "325b76dfad5d946aed984169514de5a4655307eab66db17e8b7109ef8759d87a" + sha256 cellar: :any, arm64_ventura: "3717933f302d4d371720ea523b77f0fccc3886c9f64e58b085fa8129b70eb2c2" + sha256 cellar: :any, arm64_monterey: "d8ed328326850b16d0398cac9f951616fda597d084ded2363350a998d7105bfd" + sha256 cellar: :any, arm64_big_sur: "7c8ce322c8a67038c0d2eea98640665aad9a4f17dced7d796ac55e271936918a" + sha256 cellar: :any, sonoma: "7ba35555d2fccf06c7de51ae24455cbd3492cdb8f862aab21a12ac76095d7fb6" + sha256 cellar: :any, ventura: "bb3431f4d4aa5994f967ddfb94f567b46d5c5cef1a21ebd22731c6af71dc3f76" + sha256 cellar: :any, monterey: "80190054e7c4562cf68c8e13c09209a3667e06aca3af0e3b51d83adefc519d2d" + sha256 cellar: :any, big_sur: "aa368b8f973143fb64cb762956449fc29d978517519bc12c219351adaf0b9346" + sha256 cellar: :any, catalina: "eb5fb662035498062529345467af13234be5d022ccec9d2b3e2ad3437ff96e04" + sha256 cellar: :any, mojave: "7e2632a44dad0f9eedc38577c8dcb8c11856e036f05ba444a814f8bd93dd47ea" + sha256 cellar: :any, high_sierra: "2000ae2106bb3b10a77b91b75a40dbb6ec60a8aad8de220aa2af69e1a41b905f" + sha256 cellar: :any, sierra: "82fc9db7c3ad20bdcd5681be1075ae4853b6f19caeb41624dac33d53470b2523" + sha256 cellar: :any, el_capitan: "a26ea1d1cefed24fd890bbc65f9a11d171cdbcb1c00936562255e2adfe29205f" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d07f65b30564eeab22a2f2e50f02fe6983ea927e381b1c1c398b044f456cb2a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ad27e681ca7e49ff1b99f92fe3a62ecd6edd34bfb3fbc0f4f8cbc9ad386cc86" + end + + 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 + + test do + (testpath/"test.c").write <<~C + #include + int main(void) { + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-ldshconfig", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libdsk.rb b/Formula/lib/libdsk.rb new file mode 100644 index 0000000000000..e076affd0e472 --- /dev/null +++ b/Formula/lib/libdsk.rb @@ -0,0 +1,64 @@ +class Libdsk < Formula + desc "Library for accessing discs and disc image files" + homepage "https://www.seasip.info/Unix/LibDsk/" + url "https://www.seasip.info/Unix/LibDsk/libdsk-1.4.2.tar.gz" + sha256 "71eda9d0e33ab580cea1bb507467877d33d887cea6ec042b8d969004db89901a" + license "LGPL-2.0-or-later" + + livecheck do + url :homepage + regex(/Stable version.*?href=.*?libdsk[._-]v?(\d+(?:\.\d+)+)\.t/im) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9dd9b752081e886227ddc89dd8b9aa574124f29ab76bca622bdd235294744c8a" + sha256 cellar: :any, arm64_sonoma: "62fd1abb55819c5aa90237ab176a63bd793bb3e9dccfa0fa3330f54af7143936" + sha256 cellar: :any, arm64_ventura: "0d6d4b1f77fe027a7053571ac8b9f8bfa73cee2b52a7a570bb32946cd8aa9378" + sha256 cellar: :any, arm64_monterey: "dfa9c65fe5cf50e095ed995a55c6145b3eb6702ce4a76a7e54369fff2da6ab97" + sha256 arm64_big_sur: "2804cbad27cb5d942cac8be6682bc7da39f7a4c122b6f79d1e3ee58aaaea0a0b" + sha256 cellar: :any, sonoma: "f7c4ba9cdda25aad01ed0fc3831154673f3200cc2120613b3cc51ae313e4fa8f" + sha256 cellar: :any, ventura: "b78356c6b3bd08315fc58341697e69b71f2954c05155af065e39661be175482d" + sha256 cellar: :any, monterey: "3b7bf97955aa16d16ba35554bc7a171785ad16ab692c977f2ed690298866d686" + sha256 big_sur: "19a28a828ba163c5bbb988cfc22e5c0a4d7a7c1f6e9cd479323c345e2175c017" + sha256 catalina: "f444a8f81a4767668f4cbffa2ef09268279d23780e92b7d4bc2d6ed44c9cd675" + sha256 mojave: "47485db7001965531b700308a3d464a616703ddd8fdca64c8a7d2b5049481eb5" + sha256 high_sierra: "b4fa361c1800fd348c804873fd03f8663f7324eed228c3ba2e2d809a58fbbb97" + sha256 sierra: "d46bdf8e9c779b22a2a21c123572c08130aa36b8a817365ee3bd76219478aad3" + sha256 el_capitan: "b14fb001603c2ba33a26c0f49c7b008659ca5aa05ffaa01ab8147bac4da40d46" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd9848abd2782502fe79e8883abba6777d83f663d895b347e9c5e8faf5d98019" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ca3fd61e03994cc50d7f47ebf27c2ca54b24be84292baee91664ea6d864ab33" + end + + uses_from_macos "zlib" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + # Avoid lyx dependency + inreplace "Makefile.in", "SUBDIRS = . include lib tools man doc", + "SUBDIRS = . include lib tools man" + + 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? + # Workaround for undefined reference to `major'. Remove in the next release + ENV.append "CFLAGS", "-include sys/sysmacros.h" + odie "Remove sys/sysmacros.h workaround!" if version >= "1.5" + end + + system "./configure", *args, *std_configure_args + system "make" + system "make", "check" + system "make", "install" + doc.install Dir["doc/*.{html,pdf,sample,txt}"] + end + + test do + assert_equal "#{name} version #{version}\n", shell_output(bin/"dskutil --version") + end +end diff --git a/Formula/lib/libdv.rb b/Formula/lib/libdv.rb new file mode 100644 index 0000000000000..89bf72c847f5c --- /dev/null +++ b/Formula/lib/libdv.rb @@ -0,0 +1,82 @@ +class Libdv < Formula + desc "Codec for DV video encoding format" + homepage "https://libdv.sourceforge.net/" + url "https://downloads.sourceforge.net/project/libdv/libdv/1.0.0/libdv-1.0.0.tar.gz" + sha256 "a305734033a9c25541a59e8dd1c254409953269ea7c710c39e540bd8853389ba" + license "LGPL-2.1-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "d9ec199c7cbb78a2e15ba681e90f94cb34e7c4e4d4856ebe85553661847a4f3b" + sha256 cellar: :any, arm64_sonoma: "b3e7be7a0887586ce1373382cdd83d7537b273fc622cf606ea3e1d425461b594" + sha256 cellar: :any, arm64_ventura: "e7c73ec9982ec05267073663395ff00a2a5eb7927a0df172441890d402e11077" + sha256 cellar: :any, arm64_monterey: "58a4f24c622c38ba33f3c2972dff249e77b891d68e06553a99a71dc42801f08e" + sha256 cellar: :any, arm64_big_sur: "a72d9919c11d6950fcd115e6fa0e6cbac86ec6f06d8ade46b642006f652bf53f" + sha256 cellar: :any, sonoma: "d67945be1d2aba728715b9f67f68bd91fab88599bb351a179bfa89829bb5ac19" + sha256 cellar: :any, ventura: "e9109a663d65ae5085c53d011421cc9cb09821fd42b8002c0d2d241db7ebc180" + sha256 cellar: :any, monterey: "95529c6172e3054e8cf7057d6a0da13d20a8f368a4828a4103f5b1f37136b340" + sha256 cellar: :any, big_sur: "81db616fc05c65d944af1a500e9d647764e361419040b0007d9efc85ebfe3d31" + sha256 cellar: :any, catalina: "ee4a56e9a1462b87632dca0048808d4918b5a72fd943cce8ee600d138c9f67f6" + sha256 cellar: :any, mojave: "ec2564e27b321ebb35a3278d6e7411d17d1b1acad5dbcd40106cbcaf24205b53" + sha256 cellar: :any, high_sierra: "0f7c7db1baa95682ad66b9d628d51978f162558f6d8296715a38150f83a7c72f" + sha256 cellar: :any, sierra: "9ea1a006d7aa954c5a1d61497f9f7f43e0b1bd5bce911b6d334a693d8af58671" + sha256 cellar: :any, el_capitan: "0624e82748111d0a8a050a802ec4251c443127c39c93b3b2469a00816a602040" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7be333d02ace53395d0dcaad23163a9bf3a159aa05cc71a7202ee8eb917adf3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4e579189286f35409557243fe450e7509536f831777f37ae2f7519913bddcf8" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "popt" + + # remove SDL1 dependency by force + patch :DATA + + def install + # This fixes an undefined symbol error on compile. + # See the port file for libdv: + # https://trac.macports.org/browser/trunk/dports/multimedia/libdv/Portfile + # This flag is the preferred method over what macports uses. + # See the apple docs: https://cl.ly/2HeF bottom of the "Finding Imported Symbols" section + ENV.append "LDFLAGS", "-undefined dynamic_lookup" if OS.mac? + + system "autoreconf", "--force", "--install", "--verbose" + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--disable-asm", + "--disable-gtktest", + "--disable-gtk", + "--disable-sdltest", + *std_configure_args + system "make", "install" + end + + test do + system bin/"dubdv", "--version" + system bin/"dvconnect", "--version" + end +end + +__END__ +diff --git a/configure.ac b/configure.ac +index 2b95735..1ba9370 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -173,13 +173,6 @@ dnl used in Makefile.am + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + +-if $use_sdl; then +- AM_PATH_SDL(1.1.6, +- [ +- AC_DEFINE(HAVE_SDL) +- ]) +-fi +- + if [ $use_gtk && $use_xv ]; then + AC_CHECK_LIB(Xv, XvQueryAdaptors, + [AC_DEFINE(HAVE_LIBXV) diff --git a/Formula/lib/libdvbcsa.rb b/Formula/lib/libdvbcsa.rb new file mode 100644 index 0000000000000..496f143ce9501 --- /dev/null +++ b/Formula/lib/libdvbcsa.rb @@ -0,0 +1,54 @@ +class Libdvbcsa < Formula + desc "Free implementation of the DVB Common Scrambling Algorithm" + homepage "https://www.videolan.org/developers/libdvbcsa.html" + url "https://get.videolan.org/libdvbcsa/1.1.0/libdvbcsa-1.1.0.tar.gz" + mirror "https://download.videolan.org/pub/videolan/libdvbcsa/1.1.0/libdvbcsa-1.1.0.tar.gz" + sha256 "4db78af5cdb2641dfb1136fe3531960a477c9e3e3b6ba19a2754d046af3f456d" + license "GPL-2.0-or-later" + head "https://code.videolan.org/videolan/libdvbcsa.git", branch: "master" + + livecheck do + url "https://get.videolan.org/libdvbcsa/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e5119a840b0c4c13677acc889fc03d4c035c47fd74d6e6913a11786d5826192a" + sha256 cellar: :any, arm64_sonoma: "dccd0d514954d35f9965c1bd03bf4e917cf7c33b3b8eee56213c4e71b1a427eb" + sha256 cellar: :any, arm64_ventura: "455b0168a4c59e756200be47603e1090535ab36c9a9550df92b5359375e22e19" + sha256 cellar: :any, arm64_monterey: "880b119027071e1f755479049e7c250ddf240aa7e3b1a70d45dcc5a280e0fd5a" + sha256 cellar: :any, arm64_big_sur: "dfdb5b69befb37656f00769a3d657644f983c27c2b0ab93708c4eabcc48e9288" + sha256 cellar: :any, sonoma: "87eb0ce6fabdb8466725bf37dd270ed2853b1c14186bc4448878eb06367eb9a4" + sha256 cellar: :any, ventura: "6dbe9f5323baa58981e962a837d19357806a3d5ca233f87daf8e606855635146" + sha256 cellar: :any, monterey: "bbda0b438d4a659c99d2f23fd706db9fe72bfacea2394c69e0e8130f43e1d9d7" + sha256 cellar: :any, big_sur: "478a1dc726d6a48236b199e709f95440083afda1e25aee072ab33fac7f783183" + sha256 cellar: :any_skip_relocation, arm64_linux: "0cd1059d9eab19ada7bf0c2035749b39665f32abb2b521ac344e1372f7093548" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0cda58fe30ffc94214d77f45ee2d087a1bf8382c6429ad0bf1dd6503b208e23a" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + + args = std_configure_args + args << "--enable-sse2" if Hardware::CPU.intel? + system "./configure", *args + system "make", "install" + + pkgshare.install "test/testbitslice.c" + end + + test do + # Adjust headers to allow the test to build without the upstream source tree + cp pkgshare/"testbitslice.c", testpath/"test.c" + inreplace "test.c", + "#include \"dvbcsa_pv.h\"", + "#include \n#include \n#include \n" + + system ENV.cc, testpath/"test.c", "-I#{include}", "-L#{lib}", "-ldvbcsa", "-o", "test" + system testpath/"test" + end +end diff --git a/Formula/lib/libdvbpsi.rb b/Formula/lib/libdvbpsi.rb new file mode 100644 index 0000000000000..f5af10f646698 --- /dev/null +++ b/Formula/lib/libdvbpsi.rb @@ -0,0 +1,67 @@ +class Libdvbpsi < Formula + desc "Library to decode/generate MPEG TS and DVB PSI tables" + homepage "https://www.videolan.org/developers/libdvbpsi.html" + url "https://get.videolan.org/libdvbpsi/1.3.3/libdvbpsi-1.3.3.tar.bz2" + mirror "https://download.videolan.org/pub/libdvbpsi/1.3.3/libdvbpsi-1.3.3.tar.bz2" + sha256 "02b5998bcf289cdfbd8757bedd5987e681309b0a25b3ffe6cebae599f7a00112" + license "LGPL-2.1-or-later" + + livecheck do + url "https://download.videolan.org/pub/libdvbpsi/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "cdb91a9f85c8f2f255cc0269d01bff6ccd1952f4895a6d26c6cb26e7e5bcb2f7" + sha256 cellar: :any, arm64_sonoma: "bdd947f3cb943b06739cc4fa888739f746b859fc2036dbbec873eca70f093014" + sha256 cellar: :any, arm64_ventura: "1c472e474f03c56fc1e29442555abd1786e3f8310d12d1fbc64442f166e8541b" + sha256 cellar: :any, arm64_monterey: "1bf8f2771e32e8799e111cf03d52d765d29e38b3494856f65c004166accaa1cf" + sha256 cellar: :any, arm64_big_sur: "d235fec5478322cf04a4ed079073b18ac289548ebd0b31b2aaca8b84fe9987a3" + sha256 cellar: :any, sonoma: "124e4d0858fbb2df20ef1040309365f1f33e62a8f482054353ac2b8c3ebdac8c" + sha256 cellar: :any, ventura: "94c15b82989c45ea689079e7dfe8655953d192cc8ed09dcfe3400f04bc561434" + sha256 cellar: :any, monterey: "c1af0d643851a02a2ed1db53f959abf421321e32ea7f5f74e97edc0ca48db6b6" + sha256 cellar: :any, big_sur: "6897247fd9cfdd4bc5cfd4db8991b7bb5d1647a6f929bab5642c8e673fe1f317" + sha256 cellar: :any_skip_relocation, arm64_linux: "e86a18402d7540269883632b6c94336146664323efc4eead6f15f3e12d013f13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8aff79b57483d77c1d376a230726c33df0e1f322d40b9ab7bba314ae28cfc359" + end + + head do + url "https://code.videolan.org/videolan/libdvbpsi.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + resource "homebrew-sample-ts" do + url "https://filesamples.com/samples/video/ts/sample_640x360.ts" + sha256 "64804df9d209528587e44d6ea49b72f74577fbe64334829de4e22f1f45c5074c" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking", "--enable-release" + system "make", "install" + pkgshare.install "examples/dump_pids.c" + end + + test do + # Adjust headers to allow the test to build without the upstream source tree + cp pkgshare/"dump_pids.c", testpath/"test.c" + inreplace "test.c", + "#include \"config.h\"\n", + "#include \n" + + system ENV.cc, testpath/"test.c", "-I#{include}", "-L#{lib}", "-ldvbpsi", "-o", "test" + + resource("homebrew-sample-ts").stage do + output = shell_output("#{testpath}/test sample_640x360.ts") + + assert_equal 3440, output.lines.length + output.lines.each do |line| + assert_match(/^packet \d+, pid \d+ \(0x\d+\), cc \d+$/, line) + end + end + end +end diff --git a/Formula/lib/libdvdcss.rb b/Formula/lib/libdvdcss.rb new file mode 100644 index 0000000000000..80ba0c09649d5 --- /dev/null +++ b/Formula/lib/libdvdcss.rb @@ -0,0 +1,41 @@ +class Libdvdcss < Formula + desc "Access DVDs as block devices without the decryption" + homepage "https://www.videolan.org/developers/libdvdcss.html" + url "https://download.videolan.org/pub/videolan/libdvdcss/1.4.3/libdvdcss-1.4.3.tar.bz2" + sha256 "233cc92f5dc01c5d3a96f5b3582be7d5cee5a35a52d3a08158745d3d86070079" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.videolan.org/pub/libdvdcss/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "eaa70f0ac608a56a596243c9bc63070dc358c7b31894f05cc3f3ac181035e8c2" + sha256 cellar: :any, arm64_sonoma: "a88500318685760e0425a099d0459f7be9f7505b89e69785af9d7ae183e40541" + sha256 cellar: :any, arm64_ventura: "d3a1da9ea4618f10137277bd109cc5d1c74ba3d82a2dc45f34370e1c389d8eea" + sha256 cellar: :any, arm64_monterey: "c96a2adbc32a57e271a9a91d338571ab9b0a6524a95e3fe48270dd5c4a277b21" + sha256 cellar: :any, arm64_big_sur: "ef10943948da31c0015eb558758fea572963e381c13c203e79ee2169a826731a" + sha256 cellar: :any, sonoma: "cf8f30222c06a1c42dcf2e60bfc251b5fa778c9225a7523fe39ac56221926818" + sha256 cellar: :any, ventura: "8ebe4191446d0808caee8a4cf8796e16dbbf075195f51683fc55aaeb1b5c9a6e" + sha256 cellar: :any, monterey: "cde7ea8b386ddf37ae4ec4b0901ba70583e5bff84d6bea9624a7064fef11b6a8" + sha256 cellar: :any, big_sur: "6410e6fd033c0145e2d6d4676776cc4f4c20cf540836963d74a16788c842a7fd" + sha256 cellar: :any, catalina: "b5915184be3174c64f03a0895a9ee71dc8baac9dcd5bf5e904977890ccbba2ed" + sha256 cellar: :any, mojave: "786743340aeae4fde2966f29bb0457123b529c42c5cbe52609ebdaad447b7280" + sha256 cellar: :any_skip_relocation, arm64_linux: "55bdf3ba9c347dd52ee1c5319b6a286c0e76cc8251c09d631f26e490a28d28d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b3979306018ca60bc17dc7547699ef716342c46c1e755ba15d53f6eb9ac92dd" + end + + head do + url "https://code.videolan.org/videolan/libdvdcss.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", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/lib/libdvdnav.rb b/Formula/lib/libdvdnav.rb new file mode 100644 index 0000000000000..295c3281f4443 --- /dev/null +++ b/Formula/lib/libdvdnav.rb @@ -0,0 +1,53 @@ +class Libdvdnav < Formula + desc "DVD navigation library" + homepage "https://www.videolan.org/developers/libdvdnav.html" + license "GPL-2.0-or-later" + + stable do + url "https://download.videolan.org/pub/videolan/libdvdnav/6.1.1/libdvdnav-6.1.1.tar.bz2" + sha256 "c191a7475947d323ff7680cf92c0fb1be8237701885f37656c64d04e98d18d48" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + livecheck do + url "https://download.videolan.org/pub/videolan/libdvdnav/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "b29b26c47215e0956115db5aa20172efaa92d178877f7f2e526efa661282f481" + sha256 cellar: :any, arm64_sonoma: "77516e8cb99cad1e25fd119a6c573e0fb9c96b5ed7685f1222b9f76a5d1d1013" + sha256 cellar: :any, arm64_ventura: "77a874039ce80696ea655e95514dc26776a34f1c9675f583ebc0b9ae083be84c" + sha256 cellar: :any, arm64_monterey: "efafd019d3a0cff8710e286c2fd7817865b1be5ff539c39639c71de9f61d9c50" + sha256 cellar: :any, arm64_big_sur: "e3ea0ddda7b96b799c2a67fd6687c25679001e2dc3893f200c70d4a599bc3996" + sha256 cellar: :any, sonoma: "1652846a6a793bc010056d0720931b73ae544fe5f378681b3223b9595b8b41be" + sha256 cellar: :any, ventura: "53d1dde0566dc12fe4e804d379d7b7cdfdc411dae8b290e866517c6f1023b796" + sha256 cellar: :any, monterey: "56d2c8450b882b776d5935a138d8031585366f59a740ea26db871d06c94d7d95" + sha256 cellar: :any, big_sur: "cabd25ecc0df8a3729e7196737e56041d8d6b9f369972d66de1ade19b4bfbafb" + sha256 cellar: :any, catalina: "ded7214f830c32676e5a64c2836b5498e44aeaa4967c5753a89c48af66edeaf7" + sha256 cellar: :any, mojave: "4fe58e754e7174ef7013a89a0620e05b8131bd50ed1de2c54e8b837db81fc4de" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a7a8631234c11e7d11e3ef82761671345883d42f2294382280bce8ddc7601a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0aadfc77f6807e5067f04391b0da4b6a0173c0219552f90ee300e17bd5679d9" + end + + head do + url "https://code.videolan.org/videolan/libdvdnav.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libdvdread" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/lib/libdvdread.rb b/Formula/lib/libdvdread.rb new file mode 100644 index 0000000000000..f819f857093dd --- /dev/null +++ b/Formula/lib/libdvdread.rb @@ -0,0 +1,54 @@ +class Libdvdread < Formula + desc "C library for reading DVD-video images" + homepage "https://www.videolan.org/developers/libdvdnav.html" + license "GPL-2.0-or-later" + + stable do + url "https://download.videolan.org/pub/videolan/libdvdread/6.1.3/libdvdread-6.1.3.tar.bz2" + sha256 "ce35454997a208cbe50e91232f0e73fb1ac3471965813a13b8730a8f18a15369" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + livecheck do + url "https://download.videolan.org/pub/videolan/libdvdread/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "6aaf06a46650503ddadff95be7584a8fc86ee6e2d3c357475d26566cfda2b10c" + sha256 cellar: :any, arm64_sonoma: "6d2583d6d35a5b71d45cfbfc63e3e76dd9757c85973752b1583c4af9502d723c" + sha256 cellar: :any, arm64_ventura: "221b4cb3ad771cc650454a1624a89348973c3ef5bedc5f526b77e4bbb281b938" + sha256 cellar: :any, arm64_monterey: "7c258b5c5be30d3ee53dacd0b137d7faadb5e21e06e5cf98859e7728e91cf303" + sha256 cellar: :any, arm64_big_sur: "e8642520b4bc06ac122e5c7e3affa0c80ed79678b09d220c1973e042aa11d30f" + sha256 cellar: :any, sonoma: "b1fa4f93b744c0b212e021aa63fa59f901e40b3ce029c11ea68f1e727698e1ea" + sha256 cellar: :any, ventura: "dbf236d4d32bb5e6d4180910f464225e5a09989d8fc542ec8bd5d3493a962308" + sha256 cellar: :any, monterey: "6ba400a8d928d2cd478969406000895023049c5a2257f11b6fab2791ff8b7105" + sha256 cellar: :any, big_sur: "cd57db884506fccb0b37b4cde83db05ba9cb15cddf1092f401918ae0972ac495" + sha256 cellar: :any, catalina: "5cd4a9df11e095e001d9d8a2a587f4701696de974b5527aea260afc9c5cc4f49" + sha256 cellar: :any_skip_relocation, arm64_linux: "82a35d755bc296bd802e404f47d1636732025171d577e9959b5b09f97d40b4fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5805295785ab4ce6aeb1bdfeb7fe1aab4946ea9df2555f2016bbc540322f9c81" + end + + head do + url "https://code.videolan.org/videolan/libdvdread.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "libdvdcss" + + def install + ENV.append "CFLAGS", "-DHAVE_DVDCSS_DVDCSS_H" + ENV.append "LDFLAGS", "-ldvdcss" + + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/lib/libeatmydata.rb b/Formula/lib/libeatmydata.rb new file mode 100644 index 0000000000000..aa5b098edc447 --- /dev/null +++ b/Formula/lib/libeatmydata.rb @@ -0,0 +1,65 @@ +class Libeatmydata < Formula + desc "LD_PRELOAD library and wrapper to transparently disable fsync and related calls" + homepage "https://www.flamingspork.com/projects/libeatmydata/" + license "GPL-3.0-or-later" + head "https://github.com/stewartsmith/libeatmydata.git", branch: "master" + + stable do + url "https://github.com/stewartsmith/libeatmydata/releases/download/v131/libeatmydata-131.tar.gz" + sha256 "cf18a8c52138a38541be3478af446c06048108729d7e18476492d62d54baabc4" + + # Fix for https://github.com/Homebrew/homebrew-core/issues/136873. + # Remove with `stable`` block on next release. + patch do + url "https://github.com/stewartsmith/libeatmydata/commit/ae89d0916c0ddd06f4ce7f2b37eaccf8dd543591.patch?full_index=1" + sha256 "8bf4249f3df141fa321c8c64af4f4442bc23bdfb108e2cf73c22e68a3a71ae15" + end + end + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "1d20eb672c446fa9b5c6f44e1f75a165f23b993be2f11ae203e5fe7a4d9a20ec" + sha256 cellar: :any, arm64_sonoma: "75e170239996c79f9dd99439c460f42b7b902cb387d140bddaf5c824b88ab243" + sha256 cellar: :any, arm64_ventura: "91c07ca49009f2bd4e377efedf459a536d491c4250d06ece93fe63356a045bcc" + sha256 cellar: :any, sonoma: "e5194f70fa35da7d6a2a199db97928ab5650c731cfb5235407ff464442bfe757" + sha256 cellar: :any, ventura: "08c627a35daeae1fe9602ad44723640b8328485bb05ed832fce245060de86ba4" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b06012e7f311dcfc040049a34b63d7766c0d965f3348175d93fccb5753995a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc9b82e66d7d882d3a2b5579fcd31040feab74d5b6a333d1060b02a695fe8eca" + end + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + on_monterey :or_older do + depends_on "coreutils" + end + + on_linux do + depends_on "strace" => :test + end + + def install + # macOS before 12.3 does not support `readlink -f` as used by the `eatmydata` shell wrapper script + if OS.mac? && MacOS.version <= :monterey + inreplace "eatmydata.sh.in", "readlink", "#{Formula["coreutils"].opt_bin}/greadlink" + end + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-option-checking", + "--disable-silent-rules", + *std_configure_args + system "make", "install" + end + + test do + system bin/"eatmydata", "sync" + return if OS.mac? + + output = shell_output("#{bin}/eatmydata #{Formula["strace"].opt_bin}/strace sync 2>&1") + refute_match(/^[a-z]*sync/, output) + refute_match("O_SYNC", output) + assert_match(" exited with 0 ", output) + end +end diff --git a/Formula/lib/libebml.rb b/Formula/lib/libebml.rb new file mode 100644 index 0000000000000..00706b21635d2 --- /dev/null +++ b/Formula/lib/libebml.rb @@ -0,0 +1,51 @@ +class Libebml < Formula + desc "Sort of a sbinary version of XML" + homepage "https://www.matroska.org/" + url "https://dl.matroska.org/downloads/libebml/libebml-1.4.5.tar.xz" + sha256 "4971640b0592da29c2d426f303e137a9b0b3d07e1b81d069c1e56a2f49ab221b" + license "LGPL-2.1-or-later" + head "https://github.com/Matroska-Org/libebml.git", branch: "master" + + livecheck do + url "https://dl.matroska.org/downloads/libebml/" + regex(/href=.*?libebml[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2d15f6ce6df5cab89843ca6a7512a601b90ade25bbf7bcae17286664d72e11d0" + sha256 cellar: :any, arm64_sonoma: "77cc696e94a5ae2f8a4ccab765ff7adfe84ba6a804479c50d46ede90662d1e81" + sha256 cellar: :any, arm64_ventura: "23a888049e631dac6a467f726376aa4a00e5468910d1d37bc7bdc28ce2ad6d4a" + sha256 cellar: :any, arm64_monterey: "21ced2ff88c6a8962a6fc1daa91c1e947e4090a0dac825968b077fdfa195c14c" + sha256 cellar: :any, sonoma: "1239efbef88129a1f69b8e160177912d565f10ac0ff311db0a82861755c24cc1" + sha256 cellar: :any, ventura: "d091018498ff6c3e107131187ea17cc489d7544751742eb89ce33b457bddc036" + sha256 cellar: :any, monterey: "1ac61d09f0ac6290a4aff9d2eec355ffc28c12499aab5331f355b101dcf3343c" + sha256 cellar: :any_skip_relocation, arm64_linux: "a84f082ce4f338d50887d393e1b44965bb42daf3df9690f981d3e67de6298c0e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c102b368af523e56e6ebfca14a0e5ff544849992f06d90a0c7768aa8026d4378" + 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.cpp").write <<~CPP + #include + #include + + int main() { + libebml::EbmlVoid void_element; + void_element.SetSize(1024); + + std::cout << "EbmlVoid element created with size: 1024" << std::endl; + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-lebml" + system "./test" + end +end diff --git a/Formula/lib/libebur128.rb b/Formula/lib/libebur128.rb new file mode 100644 index 0000000000000..8c8f874231199 --- /dev/null +++ b/Formula/lib/libebur128.rb @@ -0,0 +1,46 @@ +class Libebur128 < Formula + desc "Library implementing the EBU R128 loudness standard" + homepage "https://github.com/jiixyj/libebur128" + url "https://github.com/jiixyj/libebur128/archive/refs/tags/v1.2.6.tar.gz" + sha256 "baa7fc293a3d4651e244d8022ad03ab797ca3c2ad8442c43199afe8059faa613" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2112e1314f1796a63c7a5477ef24fbdeb91ca32b4d8ff57d5e6527e69a829d9f" + sha256 cellar: :any, arm64_sonoma: "91ca5b466a5bf36b1f9d9a1d7cd3f870d1d519fbce52b790192e3f5998976193" + sha256 cellar: :any, arm64_ventura: "c0253f875a0adcd097d523191b855d597d602731e73dc039d4ce707373674d5f" + sha256 cellar: :any, arm64_monterey: "d77d92a90aa8dfcb7642efe678d02804a0a9d0c172e43e005499120ead01b3b8" + sha256 cellar: :any, arm64_big_sur: "99450597a660d645800d8d0488b657efee8d7ff9b886a80f964fe3394c8a2552" + sha256 cellar: :any, sonoma: "63d0d10ecbffeab12456962728b12b62d36645536f3255885b18a879cecf3310" + sha256 cellar: :any, ventura: "e6b85bc2e07ac3e7b4d3ab8a9a05f7a2cde5e6377b5f2898e454acb598a82ff0" + sha256 cellar: :any, monterey: "6a1d7c49352c44807fbddff035842984a6d2e320d4d0625fd2271752246bcdfb" + sha256 cellar: :any, big_sur: "43567ee920b45921fb0d7787f40d3274ff42360c3048df470aee33be902694e7" + sha256 cellar: :any, catalina: "a9612342890303e8859ee23c7ce8d154f1d3eb134158322aa4ca0968d471281a" + sha256 cellar: :any, mojave: "ebe29eb9b5918eabf720410feb2ac711f5b062458e1d3129ffd29fb7da0f66b5" + sha256 cellar: :any_skip_relocation, arm64_linux: "a6a0b3d33651d9c7352b6178c3d98ab9ac932ae9d2a10242a1267feb513f2838" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f9bf1bedd635dce44252d8abf9ab008d53275ff1fc35ae7522685e403b5cdac" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "speex" + + 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() { + ebur128_init(5, 44100, EBUR128_MODE_I); + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lebur128", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libecpint.rb b/Formula/lib/libecpint.rb new file mode 100644 index 0000000000000..5a2e1dcdf7c4f --- /dev/null +++ b/Formula/lib/libecpint.rb @@ -0,0 +1,53 @@ +class Libecpint < Formula + desc "Library for the efficient evaluation of integrals over effective core potentials" + homepage "https://github.com/robashaw/libecpint" + url "https://github.com/robashaw/libecpint/archive/refs/tags/v1.0.7.tar.gz" + sha256 "e9c60fddb2614f113ab59ec620799d961db73979845e6e637c4a6fb72aee51cc" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "c52edb64ef2f58d2917ed6c23b673ba7a91e235d5f484dd33f5b09aa667d165a" + sha256 cellar: :any, arm64_sonoma: "ddfb7be7a3099e1b6f55f39207977de575a8073143259a1bc4f9ee1ab4f4618e" + sha256 cellar: :any, arm64_ventura: "d925cc07595e0fc312ff86fdcdbed3e9952a0c6cb097152d7c54ce9de46b6587" + sha256 cellar: :any, sonoma: "a6f706be76c6675f4ec6ae3e4745557764273336a650c6dd35272f07221c35bf" + sha256 cellar: :any, ventura: "a0f40b815e0a8c17a5afaee0f7fc302cada2bebadccbd016a684001b03e964fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "beadc5b890d76cc2a78af3a2d848dd5b647b9287bb38d38ce81affc88aa2ebf6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87eb0928e103b94c921b2a7dc1c12b0e12033e917f67ba0b01d2015af1d126b9" + end + + depends_on "cmake" => :build + depends_on "libcerf" + depends_on "pugixml" + + uses_from_macos "python" => :build + + def install + # Fix the error: found '_dawson' in libcerf.3.0.dylib, declaration possibly missing 'extern "C"' + # Issue ref: https://github.com/robashaw/libecpint/issues/65 + inreplace "src/CMakeLists.txt", "cerf::cerf", "cerf::cerfcpp" + + args = [ + "-DBUILD_SHARED_LIBS=ON", + "-DLIBECPINT_USE_CERF=ON", + "-DLIBECPINT_BUILD_TESTS=OFF", + "-DPython_EXECUTABLE=#{which("python3") || which("python")}", + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "tests/lib/api_test1/test1.cpp", + "tests/lib/api_test1/api_test1.output", + "include/testutil.hpp" + end + + test do + cp [pkgshare/"api_test1.output", pkgshare/"testutil.hpp"], testpath + system ENV.cxx, "-std=c++11", pkgshare/"test1.cpp", + "-DHAS_PUGIXML", "-I#{include}/libecpint", + "-L#{lib}", "-lecpint", "-o", "test1" + system "./test1" + end +end diff --git a/Formula/lib/libedit.rb b/Formula/lib/libedit.rb new file mode 100644 index 0000000000000..40807b7210736 --- /dev/null +++ b/Formula/lib/libedit.rb @@ -0,0 +1,47 @@ +class Libedit < Formula + desc "BSD-style licensed readline alternative" + homepage "https://thrysoee.dk/editline/" + url "https://thrysoee.dk/editline/libedit-20250104-3.1.tar.gz" + version "20250104-3.1" + sha256 "23792701694550a53720630cd1cd6167101b5773adddcb4104f7345b73a568ac" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?libedit[._-]v?(\d{4,}-\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "cea11c2d6de1a8a2cc22c08a71ab24aa2909793c65496b01c054b31973953229" + sha256 cellar: :any, arm64_sonoma: "f8a921a04eb8a7a678646017c40f6ff7be5149bacde10e5df26d17623bc8fc71" + sha256 cellar: :any, arm64_ventura: "4b176c32e18719e5ec303bde3f4b64312fcd9f7a1e2426df1962290864ebedf9" + sha256 cellar: :any, sonoma: "eed32540db79d8c02b3dd9076459f08a4f5660cfd6c54cb0db55b76379470126" + sha256 cellar: :any, ventura: "1a5446ca536e448c52101e281a8dcbac549dd2306090972337a37bce022d6e4d" + sha256 cellar: :any_skip_relocation, arm64_linux: "4845c0d7d9cea3199da9eb29bea21a0d62b7f4e8322ae90acaeb4a2dc39f295f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3de065ef66904f7758361d623fc96cbc5226663d919b3d6524f9b46bf3153692" + end + + keg_only :provided_by_macos + + uses_from_macos "ncurses" + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main(int argc, char *argv[]) { + EditLine *el = el_init(argv[0], stdin, stdout, stderr); + return (el == NULL); + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-ledit", "-I#{include}" + system "./test" + end +end diff --git a/Formula/lib/libelf.rb b/Formula/lib/libelf.rb new file mode 100644 index 0000000000000..b62d9292c9a72 --- /dev/null +++ b/Formula/lib/libelf.rb @@ -0,0 +1,80 @@ +class Libelf < Formula + desc "ELF object file access library" + # Original upstream is gone https://web.archive.org/web/20181111033959/www.mr511.de/software/english.html + homepage "https://fossies.org/linux/misc/old/libelf-0.8.13.tar.gz/" + url "https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/libelf-0.8.13.tar.gz" + mirror "https://fossies.org/linux/misc/old/libelf-0.8.13.tar.gz" + sha256 "591a9b4ec81c1f2042a97aa60564e0cb79d041c52faa7416acb38bc95bd2c76d" + license "LGPL-2.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4f4135950b4b898f046e748266d309126a4c87e0e86a19d476192f9619660819" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b5db356e6f8dc983b40424a17c9b73bfcbb442d08a6db8e952744b55aa53bb6e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "839fa934a24ba7bff4bd8ed5d8e3440cd70db7027fa2b79201c32469d0947877" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3987585b99efe287bfe353b420ba423057e6bfb3a27d543f5f0bfe13f76ef42f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "bd7a08bb9750a466bfc18473a61df2095b6d106ffb72f4ed4af706c7385b4202" + sha256 cellar: :any_skip_relocation, sonoma: "d40b4bca1b19eace612dc6fd980cd55a94e6a476434ade2db012ef854778bfb7" + sha256 cellar: :any_skip_relocation, ventura: "fdd2375a9f0931864f46148881455d90d4d4bb91c072d16861c3129168e27871" + sha256 cellar: :any_skip_relocation, monterey: "f7dd2aac1032b020ee90c997fb82f771ff686efbc481c4844c16b149d379a51a" + sha256 cellar: :any_skip_relocation, big_sur: "8b69f55ccec2aa1bfa85bef3fe071077fe281e2bc63dc33cc4344a1cc02e1e26" + sha256 cellar: :any_skip_relocation, catalina: "b7635245b64cc7d857c92191c40877cba96871d07f4749f620bc96c63cd2635e" + sha256 cellar: :any_skip_relocation, mojave: "7cb626407ee7d61546f2493da91ecc63996d6180949b96b84793e075bd130f2d" + sha256 cellar: :any_skip_relocation, high_sierra: "e11504a15c64cd7fca3248ca7ed14eead25a5d63d8bbd9a8e00f076c56602295" + sha256 cellar: :any_skip_relocation, sierra: "a771e35555810a4910304e3ca5967ea3e4f8cbe45576e5b2dc6b80cd9c1f0f13" + sha256 cellar: :any_skip_relocation, el_capitan: "a06b058c7e401942f442f573b63aa2cdd548b45d38b02b7af92393c67093f56e" + end + + # Commented out while this formula still has dependents. + # deprecate! date: "2019-05-17", because: :unmaintained # and upstream site is gone + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + # `libelf` should never be used on Linux as `elfutils` is available. + depends_on :macos + + def install + # Workaround for ancient config files not recognising aarch64 macos. + am = Formula["automake"] + am_share = am.opt_share/"automake-#{am.version.major_minor}" + %w[config.guess config.sub].each do |fn| + cp am_share/fn, fn + end + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-compat", *std_configure_args + # Use separate steps; there is a race in the Makefile. + system "make" + system "make", "install" + end + + test do + elf_content = "7F454C460101010000000000000000000200030001000000548004083" \ + "4000000000000000000000034002000010000000000000001000000000000000080040" \ + "80080040874000000740000000500000000100000B00431DB43B96980040831D2B20CC" \ + "D8031C040CD8048656C6C6F20776F726C640A" + File.binwrite(testpath/"elf", [elf_content].pack("H*")) + + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(void) { + GElf_Ehdr ehdr; + int fd = open("elf", O_RDONLY, 0); + if (elf_version(EV_CURRENT) == EV_NONE) return 1; + Elf *e = elf_begin(fd, ELF_C_READ, NULL); + if (elf_kind(e) != ELF_K_ELF) return 1; + if (gelf_getehdr(e, &ehdr) == NULL) return 1; + printf("%d-bit ELF\\n", gelf_getclass(e) == ELFCLASS32 ? 32 : 64); + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}/libelf", + "-lelf", "-o", "test" + assert_match "32-bit ELF", shell_output("./test") + end +end diff --git a/Formula/lib/libemf2svg.rb b/Formula/lib/libemf2svg.rb new file mode 100644 index 0000000000000..de82ab7d51e3f --- /dev/null +++ b/Formula/lib/libemf2svg.rb @@ -0,0 +1,49 @@ +class Libemf2svg < Formula + desc "Microsoft (MS) EMF to SVG conversion library" + homepage "https://github.com/kakwa/libemf2svg" + url "https://github.com/kakwa/libemf2svg/archive/refs/tags/1.1.0.tar.gz" + sha256 "ad48d2de9d1f4172aca475d9220bbd152b7280f98642db561ee6688faf50cd1e" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c769ed043dc565d050ee360ed38753a5f09db7fb39987c295c3d08b3eba16834" + sha256 cellar: :any, arm64_sonoma: "46974d67b425299521f648acc2561051646afbb51e47d45ff954277df5b32334" + sha256 cellar: :any, arm64_ventura: "1fc992a4391b5890a2163b4019c36331fb462f79a0fc77bfeb4c06e5a4641d73" + sha256 cellar: :any, arm64_monterey: "5c433d7a620912bb39e0a09a8f9d793028bf6c671a716d8e6f7f63cdf797aaa9" + sha256 cellar: :any, arm64_big_sur: "063dce921f40a941dccf3d79c1e886dc9944bda2166b9a840f5a6a80d37ffb6d" + sha256 cellar: :any, sonoma: "bb3ba1207ae1a563746eda8b4cae2fa6eede0a19077cd562cadb31d56f747f78" + sha256 cellar: :any, ventura: "e70b11b9736140938aac03fe053af3312cb992cc7aeb3a5a48573c2fd1b4eb69" + sha256 cellar: :any, monterey: "282508d66b3fd198648a798040205d7f3e42720cc9fc64572ac397767b369851" + sha256 cellar: :any, big_sur: "2da6c337708d8666ddfd4295b77f81b72c099f31c564f4efd79bed5f620a0d7a" + sha256 cellar: :any, catalina: "22a0d2002ff89d8583fa86c103d465b23fe7809a527aae4c6dad29b39db020f5" + sha256 cellar: :any_skip_relocation, arm64_linux: "06d60d5e8329cb81fa95b4ffc2253df5e29c98106b08e07248adaf811df48605" + sha256 cellar: :any_skip_relocation, x86_64_linux: "271caea2750597c1a8f0b30b80f4cdd901c439db73ca0d179420a0e3cb12c4bc" + end + + depends_on "cmake" => :build + depends_on "fontconfig" + depends_on "freetype" + depends_on "libpng" + + on_macos do + depends_on "argp-standalone" => :build + end + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + resource "homebrew-testdata" do + url "https://github.com/kakwa/libemf2svg/raw/1.1.0/tests/resources/emf/test-037.emf" + sha256 "d2855fc380fc3f791da58a78937af60c77ea437b749702a90652615019a5abdf" + end + + resource("homebrew-testdata").stage do + system bin/"emf2svg-conv", "-i", "test-037.emf", "-o", testpath/"test.svg" + end + assert_path_exists testpath/"test.svg" + end +end diff --git a/Formula/lib/libepoxy.rb b/Formula/lib/libepoxy.rb new file mode 100644 index 0000000000000..dc3c113ddb1f1 --- /dev/null +++ b/Formula/lib/libepoxy.rb @@ -0,0 +1,80 @@ +class Libepoxy < Formula + desc "Library for handling OpenGL function pointer management" + homepage "https://github.com/anholt/libepoxy" + url "https://download.gnome.org/sources/libepoxy/1.5/libepoxy-1.5.10.tar.xz" + sha256 "072cda4b59dd098bba8c2363a6247299db1fa89411dc221c8b81b8ee8192e623" + license "MIT" + + # We use a common regex because libepoxy doesn't use GNOME's "even-numbered + # minor is stable" version scheme. + livecheck do + url :stable + regex(/libepoxy[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8567ad4e5598374741b4762cbbff1a2aa57cf97947b4742304c49613b0abd419" + sha256 cellar: :any, arm64_sonoma: "512616ae9cffdb0a7055c058775769b7bdb72c09bf6a31120db83db9b2937b8f" + sha256 cellar: :any, arm64_ventura: "52aeeb179036343d54c93b30413f41e7dfd524d2aeb8b7f590ef31bbb07bd657" + sha256 cellar: :any, arm64_monterey: "a5164efc11c9f11adaba87595c6a12cadf12671e860e9b38d11fa3081c7b2c1c" + sha256 cellar: :any, arm64_big_sur: "839cc3388516586debdc98d72a3fb4b8237ee432a5be7262e8c835367093f29d" + sha256 cellar: :any, sonoma: "f0a692baa102940ea9ab31daef2dacb0ad2017d6049b4b58080417f900b0aeb9" + sha256 cellar: :any, ventura: "91cca5d118a350e7105a303fd873915fc5f36c0a83be02101f3c742a52d0059c" + sha256 cellar: :any, monterey: "9ec0246218c3d31cfce70e1a492f7cdc03884f638d9986be28bec0b769d6648b" + sha256 cellar: :any, big_sur: "c398ece0b10339f409d48d3b06866285f7a58294a3dca6d9c88e798a35af6b36" + sha256 cellar: :any, catalina: "2b5537e288b18b6545d0cf78229d5c2b695d0d2e51b627e21e77573c88217b42" + sha256 cellar: :any_skip_relocation, arm64_linux: "d353d0c6a998998b3563cc16177e88ab316aeab0f4e0cf199d59627248cba27f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8798e1682f355df0c5009b8b968ecb2b9bd447f32683ad21f10e68ea60320819" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + on_linux do + depends_on "freeglut" + 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 + #ifdef OS_MAC + #include + #include + #include + #endif + int main() + { + #ifdef OS_MAC + CGLPixelFormatAttribute attribs[] = {0}; + CGLPixelFormatObj pix; + int npix; + CGLContextObj ctx; + + CGLChoosePixelFormat( attribs, &pix, &npix ); + CGLCreateContext(pix, (void*)0, &ctx); + #endif + + glClear(GL_COLOR_BUFFER_BIT); + #ifdef OS_MAC + CGLReleasePixelFormat(pix); + CGLReleaseContext(pix); + #endif + return 0; + } + C + args = %w[-lepoxy] + args += %w[-framework OpenGL -DOS_MAC] if OS.mac? + args += %w[-o test] + system ENV.cc, "test.c", "-L#{lib}", *args + system "ls", "-lh", "test" + system "file", "test" + system "./test" + end +end diff --git a/Formula/lib/libesedb.rb b/Formula/lib/libesedb.rb new file mode 100644 index 0000000000000..851af88cb8cb8 --- /dev/null +++ b/Formula/lib/libesedb.rb @@ -0,0 +1,42 @@ +class Libesedb < Formula + desc "Library and tools for Extensible Storage Engine (ESE) Database files" + homepage "https://github.com/libyal/libesedb" + url "https://github.com/libyal/libesedb/releases/download/20240420/libesedb-experimental-20240420.tar.gz" + sha256 "07250741dff8a1ea1f5e38c02f1b9a1ae5e9fa52d013401067338842883a5b9f" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "19df457c00efc39b7ca068cdfa7beac035646a39c7e53e7112eeb00d1f222a74" + sha256 cellar: :any, arm64_sonoma: "4e0a0ca5c1634e6523359a2705b314e34d455b8c9403c9a471509202234fc19e" + sha256 cellar: :any, arm64_ventura: "26c666149c74a54e744f41d18e75ab750b147a8f60ad14bade6beae81e1039a6" + sha256 cellar: :any, sonoma: "ca35e641f9022088e61dd568b98b928beac7247b6606a3dda6e5c925e6ded138" + sha256 cellar: :any, ventura: "85d5028c3fe1e6db45290397b9f5fd4773fdb70336058266a8f25e67b80e041a" + sha256 cellar: :any_skip_relocation, arm64_linux: "07462cd653aae3448ae737536aebe605064ae7c75113dd467787fbc767ee8f3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0de46fa5de3819ee8025595a4579aac0982dcac0345302d6293228258bdee6dd" + end + + depends_on "pkgconf" => :test + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/esedbinfo -V") + + (testpath/"test.c").write <<~C + #include + #include + + int main() { + printf("libesedb version: %d\\n", LIBESEDB_VERSION); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libesedb").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + assert_match "libesedb version: #{version}", shell_output("./test") + end +end diff --git a/Formula/lib/libestr.rb b/Formula/lib/libestr.rb new file mode 100644 index 0000000000000..dce4d99cb53e6 --- /dev/null +++ b/Formula/lib/libestr.rb @@ -0,0 +1,57 @@ +class Libestr < Formula + desc "C library for string handling (and a bit more)" + homepage "https://libestr.adiscon.com/" + url "https://libestr.adiscon.com/files/download/libestr-0.1.11.tar.gz" + sha256 "46632b2785ff4a231dcf241eeb0dcb5fc0c7d4da8ee49cf5687722cdbe8b2024" + license "LGPL-2.1-or-later" + + livecheck do + url "https://libestr.adiscon.com/download/" + regex(/href=.*?libestr[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c4ee35e1e3e47e5009e3fdb7be52737edebddcdd812e8c1811fcf73648a656cb" + sha256 cellar: :any, arm64_sonoma: "3fba48207a9ab79341e43e937560dfeae150dada3f5cb560a7a209fb45e726ef" + sha256 cellar: :any, arm64_ventura: "5acb64697d9ef2237c384b6b2f265e2c74770f218259707485fcdf99dfdca7d5" + sha256 cellar: :any, arm64_monterey: "b186e7aa04c176161a97f6955e2d4cc5dff415be78213f0f842c03acd0614c4e" + sha256 cellar: :any, arm64_big_sur: "20863614b37a81431737f276b1273bf542e374a323b9a1e486af7775e659d688" + sha256 cellar: :any, sonoma: "762b4c02935959cf91f8520f6d275cba1cd5f54432201b745e3674c9b29fc5c5" + sha256 cellar: :any, ventura: "47ab08fd7c8294b4e47eae018b76a6ce91837ec1705b071099cf7d5c65410f15" + sha256 cellar: :any, monterey: "21c59f29aad1c8053e27ce8946abbc9bb5b82e8ae8672b331524282fd835b60b" + sha256 cellar: :any, big_sur: "11fa154962682f47b57b2dac7ceee697b5cf57c21e56d3c713f6e5a646d318da" + sha256 cellar: :any, catalina: "f539c76e3acdd0a93def55a0e82ecf45c53de65dc6dc18fd123efe815d8a65cd" + sha256 cellar: :any, mojave: "543dcd541a69d52d5d1d21d51d0cf57c1617cc177f743c2dfea8ea3d548b93e8" + sha256 cellar: :any, high_sierra: "7f17c5dbb6534afe6b37ae1d1f994d3387cd8527d6aaa768604837ac681eee59" + sha256 cellar: :any, sierra: "5ff130cf6aa42842636dd90b7a8e7e60adbb289682bd915c98937b032c38fc54" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f88fde30fe9005f5eafd6a718b233317c838f741535b789ac39a1a027daf0b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f131de3ed214869ab11a430e48f7e006d8b4ae1c181413f0d60aa9da85f4599" + end + + depends_on "pkgconf" => :build + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "stdio.h" + #include + int main() { + printf("%s\\n", es_version()); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lestr", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libetonyek.rb b/Formula/lib/libetonyek.rb new file mode 100644 index 0000000000000..3ae2e701511ba --- /dev/null +++ b/Formula/lib/libetonyek.rb @@ -0,0 +1,80 @@ +class Libetonyek < Formula + desc "Interpret and import Apple Keynote presentations" + homepage "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek" + url "https://dev-www.libreoffice.org/src/libetonyek/libetonyek-0.1.12.tar.xz" + sha256 "b9fa82fbeb8cb7a701101060e4f3e1e4ef7c38f574b2859d3ecbe43604c21f83" + license "MPL-2.0" + + livecheck do + url "https://dev-www.libreoffice.org/src/" + regex(/href=["']?libetonyek[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "0eb492997db6e7df366f6be4b4c30778aed163f97279c114325d3c1caf551032" + sha256 arm64_sonoma: "5b0326bceb378ae5864f2be1b20d835e8f033cef7e0a12fc08e21a9bc1010161" + sha256 arm64_ventura: "18b9e602c028f0c0c77b366ac2509f74bc2243f557b20c510952b389b512ca95" + sha256 cellar: :any, sonoma: "5976299ba865549520b864036093f709d7fa18fd06fb46de1a8773ee0da058b5" + sha256 cellar: :any, ventura: "b40d8148bec5f1360852a4e4a943e7d2e28b1ec95c747cc0d4516a438e8a1218" + sha256 arm64_linux: "4a1dd9920ae1ce725bbca2fd65d867f5461e137173d33846616f1151c4e95fd5" + sha256 x86_64_linux: "88cd3008e344d4ebf311a8035ef6b0108e9811046c43c4480831df4c169b66dc" + end + + depends_on "boost" => :build + depends_on "glm" => :build + depends_on "mdds" => :build + depends_on "pkgconf" => :build + depends_on "librevenge" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + resource "liblangtag" do + url "https://bitbucket.org/tagoh/liblangtag/downloads/liblangtag-0.6.7.tar.bz2" + sha256 "5ed6bcd4ae3f3c05c912e62f216cd1a44123846147f729a49fb5668da51e030e" + end + + def install + resource("liblangtag").stage do + system "./configure", "--disable-modules", "--disable-silent-rules", *std_configure_args(prefix: libexec) + system "make" + system "make", "install" + end + + # The mdds pkg-config .pc file includes the API version in its name (ex. mdds-2.0.pc). + # We extract this from the filename programmatically and store it in mdds_api_version. + mdds_pc_file = (Formula["mdds"].share/"pkgconfig").glob("mdds-*.pc").first.to_s + mdds_api_version = File.basename(mdds_pc_file, File.extname(mdds_pc_file)).split("-")[1] + + # Override -std=gnu++11 as mdds>=2.1.1 needs C++17 std::bool_constant + ENV.append "CXXFLAGS", "-std=gnu++17" + + ENV["LANGTAG_CFLAGS"] = "-I#{libexec}/include" + ENV["LANGTAG_LIBS"] = "-L#{libexec}/lib -llangtag -lxml2" + system "./configure", "--without-docs", + "--disable-silent-rules", + "--disable-static", + "--disable-werror", + "--disable-tests", + "--with-mdds=#{mdds_api_version}", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + return libetonyek::EtonyekDocument::RESULT_OK; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", + "-I#{Formula["librevenge"].include}/librevenge-0.0", + "-I#{include}/libetonyek-0.1", + "-L#{Formula["librevenge"].lib}", + "-L#{lib}", + "-lrevenge-0.0", + "-letonyek-0.1" + system "./test" + end +end diff --git a/Formula/lib/libetpan.rb b/Formula/lib/libetpan.rb new file mode 100644 index 0000000000000..9851973cb1098 --- /dev/null +++ b/Formula/lib/libetpan.rb @@ -0,0 +1,94 @@ +class Libetpan < Formula + desc "Portable mail library handling several protocols" + homepage "https://www.etpan.org/libetpan.html" + license "BSD-3-Clause" + head "https://github.com/dinhvh/libetpan.git", branch: "master" + + stable do + url "https://github.com/dinhvh/libetpan/archive/refs/tags/1.9.4.tar.gz" + sha256 "82ec8ea11d239c9967dbd1717cac09c8330a558e025b3e4dc6a7594e80d13bb1" + + # Backport fix for CVE-2020-15953 + patch do + url "https://github.com/dinhvh/libetpan/commit/1002a0121a8f5a9aee25357769807f2c519fa50b.patch?full_index=1" + sha256 "824408a4d4b59b8e395260908b230232d4f764645b014fbe6e9660ad1137251e" + end + patch do + url "https://github.com/dinhvh/libetpan/commit/298460a2adaabd2f28f417a0f106cb3b68d27df9.patch?full_index=1" + sha256 "f5e62879eb90d83d06c4b0caada365a7ea53d4426199a650a7cc303cc0f66751" + end + + # Backport fix for CVE-2022-4121 + patch do + url "https://github.com/dinhvh/libetpan/commit/5c9eb6b6ba64c4eb927d7a902317410181aacbba.patch?full_index=1" + sha256 "33e23548526588b0620033be67988e458806632efe950a62bd3e5808e2c628d1" + end + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "28a0fa384fbe4f86bed68fea326d1cdfec1b4fc8c0b21283a00e3c268630f503" + sha256 cellar: :any, arm64_sonoma: "eb5765b64ee9833f052439c9f5b29752115b84761e569c7d7d07d35b457fe5a5" + sha256 cellar: :any, arm64_ventura: "daed620aaf4d24519d79be6cf34fdbf52386fa92c4c7880e8cf05cdccb0a787f" + sha256 cellar: :any, arm64_monterey: "1d33d9e801085b4c350423a936c7e79d1b6ed20b1bd0cfd08d42ae5e5274f07d" + sha256 cellar: :any, sonoma: "a025d5684d2edc67c1b50b04ed4fab5f8ff5534c6a3c5b4093f5cf84837b46a0" + sha256 cellar: :any, ventura: "143a977a506121a0b96acdcd4364ab55e278b2d887ab1e28f85d59c81e86e116" + sha256 cellar: :any, monterey: "0803fa89cfe96b599bc4c811707872971b94c297e353032d614797f614bc90bc" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b77f7345d0e27f4cbc5339afc734e0a897056111c1f79fc949c9d90b8ca66ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0c3a249c5498bb7b6b9fcd5f735b9ca04e3225b8654a72464f457506c6aa72e" + end + + depends_on xcode: :build + + uses_from_macos "cyrus-sasl" + uses_from_macos "zlib" + + on_linux do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + end + + def install + if OS.mac? + xcodebuild "-arch", Hardware::CPU.arch, + "-project", "build-mac/libetpan.xcodeproj", + "-scheme", "static libetpan", + "-configuration", "Release", + "SYMROOT=build/libetpan", + "build" + + xcodebuild "-arch", Hardware::CPU.arch, + "-project", "build-mac/libetpan.xcodeproj", + "-scheme", "libetpan", + "-configuration", "Release", + "SYMROOT=build/libetpan", + "build" + + lib.install "build-mac/build/libetpan/Release/libetpan.a" + frameworks.install "build-mac/build/libetpan/Release/libetpan.framework" + include.install buildpath.glob("build-mac/build/libetpan/Release/include/**") + bin.install "libetpan-config" + else + system "./autogen.sh", "--disable-db", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(int argc, char ** argv) + { + printf("version is %d.%d",libetpan_get_version_major(), libetpan_get_version_minor()); + } + C + system ENV.cc, "test.c", "-L#{lib}", "-letpan", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libev.rb b/Formula/lib/libev.rb new file mode 100644 index 0000000000000..0181d50edc9e5 --- /dev/null +++ b/Formula/lib/libev.rb @@ -0,0 +1,77 @@ +class Libev < Formula + desc "Asynchronous event library" + homepage "https://software.schmorp.de/pkg/libev.html" + url "https://dist.schmorp.de/libev/Attic/libev-4.33.tar.gz" + mirror "https://fossies.org/linux/misc/libev-4.33.tar.gz" + sha256 "507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea" + license any_of: ["BSD-2-Clause", "GPL-2.0-or-later"] + + livecheck do + url "https://dist.schmorp.de/libev/" + regex(/href=.*?libev[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "67740e5ba01e82c140ceadc512aa26a3990bfadaef0f4b545ba7f9aaf24c50bf" + sha256 cellar: :any, arm64_sonoma: "e476d7fb265b97275a91a5cb3acfa0357e4f722d44a550ab3bc22388add80614" + sha256 cellar: :any, arm64_ventura: "45855fb985e74c97e1764ae481f1699e846441089cc3da65bdca5d8fc1b41243" + sha256 cellar: :any, arm64_monterey: "2ae425f0f4435a6a01577bdf04723791f2c7bb67d6eeaacafca7aaca9450c55b" + sha256 cellar: :any, arm64_big_sur: "8ed86bdd0ff3b47f8802b251a9ca61770ffc4c9b0be964f41f50955256b5bb53" + sha256 cellar: :any, sonoma: "5de04c4e03a70639639d5e4ced919aafdef07f9ea98cbde320b2e9dd81f9d5ce" + sha256 cellar: :any, ventura: "6d0945ebe1bd085e597fedeee3fbcfba8f0d40195b03e4523894917b5b5526ca" + sha256 cellar: :any, monterey: "de9342ba34cfa8c2f8863a92eb7aced34652c302328f8a593a449d183c9fe1e0" + sha256 cellar: :any, big_sur: "95ddf4b85924a6a10d4a88b6eb52616fa8375e745c99d0752618d5bb82f5248a" + sha256 cellar: :any, catalina: "e5481e2ba48282bffb5ecc059f0ddddd9807400593e849ed4b48b1fed3a14698" + sha256 cellar: :any, mojave: "f6cfb8c6bb1219f4a54d36113ada7cc7e1e446d5a207bc77d69ac30d9cfe391f" + sha256 cellar: :any, high_sierra: "f623fc2f4dc3a0980b4733945eb2025cd40636a6d4f5e5d75ae5f89e0b7b07bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "4fb42593fde919e166fd48c27050b5be92f2d2fe7b2e97e19738f8bd9428734d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a22fcf5d3733f1cd5814c5ae2c5a46c7c408195d408d3666b42696a0127f8bb5" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + + # Remove compatibility header to prevent conflict with libevent + (include/"event.h").unlink + end + + test do + (testpath/"test.c").write <<~C + /* Wait for stdin to become readable, then read and echo the first line. */ + + #include + #include + #include + #include + + ev_io stdin_watcher; + + static void stdin_cb (EV_P_ ev_io *watcher, int revents) { + char *buf; + size_t nbytes = 255; + buf = (char *)malloc(nbytes + 1); + getline(&buf, &nbytes, stdin); + printf("%s", buf); + ev_io_stop(EV_A_ watcher); + ev_break(EV_A_ EVBREAK_ALL); + } + + int main() { + ev_io_init(&stdin_watcher, stdin_cb, STDIN_FILENO, EV_READ); + ev_io_start(EV_DEFAULT, &stdin_watcher); + ev_run(EV_DEFAULT, 0); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lev", "-o", "test" + input = "hello, world\n" + assert_equal input, pipe_output("./test", input, 0) + end +end diff --git a/Formula/lib/libevent.rb b/Formula/lib/libevent.rb new file mode 100644 index 0000000000000..d31e3148e2565 --- /dev/null +++ b/Formula/lib/libevent.rb @@ -0,0 +1,56 @@ +class Libevent < Formula + desc "Asynchronous event library" + homepage "https://libevent.org/" + url "https://github.com/libevent/libevent/archive/refs/tags/release-2.1.12-stable.tar.gz" + sha256 "7180a979aaa7000e1264da484f712d403fcf7679b1e9212c4e3d09f5c93efc24" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :homepage + regex(/libevent[._-]v?(\d+(?:\.\d+)+)-stable/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "65fc7c61fec0f5ae0c5dfc8fc7e3b6b0507d3f1c7c308a332802541f00334963" + sha256 cellar: :any, arm64_sonoma: "38a3eb3510a7e0cd4096e4592d0095c562eb1bbad572d951f1923009a14ad702" + sha256 cellar: :any, arm64_ventura: "a75d453a7fe2aba1eaba334621b7bd9f0ff6f9e1f04aa400565f68711a9f6db4" + sha256 cellar: :any, arm64_monterey: "a24d682548fb7cb11c127932240cced5d6fdb16feaaa6dc2ab3a7f0833e5df2e" + sha256 cellar: :any, arm64_big_sur: "0c3deccd564c0ed001cb3613ddc10d7e46e78deb5f8882fde74f8935557d5cba" + sha256 cellar: :any, sonoma: "5d54f13cd93d87185bd7bb592cb945d1f64cac3e88d1e46c2fb5d9ea538d9623" + sha256 cellar: :any, ventura: "79a1036d3428c6ad8325803912e9ff0f74b8a8202908ae8594959c27e998c90b" + sha256 cellar: :any, monterey: "d0557018f19021fb4675a20d9cefda5e13646558c276ab7b4f01f96144b432f8" + sha256 cellar: :any, big_sur: "042923957c025a4298465d320a63db6127414644fde58fcdc0d29e8c28fd2993" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ebd43e299f937313fc4dc17c21a7446b53d5a46d7dad29922a763df1761acac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "83ef4ce689a91f6fca013d6b4b0b2fcda3706080f8e0cccd056a3d94d6bc0f17" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + def install + system "./autogen.sh" + system "./configure", "--disable-debug-mode", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + struct event_base *base; + base = event_base_new(); + event_base_free(base); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-levent", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libewf.rb b/Formula/lib/libewf.rb new file mode 100644 index 0000000000000..352f49dd70c39 --- /dev/null +++ b/Formula/lib/libewf.rb @@ -0,0 +1,60 @@ +class Libewf < Formula + desc "Library for support of the Expert Witness Compression Format" + homepage "https://github.com/libyal/libewf" + # The main libewf repository is currently "experimental". + # See discussions in this issue: https://github.com/libyal/libewf/issues/127 + url "https://github.com/libyal/libewf-legacy/releases/download/20140816/libewf-20140816.tar.gz" + sha256 "6b2d078fb3861679ba83942fea51e9e6029c37ec2ea0c37f5744256d6f7025a9" + license "LGPL-3.0-or-later" + + livecheck do + url :stable + regex(/^(?:libewf[._-])?v?(\d+(?:\.\d+)*)$/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "cc1ee22a4c919dcbcc09d7b8e6c63c212648cbb47d709271390a5b0ffab316f9" + sha256 cellar: :any, arm64_sonoma: "f921e6618b878d66acb4b02db137244115b0e721dd935ae5b151b681000ea86c" + sha256 cellar: :any, arm64_ventura: "0c994929653ecf3f7a487f17231db932301058a5883b0e6076dea4ba4b8468bd" + sha256 cellar: :any, arm64_monterey: "9b990ae7f7866c4f3600f0ab65f88782812a2bc47e83d0a869081ca87e594746" + sha256 cellar: :any, sonoma: "85fbf4280d4b14162dbee0956d5fc13e61bd018d183e920fff921d157dff06ee" + sha256 cellar: :any, ventura: "d67b1dbed6b0bb1b20eeb6d294451821bd19deb21b79d1ba8cdaf94d4eb34913" + sha256 cellar: :any, monterey: "e63d530c15de2669b9957557fe72585795f783fa66684b492dc9c6c0e75d4f06" + sha256 cellar: :any_skip_relocation, arm64_linux: "189d67460fe4ede4cbfabdb18ea999ca1b170e2577457c2373cce8eec2dd3623" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3ebd71fc7c67743ebcfa1cb95debe60db4d085ca3235b0c6cebec9836b13dba" + end + + head do + url "https://github.com/libyal/libewf.git", branch: "main" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + if build.head? + system "./synclibs.sh" + system "./autogen.sh" + end + + args = %w[ + --disable-silent-rules + --with-libfuse=no + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/ewfinfo -V") + end +end diff --git a/Formula/lib/libexif.rb b/Formula/lib/libexif.rb new file mode 100644 index 0000000000000..e5a16f2b441d2 --- /dev/null +++ b/Formula/lib/libexif.rb @@ -0,0 +1,66 @@ +class Libexif < Formula + desc "EXIF parsing library" + homepage "https://libexif.github.io/" + url "https://github.com/libexif/libexif/releases/download/v0.6.25/libexif-0.6.25.tar.bz2" + sha256 "7c9eba99aed3e6594d8c3e85861f1c6aaf450c218621528bc989d3b3e7a26307" + license all_of: ["LGPL-2.1-or-later", "LGPL-2.0-or-later"] + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "db630e3ebf4c47a7c96f14e8edf29eaf88d89fbe2b0fb6737e1babdc39c230da" + sha256 arm64_sonoma: "a70285c25d276538094060000acea0828c0f0f287c5bea731b780f3a6d8357aa" + sha256 arm64_ventura: "44869b2f698103429ec8a0f46613fa6acf144a1e5b237addadb1902cc482e8fd" + sha256 sonoma: "4ccd8b1a418d04e1991120ffb36e82b75dc255b3d652371f93b47032c4f5d829" + sha256 ventura: "2fe6759911975daa49a08569542b4ca535310b6260112dbf8b34f97247632980" + sha256 arm64_linux: "db6839524b1045b07572a9b3838dd98c6f3d041d762bd77ce8799a1a5fdff114" + sha256 x86_64_linux: "1426d9fdac3dcf9359098176fa0a8477c0b3fb05bae374e5fa9daedf3142aead" + end + + head do + url "https://github.com/libexif/libexif.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + end + + on_macos do + depends_on "gettext" + 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.c").write <<~C + #include + #include + + int main(int argc, char **argv) { + ExifLoader *loader = exif_loader_new(); + ExifData *data; + if (loader) { + exif_loader_write_file(loader, argv[1]); + data = exif_loader_get_data(loader); + printf(data ? "Exif data loaded" : "No Exif data"); + } + } + C + flags = %W[ + -I#{include} + -L#{lib} + -lexif + ] + system ENV.cc, "test.c", "-o", "test", *flags + test_image = test_fixtures("test.jpg") + assert_equal "No Exif data", shell_output("./test #{test_image}") + end +end diff --git a/Formula/lib/libexosip.rb b/Formula/lib/libexosip.rb new file mode 100644 index 0000000000000..52b619544feb3 --- /dev/null +++ b/Formula/lib/libexosip.rb @@ -0,0 +1,77 @@ +class Libexosip < Formula + desc "Toolkit for eXosip2" + homepage "https://savannah.nongnu.org/projects/exosip" + url "https://download.savannah.gnu.org/releases/exosip/libexosip2-5.3.0.tar.gz" + mirror "https://download-mirror.savannah.gnu.org/releases/exosip/libexosip2-5.3.0.tar.gz" + sha256 "5b7823986431ea5cedc9f095d6964ace966f093b2ae7d0b08404788bfcebc9c2" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/exosip/" + regex(/href=.*?libexosip2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "642cdbf3c7e2c28d59ba0bfa578465767fcc52a0640153ae68efea87e928243a" + sha256 cellar: :any, arm64_sonoma: "4fc704e8d56094e3cae0b85da0ef283821679c52d11376eab270a5532b75e7e8" + sha256 cellar: :any, arm64_ventura: "f16e7871375ba4b6fa1a0449efdbaac6cd0ecd385cb30ca73b81e5303b4fe643" + sha256 cellar: :any, arm64_monterey: "986de480122d68131d838a6f0d37921978491b83e01fc53ab8631c50ce428cf0" + sha256 cellar: :any, arm64_big_sur: "54df18bb3bea9dca975b830312f28ac7510dadb108db9053a3eafdf8481add0b" + sha256 cellar: :any, sonoma: "63dc5332096f15cfab981171841ea55a5462cfdfe779bd750c5c5f470169ff7a" + sha256 cellar: :any, ventura: "836deee9270859281bfb13c2b75d44cad2e6d2f38a2a99490c086b749f45258e" + sha256 cellar: :any, monterey: "a3ffa4272cd49779d2ba780252af1a9e9bc56d30dae6e1b757bdd449e7c47221" + sha256 cellar: :any, big_sur: "7af6a64fb918f2ddc565947e49f911520f7340f8ddf09cb23a28aad2e4be35cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2248230c56cae9643494c59e8b62ed822cabc1dc5fc1013b98efbf608bad015" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07fe4531bd26a4c6fabb8833e55dc9b955c3f995c5c024177b9a9e3800785782" + end + + depends_on "pkgconf" => :build + depends_on "c-ares" + depends_on "libosip" + depends_on "openssl@3" + + def install + # Extra linker flags are needed to build this on macOS. See: + # https://growingshoot.blogspot.com/2013/02/manually-install-osip-and-exosip-as.html + # Upstream bug ticket: https://savannah.nongnu.org/bugs/index.php?45079 + if OS.mac? + ENV.append "LDFLAGS", "-framework CoreFoundation -framework CoreServices " \ + "-framework Security" + end + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + struct eXosip_t *ctx; + int i; + int port = 35060; + + ctx = eXosip_malloc(); + if (ctx == NULL) + return -1; + + i = eXosip_init(ctx); + if (i != 0) + return -1; + + i = eXosip_listen_addr(ctx, IPPROTO_UDP, NULL, port, AF_INET, 0); + if (i != 0) { + eXosip_quit(ctx); + fprintf(stderr, "could not initialize transport layer\\n"); + return -1; + } + + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-leXosip2", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libextractor.rb b/Formula/lib/libextractor.rb new file mode 100644 index 0000000000000..27f0b78d7245e --- /dev/null +++ b/Formula/lib/libextractor.rb @@ -0,0 +1,39 @@ +class Libextractor < Formula + desc "Library to extract meta data from files" + homepage "https://www.gnu.org/software/libextractor/" + url "https://ftp.gnu.org/gnu/libextractor/libextractor-1.13.tar.gz" + mirror "https://ftpmirror.gnu.org/libextractor/libextractor-1.13.tar.gz" + sha256 "bb8f312c51d202572243f113c6b62d8210301ab30cbaee604f9837d878cdf755" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "3dc057f34f3a021d0485a2f04b581c8b77f118e6c12337717e200de09146f560" + sha256 arm64_sonoma: "e011f7851397a725c19c5774f33fd92a880476a8ae37c5c9f23a5d4aad084cac" + sha256 arm64_ventura: "10788f93e331dd93dab2eb899fa31593b72fedcb789a0c7c807c4647c495d7f9" + sha256 arm64_monterey: "5eab278d0efbc37c53c5780bd0b7a709698d7339637268b13f0e943c06ef843b" + sha256 sonoma: "c7c06e9774f028033a5204a67a76024ffc8b0f9abdba542ca314f2af92c0d524" + sha256 ventura: "e4c884c473f6ac563510f45077f13108f48ada926b9c973e4207612f5cd77695" + sha256 monterey: "18605b71d83d1d0cf0162b79d24e74917572cfb132aca81e11ed20570f8b3c7d" + sha256 arm64_linux: "19faec255542f6aa2bfa28e9a407916c53e5813594638914abf9c6c80efcbaed" + sha256 x86_64_linux: "f3cbd363b695aecf683d92a8b56aa5cb9a8d7e3d81b6190892c8393de7f4d648" + end + + depends_on "pkgconf" => :build + depends_on "libtool" + + uses_from_macos "zlib" + + conflicts_with "csound", because: "both install `extract` binaries" + + def install + ENV.deparallelize + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + fixture = test_fixtures("test.png") + assert_match "Keywords for file", shell_output("#{bin}/extract #{fixture}") + end +end diff --git a/Formula/lib/libfabric.rb b/Formula/lib/libfabric.rb new file mode 100644 index 0000000000000..05e420a548dd2 --- /dev/null +++ b/Formula/lib/libfabric.rb @@ -0,0 +1,41 @@ +class Libfabric < Formula + desc "OpenFabrics libfabric" + homepage "https://ofiwg.github.io/libfabric/" + url "https://github.com/ofiwg/libfabric/releases/download/v2.1.0/libfabric-2.1.0.tar.bz2" + sha256 "97df312779e2d937246d2f46385b700e0958ed796d6fed7aae77e2d18923e19f" + license any_of: ["BSD-2-Clause", "GPL-2.0-only"] + head "https://github.com/ofiwg/libfabric.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e708bd1fd4cb2bdd0d37d12b73744fdc5878808d4df727aa12a6bc6db5c7d284" + sha256 cellar: :any, arm64_sonoma: "c47ad07aa226ff618b1efa4f3aec8785af8805f81da91cbf79710a465799949f" + sha256 cellar: :any, arm64_ventura: "744ab1d09613ed90b5daf9ca56f157b0a5be99107e572394622dbd58e10285e3" + sha256 cellar: :any, sonoma: "cde9e6629221b066db676576f7b6f76250db1a3cb0bf18447eab63d2fb5ae39d" + sha256 cellar: :any, ventura: "7ff1b4a7c98bc71d9e86b20ecbd042482addef9db83f835e6d77b84fb26a4ad7" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2850f3048c57104572aff425bdc2dc4877612dc6272e0b2ffabb591f298a51f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8572d2600655e04cc2e5ed5d09d9e811f6dc79e0e948ec9fc08e470cd3241184" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + on_macos do + conflicts_with "mpich", because: "both install `fabric.h`" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + assert_match "provider: sockets", shell_output("#{bin}/fi_info") + end +end diff --git a/Formula/lib/libfaketime.rb b/Formula/lib/libfaketime.rb new file mode 100644 index 0000000000000..b1e117add3169 --- /dev/null +++ b/Formula/lib/libfaketime.rb @@ -0,0 +1,49 @@ +class Libfaketime < Formula + desc "Report faked system time to programs" + homepage "https://github.com/wolfcw/libfaketime" + url "https://github.com/wolfcw/libfaketime/archive/refs/tags/v0.9.10.tar.gz" + sha256 "729ad33b9c750a50d9c68e97b90499680a74afd1568d859c574c0fe56fe7947f" + license "GPL-2.0-only" + head "https://github.com/wolfcw/libfaketime.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "bfd710155f5264eb161cb1b25858b737bca3981693b1dbbe0cebfc7f75edd1c7" + sha256 arm64_sonoma: "1f61121e94582fee4405d79d0cea2216f9cc1f148b3b8a4b0a030eb23ee24c4b" + sha256 arm64_ventura: "7f785f03ad7e595192943ab0857be128021577226f265f59f1427812a844d160" + sha256 arm64_monterey: "5e1401f985723d43a90e1789f6e765832245d1c9a70de598a978f0a4d06b4ea8" + sha256 arm64_big_sur: "8f8f919d1e7fcce1610432468d8b5a73209b863df199ea6c2faf3a541e526ade" + sha256 sonoma: "f96cbea8d4f2254f1a6aaed12b48a18c39a16b0da947380799b363ee161d5841" + sha256 ventura: "c0a4c19fab989e38a1dfefa0caef9ebf3a6f75d038b6f725aca7800482337857" + sha256 monterey: "0ec1aa518fba8d2e20ff358fdeac7ab640488eeb47dcbdf7900601d53c79b7ce" + sha256 big_sur: "d852f9c059965fb8750e5202c6b59ed6806dbc19d0aac339dfec71cca3856dbc" + sha256 catalina: "c826fdd7a0b8b1be7a8957665ddf3403bbc9e12f9da052a616e714c80c429602" + sha256 arm64_linux: "12776ac58f5b2a9c124452dda8c7eb796dace45efff485921461264f2b5d62c0" + sha256 x86_64_linux: "a30d8e38cbe2d90d06ceb803a766750c07c5b2034931db350b6eca7879343eae" + end + + on_macos do + # The `faketime` command needs GNU `gdate` not BSD `date`. + # See https://github.com/wolfcw/libfaketime/issues/158 and + # https://github.com/Homebrew/homebrew-core/issues/26568 + depends_on "coreutils" + depends_on macos: :sierra + end + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(void) { + printf("%d\\n",(int)time(NULL)); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test" + assert_match "1230106542", shell_output("TZ=UTC #{bin}/faketime -f '2008-12-24 08:15:42' ./test").strip + end +end diff --git a/Formula/lib/libfastjson.rb b/Formula/lib/libfastjson.rb new file mode 100644 index 0000000000000..d1d64bb97f30f --- /dev/null +++ b/Formula/lib/libfastjson.rb @@ -0,0 +1,62 @@ +class Libfastjson < Formula + desc "Fast json library for C" + homepage "https://github.com/rsyslog/libfastjson" + url "https://download.rsyslog.com/libfastjson/libfastjson-1.2304.0.tar.gz" + sha256 "ef30d1e57a18ec770f90056aaac77300270c6203bbe476f4181cc83a2d5dc80c" + license "BSD-2-Clause" + + livecheck do + url "https://download.rsyslog.com/libfastjson/" + regex(/href=.*?libfastjson[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e9a8424dc257099992210434ed1b30517d31ea60793715f5b2878421144ffa9e" + sha256 cellar: :any, arm64_sonoma: "a9ca39524509a82daa588a69d3f7cf2c930a9fd4343279a3ecf86ec47391852a" + sha256 cellar: :any, arm64_ventura: "60241a76f124b053b86c2d2aae88bc9655dde27ac892314e557e609346f42a9a" + sha256 cellar: :any, arm64_monterey: "f609552d56e43460541b5727b4eeca56b6e1fe1869d2568a9f169391d7a8babb" + sha256 cellar: :any, arm64_big_sur: "34043c498dfd2eb920d60d9911d858ff876e425d8f4446832bf32845579ff3ab" + sha256 cellar: :any, sonoma: "d96f3473d8f41f3f2ebbe16c6749d7843b512ad125189015f901d4f2a0dc0fbd" + sha256 cellar: :any, ventura: "95477fb9a28ae78daed53b78035ef03fbee4479deb174cabc30e9ba2fbf5e265" + sha256 cellar: :any, monterey: "bb6916ba89160f0ec9f1905f663f0b0c623bd89a89880c7102310bf48e377ed5" + sha256 cellar: :any, big_sur: "2464cf02ed9f97e440aefc678d7333af4c863d662f27692f7e72b1a1f8f0aae2" + sha256 cellar: :any_skip_relocation, arm64_linux: "d299d0516956ab148eeb6852c910e20e3e70c8629e039a7d8cfe861257659fbc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "266edab578eec8f218daa890d0a7e17460a241a61b0a50bbd5ca31d2f4a03c5d" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + char json_string[] = "{\\"message\\":\\"Hello world!\\"}"; + struct fjson_object* root; + struct fjson_object* message; + + root = fjson_tokener_parse(json_string); + if (root == NULL) { + fprintf(stderr, "Parsing failed\\n"); + return 1; + } + + if (fjson_object_object_get_ex(root, "message", &message)) { + printf("%s\\n", fjson_object_get_string(message)); + } else { + fprintf(stderr, "Failed to get 'message' field\\n"); + } + + fjson_object_put(root); + + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lfastjson", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libff.rb b/Formula/lib/libff.rb new file mode 100644 index 0000000000000..f10becce26128 --- /dev/null +++ b/Formula/lib/libff.rb @@ -0,0 +1,62 @@ +class Libff < Formula + desc "C++ library for Finite Fields and Elliptic Curves" + homepage "https://github.com/scipr-lab/libff" + # pull from git tag to get submodules + url "https://github.com/scipr-lab/libff.git", + tag: "v0.2.1", + revision: "5835b8c59d4029249645cf551f417608c48f2770" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "2dfacbd13db9702a3a458660201374cff23f4c7fd509585410cb0dd937214f28" + sha256 cellar: :any, arm64_sonoma: "b0d7b1dc5eff5d62a517a534be42b362918f51d64cca55a13579d445fcbaec49" + sha256 cellar: :any, arm64_ventura: "12665fa3a1821e160992a72a91c67861ffd18fcc10bf255c20188474ec8785ac" + sha256 cellar: :any, arm64_monterey: "3f8fff685a6b4b00cb5dc78dad9927be27c22cfdbde465e1d7f49c08ea6a9d56" + sha256 cellar: :any, arm64_big_sur: "183ad3fd1bb600316578dc051b250a02c803b03ee43af471b3ea3bac249af0d5" + sha256 cellar: :any, sonoma: "9a90009291176dfd59e1e73c15d069663e72a477fcb2f51b09867c8cf45593c1" + sha256 cellar: :any, ventura: "b42e23e8c807c75ff7825ba73a348a3c94e6d4d31682da30377b237ad99c5e8d" + sha256 cellar: :any, monterey: "7e92d770effa52f27d690e55981eb4bbe164ab9266573b1554ae7efbf1870167" + sha256 cellar: :any, big_sur: "5c89ae786b7d9f035e65ca4a47a0f0008511a0ba701a2659c1194c2f55157507" + sha256 cellar: :any_skip_relocation, arm64_linux: "9339a1479a02fdbdd670479385040323050ada9e6022e4d4be3b167b8a477cac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0c274f4e83f703347f24d6c6c487224b19c72eb4f199daecfbb6c794380cd17" + end + + depends_on "cmake" => :build + depends_on "openssl@3" => :build + + depends_on "gmp" + + def install + # bn128 is somewhat faster, but requires an x86_64 CPU + curve = Hardware::CPU.intel? ? "BN128" : "ALT_BN128" + + # build libff dynamically. The project only builds statically by default + inreplace "libff/CMakeLists.txt", "STATIC", "SHARED" + + system "cmake", "-S", ".", "-B", "build", + "-DWITH_PROCPS=OFF", + "-DCURVE=#{curve}", + "-DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix}", + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + using namespace libff; + + int main(int argc, char *argv[]) { + edwards_pp::init_public_params(); + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-I#{include}", "-L#{lib}", "-lff", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libffcall.rb b/Formula/lib/libffcall.rb new file mode 100644 index 0000000000000..746a0f6983cab --- /dev/null +++ b/Formula/lib/libffcall.rb @@ -0,0 +1,56 @@ +class Libffcall < Formula + desc "GNU Foreign Function Interface library" + homepage "https://www.gnu.org/software/libffcall/" + url "https://ftp.gnu.org/gnu/libffcall/libffcall-2.5.tar.gz" + mirror "https://ftpmirror.gnu.org/gnu/libffcall/libffcall-2.5.tar.gz" + sha256 "7f422096b40498b1389093955825f141bb67ed6014249d884009463dc7846879" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e93c50e4766acad117fedb1330c4f90b07d0badda4f3d63aa9a19aa648ac4432" + sha256 cellar: :any, arm64_sonoma: "ec1b54aeab6d34a9ab35e7e376ed02847f08a29de71a3d4768fa96954327127c" + sha256 cellar: :any, arm64_ventura: "958171b0bcdc0974726cfff41c6de58c7e4f90017b4fb9d881b968e8d1612fdf" + sha256 cellar: :any, arm64_monterey: "89ae257133dd08f737b51cafdbb62ee4aa5d6896d21f78e95673985a6639d265" + sha256 cellar: :any, sonoma: "39a00f8aa8c633d254f3dd8de7cd584e825a71d135b9ca3455dad8b1efe4169f" + sha256 cellar: :any, ventura: "ad7787776409d59f5b45119a6b799af71c09a7ab6f50970e4b563cb1b6d5e150" + sha256 cellar: :any, monterey: "d625f99cb896c08b3aeccfda72807c229e079f923f83be78a96d9d0433d47a03" + sha256 cellar: :any_skip_relocation, arm64_linux: "12c0105ace9d81015418ec1ffb4226ba5b249c107c5dc0aa679a97b20afa4ced" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d42265685ccd225935b647212b027cabcf753fdd4c7f2596d9e30f3be1e8d40" + end + + def install + ENV.deparallelize + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"callback.c").write <<~C + #include + #include + + typedef char (*char_func_t) (); + + void function (void *data, va_alist alist) + { + va_start_char(alist); + va_return_char(alist, *(char *)data); + } + + int main() { + char *data = "abc"; + callback_t callback = alloc_callback(&function, data); + printf("%s\\n%c\\n", + is_callback(callback) ? "true" : "false", + ((char_func_t)callback)()); + free_callback(callback); + return 0; + } + C + flags = ["-L#{lib}", "-lffcall", "-I#{lib}/libffcall-#{version}/include"] + system ENV.cc, "-o", "callback", "callback.c", *(flags + ENV.cflags.to_s.split) + output = shell_output("#{testpath}/callback") + assert_equal "true\na\n", output + end +end diff --git a/Formula/lib/libffi.rb b/Formula/lib/libffi.rb new file mode 100644 index 0000000000000..89c9d313034bb --- /dev/null +++ b/Formula/lib/libffi.rb @@ -0,0 +1,91 @@ +class Libffi < Formula + desc "Portable Foreign Function Interface library" + homepage "https://sourceware.org/libffi/" + url "https://github.com/libffi/libffi/releases/download/v3.4.8/libffi-3.4.8.tar.gz" + sha256 "bc9842a18898bfacb0ed1252c4febcc7e78fa139fd27fdc7a3e30d9d9356119b" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "72cdf45be8925928df2c880faa24261b8a71dda1996caa50f4ce4bdf4d1e95f3" + sha256 cellar: :any, arm64_sonoma: "651001f28aaff71f1e5a8a5972a0c5580fb62dd6ea090303864e5ebec60567bb" + sha256 cellar: :any, arm64_ventura: "cce541626d83ab0975f9d117d338ca430ce93dd6bd8a1e0a0da5db1e16043497" + sha256 cellar: :any, sonoma: "d90b539a53c4e58aca72ba735b7f25bcaa5b631b049ab4f49482e379210823ef" + sha256 cellar: :any, ventura: "f8ea26ec45f4a7a563cb81aa5c8fefb32741799e80819e8c8571cf9fd7c62b36" + sha256 cellar: :any_skip_relocation, arm64_linux: "6771f1c17f35b6bee6748bbff759728ebfc9cb36155088fffe8f0f1e9d1b4c0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3dd4f7ce49728e37e9f8f868a8b85bdca6279b2f7781feb96b9e4bb400c18a0" + end + + head do + url "https://github.com/libffi/libffi.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + keg_only :provided_by_macos + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"closure.c").write <<~C + #include + #include + + /* Acts like puts with the file given at time of enclosure. */ + void puts_binding(ffi_cif *cif, void *ret, void** args, void *stream) + { + *(unsigned int *)ret = fputs(*(char **)args[0], (FILE *)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; + } + C + + 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/lib/libfido2.rb b/Formula/lib/libfido2.rb new file mode 100644 index 0000000000000..78498234d2c79 --- /dev/null +++ b/Formula/lib/libfido2.rb @@ -0,0 +1,65 @@ +class Libfido2 < Formula + desc "Provides library functionality for FIDO U2F & FIDO 2.0, including USB" + homepage "https://developers.yubico.com/libfido2/" + url "https://github.com/Yubico/libfido2/archive/refs/tags/1.16.0.tar.gz" + sha256 "7d86088ef4a48f9faad4ff6f41343328157849153a8dc94d88f4b5461cb29474" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fc3ca624819563b43e5ddc18ea7f391df1573e4e392a8a49c6aa3a510973f4dd" + sha256 cellar: :any, arm64_sonoma: "763d62c0d6240560ccdb3249477b7461e941454d8b4697a0d14a4d174eb9a6c4" + sha256 cellar: :any, arm64_ventura: "64bd12fd3d3f964e781ac631f6f8dae04be4736111e857f17fd65a3cfe37c132" + sha256 cellar: :any, sonoma: "2bd458622e779d77c7ae6c359d29223a070ebbb89fcf0324db7671ac30ce8aa5" + sha256 cellar: :any, ventura: "c8a44132a8e43fb1dd859cf5f17192a453711ff251f12571bf0e926b86c60fc3" + sha256 cellar: :any_skip_relocation, arm64_linux: "e85e993e3403b124faafd3ab0c1a16ff9b494f54766f504e90e83bf62fe40675" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98507976bf7cd461abce2639656bd4456c0e2f52fee5bcd384a7cbec474a28ff" + end + + depends_on "cmake" => :build + depends_on "mandoc" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "libcbor" + depends_on "openssl@3" + + uses_from_macos "zlib" + + on_linux do + depends_on "systemd" # for libudev + end + + def install + args = OS.linux? ? ["-DUDEV_RULES_DIR=#{lib}/udev/rules.d"] : [] + + system "cmake", "-S", ".", "-B", ".", *args, *std_cmake_args + system "cmake", "--build", "." + system "cmake", "--build", ".", "--target", "man_symlink_html" + system "cmake", "--build", ".", "--target", "man_symlink" + system "cmake", "--install", "." + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(void) { + fido_init(FIDO_DEBUG); + // Attempt to enumerate up to five FIDO/U2F devices. Five is an arbitrary number. + size_t max_devices = 5; + fido_dev_info_t *devlist; + if ((devlist = fido_dev_info_new(max_devices)) == NULL) + return 1; + size_t found_devices = 0; + int error; + if ((error = fido_dev_info_manifest(devlist, max_devices, &found_devices)) == FIDO_OK) + printf("FIDO/U2F devices found: %s\\n", found_devices ? "Some" : "None"); + fido_dev_info_free(&devlist, max_devices); + } + C + + flags = shell_output("pkgconf --cflags --libs libfido2").chomp.split + system ENV.cc, "test.c", "-I#{include}", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libfishsound.rb b/Formula/lib/libfishsound.rb new file mode 100644 index 0000000000000..5771f009b2c5a --- /dev/null +++ b/Formula/lib/libfishsound.rb @@ -0,0 +1,31 @@ +class Libfishsound < Formula + desc "Decode and encode audio data using the Xiph.org codecs" + homepage "https://xiph.org/fishsound/" + url "https://ftp.osuosl.org/pub/xiph/releases/libfishsound/libfishsound-1.0.1.tar.gz" + mirror "https://mirror.csclub.uwaterloo.ca/xiph/releases/libfishsound/libfishsound-1.0.1.tar.gz" + sha256 "03eb1601e2306adc88c776afdf212217c6547990d2d0f9ca544dad9a8a9dbb8f" + license "BSD-3-Clause" + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/libfishsound/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)libfishsound[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "316f6dd41ed7a843e382feacdaae02401cdf541c064f6802b95678aa1457a6d2" + sha256 cellar: :any, arm64_sonoma: "fde7d0521745d9a556999337b24fac1422d8f1c07302de7be5d892157dc88c5f" + sha256 cellar: :any, arm64_ventura: "4fe1b44bee66fc57a820a3838cc0d38cf410b1f22a88c56dd996072edff460de" + sha256 cellar: :any, sonoma: "dc4573276c3c89484244b1ab2b121ab7d954d6e360c1a0e170dcaceb6d829e24" + sha256 cellar: :any, ventura: "a6ff774dad2e7d8bd2d46a33192b0aa1d53f6b34a6fbf49da9cc7a5d2718fd65" + sha256 cellar: :any_skip_relocation, arm64_linux: "b5706aa37fd98136ce0e3a9f3d3293d5483bb92e6f768163ffaef10267155d95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cfaa33c5d408f6f60308bc962a9815b0456de64c8f559c797589ab3f4118f4c3" + end + + depends_on "pkgconf" => :build + depends_on "libvorbis" + + def install + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/lib/libfixbuf.rb b/Formula/lib/libfixbuf.rb new file mode 100644 index 0000000000000..4a765b444f49e --- /dev/null +++ b/Formula/lib/libfixbuf.rb @@ -0,0 +1,63 @@ +class Libfixbuf < Formula + desc "Implements the IPFIX Protocol as a C library" + homepage "https://tools.netsa.cert.org/fixbuf/" + url "https://tools.netsa.cert.org/releases/libfixbuf-2.5.1.tar.gz" + sha256 "e75a463855a3d8a6060860f6490e79dee3305e650bbb60111c4dae8e52cbdae7" + license "LGPL-3.0-only" + + # NOTE: This should be updated to check the main `/fixbuf/download.html` + # page when it links to a stable version again in the future. + livecheck do + url "https://tools.netsa.cert.org/fixbuf2/download.html" + regex(/["'][^"']*?libfixbuf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "eb0844f675d129e9c133bc28bbd5d9b1915b429f5f761094d3ff2db7563df0d6" + sha256 cellar: :any, arm64_sonoma: "4966c36322bf9c69e915c226185d00499bd66e0499d42700c8079bbe4e9517a1" + sha256 cellar: :any, arm64_ventura: "6f143991654646e12feff3b8cd2f951e1ce21ce42c48b2093f5fb676d22b165e" + sha256 cellar: :any, sonoma: "d68ce40ce5149760d24d0fb26511ec462d4491b9766dbfcd35afdde6bf365932" + sha256 cellar: :any, ventura: "dce1cab17bef5b90dad6064628703f5c6d35ec630b2158b8d2dc5f8a347adbe4" + sha256 cellar: :any_skip_relocation, arm64_linux: "34bf31cf7ae49ee6cdc4d4fa074d35d68a567cdfa9d89fc7fe958e15eeeca51a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e2f2ea84ed0a6cfafd82cca320ae2626d9240b10265318eb26300b5e88ca6df3" + end + + depends_on "pkgconf" => [:build, :test] + + depends_on "glib" + depends_on "openssl@3" + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + "--mandir=#{man}", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + fbInfoModel_t *model = fbInfoModelAlloc(); + if (model == NULL) { + printf("Failed to allocate InfoModel\\n"); + return 1; + } + + printf("Successfully allocated InfoModel\\n"); + fbInfoModelFree(model); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libfixbuf").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libfixposix.rb b/Formula/lib/libfixposix.rb new file mode 100644 index 0000000000000..9b903e86d5c93 --- /dev/null +++ b/Formula/lib/libfixposix.rb @@ -0,0 +1,61 @@ +class Libfixposix < Formula + desc "Thin wrapper over POSIX syscalls" + homepage "https://github.com/sionescu/libfixposix" + url "https://github.com/sionescu/libfixposix/archive/refs/tags/v0.5.1.tar.gz" + sha256 "5d9d3d321d4c7302040389c43f966a70d180abb58d1d7df370f39e0d402d50d4" + license "BSL-1.0" + head "https://github.com/sionescu/libfixposix.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "23db0bbb66f78f226e8f1c3391e6f098be1410f1e914367ef4efbf2322870e16" + sha256 cellar: :any, arm64_sonoma: "17e8781690ca305f8a30593f08d99358d99b1e8963e713aeb18a2c06d8e0a7e9" + sha256 cellar: :any, arm64_ventura: "fa1e934fadfdcf752a4cadf5c48158c2c07640b513963bb7430f155a3f807205" + sha256 cellar: :any, arm64_monterey: "c970ea63811367c2464438b9b67621a2b268e60a2b836bbddaeee987c2d09719" + sha256 cellar: :any, arm64_big_sur: "338f883d482e6a1b21a91de414fcdd8ba6960ccab9658123568845b2c5d05644" + sha256 cellar: :any, sonoma: "86e9405e5c780a7011555ea50b980d32fbb1721f0ba53a6acb890a1e292a004d" + sha256 cellar: :any, ventura: "ae6bf46d3e2ef00c82034f6e63068f58bf3f0d1717d245bc319ba38f3b16cb71" + sha256 cellar: :any, monterey: "1d7590797c0860a0d26dd646ce2b7e3fbd1c3a4822fc6a4fcd811abb42c8e0c8" + sha256 cellar: :any, big_sur: "e943656ff8b13e2b577be3098534a2a6d2c4de9494b1a93b34d303fd4c79a388" + sha256 cellar: :any, catalina: "e683efeabc1a25cea8a7d56701ed332d7bac33f608e9501e05f51a0e1cbf86ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "c830b4e29003a72949cc73e2ff51ef21f8794799f0419dcde5aad13fccf311a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af87e982e579778df2e7e49331b81489445e30753fe9397f340dc95f293f43ec" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"mxstemp.c").write <<~C + #include + + #include + + int main(void) + { + fd_set rset, wset, eset; + + lfp_fd_zero(&rset); + lfp_fd_zero(&wset); + lfp_fd_zero(&eset); + + for(unsigned i = 0; i < FD_SETSIZE; i++) { + if(lfp_fd_isset(i, &rset)) { + printf("%d ", i); + } + } + + return 0; + } + C + system ENV.cc, "mxstemp.c", lib/shared_library("libfixposix"), "-o", "mxstemp" + system "./mxstemp" + end +end diff --git a/Formula/lib/libflowmanager.rb b/Formula/lib/libflowmanager.rb new file mode 100644 index 0000000000000..dd6d18cf8aef4 --- /dev/null +++ b/Formula/lib/libflowmanager.rb @@ -0,0 +1,46 @@ +class Libflowmanager < Formula + desc "Flow-based measurement tasks with packet-based inputs" + homepage "https://github.com/LibtraceTeam/libflowmanager" + url "https://github.com/LibtraceTeam/libflowmanager/archive/refs/tags/v3.0.0.tar.gz" + sha256 "ab60c9c9611488e51c14b6e3870f91a191236dced12f0ed16a58cdd2c08ee74f" + license "LGPL-3.0-or-later" + revision 2 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "4d11252d0bcaa2587f52e22e4ac3eb28c2115c7204aaf31594e542b2152bc3ef" + sha256 cellar: :any, arm64_sonoma: "3d90d67b16c2dbff2d04c17f234e4b4eba726191a60a284e5b1f5b4718a00570" + sha256 cellar: :any, arm64_ventura: "580edce84318af1d6c9a1fb34e131b54ee82c9f8c949f3fa1e314b240d44f514" + sha256 cellar: :any, arm64_monterey: "a86cc22af11e7199cbdd65a190fb6621b816bf5b01c0e9e6d3cd9f69fa190656" + sha256 cellar: :any, arm64_big_sur: "85deb8a52e3eb34eaefa5851c1017f77cbad2767968dbb22dc434f1dfba03766" + sha256 cellar: :any, sonoma: "8cfa25c922ff04f9012e8f41683f69a94907d37a9d183ec734c49554a512df3a" + sha256 cellar: :any, ventura: "db47efecc48ea69795a1ee1317217d63825d25678ab8a25fdb5da6bd7daa043d" + sha256 cellar: :any, monterey: "55a184421e4903a2de88d74bfbb7dc46dcdb649778f01ce7e13b1315d8803279" + sha256 cellar: :any, big_sur: "cb56969ba9c9417ca57ea914fd33358260cdec432b7fae979cfbde80d27ad3bc" + sha256 cellar: :any_skip_relocation, arm64_linux: "90b6a7d18fac55711aeaa7c43caa493db1684451a2d89d2694b8b4fca2b84a28" + sha256 cellar: :any_skip_relocation, x86_64_linux: "447c6ca7a8d3774ddc4e5adcb21b9735aff22be9287bb6fbd054e7cd95063286" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libtrace" + + # Fix: tcp_reorder.c:74:30: error: ‘UINT32_MAX’ undeclared (first use in this function) + # Remove in the next release + patch do + url "https://github.com/LibtraceTeam/libflowmanager/commit/a60a04a3b4a12faf48854b34908f9db0c4f080b0.patch?full_index=1" + sha256 "15d93f863374eff428c69e6e1733bdc861c831714f8d7d7c1323ebf1b9ba9a4c" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/lib/libfontenc.rb b/Formula/lib/libfontenc.rb new file mode 100644 index 0000000000000..bfa967fd65d55 --- /dev/null +++ b/Formula/lib/libfontenc.rb @@ -0,0 +1,51 @@ +class Libfontenc < Formula + desc "X.Org: Font encoding library" + homepage "https://www.x.org/" + url "https://xorg.freedesktop.org/archive/individual/lib/libfontenc-1.1.8.tar.xz" + sha256 "7b02c3d405236e0d86806b1de9d6868fe60c313628b38350b032914aa4fd14c6" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5e4228d360d809601a62a880d67db005d4a9d3a92ddfbf47e6c6d0154f258bcd" + sha256 cellar: :any, arm64_sonoma: "67887ebe92518e43424e8b468b310fde9ab42d9791d387d59519cdbfb4a2f43c" + sha256 cellar: :any, arm64_ventura: "15cec1b1e8ca8856aa59de28068cd187831281b1376597d7bb87c5f79b80e10c" + sha256 cellar: :any, arm64_monterey: "129b929cf9305162d58922cce06530c4c1da2968adc292503240105c454bae67" + sha256 cellar: :any, sonoma: "bddef82fa135b48fa58485df06f80aeda327ac2e77a4fdb05d3543135c123692" + sha256 cellar: :any, ventura: "ce1f99b92616293e816e6d04918e1570ff18ed052ba6cdcb66115ceee37d9240" + sha256 cellar: :any, monterey: "4f2d62d14136a1c6ca9e4f01d1b1bf454c9e90bc6eb3f50e6bff76a631ac0621" + sha256 cellar: :any_skip_relocation, arm64_linux: "484aac796b8b64a4cf00668a052c6734851f54de232c684a48255245bf7898f9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f29d93ac7c98c61ac6e50b6d057bac244b13eb52046af1634ee623f452b1c5e" + end + + depends_on "font-util" => :build + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "xorgproto" => :build + + uses_from_macos "zlib" + + 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 + (testpath/"test.c").write <<~C + #include "X11/fonts/fontenc.h" + + int main(int argc, char* argv[]) { + FontMapRec rec; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libforensic1394.rb b/Formula/lib/libforensic1394.rb new file mode 100644 index 0000000000000..5b9e0d8bfccd7 --- /dev/null +++ b/Formula/lib/libforensic1394.rb @@ -0,0 +1,57 @@ +class Libforensic1394 < Formula + desc "Live memory forensics over IEEE 1394 (\"FireWire\") interface" + homepage "https://freddie.witherden.org/tools/libforensic1394/" + url "https://freddie.witherden.org/tools/libforensic1394/releases/libforensic1394-0.2.tar.gz" + sha256 "50a82fe2899aa901104055da2ac00b4c438cf1d0d991f5ec1215d4658414652e" + license "LGPL-3.0-or-later" + head "https://github.com/FreddieWitherden/libforensic1394.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?libforensic1394[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "a3ae5e839007a8f6cfa3ca2e176285a889085333678c2b5edc095d22326e8aa6" + sha256 cellar: :any, arm64_sonoma: "466e7d42777a5f74b206d6dfec30b026f6d61ad6a2c0c7e382ab21f9f09b4973" + sha256 cellar: :any, arm64_ventura: "b6210bfd2d11092c436dcc8732f3848795dc06af4cc97e77b51536fdec7eb4d4" + sha256 cellar: :any, arm64_monterey: "2d9682194518c3caddd083694da02163afa45a5cff22a0855103da7dcccf2efa" + sha256 cellar: :any, arm64_big_sur: "e199817199f736890486c3667735acf01876563584bdcde56b2671ac85707ba9" + sha256 cellar: :any, sonoma: "bcfdd8e4b4c60cf26c7334bbe1d94133022a918a892f2fa0da85adde296d76b3" + sha256 cellar: :any, ventura: "f8b26ec8f4ee3f3e3973330d791c1c2aed6b22277eb2991af7ac97f3192d821d" + sha256 cellar: :any, monterey: "9a686c1a201ffec188f8748e5f88436097f665549c89c090a99ec94642c268da" + sha256 cellar: :any, big_sur: "f7405930e26a2b4c9cbe939e6121fe0c20fc3b68015f899e91ba4bba75bdbdbb" + sha256 cellar: :any, catalina: "4b9746197d1e43ee78530b552e42a6e6cc96908267db1685076f6e283983ab0f" + sha256 cellar: :any, mojave: "90e2abdc0baef51cfb97b8f9d130f99e2ad5e1eda990f7e6fc29c0e0d1e2f79a" + sha256 cellar: :any, high_sierra: "5e919cf8bce0747630324f0c203bbd1aef4d7e17d278f42bcbece48da2229c8f" + sha256 cellar: :any, sierra: "e747c5c6797d48070c4a4199fe38021cd0164a052e14b21005b9caf4a47a6e3c" + sha256 cellar: :any, el_capitan: "d850e7c3a04b206c6219c75ba0a00723e9a25d0c97831de289320ef0cc076aae" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd8c375607751d566f21f16c71a8ed78ec3e4b6511d8ff5f439760c35e2ebd64" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c997e0a787bfd5280159d056a014bbf9eda79db06cc1873d9126712a5f6ece2f" + 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 + #include + int main() { + forensic1394_bus *bus; + bus = forensic1394_alloc(); + assert(NULL != bus); + forensic1394_destroy(bus); + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lforensic1394", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libformfactor.rb b/Formula/lib/libformfactor.rb new file mode 100644 index 0000000000000..c9978840cd0ec --- /dev/null +++ b/Formula/lib/libformfactor.rb @@ -0,0 +1,77 @@ +class Libformfactor < Formula + desc "C++ library for the efficient computation of scattering form factors" + homepage "https://jugit.fz-juelich.de/mlz/libformfactor" + url "https://jugit.fz-juelich.de/mlz/libformfactor/-/archive/v0.3.2/libformfactor-v0.3.2.tar.bz2" + sha256 "b5cdb57fcbde6b39e314d7a040466a863f25625f112057e6d369a9ea5049dc1f" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fb97d04d8d908e6c984e441f0a24356b1ce5693041245d48cdf06ef77e7ce28a" + sha256 cellar: :any, arm64_sonoma: "06e3adc03557c8b8111e7c23406cfcbac96b2a8037aa35d1e5f5c7525bf44bab" + sha256 cellar: :any, arm64_ventura: "20e9a3db52b38f4e8645bd4a3af04e05b1ffd06115e038bf66f7ae8cfb23d6be" + sha256 cellar: :any, sonoma: "c6b8de734ab738d9d954932e1c717c530435806fe98ebe7b51914ba70751ab99" + sha256 cellar: :any, ventura: "f77a4e09e46d58072891abb9a8a24ffb3b699b7468f0c51052f1b1e6c218ec52" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb7155f05e1a721fd97a1136e91a7c136d98e92f3ab363f02e8f12c627727766" + sha256 cellar: :any_skip_relocation, x86_64_linux: "60f902e487db84a1d1dd8a8c2e29c4ffcecd6a635d3c2404515ecefe7f1402c5" + end + + depends_on "cmake" => :build + depends_on "libheinz" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DLibHeinz_DIR=#{Formula["libheinz"].opt_prefix}/cmake", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"fftest.cpp").write <<~CPP + #include + #include + #include + #include // abs + + bool CHECK_NEAR(const double value, const double expected, const double tol) + { + return std::abs(value - expected) <= tol; + } + + bool test_asPolyhedron_prism() + { + ff::Prism prism(false, 1, {{-0.5, -0.5, 0}, {-0.5, 0.5, 0}, {0.5, 0.5, 0}, {0.5, -0.5, 0}}); + ff::Polyhedron* polyhedron = prism.asPolyhedron(); + + const bool test0 = (polyhedron->faces().size() == 6); + const bool test1 = CHECK_NEAR(polyhedron->vertices()[4].z(), 0.5, 1E-13); + const bool test2 = CHECK_NEAR(polyhedron->vertices()[5].z(), 0.5, 1E-13); + const bool test3 = CHECK_NEAR(polyhedron->vertices()[6].z(), 0.5, 1E-13); + const bool test4 = CHECK_NEAR(polyhedron->vertices()[7].z(), 0.5, 1E-13); + + return test0 && test1 && test2 && test3 && test4; + } + + bool test_faceCenter_CenteredRectangle() + { + // FaceCenter:CenteredRectangle + ff::Face face({{-0.5, -1.4, 0}, {-0.5, 1.4, 0}, {0.5, 1.4, 0}, {0.5, -1.4, 0}}, true); + const R3 center = face.center_of_polygon(); + const bool test1 = std::abs(center.x()) <= 1e-13; + const bool test2 = std::abs(center.y()) <= 1e-13; + const bool test3 = std::abs(center.z()) <= 1e-13; + + return test1 && test2 && test3; + } + + int main() + { + const bool all_tests = test_asPolyhedron_prism() && test_faceCenter_CenteredRectangle(); + return all_tests? 0 : 1; + } + CPP + + system ENV.cxx, "-std=c++17", "fftest.cpp", "-I#{include}", "-L#{lib}", "-lformfactor", "-o", "fftest" + system "./fftest" + end +end diff --git a/Formula/lib/libfreefare.rb b/Formula/lib/libfreefare.rb new file mode 100644 index 0000000000000..b841da6bed979 --- /dev/null +++ b/Formula/lib/libfreefare.rb @@ -0,0 +1,61 @@ +class Libfreefare < Formula + desc "API for MIFARE card manipulations" + homepage "https://github.com/nfc-tools/libfreefare" + url "https://github.com/nfc-tools/libfreefare/releases/download/libfreefare-0.4.0/libfreefare-0.4.0.tar.bz2" + sha256 "bfa31d14a99a1247f5ed49195d6373de512e3eb75bf1627658b40cf7f876bc64" + license "LGPL-3.0-or-later" + revision 4 + + bottle do + sha256 cellar: :any, arm64_sequoia: "2a601550aaba3113176cbb9c284f263faab1cacdadaa841ca48ffac4cc36ea70" + sha256 cellar: :any, arm64_sonoma: "be04856cd0edfb30a50104ea7fd3a5b7ce66c25921179415eddd8542b328d3a0" + sha256 cellar: :any, arm64_ventura: "6d9f13777430e1e406a80bb919603e2e1f823a84628ff9a6c27786e97077015b" + sha256 cellar: :any, arm64_monterey: "dd6a7123a899f9ea2e0f2f1bb96ee61510d384db5dcda776968e5f642cdb3b1a" + sha256 cellar: :any, arm64_big_sur: "07bb6816871ab4f86df23f9929b7f5830b3203ee8573c61c1162155665be1cf6" + sha256 cellar: :any, sonoma: "cf47d28d3d12d295a911f266dcc2f1b124d333200214b835e41ae8d19f22c28a" + sha256 cellar: :any, ventura: "9bdc20fc20c01740f5e5c9f038e475f5ca940bf53f106884c5efa2a8b9bf78f5" + sha256 cellar: :any, monterey: "e88a2a0561e9bd91bcdda69fdec347abfa715876a540da3f5e12d71488ad4921" + sha256 cellar: :any, big_sur: "caf07c0af324770ece19c45f53697c88cedc651cad24c66e257fbb7b87391fc7" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d7bc10990f7f8f1e0a2d2ff7888f98176bfcc2ef4f19aee6c9465a46947dfb9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3837eb7894980557e16a097e05bc2fa8d42429177f30359166820cca640cc52" + end + + depends_on "pkgconf" => :build + depends_on "libnfc" + depends_on "openssl@3" + + on_macos do + depends_on "libusb-compat" + end + + # Upstream commit for endianness-related functions, fixes + # https://github.com/nfc-tools/libfreefare/issues/55 + patch do + url "https://github.com/nfc-tools/libfreefare/commit/358df775.patch?full_index=1" + sha256 "20d592c11e559d0a5f02f7ed56da370e39439feebd971be11b064d58ea85777f" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + mifare_desfire_aid_new(0); + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lfreefare", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libfreehand.rb b/Formula/lib/libfreehand.rb new file mode 100644 index 0000000000000..165ad551eb77b --- /dev/null +++ b/Formula/lib/libfreehand.rb @@ -0,0 +1,71 @@ +class Libfreehand < Formula + desc "Interpret and import Aldus/Macromedia/Adobe FreeHand documents" + homepage "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand" + url "https://dev-www.libreoffice.org/src/libfreehand/libfreehand-0.1.2.tar.xz" + sha256 "0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac" + license "MPL-2.0" + revision 5 + + livecheck do + url "https://dev-www.libreoffice.org/src/" + regex(/href=["']?libfreehand[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9eeb0bbec76d98ba004514dad9c9dc345a66fde115e25cada3fc837efcb764c7" + sha256 cellar: :any, arm64_sonoma: "10f6c8c203685f706e8290abc6a8c6833203142083d267f2ef271d34e998497b" + sha256 cellar: :any, arm64_ventura: "53c1bcbcf740c42c5900949f2859734be9f3aa4adfa28f42a521d6c1618a8797" + sha256 cellar: :any, arm64_monterey: "7960ce23fc10f7c545aa6ff36704340626b5652cdf514e2cc30abfd06923f158" + sha256 cellar: :any, arm64_big_sur: "1cd27b1d82fe6261a9def131e7a09143b35fe7547cbf539b720fc9d8bdc257b6" + sha256 cellar: :any, sonoma: "caca6cf46c41a2fb5e086122bf045c85ab46a93edaa793dcbe3ff74f67db637d" + sha256 cellar: :any, ventura: "eeccebb0f1538b6a31480588def2399898dc5b1a46ab208de2ffe9cdeb693fa3" + sha256 cellar: :any, monterey: "52bf47cdb858c77f4745bae826181ff0790fa3bad79e8997fb6b4a5702fa218a" + sha256 cellar: :any, big_sur: "736e40282e91275e85e6586f9601bebf05a7111e484776a3a1cf8df1e266b329" + sha256 cellar: :any, catalina: "337aeb3f1454487fc132f9d67e3662dc6c3f0ba40a38a9a9c58d9f0b9bfc1955" + sha256 cellar: :any, mojave: "b2e7566024327688b13ce6ba4a2bc93108d61d46923b0e6f59a6bc577ccc4eb9" + sha256 cellar: :any, high_sierra: "fed031e8bfce818f39ea578792a3ed1f1b74c9f86192f37b372e1c4fc493bc90" + sha256 cellar: :any_skip_relocation, arm64_linux: "36565f2d8aeeeab824700436476cb784c742a76d4b412397de179a6a43828880" + sha256 cellar: :any_skip_relocation, x86_64_linux: "231727d040b34c931b60d06ad1f0fa86d08dbde4d00736e6233645d635393a7f" + end + + depends_on "boost" => :build + depends_on "icu4c@77" => :build + depends_on "pkgconf" => :build + depends_on "librevenge" + depends_on "little-cms2" + + uses_from_macos "gperf" => :build + uses_from_macos "zlib" + + # remove with version >=0.1.3 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/7bb2149f314dd174f242a76d4dde8d95d20cbae0/libfreehand/0.1.2.patch" + sha256 "abfa28461b313ccf3c59ce35d0a89d0d76c60dd2a14028b8fea66e411983160e" + end + + def install + system "./configure", "--without-docs", + "--disable-static", + "--disable-werror", + "--disable-tests", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + libfreehand::FreeHandDocument::isSupported(0); + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", + "-I#{Formula["librevenge"].include}/librevenge-0.0", + "-I#{include}/libfreehand-0.1", + "-L#{Formula["librevenge"].lib}", + "-L#{lib}", + "-lrevenge-0.0", + "-lfreehand-0.1" + system "./test" + end +end diff --git a/Formula/lib/libfreenect.rb b/Formula/lib/libfreenect.rb new file mode 100644 index 0000000000000..494f6382704cc --- /dev/null +++ b/Formula/lib/libfreenect.rb @@ -0,0 +1,57 @@ +class Libfreenect < Formula + desc "Drivers and libraries for the Xbox Kinect device" + homepage "https://openkinect.org/" + url "https://github.com/OpenKinect/libfreenect/archive/refs/tags/v0.7.5.tar.gz" + sha256 "3c668053db726206a8c3a92e92e91ef7a64407968f422b9c4b828d0fd234c866" + license any_of: ["Apache-2.0", "GPL-2.0-only"] + head "https://github.com/OpenKinect/libfreenect.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "933ad28174edd8c5301568af01a0a14138166bc3abf51e09232b8feb6f5610a7" + sha256 cellar: :any, arm64_sonoma: "2aee8ccf6079d0f96b58e1301986514e2de5279f13fbc6f11dcb0415137069e8" + sha256 cellar: :any, arm64_ventura: "0a7c2f69766090429451b4922549d12c0fc9863a5a02a481996814692277c554" + sha256 cellar: :any, arm64_monterey: "f4451759cebfc907e6a83d2284cdcfd4250f84956623a35f59ec5904a3ff220b" + sha256 cellar: :any, sonoma: "b904426be3a9c6ed08769df3ff687a0864dcffb2175a508705783504fa62ee5c" + sha256 cellar: :any, ventura: "a925b6f78825af0effc793d6b7377e7280ff79ffc7dc3c5ebc4eb7543757bc11" + sha256 cellar: :any, monterey: "9e1a123c0203dcccea2b45d93dffaf1d53d8d4653fdef6897bcb56fa211e101a" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ae7b0d8bd7d70454f7179215f28270e75adb75b89fdd0c1ba54ee7f7ee0ac1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1719d3272072df8495b60651dbfa15b865d4db9e0e481a1a050ba04afca4fc13" + end + + depends_on "cmake" => :build + depends_on "libusb" + + def install + args = %W[ + -DBUILD_OPENNI2_DRIVER=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() { + freenect_context *ctx; + if (freenect_init(&ctx, NULL) < 0) { + printf("Failed to initialize libfreenect\\n"); + return 1; + } + printf("libfreenect initialized successfully\\n"); + freenect_shutdown(ctx); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lfreenect" + system "./test" + + system bin/"fakenect-record", "-h" + end +end diff --git a/Formula/lib/libfs.rb b/Formula/lib/libfs.rb new file mode 100644 index 0000000000000..42956cbd0e18a --- /dev/null +++ b/Formula/lib/libfs.rb @@ -0,0 +1,48 @@ +class Libfs < Formula + desc "X.Org: X Font Service client library" + homepage "https://www.x.org/" + url "https://xorg.freedesktop.org/archive/individual/lib/libFS-1.0.10.tar.gz" + sha256 "38daddf6aaad25d93c6ff762c9629b8f10b19e8c4b70fcf117ec38c440ff9ae2" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f6fa56b30b3705449138f8afb6ad4e4fcb67ade47f95e0ac73147c2c14f5a800" + sha256 cellar: :any, arm64_sonoma: "861860b63988d0167eebf30e0ec648471f880b3d4aba8ca48dc66c4532027826" + sha256 cellar: :any, arm64_ventura: "1536673a3015c07c20e3d0a49d8f752e61e5ea90f196d0a11212f68b06021598" + sha256 cellar: :any, arm64_monterey: "0fbbf2d8e77fec93a9c21cc94f7f0f1be3c9880bab4fb5da49e8b4afdfaf9821" + sha256 cellar: :any, sonoma: "1ea2f6712729fd699ea40714c86ef74c3126404df219122c38ea18b1ce03a6e0" + sha256 cellar: :any, ventura: "015e40efae665280299a9fef6e282e18cf16c47896bc7c0829d9fe3dd578d246" + sha256 cellar: :any, monterey: "2a035cdd2ef46765aece7a6f30e82d19d92e135841d74bca444c9b1d8d0a98e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "a0bc3bc73b7eeffd71ca62f12e9ff99684362f82ade1606e7646da3926013e4d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c17d8ae2548594b5aae02734f0c2804858754e00f2e1b2dcc38d5bc86086aa5e" + end + + depends_on "pkgconf" => :build + depends_on "xtrans" => :build + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/fonts/FSlib.h" + + int main(int argc, char* argv[]) { + FSExtData data; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libftdi.rb b/Formula/lib/libftdi.rb new file mode 100644 index 0000000000000..5a0d8209be0db --- /dev/null +++ b/Formula/lib/libftdi.rb @@ -0,0 +1,60 @@ +class Libftdi < Formula + desc "Library to talk to FTDI chips" + homepage "https://www.intra2net.com/en/developer/libftdi" + url "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.5.tar.bz2" + sha256 "7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049" + license "LGPL-2.1-only" + revision 2 + + livecheck do + url "https://www.intra2net.com/en/developer/libftdi/download.php" + regex(/href=.*?libftdi1[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c53870c2c84cf0918cbf27dfa0f62b3dc331072846980ef86243f506e1752f7a" + sha256 cellar: :any, arm64_sonoma: "63ffb0285cabb32fb40e7f609ba8e63da9c0452e30400bd9261218bd3e393b9f" + sha256 cellar: :any, arm64_ventura: "db8777d9eec5f36b23b191183c6d25c398484c09b2ca5833d5ef252ef5ce7bfd" + sha256 cellar: :any, arm64_monterey: "00a1cf52f2dd6bc539fe5dc2cd2aa539722b285e37c0969e5e9b0e98e14f35c5" + sha256 cellar: :any, arm64_big_sur: "998ea9ac5c02fdad06ad304dc36ccd0b010267271e7d68ff3f3cfbf407339067" + sha256 cellar: :any, sonoma: "e558ddf5285fce63e1b722341f646989c095481c19f780c915041d65b58b1e14" + sha256 cellar: :any, ventura: "47d6bbb7af7b2e03dec5f2facae51a32650aac428628af0d5d8e393d48663fc8" + sha256 cellar: :any, monterey: "a51e714c8f9c12fabd316d643927d09458535aeff83e97a00cdbdeddedfc0962" + sha256 cellar: :any, big_sur: "26dfaad8173c39d9aa57354256ae4885ea4154a5c3f539c0cb8929e627cafd72" + sha256 cellar: :any, catalina: "8f20fb63150135151bac6d385c5c8fac07ccdc97c5d4a17d1d9aaf62737a606c" + sha256 cellar: :any, mojave: "52fd8c98d57a09972db3db70a405c32c17dc7ea60663c058b8cfa17d51fc1951" + sha256 cellar: :any_skip_relocation, arm64_linux: "f46b81927052090bf7c2c756414545f1af98e48ec10e0bd8a697abb7253a72ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9cd40f6f49dc081c4cc7e3ea4b159b428d1e611dbc708c1d06bcb3c10f1f3fea" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "swig" => :build + depends_on "boost" + depends_on "confuse" + depends_on "libusb" + + # Patch to fix pkg-config flags issue. Homebrew/homebrew-core#71623 + # http://developer.intra2net.com/git/?p=libftdi;a=commit;h=cdb28383402d248dbc6062f4391b038375c52385 + patch do + url "http://developer.intra2net.com/git/?p=libftdi;a=patch;h=cdb28383402d248dbc6062f4391b038375c52385;hp=5c2c58e03ea999534e8cb64906c8ae8b15536c30" + sha256 "db4c3e558e0788db00dcec37929f7da2c4ad684791977445d8516cc3e134a3c4" + end + + def install + mkdir "libftdi-build" do + system "cmake", "..", "-DPYTHON_BINDINGS=OFF", + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON", + "-DFTDIPP=ON", + *std_cmake_args + system "make", "install" + pkgshare.install "../examples" + (pkgshare/"examples/bin").install Dir["examples/*"] \ + - Dir["examples/{CMake*,Makefile,*.cmake}"] + end + end + + test do + system pkgshare/"examples/bin/find_all" + end +end diff --git a/Formula/lib/libfuse.rb b/Formula/lib/libfuse.rb new file mode 100644 index 0000000000000..e26f50b0e3d5a --- /dev/null +++ b/Formula/lib/libfuse.rb @@ -0,0 +1,45 @@ +class Libfuse < Formula + desc "Reference implementation of the Linux FUSE interface" + homepage "https://github.com/libfuse/libfuse" + url "https://github.com/libfuse/libfuse/releases/download/fuse-3.17.2/fuse-3.17.2.tar.gz" + sha256 "3d932431ad94e86179e5265cddde1d67aa3bb2fb09a5bd35c641f86f2b5ed06f" + license any_of: ["LGPL-2.1-only", "GPL-2.0-only"] + head "https://github.com/libfuse/libfuse.git", branch: "master" + + bottle do + sha256 arm64_linux: "447962f98f38e97d6235096dbc5cd7453345c893ea5cf3f9099fe8115dec707e" + sha256 x86_64_linux: "11f5d2472fd50b34f28e07e94ddf10b8bfca48e6b8725724e8260ebc0b0fbb1d" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on :linux + + def install + args = %W[ + --sysconfdir=#{etc} + -Dinitscriptdir=#{etc}/init.d + -Dudevrulesdir=#{etc}/udev/rules.d + -Duseroot=false + ] + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + (pkgshare/"doc").install "doc/kernel.txt" + end + + test do + (testpath/"fuse-test.c").write <<~C + #define FUSE_USE_VERSION 31 + #include + #include + int main() { + printf("%d%d\\n", FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION); + printf("%d\\n", fuse_version()); + return 0; + } + C + system ENV.cc, "fuse-test.c", "-L#{lib}", "-I#{include}", "-D_FILE_OFFSET_BITS=64", "-lfuse3", "-o", "fuse-test" + system "./fuse-test" + end +end diff --git a/Formula/lib/libfuse@2.rb b/Formula/lib/libfuse@2.rb new file mode 100644 index 0000000000000..d10f830dcbb9e --- /dev/null +++ b/Formula/lib/libfuse@2.rb @@ -0,0 +1,62 @@ +class LibfuseAT2 < Formula + desc "Reference implementation of the Linux FUSE interface" + homepage "https://github.com/libfuse/libfuse" + url "https://github.com/libfuse/libfuse/releases/download/fuse-2.9.9/fuse-2.9.9.tar.gz" + sha256 "d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5" + license any_of: ["LGPL-2.1-only", "GPL-2.0-only"] + + bottle do + rebuild 1 + sha256 arm64_linux: "df8b668765d688eb5a516eaa67a73d1750b5ce6bab91b1924def3b7fd0d85aac" + sha256 x86_64_linux: "2f5566126dd96e6a9c0329b6321db145d1815690cf5d4cf51d62b762493ca19b" + end + + keg_only :versioned_formula + + # TODO: Remove `autoconf`, `automake`, `gettext`, and `libtool` when we no longer need the patch. + # TODO: Consider generating a `configure` patch so that we don't need these. + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + depends_on :linux + + # Fix build failure with new glibc. + patch do + url "https://github.com/libfuse/libfuse/commit/5a43d0f724c56f8836f3f92411e0de1b5f82db32.patch?full_index=1" + sha256 "94d5c6d9785471147506851b023cb111ef2081d1c0e695728037bbf4f64ce30a" + end + + # Backport fix for build failure on arm64. Debian applies same patch (0006-arm64.patch) + patch do + url "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch?full_index=1" + sha256 "97360b7353903f3968aa10c9fd95ee42372049fea748d2be78f1c054e750bed0" + end + + def install + ENV["INIT_D_PATH"] = etc/"init.d" + ENV["UDEV_RULES_PATH"] = etc/"udev/rules.d" + ENV["MOUNT_FUSE_PATH"] = bin + # TODO: Remove `autoreconf` when patch is no longer needed. + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--enable-lib", "--enable-util", "--disable-example", *std_configure_args + system "make" + system "make", "install" + (pkgshare/"doc").install "doc/kernel.txt" + end + + test do + (testpath/"fuse-test.c").write <<~C + #define FUSE_USE_VERSION 21 + #include + #include + int main() { + printf("%d%d\\n", FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION); + printf("%d\\n", fuse_version()); + return 0; + } + C + system ENV.cc, "fuse-test.c", "-L#{lib}", "-I#{include}", "-D_FILE_OFFSET_BITS=64", "-lfuse", "-o", "fuse-test" + system "./fuse-test" + end +end diff --git a/Formula/lib/libfyaml.rb b/Formula/lib/libfyaml.rb new file mode 100644 index 0000000000000..74a8d1ba1db8d --- /dev/null +++ b/Formula/lib/libfyaml.rb @@ -0,0 +1,48 @@ +class Libfyaml < Formula + desc "Fully feature complete YAML parser and emitter" + homepage "https://github.com/pantoniou/libfyaml" + url "https://github.com/pantoniou/libfyaml/releases/download/v0.9/libfyaml-0.9.tar.gz" + sha256 "7731edc5dfcc345d5c5c9f6ce597133991a689dabede393cd77bae89b327cd6d" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4296a8c80863d912ba93d237d0635b4b6568dfaec713cd69d5424ea77ad4097e" + sha256 cellar: :any, arm64_sonoma: "f048b398ea675ff84cffed39be72aad7aebc2ff7b343291e82982e1d8aa299bc" + sha256 cellar: :any, arm64_ventura: "7e0abdbb0374744a92305e607e3fccee6ba6bc09f01906719ec91b721a7176a8" + sha256 cellar: :any, arm64_monterey: "a4b6daf2e59d3361a9eeda457e5964672ecba38d7126c731684aec495db5bd2c" + sha256 cellar: :any, sonoma: "6758d7c2b7667096e19a1b6f5a41b072fe34aafda17650fc873b781eeebc7211" + sha256 cellar: :any, ventura: "24121cefb2cdd277652bfc857f9fd2b01042769aeeb9a622aba142e978ba99c0" + sha256 cellar: :any, monterey: "4730aa6a64ffd960a0d82cbcc69734ffddb7abf29ae27450dfed7fc818a17935" + sha256 cellar: :any_skip_relocation, arm64_linux: "d657e265f72bf3f8704c2d903d419ecbf89ad79803c4b67563e619733530117d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e4efc82a84ba883c56fe0ee85008a68a91863460ae0eae5dc02952143c8983d" + end + + uses_from_macos "m4" => :build + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif + + #include + #include + + int main(int argc, char *argv[]) + { + std::cout << fy_library_version() << std::endl; + return EXIT_SUCCESS; + } + CPP + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lfyaml", "-o", "test" + assert_equal 0, $CHILD_STATUS.exitstatus + assert_equal version.to_s, shell_output("#{testpath}/test").strip + assert_equal version.to_s, shell_output("#{bin}/fy-tool --version").strip + end +end diff --git a/Formula/lib/libgadu.rb b/Formula/lib/libgadu.rb new file mode 100644 index 0000000000000..44a7245d185de --- /dev/null +++ b/Formula/lib/libgadu.rb @@ -0,0 +1,41 @@ +class Libgadu < Formula + desc "Library for ICQ instant messenger protocol" + homepage "https://libgadu.net/" + url "https://github.com/wojtekka/libgadu/releases/download/1.12.2/libgadu-1.12.2.tar.gz" + sha256 "28e70fb3d56ed01c01eb3a4c099cc84315d2255869ecf08e9af32c41d4cbbf5d" + license "LGPL-2.1-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f4f5668e14d2fb3565732fb50bb526d106a8a26d396b3d54eeff627658a159ab" + sha256 cellar: :any, arm64_sonoma: "c0a47f65b2950adc32a349c14f576ce66da2f34b2fc342c1f37b11dfb8ab28ed" + sha256 cellar: :any, arm64_ventura: "ea113337d33a26b40502ef72b239b0e7eba6a01290372cb70f857e21d4daf2f1" + sha256 cellar: :any, arm64_monterey: "74b16aeaa51b6e018a7548cf7e9197836af9b6da578b86b44917813a23fdf380" + sha256 cellar: :any, arm64_big_sur: "e556444015bb575c2d7efc07815f72141da829fcc67262238f72257110226c99" + sha256 cellar: :any, sonoma: "2f18df590a9b25654a85628539fd4465d8bf8db62855f73d128b0711437c9b3b" + sha256 cellar: :any, ventura: "c1e8f89093019a8904f82e94cb054280ee125ee99965cae3dd48ede9f777f137" + sha256 cellar: :any, monterey: "229f1b486e46ceec14e6480aa9b3c727639a42caceb6cd556cb56cc2b8d7eabb" + sha256 cellar: :any, big_sur: "d9f8198b7a7640ec47933ebbb7d4cab50bc0f29fe20fa88126e6ecd6b116d62b" + sha256 cellar: :any, catalina: "afe9b94a62b55c700f57d853d077be96a901b450faa7ff9585a43397cacf838a" + sha256 cellar: :any, mojave: "394b7c3b78e1aa4f7960d7ffc62cefe91069a0e50b7442b62f68d2e68f5d01ad" + sha256 cellar: :any, high_sierra: "65f828f98715efbb7bb351d47e11df0fd0279b8c060233138721c119abf0879f" + sha256 cellar: :any, sierra: "4cf4bb4fa157bff6ce4e1fa58a79c372df6b0a00c5e5fd621f6396b3d55451e6" + sha256 cellar: :any, el_capitan: "1feb9c3c574632f9324fdfc8bc5ed49f2817e7a58ae280e44b0ae8735e89caca" + sha256 cellar: :any_skip_relocation, arm64_linux: "5e39dd5e82e385a92ce8c507ef104f14c84ef65b617b707eaee76debc345c273" + sha256 cellar: :any_skip_relocation, x86_64_linux: "879c676edffa46a33d49bb980f2759b9a4db1d8e505473593c1d0873266ea0dd" + end + + uses_from_macos "zlib" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--prefix=#{prefix}", "--disable-debug", + "--disable-dependency-tracking", + "--without-pthread" + system "make", "install" + end +end diff --git a/Formula/lib/libgccjit.rb b/Formula/lib/libgccjit.rb new file mode 100644 index 0000000000000..6d768882d9fba --- /dev/null +++ b/Formula/lib/libgccjit.rb @@ -0,0 +1,201 @@ +class Libgccjit < Formula + desc "JIT library for the GNU compiler collection" + homepage "https://gcc.gnu.org/" + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + revision 1 + head "https://gcc.gnu.org/git/gcc.git", branch: "master" + + stable do + url "https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz" + mirror "https://ftpmirror.gnu.org/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz" + sha256 "a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9" + + # Branch from the Darwin maintainer of GCC, with a few generic fixes and + # Apple Silicon support, located at https://github.com/iains/gcc-14-branch + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/f30c309442a60cfb926e780eae5d70571f8ab2cb/gcc/gcc-14.2.0-r2.diff" + sha256 "6c0a4708f35ccf2275e6401197a491e3ad77f9f0f9ef5761860768fa6da14d3d" + end + end + + livecheck do + formula "gcc" + end + + bottle do + sha256 arm64_sequoia: "52905f08739ef5b43a3c51c6a9be7befa915d1d5c9a74f1e6fcafa1048926f1f" + sha256 arm64_sonoma: "19083279161321c45f2c05cf3800de97a2976056344ee62a936c9e2d80a7146b" + sha256 arm64_ventura: "9a41de72cb4140ba963a24b0e7916c7d8291f7c6c2c095a9a9522371e44a9a27" + sha256 sequoia: "248d6a97fe62b914bd47807f6de0263112c9b80e6c0fd928f342214b9db80645" + sha256 sonoma: "afdf195ab432568a33f36ba8b6180a6f1c23106825219635ebd406c5f9989ec5" + sha256 ventura: "4c4c9a49250919da00c7f0488da19905ad1cf2ab426a0fb1171e1177302577e9" + sha256 arm64_linux: "84453d4abf8dd0551ffaa9e6586b9ed92ece6553ec0af45a6badcdb328526033" + sha256 x86_64_linux: "76a465bf2a563f690cf457fd5f8fbcbf7be6109053f029356195f7336fd58d0c" + 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 "gcc" => :test + depends_on "gmp" + depends_on "isl" + depends_on "libmpc" + depends_on "mpfr" + depends_on "zstd" + + uses_from_macos "zlib" + + on_macos do + on_intel do + depends_on "gcc" + end + end + + # GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib + cxxstdlib_check :skip + + def install + # GCC will suffer build errors if forced to use a particular linker. + ENV.delete "LD" + + pkgversion = "Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip + + # Use `lib/gcc/current` to align with the GCC formula. + args = %W[ + --prefix=#{prefix} + --libdir=#{lib}/gcc/current + --disable-nls + --enable-checking=release + --with-gcc-major-version-only + --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-zstd=#{Formula["zstd"].opt_prefix} + --with-pkgversion=#{pkgversion} + --with-bugurl=#{tap.issues_url} + --with-system-zlib + ] + + make_args = if OS.mac? + cpu = Hardware::CPU.arm? ? "aarch64" : "x86_64" + args << "--build=#{cpu}-apple-darwin#{OS.kernel_version.major}" + + # System headers may not be in /usr/include + sdk = MacOS.sdk_path_if_needed + args << "--with-sysroot=#{sdk}" if sdk + + [] + else + # Fix cc1: error while loading shared libraries: libisl.so.15 + args << "--with-boot-ldflags=-static-libstdc++ -static-libgcc #{ENV.ldflags}" + + # Fix Linux error: gnu/stubs-32.h: No such file or directory. + args << "--disable-multilib" + + # Change the default directory name for 64-bit libraries to `lib` + # https://stackoverflow.com/a/54038769 + inreplace "gcc/config/i386/t-linux64", "m64=../lib64", "m64=" + + %W[ + BOOT_CFLAGS=-I#{Formula["zlib"].opt_include} + BOOT_LDFLAGS=-I#{Formula["zlib"].opt_lib} + ] + end + + # Building jit needs --enable-host-shared, which slows down the compiler. + mkdir "build-jit" do + system "../configure", *args, "--enable-languages=jit", "--enable-host-shared" + system "make", *make_args + system "make", "install" + end + + # We only install the relevant libgccjit files from libexec and delete the rest. + prefix.find do |f| + rm_r(f) if !f.directory? && !f.basename.to_s.start_with?("libgccjit") + end + + # Provide a `lib/gcc/xy` directory to align with the versioned GCC formulae. + (lib/"gcc"/version.major).install_symlink (lib/"gcc/current").children + + return if OS.linux? || Hardware::CPU.arm? + + lib.glob("gcc/current/#{shared_library("libgccjit", "*")}").each do |dylib| + next if dylib.symlink? + + # Fix linkage with `libgcc_s.1.1`. See: Homebrew/discussions#5364 + gcc_libdir = Formula["gcc"].opt_lib/"gcc/current" + MachO::Tools.add_rpath(dylib, rpath(source: lib/"gcc/current", target: gcc_libdir)) + end + end + + test do + (testpath/"test-libgccjit.c").write <<~C + #include + #include + #include + + static void create_code (gcc_jit_context *ctxt) { + gcc_jit_type *void_type = gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID); + gcc_jit_type *const_char_ptr_type = gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_CONST_CHAR_PTR); + gcc_jit_param *param_name = gcc_jit_context_new_param (ctxt, NULL, const_char_ptr_type, "name"); + gcc_jit_function *func = gcc_jit_context_new_function (ctxt, NULL, GCC_JIT_FUNCTION_EXPORTED, + void_type, "greet", 1, ¶m_name, 0); + gcc_jit_param *param_format = gcc_jit_context_new_param (ctxt, NULL, const_char_ptr_type, "format"); + gcc_jit_function *printf_func = gcc_jit_context_new_function (ctxt, NULL, GCC_JIT_FUNCTION_IMPORTED, + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT), "printf", 1, ¶m_format, 1); + gcc_jit_rvalue *args[2]; + args[0] = gcc_jit_context_new_string_literal (ctxt, "hello %s"); + args[1] = gcc_jit_param_as_rvalue (param_name); + gcc_jit_block *block = gcc_jit_function_new_block (func, NULL); + gcc_jit_block_add_eval (block, NULL, gcc_jit_context_new_call (ctxt, NULL, printf_func, 2, args)); + gcc_jit_block_end_with_void_return (block, NULL); + } + + int main (int argc, char **argv) { + gcc_jit_context *ctxt; + gcc_jit_result *result; + ctxt = gcc_jit_context_acquire (); + if (!ctxt) { + fprintf (stderr, "NULL ctxt"); + exit (1); + } + gcc_jit_context_set_bool_option (ctxt, GCC_JIT_BOOL_OPTION_DUMP_GENERATED_CODE, 0); + create_code (ctxt); + result = gcc_jit_context_compile (ctxt); + if (!result) { + fprintf (stderr, "NULL result"); + exit (1); + } + typedef void (*fn_type) (const char *); + fn_type greet = (fn_type)gcc_jit_result_get_code (result, "greet"); + if (!greet) { + fprintf (stderr, "NULL greet"); + exit (1); + } + greet ("world"); + fflush (stdout); + gcc_jit_context_release (ctxt); + gcc_jit_result_release (result); + return 0; + } + C + + gcc_major_ver = Formula["gcc"].any_installed_version.major + gcc = Formula["gcc"].opt_bin/"gcc-#{gcc_major_ver}" + libs = HOMEBREW_PREFIX/"lib/gcc/current" + test_flags = %W[-I#{include} test-libgccjit.c -o test -L#{libs} -lgccjit] + + system gcc.to_s, *test_flags + assert_equal "hello world", shell_output("./test") + + # The test below fails with the host compiler on Linux. + return if OS.linux? + + # Also test with the host compiler, which many users use with libgccjit + (testpath/"test").unlink + system ENV.cc, *test_flags + assert_equal "hello world", shell_output("./test") + end +end diff --git a/Formula/lib/libgcrypt.rb b/Formula/lib/libgcrypt.rb new file mode 100644 index 0000000000000..954058bade71e --- /dev/null +++ b/Formula/lib/libgcrypt.rb @@ -0,0 +1,51 @@ +class Libgcrypt < Formula + desc "Cryptographic library based on the code from GnuPG" + homepage "https://gnupg.org/related_software/libgcrypt/" + url "https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.11.1.tar.bz2" + sha256 "24e91c9123a46c54e8371f3a3a2502f1198f2893fbfbf59af95bc1c21499b00e" + license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"] + + livecheck do + url "https://gnupg.org/ftp/gcrypt/libgcrypt/" + regex(/href=.*?libgcrypt[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "be268e1e718212df254fb8b678adbcef8bad3994deb995566b8fdd7743e0b482" + sha256 cellar: :any, arm64_sonoma: "531de63827be5ab57b3b82dff1107af39bc50da502c38c3a504e864d11996c75" + sha256 cellar: :any, arm64_ventura: "2ef2f9a5995d4ece50c45dddf2a373a1674a18569272067c653ae2840cc6744c" + sha256 cellar: :any, sonoma: "4097600d438cb3383fcad621f71a011c79b90b96a96c8a5591406d63b08f12e6" + sha256 cellar: :any, ventura: "f24441d156443abc7b2621c61acd68647f60c90cd381028be3cb9876155902e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc425dfd0efe384e0bac5647ea0fe058450c6a12852c100ddc1ece85dca5ac27" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d943d57e65e44159873931d24de16762e527793bb0478b8cbd0580af31a2ed34" + end + + depends_on "libgpg-error" + + def install + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--enable-static", + "--disable-asm", + "--with-libgpg-error-prefix=#{Formula["libgpg-error"].opt_prefix}" + + # The jitter entropy collector must be built without optimisations + ENV.O0 { system "make", "-C", "random", "rndjent.o", "rndjent.lo" } + + # Parallel builds work, but only when run as separate steps + system "make" + MachO.codesign!("#{buildpath}/tests/.libs/random") if OS.mac? && Hardware::CPU.arm? + + system "make", "check" + system "make", "install" + + # avoid triggering mandatory rebuilds of software that hard-codes this path + inreplace bin/"libgcrypt-config", prefix, opt_prefix + end + + test do + touch "testing" + output = shell_output("#{bin}/hmac256 \"testing\" testing") + assert_match "0e824ce7c056c82ba63cc40cffa60d3195b5bb5feccc999a47724cc19211aef6", output + end +end diff --git a/Formula/lib/libgda.rb b/Formula/lib/libgda.rb new file mode 100644 index 0000000000000..aa3e0cca725f6 --- /dev/null +++ b/Formula/lib/libgda.rb @@ -0,0 +1,83 @@ +class Libgda < Formula + desc "Provides unified data access to the GNOME project" + homepage "https://www.gnome-db.org/" + url "https://download.gnome.org/sources/libgda/6.0/libgda-6.0.0.tar.xz" + sha256 "995f4b420e666da5c8bac9faf55e7aedbe3789c525d634720a53be3ccf27a670" + # The executable tools are GPL-2.0-or-later, but these are considered experimental + # and not installed by default. The license should be updated when tools are installed. + license "LGPL-2.0-or-later" + revision 4 + + bottle do + sha256 arm64_sequoia: "2be57dbae0d6ba2cb489b405aeed1d4b00f6dc4ce1182dce49aec0fd1093a813" + sha256 arm64_sonoma: "9cf877eaebc81fecfc1970b452f851b801f326d8154291d88fdbbad78cceecfd" + sha256 arm64_ventura: "4c863bea61f7fe27324a05e1ecaeb3f5baf67a87ad8fc0cdb9dbec71102a44db" + sha256 sonoma: "6385eb68f99390c392e26c8798c20fac9f07c3a22ca4f7bb6550b2cac507c6fc" + sha256 ventura: "1753780cc82f8f481ebaed1f645416d8aea7586a020876cebe631485977799a4" + sha256 arm64_linux: "5fe8b7ec5d76567900e301e69b302f05a282fc2ead4063002502581bf6a1692e" + sha256 x86_64_linux: "2c0269be185ff06ae59bbd4eabf89b43b465a20c9282095ace9d4dd8ddb54762" + end + + depends_on "gettext" => :build + depends_on "gobject-introspection" => :build + depends_on "intltool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + depends_on "glib" + depends_on "iso-codes" + depends_on "json-glib" + depends_on "mariadb-connector-c" + depends_on "sqlite" + + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + # Backport fix for sqlcipher and sqlite pkg-config file generation + patch do + url "https://gitlab.gnome.org/GNOME/libgda/-/commit/3e0c7583ddcc3649f24ad1f1b5d851072fd3f721.diff" + sha256 "a6cb1927ef2174267fd5b01ca7d6b1141f4bad969fa6d10560c62998c6150fd4" + end + + # Backport fix for undefined behavior due to signed integer overflow + patch do + url "https://gitlab.gnome.org/GNOME/libgda/-/commit/657b2f8497da907559a6769c5b1d2d7b5bd40688.diff" + sha256 "bfc26217647e27aaf065a4b6c210b96e1a6f7cd67d780a3a124951c6a5bc566d" + end + + # Backport fix for macOS dynamic loading of sqlite.dylib + patch do + url "https://gitlab.gnome.org/GNOME/libgda/-/commit/98f014c783583e3ad87ee546e8dccf34d50f1e37.diff" + sha256 "2f2d257085b40ef4fccf2db68fe51407ba0f59d39672fc95fd91be3e46e91ffa" + end + + # Apply Fedora patch to use `mariadb-connector-c` + patch do + url "https://src.fedoraproject.org/rpms/libgda/raw/e33ef2c0af32d1aab4a1255b83882552e36002a4/f/mariadb.patch" + sha256 "5e2dca080ab2d5d09bba5d41ff4bc7dd63dea5f9f493d6b3e28d592ef48f52fc" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + pkgshare.install "examples/SimpleExample/example.c" + end + + test do + cp pkgshare/"example.c", testpath + flags = shell_output("pkgconf --cflags --libs libgda-#{version.major_minor}").chomp.split + system ENV.cc, "example.c", "-o", "example", *flags + assert_match <<~EOS, shell_output("./example") + ------+---------+--------- + p1 | chair | 2.000000 + p3 | glass | 1.100000 + p1000 | flowers | 1.990000 + (3 rows) + EOS + end +end diff --git a/Formula/lib/libgdata.rb b/Formula/lib/libgdata.rb new file mode 100644 index 0000000000000..f465ec06d6259 --- /dev/null +++ b/Formula/lib/libgdata.rb @@ -0,0 +1,84 @@ +class Libgdata < Formula + desc "GLib-based library for accessing online service APIs" + homepage "https://wiki.gnome.org/Projects/libgdata" + url "https://download.gnome.org/sources/libgdata/0.18/libgdata-0.18.1.tar.xz" + sha256 "dd8592eeb6512ad0a8cf5c8be8c72e76f74bfe6b23e4dd93f0756ee0716804c7" + license "LGPL-2.1-or-later" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "36b90319012266b453dbafde5737f7a9a0d0570494af7fd9f71c9ac836445d51" + sha256 cellar: :any, arm64_sonoma: "11ea8fc6cbcecdbf469a94c4d0f11fef09947c51781ca98a103648983be3c643" + sha256 cellar: :any, arm64_ventura: "5e030516ecc07a1b31b7db82b7eeda2d828f8a742f5daf9c1aced0dc33b4fb4f" + sha256 cellar: :any, arm64_monterey: "b262fab7a6607c82f01cb2c46098e6acc0cd0f8ee50f34d56789df69f5f03bc7" + sha256 cellar: :any, arm64_big_sur: "b5285aafaa3e8096eee5ffebd4c144e01b0a61d9e7d510dbdfbbd7acde33a3d8" + sha256 cellar: :any, sonoma: "32782ca2e84f3aa0d132613e8d3319ee00fe7a7275c957401e930d13256bbbdb" + sha256 cellar: :any, ventura: "c99a9af5d3dc41104d3f334fae4b64a74f20bc76fc20120c0ae484f761209ef8" + sha256 cellar: :any, monterey: "51f3dd89ac7e6c40a35c0c629ea385a558942d00eff37864925c038b0d185eab" + sha256 cellar: :any, big_sur: "02e1ac992638692a58f8bb8313168c8e62117e6bab46ba447fc52b16b3f0127e" + sha256 cellar: :any, catalina: "45066a1abdda5d00f7a6a41f6e1b1a3bc40e9faa2de3701372ac237ce776eb8a" + sha256 arm64_linux: "799f6b4241c22aeda1828e781a56dedd5568a028f735ae5c4ef3909c91aa3f5f" + sha256 x86_64_linux: "47559f0a3203d2274cf17141c8a8812b166d41b1a0522b00053d64e70c514085" + 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 "glib" + depends_on "gtk+3" + depends_on "json-glib" + depends_on "liboauth" + depends_on "libsoup@2" # libsoup 3 PR: https://gitlab.gnome.org/GNOME/libgdata/-/merge_requests/49 + + uses_from_macos "curl" + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libsoup@2"].opt_lib/"pkgconfig" + ENV.prepend_path "XDG_DATA_DIRS", Formula["libsoup@2"].opt_share + ENV.prepend_path "XDG_DATA_DIRS", HOMEBREW_PREFIX/"share" + + curl_lib = OS.mac? ? "#{MacOS.sdk_path_if_needed}/usr/lib" : Formula["curl"].opt_lib + ENV.append "LDFLAGS", "-L#{curl_lib} -lcurl" + + args = %w[ + -Dintrospection=true + -Doauth1=enabled + -Dalways_build_tests=false + -Dvapi=true + -Dgtk=enabled + -Dgoa=disabled + -Dgnome=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 + + int main(int argc, char *argv[]) { + GType type = gdata_comment_get_type(); + return 0; + } + C + + ENV.prepend_path "PKG_CONFIG_PATH", Formula["icu4c"].opt_lib/"pkgconfig" if OS.mac? + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libsoup@2"].opt_lib/"pkgconfig" + flags = shell_output("pkgconf --cflags --libs libgdata").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgedit-amtk.rb b/Formula/lib/libgedit-amtk.rb new file mode 100644 index 0000000000000..291fbc22f3e07 --- /dev/null +++ b/Formula/lib/libgedit-amtk.rb @@ -0,0 +1,56 @@ +class LibgeditAmtk < Formula + desc "Actions, Menus and Toolbars Kit for GTK applications" + homepage "https://gedit-technology.net/" + url "https://gitlab.gnome.org/World/gedit/libgedit-amtk/-/archive/5.9.1/libgedit-amtk-5.9.1.tar.bz2" + sha256 "2f7d5da4d42821965f096b2a66d8b5b5f8d7d76705fd23a907de160c995d35f4" + license "LGPL-3.0-or-later" + head "https://gitlab.gnome.org/World/gedit/libgedit-amtk.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "c6afbf2a294bb479782b425c6b9bf7258b0cf38031652aa8031dbb3ba32a2778" + sha256 arm64_sonoma: "6c9760110e1cda5406ff084d6ce38622e14bfa203147b7f3cf8927f4e8c21d71" + sha256 arm64_ventura: "ec1031d95d3f32843a0020ff64017a23107ebad3d7d58560994be02dd1eb59ee" + sha256 sonoma: "781ca6310c4334487c1378c6b733506584f878031c609965b99066c7b3036597" + sha256 ventura: "715abfe98dd941d44bdca2d019a812441b331630900587f23e34319ec43e477e" + sha256 arm64_linux: "c5731b9794e4745995351ceef4bc7dbcb243e46d008510f6b18947edfe04a9b1" + sha256 x86_64_linux: "27205ec858d8f5f8af6325219c3b4fa8a851e30183e8ece633a5cad4840301bd" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "glib" + depends_on "gtk+3" + + 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 + system "meson", "setup", "build", "-Dgtk_doc=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[]) { + amtk_init(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libgedit-amtk-5").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgedit-gfls.rb b/Formula/lib/libgedit-gfls.rb new file mode 100644 index 0000000000000..ab4130c6f159e --- /dev/null +++ b/Formula/lib/libgedit-gfls.rb @@ -0,0 +1,53 @@ +class LibgeditGfls < Formula + desc "Gedit Technology - File loading and saving" + homepage "https://gitlab.gnome.org/World/gedit/libgedit-gfls" + url "https://gitlab.gnome.org/World/gedit/libgedit-gfls/-/archive/0.3.0/libgedit-gfls-0.3.0.tar.bz2" + sha256 "a53c847a2dc16f35a9295b2176bde4dbaa91bd1410af8546992fd65236bccf95" + license "LGPL-3.0-or-later" + head "https://gitlab.gnome.org/World/gedit/libgedit-gfls.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4d224b0d0ecad55f58e7faad216c4456bc8a034b31f120714d94bed236360dc2" + sha256 cellar: :any, arm64_sonoma: "217681e399331b45c9a8e12a7eeb02e520dcab102e634163292907005cb83b16" + sha256 cellar: :any, arm64_ventura: "910ff5cc9d9f6bf34bc028886291f5b865830872e538115c3610d5a62a15b570" + sha256 cellar: :any, sonoma: "db720dd55a7f2c887fef60c79036d93d65d439c7f8e159f339ccb3c2ef66ba32" + sha256 cellar: :any, ventura: "4eb809e0498a4a2844c2afa2d2255cdb5d7827b9d1925d7d561540b58bbcc248" + sha256 arm64_linux: "4414cd365718587e2ba528a90fa5615678b4f8e5f6e7b881be663dac820a45ae" + sha256 x86_64_linux: "56b8e1b605aa397988beb3cb33cc9d394a83413468c7e68d22e78daab6d174fd" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "glib" + depends_on "gtk+3" + + def install + system "meson", "setup", "build", "-Dgtk_doc=false", *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[]) { + gfls_init(); + GflsUnsavedDocumentTitles *titles = gfls_unsaved_document_titles_new(); + gchar *title = gfls_unsaved_document_titles_get_title(titles, 1); + printf("%s", title); + g_free(title); + g_object_unref(titles); + gfls_finalize(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libgedit-gfls-1").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + assert_equal "Unsaved Document 1", shell_output("./test") + end +end diff --git a/Formula/lib/libgedit-gtksourceview.rb b/Formula/lib/libgedit-gtksourceview.rb new file mode 100644 index 0000000000000..28f87ab6fec6c --- /dev/null +++ b/Formula/lib/libgedit-gtksourceview.rb @@ -0,0 +1,55 @@ +class LibgeditGtksourceview < Formula + desc "Text editor widget for code editing" + homepage "https://gitlab.gnome.org/World/gedit/libgedit-gtksourceview" + url "https://gitlab.gnome.org/World/gedit/libgedit-gtksourceview/-/archive/299.5.0/libgedit-gtksourceview-299.5.0.tar.bz2" + sha256 "3b452764b7c0868ade614972d85f8c0388d4d65ef88ba6d41487aab97cbbedc9" + license "LGPL-2.1-only" + head "https://gitlab.gnome.org/World/gedit/libgedit-gtksourceview.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "7da63cce0cba6168b56748be0ae6c0da7c7559ba67fe3752c2c0ce4a313667d9" + sha256 arm64_sonoma: "e4bcc56a29b6e13d3cc15c74fb09ca5bdb1c74662e0c1949cca989affce3529e" + sha256 arm64_ventura: "ca4477e848ec00b7efb680ad7e0171bf6883ca08d0ca678034270997f352b420" + sha256 sonoma: "5f373605872fff3fdce72f24fdece0dbe151501bac38df500e69d12a999cd423" + sha256 ventura: "dc2b6a5cef2387db52487d5256816c5c84e6bbb4fe21e97210e7cf8416ec2f7a" + sha256 arm64_linux: "2b6ef325b230560435d929f07bb39dd60fe321c2243282951e3046160de6f092" + sha256 x86_64_linux: "8241a8bacd6e3ad437cbf3b1082251925235897a14e7a4b8da93fe860afd35a0" + 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 "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "libxml2" # Dependent `gedit` uses Homebrew `libxml2` + depends_on "pango" + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", "-Dgtk_doc=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[]) { + gchar *text = gtk_source_utils_unescape_search_text("hello world"); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libgedit-gtksourceview-300").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgedit-tepl.rb b/Formula/lib/libgedit-tepl.rb new file mode 100644 index 0000000000000..ab322cd57c75e --- /dev/null +++ b/Formula/lib/libgedit-tepl.rb @@ -0,0 +1,67 @@ +class LibgeditTepl < Formula + desc "Gedit Technology - Text editor product line" + homepage "https://gitlab.gnome.org/World/gedit/libgedit-tepl" + url "https://gitlab.gnome.org/World/gedit/libgedit-tepl/-/archive/6.13.0/libgedit-tepl-6.13.0.tar.bz2" + sha256 "5d738ca56ae31facba0d88b0a2e406b2507a3dc95f75bfb9f509ff4b2a9d20d3" + license "LGPL-2.1-or-later" + head "https://gitlab.gnome.org/World/gedit/libgedit-tepl.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "836b139117cb325933282df854052d538ed5ba692b72c2aeaf87c2eeee468d8c" + sha256 arm64_sonoma: "c68c763cd2bbb1f8181553a806f475ca363738443a22bc51b633e8a7c5b8297e" + sha256 arm64_ventura: "2159d88ea0072656253b7681c6a7e2bc5e59a62d8b6c55056b7cb14e4822293a" + sha256 sonoma: "2f853ef6c68bb210ac53ce6af23236e1b9d4de9c78c4ef4de8c96b1dc8c6e64b" + sha256 ventura: "5d4eecf87f2f780a100a28671d6da96f7af351c7233c9fd80993ed55e8243c37" + sha256 arm64_linux: "8849a4a7d619fe4fccca378574dbab76b15ae430ff78b98863af8b672d85f6b4" + sha256 x86_64_linux: "4600b539d283d30a8d6a96a74606cffc5ead3212da92e049bb9a391330cbb9ec" + 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 "cairo" + depends_on "glib" + depends_on "gtk+3" + depends_on "icu4c@77" + depends_on "libgedit-amtk" + depends_on "libgedit-gfls" + depends_on "libgedit-gtksourceview" + depends_on "libhandy" + depends_on "pango" + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", "-Dgtk_doc=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + # `pkg-config --libs libgedit-tepl-6` includes icu-uc and icu-i18n but modules + # are from keg-only `icu4c@75` so pkg-config needs to look in the opt path. + # TODO: Remove after https://github.com/Homebrew/brew/pull/18229 + icu4c_dep = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + icu4c_pc_dir = icu4c_dep.to_formula.opt_lib/"pkgconfig" + inreplace lib/"pkgconfig/libgedit-tepl-6.pc", + /^(Requires\.private:.*) icu-uc, icu-i18n,/, + "\\1 #{icu4c_pc_dir}/icu-uc.pc, #{icu4c_pc_dir}/icu-i18n.pc," + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + GType type = tepl_file_get_type(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libgedit-tepl-6").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgee.rb b/Formula/lib/libgee.rb new file mode 100644 index 0000000000000..eff68b044489b --- /dev/null +++ b/Formula/lib/libgee.rb @@ -0,0 +1,55 @@ +class Libgee < Formula + desc "Collection library providing GObject-based interfaces" + homepage "https://wiki.gnome.org/Projects/Libgee" + url "https://download.gnome.org/sources/libgee/0.20/libgee-0.20.8.tar.xz" + sha256 "189815ac143d89867193b0c52b7dc31f3aa108a15f04d6b5dca2b6adfad0b0ee" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f6f8a615e12ebbf0e2d1ef652b9d6118ce7090cf975e76c9199b80f2d54a0ee2" + sha256 cellar: :any, arm64_sonoma: "a74893c386bc3c98b3eca70f4698eac4fc16a7c7ce9621ecd9951881b52617b2" + sha256 cellar: :any, arm64_ventura: "9f59442b282ad4bc6857568f22fc866f04111dfa83f52a36fdff920b72404efd" + sha256 cellar: :any, sonoma: "54b304a5bb1c6cd0b4cf4ad92e33497616250375a1d199b056f712059484c8f8" + sha256 cellar: :any, ventura: "18ef7dfdbad016c9f6027374cb705a7e2195204d524cc42439d98855e24837f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3a4b234964285662e7ae86aba11035910b5b435c74d1d86755b53d803e2ef15" + sha256 cellar: :any_skip_relocation, x86_64_linux: "695ca3b94a6452ef5d365da12bcf3b9b12a3e80c298f5c6d032bd873926a9ef4" + end + + depends_on "gobject-introspection" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + + depends_on "glib" + + on_macos do + depends_on "gettext" + end + + def install + # ensures that the gobject-introspection files remain within the keg + inreplace "gee/Makefile.in" do |s| + s.gsub! "@HAVE_INTROSPECTION_TRUE@girdir = @INTROSPECTION_GIRDIR@", + "@HAVE_INTROSPECTION_TRUE@girdir = $(datadir)/gir-1.0" + s.gsub! "@HAVE_INTROSPECTION_TRUE@typelibdir = @INTROSPECTION_TYPELIBDIR@", + "@HAVE_INTROSPECTION_TRUE@typelibdir = $(libdir)/girepository-1.0" + end + + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + GType type = gee_traversable_stream_get_type(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gee-0.8").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgeotiff.rb b/Formula/lib/libgeotiff.rb new file mode 100644 index 0000000000000..eba91ee223052 --- /dev/null +++ b/Formula/lib/libgeotiff.rb @@ -0,0 +1,86 @@ +class Libgeotiff < Formula + desc "Library and tools for dealing with GeoTIFF" + homepage "https://github.com/OSGeo/libgeotiff" + license "MIT" + + stable do + url "https://github.com/OSGeo/libgeotiff/releases/download/1.7.4/libgeotiff-1.7.4.tar.gz" + sha256 "c598d04fdf2ba25c4352844dafa81dde3f7fd968daa7ad131228cd91e9d3dc47" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "35a86c6a604a2d7f6d10bda3ba1fa47fa979896f3fc5ffcc2e9a06fa8047435c" + sha256 cellar: :any, arm64_sonoma: "9fc225c5ac0450cd685bab5f3834c52e9e321e8196886a500ee1be098263f388" + sha256 cellar: :any, arm64_ventura: "7da423615ca23a18fd337ec4ca74e30d4c0674353b0c67ab90d4773036ab6028" + sha256 cellar: :any, sonoma: "d6537ddbe3f8af5599681df8bd75b1ab3e92a49693f777a50ac527aa15b56e50" + sha256 cellar: :any, ventura: "26be05be540553b47c9d8defc465c7be5d9b44c6b1c2698356d8327a8f117dec" + sha256 cellar: :any_skip_relocation, arm64_linux: "d29727b80535b2ca64f493348e0e8fcbfe704eb1f34e542c3a5a14b6c791f85f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ee650205449595ed8207f93c753bbeb77b1669d00a7f8f9bad9ddf9442840c6" + end + + head do + url "https://github.com/OSGeo/libgeotiff.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "jpeg-turbo" + depends_on "libtiff" + depends_on "proj" + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args, "--with-jpeg" + system "make" # Separate steps or install fails + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "geotiffio.h" + #include "xtiffio.h" + #include + #include + + int main(int argc, char* argv[]) + { + TIFF *tif = XTIFFOpen(argv[1], "w"); + GTIF *gtif = GTIFNew(tif); + TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) 10); + GTIFKeySet(gtif, GeogInvFlatteningGeoKey, TYPE_DOUBLE, 1, (double)123.456); + + int i; + char buffer[20L]; + + memset(buffer,0,(size_t)20L); + for (i=0;i<20L;i++){ + TIFFWriteScanline(tif, buffer, i, 0); + } + + GTIFWriteKeys(gtif); + GTIFFree(gtif); + XTIFFClose(tif); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lgeotiff", + "-L#{Formula["libtiff"].opt_lib}", "-ltiff", "-o", "test" + system "./test", "test.tif" + output = shell_output("#{bin}/listgeo test.tif") + assert_match(/GeogInvFlatteningGeoKey.*123\.456/, output) + end +end diff --git a/Formula/lib/libgetdata.rb b/Formula/lib/libgetdata.rb new file mode 100644 index 0000000000000..22a088f5b039d --- /dev/null +++ b/Formula/lib/libgetdata.rb @@ -0,0 +1,58 @@ +class Libgetdata < Formula + desc "Reference implementation of the Dirfile Standards" + homepage "https://getdata.sourceforge.net/" + # TODO: Check if extra `make` call can be removed at version bump. + url "https://downloads.sourceforge.net/project/getdata/getdata/0.11.0/getdata-0.11.0.tar.xz" + sha256 "d16feae0907090047f5cc60ae0fb3500490e4d1889ae586e76b2d3a2e1c1b273" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3b5f4791ca06a1e3186d30960db969d333d46cc3a81439b72695a0580f495ec3" + sha256 cellar: :any, arm64_sonoma: "b27b52a5f22dee5ee8c81f983b8a1f828b93b9d137c68abe5ada2f05df3d9bbf" + sha256 cellar: :any, arm64_ventura: "917a20050ad2954e99688f9fd7306a5b6dd9da6f41d38085535620de42fdebc4" + sha256 cellar: :any, arm64_monterey: "4e167251c910442b10cd6c7da9c7dd0f3ded3926669c87d618f2330e8c76af82" + sha256 cellar: :any, arm64_big_sur: "e8a11d9e2b1ab217a0984ba6dffd8f7bf721df6d1846f9d7ec07c3fa9816c808" + sha256 cellar: :any, sonoma: "03547f21dc767e6053b49fbcc507766f0ed99bdf293f58158bc5340c45453ab1" + sha256 cellar: :any, ventura: "b8cb912d3b3dbee12c5377ee4f7da7a7a0895a872f3dce088df009a40ce54f9a" + sha256 cellar: :any, monterey: "3050afede9476adb4b8af36a097218742decd02873eb20a9dc8e3876a1c6b085" + sha256 cellar: :any, big_sur: "8d192c117f205049f5547300b397c792d35d8d5f95854043563d02ca144b1a11" + sha256 cellar: :any, catalina: "8d05ffb11f957a9dc351f4b969c4d63d5878b5099c18efd6a4c454cb2b3a7069" + sha256 cellar: :any_skip_relocation, arm64_linux: "420a69c6ae561c0d05f31e800114b4f4fa88a5804f7491532786396825cac910" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9ea4ca51936e1f4a68e32eba62aca9e3edc2b8c1eb078c5045d34637dcc2f97" + end + + depends_on "libtool" + + uses_from_macos "perl" + uses_from_macos "zlib" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--prefix=#{prefix}", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--disable-fortran", + "--disable-fortran95", + "--disable-php", + "--disable-python", + "--without-liblzma", + "--without-libzzip" + + ENV.deparallelize # can't open file: .libs/libgetdatabzip2-0.11.0.so (No such file or directory) + system "make" + # The Makefile seems to try to install things in the wrong order. + # Remove this when the following PR is merged/resolved and lands in a release: + # https://github.com/ketiltrout/getdata/pull/6 + system "make", "-C", "bindings/perl", "install-nodist_perlautogetdataSCRIPTS" + system "make", "install" + end + + test do + assert_match "GetData #{version}", shell_output("#{bin}/checkdirfile --version", 1) + end +end diff --git a/Formula/lib/libgfshare.rb b/Formula/lib/libgfshare.rb new file mode 100644 index 0000000000000..62093ca504248 --- /dev/null +++ b/Formula/lib/libgfshare.rb @@ -0,0 +1,52 @@ +class Libgfshare < Formula + desc "Library for sharing secrets" + homepage "https://www.digital-scurf.org/software/libgfshare" + url "https://www.digital-scurf.org/files/libgfshare/libgfshare-2.0.0.tar.bz2" + sha256 "86f602860133c828356b7cf7b8c319ba9b27adf70a624fe32275ba1ed268331f" + license "MIT" + + livecheck do + url "https://www.digital-scurf.org/files/libgfshare/" + regex(/href=.*?libgfshare[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "cb19a495ba9032a4bd0e0c5e52bf818c8283af8b29dcb25a0a2f9bb0338c2880" + sha256 cellar: :any, arm64_sonoma: "661368852f131d75f48672074dd635d04c95f30f61f1adae25c26db2cdc45dcc" + sha256 cellar: :any, arm64_ventura: "ff95631a45cf14842a1cb98a7496022a886360fad2d4a9bae3154ebd6113726a" + sha256 cellar: :any, arm64_monterey: "0890a2e8ac99ea0497d467e1ab82bb8fe7a34d0f5cd75c01897f15b12ac65211" + sha256 cellar: :any, arm64_big_sur: "d8fc2d9c78a69fc3fe30913aeaa6f1dbeea7091d78d50bd6e6fafcf4dc6dc212" + sha256 cellar: :any, sonoma: "a8a4279f842d2809488dc30fe2ba7509412d0304e2d6f32e125ac80bf683f5cc" + sha256 cellar: :any, ventura: "72816d2d02cec8f669f242e020e7b2980d9f16f51d8e388b57d77c5257a2775d" + sha256 cellar: :any, monterey: "72af5816492ac0696211008f72b896eee5485c0227964c7eae8caadba28212d4" + sha256 cellar: :any, big_sur: "619b6bee51163d432b903899d6d86223824e055124ead1856bc6c4399fef4fca" + sha256 cellar: :any, catalina: "59d6afbdff08b3b457ae3bf6284859eb200929dbcf38c7a2e4f6025a45fe02dc" + sha256 cellar: :any, mojave: "23c584fb3f3edcb9516beacb9cc3448c6bd2352ce44063e609d7a3e9aaeadd34" + sha256 cellar: :any, high_sierra: "0079ff7fef137a59579eb12e9f15087573ad2c19c8d7a4d53e2a7d8d378e6af1" + sha256 cellar: :any, sierra: "ed8e772e5d4b6c8471aa4d711bd2178b873cce23028bcd3831a51aca67c3485e" + sha256 cellar: :any, el_capitan: "c50ebaadca206eef93bc6d835f5814e0d640223c2c7e39cd12feff47720c054d" + sha256 cellar: :any_skip_relocation, arm64_linux: "681eacdb672caf8dd195c5bb9bf891e5bb7c1317eb84e0e81faf1b155dd474ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4439a61e14f81e80009ad0e85a4e2a8183c106161d29e232176faa061ba380ba" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--disable-linker-optimisations", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + touch "test.in" + system bin/"gfsplit", "test.in" + system bin/"gfcombine test.in.*" + end +end diff --git a/Formula/lib/libghthash.rb b/Formula/lib/libghthash.rb new file mode 100644 index 0000000000000..b4d99c30b7d4b --- /dev/null +++ b/Formula/lib/libghthash.rb @@ -0,0 +1,78 @@ +class Libghthash < Formula + desc "Generic hash table for C++" + homepage "https://github.com/SimonKagstrom/libghthash" + url "https://github.com/SimonKagstrom/libghthash/archive/refs/tags/v0.6.2.tar.gz" + sha256 "e7e5f77df3e2a9152e0805f279ac048af9e572b83e60d29257cc754f8f9c22d6" + license "LGPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "83b25e095be2d03fda04742c1c917ff6d5603d4c5ec2e6070f0e555f03e7b701" + sha256 cellar: :any, arm64_sonoma: "5339394b36965f5152703a4bc84c1303c6966114c3bd053ed9dd265951ad5b6e" + sha256 cellar: :any, arm64_ventura: "da435927873c75652094f28442c3716e305ec2407532c79f511c775452f36b35" + sha256 cellar: :any, arm64_monterey: "dd42e58f241de38a3693c9fdc1098fc88caf962412c743dd67b9520a0032f021" + sha256 cellar: :any, arm64_big_sur: "3fb2c3c6419f8114001399f87e711972fcb666cbfcf1f8c5017fc69d5c7cfb4f" + sha256 cellar: :any, sonoma: "14f20c876d6f2ea724a30b0263ceec725918ed15e4fab47f8cc6b524b1404d85" + sha256 cellar: :any, ventura: "e9d123d2cb290ac32e7cf10a30132f0aa3a1e94e70c75abb54a17eb967bb5b21" + sha256 cellar: :any, monterey: "5ccf16cfdcdc676a17a295b4b48458ab91922d0fee37f15d57562084a6f6d56a" + sha256 cellar: :any, big_sur: "eb1611b48ba1ca6ba97e992f1c18972e375eb2bb2d41cab1b652fb84d11f8aa1" + sha256 cellar: :any, catalina: "746863cafe6d156513a4ba1c1a456f6d89014dad87ca825390162d8ea58a665a" + sha256 cellar: :any, mojave: "b6092f29d1b937b03313780a88f91f224cbbc73a564fca0a0810d036ea20b63d" + sha256 cellar: :any, high_sierra: "f9f17a73ef48e31f809d884ce1a419fe4568b167bb962cdf07c4197688572d59" + sha256 cellar: :any, sierra: "730eb3945e001efa5ebfc84452c94b69237f3cdf830ef5c58cef8854ed4cd3d6" + sha256 cellar: :any, el_capitan: "e889f34ca4f1978869eff48334f1f55248628fbc586abdeb151fe017479d220e" + sha256 cellar: :any_skip_relocation, arm64_linux: "616c6f3e4acf1224a29ddea3cdf3a8092b317a197076c006555c43b23999b534" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e68f5371484da5c89bbe2f40b66f8158334bfe4d436047aa521250d7ff111e6" + 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", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + int main(int argc, char *argv[]) + { + ght_hash_table_t *p_table; + int *p_data; + int *p_he; + int result; + + p_table = ght_create(128); + + if ( !(p_data = (int*)malloc(sizeof(int))) ) { + return 1; + } + + *p_data = 15; + + ght_insert(p_table, + p_data, + sizeof(char)*strlen("blabla"), "blabla"); + + if ( (p_he = ght_get(p_table, + sizeof(char)*strlen("blabla"), "blabla")) ) { + result = 0; + } else { + result = 1; + } + ght_finalize(p_table); + + return result; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lghthash", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libgig.rb b/Formula/lib/libgig.rb new file mode 100644 index 0000000000000..fefac53e7b3df --- /dev/null +++ b/Formula/lib/libgig.rb @@ -0,0 +1,57 @@ +class Libgig < Formula + desc "Library for Gigasampler and DLS (Downloadable Sounds) Level 1/2 files" + homepage "https://www.linuxsampler.org/libgig/" + url "https://download.linuxsampler.org/packages/libgig-4.4.1.tar.bz2" + sha256 "fdc89efab1f906128e6c54729967577e8d0462017018bc12551257df5dfe3aa4" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.linuxsampler.org/packages/" + regex(/href=.*?libgig[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "90152a5e1d87cad52d80a79173b5de845623ce3bf4031f1356eb1457123a966e" + sha256 cellar: :any, arm64_sonoma: "84491aae7c3455ae9708acf082dcc9686ee0d70ba45c995d3f874a15fbca6d01" + sha256 cellar: :any, arm64_ventura: "0bb7378b952081033a2c964ef36e595029ae377cf753ea6437f54086e07f1bf7" + sha256 cellar: :any, arm64_monterey: "699c836a4e66d518fbcfc3ee3a83a60c526d88909bda1a34667c8e67cded482c" + sha256 cellar: :any, sonoma: "ca1486d8efa94ae049f2bfb3d8c204551042e44bb866df455689a974152eee2e" + sha256 cellar: :any, ventura: "01f2602c4c663695f4d7dd5cf6fbe3a9ee6b8485efd11879e0d186fc0def1b61" + sha256 cellar: :any, monterey: "85490eaa518755542f760200f141b5f65fd71e7796df188f45f16ef4ffabecae" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb411330078f95316259af6509eea6c755bc66fd364ab17d8212f4f3801addfe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "55b3244b6baa9d30aa0d625a9c27455437b8bb85a1feb61571dec1d4dd765e81" + end + + depends_on "pkgconf" => :build + depends_on "libsndfile" + + on_linux do + depends_on "e2fsprogs" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + using namespace std; + + int main() + { + cout << gig::libraryName() << endl; + return 0; + } + CPP + args = %W[ + -L#{lib}/libgig + -lgig + ] + args << "-Wl,-rpath,#{lib}/libgig" unless OS.mac? + system ENV.cxx, "-std=c++11", "test.cpp", *args, "-o", "test" + assert_match "libgig", shell_output("./test") + end +end diff --git a/Formula/lib/libgit2-glib.rb b/Formula/lib/libgit2-glib.rb new file mode 100644 index 0000000000000..337e8dd995a86 --- /dev/null +++ b/Formula/lib/libgit2-glib.rb @@ -0,0 +1,45 @@ +class Libgit2Glib < Formula + desc "Glib wrapper library around libgit2 git access library" + homepage "https://gitlab.gnome.org/GNOME/libgit2-glib" + url "https://gitlab.gnome.org/GNOME/libgit2-glib/-/archive/v1.2.1/libgit2-glib-v1.2.1.tar.bz2" + sha256 "e15d98cf15cd9dc8aaae8a11ab44f51f3a0da3ad4ace80ede3831c934e1897d7" + license "LGPL-2.1-only" + head "https://gitlab.gnome.org/GNOME/libgit2-glib.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "627c83def62678ab65731f86805ddc7bc12150d9d9ef53d8e15e6f5d49d237ed" + sha256 cellar: :any, arm64_sonoma: "2c356b58f8c0b00b4297e63722a0cca3e66566388a0afb1c3ce6b09c9343760b" + sha256 cellar: :any, arm64_ventura: "e4b0903ca8b7080e5b2b18e30154d4f4d77fdc1fa78d1851401e0814f79f0cc9" + sha256 cellar: :any, sonoma: "a08109665a8ba8789748dfdf2ba84b08bc8013e7cd59eaae676bd06d80382b9a" + sha256 cellar: :any, ventura: "56b91a0d776f8c8fe39cf89e02553075d64df05217b809291d7c0d34f6a29302" + sha256 arm64_linux: "7cccaa7fcd0b32e36b3b6ada4cd7a289664b16e6575d5369b70741c464613040" + sha256 x86_64_linux: "9720677ca97a144f7d851f9068e8fe5304968f6bc627f8af4a6fac30705f6029" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "vala" => :build + depends_on "glib" + depends_on "libgit2" + + on_macos do + depends_on "gettext" + end + + def install + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath}" + system "meson", "setup", "build", "-Dpython=false", "-Dvapi=true", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + libexec.install (buildpath/"build/examples").children + end + + test do + mkdir "horatio" do + system "git", "init" + end + system "#{libexec}/general", testpath/"horatio" + end +end diff --git a/Formula/lib/libgit2.rb b/Formula/lib/libgit2.rb new file mode 100644 index 0000000000000..c02e48ae892f1 --- /dev/null +++ b/Formula/lib/libgit2.rb @@ -0,0 +1,66 @@ +class Libgit2 < Formula + desc "C library of Git core methods that is re-entrant and linkable" + homepage "https://libgit2.github.com/" + url "https://github.com/libgit2/libgit2/archive/refs/tags/v1.9.0.tar.gz" + sha256 "75b27d4d6df44bd34e2f70663cfd998f5ec41e680e1e593238bbe517a84c7ed2" + license "GPL-2.0-only" => { with: "GCC-exception-2.0" } + head "https://github.com/libgit2/libgit2.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "f0ee705c27e87553582c58556a2a20a766af1e1ffbef0f1c676b0244e89398b9" + sha256 cellar: :any, arm64_sonoma: "74a27239cf67c5e87b45b9cf3db547a41ace91b9fab9dbd44608bf1dc3faf3df" + sha256 cellar: :any, arm64_ventura: "ff62b8ec0e1a2b212eff271c39bbd801c45b4bba3595b3f361b7d90f5b3d11b3" + sha256 cellar: :any, sonoma: "fb233893f22e55ca0cd7856f5ec319d077530ad1a5341c3c067d53ce2135627d" + sha256 cellar: :any, ventura: "f5eb731a1908b229c0f7da31345af99a176c51f813069401884aada234c1247c" + sha256 cellar: :any_skip_relocation, arm64_linux: "79a4e1ecc35d78bf1f3dde86c43b13b16db902e74ad97d06f2d4f8f2fe2c5d88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be9b0548c38c23f5ef5cecb22db883a65324ef385610f944e4506af6cf077aad" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libssh2" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" # Uses SecureTransport on macOS + end + + def install + args = %w[-DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DUSE_SSH=ON -DUSE_BUNDLED_ZLIB=OFF] + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build" + 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 "build-static/libgit2.a" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char *argv[]) { + int options = git_libgit2_features(); + assert(options & GIT_FEATURE_SSH); + return 0; + } + C + libssh2 = Formula["libssh2"] + flags = %W[ + -I#{include} + -I#{libssh2.opt_include} + -L#{lib} + -lgit2 + ] + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgit2@1.6.rb b/Formula/lib/libgit2@1.6.rb new file mode 100644 index 0000000000000..4df4573111101 --- /dev/null +++ b/Formula/lib/libgit2@1.6.rb @@ -0,0 +1,64 @@ +class Libgit2AT16 < Formula + desc "C library of Git core methods that is re-entrant and linkable" + homepage "https://libgit2.github.com/" + url "https://github.com/libgit2/libgit2/archive/refs/tags/v1.6.5.tar.gz" + sha256 "0f09dd49e409913c94df00eeb5b54f8b597905071b454c7f614f8c6e1ddb8d75" + license "GPL-2.0-only" => { with: "GCC-exception-2.0" } + + bottle do + sha256 cellar: :any, arm64_sequoia: "8582aec95e53ef6fd672e6c2a5cb8f98f6b62b8e2ef18dce00e8488e5cc1262f" + sha256 cellar: :any, arm64_sonoma: "83f4ee26d02fbfda076cdebe727390dd4db92ec8cb3791115212f43d6047eeed" + sha256 cellar: :any, arm64_ventura: "fdd0c3045a62a5abd4668b43bb384e4586cb79520bfc89c53f96af6cbf86b362" + sha256 cellar: :any, arm64_monterey: "735c54cafdf705104f516c73f808c7b58e746402c5e5fd7d9de991b26b0ee3a1" + sha256 cellar: :any, sonoma: "6ab0d20d176740e61ef21cf5e583ca1642953d74c278af0668a761f646d10b3b" + sha256 cellar: :any, ventura: "331e0768ad6bb277c1d84901c83e851e8ab5af7a791a61ac8b962cb938df20c3" + sha256 cellar: :any, monterey: "d4ac0449a3342561c75ffa40d92cdc4e3fd4bcef7deff58827e59b584149bd65" + sha256 cellar: :any_skip_relocation, arm64_linux: "7823dda8e704e415756ab83591fb4f1999159ee74d705848e5867dd0d40779f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bccdefbeb5fcbf1ad61fbd89ea1ac463a4b66421287723d72386d5f6ed81cf50" + end + + keg_only :versioned_formula + + # https://github.com/libgit2/libgit2/?tab=security-ov-file + deprecate! date: "2024-04-11", because: :unmaintained + disable! date: "2025-04-12", because: :unmaintained + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libssh2" + depends_on "openssl@3" + + def install + args = %w[-DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DUSE_SSH=ON] + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build" + 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 "build-static/libgit2.a" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char *argv[]) { + int options = git_libgit2_features(); + assert(options & GIT_FEATURE_SSH); + return 0; + } + C + libssh2 = Formula["libssh2"] + flags = %W[ + -I#{include} + -I#{libssh2.opt_include} + -L#{lib} + -lgit2 + ] + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgit2@1.7.rb b/Formula/lib/libgit2@1.7.rb new file mode 100644 index 0000000000000..d18ed1aa51372 --- /dev/null +++ b/Formula/lib/libgit2@1.7.rb @@ -0,0 +1,63 @@ +class Libgit2AT17 < Formula + desc "C library of Git core methods that is re-entrant and linkable" + homepage "https://libgit2.github.com/" + url "https://github.com/libgit2/libgit2/archive/refs/tags/v1.7.2.tar.gz" + sha256 "de384e29d7efc9330c6cdb126ebf88342b5025d920dcb7c645defad85195ea7f" + license "GPL-2.0-only" => { with: "GCC-exception-2.0" } + + bottle do + sha256 cellar: :any, arm64_sequoia: "4194c7a41da5f78c05b33988fa28d163c60dc7146fdc964d82ed9b132c90ed3d" + sha256 cellar: :any, arm64_sonoma: "0cad95e1f543ee0a6af1472c5a17e8f5bf09dafab3862ed08bd46e8f44cb0575" + sha256 cellar: :any, arm64_ventura: "32585dd96ae9391b947813734680adef748792d6ead5ecdf3fbb8b9e495a069b" + sha256 cellar: :any, arm64_monterey: "444563550469e0d842b57e68bcd2d6344c914f065033736e0f96f6a61cd00156" + sha256 cellar: :any, sonoma: "11fb0939977b4af263902257d496fe143276a489e2887c6f3c0382525a3bf281" + sha256 cellar: :any, ventura: "00ce19e60bbe028b8771d15b9b29b1d8d249211fd2f5c6e053ad8af3b52842c4" + sha256 cellar: :any, monterey: "d7c8dea4ca2f97faf4e37e618f469181d0c128208518b33fee1af1c60a86a301" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e616b5960880f0abdb72f77aa469955d2a946c7683cfc29dc414f5c0d05df94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8357f3e14b1bec47984f48b9f3e4d21a2386f1c98e42c163081e812f93706027" + end + + keg_only :versioned_formula + + # https://github.com/libgit2/libgit2/?tab=security-ov-file + deprecate! date: "2025-01-08", because: :unsupported + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libssh2" + depends_on "openssl@3" + + def install + args = %w[-DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DUSE_SSH=ON] + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build" + 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 "build-static/libgit2.a" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char *argv[]) { + int options = git_libgit2_features(); + assert(options & GIT_FEATURE_SSH); + return 0; + } + C + libssh2 = Formula["libssh2"] + flags = %W[ + -I#{include} + -I#{libssh2.opt_include} + -L#{lib} + -lgit2 + ] + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgit2@1.8.rb b/Formula/lib/libgit2@1.8.rb new file mode 100644 index 0000000000000..f06f9722bd532 --- /dev/null +++ b/Formula/lib/libgit2@1.8.rb @@ -0,0 +1,67 @@ +class Libgit2AT18 < Formula + desc "C library of Git core methods that is re-entrant and linkable" + homepage "https://libgit2.github.com/" + url "https://github.com/libgit2/libgit2/archive/refs/tags/v1.8.4.tar.gz" + sha256 "49d0fc50ab931816f6bfc1ac68f8d74b760450eebdb5374e803ee36550f26774" + license "GPL-2.0-only" => { with: "GCC-exception-2.0" } + + livecheck do + url :stable + regex(/^v?(1\.8(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5a9fe4aae3865e5c977633107b829e639e6535d8f986c851d60d63bb2e5b0932" + sha256 cellar: :any, arm64_sonoma: "d04a13a2da8d14c6f0bee82751d472b13aa0fd8ed688eff218f7a0a18d29bf59" + sha256 cellar: :any, arm64_ventura: "94ef273252c464c308e859ebfb3b78814516f6a740d40c57394805c4fbcbcb58" + sha256 cellar: :any, sonoma: "4848894348322217f276122ab1d3307778f473430abbc51dc22818273b06cf83" + sha256 cellar: :any, ventura: "9a389072e0da2cb33c2c82bf7d57c49844c92c82be47d19f7e25f0b6666aa8c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4d124965d0952c612e40c46a4fe3423220509d57cc61118fe15eecce3dbc2ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "105c2c951f86f9de73797b314f92b46bddab6b6bb779cee7303d9eebec8a1c18" + end + + keg_only :versioned_formula + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libssh2" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" # Uses SecureTransport on macOS. + end + + def install + args = %w[-DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DUSE_SSH=ON -DUSE_BUNDLED_ZLIB=OFF] + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build" + 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 "build-static/libgit2.a" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char *argv[]) { + int options = git_libgit2_features(); + assert(options & GIT_FEATURE_SSH); + return 0; + } + C + libssh2 = Formula["libssh2"] + flags = %W[ + -I#{include} + -I#{libssh2.opt_include} + -L#{lib} + -lgit2 + ] + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgnt.rb b/Formula/lib/libgnt.rb new file mode 100644 index 0000000000000..fc7ee39b4173a --- /dev/null +++ b/Formula/lib/libgnt.rb @@ -0,0 +1,73 @@ +class Libgnt < Formula + desc "NCurses toolkit for creating text-mode graphical user interfaces" + homepage "https://keep.imfreedom.org/libgnt/libgnt" + url "https://keep.imfreedom.org/libgnt/libgnt/archive/v2.14.4.tar.gz" + sha256 "40840dd69832fdae930461e95d8505dabc8854b98a02c258c8833e0519eabe69" + license "GPL-2.0-or-later" + + livecheck do + url "https://keep.imfreedom.org/libgnt/libgnt/tags" + regex(%r{href=["']?[^"' >]*?/rev/v?(\d+(?:\.\d+)+)["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "83d17065c582bdcf162513a0523c19c44db30b00842cda416a2d335b7abc0eb9" + sha256 cellar: :any, arm64_sonoma: "40ab4a1893fe00347a02fb7b4cdf258598e1ae27e1594a1c4dff5461633f1a8a" + sha256 cellar: :any, arm64_ventura: "c564614df4b284c52854d467589dd9603a3502f38c9a07f11a8c35e778617c8b" + sha256 cellar: :any, sonoma: "4f3826fd8c722f84e3c568a74c27d48bc3f6a3a15db15721da56447c3f9d9d15" + sha256 cellar: :any, ventura: "567c90442a84e13142d104bd45b65df01359f65aa38b67f52f644d4cd1f5c90f" + sha256 arm64_linux: "b0f97890b91d6ca699459d1eca4c92793ea59dbf1e5cb7127f7ed051f9cfdfeb" + sha256 x86_64_linux: "23fe502bda696d00cfd7dd0f0f4022c46268337ae7bea8b0470b497d89540240" + end + + depends_on "gtk-doc" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "ncurses" + + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + # upstream bug report on this workaround, https://issues.imfreedom.org/issue/LIBGNT-15 + inreplace "meson.build", "ncurses_sys_prefix = '/usr'", + "ncurses_sys_prefix = '#{Formula["ncurses"].opt_prefix}'" + + system "meson", "setup", "build", "-Dpython2=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() { + gnt_init(); + gnt_quit(); + + return 0; + } + C + + flags = [ + "-I#{Formula["glib"].opt_include}/glib-2.0", + "-I#{Formula["glib"].opt_lib}/glib-2.0/include", + "-I#{include}", + "-L#{lib}", + "-L#{Formula["glib"].opt_lib}", + "-lgnt", + "-lglib-2.0", + ] + system ENV.cc, "test.c", *flags, "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libgoa.rb b/Formula/lib/libgoa.rb new file mode 100644 index 0000000000000..36293cbc62e55 --- /dev/null +++ b/Formula/lib/libgoa.rb @@ -0,0 +1,104 @@ +class Libgoa < Formula + desc "Single sign-on framework for GNOME - client library" + homepage "https://gitlab.gnome.org/GNOME/gnome-online-accounts" + url "https://download.gnome.org/sources/gnome-online-accounts/3.54/gnome-online-accounts-3.54.2.tar.xz" + sha256 "0f7f3d29c0666ffbcc503f3e0f3396362effdb9317d41664ce65df147ef35372" + license "LGPL-2.0-or-later" + head "https://gitlab.gnome.org/GNOME/gnome-online-accounts.git", branch: "master" + + livecheck do + formula "gnome-online-accounts" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "f5aaaa535f351146fc1769dfac34421cf348e5b6a2cb9fb70899a588628b3f99" + sha256 cellar: :any, arm64_sonoma: "666c2f9ecc77735ab00bb0f8fd434a69e95cea9a621d2b144de04f8675a84e48" + sha256 cellar: :any, arm64_ventura: "f10ea2abc7a91c52f27b12f01f34e576bdf9bad9cb1ef12d2f4fdb670b7f6952" + sha256 cellar: :any, sonoma: "cb4f5ee766a6bb036ade405578add121edefcaa09c240562d5afb065135d43a6" + sha256 cellar: :any, ventura: "a935efcc6d67dd6a85207db48c182af3ac01ec27ca3890d73b3e8a404f9371f2" + sha256 arm64_linux: "0342fd0a22a28efe355e0fa51290990e884207e9e9bc2b49b764ed2c187171e9" + sha256 x86_64_linux: "5b43b7a2515062118241915b67c31f33cbae1d932797693745f331496e1798d9" + end + + depends_on "dbus" => [:build, :test] + depends_on "gobject-introspection" => :build + depends_on "gtk4" => :build # gtk4-update-icon-cache + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + + depends_on "glib" + + def install + ENV["DESTDIR"] = "/" + + system "meson", "setup", "build", "-Ddocumentation=false", "-Dgoabackend=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + # Remove directories that are installed in `gnome-online-accounts` + rm_r([share/"icons", share/"locale"].select(&:exist?)) + end + + test do + # https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/blob/master/src/examples/list-accounts.c + (testpath/"test.c").write <<~'C' + #define GOA_API_IS_SUBJECT_TO_CHANGE + #include + + int main (int argc, char **argv) { + GError *error = NULL; + GoaClient *client; + GList *accounts, *l; + GoaAccount *account; + + client = goa_client_new_sync (NULL, &error); + if (!client) { + g_critical ("Could not create GoaClient: %s", error->message); + return 1; + } + + accounts = goa_client_get_accounts (client); + for (l = accounts; l != NULL; l = l->next) { + GoaOAuth2Based *oauth2 = NULL; + + account = goa_object_get_account (GOA_OBJECT (l->data)); + g_print ("%s at %s (%s)\n", + goa_account_get_presentation_identity (account), + goa_account_get_provider_name (account), + goa_account_get_provider_type (account)); + oauth2 = goa_object_get_oauth2_based (GOA_OBJECT (l->data)); + if (oauth2) { + gchar *access_token; + if (goa_oauth2_based_call_get_access_token_sync (oauth2, + &access_token, + NULL, + NULL, + NULL)) { + g_print ("\tAccessToken: %s\n", access_token); + g_free (access_token); + } + g_print ("\tClientId: %s\n\tClientSecret: %s\n", + goa_oauth2_based_get_client_id (oauth2), + goa_oauth2_based_get_client_secret (oauth2)); + } + g_clear_object (&oauth2); + } + + g_list_free_full (accounts, (GDestroyNotify) g_object_unref); + return 0; + } + C + + ENV["XDG_DATA_DIRS"] = testpath # avoid loading system dbus services + ENV["DBUS_SESSION_BUS_ADDRESS"] = address = "unix:path=#{testpath}/bus" + pid = spawn(Formula["dbus"].bin/"dbus-daemon", "--session", "--nofork", "--address=#{address}") + sleep 2 + system ENV.cc, "test.c", "-o", "test", *shell_output("pkgconf --cflags --libs goa-1.0").chomp.split + system "./test" + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/lib/libgosu.rb b/Formula/lib/libgosu.rb new file mode 100644 index 0000000000000..ddc8b2d5bad85 --- /dev/null +++ b/Formula/lib/libgosu.rb @@ -0,0 +1,74 @@ +class Libgosu < Formula + desc "2D game development library" + homepage "https://libgosu.org/" + url "https://github.com/gosu/gosu/archive/refs/tags/v1.4.6.tar.gz" + sha256 "bbd4c4a868549702e190542f0dc5be8210c8290378ae9b24a75a86e57aa8f39e" + license "MIT" + head "https://github.com/gosu/gosu.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3a5fa70c9c6f1dcdb60fbeb50e8ec544b341c25f0c9d426d5f3982948a10a427" + sha256 cellar: :any, arm64_sonoma: "e212870f51bae367a0d9e2fe223ad8b6b69562efa3f368f7ca09ca554c9d83e3" + sha256 cellar: :any, arm64_ventura: "521365479b25946aab5db44d2672521ec732e5dc9d1fd80c23bad38f0d7756ed" + sha256 cellar: :any, arm64_monterey: "fc8542f6a694357798be7e2280be1bc66b1ced40692806638f2ac7fc699bf189" + sha256 cellar: :any, arm64_big_sur: "45e4d5e3f63678dfe1ae61c425a1f5b1e442644e04ec36e4d3ee13cf58ce6b13" + sha256 cellar: :any, sonoma: "5bc693e53a3a48a990482ba76ef8d512099f48959a9be934d31d0e63533068da" + sha256 cellar: :any, ventura: "9249cfa9a1cb2faa015c4b4d8c5a34e15d5d4c5623af8b5bd212b160f5b23869" + sha256 cellar: :any, monterey: "a06cbc49f0b79d5ce52875fbd2601e3e0acb1c4eec00b074d12809abc504e1e8" + sha256 cellar: :any, big_sur: "d06e787193c8f18a0696a64dbcb0a82ef7aeae666e2ef6b0470788ac0ebd65fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "48f8286f58619e5155092fe286194251c63398dbcc20bdfd17bfe6ac82b792ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "925189b43a69daaf38ec2011cdfa605d5f6f07aded7ca4828eb33570dee8f695" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "sdl2" + + on_linux do + depends_on "fontconfig" + depends_on "mesa" + depends_on "mesa-glu" + depends_on "openal-soft" + end + + 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.cpp").write <<~CPP + #include + #include + + class MyWindow : public Gosu::Window + { + public: + MyWindow() + : Gosu::Window(640, 480) + { + set_caption("Hello World!"); + } + + void update() + { + exit(0); + } + }; + + int main() + { + MyWindow window; + window.show(); + } + CPP + + system ENV.cxx, "test.cpp", "-o", "test", "-L#{lib}", "-lgosu", "-I#{include}", "-std=c++17" + + # Fails in Linux CI with "Could not initialize SDL Video: No available video device" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system "./test" + end +end diff --git a/Formula/lib/libgpg-error.rb b/Formula/lib/libgpg-error.rb new file mode 100644 index 0000000000000..760b795913b53 --- /dev/null +++ b/Formula/lib/libgpg-error.rb @@ -0,0 +1,62 @@ +class LibgpgError < Formula + desc "Common error values for all GnuPG components" + homepage "https://www.gnupg.org/related_software/libgpg-error/" + url "https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.55.tar.bz2" + sha256 "95b178148863f07d45df0cea67e880a79b9ef71f5d230baddc0071128516ef78" + license "LGPL-2.1-or-later" + + livecheck do + url "https://gnupg.org/ftp/gcrypt/libgpg-error/" + regex(/href=.*?libgpg-error[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "a2d0e274ace59980a81d2b06c445ddef5498c69cbefc85bdf04d3d79d0dfd71d" + sha256 arm64_sonoma: "3ef3920eef9d7f025f528e438ec467d763bfe595e11a5763f0c63fb6dd40aeae" + sha256 arm64_ventura: "d0067e8720929efdf81cc5b5dd9b3b05ca7d7dccbdc7e3178e25103f2e85ccdf" + sha256 sonoma: "031f35425ad74efb6299dec9832896c281c630d672c65559bd9dd62c256be76c" + sha256 ventura: "5ad9a39d350da42b905a240de2910ccea43a320b23a56e557d934deafb986c30" + sha256 arm64_linux: "142ea10cc7ccbcfc02f233a3c8f18cb2c90964bb0164da7335a9caa9d08abf1b" + sha256 x86_64_linux: "78119cb448e954ceba1461b93a80700168ecf3b9e330a39f5b3a6f195d162607" + end + + on_macos do + depends_on "gettext" + end + + # Declare environ - upstream bug https://dev.gnupg.org/T7169 + patch :DATA + + def install + # NOTE: gpg-error-config is deprecated upstream, so we should remove this at some point. + # https://dev.gnupg.org/T5683 + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--enable-install-gpg-error-config", + "--enable-static" + system "make", "install" + + # avoid triggering mandatory rebuilds of software that hard-codes this path + inreplace [bin/"gpg-error-config", lib/"pkgconfig/gpg-error.pc"], prefix, opt_prefix + end + + test do + system bin/"gpgrt-config", "--libs" + end +end + +__END__ +--- a/src/spawn-posix.c ++++ b/src/spawn-posix.c +@@ -57,7 +57,10 @@ + + #include "gpgrt-int.h" + ++/* (Only glibc's unistd.h declares this iff _GNU_SOURCE is used.) */ ++extern char **environ; ++ + + /* Definition for the gpgrt_spawn_actions_t. Note that there is a + * different one for Windows. */ + struct gpgrt_spawn_actions { + diff --git a/Formula/lib/libgphoto2.rb b/Formula/lib/libgphoto2.rb new file mode 100644 index 0000000000000..0748de3e41f93 --- /dev/null +++ b/Formula/lib/libgphoto2.rb @@ -0,0 +1,68 @@ +class Libgphoto2 < Formula + desc "Gphoto2 digital camera library" + homepage "http://www.gphoto.org/proj/libgphoto2/" + url "https://downloads.sourceforge.net/project/gphoto/libgphoto/2.5.31/libgphoto2-2.5.31.tar.bz2" + sha256 "4f81c34c0b812bee67afd5f144940fbcbe01a2055586a6a1fa2d0626024a545b" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/libgphoto2[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_sequoia: "3fb2e9bda06e7f94540e798c31fca1f06d8028039eb2e558e501e4e85e68402f" + sha256 arm64_sonoma: "a755497f42fd0a62182de3d1ba2956af248282fc6b3462e700b8f9a5713110a4" + sha256 arm64_ventura: "989c4ffad8b8da9e9e7748e83989601d098c124274d971871c2088f1b98f78cc" + sha256 arm64_monterey: "f291bfec3c081315cc530beb04e7ff103f5d4fc2fcae93f5afa10da435f7402f" + sha256 arm64_big_sur: "2ee65202bb463bf07f09372c95da9ab0d9b23b51eedf6fdf3e3ae5b19a11a7bf" + sha256 sonoma: "b7d5802488add54cbeb1c52c2b954058ccdc6904e39010009638bea5d15d6075" + sha256 ventura: "481cd4585e8278757a229d2f75f43d9ee51962b3608870c392a37e0d761e8989" + sha256 monterey: "39889cb109e62d49a237282be1e978a5c064cc9f8f393446d9b8faf5a39b6bb8" + sha256 big_sur: "24327cb6e498cba40d9ae4b1a35161cc7ee112e33d0da33486c4ee4b19585a23" + sha256 arm64_linux: "7a0563ea6f1a714b223e0ab839eb0cee2d500c6454e70d2d47837c781280fcfc" + sha256 x86_64_linux: "02f41488d9958e0be78a30c5d32d8f2b0e0073f954219deffc6f5f53f11120ca" + end + + head do + url "https://github.com/gphoto/libgphoto2.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + end + + depends_on "pkgconf" => :build + + depends_on "gd" + depends_on "jpeg-turbo" + depends_on "libexif" + depends_on "libtool" + depends_on "libusb" + depends_on "libusb-compat" + + uses_from_macos "curl" + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + 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.c").write <<~C + #include + int main(void) { + Camera *camera; + return gp_camera_new(&camera); + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lgphoto2", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libgr.rb b/Formula/lib/libgr.rb new file mode 100644 index 0000000000000..f30bee5097f62 --- /dev/null +++ b/Formula/lib/libgr.rb @@ -0,0 +1,67 @@ +class Libgr < Formula + desc "GR framework: a graphics library for visualisation applications" + homepage "https://gr-framework.org/" + url "https://github.com/sciapp/gr/archive/refs/tags/v0.73.14.tar.gz" + sha256 "44812cb33ce6a3d3c58415a03cc1faa881abfb9a84d3623be054843248c98d3a" + license "MIT" + + bottle do + sha256 arm64_sonoma: "b6a0df6b910b3e78ce870e8197b45860685210f92b2dbd9895504a6a2ae1e54c" + sha256 arm64_ventura: "44da0c44166abe526e77f763e4aa3243b729a43ecbe86bde2858ff5f60d09234" + sha256 sonoma: "134f17558c927ed967a1d8055ba5fbc9691e8720fe845b91c46ed9afa0ced74a" + sha256 ventura: "8569d42c0249b9280275624ca38f9ebc852ca72b5fd638977a4f04849d1ca5b9" + sha256 x86_64_linux: "f645563ef34f03ec5f59370c8a447fe32059efaf9df20ebdb2fc4c7ea56b7a36" + end + + depends_on "cmake" => :build + depends_on "cairo" + depends_on "ffmpeg" + depends_on "freetype" + depends_on "glfw" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "pixman" + depends_on "qhull" + depends_on "qt" + depends_on "zeromq" + + uses_from_macos "zlib" + + on_linux do + depends_on "libx11" + depends_on "libxt" + depends_on "mesa" + 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 + #include + + int main(void) { + gr_opengks(); + gr_openws(1, "test.png", 140); + gr_activatews(1); + double x[] = {0, 0.2, 0.4, 0.6, 0.8, 1.0}; + double y[] = {0.3, 0.5, 0.4, 0.2, 0.6, 0.7}; + gr_polyline(6, x, y); + gr_axes(gr_tick(0, 1), gr_tick(0, 1), 0, 0, 1, 1, -0.01); + gr_updatews(); + gr_emergencyclosegks(); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lGR" + system "./test" + + assert_path_exists testpath/"test.png" + end +end diff --git a/Formula/lib/libgrape-lite.rb b/Formula/lib/libgrape-lite.rb new file mode 100644 index 0000000000000..02d72bb942bf1 --- /dev/null +++ b/Formula/lib/libgrape-lite.rb @@ -0,0 +1,67 @@ +class LibgrapeLite < Formula + desc "C++ library for parallel graph processing" + homepage "https://github.com/alibaba/libgrape-lite" + url "https://github.com/alibaba/libgrape-lite/archive/refs/tags/v0.3.4.tar.gz" + sha256 "4d7c08560d56fde4a407566fea5ea348cf8ea7df5dbcc3285dcbfe6d9e5d6ff7" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a9b43421f7640ae0bf58c960c15c1f6ef7ea8dbffd6114085f51cf1ec786da4b" + sha256 cellar: :any, arm64_sonoma: "169a84d962028247357fb70d3fd9a00eef09d04043bfc599c547b29545204dc6" + sha256 cellar: :any, arm64_ventura: "fb65f947aab53a0b99aecdfe1eb27d7b3ebd3bf2deaae44983106d79be23324a" + sha256 cellar: :any, arm64_monterey: "669d5c4c46c62ca376f7d88d6ccd8ca1af65e4c5c496c22d59239dcc64aa7bb7" + sha256 cellar: :any, arm64_big_sur: "e39c3c95ebf47c8a91ad1f4ec55e150f0fb983a0749b1c918fabb67cb7782b59" + sha256 cellar: :any, sonoma: "2d3b960d3911a6a179bee03366ac528a70409ebda55a15fafbc2fd39e173030a" + sha256 cellar: :any, ventura: "56fc6ce45234cdeebabf4e0e533cdf410fcb67f118635b030a774b5c1d80435f" + sha256 cellar: :any, monterey: "5df9681434c5b8db7a4f10bc80d34154362a6e14eb8659166b857c04b11f188c" + sha256 cellar: :any, big_sur: "dca697a6f0ffe5241d9e87cc361e3155351524e8087b105ceb383002a3abf364" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea7a2e7ebc3fd7739d360b0024e10a04dece25cac57b36905570a40b4ee90ddf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4daa1bec1b6d6e493964783687cc05609cfa2e6e97279450134de32672eae244" + end + + depends_on "cmake" => :build + depends_on "gflags" + depends_on "glog" + depends_on "open-mpi" + + 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 + + int main() { + // init + grape::InitMPIComm(); + + { + grape::CommSpec comm_spec; + comm_spec.Init(MPI_COMM_WORLD); + std::cout << "current worker id: " << comm_spec.worker_id() << std::endl; + } + + // finalize + grape::FinalizeMPIComm(); + } + CPP + + system ENV.cxx, "test.cc", "-std=c++11", + "-I#{Formula["glog"].include}", + "-I#{Formula["open-mpi"].include}", + "-I#{include}", + "-L#{Formula["glog"].lib}", + "-L#{Formula["open-mpi"].lib}", + "-L#{lib}", + "-lgrape-lite", + "-lglog", + "-lmpi", + "-o", "test_libgrape_lite" + + assert_equal("current worker id: 0\n", shell_output("./test_libgrape_lite")) + end +end diff --git a/Formula/lib/libgrapheme.rb b/Formula/lib/libgrapheme.rb new file mode 100644 index 0000000000000..32ddc4eee9d9e --- /dev/null +++ b/Formula/lib/libgrapheme.rb @@ -0,0 +1,46 @@ +class Libgrapheme < Formula + desc "Unicode string library" + homepage "https://libs.suckless.org/libgrapheme/" + url "https://dl.suckless.org/libgrapheme/libgrapheme-2.0.2.tar.gz" + sha256 "a68bbddde76bd55ba5d64116ce5e42a13df045c81c0852de9ab60896aa143125" + license "ISC" + head "https://git.suckless.org/libgrapheme/", using: :git, branch: "master" + + livecheck do + url "git://git.suckless.org/libgrapheme" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "15463cba352ca4de4ebd865ae7aeee520871711b7c0dca0cceebfba78dbe88c5" + sha256 cellar: :any, arm64_sonoma: "961545ff7d4e1825ee195a79d6522ba7ae226c401d72b655410d8a132933eb2e" + sha256 cellar: :any, arm64_ventura: "971fab94ac4bca569f0656596168b05847d4e25b566868e4c9ac3965ed336755" + sha256 cellar: :any, arm64_monterey: "f2e9d7e0dbed9091c6ff0feb79e94ce68f73c6a83a1774efd75c3d0e76c7fbb8" + sha256 cellar: :any, arm64_big_sur: "b4ad8de03ed698baa6d540d58aa96ccb7b0f666fb357acbf55a5c75e50f9d818" + sha256 cellar: :any, sonoma: "85e08a9ae4f0d7a6254abc0174d0f82c8d57c2f787719047d2109a015144a52a" + sha256 cellar: :any, ventura: "4d09c7de0e3ddaea6266896b3a0da7349701f032ae9b4e85cad29bb0f1bb2575" + sha256 cellar: :any, monterey: "14ae921b0f9c017dd446d9b05ef6d7f5ef7b1f3b30d9c3151ff64bbc9864624f" + sha256 cellar: :any, big_sur: "3a840b6287ec37255d069209beb8f49cd9634e7640ed1b4bb1b63a7f5e79fe79" + sha256 cellar: :any, catalina: "32cdbccf13da47774ca9aadd3826710c97c8bc5b9ff5cfdc8b809dd0f90ef9f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ea309461d84ca854a54880efc24a348a2bf76769c9512ef8167574f8a280b3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "60a6a771715b993b79da30c2f17553198b49ba71cb5ee5d9a07ea51c0199280b" + end + + def install + system "./configure" + system "make", "PREFIX=#{prefix}", "LDCONFIG=", "install" + end + + test do + (testpath/"example.c").write <<~C + #include + + int + main(void) + { + return (grapheme_next_word_break_utf8("Hello World!", SIZE_MAX) != 5); + } + C + system ENV.cc, "example.c", "-I#{include}", "-L#{lib}", "-lgrapheme", "-o", "example" + system "./example" + end +end diff --git a/Formula/lib/libgsf.rb b/Formula/lib/libgsf.rb new file mode 100644 index 0000000000000..6cb602c6a3b0b --- /dev/null +++ b/Formula/lib/libgsf.rb @@ -0,0 +1,61 @@ +class Libgsf < Formula + desc "I/O abstraction library for dealing with structured file formats" + homepage "https://gitlab.gnome.org/GNOME/libgsf" + url "https://download.gnome.org/sources/libgsf/1.14/libgsf-1.14.53.tar.xz" + sha256 "0eb59a86e0c50f97ac9cfe4d8cc1969f623f2ae8c5296f2414571ff0a9e8bcba" + license "LGPL-2.1-only" + + bottle do + sha256 arm64_sequoia: "186311b43c3be3ef3cd8d29c257b1c1f5449022658c3523bc0897f75d2967765" + sha256 arm64_sonoma: "ff6100584fe708188b457967ee517b9cd48337f45d4cb91906b5a6a91e92515c" + sha256 arm64_ventura: "cbb7b8877bf62f1721c27235d5a76ce890341063e428bf17bc8b03e91512f6eb" + sha256 sonoma: "07cc0b89f9b8cf89e170f72122e452446b292bcc882aab9a8d18504083fc4c17" + sha256 ventura: "502444a3812646ac8a35a9beb5f06346ca33ad5b968f904f0fba056d63ffa315" + sha256 arm64_linux: "f561fa5685eb784fec3189a59041d8e2ac2a7bdd660347310420dca43dbc9f76" + sha256 x86_64_linux: "fa65b00122a957bacfebe171cc2ee998d059cd2e43c88784cbb1e7da47ba1934" + end + + head do + url "https://github.com/GNOME/libgsf.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build + depends_on "gtk-doc" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "glib" + + uses_from_macos "bzip2" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + system bin/"gsf", "--help" + (testpath/"test.c").write <<~C + #include + int main() + { + void + gsf_init (void); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", + "-I#{include}/libgsf-1", + "-I#{Formula["glib"].opt_include}/glib-2.0", + "-I#{Formula["glib"].opt_lib}/glib-2.0/include" + system "./test" + end +end diff --git a/Formula/lib/libgsm.rb b/Formula/lib/libgsm.rb new file mode 100644 index 0000000000000..853b5a03acecf --- /dev/null +++ b/Formula/lib/libgsm.rb @@ -0,0 +1,95 @@ +class Libgsm < Formula + desc "Lossy speech compression library" + homepage "https://www.quut.com/gsm/" + url "https://www.quut.com/gsm/gsm-1.0.22.tar.gz" + sha256 "f0072e91f6bb85a878b2f6dbf4a0b7c850c4deb8049d554c65340b3bf69df0ac" + license "TU-Berlin-2.0" + + livecheck do + url :homepage + regex(/href=.*?gsm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "73ab84857bda140ae2dbf8dcbba53376739db92a4943fa2aa5e9939ebe7365ba" + sha256 cellar: :any, arm64_sonoma: "b67bf46ae228c9cdb566c31cbf903c2b36933a43c225600420b7c95a41516601" + sha256 cellar: :any, arm64_ventura: "873e314d6adc194af517d5e44f780822d23f39e19b13baec333bd28d990fa5ea" + sha256 cellar: :any, sonoma: "b3ffd6c44c59f8cba9394605a52ac959cd69d50dc2e4173cdb6ea395bdbc493b" + sha256 cellar: :any, ventura: "b8c2c17f921fb1fe0bdf21868c08d66b6792a14e419c4ac15ee0d4d79f15e628" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d58e3f81b1b007ea285d82e680f1dff3fae11ebce2bb2c712af0d2dd0cca343" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a2e88a7ac1d423da03aba16b51e7eb10eb69925ad46fd98259c5bf054301600" + end + + conflicts_with "toast", because: "both install `toast` binaries" + + def install + # Only the targets for which a directory exists will be installed + bin.mkpath + lib.mkpath + include.mkpath + man1.mkpath + man3.mkpath + + arflags = if OS.mac? + %W[ + -dynamiclib + -compatibility_version #{version.major} + -current_version #{version} + -install_name #{lib/shared_library("libgsm", version.major.to_s)} + ] + else + %W[ + -shared + -Wl,-soname,#{shared_library("libgsm", version.major.to_s)} + ] + end + arflags << "-o" + + args = [ + "INSTALL_ROOT=#{prefix}", + "GSM_INSTALL_INC=#{include}", + "GSM_INSTALL_MAN=#{man3}", + "TOAST_INSTALL_MAN=#{man1}", + "LN=ln -s", + "AR=#{ENV.cc}", + "ARFLAGS=#{arflags.join(" ")}", + "RANLIB=true", + "LIBGSM=$(LIB)/#{shared_library("libgsm", version.to_s)}", + ] + args << "CC=#{ENV.cc} -fPIC" if OS.linux? + + # We need to `make all` to avoid a parallelisation error. + system "make", "all", *args + system "make", "install", *args + + # Our shared library is erroneously installed as `libgsm.a` + lib.install lib/"libgsm.a" => shared_library("libgsm", version.to_s) + lib.install_symlink shared_library("libgsm", version.to_s) => shared_library("libgsm") + lib.install_symlink shared_library("libgsm", version.to_s) => shared_library("libgsm", version.major.to_s) + lib.install_symlink shared_library("libgsm", version.to_s) => shared_library("libgsm", version.major_minor.to_s) + + # Build static library + system "make", "clean" + system "make", "./lib/libgsm.a" + lib.install "lib/libgsm.a" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + gsm g = gsm_create(); + if (g == 0) + { + return 1; + } + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lgsm", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libgtop.rb b/Formula/lib/libgtop.rb new file mode 100644 index 0000000000000..65f40608baa13 --- /dev/null +++ b/Formula/lib/libgtop.rb @@ -0,0 +1,56 @@ +class Libgtop < Formula + desc "Library for portably obtaining information about processes" + homepage "https://gitlab.gnome.org/GNOME/libgtop" + url "https://download.gnome.org/sources/libgtop/2.40/libgtop-2.40.0.tar.xz" + sha256 "78f3274c0c79c434c03655c1b35edf7b95ec0421430897fb1345a98a265ed2d4" + license "GPL-2.0-or-later" + revision 1 + + bottle do + rebuild 2 + sha256 arm64_sequoia: "558ead5d7327e92a4997128e3c0f48679ed64aedc06868e508b54ad054e4aeea" + sha256 arm64_sonoma: "70be94bdf1f981d45870143f0d93cca108a8c2a21da4530433edb0c0191d0829" + sha256 arm64_ventura: "7ec6391d407997898f52778846034783e0d1f8fd88c3c5dce7e31fa7a7c9214a" + sha256 arm64_monterey: "efd17d53f38b17e4dbce28b8ce2b47cb3f832010107b44800f16f109eca55929" + sha256 arm64_big_sur: "1b03ee2aee7281a673eff7004f5141e4077e0dfbd2e1ce31a9590fb1f3fc221c" + sha256 sonoma: "337d36977c59d423acfbf3fd0bc258069f50b80eb4a3f537ae006e5cc42cf948" + sha256 ventura: "ead43b0acfd3e16e8075e97d6e20809103058a8e56d0558353eb6da6b9487d62" + sha256 monterey: "96b3327e8a7cce44d856f6a2968512ad75a121901378ef5bdff0530999dd42c2" + sha256 big_sur: "e749a43ebcc150fba221570873bb6df8765eedd1719ad7080dbbb84b809b477d" + sha256 catalina: "9946efd963f1911a13a57d684d9b441ce804777711cfb88fc48fdcf55e6ba620" + sha256 mojave: "9a219f60e6ad45d0c4c01e3477789ea27a54595fdc16751f3b964d4cfb56fc3a" + sha256 arm64_linux: "43bbad6856591e1a58262e9abfc56ae5bb28f3bc0b5e727d2ce547a4bc0b92db" + sha256 x86_64_linux: "e397a31d868662a5cdc37e9c4f6dba1557a0f6d07d76c212f7ccf5775b7a70a3" + end + + depends_on "gobject-introspection" => :build + depends_on "intltool" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "gettext" + depends_on "glib" + depends_on "libxau" + + def install + # workaround for newer clang + # upstream bug report, https://gitlab.gnome.org/GNOME/libgtop/-/issues/73 + ENV.append_to_cflags "-Wno-int-conversion" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--without-x", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + const glibtop_sysinfo *info = glibtop_get_sysinfo(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libgtop-2.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgudev.rb b/Formula/lib/libgudev.rb new file mode 100644 index 0000000000000..e73079d7db7aa --- /dev/null +++ b/Formula/lib/libgudev.rb @@ -0,0 +1,50 @@ +class Libgudev < Formula + desc "GObject bindings for libudev" + homepage "https://gitlab.gnome.org/GNOME/libgudev" + url "https://download.gnome.org/sources/libgudev/238/libgudev-238.tar.xz" + sha256 "61266ab1afc9d73dbc60a8b2af73e99d2fdff47d99544d085760e4fa667b5dd1" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_linux: "87a74706d570f25e40cec26c3ab07258b0b7e1b99950927d14083310f6998869" + sha256 x86_64_linux: "c1e3053f6df286a07df2a34c82054fabb56af45680102943a5e459d12cc94cad" + 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 :linux + depends_on "systemd" + + def install + system "meson", "setup", "build", "-Dintrospection=enabled", + "-Dtests=disabled", + "-Dvapi=enabled", + *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() { + g_autoptr(GUdevClient) client = NULL; + g_autolist(GUdevDevice) devices; + client = g_udev_client_new (NULL); + devices = g_udev_client_query_by_subsystem (client, NULL); + g_assert_cmpint (g_list_length (devices), >, 0); + return 0; + } + C + ENV.append_path "PKG_CONFIG_PATH", Formula["systemd"].lib/"pkgconfig" + system ENV.cc, "test.c", "-o", "test", *shell_output("pkgconf --cflags --libs gudev-1.0").chomp.split + system "./test" + end +end diff --git a/Formula/lib/libgusb.rb b/Formula/lib/libgusb.rb new file mode 100644 index 0000000000000..ad292a3593249 --- /dev/null +++ b/Formula/lib/libgusb.rb @@ -0,0 +1,72 @@ +class Libgusb < Formula + include Language::Python::Shebang + + desc "GObject wrappers for libusb1" + homepage "https://github.com/hughsie/libgusb" + license "LGPL-2.1-or-later" + head "https://github.com/hughsie/libgusb.git", branch: "main" + + stable do + url "https://github.com/hughsie/libgusb/archive/refs/tags/0.4.9.tar.gz" + sha256 "aa1242a308183d4ca6c2e8c9e3f2e345370b94308ef2d4b6e9c10d5ff6d7763e" + + # add shebang patch for `contrib/generate-version-script.py`, upstream pr ref, https://github.com/hughsie/libgusb/pull/119 + patch do + url "https://github.com/hughsie/libgusb/commit/371e851d4229d576e7c3e25a39a0f74449ad2ae3.patch?full_index=1" + sha256 "cced0c66c9a91bb94b3cc02fe6740ecaf14cd2a8866f1d3e7a8af1378d25ffc8" + end + end + + bottle do + rebuild 2 + sha256 arm64_sequoia: "b5315217b63018e0935afaa911b71f26fb0dbd990a9496c97adb7a9a4837b1a0" + sha256 arm64_sonoma: "00eb752982e5b27777af8dfa4d83eb2396acf9d4612c89fd8a8c56e6e00d8ae5" + sha256 arm64_ventura: "9753de67392b95353dd90f9e745d4343bb79fcec324884048fcf283e7034939c" + sha256 sonoma: "f4e98d60eed3f9d811415d82027560f3ca55945e17b78fafc961c56ee690915f" + sha256 ventura: "45c340c32f582a777d7a24667d7378e0b95d1043e32095cdb9356c8895fca893" + sha256 arm64_linux: "ffc70db16c18b845ad99a159902c8eb20397d38f38ff7d2f2f7842623923fa6f" + sha256 x86_64_linux: "ff05a0fdc15a300ceb4218458751283a54f691b12be3a627e98fdce3b218b7bd" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python-setuptools" => :build + depends_on "vala" => :build + + depends_on "glib" + depends_on "json-glib" + depends_on "libusb" + depends_on "python@3.13" + depends_on "usb.ids" + + def install + rewrite_shebang detected_python_shebang, "contrib/generate-version-script.py" + + system "meson", "setup", "build", + "-Ddocs=false", + "-Dusb_ids=#{Formula["usb.ids"].opt_share}/misc/usb.ids", + *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system bin/"gusbcmd", "-h" + + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + GUsbContext *context = g_usb_context_new(NULL); + g_assert_nonnull(context); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs gusb").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgweather.rb b/Formula/lib/libgweather.rb new file mode 100644 index 0000000000000..c71704ea925a8 --- /dev/null +++ b/Formula/lib/libgweather.rb @@ -0,0 +1,78 @@ +class Libgweather < Formula + desc "GNOME library for weather, locations and timezones" + homepage "https://wiki.gnome.org/Projects/LibGWeather" + url "https://download.gnome.org/sources/libgweather/4.4/libgweather-4.4.4.tar.xz" + sha256 "7017677753cdf7d1fdc355e4bfcdb1eba8369793a8df24d241427a939cbf4283" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + version_scheme 1 + + # Ignore version 40 which is older than 4.0 as discussed in + # https://gitlab.gnome.org/GNOME/libgweather/-/merge_requests/120#note_1286867 + livecheck do + url :stable + strategy :gnome do |page, regex| + page.scan(regex).select { |match| Version.new(match.first) < 40 }.flatten + end + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "def0a9ed0b83c1c6601df15db175bb336f73fd853f86c93a1a0cc1994ea467bf" + sha256 arm64_sonoma: "4bdf722d36c2c99c6a3dd7d816cfd3d73e439a9225ed36e0bee4240193f5f4d8" + sha256 arm64_ventura: "bb2d31e83d13f02446f7e5b523eeeb4cdf86e2065a8572ff1cd449b9abf1ea7c" + sha256 sonoma: "186ce1fa070215a5d1bd8a1f7d8ab3e64113dfb069a315a82c30853d230fecdf" + sha256 ventura: "255051452c7188eeec6d22267edae06a83e797a0713ab80d805ec52968cf7d65" + sha256 arm64_linux: "095621c2603b0088caea217355becba74fb1ece6bd06c1a4f21a0b23496711a1" + sha256 x86_64_linux: "e2107ed28850147098f165b516687d2e7a0aa494d39fbb4ac1326ebdb74c4ecc" + 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 "pygobject3" => :build + depends_on "python@3.13" => :build + + depends_on "geocode-glib" + depends_on "glib" + depends_on "gtk+3" + depends_on "json-glib" + depends_on "libsoup" + + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + def install + ENV["DESTDIR"] = "/" + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "meson", "setup", "build", "-Dgtk_doc=false", "-Dtests=false", *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" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + GType type = gweather_info_get_type(); + return 0; + } + C + ENV.prepend_path "PKG_CONFIG_PATH", Formula["icu4c"].opt_lib/"pkgconfig" if OS.mac? + flags = shell_output("pkgconf --cflags --libs gweather4").chomp.split + system ENV.cc, "-DGWEATHER_I_KNOW_THIS_IS_UNSTABLE=1", "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libgxps.rb b/Formula/lib/libgxps.rb new file mode 100644 index 0000000000000..b676dbac7f09e --- /dev/null +++ b/Formula/lib/libgxps.rb @@ -0,0 +1,109 @@ +class Libgxps < Formula + desc "GObject based library for handling and rendering XPS documents" + homepage "https://wiki.gnome.org/Projects/libgxps" + url "https://download.gnome.org/sources/libgxps/0.3/libgxps-0.3.2.tar.xz" + sha256 "6d27867256a35ccf9b69253eb2a88a32baca3b97d5f4ef7f82e3667fa435251c" + license "LGPL-2.1-or-later" + revision 3 + head "https://gitlab.gnome.org/GNOME/libgxps.git", branch: "master" + + livecheck do + url :stable + regex(/libgxps[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "fdca2abeb3cab442e39539689c5faf9c5540fc723f01c0596c11f2943874c45b" + sha256 cellar: :any, arm64_sonoma: "0bc7f03e4357779ac617e6750d70daff18da2a7da889387acdfe75891bcfce0e" + sha256 cellar: :any, arm64_ventura: "07d90913277ea1e2a74c547c02173058afa2588ede3e9236ff7f334c894a7b6a" + sha256 cellar: :any, arm64_monterey: "50c2d473739fb423b1145baaf06f7585ee9a64e5021806bff07cb1f772c1f8f1" + sha256 cellar: :any, arm64_big_sur: "2dc505d1715d95510c25f98507f755490c8277324cd8b9ef008c5e8f7783488f" + sha256 cellar: :any, sonoma: "c97166ce8e20af3056cae52203f19b07b98f702dc2fec8f076f96dfd8bbc2c88" + sha256 cellar: :any, ventura: "d23e0dfb5092636567f86a31839a04fc0831253eb73dc0863929c9c71d648be2" + sha256 cellar: :any, monterey: "e523554e0a7faa5c8f0a4ff842f4b462d9cb24411d3f855cb4f7e4eaded44fe2" + sha256 cellar: :any, big_sur: "187f95bca68a60db5155a911033be4eab80537598f5dd788a3edbbb7303fe5a5" + sha256 arm64_linux: "c230ad46a5f67b2e3862f8d76c1a2e8b92fb59815e06d9265704d6940ae8e218" + sha256 x86_64_linux: "0fda080a2b1da025e6d6aef7a9e4934fefaabda48cc9c080088e1146cead5558" + end + + keg_only "it conflicts with `ghostscript`" + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "freetype" + depends_on "glib" + depends_on "jpeg-turbo" + depends_on "libarchive" + depends_on "libpng" + depends_on "libtiff" + depends_on "little-cms2" + + uses_from_macos "zip" => :test + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + # Tell meson to search for brewed zlib before host zlib on Linux. + # This is not the same variable as setting LD_LIBRARY_PATH! + ENV.append "LIBRARY_PATH", Formula["zlib"].opt_lib unless OS.mac? + + system "meson", "setup", "build", "-Denable-test=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + def caveats + <<~EOS + `ghostscript` now installs a conflicting #{shared_library("libgxps")}. + You may need to `brew unlink libgxps` if you have both installed. + EOS + end + + test do + mkdir_p [ + (testpath/"Documents/1/Pages/_rels/"), + (testpath/"_rels/"), + ] + + (testpath/"FixedDocumentSequence.fdseq").write <<~EOS + + + + EOS + (testpath/"Documents/1/FixedDocument.fdoc").write <<~EOS + + + + EOS + (testpath/"Documents/1/Pages/1.fpage").write <<~EOS + + EOS + (testpath/"_rels/.rels").write <<~EOS + + + + EOS + [ + "_rels/FixedDocumentSequence.fdseq.rels", + "Documents/1/_rels/FixedDocument.fdoc.rels", + "Documents/1/Pages/_rels/1.fpage.rels", + ].each do |f| + (testpath/f).write <<~EOS + + EOS + end + + zip = OS.mac? ? "/usr/bin/zip" : Formula["zip"].opt_bin/"zip" + Dir.chdir(testpath) do + system zip, "-qr", (testpath/"test.xps"), "_rels", "Documents", "FixedDocumentSequence.fdseq" + end + system bin/"xpstopdf", (testpath/"test.xps") + end +end diff --git a/Formula/lib/libhandy.rb b/Formula/lib/libhandy.rb new file mode 100644 index 0000000000000..a76eae512ce25 --- /dev/null +++ b/Formula/lib/libhandy.rb @@ -0,0 +1,63 @@ +class Libhandy < Formula + desc "Building blocks for modern adaptive GNOME apps" + homepage "https://gitlab.gnome.org/GNOME/libhandy" + url "https://gitlab.gnome.org/GNOME/libhandy/-/archive/1.8.3/libhandy-1.8.3.tar.gz" + sha256 "7e7670f5d0a6d0adc24b888da44dab938a6f52472b8944d6dd4e31b6d3569a5f" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_sequoia: "df4227eb5f6062d4b9d6c36d374defe991229ee0ed9dc8e8902c97a1be026151" + sha256 arm64_sonoma: "f1b399070cea7b5c44e3afad605155f867659920d5d3de17c466cf5cc3ba6a33" + sha256 arm64_ventura: "46282e234e80d7e1333fd66978709232ccd69517759099868c386c6eec51ca84" + sha256 arm64_monterey: "2efac67c62c3b8da9bdb64fb4b37a0c66b184239009feb39d5407431b6f9b4e8" + sha256 sonoma: "b7451a9bbf91864a025ac3df2473f9dc91398b22d3994f4cc9907344e9be6f1f" + sha256 ventura: "ac6d97fd95891df7ecfa6caf13d15c28c153db6fea7da1dd9aee2e56c4780a59" + sha256 monterey: "9b94bd79179daca2b005bdd61ba0f1fcefdcd2b19ab85a9e5732f8c2f0428315" + sha256 arm64_linux: "9c76cf625f3b293b62040fd9663afb365c5606479dd08b37871304e7e913f6b8" + sha256 x86_64_linux: "6b470387d368374a5834bb3a73c2d0fcc4cc16121e785a064913735356581e85" + 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 "at-spi2-core" + depends_on "cairo" + depends_on "fribidi" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + depends_on "pango" + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + system "meson", "setup", "build", "-Dglade_catalog=disabled", *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[]) { + gtk_init (&argc, &argv); + hdy_init (); + HdyLeaflet *leaflet = HDY_LEAFLET (hdy_leaflet_new ()); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libhandy-1").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + # Don't have X/Wayland in Docker + system "./test" if OS.mac? + end +end diff --git a/Formula/lib/libharu.rb b/Formula/lib/libharu.rb new file mode 100644 index 0000000000000..077a80f63da23 --- /dev/null +++ b/Formula/lib/libharu.rb @@ -0,0 +1,59 @@ +class Libharu < Formula + desc "Library for generating PDF files" + homepage "https://github.com/libharu/libharu" + url "https://github.com/libharu/libharu/archive/refs/tags/v2.4.5.tar.gz" + sha256 "0ed3eacf3ceee18e40b6adffbc433f1afbe3c93500291cd95f1477bffe6f24fc" + license "Zlib" + head "https://github.com/libharu/libharu.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9c7a27f6e339997261bedf2c177bc414e108390ad21eee1a102f855183b2d8f1" + sha256 cellar: :any, arm64_sonoma: "5830f3184260a06dadbea0233a05bdcc1cf2c5d0f53291f985dca7511963fccd" + sha256 cellar: :any, arm64_ventura: "370df233f9ade42e8febcc4563eb80e6e112c553474d86ae9707519d2875f20a" + sha256 cellar: :any, sonoma: "c0f5f184237e5b4351a2d79b3c301a4d70483bc678665524298048941938d166" + sha256 cellar: :any, ventura: "599507ae5f1714845532e3499bd1206e3bb0736d218494ba897a723db02e9d1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "b0148393272b8a77a9a0cd78e685b99c1949c153ecc965789e34f3be4ad6bf1c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "111c4ee131b6aa6e5126b9c223ea209f12de631932c1db0e02f70a1002fdde58" + end + + depends_on "cmake" => :build + depends_on "libpng" + uses_from_macos "zlib" + + def install + # Build shared library + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Build static library + system "cmake", "-S", ".", "-B", "build-static", *std_cmake_args, "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "build-static" + lib.install "build-static/src/libhpdf.a" + end + + test do + (testpath/"test.c").write <<~C + #include "hpdf.h" + + int main(void) + { + int result = 1; + HPDF_Doc pdf = HPDF_New(NULL, NULL); + + if (pdf) { + HPDF_AddPage(pdf); + + if (HPDF_SaveToFile(pdf, "test.pdf") == HPDF_OK) + result = 0; + + HPDF_Free(pdf); + } + + return result; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lhpdf", "-lz", "-lm", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libhdhomerun.rb b/Formula/lib/libhdhomerun.rb new file mode 100644 index 0000000000000..fc1ac111e9a9e --- /dev/null +++ b/Formula/lib/libhdhomerun.rb @@ -0,0 +1,44 @@ +class Libhdhomerun < Formula + desc "C library for controlling SiliconDust HDHomeRun TV tuners" + homepage "https://www.silicondust.com/support/linux/" + url "https://download.silicondust.com/hdhomerun/libhdhomerun_20250506.tgz" + sha256 "879b1bc476c9b93e77ee280a84fc1157e7cc47d43ed9c8398d88a8ac5f35c034" + license "LGPL-2.1-or-later" + + livecheck do + url "https://download.silicondust.com/hdhomerun/libhdhomerun.tgz" + regex(/libhdhomerun[._-]v?(\d+(?:\.\d+)*)\.t/i) + strategy :header_match + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "b5e3c2ecfd8f80433a08d6cb12b312cc7ba251a0ddf1ca97580a10f4c598e69c" + sha256 cellar: :any, arm64_sonoma: "d4e45edcb85bc4fd9a91e31ab8746fbd4b266c96dd20f93ace422219a1b2d397" + sha256 cellar: :any, arm64_ventura: "328ec2c2954853416d1d40cdc8c809b3191f2098b73776d30dabe6875439d173" + sha256 cellar: :any, sonoma: "ad1590aa306190614b9ba2a331f40c24a9c502f2fdcf9c29534f545f98997033" + sha256 cellar: :any, ventura: "7e8887f15b1e3e8bb58d7b49ad4030cee33e816d355ce19a79141c0bed0835ef" + sha256 cellar: :any_skip_relocation, arm64_linux: "0308f092dc2348b44aa5c3e63afaf14f40e6c824f330ff9f1df3a5848b7f4a91" + sha256 cellar: :any_skip_relocation, x86_64_linux: "267e2668fdd5abf33dd50623014e4e4c5724204159a71a5f51a8fc38a9932390" + end + + def install + suffix = if OS.mac? + Hardware::CPU.arm? ? "_arm64" : "_x64" + else + "" + end + + targets = ["hdhomerun_config#{suffix}", shared_library("libhdhomerun#{suffix}")] + + system "make", *targets + bin.install "hdhomerun_config#{suffix}" => "hdhomerun_config" + lib.install shared_library("libhdhomerun#{suffix}") => shared_library("libhdhomerun") + include.install Dir["hdhomerun*.h"] + end + + test do + # Devices may be found or not found, with differing return codes + discover = pipe_output("#{bin}/hdhomerun_config discover") + assert_match(/no devices found|hdhomerun device|found at/, discover) + end +end diff --git a/Formula/lib/libheif.rb b/Formula/lib/libheif.rb new file mode 100644 index 0000000000000..93ddd408b4ecf --- /dev/null +++ b/Formula/lib/libheif.rb @@ -0,0 +1,73 @@ +class Libheif < Formula + desc "ISO/IEC 23008-12:2017 HEIF file format decoder and encoder" + homepage "https://www.libde265.org/" + url "https://github.com/strukturag/libheif/releases/download/v1.19.8/libheif-1.19.8.tar.gz" + sha256 "6c4a5b08e6eae66d199977468859dea3b5e059081db8928f7c7c16e53836c906" + license "LGPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0771e767a82c4817c544678e4afa4c52c9003457684031d5458cc48faaf5b3e6" + sha256 cellar: :any, arm64_sonoma: "3fd45b31c2c6e1fc66e6b17745bd9d72626f292ee10cc934ff3dd605672ff567" + sha256 cellar: :any, arm64_ventura: "8c09d6ca38fb9b6c25ded953c1d5b3f71afa66cb2c71313e5714ca82022f8a71" + sha256 cellar: :any, sonoma: "34f944065cf6900138ba98a3726a6608d7086fa5146bd9864a7b27f0d13b72ce" + sha256 cellar: :any, ventura: "bec7e48c76af4bb07c4b58898232a2f964829190bcfd12ca36028ab81b641508" + sha256 cellar: :any_skip_relocation, arm64_linux: "adfc024f5001a4f14c6d731044e524682e97d8a5c583aa779c46caec15794652" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ab65fcd74b045636c1797e2c7dece8d6a83ada31cce9d3b3adc9adf6cd7a152" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "aom" + depends_on "jpeg-turbo" + depends_on "libde265" + depends_on "libpng" + depends_on "libtiff" + depends_on "shared-mime-info" + depends_on "webp" + depends_on "x265" + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DWITH_DAV1D=OFF + -DWITH_GDK_PIXBUF=OFF + -DWITH_RAV1E=OFF + -DWITH_SvtEnc=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "examples/example.heic" + pkgshare.install "examples/example.avif" + + system "cmake", "-S", ".", "-B", "static", *args, *std_cmake_args, "-DBUILD_SHARED_LIBS=OFF" + system "cmake", "--build", "static" + lib.install "static/libheif/libheif.a" + + # Avoid rebuilding dependents that hard-code the prefix. + inreplace lib/"pkgconfig/libheif.pc", prefix, opt_prefix + end + + def post_install + system Formula["shared-mime-info"].opt_bin/"update-mime-database", "#{HOMEBREW_PREFIX}/share/mime" + end + + test do + output = "File contains 2 images" + example = pkgshare/"example.heic" + exout = testpath/"exampleheic.jpg" + + assert_match output, shell_output("#{bin}/heif-convert #{example} #{exout}") + assert_path_exists testpath/"exampleheic-1.jpg" + assert_path_exists testpath/"exampleheic-2.jpg" + + output = "File contains 1 image" + example = pkgshare/"example.avif" + exout = testpath/"exampleavif.jpg" + + assert_match output, shell_output("#{bin}/heif-convert #{example} #{exout}") + assert_path_exists testpath/"exampleavif.jpg" + end +end diff --git a/Formula/lib/libheinz.rb b/Formula/lib/libheinz.rb new file mode 100644 index 0000000000000..ea3119cbf6ac4 --- /dev/null +++ b/Formula/lib/libheinz.rb @@ -0,0 +1,38 @@ +class Libheinz < Formula + desc "C++ base library of Heinz Maier-Leibnitz Zentrum" + homepage "https://jugit.fz-juelich.de/mlz/libheinz" + url "https://jugit.fz-juelich.de/mlz/libheinz/-/archive/v2.0.1/libheinz-v2.0.1.tar.bz2" + sha256 "f5e84a597d808cb694d9051aea2d5c2f4f7a487f7b107e22e17096c258331fea" + license "0BSD" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5ef6b1109b5b5299b0666d217bb0300e0bf07000f6b2d63c7f871af8a7ecef12" + 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() { + R3 vector(1.0, 2.0, 3.0); + if (vector.x() == 1.0 && vector.y() == 2.0 && vector.z() == 3.0) { + std::cout << "Success" << std::endl; + return 0; + } + return 1; + } + CPP + + system ENV.cxx, "-std=c++17", "test.cpp", "-I#{include}", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libhttpserver.rb b/Formula/lib/libhttpserver.rb new file mode 100644 index 0000000000000..badfd735ab8d3 --- /dev/null +++ b/Formula/lib/libhttpserver.rb @@ -0,0 +1,55 @@ +class Libhttpserver < Formula + desc "C++ library of embedded Rest HTTP server" + homepage "https://github.com/etr/libhttpserver" + url "https://github.com/etr/libhttpserver/archive/refs/tags/0.19.0.tar.gz" + sha256 "b108769ed68d72c58961c517ab16c3a64e4efdc4c45687723bb45bb9e04c5193" + license "LGPL-2.1-or-later" + head "https://github.com/etr/libhttpserver.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a52ab6c0ede296608a7aa71640485e6295b72ae13cfdbb14cbd91c032d9c0af7" + sha256 cellar: :any, arm64_sonoma: "8656daf385c457a28484c8bff0d6271a5271980ab97899b249c1890274617fb7" + sha256 cellar: :any, arm64_ventura: "b11af50845ce2a87984d6240d3d7db441be82f84fde6fc6447866cc0dd5e6236" + sha256 cellar: :any, arm64_monterey: "ce9d31e81bfbc06990ae1b57b295278e341d5917e157688d999f48c102ec4fba" + sha256 cellar: :any, arm64_big_sur: "48dae7ff73d5edc565cf97ce6c3f1f9a441e333d3ba0021602add200c3e316f4" + sha256 cellar: :any, sonoma: "f7bd8a4823e25a2d328750d6e900cba1addc794c168bff61c89d49c2df2383fd" + sha256 cellar: :any, ventura: "4bfcce305d2fb4ae798d9b5a0ce54bf7bfc3a6a3636f7a500dee69ecd3161e32" + sha256 cellar: :any, monterey: "2eb240316761233c156364b47f7e5a1d0a280baaad49530f5e27ae7f19969db5" + sha256 cellar: :any, big_sur: "f79987ebd2cc129a3ff7a6ee5f3e4ba62cd3926a5fa66554b6b6c32a70661e20" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4983970f413cd3b10229548e9ead19177cd534aa1aefac1903d4e9a4b7b4d1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d0e06fdd786113649df4bb86729c6fd53c94b77cb6985a0aa43831cdbbb43bc" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libmicrohttpd" + + uses_from_macos "curl" => :test + + def install + system "./bootstrap" + mkdir "build" do + system "../configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + pkgshare.install "examples" + end + + test do + port = free_port + + cp pkgshare/"examples/minimal_hello_world.cpp", testpath + inreplace "minimal_hello_world.cpp", "create_webserver(8080)", + "create_webserver(#{port})" + + system ENV.cxx, "minimal_hello_world.cpp", + "-std=c++17", "-o", "minimal_hello_world", "-L#{lib}", "-lhttpserver", "-lcurl" + + spawn "./minimal_hello_world" + sleep 3 # grace time for server start + + assert_match "Hello, World!", shell_output("curl http://127.0.0.1:#{port}/hello") + end +end diff --git a/Formula/lib/libhubbub.rb b/Formula/lib/libhubbub.rb new file mode 100644 index 0000000000000..31f1b887f53f9 --- /dev/null +++ b/Formula/lib/libhubbub.rb @@ -0,0 +1,61 @@ +class Libhubbub < Formula + desc "HTML parser library" + homepage "https://www.netsurf-browser.org/projects/hubbub/" + url "https://download.netsurf-browser.org/libs/releases/libhubbub-0.3.8-src.tar.gz" + sha256 "8ac1e6f5f3d48c05141d59391719534290c59cd029efc249eb4fdbac102cd5a5" + license "MIT" + head "https://git.netsurf-browser.org/libhubbub.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?libhubbub[._-]v?(\d+(?:\.\d+)+)[._-]src\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "508f0ebd9f00da4d05a4d477c55c9cae35ecd8b2b80ae83871623ae11c67ef9b" + sha256 cellar: :any, arm64_sonoma: "e024f9c815850423b7eed9a0cb5c9d3f0a83e980f6a5aced31b006c9f43fd6f8" + sha256 cellar: :any, arm64_ventura: "81e8aa3aae89f339efbf14d216270d1c57729e525b20c7d977dfa539f71012b0" + sha256 cellar: :any, sonoma: "015c9012d635556347bf3a0e1f5d003b81a5834f2a91c717ebe9929e5fd8a232" + sha256 cellar: :any, ventura: "0544ada9a05f3db96da5338b41f0251e265fb784b1109ec0e688ffeb942f568b" + sha256 cellar: :any_skip_relocation, arm64_linux: "e72a8faff6cd381e00d0104392fea04a18cdea7254e62620b0738b8cdd4c569b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1156a785370dd503db4817f034028986f1c6eea21d79c0c59a2a66f6ca07391c" + end + + depends_on "netsurf-buildsystem" => :build + depends_on "pkgconf" => :build + depends_on "libparserutils" + + uses_from_macos "gperf" => :build + + def install + args = %W[ + NSSHARED=#{Formula["netsurf-buildsystem"].opt_pkgshare} + PREFIX=#{prefix} + ] + + system "make", "install", "COMPONENT_TYPE=lib-shared", *args + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + hubbub_parser *parser; + hubbub_error error; + + error = hubbub_parser_create("UTF-8", false, &parser); + if (error != HUBBUB_OK) { + return 1; + } + + hubbub_parser_destroy(parser); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lhubbub" + system "./test" + end +end diff --git a/Formula/lib/libical.rb b/Formula/lib/libical.rb new file mode 100644 index 0000000000000..ade2fe70ea3ff --- /dev/null +++ b/Formula/lib/libical.rb @@ -0,0 +1,67 @@ +class Libical < Formula + desc "Implementation of iCalendar protocols and data formats" + homepage "https://libical.github.io/libical/" + url "https://github.com/libical/libical/releases/download/v3.0.20/libical-3.0.20.tar.gz" + sha256 "e73de92f5a6ce84c1b00306446b290a2b08cdf0a80988eca0a2c9d5c3510b4c2" + license any_of: ["LGPL-2.1-or-later", "MPL-2.0"] + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "f9456c87474eaba72b8161d536585beead8a8be4de54b053b8876e1e5ee8c455" + sha256 cellar: :any, arm64_sonoma: "78b1a1c587516767bd8d12e977fac2e5df784c46b93c61a9a3b503475aa1592e" + sha256 cellar: :any, arm64_ventura: "989541e8c1084836db8846d7fee606fa7c62c1d4e2087af88cdcd0b76911862b" + sha256 cellar: :any, sonoma: "6c42ef3607c1a8d19f558b65bc237a9f9bf8a1a224b0f9ea92e1a25baa493b58" + sha256 cellar: :any, ventura: "15a4f6945fd75f1bef1338746aca9445c9ad57899c6ceb3a23ae63b12592a20b" + sha256 cellar: :any_skip_relocation, arm64_linux: "37201920b3eb04236602e79071bd3300397f251eb55751840567e4be26756d54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e37f1ea7e90528d641fdb663673c6b29d9aac026f1ae932c4ea2c510a4152fa" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "icu4c@77" + + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "berkeley-db@5" + end + + def install + args = %W[ + -DBDB_LIBRARY=BDB_LIBRARY-NOTFOUND + -DENABLE_GTK_DOC=OFF + -DSHARED_ONLY=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 + #define LIBICAL_GLIB_UNSTABLE_API 1 + #include + int main(int argc, char *argv[]) { + ICalParser *parser = i_cal_parser_new(); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lical-glib", + "-I#{Formula["glib"].opt_include}/glib-2.0", + "-I#{Formula["glib"].opt_lib}/glib-2.0/include" + system "./test" + end +end diff --git a/Formula/lib/libice.rb b/Formula/lib/libice.rb new file mode 100644 index 0000000000000..26fedae09979b --- /dev/null +++ b/Formula/lib/libice.rb @@ -0,0 +1,50 @@ +class Libice < Formula + desc "X.Org: Inter-Client Exchange Library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libICE-1.1.2.tar.xz" + sha256 "974e4ed414225eb3c716985df9709f4da8d22a67a2890066bc6dfc89ad298625" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "03325eb9b5e663073aedb7f13e975a91d5aa8edb943e71ba52d065128105651f" + sha256 cellar: :any, arm64_sonoma: "d62af819826bc4e9ee6a3dceef659d424090f9629db566a3a18eb0f580106888" + sha256 cellar: :any, arm64_ventura: "7197a6fa7f40caa23c06e2a8276c199f1e35a0284050d7042711a278725045ed" + sha256 cellar: :any, sonoma: "c62d9319100ce6332a7c6335c3365b2e2a216f7df9aa5bf1daae891bdb88edd0" + sha256 cellar: :any, ventura: "902b4b280d60b9ce71177d3ff0bc0e87213afa56f99b418fd02ec57b748fc6a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4347742f36796e398b33430cd91fd1935f50aa73473dfea2aedb48bf62b5943" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4031d0484219c9a701184de11ae283694a3e1067a0103ff661a29e165acc52b" + end + + depends_on "pkgconf" => :build + depends_on "xtrans" => :build + depends_on "libx11"=> :test + depends_on "xorgproto" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-docs=no + --enable-specs=no + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/ICE/ICEutil.h" + + int main(int argc, char* argv[]) { + IceAuthFileEntry entry; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libicns.rb b/Formula/lib/libicns.rb new file mode 100644 index 0000000000000..b05a9e6d05e71 --- /dev/null +++ b/Formula/lib/libicns.rb @@ -0,0 +1,63 @@ +class Libicns < Formula + desc "Library for manipulation of the macOS .icns resource format" + homepage "https://icns.sourceforge.io/" + url "https://downloads.sourceforge.net/project/icns/libicns-0.8.1.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/libi/libicns/libicns_0.8.1.orig.tar.gz" + sha256 "335f10782fc79855cf02beac4926c4bf9f800a742445afbbf7729dab384555c2" + license any_of: ["LGPL-2.0-or-later", "LGPL-2.1-or-later"] + revision 5 + + bottle do + sha256 cellar: :any, arm64_sequoia: "4f513b025e1f28cadb969f9546d4b9c0b77021310a3b634c0f6edf2ddcbb8c93" + sha256 cellar: :any, arm64_sonoma: "2da2b5cfc0aa4e79abe85f5794115e41709297c1d6d813c04ebfc5776e974b39" + sha256 cellar: :any, arm64_ventura: "144537e569ff40707cbb02a4d5d14592bc001cc7eff0e21f102dfd6c36908689" + sha256 cellar: :any, arm64_monterey: "b9e9bde24513deaf1b8b09089b691c3108f0d3e456f6cdaf29851f138a9b75f7" + sha256 cellar: :any, arm64_big_sur: "163ac60e31105b323182e807195977f27bf0e7870b151d9744a1bbbd2a37b78e" + sha256 cellar: :any, sonoma: "5abbb72a1c8631d30b54ea627c2548f7501b2ad1d958c8ee4ccb9abfe5862a2d" + sha256 cellar: :any, ventura: "0b9b72d44a2d0737fe8f9c0fcca4250436b618cb437a6fb9715b2817220c180a" + sha256 cellar: :any, monterey: "53d553054ef00243c22ae45d5b4937b11c2427064b083420b95090f96855ec94" + sha256 cellar: :any, big_sur: "43f30bf4451dbc02f68bb4befc43ed730dc2d5757306111b62d37005ab45bb74" + sha256 cellar: :any_skip_relocation, arm64_linux: "86cdaaef4ee42294bb74455c92d6581d84189df3231686354316a9286a651742" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6738c70d5d8f9025be9ba3cd49b1e2b2510b6c05b6a27b7605e39d60e27566df" + end + + depends_on "jasper" + depends_on "libpng" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + # Fix for libpng 1.5 + inreplace "icnsutils/png2icns.c", + "png_set_gray_1_2_4_to_8", + "png_set_expand_gray_1_2_4_to_8" + + # 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}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include "icns.h" + int main(void) + { + int error = 0; + FILE *inFile = NULL; + icns_family_t *iconFamily = NULL; + icns_image_t iconImage; + return 0; + } + C + system ENV.cc, "-L#{lib}", "-licns", testpath/"test.c", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libiconv.rb b/Formula/lib/libiconv.rb new file mode 100644 index 0000000000000..63e4b51e57a85 --- /dev/null +++ b/Formula/lib/libiconv.rb @@ -0,0 +1,64 @@ +class Libiconv < Formula + desc "Conversion library" + homepage "https://www.gnu.org/software/libiconv/" + url "https://ftp.gnu.org/gnu/libiconv/libiconv-1.18.tar.gz" + mirror "https://ftpmirror.gnu.org/libiconv/libiconv-1.18.tar.gz" + sha256 "3b08f5f4f9b4eb82f151a7040bfd6fe6c6fb922efe4b1659c66ea933276965e8" + license all_of: ["GPL-3.0-or-later", "LGPL-2.0-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "9e1ae85546acf11cfebe7552c70808a9b19418229726501f2bb7b3bceee47966" + sha256 cellar: :any, arm64_sonoma: "3f75b595baa51417a65a1fc7e3f9dc3bace9e14b40d03a6b5814342f5ee9f89e" + sha256 cellar: :any, arm64_ventura: "aa195231486c152454575759ec79d6b48b3aa3deab8ee37c0d19e99f98573eb5" + sha256 cellar: :any, sonoma: "9b5c0480b3c407b6b629e0f18f9e6888319c45fd6d9a87f1443b4baea9aa7577" + sha256 cellar: :any, ventura: "6b53c95ddaf694117513b040836eeddfe8eb7c0b16f687ea5784cbfdc6a78ff9" + end + + keg_only :provided_by_macos + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on :macos # is not needed on Linux, where iconv.h is provided by glibc + + patch do + url "https://raw.githubusercontent.com/Homebrew/patches/9be2793af/libiconv/patch-utf8mac.diff" + sha256 "e8128732f22f63b5c656659786d2cf76f1450008f36bcf541285268c66cabeab" + end + + patch :DATA + + def install + ENV.deparallelize + + # Reported at https://savannah.gnu.org/bugs/index.php?66170 + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--enable-extra-encodings", + "--enable-static", + "--docdir=#{doc}" + system "make", "-f", "Makefile.devel", "CFLAGS=#{ENV.cflags}", "CC=#{ENV.cc}" + system "make", "install" + end + + test do + system bin/"iconv", "--help" + end +end + + +__END__ +diff --git a/lib/flags.h b/lib/flags.h +index d7cda21..4cabcac 100644 +--- a/lib/flags.h ++++ b/lib/flags.h +@@ -14,6 +14,7 @@ + + #define ei_ascii_oflags (0) + #define ei_utf8_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO) ++#define ei_utf8mac_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO) + #define ei_ucs2_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO) + #define ei_ucs2be_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO) + #define ei_ucs2le_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO) diff --git a/Formula/lib/libid3tag.rb b/Formula/lib/libid3tag.rb new file mode 100644 index 0000000000000..e44b6116a66b8 --- /dev/null +++ b/Formula/lib/libid3tag.rb @@ -0,0 +1,51 @@ +class Libid3tag < Formula + desc "ID3 tag manipulation library" + homepage "https://www.underbit.com/products/mad/" + url "https://codeberg.org/tenacityteam/libid3tag/archive/0.16.3.tar.gz" + sha256 "0561009778513a95d91dac33cee8418d6622f710450a7cb56a74636d53b588cb" + license "GPL-2.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "511a214c725978fd5596e7bb1a4c1b9846d3f95a59c1da05aa49ac687d997d07" + sha256 cellar: :any, arm64_sonoma: "ddcf954105ff32bf933c7989b29b275c73eff81c6f036aae28646aa282b2d693" + sha256 cellar: :any, arm64_ventura: "cb4c5b313fafc30aa641a61fb0aa8b84b8c7232d7eea9e6d55c486664d129dc2" + sha256 cellar: :any, arm64_monterey: "1dc3d797b3838163199a5496cad1018c204c87559292dd716b309acd33b780d5" + sha256 cellar: :any, sonoma: "09c2bb42b12b186cce68cc20388585b26452eb75a39caebaaefd7c36beb9460e" + sha256 cellar: :any, ventura: "2fea4c1d71287947cf0bbb995782f610c671608f811bebcd2f1f80e5a137705a" + sha256 cellar: :any, monterey: "1569b5187d5108de0a9fa10ff46c87634e5a6164dcff622aa5b46d0084db50ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "238671fe5e115d97846ea8b1d07d23970451659d2fd169b26f6854eec2cbf858" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9833f57ba6eec9cc19fdc34e93077cd21ec11636320aad4d9945196a7cd69f7b" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + + uses_from_macos "gperf" + 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/"test.c").write <<~C + #include + + int main(int n, char** c) { + struct id3_file *fp = id3_file_open("#{test_fixtures("test.mp3")}", ID3_FILE_MODE_READONLY); + struct id3_tag *tag = id3_file_tag(fp); + struct id3_frame *frame = id3_tag_findframe(tag, ID3_FRAME_TITLE, 0); + id3_file_close(fp); + + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs id3tag").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libident.rb b/Formula/lib/libident.rb new file mode 100644 index 0000000000000..e9fb3583381aa --- /dev/null +++ b/Formula/lib/libident.rb @@ -0,0 +1,47 @@ +class Libident < Formula + desc "Ident protocol library" + homepage "https://www.remlab.net/libident/" + url "https://www.remlab.net/files/libident/libident-0.32.tar.gz" + sha256 "8cc8fb69f1c888be7cffde7f4caeb3dc6cd0abbc475337683a720aa7638a174b" + license :public_domain + + livecheck do + url "https://www.remlab.net/files/libident/" + regex(/href=.*?libident[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "2446047586d94ec64540aae081f818a68642475be91609bb360772af74d8236f" + sha256 cellar: :any, arm64_sonoma: "ec5e66033f45c75ae856163de64dec8196438c77f2d7183595361d1cc2992a5b" + sha256 cellar: :any, arm64_ventura: "b3aacfbacdc98c637bc19401da959466566c13914d88be0a500a4ccd8c0e35fa" + sha256 cellar: :any, arm64_monterey: "005fdffe6633e849bc26051b739a0fc10d72ecb25335bb04aea9286b19dbd196" + sha256 cellar: :any, arm64_big_sur: "3e1eeb778ba25f9b32ca28ea6b4b9a83a625c6a9e91784ad0e846e5a143da513" + sha256 cellar: :any, sonoma: "bb6e01e06cece16e7ec873b2b4060585ea3248a930e5bdf018c65de9b6901c78" + sha256 cellar: :any, ventura: "6bbf7d591e74f0698dba58c353bb1d5d7029ef68192487f4f53d1a4be538f899" + sha256 cellar: :any, monterey: "31ddce221ecaa52ab7d4cc10ccac2421043782f029a1a6643bcc886a7c1b922e" + sha256 cellar: :any, big_sur: "50e093a609acac219853ba89a884408bebcddd23b7ae23faad9476618649cbe7" + sha256 cellar: :any, catalina: "4482a61d30a1ac68265e91eafb45efdc734881d0a032e4b483707545a4ce98e5" + sha256 cellar: :any, mojave: "5afab4111e356d2c88632a89a6ffcf82b96530737b9c5c38ba0622900322ab79" + sha256 cellar: :any, high_sierra: "f6bc989df22a80f3b0f8c6a2d458b5a00d9a4d48247cb7892877bd287e804a50" + sha256 cellar: :any, sierra: "4fb8a991f9f83d499b32a814b2d68465327b7b77c0108764e58e4296a968100f" + sha256 cellar: :any, el_capitan: "6236d3b4ee424795859cc64da30997ff67f7ac5bd42702e8eabe10f99339ca48" + sha256 cellar: :any_skip_relocation, arm64_linux: "9696db63c01fd542845885f59973bf8b7628f34e7d654248f474e805ae91c182" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f80a93f7750a66e987f21af7db62ba4f72c2c277036049915d3c8e6a8b044cf2" + end + + 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", "--mandir=#{man}", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/lib/libidl.rb b/Formula/lib/libidl.rb new file mode 100644 index 0000000000000..5753d0d1f0798 --- /dev/null +++ b/Formula/lib/libidl.rb @@ -0,0 +1,59 @@ +class Libidl < Formula + desc "Library for creating CORBA IDL files" + homepage "https://download.gnome.org/sources/libIDL/0.8/" + url "https://download.gnome.org/sources/libIDL/0.8/libIDL-0.8.14.tar.bz2" + sha256 "c5d24d8c096546353fbc7cedf208392d5a02afe9d56ebcc1cccb258d7c4d2220" + license "LGPL-2.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "dc9090a7f3672741f6edaa0564cc8c5cb28cb24e4bc43108d8953e05f3fb1eaf" + sha256 cellar: :any, arm64_sonoma: "555fa331e45efaead26f0b6ff68fd41f1a75223a68e5469fa041f4bb95676ad0" + sha256 cellar: :any, arm64_ventura: "c0d6a80577aeb880b24d8ec60c11a5f4e49e48ee5109e6a4dbbcfca24b2a05f3" + sha256 cellar: :any, arm64_monterey: "84968b36ff2cb712d57470b45200c7b421e2e86f60a018829534a971856f3a9c" + sha256 cellar: :any, arm64_big_sur: "8b4d33f25fe4a01c6924b42d64072cbf42ca133552e67d47c46412ca2e848867" + sha256 cellar: :any, sonoma: "6ae268a8434298d17350ca586154a01082dfa7a7b1dc0028c8da599ca453132b" + sha256 cellar: :any, ventura: "b709339fadfbdae39d0698c331e1f92d32b077c0cf60d8ceff0ea05c906b9511" + sha256 cellar: :any, monterey: "9b0791153103e3a4629804b46bccc3829d17bfcead908916cac480ba624b3a6e" + sha256 cellar: :any, big_sur: "320ddc04b68934e51f31fc33223c11097d712869a83242ca6669d05ca112ede9" + sha256 cellar: :any, catalina: "fc384a7b4357147c85196b681bd1a96a70e2a7e194c38b6e8afbef5bafc21efb" + sha256 cellar: :any, mojave: "6221a3b0ea37b55c26bc1f83c84ce3e027a8925b92d63055a51fe3a7d6bdff19" + sha256 cellar: :any, high_sierra: "9b07bec68567266f1bc065b05afdb9b034c0c70548145d7cdd963b5958c8da30" + sha256 cellar: :any, sierra: "ecabcc1a9cd229a135557f0f8bc32a38d03d399ff6816b0fc897cc4bcf72cd1c" + sha256 cellar: :any_skip_relocation, arm64_linux: "57eeee9bf85e175fcdbd07db76bafa970051cf061836efd715957e5cfcb7319a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ede5070565f89d3e7f24f01d9da73d50b6c008fbf12f7247d3cd04b8076d842" + end + + depends_on "gettext" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "glib" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + 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", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) { + return 0; + } + C + + pkg_config_flags = shell_output("pkg-config --cflags --libs libIDL-2.0").chomp.split + system ENV.cc, "test.c", *pkg_config_flags, "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libidn.rb b/Formula/lib/libidn.rb new file mode 100644 index 0000000000000..0f4f236b7e4b3 --- /dev/null +++ b/Formula/lib/libidn.rb @@ -0,0 +1,32 @@ +class Libidn < Formula + desc "International domain name library" + homepage "https://www.gnu.org/software/libidn/" + url "https://ftp.gnu.org/gnu/libidn/libidn-1.43.tar.gz" + mirror "https://ftpmirror.gnu.org/libidn/libidn-1.43.tar.gz" + sha256 "bdc662c12d041b2539d0e638f3a6e741130cdb33a644ef3496963a443482d164" + license any_of: ["GPL-2.0-or-later", "LGPL-3.0-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "6a860a721a7e58991f845df9cd497758f193eb531ca2ba3a79e323f65e774dab" + sha256 cellar: :any, arm64_sonoma: "fac2bde8f325428b34f138b6f16b9f58ec0e5092e28a8abb0ac764d54930c98f" + sha256 cellar: :any, arm64_ventura: "979bfd799362cbb1449dc2fba0094d6101b9b3744aa3b7d697f0a41e957777f9" + sha256 cellar: :any, sonoma: "2740c8bf1ca703ab181f9f6ebc11830512af175060ba02b85fa679174dc5ed2d" + sha256 cellar: :any, ventura: "3e91193d063ba22fdd1eba3280ce2230729fde70809eb4da4670dd8403eec674" + sha256 arm64_linux: "dc58733f88f4096f5d5119d84a59a691c8eebf66d4ff1942f8b5661a7a9a413d" + sha256 x86_64_linux: "89ab2ccb40a9c74ffbbde3b5ac2841c3200f07694d114175e0beb3b3bc31f31c" + end + + depends_on "pkgconf" => :build + + def install + system "./configure", "--disable-csharp", + "--with-lispdir=#{elisp}", + *std_configure_args + system "make", "install" + end + + test do + ENV["CHARSET"] = "UTF-8" + system bin/"idn", "räksmörgås.se", "blåbærgrød.no" + end +end diff --git a/Formula/lib/libidn2.rb b/Formula/lib/libidn2.rb new file mode 100644 index 0000000000000..da3b3f3aaf1b6 --- /dev/null +++ b/Formula/lib/libidn2.rb @@ -0,0 +1,79 @@ +class Libidn2 < Formula + desc "International domain name library (IDNA2008, Punycode and TR46)" + homepage "https://www.gnu.org/software/libidn/#libidn2" + url "https://ftp.gnu.org/gnu/libidn/libidn2-2.3.8.tar.gz" + mirror "https://ftpmirror.gnu.org/libidn/libidn2-2.3.8.tar.gz" + mirror "http://ftp.gnu.org/gnu/libidn/libidn2-2.3.8.tar.gz" + sha256 "f557911bf6171621e1f72ff35f5b1825bb35b52ed45325dcdee931e5d3c0787a" + license all_of: [ + { any_of: ["GPL-2.0-or-later", "LGPL-3.0-or-later"] }, # lib + { all_of: ["Unicode-TOU", "Unicode-DFS-2016"] }, # matching COPYING.unicode + "GPL-3.0-or-later", # bin + "LGPL-2.1-or-later", # parts of gnulib + "FSFAP-no-warranty-disclaimer", # man3 + ] + + livecheck do + url :stable + regex(/href=.*?libidn2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "1eb02bfa40ec00b7ea64d8608fcf2115069d99de5a35eb3e2b3ac444a695ea46" + sha256 arm64_sonoma: "6c578e128c82759e211298ae9b004c83844c2626c074f5cf4950402399bdb8f1" + sha256 arm64_ventura: "d0d933dad3ab921d09acd3fe3efa952ee8859f3d9d03aa0210490aca25e0c544" + sha256 sonoma: "ef2c85790a55f54f58fceb849e1ee46f2b06ebe516c83043e68c979e47934e6f" + sha256 ventura: "96fdb47b24345178dae4b88855adafb51efbca9797d6de046f117b26e7674d74" + sha256 arm64_linux: "25d5d1e8d6893f66f15c0f94f88be9618d47e5cd65d6391d938478d3cf75c7b0" + sha256 x86_64_linux: "9e8c065bb543ee967667db82c00185419a108555ecbd965b2e6cebe202472e7f" + end + + head do + url "https://gitlab.com/libidn/libidn2.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gengetopt" => :build + depends_on "gettext" => :build + depends_on "help2man" => :build + depends_on "libtool" => :build + + uses_from_macos "gperf" => :build + + on_macos do + depends_on "coreutils" => :build + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + end + + depends_on "pkgconf" => :build + depends_on "libunistring" + + on_macos do + depends_on "gettext" + end + + def install + args = ["--disable-silent-rules", "--with-packager=Homebrew"] + args << "--with-libintl-prefix=#{Formula["gettext"].opt_prefix}" if OS.mac? + + if build.head? + ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" if OS.mac? + system "./bootstrap", "--skip-po" + end + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + ENV.delete("LC_CTYPE") + ENV["CHARSET"] = "UTF-8" + output = shell_output("#{bin}/idn2 räksmörgås.se") + assert_equal "xn--rksmrgs-5wao1o.se", output.chomp + output = shell_output("#{bin}/idn2 blåbærgrød.no") + assert_equal "xn--blbrgrd-fxak7p.no", output.chomp + end +end diff --git a/Formula/lib/libilbc.rb b/Formula/lib/libilbc.rb new file mode 100644 index 0000000000000..e7549491801e7 --- /dev/null +++ b/Formula/lib/libilbc.rb @@ -0,0 +1,49 @@ +class Libilbc < Formula + desc "Packaged version of iLBC codec from the WebRTC project" + homepage "https://github.com/TimothyGu/libilbc" + url "https://github.com/TimothyGu/libilbc/releases/download/v3.0.4/libilbc-3.0.4.tar.gz" + sha256 "6820081a5fc58f86c119890f62cac53f957adb40d580761947a0871cea5e728f" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3e5872934eb657baeb5b1a02dd4f1d41fccb539aa8470718644305bb5ab3cd28" + sha256 cellar: :any, arm64_sonoma: "4909ecace33503559f651e6bd82cc0cc4e3d1248572f42796ceaa07c85ccb47b" + sha256 cellar: :any, arm64_ventura: "36774c3a7db279a6932326411a82cd1ffe92e66ee0fead069d985e0e17231309" + sha256 cellar: :any, arm64_monterey: "62792538776c6c61167769ce53ed0998c849b89ca9cc5ade0261be739bd8bf60" + sha256 cellar: :any, arm64_big_sur: "7b07dbf92042eb0f0692aec0381561eaa0a9c649347fd321ebf74cd22994813d" + sha256 cellar: :any, sonoma: "d5d2dc90d135c52f15befb996483d7c2705c77205d7aa57b2286ff96678f3f7a" + sha256 cellar: :any, ventura: "d6cb8d5175be0fbd28cfd5a123685b17fdc5da1aca7720b15bc6d0e9bc28ae47" + sha256 cellar: :any, monterey: "a60c72751ea180c155b7994fd71ef068118b74665a3199e61a0b4adda27c64ad" + sha256 cellar: :any, big_sur: "affe65f4320a2940b69ec54687be6c5387e51d79f3fd418a5dc42924c99eeee0" + sha256 cellar: :any, catalina: "b75ace51e88894a45e406c7fbe4b4cafc06932b0e5ce90480fdee203aa9ede83" + sha256 cellar: :any, mojave: "496492e1aaecb1b41ba83eb033b75777ca08333edbb9e67bef23c933b5847cd5" + sha256 cellar: :any_skip_relocation, arm64_linux: "5848c1f801acd864b6e44672dff531f3cd357e93a64ee64ff8bc3bda3ef6e2a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "11914a90369fc2c32d1373c3c8d5a98275c44de6e70301c23067b67310d6bba0" + 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 + + int main() { + char version[255]; + + WebRtcIlbcfix_version(version); + printf("%s", version); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lilbc", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libimagequant.rb b/Formula/lib/libimagequant.rb new file mode 100644 index 0000000000000..f33f7cf2aaeac --- /dev/null +++ b/Formula/lib/libimagequant.rb @@ -0,0 +1,45 @@ +class Libimagequant < Formula + desc "Palette quantization library extracted from pnquant2" + homepage "https://pngquant.org/lib/" + url "https://github.com/ImageOptim/libimagequant/archive/refs/tags/4.3.4.tar.gz" + sha256 "b86f4ac0eb707af88b0a000e2e2409e399c6969c9d0d988efafaff138cebaf96" + license all_of: ["GPL-3.0-or-later", "HPND"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "9bd28748f04704e33c3d4742967af6b35ad9cb13012affff2ceda5acf65dbc9c" + sha256 cellar: :any, arm64_sonoma: "af5fc3992c73074f93497b564f031620340830cb9a852da315d30d18c49e8607" + sha256 cellar: :any, arm64_ventura: "fd25336fb8baca27c2f54acb62b3e4b25a6faf9af29fe7d78628955329b158f6" + sha256 cellar: :any, sonoma: "f2f6742ba54280cff5c687780ae26cb32694ce7934c65e639e1b4929b76a8b8c" + sha256 cellar: :any, ventura: "e96abab1e43ccedaeb0fc887b8ebfa8b7481d3c734578689bb1b00e76a394cb0" + sha256 cellar: :any_skip_relocation, arm64_linux: "8aec6a023e0a5e6b7aa3683661b2067c8469236acc5770ece554e8b8c0248f08" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88ff1ab2e4d2b4837b96df12d676432af7d8d03185e4152549c5332c6e657ed3" + end + + depends_on "cargo-c" => :build + depends_on "rust" => :build + + def install + cd "imagequant-sys" do + system "cargo", "cinstall", "--jobs", ENV.make_jobs.to_s, "--release", "--prefix", prefix, "--libdir", lib + end + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + liq_attr *attr = liq_attr_create(); + if (!attr) { + return 1; + } else { + liq_attr_destroy(attr); + return 0; + } + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-limagequant", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libimobiledevice-glue.rb b/Formula/lib/libimobiledevice-glue.rb new file mode 100644 index 0000000000000..90820a92806f8 --- /dev/null +++ b/Formula/lib/libimobiledevice-glue.rb @@ -0,0 +1,43 @@ +class LibimobiledeviceGlue < Formula + desc "Library with common system API code for libimobiledevice projects" + homepage "https://libimobiledevice.org/" + url "https://github.com/libimobiledevice/libimobiledevice-glue/releases/download/1.3.1/libimobiledevice-glue-1.3.1.tar.bz2" + sha256 "6e2849f221e6ab970566a115d42f3c20f8848e4d40c2ed61ac20dc85f40fa54f" + license "LGPL-2.1-or-later" + head "https://github.com/libimobiledevice/libimobiledevice-glue.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b64aec0201f725ffa387c7624dc8690ffafd802e01117dcdda3f335b349b99ce" + sha256 cellar: :any, arm64_sonoma: "131bac1d6f7a2f4044b445e956ad7f5fa82d0e3a6b9a6a0230393d7f1c45c910" + sha256 cellar: :any, arm64_ventura: "a3d210d9d3d98e8919561754030ff00a6735275aefa65be7d0ece3b29a62164a" + sha256 cellar: :any, sonoma: "393c65ff96685188dc9b646e1342379988af3494297052fb23c8f5e49aa5d8d7" + sha256 cellar: :any, ventura: "a2022bc720c9aa8caf0c61d4bd9429be8ecc009ac1eaf4dcb5c0ece40be2e7b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "998f89f012b920eb63abc2a056f87a4f6187a97c6b9442375c9adef02a33857f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "91fd81b54b2c9d6eee333204b752b95aa05ac95779355a573a03bc12632e3daf" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libplist" + + def install + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "libimobiledevice-glue/utils.h" + + int main(int argc, char* argv[]) { + char *uuid = generate_uuid(); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-limobiledevice-glue-1.0", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libimobiledevice.rb b/Formula/lib/libimobiledevice.rb new file mode 100644 index 0000000000000..305b90a6b8abe --- /dev/null +++ b/Formula/lib/libimobiledevice.rb @@ -0,0 +1,59 @@ +class Libimobiledevice < Formula + desc "Library to communicate with iOS devices natively" + homepage "https://www.libimobiledevice.org/" + url "https://github.com/libimobiledevice/libimobiledevice/releases/download/1.3.0/libimobiledevice-1.3.0.tar.bz2" + sha256 "53f2640c6365cd9f302a6248f531822dc94a6cced3f17128d4479a77bd75b0f6" + license "LGPL-2.1-or-later" + revision 3 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "9bc550fcfb5ee4613073831691cda4cc54a88180e833a0f754886f1a34af4134" + sha256 cellar: :any, arm64_sonoma: "2fc25461e9305a7cadd0ec50326048641a67a6231d73a4ccf69e0d90c4783a19" + sha256 cellar: :any, arm64_ventura: "7017a85a4322e960abb9cc122ed45cf159eddc90c45a30d4a24aef14173ea0c6" + sha256 cellar: :any, sonoma: "7ca1985300a97b783b50752ff9110cb9b02dc7d278a62451b36fa5b98d359708" + sha256 cellar: :any, ventura: "c811173f433f58df573afeb557308c55be71309442e6088f0b2b93cafffb39cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "871739207d85ff9dafe6c8f24f7ac24242216bc6154ed5d3b0c8e238ab62f24a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d38d4434dc756c8153d4a0ed23ba0e68c643c7e9e1086cf08c5497700867cdb4" + end + + # libimobiledevice-glue is required for building future versions + # Move outside of HEAD clause when there's a new release. + head do + url "https://github.com/libimobiledevice/libimobiledevice.git", branch: "master" + depends_on "libimobiledevice-glue" + depends_on "libtatsu" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libplist" + depends_on "libtasn1" + depends_on "libusbmuxd" + depends_on "openssl@3" + + def install + # Make libimobiledevice work with libplist 2.3.0 + # Remove this once libimobiledevice gets a new release + inreplace "common/utils.h", "PLIST_FORMAT_XML", "PLIST_FORMAT_XML_" if build.stable? + inreplace "common/utils.h", "PLIST_FORMAT_BINARY", "PLIST_FORMAT_BINARY_" if build.stable? + + # As long as libplist builds without Cython bindings, + # so should libimobiledevice as well. + args = %w[ + --disable-silent-rules + --without-cython + --enable-debug + ] + + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"idevicedate", "--help" + end +end diff --git a/Formula/lib/libint.rb b/Formula/lib/libint.rb new file mode 100644 index 0000000000000..62ad8cc6cab7a --- /dev/null +++ b/Formula/lib/libint.rb @@ -0,0 +1,42 @@ +class Libint < Formula + desc "Library for computing electron repulsion integrals efficiently" + homepage "https://github.com/evaleev/libint" + url "https://github.com/evaleev/libint/archive/refs/tags/v2.11.1.tar.gz" + sha256 "58ab0f893d94cbed3ab35a6c26ec5e4d8541c59889407a6d30c50b8ea415bdf3" + license all_of: ["GPL-3.0-or-later", "LGPL-3.0-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "8ba0d94d0c2d08ae7f060c780b17138ccc9768a4085d70a9ebc07092bca0dbaf" + sha256 cellar: :any, arm64_sonoma: "b4ed148dadc7cbef2fdba90c530aaa81fbbbc10b458a01548ed837667941f1d7" + sha256 cellar: :any, arm64_ventura: "321b83111abb704f45530c5e2431543b202cef7b79f149d8a18d9d92ffbc95c7" + sha256 cellar: :any, sonoma: "496e3e04c6113298f83adb651e18899fcebb7272fa90bfcd263e84549435989e" + sha256 cellar: :any, ventura: "4ca95b782163ae0ae71b84f74c2a828b6e9717909ae8ab3e85c7f948bd7dfca4" + sha256 cellar: :any_skip_relocation, arm64_linux: "660f1718e9e4490c778a99ac2f2a2ffe1e7ea97b911ecec248ddceb43ab44941" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45e54a1351ab5f13cc1a3cc83d8ba7fbeb8812c753f44cc5c0fda0e57e7f5ba0" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "boost" + depends_on "eigen" + depends_on "mpfr" + + def install + system "glibtoolize", "--install", "--force" + system "./autogen.sh" + system "./configure", "--enable-shared", "--disable-static", *std_configure_args + system "make" + system "make", "install" + pkgshare.install "tests/hartree-fock/hartree-fock.cc" + pkgshare.install "tests/hartree-fock/h2o.xyz" + end + + test do + system ENV.cxx, "-std=c++11", pkgshare/"hartree-fock.cc", "-o", "hartree-fock", + "-I#{Formula["eigen"].opt_include}/eigen3", + *shell_output("pkgconf --cflags --libs libint2").chomp.split + system "./hartree-fock", pkgshare/"h2o.xyz" + end +end diff --git a/Formula/lib/libiodbc.rb b/Formula/lib/libiodbc.rb new file mode 100644 index 0000000000000..c549bedd6fbbd --- /dev/null +++ b/Formula/lib/libiodbc.rb @@ -0,0 +1,37 @@ +class Libiodbc < Formula + desc "Database connectivity layer based on ODBC. (alternative to unixodbc)" + homepage "https://www.iodbc.org/" + url "https://github.com/openlink/iODBC/archive/refs/tags/v3.52.16.tar.gz" + sha256 "a0cf0375b462f98c0081c2ceae5ef78276003e57cdf1eb86bd04508fb62a0660" + license any_of: ["BSD-3-Clause", "LGPL-2.0-only"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "1a93beeb32954c2c1ce2bb4939c32f1940ec9491ba342ca594fc472bd01852b5" + sha256 cellar: :any, arm64_sonoma: "9727b705814070058ad5dfc93f33ddb542399e2bd63b09518ce0b779c02aeedc" + sha256 cellar: :any, arm64_ventura: "c2b3670c3da394419feff4b38ee185e150615479dd3cce7bf02cc2824e461365" + sha256 cellar: :any, arm64_monterey: "10ca3676025de4d242130feb71200c95a131fa4f28d8201089f0471c2092c0a0" + sha256 cellar: :any, arm64_big_sur: "5b497dcb9a7aea40f94c0b20cd3c8616d5c3774153286e66bc5ba59e2510131a" + sha256 cellar: :any, sonoma: "51d457af2187861576522c3a4bf4d9dcd092bd6626b1e9f838a2f717330ed32e" + sha256 cellar: :any, ventura: "6f63d37fe5d6269eff73a52643932f5cc3c31e10ad9d6fefc90e51244f4ab689" + sha256 cellar: :any, monterey: "34627b18050d2acbef4503c41e52ac8c3f70443c46fbf18aa9d2947e0f43664f" + sha256 cellar: :any, big_sur: "90d98eb9831742490c631612df419d83d7c0e2495dab9bc5ddec36ba4e67d8c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "2fed59ad000ff8d08665d2ea43a4b4d997fca1fadccc470c58290d72bdc9259d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a55f7da0eb9e5afb600e861bb089d7f7a74d393b4c29c9d7d9383c75a717883" + end + + keg_only "it conflicts with `unixodbc`" + + 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 + system bin/"iodbc-config", "--version" + end +end diff --git a/Formula/lib/libiptcdata.rb b/Formula/lib/libiptcdata.rb new file mode 100644 index 0000000000000..f5772ef1d5fac --- /dev/null +++ b/Formula/lib/libiptcdata.rb @@ -0,0 +1,47 @@ +class Libiptcdata < Formula + desc "Virtual package provided by libiptcdata0" + homepage "https://libiptcdata.sourceforge.net/" + url "https://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz" + sha256 "79f63b8ce71ee45cefd34efbb66e39a22101443f4060809b8fc29c5eebdcee0e" + license "LGPL-2.0-only" + revision 1 + + bottle do + sha256 arm64_sequoia: "ccdaa3847cffb9073eba5796d92eb08f1dd1c9b1bcda21f45d64a654f0dcfdac" + sha256 arm64_sonoma: "e7b09d218f871a5252b465841f6001896d867247175f228c3d50164cd9fefa1a" + sha256 arm64_ventura: "5543254a38d990ac3eabb48f51dda1eacd65fbea211200d825063385affcc014" + sha256 arm64_monterey: "479e59e0cffe5a692546ef0bee8552cdbd43fdf6353c5c04721e92372d92f671" + sha256 arm64_big_sur: "45d61d51cb3e5607763ed374d5cc88e4a7c6dc8b1ba08ccd276c3379a20646bf" + sha256 sonoma: "b65a559689911c0a84e3d7f8a1a4255dd411bb03b2d8b00355f453b28ccf99f3" + sha256 ventura: "66ab47a907199d944b1af5b10efdd6a90b255a35395cdb69ac637253648d9d20" + sha256 monterey: "e93e2ffd79bb784e528ed8f8b197b808090f3cc0b653da0cc880f88db984094f" + sha256 big_sur: "5bb2bce1d8a877c84abb51f3b9d9e0c40588bdeb2d6ea8d66c6de230d2e35e8d" + sha256 catalina: "1dbcf1dd89b05f7f1fdc1a15d9c56b7e726f7296d8096ccae22fed9adf36790a" + sha256 mojave: "78dc7bb6b1e5bcccc1c0c9ef158b8d423f782aa455b1b10c3eebb29de6e7fa58" + sha256 high_sierra: "62f4a032075fbf0b9a43ef474b784bae7c47d503483bdc2e09e851c5568345e3" + sha256 sierra: "0a9cd6e750e496cd4eb9797ac34d3659c8dc2bb6977020def1edb2ee60711a39" + sha256 arm64_linux: "c9c24c8b0b36c40568552242ede97e1efd500063008dc546b84ac6d2451bc455" + sha256 x86_64_linux: "4e929a2391eb2733d481f84b82cc925a1d0cf943bed4f99af876f4240b62c9c0" + end + + on_macos do + depends_on "gettext" + 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 + assert_match version.to_s, shell_output("#{bin}/iptc --version") + assert_match "ModelVersion", shell_output("#{bin}/iptc --list") + end +end diff --git a/Formula/lib/libirecovery.rb b/Formula/lib/libirecovery.rb new file mode 100644 index 0000000000000..80a134db15d42 --- /dev/null +++ b/Formula/lib/libirecovery.rb @@ -0,0 +1,43 @@ +class Libirecovery < Formula + desc "Library and utility to talk to iBoot/iBSS via USB" + homepage "https://www.libimobiledevice.org/" + url "https://github.com/libimobiledevice/libirecovery/releases/download/1.2.1/libirecovery-1.2.1.tar.bz2" + sha256 "d25f4b85c24df206efbbbd2d6d45d1637229e756c52d535eef047a163799f67c" + license "LGPL-2.1-only" + head "https://github.com/libimobiledevice/libirecovery.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1fa2418a0a22032fd7a150b6f19794e3eeb17841912d6603e71ac16d312df6f3" + sha256 cellar: :any, arm64_sonoma: "7484a2a971dfbb544af0c0247b2c14991fae187b8d4c620871964a6fb7a66b76" + sha256 cellar: :any, arm64_ventura: "f94d490451247969eafd81875cce5b9d2e6274eaa3472c1ec70e7fbad57cb73c" + sha256 cellar: :any, sonoma: "27ea53a0973bb2a7505d76db3fbf279b12f470b4f32066af6f0162d2c00e7e6b" + sha256 cellar: :any, ventura: "04164267c7cb92582d2c210db13e68c3963d233120d173931f2b875bd0faef69" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae625c342c140f8607eee693da903c59dede5ebb061461061ded9cda7503af9c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81f40f20b147feba73637419fb12cf88172b82675ec8bc9ca396182505040a85" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libimobiledevice-glue" + + on_macos do + depends_on "libplist" + end + + on_linux do + depends_on "libusb" + depends_on "readline" + end + + def install + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + assert_match "ERROR: Unable to connect to device", shell_output("#{bin}/irecovery -f nothing 2>&1", 255) + end +end diff --git a/Formula/lib/libiscsi.rb b/Formula/lib/libiscsi.rb new file mode 100644 index 0000000000000..15af92dcfef0d --- /dev/null +++ b/Formula/lib/libiscsi.rb @@ -0,0 +1,35 @@ +class Libiscsi < Formula + desc "Client library and utilities for iscsi" + homepage "https://github.com/sahlberg/libiscsi" + url "https://github.com/sahlberg/libiscsi/archive/refs/tags/1.20.2.tar.gz" + sha256 "2b2a773ea0d3a708c1cafe61bbee780325fb1aafec6477f17d3f403e8732c9bf" + license all_of: [:public_domain, "LGPL-2.1-or-later", "GPL-2.0-or-later"] + head "https://github.com/sahlberg/libiscsi.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "356c93d6460c560bde748339a32b9c55da3f12f87456b92ad2b66fa18b97a1ad" + sha256 cellar: :any, arm64_sonoma: "511dfedb43e4f60a8eecf8c7b4be234b8eefd7562e75e40315fcc26d7bb9845e" + sha256 cellar: :any, arm64_ventura: "4b709afde3dc32d739d185f64219127e075082d95d64c452cbace5168cb72c71" + sha256 cellar: :any, sonoma: "dee5dab9b9fc7b002b7db84bb077c6d9d79ad9e0aacfb43e454d8ab875d504ef" + sha256 cellar: :any, ventura: "ce29e9ab144b9576c20f7845fbf7005b5b6f1700179b64ad534cd0af319b4012" + sha256 cellar: :any_skip_relocation, arm64_linux: "b62bcd8e86cd4cda4fb79bfde300a0cb3f105caedc6457d5aa8628cc54493332" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98648a44c47ae8d3567fc190792913c8de9df491a4c1e0cd67e1a03f5086584f" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "cunit" + + def install + system "./autogen.sh" + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"iscsi-ls", "--help" + system bin/"iscsi-test-cu", "--list" + end +end diff --git a/Formula/lib/libisofs.rb b/Formula/lib/libisofs.rb new file mode 100644 index 0000000000000..59908bd8f754d --- /dev/null +++ b/Formula/lib/libisofs.rb @@ -0,0 +1,59 @@ +class Libisofs < Formula + desc "Library to create an ISO-9660 filesystem with various extensions" + homepage "https://dev.lovelyhq.com/libburnia/libisofs" + url "https://files.libburnia-project.org/releases/libisofs-1.5.6.pl01.tar.gz" + version "1.5.6" + sha256 "ac1fd338d641744ca1fb1567917188b79bc8c2506832dd56885fec98656b9f25" + license "GPL-2.0-or-later" + + livecheck do + url "https://files.libburnia-project.org/releases/" + regex(/href=.*?libisofs[._-]v?(\d+(?:\.\d+)+)(?:[._-]pl\d+)?\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c4321671d1170bb88b23b8bf3e14dd9046d025341fb428a640c705cf5f8934ee" + sha256 cellar: :any, arm64_sonoma: "34b5564fd603417946cc498df54e7b8b59380b08259728709446efd2be7680c5" + sha256 cellar: :any, arm64_ventura: "3ecb31fd37dae4b455187e9fafc86b965d76d998a011b9559bd3bf4b6a422e77" + sha256 cellar: :any, arm64_monterey: "3c9c7c449618b5c4325821877d77d30797b2f972c7247918efeb60456cb99c47" + sha256 cellar: :any, arm64_big_sur: "bd20a575b9908265074276c6e008a7885dda3d5818da99e4714141da1461d205" + sha256 cellar: :any, sonoma: "56e6b4f827a9c2b3a3a2a4773a89bac741567e242a5b69fad9b2d02aac33ee34" + sha256 cellar: :any, ventura: "c04b4a231f71dccffcca4e4fade48e05c898e22860dc73630c8326dcc5688d23" + sha256 cellar: :any, monterey: "fee8ce45cc44667d25010c2fcb268e4c9e3c3a0200330618513ca3eaad19cb58" + sha256 cellar: :any, big_sur: "30b05cc10a096c6c8ba9a04b4884a83690abe966cb9604b85fb2cd139e572b46" + sha256 cellar: :any_skip_relocation, arm64_linux: "30460b05ad9372e8086785db2582b2d9103e52cfc1b3294bd4bbb208d4a852c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3d23202a09bdce26182a94e00cc3c412373f30a7396dbe73d6abf2dcd21d5ec" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libzip" + + def install + # use gnu libtool instead of apple libtool + inreplace "bootstrap", "libtool", "glibtool" + # regenerate configure as release uses old version of libtool + # which causes flat_namespace + system "./bootstrap" + + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + int major, minor, micro; + iso_lib_version(&major, &minor, µ); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lisofs", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libjcat.rb b/Formula/lib/libjcat.rb new file mode 100644 index 0000000000000..8480b9ccf2416 --- /dev/null +++ b/Formula/lib/libjcat.rb @@ -0,0 +1,66 @@ +class Libjcat < Formula + include Language::Python::Shebang + + desc "Library for reading Jcat files" + homepage "https://github.com/hughsie/libjcat" + url "https://github.com/hughsie/libjcat/releases/download/0.2.3/libjcat-0.2.3.tar.xz" + sha256 "f2f115aad8a8f16b8dde1ed55de7abacb91d0878539aa29b2b60854b499db639" + license "LGPL-2.1-or-later" + head "https://github.com/hughsie/libjcat.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f81dac6097133f01ba6dc2890ea638bc19157b5532262f651523c5daf3a36ade" + sha256 cellar: :any, arm64_sonoma: "008c768443345295eb167faf45cdca4cca66450522e430c1b5754335488f5a30" + sha256 cellar: :any, arm64_ventura: "40b6538beb4dcfc8a8eacffe717dccd84595284b564c43c4da4828f7683d1dc4" + sha256 cellar: :any, sonoma: "e531fcf0517371bd203e66ac885f2a89b5f0f1e184d02e2c4949a3a2d92a644f" + sha256 cellar: :any, ventura: "927a664154de77bcedf12dbb4f9232851ef9cc811b3b80308f9ccaca88d1d5b4" + sha256 arm64_linux: "88a16575b027306459c033e2d982e34f1c0d22fb2f368482ede91f36a930dd01" + sha256 x86_64_linux: "1d5b42e6de499edbb2107b66428da6be5d1695e7dd61b4cb5bc937f597e9ada9" + end + + depends_on "gi-docgen" => :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 "glib" + depends_on "gnutls" + depends_on "json-glib" + depends_on "nettle" + + uses_from_macos "python" => :build + + on_macos do + depends_on "gettext" + end + + def install + rewrite_shebang detected_python_shebang(use_python_from_path: true), "contrib/generate-version-script.py" + rewrite_shebang detected_python_shebang(use_python_from_path: true), "contrib/build-certs.py" + + system "meson", "setup", "build", + "-Dgpg=false", + "-Dman=false", + *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system bin/"jcat-tool", "-h" + (testpath/"test.c").write <<~C + #include + int main(int argc, char *argv[]) { + JcatContext *ctx = jcat_context_new(); + g_assert_nonnull(ctx); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs jcat").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libjson-rpc-cpp.rb b/Formula/lib/libjson-rpc-cpp.rb new file mode 100644 index 0000000000000..7491bf6f94dfe --- /dev/null +++ b/Formula/lib/libjson-rpc-cpp.rb @@ -0,0 +1,48 @@ +class LibjsonRpcCpp < Formula + desc "C++ framework for json-rpc" + homepage "https://github.com/cinemast/libjson-rpc-cpp" + url "https://github.com/cinemast/libjson-rpc-cpp/archive/refs/tags/v1.4.1.tar.gz" + sha256 "7a057e50d6203e4ea0a10ba5e4dbf344c48b177e5a3bf82e850eb3a783c11eb5" + license "MIT" + revision 4 + head "https://github.com/cinemast/libjson-rpc-cpp.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "437e579e259460e182a7a265ab31eda753c85860623d95fae1585c831ed26046" + sha256 cellar: :any, arm64_sonoma: "3c31da615d72e5b0b7fa8563a2f20ba614ae2149eedbdcc5e7b1bbf2ec4cf485" + sha256 cellar: :any, arm64_ventura: "a50a022cd28c1afc756e6549255a779b0cc7e657de249492cee095c7414bf462" + sha256 cellar: :any, sonoma: "1a06d33fb6dfb02a77dff103df8c5dccaf31732f57c5084894a6bb8a990fd40f" + sha256 cellar: :any, ventura: "2b77b2e2ab126d3f5256ac54666ebc3bfaf0d039b9a204a94ccdf12e3adc2988" + sha256 cellar: :any_skip_relocation, arm64_linux: "937c9426645552d0f435306f02dc4bea55498e2e6402c53d2bcbb5ab053c067c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e81e47b0e548b539d9be3449e951c2f8fbdd9274acfef193ca9a89e6255b67e" + end + + depends_on "cmake" => :build + depends_on "argtable" + depends_on "hiredis" + depends_on "jsoncpp" + depends_on "libmicrohttpd" + + uses_from_macos "curl" + + def install + # Fix to Policy CMP0042 may not be set to OLD behavior + # because this version of CMake no longer supports it. + # Issue ref: https://github.com/cinemast/libjson-rpc-cpp/issues/334 + inreplace "CMakeLists.txt", "cmake_policy(SET CMP0042 OLD)", "" + args = %W[ + -DCOMPILE_EXAMPLES=OFF + -DCOMPILE_TESTS=OFF + -DCMAKE_INSTALL_RPATH=#{rpath} + -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/"jsonrpcstub", "-h" + end +end diff --git a/Formula/lib/libjuice.rb b/Formula/lib/libjuice.rb new file mode 100644 index 0000000000000..26055bf709722 --- /dev/null +++ b/Formula/lib/libjuice.rb @@ -0,0 +1,57 @@ +class Libjuice < Formula + desc "UDP Interactive Connectivity Establishment (ICE) library" + homepage "https://github.com/paullouisageneau/libjuice" + url "https://github.com/paullouisageneau/libjuice/archive/refs/tags/v1.6.0.tar.gz" + sha256 "90a13ed7049b97af4dcb494e5a82ebbffc41d29f917d17f0aa1b0b651034ae4c" + license "MPL-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6bd090a24a94428cab57fb034e1455e0619c65d5a0a97985f90368b843be5598" + sha256 cellar: :any, arm64_sonoma: "e7d063977b60306b38c406e11535fcfbdcb27dfb61e1bb3e9867ab98c98a4ee0" + sha256 cellar: :any, arm64_ventura: "efd9bbb6690c378921d744548057133dfe173fadddc71f68a989aa0df623c5f9" + sha256 cellar: :any, sonoma: "99406c20337f6c8e4047378c776ab4746215fe62cc1c88f39ff05a8122f1acf4" + sha256 cellar: :any, ventura: "19a281b7db9b022432d1b17d162de31527dcf4add8a24590f3b8e958bd4a4b6e" + sha256 cellar: :any_skip_relocation, arm64_linux: "f408f03e6fb479d4a327f71c585fd6aaea1ae52b5217b8c4b42cb2e27014d0c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eea94f4f7ffe75d7dfe4fc8fabf02996f92a2db2cb2debd5d32d60a23ad6d32e" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-DNO_TESTS=1", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include "juice/juice.h" + + int main() { + juice_config_t config; + + config.stun_server_host = "stun.l.google.com"; + config.stun_server_port = 19302; + config.turn_servers = NULL; + config.turn_servers_count = 0; + config.user_ptr = NULL; + config.cb_state_changed = NULL; + config.cb_candidate = NULL; + config.cb_gathering_done = NULL; + config.cb_recv = NULL; + + juice_agent_t *agent = juice_create(&config); + printf("Successfully created a juice agent\\n"); + + juice_destroy(agent); + printf("Successfully destroyed the juice agent\\n"); + + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-ljuice", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libjwt.rb b/Formula/lib/libjwt.rb new file mode 100644 index 0000000000000..0c14e3ae0272b --- /dev/null +++ b/Formula/lib/libjwt.rb @@ -0,0 +1,52 @@ +class Libjwt < Formula + desc "JSON Web Token C library" + homepage "https://libjwt.io/" + url "https://github.com/benmcollins/libjwt/releases/download/v3.2.1/libjwt-3.2.1.tar.xz" + sha256 "b7800a6b085855690b401b41dbdf0bcb49207d5fe43c13abbdc8106c16a9250c" + license "MPL-2.0" + head "https://github.com/benmcollins/libjwt.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2819ec3a3adfc26a3211bad2a92fd63e82288e9eb6f46670d29f95cb2d68fe25" + sha256 cellar: :any, arm64_sonoma: "9d00c6b506e1f368e5e3ccf4cf7e6b3971c983d85b8a829a5f70aae20790d879" + sha256 cellar: :any, arm64_ventura: "a3e9b7bc0361f1f6726ea8863f7fa4f1793f7fcbfab11bd88e66c6e894339d31" + sha256 cellar: :any, sonoma: "78d16019a3009299578e2a6cfbe9f09950d534379f37b6e990da35b95d3ac14f" + sha256 cellar: :any, ventura: "c87231ba166ec2339d045a88dbd17be3f54a66df254d7e1d67bb9b80d03599a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "852d7b446652b256221c6cc279838ea377cd1b3d2a2fe706b73577a843320c1d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a2f1f5567817e4d996c654b63a80236beedce4c221060d551d184c9780013aa" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "gnutls" + depends_on "jansson" + depends_on "openssl@3" + + def install + system "cmake", "-S", ".", "-B", "build", "-DWITH_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(void) { + jwt_builder_t *builder = jwt_builder_new(); + char *token = jwt_builder_generate(builder); + free(token); + jwt_builder_free(builder); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-ljwt", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libkate.rb b/Formula/lib/libkate.rb new file mode 100644 index 0000000000000..f468f16c1bf6e --- /dev/null +++ b/Formula/lib/libkate.rb @@ -0,0 +1,47 @@ +class Libkate < Formula + desc "Overlay codec for multiplexed audio/video in Ogg" + homepage "https://wiki.xiph.org/index.php/OggKate" + url "https://downloads.xiph.org/releases/kate/libkate-0.4.3.tar.gz" + sha256 "96827ca136ad496b4e34ff3ed2434a8e76ad83b1e6962b5df06ad24cbbfeebaf" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1cc9e076187d3fe58ab436f4729c43fc596c181cf9e5a12125836b676373f0cc" + sha256 cellar: :any, arm64_sonoma: "45055ede06c87e34cb64389350d61d545a866dfb67b60c5384922f5b479e378f" + sha256 cellar: :any, arm64_ventura: "ac5cad7548115a8aec9fff623487cba4504770caa66a89c61dbcf90b59d79cad" + sha256 cellar: :any, sonoma: "3ab7c7cda82f7bbfb515d3b9deaadc1dd09069a9a7f47ada41311dd7fc963eff" + sha256 cellar: :any, ventura: "6cf99c16fdde5990e942310f75915a0465c9dce559ca94c23d3df846f6f17532" + sha256 cellar: :any_skip_relocation, arm64_linux: "af8b104ad8cc5105c019c6c809e4b2897f56458a134f61ede9b1617d043ce547" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8e41a5b6906b6cae6d0bd82030cecfd66f1115f39b1669b99baf5501e424452" + end + + head do + url "https://gitlab.xiph.org/xiph/kate.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + end + + depends_on "pkgconf" => :build + depends_on "libogg" + depends_on "libpng" + + def install + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, "--disable-silent-rules", + "--enable-shared", + "--enable-static", + *std_configure_args + system "make", "check" + system "make", "install" + + rm(man1/"KateDJ.1") + end + + test do + system bin/"katedec", "-V" + end +end diff --git a/Formula/lib/libkeccak.rb b/Formula/lib/libkeccak.rb new file mode 100644 index 0000000000000..efec0ad78a387 --- /dev/null +++ b/Formula/lib/libkeccak.rb @@ -0,0 +1,31 @@ +class Libkeccak < Formula + desc "Keccak-family hashing library" + homepage "https://codeberg.org/maandree/libkeccak" + url "https://codeberg.org/maandree/libkeccak/archive/1.4.2.tar.gz" + sha256 "a0c15046d0922f20ca5ca2b632181b5f4c37038c3a740127af2751ee37583181" + license "ISC" + + bottle do + sha256 cellar: :any, arm64_sequoia: "70977efcdb774de369d24949c0e01429980706b72369428da2a7d63b87f3c0d7" + sha256 cellar: :any, arm64_sonoma: "f60cca3b212fb9e7347b2b6fbfe40320871f340dd8b1c7cef1b82f1f051e2cec" + sha256 cellar: :any, arm64_ventura: "f36edf66bb02643f97a5aa6bd18330839ee173537a10961e38eaf5c99ea9f2a0" + sha256 cellar: :any, sonoma: "b86b8c1a529602eec5de64c6d78f820baf7c611b22ddcbc32b187eb73cdfd700" + sha256 cellar: :any, ventura: "40d03f81b05b53dbc8ca7e6e5c3de4890a2dbf5665d376f5f2a55d57f232bed9" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e520ee48c95376e0f23d47dfbf70c36589ea5c50612cdddc7c4cec2546f1f1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ffb9b214f2a9ac56836f8459caa910d8077dc26cc93e85989a72fcddeee3df5" + end + + def install + args = ["PREFIX=#{prefix}"] + args << "OSCONFIGFILE=macos.mk" if OS.mac? + + system "make", "install", *args + pkgshare.install %w[.testfile test.c] + end + + test do + cp_r pkgshare/".testfile", testpath + system ENV.cc, pkgshare/"test.c", "-std=c99", "-O3", "-I#{include}", "-L#{lib}", "-lkeccak", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libkeyfinder.rb b/Formula/lib/libkeyfinder.rb new file mode 100644 index 0000000000000..26ad3ef5747f4 --- /dev/null +++ b/Formula/lib/libkeyfinder.rb @@ -0,0 +1,41 @@ +class Libkeyfinder < Formula + desc "Musical key detection for digital audio, GPL v3" + homepage "https://mixxxdj.github.io/libkeyfinder/" + url "https://github.com/mixxxdj/libkeyfinder/archive/refs/tags/2.2.8.tar.gz" + sha256 "a54fc6c5ff435bb4b447f175bc97f9081fb5abf0edd5d125e6f5215c8fff4d11" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2dd1ceb165b79e82738bf1fa3fa7e21a71f6ed471fd3c0214a96dda2f82f967d" + sha256 cellar: :any, arm64_sonoma: "02d5e2117d55a2768b021f74dd627f52db228bf54394a60025454903fdeb3f39" + sha256 cellar: :any, arm64_ventura: "400c2779b10b2a10e3d3e06372aec2c37b348ffb352dd214448b07dc488c7cfb" + sha256 cellar: :any, sonoma: "0d16cad59170872627fa1b08e4cf237e0758205f9ea62499e89a358d5bc012e3" + sha256 cellar: :any, ventura: "35794d840b7cae4b2dda6e5f9b26854a0572cdf99c08ef2d5d331c8c5928d818" + sha256 cellar: :any_skip_relocation, arm64_linux: "4c2ce01391bb60dbbadde01920c9ee4d34d9b8e86a894713aba206404c74843c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0b50fcc57a84c874798b361edbf9e5ddbb899108ab57144ad31b1cff6582a736" + end + + depends_on "cmake" => :build + depends_on "fftw" + + 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(void) { + KeyFinder::Workspace w; + w.chromagram = new KeyFinder::Chromagram(1); + KeyFinder::KeyFinder kf; + return KeyFinder::SILENCE == kf.keyOfChromagram(w) ? 0 : 1; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", "-lkeyfinder", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libkml.rb b/Formula/lib/libkml.rb new file mode 100644 index 0000000000000..1ffc50915a745 --- /dev/null +++ b/Formula/lib/libkml.rb @@ -0,0 +1,81 @@ +class Libkml < Formula + desc "Library to parse, generate and operate on KML" + homepage "https://github.com/libkml/libkml" + url "https://github.com/libkml/libkml/archive/refs/tags/1.3.0.tar.gz" + sha256 "8892439e5570091965aaffe30b08631fdf7ca7f81f6495b4648f0950d7ea7963" + license "BSD-3-Clause" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "16858cec446e361bcf9e982681d9283e990e2ffca3ab0d85f54b23bd48557623" + sha256 cellar: :any, arm64_sonoma: "179af536831d605bf028ef8c8f343ae9463b60b2864bc473b4266659d994f4cf" + sha256 cellar: :any, arm64_ventura: "ee02b6adeccc3033cc99a2e8a45f8d21a4df7c487c0be1f05f623a7d3ac6ffa1" + sha256 cellar: :any, arm64_monterey: "39b02cd2375b13cf321a80d04bdd90e07139bd99bd9e0f8b0ac816b96ec5920e" + sha256 cellar: :any, arm64_big_sur: "4c4e7310b060e79a58f209a910a56f7b9e5535305e81127afa0540ddb33c9d58" + sha256 cellar: :any, sonoma: "eb05bd2a83db1deae6c926aadd56c2128364c66d9f76c2c8ddafed1d65a0715d" + sha256 cellar: :any, ventura: "8c1aad6dd48f07f59db92056f984a4ea23de92a1f5103b39314e6995d7c7e43a" + sha256 cellar: :any, monterey: "8fea3543dfb5a38bcc28fdf049d30657ce12b20ab4435b41d0d4634856b28bd9" + sha256 cellar: :any, big_sur: "19bf29c790ba047803ce5ac8f33192d1bfd281458026870d74f18ee91c732203" + sha256 cellar: :any_skip_relocation, arm64_linux: "18bf187fc45bb5fb71649813c9647d91ae0b27a4097dd8858dfc1c642ba18589" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b827ac73d49a0fb2d3d0073ef374d6c9a54688698daf7600670594aa10ea6149" + end + + depends_on "boost" => [:build, :test] + depends_on "cmake" => :build + depends_on "googletest" => :test + depends_on "pkgconf" => :test + + depends_on "minizip" + depends_on "uriparser" + + uses_from_macos "curl" + uses_from_macos "expat" + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def caveats + <<~EOS + libkml uses boost headers. To develop with libkml, install boost. + EOS + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "kml/regionator/regionator_qid.h" + #include "gtest/gtest.h" + + namespace kmlregionator { + // This class is the unit test fixture for the KmlHandler class. + class RegionatorQidTest : public testing::Test { + protected: + virtual void SetUp() { + root_ = Qid::CreateRoot(); + } + + Qid root_; + }; + + // This tests the CreateRoot(), depth(), and str() methods of class Qid. + TEST_F(RegionatorQidTest, TestRoot) { + ASSERT_EQ(static_cast(1), root_.depth()); + ASSERT_EQ(string("q0"), root_.str()); + } + } + + int main(int argc, char** argv) { + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); + } + CPP + + flags = shell_output("pkgconf --cflags --libs libkml gtest").chomp.split + system ENV.cxx, "test.cpp", "-std=c++14", "-o", "test", *flags + assert_match "PASSED", shell_output("./test") + end +end diff --git a/Formula/lib/libksba.rb b/Formula/lib/libksba.rb new file mode 100644 index 0000000000000..4a87cc4918a48 --- /dev/null +++ b/Formula/lib/libksba.rb @@ -0,0 +1,54 @@ +class Libksba < Formula + desc "X.509 and CMS library" + homepage "https://www.gnupg.org/related_software/libksba/" + url "https://gnupg.org/ftp/gcrypt/libksba/libksba-1.6.7.tar.bz2" + sha256 "cf72510b8ebb4eb6693eef765749d83677a03c79291a311040a5bfd79baab763" + license any_of: ["LGPL-3.0-or-later", "GPL-2.0-or-later"] + + livecheck do + url "https://gnupg.org/ftp/gcrypt/libksba/" + regex(/href=.*?libksba[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "4446cbe4b0a27393b01c2627edfad9cfebb8a55fae70750977ec786d4598e64a" + sha256 cellar: :any, arm64_sonoma: "0988bac20ad406ec6d0c8ba7f141b320d3752a8c73e20596b0a9dd004769b832" + sha256 cellar: :any, arm64_ventura: "5ec4bdc07e17b7a9a853035d6cce36d5f06a02d023b16c42da83eb7d81faeeb4" + sha256 cellar: :any, arm64_monterey: "7e610a6f976663698f835eedfe4327f92258a0a5faf9ef812b1318aa659e41d0" + sha256 cellar: :any, sonoma: "7fb376fb9a021c347e3ffa9a2b91abf42763bcac15457238b0dfb2dfbf6b309b" + sha256 cellar: :any, ventura: "c296bd13b1b83cba89ab5cf481de5d8b00f1396008daf98cb5724924b19627e9" + sha256 cellar: :any, monterey: "926a6f72ba9c7ba6701e93ecc4849f13661e558f82b95f5c86b2786f3b46c4f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "3930363cc2716c7c0d487b518cfdd2955e72671af0ad494d40f7075ca32303d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2110f07bc9d32f299877e050db0b52a138b8c28f8fac2502585dfa5698e783dc" + end + + depends_on "libgpg-error" + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "check" + system "make", "install" + + # avoid triggering mandatory rebuilds of software that hard-codes this path + inreplace [bin/"ksba-config", lib/"pkgconfig/ksba.pc"], prefix, opt_prefix + end + + test do + (testpath/"ksba-test.c").write <<~C + #include "ksba.h" + #include + int main() { + printf("%s", ksba_check_version(NULL)); + return 0; + } + C + + ENV.append_to_cflags shell_output("#{bin}/ksba-config --cflags").strip + ENV.append "LDLIBS", shell_output("#{bin}/ksba-config --libs").strip + + system "make", "ksba-test" + assert_equal version.to_s, shell_output("./ksba-test") + end +end diff --git a/Formula/lib/liblbfgs.rb b/Formula/lib/liblbfgs.rb new file mode 100644 index 0000000000000..9d747051ecca1 --- /dev/null +++ b/Formula/lib/liblbfgs.rb @@ -0,0 +1,42 @@ +class Liblbfgs < Formula + desc "C library for limited-memory BFGS optimization algorithm" + homepage "https://www.chokkan.org/software/liblbfgs" + url "https://github.com/chokkan/liblbfgs/archive/refs/tags/v1.10.tar.gz" + sha256 "95c1997e6c215c58738f5f723ca225d64c8070056081a23d636160ff2169bd2f" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9d20979a75f869868f997ad0c9596646bb3ccc5683b54c192a923f5818096444" + sha256 cellar: :any, arm64_sonoma: "77b0dfdc9c988252874e28090eeafd90d74034214c5a46d2669da0f850a4e925" + sha256 cellar: :any, arm64_ventura: "06c8d7b71b75a24838acbd0a60a071d146b8befb750d18dd0197acc7a3f4552a" + sha256 cellar: :any, arm64_monterey: "e65a09362f54852c0b5bbd9a38fc2df634bdd0cd1f151ad2497b287688edb334" + sha256 cellar: :any, arm64_big_sur: "77960d72a78a9bfae97e725b8bcf37b5105b5e3254ce319487e0a5b3a707db5f" + sha256 cellar: :any, sonoma: "56d3aece128cfb420a427eb7f6513e539a6e51b777d281c8c6fa6bf804693305" + sha256 cellar: :any, ventura: "1f48ca57c0b49cd4414d8a7462c7495951285c63d4d9490be95bd355e695a431" + sha256 cellar: :any, monterey: "7000437bee7f617b05b7f6f6a9adef00f8f8664f37fc34cc6758d461af136b89" + sha256 cellar: :any, big_sur: "3b6468ee0f05eae6289940247c51e1012e929a8a033e2227be767d17396f88a7" + sha256 cellar: :any, catalina: "668f1c5336818e566dd0cb2e4b1deb0eacdb38fd8c956b1b2e49929f18714104" + sha256 cellar: :any_skip_relocation, arm64_linux: "b45e6bbae731b52f94d92784f30120bf36bf7169df1d6956b5398473438d6f95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c462aa266b91b96ed0f85ce8a495cb29ed9c571943ffb0eb8b65f5bd7406d7cc" + 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" + pkgshare.install "sample/sample.c" + end + + test do + cp pkgshare/"sample.c", testpath/"sample.c" + system ENV.cc, "sample.c", "-I#{include}", "-L#{lib}", "-llbfgs", "-o", "./test" + output = shell_output("./test") + + assert_match "L-BFGS optimization terminated with status code = 0", output + assert_match "fx = 0.000000, x[0] = 1.000000, x[1] = 1.000000", output + end +end diff --git a/Formula/lib/liblc3.rb b/Formula/lib/liblc3.rb new file mode 100644 index 0000000000000..9cf6fc4751805 --- /dev/null +++ b/Formula/lib/liblc3.rb @@ -0,0 +1,91 @@ +class Liblc3 < Formula + desc "Low Complexity Communication Codec library and tools" + homepage "https://github.com/google/liblc3" + url "https://github.com/google/liblc3/archive/refs/tags/v1.1.3.tar.gz" + sha256 "276752ff54ce6a77d54ec133397b9d7e71f90caf3d9afa32d8b0e891b8ecb8af" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "997b5d2fdfceb35010b61b89004b9ce8e2a5630aa9c90d1f322e62db53641dae" + sha256 cellar: :any, arm64_sonoma: "3fc0c2cb6555286a50609efa75f46c88d9addde79781a17165b1bd90e17e14ae" + sha256 cellar: :any, arm64_ventura: "00fa4c793aaa4ccea249c31fab37842e72d5564d581a2b022bde1727ef2c4830" + sha256 cellar: :any, sonoma: "e0e1764a4d3c5d39c850c2289748cb18789a0f06e4264d88b119f5aebb83bba2" + sha256 cellar: :any, ventura: "b8c8cb040fcc528c0224dff4e3e8e6a9e016639187ee365d66679afed1dd3458" + sha256 cellar: :any_skip_relocation, arm64_linux: "6377a03378ccbac1bc3dfebd170453ef1e1a1cc6a00d403e226bca898a0d29b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f6f3cff68a823732f72eca5847e4774b34c9d545b1eae5838f4b5cb0b73fc53" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + + uses_from_macos "python" + + def install + # disable tools build due to rpath issue, see https://github.com/google/liblc3/pull/53 + args = %w[ + -Dtools=false + -Dpython=true + ] + + 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 "lc3.h" + #include + #include + + int main() { + int frame_duration_us = 10000; // 10 ms frame duration + int sample_rate_hz = 48000; // 48 kHz sample rate + + // Memory allocation for encoder and decoder + size_t encoder_mem_size = lc3_encoder_size(frame_duration_us, sample_rate_hz); + void* encoder_mem = malloc(encoder_mem_size); + if (!encoder_mem) { + printf("Failed to allocate memory for the encoder.\\n"); + return 1; + } + + size_t decoder_mem_size = lc3_decoder_size(frame_duration_us, sample_rate_hz); + void* decoder_mem = malloc(decoder_mem_size); + if (!decoder_mem) { + printf("Failed to allocate memory for the decoder.\\n"); + free(encoder_mem); + return 1; + } + + // Setup encoder and decoder + lc3_encoder_t encoder = lc3_setup_encoder(frame_duration_us, sample_rate_hz, 0, encoder_mem); + if (!encoder) { + printf("Failed to setup the encoder.\\n"); + free(encoder_mem); + free(decoder_mem); + return 1; + } + + lc3_decoder_t decoder = lc3_setup_decoder(frame_duration_us, sample_rate_hz, 0, decoder_mem); + if (!decoder) { + printf("Failed to setup the decoder.\\n"); + free(encoder_mem); + free(decoder_mem); + return 1; + } + + printf("LC3 encoder and decoder setup was successful.\\n"); + + free(encoder_mem); + free(decoder_mem); + printf("Cleanup completed.\\n"); + + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-llc3", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/liblcf.rb b/Formula/lib/liblcf.rb new file mode 100644 index 0000000000000..9f615a1ca3ba7 --- /dev/null +++ b/Formula/lib/liblcf.rb @@ -0,0 +1,49 @@ +class Liblcf < Formula + desc "Library for RPG Maker 2000/2003 games data" + homepage "https://easyrpg.org/" + url "https://easyrpg.org/downloads/player/0.8.1/liblcf-0.8.1.tar.xz" + sha256 "e827b265702cf7d9f4af24b8c10df2c608ac70754ef7468e34836201ff172273" + license "MIT" + head "https://github.com/EasyRPG/liblcf.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3b50d8d26ad9ae4223f2b32c6e6339286076967625db097d6f59e51e301839ef" + sha256 cellar: :any, arm64_sonoma: "b46ebee74b740c0c6fab8ed2c4d54126a190cb2f16d9c6528e9900e3dc51fb0e" + sha256 cellar: :any, arm64_ventura: "c36ac2cb17b1d1057e197d9e2f22d8dae23d1d44142dfab5d595e46edc6cb1fd" + sha256 cellar: :any, sonoma: "a043c615f9b5d1c946eeec170beebf0fcdb561ff35f7bbc34561102519e3f452" + sha256 cellar: :any, ventura: "8088af20377163a45aac512fc22a33d774d888dbe7becac630eda6ffa29cb0b3" + sha256 cellar: :any_skip_relocation, arm64_linux: "4dbcfc8241bf5efa4380109aed635b6107a0f53fb0f698bf469e3f2a50a4c6ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "beefb8b7b075411dc9335ea16e330d963cf8d02f3e9d8d4b5f706ca82ecdcd03" + end + + depends_on "cmake" => :build + depends_on "icu4c@77" + depends_on "inih" + + uses_from_macos "expat" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DLIBLCF_UPDATE_MIMEDB=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "lcf/lsd/reader.h" + #include + + int main() { + std::time_t const current = std::time(NULL); + assert(current == lcf::LSD_Reader::ToUnixTimestamp(lcf::LSD_Reader::ToTDateTime(current))); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-L#{lib}", "-llcf", \ + "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/liblerc.rb b/Formula/lib/liblerc.rb new file mode 100644 index 0000000000000..405f927fb417b --- /dev/null +++ b/Formula/lib/liblerc.rb @@ -0,0 +1,56 @@ +class Liblerc < Formula + desc "Ersi LERC library (Limited Error Raster Compression)" + homepage "https://github.com/Esri/lerc" + url "https://github.com/Esri/lerc/archive/refs/tags/v4.0.0.tar.gz" + sha256 "91431c2b16d0e3de6cbaea188603359f87caed08259a645fd5a3805784ee30a0" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1f20f8fbf3268c2851793fd8f1215cd7a6f3fb55f97753314fad5fe57aaa678c" + sha256 cellar: :any, arm64_sonoma: "0850343f6c9467738b9f5bc143d140fababcf53e0bd0cc6ebbe0952e3a524b5b" + sha256 cellar: :any, arm64_ventura: "bda5945718a4ae8c186d1c0574c70667b95b6e2cf1cd95060fc3a7b4c78a63cb" + sha256 cellar: :any, arm64_monterey: "ac9a9d7025ab1fd8e49d79518ce278bd9c3a08a782478a6eebf793c663e9673d" + sha256 cellar: :any, arm64_big_sur: "b498cb1e4a46236e877b8497c293f0be9d8c47ee4357b5f12dfd94a22fe5f29b" + sha256 cellar: :any, sonoma: "cd18579fc472762ec9ceba58ad5b11a46027af4fbb3a9f8dd64c6420aa9b0845" + sha256 cellar: :any, ventura: "436d533a3de8a6ec1f4a099d9ee816c9a1b01cfcc1b2b933b8f5a1d4e10bcd51" + sha256 cellar: :any, monterey: "222a3e3fad0f4528161894f262458ec850ce1e8525475b7c3b4e0158f0d3c944" + sha256 cellar: :any, big_sur: "f3d0aa49310e3fcc3b88c07f8609dc1988990b9f270e3d002947a9a237ca2c5b" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f777d122d1776bb11be82bb12a18c4cfa17e2b9cc4aa5f8c807b1d16eb1138c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d409346584f40f2fd9aafa46860d7a5668b9c5f42b3de930868cf65daf556d7" + 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.cc").write <<~CPP + #include + #include + int main() { + const int infoArrSize = (int)LercNS::InfoArrOrder::_last; + const int dataRangeArrSize = (int)LercNS::DataRangeArrOrder::_last; + lerc_status hr(0); + + return 0 ; + } + CPP + + system ENV.cxx, "test.cc", "-std=gnu++17", + "-I#{include}", + "-L#{lib}", + "-lLerc", + "-o", "test_liblerc" + + assert_empty shell_output("./test_liblerc") + end +end diff --git a/Formula/lib/liblinear.rb b/Formula/lib/liblinear.rb new file mode 100644 index 0000000000000..8e53a39cc3e83 --- /dev/null +++ b/Formula/lib/liblinear.rb @@ -0,0 +1,54 @@ +class Liblinear < Formula + desc "Library for large linear classification" + homepage "https://www.csie.ntu.edu.tw/~cjlin/liblinear/" + url "https://www.csie.ntu.edu.tw/~cjlin/liblinear/oldfiles/liblinear-2.48.tar.gz" + sha256 "72ea3853a9fb430b49c3196177d8acdffd2dadb5901832ee323465792087e8cc" + license "BSD-3-Clause" + head "https://github.com/cjlin1/liblinear.git", branch: "master" + + livecheck do + url "https://www.csie.ntu.edu.tw/~cjlin/liblinear/oldfiles/" + regex(/href=.*?liblinear[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c8c537286177821c0bd2d45919a47cc842c789fff679b2f054e5adc008edf228" + sha256 cellar: :any, arm64_sonoma: "7bcb360515141b322d2b34e29e172b8f332d96c92122811611e07e4a1b4a1846" + sha256 cellar: :any, arm64_ventura: "90961753c75dfcc6028d8646889e214359b6e3c540455bd5cc8bd21cf0d36b8c" + sha256 cellar: :any, sonoma: "a33cab9994c8a76fa5dd80d94c736cb48b520100f590fb5309332c0edb08d02e" + sha256 cellar: :any, ventura: "3ff7de89979c7836bb6aaeeececbbd7a93feba336a2e65c6d473fdf8973002b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "5df01b9f8e93a7429b42d4d9925287c5ca3456cfccac4c3e5fb0a4cae22c7218" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ad447cb4fdfe17f95da5b04cdc815b749f94f877d57808cc25ee87b850252d3" + end + + # Fix sonames + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/bac35ae9140405dec00f1f700d2ecc27cf82526b/liblinear/patch-Makefile.diff" + sha256 "11a47747918f665d219b108fac073c626779555b5022903c9b240a4c29bbc2a0" + end + + def install + soversion_regex = /^SHVER = (\d+)$/ + soversion = (buildpath/"Makefile").read + .lines + .grep(soversion_regex) + .first[soversion_regex, 1] + system "make", "all" + bin.install "predict", "train" + lib.install shared_library("liblinear", soversion) + lib.install_symlink shared_library("liblinear", soversion) => shared_library("liblinear") + include.install "linear.h" + end + + test do + (testpath/"train_classification.txt").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 + + system bin/"train", "train_classification.txt" + end +end diff --git a/Formula/lib/liblo.rb b/Formula/lib/liblo.rb new file mode 100644 index 0000000000000..eed16dc1a6bfd --- /dev/null +++ b/Formula/lib/liblo.rb @@ -0,0 +1,52 @@ +class Liblo < Formula + desc "Lightweight Open Sound Control implementation" + homepage "https://liblo.sourceforge.net/" + url "https://downloads.sourceforge.net/project/liblo/liblo/0.32/liblo-0.32.tar.gz" + sha256 "5df05f2a0395fc5ac90f6b538b8c82bb21941406fd1a70a765c7336a47d70208" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "8373256cd53294a3a06252d55c8cc93d6c6a6f8c3b235084cab456931e67e1b3" + sha256 cellar: :any, arm64_sonoma: "c379d421a02f1afa3c6105e527dc71b5271450f2964f31b6f6117fd826c8f783" + sha256 cellar: :any, arm64_ventura: "1395a951f82712482f5f90cd4a4803d88044154029cd3cd1d2fb2fbaf0f357c1" + sha256 cellar: :any, arm64_monterey: "e79362d970b3c7a741336f9e02e3d738f43169bc5fddd6972dfae327d4dfe8ee" + sha256 cellar: :any, sonoma: "79de8fe2295a65736c7a7de5a2a24e6b62bc8745dd692a330c208e4b717b65e6" + sha256 cellar: :any, ventura: "98ec4c770688b3f59d46c99eda7c052eee63ff6c8ab4b874bc56db2942dad96f" + sha256 cellar: :any, monterey: "8f4e3f2fd6ce732d7d170f1db5193f9b53b233fcb08b876cc66114b252f465cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a3ae0a7f62dc172def171ed8c833e44fa72b4ab6a798f9b3c897b5e402e8b59" + sha256 cellar: :any_skip_relocation, x86_64_linux: "62fbd9950f4178a2ec7eeb280aac525b10d483953417f750aca24b420089b157" + end + + head do + url "https://git.code.sf.net/p/liblo/git.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + if build.head? + system "./autogen.sh", *std_configure_args + else + system "./configure", *std_configure_args + end + + system "make", "install" + end + + test do + (testpath/"lo_version.c").write <<~C + #include + #include "lo/lo.h" + int main() { + char version[6]; + lo_version(version, 6, 0, 0, 0, 0, 0, 0, 0); + printf("%s", version); + return 0; + } + C + system ENV.cc, "lo_version.c", "-I#{include}", "-L#{lib}", "-llo", "-o", "lo_version" + assert_equal version.to_str, shell_output("./lo_version") + end +end diff --git a/Formula/lib/liblockfile.rb b/Formula/lib/liblockfile.rb new file mode 100644 index 0000000000000..ba7dce80b4b3e --- /dev/null +++ b/Formula/lib/liblockfile.rb @@ -0,0 +1,55 @@ +class Liblockfile < Formula + desc "Library providing functions to lock standard mailboxes" + homepage "https://tracker.debian.org/pkg/liblockfile" + url "https://deb.debian.org/debian/pool/main/libl/liblockfile/liblockfile_1.17.orig.tar.gz" + sha256 "6e937f3650afab4aac198f348b89b1ca42edceb17fb6bb0918f642143ccfd15e" + license "LGPL-2.0-or-later" + + livecheck do + url "https://deb.debian.org/debian/pool/main/libl/liblockfile/" + regex(/href=.*?liblockfile[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + bottle do + sha256 arm64_sequoia: "22df0fabe8a8f4a92ab8f9d8f7c3add9dc1ca2f6233f0336d6059064dd8cc539" + sha256 arm64_sonoma: "077b7e12530a51cb0c32c48cc483a5e21c75e899dc5ccccd21235facb12dfed8" + sha256 arm64_ventura: "d6425a72a9e1a04fd11c8793c31b1a4308ff974979b368439d62515ca7bd0c53" + sha256 arm64_monterey: "69933a745062ff9b8a41b7b3b7fec871efa9a99896b1ace2ccbf4cbafb2437f8" + sha256 arm64_big_sur: "41a9d79f95f938532b4320a29c5f5bf3d7229a6df3f06413112d903e23589078" + sha256 sonoma: "e4221901849f861ddc1c1848ba4ae3be15c5d33988b2e7d833eba1f4706e5715" + sha256 ventura: "5cd7c8a1982b414eb54a539e0866a31018da08e90449e9bf62211bcb40c5bb92" + sha256 monterey: "fec045c7ef1d9e55d1aac480298de26dce1754a73cb86f2545be737bc528d84b" + sha256 big_sur: "d13b1ce9f35885e1b05c9bd436e8edd0fc1b0dc7475219773655cb69bafcfbb3" + sha256 catalina: "a923faddb180ea86f1038424613c3191bf5212fc44e25548284f5a0525e1b5e9" + sha256 mojave: "143542d504f3f37df987e6f2c4291c2966cdb9ac15a6fd581155a4079758575e" + sha256 cellar: :any_skip_relocation, arm64_linux: "bfa13d72db6f2cd7d614dc0481cc210df711cc2582581944ac8b94c0a45a13a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b40e192cdbc7b9ecbc0e6ea36a893f5de7b4d26f5f8a094bec6ab31b3dc86b03" + end + + def install + # brew runs without root privileges (and the group is named "wheel" anyway) + inreplace "Makefile.in", " -g root ", " " + + args = %W[ + --sysconfdir=#{etc} + --mandir=#{man} + ] + args << "--with-mailgroup=staff" if OS.mac? + + system "./configure", *std_configure_args, *args + bin.mkpath + lib.mkpath + include.mkpath + man1.mkpath + man3.mkpath + system "make" + system "make", "install" + end + + test do + system bin/"dotlockfile", "-l", "locked" + assert_path_exists testpath/"locked" + system bin/"dotlockfile", "-u", "locked" + refute_path_exists testpath/"locked" + end +end diff --git a/Formula/lib/liblouis.rb b/Formula/lib/liblouis.rb new file mode 100644 index 0000000000000..6f63e168a4447 --- /dev/null +++ b/Formula/lib/liblouis.rb @@ -0,0 +1,55 @@ +class Liblouis < Formula + desc "Open-source braille translator and back-translator" + homepage "https://liblouis.io/" + url "https://github.com/liblouis/liblouis/releases/download/v3.33.0/liblouis-3.33.0.tar.gz" + sha256 "e2ad56d132d0cd63f08f3122391a0472adcc8c5d046d7cd81bcadf48a55deea4" + license all_of: ["GPL-3.0-or-later", "LGPL-2.1-or-later"] + + bottle do + sha256 arm64_sequoia: "50f37b5fbdceca05fa294a6029c04b4b182b43718ffe353c300663bbc8c72632" + sha256 arm64_sonoma: "c9f967c7b2d9b6b4b0f3642a9a31142092b2b9bd4d1293cfb56a983eabade6b7" + sha256 arm64_ventura: "76c0a6395652160429e77a41318c995211edc60918942999783526a624297a6d" + sha256 sonoma: "c658092622f42c094e13ed9bb243ff9db4b931e3ba8ccf574b8dbb10b70b488a" + sha256 ventura: "3b5486f4d87050ece459d29c197043ab55ca96f39ff9019ecedd7d531481a2c0" + sha256 arm64_linux: "1a1b60e4245ffd2b5566d0b9c98d224e5f861c2fd2557904b9924288fe45714f" + sha256 x86_64_linux: "cea6123b5927e70704757008f1314af7e0bf73cc83cc2d8fdd01b817036df110" + end + + head do + url "https://github.com/liblouis/liblouis.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "help2man" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" + + uses_from_macos "m4" + + def python3 + "python3.13" + 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" + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "./python" + (prefix/"tools").install bin/"lou_maketable", bin/"lou_maketable.d" + end + + test do + assert_equal "⠼⠙⠃", pipe_output("#{bin}/lou_translate unicode.dis,en-us-g2.ctb", "42") + + (testpath/"test.py").write <<~PYTHON + import louis + print(louis.translateString(["unicode.dis", "en-us-g2.ctb"], "42")) + PYTHON + assert_equal "⠼⠙⠃", shell_output("#{python3} test.py").chomp + end +end diff --git a/Formula/lib/liblqr.rb b/Formula/lib/liblqr.rb new file mode 100644 index 0000000000000..5ad7c22bea8b6 --- /dev/null +++ b/Formula/lib/liblqr.rb @@ -0,0 +1,65 @@ +class Liblqr < Formula + desc "C/C++ seam carving library" + homepage "https://liblqr.wikidot.com/" + license "LGPL-3.0-only" + head "https://github.com/carlobaldassi/liblqr.git", branch: "master" + + stable do + url "https://github.com/carlobaldassi/liblqr/archive/refs/tags/v0.4.3.tar.gz" + sha256 "64b0c4ac76d39cca79501b3f53544af3fc5f72b536ac0f28d2928319bfab6def" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0adf2f9c0c8b464c301df3595f6dab6a86944b1227c7934a2cfdaedce985bc69" + sha256 cellar: :any, arm64_sonoma: "9ad43c688c7604dc0d12d25a55e5dba657312e6f702c5c7779a529e7b0788c3b" + sha256 cellar: :any, arm64_ventura: "c93518552d7c18f49dd1fb7e15e23bc36fcd6e43c7a28c82493f552ff4cf4d1a" + sha256 cellar: :any, arm64_monterey: "5a0057c2916952556b4ef88ebdb3facc0dea309da38adb0540ce12d18c08a5cd" + sha256 cellar: :any, sonoma: "28335247f3e95ffe590d0e7f23ab6ce32bf70963da671336627a024d344cef10" + sha256 cellar: :any, ventura: "e8644cf78f7d1b496536ccbe8287ce7d67f61a8f53eda230df5e221d004e4ed1" + sha256 cellar: :any, monterey: "f39b2894ef45355efebbcb7a8277892a1d71a00caa1309ad11caa2d5a97d0426" + sha256 cellar: :any_skip_relocation, arm64_linux: "d2b6dff54f55b70b04004cf3bb64045a3b455cd9c9c12bf068c3ebc89ec079f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df9a20d9afa1541e259edeadd06e3ec8501a9a5b75a5a973e61f321521c37c80" + end + + depends_on "pkgconf" => :build + depends_on "glib" + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--enable-install-man", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() { + guchar* buffer = calloc(1, sizeof(guchar)); + + LqrCarver *carver = lqr_carver_new(buffer, 1, 1, 1); + if (carver == NULL) return 1; + + lqr_carver_destroy(carver); + + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", + "-I#{include}/lqr-1", + "-I#{Formula["glib"].opt_include}/glib-2.0", + "-I#{Formula["glib"].opt_lib}/glib-2.0/include", + "-L#{lib}", "-llqr-1" + system "./test" + end +end diff --git a/Formula/lib/libltc.rb b/Formula/lib/libltc.rb new file mode 100644 index 0000000000000..e8fde6582d364 --- /dev/null +++ b/Formula/lib/libltc.rb @@ -0,0 +1,101 @@ +class Libltc < Formula + desc "POSIX-C Library for handling Linear/Logitudinal Time Code (LTC)" + homepage "https://x42.github.io/libltc/" + url "https://github.com/x42/libltc/releases/download/v1.3.2/libltc-1.3.2.tar.gz" + sha256 "0a6d42cd6c21e925a27fa560dc45ac80057d275f23342102825909c02d3b1249" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "db162961bf9b4cb7fab2db612ffff0b70ab59470d382712417f1868d63500524" + sha256 cellar: :any, arm64_sonoma: "51fbcf835713464c3adc121dfce5dc240a9364a9c1d597df408fa787c6caeaa7" + sha256 cellar: :any, arm64_ventura: "317e8d1f146e9c5118dabea794de694186057e4c71688523946fb24859ed4de7" + sha256 cellar: :any, arm64_monterey: "8289e0f5389ee652949981fbde5d3955d78048707c2731619e2d9d046cf1f89a" + sha256 cellar: :any, arm64_big_sur: "d003af07740326535cc95332c180cc467b29eaab2d227438e1486c8891bd5560" + sha256 cellar: :any, sonoma: "368a0369adc7d7c720f108402577e83d18f6da8dba0dac96ae170f6bb4616c7a" + sha256 cellar: :any, ventura: "846224f71e3bc2254b94c41e62e8f02bb125d421bc24e9559fd6fca16ee8da44" + sha256 cellar: :any, monterey: "9a4cdb442f640d04e8886b888bbc5427b448cc9d7a160672a505fda5fa1371c8" + sha256 cellar: :any, big_sur: "a8a22a13e7faa84038e3833a7ad379d5ca3afe26670476fad9f87afc5312338a" + sha256 cellar: :any, catalina: "2489b05efb1e77a52635ff5cded3850b9c1abe861b01145bccba7a2f6edaafaa" + sha256 cellar: :any_skip_relocation, arm64_linux: "9cf04675a7dd67b37fa8b4c48ab7e6903d2caa761704bebdd1e64a5a6d79f863" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c160950aa4d33232070cb6607deec9ed4fc9b070dd5dcf0c3221404199016c46" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + // stripped-down copy of: + // https://raw.githubusercontent.com/x42/libltc/87d45b3/tests/example_encode.c + #include + #include + #include + #include + + int main(int argc, char **argv) { + FILE* file; + double length = 2; + double fps = 25; + double sample_rate = 48000; + char *filename = "#{testpath}/foobar"; + int vframe_cnt; + int vframe_last; + int total = 0; + ltcsnd_sample_t *buf; + LTCEncoder *encoder; + SMPTETimecode st; + + const char timezone[6] = "+0100"; + strcpy(st.timezone, timezone); + st.years = 8; + st.months = 12; + st.days = 31; + st.hours = 23; + st.mins = 59; + st.secs = 59; + st.frame = 0; + + file = fopen(filename, "wb"); + if (!file) { + fprintf(stderr, "Error: can not open file '%s' for writing.\\n", filename); + return 1; + } + + encoder = ltc_encoder_create(sample_rate, fps, + fps==25?LTC_TV_625_50:LTC_TV_525_60, LTC_USE_DATE); + ltc_encoder_set_timecode(encoder, &st); + + vframe_cnt = 0; + vframe_last = length * fps; + + while (vframe_cnt++ < vframe_last) { + int byte_cnt; + for (byte_cnt = 0 ; byte_cnt < 10 ; byte_cnt++) { + ltc_encoder_encode_byte(encoder, byte_cnt, 1.0); + + int len; + buf = ltc_encoder_get_bufptr(encoder, &len, 1); + + if (len > 0) { + fwrite(buf, sizeof(ltcsnd_sample_t), len, file); + total+=len; + } + } + + ltc_encoder_inc_timecode(encoder); + } + fclose(file); + ltc_encoder_free(encoder); + + printf("Done: wrote %d samples to '%s'\\n", total, filename); + + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lltc", "-lm", "-o", "test" + system "./test" + assert (testpath/"foobar").file? + end +end diff --git a/Formula/lib/liblxi.rb b/Formula/lib/liblxi.rb new file mode 100644 index 0000000000000..4b5d34d56232e --- /dev/null +++ b/Formula/lib/liblxi.rb @@ -0,0 +1,51 @@ +class Liblxi < Formula + desc "Simple C API for communicating with LXI compatible instruments" + homepage "https://github.com/lxi-tools/liblxi" + url "https://github.com/lxi-tools/liblxi/archive/refs/tags/v1.22.tar.gz" + sha256 "d33ca3990513223880ec238eb2e5aa1cc93aff51c470ef0db9df3e0c332493d5" + license "BSD-3-Clause" + head "https://github.com/lxi-tools/liblxi.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "831cb59dad3bca5bed6c74817fd5597fdd4fd54ae2090e3ebab6ef5ef54a7fc4" + sha256 cellar: :any, arm64_sonoma: "16a11167f071f03bd1e765f0c8589a5d6bc344a0fe2d2deb31c0de8ed76fa751" + sha256 cellar: :any, arm64_ventura: "d78d4fbae7b6cc939fa66c4dd2076ad656da648a166f678b2eacd2e61e24588c" + sha256 cellar: :any, sonoma: "53fbcaa96206292e4bf9c2cd1a1ff58923aff7a7e2158ed7e9b61c1fd8cbc672" + sha256 cellar: :any, ventura: "7dbb5b441482ca8698090704c45aa776b2680957ae39325c93fc5ae7b81a2b80" + sha256 arm64_linux: "753ec0b4dbf9b8decd7d1902f64c98630f5d50225226d4681aec063166fd2b8d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21dab7abe5a6f4c2c6ff59733b4e25232a5ec4bd0085adf179890a8b68b88b85" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + uses_from_macos "libxml2" + + on_linux do + depends_on "libtirpc" + 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 + #include + + int main() { + return lxi_init(); + } + C + + args = %W[-I#{include} -L#{lib} -llxi] + args += %W[-L#{Formula["libtirpc"].opt_lib} -ltirpc] if OS.linux? + + system ENV.cc, "test.c", *args, "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/liblzf.rb b/Formula/lib/liblzf.rb new file mode 100644 index 0000000000000..29e96f65eea69 --- /dev/null +++ b/Formula/lib/liblzf.rb @@ -0,0 +1,68 @@ +class Liblzf < Formula + desc "Very small, very fast data compression library" + homepage "http://oldhome.schmorp.de/marc/liblzf.html" + url "http://dist.schmorp.de/liblzf/liblzf-3.6.tar.gz" + mirror "https://deb.debian.org/debian/pool/main/libl/liblzf/liblzf_3.6.orig.tar.gz" + sha256 "9c5de01f7b9ccae40c3f619d26a7abec9986c06c36d260c179cedd04b89fb46a" + license all_of: [ + "BSD-2-Clause", + any_of: ["BSD-2-Clause", "GPL-2.0-or-later"], # lzf.c lzf.h lzfP.h lzf_c.c lzf_d.c + ] + + livecheck do + url "http://dist.schmorp.de/liblzf/" + regex(/href=.*?liblzf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7c85befbd00a98a67ac1cc0b265f220bec476aef8f011b9fda2ee5aea9cd29b5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "628f22496ad7f2c4bc212c7732cbc07b01b3fd697e12adb3ec64867a00c35079" + sha256 cellar: :any_skip_relocation, arm64_ventura: "adadf4ce163424818b3b0ff1d983494d271f1b7124f5310a8f7b51cc32cb4dcf" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a929d667239b01aae65391c9bdb50b8979cf00746728274801dfcb69e7dba54b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e321946e647108f4f478e84270ef6a49463e18d412fc94a4bc260c5009bd2dba" + sha256 cellar: :any_skip_relocation, sonoma: "9719e891f819df8bc4e846087b87ac0eb36ebaa9a9829d02ce8d9927f957786e" + sha256 cellar: :any_skip_relocation, ventura: "0dbb4a635931edee6c07fb09133f60a9a6fda37130a066d0e9ca25cf69e91e64" + sha256 cellar: :any_skip_relocation, monterey: "c0a3c8f9311082eb797c848798f98da622a9ec648669298090fa7ef5cdec6b52" + sha256 cellar: :any_skip_relocation, big_sur: "1eb80ac962ecb5b94ba1ed3dc86d2baa8a13f231d113a77428879e0a8423ebaf" + sha256 cellar: :any_skip_relocation, catalina: "9aa8a1495947fe1fd6249abe33de7245f9ae4a58dcf900276253b013f7f148e8" + sha256 cellar: :any_skip_relocation, mojave: "62c558b1b9562038c49c1e83b73dfb08d8fca8b924eb36428a5c0bb566408f9d" + sha256 cellar: :any_skip_relocation, high_sierra: "66c9ec26bce56b59ffb317d5a415e6358e8246588a3f247c33b8a8d24e714570" + sha256 cellar: :any_skip_relocation, arm64_linux: "900c8c8e3d11ae06648dc7e433f341b7e9b4bfcc8489c93c20d993855495078d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04201793eebd3ab8a64694c1422e4d5801be13fd26d1ed257b6c31d4a231124c" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + # Adapted from bench.c in the liblzf source + (testpath/"test.c").write <<~C + #include + #include + #include + #include "lzf.h" + #define DSIZE 32768 + unsigned char data[DSIZE], data2[DSIZE*2], data3[DSIZE*2]; + int main() + { + unsigned int i, l, j; + for (i = 0; i < DSIZE; ++i) + data[i] = i + (rand() & 1); + l = lzf_compress (data, DSIZE, data2, DSIZE*2); + assert(l); + j = lzf_decompress (data2, l, data3, DSIZE*2); + assert (j == DSIZE); + assert (!memcmp (data, data3, DSIZE)); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-llzf", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libmaa.rb b/Formula/lib/libmaa.rb new file mode 100644 index 0000000000000..e4871db8667a7 --- /dev/null +++ b/Formula/lib/libmaa.rb @@ -0,0 +1,120 @@ +class Libmaa < Formula + desc "Low-level data structures including hash tables, sets, lists" + homepage "https://dict.org/bin/Dict" + url "https://downloads.sourceforge.net/project/dict/libmaa/libmaa-1.5.1/libmaa-1.5.1.tar.gz" + sha256 "3a30e25f038e99c4715125545516490d991fe3a505825cc832b1a956e31bf669" + license "MIT" + head "https://github.com/cheusov/libmaa.git", branch: "master" + + livecheck do + url :stable + regex(%r{url=.*?/libmaa[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2b88aec983abd53f00f4fb93cae3234697551de075a45f36e8b4112d93f6dfcc" + sha256 cellar: :any, arm64_sonoma: "ffeb3a62fca07f8c095090d570b64165b442ab4e9debfab6475d7b6fdc2bdbe1" + sha256 cellar: :any, arm64_ventura: "90ab64584330817a8a5e11494945f1bcc67fac60733e4bea976d95a833341ce8" + sha256 cellar: :any, arm64_monterey: "b3d1be0159e481318505912f1dd5e2d07e3d05122cf791e3743461595e2bd43b" + sha256 cellar: :any, sonoma: "92b9875c3fcae14b3bfa42df2d5cc47c87170f214f8e70eb5dd111e1fe1791ac" + sha256 cellar: :any, ventura: "05c6bb7f0a72131eb382e77c084dd3b26c34e58301fed77648c068b02c15da5d" + sha256 cellar: :any, monterey: "57325e2231ecbfd40349ab24d4841b433d41dd32d503aa9bbc484ee6954fc9c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "a34cd9122ac279b62ac94ccc64d5525566dc526c49581f29f4ef4161f8247a5c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "beb95d2918f10ee42290fb44faa0259e0e9f9e8a4f353822bcfee4268d3f5ef2" + end + + depends_on "bmake" => :build + depends_on "mk-configure" => :build + + def install + system "mkcmake", "install", "CC=#{ENV.cc}", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.c").write <<~C + /* basetest.c -- Test base64 and base26 numbers + * Created: Sun Nov 10 11:51:11 1996 by faith@dict.org + * Copyright 1996, 2002 Rickard E. Faith (faith@dict.org) + * Copyright 2002-2008 Aleksey Cheusov (vle@gmx.net) + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + + #include + #include + + int main( int argc, char **argv ) + { + long int i; + const char *result; + long int limit = 0xffff; + + if (argc == 2) limit = strtol( argv[1], NULL, 0 ); + + for (i = 0; i < limit; i++) { + result = b26_encode( i ); + if (i != b26_decode( result )) { + printf( "%s => %ld != %ld\\n", result, b26_decode( result ), i ); + } + if (i < 100) { + result = b26_encode( 0 ); + if (0 != b26_decode( result )) { + printf( "%s => %ld != %ld (cache problem)\\n", + result, b26_decode( result ), 0L ); + } + result = b26_encode( i ); + if (i != b26_decode( result )) { + printf( "%s => %ld != %ld (cache problem)\\n", + result, b64_decode( result ), i ); + } + } + if (i < 10 || !(i % (limit/10))) + printf( "%ld = %s (base26)\\n", i, result ); + } + + for (i = 0; i < limit; i++) { + result = b64_encode( i ); + if (i != b64_decode( result )) { + printf( "%s => %ld != %ld\\n", result, b64_decode( result ), i ); + } + if (i < 100) { + result = b64_encode( 0 ); + if (0 != b64_decode( result )) { + printf( "%s => %ld != %ld (cache problem)\\n", + result, b64_decode( result ), 0L ); + } + result = b64_encode( i ); + if (i != b64_decode( result )) { + printf( "%s => %ld != %ld (cache problem)\\n", + result, b64_decode( result ), i ); + } + } + if (i < 10 || !(i % (limit/10))) + printf( "%ld = %s (base64)\\n", i, result ); + } + + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lmaa", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libmagic.rb b/Formula/lib/libmagic.rb new file mode 100644 index 0000000000000..84195309ff0bc --- /dev/null +++ b/Formula/lib/libmagic.rb @@ -0,0 +1,58 @@ +class Libmagic < Formula + desc "Implementation of the file(1) command" + homepage "https://www.darwinsys.com/file/" + url "https://astron.com/pub/file/file-5.46.tar.gz" + sha256 "c9cc77c7c560c543135edc555af609d5619dbef011997e988ce40a3d75d86088" + license all_of: ["BSD-2-Clause-Darwin", "BSD-2-Clause", :public_domain] + + livecheck do + formula "file-formula" + end + + bottle do + sha256 arm64_sequoia: "72bb18819cf63d14cdc3c830d586bd93e542f5cf2cdbbc579bfcd5170017fff1" + sha256 arm64_sonoma: "6c1bf60aeb9742e5c8c6973cbcc6ac970fbed9e255e6bbd479bd2f77513c0b46" + sha256 arm64_ventura: "c619199785eaf8dda4ef65c9451fa7ca0fb5bab4452d108cb3d8669d53bec5fd" + sha256 sonoma: "76b116dbfc458b9c62623df89acb3b220500710823a18b604bd2add76c3ec6f6" + sha256 ventura: "b40e88d1e403b33e3544bac60b4ceda2524ae0ef0127c4c676211b83bffaa04f" + sha256 arm64_linux: "7654c8792fa33aece638f2b8efb56e33a6b86d2aa64c43bd65c39b0651e0e703" + sha256 x86_64_linux: "ad618acdc2587bb3d3e5d0c6022fff1c37c6c91b1c818ade50a026bf79469c73" + end + + depends_on "pkgconf" => :test + uses_from_macos "zlib" + + def install + system "./configure", "--disable-silent-rules", + "--enable-fsect-man5", + "--enable-static", + *std_configure_args + system "make", "install" + (share/"misc/magic").install Dir["magic/Magdir/*"] + + # Don't dupe this system utility + rm bin/"file" + rm man1/"file.1" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + #include + + int main(int argc, char **argv) { + magic_t cookie = magic_open(MAGIC_MIME_TYPE); + assert(cookie != NULL); + assert(magic_load(cookie, NULL) == 0); + // Prints the MIME type of the file referenced by the first argument. + puts(magic_file(cookie, argv[1])); + } + C + flags = shell_output("pkgconf --cflags --libs #{name}").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + cp test_fixtures("test.png"), "test.png" + assert_equal "image/png", shell_output("./test test.png").chomp + end +end diff --git a/Formula/lib/libmapper.rb b/Formula/lib/libmapper.rb new file mode 100644 index 0000000000000..60bcdf7246acb --- /dev/null +++ b/Formula/lib/libmapper.rb @@ -0,0 +1,43 @@ +class Libmapper < Formula + desc "Distributed system for media control mapping" + homepage "http://www.libmapper.org/" + url "https://github.com/libmapper/libmapper/releases/download/2.4.13/libmapper-2.4.13.tar.gz" + sha256 "63ac6dd0ab5d17a9ec16f700665a6593a13667dd9fbc0f06df7f2f26d427defa" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c8d007e6c0d2e7efb0c8a4241a04c66294efeb33e43e1c9d5b92af69d5eb8075" + sha256 cellar: :any, arm64_sonoma: "be189c480f4350519834a307f654bc3dfc0c9581205add371a3c56ba8be7792d" + sha256 cellar: :any, arm64_ventura: "64b6a17e57ccfb107db15abdd59a7bf1bbd1a4f656f9b8301677786c9564f6ff" + sha256 cellar: :any, sonoma: "d840f004b8216a9241755f6661e77fbd883eb80d8821e0cec80b92edd26c354e" + sha256 cellar: :any, ventura: "8da31eb36dda5ba63dbb01111cac4347fb966648cd6820073efea0c1fb3f029c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b230d96250aec983eabd700b21184f730a79313feace8453ebbee379ffec1bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d7fc5bb105d25a71ab4d2010230a93e14c9f2d2b429846c1e3d49b9be969242d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "liblo" + + uses_from_macos "zlib" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include "mapper/mapper.h" + int main() { + printf("%s", mpr_get_version()); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lmapper", "-o", "test" + assert_match version.to_s, shell_output("./test") + end +end diff --git a/Formula/lib/libmarpa.rb b/Formula/lib/libmarpa.rb new file mode 100644 index 0000000000000..8c2ca430e5244 --- /dev/null +++ b/Formula/lib/libmarpa.rb @@ -0,0 +1,54 @@ +class Libmarpa < Formula + desc "Marpa parse engine C library -- STABLE" + homepage "https://jeffreykegler.github.io/Marpa-web-site/libmarpa.html" + url "https://github.com/jeffreykegler/libmarpa/archive/refs/tags/v11.0.13.tar.gz" + sha256 "cb3c7f47d9ee95de967838ea0ecc380ffacfdfd8ec2c3d7cc2a6acaa4cc9597b" + license "MIT" + head "https://github.com/jeffreykegler/libmarpa.git", branch: "tested" + + bottle do + sha256 cellar: :any, arm64_sequoia: "34dbf51117d4ac3e153c94f33b9484b45456bef0acac4bf40b0b65a41c76a935" + sha256 cellar: :any, arm64_sonoma: "fb4bb4ed2f54fe81cafed6f6a768edf2360cd0cf00f9e78be219848e968e5ebd" + sha256 cellar: :any, arm64_ventura: "a355e4c22bf6dbc889cfb04bec4051d6c883007effc98812da80e342872c5021" + sha256 cellar: :any, arm64_monterey: "744cec05eae127e97a33db6d051d3f4d46dbadea13490f08038d774580c184ba" + sha256 cellar: :any, sonoma: "3c91fed9728744bd505e5413ee5207eebef9afd50a0e9e1b194c931280901e24" + sha256 cellar: :any, ventura: "861da7c3426ab3123f50b7c096862e330884ddfac787573ed73c1333e6b12f86" + sha256 cellar: :any, monterey: "fc47bf5541ca2ecf4b1f12551d24cba28d54b80e9862d29c3e017a21379e877d" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad8b523a175cad16e909acbef2ca89e68f1ea457c50e9994c9978f2b94958a7d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b080d6a68a430f6436b88d04cfd25831f3f984c0131b571646adea928092bce8" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "emacs" => :build + depends_on "libtool" => :build + depends_on "texinfo" => :build + depends_on "texlive" => :build + + def install + ENV.deparallelize + inreplace "work/etc/libmarpa.pc.in", "prefix=\".\"", "prefix=\"#{prefix}\"" + inreplace "work/ac/Makefile.am", "git log -n 5", "## git log -n 5" + system "make", "ac_dist" + mkdir "build" do + system "../ac_dist/configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + (lib/"pkgconfig").install "libmarpa.pc" + end + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) + { + Marpa_Config marpa_configuration; + Marpa_Grammar g; + marpa_c_init (&marpa_configuration); + g = marpa_g_new (&marpa_configuration); + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lmarpa", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libmatio.rb b/Formula/lib/libmatio.rb new file mode 100644 index 0000000000000..f9e926134bb6b --- /dev/null +++ b/Formula/lib/libmatio.rb @@ -0,0 +1,92 @@ +class Libmatio < Formula + desc "C library for reading and writing MATLAB MAT files" + homepage "https://matio.sourceforge.net/" + url "https://downloads.sourceforge.net/project/matio/matio/1.5.28/matio-1.5.28.tar.gz" + sha256 "9da698934a21569af058e6348564666f45029e6c2b0878ca0d8f9609bf77b8d8" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "8548b3cb9b21fa982216451647db1a47b4c739312584234cd1985427b8d6b257" + sha256 cellar: :any, arm64_sonoma: "80694bb2600a33e2628fd55db525539d5105d2fea1928cf161881b752d498d88" + sha256 cellar: :any, arm64_ventura: "54cce8262a21cca0d84f505bcc89393d9aa70df7cde6efc1e7732f563c8beee4" + sha256 cellar: :any, sonoma: "8165133fb675edcc6db39d59e8c67bf3ea3b63bf22948d7acc638b3b9759a86b" + sha256 cellar: :any, ventura: "00b4f5bdbec014ea1675de1c8f53b0d206f01bcfd31dbd61390e38ed6577648f" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f3f374faf5812e89410fec72a988afe77fe15c0d655ab2d3463315d5c2932ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f29e5ed508bb8cf1acbe9e69829f7beb0971efb72fcc4cb3a5a9c1b9ad66c2c7" + end + + depends_on "pkgconf" => :test + depends_on "hdf5" + uses_from_macos "zlib" + + # fix pkg-config linkage for hdf5 and zlib + patch :DATA + + def install + args = %W[ + --enable-extended-sparse=yes + --enable-mat73=yes + --with-hdf5=#{Formula["hdf5"].opt_prefix} + ] + args << "--with-zlib=#{Formula["zlib"].opt_prefix}" unless OS.mac? + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + resource "homebrew-test_mat_file" do + url "https://web.uvic.ca/~monahana/eos225/poc_data.mat.sfx" + sha256 "a29df222605476dcfa660597a7805176d7cb6e6c60413a3e487b62b6dbf8e6fe" + end + + testpath.install resource("homebrew-test_mat_file") + (testpath/"mat.c").write <<~C + #include + #include + + size_t dims[2] = {5, 5}; + double data[25] = {0.0, }; + mat_t *mat; + matvar_t *matvar; + + int main(int argc, char **argv) { + if (!(mat = Mat_Open(argv[1], MAT_ACC_RDONLY))) + abort(); + Mat_Close(mat); + + mat = Mat_CreateVer("test_writenan.mat", NULL, MAT_FT_DEFAULT); + if (mat) { + matvar = Mat_VarCreate("foo", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, + dims, data, MAT_F_DONT_COPY_DATA); + Mat_VarWrite(mat, matvar, MAT_COMPRESSION_NONE); + Mat_VarFree(matvar); + Mat_Close(mat); + } else { + abort(); + } + mat = Mat_CreateVer("foo", NULL, MAT_FT_MAT73); + return EXIT_SUCCESS; + } + C + system ENV.cc, "mat.c", "-o", "mat", "-I#{include}", "-L#{lib}", "-lmatio" + system "./mat", "poc_data.mat.sfx" + + refute_includes "-I/usr/include", shell_output("pkgconf --cflags matio") + end +end + +__END__ +diff --git a/matio.pc.in b/matio.pc.in +index 96d9402..139f11e 100644 +--- a/matio.pc.in ++++ b/matio.pc.in +@@ -6,6 +6,5 @@ includedir=@includedir@ + Name: MATIO + Description: MATIO Library + Version: @VERSION@ +-Libs: -L${libdir} -lmatio +-Cflags: -I${includedir} +-Requires.private: @HDF5_REQUIRES_PRIVATE@ @ZLIB_REQUIRES_PRIVATE@ ++Libs: -L${libdir} -lmatio @HDF5_LIBS@ @ZLIB_LIBS@ ++Cflags: -I${includedir} @HDF5_CFLAGS@ @ZLIB_CFLAGS@ diff --git a/Formula/lib/libmatroska.rb b/Formula/lib/libmatroska.rb new file mode 100644 index 0000000000000..303d98eb0fd40 --- /dev/null +++ b/Formula/lib/libmatroska.rb @@ -0,0 +1,52 @@ +class Libmatroska < Formula + desc "Extensible, open standard container format for audio/video" + homepage "https://www.matroska.org/" + url "https://dl.matroska.org/downloads/libmatroska/libmatroska-1.7.1.tar.xz" + sha256 "572a3033b8d93d48a6a858e514abce4b2f7a946fe1f02cbfeca39bfd703018b3" + license "LGPL-2.1-or-later" + head "https://github.com/Matroska-Org/libmatroska.git", branch: "master" + + livecheck do + url "https://dl.matroska.org/downloads/libmatroska/" + regex(/href=.*?libmatroska[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "59abce74d2eef80b0ec6751dd6d9357c2c130d9d8d11dce0ef9d0f47fbe7007a" + sha256 cellar: :any, arm64_sonoma: "297b69d493d6b09441e452745dee037ed4c211642a30ab4acfb3f229423e9995" + sha256 cellar: :any, arm64_ventura: "029766b0222c5d9a72a3cc63410c18a1d6b485243bdb4430f42e515ab24e18dd" + sha256 cellar: :any, arm64_monterey: "7648ded88703290bc998629288b942f2ac26585c9945d1443d14fe454654e306" + sha256 cellar: :any, arm64_big_sur: "bb9b3e6993c88b36acddbce97f6085f6785cd57812bece2b37fb56360054010a" + sha256 cellar: :any, sonoma: "4abfa8d4c378d3d1a635d47c7520590fa33366bc8d2f8d5feb00fbe960d1c5b1" + sha256 cellar: :any, ventura: "7e0cfe0a5bc3503bb309dce7ba7f78a75259daff686a387b9413c7db9580ed77" + sha256 cellar: :any, monterey: "e2282bbaca89473b275731eee79be5a8ac1f5402c9603be4a0545c65b2d929d5" + sha256 cellar: :any, big_sur: "1b3b6df53eb2070d742dec37fcf4f2ebf81728bfe1c64e82ac4a78bb58c80288" + sha256 cellar: :any, catalina: "3a4ca07a150e0719bc8bacedced44c6cec1116e0050095e8c669d37a4d47eb6c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f6f5188ac26a332bf87653ef4627f5ed1220ac05aeed89f616bc5f9e4898fbb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61b54ecbcbef470960678043620106e649fb75f05ba3b26ef6d24aad0476a9fe" + end + + depends_on "cmake" => :build + depends_on "libebml" + + 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 + #include + + int main() { + std::cout << "libmatroska version: " << libmatroska::KaxCodeVersion << std::endl; + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-lmatroska" + assert_match version.to_s, shell_output("./test") + end +end diff --git a/Formula/lib/libmaxminddb.rb b/Formula/lib/libmaxminddb.rb new file mode 100644 index 0000000000000..fe490bb068bb3 --- /dev/null +++ b/Formula/lib/libmaxminddb.rb @@ -0,0 +1,42 @@ +class Libmaxminddb < Formula + desc "C library for the MaxMind DB file format" + homepage "https://github.com/maxmind/libmaxminddb" + url "https://github.com/maxmind/libmaxminddb/releases/download/1.12.2/libmaxminddb-1.12.2.tar.gz" + sha256 "1bfbf8efba3ed6462e04e225906ad5ce5fe958aa3d626a1235b2a2253d600743" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1b13f50a8072072af83d8fe5851dab623f05967b35868ac4bf95435c4b7a423e" + sha256 cellar: :any, arm64_sonoma: "483e40580b6cef8ced628c5c9b072004ae2c7d9f2615473dc62e2b5210d3ec51" + sha256 cellar: :any, arm64_ventura: "4b4c4de2cf912a0e0e764bd02052efc651160b547f40ee573a5bc0d6d95fb070" + sha256 cellar: :any, sonoma: "287f6e846279aba4823828756b8c9a02537fa3ca26f2edd0ed6dfb8b9a43611d" + sha256 cellar: :any, ventura: "5621888987d823a633346238e0044ca73d1a0a07a9a5eae43aa06dffd261475d" + sha256 cellar: :any_skip_relocation, arm64_linux: "288980ac6d2f257040998e48a827e2234c279304e510dba80202259c78727af3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f050b168b6f1ed601acad6218d45bab50d416eb062317614d662a5a63372f5af" + end + + head do + url "https://github.com/maxmind/libmaxminddb.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + system "./bootstrap" if build.head? + + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "check" + system "make", "install" + (share/"examples").install buildpath/"t/maxmind-db/test-data/GeoIP2-City-Test.mmdb" + end + + test do + system bin/"mmdblookup", "-f", "#{share}/examples/GeoIP2-City-Test.mmdb", + "-i", "175.16.199.0" + end +end diff --git a/Formula/lib/libmd.rb b/Formula/lib/libmd.rb new file mode 100644 index 0000000000000..6b95d3c3a8713 --- /dev/null +++ b/Formula/lib/libmd.rb @@ -0,0 +1,58 @@ +class Libmd < Formula + desc "BSD Message Digest library" + homepage "https://www.hadrons.org/software/libmd/" + url "https://libbsd.freedesktop.org/releases/libmd-1.1.0.tar.xz" + sha256 "1bd6aa42275313af3141c7cf2e5b964e8b1fd488025caf2f971f43b00776b332" + license "BSD-3-Clause" + + livecheck do + url "https://libbsd.freedesktop.org/releases/" + regex(/href=.*?libmd[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "bbca49fa49f17de525e710aa6e8ae6cca1da2253e6b9eab21dc655389a5a81db" + sha256 cellar: :any, arm64_sonoma: "98337df7be937bfe745b53b62522cf81160032f945d744d879713a729acc8ab6" + sha256 cellar: :any, arm64_ventura: "02f452242f49ca67f98dff20e769e290db1d99c6d5874c067dafd8be7bfa0a92" + sha256 cellar: :any, arm64_monterey: "fc0d8c70408cacab6b3b1f2567582ab2281fd308d7e2ce704042705dabe40241" + sha256 cellar: :any, arm64_big_sur: "bfd3a5595f509f3ebb3970c0c2a0e3b08569573ca1f406a8047565d26fb652dd" + sha256 cellar: :any, sonoma: "92750c60e0d59b9f5e9fd48f80031c957ae8d2f833dca196f1dfa9a36504cf05" + sha256 cellar: :any, ventura: "e81790c66cb480c6b411fca1e2adfded0e5c20ab12ec02e57e450bdb589539c3" + sha256 cellar: :any, monterey: "36a5e1ef679b99d090814f2fde15e9fb45d73afa26fc5ef75618c4ff85bf48dd" + sha256 cellar: :any, big_sur: "603212a43a289d57d2b541a3775d9a2c036b3813f2ca68640651b659f8dda490" + sha256 cellar: :any_skip_relocation, arm64_linux: "fcba0ca8cba980bd479183e6bb65765ea70990f7dc8c4258b0e1256de1070731" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c07679b6d5141498eaaab977d8501cf12219feb13a7ae040044561d5abece9af" + end + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + int main() { + MD5_CTX ctx; + uint8_t results[MD5_DIGEST_LENGTH]; + char *buf; + buf = "abc"; + int n; + n = strlen(buf); + MD5Init(&ctx); + MD5Update(&ctx, (uint8_t *)buf, n); + MD5Final(results, &ctx); + for (n = 0; n < MD5_DIGEST_LENGTH; n++) + printf("%02x", results[n]); + putchar('\\n'); + return EXIT_SUCCESS; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lmd", "-o", "test" + assert_equal "900150983cd24fb0d6963f7d28e17f72", shell_output("./test").chomp + end +end diff --git a/Formula/lib/libmediainfo.rb b/Formula/lib/libmediainfo.rb new file mode 100644 index 0000000000000..89e5914e20f69 --- /dev/null +++ b/Formula/lib/libmediainfo.rb @@ -0,0 +1,78 @@ +class Libmediainfo < Formula + desc "Shared library for mediainfo" + homepage "https://mediaarea.net/en/MediaInfo" + url "https://mediaarea.net/download/source/libmediainfo/25.04/libmediainfo_25.04.tar.xz" + sha256 "ad45ed7c9db7807aa803845ca88bad9526aa8da883a58127e5390aaa2d81bbb1" + license "BSD-2-Clause" + head "https://github.com/MediaArea/MediaInfoLib.git", branch: "master" + + livecheck do + url "https://mediaarea.net/en/MediaInfo/Download/Source" + regex(/href=.*?libmediainfo[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c7a6a63c51275d03a196ba46853d9f9b643b3619b23ee28cc90f5b37c11fdda9" + sha256 cellar: :any, arm64_sonoma: "a9ee33756021ae82ab8e208efe7e84b9ad73f2a7b991c175349d9e7486a14eee" + sha256 cellar: :any, arm64_ventura: "94d88eb9a3876d97ed93bb0eea13ebcaa4745166f78b74f2a6eb9f1962f9da4b" + sha256 cellar: :any, sonoma: "8c98791b35146b240ef8e9b81a17ca7b884843effb22ddb9730ff2c1423d8a30" + sha256 cellar: :any, ventura: "034550f80eb6d9d7913a3886b92addff34c1f78e7ca781de53bc1724817b5253" + sha256 cellar: :any_skip_relocation, arm64_linux: "6fbff65d4ff52c74656c7052b9d745a28223b81b4eec6502ed7edd70d72a5288" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a1d0d3285be1b862b4d2633939840143e6d6f3320fc0334e62c4b53f56eb28ec" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "libmms" + depends_on "libzen" + + uses_from_macos "curl" + uses_from_macos "zlib" + + # These files used to be distributed as part of the media-info formula + link_overwrite "include/MediaInfo/*" + link_overwrite "include/MediaInfoDLL/*" + link_overwrite "lib/pkgconfig/libmediainfo.pc" + link_overwrite "lib/libmediainfo.*" + + def install + system "cmake", "-S", "Project/CMake", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cc").write <<~CPP + #define _UNICODE + #include + #include + #include + #include + + int main(int argc, char* argv[]) { + std::wstring file_path = std::filesystem::path(argv[1]).wstring(); + + MediaInfoLib::MediaInfo media_info; + size_t open_result = media_info.Open(file_path); + std::wstring result; + + // Get information about audio streams. + size_t audio_streams = media_info.Count_Get(MediaInfoLib::stream_t::Stream_Audio); + for (size_t i = 0; i < audio_streams; ++i) { + result = media_info.Get(MediaInfoLib::stream_t::Stream_Audio, i, L"Format"); + if (result == L"AAC") { + std::cout << "The file contains an audio stream in the m4a (AAC) format." << "\\n"; + media_info.Close(); + return 0; + } + } + + media_info.Close(); + return 1; + } + CPP + system ENV.cxx, "-std=c++17", "test.cc", "-I#{include}", "-L#{lib}", "-lmediainfo", "-o", "test" + system "./test", test_fixtures("test.m4a") + end +end diff --git a/Formula/lib/libmemcached.rb b/Formula/lib/libmemcached.rb new file mode 100644 index 0000000000000..653da4dbac5b5 --- /dev/null +++ b/Formula/lib/libmemcached.rb @@ -0,0 +1,88 @@ +class Libmemcached < Formula + desc "C and C++ client library to the memcached server" + homepage "https://libmemcached.org/" + url "https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz" + sha256 "e22c0bb032fde08f53de9ffbc5a128233041d9f33b5de022c0978a2149885f82" + license "BSD-3-Clause" + revision 2 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "2f6eb0738eb824d203e31cd7243942c7d14d07599ece42c8ddd895077a6bdde1" + sha256 cellar: :any, arm64_sonoma: "652c9f9862e367e62acc5d2b1ddc20d798e6f15c51bccbc69e642acd4df1be0a" + sha256 cellar: :any, arm64_ventura: "0511d48bcc88a6860030c5c6bec5d36818068b43f11d67561f1519ce0dbf6b73" + sha256 cellar: :any, arm64_monterey: "37977639be769bfd5ef97d38f408f57cf84f3607ce881c4d6f2c2d7c70a9b2a4" + sha256 cellar: :any, arm64_big_sur: "2ec7b12e9181c83bbbd45b62ba2a1a0e2958fe2caaa0d94be1da2319831de3be" + sha256 cellar: :any, sonoma: "feedeadf282983ee5a86dff88537f2ba2f470d53d664efbc6a9c6bd393177037" + sha256 cellar: :any, ventura: "2807a08a7c29739bd49450c44ec6f926e7c626b3b2104b1ed160226820a5465b" + sha256 cellar: :any, monterey: "902c0e16ba5ec76696c3f45888ef0c61b840a10b344149242bec812a7c99ee0d" + sha256 cellar: :any, big_sur: "c41f0bfdc440d240f8d0653dcc87270bd315571eab6979ff94d3271f863cb0e7" + sha256 cellar: :any, catalina: "70c6e1e3dd76241e343a4a3b38a62fae5bea6d2e2405739b11473d084f4409a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9e04c066fb48f43434519b8da53433b1659b0c8942cae5115b80393694fc197" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b551d4cc72d953e3018369057901f77a88b1b633661f5acfedcf6bba37385a8b" + end + + depends_on "memcached" => :test + + # https://bugs.launchpad.net/libmemcached/+bug/1245562 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/60f3532/libmemcached/1.0.18.patch" + sha256 "592f10fac729bd2a2b79df26086185d6e08f8667cb40153407c08d4478db89fb" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + #include + + int main(int argc, char **argv) { + char conf[50] = "--SERVER=127.0.0.1:"; + strncat(conf, argv[1], 5); + memcached_st *memc = memcached(conf, strlen(conf)); + assert(memc != NULL); + + // Add a value. + const char *key = "key"; + const char *val = "val"; + assert(memcached_add(memc, key, strlen(key), val, strlen(val), + (time_t)0, (uint32_t)0) == MEMCACHED_SUCCESS); + + // Fetch and check the added value. + size_t return_val_len; + uint32_t return_flags; + memcached_return_t error; + char *return_val = memcached_get(memc, key, strlen(key), + &return_val_len, &return_flags, &error); + assert(return_val != NULL); + assert(error == MEMCACHED_SUCCESS); + assert(return_val_len == strlen(val)); + assert(strncmp(return_val, val, return_val_len) == 0); + assert(return_flags == 0); + free(return_val); + + memcached_free(memc); + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lmemcached", "-o", "test" + + memcached = Formula["memcached"].bin/"memcached" + port = free_port + io = IO.popen("#{memcached} -l 127.0.0.1 -p #{port}") + sleep 1 + system "./test", port + Process.kill "TERM", io.pid + end +end diff --git a/Formula/lib/libmetalink.rb b/Formula/lib/libmetalink.rb new file mode 100644 index 0000000000000..46a19d5d725b9 --- /dev/null +++ b/Formula/lib/libmetalink.rb @@ -0,0 +1,40 @@ +class Libmetalink < Formula + desc "C library to parse Metalink XML files" + homepage "https://launchpad.net/libmetalink/" + url "https://launchpad.net/libmetalink/trunk/libmetalink-0.1.3/+download/libmetalink-0.1.3.tar.xz" + sha256 "86312620c5b64c694b91f9cc355eabbd358fa92195b3e99517504076bf9fe33a" + license "MIT" + + livecheck do + url :stable + regex(%r{
\s*Latest version is libmetalink[._-]v?(\d+(?:\.\d+)+)\s*
}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "4ef91819c19bd453ad990a0cea47a38c4b11f527c6a04e91fbca1743bbe09e78" + sha256 cellar: :any, arm64_sonoma: "2d96d68b47cb11ebd54431713f613b092ef59e60cbb0ebde4752128035e8a3f5" + sha256 cellar: :any, arm64_ventura: "1684da3a02e39ed1a65dc154f06f309119cff3010a45efbbeb1d653081885bc8" + sha256 cellar: :any, arm64_monterey: "4181f8a100f736a945001f57c2ad8f768ad99cdad6789a19d9f21e0cfdd4d3fb" + sha256 cellar: :any, arm64_big_sur: "a5eec14410ca7f2ea831d91c273d6372bc851f930944d207f07f35245b077a91" + sha256 cellar: :any, sonoma: "0d1573fb4f98d9fe1131e0f13e73df5b69c346a740a41b3efc5972cc62763eb4" + sha256 cellar: :any, ventura: "458a2aed06056d0cc3dd1005f93210c9c686ba2515d8550ec0fd6f8348168da6" + sha256 cellar: :any, monterey: "c1a510079e53edc2ebd437321751752e897c253332dc6644ebc6b03cecbf48f2" + sha256 cellar: :any, big_sur: "ec4a4a8f898432cccfa2198c0e877daf2d80c2ab5bc92a7a9134a3dd75529a87" + sha256 cellar: :any, catalina: "a18e6199b4d775a32693aa38b80551d547eb1de58c5d7c788f706276ce296d5e" + sha256 cellar: :any, mojave: "461d42fab1dd15b7df8144ef814a3b589c5be9177728b522ea73e6c52bec660f" + sha256 cellar: :any, high_sierra: "037c9d82da0a2c77031515cc8618b28552c526e559b3d9cebb0f054cd66204e3" + sha256 cellar: :any, sierra: "87711da9c52d75d2d6fed5829a70b0f6561f55fdcf1129266001b6e96bc69b1b" + sha256 cellar: :any, el_capitan: "4ca3f82ac2e2520c677def661168c6ba14ee2b8f0139fbe33cf5be66745244d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "3fdd87e5927d64ecdf222d1bb8527d43de66446ba24e07f54dfb4c37ebd93183" + sha256 cellar: :any_skip_relocation, x86_64_linux: "583e662593473f7310e1c3e3bed77a89a4dc43aed5fd1ce6a12a7260ec69c5f5" + end + + depends_on "pkgconf" => :build + + uses_from_macos "expat" + + def install + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/lib/libmicrohttpd.rb b/Formula/lib/libmicrohttpd.rb new file mode 100644 index 0000000000000..1af3d0fe79971 --- /dev/null +++ b/Formula/lib/libmicrohttpd.rb @@ -0,0 +1,40 @@ +class Libmicrohttpd < Formula + desc "Light HTTP/1.1 server library" + homepage "https://www.gnu.org/software/libmicrohttpd/" + url "https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-1.0.1.tar.gz" + mirror "https://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-1.0.1.tar.gz" + sha256 "a89e09fc9b4de34dde19f4fcb4faaa1ce10299b9908db1132bbfa1de47882b94" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b6b9e3f50d99182aab32438b580f83182cacfa2baa839268ddd83272b6aae0bf" + sha256 cellar: :any, arm64_sonoma: "a78702c9353f012d0a5a90d5f2d547f3a9e86a8ce14958d73d195d207065e285" + sha256 cellar: :any, arm64_ventura: "a99ea7af39d9da744e0cbbea017044f1c2c902776e391cafa567030ecdc11526" + sha256 cellar: :any, arm64_monterey: "c1be769ed563cebdb5d757aea93effa91d5ad0925dabcbad0adde31a82edbce0" + sha256 cellar: :any, sonoma: "3fda597aeaf2624c37ac9786286acf2eefdb9e4178986da41cea3f6ee039f083" + sha256 cellar: :any, ventura: "ef0dceb639806d7098eb56adc2b6dce9025686ba9a1873dae74288761fabafda" + sha256 cellar: :any, monterey: "70acab5386e2689227706740afee9a6afe4ec50ec4267b9386d974177e97b423" + sha256 cellar: :any_skip_relocation, arm64_linux: "d37cc937fe542354d4907f103e6e3cb497e91f9bcc74ec3c26ed1493731adb04" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a3501d408795303c34902781102f7665197d97b1c1f33ed1c4da2a87c42b8fd" + end + + depends_on "gnutls" + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--enable-https", + "--prefix=#{prefix}" + system "make", "install" + (pkgshare/"examples").install Dir.glob("doc/examples/*.c") + end + + test do + cp pkgshare/"examples/simplepost.c", testpath + inreplace "simplepost.c", + "return 0", + "printf(\"daemon %p\", daemon) ; return 0" + system ENV.cc, "-o", "foo", "simplepost.c", "-I#{include}", "-L#{lib}", "-lmicrohttpd" + assert_match(/daemon 0x[0-9a-f]+[1-9a-f]+/, pipe_output("./foo")) + end +end diff --git a/Formula/lib/libmikmod.rb b/Formula/lib/libmikmod.rb new file mode 100644 index 0000000000000..a8ea102231c29 --- /dev/null +++ b/Formula/lib/libmikmod.rb @@ -0,0 +1,35 @@ +class Libmikmod < Formula + desc "Portable sound library" + homepage "https://mikmod.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mikmod/libmikmod/3.3.13/libmikmod-3.3.13.tar.gz" + sha256 "9fc1799f7ea6a95c7c5882de98be85fc7d20ba0a4a6fcacae11c8c6b382bb207" + license "LGPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/libmikmod[._-](\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c884c16332ab7a4e5f0885ac41dc8465cad460a8d6d0b16de20df05517b0bd5e" + sha256 cellar: :any, arm64_sonoma: "9d5c7c973d4608a40a9936b7f6dffc655f2347dc039954db9a1a8a5e55a88000" + sha256 cellar: :any, arm64_ventura: "ff1c9e7e9a3f65e4a087c5acb0e6240be6dffe6fd5fa7b9aa2b3f88968152918" + sha256 cellar: :any, sonoma: "8ba4615681cd65abe541b9f271b9044f0f9973fd3ca87ff4b0f91a11272ab741" + sha256 cellar: :any, ventura: "ebdda328138ed7cf1ce442eb573cbacdac9cdcc4073167137c6a0bb7d7972a4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "84447d6469b55c513e2151b9bc890ec99cc01b964db194ab45c31adbc04abd26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8fbaa53e60245b70b5b025c64da98ed014dd083a5c1ad77259139a51df77c216" + end + + def install + mkdir "macbuild" do + # macOS has CoreAudio, but ALSA, SAM9407 and ULTRA are not supported + system "../configure", "--prefix=#{prefix}", "--disable-alsa", + "--disable-sam9407", "--disable-ultra" + system "make", "install" + end + end + + test do + system bin/"libmikmod-config", "--version" + end +end diff --git a/Formula/lib/libmms.rb b/Formula/lib/libmms.rb new file mode 100644 index 0000000000000..03423e8c92c1b --- /dev/null +++ b/Formula/lib/libmms.rb @@ -0,0 +1,36 @@ +class Libmms < Formula + desc "Library for parsing mms:// and mmsh:// network streams" + homepage "https://sourceforge.net/projects/libmms/" + url "https://downloads.sourceforge.net/project/libmms/libmms/0.6.4/libmms-0.6.4.tar.gz" + sha256 "3c05e05aebcbfcc044d9e8c2d4646cd8359be39a3f0ba8ce4e72a9094bee704f" + license "LGPL-2.1-or-later" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "3bb78466780c6a9b24cf16bb0c333e5e62e8aca7b7f27a1175dcce96d369dd92" + sha256 cellar: :any, arm64_sonoma: "256fd337db7087fc76bbd4b119df0621377c33b231eb11e609680955b65b19dc" + sha256 cellar: :any, arm64_ventura: "c341b6abc297d20d408019a94893e6f9bb2859c34d3e100926bac2550a2d41b0" + sha256 cellar: :any, arm64_monterey: "cc895b39e7d44f9ddf9f09319b35a89e093e345dc28ee6f786529012a4ab86e2" + sha256 cellar: :any, arm64_big_sur: "23e8d5a9591a26c8f167f346cfd2c789f1241458338eb4ce5f90e9c440aab7f0" + sha256 cellar: :any, sonoma: "311410a29d2c125854503091ab13680dee5abd4420e6b3dd26a595e8b07b3456" + sha256 cellar: :any, ventura: "d838b0cc94af92dba3197e2d55658eeb6758c04e089fe3eea9ace446b465b2b8" + sha256 cellar: :any, monterey: "83b2b74920729e81a9225065aaf75949add189c2ee5557d2cab410d45965d501" + sha256 cellar: :any, big_sur: "49439ac923403c34c9fb042ed167a8830d424cd113303d66ed2d70f7aeb23840" + sha256 cellar: :any, catalina: "15016ca7557449405339f310e6feeccbc04094702fcc7d4be53909fc738b05f4" + sha256 cellar: :any, mojave: "4ac527e54af063a3fa760b1e4d43b56dd51ade89cbb971ac9bea9dd3500dfc70" + sha256 cellar: :any, high_sierra: "adc24aaa1656c02f41b20b4453f6a2deda8f3597c919eed1ae8befb732fc920f" + sha256 cellar: :any, sierra: "5319927f799dd20effbfc9f8bb90ebc844b39852c433bf434ab6b36c11c36417" + sha256 cellar: :any, el_capitan: "61c4dd24598198386342dd9c700e218b6b83c82627efc781daa89acfaca96066" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed7a66b304d548c1426e5b0fa507a7cd3f06923aa13d8d14876b9e94e81146ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5bf0654cdf09b4ca5c749e75d8920ff2eddee195e31a468c64bee07f74571b29" + end + + depends_on "pkgconf" => :build + depends_on "glib" + + def install + ENV.append "LDFLAGS", "-liconv" if OS.mac? + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/lib/libmng.rb b/Formula/lib/libmng.rb new file mode 100644 index 0000000000000..29fee4f5fd0f5 --- /dev/null +++ b/Formula/lib/libmng.rb @@ -0,0 +1,60 @@ +class Libmng < Formula + desc "MNG/JNG reference library" + homepage "https://sourceforge.net/projects/libmng/" + url "https://downloads.sourceforge.net/project/libmng/libmng-devel/2.0.3/libmng-2.0.3.tar.gz" + sha256 "cf112a1fb02f5b1c0fce5cab11ea8243852c139e669c44014125874b14b7dfaa" + license "Zlib" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "b689a6894b260bf093409615d0057769421cda51c8f4a7b59f06d692c6000104" + sha256 cellar: :any, arm64_sonoma: "6d30bcfb0460246fd86bd7f59dcf8b52b1e1fb3533ff8ff252a7cb23091ed9a9" + sha256 cellar: :any, arm64_ventura: "746b8bbf3aa5373c6545ce90fca5e84af114ecfce0f2b0e35fd7ec4c9853b15a" + sha256 cellar: :any, arm64_monterey: "554dd35c3a73f040a23f212cbc64c0b9214b4cc4bfb9031341a71b695d64a4ec" + sha256 cellar: :any, arm64_big_sur: "f48583469a9c65f5f9733d43e2bbea2d004228d45ff0b7cdd101b4c44f05dfc5" + sha256 cellar: :any, sonoma: "17a8b7fffb5d320e5f0d6535aaf5d25ddde6da85bdaf5b4d260f0703a087a2e0" + sha256 cellar: :any, ventura: "68e6c1de7f5abe3668f229a99bde8ec9425d9f9136275c8218bf58b6839dff63" + sha256 cellar: :any, monterey: "6646b4ceca926b35750ef1abcfb15744ca286698f86b3c7407f8b5b9dfafa06a" + sha256 cellar: :any, big_sur: "a0cf8d4fb509d251ea7a559c1a5814466bd20fef027646c8cf1715ca85d5beea" + sha256 cellar: :any_skip_relocation, arm64_linux: "c552c0bec65776496b75f11bda010df689dba3ff7f00271113eb3a4e85941fdb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10b82f077fcb7b44e8183c31aa73a5b6df139bcbba9becfd44222f8d29e0ceeb" + end + + depends_on "jpeg-turbo" + depends_on "little-cms2" + + uses_from_macos "zlib" + + resource "sample" do + url "https://telparia.com/fileFormatSamples/image/mng/abydos.mng" + sha256 "4819310da1bbee591957185f55983798a0f8631c32c72b6029213c67071caf8d" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + + # Keep an example for test purposes, but fix header location to use system-level includes + inreplace "contrib/gcc/mngtree/mngtree.c", "\"../../../libmng.h\"", "" + pkgshare.install "contrib/gcc/mngtree/mngtree.c" + end + + test do + system ENV.cc, pkgshare/"mngtree.c", "-DMNG_USE_SO", + "-I#{Formula["jpeg-turbo"].opt_include}", + "-I#{include}", "-L#{lib}", "-lmng", "-o", "mngtree" + + resource("sample").stage do + output = shell_output("#{testpath}/mngtree abydos.mng") + assert_match "Starting dump of abydos.mng.", output + assert_match "Done.", output + end + end +end diff --git a/Formula/lib/libmnl.rb b/Formula/lib/libmnl.rb new file mode 100644 index 0000000000000..59c8e4eb705c5 --- /dev/null +++ b/Formula/lib/libmnl.rb @@ -0,0 +1,48 @@ +class Libmnl < Formula + desc "Minimalistic user-space library oriented to Netlink developers" + homepage "https://www.netfilter.org/projects/libmnl" + url "https://www.netfilter.org/projects/libmnl/files/libmnl-1.0.5.tar.bz2" + sha256 "274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525" + license "LGPL-2.1-or-later" + + livecheck do + url "https://www.netfilter.org/projects/libmnl/downloads.html" + regex(/href=.*?libmnl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "a2f88b9fc807bcdbc77da6579b9937d9c993a637187f1b98c85b82ef6d2f5c98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7dc8eaa75b820802be23b7ba7a95e3fe7b4788b0ec8f2d1f1f8180dea1a7daa4" + end + + depends_on :linux + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + #include + #include + + int main(int argc, char *argv[]) + { + struct mnl_socket *nl; + char buf[MNL_SOCKET_BUFFER_SIZE]; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lmnl", "-o", "test" + end +end diff --git a/Formula/lib/libmobi.rb b/Formula/lib/libmobi.rb new file mode 100644 index 0000000000000..b9e1020795c8d --- /dev/null +++ b/Formula/lib/libmobi.rb @@ -0,0 +1,49 @@ +class Libmobi < Formula + desc "C library for handling Kindle (MOBI) formats of ebook documents" + homepage "https://github.com/bfabiszewski/libmobi" + url "https://github.com/bfabiszewski/libmobi/releases/download/v0.12/libmobi-0.12.tar.gz" + sha256 "9a6fb2c56b916f8fa8b15e0c71008d908109508c944ea1d297881d4e277bf7e7" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "208651021ee3e089ea2c3665b2f94f9acc0ad7401205f9177d82381f2da261b5" + sha256 cellar: :any, arm64_sonoma: "d1fe8e0413649a0a838d650e614ef07010aa121e1ab3a2b360d8ba6da1124a77" + sha256 cellar: :any, arm64_ventura: "1f4ea76703406a4f5453ac1767100a8198d6bf14782c1a6a862fcb3e2dd5d908" + sha256 cellar: :any, arm64_monterey: "4745216331bec2106dad3b68997ff46888b15ca74a19f4e6aafc510ed16daa26" + sha256 cellar: :any, sonoma: "d510c86ba6f58c1835f3b4721986058711d2db5d94c9d6c9afc1d08f6f7a5316" + sha256 cellar: :any, ventura: "5182d5625306772b104ee2fa38105e399c82bc33b25c01934f5722bfefddd177" + sha256 cellar: :any, monterey: "ac43b774943fed966a0698c82cf05ec9bd8f020380ac12810cb60613d7d8923b" + sha256 cellar: :any_skip_relocation, arm64_linux: "633df7f3e0d7c1287ea87f79b6ae22f088a9f87fafb9ad825f56e619ba72b8ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "380132da0b9faf43d841d6eeaeafa37cfbf1381d2a66549a105c44808022fcc8" + end + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + MOBIData *m = mobi_init(); + if (m == NULL) { + return 1; + } + mobi_free(m); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-lmobi", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libmodbus.rb b/Formula/lib/libmodbus.rb new file mode 100644 index 0000000000000..785245c21ca7c --- /dev/null +++ b/Formula/lib/libmodbus.rb @@ -0,0 +1,55 @@ +class Libmodbus < Formula + desc "Portable modbus library" + homepage "https://libmodbus.org/" + url "https://github.com/stephane/libmodbus/archive/refs/tags/v3.1.11.tar.gz" + sha256 "8a750452ef86a53de6cec6fbca67bd5be08d0a1e87278a422fbce3003fd42d99" + license "LGPL-2.1-or-later" + head "https://github.com/stephane/libmodbus.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2bb927ed4609da5405a486b49ef592e66c34d3a4af2c676149a77a0c2a0e05fe" + sha256 cellar: :any, arm64_sonoma: "6609f407786750265664ef7c244df8e4ba004c7dea7c9d101c72d35815072a1c" + sha256 cellar: :any, arm64_ventura: "37c9a7ede2185ce78de56d89fb0f18ff44cd3f7c3d172081045d7df5b3ba5de3" + sha256 cellar: :any, sonoma: "465170cd461f3cc3b33f1840a3a0d95a0897557d2b266c706f899853adca4be0" + sha256 cellar: :any, ventura: "8a3de10bb6cd6380eed6477580643b957f9a75bd9e6dd8da40380eebd80f94e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc6f0b3c9bf53b24831a826ba42869840425900a01c5f62fff0fb3be2246a0ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d420d004141628626487faaf267f93d2cfb99b1971dbaa20b9848db23ce798e" + 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/"hellomodbus.c").write <<~C + #include + #include + int main() { + modbus_t *mb; + uint16_t tab_reg[32]; + + mb = 0; + mb = modbus_new_tcp("127.0.0.1", 1502); + modbus_connect(mb); + + /* Read 5 registers from the address 0 */ + modbus_read_registers(mb, 0, 5, tab_reg); + + void *p = mb; + modbus_close(mb); + modbus_free(mb); + mb = 0; + return (p == 0); + } + C + system ENV.cc, "hellomodbus.c", "-o", "foo", "-L#{lib}", "-lmodbus", + "-I#{include}/libmodbus", "-I#{include}/modbus" + system "./foo" + end +end diff --git a/Formula/lib/libmodplug.rb b/Formula/lib/libmodplug.rb new file mode 100644 index 0000000000000..288472b6e56d6 --- /dev/null +++ b/Formula/lib/libmodplug.rb @@ -0,0 +1,95 @@ +class Libmodplug < Formula + desc "Library from the Modplug-XMMS project" + homepage "https://modplug-xmms.sourceforge.net/" + url "https://downloads.sourceforge.net/project/modplug-xmms/libmodplug/0.8.9.0/libmodplug-0.8.9.0.tar.gz" + sha256 "457ca5a6c179656d66c01505c0d95fafaead4329b9dbaa0f997d00a3508ad9de" + license :public_domain + + livecheck do + url :stable + regex(%r{url=.*?/libmodplug[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "586ee0ddb6205b40860132f0f8dfdb74fdef762fb32ec0e9f2d3147db7229c63" + sha256 cellar: :any, arm64_sonoma: "8e1f55e5d02306627f7aba2c819f4432c3d96ef049da3e51a0163827558c0003" + sha256 cellar: :any, arm64_ventura: "169759bd85dac1257b3abc1f9690893711c64db8d8341278ecf10c155c4e8652" + sha256 cellar: :any, arm64_monterey: "44f9536bdd1d88445e94cfef5c13a40ee07a965db04804824c438746f3d3db00" + sha256 cellar: :any, arm64_big_sur: "8f59c19b920e04fd0b2b71cab151e62358e1c8ff00bea83b3e40081f941c13d3" + sha256 cellar: :any, sonoma: "119d6db16f150a7398bd8209a230a13d47e0ab693b11c7671abf55be08e20f4d" + sha256 cellar: :any, ventura: "c5d06183c6979cfeca5ad1b02ae6303f4cf0949b064847f6d33529567fa9a4ac" + sha256 cellar: :any, monterey: "f773d6e23b5a2b84304c91c740b050c7364e3102714d4b1ccc3985e64f97d98e" + sha256 cellar: :any, big_sur: "2411526634753034b19df000bf941383eac622926cc50c31ff80dc5a484c7abe" + sha256 cellar: :any, catalina: "cd9af3b0e9c72274ac8a63934d0af44edb08cfbcfecc30772b862be74f68de9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "0209868506e112abe52575b8604d3aa1ac4f804ef2fec00937ca15711a24ce7c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d166a7f4a737de154ada685c9af4f82d22238a1b6cb323ce49a4496a3e9b2911" + end + + resource "testmod" do + # Most favourited song on modarchive: + # https://modarchive.org/index.php?request=view_by_moduleid&query=60395 + url "https://api.modarchive.org/downloads.php?moduleid=60395#2ND_PM.S3M" + sha256 "f80735b77123cc7e02c4dad6ce8197bfefcb8748b164a66ffecd206cc4b63d97" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--enable-static", + "--prefix=#{prefix}" + + system "make", "install" + end + + test do + # First a basic test just that we can link on the library + # and call an initialization method. + (testpath/"test_null.cpp").write <<~CPP + #include "libmodplug/modplug.h" + int main() { + ModPlugFile* f = ModPlug_Load((void*)0, 0); + if (!f) { + // Expecting a null pointer, as no data supplied. + return 0; + } else { + return -1; + } + } + CPP + system ENV.cc, "test_null.cpp", "-L#{lib}", "-lmodplug", "-o", "test_null" + system "./test_null" + + # Second, acquire an actual music file from a popular internet + # source and attempt to parse it. + resource("testmod").stage testpath + (testpath/"test_mod.cpp").write <<~CPP + #include "libmodplug/modplug.h" + #include + #include + + int main() { + std::ifstream in("2ND_PM.S3M"); + std::stringstream buffer; + buffer << in.rdbuf(); + int length = buffer.tellp(); + ModPlugFile* f = ModPlug_Load(buffer.str().c_str(), length); + if (f) { + // Expecting success + return 0; + } else { + return -1; + } + } + CPP + system ENV.cxx, "test_mod.cpp", "-L#{lib}", "-lmodplug", "-o", "test_mod" + system "./test_mod" + end +end diff --git a/Formula/lib/libmonome.rb b/Formula/lib/libmonome.rb new file mode 100644 index 0000000000000..2713b6ae7f52b --- /dev/null +++ b/Formula/lib/libmonome.rb @@ -0,0 +1,37 @@ +class Libmonome < Formula + desc "Library for easy interaction with monome devices" + homepage "https://monome.org/" + url "https://github.com/monome/libmonome/archive/refs/tags/v1.4.8.tar.gz" + sha256 "b98bce2a99481fc3aa8a29fc60310180d24473fce86f5edb55ddfe84d9e9dd69" + license "ISC" + head "https://github.com/monome/libmonome.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "50321cfdaca220bccec61c6ec8e142784c3f02879656218b88eaeb660f2b8dba" + sha256 cellar: :any, arm64_sonoma: "c219343f215edf79464c897022ae2fe87c8e5c075279576330ddef92ef6d7274" + sha256 cellar: :any, arm64_ventura: "f1a92fb448fd91324d64ac05c4b7ee756d3bd24e2306a6e4f3f59633f5eec3e0" + sha256 cellar: :any, sonoma: "034c7bbcda99a0adc3fdc38ca23f8692d1199291cacbb35a2bcee1c3ad79b2a1" + sha256 cellar: :any, ventura: "ed75041e84f7adc92cdd481496634297651dd1974ba9289cbfcedc14d3554507" + sha256 cellar: :any_skip_relocation, arm64_linux: "6689ecfc0c1164b27ca775cf5748c5ba6e44c484a3026b7d02ac7be08703f254" + sha256 cellar: :any_skip_relocation, x86_64_linux: "40da298d04ff272067c8f88b2b71e939eb0a7e98387a05f976c6d75d4e0c5ae6" + end + + depends_on "liblo" + + uses_from_macos "python" => :build + + def install + # Workaround for arm64 linux, issue ref: https://github.com/monome/libmonome/issues/82 + ENV.append_to_cflags "-fsigned-char" if OS.linux? && Hardware::CPU.arm? + + system "python3", "./waf", "configure", "--prefix=#{prefix}" + system "python3", "./waf", "build" + system "python3", "./waf", "install" + + pkgshare.install Dir["examples/*.c"] + end + + test do + assert_match "failed to open", shell_output("#{bin}/monomeserial", 1) + end +end diff --git a/Formula/lib/libmowgli.rb b/Formula/lib/libmowgli.rb new file mode 100644 index 0000000000000..e43e5c7745681 --- /dev/null +++ b/Formula/lib/libmowgli.rb @@ -0,0 +1,53 @@ +class Libmowgli < Formula + desc "Core framework for Atheme applications" + homepage "https://github.com/atheme/libmowgli-2" + url "https://github.com/atheme/libmowgli-2/archive/refs/tags/v2.1.3.tar.gz" + sha256 "b7faab2fb9f46366a52b51443054a2ed4ecdd04774c65754bf807c5e9bdda477" + license "ISC" + revision 1 + head "https://github.com/atheme/libmowgli-2.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "00f3b1d8ae9a7210417aa4b09f041dc3e04e1a60097724fc28ebf5b1fb00ab89" + sha256 cellar: :any, arm64_sonoma: "7a949575c3803dbfd27a4ad549c6f24c67f2159b9dfd73d83b5eb9ffd872561c" + sha256 cellar: :any, arm64_ventura: "19a8d7aa0f5c72bf5c7e459c1d6924fc7f5ab479f878c8129de5a3693dae3b8d" + sha256 cellar: :any, arm64_monterey: "476e3d8c4864929ada3e6a5af324c768cb18719e9b2200e7ceeb7fe8711d9a2f" + sha256 cellar: :any, arm64_big_sur: "706a51d84a1e84e3046231012cce4be4eb78288901bd8f07d274161c187a831c" + sha256 cellar: :any, sonoma: "f8c15ed2d394847405537f8664131626ab22d738cc123658ebe7fabcd1842339" + sha256 cellar: :any, ventura: "76457d788e5c2f85dbc452a0232bb38ff256f4136d188983ac8b9af87be78019" + sha256 cellar: :any, monterey: "62bff6552997f1240e9568627847e46c1f55371f2b383d005a8a62975ed2a029" + sha256 cellar: :any, big_sur: "f64462da9e3debd990315e0c16ecfcffae50fcdddf44538f125ae9dbd4c98fdc" + sha256 cellar: :any, catalina: "5ade175e55ef972a810e63c5508941679fb65a8c8583d7844676ce68e6c57dd1" + sha256 cellar: :any_skip_relocation, arm64_linux: "30beecb54f1b874ff6f34866b679a96a2aacb1e2e0d10afc51bc72a278444978" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6251f4bbfcc34a629e644b110d247a21e5ca26464ec056924f718a9ca46a5b71" + end + + depends_on "openssl@3" + + def install + system "./configure", "--prefix=#{prefix}", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}" + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + char buf[65535]; + mowgli_random_t *r = mowgli_random_create(); + mowgli_formatter_format(buf, 65535, "%1! %2 %3 %4.",\ + "sdpb", "Hello World", mowgli_random_int(r),\ + 0xDEADBEEF, TRUE); + puts(buf); + mowgli_object_unref(r); + return EXIT_SUCCESS; + } + C + system ENV.cc, "-I#{include}/libmowgli-2", "-o", "test", "test.c", "-L#{lib}", "-lmowgli-2" + system "./test" + end +end diff --git a/Formula/lib/libmp3splt.rb b/Formula/lib/libmp3splt.rb new file mode 100644 index 0000000000000..12f2ac88b3d8f --- /dev/null +++ b/Formula/lib/libmp3splt.rb @@ -0,0 +1,41 @@ +class Libmp3splt < Formula + desc "Utility library to split mp3, ogg, and FLAC files" + homepage "https://mp3splt.sourceforge.net/mp3splt_page/home.php" + url "https://downloads.sourceforge.net/project/mp3splt/libmp3splt/0.9.2/libmp3splt-0.9.2.tar.gz" + sha256 "30eed64fce58cb379b7cc6a0d8e545579cb99d0f0f31eb00b9acc8aaa1b035dc" + license "GPL-2.0-only" + revision 7 + + # We check the "libmp3splt" directory page since versions aren't present in + # the RSS feed as of writing. + livecheck do + url "https://sourceforge.net/projects/mp3splt/files/libmp3splt/" + regex(%r{href=.*?/v?(\d+(?:\.\d+)+[a-z]?)/?["' >]}i) + strategy :page_match + end + + bottle do + sha256 arm64_sequoia: "7ab04ee463178da4c4319a3e795ad0f18d09aff98450a5f8eacdf206fdb059ff" + sha256 arm64_sonoma: "8ac44f180edcd601f4fd078a49742f91387466489c3336d534772702ca8d3e61" + sha256 arm64_ventura: "2d729d944e28d5d3c651b5be9e7b4aed770fdd51894175b82318414d12fd1850" + sha256 sonoma: "b5f348f71b30146bc33730f43b14e5129cb27aa4c9a1bfb6a39c92ac2bbf5ca5" + sha256 ventura: "dbacb2e3b18de32c6398f7123f0eb826ad56f1969ac45b027cfd3030544fe8a8" + sha256 arm64_linux: "958fa980c431ae3b8c2dc65956c24bf0c0baef98ac9a7cc4b2cd771a8336c5dd" + sha256 x86_64_linux: "b92f917113de228d2bac95e4672b4741c8a5256f55834b6b498bc0697e5e4a3c" + end + + depends_on "pkgconf" => :build + depends_on "flac" + depends_on "gettext" + depends_on "libid3tag" + depends_on "libogg" + depends_on "libtool" + depends_on "libvorbis" + depends_on "mad" + depends_on "pcre" + + def install + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/lib/libmpc.rb b/Formula/lib/libmpc.rb new file mode 100644 index 0000000000000..3bdf5b0c9267d --- /dev/null +++ b/Formula/lib/libmpc.rb @@ -0,0 +1,65 @@ +class Libmpc < Formula + desc "C library for the arithmetic of high precision complex numbers" + homepage "https://www.multiprecision.org/" + url "https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz" + mirror "https://ftpmirror.gnu.org/mpc/mpc-1.3.1.tar.gz" + sha256 "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5c8cdc4d460525025f69157ea5187c4119da8bffab33e7923dc374c011c9cdac" + sha256 cellar: :any, arm64_sonoma: "909895bde6818f0adee6cf16f23836752ae214515da2e9e3beb0f66fbb63c490" + sha256 cellar: :any, arm64_ventura: "da4ff781bc469c82af17f98f0bdbf20932e222d0520ab784cd1b322b789ad7a5" + sha256 cellar: :any, arm64_monterey: "dd3994160b3625b1f14e34abf632b90bf49e71db1cc85c12e9ab529d4cae2a87" + sha256 cellar: :any, arm64_big_sur: "43bbe994c7bbb40f7172ef7a750bc6d2687275a76a25f67fc2d53ef00728d912" + sha256 cellar: :any, sequoia: "1c63e3a084ca2b4e818ccca9ea563f54a12229679c8bfde43d4cb5cbcf0020af" + sha256 cellar: :any, sonoma: "504c66775a10810afcaff53506651eafdb6e9c74dd86881e3b9f7c438fcd83d6" + sha256 cellar: :any, ventura: "aa4ddb0e50ace93746e6af2e6185493698b501e9359cf73ce41cfbb70369db09" + sha256 cellar: :any, monterey: "c32f2c3fe7ab06e308e6fa74874e1d4d92ff6eb3598da6e0f8e6fa7a333350f5" + sha256 cellar: :any, big_sur: "47b50c3df6a35ea3c876397eac4a7dc157b5f4109247671a16599a9a41b9c035" + sha256 cellar: :any_skip_relocation, arm64_linux: "95086731276eec60b5ec29b5f07214b6fdb5d1327c7652c12cf68a99b731b760" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f6542ae5bcf643ca0c980c7000cde1585922e76be080b3cc3422dac0d4a50904" + end + + head do + url "https://gitlab.inria.fr/mpc/mpc.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "gmp" + depends_on "mpfr" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args, + "--with-gmp=#{Formula["gmp"].opt_prefix}", + "--with-mpfr=#{Formula["mpfr"].opt_prefix}" + system "make" + system "make", "check" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + mpc_t x; + mpc_init2 (x, 256); + mpc_set_d_d (x, 1., INFINITY, MPC_RNDNN); + mpc_tanh (x, x, MPC_RNDNN); + assert (mpfr_nan_p (mpc_realref (x)) && mpfr_nan_p (mpc_imagref (x))); + mpc_clear (x); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-L#{Formula["mpfr"].opt_lib}", + "-L#{Formula["gmp"].opt_lib}", "-lmpc", "-lmpfr", + "-lgmp", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libmpd.rb b/Formula/lib/libmpd.rb new file mode 100644 index 0000000000000..ed68c3e06b891 --- /dev/null +++ b/Formula/lib/libmpd.rb @@ -0,0 +1,77 @@ +class Libmpd < Formula + desc "Higher level access to MPD functions" + homepage "https://gmpc.fandom.com/wiki/Gnome_Music_Player_Client" + url "https://www.musicpd.org/download/libmpd/11.8.17/libmpd-11.8.17.tar.gz" + sha256 "fe20326b0d10641f71c4673fae637bf9222a96e1712f71f170fca2fc34bf7a83" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://www.musicpd.org/download/libmpd/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "18186d5954681b7a246a5349ec9ba4a236266e8532850b8e5a6f06692981669e" + sha256 cellar: :any, arm64_sonoma: "270b80aef8af0403f00a17400e8c18bc79ccbfd30976e1e981338a93c6f2d9c6" + sha256 cellar: :any, arm64_ventura: "f248cd5ff2ab17fecdc881df0841de6201d9526b027a6708aa379c3a1d78d9ab" + sha256 cellar: :any, arm64_monterey: "3a98a327553640a863093b4e134781ad8b6a86e706661e6cd52508143d34fd70" + sha256 cellar: :any, arm64_big_sur: "782e0fccf8dbe605e9fd7740427335d5b7c2340f7506402c17b747560dea4852" + sha256 cellar: :any, sonoma: "099b9fe12ebff36bef64632d682323c55db4c2be3e896b43a87e249d35c23ce2" + sha256 cellar: :any, ventura: "e71222f9e53c08a8ce4ddd62b6bc55411322b1117c301bd7ec8101a7976151e1" + sha256 cellar: :any, monterey: "04542130132d6ba8bbb116d6fc16af7b7b96aaf7d7e3e76ff06a9d71c41aebdd" + sha256 cellar: :any, big_sur: "fcc637b68c3896a2eb9a99aecea990941a8f7fb6ccfcd89c16662d01d5616993" + sha256 cellar: :any, catalina: "a89b23f581da1a00a6c9cd077c854bb6b7f1c818664630cec1ed8f0b6f543a32" + sha256 cellar: :any, mojave: "9a7f7829ec1d79442d3dade12c338b42a0f248b35aa25475b512f0b70171d8db" + sha256 cellar: :any, high_sierra: "2d8f1fae6ecc3ab4b440531ae13a2db5bc82282a89f2670a986cc6136da16068" + sha256 cellar: :any, sierra: "8518a3880db71a27a414e8e2ae020afec29afbb777694389cd57d983ec1904a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c113bbd470bb857807d840af2692dc933613f308b5e1a854b308da5b3a4b070" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4035c1bec6e7cdd64abca505361da64a9de52e82dcd5da6bd84f2902fbab6157" + end + + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "glib" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-int-conversion" if DevelopmentTools.clang_build_version >= 1500 + + ENV.append "CFLAGS", "-DHAVE_STRNDUP" 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 + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + MpdObj *mpd; + char *hostname = "localhost"; + int port = 6600; + + mpd = mpd_new(hostname, port, NULL); + printf("MPD object created"); + + mpd_free(mpd); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-I#{include}/libmpd-1.0", "-L#{lib}", "-lmpd" + system "./test" + end +end diff --git a/Formula/lib/libmpdclient.rb b/Formula/lib/libmpdclient.rb new file mode 100644 index 0000000000000..712faa15550d5 --- /dev/null +++ b/Formula/lib/libmpdclient.rb @@ -0,0 +1,46 @@ +class Libmpdclient < Formula + desc "Library for MPD in the C, C++, and Objective-C languages" + homepage "https://www.musicpd.org/libs/libmpdclient/" + url "https://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.22.tar.xz" + sha256 "eac15b82b5ba5ed0648af580221eb74657394f7fe768e966d9e9ebb27435429f" + license "BSD-3-Clause" + head "https://github.com/MusicPlayerDaemon/libmpdclient.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?libmpdclient[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "16973541660ff3601f6ea87f1553bac63e63cef2cce49a83d078293b0c66d56f" + sha256 cellar: :any, arm64_sonoma: "3920adaed9ddbc3361b4f47aa15bd3f3fca316238b22b52ba22df4402f1482f9" + sha256 cellar: :any, arm64_ventura: "23c5829dd8a2703925dbb711266cc62892d436bdc05fa2cbbf1dc280fd3e73f5" + sha256 cellar: :any, arm64_monterey: "076cb8bf82d2ff6a0ed354a09a649526d02fe7c43bab9febb3ec1ad20b6a5281" + sha256 cellar: :any, sonoma: "f659f9cc27081184571adaec90ab1ec3e58c6e2f3007ef2df205f4a0d58603c5" + sha256 cellar: :any, ventura: "a6888a6f14f59dcfbcd73cf9c9ee915d68480fa03bc8c296896ea03e3214bb53" + sha256 cellar: :any, monterey: "d634d83c7d8e29e6d68ee52000160d86bbd83dec4b59084844dd838e77ae9139" + sha256 cellar: :any_skip_relocation, arm64_linux: "701d45480ae1fd5bcbe909509ec75f7ee642ec514c4f5ed3498b5def651f615b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3e56f369d58e7d23eafe3d6d8dcfa0f5eca8daa9c732582f4938ff99abad183" + 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() { + mpd_connection_new(NULL, 0, 30000); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-L#{lib}", "-lmpdclient", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libmpeg2.rb b/Formula/lib/libmpeg2.rb new file mode 100644 index 0000000000000..30882da8d520e --- /dev/null +++ b/Formula/lib/libmpeg2.rb @@ -0,0 +1,47 @@ +class Libmpeg2 < Formula + desc "Library to decode mpeg-2 and mpeg-1 video streams" + homepage "https://libmpeg2.sourceforge.io/" + url "https://libmpeg2.sourceforge.io/files/libmpeg2-0.5.1.tar.gz" + sha256 "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "https://libmpeg2.sourceforge.io/downloads.html" + regex(/href=.*?libmpeg2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2db4b583e04a71b456045c2bf9f7d08f1ee332e8305c0944d4b101c83ab71990" + sha256 cellar: :any, arm64_sonoma: "0174a78b3200ac177017167c6dd73a31202da4a819c4a282b424e36a346b2496" + sha256 cellar: :any, arm64_ventura: "a5522ab17783c821344f34583781d561c6c579ab60c28483fb934e66fddfc93f" + sha256 cellar: :any, arm64_monterey: "aa96e119c487436a7b9e36820137e17fa84007f174c8476e70f74d6a41972036" + sha256 cellar: :any, arm64_big_sur: "53f205eb140836cb0593cb34318a62a9381d950fcdf7c949e861e1024dbf352f" + sha256 cellar: :any, sonoma: "ed0fe49e971640418eb765c153ab7c846dc6e93911140534b0a0a0f7e026b4cd" + sha256 cellar: :any, ventura: "013738fd28fb6f8a52d1a9346c24cee9b4a2e09e0260c3b4f9917146a49de3fa" + sha256 cellar: :any, monterey: "fb3ad194c995a22c85768c3032a0d04b195a2e3b4684b1256f6498581d87bc5a" + sha256 cellar: :any, big_sur: "81fede3e5bf51daaed591f1eab2ecb777b092f5c99386b2a751618b059c7d2f1" + sha256 cellar: :any, catalina: "c25d746458652a4e7f87e67478b1451924da48a82d98a8eae83e36cceb336428" + sha256 cellar: :any_skip_relocation, arm64_linux: "2fabce057d7c15bb18b7320230edb8a748206664185c4c0a00e174615ec0094f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04a7bbf5129d11b695a6a57eff6091f6519e3b4554dc77f84bca351a4f17acaa" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "sdl12-compat" + + def install + # Otherwise compilation fails in clang with `duplicate symbol ___sputc` + ENV.append_to_cflags "-std=gnu89" + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + pkgshare.install "doc/sample1.c" + end + + test do + system ENV.cc, "-I#{include}/mpeg2dec", pkgshare/"sample1.c", "-L#{lib}", "-lmpeg2" + end +end diff --git a/Formula/lib/libmps.rb b/Formula/lib/libmps.rb new file mode 100755 index 0000000000000..ad58479169c36 --- /dev/null +++ b/Formula/lib/libmps.rb @@ -0,0 +1,63 @@ +class Libmps < Formula + desc "Memory Pool System" + homepage "https://www.ravenbrook.com/project/mps/" + url "https://github.com/Ravenbrook/mps/archive/refs/tags/release-1.118.0.tar.gz" + sha256 "58c1c8cd82ff8cd77cc7bee612b94cf60cf6a6edd8bd52121910b1a23344e9a9" + license "BSD-2-Clause" + head "https://github.com/Ravenbrook/mps.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c651514f2ee9c277517272b328db0e41ab0cc06b3998302e591db274dc70f104" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c076fea0e44ca8cf0aacfc914e05a8d4af972c32700d11ce60a4858c6270f96" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dc6283eb82ae52dc677b701a27f47146c4613c820b32d877b9ec52536f51474e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c6b18ffb9d46a689f2888c158cb44d1e5bc9a355eb55265b6668a6c19e1000c3" + sha256 cellar: :any_skip_relocation, sonoma: "1e29c7675afe66148b0f8f80b451815db76d96e01bf2199045f632a096bc56e6" + sha256 cellar: :any_skip_relocation, ventura: "ea7bb763c29bf43202b04fcd59bc1d16797983f1b0f52623cee8f04638893a26" + sha256 cellar: :any_skip_relocation, monterey: "f5b350ecbd4ab59b60427487a720c13ebb86075860008a49e74d44529c05fecf" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a383edbaa3b70a087af6f5eafeb264f7d95477d71d8b9c354c9df970eebe45a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c54043c0fcf718172a1d9f20e9eae7287180d26f4306f652c19f3d460faf68e9" + end + + depends_on xcode: :build + + def install + if OS.mac? + # macOS build process + # for build native but not universal binary + # https://github.com/Ravenbrook/mps/blob/master/manual/build.txt + xcodebuild "-scheme", "mps", + "-configuration", "Release", + "-project", "code/mps.xcodeproj", + "OTHER_CFLAGS=-Wno-error=unused-but-set-variable -Wno-unused-but-set-variable" + + # Install the static library + lib.install "code/xc/Release/libmps.a" + + # Install header files + include.install Dir["code/mps*.h"] + + else + ENV.deparallelize + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + end + + test do + (testpath/"test.c").write <<~C + #include "mps.h" + #include "mpscawl.h" + #include "mpscamc.h" + #include "mpsavm.h" + + int main() { + mps_arena_t arena; + mps_res_t res = mps_arena_create(&arena, mps_arena_class_vm(), 1024*1024); + return (res == MPS_RES_OK) ? 0 : 1; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lmps", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libmrss.rb b/Formula/lib/libmrss.rb new file mode 100644 index 0000000000000..698f3a1ef51ad --- /dev/null +++ b/Formula/lib/libmrss.rb @@ -0,0 +1,69 @@ +class Libmrss < Formula + desc "C library for RSS files or streams" + homepage "https://github.com/bakulf/libmrss" + url "https://github.com/bakulf/libmrss/archive/refs/tags/0.19.4.tar.gz" + sha256 "28022247056b04ca3f12a9e21134d42304526b2a67b7d6baf139e556af1151c6" + license "LGPL-2.1-or-later" + head "https://github.com/bakulf/libmrss.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "183934eb440639c9d4506bcc74cc7c86da915e1bc65d041d79ebbc6eff5f6f1b" + sha256 cellar: :any, arm64_sonoma: "b28e679db851fa12e08db6e3c5061cd7dc8daa31b8d39686ae4fc40f6e5164a7" + sha256 cellar: :any, arm64_ventura: "52dbc8575b256260ae711ff08c2a8fbd2bed6151c26fb65c872d7e4e97cfd0f6" + sha256 cellar: :any, arm64_monterey: "fa6977b426f1dd8c129134839639658642a90927e2cc1094989dff78c0d05d9e" + sha256 cellar: :any, sonoma: "a3aeb6af0ab68d39a8e9dfb4d3b22501c4e84077d7ebf65cf8403f65db270f26" + sha256 cellar: :any, ventura: "1df7a24f602409e59cc256c621e83d69d50cd985d8ffe33398853676a1cbaa82" + sha256 cellar: :any, monterey: "f4b7cf45e3d2fcdafd282770ef575cbee21d8d9d5da4eadc34058adfb3c74ac6" + sha256 cellar: :any_skip_relocation, arm64_linux: "3ae2132725abace2b6a09d82e011f722daf45abe1ec5bcda7fdc4f602a3ae099" + sha256 cellar: :any_skip_relocation, x86_64_linux: "60d84960b66d364c0d2e8221bade1462f73eef410a6107e00a736235e1f2ec5b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "libnxml" + + uses_from_macos "curl" + + def install + # need NEWS file for build + touch "NEWS" + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + mrss_t *rss; + mrss_error_t error; + mrss_item_t *item; + const char *url = "https://raw.githubusercontent.com/git/git.github.io/master/feed.xml"; + + error = mrss_parse_url(https://github.com/url,%20&rss); + if (error) { + printf("Error parsing RSS feed: %s\\n", mrss_strerror(error)); + return 1; + } + + for (item = rss->item; item; item = item->next) { + printf("Title: %s\\n", item->title); + } + + mrss_free(rss); + + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs mrss").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + assert_match "Title: {{ post.title | xml_escape}}", shell_output("./test") + end +end diff --git a/Formula/lib/libmspub.rb b/Formula/lib/libmspub.rb new file mode 100644 index 0000000000000..dc4f23e6782a2 --- /dev/null +++ b/Formula/lib/libmspub.rb @@ -0,0 +1,97 @@ +class Libmspub < Formula + desc "Interpret and import Microsoft Publisher content" + homepage "https://wiki.documentfoundation.org/DLP/Libraries/libmspub" + url "https://dev-www.libreoffice.org/src/libmspub/libmspub-0.1.4.tar.xz" + sha256 "ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba" + license "MPL-2.0" + revision 18 + + livecheck do + url "https://dev-www.libreoffice.org/src/" + regex(/href=["']?libmspub[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1847309881161a713cb9c37bec7a23c452cdc44bf87c28c016f449c101b57b84" + sha256 cellar: :any, arm64_sonoma: "249d78a5299e65bd9ef5df4ea21d70aae17f40c3f075f34e04923b3880fb0257" + sha256 cellar: :any, arm64_ventura: "fca947dbb384a02a7384989d0f5aa87e74d51460ef01e90555414d3b6b221473" + sha256 cellar: :any, sonoma: "363ef78cf1ad4658325059fb88d5ffbd1ff9dfb755a46480d7bf355dad00a07c" + sha256 cellar: :any, ventura: "3ff4c780cd0546ea13e77aeffa63b9b8b5e31dd6a12c1b34bcc9275239942965" + sha256 cellar: :any_skip_relocation, arm64_linux: "87665795cf7ed3a80d5798d80760aa4780ee5658512ee0563802951cb9057c60" + sha256 cellar: :any_skip_relocation, x86_64_linux: "256986816dfba4c397abe672d087ed464766aff3aaad05f80c4a99672fb155d4" + end + + depends_on "boost" => :build + depends_on "libwpg" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + depends_on "librevenge" + depends_on "libwpd" + + uses_from_macos "zlib" + + # Fix for missing include needed to build with recent GCC. Remove in the next release. + # Commit ref: https://git.libreoffice.org/libmspub/+/698bed839c9129fa7a90ca1b5a33bf777bc028d1%5E%21 + on_linux do + patch :DATA + end + + def install + # icu4c 75+ needs C++17 and icu4c 76+ needs icu-uc + # TODO: Fix upstream + icu4c = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + ENV["ICU_LIBS"] = "-L#{icu4c.opt_lib} -licui18n -licuuc" + ENV.append "CXXFLAGS", "-std=gnu++17" + + system "./configure", "--disable-silent-rules", + "--disable-static", + "--disable-tests", + "--disable-werror", + "--without-docs", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + librevenge::RVNGStringStream docStream(0, 0); + libmspub::MSPUBDocument::isSupported(&docStream); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", "-lrevenge-stream-0.0", + "-I#{Formula["librevenge"].include}/librevenge-0.0", + "-lmspub-0.1", "-I#{include}/libmspub-0.1", + "-L#{lib}", "-L#{Formula["librevenge"].lib}" + system "./test" + end +end + +__END__ +From 698bed839c9129fa7a90ca1b5a33bf777bc028d1 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Tue, 11 Jun 2019 12:15:28 +0200 +Subject: [PATCH] missing include + +Change-Id: I3c5c085f55223688cdc7b972f7c7981411881263 +Reviewed-on: https://gerrit.libreoffice.org/73814 +Reviewed-by: Michael Stahl +Tested-by: Michael Stahl +--- + +diff --git a/src/lib/MSPUBMetaData.h b/src/lib/MSPUBMetaData.h +index 9167f4f..27bdd4f 100644 +--- a/src/lib/MSPUBMetaData.h ++++ b/src/lib/MSPUBMetaData.h +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include + diff --git a/Formula/lib/libmsquic.rb b/Formula/lib/libmsquic.rb new file mode 100644 index 0000000000000..e421d1340e08e --- /dev/null +++ b/Formula/lib/libmsquic.rb @@ -0,0 +1,62 @@ +class Libmsquic < Formula + desc "Cross-platform, C implementation of the IETF QUIC protocol" + homepage "https://github.com/microsoft/msquic" + url "https://github.com/microsoft/msquic.git", + tag: "v2.4.11", + revision: "18b58030a1aee72d94d705d5738cfb87650b063a" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "89bbdc9b1db3f643d9f223538b09cbf0b4bb1133c662630e65430db4692a94ae" + sha256 cellar: :any, arm64_sonoma: "8325d65147aec0bda760fff3877c7a5906317d15f49f21c644e8fd994ce749ee" + sha256 cellar: :any, arm64_ventura: "1fcbd01c40f6eec8d01052e3635e61af732e8fae1f53ad4e1b1125ea119819e3" + sha256 cellar: :any, sonoma: "3eac3ea81c90f349167dcacfdfc2f98447f700c297f8060d5f4f7f302aaf6147" + sha256 cellar: :any, ventura: "f4a98a03a312f0cb685d111690cd7687bfc15250d22d768e642b69528b11d4c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "8c01a5f417fe2d51b8f21803595b2091745d2eeb0f5ab0653ecc9c836ef17ffa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d79cb6eaecbe706a86c2a93feb7f45841395d5a2ee2ab7101f5570e77c2482a" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + def install + args = %w[ + -DQUIC_TLS=openssl3 + -DQUIC_USE_SYSTEM_LIBCRYPTO=true + -DQUIC_BUILD_PERF=OFF + -DQUIC_BUILD_TOOLS=OFF + -DQUIC_BUILD_TESTS=OFF + -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 + + test do + example = testpath/"example.cpp" + example.write <<~CPP + #include + #include + + int main() + { + const QUIC_API_TABLE * ptr = {nullptr}; + if (auto status = MsQuicOpen2(&ptr); QUIC_FAILED(status)) + { + std::cout << "MsQuicOpen2 failed: " << status << std::endl; + return 1; + } + + std::cout << "MsQuicOpen2 succeeded"; + MsQuicClose(ptr); + return 0; + } + CPP + system ENV.cxx, example, "-I#{include}", "-L#{lib}", "-lmsquic", "-o", "test" + assert_equal "MsQuicOpen2 succeeded", shell_output("./test").strip + end +end diff --git a/Formula/lib/libmtp.rb b/Formula/lib/libmtp.rb new file mode 100644 index 0000000000000..30dc76f8af6c6 --- /dev/null +++ b/Formula/lib/libmtp.rb @@ -0,0 +1,32 @@ +class Libmtp < Formula + desc "Implementation of Microsoft's Media Transfer Protocol (MTP)" + homepage "https://libmtp.sourceforge.net/" + url "https://downloads.sourceforge.net/project/libmtp/libmtp/1.1.22/libmtp-1.1.22.tar.gz" + sha256 "c3fcf411aea9cb9643590cbc9df99fa5fe30adcac695024442973d76fa5f87bc" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1142786084849b45e771a43aeb71e026fe248539172a196067679ff794eeb2fc" + sha256 cellar: :any, arm64_sonoma: "70073e53b78c742bb5270a210a9abd301a14ec61938d4c73b0a71105e84f4d3a" + sha256 cellar: :any, arm64_ventura: "122bcdc9ef407c2395f4022f9bebed02d4bf29eeebdeea7791b7f5fce1d7ddf7" + sha256 cellar: :any, sonoma: "5c8a42810b2c8e462121c5a30b9f416d88b36854074f05c361a29a8b2c8d9691" + sha256 cellar: :any, ventura: "5b5b1a0918987fb736d910a8b9153cb81c9a8f059ed5bd70af6fa19c18160695" + sha256 arm64_linux: "096547e52a494fd59d2d61b4a1d23e15268e05c0d16bf546f2f861364ad04e22" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa88301d0fda571bdac1fee606be3dae4a207a403c658592f9a914f53c9e9579" + end + + depends_on "pkgconf" => :build + depends_on "libusb" + + def install + system "./configure", "--disable-mtpz", + "--disable-silent-rules", + "--with-udev=#{lib}/udev", + *std_configure_args + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mtp-getfile") + end +end diff --git a/Formula/lib/libmusicbrainz.rb b/Formula/lib/libmusicbrainz.rb new file mode 100644 index 0000000000000..8b10a239332ca --- /dev/null +++ b/Formula/lib/libmusicbrainz.rb @@ -0,0 +1,44 @@ +class Libmusicbrainz < Formula + desc "MusicBrainz Client Library" + homepage "https://musicbrainz.org/doc/libmusicbrainz" + url "https://github.com/metabrainz/libmusicbrainz/releases/download/release-5.1.0/libmusicbrainz-5.1.0.tar.gz" + sha256 "6749259e89bbb273f3f5ad7acdffb7c47a2cf8fcaeab4c4695484cef5f4c6b46" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ada38db81da84d8fb85cae7dbc30682461a1d198556fdb01d9be05fcbe9059f4" + sha256 cellar: :any, arm64_sonoma: "62762e1b184d0c47bb287e151333dafaa526b733ea2c4bd5fbd097d987b84aa4" + sha256 cellar: :any, arm64_ventura: "f94dae2c20f0394e6500176d823845716fd3696e692527e8106542e7d3a7f392" + sha256 cellar: :any, arm64_monterey: "fc0659a30defd25b9d1eb98acee0c6165d3a25c013a7a5bd4d77247af9096ddc" + sha256 cellar: :any, arm64_big_sur: "cd8eb4a4a2aaf1d9328c3b84439f16996b5e586d1069edcb28d4dcf8c994a30e" + sha256 cellar: :any, sonoma: "2b9d6fc49497521a3518c7520b4a82fc153d6f9ed187747a13c2bc561b8a75e8" + sha256 cellar: :any, ventura: "4d83f20fe8412445dfe08de416eb711164ea7a1b5495511ce5979d0d2a40c9f7" + sha256 cellar: :any, monterey: "26b5aa846f4cd2cef477fa4e60b3f735b18eed3451528f2517a8de9ab38d0be1" + sha256 cellar: :any, big_sur: "a03a79657821636633079121735346d0b50ac66ab13e7a0da695b4f8e8499464" + sha256 cellar: :any, catalina: "3ff30e82e933e84fdaacc2a0d8c568678adfabb0b7771667cbcaf07132f59a14" + sha256 cellar: :any, mojave: "420d6867aa3d20d9148d4546a154e7059467cc4ca8d861dfb173c9ea35f10dab" + sha256 cellar: :any, high_sierra: "99b598b941ac0ce3747d8821943a1e730f3673b721421d9c0428b70259e789c0" + sha256 cellar: :any, sierra: "8fe055e1f987e23a569f915082031e172a5c3d0aef6f86de78ce9c8258f53cd2" + sha256 cellar: :any, el_capitan: "6a63410ca9eae84b263d7165d05701801f4e05de26a9e95a7396f95a602cedd7" + sha256 cellar: :any_skip_relocation, arm64_linux: "a233e5f068712c01e17c57f8055fef4a9c42f6184287d69fd65b8760bf51d15d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9a39724adbf24eb1dd5b25478d8b571be9f8fdc42d6249696e0934e07a1e4c9" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "neon" + + uses_from_macos "libxml2" + + # Backport fix to build with newer libxml2 + patch do + url "https://github.com/metabrainz/libmusicbrainz/commit/4655b571a70d73d41467091f59c518517c956198.patch?full_index=1" + sha256 "ee0c63e56a17156bca13b157744a54aeed6e19b39f65b14f2a5ac4e504358c8e" + end + + def install + system "cmake", "-S", ".", "-B", ".", *std_cmake_args + system "cmake", "--build", "." + system "cmake", "--install", "." + end +end diff --git a/Formula/lib/libmwaw.rb b/Formula/lib/libmwaw.rb new file mode 100644 index 0000000000000..0291144716d00 --- /dev/null +++ b/Formula/lib/libmwaw.rb @@ -0,0 +1,45 @@ +class Libmwaw < Formula + desc "Library for converting legacy Mac document formats" + homepage "https://sourceforge.net/p/libmwaw/wiki/Home/" + url "https://downloads.sourceforge.net/project/libmwaw/libmwaw/libmwaw-0.3.22/libmwaw-0.3.22.tar.xz" + sha256 "a1a39ffcea3ff2a7a7aae0c23877ddf4918b554bf82b0de5d7ce8e7f61ea8e32" + license any_of: ["LGPL-2.1-or-later", "MPL-2.0"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "e1a2a5f288071c5a5c899ed113f87a841ec434bce245a98750a1ee1b0b2c0b64" + sha256 cellar: :any, arm64_sonoma: "952e2d7978c0a53b42c6c3bcef9faf03e878069664710baed01bbf696527f329" + sha256 cellar: :any, arm64_ventura: "14c3ef9b89eabb6d8f579cd6b4fc6b10aff80157395e25f5f4032c365e35814c" + sha256 cellar: :any, arm64_monterey: "22010af06baf85faaa647b36eab334caa1f097cbe8f66d60c77bb745ce70bcd9" + sha256 cellar: :any, arm64_big_sur: "02d9d169c112c585d2c8cfaaf1406a66bb6bb5a5bd909a2e842e9e5f5b6c6aee" + sha256 cellar: :any, sonoma: "dc6f6c368344f42ba9566f294e8126a6327febfe0fdb247af4e5aff2488deb98" + sha256 cellar: :any, ventura: "b62fd5d2f18f6f8248baef2454e48bedeb6a595b4e9eeed40f90fcf6c22722a0" + sha256 cellar: :any, monterey: "79ed34d639601c2afd3bcf9c573635f5f43826623a82fc931d64ada62fd632fd" + sha256 cellar: :any, big_sur: "9830e2b0688157862cc7c2345fce55ae60955c3cca0c143fef2ab582a5d6d348" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f1183a6f1445ed7996b31a2eca4a695e778ede67a0f7e4fa48d6687060e547d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f6f70031a248697ceaaaf2b4626511400904de27cac8f6c441196a6bf05ef1c" + end + + depends_on "pkgconf" => :build + depends_on "librevenge" + + uses_from_macos "zlib" + + resource "homebrew-test_document" do + url "https://github.com/openpreserve/format-corpus/raw/825c8a5af012a93cf7aac408b0396e03a4575850/office-examples/Old%20Word%20file/NEWSSLID.DOC" + sha256 "df0af8f2ae441f93eb6552ed2c6da0b1971a0d82995e224b7663b4e64e163d2b" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + testpath.install resource("homebrew-test_document") + # Test ID on an actual office document + assert_equal "#{testpath}/NEWSSLID.DOC:Microsoft Word 2.0[pc]", + shell_output("#{bin}/mwawFile #{testpath}/NEWSSLID.DOC").chomp + # Control case; non-document format should return an empty string + assert_empty shell_output("#{bin}/mwawFile #{test_fixtures("test.mp3")}").chomp + end +end diff --git a/Formula/lib/libmxml.rb b/Formula/lib/libmxml.rb new file mode 100644 index 0000000000000..a2831fac92942 --- /dev/null +++ b/Formula/lib/libmxml.rb @@ -0,0 +1,53 @@ +class Libmxml < Formula + desc "Mini-XML library" + homepage "https://michaelrsweet.github.io/mxml/" + url "https://github.com/michaelrsweet/mxml/releases/download/v4.0.4/mxml-4.0.4.tar.gz" + sha256 "c8d1728d6ccf71a862a1538bd5e132daa2181bb42fe14b078baa2ec1510c0150" + license "Apache-2.0" + head "https://github.com/michaelrsweet/mxml.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "82e19bced76d7f6c051d518d66986e09141eb0e469b96c1a07f846a8a76b38ae" + sha256 cellar: :any, arm64_sonoma: "f6ae2142da610a2347bab6180d96eeacc4a93316069593bd43b4a042e555fbe2" + sha256 cellar: :any, arm64_ventura: "f0f7b03ef861dc93ad8460a80d1438e77d1fa257b9383777a4e2adae9dd2f3b3" + sha256 cellar: :any, sonoma: "cd8ed5ff1205d43cee4b76a4d1dd344657834556fc20297dce128f3d71917e11" + sha256 cellar: :any, ventura: "af8cf17432554379cba89524143512b53c44f4022bf547a7f1d0e6166216939b" + sha256 cellar: :any_skip_relocation, arm64_linux: "03c82073c6046eba93252707914149e70ba8ff2c4d7a1822c7721c2c7dde8fd4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6dc29cb18206b980b121c3a114f8c86114a5dcead1b2ae80e0b7eea78c17f0e4" + end + + depends_on "pkgconf" => :test + + def install + system "./configure", "--enable-shared", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + FILE *fp; + mxml_node_t *tree; + + fp = fopen("test.xml", "r"); + tree = mxmlLoadFile(NULL, NULL, fp); + fclose(fp); + } + C + + (testpath/"test.xml").write <<~XML + + + I'm an XML document. + + XML + + flags = shell_output("pkgconf --cflags --libs mxml4").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libmypaint.rb b/Formula/lib/libmypaint.rb new file mode 100644 index 0000000000000..e7f6e30b03ae2 --- /dev/null +++ b/Formula/lib/libmypaint.rb @@ -0,0 +1,61 @@ +class Libmypaint < Formula + desc "MyPaint brush engine library" + homepage "https://github.com/mypaint/libmypaint/wiki" + url "https://github.com/mypaint/libmypaint/releases/download/v1.6.1/libmypaint-1.6.1.tar.xz" + sha256 "741754f293f6b7668f941506da07cd7725629a793108bb31633fb6c3eae5315f" + license "ISC" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "ada0de7fc29d5634da50e9a9dd05858fdb5fc839f6cfefb8dda3977ab7e9dd8c" + sha256 cellar: :any, arm64_sonoma: "bd3ed49871a7e59ee4731520d6d3852c7f53a4565f125153b13aa556998931fd" + sha256 cellar: :any, arm64_ventura: "45f120eb85a644dae61e2bcf2683256dc3cae8531fa59d339e07ff9a3ba1f135" + sha256 cellar: :any, arm64_monterey: "b481fb4e3ed5cb542d1ef073a5852a0a65361f0825051302ccdd6bc224901d90" + sha256 cellar: :any, arm64_big_sur: "4f5f706833fb183d4ad43a0b065b2b767a7787e7963eabced95016bd04ffdd12" + sha256 cellar: :any, sonoma: "e9f2d85eadf239650155f9c87128808ef1c519426626e96d5401cf4628e33833" + sha256 cellar: :any, ventura: "4a895f28ea58e5415711bf7f3a415f639a958354992acd5a1ffd7719417fd5e9" + sha256 cellar: :any, monterey: "30623690f18dafe72d96daad871d4f7018ab3e89970ebdeda2fbf2d56c781c68" + sha256 cellar: :any, big_sur: "65d3c8c494c5e3a454526e4254c4f4c1a1883ca1e99c2dcb09c2abdff141d72a" + sha256 cellar: :any, catalina: "699014970a67055822e7ee2abc92c4ea2b45e51bcd58cfa01cb24c2ed08f6a2b" + sha256 cellar: :any, mojave: "97ca6e5c0ae27513cc3af20c1256548d6a21e0a38bfdcea5a79f7fe1c0a6886d" + sha256 cellar: :any, high_sierra: "4260697ececf5344aa3eacd16afdd5f4eff556cee6312e49a8e5544edb71aca1" + sha256 cellar: :any_skip_relocation, arm64_linux: "3682eee52437a073b7ae1400df5ae48e4779815035f785118eb22ea571873c1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6114302a8ff4e54cd64388fb0968dbb1fa4ab546bb9d2bbca786da787ec3bf62" + end + + depends_on "gettext" => :build # for intltool + depends_on "intltool" => :build + depends_on "pkgconf" => :build + depends_on "json-c" + + uses_from_macos "perl" => :build + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + system "./configure", "--disable-introspection", + "--without-glib", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + MyPaintBrush *brush = mypaint_brush_new(); + mypaint_brush_unref(brush); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}/libmypaint", "-L#{lib}", "-lmypaint", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libnatpmp.rb b/Formula/lib/libnatpmp.rb new file mode 100644 index 0000000000000..61f82c70bae8a --- /dev/null +++ b/Formula/lib/libnatpmp.rb @@ -0,0 +1,52 @@ +class Libnatpmp < Formula + desc "NAT port mapping protocol library" + homepage "http://miniupnp.free.fr/libnatpmp.html" + url "http://miniupnp.free.fr/files/download.php?file=libnatpmp-20230423.tar.gz" + sha256 "0684ed2c8406437e7519a1bd20ea83780db871b3a3a5d752311ba3e889dbfc70" + license "BSD-3-Clause" + + livecheck do + url "http://miniupnp.free.fr/files/" + regex(/href=.*?libnatpmp[._-]v?(\d{6,8})\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "9844848d49763a4d8d511a4168997b0f33e1e761a54f6b71b93c322bfd99238f" + sha256 cellar: :any, arm64_sonoma: "5bda7f405b5e81802f57ff903108f1f6a55a3fce5109b3f158c812680ae13551" + sha256 cellar: :any, arm64_ventura: "e2b3149c35d8f3b95be8530a59185bff9d795599b7311d8cbb5acdd815737b83" + sha256 cellar: :any, arm64_monterey: "f859a0235c76bb63c350d94f053832a15fee55936a8e7a03a5b5dc04dd69c627" + sha256 cellar: :any, arm64_big_sur: "0e39353eba562756a31d3937f87c68f5d6b66526bfabb3cb5db71b5c7cce1bd9" + sha256 cellar: :any, sonoma: "e79bae12df6cbd0880010d1ece79b94c7f8a0d17173bc2307b5a12bcf6007cd4" + sha256 cellar: :any, ventura: "2997902f048650bd589d999bb508836f9275432f702041922d63577f526ae427" + sha256 cellar: :any, monterey: "8d9857a3229541160545cd65308faede6b0a4a49b22491fa2726b9b391797dd1" + sha256 cellar: :any, big_sur: "b3e8cff2d63434c2f2db23be4caf16799c420f9ef7308dca1173b5cf3ff6b9b8" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0a46bd1dc2998015ddd30fea697d2a633f689af5be97b2b5a8f491eae9558a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c61e68ce733b200615ecb9dbabe36a9336cf7d6404a4d869573a365acaebc08" + end + + # Fix missing header. Remove when no longer applicable. + patch do + url "https://github.com/miniupnp/libnatpmp/commit/5f4a7c65837a56e62c133db33c28cd1ea71db662.patch?full_index=1" + sha256 "4643048d7e24f8aed4e11e572f3e22f79eae97bb289ae1bbf103b84e8e32f61a" + end + + def install + # Reported upstream: + # https://miniupnp.tuxfamily.org/forum/viewtopic.php?t=978 + inreplace "Makefile", "-Wl,-install_name,$(SONAME)", "-Wl,-install_name,$(INSTALLDIRLIB)/$(SONAME)" + system "make", "INSTALLPREFIX=#{prefix}", "install" + end + + test do + # Use a non-existent gateway. + output = shell_output("#{bin}/natpmpc -g 0.0.0.0 2>&1", 1) + [ + "initnatpmp() returned 0 (SUCCESS)", + "sendpublicaddressrequest returned 2 (SUCCESS)", + "readnatpmpresponseorretry() failed : the gateway does not support nat-pmp", + ].each do |expected_match| + assert_match expected_match, output + end + end +end diff --git a/Formula/lib/libnet.rb b/Formula/lib/libnet.rb new file mode 100644 index 0000000000000..412f6e79faf60 --- /dev/null +++ b/Formula/lib/libnet.rb @@ -0,0 +1,45 @@ +class Libnet < Formula + desc "C library for creating IP packets" + homepage "https://github.com/libnet/libnet" + url "https://github.com/libnet/libnet/releases/download/v1.3/libnet-1.3.tar.gz" + sha256 "ad1e2dd9b500c58ee462acd839d0a0ea9a2b9248a1287840bc601e774fb6b28f" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e1aa2022d333a395e5add872c8f9facfdb1811b28bb2706bff2ce97923e671b9" + sha256 cellar: :any, arm64_sonoma: "9a0e1d5eb30194a4309588c383cc4e179804e88314b280e2d04c96069ebef867" + sha256 cellar: :any, arm64_ventura: "9f808a8325a153535d7b22da23d652929bfce526493dc0ee5a4505a971ae7b43" + sha256 cellar: :any, arm64_monterey: "6d6326c365e861f65a1f13438ccb409600f2dc7783e8bfc42835f247e545d4c2" + sha256 cellar: :any, sonoma: "8e92431961fce081d8094362611f3550938938f3e8d7de7c369c691be9ef77c2" + sha256 cellar: :any, ventura: "c1f1f76069f4f73b50c02c7434e77f0eb22f16a92c2e7756101c41bd40ae989c" + sha256 cellar: :any, monterey: "4f2d247267535a9a8cd3eebf91891d3c0f555035533db9a40e32b03ca47c9e30" + sha256 cellar: :any_skip_relocation, arm64_linux: "be160672c2f61d20fee38a54c6f7e308c73ee085f9d47ec91a27c210a93a6cea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c80410be8c65b37b135596873de64f7587068d32d0b8ba8ba91f4299f609e8ed" + end + + depends_on "doxygen" => :build + depends_on "pkgconf" => :test + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(int argc, const char *argv[]) + { + printf("%s", libnet_version()); + return 0; + } + C + + flags = shell_output("pkgconf --libs --cflags libnet").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + assert_match version.to_s, shell_output("./test") + end +end diff --git a/Formula/lib/libnetfilter-queue.rb b/Formula/lib/libnetfilter-queue.rb new file mode 100644 index 0000000000000..fb00da879e616 --- /dev/null +++ b/Formula/lib/libnetfilter-queue.rb @@ -0,0 +1,57 @@ +class LibnetfilterQueue < Formula + desc "Userspace API to packets queued by the kernel packet filter" + homepage "https://www.netfilter.org/projects/libnetfilter_queue" + url "https://www.netfilter.org/projects/libnetfilter_queue/files/libnetfilter_queue-1.0.5.tar.bz2" + sha256 "f9ff3c11305d6e03d81405957bdc11aea18e0d315c3e3f48da53a24ba251b9f5" + license "LGPL-2.0-or-later" + + livecheck do + url "https://www.netfilter.org/projects/libnetfilter_queue/downloads.html" + regex(/href=.*?libnetfilter_queue[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "0d88b35944420ead47b296ddc1e8a374591138b640c4aeede86e02b0104de7c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92a395a74268dd17a019cf43ca0a5bbe38ad52e045697e403657abc3250e3f6e" + end + + depends_on "pkgconf" => :build + depends_on "libmnl" + depends_on "libnfnetlink" + depends_on :linux + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + #include + #include + + #include + #include + #include + + #include + #include + + #include + + int main(int argc, char *argv[]) + { + struct mnl_socket *nl; + char buf[NFQA_CFG_F_MAX]; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lmnl", "-o", "test" + end +end diff --git a/Formula/lib/libnetfilter_conntrack.rb b/Formula/lib/libnetfilter_conntrack.rb new file mode 100644 index 0000000000000..0498a1d465693 --- /dev/null +++ b/Formula/lib/libnetfilter_conntrack.rb @@ -0,0 +1,35 @@ +class LibnetfilterConntrack < Formula + desc "Library providing an API to the in-kernel connection tracking state table" + homepage "https://www.netfilter.org/projects/libnetfilter_conntrack/" + url "https://www.netfilter.org/pub/libnetfilter_conntrack/libnetfilter_conntrack-1.1.0.tar.xz" + sha256 "67edcb4eb826c2f8dc98af08dabff68f3b3d0fe6fb7d9d0ac1ee7ecce0fe694e" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.netfilter.org/projects/libnetfilter_conntrack/downloads.html" + regex(/href=.*?libnetfilter_conntrack[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "e1c3d0f17c63a78eae6ba07fdf7cff0414dc883c3dc78495d5c1dddc3ca66c92" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae07370b1802d6089195cb605b4010635126ca6f6f37d20023c5f19ff9b833e6" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "libmnl" + depends_on "libnfnetlink" + depends_on :linux + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + pkgshare.install "examples" + inreplace pkgshare/"examples/Makefile", Superenv.shims_path/"ld", "ld" + end + + test do + flags = shell_output("pkgconf --cflags --libs libnetfilter_conntrack libmnl").chomp.split + system ENV.cc, pkgshare/"examples/nfct-mnl-get.c", "-o", "nfct-mnl-get", *flags + assert_match "mnl_socket_recvfrom: Operation not permitted", shell_output("./nfct-mnl-get inet 2>&1", 1) + end +end diff --git a/Formula/lib/libnetworkit.rb b/Formula/lib/libnetworkit.rb new file mode 100644 index 0000000000000..43849b9199e6b --- /dev/null +++ b/Formula/lib/libnetworkit.rb @@ -0,0 +1,53 @@ +class Libnetworkit < Formula + desc "NetworKit is an OS-toolkit for large-scale network analysis" + homepage "https://networkit.github.io/" + url "https://github.com/networkit/networkit/archive/refs/tags/11.1.tar.gz" + sha256 "c8db0430f6d7503eaf1e59fbf181374dc9eaa70f572c56d2efa75dd19a3548a9" + license "MIT" + + livecheck do + formula "networkit" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5d0045a902e874098c38bf7c3eba789e8d1d36343f1a58b874c5ae002e771216" + sha256 cellar: :any, arm64_sonoma: "9bc6b2bb82c01385f9270daaf103455cc879931b6565ff813501763885d74e9b" + sha256 cellar: :any, arm64_ventura: "98b8837808c1cc14fd94b86840a9f68ef5ee4859949de8fa4e4b2ce2cb4f5609" + sha256 cellar: :any, sonoma: "1b26f3f2939058fff6be5f098275d150ff192ea5d8dd667677979a542df76883" + sha256 cellar: :any, ventura: "92e49a66eaa9eba680dd1f1bc37b94ae9af79b273a1dae4ddedae6a883745301" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd31d28f3fcb0bba6ad090cfd9c6a6cb2a24ec55b1c05f4a1eb3ad2feb02dc50" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32564d543c7c121b193cb9c2d2c769e7f7770165e131037e49cdfc33449a8ace" + end + + depends_on "cmake" => :build + depends_on "tlx" + depends_on "ttmath" + + on_macos do + depends_on "libomp" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DNETWORKIT_EXT_TLX=#{Formula["tlx"].opt_prefix}", + "-DNETWORKIT_CXX_STANDARD=20", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() + { + // Try to create a graph with five nodes + NetworKit::Graph g(5); + return 0; + } + CPP + omp_flags = OS.mac? ? ["-I#{Formula["libomp"].opt_include}"] : [] + system ENV.cxx, "-std=c++20", "test.cpp", "-L#{lib}", "-lnetworkit", "-o", "test", *omp_flags + system "./test" + end +end diff --git a/Formula/lib/libnfc.rb b/Formula/lib/libnfc.rb new file mode 100644 index 0000000000000..15620c4a85c66 --- /dev/null +++ b/Formula/lib/libnfc.rb @@ -0,0 +1,50 @@ +class Libnfc < Formula + desc "Low level NFC SDK and Programmers API" + homepage "https://github.com/nfc-tools/libnfc" + url "https://github.com/nfc-tools/libnfc/releases/download/libnfc-1.8.0/libnfc-1.8.0.tar.bz2" + sha256 "6d9ad31c86408711f0a60f05b1933101c7497683c2e0d8917d1611a3feba3dd5" + license "LGPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "2b82cd576da101ec339171c4a8ded0fee90ab4cf072513c8cd0a1b99721c72f9" + sha256 arm64_sonoma: "3e1ce25513819c59c110f28cfdb8cf4ecf265800d741d272ad7450805ba647f5" + sha256 arm64_ventura: "28002ee7cadbe88fdd4a614804a813b4d46a17d4cb2a1fe7d24fe17eff04f933" + sha256 arm64_monterey: "24d476cf0560256e53b5efb4f915ead0e5a5bf336da89395a3b8a5c0903f1caf" + sha256 arm64_big_sur: "6e97d8892b2129437513be8a21fccf7e3c6a23b14dd28e3d43aea1fce9b97ed7" + sha256 sonoma: "f47d6668b25a9c0acb0eea36a27c0e340ebdb15859de78193e50e0adc38005e0" + sha256 ventura: "00719d9f9c924aa855561160b5a79bae50180c6245d7a98c520ab2993fb8d305" + sha256 monterey: "a42411e1b19e52e85c138f4566613bc87570851403d148315d384d953d2a82b5" + sha256 big_sur: "566a81b623abfb5d68480274b59b13c44fc098cd1d8cbf59dc112295a58a363c" + sha256 catalina: "6659f67e40774cdb8e95548c03542bbc123ccabc0f4a6160504c03e43fa43c26" + sha256 mojave: "9bc90c84f89408a8960289a668af7ad9b7b17d34a02996b83ec960c5cbefafeb" + sha256 high_sierra: "8e6abd4d61ef9aff76ef25b092806b95614c07a9e46a0e13ca6e915271454a92" + sha256 arm64_linux: "65c10bb5ef9996f755126c6642fd8933c9fa2fbff028d1700dc75b2cd0458b47" + sha256 x86_64_linux: "db84cf74f8217a9cb32aa5c804cf20c9b74464ce21ea2a87805b0c8de5abdfe6" + end + + head do + url "https://github.com/nfc-tools/libnfc.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libusb-compat" + + uses_from_macos "pcsc-lite" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--enable-serial-autoprobe", + "--with-drivers=all", + *std_configure_args + system "make", "install" + (prefix/"etc/nfc/libnfc.conf").write "allow_intrusive_scan=yes" + end + + test do + system bin/"nfc-list" + end +end diff --git a/Formula/lib/libnfnetlink.rb b/Formula/lib/libnfnetlink.rb new file mode 100644 index 0000000000000..e26b068a7b043 --- /dev/null +++ b/Formula/lib/libnfnetlink.rb @@ -0,0 +1,40 @@ +class Libnfnetlink < Formula + desc "Low-level library for netfilter related communication" + homepage "https://www.netfilter.org/projects/libnfnetlink" + url "https://www.netfilter.org/projects/libnfnetlink/files/libnfnetlink-1.0.2.tar.bz2" + sha256 "b064c7c3d426efb4786e60a8e6859b82ee2f2c5e49ffeea640cfe4fe33cbc376" + license "LGPL-2.1-or-later" + + livecheck do + url "https://www.netfilter.org/projects/libnfnetlink/downloads.html" + regex(/href=.*?libnfnetlink[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "29a3d3fc305c9252a22b3bce85447d2f895924c959185c00889cedc2d23fc78b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "927f6b62c2f87ff79d92d07e52bb312d3fb24731e694cc804179730b08f15eae" + end + + depends_on :linux + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() { + int i = NFNL_BUFFSIZE; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lnfnetlink", "-o", "test" + end +end diff --git a/Formula/lib/libnfs.rb b/Formula/lib/libnfs.rb new file mode 100644 index 0000000000000..65ec9b7341c2a --- /dev/null +++ b/Formula/lib/libnfs.rb @@ -0,0 +1,57 @@ +class Libnfs < Formula + desc "C client library for NFS" + homepage "https://github.com/sahlberg/libnfs" + url "https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-6.0.2.tar.gz" + sha256 "4e5459cc3e0242447879004e9ad28286d4d27daa42cbdcde423248fad911e747" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2e9065bfd3abd3ffe1d38f5637551210ee628b9512eedeb4d30ec5889c2cd346" + sha256 cellar: :any, arm64_sonoma: "146e3c3bff06a7f0235889cc38a392f4fa2a0371a03523f697a764b2c59ee770" + sha256 cellar: :any, arm64_ventura: "d7e4428a240be4fd0c4fec619de6b93846305156b054b8e813917a2a70a17a26" + sha256 cellar: :any, sonoma: "4509c2de7ad0dc7583d3d4ad6f17719eaf306adf33dcc5e8b272a69c153aa276" + sha256 cellar: :any, ventura: "15287f2942eb74117211df3c6b6bdb9bda26755f4d725c6e355bde38e162e7ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4e709afbb129aa4d910765a61d1c6ad522a793d864d2fc23b42300573a933cf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0477428f6b57eb2ebc18e86a9c62951d42623dfb516b6f8e6b409625f943a233" + end + + depends_on "cmake" => :build + depends_on "docbook" => :build + depends_on "docbook-xsl" => :build + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + system "cmake", "-S", ".", "-B", "build", "-DENABLE_DOCUMENTATION=ON", "-DENABLE_UTILS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match "No URL specified", shell_output("#{bin}/nfs-ls 2>&1", 1) + + (testpath/"test.c").write <<~C + #if defined(__linux__) + # include + #endif + #include + #include + + int main(void) + { + int result = 1; + struct nfs_context *nfs = NULL; + nfs = nfs_init_context(); + + if (nfs != NULL) { + result = 0; + nfs_destroy_context(nfs); + } + + return result; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lnfs", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libnftnl.rb b/Formula/lib/libnftnl.rb new file mode 100644 index 0000000000000..977da9d1d9080 --- /dev/null +++ b/Formula/lib/libnftnl.rb @@ -0,0 +1,34 @@ +class Libnftnl < Formula + desc "Netfilter library providing interface to the nf_tables subsystem" + homepage "https://netfilter.org/projects/libnftnl/" + url "https://www.netfilter.org/pub/libnftnl/libnftnl-1.2.9.tar.xz" + sha256 "e8c216255e129f26270639fee7775265665a31b11aa920253c3e5d5d62dfc4b8" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.netfilter.org/projects/libnftnl/downloads.html" + regex(/href=.*?libnftnl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "115eff122c8a59428839095a6c47ee36fcc60efb1fe28a6ce1c9120e32213641" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7077fb58a3c953a76ee5c54dd05a72005432161e9f9db04678e8d621c85e2dc6" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "libmnl" + depends_on :linux + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + pkgshare.install "examples" + inreplace pkgshare/"examples/Makefile", Superenv.shims_path/"ld", "ld" + end + + test do + flags = shell_output("pkgconf --cflags --libs libnftnl libmnl").chomp.split + system ENV.cc, pkgshare/"examples/nft-set-get.c", "-o", "nft-set-get", *flags + assert_match "error: Operation not permitted", shell_output("./nft-set-get inet 2>&1", 1) + end +end diff --git a/Formula/lib/libnghttp2.rb b/Formula/lib/libnghttp2.rb new file mode 100644 index 0000000000000..7363220a51121 --- /dev/null +++ b/Formula/lib/libnghttp2.rb @@ -0,0 +1,67 @@ +class Libnghttp2 < Formula + desc "HTTP/2 C Library" + homepage "https://nghttp2.org/" + url "https://github.com/nghttp2/nghttp2/releases/download/v1.65.0/nghttp2-1.65.0.tar.gz" + mirror "http://fresh-center.net/linux/www/nghttp2-1.65.0.tar.gz" + mirror "http://fresh-center.net/linux/www/legacy/nghttp2-1.65.0.tar.gz" + # this legacy mirror is for user to install from the source when https not working for them + # see discussions in here, https://github.com/Homebrew/homebrew-core/pull/133078#discussion_r1221941917 + sha256 "8ca4f2a77ba7aac20aca3e3517a2c96cfcf7c6b064ab7d4a0809e7e4e9eb9914" + license "MIT" + + livecheck do + formula "nghttp2" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "492e4dadaeb76e53e56b15180eb4ab33d8e726d5766f258f94d3628382e7a8e2" + sha256 cellar: :any, arm64_sonoma: "fa2ef36dadacb754e7233697f80a8929010e249b35dff577c86d1cf88f0ece49" + sha256 cellar: :any, arm64_ventura: "8ae17c6bc3f4231f6239597d64c6cc17e9c552f9fd04c0c99cdae6c5caf8f273" + sha256 cellar: :any, sonoma: "523994aa28f56be6c23161889273d48ce9a964acfe3517768c41cf46359e27e8" + sha256 cellar: :any, ventura: "3a82bc9d1b8d32592ac19ed10d06d85405a8bfc1b180005acb757f46712f2081" + sha256 cellar: :any_skip_relocation, arm64_linux: "ca8b0e4aafcb18a1c12fa4457c849856f556e76507840ec95ded08f86f3b5e3f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ee76cd74e324adca6f90d555ae9417164b66290a83ade8d10c272967fa85853" + 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 + + # These used to live in `nghttp2`. + link_overwrite "include/nghttp2" + link_overwrite "lib/libnghttp2.a" + link_overwrite "lib/libnghttp2.dylib" + link_overwrite "lib/libnghttp2.14.dylib" + link_overwrite "lib/libnghttp2.so" + link_overwrite "lib/libnghttp2.so.14" + link_overwrite "lib/pkgconfig/libnghttp2.pc" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--enable-lib-only", *std_configure_args + system "make", "-C", "lib" + system "make", "-C", "lib", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + nghttp2_info *info = nghttp2_version(0); + printf("%s", info->version_str); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lnghttp2", "-o", "test" + assert_equal version.to_s, shell_output("./test") + end +end diff --git a/Formula/lib/libnghttp3.rb b/Formula/lib/libnghttp3.rb new file mode 100644 index 0000000000000..621fe7d6e2117 --- /dev/null +++ b/Formula/lib/libnghttp3.rb @@ -0,0 +1,47 @@ +class Libnghttp3 < Formula + desc "HTTP/3 library written in C" + homepage "https://nghttp2.org/nghttp3/" + url "https://github.com/ngtcp2/nghttp3.git", + tag: "v1.9.0", + revision: "9ee0c9248f97c502cce01e6c8edcccd3723c61e6" + license "MIT" + head "https://github.com/ngtcp2/nghttp3.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "07df76d04a3b7879cc6669a4da943f26190d90f997a032d299bc5e63dab18f65" + sha256 cellar: :any, arm64_sonoma: "ad6f7c387f7f244a2032d6a3dfb61029b9faeeb4c6d90f892ca98e4ccfaa098f" + sha256 cellar: :any, arm64_ventura: "616f5c0613555d9a5f04744c6c73c43cecaeb98679542c5d65d9d1eaaa9edc94" + sha256 cellar: :any, sonoma: "07812e22007268bdde352348ba8e53dd309f76a7f48543866ea3c2eada1afb17" + sha256 cellar: :any, ventura: "42ea9a7b21c4860e5eceb6012a4d3d84f4be6d1df76c4189ea6ac73426e5da0d" + sha256 cellar: :any_skip_relocation, arm64_linux: "8de8c24f2bc68715f84d65f7e57a3227422b21e40d36167efee2d602706fbc0c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca820a826f6bfd1895dc78a7b371f13928929000415316360253747e349a77af" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + + def install + system "cmake", "-S", ".", "-B", "build", "-DENABLE_LIB_ONLY=1", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(void) { + nghttp3_qpack_decoder *decoder; + if (nghttp3_qpack_decoder_new(&decoder, 4096, 0, nghttp3_mem_default()) != 0) { + return 1; + } + nghttp3_qpack_decoder_del(decoder); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libnghttp3").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libngspice.rb b/Formula/lib/libngspice.rb new file mode 100644 index 0000000000000..453fba7aff670 --- /dev/null +++ b/Formula/lib/libngspice.rb @@ -0,0 +1,61 @@ +class Libngspice < Formula + desc "Spice circuit simulator as shared library" + homepage "https://ngspice.sourceforge.io/" + url "https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/44.2/ngspice-44.2.tar.gz" + sha256 "e7dadfb7bd5474fd22409c1e5a67acdec19f77e597df68e17c5549bc1390d7fd" + license :cannot_represent + + livecheck do + formula "ngspice" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5a4bc846e0ffc9fa23d9c15509b5cf041de5c5dadcf476ffb167302b84f5bf75" + sha256 cellar: :any, arm64_sonoma: "be3d94c10d2554bcc43c71f7e6061005280929a551a6c96e3735dcd6060391d5" + sha256 cellar: :any, arm64_ventura: "63fbc552611b183799b6a0837db9c9f06c0d4f215ccfbfb0f6bc699343931804" + sha256 cellar: :any, sonoma: "27eb9642d676e757187eff463ea80dcd2c1bbecb0da4558f4d7c98792e8199b5" + sha256 cellar: :any, ventura: "9c9b8a825a59abf6e61518cedf952a3bb62929fa175ac23898603a3a7618c063" + sha256 cellar: :any_skip_relocation, arm64_linux: "22e30c641b1925c47f728f45f2fedeb7eede9447fb06f6449acb2cf25c24e6c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "151d4740e5f524966fa99db6635c338e5a70428b45b098c61ca23d38567fdfef" + end + + head do + url "https://git.code.sf.net/p/ngspice/ngspice.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 + args = %w[ + --with-ngshared + --enable-cider + --disable-openmp + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + + # remove script files + rm_r(Dir[share/"ngspice/scripts"]) + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int ng_exit(int status, bool immediate, bool quitexit, int ident, void *userdata) { + return status; + } + int main() { + return ngSpice_Init(NULL, NULL, ng_exit, NULL, NULL, NULL, NULL); + } + CPP + system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lngspice", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libnice-gstreamer.rb b/Formula/lib/libnice-gstreamer.rb new file mode 100644 index 0000000000000..a075f20095532 --- /dev/null +++ b/Formula/lib/libnice-gstreamer.rb @@ -0,0 +1,222 @@ +class LibniceGstreamer < Formula + desc "GStreamer Plugin for libnice" + homepage "https://wiki.freedesktop.org/nice/" + url "https://libnice.freedesktop.org/releases/libnice-0.1.22.tar.gz" + sha256 "a5f724cf09eae50c41a7517141d89da4a61ec9eaca32da4a0073faed5417ad7e" + license any_of: ["LGPL-2.1-only", "MPL-1.1"] + + livecheck do + formula "libnice" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "aa2003f8a95578016094c529b41b9e0afae4124421796c7917f2af3dee116c41" + sha256 cellar: :any, arm64_sonoma: "e78f31b88426c267bd4ccc9626494130fe1f02cf2279a2941f32b96f825e0742" + sha256 cellar: :any, arm64_ventura: "b2c462902cec4eb8b59e895c9b2cc9e027b42d1421dcf0f8199c9ee41bace504" + sha256 cellar: :any, sonoma: "f1289203e767492cbe9662b55f2a57f475756599cd76bee48496236f544bf52f" + sha256 cellar: :any, ventura: "919a1d68e6aee4608a4de25f0ca4db6e9619d8721f83c638b9426531116a92e4" + sha256 arm64_linux: "6fce42f6e93b85c2cee857d783c4ce310d41d53686ff54f6b7cdcabc50f1860f" + sha256 x86_64_linux: "7afcec37ace358ed8bbd079e36333af68605f2d592828ffdf3dc492c7dc7e963" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "glib" + depends_on "gnutls" + depends_on "gstreamer" + depends_on "libnice" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "intltool" => :build + end + + # Enable building only the gstreamer plugin + # https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/271 + patch :DATA + + def install + system "meson", "setup", "build", "-Dgstreamer=enabled", "-Dgstreamer-plugin-only=true", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + # Move the gstreamer plugin out of the way to prevent `brew link` conflicts. + libexec.install lib/"gstreamer-1.0" + end + + test do + system "gst-inspect-1.0", "--exists", "nicesrc" + end +end + +__END__ +From aa632be3d9f2e7ec309a1312ddb7ff4cc538ea2e Mon Sep 17 00:00:00 2001 +From: Nirbheek Chauhan +Date: Wed, 21 Feb 2024 18:15:51 +0530 +Subject: [PATCH] meson: Add an option to build only the gstreamer plugin + +This is one possible approach to break the circular dep between +gstreamer and libnice. +--- + .gitlab-ci.yml | 12 ++++++++++++ + gst/gstnicesink.h | 2 +- + gst/gstnicesrc.h | 2 +- + gst/meson.build | 3 ++- + meson.build | 32 +++++++++++++++++++++----------- + meson_options.txt | 2 ++ + 6 files changed, 39 insertions(+), 14 deletions(-) + +diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml +index 88102067..00b8dff1 100644 +--- a/.gitlab-ci.yml ++++ b/.gitlab-ci.yml +@@ -89,6 +89,18 @@ build: + paths: + - build/ + ++build gstreamer-plugin-only: ++ stage: build ++ extends: ++ - build ++ script: ++ ## && true to make gitlab-ci happy ++ - source scl_source enable rh-python36 && true ++ - meson --werror --warnlevel 2 -Dgtk_doc=enabled -Dgstreamer=disabled -Dgstreamer-plugin-only=false --prefix=$PREFIX -Db_coverage=true build_libs/ ++ - ninja -C build_libs install ++ - meson --werror --warnlevel 2 -Dgstreamer=enabled -Dgstreamer-plugin-only=true --prefix=$PREFIX -Db_coverage=true --pkg-config-path=$PREFIX/lib64/pkgconfig build_plugin/ ++ - ninja -C build_plugin/ install ++ + + .build windows: + image: 'registry.freedesktop.org/gstreamer/gstreamer/amd64/windows:2023-08-24.0-main' +diff --git a/gst/gstnicesink.h b/gst/gstnicesink.h +index b9e6e6c5..49c2d5ce 100644 +--- a/gst/gstnicesink.h ++++ b/gst/gstnicesink.h +@@ -41,7 +41,7 @@ + #include + #include + +-#include ++#include + + G_BEGIN_DECLS + +diff --git a/gst/gstnicesrc.h b/gst/gstnicesrc.h +index 9d00bfaa..8b906e6f 100644 +--- a/gst/gstnicesrc.h ++++ b/gst/gstnicesrc.h +@@ -41,7 +41,7 @@ + #include + #include + +-#include ++#include + + G_BEGIN_DECLS + +diff --git a/gst/meson.build b/gst/meson.build +index 4ed4794f..31e3e5fb 100644 +--- a/gst/meson.build ++++ b/gst/meson.build +@@ -8,10 +8,11 @@ gst_nice_args = ['-DGST_USE_UNSTABLE_API'] + + gst_plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') + ++configure_file(output : 'config.h', configuration : cdata) ++ + libgstnice = library('gstnice', + gst_nice_sources, + c_args : gst_nice_args, +- include_directories: nice_incs, + dependencies: [libnice_dep, gst_dep], + install_dir: gst_plugins_install_dir, + install: true) +diff --git a/meson.build b/meson.build +index 4faffb40..81cd7eaf 100644 +--- a/meson.build ++++ b/meson.build +@@ -31,6 +31,7 @@ nice_datadir = join_paths(get_option('prefix'), get_option('datadir')) + + cc = meson.get_compiler('c') + static_build = get_option('default_library') == 'static' ++gstreamer_plugin_only = get_option('gstreamer-plugin-only') + + syslibs = [] + +@@ -79,12 +80,17 @@ add_project_arguments('-D_GNU_SOURCE', + '-DHAVE_CONFIG_H', + '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_' + glib_req_minmax_str, + '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_' + glib_req_minmax_str, +- '-DNICE_VERSION_MAJOR=' + version_major, +- '-DNICE_VERSION_MINOR=' + version_minor, +- '-DNICE_VERSION_MICRO=' + version_micro, +- '-DNICE_VERSION_NANO=' + version_nano, + language: 'c') + ++if not gstreamer_plugin_only ++ add_project_arguments( ++ '-DNICE_VERSION_MAJOR=' + version_major, ++ '-DNICE_VERSION_MINOR=' + version_minor, ++ '-DNICE_VERSION_MICRO=' + version_micro, ++ '-DNICE_VERSION_NANO=' + version_nano, ++ language: 'c') ++endif ++ + cdata = configuration_data() + + cdata.set_quoted('PACKAGE_STRING', meson.project_name()) +@@ -296,11 +302,15 @@ endif + + gir = find_program('g-ir-scanner', required : get_option('introspection')) + +-subdir('agent') +-subdir('stun') +-subdir('socket') +-subdir('random') +-subdir('nice') ++if gstreamer_plugin_only ++ libnice_dep = dependency('nice', version: '=' + meson.project_version()) ++else ++ subdir('agent') ++ subdir('stun') ++ subdir('socket') ++ subdir('random') ++ subdir('nice') ++endif + + if gst_dep.found() + subdir('gst') +@@ -316,11 +326,11 @@ else + endif + endif + +-if not get_option('tests').disabled() ++if not gstreamer_plugin_only and not get_option('tests').disabled() + subdir('tests') + endif + +-if not get_option('examples').disabled() ++if not gstreamer_plugin_only and not get_option('examples').disabled() + subdir('examples') + endif + +diff --git a/meson_options.txt b/meson_options.txt +index cd980cb5..cd7c879b 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -2,6 +2,8 @@ option('gupnp', type: 'feature', value: 'auto', + description: 'Enable or disable GUPnP IGD support') + option('gstreamer', type: 'feature', value: 'auto', + description: 'Enable or disable build of GStreamer plugins') ++option('gstreamer-plugin-only', type: 'boolean', value: 'false', ++ description: 'Only build the gstreamer plugin, for breaking the circular dependency') + option('ignored-network-interface-prefix', type: 'array', value: ['docker', 'veth', 'virbr', 'vnet'], + description: 'Ignore network interfaces whose name starts with a string from this list in the ICE connection check algorithm. For example, "virbr" to ignore virtual bridge interfaces added by virtd, which do not help in finding connectivity.') + option('crypto-library', type: 'combo', choices : ['auto', 'gnutls', 'openssl'], value : 'auto') +-- +GitLab diff --git a/Formula/lib/libnice.rb b/Formula/lib/libnice.rb new file mode 100644 index 0000000000000..d17a481796229 --- /dev/null +++ b/Formula/lib/libnice.rb @@ -0,0 +1,69 @@ +class Libnice < Formula + desc "GLib ICE implementation" + homepage "https://wiki.freedesktop.org/nice/" + url "https://libnice.freedesktop.org/releases/libnice-0.1.22.tar.gz" + sha256 "a5f724cf09eae50c41a7517141d89da4a61ec9eaca32da4a0073faed5417ad7e" + license any_of: ["LGPL-2.1-only", "MPL-1.1"] + + livecheck do + url "https://github.com/libnice/libnice.git" + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "e1f4f8532d745a6555e861c342f56ec7a0d0b827f13b4e80c4d6218857b3ae2f" + sha256 cellar: :any, arm64_sonoma: "9582197a0a9f71c2e6751c739c24027e55294303a1ca878091a751513898417d" + sha256 cellar: :any, arm64_ventura: "14745e9ade6980ce27101f8be9ea209180aabd691628f908acac939e8249a3e2" + sha256 cellar: :any, sonoma: "bfa1f6813b1bc1fe0be25937d85b2eeff7288b8f93b1c5e70c3a1e72562febfb" + sha256 cellar: :any, ventura: "e50b4f94bf2ec4bf8248bf41a32ea1af1fdc512037b1d6d7919cbbf14048d00b" + sha256 arm64_linux: "b7ea837e5b54eaf09849dd773a4af189817ec6ffda519323f300899151f05a77" + sha256 x86_64_linux: "6805ee9bd44ec5f3573d1fc688d2beac5971904de5996c1239d406de74a37965" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "glib" + depends_on "gnutls" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "intltool" => :build + end + + def install + system "meson", "setup", "build", "-Dgstreamer=disabled", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + # Based on https://github.com/libnice/libnice/blob/HEAD/examples/simple-example.c + (testpath/"test.c").write <<~C + #include + int main(int argc, char *argv[]) { + NiceAgent *agent; + GMainLoop *gloop; + gloop = g_main_loop_new(NULL, FALSE); + // Create the nice agent + agent = nice_agent_new(g_main_loop_get_context (gloop), + NICE_COMPATIBILITY_RFC5245); + if (agent == NULL) + g_error("Failed to create agent"); + + g_main_loop_unref(gloop); + g_object_unref(agent); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs nice").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libnids.rb b/Formula/lib/libnids.rb new file mode 100644 index 0000000000000..ffadd19961134 --- /dev/null +++ b/Formula/lib/libnids.rb @@ -0,0 +1,54 @@ +class Libnids < Formula + desc "Implements E-component of network intrusion detection system" + homepage "https://libnids.sourceforge.net/" + url "https://downloads.sourceforge.net/project/libnids/libnids/1.24/libnids-1.24.tar.gz" + sha256 "314b4793e0902fbf1fdb7fb659af37a3c1306ed1aad5d1c84de6c931b351d359" + license "GPL-2.0-only" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "d746ed3de1862ca17be880cebad94a8a66579dedf5c33ddf40890b740917e1a1" + sha256 cellar: :any, arm64_sonoma: "39c7a9270f72443e129a815d5c6599739198425e9266e8adea4f14b577d8186c" + sha256 cellar: :any, arm64_ventura: "a9b786affb4887f607fabbe0df202bdf0d1601ae3210afbf6337577a23ca49ef" + sha256 cellar: :any, arm64_monterey: "085e5576236a751d84a975412ef34f206f2eb0c639c826dde4a7298cea4f00d3" + sha256 cellar: :any, arm64_big_sur: "6c7f242b8c5564eebc95837bf61f5760b88e2e543772357d43132921f20f858d" + sha256 cellar: :any, sonoma: "72f08c9f851a4d6da704af5d7b96dad3860fc88697481db5005a0adde6f1ab44" + sha256 cellar: :any, ventura: "38b6e4dea05881c126f5abfaa13e8f4c8e5435cf6e51a135ce1c3fd10c120227" + sha256 cellar: :any, monterey: "bb00ea7f83f736bb27b63da94cd2fe4ad077c5aab62a357a4e996fa2cc98e123" + sha256 cellar: :any, big_sur: "0235b5bccac955c60852984ed13fa3213e3ccad9c0fe36ae522b5ac53f1f2a42" + sha256 cellar: :any, catalina: "0cd6c420a38ea61eb8abe96b6b2f754bddf1ca5583b3dbccfb1b268990426764" + sha256 cellar: :any, mojave: "175d04b2db4bc65923eed696272339f4533ea8277ec64f01ba6a2b9a6019c8d6" + sha256 cellar: :any, high_sierra: "e9e968ec057ae597b39c45ff1e804fde87f265c6783e62cb70e009ecc4aafd05" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce70446aaf3217c926bd5ec5df544ce4749a5a91553b3fcb2d111d6a5597727e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "53191548aacc1a482ec1bec888da8809da4c17b7b88e631b7c725acce36456e9" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libnet" + + uses_from_macos "libpcap" + + on_macos do + depends_on "gettext" + end + + # Patch fixes -soname and .so shared library issues. Unreported. + patch do + on_macos do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9dc80757ba32bf5d818d70fc26bb24b6f/libnids/1.24.patch" + sha256 "d9339c16f89915a02025f10f26aab5bb77c2af85926d2d9ff52e9c7bf2092215" + end + end + + def install + # autoreconf the old 2005 era code for sanity. + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}", + "--enable-shared" + system "make", "install" + end +end diff --git a/Formula/lib/libnl.rb b/Formula/lib/libnl.rb new file mode 100644 index 0000000000000..ad97656705598 --- /dev/null +++ b/Formula/lib/libnl.rb @@ -0,0 +1,63 @@ +class Libnl < Formula + desc "Netlink Library Suite" + homepage "https://github.com/thom311/libnl" + url "https://github.com/thom311/libnl/releases/download/libnl3_11_0/libnl-3.11.0.tar.gz" + sha256 "2a56e1edefa3e68a7c00879496736fdbf62fc94ed3232c0baba127ecfa76874d" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_linux: "cf02f2e5551dbb36e507e97a53c96710e6e7042232de601fe8f23bd92f0d3e65" + sha256 x86_64_linux: "4f38d449757989f549668b55ff19e6d5a19d574c720bb15e3543b15564db966b" + end + + depends_on "bison" => :build + depends_on "flex" => :build + depends_on "pkgconf" => :test + depends_on :linux # Netlink sockets are only available in Linux. + + def install + system "./configure", "--disable-silent-rules", "--sysconfdir=#{etc}", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + #include + + int main(int argc, char *argv[]) + { + struct rtnl_link *link; + struct nl_sock *sk; + int err; + + sk = nl_socket_alloc(); + if ((err = nl_connect(sk, NETLINK_ROUTE)) < 0) { + nl_perror(err, "Unable to connect socket"); + return err; + } + + link = rtnl_link_alloc(); + rtnl_link_set_name(link, "my_bond"); + + if ((err = rtnl_link_delete(sk, link)) < 0) { + nl_perror(err, "Unable to delete link"); + return err; + } + + rtnl_link_put(link); + nl_close(sk); + + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libnl-3.0 libnl-route-3.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + assert_match "Unable to delete link: Operation not permitted", shell_output("./test 2>&1", 228) + + assert_match "inet 127.0.0.1", shell_output("#{bin}/nl-route-list") + end +end diff --git a/Formula/lib/libnotify.rb b/Formula/lib/libnotify.rb new file mode 100644 index 0000000000000..59248a20b8f36 --- /dev/null +++ b/Formula/lib/libnotify.rb @@ -0,0 +1,60 @@ +class Libnotify < Formula + desc "Library that sends desktop notifications to a notification daemon" + homepage "https://gitlab.gnome.org/GNOME/libnotify" + url "https://download.gnome.org/sources/libnotify/0.8/libnotify-0.8.6.tar.xz" + sha256 "c5540aaefb60e1d63b1c587c05f2284ebe72ece7d0c0e5e4a778cfd5844b6b58" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ea69f7b5455c3a6541cf0860074b7b6e3e68e6bbb48c64cb4cc6221e6ce8dde9" + sha256 cellar: :any, arm64_sonoma: "ebea4c89f379ab596f73e8613cdb45085b91995f8ab225b22abc9143ef3418c6" + sha256 cellar: :any, arm64_ventura: "d4c06f68f3f4fd97e56695bb166a806488f78ccd6d677d943d2a49bde302aef7" + sha256 cellar: :any, sonoma: "d6a909e188f2dff4caa76a5c8cdc1204cb8b8e6cf752cefb5dd8e25b19be774f" + sha256 cellar: :any, ventura: "75bab3ee807d8c9f36a039b973279f8e154bd29d9a2cbcf533141b82bced5450" + sha256 arm64_linux: "995dc473382763e33a51546b3ae69ba723c5cb5815e1a5f688f9c17e62ba9b42" + sha256 x86_64_linux: "f040cf5598067f5d9af35c90bd5df9520f5a3d422c78a1b0fd01c01ddcbee021" + end + + depends_on "docbook-xsl" => :build + depends_on "gobject-introspection" => :build + depends_on "gtk-doc" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "gdk-pixbuf" + depends_on "glib" + + on_macos do + depends_on "gettext" + end + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + args = %w[ + -Dgtk_doc=false + -Dman=false + -Dtests=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.c").write <<~C + #include + + int main(int argc, char *argv[]) { + g_assert_true(notify_init("testapp")); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libnotify").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libnova.rb b/Formula/lib/libnova.rb new file mode 100644 index 0000000000000..75603f926075d --- /dev/null +++ b/Formula/lib/libnova.rb @@ -0,0 +1,54 @@ +class Libnova < Formula + desc "Celestial mechanics, astrometry and astrodynamics library" + homepage "https://libnova.sourceforge.net/" + url "https://downloads.sourceforge.net/project/libnova/libnova/v%200.15.0/libnova-0.15.0.tar.gz" + sha256 "7c5aa33e45a3e7118d77df05af7341e61784284f1e8d0d965307f1663f415bb1" + # libnova is LGPL but the libnovaconfig binary is GPL + license all_of: ["LGPL-2.0-or-later", "GPL-2.0-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "7c78e76239a8d99361a578d2726073d7cc300261a68effe3c189dd1edc2fbb4f" + sha256 cellar: :any, arm64_sonoma: "956371a814a279005c8b801707b40d0d7dce699c481f0bcac0ceb8cf8932505e" + sha256 cellar: :any, arm64_ventura: "41b9fe3eebdd1080259efefd73a04754c9e0837ee15abb839123d41e53019499" + sha256 cellar: :any, arm64_monterey: "ea8ac3b10dcebb0b96b1d6f1ae08b71be65186fa64c8c4e5b06b512092608b6d" + sha256 cellar: :any, arm64_big_sur: "4b63bdd901dfc329c9c6caf41a0bb370f5b459f21ec5b09366c364156c38bd06" + sha256 cellar: :any, sonoma: "c2a0fd325e308410db0936384e54896d02b00dbd1be5513de8345e95455dfc55" + sha256 cellar: :any, ventura: "9e1f443063d01b844c19e6bee2e38d70fe102c8a130378b13167105aa25ea4d5" + sha256 cellar: :any, monterey: "0d520f6d78a8f7cd971fbd36897cb9d442ee2da93c3701d724e8b4eb7195858f" + sha256 cellar: :any, big_sur: "73650301b811cdf4d5aaaab55961708ac3ccede6900f61222a3dcf94a0b9f4fe" + sha256 cellar: :any, catalina: "d7f6515e6a018fd9b9fb47d25610e62cef4f0953fa3c33c7fb3499d5ed0e3f1b" + sha256 cellar: :any, mojave: "2bcc962108ffee6fafeae45e5b9eb8f6b233bd2aaa0163f6c89e2f77ddc6eb3f" + sha256 cellar: :any, high_sierra: "08345c100121f219e199a833563b8f35d17e5368b93e3711377cc20acd0dce99" + sha256 cellar: :any, sierra: "1ef1a9898b97967ba9cabdf002ddcc4b398976f0c9bb7c826f7980ffaef87dd4" + sha256 cellar: :any_skip_relocation, arm64_linux: "a6d298d08f8835795b6d9051626344d25e7f88725ed2b9a5a1b7a098f75438aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "41b0f8cff7affaeb1f8df48a2f13e4ce0fda9ad886c73ec3ada492cd1c9e862c" + 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 + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(void) + { + double JD; + + JD = ln_get_julian_from_sys(); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lnova", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libnsbmp.rb b/Formula/lib/libnsbmp.rb new file mode 100644 index 0000000000000..6a4e20b8f4a14 --- /dev/null +++ b/Formula/lib/libnsbmp.rb @@ -0,0 +1,59 @@ +class Libnsbmp < Formula + desc "Decoding library for BMP and ICO image file formats" + homepage "https://www.netsurf-browser.org/projects/libnsbmp/" + url "https://download.netsurf-browser.org/libs/releases/libnsbmp-0.1.7-src.tar.gz" + sha256 "5407a7682a122baaaa5a15b505290e2d37df54c13c5edef4b09d12c862d82293" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?libnsbmp[._-]v?(\d+(?:\.\d+)+)[._-]src\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "334b42b3b30917e7cb0850b079cced2c020a9ffe8389d1a703ffcd2896f64a22" + sha256 cellar: :any, arm64_sonoma: "9a29a254a2f286b15219fa8e1b95858569fe653728184fa20b83130eb67d5f23" + sha256 cellar: :any, arm64_ventura: "52b3d890d4ed6f2a9763b7848ca24955059fdeb61b1f097dc230e343f44547c6" + sha256 cellar: :any, arm64_monterey: "c2c58f67547e5a4cfc4c717bbd303cc30542e767632be818af61de3a5b43c25f" + sha256 cellar: :any, sonoma: "11b45814407dd3a3d4ba8976717cf1a64b425fe776e13d93caa96bb489ff8a6e" + sha256 cellar: :any, ventura: "e6ae9d7f2d428e878b319086665048a1a58d4b1f6eb96a9c88106f13cbe81968" + sha256 cellar: :any, monterey: "e67ef1fb84121dcea357001d14e1b2fc6614f0dcb36bda9ce06cb291acf24bf5" + sha256 cellar: :any_skip_relocation, arm64_linux: "b5f8e356d95975d6cd0756b0a426cd43abfa1803755b224b6361bf7df5094230" + sha256 cellar: :any_skip_relocation, x86_64_linux: "86f827dd9ea13403f33582394b79f80f88117747da6bbbae89d70cde8cef8615" + end + + depends_on "netsurf-buildsystem" => :build + + def install + args = %W[ + NSSHARED=#{Formula["netsurf-buildsystem"].opt_pkgshare} + PREFIX=#{prefix} + ] + + system "make", "install", "COMPONENT_TYPE=lib-shared", *args + system "make", "install", "COMPONENT_TYPE=lib-static", *args + + # Also include an example, for use in test block + inreplace "test/decode_bmp.c", "\"../include/libnsbmp.h\"", "" + pkgshare.install "test/decode_ico.c" + end + + test do + system ENV.cc, pkgshare/"decode_ico.c", "-I#{include}", "-L#{lib}", "-lnsbmp", "-o", "decode_ico" + + expected_output = <<~EOS + P7 + # #{test_fixtures("test.ico")} + WIDTH 8 + HEIGHT 8 + DEPTH 4 + MAXVAL 255 + TUPLTYPE RGB_ALPHA + ENDHDR + EOS + + # Image is 8 x 8 = 64 px of pure blue, expressed as RGBA + expected_output = expected_output.bytes + ([0, 0, 255, 255] * 64) + assert_equal expected_output, shell_output("#{testpath}/decode_ico #{test_fixtures("test.ico")}").bytes + end +end diff --git a/Formula/lib/libnsgif.rb b/Formula/lib/libnsgif.rb new file mode 100644 index 0000000000000..efc0f494b9527 --- /dev/null +++ b/Formula/lib/libnsgif.rb @@ -0,0 +1,56 @@ +class Libnsgif < Formula + desc "Decoding library for the GIF image file format" + homepage "https://www.netsurf-browser.org/projects/libnsgif/" + url "https://download.netsurf-browser.org/libs/releases/libnsgif-1.0.0-src.tar.gz" + sha256 "6014c842f61454d2f5a0f8243d7a8d7bde9b7da3ccfdca2d346c7c0b2c4c061b" + license "MIT" + head "https://git.netsurf-browser.org/libnsgif.git", branch: "master" + + livecheck do + url :homepage + regex(/href=.*?libnsgif[._-]v?(\d+(?:\.\d+)+)[._-]src\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1b496d526be94479c22a33a721be3f7c5afe6ec2c0c62d2a9be03b04cce5cb19" + sha256 cellar: :any, arm64_sonoma: "fb3bd5d0ed63cb47edc86bded832614216985a5f020d4d3e9acf28c05a7d0d8b" + sha256 cellar: :any, arm64_ventura: "4ab139b0fdd222e35bcbfed812dcc51b330b3ba6349177cb5032b48c5b4d7af8" + sha256 cellar: :any, arm64_monterey: "8c885328683eea466ae2ca2006464e4c5b99417f73bd5cec07434509d64c734e" + sha256 cellar: :any, sonoma: "7cd6863f98da0e27df13a0a97e80a346077c055408386a7a38dbe60ed67a6ec7" + sha256 cellar: :any, ventura: "09d9fcad4d83227aec32245847c57beb11a30a5cb8f65ff91977c90cec0e8f0a" + sha256 cellar: :any, monterey: "c9d626fb8d00576af6ab58d5b64c5485d176969bda7160bccc853f636b910211" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7dc3ff5a7922684bd75589aa24b77305fe31093ad5b14fdfb3f626f9631035e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7daa143db902d9ecc5a9133f4a82a430c6c4bd14bd5de120f879c82a39b1fb91" + end + + depends_on "netsurf-buildsystem" => :build + + def install + args = %W[ + NSSHARED=#{Formula["netsurf-buildsystem"].opt_pkgshare} + PREFIX=#{prefix} + ] + + system "make", "install", "COMPONENT_TYPE=lib-shared", *args + system "make", "install", "COMPONENT_TYPE=lib-static", *args + + # Adjust and keep a copy of tests for test block + inreplace "test/nsgif.c", "\"../include/nsgif.h\"", "" + pkgshare.install "test" + end + + test do + args = %W[ + -I#{include} + -L#{lib} + -lnsgif + -o test_nsgif + ] + + system ENV.cc, pkgshare/"test/nsgif.c", *args + cd pkgshare do + output = shell_output("test/runtest.sh #{testpath}") + assert_match "Fail:0 Error:0", output + end + end +end diff --git a/Formula/lib/libnsl.rb b/Formula/lib/libnsl.rb new file mode 100644 index 0000000000000..424230d77247f --- /dev/null +++ b/Formula/lib/libnsl.rb @@ -0,0 +1,60 @@ +class Libnsl < Formula + desc "Public client interface for NIS(YP) and NIS+" + homepage "https://github.com/thkukuk/libnsl" + url "https://github.com/thkukuk/libnsl/releases/download/v2.0.1/libnsl-2.0.1.tar.xz" + sha256 "5c9e470b232a7acd3433491ac5221b4832f0c71318618dc6aa04dd05ffcd8fd9" + license "LGPL-2.1-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "b5f2c97b5782dfde6d350ebe54cacf87db18a1626afcf91998aaa8d6c5930890" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa7613b30e9bfe15166339d119c19115ec21f13cea259280182e0c083502ff40" + end + + depends_on "pkgconf" => :build + depends_on "libtirpc" + depends_on :linux + + link_overwrite "include/rpcsvc" + link_overwrite "lib/libnsl.a" + link_overwrite "lib/libnsl.so" + + def install + system "./configure", *std_configure_args, + "--disable-silent-rules" + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~'EOS' + #include + + int main(int argc, char *argv[]) { + char *domain; + switch (yp_get_default_domain(&domain)) { + case YPERR_SUCCESS: + printf("Domain: %s\n", domain); + return 0; + case YPERR_NODOM: + printf("No domain\n"); + return 0; + default: + return 1; + } + } + EOS + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lnsl", "-o", "test" + + domain = Utils.popen_read("ypdomainname").chomp + domain_exists = $CHILD_STATUS.success? + + output = shell_output("./test").chomp + if domain_exists + assert_equal "Domain: #{domain}", output + else + assert_equal "No domain", output + end + end +end diff --git a/Formula/lib/libntlm.rb b/Formula/lib/libntlm.rb new file mode 100644 index 0000000000000..2af815db9784f --- /dev/null +++ b/Formula/lib/libntlm.rb @@ -0,0 +1,39 @@ +class Libntlm < Formula + desc "Implements Microsoft's NTLM authentication" + homepage "https://gitlab.com/gsasl/libntlm/" + url "https://download.savannah.nongnu.org/releases/libntlm/libntlm-1.8.tar.gz" + sha256 "ce6569a47a21173ba69c990965f73eb82d9a093eb871f935ab64ee13df47fda1" + license "LGPL-2.1-or-later" + + livecheck do + url "https://download.savannah.nongnu.org/releases/libntlm/" + regex(/href=.*?libntlm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "bebdb2ee8c5ef33fc95cd079147d06234b5661f869b6a88d23d68d4abd6fb28f" + sha256 cellar: :any, arm64_sonoma: "2629d0038710546db1d05c77d273189bed4554ab7b6f7e67444a80b6fd52cb0d" + sha256 cellar: :any, arm64_ventura: "6a07ff33c447c44d0271951ff00810244d7e46fbdbbefa3697533d442e807f31" + sha256 cellar: :any, arm64_monterey: "3cdeede8fb7af5aeaf2e29d7a2c1b8d77f49602830eb7cda1bd541bcc468d379" + sha256 cellar: :any, sonoma: "a7d7f2c53526d724adea9d98fbef0219052797daef5ef6d0e3f12ebe38a105e7" + sha256 cellar: :any, ventura: "d01d0c60d1f35088786efd8b5a4f943a6feaeb5f03f484e43dfa342aba675877" + sha256 cellar: :any, monterey: "9d1dad1589edba9d4490611fb7a8499e8d2ab0c89f23a81f1d3426aec0b755a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "aef30b36aec73ef9fd25107d285a8400151815df28e9c361ccfce157d8e7bedc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ebc4d50ef8a904ec1c686c8e869a83d727c55fd490990fb5481d6a34b970ce1" + end + + def install + system "./configure", "--disable-silent-rules", + *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + pkgshare.install "config.h", "test_ntlm.c", "test.txt", "lib/md4-stream.c", "lib/md4.c", "lib/md4.h" + pkgshare.install "lib/byteswap.h" if OS.mac? + end + + test do + cp pkgshare.children, testpath + system ENV.cc, "test_ntlm.c", "md4-stream.c", "md4.c", "-I#{testpath}", "-L#{lib}", "-lntlm", + "-DNTLM_SRCDIR=\"#{testpath}\"", "-o", "test_ntlm" + system "./test_ntlm" + end +end diff --git a/Formula/lib/libnxml.rb b/Formula/lib/libnxml.rb new file mode 100644 index 0000000000000..4f45f6cd8fad7 --- /dev/null +++ b/Formula/lib/libnxml.rb @@ -0,0 +1,79 @@ +class Libnxml < Formula + desc "C library for parsing, writing, and creating XML files" + homepage "https://github.com/bakulf/libnxml" + url "https://github.com/bakulf/libnxml/archive/refs/tags/0.18.5.tar.gz" + sha256 "263d6424db3cd5f17a9f6300594548e82449ed22af59e9e5534646fa0dabd6a7" + license "LGPL-2.1-or-later" + head "https://github.com/bakulf/libnxml.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3e49138d11e9bb15e135e9387bb4e1f1d55a7daa354b3caa245e9b25a1b5ace0" + sha256 cellar: :any, arm64_sonoma: "c7287e418f649ae7a95a152feb06cc43846a286ed8a5b511b490e4a2cac8d341" + sha256 cellar: :any, arm64_ventura: "6a57d9af9acf0588b0b58903248f8f116639f043bd6b1716d6592c459da3f658" + sha256 cellar: :any, arm64_monterey: "c6887b727e4b7254d5d90c7018cd60c80681624eb0fafe6e8075a8d8313ef6a7" + sha256 cellar: :any, sonoma: "b33e1d5aef9bbf9f058740832ee647c7c838c23bc2523105b3e1192059f01ddf" + sha256 cellar: :any, ventura: "5025007cfe5e551c8f0fba852bfadf3bc22f9d631548e6fd15c78fad5b927839" + sha256 cellar: :any, monterey: "2d3296d3ee6942ded48af843e36539242da4f5fea43cafc406dec3b69f7f5bcb" + sha256 cellar: :any_skip_relocation, arm64_linux: "aeae7a08c735c217cc5cc14eabddbcc883af5933aba7253e3fa020622a6783f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63bb969c6efc96d3bc6c97c4e8faa0dc918ed41bdf9d55e25f372f33b4c4d78e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + + uses_from_macos "curl" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.xml").write <<~XML + + Hello world!This is a child element. + XML + + (testpath/"test.c").write <<~C + #include + + int main(int argc, char **argv) { + nxml_t *data; + nxml_error_t err; + nxml_data_t *element; + char *buffer; + + data = nxmle_new_data_from_file("test.xml", &err); + if (err != NXML_OK) { + printf("Unable to read test.xml file"); + exit(1); + } + + element = nxmle_root_element(data, &err); + if (err != NXML_OK) { + printf("Unable to get root element"); + exit(1); + } + + buffer = nxmle_get_string(element, &err); + if (err != NXML_OK) { + printf("Unable to get string from root element"); + exit(1); + } + + printf("%s: %s\\n", element->value, buffer); + + free(buffer); + nxmle_free(data); + exit(0); + } + C + + flags = shell_output("pkgconf --cflags --libs nxml").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + assert_equal "root: Hello world!\n", shell_output("./test") + end +end diff --git a/Formula/lib/liboauth.rb b/Formula/lib/liboauth.rb new file mode 100644 index 0000000000000..8b0b2df70aa3d --- /dev/null +++ b/Formula/lib/liboauth.rb @@ -0,0 +1,45 @@ +class Liboauth < Formula + desc "C library for the OAuth Core RFC 5849 standard" + homepage "https://sourceforge.net/projects/liboauth/" + url "https://downloads.sourceforge.net/project/liboauth/liboauth-1.0.3.tar.gz" + sha256 "0df60157b052f0e774ade8a8bac59d6e8d4b464058cc55f9208d72e41156811f" + # if configured with '--enable-gpl' see COPYING.GPL and LICENSE.OpenSSL + # otherwise read COPYING.MIT + license "MIT" + revision 3 + + bottle do + sha256 cellar: :any, arm64_sequoia: "4eff11a4e53ab448c41469596fadeac63b03386c90c1f091372fc003f497562a" + sha256 cellar: :any, arm64_sonoma: "6f8593691c180a940c09d3cdb22c5f69fb4ac7dfb8877581b5cc13a02b6088a1" + sha256 cellar: :any, arm64_ventura: "a39ee9626caffc0652551afceb3de434b14f497d0e6f86888edfb987f0e46bfb" + sha256 cellar: :any, arm64_monterey: "14eb9710933a0f1e3974449b3451288160147295e1a941ed41720af29b62c9e2" + sha256 cellar: :any, arm64_big_sur: "76fdd8122c46982e11d80e4416c20f95a856c6ccdab50d94be6fffed926a52e6" + sha256 cellar: :any, sonoma: "82369227bbe96d217b653ca80bdb771a97fe5b4d2e04d581dea6a61396acc97a" + sha256 cellar: :any, ventura: "c428f77d8ce2e3ee3517782cfffcc442d6f136a98feaf969b9f0bc589a752ec0" + sha256 cellar: :any, monterey: "1ca737e530881673e82ccc350dfc769d1e30d6db94f5b77d2d2261216003f539" + sha256 cellar: :any, big_sur: "2a00f8fb82450e4acfec03f1e91dc74196ecf0150047b64a4357d6ac716d279c" + sha256 cellar: :any_skip_relocation, arm64_linux: "d590a572f38268fe5b4a9ec90877b436030fe6ef35564681bd8af45f15a66186" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0177a7a4378d03aa25b46b4bc37bc12b777438fa177ef15b0dd16406cfad40ef" + end + + depends_on "openssl@3" + + # Patch for compatibility with OpenSSL 1.1 + patch :p0 do + url "https://raw.githubusercontent.com/freebsd/freebsd-ports/121e6c77a8e6b9532ce6e45c8dd8dbf38ca4f97d/net/liboauth/files/patch-src_hash.c" + sha256 "a7b0295dab65b5fb8a5d2a9bbc3d7596b1b58b419bd101cdb14f79aa5cc78aea" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--disable-curl" + system "make", "install" + end +end diff --git a/Formula/lib/libobjc2.rb b/Formula/lib/libobjc2.rb new file mode 100644 index 0000000000000..8fd6f4cc17124 --- /dev/null +++ b/Formula/lib/libobjc2.rb @@ -0,0 +1,55 @@ +class Libobjc2 < Formula + desc "Objective-C runtime library intended for use with Clang" + homepage "https://github.com/gnustep/libobjc2" + url "https://github.com/gnustep/libobjc2/archive/refs/tags/v2.2.1.tar.gz" + sha256 "768ea8c5bd0999a29b5d15781125494f986456c1dc5c51d370fb31852cd31ea1" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "da763aa6b18675491c47b76136bab512f98cfbfa570e416f56ca803af99bad53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b71a49e26e6f376aea15f25c584ba70da3ea0c4cfbb7eaa0e66a52eb300ccb9" + end + + depends_on "cmake" => :build + # While libobjc2 is built with clang, it does not use any LLVM runtime libraries. + depends_on "llvm" => [:build, :test] + depends_on "robin-map" => :build + depends_on "pkgconf" => :test + # Clang explicitly forbids building Mach-O binaries of libobjc2. + # https://reviews.llvm.org/D46052 + # macOS provides an equivalent Objective-C runtime. + depends_on :linux + + # Clang must be used on Linux because GCC Objective-C support is insufficient. + fails_with :gcc + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Change Objective-C header path which assumes tests are being run in source tree. + inreplace ["Test/Test.h", "Test/Test.m"], "../objc", "objc" + pkgshare.install "Test" + end + + test do + # ENV.cc returns llvm_clang, which does not work in a test block. + ENV["CC"] = Formula["llvm"].opt_bin/"clang" + + # Copy over test library and header and runtime test. + cp pkgshare/"Test/Test.h", testpath + cp pkgshare/"Test/Test.m", testpath + cp pkgshare/"Test/RuntimeTest.m", testpath + + # First build test shared library and then link it to RuntimeTest. + flags = shell_output("pkgconf --cflags --libs libobjc").chomp.split + system ENV.cc, "Test.m", "-fobjc-runtime=gnustep-2.0", *flags, + "-fPIC", "-shared", "-o", "libTest.so" + system ENV.cc, "RuntimeTest.m", "-fobjc-runtime=gnustep-2.0", *flags, "-Wl,-rpath,#{lib}", + "-L#{testpath}", "-Wl,-rpath,#{testpath}", "-lTest", "-o", "RuntimeTest" + + # RuntimeTest deliberately throws a test exception and outputs this to stderr. + assert_match "testExceptions() ran", shell_output("./RuntimeTest 2>&1") + end +end diff --git a/Formula/lib/libodfgen.rb b/Formula/lib/libodfgen.rb new file mode 100644 index 0000000000000..dc9f9b052bd5e --- /dev/null +++ b/Formula/lib/libodfgen.rb @@ -0,0 +1,59 @@ +class Libodfgen < Formula + desc "ODF export library for projects using librevenge" + homepage "https://sourceforge.net/p/libwpd/wiki/libodfgen/" + url "https://dev-www.libreoffice.org/src/libodfgen-0.1.8.tar.xz" + mirror "https://downloads.sourceforge.net/project/libwpd/libodfgen/libodfgen-0.1.8/libodfgen-0.1.8.tar.xz" + sha256 "55200027fd46623b9bdddd38d275e7452d1b0ff8aeddcad6f9ae6dc25f610625" + license any_of: ["MPL-2.0", "LGPL-2.1-or-later"] + + livecheck do + url "https://dev-www.libreoffice.org/src/" + regex(/href=["']?libodfgen[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "7f42c8f3db9efee29ccd3acfdbb58e401cff658eb20c77284acdcd1220770249" + sha256 cellar: :any, arm64_sonoma: "f8c8b108ac222308245eef3d268c4eeeb84b2a73f2410c45568f304a142471e0" + sha256 cellar: :any, arm64_ventura: "ee37bbec363199abddeafcd3c185add551b115ccbcf2d175be4e3372321be7dc" + sha256 cellar: :any, arm64_monterey: "ba4d7f22c5590a4190cb043deb158860d752c6b517463deffbcf047f11b4abdf" + sha256 cellar: :any, arm64_big_sur: "db9ec11161a89cadc0cc829f021fbb1a26ffd96ca7962788013b6a83efa35440" + sha256 cellar: :any, sonoma: "2a36cb4f5ecfbab471f7523e46df2b4ed8a58502aeb8fc5fb5af4bdbe323f212" + sha256 cellar: :any, ventura: "8b8f072bab3214d7d530d36dd8e2fbc124a47e645a94521e3a469c9d65f9e84f" + sha256 cellar: :any, monterey: "0ed30ea41cd3a9fbfe33a02c48e2b7386a430d5bee931e04b1bec3113670cceb" + sha256 cellar: :any, big_sur: "f53270e1f9060d1e2074a89444899e540e3307270fbd94c6a5186e9a05ecda45" + sha256 cellar: :any, catalina: "f019ef9174156093d5592556fac3fb5e87a38a90882572a3ff4a15b7d9227c8c" + sha256 cellar: :any, mojave: "b8bcc9b962fa97d431fb4a27a924a18b37b264e43bb5e881b67668aa18633edd" + sha256 cellar: :any_skip_relocation, arm64_linux: "bd214b5c11aff4b9a57155479ada4e47e8b0e75e4a523836682c6616719b6431" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8466ec0a88ee4d205fb5bac977d257b7cea7c4dfcdcfc1028d97e4be5529c848" + end + + depends_on "pkgconf" => :build + depends_on "librevenge" + + uses_from_macos "libxml2" + + def install + system "./configure", "--disable-silent-rules", + "--disable-static", + "--disable-test", + "--disable-werror", + "--without-docs", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + return ODF_FLAT_XML; + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", + "-I#{include}/libodfgen-0.1", + "-I#{Formula["librevenge"].include}/librevenge-0.0", + "-L#{lib}", "-lodfgen-0.1", + "-L#{Formula["librevenge"].lib}", "-lrevenge-0.0" + system "./test" + end +end diff --git a/Formula/lib/libofx.rb b/Formula/lib/libofx.rb new file mode 100644 index 0000000000000..1a128f7288f49 --- /dev/null +++ b/Formula/lib/libofx.rb @@ -0,0 +1,140 @@ +class Libofx < Formula + desc "Library to support OFX command responses" + homepage "https://github.com/libofx/libofx" + url "https://github.com/libofx/libofx/releases/download/0.10.9/libofx-0.10.9.tar.gz" + sha256 "1ca89ff7d681c9edad312172ac464231a8de686e653213612f9417492cef0d37" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_sequoia: "e4b8c683f7d31032a59fc92af99e162ed7b91d250b05ddb8f22f2a92d44ae571" + sha256 arm64_sonoma: "ed293b1aa272081ac72e90ed0fde58477750798dccfc1daaa7c46813d950f268" + sha256 arm64_ventura: "4c2f9ec0e41e667c21b2a6c1fbe81d11e356e1d5d5afdf80b1f3e771a6da3183" + sha256 arm64_monterey: "c6e732fd8e3dac426fea0f2845c634af8542661058265f43886ef2f65828f95f" + sha256 arm64_big_sur: "0cbb926e59cd1032c9db87a9c4b33747a45dc6f48b2e4a1c26fefd066401c8f5" + sha256 sonoma: "5b79bf585dd46d33881ce4627fc9b05ec5263090299e85b43121e46d74779ca6" + sha256 ventura: "64a1c8fe606555249a4a3610912062525f0253c98f479f1246d7cd57355d185d" + sha256 monterey: "aa32a1500793c8add1ae49017887b2288f5c0d921d4db3681c1150f854da1038" + sha256 big_sur: "8e0d20d6e6f664a559e2e4cd665562b514b17ec491fe9a433bc8b85fb4ba221e" + sha256 catalina: "08593e309b9133e1b534200b44ed4a87446fa305f63dfdc79e1de93a9ac22835" + sha256 arm64_linux: "c388005e8748764a55e879ecad1fd1ee36f004050585ade3f76103b861fba479" + sha256 x86_64_linux: "88107478b5837f83a6f9f6f99279b3fa10c9465b7fca30fb52ff51a6b07f1271" + end + + head do + url "https://github.com/libofx/libofx.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gengetopt" => :build + depends_on "libtool" => :build + end + + depends_on "open-sp" + + def install + ENV.cxx11 + + system "./autogen.sh" if build.head? + + opensp = Formula["open-sp"] + system "./configure", "--disable-dependency-tracking", + "--with-opensp-includes=#{opensp.opt_include}/OpenSP", + "--with-opensp-libs=#{opensp.opt_lib}", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.ofx").write <<~EOS + OFXHEADER:100 + DATA:OFXSGML + VERSION:102 + SECURITY:NONE + ENCODING:USASCII + CHARSET:1252 + COMPRESSION:NONE + OLDFILEUID:NONE + NEWFILEUID:NONE + + + + + + 0 + INFO + + 20130525225731.258 + ENG + 20050531060000.000 + + FAKE + 1101 + + 51123 + 9774652 + + + + + 0 + + 0 + INFO + + + USD + + 5472369148 + 145268707 + CHECKING + + + 20000101070000.000 + 20130525060000.000 + + CREDIT + 20110331120000.000 + 0.01 + 0000486 + DIVIDEND EARNED FOR PERIOD OF 03 + DIVIDEND ANNUAL PERCENTAGE YIELD EARNED IS 0.05% + + + DEBIT + 20110405120000.000 + -34.51 + 0000487 + AUTOMATIC WITHDRAWAL, ELECTRIC BILL + AUTOMATIC WITHDRAWAL, ELECTRIC BILL WEB(S ) + + + CHECK + 20110407120000.000 + -25.00 + 0000488 + 319 + RETURNED CHECK FEE, CHECK # 319 + RETURNED CHECK FEE, CHECK # 319 FOR $45.33 ON 04/07/11 + + + + 100.99 + 20130525225731.258 + + + 75.99 + 20130525225731.258 + + + + + + EOS + + output = shell_output("#{bin}/ofxdump #{testpath}/test.ofx") + assert_equal output.scan(/Account ID\s?: 5472369148 145268707/).length, 5 + %w[0000486 0000487 0000488].each do |fid| + assert_match "Financial institution's ID for this transaction: #{fid}", output + end + end +end diff --git a/Formula/lib/libogg.rb b/Formula/lib/libogg.rb new file mode 100644 index 0000000000000..9b9c86bfb53fe --- /dev/null +++ b/Formula/lib/libogg.rb @@ -0,0 +1,82 @@ +class Libogg < Formula + desc "Ogg Bitstream Library" + homepage "https://www.xiph.org/ogg/" + url "https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-1.3.5.tar.gz" + mirror "https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz" + sha256 "0eb4b4b9420a0f51db142ba3f9c64b333f826532dc0f48c6410ae51f4799b664" + license "BSD-3-Clause" + head "https://gitlab.xiph.org/xiph/ogg.git", branch: "master" + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/ogg/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)libogg[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "13592df33977148bd6ca571b333892b42b1d988289a47f4efd3979fd48964b3e" + sha256 cellar: :any, arm64_sonoma: "f5da0b4874b723ca02947cd2312df9cdd37bc7b6e000e9e6cdd9bbbb290dc0e9" + sha256 cellar: :any, arm64_ventura: "d241e81018d3b64ec0d491d5d43f5409496747d57fb8d0eff75c534bd84dd19a" + sha256 cellar: :any, arm64_monterey: "aa2b793e007a3eb86a8b225b91561ecf1dc941071596d23f810ca41e83904d5d" + sha256 cellar: :any, arm64_big_sur: "e528165137cd229e4ac1147bd9c5f6de5aafb815c25d00682a923baaa621bc1d" + sha256 cellar: :any, sonoma: "d8591422a6ab90f2d890e14cde9c608baac46166abcce2a27978a63573b0d243" + sha256 cellar: :any, ventura: "517e16f78d047709c010bd3f31e6497c93c562db71f9b2022395f0a2fcb4c62d" + sha256 cellar: :any, monterey: "6e8d8540b1cd602e3ed6f6713fcb82c423a69ca1620f447f4c67b03fe04589c2" + sha256 cellar: :any, big_sur: "7871f4d805f54347ab3ac20a7dbd31d78a122bf0cd2da441a45a2b1cf732551c" + sha256 cellar: :any_skip_relocation, arm64_linux: "55cda1cf81fe5e216a440b1f3ab4effdfbb0732270727f1ebf5a2566c982765f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be528587bb8d4c822dfbee4bb30705c9511908d86ae5f5859eb9c59eb7459ef3" + end + + depends_on "cmake" => :build + + resource("oggfile") do + url "https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg" + sha256 "f57b56d8aae4c847cf01224fb45293610d801cfdac43d932b5eeab1cd318182a" + end + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=TRUE", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + system "cmake", "-S", ".", "-B", "build-static", "-DBUILD_SHARED_LIBS=FALSE", *std_cmake_args + system "cmake", "--build", "build-static" + lib.install "build-static/libogg.a" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main (void) { + ogg_sync_state oy; + ogg_stream_state os; + ogg_page og; + ogg_packet op; + char *buffer; + int bytes; + + ogg_sync_init (&oy); + buffer = ogg_sync_buffer (&oy, 4096); + bytes = fread(buffer, 1, 4096, stdin); + ogg_sync_wrote (&oy, bytes); + if (ogg_sync_pageout (&oy, &og) != 1) + return 1; + ogg_stream_init (&os, ogg_page_serialno (&og)); + if (ogg_stream_pagein (&os, &og) < 0) + return 1; + if (ogg_stream_packetout (&os, &op) != 1) + return 1; + + return 0; + } + C + testpath.install resource("oggfile") + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-logg", + "-o", "test" + # Should work on an OGG file + shell_output("./test < Example.ogg") + # Expected to fail on a non-OGG file + shell_output("./test < #{test_fixtures("test.wav")}", 1) + end +end diff --git a/Formula/lib/liboil.rb b/Formula/lib/liboil.rb new file mode 100644 index 0000000000000..686005b1a27f8 --- /dev/null +++ b/Formula/lib/liboil.rb @@ -0,0 +1,63 @@ +class Liboil < Formula + desc "C library of simple functions optimized for various CPUs" + homepage "https://wiki.freedesktop.org/liboil/" + url "https://liboil.freedesktop.org/download/liboil-0.3.17.tar.gz" + sha256 "105f02079b0b50034c759db34b473ecb5704ffa20a5486b60a8b7698128bfc69" + # Only liboil/ref/mt19937ar.c is BSD-3-Clause while rest is BSD-2-Clause. + # The license for liboil/motovec/* is excluded as it is only used on PowerPC. + license all_of: ["BSD-2-Clause", "BSD-3-Clause"] + + livecheck do + url "https://liboil.freedesktop.org/download/" + regex(/href=.*?liboil[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "884af7577129d0a2cf1418f838a9d8057e4f158911797fc6e7ba4e2217ce0182" + sha256 cellar: :any, arm64_sonoma: "793980d104cfea7e8ee60dc08de451f1d6c208c90ba8faa57d026d6bb36af87b" + sha256 cellar: :any, arm64_ventura: "d9163cdae71515f1281691a77d77cd635f9f5d0e001eece4ac204f0156ecc393" + sha256 cellar: :any, arm64_monterey: "1301c11b0befc6f72c27cdf4c659caa989c472a4a04d5fda6d1815baff7c381e" + sha256 cellar: :any, arm64_big_sur: "915b7c9defeb1e3d056cd4ead9442b6da74c033d776a3d29eab11f3a74cc4bc6" + sha256 cellar: :any, sonoma: "cf3e923c404d532f40761113f021a0410cea450dd2113faf4578bb37bf811e67" + sha256 cellar: :any, ventura: "05bd717d1d98207ae7534a1fac233d493838f0b919ddcb2af09f8010b687e56e" + sha256 cellar: :any, monterey: "85dc36f48c6496097f4aa02b580573a1c21a399e418464121a8f935f50a4a951" + sha256 cellar: :any, big_sur: "ca18b013a3853b8d751276c3aea1891d945cb510fd73c3f6704eeb84aba49216" + sha256 cellar: :any, catalina: "4568936a9d090ea8a2a349e4009a0b2f0a66edc49c93b4bda1a9c30d6ad64544" + sha256 cellar: :any, mojave: "e8655c3c54d78829199c130758a73dce27e27d8a925cb9ec943a1d32522c13f6" + sha256 cellar: :any, high_sierra: "3214b8910deb69c2c0138a5ece603515c089fa2178ead16e4106695dd6b4c4b4" + sha256 cellar: :any, sierra: "f242435c284690879f84812481843e92c54adc190a8201aa31d550c262e1951d" + sha256 cellar: :any, el_capitan: "7d76b7a220caeb8dbaef27b879f4f3ac0ad5b236b563961abd9484e8bc9e0160" + sha256 cellar: :any_skip_relocation, arm64_linux: "12a6d9bd59ede96b60e33f1e1ffcf61b0c66bcd0f5886e6c3a0d76730d514985" + sha256 cellar: :any_skip_relocation, x86_64_linux: "64127180a4182632dbde62deafdcba4fa391ff4a675e85a6821cebee298887e1" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gtk-doc" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + def install + ENV.append "CFLAGS", "-fheinous-gnu-extensions" if ENV.compiler == :clang + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(int argc, char** argv) { + oil_init(); + return 0; + } + C + + flags = ["-I#{include}/liboil-0.3", "-L#{lib}", "-loil-0.3"] + ENV.cflags.to_s.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libolm.rb b/Formula/lib/libolm.rb new file mode 100644 index 0000000000000..be6a12dbf1444 --- /dev/null +++ b/Formula/lib/libolm.rb @@ -0,0 +1,56 @@ +class Libolm < Formula + desc "Implementation of the Double Ratchet cryptographic ratchet" + homepage "https://gitlab.matrix.org/matrix-org/olm" + url "https://gitlab.matrix.org/matrix-org/olm/-/archive/3.2.16/olm-3.2.16.tar.gz" + sha256 "1e90f9891009965fd064be747616da46b232086fe270b77605ec9bda34272a68" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2456df3a539bccba5a28804f4e63d73ca23a6f0fc5960f2132289d86cfda08a9" + sha256 cellar: :any, arm64_sonoma: "2dd9100bb3f29d104f285aa65085e786e4649709dbc66b057237085b3be32111" + sha256 cellar: :any, arm64_ventura: "a98d48d4e45696f2645160b4aa2f345b58e3c61656c13ae8ded57bf2854e2d14" + sha256 cellar: :any, arm64_monterey: "2a8281300559d3538a102fd502f0e000c98d86acc6c35a99a0cb5294df7034f2" + sha256 cellar: :any, sonoma: "ed06e4f79c3f1651dd77425482b55bb9876ead8c80adaacc7aaccd6def7f4f76" + sha256 cellar: :any, ventura: "dfcc8778b58afac8e598e6f83fbefd6a18d2c34a2c23b23e332c4618847f4476" + sha256 cellar: :any, monterey: "71019cfeedbd48f15b86c6249bcd4db630fc6aae5754ee2e6f0162615bf55fae" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ddb8f63f2928d77bf29529f78977f4a1c7a4666d94d049264af99a3ec9b8ea1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f116c980f972a0fe05051d0bedae1cd42392051566d51c9f25989639d6b05a37" + end + + # Upstream project marked as deprecated https://gitlab.matrix.org/matrix-org/olm/-/commit/6d4b5b07887821a95b144091c8497d09d377f985 + deprecate! date: "2024-08-01", because: :deprecated_upstream + + 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 + + #include "olm/olm.h" + + using std::cout; + + int main() { + void * utility_buffer = malloc(::olm_utility_size()); + ::OlmUtility * utility = ::olm_utility(utility_buffer); + + uint8_t output[44]; + ::olm_sha256(utility, "Hello, World", 12, output, 43); + output[43] = '\0'; + cout << output; + return 0; + } + CPP + + system ENV.cc, "test.cpp", "-L#{lib}", "-lolm", "-lstdc++", "-o", "test" + assert_equal "A2daxT/5zRU1zMffzfosRYxSGDcfQY3BNvLRmsH76KU", shell_output("./test").strip + end +end diff --git a/Formula/lib/libomemo-c.rb b/Formula/lib/libomemo-c.rb new file mode 100644 index 0000000000000..8186dcb93cb36 --- /dev/null +++ b/Formula/lib/libomemo-c.rb @@ -0,0 +1,107 @@ +class LibomemoC < Formula + desc "Implementation of Signal's ratcheting forward secrecy protocol" + homepage "https://github.com/dino/libomemo-c" + url "https://github.com/dino/libomemo-c/archive/refs/tags/v0.5.1.tar.gz" + sha256 "d1b65dbf7bccc67523abfd5e429707f540b2532932d128b2982f0246be2b22a0" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "10b6d82f6c30e6f9434ed1655ddebda4c01cfb37e1814dc7cbf87b6dbcd683d0" + sha256 cellar: :any, arm64_sonoma: "d006d2ce0817b007a29e695a8c819a14b453ca7ec3608a10c294b4767f2279a5" + sha256 cellar: :any, arm64_ventura: "c838d8370dd068a5a5ae9ea20ce6caa55de0344d35a2bdf8421b8f91c2640b8d" + sha256 cellar: :any, sonoma: "b0255f92cf0699734dcc7bc612c8d9936c0d8a49fce2626a95cb366e52c2ee51" + sha256 cellar: :any, ventura: "8cef60b4eb059781f053bc8e8f41adcfebffe647eec23a9d74d28d7af10e65d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "2100e33cf8efbc544f7dc76e787b56bd2cd4d058ac36807d008bc480d9a135a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "025532b47c92f3c63c4f7dda9c99423e3f1d191f03594473d62b83150402b84b" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + depends_on "protobuf-c" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DBUILD_SHARED_LIBS=TRUE" + system "cmake", "--build", "build" + system "cmake", "--install", "build" + inreplace lib/"pkgconfig/libomemo-c.pc", prefix.to_s, opt_prefix.to_s + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + + int main(void) + { + int result = 0; + printf("Beginning of test...\\n"); + printf("0\\n"); + + signal_context *global_context = NULL; + result = signal_context_create(&global_context, NULL); + if (result != SG_SUCCESS) return 1; + printf("1\\n"); + + signal_protocol_store_context *store_context = NULL; + result = signal_protocol_store_context_create(&store_context, global_context); + if (result != SG_SUCCESS) return 1; + printf("2\\n"); + + signal_protocol_session_store session_store = { + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + }; + result = signal_protocol_store_context_set_session_store(store_context, &session_store); + if (result != SG_SUCCESS) return 1; + printf("3\\n"); + + signal_protocol_pre_key_store pre_key_store = { + NULL, NULL, NULL, NULL, NULL, NULL + }; + result = signal_protocol_store_context_set_pre_key_store(store_context, &pre_key_store); + if (result != SG_SUCCESS) return 1; + printf("4\\n"); + + signal_protocol_signed_pre_key_store signed_pre_key_store = { + NULL, NULL, NULL, NULL, NULL, NULL + }; + result = signal_protocol_store_context_set_signed_pre_key_store(store_context, &signed_pre_key_store); + if (result != SG_SUCCESS) return 1; + printf("5\\n"); + + signal_protocol_identity_key_store identity_key_store = { + NULL, NULL, NULL, NULL, NULL, NULL + }; + result = signal_protocol_store_context_set_identity_key_store(store_context, &identity_key_store); + if (result != SG_SUCCESS) return 1; + printf("6\\n"); + + signal_protocol_address address = { + "+14159998888", 12, 1 + }; + session_builder *builder = NULL; + result = session_builder_create(&builder, store_context, &address, global_context); + if (result != SG_SUCCESS) return 1; + printf("7\\n"); + + session_cipher *cipher = NULL; + result = session_cipher_create(&cipher, store_context, &address, global_context); + if (result != SG_SUCCESS) return 1; + printf("8\\n"); + + session_cipher_free(cipher); + session_builder_free(builder); + signal_protocol_store_context_destroy(store_context); + printf("9\\n"); + + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libomemo-c libprotobuf-c").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libomp.rb b/Formula/lib/libomp.rb new file mode 100644 index 0000000000000..5d7315432caab --- /dev/null +++ b/Formula/lib/libomp.rb @@ -0,0 +1,86 @@ +class Libomp < Formula + desc "LLVM's OpenMP runtime library" + homepage "https://openmp.llvm.org/" + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.5/openmp-20.1.5.src.tar.xz" + sha256 "13f0ffac3875263a5d771cf1eee10a981dc14c98b9362fb978a1ff201f147930" + license "MIT" + + livecheck do + url :stable + regex(/^llvmorg[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "ce551dd086cafa0fff95f445829cde286c1389b1bd2d87b3571c54d7e02b25e0" + sha256 cellar: :any, arm64_sonoma: "c281ee6eedb8cee7e962de881f85e895b561abb88f017eeef17f6eedcb63540b" + sha256 cellar: :any, arm64_ventura: "b034992d5945b44af8d54bfd6c0db769d9f63e7ef8d818b1200d662c886ccd53" + sha256 cellar: :any, sonoma: "70c9db59259c9837e3e604de7e73c1a94bd8ebd47aa890511fe644f5196819a3" + sha256 cellar: :any, ventura: "9972ac42bb91dfc33cdb758ec929c6f1ac01cf9abfbede106dbc5cbe1046192b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ffde618f729558dbe6e2b1bdb653959498d8a85b365c2540ca4646de63233df1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4c36192cf3628d79a752d63f94a90d02e5e66518f1c0a39365f77f92d1f60ec" + end + + # Ref: https://github.com/Homebrew/homebrew-core/issues/112107 + keg_only "it can override GCC headers and result in broken builds" + + depends_on "cmake" => :build + depends_on "lit" => :build + uses_from_macos "llvm" => :build + + on_linux do + depends_on "python@3.13" + end + + resource "cmake" do + url "https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.5/cmake-20.1.5.src.tar.xz" + sha256 "1b5abaa2686c6c0e1f394113d0b2e026ff3cb9e11b6a2294c4f3883f1b02c89c" + + livecheck do + formula :parent + end + end + + def install + odie "cmake resource needs to be updated" if version != resource("cmake").version + + (buildpath/"src").install buildpath.children + (buildpath/"cmake").install resource("cmake") + + # Disable LIBOMP_INSTALL_ALIASES, otherwise the library is installed as + # libgomp alias which can conflict with GCC's libgomp. + args = ["-DLIBOMP_INSTALL_ALIASES=OFF"] + args << "-DOPENMP_ENABLE_LIBOMPTARGET=OFF" if OS.linux? + + system "cmake", "-S", "src", "-B", "build/shared", *std_cmake_args, *args + system "cmake", "--build", "build/shared" + system "cmake", "--install", "build/shared" + + system "cmake", "-S", "src", "-B", "build/static", + "-DLIBOMP_ENABLE_SHARED=OFF", + *std_cmake_args, *args + system "cmake", "--build", "build/static" + system "cmake", "--install", "build/static" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main (int argc, char** argv) { + std::array arr = {0,0}; + #pragma omp parallel num_threads(2) + { + size_t tid = omp_get_thread_num(); + arr.at(tid) = tid + 1; + } + if(arr.at(0) == 1 && arr.at(1) == 2) + return 0; + else + return 1; + } + CPP + system ENV.cxx, "-Werror", "-Xpreprocessor", "-fopenmp", "test.cpp", "-std=c++11", + "-I#{include}", "-L#{lib}", "-lomp", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libopenmpt.rb b/Formula/lib/libopenmpt.rb new file mode 100644 index 0000000000000..b991fede247d6 --- /dev/null +++ b/Formula/lib/libopenmpt.rb @@ -0,0 +1,59 @@ +class Libopenmpt < Formula + desc "Software library to decode tracked music files" + homepage "https://lib.openmpt.org/libopenmpt/" + url "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-0.7.13+release.autotools.tar.gz" + version "0.7.13" + sha256 "dcd7cde4f9c498eb496c4556e1c1b81353e2a74747e8270a42565117ea42e1f1" + license "BSD-3-Clause" + revision 1 + + livecheck do + url "https://lib.openmpt.org/files/libopenmpt/src/" + regex(/href=.*?libopenmpt[._-]v?(\d+(?:\.\d+)+)\+release\.autotools\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "6b767ef8ae5e15125c2a852db9bec69c57c997c3c151a20368fdcc16197b255f" + sha256 cellar: :any, arm64_sonoma: "1bb5f077a947f245ffeaf0eb9f4942cd33c3b5569fd1e9b400127f0d0943a0d6" + sha256 cellar: :any, arm64_ventura: "62a4ef42a7ed523d0ae62092fec43cbd55e587b009bf030ffe04a5dee2dc0606" + sha256 cellar: :any, sonoma: "9fe4c4ccb2ca7eff6f24bbe9eaf963daf681ddb16bd9225c7385539ef6644e53" + sha256 cellar: :any, ventura: "75e06237d8e5a42527e7d2f33399feb6bcc6dafcaf2f8ac43123d6a915fda6fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "2cf870131606dcee1e4dd0fff1ac1fa410921fe708d310139d81934d507c2055" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c7ed3050c7743f0fed603d3a001463d2e9c039526561b128492032841a83ff8c" + end + + depends_on "pkgconf" => :build + + depends_on "flac" + depends_on "libogg" + depends_on "libsndfile" + depends_on "libvorbis" + depends_on "mpg123" + depends_on "portaudio" + + uses_from_macos "zlib" + + on_linux do + depends_on "pulseaudio" + end + + resource "homebrew-mystique.s3m" do + url "https://api.modarchive.org/downloads.php?moduleid=54144#mystique.s3m" + sha256 "e9a3a679e1c513e1d661b3093350ae3e35b065530d6ececc0a96e98d3ffffaf4" + end + + def install + system "./configure", "--disable-silent-rules", + "--without-vorbisfile", + *std_configure_args + system "make" + system "make", "install" + end + + test do + resource("homebrew-mystique.s3m").stage do + output = shell_output("#{bin}/openmpt123 --probe mystique.s3m") + assert_match "Success", output + end + end +end diff --git a/Formula/lib/libopennet.rb b/Formula/lib/libopennet.rb new file mode 100644 index 0000000000000..e7e0d62700db4 --- /dev/null +++ b/Formula/lib/libopennet.rb @@ -0,0 +1,51 @@ +class Libopennet < Formula + desc "Provides open_net() (similar to open())" + homepage "https://www.rkeene.org/oss/libopennet" + url "https://www.rkeene.org/files/oss/libopennet/libopennet-0.9.9.tar.gz" + sha256 "d1350abe17ac507ffb50d360c5bf8290e97c6843f569a1d740f9c1d369200096" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + livecheck do + url :homepage + regex(/href=.*?libopennet[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e5e9c1ebe5ba34938705b7b0b1f70569348096a58d96b2a7327526f5d3aeb5f7" + sha256 cellar: :any, arm64_sonoma: "cb4414cd607a9de6b0cf79edc026805665037051c6cb17b289cd5a5e5ecda5a1" + sha256 cellar: :any, arm64_ventura: "1ce4bb615aaa4579a6719a21eaaea4cdcf6beba142a9191e9aca597d6fbdf726" + sha256 cellar: :any, arm64_monterey: "7adee83fdb8fc7a65bd7a4f34b2cedfe58a2ef51e66892fd9ecd89732c1b779c" + sha256 cellar: :any, arm64_big_sur: "6c773cf155f2d32421b30368262329bb8d943c8c9f34b095fc1387682bb11386" + sha256 cellar: :any, sonoma: "404801ea9f6feb9da41e23a40459c16edf74dcc8a03e5274f009821b622e8a6b" + sha256 cellar: :any, ventura: "789a576fa0b7cfcaf5fb155d4b65ae8afd4c8d7835c36bfedbaaebb33434c7d7" + sha256 cellar: :any, monterey: "d14a15468f38a3c053272c0669e1db3a550bd121ddb6dbbf8a47637de6fc956c" + sha256 cellar: :any, big_sur: "1c514ff48871809fd77cadcded9c2dc71f7913fde66c81fe3a9c6488b927d17f" + sha256 cellar: :any, catalina: "0f9b40e9c906fce8df8abc866680bf6fbe60cadc5af24dac309e1d51a0f5e99d" + sha256 cellar: :any, mojave: "4702cca034bb0b60b4555615664cc4aedee95c189f37e23e93013594f1dc9321" + sha256 cellar: :any, high_sierra: "82232ab7a71481570e3119e119bc93ef29a9d553c11e16fb93f157c66a7dfe8a" + sha256 cellar: :any, sierra: "c3447365aeb1a478b14b5a71b6ffd29a1f95754fb460ed6f618b55e2f958c227" + sha256 cellar: :any, el_capitan: "de1cb9622ec3b6501236af7e66367bc5bbaa20dfb8e3ae328a339bea6d708bab" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd3619a3083c2078621061fde39ac45d20825f6312cd177828289861d70b63d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d12f92e4c1e648507685be0a40102bbf253da35bc2bf2bc25b412e8900165a6d" + end + + on_arm do + # Added automake as a build dependency to update config files for ARM support. + depends_on "automake" => :build + 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 + # Fix flat namespace usage. + inreplace "configure", "-flat_namespace -undefined suppress", "-undefined dynamic_lookup" + + system "./configure", *std_configure_args, "--mandir=#{man}" + system "make" + system "make", "install" + end +end diff --git a/Formula/lib/liboping.rb b/Formula/lib/liboping.rb new file mode 100644 index 0000000000000..99318189fc01a --- /dev/null +++ b/Formula/lib/liboping.rb @@ -0,0 +1,64 @@ +class Liboping < Formula + desc "C library to generate ICMP echo requests" + homepage "https://noping.cc/" + url "https://noping.cc/files/liboping-1.10.0.tar.bz2" + sha256 "eb38aa93f93e8ab282d97e2582fbaea88b3f889a08cbc9dbf20059c3779d5cd8" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?liboping[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5395bb6ef912f023eb75a29a46eb614a0fb9dec8f65fe29f40af6173d0f8f809" + sha256 cellar: :any, arm64_sonoma: "e2142ec221a13c7102978228b5d3ffd61a182952bb470ef0cd63fd1201ce6411" + sha256 cellar: :any, arm64_ventura: "4f96385d085c835f78741e71350fba8666a9692673abab3681722f7dc22fef1f" + sha256 cellar: :any, arm64_monterey: "88e26997cd417b2be6c8323451267524135044c033e6c34772cf9dc7812d9d4f" + sha256 arm64_big_sur: "a8ea63333bfc0a7ec880d0c5727316ff622ff2f4854efc93bd9bc082080f9365" + sha256 cellar: :any, sonoma: "c57fcbbbefe1baf0972917c9d6a65843e3b5b1b24d777cc3936f423dd086fdad" + sha256 cellar: :any, ventura: "8866dff120426703941ef3eff9e6253c9ed14fde9181dc4a65207599926d973a" + sha256 cellar: :any, monterey: "0e71715fba4fca28f5488409e5529ac61b7f166cea4cc2180967cc4d9a50dda6" + sha256 big_sur: "0edb72c3d81dbc8869b28d27f063372f7eed0ac4318624fe94e4ac5be7d2337a" + sha256 catalina: "997e8eb17c7878cbd0c34bd6532b76ef804899751a58b3b434656d1b9ced07d9" + sha256 mojave: "7b0258598b329b83ce9fd0cf18be77aa027226c8391a013cb3699faeeb1fd71f" + sha256 high_sierra: "accffc91ab24ccba1214727abadb59c497f403e3bcad1dfe8ff0377d32e05ebc" + sha256 sierra: "42b80e23afe4fb4f296d039b0bdd4ccd0da21937514fdd04a90bc01d39da7aec" + sha256 el_capitan: "de0bb72a0752469b262db3a24a41c84746930858462cd08993c057caadd46264" + sha256 cellar: :any_skip_relocation, arm64_linux: "71cfbc992467da7e4933d64ac61454004ddac15ab93c28b33e502299e2789a88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f3979a8a214b2384b5c18cb7ad0d1ed49d27896b7972a2ce93dce2e0d76ad82" + end + + uses_from_macos "ncurses" + uses_from_macos "perl" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + + # move `Net::Oping.3` manpage to man3 dir + + if OS.linux? + mv prefix/"man/man3/Net::Oping.3", man3 + rm_r prefix/"man" + else + mv prefix/"local/share/man/man3/Net::Oping.3pm", man3 + rm_r prefix/"local" + end + end + + def caveats + "Run oping and noping sudo'ed in order to avoid the 'Operation not permitted'" + end + + test do + system bin/"oping", "-h" + system bin/"noping", "-h" + end +end diff --git a/Formula/lib/libopusenc.rb b/Formula/lib/libopusenc.rb new file mode 100644 index 0000000000000..70688a9034f87 --- /dev/null +++ b/Formula/lib/libopusenc.rb @@ -0,0 +1,85 @@ +class Libopusenc < Formula + desc "Convenience library for creating .opus files" + homepage "https://www.opus-codec.org/" + url "https://ftp.osuosl.org/pub/xiph/releases/opus/libopusenc-0.2.1.tar.gz" + mirror "https://archive.mozilla.org/pub/opus/libopusenc-0.2.1.tar.gz" + sha256 "8298db61a8d3d63e41c1a80705baa8ce9ff3f50452ea7ec1c19a564fe106cbb9" + license "BSD-3-Clause" + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/opus/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)libopusenc[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "9c857d079a3c385ac89d89869fa2ed74d6115a3b86d87149bd9d4d5796da3141" + sha256 cellar: :any, arm64_sonoma: "c96d078c67fa9ad9ae0398e4c7979c6506c4438ed426d224c8480a5cddd1d919" + sha256 cellar: :any, arm64_ventura: "2d9e6657c2d76d193da5cd687e5c95e4c13702cd9f5c08945b7a316b63786112" + sha256 cellar: :any, arm64_monterey: "5b28442f84fbd88cfd6cacf35ad6df119cc1dcfb89851c7b81bd77f07402a70c" + sha256 cellar: :any, arm64_big_sur: "f8d28846ea6d21358ef7768f94241a0f94327d4edcdd5223be2da96c2f0d6841" + sha256 cellar: :any, sonoma: "340d398550ddcfdf633eb19d78a9f044e810ca5bcf0789fe66caec6a1c546269" + sha256 cellar: :any, ventura: "5b2a64d3c64ec7e14f7a9f2adbe46dddf4f3ad51876dea2c28010e6f4e4e55f1" + sha256 cellar: :any, monterey: "636d36637bb7e7cc098dfe6ba078fb4fb1fbc5fce4bd93ea6a7c08ad4c49d2f4" + sha256 cellar: :any, big_sur: "48157970f8bebbd7ad54d099531397cb3d81797e7715ed5523865d7d1b19df8b" + sha256 cellar: :any, catalina: "593106e48c86436fd1908c79f1ef54f206bb37f0983ccb3901190cebe6e78cea" + sha256 cellar: :any, mojave: "96a05dd8d0071fb38ed14f4f5b64af576baee3719a16fc8fc331ddfa1a4d65ec" + sha256 cellar: :any, high_sierra: "e5cfb0433abe565b11351f9d6ec3fb44852a8aeb99ef8f6710ee9d899eb97ab3" + sha256 cellar: :any_skip_relocation, arm64_linux: "c48463ee524577ba28625f68966b402ddd0e90ae2a576c4ea7ffcc59a90ece28" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2545d8277065ed72d4a382d804569d27c55e9d8eb6ffc9511140bda90721edb3" + end + + head do + url "https://gitlab.xiph.org/xiph/libopusenc.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "opus" + + 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 + #include + #include + int main() { + OggOpusComments *comments = ope_comments_create(); + assert(comments); + ope_comments_add(comments, "ARTIST", "Homebrew"); + ope_comments_add(comments, "TITLE", "Test Track"); + + int error; + OggOpusEnc *enc = ope_encoder_create_file("test.opus", + comments, 48000, 2, 0, &error);; + assert(error == OPE_OK); + assert(enc); + ope_comments_destroy(comments); + + int16_t *buffer = calloc(1920, 2*sizeof(*buffer)); + error = ope_encoder_write(enc, buffer, 1920*2*sizeof(*buffer)); + assert(error == OPE_OK); + + error = ope_encoder_drain(enc); + assert(error == OPE_OK); + ope_encoder_destroy(enc); + + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-Wall", + "-I#{Formula["opus"].opt_include}/opus", + "-I#{include}/opus", + "-L#{lib}", "-lopusenc" + system "./test" + end +end diff --git a/Formula/lib/liboqs.rb b/Formula/lib/liboqs.rb new file mode 100644 index 0000000000000..2709f4b3a7d22 --- /dev/null +++ b/Formula/lib/liboqs.rb @@ -0,0 +1,49 @@ +class Liboqs < Formula + desc "Library for quantum-safe cryptography" + homepage "https://openquantumsafe.org/" + url "https://github.com/open-quantum-safe/liboqs/archive/refs/tags/0.13.0.tar.gz" + sha256 "789e9b56bcb6b582467ccaf5cdb5ab85236b0c1007d30c606798fa8905152887" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0d744db00855ed3160fbde340abfcab59737229e129bafd08935057c0a49813a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0a92276be04c12a3dff2be837e1debd1f9c8be9e5e4e0c084f72afb70cd6e083" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7da043db1c2204f9f3a32504dbe35e69ad5c377137244a2df5ef4b6b08cb73b5" + sha256 cellar: :any_skip_relocation, sonoma: "d34c219fa4023fc0c6182cd4877be12d8b14c55570bfc54a174ed064c382ef2f" + sha256 cellar: :any_skip_relocation, ventura: "6de8bf61014b4fba88ce3a44665ddc6d673f88a2a1229d598f75636437d2b0ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "21421d5b937bfb972d9239c9265ca2efc484692da94d663694164986b34d51de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2baf046ee42ff6c9aec54dd599c97bc8b6602a86f29c8f5292de05ac41268715" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "ninja" => :build + depends_on "openssl@3" + + def install + args = %W[ + -DOQS_USE_OPENSSL=ON + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "tests" + end + + test do + cp pkgshare/"tests/example_kem.c", "test.c" + system ENV.cc, "test.c", + "-I#{Formula["openssl@3"].include}", "-I#{include}", + "-L#{Formula["openssl@3"].lib}", "-L#{lib}", + "-loqs", "-lssl", "-lcrypto", "-o", "test" + assert_match "operations completed", shell_output("./test") + end +end diff --git a/Formula/lib/liborigin.rb b/Formula/lib/liborigin.rb new file mode 100644 index 0000000000000..00c0582661a74 --- /dev/null +++ b/Formula/lib/liborigin.rb @@ -0,0 +1,47 @@ +class Liborigin < Formula + desc "Library for reading OriginLab OPJ project files" + homepage "https://sourceforge.net/projects/liborigin/" + url "https://downloads.sourceforge.net/project/liborigin/liborigin/3.0/liborigin-3.0.3.tar.gz" + sha256 "b394e3bf633888f9f4a3e1449d7c7eb39b778a2e657424177a04cde4afe6965a" + license all_of: ["GPL-2.0-or-later", "GPL-3.0-or-later"] + + livecheck do + url :stable + regex(%r{url=.*?/liborigin[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "72deab19a18c880f934d4d31980bc5a302de0a5aa5b6f0d9108b8272770eb0e2" + sha256 cellar: :any, arm64_sonoma: "6b2321d3a34333dd2412625fb5710244eb6ec6d14b0dbeb920bfedc2be8a2452" + sha256 cellar: :any, arm64_ventura: "c03e70300f707b2eb9df6c967d9a57f7a2c642c6ab579e431586398959af7c7b" + sha256 cellar: :any, arm64_monterey: "5cc7c81fa2c9f7c5e43a523c73ede1f85f50c2163d5ae177e89438f39f17379c" + sha256 cellar: :any, sonoma: "66b7d4f00528e398d6dac79c6f4bb4b851d0c6a6da36d9ad2a592a8fcb5566db" + sha256 cellar: :any, ventura: "cc73444b1cd2328a431f07471a2a1c91f7b5461fe9aceb8ca356f748e5099f95" + sha256 cellar: :any, monterey: "b56942f218b5c8a1c954fe63c4f440ab61c845bdab16b11aae95ab292ed28038" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae477544a5737a1f8000896b2ad21d3806bad8b46150615074220eacd9ceb182" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b2bd55d4b555d79b2b215f8d543f9fb5b7c948d066fd8b5bcc42b869b932341" + 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() { + std::cout << "liborigin version: " << liboriginVersionString() << std::endl; + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lorigin", "-o", "test" + assert_match version.to_s, shell_output("./test") + end +end diff --git a/Formula/lib/libosinfo.rb b/Formula/lib/libosinfo.rb new file mode 100644 index 0000000000000..d37af3cd1b180 --- /dev/null +++ b/Formula/lib/libosinfo.rb @@ -0,0 +1,83 @@ +class Libosinfo < Formula + desc "Operating System information database" + homepage "https://libosinfo.org/" + url "https://releases.pagure.org/libosinfo/libosinfo-1.12.0.tar.xz" + sha256 "ad8557ece26793da43d26de565e3d68ce2ee6bfb8d0113b7cc7dfe07f6bfc6b6" + license "LGPL-2.0-or-later" + + livecheck do + url "https://releases.pagure.org/libosinfo/?C=M&O=D" + regex(/href=.*?libosinfo[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "cf2259dd949ebcdd2cb0c9ea883d0f67abe07c351af73869cf6bfd300f24161f" + sha256 arm64_sonoma: "948b6a24382554b4f305e2273217f9e95e2928afc3df1819ce6ab37199c5d66e" + sha256 arm64_ventura: "56c9fcb470ba6c18017696c84b0ac0efac45842166e440f6ce507102c167b964" + sha256 sonoma: "a9ddacdeac8d20b1a918ba60006a08eccc0d8b1b9296324eec944278a1a9aac1" + sha256 ventura: "44b619cc3c7a49a8ead42200b497313def8ea75111587cfcc97eced74b542293" + sha256 arm64_linux: "62838ed8c6d506a076cbd2cb1dbaef4ec846f15590fc6922fbb0fd20fe8214c4" + sha256 x86_64_linux: "42ed4e3587f00f42ac72e46d24c9baea274589e693f404d469297e7caf185b7f" + 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 "gettext" + depends_on "glib" + depends_on "libsoup" + depends_on "osinfo-db" + depends_on "usb.ids" + + uses_from_macos "pod2man" => :build + uses_from_macos "python" => :build + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + resource "pci.ids" do + url "https://raw.githubusercontent.com/pciutils/pciids/fd7d37fcca8edc95f174382a9a5a29c368f26acf/pci.ids" + sha256 "3ed78330ac32d8cba9a90831f88654c30346b9705c9befb013424e274d2f3fbf" + end + + def install + (share/"misc").install resource("pci.ids") + + args = %W[ + -Denable-gtk-doc=false + -Dwith-pci-ids-path=#{share/"misc/pci.ids"} + -Dwith-usb-ids-path=#{Formula["usb.ids"].opt_share/"misc/usb.ids"} + -Dsysconfdir=#{etc} + ] + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + share.install_symlink HOMEBREW_PREFIX/"share/osinfo" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char *argv[]) { + GError *err = NULL; + OsinfoPlatformList *list = osinfo_platformlist_new(); + OsinfoLoader *loader = osinfo_loader_new(); + osinfo_loader_process_system_path(loader, &err); + if (err != NULL) { + fprintf(stderr, "%s", err->message); + return 1; + } + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libosinfo-1.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + system bin/"osinfo-query", "device", "vendor=Apple Inc." + end +end diff --git a/Formula/lib/libosip.rb b/Formula/lib/libosip.rb new file mode 100644 index 0000000000000..b64d2006c4cec --- /dev/null +++ b/Formula/lib/libosip.rb @@ -0,0 +1,51 @@ +class Libosip < Formula + desc "Implementation of the eXosip2 stack" + homepage "https://www.gnu.org/software/osip/" + url "https://ftp.gnu.org/gnu/osip/libosip2-5.3.1.tar.gz" + mirror "https://ftpmirror.gnu.org/osip/libosip2-5.3.1.tar.gz" + sha256 "fe82fe841608266ac15a5c1118216da00c554d5006e2875a8ac3752b1e6adc79" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/href=.*?libosip2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "751eaf3b56ce1d3f5ad7e076909391f1cef386f430cd96719ff8a97bcc76bd03" + sha256 cellar: :any, arm64_sonoma: "ae8d66cfe67d8dc40a0299db6cfb154cbc28c8c6a7af0229d4577e70e7d54ca5" + sha256 cellar: :any, arm64_ventura: "34fbd0c4413173a442968eec773e3a9b5f60a9a08b48af2f3e2d9d4ee21e6dab" + sha256 cellar: :any, arm64_monterey: "2bcc9aaabdfd1b5afe6a05a3cd694f91b3dae3a23189f450cbe028a9416a28dc" + sha256 cellar: :any, arm64_big_sur: "97a6519a92630d395d060289ebd2959d91302d84efa15d72aa9f37f9293ce7fa" + sha256 cellar: :any, sonoma: "d867ac12d12785e834dea9f2dd560ed2e660227dfadcd080359b2c14637cc2ab" + sha256 cellar: :any, ventura: "c7fca9a24a759d0716ef0293fdff8361cdadab5963e7d3f36fbc4405b49e27a1" + sha256 cellar: :any, monterey: "208378ce5567b92f8d1fcf79a9e07bea8313c90da24f7e14b4d5a5c9f9a3c9ab" + sha256 cellar: :any, big_sur: "947aa52f8073bc404457457f25c121066c6bb6af9ebeb42b3c50e4168b3cbac6" + sha256 cellar: :any, catalina: "eb877b96fdc42eca7b4df03ae438982a3fc1e0abc51373bd6c559ba39d2077e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "0aa814193eae6de3270a53f3bac4bcbaa76061111d5124843d2a1c43af0680f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca0d378c03efdfb96e5e0610357fab268feb1a92de587ac55fa453e4f20b75e4" + 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 + + int main() { + osip_t *osip; + int i = osip_init(&osip); + if (i != 0) + return -1; + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-losip2", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libosmium.rb b/Formula/lib/libosmium.rb new file mode 100644 index 0000000000000..34f7d8962dacc --- /dev/null +++ b/Formula/lib/libosmium.rb @@ -0,0 +1,73 @@ +class Libosmium < Formula + desc "Fast and flexible C++ library for working with OpenStreetMap data" + homepage "https://osmcode.org/libosmium/" + url "https://github.com/osmcode/libosmium/archive/refs/tags/v2.22.0.tar.gz" + sha256 "8f74e3f6ba295baa7325ae5606e8f74ad9056f1d6ab4555c50bff6aa8246f366" + license "BSL-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "02ce13c6248f0566b846579f0325c94f2e2385e9f00c7163b04b27636304ce57" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "lz4" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "zlib" + + resource "protozero" do + url "https://github.com/mapbox/protozero/archive/refs/tags/v1.8.0.tar.gz" + sha256 "d95ca543fc42bd22b8c4bce1e6d691ce1711eda4b4910f7863449e6517fade6b" + end + + def install + resource("protozero").stage { libexec.install "include" } + + args = %W[ + -DINSTALL_GDALCPP=ON + -DINSTALL_UTFCPP=ON + -DPROTOZERO_INCLUDE_DIR=#{libexec}/include + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.osm").write <<~EOS + + + + + + + + + + + + + + + EOS + + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main(int argc, char* argv[]) { + osmium::io::File input_file{argv[1]}; + osmium::io::Reader reader{input_file}; + while (osmium::memory::Buffer buffer = reader.read()) {} + reader.close(); + } + CPP + + system ENV.cxx, "test.cpp", "-std=c++17", "-lexpat", "-o", "libosmium_read", "-pthread" + system "./libosmium_read", "test.osm" + end +end diff --git a/Formula/lib/libotr.rb b/Formula/lib/libotr.rb new file mode 100644 index 0000000000000..6deacacfe2044 --- /dev/null +++ b/Formula/lib/libotr.rb @@ -0,0 +1,49 @@ +class Libotr < Formula + desc "Off-The-Record (OTR) messaging library" + homepage "https://otr.cypherpunks.ca/" + url "https://otr.cypherpunks.ca/libotr-4.1.1.tar.gz" + sha256 "8b3b182424251067a952fb4e6c7b95a21e644fbb27fbd5f8af2b2ed87ca419f5" + license all_of: ["LGPL-2.1-only", "GPL-2.0-only"] + + livecheck do + url :homepage + regex(/href=.*?libotr[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "5e6fdf2cd7cc293066a7875b10c684b7058b553ad85ff949e18045d0aca47b6d" + sha256 cellar: :any, arm64_sonoma: "1a9fee4f64cdd96f0c0d0594e03a8855c2f0936a0c1c1272c433e591bc82ad4d" + sha256 cellar: :any, arm64_ventura: "758ad5aecffe69404a6b32062bbdef4a7c6b89dab5d635b1f1f41b46f676e12f" + sha256 cellar: :any, arm64_monterey: "fe41c2686379f8b67aafc307e703775ab8060fb074734561e67cdc958a912e45" + sha256 cellar: :any, arm64_big_sur: "f6a94af91827558244757f9fe7d856251f0b7b2de78e1ee38f6059808f1f51e7" + sha256 cellar: :any, sonoma: "26f532517cf1188608a29f8cc51392f3ec82da8708e1ce83cc5b1ef388806506" + sha256 cellar: :any, ventura: "3a1e5f35391e9b9ab7048a440b74f412100a541d43d6dd52bb6db73f3758a216" + sha256 cellar: :any, monterey: "afa5f29cdb8a4a6618ecea8a75129679c6ade432cdae03f1e31caadeec8ddadd" + sha256 cellar: :any, big_sur: "f59b69aa5af8b636f8bea1511fa63fed116f9c9571864fb7b44c21655e8a099b" + sha256 cellar: :any, catalina: "8ecf904a816fc69adc5e8fe904ca2ef1b1d147090d2f6ee694ad6b5c07faa02c" + sha256 cellar: :any_skip_relocation, arm64_linux: "62ee96a56e10ffa701daa578015edfd49d6a20b89d1fbbef3530795ccfde6899" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a88f909cde9e876f1f3a9ffe30d2ba483715ba3fc03c188f78bc07758a18491" + end + + depends_on "libgcrypt" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + # Fix client.c:624:30: error: 'PF_UNIX' undeclared (first use in this function) + patch do + url "https://sources.debian.org/data/main/libo/libotr/4.1.1-5/debian/patches/0006-include-socket.h.patch" + sha256 "cfda75f8c5bba2e735d2b4f1bb90f60b45fa1d554a97fff75cac467f7873ebde" + end + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}" + system "make", "install" + end +end diff --git a/Formula/lib/libowfat.rb b/Formula/lib/libowfat.rb new file mode 100644 index 0000000000000..ab59d0e1a1623 --- /dev/null +++ b/Formula/lib/libowfat.rb @@ -0,0 +1,40 @@ +class Libowfat < Formula + desc "Reimplements libdjb" + homepage "https://www.fefe.de/libowfat/" + url "https://www.fefe.de/libowfat/libowfat-0.34.tar.xz" + sha256 "d4330d373ac9581b397bc24a22ad1f7f5d58a7fe36d9d239fe352ceffc5d304b" + license "GPL-2.0-only" + head ":pserver:cvs:@cvs.fefe.de:/cvs", using: :cvs + + livecheck do + url :homepage + regex(/href=.*?libowfat[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c3846b7776a5350100cf8a734e0a45fcbe822f53128ab88bce24cfb259b3d27c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "60f9182c837f2b6ff6a79e76e7c4965c717055448b3c2928baf297fd944c3035" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b9f9d4615bb4f889dad22f8b880d2e197a7fb0caa7f48d20acb459ad868635d2" + sha256 cellar: :any_skip_relocation, sonoma: "a0c8d5df1d6c01a6d36098ad87a856d8a223df535e5829ada59ecde849e54bd4" + sha256 cellar: :any_skip_relocation, ventura: "7f442fd43af0708854473e6c97e5da531f8b1605180bc237e815beae3e40cf55" + sha256 cellar: :any_skip_relocation, arm64_linux: "17c1d34c4f362a68196eef92ec8d8621a4af98d94e5120a637cca1c987f20bd7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9033e9d8c499e2a37af9a3b0110206e494306bbc855e7e9d16d3cd3adf291801" + end + + def install + system "make", "libowfat.a" + system "make", "install", "prefix=#{prefix}", "MAN3DIR=#{man3}" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() + { + return str_diff("a", "a"); + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lowfat", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libp11.rb b/Formula/lib/libp11.rb new file mode 100644 index 0000000000000..687d7dcc34ce7 --- /dev/null +++ b/Formula/lib/libp11.rb @@ -0,0 +1,52 @@ +class Libp11 < Formula + desc "PKCS#11 wrapper library in C" + homepage "https://github.com/OpenSC/libp11/wiki" + url "https://github.com/OpenSC/libp11/releases/download/libp11-0.4.13/libp11-0.4.13.tar.gz" + sha256 "d25dd9cff1b623e12d51b6d2c100e26063582d25c9a6f57c99d41f2da9567086" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/^libp11[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "977ad78d2a417ee9375ce0964571619850c0341359ec1cf8ccd29e5fa739e974" + sha256 cellar: :any, arm64_sonoma: "904fc18f308574764d577787969935815cb4859063772537ab8d933dfb07bfe2" + sha256 cellar: :any, arm64_ventura: "621c22fec9d9f4a3f17b370bd92e97ca1ece49e7a813e863d64db4ed845105cc" + sha256 cellar: :any, sonoma: "e010e9fbaf03cc911d790fdbcd555f59f96babeb9cb6726e3df72f4f5cf08f2e" + sha256 cellar: :any, ventura: "f2fdf3fe55448304d0699d293f5ae42670d3a66d78007d2178d147455a95a1df" + sha256 cellar: :any_skip_relocation, arm64_linux: "d1ff1243ca21e160c7e34a254deef46a741561b45d9cbf356ec110cd535b97fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b5c9f823614a8048d5d01badef22552f87348814f0286a76119481f72acf940" + end + + head do + url "https://github.com/OpenSC/libp11.git", branch: "master" + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "pkgconf" => :build + depends_on "libtool" + depends_on "openssl@3" + + def install + openssl = deps.find { |d| d.name.match?(/^openssl/) } + .to_formula + enginesdir = Utils.safe_popen_read("pkgconf", "--variable=enginesdir", "libcrypto").chomp + enginesdir.sub!(openssl.prefix.realpath, prefix) + + system "./bootstrap" if build.head? + system "./configure", "--disable-silent-rules", + "--with-enginesdir=#{enginesdir}", + *std_configure_args + system "make", "install" + pkgshare.install "examples/auth.c" + end + + test do + system ENV.cc, pkgshare/"auth.c", "-I#{Formula["openssl@3"].include}", + "-L#{lib}", "-L#{Formula["openssl@3"].lib}", + "-lp11", "-lcrypto", "-o", "test" + end +end diff --git a/Formula/lib/libpagemaker.rb b/Formula/lib/libpagemaker.rb new file mode 100644 index 0000000000000..675cb15655284 --- /dev/null +++ b/Formula/lib/libpagemaker.rb @@ -0,0 +1,59 @@ +class Libpagemaker < Formula + desc "Imports file format of Aldus/Adobe PageMaker documents" + homepage "https://wiki.documentfoundation.org/DLP/Libraries/libpagemaker" + url "https://dev-www.libreoffice.org/src/libpagemaker/libpagemaker-0.0.4.tar.xz" + sha256 "66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d" + license "MPL-2.0" + + livecheck do + url "https://dev-www.libreoffice.org/src/" + regex(/href=["']?libpagemaker[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8b12308a14b296bf195cae2a64b4242efb1dfa589903d3312d1543a4e3891bfb" + sha256 cellar: :any, arm64_sonoma: "405ba95d6cd51308c1cd722631bb34f78702b5c40e8a70aac0422d551c6e1bcc" + sha256 cellar: :any, arm64_ventura: "e35968d7b7068c1ebcd5a7243ff34d6a54b2c5f1e11e223f43146e9d77686cda" + sha256 cellar: :any, arm64_monterey: "a092569342b5f5d3495f4a66247a2e30c419a3dd242dd74467e4de99c237b290" + sha256 cellar: :any, arm64_big_sur: "e95a8d6dca9411adefbeb5bebd6e34112f0deec1ec9fe0d8f9bea5502f2a7a37" + sha256 cellar: :any, sonoma: "8d79e822a3f2a831e7aecd377a81259a9091f7f1e5aec0c4c61a769618cad2c5" + sha256 cellar: :any, ventura: "6d72068712d51e67e5cbefdc4a3b7fa69477792bd8978555b0d0aeebd193803f" + sha256 cellar: :any, monterey: "ab84fad8e27045fcff614f404a2768caa62c4cdaff8cd4eebde7a295b49115fc" + sha256 cellar: :any, big_sur: "ccdd8cd950304039a111f5ee80658b809c040d83f6321701384bc96dc596b569" + sha256 cellar: :any, catalina: "9759e3d26a09e7b99bbf3c49f05bfa7724334b639245f5791d9bada9df977d68" + sha256 cellar: :any, mojave: "05fafc8fea710cc53cd310192364d72b9458114b5404fdff8f6adbff2f9175bf" + sha256 cellar: :any, high_sierra: "db0f93e5cf4cb6dfe4810b7cb8240db5c2c439a717d09def2f6163e3db6984c6" + sha256 cellar: :any, sierra: "0809994f61c8cd34e4edca3496273f293d314e89da5e8ec2a3df280cf436ba37" + sha256 cellar: :any, el_capitan: "10c23ab2759830f22ff8080cd4da18252fb719445bd651ab4664e785682c100a" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb6dd8ea44bbb80e0aab25f34c43061d030241747985963d7e60787a1d087c98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9fc80c8b825f43efef4c8dd33e069eda4b3180ed908b74185286099829c625f9" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + depends_on "librevenge" + + def install + system "./configure", "--without-docs", + "--enable-static=no", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + libpagemaker::PMDocument::isSupported(0); + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", + "-I#{Formula["librevenge"].include}/librevenge-0.0", + "-I#{include}/libpagemaker-0.0", + "-L#{Formula["librevenge"].lib}", + "-L#{lib}", + "-lrevenge-0.0", + "-lpagemaker-0.0" + system "./test" + end +end diff --git a/Formula/lib/libpaho-mqtt.rb b/Formula/lib/libpaho-mqtt.rb new file mode 100644 index 0000000000000..dc542817eace8 --- /dev/null +++ b/Formula/lib/libpaho-mqtt.rb @@ -0,0 +1,43 @@ +class LibpahoMqtt < Formula + desc "Eclipse Paho C client library for MQTT" + homepage "https://eclipse-paho.github.io/paho.mqtt.c/MQTTClient/html/" + url "https://github.com/eclipse-paho/paho.mqtt.c/archive/refs/tags/v1.3.14.tar.gz" + sha256 "7af7d906e60a696a80f1b7c2bd7d6eb164aaad908ff4c40c3332ac2006d07346" + license "EPL-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d55229a93fe81c43dcde42d0e91a30560f59706fbcafaf498f89dd7fce239f90" + sha256 cellar: :any, arm64_sonoma: "863dc484fc7e89fb897247383508a65671150dc19658c77a4d5ae845741ecdcd" + sha256 cellar: :any, arm64_ventura: "157eb3c732c87b9076c20ddf800a2a2f715411a1f740655efc12b62b00d17e33" + sha256 cellar: :any, sonoma: "58a80e95499276f4aba24dbe00ea4db55488018d3d36a3a20b65f52b6df7e0e1" + sha256 cellar: :any, ventura: "c21e0cee9e3dfe56df0fad42da8ec929b22bdccbc486ec234413b1af62642864" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec8c25b958082700fff41cbdd68dd824d443563e6836c9e9bde0adbdce4b2817" + sha256 cellar: :any_skip_relocation, x86_64_linux: "411c4aadc6df1cb439016386644145a4f2bd412282dda6b3ab4b52b111632f54" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + def install + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", "-DPAHO_WITH_SSL=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(int argc, char* argv[]) { + MQTTClient client; + MQTTClient_connectOptions conn_opts = MQTTClient_connectOptions_initializer; + + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lpaho-mqtt3a", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libpanel.rb b/Formula/lib/libpanel.rb new file mode 100644 index 0000000000000..faa2b303736b8 --- /dev/null +++ b/Formula/lib/libpanel.rb @@ -0,0 +1,59 @@ +class Libpanel < Formula + desc "Dock/panel library for GTK 4" + homepage "https://gitlab.gnome.org/GNOME/libpanel" + url "https://download.gnome.org/sources/libpanel/1.10/libpanel-1.10.0.tar.xz" + sha256 "578ce512278ff2bb5eeebb55099392c52537a5abd9bd0629567f102532b38b25" + license "LGPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "0a5552ed52318052bc14e11ba4168637fe2f3c2c46821c1810d564fffe9fdaad" + sha256 arm64_sonoma: "2681e0027b3411e923595e24691c4b1d867a4beae343cd51d6c16170804ca923" + sha256 arm64_ventura: "33e2e6277da744ef4bcf8a5e6f8c67c420e0ea01fd7a0595d1146aaa679a04ed" + sha256 sonoma: "1f26b084e8718cbcf8f291f424708286240481f51523f8564e31585f4f9c6873" + sha256 ventura: "572f34729874164856a75bcb154781667ca9752211df336f291d14558fc03e9a" + sha256 arm64_linux: "710b8e8bb9afb70d5ceb2c114858dcf89afd10ba3b2879ff2b052067acf4282c" + sha256 x86_64_linux: "11bc6daef14e7687c919e34b2a38da7d98ea0cbf7ea25c1fcd611c6af6066e4c" + 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 "cairo" + depends_on "gi-docgen" + depends_on "glib" + depends_on "graphene" + depends_on "gtk4" + depends_on "libadwaita" + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", "-Ddocs=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(int argc, char *argv[]) { + uint major = panel_get_major_version(); + return 0; + } + C + flags = shell_output("#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs libpanel-1").strip.split + flags += shell_output("#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs libadwaita-1").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + + # include a version check for the pkg-config files + assert_match version.to_s, (lib/"pkgconfig/libpanel-1.pc").read + end +end diff --git a/Formula/lib/libpano.rb b/Formula/lib/libpano.rb new file mode 100644 index 0000000000000..d1acac62c4b7d --- /dev/null +++ b/Formula/lib/libpano.rb @@ -0,0 +1,69 @@ +class Libpano < Formula + desc "Build panoramic images from a set of overlapping images" + homepage "https://panotools.sourceforge.net/" + url "https://downloads.sourceforge.net/project/panotools/libpano13/libpano13-2.9.22/libpano13-2.9.22.tar.gz" + sha256 "affc6830cdbe71c28d2731dcbf8dea2acda6d9ffd4609c6dbf3ba0c68440a8e3" + license "GPL-2.0-or-later" + version_scheme 1 + + livecheck do + url :stable + regex(%r{url=.*?/libpano13[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e0b93764142133cf6a62e5d9512bd7ba1a82ebabc2ae3660c62b345cf49c8af3" + sha256 cellar: :any, arm64_sonoma: "42f3f8617fa4d805513768324ee0de1ab490e90078a7481c8c1344a75850b7dc" + sha256 cellar: :any, arm64_ventura: "c2776938006e3a0b5bdc316e4a1dbcc4244a9193b43fa92b8dc04d251385af1f" + sha256 cellar: :any, arm64_monterey: "9446d3ebad930d7626cd713b2145c58a0f41a128669a26f7f8597a9836339b7b" + sha256 cellar: :any, sonoma: "0af56e6b3b09c834eeb1e761601077adf59aa8182c2bb3e7bb6b0af281d7b786" + sha256 cellar: :any, ventura: "7ed03995775f0db50976850f24874ea177cfb4dce9110ac0efbac4b9952f3bf3" + sha256 cellar: :any, monterey: "8c972fc65b94671e0d619e86fbcdd48b04fd4223c3b3cdd9888ae4e944447919" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a4729da262a95f93470e8ceb3646a42d86f1375fcf624c462f867411743b044" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30623a39cfd32fb1230f6ac0326235ef16c71e907fdfa0757c689e5d495b0980" + end + + depends_on "cmake" => :build + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + + uses_from_macos "zlib" + + patch :DATA + + 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 + panoinfo = shell_output(bin/"panoinfo").encode("UTF-8", invalid: :replace) + assert_match(/Panotools version:\s*#{Regexp.escape(version)}\s*$/, panoinfo) + + stable.stage { testpath.install Dir["tests/simpleStitch/{simple.txt,*.jpg,reference/tiff_m_uncropped0000.tif}"] } + system bin/"PTmender", "-o", "test", "simple.txt" + assert_match "051221_6054_750.jpg", shell_output("#{bin}/PTinfo test0000.tif") + assert_match "different values 0.000", shell_output("#{bin}/PTtiffdump test0000.tif tiff_m_uncropped0000.tif") + end +end + +__END__ +diff --git a/panorama.h b/panorama.h +index 70a9fae..2942993 100644 +--- a/panorama.h ++++ b/panorama.h +@@ -53,8 +53,12 @@ + #define PT_BIGENDIAN 1 + #endif + #else ++#if defined(__APPLE__) ++#include ++#else + #include + #endif ++#endif + #if defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN) + #define PT_BIGENDIAN 1 + #endif diff --git a/Formula/lib/libpaper.rb b/Formula/lib/libpaper.rb new file mode 100644 index 0000000000000..4eface8f02886 --- /dev/null +++ b/Formula/lib/libpaper.rb @@ -0,0 +1,41 @@ +class Libpaper < Formula + desc "Library for handling paper characteristics" + homepage "https://github.com/rrthomas/libpaper" + url "https://github.com/rrthomas/libpaper/releases/download/v2.2.6/libpaper-2.2.6.tar.gz" + sha256 "500d39dc58768ee09688738c8b5bfe07640ba2fd6c25a6dc78810eb69c719e93" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_sequoia: "9a86b63104ebab4bdac595a130a961b183f31f1f69aa9b159dfd8166ee673059" + sha256 arm64_sonoma: "9bbd54f9c2b9c5f17f14a2cf0fd528283947c63f8a8f372000c65fc94184303d" + sha256 arm64_ventura: "24bdbc1cd381cd73cc6626d7d07fa57e85008a8394b3b9118b903558fd581b17" + sha256 sonoma: "52569069e169b133ce021d5c93d9e84df75b4fbb419e7dc25fa735dd99cf2551" + sha256 ventura: "1312df7e0dde77300bb752fd56522edd6ee9d187660fe84cc6f52a6940764dfe" + sha256 arm64_linux: "f8c1c59cb54eb45323aa63b5c85d35972b9f093c3548c5928ea57736cfea5660" + sha256 x86_64_linux: "d5ac97feb19ebda571a7392c96a099e919d70b9dea6439153e9444dfe79fe252" + end + + depends_on "help2man" => :build + + def install + system "./configure", *std_configure_args, "--sysconfdir=#{etc}" + system "make", "install" + end + + test do + assert_match "A4: 210x297 mm", shell_output("#{bin}/paper --all") + assert_match "paper #{version}", shell_output("#{bin}/paper --version") + + (testpath/"test.c").write <<~C + #include + int main() + { + enum paper_unit unit; + int ret = paperinit(); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lpaper", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libparserutils.rb b/Formula/lib/libparserutils.rb new file mode 100644 index 0000000000000..91b0ba594414e --- /dev/null +++ b/Formula/lib/libparserutils.rb @@ -0,0 +1,41 @@ +class Libparserutils < Formula + desc "Library for building efficient parsers" + homepage "https://www.netsurf-browser.org/projects/libparserutils/" + url "https://download.netsurf-browser.org/libs/releases/libparserutils-0.2.5-src.tar.gz" + sha256 "317ed5c718f17927b5721974bae5de32c3fd6d055db131ad31b4312a032ed139" + license "MIT" + head "https://git.netsurf-browser.org/libparserutils.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e35b156576ddb9a5048e030e4bade56807a40b535d424c2d80fdbd9a322b761b" + sha256 cellar: :any, arm64_sonoma: "05df8ce204b79a682be32434c7e6a6e917cff35e1960ee23de39984722878f24" + sha256 cellar: :any, arm64_ventura: "6399bff8eeb1132f74e99f92c4795152ad7cc247039e90e7b56bcee7789506ca" + sha256 cellar: :any, sonoma: "24f00f6da2bc5e10f716aee6e32847f42dcacd22babda850c2cd654c05181c7f" + sha256 cellar: :any, ventura: "03f0248e3f07e65085701e82621d7a12807560f60a040111c07d867b14d1ddd3" + sha256 cellar: :any_skip_relocation, arm64_linux: "32ad8bbb44e2b6f06027e1117d02dced9c41c8961bc1a40aeefa8dd7c778a486" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f36934cb62bb14686eb7383c94055e3e965295aad1c1338357940527eab90e3" + end + + depends_on "netsurf-buildsystem" => :build + + def install + ENV.append "LDFLAGS", "-liconv" if OS.mac? + + args = %W[ + NSSHARED=#{Formula["netsurf-buildsystem"].opt_pkgshare} + PREFIX=#{prefix} + ] + + system "make", "install", "COMPONENT_TYPE=lib-shared", *args + system "make", "install", "COMPONENT_TYPE=lib-static", *args + + pkgshare.install "test" + (pkgshare/"test/utils").install "src/utils/utils.h" + end + + test do + system ENV.cc, pkgshare/"test/cscodec-utf8.c", "-I#{include}", "-L#{lib}", "-lparserutils", "-o", "cscodec-utf8" + output = shell_output(testpath/"cscodec-utf8 #{pkgshare}/test/data/cscodec-utf8/UTF-8-test.txt") + assert_match "PASS", output + end +end diff --git a/Formula/lib/libpcap.rb b/Formula/lib/libpcap.rb new file mode 100644 index 0000000000000..b2a2ce316124d --- /dev/null +++ b/Formula/lib/libpcap.rb @@ -0,0 +1,41 @@ +class Libpcap < Formula + desc "Portable library for network traffic capture" + homepage "https://www.tcpdump.org/" + url "https://www.tcpdump.org/release/libpcap-1.10.5.tar.gz" + sha256 "37ced90a19a302a7f32e458224a00c365c117905c2cd35ac544b6880a81488f0" + license "BSD-3-Clause" + head "https://github.com/the-tcpdump-group/libpcap.git", branch: "master" + + livecheck do + url "https://www.tcpdump.org/release/" + regex(/href=.*?libpcap[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2469721ab279d0e988bb6659dfd8bb3ab9317ca4ff20018eaa7a86f1749ba0e4" + sha256 cellar: :any, arm64_sonoma: "25f894b36f2bed3c1ec09f53b733cb79221e0264d0e995097c66a303815ac6ea" + sha256 cellar: :any, arm64_ventura: "8f55c62e20c74ecdcc8975ab8885659dd446bf6cf4b873f29695370de24b7815" + sha256 cellar: :any, arm64_monterey: "1878536fd135dc9674a6c82f71f349bb7e4b57785aebaa419509b5ea1f90b89b" + sha256 cellar: :any, sonoma: "515263fb7383b3bc74e5976472d79097a979ac0a521b94c024b3701f133dbeee" + sha256 cellar: :any, ventura: "7792689ed0fb4e70cf87216b4e81dc20361c67ba6b7aa4a1531a445c54c69686" + sha256 cellar: :any, monterey: "042224e1182717afa4663273c410c7d9758ce60301d8ecfafb5096f4a2ae7f17" + sha256 cellar: :any_skip_relocation, arm64_linux: "cab27b074b192f9489e7d588d9b6b96148eb4ba60afcd62149432baaab407bbb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7bc07f0a5bb3072c9f715cdb0799eaf1bd7a897c9ccc3373542845af931b4d32" + end + + keg_only :provided_by_macos + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + + def install + # Exclude unrecognized options + std_args = std_configure_args.reject { |s| s["--disable-debug"] || s["--disable-dependency-tracking"] } + system "./configure", "--enable-ipv6", "--disable-universal", *std_args + system "make", "install" + end + + test do + assert_match "lpcap", shell_output("#{bin}/pcap-config --libs") + end +end diff --git a/Formula/lib/libpciaccess.rb b/Formula/lib/libpciaccess.rb new file mode 100644 index 0000000000000..a9c509dd6fb20 --- /dev/null +++ b/Formula/lib/libpciaccess.rb @@ -0,0 +1,39 @@ +class Libpciaccess < Formula + desc "Generic PCI access library" + homepage "https://www.x.org/" + url "https://www.x.org/pub/individual/lib/libpciaccess-0.18.1.tar.xz" + sha256 "4af43444b38adb5545d0ed1c2ce46d9608cc47b31c2387fc5181656765a6fa76" + license "MIT" + + bottle do + sha256 arm64_linux: "a8fb19ee3879959b844dd4ba0d79850dbaf58d99863aaafc74ce099165ff49fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3433b90a4f960f70e9203327f632387b5ada5017be2500ab8098f9142406a075" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on :linux + depends_on "zlib" + + 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 "pciaccess.h" + int main(int argc, char* argv[]) { + int pci_system_init(void); + const struct pci_id_match *match; + struct pci_device_iterator *iter; + struct pci_device *dev; + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lpciaccess" + end +end diff --git a/Formula/lib/libpcl.rb b/Formula/lib/libpcl.rb new file mode 100644 index 0000000000000..c474505a975d5 --- /dev/null +++ b/Formula/lib/libpcl.rb @@ -0,0 +1,38 @@ +class Libpcl < Formula + desc "C library and API for coroutines" + homepage "http://www.xmailserver.org/libpcl.html" + url "http://www.xmailserver.org/pcl-1.12.tar.gz" + sha256 "e7b30546765011575d54ae6b44f9d52f138f5809221270c815d2478273319e1a" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?pcl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any, sonoma: "c2f937aca27092e775dc6c4262a318129560b1e079de3f077a307756ec31a417" + sha256 cellar: :any, ventura: "7318b096881fc158179da00e979a134736447b31f3c7f1047a78befeb129790c" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf0d6f7004ede33ceafaad3b1922a9ea3fefb7903c4060cd84e310df5c4b5f7d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "64a2d65ad2bcbbdcc93eedb2771d85da04a69e1e3b3304c256c68d509bc0de20" + end + + on_macos do + depends_on arch: :x86_64 + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + 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/lib/libpeas.rb b/Formula/lib/libpeas.rb new file mode 100644 index 0000000000000..582a7ddaeb383 --- /dev/null +++ b/Formula/lib/libpeas.rb @@ -0,0 +1,65 @@ +class Libpeas < Formula + desc "GObject plugin library" + homepage "https://wiki.gnome.org/Projects/Libpeas" + url "https://download.gnome.org/sources/libpeas/2.0/libpeas-2.0.7.tar.xz" + sha256 "1e9a9d69761d2109eff5b7c11d8c96b4867ccfaca2b921eded49401192769ec9" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_sequoia: "ee80bb2b9880d62c908d33623a1829f0a222bb6e402b00234f9deab1c7f0633d" + sha256 arm64_sonoma: "a4cd71342b28480f0dbed845598c31042f0e2b5a3f2ffb132319dd4cb9a545fc" + sha256 arm64_ventura: "9e822ce3fd39ad794fce013f7c980d606d2586228a16d27309c77609e72c7e69" + sha256 sonoma: "1459a702efa8caceea393ecabdade57e2cd976c47f06672c115e54e1f8105139" + sha256 ventura: "6faa77fc4715669752208ed373a3a4d8605d509aedf50881a6f0e1909304480a" + sha256 arm64_linux: "e93ed75627813c964c4ab489dce8f2f2b205f4514c151c90035dd9783c2d12e1" + sha256 x86_64_linux: "f3dac6a0f9ba1aa331b51822dc12f11539e92080294ce7c95984add7360cb9d5" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + depends_on "gjs" + depends_on "glib" + depends_on "gobject-introspection" + depends_on "gtk+3" + depends_on "pygobject3" + depends_on "python@3.13" + depends_on "spidermonkey" + + on_macos do + depends_on "gettext" + end + + def install + pyver = Language::Python.major_minor_version "python3.13" + # Help pkg-config find python as we only provide `python3-embed` for aliased python formula + inreplace "meson.build", "'python3-embed'", "'python-#{pyver}-embed'" + + args = %w[ + -Dlua51=false + -Dpython3=true + -Dintrospection=true + -Dvapi=true + ] + + 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[]) { + PeasObjectModule *mod = peas_object_module_new("test", "test", FALSE); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libpeas-2").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libpeas@1.rb b/Formula/lib/libpeas@1.rb new file mode 100644 index 0000000000000..fc02550b1177d --- /dev/null +++ b/Formula/lib/libpeas@1.rb @@ -0,0 +1,70 @@ +class LibpeasAT1 < Formula + desc "GObject plugin library" + homepage "https://wiki.gnome.org/Projects/Libpeas" + url "https://download.gnome.org/sources/libpeas/1.36/libpeas-1.36.0.tar.xz" + sha256 "297cb9c2cccd8e8617623d1a3e8415b4530b8e5a893e3527bbfd1edd13237b4c" + license "LGPL-2.1-or-later" + revision 1 + + bottle do + rebuild 1 + sha256 arm64_sequoia: "a7a811d4a2fe22ee7f65b6e5c72d77a9d4bbd9bbc2f1f2b799484695671447fa" + sha256 arm64_sonoma: "ca08be169114c264356fc1556108c1bb42c326990bbd2bd3e68eb03b751c50db" + sha256 arm64_ventura: "706a31d9b99a1092ac5a93f71f3faeb1f23c6e4a6e9976a8e5c57e37dc6a5a4a" + sha256 sonoma: "e3668a9bfe2c95576190265ba214ed90c928d5e7965f6bf75fe68fbfdd21d953" + sha256 ventura: "46fe7102d129d7c31095ffcfe391317576295b2b4d43f44c0cd7c31e37616392" + sha256 arm64_linux: "14fb239a9356dca2cdec0c5468272ea40b66047ae82a6d00fa104a5f8a0332ab" + sha256 x86_64_linux: "64df87ebec61741b04d81e290758550ea317811584c413b29510396fe4cd19b5" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + + depends_on "glib" + depends_on "gobject-introspection" + depends_on "gtk+3" + depends_on "pygobject3" + depends_on "python@3.13" + + on_macos do + depends_on "gettext" + end + + def install + pyver = Language::Python.major_minor_version "python3.13" + # Help pkg-config find python as we only provide `python3-embed` for aliased python formula + inreplace "meson.build", "'python3-embed'", "'python-#{pyver}-embed'" + + # ensure Meson uses homebrew python@3.13 + ENV.prepend_path "PKG_CONFIG_PATH", Formula["python@3.13"].opt_lib/"pkgconfig" + + args = %w[ + -Dpython3=true + -Dintrospection=true + -Dvapi=true + -Dwidgetry=true + -Ddemos=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.c").write <<~C + #include + + int main(int argc, char *argv[]) { + PeasObjectModule *mod = peas_object_module_new("test", "test", FALSE); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libpeas-1.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libpg_query.rb b/Formula/lib/libpg_query.rb new file mode 100644 index 0000000000000..fdb7fba828e50 --- /dev/null +++ b/Formula/lib/libpg_query.rb @@ -0,0 +1,30 @@ +class LibpgQuery < Formula + desc "C library for accessing the PostgreSQL parser outside of the server environment" + homepage "https://github.com/pganalyze/libpg_query" + url "https://github.com/pganalyze/libpg_query/archive/refs/tags/17-6.1.0.tar.gz" + version "17-6.1.0" + sha256 "a3dc0e4084a23da35128d4e9809ff27241c29a44fde74ba40a378b33d2cdefe2" + license all_of: ["BSD-3-Clause", "PostgreSQL"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "e8c80546510c8a0d0ee781bfcd508d628cb09f303027e740309b073b059659ce" + sha256 cellar: :any, arm64_sonoma: "62beb770cce1d083f1860515f7a4a553e403bfb23b37bb25581b1c61594da94b" + sha256 cellar: :any, arm64_ventura: "44a8cf078ad22fdaa7da6047c51b50c86a23a48d6684b9c6ab65acbb8644f177" + sha256 cellar: :any, sonoma: "ef50a40781c354d2e287d203f19231c4939a2383124279358654f1ee8b7db72e" + sha256 cellar: :any, ventura: "6c5f8d26151c65de69c5993c8555494099fb51cb75cb65a4d1ec44736f7df6a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "495b2d5eccb24c22efee380c66c2f095f160398fbbd29778f0bc33a759f39680" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2fb0b113d95c58f12d9a4f19a997f50ad2500970f44e592a801c4d756d7d9c31" + end + + def install + system "make" + system "make", "install", "prefix=#{prefix}" + pkgshare.install "examples" + end + + test do + cp pkgshare/"examples/simple.c", testpath + system ENV.cc, "simple.c", "-o", "test", "-L#{lib}", "-lpg_query" + assert_match "stmts", shell_output("./test") + end +end diff --git a/Formula/lib/libpgm.rb b/Formula/lib/libpgm.rb new file mode 100644 index 0000000000000..d11ba55d2335b --- /dev/null +++ b/Formula/lib/libpgm.rb @@ -0,0 +1,66 @@ +class Libpgm < Formula + desc "Implements the PGM reliable multicast protocol" + homepage "https://github.com/steve-o/openpgm" + license "LGPL-2.1-or-later" + head "https://github.com/steve-o/openpgm.git", branch: "master" + + stable do + url "https://github.com/steve-o/openpgm/archive/refs/tags/release-5-3-128.tar.gz" + version "5.3.128" + sha256 "8d707ef8dda45f4a7bc91016d7f2fed6a418637185d76c7ab30b306499c6d393" + + # Fix build on ARM. Remove in the next release along with stable block + patch do + url "https://github.com/steve-o/openpgm/commit/8d507fc0af472762f95da44036fb77662ff4cd2a.patch?full_index=1" + sha256 "070c3b52fd29f6c594bb6728a960bc19e4ea7d00b2c7eac51e33433e07d775b3" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0f2266ecabc1128e3a70ff8e31864e6cd556bd20b66cc2c74fd32011b2646dc4" + sha256 cellar: :any, arm64_sonoma: "6764decaa99670740309808e8be1ac3d75dbb9b8b8f8037d10c6dbe2932e0290" + sha256 cellar: :any, arm64_ventura: "27bb9366ecfabb4dafc81a54a1b7c39259cfcad13337a63c18a55ea0de26f2d5" + sha256 cellar: :any, arm64_monterey: "8461b86788d5f5d6b6240ca78169bc120dd05fc753dcf052403537f5bd173382" + sha256 cellar: :any, arm64_big_sur: "350aa74e762a89d01bd49237b95bb92bb97b213da951f72d5d8febe372c636da" + sha256 cellar: :any, sonoma: "a439be588514dae60781db58923be9b42dbd6e29c7ce2acfe44e81f13e291f8c" + sha256 cellar: :any, ventura: "4b1dc1f1e98ea4d6bbf9c47f069baec6521a9b35753044cdc2d5f1066ddd82f4" + sha256 cellar: :any, monterey: "6c5d4b6c58e5afb6c32f4b8681b5065dbc6c8920b505d14dd1dc49479411e56a" + sha256 cellar: :any, big_sur: "f5679fa01ad2590b57001a261b8eeffef2daf437021d75564fea4603ce348f68" + sha256 cellar: :any, catalina: "1b9796c9a1047eb51760a3e727258469338ddaa156bf592e83c65040ac17824c" + sha256 cellar: :any_skip_relocation, arm64_linux: "9def3024f67a4c2b91300eaeb65829f0ffa47652c47118354f96b1f82fdfe149" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5ceaf537037fb5918336027ab1ec0ab5484ca2230a58d6ba2b72569a416e9ed" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + uses_from_macos "python" => :build + + def install + workdir = build.stable? ? "openpgm/pgm" : "pgm" + cd workdir do + # Fix version number + cp "openpgm-5.2.pc.in", "openpgm-5.3.pc.in" if build.stable? + system "./bootstrap.sh" + system "./configure", *std_configure_args + system "make", "install" + end + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(void) { + pgm_error_t* pgm_err = NULL; + if (!pgm_init (&pgm_err)) { + return 1; + } + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}/pgm-5.3", "-L#{lib}", "-lpgm", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libphonenumber.rb b/Formula/lib/libphonenumber.rb new file mode 100644 index 0000000000000..af1c83fb1f3ea --- /dev/null +++ b/Formula/lib/libphonenumber.rb @@ -0,0 +1,77 @@ +class Libphonenumber < Formula + desc "C++ Phone Number library by Google" + homepage "https://github.com/google/libphonenumber" + url "https://github.com/google/libphonenumber/archive/refs/tags/v9.0.5.tar.gz" + sha256 "60095f6dc67d0359ec5008c5ad37f17003012c3de149b545d5a07b18d89acf90" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "b4a71cae21d8c87897d07b99ee06be539f82197acf1d5b5e726901257885e282" + sha256 cellar: :any, arm64_sonoma: "ce59d445f338e6d66ddccfdf21b0be3f123dbc3cb3d651f46f8b2df33d39c0d0" + sha256 cellar: :any, arm64_ventura: "028ecf1b6a4f2336e8b87a0d8af8c021357e502584defae2356213be6a63b6f0" + sha256 cellar: :any, sonoma: "b112e32e8f6e8dde93bab8daf8494bd9d9578537ea5bb7e4f4322be24272ab24" + sha256 cellar: :any, ventura: "53a62a1eb87f63fdc18ee0cbae79bd95f1bfc2e9fb301e3ba40df33b019121c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c71c4b92782ebcb6fe003cd1a02de6701ee6ade97e66f6f87c4c5f360483b17" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3cbccc4112d2b7c365bafc27d34a680a6fbe88b2fdc8980c0907ea6528db622" + end + + depends_on "cmake" => [:build, :test] + depends_on "openjdk" => :build + depends_on "abseil" + depends_on "boost" + depends_on "icu4c@77" + depends_on "protobuf" + + def install + ENV.append_to_cflags "-Wno-sign-compare" # Avoid build failure on Linux. + system "cmake", "-S", "cpp", "-B", "build", + "-DCMAKE_CXX_STANDARD=17", # keep in sync with C++ standard in abseil.rb + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + #include + + using namespace i18n::phonenumbers; + + int main() { + PhoneNumberUtil *phone_util_ = PhoneNumberUtil::GetInstance(); + PhoneNumber test_number; + std::string formatted_number; + test_number.set_country_code(1); + test_number.set_national_number(6502530000ULL); + phone_util_->Format(test_number, PhoneNumberUtil::E164, &formatted_number); + if (formatted_number == "+16502530000") { + return 0; + } else { + return 1; + } + } + CPP + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.14) + set(CMAKE_CXX_STANDARD 17) + project(test LANGUAGES CXX) + find_package(Boost COMPONENTS date_time system thread) + find_package(libphonenumber CONFIG REQUIRED) + add_executable(test test.cpp) + target_link_libraries(test libphonenumber::phonenumber-shared) + CMAKE + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "./build/test" + end +end diff --git a/Formula/lib/libpinyin.rb b/Formula/lib/libpinyin.rb new file mode 100644 index 0000000000000..f2e2eebaaf820 --- /dev/null +++ b/Formula/lib/libpinyin.rb @@ -0,0 +1,94 @@ +class Libpinyin < Formula + desc "Library to deal with pinyin" + homepage "https://github.com/libpinyin/libpinyin" + url "https://github.com/libpinyin/libpinyin/archive/refs/tags/2.10.1.tar.gz" + sha256 "f7444b0cedeb1e6011e08aa503e1e1513df11b60cddc7ed9693e630675d8fd87" + license "GPL-3.0-or-later" + + # Tags with a 90+ patch are unstable (e.g., the 2.9.91 tag is marked as + # pre-release on GitHub) and this regex should only match the stable versions. + livecheck do + url :stable + regex(/^v?(\d+\.\d+\.(?:\d|[1-8]\d+)(?:\.\d+)*)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "b3a7f8f3c78acae8c2688018a778d8bd1f87f41e492380acc83572b727a72fc2" + sha256 cellar: :any, arm64_sonoma: "aacf0504d2ef686d7f2be9243b2d7806e5d4e296a0d8281fb39abf052a237ccb" + sha256 cellar: :any, arm64_ventura: "538b68fef893238e2dac6bc79011a2e2b306b76369b7cc0d2fadfcd835b3852e" + sha256 cellar: :any, sonoma: "23eb8e8f59debecba46d2d98403ba5b5bbad91ec69a2dd2a813cf22e4d970f61" + sha256 cellar: :any, ventura: "158dc73fed2ccda3e8d04fbe4cae6e0aff470d0ee3a5aaedf4d60314f974d9f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "230456760164843688e08ab606754c64e2bbb0c02e483fde8c7063e5088d9ff3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84a37f05541a6b55433a2ca832b45d746eaf91f7be103f1455f3fe51de9457df" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + # macOS `ld64` does not like the `.la` files created during the build. + # upstream issue report, https://github.com/libpinyin/libpinyin/issues/158 + depends_on "lld" => :build if DevelopmentTools.clang_build_version >= 1400 + depends_on "pkgconf" => [:build, :test] + depends_on "glib" + + on_macos do + depends_on "berkeley-db" + depends_on "gettext" + end + + on_linux do + # We use the older Berkeley DB as it is already an indirect dependency + # (glib -> python@3.y -> berkeley-db@5) and gets linked by default + depends_on "berkeley-db@5" + end + + # The language model file is independently maintained by the project owner. + # To update this resource block, the URL can be found in data/Makefile.am. + resource "model" do + url "https://downloads.sourceforge.net/libpinyin/models/model20.text.tar.gz" + sha256 "59c68e89d43ff85f5a309489499cbcde282d2b04bd91888734884b7defcb1155" + end + + def install + # Workaround for Xcode 14 ld. + if DevelopmentTools.clang_build_version >= 1400 + ENV.append_to_cflags "-fuse-ld=lld" + # Work around superenv causing ld64.lld: error: -Os: number expected, but got 's' + ENV.O3 + end + + resource("model").stage buildpath/"data" + system "./autogen.sh", "--enable-libzhuyin=yes", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + + int main() + { + pinyin_context_t * context = pinyin_init (LIBPINYIN_DATADIR, ""); + + if (context == NULL) + return 1; + + pinyin_instance_t * instance = pinyin_alloc_instance (context); + + if (instance == NULL) + return 1; + + pinyin_free_instance (instance); + + pinyin_fini (context); + + return 0; + } + CPP + + flags = shell_output("pkgconf --cflags --libs libpinyin").chomp.split + system ENV.cxx, "test.cc", "-o", "test", "-DLIBPINYIN_DATADIR=\"#{lib}/libpinyin/data/\"", *flags + touch "user.conf" + system "./test" + end +end diff --git a/Formula/lib/libpipeline.rb b/Formula/lib/libpipeline.rb new file mode 100644 index 0000000000000..9b6300860d954 --- /dev/null +++ b/Formula/lib/libpipeline.rb @@ -0,0 +1,44 @@ +class Libpipeline < Formula + desc "C library for manipulating pipelines of subprocesses" + homepage "https://libpipeline.gitlab.io/libpipeline/" + url "https://download.savannah.nongnu.org/releases/libpipeline/libpipeline-1.5.8.tar.gz" + sha256 "1b1203ca152ccd63983c3f2112f7fe6fa5afd453218ede5153d1b31e11bb8405" + license "GPL-3.0-or-later" + + livecheck do + url "https://download.savannah.nongnu.org/releases/libpipeline/" + regex(/href=.*?libpipeline[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "f67581fe73ae3c61a464f81517ad552826b5fa3583c5c6eb03f3da49cf514aee" + sha256 cellar: :any, arm64_sonoma: "4b787bff3015387a503f742b68c364dad56e0af8d31a6a8935223bc65aad6015" + sha256 cellar: :any, arm64_ventura: "0cc8c97d57a3b87b05aae33064e6c0da47423dc55b805045d867ef066e811911" + sha256 cellar: :any, arm64_monterey: "b28d5147cafc83783181d99cc612056d062b5e15a90543351043af3afda40879" + sha256 cellar: :any, sonoma: "e0354d5f278901871e1fc4ba62668680a1c80fe90bd9f3345206e5e5ea798b71" + sha256 cellar: :any, ventura: "a1f870458e27abf80d1664aea510dbb59cf38b330a94253050c9ef17b2d2b7bd" + sha256 cellar: :any, monterey: "ae49773c27c293203ce8e82194ee64edf81aace1b517029698f0a104cb82d878" + sha256 cellar: :any_skip_relocation, arm64_linux: "d40093ecab1d13a45f12170a96c80d878d3b273ca0f0f0e9d9d684f4ced5299a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9767e66d73f174a20b3ea560643f30e3bb3e2b5764c0fc5de4196247e13feee" + end + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + pipeline *p = pipeline_new(); + pipeline_command_args(p, "echo", "Hello world", NULL); + pipeline_command_args(p, "cat", NULL); + return pipeline_run(p); + } + C + system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-lpipeline", "-o", "test" + assert_match "Hello world", shell_output("./test") + end +end diff --git a/Formula/lib/libplacebo.rb b/Formula/lib/libplacebo.rb new file mode 100644 index 0000000000000..c4827f144ff91 --- /dev/null +++ b/Formula/lib/libplacebo.rb @@ -0,0 +1,89 @@ +class Libplacebo < Formula + include Language::Python::Virtualenv + + desc "Reusable library for GPU-accelerated image/video processing primitives" + homepage "https://code.videolan.org/videolan/libplacebo" + license "LGPL-2.1-or-later" + head "https://code.videolan.org/videolan/libplacebo.git", branch: "master" + + stable do + url "https://code.videolan.org/videolan/libplacebo/-/archive/v7.349.0/libplacebo-v7.349.0.tar.bz2" + sha256 "38c9c75d9c1bb412baf34845d1ca58c41a9804d1d0798091d7a8602a0d7c9aa6" + + resource "fast_float" do + url "https://github.com/fastfloat/fast_float/archive/refs/tags/v6.1.1.tar.gz" + sha256 "10159a4a58ba95fe9389c3c97fe7de9a543622aa0dcc12dd9356d755e9a94cb4" + end + + resource "glad2" do + url "https://files.pythonhosted.org/packages/15/fc/9235e54b879487f7479f333feddf16ac8c1f198a45ab2e96179b16f17679/glad2-2.0.6.tar.gz" + sha256 "08615aed3219ea1c77584bd5961d823bab226f8ac3831d09adf65c6fa877f8ec" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz" + sha256 "4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/87/5b/aae44c6655f3801e81aa3eef09dbbf012431987ba564d7231722f68df02d/MarkupSafe-2.1.5.tar.gz" + sha256 "d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "3d549716eb833fbc554605706f4e4740f0c1c4e6cf23732326444627ea14a8d5" + sha256 cellar: :any, arm64_sonoma: "72afc163cc9dfc5525ed856094449685f034dfbbd8528f04e448b0447dd44f06" + sha256 cellar: :any, arm64_ventura: "8860b6fd41fdd672a503b4951cb539d8ae11eaf953b64aef8188090f862138ab" + sha256 cellar: :any, arm64_monterey: "bfba0779b291723de7012b77cfc04e2d2909764012580e002808658697768ef2" + sha256 cellar: :any, sonoma: "a5f15e9286de87a34619dbd377fd26a83fddb667ff45036fa7aa09ad3ca2a3d3" + sha256 cellar: :any, ventura: "7ee7837caa82be9fa7294eb11f9a34545aad429a2202aaef5b19ba50dc02ea08" + sha256 cellar: :any, monterey: "be243d1baa8e092186e1f6a7d8be0964e243bcb77fe2372dbc3736c3a3f8d910" + sha256 arm64_linux: "2cae1d9fd160729c2a5885e83d65b63c4326a984eb456b2b7f63fc6f86e1cb8b" + sha256 x86_64_linux: "db810576ae7bfb3bc20cf244271d00ab7e24701fe77d2540cf10407b22d6392d" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :build + depends_on "vulkan-headers" => :build + + depends_on "little-cms2" + depends_on "shaderc" + depends_on "vulkan-loader" + + def install + resources.each do |r| + # Override resource name to use expected directory name + dir_name = case r.name + when "glad2", "jinja2" + r.name.sub(/\d+$/, "") + else + r.name + end + + r.stage(Pathname("3rdparty")/dir_name) + end + + system "meson", "setup", "build", + "-Dvulkan-registry=#{Formula["vulkan-headers"].share}/vulkan/registry/vk.xml", + "-Dshaderc=enabled", "-Dvulkan=enabled", "-Dlcms=enabled", + *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() { + return (pl_version() != NULL) ? 0 : 1; + } + C + system ENV.cc, "-o", "test", "test.c", "-I#{include}", + "-L#{lib}", "-lplacebo" + system "./test" + end +end diff --git a/Formula/lib/libplctag.rb b/Formula/lib/libplctag.rb new file mode 100644 index 0000000000000..ce75f2ab247e7 --- /dev/null +++ b/Formula/lib/libplctag.rb @@ -0,0 +1,47 @@ +class Libplctag < Formula + desc "Portable and simple API for accessing AB PLC data over Ethernet" + homepage "https://github.com/libplctag/libplctag" + url "https://github.com/libplctag/libplctag/archive/refs/tags/v2.6.5.tar.gz" + sha256 "0f2983e024c9ca8dd7e956258f0b99d64cc8c37aa0cf3eb75350e1edca00841f" + license any_of: ["LGPL-2.0-or-later", "MPL-2.0"] + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "541435d2df4cf296f05adb46a6f44c5cc5cd4181107cedd641c7a98e3c137339" + sha256 cellar: :any, arm64_sonoma: "3c97113bf7d6f7655911edd5c74793d6e555d4b26016414356f91fe6d9412792" + sha256 cellar: :any, arm64_ventura: "67cee16a6e8835ff6a153a0f0724e5d508171f9d901b394f3ba3f6689417701e" + sha256 cellar: :any, sonoma: "b3dd6661167b714560164a61b32c1e8960fe43ec7f9cfb5e7bdcad90be61de2e" + sha256 cellar: :any, ventura: "c90369c966d930837a140d98f7fa243b411b29e5d39218ef6d9f0c2395e562bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "d9531ccb144fe7c05d348c227f23ffec80b30d755e5adc9f9f43576dfceb3d96" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc1f12a2e4f5b6fa68c9925b3d0238a4b66e19405a9c72b043c87a0df9636dab" + 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 + #include + + int main(int argc, char **argv) { + int32_t tag = plc_tag_create("protocol=ab_eip&gateway=192.168.1.42&path=1,0&cpu=LGX&elem_size=4&elem_count=10&name=myDINTArray", 1); + if (!tag) abort(); + plc_tag_destroy(tag); + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lplctag", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libplist.rb b/Formula/lib/libplist.rb new file mode 100644 index 0000000000000..8a5234abd7070 --- /dev/null +++ b/Formula/lib/libplist.rb @@ -0,0 +1,56 @@ +class Libplist < Formula + desc "Library for Apple Binary- and XML-Property Lists" + homepage "https://libimobiledevice.org/" + url "https://github.com/libimobiledevice/libplist/releases/download/2.7.0/libplist-2.7.0.tar.bz2" + sha256 "7ac42301e896b1ebe3c654634780c82baa7cb70df8554e683ff89f7c2643eb8b" + license "LGPL-2.1-or-later" + head "https://github.com/libimobiledevice/libplist.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bc9f54c183ce7595f0467c2d8cd8a717e41fc5faf6401e188a210f16b3e04bff" + sha256 cellar: :any, arm64_sonoma: "06036e6de87c0a8bfc917d72f2af3f63ea6eb557391035782ca8bddb5506c342" + sha256 cellar: :any, arm64_ventura: "ff220e5eab9f73928cb74198a245052a195c68d42e3f02ebcf623470c461fe4d" + sha256 cellar: :any, sonoma: "1ee2a67e37b9aa465a9ce313101ab32cd3bc4959c6613c6cf844d01ce078adc3" + sha256 cellar: :any, ventura: "93e6458295e03f9d407de1668d4b74b6862837c85d27543742046e6f5f9a5d9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "5c794ad878825bf09dd2f6bd40440fc0dadf9094c359b448ff13e9c2b9f0e1f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f36cb92e347dee363b01764ed57da3051621da3986188e483c7dcde0425f08a1" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + def install + ENV.deparallelize + + args = %w[ + --disable-silent-rules + --without-cython + ] + + system "./autogen.sh", *args, *std_configure_args if build.head? + system "./configure", *args, *std_configure_args if build.stable? + system "make" + system "make", "install" + end + + test do + (testpath/"test.plist").write <<~EOS + + + + + Label + test + ProgramArguments + + /bin/echo + + + + EOS + system bin/"plistutil", "-i", "test.plist", "-o", "test_binary.plist" + assert_path_exists testpath/"test_binary.plist", "Failed to create converted plist!" + end +end diff --git a/Formula/lib/libpng.rb b/Formula/lib/libpng.rb new file mode 100644 index 0000000000000..db29089824c4a --- /dev/null +++ b/Formula/lib/libpng.rb @@ -0,0 +1,61 @@ +class Libpng < Formula + desc "Library for manipulating PNG images" + homepage "http://www.libpng.org/pub/png/libpng.html" + url "https://downloads.sourceforge.net/project/libpng/libpng16/1.6.48/libpng-1.6.48.tar.xz" + mirror "https://sourceforge.mirrorservice.org/l/li/libpng/libpng16/1.6.48/libpng-1.6.48.tar.xz" + sha256 "46fd06ff37db1db64c0dc288d78a3f5efd23ad9ac41561193f983e20937ece03" + license "libpng-2.0" + + livecheck do + url :stable + regex(%r{url=.*?/libpng[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "a6ca2508569d9237cbb46a2d3da13b9e2e8d9d042ca48b78463f34aa527cd7ce" + sha256 cellar: :any, arm64_sonoma: "44fc8cfe04fcf2bf39fb2dc479f5b7170fb7a3db23e6fadc5d71ea3eff2ccfa2" + sha256 cellar: :any, arm64_ventura: "0c4e9222ea305c1b20edeb3bfe79cc99098291286a37a0da1f980cd5621d70ba" + sha256 cellar: :any, sonoma: "0858ad8c30002d9277514223d78a7f52fb04d6f1263c00b66714a74fb9baaf8f" + sha256 cellar: :any, ventura: "0bcf3cf2bcc9ca53834d5806c9dafc6bc0c2dbebc196b8722e50d6059e5fb92f" + sha256 cellar: :any_skip_relocation, arm64_linux: "cdfd8c8ad7b7a8ed8257bc59ee4e05ce7adea9fb04991928efdc681f530b1ca1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e10fd6235517d48b80f5d7b30271b19264102ff7bfb1fd4bec293e41866db84d" + end + + head do + url "https://github.com/glennrp/libpng.git", branch: "libpng16" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + uses_from_macos "zlib" + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make" + system "make", "test" + system "make", "install" + + # Avoid rebuilds of dependants that hardcode this path. + inreplace lib/"pkgconfig/libpng.pc", prefix, opt_prefix + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + png_structp png_ptr; + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + png_destroy_write_struct(&png_ptr, (png_infopp)NULL); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lpng", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libpointing.rb b/Formula/lib/libpointing.rb new file mode 100644 index 0000000000000..fc1c87376f40d --- /dev/null +++ b/Formula/lib/libpointing.rb @@ -0,0 +1,73 @@ +class Libpointing < Formula + desc "Provides direct access to HID pointing devices" + homepage "https://github.com/INRIA/libpointing" + url "https://github.com/INRIA/libpointing/archive/refs/tags/v1.0.8.tar.gz" + sha256 "697581d27101c9816f1b19715e7ace85a5345857d65e4eaa82840cf2051435d6" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fc963b2d475b92c4a7fd7a525d0ae301cedad7c825d50bd47f1e174be955ab51" + sha256 cellar: :any, arm64_sonoma: "2d7abf099808b966f2e79ff4ee050ae9ba2dcaa009577575a8ceceeb657e3cda" + sha256 cellar: :any, arm64_ventura: "79773a252a784d765237674545e3355bec847c95f9ac82cc89826936954f8990" + sha256 cellar: :any, arm64_monterey: "777a0f897878a4da3693f9d8a5717f42ff70fc281a81b57b4841a31ce17e7100" + sha256 cellar: :any, arm64_big_sur: "19de172dd9ad6744f9939955a5c526d3626400727631cdd07a6e22d8791fbf48" + sha256 cellar: :any, sonoma: "ca321e413ebc04effeb4c54ee765a9954eccfed31df4111413480826429ca5d2" + sha256 cellar: :any, ventura: "97732d46ffab874e21adbaeaf3a6953df026772565ccfa5dcb5f5d51378ac75e" + sha256 cellar: :any, monterey: "9fad8e2c767cc76679b49546cf443a0ec1d7b7115dbd82faaff20649b3b77ff4" + sha256 cellar: :any, big_sur: "e9168eee924fc759e012e3ef41d64750d732f0d09a7af068fd935746835da472" + sha256 cellar: :any, catalina: "d56d66f5df0d6e1c80cc4e4951e8add9cbb0c5fb76080c9107f66665b8b46e48" + sha256 cellar: :any, mojave: "adecdbec3a556dfd78dd1aa24f6868814fc4b3243310311192fee4e9de912c62" + sha256 cellar: :any, high_sierra: "97e7550c8e3c3007df96cc98eab35a297ed857a6fd1bc24011d1dea8350966e5" + sha256 cellar: :any, sierra: "1fc9b4bdab762eb8f93c4a75c57e82b14f3274186f5185fa9a17e8d0f3bc3452" + sha256 cellar: :any_skip_relocation, arm64_linux: "ffb598217e1da31c8150b384ff7a88d6afdb3c5980edf11f7422033ca5bb2972" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0bb26145aac1e2fa3a1a552c8120a5f2f6fbd0fb7b9836dfccdbbaaeec7e161c" + end + + uses_from_macos "python" => :build + + on_linux do + depends_on "libx11" + depends_on "libxi" + depends_on "libxrandr" + depends_on "systemd" + end + + def install + # Fix packaging scripts to be compatible with Python 3 + scripts = %w[building-and-packaging/linux/prepare building-and-packaging/mac/prepare] + inreplace scripts do |s| + s.gsub! "#!/usr/bin/env python", "#!/usr/bin/env python3" + s.gsub! ": print >> fd, TEST_PROG\n", ": print(TEST_PROG, file=fd)\n" + s.gsub!(/print >> makefile, (.*)\n/, "print(\\1, file=makefile)\n") + s.gsub! "print >> makefile\n", "print(\"\", file=makefile)\n" + end + + ENV.cxx11 + platform = OS.mac? ? "mac" : "linux" + cd "building-and-packaging/#{platform}" do + ENV["LIBPOINTING_VERSION"] = version + system "./prepare" + subdir = OS.mac? ? version : "dist" + system "make", "-C", "libpointing-#{subdir}" + system "make", "-C", "libpointing-#{subdir}", "install", "PREFIX=#{prefix}" + end + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + std::cout << LIBPOINTING_VER_STRING << " |" ; + std::list schemes = pointing::TransferFunction::schemes() ; + for (std::list::iterator i=schemes.begin(); i!=schemes.end(); ++i) { + std::cout << " " << (*i) ; + } + std::cout << std::endl ; + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lpointing", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libpoker-eval.rb b/Formula/lib/libpoker-eval.rb new file mode 100644 index 0000000000000..63bf33bdabde8 --- /dev/null +++ b/Formula/lib/libpoker-eval.rb @@ -0,0 +1,37 @@ +class LibpokerEval < Formula + desc "C library to evaluate poker hands" + homepage "https://pokersource.sourceforge.net/" + # http://download.gna.org/pokersource/sources/poker-eval-138.0.tar.gz is offline + url "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/poker-eval/138.0-1/poker-eval_138.0.orig.tar.gz" + sha256 "92659e4a90f6856ebd768bad942e9894bd70122dab56f3b23dd2c4c61bdbcf68" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "becb0628bede0bab265c5fdd06c91ae705b1d53be58db78fc2edfdd4b79f1776" + sha256 cellar: :any, arm64_sonoma: "167fe5ff48e636128d58bf9c0645f58af77550669bf1f626b385adfbe20c4dd5" + sha256 cellar: :any, arm64_ventura: "a4cebe2f59bd06f50608c0df206de3cfa2d3512a54933ed3ae161a09dd499a84" + sha256 cellar: :any, arm64_monterey: "a92ca2dd4b28f4280177846140b0d1db97dc12b855e481eaf3bef1211ee0de24" + sha256 cellar: :any, arm64_big_sur: "3b2910848df5a62c48ff9ecca9797de0c6c82c73e5392c0bc63202fd7a51815a" + sha256 cellar: :any, sonoma: "2c0023bc4da795dbade8572b92ba6aac7b5fd68ab945ee2f4e0d03739a960d1b" + sha256 cellar: :any, ventura: "47680460b617535c739e9185e07262ee04a63c449e0fed0decc319df46456f69" + sha256 cellar: :any, monterey: "48609ddd2db1e24baecede6fa77ef4845f4f48dfa0d8e8ce07b021c9f4552530" + sha256 cellar: :any, big_sur: "08b9a0817303ed87c19ce2345e92ccf6d1698d3b48f1d8ed7332663bb16dc227" + sha256 cellar: :any, catalina: "803f48db07d845ec9784792ed0fe5cdc86cb67e6632ed9f72dde75619481bf83" + sha256 cellar: :any, mojave: "313ff85dd7ec513a95ee8846c657819fdadbebccf0bdce228f180305ee56a716" + sha256 cellar: :any, high_sierra: "415934c921d4ccced5426f9aa807b0cf11da031cb2c973e17d506a9f740ac645" + sha256 cellar: :any, sierra: "5216cd33d433fd9212ed14d6fffec593c7106226547c1555344604186e7aafc6" + sha256 cellar: :any, el_capitan: "67b105600a8e29ed2d38421bc27340ff6e9092806f6458f0ddd6a27de0bcfb9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d17810f1cdeacb43e5ec95d567c84f39eb99582058d5d3ac2f110cca04d01b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "723cc1e71146dbe997acaacd71fd71f46266de3977b0ee24f3cf54fae280d208" + 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/lib/libpostal-rest.rb b/Formula/lib/libpostal-rest.rb new file mode 100644 index 0000000000000..7b892dcd5474a --- /dev/null +++ b/Formula/lib/libpostal-rest.rb @@ -0,0 +1,64 @@ +class LibpostalRest < Formula + desc "REST API for libpostal" + homepage "https://github.com/johnlonganecker/libpostal-rest" + url "https://github.com/johnlonganecker/libpostal-rest/archive/refs/tags/v1.1.0.tar.gz" + sha256 "d02d738fe1d8aee034c47ff9e8123e55885fe481f1a6307fbfe286b7b755468d" + license "MIT" + head "https://github.com/johnlonganecker/libpostal-rest.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fd5d9cfcd9ea16dd5b1990b18ec200eef3de42b32dbcfc71e74d60dc1e77d5ec" + sha256 cellar: :any, arm64_sonoma: "35f195463499d406f38fd34722108ec532d1a5faa59bae40266efac277d204a7" + sha256 cellar: :any, arm64_ventura: "20db7d2a602976a14915f4f8246950a17aab06fcd2743e0d4dd0cf867df3eb99" + sha256 cellar: :any, sonoma: "5364b98a31cf0dd48e851bb94be7cccc60f52568d4952b959b9e6a067dd1fd61" + sha256 cellar: :any, ventura: "bc55976fe713ac4b6eb92c00f7452410c68c6bde7800fef401e077944d8b7453" + sha256 cellar: :any_skip_relocation, arm64_linux: "2c6c6f1cb64e46da29ede7308c2f9efcdc140f171f23d41cb0d55586f5c8c2b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "945be628085aa46d50c62af4014749288db83af578bdd175b648032661adad25" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + depends_on "libpostal" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + require "json" + + port = free_port + ENV["LISTEN_PORT"] = port.to_s + pid = spawn bin/"libpostal-rest" + sleep 5 + sleep 10 if OS.mac? && Hardware::CPU.intel? + + command = <<~EOS + curl --silent --retry 5 --retry-connrefused -X POST -d '{"query": "100 main st buffalo ny"}' http://0.0.0.0:#{port}/parser + EOS + expected = [ + { + "label" => "house_number", + "value" => "100", + }, + { + "label" => "road", + "value" => "main st", + }, + { + "label" => "city", + "value" => "buffalo", + }, + { + "label" => "state", + "value" => "ny", + }, + ] + + parsed = JSON.parse shell_output(command) + assert_equal expected, parsed + ensure + Process.kill "TERM", pid + Process.wait pid + end +end diff --git a/Formula/lib/libpostal.rb b/Formula/lib/libpostal.rb new file mode 100644 index 0000000000000..ab98f0b9f6be3 --- /dev/null +++ b/Formula/lib/libpostal.rb @@ -0,0 +1,106 @@ +class Libpostal < Formula + desc "Library for parsing/normalizing street addresses around the world" + homepage "https://github.com/openvenues/libpostal" + url "https://github.com/openvenues/libpostal/archive/refs/tags/v1.1.tar.gz" + sha256 "8cc473a05126895f183f2578ca234428d8b58ab6fadf550deaacd3bd0ae46032" + license "MIT" + head "https://github.com/openvenues/libpostal.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "977117dd4cbadd9c7a54b1a98cbf8a4cf5d76435d3fb2a4bd7219777b7ddac8c" + sha256 arm64_sonoma: "814ede166ebe7352cc9850527f29e9395eea6a2248a16ad450d0606216923e25" + sha256 arm64_ventura: "e6412f74a7d126a91f3c29337f73e3284329c95b1fba7924a653f3115918802c" + sha256 sonoma: "077f8b1500c01ca5f5c6586b6570d33c0af2285b4d6e2811af431918b4b382c0" + sha256 ventura: "4e553905102caddeb88a154bd251748381ca94ee63ce1b2f56cf80e65aabe327" + sha256 arm64_linux: "aed0795c4d0a2894d8297bca8dd6b758aa4aecac1af139cb5491c9e9b75a98ea" + sha256 x86_64_linux: "6f935c41597746bddc0c0e0fcc132f7e9ed9de317f8a49702f25cc01ce4fe844" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + + # These resources reference the `v1.0.0` tag from the `libpostal` repository, + # even though that is not the most recent stable version of the code. + # `libpostal` requires these data files in order to work, and it appears that + # the data files are versioned independently from the code itself. + resource "libpostal_data" do + url "https://github.com/openvenues/libpostal/releases/download/v1.0.0/libpostal_data.tar.gz" + sha256 "d2ec50587bf3a7e46e18e5dcde32419134266f90774e3956f2c2f90d818ff9a1" + end + resource "parser" do + url "https://github.com/openvenues/libpostal/releases/download/v1.0.0/parser.tar.gz" + sha256 "7194e9b0095f71aecb861269f675e50703e73e352a0b9d41c60f8d8ef5a03624" + end + resource "language_classifier" do + url "https://github.com/openvenues/libpostal/releases/download/v1.0.0/language_classifier.tar.gz" + sha256 "16a6ecb6d37e7e25d8fe514255666852ab9dbd4d9cc762f64cf1e15b4369a277" + end + + def install + pkgshare.install resource("libpostal_data") + (pkgshare/"language_classifier").install resource("language_classifier") + (pkgshare/"address_parser").install resource("parser") + (pkgshare/"data_version").write "v1" + + system "./bootstrap.sh" + + args = [ + "--datadir=#{share}", + "--disable-data-download", + ] + args << "--disable-sse2" if Hardware::CPU.arm? + system "./configure", *args, *std_configure_args + system "make", "install" + + # remove script for downloading data -- it's unnecessary + rm bin/"libpostal_data" + end + + test do + # This test file is copied from the project README: + # https://github.com/openvenues/libpostal?tab=readme-ov-file#usage-parser + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(int argc, char **argv) { + // Setup (only called once at the beginning of your program) + if (!libpostal_setup() || !libpostal_setup_parser()) { + exit(EXIT_FAILURE); + } + + libpostal_address_parser_options_t options = libpostal_get_address_parser_default_options(); + libpostal_address_parser_response_t *parsed = libpostal_parse_address("781 Franklin Ave Crown Heights Brooklyn NYC NY 11216 USA", options); + + for (size_t i = 0; i < parsed->num_components; i++) { + printf("%s: %s\\n", parsed->labels[i], parsed->components[i]); + } + + // Free parse result + libpostal_address_parser_response_destroy(parsed); + + // Teardown (only called once at the end of your program) + libpostal_teardown(); + libpostal_teardown_parser(); + } + C + + pkg_config_cflags = shell_output("pkg-config --cflags --libs libpostal").chomp.split + system ENV.cc, "test.c", *pkg_config_cflags, "-o", "test" + + expected = <<~EOS + house_number: 781 + road: franklin ave + suburb: crown heights + city_district: brooklyn + city: nyc + state: ny + postcode: 11216 + country: usa + EOS + assert_equal expected, shell_output("./test") + end +end diff --git a/Formula/lib/libpq.rb b/Formula/lib/libpq.rb new file mode 100644 index 0000000000000..2dd9d27cdb5ff --- /dev/null +++ b/Formula/lib/libpq.rb @@ -0,0 +1,98 @@ +class Libpq < Formula + desc "Postgres C API library" + homepage "https://www.postgresql.org/docs/current/libpq.html" + url "https://ftp.postgresql.org/pub/source/v17.5/postgresql-17.5.tar.bz2" + sha256 "fcb7ab38e23b264d1902cb25e6adafb4525a6ebcbd015434aeef9eda80f528d8" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_sequoia: "c6765fe0928bbf4748d3b3dde8526ecf2f72b3cc5228de9148bfea3d39867ed8" + sha256 arm64_sonoma: "6be0459aa835312193f0c5016c476d631586ec0272eaa9b8c18545b6146b3a71" + sha256 arm64_ventura: "f0062e5202103dbc0cd2e7d9cf1fd759d62611931eb904e6024bad003e8ff6f7" + sha256 sonoma: "50d492965b1860f1e7d648fdc77d2768ac4d995e659968a7e872a66370d6213d" + sha256 ventura: "a8bee90dd7dbc4876f42d19ac69716738b381a356230dc45ed5a923a1434e79b" + sha256 arm64_linux: "82ab721a86a42257f2e2152afdc6b080a07b0e93393c580dbd01a2352a2d8309" + sha256 x86_64_linux: "0c73376d125c4d80714135ebbd2deb1aa56bb4938f5420ecf4fb592beba55295" + end + + keg_only "conflicts with postgres formula" + + depends_on "docbook" => :build + depends_on "docbook-xsl" => :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 "openssl@3" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "libxml2" => :build + uses_from_macos "libxslt" => :build # for xsltproc + uses_from_macos "zlib" + + on_linux do + depends_on "readline" + end + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + ENV.runtime_cpu_detection + + system "./configure", "--disable-debug", + "--prefix=#{prefix}", + "--with-gssapi", + "--with-openssl", + "--libdir=#{opt_lib}", + "--includedir=#{opt_include}" + dirs = %W[ + libdir=#{lib} + includedir=#{include} + pkgincludedir=#{include}/postgresql + includedir_server=#{include}/postgresql/server + includedir_internal=#{include}/postgresql/internal + ] + system "make" + system "make", "-C", "src/bin", "install", *dirs + system "make", "-C", "src/include", "install", *dirs + system "make", "-C", "src/interfaces", "install", *dirs + system "make", "-C", "src/common", "install", *dirs + system "make", "-C", "src/port", "install", *dirs + system "make", "-C", "doc", "install", *dirs + end + + test do + (testpath/"libpq.c").write <<~C + #include + #include + #include + + int main() + { + const char *conninfo; + PGconn *conn; + + conninfo = "dbname = postgres"; + + conn = PQconnectdb(conninfo); + + if (PQstatus(conn) != CONNECTION_OK) // This should always fail + { + printf("Connection to database attempted and failed"); + PQfinish(conn); + exit(0); + } + + return 0; + } + C + system ENV.cc, "libpq.c", "-L#{lib}", "-I#{include}", "-lpq", "-o", "libpqtest" + assert_equal "Connection to database attempted and failed", shell_output("./libpqtest") + end +end diff --git a/Formula/lib/libpqxx.rb b/Formula/lib/libpqxx.rb new file mode 100644 index 0000000000000..c2c6e012f46c0 --- /dev/null +++ b/Formula/lib/libpqxx.rb @@ -0,0 +1,46 @@ +class Libpqxx < Formula + desc "C++ connector for PostgreSQL" + homepage "https://pqxx.org/development/libpqxx/" + url "https://github.com/jtv/libpqxx/archive/refs/tags/7.10.1.tar.gz" + sha256 "cfbbb1d93a0a3d81319ec71d9a3db80447bb033c4f6cee088554a88862fd77d7" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "69a1b8a5ca5b3dbef5c4d8d2e5551951f94b9d14a0764923d187c47248f05f76" + sha256 cellar: :any, arm64_sonoma: "a2d7f9df60c26e02077ef4e75fa056f462ecb7f246289d0b286037ec5f21d0cc" + sha256 cellar: :any, arm64_ventura: "3ad77f64389847790537623eb4d13ba241382d47720888c7ec494bc716bbd026" + sha256 cellar: :any, sonoma: "2a14042a342c722b41854636513e97561592a584e0df9f9092285d33590888cc" + sha256 cellar: :any, ventura: "3068d9da7e7738e52292fa050ad17da295374c1a1e7da2d5c79a2b42f08a1b1a" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b3888afb0a0301fd3cab111d947e3c8c341a98f704a8e98ac6a5a2b78613bce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2736a2bc32c9f4cadacd4c0175680b9526b6a9250509747e96627da395bbd0f" + end + + depends_on "pkgconf" => :build + depends_on "xmlto" => :build + depends_on "libpq" + depends_on macos: :catalina # requires std::filesystem + + uses_from_macos "python" => :build, since: :catalina + + def install + ENV.append "CXXFLAGS", "-std=c++17" + ENV["PG_CONFIG"] = Formula["libpq"].opt_bin/"pg_config" + + system "./configure", "--disable-silent-rules", "--enable-shared", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main(int argc, char** argv) { + pqxx::connection con; + return 0; + } + CPP + system ENV.cxx, "-std=c++17", "test.cpp", "-L#{lib}", "-lpqxx", + "-I#{include}", "-o", "test" + # Running ./test will fail because there is no running postgresql server + # system "./test" + end +end diff --git a/Formula/lib/libprelude.rb b/Formula/lib/libprelude.rb new file mode 100644 index 0000000000000..caf011591ea6c --- /dev/null +++ b/Formula/lib/libprelude.rb @@ -0,0 +1,96 @@ +class Libprelude < Formula + desc "Universal Security Information & Event Management (SIEM) system" + homepage "https://www.prelude-siem.org/" + url "https://deb.debian.org/debian/pool/main/libp/libprelude/libprelude_5.2.0.orig.tar.gz" + sha256 "187e025a5d51219810123575b32aa0b40037709a073a775bc3e5a65aa6d6a66e" + license "GPL-2.0-or-later" + revision 2 + + bottle do + rebuild 2 + sha256 arm64_sequoia: "85b094bb36c75510e7cae400478972591a03082b8164e7b183fd0b014fffcec2" + sha256 arm64_sonoma: "2ab78aeb01f7a0d2d369ccc3c91e8c14e0e4b192545a222272e7577ded59d56c" + sha256 arm64_ventura: "b036b329b9cd3385fdc29af3504dc3cfe66874dd48e3143816d2809b8be86517" + sha256 arm64_monterey: "1cbcd9a92e12218283d47970e23e4619c8480018dc5e2f503b5b2b02e689e262" + sha256 sonoma: "f3a949405b38d7738f8d94dae6fb90b1561702192e666db623f2c8228d52a320" + sha256 ventura: "3a2c08553d695bea452ef9fba367c05eb6eac05a9225083a45c3dd8126c942c8" + sha256 monterey: "9cf654ae4238290e9cd8c16e34b41a48dbbfd0d4e1cff034cb69361849f7848e" + sha256 x86_64_linux: "52bd631b4ad679cd32f6f8c46d6e3471d800af3e32d4672009bb05733935766d" + end + + # As of the deprecation date, the upstream site is down and Repology + # shows libprelude has been dropped by Fedora, Gentoo and pkgsrc. + # Last release on 2020-09-11 + deprecate! date: "2024-11-04", because: :unmaintained + + depends_on "pkgconf" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "gnutls" + depends_on "libgpg-error" + depends_on "libtool" + + # Fix compatibility with Python 3.10 or later using Debian patch. + # ImportError: symbol not found in flat namespace '_PyIOBase_Type' + patch do + url "https://sources.debian.org/data/main/libp/libprelude/5.2.0-5/debian/patches/025-Fix-PyIOBase_Type.patch" + sha256 "cd03b3dc208c2a4168a0a85465d451c7aa521bf0b8446ff4777f2c969be386ba" + end + + def python3 + "python3.12" + 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 + + ENV["HAVE_CXX"] = "yes" + args = %W[ + --disable-silent-rules + --without-valgrind + --without-lua + --without-ruby + --without-perl + --without-swig + --without-python2 + --without-python3 + --with-libgnutls-prefix=#{Formula["gnutls"].opt_prefix} + ] + + system "./configure", *std_configure_args, *args + system "make" + system "make", "install" + + # 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. + # This is done by manually install python bindings. + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "./bindings/python" + end + + test do + assert_equal prefix.to_s, shell_output(bin/"libprelude-config --prefix").chomp + assert_equal version.to_s, shell_output(bin/"libprelude-config --version").chomp + + (testpath/"test.c").write <<~C + #include + + int main(int argc, const char* argv[]) { + int ret = prelude_init(&argc, argv); + if ( ret < 0 ) { + prelude_perror(ret, "unable to initialize the prelude library"); + return -1; + } + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lprelude", "-o", "test" + system "./test" + + (testpath/"test.py").write <<~PYTHON + import prelude + idmef = prelude.IDMEF() + idmef.set("alert.classification.text", "Hello world!") + print(idmef) + PYTHON + assert_match(/classification:\s*text: Hello world!/, shell_output("#{python3} test.py")) + end +end diff --git a/Formula/lib/libprotoident.rb b/Formula/lib/libprotoident.rb new file mode 100644 index 0000000000000..60196c25925ac --- /dev/null +++ b/Formula/lib/libprotoident.rb @@ -0,0 +1,46 @@ +class Libprotoident < Formula + desc "Performs application layer protocol identification for flows" + homepage "https://github.com/LibtraceTeam/libprotoident" + url "https://github.com/LibtraceTeam/libprotoident/archive/refs/tags/2.0.15-2.tar.gz" + sha256 "2b43a492fe1d7ada2e7b7b164c8e35220b35bf816bd971c7f77decc74b69801e" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "411cc8c16803983d058bcff78dfda085396c97551e1cc1b70e0774e1278650c3" + sha256 cellar: :any, arm64_sonoma: "f79ee7ff4e6f80d27d5137297a908e5d03ef51b4acffb080725e869a6e56ce09" + sha256 cellar: :any, arm64_ventura: "ea8e7da575aeec817cab4748e0f27b304ffef04656bf8925a7fe0e43c446bfb8" + sha256 cellar: :any, arm64_monterey: "8ace9b58b751f6fdb761ff949f271c239143232e72e259619ce7053f2de430d7" + sha256 cellar: :any, arm64_big_sur: "2fc5f6991116f9d63e327f05905affc40219b75a60eee637f2d6f5dc4f59d6e1" + sha256 cellar: :any, sonoma: "27514db399bbf3a0ac9466eab131d61a39c05dff2d9a3a6f7df0e66a6e3d82a1" + sha256 cellar: :any, ventura: "c3a42911911468bc01a9fc0d1d5f0cbedaf60534ad6b9d1618eb22d53191b144" + sha256 cellar: :any, monterey: "3ad6e71b4d5a2857eabee4604eae32bd5f8888afb9532f6b984d5379548f3bb1" + sha256 cellar: :any, big_sur: "56c72764357f942f42eb087698db4dfa1ca54ec8e2d80a30a66298c73ce49a57" + sha256 cellar: :any_skip_relocation, arm64_linux: "29e0aab84eae088dc92a2bee2abac070cc55337f26d99b80c894d6ad3a0fae27" + sha256 cellar: :any_skip_relocation, x86_64_linux: "538f5938a6c533c1102a3c8d0b49d3e298e67b085fbca1fe8b8a71d92ae4f242" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libflowmanager" + depends_on "libtrace" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + lpi_init_library(); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-L#{lib}", "-lprotoident", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libproxy.rb b/Formula/lib/libproxy.rb new file mode 100644 index 0000000000000..b035270a9c668 --- /dev/null +++ b/Formula/lib/libproxy.rb @@ -0,0 +1,44 @@ +class Libproxy < Formula + desc "Library that provides automatic proxy configuration management" + homepage "https://libproxy.github.io/libproxy/" + url "https://github.com/libproxy/libproxy/archive/refs/tags/0.5.9.tar.gz" + sha256 "a1976c3ac4affedc17e6d40cf78c9d8eca6751520ea3cbbec1a8850f7ded1565" + license "LGPL-2.1-or-later" + head "https://github.com/libproxy/libproxy.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ea05222062747c5eb6ad1c2b6702f15fc17449dab974454882a7730ab71a57fe" + sha256 cellar: :any, arm64_sonoma: "98cbc8687ff557d1c3846bee65cbd2bf1bb28c12ab11fcf5a508364147e623d8" + sha256 cellar: :any, arm64_ventura: "3b1fadfe0d664fba4cb8490bf6b60d6c60fba021ecbdf2392baa3883c7802be8" + sha256 cellar: :any, sonoma: "33bcfa11bc19106a39baec8b02ea502d5dc8b33d3337e2d59f8b10027f1d6ad5" + sha256 cellar: :any, ventura: "e1c5deed45524a740381a8cfb7298b8e2cce31574addda6143546b07517a2535" + sha256 arm64_linux: "739f6c10726d3f147797cea43ca60c2306ec02b9064927ac8313a84f96ea87b8" + sha256 x86_64_linux: "c49f1a448cfc3917e90a0d189b88bfaee1573c717d119f944d13abd8047c7e3a" + end + + depends_on "gobject-introspection" => :build + depends_on "gsettings-desktop-schemas" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "vala" => :build # for vapigen + + depends_on "duktape" + depends_on "glib" + + uses_from_macos "curl" + + on_linux do + depends_on "dbus" + end + + def install + system "meson", "setup", "-Ddocs=false", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + assert_equal "direct://", pipe_output("#{bin}/proxy 127.0.0.1").chomp + end +end diff --git a/Formula/lib/libpsl.rb b/Formula/lib/libpsl.rb new file mode 100644 index 0000000000000..de99d3886824e --- /dev/null +++ b/Formula/lib/libpsl.rb @@ -0,0 +1,58 @@ +class Libpsl < Formula + desc "C library for the Public Suffix List" + homepage "https://rockdaboot.github.io/libpsl" + url "https://github.com/rockdaboot/libpsl/releases/download/0.21.5/libpsl-0.21.5.tar.gz" + sha256 "1dcc9ceae8b128f3c0b3f654decd0e1e891afc6ff81098f227ef260449dae208" + license "MIT" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "76b3ffcc154821b448e7f091b75a401782b646d15edcfc4cf1e0a22ed43cfa92" + sha256 cellar: :any, arm64_sonoma: "8a3705cd2f92fa334a9634983aafca93a208ea50ffcd2e304e1a22ec8673e650" + sha256 cellar: :any, arm64_ventura: "0514d77bc120f490bf90cf7bbab7513ebab16b34a3ffa1a1c8339d79b295ad38" + sha256 cellar: :any, sonoma: "3aa78d021942e4012a59e090a6313445b30026b3b6b227e4e72e889454dd5de8" + sha256 cellar: :any, ventura: "c20a154aec0480c5376d926350c1e546e7c35784b2458e8c357134e96ebd72eb" + sha256 arm64_linux: "2f0ed93187bf7b2611dcc0952220847f0967943bf136b6e839ed28b9e8e2cd23" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8dc10f9acd16c27df7a1ac79ccbd4b16dae4582ab2715266bac49c59fb08923a" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libidn2" + depends_on "libunistring" + + def install + system "meson", "setup", "build", "-Druntime=libidn2", "-Dbuiltin=true", *std_meson_args + system "meson", "compile", "-C", "build" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + #include + + int main(void) + { + const psl_ctx_t *psl = psl_builtin(); + + const char *domain = ".eu"; + assert(psl_is_public_suffix(psl, domain)); + + const char *host = "www.example.com"; + const char *expected_domain = "example.com"; + const char *actual_domain = psl_registrable_domain(psl, host); + assert(strcmp(actual_domain, expected_domain) == 0); + + return 0; + } + C + system ENV.cc, "-o", "test", "test.c", "-I#{include}", + "-L#{lib}", "-lpsl" + system "./test" + end +end diff --git a/Formula/lib/libpst.rb b/Formula/lib/libpst.rb new file mode 100644 index 0000000000000..cd9ed3220942d --- /dev/null +++ b/Formula/lib/libpst.rb @@ -0,0 +1,48 @@ +class Libpst < Formula + desc "Utilities for the PST file format" + homepage "https://www.five-ten-sg.com/libpst/" + url "https://www.five-ten-sg.com/libpst/packages/libpst-0.6.76.tar.gz" + sha256 "3d291beebbdb48d2b934608bc06195b641da63d2a8f5e0d386f2e9d6d05a0b42" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.five-ten-sg.com/libpst/packages/" + regex(/href=.*?libpst[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9f11e376789aaaa81e57b01967f3c9bf1148a6d14885045c311df75e80fad7f9" + sha256 cellar: :any, arm64_sonoma: "507bcf7846c89dac455e346c2c6bc713df84a70f5888660dd74bbc9b65c38d16" + sha256 cellar: :any, arm64_ventura: "7c34f9d5b589d9b126e0da006753bc9dcb8eba59aa3f2440bda561d7cea7521e" + sha256 cellar: :any, arm64_monterey: "19a3a8b7fde2b29f509e69232fd8ff7d924c5df201d63cf40512cd7b4831056d" + sha256 cellar: :any, arm64_big_sur: "d7b9d9f537b1575cbd299b56e2a82f38f661aff617cc8a3a03b44cf8acb1e3c0" + sha256 cellar: :any, sonoma: "793be875dc2c664635df7073f29d1a09ad348dd90d1a9fca8fe9d715113874f6" + sha256 cellar: :any, ventura: "9f7ebc7dbf481971d91bdd19fef73063385942694cc7df04aa1ed955defe8d54" + sha256 cellar: :any, monterey: "9acacad7e57b79446bd4d97551cc026be3cca70f03ac0d28f6622c91b2898c2e" + sha256 cellar: :any, big_sur: "be3136353a0d0c538070a6c1261b75620abffda9d2cee435daf3debbc5fe2f8e" + sha256 cellar: :any, catalina: "d6ec30b4b9ca7d8968c5155b98c2a32dca502910c6c95ac860dc50065de89f65" + sha256 cellar: :any, mojave: "9ba873578452d668ac195f1e3b332f692f45ee5db1a6c55e68e57e8d08d3878a" + sha256 cellar: :any_skip_relocation, arm64_linux: "e37ba9845fdaa861e4d365ecd0be643cee6b01690ddef68d11347d9dcbe93376" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ef7024943254ef22bbf082c8c96ce8d207c30a1b9fe77a8d6f4432d09f924aa" + end + + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "libgsf" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + def install + system "./configure", "--disable-python", *std_configure_args + system "make", "install" + end + + test do + system bin/"lspst", "-V" + end +end diff --git a/Formula/lib/libpthread-stubs.rb b/Formula/lib/libpthread-stubs.rb new file mode 100644 index 0000000000000..628c46b03191f --- /dev/null +++ b/Formula/lib/libpthread-stubs.rb @@ -0,0 +1,23 @@ +class LibpthreadStubs < Formula + desc "X.Org: pthread-stubs.pc" + homepage "https://www.x.org/" + url "https://xcb.freedesktop.org/dist/libpthread-stubs-0.5.tar.xz" + sha256 "59da566decceba7c2a7970a4a03b48d9905f1262ff94410a649224e33d2442bc" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "303b8c21fc1b9322b6bd8f24e75a4e53a1c331d09b4f6271f75eba743d119819" + end + + depends_on "pkgconf" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_equal version.to_s, shell_output("pkgconf --modversion pthread-stubs").chomp + end +end diff --git a/Formula/lib/libpulsar.rb b/Formula/lib/libpulsar.rb new file mode 100644 index 0000000000000..4da43160440be --- /dev/null +++ b/Formula/lib/libpulsar.rb @@ -0,0 +1,60 @@ +class Libpulsar < Formula + desc "Apache Pulsar C++ library" + homepage "https://pulsar.apache.org/" + url "https://dlcdn.apache.org/pulsar/pulsar-client-cpp-3.7.0/apache-pulsar-client-cpp-3.7.0.tar.gz" + mirror "https://archive.apache.org/dist/pulsar/pulsar-client-cpp-3.7.0/apache-pulsar-client-cpp-3.7.0.tar.gz" + sha256 "3223cfeda484ab7b580f4a8768b5a85739cc064005c765c06cde67c3238639c9" + license "Apache-2.0" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "17409dae5bc4dfeae755a2e7ebc4d0e255a56f12f6c8d658a8f631cdbfe35bec" + sha256 cellar: :any, arm64_sonoma: "054c0c3c347a1b55e64eb24978acaf7fdfb72162ed35277f4bf16093a2e1a3ff" + sha256 cellar: :any, arm64_ventura: "1e28e6732875416affdcc4afc3763e798882dd589424e168bb67bd7517411c6d" + sha256 cellar: :any, sonoma: "f87f6563fb986d754764ec158a2deddded5cbfef795bd67c52f83ae0a72e8e8b" + sha256 cellar: :any, ventura: "3061a6de50f7659f859917ad16f20f0e9b312efa90d7123533534ad3a60111e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "5054b692852656ba4580739f5ec8ba057f330c1e15ca36196277c4688b8cac17" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2438a72ed70e421eae87a6e3fa2c4db58d3f4e7ec8b1bce6893421546c533d95" + end + + depends_on "asio" => :build # FIXME: Not compatible with Boost.Asio 1.87+ + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "abseil" + depends_on "openssl@3" + depends_on "protobuf@29" + depends_on "snappy" + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + args = %W[ + -DBUILD_TESTS=OFF + -DCMAKE_CXX_STANDARD=17 + -DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix} + -DUSE_ASIO=ON + ] + + system "cmake", "-S", ".", "build", *args, *std_cmake_args + system "cmake", "--build", "build", "--target", "pulsarShared", "pulsarStatic" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + + int main (int argc, char **argv) { + pulsar::Client client("pulsar://localhost:6650"); + return 0; + } + CPP + + system ENV.cxx, "-std=gnu++11", "test.cc", "-L#{lib}", "-lpulsar", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libqalculate.rb b/Formula/lib/libqalculate.rb new file mode 100644 index 0000000000000..86684eee8c249 --- /dev/null +++ b/Formula/lib/libqalculate.rb @@ -0,0 +1,47 @@ +class Libqalculate < Formula + desc "Library for Qalculate! program" + homepage "https://qalculate.github.io/" + url "https://github.com/Qalculate/libqalculate/releases/download/v5.5.2/libqalculate-5.5.2.tar.gz" + sha256 "fc14d4527dccfc9189684b9fcd64d78aa67ae5383012c66e1596b2531f5daef1" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_sonoma: "3eda9b1f7607de60bf38b405285ead9593f2c94eba85fa8b7fdb90919899c771" + sha256 arm64_ventura: "880ef6188d9cea8c037ba39330c5bbf2e5fb784d69da9de1251f4c25810e308e" + sha256 sonoma: "cffd7934a442261cbec625311eeee167e3d5eb6d474a1d7ffa8b2cb48d73fe17" + sha256 ventura: "3ae202875fa805ce960397b3998dd82f53de64901638232cb47c2d11891f09d7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9276262afdc1f8f61d964d9527c27073f55c84f6696b3ee764a583eb27df8b81" + end + + depends_on "gettext" => :build + depends_on "intltool" => :build + depends_on "pkgconf" => :build + depends_on "gmp" + depends_on "gnuplot" + depends_on "mpfr" + depends_on "readline" + + uses_from_macos "perl" => :build + uses_from_macos "curl" + uses_from_macos "libxml2" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "perl-xml-parser" => :build + end + + def install + ENV.cxx11 + system "./configure", "--disable-silent-rules", + "--without-icu", + *std_configure_args + system "make", "install" + end + + test do + system bin/"qalc", "-nocurrencies", "(2+2)/4 hours to minutes" + end +end diff --git a/Formula/lib/libquantum.rb b/Formula/lib/libquantum.rb new file mode 100644 index 0000000000000..95b5e52bd1d1a --- /dev/null +++ b/Formula/lib/libquantum.rb @@ -0,0 +1,67 @@ +class Libquantum < Formula + desc "C library for the simulation of quantum mechanics" + homepage "http://www.libquantum.de/" + url "http://www.libquantum.de/files/libquantum-1.0.0.tar.gz" + sha256 "b0f1a5ec9768457ac9835bd52c3017d279ac99cc0dffe6ce2adf8ac762997b2c" + license "GPL-3.0-or-later" + version_scheme 1 + + livecheck do + url "http://www.libquantum.de/downloads" + regex(/href=.*?libquantum[._-]v?(\d+\.[02468](?:\.\d+)*)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1104c2f6a72d4e1576077b6bb549f7e579ccd5d0869ff4e7ea7753655dd5c370" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cbea5e8c46c96ca5adb46cd719b625261e63965deb8884f0fa71814edf2d589e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2a4a3d3b7b1525e1105b5fd4212a2b13bdc9e74ae182a4b76b3d5501c4cc8940" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d18cc1cd910ad5b7a0922bb290b9eb79053144d32dcd2071db5658c1e2a4e2fb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5d0d8ffd59105af7232222c76c283dfe0ea6c117eef683669875c9d3d4fb32cb" + sha256 cellar: :any_skip_relocation, sonoma: "1d6995bf93a43629913112835f1c5e38e5fdcb9889d5b36eb0f695e3deb44f44" + sha256 cellar: :any_skip_relocation, ventura: "ccd0cc6114be77543834fc0c417ab92b155994ba6bcb5183444a38a505fab89e" + sha256 cellar: :any_skip_relocation, monterey: "17f91015099d89946404b16a8c3eaab238ca4d9f1806942babdf4a6d1bf940a9" + sha256 cellar: :any_skip_relocation, big_sur: "e0c15e357005695499960424b1588ce47b248eb54ba7101cd47d7b0e5427a3b4" + sha256 cellar: :any_skip_relocation, catalina: "d4a76e92f03a3ba478985c12c7a4d5fbe815b7b67d8a2d691eadcf43ed5eb1d6" + sha256 cellar: :any_skip_relocation, mojave: "437375451fc36404181dd6086f662b0305543fc8765042133706755c804c1217" + sha256 cellar: :any_skip_relocation, arm64_linux: "848db672f68b69d8f19e8a80c220aaa182bb762c7bbea799177935fb0208f326" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a528197ff682bb96434f58a4739f933e9010f7e76b368f43d1788fe22468deb" + 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 + (testpath/"qtest.c").write <<~C + #include + #include + #include + #include + + int main () + { + quantum_reg reg; + int result; + srand(time(0)); + reg = quantum_new_qureg(0, 1); + quantum_hadamard(0, ®); + result = quantum_bmeasure(0, ®); + printf("The Quantum RNG returned %i!\\n", result); + return 0; + } + C + args = [ + "-O3", + "-L#{lib}", + "-lquantum", + ] + args << "-fopenmp" if OS.linux? + system ENV.cc, "qtest.c", *args, "-o", "qtest" + system "./qtest" + end +end diff --git a/Formula/lib/libquicktime.rb b/Formula/lib/libquicktime.rb new file mode 100644 index 0000000000000..1e7f0bb32ccbd --- /dev/null +++ b/Formula/lib/libquicktime.rb @@ -0,0 +1,71 @@ +class Libquicktime < Formula + desc "Library for reading and writing quicktime files" + homepage "https://libquicktime.sourceforge.net/" + url "https://downloads.sourceforge.net/project/libquicktime/libquicktime/1.2.4/libquicktime-1.2.4.tar.gz" + sha256 "1c53359c33b31347b4d7b00d3611463fe5e942cae3ec0fefe0d2fd413fd47368" + license "LGPL-2.1-or-later" + revision 5 + + bottle do + sha256 arm64_sequoia: "2d881bd765e84918db5865c5657a0399edb7908b5ee152cbe9cbe0fae4e3e83c" + sha256 arm64_sonoma: "97c76d5834a9f3d1279ac572e16ed5d0eb914c01562bd9c54c55e885ac88711d" + sha256 arm64_ventura: "9d47d49d00864f37daf0da37928b837402d98cb86205ce67bd31589e522cd2f5" + sha256 arm64_monterey: "0c803138b913239926ff1781d19d853f534c764258cbc2a2f373c4fc3b1698c3" + sha256 arm64_big_sur: "7d24ece79d6792b731695618cbc2535d5e374b0cb427cb72df1a1526e04b2974" + sha256 sonoma: "aa0e4cacc165f4d54e69c0125c40f073792cf5aed7d1346644630dd693cb460a" + sha256 ventura: "44c12b64a34930933f422e9d6c602fc6067ab8fa8aafaaa9199d835d122877d7" + sha256 monterey: "9ea15abf7204b11e955001777e677f8858a62d9eb94e9ac98e2bc107aa260f55" + sha256 big_sur: "4a9a12712bedaa0ca62394a26ae842f64b4ef86108fca99c2e1712c6a7e7d9c4" + sha256 catalina: "33d7a1146846e30e48e637ddd64f3e7541728df03becf8175e798a8fd3eb3bab" + sha256 mojave: "56165e3b70f7e444bca93369b3fa4602eefb1aa4b9624ed1ecbaa4741eb7c245" + sha256 high_sierra: "df1b207f23b3edc587629a0fd700a446d4f8210e6a7de3bbfd3d5c122cef16f7" + sha256 sierra: "1770ac237a79cb0d9ae918e4bcd6d92bcca6a6695823f7a3fde6dde7d3077acb" + sha256 arm64_linux: "dc03dfa9bc5df60e0dbafe21632ecf596a95adbba0306ed86e6c1673312adc0f" + sha256 x86_64_linux: "3c5ec43c6051163260865415f7a3fc0b32b7ca6b49e56ea999ac1fe4119c75d4" + end + + depends_on "pkgconf" => :build + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + # Fix CVE-2016-2399. Applied upstream on March 6th 2017. + # Also, fixes from upstream for CVE-2017-9122 through CVE-2017-9128, applied + # by Debian since 30 Jun 2017. + patch do + url "https://deb.debian.org/debian/pool/main/libq/libquicktime/libquicktime_1.2.4-12.debian.tar.xz" + sha256 "e5b5fa3ec8391b92554d04528568d04ea9eb5145835e0c246eac7961c891a91a" + apply "patches/CVE-2016-2399.patch" + apply "patches/CVE-2017-9122_et_al.patch" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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", "--enable-gpl", + "--without-doxygen", + "--without-gtk", + "--without-x", + *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + fixture = test_fixtures("test.m4a") + output = shell_output("#{bin}/qtinfo #{fixture} 2>&1") + assert_match "length 1536 samples, compressor mp4a", output + assert_path_exists testpath/".libquicktime_codecs" + end +end diff --git a/Formula/lib/libraqm.rb b/Formula/lib/libraqm.rb new file mode 100644 index 0000000000000..d2354f6c05c49 --- /dev/null +++ b/Formula/lib/libraqm.rb @@ -0,0 +1,46 @@ +class Libraqm < Formula + desc "Library for complex text layout" + homepage "https://github.com/HOST-Oman/libraqm" + url "https://github.com/HOST-Oman/libraqm/archive/refs/tags/v0.10.2.tar.gz" + sha256 "db68fd9f034fc40ece103e511ffdf941d69f5e935c48ded8a31590468e42ba72" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2dcf80407a7a45257a5d099ce9b9e041315cfa40172b63ef04f0f279f5df14cb" + sha256 cellar: :any, arm64_sonoma: "7dbd6b420b6f06c4c9627955e8aec47f75655a9b3557c83b2123edc94d4ddbaa" + sha256 cellar: :any, arm64_ventura: "2cb4fae2a63f43d2fffba40060492d6a0c577198c32dd878277953e9097341f4" + sha256 cellar: :any, sonoma: "5cca7d3c4e68f13d5d94fe0e775578d7e75d5baecba6914ea7c8953aa48d4cd3" + sha256 cellar: :any, ventura: "5a04efc31fb102abee7e294ff201304375b8fab445c0f097b5dded104a3462c3" + sha256 arm64_linux: "9b761532205d53cf4a302ca211d4246a566019bc4bf9715ef51e3b32006f70e2" + sha256 x86_64_linux: "9676804e1ac66a629bdbc1016d76f42a7a989e42bdcad1de59e86912e9c86f54" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "fribidi" + depends_on "harfbuzz" + + 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 0; + } + C + + system ENV.cc, "test.c", + "-I#{include}", + "-I#{Formula["freetype"].include/"freetype2"}", + "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/librasterlite2.rb b/Formula/lib/librasterlite2.rb new file mode 100644 index 0000000000000..df13b839dd348 --- /dev/null +++ b/Formula/lib/librasterlite2.rb @@ -0,0 +1,120 @@ +class Librasterlite2 < Formula + desc "Library to store and retrieve huge raster coverages" + homepage "https://www.gaia-gis.it/fossil/librasterlite2/index" + url "https://www.gaia-gis.it/gaia-sins/librasterlite2-sources/librasterlite2-1.1.0-beta1.tar.gz" + sha256 "f7284cdfc07ad343a314e4878df0300874b0145d9d331b063b096b482e7e44f4" + license any_of: ["MPL-1.1", "GPL-2.0-or-later", "LGPL-2.1-or-later"] + revision 4 + + livecheck do + url :homepage + regex(/href=.*?librasterlite2[._-]v?(\d+(?:\.\d+)+[^.]*?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1c3ebad3c0e8d461961ff6e1ea785d762a411493caa8dc0df62f85cc2fd039d8" + sha256 cellar: :any, arm64_sonoma: "d31a806dc93f565780c5704c3d4ac4d4925f02f3682a1638ee85f384470ceae3" + sha256 cellar: :any, arm64_ventura: "594f332c68d15b51bb405623131a630fa528693ee21f2f220d3220bc280fd2dc" + sha256 cellar: :any, arm64_monterey: "3733644a6d712a0be663b99b9b153cba11d05cfb34dc5c207fab8df8a4077a56" + sha256 cellar: :any, arm64_big_sur: "6bbd6b88f06188a5009e8d451c6f3898e2df630131f5c68953528863a06e9ec2" + sha256 cellar: :any, sonoma: "d96d40ff1a70980b217bf88a930594175b3b4d4b2f8b308d3978337c31abab39" + sha256 cellar: :any, ventura: "385aeaee7f4a7e565b6368e2577a73ba58f75d7161bbbe480cc1a6eebc12552f" + sha256 cellar: :any, monterey: "fcc1aba7b865bd46d2986e77c9d9bf3d8dca6641b9c9fb7ebbbeca409692153e" + sha256 cellar: :any, big_sur: "642c88a5013468fbc96058720beadc6f6aacbb3a47b60530c434b9df4081aa86" + sha256 cellar: :any_skip_relocation, arm64_linux: "4fe6861c1f7886a5bdf6cc9782613e8182704503fed2ffb1e088ea08e7081ea3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e91e0eafa3ab9941d7e7b9610089e8398b3259e40951711bc9a70f34c76d0e9" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "cairo" + depends_on "fontconfig" + depends_on "freetype" + depends_on "freexl" + depends_on "geos" + depends_on "giflib" + depends_on "jpeg-turbo" + depends_on "libgeotiff" + depends_on "libpng" + depends_on "librttopo" + depends_on "libspatialite" + depends_on "libtiff" + depends_on "libxml2" + depends_on "lz4" + depends_on "minizip" + depends_on "openjpeg" + depends_on "pixman" + depends_on "proj" + depends_on "sqlite" + depends_on "webp" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "zlib" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + # Reported upstream at https://www.gaia-gis.it/fossil/librasterlite2/tktview?name=3e9183941f. + # Check if this can be removed with the next release. + inreplace "headers/rasterlite2_private.h", + "#ifndef DOXYGEN_SHOULD_SKIP_THIS", + "#include \n\n#ifndef DOXYGEN_SHOULD_SKIP_THIS" + + # Ensure Homebrew SQLite libraries are found before the system SQLite + ENV.append "LDFLAGS", "-L#{Formula["sqlite"].opt_lib} -lsqlite3" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + #include "rasterlite2/rasterlite2.h" + + static int + test_gif (const char *path) + { + rl2SectionPtr img = rl2_section_from_gif (path); + if (img == NULL) + { + fprintf (stderr, "Unable to read: %s\\n", path); + return 0; + } + + if (rl2_section_to_png (img, "./from_gif.png") != RL2_OK) + { + fprintf (stderr, "Unable to write: from_gif.png\\n"); + return 0; + } + + rl2_destroy_section (img); + return 1; + } + + int + main (int argc, char *argv[]) + { + if (argc > 1 || argv[0] == NULL) + argc = 1; /* silence compiler warnings */ + + if (!test_gif ("#{test_fixtures("test.gif")}")) + return -1; + + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs rasterlite2").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system testpath/"test" + assert_path_exists testpath/"from_gif.png" + end +end diff --git a/Formula/lib/libraw.rb b/Formula/lib/libraw.rb new file mode 100644 index 0000000000000..58a47e849cf9b --- /dev/null +++ b/Formula/lib/libraw.rb @@ -0,0 +1,68 @@ +class Libraw < Formula + desc "Library for reading RAW files from digital photo cameras" + homepage "https://www.libraw.org/" + url "https://www.libraw.org/data/LibRaw-0.21.4.tar.gz" + sha256 "6be43f19397e43214ff56aab056bf3ff4925ca14012ce5a1538a172406a09e63" + license any_of: ["LGPL-2.1-only", "CDDL-1.0"] + + livecheck do + url "https://www.libraw.org/download/" + regex(/href=.*?LibRaw[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "3ae642e1a337a7183e77b6a3d59fdaf9fa13b56fcd8e565498c494427cc085b3" + sha256 cellar: :any, arm64_sonoma: "38e57ff44d6cc053438c04e4654d7a7d1e3d3ce401eb02b94162ac5ad33a30ab" + sha256 cellar: :any, arm64_ventura: "91aebf5f2364ad1b770c25d9026f6e8feb380d01de21f871acc63e4d41868b3f" + sha256 cellar: :any, sonoma: "6ddce452df9c2f67cea7d9e0a55c54d79b1adcebfc63af069531b447493e7576" + sha256 cellar: :any, ventura: "2e632c46f2d8f9f1789787844d1a7c97fc1d08dd55fed9f7c6ab6c6ecd48a8a1" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d3619295185f5f2a8f12f3718c1edad97f825504a8c05262de5057aa9a8c3c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69fbec4dfdee24831513339f9315f18bf73ee343190c906ec1eea21fa22ffd0b" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "jasper" + depends_on "jpeg-turbo" + depends_on "little-cms2" + + uses_from_macos "zlib" + + on_macos do + depends_on "libomp" + end + + def install + args = [] + if OS.mac? + # Work around "checking for OpenMP flag of C compiler... unknown" + args += [ + "ac_cv_prog_c_openmp=-Xpreprocessor -fopenmp", + "ac_cv_prog_cxx_openmp=-Xpreprocessor -fopenmp", + "LDFLAGS=-lomp", + ] + end + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + doc.install Dir["doc/*"] + prefix.install "samples" + end + + test do + resource "homebrew-librawtestfile" do + url "https://www.rawsamples.ch/raws/nikon/d1/RAW_NIKON_D1.NEF" + mirror "https://web.archive.org/web/20200703103724/https://www.rawsamples.ch/raws/nikon/d1/RAW_NIKON_D1.NEF" + sha256 "7886d8b0e1257897faa7404b98fe1086ee2d95606531b6285aed83a0939b768f" + end + + resource("homebrew-librawtestfile").stage do + filename = "RAW_NIKON_D1.NEF" + system bin/"raw-identify", "-u", filename + system bin/"simple_dcraw", "-v", "-T", filename + end + end +end diff --git a/Formula/lib/librcsc.rb b/Formula/lib/librcsc.rb new file mode 100644 index 0000000000000..e4fd31ebe3e8b --- /dev/null +++ b/Formula/lib/librcsc.rb @@ -0,0 +1,66 @@ +class Librcsc < Formula + desc "RoboCup Soccer Simulator library" + homepage "https://github.com/helios-base/librcsc" + url "https://github.com/helios-base/librcsc/archive/refs/tags/rc2024.tar.gz" + sha256 "81a3f86c9727420178dd936deb2994d764c7cd4888a2150627812ab1b813531b" + license "LGPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "3d9d528cd8cfa66f49e6a5a371a4f93a2ceac383985a9189627bfd901006b9c7" + sha256 cellar: :any, arm64_sonoma: "8fde29d988114c1ad006242a6e5ff6d76da689505116521fd8581c44f3c1f6b1" + sha256 cellar: :any, arm64_ventura: "2ef3bfaa135d7dcdfa214b56ec141bdac11882fb307a6aaa4415fda4a982aad8" + sha256 cellar: :any, sonoma: "d4887f6f0256c8c55347ef86c671a712b3b8b07e52ff691899197a4ecb40ac90" + sha256 cellar: :any, ventura: "d91b3e133981705b317d6a74a48f821a13c3e83d1ea53f27a8b087c6087cfe2b" + sha256 cellar: :any_skip_relocation, arm64_linux: "30a6bd68f775c4ca1091551b26fed7f25c9a00538ca9b29eec04282835d3c425" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77dd0bd9e1b3c8971a4eca3430b49648f944824d1a6fc0337696c846372ca9b2" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "boost" => :build + depends_on "libtool" => :build + + uses_from_macos "zlib" + + # Add missing header to fix build on Monterey + # Issue ref: https://github.com/helios-base/librcsc/issues/88 + patch :DATA + + def install + # Strip linkage to `boost` + ENV.append "LDFLAGS", "-Wl,-dead_strip_dylibs" if OS.mac? + + system "./bootstrap" + system "./configure", "--disable-silent-rules", + "--with-boost=#{Formula["boost"].opt_prefix}", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + rcsc::rcg::PlayerT p; + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-L#{lib}", "-lrcsc" + system "./test" + end +end + +__END__ +diff --git a/rcsc/rcg/parser_simdjson.cpp b/rcsc/rcg/parser_simdjson.cpp +index 47c9d2c..8218669 100644 +--- a/rcsc/rcg/parser_simdjson.cpp ++++ b/rcsc/rcg/parser_simdjson.cpp +@@ -43,6 +43,7 @@ + + #include + #include ++#include + + namespace rcsc { + namespace rcg { diff --git a/Formula/lib/librdkafka.rb b/Formula/lib/librdkafka.rb new file mode 100644 index 0000000000000..797a4712832fa --- /dev/null +++ b/Formula/lib/librdkafka.rb @@ -0,0 +1,55 @@ +class Librdkafka < Formula + desc "Apache Kafka C/C++ library" + homepage "https://github.com/confluentinc/librdkafka" + url "https://github.com/confluentinc/librdkafka/archive/refs/tags/v2.10.0.tar.gz" + sha256 "004b1cc2685d1d6d416b90b426a0a9d27327a214c6b807df6f9ea5887346ba3a" + license "BSD-2-Clause" + head "https://github.com/confluentinc/librdkafka.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "68447f0c1206d32ace33c25d736a441e09c339fa9bc2edc7b702a3158aa6e70d" + sha256 cellar: :any, arm64_sonoma: "e7a756dc937b0a4b6db6aa66b053f60439979c789579f7ed26ad3b2b007a8827" + sha256 cellar: :any, arm64_ventura: "c50f1413ce074882c83c22e4736922561e8001ea0f05074396f6705855a7a17e" + sha256 cellar: :any, sonoma: "f2c742931c5b92f686b6e4998bf44239fab7e3ac4d44d9893a6f4c8f4cd9af8a" + sha256 cellar: :any, ventura: "416e501dbb5d0595a9739fa5bdf7052a07f15d2735be79211795ff400438a9de" + sha256 cellar: :any_skip_relocation, arm64_linux: "affefbf0ce0dfeae5c7518ffa0b59d350b3b014a2270ef48cbe25765b29138cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c094c66b454f17d96f7079454452c773a738e159d7f0960fd71a0dd59681ab79" + end + + depends_on "pkgconf" => :build + depends_on "lz4" + depends_on "lzlib" + depends_on "openssl@3" + depends_on "zstd" + + uses_from_macos "python" => :build + uses_from_macos "curl" + uses_from_macos "cyrus-sasl" + uses_from_macos "zlib" + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main (int argc, char **argv) + { + int partition = RD_KAFKA_PARTITION_UA; /* random */ + int version = rd_kafka_version(); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lrdkafka", "-lz", "-lpthread", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libre.rb b/Formula/lib/libre.rb new file mode 100644 index 0000000000000..c0469cc9d6650 --- /dev/null +++ b/Formula/lib/libre.rb @@ -0,0 +1,39 @@ +class Libre < Formula + desc "Toolkit library for asynchronous network I/O with protocol stacks" + homepage "https://github.com/baresip/re" + url "https://github.com/baresip/re/archive/refs/tags/v3.22.0.tar.gz" + sha256 "31ecb7f7a5569ec0b3d85526c469b24c47673c802d45c58cb13f96a9365f4f14" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4983d98e34594c1af961549d8b4991421eae2e0cd1fa0d69597e623908a927e6" + sha256 cellar: :any, arm64_sonoma: "4bba3d7970ab3d41fe8609485685d8b53f75801c52a2c88f0c2cf83c85260e71" + sha256 cellar: :any, arm64_ventura: "7ac577319687be8c0c1a88ed24aab3509c489140c32d9088d3e3a490634c8e5b" + sha256 cellar: :any, sonoma: "fd33f97a24e6f063f2cc8dd059cd55c69a9769fe7ce5dad231a52ea57bd82e81" + sha256 cellar: :any, ventura: "95f939b11e90bb13695da227a90f9d26257f261082586e118ddf783b7236b1d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "27d259496e09f08957f633a2d7730a85a740999e8961246e389fd8352a325ccb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f66e9290acb5554710dbb0d0827040d80f835b3d77248e347a4958f814d0634a" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + system "cmake", "-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() { + return libre_init(); + } + C + system ENV.cc, "-I#{include}", "-I#{include}/re", "test.c", "-L#{lib}", "-lre" + end +end diff --git a/Formula/lib/libreadline-java.rb b/Formula/lib/libreadline-java.rb new file mode 100644 index 0000000000000..c1d0b73b140d9 --- /dev/null +++ b/Formula/lib/libreadline-java.rb @@ -0,0 +1,85 @@ +class LibreadlineJava < Formula + desc "Port of GNU readline for Java" + homepage "https://github.com/aclemons/java-readline" + url "https://github.com/aclemons/java-readline/releases/download/v0.8.3/libreadline-java-0.8.3-src.tar.gz" + sha256 "57d46274b9fd18bfc5fc8b3ab751e963386144629bcfd6c66b4fae04bbf8c89f" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "69be2c1c7e2604d6c01ef986fd8f1107976d4e1cec7784eaf971d7e2e69cb301" + sha256 cellar: :any, arm64_sonoma: "d4329ed0409bc232ed32b32af891e7eb7c1ec29945a58acdbb0f8ad2d0d7130d" + sha256 cellar: :any, arm64_ventura: "30d029bd66f3e09eb495ba7fa8a7c537bb8d7c2fbf1fe92767918e74affb14db" + sha256 cellar: :any, arm64_monterey: "584fd1a58765d929a2671476e64994b1de6e85da1e031d47169992afc33384a5" + sha256 cellar: :any, arm64_big_sur: "9b8326c92d05e2598c4ee4984eb1de90362e453a8a474aa3211ddb33ceb530ce" + sha256 cellar: :any, sonoma: "ab65bd0333a0247cdfedc8d376a1289ed71157945693d0acd63e022acb8296ea" + sha256 cellar: :any, ventura: "ec976263fbef9ca431281219e95201ca2e2aa290a03302a26e3320aeb6112a76" + sha256 cellar: :any, monterey: "907febf2b1e8fd3455b7a01c04793fe3e65c07b7c35b4fe6031ad1a41535eaa3" + sha256 cellar: :any, big_sur: "3c0dcc11857d99e993ca70ec7cad6f35560988e14bb94012dedae51cfb4e936a" + sha256 cellar: :any, catalina: "7c7f86b3f0d9ba98b7e6162adb26777dd903a88ccf331428114428d3454f56d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "f922f7893f5c4d14a77b945c532eb990259dad42d1f8b54ac873a6cb82764605" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c5263653854ee8fe953985f740cf1f357ced552dac8fdd109906ba78d3190972" + end + + depends_on "openjdk" + depends_on "readline" + + def install + ENV["JAVA_HOME"] = java_home = Language::Java.java_home + + # Current Oracle JDKs put the jni.h and jni_md.h in a different place than the + # original Apple/Sun JDK used to. + ENV["JAVAINCLUDE"] = "#{java_home}/include" + ENV["JAVANATINC"] = "#{java_home}/include/#{OS.kernel_name.downcase}" + + # Take care of some hard-coded paths, + # adjust postfix of jni libraries, + # adjust gnu install parameters to bsd install + inreplace "Makefile" do |s| + s.change_make_var! "PREFIX", prefix + s.change_make_var! "JAVAC_VERSION", Formula["openjdk"].version.to_s + s.change_make_var! "JAVALIBDIR", "$(PREFIX)/share/libreadline-java" + s.change_make_var! "JAVAINCLUDE", ENV["JAVAINCLUDE"] + s.change_make_var! "JAVANATINC", ENV["JAVANATINC"] + s.gsub! "*.so", "*.jnilib" if OS.mac? + s.gsub! "install -D", "install -c" + end + + # Take care of some hard-coded paths, + # adjust CC variable, + # adjust postfix of jni libraries + inreplace "src/native/Makefile" do |s| + readline = Formula["readline"] + s.change_make_var! "INCLUDES", "-I $(JAVAINCLUDE) -I $(JAVANATINC) -I #{readline.opt_include}" + s.change_make_var! "LIBPATH", "-L#{readline.opt_lib}" + s.change_make_var! "CC", "cc" + if OS.mac? + s.change_make_var! "LIB_EXT", "jnilib" + s.change_make_var! "LD_FLAGS", "-install_name #{HOMEBREW_PREFIX}/lib/$(LIB_PRE)$(TG).$(LIB_EXT) -dynamiclib" + end + end + + pkgshare.mkpath + + system "make", "jar" + system "make", "build-native" + system "make", "install" + + doc.install "api" + end + + def caveats + <<~EOS + You may need to set JAVA_HOME: + export JAVA_HOME="$(/usr/libexec/java_home)" + EOS + end + + # Testing libreadline-java (can we execute and exit libreadline without exceptions?) + test do + java_path = Formula["openjdk"].opt_bin/"java" + assert(/Exception/ !~ pipe_output( + "#{java_path} -Djava.library.path=#{lib} -cp #{pkgshare}/libreadline-java.jar test.ReadlineTest", + "exit", + )) + end +end diff --git a/Formula/lib/librealsense.rb b/Formula/lib/librealsense.rb new file mode 100644 index 0000000000000..b939de4d0f1bf --- /dev/null +++ b/Formula/lib/librealsense.rb @@ -0,0 +1,65 @@ +class Librealsense < Formula + desc "Intel RealSense D400 series and SR300 capture" + homepage "https://github.com/IntelRealSense/librealsense" + url "https://github.com/IntelRealSense/librealsense/archive/refs/tags/v2.56.3.tar.gz" + sha256 "a18112df0dc0bf442b58fb754f719be1992ddbba154564db5321729ba340c8a9" + license "Apache-2.0" + head "https://github.com/IntelRealSense/librealsense.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9ab6629652e192760b9d9f92dff28a7f757f0a3520270d3882e68f8db0c67e69" + sha256 cellar: :any, arm64_sonoma: "9e1c5408d61e477d72f6ad60504c3db954a65612ed97d5f1e6009bdf6a60c5f4" + sha256 cellar: :any, arm64_ventura: "5a513c1af7e9709eef2cea30f39021e3158e5635680f956d83b36b66646e127d" + sha256 cellar: :any, sonoma: "d940b9e56d353878c839a10ca9a2298e84ee374778a34b97dc59f635875ec2a2" + sha256 cellar: :any, ventura: "703d25a4b7c1f12aaec0f0a5669e5f026bcf38fbb37cc4203be67e9a838c65ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "58ce2d5939e264461211133da3b64393539cbe5097117038a036605df2a88558" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b22dcd8cd361829146e951c7b81efe906c500c440367052d90985d8996b4ef1" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "glfw" + depends_on "libusb" + + on_linux do + depends_on "mesa" + depends_on "mesa-glu" + depends_on "openssl@3" + depends_on "systemd" + end + + def install + ENV["OPENSSL_ROOT_DIR"] = Formula["openssl@3"].prefix if OS.linux? + + args = %W[ + -DENABLE_CCACHE=OFF + -DBUILD_WITH_OPENMP=OFF + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + args << "-DCHECK_FOR_UPDATES=false" 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 + int main() + { + printf(RS2_API_VERSION_STR); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-o", "test" + assert_equal version.to_s, shell_output("./test").strip + end +end diff --git a/Formula/lib/libreplaygain.rb b/Formula/lib/libreplaygain.rb new file mode 100644 index 0000000000000..588f79e349ac0 --- /dev/null +++ b/Formula/lib/libreplaygain.rb @@ -0,0 +1,43 @@ +class Libreplaygain < Formula + desc "Library to implement ReplayGain standard for audio" + homepage "https://www.musepack.net/" + url "https://files.musepack.net/source/libreplaygain_r475.tar.gz" + version "r475" + sha256 "8258bf785547ac2cda43bb195e07522f0a3682f55abe97753c974609ec232482" + license "LGPL-2.1-or-later" + + livecheck do + url "https://www.musepack.net/index.php?pg=src" + regex(/href=.*?libreplaygain[._-](r\d+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "72f8e66bd85dbe08e01f9aad98d73a4788a030f34a3f8e40e940c6a62a7fbfc7" + sha256 cellar: :any, arm64_sonoma: "ce1c314acee4f01b3ac7c91b703dfa170154fe833df860f608c4d02e4f6d59a4" + sha256 cellar: :any, arm64_ventura: "a8c89293c396219851faeecf23be969764bd4c169e66b10fc16b3949f2348d37" + sha256 cellar: :any, arm64_monterey: "9100ec7606c07112a90c00796c4be0f7ee25e6305f0fbf5baff40fca51eec333" + sha256 cellar: :any, arm64_big_sur: "e1cafa5a3cc922c818b746cea6e697757dfd1450703678dc0f6ba89eb41c94ac" + sha256 cellar: :any, sonoma: "29787fd64c241aea0fe1d5199403bf71d3f7bb7436000237a534ec603fffffbc" + sha256 cellar: :any, ventura: "35848fd5f3cfbea613b2a2a017e10b7a1ede2cadbaab00da1d9dac1168b2af7e" + sha256 cellar: :any, monterey: "ea6a3522033b4b63e6f8786f14036cd2e3f685b8ad57050d9a64fc1adcf24e45" + sha256 cellar: :any, big_sur: "b7a2c4c9ab84445dbe76e5ba32cc84e5f64b4dca4bd0c6ceda202d024a4fcbe6" + sha256 cellar: :any, catalina: "34a785ef56c26e506e4e225ace636163dd3b5dd310448a7b63d1ba1c99a2ea77" + sha256 cellar: :any, mojave: "13df0590c2056af8071e5c182bc1b73cfd52b6ad7afb561d16a1ac3ddf0df179" + sha256 cellar: :any, high_sierra: "c2d3becfcd2f629fb875b6d6c907505489381e5ea3893b0a882510ebbee9951a" + sha256 cellar: :any, sierra: "d8f7cfc1bfad75b97271300a16f5c927849b03ff488141423ecf48b25c6ed8c3" + sha256 cellar: :any, el_capitan: "58b52d360c2f37f3ab3a50c4a2fe72b9a370bd951d52939f8853a5ef49fcc322" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8f6ee7956817e86f157467092d3040167e1c1cc09fcb0503fca830c7bb08540" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e25a808e70aa00573bcb1f195bb76b774e8060031e8a188d47eda1fb30fc6a4f" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + include.install "include/replaygain/" + end +end diff --git a/Formula/lib/libresample.rb b/Formula/lib/libresample.rb new file mode 100644 index 0000000000000..66ef1e7cfd0b7 --- /dev/null +++ b/Formula/lib/libresample.rb @@ -0,0 +1,40 @@ +class Libresample < Formula + desc "Audio resampling C library" + homepage "https://ccrma.stanford.edu/~jos/resample/Available_Software.html" + url "https://deb.debian.org/debian/pool/main/libr/libresample/libresample_0.1.3.orig.tar.gz" + sha256 "20222a84e3b4246c36b8a0b74834bb5674026ffdb8b9093a76aaf01560ad4815" + license "LGPL-2.1-or-later" + + livecheck do + url "https://deb.debian.org/debian/pool/main/libr/libresample/" + regex(/href=.*?libresample[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "79e7e1ab8736164c5c9c6ceb299995ec9771f0cbc3be4d692799595a5ae844bf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0f8fad6a20232a3f3bd9e1ee90d9242c283c325d2c118ca6b051eb79ab5adbea" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9232e1b1d90ad2bb9f8801092358ef64a1a4297196c927dc521ce62229d47d13" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2f0ec7fbf2140acc1295c7397d2e6bb0722c21103941108045f35addd6440fdd" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e2b808178af8d3b7ceccc4c3323ebcf76ad0d3a152c31cbe85c68563cca80bbf" + sha256 cellar: :any_skip_relocation, sonoma: "5c053b159be9058f2f7cd56aff77573414b579b175d2bf2b6421360d568bd789" + sha256 cellar: :any_skip_relocation, ventura: "df14982c36aa5c3ceba5649577008bb74b08f33854c0f1428f3b8c9d1290dfa8" + sha256 cellar: :any_skip_relocation, monterey: "e02f4a234566b65aee658630f4ff47f89b2a6fb9ec80bca40a9959288060b6b4" + sha256 cellar: :any_skip_relocation, big_sur: "623df9f095f427ee794211cd657ad1d1ff5e89f383aa304c9c94d7a27cac36a3" + sha256 cellar: :any_skip_relocation, catalina: "779b21b26d28a7318e67e0444b74ee5782715b523c1f79ba9bdff41c334cd312" + sha256 cellar: :any_skip_relocation, mojave: "7973809674c5ca9dceaf822abaf482c2a8126928140fa056168644b1196005c2" + sha256 cellar: :any_skip_relocation, high_sierra: "42b971ed75ad6ba1bd6879c2b7cb5fb416706ed184291d12983e46ab6c90a20c" + sha256 cellar: :any_skip_relocation, sierra: "b94dc206fa507bcdceb49534740c5c0dff0868a9d9333e4acd8922f22b10c912" + sha256 cellar: :any_skip_relocation, el_capitan: "ba2446005f2417fa81e5a5963d2273494396f8821ee95fd84ed9825342564598" + sha256 cellar: :any_skip_relocation, arm64_linux: "07dabf0e5ac418d11d1cb1e20326ac69e20a199c620e6768c4411a7db878a2e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c42f2a35518f75cc11ee79cdfd8985def6d079a7afd8b2b02f74ac82a165122" + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make" + lib.install "libresample.a" + include.install "include/libresample.h" + end +end diff --git a/Formula/lib/librespot.rb b/Formula/lib/librespot.rb new file mode 100644 index 0000000000000..1ac1618b49c9b --- /dev/null +++ b/Formula/lib/librespot.rb @@ -0,0 +1,47 @@ +class Librespot < Formula + desc "Open Source Spotify client library" + homepage "https://github.com/librespot-org/librespot" + url "https://github.com/librespot-org/librespot/archive/refs/tags/v0.6.0.tar.gz" + sha256 "9ec881edb11e37d31a2b41dd30d56a3413445eedb720e1b0d278567dccfca8fc" + license "MIT" + head "https://github.com/librespot-org/librespot.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d5a2cafcfec99611b21e631568c66d6f48fb44fe253082d3fe4243ffb5ff4735" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ee2f9df22c5a0ea8db290f7bc39e14312023c478b740a1b78d6553dd195ad0be" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e157e7a2cc3a41cb25808eacbc7baaa78af346439c3ed6b0f8b15863e275adec" + sha256 cellar: :any_skip_relocation, sonoma: "b377d7559eb6deab957dee9efbf6c8d0b855142619a798e1b2b0a9b61700db6e" + sha256 cellar: :any_skip_relocation, ventura: "451ba2f00bf2198de8ba55476b7bd6f63a59aabf6d1e344dcd8dea7caaf391c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "825316adc649d6ff25f4e650724a18b2ed780f0b5f9116baf0fb593444102c8b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6561e113b24cb1d2d6e3a5850090e3bfa2a82950388c5fe7fb698dc3b6a333f2" + end + + depends_on "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + depends_on "alsa-lib" + depends_on "avahi" + end + + def install + ENV["COREAUDIO_SDK_PATH"] = MacOS.sdk_path.to_s if OS.mac? + system "cargo", "install", "--no-default-features", "--features", "rodio-backend,with-dns-sd", *std_cargo_args + end + + test do + require "open3" + require "timeout" + + Open3.popen3({ "RUST_LOG" => "DEBUG" }, bin/"librespot", "-v") do |_, _, stderr, wait_thr| + Timeout.timeout(5) do + stderr.each do |line| + refute_match "ERROR", line + break if line.include?("Zeroconf server listening") + end + end + ensure + Process.kill("INT", wait_thr.pid) + end + end +end diff --git a/Formula/lib/libressl.rb b/Formula/lib/libressl.rb new file mode 100644 index 0000000000000..3d0aba80f6a30 --- /dev/null +++ b/Formula/lib/libressl.rb @@ -0,0 +1,83 @@ +class Libressl < Formula + desc "Version of the SSL/TLS protocol forked from OpenSSL" + homepage "https://www.libressl.org/" + # Please ensure when updating version the release is from stable branch. + url "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-4.1.0.tar.gz" + mirror "https://mirrorservice.org/pub/OpenBSD/LibreSSL/libressl-4.1.0.tar.gz" + sha256 "0f71c16bd34bdaaccdcb96a5d94a4921bfb612ec6e0eba7a80d8854eefd8bb61" + license "OpenSSL" + + livecheck do + url :homepage + regex(/latest stable release is (\d+(?:\.\d+)+)/i) + end + + bottle do + sha256 arm64_sequoia: "d9e0e7a03efef02ecc9d4a4e61964dd5560fee9c3f75cd2d2898539ff21a9ae9" + sha256 arm64_sonoma: "96c53ee52ddf5eb1343d1971702b59e6418a0b9e7a2c7bd065e01a6a7a8084e1" + sha256 arm64_ventura: "ff910b656712bbfac05e5b3c415ac2a095bfc1a0b5e2fe63d9ae17d08c4db1f7" + sha256 sonoma: "cf815425b051c0bf2ba5e120d6534efb64d40ffdea1f0ac9a255654268305b7a" + sha256 ventura: "1ba657e7e70e8056684957a68063c6f9ca201947bfb7d14037e76f1e692b8086" + sha256 arm64_linux: "cda2a7c39bc04e8c0a195915c1461a592f46a6c06f3824594e54a8d26296f345" + sha256 x86_64_linux: "9b3af04331913723669b17ed9878eaf78f039617f0841a99400ee649bc57a9b2" + end + + head do + url "https://github.com/libressl/portable.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + keg_only "it conflicts with OpenSSL" + + depends_on "ca-certificates" + + def install + args = %W[ + --disable-dependency-tracking + --disable-silent-rules + --prefix=#{prefix} + --with-openssldir=#{etc}/libressl + --sysconfdir=#{etc}/libressl + ] + + system "./autogen.sh" if build.head? + system "./configure", *args + system "make" + system "make", "install" + end + + def post_install + rm(pkgetc/"cert.pem") if (pkgetc/"cert.pem").exist? + pkgetc.install_symlink Formula["ca-certificates"].pkgetc/"cert.pem" + 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 + #{etc}/libressl/certs + + and run + #{opt_bin}/openssl certhash #{etc}/libressl/certs + EOS + end + + test do + # Make sure the necessary .cnf file exists, otherwise LibreSSL gets moody. + assert_path_exists HOMEBREW_PREFIX/"etc/libressl/openssl.cnf", +"LibreSSL requires the .cnf file for some functionality" + + # Check LibreSSL 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/lib/librest.rb b/Formula/lib/librest.rb new file mode 100644 index 0000000000000..450a9ffbcf66f --- /dev/null +++ b/Formula/lib/librest.rb @@ -0,0 +1,66 @@ +class Librest < Formula + desc "Library to access RESTful web services" + homepage "https://wiki.gnome.org/Projects/Librest" + url "https://download.gnome.org/sources/rest/0.9/rest-0.9.1.tar.xz" + sha256 "9266a5c10ece383e193dfb7ffb07b509cc1f51521ab8dad76af96ed14212c2e3" + license all_of: ["LGPL-2.1-or-later", "LGPL-3.0-or-later"] + + # librest doesn't seem to follow the typical GNOME version scheme, so we + # provide a regex to disable the `Gnome` strategy's version filtering. + livecheck do + url :stable + regex(/rest[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "06a5c8af4c882c1b19125a18709bb62b407e4b9ba38cc1cad2d7752cd589aead" + sha256 cellar: :any, arm64_sonoma: "35deb8d1d89dbdd0c7969023d92ef822175d1eaeb307033e7014ccf8bb100eed" + sha256 cellar: :any, arm64_ventura: "c23e539c42b6212b8f58e04631f6b0603baa2974d6de31a2f39bec3e436c5d7b" + sha256 cellar: :any, sonoma: "0634c21e72f7232145f23bf36578835e0669d0d17db351491d57b8e15867aff3" + sha256 cellar: :any, ventura: "2b1dc70cd6eb900751e74bfbec6c61fb7ab603f75499717fa010403a591dd822" + sha256 arm64_linux: "7f0f5096f4313e89c82e2951eda636a0a3124427650f9b2c0cb6fdc9b1dc47b6" + sha256 x86_64_linux: "cc33d81a4b567bb31a1289239b806b9b312e66c47c83f1e3c8f0a7c6590d70ed" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "glib" + depends_on "json-glib" + depends_on "libsoup" + + uses_from_macos "libxml2" + + # Backport fix to avoid gnome-online-accounts crash + patch do + url "https://gitlab.gnome.org/GNOME/librest/-/commit/dc860c817c311f07b489cd00c6c8dea4ad1999ca.diff" + sha256 "af856766a93efa65e8ac619ab2be1f974a6fdd522dc38296aaa76b0359dbad65" + end + + def install + system "meson", "setup", "build", "-Dexamples=false", "-Dgtk_doc=false", "-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 + #include + + int main(int argc, char *argv[]) { + RestProxy *proxy = rest_proxy_new("http://localhost/", FALSE); + + g_object_unref(proxy); + + return EXIT_SUCCESS; + } + C + + flags = shell_output("pkgconf --cflags --libs rest-1.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libretls.rb b/Formula/lib/libretls.rb new file mode 100644 index 0000000000000..633f10d60864e --- /dev/null +++ b/Formula/lib/libretls.rb @@ -0,0 +1,44 @@ +class Libretls < Formula + desc "Libtls for OpenSSL" + homepage "https://git.causal.agency/libretls/about/" + url "https://causal.agency/libretls/libretls-3.8.1.tar.gz" + sha256 "3bc9fc0e61827ee2f608e5e44993a8fda6d610b80a1e01a9c75610cc292997b5" + license "ISC" + + livecheck do + url "https://causal.agency/libretls/" + regex(/href=.*?libretls[._-]v?(\d+(?:\.\d+)+(?:p\d+)?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "19bba1bc2787f51fb0415c0af6cd57a2428318ce53c5abcf2076a5763a5e738b" + sha256 cellar: :any, arm64_sonoma: "45109b58836fd475c43f0d0dc84c01651c4f6da03732dc7e8c75d6bef69f1a0a" + sha256 cellar: :any, arm64_ventura: "c64160d3f1e8351158fe0e6d341e622f877df3e8f1dfc9e5033d5a46603641e3" + sha256 cellar: :any, arm64_monterey: "27a4b439b4074f1563e89a1cba25f527697b31a80c9b8cd8bbbb4a835d143b90" + sha256 cellar: :any, sonoma: "73bf7016f11e9ac566bab92a996855e0b324ca455aeffeb80c4625b40e06bd18" + sha256 cellar: :any, ventura: "b6b3b3ecdd3815d542edf2501309a30568e1e03b35e1c793e0b724324c0925c5" + sha256 cellar: :any, monterey: "9d52d3007f279b514bfda52afd77bd06f0a420d8daa8ab2ef697b618c5b4666f" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ca54d06ba267e8bc15a341c50abc0b2dcd6b64c1d07a734281d025f5a4485ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44fe94119c4fd8be706393a1b2818af2e7851985fc3ec7dc4ebec2aa2045697e" + end + + depends_on "openssl@3" + + def install + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + return tls_init(); + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-ltls" + system "./test" + end +end diff --git a/Formula/lib/librevenge.rb b/Formula/lib/librevenge.rb new file mode 100644 index 0000000000000..dd11e111599bc --- /dev/null +++ b/Formula/lib/librevenge.rb @@ -0,0 +1,52 @@ +class Librevenge < Formula + desc "Base library for writing document import filters" + homepage "https://sourceforge.net/p/libwpd/wiki/librevenge/" + url "https://downloads.sourceforge.net/project/libwpd/librevenge/librevenge-0.0.5/librevenge-0.0.5.tar.xz" + sha256 "106d0c44bb6408b1348b9e0465666fa83b816177665a22cd017e886c1aaeeb34" + license any_of: ["LGPL-2.1-or-later", "MPL-2.0"] + + livecheck do + url "https://sourceforge.net/projects/libwpd/rss?path=/librevenge" + regex(%r{url=.*?/librevenge[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8c3a4c2ed4af0c16cffd5ac758a8dc3ccec9ea4f0e620ef9ddc401d506660515" + sha256 cellar: :any, arm64_sonoma: "0b4b3683933059632de09508e6d49273a7908cf93a729a2899518eeb2313ce5e" + sha256 cellar: :any, arm64_ventura: "113a4ee5774cf6c3a58e4ea202b3ff39ef2d25f0500236b202d0d164b302dc8c" + sha256 cellar: :any, arm64_monterey: "39b114185ac16a714309ebfbeb02264016a9b72b75d1a1da33bdd0cba42d8ba6" + sha256 cellar: :any, arm64_big_sur: "e46e76a7ca6022277a6d8be2d267ff2496434992b91c149dd59e70a79b31c9cc" + sha256 cellar: :any, sonoma: "fe9b919007a458bb9adc9a5507f9a7a0ffbdc572c60927a0933fe7b7978c2ca7" + sha256 cellar: :any, ventura: "cf1a9383368a1c4a7c54c978815fcef64a1e2c64e66183a45e12be72ad8f3ab4" + sha256 cellar: :any, monterey: "636e3e8ce0e3e775e9ccfaec62c22cd1987db4c50f56e5671cc3eb4bcb002b23" + sha256 cellar: :any, big_sur: "64e6213d3ef01f6ace0b4e4f46e9b4098ddabe735eafb07a213a21454c47bca9" + sha256 cellar: :any_skip_relocation, arm64_linux: "a66a66d364db186d07e4b705c177b5773e1ee99f19cc00843c26a1baf73a8da4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "11fd00b1110acb46392ccc91a6fbb54261834a53e256e3d48d6c268e71d7c4b5" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + + uses_from_macos "zlib" + + def install + system "./configure", "--without-docs", + "--disable-static", + "--disable-werror", + "--disable-tests", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + librevenge::RVNGString str; + return 0; + } + CPP + system ENV.cc, "test.cpp", "-lrevenge-0.0", + "-I#{include}/librevenge-0.0", "-L#{lib}" + end +end diff --git a/Formula/lib/librime.rb b/Formula/lib/librime.rb new file mode 100644 index 0000000000000..d565261c1de2d --- /dev/null +++ b/Formula/lib/librime.rb @@ -0,0 +1,83 @@ +class Librime < Formula + desc "Rime Input Method Engine" + homepage "https://rime.im/" + url "https://github.com/rime/librime.git", + tag: "1.13.1", + revision: "1c23358157934bd6e6d6981f0c0164f05393b497" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "cf413846de5257ed69c635bda821c97ad3a36ced35142c3f6fafd60900870b6b" + sha256 cellar: :any, arm64_sonoma: "a0f8ec80406b78209f9796a65364590f81620323b8068af4ad6a1af37e390656" + sha256 cellar: :any, arm64_ventura: "88ab106ef147e60b6f4d8220d0662891819da6209f0d1e9e02360f7095345669" + sha256 cellar: :any, sonoma: "945951fb791064e11b3889224ecb58c92f7eddd103034d444263dfe3a74a698a" + sha256 cellar: :any, ventura: "74a5240d68f3b45727523df8c4f469f95aa6aab40ef8f39dbdd201bf1f5b8614" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa93377e6691b4d4d6a323beda9f27381d5b7f805a0a21287a4d42fccbd1a9bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa8f6a3c5c42fbf14423d398f68eb17dc40cc43615e815c763ee97b31bb9c828" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "icu4c@77" => :build + depends_on "pkgconf" => :build + + depends_on "capnp" + depends_on "gflags" + depends_on "glog" + depends_on "leveldb" + depends_on "lua" + depends_on "marisa" + depends_on "opencc" + depends_on "yaml-cpp" + + resource "lua" do + url "https://github.com/hchunhui/librime-lua.git", + revision: "e3912a4b3ac2c202d89face3fef3d41eb1d7fcd6" + end + + resource "octagram" do + url "https://github.com/lotem/librime-octagram.git", + revision: "dfcc15115788c828d9dd7b4bff68067d3ce2ffb8" + end + + resource "predict" do + url "https://github.com/rime/librime-predict.git", + revision: "920bd41ebf6f9bf6855d14fbe80212e54e749791" + end + + resource "proto" do + url "https://github.com/lotem/librime-proto.git", + revision: "657a923cd4c333e681dc943e6894e6f6d42d25b4" + end + + def install + resources.each do |r| + r.stage buildpath/"plugins"/r.name + end + + args = %W[ + -DBUILD_MERGED_PLUGINS=OFF + -DCMAKE_INSTALL_RPATH=#{rpath} + -DENABLE_EXTERNAL_PLUGINS=ON + -DBUILD_TEST=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 "rime_api.h" + + int main(void) + { + RIME_STRUCT(RimeTraits, rime_traits); + return 0; + } + CPP + + system ENV.cc, "./test.cpp", "-o", "test" + system testpath/"test" + end +end diff --git a/Formula/lib/librist.rb b/Formula/lib/librist.rb new file mode 100644 index 0000000000000..d283b1f264302 --- /dev/null +++ b/Formula/lib/librist.rb @@ -0,0 +1,62 @@ +class Librist < Formula + desc "Reliable Internet Stream Transport (RIST)" + homepage "https://code.videolan.org/rist/" + url "https://code.videolan.org/rist/librist/-/archive/v0.2.11/librist-v0.2.11.tar.gz" + sha256 "84e413fa9a1bc4e2607ecc0e51add363e1bc5ad42f7cc5baec7b253e8f685ad3" + license "BSD-2-Clause" + head "https://code.videolan.org/rist/librist.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5d585b8708b16c93ce9923a1ac8c1b8ce94e581c66966675b482da7464fee2ea" + sha256 cellar: :any, arm64_sonoma: "5492e570120f87b3e8729e200304be55c2af9c20163b0292f8db746ae132aee9" + sha256 cellar: :any, arm64_ventura: "891def5dc77ba1e982ab1cb27efe8f47383988e7f503b91d844ceab49a3bac5a" + sha256 cellar: :any, sonoma: "e3d7ba37bcb616c8e01ec27539761d081b734a33ea109ae7cb40a0794c97e4da" + sha256 cellar: :any, ventura: "6c5a48f683db99c537f41f16056a48a645487e3f6c49742a68d9beafc8e7fb98" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b20b6b0ec94438a5591f40fda416bbac8b05a078070227dcee776ee95a8cd49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16cee2bf08b7c7a1ac67d23025f25c71ca5af8fa2a6627376eb6cecd4cb26323" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "cjson" + depends_on "libmicrohttpd" + depends_on "mbedtls" + + # remove brew setup + patch :DATA + + def install + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath}" + + system "meson", "setup", "--default-library", "both", "-Dfallback_builtin=false", *std_meson_args, "build", "." + system "meson", "compile", "-C", "build" + system "meson", "install", "-C", "build" + end + + test do + assert_match "Starting ristsender", shell_output("#{bin}/ristsender 2>&1", 1) + end +end + +__END__ +diff --git a/meson.build b/meson.build +index 05d00b3..254d0ab 100755 +--- a/meson.build ++++ b/meson.build +@@ -39,11 +39,6 @@ deps = [] + platform_files = [] + inc = [] + inc += include_directories('.', 'src', 'include/librist', 'include', 'contrib') +-if (host_machine.system() == 'darwin') +- r = run_command('brew', '--prefix', check: true) +- brewoutput = r.stdout().strip() +- inc += include_directories(brewoutput + '/include') +-endif + + #builtin_lz4 = get_option('builtin_lz4') + builtin_cjson = get_option('builtin_cjson') diff --git a/Formula/lib/librsvg.rb b/Formula/lib/librsvg.rb new file mode 100644 index 0000000000000..5024b739add12 --- /dev/null +++ b/Formula/lib/librsvg.rb @@ -0,0 +1,91 @@ +class Librsvg < Formula + desc "Library to render SVG files using Cairo" + homepage "https://wiki.gnome.org/Projects/LibRsvg" + url "https://download.gnome.org/sources/librsvg/2.60/librsvg-2.60.0.tar.xz" + sha256 "0b6ffccdf6e70afc9876882f5d2ce9ffcf2c713cbaaf1ad90170daa752e1eec3" + license "LGPL-2.1-or-later" + + # librsvg doesn't use GNOME's "even-numbered minor is stable" version scheme. + # This regex matches any version that doesn't have a 90+ patch version, as + # those are development releases. + livecheck do + url :stable + regex(/librsvg[._-]v?(\d+\.\d+\.(?:\d|[1-8]\d+)(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0963c3ac5eab8defa0d871e6f14f376ecb580f87a7369e2d8b6ed1ba5a97b009" + sha256 cellar: :any, arm64_sonoma: "a98fcd2388cb75ba4afe95feb7955b0400c1cacb067101378a33bfe295ebe2da" + sha256 cellar: :any, arm64_ventura: "d6603d7add86e0cc825872bf044e7d9dc19693090ee93ef5248825299f7bef01" + sha256 cellar: :any, sonoma: "634f5d94e39ccf7eff754510cd12db72ce3cbc797161227a1f7b8e3a910438df" + sha256 cellar: :any, ventura: "5c3d74c400bf0cfc86010f98dba262c10c39f66f743509a3127b9246cb4e3111" + sha256 arm64_linux: "97199cca04e0499e5084ce8ccf043d3d48a3dde4744b9273d7d9021e393f2b36" + sha256 x86_64_linux: "c3fb7a85f3c84f3c3edd0740dd5c8fd2cc7371cebf1088be130423255eb8514f" + end + + depends_on "cargo-c" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "rust" => :build + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "pango" + + uses_from_macos "libxml2" + + on_macos do + depends_on "fontconfig" + depends_on "freetype" + depends_on "gettext" + depends_on "harfbuzz" + depends_on "libpng" + end + + def install + # Set `RPATH` since `cargo-c` doesn't seem to. + ENV.append "RUSTFLAGS", "--codegen link-args=-Wl,-rpath,#{lib}" if OS.mac? + + # disable updating gdk-pixbuf cache, we will do this manually in post_install + # https://github.com/Homebrew/homebrew/issues/40833 + ENV["DESTDIR"] = "/" + + system "meson", "setup", "build", "-Dintrospection=enabled", + "-Dpixbuf=enabled", + "-Dpixbuf-loader=enabled", + *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + # Workaround until https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/1049 + if OS.mac? + gdk_pixbuf_moduledir = lib.glob("gdk-pixbuf-*/*/loaders").first + gdk_pixbuf_modules = gdk_pixbuf_moduledir.glob("*.dylib") + odie "Try removing .so symlink workaround!" if gdk_pixbuf_modules.empty? + gdk_pixbuf_moduledir.install_symlink gdk_pixbuf_modules.to_h { |m| [m, m.sub_ext(".so").basename] } + end + end + + def post_install + # librsvg is not aware GDK_PIXBUF_MODULEDIR must be set + # set GDK_PIXBUF_MODULEDIR and update loader cache + ENV["GDK_PIXBUF_MODULEDIR"] = "#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders" + system "#{Formula["gdk-pixbuf"].opt_bin}/gdk-pixbuf-query-loaders", "--update-cache" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + RsvgHandle *handle = rsvg_handle_new(); + return 0; + } + C + flags = shell_output("pkgconf --cflags --libs librsvg-2.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/librsync.rb b/Formula/lib/librsync.rb new file mode 100644 index 0000000000000..4049458eb4f99 --- /dev/null +++ b/Formula/lib/librsync.rb @@ -0,0 +1,37 @@ +class Librsync < Formula + desc "Library that implements the rsync remote-delta algorithm" + homepage "https://librsync.github.io/" + url "https://github.com/librsync/librsync/archive/refs/tags/v2.3.4.tar.gz" + sha256 "a0dedf9fff66d8e29e7c25d23c1f42beda2089fb4eac1b36e6acd8a29edfbd1f" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d9636c7490adcc95354151caa325f5a88d79eae4579427afe070624cf0704ce8" + sha256 cellar: :any, arm64_sonoma: "1a4dd37b91633fb0ca4ff0298be03a5877762a2a25dc50f97da96b50de64cdb6" + sha256 cellar: :any, arm64_ventura: "ecf222fd327da97f55371c9c790dd373a4ff7c5db9ad8d3d94a18235c77cd7dd" + sha256 cellar: :any, arm64_monterey: "e2062c102af08ddda0befc3c942256fc1e9135c1f3a5ace59cb89033b2fd430b" + sha256 cellar: :any, arm64_big_sur: "d8eacef1d3062a140f915d3f864f1ed2764175739658fbe7f39d5a316df4aa1e" + sha256 cellar: :any, sonoma: "eb3e34cc997b059385dcba6f8914b7e88815fba9dc2163f633fccfc9185c558c" + sha256 cellar: :any, ventura: "56a8016cd9f57fd16a18dc4718af15fa033220894bda2dab1eeb03583982635a" + sha256 cellar: :any, monterey: "0b1430ccb90548e554ae9b56990bfe958c416dac61594185b2ac0d38af89bb2d" + sha256 cellar: :any, big_sur: "1f060456ddd3143afd9d7b4ce09fa73de0b685d16e5b5add2eec4039175879d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "0ab058d81de355cad8a2e2bd385733d08a58394e95ab025165ec1bcb69dc969a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c48743c4c502118826bf142d7bb393099a994c882b55c1c11430c656382af16" + end + + depends_on "cmake" => :build + depends_on "popt" + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + man1.install "doc/rdiff.1" + man3.install "doc/librsync.3" + end + + test do + assert_match version.to_s, shell_output("#{bin}/rdiff -V") + end +end diff --git a/Formula/lib/librtlsdr.rb b/Formula/lib/librtlsdr.rb new file mode 100644 index 0000000000000..6136882d482ac --- /dev/null +++ b/Formula/lib/librtlsdr.rb @@ -0,0 +1,44 @@ +class Librtlsdr < Formula + desc "Use Realtek DVB-T dongles as a cheap SDR" + homepage "https://osmocom.org/projects/rtl-sdr/wiki" + url "https://github.com/steve-m/librtlsdr/archive/refs/tags/v2.0.2.tar.gz" + sha256 "f407de0b6dce19e81694814e363e8890b6ab2c287c8d64c27a03023e5702fb42" + license "GPL-2.0-or-later" + head "https://git.osmocom.org/rtl-sdr", using: :git, branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3dc37dee4e2862871cf66c0ba71eedfbbe5bab103b766d3d948faeeee5e97f1c" + sha256 cellar: :any, arm64_sonoma: "2e190eb8b02ade5f5be5b15fb07b11ca2fee5a586597a279584e1198341c1cc2" + sha256 cellar: :any, arm64_ventura: "d8c24145ac1ceeea136217f23f2b887b95dee7e3fa174384e2bcd1aec5419f38" + sha256 cellar: :any, arm64_monterey: "84c6e8c711bbf3c97c2b926c87d417558a164cf5870ccd9fe5420ac2d37cf1e5" + sha256 cellar: :any, sonoma: "d4060f4b17661ba3b0687dca15ec474989a997c7f45fe4d7e351b62168a04468" + sha256 cellar: :any, ventura: "e1596383703404db916ace4b3ef729ba1ff6799bd54e5173dc10969c4185f377" + sha256 cellar: :any, monterey: "1c0aa79a1afcd12f4fabb0384d5378ddd81016a2720ab5907d9405d13d1156e4" + sha256 cellar: :any_skip_relocation, arm64_linux: "859c88b6c98327a37922f7e1ffea16ad431121bb814c7c50fb5898df7aeefb0a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a862647f13e22312396e83c4122e7bd985fdff0982910734ad7e9334809917ba" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + + 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 "rtl-sdr.h" + + int main() + { + rtlsdr_get_device_count(); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lrtlsdr", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/librttopo.rb b/Formula/lib/librttopo.rb new file mode 100644 index 0000000000000..860b1eed77f4b --- /dev/null +++ b/Formula/lib/librttopo.rb @@ -0,0 +1,56 @@ +class Librttopo < Formula + desc "RT Topology Library" + homepage "https://git.osgeo.org/gitea/rttopo/librttopo" + url "https://deb.debian.org/debian/pool/main/libr/librttopo/librttopo_1.1.0.orig.tar.gz" + sha256 "2e2fcabb48193a712a6c76ac9a9be2a53f82e32f91a2bc834d9f1b4fa9cd879f" + license "GPL-2.0-or-later" + head "https://git.osgeo.org/gitea/rttopo/librttopo.git", branch: "master" + + livecheck do + url :head + regex(/^(?:librttopo[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "93fca6e17145fc8eacdc667787aa422507c03c5cc868907ef140892ac8be1394" + sha256 cellar: :any, arm64_sonoma: "4750f9f172259c35d54af6412a3d8c3af61fdc4454ceb0e527eab79a9e8a6685" + sha256 cellar: :any, arm64_ventura: "8e6b9b8c094d303209903b45c752ee33d4463751af18871da3f23cc960d779ce" + sha256 cellar: :any, arm64_monterey: "9eee7c1b207b85c576f61e416c507d7b58d657f4d9e314e26ff3a964066965a3" + sha256 cellar: :any, arm64_big_sur: "531ac2ca2e4247da1ebdacac77cbd68faaf5ea5935608de9ff842ae21aa18ce0" + sha256 cellar: :any, sonoma: "e6e7886d1eb7273ee7d7b8745111f9d4eaccbc789138bcd0fb5b05ceb9883222" + sha256 cellar: :any, ventura: "defbee65cdb51949c0d48bf62f035b55b7c148f5780478f46a3fbba47e49e382" + sha256 cellar: :any, monterey: "2eb9b1d4133a764edab33bd122c2d7326b95f983edbbb4cea9bec3888be3885f" + sha256 cellar: :any, big_sur: "59068843a454371abc25ad9421771eb2770febfaa00d41e1527476f4cbfdb05b" + sha256 cellar: :any, catalina: "9512f32068f310fc02c082828e4ebac85a698ef69f370243aa00a5b873569319" + sha256 cellar: :any, mojave: "d6bc9674875a3eeb44cec544f6cc9ac9ce6435f7fd951f446801a8aadcb1a323" + sha256 cellar: :any_skip_relocation, arm64_linux: "9665c432abd2195df0985819c583373e355ad0ca39d57fc05814e90194a4d745" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7d6d9cbbb4846b4a3147ef8be9041c2d155e2b9c8c3b7b3720b71ec78b472667" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "geos" + + def install + system "./autogen.sh" + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + printf("%s", rtgeom_version()); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lrttopo", "-o", "test" + assert_equal stable.version.to_s, shell_output("./test") + end +end diff --git a/Formula/lib/libsail.rb b/Formula/lib/libsail.rb new file mode 100644 index 0000000000000..579b12293f863 --- /dev/null +++ b/Formula/lib/libsail.rb @@ -0,0 +1,67 @@ +class Libsail < Formula + desc "Missing small and fast image decoding library for humans (not for machines)" + homepage "https://github.com/HappySeaFox/sail" + url "https://github.com/HappySeaFox/sail/archive/refs/tags/v0.9.8.tar.gz" + sha256 "ba2160f0825171ab3c41cbc5bb0834bf56439d2986e5aae5f586d5e2009dd9cd" + license "MIT" + + bottle do + sha256 arm64_sequoia: "a041f04044e8d2688d22ada98c499b56bf7f7b88923be150179f276dcca8a8e4" + sha256 arm64_sonoma: "a26d7f5969d4c111616c5ea768117e5aff27dcb2cac4e03ca90f37ab536444d5" + sha256 arm64_ventura: "621cdbbba8f478c344b7972d816ee708fe2e8e76b8167761e4a86b288b691c29" + sha256 sonoma: "aa473ee2d889913139dca352e019d8c2db8b266996c4bc65dc0c6d5e5294ec1c" + sha256 ventura: "4268a9d811d1d9381d6374b22141d85e09308fd5f319a50c22abb71286af20c0" + sha256 arm64_linux: "7fe21e8907150426012d1c18d08e95d83f514cd37adaf4e616b61dd678439056" + sha256 x86_64_linux: "0cf7e10d5a2f95984c62d12bea8cbbe921e28ffa669abc04fe8136267e61e199" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "brotli" + depends_on "giflib" + depends_on "highway" + depends_on "jasper" + depends_on "jpeg-turbo" + depends_on "jpeg-xl" + depends_on "libavif" + depends_on "libpng" + depends_on "libtiff" + depends_on "resvg" + depends_on "webp" + + def install + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DSAIL_BUILD_EXAMPLES=OFF + ] + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # To prevent conflicts with 'sail' formula + mv "#{bin}/sail", "#{bin}/sail-imaging" + end + + test do + system bin/"sail-imaging", "decode", test_fixtures("test.png") + + (testpath/"test.c").write <<~C + #include + + int main(int argc, char **argv) + { + struct sail_image *image; + SAIL_TRY_OR_EXECUTE(sail_load_from_file(argv[1], &image), + /* on error */ return 1); + sail_destroy_image(image); + + return 0; + } + C + + flags = shell_output("#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs sail").strip.split + + system ENV.cc, "test.c", "-o", "test", *flags + system "./test", test_fixtures("test.jpg") + end +end diff --git a/Formula/lib/libsais.rb b/Formula/lib/libsais.rb new file mode 100644 index 0000000000000..bc6d68259c2e9 --- /dev/null +++ b/Formula/lib/libsais.rb @@ -0,0 +1,55 @@ +class Libsais < Formula + desc "Fast linear time suffix array, lcp array and bwt construction" + homepage "https://github.com/IlyaGrebnov/libsais" + url "https://github.com/IlyaGrebnov/libsais/archive/refs/tags/v2.10.1.tar.gz" + sha256 "ecf4611c18fefd8d4377343e4dc3f257ae17a501301a13f7cb7585c836405d39" + license "Apache-2.0" + head "https://github.com/IlyaGrebnov/libsais.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "54b8afff60b856c0884c71de1dd1f1e6409a55b2be1d49b8b673dad9e47b2510" + sha256 cellar: :any, arm64_sonoma: "c5d9e7b22a085837f05ad3b29b6e20fca750f0c5fc3028c4fc5a672fb68eeb7c" + sha256 cellar: :any, arm64_ventura: "399524c4f5c23885e1115134517a85c32e91a66eb6b174323a05eb3fe4ec81af" + sha256 cellar: :any, sonoma: "9f96dfbd1f3c5e47135ffc73fe8ad7b078fe1e288d789c85cb61253cd51c529d" + sha256 cellar: :any, ventura: "9a8a3785b9eb046ff961db993c3b5c2e8a038ce933c0df45721f4cf689bfe80e" + sha256 cellar: :any_skip_relocation, arm64_linux: "c94849ebbeaf7ca8e3b06c9bd5be34a8e5f1fba3c41c78014744c72527b20e96" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec6cd3dd97d73a21ed12b1305f8a8ec133a583088413f62bad03c3fb3908c794" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", + "-DLIBSAIS_BUILD_SHARED_LIB=ON", + *std_cmake_args + system "cmake", "--build", "build" + lib.install shared_library("build/libsais") + include.install "include/libsais.h" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + uint8_t input[] = "homebrew"; + int32_t sa[8]; + libsais(input, sa, 8, 0, NULL); + + if (sa[0] == 4 && + sa[1] == 3 && + sa[2] == 6 && + sa[3] == 0 && + sa[4] == 2 && + sa[5] == 1 && + sa[6] == 5 && + sa[7] == 7) { + return 0; + } + return 1; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lsais", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libsamplerate.rb b/Formula/lib/libsamplerate.rb new file mode 100644 index 0000000000000..931afab76c6f1 --- /dev/null +++ b/Formula/lib/libsamplerate.rb @@ -0,0 +1,68 @@ +class Libsamplerate < Formula + desc "Library for sample rate conversion of audio data" + homepage "https://github.com/libsndfile/libsamplerate" + url "https://github.com/libsndfile/libsamplerate/archive/refs/tags/0.2.2.tar.gz" + sha256 "16e881487f184250deb4fcb60432d7556ab12cb58caea71ef23960aec6c0405a" + license "BSD-2-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "d51907988e3ab62f6e49ddd1253a723fd5964b78a0361453e8d9b75a2106b4e7" + sha256 cellar: :any, arm64_sonoma: "3c6892acfead8a6b32ede92a5f1eb1d4a4dc8a75e6c295b469875d50ec05e019" + sha256 cellar: :any, arm64_ventura: "e3503b414dc2371bf89d19291377b45241255a4b538d81912c228c84a170bda9" + sha256 cellar: :any, sonoma: "6c59b98bd83a71ff444c2cd2a480d78459244174fb8ec7234ba9438b03ca53d5" + sha256 cellar: :any, ventura: "dac109c36e9c06cb12473b9eb767e44bbd0330f18ffdcfbb77af7574038eb7d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "7db3ed51b5ddf4558e0e86efae945c98fb2d2040f3ce614f39737bcbf6cadccc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1223ba0942433dd6c68ce167723d32e2e40ee2f454054001008d487a8256ff6" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + # Fix CMake deprecation warning CMP0091 (prereq for cmake 4 compatibility fix below) + # PR ref: https://github.com/libsndfile/libsamplerate/pull/180 + patch do + url "https://github.com/libsndfile/libsamplerate/commit/e4a0ab46887029e0f65f145ba3987cc592f18200.patch?full_index=1" + sha256 "0826fb59d733188645f3dc207c938580970700381b9bc87058b137723cb30bba" + end + # Fix to cmake 4 compatibility + # PR ref: https://github.com/libsndfile/libsamplerate/pull/225 + patch do + url "https://github.com/libsndfile/libsamplerate/commit/1abc639420b2df8b9ff2e0bdcc28cf6613c7c0d0.patch?full_index=1" + sha256 "b6fb61c763a0f072ef2ebb3a311037d2429a5e294141f6d5e552ccd25efabdc0" + end + + def install + args = ["-DLIBSAMPLERATE_EXAMPLES=OFF"] + + 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/src/libsamplerate.a" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + SRC_DATA src_data; + float input[] = {0.1, 0.9, 0.7, 0.4} ; + float output[2] ; + src_data.data_in = input ; + src_data.data_out = output ; + src_data.input_frames = 4 ; + src_data.output_frames = 2 ; + src_data.src_ratio = 0.5 ; + int res = src_simple (&src_data, 2, 1) ; + assert(res == 0); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{opt_lib}", "-lsamplerate", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libsass.rb b/Formula/lib/libsass.rb new file mode 100644 index 0000000000000..a863896bcc48f --- /dev/null +++ b/Formula/lib/libsass.rb @@ -0,0 +1,65 @@ +class Libsass < Formula + desc "C implementation of a Sass compiler" + homepage "https://github.com/sass/libsass" + url "https://github.com/sass/libsass.git", + tag: "3.6.6", + revision: "7037f03fabeb2b18b5efa84403f5a6d7a990f460" + license "MIT" + head "https://github.com/sass/libsass.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "d5f0835bddfab893cf537c1cb10f42a6abbaa04100954223de905a7f3879a581" + sha256 cellar: :any, arm64_sonoma: "a5262b92c5ef6c48e579002e9705e33a4e69c47ba9004ac9b13843506f314e8f" + sha256 cellar: :any, arm64_ventura: "f16e4b941d9f7b15af8126904348ff2c82a486a08c358827518a35a341b9954e" + sha256 cellar: :any, arm64_monterey: "0a025c9fa92be85ae22f55df1e2c0cdd4536ef648fd4343a5c20077557276241" + sha256 cellar: :any, sonoma: "cf3dc9646ee1c1de9fbb48df62623c02267d77ca3fda6c78a9acc7b893387ec9" + sha256 cellar: :any, ventura: "aa2acc65e1a7804b8df89f73a9c649b30487a4c0a42e08b45a184a4f727c9c86" + sha256 cellar: :any, monterey: "ed5dd1003cce5b3d47138cb192f4018482e381e6b18d4b63a980fb2400bf737c" + sha256 cellar: :any_skip_relocation, arm64_linux: "8b569c57c1429048b0e8d3c3f4e15bc6f9b9efc3943cdaa6a9e6f7d891f59750" + sha256 cellar: :any_skip_relocation, x86_64_linux: "091841d5a1c742f6574ef14d6bb952d54409c7fcbc2085222a11b18eee0e38ba" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + ENV.cxx11 + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + # This will need to be updated when devel = stable due to API changes. + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + const char* source_string = "a { color:blue; &:hover { color:red; } }"; + struct Sass_Data_Context* data_ctx = sass_make_data_context(strdup(source_string)); + struct Sass_Options* options = sass_data_context_get_options(data_ctx); + sass_option_set_precision(options, 1); + sass_option_set_source_comments(options, false); + sass_data_context_set_options(data_ctx, options); + sass_compile_data_context(data_ctx); + struct Sass_Context* ctx = sass_data_context_get_context(data_ctx); + int err = sass_context_get_error_status(ctx); + if(err != 0) { + return 1; + } else { + return strcmp(sass_context_get_output_string(ctx), "a {\\n color: blue; }\\n a:hover {\\n color: red; }\\n") != 0; + } + } + C + system ENV.cc, "-o", "test", "test.c", "-L#{lib}", "-lsass" + system "./test" + end +end diff --git a/Formula/lib/libsbol.rb b/Formula/lib/libsbol.rb new file mode 100644 index 0000000000000..77f1944bc6908 --- /dev/null +++ b/Formula/lib/libsbol.rb @@ -0,0 +1,69 @@ +class Libsbol < Formula + desc "Read and write files in the Synthetic Biology Open Language (SBOL)" + homepage "https://synbiodex.github.io/libSBOL" + url "https://github.com/SynBioDex/libSBOL/archive/refs/tags/v2.3.2.tar.gz" + sha256 "c85de13b35dec40c920ff8a848a91c86af6f7c7ee77ed3c750f414bbbbb53924" + license "Apache-2.0" + revision 3 + + bottle do + sha256 cellar: :any, arm64_sequoia: "b09a89a225eb9340d711c26788bc531b1ca5e3f37fc7be1dcc1419124210fd7f" + sha256 cellar: :any, arm64_sonoma: "751b7e6d933a55e321f83d57b1bd7a9035530bba45ff8e30e497ff52a539d359" + sha256 cellar: :any, arm64_ventura: "82dca670a8ca74e4f974727a4b895a2664dbf74601a79e59c657fa1fbfd8f546" + sha256 cellar: :any, sonoma: "ee16f7b504002ebc4845c479d3b6abf3858deabc1ff9f0671b100f7a58c85af4" + sha256 cellar: :any, ventura: "34f6fef82f97d5be5834994ce870e42a643b3334e9b4c0539b7a922edcdc7e6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "e6c5e5965c77dd8dc497af89ddbc8fea4542ccd551c57422967d19a42a8b87e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ef4f70407b40a1c4791f08309df2075a15cac5a038f0085ecfa23ff0d460258" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "jsoncpp" + depends_on "raptor" + depends_on "rasqal" + + uses_from_macos "curl" + uses_from_macos "libxslt" + + def install + # upstream issue: https://github.com/SynBioDex/libSBOL/issues/215 + inreplace "source/CMakeLists.txt", "measure.h", "measurement.h" + + args = std_cmake_args + args << "-DSBOL_BUILD_SHARED=TRUE" + args << "-DRAPTOR_INCLUDE_DIR=#{Formula["raptor"].opt_include}/raptor2" + args << "-DRASQAL_INCLUDE_DIR=#{Formula["rasqal"].opt_include}" + + if OS.mac? && (sdk = MacOS.sdk_path_if_needed) + args << "-DCURL_LIBRARY=#{sdk}/usr/lib/libcurl.tbd" + args << "-DLIBXSLT_INCLUDE_DIR=#{sdk}/usr/include/" + args << "-DLIBXSLT_LIBRARIES=#{sdk}/usr/lib/libxslt.tbd" + end + + system "cmake", "-S", ".", "-B", "build", *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include "sbol/sbol.h" + + using namespace sbol; + + int main() { + Document& doc = *new Document(); + doc.write("test.xml"); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", "-std=c++11", + "-I/System/Library/Frameworks/Python.framework/Headers", + "-I#{Formula["raptor"].opt_include}/raptor2", + "-I#{include}", "-L#{lib}", + "-L#{Formula["jsoncpp"].opt_lib}", + "-L#{Formula["raptor"].opt_lib}", + "-ljsoncpp", "-lcurl", "-lraptor2", "-lsbol" + system "./test" + end +end diff --git a/Formula/lib/libscfg.rb b/Formula/lib/libscfg.rb new file mode 100644 index 0000000000000..582e89134fae6 --- /dev/null +++ b/Formula/lib/libscfg.rb @@ -0,0 +1,64 @@ +class Libscfg < Formula + desc "C library for scfg" + homepage "https://git.sr.ht/~emersion/libscfg" + url "https://git.sr.ht/~emersion/libscfg/archive/v0.1.1.tar.gz" + sha256 "621a91bf233176e0052e9444f0a42696ad1bfda24b25c027c99cb6e693f273d7" + license "MIT" + head "https://git.sr.ht/~emersion/libscfg", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "74d709bca0afdc5fc76a319c6aa32143345c13688faf76817316a4a89537ee95" + sha256 cellar: :any, arm64_sonoma: "6d14be1b7b275a2200ee9b3805b4e54263a61f59f052103741d54ea9e9e59725" + sha256 cellar: :any, arm64_ventura: "151dba4fa8ab28312b907dd4598df11c81cd8ed0986987faff0fce50263c49c5" + sha256 cellar: :any, arm64_monterey: "e072b64d3301ffa6537dfd489761f376718445c727ae4a29f8d98e06d9f8de11" + sha256 cellar: :any, sonoma: "f46bf808c8969460ddbe01818be5a33f0572fe1804be3725e2907499fa820470" + sha256 cellar: :any, ventura: "bee4bac2d9a37bb294bb16acbc35f857ff2e6990c793391802bcebcfabfaff25" + sha256 cellar: :any, monterey: "d30ecbf9f5ad0e9c5864a8a5c3412311b983a74bf8dd439f0d5948aa9fb39c03" + sha256 cellar: :any_skip_relocation, arm64_linux: "a817080442cc4da90056b4b04736b09b4c7a5a149b53e1929d409d7e646ef4ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fdab5431a3a4c023c5f31b1728107a988eee126552f1860ffbd2ef588edb1243" + 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.cfg").write <<~EOS + key1 = value1 + key2 = value2 + EOS + + (testpath/"test.c").write <<~C + #include + #include + #include "scfg.h" + + int main() { + const char* testFilePath = "test.cfg"; + struct scfg_block block = {0}; + + int loadResult = scfg_load_file(&block, testFilePath); + printf("Successfully loaded '%s'.\\n", testFilePath); + + for (size_t i = 0; i < block.directives_len; i++) { + printf("Directive: %s\\n", block.directives[i].name); + for (size_t j = 0; j < block.directives[i].params_len; j++) { + printf(" Parameter: %s\\n", block.directives[i].params[j]); + } + } + + scfg_block_finish(&block); + + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lscfg", "-o", "test" + assert_match "Successfully loaded 'test.cfg'", shell_output("./test") + end +end diff --git a/Formula/lib/libscrypt.rb b/Formula/lib/libscrypt.rb new file mode 100644 index 0000000000000..60d25a196f896 --- /dev/null +++ b/Formula/lib/libscrypt.rb @@ -0,0 +1,55 @@ +class Libscrypt < Formula + desc "Library for scrypt" + homepage "https://github.com/technion/libscrypt" + url "https://github.com/technion/libscrypt/archive/refs/tags/v1.22.tar.gz" + sha256 "a2d30ea16e6d288772791de68be56153965fe4fd4bcd787777618b8048708936" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7a251107f146f88d993fa4fe542c8fbd92d9123904359f91ac5f44aedbb90344" + sha256 cellar: :any, arm64_sonoma: "78e0f597bcaeb181e0845127db7303d52a4ae34df6f6c61c2759006a45f716ab" + sha256 cellar: :any, arm64_ventura: "27b5cd1ef28e190b9f73c5c617ee652b331eab24cb25bd3129335ad1c0299f76" + sha256 cellar: :any, arm64_monterey: "df9e62c90fb8530ad765f2128a892ba91904901167bb5dcb7f0e1a199b43f59f" + sha256 cellar: :any, arm64_big_sur: "6b39d428937056b1a25080c87d9af446ae1397f824d362ca6a791e683a997ed2" + sha256 cellar: :any, sonoma: "82c9ff58481a5c6a44d7f85b083f614004371fc2572f9a8c8c07de4bee06cf0b" + sha256 cellar: :any, ventura: "ce5a3c6a6e0f0e100eb6b9d515389a371ac2bdc3f18b4aeb7f0909ce8b3b4b99" + sha256 cellar: :any, monterey: "d8e0b6fe9b5e2f14fc281fa859fb3339eb98610863cb0b39652f5cb6522205ad" + sha256 cellar: :any, big_sur: "836c0ae075b9e3b580eea4d3c1b554f861166f74657303103bb0415c34650fb8" + sha256 cellar: :any, catalina: "d53d94bee86fdb65f96abdb62f07f5f2867773fd0719562a21ad320465ebd686" + sha256 cellar: :any_skip_relocation, arm64_linux: "2a407f084d02366dfdbc3dd3801036bee1cf4a7c33f51337ce0418761532939c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "62ae9fdeea1cbe282839585250e2adacea715d313975bf6eb863a579aa669a21" + end + + def install + # `-Os` leads to bugs. https://github.com/technion/libscrypt/issues/60 + ENV.O1 + + args = ["PREFIX=#{prefix}"] + install_target = "install" + + if OS.mac? + args += %w[CFLAGS_EXTRA=-fstack-protector LDFLAGS= LDFLAGS_EXTRA=] + install_target << "-osx" + end + + system "make", "check", *args + system "make", install_target, *args + system "make", "install-static", *args + + return if OS.mac? + + prefix.install "libscrypt.version" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) { + char buf[SCRYPT_MCF_LEN]; + libscrypt_hash(buf, "Hello, Homebrew!", SCRYPT_N, SCRYPT_r, SCRYPT_p); + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lscrypt", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libseccomp.rb b/Formula/lib/libseccomp.rb new file mode 100644 index 0000000000000..8625a7a5fdd62 --- /dev/null +++ b/Formula/lib/libseccomp.rb @@ -0,0 +1,52 @@ +class Libseccomp < Formula + desc "Interface to the Linux Kernel's syscall filtering mechanism" + homepage "https://github.com/seccomp/libseccomp" + url "https://github.com/seccomp/libseccomp/releases/download/v2.6.0/libseccomp-2.6.0.tar.gz" + sha256 "83b6085232d1588c379dc9b9cae47bb37407cf262e6e74993c61ba72d2a784dc" + license "LGPL-2.1-only" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "1ecb12a4236e7e8906c1e5a632ea775dbaaa06afcaf10899d00f25b768d5b40c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "827764369e33cc2ca6ef5961ab87b4005dc023942fe407f1427d775aec63e4d0" + end + + head do + url "https://github.com/seccomp/libseccomp.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "gperf" => :build + depends_on :linux + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + ver_major, ver_minor, = version.to_s.split(".") + + (testpath/"test.c").write <<~C + #include + int main(int argc, char *argv[]) + { + if(SCMP_VER_MAJOR != #{ver_major}) + return 1; + if(SCMP_VER_MINOR != #{ver_minor}) + return 1; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lseccomp", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libsecret.rb b/Formula/lib/libsecret.rb new file mode 100644 index 0000000000000..22ed7237a34f9 --- /dev/null +++ b/Formula/lib/libsecret.rb @@ -0,0 +1,84 @@ +class Libsecret < Formula + desc "Library for storing/retrieving passwords and other secrets" + homepage "https://wiki.gnome.org/Projects/Libsecret" + url "https://download.gnome.org/sources/libsecret/0.21/libsecret-0.21.7.tar.xz" + sha256 "6b452e4750590a2b5617adc40026f28d2f4903de15f1250e1d1c40bfd68ed55e" + license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later", "Apache-2.0"] + + # libsecret doesn't use GNOME's "even-numbered minor is stable" version + # scheme. This regex is the same as the one generated by the `Gnome` strategy + # but it's necessary to avoid the related version scheme logic. + livecheck do + url :stable + regex(/libsecret[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "79874cb427ebe11a1e139f777e566d34c8be68ca97a25020f128c8052d7b2f7b" + sha256 cellar: :any, arm64_sonoma: "cc698c5f2d961f9f09a8ba413bd5dc05f138714f2eabf2317f508cc5672ac0c1" + sha256 cellar: :any, arm64_ventura: "27509297a2f39d82ec33dbd654c24927bcbcf05e117cc1f3fcd32b31038188a8" + sha256 cellar: :any, sonoma: "dde2b7e3ab77bca9a397532ff32e89a715ae2fca9121c76296fdd6d88310b5f0" + sha256 cellar: :any, ventura: "bad849e6cac866d1140597af61bbd3770fca70af8900b4fb86ad82d1ac9725bd" + sha256 arm64_linux: "d7a6d2ab018cc1b477f6b188069ee30fff3a18611f8135888b01e8654dad7f91" + sha256 x86_64_linux: "223ea87975e39fd3bb9ef2d04ea31c1c13b7f797199db96d2d2796b7e7856bf5" + end + + depends_on "docbook-xsl" => :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 "glib" + depends_on "libgcrypt" + uses_from_macos "libxslt" => :build + uses_from_macos "expat" + + on_macos do + depends_on "gettext" + end + + def install + ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" + + system "meson", "setup", "build", "-Dbashcompdir=#{bash_completion}", + "-Dgtk_doc=false", + *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + + const SecretSchema * example_get_schema (void) G_GNUC_CONST; + + const SecretSchema * + example_get_schema (void) + { + static const SecretSchema the_schema = { + "org.example.Password", SECRET_SCHEMA_NONE, + { + { "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER }, + { "string", SECRET_SCHEMA_ATTRIBUTE_STRING }, + { "even", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN }, + { "NULL", 0 }, + } + }; + return &the_schema; + } + + int main() + { + example_get_schema(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libsecret-1").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libserdes.rb b/Formula/lib/libserdes.rb new file mode 100644 index 0000000000000..e62aa08564658 --- /dev/null +++ b/Formula/lib/libserdes.rb @@ -0,0 +1,58 @@ +class Libserdes < Formula + desc "Schema ser/deserializer lib for Avro + Confluent Schema Registry" + homepage "https://github.com/confluentinc/libserdes" + url "https://github.com/confluentinc/libserdes.git", + tag: "v8.0.0", + revision: "152fad7ddec001e886452726e71f3b6a5c8e8c65" + license "Apache-2.0" + head "https://github.com/confluentinc/libserdes.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9cb58d9f9f6a564d219bd9a76ccde9e11b22ccb07bbad4e62e2f22f4cd7baff1" + sha256 cellar: :any, arm64_sonoma: "a335b839fa4fb5d79f5008bd8a277e5579f250cfe6adb48abeec4aa4b4fd759a" + sha256 cellar: :any, arm64_ventura: "8121b5492ec3631fb454765e917e234010bb6c0d314b3783062aeeaf00950111" + sha256 cellar: :any, arm64_monterey: "6496f4d41457a209c42b3221b91be84209a6b1fa25f1be8fba95f1398dbadfb5" + sha256 cellar: :any, arm64_big_sur: "0c3c3421a41fb3faceaf574465cf7554ee61ddfca287dd669fef6cddbbc56a44" + sha256 cellar: :any, sonoma: "b046a45472a1095719a81a350865348265182e610032e4180caf070a669e481d" + sha256 cellar: :any, ventura: "42f216af7be083f8edca4b13888517bece78e4a46d16653ad752e04beb57fdfd" + sha256 cellar: :any, monterey: "a31419be0041dd57cef418fdce0a51c9c9af4aa00e0ca0faa40622b359c94a7d" + sha256 cellar: :any, big_sur: "86eb44c16b5a2f33da010ec7e13df64521270c7a43b8395646effe886254066a" + sha256 cellar: :any, catalina: "6530d6f15114bb1670201170b6e564415eb610072944609d6b2fa029329fd722" + sha256 cellar: :any_skip_relocation, arm64_linux: "0add5c36720048c77106dcab1dee9554a1d1993bf9416378364edba0272bdd08" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc8f04a8a7f87996e1dc8f16ca51c16d07986352fdc1f46cb2c87e5fd73afdc5" + end + + depends_on "avro-c" + depends_on "jansson" + + uses_from_macos "curl" + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + + int main() + { + char errstr[512]; + serdes_conf_t *sconf = serdes_conf_new(NULL, 0, NULL); + serdes_t *serdes = serdes_new(sconf, errstr, sizeof(errstr)); + if (serdes == NULL) { + errx(1, "constructing serdes: %s", errstr); + } + serdes_destroy(serdes); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lserdes", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libserialport.rb b/Formula/lib/libserialport.rb new file mode 100644 index 0000000000000..554ce273447ac --- /dev/null +++ b/Formula/lib/libserialport.rb @@ -0,0 +1,44 @@ +class Libserialport < Formula + desc "Cross-platform serial port C library" + homepage "https://sigrok.org/wiki/Libserialport" + url "https://sigrok.org/download/source/libserialport/libserialport-0.1.2.tar.gz" + sha256 "5deb92b5ca72c0347b07b786848350deca2dcfd975ce613b8e0e1d947a4b4ca9" + license "LGPL-3.0-or-later" + + livecheck do + url "https://sigrok.org/wiki/Downloads" + regex(/href=.*?libserialport[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "7b4c2b23d05044cd78465a863caab22fd8a1ea1d5938cb4227df56084e69f91a" + sha256 cellar: :any, arm64_sonoma: "845cc5b5945587d1aa504531d09fea0956c75a6d7ea47dc3a6aa37533e33d74b" + sha256 cellar: :any, arm64_ventura: "d8e517c94d88c00c49c0e7243450f55ca8003cdb3e9b944f972d6673624701de" + sha256 cellar: :any, sonoma: "e1f99856052b3f5329e02b481347bc28b0a8bdae9de5c99acc6993bcd6d4686d" + sha256 cellar: :any, ventura: "bd710fe43d3a02c4c7a99663e1c6e5254810cbbdf7f71185d2a49398870503dd" + sha256 cellar: :any_skip_relocation, arm64_linux: "a9e6ddd7268f8000d0a4fc564fb61025b200ba0a9f66e444c3b06353804ae304" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b61c51d632d2f98386a1eac5eff490bd6cda366f8e5d2edcdde021660ad2006" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + struct sp_port *list_ptr = NULL; + sp_get_port_by_name("some port", &list_ptr); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lserialport", + "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libshout.rb b/Formula/lib/libshout.rb new file mode 100644 index 0000000000000..3881f73596fff --- /dev/null +++ b/Formula/lib/libshout.rb @@ -0,0 +1,49 @@ +class Libshout < Formula + desc "Data and connectivity library for the Icecast server" + homepage "https://icecast.org/" + url "https://ftp.osuosl.org/pub/xiph/releases/libshout/libshout-2.4.6.tar.gz" + mirror "https://mirror.csclub.uwaterloo.ca/xiph/releases/libshout/libshout-2.4.6.tar.gz" + sha256 "39cbd4f0efdfddc9755d88217e47f8f2d7108fa767f9d58a2ba26a16d8f7c910" + license "LGPL-2.0-or-later" + revision 1 + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/libshout/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)libshout[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "49c3066752128e45a877701bceb70aa87a5206860ced2da703537c50c2c71d6e" + sha256 cellar: :any, arm64_sonoma: "d33f7df96360cb44be07c2df6c3149372314fe2a72f56ee7df3042454d5bd1d1" + sha256 cellar: :any, arm64_ventura: "9231d4d7890507d132e7a64201b7ead203a22cb47850c9cf7ee099fbc5c8a6cd" + sha256 cellar: :any, arm64_monterey: "60b072983a4133b4e504760df1173592f72f20ad4c563eaf4818c3f1de726c04" + sha256 cellar: :any, arm64_big_sur: "5556dc649d2ffc26db4982b4454fa398bbbe984dcdabcc43463c1ef9af7a01f0" + sha256 cellar: :any, sonoma: "e8bd0edee4ddf595bda83e9b8c4b5038dadd560cb6fbee45bf5ebe8ee9fabf80" + sha256 cellar: :any, ventura: "89f4593d901019c32468604a871a46524d30b48a9dbd09a060e00e99e487a99a" + sha256 cellar: :any, monterey: "8ab0df70741deb6cec78b95f37fb60ff5504a3f077033c2b4c7ae76745d8987f" + sha256 cellar: :any, big_sur: "97acacadd869bf35f1a8ae8fb4c5771a028d531272313b5dbc55348ce197ebd1" + sha256 cellar: :any_skip_relocation, arm64_linux: "5036709d1848f381cc792e27ef58fc9b52aba7adad1cf7a5f175357f9ad6e31f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "898c7da67e779f3cce1a4b3f7b5cff8af87725d7235b3a138c06396db1b2eeec" + end + + depends_on "pkgconf" => :build + depends_on "libogg" + depends_on "libvorbis" + depends_on "openssl@3" + depends_on "speex" + depends_on "theora" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + 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 +end diff --git a/Formula/lib/libshumate.rb b/Formula/lib/libshumate.rb new file mode 100644 index 0000000000000..e9affa9953c4b --- /dev/null +++ b/Formula/lib/libshumate.rb @@ -0,0 +1,77 @@ +class Libshumate < Formula + desc "Shumate is a GTK toolkit providing widgets for embedded maps" + homepage "https://gitlab.gnome.org/GNOME/libshumate" + url "https://download.gnome.org/sources/libshumate/1.4/libshumate-1.4.0.tar.xz" + sha256 "3984368e0259862b3810d1ddc86d2dadd6d372a2b32376ccf4aff7c2e48c6d30" + license "LGPL-2.1-or-later" + + # libshumate doesn't use GNOME's "even-numbered minor is stable" version + # scheme. This regex is the same as the one generated by the `Gnome` strategy + # but it's necessary to avoid the related version scheme logic. + livecheck do + url :stable + regex(/libshumate[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "03c1e1cfe5e5ac378561a0081970a7574c9df54720b1f3533da47b2dd27301cf" + sha256 cellar: :any, arm64_sonoma: "f6ce2c8bf83ee72de1952489b5c47bbbe66ba4b8b6e0996d1d92a38511c900ea" + sha256 cellar: :any, arm64_ventura: "326ee03a217fb356f82ed670d865e10e2529972766a8bd96d795244b635083f8" + sha256 cellar: :any, sonoma: "fd7a41758706f61a84c0779e173ddbd5321b1dac57e3412795a5130b3603c8d5" + sha256 cellar: :any, ventura: "b5c97ff3a747979999e3545e1bdaca0b3fc3d2e4397b66c7566709d945bba25b" + sha256 arm64_linux: "a51d6cf1dd5e4637380a9677578e5f8d6ba0eac1b612f1bf5a14406fc55c9ac3" + sha256 x86_64_linux: "37ea17a35de56d99e74e9cd1cc22dadd604e9e661c1e3555715d65e5098342fe" + 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 "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "graphene" + depends_on "gtk4" + depends_on "json-glib" + depends_on "libsoup" + depends_on "pango" + depends_on "protobuf-c" + depends_on "sqlite" + + uses_from_macos "gperf" => :build + + on_macos do + depends_on "gettext" + end + + def install + system "meson", "setup", "build", "-Dgtk_doc=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[]) { + char version[32]; + snprintf(version, 32, "%d.%d.%d", SHUMATE_MAJOR_VERSION, SHUMATE_MINOR_VERSION, SHUMATE_MICRO_VERSION); + return 0; + } + C + + # TODO: remove this after rewriting icu-uc in `libpsl`'s pkg-config file + ENV.prepend_path "PKG_CONFIG_PATH", Formula["icu4c"].opt_lib/"pkgconfig" if OS.mac? + + flags = shell_output("#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs shumate-1.0").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + + # include a version check for the pkg-config files + assert_match version.to_s, (lib/"pkgconfig/shumate-1.0.pc").read + end +end diff --git a/Formula/lib/libsidplayfp.rb b/Formula/lib/libsidplayfp.rb new file mode 100644 index 0000000000000..f16ad5329a7b2 --- /dev/null +++ b/Formula/lib/libsidplayfp.rb @@ -0,0 +1,53 @@ +class Libsidplayfp < Formula + desc "Library to play Commodore 64 music" + homepage "https://github.com/libsidplayfp/libsidplayfp" + url "https://github.com/libsidplayfp/libsidplayfp/releases/download/v2.14.0/libsidplayfp-2.14.0.tar.gz" + sha256 "0f49c87c3a4791b9709d502e605274ee5c4c20eabfdea0340917d27cbd685f53" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1079c7fdb8d53199b128d5022a0ad918cd937bbf1535e2b73f030e560540f783" + sha256 cellar: :any, arm64_sonoma: "6d3c978c8bab5665aa97a7d78f9c3f13865a87e01615c89f2b2a466ff6e61a65" + sha256 cellar: :any, arm64_ventura: "b4d96ddf0760fa704d6d183628e80b273a5f51c2115f4b8e70979856a965750e" + sha256 cellar: :any, sonoma: "a29f5db031283a1a9605d9c41d66f1d39f3dbfdb4a9b20c207b2651576241192" + sha256 cellar: :any, ventura: "f1fa12831c8b3bf2d5d6e633cc312a90bec47c5c3b3d2b72bdb1ad48a421727f" + sha256 cellar: :any_skip_relocation, arm64_linux: "a68214b7de4632c51b0db5bfce208238b948b4733635dbaf27da0aa0c302d4db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d98612cce385b91aec0ba7ae4c0ae1349be0eb4012bef57d872d92cff2dfdaa4" + end + + head do + url "https://github.com/libsidplayfp/libsidplayfp.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "coreutils" => :build + depends_on "libtool" => :build + depends_on "xa" => :build + end + + depends_on "pkgconf" => :build + depends_on "libgcrypt" + + 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.cpp").write <<~CPP + #include + #include + + int main() { + sidplayfp play; + std::cout << LIBSIDPLAYFP_VERSION_MAJ << "." + << LIBSIDPLAYFP_VERSION_MIN << "." + << LIBSIDPLAYFP_VERSION_LEV; + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-L#{lib}", "-I#{include}", "-lsidplayfp", "-o", "test" + assert_equal version.to_s, shell_output("./test") + end +end diff --git a/Formula/lib/libsigc++.rb b/Formula/lib/libsigc++.rb new file mode 100644 index 0000000000000..26fb3f094321d --- /dev/null +++ b/Formula/lib/libsigc++.rb @@ -0,0 +1,56 @@ +class Libsigcxx < Formula + desc "Callback framework for C++" + homepage "https://libsigcplusplus.github.io/libsigcplusplus/" + url "https://download.gnome.org/sources/libsigc++/3.6/libsigc++-3.6.0.tar.xz" + sha256 "c3d23b37dfd6e39f2e09f091b77b1541fbfa17c4f0b6bf5c89baef7229080e17" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e481f54a00978ae4fdd3c377bacfb99fb5f890ff914791151a514ce7a6ebfadb" + sha256 cellar: :any, arm64_sonoma: "1dafdacabb0f20c0f95af6338147c4ffb65d4e516670786b995091364fa9c110" + sha256 cellar: :any, arm64_ventura: "ea969d674fc75a2c00d3949275f22c54cb3bff8c3f172e0fa7504eb8c5a43e33" + sha256 cellar: :any, arm64_monterey: "d8da5f7b72add1164baa9dea85cf98252e453d6feccdc810a83e45864015a4a6" + sha256 cellar: :any, sonoma: "2b8440fee6119c2db8798127a2ba79a0661d704cce7ad9981f8379ac425390dd" + sha256 cellar: :any, ventura: "14caa93cc34a8fc23b59970bd16fcb6750d06455a1077dbdc4b019484cc1f25a" + sha256 cellar: :any, monterey: "00a4b40549db35b1c86c7c4dbec7ce12fac4984a6978dd23f3a64f99dd55e789" + sha256 cellar: :any_skip_relocation, arm64_linux: "0ec3e71db039808ea08a34d73e13d2bceb915dcdb0069f4da98478afe501e0b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "125217bab99e1e8e4752ddcbe720f68745ffaadc94930cbd432d554a87c7924f" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on macos: :high_sierra # needs C++17 + + uses_from_macos "m4" => :build + + def install + system "meson", "setup", "build", "-Dbuild-examples=false", "-Dbuild-tests=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 + + void on_print(const std::string& str) { + std::cout << str; + } + + int main(int argc, char *argv[]) { + sigc::signal signal_print; + + signal_print.connect(sigc::ptr_fun(&on_print)); + + signal_print.emit("hello world\\n"); + return 0; + } + CPP + + system ENV.cxx, "-std=c++17", "test.cpp", + "-L#{lib}", "-lsigc-3.0", "-I#{include}/sigc++-3.0", "-I#{lib}/sigc++-3.0/include", "-o", "test" + assert_match "hello world", shell_output("./test") + end +end diff --git a/Formula/lib/libsigc++@2.rb b/Formula/lib/libsigc++@2.rb new file mode 100644 index 0000000000000..581987a2d5614 --- /dev/null +++ b/Formula/lib/libsigc++@2.rb @@ -0,0 +1,48 @@ +class LibsigcxxAT2 < Formula + desc "Callback framework for C++" + homepage "https://libsigcplusplus.github.io/libsigcplusplus/" + url "https://download.gnome.org/sources/libsigc++/2.10/libsigc++-2.10.8.tar.xz" + sha256 "235a40bec7346c7b82b6a8caae0456353dc06e71f14bc414bcc858af1838719a" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "60b84e4af2ddcceecaed25095c2dd11efd191c3a96d7c39b08552fcfaeca82ad" + sha256 cellar: :any, arm64_sonoma: "d84c23bbe72a865f26ed4426a029b5a4a2ae9f4410a446737469e463be28f353" + sha256 cellar: :any, arm64_ventura: "c3faa72283c90172978072aae40c1f7cc75ebecdc58cbb292f50759c2f6a0f50" + sha256 cellar: :any, arm64_monterey: "f08cb049ca155fb8ac09d1586ea415084ba95e3e2aa760c5b4ddabe51ea44b08" + sha256 cellar: :any, arm64_big_sur: "5d024a8626df8d8bb872a2e1f1452ebe793f3b95a9c08814abe36a48e9f19297" + sha256 cellar: :any, sonoma: "fc7f210956e4996bb337ce6cf5d7a57699e2e212a6c33bf27f0e74c9bcf3eefb" + sha256 cellar: :any, ventura: "9c65d0d59d9f38882611c7f19433d78dd72ff1b13336137c602ce0a031360ca7" + sha256 cellar: :any, monterey: "155cb09e024335504393bc4ea4921348449bbcbf08384f7e6e1210c2cee3f403" + sha256 cellar: :any, big_sur: "5ea91db7ec5618625126b12e5bf7de2b2d8cc21b77170536f0d9d33de3bc8ffa" + sha256 cellar: :any, catalina: "f4aa31cd03380890a69669687fee5a978586ea8cd8613e871864f2a5dcc7bd97" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e5595dae73183a87ecf0c2beb1a742ae2f980d8ccaa476b32c279daaa9696fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1a2909597897d782656e62646e426c9e0f29a11d845b986de0f13a0e07adcd77" + 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 + + void somefunction(int arg) {} + + int main(int argc, char *argv[]) + { + sigc::slot sl = sigc::ptr_fun(&somefunction); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", + "-L#{lib}", "-lsigc-2.0", "-I#{include}/sigc++-2.0", "-I#{lib}/sigc++-2.0/include", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libsignal-protocol-c.rb b/Formula/lib/libsignal-protocol-c.rb new file mode 100644 index 0000000000000..45421ef16270b --- /dev/null +++ b/Formula/lib/libsignal-protocol-c.rb @@ -0,0 +1,114 @@ +class LibsignalProtocolC < Formula + desc "Signal Protocol C Library" + homepage "https://github.com/signalapp/libsignal-protocol-c" + url "https://github.com/signalapp/libsignal-protocol-c/archive/refs/tags/v2.3.3.tar.gz" + sha256 "c22e7690546e24d46210ca92dd808f17c3102e1344cd2f9a370136a96d22319d" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9a8ecae4c6099cd0732fddcd94730e7e8dc361e9f625fab00279792700e64130" + sha256 cellar: :any, arm64_sonoma: "5ea0c5c2b3ae7de38ab640492eb6e0627d1bd329413a18520c93c0699309f29d" + sha256 cellar: :any, arm64_ventura: "c2e2d424032060b1ea5eaad3e977c6bc2d2704c8aa1a43c371e119c06d68f1f1" + sha256 cellar: :any, arm64_monterey: "28c12c6c31a0950b035347de5e67aca8a0057793bf35feb2b4dbe1d342a2682d" + sha256 cellar: :any, arm64_big_sur: "ae7936606ffb1bcc2cce9e6854bc6fa7cd6fcf44ae67b17b7a861158fa58ca7f" + sha256 cellar: :any, sonoma: "d9edd40514a689492c36549a43d74312e81c3e0a764bcc22e645e5af82059c67" + sha256 cellar: :any, ventura: "b5cf27a68fe60b12da74c76b2bbe0485a82c5662f7c6c3becde96053d364febc" + sha256 cellar: :any, monterey: "a5216e8239283c702a4c68d4f63da4cfa9e532d4452d0edc8ed560c7aa38900d" + sha256 cellar: :any, big_sur: "16cbd5edd6e2d6a2905a6cf1d4b342deb3b356093c1945a9a4333038fbb3b60e" + sha256 cellar: :any, catalina: "2ad98569b7c0543579c9a2596a78e86bb7a915fb17632850cea099feb9d2d674" + sha256 cellar: :any, mojave: "95991e7aa3ef7fa4fdfb25f8f3ed588103e7343599bb5fd86c190e0a2b62ebf8" + sha256 cellar: :any, high_sierra: "9dc54604cd42340d8e1ab2da73b54fd19d4cfdb87144921bdb6bcf03e2b41993" + sha256 cellar: :any_skip_relocation, arm64_linux: "313d261c9a30af89903531ff44ac68c58955e112edafe4afdf68225824ccebd9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d3f06b8dc3938b4dc6912a65606713000e6ad910c4bfcb4af4e9c0dca899e0c" + end + + deprecate! date: "2024-08-01", because: :repo_archived + + depends_on "cmake" => :build + depends_on "pkgconf" => :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 + #include + + int main(void) + { + int result = 0; + printf("Beginning of test...\\n"); + printf("0\\n"); + + signal_context *global_context = NULL; + result = signal_context_create(&global_context, NULL); + if (result != SG_SUCCESS) return 1; + printf("1\\n"); + + signal_protocol_store_context *store_context = NULL; + result = signal_protocol_store_context_create(&store_context, global_context); + if (result != SG_SUCCESS) return 1; + printf("2\\n"); + + signal_protocol_session_store session_store = { + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + }; + result = signal_protocol_store_context_set_session_store(store_context, &session_store); + if (result != SG_SUCCESS) return 1; + printf("3\\n"); + + signal_protocol_pre_key_store pre_key_store = { + NULL, NULL, NULL, NULL, NULL, NULL + }; + result = signal_protocol_store_context_set_pre_key_store(store_context, &pre_key_store); + if (result != SG_SUCCESS) return 1; + printf("4\\n"); + + signal_protocol_signed_pre_key_store signed_pre_key_store = { + NULL, NULL, NULL, NULL, NULL, NULL + }; + result = signal_protocol_store_context_set_signed_pre_key_store(store_context, &signed_pre_key_store); + if (result != SG_SUCCESS) return 1; + printf("5\\n"); + + signal_protocol_identity_key_store identity_key_store = { + NULL, NULL, NULL, NULL, NULL, NULL + }; + result = signal_protocol_store_context_set_identity_key_store(store_context, &identity_key_store); + if (result != SG_SUCCESS) return 1; + printf("6\\n"); + + signal_protocol_address address = { + "+14159998888", 12, 1 + }; + session_builder *builder = NULL; + result = session_builder_create(&builder, store_context, &address, global_context); + if (result != SG_SUCCESS) return 1; + printf("7\\n"); + + session_cipher *cipher = NULL; + result = session_cipher_create(&cipher, store_context, &address, global_context); + if (result != SG_SUCCESS) return 1; + printf("8\\n"); + + session_cipher_free(cipher); + session_builder_free(builder); + signal_protocol_store_context_destroy(store_context); + printf("9\\n"); + + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}/signal", + "-L#{lib}", "-lsignal-protocol-c", + "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libsigrok.rb b/Formula/lib/libsigrok.rb new file mode 100644 index 0000000000000..5b4349e678295 --- /dev/null +++ b/Formula/lib/libsigrok.rb @@ -0,0 +1,192 @@ +class Libsigrok < Formula + desc "Drivers for logic analyzers and other supported devices" + homepage "https://sigrok.org/" + # libserialport is LGPL3+ + # fw-fx2lafw is GPL-2.0-or-later and LGPL-2.1-or-later" + license all_of: ["GPL-3.0-or-later", "LGPL-3.0-or-later", "GPL-2.0-or-later", "LGPL-2.1-or-later"] + revision 5 + + stable do + url "https://sigrok.org/download/source/libsigrok/libsigrok-0.5.2.tar.gz" + sha256 "4d341f90b6220d3e8cb251dacf726c41165285612248f2c52d15df4590a1ce3c" + + # build patch to replace `PyEval_CallObject` with `PyObject_CallObject` + patch do + url "https://github.com/sigrokproject/libsigrok/commit/5bc8174531df86991ba8aa6d12942923925d9e72.patch?full_index=1" + sha256 "247bfee9777a39d5dc454a999ce425a061cdc48f4956fdb0cc31ec67a8086ce0" + end + + resource "libserialport" do + url "https://sigrok.org/download/source/libserialport/libserialport-0.1.1.tar.gz" + sha256 "4a2af9d9c3ff488e92fb75b4ba38b35bcf9b8a66df04773eba2a7bbf1fa7529d" + end + + resource "fw-fx2lafw" do + url "https://sigrok.org/download/source/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-0.1.7.tar.gz" + sha256 "a3f440d6a852a46e2c5d199fc1c8e4dacd006bc04e0d5576298ee55d056ace3b" + + # Backport fixes to build with sdcc>=4.2.3. Remove in the next release of fw-fx2lafw. + patch do + url "https://sigrok.org/gitweb/?p=sigrok-firmware-fx2lafw.git;a=commitdiff_plain;h=5aab87d358a4585a10ad89277bb88ad139077abd" + sha256 "ddf21e9e655c78d93cb58742e1a4dcbe769dfa2d88cfc963f97b6e5794c2fdcf" + end + patch do + url "https://sigrok.org/gitweb/?p=sigrok-firmware-fx2lafw.git;a=commitdiff_plain;h=3e08500d22f87f69941b65cf8b8c1b85f9b41173" + sha256 "dd74b58ae0e255bca4558dc6604e32c34c49ddb05281d7edc35495f0c506373a" + end + patch do + url "https://sigrok.org/gitweb/?p=sigrok-firmware-fx2lafw.git;a=commitdiff_plain;h=96b0b476522c3f93a47ff8f479ec08105ba6a2a5" + sha256 "b75c7b6a1705e2f8d97d5bdaac01d1ae2476c0b0f1b624d766d722dd12b402db" + end + end + end + + # The upstream website has gone down due to a server failure and the previous + # download page is not available, so this checks the directory listing page + # where the `stable` archive is found until the download page returns. + livecheck do + url "https://sigrok.org/download/source/libsigrok/" + regex(/href=.*?libsigrok[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "22e5e2db64f98452def0ed20f6896caa15fda7c38c71454adbd6c4261591eb43" + sha256 arm64_sonoma: "39c5f43f820298f30bb3ff75ea971257f1ce9a4df35be4f2ccd218355f2b7a62" + sha256 arm64_ventura: "7f3024bf6ef54007c043d9be38515c29522cd9952280142d330009da93fd9fcc" + sha256 sonoma: "d0606b7df886ae65ba3fbf01968682ed5928ad17bbf293e6b905ed2fa097adc2" + sha256 ventura: "772490f83137bbd47c046691c5dd9af3ac245cc9e49d4e86d9c5db7355ed87f0" + sha256 arm64_linux: "748684586a8ca71f8957e8929a8ed28220ca62ff56e7c1c0aec30209728fd588" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d91357303c1b4ff68746181b66eba6944140ff6bf365c1e88cfafd29f9c64076" + end + + head do + url "git://sigrok.org/libsigrok", branch: "master" + + resource "libserialport" do + url "git://sigrok.org/libserialport", branch: "master" + end + + resource "fw-fx2lafw" do + url "git://sigrok.org/sigrok-firmware-fx2lafw", branch: "master" + end + end + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "doxygen" => :build + depends_on "graphviz" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python-setuptools" => :build + depends_on "sdcc" => :build + depends_on "swig" => :build + depends_on "glib" + depends_on "glibmm@2.66" + depends_on "hidapi" + depends_on "libftdi" + depends_on "libusb" + depends_on "libzip" + depends_on "nettle" + depends_on "numpy" + depends_on "pygobject3" + depends_on "python@3.13" + + on_macos do + depends_on "gettext" + depends_on "libsigc++@2" + end + + resource "fw-fx2lafw" do + url "https://sigrok.org/download/binary/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-bin-0.1.7.tar.gz" + sha256 "c876fd075549e7783a6d5bfc8d99a695cfc583ddbcea0217d8e3f9351d1723af" + end + + def python3 + "python3.13" + end + + def install + resource("fw-fx2lafw").stage do + if build.head? + system "./autogen.sh" + else + system "autoreconf", "--force", "--install", "--verbose" + end + + mkdir "build" do + system "../configure", *std_configure_args + system "make", "install" + end + end + + resource("libserialport").stage do + if build.head? + system "./autogen.sh" + else + system "autoreconf", "--force", "--install", "--verbose" + end + + mkdir "build" do + system "../configure", *std_configure_args + system "make", "install" + end + end + + # We need to use the Makefile to generate all of the dependencies + # for setup.py, so the easiest way to make the Python libraries + # work is to adjust setup.py's arguments here. + prefix_site_packages = prefix/Language::Python.site_packages(python3) + inreplace "Makefile.am" do |s| + s.gsub!(/^(setup_py =.*setup\.py .*)/, "\\1 --no-user-cfg") + s.gsub!( + /(\$\(setup_py\) install)/, + "\\1 --single-version-externally-managed --record=installed.txt --install-lib=#{prefix_site_packages}", + ) + end + + if build.head? + system "./autogen.sh" + else + system "autoreconf", "--force", "--install", "--verbose" + end + + mkdir "build" do + ENV["PYTHON"] = python3 + ENV.prepend_path "PKG_CONFIG_PATH", lib/"pkgconfig" + args = %w[ + --disable-java + --disable-ruby + ] + system "../configure", *std_configure_args, *args + system "make" + system "make", "install" + end + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() { + struct sr_context *ctx; + if (sr_init(&ctx) != SR_OK) { + exit(EXIT_FAILURE); + } + if (sr_exit(ctx) != SR_OK) { + exit(EXIT_FAILURE); + } + return 0; + } + C + flags = shell_output("#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs libsigrok").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + + system python3, "-c", <<~PYTHON + import sigrok.core as sr + sr.Context.create() + PYTHON + end +end diff --git a/Formula/lib/libsigrokdecode.rb b/Formula/lib/libsigrokdecode.rb new file mode 100644 index 0000000000000..ac3f70b343d42 --- /dev/null +++ b/Formula/lib/libsigrokdecode.rb @@ -0,0 +1,86 @@ +class Libsigrokdecode < Formula + desc "Drivers for logic analyzers and other supported devices" + homepage "https://sigrok.org/" + url "https://sigrok.org/download/source/libsigrokdecode/libsigrokdecode-0.5.3.tar.gz" + sha256 "c50814aa6743cd8c4e88c84a0cdd8889d883c3be122289be90c63d7d67883fc0" + license "GPL-3.0-or-later" + revision 1 + head "git://sigrok.org/libsigrokdecode", branch: "master" + + # The upstream website has gone down due to a server failure and the previous + # download page is not available, so this checks the directory listing page + # where the `stable` archive is found until the download page returns. + livecheck do + url "https://sigrok.org/download/source/libsigrokdecode/" + regex(/href=.*?libsigrokdecode[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 3 + sha256 arm64_sequoia: "a1731df4239983986370c4e136346205199c9d1999b4eeb0067c7fc567b02f7f" + sha256 arm64_sonoma: "06ea701901cb284067dc6796141c3be85597eb1a6032653b99b9e9c78b9ae1f8" + sha256 arm64_ventura: "eb410224d2af9d9e6b3a40704afd84cd7a3f6df7598c79b470002a9f6ecdd3d1" + sha256 sonoma: "f5e9ec9a38a4e83df28d62965b917dc0809f8c943111920af264847cd2513c28" + sha256 ventura: "24e70691499a8ac340debfaead0053f63fd2e708b6e231929ee0644eecd17810" + sha256 arm64_linux: "ea90517cecd0032963f9d6faca72b8665fc648c0b4df7e3c523cb3b3553c0479" + sha256 x86_64_linux: "355ac16e0c4e7e8d896a78e556e079ee9269753e1ecb996dee863593d7f32db1" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "doxygen" => :build + depends_on "graphviz" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "glib" + depends_on "python@3.13" + + on_macos do + depends_on "gettext" + end + + def install + # While this doesn't appear much better than hardcoding `3.13`, this allows + # `brew audit` to catch mismatches between this line and the dependencies. + python = "python3.13" + py_version = Language::Python.major_minor_version(python) + + # We should be able to remove this in libsigrokdecode >0.5.3, who will + # check for a version-independent `python3-embed` pkg-config file, and + # correctly detect the python3 version from our formula dependencies. + inreplace "configure.ac", + "SR_PKG_CHECK([python3], [SRD_PKGLIBS],", + "SR_PKG_CHECK([python3], [SRD_PKGLIBS], [python-#{py_version}-embed]," + + if build.head? + system "./autogen.sh" + else + system "autoreconf", "--force", "--install", "--verbose" + end + + mkdir "build" do + system "../configure", *std_configure_args, "PYTHON3=#{python}" + system "make", "install" + end + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() { + if (srd_init(NULL) != SRD_OK) { + exit(EXIT_FAILURE); + } + if (srd_exit() != SRD_OK) { + exit(EXIT_FAILURE); + } + return 0; + } + C + flags = shell_output("#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs libsigrokdecode").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libsigsegv.rb b/Formula/lib/libsigsegv.rb new file mode 100644 index 0000000000000..5294f662d43a3 --- /dev/null +++ b/Formula/lib/libsigsegv.rb @@ -0,0 +1,81 @@ +class Libsigsegv < Formula + desc "Library for handling page faults in user mode" + homepage "https://www.gnu.org/software/libsigsegv/" + url "https://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.15.tar.gz" + mirror "https://ftpmirror.gnu.org/libsigsegv/libsigsegv-2.15.tar.gz" + sha256 "036855660225cb3817a190fc00e6764ce7836051bacb48d35e26444b8c1729d9" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "109f995641898a6ada63b7f070483a589a4f5a243a34ef44630ae25afa8191f9" + sha256 cellar: :any, arm64_sonoma: "3fab0c06f901ea4957e99d6e39992d8569278d426413546576d7bd5c843dcee0" + sha256 cellar: :any, arm64_ventura: "1b56220b905ce813aae9891e7007cda1c147070662ee2f30b6cd99b14c996431" + sha256 cellar: :any, sonoma: "baa53f3c9919907d490efbdf703e7c2c8418169aa125a919151ecea253c960e1" + sha256 cellar: :any, ventura: "ef39b7c25ad4d9ba5b4c821341461328cea7b09b782acc2e0dde7e5f90340175" + sha256 cellar: :any_skip_relocation, arm64_linux: "c320840a4390cfe47fc07554df379d4636428b8d910e411b188db01c2c98d5a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c64896be0e57b66fdc9086d93835beaf01f269826d3beaae2d6e4ec14ae2eb3" + end + + head do + url "https://git.savannah.gnu.org/git/libsigsegv.git" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + def install + system "./gitsub.sh", "pull" if build.head? + system "./autogen.sh" if build.head? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--enable-shared" + system "make" + system "make", "check" + system "make", "install" + end + + test do + # Sourced from tests/efault1.c in tarball. + (testpath/"test.c").write <<~C + #include "sigsegv.h" + + #include + #include + #include + #include + #include + + const char *null_pointer = NULL; + static int + handler (void *fault_address, int serious) + { + abort (); + } + + int + main () + { + if (open (null_pointer, O_RDONLY) != -1 || errno != EFAULT) + { + fprintf (stderr, "EFAULT not detected alone"); + exit (1); + } + + if (sigsegv_install_handler (&handler) < 0) + exit (2); + + if (open (null_pointer, O_RDONLY) != -1 || errno != EFAULT) + { + fprintf (stderr, "EFAULT not detected with handler"); + exit (1); + } + + printf ("Test passed"); + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lsigsegv", "-o", "test" + assert_match "Test passed", shell_output("./test") + end +end diff --git a/Formula/lib/libsixel.rb b/Formula/lib/libsixel.rb new file mode 100644 index 0000000000000..abe44315fe437 --- /dev/null +++ b/Formula/lib/libsixel.rb @@ -0,0 +1,34 @@ +class Libsixel < Formula + desc "SIXEL encoder/decoder implementation" + homepage "https://github.com/saitoha/sixel" + url "https://github.com/libsixel/libsixel/archive/refs/tags/v1.10.5.tar.gz" + sha256 "b6654928bd423f92e6da39eb1f40f10000ae2cc6247247fc1882dcff6acbdfc8" + license "MIT" + head "https://github.com/libsixel/libsixel.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "88cbe981c41523b73f930f4016f998766c0cea0c208f7689c784dcfd81fc76fa" + sha256 cellar: :any, arm64_sonoma: "dc6b0e6415de00ff5a57eb6feb5010418cd3d6550b6203daa32a812404d0124c" + sha256 cellar: :any, arm64_ventura: "08aa4abca3775c48d84eba8ce64e94ce4f82dfc115f54b7db1125cb38f0d7bfa" + sha256 cellar: :any, sonoma: "85f135277174340376fb0e6ba6de5804bc017380224411f4ffca4956c6b4512c" + sha256 cellar: :any, ventura: "65e7a29a633dafc3306065c4fea861cedf9a51122f9aa22c3abfd8e3e664547b" + sha256 cellar: :any_skip_relocation, arm64_linux: "93f446a2e99e9751229ad41532799e0f4c40983088c6dd47d026c80270f74541" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afac541b74c1f46fea3c1e2b2c2443e93d769d221d3e512ef9af2a5ce2b292e4" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "jpeg-turbo" + depends_on "libpng" + + def install + system "meson", "setup", "build", "-Dgdk-pixbuf2=disabled", "-Dtests=disabled", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + fixture = test_fixtures("test.png") + system bin/"img2sixel", fixture + end +end diff --git a/Formula/lib/libslax.rb b/Formula/lib/libslax.rb new file mode 100644 index 0000000000000..51f3da2cb6d6d --- /dev/null +++ b/Formula/lib/libslax.rb @@ -0,0 +1,61 @@ +class Libslax < Formula + desc "Implementation of the SLAX language (an XSLT alternative)" + homepage "https://github.com/Juniper/libslax/wiki" + url "https://github.com/Juniper/libslax/releases/download/3.1.2/libslax-3.1.2.tar.gz" + sha256 "ec1a08620201ac27800fc85f36602b5b9d46f8963647fffe8f9269083b677189" + license "BSD-3-Clause" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "1e59fb11b8c40adb7c6fd15f2df4f73fafcdc20ce953f403826ec02dc1f7f285" + sha256 arm64_sonoma: "f5be5c35c3cd534e94cd5025f55aa9ce1b32db6fb456fb91cd54c41e2c8bafc5" + sha256 arm64_ventura: "8cfeabcc8a0ddfd8cfcbed9f4243f27a8aa3da2718b780e61033cb79dc3f04ee" + sha256 sonoma: "c2ecc85e4b73c6572d223a7e3e91fcfecd02bd607910ee419f13c1e86bd11d8d" + sha256 ventura: "c37c90f83539a4b2751407ac83728e91932317619a6288add31e3dbde0555f68" + end + + head do + url "https://github.com/Juniper/libslax.git", branch: "main" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "bison" => :build + depends_on "libtool" => :build + depends_on :macos # needs libxslt built --with-debugger + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "libedit" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + uses_from_macos "sqlite" + + conflicts_with "genometools", because: "both install `bin/gt`" + conflicts_with "libxi", because: "both install `libxi.a`" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", "--enable-libedit", *std_configure_args + system "make", "install" + end + + test do + (testpath/"hello.slax").write <<~EOS + version 1.0; + + match / { + expr "Hello World!"; + } + EOS + + system bin/"slaxproc", "--slax-to-xslt", "hello.slax", "hello.xslt" + assert_path_exists testpath/"hello.xslt" + assert_match "Hello World!", File.read("hello.xslt") + end +end diff --git a/Formula/lib/libslirp.rb b/Formula/lib/libslirp.rb new file mode 100644 index 0000000000000..9e692e6690580 --- /dev/null +++ b/Formula/lib/libslirp.rb @@ -0,0 +1,48 @@ +class Libslirp < Formula + desc "General purpose TCP-IP emulator" + homepage "https://gitlab.freedesktop.org/slirp/libslirp" + url "https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v4.9.0/libslirp-v4.9.0.tar.gz" + sha256 "e744a32767668fe80e3cb3bd75d10d501f981e98c26a1f318154a97e99cdac22" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "41489d3292fc00e715930b65980adb384d23d248904c2a3ea126d6ef62c3328e" + sha256 cellar: :any, arm64_sonoma: "06992c7d810c3352be4d465c5551f37275063b9f927496c88754a4ed70075bea" + sha256 cellar: :any, arm64_ventura: "d67c02807eab2c67b0fa0b6d60bcf945decbd1ec62d9586287d7966d34fb95ec" + sha256 cellar: :any, sonoma: "8729bdd5d982f8b5f61bd9ff63a9f6916040d28fd65a407ed1bc5d8891d0ecf5" + sha256 cellar: :any, ventura: "5a119322dedd978d5d6e269850bf5098d048a150a3689c9024561575a51368c0" + sha256 arm64_linux: "5facd6fada8958aac92e7bff91f897f42f10169c834ff90d964e4bc53a68b6ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "80aef1df64bdf83980438cf320d2c8af65fc395d94a5ada48b97fa81f1a23f41" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "glib" + + def install + system "meson", "setup", "build", "-Ddefault_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 + #include + #include + #include + int main() { + SlirpConfig cfg; + memset(&cfg, 0, sizeof(cfg)); + cfg.version = 1; + cfg.in_enabled = true; + cfg.vhostname = "testServer"; + Slirp* ctx = slirp_new(&cfg, NULL, NULL); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lslirp", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libsm.rb b/Formula/lib/libsm.rb new file mode 100644 index 0000000000000..90e7c45cb92b3 --- /dev/null +++ b/Formula/lib/libsm.rb @@ -0,0 +1,47 @@ +class Libsm < Formula + desc "X.Org: X Session Management Library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libSM-1.2.6.tar.xz" + sha256 "be7c0abdb15cbfd29ac62573c1c82e877f9d4047ad15321e7ea97d1e43d835be" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fcfe468b583f69a170f81760d0b4f3c87c60fcfaa4e3b572cda227ccee5dc255" + sha256 cellar: :any, arm64_sonoma: "8667f1d54feeb12d392f9347e8d9bf18dea2a55fe65a2740ae58ab579b192128" + sha256 cellar: :any, arm64_ventura: "3175340d660c4b58e19c9625cef2479ba0e5b10f73a9f9afc433deb2f46710e0" + sha256 cellar: :any, sonoma: "4b4f15ad71a83a96941c9162bd1fedbaa2889c14558bee37198e8e6c30acb743" + sha256 cellar: :any, ventura: "a06561a9dee2db28337b87ac73fdf1ea55a88c31b3b98534e350b3feeb4c74c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "94ce571df236e9e1d56c3dce8055e0d5c4755eddad55646c263c95505ac07ad2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f1cb49ab246f356b91a633720a6043f3817b654f2933ed72445b2ab2c20a91e" + end + + depends_on "pkgconf" => :build + depends_on "xtrans" => :build + depends_on "libice" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-docs=no + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/SM/SMlib.h" + + int main(int argc, char* argv[]) { + SmProp prop; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libsmi.rb b/Formula/lib/libsmi.rb new file mode 100644 index 0000000000000..c33990328a697 --- /dev/null +++ b/Formula/lib/libsmi.rb @@ -0,0 +1,51 @@ +class Libsmi < Formula + desc "Library to Access SMI MIB Information" + homepage "https://www.ibr.cs.tu-bs.de/projects/libsmi/" + url "https://www.ibr.cs.tu-bs.de/projects/libsmi/download/libsmi-0.5.0.tar.gz" + mirror "https://www.mirrorservice.org/sites/distfiles.macports.org/libsmi/libsmi-0.5.0.tar.gz" + sha256 "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c725754d3" + license all_of: ["TCL", "BSD-3-Clause", "Beerware"] + + livecheck do + url "https://www.ibr.cs.tu-bs.de/projects/libsmi/download/" + regex(/href=.*?libsmi[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "87f549d798e971b862119e43a800b4e647a9e9dd9eab7c6effe0a17277da3acb" + sha256 arm64_sonoma: "338426ca6bd52ced087751e568d7711a5e7fd1bcc6490bb89983bf3dde016749" + sha256 arm64_ventura: "5d7aab3f390daeca40fef88271d3bd76c3ba2cf0fa1ad2866f2adf58d20eb6c2" + sha256 arm64_monterey: "c53376c22e3acb2770cfa6eca3ae698dd5386a8be8ebe4099a47a8fcd73104ae" + sha256 cellar: :any, arm64_big_sur: "608287866cf55d742ebe601ff14e984f39a3e7b11374d461b4dc3e5a41854ca6" + sha256 sonoma: "bfcdbba78e4b03098907e36e11e66d2437951ff5de5e5c7a7c4d06fffb38bb5d" + sha256 ventura: "7e3436eefafddcd7d4d8fd9de4a4cc751d61c84403bcbe5ea9c2d3b0ec741995" + sha256 monterey: "2ef53a0a8b4eb430786f8196c18ab14352968c9377c693d11c44c44df05f1865" + sha256 cellar: :any, big_sur: "5c3ea572911edc5c6beb54b78e34d840dc458d6b0b5f465298fd0fe673f117be" + sha256 cellar: :any, catalina: "1a25b44883bb95940e789ec6395dfa796ec44fd4e0d9ae1ee81a4119fe70ac14" + sha256 cellar: :any, mojave: "507d7f52bd7be5c1cc3170831de43e3ebd5a4312b6eda5d795d7519437016246" + sha256 cellar: :any, high_sierra: "25a31cf7557ddfc1174a932b904d6c96bda4f3c733caf8258edbdef376e99544" + sha256 arm64_linux: "f6d7e9c6409c712b8a8c414ba1ce204963a50731e659c748e8c24993fa175569" + sha256 x86_64_linux: "7c1d475b1062dec302c4022771cbed447f00923a404a1ea131b79796f44d07f5" + 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 + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert_match version.to_s, shell_output("#{bin}/smidiff -V") + end +end diff --git a/Formula/lib/libsndfile.rb b/Formula/lib/libsndfile.rb new file mode 100644 index 0000000000000..4348a8128bb83 --- /dev/null +++ b/Formula/lib/libsndfile.rb @@ -0,0 +1,56 @@ +class Libsndfile < Formula + desc "C library for files containing sampled sound" + homepage "https://libsndfile.github.io/libsndfile/" + url "https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2.tar.xz" + sha256 "3799ca9924d3125038880367bf1468e53a1b7e3686a934f098b7e1d286cdb80e" + license "LGPL-2.1-or-later" + revision 1 + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2d6a8173ef41359c3da4c78a5d5eb402846e480c509b868f671b80a17726f9c4" + sha256 cellar: :any, arm64_sonoma: "b28dda5bedf544be14e36938d2862ef2f3066a34a85158a50d414deb4a9614f2" + sha256 cellar: :any, arm64_ventura: "a8be24e321ff07f12a3cef98ab42868f44fa507b11dab9c93f0f78936baea171" + sha256 cellar: :any, sonoma: "ea6ba9a5dc801a8b736ad39a5e417af93c5d0514ea5a741e92da88d9327a7988" + sha256 cellar: :any, ventura: "3c43fbe437bfd52c5ed12ec4bb3126ca15ffb4c5c189c791ccebf4101d03682a" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba22269018452e319778db8f9dfff4f0ddbab0570bd9f44412cf8ea8cccc517a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b40061adc0ea00923ea38c2c472eccc172e702398c2ddd3c705bf0dd6b16cbed" + end + + depends_on "cmake" => :build + depends_on "flac" + depends_on "lame" + depends_on "libogg" + depends_on "libvorbis" + depends_on "mpg123" + depends_on "opus" + + uses_from_macos "python" => :build, since: :catalina + + def install + args = %W[ + -DBUILD_PROGRAMS=ON + -DENABLE_PACKAGE_CONFIG=ON + -DINSTALL_PKGCONFIG_MODULE=ON + -DBUILD_EXAMPLES=OFF + -DCMAKE_INSTALL_RPATH=#{rpath} + -DPYTHON_EXECUTABLE=#{which("python3")} + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ] + + system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + system "cmake", "-S", ".", "-B", "static", "-DBUILD_SHARED_LIBS=OFF", *args, *std_cmake_args + system "cmake", "--build", "static" + lib.install "static/libsndfile.a" + end + + test do + output = shell_output("#{bin}/sndfile-info #{test_fixtures("test.wav")}") + assert_match "Duration : 00:00:00.064", output + end +end diff --git a/Formula/lib/libsodium.rb b/Formula/lib/libsodium.rb new file mode 100644 index 0000000000000..6e89a868b209c --- /dev/null +++ b/Formula/lib/libsodium.rb @@ -0,0 +1,56 @@ +class Libsodium < Formula + desc "NaCl networking and cryptography library" + homepage "https://libsodium.org/" + url "https://download.libsodium.org/libsodium/releases/libsodium-1.0.20.tar.gz" + sha256 "ebb65ef6ca439333c2bb41a0c1990587288da07f6c7fd07cb3a18cc18d30ce19" + license "ISC" + + livecheck do + url "https://download.libsodium.org/libsodium/releases/" + regex(/href=.*?libsodium[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e8ba0aafe8fe7266d68630ff7ab11d7357af35dbf5113bb648a1e02bed397970" + sha256 cellar: :any, arm64_sonoma: "66835fcd7e4dd8dde5be4e8d34c5314481c1d724e8dd82d4e97059d9fdaf1a45" + sha256 cellar: :any, arm64_ventura: "21b83b95eef039b914d712f4ac5d235d85e1f1143383dfa9c5359f0cc88fa08d" + sha256 cellar: :any, arm64_monterey: "25377f9e16747b9af732be608a966b580287d0854c2d530f23eea1235bca1ff7" + sha256 cellar: :any, sonoma: "ebc452002391195287aef3819c1285ba597bbfe55cb926f18dae5990202afa12" + sha256 cellar: :any, ventura: "5de3b5180b73678d93c4c69a77d662afd6aac0bfd71246be6e78cfacf97cc3d7" + sha256 cellar: :any, monterey: "0556f27feb8d4b5f31edf42e392eb4901daa5b9dbb8510499aa196c9e77134c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a31f0fb4b4c1d89161e49a5f94bef970b0f23068475ef3dc46589d869f52a38" + sha256 cellar: :any_skip_relocation, x86_64_linux: "94394d217dc5a833492a702a8a9e914573a945da13f3b4f42b59f2513835f439" + end + + head do + url "https://github.com/jedisct1/libsodium.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + system "./autogen.sh", "-sb" if build.head? + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "check" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + assert(sodium_init() != -1); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", + "-lsodium", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libsolv.rb b/Formula/lib/libsolv.rb new file mode 100644 index 0000000000000..aa01bf162746d --- /dev/null +++ b/Formula/lib/libsolv.rb @@ -0,0 +1,72 @@ +class Libsolv < Formula + desc "Library for solving packages and reading repositories" + homepage "https://github.com/openSUSE/libsolv" + url "https://github.com/openSUSE/libsolv/archive/refs/tags/0.7.32.tar.gz" + sha256 "8c5957fb417823768d70e0faefa6f75f497f41289641256e4fdfecd1954fa16c" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2bc80f057a12b2a40d26053ae589b9131b16cef68f74493dedaec29e9931a1b6" + sha256 cellar: :any, arm64_sonoma: "3363ee930719a9550a4698243c1c8682a595196bff4842269f1b455ec2361cc7" + sha256 cellar: :any, arm64_ventura: "2033c44f271b189ea8288d7ae870463e7308fe043b9feb14da0a219f5fe40c1f" + sha256 cellar: :any, sonoma: "7fa9db2506a3ca843a326757b4f2febb2fcbc549858a2093c66c62220001991d" + sha256 cellar: :any, ventura: "f7cb370401248e2a75234ccedc928809eca59ed89c25558cc5f3e5af1f3a15c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "abbc5e841babfdde7d81f6eab2f0afc3130dad0793f39b41d170aa78cb4d4aa4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a03fd9145d161285fb486032504b3ef2a6c41a058d29e592534434f8d3ce1fc" + end + + depends_on "cmake" => :build + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "zlib" + + def install + args = %W[ + -DENABLE_STATIC=ON + -DENABLE_SUSEREPO=ON + -DENABLE_COMPS=ON + -DENABLE_HELIXREPO=ON + -DENABLE_DEBIAN=ON + -DENABLE_MDKREPO=ON + -DENABLE_ARCHREPO=ON + -DENABLE_CUDFREPO=ON + -DENABLE_CONDA=ON + -DENABLE_APPDATA=ON + -DMULTI_SEMANTICS=ON + -DENABLE_LZMA_COMPRESSION=ON + -DENABLE_BZIP2_COMPRESSION=ON + -DENABLE_ZSTD_COMPRESSION=ON + -DENABLE_ZCHUNK_COMPRESSION=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.cpp").write <<~CPP + #include + #include + + int main(int argc, char **argv) { + Pool *pool = pool_create(); + + Repo *repo = repo_create(pool, "test"); + + pool_free(pool); + } + CPP + system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lsolv", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libsoundio.rb b/Formula/lib/libsoundio.rb new file mode 100644 index 0000000000000..81805e26b5dce --- /dev/null +++ b/Formula/lib/libsoundio.rb @@ -0,0 +1,47 @@ +class Libsoundio < Formula + desc "Cross-platform audio input and output" + homepage "http://libsound.io/" + url "https://github.com/andrewrk/libsoundio/archive/refs/tags/2.0.1-7.tar.gz" + sha256 "941f1347dabab02c88ef57e225b04587c3f69824e550e1045e4a9119cd657a4e" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "120bc6b9f88b42a4bd852c1ebe9d236d94d40edae13e06cec4906905347580ee" + sha256 cellar: :any, arm64_sonoma: "74d5dc6d43cb2ef587a861a8b784ec6134c86f73149645c653b5542c3a0941b6" + sha256 cellar: :any, arm64_ventura: "700fd8255a363e2e28aa5b801c4e3218bab3a78f0c37f16dfa60f0e2337146a1" + sha256 cellar: :any, arm64_monterey: "9726d67b4c9b83077d508a64067df3eb96f87dd731a3cb08395a68dbb2234d88" + sha256 cellar: :any, sonoma: "fd982bcdc2ab3d9ec3e0a714295a41d1568a51a6f050d01314bbb9822505549a" + sha256 cellar: :any, ventura: "d7edd4161e6b2ce4eb239cacd3264a23aa8c9a6cd89683f0a6bd96b757120672" + sha256 cellar: :any, monterey: "997f4179c3fbde9beb699106367d0c944d3ddbb9fbd5c4744cb31e6f7f1ba72b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f30bc80b540e0150e47fd34157068ccd2734dcdcfa4a9f90768a1d4e9fb00213" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e1b9e90eb51ce8918bf817febf0bf785da0941cb793a430e8299492bdaafa4d" + 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 + (testpath/"test.c").write <<~C + #include + + int main() { + struct SoundIo *soundio = soundio_create(); + + if (!soundio) { return 1; } + if (soundio_connect(soundio)) return 1; + + soundio_flush_events(soundio); + soundio_destroy(soundio); + + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lsoundio", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libsoup.rb b/Formula/lib/libsoup.rb new file mode 100644 index 0000000000000..d01ffb2e6c8ea --- /dev/null +++ b/Formula/lib/libsoup.rb @@ -0,0 +1,76 @@ +class Libsoup < Formula + desc "HTTP client/server library for GNOME" + homepage "https://wiki.gnome.org/Projects/libsoup" + url "https://download.gnome.org/sources/libsoup/3.6/libsoup-3.6.5.tar.xz" + sha256 "6891765aac3e949017945c3eaebd8cc8216df772456dc9f460976fbdb7ada234" + license "LGPL-2.0-or-later" + + bottle do + sha256 arm64_sequoia: "9347047d84f194d6079f4a42bd07a493182bff757bcd099498d344f608996b68" + sha256 arm64_sonoma: "3524cbb252af5c9cc9b39cb0ff9733d2130be70e264339c926189564c121b82d" + sha256 arm64_ventura: "7af02d6ee61baf7463f21b0261430cccb10bc72102a3bad27be16c5f74173c57" + sha256 sonoma: "3be670d505dedb3a71e0b9617e4c0b8096cafcf70486a3657c38f02f0502f28e" + sha256 ventura: "430c7a028fbcc2239b1213faec338814bf055c037a4cfc22828a0ab3e3edc245" + sha256 arm64_linux: "dc576162b656fc666022b3a276dda763823e13fed31e7da72b5189602460f2da" + sha256 x86_64_linux: "426c2decb12e1fc035d9f50477a173fa04625cd1e3895dbf04cecce15aefe3a3" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.13" => :build + depends_on "vala" => :build + + depends_on "glib" + depends_on "glib-networking" + depends_on "gnutls" + depends_on "libnghttp2" + depends_on "libpsl" + depends_on "sqlite" + + uses_from_macos "krb5" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "brotli" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + # if this test start failing, the problem might very well be in glib-networking instead of libsoup + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + SoupMessage *msg = soup_message_new(SOUP_METHOD_GET, "https://brew.sh/"); + SoupSession *session = soup_session_new(); + GError *error = NULL; + GBytes *bytes = soup_session_send_and_read(session, msg, NULL, &error); // blocks + + if(error) { + g_error_free(error); + return 1; + } + + g_object_unref(msg); + g_object_unref(session); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libsoup-3.0").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libsoup@2.rb b/Formula/lib/libsoup@2.rb new file mode 100644 index 0000000000000..9b7fbdbbf655a --- /dev/null +++ b/Formula/lib/libsoup@2.rb @@ -0,0 +1,72 @@ +class LibsoupAT2 < Formula + desc "HTTP client/server library for GNOME" + homepage "https://wiki.gnome.org/Projects/libsoup" + url "https://download.gnome.org/sources/libsoup/2.74/libsoup-2.74.3.tar.xz" + sha256 "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13" + license "LGPL-2.0-or-later" + + bottle do + sha256 arm64_sequoia: "93cc36e0aca55d8d3ad613e40d4c4f870792d544472236eaa4e2007e8bdccdd7" + sha256 arm64_sonoma: "30cc853c0df1b294a5bb54f4224c01892dd8a227eef2b2f9db4525ee5660dda3" + sha256 arm64_ventura: "2a309b1eccf23b179e5812c98df8d8fcb377cf5af35dd1e3cd4c88e23d1fa852" + sha256 sonoma: "10bcbb15d4a0c105a32894d3211d54a57a69e16296ccd59e6374002c33be6bb2" + sha256 ventura: "848cd63411742567dad48774cd56f9f3d2091a115e2a9cc803021af250e91c6f" + sha256 arm64_linux: "f894a1f3fae10a780ec0a489cc4c84636f792c6013337c3d07f50e6af02303a2" + sha256 x86_64_linux: "128d3fa437db9352c8c33b6937083fbb708ddd23566b957b243e9cee2debab16" + end + + keg_only :versioned_formula + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.13" => :build + depends_on "vala" => :build + + depends_on "glib" + depends_on "glib-networking" + depends_on "gnutls" + depends_on "libpsl" + depends_on "sqlite" + + uses_from_macos "krb5" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "brotli" + end + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + # if this test start failing, the problem might very well be in glib-networking instead of libsoup + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + SoupMessage *msg = soup_message_new("GET", "https://brew.sh/"); + SoupSession *session = soup_session_new(); + soup_session_send_message(session, msg); // blocks + g_assert_true(SOUP_STATUS_IS_SUCCESSFUL(msg->status_code)); + g_object_unref(msg); + g_object_unref(session); + return 0; + } + C + + ENV.prepend_path "PKG_CONFIG_PATH", lib/"pkgconfig" + flags = shell_output("pkgconf --cflags --libs libsoup-2.4").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libsoxr.rb b/Formula/lib/libsoxr.rb new file mode 100644 index 0000000000000..fd0d74c361b19 --- /dev/null +++ b/Formula/lib/libsoxr.rb @@ -0,0 +1,66 @@ +class Libsoxr < Formula + desc "High quality, one-dimensional sample-rate conversion library" + homepage "https://sourceforge.net/projects/soxr/" + url "https://downloads.sourceforge.net/project/soxr/soxr-0.1.3-Source.tar.xz" + sha256 "b111c15fdc8c029989330ff559184198c161100a59312f5dc19ddeb9b5a15889" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/soxr[._-]v?(\d+(?:\.\d+)+)(?:-Source)?\.t}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "164c5e70f213a0cdd5b9a764da773e79bc35753efc54d46e0710aee172de3640" + sha256 cellar: :any, arm64_sonoma: "baddfdda71b784b3d94f84e9f7a1b8bcfec59762baddf9e3ccc67c19fb41cee0" + sha256 cellar: :any, arm64_ventura: "458c15f8d4dbe92d51959fd62662b275475c36f379581385681975fbba90c8f1" + sha256 cellar: :any, arm64_monterey: "dd14558c84be8ea6b19408a9e3c59cb273b19334fb59220e8681315507d867ed" + sha256 cellar: :any, arm64_big_sur: "cf7ef980c9553756fa4b267b52e940566dc07b9aecbfea49180dbb2ebdeb433a" + sha256 cellar: :any, sonoma: "00d2a5318828b9120aaa460510b5d23edee43f1e5db04cf74ba12a3908642d3c" + sha256 cellar: :any, ventura: "530b083606fb1bd4801d7364ba55607304c5c89696d82dcc8a7a5482d73f192c" + sha256 cellar: :any, monterey: "f1a61556ee8195d611cdf735cad6f36a841cf8ef66fe5e49030b8932cd73033d" + sha256 cellar: :any, big_sur: "616e7ec0eac9aa1322b9c32a1e2ba71ce18c36ee9cbfc854b43c77153006c142" + sha256 cellar: :any, catalina: "6fc775411464312fe93dff80cf50497d7b412b36c8115eaa91fe65c321da755e" + sha256 cellar: :any, mojave: "ddd19b9146079827cd9065afe6853961e8b0d0857f5a06888efc500a25f087e6" + sha256 cellar: :any, high_sierra: "808ad13bdf13729d2f7e881c34b267bcd6598838d4f47d0dcf5ca5e38ba5db9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "41860cff8cb688bff751be3d79c39e2dff0c0be2e2196b700386aca27b65769b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1753c0562a6494e1437dc79db88d4672bb4b2e2a2b9134ac85952b555baf8559" + end + + depends_on "cmake" => :build + + # Fixes the build on 64-bit ARM macOS; the __arm__ define used in the + # code isn't defined on 64-bit Apple Silicon. + # Upstream pull request: https://sourceforge.net/p/soxr/code/merge-requests/5/ + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/76868b36263be42440501d3692fd3a258f507d82/libsoxr/arm64_defines.patch" + sha256 "9df5737a21b9ce70cc136c302e195fad9f9f6c14418566ad021f14bb34bb022c" + 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() + { + char const *version = 0; + version = soxr_version(); + if (version == 0) + { + return 1; + } + return 0; + } + C + + system ENV.cc, "-L#{lib}", "test.c", "-lsoxr", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libspatialite.rb b/Formula/lib/libspatialite.rb new file mode 100644 index 0000000000000..481543f354832 --- /dev/null +++ b/Formula/lib/libspatialite.rb @@ -0,0 +1,89 @@ +class Libspatialite < Formula + desc "Adds spatial SQL capabilities to SQLite" + homepage "https://www.gaia-gis.it/fossil/libspatialite/index" + license any_of: ["MPL-1.1", "GPL-2.0-or-later", "LGPL-2.1-or-later"] + revision 1 + + stable do + url "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-5.1.0.tar.gz" + mirror "https://ftp.netbsd.org/pub/pkgsrc/distfiles/libspatialite-5.1.0.tar.gz" + mirror "https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/libspatialite-5.1.0.tar.gz" + sha256 "43be2dd349daffe016dd1400c5d11285828c22fea35ca5109f21f3ed50605080" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + livecheck do + url "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/" + regex(/href=.*?libspatialite[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "cd162e7a36e33bc982374bc2e8efced6d1669810852c6bef404967dc7507eefa" + sha256 cellar: :any, arm64_sonoma: "efd80614ae13d20ae2af905b7b6a673455d5d281e14e75e6511d1d4a1fdeda8d" + sha256 cellar: :any, arm64_ventura: "1a05eb0afc04b80535b62c3f6c602ed5ef6f7eaed37cf7bc940bf4539dab1753" + sha256 cellar: :any, arm64_monterey: "2222ce79b7ac80c9d858390e201da7a3bae3fb432e363b358c943171cfe0294b" + sha256 cellar: :any, sonoma: "1f29fd1ce9216f960a3e22279b67cd0411ca3694160f6c5c0c769524dfa57567" + sha256 cellar: :any, ventura: "a45dd6acc0e93aa02176b73e0ff7ed57ac6c020e6a72538d16cbdd67c19a4012" + sha256 cellar: :any, monterey: "1bff63a0b2139edfa2d2df74870f98d6dba930d840973b6b523c1405e33c0279" + sha256 cellar: :any_skip_relocation, arm64_linux: "d86a5e1a777cceebc9eb059098c75d53d2fc0597c6b0e09799c9a66fc9ff4f74" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5fbfff96039dfc137d483a59d19c45d97c57c461570073f7005c602edf8f356" + end + + head do + url "https://www.gaia-gis.it/fossil/libspatialite", using: :fossil + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "freexl" + depends_on "geos" + depends_on "librttopo" + depends_on "libxml2" + depends_on "minizip" + depends_on "proj" + depends_on "sqlite" + uses_from_macos "zlib" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + + # New SQLite3 extension won't load via SELECT load_extension("mod_spatialite"); + # unless named mod_spatialite.dylib (should actually be mod_spatialite.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'" + chmod 0755, "configure" + + # Ensure Homebrew's libsqlite is found before the system version. + sqlite = Formula["sqlite"] + ENV.append "LDFLAGS", "-L#{sqlite.opt_lib}" + ENV.append "CFLAGS", "-I#{sqlite.opt_include}" + + args = %W[ + --with-sysroot=#{HOMEBREW_PREFIX} + --enable-geocallbacks + --enable-rttopo=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, *std_configure_args + system "make", "install" + end + + test do + # Verify mod_spatialite extension can be loaded using Homebrew's SQLite + pipe_output("#{Formula["sqlite"].opt_bin}/sqlite3", + "SELECT load_extension('#{opt_lib}/mod_spatialite');") + end +end diff --git a/Formula/lib/libspectre.rb b/Formula/lib/libspectre.rb new file mode 100644 index 0000000000000..7209fcd298813 --- /dev/null +++ b/Formula/lib/libspectre.rb @@ -0,0 +1,52 @@ +class Libspectre < Formula + desc "Small library for rendering Postscript documents" + homepage "https://wiki.freedesktop.org/www/Software/libspectre/" + url "https://libspectre.freedesktop.org/releases/libspectre-0.2.12.tar.gz" + sha256 "55a7517cd3572bd2565df0cf450944a04d5273b279ebb369a895391957f0f960" + license "GPL-2.0-or-later" + revision 2 + + livecheck do + url "https://libspectre.freedesktop.org/releases/" + regex(/href=.*?libspectre[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "d9e00969398b5ccd244aed543e3a6468f56e07dbc1939d7bde6b4b9d19701001" + sha256 cellar: :any, arm64_sonoma: "c7ff644160fb7011b2eeba6c07102db37b587c1f80631f4f2abdd81dbe476dcf" + sha256 cellar: :any, arm64_ventura: "aac4fe3f1a81468053f6652fd67dec5416b759b86060a5e62cb804f5ed4bb6a2" + sha256 cellar: :any, sonoma: "ef295c014933eb73252356d5f6ef9fcbadacf864fb02335c232f3f109d9c1733" + sha256 cellar: :any, ventura: "5c11e5bf8c575510008c9d7f3cb0cd540d35897521a70d81fb30eb0099bbf658" + sha256 cellar: :any_skip_relocation, arm64_linux: "826f5672b813a31c1d4b8ca84c8f32adcaf053bd46773446df2080ba0352c6d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "749030918fe30fbba3b0332ad978765f638c0ce4b1a79b26cf8a632c10631cb4" + end + + depends_on "ghostscript" + + def install + ENV.append "CFLAGS", "-I#{Formula["ghostscript"].opt_include}/ghostscript" + ENV.append "LIBS", "-L#{Formula["ghostscript"].opt_lib}" + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char *argv[]) { + const char *text = spectre_status_to_string(SPECTRE_STATUS_SUCCESS); + return 0; + } + C + flags = %W[ + -I#{include} + -L#{lib} + -lspectre + ] + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libspelling.rb b/Formula/lib/libspelling.rb new file mode 100644 index 0000000000000..0f8432864d599 --- /dev/null +++ b/Formula/lib/libspelling.rb @@ -0,0 +1,63 @@ +class Libspelling < Formula + desc "Spellcheck library for GTK 4" + homepage "https://gitlab.gnome.org/GNOME/libspelling" + url "https://gitlab.gnome.org/GNOME/libspelling/-/archive/0.4.8/libspelling-0.4.8.tar.bz2" + sha256 "dadd7bfc58511b85f966570b6f241ae1c695986746daa634de4a2d856886ae18" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_sequoia: "fbe0fcc807920d739d6b3b0afd3112b3a630e9c16901bf26d6e98534a142635e" + sha256 arm64_sonoma: "9b31165f047196455a03540f285194ca480c092911a989fdb340c1d72d19767b" + sha256 arm64_ventura: "d97661610524135c0a5e23ab946808993d381ca57e4d476d149b7913a2157659" + sha256 sonoma: "13105682dc441454d57022ce6bd4940fc74eca98f945da256c4bf09187917883" + sha256 ventura: "3e5a4bd47a10a9e420a7ec1fdc748267f92f39d4018088833bbd661f99955a75" + sha256 arm64_linux: "6f4fc941b83f8f5a99a14bb7e1777087ebcf90fc35cd5c7c24ddbb41b50e43b7" + sha256 x86_64_linux: "2e9d4e21d39f5c8ae6d02a0e0897896dd2edf618561c85a30409fdcab7ed0bde" + 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 "enchant" + depends_on "glib" + depends_on "gtk4" + depends_on "gtksourceview5" + depends_on "icu4c@77" + depends_on "pango" + + on_macos do + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "graphene" + depends_on "harfbuzz" + end + + on_linux do + depends_on "sysprof" + end + + def install + system "meson", "setup", "build", "-Ddocs=false", "-Dsysprof=#{OS.linux?}", *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[]) { + SpellingChecker *checker = spelling_checker_get_default(); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libspelling-1").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libspelling@0.2.rb b/Formula/lib/libspelling@0.2.rb new file mode 100644 index 0000000000000..1c92755856c73 --- /dev/null +++ b/Formula/lib/libspelling@0.2.rb @@ -0,0 +1,65 @@ +class LibspellingAT02 < Formula + desc "Spellcheck library for GTK 4" + homepage "https://gitlab.gnome.org/GNOME/libspelling" + url "https://gitlab.gnome.org/GNOME/libspelling/-/archive/0.2.1/libspelling-0.2.1.tar.bz2" + sha256 "5393a9b93fda445598348a47c42d1ad13586c0bcf35dfd257afd613fd31812c1" + license "LGPL-2.1-or-later" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "2743f798c8a8ab3afa19842bdddb996e868736ec1d95b324e18994b987625773" + sha256 cellar: :any, arm64_sonoma: "87bcb552532a3c890664a0b16a858ff766f49fc595ced5b8a5c387da2e3c4ce3" + sha256 cellar: :any, arm64_ventura: "3fd146874edb16cefef9b8b2288fdcfbe0ef6811ee8e2d87635e6eb13acb2eb2" + sha256 cellar: :any, sonoma: "00d924b8e7f5cd27fbbe087e60a343c5a10617ac99d3605340eac21d0e31c171" + sha256 cellar: :any, ventura: "611812775575e4302a6612301a51d6036dc14dbbd4c031d848446e89219f08c5" + sha256 arm64_linux: "40fee8eb0750567f7e799007e4961a924b9139d469a65608528a7a1396392698" + sha256 x86_64_linux: "624143b2d621071b4239dbdf74b9adde6f7da4a8cbc42742bdee7435fd187749" + end + + keg_only :versioned_formula + + deprecate! date: "2025-01-11", because: :versioned_formula + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "vala" => :build + + depends_on "enchant" + depends_on "glib" + depends_on "gtk4" + depends_on "gtksourceview5" + depends_on "icu4c@77" + depends_on "pango" + + on_macos do + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "graphene" + depends_on "harfbuzz" + end + + def install + system "meson", "setup", "build", "-Ddocs=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[]) { + SpellingChecker *checker = spelling_checker_get_default(); + return 0; + } + C + + ENV.prepend_path "PKG_CONFIG_PATH", lib/"pkgconfig" + flags = shell_output("pkgconf --cflags --libs libspelling-1").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libspiro.rb b/Formula/lib/libspiro.rb new file mode 100644 index 0000000000000..60a0bcf31fc4a --- /dev/null +++ b/Formula/lib/libspiro.rb @@ -0,0 +1,65 @@ +class Libspiro < Formula + desc "Library to simplify the drawing of curves" + homepage "https://github.com/fontforge/libspiro" + url "https://github.com/fontforge/libspiro/releases/download/20240903/libspiro-dist-20240903.tar.gz" + sha256 "1412a21b943c6e1db834ee2d74145aad20b3f62b12152d475613b8241d9cde10" + license "GPL-3.0-or-later" + version_scheme 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "ca6d88ca75e54af10d0342111a00a6bb3d2f6b5b80504a97d354c6b93ac114b9" + sha256 cellar: :any, arm64_sonoma: "e7631acf319b2660d2ae284cb33084fd3eadcd99311192ef8fea522929e7868a" + sha256 cellar: :any, arm64_ventura: "177d17bb91576650898dbdcc8de1676d83fb65131a0b5cf9b1972ab0b59d5503" + sha256 cellar: :any, arm64_monterey: "ef628c12ea5473facb76eba3200e60d71a3ef1282625bb876caabe6d85448df9" + sha256 cellar: :any, sonoma: "993047020b74cfc6c22f4b7f6ccc71d177b76b0804729cdcc03af63ac5d9ffd0" + sha256 cellar: :any, ventura: "92806cce5c7b5384bdbf277025d4b2b92bf9934b0c689f480bd4af25312fbf34" + sha256 cellar: :any, monterey: "559b51f880b7392ceef800f586bdb5a0bca48dd2c1da24cde626f7a2b7d647e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "b086a99529c5a1725d4b5381f1f3f8ea34167db13247dfe0612f97deeef8f4df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "27ecaaf681b49db47d118fe90a1fe0b9600dceb7b95f770233d8a218a67fe438" + end + + head do + url "https://github.com/fontforge/libspiro.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + if build.head? + system "autoreconf", "--force", "--install", "--verbose" + system "automake" + end + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + void moveto(bezctx *bc, double x, double y, int open) {} + void lineto(bezctx *bc, double x, double y) {} + void quadto(bezctx *bc, double x1, double y1, double x2, double y2) {} + void curveto(bezctx *bc, double x1, double y1, double x2, double y2, double x3, double t3) {} + void markknot(bezctx *bc, int knot) {} + + int main() { + int done; + bezctx bc = {moveto, lineto, quadto, curveto, markknot}; + spiro_cp path[] = { + {-100, 0, SPIRO_G4}, {0, 100, SPIRO_G4}, + {100, 0, SPIRO_G4}, {0, -100, SPIRO_G4} + }; + + SpiroCPsToBezier1(path, sizeof(path)/sizeof(spiro_cp), 1, &bc, &done); + return done == 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lspiro", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libspnav.rb b/Formula/lib/libspnav.rb new file mode 100644 index 0000000000000..821e1f1b0402e --- /dev/null +++ b/Formula/lib/libspnav.rb @@ -0,0 +1,44 @@ +class Libspnav < Formula + desc "Client library for connecting to 3Dconnexion's 3D input devices" + homepage "https://spacenav.sourceforge.net/" + url "https://github.com/FreeSpacenav/libspnav/releases/download/v1.2/libspnav-1.2.tar.gz" + sha256 "093747e7e03b232e08ff77f1ad7f48552c06ac5236316a5012db4269951c39db" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a7843164737d207e0440e5284516dc5c77f52283a2a93151460d7a0c6ad7a271" + sha256 cellar: :any, arm64_sonoma: "c558c47488603645fff95ff479a3b52c28d1f96d5d774142c65f58735dac31e2" + sha256 cellar: :any, arm64_ventura: "86fcbcb81651468778b50817d02e5eb4b870ae5974b9c997675c238293549734" + sha256 cellar: :any, sonoma: "2930ff1e49f96695150603db974beaa4b731d8593e25c30378d3b10dc484a94f" + sha256 cellar: :any, ventura: "6e94c48a7c3a4a183efec643f50147e9172d25d78278557a830ad08df5f99071" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fff8d5004804ef7849dd0541b461af209fcd8a96645cc0461e74847a34788c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e770b50e19f7cdd6992eaea4a8595e6690074854396f371169787f5609a47d75" + end + + def install + args = %W[ + --disable-debug + --disable-dependency-tracking + --disable-silent-rules + --prefix=#{prefix} + --disable-x11 + ] + + system "./configure", *args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + + int main() { + bool connected = spnav_open() != -1; + if (connected) spnav_close(); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lspnav", "-lm", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libspng.rb b/Formula/lib/libspng.rb new file mode 100644 index 0000000000000..7909e02ba3952 --- /dev/null +++ b/Formula/lib/libspng.rb @@ -0,0 +1,45 @@ +class Libspng < Formula + desc "C library for reading and writing PNG format files" + homepage "https://libspng.org/" + url "https://github.com/randy408/libspng/archive/refs/tags/v0.7.4.tar.gz" + sha256 "47ec02be6c0a6323044600a9221b049f63e1953faf816903e7383d4dc4234487" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "dc994f773c7bb0e13fcddb6ceda95f38d0aa0cac86ee883da34e90bf38d7ba39" + sha256 cellar: :any, arm64_sonoma: "172505ff5448c82fbdb5572865635db579c938aa58af45385606be5b949ff87e" + sha256 cellar: :any, arm64_ventura: "75bd64679f3a4c3983c71dddde8346ed9e792f999e28fe8d5f3bf0b08b905e43" + sha256 cellar: :any, arm64_monterey: "5379a4c948c514c3800c321df890d709ee4e6e0676c4efd786231507fc9ffeb2" + sha256 cellar: :any, arm64_big_sur: "ce086dec03a0d2fdb36c033db18393be5e789a0f8586594f624d39ddd263d9f7" + sha256 cellar: :any, sonoma: "40fbad3037a97c742a4e7c51db7903767e5b6c439f2344230d9091367e8ff63e" + sha256 cellar: :any, ventura: "c76aaaf78c156d1ff0af19e0219c159a2da0e3134c3fb936057b566f6e10e9d5" + sha256 cellar: :any, monterey: "fdcbf11ea62d2dcbb6aaa56dd9f7f1b162c592de5a7301c09976ebb2113e217e" + sha256 cellar: :any, big_sur: "2f1bee0c91bf53b0289d067a93dfe45896f8f979914486c08e264571b82e2d91" + sha256 arm64_linux: "64efbd30e15ac3ce66bd2f493973aaa3a56229859de2fe3227f824c36175acc5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a77bbbc2800f350812338cb58d7a588f33fd2a7bac3eb0e2be6c7acfb3687f2" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + uses_from_macos "zlib" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + + pkgshare.install "examples/example.c" + end + + test do + fixture = test_fixtures("test.png") + cp pkgshare/"example.c", testpath/"example.c" + system ENV.cc, "example.c", "-L#{lib}", "-I#{include}", "-lspng", "-o", "example" + + output = shell_output("./example #{fixture}") + assert_match "width: 8\nheight: 8\nbit depth: 1\ncolor type: 3 - indexed color\n" \ + "compression method: 0\nfilter method: 0\ninterlace method: 0", output + end +end diff --git a/Formula/lib/libsql.rb b/Formula/lib/libsql.rb new file mode 100644 index 0000000000000..294835c34c112 --- /dev/null +++ b/Formula/lib/libsql.rb @@ -0,0 +1,42 @@ +class Libsql < Formula + desc "Fork of SQLite that is both Open Source, and Open Contributions" + homepage "https://turso.tech/libsql" + url "https://github.com/tursodatabase/libsql/releases/download/libsql-server-v0.24.32/source.tar.gz" + sha256 "51e2b4e99b4a713093d2cd6b69b155ba377d2b1d879744c6dab41f443f01fde8" + license "MIT" + head "https://github.com/tursodatabase/libsql.git", branch: "main" + + livecheck do + url :stable + regex(/^libsql-server-v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ae2710fb12075ded23dd2ea2d2ec1dc0467220fe060dee858bd299324c3a3884" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d7d4b6a08383ceaf9a4809fe3a7bb2be845a4ee2bf8e7021407727b9426729d6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4e6e55398c20c81a0cb5072bf356588ee58f45cb543ada643b3750852451c1c3" + sha256 cellar: :any_skip_relocation, sonoma: "c16ab098a60b2e0a66ff82e8c92597e20570cf503f247e638b8b06bc26411052" + sha256 cellar: :any_skip_relocation, ventura: "5e2df5e5e206bcfe1e71f1df32bef095dddf1c721f1905749b966c6cfc295568" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9a96d1dee81947a700075f5194f2eae3fab4ff392b04e7ca610ef2cece553f2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f08c9c294fffcfb7ea6ab60f148db2bd59386dc1b748f5b394d045639d8fd44" + end + + depends_on "rust" => :build + + def install + ENV["RUSTFLAGS"] = "--cfg tokio_unstable" + system "cargo", "install", *std_cargo_args(path: "libsql-server") + end + + test do + pid = spawn(bin/"sqld") + sleep 2 + sleep 3 if OS.mac? && Hardware::CPU.intel? + assert_path_exists testpath/"data.sqld" + + assert_match version.to_s, shell_output("#{bin}/sqld --version") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end +end diff --git a/Formula/lib/libsquish.rb b/Formula/lib/libsquish.rb new file mode 100644 index 0000000000000..51ebf10c41c32 --- /dev/null +++ b/Formula/lib/libsquish.rb @@ -0,0 +1,52 @@ +class Libsquish < Formula + desc "Library for compressing images with the DXT standard" + homepage "https://sourceforge.net/projects/libsquish/" + url "https://downloads.sourceforge.net/project/libsquish/libsquish-1.15.tgz" + sha256 "628796eeba608866183a61d080d46967c9dda6723bc0a3ec52324c85d2147269" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "e8c9dcc536fed98d8b68dc6187b2ccbd47dd3fc08d4590811ca605c4ff6c6a39" + sha256 cellar: :any, arm64_sonoma: "0beb47e5cedce2bc7f35e15f7e5c87033abdf5e03967c9501b2ecb3c736aacb3" + sha256 cellar: :any, arm64_ventura: "7bd2ea5005e2f7df26fa4e2a4e3cfee9ed35632abc8df40134ec09b23a58a466" + sha256 cellar: :any, arm64_monterey: "a63fe0fd24c9446e06649595928249487026ed7b2c3b48131bfe31bc0cae0d9e" + sha256 cellar: :any, arm64_big_sur: "7ef2623fe17562ebea99fd2ebed7e15d70e29a54071d3f573dee0880c206fb01" + sha256 cellar: :any, sonoma: "016119dad4873f71b06982f17b09b4cc7cf4f6f9ed142ca97cbcee98cd55ca2a" + sha256 cellar: :any, ventura: "81f54cd573ed8d41a76319d89d4a4576ac3ce1f2acb7749daed4df249dc4bf9d" + sha256 cellar: :any, monterey: "8ac755fd247f50e6c82c3463a33fcab97ca76d0ee5935ce2277820f93074a694" + sha256 cellar: :any, big_sur: "592d8697fad360a07cd1492666f93eaf4542cc78454d57a9748290ed634a91c0" + sha256 cellar: :any, catalina: "44cffe8e418149d4e95af569edbe291e8f9ac85acb3458ac2ca78a8fe89fcffe" + sha256 cellar: :any_skip_relocation, arm64_linux: "63bb6480b01645c86ebb55dec9a855fe1f4510b3c9dbb4ca88a73b1dd767c9dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6e24859a5f1a100ae9c5bb157ca24ae3740d8ef2f3dc22cde3d138bd99e534c" + end + + depends_on "cmake" => :build + + def install + # Static and shared libraries have to be built using separate calls to cmake. + args = [] + args << "-DBUILD_SQUISH_WITH_SSE2=OFF" if Hardware::CPU.arm? + system "cmake", "-S", ".", "-B", "build_static", *std_cmake_args, *args + system "cmake", "--build", "build_static" + lib.install "build_static/libsquish.a" + + args << "-DBUILD_SHARED_LIBS=ON" + system "cmake", "-S", ".", "-B", "build_shared", *std_cmake_args, *args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include + int main(void) { + printf("%d", GetStorageRequirements(640, 480, squish::kDxt1)); + return 0; + } + CPP + system ENV.cxx, "-o", "test", "test.cc", "-L#{lib}", "-lsquish" + assert_equal "153600", shell_output("./test") + end +end diff --git a/Formula/lib/libssh.rb b/Formula/lib/libssh.rb new file mode 100644 index 0000000000000..f392a671a0b95 --- /dev/null +++ b/Formula/lib/libssh.rb @@ -0,0 +1,55 @@ +class Libssh < Formula + desc "C library SSHv1/SSHv2 client and server protocols" + homepage "https://www.libssh.org/" + url "https://www.libssh.org/files/0.11/libssh-0.11.1.tar.xz" + sha256 "14b7dcc72e91e08151c58b981a7b570ab2663f630e7d2837645d5a9c612c1b79" + license "LGPL-2.1-or-later" + head "https://git.libssh.org/projects/libssh.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ef7a07e8b469c92123e7b81ee8356820e1e6866d8e05b278cdd544d1c7d4bf97" + sha256 cellar: :any, arm64_sonoma: "0a6184ee3bcd7d1ef5deb30a1534d04a90ba4f6070eddd5a05fe75b9acc20ea1" + sha256 cellar: :any, arm64_ventura: "9de46491d931e959172d96481de25cae970c55d2b5212a8fae8224208940c42d" + sha256 cellar: :any, arm64_monterey: "a9f3409bf9da4337393b2594157adf571c6c3fd5d421de079fb1bcf544a1a16d" + sha256 cellar: :any, sonoma: "371ed72cfece039f5abec57b2c2f4a0c2782a0df85a9eab622df75ebcd28c63e" + sha256 cellar: :any, ventura: "09014e85c296ec5452ea0958b8169b5d0eee8534b6f4b7f1bdc6055dfb35607f" + sha256 cellar: :any, monterey: "8efb6ef891e6c9d2e9f7f1086d91663bcc54a4e6dec3a4c212f993ffc4a0abca" + sha256 cellar: :any_skip_relocation, arm64_linux: "3fffddb8d6a9c20bc983e6bc892cbeb196cdcf426458608688024a3951b3145f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b711f58f15aad1d605cbecba2cc82d3375fdc422b9938c890f5a57c35918ed3" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + args = %w[ + -DBUILD_STATIC_LIB=ON + -DWITH_SYMBOL_VERSIONING=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + lib.install "build/src/libssh.a" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + ssh_session my_ssh_session = ssh_new(); + if (my_ssh_session == NULL) + exit(-1); + ssh_free(my_ssh_session); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lssh" + system "./test" + end +end diff --git a/Formula/lib/libssh2.rb b/Formula/lib/libssh2.rb new file mode 100644 index 0000000000000..f26de4233da2e --- /dev/null +++ b/Formula/lib/libssh2.rb @@ -0,0 +1,65 @@ +class Libssh2 < Formula + desc "C library implementing the SSH2 protocol" + homepage "https://libssh2.org/" + url "https://libssh2.org/download/libssh2-1.11.1.tar.gz" + mirror "https://github.com/libssh2/libssh2/releases/download/libssh2-1.11.1/libssh2-1.11.1.tar.gz" + mirror "http://download.openpkg.org/components/cache/libssh2/libssh2-1.11.1.tar.gz" + sha256 "d9ec76cbe34db98eec3539fe2c899d26b0c837cb3eb466a56b0f109cabf658f7" + license "BSD-3-Clause" + + livecheck do + url "https://libssh2.org/download/" + regex(/href=.*?libssh2[._-]v?(\d+(?:\.\d+)+)\./i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "4fd55e8973a9454001ac289972767ca8927f3639aa44715aa1e9ba81c3712245" + sha256 cellar: :any, arm64_sonoma: "2e6ffae575cf6e8335026f209f24c8a12250afa093e7a49577ee95c3bb781554" + sha256 cellar: :any, arm64_ventura: "f1a9194b318669ded3d72a045c1cc30b4ce53dcb23a0b5953910f6dcd341522b" + sha256 cellar: :any, sonoma: "092a33680301532d2ba966e85b3316198d65891a0aa6211d616575cc82bbd09f" + sha256 cellar: :any, ventura: "b34913dfb88d186400ec06e9beff6d81824c082c5920c88737df980ca9b602b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "583976433ceba6667dec4452c6533fe4c10d0343b082ac683cd1b8407cbf76fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a307208b03d0761f7ea8c53a322ea09b0a60db96e3ef8688df6adec92b45ca5b" + end + + head do + url "https://github.com/libssh2/libssh2.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + args = %W[ + --disable-silent-rules + --disable-examples-build + --with-openssl + --with-libz + --with-libssl-prefix=#{Formula["openssl@3"].opt_prefix} + ] + + system "./buildconf" if build.head? + system "./configure", *std_configure_args, *args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(void) + { + libssh2_exit(); + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lssh2", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libstatgrab.rb b/Formula/lib/libstatgrab.rb new file mode 100644 index 0000000000000..34ee1233898e4 --- /dev/null +++ b/Formula/lib/libstatgrab.rb @@ -0,0 +1,50 @@ +class Libstatgrab < Formula + desc "Provides cross-platform access to statistics about the system" + homepage "https://libstatgrab.org/" + url "https://github.com/libstatgrab/libstatgrab/releases/download/LIBSTATGRAB_0_92_1/libstatgrab-0.92.1.tar.gz" + mirror "https://www.mirrorservice.org/pub/i-scream/libstatgrab/libstatgrab-0.92.1.tar.gz" + sha256 "5688aa4a685547d7174a8a373ea9d8ee927e766e3cc302bdee34523c2c5d6c11" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + livecheck do + url :stable + regex(/^LIBSTATGRAB[._-]v?(\d+(?:[._]\d+)+)$/i) + strategy :git do |tags, regex| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "666c2bc394e1533387652704633873d2ad01670f67503bc8dbf8c66e6b53e4ac" + sha256 cellar: :any, arm64_sonoma: "896492a8a90fe3c6f335ad15785a8fb7521b1200c3e88d1989136a17eebdab60" + sha256 cellar: :any, arm64_ventura: "7c52741c5bc27ba569e9d97c89ab5258f51f0b66c46e678f35fc8770f0fa6655" + sha256 cellar: :any, arm64_monterey: "d8fe01051dd20bebd918d8d4e0634218121d1a9b3b0be2e5830cdf24bc1d9fd5" + sha256 cellar: :any, arm64_big_sur: "ce70f4a494445f8afde960c4ceea838e48b98fcf4c4d9513f705afae83193433" + sha256 cellar: :any, sonoma: "0a4526da3d4c86b1ceaa98ca701ddb3a6a34db17643a6b75c129cda9a6bde856" + sha256 cellar: :any, ventura: "35cc23ef8a82b0b187d227e801d66aec5f561464c353234ee5aef30b3894c0d4" + sha256 cellar: :any, monterey: "5154065582dbae8bf645834ccabc9b878a77dc21d5a85d307366d78b6ee7ed91" + sha256 cellar: :any, big_sur: "08aba9012402bf7611ddc2fb0f6e0dfcb31c97ce067dd83d6ae73830b5d30aeb" + sha256 cellar: :any, catalina: "802d07a3f0948bf0f3a60bb174b1ee56e028b4b24f9eb121e9f90e5926e689c0" + sha256 cellar: :any, mojave: "8ce7e1320ee7e3d10764ace6801eecb28cac49dadef648de79258e1d254da06c" + sha256 cellar: :any_skip_relocation, arm64_linux: "20fa34ce8b897ffc1d9ef30d7c1636fb86d2b1299dad7d730a000f47ff4691cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8984abcb585701a695fedbebd0c13cd61b08b95240c22485c75e2aac1575c57a" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + system bin/"statgrab" + end +end diff --git a/Formula/lib/libstrophe.rb b/Formula/lib/libstrophe.rb new file mode 100644 index 0000000000000..e058063ac4079 --- /dev/null +++ b/Formula/lib/libstrophe.rb @@ -0,0 +1,60 @@ +class Libstrophe < Formula + desc "XMPP library for C" + homepage "https://strophe.im/libstrophe/" + url "https://github.com/strophe/libstrophe/archive/refs/tags/0.14.0.tar.gz" + sha256 "adeb9e673d7f8b8cd20a2437cc220a8de581abf6e46594896b622e3e0dfa5c1f" + license all_of: ["GPL-3.0-only", "MIT"] + head "https://github.com/strophe/libstrophe.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9b73c7be79de4da6cdf71493be1d7cfebeb793118cc3e8c81f38e1e300c7655a" + sha256 cellar: :any, arm64_sonoma: "26a68ff8af0c493458d249c831bc9951d9167f67524a61a815aefe3735c90b05" + sha256 cellar: :any, arm64_ventura: "871b9da7491c846d8577fbd1497bf835abc2c529148d94f9124953fe602568da" + sha256 cellar: :any, sonoma: "91bae15485f397f9eb581cd9611f636320aa76e2671981bd702893f2095b360b" + sha256 cellar: :any, ventura: "f56d42d26c8a1540ef92878b9a89262a1769c39904604bd878139570f977bbb5" + sha256 cellar: :any_skip_relocation, arm64_linux: "fdf712f1639e7fb2d4e57aa5708f017059839265d95e1884b45721d6f19f3d68" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82556dd0b8ebd7541b35c3ea0e4c4079f802a4588c0424043a64b277416394fc" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "expat" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + def install + system "./bootstrap.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(void) { + xmpp_ctx_t *ctx; + xmpp_log_t *log; + + xmpp_initialize(); + log = xmpp_get_default_logger(XMPP_LEVEL_DEBUG); + assert(log); + + ctx = xmpp_ctx_new(NULL, log); + assert(ctx); + + xmpp_ctx_free(ctx); + xmpp_shutdown(); + return 0; + } + C + flags = ["-I#{include}/", "-L#{lib}", "-lstrophe"] + system ENV.cc, "-o", "test", "test.c", *(flags + ENV.cflags.to_s.split) + system "./test" + end +end diff --git a/Formula/lib/libstxxl.rb b/Formula/lib/libstxxl.rb new file mode 100644 index 0000000000000..ad853b027cad3 --- /dev/null +++ b/Formula/lib/libstxxl.rb @@ -0,0 +1,32 @@ +class Libstxxl < Formula + desc "C++ implementation of STL for extra large data sets" + homepage "https://stxxl.sourceforge.net/" + url "https://downloads.sourceforge.net/project/stxxl/stxxl/1.4.1/stxxl-1.4.1.tar.gz" + sha256 "92789d60cd6eca5c37536235eefae06ad3714781ab5e7eec7794b1c10ace67ac" + license "BSL-1.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "30d099063deeb524f2ebe459a34fccb9236780abee29b1a8487f131922b015b3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2fa5cbb1eb4ac3bf9d3603d0eb56d2e75db5b4962ed87c625f45deb988713a6b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c553b5d40fc2b5c081634ce666570017b82f4c74c0f5915173bd9024d959de1c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e487af039d6286b34dc4aeac3c0eaba10668054b33a368e54f9cb8647834ed55" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8454123ffed231405d684ed18c2ef1a0ab1bd118d74614748a5b5df23d8bb5fe" + sha256 cellar: :any_skip_relocation, sonoma: "8974e02f766e33348b526ff4545441e9edc78dfb55847b996c115b53a8811211" + sha256 cellar: :any_skip_relocation, ventura: "2da4cce955e2b91e309712edd7e0271ff7671e3b472536972d802102547ba5a3" + sha256 cellar: :any_skip_relocation, monterey: "5916828893681e83b360fbd3638499592b65f39a546b64156aac85bf52a90550" + sha256 cellar: :any_skip_relocation, big_sur: "c3f8dceb4e0a1716a2c193daf4b5eeb4ae3e8e96224bdc78ae8f74c2a3059152" + sha256 cellar: :any_skip_relocation, catalina: "b4d5ef6b70735617973eb1f45214b11e3e6baec242bc6aa5ba9ed4da1834f6ad" + sha256 cellar: :any_skip_relocation, mojave: "9b179722c61ea55b352c9196ae38d6915a3625096117088d43f854bee4eb6a39" + sha256 cellar: :any_skip_relocation, arm64_linux: "830762e021660cbe0143faa6737a34aa03104344f17f561b6bbabf5befaa799b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8651bc71eeb58d5fc34d8b934576ceec8d7735575c595e50e8dd8e4d2dc84ae9" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end +end diff --git a/Formula/lib/libsvg-cairo.rb b/Formula/lib/libsvg-cairo.rb new file mode 100644 index 0000000000000..765aedb14d35f --- /dev/null +++ b/Formula/lib/libsvg-cairo.rb @@ -0,0 +1,151 @@ +class LibsvgCairo < Formula + desc "SVG rendering library using Cairo" + homepage "https://cairographics.org/" + url "https://cairographics.org/snapshots/libsvg-cairo-0.1.6.tar.gz" + sha256 "a380be6a78ec2938100ce904363815a94068fca372c666b8cc82aa8711a0215c" + license "LGPL-2.1-or-later" + revision 3 + + livecheck do + url "https://cairographics.org/snapshots/" + regex(/href=.*?libsvg-cairo[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "fb922d8f987fcfbf1a37e34cb527ce24345328d188e2fc453a5c70de848dbd41" + sha256 cellar: :any, arm64_sonoma: "2c255fb61d16b9fd5aee60ed29a000d3eb27028b7e7641d7dd4d1cc11928de1a" + sha256 cellar: :any, arm64_ventura: "528ec2ea8ffedaff6d5eac18dbb22a8edfc0f41eb8b8fa7bf85068c3bcabb745" + sha256 cellar: :any, arm64_monterey: "039c1d99e08efc5f9b5df9a30ce5d0ff4acde9c3f4f3890b4fb8cd287d12adc1" + sha256 cellar: :any, arm64_big_sur: "fe8c78e4969c745b6808cd2f4c8f2d084a1f30687edd98074a1d43dd925fabbc" + sha256 cellar: :any, sonoma: "6721901eb3166398f4ce418cb4afc1ad2e34b82a531b5e36ba5619633e13ba25" + sha256 cellar: :any, ventura: "406b34bdef48019bb54867008b08e966b11b7209c77f5a3b2e384771ea20b5dc" + sha256 cellar: :any, monterey: "2d381b736e28fc35193fd120bd265f6cc73e3805d945982db709f2a517015cd2" + sha256 cellar: :any, big_sur: "a2d1eeb52e59366b77b50d16ec49aa0dc65d03315bde893248d982dca7d8b06f" + sha256 cellar: :any, catalina: "d7e3121dc97fdd10cc498e78c60721777a9c17d686d07de769c157d1bf9ed7e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7459ca5ab6d29337f341de7af38ce53bbc007974bfd57e5be4d9b4ad66ba69a" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "cairo" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libsvg" + + # libsvg: fix for ARM/M1 Macs + # Patch to update to newer autotools + # (https://cgit.freedesktop.org/cairo/commit/?id=afdf3917ee86a7d8ae17f556db96478682674a76) + patch :DATA + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.svg").write <<~EOS + + sample text here + EOS + + (testpath/"test.c").write <<~C + #include + #include "svg-cairo.h" + + int main(int argc, char **argv) { + svg_cairo_t *svg = NULL; + svg_cairo_status_t result = SVG_CAIRO_STATUS_SUCCESS; + FILE *fp = NULL; + printf("1\\n"); + result = svg_cairo_create(&svg); + if (SVG_CAIRO_STATUS_SUCCESS != result) { + printf ("svg_cairo_create failed: %d\\n", result); + /* Fail if alloc failed */ + return -1; + } + printf("2\\n"); + result = svg_cairo_parse(svg, "test.svg"); + if (SVG_CAIRO_STATUS_SUCCESS != result) { + printf ("svg_cairo_parse failed: %d\\n", result); + /* Fail if alloc failed */ + return -2; + } + printf("3\\n"); + result = svg_cairo_destroy(svg); + if (SVG_CAIRO_STATUS_SUCCESS != result) { + printf ("svg_cairo_destroy failed: %d\\n", result); + /* Fail if alloc failed */ + return -3; + } + svg = NULL; + printf("4\\n"); + result = svg_cairo_create(&svg); + if (SVG_CAIRO_STATUS_SUCCESS != result) { + printf ("svg_cairo_create failed: %d\\n", result); + /* Fail if alloc failed */ + return -4; + } + fp = fopen("test.svg", "r"); + if (NULL == fp) { + printf ("failed to fopen test.svg\\n"); + /* Fail if alloc failed */ + return -5; + } + printf("5\\n"); + result = svg_cairo_parse_file(svg, fp); + if (SVG_CAIRO_STATUS_SUCCESS != result) { + printf ("svg_cairo_parse_file failed: %d\\n", result); + /* Fail if alloc failed */ + return -6; + } + printf("6\\n"); + result = svg_cairo_destroy(svg); + if (SVG_CAIRO_STATUS_SUCCESS != result) { + printf ("svg_cairo_destroy failed: %d\\n", result); + /* Fail if alloc failed */ + return -7; + } + svg = NULL; + printf("SUCCESS\\n"); + return 0; + } + C + + cairo = Formula["cairo"] + system ENV.cc, "test.c", "-I#{include}", "-I#{cairo.opt_include}/cairo", "-L#{lib}", "-lsvg-cairo", "-o", "test" + assert_equal "1\n2\n3\n4\n5\n6\nSUCCESS\n", shell_output("./test") + end +end + +__END__ +diff --git a/configure.in b/configure.in +index 3407e0d..627bbc5 100755 +--- a/configure.in ++++ b/configure.in +@@ -8,18 +8,18 @@ LIBSVG_CAIRO_VERSION=0.1.6 + # libtool shared library version + + # Increment if the interface has additions, changes, removals. +-LT_CURRENT=1 ++m4_define(LT_CURRENT, 1) + + # Increment any time the source changes; set to + # 0 if you increment CURRENT +-LT_REVISION=1 ++m4_define(LT_REVISION, 1) + + # Increment if any interfaces have been added; set to 0 + # if any interfaces have been removed. removal has + # precedence over adding, so set to 0 if both happened. +-LT_AGE=0 ++m4_define(LT_AGE, 0) + +-VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE" ++VERSION_INFO="LT_CURRENT():LT_REVISION():LT_AGE()" + AC_SUBST(VERSION_INFO) + + dnl =========================================================================== diff --git a/Formula/lib/libsvg.rb b/Formula/lib/libsvg.rb new file mode 100644 index 0000000000000..6f4ffec8304b0 --- /dev/null +++ b/Formula/lib/libsvg.rb @@ -0,0 +1,166 @@ +class Libsvg < Formula + desc "Library for SVG files" + homepage "https://cairographics.org/" + url "https://cairographics.org/snapshots/libsvg-0.1.4.tar.gz" + sha256 "4c3bf9292e676a72b12338691be64d0f38cd7f2ea5e8b67fbbf45f1ed404bc8f" + license "LGPL-2.1-or-later" + revision 2 + + livecheck do + url "https://cairographics.org/snapshots/" + regex(/href=.*?libsvg[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e0f24ee9236415330cf795a256e7b03af615239c4e81d2a26ada7f2995baf776" + sha256 cellar: :any, arm64_sonoma: "f2adf0b4734d218b0ebdab5ae4c0eada74f36edb628d6a8a2c41d7ab7b4421ea" + sha256 cellar: :any, arm64_ventura: "331a886e259749749bbaeed305a1727a8c4ecea79e1eca5949be34d87f0abfa0" + sha256 cellar: :any, arm64_monterey: "9b82d4f937112bd04869cb7089cf8af73a5bcaf9273c0078be79c2bd5aac6510" + sha256 cellar: :any, arm64_big_sur: "c77d338da584cd0b58841e34be440b16ac012994888d1b4ad0938c1ea0d28dde" + sha256 cellar: :any, sonoma: "8cf662fe70c2b08e5e3609b1538f350e111a81e825ad0499e7cd9e4ed4d96755" + sha256 cellar: :any, ventura: "ba25653dfad1cd950f306b008f475a1a270f86615cae4ccdf86299596e5361fd" + sha256 cellar: :any, monterey: "4240c3c651800b8f8a25ab51dfa6ed069903e22b5495803633e918a345a74479" + sha256 cellar: :any, big_sur: "8ec002009c6156b77c475d1841ea2c98224afce021dfb629cdd2dda3cb18d37e" + sha256 cellar: :any, catalina: "a46a3e610e875c4d3de003a0399a73272970cd89617aacc8eb0fa1257b967208" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e8c036d685732349dde481452b4cf7c7f478ee075016dffdd66d49e2dc4010a" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "jpeg-turbo" + depends_on "libpng" + + uses_from_macos "libxml2" + + # Fix undefined reference to 'png_set_gray_1_2_4_to_8' in libpng 1.4.0+ + patch do + url "https://raw.githubusercontent.com/buildroot/buildroot/45c3b0ec49fac67cc81651f0bed063722a48dc29/package/libsvg/0002-Fix-undefined-symbol-png_set_gray_1_2_4_to_8.patch" + sha256 "a0ca1e25ea6bd5cb9aac57ac541c90ebe3b12c1340dbc5762d487d827064e0b9" + end + + # Allow building on M1 Macs. This patch is adapted from + # https://cgit.freedesktop.org/cairo/commit/?id=afdf3917ee86a7d8ae17f556db96478682674a76 + patch :DATA + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.svg").write <<~EOS + + sample text here + EOS + (testpath/"test.c").write <<~C + #include + #include "svg.h" + + int main(int argc, char **argv) { + svg_t *svg = NULL; + svg_status_t result = SVG_STATUS_SUCCESS; + FILE *fp = NULL; + + printf("1\\n"); + result = svg_create(&svg); + if (SVG_STATUS_SUCCESS != result) { + printf ("svg_create failed\\n"); + /* Fail if alloc failed */ + return -1; + } + + printf("2\\n"); + result = svg_parse(svg, "test.svg"); + if (SVG_STATUS_SUCCESS != result) { + printf ("svg_parse failed\\n"); + /* Fail if alloc failed */ + return -2; + } + + printf("3\\n"); + result = svg_destroy(svg); + if (SVG_STATUS_SUCCESS != result) { + printf ("svg_destroy failed\\n"); + /* Fail if alloc failed */ + return -3; + } + svg = NULL; + + printf("4\\n"); + result = svg_create(&svg); + if (SVG_STATUS_SUCCESS != result) { + printf ("svg_create failed\\n"); + /* Fail if alloc failed */ + return -4; + } + + fp = fopen("test.svg", "r"); + if (NULL == fp) { + printf ("failed to fopen test.svg\\n"); + /* Fail if alloc failed */ + return -5; + } + + printf("5\\n"); + result = svg_parse_file(svg, fp); + if (SVG_STATUS_SUCCESS != result) { + printf ("svg_parse_file failed\\n"); + /* Fail if alloc failed */ + return -6; + } + + printf("6\\n"); + result = svg_destroy(svg); + if (SVG_STATUS_SUCCESS != result) { + printf ("svg_destroy failed\\n"); + /* Fail if alloc failed */ + return -7; + } + svg = NULL; + printf("SUCCESS\\n"); + + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", + "-I#{include}", "-L#{lib}", "-lsvg", + "-L#{Formula["libpng"].opt_lib}", "-lpng", + "-L#{Formula["jpeg-turbo"].opt_lib}", "-ljpeg", + "-Wl,-rpath,#{Formula["jpeg-turbo"].opt_lib}", + "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib" + assert_equal "1\n2\n3\n4\n5\n6\nSUCCESS\n", shell_output("./test") + end +end + +__END__ +diff --git a/configure.in b/configure.in +index a9f871e..c84d417 100755 +--- a/configure.in ++++ b/configure.in +@@ -8,18 +8,18 @@ LIBSVG_VERSION=0.1.4 + # libtool shared library version + + # Increment if the interface has additions, changes, removals. +-LT_CURRENT=1 ++m4_define(LT_CURRENT, 1) + + # Increment any time the source changes; set to + # 0 if you increment CURRENT +-LT_REVISION=0 ++m4_define(LT_REVISION, 0) + + # Increment if any interfaces have been added; set to 0 + # if any interfaces have been removed. removal has + # precedence over adding, so set to 0 if both happened. +-LT_AGE=0 ++m4_define(LT_AGE, 0) + +-VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE" ++VERSION_INFO="LT_CURRENT():LT_REVISION():LT_AGE()" + AC_SUBST(VERSION_INFO) + + dnl =========================================================================== diff --git a/Formula/lib/libsvgtiny.rb b/Formula/lib/libsvgtiny.rb new file mode 100644 index 0000000000000..49cb730e3e801 --- /dev/null +++ b/Formula/lib/libsvgtiny.rb @@ -0,0 +1,133 @@ +class Libsvgtiny < Formula + desc "Implementation of SVG Tiny" + homepage "https://www.netsurf-browser.org/projects/libsvgtiny/" + url "https://download.netsurf-browser.org/libs/releases/libsvgtiny-0.1.8-src.tar.gz" + sha256 "c357227f02e83fb2a76b12b901191a082229db1f007362e8f31c754510c2a01c" + license "MIT" + + livecheck do + url "https://download.netsurf-browser.org/libs/releases/" + regex(/href=.*?libsvgtiny[._-]v?(\d+(?:\.\d+)+)[._-]src\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "dfa1577c7203b4006481244f5029a3f91acfc6f6ad5f117f9ce909caf15c46f3" + sha256 cellar: :any, arm64_sonoma: "a3936e5961d3c93c990c67f63e592387eb143483f8cb8dba01253a8af012e2e0" + sha256 cellar: :any, arm64_ventura: "acbb8ceb269100f33510ebc0f635431370f4529472757e3b49a4c9db84759908" + sha256 cellar: :any, sonoma: "79f23d2be078a3142ae7222d1b6da7ed1f9e734e6703dfe86fbaa6c3916b6f72" + sha256 cellar: :any, ventura: "22fa6d603af1fc38b26760ac2e6ea8c22f8f0a629a01514bb8bd04ecdb80d0b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "730eb12414b8d0d93e3c8d2e52084669d9870d15dc60a127e24ec5b6e9062b8e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5dda2d25e1756ffbbc6e8e28ee6d1259b4f1337b0cb1958dc29d6275bc70b22" + end + + depends_on "netsurf-buildsystem" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "libdom" + depends_on "libhubbub" + depends_on "libparserutils" + depends_on "libwapcaplet" + + uses_from_macos "gperf" => :build + uses_from_macos "expat" + + def install + args = %W[ + NSSHARED=#{Formula["netsurf-buildsystem"].opt_pkgshare} + PREFIX=#{prefix} + ] + + system "make", "install", "COMPONENT_TYPE=lib-shared", *args + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + #include + + int main(int argc, char *argv[]) { + FILE *fd; + struct stat sb; + char *buffer; + size_t size, n; + struct svgtiny_diagram *diagram; + svgtiny_code code; + + if (argc != 2) { + printf("Usage: %s FILE\\n", argv[0]); + return 1; + } + + fd = fopen(argv[1], "rb"); + if (!fd) { + perror(argv[1]); + return 1; + } + + if (stat(argv[1], &sb)) { + perror(argv[1]); + return 1; + } + size = sb.st_size; + + buffer = malloc(size); + if (!buffer) { + printf("Unable to allocate %lld bytes\\n", + (long long) size); + return 1; + } + + n = fread(buffer, 1, size, fd); + if (n != size) { + perror(argv[1]); + return 1; + } + + fclose(fd); + + diagram = svgtiny_create(); + if (!diagram) { + printf("svgtiny_create failed\\n"); + return 1; + } + + code = svgtiny_parse(diagram, buffer, size, argv[1], 1000, 1000); + switch (code) { + case svgtiny_OK: + printf("svgtiny_OK"); + break; + case svgtiny_OUT_OF_MEMORY: + printf("svgtiny_OUT_OF_MEMORY"); + break; + case svgtiny_LIBDOM_ERROR: + printf("svgtiny_LIBDOM_ERROR"); + break; + case svgtiny_NOT_SVG: + printf("svgtiny_NOT_SVG"); + break; + case svgtiny_SVG_ERROR: + printf("svgtiny_SVG_ERROR: line %i: %s", + diagram->error_line, + diagram->error_message); + break; + default: + printf("unknown svgtiny_code %i", code); + break; + } + printf("\\n"); + + free(buffer); + svgtiny_free(diagram); + + return code; + } + C + + flags = shell_output("pkgconf --cflags --libs libsvgtiny").chomp.split + system ENV.cc, testpath/"test.c", "-o", "test", *flags + assert_equal "svgtiny_OK", shell_output("./test #{test_fixtures("test.svg")}").chomp + end +end diff --git a/Formula/lib/libsvm.rb b/Formula/lib/libsvm.rb new file mode 100644 index 0000000000000..80478279e6d70 --- /dev/null +++ b/Formula/lib/libsvm.rb @@ -0,0 +1,68 @@ +class Libsvm < Formula + desc "Library for support vector machines" + homepage "https://www.csie.ntu.edu.tw/~cjlin/libsvm/" + url "https://www.csie.ntu.edu.tw/~cjlin/libsvm/libsvm-3.36.tar.gz" + sha256 "bc92901fbb928c44bb6d0c38189624c7443bcdbf1dd8350b4914e58e57b93c11" + license "BSD-3-Clause" + head "https://github.com/cjlin1/libsvm.git", branch: "master" + + livecheck do + url :homepage + regex(/The current release \(Version v?(\d+(?:\.\d+)+)[, )]/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "07c47f5b7781dd3fffb83c47d6ea6568e7979e1222eb214c7a85d1323841a91a" + sha256 cellar: :any, arm64_sonoma: "491c601bed6a963a50717df1a90b1a0c9a73f73b19f64778239a1668edb96440" + sha256 cellar: :any, arm64_ventura: "4025272abab33c159ef9ce0133a1716d3936d2b10a0f26c630a68e19547c4bb5" + sha256 cellar: :any, sonoma: "0bb3867e246b44702d4f0504b0fd8cbc52a7995d9c083ad1be071eedac630f33" + sha256 cellar: :any, ventura: "7756ddc93d633b6de91c42f80ea3fba436cdfd9a9eb7af9f7413ec9f15ba1af5" + sha256 cellar: :any_skip_relocation, arm64_linux: "dfdef8c630fd3e6fd561ae9b0fe3d3063777ddb0553e06b00477fa29bf28f1a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1c622afb8f5923a625dbdd52197af588febd196e1d2eabfa3e1c9b3664e4386" + end + + def install + ENV.append_to_cflags "-fPIC" if OS.linux? + system "make", "CFLAGS=#{ENV.cflags}" + system "make", "lib" + bin.install "svm-scale", "svm-train", "svm-predict" + include.install "svm.h" + + libsvm_files = buildpath.glob("libsvm.so.*") + odie "Expected exactly one `libsvm`!" if libsvm_files.count != 1 + + libsvm = libsvm_files.first + libsvm_soversion = libsvm.to_s[/(?<=\.)\d+(?:\.\d+)*$/] + lib.install libsvm => shared_library("libsvm", libsvm_soversion) + lib.install_symlink shared_library("libsvm", libsvm_soversion) => shared_library("libsvm") + return unless OS.mac? + + libsvm = shared_library("libsvm", libsvm_soversion) + MachO::Tools.change_dylib_id lib/libsvm, (opt_lib/libsvm).to_s + MachO.codesign!(lib/libsvm) + end + + test do + assert_path_exists lib/shared_library("libsvm") + + (testpath/"train_classification.txt").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_regression.txt").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-train", "-s", "0", "train_classification.txt" + system bin/"svm-train", "-s", "3", "train_regression.txt" + return unless OS.mac? + + assert (lib/shared_library("libsvm")).dylib_id.end_with?("dylib") + end +end diff --git a/Formula/lib/libswiftnav.rb b/Formula/lib/libswiftnav.rb new file mode 100644 index 0000000000000..af6e407b9f2ba --- /dev/null +++ b/Formula/lib/libswiftnav.rb @@ -0,0 +1,71 @@ +class Libswiftnav < Formula + desc "C library implementing GNSS related functions and algorithms" + homepage "https://github.com/swift-nav/libswiftnav" + url "https://github.com/swift-nav/libswiftnav/archive/refs/tags/v2.4.2.tar.gz" + sha256 "9dfe4ce4b4da28ffdb71acad261eef4dd98ad79daee4c1776e93b6f1765fccfa" + license "LGPL-3.0-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1ddd75cc7bfb08208ea88e3bbc3f3d5549c9c72511dc9378ab31101d50591c48" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0596c6cfaf45b62cd39b4fc4fc7f01b8b786914471e1b534be2f54c7f64921b1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4e3b556518c6860f34af3d1a2e4e1c3c134d089f6b86b53f8317fa8eff9f99b6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "df259cd788dc4c271a2ae2296c17286163528eeb04cee8412fe450cf4a1549d8" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a25d1d7bab6a7c1fe2b53c6b22cd330abc8013a0c82764c96284e924dd9ef375" + sha256 cellar: :any_skip_relocation, sonoma: "2d1816993437aea825dad690affb239660bed9a4e61b04536bc7cf6758c5a5e1" + sha256 cellar: :any_skip_relocation, ventura: "b9f845cbb35711aabf115910c838fbc2c5fedef78728ae695e28e5c038425885" + sha256 cellar: :any_skip_relocation, monterey: "b5e458c0d632aa814f63697a4a1fdd2a96d519f3846c9a5f7e04964df7cad26d" + sha256 cellar: :any_skip_relocation, big_sur: "39097a000739be8211214f46f80bb94709d3cc2784f7b4930d1b74107aeb87fc" + sha256 cellar: :any_skip_relocation, catalina: "48392c1a0f1d61146ec1cef2a3889b5c12355fea09360a7cbd2b9506f27259d0" + sha256 cellar: :any_skip_relocation, mojave: "18baf5f5cae22f042d5e08fff1f25a81f33950723560dfb72ad3bc989c1c258e" + sha256 cellar: :any_skip_relocation, arm64_linux: "7767ebdfd1dd030cc3ddb4bce85f6d113bb5b7c122e859950c264fc800054221" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c1648b6c5feaa7485011c42987bf2d6b7fbd2795130b83528d8a8960ef8f748" + end + + depends_on "cmake" => :build + + # Check the `/cmake` directory for a given version tag + # (e.g., https://github.com/swift-nav/libswiftnav/tree/v2.4.2/cmake) + # to identify the referenced commit hash in the swift-nav/cmake repository. + resource "swift-nav/cmake" do + url "https://github.com/swift-nav/cmake/archive/fd8c86b87d2b18261691ef8db1f6fd9906911b82.tar.gz" + sha256 "7b6995bcc97d001cfe5c4741a8fa3637bc4dc2c3460b908585aef5e7af268798" + end + + def install + (buildpath/"cmake/common").install resource("swift-nav/cmake") + + 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 + #include + + const u8 *test_data = (u8*)"123456789"; + + int main() { + u32 crc; + + crc = crc24q(test_data, 9, 0xB704CE); + if (crc != 0x21CF02) { + printf("libswiftnav CRC quick test failed: CRC of \\"123456789\\" with init value 0xB704CE should be 0x21CF02, not 0x%06X\\n", crc); + exit(1); + } else { + printf("libswiftnav CRC quick test successful, CRC = 0x21CF02\\n"); + exit(0); + } + } + C + system ENV.cc, "test.c", "-L", lib, "-lswiftnav", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libtar.rb b/Formula/lib/libtar.rb new file mode 100644 index 0000000000000..6e422abc68875 --- /dev/null +++ b/Formula/lib/libtar.rb @@ -0,0 +1,51 @@ +class Libtar < Formula + desc "C library for manipulating POSIX tar files" + homepage "https://repo.or.cz/libtar.git" + url "https://repo.or.cz/libtar.git", + tag: "v1.2.20", + revision: "0907a9034eaf2a57e8e4a9439f793f3f05d446cd" + license "NCSA" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "4c4e12298ea2527d81b280592e4442f703eb59473e9b22c171ca70be11c90575" + sha256 cellar: :any, arm64_sonoma: "63c312ae75aea7e67be7285c6abb9a34ce0079fd4a9629f02c48fe23fb0a6ca0" + sha256 cellar: :any, arm64_ventura: "5b5d861d3e7a24bfbb41d37e9ab4efe883e9f9403d01b6dc1509480f23f7f80f" + sha256 cellar: :any, arm64_monterey: "02f257866b2d60bc629d5c35f70f41889ab2254de7f29533ab01d600979d74c2" + sha256 cellar: :any, arm64_big_sur: "7481da1834936b6237f152fe8b7e22196ad5c76833af39c9e9f74eae6347c9a5" + sha256 cellar: :any, sonoma: "717ef919c46b1fbbffe066be73a93a8a5ae3cc1bfaa25cf4410d8c55970169b9" + sha256 cellar: :any, ventura: "d0e2280e4245eda925984747db9ef07b712ccf5e6de713ccc35289e7c6c01c42" + sha256 cellar: :any, monterey: "de9f3cf843c333e94657378a4b551386f81fe9f3afef5b69539de108330c3c4b" + sha256 cellar: :any, big_sur: "7424cf8229c7aea825592a76227da3355f32a43b9fbc5e140a0cf1eb07d05c8e" + sha256 cellar: :any, catalina: "35617f312e3c6fb1e473a5d20a559dcbd1815544bdd99c95419ac7e6e8abf9f6" + sha256 cellar: :any, mojave: "070d9355e6d03dcb64ea33ecf7e3b99972e0b3ca5fc8e60e89616f0a061ee0e5" + sha256 cellar: :any, high_sierra: "a263cfaa1499f0c82902009964df0a310e7841ddff29409c67ede0a79157c31e" + sha256 cellar: :any, sierra: "68bdebde24477a815ea03289878ad57e8a1f719b417bef430bf477c2d760cad7" + sha256 cellar: :any, el_capitan: "018f1c9897f52b783878db67db39a5933a4863a3f9dedc2af9b6bf13f2161957" + sha256 cellar: :any_skip_relocation, arm64_linux: "b1baa2051a67e4aff529c5a69ff529914422e2abd2c917d813929e915e633991" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5703c44aa7e1572385af551d05f17bafccf9a247eef56639a58dafd5aa8bdd46" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + uses_from_macos "zlib" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + (testpath/"homebrew.txt").write "This is a simple example" + system "tar", "-cvf", "test.tar", "homebrew.txt" + rm "homebrew.txt" + refute_path_exists testpath/"homebrew.txt" + assert_path_exists testpath/"test.tar" + + system bin/"libtar", "-x", "test.tar" + assert_path_exists testpath/"homebrew.txt" + end +end diff --git a/Formula/lib/libtasn1.rb b/Formula/lib/libtasn1.rb new file mode 100644 index 0000000000000..3701974c80231 --- /dev/null +++ b/Formula/lib/libtasn1.rb @@ -0,0 +1,47 @@ +class Libtasn1 < Formula + desc "ASN.1 structure parser library" + homepage "https://www.gnu.org/software/libtasn1/" + url "https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.20.0.tar.gz" + mirror "https://ftpmirror.gnu.org/libtasn1/libtasn1-4.20.0.tar.gz" + sha256 "92e0e3bd4c02d4aeee76036b2ddd83f0c732ba4cda5cb71d583272b23587a76c" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e847b97b86b1caab2eff1498c82c411459e1e7c176de72e6c53aed4528ab80ce" + sha256 cellar: :any, arm64_sonoma: "8a2d13e7d0c687470f2be9e213432b93c22d3ab9b674fce2a950d7eb45432cac" + sha256 cellar: :any, arm64_ventura: "b202c24f2e22f7f709473f72ec9c26f3ec43d643b8488378690c83fd96d48d69" + sha256 cellar: :any, sonoma: "75cccbdfc213e905656c372ca5b9496cf88dea3a0fd9dcb032f06bbdd061228b" + sha256 cellar: :any, ventura: "544067beee3846eafd9a1ecdd5d25646d8ff3f417f5f2e464441b0a2c6a19b39" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec6abf595dd54b05c55662226b05301d9e27b3e61f427866b1ba7686d01f8633" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a141f58624a57f3370d4ed714225a78f24bddbb6a3b60ed82127614090cdb9d9" + end + + def install + system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking", + "--disable-silent-rules" + system "make", "check" + system "make", "install" + end + + test do + (testpath/"pkix.asn").write <<~EOS + PKIX1 { } + DEFINITIONS IMPLICIT TAGS ::= + BEGIN + Dss-Sig-Value ::= SEQUENCE { + r INTEGER, + s INTEGER + } + END + EOS + + (testpath/"assign.asn1").write <<~EOS + dp PKIX1.Dss-Sig-Value + r 42 + s 47 + EOS + + system bin/"asn1Coding", "pkix.asn", "assign.asn1" + assert_match "Decoding: SUCCESS", shell_output("#{bin}/asn1Decoding pkix.asn assign.out PKIX1.Dss-Sig-Value 2>&1") + end +end diff --git a/Formula/lib/libtatsu.rb b/Formula/lib/libtatsu.rb new file mode 100644 index 0000000000000..a24474dbfd2cf --- /dev/null +++ b/Formula/lib/libtatsu.rb @@ -0,0 +1,45 @@ +class Libtatsu < Formula + desc "Library handling the communication with Apple's Tatsu Signing Server (TSS)" + homepage "https://libimobiledevice.org/" + url "https://github.com/libimobiledevice/libtatsu/releases/download/1.0.4/libtatsu-1.0.4.tar.bz2" + sha256 "08094e58364858360e1743648581d9bad055ba3b06e398c660e481ebe0ae20b3" + license "LGPL-2.1-or-later" + head "https://github.com/libimobiledevice/libtatsu.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3490caa14c81cdffce28d50ce34880ab9b95a193a26906bf035492e3c37a3b2d" + sha256 cellar: :any, arm64_sonoma: "870c73a45691c13d672235e9a3ed53d0a9d76a7f1b9aafda775b541c1735c3d1" + sha256 cellar: :any, arm64_ventura: "4a33d3d2692d953e3bd1c0a8561011152ab9dcb5d029f0bbc33315233337fe52" + sha256 cellar: :any, sonoma: "fafd0d67b5ccd44ee5c33fd4ba38f063029a89582a21e5a88104f00638bc620f" + sha256 cellar: :any, ventura: "70223395b5fb5525f701e78c40b9b5b4c9f897fec98bee2dff4af63612440da4" + sha256 cellar: :any_skip_relocation, arm64_linux: "84fd9c2fef6f7311c1b68ab8f1c481ea0e80cfc6ceffc1bef0dd23ff38e4c5cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd96d83e2a85b4c479893f9493d0ffb9d7f66d357216d08adb6a4a158f72a582" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libplist" + + uses_from_macos "curl" + + def install + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "libtatsu/tss.h" + + int main(int argc, char* argv[]) { + tss_set_debug_level(0); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-ltatsu", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libtcod.rb b/Formula/lib/libtcod.rb new file mode 100644 index 0000000000000..412c4e7cd4da0 --- /dev/null +++ b/Formula/lib/libtcod.rb @@ -0,0 +1,72 @@ +class Libtcod < Formula + desc "API for roguelike developers" + homepage "https://github.com/libtcod/libtcod" + url "https://github.com/libtcod/libtcod/archive/refs/tags/2.1.1.tar.gz" + sha256 "ee9cc60140f480f72cb2321d5aa50beeaa829b0a4a651e8a37e2ba938ea23caa" + license all_of: [ + "BSD-3-Clause", + "Zlib", # src/vendor/lodepng.c + { all_of: ["MIT", "Unicode-DFS-2015"] }, # src/vendor/utf8proc/utf8proc.c + { any_of: ["MIT", "Unlicense"] }, # src/vendor/stb_truetype.h + ] + + bottle do + sha256 cellar: :any, arm64_sequoia: "fdf83b0198f348818e794ebc1e0d4532f8c1cce635984534ebdc4891f4261aa0" + sha256 cellar: :any, arm64_sonoma: "2a4da5bd870a27621a99008356229ae7df8779e78f8ea2112651a6d4aca31445" + sha256 cellar: :any, arm64_ventura: "bf4af16caa91fcecc6dcd450ab6cf68139b57ee8a96291b735dcb36b8ffc3faa" + sha256 cellar: :any, sonoma: "99781dbb6dbec408f03c3d3888de89de02b5ca42faa618733a2c7b660a1cfb98" + sha256 cellar: :any, ventura: "d22d6cdeeff35bebf79fdc25345c6f7ff9629204c16d134752b4a91ee24a2675" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5f5046d6639c7e7346615716f24ac569699677e53189afdfd6a0758807fedfc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3f044b5650066da7fe44f464408690061b7b245a29ec818ebaedb6e85a25d8b" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on macos: :catalina + depends_on "sdl3" + + uses_from_macos "zlib" + + # TODO: Remove in syntax-only PR + conflicts_with "libzip", because: "libtcod and libzip install a `zip.h` header" + + def install + rm_r("src/vendor/zlib") + + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_INCLUDEDIR=#{include}", + "-DCMAKE_TOOLCHAIN_FILE=", + "-DLIBTCOD_LODEPNG=vendored", + "-DLIBTCOD_STB=vendored", + "-DLIBTCOD_UTF8PROC=vendored", # https://github.com/JuliaStrings/utf8proc/pull/260 + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"version-c.c").write <<~C + #include + #include + int main() + { + puts(TCOD_STRVERSION); + return 0; + } + C + system ENV.cc, "-I#{include}", "-L#{lib}", "-ltcod", "version-c.c", "-o", "version-c" + assert_equal version.to_s, shell_output("./version-c").strip + (testpath/"version-cc.cc").write <<~CPP + #include + #include + int main() + { + std::cout << TCOD_STRVERSION << std::endl; + return 0; + } + CPP + system ENV.cxx, "-std=c++17", "-I#{include}", "-L#{lib}", "-ltcod", "version-cc.cc", "-o", "version-cc" + assert_equal version.to_s, shell_output("./version-cc").strip + end +end diff --git a/Formula/lib/libtecla.rb b/Formula/lib/libtecla.rb new file mode 100644 index 0000000000000..cc6ad58a23691 --- /dev/null +++ b/Formula/lib/libtecla.rb @@ -0,0 +1,75 @@ +class Libtecla < Formula + desc "Command-line editing facilities similar to the tcsh shell" + homepage "https://sites.astro.caltech.edu/~mcs/tecla/" + url "https://sites.astro.caltech.edu/~mcs/tecla/libtecla-1.6.3.tar.gz" + sha256 "f2757cc55040859fcf8f59a0b7b26e0184a22bece44ed9568a4534a478c1ee1a" + license "ICU" + + livecheck do + url :homepage + regex(/href=.*?libtecla[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "389b4e8a32591e201b3c174ce301bfaeb27a38dd8398992eff9171678d1b4bfc" + sha256 cellar: :any, arm64_sonoma: "30529250bd3e6f9e4533145538200757b6c0abc0592d192b3c3bb5f4fe25d8fc" + sha256 cellar: :any, arm64_ventura: "b2bad924df3143f0253bf5bee8dcb8522b905812bafd7134e64fabc2b278e94d" + sha256 cellar: :any, arm64_monterey: "8153bfc3fe19fea63cc58b318cd4878c426f0e4256b5a381171e9b11b36d4bf4" + sha256 cellar: :any, arm64_big_sur: "663c10759f3e00d87a360640de2d0eedb16c8e2e8b26a375f4f3fceaf356a445" + sha256 cellar: :any, sonoma: "4d98e5f24629c7b5620f3e343a44607076988af0c447672acb9953b81d4ec24c" + sha256 cellar: :any, ventura: "156d7de2fd3f8d531266f8df1178e26e5779cd93eb36a38062e9611d1fc8fbbf" + sha256 cellar: :any, monterey: "7e9cdf4692258796b655934aa501b94a46b88291334b1bed79a44dd4ea205b20" + sha256 cellar: :any, big_sur: "d0f28c06cf9d2d1669298104439c4e194d21df65fc17e9b95e9dec0383aa7fef" + sha256 cellar: :any, catalina: "a6bbfa1cee4b62a03186d6fa1a153fceb2b3b9ae5cdf63411d6432c6251c753b" + sha256 cellar: :any, mojave: "d39e8711f7a9a5a11433c7c92a2113a97f8846796f93fa7bca1281e06db2e3fe" + sha256 cellar: :any, high_sierra: "dffae78362e21bf324ed651a2b80ff924b1bbec60916159863e66c7171072a9c" + sha256 cellar: :any, sierra: "21cd696f6e79ae6401dd19f832ac24263f016a62c2d15ec31e25d515bbea5983" + sha256 cellar: :any, el_capitan: "3ceb3942ea4ae1434dcc0aea00fa58b6f16787bc1a0067e9497ad4cb050f771a" + sha256 cellar: :any_skip_relocation, arm64_linux: "3a0a9b8648b8766487a1d4c13c394f2560d4b24af9df0e10109fa89dd87b0415" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8bcf6021a1cff18af685065c3778f709fdcc17e22767818c6e5fef4e309adc3e" + end + + # 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. + depends_on "automake" => :build + + uses_from_macos "ncurses" + + def install + # Workaround for newer Clang + ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500 + + ENV.deparallelize + + %w[config.guess config.sub].each do |fn| + cp "#{Formula["automake"].opt_prefix}/share/automake-#{Formula["automake"].version.major_minor}/#{fn}", fn + end + + # Fix hard coded flat namespace usage in configure. + inreplace "configure", "-flat_namespace -undefined suppress", "-undefined dynamic_lookup" + + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char *argv[]) { + GetLine *gl; + setlocale(LC_CTYPE, ""); + gl = new_GetLine(1024, 2048); + if (!gl) return 1; + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-ltecla", "-lcurses", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libtensorflow.rb b/Formula/lib/libtensorflow.rb new file mode 100644 index 0000000000000..9518cf1e9bd51 --- /dev/null +++ b/Formula/lib/libtensorflow.rb @@ -0,0 +1,156 @@ +class Libtensorflow < Formula + desc "C interface for Google's OS library for Machine Intelligence" + homepage "https://www.tensorflow.org/" + url "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.19.0.tar.gz" + sha256 "4691b18e8c914cdf6759b80f1b3b7f3e17be41099607ed0143134f38836d058e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1bf7b3c26c250f360644872a55d62bd004d9942d7fafc8b4919c4ec35f62a65d" + sha256 cellar: :any, arm64_sonoma: "3791602f5afcc011af9b4af29ec426d1c562cd714acde446f23bdead8d71f1ce" + sha256 cellar: :any, arm64_ventura: "5c014042a2f83884cd76a05b8d1b50d7ff888381c60ca91ff6dff4305cc8841f" + sha256 cellar: :any, sonoma: "f1e9d7d80dfbe576c05c845979110d4233eb5dc76280384653d957ec99c17947" + sha256 cellar: :any, ventura: "22aa1c72047649b2523889072290a0612111dddfa91529e74a78e56e4b8852f7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b335f3b7c4182aa7174cbf945440f8771f2fd997c22676b60e88badefc3c0aa" + end + + depends_on "bazelisk" => :build + depends_on "numpy" => :build + depends_on "python@3.12" => :build # Python 3.13: https://github.com/tensorflow/tensorflow/issues/78774 + + on_macos do + depends_on "gnu-getopt" => :build + end + + def install + python3 = "python3.12" + optflag = if Hardware::CPU.arm? && OS.mac? + "-mcpu=apple-m1" + elsif build.bottle? + "-march=#{Hardware.oldest_cpu}" + else + "-march=native" + end + ENV["CC_OPT_FLAGS"] = optflag + ENV["PYTHON_BIN_PATH"] = which(python3) + ENV["TF_IGNORE_MAX_BAZEL_VERSION"] = "1" + ENV["TF_NEED_JEMALLOC"] = "1" + ENV["TF_NEED_GCP"] = "0" + ENV["TF_NEED_HDFS"] = "0" + ENV["TF_ENABLE_XLA"] = "0" + ENV["USE_DEFAULT_PYTHON_LIB_PATH"] = "1" + ENV["TF_NEED_OPENCL"] = "0" + ENV["TF_NEED_CUDA"] = "0" + ENV["TF_NEED_MKL"] = "0" + ENV["TF_NEED_VERBS"] = "0" + ENV["TF_NEED_MPI"] = "0" + ENV["TF_NEED_S3"] = "1" + ENV["TF_NEED_GDR"] = "0" + ENV["TF_NEED_KAFKA"] = "0" + ENV["TF_NEED_OPENCL_SYCL"] = "0" + ENV["TF_NEED_ROCM"] = "0" + ENV["TF_NEED_CLANG"] = "0" if OS.linux? + ENV["TF_DOWNLOAD_CLANG"] = "0" + ENV["TF_SET_ANDROID_WORKSPACE"] = "0" + ENV["TF_CONFIGURE_IOS"] = "0" + system "./configure" + + bazel_args = %W[ + --jobs=#{ENV.make_jobs} + --compilation_mode=opt + --copt=#{optflag} + --linkopt=-Wl,-rpath,#{rpath} + --verbose_failures + ] + if OS.linux? + pyver = Language::Python.major_minor_version python3 + env_path = "#{Formula["python@#{pyver}"].opt_libexec}/bin:#{HOMEBREW_PREFIX}/bin:/usr/bin:/bin" + bazel_args += %W[ + --action_env=PATH=#{env_path} + --host_action_env=PATH=#{env_path} + ] + end + targets = %w[ + //tensorflow/tools/lib_package:libtensorflow + //tensorflow/tools/benchmark:benchmark_model + //tensorflow/tools/graph_transforms:summarize_graph + //tensorflow/tools/graph_transforms:transform_graph + ] + system Formula["bazelisk"].opt_bin/"bazelisk", "build", *bazel_args, *targets + + bin.install %w[ + bazel-bin/tensorflow/tools/benchmark/benchmark_model + bazel-bin/tensorflow/tools/graph_transforms/summarize_graph + bazel-bin/tensorflow/tools/graph_transforms/transform_graph + ] + system "tar", "-C", prefix, "-xzf", "bazel-bin/tensorflow/tools/lib_package/libtensorflow.tar.gz" + + ENV.prepend_path "PATH", Formula["gnu-getopt"].opt_prefix/"bin" if OS.mac? + system "tensorflow/c/generate-pc.sh", "--prefix", prefix, "--version", version.to_s + (lib/"pkgconfig").install "tensorflow.pc" + end + + test do + resource "homebrew-test-model" do + url "https://github.com/tensorflow/models/raw/v1.13.0/samples/languages/java/training/model/graph.pb" + sha256 "147fab50ddc945972818516418942157de5e7053d4b67e7fca0b0ada16733ecb" + end + + (testpath/"test.c").write <<~C + #include + #include + int main() { + printf("%s", TF_Version()); + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-ltensorflow", "-o", "test_tf" + assert_equal version, shell_output("./test_tf") + + resource("homebrew-test-model").stage(testpath) + + summarize_graph_output = shell_output("#{bin}/summarize_graph --in_graph=#{testpath}/graph.pb 2>&1") + variables_match = /Found \d+ variables:.+$/.match(summarize_graph_output) + refute_nil variables_match, "Unexpected stdout from summarize_graph for graph.pb (no found variables)" + variables_names = variables_match[0].scan(/name=([^,]+)/).flatten.sort + + transform_command = %W[ + #{bin}/transform_graph + --in_graph=#{testpath}/graph.pb + --out_graph=#{testpath}/graph-new.pb + --inputs=n/a + --outputs=n/a + --transforms="obfuscate_names" + 2>&1 + ].join(" ") + shell_output(transform_command) + + assert_path_exists testpath/"graph-new.pb", "transform_graph did not create an output graph" + + new_summarize_graph_output = shell_output("#{bin}/summarize_graph --in_graph=#{testpath}/graph-new.pb 2>&1") + new_variables_match = /Found \d+ variables:.+$/.match(new_summarize_graph_output) + refute_nil new_variables_match, "Unexpected summarize_graph output for graph-new.pb (no found variables)" + new_variables_names = new_variables_match[0].scan(/name=([^,]+)/).flatten.sort + + refute_equal variables_names, new_variables_names, "transform_graph didn't obfuscate variable names" + + benchmark_model_match = /benchmark_model -- (.+)$/.match(new_summarize_graph_output) + refute_nil benchmark_model_match, + "Unexpected summarize_graph output for graph-new.pb (no benchmark_model example)" + + benchmark_model_args = benchmark_model_match[1].split + benchmark_model_args.delete("--show_flops") + + benchmark_model_command = [ + "#{bin}/benchmark_model", + "--time_limit=10", + "--num_threads=1", + *benchmark_model_args, + "2>&1", + ].join(" ") + + assert_includes shell_output(benchmark_model_command), + "Timings (microseconds):", + "Unexpected benchmark_model output (no timings)" + end +end diff --git a/Formula/lib/libtermkey.rb b/Formula/lib/libtermkey.rb new file mode 100644 index 0000000000000..c49f3797847d2 --- /dev/null +++ b/Formula/lib/libtermkey.rb @@ -0,0 +1,62 @@ +class Libtermkey < Formula + desc "Library for processing keyboard entry from the terminal" + homepage "https://www.leonerd.org.uk/code/libtermkey/" + url "https://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz" + sha256 "6945bd3c4aaa83da83d80a045c5563da4edd7d0374c62c0d35aec09eb3014600" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?libtermkey[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "8c57ec64138dc53f48eb64c8dcfb06c3da89bd5cf9cdd2c6187adb2d7b09c3d4" + sha256 cellar: :any, arm64_sonoma: "e11c08c04ff726e2bd6cd5138bc739e0caa1f64f35e79aa640916a5e312c877c" + sha256 cellar: :any, arm64_ventura: "7d8785550b878770b207750a28a857906ddcca4dd23ad01d2c1c342adca32e2a" + sha256 cellar: :any, arm64_monterey: "7ffaeabbe372926ca45094684424add804cb1a8140c88a19115e7e41e02dedc9" + sha256 cellar: :any, arm64_big_sur: "fc0c8e944f2a0e93500e6b93823b685aa085badbf298cf933ef2be6c615ab9a1" + sha256 cellar: :any, sonoma: "507c7f87470c6d1b1135738fef8cc8776d28feb2fe00d40083a316d139bbbcb1" + sha256 cellar: :any, ventura: "78d8398b5a79c26bf5b6cb85d71293309ed5533abd6de7ab0ff5d0b77bbfd4d6" + sha256 cellar: :any, monterey: "4acf8f693e3ca76abb35a77f32edd5f54dbe47419fa690a9c32c396536a30b00" + sha256 cellar: :any, big_sur: "4a463c5f31b1748ce885716a2f709f3ff1791725bb67e71bd9b44080148d6ff2" + sha256 cellar: :any, catalina: "d011f1ac8c14c605e8614cac5328a8b41f0a8f5775d8919104d1495acdc9e135" + sha256 cellar: :any_skip_relocation, arm64_linux: "34ca685938466b3866c5a986b40dfb762c19fbd0a050f1c5c61b4884f7446a28" + sha256 cellar: :any_skip_relocation, x86_64_linux: "359504c1b88e079ed34f73484c6196c5e5a2f6ca402088cbb7a537177cc22f93" + end + + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "unibilium" + + uses_from_macos "ncurses" + + on_linux do + depends_on "glib" => :build + end + + def install + system "make", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + end + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + TermKey *tk = termkey_new(0, 0); + if (tk == NULL) { + fprintf(stderr, "Failed to initialize libtermkey\\n"); + return 1; + } + termkey_destroy(tk); + printf("libtermkey initialized and destroyed successfully\\n"); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-ltermkey", "-I#{include}" + assert_match "libtermkey initialized and destroyed successfully", shell_output("./test") + end +end diff --git a/Formula/lib/libtextcat.rb b/Formula/lib/libtextcat.rb new file mode 100644 index 0000000000000..cf908fb72dd8c --- /dev/null +++ b/Formula/lib/libtextcat.rb @@ -0,0 +1,54 @@ +class Libtextcat < Formula + desc "N-gram-based text categorization library" + homepage "https://software.wise-guys.nl/libtextcat/" + url "https://software.wise-guys.nl/download/libtextcat-2.2.tar.gz" + mirror "https://src.fedoraproject.org/repo/pkgs/libtextcat/libtextcat-2.2.tar.gz/128cfc86ed5953e57fe0f5ae98b62c2e/libtextcat-2.2.tar.gz" + sha256 "5677badffc48a8d332e345ea4fe225e3577f53fc95deeec8306000b256829655" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "b470b7355ee704a07a4768b12909b0c80501f241c57f257d4639147b0fda41eb" + sha256 cellar: :any, arm64_sonoma: "cc83f030e51cc9de7708c72e452fc0064c21cfbeb3b83e15970901c26f1e1cb0" + sha256 cellar: :any, arm64_ventura: "e5d60db841a6a8bd707de17b8e6e67f7113a9c8b54a1a614342f77797cbb041b" + sha256 cellar: :any, arm64_monterey: "af621f1b2cfa2e6463bad63f3b7dbb77c928881dee5e41425489687c4849ceb0" + sha256 cellar: :any, arm64_big_sur: "a7d4587c077074798e16772f893cea69a90a99ff89b6071690a9980083b55e93" + sha256 cellar: :any, sonoma: "6589bf1866b9cf1e31aac4c96f93bd0167e11fa087f3bfb0dda9fdf6a7e373af" + sha256 cellar: :any, ventura: "fe31ac7c58baef452610658a4782c36300b4751b3cd360ed4b084efa952e6e0a" + sha256 cellar: :any, monterey: "6fc8d211fac04b40a803243f2d00e55c830a2f8cc12c9a2006f91efc0fdf7b62" + sha256 cellar: :any, big_sur: "894a917a9328865a92e965cb1bb4e5d74d8073299c501aba30e443a5451c5718" + sha256 cellar: :any, catalina: "9e178bd2a1479fb8d7be57c03b0bad722fbb94221d50b4b807bd6c89126492f2" + sha256 cellar: :any, mojave: "02d7f744996abfda8bd85b4580c5a92a8bd89ad6cc06e2848caa9b3b0e858144" + sha256 cellar: :any, high_sierra: "7997ea512b672f165e1e53e941147e9a520a9ab5d71b8b22e4a71622690e7cdb" + sha256 cellar: :any, sierra: "24fe8791549204d8ef6e596fc327fbd3a645c729b440ba31ef47cf545f6f5b30" + sha256 cellar: :any, el_capitan: "afa51f83d0a3c96ffc6f6c35011c864347f31d2c3aea987102c59f0257177072" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2104f4e2ec57f7f63de0e6f68d7b2dae82c6912146c17908f4fc1625a17bc7c5" + end + + disable! date: "2025-01-01", because: :repo_removed + + 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 + system "make", "install" + (include/"libtextcat/").install Dir["src/*.h"] + share.install "langclass/LM", "langclass/ShortTexts", "langclass/conf.txt" + end + + test do + output = pipe_output(bin/"createfp", "abcdefghijklmnopqrstuvwxyz").lines + expected = %w[ + _ rstuv opqr mno nopqr g y b c d e f u h i j k l m n o p q r s t xyz v w x a z lmnop efg jklmn hijkl defg fghij + defgh hijk vwx bcdef lmno nop pqrs fgh tuvw xyz_ wxy opq ghi cdef _ab ghij nopq klmn pqr _a _abcd ab _abc bc + pqrst cd hij de ef fg gh hi ij jk stuv kl lm mn wxyz_ no op pq qr uvwxy yz_ rs wxyz st tu uv stuvw vw wx xy yz + z_ qrstu qrs opqrs mnopq ijk klmno bcde ijklm abc ghijk fghi efghi cdefg jklm abcde rst uvw jkl rstu bcd vwxy + stu klm abcd cde efgh ijkl tuv mnop lmn qrst def uvwx vwxyz tuvwx + ].map! { |line| "#{line}\n" } + + assert_equal expected, output + end +end diff --git a/Formula/lib/libtickit.rb b/Formula/lib/libtickit.rb new file mode 100644 index 0000000000000..c49078cea3120 --- /dev/null +++ b/Formula/lib/libtickit.rb @@ -0,0 +1,50 @@ +class Libtickit < Formula + desc "Library for building interactive full-screen terminal programs" + homepage "https://www.leonerd.org.uk/code/libtickit/" + url "https://www.leonerd.org.uk/code/libtickit/libtickit-0.4.5.tar.gz" + sha256 "8f3d9ec4a8fcfa57425621eb21dc7c6cefc2f24b2a93d28db0ace9d1eab627c6" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?libtickit[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "51f8cb2afcb7f3ddf657cf19f3443d137d446f4cb507a5e9832321a978aaa65a" + sha256 cellar: :any, arm64_sonoma: "6ec0c3165a73423aa8e34fe65319418fb116768b7b71115341a1bcc4a5c6ffe3" + sha256 cellar: :any, arm64_ventura: "c105a349bb5d28ea65b1ae84f6f1f8490cf6476ed5060b1b630ec95b9dcfa7ab" + sha256 cellar: :any, sonoma: "10dc3acf43ae29195233e836585da752b48e46e57baaea697217724309bfdfa8" + sha256 cellar: :any, ventura: "60e09a74122d538fbd5908b73325751ef74b7b4266785bcf7e34b00b2d6542c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "3d883629a90f2ff74a67fd9f0b7e0778cda2894d0b6e22887b164f500516a619" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a10701b8ac09fe1cd30ace8bad096ac9916b8f266a07af0ba162c8ce4cb0e8e7" + end + + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libtermkey" + depends_on "unibilium" + + def install + system "make", "PREFIX=#{prefix}" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"test_libtickit.c").write <<~C + #include + #include + int main(void) { + printf("%d.%d.%d", tickit_version_major(), tickit_version_minor(), tickit_version_patch()); + return 0; + } + C + + ENV.append "CFLAGS", "-I#{include}" + ENV.append "LDFLAGS", "-L#{lib}" + ENV.append "LDLIBS", "-ltickit" + system "make", "test_libtickit" + + assert_equal version.to_s, shell_output("./test_libtickit") + end +end diff --git a/Formula/lib/libtiff.rb b/Formula/lib/libtiff.rb new file mode 100644 index 0000000000000..61ee548d3a87c --- /dev/null +++ b/Formula/lib/libtiff.rb @@ -0,0 +1,64 @@ +class Libtiff < Formula + desc "TIFF library and utilities" + homepage "https://libtiff.gitlab.io/libtiff/" + url "https://download.osgeo.org/libtiff/tiff-4.7.0.tar.gz" + mirror "https://fossies.org/linux/misc/tiff-4.7.0.tar.gz" + sha256 "67160e3457365ab96c5b3286a0903aa6e78bdc44c4bc737d2e486bcecb6ba976" + license "libtiff" + + livecheck do + url "https://download.osgeo.org/libtiff/" + regex(/href=.*?tiff[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "5f771cedcb37119c3927c32d72589a66701db16fe3ef86b2daf9b87c3142b309" + sha256 cellar: :any, arm64_sonoma: "7400825c55ab3f7aef5c0571d59bd62ffc509a5252784c08034df07995cb9e71" + sha256 cellar: :any, arm64_ventura: "b8952fb7bfabe979c42b9742cd959e5ba33bab2f8e44c536b9f5f6346190c33a" + sha256 cellar: :any, sonoma: "5610196cb9396c468513adc5bc7c4834a3f475ff6f3ebd98f77e3f8b2123da3e" + sha256 cellar: :any, ventura: "93fdbce17863cff383485295a955eae308f3bfc0f6b83d311645c5830a9964ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "befd41fd96bb263a78cdead93f8eff8320f911467bc4022add19150ec0b9d876" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e873d7ab4e4159cd3ee973a2ec9cf7530fa3679abb8968832269dd206dea6859" + end + + depends_on "jpeg-turbo" + depends_on "xz" + depends_on "zstd" + uses_from_macos "zlib" + + def install + args = %W[ + --prefix=#{prefix} + --disable-dependency-tracking + --disable-webp + --enable-zstd + --enable-lzma + --with-jpeg-include-dir=#{Formula["jpeg-turbo"].opt_include} + --with-jpeg-lib-dir=#{Formula["jpeg-turbo"].opt_lib} + --without-x + ] + system "./configure", *args + system "make", "install" + + # Avoid rebuilding dependents that hard-code the prefix. + inreplace lib/"pkgconfig/libtiff-4.pc", prefix, opt_prefix + end + + test do + (testpath/"test.c").write <<~C + #include + + int main(int argc, char* argv[]) + { + TIFF *out = TIFFOpen(argv[1], "w"); + TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) 10); + TIFFClose(out); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-ltiff", "-o", "test" + system "./test", "test.tif" + assert_match(/ImageWidth.*10/, shell_output("#{bin}/tiffdump test.tif")) + end +end diff --git a/Formula/lib/libtins.rb b/Formula/lib/libtins.rb new file mode 100644 index 0000000000000..8d74d82bb56e7 --- /dev/null +++ b/Formula/lib/libtins.rb @@ -0,0 +1,47 @@ +class Libtins < Formula + desc "C++ network packet sniffing and crafting library" + homepage "https://libtins.github.io/" + url "https://github.com/mfontanini/libtins/archive/refs/tags/v4.5.tar.gz" + sha256 "6ff5fe1ada10daef8538743dccb9c9b3e19d05d028ffdc24838e62ff3fc55841" + license "BSD-2-Clause" + head "https://github.com/mfontanini/libtins.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5cb848c245b9b880eb92a07133a8ec40238f08cc88ab9707805368efcc4bdf9d" + sha256 cellar: :any, arm64_sonoma: "12126120e038b274429c55f65891dd2eef0bdcb96cf728de5f3fb80b863896f4" + sha256 cellar: :any, arm64_ventura: "2c1278e057086dc562909a6e748d782d269cb1969e64841daa0e260ecbdec343" + sha256 cellar: :any, arm64_monterey: "fb3bcc8fe5fc54313c85eb70e579b649b6c27a73a1486fc84913188ddf8218db" + sha256 cellar: :any, arm64_big_sur: "62c5cbbc6883db588cc36570b78c38a83b730457450cc5e7dc492587af01147f" + sha256 cellar: :any, sonoma: "6910d2c7380fbd8fcf2f0b4da28409f934c29dcfe7593ccd213c2eaa3fd4b6dd" + sha256 cellar: :any, ventura: "609b84f055cac0e8c5633dae7ef910c65954ed009c1fd0d093d6b06f1a2a3661" + sha256 cellar: :any, monterey: "a474a01dc33b7daf906ae1b4fedcb5615b35892ddc12efbd497baa8a33ce7bff" + sha256 cellar: :any, big_sur: "b14d2403f2e8f6d2906df5843f6532556a3e7ebe84c558fc55ec0acea7938317" + sha256 cellar: :any_skip_relocation, arm64_linux: "c011d72ea5ddb35f6896b7f6862513adcedd91f632664802ec59bdc1352c62e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bf78cf582a5f1411a8103f91a2c787422a790c2a821dffe949d7c97bd888888e" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + + uses_from_macos "libpcap" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DLIBTINS_BUILD_EXAMPLES=OFF", + "-DLIBTINS_BUILD_TESTS=OFF", + "-DLIBTINS_ENABLE_CXX11=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + Tins::Sniffer sniffer("en0"); + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-ltins", "-o", "test" + end +end diff --git a/Formula/lib/libtirpc.rb b/Formula/lib/libtirpc.rb new file mode 100644 index 0000000000000..e1bf1afe0a376 --- /dev/null +++ b/Formula/lib/libtirpc.rb @@ -0,0 +1,46 @@ +class Libtirpc < Formula + desc "Port of Sun's Transport-Independent RPC library to Linux" + homepage "https://sourceforge.net/projects/libtirpc/" + url "https://downloads.sourceforge.net/project/libtirpc/libtirpc/1.3.6/libtirpc-1.3.6.tar.bz2" + sha256 "bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "c16ef4d7037e9f47895388ed87cabd6204ec34131e0093267f6526eed8f9ee6c" + sha256 cellar: :any, arm64_sonoma: "8ee7ac3b3b1df398b032656eccd643b5acc54d7e02959f1615690ecde92116e1" + sha256 cellar: :any, arm64_ventura: "75b9446214bec564b88e7d765cffb241497d1ae41e349fd6f584de3d8cbc5c26" + sha256 cellar: :any, sonoma: "72e659c72370584a373cc916acafe7a51db67a10ad7c8fbaa9fc311fc49ff790" + sha256 cellar: :any, ventura: "7a87780cba64ee5fa5e65686d4bcc51236ccf4b33a11c8732d0ad59ad7b003c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "016bd1553348df8e15bc09280a00b40562da46aa875f9741292f129bd0666467" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93daf0554770cfcd883a74d9bcbb208702c23b8d90d0c1daa9b040be52b9657c" + end + + depends_on "krb5" + + def install + ENV.append_to_cflags "-D__APPLE_USE_RFC_3542" if OS.mac? + system "./configure", "--disable-silent-rules", *std_configure_args.reject { |s| s["--disable-debug"] } + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main() { + XDR xdr; + char buf[256]; + xdrmem_create(&xdr, buf, sizeof(buf), XDR_ENCODE); + int i = 42; + xdr_destroy(&xdr); + printf("xdr_int succeeded"); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}/tirpc", "-ltirpc", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libtomcrypt.rb b/Formula/lib/libtomcrypt.rb new file mode 100644 index 0000000000000..edf0ce476e8ff --- /dev/null +++ b/Formula/lib/libtomcrypt.rb @@ -0,0 +1,79 @@ +class Libtomcrypt < Formula + desc "Comprehensive, modular and portable cryptographic toolkit" + homepage "https://www.libtom.net/" + url "https://github.com/libtom/libtomcrypt/archive/refs/tags/v1.18.2.tar.gz" + sha256 "d870fad1e31cb787c85161a8894abb9d7283c2a654a9d3d4c6d45a1eba59952c" + license "Unlicense" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "3572bea96ce1e844e910c3e5ec392de56a789a581dfb1860169c7c30d94359fb" + sha256 cellar: :any, arm64_sonoma: "2743b90014a43cb92757b4b4be23cbcd231d821702e680f15180513cf3030af1" + sha256 cellar: :any, arm64_ventura: "d1f46d9db67ffb4b33d3419aba1e6e870a9a802b83df1d2aa15c4e6fd32f336a" + sha256 cellar: :any, arm64_monterey: "59af3e5207ab67b8a0d16f2014516198a299b3acec8181a3b0779ce4161b73ed" + sha256 cellar: :any, arm64_big_sur: "b44213ca06c3cd177563cd22daf8cbb912fca0dfd754c69e86851af5a0b35cc3" + sha256 cellar: :any, sonoma: "6b0591e8b409b44cc5cd7eeca0e4562b573b8e2eb4d07bcf5332a7085e107ab4" + sha256 cellar: :any, ventura: "5fd60ad0923f5288a69d6dfd21b240bf8de82b261567992a1ff064484130a25e" + sha256 cellar: :any, monterey: "90264e0441e4796b20e7c13dca05149e582f77187cea53c333f8839417992bd0" + sha256 cellar: :any, big_sur: "53181a23459d9a55cdcf9f0283310d3b6ceb9049239c0a223e74202481de7300" + sha256 cellar: :any_skip_relocation, arm64_linux: "7118ecc3f9a3986ee0fa6fd49e54d844092c5ead298e59dd6b9adb6a21b37653" + sha256 cellar: :any_skip_relocation, x86_64_linux: "27294aefd23c971546ba62354ee81327a45f84ae4bf5e953c0397def99dfce51" + end + + depends_on "libtool" => :build + depends_on "gmp" + depends_on "libtommath" + + def install + ENV.append_to_cflags "-DUSE_GMP -DGMP_DESC -DUSE_LTM -DLTM_DESC" + ENV.append "EXTRALIBS", "-lgmp -ltommath" + system "make", "-f", "makefile.shared" + system "make", "-f", "makefile.shared", "test" + system "./test" + system "make", "-f", "makefile.shared", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + + #define AES128_KEY_SIZE 16 + #define AES_BLOCK_SIZE 16 + + static const uint8_t key[AES128_KEY_SIZE] = + {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F}; + static const uint8_t plain[AES_BLOCK_SIZE] = + {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF}; + static const uint8_t cipher[AES_BLOCK_SIZE] = + {0x69, 0xC4, 0xE0, 0xD8, 0x6A, 0x7B, 0x04, 0x30, 0xD8, 0xCD, 0xB7, 0x80, 0x70, 0xB4, 0xC5, 0x5A}; + + int main(int argc, char* argv []) + { + symmetric_key skey; + uint8_t encrypted[AES_BLOCK_SIZE]; + uint8_t decrypted[AES_BLOCK_SIZE]; + + register_all_ciphers(); + if (aes_setup(key, AES128_KEY_SIZE, 0, &skey) == CRYPT_OK && + aes_ecb_encrypt(plain, encrypted, &skey) == CRYPT_OK && + memcmp(encrypted, cipher, AES_BLOCK_SIZE) == 0 && + aes_ecb_decrypt(encrypted, decrypted, &skey) == CRYPT_OK && + memcmp(decrypted, plain, AES_BLOCK_SIZE) == 0) + { + printf("passed\\n"); + return EXIT_SUCCESS; + } + else { + printf("failed\\n"); + return EXIT_FAILURE; + } + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-ltomcrypt", "-o", "test" + assert_equal "passed", shell_output("./test").strip + end +end diff --git a/Formula/lib/libtommath.rb b/Formula/lib/libtommath.rb new file mode 100644 index 0000000000000..592195dcd35b6 --- /dev/null +++ b/Formula/lib/libtommath.rb @@ -0,0 +1,44 @@ +class Libtommath < Formula + desc "C library for number theoretic multiple-precision integers" + homepage "https://www.libtom.net/LibTomMath/" + url "https://github.com/libtom/libtommath/releases/download/v1.3.0/ltm-1.3.0.tar.xz" + sha256 "296272d93435991308eb73607600c034b558807a07e829e751142e65ccfa9d08" + license "Unlicense" + head "https://github.com/libtom/libtommath.git", branch: "develop" + + bottle do + sha256 cellar: :any, arm64_sequoia: "180de0f47bf4ce7ec3a513db509d368e148b42e50cf310666bf9c60a78cf778b" + sha256 cellar: :any, arm64_sonoma: "6b17949dbb9a6a751816e0a39f441a6028b680d15960fe3fdb6686721dac70f3" + sha256 cellar: :any, arm64_ventura: "ebd34b24dcd868425c2ef5496fdb8d48c852c702cdd0cb77f2d9be123b308163" + sha256 cellar: :any, arm64_monterey: "1e5ac48668cad1a316975799e6467708b5b0e20472ab7dca7bc167e9348e6f89" + sha256 cellar: :any, sonoma: "cba9f676decfce08aedbc85a2caf32603d93eb186e93b2af1e96fe8bf595b11f" + sha256 cellar: :any, ventura: "b0e54d27c97e9bad7b9377cb2ba3621c59c5ecd2e231d71b2181316febb008b5" + sha256 cellar: :any, monterey: "edc215c19f0ee0fd1daa89879a7bc933bf25ddee3b374e4e7b60a8acbaa6f5c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "99f57fc8332837cb3574ed6b078763693050495a233907bcb9c4b63198414e57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a7023ad5964a1ccfbbbe850cb0979ffa220a65177efd87e0bb751bcf5a3832ba" + end + + depends_on "libtool" => :build + + # Fixes mp_set_double being missing on macOS. + # This is needed by some dependents in homebrew-core. + # NOTE: This patch has been merged upstream but we take a backport + # from a fork due to file name differences between 1.2.0 and master. + # Remove with the next version. + patch do + url "https://github.com/MoarVM/libtommath/commit/db0d387b808d557bd408a6a253c5bf3a688ef274.patch?full_index=1" + sha256 "e5eef1762dd3e92125e36034afa72552d77f066eaa19a0fd03cd4f1a656f9ab0" + end + + def install + ENV["PREFIX"] = prefix + + system "make", "-f", "makefile.shared", "install" + system "make", "test" + pkgshare.install "test" + end + + test do + system pkgshare/"test" + end +end diff --git a/Formula/lib/libtool.rb b/Formula/lib/libtool.rb new file mode 100644 index 0000000000000..881ebc976042a --- /dev/null +++ b/Formula/lib/libtool.rb @@ -0,0 +1,76 @@ +class Libtool < Formula + desc "Generic library support script" + homepage "https://www.gnu.org/software/libtool/" + url "https://ftp.gnu.org/gnu/libtool/libtool-2.5.4.tar.xz" + mirror "https://ftpmirror.gnu.org/libtool/libtool-2.5.4.tar.xz" + sha256 "f81f5860666b0bc7d84baddefa60d1cb9fa6fceb2398cc3baca6afaa60266675" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f21ea809c3bdc0aa1b25dce05dc05bebd228adb213957df244bf00af760392ef" + sha256 cellar: :any, arm64_sonoma: "b78cea0747889cff2d5d5308cf2cfebef93f8fe3a5ad87cbadb5ee16f8dbc6a6" + sha256 cellar: :any, arm64_ventura: "f30240dd2c3b9c42be0f4a0dc4f8a9ceabd0d12f28db8e3650076f8d1c59a7bc" + sha256 cellar: :any, sequoia: "b86376ec9504b188528c074fb1c5ade15679402ed1e4b20a99b2ac2235780717" + sha256 cellar: :any, sonoma: "fc28339b3192a79d41f5b67f53f5d232dfed48de66b464c02f21d64536da86d8" + sha256 cellar: :any, ventura: "5ef401943faf0ebe8c57542bcd4ff976419f9ff67ce1b67e3c5c0b2cf0fa69df" + sha256 cellar: :any_skip_relocation, arm64_linux: "deecc3ded6794f5ab08b785aa8a1800b3559376a61d369a6798b29e6568c7429" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cad7f708b11b5bc65f08dadaab2f3f8c51eb2267efc0cc20ad9a4ce9f7c8134e" + end + + depends_on "m4" + + def install + ENV["M4"] = Formula["m4"].opt_bin/"m4" + + args = %w[ + --disable-silent-rules + --enable-ltdl-install + ] + args << "--program-prefix=g" if OS.mac? + + system "./configure", *args, *std_configure_args + system "make", "install" + + if OS.mac? + %w[libtool libtoolize].each do |prog| + (libexec/"gnubin").install_symlink bin/"g#{prog}" => prog + (libexec/"gnuman/man1").install_symlink man1/"g#{prog}.1" => "#{prog}.1" + end + (libexec/"gnubin").install_symlink "../gnuman" => "man" + else + bin.install_symlink "libtool" => "glibtool" + bin.install_symlink "libtoolize" => "glibtoolize" + + # Avoid references to the Homebrew shims directory + inreplace bin/"libtool", Superenv.shims_path, "/usr/bin" + end + end + + def caveats + on_macos do + <<~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" + EOS + end + end + + test do + system bin/"glibtool", "execute", File.executable?("/usr/bin/true") ? "/usr/bin/true" : "/bin/true" + + (testpath/"hello.c").write <<~C + #include + int main() { puts("Hello, world!"); return 0; } + C + + system bin/"glibtool", "--mode=compile", "--tag=CC", + ENV.cc, "-c", "hello.c", "-o", "hello.o" + system bin/"glibtool", "--mode=link", "--tag=CC", + ENV.cc, "hello.o", "-o", "hello" + assert_match "Hello, world!", shell_output("./hello") + + system bin/"glibtoolize", "--ltdl" + end +end diff --git a/Formula/lib/libtorrent-rakshasa.rb b/Formula/lib/libtorrent-rakshasa.rb new file mode 100644 index 0000000000000..6834fb30c9b01 --- /dev/null +++ b/Formula/lib/libtorrent-rakshasa.rb @@ -0,0 +1,53 @@ +class LibtorrentRakshasa < Formula + desc "BitTorrent library with a focus on high performance" + homepage "https://github.com/rakshasa/libtorrent" + url "https://github.com/rakshasa/libtorrent/archive/refs/tags/v0.15.3.tar.gz" + sha256 "dd0e011dfe0c37b8a41cfc7a778cc92e52352f1091347ab98e63aa8a5c532dad" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "aae08b9065da39bdd064e40093c036910b82d0027154acf6d962a65da4522471" + sha256 cellar: :any, arm64_sonoma: "0f7313ad11b0cdc8b393822998d72092190c4c00a4bff325a9a0a26a64977dc0" + sha256 cellar: :any, arm64_ventura: "88fb4e3bc74fdcae648065d500e828af08edf7e989184f7aefbcb81fa2d11690" + sha256 cellar: :any, sonoma: "f7f10cac907ca356a8675e959b30b7c395cf283a60af4452e6483f0df5b47e4a" + sha256 cellar: :any, ventura: "f39089fd6cebb5801e690bca5478cbf16fdc65869561d63deb2fa3977878ca51" + sha256 cellar: :any_skip_relocation, arm64_linux: "ddafcff4313b0e209d382cd8fd823c549a2e25a3b0c28fc4e9dfae879d51d733" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb092fecdecfca889ccf075a8a139b8827798272898d084b6ac58055e0789d19" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "zlib" + + conflicts_with "libtorrent-rasterbar", because: "they both use the same libname" + + def install + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include #{" "} + #include + int main(void) + { + std::cout << torrent::version() << std::endl; + return 0; + } + CPP + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", "-L#{lib}", "-ltorrent" + assert_match version.to_s, shell_output("./test").strip + end +end diff --git a/Formula/lib/libtorrent-rasterbar.rb b/Formula/lib/libtorrent-rasterbar.rb new file mode 100644 index 0000000000000..72cba87850ef7 --- /dev/null +++ b/Formula/lib/libtorrent-rasterbar.rb @@ -0,0 +1,76 @@ +class LibtorrentRasterbar < Formula + desc "C++ bittorrent library with Python bindings" + homepage "https://www.libtorrent.org/" + url "https://github.com/arvidn/libtorrent/releases/download/v2.0.11/libtorrent-rasterbar-2.0.11.tar.gz" + sha256 "f0db58580f4f29ade6cc40fa4ba80e2c9a70c90265cd77332d3cdec37ecf1e6d" + license "BSD-3-Clause" + revision 1 + head "https://github.com/arvidn/libtorrent.git", branch: "RC_2_0" + + livecheck do + url :stable + regex(/^v?(\d+(?:[._]\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5a9c70f259f11ba3f9f2fc25c2c33d74e8d12fd1ac3a8e70304f0cd9c8040050" + sha256 cellar: :any, arm64_sonoma: "a9b2ca32ab12c5ed9a32648a9a401e1a26817105ed230d316453a939358af039" + sha256 cellar: :any, arm64_ventura: "2e3102b5a138e1b6ba5f30f9575f5f66a7f02d4c3df67c71c533dc7b7627be31" + sha256 cellar: :any, sonoma: "e78bb84c2382e17ffb242f67df0a359ea5282d12bd97e451034b8a32467a559f" + sha256 cellar: :any, ventura: "1c3af891fb78a3d5340f819a14692e2eab6e91cdc75dced3f291fa4592c3c9a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "819d9bc5e7ff5c393317e975a2db40264a67093913bc3332f4b67ab1914718f9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "79d40134bb9381e74e9e8d3bda73778535bdb4f816ae7e87c0e9df53409ae6c6" + end + + depends_on "cmake" => :build + depends_on "python-setuptools" => :build + depends_on "boost" + depends_on "boost-python3" + depends_on "openssl@3" + depends_on "python@3.13" + + conflicts_with "libtorrent-rakshasa", because: "they both use the same libname" + + def install + args = %W[ + -DCMAKE_CXX_STANDARD=14 + -Dencryption=ON + -Dpython-bindings=ON + -Dpython-egg-info=ON + -DCMAKE_INSTALL_RPATH=#{lib} + ] + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + libexec.install "examples" + end + + test do + args = [ + "-I#{Formula["boost"].include}/boost", + "-L#{Formula["boost"].lib}", + "-I#{include}", + "-L#{lib}", + "-lpthread", + "-lboost_system", + "-ltorrent-rasterbar", + ] + + if OS.mac? + args += [ + "-framework", + "SystemConfiguration", + "-framework", + "CoreFoundation", + ] + end + + system ENV.cxx, libexec/"examples/make_torrent.cpp", + "-std=c++14", *args, "-o", "test" + system "./test", test_fixtures("test.mp3"), "-o", "test.torrent" + assert_path_exists testpath/"test.torrent" + + system "python3.13", "-c", "import libtorrent" + end +end diff --git a/Formula/lib/libtpms.rb b/Formula/lib/libtpms.rb new file mode 100644 index 0000000000000..b80dc03dea071 --- /dev/null +++ b/Formula/lib/libtpms.rb @@ -0,0 +1,47 @@ +class Libtpms < Formula + desc "Library for software emulation of a Trusted Platform Module" + homepage "https://github.com/stefanberger/libtpms" + url "https://github.com/stefanberger/libtpms/archive/refs/tags/v0.10.0.tar.gz" + sha256 "6da9a527b3afa7b1470acd4cd17157b8646c31a2c7ff3ba2dfc50c81ba413426" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6f5a66d3f83cc1c539568a90675c0da2a65674af5b68f32e2c04763745bd7e5d" + sha256 cellar: :any, arm64_sonoma: "08a0433d4293dbee5e39420e62dcb598e56ca38a664645ae92674bbd1aed38aa" + sha256 cellar: :any, arm64_ventura: "2b7d2684a14c0303fc1b83a6222671cc71c7b1e3122128ee0e2f7ecb78f5192b" + sha256 cellar: :any, sonoma: "aa207e4c785c6c68b1d9262b5c1093c42fc291b65013ad863beb346a302d9a67" + sha256 cellar: :any, ventura: "38fb8b2db3308dc8d9ab4d63d49a00ce7516104a1f08d6ff7fff0c6d1f04ea24" + sha256 cellar: :any_skip_relocation, arm64_linux: "7777b9db275770b7a458765e3a3b28c1b82204e6a44831e519d1ddf2712ca3ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb295d9cfe3986180f5c5c4e320b2dc5fb368fa2f5ca68fa13696755ddac37dd" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + def install + system "./autogen.sh", "--with-openssl", "--with-tpm2", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + TPM_RESULT res = TPMLIB_ChooseTPMVersion(TPMLIB_TPM_VERSION_2); + if (res) { + TPMLIB_Terminate(); + return 1; + } + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-ltpms", "-o", "test" + system "./test" + end +end diff --git a/Formula/libtrace.rb b/Formula/lib/libtrace.rb similarity index 76% rename from Formula/libtrace.rb rename to Formula/lib/libtrace.rb index 319aa5b31de20..890e3dfc98a49 100644 --- a/Formula/libtrace.rb +++ b/Formula/lib/libtrace.rb @@ -1,32 +1,55 @@ class Libtrace < Formula desc "Library for trace processing supporting multiple inputs" - homepage "https://research.wand.net.nz/software/libtrace.php" - url "https://research.wand.net.nz/software/libtrace/libtrace-4.0.13.tar.bz2" - sha256 "0215d290c1965e3e91854d47363d532af825ce9f1f031ab06e9cfaab4ecd912b" - license "GPL-3.0" + homepage "https://github.com/LibtraceTeam/libtrace" + url "https://github.com/LibtraceTeam/libtrace/archive/refs/tags/4.0.28-1.tar.gz" + version "4.0.28" + sha256 "94406738d590a4a65172dcb1a1957f00781b793398f212e35e8119598ff95bcc" + license all_of: ["GPL-2.0-or-later", "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 bottle do - cellar :any - sha256 "8878693b0cd0ca15e27e41ce570e0bb16cbfec1e8588fcd976c3c3aab619c81f" => :catalina - sha256 "f5e44c294752e0f067c852f30ba3b472af2c400279ae4df9247aa5e807991a7b" => :mojave - sha256 "64bbb0bb6d8b133720d135c289567fc49b5fdde2f6334a4a49efedc51da1e0e8" => :high_sierra + sha256 cellar: :any, arm64_sequoia: "33385a076780758c33ac37e59d3667304c9733792265ceaf9c7a9c5453a628e6" + sha256 cellar: :any, arm64_sonoma: "5fa670f301736144c77b8bb1c88aae1aff35c1dd5fe0bcb260a086946c14b646" + sha256 cellar: :any, arm64_ventura: "f924814b1274c1d3d21471eb9c49ab2efb61f75e22a61557b7dbbb14d0f7d088" + sha256 cellar: :any, sonoma: "21c92f7c30fdf1fa0ed6aabd48b1777c0fe252dbc73106cb7be465de8ef840e6" + sha256 cellar: :any, ventura: "a5980413f55fefc4f1754526e060520257aae1f70f322d5da291d4ab0501526f" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce2d4b9fa25d3ef6a8e627ee21653eff269cb204dc42b7665b9c70c922e1bb13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb7b948eb96dd83e18188176de55f4964f1d2e27e8f8a3bfab6a6275f99a9cdc" end - depends_on "openssl@1.1" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" depends_on "wandio" - resource "8021x.pcap" do + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "libpcap" + uses_from_macos "ncurses" + + resource "homebrew-8021x.pcap" do url "https://github.com/LibtraceTeam/libtrace/raw/9e82eabc39bc491c74cc4215d7eda5f07b85a8f5/test/traces/8021x.pcap" sha256 "aa036e997d7bec2fa3d387e3ad669eba461036b9a89b79dcf63017a2c4dac725" end def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "./bootstrap.sh" + system "./configure", *std_configure_args + system "make" system "make", "install" end test do - (testpath/"test.c").write <<~EOS + (testpath/"test.c").write <<~C #include #include #include @@ -233,9 +256,9 @@ def install } return 0; } - EOS + C system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-ltrace", "-o", "test" - resource("8021x.pcap").stage testpath + resource("homebrew-8021x.pcap").stage testpath system "./test", testpath/"8021x.pcap" end end diff --git a/Formula/lib/libtrng.rb b/Formula/lib/libtrng.rb new file mode 100644 index 0000000000000..73598771e2a6d --- /dev/null +++ b/Formula/lib/libtrng.rb @@ -0,0 +1,53 @@ +class Libtrng < Formula + desc "Tina's Random Number Generator Library" + homepage "https://www.numbercrunch.de/trng/" + url "https://github.com/rabauke/trng4/archive/refs/tags/v4.27.tar.gz" + sha256 "5d04cc66b7163c869c061c1155e47fe6d54d9a7f1c1fcc0fddecb9269b66a3de" + license "BSD-3-Clause" + head "https://github.com/rabauke/trng4.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "11b03794419841493fa21c0c665500001430158450404de1e9ef092e62305869" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a1bfdc55b371cb19aca7ea1febdc675ba72fb60a6bfe316fdbabca2d6a230df" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aa8dd27d28cee66e6e8b9b1b3e2776301c11c2785125e7a2d830d61338f841b8" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6f9d4aba3f1650ba79184a3d2c959156a90f8b83f545cf53e9264d8e0c623645" + sha256 cellar: :any_skip_relocation, sonoma: "f94814bf56e5b761119f7a33904dd3c4895691018be79c8934ab145622f93b8a" + sha256 cellar: :any_skip_relocation, ventura: "c1a58202bea8f27b2536caa21b8deb2e8262cb79bdea6dd7c59c016793c8c14f" + sha256 cellar: :any_skip_relocation, monterey: "a92a32f26d5aa37518d5833705493fbee25149ed6a80be7f743422cdca9d8316" + sha256 cellar: :any_skip_relocation, arm64_linux: "708d01a459562714fea9eae25da01662acaa5b72c45d177e6e39e37941cc4f53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6280ea4740a8de759219fe78f9a2610b02065c2c16e63c892a60017395b3d1c6" + end + + depends_on "cmake" => :build + + def install + args = %w[ + -DTRNG_ENABLE_TESTS=OFF + -DTRNG_ENABLE_EXAMPLES=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() + { + trng::yarn2 R; + trng::normal_dist<> normal(6.0, 2.0); + (void)normal(R); + return 0; + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-ltrng4" + system "./test" + end +end diff --git a/Formula/lib/libu2f-server.rb b/Formula/lib/libu2f-server.rb new file mode 100644 index 0000000000000..28687d000dc89 --- /dev/null +++ b/Formula/lib/libu2f-server.rb @@ -0,0 +1,76 @@ +class Libu2fServer < Formula + desc "Server-side of the Universal 2nd Factor (U2F) protocol" + homepage "https://developers.yubico.com/libu2f-server/" + url "https://developers.yubico.com/libu2f-server/Releases/libu2f-server-1.1.0.tar.xz" + sha256 "8dcd3caeacebef6e36a42462039fd035e45fa85653dcb2013f45e15aad49a277" + license "BSD-2-Clause" + revision 3 + + livecheck do + url "https://developers.yubico.com/libu2f-server/Releases/" + regex(/href=.*?libu2f-server[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "ba4f595c0638e3c766d45b0bae4ae189482ef6e14611073cee2c805d8ff947aa" + sha256 cellar: :any, arm64_sonoma: "02828c78b609450b8675cda154506543bdd3b6c7290af5ff8dc6031e28d1073f" + sha256 cellar: :any, arm64_ventura: "3ee5815ba1a374c9a85206466bd83b20f5de894ede219927281bf17cf4a1f415" + sha256 cellar: :any, arm64_monterey: "78d60a35c880f7f993f07eb38dc6d1944082ca6325d88c6ee4f22a34fe9cb50f" + sha256 cellar: :any, arm64_big_sur: "8e294e52f4bc809affacf5a39d61eda94851600d345c946c942bbeda202dc607" + sha256 cellar: :any, sonoma: "ac197783bab5879b29b56d80da3c931482313e9e3314fb9c9be7f6a5f083ae0a" + sha256 cellar: :any, ventura: "e69be1150f198f72d7ed21bef98e94ae97eb893b68d09cd09b0f8673f5b800e6" + sha256 cellar: :any, monterey: "d45bdb7ea77081757ae316157db4dea008f06a2998345f6e3c64c98f46830535" + sha256 cellar: :any, big_sur: "f22956d7adce96f3e73bf0e6584f864f2f2aec7137398f5e6a151965f30655fd" + sha256 cellar: :any, catalina: "33ecd6fbd1b611fec3ef7cdf3aeb90ddfce9be4cfb70211add5540faa79556ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "380db415620d20a896929d242dfeceae1ee2588ad8fd18544fef87b3f10a2d0c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c7e4dfb9db89bfc5720aba123638286a77d5d76d9bb108a1bf7b2c1bf01ffa6e" + end + + depends_on "check" => :build + depends_on "gengetopt" => :build + depends_on "help2man" => :build + depends_on "pkgconf" => :build + depends_on "json-c" + depends_on "openssl@3" + + # Compatibility with json-c 0.14. Remove with the next release. + patch do + url "https://github.com/Yubico/libu2f-server/commit/f7c4983b31909299c47bf9b2627c84b6bfe225de.patch?full_index=1" + sha256 "012d1d759604ea80f6075b74dc9c7d8a864e4e5889fb82a222db93a6bd72cd1b" + end + + def install + ENV["LIBSSL_LIBS"] = "-lssl -lcrypto -lz" + ENV["LIBCRYPTO_LIBS"] = "-lcrypto -lz" + ENV["PKG_CONFIG"] = "#{Formula["pkgconf"].opt_bin}/pkg-config" + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() + { + if (u2fs_global_init(U2FS_DEBUG) != U2FS_OK) + { + return 1; + } + + u2fs_ctx_t *ctx; + if (u2fs_init(&ctx) != U2FS_OK) + { + return 1; + } + + u2fs_done(ctx); + u2fs_global_done(); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lu2f-server" + system "./test" + end +end diff --git a/Formula/lib/libucl.rb b/Formula/lib/libucl.rb new file mode 100644 index 0000000000000..444146eb3341e --- /dev/null +++ b/Formula/lib/libucl.rb @@ -0,0 +1,55 @@ +class Libucl < Formula + desc "Universal configuration library parser" + homepage "https://github.com/vstakhov/libucl" + url "https://github.com/vstakhov/libucl/archive/refs/tags/0.9.2.tar.gz" + sha256 "f63ddee1d7f5217cac4f9cdf72b9c5e8fe43cfe5725db13f1414b0d8a369bbe0" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7fb7a6da5d226f44461cc63016b2b0254ec73ee5506772c98d2c9c12eb5be185" + sha256 cellar: :any, arm64_sonoma: "00ca25427fee2390ea39e75173ae8c844b816a21bad5b205d76d7961dc81614e" + sha256 cellar: :any, arm64_ventura: "04ee73714b6d52de15235224a1a4fd72ca07d7e39fc5324e6fcc630a27ecc84f" + sha256 cellar: :any, arm64_monterey: "64174ea202ba8d56e10a61a2835800ad180ae649613184b7e55b801b0a3f260d" + sha256 cellar: :any, sonoma: "404849ecb35a31bc40df771fca0bfe75da4d1b552e1073526d645ad25094f8b6" + sha256 cellar: :any, ventura: "28caf0f7502a50965881748e9d6f66fa0481be2ca8d3bcf75a296621aebfe805" + sha256 cellar: :any, monterey: "b349883d0fdfccac70c706f8a9cf439bb528f59c9f2dbc89a2d3c80d2dfcdcaa" + sha256 cellar: :any_skip_relocation, arm64_linux: "f85409dcfcae075574b158cfc45a43893b3b351885c8d2f1cdb2c5b1a3c79f4d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c28950d57c3275bddb3df7ee14c7ca99f94e49e0baa58be832a17b9928d0ed0d" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + def install + system "./autogen.sh" + + args = %w[ + --disable-silent-rules + --enable-utils + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + + int main(int argc, char **argv) { + const std::string cfg = "foo = bar; section { flag = true; }"; + std::string err; + auto obj = ucl::Ucl::parse(cfg, err); + assert(obj); + assert(obj[std::string("foo")].string_value() == "bar"); + assert(obj[std::string("section")][std::string("flag")].bool_value()); + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lucl", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libuecc.rb b/Formula/lib/libuecc.rb new file mode 100644 index 0000000000000..3a9c59ecfe535 --- /dev/null +++ b/Formula/lib/libuecc.rb @@ -0,0 +1,53 @@ +class Libuecc < Formula + desc "Very small Elliptic Curve Cryptography library" + homepage "https://git.universe-factory.net/fastd/libuecc" + url "https://git.universe-factory.net/fastd/libuecc/archive/v7.tar.gz" + sha256 "80ef381fae912db88a33ebe1b4c7a722b98ed3b1939f75415068b025c5675818" + license "BSD-2-Clause" + head "https://git.universe-factory.net/fastd/libuecc.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a94e6f279789d442ddfce719d48af0c5a430e4d255f9c8dd16b7cb691062988f" + sha256 cellar: :any, arm64_sonoma: "53fdfd07055f10ff583e922b59b5fd2da445ce9f3926ea76b6aaa9da3a036a5b" + sha256 cellar: :any, arm64_ventura: "52bf8320fc75e714e3b8ba3b6421fdb5165ab1719597539d20de7371c2b3a64b" + sha256 cellar: :any, arm64_monterey: "015dfe9431583fd7f8638500cbb3ea7f812feb0c8db8bcb54f60c865ed3ca820" + sha256 cellar: :any, arm64_big_sur: "411158650719304f490887eb4a88d54a6a10ccee7238c7f7a92fb5407c312813" + sha256 cellar: :any, sonoma: "bc1bf4cc33f99950836c0dddc874c854d5db9303b123f0dadeac971b44eabadf" + sha256 cellar: :any, ventura: "59b7963752350f8eeb7b2c57330094648df6089bc0b4dd5b9b5a4515b1cfaf5e" + sha256 cellar: :any, monterey: "d23f6c3cf34a281bc6e206b3f10c52041f51d856fab87a28071afd10a06e3915" + sha256 cellar: :any, big_sur: "844327a3e5e6bed43c2ed9a36e3b7f6c8c871803fb5968f34ee6aa667fc345b8" + sha256 cellar: :any, catalina: "89acc7a04f910882b89d9e032a45e8c27dc98257d6d4e6b28f6c6a26c8c369ae" + sha256 cellar: :any, mojave: "d4d0c41262688ddca9ee2f2e6b80c33670c5a8db7266cd0c0592cd50b0d18be1" + sha256 cellar: :any, high_sierra: "95646c23acf19c1f07032c6f311f446e7a32b1a9d0c1dd385ec3c41811036572" + sha256 cellar: :any, sierra: "4722877fdc4538c814a10e6d0dc2f1a4d2a3571ce4ca1c8b37279c88cd83883f" + sha256 cellar: :any, el_capitan: "d9e52027a6535fb74e44026d23ef13a2417a1f22402173dc90d136071ea5290d" + sha256 cellar: :any_skip_relocation, arm64_linux: "0856cd70a483837f05bc33484a8c23104e5e6bdd97b2bc04f30a837cadbe2e00" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f4ead35052be0dce1efbee86333ca2bfb632cc3fb1bb00c8c836199f4f7d90c" + 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 + #include + + int main(void) + { + ecc_int256_t secret; + ecc_25519_gf_sanitize_secret(&secret, &secret); + + return EXIT_SUCCESS; + } + C + + system ENV.cc, "-I#{include}/libuecc-#{version}", "-L#{lib}", "-o", "test", "test.c", "-luecc" + system "./test" + end +end diff --git a/Formula/lib/libultrahdr.rb b/Formula/lib/libultrahdr.rb new file mode 100644 index 0000000000000..68fa907aa2378 --- /dev/null +++ b/Formula/lib/libultrahdr.rb @@ -0,0 +1,47 @@ +class Libultrahdr < Formula + desc "Reference codec for the Ultra HDR format" + homepage "https://developer.android.com/media/platform/hdr-image-format" + url "https://github.com/google/libultrahdr/archive/refs/tags/v1.4.0.tar.gz" + sha256 "e7e1252e2c44d8ed6b99ee0f67a3caf2d8a61c43834b13b1c3cd485574c03ab9" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ea42ab96abe5c0222dc6699bc23f7258be3c8063a3091f49f6995ae46ad3bad8" + sha256 cellar: :any, arm64_sonoma: "b73d5876637e5adce9edaffdb21d41aaee2af45027246e034a5387364025a796" + sha256 cellar: :any, arm64_ventura: "09d834c256bf1b6cf18ed1031d4ca817c91bb32bbbcb14efa4bc94ddfd76da56" + sha256 cellar: :any, sonoma: "bcc9eb419fbd3537629dad795cf7aebfa4003054f1ed048938fd921a5dbcf7d6" + sha256 cellar: :any, ventura: "3b8c26a6c5454bbf9e92f44ffd08e0827e233a2557ca72c3c5fd6165da3897c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "57a6cfa364eee5cc9c731bab793e26cecfb58828519daefacdc50e3a4602379a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90793c83c2f180f134f70c76e8e7bb3a72dd1d5959bff6f0add687f792b544ac" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + depends_on "jpeg-turbo" + + 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() { + std::cout << "UltraHDR Library Version: " << UHDR_LIB_VERSION_STR << std::endl; + + uhdr_codec_private_t* encoder = uhdr_create_encoder(); + uhdr_release_encoder(encoder); + + return 0; + } + CPP + + pkg_config_cflags = shell_output("pkg-config --cflags --libs libuhdr").chomp.split + system ENV.cxx, "test.cpp", "-o", "test", "-o", "test", *pkg_config_cflags + assert_match "UltraHDR Library Version: #{version}", shell_output("./test") + end +end diff --git a/Formula/lib/libunibreak.rb b/Formula/lib/libunibreak.rb new file mode 100644 index 0000000000000..6dfb6d8b1bed9 --- /dev/null +++ b/Formula/lib/libunibreak.rb @@ -0,0 +1,62 @@ +class Libunibreak < Formula + desc "Implementation of the Unicode line- and word-breaking algorithms" + homepage "https://github.com/adah1972/libunibreak" + url "https://github.com/adah1972/libunibreak/releases/download/libunibreak_6_1/libunibreak-6.1.tar.gz" + sha256 "cc4de0099cf7ff05005ceabff4afed4c582a736abc38033e70fdac86335ce93f" + license "Zlib" + + livecheck do + url :stable + regex(/v?(\d+(?:[_-]\d+)+)$/i) + strategy :git do |tags| + tags.map { |tag| tag[regex, 1]&.tr("_", ".") } + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0bed33fbc272073291fa047e1f72422aff56e83276de789d02a0f3f82f117b45" + sha256 cellar: :any, arm64_sonoma: "687db532bdd75f70882b9b40e0f5b14fdac91ce6c81a94067757e46cc6f84566" + sha256 cellar: :any, arm64_ventura: "66f1874dbc3a0761b53cf03a7a72d2ca161b129c251a922a4109f93be947086e" + sha256 cellar: :any, arm64_monterey: "f14809e82b501d33b043d4943c9dcf5b8667adeddcefff7356d41c993575de35" + sha256 cellar: :any, sonoma: "e567abc03dc6d7df4bb3f5e6347dd58b8738d1b79cb03e151b44fce2ea9b6ce1" + sha256 cellar: :any, ventura: "60c6227dc928dca0478e06214ecb17f1e8103cfb42c7109509d4ed565acfde91" + sha256 cellar: :any, monterey: "871afc806ba2cae52184f857040c6b74f354025f502edebef37a443355994902" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc218bf31fe34b65e6888466900ffa5659033b9f1811e69034af6d2a87a2a1cc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2662de1e1149d0aa2ed06f7bed26ab1ad27f7fc1bc5aa1689a9a320179b124a" + end + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + int main() { + static const utf8_t input[] = "test\\nstring \xF0\x9F\x98\x8A test"; + char output[sizeof(input) - 1]; + static const char expected[] = { + 2, 2, 2, 2, 0, + 2, 2, 2, 2, 2, 2, 1, + 3, 3, 3, 2, 1, + 2, 2, 2, 4 + }; + + assert(sizeof(output) == sizeof(expected)); + + init_linebreak(); + set_linebreaks_utf8(input, sizeof(output), NULL, output); + + return memcmp(output, expected, sizeof(output)) != 0; + } + C + system ENV.cc, "-o", "test", "test.c", "-I#{include}", + "-L#{lib}", "-lunibreak" + system "./test" + end +end diff --git a/Formula/lib/libunicode.rb b/Formula/lib/libunicode.rb new file mode 100644 index 0000000000000..6593f2fa23dce --- /dev/null +++ b/Formula/lib/libunicode.rb @@ -0,0 +1,72 @@ +class Libunicode < Formula + desc "Modern C++20 Unicode library" + homepage "https://github.com/contour-terminal/libunicode" + url "https://github.com/contour-terminal/libunicode/archive/refs/tags/v0.6.0.tar.gz" + sha256 "0c217f8264000f1b8c36e78969cb9cf91ac97de937cc141ab78e6b1ad7f404ef" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2e51dbe77f5b2853092a3648b1d22422b011641e893a56aafaf842d93e2ac75a" + sha256 cellar: :any, arm64_sonoma: "4543c2694bb3bc240a45792de40e9ecef4229eeed3ff73f25dea245c0aaa7fa8" + sha256 cellar: :any, arm64_ventura: "dcbad1aeabc61e9e4ef5b0776cc40fcaab878e67931bf0b057847e3e9e69e86c" + sha256 cellar: :any, sonoma: "eb839f56e6eb0d2d877a623eeab2ba46fa4a2f8e7c5b6133232caef634f14fb8" + sha256 cellar: :any, ventura: "88b268f809736144bc316d83d38ece5c25c96c4b97b563173a8ca925fccddbc8" + sha256 cellar: :any_skip_relocation, arm64_linux: "0dd8a8d2af9689cf2b7e45dfc7ac13ffd68cf9926041c787943c6d6d5f26ffd5" + end + + depends_on "cmake" => :build + + 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" + end + + fails_with :gcc do + version "12" + cause "Requires C++20 std::format, https://gcc.gnu.org/gcc-13/changes.html#libstdcxx" + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + + args = %W[ + -DLIBUNICODE_EXAMPLES=OFF + -DLIBUNICODE_TESTING=OFF + -DLIBUNICODE_BENCHMARK=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 + # 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 + + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + u32_char_t u32_codepoints[] = { 'h', 'e', 'l', 'l', 'o', ' ', 0x1F30D }; + int gc_count = u32_gc_count(u32_codepoints, 7); + std::cout << "Grapheme cluster count: " << gc_count << "\\n"; + + return 0; + } + CPP + + system ENV.cxx, "-std=c++17", "-o", "test", "test.cpp", "-I#{include}", "-L#{lib}", "-lunicode" + assert_match "Grapheme cluster count: 7", shell_output("./test") + + assert_match "HYPHEN", shell_output("#{bin}/unicode-query U+2D") + end +end diff --git a/Formula/lib/libuninameslist.rb b/Formula/lib/libuninameslist.rb new file mode 100644 index 0000000000000..03581161ef56f --- /dev/null +++ b/Formula/lib/libuninameslist.rb @@ -0,0 +1,56 @@ +class Libuninameslist < Formula + desc "Library of Unicode names and annotation data" + homepage "https://github.com/fontforge/libuninameslist" + url "https://github.com/fontforge/libuninameslist/releases/download/20240910/libuninameslist-dist-20240910.tar.gz" + sha256 "e59aab324ca0a3a713fe85c09a56c40c680a8458438d90624597920b3ef0be26" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/v?(\d+(?:\.\d+)*)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "cf609c8bc13da0d2e48afb290124f6f40364d99ccd60d9cd90a5736cfd0a7b62" + sha256 cellar: :any, arm64_sonoma: "30162a392d8c3b38e0b54765ef6d3285b9b136123949df0dff2c6dd1850793b8" + sha256 cellar: :any, arm64_ventura: "ac5b3cf31a12f29e6f1c98d2dc20b6fb00c133f1ef25236ef1121034bb08c7d5" + sha256 cellar: :any, arm64_monterey: "2ddbb3f6078bc8de3e9247846ae47bf71f9c9c70e76c3646af259247e217fa11" + sha256 cellar: :any, sonoma: "058a9be1c073ea75b776da75a266fdcc21fd3a20244705b2d426c91c16092bac" + sha256 cellar: :any, ventura: "44e94ef3192ab2052ec7c36460e307dbfd5e2aa75e445a1c285a4dc805bf81f0" + sha256 cellar: :any, monterey: "4ba6f06973d3507936496ade35a2ebe95e8b3fcaedfce6b82ba25274f6cc22be" + sha256 cellar: :any_skip_relocation, arm64_linux: "a64c4667a64658502fdbfa6512dca1479c9b8721865ea9175983677c3cda405d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e69b85f779f074776a2f4d8da6a1ae610b3b1a8760192a9ab1aa392622c8492a" + end + + head do + url "https://github.com/fontforge/libuninameslist.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + if build.head? + system "autoreconf", "--force", "--install", "--verbose" + system "automake" + end + + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() { + (void)uniNamesList_blockCount(); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-luninameslist", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libunistring.rb b/Formula/lib/libunistring.rb new file mode 100644 index 0000000000000..bc4a466da3010 --- /dev/null +++ b/Formula/lib/libunistring.rb @@ -0,0 +1,51 @@ +class Libunistring < Formula + desc "C string library for manipulating Unicode strings" + homepage "https://www.gnu.org/software/libunistring/" + url "https://ftp.gnu.org/gnu/libunistring/libunistring-1.3.tar.gz" + mirror "https://ftpmirror.gnu.org/libunistring/libunistring-1.3.tar.gz" + mirror "http://ftp.gnu.org/gnu/libunistring/libunistring-1.3.tar.gz" + sha256 "8ea8ccf86c09dd801c8cac19878e804e54f707cf69884371130d20bde68386b7" + license any_of: ["GPL-2.0-only", "LGPL-3.0-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "3cd26bae2d5fcf61294f14c18e5e7ec773a59ed1bf710fb92055e0db0244e909" + sha256 cellar: :any, arm64_sonoma: "38e44e319bfe11ec892bc6451d86b687d990ea01b4810b5d8ad1f794d531d82f" + sha256 cellar: :any, arm64_ventura: "b0d7a7078508070bd67589f5060a92100bd1c4aea2a41bf19e7ee8442f483df6" + sha256 cellar: :any, sonoma: "e919f6ee2fe8a40addea1e1840eab8855e66812e18dfe05c130618ce517e2880" + sha256 cellar: :any, ventura: "9aebb86a6fb622dd2699db2b1b65c82d1b5aaa35f81d0ae4335c57e9411c36e0" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2bd48b651db50b0ad0205b27b38a21303b6a49b567dd5b682cc1b9562e9ea0a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "25ff65379463fe4a51008a36c45a963ebc8d13d054ce606e3fbb6635ea634311" + end + + def install + # macOS iconv implementation is slightly broken since Sonoma. + # This is also why we skip `make check`. + # https://github.com/coreutils/gnulib/commit/bab130878fe57086921fa7024d328341758ed453 + # https://savannah.gnu.org/bugs/?65686 + ENV["am_cv_func_iconv_works"] = "yes" if OS.mac? && MacOS.version == :sequoia + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "check" if !OS.mac? || MacOS.version < :sonoma || MacOS.version > :sequoia + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + int main (void) { + uint32_t s[2] = {}; + uint8_t buff[12] = {}; + if (u32_uctomb (s, unicode_name_character ("BEER MUG"), sizeof s) != 1) abort(); + if (u8_sprintf (buff, "%llU", s) != 4) abort(); + printf ("%s\\n", buff); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lunistring", + "-o", "test" + assert_equal "🍺", shell_output("./test").chomp + end +end diff --git a/Formula/lib/libunwind-headers.rb b/Formula/lib/libunwind-headers.rb new file mode 100644 index 0000000000000..059121c9cf5ff --- /dev/null +++ b/Formula/lib/libunwind-headers.rb @@ -0,0 +1,29 @@ +class LibunwindHeaders < Formula + desc "C API for determining the call-chain of a program" + homepage "https://opensource.apple.com/" + url "https://github.com/apple-oss-distributions/libunwind/archive/refs/tags/libunwind-201.tar.gz" + sha256 "bbe469bd8778ba5a3e420823b9bf96ae98757a250f198893dee4628e0a432899" + license "APSL-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "24ed849a21c0cb1b8eda429fb00a9c9ecdc2483195d84de351f5806071ce19fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ddc5b02449351bb8ddc11fea2d25ca79ecf87657dde6c7cd7c15f1b5d6ff17c5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ddc5b02449351bb8ddc11fea2d25ca79ecf87657dde6c7cd7c15f1b5d6ff17c5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ddc5b02449351bb8ddc11fea2d25ca79ecf87657dde6c7cd7c15f1b5d6ff17c5" + sha256 cellar: :any_skip_relocation, sonoma: "2493e296e5824c2caf88be9f46d111ca2b6691d6e459826f67f29498bb1bc3b2" + sha256 cellar: :any_skip_relocation, ventura: "2493e296e5824c2caf88be9f46d111ca2b6691d6e459826f67f29498bb1bc3b2" + sha256 cellar: :any_skip_relocation, monterey: "ddc5b02449351bb8ddc11fea2d25ca79ecf87657dde6c7cd7c15f1b5d6ff17c5" + sha256 cellar: :any_skip_relocation, arm64_linux: "e811151bf776ce7f981651e7517c2914a64f6df45f1071cff7de1ff21414393a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ddc5b02449351bb8ddc11fea2d25ca79ecf87657dde6c7cd7c15f1b5d6ff17c5" + end + + keg_only :shadowed_by_macos, "macOS provides libunwind.dylib (but nothing else)" + + def install + cd "libunwind" do + include.install Dir["include/*"] + (include/"libunwind").install Dir["src/*.h*"] + end + end +end diff --git a/Formula/lib/libunwind.rb b/Formula/lib/libunwind.rb new file mode 100644 index 0000000000000..b3cbd93fa9a0a --- /dev/null +++ b/Formula/lib/libunwind.rb @@ -0,0 +1,42 @@ +class Libunwind < Formula + desc "C API for determining the call-chain of a program" + homepage "https://www.nongnu.org/libunwind/" + url "https://github.com/libunwind/libunwind/releases/download/v1.8.1/libunwind-1.8.1.tar.gz" + sha256 "ddf0e32dd5fafe5283198d37e4bf9decf7ba1770b6e7e006c33e6df79e6a6157" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "9774401f2bc0bf08e61959e37da77e571cea9fdc0e2a36f414cb094af73ac2bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81f89b76defac2b351bfb10864fcb7a9169b126f6e62a0c37c235873034fea7d" + end + + keg_only "libunwind conflicts with LLVM" + + depends_on :linux + depends_on "xz" + depends_on "zlib" + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + unw_context_t uc; + unw_getcontext(&uc); + return 0; + } + C + system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-lunwind", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libupnp.rb b/Formula/lib/libupnp.rb new file mode 100644 index 0000000000000..2e0b6cb8f8b47 --- /dev/null +++ b/Formula/lib/libupnp.rb @@ -0,0 +1,34 @@ +class Libupnp < Formula + desc "Portable UPnP development kit" + homepage "https://pupnp.sourceforge.io/" + url "https://github.com/pupnp/pupnp/releases/download/release-1.14.20/libupnp-1.14.20.tar.bz2" + sha256 "ee4b4f85aa00ce38b782cf480fa569a90c7ccb23b0a9a076073a2d0bd6227335" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^release[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "ca104359eb9176e483930dee375887341728384ff9f5363c1b083b9263a50e64" + sha256 cellar: :any, arm64_sonoma: "d503a737a2fcf0a9f06c14fa541e8bc2bce9725f90e94a5faf2db18c58118c59" + sha256 cellar: :any, arm64_ventura: "b6203d369767093f428fa82b59f87b34b3689b77e38cd0054690703585d13f18" + sha256 cellar: :any, sonoma: "916337db6468d0d513d72ec4b0400ba2c52aec5d8b695b557d4be9a9f4bd4a74" + sha256 cellar: :any, ventura: "1fa4a3c05cc76204ba8054574e66c5fe2b111d8c78b454ef12eb43e69f4024fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "6cd6a610c48cb262cea7510c9ea45d222f23cad77fd8213320094ef39794e40c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24255556551c29174438ffd4102facea726932fb7d38219d1745615f60e30ff9" + end + + def install + args = %W[ + --disable-debug + --disable-dependency-tracking + --prefix=#{prefix} + --enable-ipv6 + ] + + system "./configure", *args + system "make", "install" + end +end diff --git a/Formula/lib/liburing.rb b/Formula/lib/liburing.rb new file mode 100644 index 0000000000000..7f7f3d671dbc3 --- /dev/null +++ b/Formula/lib/liburing.rb @@ -0,0 +1,36 @@ +class Liburing < Formula + desc "Helpers to setup and teardown io_uring instances" + homepage "https://github.com/axboe/liburing" + # not need to check github releases, as tags are sufficient, see https://github.com/axboe/liburing/issues/1008 + url "https://github.com/axboe/liburing/archive/refs/tags/liburing-2.6.tar.gz" + sha256 "682f06733e6db6402c1f904cbbe12b94942a49effc872c9e01db3d7b180917cc" + license any_of: ["MIT", "LGPL-2.1-only"] + head "https://github.com/axboe/liburing.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, x86_64_linux: "a369928abdce516f5cbaedc983900a24b3e22d345f5942e0d62f464578095fbc" + end + + depends_on :linux + + def install + # not autotools based configure, so std_configure_args is not suitable + system "./configure", "--prefix=#{prefix}", "--libdir=#{lib}", "--mandir=#{man}" + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + struct io_uring ring; + assert(io_uring_queue_init(1, &ring, 0) == 0); + return 0; + } + C + system ENV.cc, "test.c", "-L#{opt_lib}", "-luring", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libusb-compat.rb b/Formula/lib/libusb-compat.rb new file mode 100644 index 0000000000000..c9bcf1a9d54cf --- /dev/null +++ b/Formula/lib/libusb-compat.rb @@ -0,0 +1,43 @@ +class LibusbCompat < Formula + desc "Library for USB device access" + homepage "https://libusb.info/" + url "https://downloads.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-0.1.8/libusb-compat-0.1.8.tar.bz2" + sha256 "b692dcf674c070c8c0bee3c8230ce4ee5903f926d77dc8b968a4dd1b70f9b05c" + license all_of: [ + "LGPL-2.1-or-later", + any_of: ["LGPL-2.1-or-later", "BSD-3-Clause"], # libusb/usb.h + ] + + livecheck do + url :stable + regex(%r{url=.*?/libusb-compat[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "db9c3980772b1debe48a65b951a7b6ac27ccfacd26afc6b96b49fa1a60c34339" + sha256 cellar: :any, arm64_sonoma: "64e879dd5f99d9e95ef207caf668bd1363d79f660abc1ec60c44eeb7082cb216" + sha256 cellar: :any, arm64_ventura: "a2fcb4b8c54d64c71ca73d7b70573617b9df000d7cd8040925c45627a601f84f" + sha256 cellar: :any, arm64_monterey: "b963fa8ff806b92ea8d4a278ae9fd41e8e86c9dbad743c8848f0962363e48104" + sha256 cellar: :any, sonoma: "4ee27e4e0b9a716fd2b15db94b1595901276078780d377432e2fde4e9d78c324" + sha256 cellar: :any, ventura: "9d752b7aea1ecaa42c8c7127d986a149ab971bc020689bf6007b27431c2ddc9d" + sha256 cellar: :any, monterey: "82d8bd5747595f694da174d66f1b61f407d904f7741f3dfc8d8d342c1239c5a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "878121af3e546d38c3574dd0d43f284044fdfab4c6930cd14e615bce37801d4f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0201a3ccb74c1a239274bf0d0ed68541e738d09f4ae46dd93501334bce39c24c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "libusb" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"libusb-config", "--libs" + end +end diff --git a/Formula/lib/libusb.rb b/Formula/lib/libusb.rb new file mode 100644 index 0000000000000..1caa6d2e69509 --- /dev/null +++ b/Formula/lib/libusb.rb @@ -0,0 +1,52 @@ +class Libusb < Formula + desc "Library for USB device access" + homepage "https://libusb.info/" + url "https://github.com/libusb/libusb/releases/download/v1.0.28/libusb-1.0.28.tar.bz2" + sha256 "966bb0d231f94a474eaae2e67da5ec844d3527a1f386456394ff432580634b29" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "fb9ed6ef1610e649e3b95f2eb2945f7329fc5695bcb2521c4dca924b61b3ff31" + sha256 cellar: :any, arm64_sonoma: "d6490cbec98bc45587edff71af6bc6c7807d120c8a938d5135120dfcde0ede95" + sha256 cellar: :any, arm64_ventura: "81ee03b903ccaadf6624b56b94da8660b7530ff2ca1c91c0f3b9970c0aca9a43" + sha256 cellar: :any, sonoma: "161e0741fa3b4cd8efb5c750c1dd277214f57637320c1bd699f8a1f0a4ac1c2a" + sha256 cellar: :any, ventura: "d71077cf63c1b8903735656f3d7558d5e4a63588fe5ef5f9d612908e1dc848a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b240ee6dd7aca2c54bf65ed74391608418f2085ec6b7db0946550ea6aa98636" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5473c8faecc7be9a9ea04d712906ca4970fdf9abc1fc8713502a4eb4f8ca4d71" + end + + head do + url "https://github.com/libusb/libusb.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + on_linux do + depends_on "systemd" + end + + def install + args = %W[--disable-dependency-tracking --prefix=#{prefix}] + + system "./autogen.sh" if build.head? + system "./configure", *args + system "make", "install" + (pkgshare/"examples").install Dir["examples/*"] - Dir["examples/Makefile*"] + end + + test do + cp_r (pkgshare/"examples"), testpath + cd "examples" do + system ENV.cc, "listdevs.c", "-L#{lib}", "-I#{include}/libusb-1.0", + "-lusb-1.0", "-o", "test" + system "./test" + end + end +end diff --git a/Formula/lib/libusbmuxd.rb b/Formula/lib/libusbmuxd.rb new file mode 100644 index 0000000000000..caa86c9f22482 --- /dev/null +++ b/Formula/lib/libusbmuxd.rb @@ -0,0 +1,53 @@ +class Libusbmuxd < Formula + desc "USB multiplexor library for iOS devices" + homepage "https://www.libimobiledevice.org/" + url "https://github.com/libimobiledevice/libusbmuxd/releases/download/2.1.0/libusbmuxd-2.1.0.tar.bz2" + sha256 "c35bf68f8e248434957bd5b234c389b02206a06ecd9303a7fb931ed7a5636b16" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "5d4892dedecd97caba1f56522add5e601b4bc09ccea572c7c9b3ff84bd14744a" + sha256 cellar: :any, arm64_sonoma: "8149dcd7d29cdf463c40a10e8030dcb23a4eb9e69078a88fb2e8671d9a27bdad" + sha256 cellar: :any, arm64_ventura: "3908c3a4d699d2aff22b40e6353c498042153a47798357c4500b76b495f24e88" + sha256 cellar: :any, arm64_monterey: "738b1efb11135136a9066ee73379829f29c57df598e989631d26e4ae5401f456" + sha256 cellar: :any, sonoma: "9b366b324e9758bd9f5d10c536e40ef2d90ed2caf2886ff7e55e13fe496628dd" + sha256 cellar: :any, ventura: "b188d3fcab748c6ac1e5740129bf4a07b2756dedd557d89f6f1291715bf6c45e" + sha256 cellar: :any, monterey: "4ea63ce7da1344b4e2fde47b7c2a9d8bad424bd5ce9282f6af1aa66a1155135b" + sha256 cellar: :any_skip_relocation, arm64_linux: "84338459d26e427bd4a56a6f2c3e15a98f7dc4fa667d62ad4d77d2b052a193b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3e9212633194e2e9436afd98d00fd5e167ec0ff13f1abfd065112dd2dd32bd3" + end + + head do + url "https://github.com/libimobiledevice/libusbmuxd.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libimobiledevice-glue" + depends_on "libplist" + + def install + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + source = free_port + dest = free_port + + PTY.spawn(bin/"iproxy", "-s", "localhost", "#{source}:#{dest}") do |r, w, pid| + assert_match "Creating listening port #{source} for device port #{dest}", r.readline + assert_match "waiting for connection", r.readline + TCPSocket.new("localhost", source).close + assert_match "New connection for #{source}->#{dest}", r.readline + ensure + r.close + w.close + Process.wait(pid) + end + end +end diff --git a/Formula/lib/libusrsctp.rb b/Formula/lib/libusrsctp.rb new file mode 100644 index 0000000000000..b6aebe27d7572 --- /dev/null +++ b/Formula/lib/libusrsctp.rb @@ -0,0 +1,44 @@ +class Libusrsctp < Formula + desc "Portable SCTP userland stack" + homepage "https://github.com/sctplab/usrsctp" + url "https://github.com/sctplab/usrsctp/archive/refs/tags/0.9.5.0.tar.gz" + sha256 "260107caf318650a57a8caa593550e39bca6943e93f970c80d6c17e59d62cd92" + license "BSD-3-Clause" + revision 1 + head "https://github.com/sctplab/usrsctp.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "26779b22a8b35e70131a4fb010839955453e8d703f682d77b411c5900d2543ab" + sha256 cellar: :any, arm64_sonoma: "d87af9c75847214b4101934141dd53dc3e5992304bd8f97aace95c683a2fa435" + sha256 cellar: :any, arm64_ventura: "27f59644b7711afcde95e34c6258a4f62bedaff91e7de90356494a511fa85f35" + sha256 cellar: :any, arm64_monterey: "5aebfe223f88de1bd4b8177d85a4034f819c9957f2f56292e8961ea52af1f20c" + sha256 cellar: :any, arm64_big_sur: "55d87963abae2a23d3f13644ce478a08c05a929a5619ff5d3db24c3758873520" + sha256 cellar: :any, sonoma: "55c6cbd763cd6733dde2c9cd09185aaae980d4ec5b6fe509fb707100fcae8400" + sha256 cellar: :any, ventura: "a99c35127a48fb9bfbd02e75741938b4bfe4f7ada7c53692fc944e2a316fa72a" + sha256 cellar: :any, monterey: "574a2ddedf60e11662a1ba899019334390bcc5b3ef8a789fe9feec7f32974b77" + sha256 cellar: :any, big_sur: "8c7e338e82252ed7aa5ac2ac8d007f70d998d428dd713a1bc9e57fa7c483d004" + sha256 cellar: :any_skip_relocation, arm64_linux: "32b23193aec4c98b68aed3e46c9d09ed6e924a3cc0ef1aa567dbe749fc92363a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ed390a46abf6f2244181acd53fafe4280a4b0f41e07720e3161d27995b0cbff" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", "-Dsctp_build_shared_lib=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + usrsctp_init(0, NULL, NULL); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lusrsctp", "-lpthread", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libuv.rb b/Formula/lib/libuv.rb new file mode 100644 index 0000000000000..3dacb27f8f460 --- /dev/null +++ b/Formula/lib/libuv.rb @@ -0,0 +1,60 @@ +class Libuv < Formula + desc "Multi-platform support library with a focus on asynchronous I/O" + homepage "https://libuv.org/" + url "https://github.com/libuv/libuv/archive/refs/tags/v1.51.0.tar.gz" + sha256 "27e55cf7083913bfb6826ca78cde9de7647cded648d35f24163f2d31bb9f51cd" + license "MIT" + head "https://github.com/libuv/libuv.git", branch: "v1.x" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "916f444748e98c1e58083df123f6ff9d90d0b0af202f4da0862a5c456804d2f2" + sha256 cellar: :any, arm64_sonoma: "571859f2cb6de90cfea1d1c6d059e3234ddf8b182e0d494bc9c902ebea191710" + sha256 cellar: :any, arm64_ventura: "5b883ed2838104b6a8026068ac4b9d6e04dc6fb8f899f522754b426afee4e801" + sha256 cellar: :any, sonoma: "fb199706c025af4c6160825de25f9220c8d571499c5dba71c4b93a3874ea7a03" + sha256 cellar: :any, ventura: "ced40d8e5768027c89dc194e21e1e52c15a38a932e04d8026a2ebc5ec4944422" + sha256 cellar: :any_skip_relocation, arm64_linux: "c1dcb33e480bb395e58b2c0e775f36041af343e7be3cf5d53d666fb55f753ee6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd1d243f009617c2ff2d97c5cd08a93512f93accf7d7c1987a649db2b91ac03e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "sphinx-doc" => :build + + def install + # This isn't yet handled by the make install process sadly. + cd "docs" do + system "make", "man" + man1.install "build/man/libuv.1" + end + + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + uv_loop_t* loop = malloc(sizeof *loop); + uv_loop_init(loop); + uv_loop_close(loop); + free(loop); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-luv", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libuvc.rb b/Formula/lib/libuvc.rb new file mode 100644 index 0000000000000..77d7c445fd388 --- /dev/null +++ b/Formula/lib/libuvc.rb @@ -0,0 +1,49 @@ +class Libuvc < Formula + desc "Cross-platform library for USB video devices" + homepage "https://github.com/libuvc/libuvc" + url "https://github.com/libuvc/libuvc/archive/refs/tags/v0.0.7.tar.gz" + sha256 "7c6ba79723ad5d0ccdfbe6cadcfbd03f9f75b701d7ba96631eb1fd929a86ee72" + license "BSD-3-Clause" + head "https://github.com/libuvc/libuvc.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "94deef8d9e60b29d70cc1348b58cade333270747562c2ea151dcad2893757a84" + sha256 cellar: :any, arm64_sonoma: "fdde8f75b100e1b5c4880eade6ae2e1df144236a26a6757b59f935feadf45283" + sha256 cellar: :any, arm64_ventura: "6708c80f52e02d433eb7bc74ff598b8c6cc4a7963fb70f3757252abe94b021be" + sha256 cellar: :any, arm64_monterey: "ad6af8f029ad6050565a30a2215b2e0a831d1acc0927cc032ba7b25754aa788b" + sha256 cellar: :any, arm64_big_sur: "110f3c38356127a1109273f022bedb51c4ee5a7df8845c4940db9a203a131627" + sha256 cellar: :any, sonoma: "71d65586d7c9129e23704c7ac10b5641c5705f357dd658f9e975865fac47d7a1" + sha256 cellar: :any, ventura: "3463a43797458c0e8d63446c9b54c2e8df213ca290f5a8bc08e3a071e7dad884" + sha256 cellar: :any, monterey: "e4dd5f0473e5f0f3a4d2b78f6b2b6fa556436055ef8a3d68d176a5b3afd3ca11" + sha256 cellar: :any, big_sur: "d974f8a7c94e5c106fa9c8bff6f85c0237ee1396d3dc672969d2279840cc0fac" + sha256 cellar: :any_skip_relocation, arm64_linux: "def3a9096bee642658354acfd0d061a84a5d7f5560334c4564a7f0fb608cb35c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e5adfe4cf8c0151495c6d82c4a1efba89a92a8d43e3d32803d6c88d015e894cf" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "libusb" + + 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() { + uvc_context_t *ctx; + uvc_error_t res = uvc_init(&ctx, NULL); + if (res != UVC_SUCCESS) return 1; + uvc_exit(ctx); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs libuvc").strip.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libva.rb b/Formula/lib/libva.rb new file mode 100644 index 0000000000000..36fb7b4c9a1df --- /dev/null +++ b/Formula/lib/libva.rb @@ -0,0 +1,61 @@ +class Libva < Formula + desc "Hardware accelerated video processing library" + homepage "https://github.com/intel/libva" + url "https://github.com/intel/libva/releases/download/2.22.0/libva-2.22.0.tar.bz2" + sha256 "e3da2250654c8d52b3f59f8cb3f3d8e7fb1a2ee64378dbc400fbc5663de7edb8" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "fdff2870c6a9e5dae9d2f34703a55112bbc86ffd0ff8426d7e52b3a3fbae9720" + sha256 cellar: :any_skip_relocation, x86_64_linux: "159b556ea708ad404ef2716f18c3e135e285b3f55be0ca01905fc4205b48cc24" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "libdrm" + depends_on "libx11" + depends_on "libxcb" + depends_on "libxext" + depends_on "libxfixes" + depends_on :linux + depends_on "wayland" + + def install + system "./configure", "--sysconfdir=#{etc}", + "--localstatedir=#{var}", + "--disable-silent-rules", + "--enable-drm", + "--enable-x11", + "--disable-glx", + "--enable-wayland", + "--with-drivers-path=#{HOMEBREW_PREFIX}/lib/dri", + *std_configure_args + system "make" + system "make", "install" + end + + test do + %w[libva libva-drm libva-wayland libva-x11].each do |name| + assert_match "-I#{include}", shell_output("pkgconf --cflags #{name}") + end + + # We cannot run a functional test without a VA-API driver; however, the + # drivers have a dependency on `libva` which results in a dependency loop + (testpath/"test.c").write <<~C + #include + #include + int main(int argc, char *argv[]) { + VADisplay display = NULL; + vaDisplayIsValid(display); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lva" + system "./test" + end +end diff --git a/Formula/lib/libvatek.rb b/Formula/lib/libvatek.rb new file mode 100644 index 0000000000000..83f7b9bfa746c --- /dev/null +++ b/Formula/lib/libvatek.rb @@ -0,0 +1,53 @@ +class Libvatek < Formula + desc "User library to control VATek chips" + homepage "https://github.com/VisionAdvanceTechnologyInc/vatek_sdk_2" + url "https://github.com/VisionAdvanceTechnologyInc/vatek_sdk_2/archive/refs/tags/v3.12.1.tar.gz" + sha256 "293a9d8f271fe960c987b0c620bbc1daacaf1fba00374c3431cab990456ba516" + license "BSD-2-Clause" + head "https://github.com/VisionAdvanceTechnologyInc/vatek_sdk_2.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1e231d20c397029d363b48b1d685a4ed1710ea69e1cf4408c7bcbd758418b425" + sha256 cellar: :any, arm64_sonoma: "c081fd50a34d94aefe63df4c343975be869bbfad3b0215a5daaa6b306a8b46d7" + sha256 cellar: :any, arm64_ventura: "adbf2c5ff43b6d27ff6fee7e2e58c8a4468387e50ae96c227ffb91dd055f94f3" + sha256 cellar: :any, sonoma: "1451fcbafaed9feedeedd0acb7b96a08f5b039ee713e308b569162680eb125f9" + sha256 cellar: :any, ventura: "1e5c0363747da7a46a013899694315c0d01226c2251f7fd00e208218dd99ac53" + sha256 cellar: :any_skip_relocation, arm64_linux: "747345a965105bd39b8a4c663ae8a255a99c29dbe834e3d2353f8af362c148cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "09d2064162ff257be56fd39c20b6af3626943f328097a8e715515d5e4ea2c592" + end + + depends_on "cmake" => :build + depends_on "libusb" + + def install + system "cmake", "-S", ".", "-B", "builddir", + "-DSDK2_EN_QT=OFF", "-DSDK2_EN_APP=OFF", "-DSDK2_EN_SAMPLE=OFF", + *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + end + + test do + (testpath/"vatek_test.c").write <<~C + #include + #include + #include + + int main() + { + hvatek_devices hdevices = NULL; + vatek_result devcount = vatek_device_list_enum(DEVICE_BUS_USB, service_transform, &hdevices); + if (is_vatek_success(devcount)) { + printf("passed\\n"); + return EXIT_SUCCESS; + } + else { + printf("failed\\n"); + return EXIT_FAILURE; + } + } + C + system ENV.cc, "vatek_test.c", "-I#{include}/vatek", "-L#{lib}", "-lvatek_core", "-o", "vatek_test" + assert_equal "passed", shell_output("./vatek_test").strip + end +end diff --git a/Formula/lib/libvdpau.rb b/Formula/lib/libvdpau.rb new file mode 100644 index 0000000000000..eb9d5edc5a18b --- /dev/null +++ b/Formula/lib/libvdpau.rb @@ -0,0 +1,43 @@ +class Libvdpau < Formula + desc "Open source Video Decode and Presentation API library" + homepage "https://www.freedesktop.org/wiki/Software/VDPAU/" + url "https://gitlab.freedesktop.org/vdpau/libvdpau/-/archive/1.5/libvdpau-1.5.tar.bz2" + sha256 "a5d50a42b8c288febc07151ab643ac8de06a18446965c7241f89b4e810821913" + license "MIT" + + livecheck do + url :stable + regex(/^(?:libvdpau[._-])?v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "8baf9479a1307dd3f6819d5953b200195a91d7c522f01b2b4930e9fc750b3615" + sha256 arm64_sonoma: "a683463e26fbc2b4d4d56865835d0aa94316c556aa56c1dc55263e307b8bc4cc" + sha256 arm64_ventura: "2e414f4fcb57c924669fae785354d36899e13cbb11375ad24483001ed0e0f19d" + sha256 arm64_monterey: "983ddb3ecfdacb086fd056315553adf0e458e6f4da959a0381d4889e55947635" + sha256 arm64_big_sur: "d474b20b3cd5675c303af15e353b2e23b4107fb43660de06fdca174c2b8a6ac7" + sha256 sonoma: "4e529c0af6669f6df022900daaed25245415be288c7d27e57e5cb1f737d1e77b" + sha256 ventura: "b17967b5626752a517b629d7c01e002eba4bd9ea5bcc756f935ad5f3326543c5" + sha256 monterey: "b1ca92eb755c147f47c63a590705159a099cb74f97b0bb3260e26e46979acd04" + sha256 big_sur: "19e0e92759c99ab2942d2b750bd32065b31829015bee25c384929a12f9eea5ca" + sha256 catalina: "d5bdf31825ef0083a0a426f98de307d1f00376804d03e020d096bee5da273def" + sha256 arm64_linux: "298a8659f47956680197cbcaa0c06efe10ac94b863c0e1c62bf680390315d024" + sha256 x86_64_linux: "efe7bfed2aff2b6b4d259a9adc1601a17c8c567750a2dfa0ba354a7d9ba0ca42" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "libx11" + depends_on "libxext" + depends_on "xorgproto" + + def install + system "meson", "setup", "build", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + test do + assert_match "-I#{include}", shell_output("pkgconf --cflags vdpau") + end +end diff --git a/Formula/lib/libversion.rb b/Formula/lib/libversion.rb new file mode 100644 index 0000000000000..352cf0fbb3aae --- /dev/null +++ b/Formula/lib/libversion.rb @@ -0,0 +1,35 @@ +class Libversion < Formula + desc "Advanced version string comparison library" + homepage "https://github.com/repology/libversion" + url "https://github.com/repology/libversion/archive/refs/tags/3.0.3.tar.gz" + sha256 "bb49d745a0c8e692007af6d928046d1ab6b9189f8dbba834cdf3c1d251c94a1d" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f392a811f7f8c33d3215c42acc3162b8e4eb969ef2035b9cd1848b565a4aaa3c" + sha256 cellar: :any, arm64_sonoma: "71d067178dfa687afa51f634d5b95c5e8c7207de51ef57625bf4de2e64f7b7a8" + sha256 cellar: :any, arm64_ventura: "678f93db1e9a2a5eea319f8e617ca98649f699c49753e53b463ad0c53c4ca6d2" + sha256 cellar: :any, arm64_monterey: "a1c1177a83175a7084eb350560728ec8d9b98985a7e0a17f9df29e2149da71d0" + sha256 cellar: :any, arm64_big_sur: "f02d597938633f6b90e8096fb643e222f45d3d7091705b2292d2cd57eb975c9c" + sha256 cellar: :any, sonoma: "04aa6caddb7a975f76e48ed1ec6b3b7caee628a08dd6f84ea9841daa7b36737f" + sha256 cellar: :any, ventura: "55214b46e71ca86a53fced6ec189f5d5d88f1683534578816562c0ea59b23f65" + sha256 cellar: :any, monterey: "f4f9d55d39e551756a77055b77108b65f2aea9bc2d8f3bb0eaa13b3f6023c142" + sha256 cellar: :any, big_sur: "3b8a9af1caeeba055c351dd7b39fec1cc2adc3e7dd125c63bebcbc06c3cce9f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "376dd65501387cfc8c9b69e4e8d58e41e157020a061e62ddfab8583ca18843ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "244074a47f2d78925338b7e54defef0b35a250c50e4cd0ae4247c5c659a7c87f" + 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 + assert_equal "=", shell_output("#{bin}/version_compare 1.0 1.0.0").chomp + assert_equal "<", shell_output("#{bin}/version_compare 1.1p1 1.1").chomp + assert_equal ">", shell_output("#{bin}/version_compare -p 1.1p1 1.1").chomp + end +end diff --git a/Formula/lib/libvidstab.rb b/Formula/lib/libvidstab.rb new file mode 100644 index 0000000000000..8acdedf18196c --- /dev/null +++ b/Formula/lib/libvidstab.rb @@ -0,0 +1,45 @@ +class Libvidstab < Formula + desc "Transcode video stabilization plugin" + homepage "http://public.hronopik.de/vid.stab/" + url "https://github.com/georgmartius/vid.stab/archive/refs/tags/v1.1.1.tar.gz" + sha256 "9001b6df73933555e56deac19a0f225aae152abbc0e97dc70034814a1943f3d4" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f76b62fb9580b75861cc5a6d639500d095823d32bef7aa6f636fee2d87b724e9" + sha256 cellar: :any, arm64_sonoma: "f006d60e59a43562474571f2a7e2be72273cc9bd7b2df04d0c21da861ebfcab8" + sha256 cellar: :any, arm64_ventura: "25efabe3bf9a85b25065758c1ea62ef096bf2e334ce073450ef4478f7e469b38" + sha256 cellar: :any, arm64_monterey: "0bff0aa6aba039cc22d6a65fbfd46f67c35ecc6db3baca439b9b1e45c3710002" + sha256 cellar: :any, arm64_big_sur: "bca6a787bd17369819451093009d298fc8a4104be1d9bd25bd9606263d097784" + sha256 cellar: :any, sonoma: "4263aef306ed5a576474d9101d8a75afc7c8e39f68a783940a81ae9fb772fe67" + sha256 cellar: :any, ventura: "40cc585d8dfe08ddb7938667997fac65cd96261f9699c4d7a1705e30267cdb61" + sha256 cellar: :any, monterey: "8caa0dce4af772a443f814f51960227e769428025f734a9a82085fc8ee499ef9" + sha256 cellar: :any, big_sur: "2b7d9891009c53a925e971b600bad2a43e5bcca062119b9080e1c5b59e2e25b0" + sha256 cellar: :any_skip_relocation, arm64_linux: "4cd7955f3da1c7f0c168790291b6c93d4144593c5b351e9caec0ab0d69992aeb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d87451266aa81a807919bb25dec5cb85e2e79eca8fa768dba8c7b74f06e11be9" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :test + + def install + system "cmake", "-S", ".", "-B", "build", "-DUSE_OMP=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + printf("libvidstab version: %s\\n", LIBVIDSTAB_VERSION); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs vidstab").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libvirt-glib.rb b/Formula/lib/libvirt-glib.rb new file mode 100644 index 0000000000000..6f16327bd88cb --- /dev/null +++ b/Formula/lib/libvirt-glib.rb @@ -0,0 +1,73 @@ +class LibvirtGlib < Formula + desc "Libvirt API for glib-based programs" + homepage "https://libvirt.org/" + url "https://download.libvirt.org/glib/libvirt-glib-5.0.0.tar.xz" + sha256 "9bfec346382416a3575d87299bc641b2a464aa519fd9b1287e318aa43a2f3b8b" + license "LGPL-2.1-or-later" + + livecheck do + url "https://download.libvirt.org/glib/" + regex(/href=.*?libvirt-glib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "2c02eafd5e6cde6f4bc893e635687e3faeb75cd043ad4a779c6a0e3b8a52de67" + sha256 arm64_sonoma: "21ae7fd8db1783b08631d8e44055cd7cc60eb4e4bf688df5cdead90fb7fc841a" + sha256 arm64_ventura: "d43fac604883a2625dded58bcea30ac96f1631d534387ec02e990a385b70ee7d" + sha256 arm64_monterey: "091f75018e1ae32fae44da96b038a24738168fc580266595e2e5cff1a14c94a6" + sha256 sonoma: "e2ac09fd3c7acd060404ef1ff2448762f37b10953bd7f0bf253c928ca3beecdc" + sha256 ventura: "f2bde563d71a665861a881e003ecb1f81160c638dfc4879182416f4ad8c5ec21" + sha256 monterey: "cc95cc480984e459d64e98ac4a34a28f098f01fdbe3a48eb4596ea0f04e18522" + sha256 arm64_linux: "a6c61211019d44b321c24c5d21a61b2bd6c466c0c5f6a34f1246aed518784c81" + sha256 x86_64_linux: "5929261ba67ca634fd615cb4f8c159017963a9b1a46bba55993b0b728593df70" + end + + depends_on "gobject-introspection" => :build + depends_on "intltool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "glib" + depends_on "libvirt" + + uses_from_macos "libxml2" + + def install + system "meson", "setup", "builddir", "-Dintrospection=enabled", *std_meson_args + system "meson", "compile", "-C", "builddir" + system "meson", "install", "-C", "builddir" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + int main() { + gvir_config_object_get_type(); + gvir_event_register(); + gvir_interface_get_type(); + return 0; + } + CPP + libxml2 = if OS.mac? + "#{MacOS.sdk_path}/usr/include/libxml2" + else + Formula["libxml2"].opt_include/"libxml2" + end + system ENV.cxx, "-std=c++11", "test.cpp", + "-I#{libxml2}", + "-I#{Formula["glib"].include}/glib-2.0", + "-I#{Formula["glib"].lib}/glib-2.0/include", + "-I#{include}/libvirt-gconfig-1.0", + "-I#{include}/libvirt-glib-1.0", + "-I#{include}/libvirt-gobject-1.0", + "-L#{lib}", + "-lvirt-gconfig-1.0", + "-lvirt-glib-1.0", + "-lvirt-gobject-1.0", + "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libvirt-python.rb b/Formula/lib/libvirt-python.rb new file mode 100644 index 0000000000000..a122707e8b5f2 --- /dev/null +++ b/Formula/lib/libvirt-python.rb @@ -0,0 +1,52 @@ +class LibvirtPython < Formula + desc "Libvirt virtualization API python binding" + homepage "https://www.libvirt.org/" + url "https://download.libvirt.org/python/libvirt-python-11.3.0.tar.gz" + sha256 "4cd31e625e8fefbbe168faedb38cb7fa2da3fa7394326eed29dc46e7ca511979" + license "LGPL-2.1-or-later" + + livecheck do + url "https://download.libvirt.org/python/" + regex(/href=.*?libvirt-python[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "4a9e95b87f0b37422b50ff3f409fc34292e8bab6c65682ab98a33c1ace46a6b2" + sha256 cellar: :any, arm64_sonoma: "79b531d7a08b74ab2941c6b31be5750ba0741a288e925e558ff490a38b65a8d2" + sha256 cellar: :any, arm64_ventura: "92b57743196e81f9b57833038b6762d67779431a734acb7cf428468bc3c37443" + sha256 cellar: :any, sonoma: "3c44d8f88bb438fcac11f1d0bef8e979290c803e004b1d08c1ac274882e985d9" + sha256 cellar: :any, ventura: "5e12aa079214f02b71865823fbf04b629067abede419722d499bd7feee660456" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ae1c68fe55d1f5dbe51dbe510af77f15140a4eeb03ad1f40905b73bc5007aeb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea1b1e019096bc81f21ca7e75a3200fd38e1c189be7b20820faedaa29c512620" + end + + depends_on "pkgconf" => :build + depends_on "libvirt" + depends_on "python@3.13" + + 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| + system python, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." + end + end + + test do + pythons.each do |python| + system python, "-c", + # language=Python + <<~EOS + import libvirt + + with libvirt.open('test:///default') as conn: + if libvirt.virGetLastError() is not None: + raise SystemError("Failed to open a test connection") + EOS + end + end +end diff --git a/Formula/lib/libvirt.rb b/Formula/lib/libvirt.rb new file mode 100644 index 0000000000000..6a64eb0630771 --- /dev/null +++ b/Formula/lib/libvirt.rb @@ -0,0 +1,82 @@ +class Libvirt < Formula + desc "C virtualization API" + homepage "https://libvirt.org/" + url "https://download.libvirt.org/libvirt-11.3.0.tar.xz" + sha256 "6bcb0c42c4580436fea262ced56f68a6afe20f7390b1bea2116718cc034a0283" + license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"] + revision 2 + head "https://gitlab.com/libvirt/libvirt.git", branch: "master" + + livecheck do + url "https://download.libvirt.org/" + regex(/href=.*?libvirt[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "eb5a270a4de17ef61be4e8f9c7d00e0fb003ef8fb2dc970c8cd1255e7ea32c15" + sha256 arm64_sonoma: "cc170ed47e7e550345da3296b72e86d0a1759ffaf3f14c65974459e234dfad75" + sha256 arm64_ventura: "65c8b92db1e6d58aea67aac00448fefca690bc2457837f84023b37a104f3f470" + sha256 sonoma: "88d41ab9ba9fe5980bb9a3e869e3669e2e5f280ed33340de6f45e54d5c9421bb" + sha256 ventura: "0e2a8417f55d20788baf98c5bd5a8ccdb34d4039167754c745def0742b23f29b" + sha256 arm64_linux: "0e14a9db24adde346e44f2bccdcfebd0931382df817e6d3a966a22c3c843dfd0" + sha256 x86_64_linux: "61774ba7f4c60f67de0d19b17bce4cb8607bd84ab670bf9b7e207e9c74a99bd3" + end + + depends_on "docutils" => :build + depends_on "gettext" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "gnutls" + depends_on "json-c" + depends_on "libgcrypt" + depends_on "libiscsi" + depends_on "libssh2" + depends_on "readline" # Possible opportunistic linkage. TODO: Check if this can be removed. + depends_on "yajl" + + uses_from_macos "perl" => :build + uses_from_macos "curl" + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + on_macos do + depends_on "gettext" + end + + on_linux do + depends_on "acl" + depends_on "libnl" + depends_on "libtirpc" + depends_on "util-linux" + end + + def install + args = %W[ + --localstatedir=#{var} + --mandir=#{man} + --sysconfdir=#{etc} + -Ddriver_esx=enabled + -Ddriver_qemu=enabled + -Ddriver_network=enabled + -Dinit_script=none + -Dqemu_datadir=#{Formula["qemu"].opt_pkgshare} + -Drunstatedir=#{var}/run + ] + system "meson", "setup", "build", *args, *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + service do + run [opt_sbin/"libvirtd", "-f", etc/"libvirt/libvirtd.conf"] + keep_alive true + environment_variables PATH: HOMEBREW_PREFIX/"bin" + end + + test do + assert_match version.to_s, shell_output("#{bin}/virsh -v") + end +end diff --git a/Formula/lib/libvisio.rb b/Formula/lib/libvisio.rb new file mode 100644 index 0000000000000..72f6859bcc108 --- /dev/null +++ b/Formula/lib/libvisio.rb @@ -0,0 +1,61 @@ +class Libvisio < Formula + desc "Interpret and import Visio diagrams" + homepage "https://wiki.documentfoundation.org/DLP/Libraries/libvisio" + url "https://dev-www.libreoffice.org/src/libvisio/libvisio-0.1.8.tar.xz" + sha256 "b4098ffbf4dcb9e71213fa0acddbd928f27bed30db2d80234813b15d53d0405b" + license "MPL-2.0" + revision 2 + + livecheck do + url "https://dev-www.libreoffice.org/src/" + regex(/href=["']?libvisio[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "b1d82aaa71ed70e5c67c507843c5e0ad1e7ed0baa1ddb0d65c92f382d2f209b8" + sha256 cellar: :any, arm64_sonoma: "548d6e3a65308733f84b62d945aa751a23498898250d2d9d10fc58d6af475d85" + sha256 cellar: :any, arm64_ventura: "4cc867e8cbb1c6db5fceb6c50ccd440c90b7bccc9a71b4d251c4815ba69cc6c5" + sha256 cellar: :any, sonoma: "59b2d3c7b44168b3778795e95f730e361ad392107ff4de14a2ef4356234a2bc8" + sha256 cellar: :any, ventura: "cd2c9346d09b98e85f7bcee3da6571d6391b7456fc5feb61ba212ce9b8a7c68a" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab24a12cdf48c1b40d932fffa7f37b0dff96177c343a77865c1a9dfc6620fc1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc9f80d9caf8b35a27876747278ec7dc4247de6ff8f06c96cec900a5a09167c0" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + depends_on "icu4c@77" + depends_on "librevenge" + + uses_from_macos "gperf" => :build + uses_from_macos "libxml2" + + def install + # icu4c 75+ needs C++17 + ENV.append "CXXFLAGS", "-std=gnu++17" + + system "./configure", "--disable-silent-rules", + "--disable-static", + "--disable-tests", + "--without-docs", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + int main() { + librevenge::RVNGStringStream docStream(0, 0); + libvisio::VisioDocument::isSupported(&docStream); + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-o", "test", + "-lrevenge-stream-0.0", + "-I#{Formula["librevenge"].include}/librevenge-0.0", + "-L#{Formula["librevenge"].lib}", + "-lvisio-0.1", "-I#{include}/libvisio-0.1", "-L#{lib}" + system "./test" + end +end diff --git a/Formula/lib/libvisual-plugins.rb b/Formula/lib/libvisual-plugins.rb new file mode 100644 index 0000000000000..b37a795cf10db --- /dev/null +++ b/Formula/lib/libvisual-plugins.rb @@ -0,0 +1,84 @@ +class LibvisualPlugins < Formula + desc "Audio Visualization tool and library" + homepage "https://github.com/Libvisual/libvisual" + url "https://github.com/Libvisual/libvisual/releases/download/libvisual-plugins-0.4.2/libvisual-plugins-0.4.2.tar.gz" + sha256 "55988403682b180d0de5e6082f804f3cf066d9a08e887b10eb6a315eb40d9f87" + license all_of: ["GPL-2.0-or-later", "GPL-3.0-or-later", "LGPL-2.1-or-later"] + + bottle do + sha256 arm64_sequoia: "0203c2ea44c5978e092b682a966a72ec4099bca267a56814bdcb1d350ffac738" + sha256 arm64_sonoma: "2f8be28190eb7037ae6b9d2022e52b97f9fd16f0b7ce663f12725fec703951de" + sha256 arm64_ventura: "09cc228afa0d75814145656bd4ccc19417bd91267f76e536a031e1e6774fd09b" + sha256 arm64_monterey: "1ed5a81fc26770e18092cf6ed205635a0a14986a2a9f8b7d1b066125a31db4bc" + sha256 arm64_big_sur: "d52b13029a9a4e0d7343edde6d215c43394a236d7eb47cd91d725f6b0c310909" + sha256 sonoma: "6b7d4460b4809101e65b924665b3f864d413fb38d083017108b30a80028b34d6" + sha256 ventura: "2ee6827428dd600d21412a543dda3adfd279f80645850904860722bbab683d4f" + sha256 monterey: "977213a56b8ee0e6dc046a117ca5578d2c3e03e9d9430f32365a16ef224eddf4" + sha256 big_sur: "b2202a454a452bb02d49db40379395481fd4a21888a73a0a462b4675ef703052" + sha256 arm64_linux: "1a8aa255c27a5600d66d0eba73ac39aa0708439481d577482008523119914708" + sha256 x86_64_linux: "dfb02d238ee8abe6fa95c0a0d1d9f4fdc77e5d1946ef670b4bfdae9f481f95b3" + end + + depends_on "pkgconf" => :build + depends_on "xorg-server" => :test + + depends_on "jack" + depends_on "libvisual" + depends_on "portaudio" + depends_on "sdl12-compat" + + uses_from_macos "bison" => :build + + on_linux do + depends_on "alsa-lib" + depends_on "mesa" + depends_on "mesa-glu" + depends_on "pulseaudio" + end + + def install + libvisual = Formula["libvisual"] + configure_args = [ + "--disable-gdkpixbuf-plugin", + "--disable-gforce", + "--disable-gstreamer-plugin", + # NOTE: This relies on brew's auto-symlinking to + # /lib/libvisual-. . + "--with-plugins-base-dir=#{lib}/libvisual-#{libvisual.version.major_minor}", + ] + system "./configure", *configure_args, *std_configure_args + system "make" + system "make", "install" + end + + test do + libvisual = Formula["libvisual"] + lv_tool = libvisual.bin/"lv-tool-#{libvisual.version.major_minor}" + + # Test that locating key plugins works properly + plugin_help_output = shell_output("#{lv_tool} --plugin-help 2>&1") + assert_match " (debug)", plugin_help_output + assert_match " (lv_gltest)", plugin_help_output + assert_match " (portaudio)", plugin_help_output + + # Tests that lv-tool starts up without crashing + xvfb_pid = fork do + exec Formula["xorg-server"].bin/"Xvfb", ":1" + end + ENV["DISPLAY"] = ":1" + + lv_tool_pid = fork do + # NOTE: The two lines "assertion `video != NULL' failed" in the output + # are to be expected and can be ignored. + exec lv_tool, "--input", "debug" + end + + sleep 5 + ensure + Process.kill("SIGINT", lv_tool_pid) + Process.wait(lv_tool_pid) + + Process.kill("SIGINT", xvfb_pid) + Process.wait(xvfb_pid) + end +end diff --git a/Formula/lib/libvisual-projectm.rb b/Formula/lib/libvisual-projectm.rb new file mode 100644 index 0000000000000..3037bf0fa8fb7 --- /dev/null +++ b/Formula/lib/libvisual-projectm.rb @@ -0,0 +1,74 @@ +class LibvisualProjectm < Formula + desc "Visualization plug-in for projectM support from Libvisual" + homepage "https://github.com/projectM-visualizer/frontend-libvisual-plug-in" + url "https://github.com/projectM-visualizer/frontend-libvisual-plug-in/archive/refs/tags/v2.1.1.tar.gz" + sha256 "eb8269c2a923546600d3f40ff90c011f03a215847215ee8bef44bfae305b4dd7" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "e1413357ae5900e2662f197184b631759a12af9015317566a99db4d70bdc6ffe" + sha256 arm64_sonoma: "b14e174621f4a80eaab94df8972bc26ec2a834a8d84bf66485deceb4b77e0a85" + sha256 arm64_ventura: "7e9ba6250e71e8005b0e00cc6f50f9991cf5158272a439788c0e4f024d9e8eb5" + sha256 arm64_monterey: "2d7f170c6c1b1d8fcb45fe09e6a7e44c3662a6d56f78e48fbfe818e8881a39e9" + sha256 arm64_big_sur: "b9730a62abfc75a28d7794640a4430455764f03632ab68f830123ef493a66bcb" + sha256 sonoma: "b22ec30af45e2a51b4fab90edf68182d74bbd93194fb3b664b088980e7f38809" + sha256 ventura: "d1990c6f162f68c59d59443f0e97de4ca3150bc097d3e964354f74812fb7d76f" + sha256 monterey: "5f4a2bfcb6a2984b30ed79ba3234f11caa02423d0843a748c4b0400daed2dc0e" + sha256 big_sur: "f7a682871eb5ab4e001262bbeda434afe1f8520aa80254146e03963b4ddfd9e8" + sha256 arm64_linux: "5a716abc4e3a5db0cc94acc29e10ca98abdefc878c3ab5f1c27c6869ff5a84ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c3a37a24bcd329cb8da341dab08f396654c1ccf7f8e0c7e63adba1626997458" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libvisual-plugins" => :test + depends_on "xorg-server" => :test + + depends_on "libvisual" + depends_on "projectm" + + def install + # NOTE: We cannot write to libvisual's cellar, so we deflect + # installation and leverage brew's auto-symlinking + # to /lib/libvisual-./actor . + libvisual = Formula["libvisual"] + inreplace "CMakeLists.txt", + "LIBRARY DESTINATION \"${LIBVISUAL_ACTOR_PLUGINS_DIR}\"", + "LIBRARY DESTINATION \"#{lib}/libvisual-#{libvisual.version.major_minor}/actor\"" + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + doc.install "AUTHORS.md" => "AUTHORS" + end + + test do + libvisual = Formula["libvisual"] + lv_tool = libvisual.bin/"lv-tool-#{libvisual.version.major_minor}" + + # Test that locating used plugins works properly + plugin_help_output = shell_output("#{lv_tool} --plugin-help 2>&1") + assert_match " (debug)", plugin_help_output + assert_match " (projectM)", plugin_help_output + + # Tests that lv-tool starts up projectM without crashing + xvfb_pid = fork do + exec Formula["xorg-server"].bin/"Xvfb", ":1" + end + ENV["DISPLAY"] = ":1" + + lv_tool_pid = fork do + # NOTE: The two lines "assertion `video != NULL' failed" in the output + # are to be expected and can be ignored. + exec lv_tool, "--input", "debug", "--actor", "projectM" + end + + sleep 5 + ensure + Process.kill("SIGINT", lv_tool_pid) + Process.wait(lv_tool_pid) + + Process.kill("SIGINT", xvfb_pid) + Process.wait(xvfb_pid) + end +end diff --git a/Formula/lib/libvisual.rb b/Formula/lib/libvisual.rb new file mode 100644 index 0000000000000..78c53c8072f46 --- /dev/null +++ b/Formula/lib/libvisual.rb @@ -0,0 +1,45 @@ +class Libvisual < Formula + desc "Audio Visualization tool and library" + homepage "https://github.com/Libvisual/libvisual" + url "https://github.com/Libvisual/libvisual/releases/download/libvisual-0.4.2/libvisual-0.4.2.tar.gz" + sha256 "63085fd9835c42c9399ea6bb13a7ebd4b1547ace75c4595ce8e9759512bd998a" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "a3cf1f8ac6ed58fce5959717d16802adeb1920abfe6c421145de66eff2e9a51a" + sha256 cellar: :any, arm64_sonoma: "c56b6225bce042d7c7984074c9c508e2ab4d4c17491f941d72dbfc0cee0c3caa" + sha256 cellar: :any, arm64_ventura: "ba00f3f40ff28fe23cfea28a9a4782dd8e344e51d318cd9843c74fc3d52fe65a" + sha256 cellar: :any, arm64_monterey: "f9faaf86d813119e9c592781ec40405057118cc8567838bc77e30e757c6088da" + sha256 cellar: :any, arm64_big_sur: "b789ada9eec40f397f5fc4e203abdbdce87da28c353e6b31f503a2b87f684c93" + sha256 cellar: :any, sonoma: "73b2ed9dd9a84d784a31b662f202e236f0d6158346ce931b77d1205ca390faad" + sha256 cellar: :any, ventura: "de0973df1bed9f47df99760b65c9e32fc44302b0931e5b41e47768cb3f6ea01e" + sha256 cellar: :any, monterey: "8cf0b4866dee89d477602b4de996f10ad8115158c7a1fc0a04bfdf6b55ab7084" + sha256 cellar: :any, big_sur: "6912bc1436fd9aa261090f4c0877c3b17b1aa8301defdb17c66f5f3410d060e1" + sha256 arm64_linux: "c1037bb9d22337170f186be7d8ad1ccce9ef18dcf55e92cbd8424b7495204d03" + sha256 x86_64_linux: "ceefedcaeb4e18c06c22c2a210e35d3439783f2f457107090d91d2b777e788f2" + end + + depends_on "pkgconf" => :build + depends_on "sdl12-compat" + + def install + # NOTE: Other formulae would not be able to install to libvisual's cellar + # so we rely on brew's auto-symlinking to + # /lib/libvisual-. . + # See libvisual-plugins.rb and/or libvisual-projectm.rb + # for how this is used by a formula installing libvisual plug-ins. + inreplace "configure", + "LIBVISUAL_PLUGINS_BASE_DIR=\"${libdir}/libvisual-${LIBVISUAL_VERSION_SUFFIX}\"", + "LIBVISUAL_PLUGINS_BASE_DIR=\"#{HOMEBREW_PREFIX}/lib/libvisual-#{version.major_minor}\"" + + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + # NOTE: Without any plug-ins, there is no more that we could test. + lv_tool = bin/"lv-tool-#{version.major_minor}" + assert_match version.to_s, shell_output("#{lv_tool} --version") + end +end diff --git a/Formula/lib/libvmaf.rb b/Formula/lib/libvmaf.rb new file mode 100644 index 0000000000000..ac3887bcdb4e6 --- /dev/null +++ b/Formula/lib/libvmaf.rb @@ -0,0 +1,52 @@ +class Libvmaf < Formula + desc "Perceptual video quality assessment based on multi-method fusion" + homepage "https://github.com/Netflix/vmaf" + url "https://github.com/Netflix/vmaf/archive/refs/tags/v3.0.0.tar.gz" + sha256 "7178c4833639e6b989ecae73131d02f70735fdb3fc2c7d84bc36c9c3461d93b1" + license "BSD-2-Clause-Patent" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "0809635a529d0e53e927cb9834225210096c625b10ab7eb1211cadf63a1016c5" + sha256 cellar: :any, arm64_sonoma: "56701b888674f0dfe0e67224cf1e851888b6ab044ac696ced31b13c8c7a61d0b" + sha256 cellar: :any, arm64_ventura: "ca7a55e4abb5861b0bdc2fbb14fe298e466f9910298e043efc2d47d17332d686" + sha256 cellar: :any, arm64_monterey: "45a7329171c81b91618e385d2d35fedb8dfe91355d0ef4c1aa2951bb0c436aef" + sha256 cellar: :any, sonoma: "64600bc64ae6dc61c6b9f31c7c4ee35a045b72966ba85d6de1e8f7b0fb575c6f" + sha256 cellar: :any, ventura: "a021ade94bade88689b21bcf06e6055a9d700ababafe51200620eda29a1e0951" + sha256 cellar: :any, monterey: "448eaea166d8f6f1c48d72c13fe8d1a46635b54556a6904d1fb351d2fc0d0a80" + sha256 cellar: :any_skip_relocation, arm64_linux: "91a91750ff43b3268c96f1a8e678e2fa43ab8773369a1f0b405ac95641a3fbec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d48ccc0729c4d04a062bc060518ea1370101fd52e718bc54fad10a9fb996d3cb" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + uses_from_macos "vim" => :build # needed for xxd + + on_intel do + depends_on "nasm" => :build + end + + def install + system "meson", "setup", "build", "libvmaf", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + pkgshare.install "model" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + return 0; + } + C + + flags = [ + "-I#{HOMEBREW_PREFIX}/include/libvmaf", + "-L#{lib}", + ] + + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libvncserver.rb b/Formula/lib/libvncserver.rb new file mode 100644 index 0000000000000..925c1e4e6517f --- /dev/null +++ b/Formula/lib/libvncserver.rb @@ -0,0 +1,57 @@ +class Libvncserver < Formula + desc "VNC server and client libraries" + homepage "https://libvnc.github.io/" + url "https://github.com/LibVNC/libvncserver/archive/refs/tags/LibVNCServer-0.9.15.tar.gz" + sha256 "62352c7795e231dfce044beb96156065a05a05c974e5de9e023d688d8ff675d7" + license "GPL-2.0-or-later" + head "https://github.com/LibVNC/libvncserver.git", branch: "master" + + livecheck do + url :stable + regex(/^LibVNCServer[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8dc88d75ffe2cf292dd44b3207f9c9fae289066c9dc5f4a004c8e86671ca4d06" + sha256 cellar: :any, arm64_sonoma: "e295b31d29e37617212cf0d69dbdf3ee07ccfa30e2f2610b8d1704a7e0847656" + sha256 cellar: :any, arm64_ventura: "6cd487a3c48729af0d6be975995826b830d81ebf7d32b9a64e6d50d6ba59245b" + sha256 cellar: :any, sonoma: "c26cb98d88424e0a498ceee1eeb5009b9b11b55db0df0826c9d7e7da94e1c317" + sha256 cellar: :any, ventura: "c6f5a152415c9036c91cff25c3ff2f0d0cf78de4bf09c4af260cd3ef5bb8f640" + sha256 cellar: :any_skip_relocation, arm64_linux: "0297b512315813159854b8450fdad94fb8f6db1d7bceb4de3d0e236331c75c7c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c1f651bd1e6e13695746043eaaba56b733f8ed4541bef2cc3f259ae99d02c10" + end + + depends_on "cmake" => :build + depends_on "jpeg-turbo" + depends_on "libgcrypt" + depends_on "libpng" + depends_on "openssl@3" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DJPEG_INCLUDE_DIR=#{Formula["jpeg-turbo"].opt_include}", + "-DJPEG_LIBRARY=#{Formula["jpeg-turbo"].opt_lib/shared_library("libjpeg")}", + "-DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix}", + "-DWITH_EXAMPLES=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "ctest", "--test-dir", "build", "--verbose" + system "cmake", "--install", "build" + end + + test do + (testpath/"server.cpp").write <<~CPP + #include + int main(int argc,char** argv) { + rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,400,300,8,3,4); + server->frameBuffer=(char*)malloc(400*300*4); + rfbInitServer(server); + return(0); + } + CPP + + system ENV.cc, "server.cpp", "-I#{include}", "-L#{lib}", + "-lvncserver", "-o", "server" + system "./server" + end +end diff --git a/Formula/lib/libvo-aacenc.rb b/Formula/lib/libvo-aacenc.rb new file mode 100644 index 0000000000000..bb6f4689c3684 --- /dev/null +++ b/Formula/lib/libvo-aacenc.rb @@ -0,0 +1,53 @@ +class LibvoAacenc < Formula + desc "VisualOn AAC encoder library" + homepage "https://opencore-amr.sourceforge.net/" + url "https://downloads.sourceforge.net/project/opencore-amr/vo-aacenc/vo-aacenc-0.1.3.tar.gz" + sha256 "e51a7477a359f18df7c4f82d195dab4e14e7414cbd48cf79cc195fc446850f36" + license "Apache-2.0" + + livecheck do + url :stable + regex(%r{url=.*?/vo-aacenc[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "364ec1b50f38e6b1b0dc5e1ea7b12b624e249aea41810491669c9356ff96feac" + sha256 cellar: :any, arm64_sonoma: "1e337ddc61248e2bba763f27de3fd1f3699a68e03fdf369e95ef39fd3dd5fac2" + sha256 cellar: :any, arm64_ventura: "0f29497bb74d3fb95f6197085ff4894d2cffb6b6cbc92beb43131bbdc088824b" + sha256 cellar: :any, arm64_monterey: "f25bbd61ab93bfe115c37ad611aad07bf0c553903078748803a813e907a783c1" + sha256 cellar: :any, arm64_big_sur: "cfc4dceab7f9a4a3037e00b26e046f310580ee5aa95906396052b91e22c89231" + sha256 cellar: :any, sonoma: "b41accd6b7a5b2b20f00e998ee9ea3930c09112273e290d4ea7e279b0089a36c" + sha256 cellar: :any, ventura: "5c092be2b303fc7bc9c5ce9b56a5cb71987186d5c23e9b8577a502d37b5cc34e" + sha256 cellar: :any, monterey: "3a4d5c0bc8e920fbeaee283bdf464f37c333e6aa0d0a7b88c4f7535cbf0e44c2" + sha256 cellar: :any, big_sur: "4776106dbfb4f81523750d6540847a16c74c4e97ed8271bb9e5ab592386310b9" + sha256 cellar: :any, catalina: "144e0c345d0567a74aba09cfec49fba8f409e2db5abcee96b598127cc5d722ad" + sha256 cellar: :any, mojave: "099ac7d191241c476ab4ba7375dd05e2d965adc6a7638cc616a99a243cbd077b" + sha256 cellar: :any, high_sierra: "761ecbbaaa2a944d077040692fc62fe2e929ec788ca7e23b3fb25e6ee1b88d3a" + sha256 cellar: :any, sierra: "9430e86c9f25aa9fcccf0a19cc6125c9397c23b311b993b1adf83cbe330cd9b4" + sha256 cellar: :any, el_capitan: "e9a59439f8eec4cdc4d273afb49cbd8f8357862d4d8c7c5d9d9d38588ec6d810" + sha256 cellar: :any_skip_relocation, arm64_linux: "e99e7f98b9c8754ad124303c8cd233596755f32f251a49c1ba61a52d8d2808ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "baed718396b9a19dea7de513f7991b72afcb2aae17504a7bbbaf9f0a40d355e4" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + VO_MEM_INFO info; info.Size = 1; + VO_S32 uid = 0; + VO_PTR pMem = (VO_PTR)cmnMemAlloc(uid, &info); + cmnMemFree(uid, pMem); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lvo-aacenc", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libvoikko.rb b/Formula/lib/libvoikko.rb new file mode 100644 index 0000000000000..49558a2156d0f --- /dev/null +++ b/Formula/lib/libvoikko.rb @@ -0,0 +1,55 @@ +class Libvoikko < Formula + desc "Linguistic software and Finnish dictionary" + homepage "https://voikko.puimula.org/" + url "https://www.puimula.org/voikko-sources/libvoikko/libvoikko-4.3.2.tar.gz" + sha256 "0156c2aaaa32d4b828addc7cefecfcea4591828a0b40f0cd8a80cd22f8590da2" + license "GPL-2.0-only" + + livecheck do + url "https://www.puimula.org/voikko-sources/libvoikko/" + regex(/href=.*?libvoikko[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5aa1e0f646f3533e698c59cc3c281fc5498408c410567e9d19950d44ed9e9612" + sha256 cellar: :any, arm64_sonoma: "8957b0f49a5a0b2341645f36962a931cbe141000aef931db14cfdf0e303b194c" + sha256 cellar: :any, arm64_ventura: "b7a92f298b4e10b01505b6933f61bc858f0bc0713c825194802a8eae652dad20" + sha256 cellar: :any, arm64_monterey: "a838e8ec04c3643544b3b832b31c8f62dddff8135f15c86548f07c1dcb78ebb3" + sha256 cellar: :any, arm64_big_sur: "1aad5d6a19c008bac0ded55478ade1f5b1535a29b7f4eb1130c5a1ca61c06946" + sha256 cellar: :any, sonoma: "eb4956d52a0ce511f0be35d33e29fc53c8a967ae9d27d13ceed9d9be649b8256" + sha256 cellar: :any, ventura: "9f0e09cb95209e847f281cbfcaec7375637a726c36df6ff2d29d9954225b8846" + sha256 cellar: :any, monterey: "121c5c56e2d25d74e01d3d9ae1d3ddc885dcf1336fabf9b75bfa4f191e8bd9b7" + sha256 cellar: :any, big_sur: "8b613d992e6e2d7311447d13a07b02a9c8ac42f60634c60c4be798b2fd872b9d" + sha256 arm64_linux: "10b52c16eb1d4789c71c520e31492c024e085717a1eb85e7fa000896a6626241" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3867449e1d923fd8c032734cf0e211f8b02e2afaa7e8d20797e4d700d2291931" + end + + depends_on "foma" => :build + depends_on "pkgconf" => :build + depends_on "hfstospell" + + uses_from_macos "python" => :build + + resource "voikko-fi" do + url "https://www.puimula.org/voikko-sources/voikko-fi/voikko-fi-2.5.tar.gz" + sha256 "3bc9b0a0562526173957bf23b5caaf57b60ecc53be63fc16874118002ec620f1" + end + + def install + system "./configure", "--disable-silent-rules", + "--with-dictionary-path=#{HOMEBREW_PREFIX}/lib/voikko", + *std_configure_args + system "make", "install" + + resource("voikko-fi").stage do + ENV.append_path "PATH", bin.to_s + system "make", "vvfst" + system "make", "vvfst-install", "DESTDIR=#{lib}/voikko" + lib.install_symlink "voikko" + end + end + + test do + assert_match "C: onkohan", pipe_output("#{bin}/voikkospell -m", "onkohan\n") + end +end diff --git a/Formula/lib/libvorbis.rb b/Formula/lib/libvorbis.rb new file mode 100644 index 0000000000000..daa274a86ab2a --- /dev/null +++ b/Formula/lib/libvorbis.rb @@ -0,0 +1,72 @@ +class Libvorbis < Formula + desc "Vorbis general audio compression codec" + homepage "https://xiph.org/vorbis/" + url "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.7.tar.xz" + mirror "https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.xz" + sha256 "b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b" + license "BSD-3-Clause" + + livecheck do + url "https://ftp.osuosl.org/pub/xiph/releases/vorbis/?C=M&O=D" + regex(%r{href=(?:["']?|.*?/)libvorbis[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "c28d1e0b461a4cf6f5aee72e664ac6f5f6f3efaab44f15b91924f08474cfafe1" + sha256 cellar: :any, arm64_sonoma: "f71115c28f65e1a87ae0dbe695421ecacfcddcaa6f91a3e0a23493da73560de5" + sha256 cellar: :any, arm64_ventura: "941871c7cfee1e15b60191e1c70296554871bc36e4fc8104ffc8919bb767f555" + sha256 cellar: :any, arm64_monterey: "08fc2566eda5d6fc2204c822bac51383a59c4536bae539b77cfe8c7f247f7517" + sha256 cellar: :any, arm64_big_sur: "37bcbe572118f7cc87daa488ef3d67c5cbd38e9e12e2e2b408df286f9b2fdc37" + sha256 cellar: :any, sonoma: "94aafb164cf8490d1d7c1cbe32695995c592c63a8cafe8621e793819079d7f46" + sha256 cellar: :any, ventura: "4e1a3b6ba6e8f790974930a7ceda16a3fb0b50d544021f6e39d1b38392e98512" + sha256 cellar: :any, monterey: "bd3125f7734f888f4ae9065f0b41a2baa281064686068f6c4189044d2408d0a8" + sha256 cellar: :any, big_sur: "6401378d08490ed76f4894b7e0812ef5cfbade699331dc07b7e88ad5438f7a78" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3dac34ab6697f236712689aede48c8519f66cb6f3c69d6fb98169ed546ba198" + sha256 cellar: :any_skip_relocation, x86_64_linux: "41daf79ce53910061acbe1f63ca95f53b4149d3ebb2b97c2bb4d31845820f219" + end + + head do + url "https://gitlab.xiph.org/xiph/vorbis.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libogg" + + resource("oggfile") do + url "https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg" + sha256 "f57b56d8aae4c847cf01224fb45293610d801cfdac43d932b5eeab1cd318182a" + end + + def install + system "./autogen.sh" if build.head? + inreplace "configure", " -force_cpusubtype_ALL", "" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include "vorbis/vorbisfile.h" + int main (void) { + OggVorbis_File vf; + assert (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) >= 0); + vorbis_info *vi = ov_info (&vf, -1); + printf("Bitstream is %d channel, %ldHz\\n", vi->channels, vi->rate); + printf("Encoded by: %s\\n", ov_comment(&vf,-1)->vendor); + return 0; + } + C + testpath.install resource("oggfile") + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lvorbisfile", + "-o", "test" + assert_match "2 channel, 44100Hz\nEncoded by: Lavf59.27.100", + shell_output("./test < Example.ogg") + end +end diff --git a/Formula/lib/libvpx.rb b/Formula/lib/libvpx.rb new file mode 100644 index 0000000000000..7d7c066bde521 --- /dev/null +++ b/Formula/lib/libvpx.rb @@ -0,0 +1,53 @@ +class Libvpx < Formula + desc "VP8/VP9 video codec" + homepage "https://www.webmproject.org/code/" + url "https://github.com/webmproject/libvpx/archive/refs/tags/v1.15.1.tar.gz" + sha256 "6cba661b22a552bad729bd2b52df5f0d57d14b9789219d46d38f73c821d3a990" + license "BSD-3-Clause" + head "https://chromium.googlesource.com/webm/libvpx.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bb811f6f020d8bc6925bbc2c7fd83b1c0af249771c569ffaff2b7615d3401b45" + sha256 cellar: :any, arm64_sonoma: "bb7841386f01932b9462487ebf797f5bdc33ef60ab25d03f9713a415f4ae5ee8" + sha256 cellar: :any, arm64_ventura: "c071523e335390cfb3a53a31605370e59661ceb34d3de70ce5c994f5fa266176" + sha256 cellar: :any, sonoma: "6e42222126ae6f4972a445ca86c025c757e821b968d0cfe27ae50872bcdc0778" + sha256 cellar: :any, ventura: "35cbc1468a09a60c41864e771f22fb9bcfd95d28e3562424ed96dd4729f3e4dc" + sha256 cellar: :any_skip_relocation, arm64_linux: "883ccf021a6b372db93238b4e761933605d6f502760912bac8c3816f7488fa85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42acfc38372a660e6db58db33af8a0700fdaecbd1775244cbe40941d7d3cb210" + end + + on_intel do + depends_on "yasm" => :build + end + + def install + ENV.runtime_cpu_detection + # NOTE: `libvpx` will fail to build on new macOS versions before the + # `configure` and `build/make/configure.sh` files are updated to support + # the new target (e.g., `arm64-darwin24-gcc` for macOS 15). We [temporarily] + # patch these files to add the new target (until there is a new version). + # If we don't want to create a patch each year, we can consider using + # `--force-target=#{Hardware::CPU.arch}-darwin#{OS.kernel_version.major}-gcc` + # to force the target instead. + args = %W[ + --prefix=#{prefix} + --disable-dependency-tracking + --disable-examples + --disable-unit-tests + --enable-pic + --enable-runtime-cpu-detect + --enable-shared + --enable-vp9-highbitdepth + ] + args << "--target=#{Hardware::CPU.arch}-darwin#{OS.kernel_version.major}-gcc" if OS.mac? + + mkdir "macbuild" do + system "../configure", *args + system "make", "install" + end + end + + test do + system "ar", "-x", "#{lib}/libvpx.a" + end +end diff --git a/Formula/lib/libvterm.rb b/Formula/lib/libvterm.rb new file mode 100644 index 0000000000000..6683ebea9d5b4 --- /dev/null +++ b/Formula/lib/libvterm.rb @@ -0,0 +1,44 @@ +class Libvterm < Formula + desc "C99 library which implements a VT220 or xterm terminal emulator" + homepage "https://www.leonerd.org.uk/code/libvterm/" + url "https://launchpad.net/libvterm/trunk/v0.3/+download/libvterm-0.3.3.tar.gz" + sha256 "09156f43dd2128bd347cbeebe50d9a571d32c64e0cf18d211197946aff7226e0" + license "MIT" + version_scheme 1 + + livecheck do + url :stable + regex(/href=.*?libvterm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1f9b512f3881f954e48acad23f8c6bcdc76ee979c89baaf0cabb9438843be999" + sha256 cellar: :any, arm64_sonoma: "bed130ed0997c0946d15e1452aa9abd30048b6d193878f027cf836648864ab7a" + sha256 cellar: :any, arm64_ventura: "0e2015cf46c8c515721f3200ed53ad9b98385985ed3eb91cb4503270469bed17" + sha256 cellar: :any, arm64_monterey: "dca8ab45e261d0c21e697a37a517ea23e545b4f8487dd7131ff5d933f80db5dc" + sha256 cellar: :any, sonoma: "bf0735a8ec7f8ce6d048b97f1851fa06c0a604a53ccc181fb793ce03e2714483" + sha256 cellar: :any, ventura: "1a6422cd35520a29dd3eb89b40c30526712d06ee2b3db9961e18d069a69a4ad9" + sha256 cellar: :any, monterey: "814b59c504a365bc66970c9056f83acd4b61cacb01d6c92bc0531a616a3893f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "94c3227d6602ce3f725fd56915dd0276ce5cd8e214114e7a9993172e30a6db32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63095180ed9b97bd7e357062fd1f0ecfc2a29ac51834a0264e6bfc08d631c614" + end + + depends_on "libtool" => :build + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() { + vterm_free(vterm_new(1, 1)); + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-lvterm", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libwapcaplet.rb b/Formula/lib/libwapcaplet.rb new file mode 100644 index 0000000000000..e4a31f026b116 --- /dev/null +++ b/Formula/lib/libwapcaplet.rb @@ -0,0 +1,53 @@ +class Libwapcaplet < Formula + desc "String internment library" + homepage "https://www.netsurf-browser.org/projects/libwapcaplet/" + url "https://download.netsurf-browser.org/libs/releases/libwapcaplet-0.4.3-src.tar.gz" + sha256 "9b2aa1dd6d6645f8e992b3697fdbd87f0c0e1da5721fa54ed29b484d13160c5c" + license "MIT" + head "https://git.netsurf-browser.org/libwapcaplet.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c751d28cd839b73ae650342148ec11c12f0c74a02c74228e5a455012a9753dec" + sha256 cellar: :any, arm64_sonoma: "5610a67ece4b5be886260e784b100c438ec7c083c7043a4684aabf8bda19feac" + sha256 cellar: :any, arm64_ventura: "8323a6bff5ca487dd247baf5cf9e0176073b6c6ced4ded461c0d121606cf54d1" + sha256 cellar: :any, arm64_monterey: "2d26edc578df10929cbe2fab48bebf5a21476a4eae3b8079ff20b840e181d8da" + sha256 cellar: :any, sonoma: "15ce272c1fdafa38065a3a567fde1c81430a414ee10646ab2b2da2ec91948575" + sha256 cellar: :any, ventura: "9ce24413c4c058e26f16e19cd7a4eb0e737f630959a093d388ca5596c4a7ccf0" + sha256 cellar: :any, monterey: "f5df809a0a5fab07b2722764d74d56540e045ce80b4ecba874318a17a395f534" + sha256 cellar: :any_skip_relocation, arm64_linux: "805adde0d7a8af3bf673f484c91f30eec2625aa4164e9b7e1b84708623ac8041" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d6d7288b404e81e20a7107f424e195d7faa5a8b8a68f5518bd8a8a0cdbdbd80" + end + + depends_on "netsurf-buildsystem" => :build + + def install + args = %W[ + NSSHARED=#{Formula["netsurf-buildsystem"].opt_pkgshare} + PREFIX=#{prefix} + ] + + system "make", "install", "COMPONENT_TYPE=lib-shared", *args + system "make", "install", "COMPONENT_TYPE=lib-static", *args + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() { + lwc_error rc; + + lwc_string *str; + rc = lwc_intern_string("Hello world!", 12, &str); + if (rc != lwc_error_ok) return 1; + + printf("%.*s", (int) lwc_string_length(str), lwc_string_data(str)); + lwc_string_destroy(str); + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lwapcaplet", "-o", "test" + assert_equal "Hello world!", shell_output(testpath/"test") + end +end diff --git a/Formula/lib/libwbxml.rb b/Formula/lib/libwbxml.rb new file mode 100644 index 0000000000000..3a939d9ea859c --- /dev/null +++ b/Formula/lib/libwbxml.rb @@ -0,0 +1,49 @@ +class Libwbxml < Formula + desc "Library and tools to parse and encode WBXML documents" + homepage "https://github.com/libwbxml/libwbxml" + url "https://github.com/libwbxml/libwbxml/archive/refs/tags/libwbxml-0.11.10.tar.gz" + sha256 "027b77ab7c06458b73cbcf1f06f9cf73b65acdbb2ac170b234c1d736069acae4" + license "LGPL-2.1-or-later" + head "https://github.com/libwbxml/libwbxml.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "07916c39f4553dd58011f13bf93e38769b5e4995a7622b98fde568fbf77a0424" + sha256 cellar: :any, arm64_sonoma: "eec64b623fdf01ee3124f51673a09730bc15cd60c190d056319ae0a52d998516" + sha256 cellar: :any, arm64_ventura: "f3406dd887132a07e67da3066e036c712d7594b8ba8cba43b072a66b87196714" + sha256 cellar: :any, arm64_monterey: "3e05f1f285a6f28cc3e1840b18badd6874d04e605a4d365fabe034e99d1496ae" + sha256 cellar: :any, sonoma: "f1254abc997a20ba1365b0338224547b22d0fa70e96be10533d1f73ecb1434cb" + sha256 cellar: :any, ventura: "574ee31b76288b7d5d76eeeafeca1463b022e1d6764b2c7b9998703db1537468" + sha256 cellar: :any, monterey: "21c569684b6cf9018b4128fa8bf110d2b693a4eaabcf7edbfe478fccbef0ebf7" + sha256 cellar: :any_skip_relocation, arm64_linux: "af31f53d8ca7525e40d6c8a76cf803a66fd75a54b0a5e4c1a32d3e3ce581efd8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6730a5a4348d5bddee6e064cd3728d5753986631dec4299cc93270da7d84645c" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "graphviz" => :build + depends_on "pkgconf" => :build + depends_on "wget" + + uses_from_macos "expat" + + def install + args = %W[ + -DBUILD_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/"input.xml").write <<~XML + + + + XML + + system bin/"xml2wbxml", "-o", "output.wbxml", "input.xml" + assert_path_exists testpath/"output.wbxml" + end +end diff --git a/Formula/lib/libwebm.rb b/Formula/lib/libwebm.rb new file mode 100644 index 0000000000000..027d7898df4f0 --- /dev/null +++ b/Formula/lib/libwebm.rb @@ -0,0 +1,60 @@ +class Libwebm < Formula + desc "WebM container" + homepage "https://www.webmproject.org/code/" + url "https://github.com/webmproject/libwebm/archive/refs/tags/libwebm-1.0.0.31.tar.gz" + sha256 "616cfdca1c869222dc60d5a49d112c1464040390e3876afca4d385347c6ce55e" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "49e659cf7620ec30ffecd7654da70d28120cd409ae68d7a48a646d2e57bcba1b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bdcfe9ac4d4a025957c618aee58539cad66931b0d74e17f05b049337cbebe651" + sha256 cellar: :any_skip_relocation, arm64_ventura: "21a08a2111b19d647ae24038c95ebafe8bcfb2db68d512e3e84615b27bf85c34" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6233852ce953b18eb356b7af0f5433984d770cfa50a9bf067a67469e9a4aa489" + sha256 cellar: :any_skip_relocation, sonoma: "25960105fc505deab8de42959a2586cf14ae0aafb8fe8bce4ffcb389b43badd5" + sha256 cellar: :any_skip_relocation, ventura: "a6dedcb3fb10cf5363a2cd18f95c62fb8e35f4383f524d29f08541c9f9bcd26d" + sha256 cellar: :any_skip_relocation, monterey: "1c9bce06869370b1e3222777fb5c29fe9f1f9f281f4a830e45b7f3e37441b64c" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe3eadf731b1ff0e1fea5a69a77f88e9643f6c27ce60202f80c583494b607fef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ca54a3fe3b38d5c2ccb316ab18779dfa6c7fa5b4d9533be5be3cb5bb822e64f" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + lib.install "build/libwebm.a" + bin.install Dir["build/{mkvparser_sample,mkvmuxer_sample,vttdemux,webm2pes}"] + + include.install Dir.glob("mkv*.hpp") + (include/"mkvmuxer").install Dir.glob("mkvmuxer/mkv*.h") + (include/"common").install Dir.glob("common/*.h") + (include/"mkvparser").install Dir.glob("mkvparser/mkv*.h") + include.install Dir.glob("vtt*.h") + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main() { + mkvmuxer::MkvWriter writer; + + std::string test_mkv = "#{testpath}/test.mkv"; + + if (!writer.Open(test_mkv.c_str())) { + std::cerr << "Failed to open the MKV file." << std::endl; + return 1; + } + + writer.Close(); + std::cout << "MkvWriter test completed successfully." << std::endl; + return 0; + } + CPP + + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-lwebm" + system "./test" + assert_path_exists testpath/"test.mkv" + end +end diff --git a/Formula/lib/libwebsockets.rb b/Formula/lib/libwebsockets.rb new file mode 100644 index 0000000000000..42fe37e268500 --- /dev/null +++ b/Formula/lib/libwebsockets.rb @@ -0,0 +1,64 @@ +class Libwebsockets < Formula + desc "C websockets server library" + homepage "https://github.com/warmcat/libwebsockets" + url "https://github.com/warmcat/libwebsockets/archive/refs/tags/v4.3.5.tar.gz" + sha256 "87f99ad32803ed325fceac5327aae1f5c1b417d54ee61ad36cffc8df5f5ab276" + license "MIT" + head "https://github.com/warmcat/libwebsockets.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "9e99f2685bfac3273ac873bedec5c4ce4514666bf717dc9318856810ab92f7d2" + sha256 arm64_sonoma: "8ea3a281fe5caf527100e46eeda10d31ac366839d846785da3c5b365f8882e75" + sha256 arm64_ventura: "1fe9ee68992714b466b2cfe7dffe84f4e08fe10de909d44916b5155887f9e825" + sha256 sonoma: "aa41d5252a17883dbb24bf7f88a1246ba5f928fd6373983923fc74aec5f34198" + sha256 ventura: "7690e37818cd8b559f7fd44ef1380da6ade8830294899f2d02c513c446ac3f15" + sha256 arm64_linux: "543d812d4c12757637936ae3180496ce33254d92bfa4577f12fac418736f84c0" + sha256 x86_64_linux: "a5baeb55111964b22daeb1bcc9138d7835999ee92e836eaac24fb616859dc654" + end + + depends_on "cmake" => :build + depends_on "libevent" + depends_on "libuv" + depends_on "openssl@3" + + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", + "-DLWS_IPV6=ON", + "-DLWS_WITH_HTTP2=ON", + "-DLWS_WITH_LIBEVENT=ON", + "-DLWS_WITH_LIBUV=ON", + "-DLWS_WITH_PLUGINS=ON", + "-DLWS_WITHOUT_TESTAPPS=ON", + "-DLWS_UNIX_SOCK=ON", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main() + { + struct lws_context_creation_info info; + memset(&info, 0, sizeof(info)); + struct lws_context *context; + context = lws_create_context(&info); + lws_context_destroy(context); + return 0; + } + C + system ENV.cc, "test.c", "-I#{Formula["openssl@3"].opt_prefix}/include", + "-L#{lib}", "-lwebsockets", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libwmf.rb b/Formula/lib/libwmf.rb new file mode 100644 index 0000000000000..22662227ca8df --- /dev/null +++ b/Formula/lib/libwmf.rb @@ -0,0 +1,58 @@ +class Libwmf < Formula + desc "Library for converting WMF (Window Metafile Format) files" + homepage "https://github.com/caolanm/libwmf" + url "https://github.com/caolanm/libwmf/archive/refs/tags/v0.2.13.tar.gz" + sha256 "18ba69febd2f515d98a2352de284a8051896062ac9728d2ead07bc39ea75a068" + license all_of: [ + "LGPL-2.0-or-later", + "GPL-2.0-or-later", # COPYING + "GD", # src/extra/gd + ] + + bottle do + sha256 arm64_sequoia: "8349a368a01bc74f298eb1f7ba3a7b66ce7807d4fd32957c7713caaa52107317" + sha256 arm64_sonoma: "ba24f0c59a437bf0e82d7cb946b841894544cd1c23e2c867a0d171cdfd2ea672" + sha256 arm64_ventura: "9e85223008fa0b081256f5c6e94200dfb4610394be5dc25b782125c36b69417a" + sha256 sonoma: "b85946372c5e9a9f13d1a8299553ab0e5b4ffed45429b785fe5281175d62e3ba" + sha256 ventura: "a889684fd9d5bf65349b30808ae820014a2f72650b23d35e8f7a01cb887f3aef" + sha256 arm64_linux: "80bbb71aed983052b36b9ca4de431ff2269e68b0e0549f70450bb16d21b9a5cb" + sha256 x86_64_linux: "486038114925fd4a2e2203ae86931276b4b82fda8e47f39772a123c3adffa37a" + end + + depends_on "pkgconf" => :build + + depends_on "freetype" + depends_on "jpeg-turbo" + depends_on "libpng" + + uses_from_macos "expat" + uses_from_macos "zlib" + + # Backport fix for macOS + patch do + url "https://github.com/caolanm/libwmf/commit/5c0ffc6320c40a565ff8014d772670df3e0ad87d.patch?full_index=1" + sha256 "80ae84a904baa21e1566e3d2bca1c6aaa0a2a30f684fe50f25e7e5751ef3ec93" + end + + def install + system "./configure", "--disable-silent-rules", + "--with-gsfontdir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts", + "--with-gsfontmap=#{HOMEBREW_PREFIX}/share/ghostscript/Resource/Init/Fontmap.GS", + "--without-x", + *std_configure_args + system "make", "install" + end + + test do + resource "formula1.wmf" do + url "https://github.com/caolanm/libwmf/raw/3ea3a65ad1b4528ed1c5795071a0142a0e61ec7b/examples/formula1.wmf" + sha256 "a0d9829692eebfa3bdb23d62f474d58cc4ea2489c07c6fcb63338eb3fb2c14d2" + end + resource("formula1.wmf").stage(testpath) + + output = shell_output("#{bin}/wmf2svg --maxwidth=100 --maxheight=100 formula1.wmf") + assert_match '&1", 2) + end +end diff --git a/Formula/lib/libwpd.rb b/Formula/lib/libwpd.rb new file mode 100644 index 0000000000000..bf7b6125fe2ca --- /dev/null +++ b/Formula/lib/libwpd.rb @@ -0,0 +1,75 @@ +class Libwpd < Formula + desc "General purpose library for reading WordPerfect files" + homepage "https://libwpd.sourceforge.net/" + url "https://dev-www.libreoffice.org/src/libwpd-0.10.3.tar.xz" + sha256 "2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09" + license any_of: ["MPL-2.0", "LGPL-2.1-or-later"] + + livecheck do + url "https://dev-www.libreoffice.org/src/" + regex(/href=["']?libwpd[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "71e3f65d29d9aa0f23401a25f63b8abf5168d88a6406664c13588fb73261b897" + sha256 cellar: :any, arm64_sonoma: "b6800d44d6079dcbd79adb7942599eda78fa890d16ba5b7eeb2c4efdd1791ca4" + sha256 cellar: :any, arm64_ventura: "99f0b0dd570023f92e2d932d5a6fc9308450fcc2a89a5af43ce595b477bf90ba" + sha256 cellar: :any, arm64_monterey: "07859be4298f02006c4fc96a58d0cb26a01302d8417ae4131d40342bbbb069a3" + sha256 cellar: :any, arm64_big_sur: "0a31f499bc64b2f40d0eca1eb0b4c1e0be8b54f143692aa498d2e3003e5afc2d" + sha256 cellar: :any, sonoma: "2b25a9f4f6a55fcc60a533eb12531a394761f19d5701e8ba5512f654c04d2c11" + sha256 cellar: :any, ventura: "94ab87267b633ee7c374462f66cd7a377253c302d651228a2ae3aadbf45e5ef2" + sha256 cellar: :any, monterey: "21ddf2818ce34d1ece8233dc5b48d8ea26f1f626faee4ac0745cb5a2fd2a8277" + sha256 cellar: :any, big_sur: "dc99c9e01014aefc2435c222f571dbd7e36cc7ba4b275b0ba826874ed6b1c416" + sha256 cellar: :any, catalina: "edb924ac33633d851f162839c2e1ef57734c81bd5a6d3d2cde7750175bd19386" + sha256 cellar: :any, mojave: "b9cdcbf1e0c875c8666f16a9547386754c40607652b0255d6eda8b2afb2da229" + sha256 cellar: :any, high_sierra: "baba04ac2fc8bcd2bbf890f8d7e3e27f7eae3044d960f027634e3d0310447dc8" + sha256 cellar: :any, sierra: "f4ef8b16411ea32e77e35bf0a8109b5f7651931e885ffd4ad7a8933a12d4f749" + sha256 cellar: :any_skip_relocation, arm64_linux: "81464149ac1791ff235b62e286bff669440c36793e92b039b648b96c42d9e73f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "589effab1c398690ba5ee3b616d3ab9667260d013ac3ebb93aef4a69dc1ebe9b" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "libgsf" + depends_on "librevenge" + + # Apply https://sourceforge.net/p/libwpd/code/ci/333c8a26f231bea26ec3d56245315041bbf5577f + # Remove with next release. + patch :DATA + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + return libwpd::WPD_OK; + } + CPP + system ENV.cc, "test.cpp", + "-I#{Formula["librevenge"].opt_include}/librevenge-0.0", + "-I#{include}/libwpd-0.10", + "-L#{Formula["librevenge"].opt_lib}", + "-L#{lib}", + "-lwpd-0.10", "-lrevenge-0.0", + "-o", "test" + system "./test" + end +end + +__END__ +--- a/src/lib/WPXTable.h ++++ b/src/lib/WPXTable.h +@@ -53,7 +53,7 @@ + ~WPXTable(); + void insertRow(); + void insertCell(unsigned char colSpan, unsigned char rowSpan, unsigned char borderBits); +- const WPXTableCell *getCell(size_t i, size_t j) ++ const WPXTableCell *getCell(std::size_t i, std::size_t j) + { + return &(m_tableRows[i])[j]; + } diff --git a/Formula/lib/libwpe.rb b/Formula/lib/libwpe.rb new file mode 100644 index 0000000000000..0507cca01a3ab --- /dev/null +++ b/Formula/lib/libwpe.rb @@ -0,0 +1,46 @@ +class Libwpe < Formula + desc "General-purpose library for WPE WebKit" + homepage "https://wpewebkit.org/" + url "https://github.com/WebPlatformForEmbedded/libwpe/releases/download/1.16.2/libwpe-1.16.2.tar.xz" + sha256 "960bdd11c3f2cf5bd91569603ed6d2aa42fd4000ed7cac930a804eac367888d7" + license "BSD-2-Clause" + head "https://github.com/WebPlatformForEmbedded/libwpe.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_linux: "21430cbe282f3c972c7816b2694042bbbe05817410119e62ecbceacb984d4586" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a306319524cd2e8d329c387f4f62bf4bc8511c5dd6f58527911c6560f2109ce4" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libxkbcommon" + depends_on :linux + depends_on "mesa" + + 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-test.c").write <<~C + #include "wpe/wpe.h" + #include + int main() { + printf("%u.%u.%u", wpe_get_major_version(), wpe_get_minor_version(), wpe_get_micro_version()); + } + C + ENV.append_to_cflags "-I#{include}/wpe-1.0" + ENV.append "LDFLAGS", "-L#{lib}" + ENV.append "LDLIBS", "-lwpe-1.0" + system "make", "wpe-test" + assert_equal version.to_s, shell_output("./wpe-test") + end +end diff --git a/Formula/lib/libwpg.rb b/Formula/lib/libwpg.rb new file mode 100644 index 0000000000000..b20521d1579ff --- /dev/null +++ b/Formula/lib/libwpg.rb @@ -0,0 +1,53 @@ +class Libwpg < Formula + desc "Library for reading and parsing Word Perfect Graphics format" + homepage "https://libwpg.sourceforge.net/" + url "https://dev-www.libreoffice.org/src/libwpg-0.3.4.tar.xz" + sha256 "b55fda9440d1e070630eb2487d8b8697cf412c214a27caee9df69cec7c004de3" + license all_of: ["LGPL-2.1-only", "MPL-2.0"] + + livecheck do + url "https://dev-www.libreoffice.org/src/" + regex(/href=["']?libwpg[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "a062020deb99f826a9d7db555d3205c8fb56f431d19e916f7b17319641b9a00a" + sha256 cellar: :any, arm64_sonoma: "d2b1e6eed68f342f9a97a9059d84880c33316fbc4efaa011562b852432e6dd11" + sha256 cellar: :any, arm64_ventura: "c31dc532929561dc728f03ac0ff1ab2aeef0c0428df51cc8be13a7ea05a0e16e" + sha256 cellar: :any, arm64_monterey: "387b98747ca1ef188c562bc3ab88283920a9ec220666b4a49ce27de7fbcd5f5c" + sha256 cellar: :any, arm64_big_sur: "6849a8efcf3f1a1440cb7b929d5cd1053d5b7944f7bc5adcfa835a95951b0eb3" + sha256 cellar: :any, sonoma: "aacf3220cfb291ab3d957eef407bc743ed767e17a0b926fa542db7fd785add80" + sha256 cellar: :any, ventura: "58f2f9eca5ef6a1c769dd67aa64f8b4d90740d1c0493791c6f06b3c2ab06a1d5" + sha256 cellar: :any, monterey: "24d4e25ee9c2468c18d9a578ef7a46499f4e46f1d85316ef57ce128adee16f63" + sha256 cellar: :any, big_sur: "c97eced8c226e67a62e503b0edf54f4114c0b3ef6213765eacdef6ae719938d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d08712e0baa978acef8431b8d295d02f82a3d50c7396034df4a3e17be1551c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c079bc2c2fc9c98e967d13ffa15b47ab25efc59ba66f731ce3758d1265017368" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + depends_on "librevenge" + depends_on "libwpd" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + return libwpg::WPG_AUTODETECT; + } + CPP + system ENV.cc, "test.cpp", + "-I#{Formula["librevenge"].opt_include}/librevenge-0.0", + "-I#{include}/libwpg-0.3", + "-L#{Formula["librevenge"].opt_lib}", + "-L#{lib}", + "-lwpg-0.3", "-lrevenge-0.0", + "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libwps.rb b/Formula/lib/libwps.rb new file mode 100644 index 0000000000000..f310d8cb36629 --- /dev/null +++ b/Formula/lib/libwps.rb @@ -0,0 +1,55 @@ +class Libwps < Formula + desc "Library to import files in MS Works format" + homepage "https://libwps.sourceforge.net/" + url "https://downloads.sourceforge.net/project/libwps/libwps/libwps-0.4.14/libwps-0.4.14.tar.xz" + sha256 "365b968e270e85a8469c6b160aa6af5619a4e6c995dbb04c1ecc1b4dd13e80de" + license any_of: ["LGPL-2.1-or-later", "MPL-2.0"] + + livecheck do + url :stable + regex(%r{url=.*?/libwps(?:/|[._-])v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1fcecd4b70835db56d8ee1e19e7fb07ab34cd1f43d64dce1900baa57a59b2949" + sha256 cellar: :any, arm64_sonoma: "53e4b189ac3f6a5707904498385226b759f0c8a222378682cad4303c0169b83e" + sha256 cellar: :any, arm64_ventura: "6d72183ffc9b82c287d94ccdb14d6e78a71da5a62d10c10f2ff50ab74908087f" + sha256 cellar: :any, arm64_monterey: "4ea281eea24cce797c6f21a41a6d9be0911343b28bf58b5e4585442959745127" + sha256 cellar: :any, arm64_big_sur: "1fb8baf32244abfb5d39ffc8f5286a7fa0111333e57c3d43f1f337f6ff43100a" + sha256 cellar: :any, sonoma: "eafcfcc4568c94cb334613505826f62aeee27380acab0ddff6f88c5e832ee128" + sha256 cellar: :any, ventura: "05d18e5787514170da6f2b7e2bb58f449bb4c282c9e35ff32ddf4b13747ee458" + sha256 cellar: :any, monterey: "6609484542bfcf5046702cf470e20da2dd99ef1597b6e60ca08858e5975afbe6" + sha256 cellar: :any, big_sur: "bf9c54ae1889bf3dcc90034d9b5a11bd14c452b69463343c3bd8f221031109d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "66e66c4fe9ca468d38f275f3fafeb4c5fcdabffc65f7f09c4256f10454421a14" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1947ed7197be31c9abf52b092a535de6d3d1416c9fef915661ba81da4cee37b6" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + depends_on "librevenge" + depends_on "libwpd" + + def install + # Installing Doxygen docs trips up make install + system "./configure", "--without-docs", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + return libwps::WPS_OK; + } + CPP + system ENV.cc, "test.cpp", "-o", "test", + "-lrevenge-0.0", + "-I#{Formula["librevenge"].include}/librevenge-0.0", + "-L#{Formula["librevenge"].lib}", + "-lwpd-0.10", + "-I#{Formula["libwpd"].include}/libwpd-0.10", + "-L#{Formula["libwpd"].lib}", + "-lwps-0.4", "-I#{include}/libwps-0.4", "-L#{lib}" + system "./test" + end +end diff --git a/Formula/lib/libx11.rb b/Formula/lib/libx11.rb new file mode 100644 index 0000000000000..3cacd538c17d3 --- /dev/null +++ b/Formula/lib/libx11.rb @@ -0,0 +1,79 @@ +class Libx11 < Formula + desc "X.Org: Core X11 protocol client library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libX11-1.8.12.tar.gz" + sha256 "220fbcf54b6e4d8dc40076ff4ab87954358019982490b33c7802190b62d89ce1" + license "MIT" + + bottle do + sha256 arm64_sequoia: "57ccd55767fd6ffc7d32940d1c59d59b42c82abff4abf795b4ca0df489da42f1" + sha256 arm64_sonoma: "aa0440afde483eec625c716e22f9d4b883b5993a9b2bcf539f1199387127a46c" + sha256 arm64_ventura: "693416ac252f1635f9324ff123620482daa904debeb4297f69bc61b3e72176ff" + sha256 sonoma: "5d916769cf91a23fff62dbd1b9c791beeca44504e72907511b352f8f758dae4b" + sha256 ventura: "f1c6b7e52cfa19f8aa99cfd86dfa56597a719850244e4162905a385970862c54" + sha256 arm64_linux: "b18a0e0f7eff31b9ba6de1352133bf25b7645ca83d0fb937afa29c6031607a37" + sha256 x86_64_linux: "7e74d0c1204bf8bb3d9cc9984a0efce1cba85284505076a0508f29e190b7bb2b" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "xtrans" => :build + depends_on "libxcb" + depends_on "xorgproto" + + def install + ENV.delete "LC_ALL" + ENV["LC_CTYPE"] = "C" + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-unix-transport + --enable-tcp-transport + --enable-ipv6 + --enable-loadable-i18n + --enable-xthreads + --enable-specs=no + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { + Display* disp = XOpenDisplay(NULL); + if (disp == NULL) + { + fprintf(stderr, "Unable to connect to display\\n"); + return 0; + } + + int screen_num = DefaultScreen(disp); + unsigned long background = BlackPixel(disp, screen_num); + unsigned long border = WhitePixel(disp, screen_num); + int width = 60, height = 40; + Window win = XCreateSimpleWindow(disp, DefaultRootWindow(disp), 0, 0, width, height, 2, border, background); + XSelectInput(disp, win, ButtonPressMask|StructureNotifyMask); + XMapWindow(disp, win); // display blank window + + XGCValues values; + values.foreground = WhitePixel(disp, screen_num); + values.line_width = 1; + values.line_style = LineSolid; + GC pen = XCreateGC(disp, win, GCForeground|GCLineWidth|GCLineStyle, &values); + // draw two diagonal lines + XDrawLine(disp, win, pen, 0, 0, width, height); + XDrawLine(disp, win, pen, width, 0, 0, height); + + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lX11", "-o", "test", "-I#{include}" + system "./test" + end +end diff --git a/Formula/lib/libxau.rb b/Formula/lib/libxau.rb new file mode 100644 index 0000000000000..243bab9008e14 --- /dev/null +++ b/Formula/lib/libxau.rb @@ -0,0 +1,46 @@ +class Libxau < Formula + desc "X.Org: A Sample Authorization Protocol for X" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXau-1.0.12.tar.xz" + sha256 "74d0e4dfa3d39ad8939e99bda37f5967aba528211076828464d2777d477fc0fb" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e8a5fedbd9e5c49f10006171decc5b1e56c48fbd4267e7668f813e47c0da984f" + sha256 cellar: :any, arm64_sonoma: "418c0c03e6422ba74ca2d59b38b6cd01103587ad859932b0bc3519a3f9e26e23" + sha256 cellar: :any, arm64_ventura: "7c0325743bb51f272a93e9fc1edd32f86d89f4f179ba474880b524834d305c2d" + sha256 cellar: :any, sonoma: "46c7dff8ac6917ffc355a1ac7242fb37f53cb4e7276a9c297b31cd0d35b36b6f" + sha256 cellar: :any, ventura: "9979936a79a670d37c775a0163b3f24544a264343242b1820332d86e7e5200c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec2a9c4d8d2311c730503f3b7976086612efce6a9a03193508f61f47d8ef5c53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eaab2aad3bf7abb8cf6f1b164cd6648731814a71b1b3cb1141055d48fa07914d" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xauth.h" + + int main(int argc, char* argv[]) { + Xauth auth; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxaw.rb b/Formula/lib/libxaw.rb new file mode 100644 index 0000000000000..a16ad3e03de63 --- /dev/null +++ b/Formula/lib/libxaw.rb @@ -0,0 +1,61 @@ +class Libxaw < Formula + desc "X.Org: X Athena Widget Set" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXaw-1.0.16.tar.xz" + sha256 "731d572b54c708f81e197a6afa8016918e2e06dfd3025e066ca642a5b8c39c8f" + license "MIT" + revision 1 + + bottle do + sha256 arm64_sequoia: "fffcdd2fd7d440a43218e33fe5e4de0c4fca96641deb2c832abaca62b04e3b2f" + sha256 arm64_sonoma: "3682eac9ae16a794bcea9e0bb4b52a76caf44ca4894f93f1a5fcb2971cf83c04" + sha256 arm64_ventura: "822beca8cfc5df449c8c2616f41074357e5a10a9fe8d294912687cd2decd9094" + sha256 arm64_monterey: "8575520c38a7b08e174384ec3ee3bbba96718ccd607065b92ae145cdc3b40251" + sha256 sonoma: "8500c636998ace11a0cf584ed9a45fc6c4ee5c505f04f2279c223a8214e4dfef" + sha256 ventura: "97953eebb88716cfbc585f5bd4cf80d299beca4aa19b62eaa1fdc1c43ea810b7" + sha256 monterey: "27c02e2745a3e97ddf364ca4a41191a65ea63a038f1c971a3c367b1a7b2d6c17" + sha256 arm64_linux: "6819d4477ad52c23eb7023c0679d339adf59b43852cc05ef74f4a40f91a4d423" + sha256 x86_64_linux: "b848eb55c4b41ebc2923e5f0dd8a3fcd0fcf7ec6700347f6469ff88b958857da" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "libxmu" + depends_on "libxpm" + depends_on "libxt" + + # Backport fix for improved linking on macOS + patch do + on_macos do + url "https://gitlab.freedesktop.org/xorg/lib/libxaw/-/commit/cce2abf00fa2c9a695f1d0e5c931c70c1ba579cf.diff" + sha256 "64bfebc3fcb788582abbf2589514e64b3fa62457089c77e644177f1c0a80c10f" + end + end + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --disable-specs + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/Xaw/Text.h" + + int main(int argc, char* argv[]) { + XawTextScrollMode mode; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxaw3d.rb b/Formula/lib/libxaw3d.rb new file mode 100644 index 0000000000000..644fc6968d783 --- /dev/null +++ b/Formula/lib/libxaw3d.rb @@ -0,0 +1,62 @@ +class Libxaw3d < Formula + desc "X.Org: 3D Athena widget set based on the Xt library" + homepage "https://www.x.org/" + url "https://xorg.freedesktop.org/archive/individual/lib/libXaw3d-1.6.6.tar.gz" + sha256 "0cdb8f51c390b0f9f5bec74454e53b15b6b815bc280f6b7c969400c9ef595803" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "84926ca78b2283f5c32b42e003c4a6711d208aa2c0d31e81192816561e967830" + sha256 cellar: :any, arm64_sonoma: "2bcf584c0f4e7997ce9e72a452237f102eba55f0069565eb407f5fafe5d85fb5" + sha256 cellar: :any, arm64_ventura: "ee7c26268433917e585a7acc992c04abeac87d2954fe1a3d1e8978e1d89d3832" + sha256 cellar: :any, arm64_monterey: "906cc60ffd7998219e6cd38bfd86e9331193ac7cc38ec5557a751a5d76c60f91" + sha256 cellar: :any, sonoma: "7c63814a4ba44cd9b855922ae73e393fe8d1c75e74451b26de218cf790fffe2d" + sha256 cellar: :any, ventura: "813b0a28985d4942c631d31e26c6135bca92a88652aa6c634cd92b957dcbce61" + sha256 cellar: :any, monterey: "57849f92c0f2cdd938b95d8c0f7aec3f8b1c5c8d06211a290c3112b67b212b78" + sha256 cellar: :any_skip_relocation, arm64_linux: "06d7e75d366e78189c6669037314423a41ef33afb196d4f503017739f6ec5704" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce52f2da8dd74a3df5d277ffeb678f86a9572b0c52a29e513aa688d37e704210" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "libxmu" + depends_on "libxpm" + depends_on "libxt" + + # Backport fix for improved linking on macOS + patch do + on_macos do + url "https://gitlab.freedesktop.org/xorg/lib/libxaw3d/-/commit/b2365950e5314b0453dd7cf2a552aa30ec19c046.diff" + sha256 "18919b30bfafd2642895a4f9497f54b8d263e4eb593f192a923340732ed4afa8" + end + end + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-gray-stipples + --enable-arrow-scrollbars + --enable-multiplane-bitmaps + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + int main() { printf("%d", sizeof(LabelWidget)); } + C + system ENV.cc, "test.c", "-o", "test" + output = shell_output("./test").chomp + assert_match "8", output + end +end diff --git a/Formula/lib/libxc.rb b/Formula/lib/libxc.rb new file mode 100644 index 0000000000000..3dea0b9fcf40e --- /dev/null +++ b/Formula/lib/libxc.rb @@ -0,0 +1,73 @@ +class Libxc < Formula + desc "Library of exchange and correlation functionals for codes" + homepage "https://libxc.gitlab.io/" + url "https://gitlab.com/libxc/libxc/-/archive/7.0.0/libxc-7.0.0.tar.bz2" + sha256 "e9ae69f8966d8de6b7585abd9fab588794ada1fab8f689337959a35abbf9527d" + license "MPL-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "aa85b3a74a71bfa20b5298f35fef63fe1738a0c85a978ab1fbf94b56c1bf168c" + sha256 cellar: :any, arm64_sonoma: "ba31c84f6c649d6b133a62d0c69a0b6c92fdb9d9e6ef959abd527fca75b43652" + sha256 cellar: :any, arm64_ventura: "8a8f6c2dedb5446e4e0dfb6eef6c38acb7a134a2559e3828c2b7bca7c6cff747" + sha256 cellar: :any, sonoma: "6bcdc1b4b2820d7124c5b4c0b39566ff52cac816054945a960ef1c3a43838308" + sha256 cellar: :any, ventura: "1f2419e77039100f1a1adc062484e54a0866944235db1695fda292a0ea024894" + sha256 cellar: :any_skip_relocation, arm64_linux: "89f20334a32a623644fa01b73d2c7fb1e8ba63bb94aff2e52154b2fb794a0b01" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bfd3bd380e66af839073487bcdb4934684b437f48b8880334cdc2afed1e4782c" + end + + depends_on "cmake" => [:build, :test] + depends_on "gcc" # for gfortran + + def install + args = %w[ + -DENABLE_FORTRAN=ON + -DDISABLE_KXC=OFF + -DDISABLE_LXC=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 + # Common test files for both cmake and plain + (testpath/"test.c").write <<~C + #include + #include + int main() + { + int major, minor, micro; + xc_version(&major, &minor, µ); + printf("%d.%d.%d", major, minor, micro); + } + C + (testpath/"test.f90").write <<~FORTRAN + program lxctest + use xc_f03_lib_m + end program lxctest + FORTRAN + # Simple cmake example + (testpath / "CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.6) + project(test_libxc LANGUAGES C Fortran) + find_package(Libxc CONFIG REQUIRED) + add_executable(test_c test.c) + target_link_libraries(test_c PRIVATE Libxc::xc) + add_executable(test_fortran test.f90) + target_link_libraries(test_fortran PRIVATE Libxc::xcf03) + CMAKE + # Test cmake build + system "cmake", "-B", "build" + system "cmake", "--build", "build" + system "./build/test_c" + system "./build/test_fortran" + # Test compilers directly + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lxc", "-o", "ctest", "-lm" + system "./ctest" + system "gfortran", "test.f90", "-L#{lib}", "-lxc", "-I#{include}", + "-o", "ftest" + system "./ftest" + end +end diff --git a/Formula/lib/libxcb.rb b/Formula/lib/libxcb.rb new file mode 100644 index 0000000000000..78d41d439ab26 --- /dev/null +++ b/Formula/lib/libxcb.rb @@ -0,0 +1,98 @@ +class Libxcb < Formula + desc "X.Org: Interface to the X Window System protocol" + homepage "https://www.x.org/" + url "https://xorg.freedesktop.org/archive/individual/lib/libxcb-1.17.0.tar.xz" + sha256 "599ebf9996710fea71622e6e184f3a8ad5b43d0e5fa8c4e407123c88a59a6d55" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "cce8d9e12c3f0b2fdbffbb3f7ba02f7e25cf3fa495b3e759d34a6264599543b3" + sha256 cellar: :any, arm64_sonoma: "103f2b2f44b6dfd22bc936c9eb7f325b598374c549a9f56465b8cce80a2ea829" + sha256 cellar: :any, arm64_ventura: "3de506a3b5fd61bdd3f1cd5a244b82ea34b696894c8c3124e844a37ff6afd8c7" + sha256 cellar: :any, sonoma: "d7cbef805f6d1aab547a65a931972df59a768bb48ff845ecdcbf7b404f64cfa6" + sha256 cellar: :any, ventura: "b0bd40b6aba450db00c38a98d4a1e3b8cf3335f4df18e4044e60e1b0ad7fb481" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ab6cbc2dd873785c24e669f1749dc1e694740b9de496eef4289be27f389c79d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ccb2f6e9f4feb73b3dbc56248554bc8ce30cb34771ed987eec1bd956f8563e2" + end + + depends_on "pkgconf" => :build + depends_on "python@3.13" => :build # match version in `xcb-proto` + depends_on "xcb-proto" => :build + depends_on "libxau" + depends_on "libxdmcp" + + def install + python3 = "python3.13" + + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --enable-dri3 + --enable-ge + --enable-xevie + --enable-xprint + --enable-selinux + --disable-silent-rules + --enable-devel-docs=no + --with-doxygen=no + PYTHON=#{python3} + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include "xcb/xcb.h" + + int main() { + xcb_connection_t *connection; + xcb_atom_t *atoms; + xcb_intern_atom_cookie_t *cookies; + int count, i; + char **names; + char buf[100]; + + count = 200; + + connection = xcb_connect(NULL, NULL); + atoms = (xcb_atom_t *) malloc(count * sizeof(atoms)); + names = (char **) malloc(count * sizeof(char *)); + + for (i = 0; i < count; ++i) { + sprintf(buf, "NAME%d", i); + names[i] = strdup(buf); + memset(buf, 0, sizeof(buf)); + } + + cookies = (xcb_intern_atom_cookie_t *) malloc(count * sizeof(xcb_intern_atom_cookie_t)); + + for(i = 0; i < count; ++i) { + cookies[i] = xcb_intern_atom(connection, 0, strlen(names[i]), names[i]); + } + + for(i = 0; i < count; ++i) { + xcb_intern_atom_reply_t *r; + r = xcb_intern_atom_reply(connection, cookies[i], 0); + if(r) + atoms[i] = r->atom; + free(r); + } + + free(atoms); + free(cookies); + xcb_disconnect(connection); + return 0; + } + C + system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lxcb" + system "./test" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxcomposite.rb b/Formula/lib/libxcomposite.rb new file mode 100644 index 0000000000000..aefef2644ae37 --- /dev/null +++ b/Formula/lib/libxcomposite.rb @@ -0,0 +1,55 @@ +class Libxcomposite < Formula + desc "X.Org: Client library for the Composite extension" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXcomposite-0.4.6.tar.xz" + sha256 "fe40bcf0ae1a09070eba24088a5eb9810efe57453779ec1e20a55080c6dc2c87" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "da32d7ca9d60bea76c4c75ac3ac601601794a44689b7e7ecd0bb076730516202" + sha256 cellar: :any, arm64_sonoma: "5bb05841f68025cbe9d0db5f308f1065025a1ee118a6f8b9796774f936a518e1" + sha256 cellar: :any, arm64_ventura: "b0c612dfb969ecf35178c2182cd9fcc5f9506ec3f31f7b1960daccf5765966be" + sha256 cellar: :any, arm64_monterey: "9b0e2df221f534feb43981325bcf9a76b1842568e334b5b39e1e05a62e151be8" + sha256 cellar: :any, arm64_big_sur: "a9364f8f327cc0144f76c882b229594ff98f2116cbb70e47f67d719b9bec95d2" + sha256 cellar: :any, sonoma: "40e34f114bbdb3d709ea6fffd38cd116b6885dd12167f1011315f26ac45f61ad" + sha256 cellar: :any, ventura: "265fe93f675ddff1bafadf967d0e94ad661353212f3174509c045886d66b65bd" + sha256 cellar: :any, monterey: "e432a0fafe63d5d8273cf9c5610affa3aee679c2957563baac21a6b40cf79741" + sha256 cellar: :any, big_sur: "f3a01d95abda49871f6889677281038dfcf96bef7c12655a0d0f51b9dcebf363" + sha256 cellar: :any_skip_relocation, arm64_linux: "1e082d9e46db22cb5694fa3f84e992eb59e3ae08921b0ee479f0cf7eef3b46d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7c6925de51a563c4385b69861aef8eb8cd7cb7982dcbb4a2f4d8395728b2ffea" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxfixes" + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/extensions/Xcomposite.h" + + int main(int argc, char* argv[]) { + Display *d = NULL; + int s = DefaultScreen(d); + Window root = RootWindow(d, s); + XCompositeReleaseOverlayWindow(d, s); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lXcomposite" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxcrypt.rb b/Formula/lib/libxcrypt.rb new file mode 100644 index 0000000000000..c6f6629f329c8 --- /dev/null +++ b/Formula/lib/libxcrypt.rb @@ -0,0 +1,70 @@ +class Libxcrypt < Formula + 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.4.38/libxcrypt-4.4.38.tar.xz" + sha256 "80304b9c306ea799327f01d9a7549bdb28317789182631f1b54f4511b4206dd6" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "a064d22be7cf3136359f8bc7ddfe69d3d1da83cecba23679e8be3d5c3a6715fa" + sha256 cellar: :any, arm64_sonoma: "70ff0492ab9b04005ac3a10be7b840926e79c8e1005795a245e10a2845741897" + sha256 cellar: :any, arm64_ventura: "b44196ecde239115a28ed7470d21bd679cca173739c24a863ce393df04faffd2" + sha256 cellar: :any, sonoma: "1eb38a921fe68f9bf101f6ead351a71335a143ff842d1c294a771e1eecfcae88" + sha256 cellar: :any, ventura: "7876b0bfad028648259367023f14a2fb6c9b13db5e489bf6b002818fe36ec9f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc5e89a07cd3d52af14132f1323096d2b0e9519dd71b1b52e192697817547500" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1835a4d7d45333637814fbd4d0184d6ebdb81b2e7e4a09e2d803202a497cf8a" + end + + keg_only :provided_by_macos + + depends_on "pkgconf" => :build + + link_overwrite "include/crypt.h" + link_overwrite "lib/libcrypt.so" + + def install + system "./configure", "--disable-static", + "--disable-obsolete-api", + "--disable-xcrypt-compat-files", + "--disable-failure-tokens", + "--disable-valgrind", + *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #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; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcrypt", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libxcursor.rb b/Formula/lib/libxcursor.rb new file mode 100644 index 0000000000000..97f6f817aadc6 --- /dev/null +++ b/Formula/lib/libxcursor.rb @@ -0,0 +1,48 @@ +class Libxcursor < Formula + desc "X.Org: X Window System Cursor management library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXcursor-1.2.3.tar.xz" + sha256 "fde9402dd4cfe79da71e2d96bb980afc5e6ff4f8a7d74c159e1966afb2b2c2c0" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "8e5c2f6e0290a1308db48d7588e0ce6a831cb56011491470f3592e182db4f3d2" + sha256 cellar: :any, arm64_sonoma: "d030b6eaf5ac89a53962e3935e98ad22b8d269fe69941faf82ba9b93d8ccb0a7" + sha256 cellar: :any, arm64_ventura: "68a9ded5d9e51bb9d9f1f9aaf8b67402c83c8fd11f28fdc557a0aa37ed28a129" + sha256 cellar: :any, sonoma: "9a063644b479ef0269bb01a8faa79eaab44cf159ffb4cd30d399beea2d5bf459" + sha256 cellar: :any, ventura: "c3dccfd8fffba3cb2dbee1135fb1ebaa601ae8d25fcdf1add36c13052cd62d6e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2556c55f893b654072a287ea7ad7c5261beaf6cf3cd6b2c5feabc4c7b4a70d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02e5f01e4940638fbcce577f05ac3bc57f87bf272959e286a323f6fe3c2fc86d" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "libx11" + depends_on "libxfixes" + depends_on "libxrender" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xcursor/Xcursor.h" + + int main(int argc, char* argv[]) { + XcursorFileHeader header; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxcvt.rb b/Formula/lib/libxcvt.rb new file mode 100644 index 0000000000000..9fd15da2e0913 --- /dev/null +++ b/Formula/lib/libxcvt.rb @@ -0,0 +1,45 @@ +class Libxcvt < Formula + desc "VESA CVT standard timing modelines generator" + homepage "https://www.x.org/" + url "https://www.x.org/releases/individual/lib/libxcvt-0.1.3.tar.xz" + sha256 "a929998a8767de7dfa36d6da4751cdbeef34ed630714f2f4a767b351f2442e01" + license "MIT" + head "https://gitlab.freedesktop.org/xorg/lib/libxcvt.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "190b2e04bf9616a948e8fa075bd511d0f85a215f2442989ba8930c56ac175963" + sha256 cellar: :any, arm64_sonoma: "dacbc2be6db4ffdf428c83a18f7ad4c8f4d1613996cc75e8d530adc055bfce38" + sha256 cellar: :any, arm64_ventura: "30c0ae9b77b6fe734fc12d9e0dd93b34ae5f04def67627d702cd6620dc1e2a32" + sha256 cellar: :any, sonoma: "cb2920936dffded24ba49ec10ce12454ba840122f9fdfe9d43d71a1d916bca16" + sha256 cellar: :any, ventura: "8fe87353ad2535c4d00afc7b998635f11869abbcdd9ba29de9030a344fbd670f" + sha256 cellar: :any_skip_relocation, arm64_linux: "3bc17f5693292e9c4502eaa0b72910aa9372a250b121652bf22e1c15c7c752d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f789ac088fa131120166a7cc7b61feda163748127f353e9ad40473d6031dd602" + 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 + assert_match "1920", shell_output(bin/"cvt 1920 1200 75") + + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(void) { + struct libxcvt_mode_info *pmi = libxcvt_gen_mode_info(1920, 1200, 75, false, false); + assert(pmi->hdisplay == 1920); + return 0; + } + C + system ENV.cc, "./test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lxcvt" + system "./test" + end +end diff --git a/Formula/lib/libxdamage.rb b/Formula/lib/libxdamage.rb new file mode 100644 index 0000000000000..fcabd0ef63484 --- /dev/null +++ b/Formula/lib/libxdamage.rb @@ -0,0 +1,51 @@ +class Libxdamage < Formula + desc "X.Org: X Damage Extension library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXdamage-1.1.6.tar.xz" + sha256 "52733c1f5262fca35f64e7d5060c6fcd81a880ba8e1e65c9621cf0727afb5d11" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4378ada6b14fdbf06d82825d2d81465fb0be5d80684c0c46b73ec6bf8b1009e9" + sha256 cellar: :any, arm64_sonoma: "3c19b70d6cd2fd2720b9b52be6c21ba5032da5e94fd3584126a5b73c725e18ba" + sha256 cellar: :any, arm64_ventura: "f7ba5d6474c6d7be855f270e843c42d1e3b819d43e7d96c3b62789265f264a3b" + sha256 cellar: :any, arm64_monterey: "1b820498fc3f7216bcf074f0c8165875a0250390e837d9db05a62bb9ada85d5b" + sha256 cellar: :any, arm64_big_sur: "e80bbc3be1914e6a890f446dca34b789b0c0746bb0bf78426bd8d3137b771f13" + sha256 cellar: :any, sonoma: "4264c852ce781f7afdaa935f7e56994f0d1f90412c37acaa654b3c1b1f9bbafd" + sha256 cellar: :any, ventura: "0a57b493cab139a05dfd0d497b01a98525161094a456568fe35175043bd5f792" + sha256 cellar: :any, monterey: "f4a6249de91d6f556fe83f4d092233a7b45dff9fe2a3dcf7c23f43e8cb502b9a" + sha256 cellar: :any, big_sur: "682e7654ca8a9c91c37b156e173f2280fef06e51ba6604062a8fc3966ef01028" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff8793c23cc1bcc97ab649cfae7bdc9b4756d8635bc1bf1ff554d3b14e31854b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d888f5feb3f6cbaf35ca9d4f6af015555e30be8295bb378594290081e74c29f" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxfixes" + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/extensions/Xdamage.h" + + int main(int argc, char* argv[]) { + XDamageNotifyEvent event; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxdg-basedir.rb b/Formula/lib/libxdg-basedir.rb new file mode 100644 index 0000000000000..61715c8ed9634 --- /dev/null +++ b/Formula/lib/libxdg-basedir.rb @@ -0,0 +1,47 @@ +class LibxdgBasedir < Formula + desc "C implementation of the XDG Base Directory specifications" + homepage "https://github.com/devnev/libxdg-basedir" + url "https://github.com/devnev/libxdg-basedir/archive/refs/tags/libxdg-basedir-1.2.3.tar.gz" + sha256 "ff30c60161f7043df4dcc6e7cdea8e064e382aa06c73dcc3d1885c7d2c77451d" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "830d1609d4a60b66a7de159c17476bd63834bfae62aafb38a37c7c6aac24575f" + sha256 cellar: :any, arm64_sonoma: "6fb0160f5b6cd2579d154b9a97c459aef54ca27470db7d8fe9dded2e2f208a2e" + sha256 cellar: :any, arm64_ventura: "63e6eff0ad399d3054cd01b23563674d726fd502cdf0ae468e489427015e9b79" + sha256 cellar: :any, arm64_monterey: "e7aa730f8ebf8aed39fb649f132fe70611b658d3a2d5162bbc073f193c7050b9" + sha256 cellar: :any, arm64_big_sur: "45fb150350fc290277e2fe56f834065d7694aa1018bc2ffaf2b4a22f20962212" + sha256 cellar: :any, sonoma: "5610c066d92263607ec017ec5c3fb94aeae21482175b28909b5ed25353ee9760" + sha256 cellar: :any, ventura: "9c3b62fa19c3169a4641fc9c5d5a3e6700303335c49383bbe58daa23755d34ac" + sha256 cellar: :any, monterey: "24e93c008e652e67a3e37f2da0e8c937b4dbedc399f3fe1d1cb89ff1dafecc59" + sha256 cellar: :any, big_sur: "815e73cfc0be4d8091e83b4083bd583e2514a4768c553480d70be1a3e21d77c2" + sha256 cellar: :any, catalina: "dc5854179a0d219e058f13e294625d4ebd755e82ca2302ce462b33f75d8113c0" + sha256 cellar: :any, mojave: "228bec555704181d31f3f0baf6d95a5839483d4e16374eef5f91063e29f4e89b" + sha256 cellar: :any_skip_relocation, arm64_linux: "6211f3d04b552e82d3f0b8fc89494ac42fcc45fa6f7fc6fa05e63893dc929f0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d160ef91d8ec2c931defacad6ff525a7e1336f42e8196e0625bc93a266e54f72" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "./autogen.sh" + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + int main() { + xdgHandle handle; + if (!xdgInitHandle(&handle)) return 1; + xdgWipeHandle(&handle); + return 0; + } + CPP + system ENV.cc, "test.cpp", "-L#{lib}", "-lxdg-basedir", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libxdiff.rb b/Formula/lib/libxdiff.rb new file mode 100644 index 0000000000000..174e1cf8ce4a4 --- /dev/null +++ b/Formula/lib/libxdiff.rb @@ -0,0 +1,54 @@ +class Libxdiff < Formula + desc "Implements diff functions for binary and text files" + homepage "http://www.xmailserver.org/xdiff-lib.html" + url "http://www.xmailserver.org/libxdiff-0.23.tar.gz" + sha256 "e9af96174e83c02b13d452a4827bdf47cb579eafd580953a8cd2c98900309124" + license "LGPL-2.1-or-later" + + livecheck do + url :homepage + regex(/href=.*?libxdiff[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "044f8ca7045a788d7096478af46442537dd601d92b6d73c8808f6c2337d0990c" + sha256 cellar: :any, arm64_sonoma: "ed60064f8f7f516a9b4d240ed4c7b585867c9da39cdcb22560a4ece5e8660509" + sha256 cellar: :any, arm64_ventura: "2eac99be7b74fae52532e808461ec21675681d64e25ece6e99b54176a20618ab" + sha256 cellar: :any, arm64_monterey: "418d1252e31f6107429fd06539f95a4bede475d382ef351ff311fc577ef05fc0" + sha256 cellar: :any, arm64_big_sur: "f986d3e17b2ca9bf61f85fb8dffe837edbd5bee22b1c21c27f3ecfea9a83b12b" + sha256 cellar: :any, sonoma: "2eda8f1a3b63b3d382995b0fad6f3f34b43833c31ff38068a1cd1ce43b12c097" + sha256 cellar: :any, ventura: "61714ffb05a6444a400caf45d75d6013348f961853020e6b662045fecfa23283" + sha256 cellar: :any, monterey: "9864ce81b41b379e60946847ae1dc20f2a8f8296622581335842884d7bfacaaf" + sha256 cellar: :any, big_sur: "bb4777447c50173e1edd3a65eb75559a4ec8f14621f01cdc40b639b86e206162" + sha256 cellar: :any, catalina: "bb5dedb22ce363d4c6b8f46d3059dc81d68ba3627aaaff8efcdaa6c6b2c2ea37" + sha256 cellar: :any, mojave: "9d9c3f473efd5d1a2edc928e12e12552cacbc40183042945b3bbef47532145e4" + sha256 cellar: :any, high_sierra: "46a8499130fcdafc69e79436a77338398139b7ac54b3ae5f0ca9ba75b9f7efc9" + sha256 cellar: :any, sierra: "4a29b90dc48e4ce505bb50e575cc91107df8d93a90fe49ab4ec02df6118158ec" + sha256 cellar: :any, el_capitan: "55d89877bd5457b7a5b77cf68187f544ff413228ec17a701e7879644ae528f35" + sha256 cellar: :any_skip_relocation, arm64_linux: "145ff279df6f6dc46924f9a8182d89c1e568156f29f711efef540649e653d90d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7b3220efc3c97fefbe4ec212663fe86de66179d36fb974377790d72ebd5ed41" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "autoreconf", "--force", "--verbose", "--install" + system "./configure", "--mandir=#{man}", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main(void) { + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lxdiff", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libxdmcp.rb b/Formula/lib/libxdmcp.rb new file mode 100644 index 0000000000000..bda4eae6ad1fd --- /dev/null +++ b/Formula/lib/libxdmcp.rb @@ -0,0 +1,48 @@ +class Libxdmcp < Formula + desc "X.Org: X Display Manager Control Protocol library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXdmcp-1.1.5.tar.xz" + sha256 "d8a5222828c3adab70adf69a5583f1d32eb5ece04304f7f8392b6a353aa2228c" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b09a915dae5b45371a86f20a4ccce13c16c7a8eadc843b665e91bc5b2d2143ce" + sha256 cellar: :any, arm64_sonoma: "789326aa88d1b6dbe5dd565e9e70e5031bf63fac39d22cd30d11c1dfc49ffbfb" + sha256 cellar: :any, arm64_ventura: "5c459f7ceb9793912b76f6a34019aa429a6963e938e685fc2e0cf2e75a88daf4" + sha256 cellar: :any, arm64_monterey: "5aca31f04706d27335ba40875a3653336f470baa1cdacbad1dbea896ab7a4ace" + sha256 cellar: :any, sonoma: "b43d28c50f25ee0775a1bd4269e236d00e352ac060522bfc9186b35165095c56" + sha256 cellar: :any, ventura: "f553988c10f628a28ef1f4d8d3ace5d5ffcc147a3ef6958acd679943a2300668" + sha256 cellar: :any, monterey: "3d062d168fde07ebb9b7e7100ca830bdf2ea498fbb1c572f8584e314bb96054b" + sha256 cellar: :any_skip_relocation, arm64_linux: "a19ed1302e0632f8f6e8276824bb189a4384d007707bfa891d64925af4e6d4f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8b9dc2969e85e26c6d426d8865244e1416d73f7f408c9f5404a2a614a62e7d4" + end + + depends_on "pkgconf" => :build + depends_on "xorgproto" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-docs=no + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/Xdmcp.h" + + int main(int argc, char* argv[]) { + xdmOpCode code; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxext.rb b/Formula/lib/libxext.rb new file mode 100644 index 0000000000000..d123b7d6f5043 --- /dev/null +++ b/Formula/lib/libxext.rb @@ -0,0 +1,49 @@ +class Libxext < Formula + desc "X.Org: Library for common extensions to the X11 protocol" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXext-1.3.6.tar.gz" + sha256 "1a0ac5cd792a55d5d465ced8dbf403ed016c8e6d14380c0ea3646c4415496e3d" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a0434e871b6dfa64f18757e5d6df179308bcf1b53e5fa233c7d54222be8d513b" + sha256 cellar: :any, arm64_sonoma: "50a9b29c594f9b93690466d66b52f2ac36461d956016b135a85d3dfbc883e336" + sha256 cellar: :any, arm64_ventura: "fb6852f038dacbef11883d2fb8277e517d1eb237f563f62c96996f764ef40032" + sha256 cellar: :any, arm64_monterey: "d580398c8be17c909f43f110b4d8a459850f066c4ef97d7a6184c5c66242893c" + sha256 cellar: :any, sonoma: "86fd68fab7f6cdcca7212812b697efc8d2c1349ceada7c74a1eeabf0f9ec8523" + sha256 cellar: :any, ventura: "5adc7a81fe4a19ce37d33850009bd3154f6723a501c932c572d43389d2399657" + sha256 cellar: :any, monterey: "eb71965f92cd97a43eaf0e9a8a49fab31ca397be6ffcbb30f5a8edc2f8853e3c" + sha256 cellar: :any_skip_relocation, arm64_linux: "0e502f2a45fc8fa5ebce3ad027926b4060ed350f7d1f5c1c6561a5fe4d97fd8b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c62be32e864f64fc9ed3392a2f6eae085350c5b929b52306ac5e26c07b38bd3f" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "xorgproto" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-specs=no + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/extensions/shape.h" + + int main(int argc, char* argv[]) { + XShapeEvent event; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxfixes.rb b/Formula/lib/libxfixes.rb new file mode 100644 index 0000000000000..06023bbd53e91 --- /dev/null +++ b/Formula/lib/libxfixes.rb @@ -0,0 +1,50 @@ +class Libxfixes < Formula + desc "X.Org: Header files for the XFIXES extension" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXfixes-6.0.1.tar.xz" + sha256 "b695f93cd2499421ab02d22744458e650ccc88c1d4c8130d60200213abc02d58" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d8cf5f8d0134815b458eeaf44dd0e18357322bfeba750b4a79c7619ce24568a8" + sha256 cellar: :any, arm64_sonoma: "50d2927a1b3705cccad6057873681f1605786646c2dbd8af9bac2dcfbd1b49d6" + sha256 cellar: :any, arm64_ventura: "b087b60e125d6e348292f14f9d692693a0dca7894975002fa29f754c25395bbc" + sha256 cellar: :any, arm64_monterey: "515bbc38f06c142ff7cdb65b9f1401fe187241b64186b0670f4809787e288c2a" + sha256 cellar: :any, arm64_big_sur: "5f5221e3a5687ea308dd4e0200617cbba63289476df92e6addc3928597033c3b" + sha256 cellar: :any, sonoma: "883bed610e677c56484e31d6a1f79f06693927f004f94e01cc24a83b49df41be" + sha256 cellar: :any, ventura: "ade02ac4b73db0272d8bdb95bd05f8c8c11683daa944c66a10f1e72740bac364" + sha256 cellar: :any, monterey: "bae672517d9d8a3af7481ecb71dc13d835231b51917b6848d069550a725a09f9" + sha256 cellar: :any, big_sur: "5fb3942149518881721a07646cb045b3dd0478e6333617409d3cf25a8254740e" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d72cccea52617216275c3aecbe6fa1435673735507bf7e8f61f2f9ab6f454d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd98561e1f625057b34be07c81541d7759f29756d5d7272b59bd9e86af0d7d22" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/extensions/Xfixes.h" + + int main(int argc, char* argv[]) { + XFixesSelectionNotifyEvent event; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxfont.rb b/Formula/lib/libxfont.rb new file mode 100644 index 0000000000000..3fba70aad8a22 --- /dev/null +++ b/Formula/lib/libxfont.rb @@ -0,0 +1,63 @@ +class Libxfont < Formula + desc "X.Org: Core of the legacy X11 font system" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXfont-1.5.4.tar.bz2" + sha256 "1a7f7490774c87f2052d146d1e0e64518d32e6848184a18654e8d0bb57883242" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7274a6c0a84b2d5a62c3c7cbaeeb39467f6cd133c9f1e549d3d343cf6d413e97" + sha256 cellar: :any, arm64_sonoma: "fa76bdfe924cef05ae6293065ec87537cda1d850116b8d8a9b97ed33e5c7b2ca" + sha256 cellar: :any, arm64_ventura: "e85ca79059256c31175a8b3ed1b04268f6bf81a05e52df6699f53f6b4d88fdc6" + sha256 cellar: :any, arm64_monterey: "7ca1ffead34e1adfcd19864bd1edd9d54c67cebf9f96bb5901b63e850ffcfc95" + sha256 cellar: :any, arm64_big_sur: "6751afe1988e433646ee650ecc0cf508db5ac90fe9f3760114a8960e7467e13e" + sha256 cellar: :any, sonoma: "300eb427bc067d4072b00734d8168604b36b9a07c9e01af60135bc2301018883" + sha256 cellar: :any, ventura: "a4545c69641b0c902efc13cdbb96bda838b07e773aadf1537575be224203996a" + sha256 cellar: :any, monterey: "41dd4b2590dcffafe77d8816501406fcfeeb9236ec278f2ba702c28fa4d3d4de" + sha256 cellar: :any, big_sur: "816829490c6b978eaaa6b068ef42e89f1196be5d186d5c407b670f49dfa7f66b" + sha256 cellar: :any, catalina: "0321fea5b7329575b6d4b3ed762d741309c329c74df6a9ae2693667828e9a1da" + sha256 cellar: :any, mojave: "68cfb860815eedac8d96bb1853a64a12c3cc77bcc0e99ffbd693666b2bfb9119" + sha256 cellar: :any, high_sierra: "54fe9ff4143205d5d14a416f276193c4f9f5dc83898a057823462ac78c8de891" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd90ca9f06f262584a557fb3109a3090f12a6786de1ca899b08a6fd99ea7de45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2c2202c343f1c42b642eaa9e4410f3886faf1158fd7a271ad928623922a43ee" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "xtrans" => :build + depends_on "freetype" + depends_on "libfontenc" + depends_on "xorgproto" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-devel-docs=no + --with-freetype-config=#{Formula["freetype"].opt_bin}/freetype-config + --with-bzip2 + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/fonts/fntfilst.h" + #include "X11/fonts/bitmap.h" + + int main(int argc, char* argv[]) { + BitmapExtraRec rec; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxfont2.rb b/Formula/lib/libxfont2.rb new file mode 100644 index 0000000000000..4162b84cf8069 --- /dev/null +++ b/Formula/lib/libxfont2.rb @@ -0,0 +1,64 @@ +class Libxfont2 < Formula + desc "X11 font rasterisation library" + homepage "https://www.x.org/" + url "https://xorg.freedesktop.org/archive/individual/lib/libXfont2-2.0.7.tar.gz" + sha256 "90b331c2fd2d0420767c4652e007d054c97a3f03a88c55e3b986bd3acfd7e338" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "692143371069bb49c4db0055757354b42f2475b34339c0617ec4f1fa92db8e73" + sha256 cellar: :any, arm64_sonoma: "e33dc088fa4e022dd975f35be2e3f9c6d6f431e8d7b8aa17b6f7e3f2b5db1448" + sha256 cellar: :any, arm64_ventura: "2857c874fab6fa57a282960550eeeaf8e5d2cdb36533bb64e313eb458e03dac4" + sha256 cellar: :any, arm64_monterey: "663b13f5a8beaaf145a6ef76ce3fa7320f6a0d07a3e7aa4ce07a9085d6d2e5da" + sha256 cellar: :any, sonoma: "59052815ebda654383a9c9d8169bac87e8185d8b6590bb3c1323379d1aa16306" + sha256 cellar: :any, ventura: "6a5489db0d7264a996eec1726eb2a2d990d1579af46708dfafe08d66c4937b45" + sha256 cellar: :any, monterey: "73b90f18a8c56a14ffe1c4e8194102865f1719bbf362d05231203ee179e75013" + sha256 cellar: :any_skip_relocation, arm64_linux: "b5b559d35ae934e89ce10273910623dd767c8bc2ca5bfb6c5b6bf99c26ec613e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1290f56a9f831c1a2c8d8765bc300519e448bc334d6a156061cc5e05162a3c5f" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "xorgproto" => [:build, :test] + depends_on "xtrans" => :build + + depends_on "freetype" + depends_on "libfontenc" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + configure_args = %w[ + --with-bzip2 + --enable-devel-docs=no + --enable-snfformat + --enable-unix-transport + --enable-tcp-transport + --enable-ipv6 + ] + + system "./configure", *configure_args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + + int main(int argc, char* argv[]) { + xfont2_init(NULL); + return 0; + } + C + + system ENV.cc, "test.c", "-o", "test", + "-I#{include}", "-I#{Formula["xorgproto"].include}", + "-L#{lib}", "-lXfont2" + system "./test" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxft.rb b/Formula/lib/libxft.rb new file mode 100644 index 0000000000000..e814e7eedee80 --- /dev/null +++ b/Formula/lib/libxft.rb @@ -0,0 +1,47 @@ +class Libxft < Formula + desc "X.Org: X FreeType library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXft-2.3.9.tar.xz" + sha256 "60a25b78945ed6932635b3bb1899a517d31df7456e69867ffba27f89ff3976f5" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0e9f1e46fca53790299056250ce221812c0b88bebb05e1c9c642bfb695bf0879" + sha256 cellar: :any, arm64_sonoma: "48764441d540c7b8711b64cf373adeae38d7a62823be70a466c38bf39c6dab88" + sha256 cellar: :any, arm64_ventura: "8bdf668b5d06f1225412ce7c5ce6dbe78a80c82ff54a80662592429ef8ac8b08" + sha256 cellar: :any, sonoma: "266e09f717174e5fdbc01c7a35ceca534d0de45e0eee073938ad3e6b0aaaec78" + sha256 cellar: :any, ventura: "fa9940d070603876c53888c2442d49339a4c971cdd9bc4284cd861304df07e31" + sha256 cellar: :any_skip_relocation, arm64_linux: "24ab212aedfbe76096d5d48ae6a27ca7af4146b351df27b96b3136bef762af1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dadcce8067a08c22dc9ccce62bdaa8d0a3161d2036c74c14925c13d8c1b33c7b" + end + + depends_on "pkgconf" => :build + depends_on "fontconfig" + depends_on "freetype" + depends_on "libx11" + depends_on "libxrender" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xft/Xft.h" + + int main(int argc, char* argv[]) { + XftFont font; + return 0; + } + C + system ENV.cc, "-I#{Formula["freetype"].opt_include}/freetype2", "test.c" + end +end diff --git a/Formula/lib/libxi.rb b/Formula/lib/libxi.rb new file mode 100644 index 0000000000000..92a3d4a59dd5e --- /dev/null +++ b/Formula/lib/libxi.rb @@ -0,0 +1,54 @@ +class Libxi < Formula + desc "X.Org: Library for the X Input Extension" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXi-1.8.2.tar.xz" + sha256 "d0e0555e53d6e2114eabfa44226ba162d2708501a25e18d99cfb35c094c6c104" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "57806e4096680d7fdbfeceea4e2aa04c3d179846b0ba00c9db8daf0319e6f40d" + sha256 cellar: :any, arm64_sonoma: "474b22f2f4b4bf6945a3ce00400213838ba390542393cdba26c807f39694401b" + sha256 cellar: :any, arm64_ventura: "e21e8ceae47d1b3ebabdcc9be472620b3f6f1c07aa320c3b9eb42d71d6c0d0fc" + sha256 cellar: :any, arm64_monterey: "72f13ecbdacac0c3c7479459e7f89d339c43d3f26d04cd8ff7fab7ab75938376" + sha256 cellar: :any, sonoma: "912b8268b30dae048b52740eefbacda1b9767dc2db9469a2d34c395e0752c2b0" + sha256 cellar: :any, ventura: "7a214e9759c6d33f6554c7941f9fb5a08c2805e514a93053f087899df79a0eae" + sha256 cellar: :any, monterey: "e1621d00c64c524f3e511f93197e6323ae6c8f63d370730b8cc204ff1cd6c5e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2b86357aea40aebb92de04c90134a812a6f0f4ead1b0188f4f60b1d1d3846b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6839d93e4dc8d53688515849ec4ec2d830946d6d26f6cfcca6402390bc0f1867" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "libxfixes" + depends_on "xorgproto" + + conflicts_with "libslax", because: "both install `libxi.a`" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-docs=no + --enable-specs=no + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/extensions/XInput.h" + + int main(int argc, char* argv[]) { + XDeviceButtonEvent event; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxinerama.rb b/Formula/lib/libxinerama.rb new file mode 100644 index 0000000000000..c3c3fa645cd81 --- /dev/null +++ b/Formula/lib/libxinerama.rb @@ -0,0 +1,52 @@ +class Libxinerama < Formula + desc "X.Org: API for Xinerama extension to X11 Protocol" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXinerama-1.1.5.tar.xz" + sha256 "5094d1f0fcc1828cb1696d0d39d9e866ae32520c54d01f618f1a3c1e30c2085c" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "16a20793dd7f5af12c877b836d798ae0b22e8cd392a7d29b7f35ecf3d9cea19d" + sha256 cellar: :any, arm64_sonoma: "62f42418dfb296c2e21748bd9902aec2e59acde89316b6340a0fdebe01a934b8" + sha256 cellar: :any, arm64_ventura: "69863001935cc52cff4322674c03ab0e0f429ca424cf619135459571a9712677" + sha256 cellar: :any, arm64_monterey: "dc7b122a398f22ad751700145dc9d3b82f2fb60fc85a64daf3a71e0761c3e140" + sha256 cellar: :any, arm64_big_sur: "d7684cd44466dcd3c40308e3ca5dc0c5aa50ff4dbb18aaeb3e82a80bc80be785" + sha256 cellar: :any, sonoma: "9212b424e0dc84c7f23438261f0a003478d7a0a2d17bd87bc4d72b6f352fe27c" + sha256 cellar: :any, ventura: "f23db58ccad8b14e8c76a410079ca8add6bd124c9aa2cb63ba93ac532e5f35ad" + sha256 cellar: :any, monterey: "88432ad0c1e14a8511e0fb345d9bcf0e9ee67e7b634b32b31b75ce2d66ac0051" + sha256 cellar: :any, big_sur: "0f99b4d8757fdfe3b0c087b1112d49dc625c1d342f6e5c6beba44063f8c1ae33" + sha256 cellar: :any, catalina: "c11a3acfe1397ac78ff73b16f33781af781bb510773f29c4cde93a80b37ffacc" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0700b04d2961c8e119cced69fde04a873cbc61801fc94e687ccbe727432a24f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8bcf697bd80954325c6994d562554f890ab0fd6e35ae671f0886a05bcacc29b" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/extensions/Xinerama.h" + + int main(int argc, char* argv[]) { + XineramaScreenInfo info; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxkbcommon.rb b/Formula/lib/libxkbcommon.rb new file mode 100644 index 0000000000000..13fcefd45f91a --- /dev/null +++ b/Formula/lib/libxkbcommon.rb @@ -0,0 +1,59 @@ +class Libxkbcommon < Formula + desc "Keyboard handling library" + homepage "https://xkbcommon.org/" + url "https://github.com/xkbcommon/libxkbcommon/archive/refs/tags/xkbcommon-1.9.2.tar.gz" + sha256 "8d68a8b45796f34f7cace357b9f89b8c92b158557274fef5889b03648b55fe59" + license "MIT" + head "https://github.com/xkbcommon/libxkbcommon.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "f49797532088a07fba256d03de9f7f1bb56bbc571c0c04777222608c80eaabd6" + sha256 arm64_sonoma: "e355311193b1a4c1ad4b3112a4131df9abac80ecf6b4474bacc3bc23afd99c25" + sha256 arm64_ventura: "5b397f4df5f72c49b68fc5f2119d3d405f969ac02e00ad53466775c11a5e5d99" + sha256 sonoma: "63d1f21d7cb38cafc150e3b8fe2e9234d5697cf88d9b682372dc215f7ea39d0b" + sha256 ventura: "90b9243fa1274b316a47b19e8893708a677ed2759eb6f46bba3d9bfbbfc9a929" + sha256 arm64_linux: "c5c3d270eaccb9848a79b0b1f692008fa4eb51a4ac0510c6d7a636e42653db6a" + sha256 x86_64_linux: "83b375e99a63ac7a4dcb2bbc75edbba81ae1dade7aae0491d5bdcb639bbcbb11" + end + + depends_on "bison" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "libxcb" + depends_on "xkeyboard-config" + depends_on "xorg-server" + + uses_from_macos "libxml2" + + def install + args = %W[ + -Denable-wayland=false + -Denable-x11=true + -Denable-docs=false + -Dxkb-config-root=#{HOMEBREW_PREFIX}/share/X11/xkb + -Dx-locale-root=#{HOMEBREW_PREFIX}/share/X11/locale + ] + + 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() { + return (xkb_context_new(XKB_CONTEXT_NO_FLAGS) == NULL) + ? EXIT_FAILURE + : EXIT_SUCCESS; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lxkbcommon", + "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libxkbfile.rb b/Formula/lib/libxkbfile.rb new file mode 100644 index 0000000000000..08840ca43e511 --- /dev/null +++ b/Formula/lib/libxkbfile.rb @@ -0,0 +1,49 @@ +class Libxkbfile < Formula + desc "X.Org: XKB file handling routines" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libxkbfile-1.1.3.tar.xz" + sha256 "a9b63eea997abb9ee6a8b4fbb515831c841f471af845a09de443b28003874bec" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e66ffd78987318c3f579f3afb3e8356d086edcdd6dfde914e94b3fb047b65117" + sha256 cellar: :any, arm64_sonoma: "cb79bbe025a76e58fd15adee3bf20ee3efd8103a578d2e6139358c1f9cd7a8fd" + sha256 cellar: :any, arm64_ventura: "c5ad9490a09538b6a72372d8716a424ebbecf777c2a1ea5d448fcefe950a78c9" + sha256 cellar: :any, arm64_monterey: "6ef647b8fbac800454607ac21aac57a9264a4c5a2cb912afb34671f5c6a6ab0a" + sha256 cellar: :any, sonoma: "0a17cc951fb5fca888c90ba27f8f9dfb9696a00984f02772d6aca1dde438abcc" + sha256 cellar: :any, ventura: "0f9bc440b8317515984e5aefd9a1ad1f6e9c72c2882c94af5d91fb6df20f3e7c" + sha256 cellar: :any, monterey: "182270371f7c7b1c6f7ccd0e9712c947c64d80391d12ab7561c614d89d7ae307" + sha256 cellar: :any_skip_relocation, arm64_linux: "e3ec817afdb538ad032d91648d53da21c4d9033dde8c117410381577c19db407" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5298209c95e682bf215c5335aa140c4e0249f68aa2d086f058c42f5fc5446197" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + + 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 + (testpath/"test.c").write <<~C + #include + #include + #include "X11/extensions/XKBfile.h" + + int main(int argc, char* argv[]) { + XkbFileInfo info; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxls.rb b/Formula/lib/libxls.rb new file mode 100644 index 0000000000000..0e5a4b809ea7b --- /dev/null +++ b/Formula/lib/libxls.rb @@ -0,0 +1,55 @@ +class Libxls < Formula + desc "Read binary Excel files from C/C++" + homepage "https://github.com/libxls/libxls" + url "https://github.com/libxls/libxls/releases/download/v1.6.3/libxls-1.6.3.tar.gz" + sha256 "b2fb836ea0b5253a352fb5ca55742e29f06f94f9421c5b8eeccef2e5d43f622c" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "abaffb1c9027ca974c12ca4ded7a0b2be05f55cfb7b4ed371a3e14d382278073" + sha256 cellar: :any, arm64_sonoma: "d90a8a341886453222b61a6fc9015797f5b3b517620f7f4fa5ec217364bf1896" + sha256 cellar: :any, arm64_ventura: "d265631b00cebb4c0afc5dce7e1aa31c332e50022b1b3718acdb10bc68639021" + sha256 cellar: :any, sonoma: "dfbc41b4db8cb154d168ccd41d8a730400fd49b73239cb6fc1d2b1ef15b80e96" + sha256 cellar: :any, ventura: "6ba571cf05be33a069621adc5e455983a26ce132f55bbee5ed2b3b6cab98cde7" + sha256 cellar: :any_skip_relocation, arm64_linux: "773ca56b2f5b6b529843780b77ebcb600a813970eaedeb0a07cdac45fa8b8d85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af8e8be72b0f2317a9901db68e14b77595d48da2294df10ef3aafc2aeaa9df02" + end + + def install + # Add program prefix `lib` to prevent conflict with another Unix tool `xls2csv`. + # Arch and Fedora do the same. + system "./configure", "--disable-silent-rules", "--program-prefix=lib", *std_configure_args + system "make", "install" + pkgshare.install "test/files/test2.xls" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + #include + #include + + int main(int argc, char *argv[]) + { + xlsWorkBook* pWB; + xls_error_t code = LIBXLS_OK; + pWB = xls_open_file(argv[1], "UTF-8", &code); + if (pWB == NULL) { + return 1; + } + if (code != LIBXLS_OK) { + return 2; + } + if (pWB->sheets.count != 3) { + return 3; + } + return 0; + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lxlsreader", "-o", "test" + system "./test", pkgshare/"test2.xls" + end +end diff --git a/Formula/lib/libxlsxwriter.rb b/Formula/lib/libxlsxwriter.rb new file mode 100644 index 0000000000000..1d12ad56f1cb8 --- /dev/null +++ b/Formula/lib/libxlsxwriter.rb @@ -0,0 +1,45 @@ +class Libxlsxwriter < Formula + desc "C library for creating Excel XLSX files" + homepage "https://libxlsxwriter.github.io/" + url "https://github.com/jmcnamara/libxlsxwriter/archive/refs/tags/v1.2.2.tar.gz" + sha256 "8ab0aced8a6e82f12f567b48d2cb3ca7b925893126607a619666da467e9ac14f" + license "BSD-2-Clause" + head "https://github.com/jmcnamara/libxlsxwriter.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5b03fecbf3ece1bcc03a87c89a84f60fa73b7e0b119d257c477fdc11d4acf188" + sha256 cellar: :any, arm64_sonoma: "b02767c87f8db4bc8eecf747a9c8ea80db9dfadf4ad330b835f09317e038d2b9" + sha256 cellar: :any, arm64_ventura: "6382eb17ff04a5e5871c07bd400bbeb796b39a0825f617481428ecb96a0547e5" + sha256 cellar: :any, sonoma: "50f6b2f9e3133fd947fc072a10bc180878a830a9dd950091bef325ecfb7001fd" + sha256 cellar: :any, ventura: "f27ed6a59bc16de11c207ac54d51a403aaee52890ac0d00b0a8b98e65330e42f" + sha256 cellar: :any_skip_relocation, arm64_linux: "db67a2e2c9e7234d96e833866631dbeb778f6d235f852e92b452a6fc22d487bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e6acbfaa5bc5479bd3b91fb788b50117e638d4c86699876cac937d415fc2ca06" + end + + uses_from_macos "zlib" + + def install + system "make", "install", "PREFIX=#{prefix}", "V=1" + end + + test do + (testpath/"test.c").write <<~C + #include "xlsxwriter.h" + + int main() { + lxw_workbook *workbook = workbook_new("myexcel.xlsx"); + lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL); + int row = 0; + int col = 0; + + worksheet_write_string(worksheet, row, col, "Hello me!", NULL); + + return workbook_close(workbook); + } + C + + system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lxlsxwriter", "-o", "test" + system "./test" + assert_path_exists testpath/"myexcel.xlsx", "Failed to create xlsx file" + end +end diff --git a/Formula/lib/libxmi.rb b/Formula/lib/libxmi.rb new file mode 100644 index 0000000000000..da9e438c3f4b3 --- /dev/null +++ b/Formula/lib/libxmi.rb @@ -0,0 +1,102 @@ +class Libxmi < Formula + desc "C/C++ function library for rasterizing 2D vector graphics" + homepage "https://www.gnu.org/software/libxmi/" + url "https://ftp.gnu.org/gnu/libxmi/libxmi-1.2.tar.gz" + mirror "https://ftpmirror.gnu.org/libxmi/libxmi-1.2.tar.gz" + sha256 "9d56af6d6c41468ca658eb6c4ba33ff7967a388b606dc503cd68d024e08ca40d" + license "GPL-2.0-only" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "02dd0c4d25870675c7609b021e7030213aeb55b2799eb0c4d981842637ec29f3" + sha256 cellar: :any, arm64_sonoma: "c3b129b35e3e50b1bdba2987150164d3e553d31118119c94691d17b6e0297e5f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "932b2ebc8aa7c03aa6f8f372f5ec3e2def0dc6d5f628dfbfcd7952c52b4c8384" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6d4415d53e7ab98998a088de1148339142edd47d8abf8058d9014b077907ef07" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0f62b288c26ca17a79f7c066f82a0a26b84e768960095eefdcf6c0c3b420d4a1" + sha256 cellar: :any, sonoma: "0326bd04964e9707c76d9f532e50e4871d78f519b721f7cc8f502ec7f64e3f6f" + sha256 cellar: :any_skip_relocation, ventura: "bad9ab9655d2e75c8d999725163da71b9061f05f8c9bf5ff89b5e81c1b0fdb11" + sha256 cellar: :any_skip_relocation, monterey: "fafba3428a0f8d222ed035043883dc2230be492abc71fd8eb140b2b3e1884922" + sha256 cellar: :any_skip_relocation, big_sur: "f5e9c2fce42f171773589cb0b1bfbf88cadf5036d86a6f502d5f415b8ad20f62" + sha256 cellar: :any_skip_relocation, catalina: "eabebd41538c5b53f5ac3d25e71636b8d3561150f4622769107c58a10283e525" + sha256 cellar: :any_skip_relocation, mojave: "ee621ddddf3165736ebe0eb44ee0ea4eac0080ca328404311de57acc99402694" + sha256 cellar: :any_skip_relocation, high_sierra: "b4fae54573368c35c388850617545ab6f3fdd59bdcc8dde766e863b605278a40" + sha256 cellar: :any_skip_relocation, sierra: "d14120dd7ec249b6375da84c5dbf49631d8e8aaf7c0ee9e6c8e9c42f341cc91f" + sha256 cellar: :any_skip_relocation, el_capitan: "d7be88ce4d945b11adc82fe6bac6aca8a837e0206cd781e4cab82c8c1b684e20" + sha256 cellar: :any_skip_relocation, arm64_linux: "ede22f9abf05a18ec44e5009276815c87ce99bbd7c3a2699d58b8ab31ea8d4b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a82bdaa8f3c6d1d63dc572bf315c10418d39a0f1e12407dc187f793d8e6e9609" + end + + on_system :linux, macos: :ventura_or_newer do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if OS.linux? || (OS.mac? && MacOS.version >= :ventura) + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", "--infodir=#{info}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + #include + int main () { + miPoint points[4] = {{.x = 25, .y = 0}, {.x = 0, .y = 0}, {.x = 0, .y = 25}, {.x = 35, .y = 22}}; + miArc arc = {.x = 20, .y = 15, .width = 30, .height = 16, .angle1 = 0 * 64, .angle2 = 270 * 64}; + miPixel pixels[4] = {1, 2, 3, 4}; + unsigned int dashes[2] = {4, 2}; + miGC *pGC; + miPaintedSet *paintedSet; + miCanvas *canvas; + miPoint offset = {.x = 0, .y = 0}; + int i, j; + pGC = miNewGC (4, pixels); + miSetGCAttrib (pGC, MI_GC_LINE_STYLE, MI_LINE_ON_OFF_DASH); + miSetGCDashes (pGC, 2, dashes, 0); + miSetGCAttrib (pGC, MI_GC_LINE_WIDTH, 0); + paintedSet = miNewPaintedSet (); + miDrawLines (paintedSet, pGC, MI_COORD_MODE_ORIGIN, 4, points); + miDrawArcs (paintedSet, pGC, 1, &arc); + canvas = miNewCanvas (51, 32, 0); + miCopyPaintedSetToCanvas (paintedSet, canvas, offset); + for (j = 0; j < canvas->drawable->height; j++) { + for (i = 0; i < canvas->drawable->width; i++) { + printf ("%d", canvas->drawable->pixmap[j][i]); + } + printf ("\\n"); + } + miDeleteCanvas (canvas); + miDeleteGC (pGC); + miClearPaintedSet (paintedSet); + miDeletePaintedSet (paintedSet); + return 0; + } + C + + expected = <<~EOS + 330022220044440033330022220000000000000000000000000\n300000000000000000000000000000000000000000000000000 + 300000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000\n400000000000000000000000000000000000000000000000000 + 400000000000000000000000000000000000000000000000000\n400000000000000000000000000000000000000000000000000 + 400000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000\n200000000000000000000000000000000000000000000000000 + 200000000000000000000000000000000000000000000000000\n200000000000000000000000000000000000000000000000000 + 200000000000000000000000000000000000000000000000000\n000000000000000000000000000000022220044440000000000 + 000000000000000000000000000330000000000000030000000\n300000000000000000000000033000000000000000003300000 + 300000000000000000000000000000000000000000000030000\n300000000000000000000040000000000000000000000000000 + 300000000000000000000400000000000000000000000000020\n000000000000000000004000000000000000000000000000002 + 000000000000000000004000000000330044000000000000002\n400000000000000000440022220033000000000000000000002 + 400000220033330044000000000000000000000000000000000\n440022000000000000002000000000000000000000000000000 + 000000000000000000000200000000000000000000000000000\n000000000000000000000020000000000000000000000000000 + 000000000000000000000002000000000000000000000000000\n000000000000000000000000003000000000000000000000000 + 000000000000000000000000000333000000000000000000000\n000000000000000000000000000000004444000000000000000 + EOS + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lxmi", "-o", "test" + assert_equal expected, shell_output("./test") + end +end diff --git a/Formula/lib/libxml++.rb b/Formula/lib/libxml++.rb new file mode 100644 index 0000000000000..4c39fec34f8fd --- /dev/null +++ b/Formula/lib/libxml++.rb @@ -0,0 +1,54 @@ +class Libxmlxx < Formula + desc "C++ wrapper for libxml" + homepage "https://libxmlplusplus.sourceforge.net/" + url "https://download.gnome.org/sources/libxml++/2.42/libxml++-2.42.3.tar.xz" + sha256 "74b95302e24dbebc56e97048e86ad0a4121fc82a43e58d381fbe1d380e8eba04" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/libxml\+\+[._-]v?(2\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "ea4bb7ccf2905b3c6d0bcb737a0df4c68c6f1d74aa0a40a7e85358fb8babecfa" + sha256 cellar: :any, arm64_sonoma: "8ed9c8aeafaa5c37a6c883ebc7d91c1a419bb2181bb98e6e6930061967362069" + sha256 cellar: :any, arm64_ventura: "7ee27c6995a0afb593127e45a431c1a2ac2a2e9c45897c3ce9a960e7f574e41b" + sha256 cellar: :any, sonoma: "eb848276ab7187fe00cdb41076afa5ebd82b81b3acf6bfb70b6b0553f68c9868" + sha256 cellar: :any, ventura: "fa93706f20eea80fcecd503fe8760b6613b9b46997ad49be56f75c046036aeb7" + sha256 arm64_linux: "4c97756368be0322715581ae867af7e4a6684a55d3fbf3c07759873422a28b43" + sha256 x86_64_linux: "aa6277a0000377577cd64566aea608746cf3b6e748e3aea17964bf6d36276e95" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "glibmm@2.66" + + uses_from_macos "libxml2" + + 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[]) + { + xmlpp::Document document; + document.set_internal_subset("homebrew", "", "https://www.brew.sh/xml/test.dtd"); + xmlpp::Element *rootnode = document.create_root_node("homebrew"); + return 0; + } + CPP + + flags = shell_output("pkgconf --cflags --libs libxml++-2.6").chomp.split + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libxml++@3.rb b/Formula/lib/libxml++@3.rb new file mode 100644 index 0000000000000..be5eabe34a638 --- /dev/null +++ b/Formula/lib/libxml++@3.rb @@ -0,0 +1,54 @@ +class LibxmlxxAT3 < Formula + desc "C++ wrapper for libxml" + homepage "https://libxmlplusplus.github.io/libxmlplusplus/" + url "https://download.gnome.org/sources/libxml++/3.2/libxml++-3.2.5.tar.xz" + sha256 "0c9b381b5a83d6b3ab4b0b865d7256dab27d575981b63be2f859edcb94da59c7" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/libxml\+\+[._-]v?(3\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "a44be374982b3a3b7adb3c13f31c97feb882b6268b85fb337b3a30980f0a9531" + sha256 cellar: :any, arm64_sonoma: "6cb350dd2f4c0d81c9ca84395a31d0ca9d89e8331b175cef126678c758dcb9ca" + sha256 cellar: :any, arm64_ventura: "93b3ed88b404c4d7897789a37fa78a5798b395916a4753a1ab4b5df53ae83439" + sha256 cellar: :any, sonoma: "04fe9da87109a92954ffa01cd5d7cb02356d6e1d6a7526240af5bf92c0836920" + sha256 cellar: :any, ventura: "1ce4596e40a056ceffebf9d53e9d1af0c1dd1b392590a5c528412eeb8093ea12" + sha256 arm64_linux: "4c076e487be6a8ab63d8bc581a94769a5f720265c2991fd56182b034c70d8c09" + sha256 x86_64_linux: "982a460245b85912af6064eec18e6fc0a1bd9cc42f96a949df9d309640a5088c" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "glibmm@2.66" + + uses_from_macos "libxml2" + + 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[]) + { + xmlpp::Document document; + document.set_internal_subset("homebrew", "", "https://www.brew.sh/xml/test.dtd"); + xmlpp::Element *rootnode = document.create_root_node("homebrew"); + return 0; + } + CPP + command = "#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs libxml++-3.0" + flags = shell_output(command).strip.split + system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libxml++@4.rb b/Formula/lib/libxml++@4.rb new file mode 100644 index 0000000000000..ff644e4911d45 --- /dev/null +++ b/Formula/lib/libxml++@4.rb @@ -0,0 +1,55 @@ +class LibxmlxxAT4 < Formula + desc "C++ wrapper for libxml" + homepage "https://libxmlplusplus.github.io/libxmlplusplus/" + url "https://download.gnome.org/sources/libxml++/4.2/libxml++-4.2.0.tar.xz" + sha256 "898accd9c6fa369da36bfebb5fee199d971b86d26187418796ba9238a6bd4842" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/libxml\+\+[._-]v?(4\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "313eb1af5b040a240c54769a0ea30007bb2ade22d25b0858a457922a37fa53f1" + sha256 cellar: :any, arm64_sonoma: "987e41fbe309acddde459a94d9ad151f8644cefee95be180366f3b774b3d6ff6" + sha256 cellar: :any, arm64_ventura: "35b445c5b312aa2a990ad57372c57f3c00d3b79d6247ac6007d5b00397467a9d" + sha256 cellar: :any, arm64_monterey: "4d431e0cb82051dcf01c8e05d75c067ab5716852a61fc10f7d65655628c5c010" + sha256 cellar: :any, sonoma: "3784bffd82c84684b1c75fa7ea33adff114727fffebe2ccef5fcdb590c92c937" + sha256 cellar: :any, ventura: "bc1972685d7e69a840ebdb2c53b0596055ec1f5371c94508d02f04d9c70b5124" + sha256 cellar: :any, monterey: "1d4f0949c6e5caafd5e0d4476241bf827244bca988698aa9d78a8d03ad3e12c9" + sha256 arm64_linux: "b46a5d38b50a62cb3e2120ef3eed2794a0ea47394255ab88439a44fe4cfe92e3" + sha256 x86_64_linux: "02e771bea9bfa9710d1425f7bce4e387eafb8056c8fd526935f5a661ccc74281" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "glibmm" + + uses_from_macos "libxml2" + + 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[]) + { + xmlpp::Document document; + document.set_internal_subset("homebrew", "", "https://www.brew.sh/xml/test.dtd"); + xmlpp::Element *rootnode = document.create_root_node("homebrew"); + return 0; + } + CPP + command = "#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs libxml++-4.0" + flags = shell_output(command).strip.split + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libxml++@5.rb b/Formula/lib/libxml++@5.rb new file mode 100644 index 0000000000000..d3415bfedcc61 --- /dev/null +++ b/Formula/lib/libxml++@5.rb @@ -0,0 +1,54 @@ +class LibxmlxxAT5 < Formula + desc "C++ wrapper for libxml" + homepage "https://libxmlplusplus.github.io/libxmlplusplus/" + url "https://download.gnome.org/sources/libxml++/5.4/libxml++-5.4.0.tar.xz" + sha256 "e9a23c436686a94698d2138e6bcbaf849121d63bfa0f50dc34fefbfd79566848" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + regex(/libxml\+\+[._-]v?(5\.([0-8]\d*?)?[02468](?:\.\d+)*?)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8b1741fec20807f621a0565fad5b10fff46bdb5e092f7545ccbe7c776d394b5b" + sha256 cellar: :any, arm64_sonoma: "5437f74e7361d06081dc6da97cd8f7726a0ae705e8157e1a0fc631214904eb37" + sha256 cellar: :any, arm64_ventura: "4e43cbec05cadeb4a37ac6c820e23e83ab127c5b06660fb2942c3bb9f1bf2927" + sha256 cellar: :any, arm64_monterey: "ea823fac5dc9c1bb716221a7ebe7567e612ac76bb3b6d2a8c146d69f96b0492e" + sha256 cellar: :any, sonoma: "d55199dafe752477e6db5375a0635b9ca76ae444288f6ef3d1de9c5ce6e58ddd" + sha256 cellar: :any, ventura: "fc8d4eb8e4bd8d3eb20b7942557202b9628c5933058bb83c5621f93f4c0b047a" + sha256 cellar: :any, monterey: "b38022f1cbc5d07e4c5969b98849c218823863f8ec97faf3680cb77545c4c343" + sha256 arm64_linux: "04bd576bd7befe5da3d2cc17ce5ab1f2232356228e033162aff468209222d9ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e0691b094a3ab56f2add27e4cf43a8d7f6d79a13a61d9fe97d243e2956c6fff" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + + uses_from_macos "libxml2" + + 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[]) + { + xmlpp::Document document; + document.set_internal_subset("homebrew", "", "https://www.brew.sh/xml/test.dtd"); + xmlpp::Element *rootnode = document.create_root_node("homebrew"); + return 0; + } + CPP + command = "#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs libxml++-5.0" + flags = shell_output(command).strip.split + system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libxml2.rb b/Formula/lib/libxml2.rb new file mode 100644 index 0000000000000..d3f36cb7f9afc --- /dev/null +++ b/Formula/lib/libxml2.rb @@ -0,0 +1,182 @@ +class Libxml2 < Formula + desc "GNOME XML library" + homepage "http://xmlsoft.org/" + license "MIT" + + stable do + url "https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.7.tar.xz" + sha256 "14796d24402108e99d8de4e974d539bed62e23af8c4233317274ce073ceff93b" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + # Fix pkg-config checks for libicuuc. Patch taken from: + # https://gitlab.gnome.org/GNOME/libxml2/-/commit/b57e022d75425ef8b617a1c3153198ee0a941da8 + # When the patch is no longer needed, remove along with the `stable` block + # and the autotools dependencies above. Also uncomment `if build.head?` + # condition in the `install` block. + patch :DATA + end + + # We use a common regex because libxml2 doesn't use GNOME's "even-numbered + # minor is stable" version scheme. + livecheck do + url :stable + regex(/libxml2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "488e3664e1bf5af46742a9815878bcee9c24d2b87d7fb8cf09d23f73bcbde397" + sha256 cellar: :any, arm64_sonoma: "a9f5aea2d5c3c19a9e5acadd4087b886ddee661064cb05e7d0587c4091babdcd" + sha256 cellar: :any, arm64_ventura: "52421394f133c3d4cfa7d10c21620e0d54129e2375acee19166ae844a6e41913" + sha256 cellar: :any, sonoma: "0ab73fb6f31842de8d1efedf5aceb1879700cf01299bc60261fc926dabf71d92" + sha256 cellar: :any, ventura: "c80d5ff97e7101b94a068ad9730c0946a428a5782973493d845279795c6c8ea4" + sha256 cellar: :any_skip_relocation, arm64_linux: "57335af766ff3d9b2eeaf33b31305301662b2f1fe23e95aeb6d51fe3c6c62ac1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7382946d0327ddf4f76756475423920797d6c5fd5c57a42d6e7dc6da38abe576" + end + + head do + url "https://gitlab.gnome.org/GNOME/libxml2.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 "python-setuptools" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + depends_on "icu4c@77" + depends_on "readline" + + uses_from_macos "zlib" + + def icu4c + deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula + 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 + # Work around build failure due to icu4c 75+ adding -std=c11 to installed + # files when built without manually setting "-std=" in CFLAGS. This causes + # issues on Linux for `libxml2` as `addrinfo` needs GNU extensions. + # nanohttp.c:1019:42: error: invalid use of undefined type 'struct addrinfo' + ENV.append "CFLAGS", "-std=gnu11" if OS.linux? + + system "autoreconf", "--force", "--install", "--verbose" # if build.head? + system "./configure", "--disable-silent-rules", + "--sysconfdir=#{etc}", + "--with-history", + "--with-http", + "--with-icu", + "--with-legacy", # https://gitlab.gnome.org/GNOME/libxml2/-/issues/751#note_2157870 + "--without-lzma", + "--without-python", + *std_configure_args + system "make", "install" + + inreplace [bin/"xml2-config", lib/"pkgconfig/libxml-2.0.pc"] do |s| + s.gsub! prefix, opt_prefix + s.gsub! icu4c.prefix.realpath, icu4c.opt_prefix, audit_result: false + end + + # `icu4c` is keg-only, so we need to tell `pkg-config` where to find its + # modules. + if OS.mac? + icu_uc_pc = icu4c.opt_lib/"pkgconfig/icu-uc.pc" + inreplace lib/"pkgconfig/libxml-2.0.pc", + /^Requires\.private:(.*)\bicu-uc\b(.*)$/, + "Requires.private:\\1#{icu_uc_pc}\\2" + end + + sdk_include = if OS.mac? + sdk = MacOS.sdk_path_if_needed + sdk/"usr/include" if sdk + else + HOMEBREW_PREFIX/"include" + end + + includes = [include, sdk_include].compact.map do |inc| + "'#{inc}'," + end.join(" ") + + # We need to insert our include dir first + inreplace "python/setup.py", "includes_dir = [", + "includes_dir = [#{includes}" + + # Needed for Python 3.12+. + # https://github.com/Homebrew/homebrew-core/pull/154551#issuecomment-1820102786 + with_env(PYTHONPATH: buildpath/"python") do + pythons.each do |python| + system python, "-m", "pip", "install", *std_pip_args, "./python" + end + end + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0"); + xmlNodePtr root_node = xmlNewNode(NULL, BAD_CAST "root"); + xmlDocSetRootElement(doc, root_node); + xmlFreeDoc(doc); + return 0; + } + C + + # Test build with xml2-config + args = shell_output("#{bin}/xml2-config --cflags --libs").split + system ENV.cc, "test.c", "-o", "test", *args + system "./test" + + # Test build with pkg-config + ENV.append "PKG_CONFIG_PATH", lib/"pkgconfig" + args = shell_output("#{Formula["pkgconf"].opt_bin}/pkgconf --cflags --libs libxml-2.0").split + system ENV.cc, "test.c", "-o", "test", *args + system "./test" + + pythons.each do |python| + with_env(PYTHONPATH: prefix/Language::Python.site_packages(python)) do + system python, "-c", "import libxml2" + end + end + + # Make sure cellar paths are not baked into these files. + [bin/"xml2-config", lib/"pkgconfig/libxml-2.0.pc"].each do |file| + refute_match HOMEBREW_CELLAR.to_s, file.read + end + end +end + +__END__ +diff --git a/configure.ac b/configure.ac +index c6dc93d58f84f21c4528753d2ee1bc1d50e67ced..e7bad24d8f1aa7659e1aa4e2ad1986cc2167483b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -984,10 +984,10 @@ if test "$with_icu" != "no" && test "$with_icu" != "" ; then + + # Try pkg-config first so that static linking works. + # If this succeeeds, we ignore the WITH_ICU directory. +- PKG_CHECK_MODULES([ICU], [icu-i18n], [ +- WITH_ICU=1; XML_PC_REQUIRES="${XML_PC_REQUIRES} icu-i18n" ++ PKG_CHECK_MODULES([ICU], [icu-uc], [ ++ WITH_ICU=1; XML_PC_REQUIRES="${XML_PC_REQUIRES} icu-uc" + m4_ifdef([PKG_CHECK_VAR], +- [PKG_CHECK_VAR([ICU_DEFS], [icu-i18n], [DEFS])]) ++ [PKG_CHECK_VAR([ICU_DEFS], [icu-uc], [DEFS])]) + if test "x$ICU_DEFS" != "x"; then + ICU_CFLAGS="$ICU_CFLAGS $ICU_DEFS" + fi],[:]) diff --git a/Formula/lib/libxmlb.rb b/Formula/lib/libxmlb.rb new file mode 100644 index 0000000000000..b5e36ab342943 --- /dev/null +++ b/Formula/lib/libxmlb.rb @@ -0,0 +1,56 @@ +class Libxmlb < Formula + include Language::Python::Shebang + + desc "Library for querying compressed XML metadata" + homepage "https://github.com/hughsie/libxmlb" + url "https://github.com/hughsie/libxmlb/releases/download/0.3.22/libxmlb-0.3.22.tar.xz" + sha256 "f3c46e85588145a1a86731c77824ec343444265a457647189a43b71941b20fa0" + license "LGPL-2.1-or-later" + head "https://github.com/hughsie/libxmlb.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e0775233be69a811c661f8720b66a4711013ef27e6e36bdd8dff476c9b4c56e7" + sha256 cellar: :any, arm64_sonoma: "d3cbbf01b534d2d3c3ed6ec52be13dd2f2e1ba4ef0520f4c27d78cbadb1b3d83" + sha256 cellar: :any, arm64_ventura: "01a9cef7ad93b5395cc7101a67891d0bd51795408c989b3e84656dc417523930" + sha256 cellar: :any, sonoma: "547b825d6d1e54d370c029e9e7b01426ae3837236a860aa73f8720f716c2d312" + sha256 cellar: :any, ventura: "5a41d81df13b1f3e95b9c5b0be39638601585891df073c1bf81e76dbe671a8ca" + sha256 arm64_linux: "a65b335e5ae108e31a1b65bdf4ef969785f948e46bb1a5c54da501c6608d3574" + sha256 x86_64_linux: "b3442cfda49f9ed9d25055f6839fd50fd5c7eb1a8785d20ea70266894548cb05" + end + + depends_on "gi-docgen" => :build + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.13" => :build + depends_on "vala" => :build + depends_on "glib" + depends_on "xz" + depends_on "zstd" + + def install + rewrite_shebang detected_python_shebang(use_python_from_path: true), "src/generate-version-script.py" + + system "meson", "setup", "build", "-Dgtkdoc=false", *std_meson_args + system "meson", "compile", "-C", "build", "--verbose" + system "meson", "install", "-C", "build" + end + + test do + system bin/"xb-tool", "-h" + + (testpath/"test.c").write <<~C + #include + int main(int argc, char *argv[]) { + XbBuilder *builder = xb_builder_new(); + g_assert_nonnull(builder); + return 0; + } + C + + flags = shell_output("pkgconf --cflags --libs xmlb").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags + system "./test" + end +end diff --git a/Formula/lib/libxmlsec1.rb b/Formula/lib/libxmlsec1.rb new file mode 100644 index 0000000000000..a401fb9d89f59 --- /dev/null +++ b/Formula/lib/libxmlsec1.rb @@ -0,0 +1,66 @@ +class Libxmlsec1 < Formula + desc "XML security library" + homepage "https://www.aleksey.com/xmlsec/" + url "https://www.aleksey.com/xmlsec/download/xmlsec1-1.3.7.tar.gz" + sha256 "d82e93b69b8aa205a616b62917a269322bf63a3eaafb3775014e61752b2013ea" + license "MIT" + + livecheck do + url "https://www.aleksey.com/xmlsec/download/" + regex(/href=.*?xmlsec1[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "dd0bd557a369d063dd16612dde3a3a673aea225376db8ee674cdb97867bff28c" + sha256 cellar: :any, arm64_sonoma: "e1b1f314c2c9d2aa76755bfa33a8f4018455cb697110e8718d5044e3452b0183" + sha256 cellar: :any, arm64_ventura: "d4b92a70262c9ba01a7ec1956bee5c677de07ccae16b86f1f9e4d5cadb94b0f2" + sha256 cellar: :any, sonoma: "ab66efc3b6fb18b9f00d8fbacebba05c6299a0af4ffd6bbfd0bc2c1ac0617b19" + sha256 cellar: :any, ventura: "8a5ac37287e46fb1b50a11b99a802b095feb1664bf86e92fae1757a809f985ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "251a6cf05aa3f3dcf207029f3ce9b17a93f02d201701dba8c9724696f4e5eb73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "091ee1ac09d65ac2cfab2f1695366534a65e6c8f304782136de299001b6291a5" + end + + depends_on "pkgconf" => :build + depends_on "gnutls" # Yes, it wants both ssl/tls variations + depends_on "libgcrypt" + depends_on "libxml2" + depends_on "openssl@3" + uses_from_macos "libxslt" + + # Add HOMEBREW_PREFIX/lib to dl load path + patch :DATA + + def install + args = [ + "--disable-crypto-dl", + "--disable-apps-crypto-dl", + "--with-nss=no", + "--with-nspr=no", + "--enable-mscrypto=no", + "--enable-mscng=no", + "--with-openssl=#{Formula["openssl@3"].opt_prefix}", + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + end + + test do + system bin/"xmlsec1", "--version" + system bin/"xmlsec1-config", "--version" + end +end + +__END__ +diff --git a/src/dl.c b/src/dl.c +index 6e8a56a..0e7f06b 100644 +--- a/src/dl.c ++++ b/src/dl.c +@@ -141,6 +141,7 @@ xmlSecCryptoDLLibraryCreate(const xmlChar* name) { + } + + #ifdef XMLSEC_DL_LIBLTDL ++ lt_dlsetsearchpath("HOMEBREW_PREFIX/lib"); + lib->handle = lt_dlopenext((char*)lib->filename); + if(lib->handle == NULL) { + xmlSecError(XMLSEC_ERRORS_HERE, diff --git a/Formula/lib/libxmp-lite.rb b/Formula/lib/libxmp-lite.rb new file mode 100644 index 0000000000000..21d85c6c4d21d --- /dev/null +++ b/Formula/lib/libxmp-lite.rb @@ -0,0 +1,37 @@ +class LibxmpLite < Formula + desc "Lite libxmp" + homepage "https://xmp.sourceforge.net/" + url "https://downloads.sourceforge.net/project/xmp/libxmp/4.6.3/libxmp-lite-4.6.3.tar.gz" + sha256 "fa6465d8b911363ae602c7baaa625ca1f5223142d10bb4682029c4d2f630cb62" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "33f736a998df705e0a4c9cdecbbea17c46ddab5803f97e7834d121079e97b03e" + sha256 cellar: :any, arm64_sonoma: "ec6e0e00af014526d3f1f96741fb564e724354169f8c9798725c45f174793f50" + sha256 cellar: :any, arm64_ventura: "7d29fddef4290da3d16092ae368fe48e493fd7cab53734986ee72508e404607f" + sha256 cellar: :any, sonoma: "04ed96a9057040484ce1972869065a2fb281b17a34f987ba0518b49032f8d8af" + sha256 cellar: :any, ventura: "fb44f2c897a35488b9a0029a4f5df90e2f2943b3f9f3166a4ec4afaf1b079d6e" + sha256 cellar: :any_skip_relocation, arm64_linux: "122f92680e34ed0d76488a405c5e97e1b18280224b2870d1563f1fe6878e3297" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b188d2359801030bbd31a68715f74fd271898ea4dd537c3c12def7bdba7b0a5" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + #include + + int main(int argc, char* argv[]){ + printf("libxmp-lite %s/%c%u\\n", XMP_VERSION, *xmp_version, xmp_vercode); + return 0; + } + C + + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lxmp-lite", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libxmp.rb b/Formula/lib/libxmp.rb new file mode 100644 index 0000000000000..97693952ffaf8 --- /dev/null +++ b/Formula/lib/libxmp.rb @@ -0,0 +1,66 @@ +class Libxmp < Formula + desc "C library for playback of module music (MOD, S3M, IT, etc)" + homepage "https://xmp.sourceforge.net/" + url "https://downloads.sourceforge.net/project/xmp/libxmp/4.6.3/libxmp-4.6.3.tar.gz" + sha256 "b189a2ff3f3eef0008512e0fb27c2cdc27480bc1066b82590a84d02548fab96d" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "746c3d92562469f5200fe2bb32f18f43c7bac6416e4e6cfa4ceb825d10ee13c8" + sha256 cellar: :any, arm64_sonoma: "7bad2e453d99d72bf38ab45f8c843c3ca96f9e845a24493d889000afe5a1cbd9" + sha256 cellar: :any, arm64_ventura: "d69cfd7a46845980beb6169e957088d81259cbfc22149f86d0d81e47b8ea261c" + sha256 cellar: :any, sonoma: "c632e6c890ccb5aa8fd15b67323a25b197465771515088844cb6d3a9f739eae6" + sha256 cellar: :any, ventura: "dc9a1c17688c400188dbb91726bb2b8d4749ff477d494df1b1c8d6c4d8f010b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "a6533f946457471d6fc7fe7fe7481085be039c7ac7bf4f0813939b21d9f74e34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a650c8549008d6e0b13fc813e9988372a943b0a2a8859b303d755da69e5deea" + end + + head do + url "https://git.code.sf.net/p/xmp/libxmp.git", branch: "master" + depends_on "autoconf" => :build + end + + # 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 "autoconf" if build.head? + system "./configure", *std_configure_args + system "make", "install" + + pkgshare.install resource("demo_mods") + end + + test do + test_mod = "#{pkgshare}/give-me-an-om.mod" + + (testpath/"libxmp_test.c").write <<~C + #include + #include "xmp.h" + + int main(int argc, char** argv) + { + char* mod = argv[1]; + xmp_context context; + struct xmp_module_info mi; + + context = xmp_create_context(); + if (xmp_load_module(context, mod) != 0) { + puts("libxmp failed to open module!"); + return 1; + } + + xmp_get_module_info(context, &mi); + puts(mi.mod->name); + return 0; + } + C + + system ENV.cc, "libxmp_test.c", "-L#{lib}", "-lxmp", "-o", "libxmp_test" + assert_equal "give me an om", shell_output("#{testpath}/libxmp_test #{test_mod}").chomp + end +end diff --git a/Formula/lib/libxmu.rb b/Formula/lib/libxmu.rb new file mode 100644 index 0000000000000..ffa1f31fbb96d --- /dev/null +++ b/Formula/lib/libxmu.rb @@ -0,0 +1,51 @@ +class Libxmu < Formula + desc "X.Org: X miscellaneous utility routines library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXmu-1.2.1.tar.xz" + sha256 "fcb27793248a39e5fcc5b9c4aec40cc0734b3ca76aac3d7d1c264e7f7e14e8b2" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b44c421e544a4a88eacaec0155108a9ce86a7d6aebf39e735d7d8656b2c7d768" + sha256 cellar: :any, arm64_sonoma: "cf78ddb72afdc7e39ad0aa9421ef8c6ef215a588311fff8d7924fb7dfe33d644" + sha256 cellar: :any, arm64_ventura: "06a9985ef9c93b62954e604491eda08c17ff0121c4db57e816ecdd0a89fc0b9a" + sha256 cellar: :any, arm64_monterey: "e95b65aa281742d32783fe3e81a791f83740724c6a67b47196ef8c0c3ead9bc9" + sha256 cellar: :any, sonoma: "da9a3c49863a7674bd512cebf16c226be2b23fb576d7d40bee6912df3af5ebcf" + sha256 cellar: :any, ventura: "759a61777107ae7f9893f1a3f443be2f5605335cb63f64885b16ade1c1b9a22e" + sha256 cellar: :any, monterey: "1cf9194a1441427380e06054903045d3f247a93dc00943b7126db6badd715e93" + sha256 cellar: :any_skip_relocation, arm64_linux: "002c127dd8dc9650c27a53829ad56073d729ea1487c6f0f1ac1e92b095010be7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1da14c69af817c5faa1fc53dcf66a32a9319c75769562941f7e0ac20dbe2347b" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "libxt" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-docs=no + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/Xmu/Xmu.h" + + int main(int argc, char* argv[]) { + XmuArea area; + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lXmu" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxo.rb b/Formula/lib/libxo.rb new file mode 100644 index 0000000000000..ea2eddd778faa --- /dev/null +++ b/Formula/lib/libxo.rb @@ -0,0 +1,41 @@ +class Libxo < Formula + desc "Allows an application to generate text, XML, JSON, and HTML output" + homepage "https://juniper.github.io/libxo/libxo-manual.html" + url "https://github.com/Juniper/libxo/releases/download/1.7.5/libxo-1.7.5.tar.gz" + sha256 "d12249ffad3ef04b160e6419adf1bbe7e593a60bb23f0a0a077fa780b214934a" + license "BSD-2-Clause" + + bottle do + sha256 arm64_sequoia: "1dd19ecfae3f49f288fda04ded88e72b735284a1bb904e9df2e6c5ae64f26d50" + sha256 arm64_sonoma: "4c55e5145b840b968e7a3b02b7806034c7a7a463d0761ad405594518a3ba52ef" + sha256 arm64_ventura: "d032a1e05fa91f2d0ffc90c86361f9fcf3239ae11dc053583ef9d1d964d86c55" + sha256 arm64_monterey: "7efad6f78bca7183e0ed73dbaa895d6e545e60b58e3b2e1cb9e18593a835c2c4" + sha256 sonoma: "9176bd1a62a3c7e3781cdfd1c2fd2f8958b468d08f6086a4229741e4f32e4229" + sha256 ventura: "0f9aa2f3a1257b686116e9a936662759fb7f5b61134fb810f1d30085951e6f54" + sha256 monterey: "c9beeccc9174bba7cdf02f3455e1984b2c4c37d67b8330e8a9a18101b7239f06" + sha256 arm64_linux: "17647ad9619b33d7dd984b9c04312e5d717a6bd078608be42b17882ed6ad4237" + sha256 x86_64_linux: "5fa4473b566e7039ec3b98394c7ce6c863cbe3f4eeacc000012976a4cde4ea83" + end + + depends_on "libtool" => :build + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + int main() { + xo_set_flags(NULL, XOF_KEYS); + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lxo", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libxp.rb b/Formula/lib/libxp.rb new file mode 100644 index 0000000000000..fe2760e92a155 --- /dev/null +++ b/Formula/lib/libxp.rb @@ -0,0 +1,59 @@ +class Libxp < Formula + desc "X Print Client Library" + homepage "https://gitlab.freedesktop.org/xorg/lib/libxp" + url "https://gitlab.freedesktop.org/xorg/lib/libxp/-/archive/libXp-1.0.4/libxp-libXp-1.0.4.tar.bz2" + sha256 "81468f6d5d8d8f847aac50af60b36c43d84d976d907ab1dfd667683dbfb5fb90" + license "MIT" + + livecheck do + url :stable + regex(/^libXp[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "58ea4743cac65c66cd744b26ab6cd8e83a282e2da52ef872898e2237c948b563" + sha256 cellar: :any, arm64_sonoma: "ebdf40af1b62e90da723be29ff1c9a2f636bb09dbd7b4caa69975f2928123c71" + sha256 cellar: :any, arm64_ventura: "f92106b34661b7a8d39636a544ee208e724b2ac68395ca4a9b2ef264359190f9" + sha256 cellar: :any, arm64_monterey: "c2e8285bdd8edb318e57e2b9d47e692d283cc05ac7ba811468ce946a9070fa1f" + sha256 cellar: :any, arm64_big_sur: "e44f5fc9fafc1b6c40c6051921f6de14d2a0d6a01c5fd9715341bb77e5ccd144" + sha256 cellar: :any, sonoma: "a4cd71b49eb7aa1feafda1216ac8302154df78b05f0321f91bcb61ef6aa47592" + sha256 cellar: :any, ventura: "f23541f38685321e6ff2d041a19391b2a7e88e788e794170ba8fed668134f36d" + sha256 cellar: :any, monterey: "afa942a7ef9f5244bcfd7ce8e61b8235e3085f41bdc521bb3c930eb9402ff8bb" + sha256 cellar: :any, big_sur: "ebf2ccca3126f773869610f9ca07888226e6caf7ab90a3b493aeadbf81354022" + sha256 cellar: :any, catalina: "0687d2c037f00590ebf445e0b7f5531a703ddd8390dc903eaacbd451fdd10a6c" + sha256 cellar: :any_skip_relocation, arm64_linux: "02bd6784a427333504ac05c8dc0d54e57219cce3d0efbdaed91b1029594b7045" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff2541a82e9806bac37aedb6fcaa83846e4f4d8710d4ea632a09fe826746da99" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "util-macros" => :build + + depends_on "libx11" + depends_on "libxau" + depends_on "libxext" + + resource "printproto" do + url "https://gitlab.freedesktop.org/xorg/proto/printproto/-/archive/printproto-1.0.5/printproto-printproto-1.0.5.tar.bz2" + sha256 "f2819d05a906a1bc2d2aea15e43f3d372aac39743d270eb96129c9e7963d648d" + end + + def install + resource("printproto").stage do + system "sh", "autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + ENV.prepend_path "PKG_CONFIG_PATH", "#{lib}/pkgconfig" + system "sh", "autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + assert_match "-I#{include}", shell_output("pkgconf --cflags xp").chomp + end +end diff --git a/Formula/lib/libxpm.rb b/Formula/lib/libxpm.rb new file mode 100644 index 0000000000000..5ca4a0e247d1d --- /dev/null +++ b/Formula/lib/libxpm.rb @@ -0,0 +1,52 @@ +class Libxpm < Formula + desc "X.Org: X Pixmap (XPM) image file format library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXpm-3.5.17.tar.gz" + sha256 "959466c7dfcfcaa8a65055bfc311f74d4c43d9257900f85ab042604d286df0c6" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a78b3654640de7665b01b2b6e61420a85bba28185aeb13c71677690c558c8c42" + sha256 cellar: :any, arm64_sonoma: "4e515c10ad6f503a64cbc95c7bded77018f3f9ff5c7edd27f6a1eead7f7152b5" + sha256 cellar: :any, arm64_ventura: "eaf7ccf963015adb96b81535ddd9b843bde2f1f2d558e737ff88da4f559b5918" + sha256 cellar: :any, arm64_monterey: "c502e241aa5021ec70a444fd268bbf7b55ad4c6a5495b13828c3511ad36cdf9a" + sha256 cellar: :any, sonoma: "f46993627dccbd01bf4efbef9bd6bcaa6201dd3ed95845f36d761ac3a6005ad2" + sha256 cellar: :any, ventura: "b77cec2defe44c7188d60411cb02ff6c04294c01040d28ff52e449196e4bfd72" + sha256 cellar: :any, monterey: "8876141eb41e3bef55d16ec8a792c328c942fa65556ace6f61fe04eb3a998305" + sha256 cellar: :any_skip_relocation, arm64_linux: "e44e847b442ad8deda39fe1ce156886a012efec2905091c3cd058fedf43c905b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42c491e24ddc28e4663b4f630486564c913238fe77b8ca81bb6cfc6758bf715c" + end + + depends_on "gettext" => :build + depends_on "pkgconf" => :build + depends_on "gettext" + depends_on "libx11" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-open-zfile + --disable-silent-rules + --disable-stat-zfile + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/xpm.h" + + int main(int argc, char* argv[]) { + XpmColor color; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxpresent.rb b/Formula/lib/libxpresent.rb new file mode 100644 index 0000000000000..ac871a1a622dd --- /dev/null +++ b/Formula/lib/libxpresent.rb @@ -0,0 +1,53 @@ +class Libxpresent < Formula + desc "Xlib-based library for the X Present Extension" + homepage "https://gitlab.freedesktop.org/xorg/lib/libxpresent" + url "https://www.x.org/archive/individual/lib/libXpresent-1.0.1.tar.xz" + sha256 "b964df9e5a066daa5e08d2dc82692c57ca27d00b8cc257e8e960c9f1cf26231b" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7e63498b20190e5cafd0a9adfe036c47a39bcc561518f856d01d168fb801997a" + sha256 cellar: :any, arm64_sonoma: "5154234d565eec07b6546e1bc9eba8b561dff0200e128f637eff35bda1b52a16" + sha256 cellar: :any, arm64_ventura: "fe13d712a8cf2ebba7de9d9d1cac8b606eead4439ecd0be941765bd6ca4872b0" + sha256 cellar: :any, arm64_monterey: "4e3e3cd9ff60f75b914f230398805e086864e82d7c3b7b3b2be01d73275dd53d" + sha256 cellar: :any, sonoma: "eb83e0d03a31d7ea8cd48cd3d43bdeb5d0048af0d06646c446e568ec7a3013ca" + sha256 cellar: :any, ventura: "3e03a11b61ba1ffe208a8d81a0758bf7035a121d8628ee1060bda1806acc74fe" + sha256 cellar: :any, monterey: "55bad28f062443796869c41b7c9c5937786fe92cbb9b68794818d7c077d1dbc5" + sha256 cellar: :any_skip_relocation, arm64_linux: "15d2a13ac97e3109624e052570ae65cb4262f3702bd2bfcaf929b552cccd51b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0cb8e78a41a28a3614a7db1df840c1b1c30c96edf2dc6bd6dc49824709b47305" + end + + head do + url "https://gitlab.freedesktop.org/xorg/lib/libxpresent.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 "libx11" + depends_on "libxext" + depends_on "libxfixes" + depends_on "libxrandr" + + def install + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() { + XPresentNotify notify; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxrandr.rb b/Formula/lib/libxrandr.rb new file mode 100644 index 0000000000000..2187ce07b63b2 --- /dev/null +++ b/Formula/lib/libxrandr.rb @@ -0,0 +1,51 @@ +class Libxrandr < Formula + desc "X.Org: X Resize, Rotate and Reflection extension library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXrandr-1.5.4.tar.xz" + sha256 "1ad5b065375f4a85915aa60611cc6407c060492a214d7f9daf214be752c3b4d3" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e29fec5331c2d36188093a2331d0f2f426c9cb18d21e5335931ee0d0e22e5ec9" + sha256 cellar: :any, arm64_sonoma: "7775fef1d482d55d108a57bd2cc32c3177eea7270956a2fb648b3683acd54049" + sha256 cellar: :any, arm64_ventura: "dbc964894d888cc4147af5ca01528a8bfaacff3c9219981267c405bd37e591de" + sha256 cellar: :any, arm64_monterey: "e19d7b1164d1aacee9a9a9f2811f5071fdb649913f3b6a388b11ab56ba65c153" + sha256 cellar: :any, sonoma: "c400393add3a4dab2a9be13192af2cafdf443234c527a57bb9e22ecfa28cb019" + sha256 cellar: :any, ventura: "1cd8ea19e0bdef49383720d3d4aa1c639981a36c9c0a2763c1e9b73afe6a9f06" + sha256 cellar: :any, monterey: "52f7889369a183269ec67a15b65bc4bdc41fb5209bc4d291fb7c91abb5455319" + sha256 cellar: :any_skip_relocation, arm64_linux: "5d5d28081dd9152f7866682e673bf2cc425a0d0bdcfc8917ad54edcad5d1bbed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c48b622aed3d5e99e225601dca2d129fda08585571d948f8737f3e6a4bcb2a56" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "libxrender" + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/extensions/Xrandr.h" + + int main(int argc, char* argv[]) { + XRRScreenSize size; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxrender.rb b/Formula/lib/libxrender.rb new file mode 100644 index 0000000000000..1036588ceabf1 --- /dev/null +++ b/Formula/lib/libxrender.rb @@ -0,0 +1,47 @@ +class Libxrender < Formula + desc "X.Org: Library for the Render Extension to the X11 protocol" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXrender-0.9.12.tar.gz" + sha256 "0fff64125819c02d1102b6236f3d7d861a07b5216d8eea336c3811d31494ecf7" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "edcb8884f9d33219d276051be3b5ad64f390cdf3abe9794d9a0050c02895c3a7" + sha256 cellar: :any, arm64_sonoma: "a9e072e66b91797a41879d60271ac73a0b6a6e487a80ca054a44c209352e20ae" + sha256 cellar: :any, arm64_ventura: "0d5c91bc0d13b447077fadd8a7b73e1b65091db9d03e5f6f515eb506591c8bec" + sha256 cellar: :any, sonoma: "97554360bb9c9e82ebc7140f0186f02c103e877988c1d4a0139fbd5be1990f6a" + sha256 cellar: :any, ventura: "7738d05da7567ca24736fc6ea5a4f881a0cd33ebbbb023d647844e183b785e7d" + sha256 cellar: :any_skip_relocation, arm64_linux: "6370f22ed262b6bbf0ce75fc0993b26b4b0fa7a332e02ac21586ebe11c5ecb35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44bddde0557643e137ddd5aa00d60bf220527719d2cb9263e397098dee2664c5" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/extensions/Xrender.h" + + int main(int argc, char* argv[]) { + XRenderColor color; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxres.rb b/Formula/lib/libxres.rb new file mode 100644 index 0000000000000..4dc04a952d856 --- /dev/null +++ b/Formula/lib/libxres.rb @@ -0,0 +1,52 @@ +class Libxres < Formula + desc "X.Org: X-Resource extension client library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXres-1.2.2.tar.xz" + sha256 "9a7446f3484b9b7538ac5ee30d2c1ce9e5b7fbbaf1440e02f6cca186a1fa745f" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e7f72b305f5c62fa3bd025cb437a533e0d5fd903bbf165d8b86f0e19e163474a" + sha256 cellar: :any, arm64_sonoma: "d75dbe208195822aa95957e8037d80dec8c5c86c60a5669afb7ec2187210d64b" + sha256 cellar: :any, arm64_ventura: "fbf27991234578c082292975c64ee98b2ab2b69dd2cbc71056dfb3c2fd94ffb9" + sha256 cellar: :any, arm64_monterey: "e3fa4b14265315d1dd48439e241df505cef320c6a25a33a91e58e2245bb2f203" + sha256 cellar: :any, arm64_big_sur: "cb39d8ae314b09357fbaadbcbb14abb7a21e85bb4d298a3e2efe2bd411a21fe9" + sha256 cellar: :any, sonoma: "f13a56fa17a6818add007ee90aebe57911fa824dda047d836169ce241873b6c3" + sha256 cellar: :any, ventura: "7ba9d4daab9d3636b53d98510309eb2c37dd07ba9efd5585947d1e3609067388" + sha256 cellar: :any, monterey: "ab7139ca0d7d8b12508d9211704963ff34d8b62a3888b222018c76dad8702280" + sha256 cellar: :any, big_sur: "6dfe38b8542221db4841c3326d2c647894b7a86b45cae7b82ee83e95105ec150" + sha256 cellar: :any_skip_relocation, arm64_linux: "d4c512a727a4d313ed53f32bf7d7aabc96e0ef445b1a56a175ec3381dcbb1ef7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0a84c746909317e32b8e527e20d56df64836bf461e8719d5bbab2be1f249cc0" + end + + depends_on "pkgconf" => :build + depends_on "xorgproto" => :build + depends_on "libx11" + depends_on "libxext" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/extensions/XRes.h" + + int main(int argc, char* argv[]) { + XResType client; + return 0; + } + C + system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lXRes" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxscrnsaver.rb b/Formula/lib/libxscrnsaver.rb new file mode 100644 index 0000000000000..a7f5310f9fc34 --- /dev/null +++ b/Formula/lib/libxscrnsaver.rb @@ -0,0 +1,51 @@ +class Libxscrnsaver < Formula + desc "X.Org: X11 Screen Saver extension client library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXScrnSaver-1.2.4.tar.xz" + sha256 "75cd2859f38e207a090cac980d76bc71e9da99d48d09703584e00585abc920fe" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0b3b6f538e4e11629f54b74f0603e9fca13439e3ab37ff3899c9081d4dc80258" + sha256 cellar: :any, arm64_sonoma: "b2b4a894b7f7ee7f077af223b68814ab6c4a4e8d41de227642fbd373de36e0f7" + sha256 cellar: :any, arm64_ventura: "0a1e6445b137a59fcb7b2abf72065758997cfefcd36e8ba8f9875e52bb01fd3c" + sha256 cellar: :any, arm64_monterey: "c04b841bd76e8d06c9b37ae51c091ee1724d7b72df939cc8361bbe0441d4166e" + sha256 cellar: :any, arm64_big_sur: "75b9fc38234ddaf88aaad59f366053812401497beebca2bbea4d69afcf228083" + sha256 cellar: :any, sonoma: "7f3bc86175531a13ab81be6d014a90ea1e63b4c2ae5ce1a0216c9d994b664edc" + sha256 cellar: :any, ventura: "2ddac267bc14039812c5c7af3af9732d5919ed7b9a873dc5589613f69c106b0a" + sha256 cellar: :any, monterey: "28b52ebe202f8695e20fbb36d7a66cbbd9d22a4cffa3339a4903247707a18cf1" + sha256 cellar: :any, big_sur: "a2a6fb8407b5aaebe67b79704c480a1466f3473929291d2416fb36b187a7b552" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2b3344d7cb09968e07f68f26e8451f3b67b374e640b5123680480aa33d33d9c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d538938eb52738da95c07cb87f895673633ed55667a394991c6847cd62d40c5b" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/extensions/scrnsaver.h" + + int main(int argc, char* argv[]) { + XScreenSaverNotifyEvent event; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxsd-frontend.rb b/Formula/lib/libxsd-frontend.rb new file mode 100644 index 0000000000000..d57827e84a894 --- /dev/null +++ b/Formula/lib/libxsd-frontend.rb @@ -0,0 +1,49 @@ +class LibxsdFrontend < Formula + desc "Compiler frontend for the W3C XML Schema definition language" + homepage "https://www.codesynthesis.com/projects/libxsd-frontend/" + url "https://www.codesynthesis.com/download/xsd/4.2/libxsd-frontend-2.1.0.tar.gz" + sha256 "98321b9c2307d7c4e1eba49da6a522ffa81bdf61f7e3605e469aa85bfcab90b1" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3631cb5e92f7b2d727f1fe7039482a1a5cd1d81e317674fa418795e4691d60fe" + sha256 cellar: :any, arm64_sonoma: "cc7523a561914a469ed374865f6135e9756d7c08b8d3fd16a79d405523c5e338" + sha256 cellar: :any, arm64_ventura: "2c8b2a9f341d970929e266b1c63ec298ec46029c7164ce41d554f24cb9ab84f4" + sha256 cellar: :any, sonoma: "b1d8a828aa8fd14ba6c3c361fcbdea0422df3a9182b9f380f0cfa71b6f4d1cb5" + sha256 cellar: :any, ventura: "820f8de1fffddd9f19537ffbdca74723121d8e751908a89bfd09fa6cce193328" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2d85d419e1276e6b49a4b3859d06b20ca2fec7baeeada125e94c20350031b5b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "19114c72e4f6ecdd2628dd3f0a06c93b5554367b710f69ee8bf8fc060b1faba3" + end + + depends_on "build2" => :build + depends_on "libcutl" + depends_on "xerces-c" + + def install + system "b", "configure", "config.cc.loptions=-L#{HOMEBREW_PREFIX}/lib", "config.install.root=#{prefix}" + system "b", "install", "--jobs=#{ENV.make_jobs}", "-V" + pkgshare.install "tests/schema/driver.cxx" => "test.cxx" + end + + test do + (testpath/"test.xsd").write <<~XSD + + + + + XSD + + system ENV.cxx, "-std=c++11", pkgshare/"test.cxx", "-o", "test", + "-L#{lib}", "-lxsd-frontend", "-L#{Formula["libcutl"].opt_lib}", "-lcutl" + assert_equal <<~TEXT, shell_output("./test test.xsd") + primary + { + namespace https://brew.sh/XSDTest + { + element MeaningOfLife http://www.w3.org/2001/XMLSchema#positiveInteger + } + } + TEXT + end +end diff --git a/Formula/lib/libxshmfence.rb b/Formula/lib/libxshmfence.rb new file mode 100644 index 0000000000000..2402ecc1bace6 --- /dev/null +++ b/Formula/lib/libxshmfence.rb @@ -0,0 +1,45 @@ +class Libxshmfence < Formula + desc "X.Org: Shared memory 'SyncFence' synchronization primitive" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libxshmfence-1.3.3.tar.xz" + sha256 "d4a4df096aba96fea02c029ee3a44e11a47eb7f7213c1a729be83e85ec3fde10" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e594a6ecbb103e2afcd62ce9093d3b7c42cd606af7ba3a82cd9a4c539e4d2d52" + sha256 cellar: :any, arm64_sonoma: "2458905e037ad4f18eeba6b04eb8501c30079e77821b9d71158ca7e966b7ce3d" + sha256 cellar: :any, arm64_ventura: "b1ce7b250aec924e67c460575448f347782cdcfb9d2fd18f4c04ad5d994e46f7" + sha256 cellar: :any, sonoma: "b48d848198caab47d17a71cd910556d018ff81ea8f3f2d48b5165faec9da8e2c" + sha256 cellar: :any, ventura: "704aa281d7881a37f4c95f351a3a558898f5d153830edb3d03b16b6d13e42d9b" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0a90e1f18cc19078d0e7ad95b023deb2ffad6cd1b064e3fc86bc480553b5177" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6db4447d0738071d8c69faf8cafc59b4178b79b732324e0412d15733dc6cb323" + end + + depends_on "pkgconf" => :build + depends_on "xorgproto" => [:build, :test] + + 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 + (testpath/"test.c").write <<~C + #include "X11/xshmfence.h" + + int main(int argc, char* argv[]) { + struct xshmfence *fence; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxslt.rb b/Formula/lib/libxslt.rb new file mode 100644 index 0000000000000..65fcbe685aa42 --- /dev/null +++ b/Formula/lib/libxslt.rb @@ -0,0 +1,78 @@ +class Libxslt < Formula + desc "C XSLT library for GNOME" + homepage "http://xmlsoft.org/XSLT/" + url "https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.43.tar.xz" + sha256 "5a3d6b383ca5afc235b171118e90f5ff6aa27e9fea3303065231a6d403f0183a" + license "X11" + + # We use a common regex because libxslt doesn't use GNOME's "even-numbered + # minor is stable" version scheme. + livecheck do + url :stable + regex(/libxslt[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "882f9071165800a694e3dc146e614c984b70d80cf8fa284cc78dd0f35f096a2f" + sha256 cellar: :any, arm64_sonoma: "ba204e6736fe30b763bc9372a464f050daa8c5d66aebbff6c8659abbc796d4ae" + sha256 cellar: :any, arm64_ventura: "68fbcc1a39a1af56dda4c550816f0a4796ed8b70608518b184331f1e13a1ff1b" + sha256 cellar: :any, sonoma: "c2432ea083f92c5d6ffd4968f7a0e3d675f7c2098f27e2742b607a9ba68d1f6d" + sha256 cellar: :any, ventura: "96311a902a7c1ce991bfb90a01b11442d5ede675238afd8ed22980f7d91b415f" + sha256 cellar: :any_skip_relocation, arm64_linux: "847d260b760e00468ab47ce7b72514ef3381622fdb396512926ef4c82d54d1cc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "595b354dd8c9dc086224701709d5a471f7a916693ebf52e5d68eea1f454bd98d" + end + + head do + url "https://gitlab.gnome.org/GNOME/libxslt.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + keg_only :provided_by_macos + + depends_on "libgcrypt" + depends_on "libxml2" + + on_macos do + depends_on "libgpg-error" + end + + on_linux do + depends_on "pkgconf" => :build + end + + def install + libxml2 = Formula["libxml2"] + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", "--disable-silent-rules", + "--without-python", + "--with-crypto", + "--with-libxml-prefix=#{libxml2.opt_prefix}", + *std_configure_args + system "make" + system "make", "install" + end + + def caveats + <<~EOS + To allow the nokogiri gem to link against this libxslt run: + gem install nokogiri -- --with-xslt-dir=#{opt_prefix} + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/xslt-config --version") + (testpath/"test.c").write <<~C + #include + int main(int argc, char *argv[]) { + exsltCryptoRegister(); + return 0; + } + C + flags = shell_output("#{bin}/xslt-config --cflags --libs").chomp.split + system ENV.cc, "test.c", "-o", "test", *flags, "-lexslt" + system "./test" + end +end diff --git a/Formula/lib/libxspf.rb b/Formula/lib/libxspf.rb new file mode 100644 index 0000000000000..7f4504eb740f1 --- /dev/null +++ b/Formula/lib/libxspf.rb @@ -0,0 +1,50 @@ +class Libxspf < Formula + desc "C++ library for XSPF playlist reading and writing" + homepage "https://libspiff.sourceforge.net/" + url "https://downloads.sourceforge.net/project/libspiff/Sources/1.2.1/libxspf-1.2.1.tar.bz2" + sha256 "ce78a7f7df73b7420b6a54b5766f9b74e396d5e0b37661c9a448f2f589754a49" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f89d8d32a4bfb4ceb5254b1bd40d8bbb6ad1363143c1897a4ad945664b39b70d" + sha256 cellar: :any, arm64_sonoma: "ebe5a694ae5d6433a1d632e780572da1e4addcbcf871370c85ed928e2e6feed1" + sha256 cellar: :any, arm64_ventura: "03f9d06101c08ff9f642fcdd03f4983b97c85191fb8b9476e0dbda13c9488914" + sha256 cellar: :any, arm64_monterey: "c3200ce73e78aff6e49838294213ed76c255d451fdc2a16b7afdf726a4113cc8" + sha256 cellar: :any, arm64_big_sur: "46c96c913b55106e3d616a0cae41b628bedea1b1226f757ab69505d85a773f38" + sha256 cellar: :any, sonoma: "fe379ee49349f8cbcb67c944ab9605e30a25a3007385eaae802626a252f5b522" + sha256 cellar: :any, ventura: "e904f629cf88a4df489149100af8a60ffb9ef12e1fef74651095e0d57f54d48e" + sha256 cellar: :any, monterey: "fbeb2b06f536534acd8e85c7cd86b0603f85e059dfb0277cf093c4aeb5875dca" + sha256 cellar: :any, big_sur: "3bdd88ce60539e5c451fbfbb39d85719b9551965550b5b2937f409f152b08330" + sha256 cellar: :any, catalina: "e0047524231105d369ade5acf8110d3e64f5d98f39848df201cfcdc9ded7ec39" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e7ee0f7026c5cfe6bbf84efc5474a94274645bdd0e7a498c20e5b6a37e21a2f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e901fd286da4e617543de36efef5f7e0a115d936eeb3ec01326ae92a02df29d8" + end + + depends_on "cpptest" => :build + depends_on "pkgconf" => :build + depends_on "uriparser" + + uses_from_macos "expat" + + resource "check.cpp" do + url "https://gitlab.xiph.org/xiph/libxspf/-/raw/master/examples/check/check.cpp" + sha256 "fdd1e586c4f5b724890eb2ce6a3cd3b9910a8e74ee454fe462ba8eb802f7c4b9" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + resource("check.cpp").stage(testpath) + flags = "-I#{include} -L#{lib} -lxspf".split + system ENV.cxx, "check.cpp", "-o", "check", *flags + end +end diff --git a/Formula/lib/libxt.rb b/Formula/lib/libxt.rb new file mode 100644 index 0000000000000..0acc728e84321 --- /dev/null +++ b/Formula/lib/libxt.rb @@ -0,0 +1,50 @@ +class Libxt < Formula + desc "X.Org: X Toolkit Intrinsics library" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXt-1.3.1.tar.xz" + sha256 "e0a774b33324f4d4c05b199ea45050f87206586d81655f8bef4dba434d931288" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c943204935f65bf05b78af5e659996394db0ef2083faac3b8efd58192efb330b" + sha256 cellar: :any, arm64_sonoma: "1e51d92fb3f1d80f47d7ce82db6152995b8fc91fee571c66673a7ea667048806" + sha256 cellar: :any, arm64_ventura: "7caed6452f24e561e9214d648660a1b9b37db71a7198cf86bac3811f83ec266c" + sha256 cellar: :any, sonoma: "b4e600308fd42fd1ea790f719e2038f1029fdfbdca9a2010a03e04d3c4c6bbb2" + sha256 cellar: :any, ventura: "4d2943f42410c3033e727fbcfc38abac5d7a58e3c1c614b9117e9415f448073e" + sha256 cellar: :any_skip_relocation, arm64_linux: "e41953b45ae3b9003f04b13697835dae0b60b93f1b66dba27ef030c6993453e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b0de9305b6428a6ffca0a8bdb1a777ed01bf9a31cfb91035099a9003cac5598" + end + + depends_on "pkgconf" => :build + depends_on "libice" + depends_on "libsm" + depends_on "libx11" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --with-appdefaultdir=#{etc}/X11/app-defaults + --disable-silent-rules + --disable-specs + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/IntrinsicP.h" + #include "X11/CoreP.h" + + int main(int argc, char* argv[]) { + CoreClassPart *range; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxtst.rb b/Formula/lib/libxtst.rb new file mode 100644 index 0000000000000..dc447f7fb7915 --- /dev/null +++ b/Formula/lib/libxtst.rb @@ -0,0 +1,54 @@ +class Libxtst < Formula + desc "X.Org: Client API for the XTEST & RECORD extensions" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXtst-1.2.5.tar.gz" + sha256 "244ba6e1c5ffa44f1ba251affdfa984d55d99c94bb925a342657e5e7aaf6d39c" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "28d4af1505473aed939328ace91056e111623d0c60b817d0b98dc3e00472dc4d" + sha256 cellar: :any, arm64_sonoma: "aaefda085ce2cd52a2fccada770bc3280c75128ecbd66f92ea7afa25c11631c8" + sha256 cellar: :any, arm64_ventura: "ee96653ea151d173c107e01ef1945ddca27e4585dc89c1eab34e7dd70a5718fa" + sha256 cellar: :any, arm64_monterey: "618320ced081879132c2a569a2e8843326628423bcc8b1fbca86a0de66cbdc11" + sha256 cellar: :any, sonoma: "fac9520eabdd31b4defc300ec39c860da9809c8850415b2c8ba799e1849e5f2f" + sha256 cellar: :any, ventura: "1b29a72e003a2f5b3ea2bf308ed8be1218146051fa941177a1eca49099558362" + sha256 cellar: :any, monterey: "252a0ae6686b4d4f5098360cb7ed9a2f25d8dd122ae79150af3533509da1e102" + sha256 cellar: :any_skip_relocation, arm64_linux: "270e406f0aa8cdbd35a39c76ebaea72a79325ac23ee3342d1cc5f7c930a8f337" + sha256 cellar: :any_skip_relocation, x86_64_linux: "51cacd4573d0d4e1cc33c83574cf4838d93de28276a9cd3c69496da8a4466771" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + + depends_on "libx11" + depends_on "libxext" + depends_on "libxi" + depends_on "xorgproto" + + def install + args = %W[ + --sysconfdir=#{etc} + --localstatedir=#{var} + --disable-silent-rules + --enable-specs=no + ] + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/extensions/record.h" + + int main(int argc, char* argv[]) { + XRecordRange8 *range; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxv.rb b/Formula/lib/libxv.rb new file mode 100644 index 0000000000000..0b9a739e73c95 --- /dev/null +++ b/Formula/lib/libxv.rb @@ -0,0 +1,49 @@ +class Libxv < Formula + desc "X.Org: X Video (Xv) extension" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXv-1.0.13.tar.xz" + sha256 "7d34910958e1c1f8d193d828fea1b7da192297280a35437af0692f003ba03755" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ca4ceb63d5715291d60b70df4374fc26c5d559fa3e97fd7cd910df33f5a0a4b0" + sha256 cellar: :any, arm64_sonoma: "b5b7f229fbcefcabbeb5a0bbac23094686d2669c1adebfd5c292bc57528442aa" + sha256 cellar: :any, arm64_ventura: "feb734a5af4fb26c75394824bcb0e3475eccc29432c3737ab89433a9b8980b5d" + sha256 cellar: :any, sonoma: "efca4bea336f2d0ccf72c4b70d7fe7b651ba28ded3c751d83dc9c612a0baa348" + sha256 cellar: :any, ventura: "a84ae702322ad41c4f4700a86f0c433211b2ecea8e5d491924cb11e3d6021027" + sha256 cellar: :any_skip_relocation, arm64_linux: "6eb1cd4b0e4cc2810b08615670b5881ec52067350a85e40d54e0a0c01b8450e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1371d2c06b2dbb27c1e2c3e7e15227a9741dcf2a6709513e0577d185628291f" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/extensions/Xvlib.h" + + int main(int argc, char* argv[]) { + XvEvent *event; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxvmc.rb b/Formula/lib/libxvmc.rb new file mode 100644 index 0000000000000..fe20f8fc8f4ed --- /dev/null +++ b/Formula/lib/libxvmc.rb @@ -0,0 +1,52 @@ +class Libxvmc < Formula + desc "X.Org: X-Video Motion Compensation API" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXvMC-1.0.14.tar.xz" + sha256 "e4be9eb6b6bafdbbf81f47f7163047215376e45e2dc786d0ea6181c930725ed9" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b98800f4d24c2f04f9ac826ed9365195847f7bd3c5aa758abf5ae6c2748256b0" + sha256 cellar: :any, arm64_sonoma: "ec6119429cbf4d4812c6b9aca9cfd33f1b63802d7536b886f5b4454a55241ecd" + sha256 cellar: :any, arm64_ventura: "e2990ee70324b5caa16cfb356d2066da14e66c7a9b4ed5c9e5da7867b779d618" + sha256 cellar: :any, arm64_monterey: "7ee479ebc065e0587284e698515087d1f9187ae4b88640d01a333f5d38638d18" + sha256 cellar: :any, sonoma: "f014a42faf3225b6d7b56c397e7f87a704386e514c86802f04f1351b6d7133e1" + sha256 cellar: :any, ventura: "06b0927fac5c241e00f13de5a609de3580550e7cfd2088937de8ef3c50fad465" + sha256 cellar: :any, monterey: "a0bc605754551292b8d475d0dc8dbe35fcb7753385576651601df0a4af9ef690" + sha256 cellar: :any_skip_relocation, arm64_linux: "f6a849f057352628d93b8b5682b40bf90b196ae1746911f746046f3e79ad665a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7bb9249003ad6c7905548d56c1863abf21b9a0f07407139d8060e6a553eff45e" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" => :build + depends_on "xorgproto" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "libxv" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/extensions/XvMClib.h" + + int main(int argc, char* argv[]) { + XvPortID *port_id; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxxf86dga.rb b/Formula/lib/libxxf86dga.rb new file mode 100644 index 0000000000000..de4d96ae19191 --- /dev/null +++ b/Formula/lib/libxxf86dga.rb @@ -0,0 +1,52 @@ +class Libxxf86dga < Formula + desc "X.Org: XFree86-DGA X extension" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXxf86dga-1.1.6.tar.xz" + sha256 "be44427579808fe3a217d59f51cae756a26913eb6e4c8738ccab65ff56d7980f" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "eb23f74c86d0455fea55619165dc67a91596a64f46e2b1575941612eb763319c" + sha256 cellar: :any, arm64_sonoma: "aabd31abe4a5de30d5c7e5597d1375c90620aacfc65e29973ef08afc2a8cea15" + sha256 cellar: :any, arm64_ventura: "d28beaab68c473b46d08570b3a351f50ab6c303187383c3cac0342f9d7cf2d56" + sha256 cellar: :any, arm64_monterey: "e9e16c678779cbe12b944e70b64ab466e16ed037e93baf26d50f6132834135e1" + sha256 cellar: :any, arm64_big_sur: "44a81603b3df546c0af4c81359ed676f160fee8a6653189616945c70fe680f8f" + sha256 cellar: :any, sonoma: "1268406d3219140025e3ecec8b1897fba05230fe0e2331f16ca2f028fc92182f" + sha256 cellar: :any, ventura: "0b31da893a8d2b2f88925e2d433252bfc712e2777916dc34e3c1c11be7b6e8b1" + sha256 cellar: :any, monterey: "b1248f35772649eed2823a6a37bacfc1d2a860c9c5187ceafae9dedd511db70a" + sha256 cellar: :any, big_sur: "e5cbd5be1621338c7040d39bc3b7e3a8296d0171e747372e3d3b0b1f1747081c" + sha256 cellar: :any_skip_relocation, arm64_linux: "b559dfe88d4ae3895c798f0de94f418fede30bb5a114c5cf6f0074efd1373c31" + sha256 cellar: :any_skip_relocation, x86_64_linux: "80432c3b9c22e33647c255fc8669b182d3980df952d6e5f7f1c93e6d31b56285" + end + + depends_on "pkgconf" => :build + depends_on "xorgproto" => :build + depends_on "libx11" + depends_on "libxext" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/extensions/Xxf86dga.h" + + int main(int argc, char* argv[]) { + XDGAEvent event; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libxxf86vm.rb b/Formula/lib/libxxf86vm.rb new file mode 100644 index 0000000000000..4ca7032c18226 --- /dev/null +++ b/Formula/lib/libxxf86vm.rb @@ -0,0 +1,48 @@ +class Libxxf86vm < Formula + desc "X.Org: XFree86-VidMode X extension" + homepage "https://www.x.org/" + url "https://www.x.org/archive/individual/lib/libXxf86vm-1.1.6.tar.gz" + sha256 "d2b4b1ec4eb833efca9981f19ed1078a8a73eed0bb3ca5563b64527ae8021e52" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "13c02476485b075f3b74ed0b7e1222f2f9e2abf5b40bfb13aeafde83d3b6a3b9" + sha256 cellar: :any, arm64_sonoma: "30952396b1e9b0936a4f5e143122bec37cd0b835e26168e4fa87ea0bbc458ab1" + sha256 cellar: :any, arm64_ventura: "363d3b25237b106818012a000ebed92fc21a145c5253c97685801128da9a510b" + sha256 cellar: :any, sonoma: "0f40e51b6211395733b458f27cb329543cc0c1458217d4bca2bcf2c8b12d1401" + sha256 cellar: :any, ventura: "75add9e909d354f98af9dc286327692f470fdfd4b32dcd96ea4455adac6e35a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "9432dbcf9ae56adcb8735725c1388cc35bcaccef431ac2a78308c1c866f0be24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d916bedfca3e0ba33a43ebc5524d0178fcfd3a6eb95f9b793ca66d8b76d60fb" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "libxext" + depends_on "xorgproto" + + 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 + (testpath/"test.c").write <<~C + #include "X11/Xlib.h" + #include "X11/extensions/xf86vmode.h" + + int main(int argc, char* argv[]) { + XF86VidModeModeInfo mode; + return 0; + } + C + system ENV.cc, "test.c" + assert_equal 0, $CHILD_STATUS.exitstatus + end +end diff --git a/Formula/lib/libyaml.rb b/Formula/lib/libyaml.rb new file mode 100644 index 0000000000000..ca91555e9792a --- /dev/null +++ b/Formula/lib/libyaml.rb @@ -0,0 +1,55 @@ +class Libyaml < Formula + desc "YAML Parser" + homepage "https://github.com/yaml/libyaml" + url "https://github.com/yaml/libyaml/archive/refs/tags/0.2.5.tar.gz" + sha256 "fa240dbf262be053f3898006d502d514936c818e422afdcf33921c63bed9bf2e" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0ec9bf8082245c008803b42dcae3e6a0c8cd7a67aed589d9b6482b115c0a543b" + sha256 cellar: :any, arm64_sonoma: "98c0cf81bcdf7577d5fdc8cc18732970b9ae7e0e7423a733f88f0f566ba483ad" + sha256 cellar: :any, arm64_ventura: "11239e8f5066c6d0d0718208d4eab518da00c7289f33c9c76c0a09ba5c0417c9" + sha256 cellar: :any, arm64_monterey: "a436da33a05f805258c5951a365dec4e8d70a908dbe5dacdeb6b2ecd0efd5024" + sha256 cellar: :any, arm64_big_sur: "fe1082f3475a144261b41e2c3e0728b9331911b1cbfadfbc1f3d70d454709154" + sha256 cellar: :any, sonoma: "4d6e02ce3a82b60033bc7e55bef841dcfef0c05c051176d96accb50744136c6d" + sha256 cellar: :any, ventura: "b49e62f014b3e7d85a169b422b7521356700c7caaaea9f4901086cafe692a86e" + sha256 cellar: :any, monterey: "dbd54ce703c6d8eb77e708f75b4730ad2653d28f6291c4a26dc22158beb3f210" + sha256 cellar: :any, big_sur: "83547fba540a38c30705a59a2e746952c68857212e823c6ee97c186e088f75cd" + sha256 cellar: :any, catalina: "56d3549b342cffb181e3eb05356697bbb362b9733c73e0eeff9b637ecf92cd23" + sha256 cellar: :any, mojave: "a04988b3868cfadf7bcaff6b753b59388cbea70b38f2fa41a25229150d073696" + sha256 cellar: :any, high_sierra: "d3e22ad09c3d6872c5f7ee7c7f1146c9f14c178ff4c3a3488a20bf584bc854d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "c725eb08fc7ab6aad7f744a30b230f9b9efa33f8d694849a2d4aadfabb203df3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "354677a745b6c62109e792ddbd0cbdaf9e6a471d84fdbde3a7d9bae36d832da8" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "./bootstrap" + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.c").write <<~C + #include + + int main() + { + yaml_parser_t parser; + yaml_parser_initialize(&parser); + yaml_parser_delete(&parser); + return 0; + } + C + system ENV.cc, "test.c", "-L#{lib}", "-lyaml", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libyubikey.rb b/Formula/lib/libyubikey.rb new file mode 100644 index 0000000000000..b3881bb69df20 --- /dev/null +++ b/Formula/lib/libyubikey.rb @@ -0,0 +1,36 @@ +class Libyubikey < Formula + desc "C library for manipulating Yubico one-time passwords" + homepage "https://yubico.github.io/yubico-c/" + url "https://developers.yubico.com/yubico-c/Releases/libyubikey-1.13.tar.gz" + sha256 "04edd0eb09cb665a05d808c58e1985f25bb7c5254d2849f36a0658ffc51c3401" + license "BSD-2-Clause" + + livecheck do + url "https://developers.yubico.com/yubico-c/Releases/" + regex(/href=.*?libyubikey[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1402744ea6becf5fc6caf82c61b90530180bc7b7c025952ab5f47db813d9dd81" + sha256 cellar: :any, arm64_sonoma: "9963f3715eff70ebf4bbe725e8bf6e3bb112cb3476798b7d8705090dc3049ed0" + sha256 cellar: :any, arm64_ventura: "4580266e70e2afadf36db6e307f1e2f5046e06628b1482d55c11af8714c9fd87" + sha256 cellar: :any, arm64_monterey: "b1df3ed34996e203f862b623d96606645e25f564e8b2827539c4744c3712fd28" + sha256 cellar: :any, arm64_big_sur: "281fc4490bcdf4c4b19c5aa08a10a996e8fb10c9e1385ba95abd973186e18932" + sha256 cellar: :any, sonoma: "e23c0a9cbcea4d8c864bb323cb36f800c75a7454eef58716a5bf32a2b4658a49" + sha256 cellar: :any, ventura: "4a3cef8d90a4771f8af5102c61544d8c2479333553fd2671ecf8faaf6bdb8388" + sha256 cellar: :any, monterey: "e698d9e14c769152fe36caa69cb4b0232747f76fd0b2e8cc02518dc42f758ff9" + sha256 cellar: :any, big_sur: "d8294cc5022aa96ca4d2073756da801daef11a07e3464656af749008b84cde6d" + sha256 cellar: :any, catalina: "b6fccb68ae85837533ea4680063cc64f207f2d6926c4eafaf23e81f0b790fc55" + sha256 cellar: :any, mojave: "f5f99ad5056fe1d8bfa69a389983ac9ae0f5e65c60d984de4fb9591b6b19daba" + sha256 cellar: :any, high_sierra: "8440f766e153b537a092f55a07990c0fd28e0b244407bf6824d21fedb3d97f32" + sha256 cellar: :any, sierra: "23f550d2f6e2cd6310756e3625c17868e206c90029e241fbc915a408f4761263" + sha256 cellar: :any, el_capitan: "2b1fbc1860932dd4a4c2b09928d838bc3646ff0b2a97bc5c538981befdc21760" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba8cb3360047820a6e9bbc5147e99a5a4538c6061c60088aee8ed9ff65970061" + sha256 cellar: :any_skip_relocation, x86_64_linux: "47be6e603ede5ef7fee2f40cfd4ac4338ca094d25b2a897388df4b90ca5101b7" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end +end diff --git a/Formula/lib/libzdb.rb b/Formula/lib/libzdb.rb new file mode 100644 index 0000000000000..b17826764f0b9 --- /dev/null +++ b/Formula/lib/libzdb.rb @@ -0,0 +1,41 @@ +class Libzdb < Formula + desc "Database connection pool library" + homepage "https://tildeslash.com/libzdb/" + url "https://tildeslash.com/libzdb/dist/libzdb-3.4.0.tar.gz" + sha256 "abd675719bcbdde430aa4ee13975b980d55d2abcb5cc228082a30320a6bb9f0f" + license "GPL-3.0-only" + + livecheck do + url :homepage + regex(%r{href=.*?dist/libzdb[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "c2cdc0ace2bf1ef0a9d2526c7ae60e9274b89554b0c102fbec55e3de814644fe" + sha256 cellar: :any, arm64_sonoma: "64f246320a51ae3c3c964b5d43727117c86496dd00d3fa1502ffc5bd3b1dee2d" + sha256 cellar: :any, arm64_ventura: "726e589d4f8923d5637a0e2e783646b72c27fc67be1b9964751a84756eff31f0" + sha256 cellar: :any, sonoma: "7edcecb1ca7c17d03534e6af574756ec864b4def522cb7e08eafe6b6644a726c" + sha256 cellar: :any, ventura: "241ebf0e383ea2e76a0f50a7631732196b766c2db21a7a9777dbfb698b099661" + sha256 cellar: :any_skip_relocation, arm64_linux: "5298d25e7949700706d31195a5e6002340099bb67bda72a895f068cc5b8205a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3c1a98b88d064a8046b123cd741283a5135edc37bac2567a650fdf561c9ed22" + end + + depends_on "libpq" + depends_on macos: :high_sierra # C++ 17 is required + depends_on "mariadb-connector-c" + depends_on "sqlite" + + def install + system "./configure", "--disable-silent-rules", "--enable-protected", "--enable-sqliteunlock", *std_configure_args + system "make", "install" + (pkgshare/"test").install Dir["test/*.{c,cpp}"] + end + + test do + cp_r pkgshare/"test", testpath + cd "test" do + system ENV.cc, "select.c", "-L#{lib}", "-lpthread", "-lzdb", "-I#{include}/zdb", "-o", "select" + system "./select" + end + end +end diff --git a/Formula/lib/libzen.rb b/Formula/lib/libzen.rb new file mode 100644 index 0000000000000..611221458ef6b --- /dev/null +++ b/Formula/lib/libzen.rb @@ -0,0 +1,51 @@ +class Libzen < Formula + desc "Shared library for libmediainfo" + homepage "https://github.com/MediaArea/ZenLib" + url "https://mediaarea.net/download/source/libzen/0.4.41/libzen_0.4.41.tar.bz2" + sha256 "eb237d7d3dca6dc6ba068719420a27de0934a783ccaeb2867562b35af3901e2d" + license "Zlib" + revision 1 + head "https://github.com/MediaArea/ZenLib.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "de3f0317ed82fd66a7bf6d5a4e876693c932b1a32f2974b02c4abf7b9ab79221" + sha256 cellar: :any, arm64_sonoma: "c12e982c8e86f4c1fd8b5aeb9e2f29a5f9d4f83c106b0ba68383e43e67fdec5f" + sha256 cellar: :any, arm64_ventura: "2550179d73b7f536e5684ae85b7487d8e9f5da7eeda4fa4a3008d01a121a9b9e" + sha256 cellar: :any, arm64_monterey: "93295764f863aba841139305a68963d84253c6802905a914094eaad6b7273623" + sha256 cellar: :any, arm64_big_sur: "4b820f6f232a1f473f07593a9248ab487d7201f7b5b02fab576d6ec552be2f09" + sha256 cellar: :any, sonoma: "e7eed161ae90ec89df5168da54ba0232341d6731bcad47e5e0443d02345719c2" + sha256 cellar: :any, ventura: "7e02045ed71e1768d7264b7a99ece14002dcf1964de433db80d503fd23ea59ff" + sha256 cellar: :any, monterey: "2ed8ddad29956aa083abc3ed7033b45bbc24e978a1eb0bb0ce62cb8befa26e40" + sha256 cellar: :any, big_sur: "5bc397c5c89a3fd8138e4c52e55815ecf2fb9f7da107aaf5d2c79fa9518304b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "e319284f784aa2603799c5500e0a688eb210f11755ec4b8b0114649d82a7ff4a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5fec7fc988c8b996f28e173e2ca09f561aa9883f9630c60066cb3bdc2d77f60" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + # These files used to be distributed as part of the media-info formula + link_overwrite "include/ZenLib/*" + link_overwrite "lib/pkgconfig/libzen.pc" + link_overwrite "lib/libzen.*" + + def install + system "cmake", "-S", "Project/CMake", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include + int main() { + ZenLib::Ztring myString = ZenLib::Ztring().From_UTF8("Hello, ZenLib!"); + std::cout << myString.To_UTF8() << std::endl; + return 0; + } + CPP + system ENV.cxx, "-std=c++17", "test.cc", "-I#{include}", "-L#{lib}", "-lzen", "-o", "test" + system "./test" + end +end diff --git a/Formula/lib/libzim.rb b/Formula/lib/libzim.rb new file mode 100644 index 0000000000000..2200aaef23149 --- /dev/null +++ b/Formula/lib/libzim.rb @@ -0,0 +1,57 @@ +class Libzim < Formula + desc "Reference implementation of the ZIM specification" + homepage "https://github.com/openzim/libzim" + url "https://github.com/openzim/libzim/archive/refs/tags/9.3.0.tar.gz" + sha256 "791220e51e6a160d349491b9744ec1a9c1a104f11a79e8e73673daf242be69ed" + license "GPL-2.0-or-later" + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "b4ceecbeedcfc12b93d6f09afd9108509970317095e61792c171908037dfebd7" + sha256 cellar: :any, arm64_sonoma: "faebeb4b051a2de69ce34863390dbb6c623ea2f01d0ddc7265e9b73cab5aa917" + sha256 cellar: :any, arm64_ventura: "0a36f78d2ec284ba491c030e071a9a5875106dac327bd6e060f479410b6c9331" + sha256 cellar: :any, sonoma: "c68a4e4aeb4d87ac9faec8349222751f49a4e570c15d5b1c05e93d2ca5cc57a7" + sha256 cellar: :any, ventura: "d342df82217c3d5d6e160bd5b5c6eb1301854bfeb7d2691bb250c04e3a634389" + sha256 arm64_linux: "5c4f15314c93fa0ab0f858bae329925eb9fabc5eeb75b390b34100f91208d6ee" + sha256 x86_64_linux: "8e90267f0cbdcda4336951766f6bce92b4b694031c98b19597ee146546bf9781" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "icu4c@77" + depends_on "xapian" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "python" => :build + + # Apply commit from open PR to fix build with ICU 76+ + # PR ref: https://github.com/openzim/libzim/pull/936 + patch do + url "https://github.com/openzim/libzim/commit/48c8c3fa7ad7a54f6df9a5be2676d189bbaf0022.patch?full_index=1" + sha256 "f88890feab66aec7861b4eaab58202d6417c7c4d3692fe56f0e4b5fba06c64a3" + 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 + #include + int main(void) { + zim::printVersions(); // first line should print "libzim " + return 0; + } + CPP + system ENV.cxx, "test.cpp", "-L#{lib}", "-lzim", "-o", "test", "-std=c++11" + + # Assert the first line of output contains "libzim " + assert_match "libzim #{version}", shell_output("./test") + end +end diff --git a/Formula/lib/libzip.rb b/Formula/lib/libzip.rb new file mode 100644 index 0000000000000..3bbc259334bfa --- /dev/null +++ b/Formula/lib/libzip.rb @@ -0,0 +1,58 @@ +class Libzip < Formula + desc "C library for reading, creating, and modifying zip archives" + homepage "https://libzip.org/" + url "https://libzip.org/download/libzip-1.11.3.tar.xz" + sha256 "9509d878ba788271c8b5abca9cfde1720f075335686237b7e9a9e7210fe67c1b" + license "BSD-3-Clause" + + livecheck do + url "https://libzip.org/download/" + regex(/href=.*?libzip[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "d047ed69c28d812b43092cdc11a95ebfb10c260294088b10c9e5c4013f8f7729" + sha256 cellar: :any, arm64_sonoma: "0eef871bcff5568c941e603285f699b520fb0918876ab15129047b1eae8919c1" + sha256 cellar: :any, arm64_ventura: "a5f5cad9a74903117c3168e95aed359880001176cec4012caf3347768e4653b4" + sha256 cellar: :any, sonoma: "e3a656692093ac165b0c07c830cc053dffc85f916168b584538d02c4c0205692" + sha256 cellar: :any, ventura: "6b4c562f07821355fd8c641a42da8fde595ade1c1a26ab76c218e3394e6f318f" + sha256 cellar: :any_skip_relocation, arm64_linux: "03718195387870f33ceb6951a3caa487d2325823b23034811f49b4ba0fe71521" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ce5e38e6c13fcce7176c9acd84abdd28d495a1377b1e9b1d622ebdefebe11f7" + end + + depends_on "cmake" => :build + depends_on "xz" + depends_on "zstd" + + uses_from_macos "zip" => :test + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + end + + conflicts_with "libtcod", because: "libtcod and libzip install a `zip.h` header" + + def install + args = %w[ + -DENABLE_GNUTLS=OFF + -DENABLE_MBEDTLS=OFF + -DBUILD_REGRESS=OFF + -DBUILD_EXAMPLES=OFF + ] + args << "-DENABLE_OPENSSL=OFF" if OS.mac? # Use CommonCrypto instead. + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + touch "file1" + system "zip", "file1.zip", "file1" + touch "file2" + system "zip", "file2.zip", "file1", "file2" + assert_match(/\+.*file2/, shell_output("#{bin}/zipcmp -v file1.zip file2.zip", 1)) + end +end diff --git a/Formula/lib/libzzip.rb b/Formula/lib/libzzip.rb new file mode 100644 index 0000000000000..63324fd939696 --- /dev/null +++ b/Formula/lib/libzzip.rb @@ -0,0 +1,41 @@ +class Libzzip < Formula + desc "Library providing read access on ZIP-archives" + homepage "https://github.com/gdraheim/zziplib" + url "https://github.com/gdraheim/zziplib/archive/refs/tags/v0.13.79.tar.gz" + sha256 "ed6f3017bb353b4a8f730c31a2fa065adb2d264c00d922aada48a5893eda26e4" + license any_of: ["LGPL-2.0-or-later", "MPL-1.1"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "eefa13cafc8183879063dbe16579e3343c76d27279553059dadc1b44d3933e5a" + sha256 cellar: :any, arm64_sonoma: "38d51c19c574872633dda1817897c67f3834fbf9a8bbae9ad3afeaebdeb0e171" + sha256 cellar: :any, arm64_ventura: "8cf911ef7b6fede99b360a865120e38c98ef4765e6d4ae0a74fe4a6e5f5c85aa" + sha256 cellar: :any, sonoma: "13f3a193ebbacdc641b21d5d6b20bf58ba68aaf2f42317d88887c4d382fe401c" + sha256 cellar: :any, ventura: "e87accc479f28da3af284019fcda811b7da43364395bff087e6f25055e3b8b32" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b810551e086a12ee27c7e781bfe1e6f0cbff78e5052d48d278a228c4107697f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69c15fecb424c383a12433edf9ac37aca7b6494ee33741aa55155acafdbf9cb6" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + uses_from_macos "python" => :build + uses_from_macos "zip" => :test + uses_from_macos "zlib" + + def install + args = %W[ + -DZZIPTEST=OFF + -DZZIPSDL=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/"README.txt").write("Hello World!") + system "zip", "test.zip", "README.txt" + assert_equal "Hello World!", shell_output("#{bin}/zzcat test/README.txt") + end +end diff --git a/Formula/lib3ds.rb b/Formula/lib3ds.rb deleted file mode 100644 index 80cdbc6f646d0..0000000000000 --- a/Formula/lib3ds.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Lib3ds < Formula - desc "Library for managing 3D-Studio Release 3 and 4 '.3DS' files" - homepage "https://code.google.com/archive/p/lib3ds/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/lib3ds/lib3ds-1.3.0.zip" - sha256 "f5b00c302955a67fa5fb1f2d3f2583767cdc61fdbc6fd843c0c7c9d95c5629e3" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "0a5a1fdac0c459e011ef64556c872fdc61678ccc7e06d507239d03729a0a8613" => :catalina - sha256 "61004e5169608ab48287024f45c10f9f95eebd3117edce42cf3a3bf509b93166" => :mojave - sha256 "1c6d7e3a2e800cf8fc9f6050032f28eec15bcc7c617622d58ba502c9c1afa740" => :high_sierra - sha256 "4338a4f81ccc33ad78b30f051085594606b74fe5f7773e197a36f08e0b8967ba" => :sierra - sha256 "e5810afd47dd88fb769e6ef62ef558b4ee4e643d4f5ae3fddb019257642b3375" => :el_capitan - sha256 "33f5b51953a8d4a583c7d5d6a7796ffaaccf8bf6a303fac300bfdb76dcd0ad60" => :yosemite - sha256 "3faa2167b32ab4fba667c2fc1d1131411fc3765c7e32a220b16aa62ee433d930" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - end - - test do - # create a raw emtpy 3ds file. - (testpath/"test.3ds").write("\x4d\x4d\x06\x00\x00\x00") - system bin/"3dsdump", "test.3ds" - end -end diff --git a/Formula/libaacs.rb b/Formula/libaacs.rb deleted file mode 100644 index 757d95ee7d474..0000000000000 --- a/Formula/libaacs.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Libaacs < Formula - desc "Implements the Advanced Access Content System specification" - homepage "https://www.videolan.org/developers/libaacs.html" - url "https://download.videolan.org/pub/videolan/libaacs/0.10.0/libaacs-0.10.0.tar.bz2" - sha256 "93f6b19ef71e6f73e77bd7535946c09c45330e9b42e832a63a1d6b042f6b12fe" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "e9b92a8a0921ccc76b834210a298e871148948bf01d562e1c2f307de5095b6c0" => :catalina - sha256 "4eff01204a5115988718468241e81c01ba901bcdab8f39b0e39e13ba62d9076e" => :mojave - sha256 "abf416c4f94479b975de2ffb3d156207be78ab056b020018b80d11661772d3b8" => :high_sierra - end - - head do - url "https://code.videolan.org/videolan/libaacs.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "bison" => :build - depends_on "libgcrypt" - - def install - system "./bootstrap" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include "libaacs/aacs.h" - #include - - int main() { - int major_v = 0, minor_v = 0, micro_v = 0; - - aacs_get_version(&major_v, &minor_v, µ_v); - - printf("%d.%d.%d", major_v, minor_v, micro_v); - return(0); - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-laacs", - "-o", "test" - system "./test" - end -end diff --git a/Formula/libagg.rb b/Formula/libagg.rb deleted file mode 100644 index f1f7c706c68d4..0000000000000 --- a/Formula/libagg.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Libagg < Formula - desc "High fidelity 2D graphics library for C++" - homepage "https://antigrain.com/" - # Canonical URL inaccessible: https://antigrain.com/agg-2.5.tar.gz - url "https://ftp.osuosl.org/pub/blfs/8.0/a/agg-2.5.tar.gz" - sha256 "ab1edc54cc32ba51a62ff120d501eecd55fceeedf869b9354e7e13812289911f" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "1ef56d71cf0fc0f5780395069105c7151f02a2264f2469ca3ae824c6366f45a6" => :catalina - sha256 "97e0bd763cda63b61cefba2e46048275dda4d03cdaed251be5ebd0b7369b8e38" => :mojave - sha256 "de1daeb1b324b1797f46ff6e6799498019de9256b4e09a128cf686e2572f6f60" => :high_sierra - sha256 "872f49f0fd96ee65dca4bedba3e82c4fcf0e0b0c45de15afc82a9e70e0f0623c" => :sierra - sha256 "5b9ab7a9ef2f4075bd55561f0fda99c7203a70020288747ebf90cfc1b2ee626b" => :el_capitan - sha256 "9d3da78ab9824db755cbfeb9e6596527db1ace71525cb079465b1a9fb1c00417" => :yosemite - sha256 "9704ec5652775cbab7af51e48eb42b19cb55f7cdb5894e6e1abac3e478581e2a" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "sdl" - - # Fix build with clang; last release was in 2006 - patch :DATA - - def install - # AM_C_PROTOTYPES was removed in automake 1.12, as it's only needed for - # pre-ANSI compilers - inreplace "configure.in", "AM_C_PROTOTYPES", "" - inreplace "autogen.sh", "libtoolize", "glibtoolize" - - system "sh", "autogen.sh", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-platform", # Causes undefined symbols - "--disable-ctrl", # No need to run these during configuration - "--disable-examples", - "--disable-sdltest" - system "make", "install" - end -end - -__END__ -diff --git a/include/agg_renderer_outline_aa.h b/include/agg_renderer_outline_aa.h -index ce25a2e..9a12d35 100644 ---- a/include/agg_renderer_outline_aa.h -+++ b/include/agg_renderer_outline_aa.h -@@ -1375,7 +1375,7 @@ namespace agg - //--------------------------------------------------------------------- - void profile(const line_profile_aa& prof) { m_profile = &prof; } - const line_profile_aa& profile() const { return *m_profile; } -- line_profile_aa& profile() { return *m_profile; } -+ const line_profile_aa& profile() { return *m_profile; } - - //--------------------------------------------------------------------- - int subpixel_width() const { return m_profile->subpixel_width(); } diff --git a/Formula/libantlr3c.rb b/Formula/libantlr3c.rb deleted file mode 100644 index 01eb87b9d76e5..0000000000000 --- a/Formula/libantlr3c.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Libantlr3c < Formula - desc "ANTLRv3 parsing library for C" - homepage "https://www.antlr3.org/" - url "https://www.antlr3.org/download/C/libantlr3c-3.4.tar.gz" - sha256 "ca914a97f1a2d2f2c8e1fca12d3df65310ff0286d35c48b7ae5f11dcc8b2eb52" - revision 1 - - bottle do - cellar :any - sha256 "53bc5810ecd6cc4be26da750839d53981ebba6ad931e13005661e599cfd69501" => :catalina - sha256 "c4df9f53203a7e21abc1fb22bf74256017f646e9177606c7da6c222db16dd3cb" => :mojave - sha256 "2de7942e4bc89830c0d92bfda55e60a4ad82723430bcc7477abb5d1b1ade7f86" => :high_sierra - sha256 "a5e779c431e16bdaab829c774468ce11f8e7ea359412800e294433b011704541" => :sierra - sha256 "fea1cde8ae732cdbbffa6a6d329239b1da067d2b69424d53178e60309748c403" => :el_capitan - sha256 "8026d876b20980138c076cb4008f358deb858204b6399c436cf45e93594274e7" => :yosemite - sha256 "010c3866a3c183b10dec76f845ce826a26a5a384074f8c56f41abeb9e4aa6e77" => :mavericks - end - - def install - args = ["--disable-dependency-tracking", - "--disable-antlrdebug", - "--prefix=#{prefix}", - "--enable-64bit"] - system "./configure", *args - - inreplace "Makefile" do |s| - cflags = s.get_make_var "CFLAGS" - cflags = cflags << " -fexceptions" - s.change_make_var! "CFLAGS", cflags - end - - system "make", "install" - end - - test do - (testpath/"hello.c").write <<~EOS - #include - int main() { - if (0) { - antlr3GenericSetupStream(NULL); - } - return 0; - } - EOS - system ENV.cc, "hello.c", "-L#{lib}", "-lantlr3c", "-o", "hello", "-O0" - system testpath/"hello" - end -end diff --git a/Formula/libao.rb b/Formula/libao.rb deleted file mode 100644 index 4f73202b88f23..0000000000000 --- a/Formula/libao.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Libao < Formula - desc "Cross-platform Audio Library" - homepage "https://www.xiph.org/ao/" - url "https://github.com/xiph/libao/archive/1.2.2.tar.gz" - sha256 "df8a6d0e238feeccb26a783e778716fb41a801536fe7b6fce068e313c0e2bf4d" - license "GPL-2.0" - head "https://gitlab.xiph.org/xiph/libao.git" - - bottle do - rebuild 2 - sha256 "703bfcae17a364ad0e526d5556b3583d1864c6db4c52ba85ef64dc0600039372" => :catalina - sha256 "932b3a41565e678489471dae66b29fea1ca2de6013c2559f9c34cc5e9bd5a33f" => :mojave - sha256 "d7144edd6dc64b987d9a9d584799fe20a76ed92f2b1b18c074a6846926f23169" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - def install - ENV["AUTOMAKE_FLAGS"] = "--include-deps" - system "./autogen.sh" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --enable-static - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - ao_initialize(); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lao", "-o", "test" - system "./test" - end -end diff --git a/Formula/libarchive.rb b/Formula/libarchive.rb deleted file mode 100644 index eb2e7d4e697cd..0000000000000 --- a/Formula/libarchive.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Libarchive < Formula - desc "Multi-format archive and compression library" - homepage "https://www.libarchive.org/" - url "https://www.libarchive.org/downloads/libarchive-3.4.3.tar.xz" - sha256 "0bfc3fd40491768a88af8d9b86bf04a9e95b6d41a94f9292dbc0ec342288c05f" - - bottle do - cellar :any - sha256 "ec29541614dd1acd7189e69c6e6a689f959d25e1fb52acf06e52b9a4c38166c4" => :catalina - sha256 "5cdfab0da88b4a1141cd2f512ad2815f69191bf7d9adc49e0cb9c814af286688" => :mojave - sha256 "df697f70e6100533afeffb949ec2c22c7fcdf23821a2a76c460977cecfbb01b8" => :high_sierra - end - - keg_only :provided_by_macos - - depends_on "libb2" - depends_on "lz4" - depends_on "xz" - depends_on "zstd" - - uses_from_macos "bzip2" - uses_from_macos "expat" - uses_from_macos "zlib" - - def install - system "./configure", - "--prefix=#{prefix}", - "--without-lzo2", # Use lzop binary instead of lzo2 due to GPL - "--without-nettle", # xar hashing option but GPLv3 - "--without-xml2", # xar hashing option but tricky dependencies - "--without-openssl", # mtree hashing now possible without OpenSSL - "--with-expat" # best xar hashing option - - system "make", "install" - - # Just as apple does it. - ln_s bin/"bsdtar", bin/"tar" - ln_s bin/"bsdcpio", bin/"cpio" - ln_s man1/"bsdtar.1", man1/"tar.1" - ln_s man1/"bsdcpio.1", man1/"cpio.1" - end - - test do - (testpath/"test").write("test") - system bin/"bsdtar", "-czvf", "test.tar.gz", "test" - assert_match /test/, shell_output("#{bin}/bsdtar -xOzf test.tar.gz") - end -end diff --git a/Formula/libart.rb b/Formula/libart.rb deleted file mode 100644 index 1d456392a6376..0000000000000 --- a/Formula/libart.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Libart < Formula - desc "Library for high-performance 2D graphics" - homepage "https://people.gnome.org/~mathieu/libart/libart.html" - url "https://download.gnome.org/sources/libart_lgpl/2.3/libart_lgpl-2.3.21.tar.bz2" - sha256 "fdc11e74c10fc9ffe4188537e2b370c0abacca7d89021d4d303afdf7fd7476fa" - - bottle do - cellar :any - sha256 "54ca46ebc37bba1fdc39e8b28c166202e7d488d93cc5b4acfb042a14adec84f9" => :catalina - sha256 "5fc8b240a975efcb5bd3992afd4d01c0a393a306a4a66192cb9a10e580bcf4d3" => :mojave - sha256 "c5ae59f4955fd1b4e3c49976b06609d56c5079d2b0f6e0675b356b1eb09181cd" => :high_sierra - sha256 "e9e14623ba0284a89dd09c7be72393619582c5d0489891cd1f654b6c26b0fabc" => :sierra - sha256 "18fb7a842650151fef102efadefa52aa12dc3f597ace95b8e25efe6518a65d2e" => :el_capitan - sha256 "006a9bf5e40ea99cdb4a10b7a2a2ac6a249f511254be1954a937dac0e50a6f0d" => :yosemite - sha256 "276eafd432499ab988a21d9e87104d744e82cf1adf4cc55d47639b1f72ab410a" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libass.rb b/Formula/libass.rb deleted file mode 100644 index 9dccfb598ef75..0000000000000 --- a/Formula/libass.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Libass < Formula - desc "Subtitle renderer for the ASS/SSA subtitle format" - homepage "https://github.com/libass/libass" - url "https://github.com/libass/libass/releases/download/0.14.0/libass-0.14.0.tar.xz" - sha256 "881f2382af48aead75b7a0e02e65d88c5ebd369fe46bc77d9270a94aa8fd38a2" - license "ISC" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "31612c258eb45354a212ec42c240676b0b297f6a7ef7693b666f3986c14c3c26" => :catalina - sha256 "adf25e0a4a61f098662952861b1103493f2be98a14975b1cdd27c8aab3a9603a" => :mojave - sha256 "d3a3e4c2ff26d2a10991134bca875ecafcff6bc8abb193f3c78cb8c0cd57c779" => :high_sierra - sha256 "028e53840dcad7fa8291fddacd46be8276578a3fa8c058b04975cf56a802101d" => :sierra - end - - head do - url "https://github.com/libass/libass.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "nasm" => :build - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "fribidi" - depends_on "harfbuzz" - - on_linux do - depends_on "fontconfig" - end - - def install - system "autoreconf", "-i" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-fontconfig" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "ass/ass.h" - int main() { - ASS_Library *library; - ASS_Renderer *renderer; - library = ass_library_init(); - if (library) { - renderer = ass_renderer_init(library); - if (renderer) { - ass_renderer_done(renderer); - ass_library_done(library); - return 0; - } - else { - ass_library_done(library); - return 1; - } - } - else { - return 1; - } - } - EOS - system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lass", "-o", "test" - system "./test" - end -end diff --git a/Formula/libassuan.rb b/Formula/libassuan.rb deleted file mode 100644 index 2467f87d1bf02..0000000000000 --- a/Formula/libassuan.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Libassuan < Formula - desc "Assuan IPC Library" - homepage "https://www.gnupg.org/related_software/libassuan/" - url "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.3.tar.bz2" - mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libassuan/libassuan-2.5.3.tar.bz2" - sha256 "91bcb0403866b4e7c4bc1cc52ed4c364a9b5414b3994f718c70303f7f765e702" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "fdb97ce031f3a56e224954c61e8e9f52698c04647ca0251f8ffe54ae27610a23" => :catalina - sha256 "58154be6004de3e0f731f7b3d7e46060b1f2af831ba81cc15c8b4d8a87dda784" => :mojave - sha256 "e6f59decc3a0dbabee93e47facd44fde55397865ced49a7c9a2974e49a38ea3e" => :high_sierra - sha256 "ce29b5468c93eeb9a03ee82272aa89695579c275d00044e21043086a57dd93ec" => :sierra - end - - depends_on "libgpg-error" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-static" - system "make", "install" - - # avoid triggering mandatory rebuilds of software that hard-codes this path - inreplace bin/"libassuan-config", prefix, opt_prefix - end - - test do - system bin/"libassuan-config", "--version" - end -end diff --git a/Formula/libatomic_ops.rb b/Formula/libatomic_ops.rb deleted file mode 100644 index f2143e1427d73..0000000000000 --- a/Formula/libatomic_ops.rb +++ /dev/null @@ -1,22 +0,0 @@ -class LibatomicOps < Formula - desc "Implementations for atomic memory update operations" - homepage "https://github.com/ivmai/libatomic_ops/" - url "https://github.com/ivmai/libatomic_ops/releases/download/v7.6.10/libatomic_ops-7.6.10.tar.gz" - sha256 "587edf60817f56daf1e1ab38a4b3c729b8e846ff67b4f62a6157183708f099af" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "d102cc71b5959eac9f8ecbc5029801ea2a544ad5b6602c586e5d5d33c67ebd55" => :catalina - sha256 "b509d8669c5336775b0462c3e1464419d083bccc0bf43f8dab8fa3eb0ac44405" => :mojave - sha256 "2e3053c22101fd8baf693ca404f258763b15e77372b5293e999f8bbc8b032522" => :high_sierra - sha256 "d94aa0351ce2de312d0b31a64d48059473a170d9704968378cf121ad097d7d9b" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end -end diff --git a/Formula/libav.rb b/Formula/libav.rb deleted file mode 100644 index d2bd1f759a3e4..0000000000000 --- a/Formula/libav.rb +++ /dev/null @@ -1,141 +0,0 @@ -class Libav < Formula - desc "Audio and video processing tools" - homepage "https://libav.org/" - url "https://libav.org/releases/libav-12.3.tar.xz" - sha256 "6893cdbd7bc4b62f5d8fd6593c8e0a62babb53e323fbc7124db3658d04ab443b" - revision 4 - head "https://git.libav.org/libav.git" - - bottle do - cellar :any - sha256 "c3ea574e97fceb61b05289b0e501d122ca1df7333b6ae888cef493ee43fa2f26" => :catalina - sha256 "1aadfef9b75e102360d0ab1cca31e27310f67d5e045fe0114337d97c81826d48" => :mojave - sha256 "da5b0479598b5da057b95edd1833dd5f8138c6ffb1a491dc834075a21593cd4f" => :high_sierra - end - - depends_on "pkg-config" => :build - # manpages won't be built without texi2html - depends_on "texi2html" => :build - depends_on "yasm" => :build - - depends_on "faac" - depends_on "fdk-aac" - depends_on "freetype" - depends_on "lame" - depends_on "libvorbis" - depends_on "libvpx" - depends_on "opus" - depends_on "sdl" - depends_on "theora" - depends_on "x264" - depends_on "xvid" - - # https://bugzilla.libav.org/show_bug.cgi?id=1033 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/b6e917c/libav/Check-for--no_weak_imports-in-ldflags-on-macOS.patch" - sha256 "986d748ba2c7c83319a59d76fbb0dca22dcd51f0252b3d1f3b80dbda2cf79742" - end - - # Upstream patch for x264 version >= 153, should be included in libav > 12.3 - patch do - url "https://github.com/libav/libav/commit/c6558e8840fbb2386bf8742e4d68dd6e067d262e.patch?full_index=1" - sha256 "0fcfe69274cccbca33825414f526300a1fbbf0c464ac32577e1cc137b8618820" - end - - # Upstream patch to fix building with fdk-aac 2 - patch do - url "https://github.com/libav/libav/commit/141c960e21d2860e354f9b90df136184dd00a9a8.patch?full_index=1" - sha256 "7081183fed875f71d53cce1e71f6b58fb5d5eee9f30462d35f9367ec2210507b" - end - - # Fix for image formats removed from libvpx - # https://github.com/shirkdog/hardenedbsd-ports/blob/HEAD/multimedia/libav/files/patch-libavcodec_libvpx.c - patch :DATA - - def install - args = %W[ - --disable-debug - --disable-shared - --disable-indev=jack - --prefix=#{prefix} - --cc=#{ENV.cc} - --host-cflags=#{ENV.cflags} - --host-ldflags=#{ENV.ldflags} - --enable-gpl - --enable-libfaac - --enable-libfdk-aac - --enable-libfreetype - --enable-libmp3lame - --enable-libopus - --enable-libvorbis - --enable-libvpx - --enable-libx264 - --enable-libxvid - --enable-nonfree - --enable-vda - --enable-version3 - --enable-libtheora - ] - - system "./configure", *args - system "make" - - bin.install "avconv", "avprobe", "avplay" - man1.install "doc/avconv.1", "doc/avprobe.1", "doc/avplay.1" - end - - test do - # Create an example mp4 file - mp4out = testpath/"video.mp4" - system bin/"avconv", "-y", "-filter_complex", "testsrc=rate=1:duration=1", mp4out - assert_predicate mp4out, :exist? - end -end - -__END__ ---- a/libavcodec/libvpx.c -+++ b/libavcodec/libvpx.c -@@ -25,6 +25,7 @@ - enum AVPixelFormat ff_vpx_imgfmt_to_pixfmt(vpx_img_fmt_t img) - { - switch (img) { -+#if VPX_IMAGE_ABI_VERSION < 5 - case VPX_IMG_FMT_RGB24: return AV_PIX_FMT_RGB24; - case VPX_IMG_FMT_RGB565: return AV_PIX_FMT_RGB565BE; - case VPX_IMG_FMT_RGB555: return AV_PIX_FMT_RGB555BE; -@@ -36,10 +37,13 @@ enum AVPixelFormat ff_vpx_imgfmt_to_pixfmt(vpx_img_fmt - case VPX_IMG_FMT_ARGB_LE: return AV_PIX_FMT_BGRA; - case VPX_IMG_FMT_RGB565_LE: return AV_PIX_FMT_RGB565LE; - case VPX_IMG_FMT_RGB555_LE: return AV_PIX_FMT_RGB555LE; -+#endif - case VPX_IMG_FMT_I420: return AV_PIX_FMT_YUV420P; - case VPX_IMG_FMT_I422: return AV_PIX_FMT_YUV422P; - case VPX_IMG_FMT_I444: return AV_PIX_FMT_YUV444P; -+#if VPX_IMAGE_ABI_VERSION < 5 - case VPX_IMG_FMT_444A: return AV_PIX_FMT_YUVA444P; -+#endif - #if VPX_IMAGE_ABI_VERSION >= 3 - case VPX_IMG_FMT_I440: return AV_PIX_FMT_YUV440P; - case VPX_IMG_FMT_I42016: return AV_PIX_FMT_YUV420P16BE; -@@ -53,6 +57,7 @@ enum AVPixelFormat ff_vpx_imgfmt_to_pixfmt(vpx_img_fmt - vpx_img_fmt_t ff_vpx_pixfmt_to_imgfmt(enum AVPixelFormat pix) - { - switch (pix) { -+#if VPX_IMAGE_ABI_VERSION < 5 - case AV_PIX_FMT_RGB24: return VPX_IMG_FMT_RGB24; - case AV_PIX_FMT_RGB565BE: return VPX_IMG_FMT_RGB565; - case AV_PIX_FMT_RGB555BE: return VPX_IMG_FMT_RGB555; -@@ -64,10 +69,13 @@ vpx_img_fmt_t ff_vpx_pixfmt_to_imgfmt(enum AVPixelForm - case AV_PIX_FMT_BGRA: return VPX_IMG_FMT_ARGB_LE; - case AV_PIX_FMT_RGB565LE: return VPX_IMG_FMT_RGB565_LE; - case AV_PIX_FMT_RGB555LE: return VPX_IMG_FMT_RGB555_LE; -+#endif - case AV_PIX_FMT_YUV420P: return VPX_IMG_FMT_I420; - case AV_PIX_FMT_YUV422P: return VPX_IMG_FMT_I422; - case AV_PIX_FMT_YUV444P: return VPX_IMG_FMT_I444; -+#if VPX_IMAGE_ABI_VERSION < 5 - case AV_PIX_FMT_YUVA444P: return VPX_IMG_FMT_444A; -+#endif - #if VPX_IMAGE_ABI_VERSION >= 3 - case AV_PIX_FMT_YUV440P: return VPX_IMG_FMT_I440; - case AV_PIX_FMT_YUV420P16BE: return VPX_IMG_FMT_I42016; diff --git a/Formula/libb2.rb b/Formula/libb2.rb deleted file mode 100644 index ccb7c53c0701b..0000000000000 --- a/Formula/libb2.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Libb2 < Formula - desc "Secure hashing function" - homepage "https://blake2.net/" - url "https://github.com/BLAKE2/libb2/releases/download/v0.98.1/libb2-0.98.1.tar.gz" - sha256 "53626fddce753c454a3fea581cbbc7fe9bbcf0bc70416d48fdbbf5d87ef6c72e" - license "CC0-1.0" - - bottle do - cellar :any - sha256 "fb9f331b6c556a09558cf8098c3934f3f9196c3076e2511fd6ed816439fb8936" => :catalina - sha256 "bbd333a0a89e6a38445aba0170b14b516edad300c30d6f4239b66a130c446959" => :mojave - sha256 "6e9156db268cea377f7050c4e9ebf1ee3065fef76a11c40e03e700a23b1bef36" => :high_sierra - sha256 "9b909b878c01b5bb3284ba4d0937352e0df54b27e491fa796dfb6d3e67f989a1" => :sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--enable-fat", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"blake2test.c").write <<~EOS - #include - #include - #include - - int main(void) { - uint8_t out[64]; - uint8_t expected[64] = - { - 0xb2, 0x02, 0xb4, 0x77, 0xa7, 0x97, 0xe9, 0x84, 0xe6, 0xa2, 0xb9, 0x76, - 0xca, 0x4c, 0xb7, 0xd3, 0x94, 0x40, 0x04, 0xb3, 0xef, 0x6c, 0xde, 0x80, - 0x34, 0x1c, 0x78, 0x53, 0xa2, 0xdd, 0x7e, 0x2f, 0x9e, 0x08, 0xcd, 0xa6, - 0xd7, 0x37, 0x28, 0x12, 0xcf, 0x75, 0xe8, 0xc7, 0x74, 0x1f, 0xb6, 0x56, - 0xce, 0xc3, 0xa1, 0x19, 0x77, 0x2e, 0x2e, 0x71, 0x5c, 0xeb, 0xc7, 0x64, - 0x33, 0xfa, 0xfd, 0x4d - }; - int res = blake2b(out, "blake2", "blake2", 64, 6, 6); - if (res == 0) { - if (memcmp(out, expected, 64) == 0) { - return 0; - } else { - return 1; - } - } else { - return 1; - } - } - EOS - system ENV.cc, "blake2test.c", "-L#{lib}", "-lb2", "-o", "b2test" - system "./b2test" - end -end diff --git a/Formula/libb64.rb b/Formula/libb64.rb deleted file mode 100644 index 3c32769044bc8..0000000000000 --- a/Formula/libb64.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Libb64 < Formula - desc "Base64 encoding/decoding library" - homepage "https://libb64.sourceforge.io/" - url "https://downloads.sourceforge.net/project/libb64/libb64/libb64/libb64-1.2.1.zip" - sha256 "20106f0ba95cfd9c35a13c71206643e3fb3e46512df3e2efb2fdbf87116314b2" - - bottle do - cellar :any_skip_relocation - sha256 "ee788cea9a073c456398f86661ea27e092c3d327ea8b0792643ed7d38bd402d0" => :catalina - sha256 "7a53661bc0fe2bea875f0a14cc66b6352694f1e797e4506ad2c8ef35dfcc2169" => :mojave - sha256 "3b5266e99b78c81ae7ec00c19aa7e9d3fad7f47611fc1332710bd8e03f48da55" => :high_sierra - end - - def install - system "make", "all_src" - include.install "include/b64" - lib.install "src/libb64.a" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() - { - base64_encodestate B64STATE; - base64_init_encodestate(&B64STATE); - char buf[32]; - int c = base64_encode_block("\x01\x02\x03\x04", 4, buf, &B64STATE); - c += base64_encode_blockend(buf+c, &B64STATE); - if (memcmp(buf,"AQIDBA==",8)) return(-1); - return 0; - } - EOS - system ENV.cc, "test.c", "-L/usr/local/lib", "-lb64", "-o", "test" - system "./test" - end -end diff --git a/Formula/libbdplus.rb b/Formula/libbdplus.rb deleted file mode 100644 index dbf623000349e..0000000000000 --- a/Formula/libbdplus.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Libbdplus < Formula - desc "Implements the BD+ System Specifications" - homepage "https://www.videolan.org/developers/libbdplus.html" - url "https://download.videolan.org/pub/videolan/libbdplus/0.1.2/libbdplus-0.1.2.tar.bz2" - mirror "https://ftp.osuosl.org/pub/videolan/libbdplus/0.1.2/libbdplus-0.1.2.tar.bz2" - sha256 "a631cae3cd34bf054db040b64edbfc8430936e762eb433b1789358ac3d3dc80a" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "0f6679a9e46eebf5d7a37a7b09d77b57512774fb3766eb4a359a60de8997a0e0" => :catalina - sha256 "d8f4b53ec0ea12bbc02b2962e94dfe5df98ef55005f10209f4fd40213a80f601" => :mojave - sha256 "478e405b0f9687edcea3f651f4ec922a1bd12c12476c3aa14d1a35d0bb0362bb" => :high_sierra - sha256 "8205ed5218393f7aa7f2035f089e91a417f13d73f4b7e3d46f3afc5073ce7e37" => :sierra - sha256 "7136cdf433318efb9691d43d078eb20e9647f2ae4999b42cf791736d95047a81" => :el_capitan - sha256 "13f271c0bb73d496cda7314d6665478c19193f0eb3b9b7a9fbc1eb4a957894c9" => :yosemite - sha256 "e2189073d60ed520ed852355aebf1a5137fec5bead346ebc68f2b202d495db36" => :mavericks - end - - head do - url "https://code.videolan.org/videolan/libbdplus.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "libgcrypt" - - def install - system "./bootstrap" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - int major = -1; - int minor = -1; - int micro = -1; - bdplus_get_version(&major, &minor, µ); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lbdplus", "-o", "test" - system "./test" - end -end diff --git a/Formula/libbi.rb b/Formula/libbi.rb deleted file mode 100644 index 1f118636747be..0000000000000 --- a/Formula/libbi.rb +++ /dev/null @@ -1,145 +0,0 @@ -class Libbi < Formula - desc "Bayesian state-space modelling on parallel computer hardware" - homepage "https://libbi.org/" - url "https://github.com/lawmurray/LibBi/archive/1.4.5.tar.gz" - sha256 "af2b6d30e1502f99a3950d63ceaf7d7275a236f4d81eff337121c24fbb802fbe" - revision 2 - head "https://github.com/lawmurray/LibBi.git" - - bottle do - cellar :any_skip_relocation - sha256 "8a5e07818b7ab072b4ce227a8e9c6fbfe0a944376fe0e7ae718757f552daf6cb" => :catalina - sha256 "1ccf102c4139efb50411136b936637ca4f353c64660f945044c4056dfaabec5e" => :mojave - sha256 "b0336adbd5aa3122599d729ad9472ec368d74d2a891ce0aee0348e4c5768c162" => :high_sierra - end - - depends_on "automake" - depends_on "boost" - depends_on "gsl" - depends_on "netcdf" - depends_on "qrupdate" - - uses_from_macos "perl" - - resource "Test::Simple" do - url "https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302133.tar.gz" - sha256 "02bc2b4ec299886efcc29148308c9afb64e0f2c2acdeaa2dee33c3adfe6f96e2" - end - - resource "Getopt::ArgvFile" do - url "https://cpan.metacpan.org/authors/id/J/JS/JSTENZEL/Getopt-ArgvFile-1.11.tar.gz" - sha256 "3709aa513ce6fd71d1a55a02e34d2f090017d5350a9bd447005653c9b0835b22" - end - - resource "Carp::Assert" do - url "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Carp-Assert-0.21.tar.gz" - sha256 "924f8e2b4e3cb3d8b26246b5f9c07cdaa4b8800cef345fa0811d72930d73a54e" - end - - resource "File::Slurp" do - url "https://cpan.metacpan.org/authors/id/U/UR/URI/File-Slurp-9999.19.tar.gz" - sha256 "ce29ebe995097ebd6e9bc03284714cdfa0c46dc94f6b14a56980747ea3253643" - end - - resource "Parse::Yapp" do - url "https://cpan.metacpan.org/authors/id/W/WB/WBRASWELL/Parse-Yapp-1.21.tar.gz" - sha256 "3810e998308fba2e0f4f26043035032b027ce51ce5c8a52a8b8e340ca65f13e5" - end - - resource "Parse::Template" do - url "https://cpan.metacpan.org/authors/id/P/PS/PSCUST/ParseTemplate-3.08.tar.gz" - sha256 "3c7734f53999de8351a77cb09631d7a4a0482b6f54bca63d69d5a4eec8686d51" - end - - resource "Parse::Lex" do - url "https://cpan.metacpan.org/authors/id/P/PS/PSCUST/ParseLex-2.21.tar.gz" - sha256 "f55f0a7d1e2a6b806a47840c81c16d505c5c76765cb156e5f5fd703159a4492d" - 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 "Math::Symbolic" do - url "https://cpan.metacpan.org/authors/id/S/SM/SMUELLER/Math-Symbolic-0.612.tar.gz" - sha256 "a9af979956c4c28683c535b5e5da3cde198c0cac2a11b3c9a129da218b3b9c08" - 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 "File::Remove" do - url "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/File-Remove-1.57.tar.gz" - sha256 "b3becd60165c38786d18285f770b8b06ebffe91797d8c00cc4730614382501ad" - end - - resource "inc::Module::Install::DSL" do - url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/Module-Install-1.19.tar.gz" - sha256 "1a53a78ddf3ab9e3c03fc5e354b436319a944cba4281baf0b904fa932a13011b" - 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.104.tar.gz" - sha256 "07b628efcdf902d6a32e6a8e084497e8593d125c03ad12ef5cc03c87c7841caf" - end - - resource "Template" do - url "https://cpan.metacpan.org/authors/id/A/AB/ABW/Template-Toolkit-2.27.tar.gz" - sha256 "1311a403264d0134c585af0309ff2a9d5074b8ece23ece5660d31ec96bf2c6dc" - end - - resource "Graph" do - url "https://cpan.metacpan.org/authors/id/J/JH/JHI/Graph-0.9704.tar.gz" - sha256 "325e8eb07be2d09a909e450c13d3a42dcb2a2e96cc3ac780fe4572a0d80b2a25" - end - - resource "thrust" do - url "https://github.com/thrust/thrust/archive/1.8.2.tar.gz" - sha256 "83bc9e7b769daa04324c986eeaf48fcb53c2dda26bcc77cb3c07f4b1c359feb8" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - resources.each do |r| - r.stage do - next if r.name == "thrust" - - # need to set TT_ACCEPT=y for Template library for non-interactive install - perl_flags = "TT_ACCEPT=y" if r.name == "Template" - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", perl_flags - system "make" - system "make", "install" - end - end - - resource("thrust").stage { (include/"thrust").install Dir["thrust/*"] } - - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", "INSTALLSITESCRIPT=#{bin}" - - # Disable dynamic selection of perl which may cause segfault when an - # incompatible perl is picked up. - # See, e.g., https://github.com/Homebrew/homebrew-core/issues/4936 - inreplace "script/libbi", "#!/usr/bin/env perl", "#!/usr/bin/perl" - - system "make" - system "make", "install" - - pkgshare.install "Test.bi", "test.conf" - bin.env_script_all_files(libexec+"bin", :PERL5LIB => ENV["PERL5LIB"]) - end - - test do - cp Dir[pkgshare/"Test.bi", pkgshare/"test.conf"], testpath - system "#{bin}/libbi", "sample", "@test.conf" - assert_predicate testpath/"test.nc", :exist? - end -end diff --git a/Formula/libbind.rb b/Formula/libbind.rb deleted file mode 100644 index 768a01e3e5239..0000000000000 --- a/Formula/libbind.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Libbind < Formula - desc "Original resolver library from ISC" - homepage "https://www.isc.org/software/libbind" - url "https://ftp.isc.org/isc/libbind/6.0/libbind-6.0.tar.gz" - sha256 "b98b6aa6e7c403f5a6522ffb68325785a87ea8b13377ada8ba87953a3e8cb29d" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "d00556807ac67001b11a1d9c4084a679c425746b3f8637e430f29d13e760a0a9" => :catalina - sha256 "504319b451c5cfa27ffc46ffdae91ba7a75b3fce9d78c9a02c3a1214d377b1b2" => :mojave - sha256 "4cbde1938720903104389cb24f164f5fc3791953984888d62e0831a695dfeb2d" => :high_sierra - sha256 "b5a4bc4b247b5cce0c637bb96335c5df27e2210c40cc89e19f9957f5aef1cbdb" => :sierra - sha256 "d0a71d129904ac0529c6f8e789a41307caaeb0e6d9f33f30f23f4b3dbc61456d" => :el_capitan - sha256 "c2eaf992dc37ce98d5936ba7e086c30a5da242bfe834e593dfb40d7d3e546923" => :yosemite - sha256 "f59cf59e14f6192c962592a4411391413d929c8dfff81fdd8b4a82ce7c0d3f02" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" # You need to call make, before you can call make install - system "make", "install" - end -end diff --git a/Formula/libbinio.rb b/Formula/libbinio.rb deleted file mode 100644 index b62b87e768955..0000000000000 --- a/Formula/libbinio.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Libbinio < Formula - desc "Binary I/O stream class library" - homepage "https://libbinio.sourceforge.io/" - url "https://downloads.sourceforge.net/project/libbinio/libbinio/1.4/libbinio-1.4.tar.bz2" - sha256 "4a32d3154517510a3fe4f2dc95e378dcc818a4a921fc0cb992bdc0d416a77e75" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "9557b784c8c13985e1cbdf62fec7b49fd85766c82c2a3b01a4ce4596f36249ef" => :catalina - sha256 "09c61e01936f68d4f64648fa195150c8c7d82e0fa636e9f159687a293d5feab4" => :mojave - sha256 "176f0a11a333240770e59ada053e1656081a324debb64b96afa942a86e18f28a" => :high_sierra - sha256 "beba76f7c3b6c54228c8972cfa01d1cb06d309d870f23ce6aad457c23e11742f" => :sierra - sha256 "a0e373df44eee915d0f9259fb8627df92bfe3db8547bf66a9918f5c398342709" => :el_capitan - sha256 "99e8bdd47cde67290e0854c8854c0eef32a995ff10cbf1f991ca37834d60e0a4" => :yosemite - sha256 "e4a0b854ab3f5e98362f19af214b909205240e8a0358b88b2adf3a68a0e875f6" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libbitcoin-blockchain.rb b/Formula/libbitcoin-blockchain.rb deleted file mode 100644 index 0ce58b3a2d460..0000000000000 --- a/Formula/libbitcoin-blockchain.rb +++ /dev/null @@ -1,52 +0,0 @@ -class LibbitcoinBlockchain < Formula - desc "Bitcoin Blockchain Library" - homepage "https://github.com/libbitcoin/libbitcoin-blockchain" - url "https://github.com/libbitcoin/libbitcoin-blockchain/archive/v3.6.0.tar.gz" - sha256 "18c52ebda4148ab9e6dec62ee8c2d7826b60868f82710f21e40ff0131bc659e0" - revision 1 - - bottle do - cellar :any - sha256 "1344ad1627d0fce38f0a7d9ef934e99567581aec8d805841fe99faafa178192f" => :catalina - sha256 "ef3b880069ae513b2cc91e702f7e28920acd9f24b0264049138037d692a83b6a" => :mojave - sha256 "0ab52ee6e7c204c4948468e551b00042cf4a3118ddc7f6eb20f71999b3be9861" => :high_sierra - sha256 "a399e9b0540b8a41176d852f06222f6b6e831def5618fe4cbd2555c8f2708b32" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libbitcoin-consensus" - depends_on "libbitcoin-database" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - static const auto default_block_hash = libbitcoin::hash_literal("14508459b221041eab257d2baaa7459775ba748246c8403609eb708f0e57e74b"); - const auto block = std::make_shared(); - libbitcoin::blockchain::block_entry instance(block); - assert(instance.block() == block); - assert(instance.hash() == default_block_hash); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", - "-I#{libexec}/include", - "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin", - "-L#{lib}", "-L#{libexec}/lib", "-lbitcoin-blockchain", - "-L#{Formula["boost"].opt_lib}", "-lboost_system" - system "./test" - end -end diff --git a/Formula/libbitcoin-client.rb b/Formula/libbitcoin-client.rb deleted file mode 100644 index 840ac60a24732..0000000000000 --- a/Formula/libbitcoin-client.rb +++ /dev/null @@ -1,94 +0,0 @@ -class LibbitcoinClient < Formula - desc "Bitcoin Client Query Library" - homepage "https://github.com/libbitcoin/libbitcoin-client" - url "https://github.com/libbitcoin/libbitcoin-client/archive/v3.6.0.tar.gz" - sha256 "75969ac0a358458491b101cae784de90452883b5684199d3e3df619707802420" - revision 3 - - bottle do - cellar :any - sha256 "7d4e3e7ae395dc44b8215e0bb31111d7e233cfcd77f1a66b90e77c3477015b00" => :catalina - sha256 "8d51e6a5f4c6f8f45f91be5e7af309baad7461332f3dff4275b62d989e8d5f11" => :mojave - sha256 "131e0af686e3cbc2ea4dded7ddfff7c61993068371097189724b4a7a7b7d90d0" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libbitcoin-protocol" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - class stream_fixture - : public libbitcoin::client::stream - { - public: - libbitcoin::data_stack out; - - virtual int32_t refresh() override - { - return 0; - } - - virtual bool read(stream& stream) override - { - return false; - } - - virtual bool write(const libbitcoin::data_stack& data) override - { - out = data; - return true; - } - }; - static std::string to_string(libbitcoin::data_slice data) - { - return std::string(data.begin(), data.end()) + "\0"; - } - static void remove_optional_delimiter(libbitcoin::data_stack& stack) - { - if (!stack.empty() && stack.front().empty()) - stack.erase(stack.begin()); - } - static const uint32_t test_height = 0x12345678; - static const char address_satoshi[] = "1PeChFbhxDD9NLbU21DfD55aQBC4ZTR3tE"; - #define PROXY_TEST_SETUP \ - static const uint32_t retries = 0; \ - static const uint32_t timeout_ms = 2000; \ - static const auto on_error = [](const libbitcoin::code&) {}; \ - static const auto on_unknown = [](const std::string&) {}; \ - stream_fixture capture; \ - libbitcoin::client::proxy proxy(capture, on_unknown, timeout_ms, retries) - #define HANDLE_ROUTING_FRAMES(stack) \ - remove_optional_delimiter(stack); - int main() { - PROXY_TEST_SETUP; - - const auto on_reply = [](const libbitcoin::chain::history::list&) {}; - proxy.blockchain_fetch_history3(on_error, on_reply, libbitcoin::wallet::payment_address(address_satoshi), test_height); - - HANDLE_ROUTING_FRAMES(capture.out); - assert(capture.out.size() == 3u); - assert(to_string(capture.out[0]) == "blockchain.fetch_history3"); - assert(libbitcoin::encode_base16(capture.out[2]) == "f85beb6356d0813ddb0dbb14230a249fe931a13578563412"); - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", - "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin", - "-L#{lib}", "-lbitcoin-client", - "-L#{Formula["boost"].opt_lib}", "-lboost_system" - system "./test" - end -end diff --git a/Formula/libbitcoin-consensus.rb b/Formula/libbitcoin-consensus.rb deleted file mode 100644 index 0d3faff6db5ee..0000000000000 --- a/Formula/libbitcoin-consensus.rb +++ /dev/null @@ -1,109 +0,0 @@ -class LibbitcoinConsensus < Formula - desc "Bitcoin Consensus Library (optional)" - homepage "https://github.com/libbitcoin/libbitcoin-consensus" - url "https://github.com/libbitcoin/libbitcoin-consensus/archive/v3.6.0.tar.gz" - sha256 "a4252f40910fcb61da14cf8028bf3824125bacb0fc251491c9bb4e2818065fca" - revision 1 - - bottle do - cellar :any - sha256 "640bcb7886f6a844ac2de43be86646d4732fb9e77f0a260a58086b990bc821ae" => :catalina - sha256 "fdc8742a5540f9503709a7f1e271b11551e297e915b081ad34f3f6a4290061bb" => :mojave - sha256 "a186bf54816ed738b5f491df36f781728a84b1dd7fdf8aedd101231e7f03c20b" => :high_sierra - sha256 "3d7714fde2d05817a98a42dc42da248fac643a9e645b2251d597b4155d7dd28b" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "boost" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - resource "secp256k1" do - url "https://github.com/libbitcoin/secp256k1/archive/v0.1.0.13.tar.gz" - sha256 "9e48dbc88d0fb5646d40ea12df9375c577f0e77525e49833fb744d3c2a69e727" - end - - def install - resource("secp256k1").stage do - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{libexec}", - "--enable-module-recovery", - "--with-bignum=no" - system "make", "install" - end - - ENV.prepend_path "PKG_CONFIG_PATH", "#{libexec}/lib/pkgconfig" - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - typedef std::vector data_chunk; - static unsigned from_hex(const char ch) - { - if ('A' <= ch && ch <= 'F') - return 10 + ch - 'A'; - if ('a' <= ch && ch <= 'f') - return 10 + ch - 'a'; - return ch - '0'; - } - static bool decode_base16_private(uint8_t* out, size_t size, const char* in) - { - for (size_t i = 0; i < size; ++i) - { - if (!isxdigit(in[0]) || !isxdigit(in[1])) - return false; - out[i] = (from_hex(in[0]) << 4) + from_hex(in[1]); - in += 2; - } - return true; - } - static bool decode_base16(data_chunk& out, const std::string& in) - { - // This prevents a last odd character from being ignored: - if (in.size() % 2 != 0) - return false; - data_chunk result(in.size() / 2); - if (!decode_base16_private(result.data(), result.size(), in.data())) - return false; - out = result; - return true; - } - static libbitcoin::consensus::verify_result test_verify(const std::string& transaction, - const std::string& prevout_script, uint64_t prevout_value=0, - uint32_t tx_input_index=0, const uint32_t flags=libbitcoin::consensus::verify_flags_p2sh, - int32_t tx_size_hack=0) - { - data_chunk tx_data, prevout_script_data; - assert(decode_base16(tx_data, transaction)); - assert(decode_base16(prevout_script_data, prevout_script)); - return libbitcoin::consensus::verify_script(&tx_data[0], tx_data.size() + tx_size_hack, - &prevout_script_data[0], prevout_script_data.size(), prevout_value, - tx_input_index, flags); - } - int main() { - const libbitcoin::consensus::verify_result result = test_verify("42", "42"); - assert(result == libbitcoin::consensus::verify_result_tx_invalid); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", - "-I#{libexec}/include", - "-L#{lib}", "-L#{libexec}/lib", - "-lbitcoin-consensus", - "-o", "test" - system "./test" - end -end diff --git a/Formula/libbitcoin-database.rb b/Formula/libbitcoin-database.rb deleted file mode 100644 index 248c687923a67..0000000000000 --- a/Formula/libbitcoin-database.rb +++ /dev/null @@ -1,51 +0,0 @@ -class LibbitcoinDatabase < Formula - desc "Bitcoin High Performance Blockchain Database" - homepage "https://github.com/libbitcoin/libbitcoin-database" - url "https://github.com/libbitcoin/libbitcoin-database/archive/v3.6.0.tar.gz" - sha256 "d65b35745091b93feed61c5665b5a07b404b578e2582640e93c1a01f6b746f5a" - revision 1 - - bottle do - cellar :any - sha256 "dd2b10d8efa0f54a4901362dd3e984a11ca9fb2636e563508fd9b78f74dd71a9" => :catalina - sha256 "fe18418b3e78225ccddb6cfe254472203fe738eb3a017be989a8d946591dea06" => :mojave - sha256 "bc255c8b65b73c1b3d8f88deb484501287f39ff72513f6ea5e12d5ac6e494b8e" => :high_sierra - sha256 "8d9e51707d54aa7df20b81602dc489bcea2d851416d9187ba9f297ced969123b" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libbitcoin" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - using namespace libbitcoin::database; - using namespace libbitcoin::chain; - int main() { - static const transaction tx{ 0, 0, input::list{}, output::list{ output{} } }; - unspent_outputs cache(42); - cache.add(tx, 0, 0, false); - assert(cache.size() == 1u); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", - "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin", - "-L#{lib}", "-lbitcoin-database", - "-L#{Formula["boost"].opt_lib}", "-lboost_system" - system "./test" - end -end diff --git a/Formula/libbitcoin-explorer.rb b/Formula/libbitcoin-explorer.rb deleted file mode 100644 index 3f55bc7574f6b..0000000000000 --- a/Formula/libbitcoin-explorer.rb +++ /dev/null @@ -1,48 +0,0 @@ -class LibbitcoinExplorer < Formula - desc "Bitcoin command-line tool" - homepage "https://github.com/libbitcoin/libbitcoin-explorer" - url "https://github.com/libbitcoin/libbitcoin-explorer/archive/v3.6.0.tar.gz" - sha256 "e1b3fa2723465f7366a6e8c55e14df53106e90b82cc977db638c78f9bc5c47db" - revision 3 - - bottle do - sha256 "0a8f69aab37c3b987214c44dd82adecde519259f9d3a8ebfad092054af08b8d4" => :catalina - sha256 "cbd033b57c9da0039f32c0a350398ef201a6e3d731806f8f7e962bd67ce815d0" => :mojave - sha256 "1de14d42596d9f26fe0e85642077b234d06035e1be49d5d890c5a80a51b7dc63" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libbitcoin-client" - depends_on "libbitcoin-network" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - - bash_completion.install "data/bx" - end - - test do - seed = "7aaa07602b34e49dd9fd13267dcc0f368effe0b4ce15d107" - expected_private_key = "5b4e3cba38709f0d80aff509c1cc87eea9dad95bb34b09eb0ce3e8dbc083f962" - expected_public_key = "023b899a380c81b35647fff5f7e1988c617fe8417a5485217e653cda80bc4670ef" - expected_address = "1AxX5HyQi7diPVXUH2ji7x5k6jZTxbkxfW" - - private_key = shell_output("#{bin}/bx ec-new #{seed}").chomp - assert_equal expected_private_key, private_key - - public_key = shell_output("#{bin}/bx ec-to-public #{private_key}").chomp - assert_equal expected_public_key, public_key - - address = shell_output("#{bin}/bx ec-to-address #{public_key}").chomp - assert_equal expected_address, address - end -end diff --git a/Formula/libbitcoin-network.rb b/Formula/libbitcoin-network.rb deleted file mode 100644 index 66594706cd143..0000000000000 --- a/Formula/libbitcoin-network.rb +++ /dev/null @@ -1,49 +0,0 @@ -class LibbitcoinNetwork < Formula - desc "Bitcoin P2P Network Library" - homepage "https://github.com/libbitcoin/libbitcoin-network" - url "https://github.com/libbitcoin/libbitcoin-network/archive/v3.6.0.tar.gz" - sha256 "68d36577d44f7319280c446a5327a072eb20749dfa859c0e1ac768304c9dd93a" - revision 1 - - bottle do - cellar :any - sha256 "7cfd1e7d27efaa5a097c5b9b3a7560504a9b25cb5b65b1d9111ac8312fe16656" => :catalina - sha256 "8e4f39b82eb02eaba960d02dd78783e70dbe190566e3b978d4000c95f3b211d8" => :mojave - sha256 "4f641ea3e82b0ec336172a3cfb87f4cc5750390f57fcd73fd15c85cbf6a5356f" => :high_sierra - sha256 "4619c4f9515111e430c671fd580fdf5c8547a75b82d1ea88ae6c2e250446c242" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libbitcoin" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - const bc::network::settings configuration; - bc::network::p2p network(configuration); - assert(network.top_block().height() == 0); - assert(network.top_block().hash() == bc::null_hash); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", - "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin", - "-L#{lib}", "-lbitcoin-network", - "-L#{Formula["boost"].opt_lib}", "-lboost_system" - system "./test" - end -end diff --git a/Formula/libbitcoin-node.rb b/Formula/libbitcoin-node.rb deleted file mode 100644 index 7f9f1697b52a3..0000000000000 --- a/Formula/libbitcoin-node.rb +++ /dev/null @@ -1,51 +0,0 @@ -class LibbitcoinNode < Formula - desc "Bitcoin Full Node" - homepage "https://github.com/libbitcoin/libbitcoin-node" - url "https://github.com/libbitcoin/libbitcoin-node/archive/v3.6.0.tar.gz" - sha256 "9556ee8aab91e893db1cf343883034571153b206ffbbce3e3133c97e6ee4693b" - revision 1 - - bottle do - sha256 "653e045b09c85d70bcc454f6a2fb7c7cbd5fcfdd77eb0f4d376699c5bde730e8" => :catalina - sha256 "d80c4711180ca3046edfad49d380a434f3dee07232ab3171483a5f135ebe41d2" => :mojave - sha256 "d0e3c6d9bcd6db9b2275aadafd8c15ad086da4f4b43cb3e2b25ed76239841d8d" => :high_sierra - sha256 "982ed6da5589239636751f909765d7ddc744fbfe29ed8a6f73cf6b8f62546e3f" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libbitcoin-blockchain" - depends_on "libbitcoin-network" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - - bash_completion.install "data/bn" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - libbitcoin::node::settings configuration; - assert(configuration.sync_peers == 0u); - assert(configuration.sync_timeout_seconds == 5u); - assert(configuration.refresh_transactions == true); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", - "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin", - "-L#{lib}", "-lbitcoin-node", - "-L#{Formula["boost"].opt_lib}", "-lboost_system" - system "./test" - end -end diff --git a/Formula/libbitcoin-protocol.rb b/Formula/libbitcoin-protocol.rb deleted file mode 100644 index 0ca08a760f275..0000000000000 --- a/Formula/libbitcoin-protocol.rb +++ /dev/null @@ -1,48 +0,0 @@ -class LibbitcoinProtocol < Formula - desc "Bitcoin Blockchain Query Protocol" - homepage "https://github.com/libbitcoin/libbitcoin-protocol" - url "https://github.com/libbitcoin/libbitcoin-protocol/archive/v3.6.0.tar.gz" - sha256 "fc41c64f6d3ee78bcccb63fd0879775c62bba5326f38c90b4c6804e2b9e8686e" - revision 3 - - bottle do - cellar :any - sha256 "4343509f2811743b2d412543a5c4c1cf376e53f93226057508dbf207ce4f50fd" => :catalina - sha256 "5f4d9d3d93e9b1a1a2545f18fe39a1632b5e6c866a4871cc7bb09e47299a75c6" => :mojave - sha256 "e14a8762d49543f065e6363334beb9ec65caa16a2d0b9bf86e1411095b14f05d" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libbitcoin" - depends_on "zeromq" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - libbitcoin::protocol::zmq::message instance; - instance.enqueue(); - assert(!instance.empty()); - assert(instance.size() == 1u); - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", - "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin", - "-L#{lib}", "-lbitcoin-protocol", - "-L#{Formula["boost"].opt_lib}", "-lboost_system" - system "./test" - end -end diff --git a/Formula/libbitcoin-server.rb b/Formula/libbitcoin-server.rb deleted file mode 100644 index 198b2e5ee4dec..0000000000000 --- a/Formula/libbitcoin-server.rb +++ /dev/null @@ -1,48 +0,0 @@ -class LibbitcoinServer < Formula - desc "Bitcoin Full Node and Query Server" - homepage "https://github.com/libbitcoin/libbitcoin-server" - url "https://github.com/libbitcoin/libbitcoin-server/archive/v3.6.0.tar.gz" - sha256 "283fa7572fcde70a488c93e8298e57f7f9a8e8403e209ac232549b2c433674e1" - revision 3 - - bottle do - sha256 "2ff98a402c8430f385536d36f5cb1e41ada483571ffb9feadc6be622f70a8f79" => :catalina - sha256 "a13046ec6e55b96b9ff107fc4eb6db2fdfc38d87d258dca290e50a24e6ce8e00" => :mojave - sha256 "5dfaac345d848854823d28bf3d57ed9bea717a4206c4bd68952c980b912b8808" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libbitcoin-node" - depends_on "libbitcoin-protocol" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig" - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - - bash_completion.install "data/bs" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - libbitcoin::server::message message(true); - assert(message.secure() == true); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", - "-L#{Formula["libbitcoin"].opt_lib}", "-lbitcoin", - "-L#{lib}", "-lbitcoin-server", - "-L#{Formula["boost"].opt_lib}", "-lboost_system" - system "./test" - end -end diff --git a/Formula/libbitcoin.rb b/Formula/libbitcoin.rb deleted file mode 100644 index 1e79d9ef2aa33..0000000000000 --- a/Formula/libbitcoin.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Libbitcoin < Formula - desc "Bitcoin Cross-Platform C++ Development Toolkit" - homepage "https://github.com/libbitcoin/libbitcoin-system" - url "https://github.com/libbitcoin/libbitcoin-system/archive/v3.6.0.tar.gz" - sha256 "5bcc4c31b53acbc9c0d151ace95d684909db4bf946f8d724f76c711934c6775c" - revision 3 - - bottle do - cellar :any - sha256 "8ee84fd2c1ca6f36b5e064af6c131e692a2478f66f90dc950547d06594083b12" => :catalina - sha256 "f80a081ef5f8ad92941279e4ac5483b5f68897f6a5f8d3367b8d65603663e82b" => :mojave - sha256 "a5f18c5a179363df523c5aeb9d7cc8f3d2c9f7fa06e3092a37d80b95bf9edd94" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "libpng" - depends_on "qrencode" - - resource "secp256k1" do - url "https://github.com/libbitcoin/secp256k1/archive/v0.1.0.13.tar.gz" - sha256 "9e48dbc88d0fb5646d40ea12df9375c577f0e77525e49833fb744d3c2a69e727" - end - - def install - resource("secp256k1").stage do - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{libexec}", - "--enable-module-recovery", - "--with-bignum=no" - system "make", "install" - end - - ENV.prepend_path "PKG_CONFIG_PATH", "#{libexec}/lib/pkgconfig" - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-png", - "--with-qrencode" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - const auto block = bc::chain::block::genesis_mainnet(); - const auto& tx = block.transactions().front(); - const auto& input = tx.inputs().front(); - const auto script = input.script().to_data(false); - std::string message(script.begin() + sizeof(uint64_t), script.end()); - std::cout << message << std::endl; - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lbitcoin", - "-L#{Formula["boost"].opt_lib}", "-lboost_system", - "-o", "test" - system "./test" - end -end diff --git a/Formula/libbladerf.rb b/Formula/libbladerf.rb deleted file mode 100644 index 39133c00e754d..0000000000000 --- a/Formula/libbladerf.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Libbladerf < Formula - desc "USB 3.0 Superspeed Software Defined Radio Source" - homepage "https://nuand.com/" - url "https://github.com/Nuand/bladeRF.git", - :tag => "2019.07", - :revision => "991bba2f9c4d000f000077cc465878d303417e26" - head "https://github.com/Nuand/bladeRF.git" - - bottle do - sha256 "a60bfb3c0e350ec8fc1774b902bb8e151581f11a6669d067cb94da417e266bc3" => :catalina - sha256 "47cc541e8c1e2061cb842595f08cd9adc65194378bf1303d876e79e6c5a93b85" => :mojave - sha256 "f276e5ce4058bd486edaff6b97f61bddea9f44b5f88f35997a90c100da8f70d1" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "libusb" - - def install - ENV.prepend "CFLAGS", "-I#{MacOS.sdk_path}/usr/include/malloc" - mkdir "host/build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - system bin/"bladeRF-cli", "--version" - end -end diff --git a/Formula/libbluray.rb b/Formula/libbluray.rb deleted file mode 100644 index b72aa72190316..0000000000000 --- a/Formula/libbluray.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Libbluray < Formula - desc "Blu-Ray disc playback library for media players like VLC" - homepage "https://www.videolan.org/developers/libbluray.html" - url "https://download.videolan.org/videolan/libbluray/1.2.0/libbluray-1.2.0.tar.bz2" - sha256 "cd41ea06fd2512a77ebf63872873641908ef81ce2fe4e4c842f6035a47696c11" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "ed5b295ee0b40b5c36ca2ceb289c106007f8fe9d475727288b61ea4dd5315bde" => :catalina - sha256 "bde7b947d717e7da2367bb3b38ab79eab3843cf3c109603d7fb0c84993872164" => :mojave - sha256 "a8a20bb4274ca8844ee7dc9ef27df6660dfe9cc180f85bbaebe11f1cc4edd053" => :high_sierra - end - - head do - url "https://code.videolan.org/videolan/libbluray.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "ant" => :build - depends_on :java => ["1.8", :build] - depends_on "pkg-config" => :build - depends_on "fontconfig" - depends_on "freetype" - - uses_from_macos "libxml2" - - def install - # Need to set JAVA_HOME manually since ant overrides 1.8 with 1.8+ - cmd = Language::Java.java_home_cmd("1.8") - ENV["JAVA_HOME"] = Utils.safe_popen_read(cmd).chomp - - # https://mailman.videolan.org/pipermail/libbluray-devel/2014-April/001401.html - ENV.append_to_cflags "-D_DARWIN_C_SOURCE" - - # Work around Xcode 11 clang bug - # https://code.videolan.org/videolan/libbluray/issues/20 - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - args = %W[--prefix=#{prefix} --disable-dependency-tracking] - - system "./bootstrap" if build.head? - system "./configure", *args - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) { - BLURAY *bluray = bd_init(); - } - EOS - - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lbluray", "-o", "test" - system "./test" - end -end diff --git a/Formula/libbpg.rb b/Formula/libbpg.rb deleted file mode 100644 index 2e344937084a2..0000000000000 --- a/Formula/libbpg.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Libbpg < Formula - desc "Image format meant to improve on JPEG quality and file size" - homepage "https://bellard.org/bpg/" - url "https://bellard.org/bpg/libbpg-0.9.8.tar.gz" - sha256 "c0788e23bdf1a7d36cb4424ccb2fae4c7789ac94949563c4ad0e2569d3bf0095" - - bottle do - cellar :any - sha256 "559ad6131fbd040428bd8423047f78942aa772726af7d8e9707cad38ab167504" => :catalina - sha256 "53691575bb5076233228a76e6657a76af4fcc0ab90f3f54799489e54dbe1a49a" => :mojave - sha256 "b040d31f8abd45f50f8ba634c97eb81a0ec89ecada773223b2ac362ddd20baff" => :high_sierra - sha256 "77ae8a79d99cae86c42e4eaad0cc240efe98425f58143c940a3525d29d7cb25c" => :sierra - sha256 "49027f81f126e8bdc24587d43b127815e3a53fafa92b6326c857526678932bef" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "yasm" => :build - depends_on "jpeg" - depends_on "libpng" - - def install - bin.mkpath - system "make", "install", "prefix=#{prefix}", "CONFIG_APPLE=y" - pkgshare.install Dir["html/bpgdec*.js"] - end - - test do - system "#{bin}/bpgenc", test_fixtures("test.png") - end -end diff --git a/Formula/libbs2b.rb b/Formula/libbs2b.rb deleted file mode 100644 index d66274521f9d1..0000000000000 --- a/Formula/libbs2b.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Libbs2b < Formula - desc "Bauer stereophonic-to-binaural DSP" - homepage "https://bs2b.sourceforge.io/" - url "https://downloads.sourceforge.net/project/bs2b/libbs2b/3.1.0/libbs2b-3.1.0.tar.gz" - sha256 "6aaafd81aae3898ee40148dd1349aab348db9bfae9767d0e66e0b07ddd4b2528" - license "MIT" - - bottle do - cellar :any - rebuild 1 - sha256 "61ba0d4bf4a016a7634256d2c7eef59d55dacb3f33730d8f2905f9fa35db0108" => :catalina - sha256 "b1236f81550a661e9b6ca6db5c828465d32cf0ca8e7db9504cb94871760c4a22" => :mojave - sha256 "0d2faffb7452ddd66d306746065dc7264d66c3e8f60a3525ee4eb911cd546bcd" => :high_sierra - sha256 "0431cb3f7cac90d18d854abe956ad296ba399832b733293e55ea58f0f11ba1b1" => :sierra - sha256 "7949aa7768466a789d992d079a63d5933d19e76ebfb330b38d3b4822929a71ac" => :el_capitan - sha256 "62a45fde4ae7db34b1c14212d2c0ec5c603fdc403dc1df2b629972789dc7489e" => :yosemite - sha256 "7cf43c31d5aee33a241af345c4b8a05fc73f48afc8b9f37d5ad9c4fa22d6920e" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "libsndfile" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-static", - "--enable-shared" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - t_bs2bdp info = bs2b_open(); - if (info == 0) - { - return 1; - } - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "-lbs2b", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/libbtbb.rb b/Formula/libbtbb.rb deleted file mode 100644 index 9d53075b3eb77..0000000000000 --- a/Formula/libbtbb.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Libbtbb < Formula - desc "Bluetooth baseband decoding library" - homepage "https://github.com/greatscottgadgets/libbtbb" - url "https://github.com/greatscottgadgets/libbtbb/archive/2018-12-R1.tar.gz" - version "2018-12-R1" - sha256 "0eb2b72e1c1131538206f1e3176e2cf1048751fe7dc665eef1e7429d1f2e6225" - license "GPL-2.0" - head "https://github.com/greatscottgadgets/libbtbb.git" - - bottle do - cellar :any - sha256 "a44e009e65047628a6d6c1e355ab19ca43410eaec83a557c907b277de361b98e" => :catalina - sha256 "835f6edfd8143b29d96eeeed66dd443d837cc8a117519fdca30637c417c9b8d9" => :mojave - sha256 "b2be1cc3b707870e022401656041307bfde41035659db8eee563647f0dce5873" => :high_sierra - sha256 "e09299efc9ea3b989a2b1ceda4d123e6cebec6b28aa8ff08cf3052dfa6a65c3d" => :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/"btaptap", "-r", test_fixtures("test.pcap") - end -end diff --git a/Formula/libcaca.rb b/Formula/libcaca.rb deleted file mode 100644 index 8ce36398850ce..0000000000000 --- a/Formula/libcaca.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Libcaca < Formula - desc "Convert pixel information into colored ASCII art" - homepage "http://caca.zoy.org/wiki/libcaca" - url "http://caca.zoy.org/files/libcaca/libcaca-0.99.beta19.tar.gz" - mirror "https://www.mirrorservice.org/sites/distfiles.macports.org/libcaca/libcaca-0.99.beta19.tar.gz" - mirror "https://fossies.org/linux/privat/libcaca-0.99.beta19.tar.gz" - version "0.99b19" - sha256 "128b467c4ed03264c187405172a4e83049342cc8cc2f655f53a2d0ee9d3772f4" - revision 1 - - bottle do - cellar :any - sha256 "bd3e0ddf184652575170248e9a3b1b4a8c03ac21913cfcac8016baa9d39386fa" => :catalina - sha256 "5da241ff15fcb9b6ad7625b223cbda3b4e4aa5e449677f44c2512cec892485cd" => :mojave - sha256 "804a53d45e6db70f211f7b0eebcd9a84d61784a891268889d55b81135e9621a5" => :high_sierra - end - - head do - url "https://github.com/cacalabs/libcaca.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "imlib2" - - def install - system "./bootstrap" if build.head? - - # Fix --destdir issue. - # ../.auto/py-compile: Missing argument to --destdir. - inreplace "python/Makefile.in", - '$(am__py_compile) --destdir "$(DESTDIR)"', - "$(am__py_compile) --destdir \"$(cacadir)\"" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-doc - --disable-slang - --disable-java - --disable-csharp - --disable-ruby - --disable-x11 - ] - - system "./configure", *args - system "make" - ENV.deparallelize # Or install can fail making the same folder at the same time - system "make", "install" - end - - test do - system "#{bin}/img2txt", "--version" - end -end diff --git a/Formula/libcanberra.rb b/Formula/libcanberra.rb deleted file mode 100644 index 25d4aec7a818c..0000000000000 --- a/Formula/libcanberra.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Libcanberra < Formula - desc "Implementation of XDG Sound Theme and Name Specifications" - homepage "http://0pointer.de/lennart/projects/libcanberra/" - url "http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.30.tar.xz" - sha256 "c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72" - - bottle do - cellar :any - rebuild 1 - sha256 "34ff83c6dc8af0afc1f1988ebde1ccb4c17d4604fa6d36567daedef43da3047d" => :catalina - sha256 "3d32a254ac069ef41b785f6950e3eea625de6faaf99d2402236b451f8c765b05" => :mojave - sha256 "561aa9aba4e6b5f191b74d3dd1c96de9951e3dc5b696d93abaeaa301aa117bae" => :high_sierra - end - - head do - url "git://git.0pointer.de/libcanberra" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gtk-doc" - end - - depends_on "pkg-config" => :build - depends_on "libtool" - depends_on "libvorbis" - - def install - system "./autogen.sh" if build.head? - - # ld: unknown option: --as-needed" and then the same for `--gc-sections` - # Reported 7 May 2016: lennart@poettering.net and mzyvopnaoreen@0pointer.de - system "./configure", "--prefix=#{prefix}", "--no-create" - inreplace "config.status", "-Wl,--as-needed -Wl,--gc-sections", "" - system "./config.status" - - system "make", "install" - end - - test do - (testpath/"lc.c").write <<~EOS - #include - int main() - { - ca_context *ctx = NULL; - (void) ca_context_create(&ctx); - return (ctx == NULL); - } - EOS - system ENV.cc, "lc.c", "-I#{include}", "-L#{lib}", "-lcanberra", "-o", "lc" - system "./lc" - end -end diff --git a/Formula/libcapn.rb b/Formula/libcapn.rb deleted file mode 100644 index e467a57dcbb6e..0000000000000 --- a/Formula/libcapn.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Libcapn < Formula - desc "C library to send push notifications to Apple devices" - homepage "https://web.archive.org/web/20181220090839/libcapn.org/" - license "MIT" - revision 1 - head "https://github.com/adobkin/libcapn.git" - - stable do - url "https://github.com/adobkin/libcapn/archive/v2.0.0.tar.gz" - sha256 "6a0d786a431864178f19300aa5e1208c6c0cbd2d54fadcd27f032b4f3dd3539e" - - resource "jansson" do - url "https://github.com/akheron/jansson.git", - :revision => "8f067962f6442bda65f0a8909f589f2616a42c5a" - end - end - - bottle do - sha256 "67b634beae31705b6664702473cb42a686c50d84f4d0ec530bbe4e360c292dba" => :catalina - sha256 "3b4b1f331e7e79c6a99826c5ffd385df3f199a7d72c897e9fd31150be26303cb" => :mojave - sha256 "a3cd6c452f96c9914f41fe22c1c0b5518c282569dffcebe7d6f38783ce2fb4d1" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - # Compatibility with OpenSSL 1.1 - patch do - url "https://github.com/adobkin/libcapn/pull/46.diff?full_index=1" - sha256 "9d90edd1c8e3fa479554f48fe9f92afd771e5852ced595e7f66f6174d805530b" - end - - def install - # head gets jansson as a git submodule - (buildpath/"src/third_party/jansson").install resource("jansson") if build.stable? - system "cmake", ".", "-DOPENSSL_ROOT_DIR=#{Formula["openssl@1.1"].opt_prefix}", - *std_cmake_args - system "make", "install" - pkgshare.install "examples" - end - - test do - system ENV.cc, pkgshare/"examples/send_push_message.c", - "-o", "send_push_message", - "-I#{Formula["openssl@1.1"].opt_include}", - "-L#{lib}/capn", "-lcapn" - output = shell_output("./send_push_message", 255) - assert_match "unable to use specified PKCS12 file (errno: 9012)", output - end -end diff --git a/Formula/libcbor.rb b/Formula/libcbor.rb deleted file mode 100644 index e0c5ac6f88ef7..0000000000000 --- a/Formula/libcbor.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libcbor < Formula - desc "CBOR protocol implementation for C and others" - homepage "http://libcbor.org/" - url "https://github.com/PJK/libcbor/archive/v0.7.0.tar.gz" - sha256 "fb731afe0a9980581d85e4b8d4ef128b175f782d92e0cd898935f3d26dd3dde7" - license "MIT" - - bottle do - cellar :any - sha256 "592a8fe5ad2efd8111f016631ab251162e821e2a1560e42cd6285d60525b3813" => :catalina - sha256 "104f1676b69dbcbbedb00c9059d1b08cf05f9003379fee323b9fba7728bb51fa" => :mojave - sha256 "7f6b69a84c6c7ec111e7c0a8c2d086e5933a44268d1af20c5dd28eb5af60eccc" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", "-DWITH_EXAMPLES=OFF", *std_cmake_args - system "make" - system "make", "install" - end - end - - test do - (testpath/"example.c").write <<-EOS - #include "cbor.h" - #include - int main(int argc, char * argv[]) - { - printf("Hello from libcbor %s\\n", CBOR_VERSION); - printf("Custom allocation support: %s\\n", CBOR_CUSTOM_ALLOC ? "yes" : "no"); - printf("Pretty-printer support: %s\\n", CBOR_PRETTY_PRINTER ? "yes" : "no"); - printf("Buffer growth factor: %f\\n", (float) CBOR_BUFFER_GROWTH); - } - EOS - - system ENV.cc, "-std=c99", "example.c", "-L#{lib}", "-lcbor", "-o", "example" - system "./example" - puts `./example` - end -end diff --git a/Formula/libccd.rb b/Formula/libccd.rb deleted file mode 100644 index 7f77dfa961f78..0000000000000 --- a/Formula/libccd.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Libccd < Formula - desc "Collision detection between two convex shapes" - homepage "http://libccd.danfis.cz/" - url "https://github.com/danfis/libccd/archive/v2.1.tar.gz" - sha256 "542b6c47f522d581fbf39e51df32c7d1256ac0c626e7c2b41f1040d4b9d50d1e" - - bottle do - cellar :any - sha256 "d243743b0d6962d55961bdda60fe8ea32bb738dea0509930d5d4114db2d52013" => :catalina - sha256 "05c8005ed028e5d5ca250aba9f3c69ece3af5766d91c68fa50fbcf78d139849d" => :mojave - sha256 "3b0a74f46d98cc57ddbff8c4f37227e8c5f528905037f346bf17104ba17b71f7" => :high_sierra - sha256 "63e2b6149dea77e8ece7a88f7f5f941d9606e9843bc46e4a48853858f6b4a7b3" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", "-DENABLE_DOUBLE_PRECISION=ON", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - int main() { - #ifndef CCD_DOUBLE - assert(false); - #endif - ccdVec3PointSegmentDist2( - ccd_vec3_origin, ccd_vec3_origin, - ccd_vec3_origin, NULL); - return 0; - } - EOS - system ENV.cc, "-o", "test", "test.c", "-L#{lib}", "-lccd" - system "./test" - end -end diff --git a/Formula/libcddb.rb b/Formula/libcddb.rb deleted file mode 100644 index e6eb991167d31..0000000000000 --- a/Formula/libcddb.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Libcddb < Formula - desc "CDDB server access library" - homepage "https://libcddb.sourceforge.io/" - url "https://downloads.sourceforge.net/libcddb/libcddb-1.3.2.tar.bz2" - sha256 "35ce0ee1741ea38def304ddfe84a958901413aa829698357f0bee5bb8f0a223b" - revision 4 - - bottle do - cellar :any - rebuild 1 - sha256 "7f1c41ce153e0550edac0073eeaf3a82d430fdd6b8e1c6d766459f81905b5b1e" => :catalina - sha256 "4a54605d856a52362d5b3a76a20872c72df138dca4b19595ffbdd6bc44e210be" => :mojave - sha256 "fcb848ca3b114f197ca52850d56a63b298fad61b9ee968496ddc450d969c3078" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libcdio" - - def install - ENV.delete("SDKROOT") if MacOS.version == :yosemite && MacOS::Xcode.version >= "7.0" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) { - cddb_track_t *track = cddb_track_new(); - cddb_track_destroy(track); - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lcddb", "-o", "test" - system "./test" - end -end diff --git a/Formula/libcdio.rb b/Formula/libcdio.rb deleted file mode 100644 index ac47272778ac5..0000000000000 --- a/Formula/libcdio.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Libcdio < Formula - desc "Compact Disc Input and Control Library" - homepage "https://www.gnu.org/software/libcdio/" - url "https://ftp.gnu.org/gnu/libcdio/libcdio-2.1.0.tar.bz2" - mirror "https://ftpmirror.gnu.org/libcdio/libcdio-2.1.0.tar.bz2" - sha256 "8550e9589dbd594bfac93b81ecf129b1dc9d0d51e90f9696f1b2f9b2af32712b" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "3ec17ce98e129db74cb883941e429286b9ab762c740dcb6ee8c7ff077d6e3304" => :catalina - sha256 "55014a60373e44384aa7f797c613ccd5289c55d759c3521b7e5d6819ff54b2ac" => :mojave - sha256 "32604fb219cc4e59e5eb1e0937b320edfacf31d97f04b9a5fbfcd4354a6a56d0" => :high_sierra - sha256 "61095f7c4888b1c0e022ec9eb314fe389feae1eb030d65e7d91512515528e439" => :sierra - end - - depends_on "pkg-config" => :build - - def install - system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match /#{version}/, shell_output("#{bin}/cd-info -v", 1) - end -end diff --git a/Formula/libcdr.rb b/Formula/libcdr.rb deleted file mode 100644 index bbcda4d5c07ad..0000000000000 --- a/Formula/libcdr.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Libcdr < Formula - desc "C++ library to parse the file format of CorelDRAW documents" - homepage "https://wiki.documentfoundation.org/DLP/Libraries/libcdr" - url "https://dev-www.libreoffice.org/src/libcdr/libcdr-0.1.6.tar.xz" - sha256 "01cd00b04a030977e544433c2d127c997205332cd9b8e35ec0ee17110da7f861" - revision 2 - - bottle do - cellar :any - sha256 "8c07a139f24c7548cfd8eb6b5bba59ab643d0030d05fb52eb2baf7a825a232fa" => :catalina - sha256 "9a1aff2e64f3d103b416b7bcc07c2431777660eee1466af64d9717cbcca9454b" => :mojave - sha256 "f602a7919ea9e6921f3597f061b96b466d3291c597c355f410bd340b4b8e23d3" => :high_sierra - end - - depends_on "cppunit" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "icu4c" - depends_on "librevenge" - depends_on "little-cms2" - - def install - ENV.cxx11 - # Needed for Boost 1.59.0 compatibility. - ENV["LDFLAGS"] = "-lboost_system-mt" - system "./configure", "--disable-werror", - "--without-docs", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - libcdr::CDRDocument::isSupported(0); - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", - "-I#{Formula["librevenge"].include}/librevenge-0.0", - "-I#{include}/libcdr-0.1", - "-L#{lib}", "-lcdr-0.1" - system "./test" - end -end diff --git a/Formula/libcds.rb b/Formula/libcds.rb deleted file mode 100644 index 8221aa700711f..0000000000000 --- a/Formula/libcds.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libcds < Formula - desc "C++ library of Concurrent Data Structures" - homepage "https://libcds.sourceforge.io/doc/cds-api/index.html" - url "https://github.com/khizmax/libcds/archive/v2.3.3.tar.gz" - sha256 "f090380ecd6b63a3c2b2f0bdb27260de2ccb22486ef7f47cc1175b70c6e4e388" - license "BSL-1.0" - - bottle do - cellar :any - sha256 "d2ac7fe9c424707b1a2698fabed2a81645bb4f79f9fb943a279aee1cfc5d38d9" => :catalina - sha256 "ed2baad62fe26da2891255221ee90a8d69f84214431dce923dd7c55aafa39668" => :mojave - sha256 "9723b22f7a6e84ef208226241ed3b19dd02b4c9aed9c01284f55bd9b825e216e" => :high_sierra - sha256 "fdc30046c9f96c04d7c52d43e948d2e238fb93eee5514101a0dd0ca4de3f2b32" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - cds::Initialize(); - cds::threading::Manager::attachThread(); - cds::Terminate(); - return 0; - } - EOS - system ENV.cxx, "-o", "test", "test.cpp", "-L#{lib}64", "-lcds", "-std=c++11" - system "./test" - end -end diff --git a/Formula/libcec.rb b/Formula/libcec.rb deleted file mode 100644 index 5998569586bff..0000000000000 --- a/Formula/libcec.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libcec < Formula - desc "Control devices with TV remote control and HDMI cabling" - homepage "http://libcec.pulse-eight.com/" - url "https://github.com/Pulse-Eight/libcec/archive/libcec-5.0.0.tar.gz" - sha256 "7c6ef02f39918ac88a3dac8ea35021f6c4b4b695df9204b3ac9faca673c706cc" - - bottle do - cellar :any - sha256 "fcca0daf72607150ca1468ec90312807c74ebf75971f394e5db86a08f1f36d61" => :catalina - sha256 "92da05c25aaaa1af81909bbfda5455622dae620d2dcff095600597a06547c8f5" => :mojave - sha256 "5b4d87d43f65d172f737fd8d88e2a0b6f5e1220109dc5745ca5daacb5aeee0ba" => :high_sierra - end - - depends_on "cmake" => :build - - resource "p8-platform" do - url "https://github.com/Pulse-Eight/platform/archive/p8-platform-2.1.0.1.tar.gz" - sha256 "064f8d2c358895c7e0bea9ae956f8d46f3f057772cb97f2743a11d478a0f68a0" - end - - def install - ENV.cxx11 - - resource("p8-platform").stage do - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "install" - end - end - - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "install" - end - end - - test do - system "#{bin}/cec-client", "--info" - end -end diff --git a/Formula/libcello.rb b/Formula/libcello.rb deleted file mode 100644 index 85492c02150e1..0000000000000 --- a/Formula/libcello.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Libcello < Formula - desc "Higher-level programming in C" - homepage "http://libcello.org/" - url "http://libcello.org/static/libCello-2.1.0.tar.gz" - sha256 "49acf6525ac6808c49f2125ecdc101626801cffe87da16736afb80684b172b28" - head "https://github.com/orangeduck/libCello.git" - - bottle do - cellar :any_skip_relocation - sha256 "a6ad4a498c30ce4713cf0a76800cabe412f1471a4262459ce38a477f163354e9" => :catalina - sha256 "53ef17fbae26388e22354b9c5d536dfc0f0e0b604281878fbccbad7e6db5c30e" => :mojave - sha256 "1c7719b74c5507dfd84ec93c043c11a4113e13a66f06e9d6f32349ec83042ad2" => :high_sierra - sha256 "561319859455b756f53013090f91d6b06b1093c00d59593519ec09210f6bf830" => :sierra - sha256 "05384667bb4d98a603406b3bc35962651af06d44eb55f2080c80f8dd979a9d80" => :el_capitan - end - - def install - system "make", "check" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"test.c").write <<~EOS - #include "Cello.h" - - int main(int argc, char** argv) { - var i0 = $(Int, 5); - var i1 = $(Int, 3); - var items = new(Array, Int, i0, i1); - foreach (item in items) { - print("Object %$ is of type %$\\n", item, type_of(item)); - } - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lCello", "-o", "test" - system "./test" - end -end diff --git a/Formula/libcerf.rb b/Formula/libcerf.rb deleted file mode 100644 index da1e51c4ba979..0000000000000 --- a/Formula/libcerf.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Libcerf < Formula - desc "Numeric library for complex error functions" - homepage "https://jugit.fz-juelich.de/mlz/libcerf" - url "https://jugit.fz-juelich.de/mlz/libcerf/uploads/924b8d245ad3461107ec630734dfc781/libcerf-1.13.tgz" - sha256 "011303e59ac63b280d3d8b10c66b07eb02140fcb75954d13ec26bf830e0ea2f9" - license "MIT" - head "https://jugit.fz-juelich.de/mlz/libcerf.git" - - bottle do - cellar :any - sha256 "eef861f3d750d45f7190b65afd3cc1460c7461d5b10978790cf9b66f736e3d52" => :catalina - sha256 "a181d4bf63f5ad9a5f00268a8551e7d62c52e81a88b9e9a29dba148d1a16412f" => :mojave - sha256 "48ac5501edc4e90465af39ae8ff57234993f5b9b9f4b08fd8ba00443fd5d977b" => :high_sierra - sha256 "401e716456c99bb123252b2f256e6fc70d6a741a23c8bd16d1a2ae0998641387" => :sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - #include - #include - - int main (void) { - double _Complex a = 1.0 - 0.4I; - a = cerf(a); - if (fabs(creal(a)-0.910867) > 1.e-6) abort(); - if (fabs(cimag(a)+0.156454) > 1.e-6) abort(); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcerf", "-o", "test" - system "./test" - end -end diff --git a/Formula/libchamplain.rb b/Formula/libchamplain.rb deleted file mode 100644 index 10ec30a566837..0000000000000 --- a/Formula/libchamplain.rb +++ /dev/null @@ -1,112 +0,0 @@ -class Libchamplain < Formula - desc "ClutterActor for displaying maps" - homepage "https://wiki.gnome.org/Projects/libchamplain" - url "https://download.gnome.org/sources/libchamplain/0.12/libchamplain-0.12.20.tar.xz" - sha256 "0232b4bfcd130a1c5bda7b6aec266bf2d06e701e8093df1886f1e26bc1ba3066" - license "LGPL-2.1" - revision 1 - - bottle do - cellar :any - sha256 "fedbe30042344858891ce3163a927ff83ae17ee2759d962bf197889cd741ba4e" => :catalina - sha256 "030d34bf228b24ad645e21c3145c4c105aeceefd38313b2ef0367f93faf97699" => :mojave - sha256 "8e3f324c075a081b82df5235d63386c2dee530606e8f51eb35f5e4d417c45371" => :high_sierra - end - - depends_on "gnome-common" => :build - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "clutter" - depends_on "clutter-gtk" - depends_on "gtk+3" - depends_on "libsoup" - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Ddocs=false", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = champlain_license_get_type(); - return 0; - } - EOS - ENV.libxml2 - 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"] - harfbuzz = Formula["harfbuzz"] - json_glib = Formula["json-glib"] - libepoxy = Formula["libepoxy"] - libpng = Formula["libpng"] - libsoup = Formula["libsoup"] - 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#{harfbuzz.opt_include}/harfbuzz - -I#{include}/champlain-0.12 - -I#{json_glib.opt_include}/json-glib-1.0 - -I#{libepoxy.opt_include} - -I#{libpng.opt_include}/libpng16 - -I#{libsoup.opt_include}/libsoup-2.4 - -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#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{json_glib.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -latk-1.0 - -lcairo - -lcairo-gobject - -lchamplain-0.12 - -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/libchaos.rb b/Formula/libchaos.rb deleted file mode 100644 index 4ee6eb3db1068..0000000000000 --- a/Formula/libchaos.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Libchaos < Formula - desc "Advanced library for randomization, hashing and statistical analysis" - homepage "https://github.com/maciejczyzewski/libchaos" - url "https://github.com/maciejczyzewski/libchaos/releases/download/v1.0/libchaos-1.0.tar.gz" - sha256 "29940ff014359c965d62f15bc34e5c182a6d8a505dc496c636207675843abd15" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "8cd295f6ccf1c6a09ab87bef06331424da21b0b44da8f4440a11f4fccaf1370a" => :catalina - sha256 "3add0509ec493248105ad81354c4ffccef85f37c0cc445db24f115b0b8fb3576" => :mojave - sha256 "8d1f167a096fae20de66286d9f33a7b93e03fcfccaecd5b15611e3fcd7c4b09c" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", "-DLIBCHAOS_ENABLE_TESTING=OFF", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cc").write <<~EOS - #include - #include - #include - - int main(void) { - std::cout << CHAOS_META_NAME(CHAOS_MACHINE_XORRING64) << std::endl; - std::string hash = chaos::password( - "some secret password", "my private salt"); - std::cout << hash << std::endl; - if (hash.size() != 40) - return 1; - return 0; - } - EOS - - system ENV.cxx, "-std=c++11", "-L#{lib}", "-lchaos", "-o", "test", "test.cc" - system "./test" - end -end diff --git a/Formula/libchewing.rb b/Formula/libchewing.rb deleted file mode 100644 index 85e883284911a..0000000000000 --- a/Formula/libchewing.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Libchewing < Formula - desc "Intelligent phonetic input method library" - homepage "http://chewing.im/" - url "https://github.com/chewing/libchewing/releases/download/v0.5.1/libchewing-0.5.1.tar.bz2" - sha256 "9708c63415fa6034435c0f38100e7d30d0e1bac927f67bec6dfeb3fef016172b" - license "LGPL-2.1" - - bottle do - cellar :any - rebuild 1 - sha256 "19b9c38b3036f5ad16c413135e5424c8174789129cafe3c488fecdaffa39f281" => :catalina - sha256 "b00710a74c619461b99eb3043b927248ccc0e2c2f3607683dfbcad61b82e4fe3" => :mojave - sha256 "c346c2dbf72ea2d97f88cc9fc694b61eccc7db44c38092e9d652a31612f60ef1" => :high_sierra - end - - head do - url "https://github.com/chewing/libchewing.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "texinfo" => :build - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() - { - ChewingContext *ctx = chewing_new(); - chewing_handle_Default(ctx, 'x'); - chewing_handle_Default(ctx, 'm'); - chewing_handle_Default(ctx, '4'); - chewing_handle_Default(ctx, 't'); - chewing_handle_Default(ctx, '8'); - chewing_handle_Default(ctx, '6'); - chewing_handle_Enter(ctx); - char *buf = chewing_commit_String(ctx); - free(buf); - chewing_delete(ctx); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-L#{lib}", "-lchewing", "-o", "test" - system "./test" - end -end diff --git a/Formula/libcmph.rb b/Formula/libcmph.rb deleted file mode 100644 index c249a1846a16e..0000000000000 --- a/Formula/libcmph.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Libcmph < Formula - desc "C minimal perfect hashing library" - homepage "https://cmph.sourceforge.io/" - url "https://downloads.sourceforge.net/project/cmph/v2.0.2/cmph-2.0.2.tar.gz" - sha256 "365f1e8056400d460f1ee7bfafdbf37d5ee6c78e8f4723bf4b3c081c89733f1e" - - bottle do - cellar :any - sha256 "c38019c153c728a28acbfe340cc86764285ec24edbdba5234b0593f83d355c22" => :catalina - sha256 "d02c761bd6b52424528bfdcd56b8d469d7cdd2e55f625c719229edb7f011889c" => :mojave - sha256 "abffeaf075db6387e636d43eb8fda9b76f02091bdb5533368306f899a46406c1" => :high_sierra - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libcoap.rb b/Formula/libcoap.rb deleted file mode 100644 index bb8857a5fef01..0000000000000 --- a/Formula/libcoap.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Libcoap < Formula - desc "Lightweight application-protocol for resource-constrained devices" - homepage "https://github.com/obgm/libcoap" - url "https://github.com/obgm/libcoap/archive/v4.2.1.tar.gz" - sha256 "29a0394a265d3febee41e5e2dc03d34292a0aede37f5f80334e529ac0dab2321" - - bottle do - cellar :any - sha256 "344f2a098d9f1767d50135fbf4ae3bdf893a079ebf8a54f248811673fa437e39" => :catalina - sha256 "012f1efcb1655479c531df4db98eb481d83971751edffb99b4ca8c50592cd27c" => :mojave - sha256 "a68df19a4ca87c677173c14b534848592bb35e46a715ca066bcd114f8c735236" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "doxygen" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" if MacOS.version <= :sierra - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", - "--disable-examples", - "--disable-manpages" - system "make" - system "make", "install" - end -end diff --git a/Formula/libconfig.rb b/Formula/libconfig.rb deleted file mode 100644 index 33a6d86607b77..0000000000000 --- a/Formula/libconfig.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Libconfig < Formula - desc "Configuration file processing library" - homepage "https://hyperrealm.github.io/libconfig/" - url "https://github.com/hyperrealm/libconfig/archive/v1.7.2.tar.gz" - sha256 "f67ac44099916ae260a6c9e290a90809e7d782d96cdd462cac656ebc5b685726" - license "LGPL-2.1" - head "https://github.com/hyperrealm/libconfig.git" - - bottle do - cellar :any - rebuild 1 - sha256 "5133affbfe2df2eccf05017748542e521e70a8db8763c8d8e39e00aec78fe3f8" => :catalina - sha256 "b1c005fc0d3a811efcef915d8e84d9cc2828d6c35c5649f71fab3c714b2ae1ea" => :mojave - sha256 "5762b7106a3e4ecc470193cd8abcfd40de090c456d42b413e545402246d73f69" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - config_t cfg; - config_init(&cfg); - config_destroy(&cfg); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-lconfig", - testpath/"test.c", "-o", testpath/"test" - system "./test" - end -end diff --git a/Formula/libcouchbase.rb b/Formula/libcouchbase.rb deleted file mode 100644 index 1b4c12419eb08..0000000000000 --- a/Formula/libcouchbase.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Libcouchbase < Formula - desc "C library for Couchbase" - homepage "https://docs.couchbase.com/c-sdk/3.0/hello-world/start-using-sdk.html" - url "https://packages.couchbase.com/clients/c/libcouchbase-3.0.2.tar.gz" - sha256 "901c1490c2f5627b969fe88eb0216576ba22bb6928844ee4283e8e0c6acee721" - license "Apache-2.0" - head "https://github.com/couchbase/libcouchbase.git" - - bottle do - sha256 "715d52f1da3bf6a1a14057170bb41aacd2469a98fb86bb8c75df0966ddb3c42a" => :catalina - sha256 "fdb0245134a07c6db0ab52ccd731f9b878e8f6ad332276fe2b2dcb7e33246952" => :mojave - sha256 "7dd7315f91680dc57b0306011f4b89672856992896764e02273ce303430fb237" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libev" - depends_on "libevent" - depends_on "libuv" - depends_on "openssl@1.1" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DLCB_NO_TESTS=1", - "-DLCB_BUILD_LIBEVENT=ON", - "-DLCB_BUILD_LIBEV=ON", - "-DLCB_BUILD_LIBUV=ON" - system "make", "install" - end - end - - test do - assert_match /LCB_ERR_CONNECTION_REFUSED/, - shell_output("#{bin}/cbc cat document_id -U couchbase://localhost:1 2>&1", 1).strip - end -end diff --git a/Formula/libcouchbase@2.rb b/Formula/libcouchbase@2.rb deleted file mode 100644 index 870e687ea005f..0000000000000 --- a/Formula/libcouchbase@2.rb +++ /dev/null @@ -1,36 +0,0 @@ -class LibcouchbaseAT2 < Formula - desc "C library for Couchbase" - homepage "https://docs.couchbase.com/c-sdk/2.10/start-using-sdk.html" - url "https://packages.couchbase.com/clients/c/libcouchbase-2.10.7.tar.gz" - sha256 "bbee97ef2394f275b8cd4b9b940010566a2d34d4754ba3532a7fca3d94029b75" - license "Apache-2.0" - bottle do - sha256 "d3065af67b6c27379c674fadeca9a3a37eda0323d701769c34ab4aa5d5e1a345" => :catalina - sha256 "b0fc35ac0a09d79476957fef601928fce6e9bc1abee8ec3522d59a389754fa39" => :mojave - sha256 "4efb6194205ecbd2149ccda7631ca9f5257bcf8bc8ea00e89d50fbb7f7113da2" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "libev" - depends_on "libevent" - depends_on "libuv" - depends_on "openssl@1.1" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DLCB_NO_TESTS=1", - "-DLCB_BUILD_LIBEVENT=ON", - "-DLCB_BUILD_LIBEV=ON", - "-DLCB_BUILD_LIBUV=ON" - system "make", "install" - end - end - - test do - assert_match /LCB_ECONNREFUSED/, - shell_output("#{bin}/cbc cat document_id -U couchbase://localhost:1 2>&1", 1).strip - end -end diff --git a/Formula/libcpuid.rb b/Formula/libcpuid.rb deleted file mode 100644 index a99ffce73cb94..0000000000000 --- a/Formula/libcpuid.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Libcpuid < Formula - desc "Small C library for x86 CPU detection and feature extraction" - homepage "https://github.com/anrieff/libcpuid" - url "https://github.com/anrieff/libcpuid/archive/v0.5.0.tar.gz" - sha256 "49893f31475510aa0ebe2ad3a29fad95e2a592cc5f48451c95271c536f89a157" - head "https://github.com/anrieff/libcpuid.git" - - bottle do - cellar :any - sha256 "df477785b9f155d2ed62f8d9213301bbfe32235f2337eff3e1d549bec2f92a7a" => :catalina - sha256 "cad37d2a433cab21c1776b0815efa0dba907c31444d81c7770f27df296ff9cd9" => :mojave - sha256 "e1370567a0f5ea7504d2f254a1b375006a19f6b68a5948fb4d51febfdfd194cc" => :high_sierra - 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", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"cpuid_tool" - assert_predicate testpath/"raw.txt", :exist? - assert_predicate testpath/"report.txt", :exist? - assert_match "CPUID is present", File.read(testpath/"report.txt") - end -end diff --git a/Formula/libcroco.rb b/Formula/libcroco.rb deleted file mode 100644 index fceaa64afe6f0..0000000000000 --- a/Formula/libcroco.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Libcroco < Formula - desc "CSS parsing and manipulation toolkit for GNOME" - homepage "https://gitlab.gnome.org/GNOME/libcroco" - url "https://download.gnome.org/sources/libcroco/0.6/libcroco-0.6.13.tar.xz" - sha256 "767ec234ae7aa684695b3a735548224888132e063f92db585759b422570621d4" - revision 1 - - bottle do - cellar :any - sha256 "bc64de8725726ae0188ec23dc9946759565f06e45d3eb10e510d5d42d0888e28" => :catalina - sha256 "edf97f493296bfe01b2a8cfe156f1e8052e181bed6ea34cabaf18ed59ef28b17" => :mojave - sha256 "f6e7d7d608dfcf6e57eaad77eef3cca27c15db0746e102f6dc33cccdd5a8a7bc" => :high_sierra - sha256 "a95e3733bd72b789cc9a3cb9dfc9a92153939b984c4d1d47b8aa806e99e99552" => :sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "glib" - - uses_from_macos "libxml2" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-Bsymbolic" - system "make", "install" - end - - test do - (testpath/"test.css").write ".brew-pr { color: green }" - assert_equal ".brew-pr {\n color : green\n}", - shell_output("#{bin}/csslint-0.6 test.css").chomp - end -end diff --git a/Formula/libcsv.rb b/Formula/libcsv.rb deleted file mode 100644 index 683a6f5502814..0000000000000 --- a/Formula/libcsv.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libcsv < Formula - desc "CSV library in ANSI C89" - homepage "https://sourceforge.net/projects/libcsv/" - url "https://downloads.sourceforge.net/project/libcsv/libcsv/libcsv-3.0.3/libcsv-3.0.3.tar.gz" - sha256 "d9c0431cb803ceb9896ce74f683e6e5a0954e96ae1d9e4028d6e0f967bebd7e4" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 2 - sha256 "e596efc37a1bf77cdbbab5fdc904e6ffa796f221b3ffa531f3ac24f56237d18a" => :catalina - sha256 "ad3c84168c138aef88134f7666f870dcb17f8b779b5e5b54417515f7c9b740af" => :mojave - sha256 "6946a6ff37a03f75d464cdc1229eb72251ae6b5d2726a658a016e39e862f0e33" => :high_sierra - sha256 "6d89efd634be6551134f099e458225325d76d69f55ba37676a3ccf7bea6c4e59" => :sierra - sha256 "3f69bb369fafd5c207f1c8ea500dc1e725e8e7dfe005215ff14b61fc25ac28e6" => :el_capitan - sha256 "ace67ec808ae6963525164b700ace39c8552f0c68364415401fea532f3ea2fe2" => :yosemite - sha256 "7c32b16f3528f615214dcca0633995ec01a70ff4db8badd09cbcc3a884fe64fc" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) { - struct csv_parser p; - csv_init(&p, CSV_STRICT); - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcsv", "-o", "test" - system "./test" - end -end diff --git a/Formula/libcue.rb b/Formula/libcue.rb deleted file mode 100644 index ba2040be0843f..0000000000000 --- a/Formula/libcue.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Libcue < Formula - desc "Cue sheet parser library for C" - homepage "https://github.com/lipnitsk/libcue" - url "https://github.com/lipnitsk/libcue/archive/v2.2.1.tar.gz" - sha256 "f27bc3ebb2e892cd9d32a7bee6d84576a60f955f29f748b9b487b173712f1200" - - bottle do - cellar :any - sha256 "17252ea3af3c3a75478e8526ae7856dadfa641d7eb050553503bfe383573e740" => :catalina - sha256 "e3f6c16d235459f97b299627d359cb9fbe7526b8635e08521b1c36460b045162" => :mojave - sha256 "209e548399503830e0f786c6faef21836aa350d67db644b9ad291703ebe2e9c5" => :high_sierra - sha256 "14a6edb39d2887ad6beeb34dad944501d01f70480a529cb7e50d838833404f4f" => :sierra - sha256 "27f8ab5419958ea5817e5e44b68f24ea2a0c27d12a664556b12f6789866d0da5" => :el_capitan - end - - depends_on "cmake" => :build - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - - def install - system "cmake", ".", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args - system "make", "install" - (pkgshare/"tests").install Dir["t/*"] - end - - test do - cp_r (pkgshare/"tests").children, testpath - Dir["*.c"].each do |f| - system ENV.cc, f, "-o", "test", "-L#{lib}", "-lcue", "-I#{include}" - system "./test" - rm "test" - end - end -end diff --git a/Formula/libcuefile.rb b/Formula/libcuefile.rb deleted file mode 100644 index d41353820c2b9..0000000000000 --- a/Formula/libcuefile.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Libcuefile < Formula - desc "Library to work with CUE files" - homepage "https://www.musepack.net/" - url "https://files.musepack.net/source/libcuefile_r475.tar.gz" - version "r475" - sha256 "b681ca6772b3f64010d24de57361faecf426ee6182f5969fcf29b3f649133fe7" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "3069cf9b0261d8cedee8979348227f5c77a5c6dcb8942f9fbea20b3e3f190374" => :catalina - sha256 "1e64fe68ce178b904ac44a7a2c017a030c6f0ff87fb18b7c943c8c766f23d186" => :mojave - sha256 "a0b9b31c26ac9dc2704e71834259c0f9d0a12dce4ad4bbcdaae64fea5004ceae" => :high_sierra - sha256 "66ec2d9281a5459326a1b2d220b9f68fa241a6b9f8370324377af6751d60b7fd" => :sierra - sha256 "fc48e0953e3df489f37ee30214bd50b07020955b02f957a90c699474f09ef974" => :el_capitan - sha256 "427a043ee4dc777743c80a836c5fa69c4de91ea2510f740db099224f95ed38b4" => :yosemite - sha256 "b3336424f211dfdd684537b4674afbe32e86179d9cf36dd3c07c3cb0e624cbb8" => :mavericks - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - include.install "include/cuetools/" - end -end diff --git a/Formula/libdaemon.rb b/Formula/libdaemon.rb deleted file mode 100644 index dcd8b1b27a642..0000000000000 --- a/Formula/libdaemon.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Libdaemon < Formula - desc "C library that eases writing UNIX daemons" - homepage "http://0pointer.de/lennart/projects/libdaemon/" - url "http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.14.tar.gz" - sha256 "fd23eb5f6f986dcc7e708307355ba3289abe03cc381fc47a80bca4a50aa6b834" - license "LGPL-2.1" - - bottle do - cellar :any - rebuild 2 - sha256 "ad96f0b0e09c3e0c178d3e903659d65ae34fea18365197924a4911c291d02531" => :catalina - sha256 "1fe52d810eca4471b4d285de02a09ea9e4b78d762f1a2a292d6da1eb10e9626d" => :mojave - sha256 "0933bb1dde0237f4079fefcd228ea644be36fbf814aa96762ebbae3537886558" => :high_sierra - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libdap.rb b/Formula/libdap.rb deleted file mode 100644 index 86cec1926cc41..0000000000000 --- a/Formula/libdap.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Libdap < Formula - desc "Framework for scientific data networking" - homepage "https://www.opendap.org/" - url "https://www.opendap.org/pub/source/libdap-3.20.6.tar.gz" - sha256 "35cc7f952d72de4936103e8a95c67ac8f9b855c9211fae73ad065331515cc54a" - - bottle do - sha256 "6a0bbd25fd0b5e873d34a46045c6ba72161007b9937d7957790bfc16bf5b05c3" => :catalina - sha256 "ce373bf6fbe4f5b28825fcf243633ae7a807d35b1627e985cc231bc722010793" => :mojave - sha256 "fbaa33ce89105a9cab0a7d8b22755524a93f39fb2a8e6d3c5a0459c2ded3bdf5" => :high_sierra - end - - head do - url "https://github.com/OPENDAP/libdap4.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "bison" => :build - depends_on "pkg-config" => :build - depends_on "libxml2" - depends_on "openssl@1.1" - - uses_from_macos "flex" => :build - uses_from_macos "curl" - - on_linux do - depends_on "util-linux" - end - - def install - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --disable-debug - --with-included-regex - ] - - system "autoreconf", "-fvi" if build.head? - system "./configure", *args - system "make" - system "make", "check" - system "make", "install" - - # Ensure no Cellar versioning of libxml2 path in dap-config entries - xml2 = Formula["libxml2"] - inreplace bin/"dap-config", xml2.opt_prefix.realpath, xml2.opt_prefix - end - - test do - assert_match version.to_s, shell_output("#{bin}/dap-config --version") - end -end diff --git a/Formula/libdazzle.rb b/Formula/libdazzle.rb deleted file mode 100644 index 53af3bed74961..0000000000000 --- a/Formula/libdazzle.rb +++ /dev/null @@ -1,103 +0,0 @@ -class Libdazzle < Formula - desc "GNOME companion library to GObject and Gtk+" - homepage "https://gitlab.gnome.org/GNOME/libdazzle" - url "https://download.gnome.org/sources/libdazzle/3.36/libdazzle-3.36.0.tar.xz" - sha256 "82b31bbf550fc62970c78bf7f9d55e5fae5b8ea13b24fe2d13c8c6039409d958" - revision 2 - - bottle do - cellar :any - sha256 "c5ef0fe994d0c84792d0d6eb1e55152b0aab5de0f26b1fb1a264a78dcafcc7da" => :catalina - sha256 "9ea4201e473688716ec21feb50eb76e6dc4fad93a5d93de78bb9b3978ab0998b" => :mojave - sha256 "8a595bba2bb9ae664b6a784e74b73d7d6b8538f9929384203149612c98c0ef0b" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "glib" - depends_on "gtk+3" - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Dwith_vapi=true", ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - g_assert_false(dzl_file_manager_show(NULL, NULL)); - 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"] - graphite2 = Formula["graphite2"] - 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#{graphite2.opt_include} - -I#{gtkx3.opt_include}/gtk-3.0 - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/libdazzle-1.0 - -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 - -lcairo - -lcairo-gobject - -ldazzle-1.0 - -lgdk-3 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lgtk-3 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - -Wl,-framework - -Wl,CoreFoundation - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libdbi.rb b/Formula/libdbi.rb deleted file mode 100644 index b0968897aa053..0000000000000 --- a/Formula/libdbi.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Libdbi < Formula - desc "Database-independent abstraction layer in C, similar to DBI/DBD in Perl" - homepage "https://libdbi.sourceforge.io/" - url "https://downloads.sourceforge.net/project/libdbi/libdbi/libdbi-0.9.0/libdbi-0.9.0.tar.gz" - sha256 "dafb6cdca524c628df832b6dd0bf8fabceb103248edb21762c02d3068fca4503" - license "LGPL-2.1" - - bottle do - cellar :any - rebuild 1 - sha256 "ce66e90000681c5f9174c3698ac4ceefd5d1be6ca4ffa574053f0705217c6837" => :catalina - sha256 "3aff10515535dc3f99dfa56644229daba74f719838d3e580754b3bbdc3c0429d" => :mojave - sha256 "eb3d8474601267d835b74b5a29944dc6d987486745dcfd17389be3a44b2c0175" => :high_sierra - end - - def install - system "./configure", "--disable-debug", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main(void) { - dbi_inst instance; - dbi_initialize_r(NULL, &instance); - printf("dbi version = %s\\n", dbi_version()); - dbi_shutdown_r(instance); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-ldbi", "-o", "test" - system "./test" - end -end diff --git a/Formula/libdc1394.rb b/Formula/libdc1394.rb deleted file mode 100644 index 903823044ed4a..0000000000000 --- a/Formula/libdc1394.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Libdc1394 < Formula - desc "Provides API for IEEE 1394 cameras" - homepage "https://damien.douxchamps.net/ieee1394/libdc1394/" - license "LGPL-2.1" - - stable do - url "https://downloads.sourceforge.net/project/libdc1394/libdc1394-2/2.2.6/libdc1394-2.2.6.tar.gz" - sha256 "2b905fc9aa4eec6bdcf6a2ae5f5ba021232739f5be047dec8fe8dd6049c10fed" - - # fix issue due to bug in OSX Firewire stack - # libdc1394 author comments here: - # https://permalink.gmane.org/gmane.comp.multimedia.libdc1394.devel/517 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/b8275aa07f/libdc1394/capture.patch" - sha256 "6e3675b7fb1711c5d7634a76d723ff25e2f7ae73cd1fbf3c4e49ba8e5dcf6c39" - end - end - - bottle do - cellar :any - sha256 "57080908a5da9abb2c0d83d4ad25450a507de8140a812112d9e5751f4004e4d0" => :catalina - sha256 "6cf02c5500f83fa2ccd1ff9b880f44f9652d68b0e90a2345d6c62fb92a988f0a" => :mojave - sha256 "536cbd34a43886d63a3dba41e7877ed63ad0fbe1a5e21cde499bd2c9e1e37e52" => :high_sierra - sha256 "ff1d7c6b07f21d8cd485574b10091eb21c2316390a7d4cfa84d29cccce8097e6" => :sierra - end - - head do - url "https://git.code.sf.net/p/libdc1394/code.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libusb" - end - - depends_on "sdl" - - def install - Dir.chdir("libdc1394") if build.head? - system "autoreconf", "-i", "-s" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-examples", - "--disable-sdltest" - system "make", "install" - end -end diff --git a/Formula/libdca.rb b/Formula/libdca.rb deleted file mode 100644 index 10a50cab9bff2..0000000000000 --- a/Formula/libdca.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Libdca < Formula - desc "Library for decoding DTS Coherent Acoustics streams" - homepage "https://www.videolan.org/developers/libdca.html" - url "https://download.videolan.org/pub/videolan/libdca/0.0.7/libdca-0.0.7.tar.bz2" - sha256 "3a0b13815f582c661d2388ffcabc2f1ea82f471783c400f765f2ec6c81065f6a" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "d9c4b3a350744867f5782db738d25d1212b9be89449030492083364574f914d7" => :catalina - sha256 "594d6b26eb3ca16c3046ff2792de4f78a0f038dc94b1972c8827e86331a46fde" => :mojave - sha256 "f8ba469ce443efa0e9fc87b51a87c6b4d510bd3e7bb91ae11d1f91e99f760acc" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - # Fixes "duplicate symbol ___sputc" error when building with clang - # https://github.com/Homebrew/homebrew/issues/31456 - ENV.append_to_cflags "-std=gnu89" - - system "autoreconf", "-fiv" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end -end diff --git a/Formula/libde265.rb b/Formula/libde265.rb deleted file mode 100644 index 205fcc2dbe27b..0000000000000 --- a/Formula/libde265.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Libde265 < Formula - desc "Open h.265 video codec implementation" - homepage "https://github.com/strukturag/libde265" - url "https://github.com/strukturag/libde265/releases/download/v1.0.5/libde265-1.0.5.tar.gz" - sha256 "e3f277d8903408615a5cc34718b391b83c97c646faea4f41da93bac5ee08a87f" - - bottle do - cellar :any - sha256 "7621e45fa0b119aff03a8c3ff3ed94bec24a2844a28cc10603b96e531afc3dab" => :catalina - sha256 "f0b536c23ac8080dd7946dd3bcbe2517f4a9b7e50b815e1ba745277c9982e6ac" => :mojave - sha256 "9815c937712d61876a1cb61241b60164f65cf463d6594d46857f691d37775882" => :high_sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-sherlock265", - "--disable-dec265", - "--prefix=#{prefix}" - system "make", "install" - - # Install the test-related executables in libexec. - (libexec/"bin").install bin/"acceleration_speed", - bin/"block-rate-estim", - bin/"tests" - end - - test do - system libexec/"bin/tests" - end -end diff --git a/Formula/libdeflate.rb b/Formula/libdeflate.rb deleted file mode 100644 index 0a9eb4709bf9f..0000000000000 --- a/Formula/libdeflate.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Libdeflate < Formula - desc "Heavily optimized DEFLATE/zlib/gzip compression and decompression" - homepage "https://github.com/ebiggers/libdeflate" - url "https://github.com/ebiggers/libdeflate/archive/v1.6.tar.gz" - sha256 "60748f3f7b22dae846bc489b22a4f1b75eab052bf403dd8e16c8279f16f5171e" - license "MIT" - - bottle do - cellar :any - sha256 "212aed6ec63f047e554de8f3214d7af20bff375032c8702df6f8964a568b072a" => :catalina - sha256 "6ac658a25367a45ad9d5a28a98e0f4fd80fd8a40fba01b2655a177a0b6ceafbc" => :mojave - sha256 "e61e6da245814b3964750d5db14567c85ed51421ea36e43aeee81906fd04a4d3" => :high_sierra - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"foo").write "test" - system "#{bin}/libdeflate-gzip", "foo" - system "#{bin}/libdeflate-gunzip", "-d", "foo.gz" - assert_equal "test", shell_output("cat foo") - end -end diff --git a/Formula/libdill.rb b/Formula/libdill.rb deleted file mode 100644 index db53c47decbb7..0000000000000 --- a/Formula/libdill.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Libdill < Formula - desc "Structured concurrency in C" - homepage "http://libdill.org/" - url "https://github.com/sustrik/libdill/archive/2.14.tar.gz" - sha256 "ebba0e5b433ec123b74a57d49b89dfa673aa258e03e6a452959e556b4c4529b9" - license "MIT" - - bottle do - cellar :any - sha256 "124f2fd7aa4ba68e528bd2700637511943ae55ec9c2b2c9dcdb3bff1f2e34909" => :catalina - sha256 "7ebbbe85ab5989b48664688c9fdc833b4bbc7846ea94f3f73c34ef620026b878" => :mojave - sha256 "062d2f9f6fdeb5588036d3e06752ecfd95b5f4e7b6008b727208fc0a2e7f50a6" => :high_sierra - sha256 "6f75a82c15eafe6818b0d79e9c55df0654c6665f37841ee21cf7fb90ac578a92" => :sierra - 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", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - coroutine void worker(const char *text) { - while(1) { - printf("%s\\n", text); - msleep(now() + random() % 500); - } - } - - int main() { - go(worker("Hello!")); - go(worker("World!")); - msleep(now() + 5000); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-ldill", "-o", "test", "test.c" - system "./test" - end -end diff --git a/Formula/libdiscid.rb b/Formula/libdiscid.rb deleted file mode 100644 index 0ef55c58d2798..0000000000000 --- a/Formula/libdiscid.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Libdiscid < Formula - desc "C library for creating MusicBrainz and freedb disc IDs" - homepage "https://musicbrainz.org/doc/libdiscid" - url "http://ftp.musicbrainz.org/pub/musicbrainz/libdiscid/libdiscid-0.6.2.tar.gz" - sha256 "f9e443ac4c0dd4819c2841fcc82169a46fb9a626352cdb9c7f65dd3624cd31b9" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "74dd7ef5362b91818107ef3c8c3edab443faf8a17662294a24573e5f476110c7" => :catalina - sha256 "f6a415ae56c151ccef5e10cc239675be8cbd7dcf60a8b9c88c87a756bda5bd9a" => :mojave - sha256 "3ffb586f09efcd9322a28bafc671292d0caf38edc18326c048a7390ced94979f" => :high_sierra - sha256 "6d43fee98239a6a600e59cce0f4f2ceda713bf27cc3d03bc8711d1c773ba84b6" => :sierra - sha256 "22e96d837cfe404cf268c41f6ce26c6b47eb8a991578ce1f18bcea862f9f1c91" => :el_capitan - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libdivecomputer.rb b/Formula/libdivecomputer.rb deleted file mode 100644 index 583a32da76437..0000000000000 --- a/Formula/libdivecomputer.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Libdivecomputer < Formula - desc "Library for communication with various dive computers" - homepage "https://www.libdivecomputer.org/" - url "https://www.libdivecomputer.org/releases/libdivecomputer-0.6.0.tar.gz" - sha256 "a0fe75b7e5f7d8b73bfe46beb858dde4f5e2b2692d5270c96e69f5cb34aba15a" - license "LGPL-2.1" - head "https://git.code.sf.net/p/libdivecomputer/code.git" - - bottle do - cellar :any - sha256 "77d221b1a1761aaab3beb86663f18f2610874a9b95158aef7b5620f12bc39310" => :catalina - sha256 "d27cbe3800c83225dade44ea62ae7ddfa4018866ed1a6628b6f3bda6abf68df7" => :mojave - sha256 "09dd65b72be93f3364b0b0da389fc4aa4d1fea2094ffe53275544e74ac6a7674" => :high_sierra - sha256 "bbc60092aee1409bd0001e2f3cfdde47bb3d2348d3bf18f1fc6921920607f947" => :sierra - sha256 "507134023caaaebd5b1689f324aea50839e13f57d180f7134ee270edc2b02cf6" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libusb" - - def install - system "autoreconf", "--install" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - int main(int argc, char *argv[]) { - dc_iterator_t *iterator; - dc_descriptor_t *descriptor; - dc_descriptor_iterator(&iterator); - while (dc_iterator_next(iterator, &descriptor) == DC_STATUS_SUCCESS) - { - dc_descriptor_free(descriptor); - } - dc_iterator_free(iterator); - return 0; - } - EOS - flags = %W[ - -I#{include} - -L#{lib} - -ldivecomputer - ] - system ENV.cc, "-v", "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libdmtx.rb b/Formula/libdmtx.rb deleted file mode 100644 index 8a24f2421a1b4..0000000000000 --- a/Formula/libdmtx.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Libdmtx < Formula - desc "Data Matrix library" - homepage "https://libdmtx.sourceforge.io/" - url "https://github.com/dmtx/libdmtx/archive/v0.7.5.tar.gz" - sha256 "be0c5275695a732a5f434ded1fcc232aa63b1a6015c00044fe87f3a689b75f2e" - - bottle do - cellar :any - sha256 "b4e2a70da91f992862a3609e5e79b9aedc648c97e374b75e701d95eef88b8133" => :catalina - sha256 "4631cea68d83f274390ff023591256a92fb108b685c0528448a43a48d583c09b" => :mojave - sha256 "eb892feb7d29f9291a0edc2be6c34b4584614103d4af9d1c62eb54370decd8e1" => :high_sierra - sha256 "c93913cd5aff29278c538957fd6890d990f760abaff1b14cea6f6f171194b706" => :sierra - sha256 "ebcd82bf4d9da2a71bd066722ce6750d6cf064b1c8f477ba9aca47987acd330c" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "install" - end -end diff --git a/Formula/libdnet.rb b/Formula/libdnet.rb deleted file mode 100644 index a9c72833ec483..0000000000000 --- a/Formula/libdnet.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Libdnet < Formula - desc "Portable low-level networking library" - homepage "https://github.com/dugsong/libdnet" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libdnet/libdnet-1.12.tgz" - sha256 "83b33039787cf99990e977cef7f18a5d5e7aaffc4505548a83d31bd3515eb026" - - bottle do - cellar :any - rebuild 4 - sha256 "f0f94480e8f973b31b39dfbb7f594c678f02c7176559badb1d31d644deb0a34a" => :catalina - sha256 "540ccb96d3647a0d71f563e06d08e410d14b7d09c23f6348bc91fd22251e5ff2" => :mojave - sha256 "ece250e6792f542e5546ac5e8e5144fe07c76ce3ddb94216181e85092d530e81" => :high_sierra - sha256 "bb550ef762ca5d65f87b65575758557afcf8e6b93855be32638cab265540ba6b" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - # autoreconf to get '.dylib' extension on shared lib - ENV.append_path "ACLOCAL_PATH", "config" - system "autoreconf", "-ivf" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system "#{bin}/dnet-config", "--version" - end -end diff --git a/Formula/libdrawtext.rb b/Formula/libdrawtext.rb deleted file mode 100644 index d877d178d5c1e..0000000000000 --- a/Formula/libdrawtext.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Libdrawtext < Formula - desc "Library for anti-aliased text rendering in OpenGL" - homepage "http://nuclear.mutantstargoat.com/sw/libdrawtext/" - url "https://github.com/jtsiomb/libdrawtext/archive/v0.5.tar.gz" - sha256 "7eea99dbf9c86698b5b00ad7f0675b9327098112bf5c11f1bad0635077eae8a9" - license "LGPL-3.0" - head "https://github.com/jtsiomb/libdrawtext.git" - - bottle do - cellar :any - sha256 "e6aea4db0e3298e04dfbb215bcedcc4302d76965f82b4dfc921636dbc24ff939" => :catalina - sha256 "0c63e8d53c61bcda8452501c584b2f06919054f4e447fa9ce8c929b0bee50d24" => :mojave - sha256 "a4169631c0ac82995409931836ea16664618d37650337e994bfea7121a386791" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "freetype" - - patch do - url "https://github.com/jtsiomb/libdrawtext/commit/543cfc67beb76e2c25df0a329b5d38eff9d36c71.diff?full_index=1" - sha256 "a2d7ad77e7f1a4590ca85754de2f9961c921c34723f6c86cdd23395cc3566be0" - end - - def install - system "./configure", "--disable-dbg", "--enable-opt", "--prefix=#{prefix}" - system "make", "install" - system "make", "-C", "tools/font2glyphmap" - system "make", "-C", "tools/font2glyphmap", "PREFIX=#{prefix}", "install" - pkgshare.install "examples" - end - - test do - ext = (MacOS.version >= :high_sierra) ? "otf" : "ttf" - cp "/System/Library/Fonts/LastResort.#{ext}", testpath - system bin/"font2glyphmap", "LastResort.#{ext}" - bytes = File.read("LastResort_s12.glyphmap").bytes.to_a[0..12] - assert_equal [80, 53, 10, 53, 49, 50, 32, 53, 49, 50, 10, 35, 32], bytes - end -end diff --git a/Formula/libdshconfig.rb b/Formula/libdshconfig.rb deleted file mode 100644 index 8b3de966f1001..0000000000000 --- a/Formula/libdshconfig.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Libdshconfig < Formula - desc "Distributed shell library" - homepage "https://www.netfort.gr.jp/~dancer/software/dsh.html.en" - url "https://www.netfort.gr.jp/~dancer/software/downloads/libdshconfig-0.20.13.tar.gz" - sha256 "6f372686c5d8d721820995d2b60d2fda33fdb17cdddee9fce34795e7e98c5384" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "eb5fb662035498062529345467af13234be5d022ccec9d2b3e2ad3437ff96e04" => :catalina - sha256 "7e2632a44dad0f9eedc38577c8dcb8c11856e036f05ba444a814f8bd93dd47ea" => :mojave - sha256 "2000ae2106bb3b10a77b91b75a40dbb6ec60a8aad8de220aa2af69e1a41b905f" => :high_sierra - sha256 "82fc9db7c3ad20bdcd5681be1075ae4853b6f19caeb41624dac33d53470b2523" => :sierra - sha256 "a26ea1d1cefed24fd890bbc65f9a11d171cdbcb1c00936562255e2adfe29205f" => :el_capitan - sha256 "7f4e5e77fc14d6920bd212e9c812c7dad51ad1dbe1542f1c0e4999928db9ad3f" => :yosemite - sha256 "c1c35337d7b2bebb59d07a8f792493f1da89f2701eae58d382bb24edfd2c73d3" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libdsk.rb b/Formula/libdsk.rb deleted file mode 100644 index 4bec623b2c2ad..0000000000000 --- a/Formula/libdsk.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Libdsk < Formula - desc "Library for accessing discs and disc image files" - homepage "https://www.seasip.info/Unix/LibDsk/" - url "https://www.seasip.info/Unix/LibDsk/libdsk-1.4.2.tar.gz" - sha256 "71eda9d0e33ab580cea1bb507467877d33d887cea6ec042b8d969004db89901a" - - bottle do - sha256 "f444a8f81a4767668f4cbffa2ef09268279d23780e92b7d4bc2d6ed44c9cd675" => :catalina - sha256 "47485db7001965531b700308a3d464a616703ddd8fdca64c8a7d2b5049481eb5" => :mojave - sha256 "b4fa361c1800fd348c804873fd03f8663f7324eed228c3ba2e2d809a58fbbb97" => :high_sierra - sha256 "d46bdf8e9c779b22a2a21c123572c08130aa36b8a817365ee3bd76219478aad3" => :sierra - sha256 "b14fb001603c2ba33a26c0f49c7b008659ca5aa05ffaa01ab8147bac4da40d46" => :el_capitan - end - - def install - # Avoid lyx dependency - inreplace "Makefile.in", "SUBDIRS = . include lib tools man doc", - "SUBDIRS = . include lib tools man" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - doc.install Dir["doc/*.{html,pdf,sample,txt}"] - end - - test do - assert_equal "#{name} version #{version}\n", shell_output(bin/"dskutil --version") - end -end diff --git a/Formula/libdv.rb b/Formula/libdv.rb deleted file mode 100644 index 6a78becac6885..0000000000000 --- a/Formula/libdv.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libdv < Formula - desc "Codec for DV video encoding format" - homepage "https://libdv.sourceforge.io/" - url "https://downloads.sourceforge.net/libdv/libdv-1.0.0.tar.gz" - sha256 "a305734033a9c25541a59e8dd1c254409953269ea7c710c39e540bd8853389ba" - - bottle do - cellar :any - rebuild 1 - sha256 "ee4a56e9a1462b87632dca0048808d4918b5a72fd943cce8ee600d138c9f67f6" => :catalina - sha256 "ec2564e27b321ebb35a3278d6e7411d17d1b1acad5dbcd40106cbcaf24205b53" => :mojave - sha256 "0f7c7db1baa95682ad66b9d628d51978f162558f6d8296715a38150f83a7c72f" => :high_sierra - sha256 "9ea1a006d7aa954c5a1d61497f9f7f43e0b1bd5bce911b6d334a693d8af58671" => :sierra - sha256 "0624e82748111d0a8a050a802ec4251c443127c39c93b3b2469a00816a602040" => :el_capitan - sha256 "49262f766082fa4c9a509236bdaf5eec8746a8c4b9724fc83521bfc5725660c7" => :yosemite - sha256 "830002340f10dae43ba81d370bfbcd92a40f8b9330ed03fcb627b70983069a7b" => :mavericks - end - - depends_on "popt" - - def install - # This fixes an undefined symbol error on compile. - # See the port file for libdv: - # https://trac.macports.org/browser/trunk/dports/multimedia/libdv/Portfile - # This flag is the preferred method over what macports uses. - # See the apple docs: https://cl.ly/2HeF bottom of the "Finding Imported Symbols" section - ENV.append "LDFLAGS", "-undefined dynamic_lookup" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-gtktest", - "--disable-gtk", - "--disable-asm", - "--disable-sdltest" - system "make", "install" - end -end diff --git a/Formula/libdvbpsi.rb b/Formula/libdvbpsi.rb deleted file mode 100644 index 160601be20873..0000000000000 --- a/Formula/libdvbpsi.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Libdvbpsi < Formula - desc "Library to decode/generate MPEG TS and DVB PSI tables" - homepage "https://www.videolan.org/developers/libdvbpsi.html" - url "https://download.videolan.org/pub/libdvbpsi/1.3.3/libdvbpsi-1.3.3.tar.bz2" - sha256 "02b5998bcf289cdfbd8757bedd5987e681309b0a25b3ffe6cebae599f7a00112" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "b6e6f300bbc36fabf785f74abb083c5cfc3f91fdd51ee7bd058cc579e709c78d" => :catalina - sha256 "26298540d01f52628385c83cac4b6666543af4cc059fa7ad5b3a8bd458955628" => :mojave - sha256 "c6d79686bf05346bc473cc148b68901d99ac447a85542ff68d089c71eda1bc87" => :high_sierra - sha256 "8bb1f1fff61674756153e8aec744d5d3c726da0c4ecd4bd291cae732e8264af3" => :sierra - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking", "--enable-release" - system "make", "install" - end -end diff --git a/Formula/libdvdcss.rb b/Formula/libdvdcss.rb deleted file mode 100644 index d54a97fad77c7..0000000000000 --- a/Formula/libdvdcss.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Libdvdcss < Formula - desc "Access DVDs as block devices without the decryption" - homepage "https://www.videolan.org/developers/libdvdcss.html" - url "https://download.videolan.org/pub/videolan/libdvdcss/1.4.2/libdvdcss-1.4.2.tar.bz2" - sha256 "78c2ed77ec9c0d8fbed7bf7d3abc82068b8864be494cfad165821377ff3f2575" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "352a2c343c04e65ee38fe154c797a29cc9cca509212e2296e9cd54e3e824ce29" => :catalina - sha256 "645422cdd6facba8137146fd12df0538b27432a72bc79c5ca8c2667ab9fc70bc" => :mojave - sha256 "4029db91ed7536435bd29db6b67f55509be13e70b6170337edec72daad8992c4" => :high_sierra - sha256 "907d51957c4674ddeb27b458dcf5f1f4b382219bda893fc8908147acc1c2b1ea" => :sierra - sha256 "0aaed21ecd3c8d3b4a9997300a599de5a541689ab200a6ffce52167b2ce5b664" => :el_capitan - end - - head do - url "https://code.videolan.org/videolan/libdvdcss.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "autoreconf", "-if" if build.head? - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - end -end diff --git a/Formula/libdvdnav.rb b/Formula/libdvdnav.rb deleted file mode 100644 index 259c28eb0c4d1..0000000000000 --- a/Formula/libdvdnav.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Libdvdnav < Formula - desc "DVD navigation library" - homepage "https://www.videolan.org/developers/libdvdnav.html" - url "https://download.videolan.org/pub/videolan/libdvdnav/6.1.0/libdvdnav-6.1.0.tar.bz2" - sha256 "f697b15ea9f75e9f36bdf6ec3726308169f154e2b1e99865d0bbe823720cee5b" - revision 1 - - bottle do - cellar :any - sha256 "e20bd00c923e4e837a1eac6f89933377afd17957be74a175734d7896efceb27a" => :catalina - sha256 "6c13d8aa2220232e9a0e5317371bd52909ec55b0bb08ed7b591612b60814dc7a" => :mojave - sha256 "a9c90f8109ce908ffc4fc0b6972ff4869638de8f52787bedd2c471ce457e1edf" => :high_sierra - end - - head do - url "https://code.videolan.org/videolan/libdvdnav.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libdvdread" - - def install - system "autoreconf", "-if" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libdvdread.rb b/Formula/libdvdread.rb deleted file mode 100644 index e318536a34d75..0000000000000 --- a/Formula/libdvdread.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Libdvdread < Formula - desc "C library for reading DVD-video images" - homepage "https://www.videolan.org/developers/libdvdnav.html" - url "https://download.videolan.org/pub/videolan/libdvdread/6.1.1/libdvdread-6.1.1.tar.bz2" - sha256 "3e357309a17c5be3731385b9eabda6b7e3fa010f46022a06f104553bf8e21796" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "83bebe58015f6f34973afa003934f183e7ac9202f5e579cfd12536f9ceac1719" => :catalina - sha256 "7405838fee2b93209c2bd0834db89c2a2334a94f7d368feb87599da1b08062f6" => :mojave - sha256 "c881a8c1c872d922f45bf8a692b9d79b5f6ade1a2f4a48d470d05491bc017436" => :high_sierra - end - - head do - url "https://code.videolan.org/videolan/libdvdread.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "libdvdcss" - - def install - ENV.append "CFLAGS", "-DHAVE_DVDCSS_DVDCSS_H" - ENV.append "LDFLAGS", "-ldvdcss" - - system "autoreconf", "-if" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libebml.rb b/Formula/libebml.rb deleted file mode 100644 index f059eb25162f5..0000000000000 --- a/Formula/libebml.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Libebml < Formula - desc "Sort of a sbinary version of XML" - homepage "https://www.matroska.org/" - url "https://dl.matroska.org/downloads/libebml/libebml-1.4.0.tar.xz" - sha256 "80abc9a82549615018798ee704997270a39b43de9a6e7e0d23b62f8ce682c4b3" - license "LGPL-2.1" - head "https://github.com/Matroska-Org/libebml.git" - - bottle do - cellar :any - sha256 "141c96c12242fb7db7e292f487b9e45be1c4c84a4e7d94f0eab2ccb0d72d8285" => :catalina - sha256 "010e20e9b1779db7e69666a10c93bfb6a87c06e513ed80c89ea319c674eb215d" => :mojave - sha256 "505546edc98c4e9a382c35d17e299023f2ca91b2641f71691993dc99690f79b0" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args - system "make", "install" - end - end -end diff --git a/Formula/libebur128.rb b/Formula/libebur128.rb deleted file mode 100644 index f508747f37390..0000000000000 --- a/Formula/libebur128.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libebur128 < Formula - desc "Library implementing the EBU R128 loudness standard" - homepage "https://github.com/jiixyj/libebur128" - url "https://github.com/jiixyj/libebur128/archive/v1.2.4.tar.gz" - sha256 "2ee41a3a5ae3891601ae975d5ec2642b997d276ef647cf5c5b363b6127f7add8" - license "MIT" - - bottle do - cellar :any - sha256 "f9bb6bf89d6a32835102ab859e88ab118812ea7920ab1e4416f7ff7f9b2692a6" => :catalina - sha256 "c51ca6f8e17f7558f35f4c156e7baba1e2658d475dc09eea1b2695e1b1771d42" => :mojave - sha256 "68c4f6d13808ad4d55d0a0f48384e9872286b6041a06f8c3984ccb96083fcbee" => :high_sierra - sha256 "d4611c0f7becaf4fbdc34089ddaae18e8017ed6dec859adf4fdadb528f989ae4" => :sierra - sha256 "3fbb561a893cd7e0858ad25e424e66f70a53023865b33d3519fb1fa62ab35bec" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "speex" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - ebur128_init(5, 44100, EBUR128_MODE_I); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lebur128", "-o", "test" - system "./test" - end -end diff --git a/Formula/libedit.rb b/Formula/libedit.rb deleted file mode 100644 index 4ec4e0cf45a55..0000000000000 --- a/Formula/libedit.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Libedit < Formula - desc "BSD-style licensed readline alternative" - homepage "https://thrysoee.dk/editline/" - url "https://thrysoee.dk/editline/libedit-20191231-3.1.tar.gz" - version "20191231-3.1" - sha256 "dbb82cb7e116a5f8025d35ef5b4f7d4a3cdd0a3909a146a39112095a2d229071" - - bottle do - cellar :any - sha256 "faa58f2e587c5b982af44765f7a034a27837fc1e94816e094ace3f408ab4a7bf" => :catalina - sha256 "a707377be9d5fef881cdbb77ad3b562c9d5f54befb97a10d0b7158e4db87ef86" => :mojave - sha256 "06e087927f024a9030947216be3aaa46f97fc9dcc1b70959f60240b86bd8f574" => :high_sierra - end - - keg_only :provided_by_macos - - uses_from_macos "ncurses" - - 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(int argc, char *argv[]) { - EditLine *el = el_init(argv[0], stdin, stdout, stderr); - return (el == NULL); - } - EOS - system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-ledit", "-I#{include}" - system "./test" - end -end diff --git a/Formula/libelf.rb b/Formula/libelf.rb deleted file mode 100644 index 94e2f1570932f..0000000000000 --- a/Formula/libelf.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Libelf < Formula - desc "ELF object file access library" - homepage "https://web.archive.org/web/20181111033959/www.mr511.de/software/english.html" - url "https://dl.bintray.com/homebrew/mirror/libelf-0.8.13.tar.gz" # using this url since original source is offline ( https://github.com/Homebrew/homebrew-core/pull/54887 ) - sha256 "591a9b4ec81c1f2042a97aa60564e0cb79d041c52faa7416acb38bc95bd2c76d" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "b7635245b64cc7d857c92191c40877cba96871d07f4749f620bc96c63cd2635e" => :catalina - sha256 "7cb626407ee7d61546f2493da91ecc63996d6180949b96b84793e075bd130f2d" => :mojave - sha256 "e11504a15c64cd7fca3248ca7ed14eead25a5d63d8bbd9a8e00f076c56602295" => :high_sierra - sha256 "a771e35555810a4910304e3ca5967ea3e4f8cbe45576e5b2dc6b80cd9c1f0f13" => :sierra - sha256 "a06b058c7e401942f442f573b63aa2cdd548b45d38b02b7af92393c67093f56e" => :el_capitan - sha256 "3b4ea9ab20228d9e912f80a330b6d6d093f9bb65a712208c83cd49bdcc4fc9ea" => :yosemite - sha256 "eded3b774d412e533f37bc6d5dc133859141653ce953a0d4cbf4a950dda633f6" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-compat" - # Use separate steps; there is a race in the Makefile. - system "make" - system "make", "install" - end - - test do - elf_content = "7F454C460101010000000000000000000200030001000000548004083" \ - "4000000000000000000000034002000010000000000000001000000000000000080040" \ - "80080040874000000740000000500000000100000B00431DB43B96980040831D2B20CC" \ - "D8031C040CD8048656C6C6F20776F726C640A" - File.open(testpath/"elf", "w+b") do |file| - file.write([elf_content].pack("H*")) - end - - (testpath/"test.c").write <<~EOS - #include - #include - #include - - int main(void) { - GElf_Ehdr ehdr; - int fd = open("elf", O_RDONLY, 0); - if (elf_version(EV_CURRENT) == EV_NONE) return 1; - Elf *e = elf_begin(fd, ELF_C_READ, NULL); - if (elf_kind(e) != ELF_K_ELF) return 1; - if (gelf_getehdr(e, &ehdr) == NULL) return 1; - printf("%d-bit ELF\\n", gelf_getclass(e) == ELFCLASS32 ? 32 : 64); - return 0; - } - EOS - - system ENV.cc, "test.c", "-L#{lib}", "-I#{include}/libelf", - "-lelf", "-o", "test" - assert_match "32-bit ELF", shell_output("./test") - end -end diff --git a/Formula/libepoxy.rb b/Formula/libepoxy.rb deleted file mode 100644 index 452607881609a..0000000000000 --- a/Formula/libepoxy.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Libepoxy < Formula - desc "Library for handling OpenGL function pointer management" - homepage "https://github.com/anholt/libepoxy" - url "https://download.gnome.org/sources/libepoxy/1.5/libepoxy-1.5.4.tar.xz" - sha256 "0bd2cc681dfeffdef739cb29913f8c3caa47a88a451fd2bc6e606c02997289d2" - revision 1 - - bottle do - cellar :any - sha256 "9f58a2eab6aafcc95ade6893bde8d878ab422284353e22c11d04c3a6f3a1e7cb" => :catalina - sha256 "e42a0410e6f94fa419f785c5b0901eea1506242b1729f97b672f25b463ce3d4e" => :mojave - sha256 "95cbc3ce1fc94931e0259f9e55a25d9dcacacd70713ae3e59cba28f3d7ff2a3a" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - - #include - #include - #include - int main() - { - CGLPixelFormatAttribute attribs[] = {0}; - CGLPixelFormatObj pix; - int npix; - CGLContextObj ctx; - - CGLChoosePixelFormat( attribs, &pix, &npix ); - CGLCreateContext(pix, (void*)0, &ctx); - - glClear(GL_COLOR_BUFFER_BIT); - CGLReleasePixelFormat(pix); - CGLReleaseContext(pix); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lepoxy", "-framework", "OpenGL", "-o", "test" - system "ls", "-lh", "test" - system "file", "test" - system "./test" - end -end diff --git a/Formula/liberasurecode.rb b/Formula/liberasurecode.rb deleted file mode 100644 index 31ce0a086ab49..0000000000000 --- a/Formula/liberasurecode.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Liberasurecode < Formula - desc "Erasure Code API library written in C with pluggable backends" - homepage "https://github.com/openstack/liberasurecode" - url "https://github.com/openstack/liberasurecode/archive/1.6.1.tar.gz" - sha256 "958b01ff91efe7b21a19ca72937a93b2a5c7af41c08790d4fe9df82d8c5e24f0" - license "BSD-2-Clause" - - bottle do - cellar :any - sha256 "f50f0786b554d9e619da955a98785a8ff6513bd4d244d80a37582a35a9f0adc9" => :catalina - sha256 "fba6eb4f5a66f164cb2938a5a2981d4879915a225edefb4ff857910170e52e7a" => :mojave - sha256 "7d96611a687605c4856d139d6b1c6305ed686587ee67683c7f3068fa6e5332b0" => :high_sierra - sha256 "d7a79bb75e8f7c5099a453ec3a4c2dca8d78d3823101158be68f005e068311fc" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "jerasure" - - uses_from_macos "zlib" - - def install - system "./autogen.sh" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"liberasurecode-test.cpp").write <<~EOS - #include - - int main() { - /* - * Assumes if you can create an erasurecode instance that - * the library loads, relying on the library test suites - * to test for correctness. - */ - struct ec_args args = { - .k = 10, - .m = 5, - .hd = 3 - }; - int ed = liberasurecode_instance_create( - EC_BACKEND_FLAT_XOR_HD, - &args - ); - - if (ed <= 0) { exit(1); } - liberasurecode_instance_destroy(ed); - - exit(0); - } - EOS - system ENV.cxx, "liberasurecode-test.cpp", "-L#{lib}", "-lerasurecode", - "-I#{include}/liberasurecode", "-o", "liberasurecode-test" - system "./liberasurecode-test" - end -end diff --git a/Formula/libestr.rb b/Formula/libestr.rb deleted file mode 100644 index 1114b5e10938a..0000000000000 --- a/Formula/libestr.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Libestr < Formula - desc "C library for string handling (and a bit more)" - homepage "https://libestr.adiscon.com/" - url "https://libestr.adiscon.com/files/download/libestr-0.1.11.tar.gz" - sha256 "46632b2785ff4a231dcf241eeb0dcb5fc0c7d4da8ee49cf5687722cdbe8b2024" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "f539c76e3acdd0a93def55a0e82ecf45c53de65dc6dc18fd123efe815d8a65cd" => :catalina - sha256 "543dcd541a69d52d5d1d21d51d0cf57c1617cc177f743c2dfea8ea3d548b93e8" => :mojave - sha256 "7f17c5dbb6534afe6b37ae1d1f994d3387cd8527d6aaa768604837ac681eee59" => :high_sierra - sha256 "5ff130cf6aa42842636dd90b7a8e7e60adbb289682bd915c98937b032c38fc54" => :sierra - end - - depends_on "pkg-config" => :build - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include "stdio.h" - #include - int main() { - printf("%s\\n", es_version()); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lestr", "-o", "test" - system "./test" - end -end diff --git a/Formula/libetonyek.rb b/Formula/libetonyek.rb deleted file mode 100644 index 9777b44b4b8bb..0000000000000 --- a/Formula/libetonyek.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Libetonyek < Formula - desc "Interpret and import Apple Keynote presentations" - homepage "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek" - url "https://dev-www.libreoffice.org/src/libetonyek/libetonyek-0.1.9.tar.xz" - sha256 "e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a" - revision 1 - - bottle do - rebuild 1 - sha256 "fe426f3577057ac3a73b9527b01124e5f916872b505f12e8224674d72a700c5b" => :catalina - sha256 "b51d5847f87fba35e67703d248f0552a4e03eb6fc4e35ba5a180f41fec68fdeb" => :mojave - sha256 "d86fef6a245db1b767d8965362eae4782af35b2c2b14e819ae7d436790f909cd" => :high_sierra - end - - depends_on "boost" => :build - depends_on "glm" => :build - depends_on "mdds" => :build - depends_on "pkg-config" => :build - depends_on "librevenge" - - uses_from_macos "libxml2" - - resource "liblangtag" do - url "https://bitbucket.org/tagoh/liblangtag/downloads/liblangtag-0.6.2.tar.bz2" - sha256 "d6242790324f1432fb0a6fae71b6851f520b2c5a87675497cf8ea14c2924d52e" - end - - def install - resource("liblangtag").stage do - system "./configure", "--prefix=#{libexec}", "--enable-modules=no" - system "make" - system "make", "install" - end - - ENV["LANGTAG_CFLAGS"] = "-I#{libexec}/include" - ENV["LANGTAG_LIBS"] = "-L#{libexec}/lib -llangtag -lxml2" - system "./configure", "--without-docs", - "--disable-dependency-tracking", - "--enable-static=no", - "--disable-werror", - "--disable-tests", - "--prefix=#{prefix}", - "--with-mdds=1.5" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - return libetonyek::EtonyekDocument::RESULT_OK; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", - "-I#{Formula["librevenge"].include}/librevenge-0.0", - "-I#{include}/libetonyek-0.1", - "-L#{Formula["librevenge"].lib}", - "-L#{lib}", - "-lrevenge-0.0", - "-letonyek-0.1" - system "./test" - end -end diff --git a/Formula/libetpan.rb b/Formula/libetpan.rb deleted file mode 100644 index 16a008fae3db8..0000000000000 --- a/Formula/libetpan.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Libetpan < Formula - desc "Portable mail library handling several protocols" - homepage "https://www.etpan.org/libetpan.html" - url "https://github.com/dinhviethoa/libetpan/archive/1.9.4.tar.gz" - sha256 "82ec8ea11d239c9967dbd1717cac09c8330a558e025b3e4dc6a7594e80d13bb1" - head "https://github.com/dinhviethoa/libetpan.git", :branch => "master" - - bottle do - cellar :any - sha256 "2effe5528f31ea1edcdd0baf468bb1ebbfb0061cb8bf131f2636b5db6cc20550" => :catalina - sha256 "ba4948b8f0169ee43ba18b0dbea0564bfd5a2c625834f6f5a5c4b9ac1d725334" => :mojave - sha256 "6a2f29f42a39d9d3eee7bca1974118fdd8d44a745f61af686aa40c449157b733" => :high_sierra - end - - depends_on :xcode => :build - - def install - xcodebuild "-project", "build-mac/libetpan.xcodeproj", - "-scheme", "static libetpan", - "-configuration", "Release", - "SYMROOT=build/libetpan", - "build" - - xcodebuild "-project", "build-mac/libetpan.xcodeproj", - "-scheme", "libetpan", - "-configuration", "Release", - "SYMROOT=build/libetpan", - "build" - - lib.install "build-mac/build/libetpan/Release/libetpan.a" - frameworks.install "build-mac/build/libetpan/Release/libetpan.framework" - include.install Dir["build-mac/build/libetpan/Release/include/**"] - bin.install "libetpan-config" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - int main(int argc, char ** argv) - { - printf("version is %d.%d",libetpan_get_version_major(), libetpan_get_version_minor()); - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-letpan", "-o", "test" - system "./test" - end -end diff --git a/Formula/libev.rb b/Formula/libev.rb deleted file mode 100644 index 132a542a47d61..0000000000000 --- a/Formula/libev.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Libev < Formula - desc "Asynchronous event library" - homepage "http://software.schmorp.de/pkg/libev.html" - url "http://dist.schmorp.de/libev/Attic/libev-4.33.tar.gz" - mirror "https://fossies.org/linux/misc/libev-4.33.tar.gz" - sha256 "507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea" - - bottle do - cellar :any - sha256 "e5481e2ba48282bffb5ecc059f0ddddd9807400593e849ed4b48b1fed3a14698" => :catalina - sha256 "f6cfb8c6bb1219f4a54d36113ada7cc7e1e446d5a207bc77d69ac30d9cfe391f" => :mojave - sha256 "f623fc2f4dc3a0980b4733945eb2025cd40636a6d4f5e5d75ae5f89e0b7b07bd" => :high_sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - - # Remove compatibility header to prevent conflict with libevent - (include/"event.h").unlink - end - - test do - (testpath/"test.c").write <<~'EOS' - /* Wait for stdin to become readable, then read and echo the first line. */ - - #include - #include - #include - #include - - ev_io stdin_watcher; - - static void stdin_cb (EV_P_ ev_io *watcher, int revents) { - char *buf; - size_t nbytes = 255; - buf = (char *)malloc(nbytes + 1); - getline(&buf, &nbytes, stdin); - printf("%s", buf); - ev_io_stop(EV_A_ watcher); - ev_break(EV_A_ EVBREAK_ALL); - } - - int main() { - ev_io_init(&stdin_watcher, stdin_cb, STDIN_FILENO, EV_READ); - ev_io_start(EV_DEFAULT, &stdin_watcher); - ev_run(EV_DEFAULT, 0); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-lev", "-o", "test", "test.c" - input = "hello, world\n" - assert_equal input, pipe_output("./test", input, 0) - end -end diff --git a/Formula/libevent.rb b/Formula/libevent.rb deleted file mode 100644 index 3629f33415fd1..0000000000000 --- a/Formula/libevent.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Libevent < Formula - desc "Asynchronous event library" - homepage "https://libevent.org/" - url "https://github.com/libevent/libevent/archive/release-2.1.11-stable.tar.gz" - sha256 "229393ab2bf0dc94694f21836846b424f3532585bac3468738b7bf752c03901e" - revision 1 - - bottle do - cellar :any - sha256 "9d262f9ffb2268340a89c713826d8ca068bcac06c30baf49e6184ab4660d977a" => :catalina - sha256 "1e14fc34baae0b65cac6d7c75bc5ed0ccb1f6bbaa30c8f0f8477ab8ba85fb3c5" => :mojave - sha256 "89df3b053409a11d520e9ca88aed17221416c60c5799ec51813f8c2c7e3536de" => :high_sierra - sha256 "a9bddcb861a3464a0e9111926e4cb8d932ad860540f571edb74d448ef5a54811" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "doxygen" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - def install - inreplace "Doxyfile", /GENERATE_MAN\s*=\s*NO/, "GENERATE_MAN = YES" - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-debug-mode", - "--prefix=#{prefix}" - system "make" - system "make", "install" - system "make", "doxygen" - man3.install Dir["doxygen/man/man3/*.3"] - doc.install Dir["doxygen/html/*"] - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - struct event_base *base; - base = event_base_new(); - event_base_free(base); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-levent", "-o", "test" - system "./test" - end -end diff --git a/Formula/libevhtp.rb b/Formula/libevhtp.rb deleted file mode 100644 index e067a4a017203..0000000000000 --- a/Formula/libevhtp.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Libevhtp < Formula - desc "Create extremely-fast and secure embedded HTTP servers with ease" - homepage "https://criticalstack.com/" - url "https://github.com/criticalstack/libevhtp/archive/1.2.18.tar.gz" - sha256 "316ede0d672be3ae6fe489d4ac1c8c53a1db7d4fe05edaff3c7c853933e02795" - license "BSD-3-Clause" - revision 3 - - bottle do - cellar :any - sha256 "507466763ef1710ef11b82d02a5229d1445ba6393a553d75926b8fe5d727d871" => :catalina - sha256 "bfd6cffbcad95d0db38d4b699af24dd3aab1a82b0bdfc7ea7136b212cecab37c" => :mojave - sha256 "72be53d01a0ab668255e9ab605c4d7b6c16e4ca1a3f68b026c3c9ae1fe77af50" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "libevent" - depends_on "openssl@1.1" - - def install - system "cmake", "-DEVHTP_BUILD_SHARED=ON", - "-DBUILD_SHARED_LIBS=ON", - "-DEVHTP_DISABLE_REGEX=ON", - ".", *std_cmake_args - system "make", "install" - mkdir_p "./html/docs/" - system "doxygen", "Doxyfile" - man3.install Dir["html/docs/man/man3/*.3"] - doc.install Dir["html/docs/html/*"] - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() { - struct event_base *base; - struct evhtp *htp; - base = event_base_new(); - htp = evhtp_new(base, NULL); - evhtp_free(htp); - event_base_free(base); - return 0; - } - EOS - - system ENV.cc, "test.c", - "-I#{include}", - "-I#{Formula["openssl@1.1"].opt_include}", - "-I#{Formula["libevent"].opt_include}", - "-L#{Formula["openssl@1.1"].opt_lib}", - "-L#{Formula["libevent"].opt_lib}", - "-L#{lib}", - "-levhtp", - "-levent", - "-levent_openssl", - "-lssl", - "-lcrypto", - "-o", "test" - system "./test" - end -end diff --git a/Formula/libewf.rb b/Formula/libewf.rb deleted file mode 100644 index be9a49d573e08..0000000000000 --- a/Formula/libewf.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Libewf < Formula - desc "Library for support of the Expert Witness Compression Format" - homepage "https://github.com/libyal/libewf" - # The main libewf repository is currently "experimental". - url "https://github.com/libyal/libewf-legacy/releases/download/20140808/libewf-20140808.tar.gz" - sha256 "dfe29b5f2f1841ff1fe11979780d710a660dbc4727af82ec391f398e6b49e5fd" - license "LGPL-3.0" - - bottle do - cellar :any - sha256 "43d8ba6c2441f65080f257a7239fe468be70cb2578ec2106230edd1164e967b6" => :catalina - sha256 "4c5482f8f1c97f9c3f3687bccd9c3628b314699bc26743e641f2ae573bf95eeb" => :mojave - sha256 "cae6fd2f38855fd15f8a50b644d0817181fed055aef85b7793759d7703a833d4" => :high_sierra - end - - head do - url "https://github.com/libyal/libewf.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 "openssl@1.1" - - uses_from_macos "bzip2" - uses_from_macos "zlib" - - def install - if build.head? - system "./synclibs.sh" - system "./autogen.sh" - end - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-libfuse=no - ] - - system "./configure", *args - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/ewfinfo -V") - end -end diff --git a/Formula/libexif.rb b/Formula/libexif.rb deleted file mode 100644 index 30ee11f0a59a5..0000000000000 --- a/Formula/libexif.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Libexif < Formula - desc "EXIF parsing library" - homepage "https://libexif.github.io/" - url "https://github.com/libexif/libexif/releases/download/libexif-0_6_22-release/libexif-0.6.22.tar.xz" - sha256 "5048f1c8fc509cc636c2f97f4b40c293338b6041a5652082d5ee2cf54b530c56" - license "LGPL-2.1" - - bottle do - sha256 "7379f6990018006122bba69098864e8877e8e6e7be3af535f7e301d8ff097e98" => :catalina - sha256 "c20d311fbd1846ce2603950ec9ad9b3b6e8202bf2f97e9aab328c05dc568fcfe" => :mojave - sha256 "8b1c7cf6ec777090ce22ccf5c426867948a54da9378e0c9b91d85175eaea4f81" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "gettext" - - def install - system "autoreconf", "-ivf" - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(int argc, char **argv) { - ExifLoader *loader = exif_loader_new(); - ExifData *data; - if (loader) { - exif_loader_write_file(loader, argv[1]); - data = exif_loader_get_data(loader); - printf(data ? "Exif data loaded" : "No Exif data"); - } - } - EOS - flags = %W[ - -I#{include} - -L#{lib} - -lexif - ] - system ENV.cc, "test.c", "-o", "test", *flags - test_image = test_fixtures("test.jpg") - assert_equal "No Exif data", shell_output("./test #{test_image}") - end -end diff --git a/Formula/libexosip.rb b/Formula/libexosip.rb deleted file mode 100644 index 4ab811240a25b..0000000000000 --- a/Formula/libexosip.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Libexosip < Formula - desc "Toolkit for eXosip2" - homepage "https://savannah.nongnu.org/projects/exosip" - url "https://download.savannah.gnu.org/releases/exosip/libexosip2-5.1.1.tar.gz" - mirror "https://download-mirror.savannah.gnu.org/releases/exosip/libexosip2-5.1.1.tar.gz" - sha256 "21420c00bf8e0895ff36161766beec12b7e6f1d371030c389dba845e271272e2" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "d36a54b2dec4b1c27ff20a78a9fc3660b304741434d5e9201937da2b4e75526c" => :catalina - sha256 "55556d9e457e708dab5e72fc36bab281bab85ddc25d190e729d13fae1757efbf" => :mojave - sha256 "8e2ec203c859fff616fb073b8f644285b4adfb202331749b0f073928eb03ee2a" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "c-ares" - depends_on "libosip" - depends_on "openssl@1.1" - - def install - # Extra linker flags are needed to build this on macOS. See: - # https://growingshoot.blogspot.com/2013/02/manually-install-osip-and-exosip-as.html - # Upstream bug ticket: https://savannah.nongnu.org/bugs/index.php?45079 - ENV.append "LDFLAGS", "-framework CoreFoundation -framework CoreServices "\ - "-framework Security" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() { - struct eXosip_t *ctx; - int i; - int port = 35060; - - ctx = eXosip_malloc(); - if (ctx == NULL) - return -1; - - i = eXosip_init(ctx); - if (i != 0) - return -1; - - i = eXosip_listen_addr(ctx, IPPROTO_UDP, NULL, port, AF_INET, 0); - if (i != 0) { - eXosip_quit(ctx); - fprintf(stderr, "could not initialize transport layer\\n"); - return -1; - } - - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-leXosip2", "-o", "test" - system "./test" - end -end diff --git a/Formula/libextractor.rb b/Formula/libextractor.rb deleted file mode 100644 index c307d8239b91d..0000000000000 --- a/Formula/libextractor.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Libextractor < Formula - desc "Library to extract meta data from files" - homepage "https://www.gnu.org/software/libextractor/" - url "https://ftp.gnu.org/gnu/libextractor/libextractor-1.10.tar.gz" - mirror "https://ftpmirror.gnu.org/libextractor/libextractor-1.10.tar.gz" - sha256 "9eed11b5ddc7c929ba112c50de8cfaa379f1d99a0c8e064101775837cf432357" - license "GPL-3.0" - - bottle do - sha256 "1f9781fe4c690eca0d719016cd4f23bd94890ae69cc30c4c1caa47d919286483" => :catalina - sha256 "0929de2de549d871c775fb2b3aaf22dc52377b504b8ed3d01ca9350a52704e39" => :mojave - sha256 "5a30c428cb327ef0bfd2458feeeb638200df28acf63b688d598a79591cb1c812" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libtool" - - conflicts_with "csound", :because => "both install `extract` binaries" - conflicts_with "pkcrack", :because => "both install `extract` binaries" - - def install - ENV.deparallelize - - system "./configure", "--disable-silent-rules", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - fixture = test_fixtures("test.png") - assert_match /Keywords for file/, shell_output("#{bin}/extract #{fixture}") - end -end diff --git a/Formula/libfabric.rb b/Formula/libfabric.rb deleted file mode 100644 index 05df09c656c28..0000000000000 --- a/Formula/libfabric.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Libfabric < Formula - desc "OpenFabrics libfabric" - homepage "https://ofiwg.github.io/libfabric/" - url "https://github.com/ofiwg/libfabric/releases/download/v1.10.1/libfabric-1.10.1.tar.bz2" - sha256 "889fa8c99eed1ff2a5fd6faf6d5222f2cf38476b24f3b764f2cbb5900fee8284" - revision 1 - head "https://github.com/ofiwg/libfabric.git" - - bottle do - cellar :any - sha256 "74dc473f0008cde1d89de5f652712b45423ddf1fde9dbbc04fad370c682934ba" => :catalina - sha256 "bd2f233361852bf42193a9af476aaa516b52060d2710553a198b1402b929bea9" => :mojave - sha256 "c2e506d659ff3682a99e2cf4949e073ea531d0207220f863649ecf41d079a35a" => :high_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 - system "#(bin}/fi_info" - end -end diff --git a/Formula/libfaketime.rb b/Formula/libfaketime.rb deleted file mode 100644 index eb14d2ca19b9d..0000000000000 --- a/Formula/libfaketime.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Libfaketime < Formula - desc "Report faked system time to programs" - homepage "https://github.com/wolfcw/libfaketime" - url "https://github.com/wolfcw/libfaketime/archive/v0.9.8.tar.gz" - sha256 "06288237cd5890eca148489e5b904ed852ed0ffa8424bfb479342f4daa8442a3" - license "GPL-2.0" - head "https://github.com/wolfcw/libfaketime.git" - - bottle do - sha256 "959cc7db2821e8d6595bb004f6147c81c1a9b541e8c24f72e995e97ca03b013e" => :catalina - sha256 "d377ea33f18d8338a134f9e9553e83e3bb591ee344884b8a49d9f72c11be0e52" => :mojave - sha256 "30325cd15f866fdcba8749c84a43b3e331e0481e5023dbdf2366a6dd118bd036" => :high_sierra - sha256 "0d6626a0ec194b26f82546ce84fefdcc212d6a7fb52989997257a141f0c113d0" => :sierra - end - - # The `faketime` command needs GNU `gdate` not BSD `date`. - # See https://github.com/wolfcw/libfaketime/issues/158 and - # https://github.com/Homebrew/homebrew-core/issues/26568 - depends_on "coreutils" - - depends_on :macos => :sierra - - def install - system "make", "-C", "src", "-f", "Makefile.OSX", "PREFIX=#{prefix}" - bin.install "src/faketime" - (lib/"faketime").install "src/libfaketime.1.dylib" - man1.install "man/faketime.1" - end - - test do - cp "/bin/date", testpath/"date" # Work around SIP. - assert_match "1230106542", - shell_output(%Q(TZ=UTC #{bin}/faketime -f "2008-12-24 08:15:42" #{testpath}/date +%s)).strip - end -end diff --git a/Formula/libffcall.rb b/Formula/libffcall.rb deleted file mode 100644 index d7dac5896dd45..0000000000000 --- a/Formula/libffcall.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Libffcall < Formula - desc "GNU Foreign Function Interface library" - homepage "https://www.gnu.org/software/libffcall/" - url "https://ftp.gnu.org/gnu/libffcall/libffcall-2.2.tar.gz" - mirror "https://ftpmirror.gnu.org/gnu/libffcall/libffcall-2.2.tar.gz" - sha256 "ebfa37f97b6c94fac24ecf3193f9fc829517cf81aee9ac2d191af993d73cb747" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "02b522baa2d0f38a85e3a2bee8adb79644e8c834c486737b81a62945b9ec73d4" => :catalina - sha256 "e38d2a42a2ad191847e423028580245f4b84829e5c781f6d58ce7da9981da280" => :mojave - sha256 "d9f7db3318279d7dac5a162de3a251e96c3810be2e70fe8926d93e63b9849045" => :high_sierra - end - - 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/"callback.c").write <<~EOS - #include - #include - - typedef char (*char_func_t) (); - - void function (void *data, va_alist alist) - { - va_start_char(alist); - va_return_char(alist, *(char *)data); - } - - int main() { - char *data = "abc"; - callback_t callback = alloc_callback(&function, data); - printf("%s\\n%c\\n", - is_callback(callback) ? "true" : "false", - ((char_func_t)callback)()); - free_callback(callback); - return 0; - } - EOS - flags = ["-L#{lib}", "-lffcall", "-I#{lib}/libffcall-#{version}/include"] - system ENV.cc, "-o", "callback", "callback.c", *(flags + ENV.cflags.to_s.split) - output = shell_output("#{testpath}/callback") - assert_equal "true\na\n", output - end -end diff --git a/Formula/libffi.rb b/Formula/libffi.rb deleted file mode 100644 index c2072402960b1..0000000000000 --- a/Formula/libffi.rb +++ /dev/null @@ -1,86 +0,0 @@ -class Libffi < Formula - desc "Portable Foreign Function Interface library" - homepage "https://sourceware.org/libffi/" - url "https://sourceware.org/pub/libffi/libffi-3.3.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/libf/libffi/libffi_3.3.orig.tar.gz" - mirror "https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz" - sha256 "72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056" - - bottle do - cellar :any - sha256 "dd94d39946f53a8f11f78e998f22e46be9666bb265f80bb4714d5d63c1e16a68" => :catalina - sha256 "d6e5efd7521676dfc58fcba567514b898091c8580df4d6253f5dd40a7ee67c82" => :mojave - sha256 "7065f0d426921fa069c2494beded9de61e8720954f3f346103c8f871daa4ff8b" => :high_sierra - end - - head do - url "https://github.com/atgreen/libffi.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - keg_only :provided_by_macos - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - 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/libfido2.rb b/Formula/libfido2.rb deleted file mode 100644 index 2441541c9b3bd..0000000000000 --- a/Formula/libfido2.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Libfido2 < Formula - desc "Provides library functionality for FIDO U2F & FIDO 2.0, including USB" - homepage "https://developers.yubico.com/libfido2/" - url "https://github.com/Yubico/libfido2/archive/1.4.0.tar.gz" - sha256 "ad921fbe7d4bb70e4a971e564cd01f341daf9b5ed5d69b3cbab94a8a811d2a6c" - license "BSD-2-Clause" - revision 2 - - bottle do - cellar :any - sha256 "aa56164db657cfbef40a03155bedfbecdd4aca07fc240503346b73ba850d26d9" => :catalina - sha256 "8621d7376e70e75db430698b392aaa0c230bff55ebbc34218b9c9acfbae17960" => :mojave - sha256 "13df15672e11395e0d056d3e82f533bbe208b57f8adb7f3f116955d31527e1b2" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "mandoc" => :build - depends_on "pkg-config" => :build - depends_on "libcbor" - depends_on "openssl@1.1" - - # Apply fix for https://github.com/Yubico/libfido2/issues/166 (also https://github.com/Yubico/libfido2/issues/179) - patch do - url "https://github.com/Yubico/libfido2/commit/39544a2c342b0438a8f341b4a4ff20f650f701a3.diff?full_index=1" - sha256 "664a95d68502a266835839002d32149ae391aef5b902d33a990c00539a68fe32" - end - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "man_symlink_html" - system "make", "man_symlink" - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<-EOF - #include - #include - #include - int main(void) { - fido_init(FIDO_DEBUG); - // Attempt to enumerate up to five FIDO/U2F devices. Five is an arbitrary number. - size_t max_devices = 5; - fido_dev_info_t *devlist; - if ((devlist = fido_dev_info_new(max_devices)) == NULL) - return 1; - size_t found_devices = 0; - int error; - if ((error = fido_dev_info_manifest(devlist, max_devices, &found_devices)) == FIDO_OK) - printf("FIDO/U2F devices found: %s\\n", found_devices ? "Some" : "None"); - fido_dev_info_free(&devlist, max_devices); - } - EOF - system ENV.cc, "-std=c99", "test.c", "-I#{include}", "-I#{Formula["openssl@1.1"].include}", "-o", "test", - "-L#{lib}", "-lfido2" - system "./test" - end -end diff --git a/Formula/libfishsound.rb b/Formula/libfishsound.rb deleted file mode 100644 index 6b0246eef970e..0000000000000 --- a/Formula/libfishsound.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Libfishsound < Formula - desc "Decode and encode audio data using the Xiph.org codecs" - homepage "https://xiph.org/fishsound/" - url "https://downloads.xiph.org/releases/libfishsound/libfishsound-1.0.0.tar.gz" - sha256 "2e0b57ce2fecc9375eef72938ed08ac8c8f6c5238e1cae24458f0b0e8dade7c7" - license "BSD-3-Clause" - - bottle do - cellar :any - rebuild 1 - sha256 "5599c6eaed21c2f66ebb8209ca8e436fd306214de6d9db6ccf21bd9c2710e1b7" => :catalina - sha256 "f232242d49e8c2ae954e282e879e4a4a86b80d3e46364d74247af92efd613d96" => :mojave - sha256 "726c79b6e3ce5d71e9cf1d6b556a6daed33b5e8bd7269e2219b1474549dac17d" => :high_sierra - sha256 "50187bc6adea9322f20e1706d66859c941d6d2e8d1d8bfab091f088b20061760" => :sierra - sha256 "9cf94c3c6963895940e8720aef21c29b001257c918fce6b65685c33f8430f0e4" => :el_capitan - sha256 "4fcfc4270d73ac2b0e8d8a4d1fe6b94a1093502b802ed327febb5286ad5140b9" => :yosemite - sha256 "b8c54b7d3b2bc5e433b20f89f67c6cb3d03b18e0881126a526ae1ff028d8c220" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "libvorbis" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libfixbuf.rb b/Formula/libfixbuf.rb deleted file mode 100644 index 580dcfa95dc6d..0000000000000 --- a/Formula/libfixbuf.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Libfixbuf < Formula - desc "Implements the IPFIX Protocol as a C library" - homepage "https://tools.netsa.cert.org/fixbuf/" - url "https://tools.netsa.cert.org/releases/libfixbuf-2.4.0.tar.gz" - sha256 "bf20f9f7986a525ea6cc648d32f4ba30bfeb2a83f8c830bc39c48dfa7a415175" - - bottle do - sha256 "39eac22cafeaa515259fe5b8ddd635b98c69ca42699107bd05e5560d285f6724" => :catalina - sha256 "5c63110b498601708f2669fa1c5c734a4d8d67abbdfdfd5056255c746ef6e6ee" => :mojave - sha256 "d76d8050c0355326777460e738008b3820b39c53ec38ee759c0c8ddacf0c090e" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make" - system "make", "install" - end -end diff --git a/Formula/libfixposix.rb b/Formula/libfixposix.rb deleted file mode 100644 index 774e4ef473137..0000000000000 --- a/Formula/libfixposix.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Libfixposix < Formula - desc "Thin wrapper over POSIX syscalls" - homepage "https://github.com/sionescu/libfixposix" - url "https://github.com/sionescu/libfixposix/archive/v0.4.3.tar.gz" - sha256 "78fe8bcebf496520ac29b5b65049f5ec1977c6bd956640bdc6d1da6ea04d8504" - license "BSL-1.0" - head "https://github.com/sionescu/libfixposix.git" - - bottle do - cellar :any - sha256 "a87f0db9cf7ac7714d603eb0388127e0a20e1ac7ae1d7b2359de2cea71c330d6" => :catalina - sha256 "4d8da5161cd9a60d02a086dc3f2a083277cad6a2116689015d9bbaf255eea4e8" => :mojave - sha256 "eaf5641bda4184e3092f7f2b0c9e61afa120df85df837377ead98de643a7e21e" => :high_sierra - sha256 "024855892877fd868e04eb8b0d2ef71485ffc48b2f441f88ceb61bcc57a56aea" => :sierra - sha256 "89a3b36ff587c3eeaa7ba51471ba3d0bc294bdeb66abccd0a3ce446cf6f57e1b" => :el_capitan - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - def install - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"mxstemp.c").write <<~EOS - #include - - #include - - int main(void) - { - fd_set rset, wset, eset; - - lfp_fd_zero(&rset); - lfp_fd_zero(&wset); - lfp_fd_zero(&eset); - - for(unsigned i = 0; i < FD_SETSIZE; i++) { - if(lfp_fd_isset(i, &rset)) { - printf("%d ", i); - } - } - - return 0; - } - EOS - system ENV.cc, "mxstemp.c", lib/"libfixposix.dylib", "-o", "mxstemp" - system "./mxstemp" - end -end diff --git a/Formula/libflowmanager.rb b/Formula/libflowmanager.rb deleted file mode 100644 index ba3c9556f24a2..0000000000000 --- a/Formula/libflowmanager.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Libflowmanager < Formula - desc "Flow-based measurement tasks with packet-based inputs" - homepage "https://research.wand.net.nz/software/libflowmanager.php" - url "https://research.wand.net.nz/software/libflowmanager/libflowmanager-3.0.0.tar.gz" - sha256 "0866adfcdc223426ba17d6133a657d94928b4f8e12392533a27387b982178373" - revision 1 - - bottle do - cellar :any - sha256 "41c5f69289236b3362062b471654f0cc9446f93d90066c001a1bda56d9b9b4f3" => :catalina - sha256 "64843e32762b175f497e00e332bee33dbe2c5e77384ccb64a0957e9a6c2bd40b" => :mojave - sha256 "156b302b5feade664f79f10358bc7888f9db14da53bd3549f90864b1bd9056f5" => :high_sierra - end - - depends_on "libtrace" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libforensic1394.rb b/Formula/libforensic1394.rb deleted file mode 100644 index e4b1c35fd80ad..0000000000000 --- a/Formula/libforensic1394.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libforensic1394 < Formula - desc "Live memory forensics over IEEE 1394 (\"FireWire\") interface" - homepage "https://freddie.witherden.org/tools/libforensic1394/" - url "https://freddie.witherden.org/tools/libforensic1394/releases/libforensic1394-0.2.tar.gz" - sha256 "50a82fe2899aa901104055da2ac00b4c438cf1d0d991f5ec1215d4658414652e" - license "LGPL-3.0" - head "https://github.com/FreddieWitherden/libforensic1394.git" - - bottle do - cellar :any - sha256 "4b9746197d1e43ee78530b552e42a6e6cc96908267db1685076f6e283983ab0f" => :catalina - sha256 "90e2abdc0baef51cfb97b8f9d130f99e2ad5e1eda990f7e6fc29c0e0d1e2f79a" => :mojave - sha256 "5e919cf8bce0747630324f0c203bbd1aef4d7e17d278f42bcbece48da2229c8f" => :high_sierra - sha256 "e747c5c6797d48070c4a4199fe38021cd0164a052e14b21005b9caf4a47a6e3c" => :sierra - sha256 "d850e7c3a04b206c6219c75ba0a00723e9a25d0c97831de289320ef0cc076aae" => :el_capitan - sha256 "b64837090b557e25444999bfc41e2023f8fc2ced465ef7ccc067938fe0ec2f2c" => :yosemite - sha256 "a2039bd1c161253eac9ac123414f660fbb6059f709b6499ec6a92c73bfba4f42" => :mavericks - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() { - forensic1394_bus *bus; - bus = forensic1394_alloc(); - assert(NULL != bus); - forensic1394_destroy(bus); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lforensic1394", "-o", "test" - system "./test" - end -end diff --git a/Formula/libfreefare.rb b/Formula/libfreefare.rb deleted file mode 100644 index 83dc1db177161..0000000000000 --- a/Formula/libfreefare.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Libfreefare < Formula - desc "API for MIFARE card manipulations" - homepage "https://github.com/nfc-tools/libfreefare" - url "https://github.com/nfc-tools/libfreefare/releases/download/libfreefare-0.4.0/libfreefare-0.4.0.tar.bz2" - sha256 "bfa31d14a99a1247f5ed49195d6373de512e3eb75bf1627658b40cf7f876bc64" - revision 3 - - bottle do - cellar :any - sha256 "5019ddb58b52c0ef766c331273c73ca4a374e87d5288d7357cd7e965150b43c4" => :catalina - sha256 "a039acfcd35d2763313e47dd0175474975ffdecba60f6c6af714f7b0f0630144" => :mojave - sha256 "5ae1a6b59880a6ae25ce53cfe9727be4cdf5a9cd5fe28c06f7bbc0e3d1342939" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libnfc" - depends_on "openssl@1.1" - - # Upstream commit for endianness-related functions, fixes - # https://github.com/nfc-tools/libfreefare/issues/55 - patch do - url "https://github.com/nfc-tools/libfreefare/commit/358df775.diff?full_index=1" - sha256 "54cace0b9f7be073ba96ba1ae04fba8882a5ce99100a7b707498b9d2bfb0a660" - 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 - int main() { - mifare_desfire_aid_new(0); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lfreefare", "-o", "test" - system "./test" - end -end diff --git a/Formula/libfreehand.rb b/Formula/libfreehand.rb deleted file mode 100644 index e5599e3b793f7..0000000000000 --- a/Formula/libfreehand.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Libfreehand < Formula - desc "Interpret and import Aldus/Macromedia/Adobe FreeHand documents" - homepage "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand" - url "https://dev-www.libreoffice.org/src/libfreehand/libfreehand-0.1.2.tar.xz" - sha256 "0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac" - revision 5 - - bottle do - cellar :any - sha256 "337aeb3f1454487fc132f9d67e3662dc6c3f0ba40a38a9a9c58d9f0b9bfc1955" => :catalina - sha256 "b2e7566024327688b13ce6ba4a2bc93108d61d46923b0e6f59a6bc577ccc4eb9" => :mojave - sha256 "fed031e8bfce818f39ea578792a3ed1f1b74c9f86192f37b372e1c4fc493bc90" => :high_sierra - end - - depends_on "boost" => :build - depends_on "pkg-config" => :build - depends_on "icu4c" - depends_on "librevenge" - depends_on "little-cms2" - - # remove with version >=0.1.3 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/7bb2149f314dd174f242a76d4dde8d95d20cbae0/libfreehand/0.1.2.patch" - sha256 "abfa28461b313ccf3c59ce35d0a89d0d76c60dd2a14028b8fea66e411983160e" - end - - def install - system "./configure", "--without-docs", - "--disable-dependency-tracking", - "--enable-static=no", - "--disable-werror", - "--disable-tests", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - libfreehand::FreeHandDocument::isSupported(0); - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", - "-I#{Formula["librevenge"].include}/librevenge-0.0", - "-I#{include}/libfreehand-0.1", - "-L#{Formula["librevenge"].lib}", - "-L#{lib}", - "-lrevenge-0.0", - "-lfreehand-0.1" - system "./test" - end -end diff --git a/Formula/libfreenect.rb b/Formula/libfreenect.rb deleted file mode 100644 index b17e8b39a0cd7..0000000000000 --- a/Formula/libfreenect.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Libfreenect < Formula - desc "Drivers and libraries for the Xbox Kinect device" - homepage "https://openkinect.org/" - url "https://github.com/OpenKinect/libfreenect/archive/v0.6.1.tar.gz" - sha256 "a2e426cf42d9289b054115876ec39502a1144bc782608900363a0c38056b6345" - head "https://github.com/OpenKinect/libfreenect.git" - - bottle do - cellar :any - sha256 "a9098e0b3d868c85de4b0bb243d16200361002ff5d27d6d9c9bc5a08fb6ab95a" => :catalina - sha256 "d150e4351036b1b3174d24c359736e04a3bbdbe966c77b1714f0edbef486d012" => :mojave - sha256 "c08bad975cc7175fdf88a603fb300cac3493f0e20172fc99a69da568d4ad68ff" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libusb" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DBUILD_OPENNI2_DRIVER=ON" - system "make", "install" - end - end - - test do - system bin/"fakenect-record", "-h" - end -end diff --git a/Formula/libftdi.rb b/Formula/libftdi.rb deleted file mode 100644 index 5bd6f9751e922..0000000000000 --- a/Formula/libftdi.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Libftdi < Formula - desc "Library to talk to FTDI chips" - homepage "https://www.intra2net.com/en/developer/libftdi" - url "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.5.tar.bz2" - sha256 "7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049" - - bottle do - cellar :any - sha256 "2ac29fc67dacd7c6e2c73e93114019d0df07aaeac7678c74402289d91d128d00" => :catalina - sha256 "e267d6e573aad2f1372f5731bf2be30177d5b4feb6c30b0ac96b8933f545983a" => :mojave - sha256 "5610431987b6b03db32ebed2c24b5007ffad77343cee35bfd23ed93470539846" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "swig" => :build - depends_on "confuse" - depends_on "libusb" - - def install - mkdir "libftdi-build" do - system "cmake", "..", "-DPYTHON_BINDINGS=OFF", - "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON", - *std_cmake_args - system "make", "install" - pkgshare.install "../examples" - (pkgshare/"examples/bin").install Dir["examples/*"] \ - - Dir["examples/{CMake*,Makefile,*.cmake}"] - end - end - - test do - system pkgshare/"examples/bin/find_all" - end -end diff --git a/Formula/libftdi0.rb b/Formula/libftdi0.rb deleted file mode 100644 index 64ac387ce8e7e..0000000000000 --- a/Formula/libftdi0.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Libftdi0 < Formula - desc "Library to talk to FTDI chips" - homepage "https://www.intra2net.com/en/developer/libftdi" - url "https://www.intra2net.com/en/developer/libftdi/download/libftdi-0.20.tar.gz" - sha256 "3176d5b5986438f33f5208e690a8bfe90941be501cc0a72118ce3d338d4b838e" - - bottle do - cellar :any - rebuild 2 - sha256 "064e2f32a4a8959f2a489611c931beac426f509a8299bbcdd03871b1d5f5859e" => :catalina - sha256 "c3238e8f4458ead2c663c8d5b48e2052d3ee606b75278a9839546fd2e6c7de49" => :mojave - sha256 "ef988a7e074542fb5df2c8e803b19e9d20b8602e3899833b10d6cdf862b4c5be" => :high_sierra - sha256 "f89e79f5eb94d55e130dcc55deca87f1241b386bf45070dda52c2c22707ead15" => :sierra - sha256 "8fbc5ef456600b919430d86dd4e7090ae1f1064e4a51d631ab9bd7b39887ead2" => :el_capitan - sha256 "92ecdb3a110e1abcba05561f0def8e573d1f8174d4e04247375dd5cd47d3bc24" => :yosemite - sha256 "29d786dcb87e4251c4cbd25c0d5e215eb248b74304f175054b31cbd6a464c071" => :mavericks - end - - depends_on "libusb-compat" - - conflicts_with "cspice", :because => "both install `simple` binaries" - conflicts_with "openhmd", :because => "both install `simple` binaries" - - def install - mkdir "libftdi-build" do - system "../configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - end - - test do - system "#{bin}/libftdi-config", "--version" - end -end diff --git a/Formula/libgadu.rb b/Formula/libgadu.rb deleted file mode 100644 index 7aa3f771873e6..0000000000000 --- a/Formula/libgadu.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Libgadu < Formula - desc "Library for ICQ instant messenger protocol" - homepage "https://libgadu.net/" - url "https://github.com/wojtekka/libgadu/releases/download/1.12.2/libgadu-1.12.2.tar.gz" - sha256 "28e70fb3d56ed01c01eb3a4c099cc84315d2255869ecf08e9af32c41d4cbbf5d" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "afe9b94a62b55c700f57d853d077be96a901b450faa7ff9585a43397cacf838a" => :catalina - sha256 "394b7c3b78e1aa4f7960d7ffc62cefe91069a0e50b7442b62f68d2e68f5d01ad" => :mojave - sha256 "65f828f98715efbb7bb351d47e11df0fd0279b8c060233138721c119abf0879f" => :high_sierra - sha256 "4cf4bb4fa157bff6ce4e1fa58a79c372df6b0a00c5e5fd621f6396b3d55451e6" => :sierra - sha256 "1feb9c3c574632f9324fdfc8bc5ed49f2817e7a58ae280e44b0ae8735e89caca" => :el_capitan - sha256 "845c258af465001dcdfad1f09e7659e86d6d006b9381c6e3cfaf0461e432ab46" => :yosemite - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-debug", - "--disable-dependency-tracking", - "--without-pthread" - system "make", "install" - end -end diff --git a/Formula/libgaiagraphics.rb b/Formula/libgaiagraphics.rb deleted file mode 100644 index 4d8e7e1adf994..0000000000000 --- a/Formula/libgaiagraphics.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Libgaiagraphics < Formula - desc "Library supporting common-utility raster handling" - homepage "https://www.gaia-gis.it/fossil/libgaiagraphics/index" - url "https://www.gaia-gis.it/gaia-sins/gaiagraphics-sources/libgaiagraphics-0.5.tar.gz" - sha256 "ccab293319eef1e77d18c41ba75bc0b6328d0fc3c045bb1d1c4f9d403676ca1c" - revision 7 - - bottle do - cellar :any - sha256 "05b3806c31a6e084eeeec2e44c83b8fb728cd0de4cc22dae14888ff52e290cca" => :catalina - sha256 "bfaf50e26b9312c1ef7d9b62677e92099339d14393ce855b870fe9288503c5df" => :mojave - sha256 "20a230ae5fccd2d5114e8ab7a128dd57834104461e5a7cbc2f7c7e63075214d9" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "jpeg" - depends_on "libgeotiff" - depends_on "libpng" - depends_on "proj" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libgcrypt.rb b/Formula/libgcrypt.rb deleted file mode 100644 index f19871f6cb2fc..0000000000000 --- a/Formula/libgcrypt.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Libgcrypt < Formula - desc "Cryptographic library based on the code from GnuPG" - homepage "https://gnupg.org/related_software/libgcrypt/" - url "https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.6.tar.bz2" - sha256 "0cba2700617b99fc33864a0c16b1fa7fdf9781d9ed3509f5d767178e5fd7b975" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "bc8f0fdc3dccd598c6bc332e6e2f7add94812bef84db722e878c5a85dcf43565" => :catalina - sha256 "a019ef3d51d67a318557b15745552d59315e20ebbae74c39bac3588932869260" => :mojave - sha256 "142003e0e2f01c607e2f1a7c132c0db4612aa758d7a038e06f64910b0dcfa1a3" => :high_sierra - end - - depends_on "libgpg-error" - - uses_from_macos "libxslt" - - def install - # Temporary hack to get libgcrypt building on macOS 10.12 and 10.11 with XCode 8. - # Seems to be a Clang issue rather than an upstream one, so - # keep checking whether or not this is necessary. - # Should be reported to GnuPG if still an issue when near stable. - # https://github.com/Homebrew/homebrew-core/issues/1957 - ENV.O1 if DevelopmentTools.clang_build_version == 800 - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--enable-static", - "--prefix=#{prefix}", - "--disable-asm", - "--with-libgpg-error-prefix=#{Formula["libgpg-error"].opt_prefix}", - "--disable-jent-support" # Requires ENV.O0, which is unpleasant. - - # Parallel builds work, but only when run as separate steps - system "make" - # Slightly hideous hack to help `make check` work in - # normal place on >10.10 where SIP is enabled. - # https://github.com/Homebrew/homebrew-core/pull/3004 - # https://bugs.gnupg.org/gnupg/issue2056 - MachO::Tools.change_install_name("#{buildpath}/tests/.libs/random", - "#{lib}/libgcrypt.20.dylib", - "#{buildpath}/src/.libs/libgcrypt.20.dylib") - - system "make", "check" - system "make", "install" - - # avoid triggering mandatory rebuilds of software that hard-codes this path - inreplace bin/"libgcrypt-config", prefix, opt_prefix - end - - test do - touch "testing" - output = shell_output("#{bin}/hmac256 \"testing\" testing") - assert_match "0e824ce7c056c82ba63cc40cffa60d3195b5bb5feccc999a47724cc19211aef6", output - end -end diff --git a/Formula/libgda.rb b/Formula/libgda.rb deleted file mode 100644 index 5f7723bc8d43a..0000000000000 --- a/Formula/libgda.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Libgda < Formula - desc "Provides unified data access to the GNOME project" - homepage "https://www.gnome-db.org/" - url "https://download.gnome.org/sources/libgda/5.2/libgda-5.2.9.tar.xz" - sha256 "59caed8ca72b1ac6437c9844f0677f8a296d52cfd1c0049116026abfb1d87d9b" - revision 2 - - bottle do - rebuild 1 - sha256 "1c2fa0318e26d0a3ae3789fa5ebc87514d0e7a7d5068146178f299b9804e8132" => :catalina - sha256 "206bc82010e8e77ba728eada64bad3d5eaa3b9756c4dd438236103ed89738d1d" => :mojave - sha256 "e2c155fb503a725f5f8052c975588437a9ed4fc994354d42aad8f81648f0d148" => :high_sierra - sha256 "52d4df5f60be7e3cf5c1f51dc0318f920cec2f985f951fa533cc69adffcc9897" => :sierra - end - - depends_on "gobject-introspection" => :build - depends_on "intltool" => :build - depends_on "itstool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "libgcrypt" - depends_on "libgee" - depends_on "openssl@1.1" - depends_on "readline" - - def install - # this build uses the sqlite source code that comes with libgda, - # as opposed to using the system or brewed sqlite3, which is not supported on macOS, - # as mentioned in https://github.com/GNOME/libgda/blob/95eeca4b0470f347c645a27f714c62aa6e59f820/libgda/sqlite/README#L31 - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--disable-binreloc", - "--disable-gtk-doc", - "--without-java", - "--enable-introspection", - "--enable-system-sqlite=no" - system "make" - system "make", "install" - end - - test do - system "#{bin}/gda-sql", "-v" - end -end diff --git a/Formula/libgdata.rb b/Formula/libgdata.rb deleted file mode 100644 index d16d94be6d428..0000000000000 --- a/Formula/libgdata.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Libgdata < Formula - desc "GLib-based library for accessing online service APIs" - homepage "https://wiki.gnome.org/Projects/libgdata" - url "https://download.gnome.org/sources/libgdata/0.16/libgdata-0.16.1.tar.xz" - sha256 "8740e071ecb2ae0d2a4b9f180d2ae5fdf9dc4c41e7ff9dc7e057f62442800827" - revision 2 - - bottle do - sha256 "3a231d1efc876f659a3ac123ac14a5e89632d5ac27f1a48c1ed31654e70f31c6" => :catalina - sha256 "7f94b356b1893b2c1870be3d5798af1a04eb405ef1ae0800293fd98b573df52f" => :mojave - sha256 "e6d45d94b108ab0eb008ae03a751fab8c32690d31728ec1886ef8978aef1d53a" => :high_sierra - sha256 "e71114ddb9b3944980a83d92c5b8521a79d52b9719746126aa0865a4986b146a" => :sierra - end - - depends_on "gobject-introspection" => :build - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "json-glib" - depends_on "liboauth" - depends_on "libsoup" - - # submitted upstream as https://bugzilla.gnome.org/show_bug.cgi?id=754821 - patch :DATA - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--disable-gnome", - "--disable-tests" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = gdata_comment_get_type(); - return 0; - } - EOS - ENV.libxml2 - gettext = Formula["gettext"] - glib = Formula["glib"] - json_glib = Formula["json-glib"] - liboauth = Formula["liboauth"] - libsoup = Formula["libsoup"] - flags = %W[ - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{include}/libgdata - -I#{json_glib.opt_include}/json-glib-1.0 - -I#{liboauth.opt_include} - -I#{libsoup.opt_include}/libsoup-2.4 - -I#{MacOS.sdk_path}/usr/include/libxml2 - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{json_glib.opt_lib} - -L#{libsoup.opt_lib} - -L#{lib} - -lgdata - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - -ljson-glib-1.0 - -lsoup-2.4 - -lxml2 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end - -__END__ -diff --git a/gdata/gdata.symbols b/gdata/gdata.symbols -index bba24ec..c80a642 100644 ---- a/gdata/gdata.symbols -+++ b/gdata/gdata.symbols -@@ -966,9 +966,6 @@ gdata_documents_entry_get_quota_used - gdata_documents_service_copy_document - gdata_documents_service_copy_document_async - gdata_documents_service_copy_document_finish --gdata_goa_authorizer_get_type --gdata_goa_authorizer_new --gdata_goa_authorizer_get_goa_object - gdata_documents_document_get_thumbnail_uri - gdata_tasks_task_get_type - gdata_tasks_task_new -@@ -1089,8 +1086,6 @@ gdata_freebase_topic_value_is_image - gdata_freebase_topic_result_get_type - gdata_freebase_topic_result_new - gdata_freebase_topic_result_dup_object --gdata_freebase_result_error_get_type --gdata_freebase_result_error_quark - gdata_freebase_result_get_type - gdata_freebase_result_new - gdata_freebase_result_dup_variant diff --git a/Formula/libgee.rb b/Formula/libgee.rb deleted file mode 100644 index d87e9ce2abc17..0000000000000 --- a/Formula/libgee.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Libgee < Formula - desc "Collection library providing GObject-based interfaces" - homepage "https://wiki.gnome.org/Projects/Libgee" - url "https://download.gnome.org/sources/libgee/0.20/libgee-0.20.3.tar.xz" - sha256 "d0b5edefc88cbca5f1709d19fa62aef490922c6577a14ac4e7b085507911a5de" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "f05da401040a1fd6372ebb26550d13b3779309d7e393bb109b9c362e8fcb0a0b" => :catalina - sha256 "ea8b92ad2fc0f9c4191e83d3a4ace603dd99b2d95da665ac699f0805394595e3" => :mojave - sha256 "321db1d8698ebe090ee354090920a614d95fb65fa7a38fad01f15fbfc6d2ea53" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "glib" - - def install - # ensures that the gobject-introspection files remain within the keg - inreplace "gee/Makefile.in" do |s| - s.gsub! "@HAVE_INTROSPECTION_TRUE@girdir = @INTROSPECTION_GIRDIR@", - "@HAVE_INTROSPECTION_TRUE@girdir = $(datadir)/gir-1.0" - s.gsub! "@HAVE_INTROSPECTION_TRUE@typelibdir = @INTROSPECTION_TYPELIBDIR@", - "@HAVE_INTROSPECTION_TRUE@typelibdir = $(libdir)/girepository-1.0" - end - - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = gee_traversable_stream_get_type(); - 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}/gee-0.8 - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lgee-0.8 - -lglib-2.0 - -lgobject-2.0 - -lintl - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libgeotiff.rb b/Formula/libgeotiff.rb deleted file mode 100644 index 6ccf10bff6869..0000000000000 --- a/Formula/libgeotiff.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Libgeotiff < Formula - desc "Library and tools for dealing with GeoTIFF" - homepage "https://github.com/OSGeo/libgeotiff" - url "https://github.com/OSGeo/libgeotiff/releases/download/1.6.0/libgeotiff-1.6.0.tar.gz" - sha256 "9311017e5284cffb86f2c7b7a9df1fb5ebcdc61c30468fb2e6bca36e4272ebca" - - bottle do - cellar :any - sha256 "181da2f2a3860b23ee95eded5a9f5600f34e2ee016e76a7fbede959e565d0ca8" => :catalina - sha256 "7311abe41270eb90f91b69e84eab0528be0b76a11cc43ce0e2aca1529da585fe" => :mojave - sha256 "b52ce34a76c3510314e840753610d5d423cd0689d5b93d3d41e7c119ba67d09b" => :high_sierra - end - - head do - url "https://github.com/OSGeo/libgeotiff.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "jpeg" - depends_on "libtiff" - depends_on "proj" - - def install - system "./autogen.sh" if build.head? - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-jpeg" - system "make" # Separate steps or install fails - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include "geotiffio.h" - #include "xtiffio.h" - #include - #include - - int main(int argc, char* argv[]) - { - TIFF *tif = XTIFFOpen(argv[1], "w"); - GTIF *gtif = GTIFNew(tif); - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) 10); - GTIFKeySet(gtif, GeogInvFlatteningGeoKey, TYPE_DOUBLE, 1, (double)123.456); - - int i; - char buffer[20L]; - - memset(buffer,0,(size_t)20L); - for (i=0;i<20L;i++){ - TIFFWriteScanline(tif, buffer, i, 0); - } - - GTIFWriteKeys(gtif); - GTIFFree(gtif); - XTIFFClose(tif); - return 0; - } - EOS - - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lgeotiff", - "-L#{Formula["libtiff"].opt_lib}", "-ltiff", "-o", "test" - system "./test", "test.tif" - output = shell_output("#{bin}/listgeo test.tif") - assert_match /GeogInvFlatteningGeoKey.*123.456/, output - end -end diff --git a/Formula/libgetdata.rb b/Formula/libgetdata.rb deleted file mode 100644 index 80ed0ddf007b0..0000000000000 --- a/Formula/libgetdata.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Libgetdata < Formula - desc "Reference implementation of the Dirfile Standards" - homepage "https://getdata.sourceforge.io/" - url "https://downloads.sourceforge.net/project/getdata/getdata/0.10.0/getdata-0.10.0.tar.xz" - sha256 "d547a022f435b9262dcf06dc37ebd41232e2229ded81ef4d4f5b3dbfc558aba3" - revision 1 - - bottle do - cellar :any - rebuild 3 - sha256 "f133f438e1833bff0f5cf43109e27768a983a068dec90a767ba9027d2bc2f0b9" => :catalina - sha256 "6c5f143bb202c280c3b3e340a420a1cf6c6d936cba70faf837cd215e451987fe" => :mojave - sha256 "6b8b5f7801a6cf31ecd5ac82ee02ca344f9634ad01c235a828e3875d0354931b" => :high_sierra - end - - depends_on "libtool" - - uses_from_macos "perl" - uses_from_macos "zlib" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-fortran", - "--disable-fortran95", - "--disable-php", - "--disable-python", - "--without-liblzma", - "--without-libzzip" - system "make" - system "make", "install" - end - - test do - assert_match "GetData #{version}", shell_output("#{bin}/checkdirfile --version", 1) - end -end diff --git a/Formula/libgfshare.rb b/Formula/libgfshare.rb deleted file mode 100644 index 2e9a914cc8127..0000000000000 --- a/Formula/libgfshare.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Libgfshare < Formula - desc "Library for sharing secrets" - homepage "https://www.digital-scurf.org/software/libgfshare" - url "https://www.digital-scurf.org/files/libgfshare/libgfshare-2.0.0.tar.bz2" - sha256 "86f602860133c828356b7cf7b8c319ba9b27adf70a624fe32275ba1ed268331f" - - bottle do - cellar :any - sha256 "59d6afbdff08b3b457ae3bf6284859eb200929dbcf38c7a2e4f6025a45fe02dc" => :catalina - sha256 "23c584fb3f3edcb9516beacb9cc3448c6bd2352ce44063e609d7a3e9aaeadd34" => :mojave - sha256 "0079ff7fef137a59579eb12e9f15087573ad2c19c8d7a4d53e2a7d8d378e6af1" => :high_sierra - sha256 "ed8e772e5d4b6c8471aa4d711bd2178b873cce23028bcd3831a51aca67c3485e" => :sierra - sha256 "c50ebaadca206eef93bc6d835f5814e0d640223c2c7e39cd12feff47720c054d" => :el_capitan - sha256 "6929a937f6f8ee624f02891622375d23aa65114475cf53ce82342976b4705454" => :yosemite - sha256 "1696482fdd83b98b999d4b4037ae6c02d06a4b5297d089c826fed92a367d0d5c" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--disable-linker-optimisations", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - touch "test.in" - system "#{bin}/gfsplit", "test.in" - system "#{bin}/gfcombine test.in.*" - end -end diff --git a/Formula/libghthash.rb b/Formula/libghthash.rb deleted file mode 100644 index cec63654447c2..0000000000000 --- a/Formula/libghthash.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Libghthash < Formula - desc "Generic hash table for C++" - homepage "https://web.archive.org/web/20170824230514/www.bth.se/people/ska/sim_home/libghthash.html" - url "https://web.archive.org/web/20170824230514/www.bth.se/people/ska/sim_home/filer/libghthash-0.6.2.tar.gz" - mirror "https://pkg.freebsd.org/ports-distfiles/libghthash-0.6.2.tar.gz" - sha256 "d1ccbb81f4c8afd7008f56ecb874f5cf497de480f49ee06929b4303d5852a7dd" - - bottle do - cellar :any - sha256 "746863cafe6d156513a4ba1c1a456f6d89014dad87ca825390162d8ea58a665a" => :catalina - sha256 "b6092f29d1b937b03313780a88f91f224cbbc73a564fca0a0810d036ea20b63d" => :mojave - sha256 "f9f17a73ef48e31f809d884ce1a419fe4568b167bb962cdf07c4197688572d59" => :high_sierra - sha256 "730eb3945e001efa5ebfc84452c94b69237f3cdf830ef5c58cef8854ed4cd3d6" => :sierra - sha256 "e889f34ca4f1978869eff48334f1f55248628fbc586abdeb151fe017479d220e" => :el_capitan - sha256 "0487e2e14b14ae288428c474fe9ce3e9baf814d4d73de8b0113ca9cc502ffd63" => :yosemite - sha256 "207d07d59447e098c1987286324866ef8b26e0c4c191e4c1c0268ba8d95c5fac" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-ivf" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - #include - - int main(int argc, char *argv[]) - { - ght_hash_table_t *p_table; - int *p_data; - int *p_he; - int result; - - p_table = ght_create(128); - - if ( !(p_data = (int*)malloc(sizeof(int))) ) { - return 1; - } - - *p_data = 15; - - ght_insert(p_table, - p_data, - sizeof(char)*strlen("blabla"), "blabla"); - - if ( (p_he = ght_get(p_table, - sizeof(char)*strlen("blabla"), "blabla")) ) { - result = 0; - } else { - result = 1; - } - ght_finalize(p_table); - - return result; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lghthash", "-o", "test" - system "./test" - end -end diff --git a/Formula/libgig.rb b/Formula/libgig.rb deleted file mode 100644 index 4221a561ccadd..0000000000000 --- a/Formula/libgig.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Libgig < Formula - desc "Library for Gigasampler and DLS (Downloadable Sounds) Level 1/2 files" - homepage "https://www.linuxsampler.org/libgig/" - url "https://download.linuxsampler.org/packages/libgig-4.2.0.tar.bz2" - sha256 "16229a46138b101eb9eda042c66d2cd652b1b3c9925a7d9577d52f2282f745ff" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "538a70194a691a8a8bd09095736f6aba4c6de6ed4f03bed512726372e41bd7a4" => :catalina - sha256 "5b4c6358356d805ce317ed31014a8235fc79bad43a80b6c03deb63abe8bc1aac" => :mojave - sha256 "050bb14b4914d0c08e2a8c192b5254ecb77f9239b8f516022260f5356a8ab947" => :high_sierra - sha256 "6e7d4ee68ce41305b89c91b2c7e34eeb57f45c6ea5d991beb0e66aac76a5d458" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "libsndfile" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - using namespace std; - - int main() - { - cout << gig::libraryName() << endl; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}/libgig", "-lgig", "-o", "test" - assert_match "libgig", shell_output("./test") - end -end diff --git a/Formula/libgit2-glib.rb b/Formula/libgit2-glib.rb deleted file mode 100644 index 224d1d4bf8e14..0000000000000 --- a/Formula/libgit2-glib.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Libgit2Glib < Formula - desc "Glib wrapper library around libgit2 git access library" - homepage "https://github.com/GNOME/libgit2-glib" - url "https://download.gnome.org/sources/libgit2-glib/0.99/libgit2-glib-0.99.0.1.tar.xz" - sha256 "e05a75c444d9c8d5991afc4a5a64cd97d731ce21aeb7c1c651ade1a3b465b9de" - license "LGPL-2.1" - revision 1 - head "https://github.com/GNOME/libgit2-glib.git" - - bottle do - sha256 "a5297beb6c9ab0602847472ec08fbd2eddad7e91ca3c78db15f4a8175912feea" => :catalina - sha256 "ffff80b61a3dd453796abdd059803d887c6de603d501c65a153571a0c04be5ce" => :mojave - sha256 "74b08631fc92b096f3034c512ea9f62889edc92c49c6581043fbf56256306ad4" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "gettext" - depends_on "glib" - depends_on "libgit2" - - def install - mkdir "build" do - system "meson", *std_meson_args, - "-Dpython=false", - "-Dvapi=true", - ".." - system "ninja", "-v" - system "ninja", "install", "-v" - libexec.install Dir["examples/*"] - end - end - - test do - mkdir "horatio" do - system "git", "init" - end - system "#{libexec}/general", testpath/"horatio" - end -end diff --git a/Formula/libgit2.rb b/Formula/libgit2.rb deleted file mode 100644 index 3f2f44a95b15c..0000000000000 --- a/Formula/libgit2.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Libgit2 < Formula - desc "C library of Git core methods that is re-entrant and linkable" - homepage "https://libgit2.github.com/" - url "https://github.com/libgit2/libgit2/archive/v1.0.1.tar.gz" - sha256 "1775427a6098f441ddbaa5bd4e9b8a043c7401e450ed761e69a415530fea81d2" - head "https://github.com/libgit2/libgit2.git" - - bottle do - cellar :any - sha256 "e6456b9dde3c5ed975cc6a106e721ce63a84e37e71762889c360920c999f2b12" => :catalina - sha256 "2187f1fd84786573d62180909d1f319c58700fa6fe662a2de93092dbde76bd16" => :mojave - sha256 "c7c5dbf3884b241c0350404858ba4f63d640921bee6ff8142c2e214533e42761" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "libssh2" - - def install - args = std_cmake_args - args << "-DBUILD_EXAMPLES=YES" - args << "-DBUILD_CLAR=NO" # Don't build tests. - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - cd "examples" do - (pkgshare/"examples").install "lg2" - end - system "make", "clean" - system "cmake", "..", "-DBUILD_SHARED_LIBS=OFF", *args - system "make" - lib.install "libgit2.a" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - int options = git_libgit2_features(); - return 0; - } - EOS - libssh2 = Formula["libssh2"] - flags = %W[ - -I#{include} - -I#{libssh2.opt_include} - -L#{lib} - -lgit2 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libglade.rb b/Formula/libglade.rb deleted file mode 100644 index e37d1de1d5114..0000000000000 --- a/Formula/libglade.rb +++ /dev/null @@ -1,90 +0,0 @@ -class Libglade < Formula - desc "RAD tool to help build GTK+ interfaces" - homepage "https://glade.gnome.org/" - url "https://download.gnome.org/sources/libglade/2.6/libglade-2.6.4.tar.gz" - sha256 "c41d189b68457976069073e48d6c14c183075d8b1d8077cb6dfb8b7c5097add3" - revision 4 - - bottle do - rebuild 1 - sha256 "f87fe8b63946d78fd43586ef25fbd108d9f81fda2089a66f40cbdc0216601f8e" => :catalina - sha256 "3fdb8055e888e22f7054432b185aad35a20c0d48b3c07c97429cab2b7a0bd3cc" => :mojave - sha256 "fd198334f49180de53d5bde9406e17aa4e3051ee5c421defdab9dbb0f3a1e681" => :high_sierra - sha256 "019f499d6ca86f279d5bfec74bf71ffe11a89bb6bc70f6901b7074e14885132c" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gtk+" - depends_on "libxml2" - - def install - ENV.append "LDFLAGS", "-lgmodule-2.0" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - glade_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"] - gtkx = Formula["gtk+"] - harfbuzz = Formula["harfbuzz"] - 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}/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#{harfbuzz.opt_include}/harfbuzz - -I#{include}/libglade-2.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 - -lglade-2.0 - -lglib-2.0 - -lgobject-2.0 - -lgtk-quartz-2.0 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - -lxml2 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libglademm.rb b/Formula/libglademm.rb deleted file mode 100644 index f397d52daea99..0000000000000 --- a/Formula/libglademm.rb +++ /dev/null @@ -1,136 +0,0 @@ -class Libglademm < Formula - desc "C++ wrapper around libglade" - homepage "https://gnome.org/" - url "https://download.gnome.org/sources/libglademm/2.6/libglademm-2.6.7.tar.bz2" - sha256 "38543c15acf727434341cc08c2b003d24f36abc22380937707fc2c5c687a2bc3" - revision 6 - - bottle do - cellar :any - sha256 "d123ccbbf9e8e599a6b889e3b02214b7556b9b205d1835cabb4259bf1520738d" => :catalina - sha256 "7198c6996d64bbe6a06380c23d010f0c9a949e3220c8a3dcb785fba0ceb22c33" => :mojave - sha256 "4daab6726178c96ac56452716422004dd4fcdfbaef22b85d99f9ddc317c88ea1" => :high_sierra - sha256 "6f7c8cbd127f333df690910aa8aa3561989679719bebbfb9d1d4c41a9821d57c" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gtkmm" - depends_on "libglade" - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - - int main(int argc, char *argv[]) { - try { - throw Gnome::Glade::XmlError("this formula should die"); - } - catch (Gnome::Glade::XmlError &e) {} - return 0; - } - EOS - ENV.libxml2 - atk = Formula["atk"] - atkmm = Formula["atkmm"] - cairo = Formula["cairo"] - cairomm = Formula["cairomm"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - gtkx = Formula["gtk+"] - gtkmm = Formula["gtkmm"] - harfbuzz = Formula["harfbuzz"] - libglade = Formula["libglade"] - libpng = Formula["libpng"] - libsigcxx = Formula["libsigc++@2"] - pango = Formula["pango"] - pangomm = Formula["pangomm"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{atkmm.opt_include}/atkmm-1.6 - -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#{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#{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#{gtkmm.opt_include}/gdkmm-2.4 - -I#{gtkmm.opt_include}/gtkmm-2.4 - -I#{gtkmm.opt_lib}/gdkmm-2.4/include - -I#{gtkmm.opt_lib}/gtkmm-2.4/include - -I#{gtkx.opt_include}/gtk-2.0 - -I#{gtkx.opt_include}/gtk-unix-print-2.0 - -I#{gtkx.opt_lib}/gtk-2.0/include - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/libglademm-2.4 - -I#{libglade.opt_include}/libglade-2.0 - -I#{libpng.opt_include}/libpng16 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/libglademm-2.4/include - -I#{pango.opt_include}/pango-1.0 - -I#{pangomm.opt_include}/pangomm-1.4 - -I#{pangomm.opt_lib}/pangomm-1.4/include - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{atkmm.opt_lib} - -L#{cairo.opt_lib} - -L#{cairomm.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{gtkmm.opt_lib} - -L#{gtkx.opt_lib} - -L#{libglade.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -L#{pangomm.opt_lib} - -latk-1.0 - -latkmm-1.6 - -lcairo - -lcairomm-1.0 - -lgdk-quartz-2.0 - -lgdk_pixbuf-2.0 - -lgdkmm-2.4 - -lgio-2.0 - -lgiomm-2.4 - -lglade-2.0 - -lglademm-2.4 - -lglib-2.0 - -lglibmm-2.4 - -lgobject-2.0 - -lgtk-quartz-2.0 - -lgtkmm-2.4 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - -lpangomm-1.4 - -lsigc-2.0 - -lxml2 - ] - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libgnomecanvas.rb b/Formula/libgnomecanvas.rb deleted file mode 100644 index 160b67e82806c..0000000000000 --- a/Formula/libgnomecanvas.rb +++ /dev/null @@ -1,98 +0,0 @@ -class Libgnomecanvas < Formula - desc "Highlevel, structured graphics library" - homepage "https://developer.gnome.org/libgnomecanvas/2.30/" - url "https://download.gnome.org/sources/libgnomecanvas/2.30/libgnomecanvas-2.30.3.tar.bz2" - sha256 "859b78e08489fce4d5c15c676fec1cd79782f115f516e8ad8bed6abcb8dedd40" - revision 4 - - bottle do - cellar :any - sha256 "775379b446e5fd6bcb13863e5c5d3993b382d84b8e68b4f06fdf6d758921cb81" => :catalina - sha256 "9ccb81e0493aa409725fe76ae345d5910be9ea3c782e4d9a46c24c42b0537150" => :mojave - sha256 "3c4443a3944a6834a107e2752c95174b49c83c3213be2ac3df319bfd900c22e6" => :high_sierra - sha256 "9b2e28d2331f1c24d8b320cc6509e5da3e3c748fac44d078e1f95c6c701b7b10" => :sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gtk+" - depends_on "libart" - depends_on "libglade" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-static", - "--prefix=#{prefix}", - "--enable-glade" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GnomeCanvasPoints *gcp = gnome_canvas_points_new(100); - 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+"] - harfbuzz = Formula["harfbuzz"] - libart = Formula["libart"] - 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}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{gtkx.opt_include}/gail-1.0 - -I#{gtkx.opt_include}/gtk-2.0 - -I#{gtkx.opt_lib}/gtk-2.0/include - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/libgnomecanvas-2.0 - -I#{libart.opt_include}/libart-2.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#{libart.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -lart_lgpl_2 - -latk-1.0 - -lcairo - -lgdk-quartz-2.0 - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgnomecanvas-2 - -lgobject-2.0 - -lgtk-quartz-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/libgnomecanvasmm.rb b/Formula/libgnomecanvasmm.rb deleted file mode 100644 index 6799ac0273809..0000000000000 --- a/Formula/libgnomecanvasmm.rb +++ /dev/null @@ -1,134 +0,0 @@ -class Libgnomecanvasmm < Formula - desc "C++ wrapper for libgnomecanvas" - homepage "https://launchpad.net/libgnomecanvasmm" - url "https://download.gnome.org/sources/libgnomecanvasmm/2.26/libgnomecanvasmm-2.26.0.tar.bz2" - sha256 "996577f97f459a574919e15ba7fee6af8cda38a87a98289e9a4f54752d83e918" - revision 6 - - bottle do - cellar :any - sha256 "ea6c93668fcd91aecd935009e2925b0327b26caa979e2b2bdcb03e6caf013b40" => :catalina - sha256 "cbb72a9f16194a63a21980edb7eb4c770a72ca4774a82c1e25b3ac2beecc99f5" => :mojave - sha256 "cf11cecd2caa375fe050597099fd572725ef154b33d9e9756f129d8b2085fa62" => :high_sierra - sha256 "91af30097a9c61e83ff6ce5f1bf6a689a15614d807c498717d9c74bba82361ea" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gtkmm" - depends_on "libgnomecanvas" - - def install - ENV.cxx11 - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - test do - (testpath/"test.cpp").write <<~EOS - #include - - int main(int argc, char *argv[]) { - Gnome::Canvas::init(); - return 0; - } - EOS - atk = Formula["atk"] - atkmm = Formula["atkmm"] - cairo = Formula["cairo"] - cairomm = Formula["cairomm"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - gtkx = Formula["gtk+"] - gtkmm = Formula["gtkmm"] - harfbuzz = Formula["harfbuzz"] - libart = Formula["libart"] - libgnomecanvas = Formula["libgnomecanvas"] - libpng = Formula["libpng"] - libsigcxx = Formula["libsigc++@2"] - pango = Formula["pango"] - pangomm = Formula["pangomm"] - pixman = Formula["pixman"] - flags = %W[ - -I#{atk.opt_include}/atk-1.0 - -I#{atkmm.opt_include}/atkmm-1.6 - -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#{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#{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#{gtkmm.opt_include}/gdkmm-2.4 - -I#{gtkmm.opt_include}/gtkmm-2.4 - -I#{gtkmm.opt_lib}/gdkmm-2.4/include - -I#{gtkmm.opt_lib}/gtkmm-2.4/include - -I#{gtkx.opt_include}/gail-1.0 - -I#{gtkx.opt_include}/gtk-2.0 - -I#{gtkx.opt_include}/gtk-unix-print-2.0 - -I#{gtkx.opt_lib}/gtk-2.0/include - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/libgnomecanvasmm-2.6 - -I#{libart.opt_include}/libart-2.0 - -I#{libgnomecanvas.opt_include}/libgnomecanvas-2.0 - -I#{libpng.opt_include}/libpng16 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/libgnomecanvasmm-2.6/include - -I#{pango.opt_include}/pango-1.0 - -I#{pangomm.opt_include}/pangomm-1.4 - -I#{pangomm.opt_lib}/pangomm-1.4/include - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{atk.opt_lib} - -L#{atkmm.opt_lib} - -L#{cairo.opt_lib} - -L#{cairomm.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{gtkmm.opt_lib} - -L#{gtkx.opt_lib} - -L#{libart.opt_lib} - -L#{libgnomecanvas.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -L#{pango.opt_lib} - -L#{pangomm.opt_lib} - -lart_lgpl_2 - -latk-1.0 - -latkmm-1.6 - -lcairo - -lcairomm-1.0 - -lgdk-quartz-2.0 - -lgdk_pixbuf-2.0 - -lgdkmm-2.4 - -lgio-2.0 - -lgiomm-2.4 - -lglib-2.0 - -lglibmm-2.4 - -lgnomecanvas-2 - -lgnomecanvasmm-2.6 - -lgobject-2.0 - -lgtk-quartz-2.0 - -lgtkmm-2.4 - -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/libgnt.rb b/Formula/libgnt.rb deleted file mode 100644 index e59fbf842d436..0000000000000 --- a/Formula/libgnt.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Libgnt < Formula - desc "NCurses toolkit for creating text-mode graphical user interfaces" - homepage "https://keep.imfreedom.org/libgnt/libgnt" - url "https://downloads.sourceforge.net/project/pidgin/libgnt/2.14.0/libgnt-2.14.0.tar.xz" - sha256 "6b7ea2030c9755ad9756ab4b1d3396dccaef4a712eccce34d3990042bb4b3abf" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "0ddf1b6ebd64e3989ee3e2c1482d3f852a3f44f6c196586d1d9c4e839927087a" => :catalina - sha256 "3d0291b16678836908fddc885fa613512e6f3ffbb2d11241a5320dfd48086822" => :mojave - sha256 "0b710c423d8895b711d3f658fa6abdffe2b351c2256a429f49363eece64b8928" => :high_sierra - end - - depends_on "gtk-doc" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "glib" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() { - gnt_init(); - gnt_quit(); - - return 0; - } - EOS - - flags = [ - "-I#{Formula["glib"].opt_include}/glib-2.0", - "-I#{Formula["glib"].opt_lib}/glib-2.0/include", - "-I#{include}", - "-L#{lib}", - "-L#{Formula["glib"].opt_lib}", - "-lgnt", - "-lglib-2.0", - ] - system ENV.cc, "test.c", *flags, "-o", "test" - system "./test" - end -end diff --git a/Formula/libgosu.rb b/Formula/libgosu.rb deleted file mode 100644 index c1da57214786f..0000000000000 --- a/Formula/libgosu.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Libgosu < Formula - desc "2D game development library" - homepage "https://libgosu.org/" - url "https://github.com/gosu/gosu/archive/v0.15.2.tar.gz" - sha256 "e2cf7fd9bc22348e73109c4442f19550fe4f7cc6218525379c68c12308646f42" - head "https://github.com/gosu/gosu.git" - - bottle do - cellar :any - sha256 "434d168198e19a69094d63e049fa384b54d5ccd1c0142dc3c65d13dd508c35c7" => :catalina - sha256 "af788f4adcf62f8a53c9ce1253d2125fa6871ae1d6ae3c16bb186fad3ff2baa7" => :mojave - sha256 "86f75871ff7bcb97c723193b1b7f9d835b15d0273a94f897ca9c1e6306bab586" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "sdl2" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - class MyWindow : public Gosu::Window - { - public: - MyWindow() - : Gosu::Window(640, 480) - { - set_caption(\"Hello World!\"); - } - - void update() - { - exit(0); - } - }; - - int main() - { - MyWindow window; - window.show(); - } - EOS - - system ENV.cxx, "test.cpp", "-o", "test", "-L#{lib}", "-lgosu", "-I#{include}", "-std=c++11" - system "./test" - end -end diff --git a/Formula/libgpg-error.rb b/Formula/libgpg-error.rb deleted file mode 100644 index 7678648f14b7d..0000000000000 --- a/Formula/libgpg-error.rb +++ /dev/null @@ -1,28 +0,0 @@ -class LibgpgError < Formula - desc "Common error values for all GnuPG components" - homepage "https://www.gnupg.org/related_software/libgpg-error/" - url "https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.38.tar.bz2" - sha256 "d8988275aa69d7149f931c10442e9e34c0242674249e171592b430ff7b3afd02" - license "GPL-2.0" - - bottle do - sha256 "e75e41ea083a1d480fd60a0a45e5ab838ad032f961ea5fb0cf8aafff070e3925" => :catalina - sha256 "60867a965e4ea8dc1e119adfecaa2bcfe63300bb7bb3e7af635ec921bc64f599" => :mojave - sha256 "6d00f7cb42d8e9b75d6c2ab9fa5b691b7844b14ddc268a67d60d4301f568d6f5" => :high_sierra - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-static" - system "make", "install" - - # avoid triggering mandatory rebuilds of software that hard-codes this path - inreplace bin/"gpg-error-config", prefix, opt_prefix - end - - test do - system "#{bin}/gpg-error-config", "--libs" - end -end diff --git a/Formula/libgphoto2.rb b/Formula/libgphoto2.rb deleted file mode 100644 index 921a0642a85f3..0000000000000 --- a/Formula/libgphoto2.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Libgphoto2 < Formula - desc "Gphoto2 digital camera library" - homepage "http://www.gphoto.org/proj/libgphoto2/" - url "https://downloads.sourceforge.net/project/gphoto/libgphoto/2.5.25/libgphoto2-2.5.25.tar.bz2" - sha256 "7c0e98f438c2b128186afe16ce7833a12fa36f87d01467e837b9d27e7a167f3a" - license "LGPL-2.1" - - bottle do - sha256 "0609b72a67e2d6c45ede30bb4cfca8b4fc6b312d5873c4e647e292fdc1f227ff" => :catalina - sha256 "5a1f7ec7d0146bb772a4c6fa2ef5ed53e6a6ac183fe1f916ca8b53b2a4c68ad9" => :mojave - sha256 "110b4ca7ee321419851bcf5b8401d2fe082bf29261787700890f93db77af0112" => :high_sierra - end - - head do - url "https://github.com/gphoto/libgphoto2.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - end - - depends_on "pkg-config" => :build - depends_on "gd" - depends_on "libtool" - depends_on "libusb-compat" - - def install - system "autoreconf", "-fvi" if build.head? - 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) { - Camera *camera; - return gp_camera_new(&camera); - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lgphoto2", "-o", "test" - system "./test" - end -end diff --git a/Formula/libgr.rb b/Formula/libgr.rb deleted file mode 100644 index ce37c648bc461..0000000000000 --- a/Formula/libgr.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Libgr < Formula - desc "GR framework: a graphics library for visualisation applications" - homepage "https://gr-framework.org/" - url "https://github.com/sciapp/gr/archive/v0.50.0.tar.gz" - sha256 "59947975c364b8ce98940eee4cf98a665ede66083362e60f3e3520d9c7d8bc1e" - - bottle do - sha256 "ad9c9b780448fd1d0cdaff04cef2e8ecbff39cb3a1630dd07be28a522121f115" => :catalina - sha256 "661c8cf3318eed81b35b8ebdd6edb65540e06eff91d349536304dac581283f1b" => :mojave - sha256 "9d5836a1715c143db817744b3c9c65e4502771b237448390582bbffb8c786b43" => :high_sierra - end - - depends_on :xcode => :build - depends_on "cairo" - depends_on "glfw" - depends_on "libtiff" - depends_on "qt" - depends_on "zeromq" - - def install - # TODO: Remove this when released archive includes - # the fix of https://github.com/sciapp/gr/pull/101 . - ENV.deparallelize - system "make", "GRDIR=#{prefix}" - system "make", "GRDIR=#{prefix}", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(void) { - gr_opengks(); - gr_openws(1, "test.png", 140); - gr_activatews(1); - double x[] = {0, 0.2, 0.4, 0.6, 0.8, 1.0}; - double y[] = {0.3, 0.5, 0.4, 0.2, 0.6, 0.7}; - gr_polyline(6, x, y); - gr_axes(gr_tick(0, 1), gr_tick(0, 1), 0, 0, 1, 1, -0.01); - gr_updatews(); - gr_emergencyclosegks(); - return 0; - } - EOS - - system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lGR" - system "./test" - - assert_predicate testpath/"test.png", :exist? - end -end diff --git a/Formula/libgraphqlparser.rb b/Formula/libgraphqlparser.rb deleted file mode 100644 index cb5ea83d835a0..0000000000000 --- a/Formula/libgraphqlparser.rb +++ /dev/null @@ -1,116 +0,0 @@ -class Libgraphqlparser < Formula - desc "GraphQL query parser in C++ with C and C++ APIs" - homepage "https://github.com/graphql/libgraphqlparser" - url "https://github.com/graphql/libgraphqlparser/archive/0.7.0.tar.gz" - sha256 "63dae018f970dc2bdce431cbafbfa0bd3e6b10bba078bb997a3c1a40894aa35c" - license "MIT" - revision 1 - - bottle do - cellar :any - sha256 "e4cea535715f0ed46ff1713df73dbc43d2845f4e0152f0137d4ad18def845050" => :catalina - sha256 "f2d46a3bfb5fd3aef9f8b47a5d1c50d204f6dbd74d1a387ca664e36022b7ddc4" => :mojave - sha256 "64779ec3108d9eef789d279abfafa90437c6a76b2ed3973d45979cd1051dc170" => :high_sierra - end - - depends_on "cmake" => :build - depends_on :macos # Due to Python 2 - - def install - system "cmake", ".", "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON", - *std_cmake_args - system "make" - system "make", "install" - libexec.install "dump_json_ast" - end - - test do - sample_query = <<~EOS - { user } - EOS - - sample_ast = JSON.parse(<<~EOS) - { - "kind": "Document", - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 9 - } - }, - "definitions": [ - { - "kind": "OperationDefinition", - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 9 - } - }, - "operation": "query", - "name": null, - "variableDefinitions": null, - "directives": null, - "selectionSet": { - "kind": "SelectionSet", - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 9 - } - }, - "selections": [ - { - "kind": "Field", - "loc": { - "start": { - "line": 1, - "column": 3 - }, - "end": { - "line": 1, - "column": 7 - } - }, - "alias": null, - "name": { - "kind": "Name", - "loc": { - "start": { - "line": 1, - "column": 3 - }, - "end": { - "line": 1, - "column": 7 - } - }, - "value": "user" - }, - "arguments": null, - "directives": null, - "selectionSet": null - } - ] - } - } - ] - } - EOS - - test_ast = JSON.parse pipe_output("#{libexec}/dump_json_ast", sample_query) - assert_equal sample_ast, test_ast - end -end diff --git a/Formula/libgsf.rb b/Formula/libgsf.rb deleted file mode 100644 index d53a38ad599ec..0000000000000 --- a/Formula/libgsf.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Libgsf < Formula - desc "I/O abstraction library for dealing with structured file formats" - homepage "https://developer.gnome.org/gsf/" - url "https://download.gnome.org/sources/libgsf/1.14/libgsf-1.14.47.tar.xz" - sha256 "d188ebd3787b5375a8fd38ee6f761a2007de5e98fa0cf5623f271daa67ba774d" - - bottle do - sha256 "82a2fce8b091d204302919c7541a0ad21a28a24fe8ad8a5d4ae7f50f3f190349" => :catalina - sha256 "a051f21e80044277fafb60264c915cb79ce5f64059e9737f7a15795bc79ad3c8" => :mojave - sha256 "c2cb9985014c2c727abe935f113ab827e5a7af1e4376c27261897381fc87a2ba" => :high_sierra - end - - head do - url "https://github.com/GNOME/libgsf.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gtk-doc" => :build - depends_on "libtool" => :build - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - - uses_from_macos "libxml2" - - def install - args = %W[--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/"gsf", "--help" - (testpath/"test.c").write <<~EOS - #include - int main() - { - void - gsf_init (void); - return 0; - } - EOS - system ENV.cc, "-I#{include}/libgsf-1", - "-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/libgsm.rb b/Formula/libgsm.rb deleted file mode 100644 index fa9002d28856c..0000000000000 --- a/Formula/libgsm.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Libgsm < Formula - desc "Lossy speech compression library" - homepage "http://www.quut.com/gsm/" - url "http://www.quut.com/gsm/gsm-1.0.19.tar.gz" - sha256 "4903652f68a8c04d0041f0d19b1eb713ddcd2aa011c5e595b3b8bca2755270f6" - - bottle do - cellar :any - sha256 "9a3eaa556cd1a5429c458ee11c29b5c757ee6f32fbc334355110a37622357dc4" => :catalina - sha256 "f7a7683ef5f7f916e81e3ed51aa754da92ca2b993533608f8fc95187baaf8b3c" => :mojave - sha256 "5a2b52e7ed65f005f32bb56519dd425b26e537f888b49402322fe1424f0901e4" => :high_sierra - end - - # Builds a dynamic library for gsm, this package is no longer developed - # upstream. Patch taken from Debian and modified to build a dylib. - patch do - url "https://gist.githubusercontent.com/dholm/5840964/raw/1e2bea34876b3f7583888b2284b0e51d6f0e21f4/gistfile1.txt" - sha256 "3b47c28991df93b5c23659011e9d99feecade8f2623762041a5dcc0f5686ffd9" - end - - def install - ENV.append_to_cflags "-c -O2 -DNeedFunctionPrototypes=1" - - # Only the targets for which a directory exists will be installed - bin.mkpath - lib.mkpath - include.mkpath - man1.mkpath - man3.mkpath - - # Dynamic library must be built first - system "make", "lib/libgsm.1.0.13.dylib", - "CC=#{ENV.cc}", "CCFLAGS=#{ENV.cflags}", - "LDFLAGS=#{ENV.ldflags}" - system "make", "all", - "CC=#{ENV.cc}", "CCFLAGS=#{ENV.cflags}", - "LDFLAGS=#{ENV.ldflags}" - system "make", "install", - "INSTALL_ROOT=#{prefix}", - "GSM_INSTALL_INC=#{include}" - lib.install Dir["lib/*dylib"] - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - gsm g = gsm_create(); - if (g == 0) - { - return 1; - } - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "-lgsm", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/libgtop.rb b/Formula/libgtop.rb deleted file mode 100644 index c119cb01e3d0a..0000000000000 --- a/Formula/libgtop.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Libgtop < Formula - desc "Library for portably obtaining information about processes" - homepage "https://library.gnome.org/devel/libgtop/stable/" - url "https://download.gnome.org/sources/libgtop/2.40/libgtop-2.40.0.tar.xz" - sha256 "78f3274c0c79c434c03655c1b35edf7b95ec0421430897fb1345a98a265ed2d4" - revision 1 - - bottle do - sha256 "e0391a7a27f7a7f27806294b73a49eb23b60bba785bb4d147f39f6cc3bf2cf4c" => :catalina - sha256 "207550dec06c9af31f523534a6ca65906b7e4c69ad6ec670969f98e00dcc8c2b" => :mojave - sha256 "981a91a3221651bf94e922f8e29cd8be08527453a833ab8f69cb7dbf7d39ed0d" => :high_sierra - sha256 "77db9c002217605f8bad346413fc8cc038109ddd65ba7e62e09d25d341e1023f" => :sierra - end - - depends_on "gobject-introspection" => :build - 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}", - "--without-x" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - const glibtop_sysinfo *info = glibtop_get_sysinfo(); - 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}/libgtop-2.0 - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lglib-2.0 - -lgtop-2.0 - -lintl - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libgusb.rb b/Formula/libgusb.rb deleted file mode 100644 index 3df63b290b270..0000000000000 --- a/Formula/libgusb.rb +++ /dev/null @@ -1,97 +0,0 @@ -class Libgusb < Formula - include Language::Python::Shebang - - desc "GObject wrappers for libusb1" - homepage "https://github.com/hughsie/libgusb" - url "https://people.freedesktop.org/~hughsient/releases/libgusb-0.3.4.tar.xz" - sha256 "581fd24e12496654b9b2a0732f810b554dfd9212516c18c23586c0cd0b382e04" - license "LGPL-2.1" - - bottle do - sha256 "9e916fa412c48ec87a1e637011a8427e7486282196c7357b755613f714a552cf" => :catalina - sha256 "73c5ad041e47e22306ab183df0bbb40e7cb257e5e3cf657f83627142f6b57fbc" => :mojave - sha256 "d854847ba9e74654ca556a6a86dfd9569e99fddfeaaf0e94ad844ba26b282994" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson-internal" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "vala" => :build - depends_on "glib" - depends_on "libusb" - - # The original usb.ids file can be found at http://www.linux-usb.org/usb.ids - # It is updated over time and its checksum changes, we maintain a copy - resource "usb.ids" do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/4235be3ce12f415f75869349af9a4198543f167a/simple-scan/usb.ids" - sha256 "ceceb3759e48eaf47451d7bca81ef4174fced1d4300f9ed33e2b53ee23160c6b" - end - - # remove in next release - # patch submitted, https://github.com/hughsie/libgusb/pull/38 - patch :DATA - - def install - rewrite_shebang detected_python_shebang, "contrib/generate-version-script.py" - (share/"hwdata/").install resource("usb.ids") - - mkdir "build" do - system "meson", *std_meson_args, "-Ddocs=false", "-Dusb_ids=#{share}/hwdata/usb.ids", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - system "#{bin}/gusbcmd", "-h" - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GUsbContext *context = g_usb_context_new(NULL); - g_assert_nonnull(context); - return 0; - } - EOS - gettext = Formula["gettext"] - glib = Formula["glib"] - libusb = Formula["libusb"] - flags = %W[ - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{libusb.opt_include}/libusb-1.0 - -I#{include}/gusb-1 - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{libusb.opt_lib} - -L#{lib} - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - -lusb-1.0 - -lgusb - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end - -__END__ -diff --git a/gusb/meson.build b/gusb/meson.build -index fa2b924..f8d4b70 100644 ---- a/gusb/meson.build -+++ b/gusb/meson.build -@@ -41,7 +41,7 @@ install_headers([ - - mapfile = 'libgusb.ver' - vflag = [] --if host_machine.system() in ['linux', 'windows'] -+if host_machine.system() == 'linux' or host_machine.system() == 'windows' - vflag += '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile) - endif - gusb = library( diff --git a/Formula/libgweather.rb b/Formula/libgweather.rb deleted file mode 100644 index b8353d68c2f8b..0000000000000 --- a/Formula/libgweather.rb +++ /dev/null @@ -1,104 +0,0 @@ -class Libgweather < Formula - desc "GNOME library for weather, locations and timezones" - homepage "https://wiki.gnome.org/Projects/LibGWeather" - url "https://download.gnome.org/sources/libgweather/3.36/libgweather-3.36.1.tar.xz" - sha256 "de2709f0ee233b20116d5fa9861d406071798c4aa37830ca25f5ef2c0083e450" - revision 1 - - bottle do - sha256 "52010805ebdedbc7761a4bb2cc2e33af60c6c788ce6262f47b182aeb4c222e36" => :catalina - sha256 "15d6e0f13efe2a3a4be42dbd2ee5e8830c840571bc614580490972e0bff9e23b" => :mojave - sha256 "4626a11133788aee3a06e6de45b6a653731f2a91137a61b914c1e566a155fb10" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "geocode-glib" - depends_on "gtk+3" - depends_on "libsoup" - - def install - ENV["DESTDIR"] = "/" - - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - def post_install - system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = gweather_info_get_type(); - 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"] - libsoup = Formula["libsoup"] - 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#{gtkx3.opt_include}/gtk-3.0 - -I#{harfbuzz.opt_include}/harfbuzz - -I#{include}/libgweather-3.0 - -I#{libepoxy.opt_include} - -I#{libpng.opt_include}/libpng16 - -I#{libsoup.opt_include}/libsoup-2.4 - -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#{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 - -lgobject-2.0 - -lgtk-3 - -lgweather-3 - -lintl - -lpango-1.0 - -lpangocairo-1.0 - ] - system ENV.cc, "-DGWEATHER_I_KNOW_THIS_IS_UNSTABLE=1", "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libgxps.rb b/Formula/libgxps.rb deleted file mode 100644 index 4bc0e96b6fa75..0000000000000 --- a/Formula/libgxps.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Libgxps < Formula - desc "GObject based library for handling and rendering XPS documents" - homepage "https://wiki.gnome.org/Projects/libgxps" - url "https://download.gnome.org/sources/libgxps/0.3/libgxps-0.3.1.tar.xz" - sha256 "1a939fc8fcea9471b7eca46b1ac90cff89a30d26f65c7c9a375a4bf91223fa94" - license "LGPL-2.1" - - bottle do - sha256 "74f4662c40830e4697255a05447171637c749ce28a6aa7262ab29cbfca32d642" => :catalina - sha256 "f2a0b5d1e9d85ad84ab041381c3c0bdd8f6f98d2be8586cdf48958e4a85aab27" => :mojave - sha256 "ef0b670a2dcbbbc2e42e6dd9ada96353fad1d039c42d8a41ef5271b8370bdd25" => :high_sierra - sha256 "949980a659fa2c301992af86c54a91e47a9721e372348bb1e5b49891d55b5285" => :sierra - end - - head do - url "https://gitlab.gnome.org/GNOME/libgxps.git" - end - - depends_on "gobject-introspection" => :build - depends_on "meson-internal" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gtk+3" - depends_on "libarchive" - depends_on "little-cms2" - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - mkdir_p [ - (testpath/"Documents/1/Pages/_rels/"), - (testpath/"_rels/"), - ] - - (testpath/"FixedDocumentSequence.fdseq").write <<~EOS - - - - EOS - (testpath/"Documents/1/FixedDocument.fdoc").write <<~EOS - - - - EOS - (testpath/"Documents/1/Pages/1.fpage").write <<~EOS - - EOS - (testpath/"_rels/.rels").write <<~EOS - - - - EOS - [ - "_rels/FixedDocumentSequence.fdseq.rels", - "Documents/1/_rels/FixedDocument.fdoc.rels", - "Documents/1/Pages/_rels/1.fpage.rels", - ].each do |f| - (testpath/f).write <<~EOS - - EOS - end - - Dir.chdir(testpath) do - system "/usr/bin/zip", "-qr", (testpath/"test.xps"), "_rels", "Documents", "FixedDocumentSequence.fdseq" - end - system "#{bin}/xpstopdf", (testpath/"test.xps") - end -end diff --git a/Formula/libharu.rb b/Formula/libharu.rb deleted file mode 100644 index 1848bb69fe195..0000000000000 --- a/Formula/libharu.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Libharu < Formula - desc "Library for generating PDF files" - homepage "https://github.com/libharu/libharu" - url "https://github.com/libharu/libharu/archive/RELEASE_2_3_0.tar.gz" - sha256 "8f9e68cc5d5f7d53d1bc61a1ed876add1faf4f91070dbc360d8b259f46d9a4d2" - license "Zlib" - head "https://github.com/libharu/libharu.git" - - bottle do - cellar :any - sha256 "41becd02e09ddf3c566e69d7c8b2a0c52d571fb754ccff155d5e5d630d8eb64b" => :catalina - sha256 "3ae8ecb2883c97e36e027d3ee6d81cf2aeaeccbf5e11616a4b06f2c229c74e35" => :mojave - sha256 "70363d91450426724b94040b3fc5130d0e024fc13e08e5747cf47017fb94c76e" => :high_sierra - sha256 "860cda2675feea36f82f4b8108927c6a0b1cabca5429c119f63557da11394f74" => :sierra - sha256 "68003e06f893b8df9d412960a06c69f6b45cb4ab5abd96e9f10c5936ab8724ac" => :el_capitan - sha256 "fd4201d2cf6e068aed5e946b09ae1b22a390ca4ed968084bfed18ed705047987" => :yosemite - sha256 "74e714dd0419580bbde47d9458abd95efd4ea316ec0a28e4c665bbeb89401329" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "libpng" - - def install - system "./buildconf.sh", "--force" - - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --with-png=#{Formula["libpng"].opt_prefix} - ] - - args << "--with-zlib=#{MacOS.sdk_path}/usr" if MacOS.sdk_path_if_needed - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include "hpdf.h" - - int main(void) - { - int result = 1; - HPDF_Doc pdf = HPDF_New(NULL, NULL); - - if (pdf) { - HPDF_AddPage(pdf); - - if (HPDF_SaveToFile(pdf, "test.pdf") == HPDF_OK) - result = 0; - - HPDF_Free(pdf); - } - - return result; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lhpdf", "-lz", "-o", "test" - system "./test" - end -end diff --git a/Formula/libhdhomerun.rb b/Formula/libhdhomerun.rb deleted file mode 100644 index feb9a11f86084..0000000000000 --- a/Formula/libhdhomerun.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Libhdhomerun < Formula - desc "C library for controlling SiliconDust HDHomeRun TV tuners" - homepage "https://www.silicondust.com/support/linux/" - url "https://download.silicondust.com/hdhomerun/libhdhomerun_20200521.tgz" - sha256 "a61038f0a78c5dcab3508927ba47ac6ec47840f3d42a2df2b02034cfd7400668" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "f2ae936a544ec2f145195db79b83760aae0fd47045e7e255b17dc19acf4b0b98" => :catalina - sha256 "32e8a587fe7df2e274d02261178bcdb4a1575bfd43bbb8f0f97cf9d11fb0d9d3" => :mojave - sha256 "5532b7fbba3fb88fb3733b12cd2e173575c57bc9ca85e4a8db79639d4786d713" => :high_sierra - end - - def install - system "make" - bin.install "hdhomerun_config" - lib.install "libhdhomerun.dylib" - include.install Dir["hdhomerun*.h"] - end - - test do - # Devices may be found or not found, with differing return codes - discover = pipe_output("#{bin}/hdhomerun_config discover") - assert_match /no devices found|hdhomerun device|found at/, discover - end -end diff --git a/Formula/libheif.rb b/Formula/libheif.rb deleted file mode 100644 index 6ea48c8116e76..0000000000000 --- a/Formula/libheif.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libheif < Formula - desc "ISO/IEC 23008-12:2017 HEIF file format decoder and encoder" - homepage "https://www.libde265.org/" - url "https://github.com/strukturag/libheif/releases/download/v1.7.0/libheif-1.7.0.tar.gz" - sha256 "842a9ab4b8d6f0faf5a6dc5e8507321199ec44c0b1d8eb199f2de9b49e2db092" - - bottle do - cellar :any - sha256 "dc3c55be447a590b3bfd0ba5e0a1bf1a79276a219123fdbf9d9dda5995a95de0" => :catalina - sha256 "9c32b0a2b6ae5c3d9c60abb934ba7bd8f053a05c8ab2e2bc800604dee7ae227b" => :mojave - sha256 "78e4531cd8bffbe9107ccea42db15f721e09edb6dd2957a0f6e723824415c456" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "jpeg" - depends_on "libde265" - depends_on "libpng" - depends_on "shared-mime-info" - depends_on "x265" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - pkgshare.install "examples/example.heic" - end - - def post_install - system Formula["shared-mime-info"].opt_bin/"update-mime-database", "#{HOMEBREW_PREFIX}/share/mime" - end - - test do - output = "File contains 2 images" - example = pkgshare/"example.heic" - exout = testpath/"example.jpg" - - assert_match output, shell_output("#{bin}/heif-convert #{example} #{exout}") - assert_predicate testpath/"example-1.jpg", :exist? - assert_predicate testpath/"example-2.jpg", :exist? - end -end diff --git a/Formula/libhid.rb b/Formula/libhid.rb deleted file mode 100644 index f5785e9682993..0000000000000 --- a/Formula/libhid.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Libhid < Formula - desc "Library to access and interact with USB HID devices" - homepage "https://directory.fsf.org/wiki/Libhid" - url "https://pkg.freebsd.org/ports-distfiles/libhid-0.2.16.tar.gz" - sha256 "f6809ab3b9c907cbb05ceba9ee6ca23a705f85fd71588518e14b3a7d9f2550e5" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "049d5c106ab738e55af18878f19cc0510d78bbda54f0c5626e3ccb725e415c68" => :catalina - sha256 "7457dc1791e661356e54059fb7b49f9629f2814694057bb38c6ad6698b3c4556" => :mojave - sha256 "b2949cef974f368856304506aecea44d3daca81b2d8c798bc141ef376723eded" => :high_sierra - sha256 "b92f274a981788b3092927223099f4f3220877417c766ec8e8bd63171e9a9849" => :sierra - sha256 "a22388fc2ac89d99ed04449c590b035308a81c8f1a2e80ee68ca64a7e10ced7e" => :el_capitan - sha256 "4920ff4278cbc288fc8c84ef9b3137d99010ba047d6f072b9a6eccf07588721a" => :yosemite - sha256 "cda30ad7a75c6a9b156806f398d39afd8288dd7c94c6d06685f8168125906cae" => :mavericks - end - - depends_on "libusb" - depends_on "libusb-compat" - - # Fix compilation error on 10.9 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/libhid/0.2.16.patch" - sha256 "443a3218902054b7fc7a9f91fd1601d50e2cc7bdca3f16e75419b3b60f2dab81" - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-swig" - - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) { - hid_init(); - return hid_cleanup(); - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lhid", "-o", "test" - system "./test" - end -end diff --git a/Formula/libhttpserver.rb b/Formula/libhttpserver.rb deleted file mode 100644 index 65b1565aca947..0000000000000 --- a/Formula/libhttpserver.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Libhttpserver < Formula - desc "C++ library of embedded Rest HTTP server" - homepage "https://github.com/etr/libhttpserver" - url "https://github.com/etr/libhttpserver/archive/0.18.1.tar.gz" - sha256 "c830cb40b448a44cfc9000713aefff15d4ab1f6ebd6b47280a3cb64cb020f326" - license "LGPL-2.1" - head "https://github.com/etr/libhttpserver.git" - - bottle do - cellar :any - sha256 "e7f063d3efcf580237ee3a414102aabb09604f9f50956f3193ed78d2cdc700d7" => :catalina - sha256 "61520d55052d75ea8761d89f892c6b97ecb4811236bbdb748630cca00130b441" => :mojave - sha256 "8a48967a0dc9715133455dd6ca548ee16652d451c5cba71c85df9b1ce904f442" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libmicrohttpd" - - uses_from_macos "curl" => :test - - def install - args = [ - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - ] - - system "./bootstrap" - mkdir "build" do - system "../configure", *args - system "make", "install" - end - pkgshare.install "examples" - end - - test do - port = free_port - - cp pkgshare/"examples/hello_world.cpp", testpath - inreplace "hello_world.cpp", "create_webserver(8080)", - "create_webserver(#{port})" - - system ENV.cxx, "hello_world.cpp", - "-std=c++11", "-o", "hello_world", "-L#{lib}", "-lhttpserver", "-lcurl" - - pid = fork { exec "./hello_world" } - - sleep 1 # grace time for server start - - begin - assert_match /Hello World!!!/, shell_output("curl http://127.0.0.1:#{port}/hello") - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/libhttpseverywhere.rb b/Formula/libhttpseverywhere.rb deleted file mode 100644 index 297bfa755c37a..0000000000000 --- a/Formula/libhttpseverywhere.rb +++ /dev/null @@ -1,92 +0,0 @@ -class Libhttpseverywhere < Formula - desc "Bring HTTPSEverywhere to desktop apps" - homepage "https://github.com/gnome/libhttpseverywhere" - url "https://download.gnome.org/sources/libhttpseverywhere/0.8/libhttpseverywhere-0.8.3.tar.xz" - sha256 "1c006f5633842a2b131c1cf644ab929556fc27968a60da55c00955bd4934b6ca" - revision 2 - - bottle do - cellar :any - sha256 "f329514bd9a5b50bde27abe0a914072c5c32db02a3df1f76e5e6a02256493547" => :catalina - sha256 "7ed8d7cc4934185649bb1d3efc00f0ffac955310085db2cf44434cdf476a7e8d" => :mojave - sha256 "109e95eba0ebfe5a6d3c358055bc07861e2dce33e2376aa33843e73fba9a52eb" => :high_sierra - sha256 "f161a27096199a9810416b47d93c1bbf95b3948641ab009a7cfb049e5264a76f" => :sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson-internal" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "glib" - depends_on "json-glib" - depends_on "libarchive" - depends_on "libgee" - depends_on "libsoup" - - # see https://gitlab.gnome.org/GNOME/libhttpseverywhere/issues/1 - # remove when next version is released - patch do - url "https://gitlab.gnome.org/GNOME/libhttpseverywhere/commit/6da08ef1ade9ea267cecf14dd5cb2c3e6e5e50cb.diff" - sha256 "e5499c290c5b48b243f67763a2c710acc5bd52b90541eb8da3f8b24b516f7430" - end - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GType type = https_everywhere_context_get_type(); - return 0; - } - EOS - ENV.libxml2 - gettext = Formula["gettext"] - glib = Formula["glib"] - json_glib = Formula["json-glib"] - libarchive = Formula["libarchive"] - libgee = Formula["libgee"] - libsoup = Formula["libsoup"] - 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}/httpseverywhere-0.8 - -I#{json_glib.opt_include}/json-glib-1.0 - -I#{libarchive.opt_include} - -I#{libgee.opt_include}/gee-0.8 - -I#{libsoup.opt_include}/libsoup-2.4 - -I#{pcre.opt_include} - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{json_glib.opt_lib} - -L#{libarchive.opt_lib} - -L#{libgee.opt_lib} - -L#{libsoup.opt_lib} - -L#{lib} - -larchive - -lgee-0.8 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lhttpseverywhere-0.8 - -lintl - -ljson-glib-1.0 - -lsoup-2.4 - -lxml2 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libical.rb b/Formula/libical.rb deleted file mode 100644 index db1d8704c6129..0000000000000 --- a/Formula/libical.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Libical < Formula - desc "Implementation of iCalendar protocols and data formats" - homepage "https://libical.github.io/libical/" - url "https://github.com/libical/libical/releases/download/v3.0.8/libical-3.0.8.tar.gz" - sha256 "09fecacaf75ba5a242159e3a9758a5446b5ce4d0ab684f98a7040864e1d1286f" - revision 2 - - bottle do - cellar :any - sha256 "aee72172114e605f00d453d7a2f5e7be3b813fcc56d05463c97de76f579db5f4" => :catalina - sha256 "93bd93bbad50f91aaa215ba2f764046fef919790a4ff227328a309b2ad2490d2" => :mojave - sha256 "3ff8dae7c504718bffd8fb8ce066c3b5c777d12250bdc87ff3fbb7f230284d1b" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "icu4c" - - uses_from_macos "libxml2" - - def install - system "cmake", ".", "-DBDB_LIBRARY=BDB_LIBRARY-NOTFOUND", - "-DENABLE_GTK_DOC=OFF", - "-DSHARED_ONLY=ON", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #define LIBICAL_GLIB_UNSTABLE_API 1 - #include - int main(int argc, char *argv[]) { - ICalParser *parser = i_cal_parser_new(); - return 0; - } - EOS - system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lical-glib", - "-I#{Formula["glib"].opt_include}/glib-2.0", - "-I#{Formula["glib"].opt_lib}/glib-2.0/include" - system "./test" - end -end diff --git a/Formula/libicns.rb b/Formula/libicns.rb deleted file mode 100644 index b61b3e803abe9..0000000000000 --- a/Formula/libicns.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Libicns < Formula - desc "Library for manipulation of the macOS .icns resource format" - homepage "https://icns.sourceforge.io/" - url "https://downloads.sourceforge.net/project/icns/libicns-0.8.1.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/libi/libicns/libicns_0.8.1.orig.tar.gz" - sha256 "335f10782fc79855cf02beac4926c4bf9f800a742445afbbf7729dab384555c2" - revision 3 - - bottle do - cellar :any - sha256 "33e4b9bf7de81d160ba9f8802c24e89c90903e6be9a3103c7e296536b1fe1511" => :catalina - sha256 "fe7c57605e6f9b5626f5c2048aacd121c2c8973d24113f03275ed0659392a9fb" => :mojave - sha256 "a2c03e94df9a8291b73c544d188d9e796161f49e0f14b8c88f94da40d3cfa04f" => :high_sierra - sha256 "8fb5848fa2a111b3fc66aaea73c60a0795da6468e2ace92d2de57c9c8a5a3cde" => :sierra - sha256 "12579e9f34ef57d3979b5a01206b543a67bf313cdb056d6c3e20e0b8cf0842b6" => :el_capitan - sha256 "aed1a7df05a8f98ea64dcdd8c4a406207239b7b187629fc03ae799308a142a4d" => :yosemite - end - - depends_on "jasper" - depends_on "libpng" - - def install - # Fix for libpng 1.5 - inreplace "icnsutils/png2icns.c", - "png_set_gray_1_2_4_to_8", - "png_set_expand_gray_1_2_4_to_8" - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include "icns.h" - int main(void) - { - int error = 0; - FILE *inFile = NULL; - icns_family_t *iconFamily = NULL; - icns_image_t iconImage; - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "-licns", testpath/"test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/libiconv.rb b/Formula/libiconv.rb deleted file mode 100644 index 058a3c624b820..0000000000000 --- a/Formula/libiconv.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Libiconv < Formula - desc "Conversion library" - homepage "https://www.gnu.org/software/libiconv/" - url "https://ftp.gnu.org/gnu/libiconv/libiconv-1.16.tar.gz" - mirror "https://ftpmirror.gnu.org/libiconv/libiconv-1.16.tar.gz" - sha256 "e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "24d81638fcd7416a56c3dbdac7e2265d7b0476b17a71b631045425380122e6b1" => :catalina - sha256 "7638dd8e2d511a2ce14c6c420762ce7fdbae6a34158e25015c3ffd88de2dd19b" => :mojave - sha256 "0f7f5728be3b7fc082a62df5e38cf1f1f9dc540e95f0c3479788cc2e2dee7294" => :high_sierra - sha256 "2c40a7b0486b9394f5f4cb6304179527421b68c965c49d961cf2703205da93e1" => :sierra - end - - keg_only :provided_by_macos - - patch do - url "https://raw.githubusercontent.com/Homebrew/patches/9be2793af/libiconv/patch-utf8mac.diff" - sha256 "e8128732f22f63b5c656659786d2cf76f1450008f36bcf541285268c66cabeab" - end - - patch :DATA - - def install - ENV.deparallelize - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-extra-encodings", - "--enable-static", - "--docdir=#{doc}" - system "make", "-f", "Makefile.devel", "CFLAGS=#{ENV.cflags}", "CC=#{ENV.cc}" - system "make", "install" - end - - test do - system bin/"iconv", "--help" - end -end - - -__END__ -diff --git a/lib/flags.h b/lib/flags.h -index d7cda21..4cabcac 100644 ---- a/lib/flags.h -+++ b/lib/flags.h -@@ -14,6 +14,7 @@ - - #define ei_ascii_oflags (0) - #define ei_utf8_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO) -+#define ei_utf8mac_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO) - #define ei_ucs2_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO) - #define ei_ucs2be_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO) - #define ei_ucs2le_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO) diff --git a/Formula/libid3tag.rb b/Formula/libid3tag.rb deleted file mode 100644 index 642ec935ff081..0000000000000 --- a/Formula/libid3tag.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Libid3tag < Formula - desc "ID3 tag manipulation library" - homepage "https://www.underbit.com/products/mad/" - url "https://downloads.sourceforge.net/project/mad/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz" - sha256 "63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151" - - bottle do - cellar :any - rebuild 1 - sha256 "2827ea8d45b9d7bdf88dfc4c7b2addb55cc056250f05720ef140e3ade774e2ff" => :catalina - sha256 "51257e9e96bedecb39c15f25bdefc4150ba636f76c828240df0c214c6dc8381f" => :mojave - sha256 "42909989a248048c3c03c64d937ab3ffc655dbf8fc90d6deffaa74f979bdbdba" => :high_sierra - sha256 "f80ff2abda5796fcabba3ff54405d9626628c3969f844723e9232d66e85e745f" => :sierra - sha256 "75e446174dd2a9dc17326c998757c4218a89cddb734f3000d0b0506de801732a" => :el_capitan - sha256 "07ef662e3ab9be0cce16eabb13dbc046fc60c42184ac003285371dc955859697" => :yosemite - sha256 "d832f73e16b185fed6a66d2f00199a7d76411e438854988262463f4769b40d5b" => :mavericks - end - - # patch for utf-16 (memory leaks), see https://bugs.launchpad.net/mixxx/+bug/403586 - { - "utf16.patchlibid3tag-0.15.1b-utf16" => "487d0c531f3653f8e754d720729cf1cec1bce6e897b845fa61adaaf2668d1568", - "unknown-encoding" => "8b695c9c05e3885655b2e798326b804011615bc6c831cd55cdbacc456a6b9494", - "compat" => "88f486c3d263a4dd5bb556232dcfe2fba175b5124bcdd72aa6c30f562fc87d53", - "file-write" => "eff855cabd8a51866a29246a1b257da64f46aab72d4b8e163e2a4c0d15165bf1", - }.each do |name, sha| - patch do - url "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-#{name}.patch?id=56bd759df1d0" - sha256 sha - end - end - - # typedef for 64-bit long + buffer overflow - { - "64bit-long" => "5f8b3d3419addf90977832b0a6e563acc2c8e243bb826ebb6d0ec573ec122e1b", - "fix_overflow" => "43ea3e0b324fb25802dae6410564c947ce1982243c781ef54b023f060c3b0ac4", - "tag" => "ca7262ddad158ab0be804429d705f8c6a1bb120371dec593323fa4876c1b277f", - }.each do |name, sha| - patch :p0 do - url "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-#{name}.patch?id=56bd759df1d0" - sha256 sha - end - end - - # corrects "a cappella" typo - patch :p2 do - url "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch?id=56bd759df1d0" - sha256 "5e86270ebb179d82acee686700d203e90f42e82beeed455b0163d8611657d395" - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" - system "make", "install" - - (lib+"pkgconfig/id3tag.pc").write pc_file - end - - def pc_file - <<~EOS - prefix=#{opt_prefix} - exec_prefix=${prefix} - libdir=${exec_prefix}/lib - includedir=${prefix}/include - - Name: id3tag - Description: ID3 tag reading library - Version: #{version} - Requires: - Conflicts: - Libs: -L${libdir} -lid3tag -lz - Cflags: -I${includedir} - EOS - end -end diff --git a/Formula/libident.rb b/Formula/libident.rb deleted file mode 100644 index 4ac25536671a1..0000000000000 --- a/Formula/libident.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Libident < Formula - desc "Ident protocol library" - homepage "https://www.remlab.net/libident/" - url "https://www.remlab.net/files/libident/libident-0.32.tar.gz" - sha256 "8cc8fb69f1c888be7cffde7f4caeb3dc6cd0abbc475337683a720aa7638a174b" - - bottle do - cellar :any - rebuild 1 - sha256 "4482a61d30a1ac68265e91eafb45efdc734881d0a032e4b483707545a4ce98e5" => :catalina - sha256 "5afab4111e356d2c88632a89a6ffcf82b96530737b9c5c38ba0622900322ab79" => :mojave - sha256 "f6bc989df22a80f3b0f8c6a2d458b5a00d9a4d48247cb7892877bd287e804a50" => :high_sierra - sha256 "4fb8a991f9f83d499b32a814b2d68465327b7b77c0108764e58e4296a968100f" => :sierra - sha256 "6236d3b4ee424795859cc64da30997ff67f7ac5bd42702e8eabe10f99339ca48" => :el_capitan - sha256 "53db8e889d8efa34b4a3b6a145bcec2bcb53595e7db0cfdd55c8d857dff3a442" => :yosemite - sha256 "d8e20cc9d2015b83785d4eb05110afc082a6389267df82546cc89e693dd2db6a" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end -end diff --git a/Formula/libidl.rb b/Formula/libidl.rb deleted file mode 100644 index d8d3bc08edff6..0000000000000 --- a/Formula/libidl.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Libidl < Formula - desc "Library for creating CORBA IDL files" - homepage "https://ftp.acc.umu.se/pub/gnome/sources/libIDL/0.8/" - url "https://download.gnome.org/sources/libIDL/0.8/libIDL-0.8.14.tar.bz2" - sha256 "c5d24d8c096546353fbc7cedf208392d5a02afe9d56ebcc1cccb258d7c4d2220" - revision 1 - - bottle do - cellar :any - sha256 "fc384a7b4357147c85196b681bd1a96a70e2a7e194c38b6e8afbef5bafc21efb" => :catalina - sha256 "6221a3b0ea37b55c26bc1f83c84ce3e027a8925b92d63055a51fe3a7d6bdff19" => :mojave - sha256 "9b07bec68567266f1bc065b05afdb9b034c0c70548145d7cdd963b5958c8da30" => :high_sierra - sha256 "ecabcc1a9cd229a135557f0f8bc32a38d03d399ff6816b0fc897cc4bcf72cd1c" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libidn.rb b/Formula/libidn.rb deleted file mode 100644 index cc20ce67c2505..0000000000000 --- a/Formula/libidn.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Libidn < Formula - desc "International domain name library" - homepage "https://www.gnu.org/software/libidn/" - url "https://ftp.gnu.org/gnu/libidn/libidn-1.35.tar.gz" - mirror "https://ftpmirror.gnu.org/libidn/libidn-1.35.tar.gz" - sha256 "f11af1005b46b7b15d057d7f107315a1ad46935c7fcdf243c16e46ec14f0fe1e" - - bottle do - cellar :any - sha256 "a720f31e3d82a3e537ae2fbaf88bdfcf537b3452615a170c72714c111df4a661" => :catalina - sha256 "d3741facdecc039b53d64392b6f8f4377a01d38bd0ce388db1d4d3606c7d5da9" => :mojave - sha256 "94e508f0b66a0c37c7a05dad6fff49542439a05cf913980caff4142e58ae998f" => :high_sierra - sha256 "ddbdf99759b5bf8840afdf4b50de61b3770fab70d26e08c0cd54c8df54c7da7d" => :sierra - sha256 "11f95f7689146cda4ee3960295cd39f9ec5c613871e35c27d0260c7bd8eeb199" => :el_capitan - end - - depends_on "pkg-config" => :build - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-csharp", - "--with-lispdir=#{elisp}" - system "make", "install" - end - - test do - ENV["CHARSET"] = "UTF-8" - system bin/"idn", "räksmörgås.se", "blåbærgrød.no" - end -end diff --git a/Formula/libidn2.rb b/Formula/libidn2.rb deleted file mode 100644 index 41d1e0c4f646f..0000000000000 --- a/Formula/libidn2.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Libidn2 < Formula - desc "International domain name library (IDNA2008, Punycode and TR46)" - homepage "https://www.gnu.org/software/libidn/#libidn2" - url "https://ftp.gnu.org/gnu/libidn/libidn2-2.3.0.tar.gz" - mirror "https://ftpmirror.gnu.org/libidn/libidn2-2.3.0.tar.gz" - sha256 "e1cb1db3d2e249a6a3eb6f0946777c2e892d5c5dc7bd91c74394fc3a01cab8b5" - - bottle do - sha256 "0908585cca518a83f101b2edc0417a26a4b4fc8b76e393c6f6672de6e595c914" => :catalina - sha256 "d56e7ff347b0a4c2c433cd44564dfef74c9f1b237ef913307e152314677e1360" => :mojave - sha256 "4530dd74cbd31c49b0f499eda0f9ea29ec7ff6ae00f9aff3974247365d1fb21e" => :high_sierra - end - - head do - url "https://gitlab.com/libidn/libidn2.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gengetopt" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "libunistring" - - def install - if build.head? - ENV["GEM_HOME"] = buildpath/"gem_home" - system "gem", "install", "ronn" - ENV.prepend_path "PATH", buildpath/"gem_home/bin" - system "./bootstrap" - end - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-libintl-prefix=#{Formula["gettext"].opt_prefix}", - "--with-packager=Homebrew" - system "make", "install" - end - - test do - ENV.delete("LC_CTYPE") - ENV["CHARSET"] = "UTF-8" - output = shell_output("#{bin}/idn2 räksmörgås.se") - assert_equal "xn--rksmrgs-5wao1o.se", output.chomp - output = shell_output("#{bin}/idn2 blåbærgrød.no") - assert_equal "xn--blbrgrd-fxak7p.no", output.chomp - end -end diff --git a/Formula/libilbc.rb b/Formula/libilbc.rb deleted file mode 100644 index 2c6cdaa2c3949..0000000000000 --- a/Formula/libilbc.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libilbc < Formula - desc "Packaged version of iLBC codec from the WebRTC project" - homepage "https://github.com/TimothyGu/libilbc" - url "https://github.com/TimothyGu/libilbc/releases/download/v2.0.2/libilbc-2.0.2.tar.gz" - sha256 "84d5c99087a35bda3463bcb993245b4f8c28c04fe037215a5ec56570f68ce519" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "3a8caa126466fcf7cde71363a4423e709b249f0a7318a22e5bd545d3d5382ea3" => :catalina - sha256 "cbb71770ab1bc1647e719d9b084d710c8c5c4e37a0b1a70e53650b3fb24cda62" => :mojave - sha256 "63df659558f7961f6e04c347dad5ef6508578e86e0c13b15d39fb267dcc440db" => :high_sierra - sha256 "421757bd970d1ba1d0c1fe2eff208cc0b44f8a75bbf9a09344ba504ad377750f" => :sierra - sha256 "fff34390e949e037bb4b16937b62ab4993f55d2fb805656116ceab6a7c9b6e83" => :el_capitan - sha256 "7f16b3e0f254f35be8b6275339dc813a6443f65d1c27e1748e08835a49733f6f" => :yosemite - sha256 "7aa8495e4050ea38152ec218452d6fac97387ad385a6d63806238e838664471b" => :mavericks - 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() { - char version[255]; - - WebRtcIlbcfix_version(version); - printf("%s", version); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lilbc", "-o", "test" - system "./test" - end -end diff --git a/Formula/libimagequant.rb b/Formula/libimagequant.rb deleted file mode 100644 index 458a0b30fdb08..0000000000000 --- a/Formula/libimagequant.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libimagequant < Formula - desc "Palette quantization library extracted from pnquant2" - homepage "https://pngquant.org/lib/" - url "https://github.com/ImageOptim/libimagequant/archive/2.12.6.tar.gz" - sha256 "b34964512c0dbe550c5f1b394c246c42a988cd73b71a76c5838aa2b4a96e43a0" - - bottle do - cellar :any - sha256 "31bc66699e19c2874ace33dc919782b6effefa53bdcb6bfe804f954e9d4df1bf" => :catalina - sha256 "65b36c32d15e2605ab813007436090f2004c50062dd68a806fe324e832f62e06" => :mojave - sha256 "9f2444bbeed8e96b5a575dd6d9168330f5aa9609aae13919eb50576d2b93e994" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - liq_attr *attr = liq_attr_create(); - if (!attr) { - return 1; - } else { - liq_attr_destroy(attr); - return 0; - } - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-limagequant", "-o", "test" - system "./test" - end -end diff --git a/Formula/libimobiledevice.rb b/Formula/libimobiledevice.rb deleted file mode 100644 index 3784a74de1522..0000000000000 --- a/Formula/libimobiledevice.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libimobiledevice < Formula - desc "Library to communicate with iOS devices natively" - homepage "https://www.libimobiledevice.org/" - url "https://github.com/libimobiledevice/libimobiledevice/releases/download/1.3.0/libimobiledevice-1.3.0.tar.bz2" - sha256 "53f2640c6365cd9f302a6248f531822dc94a6cced3f17128d4479a77bd75b0f6" - - bottle do - cellar :any - sha256 "eb7f28d86797461d5ef859d00629176e1ce3234790ef17b9ee3f9c9990a664e2" => :catalina - sha256 "5143eaf34011a22dd1951f10495a7568e77a2e862fb9f4dbae9bab2f784f926e" => :mojave - sha256 "072d224a0fa2a77bccde27eee39b65300a387613b41f07fc677108a7812ec003" => :high_sierra - end - - head do - url "https://git.libimobiledevice.org/libimobiledevice.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libplist" - depends_on "libtasn1" - depends_on "libusbmuxd" - depends_on "openssl@1.1" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - # As long as libplist builds without Cython - # bindings, libimobiledevice must as well. - "--without-cython", - "--enable-debug-code" - system "make", "install" - end - - test do - system "#{bin}/idevicedate", "--help" - end -end diff --git a/Formula/libinfinity.rb b/Formula/libinfinity.rb deleted file mode 100644 index ed1fba23dd743..0000000000000 --- a/Formula/libinfinity.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Libinfinity < Formula - desc "GObject-based C implementation of the Infinote protocol" - homepage "https://gobby.github.io/" - url "http://releases.0x539.de/libinfinity/libinfinity-0.6.8.tar.gz" - sha256 "0c4e7e0e5cb6ad5df4dbe19568de37b100a13e61475cf9d4e0f2a68fcdd2d45b" - revision 2 - - bottle do - sha256 "4d367978cb9ee0612c37947080939b3006c5bb7972673cc2c6175242c5809c28" => :catalina - sha256 "8c9bdd8c7cfb58b1f8c9ce451881c620d574ac749ff0f40e4efa87c0faebba26" => :mojave - sha256 "ea90d469694a6da2dd087ceb5f77fc9294b0ce7cee678d135ad466c3a1ae636d" => :high_sierra - sha256 "6dd59d33bdc050e1e61d5a7a6efa79a83c0130c237f04c678f7e8fe6a455e4df" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gnutls" - depends_on "gsasl" - depends_on "gtk+3" - - # libinfinity is only used by gobby - # latest 0.7.1 does not work with gobby 0.5.0 due to open issue, https://github.com/gobby/gobby/issues/143 - # gobby is disbled per #57501 - disable! - - # MacPorts patch to fix pam include. This is still applicable to 0.6.4. - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/f8e3d2e4/libinfinity/patch-infinoted-infinoted-pam.c.diff" - sha256 "d5924d6ee90c3aa756e52b97e32345dc1d77afdb5e4e0de8eac2a343d95ade00" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-gtk3", "--with-inftextgtk", "--with-infgtk" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - GError *error = NULL; - gboolean status = inf_init(&error); - return 0; - } - EOS - ENV.libxml2 - gettext = Formula["gettext"] - glib = Formula["glib"] - gnutls = Formula["gnutls"] - gsasl = Formula["gsasl"] - libtasn1 = Formula["libtasn1"] - nettle = Formula["nettle"] - flags = %W[ - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{gnutls.opt_include} - -I#{gsasl.opt_include} - -I#{include}/libinfinity-0.6 - -I#{libtasn1.opt_include} - -I#{nettle.opt_include} - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{gnutls.opt_lib} - -L#{gsasl.opt_lib} - -L#{lib} - -lglib-2.0 - -lgnutls - -lgobject-2.0 - -lgsasl - -lgthread-2.0 - -linfinity-0.6 - -lintl - -lxml2 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libiodbc.rb b/Formula/libiodbc.rb deleted file mode 100644 index 78744cc3ab587..0000000000000 --- a/Formula/libiodbc.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Libiodbc < Formula - desc "Database connectivity layer based on ODBC. (alternative to unixodbc)" - homepage "http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/" - url "https://github.com/openlink/iODBC/archive/v3.52.13.tar.gz" - sha256 "4bf67fc6d4d237a4db19b292b5dd255ee09a0b2daa4e4058cf3a918bc5102135" - - bottle do - cellar :any - sha256 "b9b78f823c2af7962bfc97cb34fd528c8f6eab85823045168ac8ac84eaac3d12" => :catalina - sha256 "1472bb0987705537158b7c3196d27d01ba02d6c0fdcca733f3cf8d53eca29c5d" => :mojave - sha256 "77a4fb5fa3036a831e05e2a83585ac2fcdcdf4cf83baa72f28cfb2f8a659ba13" => :high_sierra - sha256 "abc07f2fe98ed04c4dc5bd5cada2ea68fb9be56337ed442393609f0a22ec21e8" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - conflicts_with "unixodbc", :because => "both install `odbcinst.h`" - - def install - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"iodbc-config", "--version" - end -end diff --git a/Formula/libiptcdata.rb b/Formula/libiptcdata.rb deleted file mode 100644 index 56adf1eed362b..0000000000000 --- a/Formula/libiptcdata.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Libiptcdata < Formula - desc "Virtual package provided by libiptcdata0" - homepage "https://libiptcdata.sourceforge.io/" - url "https://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz" - sha256 "79f63b8ce71ee45cefd34efbb66e39a22101443f4060809b8fc29c5eebdcee0e" - revision 1 - - bottle do - sha256 "1dbcf1dd89b05f7f1fdc1a15d9c56b7e726f7296d8096ccae22fed9adf36790a" => :catalina - sha256 "78dc7bb6b1e5bcccc1c0c9ef158b8d423f782aa455b1b10c3eebb29de6e7fa58" => :mojave - sha256 "62f4a032075fbf0b9a43ef474b784bae7c47d503483bdc2e09e851c5568345e3" => :high_sierra - sha256 "0a9cd6e750e496cd4eb9797ac34d3659c8dc2bb6977020def1edb2ee60711a39" => :sierra - end - - depends_on "gettext" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libiscsi.rb b/Formula/libiscsi.rb deleted file mode 100644 index 2b117f3494c93..0000000000000 --- a/Formula/libiscsi.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Libiscsi < Formula - desc "Client library and utilities for iscsi" - homepage "https://github.com/sahlberg/libiscsi" - url "https://github.com/sahlberg/libiscsi/archive/1.19.0.tar.gz" - sha256 "c7848ac722c8361d5064654bc6e926c2be61ef11dd3875020a63931836d806df" - head "https://github.com/sahlberg/libiscsi.git" - - bottle do - cellar :any - sha256 "e33ab94bb94c63eab8836acfe89a677120293eeaf745c29648a03844779a6b4c" => :catalina - sha256 "473988c2ba81d9d9cf6eb21f2f3d41ade13e76131a2c2aabdade9983c79f99ed" => :mojave - sha256 "c05b614ecbacf4f957777c33144924322147b40b898fbb1acf91b72663e35203" => :high_sierra - sha256 "832760665cad678de3079365edc72bc21d946dd03ecff9304220b9972a29dd8c" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "cunit" - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system bin/"iscsi-ls", "--help" - system bin/"iscsi-test-cu", "--list" - end -end diff --git a/Formula/libjson-rpc-cpp.rb b/Formula/libjson-rpc-cpp.rb deleted file mode 100644 index cd3145f0498de..0000000000000 --- a/Formula/libjson-rpc-cpp.rb +++ /dev/null @@ -1,34 +0,0 @@ -class LibjsonRpcCpp < Formula - desc "C++ framework for json-rpc" - homepage "https://github.com/cinemast/libjson-rpc-cpp" - url "https://github.com/cinemast/libjson-rpc-cpp/archive/v1.3.0.tar.gz" - sha256 "cf132ad9697b034f22ff37d12a1f1c6f2647ec2236701de5e76f6036ab664156" - license "MIT" - revision 1 - head "https://github.com/cinemast/libjson-rpc-cpp.git" - - bottle do - cellar :any - sha256 "b8a99a97b7ebbcb40cc19ad3f4805a93270e376fe7ef4ccbc02235c0f94f4c74" => :catalina - sha256 "15fbc327291d065a0a691f14ea90367923296da22a4012247a2083ebec8eca3b" => :mojave - sha256 "d3e24865583d50b44a833b08fb90093a2db62bda4615e3c734ffe5cd2bda23ff" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "argtable" - depends_on "hiredis" - depends_on "jsoncpp" - depends_on "libmicrohttpd" - - uses_from_macos "curl" - - def install - system "cmake", ".", *std_cmake_args, "-DCOMPILE_EXAMPLES=OFF", "-DCOMPILE_TESTS=OFF" - system "make" - system "make", "install" - end - - test do - system "#{bin}/jsonrpcstub", "-h" - end -end diff --git a/Formula/libjwt.rb b/Formula/libjwt.rb deleted file mode 100644 index 517f8c437df3e..0000000000000 --- a/Formula/libjwt.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Libjwt < Formula - desc "JSON Web Token C library" - homepage "https://github.com/benmcollins/libjwt" - url "https://github.com/benmcollins/libjwt/archive/v1.12.0.tar.gz" - sha256 "eaf5d8b31d867c02dde767efa2cf494840885a415a3c9a62680bf870a4511bee" - license "LGPL-3.0" - - bottle do - cellar :any - sha256 "247bde97c3bc0b297d83a4f3234ed44c6e5c84f94bbbbb794654b7d9ec4a176a" => :catalina - sha256 "b89dfc9c94b697150d3ec8d9b18208755c8253f4e2657f87111db10c288851d6" => :mojave - sha256 "27966254d5e40f91dd93b012ce65677829727498d5aef1321cf26e884944c545" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "jansson" - depends_on "openssl@1.1" - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "all" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() { - jwt_t *jwt = NULL; - if (jwt_new(&jwt) != 0) return 1; - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-ljwt", "-o", "test" - system "./test" - end -end diff --git a/Formula/libkate.rb b/Formula/libkate.rb deleted file mode 100644 index 61dfab989be08..0000000000000 --- a/Formula/libkate.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libkate < Formula - desc "Overlay codec for multiplexed audio/video in Ogg" - homepage "https://code.google.com/archive/p/libkate/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libkate/libkate-0.4.1.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/libk/libkate/libkate_0.4.1.orig.tar.gz" - sha256 "c40e81d5866c3d4bf744e76ce0068d8f388f0e25f7e258ce0c8e76d7adc87b68" - revision 1 - - bottle do - cellar :any - rebuild 3 - sha256 "2b144fcc2436f43c099a3e5ce8b8a0b387db8fda62b5e0aaaf7dd5d6d92054dd" => :catalina - sha256 "8f075fa46eccd65fe664e8caf42754b6d03ff1fa7f305566287af0cd6e72b396" => :mojave - sha256 "65f687ae05918aa2f2fb4e27f384d6645a0f64231e8dc9343c8435347895d792" => :high_sierra - sha256 "e7b6c1288455b12044889d768b4593a7a08beac5c4c2534f24565adb58f4a9b5" => :sierra - sha256 "244a27eb03227b1455bea4ffd9f8a73ccd660389c44e9719d62bba1a4247bdf6" => :el_capitan - sha256 "473e0de088ba513006bb5212fd9ca21390d848c9cd5e33a7951ee3cba24220ac" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "libogg" - depends_on "libpng" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--enable-shared", - "--enable-static", - "--prefix=#{prefix}" - system "make", "check" - system "make", "install" - end - - test do - system bin/"katedec", "-V" - end -end diff --git a/Formula/libkeccak.rb b/Formula/libkeccak.rb deleted file mode 100644 index 9dd05d413b85f..0000000000000 --- a/Formula/libkeccak.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Libkeccak < Formula - desc "Keccak-family hashing library" - homepage "https://github.com/maandree/libkeccak" - url "https://github.com/maandree/libkeccak/archive/1.2.tar.gz" - sha256 "a9fa976a601b749499f24975756f98c28edddfb5e6828c681ccde7cfcb95d5f8" - license "ISC" - - bottle do - cellar :any - sha256 "a6c562298b9f840a535e67c4a1af2cd2cee7a64b148867dffbd5c43abe449fac" => :catalina - sha256 "62bef7ab66b3080369802009fce876879f6a756fc6f2734de0e33a514fa8bf93" => :mojave - sha256 "802c42ae842ebed113639b7e647da9eb09d8fddde91b9d2938652849f2543a06" => :high_sierra - sha256 "0c505d90e236906a294afbd5989a79e503c4ae2afbfa3a8727ffb96969b4a6c9" => :sierra - end - - def install - system "make", "install", "OSCONFIGFILE=macos.mk", "PREFIX=#{prefix}" - pkgshare.install %w[.testfile test.c] - end - - test do - cp_r pkgshare/".testfile", testpath - system ENV.cc, "-std=c99", "-O3", "-o", "test", pkgshare/"test.c", "-L#{lib}", "-lkeccak", "-s" - system "./test" - end -end diff --git a/Formula/libkml.rb b/Formula/libkml.rb deleted file mode 100644 index d0a8542c01527..0000000000000 --- a/Formula/libkml.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Libkml < Formula - desc "Library to parse, generate and operate on KML" - homepage "https://code.google.com/archive/p/libkml/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libkml/libkml-1.2.0.tar.gz" - sha256 "fae9085e4cd9f0d4ae0d0626be7acf4ad5cbb37991b9d886df29daf72df37cbc" - - bottle do - cellar :any - rebuild 2 - sha256 "2b73d6ea2eacd6e11229a0a9747444c28a455bb24943108b0351f689d17eb3d9" => :catalina - sha256 "c79c73e048728d0497b7f91c0e174bd97e27f65ff471e00324483a3557b6a13f" => :mojave - sha256 "31d567e2e0d87794adea3507cb34ace0483309de7ba5b32fc98bc1ca59a461c5" => :high_sierra - sha256 "860294d677de2f8a4c18e4d750d59aeafa2b38801b12eb76b5e951a23a8ec108" => :sierra - sha256 "57b9693cdf9a6abaeeea9648cd84a81d17ba0f056bd8d8e8442e68d97dbc7828" => :el_capitan - sha256 "a3cdfca3ed0acbc93949683a8bb2862c36ec8bf06f20b9fe3752ac624667f455" => :yosemite - sha256 "22c4df9a8f64f8c6ec300cfb268994d739ff41e80db44ca3a72358fc4b70bc05" => :mavericks - end - - # Fix compilation with clang and gcc 4.7+ - # https://code.google.com/p/libkml/issues/detail?id=179 - patch :DATA - - # Correct an issue where internal third-party libs (libminizip and liburiparser) - # are installed as dylibs. liburiparser conflicts with uriparser formula. - # libminizip conflicts with new formula, and some of its symbols have been - # renamed with prefixes of "libkml_", i.e, can't be linked against for other builds - # Fix just forces internal libs to be linked statically until the following - # is addressed upstream: https://code.google.com/p/libkml/issues/detail?id=50 - patch do - url "https://gist.githubusercontent.com/dakcarto/7419882/raw/10ae08af224b3fee0617fa6288d806d3ccf37c0f/libkml-1.2-static-deps" - sha256 "c39995a1c1ebabc1692dc6be698d68e18170230d71d5a0ce426d8f41bdf0dc72" - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end - -__END__ -diff --git a/src/kml/base/file_posix.cc b/src/kml/base/file_posix.cc -index 764ae55..8ee9892 100644 ---- a/src/kml/base/file_posix.cc -+++ b/src/kml/base/file_posix.cc -@@ -29,6 +29,7 @@ - #include "kml/base/file.h" - #include - #include -+#include - #include - #include - diff --git a/Formula/libksba.rb b/Formula/libksba.rb deleted file mode 100644 index 1f6d6bec7b712..0000000000000 --- a/Formula/libksba.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Libksba < Formula - desc "X.509 and CMS library" - homepage "https://www.gnupg.org/related_software/libksba/" - url "https://gnupg.org/ftp/gcrypt/libksba/libksba-1.4.0.tar.bz2" - sha256 "bfe6a8e91ff0f54d8a329514db406667000cb207238eded49b599761bfca41b6" - - bottle do - cellar :any - sha256 "14b9bc72288c2fc4061ea49261427aa9e00738a383433302ff86ae18095b2f4a" => :catalina - sha256 "153e805e508005ebd9c8eca39b4027f35cddcc123583a421664746dda51ddbc9" => :mojave - sha256 "ed07783410f48fe767e96ad596b570ccd0d849715af99b84f99918428953a9a5" => :high_sierra - end - - depends_on "libgpg-error" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - - # avoid triggering mandatory rebuilds of software that hard-codes this path - inreplace bin/"ksba-config", prefix, opt_prefix - end - - test do - system "#{bin}/ksba-config", "--libs" - end -end diff --git a/Formula/liblas.rb b/Formula/liblas.rb deleted file mode 100644 index 76ff82756c71c..0000000000000 --- a/Formula/liblas.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Liblas < Formula - desc "C/C++ library for reading and writing the LAS LiDAR format" - homepage "https://liblas.org/" - url "https://download.osgeo.org/liblas/libLAS-1.8.1.tar.bz2" - sha256 "9adb4a98c63b461ed2bc82e214ae522cbd809cff578f28511122efe6c7ea4e76" - revision 3 - head "https://github.com/libLAS/libLAS.git" - - deprecate! :date => "2018-01-01" - - bottle do - sha256 "c63d0d75db5b8e129c13add1de8fe94b2a38d5c15d101b62d6a7f59b796f53a3" => :catalina - sha256 "3224d154574e4cd07837dd1d1bd3e336964e8bede4cf4bb34dbaf4a63c75ed11" => :mojave - sha256 "b47d0b9c82040703d212e22a436b7e11aff24632f0649db959e2073e0ae48548" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "libgeotiff" - - # Fix build for Xcode 9 with upstream commit - # Remove in next version - patch do - url "https://github.com/libLAS/libLAS/commit/49606470.patch?full_index=1" - sha256 "5590aef61a58768160051997ae9753c2ae6fc5b7da8549707dfd9a682ce439c8" - end - - # Fix compilation against GDAL 2.3 - # Remove in next version - patch do - url "https://github.com/libLAS/libLAS/commit/ec10e274.diff?full_index=1" - sha256 "3f5cc283d3e908d991b05b4dcf5cc0440824441ec270396e11738f96a0a23a9f" - end - - def install - ENV.cxx11 - - mkdir "macbuild" do - # CMake finds boost, but variables like this were set in the last - # version of this formula. Now using the variables listed here: - # https://liblas.org/compilation.html - ENV["Boost_INCLUDE_DIR"] = "#{HOMEBREW_PREFIX}/include" - ENV["Boost_LIBRARY_DIRS"] = "#{HOMEBREW_PREFIX}/lib" - - system "cmake", "..", *std_cmake_args, - "-DWITH_GDAL=OFF", - "-DWITH_GEOTIFF=ON" - system "make" - system "make", "install" - end - end - - test do - system bin/"liblas-config", "--version" - end -end diff --git a/Formula/liblcf.rb b/Formula/liblcf.rb deleted file mode 100644 index b6b7bde0a1fa0..0000000000000 --- a/Formula/liblcf.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Liblcf < Formula - desc "Library for RPG Maker 2000/2003 games data" - homepage "https://easyrpg.org/" - url "https://easyrpg.org/downloads/player/0.6.2/liblcf-0.6.2.tar.xz" - sha256 "c48b4f29ee0c115339a6886fc435b54f17799c97ae134432201e994b1d3e0d34" - license "MIT" - revision 1 - head "https://github.com/EasyRPG/liblcf.git" - - bottle do - cellar :any - sha256 "1765ea5fd438e35c255104fcf3670f4fb20b44b0d88dfc5579deeb95fd0567a1" => :catalina - sha256 "626aeacfaba89b8d5bb57945c4f82c33758e7a78de2b2d87261e6e83e874a7bc" => :mojave - sha256 "b508d5fd894f0962328296f0d292eb3cd88e48d42d20e75934b7b9abad62c53a" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "icu4c" - - if MacOS.version < :el_capitan - depends_on "expat" - else - uses_from_macos "expat" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "lsd_reader.h" - #include - - int main() { - std::time_t const current = std::time(NULL); - assert(current == LSD_Reader::ToUnixTimestamp(LSD_Reader::ToTDateTime(current))); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-I#{include}/liblcf", "-L#{lib}", "-llcf", "-std=c++11", \ - "-o", "test" - system "./test" - end -end diff --git a/Formula/liblinear.rb b/Formula/liblinear.rb deleted file mode 100644 index 61a597bf56be7..0000000000000 --- a/Formula/liblinear.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Liblinear < Formula - desc "Library for large linear classification" - homepage "https://www.csie.ntu.edu.tw/~cjlin/liblinear/" - url "https://www.csie.ntu.edu.tw/~cjlin/liblinear/oldfiles/liblinear-2.30.tar.gz" - sha256 "881c7039c6cf93119c781fb56263de91617b3eca8c3951f2c19a3797de95c6ac" - license "BSD-3-Clause" - head "https://github.com/cjlin1/liblinear.git" - - bottle do - cellar :any - sha256 "e232d6644b55148f5fef3e478006dbd85b9b834299f7c97bee6313806204685a" => :catalina - sha256 "1ab5662ee30a21a4c83b180d62553e886043b56fc094b66501588b965ecac3ce" => :mojave - sha256 "bb1f3367533f79366c2e40b31f5e14fc0831537789e28da3aec5e7210b898c10" => :high_sierra - sha256 "8ea77b137e26d69cddd966a8d95da70ae4366b8bf0c673307e1579bc4f9b791a" => :sierra - end - - # Fix sonames - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/941ec0ad/liblinear/patch-Makefile.diff" - sha256 "ffb5206f0a6c15832574ec77863cda12eb2012e0f052bacebfe1ad722d31ea22" - end - - def install - system "make", "all" - bin.install "predict", "train" - lib.install "liblinear.dylib" - lib.install_symlink "liblinear.dylib" => "liblinear.1.dylib" - include.install "linear.h" - end - - test do - (testpath/"train_classification.txt").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 - - system "#{bin}/train", "train_classification.txt" - end -end diff --git a/Formula/liblo.rb b/Formula/liblo.rb deleted file mode 100644 index 051bc3217bf71..0000000000000 --- a/Formula/liblo.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Liblo < Formula - desc "Lightweight Open Sound Control implementation" - homepage "https://liblo.sourceforge.io/" - url "https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz" - sha256 "2b4f446e1220dcd624ecd8405248b08b7601e9a0d87a0b94730c2907dbccc750" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "aac4280d5e147a6baab53c252bbf7cda296fe5bdeceb26d7aa60acb10ecc5444" => :catalina - sha256 "3310110ec91fb412b8d5c727bda03454aebec087d78ebada20bb53ad9582088e" => :mojave - sha256 "034eaec236ee4df490d16db9998ec7a4d88223d929b333c8b08ade641bc74bcb" => :high_sierra - end - - head do - url "https://git.code.sf.net/p/liblo/git.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - 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 - (testpath/"lo_version.c").write <<~EOS - #include - #include "lo/lo.h" - int main() { - char version[6]; - lo_version(version, 6, 0, 0, 0, 0, 0, 0, 0); - printf("%s", version); - return 0; - } - EOS - system ENV.cc, "lo_version.c", "-I#{include}", "-L#{lib}", "-llo", "-o", "lo_version" - lo_version = `./lo_version` - assert_equal version.to_str, lo_version - end -end diff --git a/Formula/liblockfile.rb b/Formula/liblockfile.rb deleted file mode 100644 index a182c920f6cb3..0000000000000 --- a/Formula/liblockfile.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Liblockfile < Formula - desc "Library providing functions to lock standard mailboxes" - homepage "https://tracker.debian.org/pkg/liblockfile" - url "https://deb.debian.org/debian/pool/main/libl/liblockfile/liblockfile_1.16.orig.tar.gz" - sha256 "cf6e3828ced3fcc7e5ed36b7dabdf9e0e3ba55a973dab8ed212fb86afc901c69" - - bottle do - sha256 "e5991a3eac0b5cd41f2850d73643607c33bb41b7014105f0ed80b75c5e7ef866" => :catalina - sha256 "18663ff713cb46c514546f5a73026deb4e3df5b701b082b5cd68275581b05ba8" => :mojave - sha256 "bc532693f97e4d14ac59974b80f5a31b121b5cc404efb2aacda1c1607f4bcf5b" => :high_sierra - end - - def install - # brew runs without root privileges (and the group is named "wheel" anyway) - inreplace "Makefile.in", " -g root ", " " - - system "./configure", "--disable-dependency-tracking", - "--disable-debug", - "--with-mailgroup=staff", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--mandir=#{man}" - bin.mkpath - lib.mkpath - include.mkpath - man1.mkpath - man3.mkpath - system "make" - system "make", "install" - end - - test do - system bin/"dotlockfile", "-l", "locked" - assert_predicate testpath/"locked", :exist? - system bin/"dotlockfile", "-u", "locked" - refute_predicate testpath/"locked", :exist? - end -end diff --git a/Formula/liblouis.rb b/Formula/liblouis.rb deleted file mode 100644 index a6971cbda8bae..0000000000000 --- a/Formula/liblouis.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Liblouis < Formula - desc "Open-source braille translator and back-translator" - homepage "http://liblouis.org/" - - stable do - url "https://github.com/liblouis/liblouis/releases/download/v3.14.0/liblouis-3.14.0.tar.gz" - sha256 "f5b25f8059dd76595aeb419b1522dda78f281a75a7c56dceaaa443f8c437306a" - depends_on "help2man" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" - end - bottle do - sha256 "d90fc8996fd09ba5154fb9cc597a8a588834b95511b50c589020a875ed0f4feb" => :catalina - sha256 "ce4feb9450cb8cbbaf70f885c04ca84d4136eed237bfaa7876ef5ae22491a272" => :mojave - sha256 "d3527a68640b4bf5f2c174299e472709e8b6c149b37882854e4aaa7efd0fc2b2" => :high_sierra - end - - head do - url "https://github.com/liblouis/liblouis.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "help2man" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" - end - - 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" - system "make", "install" - cd "python" do - system "python3", *Language::Python.setup_install_args(prefix) - end - mkdir "#{prefix}/tools" - mv "#{bin}/lou_maketable", "#{prefix}/tools/", :force => true - mv "#{bin}/lou_maketable.d", "#{prefix}/tools/", :force => true - end - - test do - o, = Open3.capture2(bin/"lou_translate", "unicode.dis,en-us-g2.ctb", :stdin_data=>"42") - assert_equal o, "⠼⠙⠃" - end -end diff --git a/Formula/liblqr.rb b/Formula/liblqr.rb deleted file mode 100644 index 3b26edc439e62..0000000000000 --- a/Formula/liblqr.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Liblqr < Formula - desc "C/C++ seam carving library" - homepage "http://liblqr.wikidot.com/" - url "https://github.com/carlobaldassi/liblqr/archive/v0.4.2.tar.gz" - sha256 "1019a2d91f3935f1f817eb204a51ec977a060d39704c6dafa183b110fd6280b0" - license "LGPL-3.0" - revision 1 - head "https://github.com/carlobaldassi/liblqr.git" - - bottle do - cellar :any - rebuild 1 - sha256 "18803ed552ae07c1998c87ba6c4ebaee1ec5eaab843c2cfa2cc3775f0b55da23" => :catalina - sha256 "83054ddb4fffb94ea12f609a90082220a451bfdc793284d104f1fdeaf4aa8fd6" => :mojave - sha256 "43e9b4f518364d436b53c89b1ac42e2cfdcafc47fad1ba711bd6456122e47d62" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libltc.rb b/Formula/libltc.rb deleted file mode 100644 index a9ca58ab0ee2e..0000000000000 --- a/Formula/libltc.rb +++ /dev/null @@ -1,94 +0,0 @@ -class Libltc < Formula - desc "POSIX-C Library for handling Linear/Logitudinal Time Code (LTC)" - homepage "https://x42.github.io/libltc/" - url "https://github.com/x42/libltc/releases/download/v1.3.1/libltc-1.3.1.tar.gz" - sha256 "50e63eb3b767151bc0159a3cc5d426d03a42fd69029bc9b3b7c346555f4b709c" - license "LGPL-3.0" - - bottle do - cellar :any - sha256 "c73e9da760961fc899dcd41c52f4e74cf2e29fb8ea619920c06c9ace25f717ab" => :catalina - sha256 "aecfd413335e0981c5ac452bc0b81bee57d3a4e5974237f5b6a64aae734369cf" => :mojave - sha256 "30f7ddada1d191c63214d44d9acec4862e71bca2ee67368c8546ec7240f65a9a" => :high_sierra - sha256 "1c51db3447916e208601775d43fb248bdc76f3b29b6f309ccc74eddc0a11c9c6" => :sierra - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - // stripped-down copy of: - // https://raw.githubusercontent.com/x42/libltc/87d45b3/tests/example_encode.c - #include - #include - #include - #include - - int main(int argc, char **argv) { - FILE* file; - double length = 2; - double fps = 25; - double sample_rate = 48000; - char *filename = "#{testpath}/foobar"; - int vframe_cnt; - int vframe_last; - int total = 0; - ltcsnd_sample_t *buf; - LTCEncoder *encoder; - SMPTETimecode st; - - const char timezone[6] = "+0100"; - strcpy(st.timezone, timezone); - st.years = 8; - st.months = 12; - st.days = 31; - st.hours = 23; - st.mins = 59; - st.secs = 59; - st.frame = 0; - - file = fopen(filename, "wb"); - if (!file) { - fprintf(stderr, "Error: can not open file '%s' for writing.\\n", filename); - return 1; - } - - encoder = ltc_encoder_create(sample_rate, fps, - fps==25?LTC_TV_625_50:LTC_TV_525_60, LTC_USE_DATE); - ltc_encoder_set_timecode(encoder, &st); - - vframe_cnt = 0; - vframe_last = length * fps; - - while (vframe_cnt++ < vframe_last) { - int byte_cnt; - for (byte_cnt = 0 ; byte_cnt < 10 ; byte_cnt++) { - ltc_encoder_encode_byte(encoder, byte_cnt, 1.0); - - int len; - buf = ltc_encoder_get_bufptr(encoder, &len, 1); - - if (len > 0) { - fwrite(buf, sizeof(ltcsnd_sample_t), len, file); - total+=len; - } - } - - ltc_encoder_inc_timecode(encoder); - } - fclose(file); - ltc_encoder_free(encoder); - - printf("Done: wrote %d samples to '%s'\\n", total, filename); - - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lltc", "-lm", "-o", "test" - system "./test" - assert (testpath/"foobar").file? - end -end diff --git a/Formula/liblunar.rb b/Formula/liblunar.rb deleted file mode 100644 index 541d40b377c30..0000000000000 --- a/Formula/liblunar.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Liblunar < Formula - desc "Lunar date calendar" - homepage "https://code.google.com/archive/p/liblunar/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/liblunar/liblunar-2.2.5.tar.gz" - sha256 "c24a7cd3ccbf7ab739d752a437f1879f62b975b95abcf9eb9e1dd623982bc167" - revision 1 - - bottle do - sha256 "916da6f9232b56ff4ba94c1e3aa5457ca6a3a36ad19f91f63cf69fe6503ea7ea" => :catalina - sha256 "b19be815304a6afc676a11269ca2c520a03e4aed778c4dee20aea063bca69ca8" => :mojave - sha256 "ce86d50db89030c02c88df1b639fabc9e3c4657e2d954c07b56d4b1cf2bafdf3" => :high_sierra - sha256 "29252d2fbfdfb582d46a728bd8272767dfa532eb90fedbb67a4b2116749dc657" => :sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/liblwgeom.rb b/Formula/liblwgeom.rb deleted file mode 100644 index ae0b8f2ec938d..0000000000000 --- a/Formula/liblwgeom.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Liblwgeom < Formula - desc "Allows SpatiaLite to support ST_MakeValid() like PostGIS" - homepage "https://postgis.net/" - url "https://download.osgeo.org/postgis/source/postgis-2.5.4.tar.gz" - sha256 "146d59351cf830e2a2a72fa14e700cd5eab6c18ad3e7c644f57c4cee7ed98bbe" - revision 1 - head "https://git.osgeo.org/gitea/postgis/postgis" - - bottle do - cellar :any - sha256 "3b3992a15950249f302da1a43243e68c1a67d7e6e2c0643bb32b5a0c6bcff62d" => :catalina - sha256 "56ff43b6ab2f188069d3c4bf17a38e976dbbbeb9f041275adc2389516c33ca33" => :mojave - sha256 "daa95483a59170f27fc06112f72e5abdf3a3bd09526896703061dd7e7bae99e6" => :high_sierra - end - - keg_only "conflicts with PostGIS, which also installs liblwgeom.dylib" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gpp" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - depends_on "geos" - depends_on "json-c" - depends_on "proj" - - uses_from_macos "libxml2" - - def install - # See postgis.rb for comments about these settings - ENV.deparallelize - - args = [ - "--disable-dependency-tracking", - "--disable-nls", - - "--with-projdir=#{Formula["proj"].opt_prefix}", - "--with-jsondir=#{Formula["json-c"].opt_prefix}", - - # Disable extraneous support - "--without-pgconfig", - "--without-libiconv-prefix", - "--without-libintl-prefix", - "--without-raster", # this ensures gdal is not required - "--without-topology", - ] - - system "./autogen.sh" - system "./configure", *args - - mkdir "stage" - cd "liblwgeom" do - system "make", "install", "DESTDIR=#{buildpath}/stage" - end - - lib.install Dir["stage/**/lib/*"] - include.install Dir["stage/**/include/*"] - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char* argv[]) - { - printf("%s\\n", lwgeom_version()); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-I#{Formula["proj"].opt_include}", - "-L#{lib}", "-llwgeom", "-o", "test" - system "./test" - end -end diff --git a/Formula/liblzf.rb b/Formula/liblzf.rb deleted file mode 100644 index 29c12cd2c33b6..0000000000000 --- a/Formula/liblzf.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Liblzf < Formula - desc "Very small, very fast data compression library" - homepage "http://oldhome.schmorp.de/marc/liblzf.html" - url "http://dist.schmorp.de/liblzf/liblzf-3.6.tar.gz" - mirror "http://deb.debian.org/debian/pool/main/libl/liblzf/liblzf_3.6.orig.tar.gz" - sha256 "9c5de01f7b9ccae40c3f619d26a7abec9986c06c36d260c179cedd04b89fb46a" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "9aa8a1495947fe1fd6249abe33de7245f9ae4a58dcf900276253b013f7f148e8" => :catalina - sha256 "62c558b1b9562038c49c1e83b73dfb08d8fca8b924eb36428a5c0bb566408f9d" => :mojave - sha256 "66c9ec26bce56b59ffb317d5a415e6358e8246588a3f247c33b8a8d24e714570" => :high_sierra - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # Adapted from bench.c in the liblzf source - (testpath/"test.c").write <<~EOS - #include - #include - #include - #include "lzf.h" - #define DSIZE 32768 - unsigned char data[DSIZE], data2[DSIZE*2], data3[DSIZE*2]; - int main() - { - unsigned int i, l, j; - for (i = 0; i < DSIZE; ++i) - data[i] = i + (rand() & 1); - l = lzf_compress (data, DSIZE, data2, DSIZE*2); - assert(l); - j = lzf_decompress (data2, l, data3, DSIZE*2); - assert (j == DSIZE); - assert (!memcmp (data, data3, DSIZE)); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-llzf", "-o", "test" - system "./test" - end -end diff --git a/Formula/libmaa.rb b/Formula/libmaa.rb deleted file mode 100644 index 50d056a75641f..0000000000000 --- a/Formula/libmaa.rb +++ /dev/null @@ -1,107 +0,0 @@ -class Libmaa < Formula - desc "Low-level data structures including hash tables, sets, lists" - homepage "http://www.dict.org/" - url "https://downloads.sourceforge.net/project/dict/libmaa/libmaa-1.4.7/libmaa-1.4.7.tar.gz" - sha256 "4e01a9ebc5d96bc9284b6706aa82bddc2a11047fa9bd02e94cf8753ec7dcb98e" - - bottle do - cellar :any - sha256 "d9ad37a60f4f1f2eac61cf6a5b85ea1948eda86c65adb26a82c11f8abf70bb0c" => :catalina - sha256 "5f06991bd6aa87dbd9c82db5d7cf701cb6431dcf8debd7404dfb611fa07a5e69" => :mojave - sha256 "5741f3bb649eeb3b6371eaa13dcda342227d8b2f86bc547d1a0abe97561f8521" => :high_sierra - end - - depends_on "bmake" => :build - depends_on "mk-configure" => :build - - def install - system "mkcmake", "install", "CC=#{ENV.cc}", "PREFIX=#{prefix}" - end - - test do - (testpath/"test.c").write <<~EOS - /* basetest.c -- Test base64 and base26 numbers - * Created: Sun Nov 10 11:51:11 1996 by faith@dict.org - * Copyright 1996, 2002 Rickard E. Faith (faith@dict.org) - * Copyright 2002-2008 Aleksey Cheusov (vle@gmx.net) - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - - #include - - int main( int argc, char **argv ) - { - long int i; - const char *result; - long int limit = 0xffff; - - if (argc == 2) limit = strtol( argv[1], NULL, 0 ); - - for (i = 0; i < limit; i++) { - result = b26_encode( i ); - if (i != b26_decode( result )) { - printf( "%s => %ld != %ld\\n", result, b26_decode( result ), i ); - } - if (i < 100) { - result = b26_encode( 0 ); - if (0 != b26_decode( result )) { - printf( "%s => %ld != %ld (cache problem)\\n", - result, b26_decode( result ), 0L ); - } - result = b26_encode( i ); - if (i != b26_decode( result )) { - printf( "%s => %ld != %ld (cache problem)\\n", - result, b64_decode( result ), i ); - } - } - if (i < 10 || !(i % (limit/10))) - printf( "%ld = %s (base26)\\n", i, result ); - } - - for (i = 0; i < limit; i++) { - result = b64_encode( i ); - if (i != b64_decode( result )) { - printf( "%s => %ld != %ld\\n", result, b64_decode( result ), i ); - } - if (i < 100) { - result = b64_encode( 0 ); - if (0 != b64_decode( result )) { - printf( "%s => %ld != %ld (cache problem)\\n", - result, b64_decode( result ), 0L ); - } - result = b64_encode( i ); - if (i != b64_decode( result )) { - printf( "%s => %ld != %ld (cache problem)\\n", - result, b64_decode( result ), i ); - } - } - if (i < 10 || !(i % (limit/10))) - printf( "%ld = %s (base64)\\n", i, result ); - } - - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lmaa", "-o", "test" - system "./test" - end -end diff --git a/Formula/libmagic.rb b/Formula/libmagic.rb deleted file mode 100644 index 69cf8b682e1b7..0000000000000 --- a/Formula/libmagic.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Libmagic < Formula - desc "Implementation of the file(1) command" - homepage "https://www.darwinsys.com/file/" - url "https://astron.com/pub/file/file-5.39.tar.gz" - sha256 "f05d286a76d9556243d0cb05814929c2ecf3a5ba07963f8f70bfaaa70517fad1" - - bottle do - sha256 "90b17cb74e853804227abdd32c6810ff535fb98e8862f946c49860b697faece0" => :catalina - sha256 "f32eb14fbef470d28a041ddefec932e8d96870b4a13dbac3f61d8c6de6e50f29" => :mojave - sha256 "110d2db0b588dc5a379124d024b228e8ee8aae58c95a6a0510e68dc36426a86a" => :high_sierra - end - - uses_from_macos "zlib" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-fsect-man5", - "--enable-static" - system "make", "install" - (share/"misc/magic").install Dir["magic/Magdir/*"] - - # Don't dupe this system utility - rm bin/"file" - rm man1/"file.1" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - #include - - int main(int argc, char **argv) { - magic_t cookie = magic_open(MAGIC_MIME_TYPE); - assert(cookie != NULL); - assert(magic_load(cookie, NULL) == 0); - // Prints the MIME type of the file referenced by the first argument. - puts(magic_file(cookie, argv[1])); - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-lmagic", "test.c", "-o", "test" - cp test_fixtures("test.png"), "test.png" - assert_equal "image/png", shell_output("./test test.png").chomp - end -end diff --git a/Formula/libmatio.rb b/Formula/libmatio.rb deleted file mode 100644 index 0ab28ec070103..0000000000000 --- a/Formula/libmatio.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Libmatio < Formula - desc "C library for reading and writing MATLAB MAT files" - homepage "https://matio.sourceforge.io/" - url "https://downloads.sourceforge.net/project/matio/matio/1.5.17/matio-1.5.17.tar.gz" - sha256 "5e455527d370ab297c4abe5a2ab4d599c93ac7c1a0c85d841cc5c22f8221c400" - revision 2 - - bottle do - cellar :any - sha256 "5b8bf79fa47dddfa85405fc2e0ea4e0ca44d9154ff690144568b1b8d334edd03" => :catalina - sha256 "fb0f8804978485fedcdd4cd8b6800840aa0b25778be9bbfab29b4dcabb76f5d8" => :mojave - sha256 "961900fbb90c3c37a0e1607bead7c92baa23f289afaee607775731303e335b4b" => :high_sierra - end - - depends_on "hdf5" - - resource "test_mat_file" do - url "https://web.uvic.ca/~monahana/eos225/poc_data.mat.sfx" - sha256 "a29df222605476dcfa660597a7805176d7cb6e6c60413a3e487b62b6dbf8e6fe" - end - - def install - args = %W[ - --prefix=#{prefix} - --enable-extended-sparse=yes - --enable-mat73=yes - --with-hdf5=#{Formula["hdf5"].opt_prefix} - --with-zlib=/usr - ] - - system "./configure", *args - system "make", "install" - end - - test do - testpath.install resource("test_mat_file") - (testpath/"mat.c").write <<~'EOS' - #include - #include - - size_t dims[2] = {5, 5}; - double data[25] = {0.0, }; - mat_t *mat; - matvar_t *matvar; - - int main(int argc, char **argv) { - if (!(mat = Mat_Open(argv[1], MAT_ACC_RDONLY))) - abort(); - Mat_Close(mat); - - mat = Mat_CreateVer("test_writenan.mat", NULL, MAT_FT_DEFAULT); - if (mat) { - matvar = Mat_VarCreate("foo", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, - dims, data, MAT_F_DONT_COPY_DATA); - Mat_VarWrite(mat, matvar, MAT_COMPRESSION_NONE); - Mat_VarFree(matvar); - Mat_Close(mat); - } else { - abort(); - } - mat = Mat_CreateVer("foo", NULL, MAT_FT_MAT73); - return EXIT_SUCCESS; - } - EOS - system ENV.cc, "mat.c", "-o", "mat", "-I#{include}", "-L#{lib}", "-lmatio" - system "./mat", "poc_data.mat.sfx" - end -end diff --git a/Formula/libmatroska.rb b/Formula/libmatroska.rb deleted file mode 100644 index 0214e3fe75bd0..0000000000000 --- a/Formula/libmatroska.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Libmatroska < Formula - desc "Extensible, open standard container format for audio/video" - homepage "https://www.matroska.org/" - url "https://dl.matroska.org/downloads/libmatroska/libmatroska-1.6.0.tar.xz" - sha256 "fec89cebd500807f7fd14b56c14733f11045fa2a21398ff6f6c5c0e3e01b4033" - license "LGPL-2.1" - head "https://github.com/Matroska-Org/libmatroska.git" - - bottle do - cellar :any - sha256 "6e0fcb6eaab382b943734853dc74b58abc88d1a6b58623aed85c2d3d62676a06" => :catalina - sha256 "d6ccd27705a5ec5b414f1373fde91ed7e4b27b1a98ddadf92ce14dd879e7f2fb" => :mojave - sha256 "d55b378401f82f39c47af6cc4568c7ddf4d1a18534515b58927112539bd3dce2" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libebml" - - def install - mkdir "build" do - system "cmake", "..", "-DBUILD_SHARED_LIBS=YES", *std_cmake_args - system "make", "install" - end - end -end diff --git a/Formula/libmaxminddb.rb b/Formula/libmaxminddb.rb deleted file mode 100644 index 598edc310a25b..0000000000000 --- a/Formula/libmaxminddb.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Libmaxminddb < Formula - desc "C library for the MaxMind DB file format" - homepage "https://github.com/maxmind/libmaxminddb" - url "https://github.com/maxmind/libmaxminddb/releases/download/1.4.2/libmaxminddb-1.4.2.tar.gz" - sha256 "dd582aa971be23dee960ec33c67fb5fd38affba508e6f00ea75959dbd5aad156" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "737fa40053d963f1c658c1de368d467309eb716869350192fc844aff3a078c23" => :catalina - sha256 "bf9f7295d6295f51d94e88562dca6b5d979bd0d141cd74c0cfa78941d4b74d7a" => :mojave - sha256 "960dd0e63819fc6fb50c83085f013df073308e35df378e2ab5916f96da71389e" => :high_sierra - end - - head do - url "https://github.com/maxmind/libmaxminddb.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "./bootstrap" if build.head? - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "check" - system "make", "install" - (share/"examples").install buildpath/"t/maxmind-db/test-data/GeoIP2-City-Test.mmdb" - end - - test do - system "#{bin}/mmdblookup", "-f", "#{share}/examples/GeoIP2-City-Test.mmdb", - "-i", "175.16.199.0" - end -end diff --git a/Formula/libmemcached.rb b/Formula/libmemcached.rb deleted file mode 100644 index a1363a311a088..0000000000000 --- a/Formula/libmemcached.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Libmemcached < Formula - desc "C and C++ client library to the memcached server" - homepage "https://libmemcached.org/" - url "https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz" - sha256 "e22c0bb032fde08f53de9ffbc5a128233041d9f33b5de022c0978a2149885f82" - revision 2 - - bottle do - cellar :any - rebuild 1 - sha256 "24c7d9597b28d79f50f86777aa506b1955737d9e3298e1d79c3ad95b74fb66f8" => :catalina - sha256 "203121f43d48b8245a1bb963eded3d56aa44ec921176b9819004e62b12acdc48" => :mojave - sha256 "59032bd9e04061aaa7ffafdda12e66535f2e73da25571da0cede2dc21bc62f22" => :high_sierra - end - - depends_on "memcached" => :test - - # https://bugs.launchpad.net/libmemcached/+bug/1245562 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/60f3532/libmemcached/1.0.18.patch" - sha256 "592f10fac729bd2a2b79df26086185d6e08f8667cb40153407c08d4478db89fb" - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - #include - - int main(int argc, char **argv) { - const char *conf = "--SERVER=localhost:11211"; - memcached_st *memc = memcached(conf, strlen(conf)); - assert(memc != NULL); - - // Add a value. - const char *key = "key"; - const char *val = "val"; - assert(memcached_add(memc, key, strlen(key), val, strlen(val), - (time_t)0, (uint32_t)0) == MEMCACHED_SUCCESS); - - // Fetch and check the added value. - size_t return_val_len; - uint32_t return_flags; - memcached_return_t error; - char *return_val = memcached_get(memc, key, strlen(key), - &return_val_len, &return_flags, &error); - assert(return_val != NULL); - assert(error == MEMCACHED_SUCCESS); - assert(return_val_len == strlen(val)); - assert(strncmp(return_val, val, return_val_len) == 0); - assert(return_flags == 0); - free(return_val); - - memcached_free(memc); - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-lmemcached", "test.c", "-o", "test" - - memcached = Formula["memcached"].bin/"memcached" - # Assumes port 11211 is not already taken - io = IO.popen("#{memcached} --listen=localhost:11211") - sleep 1 - system "./test" - Process.kill "TERM", io.pid - end -end diff --git a/Formula/libmetalink.rb b/Formula/libmetalink.rb deleted file mode 100644 index a3a6aa13094b1..0000000000000 --- a/Formula/libmetalink.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Libmetalink < Formula - desc "C library to parse Metalink XML files" - homepage "https://launchpad.net/libmetalink/" - url "https://launchpad.net/libmetalink/trunk/libmetalink-0.1.3/+download/libmetalink-0.1.3.tar.xz" - sha256 "86312620c5b64c694b91f9cc355eabbd358fa92195b3e99517504076bf9fe33a" - license "MIT" - - bottle do - cellar :any - sha256 "a18e6199b4d775a32693aa38b80551d547eb1de58c5d7c788f706276ce296d5e" => :catalina - sha256 "461d42fab1dd15b7df8144ef814a3b589c5be9177728b522ea73e6c52bec660f" => :mojave - sha256 "037c9d82da0a2c77031515cc8618b28552c526e559b3d9cebb0f054cd66204e3" => :high_sierra - sha256 "87711da9c52d75d2d6fed5829a70b0f6561f55fdcf1129266001b6e96bc69b1b" => :sierra - sha256 "4ca3f82ac2e2520c677def661168c6ba14ee2b8f0139fbe33cf5be66745244d3" => :el_capitan - sha256 "e627cde406e135a735fd2586622d2fa05cf6ef9fda8a0ea08d09ddfce20dca75" => :yosemite - sha256 "9ff31fac7dcd9f9231c067eff04d9b59e1de9f8416142d519799746dbfa34c24" => :mavericks - end - - depends_on "pkg-config" => :build - - uses_from_macos "expat" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libmicrohttpd.rb b/Formula/libmicrohttpd.rb deleted file mode 100644 index e098d9a7e3684..0000000000000 --- a/Formula/libmicrohttpd.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Libmicrohttpd < Formula - desc "Light HTTP/1.1 server library" - homepage "https://www.gnu.org/software/libmicrohttpd/" - url "https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.71.tar.gz" - mirror "https://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-0.9.71.tar.gz" - sha256 "e8f445e85faf727b89e9f9590daea4473ae00ead38b237cf1eda55172b89b182" - - bottle do - cellar :any - sha256 "4b726d32231d5178a6e9fb1eff7a4a2e27776fe434fb5e40ecff377ac300719c" => :catalina - sha256 "03c40981973ceca4b9efbe13d28254378fceba98b45470492a9d677595ce1d0c" => :mojave - sha256 "87f16499f102b9bf25d31bce38bd396d0d09a8517b036ba2ad57bf9ace7709a5" => :high_sierra - end - - depends_on "gnutls" - depends_on "libgcrypt" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - (pkgshare/"examples").install Dir.glob("doc/examples/*.c") - end - - test do - cp pkgshare/"examples/simplepost.c", testpath - inreplace "simplepost.c", - "return 0", - "printf(\"daemon %p\", daemon) ; return 0" - system ENV.cc, "-o", "foo", "simplepost.c", "-I#{include}", "-L#{lib}", "-lmicrohttpd" - assert_match /daemon 0x[0-9a-f]+[1-9a-f]+/, pipe_output("./foo") - end -end diff --git a/Formula/libmikmod.rb b/Formula/libmikmod.rb deleted file mode 100644 index cdec48f65bade..0000000000000 --- a/Formula/libmikmod.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Libmikmod < Formula - desc "Portable sound library" - homepage "https://mikmod.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mikmod/libmikmod/3.3.11.1/libmikmod-3.3.11.1.tar.gz" - sha256 "ad9d64dfc8f83684876419ea7cd4ff4a41d8bcd8c23ef37ecb3a200a16b46d19" - - bottle do - cellar :any - sha256 "2151c9e70ca92a911af8cf769c18541c5d107df349b44987f716909c67216c59" => :catalina - sha256 "c69fe0dbab9fb93187e1388d4e388c00c73930dfb3bdd668a0a60228cd8d681b" => :mojave - sha256 "062f1a9e2c4d5ebc6cfb08e70abbdf4ebd85b06519345ed8bde301e62d0cd860" => :high_sierra - sha256 "f7785b9a4f95ff28d55ffd022780ed1cd9bde139b3482cc4f52b862cd9abf247" => :sierra - sha256 "202b59906b8113d694f9c1e81df7a5f00f8afbc9e66a2b1188674058a64ae206" => :el_capitan - sha256 "8276808d976d108dd2768cacb5b54bf570ef6662b8855e7d3537e0ffaaeb1a19" => :yosemite - end - - def install - mkdir "macbuild" do - # macOS has CoreAudio, but ALSA, SAM9407 and ULTRA are not supported - system "../configure", "--prefix=#{prefix}", "--disable-alsa", - "--disable-sam9407", "--disable-ultra" - system "make", "install" - end - end - - test do - system "#{bin}/libmikmod-config", "--version" - end -end diff --git a/Formula/libmill.rb b/Formula/libmill.rb deleted file mode 100644 index 3ba1c803a4298..0000000000000 --- a/Formula/libmill.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Libmill < Formula - desc "Go-style concurrency in C" - homepage "http://libmill.org/" - url "http://libmill.org/libmill-1.18.tar.gz" - sha256 "12e538dbee8e52fd719a9a84004e0aba9502a6e62cd813223316a1e45d49577d" - license "MIT" - head "https://github.com/sustrik/libmill.git" - - bottle do - cellar :any - sha256 "26dd0efaf85765fd70f49d78ef0150731eed569711b1f246601f4c6f6cccced5" => :mojave - sha256 "5e0fff326f0d0d5a7c09f20bb1612ba4034bec1cc3befd99977bfb5b587ca70b" => :high_sierra - sha256 "6eb891740171f0471d420da7e92df829dd64e108cdf115588a639f6be3906e0a" => :sierra - sha256 "37103d981777f9c30dda9add67a2cafc72b405ee7d10ac3a32b1f267b0b5cda5" => :el_capitan - sha256 "4f8a2b4ddbcac88459c0f4b463e497a82e8d6a02b43419e29e2be8230c15123d" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "all", "check", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - void worker(int count, const char *text) { - int i; - for(i = 0; i != count; ++i) { - printf("%s\\n", text); - msleep(10); - } - } - - int main() { - go(worker(4, "a")); - go(worker(2, "b")); - go(worker(3, "c")); - msleep(100); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lmill", "-o", "test" - system "./test" - end -end diff --git a/Formula/libming.rb b/Formula/libming.rb deleted file mode 100644 index 947beee9b3785..0000000000000 --- a/Formula/libming.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Libming < Formula - desc "C library for generating Macromedia Flash files" - homepage "http://www.libming.org/" - url "https://github.com/libming/libming/archive/ming-0_4_8.tar.gz" - sha256 "2a44cc8b7f6506adaa990027397b6e0f60ba0e3c1fe8c9514be5eb8e22b2375c" - revision 1 - - bottle do - cellar :any - sha256 "9c37f5438fb510747686c52cfd2070007ccbb57ecdfb256e344713764aae8782" => :catalina - sha256 "6c4230cfec9255a8f4f4d029414807726b44a1fcd597920c2502a1c5ad84ba52" => :mojave - sha256 "50d6199171c5d8bc5b7cfb24e6befe9f2c7aefc12d8ee7127202fcf1ea646ae4" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "freetype" - depends_on "giflib" - depends_on "libpng" - depends_on :macos # Due to Python 2 - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - uses_from_macos "perl" - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-perl", - "--enable-python" - system "make", "DEBUG=", "install" - end - - test do - (testpath/"test.c").write <<~'EOS' - #include - int main() { - Ming_setScale(40.0); - printf("scale %f\n", Ming_getScale()); - return Ming_init() != 0; - } - EOS - system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lming", "-I#{include}" - assert_match "scale 40.0", shell_output("./test") - end -end diff --git a/Formula/libmms.rb b/Formula/libmms.rb deleted file mode 100644 index b2494af1d7505..0000000000000 --- a/Formula/libmms.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Libmms < Formula - desc "Library for parsing mms:// and mmsh:// network streams" - homepage "https://sourceforge.net/projects/libmms/" - url "https://downloads.sourceforge.net/project/libmms/libmms/0.6.4/libmms-0.6.4.tar.gz" - sha256 "3c05e05aebcbfcc044d9e8c2d4646cd8359be39a3f0ba8ce4e72a9094bee704f" - - bottle do - cellar :any - rebuild 2 - sha256 "15016ca7557449405339f310e6feeccbc04094702fcc7d4be53909fc738b05f4" => :catalina - sha256 "4ac527e54af063a3fa760b1e4d43b56dd51ade89cbb971ac9bea9dd3500dfc70" => :mojave - sha256 "adc24aaa1656c02f41b20b4453f6a2deda8f3597c919eed1ae8befb732fc920f" => :high_sierra - sha256 "5319927f799dd20effbfc9f8bb90ebc844b39852c433bf434ab6b36c11c36417" => :sierra - sha256 "61c4dd24598198386342dd9c700e218b6b83c82627efc781daa89acfaca96066" => :el_capitan - sha256 "f915d916dd81ad9f767b6905e166dae07df72e70dc0c844c8011abed9f144252" => :yosemite - sha256 "b55ae55a0d684ba1e3654eee96769d206ce0c22a4ab7bad5241eb1c51bda7778" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "glib" - - def install - ENV.append "LDFLAGS", "-liconv" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libmodbus.rb b/Formula/libmodbus.rb deleted file mode 100644 index 781cf1ebf0be6..0000000000000 --- a/Formula/libmodbus.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Libmodbus < Formula - desc "Portable modbus library" - homepage "https://libmodbus.org/" - url "https://libmodbus.org/releases/libmodbus-3.1.6.tar.gz" - sha256 "d7d9fa94a16edb094e5fdf5d87ae17a0dc3f3e3d687fead81835d9572cf87c16" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "dd69c46175e27a8a79938c12dbdcbdb67d3d1b74a0c4ad067a394eaa7a5869ca" => :catalina - sha256 "0dd32373b5988d09317728357780b3cdc54cad290afcb51b390f33a50fa653e0" => :mojave - sha256 "d821c77d787cf51c96811c37374d5cc42c7948636c84d7b7b6251a7e0afa29a0" => :high_sierra - sha256 "462dd4e48e87bab1e48ef64f3f3a907392994a9f8c0753c8b739ca5207882b32" => :sierra - end - - head do - url "https://github.com/stephane/libmodbus.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"hellomodbus.c").write <<~EOS - #include - #include - int main() { - modbus_t *mb; - uint16_t tab_reg[32]; - - mb = 0; - mb = modbus_new_tcp("127.0.0.1", 1502); - modbus_connect(mb); - - /* Read 5 registers from the address 0 */ - modbus_read_registers(mb, 0, 5, tab_reg); - - void *p = mb; - modbus_close(mb); - modbus_free(mb); - mb = 0; - return (p == 0); - } - EOS - system ENV.cc, "hellomodbus.c", "-o", "foo", "-L#{lib}", "-lmodbus", - "-I#{include}/libmodbus", "-I#{include}/modbus" - system "./foo" - end -end diff --git a/Formula/libmodplug.rb b/Formula/libmodplug.rb deleted file mode 100644 index f829fdc5f63fc..0000000000000 --- a/Formula/libmodplug.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Libmodplug < Formula - desc "Library from the Modplug-XMMS project" - homepage "https://modplug-xmms.sourceforge.io/" - url "https://downloads.sourceforge.net/modplug-xmms/libmodplug/0.8.9.0/libmodplug-0.8.9.0.tar.gz" - sha256 "457ca5a6c179656d66c01505c0d95fafaead4329b9dbaa0f997d00a3508ad9de" - - bottle do - cellar :any - rebuild 1 - sha256 "62cb39e81cea4111f72a3f594ac78557f6f6992ae964321632fda16a16c97bd2" => :catalina - sha256 "67ea2db6931cc6f60ed71f09cfab02cb22d2781d2e5bbb96ff0ef6a22ebb1c83" => :mojave - sha256 "3f46eca3704d441ba8133d71bd283e8d24cff61e8b903fff720b78932185f9bf" => :high_sierra - sha256 "fc88a11e82b19a1a0aa4ada0ed3468147464d3414c3e9dffda9cea139b195c9d" => :sierra - sha256 "968a0bdc082725f136ab94f3a7eaf5a6a376eb94ec03b45f49ab275bd9193318" => :el_capitan - end - - resource "testmod" do - # Most favourited song on modarchive: - # https://modarchive.org/index.php?request=view_by_moduleid&query=60395 - url "https://api.modarchive.org/downloads.php?moduleid=60395#2ND_PM.S3M" - sha256 "f80735b77123cc7e02c4dad6ce8197bfefcb8748b164a66ffecd206cc4b63d97" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - - system "make", "install" - end - - test do - # First a basic test just that we can link on the library - # and call an initialization method. - (testpath/"test_null.cpp").write <<~EOS - #include "libmodplug/modplug.h" - int main() { - ModPlugFile* f = ModPlug_Load((void*)0, 0); - if (!f) { - // Expecting a null pointer, as no data supplied. - return 0; - } else { - return -1; - } - } - EOS - system ENV.cc, "test_null.cpp", "-L#{lib}", "-lmodplug", "-o", "test_null" - system "./test_null" - - # Second, acquire an actual music file from a popular internet - # source and attempt to parse it. - resource("testmod").stage testpath - (testpath/"test_mod.cpp").write <<~EOS - #include "libmodplug/modplug.h" - #include - #include - - int main() { - std::ifstream in("2ND_PM.S3M"); - std::stringstream buffer; - buffer << in.rdbuf(); - int length = buffer.tellp(); - ModPlugFile* f = ModPlug_Load(buffer.str().c_str(), length); - if (f) { - // Expecting success - return 0; - } else { - return -1; - } - } - EOS - system ENV.cxx, "test_mod.cpp", "-L#{lib}", "-lmodplug", "-o", "test_mod" - system "./test_mod" - end -end diff --git a/Formula/libmonome.rb b/Formula/libmonome.rb deleted file mode 100644 index cfc4b308c1c1e..0000000000000 --- a/Formula/libmonome.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Libmonome < Formula - desc "Interact with monome devices via C, Python, or FFI" - homepage "https://monome.org/" - url "https://github.com/monome/libmonome/archive/v1.4.2.tar.gz" - sha256 "d8f87fc8240214c2ca433f4b185eb3ddbace2065f95487e5d9ac0ab60220393d" - license "ISC" - head "https://github.com/monome/libmonome.git" - - bottle do - cellar :any - rebuild 2 - sha256 "2f50af40811f13ee3dc2a372c98a3efa413d55a311093c1e34a9fabedda624e0" => :catalina - sha256 "edd05ad00d159e4cb6ff44306d94e981891a2009999706700f614f4127feeef8" => :mojave - sha256 "c99ff2d00d681cc2ea502023119bd29453000920142709fa6927259a2dca9584" => :high_sierra - end - - depends_on "liblo" - - def install - # Fix build on Mojave - # https://github.com/monome/libmonome/issues/62 - inreplace "wscript", /conf.env.append_unique.*-mmacosx-version-min=10.5.*/, - "pass" - - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf", "build" - system "./waf", "install" - end -end diff --git a/Formula/libmowgli.rb b/Formula/libmowgli.rb deleted file mode 100644 index 8bed3947d5d16..0000000000000 --- a/Formula/libmowgli.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Libmowgli < Formula - desc "Core framework for Atheme applications" - homepage "https://github.com/atheme/libmowgli-2" - url "https://github.com/atheme/libmowgli-2/archive/v2.1.3.tar.gz" - sha256 "b7faab2fb9f46366a52b51443054a2ed4ecdd04774c65754bf807c5e9bdda477" - revision 1 - head "https://github.com/atheme/libmowgli-2.git" - - bottle do - cellar :any - sha256 "02bbaff929fa3e3967ec4184ce36fcf71ece1dca9aeedad67ca3c9533495fa52" => :catalina - sha256 "68656add47085df19786c9d419d7dd2e880514f3a5fa63838362ef92807c3420" => :mojave - sha256 "061c1fc5a942024894205ee47a5ffc41fae5dde42ca6b744f66dad5d4a2e60fe" => :high_sierra - sha256 "a83b21ccd87a25d26122ab813afbd24ef6bc07e6c92b16db11813d4fab71a055" => :sierra - end - - depends_on "openssl@1.1" - - def install - system "./configure", "--prefix=#{prefix}", - "--with-openssl=#{Formula["openssl@1.1"].opt_prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - char buf[65535]; - mowgli_random_t *r = mowgli_random_create(); - mowgli_formatter_format(buf, 65535, "%1! %2 %3 %4.",\ - "sdpb", "Hello World", mowgli_random_int(r),\ - 0xDEADBEEF, TRUE); - puts(buf); - mowgli_object_unref(r); - return EXIT_SUCCESS; - } - EOS - system ENV.cc, "-I#{include}/libmowgli-2", "-o", "test", "test.c", "-L#{lib}", "-lmowgli-2" - system "./test" - end -end diff --git a/Formula/libmp3splt.rb b/Formula/libmp3splt.rb deleted file mode 100644 index 514fc0f87f62d..0000000000000 --- a/Formula/libmp3splt.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Libmp3splt < Formula - desc "Utility library to split mp3, ogg, and FLAC files" - homepage "https://mp3splt.sourceforge.io/" - url "https://downloads.sourceforge.net/project/mp3splt/libmp3splt/0.9.2/libmp3splt-0.9.2.tar.gz" - sha256 "30eed64fce58cb379b7cc6a0d8e545579cb99d0f0f31eb00b9acc8aaa1b035dc" - revision 1 - - bottle do - sha256 "8070118d4ad4175f51c60081fcc01193b494c8f5e96ed7cf82364f73d68754e3" => :catalina - sha256 "d929bb92be95a49b808d087be5e88100bc23c423100da1afd86422cf0ed3d6cb" => :mojave - sha256 "71eb2ec5137acc03b95dbfdfadbb88c6bade2cb1548cce2655876971e346707a" => :high_sierra - sha256 "805407189fbd468b036493996832e387395380a2fbda743cafac78876632abf9" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "gettext" - depends_on "libid3tag" - depends_on "libogg" - depends_on "libtool" - depends_on "libvorbis" - depends_on "mad" - depends_on "pcre" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libmpc.rb b/Formula/libmpc.rb deleted file mode 100644 index a8be1fcc77ee1..0000000000000 --- a/Formula/libmpc.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Libmpc < Formula - desc "C library for the arithmetic of high precision complex numbers" - homepage "http://www.multiprecision.org/mpc/" - url "https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz" - sha256 "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e" - - bottle do - cellar :any - sha256 "b9491bbc04d1e52dfb8311dc9aa0081fd3041cb6b2f6b59a4104d712d341979d" => :catalina - sha256 "1cb3a09238830d45d64a87f520f06122d24a020403fac1800c831d15c605282e" => :mojave - sha256 "3b28ec506ab53ef5f3163e87fb72ae735b7f91ee2fc20fe184cf1241481b72a5" => :high_sierra - sha256 "18d620a1612bc51b1fbd1b3b62c9c73766b90549c746740c5a27d2ab1ec5ede7" => :sierra - sha256 "6f19f936781dae0db248abdd84a72c3e25451c44379706bc3800760f0aa43888" => :el_capitan - end - - depends_on "gmp" - depends_on "mpfr" - - def install - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --with-gmp=#{Formula["gmp"].opt_prefix} - --with-mpfr=#{Formula["mpfr"].opt_prefix} - ] - - system "./configure", *args - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - int main() { - mpc_t x; - mpc_init2 (x, 256); - mpc_set_d_d (x, 1., INFINITY, MPC_RNDNN); - mpc_tanh (x, x, MPC_RNDNN); - assert (mpfr_nan_p (mpc_realref (x)) && mpfr_nan_p (mpc_imagref (x))); - mpc_clear (x); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-L#{Formula["mpfr"].opt_lib}", - "-L#{Formula["gmp"].opt_lib}", "-lmpc", "-lmpfr", - "-lgmp", "-o", "test" - system "./test" - end -end diff --git a/Formula/libmpd.rb b/Formula/libmpd.rb deleted file mode 100644 index 7cb53331cf4ef..0000000000000 --- a/Formula/libmpd.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Libmpd < Formula - desc "Higher level access to MPD functions" - homepage "https://gmpc.wikia.com/wiki/Gnome_Music_Player_Client" - url "https://www.musicpd.org/download/libmpd/11.8.17/libmpd-11.8.17.tar.gz" - sha256 "fe20326b0d10641f71c4673fae637bf9222a96e1712f71f170fca2fc34bf7a83" - revision 1 - - bottle do - cellar :any - sha256 "a89b23f581da1a00a6c9cd077c854bb6b7f1c818664630cec1ed8f0b6f543a32" => :catalina - sha256 "9a7f7829ec1d79442d3dade12c338b42a0f248b35aa25475b512f0b70171d8db" => :mojave - sha256 "2d8f1fae6ecc3ab4b440531ae13a2db5bc82282a89f2670a986cc6136da16068" => :high_sierra - sha256 "8518a3880db71a27a414e8e2ae020afec29afbb777694389cd57d983ec1904a5" => :sierra - 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 -end diff --git a/Formula/libmpdclient.rb b/Formula/libmpdclient.rb deleted file mode 100644 index 4246a7bb55350..0000000000000 --- a/Formula/libmpdclient.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Libmpdclient < Formula - desc "Library for MPD in the C, C++, and Objective-C languages" - homepage "https://www.musicpd.org/libs/libmpdclient/" - url "https://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.19.tar.xz" - sha256 "158aad4c2278ab08e76a3f2b0166c99b39fae00ee17231bd225c5a36e977a189" - head "https://github.com/MusicPlayerDaemon/libmpdclient.git" - - bottle do - cellar :any - sha256 "380c12b70376c6317224b66a5a4257676fe1cc097b2792c2f2305c1ead01c5ea" => :catalina - sha256 "ed880f1893822ccb69b3ea105482ca1184d764ffb8ccb8511821ad108ccf8fbe" => :mojave - sha256 "35c9b89256c00aae2870c54f47e3abe41c9659a2a5de111d313534b103fe05d3" => :high_sierra - end - - depends_on "doxygen" => :build - depends_on "meson-internal" => :build - depends_on "ninja" => :build - - def install - system "meson", *std_meson_args, ".", "output" - system "ninja", "-C", "output" - system "ninja", "-C", "output", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - mpd_connection_new(NULL, 0, 30000); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-L#{lib}", "-lmpdclient", "-o", "test" - system "./test" - end -end diff --git a/Formula/libmpeg2.rb b/Formula/libmpeg2.rb deleted file mode 100644 index 7c7e90aed3188..0000000000000 --- a/Formula/libmpeg2.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Libmpeg2 < Formula - desc "Library to decode mpeg-2 and mpeg-1 video streams" - homepage "https://libmpeg2.sourceforge.io/" - url "https://libmpeg2.sourceforge.io/files/libmpeg2-0.5.1.tar.gz" - sha256 "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "248128226f4e6649a0aabec67dfb20f5b105a58b194c0e5830b5e13caf3b9421" => :catalina - sha256 "5b6d4bf134cee2877da39a05a5c918f870c9742fe5823d9ad8b61b013fc7a7f2" => :mojave - sha256 "bdd9339459f1a039f480f3c31730265457bf6736ab625359482eb4e3796e455c" => :high_sierra - sha256 "4454cdb2561326d53d7680fb004a13a54674b9cabd619cc9a5fede2742c9da9e" => :sierra - sha256 "841e93dd99b97b96b475aedff29b58f5be5c4156869b1c0212e5d7ed8dd7f481" => :el_capitan - sha256 "3d07c45554ff34036b9eae5a31dc5417c15109ba134d414035b1bf6f9dda7c79" => :yosemite - sha256 "f6a868beb10fbf84d3eb1af556478ecbfb238d28608a53b99e607c02910e5e49" => :mavericks - end - - depends_on "sdl" - - def install - # Otherwise compilation fails in clang with `duplicate symbol ___sputc` - ENV.append_to_cflags "-std=gnu89" - - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libmrss.rb b/Formula/libmrss.rb deleted file mode 100644 index e60fe8f9d565a..0000000000000 --- a/Formula/libmrss.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Libmrss < Formula - desc "C library for RSS files or streams" - homepage "https://www.autistici.org/bakunin/libmrss/" - url "https://www.autistici.org/bakunin/libmrss/libmrss-0.19.2.tar.gz" - sha256 "071416adcae5c1a9317a4a313f2deb34667e3cc2be4487fb3076528ce45b210b" - license "LGPL-2.1" - - bottle do - cellar :any - rebuild 2 - sha256 "03a62a0d10dd05156876128388b1081c329a00f38d71d6e8b52bff20b3d40fbe" => :catalina - sha256 "66000637d850285b2fd66f2fc00ae5a3096690ec84b8280037c39bff3246612c" => :mojave - sha256 "234ec50cc4eabdd5433abb2d27f1e359c468db4fda10a36eb2c9278034a4e000" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libnxml" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libmspub.rb b/Formula/libmspub.rb deleted file mode 100644 index f981c8eab21f2..0000000000000 --- a/Formula/libmspub.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Libmspub < Formula - desc "Interpret and import Microsoft Publisher content" - homepage "https://wiki.documentfoundation.org/DLP/Libraries/libmspub" - url "https://dev-www.libreoffice.org/src/libmspub/libmspub-0.1.4.tar.xz" - sha256 "ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba" - revision 6 - - bottle do - cellar :any - sha256 "704fcbb77c0ac89235fab6ed93549c23b9b29ad58e68ba2383af41c96cac4577" => :catalina - sha256 "bbb95b438d2c8c5997f4bf6f1ada7dc1de4f93063f4355df3624981858b36f52" => :mojave - sha256 "fbc7a283a2068f6c519d3d83e25d2f68394e60580e9cdd4fb4a2ba7ccb840019" => :high_sierra - end - - depends_on "boost" => :build - depends_on "libwpg" => :build - depends_on "pkg-config" => :build - depends_on "icu4c" - depends_on "librevenge" - depends_on "libwpd" - - def install - system "./configure", "--without-docs", - "--disable-dependency-tracking", - "--enable-static=no", - "--disable-werror", - "--disable-tests", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - librevenge::RVNGStringStream docStream(0, 0); - libmspub::MSPUBDocument::isSupported(&docStream); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", "-lrevenge-stream-0.0", - "-I#{Formula["librevenge"].include}/librevenge-0.0", - "-lmspub-0.1", "-I#{include}/libmspub-0.1", - "-L#{lib}", "-L#{Formula["librevenge"].lib}" - system "./test" - end -end diff --git a/Formula/libmtp.rb b/Formula/libmtp.rb deleted file mode 100644 index 495f2852412fa..0000000000000 --- a/Formula/libmtp.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Libmtp < Formula - desc "Implementation of Microsoft's Media Transfer Protocol (MTP)" - homepage "https://libmtp.sourceforge.io/" - url "https://downloads.sourceforge.net/project/libmtp/libmtp/1.1.17/libmtp-1.1.17.tar.gz" - sha256 "f8a34cf52d9f9b9cb8c7f26b12da347d4af7eb904c13189602e4c6b62d1a79dc" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "47ef836719d1fc0ddfc64528d93f1892a4b1db55cc73b025d5824a53956b8ff6" => :catalina - sha256 "dab56fa876053034299e6a5e6ccdc56d8f55b2b6eba89cb7fc402d011f3e5318" => :mojave - sha256 "89264c49b080c39b588ffa5f4ecad60aaa68aca5baf92a6460defee779c4733e" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libusb-compat" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-mtpz" - system "make", "install" - end - - test do - assert_match version.to_s, shell_output("#{bin}/mtp-getfile") - end -end diff --git a/Formula/libmusicbrainz.rb b/Formula/libmusicbrainz.rb deleted file mode 100644 index d24dbc2595f43..0000000000000 --- a/Formula/libmusicbrainz.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Libmusicbrainz < Formula - desc "MusicBrainz Client Library" - homepage "https://musicbrainz.org/doc/libmusicbrainz" - url "https://github.com/metabrainz/libmusicbrainz/releases/download/release-5.1.0/libmusicbrainz-5.1.0.tar.gz" - sha256 "6749259e89bbb273f3f5ad7acdffb7c47a2cf8fcaeab4c4695484cef5f4c6b46" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "3ff30e82e933e84fdaacc2a0d8c568678adfabb0b7771667cbcaf07132f59a14" => :catalina - sha256 "420d6867aa3d20d9148d4546a154e7059467cc4ca8d861dfb173c9ea35f10dab" => :mojave - sha256 "99b598b941ac0ce3747d8821943a1e730f3673b721421d9c0428b70259e789c0" => :high_sierra - sha256 "8fe055e1f987e23a569f915082031e172a5c3d0aef6f86de78ce9c8258f53cd2" => :sierra - sha256 "6a63410ca9eae84b263d7165d05701801f4e05de26a9e95a7396f95a602cedd7" => :el_capitan - sha256 "0851c7889df9dc2971b60fe9fd8ad891afd8d5dae08877393e2f69e3cc33f589" => :yosemite - sha256 "44fa04315d5bbda3e6b9e6ce20a6140c93d535d8c58e8816c574a7e6d4b90429" => :mavericks - end - - depends_on "cmake" => :build - depends_on "neon" - - def install - neon = Formula["neon"] - neon_args = %W[-DNEON_LIBRARIES:FILEPATH=#{neon.lib}/libneon.dylib - -DNEON_INCLUDE_DIR:PATH=#{neon.include}/neon] - system "cmake", ".", *(std_cmake_args + neon_args) - system "make", "install" - end -end diff --git a/Formula/libmwaw.rb b/Formula/libmwaw.rb deleted file mode 100644 index 6c2b05223f9d1..0000000000000 --- a/Formula/libmwaw.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Libmwaw < Formula - desc "Library for converting legacy Mac document formats" - homepage "https://sourceforge.net/p/libmwaw/wiki/Home/" - url "https://downloads.sourceforge.net/project/libmwaw/libmwaw/libmwaw-0.3.16/libmwaw-0.3.16.tar.xz" - sha256 "0c639edba5297bde5575193bf5b5f2f469956beaff5c0206d91ce9df6bde1868" - - bottle do - cellar :any - sha256 "c911649b2829547fe591010dcb908593de7b084c5ec88487cde17a654e84ee5f" => :catalina - sha256 "7f226dc382e5a67fbeb2650e97503c53e95274c38b77d34b7e047737796eb42b" => :mojave - sha256 "0e16cc626464cd858e158d2dca81d818ce2191ac694168f63f7252b74264e53b" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "librevenge" - - resource "test_document" do - url "https://github.com/openpreserve/format-corpus/raw/825c8a5af012a93cf7aac408b0396e03a4575850/office-examples/Old%20Word%20file/NEWSSLID.DOC" - sha256 "df0af8f2ae441f93eb6552ed2c6da0b1971a0d82995e224b7663b4e64e163d2b" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - testpath.install resource("test_document") - # Test ID on an actual office document - assert_equal shell_output("#{bin}/mwawFile #{testpath}/NEWSSLID.DOC").chomp, - "#{testpath}/NEWSSLID.DOC:Microsoft Word 2.0[pc]" - # Control case; non-document format should return an empty string - assert_equal shell_output("#{bin}/mwawFile #{test_fixtures("test.mp3")}").chomp, - "" - end -end diff --git a/Formula/libmxml.rb b/Formula/libmxml.rb deleted file mode 100644 index 3040b2dae54ac..0000000000000 --- a/Formula/libmxml.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Libmxml < Formula - desc "Mini-XML library" - homepage "https://michaelrsweet.github.io/mxml/" - url "https://github.com/michaelrsweet/mxml/releases/download/v3.1/mxml-3.1.tar.gz" - sha256 "1ac8d252f62f9dc2b2004518c70d2da313bdfcd92b8350e215f46064a34b52fc" - license "Apache-2.0" - head "https://github.com/michaelrsweet/mxml.git" - - bottle do - cellar :any - sha256 "e386b406006d568647f83d92268685f47c3ce72995ea843b6fb456947ef669ef" => :catalina - sha256 "f8e186285e66c760f033ab4205cfa5d05a48d3b5ac2a668c0f3cd4572c0fd151" => :mojave - sha256 "bf35de7007c525ef4e179ec3e89df8656b9a206f9390df068585361d90cbd3b6" => :high_sierra - sha256 "044434b96bcf9a3097e28c4e85fa5e1e558f2b2dc62c7e8eba6363c664924b68" => :sierra - end - - depends_on :xcode => :build # for docsetutil - - def install - system "./configure", "--disable-debug", - "--enable-shared", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - FILE *fp; - mxml_node_t *tree; - - fp = fopen("test.xml", "r"); - tree = mxmlLoadFile(NULL, fp, MXML_OPAQUE_CALLBACK); - fclose(fp); - } - EOS - - (testpath/"test.xml").write <<~EOS - - - I'm an XML document. - - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lmxml", "-o", "test" - system "./test" - end -end diff --git a/Formula/libmypaint.rb b/Formula/libmypaint.rb deleted file mode 100644 index b54532fd5431b..0000000000000 --- a/Formula/libmypaint.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Libmypaint < Formula - desc "MyPaint brush engine library" - homepage "https://github.com/mypaint/libmypaint/wiki" - url "https://github.com/mypaint/libmypaint/releases/download/v1.6.1/libmypaint-1.6.1.tar.xz" - sha256 "741754f293f6b7668f941506da07cd7725629a793108bb31633fb6c3eae5315f" - revision 1 - - bottle do - cellar :any - sha256 "699014970a67055822e7ee2abc92c4ea2b45e51bcd58cfa01cb24c2ed08f6a2b" => :catalina - sha256 "97ca6e5c0ae27513cc3af20c1256548d6a21e0a38bfdcea5a79f7fe1c0a6886d" => :mojave - sha256 "4260697ececf5344aa3eacd16afdd5f4eff556cee6312e49a8e5544edb71aca1" => :high_sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "json-c" - - def install - system "./configure", "--disable-introspection", - "--without-glib", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - MyPaintBrush *brush = mypaint_brush_new(); - mypaint_brush_unref(brush); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}/libmypaint", "-L#{lib}", "-lmypaint", "-o", "test" - system "./test" - end -end diff --git a/Formula/libnatpmp.rb b/Formula/libnatpmp.rb deleted file mode 100644 index b65eb6b7146b7..0000000000000 --- a/Formula/libnatpmp.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Libnatpmp < Formula - desc "NAT port mapping protocol library" - homepage "http://miniupnp.free.fr/libnatpmp.html" - url "http://miniupnp.free.fr/files/download.php?file=libnatpmp-20150609.tar.gz" - sha256 "e1aa9c4c4219bc06943d6b2130f664daee213fb262fcb94dd355815b8f4536b0" - - bottle do - cellar :any - sha256 "69bd0b362260f89b76113fbfec36235ec6265434c365d18790e8bb1a4988ae67" => :catalina - sha256 "1f0e89186c04cd7c7ce9ba88bee87ae31be9c6f5b0ebbcee46f38876d90bfb78" => :mojave - sha256 "04c286ebb17bf08728749e390dd9ccabf3fcc4b660ffe4b6f315dcf89012f15a" => :high_sierra - sha256 "d1aaa97c827918f7d35d121399cb8f59b4442b94c3283a51b7931f0e008ff934" => :sierra - sha256 "667fe1a26fdd6e1a36f6e7b263f2f8e3d01f884da9d9edeb182dbb40b08475ab" => :el_capitan - end - - def install - # Reported upstream: - # https://miniupnp.tuxfamily.org/forum/viewtopic.php?t=978 - inreplace "Makefile", "-Wl,-install_name,$(SONAME)", "-Wl,-install_name,$(INSTALLDIRLIB)/$(SONAME)" - system "make", "INSTALLPREFIX=#{prefix}", "install" - end -end diff --git a/Formula/libnet.rb b/Formula/libnet.rb deleted file mode 100644 index b8f4bacf87084..0000000000000 --- a/Formula/libnet.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Libnet < Formula - desc "C library for creating IP packets" - homepage "https://github.com/sam-github/libnet" - url "https://github.com/libnet/libnet/releases/download/v1.2/libnet-1.2.tar.gz" - sha256 "caa4868157d9e5f32e9c7eac9461efeff30cb28357f7f6bf07e73933fb4edaa7" - license "BSD-2-Clause" - - bottle do - cellar :any - sha256 "0ecfbf2539a6e051ca8aa5962c0ee7cb57ffd173cf654b0eec8152c1a3fbf133" => :catalina - sha256 "cadba638a54f4d5646a3510439ab89317ed23df3c45b12704b78065bb127fbc4" => :mojave - sha256 "44e7b11e8f900f9d6f8e0d1a5deed99c46078dd2dbc997937f713ce5a1ac0f38" => :high_sierra - end - - depends_on "doxygen" => :build - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libnetworkit.rb b/Formula/libnetworkit.rb deleted file mode 100644 index 2c731d57ee9a5..0000000000000 --- a/Formula/libnetworkit.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Libnetworkit < Formula - desc "NetworKit is an OS-toolkit for large-scale network analysis" - homepage "https://networkit.github.io/" - url "https://github.com/networkit/networkit/archive/7.0.tar.gz" - sha256 "4faf16c5fae3e14d3c1b6f30e25c6e093dcf6a3dbf021235f3161ac2a527f682" - license "MIT" - - bottle do - cellar :any - sha256 "86915bb4086ab367364d03ae45b1228aa0b788facda6daf18e0a0adaff9b140e" => :catalina - sha256 "9b9d3a3e7aa1a6f948a474b14aa251813d96e703eddf2bbc65e1c815e83be564" => :mojave - sha256 "2b2ae31876287265a67d737efa586d66e839e9fbf648354c53a3222a0c679ae1" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libomp" - depends_on "tlx" - - def install - mkdir "build" do - system "cmake", ".", *std_cmake_args, - "-DNETWORKIT_EXT_TLX=#{Formula["tlx"].opt_prefix}", - "-DOpenMP_CXX_FLAGS='-Xpreprocessor -fopenmp -I#{Formula["libomp"].opt_prefix}/include'", - "-DOpenMP_CXX_LIB_NAMES='omp'", - "-DOpenMP_omp_LIBRARY=#{Formula["libomp"].opt_prefix}/lib/libomp.dylib", - ".." - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - // Try to create a graph with five nodes - NetworKit::Graph g(5); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lnetworkit", "-o", "test", "-std=c++11" - system "./test" - end -end diff --git a/Formula/libnfc.rb b/Formula/libnfc.rb deleted file mode 100644 index 16435693ff7a8..0000000000000 --- a/Formula/libnfc.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libnfc < Formula - desc "Low level NFC SDK and Programmers API" - homepage "https://github.com/nfc-tools/libnfc" - url "https://github.com/nfc-tools/libnfc/releases/download/libnfc-1.8.0/libnfc-1.8.0.tar.bz2" - sha256 "6d9ad31c86408711f0a60f05b1933101c7497683c2e0d8917d1611a3feba3dd5" - license "LGPL-3.0" - - bottle do - sha256 "6659f67e40774cdb8e95548c03542bbc123ccabc0f4a6160504c03e43fa43c26" => :catalina - sha256 "9bc90c84f89408a8960289a668af7ad9b7b17d34a02996b83ec960c5cbefafeb" => :mojave - sha256 "8e6abd4d61ef9aff76ef25b092806b95614c07a9e46a0e13ca6e915271454a92" => :high_sierra - end - - head do - url "https://github.com/nfc-tools/libnfc.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libusb-compat" - - def install - system "autoreconf", "-vfi" if build.head? - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--enable-serial-autoprobe", - "--with-drivers=all" - system "make", "install" - (prefix/"etc/nfc/libnfc.conf").write "allow_intrusive_scan=yes" - end - - test do - system "#{bin}/nfc-list" - end -end diff --git a/Formula/libnfs.rb b/Formula/libnfs.rb deleted file mode 100644 index 9e9f597fed780..0000000000000 --- a/Formula/libnfs.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Libnfs < Formula - desc "C client library for NFS" - homepage "https://github.com/sahlberg/libnfs" - url "https://github.com/sahlberg/libnfs/archive/libnfs-4.0.0.tar.gz" - sha256 "6ee77e9fe220e2d3e3b1f53cfea04fb319828cc7dbb97dd9df09e46e901d797d" - - bottle do - cellar :any - sha256 "d727464baa3bbd6111f7b791ae67da3573e47be5d7d613c314853e581743f941" => :catalina - sha256 "e51a653f469f19db8c24f009166b7c63a3d9e48ffd16e687d81e2fc0da52f632" => :mojave - sha256 "2c6199b4295a952c6c179811c9190c8741054011f23ed5a051528baf07b44509" => :high_sierra - sha256 "668a6d77334fd656ea8ca32c1bb36c9253fb95f1dc701607d722afa6af6aa737" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "./bootstrap" - 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) - { - int result = 1; - struct nfs_context *nfs = NULL; - nfs = nfs_init_context(); - - if (nfs != NULL) { - result = 0; - nfs_destroy_context(nfs); - } - - return result; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lnfs", "-o", "test" - system "./test" - end -end diff --git a/Formula/libngspice.rb b/Formula/libngspice.rb deleted file mode 100644 index ce57aab8bba99..0000000000000 --- a/Formula/libngspice.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Libngspice < Formula - desc "Spice circuit simulator as shared library" - homepage "https://ngspice.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/32/ngspice-32.tar.gz" - sha256 "3cd90c4e94516d87c5b4d02a3a6405b1136b25d05c871d4fee1fd7c4c0d03ef2" - - bottle do - sha256 "841f339c398271eb34271fbcdfc0bb8fadf9d17946366f4d846b1e4d6787b54d" => :catalina - sha256 "2e23db9a3e98328340cb5d1f91d784d23cd29108b2dd3a598a133effc0e2b983" => :mojave - sha256 "a82395ca8c0b71c8ac9727ac327f31123bd88453632d00d7efbc6f2240cd1f31" => :high_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 "flex" => :build - depends_on "libtool" => :build - end - - def install - system "./autogen.sh" if build.head? - - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --with-ngshared - --enable-cider - --enable-xspice - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int ng_exit(int status, bool immediate, bool quitexit, int ident, void *userdata) { - return status; - } - int main() { - return ngSpice_Init(NULL, NULL, ng_exit, NULL, NULL, NULL, NULL); - } - EOS - system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lngspice", "-o", "test" - system "./test" - end -end diff --git a/Formula/libnice.rb b/Formula/libnice.rb deleted file mode 100644 index ba185ec6711d2..0000000000000 --- a/Formula/libnice.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Libnice < Formula - desc "GLib ICE implementation" - homepage "https://wiki.freedesktop.org/nice/" - url "https://nice.freedesktop.org/releases/libnice-0.1.17.tar.gz" - sha256 "1952a0dec58b5c9ccc3f25193df4e2d1244cb382cac611b71e25afcd7b069526" - - bottle do - cellar :any - sha256 "1ebb405afa6b66fddbf4c90ab97f3d9e528f1ce3a11c571bc4d5f10c97a812e6" => :catalina - sha256 "0d2f05d15e8e188b56758da0c7aaa05109bb85a6c3088e0f9b863d2c10a76961" => :mojave - sha256 "7851630de0b1da7adf67c514f4d6df037c05ba4e1a426d22029ac8aa20d38877" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gnutls" - depends_on "gstreamer" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # Based on https://github.com/libnice/libnice/blob/HEAD/examples/simple-example.c - (testpath/"test.c").write <<~EOS - #include - int main(int argc, char *argv[]) { - NiceAgent *agent; - GMainLoop *gloop; - gloop = g_main_loop_new(NULL, FALSE); - // Create the nice agent - agent = nice_agent_new(g_main_loop_get_context (gloop), - NICE_COMPATIBILITY_RFC5245); - if (agent == NULL) - g_error("Failed to create agent"); - - g_main_loop_unref(gloop); - g_object_unref(agent); - 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}/nice - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - -lnice - ] - system ENV.cc, *flags, "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/libnids.rb b/Formula/libnids.rb deleted file mode 100644 index 3465b303a34d8..0000000000000 --- a/Formula/libnids.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Libnids < Formula - desc "Implements E-component of network intrusion detection system" - homepage "https://libnids.sourceforge.io/" - url "https://downloads.sourceforge.net/project/libnids/libnids/1.24/libnids-1.24.tar.gz" - sha256 "314b4793e0902fbf1fdb7fb659af37a3c1306ed1aad5d1c84de6c931b351d359" - revision 2 - - bottle do - cellar :any - sha256 "0cd6c420a38ea61eb8abe96b6b2f754bddf1ca5583b3dbccfb1b268990426764" => :catalina - sha256 "175d04b2db4bc65923eed696272339f4533ea8277ec64f01ba6a2b9a6019c8d6" => :mojave - sha256 "e9e968ec057ae597b39c45ff1e804fde87f265c6783e62cb70e009ecc4aafd05" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libnet" - - # Patch fixes -soname and .so shared library issues. Unreported. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9dc80757ba32bf5d818d70fc26bb24b6f/libnids/1.24.patch" - sha256 "d9339c16f89915a02025f10f26aab5bb77c2af85926d2d9ff52e9c7bf2092215" - end - - def install - # autoreconf the old 2005 era code for sanity. - system "autoreconf", "-ivf" - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}", - "--enable-shared" - system "make", "install" - end -end diff --git a/Formula/libnotify.rb b/Formula/libnotify.rb deleted file mode 100644 index 6a2fa268ace9a..0000000000000 --- a/Formula/libnotify.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Libnotify < Formula - desc "Library that sends desktop notifications to a notification daemon" - homepage "https://developer.gnome.org/libnotify" - url "https://download.gnome.org/sources/libnotify/0.7/libnotify-0.7.9.tar.xz" - sha256 "66c0517ed16df7af258e83208faaf5069727dfd66995c4bbc51c16954d674761" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "367a8d51cb565452392b9bc92c753ca641c23f91fc4ff93fb6166b63f2beafda" => :catalina - sha256 "e6d5a6a87f885bf421e6a70c9cef1c6aaf89db46a98216af6c06754246a8f896" => :mojave - sha256 "0560e601843a3e42a4823904dd5534212efd823292444a9588f1cf99ea8bc8f5" => :high_sierra - end - - depends_on "docbook-xsl" => :build - depends_on "gobject-introspection" => :build - depends_on "gtk-doc" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gdk-pixbuf" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - mkdir "build" do - system "meson", *std_meson_args, "-Dtests=false", ".." - system "ninja" - system "ninja", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - g_assert_true(notify_init("testapp")); - return 0; - } - EOS - gettext = Formula["gettext"] - glib = Formula["glib"] - gdk_pixbuf = Formula["gdk-pixbuf"] - flags = %W[ - -I#{gettext.opt_include} - -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#{include} - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{lib} - -lnotify - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libnova.rb b/Formula/libnova.rb deleted file mode 100644 index 4fabc6ce3d683..0000000000000 --- a/Formula/libnova.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Libnova < Formula - desc "Celestial mechanics, astrometry and astrodynamics library" - homepage "https://libnova.sourceforge.io/" - url "https://downloads.sourceforge.net/project/libnova/libnova/v%200.15.0/libnova-0.15.0.tar.gz" - sha256 "7c5aa33e45a3e7118d77df05af7341e61784284f1e8d0d965307f1663f415bb1" - - bottle do - cellar :any - sha256 "d7f6515e6a018fd9b9fb47d25610e62cef4f0953fa3c33c7fb3499d5ed0e3f1b" => :catalina - sha256 "2bcc962108ffee6fafeae45e5b9eb8f6b233bd2aaa0163f6c89e2f77ddc6eb3f" => :mojave - sha256 "08345c100121f219e199a833563b8f35d17e5368b93e3711377cc20acd0dce99" => :high_sierra - sha256 "1ef1a9898b97967ba9cabdf002ddcc4b398976f0c9bb7c826f7980ffaef87dd4" => :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", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(void) - { - double JD; - - JD = ln_get_julian_from_sys(); - return 0; - } - EOS - - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lnova", "-o", "test" - system "./test" - end -end diff --git a/Formula/libntlm.rb b/Formula/libntlm.rb deleted file mode 100644 index 6b9ec9ae9cbee..0000000000000 --- a/Formula/libntlm.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Libntlm < Formula - desc "Implements Microsoft's NTLM authentication" - homepage "https://www.nongnu.org/libntlm/" - url "https://www.nongnu.org/libntlm/releases/libntlm-1.6.tar.gz" - sha256 "f2376b87b06d8755aa3498bb1226083fdb1d2cf4460c3982b05a9aa0b51d6821" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "7e34bd216191b40a86075d825c98c929d4f61842be989b605caba169ac68c999" => :catalina - sha256 "a7de6d5c400b83a6f5e18423d396321aa45fb1a12dd1577df04389a7379e743a" => :mojave - sha256 "e9b9b29b0f54e3349be1fad6f281d7ed0b972deaab07a0febe2ab75a73028ea5" => :high_sierra - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - pkgshare.install "config.h", "test_ntlm.c", "test.txt", "gl/byteswap.h", "gl/md4.c", "gl/md4.h" - end - - test do - cp pkgshare.children, testpath - system ENV.cc, "test_ntlm.c", "md4.c", "-I#{testpath}", "-L#{lib}", "-lntlm", - "-DNTLM_SRCDIR=\"#{testpath}\"", "-o", "test_ntlm" - system "./test_ntlm" - end -end diff --git a/Formula/libnxml.rb b/Formula/libnxml.rb deleted file mode 100644 index 2dd7e1279c6d4..0000000000000 --- a/Formula/libnxml.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Libnxml < Formula - desc "C library for parsing, writing, and creating XML files" - homepage "https://www.autistici.org/bakunin/libnxml/" - url "https://www.autistici.org/bakunin/libnxml/libnxml-0.18.3.tar.gz" - sha256 "0f9460e3ba16b347001caf6843f0050f5482e36ebcb307f709259fd6575aa547" - license "LGPL-2.1" - - bottle do - cellar :any - rebuild 1 - sha256 "af92d830dbb7a103cd5a512c03c1cf2777742ea72c998ecbf1fc80912679cb47" => :catalina - sha256 "61e076a06cab737a7410a8a2adf9c29c3d32e44467caaef25d54c7be63093bd6" => :mojave - sha256 "a6b51b3ed4d09a603b7d232040b7e53fb26013a16ea9b4b86f415c45200faf43" => :high_sierra - sha256 "ddeb6f19f803f29eb44f498ed687dd76a5bdeb0b6416c67759e1690ab9fa4f14" => :sierra - sha256 "de106efa2da60ccb8567403547f904485c1c6431dd492ce4e1bbd66599c7f961" => :el_capitan - sha256 "7c2bff9c49c93ef6a3901050212671c60e0cb4e72f2faf968eb4ae57f3d6fbeb" => :yosemite - sha256 "49cfdc9ab57c78deed6b2fc3ce1c13b48a943384b2d366f9c37cfb673528b637" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/liboauth.rb b/Formula/liboauth.rb deleted file mode 100644 index cf794ce1034a8..0000000000000 --- a/Formula/liboauth.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Liboauth < Formula - desc "C library for the OAuth Core RFC 5849 standard" - homepage "https://liboauth.sourceforge.io/" - url "https://downloads.sourceforge.net/project/liboauth/liboauth-1.0.3.tar.gz" - sha256 "0df60157b052f0e774ade8a8bac59d6e8d4b464058cc55f9208d72e41156811f" - revision 2 - - bottle do - cellar :any - sha256 "1ce26c143029edc957263b3f7c64449c385a5b016e7adbfb1bf40018df08a319" => :catalina - sha256 "2cc45826629d726ad5496c7d1ead73844d213f0862c981830645751ff0f678be" => :mojave - sha256 "c1f049ca62762088244421339f848a5de1e5e388ced1d15463da00a9b0222784" => :high_sierra - sha256 "d3a3ffc611c1d2047e2b56a632e7d4b4e5f4d0657483932fdcd4972455d28f60" => :sierra - end - - depends_on "openssl@1.1" - - # Patch for compatibility with OpenSSL 1.1 - patch :p0 do - url "https://raw.githubusercontent.com/freebsd/freebsd-ports/121e6c77a8e6b9532ce6e45c8dd8dbf38ca4f97d/net/liboauth/files/patch-src_hash.c" - sha256 "a7b0295dab65b5fb8a5d2a9bbc3d7596b1b58b419bd101cdb14f79aa5cc78aea" - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-curl" - system "make", "install" - end -end diff --git a/Formula/libodfgen.rb b/Formula/libodfgen.rb deleted file mode 100644 index 0b9403b65aa96..0000000000000 --- a/Formula/libodfgen.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Libodfgen < Formula - desc "ODF export library for projects using librevenge" - homepage "https://sourceforge.net/p/libwpd/wiki/libodfgen/" - url "https://dev-www.libreoffice.org/src/libodfgen-0.1.7.tar.xz" - mirror "https://downloads.sourceforge.net/project/libwpd/libodfgen/libodfgen-0.1.7/libodfgen-0.1.7.tar.xz" - sha256 "323e491f956c8ca2abb12c998e350670930a32317bf9662b0615dd4b3922b831" - - bottle do - cellar :any - rebuild 1 - sha256 "25fb42ad5715c87c0a23547b59515aa5c0d7cba2e0a5d09d2d2a8eeb06217677" => :catalina - sha256 "f90434da376c3af4b55640d1c5a870c28339a9174dfda56b7bc79dc6b6b60ec8" => :mojave - sha256 "b80178fdbf5ca0816879466adc8fbedd671d57db3378ee3c708fefdf9b8f87e3" => :high_sierra - end - - depends_on "boost" => :build - depends_on "libetonyek" => :build - depends_on "libwpg" => :build - depends_on "pkg-config" => :build - depends_on "librevenge" - depends_on "libwpd" - - def install - system "./configure", "--without-docs", - "--disable-dependency-tracking", - "--enable-static=no", - "--with-sharedptr=boost", - "--disable-werror", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - return ODF_FLAT_XML; - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", - "-lrevenge-0.0", - "-I#{Formula["librevenge"].include}/librevenge-0.0", - "-L#{Formula["librevenge"].lib}", - "-lodfgen-0.1", - "-I#{include}/libodfgen-0.1", - "-L#{lib}" - system "./test" - end -end diff --git a/Formula/libofx.rb b/Formula/libofx.rb deleted file mode 100644 index c494e2cca75a6..0000000000000 --- a/Formula/libofx.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Libofx < Formula - desc "Library to support OFX command responses" - homepage "https://libofx.sourceforge.io/" - url "https://downloads.sourceforge.net/project/libofx/libofx/libofx-0.9.15.tar.gz" - sha256 "e95c14e09fc37b331af3ef4ef7bea29eb8564a06982959fbd4bca7e331816144" - license "GPL-2.0" - - bottle do - sha256 "aa4c73d9fe09d54bc4fb0a1dde14bd927949f4d0ce100dae987f03df79236958" => :catalina - sha256 "9b731e873dee237f2723fd05aa7f88b0e64f29197297c33e9def68112d7c2fc8" => :mojave - sha256 "7c561c3c928ad133d1763afe6a9d25b784d236411f00085151740f3505b164b3" => :high_sierra - end - - depends_on "open-sp" - - def install - opensp = Formula["open-sp"] - system "./configure", "--disable-dependency-tracking", - "--with-opensp-includes=#{opensp.opt_include}/OpenSP", - "--with-opensp-libs=#{opensp.opt_lib}", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_equal "ofxdump #{version}", shell_output("#{bin}/ofxdump -V").chomp - end -end diff --git a/Formula/libogg.rb b/Formula/libogg.rb deleted file mode 100644 index 9fd5d2a6c82be..0000000000000 --- a/Formula/libogg.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Libogg < Formula - desc "Ogg Bitstream Library" - homepage "https://www.xiph.org/ogg/" - license "BSD-3-Clause" - - stable do - url "https://downloads.xiph.org/releases/ogg/libogg-1.3.4.tar.gz" - sha256 "fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e" - - # os_types: fix unsigned typedefs for MacOS. This is already merged upstream; remove on next version - patch do - url "https://github.com/xiph/ogg/commit/c8fca6b4a02d695b1ceea39b330d4406001c03ed.patch?full_index=1" - sha256 "0f4d289aecb3d5f7329d51f1a72ab10c04c336b25481a40d6d841120721be485" - end - end - - bottle do - cellar :any - rebuild 1 - sha256 "b95bbf935f48878bd96d1c0e6557a017aa18cb17a080bc3ef9308b6415c278ef" => :catalina - sha256 "3cc7656859154f6eb98d3ddbe4b74c810b505e2162af1357b3ed6b70cad35125" => :mojave - sha256 "95f271ec181f6b999674636272a3414db4242eabd0a0b0572cfa0f1f324f5ef8" => :high_sierra - end - - head do - url "https://gitlab.xiph.org/xiph/ogg.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - resource("oggfile") do - url "https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg" - sha256 "379071af4fa77bc7dacf892ad81d3f92040a628367d34a451a2cdcc997ef27b0" - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main (void) { - ogg_sync_state oy; - ogg_stream_state os; - ogg_page og; - ogg_packet op; - char *buffer; - int bytes; - - ogg_sync_init (&oy); - buffer = ogg_sync_buffer (&oy, 4096); - bytes = fread(buffer, 1, 4096, stdin); - ogg_sync_wrote (&oy, bytes); - if (ogg_sync_pageout (&oy, &og) != 1) - return 1; - ogg_stream_init (&os, ogg_page_serialno (&og)); - if (ogg_stream_pagein (&os, &og) < 0) - return 1; - if (ogg_stream_packetout (&os, &op) != 1) - return 1; - - return 0; - } - EOS - testpath.install resource("oggfile") - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-logg", - "-o", "test" - # Should work on an OGG file - shell_output("./test < Example.ogg") - # Expected to fail on a non-OGG file - shell_output("./test < #{test_fixtures("test.wav")}", 1) - end -end diff --git a/Formula/liboil.rb b/Formula/liboil.rb deleted file mode 100644 index a8cef244a0218..0000000000000 --- a/Formula/liboil.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Liboil < Formula - desc "C library of simple functions optimized for various CPUs" - homepage "https://wiki.freedesktop.org/liboil/" - url "https://liboil.freedesktop.org/download/liboil-0.3.17.tar.gz" - sha256 "105f02079b0b50034c759db34b473ecb5704ffa20a5486b60a8b7698128bfc69" - - bottle do - cellar :any - rebuild 1 - sha256 "4568936a9d090ea8a2a349e4009a0b2f0a66edc49c93b4bda1a9c30d6ad64544" => :catalina - sha256 "e8655c3c54d78829199c130758a73dce27e27d8a925cb9ec943a1d32522c13f6" => :mojave - sha256 "3214b8910deb69c2c0138a5ece603515c089fa2178ead16e4106695dd6b4c4b4" => :high_sierra - sha256 "f242435c284690879f84812481843e92c54adc190a8201aa31d550c262e1951d" => :sierra - sha256 "7d76b7a220caeb8dbaef27b879f4f3ac0ad5b236b563961abd9484e8bc9e0160" => :el_capitan - sha256 "9ea78f801296e8643f366d634449a043376e9015e9329dc1c591a9ad55a37b66" => :yosemite - sha256 "b7f92d53730febc590a12c4812784428e947c61361354c46f2fef245c0a51bba" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - def install - ENV.append "CFLAGS", "-fheinous-gnu-extensions" if ENV.compiler == :clang - - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(int argc, char** argv) { - oil_init(); - return 0; - } - EOS - - flags = ["-I#{include}/liboil-0.3", "-L#{lib}", "-loil-0.3"] + ENV.cflags.to_s.split - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libolm.rb b/Formula/libolm.rb deleted file mode 100644 index 0a1d1b2589a3a..0000000000000 --- a/Formula/libolm.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Libolm < Formula - desc "Implementation of the Double Ratchet cryptographic ratchet" - homepage "https://gitlab.matrix.org/matrix-org/olm" - url "https://gitlab.matrix.org/matrix-org/olm/-/archive/3.1.5/olm-3.1.5.tar.gz" - sha256 "92ac1eccacbff620a1bc1a168ba204893d83bcb72646e456990ebe2480638696" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "bbe4e24d1c0a1e584d2feb1b4cdcf2b3b6f995e8e01b48367d2b60d5b25ab2c6" => :catalina - sha256 "0bcc49962732ee4eb211fc59abbc803444dab90486539f76605b233bdb765705" => :mojave - sha256 "7c5a282fba56d8968e138cd7c36949757397f8cc2ba8446c683cf3b24f5ff6aa" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", "-Bbuild", "-DCMAKE_INSTALL_PREFIX=#{prefix}" - system "cmake", "--build", "build", "--target", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - #include "olm/olm.h" - - using std::cout; - - int main() { - void * utility_buffer = malloc(::olm_utility_size()); - ::OlmUtility * utility = ::olm_utility(utility_buffer); - - uint8_t output[43]; - ::olm_sha256(utility, "Hello, World", 12, output, 43); - cout << output; - return 0; - } - EOS - - system ENV.cc, "test.cpp", "-L#{lib}", "-lolm", "-lstdc++", "-o", "test" - assert_equal "A2daxT/5zRU1zMffzfosRYxSGDcfQY3BNvLRmsH76KU", shell_output("./test").strip - end -end diff --git a/Formula/libomp.rb b/Formula/libomp.rb deleted file mode 100644 index 556dc4273a732..0000000000000 --- a/Formula/libomp.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Libomp < Formula - desc "LLVM's OpenMP runtime library" - homepage "https://openmp.llvm.org/" - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/openmp-10.0.0.src.tar.xz" - sha256 "3b9ff29a45d0509a1e9667a0feb43538ef402ea8cfc7df3758a01f20df08adfa" - - bottle do - cellar :any - sha256 "0ea757dbea7bf12141ef1d209d2f3b59919baa0caa0482d7ea6ae9c2dfed2382" => :catalina - sha256 "aecd306b605763dbd06c73b5d470c924643b48c051f06d8a4e70be705052c8ee" => :mojave - sha256 "ddfbe1ab7c6dafc45c787d6b4ae19fffb6465bbc0aef007b728cb98ba0d6d2b1" => :high_sierra - end - - depends_on "cmake" => :build - - def install - # Disable LIBOMP_INSTALL_ALIASES, otherwise the library is installed as - # libgomp alias which can conflict with GCC's libgomp. - system "cmake", ".", *std_cmake_args, "-DLIBOMP_INSTALL_ALIASES=OFF" - system "make", "install" - system "cmake", ".", "-DLIBOMP_ENABLE_SHARED=OFF", *std_cmake_args, - "-DLIBOMP_INSTALL_ALIASES=OFF" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main (int argc, char** argv) { - std::array arr = {0,0}; - #pragma omp parallel num_threads(2) - { - size_t tid = omp_get_thread_num(); - arr.at(tid) = tid + 1; - } - if(arr.at(0) == 1 && arr.at(1) == 2) - return 0; - else - return 1; - } - EOS - system ENV.cxx, "-Werror", "-Xpreprocessor", "-fopenmp", "test.cpp", - "-L#{lib}", "-lomp", "-o", "test" - system "./test" - end -end diff --git a/Formula/libopendkim.rb b/Formula/libopendkim.rb deleted file mode 100644 index 68acdca8292fd..0000000000000 --- a/Formula/libopendkim.rb +++ /dev/null @@ -1,218 +0,0 @@ -class Libopendkim < Formula - desc "Implementation of Domain Keys Identified Mail authentication" - homepage "http://opendkim.org/" - url "https://downloads.sourceforge.net/project/opendkim/opendkim-2.10.3.tar.gz" - sha256 "43a0ba57bf942095fe159d0748d8933c6b1dd1117caf0273fa9a0003215e681b" - revision 2 - - bottle do - cellar :any - sha256 "76268e02f90b0931a9fd8d2ae933d334c2efb9ee34dc85c77d8eecc25b48c68b" => :mojave - sha256 "e5d79e2cd539dff2a02ac91b171b23c0c36d7d012d2a3d21af1cbd732c2ee58a" => :high_sierra - sha256 "33a66999fc2479cd6d0d27d2189ed34125e2510afb7afe0c97cdb08ed67efc95" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "openssl@1.1" - depends_on "unbound" - - on_linux do - depends_on "pkg-config" => :build - end - - # Patch for compatibility with OpenSSL 1.1.1 - # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223568 - patch :p0, :DATA - - def install - # Recreate configure due to patch - system "autoreconf", "-fvi" - - # --disable-filter: not needed for the library build - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--disable-filter", - "--with-unbound=#{Formula["unbound"].opt_prefix}", - "--with-openssl=#{Formula["openssl@1.1"].opt_prefix}" - system "make", "install" - end - - test do - system "#{sbin}/opendkim-genkey", "--directory=#{testpath}" - assert_predicate testpath/"default.private", :exist? - assert_predicate testpath/"default.txt", :exist? - end -end -__END__ ---- libopendkim/tests/Makefile.in.orig 2015-05-12 18:43:48 UTC -+++ libopendkim/tests/Makefile.in -@@ -1108,8 +1108,10 @@ am__nobase_list = $(am__nobase_strip_setup); \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' - am__base_list = \ -- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ -- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\ -+/ /g' | \ -+ sed '$$!N;$$!N;$$!N;$$!N;s/\ -+/ /g' - am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ -@@ -4131,16 +4133,19 @@ uninstall-am: uninstall-dist_docDATA - @LCOV_TRUE@description.txt: $(check_PROGRAMS) $(check_SCRIPTS) - @LCOV_TRUE@ rm -f $@ - @LCOV_TRUE@ for i in $(check_PROGRAMS); do \ --@LCOV_TRUE@ testname=$${i/t-}; \ --@LCOV_TRUE@ testname=$${testname//-/_}; \ -+@LCOV_TRUE@ testname=$${i#t-}; \ -+@LCOV_TRUE@ testname=$$(echo $${testname} | sed -e 's/-/_/g'); \ - @LCOV_TRUE@ fgrep '***' $$i.c | tail -n 1 | \ --@LCOV_TRUE@ (echo $${testname} ; sed -e 's/[^*]*\*\*\*\(.*\)\\n.*/\t\1\n/g' ) >> $@; \ -+@LCOV_TRUE@ (echo $${testname} ; sed -e 's/[^*]*\*\*\*\(.*\)\\ -+@LCOV_TRUE@.*/ \1\ -+@LCOV_TRUE@/g' ) >> $@; \ - @LCOV_TRUE@ done - @LCOV_TRUE@ for i in $(check_SCRIPTS); do \ --@LCOV_TRUE@ testname=$${i/t-}; \ --@LCOV_TRUE@ testname=$${testname//-/_}; \ -+@LCOV_TRUE@ testname=$${i#t-}; \ -+@LCOV_TRUE@ testname=$$(echo $${testname} | sed -e 's/-/_/g'); \ - @LCOV_TRUE@ grep '^#' $$i | tail -n 1 | \ --@LCOV_TRUE@ (echo $${testname} ; sed -e 's/^# \(.*\)/\t\1\n/g' ) >> $@; \ -+@LCOV_TRUE@ (echo $${testname} ; sed -e 's/^# \(.*\)/ \1\ -+@LCOV_TRUE@/g' ) >> $@; \ - @LCOV_TRUE@ done - - @LCOV_TRUE@description.html: description.txt ---- libopendkim/dkim-canon.c.orig 2015-05-11 03:56:13 UTC -+++ libopendkim/dkim-canon.c -@@ -388,7 +388,7 @@ dkim_canon_header_string(struct dkim_dstring *dstr, dk - } - - /* skip all spaces before first word */ -- while (*p != '\0' && DKIM_ISWSP(*p)) -+ while (*p != '\0' && DKIM_ISLWSP(*p)) - p++; - - space = FALSE; /* just saw a space */ ---- opendkim/tests/Makefile.in.orig 2015-05-12 18:43:49 UTC -+++ opendkim/tests/Makefile.in -@@ -139,8 +139,10 @@ am__nobase_list = $(am__nobase_strip_setup); \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' - am__base_list = \ -- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ -- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\ -+/ /g' | \ -+ sed '$$!N;$$!N;$$!N;$$!N;s/\ -+/ /g' - am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ -@@ -1298,14 +1300,16 @@ uninstall-am: uninstall-dist_docDATA - @LCOV_TRUE@description.txt: $(check_SCRIPTS) - @LCOV_TRUE@ rm -f $@ - @LCOV_TRUE@ for test in $? ; do \ --@LCOV_TRUE@ testname=$${test/t-}; \ --@LCOV_TRUE@ testname=$${testname//-/_}; \ -+@LCOV_TRUE@ testname=$${test#t-}; \ -+@LCOV_TRUE@ testname=$$(echo $${testname} | sed -e 's/-/_/g'); \ - @LCOV_TRUE@ grep ^# $$test | tail -n 1 | \ --@LCOV_TRUE@ sed -e "s/^#\(.*\)/$${testname}\n\t\1\n/g" >> $@; \ -+@LCOV_TRUE@ sed -e "s/^#\(.*\)/$${testname}\ -+@LCOV_TRUE@ \1\ -+@LCOV_TRUE@/g" >> $@; \ - @LCOV_TRUE@ done - - @LCOV_TRUE@description.html: description.txt --@LCOV_TRUE@ gendesc --output $@ $< -+@LCOV_TRUE@ gendesc --output $@ $? - - @LCOV_TRUE@maintainer-clean-local: - @LCOV_TRUE@ -rm -rf lcov/[^C]* ---- opendkim/opendkim-crypto.c.orig 2013-02-25 21:02:41 UTC -+++ opendkim/opendkim-crypto.c -@@ -222,7 +222,11 @@ dkimf_crypto_free_id(void *ptr) - { - assert(pthread_setspecific(id_key, ptr) == 0); - -+#if (OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)) -+ OPENSSL_thread_stop(); -+#else - ERR_remove_state(0); -+#endif - - free(ptr); - -@@ -392,11 +396,15 @@ dkimf_crypto_free(void) - { - if (crypto_init_done) - { -+#if (OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)) -+ OPENSSL_thread_stop(); -+#else - CRYPTO_cleanup_all_ex_data(); - CONF_modules_free(); - EVP_cleanup(); - ERR_free_strings(); - ERR_remove_state(0); -+#endif - - if (nmutexes > 0) - { ---- configure.ac.orig 2015-05-12 18:43:09 UTC -+++ configure.ac -@@ -860,26 +860,28 @@ then - AC_SEARCH_LIBS([ERR_peek_error], [crypto], , - AC_MSG_ERROR([libcrypto not found])) - -- AC_SEARCH_LIBS([SSL_library_init], [ssl], , -- [ -- if test x"$enable_shared" = x"yes" -- then -- AC_MSG_ERROR([Cannot build shared opendkim -- against static openssl libraries. -- Configure with --disable-shared -- to get this working or obtain a -- shared libssl library for -- opendkim to use.]) -- fi - -- # avoid caching issue - last result of SSL_library_init -- # shouldn't be cached for this next check -- unset ac_cv_search_SSL_library_init -- LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl" -- AC_SEARCH_LIBS([SSL_library_init], [ssl], , -- AC_MSG_ERROR([libssl not found]), [-ldl]) -- ] -- ) -+ AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM([[#include ]], -+ [[SSL_library_init();]])], -+ [od_have_ossl="yes";], -+ [od_have_ossl="no";]) -+ if test x"$od_have_ossl" = x"no" -+ then -+ if test x"$enable_shared" = x"yes" -+ then -+ AC_MSG_ERROR([Cannot build shared opendkim -+ against static openssl libraries. -+ Configure with --disable-shared -+ to get this working or obtain a -+ shared libssl library for -+ opendkim to use.]) -+ fi -+ -+ LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl" -+ AC_SEARCH_LIBS([SSL_library_init], [ssl], , -+ AC_MSG_ERROR([libssl not found]), [-ldl]) -+ fi - - AC_CHECK_DECL([SHA256_DIGEST_LENGTH], - AC_DEFINE([HAVE_SHA256], 1, diff --git a/Formula/libopenmpt.rb b/Formula/libopenmpt.rb deleted file mode 100644 index 53111d90e984b..0000000000000 --- a/Formula/libopenmpt.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Libopenmpt < Formula - desc "Software library to decode tracked music files" - homepage "https://lib.openmpt.org/libopenmpt/" - url "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-0.5.0+release.autotools.tar.gz" - version "0.5.0" - sha256 "43cba54a3f7220c3cc5baae1e2c19a5af7196bfdb95ff4d0c4979d9fbc6c837e" - - bottle do - cellar :any - sha256 "8b1e3af270bbddc314fd7a081289d81f6d144de464624d241bffdea55ca85b47" => :catalina - sha256 "f5063e9fed9060ce7f0eea90743ddbca115a80b4f97f715d28c19ef144ee5acd" => :mojave - sha256 "127c3e53b025a84290eaacb481f6f28129fc98cf359de4afb25de27adfa27114" => :high_sierra - end - - depends_on "pkg-config" => :build - - depends_on "flac" - depends_on "libogg" - depends_on "libsndfile" - depends_on "libvorbis" - depends_on "mpg123" - depends_on "portaudio" - - resource "mystique.s3m" do - url "https://api.modarchive.org/downloads.php?moduleid=54144#mystique.s3m" - sha256 "e9a3a679e1c513e1d661b3093350ae3e35b065530d6ececc0a96e98d3ffffaf4" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--without-vorbisfile" - - system "make" - system "make", "install" - end - - test do - resource("mystique.s3m").stage do - output = shell_output("#{bin}/openmpt123 --probe mystique.s3m") - assert_match "Success", output - end - end -end diff --git a/Formula/libopennet.rb b/Formula/libopennet.rb deleted file mode 100644 index a0faf1d58bda2..0000000000000 --- a/Formula/libopennet.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Libopennet < Formula - desc "Provides open_net() (similar to open())" - homepage "https://www.rkeene.org/oss/libopennet" - url "https://www.rkeene.org/files/oss/libopennet/libopennet-0.9.9.tar.gz" - sha256 "d1350abe17ac507ffb50d360c5bf8290e97c6843f569a1d740f9c1d369200096" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "0f9b40e9c906fce8df8abc866680bf6fbe60cadc5af24dac309e1d51a0f5e99d" => :catalina - sha256 "4702cca034bb0b60b4555615664cc4aedee95c189f37e23e93013594f1dc9321" => :mojave - sha256 "82232ab7a71481570e3119e119bc93ef29a9d553c11e16fb93f157c66a7dfe8a" => :high_sierra - sha256 "c3447365aeb1a478b14b5a71b6ffd29a1f95754fb460ed6f618b55e2f958c227" => :sierra - sha256 "de1cb9622ec3b6501236af7e66367bc5bbaa20dfb8e3ae328a339bea6d708bab" => :el_capitan - sha256 "abcf105b630a05b8a7d26f1a0ba8defafcf31c0dc23e79c3a5f8a9a14878e6de" => :yosemite - sha256 "cc3c5f62b47b334019035ab1f34f6f9e8b195f3ea37afa820d8b3dbbb4402eae" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make" - system "make", "install" - end -end diff --git a/Formula/liboping.rb b/Formula/liboping.rb deleted file mode 100644 index db415d84124f8..0000000000000 --- a/Formula/liboping.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Liboping < Formula - desc "C library to generate ICMP echo requests" - homepage "https://noping.cc/" - url "https://noping.cc/files/liboping-1.10.0.tar.bz2" - sha256 "eb38aa93f93e8ab282d97e2582fbaea88b3f889a08cbc9dbf20059c3779d5cd8" - license "LGPL-2.1" - - bottle do - sha256 "997e8eb17c7878cbd0c34bd6532b76ef804899751a58b3b434656d1b9ced07d9" => :catalina - sha256 "7b0258598b329b83ce9fd0cf18be77aa027226c8391a013cb3699faeeb1fd71f" => :mojave - sha256 "accffc91ab24ccba1214727abadb59c497f403e3bcad1dfe8ff0377d32e05ebc" => :high_sierra - sha256 "42b80e23afe4fb4f296d039b0bdd4ccd0da21937514fdd04a90bc01d39da7aec" => :sierra - sha256 "de0bb72a0752469b262db3a24a41c84746930858462cd08993c057caadd46264" => :el_capitan - sha256 "c4f46d01bdace450a49e2c4fc4ba4056070bf1b869ed07f1b0a1d6a4f7646bc9" => :yosemite - end - - uses_from_macos "ncurses" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - def caveats - "Run oping and noping sudo'ed in order to avoid the 'Operation not permitted'" - end - - test do - system bin/"oping", "-h" - system bin/"noping", "-h" - end -end diff --git a/Formula/libopusenc.rb b/Formula/libopusenc.rb deleted file mode 100644 index 9a7bf5ded722a..0000000000000 --- a/Formula/libopusenc.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Libopusenc < Formula - desc "Convenience libraray for creating .opus files" - homepage "https://opus-codec.org/" - url "https://archive.mozilla.org/pub/opus/libopusenc-0.2.1.tar.gz" - sha256 "8298db61a8d3d63e41c1a80705baa8ce9ff3f50452ea7ec1c19a564fe106cbb9" - license "BSD-3-Clause" - - bottle do - cellar :any - rebuild 1 - sha256 "593106e48c86436fd1908c79f1ef54f206bb37f0983ccb3901190cebe6e78cea" => :catalina - sha256 "96a05dd8d0071fb38ed14f4f5b64af576baee3719a16fc8fc331ddfa1a4d65ec" => :mojave - sha256 "e5cfb0433abe565b11351f9d6ec3fb44852a8aeb99ef8f6710ee9d899eb97ab3" => :high_sierra - end - - head do - url "https://gitlab.xiph.org/xiph/libopusenc.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "opus" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - #include - int main() { - OggOpusComments *comments = ope_comments_create(); - assert(comments); - ope_comments_add(comments, "ARTIST", "Homebrew"); - ope_comments_add(comments, "TITLE", "Test Track"); - - int error; - OggOpusEnc *enc = ope_encoder_create_file("test.opus", - comments, 48000, 2, 0, &error);; - assert(error == OPE_OK); - assert(enc); - ope_comments_destroy(comments); - - int16_t *buffer = calloc(1920, 2*sizeof(*buffer)); - error = ope_encoder_write(enc, buffer, 1920*2*sizeof(*buffer)); - assert(error == OPE_OK); - - error = ope_encoder_drain(enc); - assert(error == OPE_OK); - ope_encoder_destroy(enc); - - return 0; - } - EOS - system ENV.cc, "test.c", "-o", "test", "-Wall", - "-I#{Formula["opus"].opt_include}/opus", - "-I#{include}/opus", - "-L#{lib}", "-lopusenc" - system "./test" - end -end diff --git a/Formula/liboqs.rb b/Formula/liboqs.rb deleted file mode 100644 index aa73558e4e48c..0000000000000 --- a/Formula/liboqs.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Liboqs < Formula - desc "Library for quantum-safe cryptography" - homepage "https://openquantumsafe.org/" - url "https://github.com/open-quantum-safe/liboqs/archive/0.3.0.tar.gz" - sha256 "b447133039a8fb8df3cc90e22db1453cd67987834d495ac6898ac6a63df7c14b" - - bottle do - cellar :any - sha256 "f08fb2aefced27d1cc26680e50a1f0df0d87182f923135cd57900a5e3fc0beb8" => :catalina - sha256 "6a58d68654065e151ca045a81eb0c1e3e786696a84453b6c75aea4b2d449f66e" => :mojave - sha256 "47d203b377f2702041634aabe030ba786f466afb78b83bbe27a79b3aabcd9d49" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "ninja" => :build - depends_on "openssl@1.1" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-GNinja", "-DBUILD_SHARED_LIBS=ON" - system "ninja" - system "ninja", "install" - end - pkgshare.install "tests" - end - - test do - cp pkgshare/"tests/example_kem.c", "test.c" - system ENV.cc, "-I#{include}", "-L#{lib}", "-loqs", "-o", "test", "test.c" - assert_match "operations completed", shell_output("./test") - end -end diff --git a/Formula/libosinfo.rb b/Formula/libosinfo.rb deleted file mode 100644 index d98cb77a9ec33..0000000000000 --- a/Formula/libosinfo.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Libosinfo < Formula - desc "The Operating System information database" - homepage "https://libosinfo.org/" - url "https://releases.pagure.org/libosinfo/libosinfo-1.8.0.tar.xz" - sha256 "49ff32be0d209f6c99480e28b94340ac3dd0158322ae4303adfbdfe973a108a5" - license "GPL-2.0" - - bottle do - sha256 "4630d49afe37d27ddb3402e9630ba7366c22e461b2da61d394ee883d376d4568" => :catalina - sha256 "c124ac38aae888e7195aedd04817cf9e6477cfe1acec2c8a34a797ce34f2bfaf" => :mojave - sha256 "b230dea9754e476fb87710555bf53e7564b87b51295f7ec92a88a7326a411639" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "check" - depends_on "gettext" - depends_on "glib" - depends_on "libsoup" - depends_on "libxml2" - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Denable-gtk-doc=false", ".." - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - OsinfoPlatformList *list = osinfo_platformlist_new(); - 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}/libosinfo-1.0 - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -losinfo-1.0 - -lglib-2.0 - -lgobject-2.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libosip.rb b/Formula/libosip.rb deleted file mode 100644 index 424ca5596183f..0000000000000 --- a/Formula/libosip.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libosip < Formula - desc "Implementation of the eXosip2 stack" - homepage "https://www.gnu.org/software/osip/" - url "https://ftp.gnu.org/gnu/osip/libosip2-5.1.1.tar.gz" - mirror "https://ftpmirror.gnu.org/osip/libosip2-5.1.1.tar.gz" - sha256 "61bb28317221a630e47f65389d5ff3e4693996d3128e9e0d5d1399e4feebf64d" - - bottle do - cellar :any - sha256 "7738fc68bf18445a8e9c1d3149507b2ac637a84f1094f4d75626552cdbe1d19c" => :catalina - sha256 "1b8267b7239e9f690c214e0a789e0e6781242af462e4115452b19475a52cb57a" => :mojave - sha256 "66e2807a297c1eeb853219def838b72a2eba7a8d95238040c26cc01377c5b5cf" => :high_sierra - 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 - - int main() { - osip_t *osip; - int i = osip_init(&osip); - if (i != 0) - return -1; - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-losip2", "-o", "test" - system "./test" - end -end diff --git a/Formula/libosmium.rb b/Formula/libosmium.rb deleted file mode 100644 index 903fece6184ea..0000000000000 --- a/Formula/libosmium.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Libosmium < Formula - desc "Fast and flexible C++ library for working with OpenStreetMap data" - homepage "https://osmcode.org/libosmium/" - url "https://github.com/osmcode/libosmium/archive/v2.15.6.tar.gz" - sha256 "55879b9da0f3756f3216f9fb857f35afb3b01294b5f18e0d1719334e7d4f5ac9" - license "BSL-1.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "dadd63f6645e8f030f245083218f5a6bfd60bf97a6fa7e8a212010a934fa0b1a" => :catalina - sha256 "dadd63f6645e8f030f245083218f5a6bfd60bf97a6fa7e8a212010a934fa0b1a" => :mojave - sha256 "dadd63f6645e8f030f245083218f5a6bfd60bf97a6fa7e8a212010a934fa0b1a" => :high_sierra - end - - depends_on "boost" => :build - depends_on "cmake" => :build - - uses_from_macos "expat" - - resource "protozero" do - url "https://github.com/mapbox/protozero/archive/v1.7.0.tar.gz" - sha256 "beffbdfab060854fd770178a8db9c028b5b6ee4a059a2fed82c46390a85f3f31" - end - - def install - resource("protozero").stage { libexec.install "include" } - system "cmake", ".", "-DINSTALL_GDALCPP=ON", - "-DINSTALL_UTFCPP=ON", - "-DPROTOZERO_INCLUDE_DIR=#{libexec}/include", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.osm").write <<~EOS - - - - - - - - - - - - - - - EOS - - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - - int main(int argc, char* argv[]) { - osmium::io::File input_file{argv[1]}; - osmium::io::Reader reader{input_file}; - while (osmium::memory::Buffer buffer = reader.read()) {} - reader.close(); - } - EOS - - system ENV.cxx, "-std=c++11", "-stdlib=libc++", "-lexpat", "-o", "libosmium_read", "test.cpp" - system "./libosmium_read", "test.osm" - end -end diff --git a/Formula/libotr.rb b/Formula/libotr.rb deleted file mode 100644 index ab04665fa5a23..0000000000000 --- a/Formula/libotr.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Libotr < Formula - desc "Off-The-Record (OTR) messaging library" - homepage "https://otr.cypherpunks.ca/" - url "https://otr.cypherpunks.ca/libotr-4.1.1.tar.gz" - sha256 "8b3b182424251067a952fb4e6c7b95a21e644fbb27fbd5f8af2b2ed87ca419f5" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "b841026a4752756107affe9f6016da14ea5a9a0a48b33ccd461eced5cd89b64a" => :catalina - sha256 "90da0033157a7771cf7239d038f36e0d613616f1918a168fa763f3e2eafc0106" => :mojave - sha256 "0b340441feba4b325c3ff5c26a9e79b16294461f6f681ae42a2a5d45966e7391" => :high_sierra - sha256 "9f0b214278e4cdf81a1a0c083f1aa45ba64430b449121c4d0596357952dcc93d" => :sierra - sha256 "43d7a166cd12b611e7bf15dfa3865d18e573a81a218e2aeb0061d51203ecde39" => :el_capitan - sha256 "b3f215fd3952f7a97af36500365c3c017f23de107162f4c76b0e48355bd2a358" => :yosemite - sha256 "12338de29acd18bb5d7a90552e33b1a353ae7de3f10ab0316dfd6bda379d919b" => :mavericks - end - - depends_on "libgcrypt" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end -end diff --git a/Formula/libowfat.rb b/Formula/libowfat.rb deleted file mode 100644 index 97f780a3f9c02..0000000000000 --- a/Formula/libowfat.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Libowfat < Formula - desc "Reimplements libdjb" - homepage "https://www.fefe.de/libowfat/" - url "https://www.fefe.de/libowfat/libowfat-0.32.tar.xz" - sha256 "f4b9b3d9922dc25bc93adedf9e9ff8ddbebaf623f14c8e7a5f2301bfef7998c1" - license "GPL-2.0" - head ":pserver:cvs:@cvs.fefe.de:/cvs", :using => :cvs - - bottle do - cellar :any_skip_relocation - sha256 "2424abb2cccd7f41582ea49ccbee60dbecc436c843d9531c0e7c68c35b9330a4" => :catalina - sha256 "08041ad3f0edd4b20e6ed1f6c768414aa7241940a14386c1dffd04caa5ef70ca" => :mojave - sha256 "4740574a0e5184f8b371b1a7571304810b4fb29a92d60cf54979387dab3448c5" => :high_sierra - end - - patch do - url "https://github.com/mistydemeo/libowfat/commit/278a675a6984e5c202eee9f7e36cda2ae5da658d.patch?full_index=1" - sha256 "32eab2348f495f483f7cd34ffd7543bd619f312b7094a4b55be9436af89dd341" - end - - def install - system "make", "libowfat.a" - system "make", "install", "prefix=#{prefix}", "MAN3DIR=#{man3}", "INCLUDEDIR=#{include}/libowfat" - end -end diff --git a/Formula/libp11.rb b/Formula/libp11.rb deleted file mode 100644 index 60eb2db2b6c73..0000000000000 --- a/Formula/libp11.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Libp11 < Formula - desc "PKCS#11 wrapper library in C" - homepage "https://github.com/OpenSC/libp11/wiki" - url "https://github.com/OpenSC/libp11/releases/download/libp11-0.4.10/libp11-0.4.10.tar.gz" - sha256 "639ea43c3341e267214b712e1e5e12397fd2d350899e673dd1220f3c6b8e3db4" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "6b02a04559e7c4559dafde0dd6b44fbb22680c469381a9da1dc8cd3111abf939" => :catalina - sha256 "299c595c75da2c84b3dfd6212658a7366cea9f5a13a279cc018ff824e00aef3e" => :mojave - sha256 "9396b3dafa8e7c8a4e7f85aa2cd2a13a7cc94786cf3f99cf2a4707e2e40b3d2b" => :high_sierra - sha256 "a4cefbde247f06a16d5aa14b7fbc04f1ae67f3b3caa2653d1311681deea2ad55" => :sierra - end - - head do - url "https://github.com/OpenSC/libp11.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pkg-config" => :build - depends_on "libtool" - depends_on "openssl@1.1" - - def install - system "./bootstrap" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-enginesdir=#{lib}/engines-1.1" - system "make", "install" - pkgshare.install "examples/auth.c" - end - - test do - system ENV.cc, "-I#{Formula["openssl@1.1"].include}", "-L#{lib}", - "-L#{Formula["openssl@1.1"].lib}", "-lp11", "-lcrypto", - pkgshare/"auth.c", "-o", "test" - end -end diff --git a/Formula/libpagemaker.rb b/Formula/libpagemaker.rb deleted file mode 100644 index 45691431946fd..0000000000000 --- a/Formula/libpagemaker.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Libpagemaker < Formula - desc "Imports file format of Aldus/Adobe PageMaker documents" - homepage "https://wiki.documentfoundation.org/DLP/Libraries/libpagemaker" - url "https://dev-www.libreoffice.org/src/libpagemaker/libpagemaker-0.0.4.tar.xz" - sha256 "66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d" - license "MPL-2.0" - - bottle do - cellar :any - sha256 "9759e3d26a09e7b99bbf3c49f05bfa7724334b639245f5791d9bada9df977d68" => :catalina - sha256 "05fafc8fea710cc53cd310192364d72b9458114b5404fdff8f6adbff2f9175bf" => :mojave - sha256 "db0f93e5cf4cb6dfe4810b7cb8240db5c2c439a717d09def2f6163e3db6984c6" => :high_sierra - sha256 "0809994f61c8cd34e4edca3496273f293d314e89da5e8ec2a3df280cf436ba37" => :sierra - sha256 "10c23ab2759830f22ff8080cd4da18252fb719445bd651ab4664e785682c100a" => :el_capitan - end - - depends_on "boost" => :build - depends_on "pkg-config" => :build - depends_on "librevenge" - - def install - system "./configure", "--without-docs", - "--disable-dependency-tracking", - "--enable-static=no", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - libpagemaker::PMDocument::isSupported(0); - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", - "-I#{Formula["librevenge"].include}/librevenge-0.0", - "-I#{include}/libpagemaker-0.0", - "-L#{Formula["librevenge"].lib}", - "-L#{lib}", - "-lrevenge-0.0", - "-lpagemaker-0.0" - system "./test" - end -end diff --git a/Formula/libpano.rb b/Formula/libpano.rb deleted file mode 100644 index 6a181d3019c4b..0000000000000 --- a/Formula/libpano.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Libpano < Formula - desc "Build panoramic images from a set of overlapping images" - homepage "https://panotools.sourceforge.io/" - url "https://downloads.sourceforge.net/project/panotools/libpano13/libpano13-2.9.19/libpano13-2.9.19.tar.gz" - version "13-2.9.19" - sha256 "037357383978341dea8f572a5d2a0876c5ab0a83dffda431bd393357e91d95a8" - revision 2 - - bottle do - cellar :any - sha256 "446728639c2cdf06291df1ecd510da3dcb0550163d73560eec6d13b0e3b28351" => :catalina - sha256 "0df8e9b94be82d01f9371286fa934b03ea957fc3d14fea8e2b71e5254c4077b4" => :mojave - sha256 "2f41d44eeb64fce3d6451e4010a90a088f2db1c0bc1fb61d90f869f5eb6dd247" => :high_sierra - sha256 "ee3a892768cab28490d0c5719d503faec655ed274b42d21cd93413c269430bfa" => :sierra - sha256 "cde19367882bcb0f1ef6aa389a56fad271dbe956055b8c3e7cafe9c27a559478" => :el_capitan - sha256 "d78f4a20ee2b3a55e91cb04f9655f719631fe8b3ac9ffed162e88a337a6e3a08" => :yosemite - end - - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end -end diff --git a/Formula/libpcap.rb b/Formula/libpcap.rb deleted file mode 100644 index 1400ee2e8bbbf..0000000000000 --- a/Formula/libpcap.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Libpcap < Formula - desc "Portable library for network traffic capture" - homepage "https://www.tcpdump.org/" - url "https://www.tcpdump.org/release/libpcap-1.9.1.tar.gz" - sha256 "635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094" - head "https://github.com/the-tcpdump-group/libpcap.git" - - bottle do - cellar :any - sha256 "3a85693ff5d241ccdc689af9fa1281434ddf6ae3d0887cd679d07bbc1730ec29" => :catalina - sha256 "57ec7b7a786335d818c7eaca81a834c5ca9f4865a91df78b621d6b5d586cf859" => :mojave - sha256 "26028b66ea5395a0eee75ebd5790e9d3a688e83698631aec328224bb7baa6037" => :high_sierra - end - - keg_only :provided_by_macos - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - - def install - system "./configure", "--prefix=#{prefix}", - "--enable-ipv6", - "--disable-universal" - system "make", "install" - end - - test do - assert_match /lpcap/, shell_output("#{bin}/pcap-config --libs") - end -end diff --git a/Formula/libpcl.rb b/Formula/libpcl.rb deleted file mode 100644 index 37a42146e4d90..0000000000000 --- a/Formula/libpcl.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Libpcl < Formula - desc "C library and API for coroutines" - homepage "http://xmailserver.org/libpcl.html" - url "http://xmailserver.org/pcl-1.12.tar.gz" - sha256 "e7b30546765011575d54ae6b44f9d52f138f5809221270c815d2478273319e1a" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "11984be842d85e685f2e52d4d5155f24123a44e0f1855970c5fed1e8cb2172f5" => :catalina - sha256 "3eb3bf64576a13da02b76cf21bfd37a9889e48d3e7c0df06bd5767c61cc09d06" => :mojave - sha256 "2d7ce1c2a11e762dacf0e28f92a1b1f6b6a45ea4564ac579b4c0683c61ac61f7" => :high_sierra - sha256 "525c0925d7d3234cf5da86a892d15aa4f6d4417f302ed821e2bfd6e7cb06ef43" => :sierra - sha256 "1975baf018352fd1f1ca88bd39fc02db384e2f6be4017976184dda3365c60608" => :el_capitan - sha256 "e9c6f7bc1efab583e44879426a5abb2ff5e7f3eb30261a81a7be723c3280c3a3" => :yosemite - sha256 "8f8e6669f9a552618b5578ad649e0b2a5f0860922e756c79a609b2eb21b5d4b4" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libpeas.rb b/Formula/libpeas.rb deleted file mode 100644 index 295f41efc085a..0000000000000 --- a/Formula/libpeas.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Libpeas < Formula - desc "GObject plugin library" - homepage "https://developer.gnome.org/libpeas/stable/" - url "https://download.gnome.org/sources/libpeas/1.26/libpeas-1.26.0.tar.xz" - sha256 "a976d77e20496479a8e955e6a38fb0e5c5de89cf64d9f44e75c2213ee14f7376" - revision 2 - - bottle do - sha256 "814ed5d3d4c27c2d831c5e2f4cd632283707e9e558d80bc61770a441abd8da0b" => :catalina - sha256 "e31b60a59aa04040766e6220bf732532e843e048fe197a87e82d217e79ac77b7" => :mojave - sha256 "ec9c9f97d99a774219e1cb280592264d90ceee1b4294c602d90df05f6694711b" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "glib" - depends_on "gobject-introspection" - depends_on "gtk+3" - depends_on "pygobject3" - depends_on "python@3.8" - - def install - args = std_meson_args + %w[ - -Dpython3=true - -Dintrospection=true - -Dvapi=true - -Dwidgetry=true - -Ddemos=false - ] - - mkdir "build" do - system "meson", *args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - PeasObjectModule *mod = peas_object_module_new("test", "test", FALSE); - return 0; - } - EOS - gettext = Formula["gettext"] - glib = Formula["glib"] - gobject_introspection = Formula["gobject-introspection"] - libffi = Formula["libffi"] - flags = %W[ - -I#{gettext.opt_include} - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{gobject_introspection.opt_include}/gobject-introspection-1.0 - -I#{include}/libpeas-1.0 - -I#{libffi.opt_lib}/libffi-3.0.13/include - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{gobject_introspection.opt_lib} - -L#{lib} - -lgio-2.0 - -lgirepository-1.0 - -lglib-2.0 - -lgmodule-2.0 - -lgobject-2.0 - -lintl - -lpeas-1.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libpgm.rb b/Formula/libpgm.rb deleted file mode 100644 index 534d408609360..0000000000000 --- a/Formula/libpgm.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Libpgm < Formula - desc "Implements the PGM reliable multicast protocol" - homepage "https://code.google.com/archive/p/openpgm/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/openpgm/libpgm-5.2.122~dfsg.tar.gz" - version "5.2.122" - sha256 "e296f714d7057e3cdb87f4e29b1aecb3b201b9fcb60aa19ed4eec29524f08bd8" - - bottle do - cellar :any - rebuild 1 - sha256 "416f7e3ff857e0c20f20c7c4774403059bbd540d003f0a0a546e122c603f7be6" => :catalina - sha256 "0adcd6a17bbd37e11d0858c9ec7174b51932f33eb19a727c931acf1d719ab292" => :mojave - sha256 "cccc90b754683842714480dc0a099abd303426ab2b47fd9fd8d0172717d9bc17" => :high_sierra - sha256 "e84427aa937687e77701f8b0834866c86e6d4916685c769c4900403307b624c5" => :sierra - sha256 "24765bd6efa0aa65a333e3d5bb5a48159875b81cae8ca99c479fbda4133f49b9" => :el_capitan - sha256 "ae0d1d980f84677fcaa08b1d9f35f1c9d4858e4239598530b7485e9f248def73" => :yosemite - sha256 "87ac77e422ffd9b72d1070c991064d0a8a9b5eb2d124f5cdd9911590b48bd291" => :mavericks - end - - def install - cd "openpgm/pgm" do - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - end -end diff --git a/Formula/libphonenumber.rb b/Formula/libphonenumber.rb deleted file mode 100644 index e8f7d53b60841..0000000000000 --- a/Formula/libphonenumber.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Libphonenumber < Formula - desc "C++ Phone Number library by Google" - homepage "https://github.com/google/libphonenumber" - url "https://github.com/google/libphonenumber/archive/v8.12.7.tar.gz" - sha256 "ff3a6c1cae4abbe59eed3895f35ba444e141a870061fb5172cb350b0bfcbef9d" - - bottle do - cellar :any - sha256 "5d1b906b1b751e1f8519b046f5b368b441f04d4ef3d8aca5ea4ab02b88f0eef5" => :catalina - sha256 "aefcc8df3eaf626e346f2c9ee09c25e4e77c44dae1db2504a08e3badcfd80579" => :mojave - sha256 "086614c8a9a6f767e0e06a9c97d5d51cdda2b891b0a267632e984d720d3f8958" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "icu4c" - depends_on "protobuf" - depends_on "re2" - - resource "gtest" do - url "https://github.com/google/googletest/archive/release-1.10.0.tar.gz" - sha256 "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb" - end - - def install - ENV.cxx11 - (buildpath/"gtest").install resource("gtest") - system "cmake", "cpp", "-DGTEST_SOURCE_DIR=gtest/googletest", - "-DGTEST_INCLUDE_DIR=gtest/googletest/include", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - - using namespace i18n::phonenumbers; - - int main() { - PhoneNumberUtil *phone_util_ = PhoneNumberUtil::GetInstance(); - PhoneNumber test_number; - string formatted_number; - test_number.set_country_code(1); - test_number.set_national_number(6502530000ULL); - phone_util_->Format(test_number, PhoneNumberUtil::E164, &formatted_number); - if (formatted_number == "+16502530000") { - return 0; - } else { - return 1; - } - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lphonenumber", "-o", "test" - system "./test" - end -end diff --git a/Formula/libplctag.rb b/Formula/libplctag.rb deleted file mode 100644 index 97eacfa7eb13b..0000000000000 --- a/Formula/libplctag.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Libplctag < Formula - desc "Portable and simple API for accessing AB PLC data over Ethernet" - homepage "https://github.com/kyle-github/libplctag" - url "https://github.com/kyle-github/libplctag/archive/v2.1.9.tar.gz" - sha256 "39705326f4680bec20c0013858956b5a8dd558a2b4d81725f7849d59a99aeac7" - - bottle do - cellar :any - sha256 "43dc8fbd35e0b53ee09b07063350da4ba5c08329d5fbe53f4088655e9764d0ff" => :catalina - sha256 "72e728b5beae0fc78d5b169bd7f7b5e22a8794f4cde456acaf62ba7b2db052b4" => :mojave - sha256 "dc32cb3cabf58e7d9b1c21b78882fe177c21ef79fc712cf3899dcdcb0ce995cc" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(int argc, char **argv) { - int32_t tag = plc_tag_create("protocol=ab_eip&gateway=192.168.1.42&path=1,0&cpu=LGX&elem_size=4&elem_count=10&name=myDINTArray", 1); - if (!tag) abort(); - plc_tag_destroy(tag); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lplctag", "-o", "test" - system "./test" - end -end diff --git a/Formula/libplist.rb b/Formula/libplist.rb deleted file mode 100644 index 7535a82c70f0c..0000000000000 --- a/Formula/libplist.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Libplist < Formula - desc "Library for Apple Binary- and XML-Property Lists" - homepage "https://www.libimobiledevice.org/" - url "https://github.com/libimobiledevice/libplist/archive/2.2.0.tar.gz" - sha256 "7e654bdd5d8b96f03240227ed09057377f06ebad08e1c37d0cfa2abe6ba0cee2" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "20faf60d286c8ceed790a9b6e34245acf7bafacc7fcbcb390d6b62e194b323e6" => :catalina - sha256 "768453f8710ec1c3e074ad0ebc7723da88c2b8575e5de6962ca6f1d4a85cb61d" => :mojave - sha256 "02291f2f28099a73de8fa37b49962fe575a434be63af356cceff9200c6d73f37" => :high_sierra - end - - head do - url "https://git.sukimashita.com/libplist.git" - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - def install - ENV.deparallelize - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --without-cython - ] - - system "./autogen.sh", *args - system "make" - system "make", "install", "PYTHON_LDFLAGS=-undefined dynamic_lookup" - end - - test do - (testpath/"test.plist").write <<~EOS - - - - - Label - test - ProgramArguments - - /bin/echo - - - - EOS - system bin/"plistutil", "-i", "test.plist", "-o", "test_binary.plist" - assert_predicate testpath/"test_binary.plist", :exist?, - "Failed to create converted plist!" - end -end diff --git a/Formula/libpng.rb b/Formula/libpng.rb deleted file mode 100644 index ba7f276738251..0000000000000 --- a/Formula/libpng.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Libpng < Formula - desc "Library for manipulating PNG images" - homepage "http://www.libpng.org/pub/png/libpng.html" - url "https://downloads.sourceforge.net/libpng/libpng-1.6.37.tar.xz" - mirror "https://sourceforge.mirrorservice.org/l/li/libpng/libpng16/1.6.37/libpng-1.6.37.tar.xz" - sha256 "505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca" - - bottle do - cellar :any - sha256 "c8e74da602c21f978cd7ee3d489979b4fc6681e71f678a1d99012943ee3a909f" => :catalina - sha256 "53bbd14cc27c86c16605e256e7646a1b5656c253abca084958c5d80a2961cb01" => :mojave - sha256 "bbdd94bdd5954bc50c096391486e67265dce5631efb913dcffe4469806a242b6" => :high_sierra - sha256 "e66797079a9a8134f91bd36b58054c6c32f6a9cd161c1bd19f0192319edb80aa" => :sierra - end - - head do - url "https://github.com/glennrp/libpng.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - uses_from_macos "zlib" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "test" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - png_structp png_ptr; - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - png_destroy_write_struct(&png_ptr, (png_infopp)NULL); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lpng", "-o", "test" - system "./test" - end -end diff --git a/Formula/libpointing.rb b/Formula/libpointing.rb deleted file mode 100644 index 6461656a11734..0000000000000 --- a/Formula/libpointing.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Libpointing < Formula - desc "Provides direct access to HID pointing devices" - homepage "https://github.com/INRIA/libpointing" - url "https://github.com/INRIA/libpointing/releases/download/v1.0.8/libpointing-mac-1.0.8.tar.gz" - sha256 "b19a701b9181be05c3879bbfc901709055c27de7995bd59ada4e3f631dfad8f2" - - bottle do - cellar :any - sha256 "d56d66f5df0d6e1c80cc4e4951e8add9cbb0c5fb76080c9107f66665b8b46e48" => :catalina - sha256 "adecdbec3a556dfd78dd1aa24f6868814fc4b3243310311192fee4e9de912c62" => :mojave - sha256 "97e7550c8e3c3007df96cc98eab35a297ed857a6fd1bc24011d1dea8350966e5" => :high_sierra - sha256 "1fc9b4bdab762eb8f93c4a75c57e82b14f3274186f5185fa9a17e8d0f3bc3452" => :sierra - end - - def install - ENV.cxx11 - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - std::cout << LIBPOINTING_VER_STRING << " |" ; - std::list schemes = pointing::TransferFunction::schemes() ; - for (std::list::iterator i=schemes.begin(); i!=schemes.end(); ++i) { - std::cout << " " << (*i) ; - } - std::cout << std::endl ; - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lpointing", "-o", "test" - system "./test" - end -end diff --git a/Formula/libpoker-eval.rb b/Formula/libpoker-eval.rb deleted file mode 100644 index 9934a6ab8456a..0000000000000 --- a/Formula/libpoker-eval.rb +++ /dev/null @@ -1,27 +0,0 @@ -class LibpokerEval < Formula - desc "C library to evaluate poker hands" - homepage "https://pokersource.sourceforge.io/" - # http://download.gna.org/pokersource/sources/poker-eval-138.0.tar.gz is offline - url "https://deb.debian.org/debian/pool/main/p/poker-eval/poker-eval_138.0.orig.tar.gz" - sha256 "92659e4a90f6856ebd768bad942e9894bd70122dab56f3b23dd2c4c61bdbcf68" - license "GPL-3.0" - - bottle do - cellar :any - rebuild 1 - sha256 "803f48db07d845ec9784792ed0fe5cdc86cb67e6632ed9f72dde75619481bf83" => :catalina - sha256 "313ff85dd7ec513a95ee8846c657819fdadbebccf0bdce228f180305ee56a716" => :mojave - sha256 "415934c921d4ccced5426f9aa807b0cf11da031cb2c973e17d506a9f740ac645" => :high_sierra - sha256 "5216cd33d433fd9212ed14d6fffec593c7106226547c1555344604186e7aafc6" => :sierra - sha256 "67b105600a8e29ed2d38421bc27340ff6e9092806f6458f0ddd6a27de0bcfb9c" => :el_capitan - sha256 "b15086546ac1ac0310e3113231bfcc2c9de0d23474be8a1a1b4663e6bc8f713f" => :yosemite - sha256 "9bbfb3886a4e530455dbf53581aecd0df8c86a2f80a444692441449c30f76d92" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-debug", - "--disable-dependency-tracking" - system "make", "install" - end -end diff --git a/Formula/libpq.rb b/Formula/libpq.rb deleted file mode 100644 index de8c3f0b42116..0000000000000 --- a/Formula/libpq.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Libpq < Formula - desc "Postgres C API library" - homepage "https://www.postgresql.org/docs/12/libpq.html" - url "https://ftp.postgresql.org/pub/source/v12.3/postgresql-12.3.tar.bz2" - sha256 "94ed64a6179048190695c86ec707cc25d016056ce10fc9d229267d9a8f1dcf41" - - bottle do - sha256 "2278f4c6e51a0be17b8fe91667c2bda6318c2dabe39c120be1afa374ee68d4a5" => :catalina - sha256 "d8e3e4541a895293cdf7f081747bcac80fe2a85665ca8165b69e8c6e7061acca" => :mojave - sha256 "98289d8fe1c54cd352e0c216607f5097107e96552df6f01d4d5842bd0d3aae28" => :high_sierra - end - - keg_only "conflicts with postgres formula" - - # GSSAPI provided by Kerberos.framework crashes when forked. - # See https://github.com/Homebrew/homebrew-core/issues/47494. - depends_on "krb5" - - depends_on "openssl@1.1" - - on_linux do - depends_on "readline" - end - - def install - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--with-gssapi", - "--with-openssl", - "--libdir=#{opt_lib}", - "--includedir=#{opt_include}" - dirs = %W[ - libdir=#{lib} - includedir=#{include} - pkgincludedir=#{include}/postgresql - includedir_server=#{include}/postgresql/server - includedir_internal=#{include}/postgresql/internal - ] - system "make" - system "make", "-C", "src/bin", "install", *dirs - system "make", "-C", "src/include", "install", *dirs - system "make", "-C", "src/interfaces", "install", *dirs - system "make", "-C", "src/common", "install", *dirs - system "make", "-C", "src/port", "install", *dirs - system "make", "-C", "doc", "install", *dirs - end - - test do - (testpath/"libpq.c").write <<~EOS - #include - #include - #include - - int main() - { - const char *conninfo; - PGconn *conn; - - conninfo = "dbname = postgres"; - - conn = PQconnectdb(conninfo); - - if (PQstatus(conn) != CONNECTION_OK) // This should always fail - { - printf("Connection to database attempted and failed"); - PQfinish(conn); - exit(0); - } - - return 0; - } - EOS - system ENV.cc, "libpq.c", "-L#{lib}", "-I#{include}", "-lpq", "-o", "libpqtest" - assert_equal "Connection to database attempted and failed", shell_output("./libpqtest") - end -end diff --git a/Formula/libpqxx.rb b/Formula/libpqxx.rb deleted file mode 100644 index 28da8df258247..0000000000000 --- a/Formula/libpqxx.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Libpqxx < Formula - desc "C++ connector for PostgreSQL" - homepage "https://pqxx.org/development/libpqxx/" - url "https://github.com/jtv/libpqxx/archive/7.1.2.tar.gz" - sha256 "3af7b4cfd572c67275ad24fea31bcf9d9f365ec16a1b7e90d4bde930936707f3" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "4600e04403f227ce18b789e236dc78faf8fd9ba230c99ba71e1e011bf33d21d8" => :catalina - sha256 "7f99040c5cb0cb12dec832043fc3789b30e323ee3759cea291b8783caa48e43a" => :mojave - sha256 "4016b954fb4052fd8988cfbd569c32ae8700f1c5b3da60eaf576672545f18df2" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "xmlto" => :build - depends_on "libpq" - - def install - ENV.prepend_path "PATH", Formula["python@3.8"].opt_libexec/"bin" - ENV["PG_CONFIG"] = Formula["libpq"].opt_bin/"pg_config" - - system "./configure", "--prefix=#{prefix}", "--enable-shared" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main(int argc, char** argv) { - pqxx::connection con; - return 0; - } - EOS - system ENV.cxx, "-std=c++17", "test.cpp", "-L#{lib}", "-lpqxx", - "-I#{include}", "-o", "test" - # Running ./test will fail because there is no runnning postgresql server - # system "./test" - end -end diff --git a/Formula/libpqxx@6.rb b/Formula/libpqxx@6.rb deleted file mode 100644 index 47b64a4308780..0000000000000 --- a/Formula/libpqxx@6.rb +++ /dev/null @@ -1,45 +0,0 @@ -class LibpqxxAT6 < Formula - desc "C++ connector for PostgreSQL" - homepage "https://pqxx.org/development/libpqxx/" - url "https://github.com/jtv/libpqxx/archive/6.4.7.tar.gz" - sha256 "3fe9f38df1f0f9b72c8fe1b4bc0185cf14b4ed801a9c783189b735404361ce7f" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "a6c097c77ca535f5714cb0fc2096a4ac382f241f9878a8253b37cb8bd3eb5188" => :catalina - sha256 "a983077fe9a2cb76ed3189781724353d08861c27a51ebdd697df25a065aefe95" => :mojave - sha256 "22b2fe737dd2546276ce7bc1679bc3bab7fb0070ef96a60e649af488d5ee7aab" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! - - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "xmlto" => :build - depends_on "libpq" - - def install - ENV.prepend_path "PATH", Formula["python@3.8"].opt_libexec/"bin" - ENV["PG_CONFIG"] = Formula["libpq"].opt_bin/"pg_config" - - system "./configure", "--prefix=#{prefix}", "--enable-shared" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main(int argc, char** argv) { - pqxx::connection con; - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lpqxx", - "-I#{include}", "-o", "test" - # Running ./test will fail because there is no runnning postgresql server - # system "./test" - end -end diff --git a/Formula/libprotoident.rb b/Formula/libprotoident.rb deleted file mode 100644 index a0924e3078652..0000000000000 --- a/Formula/libprotoident.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libprotoident < Formula - desc "Performs application layer protocol identification for flows" - homepage "https://research.wand.net.nz/software/libprotoident.php" - url "https://research.wand.net.nz/software/libprotoident/libprotoident-2.0.13.tar.gz" - sha256 "8ca7ccd95b3f23457c3f9eff480364565b553bbcab9b39969f964910738e5672" - revision 1 - - bottle do - cellar :any - sha256 "f7bdcc25564854f28b3a0c308bcad5d17f71f186c05b8ab356752c9d0d11f31b" => :catalina - sha256 "47e13c727609ab739bb59a74232870ba82ddb2ce8c4e5b145f3e92fc3383edd6" => :mojave - sha256 "2be3c3bcd3b921e264a9bf8ff730d95af2d3a8aee252d849aba1b88d30d49892" => :high_sierra - end - - depends_on "libflowmanager" - depends_on "libtrace" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - - int main() { - lpi_init_library(); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-L#{lib}", "-lprotoident", "-o", "test" - system "./test" - end -end diff --git a/Formula/libproxy.rb b/Formula/libproxy.rb deleted file mode 100644 index 4350820eee57c..0000000000000 --- a/Formula/libproxy.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Libproxy < Formula - desc "Library that provides automatic proxy configuration management" - homepage "https://libproxy.github.io/libproxy/" - url "https://github.com/libproxy/libproxy/archive/0.4.15.tar.gz" - sha256 "18f58b0a0043b6881774187427ead158d310127fc46a1c668ad6d207fb28b4e0" - license "LGPL-2.1" - revision 2 - head "https://github.com/libproxy/libproxy.git" - - bottle do - sha256 "fbb6b461e2abfbd8f3c117c64410827fac0759cefab76cbccd4051f9d5b98d9c" => :catalina - sha256 "74b3f2231eaaaf6ca8cbcb7868b0cb71a62ed4228b1c6fb81ce1b9548819cdb6" => :mojave - sha256 "bf36cc90d464f46a70aca6407df2ea7c7b1b325d29346de3813298016cd0c324" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "python@3.8" - - uses_from_macos "perl" - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - args = std_cmake_args + %W[ - .. - -DPYTHON3_SITEPKG_DIR=#{lib}/python#{xy}/site-packages - -DWITH_PERL=OFF - -DWITH_PYTHON2=OFF - ] - - mkdir "build" do - system "cmake", *args - system "make", "install" - end - end - - test do - assert_equal "direct://", pipe_output("#{bin}/proxy 127.0.0.1").chomp - end -end diff --git a/Formula/libpsl.rb b/Formula/libpsl.rb deleted file mode 100644 index eda515346e74c..0000000000000 --- a/Formula/libpsl.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Libpsl < Formula - desc "C library for the Public Suffix List" - homepage "https://rockdaboot.github.io/libpsl" - url "https://github.com/rockdaboot/libpsl/releases/download/libpsl-0.21.0/libpsl-0.21.0.tar.gz" - sha256 "41bd1c75a375b85c337b59783f5deb93dbb443fb0a52d257f403df7bd653ee12" - license "MIT" - revision 2 - - bottle do - cellar :any - sha256 "a1d53ecac4851b290e62b7753a8a937872bcf039d25acffb40c0b194c669ccbe" => :catalina - sha256 "7969e5a474336273b2476e7a7a064ce871b64454aa069edd5af3b5c8b223c566" => :mojave - sha256 "9f2176b329f68042a5748aa51497607e75aa5fd612933e0c5c9afdf0b75cdb75" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "libidn2" - - def install - ENV.prepend_path "PATH", Formula["python@3.8"].opt_libexec/"bin" - - system "./configure", "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - int main(void) - { - const char *domain = ".eu"; - const char *cookie_domain = ".eu"; - const psl_ctx_t *psl = psl_builtin(); - - assert(psl_is_public_suffix(psl, domain)); - - psl_free(psl); - - return 0; - } - EOS - system ENV.cc, "-o", "test", "test.c", "-I#{include}", - "-L#{lib}", "-lpsl" - system "./test" - system "#{bin}/psl", "--help" - end -end diff --git a/Formula/libpst.rb b/Formula/libpst.rb deleted file mode 100644 index bd620693f620a..0000000000000 --- a/Formula/libpst.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Libpst < Formula - desc "Utilities for the PST file format" - homepage "https://www.five-ten-sg.com/libpst/" - url "https://www.five-ten-sg.com/libpst/packages/libpst-0.6.75.tar.gz" - sha256 "4ca98fed8ba208d902c954d82eaf2bf5e071c609df695ec4eb34af110f719987" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "5c106b4d8bab127e674d0d2c8d69b60431b0eda93ef9c6efcd46f3aeb8aabd11" => :catalina - sha256 "bdd85c6f92d23eb95c0c0211857e2371dfc2853589b6dbaba4a02fdc28974d36" => :mojave - sha256 "77a6520ed29669112fb05cbfcfaccf95ba70522ec2e3f361a176a5570953ae2f" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "gettext" - depends_on "libgsf" - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-python - ] - - system "./configure", *args - system "make" - system "make", "install" - end - - test do - system bin/"lspst", "-V" - end -end diff --git a/Formula/libpulsar.rb b/Formula/libpulsar.rb deleted file mode 100644 index 3b2e204e111af..0000000000000 --- a/Formula/libpulsar.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Libpulsar < Formula - desc "Apache Pulsar C++ library" - homepage "https://pulsar.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=pulsar/pulsar-2.6.0/apache-pulsar-2.6.0-src.tar.gz" - mirror "https://archive.apache.org/dist/pulsar/pulsar-2.6.0/apache-pulsar-2.6.0-src.tar.gz" - sha256 "70013be17c00cbefecb70962c4f0484a8b4421495b9a9a2ded65cbb19716ef94" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "f3999e101d0705cc49f60c15c6e1c3ee11fd4cede6cec74f5d127ab0bccc90c9" => :catalina - sha256 "ce9297c5c3699dd166feac10467880ab467edb9547aa8a79de24178de83e6e2f" => :mojave - sha256 "9a72afdd9564a81c16a0cf09f196ba0651ebd2078bac1b36b0c2b2699117a9ae" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "openssl@1.1" - depends_on "protobuf" - depends_on "snappy" - depends_on "zstd" - - def install - cd "pulsar-client-cpp" do - system "cmake", ".", *std_cmake_args, - "-DBUILD_TESTS=OFF", - "-DBUILD_PYTHON_WRAPPER=OFF", - "-DBoost_INCLUDE_DIRS=#{Formula["boost"].include}", - "-DProtobuf_INCLUDE_DIR=#{Formula["protobuf"].include}", - "-DProtobuf_LIBRARIES=#{Formula["protobuf"].lib}/libprotobuf.dylib" - system "make", "pulsarShared", "pulsarStatic" - system "make", "install" - end - end - - test do - (testpath/"test.cc").write <<~EOS - #include - - int main (int argc, char **argv) { - pulsar::Client client("pulsar://localhost:6650"); - return 0; - } - EOS - system ENV.cxx, "test.cc", "-L#{lib}", "-lpulsar", "-o", "test" - system "./test" - end -end diff --git a/Formula/libpuzzle.rb b/Formula/libpuzzle.rb deleted file mode 100644 index f7c0435ff9092..0000000000000 --- a/Formula/libpuzzle.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Libpuzzle < Formula - desc "Library to find visually similar images" - homepage "https://www.pureftpd.org/project/libpuzzle" - url "https://download.pureftpd.org/pub/pure-ftpd/misc/libpuzzle/releases/libpuzzle-0.11.tar.bz2" - sha256 "ba628268df6956366cbd44ae48c3f1bab41e70b4737041a1f33dac9832c44781" - license "ISC" - - bottle do - cellar :any - rebuild 2 - sha256 "858f964b7cbbde7c37abd6915d64f4a25f9a37e85e1d2ec841e9a2c37b591de9" => :catalina - sha256 "fa41c55ca3bee07a45c5b77c91137dcf9e34852d6bbb9467e3f84a8f233361eb" => :mojave - sha256 "017b32e2b389f87bc7445476d67543dd711cdac34374da0958d70a4682a706a7" => :high_sierra - sha256 "62452be0513886b00ad766fc6c444f69af8a70d89948a65b3fe201c12383f536" => :sierra - sha256 "0768fc24347a5e5e061722175cae535b6e295c28302d98ad3e03dc9f79a32bf0" => :el_capitan - sha256 "d8f7de77378d0fa29e34876ccc8def7f8e60e6564a1c17dae77f4c32ebd8ae5a" => :yosemite - sha256 "ed3d860aa40203a73921fc7f6919828599a28fb39e2d95f0c963ae4eb5c7811b" => :mavericks - end - - depends_on "gd" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - test_image = test_fixtures("test.jpg") - assert_equal "0", - shell_output("#{bin}/puzzle-diff #{test_image} #{test_image}").chomp - end -end diff --git a/Formula/libqalculate.rb b/Formula/libqalculate.rb deleted file mode 100644 index f937bbb786ed6..0000000000000 --- a/Formula/libqalculate.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Libqalculate < Formula - desc "Library for Qalculate! program" - homepage "https://qalculate.github.io/" - url "https://github.com/Qalculate/libqalculate/releases/download/v3.11.0/libqalculate-3.11.0.tar.gz" - sha256 "6992ff25774a15d6a0b09542b1f137dd5dc00995dfe9a765205ec2da39b4e13f" - license "GPL-2.0" - - bottle do - sha256 "843ddd060eecf788a780689921a6c52c1f1f90aa6fcc70ff44eef4dd3ed22633" => :catalina - sha256 "497eb71777218e73ec8f6f35934912967f32e1f5840a1ec333da68f63e439959" => :mojave - sha256 "a5d777a2992d265c4fa7ddeb056b509c8a80cce3b381a4b12f6d04d4925c0df6" => :high_sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gnuplot" - depends_on "mpfr" - depends_on "readline" - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--without-icu", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/qalc", "-nocurrencies", "(2+2)/4 hours to minutes" - end -end diff --git a/Formula/libquantum.rb b/Formula/libquantum.rb deleted file mode 100644 index 23f9172c04373..0000000000000 --- a/Formula/libquantum.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libquantum < Formula - desc "C library for the simulation of quantum mechanics" - homepage "http://www.libquantum.de/" - url "http://www.libquantum.de/files/libquantum-1.1.1.tar.gz" - sha256 "d8e3c4407076558f87640f1e618501ec85bc5f4c5a84db4117ceaec7105046e5" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "0a58575e3f577ad9f8157546913669bac571462dd34d32e54c37e2935b126bed" => :catalina - sha256 "0c7724330a9a2741d5b52521482fb4c4516d5dc7115538f6131894e4d2b31e10" => :mojave - sha256 "1a93bf4fd93f8a68412b622fcf94eddd2fa9a86ada64dd8eb4cca27ccfaa8ce1" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"qtest.c").write <<~EOS - #include - #include - #include - #include - - int main () - { - quantum_reg reg; - int result; - srand(time(0)); - reg = quantum_new_qureg(0, 1); - quantum_hadamard(0, ®); - result = quantum_bmeasure(0, ®); - printf("The Quantum RNG returned %i!\\n", result); - return 0; - } - EOS - system ENV.cc, "-O3", "-o", "qtest", "qtest.c", "-L#{lib}", "-lquantum" - system "./qtest" - end -end diff --git a/Formula/libquicktime.rb b/Formula/libquicktime.rb deleted file mode 100644 index 4e6746daf969f..0000000000000 --- a/Formula/libquicktime.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Libquicktime < Formula - desc "Library for reading and writing quicktime files" - homepage "https://libquicktime.sourceforge.io/" - url "https://downloads.sourceforge.net/project/libquicktime/libquicktime/1.2.4/libquicktime-1.2.4.tar.gz" - sha256 "1c53359c33b31347b4d7b00d3611463fe5e942cae3ec0fefe0d2fd413fd47368" - revision 5 - - bottle do - sha256 "33d7a1146846e30e48e637ddd64f3e7541728df03becf8175e798a8fd3eb3bab" => :catalina - sha256 "56165e3b70f7e444bca93369b3fa4602eefb1aa4b9624ed1ecbaa4741eb7c245" => :mojave - sha256 "df1b207f23b3edc587629a0fd700a446d4f8210e6a7de3bbfd3d5c122cef16f7" => :high_sierra - sha256 "1770ac237a79cb0d9ae918e4bcd6d92bcca6a6695823f7a3fde6dde7d3077acb" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - - # Fix CVE-2016-2399. Applied upstream on March 6th 2017. - # Also, fixes from upstream for CVE-2017-9122 through CVE-2017-9128, applied - # by Debian since 30 Jun 2017. - patch do - url "https://deb.debian.org/debian/pool/main/libq/libquicktime/libquicktime_1.2.4-12.debian.tar.xz" - sha256 "e5b5fa3ec8391b92554d04528568d04ea9eb5145835e0c246eac7961c891a91a" - apply "patches/CVE-2016-2399.patch" - apply "patches/CVE-2017-9122_et_al.patch" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-gpl", - "--without-doxygen", - "--without-gtk", - "--without-x" - system "make" - system "make", "install" - end - - test do - fixture = test_fixtures("test.m4a") - output = shell_output("#{bin}/qtinfo #{fixture} 2>&1") - assert_match "length 1536 samples, compressor mp4a", output - assert_predicate testpath/".libquicktime_codecs", :exist? - end -end diff --git a/Formula/libquvi.rb b/Formula/libquvi.rb deleted file mode 100644 index b1eff436378d1..0000000000000 --- a/Formula/libquvi.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Libquvi < Formula - desc "C library to parse flash media stream properties" - homepage "https://quvi.sourceforge.io/" - url "https://downloads.sourceforge.net/project/quvi/0.4/libquvi/libquvi-0.4.1.tar.bz2" - sha256 "f5a2fb0571634483e8a957910f44e739f5a72eb9a1900bd10b453c49b8d5f49d" - revision 2 - - bottle do - sha256 "6f98f88d5f98ef09c1aee13b24e89be731c79170b3bce5af1617a5309eade725" => :catalina - sha256 "4916926b6bc9b2180ec1cf06bb24bc76eb9d342c748b4e36ddc65ffad1933cbd" => :mojave - sha256 "bb5a4201afd814e87ee496b8cefbcf126f0245d7b3c600039e71e7b355115bf7" => :high_sierra - sha256 "9968d412860717f837082f0e9d225b741d8430a99a3d1c4e12b7a1cdc95cd456" => :sierra - sha256 "d91506a098fa564598b4aecbad97a2fa30728fafd8ad82bf8c4ff4bedb8d6c0a" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "lua@5.1" - - uses_from_macos "curl" - - resource "scripts" do - url "https://downloads.sourceforge.net/project/quvi/0.4/libquvi-scripts/libquvi-scripts-0.4.14.tar.xz" - sha256 "b8d17d53895685031cd271cf23e33b545ad38cad1c3bddcf7784571382674c65" - end - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["lua@5.1"].opt_libexec/"lib/pkgconfig" - - scripts = prefix/"libquvi-scripts" - resource("scripts").stage do - system "./configure", "--prefix=#{scripts}", "--with-nsfw" - system "make", "install" - end - ENV.append_path "PKG_CONFIG_PATH", "#{scripts}/lib/pkgconfig" - - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libraqm.rb b/Formula/libraqm.rb deleted file mode 100644 index 182a1702c7a27..0000000000000 --- a/Formula/libraqm.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Libraqm < Formula - desc "Library for complex text layout" - homepage "https://github.com/HOST-Oman/libraqm" - url "https://github.com/HOST-Oman/libraqm/archive//v0.7.0.tar.gz" - sha256 "21ed67b8d0d2217f3801878f2ceef9b2da24495eeff830552051cef21f95938e" - license "MIT" - - bottle do - cellar :any - rebuild 1 - sha256 "c216caedf4a6709818f70525be9c1bbea6872d35b5ddd7e967de5e06fa48d626" => :catalina - sha256 "637d5a3258bb8928c537479687e82234ab0729650b23e00bcf5215fd3b6377b3" => :mojave - sha256 "a7bf34866571bbcb37fc95c13d985c18494625bb34d08325aa9970c22a330e91" => :high_sierra - 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 "freetype" - depends_on "fribidi" - depends_on "harfbuzz" - - def install - ENV["LIBTOOL"] = Formula["libtool"].bin - ENV["PKG_CONFIG"] = Formula["pkg-config"].bin/"pkg-config" - - # for the docs - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - system "./autogen.sh" - system "./configure", "--prefix=#{prefix}", "--enable-gtk-doc" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() { - return 0; - } - EOS - - system ENV.cc, "test.c", - "-I#{include}", - "-I#{Formula["freetype"].include/"freetype2"}", - "-o", "test" - system "./test" - end -end diff --git a/Formula/librasterlite.rb b/Formula/librasterlite.rb deleted file mode 100644 index 962a1a3d64179..0000000000000 --- a/Formula/librasterlite.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Librasterlite < Formula - desc "Library to store and retrieve huge raster coverages" - homepage "https://www.gaia-gis.it/fossil/librasterlite/index" - url "https://www.gaia-gis.it/gaia-sins/librasterlite-sources/librasterlite-1.1g.tar.gz" - sha256 "0a8dceb75f8dec2b7bd678266e0ffd5210d7c33e3d01b247e9e92fa730eebcb3" - revision 7 - - bottle do - cellar :any - sha256 "566f8ba211d425ca07a06d98f4d6e2ef961eba32293fc83730eb654c3f9a0d2f" => :catalina - sha256 "28508bacd17ad8c11369d11a99bdc7118c41b50de1a0bbb8b3a0c50117b02c2d" => :mojave - sha256 "23792ab784c100ea583bbcd570ba2f093aa591438fa2f660b365bb7d99f0b999" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libgeotiff" - depends_on "libpng" - depends_on "libspatialite" - depends_on "sqlite" - - def install - # Ensure Homebrew SQLite libraries are found before the system SQLite - sqlite = Formula["sqlite"] - ENV.append "LDFLAGS", "-L#{sqlite.opt_lib} -lsqlite3" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libraw.rb b/Formula/libraw.rb deleted file mode 100644 index b0d60dfe511ea..0000000000000 --- a/Formula/libraw.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Libraw < Formula - desc "Library for reading RAW files from digital photo cameras" - homepage "https://www.libraw.org/" - url "https://www.libraw.org/data/LibRaw-0.19.5.tar.gz" - sha256 "40a262d7cc71702711a0faec106118ee004f86c86cc228281d12d16da03e02f5" - - bottle do - cellar :any - sha256 "0a6a6a01ee33d8a8ca2d97eba728958078173b51a3513c1ea4220c448869fb6a" => :catalina - sha256 "7c962099ebd8959acee2921993e26120928604ff6809a1f7a372b95a00d2c130" => :mojave - sha256 "f2e39a3e5811e1798fe84bc3122b9450eed0dfd861e586aaf9a76f13451942dd" => :high_sierra - sha256 "684fb608b113365f690fad65636d45ae2f46469b10930363e45193ea9b4286ed" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "jasper" - depends_on "jpeg" - depends_on "libomp" - depends_on "little-cms2" - - resource "librawtestfile" do - url "https://www.rawsamples.ch/raws/nikon/d1/RAW_NIKON_D1.NEF" - sha256 "7886d8b0e1257897faa7404b98fe1086ee2d95606531b6285aed83a0939b768f" - end - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "ac_cv_prog_c_openmp=-Xpreprocessor -fopenmp", - "ac_cv_prog_cxx_openmp=-Xpreprocessor -fopenmp", - "LDFLAGS=-lomp" - system "make" - system "make", "install" - doc.install Dir["doc/*"] - prefix.install "samples" - end - - test do - resource("librawtestfile").stage do - filename = "RAW_NIKON_D1.NEF" - system "#{bin}/raw-identify", "-u", filename - system "#{bin}/simple_dcraw", "-v", "-T", filename - end - end -end diff --git a/Formula/librcsc.rb b/Formula/librcsc.rb deleted file mode 100644 index 4423f34b7fef0..0000000000000 --- a/Formula/librcsc.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Librcsc < Formula - desc "RoboCup Soccer Simulator library" - homepage "https://osdn.net/projects/rctools/" - # Canonical: https://osdn.net/dl/rctools/librcsc-4.1.0.tar.gz - url "https://dotsrc.dl.osdn.net/osdn/rctools/51941/librcsc-4.1.0.tar.gz" - sha256 "1e8f66927b03fb921c5a2a8c763fb7297a4349c81d1411c450b180178b46f481" - - bottle do - cellar :any - rebuild 1 - sha256 "621b412c1c5c6623fef7b37e179dc75b47169b4a1007384aa2985daee09d6176" => :catalina - sha256 "0eeb0dfb16662da2760d8c753dc23049afdd9a8da0a5ae3eba9c5ac56ed00a41" => :mojave - sha256 "4bd96acb6e78620e25b3b33e745e7770ea812cde22a3d756ac978c778d3b993c" => :high_sierra - sha256 "c8b9dc2887f771f07b33bb70cec9ab62b4cee067f8b3a2d7ae57296428881031" => :sierra - sha256 "c2093c232c857c15bea5dd6c1c6df14aa4b00ed0c6eb3ab7e4d0d3f8c72b54c6" => :el_capitan - sha256 "c339890cbed4a1ca1b0a14d4375ece92ccee44a1f29023e1f633e9a9e0d6b6d5" => :yosemite - sha256 "db8f74fadedc34da92c2109c1bbb90971c494e104c6041f1c8429def7f14dbc9" => :mavericks - end - - depends_on "boost" - - def install - system "./configure", "--disable-debug", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - rcsc::rcg::PlayerT p; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", "-L#{lib}", "-lrcsc_rcg" - system "./test" - end -end diff --git a/Formula/librdkafka.rb b/Formula/librdkafka.rb deleted file mode 100644 index 0dee96d5c9013..0000000000000 --- a/Formula/librdkafka.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Librdkafka < Formula - desc "The Apache Kafka C/C++ library" - homepage "https://github.com/edenhill/librdkafka" - url "https://github.com/edenhill/librdkafka/archive/v1.4.4.tar.gz" - sha256 "0984ffbe17b9e04599fb9eceb16cfa189f525a042bef02474cd1bbfe1ea68416" - head "https://github.com/edenhill/librdkafka.git" - - bottle do - sha256 "5090a19995c88d0ce00d2bced83b33cb6f944cf91d9fd9fa1a8f22dfc470ff29" => :catalina - sha256 "31fcd402659b9f89506c920d9fc9ae2d00141af30d80a42ca7818c6a7109a3da" => :mojave - sha256 "ae1eb1cbe686c2b9913e87c6068db886c06ff6716a36cccfb49b9226337c89d1" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "lz4" - depends_on "lzlib" - depends_on "openssl@1.1" - depends_on "zstd" - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main (int argc, char **argv) - { - int partition = RD_KAFKA_PARTITION_UA; /* random */ - int version = rd_kafka_version(); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lrdkafka", "-lz", "-lpthread", "-o", "test" - system "./test" - end -end diff --git a/Formula/libre.rb b/Formula/libre.rb deleted file mode 100644 index 099281a15d7d0..0000000000000 --- a/Formula/libre.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Libre < Formula - desc "Toolkit library for asynchronous network I/O with protocol stacks" - homepage "http://www.creytiv.com/" - url "http://www.creytiv.com/pub/re-0.6.1.tar.gz" - sha256 "cd5bfc79640411803b200c7531e4ba8a230da3806746d3bd2de970da2060fe43" - - bottle do - cellar :any - sha256 "0ca7e76631b5f30d72b4bc4248e894d00f05cfb785c98856d82cd5cc13e591f9" => :catalina - sha256 "5d43d79ef2406e40c858463189ca8a40f0b13ede8a7090b56ba0fd1ef942dabc" => :mojave - sha256 "32787ca36540a0c7c330560076e25726bcca0f08a7b77014d3837bd9c7ca1840" => :high_sierra - end - - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - system "make", "SYSROOT=#{MacOS.sdk_path}/usr", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - return libre_init(); - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lre" - end -end diff --git a/Formula/libreadline-java.rb b/Formula/libreadline-java.rb deleted file mode 100644 index bf769d803b023..0000000000000 --- a/Formula/libreadline-java.rb +++ /dev/null @@ -1,108 +0,0 @@ -class LibreadlineJava < Formula - desc "Port of GNU readline for Java" - homepage "https://java-readline.sourceforge.io/" - url "https://downloads.sourceforge.net/project/java-readline/java-readline/0.8.0/libreadline-java-0.8.0-src.tar.gz" - sha256 "cdcfd9910bfe2dca4cd08b2462ec05efee7395e9b9c3efcb51e85fa70548c890" - revision 2 - - bottle do - cellar :any - sha256 "5259a709b33cf833a2ceb22fc768b01651e3e55a35efeed7f540190f73beea4d" => :catalina - sha256 "1a254f92d07e11b0a85bccc89a548f6eaff3ada1706056bb1af559a93b7d6665" => :mojave - sha256 "f2fc9a1faf643600da0b9b3b0711ee3b9b3beabcfdb0121d9018b5a98dba8a8d" => :high_sierra - sha256 "784fc9cb94f45ccaf91af932f35d6ac3570326914c4a4da866c9e34e173238a2" => :sierra - end - - depends_on :java => "1.8" - depends_on "readline" - - # Fix "non-void function should return a value"-Error - # https://sourceforge.net/p/java-readline/patches/2/ - patch :DATA - - def install - java_home = ENV["JAVA_HOME"] - - # Reported 4th May 2016: https://sourceforge.net/p/java-readline/bugs/12/ - # JDK 8 doclint for Javadoc complains about minor HTML conformance issues - if `javadoc -X`.include? "doclint" - inreplace "Makefile", - "-version -author org.gnu.readline test", - "-version -author org.gnu.readline -Xdoclint:none test" - end - - # Current Oracle JDKs put the jni.h and jni_md.h in a different place than the - # original Apple/Sun JDK used to. - if File.exist? "#{java_home}/include/jni.h" - ENV["JAVAINCLUDE"] = "#{java_home}/include" - ENV["JAVANATINC"] = "#{java_home}/include/darwin" - elsif File.exist? "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h" - ENV["JAVAINCLUDE"] = "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/" - ENV["JAVANATINC"] = "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/" - end - - # Take care of some hard-coded paths, - # adjust postfix of jni libraries, - # adjust gnu install parameters to bsd install - inreplace "Makefile" do |s| - s.change_make_var! "PREFIX", prefix - s.change_make_var! "JAVALIBDIR", "$(PREFIX)/share/libreadline-java" - s.change_make_var! "JAVAINCLUDE", ENV["JAVAINCLUDE"] - s.change_make_var! "JAVANATINC", ENV["JAVANATINC"] - s.gsub! "*.so", "*.jnilib" - s.gsub! "install -D", "install -c" - end - - # Take care of some hard-coded paths, - # adjust CC variable, - # adjust postfix of jni libraries - inreplace "src/native/Makefile" do |s| - readline = Formula["readline"] - s.change_make_var! "INCLUDES", "-I $(JAVAINCLUDE) -I $(JAVANATINC) -I #{readline.opt_include}" - s.change_make_var! "LIBPATH", "-L#{readline.opt_lib}" - s.change_make_var! "CC", "cc" - s.gsub! "LIB_EXT := so", "LIB_EXT := jnilib" - s.gsub! "$(CC) -shared $(OBJECTS) $(LIBPATH) $($(TG)_LIBS) -o $@", - "$(CC) -install_name #{HOMEBREW_PREFIX}/lib/$(LIB_PRE)$(TG).$(LIB_EXT) " \ - "-dynamiclib $(OBJECTS) $(LIBPATH) $($(TG)_LIBS) -o $@" - end - - pkgshare.mkpath - - system "make", "jar" - system "make", "build-native" - system "make", "install" - - doc.install "api" - end - - def caveats - <<~EOS - You may need to set JAVA_HOME: - export JAVA_HOME="$(/usr/libexec/java_home)" - EOS - end - - # Testing libreadline-java (can we execute and exit libreadline without exceptions?) - test do - assert /Exception/ !~ pipe_output( - "java -Djava.library.path=#{lib} -cp #{pkgshare}/libreadline-java.jar test.ReadlineTest", - "exit", - ) - end -end - -__END__ -diff --git a/src/native/org_gnu_readline_Readline.c b/src/native/org_gnu_readline_Readline.c -index f601c73..b26cafc 100644 ---- a/src/native/org_gnu_readline_Readline.c -+++ b/src/native/org_gnu_readline_Readline.c -@@ -430,7 +430,7 @@ const char *java_completer(char *text, int state) { - jtext = (*jniEnv)->NewStringUTF(jniEnv,text); - - if (jniMethodId == 0) { -- return; -+ return ((const char *)NULL); - } - - completion = (*jniEnv)->CallObjectMethod(jniEnv, jniObject, diff --git a/Formula/librealsense.rb b/Formula/librealsense.rb deleted file mode 100644 index 16b88030a7b70..0000000000000 --- a/Formula/librealsense.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Librealsense < Formula - desc "Intel RealSense D400 series and SR300 capture" - homepage "https://github.com/IntelRealSense/librealsense" - url "https://github.com/IntelRealSense/librealsense/archive/v2.35.2.tar.gz" - sha256 "b49cf41b18c69dd11dc6f7f64d90e497d6816afb234dbedbf4259dc7f1ef1d76" - head "https://github.com/IntelRealSense/librealsense.git" - - bottle do - cellar :any - sha256 "50991510a4eb7078bea1eff9e385daa155599d6f61e9957cadce667c3b313626" => :catalina - sha256 "9ad4235f81b91b9db15204bd5f9f4729c1b3c84cb15987134d27a123c9da9d13" => :mojave - sha256 "4e68c85ee2ffa38b7f50a62e8f6b478c8dac69b9c09112f5e73082e9219fd54d" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "glfw" - depends_on "libusb" - - def install - args = std_cmake_args - args << "-DENABLE_CCACHE=OFF" - - system "cmake", ".", "-DBUILD_WITH_OPENMP=OFF", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() - { - printf(RS2_API_VERSION_STR); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-o", "test" - assert_equal version.to_s, shell_output("./test").strip - end -end diff --git a/Formula/librem.rb b/Formula/librem.rb deleted file mode 100644 index dc22cbc088da1..0000000000000 --- a/Formula/librem.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Librem < Formula - desc "Toolkit library for real-time audio and video processing" - homepage "http://www.creytiv.com/" - url "http://www.creytiv.com/pub/rem-0.6.0.tar.gz" - sha256 "417620da3986461598aef327c782db87ec3dd02c534701e68f4c255e54e5272c" - - bottle do - cellar :any - sha256 "95862b3451f24c02dd50da1b7c5dfe798370431994f0b26f4418f6e68bc461ec" => :catalina - sha256 "0303178e3833e6799d2863835cdd3a6c9e639b2fdcf5b3925bae1fb2690419f1" => :mojave - sha256 "7b2cfbb41f81dd14636626f5d6e325d79cd7a69af540ddf722a7943a934c92ea" => :high_sierra - sha256 "37e4fc160a28de520ac9ee23dafff09e8d6f733d022110782fd8aa2bda7245a4" => :sierra - 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}" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() { - return (NULL != vidfmt_name(VID_FMT_YUV420P)) ? 0 : 1; - } - EOS - system ENV.cc, "test.c", "-L#{opt_lib}", "-lrem", "-o", "test" - system "./test" - end -end diff --git a/Formula/libreplaygain.rb b/Formula/libreplaygain.rb deleted file mode 100644 index ae9726b8bd396..0000000000000 --- a/Formula/libreplaygain.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Libreplaygain < Formula - desc "Library to implement ReplayGain standard for audio" - homepage "https://www.musepack.net/" - url "https://files.musepack.net/source/libreplaygain_r475.tar.gz" - version "r475" - sha256 "8258bf785547ac2cda43bb195e07522f0a3682f55abe97753c974609ec232482" - - bottle do - cellar :any - rebuild 1 - sha256 "34a785ef56c26e506e4e225ace636163dd3b5dd310448a7b63d1ba1c99a2ea77" => :catalina - sha256 "13df0590c2056af8071e5c182bc1b73cfd52b6ad7afb561d16a1ac3ddf0df179" => :mojave - sha256 "c2d3becfcd2f629fb875b6d6c907505489381e5ea3893b0a882510ebbee9951a" => :high_sierra - sha256 "d8f7cfc1bfad75b97271300a16f5c927849b03ff488141423ecf48b25c6ed8c3" => :sierra - sha256 "58b52d360c2f37f3ab3a50c4a2fe72b9a370bd951d52939f8853a5ef49fcc322" => :el_capitan - sha256 "d47338c5b86daabf3e2e05ab9dd2443c04c1233f3319307e8e5d545b24dcf722" => :yosemite - sha256 "dc3f2c3823c5552bddad7b1727b9086dc2fe79e8fa13987b420d1621c97e2bce" => :mavericks - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - include.install "include/replaygain/" - end -end diff --git a/Formula/libresample.rb b/Formula/libresample.rb deleted file mode 100644 index 0746b21405d67..0000000000000 --- a/Formula/libresample.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Libresample < Formula - desc "Audio resampling C library" - homepage "https://ccrma.stanford.edu/~jos/resample/Available_Software.html" - url "https://deb.debian.org/debian/pool/main/libr/libresample/libresample_0.1.3.orig.tar.gz" - sha256 "20222a84e3b4246c36b8a0b74834bb5674026ffdb8b9093a76aaf01560ad4815" - license "LGPL-2.1" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "779b21b26d28a7318e67e0444b74ee5782715b523c1f79ba9bdff41c334cd312" => :catalina - sha256 "7973809674c5ca9dceaf822abaf482c2a8126928140fa056168644b1196005c2" => :mojave - sha256 "42b971ed75ad6ba1bd6879c2b7cb5fb416706ed184291d12983e46ab6c90a20c" => :high_sierra - sha256 "b94dc206fa507bcdceb49534740c5c0dff0868a9d9333e4acd8922f22b10c912" => :sierra - sha256 "ba2446005f2417fa81e5a5963d2273494396f8821ee95fd84ed9825342564598" => :el_capitan - sha256 "2f58f8b45cd7b6f89f645cb90d3b4f63dd0a28e927713f3a4664c348e3a15a21" => :yosemite - sha256 "61a8ab0861ce6e6c45632b7235eaf718e4be191fe8c184ba8f065d436681d786" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - lib.install "libresample.a" - include.install "include/libresample.h" - end -end diff --git a/Formula/libressl.rb b/Formula/libressl.rb deleted file mode 100644 index d68d227c6d500..0000000000000 --- a/Formula/libressl.rb +++ /dev/null @@ -1,91 +0,0 @@ -class Libressl < Formula - desc "Version of the SSL/TLS protocol forked from OpenSSL" - homepage "https://www.libressl.org/" - # Please ensure when updating version the release is from stable branch. - url "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.1.3.tar.gz" - mirror "https://mirrorservice.org/pub/OpenBSD/LibreSSL/libressl-3.1.3.tar.gz" - sha256 "c76b0316acf612ecb62f5cb014a20d972a663bd9e40abf952a86f3b998b69fa0" - - bottle do - sha256 "7574171656070665bb3bda72ceb202753f969754efd538249c351b458c642cb5" => :catalina - sha256 "73f014a32921e7cac5a4369e55a0c9bfd5afaa52b2d802a6d3d635f2d67553e5" => :mojave - sha256 "a303985660e86455f63cecf8733de05896846522db407afc6154788e6bccf40c" => :high_sierra - end - - head do - url "https://github.com/libressl-portable/portable.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - keg_only :provided_by_macos - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-openssldir=#{etc}/libressl - --sysconfdir=#{etc}/libressl - ] - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make" - system "make", "check" - system "make", "install" - 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 - - # LibreSSL install a default pem - We prefer to use macOS for consistency. - rm_f %W[#{etc}/libressl/cert.pem #{etc}/libressl/cert.pem.default] - (etc/"libressl/cert.pem").atomic_write(valid_certs.join("\n")) - 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 - #{etc}/libressl/certs - - and run - #{opt_bin}/openssl certhash #{etc}/libressl/certs - EOS - end - - test do - # Make sure the necessary .cnf file exists, otherwise LibreSSL gets moody. - assert_predicate HOMEBREW_PREFIX/"etc/libressl/openssl.cnf", :exist?, - "LibreSSL requires the .cnf file for some functionality" - - # Check LibreSSL 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/librest.rb b/Formula/librest.rb deleted file mode 100644 index 180ff62dc6eb2..0000000000000 --- a/Formula/librest.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Librest < Formula - desc "Library to access RESTful web services" - homepage "https://wiki.gnome.org/Projects/Librest" - url "https://download.gnome.org/sources/rest/0.8/rest-0.8.1.tar.xz" - sha256 "0513aad38e5d3cedd4ae3c551634e3be1b9baaa79775e53b2dba9456f15b01c9" - revision 2 - - bottle do - sha256 "de32e89cf662978d49a564cf4e5ddfd732bd761e01a448ee6261bbd3e8650e22" => :catalina - sha256 "47fd3f7eeb5c4c540fa9972fce471caaba2fd5006c90ee70b51bc42badd29c67" => :mojave - sha256 "c8b2c713c6dbbcb18f2b41e4efb97341303406860eb72ac606691a1c67b6e275" => :high_sierra - sha256 "26b2a7f163a2adb2cec329f83cd6046a2199c26ca38c191e5c20f813851b7a29" => :sierra - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libsoup" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--without-gnome", - "--without-ca-certificates", - "--enable-introspection=yes" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(int argc, char *argv[]) { - RestProxy *proxy = rest_proxy_new("http://localhost/", FALSE); - - g_object_unref(proxy); - - return EXIT_SUCCESS; - } - EOS - glib = Formula["glib"] - libsoup = Formula["libsoup"] - flags = %W[ - -I#{libsoup.opt_include}/libsoup-2.4 - -I#{glib.opt_include}/glib-2.0 - -I#{glib.opt_lib}/glib-2.0/include - -I#{include}/rest-0.7 - -L#{libsoup.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lrest-0.7 - -lgobject-2.0 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/librevenge.rb b/Formula/librevenge.rb deleted file mode 100644 index 112be06a9ae78..0000000000000 --- a/Formula/librevenge.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Librevenge < Formula - desc "Base library for writing document import filters" - homepage "https://sourceforge.net/p/libwpd/wiki/librevenge/" - url "https://dev-www.libreoffice.org/src/librevenge-0.0.4.tar.bz2" - mirror "https://downloads.sourceforge.net/project/libwpd/librevenge/librevenge-0.0.4/librevenge-0.0.4.tar.bz2" - sha256 "c51601cd08320b75702812c64aae0653409164da7825fd0f451ac2c5dbe77cbf" - - bottle do - cellar :any - sha256 "42b53d00d39a37a0173cf227f8a72915b8ae15c90d527ed87344800f63ba865b" => :catalina - sha256 "8621d9448ed04170c2990e1e002822a5d609310a968701684cb17204f4db643c" => :mojave - sha256 "807378d354736300cb44c4e5105b0fc0bff09a4fe14fcb3a0cae40c7bf167fee" => :high_sierra - sha256 "2f8a2a371c35b578d181d1ce8d45084a2f699bbed95cabd10f5cd75977249542" => :sierra - sha256 "827a37488cc92f16ba8f4d7343e7944c7faed4b8cf9d930f49d93e4104784c94" => :el_capitan - sha256 "a95c4fc2b7832e226d21a209811a2f149b8fde4962d07d354e3a6cb80b7f0a01" => :yosemite - sha256 "45c4df842b9cf38554efeb4d04f2c2abf2ed8341e0fb4bc0d80830e02e1fbfeb" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "boost" - - def install - system "./configure", "--without-docs", - "--disable-dependency-tracking", - "--enable-static=no", - "--disable-werror", - "--disable-tests", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - librevenge::RVNGString str; - return 0; - } - EOS - system ENV.cc, "test.cpp", "-lrevenge-0.0", - "-I#{include}/librevenge-0.0", "-L#{lib}" - end -end diff --git a/Formula/librsvg.rb b/Formula/librsvg.rb deleted file mode 100644 index 94521228153a7..0000000000000 --- a/Formula/librsvg.rb +++ /dev/null @@ -1,100 +0,0 @@ -class Librsvg < Formula - desc "Library to render SVG files using Cairo" - homepage "https://wiki.gnome.org/Projects/LibRsvg" - url "https://download.gnome.org/sources/librsvg/2.48/librsvg-2.48.8.tar.xz" - sha256 "f480a325bbdf26d1874eb6fb330ebc5920ba64e3e08de61931bb4506dfef2692" - - bottle do - sha256 "cca0be741d91cb6dc402ef77cffa673787df7e2304ec3f78bf7a1af9cecb54f3" => :catalina - sha256 "9c8662f8b3b9ac49c3bb16f6677b204d8758440622ecece7c180a1e118c464de" => :mojave - sha256 "76da5967635d2036124733b11496af9bb6b66a898a35897b5ad37c6f978c2ac3" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "cairo" - depends_on "gdk-pixbuf" - depends_on "glib" - depends_on "pango" - - def install - # https://gitlab.gnome.org/GNOME/librsvg/issues/545#note_753842 - ENV.append "LDFLAGS", "-lobjc" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --disable-Bsymbolic - --enable-tools=yes - --enable-pixbuf-loader=yes - --enable-introspection=yes - ] - - system "./configure", *args - - # disable updating gdk-pixbuf cache, we will do this manually in post_install - # https://github.com/Homebrew/homebrew/issues/40833 - inreplace "gdk-pixbuf-loader/Makefile", - "$(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(gdk_pixbuf_cache_file) ;", - "" - - system "make", "install", - "gdk_pixbuf_binarydir=#{lib}/gdk-pixbuf-2.0/2.10.0/loaders", - "gdk_pixbuf_moduledir=#{lib}/gdk-pixbuf-2.0/2.10.0/loaders" - end - - def post_install - # librsvg is not aware GDK_PIXBUF_MODULEDIR must be set - # set GDK_PIXBUF_MODULEDIR and update loader cache - ENV["GDK_PIXBUF_MODULEDIR"] = "#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders" - system "#{Formula["gdk-pixbuf"].opt_bin}/gdk-pixbuf-query-loaders", "--update-cache" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - RsvgHandle *handle = rsvg_handle_new(); - return 0; - } - EOS - cairo = Formula["cairo"] - fontconfig = Formula["fontconfig"] - freetype = Formula["freetype"] - gdk_pixbuf = Formula["gdk-pixbuf"] - 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#{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#{include}/librsvg-2.0 - -I#{libpng.opt_include}/libpng16 - -I#{pixman.opt_include}/pixman-1 - -D_REENTRANT - -L#{cairo.opt_lib} - -L#{gdk_pixbuf.opt_lib} - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lcairo - -lgdk_pixbuf-2.0 - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lintl - -lm - -lrsvg-2 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/librsync.rb b/Formula/librsync.rb deleted file mode 100644 index ef559364dd1e7..0000000000000 --- a/Formula/librsync.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Librsync < Formula - desc "Library that implements the rsync remote-delta algorithm" - homepage "https://librsync.github.io/" - url "https://github.com/librsync/librsync/archive/v2.3.1.tar.gz" - sha256 "dbd7eb643665691bdf4009174461463737b19b4814b789baad62914cabfe4569" - license "LGPL-2.1" - - bottle do - sha256 "eb1526a88a99556f1ae98c7fa008a8c17ddbe2efe2e55de0192ccbccf9840937" => :catalina - sha256 "27f16505bf1b37a9701d70701e708451d47743a3b4d453dcc1d4048065af05af" => :mojave - sha256 "20fd33975022b7caaa12b9906b726f1b9dd9a792d9291170e72298a351650610" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "popt" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - man1.install "doc/rdiff.1" - man3.install "doc/librsync.3" - end - - test do - assert_match version.to_s, shell_output("#{bin}/rdiff -V") - end -end diff --git a/Formula/librtlsdr.rb b/Formula/librtlsdr.rb deleted file mode 100644 index c951b84e37715..0000000000000 --- a/Formula/librtlsdr.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Librtlsdr < Formula - desc "Use Realtek DVB-T dongles as a cheap SDR" - homepage "https://osmocom.org/projects/rtl-sdr/wiki" - url "https://github.com/steve-m/librtlsdr/archive/0.6.0.tar.gz" - sha256 "80a5155f3505bca8f1b808f8414d7dcd7c459b662a1cde84d3a2629a6e72ae55" - license "GPL-2.0" - head "https://git.osmocom.org/rtl-sdr", :using => :git, :shallow => false - - bottle do - cellar :any - sha256 "8d09d3c7765995caed6f1e8fa26087e345d178c630b1ef2057fb8c34cdcddd7d" => :catalina - sha256 "0e9b14804b722d9efc959940e40ebcef7bf716eb636f0bb0dc600770cb005531" => :mojave - sha256 "71f28a8abd8e9e0245a61f841fcebcb7a179d952be786199bf21fae0edd11f6c" => :high_sierra - sha256 "d1b83b24f32d4857205be289f7c632ee3bd77af802e3445d7565bb9ba9e4f3b1" => :sierra - sha256 "f5196572498f20ff0ea38d4e7ceed95aea1199a558f29dd6aac5cec9db65ce33" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "libusb" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include "rtl-sdr.h" - - int main() - { - rtlsdr_get_device_count(); - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "-lrtlsdr", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/libsamplerate.rb b/Formula/libsamplerate.rb deleted file mode 100644 index 1c6407a30cbbd..0000000000000 --- a/Formula/libsamplerate.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libsamplerate < Formula - desc "Library for sample rate conversion of audio data" - homepage "http://www.mega-nerd.com/SRC" - url "http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz" - sha256 "0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1" - revision 1 - - bottle do - cellar :any - sha256 "878cd51b32d4abcd57b10175a2162f5861581b5d2b041616556b3160ea489af9" => :catalina - sha256 "4230f5c4bc95c882164799c28d1e8e0fd58e24649aacd585a8d9fa03e7b54395" => :mojave - sha256 "e8eeb394697f34f294ca67b4ed296fcee986aabc152ffc7d27360f67e30038f5" => :high_sierra - sha256 "5dfce39eab407ae04dbe0704b5f76123da2703260f4fac12c76437bb02415fc1" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "libsndfile" - - # configure adds `/Developer/Headers/FlatCarbon` to the include, but this is - # very deprecated. Correct the use of Carbon.h to the non-flat location. - # See: https://github.com/Homebrew/homebrew/pull/10875 - patch :DATA - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end - -__END__ ---- a/examples/audio_out.c 2011-07-12 16:57:31.000000000 -0700 -+++ b/examples/audio_out.c 2012-03-11 20:48:57.000000000 -0700 -@@ -168,7 +168,7 @@ - - #if (defined (__MACH__) && defined (__APPLE__)) /* MacOSX */ - --#include -+#include - #include - - #define MACOSX_MAGIC MAKE_MAGIC ('M', 'a', 'c', ' ', 'O', 'S', ' ', 'X') diff --git a/Formula/libsass.rb b/Formula/libsass.rb deleted file mode 100644 index 00b0785e00fca..0000000000000 --- a/Formula/libsass.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Libsass < Formula - desc "C implementation of a Sass compiler" - homepage "https://github.com/sass/libsass" - url "https://github.com/sass/libsass.git", - :tag => "3.6.4", - :revision => "8d312a1c91bb7dd22883ebdfc829003f75a82396" - head "https://github.com/sass/libsass.git" - - bottle do - cellar :any - sha256 "a674d8155125a1659499c689b2c3ecc4d37c8196667a93b4463f65dfa77a686c" => :catalina - sha256 "45e5e4f4eb76253127712dcef15df520064db0bd712e3fea9f349fa6ebee79a5" => :mojave - sha256 "85722d303754f2d6d07c4c704cf81c9aa827473f7d6130c66d90da984862c47d" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - ENV.cxx11 - system "autoreconf", "-fvi" - system "./configure", "--prefix=#{prefix}", "--disable-silent-rules", - "--disable-dependency-tracking" - system "make", "install" - end - - test do - # This will need to be updated when devel = stable due to API changes. - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - const char* source_string = "a { color:blue; &:hover { color:red; } }"; - struct Sass_Data_Context* data_ctx = sass_make_data_context(strdup(source_string)); - struct Sass_Options* options = sass_data_context_get_options(data_ctx); - sass_option_set_precision(options, 1); - sass_option_set_source_comments(options, false); - sass_data_context_set_options(data_ctx, options); - sass_compile_data_context(data_ctx); - struct Sass_Context* ctx = sass_data_context_get_context(data_ctx); - int err = sass_context_get_error_status(ctx); - if(err != 0) { - return 1; - } else { - return strcmp(sass_context_get_output_string(ctx), "a {\\n color: blue; }\\n a:hover {\\n color: red; }\\n") != 0; - } - } - EOS - system ENV.cc, "-o", "test", "test.c", "-L#{lib}", "-lsass" - system "./test" - end -end diff --git a/Formula/libsbol.rb b/Formula/libsbol.rb deleted file mode 100644 index 268aae2a8fbc5..0000000000000 --- a/Formula/libsbol.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Libsbol < Formula - desc "Read and write files in the Synthetic Biology Open Language (SBOL)" - homepage "https://synbiodex.github.io/libSBOL" - url "https://github.com/SynBioDex/libSBOL/archive/v2.3.2.tar.gz" - sha256 "c85de13b35dec40c920ff8a848a91c86af6f7c7ee77ed3c750f414bbbbb53924" - license "Apache-2.0" - revision 1 - - bottle do - cellar :any - sha256 "69d13417a5f365bda9b5da5097f0b253fc76a9c237ac733ef7b684db1a3e01d6" => :catalina - sha256 "2d81b55c1e379756aaf37667757273a6581ee98083ac6b87c0d2392020249b19" => :mojave - sha256 "cc6aca556487165bf44a40d159428652cae3b60e04f685281a5662b5ced42d2c" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "jsoncpp" - depends_on "raptor" - - def install - # upstream issue: https://github.com/SynBioDex/libSBOL/issues/215 - inreplace "source/CMakeLists.txt", "measure.h", "measurement.h" - - system "cmake", ".", "-DCMAKE_CXX_FLAGS=-I/System/Library/Frameworks/Python.framework/Headers", - "-DSBOL_BUILD_SHARED=TRUE", - "-DSBOL_BUILD_STATIC=FALSE", - *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "sbol/sbol.h" - - using namespace sbol; - - int main() { - Document& doc = *new Document(); - doc.write("test.xml"); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", "-std=c++11", - "-I/System/Library/Frameworks/Python.framework/Headers", - "-I#{Formula["raptor"].opt_include}/raptor2", - "-I#{include}", "-L#{lib}", - "-L#{Formula["jsoncpp"].opt_lib}", - "-L#{Formula["raptor"].opt_lib}", - "-ljsoncpp", "-lcurl", "-lraptor2", "-lsbol" - system "./test" - end -end diff --git a/Formula/libscrypt.rb b/Formula/libscrypt.rb deleted file mode 100644 index 2f203c0d91996..0000000000000 --- a/Formula/libscrypt.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Libscrypt < Formula - desc "Library for scrypt" - homepage "https://lolware.net/libscrypt.html" - url "https://github.com/technion/libscrypt/archive/v1.21.tar.gz" - sha256 "68e377e79745c10d489b759b970e52d819dbb80dd8ca61f8c975185df3f457d3" - license "BSD-2-Clause" - - bottle do - cellar :any - sha256 "66ea017c5361346903add978ce85b09a2a6f2e8eabdf9fb2cfb58809da1d29cd" => :catalina - sha256 "81c603f27fbda0bde330506d2745f62d3ba16d3290addc5f1eeecbcd110aa801" => :mojave - sha256 "46cf17f2a05e5e418822a306899de14be3fbdfe71fc017f6eb1169fc3ad1de3a" => :high_sierra - sha256 "3adc43863f9b966dcecd89f507a4706891f94129dd88ba810ed0269278e931cf" => :sierra - sha256 "bc2c8318384a72f82802937f7e6dd8017ec44fb6fc94583e5f0c38056e1a660c" => :el_capitan - sha256 "0e870b01dbbfc49432cc8ea81c90ee6d8732b6d8adc4665368844536d5c6e092" => :yosemite - sha256 "fe3bc1ca8b19e7c86e103f1345cb9294da01cc15b950302ad5486ef49b2b212d" => :mavericks - end - - def install - system "make", "install-osx", "PREFIX=#{prefix}", "LDFLAGS=", "CFLAGS_EXTRA=" - system "make", "check", "LDFLAGS=", "CFLAGS_EXTRA=" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) { - char buf[SCRYPT_MCF_LEN]; - libscrypt_hash(buf, "Hello, Homebrew!", SCRYPT_N, SCRYPT_r, SCRYPT_p); - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lscrypt", "-o", "test" - system "./test" - end -end diff --git a/Formula/libsecret.rb b/Formula/libsecret.rb deleted file mode 100644 index eea4d20159df1..0000000000000 --- a/Formula/libsecret.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Libsecret < Formula - desc "Library for storing/retrieving passwords and other secrets" - homepage "https://wiki.gnome.org/Projects/Libsecret" - url "https://download.gnome.org/sources/libsecret/0.20/libsecret-0.20.3.tar.xz" - sha256 "4fcb3c56f8ac4ab9c75b66901fb0104ec7f22aa9a012315a14c0d6dffa5290e4" - license "LGPL-2.1" - - bottle do - sha256 "6b63c9ade94d5428c76332662178a0ea47ea682478cc2a0d189acb5d9480b562" => :catalina - sha256 "cf7e3aee821a63ef75f9ad9d33061d6dbd358b1bb07873d991f4b4e877842fef" => :mojave - sha256 "d88253d0c70ec7cf66c6f7d4f3b2894d0cd68cfd381dbd3087860bdbeddde945" => :high_sierra - end - - depends_on "docbook-xsl" => :build - depends_on "gettext" => :build - depends_on "gobject-introspection" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "glib" - depends_on "libgcrypt" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --enable-introspection - --enable-vala - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - const SecretSchema * example_get_schema (void) G_GNUC_CONST; - - const SecretSchema * - example_get_schema (void) - { - static const SecretSchema the_schema = { - "org.example.Password", SECRET_SCHEMA_NONE, - { - { "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER }, - { "string", SECRET_SCHEMA_ATTRIBUTE_STRING }, - { "even", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN }, - { "NULL", 0 }, - } - }; - return &the_schema; - } - - int main() - { - example_get_schema(); - return 0; - } - EOS - - flags = [ - "-I#{include}/libsecret-1", - "-I#{HOMEBREW_PREFIX}/include/glib-2.0", - "-I#{HOMEBREW_PREFIX}/lib/glib-2.0/include", - ] - - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libserdes.rb b/Formula/libserdes.rb deleted file mode 100644 index 19427e1d15d9f..0000000000000 --- a/Formula/libserdes.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Libserdes < Formula - desc "Schema ser/deserializer lib for Avro + Confluent Schema Registry" - homepage "https://github.com/confluentinc/libserdes" - url "https://github.com/confluentinc/libserdes.git", - :tag => "v5.5.1", - :revision => "b259d15f68dce65591700b0ccccb73311db1de3d" - license "Apache-2.0" - head "https://github.com/confluentinc/libserdes.git" - - bottle do - cellar :any - sha256 "18387cd0d55c022000b92478f68edd90904ad4bf1684862f4eab189dcf90ae48" => :catalina - sha256 "c61903729be4087a5cad61418cc2a557591d0c457dddc8264d5000d8be03884b" => :mojave - sha256 "8b89ec94a1e8c571ddf2a9a71f25029c0f6524ad3aa425c2f65afee0869de250" => :high_sierra - end - - depends_on "avro-c" - depends_on "jansson" - - uses_from_macos "curl" - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - #include - - int main() - { - char errstr[512]; - serdes_conf_t *sconf = serdes_conf_new(NULL, 0, NULL); - serdes_t *serdes = serdes_new(sconf, errstr, sizeof(errstr)); - if (serdes == NULL) { - errx(1, "constructing serdes: %s", errstr); - } - serdes_destroy(serdes); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lserdes", "-o", "test" - system "./test" - end -end diff --git a/Formula/libserialport.rb b/Formula/libserialport.rb deleted file mode 100644 index 141a37d609cec..0000000000000 --- a/Formula/libserialport.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Libserialport < Formula - desc "Cross-platform serial port C library" - homepage "https://sigrok.org/wiki/Libserialport" - url "https://sigrok.org/download/source/libserialport/libserialport-0.1.1.tar.gz" - sha256 "4a2af9d9c3ff488e92fb75b4ba38b35bcf9b8a66df04773eba2a7bbf1fa7529d" - license "LGPL-3.0" - - bottle do - cellar :any - sha256 "e53b9056ea9adb40aa55ec99c3a3dc1bef6cc442c1e83e0ece688b597277cebc" => :catalina - sha256 "abe07f2865be280c550e14a3db11cf5c99e1cd469409379f045b8280831926d6" => :mojave - sha256 "36dd828a2eba76bf82a3cd9c2c9ed9b684753c3a38aea33269f82f699762422b" => :high_sierra - sha256 "e34159ce49ba7c90e2fc0672f99df7b11a6d2de9ceccfc20679918bb87cb9b1e" => :sierra - sha256 "a2e2cb79d5a3774077c7458b0c131e67d345e8e7b2dc29735302d003fec3379e" => :el_capitan - end - - 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 - int main() { - struct sp_port *list_ptr = NULL; - sp_get_port_by_name("some port", &list_ptr); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lserialport", - "-o", "test" - system "./test" - end -end diff --git a/Formula/libshout.rb b/Formula/libshout.rb deleted file mode 100644 index 35296b27d8078..0000000000000 --- a/Formula/libshout.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Libshout < Formula - desc "Data and connectivity library for the icecast server" - homepage "https://icecast.org/" - url "https://downloads.xiph.org/releases/libshout/libshout-2.4.3.tar.gz" - sha256 "0d8af55d1141bf90710bcd41a768c9cc5adb251502a0af1dd22c8da215d40dfe" - - bottle do - cellar :any - sha256 "c0a0c87887e331d2f4b174d956e974bae44d427f282024f6a7b36910da7dbe05" => :catalina - sha256 "14144ef978dbceb4b858ebeb667be83721ba4b3742fd0e0743ab76a9b2f99095" => :mojave - sha256 "f9fef02da35d628c601f24726fa2d748f350692d4bf4c196d28bd08b0f4786eb" => :high_sierra - sha256 "1d246580781a0bf5240363da62a476499a16948935f1b0693d05660ccd5aa9de" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "libogg" - depends_on "libvorbis" - depends_on "speex" - depends_on "theora" - - def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libsigc++.rb b/Formula/libsigc++.rb deleted file mode 100644 index bbe36801fc011..0000000000000 --- a/Formula/libsigc++.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Libsigcxx < Formula - desc "Callback framework for C++" - homepage "https://libsigcplusplus.github.io/libsigcplusplus/" - url "https://download.gnome.org/sources/libsigc++/3.0/libsigc++-3.0.3.tar.xz" - sha256 "e4f4866a894bdbe053e4fb22ccc6bc4b6851fd31a4746fdd20b2cf6e87c6edb6" - license "LGPL-3.0" - - bottle do - cellar :any - sha256 "77bf9858cb60a1842d970bbbc020a5379536806acbc4114afa56d8c941013765" => :catalina - sha256 "7ae9cb9a4d6a645574c6cf5aba8a9cfbbab44349545374f604073393c67f6f50" => :mojave - sha256 "e2c75abf2675c7830fd19aa268472aeee8b5c42cd9355147585bad9be7c3059a" => :high_sierra - end - - depends_on :macos => :high_sierra # needs C++17 - - def install - ENV.cxx11 - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make" - system "make", "check" - system "make", "install" - end - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - - void on_print(const std::string& str) { - std::cout << str; - } - - int main(int argc, char *argv[]) { - sigc::signal signal_print; - - signal_print.connect(sigc::ptr_fun(&on_print)); - - signal_print.emit("hello world\\n"); - return 0; - } - EOS - system ENV.cxx, "-std=c++17", "test.cpp", - "-L#{lib}", "-lsigc-3.0", "-I#{include}/sigc++-3.0", "-I#{lib}/sigc++-3.0/include", "-o", "test" - assert_match "hello world", shell_output("./test") - end -end diff --git a/Formula/libsigc++@2.rb b/Formula/libsigc++@2.rb deleted file mode 100644 index 6c239e29d6706..0000000000000 --- a/Formula/libsigc++@2.rb +++ /dev/null @@ -1,40 +0,0 @@ -class LibsigcxxAT2 < Formula - desc "Callback framework for C++" - homepage "https://libsigcplusplus.github.io/libsigcplusplus/" - url "https://download.gnome.org/sources/libsigc++/2.10/libsigc++-2.10.3.tar.xz" - sha256 "0b68dfc6313c6cc90ac989c6d722a1bf0585ad13846e79746aa87cb265904786" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "bcf678faa58639056292bb201143fe4add755d9f6da6a65f4b7d10cff0ccfe17" => :catalina - sha256 "034cb3a54d796e4b9ec4619a15612fc64fc7e7cbddf189f71bb5342f7b631a3d" => :mojave - sha256 "c8cccc56cfb07d96e339af416c7a2449673c5303f15f99c5f668fc4c5f792695" => :high_sierra - end - - uses_from_macos "m4" => :build - - def install - ENV.cxx11 - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make" - system "make", "check" - system "make", "install" - end - test do - (testpath/"test.cpp").write <<~EOS - #include - - void somefunction(int arg) {} - - int main(int argc, char *argv[]) - { - sigc::slot sl = sigc::ptr_fun(&somefunction); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", - "-L#{lib}", "-lsigc-2.0", "-I#{include}/sigc++-2.0", "-I#{lib}/sigc++-2.0/include", "-o", "test" - system "./test" - end -end diff --git a/Formula/libsignal-protocol-c.rb b/Formula/libsignal-protocol-c.rb deleted file mode 100644 index 97462d930a402..0000000000000 --- a/Formula/libsignal-protocol-c.rb +++ /dev/null @@ -1,102 +0,0 @@ -class LibsignalProtocolC < Formula - desc "Signal Protocol C Library" - homepage "https://github.com/signalapp/libsignal-protocol-c" - url "https://github.com/signalapp/libsignal-protocol-c/archive/v2.3.3.tar.gz" - sha256 "c22e7690546e24d46210ca92dd808f17c3102e1344cd2f9a370136a96d22319d" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "2ad98569b7c0543579c9a2596a78e86bb7a915fb17632850cea099feb9d2d674" => :catalina - sha256 "95991e7aa3ef7fa4fdfb25f8f3ed588103e7343599bb5fd86c190e0a2b62ebf8" => :mojave - sha256 "9dc54604cd42340d8e1ab2da73b54fd19d4cfdb87144921bdb6bcf03e2b41993" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - def install - system "cmake", ".", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - #include - #include - - int main(void) - { - int result = 0; - printf("Beginning of test...\\n"); - printf("0\\n"); - - signal_context *global_context = NULL; - result = signal_context_create(&global_context, NULL); - if (result != SG_SUCCESS) return 1; - printf("1\\n"); - - signal_protocol_store_context *store_context = NULL; - result = signal_protocol_store_context_create(&store_context, global_context); - if (result != SG_SUCCESS) return 1; - printf("2\\n"); - - signal_protocol_session_store session_store = { - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL - }; - result = signal_protocol_store_context_set_session_store(store_context, &session_store); - if (result != SG_SUCCESS) return 1; - printf("3\\n"); - - signal_protocol_pre_key_store pre_key_store = { - NULL, NULL, NULL, NULL, NULL, NULL - }; - result = signal_protocol_store_context_set_pre_key_store(store_context, &pre_key_store); - if (result != SG_SUCCESS) return 1; - printf("4\\n"); - - signal_protocol_signed_pre_key_store signed_pre_key_store = { - NULL, NULL, NULL, NULL, NULL, NULL - }; - result = signal_protocol_store_context_set_signed_pre_key_store(store_context, &signed_pre_key_store); - if (result != SG_SUCCESS) return 1; - printf("5\\n"); - - signal_protocol_identity_key_store identity_key_store = { - NULL, NULL, NULL, NULL, NULL, NULL - }; - result = signal_protocol_store_context_set_identity_key_store(store_context, &identity_key_store); - if (result != SG_SUCCESS) return 1; - printf("6\\n"); - - signal_protocol_address address = { - "+14159998888", 12, 1 - }; - session_builder *builder = NULL; - result = session_builder_create(&builder, store_context, &address, global_context); - if (result != SG_SUCCESS) return 1; - printf("7\\n"); - - session_cipher *cipher = NULL; - result = session_cipher_create(&cipher, store_context, &address, global_context); - if (result != SG_SUCCESS) return 1; - printf("8\\n"); - - session_cipher_free(cipher); - session_builder_free(builder); - signal_protocol_store_context_destroy(store_context); - printf("9\\n"); - - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}/signal", - "-L#{lib}", "-lsignal-protocol-c", - "-o", "test" - system "./test" - end -end diff --git a/Formula/libsigsegv.rb b/Formula/libsigsegv.rb deleted file mode 100644 index 8cde47f612586..0000000000000 --- a/Formula/libsigsegv.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Libsigsegv < Formula - desc "Library for handling page faults in user mode" - homepage "https://www.gnu.org/software/libsigsegv/" - url "https://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.12.tar.gz" - mirror "https://ftpmirror.gnu.org/libsigsegv/libsigsegv-2.12.tar.gz" - sha256 "3ae1af359eebaa4ffc5896a1aee3568c052c99879316a1ab57f8fe1789c390b6" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "aae3e97886b24afb8daf0bafdf9dc02c5fa3d18392611cf68dfd88b663deb87b" => :catalina - sha256 "3b92bc3dfb8000bfac2b9ebdef436acdf0047d1c98b3ed250f0a332d84ba869a" => :mojave - sha256 "5fea960fc3cc9f168749e36e37efbf53f3030d4a3fc2f2602f182d3dcafd5a17" => :high_sierra - sha256 "158f90f84a050e266c23299745b7553321c304649e9f88afcf34d73ef08f95a1" => :sierra - sha256 "b9808096e671482dffd3c4b7ea330d8fc58027bee92c6a774b953fefc1606eb1" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-shared" - system "make" - system "make", "check" - system "make", "install" - end - - test do - # Sourced from tests/efault1.c in tarball. - (testpath/"test.c").write <<~EOS - #include "sigsegv.h" - - #include - #include - #include - #include - #include - - const char *null_pointer = NULL; - static int - handler (void *fault_address, int serious) - { - abort (); - } - - int - main () - { - if (open (null_pointer, O_RDONLY) != -1 || errno != EFAULT) - { - fprintf (stderr, "EFAULT not detected alone"); - exit (1); - } - - if (sigsegv_install_handler (&handler) < 0) - exit (2); - - if (open (null_pointer, O_RDONLY) != -1 || errno != EFAULT) - { - fprintf (stderr, "EFAULT not detected with handler"); - exit (1); - } - - printf ("Test passed"); - return 0; - } - EOS - - system ENV.cc, "test.c", "-L#{lib}", "-lsigsegv", "-o", "test" - assert_match /Test passed/, shell_output("./test") - end -end diff --git a/Formula/libsixel.rb b/Formula/libsixel.rb deleted file mode 100644 index 47eebea115346..0000000000000 --- a/Formula/libsixel.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Libsixel < Formula - desc "SIXEL encoder/decoder implementation" - homepage "https://github.com/saitoha/sixel" - url "https://github.com/saitoha/libsixel/releases/download/v1.8.6/libsixel-1.8.6.tar.gz" - sha256 "9f6dcaf40d250614ce0121b153949c327c46a958cfd2e47750d8788b7ed28e6a" - - bottle do - cellar :any - sha256 "520fa6d77af3c6cc84fb84b1a5b8797bb6e44396b70ad7654eb3362d2174d0ab" => :catalina - sha256 "716d90122f113bd1c6b2ad7e872a476923981b4c26830c94ca68724437e860b1" => :mojave - sha256 "9e061ce67b22c8ad8760bccc7e954ee46852285bc078087712538e102ce8215c" => :high_sierra - end - - depends_on "jpeg" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--with-jpeg=#{Formula["jpeg"].prefix}", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - fixture = test_fixtures("test.png") - system "#{bin}/img2sixel", fixture - end -end diff --git a/Formula/libslax.rb b/Formula/libslax.rb deleted file mode 100644 index b3fd5d7cbc5c6..0000000000000 --- a/Formula/libslax.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Libslax < Formula - desc "Implementation of the SLAX language (an XSLT alternative)" - homepage "http://www.libslax.org/" - url "https://github.com/Juniper/libslax/releases/download/0.22.1/libslax-0.22.1.tar.gz" - sha256 "4da6fb9886e50d75478d5ecc6868c90dae9d30ba7fc6e6d154fc92e6a48d9a95" - - bottle do - sha256 "8b4506f10c72d75425ad849f17918a6574c349ebdf29ab740ad323811d1a4d02" => :catalina - sha256 "5e024a22f8a47c0a11724d7543cd50141e8246b3669155cd734854ee74ec9d71" => :mojave - sha256 "95e8b6bdc7010103110d8c7a92c33dd8e2e04228e037ca81c3a5cb69ea955ab2" => :high_sierra - end - - head do - url "https://github.com/Juniper/libslax.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "libtool" => :build - depends_on "openssl@1.1" - - conflicts_with "genometools", :because => "both install `bin/gt`" - - def install - # configure remembers "-lcrypto" but not the link path. - ENV.append "LDFLAGS", "-L#{Formula["openssl@1.1"].opt_lib}" - - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra || MacOS.version == :el_capitan - - system "sh", "./bin/setup.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-libedit" - system "make", "install" - end - - test do - (testpath/"hello.slax").write <<~EOS - version 1.0; - - match / { - expr "Hello World!"; - } - EOS - system "#{bin}/slaxproc", "--slax-to-xslt", "hello.slax", "hello.xslt" - assert_predicate testpath/"hello.xslt", :exist? - assert_match "Hello World!", File.read("hello.xslt") - end -end diff --git a/Formula/libsmf.rb b/Formula/libsmf.rb deleted file mode 100644 index 456bc983c944d..0000000000000 --- a/Formula/libsmf.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Libsmf < Formula - desc "C library for handling SMF ('*.mid') files" - homepage "https://sourceforge.net/projects/libsmf/" - url "https://downloads.sourceforge.net/project/libsmf/libsmf/1.3/libsmf-1.3.tar.gz" - sha256 "d3549f15de94ac8905ad365639ac6a2689cb1b51fdfa02d77fa6640001b18099" - revision 1 - - bottle do - cellar :any - sha256 "fa858ef4b6b179d578663bbdb0d5c7490ea75a3921713e577a7f848faa99b601" => :catalina - sha256 "bbe040e330a998499e078129097a07f2c5de9fff9c5f26a638e6f5248badda3b" => :mojave - sha256 "7a4b394b51e89bd781fcce0514b3cc58656da63fa2e317186e47828e2c271320" => :high_sierra - sha256 "45aedd028eb76b2dfbb6fa3ba9b3fc809e7265411d5d7760997a71503ebae41a" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libsmi.rb b/Formula/libsmi.rb deleted file mode 100644 index 0dae202be7fa7..0000000000000 --- a/Formula/libsmi.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Libsmi < Formula - desc "Library to Access SMI MIB Information" - homepage "https://www.ibr.cs.tu-bs.de/projects/libsmi/" - url "https://www.ibr.cs.tu-bs.de/projects/libsmi/download/libsmi-0.5.0.tar.gz" - mirror "https://www.mirrorservice.org/sites/distfiles.macports.org/libsmi/libsmi-0.5.0.tar.gz" - sha256 "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c725754d3" - - bottle do - cellar :any - rebuild 1 - sha256 "1a25b44883bb95940e789ec6395dfa796ec44fd4e0d9ae1ee81a4119fe70ac14" => :catalina - sha256 "507d7f52bd7be5c1cc3170831de43e3ebd5a4312b6eda5d795d7519437016246" => :mojave - sha256 "25a31cf7557ddfc1174a932b904d6c96bda4f3c733caf8258edbdef376e99544" => :high_sierra - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - assert_match /#{version}/, shell_output("#{bin}/smidiff -V") - end -end diff --git a/Formula/libsndfile.rb b/Formula/libsndfile.rb deleted file mode 100644 index 0e61e6efea355..0000000000000 --- a/Formula/libsndfile.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Libsndfile < Formula - desc "C library for files containing sampled sound" - homepage "http://www.mega-nerd.com/libsndfile/" - url "http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz" - sha256 "1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "6399523ef99f5c9ea4adcb8ce4af9406c32673deab4beba7114b32162a9b3c54" => :catalina - sha256 "e7cb1a29d931a1637ec84a5ba6b71d37801dc0bb4eab38051df19755cb048667" => :mojave - sha256 "d06bf0bf936cde67857ac3d3599944d2050ea8dc6237bad8b4c27ef86ac2eb3c" => :high_sierra - sha256 "4e4bde6464cfbefcf7f2a9001af0ea34c6273b466ffa71ac953b2bb41eb619ec" => :sierra - sha256 "49d17fa55815680936b529b7bbb8e5cf180c98722c7f8b45d763bfe2d1f0a5de" => :el_capitan - sha256 "9df59790751d64c7f61682233a733030de9e6406682f3a15e30e708103930038" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "libogg" - depends_on "libvorbis" - - def install - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make", "install" - end - - test do - output = shell_output("#{bin}/sndfile-info #{test_fixtures("test.wav")}") - assert_match "Duration : 00:00:00.064", output - end -end diff --git a/Formula/libsodium.rb b/Formula/libsodium.rb deleted file mode 100644 index e709b92ad54ec..0000000000000 --- a/Formula/libsodium.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Libsodium < Formula - desc "NaCl networking and cryptography library" - homepage "https://libsodium.org/" - url "https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz" - sha256 "6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1" - revision 1 - - bottle do - cellar :any - sha256 "db372521cd0b1861a5b578bee22426f3a1f4f7cb3c382be1f842da4715dc65bd" => :catalina - sha256 "55245bfcf6654b0914d3f7459b99a08c54ef2560587bf583a1c1aff4cfc81f28" => :mojave - sha256 "fc972755eb60f4221d7b32e58fc0f94e99b913fefefc84c4c76dc4bca1c5c445" => :high_sierra - end - - head do - url "https://github.com/jedisct1/libsodium.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-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - assert(sodium_init() != -1); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", - "-lsodium", "-o", "test" - system "./test" - end -end diff --git a/Formula/libsoundio.rb b/Formula/libsoundio.rb deleted file mode 100644 index 222df867ec52c..0000000000000 --- a/Formula/libsoundio.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libsoundio < Formula - desc "Cross-platform audio input and output" - homepage "http://libsound.io/" - url "https://github.com/andrewrk/libsoundio/archive/2.0.0.tar.gz" - sha256 "67a8fc1c9bef2b3704381bfb3fb3ce99e3952bc4fea2817729a7180fddf4a71e" - license "MIT" - - bottle do - cellar :any - sha256 "e7e22b9890d244052a61b62da42affa11750a3f1437d9a9c652f4ddb28f6253b" => :catalina - sha256 "628d236080adb8e63089ce94e4e723c5726128558d09d28d0691669b15ac765c" => :mojave - sha256 "7b24e3aad33f017119899e24c22ab7d94e6b96d87b10a4dc728e615530ee180e" => :high_sierra - sha256 "e0b25e880fb129834acc0e446499051bd1d0f9efecc4a9c32c82a77c9c54a378" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() { - struct SoundIo *soundio = soundio_create(); - - if (!soundio) { return 1; } - if (soundio_connect(soundio)) return 1; - - soundio_flush_events(soundio); - soundio_destroy(soundio); - - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "-lsoundio", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/libsoup.rb b/Formula/libsoup.rb deleted file mode 100644 index b6df2c8c5cf03..0000000000000 --- a/Formula/libsoup.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Libsoup < Formula - desc "HTTP client/server library for GNOME" - homepage "https://wiki.gnome.org/Projects/libsoup" - url "https://download.gnome.org/sources/libsoup/2.70/libsoup-2.70.0.tar.xz" - sha256 "54b020f74aefa438918d8e53cff62e2b1e59efe2de53e06b19a4b07b1f4d5342" - - bottle do - sha256 "9e6e892abfa0a22b50003cee17dd14cae4c342aa526a0fe96c8e55263b94d98a" => :catalina - sha256 "3f2ec087d62e7432327d5992202b8dfd77fe881dd65fbf67a2304ada8b8edefb" => :mojave - sha256 "182f411f04a42407f15cdf11ccfe4b32af9ba05243568bd2b7e01c5ab25d8f5f" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "glib-networking" - depends_on "gnutls" - depends_on "libpsl" - depends_on :macos # Due to Python 2 - depends_on "vala" - - uses_from_macos "krb5" - uses_from_macos "libxml2" - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - # if this test start failing, the problem might very well be in glib-networking instead of libsoup - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char *argv[]) { - SoupMessage *msg = soup_message_new("GET", "https://brew.sh/"); - SoupSession *session = soup_session_new(); - soup_session_send_message(session, msg); // blocks - g_assert_true(SOUP_STATUS_IS_SUCCESSFUL(msg->status_code)); - g_object_unref(msg); - g_object_unref(session); - return 0; - } - EOS - ENV.libxml2 - 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}/libsoup-2.4 - -D_REENTRANT - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{lib} - -lgio-2.0 - -lglib-2.0 - -lgobject-2.0 - -lsoup-2.4 - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libsoxr.rb b/Formula/libsoxr.rb deleted file mode 100644 index 9dba42d09efde..0000000000000 --- a/Formula/libsoxr.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Libsoxr < Formula - desc "High quality, one-dimensional sample-rate conversion library" - homepage "https://sourceforge.net/projects/soxr/" - url "https://downloads.sourceforge.net/project/soxr/soxr-0.1.3-Source.tar.xz" - sha256 "b111c15fdc8c029989330ff559184198c161100a59312f5dc19ddeb9b5a15889" - - bottle do - cellar :any - sha256 "a6c8f1003e47e95e1653d617df2a228935fcea753bb578904687eb211d24d213" => :catalina - sha256 "060d8d9eff5fc5152bdb8e1be67e2dbbdeebc6bfeb1deaf0561f96ba0a2de184" => :mojave - sha256 "10b952f7e1ca5f9c839f87a2920e6739d4e3c262e88b05a3b8a62074de69e5ac" => :high_sierra - sha256 "b469390e789389d10825c86d2ed825e1cb64efd14ecf98870043178846ed38ab" => :sierra - sha256 "473b6f61851824ec47918a423295332f00d2ac802f2da4ef7058c621a4f365b0" => :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 - #include - - int main() - { - char const *version = 0; - version = soxr_version(); - if (version == 0) - { - return 1; - } - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "-lsoxr", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/libspatialite.rb b/Formula/libspatialite.rb deleted file mode 100644 index 56c826b9b3694..0000000000000 --- a/Formula/libspatialite.rb +++ /dev/null @@ -1,79 +0,0 @@ -class Libspatialite < Formula - desc "Adds spatial SQL capabilities to SQLite" - homepage "https://www.gaia-gis.it/fossil/libspatialite/index" - revision 8 - - stable do - url "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.3.0a.tar.gz" - mirror "https://ftp.netbsd.org/pub/pkgsrc/distfiles/libspatialite-4.3.0a.tar.gz" - mirror "https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/libspatialite-4.3.0a.tar.gz" - sha256 "88900030a4762904a7880273f292e5e8ca6b15b7c6c3fb88ffa9e67ee8a5a499" - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/27a0e51936e01829d0a6f3c75a7fbcaf92bb133f/libspatialite/sqlite310.patch" - sha256 "459434f5e6658d6f63d403a7795aa5b198b87fc9f55944c714180e7de662fce2" - end - end - - bottle do - cellar :any - sha256 "e8bd429119857fab4cb51f3ba7b64024b51eb2400873e71fc9d6aad297c109ce" => :catalina - sha256 "8fcc2ccaf861f94c3fb41b1c6435e86f52a7fe70e66d9e02a5acb16d285c4360" => :mojave - sha256 "a77ac13e3758d389ccf42fa62d8a7bb528062c215e2b380b8d3df7211696712f" => :high_sierra - end - - head do - url "https://www.gaia-gis.it/fossil/libspatialite", :using => :fossil - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "freexl" - depends_on "geos" - depends_on "libxml2" - depends_on "proj" - # Needs SQLite > 3.7.3 which rules out system SQLite on Snow Leopard and - # below. Also needs dynamic extension support which rules out system SQLite - # on Lion. Finally, RTree index support is required as well. - depends_on "sqlite" - - def install - system "autoreconf", "-fi" if build.head? - - # New SQLite3 extension won't load via SELECT load_extension("mod_spatialite"); - # unless named mod_spatialite.dylib (should actually be mod_spatialite.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'" - chmod 0755, "configure" - - # Ensure Homebrew's libsqlite is found before the system version. - sqlite = Formula["sqlite"] - ENV.append "LDFLAGS", "-L#{sqlite.opt_lib}" - ENV.append "CFLAGS", "-I#{sqlite.opt_include}" - - # Use Proj 6.0.0 compatibility headers. - # Remove in libspatialite 5.0.0 - ENV.append_to_cflags "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --with-sysroot=#{HOMEBREW_PREFIX} - --enable-geocallbacks - ] - - system "./configure", *args - system "make", "install" - end - - test do - # Verify mod_spatialite extension can be loaded using Homebrew's SQLite - pipe_output("#{Formula["sqlite"].opt_bin}/sqlite3", - "SELECT load_extension('#{opt_lib}/mod_spatialite');") - end -end diff --git a/Formula/libspectre.rb b/Formula/libspectre.rb deleted file mode 100644 index 7c50e7b803ed2..0000000000000 --- a/Formula/libspectre.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Libspectre < Formula - desc "Small library for rendering Postscript documents" - homepage "https://wiki.freedesktop.org/www/Software/libspectre/" - url "https://libspectre.freedesktop.org/releases/libspectre-0.2.9.tar.gz" - sha256 "49ae9c52b5af81b405455c19fe24089d701761da2c45d22164a99576ceedfbed" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "a5ebee9481527fc2e9fb217ac3d017435c77c36beb0d82a1722df463df7bdaaf" => :catalina - sha256 "4d18ccc28ca26864e17d4b6d43828550ca821315d547e71358c043c0a8151705" => :mojave - sha256 "6d9dbf0542d1bd02f056bcad34ae176e3e991fb5cb1babd0854b402fc15779d2" => :high_sierra - end - - depends_on "ghostscript" - - def install - ENV.append "CFLAGS", "-I#{Formula["ghostscript"].opt_include}/ghostscript" - ENV.append "LIBS", "-L#{Formula["ghostscript"].opt_lib}" - 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[]) { - const char *text = spectre_status_to_string(SPECTRE_STATUS_SUCCESS); - return 0; - } - EOS - flags = %W[ - -I#{include} - -L#{lib} - -lspectre - ] - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libspectrum.rb b/Formula/libspectrum.rb deleted file mode 100644 index dae2263c96b31..0000000000000 --- a/Formula/libspectrum.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Libspectrum < Formula - desc "Support library for ZX Spectrum emulator" - homepage "https://fuse-emulator.sourceforge.io/libspectrum.php" - url "https://downloads.sourceforge.net/project/fuse-emulator/libspectrum/1.4.4/libspectrum-1.4.4.tar.gz" - sha256 "fdfb2b2bad17bcfc98c098deaebf2a9811824b08d525172436d5eb134c9780b1" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "25edb4f26816ec6bfb7f1437c9a17fb2621c1bb81b93a48e22960aabf89d3a1d" => :catalina - sha256 "29b40b473d7db763d376b1ac1949db8887b3d0a08016d84370add76524c0c377" => :mojave - sha256 "b4ee40ecf01a16826994e74d31ca1dbc34baeeee0287908f4e1e4a11365f6b4b" => :high_sierra - end - - head do - url "https://svn.code.sf.net/p/fuse-emulator/code/trunk/libspectrum" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "audiofile" - depends_on "glib" - depends_on "libgcrypt" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include "libspectrum.h" - #include - - int main() { - assert(libspectrum_init() == LIBSPECTRUM_ERROR_NONE); - assert(strcmp(libspectrum_version(), "#{version}") == 0); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lspectrum", "-o", "test" - system "./test" - end -end diff --git a/Formula/libspiro.rb b/Formula/libspiro.rb deleted file mode 100644 index 49ab7b1e9cc15..0000000000000 --- a/Formula/libspiro.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Libspiro < Formula - desc "Library to simplify the drawing of curves" - homepage "https://github.com/fontforge/libspiro" - url "https://github.com/fontforge/libspiro/releases/download/20200505/libspiro-dist-20200505.tar.gz" - sha256 "06c69a1e8dcbcabcf009fd96fd90b1a244d0257246e376c2c4d57c4ea4af0e49" - license "GPL-3.0" - version_scheme 1 - - bottle do - cellar :any - sha256 "238761be2cd640f6c3f59f0461ce7f5b73dc71c9613236e180bc55f4231e167b" => :catalina - sha256 "fb1b2e548eddc684a5b615cedabc2c6403e0c87409fdb419369ca40e2b70aa52" => :mojave - sha256 "b7155fe14b9909a06a9044ca2d3275f5b2cbcd9aac23583b3819ba53898ff120" => :high_sierra - end - - head do - url "https://github.com/fontforge/libspiro.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - if build.head? - system "autoreconf", "-i" - system "automake" - end - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - void moveto(bezctx *bc, double x, double y, int open) {} - void lineto(bezctx *bc, double x, double y) {} - void quadto(bezctx *bc, double x1, double y1, double x2, double y2) {} - void curveto(bezctx *bc, double x1, double y1, double x2, double y2, double x3, double t3) {} - void markknot(bezctx *bc, int knot) {} - - int main() { - int done; - bezctx bc = {moveto, lineto, quadto, curveto, markknot}; - spiro_cp path[] = { - {-100, 0, SPIRO_G4}, {0, 100, SPIRO_G4}, - {100, 0, SPIRO_G4}, {0, -100, SPIRO_G4} - }; - - SpiroCPsToBezier1(path, sizeof(path)/sizeof(spiro_cp), 1, &bc, &done); - return done == 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lspiro", "-o", "test" - system "./test" - end -end diff --git a/Formula/libspnav.rb b/Formula/libspnav.rb deleted file mode 100644 index 1a3386bff7376..0000000000000 --- a/Formula/libspnav.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Libspnav < Formula - desc "Client library for connecting to 3Dconnexion's 3D input devices" - homepage "https://spacenav.sourceforge.io/" - url "https://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%200.2.3/libspnav-0.2.3.tar.gz" - sha256 "7ae4d7bb7f6a5dda28b487891e01accc856311440f582299760dace6ee5f1f93" - - bottle do - cellar :any - sha256 "9d7234296b1bdb5c4dd0f1aa5855cca877d2eba7fa83812c34438e7cf401a3cf" => :catalina - sha256 "a428a0b1037ff3dfd5a7ba2463f6ca96717e69be734627d8d7abd079f17fb7d5" => :mojave - sha256 "d61c3082aef6a700ad02d553304add7bb6bb2541236a97cf0a571dcc88f67d16" => :high_sierra - sha256 "55cf0552148451302bb50c04a843d8d3834ca95a38c79bf5270f20ac49f82d41" => :sierra - sha256 "48685db33ebe4acb821b33dbd609f95d03c47bd6c316b08f1bc1110d86271643" => :el_capitan - sha256 "87bf93469bb14eef1a24de81cd521f6a62363a6aa7c04a319f3f18905de039b1" => :yosemite - sha256 "f425659deb611eacb94f2245f0c8f8235aa0169a422874f2aa2c32f8d207b84a" => :mavericks - end - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --disable-x11 - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - - int main() { - bool connected = spnav_open() != -1; - if (connected) spnav_close(); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lspnav", "-o", "test" - system "./test" - end -end diff --git a/Formula/libspng.rb b/Formula/libspng.rb deleted file mode 100644 index dad85b822aa9a..0000000000000 --- a/Formula/libspng.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libspng < Formula - desc "C library for reading and writing PNG format files" - homepage "https://libspng.org/" - url "https://gitlab.com/randy408/libspng/uploads/3d980bac86c51368f40af2f1ac79a057/libspng-0.5.0.tar.xz" - sha256 "220a653802559943ae43fd48f03ba6ff3935a5243766d9ee5ff905240d4399a7" - license "BSD-2-Clause" - - bottle do - cellar :any - sha256 "05d22f51215ebc9b77e5155d7b7d209d50eefaa7b4d287634bd6d09922f05679" => :catalina - sha256 "c01b660f652c77917df28b6b651c00458822c0ccf1b1947be4c6f334bf414944" => :mojave - sha256 "c3da9d3ca4b66eec6a0ed1c5510444653935976d942b678bbeeeff9c3ef522c9" => :high_sierra - sha256 "0ca546539595f727222b1c5e21cd24735d2213f29e3ab3d344f269f2f11a084b" => :sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - pkgshare.install "examples/example.c" - end - - test do - fixture = test_fixtures("test.png") - cp pkgshare/"example.c", testpath/"example.c" - system ENV.cc, "example.c", "-L#{lib}", "-I#{include}", "-lspng", "-o", "example" - output = shell_output("./example #{fixture}") - assert_match "width: 8\nheight: 8\nbit depth: 1\ncolor type: 3 - indexed color\n" \ - "compression method: 0\nfilter method: 0\ninterlace method: 0", output - end -end diff --git a/Formula/libsquish.rb b/Formula/libsquish.rb deleted file mode 100644 index 629ded957dee6..0000000000000 --- a/Formula/libsquish.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libsquish < Formula - desc "Library for compressing images with the DXT standard" - homepage "https://sourceforge.net/projects/libsquish/" - url "https://downloads.sourceforge.net/project/libsquish/libsquish-1.15.tgz" - sha256 "628796eeba608866183a61d080d46967c9dda6723bc0a3ec52324c85d2147269" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "a3f9fc5e20792dd4ced369a1be063a01c873afc399c8c73bb8800db1777ce6fb" => :catalina - sha256 "d3a42b4342fab6548ec4e2467a571631edf0891d1c4c51a6573b14afda5b0972" => :mojave - sha256 "734574ea8d63c2d52f291c1d3c96e18ee7fb6f404b5039245a31625fcb6277df" => :high_sierra - sha256 "ebfa2b4d94a71334548800ceb00803ed1ed1e91226f6892048f376d73ee7ef74" => :sierra - sha256 "4af6195448040889de7ada48fcb6fc6dd945e47f001a04807b70b4f5b3982663" => :el_capitan - sha256 "d887794fa29f03abcd3809db6ea74045d3b8d40d895cf5972d2eda3de86f3ada" => :yosemite - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.cc").write <<~EOS - #include - #include - int main(void) { - printf("%d", GetStorageRequirements(640, 480, squish::kDxt1)); - return 0; - } - EOS - system ENV.cxx, "-o", "test", "test.cc", lib/"libsquish.a" - assert_equal "153600", shell_output("./test") - end -end diff --git a/Formula/libssh.rb b/Formula/libssh.rb deleted file mode 100644 index 793c216234d52..0000000000000 --- a/Formula/libssh.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Libssh < Formula - desc "C library SSHv1/SSHv2 client and server protocols" - homepage "https://www.libssh.org/" - url "https://www.libssh.org/files/0.9/libssh-0.9.4.tar.xz" - sha256 "150897a569852ac05aac831dc417a7ba8e610c86ca2e0154a99c6ade2486226b" - head "https://git.libssh.org/projects/libssh.git" - - bottle do - cellar :any - sha256 "80a7241688554d68ba4dfdcc04a69711ed02dde72f496603565ab9f0c5198df3" => :catalina - sha256 "25fbc3fa80454fb8cc8733d26dd811840020cb301e2515a45866325520905039" => :mojave - sha256 "afc9749026ce1c566415227e36f6e528e90d79e11a650718ed9d3a51bb3027f0" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - mkdir "build" do - system "cmake", "..", "-DWITH_STATIC_LIB=ON", - "-DWITH_SYMBOL_VERSIONING=OFF", - *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() - { - ssh_session my_ssh_session = ssh_new(); - if (my_ssh_session == NULL) - exit(-1); - ssh_free(my_ssh_session); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-lssh", - testpath/"test.c", "-o", testpath/"test" - system "./test" - end -end diff --git a/Formula/libssh2.rb b/Formula/libssh2.rb deleted file mode 100644 index 82be27d7e6dd3..0000000000000 --- a/Formula/libssh2.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Libssh2 < Formula - desc "C library implementing the SSH2 protocol" - homepage "https://libssh2.org/" - url "https://libssh2.org/download/libssh2-1.9.0.tar.gz" - sha256 "d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd" - license "BSD-3-Clause" - revision 1 - - bottle do - cellar :any - sha256 "2c4dcf8149663f9a133deac5bc42ce308d1ced90227cac391ca30b0ab2d381f9" => :catalina - sha256 "327c56ad6a54894e5ef9aa3019d2444d32f1d0fba80925940100e517dd3109c9" => :mojave - sha256 "ee29f44ef6fb59242fc7ee1747f02df2287722af4a45319289c9ee224367ba06" => :high_sierra - sha256 "769fbbdc4e67b8de15c269f66a6efe86c5b0195df56e7e46b44377a572800efa" => :sierra - end - - head do - url "https://github.com/libssh2/libssh2.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - args = %W[ - --prefix=#{prefix} - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --disable-examples-build - --with-openssl - --with-libz - --with-libssl-prefix=#{Formula["openssl@1.1"].opt_prefix} - ] - - system "./buildconf" if build.head? - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(void) - { - libssh2_exit(); - return 0; - } - EOS - - system ENV.cc, "test.c", "-L#{lib}", "-lssh2", "-o", "test" - system "./test" - end -end diff --git a/Formula/libstatgrab.rb b/Formula/libstatgrab.rb deleted file mode 100644 index 94cc6662a1149..0000000000000 --- a/Formula/libstatgrab.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Libstatgrab < Formula - desc "Provides cross-platform access to statistics about the system" - homepage "https://www.i-scream.org/libstatgrab/" - url "https://ftp.i-scream.org/pub/i-scream/libstatgrab/libstatgrab-0.92.tar.gz" - mirror "https://www.mirrorservice.org/pub/i-scream/libstatgrab/libstatgrab-0.92.tar.gz" - sha256 "5bf1906aff9ffc3eeacf32567270f4d819055d8386d98b9c8c05519012d5a196" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "d3a41dfe112e21467ce51134b576e14678f982f1c838b6b624d96ad46edc7c88" => :catalina - sha256 "bb1778c08b1b91cff873016e3a6f314d3a97a55db378e0870354bb64337ea50b" => :mojave - sha256 "d7d932298fe68980389bf5b2c8f1d6ef41a6037630b4951996139c2277fbf6f4" => :high_sierra - sha256 "17efc663227f42859add13c81e0b5fac1f3f3a0418c3d15b83363ea90c0b4a91" => :sierra - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/statgrab" - end -end diff --git a/Formula/libstfl.rb b/Formula/libstfl.rb deleted file mode 100644 index 487230ecd5058..0000000000000 --- a/Formula/libstfl.rb +++ /dev/null @@ -1,79 +0,0 @@ -class Libstfl < Formula - desc "Library implementing a curses-based widget set for terminals" - homepage "http://www.clifford.at/stfl/" - url "http://www.clifford.at/stfl/stfl-0.24.tar.gz" - sha256 "d4a7aa181a475aaf8a8914a8ccb2a7ff28919d4c8c0f8a061e17a0c36869c090" - revision 10 - - bottle do - cellar :any - sha256 "a72700193b9de0b12b5886043e39da52c71f6159c38477d8c63ec552ba42f4e9" => :catalina - sha256 "05dd3bc8aa05eb7f0d236b0f17891f3b8f8eed959c22489c8adab8cd5217ee61" => :mojave - sha256 "be2fa58735e737b334952209f35cb19824c6f7b7b8115727f175537cc28a6b12" => :high_sierra - end - - depends_on "swig" => :build - depends_on "python@3.8" - depends_on "ruby" - - uses_from_macos "perl" - - def install - ENV.prepend_path "PATH", Formula["python@3.8"].opt_libexec/"bin" - - ENV.append "LDLIBS", "-liconv" - ENV.append "LIBS", "-lncurses -liconv -lruby" - - %w[ - stfl.pc.in - perl5/Makefile.PL - ruby/Makefile.snippet - ].each do |f| - inreplace f, "ncursesw", "ncurses" - end - - inreplace "stfl_internals.h", "ncursesw/ncurses.h", "ncurses.h" - - 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 - - xy = "3.8" - python_config = Formula["python@3.8"].opt_libexec/"bin/python-config" - - inreplace "python/Makefile.snippet" do |s| - # Install into the site-packages in the Cellar (so uninstall works) - s.change_make_var! "PYTHON_SITEARCH", lib/"python#{xy}/site-packages" - s.gsub! "lib-dynload/", "" - s.gsub! "ncursesw", "ncurses" - s.gsub! "gcc", "gcc -undefined dynamic_lookup #{`#{python_config} --cflags`.chomp}" - s.gsub! "-lncurses", "-lncurses -liconv" - end - - # Fails race condition of test: - # ImportError: dynamic module does not define init function (init_stfl) - # make: *** [python/_stfl.so] Error 1 - ENV.deparallelize - - system "make" - - inreplace "perl5/Makefile", "Network/Library", libexec/"lib/perl5" - system "make", "install", "prefix=#{prefix}" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - stfl_ipool * pool = stfl_ipool_create("utf-8"); - stfl_ipool_destroy(pool); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lstfl", "-o", "test" - system "./test" - end -end diff --git a/Formula/libstrophe.rb b/Formula/libstrophe.rb deleted file mode 100644 index 5997c411539e2..0000000000000 --- a/Formula/libstrophe.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Libstrophe < Formula - desc "XMPP library for C" - homepage "https://strophe.im/libstrophe/" - url "https://github.com/strophe/libstrophe/archive/0.9.3.tar.gz" - sha256 "8a3b79f62177ed59c01d4d4108357ff20bd933d53b845ee4e350d304c051a4fe" - head "https://github.com/strophe/libstrophe.git" - - bottle do - cellar :any - sha256 "da52155acc06ec67fb84cc51403bdecc76c6431a3d827ef3e30ea138b880b803" => :catalina - sha256 "040195fb364d82bbc32e11bfd37e2dbabae64bc898602064c1a432b7c3869efd" => :mojave - sha256 "149335c1a3224dbcfdb10bf4c5271edcc224c030d667fc9a8012244b4c2f06ed" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "check" - depends_on "openssl@1.1" - - uses_from_macos "expat" - uses_from_macos "libxml2" - - def install - system "./bootstrap.sh" - 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(void) { - xmpp_ctx_t *ctx; - xmpp_log_t *log; - - xmpp_initialize(); - log = xmpp_get_default_logger(XMPP_LEVEL_DEBUG); - assert(log); - - ctx = xmpp_ctx_new(NULL, log); - assert(ctx); - - xmpp_ctx_free(ctx); - xmpp_shutdown(); - return 0; - } - EOS - flags = ["-I#{include}/", "-L#{lib}", "-lstrophe"] - system ENV.cc, "-o", "test", "test.c", *(flags + ENV.cflags.to_s.split) - system "./test" - end -end diff --git a/Formula/libstxxl.rb b/Formula/libstxxl.rb deleted file mode 100644 index 077bd1c3be8bb..0000000000000 --- a/Formula/libstxxl.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Libstxxl < Formula - desc "C++ implementation of STL for extra large data sets" - homepage "https://stxxl.sourceforge.io/" - url "https://downloads.sourceforge.net/project/stxxl/stxxl/1.4.1/stxxl-1.4.1.tar.gz" - sha256 "92789d60cd6eca5c37536235eefae06ad3714781ab5e7eec7794b1c10ace67ac" - - bottle do - cellar :any_skip_relocation - sha256 "d8789eb30edee21c2800e2f93f70a2187a9a62ec193ec4d63ed5788cffdd9c0d" => :catalina - sha256 "be650cf787270080a323cbebf05109bcc72d94ea508b0e7c265c6592b871065a" => :mojave - sha256 "a8b116ba332c5d32055f754db6fb491e3c3fd87b4b4a317213a2e0963d34ddeb" => :high_sierra - sha256 "0f9cb534bcdc8d344dd5da5b8381cca527e515d1a3df2bf5b3785783f7f482d7" => :sierra - sha256 "8753b0c9ec11f1f6195fa52c346b4d6015652931908156dcdb4468cc94103d1c" => :el_capitan - sha256 "fbefd1ceb6f328ef77b9a005f5bc3c93fe23fa68d60b4a5e126a68a6a9d8e17d" => :yosemite - sha256 "5a64626281265368e41f51089271c031ae8782651d65fe012f8a86949e37573b" => :mavericks - end - - depends_on "cmake" => :build - - def install - args = std_cmake_args - %w[-DCMAKE_BUILD_TYPE=None] - args << "-DCMAKE_BUILD_TYPE=Release" - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end -end diff --git a/Formula/libsvg-cairo.rb b/Formula/libsvg-cairo.rb deleted file mode 100644 index 4262804177a5f..0000000000000 --- a/Formula/libsvg-cairo.rb +++ /dev/null @@ -1,28 +0,0 @@ -class LibsvgCairo < Formula - desc "SVG rendering library using Cairo" - homepage "https://cairographics.org/" - url "https://cairographics.org/snapshots/libsvg-cairo-0.1.6.tar.gz" - sha256 "a380be6a78ec2938100ce904363815a94068fca372c666b8cc82aa8711a0215c" - revision 2 - - bottle do - cellar :any - sha256 "91b325120c82295bea226193e0c0e0a26ffc7a4e6dc07c41bc474676c3aa302c" => :catalina - sha256 "573c68cc663ad978709b2f82072070e9d12be173665ef057d61c569bae428ad7" => :mojave - sha256 "85692fcfce287f166fefa4fcc4f78b58c96eee3c94ff403e6ef42403c005c29a" => :high_sierra - sha256 "63cfba79036bfd190a92e6a4c501e2e4c737bf63e6a8df6bdca56885c66ae740" => :sierra - sha256 "9f87cc3a6d7e702aab12b23ad1f720ae592bdfb9112753e27c9cf2203dc21915" => :el_capitan - sha256 "55bd8f9bfede25e71e9731d72ace27ce7724a4cce030a4e4e6969554ee64238d" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "libpng" - depends_on "libsvg" - - def install - system "./configure", "--disable-dependency-tracking", "--disable-debug", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libsvg.rb b/Formula/libsvg.rb deleted file mode 100644 index bfda01d8076e8..0000000000000 --- a/Formula/libsvg.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Libsvg < Formula - desc "Library for SVG files" - homepage "https://cairographics.org/" - url "https://cairographics.org/snapshots/libsvg-0.1.4.tar.gz" - sha256 "4c3bf9292e676a72b12338691be64d0f38cd7f2ea5e8b67fbbf45f1ed404bc8f" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "e0f21af595963a7c99ffa098f593f5d46cf5f78facf1df84ffe97858f29fecbe" => :catalina - sha256 "3984d65fa6524a142ad9094aa095f106ca9c8b6857cdd3f62b913e7e3c8f5b65" => :mojave - sha256 "7cfe0b5417654beb7092afec3389a14a4c67eeaa760eb77c9b28082e40f0b11a" => :high_sierra - sha256 "c9435455e3fb30ce81d467edf1cf4c15c39fb1d061c21738007d6af2565455a7" => :sierra - sha256 "4e7903c15847c2d07a2bdf16d6ddad5a0191ef452cf7733624703fd1b5fd7859" => :el_capitan - sha256 "05c230ab37e4f4a3b854373b5c71b275414f852d1b776a60351c0fd49c31674a" => :yosemite - sha256 "a6de74ce690bcc7dffd353139182dc0d896250cdca652c315356349f7e78729e" => :mavericks - end - - depends_on "pkg-config" => :build - depends_on "jpeg" - depends_on "libpng" - - uses_from_macos "libxml2" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libsvm.rb b/Formula/libsvm.rb deleted file mode 100644 index 3e07796fccb54..0000000000000 --- a/Formula/libsvm.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Libsvm < Formula - desc "Library for support vector machines" - homepage "https://www.csie.ntu.edu.tw/~cjlin/libsvm/" - - # Upstream deletes old downloads, so we need to mirror it ourselves - url "https://www.csie.ntu.edu.tw/~cjlin/libsvm/libsvm-3.24.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/libsvm-3.24.tar.gz" - sha256 "d5881a201a4e6227bf8e2f5de7d6eeaef481c6c2bb9540aeca547737844f8696" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "8dded17ad2e22342ae25d392d5e4d9776572f8b5081e62064e97c027f8c481e6" => :catalina - sha256 "4db9a3e77edfda475ca8bdcad82ce1443ed50df41b28b59d726b1fa81944e2c7" => :mojave - sha256 "5d4ee9cec3a0048ef8abd328022fa3752c3dc2ead9d86d9995b79558700dbbd2" => :high_sierra - end - - def install - system "make", "CFLAGS=#{ENV.cflags}" - system "make", "lib" - bin.install "svm-scale", "svm-train", "svm-predict" - lib.install "libsvm.so.2" => "libsvm.2.dylib" - lib.install_symlink "libsvm.2.dylib" => "libsvm.dylib" - MachO::Tools.change_dylib_id("#{lib}/libsvm.2.dylib", "#{lib}/libsvm.2.dylib") - include.install "svm.h" - end - - test do - (testpath/"train_classification.txt").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_regression.txt").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-train", "-s", "0", "train_classification.txt" - system "#{bin}/svm-train", "-s", "3", "train_regression.txt" - end -end diff --git a/Formula/libswiften.rb b/Formula/libswiften.rb deleted file mode 100644 index 98a2da063dbe8..0000000000000 --- a/Formula/libswiften.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Libswiften < Formula - desc "C++ library for implementing XMPP applications" - homepage "https://swift.im/swiften" - url "https://swift.im/downloads/releases/swift-4.0/swift-4.0.tar.gz" - sha256 "50b7b2069005b1474147110956f66fdde0afb2cbcca3d3cf47de56dc61217319" - revision 4 - - bottle do - cellar :any - sha256 "919e570b27576a942a2dd08c190f188cf8f0deb00950dc0b5956478da38091ed" => :catalina - sha256 "489821c365b23676ac84c6f9ecc2157edaebd6d0025fa75b5f5e972078dead88" => :mojave - sha256 "3ec7dc4286e4651d14188794f22d4d89fa1284b999c7134416abcdd02d880744" => :high_sierra - sha256 "07e2d9467520a4c814e15b5328bec8b989449284161c66e120b036f09eed8d14" => :sierra - end - - depends_on "scons" => :build - depends_on "boost" - depends_on "libidn" - depends_on "lua@5.1" - - # fix build for boost 1.69 - patch do - url "https://swift.im/git/swift/patch/?id=3666cbbe30e4d4e25401a5902ae359bc2c24248b" - sha256 "483ace97ee0d0c17a96f8feb7820611fdb1eca1cbb95777c36ca4fad0fdef7f9" - end - - # fix build for boost 1.69 - patch do - url "https://swift.im/git/swift/patch/?id=a2dc74cd0e4891037b97b6a782de80458675e4f0" - sha256 "28fa8bfdd5b3ec45c00cab8a968ac1528846bbc5a2e3eeeaaaef83785b42bb7f" - end - - def install - boost = Formula["boost"] - libidn = Formula["libidn"] - lua = Formula["lua@5.1"] - - args = %W[ - -j #{ENV.make_jobs} - V=1 - linkflags=-headerpad_max_install_names - optimize=1 debug=0 - allow_warnings=1 - swiften_dll=1 - boost_includedir=#{boost.include} - boost_libdir=#{boost.lib} - libidn_includedir=#{libidn.include} - libidn_libdir=#{libidn.lib} - SWIFTEN_INSTALLDIR=#{prefix} - openssl=no - SLUIFT_INSTALLDIR=#{prefix} - lua_includedir=#{lua.include}/lua-5.1 - lua_libdir=#{lua.lib} - lua_libname=lua.5.1 - #{prefix} - ] - - system "scons", *args - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - using namespace Swift; - int main() - { - SimpleEventLoop eventLoop; - BoostNetworkFactories networkFactories(&eventLoop); - return 0; - } - EOS - cflags = `#{bin}/swiften-config --cflags`.chomp.split(/ /) - ldflags = `#{bin}/swiften-config --libs`.chomp.split(/ /) - system ENV.cxx, "-std=c++11", "test.cpp", *cflags, *ldflags, "-o", "test" - system "./test" - end -end diff --git a/Formula/libswiftnav.rb b/Formula/libswiftnav.rb deleted file mode 100644 index 7a1e88732ecca..0000000000000 --- a/Formula/libswiftnav.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Libswiftnav < Formula - desc "C library implementing GNSS related functions and algorithms" - homepage "https://github.com/swift-nav/libswiftnav-legacy" - url "https://github.com/swift-nav/libswiftnav-legacy/archive/v0.21.tar.gz" - sha256 "087c7264c0d0d735414f8bffbfa52ab44696c500ba14a43262d98d6aa093221f" - - bottle do - cellar :any - rebuild 1 - sha256 "dfffba32c3e0d570170a33fe713b9899a08fbffeeccf14c3cb36138972a3b52a" => :catalina - sha256 "e8ab824fddb8ffcb2aea530d7124c9c7debd4592dce3b0f0e649d4d63bea587b" => :mojave - sha256 "528d7e5e52b8ff8cdcb9be22a884d8e8b49e08f9ef90d0b99362526e7117e9ee" => :high_sierra - sha256 "739033ca99d860134475385ee3fe9180366d36f51d0a08326b2c8bab4a84dbf8" => :sierra - sha256 "9bea031f090e48b33e9fa24b8dc5d0391b64dfdc93613ac6aed23c2643ad6e7b" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - const u8 *test_data = (u8*)"123456789"; - - int main() { - u32 crc; - - crc = crc24q(test_data, 9, 0xB704CE); - if (crc != 0x21CF02) { - printf("libswiftnav CRC quick test failed: CRC of \\"123456789\\" with init value 0xB704CE should be 0x21CF02, not 0x%06X\\n", crc); - exit(1); - } else { - printf("libswiftnav CRC quick test successful, CRC = 0x21CF02\\n"); - exit(0); - } - } - EOS - system ENV.cc, "-L", lib, "-lswiftnav", "-o", "test", "test.c" - system "./test" - end -end diff --git a/Formula/libtar.rb b/Formula/libtar.rb deleted file mode 100644 index f6367ca315c35..0000000000000 --- a/Formula/libtar.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Libtar < Formula - desc "C library for manipulating POSIX tar files" - homepage "https://repo.or.cz/libtar.git" - url "https://repo.or.cz/libtar.git", - :tag => "v1.2.20", - :revision => "0907a9034eaf2a57e8e4a9439f793f3f05d446cd" - - bottle do - cellar :any - rebuild 2 - sha256 "35617f312e3c6fb1e473a5d20a559dcbd1815544bdd99c95419ac7e6e8abf9f6" => :catalina - sha256 "070d9355e6d03dcb64ea33ecf7e3b99972e0b3ca5fc8e60e89616f0a061ee0e5" => :mojave - sha256 "a263cfaa1499f0c82902009964df0a310e7841ddff29409c67ede0a79157c31e" => :high_sierra - sha256 "68bdebde24477a815ea03289878ad57e8a1f719b417bef430bf477c2d760cad7" => :sierra - sha256 "018f1c9897f52b783878db67db39a5933a4863a3f9dedc2af9b6bf13f2161957" => :el_capitan - sha256 "d8d138fb4c1cf8c33aaaf8633cd748e9a423e84f1df886ae1842d4816b1f34a0" => :yosemite - sha256 "b8eb40cc1715243eb0ff85eddd2a5f5546e19ca7278ce30b08bd8e1bd3f0682f" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "--force", "--install" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"homebrew.txt").write "This is a simple example" - system "tar", "-cvf", "test.tar", "homebrew.txt" - rm "homebrew.txt" - refute_predicate testpath/"homebrew.txt", :exist? - assert_predicate testpath/"test.tar", :exist? - - system bin/"libtar", "-x", "test.tar" - assert_predicate testpath/"homebrew.txt", :exist? - end -end diff --git a/Formula/libtasn1.rb b/Formula/libtasn1.rb deleted file mode 100644 index f7df1ee148564..0000000000000 --- a/Formula/libtasn1.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Libtasn1 < Formula - desc "ASN.1 structure parser library" - homepage "https://www.gnu.org/software/libtasn1/" - url "https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.16.0.tar.gz" - mirror "https://ftpmirror.gnu.org/libtasn1/libtasn1-4.16.0.tar.gz" - sha256 "0e0fb0903839117cb6e3b56e68222771bebf22ad7fc2295a0ed7d576e8d4329d" - - bottle do - cellar :any - sha256 "00bd968b6a110c5cb497cf0e3b14800ed5e67a2476d0d544aeb1c0c2c1f3f332" => :catalina - sha256 "3c2e9cdfec0ccec899847a3ab69b88967b6cbc0b3e406fa1938a4ca6f277b674" => :mojave - sha256 "c3cf713b5bb29fcac1381b7242e557b7920cb327c77170a6dd038a477d6021cd" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking", - "--disable-silent-rules" - system "make", "install" - end - - test do - (testpath/"pkix.asn").write <<~EOS - PKIX1 { } - DEFINITIONS IMPLICIT TAGS ::= - BEGIN - Dss-Sig-Value ::= SEQUENCE { - r INTEGER, - s INTEGER - } - END - EOS - (testpath/"assign.asn1").write <<~EOS - dp PKIX1.Dss-Sig-Value - r 42 - s 47 - EOS - system "#{bin}/asn1Coding", "pkix.asn", "assign.asn1" - assert_match /Decoding: SUCCESS/, shell_output("#{bin}/asn1Decoding pkix.asn assign.out PKIX1.Dss-Sig-Value 2>&1") - end -end diff --git a/Formula/libtcod.rb b/Formula/libtcod.rb deleted file mode 100644 index acf909c992a73..0000000000000 --- a/Formula/libtcod.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Libtcod < Formula - desc "API for roguelike developers" - homepage "https://github.com/libtcod/libtcod" - url "https://github.com/libtcod/libtcod/archive/1.15.1.tar.gz" - sha256 "2713d8719be53db7a529cbf53064e5bc9f3adf009db339d3a81b50d471bc306f" - license "BSD-3-Clause" - revision 1 - - bottle do - cellar :any - sha256 "f6cbbe0ba4037f31da72f30fb97138c9f24b03a1f9293336971f771f3df40489" => :catalina - sha256 "1e61a2db504b8999e3796ada0dcd1de3d42e07f00a6fd7f84b2b767d8883a047" => :mojave - sha256 "3fec806904f3aad780ba54cb4deec9f34422fafc096ef18b7762989c90b2ae8e" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on :macos # Due to Python 2 - depends_on "sdl2" - - def install - cd "buildsys/autotools" do - system "autoreconf", "-fiv" - system "./configure" - system "make" - lib.install Dir[".libs/*{.a,.dylib}"] - end - Dir.chdir("src") do - Dir.glob("libtcod/**/*.{h,hpp}") do |f| - (include/File.dirname(f)).install f - end - end - # don't yet know what this is for - libexec.install "data" - end - - test do - (testpath/"version-c.c").write <<~EOS - #include - #include - int main() - { - puts(TCOD_STRVERSION); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-ltcod", "version-c.c", "-o", "version-c" - assert_equal "#{version}\n", `./version-c` - (testpath/"version-cc.cc").write <<~EOS - #include - int main() - { - std::cout << TCOD_STRVERSION << std::endl; - return 0; - } - EOS - system ENV.cxx, "-std=c++14", "-I#{include}", "-L#{lib}", "-ltcod", "version-cc.cc", "-o", "version-cc" - assert_equal "#{version}\n", `./version-cc` - end -end diff --git a/Formula/libtecla.rb b/Formula/libtecla.rb deleted file mode 100644 index 31bea4f00c7eb..0000000000000 --- a/Formula/libtecla.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Libtecla < Formula - desc "Command-line editing facilities similar to the tcsh shell" - homepage "https://www.astro.caltech.edu/~mcs/tecla/index.html" - url "https://www.astro.caltech.edu/~mcs/tecla/libtecla-1.6.3.tar.gz" - sha256 "f2757cc55040859fcf8f59a0b7b26e0184a22bece44ed9568a4534a478c1ee1a" - - bottle do - cellar :any - sha256 "a6bbfa1cee4b62a03186d6fa1a153fceb2b3b9ae5cdf63411d6432c6251c753b" => :catalina - sha256 "d39e8711f7a9a5a11433c7c92a2113a97f8846796f93fa7bca1281e06db2e3fe" => :mojave - sha256 "dffae78362e21bf324ed651a2b80ff924b1bbec60916159863e66c7171072a9c" => :high_sierra - sha256 "21cd696f6e79ae6401dd19f832ac24263f016a62c2d15ec31e25d515bbea5983" => :sierra - sha256 "3ceb3942ea4ae1434dcc0aea00fa58b6f16787bc1a0067e9497ad4cb050f771a" => :el_capitan - sha256 "836d6100343197540f079ea7f6b9e5641fd8efc4e331d3492f8be4cd41ced6e9" => :yosemite - sha256 "d7f9b95bbe7540504751d42589e8500a77d15dc3e6b2f7fe501ed872172f1129" => :mavericks - end - - uses_from_macos "ncurses" - - def install - ENV.deparallelize - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main(int argc, char *argv[]) { - GetLine *gl; - setlocale(LC_CTYPE, ""); - gl = new_GetLine(1024, 2048); - if (!gl) return 1; - return 0; - } - EOS - - system ENV.cc, "test.c", "-L#{lib}", "-ltecla", "-o", "test" - system "./test" - end -end diff --git a/Formula/libtensorflow.rb b/Formula/libtensorflow.rb deleted file mode 100644 index efb1c483c67c1..0000000000000 --- a/Formula/libtensorflow.rb +++ /dev/null @@ -1,162 +0,0 @@ -class Libtensorflow < Formula - include Language::Python::Virtualenv - - desc "C interface for Google's OS library for Machine Intelligence" - homepage "https://www.tensorflow.org/" - url "https://github.com/tensorflow/tensorflow/archive/v2.2.0.tar.gz" - sha256 "69cd836f87b8c53506c4f706f655d423270f5a563b76dc1cfa60fbc3184185a3" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "bc58f2c31ada1e7d076e828c763c577a1fed4f218c9408faf92fc56d34cc9661" => :catalina - sha256 "c033286edc730d36b7945f03dacb8b3269d25f661d4c3f933c4351959ebd5782" => :mojave - sha256 "c6f36dbbd5f111f6fb0808bd849bee4b3d95f1dc416d37ea458b27f0d00206cf" => :high_sierra - end - - depends_on "bazel" => :build - depends_on "openjdk" => :build - depends_on "python@3.8" => :build - - resource "numpy" do - url "https://files.pythonhosted.org/packages/2d/f3/795e50e3ea2dc7bc9d1a2eeea9997d5dce63b801e08dfc37c2efce341977/numpy-1.18.4.zip" - sha256 "bbcc85aaf4cd84ba057decaead058f43191cc0e30d6bc5d44fe336dc3d3f4509" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "test-model" do - url "https://github.com/tensorflow/models/raw/v1.13.0/samples/languages/java/training/model/graph.pb" - sha256 "147fab50ddc945972818516418942157de5e7053d4b67e7fca0b0ada16733ecb" - end - - def install - # Bazel fails if version from .bazelversion doesn't match bazel version, so just delete it - rm_f ".bazelversion" - - venv = virtualenv_create("#{buildpath}/venv", "python3") - (resources.map(&:name).to_set - ["test-model"]).each do |r| - venv.pip_install resource(r) - end - ENV["PYTHON_BIN_PATH"] = "#{buildpath}/venv/bin/python" - ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix - ENV["CC_OPT_FLAGS"] = "-march=native" - ENV["TF_IGNORE_MAX_BAZEL_VERSION"] = "1" - ENV["TF_NEED_JEMALLOC"] = "1" - ENV["TF_NEED_GCP"] = "0" - ENV["TF_NEED_HDFS"] = "0" - ENV["TF_ENABLE_XLA"] = "0" - ENV["USE_DEFAULT_PYTHON_LIB_PATH"] = "1" - ENV["TF_NEED_OPENCL"] = "0" - ENV["TF_NEED_CUDA"] = "0" - ENV["TF_NEED_MKL"] = "0" - ENV["TF_NEED_VERBS"] = "0" - ENV["TF_NEED_MPI"] = "0" - ENV["TF_NEED_S3"] = "1" - ENV["TF_NEED_GDR"] = "0" - ENV["TF_NEED_KAFKA"] = "0" - ENV["TF_NEED_OPENCL_SYCL"] = "0" - ENV["TF_NEED_ROCM"] = "0" - ENV["TF_DOWNLOAD_CLANG"] = "0" - ENV["TF_SET_ANDROID_WORKSPACE"] = "0" - ENV["TF_CONFIGURE_IOS"] = "0" - system "./configure" - - bazel_args =%W[ - --jobs=#{ENV.make_jobs} - --compilation_mode=opt - --copt=-march=native - ] - targets = %w[ - tensorflow:libtensorflow.so - tensorflow/tools/benchmark:benchmark_model - tensorflow/tools/graph_transforms:summarize_graph - tensorflow/tools/graph_transforms:transform_graph - ] - system "bazel", "build", *bazel_args, *targets - - lib.install Dir["bazel-bin/tensorflow/*.so*", "bazel-bin/tensorflow/*.dylib*"] - (include/"tensorflow/c").install %w[ - tensorflow/c/c_api.h - tensorflow/c/c_api_experimental.h - tensorflow/c/tf_attrtype.h - tensorflow/c/tf_datatype.h - tensorflow/c/tf_status.h - tensorflow/c/tf_tensor.h - ] - bin.install %w[ - bazel-bin/tensorflow/tools/benchmark/benchmark_model - bazel-bin/tensorflow/tools/graph_transforms/summarize_graph - bazel-bin/tensorflow/tools/graph_transforms/transform_graph - ] - - (lib/"pkgconfig/tensorflow.pc").write <<~EOS - Name: tensorflow - Description: Tensorflow library - Version: #{version} - Libs: -L#{lib} -ltensorflow - Cflags: -I#{include} - EOS - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() { - printf("%s", TF_Version()); - } - EOS - system ENV.cc, "-L#{lib}", "-ltensorflow", "-o", "test_tf", "test.c" - assert_equal version, shell_output("./test_tf") - - resource("test-model").stage(testpath) - - summarize_graph_output = shell_output("#{bin}/summarize_graph --in_graph=#{testpath}/graph.pb 2>&1") - variables_match = /Found \d+ variables:.+$/.match(summarize_graph_output) - assert_not_nil variables_match, "Unexpected stdout from summarize_graph for graph.pb (no found variables)" - variables_names = variables_match[0].scan(/name=([^,]+)/).flatten.sort - - transform_command = %W[ - #{bin}/transform_graph - --in_graph=#{testpath}/graph.pb - --out_graph=#{testpath}/graph-new.pb - --inputs=n/a - --outputs=n/a - --transforms="obfuscate_names" - 2>&1 - ].join(" ") - shell_output(transform_command) - - assert_predicate testpath/"graph-new.pb", :exist?, "transform_graph did not create an output graph" - - new_summarize_graph_output = shell_output("#{bin}/summarize_graph --in_graph=#{testpath}/graph-new.pb 2>&1") - new_variables_match = /Found \d+ variables:.+$/.match(new_summarize_graph_output) - assert_not_nil new_variables_match, "Unexpected summarize_graph output for graph-new.pb (no found variables)" - new_variables_names = new_variables_match[0].scan(/name=([^,]+)/).flatten.sort - - assert_not_equal variables_names, new_variables_names, "transform_graph didn't obfuscate variable names" - - benchmark_model_match = /benchmark_model -- (.+)$/.match(new_summarize_graph_output) - assert_not_nil benchmark_model_match, - "Unexpected summarize_graph output for graph-new.pb (no benchmark_model example)" - - benchmark_model_args = benchmark_model_match[1].split(" ") - benchmark_model_args.delete("--show_flops") - - benchmark_model_command = [ - "#{bin}/benchmark_model", - "--time_limit=10", - "--num_threads=1", - *benchmark_model_args, - "2>&1", - ].join(" ") - - assert_includes shell_output(benchmark_model_command), - "Timings (microseconds):", - "Unexpected benchmark_model output (no timings)" - end -end diff --git a/Formula/libtensorflow@1.rb b/Formula/libtensorflow@1.rb deleted file mode 100644 index 9dce9e47f34a6..0000000000000 --- a/Formula/libtensorflow@1.rb +++ /dev/null @@ -1,84 +0,0 @@ -class LibtensorflowAT1 < Formula - include Language::Python::Virtualenv - - desc "C interface for Google's OS library for Machine Intelligence" - homepage "https://www.tensorflow.org/" - url "https://github.com/tensorflow/tensorflow/archive/v1.15.3.tar.gz" - sha256 "9ab1d92e58eb813922b040acc7622b32d73c2d8d971fe6491a06f9df4c778151" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "88440057fc88398f8b9affc4b60f4d8ac897a72403cad5a5a67d8c659ab79bfa" => :catalina - sha256 "15fdb97131bdba58139f40ef7730e75aeba13a2440d2d9e3a67d36a51300c42a" => :mojave - sha256 "bcf7c915fd8d97ffef810d5df53e16136de7e7c784a9b97a0474831c6d923ae5" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "bazel" => :build - depends_on "python@3.8" => :build - - def install - venv_root = "#{buildpath}/venv" - virtualenv_create(venv_root, "python3") - - ENV["PYTHON_BIN_PATH"] = "#{venv_root}/bin/python" - ENV["CC_OPT_FLAGS"] = "-march=native" - ENV["TF_IGNORE_MAX_BAZEL_VERSION"] = "1" - ENV["TF_NEED_JEMALLOC"] = "1" - ENV["TF_NEED_GCP"] = "0" - ENV["TF_NEED_HDFS"] = "0" - ENV["TF_ENABLE_XLA"] = "0" - ENV["USE_DEFAULT_PYTHON_LIB_PATH"] = "1" - ENV["TF_NEED_OPENCL"] = "0" - ENV["TF_NEED_CUDA"] = "0" - ENV["TF_NEED_MKL"] = "0" - ENV["TF_NEED_VERBS"] = "0" - ENV["TF_NEED_MPI"] = "0" - ENV["TF_NEED_S3"] = "1" - ENV["TF_NEED_GDR"] = "0" - ENV["TF_NEED_KAFKA"] = "0" - ENV["TF_NEED_OPENCL_SYCL"] = "0" - ENV["TF_NEED_ROCM"] = "0" - ENV["TF_DOWNLOAD_CLANG"] = "0" - ENV["TF_SET_ANDROID_WORKSPACE"] = "0" - ENV["TF_CONFIGURE_IOS"] = "0" - system "./configure" - - bazel_compatibility_flags = %w[ - --noincompatible_remove_legacy_whole_archive - ] - system "bazel", "build", "--jobs", ENV.make_jobs, "--compilation_mode=opt", - "--copt=-march=native", *bazel_compatibility_flags, "tensorflow:libtensorflow.so" - lib.install Dir["bazel-bin/tensorflow/*.so*", "bazel-bin/tensorflow/*.dylib*"] - (include/"tensorflow/c").install %w[ - tensorflow/c/c_api.h - tensorflow/c/c_api_experimental.h - tensorflow/c/tf_attrtype.h - tensorflow/c/tf_datatype.h - tensorflow/c/tf_status.h - tensorflow/c/tf_tensor.h - ] - - (lib/"pkgconfig/tensorflow.pc").write <<~EOS - Name: tensorflow - Description: Tensorflow library - Version: #{version} - Libs: -L#{lib} -ltensorflow - Cflags: -I#{include} - EOS - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() { - printf("%s", TF_Version()); - } - EOS - system ENV.cc, "-L#{lib}", "-I#{include}", "-ltensorflow", "-o", "test_tf", "test.c" - assert_equal version, shell_output("./test_tf") - end -end diff --git a/Formula/libtermkey.rb b/Formula/libtermkey.rb deleted file mode 100644 index 09da4f7cbc216..0000000000000 --- a/Formula/libtermkey.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Libtermkey < Formula - desc "Library for processing keyboard entry from the terminal" - homepage "http://www.leonerd.org.uk/code/libtermkey/" - url "http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz" - sha256 "6945bd3c4aaa83da83d80a045c5563da4edd7d0374c62c0d35aec09eb3014600" - license "MIT" - - bottle do - cellar :any - sha256 "293f71f6cb8498f734910ada7ffe4e8e2ea2cb6121455318053d2a5951b272a8" => :catalina - sha256 "efa6360ccb50275ee143410e57b4ff47b2d6bafd97d6f4feeb3cb3ee02050a2c" => :mojave - sha256 "e3b848de428f811c1879530c043145152bf4b0e599ed642aa2845904d13f7081" => :high_sierra - sha256 "3f8ce77603619d85de7127f317e276c0cd38a461c545cafeb7c875e7c89fe467" => :sierra - end - - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "unibilium" - - uses_from_macos "ncurses" - - def install - system "make", "PREFIX=#{prefix}" - system "make", "install", "PREFIX=#{prefix}" - end -end diff --git a/Formula/libtextcat.rb b/Formula/libtextcat.rb deleted file mode 100644 index 14b59c303a654..0000000000000 --- a/Formula/libtextcat.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Libtextcat < Formula - desc "N-gram-based text categorization library" - homepage "https://software.wise-guys.nl/libtextcat/" - url "https://software.wise-guys.nl/download/libtextcat-2.2.tar.gz" - mirror "https://src.fedoraproject.org/repo/pkgs/libtextcat/libtextcat-2.2.tar.gz/128cfc86ed5953e57fe0f5ae98b62c2e/libtextcat-2.2.tar.gz" - sha256 "5677badffc48a8d332e345ea4fe225e3577f53fc95deeec8306000b256829655" - license "BSD-3-Clause" - - bottle do - cellar :any - rebuild 1 - sha256 "9e178bd2a1479fb8d7be57c03b0bad722fbb94221d50b4b807bd6c89126492f2" => :catalina - sha256 "02d7f744996abfda8bd85b4580c5a92a8bd89ad6cc06e2848caa9b3b0e858144" => :mojave - sha256 "7997ea512b672f165e1e53e941147e9a520a9ab5d71b8b22e4a71622690e7cdb" => :high_sierra - sha256 "24fe8791549204d8ef6e596fc327fbd3a645c729b440ba31ef47cf545f6f5b30" => :sierra - sha256 "afa51f83d0a3c96ffc6f6c35011c864347f31d2c3aea987102c59f0257177072" => :el_capitan - sha256 "1a63f24b16949843f6a3f6c17d9467208a471cfa6bf1b193738fa94c2d320f02" => :yosemite - sha256 "e7880fa731747f117a943fd99bd41da25bae3e6440316d782c4798cf3f55e0b7" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - (include/"libtextcat/").install Dir["src/*.h"] - share.install "langclass/LM", "langclass/ShortTexts", "langclass/conf.txt" - end - - test do - system "#{bin}/createfp < #{prefix}/README" - end -end diff --git a/Formula/libtiff.rb b/Formula/libtiff.rb deleted file mode 100644 index 52b1e77d718d3..0000000000000 --- a/Formula/libtiff.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Libtiff < Formula - desc "TIFF library and utilities" - homepage "https://libtiff.gitlab.io/libtiff/" - url "https://download.osgeo.org/libtiff/tiff-4.1.0.tar.gz" - mirror "https://fossies.org/linux/misc/tiff-4.1.0.tar.gz" - sha256 "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634" - - bottle do - cellar :any - sha256 "449bd9123e73e4c4eab85b77322d769cc9df0f6adab05e9b9319b012d1215a68" => :catalina - sha256 "dd060521aa30fb2f4678c9ebab6362104a9a705d098a90eac4059743c93c8c16" => :mojave - sha256 "577c2754b00fc8a5009e08bfd7af630ab4812250508df20a1c92d3c7ae678b94" => :high_sierra - end - - depends_on "jpeg" - - uses_from_macos "zlib" - - def install - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --disable-lzma - --with-jpeg-include-dir=#{Formula["jpeg"].opt_include} - --with-jpeg-lib-dir=#{Formula["jpeg"].opt_lib} - --without-x - ] - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main(int argc, char* argv[]) - { - TIFF *out = TIFFOpen(argv[1], "w"); - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) 10); - TIFFClose(out); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-ltiff", "-o", "test" - system "./test", "test.tif" - assert_match(/ImageWidth.*10/, shell_output("#{bin}/tiffdump test.tif")) - end -end diff --git a/Formula/libtins.rb b/Formula/libtins.rb deleted file mode 100644 index 6d1383e3d6c9c..0000000000000 --- a/Formula/libtins.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Libtins < Formula - desc "C++ network packet sniffing and crafting library" - homepage "https://libtins.github.io/" - url "https://github.com/mfontanini/libtins/archive/v4.2.tar.gz" - sha256 "a9fed73e13f06b06a4857d342bb30815fa8c359d00bd69547e567eecbbb4c3a1" - license "BSD-2-Clause" - revision 1 - head "https://github.com/mfontanini/libtins.git" - - bottle do - cellar :any - sha256 "3f7acd9f9ad201779e53014a1f234fe2620bcc66715bc691adae0ec05ce7922a" => :catalina - sha256 "024927515d79136857d24cde994b1165813a6924163dec87e1171dcf1088431f" => :mojave - sha256 "acd621b885b5d2e090e2065733cea3e4dcb3c635c42e02c1fc8c0a44148777d0" => :high_sierra - sha256 "9709befe28f8aeb4052be1304fe642f2d10701a0ef1ac11392239c4081b0e424" => :sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - doc.install "examples" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - Tins::Sniffer sniffer("en0"); - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-ltins", "-o", "test" - end -end diff --git a/Formula/libtomcrypt.rb b/Formula/libtomcrypt.rb deleted file mode 100644 index 3c79b3c87c9bf..0000000000000 --- a/Formula/libtomcrypt.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Libtomcrypt < Formula - desc "Comprehensive, modular and portable cryptographic toolkit" - homepage "https://www.libtom.net/" - url "https://github.com/libtom/libtomcrypt/archive/v1.18.2.tar.gz" - sha256 "d870fad1e31cb787c85161a8894abb9d7283c2a654a9d3d4c6d45a1eba59952c" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "2ecaaf5a2d64b92c58498482c3aec69c84c7772ffa5f213ad43010199cd7dec8" => :catalina - sha256 "fbc00f6bcb941ab719a45ca7a52192b6bda774de1e8997c070fbf025bc031f1a" => :mojave - sha256 "7dda8583b31d847e69406c4eebda576e6de8fd6a3a5461a73c890bcce3162c05" => :high_sierra - end - - def install - system "make", "test" - system "make", "install", "PREFIX=#{prefix}" - pkgshare.install "test" - (pkgshare/"tests").install "tests/test.key" - end - - test do - cp_r Dir[pkgshare/"*"], testpath - system "./test" - end -end diff --git a/Formula/libtommath.rb b/Formula/libtommath.rb deleted file mode 100644 index fd3facae4e34f..0000000000000 --- a/Formula/libtommath.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Libtommath < Formula - desc "C library for number theoretic multiple-precision integers" - homepage "https://www.libtom.net/LibTomMath/" - url "https://github.com/libtom/libtommath/releases/download/v1.2.0/ltm-1.2.0.tar.xz" - sha256 "b7c75eecf680219484055fcedd686064409254ae44bc31a96c5032843c0e18b1" - license "Unlicense" - revision 1 - head "https://github.com/libtom/libtommath.git" - - bottle do - cellar :any_skip_relocation - sha256 "700d1c4dfecd1016215158de7436d02452a149c5882ba3fda1201a72d6c3d5ea" => :catalina - sha256 "9832ceb97e387a519d6ae9b66bb3a7066c1d112d947667527a5edfcc692e4983" => :mojave - sha256 "26e39af069485ef58c3517fb765db3a5e8dba0f253aac3d0d5968ff2a35e595b" => :high_sierra - end - - # Fixes mp_set_double being missing on macOS. - # This is needed by some dependents in homebrew-core. - # Note: this patch has been merged upstream but we take a backport - # from a fork due to file name differences between 1.2.0 and master. - # Remove with the next version. - patch do - url "https://github.com/MoarVM/libtommath/commit/db0d387b808d557bd408a6a253c5bf3a688ef274.patch?full_index=1" - sha256 "e5eef1762dd3e92125e36034afa72552d77f066eaa19a0fd03cd4f1a656f9ab0" - end - - def install - ENV["DESTDIR"] = prefix - - # Work around Xcode 11 clang bug - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - system "make" - system "make", "test_standalone" - include.install Dir["tommath*.h"] - lib.install "libtommath.a" - pkgshare.install "test" - end - - test do - system pkgshare/"test" - end -end diff --git a/Formula/libtool.rb b/Formula/libtool.rb deleted file mode 100644 index c29c928393f11..0000000000000 --- a/Formula/libtool.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Libtool < Formula - desc "Generic library support script" - homepage "https://www.gnu.org/software/libtool/" - 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" - revision 2 - - bottle do - cellar :any - sha256 "af317b35d0a394b7ef55fba4950735b0392d9f31bececebf9c412261c23a01fc" => :catalina - sha256 "77ca68934e7ed9b9b0b8ce17618d7f08fc5d5a95d7b845622bf57345ffb1c0d6" => :mojave - sha256 "60c7d86f9364e166846f8d3fb2ba969e6ca157e7ecbbb42a1de259116618c2ba" => :high_sierra - end - - uses_from_macos "m4" => :build - - # Fixes the build on macOS 11: - # https://lists.gnu.org/archive/html/libtool-patches/2020-06/msg00001.html - patch :p0 do - url "https://github.com/Homebrew/formula-patches/raw/e5fbd46a25e35663059296833568667c7b572d9a/libtool/dynamic_lookup-11.patch" - sha256 "5ff495a597a876ce6e371da3e3fe5dd7f78ecb5ebc7be803af81b6f7fcef1079" - end - - def install - # Ensure configure is happy with the patched files - %w[aclocal.m4 libltdl/aclocal.m4 Makefile.in libltdl/Makefile.in - config-h.in libltdl/config-h.in configure libltdl/configure].each do |file| - touch file - end - - ENV["SED"] = "sed" # prevent libtool from hardcoding sed path from superenv - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--program-prefix=g", - "--enable-ltdl-install" - system "make", "install" - end - - def caveats - <<~EOS - In order to prevent conflicts with Apple's own libtool we have prepended a "g" - so, you have instead: glibtool and glibtoolize. - EOS - end - - test do - system "#{bin}/glibtool", "execute", "/usr/bin/true" - (testpath/"hello.c").write <<~EOS - #include - int main() { puts("Hello, world!"); return 0; } - EOS - system bin/"glibtool", "--mode=compile", "--tag=CC", - ENV.cc, "-c", "hello.c", "-o", "hello.o" - system bin/"glibtool", "--mode=link", "--tag=CC", - ENV.cc, "hello.o", "-o", "hello" - assert_match "Hello, world!", shell_output("./hello") - end -end diff --git a/Formula/libtorch.rb b/Formula/libtorch.rb deleted file mode 100644 index c0da93d7d7d51..0000000000000 --- a/Formula/libtorch.rb +++ /dev/null @@ -1,104 +0,0 @@ -class Libtorch < Formula - include Language::Python::Virtualenv - - desc "Tensors and dynamic neural networks" - homepage "https://pytorch.org/" - url "https://github.com/pytorch/pytorch.git", - :tag => "v1.5.1", - :revision => "3c31d73c875d9a4a6ea8a843b9a0d1b19fbe36f3" - - bottle do - cellar :any - sha256 "63efffa3662f0b51da7cbfc139f28f4a897eba539fe0aa22ab86a5e4f96c93af" => :catalina - sha256 "0af7bf84c6aa66e282bafece2ec74a17c2372a29c55b82a2a9e1a7ec0133c46c" => :mojave - sha256 "f39db17e6eb7c73b4087fbf5e927443bf6588fcaac04cdb3acd976e07be0610f" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "python@3.8" => :build - depends_on "eigen" - depends_on "libomp" - depends_on "libyaml" - depends_on "protobuf" - depends_on "pybind11" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "typing" do - url "https://files.pythonhosted.org/packages/67/b0/b2ea2bd67bfb80ea5d12a5baa1d12bda002cab3b6c9b48f7708cd40c34bf/typing-3.7.4.1.tar.gz" - sha256 "91dfe6f3f706ee8cc32d38edbbf304e9b7583fb37108fef38229617f8b3eba23" - end - - # Fix compile with Apple Clang 10. - patch do - url "https://github.com/google/XNNPACK/commit/b18783570f0643560be641b193367d3906955141.patch?full_index=1" - sha256 "5c17f0e38885ba48234cb89a9a0b101f9a760fa335efd1372b8fd1690dee5b21" - directory "third_party/XNNPACK" - end - - # Fix compile with Apple Clang 11.0.3. - patch :DATA - - def install - venv = virtualenv_create(libexec, Formula["python@3.8"].opt_bin/"python3") - venv.pip_install resources - - args = %W[ - -DBUILD_CUSTOM_PROTOBUF=OFF - -DBUILD_PYTHON=OFF - -DPYTHON_EXECUTABLE=#{libexec}/bin/python - -DUSE_CUDA=OFF - -DUSE_METAL=OFF - -DUSE_MKLDNN=OFF - -DUSE_NNPACK=OFF - -DUSE_SYSTEM_EIGEN_INSTALL=ON - ] - - mkdir "build" do - system "cmake", "..", *std_cmake_args, *args - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - - int main() { - torch::Tensor tensor = torch::rand({2, 3}); - std::cout << tensor << std::endl; - } - EOS - system ENV.cxx, "-std=c++14", "-L#{lib}", "-ltorch", "-ltorch_cpu", "-lc10", - "-I#{include}/torch/csrc/api/include", "test.cpp", "-o", "test" - system "./test" - end -end - -__END__ -diff --git a/aten/src/ATen/native/SobolEngineOps.cpp b/aten/src/ATen/native/SobolEngineOps.cpp -index 8a14a22b8894..407d68a7e87d 100644 ---- a/aten/src/ATen/native/SobolEngineOps.cpp -+++ b/aten/src/ATen/native/SobolEngineOps.cpp -@@ -134,7 +134,15 @@ Tensor& _sobol_engine_initialize_state_(Tensor& sobolstate, int64_t dimension) { - int64_t m = bit_length(p) - 1; - - for (int64_t i = 0; i < m; ++i) { -- ss_a[d][i] = initsobolstate[d][i]; -+ // Note: [Workaround Clang9.0.0 bug] -+ // Q: Why not use `ss_a[d][i] = initsobolstate[d][i];`? -+ // A: It'll trigger a bug with Clang9.0.0 and segfaults pytorch build. -+ // The bug is fixed in 9.0.1 but we still want to work around it -+ // here so that we can keep using 9.0.0 in CircleCi jobs, -+ // since it is available through apt. -+ // See https://github.com/pytorch/pytorch/issues/36676 for details. -+ const auto p = &(initsobolstate[d]); -+ ss_a[d][i] = (*p)[i]; - } - - for (int64_t j = m; j < MAXBIT; ++j) { diff --git a/Formula/libtorrent-rakshasa.rb b/Formula/libtorrent-rakshasa.rb deleted file mode 100644 index a735464af6408..0000000000000 --- a/Formula/libtorrent-rakshasa.rb +++ /dev/null @@ -1,46 +0,0 @@ -class LibtorrentRakshasa < Formula - desc "BitTorrent library with a focus on high performance" - homepage "https://github.com/rakshasa/libtorrent" - url "https://github.com/rakshasa/libtorrent/archive/v0.13.8.tar.gz" - sha256 "0f6c2e7ffd3a1723ab47fdac785ec40f85c0a5b5a42c1d002272205b988be722" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "207e33009028a8721a89c91139fe78fea1cd9fb8a05862286264dfc53548886a" => :catalina - sha256 "94afd9fcef673d4e3945c13085df931e12c1bf2422bf6a2ad2c6848634c2fa65" => :mojave - sha256 "135df02ce3bb98b05d9f849b8014087e8acaefcc24b1547ff9b1740bbd74492a" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - conflicts_with "libtorrent-rasterbar", - :because => "they both use the same libname" - - def install - args = ["--prefix=#{prefix}", "--disable-debug", - "--disable-dependency-tracking"] - - system "sh", "autogen.sh" - system "./configure", *args - system "make" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main(int argc, char* argv[]) - { - return strcmp(torrent::version(), argv[1]); - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", "-L#{lib}", "-ltorrent" - system "./test", version.to_s - end -end diff --git a/Formula/libtorrent-rasterbar.rb b/Formula/libtorrent-rasterbar.rb deleted file mode 100644 index 07792579dc1c0..0000000000000 --- a/Formula/libtorrent-rasterbar.rb +++ /dev/null @@ -1,67 +0,0 @@ -class LibtorrentRasterbar < Formula - desc "C++ bittorrent library with Python bindings" - homepage "https://www.libtorrent.org/" - url "https://github.com/arvidn/libtorrent/releases/download/libtorrent_1_2_7/libtorrent-rasterbar-1.2.7.tar.gz" - sha256 "bc00069e65c0825cbe1eee5cdd26f94fcd9a621c4e7f791810b12fab64192f00" - - bottle do - cellar :any - sha256 "ebcf3c671f25bf16e9643b647e2dff1339458d7b6b4e28fbde07e0e54abe29fd" => :catalina - sha256 "68bd2a4ed0dd30a61b4bf5667eb21a01e3bc617a6bcb55a5ea5cdbea8954b50e" => :mojave - sha256 "1f25a63a7e555b4f4c9f0491e363aa2ba8d5eb134dc3f65a1df6c60cc926c187" => :high_sierra - end - - head do - url "https://github.com/arvidn/libtorrent.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "boost-python3" - depends_on "openssl@1.1" - depends_on "python@3.8" - - conflicts_with "libtorrent-rakshasa", :because => "they both use the same libname" - - def install - pyver = Language::Python.major_minor_version(Formula["python@3.8"].bin/"python3").to_s.delete(".") - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --enable-encryption - --enable-python-binding - --with-boost=#{Formula["boost"].opt_prefix} - --with-boost-python=boost_python#{pyver}-mt - PYTHON=python3 - PYTHON_EXTRA_LIBS=#{`#{Formula["python@3.8"].opt_bin}/python3-config --libs --embed`.chomp} - PYTHON_EXTRA_LDFLAGS=#{`#{Formula["python@3.8"].opt_bin}/python3-config --ldflags`.chomp} - ] - - if build.head? - system "./bootstrap.sh", *args - else - system "./configure", *args - end - - system "make", "install" - - rm Dir["examples/Makefile*"] - libexec.install "examples" - end - - test do - system ENV.cxx, "-std=c++11", "-I#{Formula["boost"].include}/boost", - "-L#{lib}", "-ltorrent-rasterbar", - "-L#{Formula["boost"].lib}", "-lboost_system", - "-framework", "SystemConfiguration", - "-framework", "CoreFoundation", - libexec/"examples/make_torrent.cpp", "-o", "test" - system "./test", test_fixtures("test.mp3"), "-o", "test.torrent" - assert_predicate testpath/"test.torrent", :exist? - end -end diff --git a/Formula/libtrng.rb b/Formula/libtrng.rb deleted file mode 100644 index 4a51f4b6b79e6..0000000000000 --- a/Formula/libtrng.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Libtrng < Formula - desc "Tina's Random Number Generator Library" - homepage "https://www.numbercrunch.de/trng/" - url "https://www.numbercrunch.de/trng/trng-4.22.tar.gz" - sha256 "6acff0a6136e41cbf0b265ae1f4392c8f4394ecfe9803bc98255e9e8d926f3d8" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "b0e5af117a32d265de30662de4d7ef61e412853f262949e86ac1ff91dfd69875" => :catalina - sha256 "4b753374a4fb6305e417ea5d89237f6e62b47b8c9e2c034c76e26475184de48c" => :mojave - sha256 "4f269f561d5b8b692189e90cba163578ad68b2fa83a84660d8da4d367c4a2e93" => :high_sierra - end - - depends_on "cmake" => :build - - # Examples do not build. Should be fixed in next release. - # https://github.com/rabauke/trng4/commit/78f7aea798b12603d9a2f6c68e19692f61c70647 - patch :DATA - - def install - system "cmake", ".", *std_cmake_args - system "make" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() - { - trng::yarn2 R; - trng::normal_dist<> normal(6.0, 2.0); - (void)normal(R); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", "-I#{include}", "-L#{lib}", "-ltrng4" - system "./test" - end -end - -__END__ -diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -index a916560..b29ab99 100644 ---- a/examples/CMakeLists.txt -+++ b/examples/CMakeLists.txt -@@ -6,7 +6,7 @@ find_package(OpenMP) - find_package(TBB) - - include_directories(..) --link_libraries(trng4) -+link_libraries(trng4_static) - link_directories(${PROJECT_BINARY_DIR}/trng) - - add_executable(hello_world hello_world.cc) diff --git a/Formula/libu2f-host.rb b/Formula/libu2f-host.rb deleted file mode 100644 index e72e539dc7bdb..0000000000000 --- a/Formula/libu2f-host.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Libu2fHost < Formula - desc "Host-side of the Universal 2nd Factor (U2F) protocol" - homepage "https://developers.yubico.com/libu2f-host/" - url "https://developers.yubico.com/libu2f-host/Releases/libu2f-host-1.1.10.tar.xz" - sha256 "4265789ec59555a1f383ea2d75da085f78ee4cf1cd7c44a2b38662de02dd316f" - license "GPL-3.0" - revision 1 - - bottle do - cellar :any - sha256 "461c37c919d585c8abca2fbff636332c27462cc8f10c04d5762e357c453f7066" => :catalina - sha256 "deed9f64b0e078130c5618ce98580b9b1b284c531cfb04e6296a8d5b259b6a81" => :mojave - sha256 "376aa8fc3a98d4aab29ba7d284a58bf07308fda51aa30da72e068f8a6206505e" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "hidapi" - depends_on "json-c" - - # Compatibility with json-c 0.14. Remove with the next release. - patch do - url "https://github.com/Yubico/libu2f-host/commit/840f01135d2892f45e71b9e90405de587991bd03.patch?full_index=1" - sha256 "6752463ca79fb312d4524f39d2ac02707ef6c182450d631e35f02bb49565c651" - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() - { - u2fh_devs *devs; - u2fh_global_init (0); - u2fh_devs_init (&devs); - u2fh_devs_discover (devs, NULL); - u2fh_devs_done (devs); - u2fh_global_done (); - return 0; - } - EOS - system ENV.cc, "test.c", "-o", "test", "-I#{include}/u2f-host", "-L#{lib}", "-lu2f-host" - system "./test" - end -end diff --git a/Formula/libu2f-server.rb b/Formula/libu2f-server.rb deleted file mode 100644 index 1e3f8d712bd5d..0000000000000 --- a/Formula/libu2f-server.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Libu2fServer < Formula - desc "Server-side of the Universal 2nd Factor (U2F) protocol" - homepage "https://developers.yubico.com/libu2f-server/" - url "https://developers.yubico.com/libu2f-server/Releases/libu2f-server-1.1.0.tar.xz" - sha256 "8dcd3caeacebef6e36a42462039fd035e45fa85653dcb2013f45e15aad49a277" - revision 3 - - bottle do - cellar :any - sha256 "3a5038a64a9820c04a4ad1067ebcf8076936474cc5c18a0d93f7c986adcf0169" => :catalina - sha256 "a1d26284fa87629ecf5bf965433cd6eeba9eb151e064e22a47ca42a115d5e15c" => :mojave - sha256 "03e06751297ad4aab253d7b1f742fd5c2ad8d79b35836eb132c3c82c20b485e6" => :high_sierra - end - - depends_on "check" => :build - depends_on "gengetopt" => :build - depends_on "help2man" => :build - depends_on "pkg-config" => :build - depends_on "json-c" - depends_on "openssl@1.1" - - # Compatibility with json-c 0.14. Remove with the next release. - patch do - url "https://github.com/Yubico/libu2f-server/commit/f7c4983b31909299c47bf9b2627c84b6bfe225de.patch?full_index=1" - sha256 "012d1d759604ea80f6075b74dc9c7d8a864e4e5889fb82a222db93a6bd72cd1b" - end - - def install - ENV["LIBSSL_LIBS"] = "-lssl -lcrypto -lz" - ENV["LIBCRYPTO_LIBS"] = "-lcrypto -lz" - ENV["PKG_CONFIG"] = "#{Formula["pkg-config"].opt_bin}/pkg-config" - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() - { - if (u2fs_global_init(U2FS_DEBUG) != U2FS_OK) - { - return 1; - } - - u2fs_ctx_t *ctx; - if (u2fs_init(&ctx) != U2FS_OK) - { - return 1; - } - - u2fs_done(ctx); - u2fs_global_done(); - return 0; - } - EOS - system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lu2f-server" - system "./test" - end -end diff --git a/Formula/libucl.rb b/Formula/libucl.rb deleted file mode 100644 index d779d9272f5b5..0000000000000 --- a/Formula/libucl.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Libucl < Formula - desc "Universal configuration library parser" - homepage "https://github.com/vstakhov/libucl" - url "https://github.com/vstakhov/libucl/archive/0.8.1.tar.gz" - sha256 "a6397e179672f0e8171a0f9a2cfc37e01432b357fd748b13f4394436689d24ef" - license "BSD-2-Clause" - - bottle do - cellar :any - rebuild 3 - sha256 "8ff53b6da5423f7b6e11b6173b4b720d3563b1a24243ea4f977cf269d67aeb4c" => :catalina - sha256 "1ffddb657d95f504ba3b7331f5dbbd995c5d237cda3f736e99182a16a8e8181d" => :mojave - sha256 "dd5dbb4eb7e3d37816acc4f3bc2842c8e91caeb4a6f058eed75cab9d72192315" => :high_sierra - sha256 "5c477e0feb163dc955e89eabf97cae445fefc9c920fe46073c85af348535d7cd" => :sierra - sha256 "93e7d66507c386c9fe720b5f4c77d3b719574b7c311319cddc09bcbda659bce7" => :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" - - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --enable-utils - --prefix=#{prefix} - ] - - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - - int main(int argc, char **argv) { - const std::string cfg = "foo = bar; section { flag = true; }"; - std::string err; - auto obj = ucl::Ucl::parse(cfg, err); - assert(obj); - assert(obj[std::string("foo")].string_value() == "bar"); - assert(obj[std::string("section")][std::string("flag")].bool_value()); - } - EOS - system ENV.cxx, "-std=c++11", "test.cpp", "-L#{lib}", "-lucl", "-o", "test" - system "./test" - end -end diff --git a/Formula/libuecc.rb b/Formula/libuecc.rb deleted file mode 100644 index c1bac39f6cc98..0000000000000 --- a/Formula/libuecc.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Libuecc < Formula - desc "Very small Elliptic Curve Cryptography library" - homepage "https://git.universe-factory.net/libuecc/" - url "https://git.universe-factory.net/libuecc/snapshot/libuecc-7.tar" - sha256 "0120aee869f56289204255ba81535369816655264dd018c63969bf35b71fd707" - head "https://git.universe-factory.net/libuecc" - - bottle do - cellar :any - sha256 "89acc7a04f910882b89d9e032a45e8c27dc98257d6d4e6b28f6c6a26c8c369ae" => :catalina - sha256 "d4d0c41262688ddca9ee2f2e6b80c33670c5a8db7266cd0c0592cd50b0d18be1" => :mojave - sha256 "95646c23acf19c1f07032c6f311f446e7a32b1a9d0c1dd385ec3c41811036572" => :high_sierra - sha256 "4722877fdc4538c814a10e6d0dc2f1a4d2a3571ce4ca1c8b37279c88cd83883f" => :sierra - sha256 "d9e52027a6535fb74e44026d23ef13a2417a1f22402173dc90d136071ea5290d" => :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 - #include - #include - - int main(void) - { - ecc_int256_t secret; - ecc_25519_gf_sanitize_secret(&secret, &secret); - - return EXIT_SUCCESS; - } - EOS - system ENV.cc, "-I#{include}/libuecc-#{version}", "-L#{lib}", "-o", "test", "test.c", "-luecc" - system "./test" - end -end diff --git a/Formula/libuninameslist.rb b/Formula/libuninameslist.rb deleted file mode 100644 index a97e1c10525e4..0000000000000 --- a/Formula/libuninameslist.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Libuninameslist < Formula - desc "Library of Unicode names and annotation data" - homepage "https://github.com/fontforge/libuninameslist" - url "https://github.com/fontforge/libuninameslist/releases/download/20200413/libuninameslist-dist-20200413.tar.gz" - sha256 "5c0283b2e18d101e58b70a026119d66c9d3e749e4537def7799bba0bc8998f62" - - bottle do - cellar :any - sha256 "38e3ba23a50f2acdebdf4a6419b8e5d996650f9fd9c4e081eb18c77b57dc08ac" => :catalina - sha256 "5bbf66b5f23f99f833b95fae6462084c98838e79142e66a0e602ad7a70dc13f6" => :mojave - sha256 "9e6875ea89497fb8f3c8c4121f9142f7ca23f85a4d2ae8b3845d49db4194cf51" => :high_sierra - end - - head do - url "https://github.com/fontforge/libuninameslist.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - if build.head? - system "autoreconf", "-i" - system "automake" - end - - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() { - (void)uniNamesList_blockCount(); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-luninameslist", "-o", "test" - system "./test" - end -end diff --git a/Formula/libunistring.rb b/Formula/libunistring.rb deleted file mode 100644 index de4bb7bf7ee1e..0000000000000 --- a/Formula/libunistring.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Libunistring < Formula - desc "C string library for manipulating Unicode strings" - homepage "https://www.gnu.org/software/libunistring/" - url "https://ftp.gnu.org/gnu/libunistring/libunistring-0.9.10.tar.xz" - mirror "https://ftpmirror.gnu.org/libunistring/libunistring-0.9.10.tar.xz" - sha256 "eb8fb2c3e4b6e2d336608377050892b54c3c983b646c561836550863003c05d7" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "ce746662b98d93511b86920011b5cafcd2eecbce4c9c40d8c52a143cdf708456" => :catalina - sha256 "1d0c8e266acddcebeef3d9f6162d6f7fa0b193f5f71837174fb2ef0b39d324f3" => :mojave - sha256 "5eeec8fdede3d6ae2c1082179879a41d3b600a36e7d83acc5ea0587ad85d5a9d" => :high_sierra - sha256 "3a7a0e8737c19995bc8a263724a90a26b418b177deee90b4e6746c353b348e12" => :sierra - sha256 "df01e794e8d11926ea023798f9f95d516a6c28009cbdfd29ea1d1a9107812d66" => :el_capitan - end - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - #include - int main (void) { - uint32_t s[2] = {}; - uint8_t buff[12] = {}; - if (u32_uctomb (s, unicode_name_character ("BEER MUG"), sizeof s) != 1) abort(); - if (u8_sprintf (buff, "%llU", s) != 4) abort(); - printf ("%s\\n", buff); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lunistring", - "-o", "test" - assert_equal "🍺", shell_output("./test").chomp - end -end diff --git a/Formula/libunwind-headers.rb b/Formula/libunwind-headers.rb deleted file mode 100644 index c210eff0d250b..0000000000000 --- a/Formula/libunwind-headers.rb +++ /dev/null @@ -1,16 +0,0 @@ -class LibunwindHeaders < Formula - desc "C API for determining the call-chain of a program" - homepage "https://opensource.apple.com/" - url "https://opensource.apple.com/tarballs/libunwind/libunwind-35.4.tar.gz" - sha256 "5ca0fcb257a33eb376b19cd26ddc5f34d00f9099c8ffb462d7484bfdca654d7d" - - bottle :unneeded - - keg_only :shadowed_by_macos, "macOS provides libunwind.dylib (but nothing else)" - - def install - include.install Dir["include/*"] - (include/"libunwind").install Dir["src/*.h*"] - (include/"libunwind/libunwind_priv.h").unlink - end -end diff --git a/Formula/libupnp.rb b/Formula/libupnp.rb deleted file mode 100644 index ef0fbdd4f073a..0000000000000 --- a/Formula/libupnp.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Libupnp < Formula - desc "Portable UPnP development kit" - homepage "https://pupnp.sourceforge.io/" - url "https://github.com/pupnp/pupnp/releases/download/release-1.12.1/libupnp-1.12.1.tar.bz2" - sha256 "fc36642b1848fe5a81296d496291d350ecfc12b85fd0b268478ab230976d4009" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "2343d98fde1cf6ff2cb529f08d609b9685e85e72cdb75916daf5fb21345c5baf" => :catalina - sha256 "7d05f24f8bcb7e0edaaa35bce6f94208d05e9157c0b8897205bd0df84e9e845f" => :mojave - sha256 "b67bb447214ba6622325b0b0932ae2366a7ea4d6b9342d723ec9c027515cadbc" => :high_sierra - end - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --enable-ipv6 - ] - - system "./configure", *args - system "make", "install" - end -end diff --git a/Formula/libusb-compat.rb b/Formula/libusb-compat.rb deleted file mode 100644 index 1479ae45f1638..0000000000000 --- a/Formula/libusb-compat.rb +++ /dev/null @@ -1,29 +0,0 @@ -class LibusbCompat < Formula - desc "Library for USB device access" - homepage "https://libusb.info/" - url "https://downloads.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-0.1.5/libusb-compat-0.1.5.tar.bz2" - sha256 "404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a" - revision 1 - - bottle do - cellar :any - sha256 "e1f03f77caed5418c50c3c9659e6c56f2363eddfd6cc1aac3f8dcac9451771d2" => :catalina - sha256 "11fe66aff70c0177a186c946624f91417565c43bbdc9e7c51725e26ea0c868c5" => :mojave - sha256 "fccc08c6c3ff2bf93d2aa8e7cc18f30c1fb95fbca044ecaa42d45f7c73a8facf" => :high_sierra - sha256 "e24ad80ee860f6f6c7e6c8dbb100aaa2de3294e2ecf7f591f2f51c52e11f09ea" => :sierra - sha256 "7b62449f8a9c02834b74adeb0827ca2ae32b47cb82923de0a8e88f16c36ca8b8" => :el_capitan - sha256 "0e4f131b8fd8210db3ff353a92c35ed12643a717b8780618680e3b4a16d7f347" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "libusb" - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - end - - test do - system "#{bin}/libusb-config", "--libs" - end -end diff --git a/Formula/libusb.rb b/Formula/libusb.rb deleted file mode 100644 index aa83136ab3820..0000000000000 --- a/Formula/libusb.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Libusb < Formula - desc "Library for USB device access" - homepage "https://libusb.info/" - url "https://github.com/libusb/libusb/releases/download/v1.0.23/libusb-1.0.23.tar.bz2" - sha256 "db11c06e958a82dac52cf3c65cb4dd2c3f339c8a988665110e0d24d19312ad8d" - license "LGPL-2.1" - - bottle do - cellar :any - rebuild 1 - sha256 "cbfd8044e5e595fcee3cbf62edac4b626a8c623be53ed76e7111fa235ff97668" => :catalina - sha256 "6dd71c1bc0bbe67ee8f76fb01d33d805bde20b7182695e338e080c9d443029a6" => :mojave - sha256 "312ca96b255aa045cd2c87150c58e020f49d50e7f354219d944a37de8ec0278c" => :high_sierra - end - - head do - url "https://github.com/libusb/libusb.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - def install - args = %W[--disable-dependency-tracking --prefix=#{prefix}] - - system "./autogen.sh" if build.head? - system "./configure", *args - system "make", "install" - (pkgshare/"examples").install Dir["examples/*"] - Dir["examples/Makefile*"] - end - - test do - cp_r (pkgshare/"examples"), testpath - cd "examples" do - system ENV.cc, "-lusb-1.0", "-L#{lib}", "-I#{include}/libusb-1.0", - "listdevs.c", "-o", "test" - system "./test" - end - end -end diff --git a/Formula/libusbmuxd.rb b/Formula/libusbmuxd.rb deleted file mode 100644 index 020f38d7b4736..0000000000000 --- a/Formula/libusbmuxd.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Libusbmuxd < Formula - desc "USB multiplexor library for iOS devices" - homepage "https://www.libimobiledevice.org/" - url "https://github.com/libimobiledevice/libusbmuxd/archive/2.0.2.tar.gz" - sha256 "8ae3e1d9340177f8f3a785be276435869363de79f491d05d8a84a59efc8a8fdc" - license "LGPL-2.1" - head "https://github.com/libimobiledevice/libusbmuxd.git" - - bottle do - cellar :any - sha256 "72fcc67099f03a3d68faa131eaf464a431e5d5eaea0a5ddb9b8414c065f7ef73" => :catalina - sha256 "132ee76aa823e51abb97c92c53ab8a30819720ced7020080f949cf4fd937f6ea" => :mojave - sha256 "67c3d43cb2a1ebfd68fba1c9b51b419288fedefc93f101adeea1b5f6bdf1ad77" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libplist" - depends_on "libusb" - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - source = free_port - dest = free_port - fork do - exec bin/"iproxy", "#{source}:#{dest}" - end - - sleep(2) - system "nc", "-z", "localhost", source - end -end diff --git a/Formula/libusrsctp.rb b/Formula/libusrsctp.rb deleted file mode 100644 index 7db927f029142..0000000000000 --- a/Formula/libusrsctp.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Libusrsctp < Formula - desc "Portable SCTP userland stack" - homepage "https://github.com/sctplab/usrsctp" - url "https://github.com/sctplab/usrsctp/archive/0.9.3.0.tar.gz" - sha256 "a4573b1cd7b8fc2fce476df61093736d3fea9eef5c87d72e66768c0a6b1f9e39" - license "BSD-3-Clause" - head "https://github.com/sctplab/usrsctp.git" - - bottle do - cellar :any - sha256 "de21e0c3c332c8fe847ad292d047168a9c3598c613a6a8f1f3e42082c15d9150" => :catalina - sha256 "a7f2fe014d976dc839bdad57f3ac07a9c11683e683643c2de76c9036f87e61f9" => :mojave - sha256 "8914ab47dadb25cf626662cde57d10f10a99915b4848d0302c92a61b40842c3f" => :high_sierra - sha256 "7d210faa7eb0101915c2f918ac0479c7bfc5faa251b389dfea68d94385823499" => :sierra - sha256 "c11f1c4bb7ee3b7d04520d711dfac56bc5a2aa8f4b3f1e952bd591d9918528dd" => :el_capitan - sha256 "2998a0f18ca069da692c9c2fd44f52e5ed9fa39c223dec3e8df7206f113bc0f4" => :yosemite - sha256 "8fc00b935739b4e06e75773c780e7e9617d655ecf2e31ffa9ca46900c1bbd5cb" => :mavericks - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() { - usrsctp_init(0, NULL, NULL); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lusrsctp", "-o", "test" - system "./test" - end -end diff --git a/Formula/libuv.rb b/Formula/libuv.rb deleted file mode 100644 index 8977f58235c83..0000000000000 --- a/Formula/libuv.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Libuv < Formula - desc "Multi-platform support library with a focus on asynchronous I/O" - homepage "https://github.com/libuv/libuv" - url "https://github.com/libuv/libuv/archive/v1.38.1.tar.gz" - sha256 "2177fca2426ac60c20f654323656e843dac4f568d46674544b78f416697bd32c" - head "https://github.com/libuv/libuv.git", :branch => "v1.x" - - bottle do - cellar :any - sha256 "012d3650f4b0e47216a8ccb77233f3acb8cd0be938ae2fd3759095b641df583e" => :catalina - sha256 "fc62cdd8db495791a5d2aa9209b5825dca9e84b8a35fe57d8ad5a912dd29bb00" => :mojave - sha256 "7e99c956433dce12612f6e1294281bcf3bd6fc24788e81465f7e2e1346439120" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - - def install - # This isn't yet handled by the make install process sadly. - cd "docs" do - system "make", "man" - system "make", "singlehtml" - man1.install "build/man/libuv.1" - doc.install Dir["build/singlehtml/*"] - end - - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - uv_loop_t* loop = malloc(sizeof *loop); - uv_loop_init(loop); - uv_loop_close(loop); - free(loop); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-luv", "-o", "test" - system "./test" - end -end diff --git a/Formula/libuvc.rb b/Formula/libuvc.rb deleted file mode 100644 index 0efe9d3486a77..0000000000000 --- a/Formula/libuvc.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Libuvc < Formula - desc "Cross-platform library for USB video devices" - homepage "https://github.com/ktossell/libuvc" - url "https://github.com/ktossell/libuvc/archive/v0.0.6.tar.gz" - sha256 "42175a53c1c704365fdc782b44233925e40c9344fbb7f942181c1090f06e2873" - head "https://github.com/ktossell/libuvc.git" - - bottle do - cellar :any - rebuild 1 - sha256 "4051cd7aa8dbf7a5e940a85f8c38900829e66cabfb00be22a592dd3a421e3cca" => :catalina - sha256 "1ff736e2499c4da037ff74ea31ebe2be23defd7e316ad974ff57cd9a712c7445" => :mojave - sha256 "c0ec2076095af1c5154bc43d18a5869b5678f026f1b3c76964f136e4ada07717" => :high_sierra - sha256 "1888941024fe1b8ca44f15b98e51390872286c0145806fbd0a61999bab225905" => :sierra - sha256 "4defbab7e171c20da065eb5e4f2b11b5b27165efbd850e742674be281f3a0fcd" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "libusb" - - def install - system "cmake", ".", *std_cmake_args - system "make" - system "make", "install" - end -end diff --git a/Formula/libvbucket.rb b/Formula/libvbucket.rb deleted file mode 100644 index 37c287d67dee4..0000000000000 --- a/Formula/libvbucket.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Libvbucket < Formula - desc "Utility library providing mapping to virtual buckets" - homepage "https://couchbase.com/develop/c/current" - url "https://s3.amazonaws.com/packages.couchbase.com/clients/c/libvbucket-1.8.0.4.tar.gz" - sha256 "398ba491d434fc109fd64f38678916e1aa19c522abc8c090dbe4e74a2a2ea38d" - license "Apache-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "3bad5f5bc0f7644ba2960c330016dd350ffe386620642c4fbb34dbbda840e36a" => :catalina - sha256 "99703e4bfe795310481070096dd496b41185cdde224aa2381a2a7b2dcc618278" => :mojave - sha256 "bce41a629d7cf6504a1d5fa518d31cc46fcc93b8c82187167d4ab9306f2d593d" => :high_sierra - sha256 "69c96d5758926202939b79930d82da27bd65d50e0ef19d844ac705cacd99ba58" => :sierra - sha256 "cc3333f73161a96deb410ae0b8185a74e0c2a5bc8e62018929b17efe6ef732b8" => :el_capitan - sha256 "dd69ae3261c461b15bd29e435ab95496441dfde4535cb7d6925527cdfa8c64dd" => :yosemite - sha256 "920f0656e62f10e6fc6649b0edc4a6f46dc196f931b7c14833608d9e926a4d09" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-docs" - system "make", "install" - end - - test do - json = JSON.generate( - "hashAlgorithm" => "CRC", - "numReplicas" => 2, - "serverList" => ["server1:11211", "server2:11210", "server3:11211"], - "vBucketMap" => [[0, 1, 2], [1, 2, 0], [2, 1, -1], [1, 2, 0]], - ) - - expected = <<~EOS - key: hello master: server1:11211 vBucketId: 0 couchApiBase: (null) replicas: server2:11210 server3:11211 - key: world master: server2:11210 vBucketId: 3 couchApiBase: (null) replicas: server3:11211 server1:11211 - EOS - - output = pipe_output("#{bin}/vbuckettool - hello world", json) - assert_equal expected, output - end -end diff --git a/Formula/libvidstab.rb b/Formula/libvidstab.rb deleted file mode 100644 index 7b98705e1c3a8..0000000000000 --- a/Formula/libvidstab.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Libvidstab < Formula - desc "Transcode video stabilization plugin" - homepage "http://public.hronopik.de/vid.stab/" - url "https://github.com/georgmartius/vid.stab/archive/v1.1.0.tar.gz" - sha256 "14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" - - bottle do - cellar :any - sha256 "20ea0ed1342cdc41222a0c47e785cfe3d2479f4b99108b56d0b93d8fb038c78c" => :catalina - sha256 "fc020f4ca29d8aeaab68a06d7f182cd0e4261ad761fd2cbde64a028f77b28ba5" => :mojave - sha256 "2d23e6352bda6577251800282d57be5520df2493a01a48d0f5716e1e1e95a465" => :high_sierra - sha256 "5ff2357b04a9bb854b9a09d3b6974f7c665e032948a95981357bf62b857a4099" => :sierra - sha256 "e3ed904feb361f98bc78ee3211ab6a13a4913f56e09213fecfb73f305c95dc45" => :el_capitan - sha256 "f12257af2bbd99c395152638cb8a76e654a838072c55cb7a1cc25bacef632cc8" => :yosemite - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", "-DUSE_OMP=OFF", *std_cmake_args - system "make", "install" - end -end diff --git a/Formula/libvirt-glib.rb b/Formula/libvirt-glib.rb deleted file mode 100644 index 17a083c92277f..0000000000000 --- a/Formula/libvirt-glib.rb +++ /dev/null @@ -1,65 +0,0 @@ -class LibvirtGlib < Formula - desc "Libvirt API for glib-based programs" - homepage "https://libvirt.org/" - url "https://libvirt.org/sources/glib/libvirt-glib-3.0.0.tar.gz" - sha256 "7fff8ca9a2b723dbfd04223b1c7624251c8bf79eb57ec27362a7301b2dd9ebfe" - license "LGPL-2.1" - - bottle do - sha256 "0e4ef4273857818f627595c15dbda1e69ef71a71ec4aaed88c33a6af96e65a80" => :catalina - sha256 "bfd1b4197f3069d72dd8da66002ee3f138f165eb9956e217ee7a36bd8cea1e15" => :mojave - sha256 "dde218b4644a43fd7fe9b47bd62e0d2ec0b7f52a4e6d68ca5413c3fd04da5800" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "intltool" => :build - depends_on "pkg-config" => :build - - depends_on "gettext" - depends_on "glib" - depends_on "libvirt" - - def install - # macOS ld does not support linker option: --version-script - # https://bugzilla.redhat.com/show_bug.cgi?id=1304981 - inreplace "libvirt-gconfig/Makefile.in", /^.*-Wl,--version-script=.*$\n/, "" - inreplace "libvirt-glib/Makefile.in", /^.*-Wl,--version-script=.*$\n/, "" - inreplace "libvirt-gobject/Makefile.in", /^.*-Wl,--version-script=.*$\n/, "" - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --enable-introspection - --prefix=#{prefix} - ] - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - int main() { - gvir_config_object_get_type(); - gvir_event_register(); - gvir_interface_get_type(); - return 0; - } - EOS - system ENV.cc, "test.cpp", - "-I#{MacOS.sdk_path}/usr/include/libxml2", - "-I#{Formula["glib"].include}/glib-2.0", - "-I#{Formula["glib"].lib}/glib-2.0/include", - "-I#{include}/libvirt-gconfig-1.0", - "-I#{include}/libvirt-glib-1.0", - "-I#{include}/libvirt-gobject-1.0", - "-L#{lib}", - "-lvirt-gconfig-1.0", - "-lvirt-glib-1.0", - "-lvirt-gobject-1.0", - "-o", "test" - system "./test" - end -end diff --git a/Formula/libvirt.rb b/Formula/libvirt.rb deleted file mode 100644 index c013709f15d46..0000000000000 --- a/Formula/libvirt.rb +++ /dev/null @@ -1,99 +0,0 @@ -class Libvirt < Formula - desc "C virtualization API" - homepage "https://www.libvirt.org/" - url "https://libvirt.org/sources/libvirt-6.5.0.tar.xz" - sha256 "4915d9eab299ed79288d7598b717c587156708c05f701fe55a72293f32eb3182" - license "LGPL-2.1" - head "https://github.com/libvirt/libvirt.git" - - bottle do - sha256 "df81313d97bb0d43ce9b01988b3f0fd2369bcd8461bbd149114c3b33cad443ef" => :catalina - sha256 "2a4e264b22ba97272751649d3b8bade2d384d10414b66e998d33427f40a89a2c" => :mojave - sha256 "9edb82e3ac08e1df44333f95b0bf98e59392358b2b686d9c2d7f4301b357992a" => :high_sierra - end - - depends_on "docutils" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gnutls" - depends_on "libgcrypt" - depends_on "yajl" - - if build.head? - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - depends_on "libtool" => :build - depends_on "rpcgen" => :build - end - - def install - args = %W[ - --prefix=#{prefix} - --localstatedir=#{var} - --mandir=#{man} - --sysconfdir=#{etc} - --with-esx - --with-init-script=none - --with-remote - --with-test - --with-vbox - --with-vmware - --with-qemu - ] - - args << "ac_cv_path_RPCGEN=#{Formula["rpcgen"].opt_prefix}/bin/rpcgen" if build.head? - - # Work around a gnulib issue with macOS Catalina - args << "gl_cv_func_ftello_works=yes" - - mkdir "build" do - system "../autogen.sh" if build.head? - system "../configure", *args - - # Compilation of docs doesn't get done if we jump straight to "make install" - system "make" - system "make", "install" - end - end - - plist_options :manual => "libvirtd" - - def plist - <<~EOS - - - - - EnvironmentVariables - - PATH - #{HOMEBREW_PREFIX}/bin - - Label - #{plist_name} - ProgramArguments - - #{sbin}/libvirtd - -f - #{etc}/libvirt/libvirtd.conf - - KeepAlive - - RunAtLoad - - - - EOS - end - - test do - if build.head? - output = shell_output("#{bin}/virsh -V") - assert_match "Compiled with support for:", output - else - output = shell_output("#{bin}/virsh -v") - assert_match version.to_s, output - end - end -end diff --git a/Formula/libvisio.rb b/Formula/libvisio.rb deleted file mode 100644 index 1e72c98175884..0000000000000 --- a/Formula/libvisio.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Libvisio < Formula - desc "Interpret and import Visio diagrams" - homepage "https://wiki.documentfoundation.org/DLP/Libraries/libvisio" - url "https://dev-www.libreoffice.org/src/libvisio/libvisio-0.1.7.tar.xz" - sha256 "8faf8df870cb27b09a787a1959d6c646faa44d0d8ab151883df408b7166bea4c" - revision 2 - - bottle do - cellar :any - sha256 "a32916487b500b927b22b2e3cbd0f3ec5de65a56dd5306472ee6dc09080c7a38" => :catalina - sha256 "2866289c378dcf276526de732f830dff28d1dbb12eb690209140e987b6bf2f10" => :mojave - sha256 "793fa03c334b4faea7b94c2b4e2992b40070358a94914272a119c411060baabd" => :high_sierra - end - - depends_on "cppunit" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "icu4c" - depends_on "librevenge" - - def install - # Needed for Boost 1.59.0 compatibility. - ENV["LDFLAGS"] = "-lboost_system-mt" - system "./configure", "--without-docs", - "-disable-dependency-tracking", - "--enable-static=no", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - librevenge::RVNGStringStream docStream(0, 0); - libvisio::VisioDocument::isSupported(&docStream); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-o", "test", - "-lrevenge-stream-0.0", - "-I#{Formula["librevenge"].include}/librevenge-0.0", - "-L#{Formula["librevenge"].lib}", - "-lvisio-0.1", "-I#{include}/libvisio-0.1", "-L#{lib}" - system "./test" - end -end diff --git a/Formula/libvmaf.rb b/Formula/libvmaf.rb deleted file mode 100644 index 8b3126ee3d059..0000000000000 --- a/Formula/libvmaf.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Libvmaf < Formula - desc "Perceptual video quality assessment based on multi-method fusion" - homepage "https://github.com/Netflix/vmaf" - url "https://github.com/Netflix/vmaf/archive/v1.5.2.tar.gz" - sha256 "5f7785da0b0d66b2513ce11d3f81d0a9b3f79d49483c4652fde3a31c13f644da" - - bottle do - cellar :any - sha256 "ebea199beb3b71bd3ed5310c4bcb93a42039085f0ebcc9209b94845f61bd3f5c" => :catalina - sha256 "ac339674e17c5facf37dcb6d2c39c612b4a05c023558958cb4de58b7affc3ad6" => :mojave - sha256 "dac4209abe54273cd033960401ee6392219c3bb972c4185499c970a64edcf084" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - - def install - Dir.chdir("libvmaf") do - system "meson", *std_meson_args, "build", "--buildtype", "release" - system "ninja", "-vC", "build" - system "ninja", "-vC", "build", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - return 0; - } - EOS - - flags = [ - "-I#{HOMEBREW_PREFIX}/include/libvmaf", - "-L#{lib}", - ] - - system ENV.cc, "test.c", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libvncserver.rb b/Formula/libvncserver.rb deleted file mode 100644 index 5cab7f316029f..0000000000000 --- a/Formula/libvncserver.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Libvncserver < Formula - desc "VNC server and client libraries" - homepage "https://libvnc.github.io/" - url "https://github.com/LibVNC/libvncserver/archive/LibVNCServer-0.9.13.tar.gz" - sha256 "0ae5bb9175dc0a602fe85c1cf591ac47ee5247b87f2bf164c16b05f87cbfa81a" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "c667ff09ee40d2ab0e8db25a51697ae62edd14496c1075f07015bf0ed372695e" => :catalina - sha256 "7e5799814cd2077d39c8d4c95806fa23c408d8a26c92140ba64f852b6a53567f" => :mojave - sha256 "f331a9fc3ba043f0febe78df7551630a5a28f9adb362a58384901192476dff89" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "jpeg-turbo" - depends_on "libgcrypt" - depends_on "libpng" - depends_on "openssl@1.1" - - def install - args = std_cmake_args + %W[ - -DJPEG_INCLUDE_DIR=#{Formula["jpeg-turbo"].opt_include} - -DJPEG_LIBRARY=#{Formula["jpeg-turbo"].opt_lib}/libjpeg.dylib - -DOPENSSL_ROOT_DIR=#{Formula["openssl@1.1"].opt_prefix} - ] - - mkdir "build" do - system "cmake", "..", *args - system "cmake", "--build", "." - system "ctest", "-V" - system "make", "install" - end - end - - test do - (testpath/"server.cpp").write <<~EOS - #include - int main(int argc,char** argv) { - rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,400,300,8,3,4); - server->frameBuffer=(char*)malloc(400*300*4); - rfbInitServer(server); - return(0); - } - EOS - - system ENV.cc, "server.cpp", "-I#{include}", "-L#{lib}", - "-lvncserver", "-lc++", "-o", "server" - system "./server" - end -end diff --git a/Formula/libvo-aacenc.rb b/Formula/libvo-aacenc.rb deleted file mode 100644 index 4716a94a565f0..0000000000000 --- a/Formula/libvo-aacenc.rb +++ /dev/null @@ -1,41 +0,0 @@ -class LibvoAacenc < Formula - desc "VisualOn AAC encoder library" - homepage "https://opencore-amr.sourceforge.io/" - url "https://downloads.sourceforge.net/project/opencore-amr/vo-aacenc/vo-aacenc-0.1.3.tar.gz" - sha256 "e51a7477a359f18df7c4f82d195dab4e14e7414cbd48cf79cc195fc446850f36" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "144e0c345d0567a74aba09cfec49fba8f409e2db5abcee96b598127cc5d722ad" => :catalina - sha256 "099ac7d191241c476ab4ba7375dd05e2d965adc6a7638cc616a99a243cbd077b" => :mojave - sha256 "761ecbbaaa2a944d077040692fc62fe2e929ec788ca7e23b3fb25e6ee1b88d3a" => :high_sierra - sha256 "9430e86c9f25aa9fcccf0a19cc6125c9397c23b311b993b1adf83cbe330cd9b4" => :sierra - sha256 "e9a59439f8eec4cdc4d273afb49cbd8f8357862d4d8c7c5d9d9d38588ec6d810" => :el_capitan - sha256 "cf63ddcb79e40b79264507393ed4fa1b223feecf4638f0e58fef464db722b554" => :yosemite - sha256 "645f4294e8512add5c5f263cd8273c93e22eab565307ada5f8804ef7b9d41d8d" => :mavericks - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - VO_MEM_INFO info; info.Size = 1; - VO_S32 uid = 0; - VO_PTR pMem = cmnMemAlloc(uid, &info); - cmnMemFree(uid, pMem); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lvo-aacenc", "-o", "test" - system "./test" - end -end diff --git a/Formula/libvoikko.rb b/Formula/libvoikko.rb deleted file mode 100644 index eb3ea4625642c..0000000000000 --- a/Formula/libvoikko.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Libvoikko < Formula - desc "Linguistic software and Finnish dictionary" - homepage "https://voikko.puimula.org/" - url "https://www.puimula.org/voikko-sources/libvoikko/libvoikko-4.3.tar.gz" - sha256 "e843df002fcea2a90609d87e4d6c28f8a0e23332d3b42979ab1793e18f839307" - revision 2 - - bottle do - cellar :any - sha256 "77b2e04b116979ed93b2b6371fa434433e770b944410a55b15b2174a45ff7b8d" => :catalina - sha256 "f9ab71db12a2457de1705ea205506efd2bacf3433a85cfecc00af01dc7430a5c" => :mojave - sha256 "e809b2d5759f6c04c20228d91598d767462354bc4a97bcb30daa017132cd01e7" => :high_sierra - end - - depends_on "foma" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "hfstospell" - - resource "voikko-fi" do - url "https://www.puimula.org/voikko-sources/voikko-fi/voikko-fi-2.3.tar.gz" - sha256 "37b7886a23cfbde472715ba1266e1a81e2a87c3f5ccce8ae23bd7b38bacdcec2" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-dictionary-path=#{HOMEBREW_PREFIX}/lib/voikko" - system "make", "install" - - resource("voikko-fi").stage do - ENV.append_path "PATH", bin.to_s - system "make", "vvfst" - system "make", "vvfst-install", "DESTDIR=#{lib}/voikko" - lib.install_symlink "voikko" - end - end - - test do - pipe_output("#{bin}/voikkospell -m", "onkohan\n") - end -end diff --git a/Formula/libvorbis.rb b/Formula/libvorbis.rb deleted file mode 100644 index d89be1fa075e8..0000000000000 --- a/Formula/libvorbis.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Libvorbis < Formula - desc "Vorbis General Audio Compression Codec" - homepage "https://xiph.org/vorbis/" - url "https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.xz" - sha256 "b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "432eb21045d9dfac3ef879648d845d894cc828862f5498448fe98c0141ef5cd0" => :catalina - sha256 "59509a351e88352f01512b54cc5cb849c2551623f7d6dcd6679d38b5e96032ed" => :mojave - sha256 "3e6609520d0ffd7179f721c23c1291f2735b70384d56d1c1dd10185ae355c4b2" => :high_sierra - end - - head do - url "https://gitlab.xiph.org/xiph/vorbis.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "libogg" - - resource("oggfile") do - url "https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg" - sha256 "379071af4fa77bc7dacf892ad81d3f92040a628367d34a451a2cdcc997ef27b0" - 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 - #include "vorbis/vorbisfile.h" - int main (void) { - OggVorbis_File vf; - assert (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) >= 0); - vorbis_info *vi = ov_info (&vf, -1); - printf("Bitstream is %d channel, %ldHz\\n", vi->channels, vi->rate); - printf("Encoded by: %s\\n", ov_comment(&vf,-1)->vendor); - return 0; - } - EOS - testpath.install resource("oggfile") - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lvorbisfile", - "-o", "test" - assert_match "2 channel, 44100Hz\nEncoded by: Xiph.Org libVorbis", - shell_output("./test < Example.ogg") - end -end diff --git a/Formula/libvpx.rb b/Formula/libvpx.rb deleted file mode 100644 index cb705c4f488ce..0000000000000 --- a/Formula/libvpx.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Libvpx < Formula - desc "VP8/VP9 video codec" - homepage "https://www.webmproject.org/code/" - url "https://github.com/webmproject/libvpx/archive/v1.8.2.tar.gz" - sha256 "8735d9fcd1a781ae6917f28f239a8aa358ce4864ba113ea18af4bb2dc8b474ac" - head "https://chromium.googlesource.com/webm/libvpx.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "4648d298037c5ac129b41e29a53a39445d7b1d90b90b4eef1eb1d476ae835ab5" => :catalina - sha256 "d509da7176f5db9dc3953b8380a84386a9e0c9c71ce9d50cd410f84679e00c48" => :mojave - sha256 "8b2b60c22848752acb6cc470105918932e5f3bf0a45e4af6f3154b1a79ac91c0" => :high_sierra - end - - depends_on "yasm" => :build - - def install - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --disable-examples - --disable-unit-tests - --enable-pic - --enable-vp9-highbitdepth - ] - - # https://bugs.chromium.org/p/webm/issues/detail?id=1475 - args << "--disable-avx512" if MacOS.version <= :el_capitan - - mkdir "macbuild" do - system "../configure", *args - system "make", "install" - end - end - - test do - system "ar", "-x", "#{lib}/libvpx.a" - end -end diff --git a/Formula/libvterm.rb b/Formula/libvterm.rb deleted file mode 100644 index 5769038d0fcbe..0000000000000 --- a/Formula/libvterm.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Libvterm < Formula - desc "C99 library which implements a VT220 or xterm terminal emulator" - homepage "http://www.leonerd.org.uk/code/libvterm/" - url "http://www.leonerd.org.uk/code/libvterm/libvterm-0.1.3.tar.gz" - sha256 "e41724466a4658e0f095e8fc5aeae26026c0726dce98ee71d6920d06f7d78e2b" - license "MIT" - version_scheme 1 - - bottle do - cellar :any - sha256 "74c971c0a3157f7b34c69360c7b76611dcbb949e50ba255603a70f3d643e7cca" => :catalina - sha256 "da5f5c504963d145c7a5e2ac9fd0fc0d9008251f98b11fbc6f818da59057c128" => :mojave - sha256 "3362cf826401b4c9d4012de2777eecd90b3b168b723f51371adb5eb18e22fbc9" => :high_sierra - end - - depends_on "libtool" => :build - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() { - vterm_free(vterm_new(1, 1)); - } - EOS - - system ENV.cc, "test.c", "-L#{lib}", "-lvterm", "-o", "test" - system "./test" - end -end diff --git a/Formula/libwandevent.rb b/Formula/libwandevent.rb deleted file mode 100644 index 625ef31b5db90..0000000000000 --- a/Formula/libwandevent.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Libwandevent < Formula - desc "API for developing event-driven programs" - homepage "https://research.wand.net.nz/software/libwandevent.php" - url "https://research.wand.net.nz/software/libwandevent/libwandevent-3.0.2.tar.gz" - sha256 "48fa09918ff94f6249519118af735352e2119dc4f9b736c861ef35d59466644a" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "f175ecabb18921593ddd08bbd0b2aaa5e0a24c85d2964be230cd3a1f0ede22ee" => :catalina - sha256 "1e1db4ade4de58ab9ca1f0545d91537b935b65e062d99737c288dd059a17da8e" => :mojave - sha256 "7593e96a9e76e4b67fa3851a3491c8d7cbd458ad53ff65b3a34b64e2f697e75b" => :high_sierra - sha256 "e4b00ade9387b8fdccf72bbe9edd0e334c69f23597f85dd1e6da02088703c286" => :sierra - sha256 "f1459d39284b520c17443c6bef5ccb641dfe1e20266a4f34071f6a87cd9669e4" => :el_capitan - sha256 "b8c90b8dca1d0ded39036d7f23b4e33857c7914e178ba8ac8870ab702f96fa04" => :yosemite - 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() { - wand_event_init(); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-L#{lib}", "-lwandevent", "-o", "test" - system "./test" - end -end diff --git a/Formula/libwbxml.rb b/Formula/libwbxml.rb deleted file mode 100644 index a3518d01179a4..0000000000000 --- a/Formula/libwbxml.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Libwbxml < Formula - desc "Library and tools to parse and encode WBXML documents" - homepage "https://github.com/libwbxml/libwbxml" - url "https://github.com/libwbxml/libwbxml/archive/libwbxml-0.11.7.tar.gz" - sha256 "35e2cf033066edebc0d96543c0bdde87273359e4f4e59291299d41e103bd6338" - head "https://github.com/libwbxml/libwbxml.git" - - bottle do - cellar :any - sha256 "4adbd8447466f7d3cbad72d5aff2730a87539dacd0638180cd39a9eaee11e174" => :catalina - sha256 "9077d1c9669a92c39590de8280678cbe3d50853e76d69fda6a476ba88d170845" => :mojave - sha256 "051a666b16d73e92e4910f40559d2bb5681ae4b5028a7f86959ad5f6bdb4e55a" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "graphviz" => :build - depends_on "wget" - - def install - # Sandbox fix: - # Install in Cellar & then automatically symlink into top-level Module path - inreplace "cmake/CMakeLists.txt", "${CMAKE_ROOT}/Modules/", - "#{share}/cmake/Modules" - - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DBUILD_DOCUMENTATION=ON" - system "make", "install" - end - end -end diff --git a/Formula/libwebm.rb b/Formula/libwebm.rb deleted file mode 100644 index 2eb1bbd1aad69..0000000000000 --- a/Formula/libwebm.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Libwebm < Formula - desc "WebM container" - homepage "https://www.webmproject.org/code/" - url "https://github.com/webmproject/libwebm/archive/libwebm-1.0.0.27.tar.gz" - sha256 "1332f43742aeae215fd8df1be6e363e753b17abb37447190e789299fe3edec77" - - bottle do - cellar :any_skip_relocation - sha256 "548a7393b909a559e08fbd6a0783ada345e0ef08b59f9b44588cc99d4420a040" => :catalina - sha256 "4238e3823e0e467e06492563d7f8c7603751419568ba621b6f644ad4ee5a30e6" => :mojave - sha256 "0df7605cdc3aff926c0ffbcf5d72cf12933781083890eeeacc10df82b317b7c2" => :high_sierra - sha256 "36f647efcc9d72881ad8998df30e3268ec0b69b81c872fc381e3d7126fa2da6e" => :sierra - sha256 "784418b8fc6006788c3a7c867cf675532fb7b86299ff9f8fb85d946c2e8cbc38" => :el_capitan - sha256 "c6c99d02e47ed6ec17821ab9386e49b40ffad45e30f58fdbae62395dc16def18" => :yosemite - sha256 "944eb5c9802b3f676e39e29b9eff89f2d5e1dcbeac1b2595f52b5df21369e561" => :mavericks - end - - depends_on "cmake" => :build - - def install - mkdir "macbuild" do - system "cmake", "..", *std_cmake_args - system "make" - lib.install "libwebm.a" - bin.install %w[sample sample_muxer vttdemux webm2pes] - end - include.install Dir.glob("mkv*.hpp") - include.install Dir.glob("vtt*.h") - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - mkvmuxer::MkvWriter writer(); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-lwebm", "-o", "test" - system "./test" - end -end diff --git a/Formula/libwebsockets.rb b/Formula/libwebsockets.rb deleted file mode 100644 index 1e1dfcab9522e..0000000000000 --- a/Formula/libwebsockets.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Libwebsockets < Formula - desc "C websockets server library" - homepage "https://libwebsockets.org/" - url "https://github.com/warmcat/libwebsockets/archive/v4.0.19.tar.gz" - sha256 "3bdf0fbf5c396f39d1bc48b7360d598a50209c2d143d03467d4f42cb8bf91c5f" - head "https://github.com/warmcat/libwebsockets.git" - - bottle do - sha256 "1c58b7f6e0fc788ec6bdbf1be8465b5ea66c3ac5aaa35f6994245b815e5c4324" => :catalina - sha256 "9e8a31e00e850e38cd5f354f707caaae8d24aac3034ae3f748192f9a47912157" => :mojave - sha256 "72eded73851def11c00c25a96c0934c8b9d67c20d8f6e5915bb4ae0bd605c2a6" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libevent" - depends_on "libuv" - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - system "cmake", ".", *std_cmake_args, - "-DLWS_IPV6=ON", - "-DLWS_WITH_HTTP2=ON", - "-DLWS_WITH_LIBEVENT=ON", - "-DLWS_WITH_LIBUV=ON", - "-DLWS_WITH_PLUGINS=ON", - "-DLWS_WITHOUT_TESTAPPS=ON", - "-DLWS_UNIX_SOCK=ON" - system "make" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - struct lws_context_creation_info info; - memset(&info, 0, sizeof(info)); - struct lws_context *context; - context = lws_create_context(&info); - lws_context_destroy(context); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{Formula["openssl@1.1"].opt_prefix}/include", - "-L#{lib}", "-lwebsockets", "-o", "test" - system "./test" - end -end diff --git a/Formula/libwmf.rb b/Formula/libwmf.rb deleted file mode 100644 index dd4bad85dd908..0000000000000 --- a/Formula/libwmf.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Libwmf < Formula - desc "Library for converting WMF (Window Metafile Format) files" - homepage "https://wvware.sourceforge.io/libwmf.html" - url "https://downloads.sourceforge.net/project/wvware/libwmf/0.2.8.4/libwmf-0.2.8.4.tar.gz" - sha256 "5b345c69220545d003ad52bfd035d5d6f4f075e65204114a9e875e84895a7cf8" - revision 2 - - bottle do - sha256 "4fa5b3dc0b38f72ac7c4d15f4e23bc96c0808d48de28005c4dc74d50292ddf62" => :catalina - sha256 "3e0e8ecd7072819856393b472017d1e7fc3995a6d8568c6ad65b7d1055efc2e7" => :mojave - sha256 "a96fe2e0aef8cd0f8eecce05b8789c2637f973a6ae358924c451b8f36b3a70ef" => :high_sierra - sha256 "9df806eb6a4a3ca1a2b4b656ff02623175892981fbf136c89d4df5b5853bd20c" => :sierra - sha256 "205bf519460576ecf73e9314ba1171542be58ea22cea81c26424d661734f2d2f" => :el_capitan - sha256 "3554c19cc80eb6435ad630587a38dd094a3f33008c11a93a622f1eb62b2a3e2e" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "gd" - depends_on "jpeg" - depends_on "libpng" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-png=#{Formula["libpng"].opt_prefix}", - "--with-freetype=#{Formula["freetype"].opt_prefix}" - system "make" - ENV.deparallelize # yet another rubbish Makefile - system "make", "install" - end -end diff --git a/Formula/libwpd.rb b/Formula/libwpd.rb deleted file mode 100644 index d977da0cdf032..0000000000000 --- a/Formula/libwpd.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libwpd < Formula - desc "General purpose library for reading WordPerfect files" - homepage "https://libwpd.sourceforge.io/" - url "https://dev-www.libreoffice.org/src/libwpd-0.10.3.tar.xz" - sha256 "2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09" - - bottle do - cellar :any - sha256 "edb924ac33633d851f162839c2e1ef57734c81bd5a6d3d2cde7750175bd19386" => :catalina - sha256 "b9cdcbf1e0c875c8666f16a9547386754c40607652b0255d6eda8b2afb2da229" => :mojave - sha256 "baba04ac2fc8bcd2bbf890f8d7e3e27f7eae3044d960f027634e3d0310447dc8" => :high_sierra - sha256 "f4ef8b16411ea32e77e35bf0a8109b5f7651931e885ffd4ad7a8933a12d4f749" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libgsf" - depends_on "librevenge" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - return libwpd::WPD_OK; - } - EOS - system ENV.cc, "test.cpp", - "-I#{Formula["librevenge"].opt_include}/librevenge-0.0", - "-I#{include}/libwpd-0.10", - "-L#{Formula["librevenge"].opt_lib}", - "-L#{lib}", - "-lwpd-0.10", "-lrevenge-0.0", - "-o", "test" - system "./test" - end -end diff --git a/Formula/libwpg.rb b/Formula/libwpg.rb deleted file mode 100644 index f5be9b675ae1a..0000000000000 --- a/Formula/libwpg.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Libwpg < Formula - desc "Library for reading and parsing Word Perfect Graphics format" - homepage "https://libwpg.sourceforge.io/" - url "https://dev-www.libreoffice.org/src/libwpg-0.3.3.tar.xz" - sha256 "99b3f7f8832385748582ab8130fbb9e5607bd5179bebf9751ac1d51a53099d1c" - - bottle do - cellar :any - sha256 "d12ae12e729a2d2e327f07fe927e02dd15151a987b7cab0a19ca94ee15f8cfde" => :catalina - sha256 "162171b22e6df4f4f4169634fc6872d40bea9a17a9c49e01dd737e9d74b1d445" => :mojave - sha256 "dd0c4dc2a9369d7d6b97f930dd63e6f4ddd9d12d0372c12e13d2a22cf6a0cd06" => :high_sierra - sha256 "cf9ab0d990b3fccb101312999f6d0ea5980990edd279ae994cf3c7f9c33a7d55" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "librevenge" - depends_on "libwpd" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - return libwpg::WPG_AUTODETECT; - } - EOS - system ENV.cc, "test.cpp", - "-I#{Formula["librevenge"].opt_include}/librevenge-0.0", - "-I#{include}/libwpg-0.3", - "-L#{Formula["librevenge"].opt_lib}", - "-L#{lib}", - "-lwpg-0.3", "-lrevenge-0.0", - "-o", "test" - system "./test" - end -end diff --git a/Formula/libwps.rb b/Formula/libwps.rb deleted file mode 100644 index ddad2f7f303cc..0000000000000 --- a/Formula/libwps.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Libwps < Formula - desc "Library to import files in MS Works format" - homepage "https://libwps.sourceforge.io/" - url "https://downloads.sourceforge.net/project/libwps/libwps/libwps-0.4.11/libwps-0.4.11.tar.xz" - sha256 "a8fdaabc28654a975fa78c81873ac503ba18f0d1cdbb942f470a21d29284b4d1" - - bottle do - cellar :any - sha256 "61b3ad745560c34d24735c1459f418ab083ea80aba8b0b6a64595fafd1916a4a" => :catalina - sha256 "ca320b85cbcd3f8bf8d17bc5133c99fb83509d88e2e7c5cff4da6c11b2df36ad" => :mojave - sha256 "ab40a8031a5971abede418b01d851e3ad3031da72f42ad9e5e4a7ac40b6acc0e" => :high_sierra - end - - depends_on "boost" => :build - depends_on "pkg-config" => :build - depends_on "librevenge" - depends_on "libwpd" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - # Installing Doxygen docs trips up make install - "--prefix=#{prefix}", "--without-docs" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - return libwps::WPS_OK; - } - EOS - system ENV.cc, "test.cpp", "-o", "test", - "-lrevenge-0.0", - "-I#{Formula["librevenge"].include}/librevenge-0.0", - "-L#{Formula["librevenge"].lib}", - "-lwpd-0.10", - "-I#{Formula["libwpd"].include}/libwpd-0.10", - "-L#{Formula["libwpd"].lib}", - "-lwps-0.4", "-I#{include}/libwps-0.4", "-L#{lib}" - system "./test" - end -end diff --git a/Formula/libxc.rb b/Formula/libxc.rb deleted file mode 100644 index a0b13fac453be..0000000000000 --- a/Formula/libxc.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Libxc < Formula - desc "Library of exchange and correlation functionals for codes" - homepage "https://tddft.org/programs/libxc/" - url "https://gitlab.com/libxc/libxc/-/archive/4.3.4/libxc-4.3.4.tar.bz2" - sha256 "0efe8b33d151de8787e33c4ba8e2161ffb9da978753f3bd12c5c0a018e7d3ef5" - license "MPL-2.0" - revision 1 - - bottle do - cellar :any - sha256 "77bb1192676ef031b3254e36f443b48163c2e6926afc959feaa84b4952a5b642" => :catalina - sha256 "069042e1d8511e2025e289cb3daec98728304df3a7521aced7103581686d74c8" => :mojave - sha256 "e84708fbaa5746ef8d25b57d34a5127501096ffacaa448b17d5b87ad4e81ae0b" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "gcc" # for gfortran - - def install - system "autoreconf", "-fiv" - system "./configure", "--prefix=#{prefix}", - "--enable-shared", - "FCCPP=gfortran -E -x c", - "CC=#{ENV.cc}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() - { - int major, minor, micro; - xc_version(&major, &minor, µ); - printf(\"%d.%d.%d\", major, minor, micro); - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-lxc", "-I#{include}", "-o", "ctest" - system "./ctest" - - (testpath/"test.f90").write <<~EOS - program lxctest - use xc_f90_types_m - use xc_f90_lib_m - end program lxctest - EOS - system "gfortran", "test.f90", "-L#{lib}", "-lxc", "-I#{include}", - "-o", "ftest" - system "./ftest" - end -end diff --git a/Formula/libxdg-basedir.rb b/Formula/libxdg-basedir.rb deleted file mode 100644 index 2d3b9eee40219..0000000000000 --- a/Formula/libxdg-basedir.rb +++ /dev/null @@ -1,42 +0,0 @@ -class LibxdgBasedir < Formula - desc "C implementation of the XDG Base Directory specifications" - homepage "https://github.com/devnev/libxdg-basedir" - url "https://github.com/devnev/libxdg-basedir/archive/libxdg-basedir-1.2.0.tar.gz" - sha256 "1c2b0032a539033313b5be2e48ddd0ae94c84faf21d93956d53562eef4614868" - license "MIT" - - bottle do - cellar :any - sha256 "3d1776b30c96451960647fe4dbac15af5c6c2d85907731a54eeaf6456915a8a2" => :catalina - sha256 "d737fa3c4f67f250dd7443702868bc4204cff2d05bc7bf0efe54e7efe64655fa" => :mojave - sha256 "f5b940765c84d65ecd0baddcc03eab2bc612a090db48e6309b411f13e7a3c714" => :high_sierra - sha256 "00953ec922b6ebac6e27b1f8e1139fcc1cc5b9f8312dc8d0ebe69778c884c1b7" => :sierra - sha256 "30b3e34a46470f11d90ca01aebd2b2d1fbaa6cc8a05c1bcec7067d40fdec75d1" => :el_capitan - sha256 "7e165b0e949f559789981a5c0e0fd68bbf478943a0c9b03ad3778cecb0219691" => :yosemite - sha256 "5c7bfadf4ca8b26c077eea7480df5a4ca3634b5823860a06ce2756050acbe84a" => :mavericks - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "./autogen.sh", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - xdgHandle handle; - if (!xdgInitHandle(&handle)) return 1; - xdgWipeHandle(&handle); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-L#{lib}", "-lxdg-basedir", "-o", "test" - system "./test" - end -end diff --git a/Formula/libxdiff.rb b/Formula/libxdiff.rb deleted file mode 100644 index 2d430ff541709..0000000000000 --- a/Formula/libxdiff.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Libxdiff < Formula - desc "Implements diff functions for binary and text files" - homepage "http://www.xmailserver.org/xdiff-lib.html" - url "http://www.xmailserver.org/libxdiff-0.23.tar.gz" - sha256 "e9af96174e83c02b13d452a4827bdf47cb579eafd580953a8cd2c98900309124" - license "LGPL-2.1" - - bottle do - cellar :any - rebuild 1 - sha256 "bb5dedb22ce363d4c6b8f46d3059dc81d68ba3627aaaff8efcdaa6c6b2c2ea37" => :catalina - sha256 "9d9c3f473efd5d1a2edc928e12e12552cacbc40183042945b3bbef47532145e4" => :mojave - sha256 "46a8499130fcdafc69e79436a77338398139b7ac54b3ae5f0ca9ba75b9f7efc9" => :high_sierra - sha256 "4a29b90dc48e4ce505bb50e575cc91107df8d93a90fe49ab4ec02df6118158ec" => :sierra - sha256 "55d89877bd5457b7a5b77cf68187f544ff413228ec17a701e7879644ae528f35" => :el_capitan - sha256 "6269c8d291cea44aceda9bd8e1e93a061e64d76852e47b781ae49aee28f0c31c" => :yosemite - sha256 "eb1a482e6da44ad722af99334618ddb17da926f4c88a8c85361e04ce0e59bb54" => :mavericks - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end -end diff --git a/Formula/libxkbcommon.rb b/Formula/libxkbcommon.rb deleted file mode 100644 index 2d9bcd0044b7e..0000000000000 --- a/Formula/libxkbcommon.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libxkbcommon < Formula - desc "Keyboard handling library" - homepage "https://xkbcommon.org/" - url "https://xkbcommon.org/download/libxkbcommon-0.10.0.tar.xz" - sha256 "57c3630cdc38fb4734cd57fa349e92244f5ae3862813e533cedbd86721a0b6f2" - head "https://github.com/xkbcommon/libxkbcommon.git" - - bottle do - cellar :any - sha256 "4cdb1253e94b84d437d265c6e7c893c0bd4ab250de217c1326bc7192917dd53b" => :catalina - sha256 "d3f1d57e7ac3f00e3ddf5b95f24446ea09b254d880757ca928ab6f3873aad215" => :mojave - sha256 "d9faf6a0432c5c26d3245d401899ee7a4230eade04cdd36995fa49748d1a8a62" => :high_sierra - end - - depends_on "bison" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on :x11 - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Denable-wayland=false", "-Denable-docs=false", ".." - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() { - return (xkb_context_new(XKB_CONTEXT_NO_FLAGS) == NULL) - ? EXIT_FAILURE - : EXIT_SUCCESS; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lxkbcommon", - "-o", "test" - system "./test" - end -end diff --git a/Formula/libxlsxwriter.rb b/Formula/libxlsxwriter.rb deleted file mode 100644 index d4dbb0bb1132b..0000000000000 --- a/Formula/libxlsxwriter.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Libxlsxwriter < Formula - desc "C library for creating Excel XLSX files" - homepage "https://libxlsxwriter.github.io/" - url "https://github.com/jmcnamara/libxlsxwriter/archive/RELEASE_0.9.5.tar.gz" - sha256 "a42daf9a96a5ba24d46a56bd0ad0d44bc4bc35f73b8aed22c4fa5f8f3e8eb8be" - - bottle do - cellar :any - sha256 "aa4dfa3809039590f7e5284ab4ea0457d351d7b5983ec7f3ff62a944d1e0392c" => :catalina - sha256 "71bfed5e6a4a29cfc504ca53036555a642da48e7768e0a7520ee7e4835f919dd" => :mojave - sha256 "e0a34105b51af1ee4ff32a5e8bbbb9fd853b19b3d860c79396d583834ec8708f" => :high_sierra - end - - uses_from_macos "zlib" - - def install - system "make", "install", "PREFIX=#{prefix}", "V=1" - end - - test do - (testpath/"test.c").write <<~EOS - #include "xlsxwriter.h" - - int main() { - lxw_workbook *workbook = workbook_new("myexcel.xlsx"); - lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL); - int row = 0; - int col = 0; - - worksheet_write_string(worksheet, row, col, "Hello me!", NULL); - - return workbook_close(workbook); - } - EOS - - system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lxlsxwriter", "-o", "test" - system "./test" - assert_predicate testpath/"myexcel.xlsx", :exist?, "Failed to create xlsx file" - end -end diff --git a/Formula/libxmi.rb b/Formula/libxmi.rb deleted file mode 100644 index 0e6832975f4e1..0000000000000 --- a/Formula/libxmi.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Libxmi < Formula - desc "C/C++ function library for rasterizing 2D vector graphics" - homepage "https://www.gnu.org/software/libxmi/" - url "https://ftp.gnu.org/gnu/libxmi/libxmi-1.2.tar.gz" - mirror "https://ftpmirror.gnu.org/libxmi/libxmi-1.2.tar.gz" - sha256 "9d56af6d6c41468ca658eb6c4ba33ff7967a388b606dc503cd68d024e08ca40d" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "eabebd41538c5b53f5ac3d25e71636b8d3561150f4622769107c58a10283e525" => :catalina - sha256 "ee621ddddf3165736ebe0eb44ee0ea4eac0080ca328404311de57acc99402694" => :mojave - sha256 "b4fae54573368c35c388850617545ab6f3fdd59bdcc8dde766e863b605278a40" => :high_sierra - sha256 "d14120dd7ec249b6375da84c5dbf49631d8e8aaf7c0ee9e6c8e9c42f341cc91f" => :sierra - sha256 "d7be88ce4d945b11adc82fe6bac6aca8a837e0206cd781e4cab82c8c1b684e20" => :el_capitan - sha256 "b8a406a6559eb59890d519e41c824f75f1b37027e6dda108f3648d85480ba5f8" => :yosemite - sha256 "fe1bd51baf04d248d233d92ed8c2343d49b03e09427dd6774a86cabfc21372e9" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--infodir=#{info}" - system "make", "install" - end -end diff --git a/Formula/libxml++.rb b/Formula/libxml++.rb deleted file mode 100644 index 0405b20f1c7d1..0000000000000 --- a/Formula/libxml++.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Libxmlxx < Formula - desc "C++ wrapper for libxml" - homepage "https://libxmlplusplus.sourceforge.io/" - url "https://download.gnome.org/sources/libxml++/2.40/libxml++-2.40.1.tar.xz" - sha256 "4ad4abdd3258874f61c2e2a41d08e9930677976d303653cd1670d3e9f35463e9" - revision 2 - - bottle do - cellar :any - sha256 "a4db0095b32a8f25e953f5cab64447d721ad9ff51c9b968a311519a04fe1068c" => :catalina - sha256 "720d42ff48194360d192e9166697a8e299268ac2722c5c8b599fc2898cbd1def" => :mojave - sha256 "9f25cf8395b3a06dbfe5d7dc2ddc320e2491211bedbe95ddac53b748eca9a31e" => :high_sierra - sha256 "074c4e2583789fd71bb88abbb230cee7a55d17bece2ff8630feeb895b0c5fddf" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "glibmm" - - uses_from_macos "libxml2" - - 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[]) - { - xmlpp::Document document; - document.set_internal_subset("homebrew", "", "https://www.brew.sh/xml/test.dtd"); - xmlpp::Element *rootnode = document.create_root_node("homebrew"); - return 0; - } - EOS - ENV.libxml2 - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - libsigcxx = Formula["libsigc++@2"] - flags = %W[ - -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}/libxml++-2.6 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/libxml++-2.6/include - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -lglib-2.0 - -lglibmm-2.4 - -lgobject-2.0 - -lintl - -lsigc-2.0 - -lxml++-2.6 - -lxml2 - ] - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libxml++3.rb b/Formula/libxml++3.rb deleted file mode 100644 index 7d49071b7e163..0000000000000 --- a/Formula/libxml++3.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Libxmlxx3 < Formula - desc "C++ wrapper for libxml" - homepage "https://libxmlplusplus.sourceforge.io/" - url "https://download.gnome.org/sources/libxml++/3.2/libxml++-3.2.0.tar.xz" - sha256 "b786fae7fd7820d356698069a787d107995c3efcbef50d8f4efd3766ab768e4f" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "583c5345ed243a5cea2bbf82e71a130e85554110ebe3927183171c66225a7c26" => :catalina - sha256 "054180f67aa9d297a26c40fc9e6dcc27bf68e78f09db895b3821c68751eabae2" => :mojave - sha256 "2da0d0f6e732f910e75e5b20c19a01056854d00feab6e1c2490b7722bbc1af29" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "glibmm" - - uses_from_macos "libxml2" - - 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[]) - { - xmlpp::Document document; - document.set_internal_subset("homebrew", "", "https://www.brew.sh/xml/test.dtd"); - xmlpp::Element *rootnode = document.create_root_node("homebrew"); - return 0; - } - EOS - ENV.libxml2 - gettext = Formula["gettext"] - glib = Formula["glib"] - glibmm = Formula["glibmm"] - libsigcxx = Formula["libsigc++@2"] - flags = %W[ - -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}/libxml++-3.0 - -I#{libsigcxx.opt_include}/sigc++-2.0 - -I#{libsigcxx.opt_lib}/sigc++-2.0/include - -I#{lib}/libxml++-3.0/include - -L#{gettext.opt_lib} - -L#{glib.opt_lib} - -L#{glibmm.opt_lib} - -L#{libsigcxx.opt_lib} - -L#{lib} - -lglib-2.0 - -lglibmm-2.4 - -lgobject-2.0 - -lintl - -lsigc-2.0 - -lxml++-3.0 - -lxml2 - ] - system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags - system "./test" - end -end diff --git a/Formula/libxml2.rb b/Formula/libxml2.rb deleted file mode 100644 index 4b2c5a77d15ec..0000000000000 --- a/Formula/libxml2.rb +++ /dev/null @@ -1,91 +0,0 @@ -class Libxml2 < Formula - desc "GNOME XML library" - homepage "http://xmlsoft.org/" - url "http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/libxml2/libxml2-2.9.10.tar.gz" - sha256 "aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f" - revision 1 - - bottle do - cellar :any - sha256 "bab6280370d9e7171d34e79ed1c1caa9b0b772ef7a1568f448a654255a505d5e" => :catalina - sha256 "7185d4c64a25e546eaf525134210bfb21edffb0bfa93c122e4696ab3788cfbf3" => :mojave - sha256 "bff3e730b9531c1b5088d49633a740eb27938961dc762b7de344e06d85ea20ee" => :high_sierra - end - - head do - url "https://gitlab.gnome.org/GNOME/libxml2.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - end - - keg_only :provided_by_macos - - depends_on "python@3.8" - depends_on "readline" - - uses_from_macos "zlib" - - # Fix crash when using Python 3 using Fedora's patch. - # Reported upstream: - # https://bugzilla.gnome.org/show_bug.cgi?id=789714 - # https://gitlab.gnome.org/GNOME/libxml2/issues/12 - patch do - url "https://bugzilla.opensuse.org/attachment.cgi?id=746044" - sha256 "37eb81a8ec6929eed1514e891bff2dd05b450bcf0c712153880c485b7366c17c" - end - - # Resolves CVE-2018-8048, CVE-2018-3740, CVE-2018-3741 - # Upstream hasn't patched this bug, but Nokogiri distributes - # libxml2 with this patch to fixe this issue - # https://bugzilla.gnome.org/show_bug.cgi?id=769760 - # https://github.com/sparklemotion/nokogiri/pull/1746 - patch do - url "https://raw.githubusercontent.com/sparklemotion/nokogiri/38721829c1df30e93bdfbc88095cc36838e497f3/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch" - sha256 "c755e6e17c02584bfbfc8889ffc652384b010c0bd71879d7ff121ca60a218fcd" - end - - def install - system "autoreconf", "-fiv" if build.head? - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-history", - "--without-python", - "--without-lzma" - system "make", "install" - - cd "python" do - # We need to insert our include dir first - inreplace "setup.py", "includes_dir = [", - "includes_dir = ['#{include}', '#{MacOS.sdk_path}/usr/include'," - system Formula["python@3.8"].opt_bin/"python3", "setup.py", "install", "--prefix=#{prefix}" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0"); - xmlNodePtr root_node = xmlNewNode(NULL, BAD_CAST "root"); - xmlDocSetRootElement(doc, root_node); - xmlFreeDoc(doc); - return 0; - } - EOS - args = shell_output("#{bin}/xml2-config --cflags --libs").split - args += %w[test.c -o test] - system ENV.cc, *args - system "./test" - - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_path "PYTHONPATH", lib/"python#{xy}/site-packages" - system Formula["python@3.8"].opt_bin/"python3", "-c", "import libxml2" - end -end diff --git a/Formula/libxmlsec1.rb b/Formula/libxmlsec1.rb deleted file mode 100644 index 9d1062373d2bb..0000000000000 --- a/Formula/libxmlsec1.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Libxmlsec1 < Formula - desc "XML security library" - homepage "https://www.aleksey.com/xmlsec/" - url "https://www.aleksey.com/xmlsec/download/xmlsec1-1.2.30.tar.gz" - sha256 "2d84360b03042178def1d9ff538acacaed2b3a27411db7b2874f1612ed71abc8" - - bottle do - cellar :any - sha256 "4214643458e159a5de8d558ac93c0f9a96c862cde71bc4f14a794d797304bd31" => :catalina - sha256 "75031c634f924e22948121de02ad29408bc961cb7589f908bd02f67bfa576f69" => :mojave - sha256 "50aab4085561db3c215d0020117f2585cf078125c58fa24174904cf1d001cd21" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gnutls" # Yes, it wants both ssl/tls variations - depends_on "libgcrypt" - depends_on "libxml2" - depends_on "openssl@1.1" - - # Add HOMEBREW_PREFIX/lib to dl load path - patch :DATA - - def install - args = ["--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-crypto-dl", - "--disable-apps-crypto-dl", - "--with-openssl=#{Formula["openssl@1.1"].opt_prefix}"] - - system "./configure", *args - system "make", "install" - end - - test do - system "#{bin}/xmlsec1", "--version" - system "#{bin}/xmlsec1-config", "--version" - end -end - -__END__ -diff --git a/src/dl.c b/src/dl.c -index 6e8a56a..0e7f06b 100644 ---- a/src/dl.c -+++ b/src/dl.c -@@ -141,6 +141,7 @@ xmlSecCryptoDLLibraryCreate(const xmlChar* name) { - } - - #ifdef XMLSEC_DL_LIBLTDL -+ lt_dlsetsearchpath("HOMEBREW_PREFIX/lib"); - lib->handle = lt_dlopenext((char*)lib->filename); - if(lib->handle == NULL) { - xmlSecError(XMLSEC_ERRORS_HERE, diff --git a/Formula/libxmp-lite.rb b/Formula/libxmp-lite.rb deleted file mode 100644 index 9dffd2d95e9a4..0000000000000 --- a/Formula/libxmp-lite.rb +++ /dev/null @@ -1,45 +0,0 @@ -class LibxmpLite < Formula - desc "Lite libxmp" - homepage "https://xmp.sourceforge.io/" - url "https://downloads.sourceforge.net/project/xmp/libxmp/4.4.1/libxmp-lite-4.4.1.tar.gz" - sha256 "bce9cbdaa19234e08e62660c19ed9a190134262066e7f8c323ea8ad2ac20dc39" - - bottle do - cellar :any - sha256 "a155be151ab2b536aae7aa7cb44999b8e1dc5a210b06af6f18265eb4037fd6ab" => :catalina - sha256 "d1956ebfe2812cededb97f6717925f21ca1a71dbd8b4211792369cb0a9f3c74f" => :mojave - sha256 "e0b20b3d4fcd64e4c90b9d704ee5621739bf633bdf8bd71bd1b2cb713a2b0284" => :high_sierra - sha256 "d1ed5c1803f622508c3e20bb9c48f9bc644d0d639574aaa298724dd0aa17262d" => :sierra - sha256 "a8fcd7a5ab446a221b7444b90191656175f6060a0730a703e4f862c4f49690f4" => :el_capitan - sha256 "448d0a4bcd651c44551a1d3785de1c0181cce1ee374cd7903a629cb200a3011d" => :yosemite - end - - # Remove for > 4.4.1 - # Fix build failure "dyld: Symbol not found: _it_loader" - # Upstream commit "libxmp-lite building (wrong format loaders)" - # Already in master. Original PR 6 Nov 2016 https://github.com/cmatsuoka/libxmp/pull/82 - patch :p2 do - url "https://github.com/cmatsuoka/libxmp/commit/a028835.patch?full_index=1" - sha256 "74b8689dcc23943168c6ae6afbda94dbcca78d08caae860b31ff573610ec5f92" - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~'EOS' - #include - #include - - int main(int argc, char* argv[]){ - printf("libxmp-lite %s/%c%u\n", XMP_VERSION, *xmp_version, xmp_vercode); - return 0; - } - EOS - - system ENV.cc, "-I", include, "-L", lib, "-L#{lib}", "-lxmp-lite", "test.c", "-o", "test" - system "#{testpath}/test" - end -end diff --git a/Formula/libxmp.rb b/Formula/libxmp.rb deleted file mode 100644 index 21945368c92e5..0000000000000 --- a/Formula/libxmp.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Libxmp < Formula - desc "C library for playback of module music (MOD, S3M, IT, etc)" - homepage "https://xmp.sourceforge.io/" - url "https://downloads.sourceforge.net/project/xmp/libxmp/4.4.1/libxmp-4.4.1.tar.gz" - sha256 "353535cc84c8cddae8decec4e65fa4c51fc64f22eb0891bc3dae6eaf25f9cccf" - - bottle do - cellar :any - sha256 "4c1af5c4637210c681480ae62e67de516f0a9a3fa4deb2781013d40decc7cc38" => :catalina - sha256 "d86f0bd86f2cada740f5a87d9f18216b30e2383d9d572200c5a684fd73b8a9a4" => :mojave - sha256 "642c904938aa1797b3512f3f820283d4104a8153d2b0144003110accdc48a877" => :high_sierra - sha256 "019ff8e51453bf527ba6ec46fd289acc5396208e230445afb0332a18752d72e2" => :sierra - sha256 "8da81ed699c312c831be38295df20218663fef23aec1cab91afa7e425baaa4ab" => :el_capitan - sha256 "dd80b8a6786f265488503234bb7aecffa15ab0a5c099677fd0989fd3329709d2" => :yosemite - end - - head do - url "https://git.code.sf.net/p/xmp/libxmp.git" - depends_on "autoconf" => :build - end - - # 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 "autoconf" if build.head? - system "./configure", "--prefix=#{prefix}" - system "make", "install" - - pkgshare.install resource("demo_mods") - end - - test do - test_mod = "#{pkgshare}/give-me-an-om.mod" - (testpath/"libxmp_test.c").write <<~EOS - #include - #include "xmp.h" - - int main(int argc, char** argv) - { - char* mod = argv[1]; - xmp_context context; - struct xmp_module_info mi; - - context = xmp_create_context(); - if (xmp_load_module(context, mod) != 0) { - puts("libxmp failed to open module!"); - return 1; - } - - xmp_get_module_info(context, &mi); - puts(mi.mod->name); - return 0; - } - EOS - - system ENV.cc, "libxmp_test.c", "-L#{lib}", "-lxmp", "-o", "libxmp_test" - assert_equal "give me an om", shell_output("\"#{testpath}/libxmp_test\" #{test_mod}").chomp - end -end diff --git a/Formula/libxo.rb b/Formula/libxo.rb deleted file mode 100644 index 518c5e08b54cf..0000000000000 --- a/Formula/libxo.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Libxo < Formula - desc "Allows an application to generate text, XML, JSON, and HTML output" - homepage "https://juniper.github.io/libxo/libxo-manual.html" - url "https://github.com/Juniper/libxo/releases/download/1.4.0/libxo-1.4.0.tar.gz" - sha256 "aa842d9374bc0c640d9526abdeb6f1dc75c1a14e892eafd3c9e0ee2e8dfc1c43" - - bottle do - sha256 "3dffbef9394a617fa8c901c44ce7b31b8843c947762744a8ea1374780d5c1224" => :catalina - sha256 "9c137a2e9828de98fb201d4d8da74eda20e6a276d90a83d8d1fa3017ba7059d1" => :mojave - sha256 "59d5d434c2ec21fb06dd22b87780e82a31b6eebfd9db795fafece858bc1e4755" => :high_sierra - end - - depends_on "libtool" => :build - - 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 - int main() { - xo_set_flags(NULL, XOF_KEYS); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lxo", "-o", "test" - system "./test" - end -end diff --git a/Formula/libxslt.rb b/Formula/libxslt.rb deleted file mode 100644 index 0e322872bf812..0000000000000 --- a/Formula/libxslt.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Libxslt < Formula - desc "C XSLT library for GNOME" - homepage "http://xmlsoft.org/XSLT/" - url "http://xmlsoft.org/sources/libxslt-1.1.34.tar.gz" - sha256 "98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f" - - bottle do - cellar :any - sha256 "cbadecf3186f45754220dff4cbdfbb576882a211d615b52249a4c9d8ba4d7c3a" => :catalina - sha256 "6feb1b8d57dd0d8b651733720d4dac728d2e27cf8c9fa9f88e60612fe0a0c882" => :mojave - sha256 "733c15b756070866d08196dcd5eef9facea1ce98d9c233cd6bf73fa426e0d062" => :high_sierra - end - - head do - url "https://gitlab.gnome.org/GNOME/libxslt.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - keg_only :provided_by_macos - - depends_on "libxml2" - - def install - system "autoreconf", "-fiv" if build.head? - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--without-python", - "--with-libxml-prefix=#{Formula["libxml2"].opt_prefix}" - system "make" - system "make", "install" - end - - def caveats - <<~EOS - To allow the nokogiri gem to link against this libxslt run: - gem install nokogiri -- --with-xslt-dir=#{opt_prefix} - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/xslt-config --version") - end -end diff --git a/Formula/libxspf.rb b/Formula/libxspf.rb deleted file mode 100644 index 68f595d357eff..0000000000000 --- a/Formula/libxspf.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Libxspf < Formula - desc "C++ library for XSPF playlist reading and writing" - homepage "https://libspiff.sourceforge.io/" - url "https://downloads.xiph.org/releases/xspf/libxspf-1.2.0.tar.bz2" - sha256 "ba9e93a0066469b074b4022b480004651ad3aa5b4313187fd407d833f79b43a5" - - bottle do - cellar :any - rebuild 2 - sha256 "2fac98e985ea3242cbce81bbb9e5e37fba44e47204b4a53b868e01199ece71eb" => :catalina - sha256 "76c09682c27449a52128a0aa29de091b907327f71cf320b30be5eb3b37442bcb" => :mojave - sha256 "ae1e960341fb08826fb30de46f3b1c075c22d9e655acb9e44067327c487328a7" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "cpptest" - depends_on "uriparser" - - # Fix build against clang and GCC 4.7+ - # https://gitlab.xiph.org/xiph/libxspf/-/commit/7f1f68d433f03484b572657ff5df47bba1b03ba6 - patch :DATA - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end - -__END__ -diff --git a/examples/read/read.cpp b/examples/read/read.cpp -index 411f892..b66a25c 100644 ---- a/examples/read/read.cpp -+++ b/examples/read/read.cpp -@@ -43,6 +43,7 @@ - #include - #include // MAX_PATH - #include // PATH_MAX -+#include - - - #if defined(__WIN32__) || defined(WIN32) diff --git a/Formula/libyaml.rb b/Formula/libyaml.rb deleted file mode 100644 index 5a72432316cf6..0000000000000 --- a/Formula/libyaml.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Libyaml < Formula - desc "YAML Parser" - homepage "https://github.com/yaml/libyaml" - url "https://github.com/yaml/libyaml/archive/0.2.5.tar.gz" - sha256 "fa240dbf262be053f3898006d502d514936c818e422afdcf33921c63bed9bf2e" - license "MIT" - - bottle do - cellar :any - sha256 "56d3549b342cffb181e3eb05356697bbb362b9733c73e0eeff9b637ecf92cd23" => :catalina - sha256 "a04988b3868cfadf7bcaff6b753b59388cbea70b38f2fa41a25229150d073696" => :mojave - sha256 "d3e22ad09c3d6872c5f7ee7c7f1146c9f14c178ff4c3a3488a20bf584bc854d5" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "./bootstrap" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - 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", "-L#{lib}", "-lyaml", "-o", "test" - system "./test" - end -end diff --git a/Formula/libyubikey.rb b/Formula/libyubikey.rb deleted file mode 100644 index 129564eeba188..0000000000000 --- a/Formula/libyubikey.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Libyubikey < Formula - desc "C library for manipulating Yubico one-time passwords" - homepage "https://yubico.github.io/yubico-c/" - url "https://developers.yubico.com/yubico-c/Releases/libyubikey-1.13.tar.gz" - sha256 "04edd0eb09cb665a05d808c58e1985f25bb7c5254d2849f36a0658ffc51c3401" - license "BSD-2-Clause" - - bottle do - cellar :any - sha256 "b6fccb68ae85837533ea4680063cc64f207f2d6926c4eafaf23e81f0b790fc55" => :catalina - sha256 "f5f99ad5056fe1d8bfa69a389983ac9ae0f5e65c60d984de4fb9591b6b19daba" => :mojave - sha256 "8440f766e153b537a092f55a07990c0fd28e0b244407bf6824d21fedb3d97f32" => :high_sierra - sha256 "23f550d2f6e2cd6310756e3625c17868e206c90029e241fbc915a408f4761263" => :sierra - sha256 "2b1fbc1860932dd4a4c2b09928d838bc3646ff0b2a97bc5c538981befdc21760" => :el_capitan - sha256 "7f5c7a55b9e5bf373f01f8f02a983d45ae11d801acc8110cd8f5e13edf0e2973" => :yosemite - sha256 "efaf65ea86cb01821d8c3145ab0f0528f6bb9e8afa0090ffbf2c0818e093c357" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/libzdb.rb b/Formula/libzdb.rb deleted file mode 100644 index 831988166c93e..0000000000000 --- a/Formula/libzdb.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Libzdb < Formula - desc "Database connection pool library" - homepage "https://tildeslash.com/libzdb/" - url "https://tildeslash.com/libzdb/dist/libzdb-3.2.2.tar.gz" - sha256 "d51e4e21ee1ee84ac8763de91bf485360cd76860b951ca998e891824c4f195ae" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "114982357474fdd8af3df7d11a3575e81686ff55d6c2018b5385c7f5acfee7ed" => :catalina - sha256 "bc52a04fe2ae5500200c1521f4e32497c9eee2d2c4087e60c9ed11a09b2cac67" => :mojave - sha256 "123039235efee305797c3252e0e4b07c93989785165c044eefa9f86eae73f9b0" => :high_sierra - end - - depends_on :macos => :high_sierra # C++ 17 is required - depends_on "mysql-client" - depends_on "openssl@1.1" - depends_on "postgresql" - depends_on "sqlite" - - def install - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make", "install" - pkgshare.install "test" - end - - test do - cp_r pkgshare/"test", testpath - cd "test" do - system ENV.cc, "select.c", "-L#{lib}", "-lzdb", "-I#{include}/zdb", "-o", "select" - system "./select" - end - end -end diff --git a/Formula/libzip.rb b/Formula/libzip.rb deleted file mode 100644 index 06761c2a177c5..0000000000000 --- a/Formula/libzip.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Libzip < Formula - desc "C library for reading, creating, and modifying zip archives" - homepage "https://libzip.org/" - url "https://libzip.org/download/libzip-1.7.1.tar.xz" - sha256 "a020dc1b17a79faa748e43a05f8605d65e403813e8e97ad3a300a90ddba097ac" - - bottle do - sha256 "a5e946984fe35dbbceb39dbb2a68e781cb3c7d7df642b5e0024e87e4dd211f26" => :catalina - sha256 "8799d573ede87e67c7498e12e63a4ec9deac4ee2e76d51303c59f71350597d1b" => :mojave - sha256 "4cf3e50e427b704125978eddddc4bd64e67d2631f54c4fd7990503a8b07dff57" => :high_sierra - end - - depends_on "cmake" => :build - - uses_from_macos "bzip2" - uses_from_macos "zlib" - - conflicts_with "libtcod", "minizip2", - :because => "libtcod, libzip and minizip2 install a `zip.h` header" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - touch "file1" - system "zip", "file1.zip", "file1" - touch "file2" - system "zip", "file2.zip", "file1", "file2" - assert_match /\+.*file2/, shell_output("#{bin}/zipcmp -v file1.zip file2.zip", 1) - end -end diff --git a/Formula/libzt.rb b/Formula/libzt.rb deleted file mode 100644 index 2ce3a38c52926..0000000000000 --- a/Formula/libzt.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Libzt < Formula - desc "Encrypted P2P networking library for applications (GPLv3)" - homepage "https://www.zerotier.com/" - url "https://github.com/zerotier/libzt.git", - :tag => "1.3.3", - :revision => "a0b50530d37d9c13d30a68bf1d4686485be36327" - - bottle do - cellar :any - sha256 "57fdc3d84cd81657411b579cb497aab00a1dd1b576d37947d30eb3f591997365" => :catalina - sha256 "253dc7f90329eae4b4d775cfd9c0e6647a971a54322a504b513b98e4b2c43038" => :mojave - sha256 "19554cc555c087797403049615b0145cec80dc3c49a5a70167b2fad75a0729ce" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "cmake", "--build", "." - system "make", "install" - prefix.install "LICENSE.txt" => "LICENSE" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() - { - return zts_socket(0,0,0) != -2; - } - EOS - system ENV.cxx, "-v", "test.cpp", "-o", "test", "-L#{lib}", "-lzt" - system "./test" - end -end diff --git a/Formula/libzzip.rb b/Formula/libzzip.rb deleted file mode 100644 index 017d2a0899119..0000000000000 --- a/Formula/libzzip.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Libzzip < Formula - desc "Library providing read access on ZIP-archives" - homepage "https://github.com/gdraheim/zziplib" - url "https://github.com/gdraheim/zziplib/archive/v0.13.71.tar.gz" - sha256 "2ee1e0fbbb78ec7cc46bde5b62857bc51f8d665dd265577cf93584344b8b9de2" - - bottle do - cellar :any - sha256 "e5d1924bd3078e0ec191022a1472b9fed24df6217bca8a96eaa3124baa63fee1" => :catalina - sha256 "e6060c02eaeb6df911ae74896181c261c1b235891f4a470e2afe8aea3c4846e5" => :mojave - sha256 "18edacbb19f463f1481eae261ec25f4c643c659703ff1d1d2ae59b28684a0fc3" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DZZIPSDL=OFF" - system "make", "man" - system "make", "install" - end - end - - test do - (testpath/"README.txt").write("Hello World!") - system "/usr/bin/zip", "test.zip", "README.txt" - assert_equal "Hello World!", shell_output("#{bin}/zzcat test/README.txt") - end -end diff --git a/Formula/lifelines.rb b/Formula/lifelines.rb deleted file mode 100644 index a9f6a348e084b..0000000000000 --- a/Formula/lifelines.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Lifelines < Formula - desc "Text-based genealogy software" - homepage "https://lifelines.sourceforge.io/" - url "https://downloads.sourceforge.net/project/lifelines/lifelines/3.0.62/lifelines-3.0.62.tar.gz" - sha256 "2f00441ac0ed64aab8f76834c055e2b95600ed4c6f5845b9f6e5284ac58a9a52" - - bottle do - sha256 "3aa3d5f87691e0cffd46c05c0093164d6b2ea7cf3f99099fd98b40762654751d" => :catalina - sha256 "ab730940d142073ed9424d0cf480a6a752d10ec54af14c54569b23292e1e503e" => :mojave - sha256 "95457e5f439d945c32e65a32a43a5396b8c7f33466f0c83a0671936f095d649a" => :high_sierra - sha256 "1a974d23d51da7a7d2aedaec195291195a9eb442839a9bb9e5574ed6d8c01199" => :sierra - sha256 "20b13125e3312866baed38e6f6ffd706a6f4a0436617e8a6055f1f776a76b9a2" => :el_capitan - sha256 "69108c01987d30c1e82b2928fdaf0817ba2b2883fc6fef886e3e559dd49d29c2" => :yosemite - sha256 "cbe7743498423c250758271405f0a6a1f8e8b0bed83f91eac8c67041534da399" => :mavericks - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/lightgbm.rb b/Formula/lightgbm.rb deleted file mode 100644 index 5cec1e3cc47d6..0000000000000 --- a/Formula/lightgbm.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Lightgbm < Formula - desc "Fast, distributed, high performance gradient boosting framework" - homepage "https://github.com/microsoft/LightGBM" - url "https://github.com/microsoft/LightGBM/archive/v2.3.1.tar.gz" - sha256 "b2b8ed5e06be21444c4e9defd66877510d1800a650543f75bfc1b28f77745b84" - license "MIT" - - bottle do - cellar :any - sha256 "b8b078e8458186a058a47ba94d302dfb3688cae329112594bbbb125712c5c79a" => :catalina - sha256 "eefdb9c1c9749755431ac7fafc09bc9d3d31d73d6d9077f4e0a9d6d89ae4d032" => :mojave - sha256 "afaa412201c008a88980e9ecd9967d4ccfacdaa967229f084457e3780cba3b78" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libomp" - - def install - mkdir "build" do - system "cmake", *std_cmake_args, "-DAPPLE_OUTPUT_DYLIB=ON", ".." - system "make" - system "make", "install" - end - pkgshare.install "examples" - end - - test do - cp_r (pkgshare/"examples/regression"), testpath - cd "regression" do - system "#{bin}/lightgbm", "config=train.conf" - end - end -end diff --git a/Formula/lightning.rb b/Formula/lightning.rb deleted file mode 100644 index b6b41f535a05b..0000000000000 --- a/Formula/lightning.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Lightning < Formula - desc "Generates assembly language code at run-time" - homepage "https://www.gnu.org/software/lightning/" - url "https://ftp.gnu.org/gnu/lightning/lightning-2.1.3.tar.gz" - mirror "https://ftpmirror.gnu.org/lightning/lightning-2.1.3.tar.gz" - sha256 "ed856b866dc6f68678dc1151579118fab1c65fad687cf847fc2d94ca045efdc9" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "543bb685d72b8e9b10b14f3dcd615d38f8f499d10e1d27e40604240fc3f65ac3" => :catalina - sha256 "c767959e901e6f47f9bbfe243e629508edbdb138376443d7943c4c4a5a52d4f2" => :mojave - sha256 "da42166b5dd858cad42eeb7fc69a9ef870d23b67da6fa978d4bc58d3a464a0d4" => :high_sierra - end - - depends_on "binutils" => :build - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", "--prefix=#{prefix}" - system "make", "check", "-j1" - system "make", "install" - end - - test do - # from https://www.gnu.org/software/lightning/manual/lightning.html#incr - (testpath/"test.c").write <<~EOS - #include - #include - static jit_state_t *_jit; - typedef int (*pifi)(int); - int main(int argc, char *argv[]) { - jit_node_t *in; - pifi incr; - init_jit(argv[0]); - _jit = jit_new_state(); - jit_prolog(); - in = jit_arg(); - jit_getarg(JIT_R0, in); - jit_addi(JIT_R0, JIT_R0, 1); - jit_retr(JIT_R0); - incr = jit_emit(); - jit_clear_state(); - printf("%d + 1 = %d\\n", 5, incr(5)); - jit_destroy_state(); - finish_jit(); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-llightning", "-o", "test" - system "./test" - end -end diff --git a/Formula/lighttpd.rb b/Formula/lighttpd.rb deleted file mode 100644 index f5336759c3f6e..0000000000000 --- a/Formula/lighttpd.rb +++ /dev/null @@ -1,146 +0,0 @@ -class Lighttpd < Formula - desc "Small memory footprint, flexible web-server" - homepage "https://www.lighttpd.net/" - url "https://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.55.tar.xz" - sha256 "6a0b50e9c9d5cc3d9e48592315c25a2d645858f863e1ccd120507a30ce21e927" - license "BSD-3-Clause" - - bottle do - sha256 "7cb7b6026dbba9a3afde8a0e2e2740499564687fb61ee6c49d5cabc29f780a2d" => :catalina - sha256 "432da2049539f4416d952ecdfcfefc5b5230447edaebfd63b958a92581ae57ab" => :mojave - sha256 "c7e9b87c219d8bf64561c185c6fcc68c2caafded7a4e980d379fd4fbbe00bd1d" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openldap" - depends_on "openssl@1.1" - depends_on "pcre" - - # default max. file descriptors; this option will be ignored if the server is not started as root - MAX_FDS = 512 - - def config_path - etc/"lighttpd" - end - - def log_path - var/"log/lighttpd" - end - - def www_path - var/"www" - end - - def run_path - var/"lighttpd" - end - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --sbindir=#{bin} - --with-openssl - --with-ldap - --with-zlib - --with-bzip2 - ] - - # autogen must be run, otherwise prebuilt configure may complain - # about a version mismatch between included automake and Homebrew's - system "./autogen.sh" - system "./configure", *args - system "make", "install" - - unless File.exist? config_path - config_path.install "doc/config/lighttpd.conf", "doc/config/modules.conf" - (config_path/"conf.d/").install Dir["doc/config/conf.d/*.conf"] - inreplace config_path+"lighttpd.conf" do |s| - s.sub!(/^var\.log_root\s*=\s*".+"$/, "var.log_root = \"#{log_path}\"") - s.sub!(/^var\.server_root\s*=\s*".+"$/, "var.server_root = \"#{www_path}\"") - s.sub!(/^var\.state_dir\s*=\s*".+"$/, "var.state_dir = \"#{run_path}\"") - s.sub!(/^var\.home_dir\s*=\s*".+"$/, "var.home_dir = \"#{run_path}\"") - s.sub!(/^var\.conf_dir\s*=\s*".+"$/, "var.conf_dir = \"#{config_path}\"") - s.sub!(/^server\.port\s*=\s*80$/, "server.port = 8080") - s.sub!(%r{^server\.document-root\s*=\s*server_root \+ "/htdocs"$}, "server.document-root = server_root") - - # get rid of "warning: please use server.use-ipv6 only for hostnames, not - # without server.bind / empty address; your config will break if the kernel - # default for IPV6_V6ONLY changes" - s.sub!(/^server.use-ipv6\s*=\s*"enable"$/, 'server.use-ipv6 = "disable"') - - s.sub!(/^server\.username\s*=\s*".+"$/, 'server.username = "_www"') - s.sub!(/^server\.groupname\s*=\s*".+"$/, 'server.groupname = "_www"') - s.sub!(/^server\.event-handler\s*=\s*"linux-sysepoll"$/, 'server.event-handler = "select"') - s.sub!(/^server\.network-backend\s*=\s*"sendfile"$/, 'server.network-backend = "writev"') - - # "max-connections == max-fds/2", - # https://redmine.lighttpd.net/projects/1/wiki/Server_max-connectionsDetails - s.sub!(/^server\.max-connections = .+$/, "server.max-connections = " + (MAX_FDS / 2).to_s) - end - end - - log_path.mkpath - (www_path/"htdocs").mkpath - run_path.mkpath - end - - def caveats - <<~EOS - Docroot is: #{www_path} - - The default port has been set in #{config_path}/lighttpd.conf to 8080 so that - lighttpd can run without sudo. - EOS - end - - plist_options :manual => "lighttpd -f #{HOMEBREW_PREFIX}/etc/lighttpd/lighttpd.conf" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/lighttpd - -D - -f - #{config_path}/lighttpd.conf - - RunAtLoad - - KeepAlive - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardErrorPath - #{log_path}/output.log - StandardOutPath - #{log_path}/output.log - HardResourceLimits - - NumberOfFiles - #{MAX_FDS} - - SoftResourceLimits - - NumberOfFiles - #{MAX_FDS} - - - - EOS - end - - test do - system "#{bin}/lighttpd", "-t", "-f", config_path/"lighttpd.conf" - end -end diff --git a/Formula/lilv.rb b/Formula/lilv.rb deleted file mode 100644 index 44a6740ba20fe..0000000000000 --- a/Formula/lilv.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Lilv < Formula - desc "C library to use LV2 plugins" - homepage "https://drobilla.net/software/lilv/" - url "https://download.drobilla.net/lilv-0.24.8.tar.bz2" - sha256 "cadc3654c481aec6a6db504439cf8c0572c06128a6fbca1953a30df77e89c300" - license "ISC" - - bottle do - cellar :any - sha256 "b772a0b962e14b7ae737f3bdf5778b34092e86eeca19e2c520395777b87be9cd" => :catalina - sha256 "01c5b495e5c288e19a325164f482cc3058865b118f2d5c05a52e44db5deec302" => :mojave - sha256 "63c518910af136ca8b4f685924ccd3e6f2687cd061cd561c4aab69af7fa62361" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "lv2" - depends_on "serd" - depends_on "sord" - depends_on "sratom" - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf" - system "./waf", "install" - end -end diff --git a/Formula/lincity-ng.rb b/Formula/lincity-ng.rb deleted file mode 100644 index b7fee31d470bc..0000000000000 --- a/Formula/lincity-ng.rb +++ /dev/null @@ -1,52 +0,0 @@ -class LincityNg < Formula - desc "City simulation game" - homepage "https://github.com/lincity-ng/lincity-ng/" - url "https://github.com/lincity-ng/lincity-ng/archive/lincity-ng-2.0.tar.gz" - sha256 "e05a2c1e1d682fbf289caecd0ea46ca84b0db9de43c7f1b5add08f0fdbf1456b" - revision 2 - head "https://github.com/lincity-ng/lincity-ng.git" - - bottle do - sha256 "4ea8b0d4afe937e6ffdd5ff7c92fd84fdfb23c35f5dd8a0bdcb015f79a7ba5b7" => :catalina - sha256 "5909e4a6c9cfe47aafd4fb4c5dd26016cbe096945faa485d377fe2c423b3caca" => :mojave - sha256 "bdfe153ca219084bf621c031612c8b86b02911e64d6fa154422812aee7de8d76" => :high_sierra - sha256 "cae5f270842c10affb29d6f9c592a96913d9ca630c49d22afa03cba6d3a6121c" => :sierra - sha256 "b9f326c678a9317f141ad13749cb4075ab42144855254d344de15bc22c4020e5" => :el_capitan - sha256 "6eae33edda53f256caa2fde01d334bc19b2c9810c8cf8e039ad1094c71619691" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "jam" => :build - depends_on "pkg-config" => :build - depends_on "physfs" - depends_on "sdl" - depends_on "sdl_gfx" - depends_on "sdl_image" - depends_on "sdl_mixer" - depends_on "sdl_ttf" - - def install - # Generate CREDITS - system 'cat data/gui/creditslist.xml | grep -v "@" | cut -d\> -f2 | cut -d\< -f1 >CREDITS' - system "./autogen.sh" - system "./configure", "--disable-sdltest", - "--with-apple-opengl-framework", - "--prefix=#{prefix}", - "--datarootdir=#{pkgshare}" - system "jam", "install" - rm_rf ["#{pkgshare}/applications", "#{pkgshare}/pixmaps"] - end - - def caveats - <<~EOS - If you have problem with fullscreen, try running in windowed mode: - lincity-ng -w - EOS - end - - test do - (testpath/".lincity-ng").mkpath - assert_match /lincity-ng version #{version}$/, shell_output("#{bin}/lincity-ng --version") - end -end diff --git a/Formula/link-grammar.rb b/Formula/link-grammar.rb deleted file mode 100644 index 6d000220f2531..0000000000000 --- a/Formula/link-grammar.rb +++ /dev/null @@ -1,41 +0,0 @@ -class LinkGrammar < Formula - desc "Carnegie Mellon University's link grammar parser" - homepage "https://www.abisource.com/projects/link-grammar/" - url "https://www.abisource.com/downloads/link-grammar/5.8.0/link-grammar-5.8.0.tar.gz" - sha256 "ad65a6b47ca0665b814430a5a8ff4de51f4805f7fb76642ced90297b4e7f16ed" - license "LGPL-2.1" - - bottle do - sha256 "e38c9f157ec985be94ed5e792442f5d81c00b71d0b84164ed146d8ab3fbb46dd" => :catalina - sha256 "4e9b86a609145b67983faa850c0918500cdcb1da5ab5f1ecb945cabdc8533b74" => :mojave - sha256 "391cc292bef0a6eb3b21add8bf427f0fcc0122ec59b41003387df27a1c51803c" => :high_sierra - end - - depends_on "ant" => :build - depends_on "autoconf" => :build - depends_on "autoconf-archive" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - - uses_from_macos "sqlite" - - def install - ENV["PYTHON_LIBS"] = "-undefined dynamic_lookup" - inreplace "bindings/python/Makefile.am", - "$(PYTHON_LDFLAGS) -module -no-undefined", - "$(PYTHON_LDFLAGS) -module" - inreplace "link-grammar/link-grammar.def", "regex_tokenizer_test\n", "" - system "autoreconf", "-fiv" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-regexlib=c" - system "make", "install" - end - - test do - system "#{bin}/link-parser", "--version" - end -end diff --git a/Formula/linkerd.rb b/Formula/linkerd.rb deleted file mode 100644 index 8ae34fdd2b48b..0000000000000 --- a/Formula/linkerd.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Linkerd < Formula - desc "Command-line utility to interact with linkerd" - homepage "https://linkerd.io/" - - url "https://github.com/linkerd/linkerd2.git", - :tag => "stable-2.8.1", - :revision => "83ae0ccf0f1aad636764fd0e606ac577e426d3f9" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "e7935ba4364476f17408883ee28616ef184313141b3bf867741909abcd350715" => :catalina - sha256 "5e68a496869ae3c8aef8c99331f573e2a49c7fa831584737f133e5efa7784a69" => :mojave - sha256 "341c693291213280a51bf4ad81281e8428a3c264301be1074ae09395b1b09e66" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["CI_FORCE_CLEAN"] = "1" - - system "bin/build-cli-bin" - bin.install "target/cli/darwin/linkerd" - - # Install bash completion - output = Utils.safe_popen_read("#{bin}/linkerd", "completion", "bash") - (bash_completion/"linkerd").write output - - # Install zsh completion - output = Utils.safe_popen_read("#{bin}/linkerd", "completion", "zsh") - (zsh_completion/"linkerd").write output - - prefix.install_metafiles - end - - test do - run_output = shell_output("#{bin}/linkerd 2>&1") - assert_match "linkerd manages the Linkerd service mesh.", run_output - - version_output = shell_output("#{bin}/linkerd version --client 2>&1") - assert_match "Client version: ", version_output - stable_resource = stable.instance_variable_get(:@resource) - assert_match stable_resource.instance_variable_get(:@specs)[:tag], version_output if build.stable? - - system "#{bin}/linkerd", "install", "--ignore-cluster" - end -end diff --git a/Formula/linklint.rb b/Formula/linklint.rb deleted file mode 100644 index ce65cd46707f2..0000000000000 --- a/Formula/linklint.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Linklint < Formula - desc "Link checker and web site maintenance tool" - homepage "http://linklint.org/" - url "http://linklint.org/download/linklint-2.3.5.tar.gz" - sha256 "ecaee456a3c2d6a3bd18a580d6b09b6b7b825df3e59f900270fe3f84ec3ac9c7" - - bottle :unneeded - - def install - mv "READ_ME.txt", "README" - - doc.install "README" - bin.install "linklint-#{version}" => "linklint" - end - - test do - (testpath/"index.html").write('Home') - system "#{bin}/linklint", "/" - end -end diff --git a/Formula/links.rb b/Formula/links.rb deleted file mode 100644 index a93ee9ceb3266..0000000000000 --- a/Formula/links.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Links < Formula - desc "Lynx-like WWW browser that supports tables, menus, etc." - homepage "http://links.twibright.com/" - url "http://links.twibright.com/download/links-2.20.2.tar.bz2" - sha256 "4b4f07d0e6261118d1365a5a5bfa31e1eafdbd280cfae6f0e9eedfea51a2f424" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "0a3c7483bcee4795978c8db90bdf2f07a46baa09cb6258a620f7d89e4724a466" => :catalina - sha256 "82b66ce4fc6e261197ad6d00110a6963620772b4e1e0b553c4c982e39c363fa5" => :mojave - sha256 "8c04e068acff9290a354b2c244638ca27056a086b67b90fac90e6bbfc1a7215b" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "jpeg" - depends_on "librsvg" - depends_on "libtiff" - depends_on "openssl@1.1" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --mandir=#{man} - --with-ssl=#{Formula["openssl@1.1"].opt_prefix} - --without-lzma - ] - - system "./configure", *args - system "make", "install" - doc.install Dir["doc/*"] - end - - test do - system bin/"links", "-dump", "https://duckduckgo.com/" - end -end diff --git a/Formula/liquibase.rb b/Formula/liquibase.rb deleted file mode 100644 index 3277e75b281d1..0000000000000 --- a/Formula/liquibase.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Liquibase < Formula - desc "Library for database change tracking" - homepage "https://www.liquibase.org/" - url "https://github.com/liquibase/liquibase/releases/download/v3.10.1/liquibase-3.10.1.tar.gz" - sha256 "e54dc5d639fa404ebcc72de647c2009748fa0685566a46abaed9c2a9b88e40e0" - license "Apache-2.0" - - bottle :unneeded - - def install - rm_f Dir["*.bat"] - chmod 0755, "liquibase" - prefix.install_metafiles - libexec.install Dir["*"] - bin.install_symlink libexec/"liquibase" - (libexec/"lib").install_symlink Dir["#{libexec}/sdk/lib-sdk/slf4j*"] - end - - def caveats - <<~EOS - You should set the environment variable LIQUIBASE_HOME to - #{opt_libexec} - EOS - end - - test do - system "#{bin}/liquibase", "--version" - end -end diff --git a/Formula/liquid-dsp.rb b/Formula/liquid-dsp.rb deleted file mode 100644 index 1e8f947acdfda..0000000000000 --- a/Formula/liquid-dsp.rb +++ /dev/null @@ -1,38 +0,0 @@ -class LiquidDsp < Formula - desc "Digital signal processing library for software-defined radios" - homepage "https://liquidsdr.org/" - url "https://github.com/jgaeddert/liquid-dsp/archive/v1.3.2.tar.gz" - sha256 "85093624ef9cb90ead64c836d2f42690197edace1a86257d6524c4e4dc870483" - license "MIT" - - bottle do - cellar :any - sha256 "1b1e21733e9789f6c1e3f8c3e5bb2076151f96a1f3602ed0e3905ad3ff45c18b" => :catalina - sha256 "12702bbff57912c18a4f637df59da56054f8afcc11f96467341af3bd26ec0992" => :mojave - sha256 "f0a6f6caba39b3e06a972aa89293161fa6d4d3759751709f40f2cc8d7ea3c913" => :high_sierra - sha256 "10bca6603365aeefad410287fbf1657b6b2401544e2cc16f1f2ef6f9ffbe8bc9" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "fftw" - - def install - system "./bootstrap.sh" - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - if (!liquid_is_prime(3)) - return 1; - return 0; - } - EOS - system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-lliquid" - system "./test" - end -end diff --git a/Formula/liquidctl.rb b/Formula/liquidctl.rb deleted file mode 100644 index d086adaf0e238..0000000000000 --- a/Formula/liquidctl.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Liquidctl < Formula - include Language::Python::Virtualenv - - desc "Cross-platform tool and drivers for liquid coolers and other devices" - homepage "https://github.com/jonasmalacofilho/liquidctl" - url "https://files.pythonhosted.org/packages/source/l/liquidctl/liquidctl-1.3.3.tar.gz" - sha256 "d13180867e07420c5890fe1110e8f45fe343794549a9ed7d5e8e76663bc10c24" - license "GPL-3.0" - revision 1 - head "https://github.com/jonasmalacofilho/liquidctl.git" - - bottle do - cellar :any_skip_relocation - sha256 "2a4cf0ea659a3c804db46938fe1a316d8f5a0703d60cf46e49ba1b7c844e2cdd" => :catalina - sha256 "7b1504d64c34b3a648c8f37e56b158b6bacfeded9161bbd07bfeaeb77d2cdd7f" => :mojave - sha256 "f0fee1b1424c42d7da02f3321722a5a58272464fc0dc62ee44925da0c3705b64" => :high_sierra - end - - depends_on "libusb" - depends_on "python@3.8" - - resource "docopt" do - url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" - sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - end - - resource "hidapi" do - url "https://files.pythonhosted.org/packages/7c/a0/d5ca6f191c8860a4769ba19448d2b2d6b3e2ca2c30aa61bb96a3f6bd25ba/hidapi-0.9.0.post2.tar.gz" - sha256 "a71dd3c153cb6bb2b73d2612b5ab262830d78c6428f33f0c06818749e64c9320" - end - - resource "pyusb" do - url "https://files.pythonhosted.org/packages/5f/34/2095e821c01225377dda4ebdbd53d8316d6abb243c9bee43d3888fa91dd6/pyusb-1.0.2.tar.gz" - sha256 "4e9b72cc4a4205ca64fbf1f3fff39a335512166c151ad103e55c8223ac147362" - end - - def install - # customize liquidctl --version - ENV["DIST_NAME"] = "homebrew" - ENV["DIST_PACKAGE"] = "liquidctl #{version}" - - virtualenv_install_with_resources - - man_page = buildpath/"liquidctl.8" - # setting the is_macos register to 1 adjusts the man page for macOS - inreplace man_page, ".nr is_macos 0", ".nr is_macos 1" - man.mkpath - man8.install man_page - end - - test do - shell_output "#{bin}/liquidctl list --verbose --debug" - end -end diff --git a/Formula/liquidprompt.rb b/Formula/liquidprompt.rb deleted file mode 100644 index b53e6b61ea3b4..0000000000000 --- a/Formula/liquidprompt.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Liquidprompt < Formula - desc "Adaptive prompt for bash and zsh shells" - homepage "https://github.com/nojhan/liquidprompt" - url "https://github.com/nojhan/liquidprompt/archive/v_1.11.tar.gz" - sha256 "669dde6b8274a57b3e39dc41539d157a86252e40e39bcc4c3102b5a81bd8f2f5" - license "AGPL-3.0" - head "https://github.com/nojhan/liquidprompt.git", :branch => "master" - - bottle :unneeded - - def install - share.install "liquidpromptrc-dist" - share.install "liquidprompt" - end - - def caveats - <<~EOS - Add the following lines to your bash or zsh config (e.g. ~/.bash_profile): - if [ -f #{HOMEBREW_PREFIX}/share/liquidprompt ]; then - . #{HOMEBREW_PREFIX}/share/liquidprompt - fi - - If you'd like to reconfigure options, you may do so in ~/.liquidpromptrc. - A sample file you may copy and modify has been installed to - #{HOMEBREW_PREFIX}/share/liquidpromptrc-dist - EOS - end - - test do - liquidprompt = "#{HOMEBREW_PREFIX}/share/liquidprompt" - output = shell_output("/bin/sh #{liquidprompt} 2>&1") - assert_match "add-zsh-hook: command not found", output - end -end diff --git a/Formula/liquigraph.rb b/Formula/liquigraph.rb deleted file mode 100644 index a2cf70cbe5893..0000000000000 --- a/Formula/liquigraph.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Liquigraph < Formula - desc "Migration runner for Neo4j" - homepage "https://www.liquigraph.org/" - url "https://github.com/liquigraph/liquigraph/archive/liquigraph-4.0.2.tar.gz" - sha256 "60d17bb39e7c070a99f4669516cae0c1b0939700127758a9e500e210943f0cca" - head "https://github.com/liquigraph/liquigraph.git" - - bottle do - cellar :any_skip_relocation - sha256 "33d7c1bae094524db782c9b3d3b0f37b4353f772529ab143b456c6271e262059" => :catalina - sha256 "3a6ed6c8c176e1ffa0e3faef3cd1ed0025663dc23fd2d839372a9766e26fd2b7" => :mojave - sha256 "d8c4ae157ed9d5ea8aad53d9b07784c21e41a4ac5a7756f0dacb9f526e809405" => :high_sierra - end - - depends_on "maven" => :build - depends_on "openjdk" - - def install - ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix - system "mvn", "-B", "-q", "-am", "-pl", "liquigraph-cli", "clean", "package", "-DskipTests" - (buildpath/"binaries").mkpath - system "tar", "xzf", "liquigraph-cli/target/liquigraph-cli-bin.tar.gz", "-C", "binaries" - libexec.install "binaries/liquigraph-cli/liquigraph.sh" - libexec.install "binaries/liquigraph-cli/liquigraph-cli.jar" - (bin/"liquigraph").write_env_script libexec/"liquigraph.sh", :JAVA_HOME => "${JAVA_HOME:-#{ENV["JAVA_HOME"]}}" - end - - test do - failing_hostname = "verrryyyy_unlikely_host" - changelog = testpath/"changelog" - changelog.write <<~EOS - - - - CREATE (n:Sentence {text:'Hello monde!'}) RETURN n - - - MATCH (n:Sentence {text:'Hello monde!'}) SET n.text='Hello world!' RETURN n - - - EOS - - jdbc = "jdbc:neo4j:http://#{failing_hostname}:7474/" - output = shell_output("#{bin}/liquigraph -c #{changelog.realpath} -g #{jdbc} 2>&1", 1) - assert_match "Exception: #{failing_hostname}", output - end -end diff --git a/Formula/literate-git.rb b/Formula/literate-git.rb deleted file mode 100644 index bc602dd611871..0000000000000 --- a/Formula/literate-git.rb +++ /dev/null @@ -1,97 +0,0 @@ -class LiterateGit < Formula - include Language::Python::Virtualenv - - desc "Render hierarchical git repositories into HTML" - homepage "https://github.com/bennorth/literate-git" - url "https://github.com/bennorth/literate-git/archive/v0.3.1.tar.gz" - sha256 "f1dec77584236a5ab2bcee9169e16b5d976e83cd53d279512136bdc90b04940a" - revision 3 - - bottle do - cellar :any - sha256 "b704c927f102c0ce4fac2a02d6e0e3a93569179af257a0922b7b14b326d0bbe1" => :catalina - sha256 "6f82567697db68d8ff88fd5c493717cbba18869904252319daa4cfe26cc80b42" => :mojave - sha256 "237597cd7d2517d3b34144ba0eacd21a9d50d32e6bbe0ce496eaf8d1b9c9dab7" => :high_sierra - end - - depends_on "libgit2" - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - 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 "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/d8/03/e491f423379ea14bb3a02a5238507f7d446de639b623187bccc111fbecdf/Jinja2-2.11.1.tar.gz" - sha256 "93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250" - end - - resource "markdown2" do - url "https://files.pythonhosted.org/packages/e3/93/d37055743009d1a492b2670cc215831a388b3d6e4a28b7672fdf0f7854f5/markdown2-2.3.8.tar.gz" - sha256 "7ff88e00b396c02c8e1ecd8d176cfa418fb01fe81234dcea77803e7ce4f05dbe" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" - sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - end - - resource "pygit2" do - url "https://files.pythonhosted.org/packages/1d/c4/e0ba65178512a724a86b39565d7f9286c16d7f8e45e2f665973065c4a495/pygit2-1.1.1.tar.gz" - sha256 "9255d507d5d87bf22dfd57997a78908010331fc21f9a83eca121a53f657beb3c" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/cb/9f/27d4844ac5bf158a33900dbad7985951e2910397998e85712da03ce125f0/Pygments-2.5.2.tar.gz" - sha256 "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe" - end - - def install - virtualenv_install_with_resources - end - - test do - system "git", "init" - (testpath/"foo.txt").write "Hello" - system "git", "add", "foo.txt" - system "git", "commit", "-m", "foo" - system "git", "branch", "one" - (testpath/"bar.txt").write "World" - system "git", "add", "bar.txt" - system "git", "commit", "-m", "bar" - system "git", "branch", "two" - (testpath/"create_url.py").write <<~EOS - class CreateUrl: - @staticmethod - def result_url(https://github.com/sha1): - return '' - @staticmethod - def source_url(https://github.com/sha1): - return '' - EOS - assert_match "", - shell_output("git literate-render test one two create_url.CreateUrl") - end -end diff --git a/Formula/little-cms.rb b/Formula/little-cms.rb deleted file mode 100644 index 41fc5e78aaced..0000000000000 --- a/Formula/little-cms.rb +++ /dev/null @@ -1,34 +0,0 @@ -class LittleCms < Formula - desc "Version 1 of the Little CMS library" - homepage "http://www.littlecms.com/" - url "https://downloads.sourceforge.net/project/lcms/lcms/1.19/lcms-1.19.tar.gz" - sha256 "80ae32cb9f568af4dc7ee4d3c05a4c31fc513fc3e31730fed0ce7378237273a9" - revision 1 - - bottle do - cellar :any - sha256 "73cda76fd98e9466e570243f5190e68b45ffeeea2073185a51dd14dbde11a21a" => :catalina - sha256 "d04e4cc09f471260e6e86eb866743eb0205b3345bc9e687d85307cdbd1a1fa9a" => :mojave - sha256 "cead96af013b65c05e98c89890e66de1cdf864d1b6ed7da811f6618f2e551275" => :high_sierra - sha256 "227c16cbe117abeac7398265543c20b905396b214785e1a9dc48041f0f3ce128" => :sierra - sha256 "c1125a0074a82747ffc33ab79c617ea448b605ace47d6c5cf788f2d3a49d7c5d" => :el_capitan - sha256 "bc02c8267bf616ef0dcfc27db97a849b0f79e8211164ea4a955482b964255a7e" => :yosemite - end - - depends_on "jpeg" - depends_on "libtiff" - - def install - args = %W[--disable-dependency-tracking --disable-debug --prefix=#{prefix}] - system "./configure", *args - - system "make" - ENV.deparallelize - system "make", "install" - end - - test do - system "#{bin}/jpegicc", test_fixtures("test.jpg"), "out.jpg" - assert_predicate testpath/"out.jpg", :exist? - end -end diff --git a/Formula/little-cms2.rb b/Formula/little-cms2.rb deleted file mode 100644 index c073aabfdb745..0000000000000 --- a/Formula/little-cms2.rb +++ /dev/null @@ -1,30 +0,0 @@ -class LittleCms2 < Formula - desc "Color management engine supporting ICC profiles" - homepage "http://www.littlecms.com/" - # Ensure release is announced on http://www.littlecms.com/download.html - url "https://downloads.sourceforge.net/project/lcms/lcms/2.11/lcms2-2.11.tar.gz" - sha256 "dc49b9c8e4d7cdff376040571a722902b682a795bf92985a85b48854c270772e" - version_scheme 1 - - bottle do - cellar :any - sha256 "b0fe7486871b0fb0e34012f48bce09e96229e5e2985d64e7a0164c2847e41975" => :catalina - sha256 "e05f0a487d2243411eeb9fd9909f875517d7b27feb3cb914117acd9c60b76fcc" => :mojave - sha256 "928d1b8b8292a2d7950d0ef1381c70996bcde325f0124d7dcb68059090544dac" => :high_sierra - end - - depends_on "jpeg" - depends_on "libtiff" - - def install - args = %W[--disable-dependency-tracking --prefix=#{prefix}] - - system "./configure", *args - system "make", "install" - end - - test do - system "#{bin}/jpgicc", test_fixtures("test.jpg"), "out.jpg" - assert_predicate testpath/"out.jpg", :exist? - end -end diff --git a/Formula/livestreamer.rb b/Formula/livestreamer.rb deleted file mode 100644 index b5a9e47d2cb01..0000000000000 --- a/Formula/livestreamer.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Livestreamer < Formula - include Language::Python::Virtualenv - - desc "Pipes video from streaming services into a player such as VLC" - homepage "https://livestreamer.io/" - url "https://files.pythonhosted.org/packages/ee/d6/efbe3456160a2c62e3dd841c5d9504d071c94449a819148bb038b50d862a/livestreamer-1.12.2.tar.gz" - sha256 "ef3e743d0cabc27d8ad906c356e74370799e25ba46c94d3b8d585af77a258de0" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "23a5d9a062d09bbdb506daf64a8d57ffc621f8d62823f049a54233772dc2049f" => :catalina - sha256 "bbdac34096cf43e0d330c8b2fabe256c62cd36c83b5fd92e018d558fa0013de8" => :mojave - sha256 "c5e389be81bbd2736c8edcfcb7e725c321c188a057ce43e195cdbb96223dd76f" => :high_sierra - end - - depends_on "python@3.8" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match version.to_s, shell_output("#{bin}/livestreamer --version 2>&1") - end -end diff --git a/Formula/lizard-analyzer.rb b/Formula/lizard-analyzer.rb deleted file mode 100644 index e82dff410c7a1..0000000000000 --- a/Formula/lizard-analyzer.rb +++ /dev/null @@ -1,37 +0,0 @@ -class LizardAnalyzer < Formula - include Language::Python::Virtualenv - - desc "Extensible Cyclomatic Complexity Analyzer" - homepage "http://www.lizard.ws/" - url "https://files.pythonhosted.org/packages/ef/bc/c9b66e557203f2a6f5cf3eb704c640e433385dda639c1b2da56b966f9c42/lizard-1.17.4.tar.gz" - sha256 "ae9485f66e824756a82589e0d9effe58826c3d9f66c9a59b93343d5a8c5ef5a5" - - bottle do - cellar :any_skip_relocation - sha256 "498bb2088df06bb05ae070e5d7c8ddf0fe866b56b8ecb8eb6706cba52d4a39ac" => :catalina - sha256 "91af68d9681bddda4bdb7558ed676c1756873e4ac58276b5dfb1a7f9f74b1bef" => :mojave - sha256 "2571285d55aa0c1653d78594291159f04898d7a0529701fca7f75dacd7e145c3" => :high_sierra - end - - depends_on "python@3.8" - - def install - virtualenv_install_with_resources - 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 - } - } - EOS - assert_match "1 file analyzed.\n", shell_output("#{bin}/lizard -l swift #{testpath}/test.swift") - end -end diff --git a/Formula/lizard.rb b/Formula/lizard.rb deleted file mode 100644 index cf75e15a4d735..0000000000000 --- a/Formula/lizard.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Lizard < Formula - desc "Efficient compressor with very fast decompression" - homepage "https://github.com/inikep/lizard" - url "https://github.com/inikep/lizard/archive/v2.0.tar.gz" - sha256 "85456b7274c9f0e477ff8e3f06dbc2f8ee8619d737a73c730c8a1adacb45f6da" - - bottle do - cellar :any - sha256 "93f8a82b125ca4b0548d3a890a3cada1c5724aea95df42b7b224cd83191558fc" => :catalina - sha256 "adce9d789c2391a96697128d39f103fa0a23b3e462b7e7a2d22346ceeab74925" => :mojave - sha256 "c3266fb61fb88de0d7a9f3fb2ce53e3ca2708278c7c7064b2b61a4abf138708d" => :high_sierra - sha256 "928e2fce0d64f3a5c960684ddca781073cdd285fd5f00f61c05675d5cb617366" => :sierra - end - - def install - system "make", "PREFIX=#{prefix}", "install" - cd "examples" do - system "make" - (pkgshare/"tests").install "ringBufferHC", "ringBuffer", "lineCompress", "doubleBuffer" - end - end - - test do - (testpath/"tests/test.txt").write <<~EOS - Homebrew is a free and open-source software package management system that simplifies the installation - of software on Apple's macOS operating system and Linux. The name means building software on your Mac - depending on taste. Originally written by Max Howell, the package manager has gained popularity in the - Ruby on Rails community and earned praise for its extensibility. Homebrew has been recommended for its - ease of use as well as its integration into the command line. Homebrew is a non-profit project member - of the Software Freedom Conservancy, and is run entirely by unpaid volunteers. - EOS - - cp_r pkgshare/"tests", testpath - cd "tests" do - system "./ringBufferHC", "./test.txt" - system "./ringBuffer", "./test.txt" - system "./lineCompress", "./test.txt" - system "./doubleBuffer", "./test.txt" - end - end -end diff --git a/Formula/lldpd.rb b/Formula/lldpd.rb deleted file mode 100644 index 25e5d2124ed55..0000000000000 --- a/Formula/lldpd.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Lldpd < Formula - desc "Implementation of IEEE 802.1ab (LLDP)" - homepage "https://vincentbernat.github.io/lldpd/" - url "https://media.luffy.cx/files/lldpd/lldpd-1.0.5.tar.gz" - sha256 "2dd3b212f4dbabfcbb2794c0010b245f9f8e74b387984e757be6243a74c6cb99" - - bottle do - sha256 "f37abc384f5435813515146bfa157d53d07611bce4b1b177ddc3d3410416b0b5" => :catalina - sha256 "578f07789b6d8f8d0ab98d64707ec14a1879005a06bfe88f9d0447d474e7f2cf" => :mojave - sha256 "4f04dc494f01c2ce011ea48c1e85efb3c985e98fe5b31ce768019d3746acd5ea" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "readline" - - uses_from_macos "libxml2" - - def install - readline = Formula["readline"] - args = %W[ - --prefix=#{prefix} - --sysconfdir=#{etc} - --localstatedir=#{var} - --with-launchddaemonsdir=no - --with-privsep-chroot=/var/empty - --with-privsep-group=nogroup - --with-privsep-user=nobody - --with-readline - --with-xml - --without-snmp - CPPFLAGS=-I#{readline.include}\ -DRONLY=1 - LDFLAGS=-L#{readline.lib} - ] - - system "./configure", *args - system "make" - system "make", "install" - end - - def post_install - (var/"run").mkpath - end - - plist_options :startup => true - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/lldpd - - RunAtLoad - KeepAlive - - - EOS - end -end diff --git a/Formula/llnode.rb b/Formula/llnode.rb deleted file mode 100644 index 49491badf73ba..0000000000000 --- a/Formula/llnode.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Llnode < Formula - desc "LLDB plugin for live/post-mortem debugging of node.js apps" - homepage "https://github.com/nodejs/llnode" - url "https://github.com/nodejs/llnode/archive/v3.2.0.tar.gz" - sha256 "499b970a5006c2e1057f6c61da79b5466715e830e4a91c71e6de9c1ff6fe1a52" - - bottle do - cellar :any - sha256 "7cae66b1f165be9e0167179b2512b232c367d226f0dd902e3a9ab9b5268592c3" => :catalina - sha256 "be4240e396ba27163184e031a6037461786ad13ae3c206e8f3461d546a472f01" => :mojave - sha256 "eed224951b899923a307415072bc9c4402e85d9e0d5f0aedc214cf1106f15935" => :high_sierra - end - - depends_on "node" => :build - depends_on "python@3.8" => :build - - resource "lldb" do - if DevelopmentTools.clang_build_version >= 1000 - # lldb release_60 branch tip of tree commit from 10 Apr 2018 - url "https://github.com/llvm-mirror/lldb.git", - :revision => "b6df24ff1b258b18041161b8f32ac316a3b5d8d9" - elsif DevelopmentTools.clang_build_version >= 900 - # lldb release_40 branch tip of tree commit from 12 Jan 2017 - url "https://github.com/llvm-mirror/lldb.git", - :revision => "fcd2aac9f179b968a20cf0231c3386dcef8a6659" - elsif DevelopmentTools.clang_build_version >= 802 - # lldb 390 - url "https://github.com/llvm-mirror/lldb.git", - :revision => "d556e60f02a7404b291d07cac2f27512c73bc743" - elsif DevelopmentTools.clang_build_version >= 800 - # lldb 360.1 - url "https://github.com/llvm-mirror/lldb.git", - :revision => "839b868e2993dcffc7fea898a1167f1cec097a82" - else - # It claims it to be lldb 350.0 for Xcode 7.3, but in fact it is based - # of 34. - # Xcode < 7.3 uses 340.4, so I assume we should be safe to go with this. - url "https://llvm.org/svn/llvm-project/lldb/tags/RELEASE_34/final/", - :using => :svn - end - end - - def install - ENV.append_path "PATH", "#{Formula["node"].libexec}/lib/node_modules/npm/node_modules/node-gyp/bin" - inreplace "Makefile", "node-gyp", "node-gyp.js" - - # Make sure the buildsystem doesn't try to download its own copy - target = if DevelopmentTools.clang_build_version >= 900 - "lldb-3.9" - elsif DevelopmentTools.clang_build_version >= 802 - "lldb-3.8" - else - "lldb-3.4" - end - (buildpath/target).install resource("lldb") - - system "make", "plugin" - prefix.install "llnode.dylib" - end - - def caveats - <<~EOS - `brew install llnode` does not link the plugin to LLDB PlugIns dir. - - To load this plugin in LLDB, one will need to either - - * Type `plugin load #{opt_prefix}/llnode.dylib` on each run of lldb - * Install plugin into PlugIns dir manually: - - mkdir -p ~/Library/Application\\ Support/LLDB/PlugIns - ln -sf #{opt_prefix}/llnode.dylib \\ - ~/Library/Application\\ Support/LLDB/PlugIns/ - EOS - end - - test do - lldb_out = pipe_output "lldb", <<~EOS - plugin load #{opt_prefix}/llnode.dylib - help v8 - quit - EOS - assert_match "v8 bt", lldb_out - end -end diff --git a/Formula/llvm.rb b/Formula/llvm.rb deleted file mode 100644 index cebbdee0f7120..0000000000000 --- a/Formula/llvm.rb +++ /dev/null @@ -1,294 +0,0 @@ -class Llvm < Formula - desc "Next-gen compiler infrastructure" - homepage "https://llvm.org/" - revision 3 - head "https://github.com/llvm/llvm-project.git" - - stable do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/llvm-10.0.0.src.tar.xz" - sha256 "df83a44b3a9a71029049ec101fb0077ecbbdf5fe41e395215025779099a98fdf" - - resource "clang" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang-10.0.0.src.tar.xz" - sha256 "885b062b00e903df72631c5f98b9579ed1ed2790f74e5646b4234fa084eacb21" - end - - resource "clang-tools-extra" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang-tools-extra-10.0.0.src.tar.xz" - sha256 "acdf8cf6574b40e6b1dabc93e76debb84a9feb6f22970126b04d4ba18b92911c" - end - - resource "compiler-rt" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/compiler-rt-10.0.0.src.tar.xz" - sha256 "6a7da64d3a0a7320577b68b9ca4933bdcab676e898b759850e827333c3282c75" - end - - resource "libcxx" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/libcxx-10.0.0.src.tar.xz" - sha256 "270f8a3f176f1981b0f6ab8aa556720988872ec2b48ed3b605d0ced8d09156c7" - end - - resource "libunwind" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/libunwind-10.0.0.src.tar.xz" - sha256 "09dc5ecc4714809ecf62908ae8fe8635ab476880455287036a2730966833c626" - end - - resource "lld" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/lld-10.0.0.src.tar.xz" - sha256 "b9a0d7c576eeef05bc06d6e954938a01c5396cee1d1e985891e0b1cf16e3d708" - end - - resource "lldb" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/lldb-10.0.0.src.tar.xz" - sha256 "dd1ffcb42ed033f5167089ec4c6ebe84fbca1db4a9eaebf5c614af09d89eb135" - end - - resource "openmp" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/openmp-10.0.0.src.tar.xz" - sha256 "3b9ff29a45d0509a1e9667a0feb43538ef402ea8cfc7df3758a01f20df08adfa" - end - - resource "polly" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/polly-10.0.0.src.tar.xz" - sha256 "35fba6ed628896fe529be4c10407f1b1c8a7264d40c76bced212180e701b4d97" - end - end - - bottle do - cellar :any - sha256 "ea9b9f579df49499d9ab0084e10edecc5350298d6c5db399a1dabc8694dab7db" => :catalina - sha256 "14f59a25e73e3a00fd36632f2106b41eda1b54aa1039b4b979bd957a8c041bf4" => :mojave - sha256 "6e09ca233790a58edae55bba453fd50179369b5514acb5f8b86156401227a75e" => :high_sierra - end - - # Clang cannot find system headers if Xcode CLT is not installed - pour_bottle? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - keg_only :provided_by_macos - - # https://llvm.org/docs/GettingStarted.html#requirement - # We intentionally use Make instead of Ninja. - # See: Homebrew/homebrew-core/issues/35513 - depends_on "cmake" => :build - depends_on "python@3.8" => :build - depends_on :xcode => :build - depends_on "libffi" - - uses_from_macos "libedit" - uses_from_macos "libxml2" - uses_from_macos "ncurses" - uses_from_macos "zlib" - - def install - projects = %w[ - clang - clang-tools-extra - lld - lldb - openmp - polly - ] - runtimes = %w[ - compiler-rt - libcxx - libunwind - ] - - llvmpath = buildpath/"llvm" - unless build.head? - llvmpath.install buildpath.children - [buildpath/".brew_home"] - (projects + runtimes).each { |p| resource(p).stage(buildpath/p) } - end - - # Needed until https://reviews.llvm.org/D63883 lands again. - # Use system libcxxabi. - rm_r "libcxxabi" if build.head? - - py_ver = "3.8" - - # Apple's libstdc++ is too old to build LLVM - ENV.libcxx if ENV.compiler == :clang - - # compiler-rt has some iOS simulator features that require i386 symbols - # I'm assuming the rest of clang needs support too for 32-bit compilation - # to work correctly, but if not, perhaps universal binaries could be - # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt - # can almost be treated as an entirely different build from llvm. - ENV.permit_arch_flags - - args = %W[ - -DLLVM_ENABLE_PROJECTS=#{projects.join(";")} - -DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")} - -DLIBOMP_ARCH=x86_64 - -DLLVM_POLLY_LINK_INTO_TOOLS=ON - -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON - -DLLVM_LINK_LLVM_DYLIB=ON - -DLLVM_BUILD_LLVM_C_DYLIB=ON - -DLLVM_ENABLE_EH=ON - -DLLVM_ENABLE_FFI=ON - -DLLVM_ENABLE_LIBCXX=ON - -DLLVM_ENABLE_RTTI=ON - -DLLVM_INCLUDE_DOCS=OFF - -DLLVM_INCLUDE_TESTS=OFF - -DLLVM_INSTALL_UTILS=ON - -DLLVM_ENABLE_Z3_SOLVER=OFF - -DLLVM_OPTIMIZED_TABLEGEN=ON - -DLLVM_TARGETS_TO_BUILD=all - -DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_lib}/libffi-#{Formula["libffi"].version}/include - -DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib} - -DLLVM_CREATE_XCODE_TOOLCHAIN=ON - -DLLDB_USE_SYSTEM_DEBUGSERVER=ON - -DLLDB_ENABLE_PYTHON=OFF - -DLLDB_ENABLE_LUA=OFF - -DLLDB_ENABLE_LZMA=OFF - -DLIBOMP_INSTALL_ALIASES=OFF - -DCLANG_PYTHON_BINDINGS_VERSIONS=#{py_ver} - ] - - sdk = MacOS.sdk_path_if_needed - args << "-DDEFAULT_SYSROOT=#{sdk}" if sdk - - mkdir llvmpath/"build" do - system "cmake", "-G", "Unix Makefiles", "..", *(std_cmake_args + args) - system "make" - system "make", "install" - system "make", "install-xcode-toolchain" - end - - # Install LLVM Python bindings - # Clang Python bindings are installed by CMake - (lib/"python#{py_ver}/site-packages").install llvmpath/"bindings/python/llvm" - - # Install Emacs modes - elisp.install Dir[llvmpath/"utils/emacs/*.el"] + Dir[share/"clang/*.el"] - end - - def caveats - <<~EOS - To use the bundled libc++ please add the following LDFLAGS: - LDFLAGS="-L#{opt_lib} -Wl,-rpath,#{opt_lib}" - EOS - end - - test do - assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp - - (testpath/"omptest.c").write <<~EOS - #include - #include - #include - int main() { - #pragma omp parallel num_threads(4) - { - printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); - } - return EXIT_SUCCESS; - } - EOS - - clean_version = version.to_s[/(\d+\.?)+/] - - system "#{bin}/clang", "-L#{lib}", "-fopenmp", "-nobuiltininc", - "-I#{lib}/clang/#{clean_version}/include", - "omptest.c", "-o", "omptest" - testresult = shell_output("./omptest") - - sorted_testresult = testresult.split("\n").sort.join("\n") - expected_result = <<~EOS - Hello from thread 0, nthreads 4 - Hello from thread 1, nthreads 4 - Hello from thread 2, nthreads 4 - Hello from thread 3, nthreads 4 - EOS - assert_equal expected_result.strip, sorted_testresult.strip - - (testpath/"test.c").write <<~EOS - #include - int main() - { - printf("Hello World!\\n"); - return 0; - } - EOS - - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - std::cout << "Hello World!" << std::endl; - return 0; - } - EOS - - # Testing default toolchain and SDK location. - system "#{bin}/clang++", "-v", - "-std=c++11", "test.cpp", "-o", "test++" - assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./test++").chomp - system "#{bin}/clang", "-v", "test.c", "-o", "test" - assert_equal "Hello World!", shell_output("./test").chomp - - # Testing Command Line Tools - if MacOS::CLT.installed? - toolchain_path = "/Library/Developer/CommandLineTools" - system "#{bin}/clang++", "-v", - "-isysroot", MacOS::CLT.sdk_path, - "-isystem", "#{toolchain_path}/usr/include/c++/v1", - "-isystem", "#{toolchain_path}/usr/include", - "-isystem", "#{MacOS::CLT.sdk_path}/usr/include", - "-std=c++11", "test.cpp", "-o", "testCLT++" - assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testCLT++").chomp - system "#{bin}/clang", "-v", "test.c", "-o", "testCLT" - assert_equal "Hello World!", shell_output("./testCLT").chomp - end - - # Testing Xcode - if MacOS::Xcode.installed? - system "#{bin}/clang++", "-v", - "-isysroot", MacOS::Xcode.sdk_path, - "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include/c++/v1", - "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", - "-isystem", "#{MacOS::Xcode.sdk_path}/usr/include", - "-std=c++11", "test.cpp", "-o", "testXC++" - assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testXC++").chomp - system "#{bin}/clang", "-v", - "-isysroot", MacOS.sdk_path, - "test.c", "-o", "testXC" - assert_equal "Hello World!", shell_output("./testXC").chomp - end - - # link against installed libc++ - # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 - system "#{bin}/clang++", "-v", - "-isystem", "#{opt_include}/c++/v1", - "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", - "-L#{opt_lib}", "-Wl,-rpath,#{opt_lib}" - assert_includes MachO::Tools.dylibs("testlibc++"), "#{opt_lib}/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testlibc++").chomp - - (testpath/"scanbuildtest.cpp").write <<~EOS - #include - int main() { - int *i = new int; - *i = 1; - delete i; - std::cout << *i << std::endl; - return 0; - } - EOS - assert_includes shell_output("#{bin}/scan-build clang++ scanbuildtest.cpp 2>&1"), - "warning: Use of memory after it is freed" - - (testpath/"clangformattest.c").write <<~EOS - int main() { - printf("Hello world!"); } - EOS - assert_equal "int main() { printf(\"Hello world!\"); }\n", - shell_output("#{bin}/clang-format -style=google clangformattest.c") - end -end diff --git a/Formula/llvm@6.rb b/Formula/llvm@6.rb deleted file mode 100644 index 44ec9a1916a70..0000000000000 --- a/Formula/llvm@6.rb +++ /dev/null @@ -1,267 +0,0 @@ -class LlvmAT6 < Formula - desc "Next-gen compiler infrastructure" - homepage "https://llvm.org/" - url "https://releases.llvm.org/6.0.1/llvm-6.0.1.src.tar.xz" - sha256 "b6d6c324f9c71494c0ccaf3dac1f16236d970002b42bb24a6c9e1634f7d0f4e2" - revision 3 - - bottle do - cellar :any - sha256 "3b8315438ee3bf9eaed52b8f293e5aabbbfde7bcab4eded5de9a62b214d0b8b9" => :catalina - sha256 "5f628b4b14fe10a7b3654902a126956561983ba7aa96dc1d519bfdde5b0552c0" => :mojave - sha256 "bc740b2c28da83adc7bbfecb1c76a1777a963236de52af18f4413d6b090119ec" => :high_sierra - end - - # Clang cannot find system headers if Xcode CLT is not installed - pour_bottle? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - keg_only :versioned_formula - - # https://llvm.org/docs/GettingStarted.html#requirement - depends_on "cmake" => :build - depends_on "libffi" - - resource "clang" do - url "https://releases.llvm.org/6.0.1/cfe-6.0.1.src.tar.xz" - sha256 "7c243f1485bddfdfedada3cd402ff4792ea82362ff91fbdac2dae67c6026b667" - end - - resource "clang-extra-tools" do - url "https://releases.llvm.org/6.0.1/clang-tools-extra-6.0.1.src.tar.xz" - sha256 "0d2e3727786437574835b75135f9e36f861932a958d8547ced7e13ebdda115f1" - end - - resource "compiler-rt" do - url "https://releases.llvm.org/6.0.1/compiler-rt-6.0.1.src.tar.xz" - sha256 "f4cd1e15e7d5cb708f9931d4844524e4904867240c306b06a4287b22ac1c99b9" - end - - resource "libcxx" do - url "https://releases.llvm.org/6.0.1/libcxx-6.0.1.src.tar.xz" - sha256 "7654fbc810a03860e6f01a54c2297a0b9efb04c0b9aa0409251d9bdb3726fc67" - end - - resource "libunwind" do - url "https://releases.llvm.org/6.0.1/libunwind-6.0.1.src.tar.xz" - sha256 "a8186c76a16298a0b7b051004d0162032b9b111b857fbd939d71b0930fd91b96" - end - - resource "lld" do - url "https://releases.llvm.org/6.0.1/lld-6.0.1.src.tar.xz" - sha256 "e706745806921cea5c45700e13ebe16d834b5e3c0b7ad83bf6da1f28b0634e11" - end - - resource "lldb" do - url "https://releases.llvm.org/6.0.1/lldb-6.0.1.src.tar.xz" - sha256 "6b8573841f2f7b60ffab9715c55dceff4f2a44e5a6d590ac189d20e8e7472714" - end - - resource "openmp" do - url "https://releases.llvm.org/6.0.1/openmp-6.0.1.src.tar.xz" - sha256 "66afca2b308351b180136cf899a3b22865af1a775efaf74dc8a10c96d4721c5a" - end - - resource "polly" do - url "https://releases.llvm.org/6.0.1/polly-6.0.1.src.tar.xz" - sha256 "e7765fdf6c8c102b9996dbb46e8b3abc41396032ae2315550610cf5a1ecf4ecc" - end - - def install - # Apple's libstdc++ is too old to build LLVM - ENV.libcxx if ENV.compiler == :clang - - (buildpath/"tools/clang").install resource("clang") - (buildpath/"tools/clang/tools/extra").install resource("clang-extra-tools") - (buildpath/"projects/openmp").install resource("openmp") - (buildpath/"projects/libcxx").install resource("libcxx") - (buildpath/"projects/libunwind").install resource("libunwind") - (buildpath/"tools/lld").install resource("lld") - (buildpath/"tools/polly").install resource("polly") - (buildpath/"projects/compiler-rt").install resource("compiler-rt") - - # compiler-rt has some iOS simulator features that require i386 symbols - # I'm assuming the rest of clang needs support too for 32-bit compilation - # to work correctly, but if not, perhaps universal binaries could be - # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt - # can almost be treated as an entirely different build from llvm. - ENV.permit_arch_flags - - args = %W[ - -DLIBOMP_ARCH=x86_64 - -DLINK_POLLY_INTO_TOOLS=ON - -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON - -DLLVM_BUILD_LLVM_DYLIB=ON - -DLLVM_ENABLE_EH=ON - -DLLVM_ENABLE_FFI=ON - -DLLVM_ENABLE_LIBCXX=ON - -DLLVM_ENABLE_RTTI=ON - -DLLVM_INCLUDE_DOCS=OFF - -DLLVM_INSTALL_UTILS=ON - -DLLVM_OPTIMIZED_TABLEGEN=ON - -DLLVM_TARGETS_TO_BUILD=all - -DWITH_POLLY=ON - -DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_lib}/libffi-#{Formula["libffi"].version}/include - -DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib} - -DLLVM_CREATE_XCODE_TOOLCHAIN=ON - ] - - if MacOS.version >= :mojave - sdk_path = MacOS::CLT.installed? ? "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" : MacOS.sdk_path - args << "-DDEFAULT_SYSROOT=#{sdk_path}" - end - - mkdir "build" do - system "cmake", "-G", "Unix Makefiles", "..", *(std_cmake_args + args) - system "make" - system "make", "install" - system "make", "install-xcode-toolchain" - end - - (share/"cmake").install "cmake/modules" - (share/"clang/tools").install Dir["tools/clang/tools/scan-{build,view}"] - - # scan-build is in Perl, so the @ in our path needs to be escaped - inreplace "#{share}/clang/tools/scan-build/bin/scan-build", - "$RealBin/bin/clang", "#{bin}/clang".gsub("@", "\\@") - - bin.install_symlink share/"clang/tools/scan-build/bin/scan-build", share/"clang/tools/scan-view/bin/scan-view" - man1.install_symlink share/"clang/tools/scan-build/man/scan-build.1" - - # install llvm python bindings - (lib/"python2.7/site-packages").install buildpath/"bindings/python/llvm" - (lib/"python2.7/site-packages").install buildpath/"tools/clang/bindings/python/clang" - end - - def caveats - <<~EOS - To use the bundled libc++ please add the following LDFLAGS: - LDFLAGS="-L#{opt_lib} -Wl,-rpath,#{opt_lib}" - EOS - end - - test do - assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp - - (testpath/"omptest.c").write <<~EOS - #include - #include - #include - - int main() { - #pragma omp parallel num_threads(4) - { - printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); - } - return EXIT_SUCCESS; - } - EOS - - clean_version = version.to_s[/(\d+\.?)+/] - - system "#{bin}/clang", "-L#{lib}", "-fopenmp", "-nobuiltininc", - "-I#{lib}/clang/#{clean_version}/include", - "omptest.c", "-o", "omptest" - testresult = shell_output("./omptest") - - sorted_testresult = testresult.split("\n").sort.join("\n") - expected_result = <<~EOS - Hello from thread 0, nthreads 4 - Hello from thread 1, nthreads 4 - Hello from thread 2, nthreads 4 - Hello from thread 3, nthreads 4 - EOS - assert_equal expected_result.strip, sorted_testresult.strip - - (testpath/"test.c").write <<~EOS - #include - - int main() - { - printf("Hello World!\\n"); - return 0; - } - EOS - - (testpath/"test.cpp").write <<~EOS - #include - - int main() - { - std::cout << "Hello World!" << std::endl; - return 0; - } - EOS - - # Testing default toolchain and SDK location. - system "#{bin}/clang++", "-v", - "-std=c++11", "test.cpp", "-o", "test++" - assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./test++").chomp - system "#{bin}/clang", "-v", "test.c", "-o", "test" - assert_equal "Hello World!", shell_output("./test").chomp - - # Testing Command Line Tools - if MacOS::CLT.installed? - toolchain_path = "/Library/Developer/CommandLineTools" - sdk_path = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" - system "#{bin}/clang++", "-v", - "-isysroot", sdk_path, - "-isystem", "#{toolchain_path}/usr/include/c++/v1", - "-isystem", "#{toolchain_path}/usr/include", - "-isystem", "#{sdk_path}/usr/include", - "-std=c++11", "test.cpp", "-o", "testCLT++" - assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testCLT++").chomp - system "#{bin}/clang", "-v", "test.c", "-o", "testCLT" - assert_equal "Hello World!", shell_output("./testCLT").chomp - end - - # Testing Xcode - if MacOS::Xcode.installed? - system "#{bin}/clang++", "-v", - "-isysroot", MacOS.sdk_path, - "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include/c++/v1", - "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", - "-isystem", "#{MacOS.sdk_path}/usr/include", - "-std=c++11", "test.cpp", "-o", "testXC++" - assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testXC++").chomp - system "#{bin}/clang", "-v", - "-isysroot", MacOS.sdk_path, - "test.c", "-o", "testXC" - assert_equal "Hello World!", shell_output("./testXC").chomp - end - - # link against installed libc++ - # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 - system "#{bin}/clang++", "-v", - "-isystem", "#{opt_include}/c++/v1", - "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", - "-L#{opt_lib}", "-Wl,-rpath,#{opt_lib}" - assert_includes MachO::Tools.dylibs("testlibc++"), "#{opt_lib}/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testlibc++").chomp - - (testpath/"scanbuildtest.cpp").write <<~EOS - #include - int main() { - int *i = new int; - *i = 1; - delete i; - std::cout << *i << std::endl; - return 0; - } - EOS - assert_includes shell_output("#{bin}/scan-build clang++ scanbuildtest.cpp 2>&1"), - "warning: Use of memory after it is freed" - - (testpath/"clangformattest.c").write <<~EOS - int main() { - printf("Hello world!"); } - EOS - assert_equal "int main() { printf(\"Hello world!\"); }\n", - shell_output("#{bin}/clang-format -style=google clangformattest.c") - end -end diff --git a/Formula/llvm@7.rb b/Formula/llvm@7.rb deleted file mode 100644 index b00f6228bcd0f..0000000000000 --- a/Formula/llvm@7.rb +++ /dev/null @@ -1,260 +0,0 @@ -class LlvmAT7 < Formula - desc "Next-gen compiler infrastructure" - homepage "https://llvm.org/" - url "https://releases.llvm.org/7.1.0/llvm-7.1.0.src.tar.xz" - sha256 "1bcc9b285074ded87b88faaedddb88e6b5d6c331dfcfb57d7f3393dd622b3764" - revision 2 - - bottle do - cellar :any - sha256 "400bb0bb43849d1f118d93a1647de6e9636934e941c43a6f4866258f764f42b3" => :catalina - sha256 "564f25a86c519b737a795de441da6c6c14e9f026813a73149b7939c986241ba6" => :mojave - sha256 "4170d8e522ce8aea22450c818bb68b6142671f4239262395d8f09d82621ee343" => :high_sierra - end - - # Clang cannot find system headers if Xcode CLT is not installed - pour_bottle? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - keg_only :versioned_formula - - # https://llvm.org/docs/GettingStarted.html#requirement - depends_on "cmake" => :build - depends_on :xcode => :build - depends_on "libffi" - - resource "clang" do - url "https://releases.llvm.org/7.1.0/cfe-7.1.0.src.tar.xz" - sha256 "e97dc472aae52197a4d5e0185eb8f9e04d7575d2dc2b12194ddc768e0f8a846d" - end - - resource "clang-extra-tools" do - url "https://releases.llvm.org/7.1.0/clang-tools-extra-7.1.0.src.tar.xz" - sha256 "1ce0042c48ecea839ce67b87e9739cf18e7a5c2b3b9a36d177d00979609b6451" - end - - resource "compiler-rt" do - url "https://releases.llvm.org/7.1.0/compiler-rt-7.1.0.src.tar.xz" - sha256 "057bdac0581215b5ceb39edfd5bbef9eb79578f16a8908349f3066251fba88d8" - end - - resource "libcxx" do - url "https://releases.llvm.org/7.1.0/libcxx-7.1.0.src.tar.xz" - sha256 "4442b408eaea3c1e4aa2cf21da38aba9f0856b4b522b1c3d555c3251af62b04e" - end - - resource "libunwind" do - url "https://releases.llvm.org/7.1.0/libunwind-7.1.0.src.tar.xz" - sha256 "174a7fc9eb7422c8ea96993649be0f80ca5937f3fe000c40c3d15b1074d7ad0c" - end - - resource "lld" do - url "https://releases.llvm.org/7.1.0/lld-7.1.0.src.tar.xz" - sha256 "a10f274a0a09408eaf9c088dec6fb2254f7d641221437763c94546cbfe595867" - end - - resource "openmp" do - url "https://releases.llvm.org/7.1.0/openmp-7.1.0.src.tar.xz" - sha256 "1ee73aa1eef4ef7f75c96b24bf02445440602064c0074891ca5344a63f1fe5b5" - end - - resource "polly" do - url "https://releases.llvm.org/7.1.0/polly-7.1.0.src.tar.xz" - sha256 "305454f72db5e30def3f48e2dc56ce62f9c52c3b9278b8f357a093a588b6139b" - end - - def install - # Apple's libstdc++ is too old to build LLVM - ENV.libcxx if ENV.compiler == :clang - - (buildpath/"tools/clang").install resource("clang") - (buildpath/"tools/clang/tools/extra").install resource("clang-extra-tools") - (buildpath/"projects/openmp").install resource("openmp") - (buildpath/"projects/libcxx").install resource("libcxx") - (buildpath/"projects/libunwind").install resource("libunwind") - (buildpath/"tools/lld").install resource("lld") - (buildpath/"tools/polly").install resource("polly") - (buildpath/"projects/compiler-rt").install resource("compiler-rt") - - # compiler-rt has some iOS simulator features that require i386 symbols - # I'm assuming the rest of clang needs support too for 32-bit compilation - # to work correctly, but if not, perhaps universal binaries could be - # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt - # can almost be treated as an entirely different build from llvm. - ENV.permit_arch_flags - - args = %W[ - -DLIBOMP_ARCH=x86_64 - -DLINK_POLLY_INTO_TOOLS=ON - -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON - -DLLVM_BUILD_LLVM_DYLIB=ON - -DLLVM_ENABLE_EH=ON - -DLLVM_ENABLE_FFI=ON - -DLLVM_ENABLE_LIBCXX=ON - -DLLVM_ENABLE_RTTI=ON - -DLLVM_INCLUDE_DOCS=OFF - -DLLVM_INSTALL_UTILS=ON - -DLLVM_OPTIMIZED_TABLEGEN=ON - -DLLVM_TARGETS_TO_BUILD=all - -DWITH_POLLY=ON - -DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_lib}/libffi-#{Formula["libffi"].version}/include - -DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib} - -DLLVM_CREATE_XCODE_TOOLCHAIN=ON - ] - - if MacOS.version >= :mojave - sdk_path = MacOS::CLT.installed? ? "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" : MacOS.sdk_path - args << "-DDEFAULT_SYSROOT=#{sdk_path}" - end - - mkdir "build" do - system "cmake", "-G", "Unix Makefiles", "..", *(std_cmake_args + args) - system "make" - system "make", "install" - system "make", "install-xcode-toolchain" - end - - (share/"cmake").install "cmake/modules" - (share/"clang/tools").install Dir["tools/clang/tools/scan-{build,view}"] - - # scan-build is in Perl, so the @ in our path needs to be escaped - inreplace "#{share}/clang/tools/scan-build/bin/scan-build", - "$RealBin/bin/clang", "#{bin}/clang".gsub("@", "\\@") - - bin.install_symlink share/"clang/tools/scan-build/bin/scan-build", share/"clang/tools/scan-view/bin/scan-view" - man1.install_symlink share/"clang/tools/scan-build/man/scan-build.1" - - # install llvm python bindings - (lib/"python2.7/site-packages").install buildpath/"bindings/python/llvm" - (lib/"python2.7/site-packages").install buildpath/"tools/clang/bindings/python/clang" - end - - def caveats - <<~EOS - To use the bundled libc++ please add the following LDFLAGS: - LDFLAGS="-L#{opt_lib} -Wl,-rpath,#{opt_lib}" - EOS - end - - test do - assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp - - (testpath/"omptest.c").write <<~EOS - #include - #include - #include - int main() { - #pragma omp parallel num_threads(4) - { - printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); - } - return EXIT_SUCCESS; - } - EOS - - clean_version = version.to_s[/(\d+\.?)+/] - - system "#{bin}/clang", "-L#{lib}", "-fopenmp", "-nobuiltininc", - "-I#{lib}/clang/#{clean_version}/include", - "omptest.c", "-o", "omptest" - testresult = shell_output("./omptest") - - sorted_testresult = testresult.split("\n").sort.join("\n") - expected_result = <<~EOS - Hello from thread 0, nthreads 4 - Hello from thread 1, nthreads 4 - Hello from thread 2, nthreads 4 - Hello from thread 3, nthreads 4 - EOS - assert_equal expected_result.strip, sorted_testresult.strip - - (testpath/"test.c").write <<~EOS - #include - int main() - { - printf("Hello World!\\n"); - return 0; - } - EOS - - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - std::cout << "Hello World!" << std::endl; - return 0; - } - EOS - - # Testing default toolchain and SDK location. - system "#{bin}/clang++", "-v", - "-std=c++11", "test.cpp", "-o", "test++" - assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./test++").chomp - system "#{bin}/clang", "-v", "test.c", "-o", "test" - assert_equal "Hello World!", shell_output("./test").chomp - - # Testing Command Line Tools - if MacOS::CLT.installed? - toolchain_path = "/Library/Developer/CommandLineTools" - sdk_path = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" - system "#{bin}/clang++", "-v", - "-isysroot", sdk_path, - "-isystem", "#{toolchain_path}/usr/include/c++/v1", - "-isystem", "#{toolchain_path}/usr/include", - "-isystem", "#{sdk_path}/usr/include", - "-std=c++11", "test.cpp", "-o", "testCLT++" - assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testCLT++").chomp - system "#{bin}/clang", "-v", "test.c", "-o", "testCLT" - assert_equal "Hello World!", shell_output("./testCLT").chomp - end - - # Testing Xcode - if MacOS::Xcode.installed? - system "#{bin}/clang++", "-v", - "-isysroot", MacOS.sdk_path, - "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include/c++/v1", - "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", - "-isystem", "#{MacOS.sdk_path}/usr/include", - "-std=c++11", "test.cpp", "-o", "testXC++" - assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testXC++").chomp - system "#{bin}/clang", "-v", - "-isysroot", MacOS.sdk_path, - "test.c", "-o", "testXC" - assert_equal "Hello World!", shell_output("./testXC").chomp - end - - # link against installed libc++ - # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 - system "#{bin}/clang++", "-v", - "-isystem", "#{opt_include}/c++/v1", - "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", - "-L#{opt_lib}", "-Wl,-rpath,#{opt_lib}" - assert_includes MachO::Tools.dylibs("testlibc++"), "#{opt_lib}/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testlibc++").chomp - - (testpath/"scanbuildtest.cpp").write <<~EOS - #include - int main() { - int *i = new int; - *i = 1; - delete i; - std::cout << *i << std::endl; - return 0; - } - EOS - assert_includes shell_output("#{bin}/scan-build clang++ scanbuildtest.cpp 2>&1"), - "warning: Use of memory after it is freed" - - (testpath/"clangformattest.c").write <<~EOS - int main() { - printf("Hello world!"); } - EOS - assert_equal "int main() { printf(\"Hello world!\"); }\n", - shell_output("#{bin}/clang-format -style=google clangformattest.c") - end -end diff --git a/Formula/llvm@8.rb b/Formula/llvm@8.rb deleted file mode 100644 index 6f4dd0538092a..0000000000000 --- a/Formula/llvm@8.rb +++ /dev/null @@ -1,267 +0,0 @@ -class LlvmAT8 < Formula - desc "Next-gen compiler infrastructure" - homepage "https://llvm.org/" - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/llvm-8.0.1.src.tar.xz" - sha256 "44787a6d02f7140f145e2250d56c9f849334e11f9ae379827510ed72f12b75e7" - revision 3 - - bottle do - cellar :any - sha256 "ab099d84e5f0a58ea37172fd85753336d855fc25e9459ceff12ddc2dbb56ef71" => :catalina - sha256 "ee795cbebce64f79bbcf7c42526093df7bd2e5e986a721197bca5cf6c822e87a" => :mojave - sha256 "3f80b7119307b128b1e3ae8a2fea97a9878afb5a7436a7d35615b1e743bc7622" => :high_sierra - end - - # Clang cannot find system headers if Xcode CLT is not installed - pour_bottle? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - keg_only :versioned_formula - - # https://llvm.org/docs/GettingStarted.html#requirement - depends_on "cmake" => :build - depends_on :xcode => :build - depends_on "libffi" - depends_on "swig" - - resource "clang" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/cfe-8.0.1.src.tar.xz" - sha256 "70effd69f7a8ab249f66b0a68aba8b08af52aa2ab710dfb8a0fba102685b1646" - end - - resource "clang-extra-tools" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/clang-tools-extra-8.0.1.src.tar.xz" - sha256 "187179b617e4f07bb605cc215da0527e64990b4a7dd5cbcc452a16b64e02c3e1" - end - - resource "compiler-rt" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/compiler-rt-8.0.1.src.tar.xz" - sha256 "11828fb4823387d820c6715b25f6b2405e60837d12a7469e7a8882911c721837" - end - - resource "libcxx" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/libcxx-8.0.1.src.tar.xz" - sha256 "7f0652c86a0307a250b5741ab6e82bb10766fb6f2b5a5602a63f30337e629b78" - end - - resource "libunwind" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/libunwind-8.0.1.src.tar.xz" - sha256 "1870161dda3172c63e632c1f60624564e1eb0f9233cfa8f040748ca5ff630f6e" - end - - resource "lld" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/lld-8.0.1.src.tar.xz" - sha256 "9fba1e94249bd7913e8a6c3aadcb308b76c8c3d83c5ce36c99c3f34d73873d88" - end - - resource "lldb" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/lldb-8.0.1.src.tar.xz" - sha256 "e8a79baa6d11dd0650ab4a1b479f699dfad82af627cbbcd49fa6f2dc14e131d7" - end - - resource "openmp" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/openmp-8.0.1.src.tar.xz" - sha256 "3e85dd3cad41117b7c89a41de72f2e6aa756ea7b4ef63bb10dcddf8561a7722c" - end - - resource "polly" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/polly-8.0.1.src.tar.xz" - sha256 "e8a1f7e8af238b32ce39ab5de1f3317a2e3f7d71a8b1b8bbacbd481ac76fd2d1" - end - - def install - # Apple's libstdc++ is too old to build LLVM - ENV.libcxx if ENV.compiler == :clang - - (buildpath/"tools/clang").install resource("clang") - (buildpath/"tools/clang/tools/extra").install resource("clang-extra-tools") - (buildpath/"projects/openmp").install resource("openmp") - (buildpath/"projects/libcxx").install resource("libcxx") - (buildpath/"projects/libunwind").install resource("libunwind") - (buildpath/"tools/lld").install resource("lld") - (buildpath/"tools/lldb").install resource("lldb") - (buildpath/"tools/polly").install resource("polly") - (buildpath/"projects/compiler-rt").install resource("compiler-rt") - - # compiler-rt has some iOS simulator features that require i386 symbols - # I'm assuming the rest of clang needs support too for 32-bit compilation - # to work correctly, but if not, perhaps universal binaries could be - # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt - # can almost be treated as an entirely different build from llvm. - ENV.permit_arch_flags - - args = %W[ - -DLIBOMP_ARCH=x86_64 - -DLINK_POLLY_INTO_TOOLS=ON - -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON - -DLLVM_BUILD_LLVM_DYLIB=ON - -DLLVM_ENABLE_EH=ON - -DLLVM_ENABLE_FFI=ON - -DLLVM_ENABLE_LIBCXX=ON - -DLLVM_ENABLE_RTTI=ON - -DCLANG_ANALYZER_ENABLE_Z3_SOLVER=OFF - -DLLVM_INCLUDE_DOCS=OFF - -DLLVM_INSTALL_UTILS=ON - -DLLVM_OPTIMIZED_TABLEGEN=ON - -DLLVM_TARGETS_TO_BUILD=all - -DWITH_POLLY=ON - -DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_lib}/libffi-#{Formula["libffi"].version}/include - -DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib} - -DLLVM_CREATE_XCODE_TOOLCHAIN=ON - -DLLDB_USE_SYSTEM_DEBUGSERVER=ON - -DLLDB_DISABLE_PYTHON=1 - -DLIBOMP_INSTALL_ALIASES=OFF - ] - - if MacOS.version >= :mojave - sdk_path = MacOS::CLT.installed? ? "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" : MacOS.sdk_path - args << "-DDEFAULT_SYSROOT=#{sdk_path}" - end - - mkdir "build" do - system "cmake", "-G", "Unix Makefiles", "..", *(std_cmake_args + args) - system "make" - system "make", "install" - system "make", "install-xcode-toolchain" - end - - (share/"clang/tools").install Dir["tools/clang/tools/scan-{build,view}"] - (share/"cmake").install "cmake/modules" - inreplace "#{share}/clang/tools/scan-build/bin/scan-build", "$RealBin/bin/clang", "#{bin}/clang" - bin.install_symlink share/"clang/tools/scan-build/bin/scan-build", share/"clang/tools/scan-view/bin/scan-view" - man1.install_symlink share/"clang/tools/scan-build/man/scan-build.1" - - # install llvm python bindings - (lib/"python2.7/site-packages").install buildpath/"bindings/python/llvm" - (lib/"python2.7/site-packages").install buildpath/"tools/clang/bindings/python/clang" - end - - def caveats - <<~EOS - To use the bundled libc++ please add the following LDFLAGS: - LDFLAGS="-L#{opt_lib} -Wl,-rpath,#{opt_lib}" - EOS - end - - test do - assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp - - (testpath/"omptest.c").write <<~EOS - #include - #include - #include - int main() { - #pragma omp parallel num_threads(4) - { - printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); - } - return EXIT_SUCCESS; - } - EOS - - clean_version = version.to_s[/(\d+\.?)+/] - - system "#{bin}/clang", "-L#{lib}", "-fopenmp", "-nobuiltininc", - "-I#{lib}/clang/#{clean_version}/include", - "omptest.c", "-o", "omptest" - testresult = shell_output("./omptest") - - sorted_testresult = testresult.split("\n").sort.join("\n") - expected_result = <<~EOS - Hello from thread 0, nthreads 4 - Hello from thread 1, nthreads 4 - Hello from thread 2, nthreads 4 - Hello from thread 3, nthreads 4 - EOS - assert_equal expected_result.strip, sorted_testresult.strip - - (testpath/"test.c").write <<~EOS - #include - int main() - { - printf("Hello World!\\n"); - return 0; - } - EOS - - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - std::cout << "Hello World!" << std::endl; - return 0; - } - EOS - - # Testing default toolchain and SDK location. - system "#{bin}/clang++", "-v", - "-std=c++11", "test.cpp", "-o", "test++" - assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./test++").chomp - system "#{bin}/clang", "-v", "test.c", "-o", "test" - assert_equal "Hello World!", shell_output("./test").chomp - - # Testing Command Line Tools - if MacOS::CLT.installed? - toolchain_path = "/Library/Developer/CommandLineTools" - sdk_path = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" - system "#{bin}/clang++", "-v", - "-isysroot", sdk_path, - "-isystem", "#{toolchain_path}/usr/include/c++/v1", - "-isystem", "#{toolchain_path}/usr/include", - "-isystem", "#{sdk_path}/usr/include", - "-std=c++11", "test.cpp", "-o", "testCLT++" - assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testCLT++").chomp - system "#{bin}/clang", "-v", "test.c", "-o", "testCLT" - assert_equal "Hello World!", shell_output("./testCLT").chomp - end - - # Testing Xcode - if MacOS::Xcode.installed? - system "#{bin}/clang++", "-v", - "-isysroot", MacOS.sdk_path, - "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include/c++/v1", - "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", - "-isystem", "#{MacOS.sdk_path}/usr/include", - "-std=c++11", "test.cpp", "-o", "testXC++" - assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testXC++").chomp - system "#{bin}/clang", "-v", - "-isysroot", MacOS.sdk_path, - "test.c", "-o", "testXC" - assert_equal "Hello World!", shell_output("./testXC").chomp - end - - # link against installed libc++ - # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 - system "#{bin}/clang++", "-v", - "-isystem", "#{opt_include}/c++/v1", - "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", - "-L#{opt_lib}", "-Wl,-rpath,#{opt_lib}" - assert_includes MachO::Tools.dylibs("testlibc++"), "#{opt_lib}/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testlibc++").chomp - - (testpath/"scanbuildtest.cpp").write <<~EOS - #include - int main() { - int *i = new int; - *i = 1; - delete i; - std::cout << *i << std::endl; - return 0; - } - EOS - assert_includes shell_output("#{bin}/scan-build --use-analyzer #{bin}/clang++ clang++ scanbuildtest.cpp 2>&1"), - "warning: Use of memory after it is freed" - - (testpath/"clangformattest.c").write <<~EOS - int main() { - printf("Hello world!"); } - EOS - assert_equal "int main() { printf(\"Hello world!\"); }\n", - shell_output("#{bin}/clang-format -style=google clangformattest.c") - end -end diff --git a/Formula/llvm@9.rb b/Formula/llvm@9.rb deleted file mode 100644 index 1d076f0bb6c2b..0000000000000 --- a/Formula/llvm@9.rb +++ /dev/null @@ -1,274 +0,0 @@ -class LlvmAT9 < Formula - desc "Next-gen compiler infrastructure" - homepage "https://llvm.org/" - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/llvm-9.0.1.src.tar.xz" - sha256 "00a1ee1f389f81e9979f3a640a01c431b3021de0d42278f6508391a2f0b81c9a" - revision 2 - - bottle do - cellar :any - sha256 "86f022bf477a011e5f416a0e98984de4c07fbba366dc494c6cef315807112a01" => :catalina - sha256 "e3f1be89db13adc068d2a0bfcb5f06e6220074e79c3af021a75d5e8b0cb3a1c8" => :mojave - sha256 "715609e32eedc2d2135ab5f24799de649ab89d19dd765c697cc59b4ac11b3825" => :high_sierra - end - - # Clang cannot find system headers if Xcode CLT is not installed - pour_bottle? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end - - keg_only :versioned_formula - - # https://llvm.org/docs/GettingStarted.html#requirement - depends_on "cmake" => :build - depends_on :xcode => :build - depends_on "libffi" - depends_on "swig" - - resource "clang" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/clang-9.0.1.src.tar.xz" - sha256 "5778512b2e065c204010f88777d44b95250671103e434f9dc7363ab2e3804253" - end - - resource "clang-extra-tools" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/clang-tools-extra-9.0.1.src.tar.xz" - sha256 "b26fd72a78bd7db998a26270ec9ec6a01346651d88fa87b4b323e13049fb6f07" - end - - resource "compiler-rt" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/compiler-rt-9.0.1.src.tar.xz" - sha256 "c2bfab95c9986318318363d7f371a85a95e333bc0b34fbfa52edbd3f5e3a9077" - end - - resource "libcxx" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/libcxx-9.0.1.src.tar.xz" - sha256 "0981ff11b862f4f179a13576ab0a2f5530f46bd3b6b4a90f568ccc6a62914b34" - end - - resource "libunwind" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/libunwind-9.0.1.src.tar.xz" - sha256 "535a106a700889274cc7b2f610b2dcb8fc4b0ea597c3208602d7d037141460f1" - end - - resource "lld" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/lld-9.0.1.src.tar.xz" - sha256 "86262bad3e2fd784ba8c5e2158d7aa36f12b85f2515e95bc81d65d75bb9b0c82" - end - - resource "lldb" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/lldb-9.0.1.src.tar.xz" - sha256 "8a7b9fd795c31a3e3cba6ce1377a2ae5c67376d92888702ce27e26f0971beb09" - end - - resource "openmp" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/openmp-9.0.1.src.tar.xz" - sha256 "5c94060f846f965698574d9ce22975c0e9f04c9b14088c3af5f03870af75cace" - end - - resource "polly" do - url "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/polly-9.0.1.src.tar.xz" - sha256 "9a4ac69df923230d13eb6cd0d03f605499f6a854b1dc96a9b72c4eb075040fcf" - end - - def install - # Apple's libstdc++ is too old to build LLVM - ENV.libcxx if ENV.compiler == :clang - - (buildpath/"tools/clang").install resource("clang") - (buildpath/"tools/clang/tools/extra").install resource("clang-extra-tools") - (buildpath/"projects/openmp").install resource("openmp") - (buildpath/"projects/libcxx").install resource("libcxx") - (buildpath/"projects/libunwind").install resource("libunwind") - (buildpath/"tools/lld").install resource("lld") - (buildpath/"tools/lldb").install resource("lldb") - (buildpath/"tools/polly").install resource("polly") - (buildpath/"projects/compiler-rt").install resource("compiler-rt") - - # compiler-rt has some iOS simulator features that require i386 symbols - # I'm assuming the rest of clang needs support too for 32-bit compilation - # to work correctly, but if not, perhaps universal binaries could be - # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt - # can almost be treated as an entirely different build from llvm. - ENV.permit_arch_flags - - args = %W[ - -DLIBOMP_ARCH=x86_64 - -DLINK_POLLY_INTO_TOOLS=ON - -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON - -DLLVM_BUILD_LLVM_DYLIB=ON - -DLLVM_ENABLE_EH=ON - -DLLVM_ENABLE_FFI=ON - -DLLVM_ENABLE_LIBCXX=ON - -DLLVM_ENABLE_RTTI=ON - -DLLVM_ENABLE_Z3_SOLVER=OFF - -DLLVM_INCLUDE_DOCS=OFF - -DLLVM_INSTALL_UTILS=ON - -DLLVM_OPTIMIZED_TABLEGEN=ON - -DLLVM_TARGETS_TO_BUILD=all - -DWITH_POLLY=ON - -DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_lib}/libffi-#{Formula["libffi"].version}/include - -DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib} - -DLLVM_CREATE_XCODE_TOOLCHAIN=ON - -DLLDB_USE_SYSTEM_DEBUGSERVER=ON - -DLLDB_DISABLE_PYTHON=1 - -DLIBOMP_INSTALL_ALIASES=OFF - ] - - mkdir "build" do - if MacOS.version >= :mojave - sdk_path = MacOS::CLT.installed? ? "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" : MacOS.sdk_path - args << "-DDEFAULT_SYSROOT=#{sdk_path}" - end - - system "cmake", "-G", "Unix Makefiles", "..", *(std_cmake_args + args) - system "make" - system "make", "install" - system "make", "install-xcode-toolchain" - end - - (share/"clang/tools").install Dir["tools/clang/tools/scan-{build,view}"] - (share/"cmake").install "cmake/modules" - inreplace "#{share}/clang/tools/scan-build/bin/scan-build", "$RealBin/bin/clang", "#{bin}/clang".gsub("@", "\\@") - bin.install_symlink share/"clang/tools/scan-build/bin/scan-build", share/"clang/tools/scan-view/bin/scan-view" - man1.install_symlink share/"clang/tools/scan-build/man/scan-build.1" - - # install llvm python bindings - (lib/"python2.7/site-packages").install buildpath/"bindings/python/llvm" - (lib/"python2.7/site-packages").install buildpath/"tools/clang/bindings/python/clang" - - # install emacs modes - elisp.install Dir["utils/emacs/*.el"] + %w[ - tools/clang/tools/clang-format/clang-format.el - tools/clang/tools/clang-rename/clang-rename.el - tools/clang/tools/extra/clang-include-fixer/tool/clang-include-fixer.el - ] - end - - def caveats - <<~EOS - To use the bundled libc++ please add the following LDFLAGS: - LDFLAGS="-L#{opt_lib} -Wl,-rpath,#{opt_lib}" - EOS - end - - test do - assert_equal prefix.to_s, shell_output("#{bin}/llvm-config --prefix").chomp - - (testpath/"omptest.c").write <<~EOS - #include - #include - #include - int main() { - #pragma omp parallel num_threads(4) - { - printf("Hello from thread %d, nthreads %d\\n", omp_get_thread_num(), omp_get_num_threads()); - } - return EXIT_SUCCESS; - } - EOS - - clean_version = version.to_s[/(\d+\.?)+/] - - system "#{bin}/clang", "-L#{lib}", "-fopenmp", "-nobuiltininc", - "-I#{lib}/clang/#{clean_version}/include", - "omptest.c", "-o", "omptest" - testresult = shell_output("./omptest") - - sorted_testresult = testresult.split("\n").sort.join("\n") - expected_result = <<~EOS - Hello from thread 0, nthreads 4 - Hello from thread 1, nthreads 4 - Hello from thread 2, nthreads 4 - Hello from thread 3, nthreads 4 - EOS - assert_equal expected_result.strip, sorted_testresult.strip - - (testpath/"test.c").write <<~EOS - #include - int main() - { - printf("Hello World!\\n"); - return 0; - } - EOS - - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - std::cout << "Hello World!" << std::endl; - return 0; - } - EOS - - # Testing default toolchain and SDK location. - system "#{bin}/clang++", "-v", - "-std=c++11", "test.cpp", "-o", "test++" - assert_includes MachO::Tools.dylibs("test++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./test++").chomp - system "#{bin}/clang", "-v", "test.c", "-o", "test" - assert_equal "Hello World!", shell_output("./test").chomp - - # Testing Command Line Tools - if MacOS::CLT.installed? - toolchain_path = "/Library/Developer/CommandLineTools" - sdk_path = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" - system "#{bin}/clang++", "-v", - "-isysroot", sdk_path, - "-isystem", "#{toolchain_path}/usr/include/c++/v1", - "-isystem", "#{toolchain_path}/usr/include", - "-isystem", "#{sdk_path}/usr/include", - "-std=c++11", "test.cpp", "-o", "testCLT++" - assert_includes MachO::Tools.dylibs("testCLT++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testCLT++").chomp - system "#{bin}/clang", "-v", "test.c", "-o", "testCLT" - assert_equal "Hello World!", shell_output("./testCLT").chomp - end - - # Testing Xcode - if MacOS::Xcode.installed? - system "#{bin}/clang++", "-v", - "-isysroot", MacOS.sdk_path, - "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include/c++/v1", - "-isystem", "#{MacOS::Xcode.toolchain_path}/usr/include", - "-isystem", "#{MacOS.sdk_path}/usr/include", - "-std=c++11", "test.cpp", "-o", "testXC++" - assert_includes MachO::Tools.dylibs("testXC++"), "/usr/lib/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testXC++").chomp - system "#{bin}/clang", "-v", - "-isysroot", MacOS.sdk_path, - "test.c", "-o", "testXC" - assert_equal "Hello World!", shell_output("./testXC").chomp - end - - # link against installed libc++ - # related to https://github.com/Homebrew/legacy-homebrew/issues/47149 - system "#{bin}/clang++", "-v", - "-isystem", "#{opt_include}/c++/v1", - "-std=c++11", "-stdlib=libc++", "test.cpp", "-o", "testlibc++", - "-L#{opt_lib}", "-Wl,-rpath,#{opt_lib}" - assert_includes MachO::Tools.dylibs("testlibc++"), "#{opt_lib}/libc++.1.dylib" - assert_equal "Hello World!", shell_output("./testlibc++").chomp - - (testpath/"scanbuildtest.cpp").write <<~EOS - #include - int main() { - int *i = new int; - *i = 1; - delete i; - std::cout << *i << std::endl; - return 0; - } - EOS - assert_includes shell_output("#{bin}/scan-build clang++ scanbuildtest.cpp 2>&1"), - "warning: Use of memory after it is freed" - - (testpath/"clangformattest.c").write <<~EOS - int main() { - printf("Hello world!"); } - EOS - assert_equal "int main() { printf(\"Hello world!\"); }\n", - shell_output("#{bin}/clang-format -style=google clangformattest.c") - end -end diff --git a/Formula/lm4tools.rb b/Formula/lm4tools.rb deleted file mode 100644 index 1f8aae9abd800..0000000000000 --- a/Formula/lm4tools.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Lm4tools < Formula - desc "Tools for TI Stellaris Launchpad boards" - homepage "https://github.com/utzig/lm4tools" - url "https://github.com/utzig/lm4tools/archive/v0.1.3.tar.gz" - sha256 "e8064ace3c424b429b7e0b50e58b467d8ed92962b6a6dfa7f6a39942416b1627" - - bottle do - cellar :any - sha256 "5d2e503a9c94226f9d3c6d1da1a54424be1c9a16279bcc94253ab0e2da2a3718" => :catalina - sha256 "a0bb88705b97875de770b1979b5480521007b25efd627f092e178941b8ecd4ec" => :mojave - sha256 "9c65eb6694f74b513b707c237cf13bb6a54b9e4a188582355f78e94f9ac53407" => :high_sierra - sha256 "3238455d6329e9749700b9c12c2e7459b63ea400fb0e7e6818b8c7c9b77b4e6d" => :sierra - sha256 "7c6bd7ec1a220de95089d71f79baa61ce459ffa0d00d32af727435594ac7603a" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "libusb" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - output = shell_output("echo data | #{bin}/lm4flash - 2>&1", 2) - assert_equal "Unable to find any ICDI devices\n", output - end -end diff --git a/Formula/lmdb.rb b/Formula/lmdb.rb deleted file mode 100644 index 492c3e70ffcf6..0000000000000 --- a/Formula/lmdb.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Lmdb < Formula - desc "Lightning memory-mapped database: key-value data store" - homepage "https://symas.com/lmdb/" - url "https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.25/openldap-LMDB_0.9.25.tar.bz2" - sha256 "45269ebbf13fe1b6a3aa3fa77b3109c1764bd17a95264cd56506eac832b91b6f" - version_scheme 1 - head "https://git.openldap.org/openldap/openldap.git", :branch => "mdb.master" - - bottle do - cellar :any - sha256 "22dcd49d0d1027f6acef65aeb8f08422f9482daecf4c75b1add02f5368bfd96e" => :catalina - sha256 "2e9006940427302ed31c4972d47a998be797c669e2d75056107fcf28974f43e7" => :mojave - sha256 "445091428bfb6ca3712290c3484dcba219a6e4ab935829050e0c4caf0bc7b1b3" => :high_sierra - end - - def install - cd "libraries/liblmdb" do - system "make", "SOEXT=.dylib" - system "make", "install", "SOEXT=.dylib", "prefix=#{prefix}" - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/mdb_dump -V") - end -end diff --git a/Formula/lmod.rb b/Formula/lmod.rb deleted file mode 100644 index b8f2a1f2ff78f..0000000000000 --- a/Formula/lmod.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Lmod < Formula - desc "Lua-based environment modules system to modify PATH variable" - homepage "https://www.tacc.utexas.edu/research-development/tacc-projects/lmod" - url "https://github.com/TACC/Lmod/archive/8.3.17.tar.gz" - sha256 "adf5976c8d18ccef3165c919e593ae777dc64312841ada8fde994f4c25c2bd31" - - bottle do - cellar :any_skip_relocation - sha256 "bbea04990100dcf0e068d5f9535e91bc23ca8fefb3e12b95cc95ca2174c2b545" => :catalina - sha256 "5c95300dc88b68f96634994ef7ea7027833fbaf696be2632d172a6f313bf2241" => :mojave - sha256 "df4ce782e49a8e789d4985e2d18011e9adbd6b58896db3b900edc52607fc1be5" => :high_sierra - end - - depends_on "luarocks" => :build - depends_on "pkg-config" => :build - depends_on "lua" - - resource "luafilesystem" do - url "https://github.com/keplerproject/luafilesystem/archive/v1_8_0.tar.gz" - sha256 "16d17c788b8093f2047325343f5e9b74cccb1ea96001e45914a58bbae8932495" - end - - resource "luaposix" do - url "https://github.com/luaposix/luaposix/archive/v34.1.1.tar.gz" - sha256 "7948f4ac8b953172e928753632e37ad97cc3014df74b524fe7839f71216a7e90" - end - - def install - luapath = libexec/"vendor" - ENV["LUA_PATH"] = "?.lua;" \ - "#{luapath}/share/lua/5.3/?.lua;" \ - "#{luapath}/share/lua/5.3/?/init.lua" - ENV["LUA_CPATH"] = "#{luapath}/lib/lua/5.3/?.so" - - resources.each do |r| - r.stage do - system "luarocks", "make", "--tree=#{luapath}" - end - end - - system "./configure", "--with-siteControlPrefix=yes", "--prefix=#{prefix}" - system "make", "install" - end - - def caveats - <<~EOS - To use Lmod, you should add the init script to the shell you are using. - - For example, the bash setup script is here: #{opt_prefix}/init/profile - and you can source it in your bash setup or link to it. - - If you use fish, use #{opt_prefix}/init/fish, such as: - ln -s #{opt_prefix}/init/fish ~/.config/fish/conf.d/00_lmod.fish - EOS - end - - test do - system "#{prefix}/init/sh" - output = shell_output("#{prefix}/libexec/spider #{prefix}/modulefiles/Core/") - assert_match "lmod", output - assert_match "settarg", output - end -end diff --git a/Formula/lnav.rb b/Formula/lnav.rb deleted file mode 100644 index ffb511a784533..0000000000000 --- a/Formula/lnav.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Lnav < Formula - desc "Curses-based tool for viewing and analyzing log files" - homepage "https://lnav.org/" - url "https://github.com/tstack/lnav/releases/download/v0.8.5/lnav-0.8.5.tar.gz" - sha256 "bb809bc8198d8f7395f3de76efdc1a08a5c2c97dc693040faee38802c38945de" - license "BSD-2-Clause" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "ada56b43c4f4301dd5c6a48502a4f801c1871b95c84aad6aeebfb0370ef4bc97" => :catalina - sha256 "2c6e7bd10eb78c6f476739be3e106012d6decce1d8ff1ae1a51c55f3cea2c688" => :mojave - sha256 "bc796136677ca2b4bee92decf2d517ee0a92a6ea2d476b45a350d5aff367c948" => :high_sierra - sha256 "91968b3b06733d667459ca2ffb81e82b91d10e4710c22f72a739e2eed203ba1e" => :sierra - end - - head do - url "https://github.com/tstack/lnav.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "re2c" => :build - end - - depends_on "pcre" - depends_on "readline" - depends_on "sqlite" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-sqlite=#{Formula["sqlite"].opt_prefix}", - "--with-readline=#{Formula["readline"].opt_prefix}" - system "make", "install" - end - - test do - system "#{bin}/lnav", "-V" - end -end diff --git a/Formula/loc.rb b/Formula/loc.rb deleted file mode 100644 index b80d1678b6b6f..0000000000000 --- a/Formula/loc.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Loc < Formula - desc "Count lines of code quickly" - homepage "https://github.com/cgag/loc" - url "https://github.com/cgag/loc/archive/v0.4.1.tar.gz" - sha256 "1e8403fd9a3832007f28fb389593cd6a572f719cd95d85619e7bbcf3dbea18e5" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "2a8ac9341661cefa1221418aa2cb5cdd5207108ade6803ab5af34ca01d0aef13" => :catalina - sha256 "008db46fed420d7ec698d46e059a4913368af4d8f0b2f4f8502a39ee392b830d" => :mojave - sha256 "f4241a70db520e24c587649bf7b8db0f743afaf00b01ebee5934bee7e88ae42e" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - println("Hello World"); - return 0; - } - EOS - system bin/"loc", "test.cpp" - end -end diff --git a/Formula/locateme.rb b/Formula/locateme.rb deleted file mode 100644 index 72eec4dfe79de..0000000000000 --- a/Formula/locateme.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Locateme < Formula - desc "Find your location using Apple's geolocation services" - homepage "https://iharder.sourceforge.io/current/macosx/locateme" - url "https://downloads.sourceforge.net/project/iharder/locateme/LocateMe-v0.2.1.zip" - sha256 "137016e6c1a847bbe756d8ed294b40f1d26c1cb08869940e30282e933e5aeecd" - - bottle do - cellar :any_skip_relocation - sha256 "20c927c90ce8813ed161667367c75f8235705fe9fe4c8e5cc6e0b0505b19c978" => :catalina - sha256 "3ece081d7d799312e2f1afb6cdc210a5915a89e30143412fa30f2d1953701ede" => :mojave - sha256 "e5be4f7b94d001483320c2445739e26deb3007f8fb54185eac4c1cdf941114a3" => :high_sierra - sha256 "cb5fe0b740f04c036726e546481f0eed603873ce57b063e0621ae8f73f66645d" => :sierra - sha256 "5f8e1febc1886565bfa9691cb3ffc0486999f8b682a52276c1d9ea6e0f1f4470" => :el_capitan - sha256 "a7876905a4c06452431e506523c5fdf142e2de364427600122fbb9b4928bc6d1" => :yosemite - end - - def install - system ENV.cc, "-framework", "Foundation", "-framework", "CoreLocation", "LocateMe.m", "-o", "LocateMe" - bin.install "LocateMe" - man1.install "LocateMe.1" - end - - test do - system "#{bin}/LocateMe", "-h" - end -end diff --git a/Formula/lockrun.rb b/Formula/lockrun.rb deleted file mode 100644 index 06bda6fc3a94d..0000000000000 --- a/Formula/lockrun.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Lockrun < Formula - desc "Run cron jobs with overrun protection" - homepage "http://unixwiz.net/tools/lockrun.html" - url "http://unixwiz.net/tools/lockrun.c" - version "1.1.3" - sha256 "cea2e1e64c57cb3bb9728242c2d30afeb528563e4d75b650e8acae319a2ec547" - - bottle do - cellar :any_skip_relocation - sha256 "8873fc021c96ed98f60c72b3a467aaa41f831c4c875e322efbb73343138ea829" => :catalina - sha256 "0bacda6dd0fb9ab16f5a53191506132b338ce85e3367a0d150486a3c406ced5e" => :mojave - sha256 "8e2764324f3709946ee1dc7b9c2135dca1e6c94b265d79fdb3f171809d88dfc4" => :high_sierra - sha256 "5c37b3e9c3f55cfa50379c72fc00259bffa8d3d48688bcaaa44122805ffa4c3a" => :sierra - sha256 "10782346442c28b235f80579c1b0dac3ec784fb151f7bef475757c1bde944b16" => :el_capitan - sha256 "8f2914ed87c42a369b3870b5688720cf0cc7382ae6428452ba32fdf0e422ab57" => :yosemite - sha256 "c319dba85122ea12d120a7ea3acbdc1c50ee35f2eadb274aa5ec59622b026ca0" => :mavericks - end - - def install - system ENV.cc, ENV.cflags, "lockrun.c", "-o", "lockrun" - bin.install "lockrun" - end - - test do - system "#{bin}/lockrun", "--version" - end -end diff --git a/Formula/log4c.rb b/Formula/log4c.rb deleted file mode 100644 index 3daea51d792a3..0000000000000 --- a/Formula/log4c.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Log4c < Formula - desc "Logging Framework for C" - homepage "https://log4c.sourceforge.io/" - url "https://downloads.sourceforge.net/project/log4c/log4c/1.2.4/log4c-1.2.4.tar.gz" - sha256 "5991020192f52cc40fa852fbf6bbf5bd5db5d5d00aa9905c67f6f0eadeed48ea" - license "LGPL-2.1" - head "https://git.code.sf.net/p/log4c/log4c.git" - - bottle do - sha256 "25859511ac3302318ca6eed1eaa89c5a9b1e91b611da4233604e443d9c016dec" => :catalina - sha256 "8e35c261de43e25fe934f9f77875ff9c5fa6bdc4297fd0dd2fc657a5acd680ae" => :mojave - sha256 "4019efd84d56e2390feff696e1fa3305b788fdcb3105c5b6117913e81a16a7f2" => :high_sierra - sha256 "171a6c3f12f957d5442998f0f02df959aa4376ef543338765930ed4e062ef0ea" => :sierra - sha256 "2334e58e3ae201b28362707d2b64701e2e1378695e915baad886956e4edea50a" => :el_capitan - sha256 "d345d0ab182855859fb21148c708893a395ecd416ba3f05d5e2a5a3111f2bc61" => :yosemite - sha256 "676eeaaf8bb2b112ff1e5c1586cc0302e6e5dd0253939b7533dd519095497171" => :mavericks - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "install" - end - - test do - system "#{bin}/log4c-config", "--version" - end -end diff --git a/Formula/log4cplus.rb b/Formula/log4cplus.rb deleted file mode 100644 index 26cd8bd5f4eb6..0000000000000 --- a/Formula/log4cplus.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Log4cplus < Formula - desc "Logging Framework for C++" - homepage "https://sourceforge.net/p/log4cplus/wiki/Home/" - url "https://downloads.sourceforge.net/project/log4cplus/log4cplus-stable/2.0.5/log4cplus-2.0.5.tar.xz" - sha256 "6046f0867ce4734f298418c7b7db0d35c27403090bb751d98e6e76aa4935f1af" - - bottle do - cellar :any - sha256 "1559e20cf8d6a6cbf66545ef391ab2979bbebd2cafdf4b71ab547d8daa472e01" => :catalina - sha256 "1b671e5605cdee4defa7f6e5693ddf1e6d902710e8fecdd541429a8444df5e15" => :mojave - sha256 "aaa4f419cf19b836d767066d505a7b4ca9addaa6392231b8f3dfd5ea2b103517" => :high_sierra - end - - def install - ENV.cxx11 - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - # https://github.com/log4cplus/log4cplus/blob/65e4c3/docs/examples.md - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - - int main() - { - log4cplus::Initializer initializer; - log4cplus::BasicConfigurator config; - config.configure(); - - log4cplus::Logger logger = log4cplus::Logger::getInstance( - LOG4CPLUS_TEXT("main")); - LOG4CPLUS_WARN(logger, LOG4CPLUS_TEXT("Hello, World!")); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", "-I#{include}", "-L#{lib}", - "-llog4cplus", "test.cpp", "-o", "test" - assert_match "Hello, World!", shell_output("./test") - end -end diff --git a/Formula/log4cpp.rb b/Formula/log4cpp.rb deleted file mode 100644 index ca3d7948ed6e9..0000000000000 --- a/Formula/log4cpp.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Log4cpp < Formula - desc "Configurable logging for C++" - homepage "https://log4cpp.sourceforge.io/" - url "https://downloads.sourceforge.net/project/log4cpp/log4cpp-1.1.x%20%28new%29/log4cpp-1.1/log4cpp-1.1.3.tar.gz" - sha256 "2cbbea55a5d6895c9f0116a9a9ce3afb86df383cd05c9d6c1a4238e5e5c8f51d" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "3e08cff5384ae60222e67b63aadfda07534daa4d962b66167c5ffd8c1a55edf7" => :catalina - sha256 "0e0950a9b99a406b035e13c8acae673ce190a436920940d8150abe0c90cf1e84" => :mojave - sha256 "a80304325ab0f551054b169320c6f726f1c8a78d56eb56e7f14793c0f8cc8836" => :high_sierra - sha256 "db55c3b9dff2f2248d96c71672cb6032efc16a4803ce12dd52c278bd14b9abc8" => :sierra - sha256 "dee0bf8b96b1d0de3beb5f2d23cf1e868e6dfd3ec9814e2c4c5eab21432d73e3" => :el_capitan - sha256 "19e858f7cf8e47d1c10be1c379feb9faae36d78274a53a4240dcab813a3e382c" => :yosemite - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/log4cxx.rb b/Formula/log4cxx.rb deleted file mode 100644 index beac6912fab9a..0000000000000 --- a/Formula/log4cxx.rb +++ /dev/null @@ -1,97 +0,0 @@ -class Log4cxx < Formula - desc "Library of C++ classes for flexible logging" - homepage "https://logging.apache.org/log4cxx/index.html" - url "https://www.apache.org/dyn/closer.lua?path=logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz" - mirror "https://archive.apache.org/dist/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz" - sha256 "0de0396220a9566a580166e66b39674cb40efd2176f52ad2c65486c99c920c8c" - revision 1 - - bottle do - cellar :any - sha256 "61d3bf62743bd2e2d6537f0f7d795eab7098d2a3917b526832f2eeebdbbb5171" => :catalina - sha256 "3394ba006562401352b3ba42857f9e8ccd3f84d23e4ce7c22041c0bd82d1cdda" => :mojave - sha256 "0d29b911db2c77048046e048589fcf6739b72f25494145f8d0650d81b67a36f1" => :high_sierra - sha256 "0e1c8e304f87bdb864f14e7b158e2f9e82ab4300a0ea144a8abaf9c8d5bc2976" => :sierra - sha256 "16eb54dca4f5d772a23d55d9599947f93a8c6003df5d6a4ad468b99daeda9153" => :el_capitan - sha256 "b96afe3f4e4b63017d2061028ed8792c4190996b1e008d8c87c3f52dba660ec5" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - depends_on "apr-util" - - # Incorporated upstream, remove on next version update - # https://issues.apache.org/jira/browse/LOGCXX-400 (r1414037) - # https://issues.apache.org/jira/browse/LOGCXX-404 (r1414037) - patch :p0 do - url "https://gist.githubusercontent.com/cawka/b4a79f6b883c46ac1672/raw/be8b4e610a1e21b34aaaf8fb4151362dcfb782ff/LOGCXX-400,LOGCXX-404---r1414037.patch" - sha256 "822c24f4eebd970aa284672eec2f71c6f8e192a85d78edb15a232c15011a52d4" - end - - # https://issues.apache.org/jira/browse/LOGCXX-417 (r1556413) - patch :p0 do - url "https://gist.githubusercontent.com/cawka/b4a79f6b883c46ac1672/raw/4188731bd771a961a91fcfbe561f3999b555b9c3/LOG4CXX-417---r1556413.patch" - sha256 "eca194ec349b4925d0ad53d2b67c18b6a1aa7a979e7bd8729cfd1ed1ef4994c7" - end - - # https://issues.apache.org/jira/browse/LOGCXX-400 (reported) - patch :p1 do - url "https://gist.githubusercontent.com/cawka/b4a79f6b883c46ac1672/raw/f33998566cccf91fb84133e101f5a92a14b31aed/LOGCXX-404---domtestcase.cpp.patch" - sha256 "3eaf321e1df8e8e4a0a507a96646727180e7e721b2c42af22a5d40962d3dbecc" - end - - def install - ENV.O2 # Using -Os causes build failures on Snow Leopard. - - # Fixes build error with clang, old libtool scripts. cf. #12127 - # Reported upstream here: https://issues.apache.org/jira/browse/LOGCXX-396 - # Remove at: unknown, waiting for developer comments. - system "./autogen.sh" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - # Docs won't install on macOS - "--disable-doxygen", - "--with-apr=#{Formula["apr"].opt_bin}", - "--with-apr-util=#{Formula["apr-util"].opt_bin}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - log4cxx::PropertyConfigurator::configure("log4cxx.config"); - - log4cxx::LoggerPtr log = log4cxx::Logger::getLogger("Test"); - log->setLevel(log4cxx::Level::getInfo()); - LOG4CXX_ERROR(log, "Foo"); - - return 1; - } - EOS - (testpath/"log4cxx.config").write <<~EOS - log4j.rootLogger=debug, stdout, R - - log4j.appender.stdout=org.apache.log4j.ConsoleAppender - log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - - # Pattern to output the caller's file name and line number. - log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n - - log4j.appender.R=org.apache.log4j.RollingFileAppender - log4j.appender.R.File=example.log - - log4j.appender.R.MaxFileSize=100KB - # Keep one backup file - log4j.appender.R.MaxBackupIndex=1 - - log4j.appender.R.layout=org.apache.log4j.PatternLayout - log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n - EOS - system ENV.cxx, "test.cpp", "-o", "test", "-L#{lib}", "-llog4cxx" - assert_match /ERROR.*Foo/, shell_output("./test", 1) - end -end diff --git a/Formula/log4shib.rb b/Formula/log4shib.rb deleted file mode 100644 index 7c4761e566ade..0000000000000 --- a/Formula/log4shib.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Log4shib < Formula - desc "Forked version of log4cpp for the Shibboleth project" - homepage "https://wiki.shibboleth.net/confluence/display/OpenSAML/log4shib" - url "https://shibboleth.net/downloads/log4shib/2.0.0/log4shib-2.0.0.tar.gz" - sha256 "d066e2f208bdf3ce28e279307ce7e23ed9c5226f6afde288cd429a0a46792222" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "8bba779ac511127d2893aa7f90e08fea86e49d54a002363edac8396143b53fd2" => :catalina - sha256 "db9aa2c4c1f5f562177d7ab8f772d3634af17ad321866da25da81986c2806941" => :mojave - sha256 "6a84a5b1db0fa9fef6e23f906543bde2496e5400f498c8de6b64cab2b191eeda" => :high_sierra - sha256 "79197ed691693493ffc4b44dd5450b60c9c6cc97919302ae058c9e9af5cd10f6" => :sierra - end - - def install - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" - system "make", "install" - (pkgshare/"test").install %w[tests/log4shib.init tests/testConfig.cpp tests/testConfig.log4shib.properties] - end - - test do - cp_r (pkgshare/"test").children, testpath - system ENV.cxx, "-I#{include}", "-L#{lib}", "-llog4shib", "testConfig.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/logcheck.rb b/Formula/logcheck.rb deleted file mode 100644 index 1b55a6207c02f..0000000000000 --- a/Formula/logcheck.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Logcheck < Formula - desc "Mail anomalies in the system logfiles to the administrator" - homepage "https://packages.debian.org/sid/logcheck" - url "https://deb.debian.org/debian/pool/main/l/logcheck/logcheck_1.3.20.tar.xz" - sha256 "9fb6d02b933470d0b1d1efb54ea186e0d0d27336f9d146be592f65ce60dfb3e6" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "9e354b3fe568c0751443a702251949b5227a5ce09e3bbae4c28664aa1d7f0631" => :catalina - sha256 "111520f51e26088aa012bd42dc772e0a00e41decec22011a2bcf71c2ee3e20cc" => :mojave - sha256 "111520f51e26088aa012bd42dc772e0a00e41decec22011a2bcf71c2ee3e20cc" => :high_sierra - sha256 "12caeda115373b2b964509c07c2101926ab2e67154176078bf72353f3aeab7a3" => :sierra - end - - def install - inreplace "Makefile", "$(DESTDIR)/$(CONFDIR)", "$(CONFDIR)" - system "make", "install", "--always-make", "DESTDIR=#{prefix}", - "SBINDIR=sbin", "BINDIR=bin", "CONFDIR=#{etc}/logcheck" - end - - test do - (testpath/"README").write "Boaty McBoatface" - output = shell_output("#{sbin}/logtail -f #{testpath}/README") - assert_match "Boaty McBoatface", output - end -end diff --git a/Formula/logrotate.rb b/Formula/logrotate.rb deleted file mode 100644 index 7ee756a3d7afa..0000000000000 --- a/Formula/logrotate.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Logrotate < Formula - desc "Rotates, compresses, and mails system logs" - homepage "https://github.com/logrotate/logrotate" - url "https://github.com/logrotate/logrotate/releases/download/3.16.0/logrotate-3.16.0.tar.xz" - sha256 "442f6fdf61c349eeae5f76799878b88fe45a11c8863a38b618bac6988f4a7ce5" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "685db75f3f5c08510db50a7966f2b8d4028709cd02fd586ed21b17e978fd5446" => :catalina - sha256 "f32319879033d83978b6dbd4dc970880e733ae437df2de5954c3ca2a6708c850" => :mojave - sha256 "38b4e975405eb2a32b7a0d1c8904846198364036deaec47393e6475dc340ca7b" => :high_sierra - end - - depends_on "popt" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-compress-command=/usr/bin/gzip", - "--with-uncompress-command=/usr/bin/gunzip", - "--with-state-file-path=#{var}/lib/logrotate.status" - system "make", "install" - - inreplace "examples/logrotate.conf", "/etc/logrotate.d", "#{etc}/logrotate.d" - etc.install "examples/logrotate.conf" => "logrotate.conf" - (etc/"logrotate.d").mkpath - end - - plist_options :manual => "logrotate" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{sbin}/logrotate - #{etc}/logrotate.conf - - RunAtLoad - - StartCalendarInterval - - Hour - 6 - Minute - 25 - - - - EOS - end - - test do - (testpath/"test.log").write("testlograndomstring") - (testpath/"testlogrotate.conf").write <<~EOS - #{testpath}/test.log { - size 1 - copytruncate - } - EOS - system "#{sbin}/logrotate", "-s", "logstatus", "testlogrotate.conf" - assert(File.size?("test.log").nil?, "File is not zero length!") - end -end diff --git a/Formula/logstalgia.rb b/Formula/logstalgia.rb deleted file mode 100644 index b8067e4528068..0000000000000 --- a/Formula/logstalgia.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Logstalgia < Formula - desc "Web server access log visualizer with retro style" - homepage "https://logstalgia.io/" - url "https://github.com/acaudwell/Logstalgia/releases/download/logstalgia-1.1.2/logstalgia-1.1.2.tar.gz" - sha256 "ed3f4081e401f4a509761a7204bdbd7c34f8f1aff9dcb030348885fb3995fca9" - license "GPL-3.0" - - bottle do - sha256 "150fc1973c74bc9b7e7afe25cb59b26af3bcfc04b7f47babec8fcd24af58591a" => :catalina - sha256 "f5f0829a847376d5d5ae691c53de7b850c26d187631b8bfae8d5cecaf69d935b" => :mojave - sha256 "3c70aaf704c6486a0820ad416e9b71be4ee80492fdfec509da494d95657ddc6d" => :high_sierra - sha256 "bf1761008179e17ff019777b60dd498174532e8feb1d7044c78d84bddbec9864" => :sierra - sha256 "98fd439fb47a282ef86a45568f337ff3195418d32459c6e16718d1748e5f23f7" => :el_capitan - end - - head do - url "https://github.com/acaudwell/Logstalgia.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "boost" => :build - depends_on "glm" => :build - depends_on "pkg-config" => :build - depends_on "freetype" - depends_on "glew" - depends_on "libpng" - depends_on "pcre" - depends_on "sdl2" - depends_on "sdl2_image" - - def install - # clang on Mt. Lion will try to build against libstdc++, - # despite -std=gnu++0x - ENV.libcxx - - # For non-/usr/local installs - ENV.append "CXXFLAGS", "-I#{HOMEBREW_PREFIX}/include" - - # Handle building head. - system "autoreconf", "-f", "-i" if build.head? - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-x" - system "make" - system "make", "install" - end - - test do - assert_match "Logstalgia v1.", shell_output("#{bin}/logstalgia --help") - end -end diff --git a/Formula/logstash.rb b/Formula/logstash.rb deleted file mode 100644 index b808847758dba..0000000000000 --- a/Formula/logstash.rb +++ /dev/null @@ -1,105 +0,0 @@ -class Logstash < Formula - desc "Tool for managing events and logs" - homepage "https://www.elastic.co/products/logstash" - url "https://artifacts.elastic.co/downloads/logstash/logstash-oss-7.8.0.tar.gz" - sha256 "48b59d2b20f1b0bd21cbf3aa719ff51541a16166bca0d8298bb762e23a129d42" - head "https://github.com/elastic/logstash.git" - - bottle :unneeded - - depends_on :java => "1.8" - - def install - if build.head? - # Build the package from source - system "rake", "artifact:tar" - # Extract the package to the current directory - mkdir "tar" - system "tar", "--strip-components=1", "-xf", Dir["build/logstash-*.tar.gz"].first, "-C", "tar" - cd "tar" - end - - inreplace "bin/logstash", - %r{^\. "\$\(cd `dirname \$\{SOURCEPATH\}`/\.\.; pwd\)/bin/logstash\.lib\.sh"}, - ". #{libexec}/bin/logstash.lib.sh" - inreplace "bin/logstash-plugin", - %r{^\. "\$\(cd `dirname \$0`/\.\.; pwd\)/bin/logstash\.lib\.sh"}, - ". #{libexec}/bin/logstash.lib.sh" - inreplace "bin/logstash.lib.sh", - /^LOGSTASH_HOME=.*$/, - "LOGSTASH_HOME=#{libexec}" - - libexec.install Dir["*"] - - # Move config files into etc - (etc/"logstash").install Dir[libexec/"config/*"] - (libexec/"config").rmtree - - bin.install libexec/"bin/logstash", libexec/"bin/logstash-plugin" - bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8")) - end - - def post_install - ln_s etc/"logstash", libexec/"config" - end - - def caveats - <<~EOS - Configuration files are located in #{etc}/logstash/ - EOS - end - - plist_options :manual => "logstash" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/logstash - - EnvironmentVariables - - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/logstash.log - StandardOutPath - #{var}/log/logstash.log - - - EOS - end - - test do - assert_includes(stable.url, "-oss-") - # workaround https://github.com/elastic/logstash/issues/6378 - (testpath/"config").mkpath - ["jvm.options", "log4j2.properties", "startup.options"].each do |f| - cp prefix/"libexec/config/#{f}", testpath/"config" - end - (testpath/"config/logstash.yml").write <<~EOS - path.queue: #{testpath}/queue - EOS - (testpath/"data").mkpath - (testpath/"logs").mkpath - (testpath/"queue").mkpath - - data = "--path.data=#{testpath}/data" - logs = "--path.logs=#{testpath}/logs" - settings = "--path.settings=#{testpath}/config" - - output = pipe_output("#{bin}/logstash -e '' #{data} #{logs} #{settings} --log.level=fatal", "hello world\n") - assert_match "hello world", output - end -end diff --git a/Formula/logtalk.rb b/Formula/logtalk.rb deleted file mode 100644 index 5353f60dd79f7..0000000000000 --- a/Formula/logtalk.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Logtalk < Formula - desc "Declarative object-oriented logic programming language" - homepage "https://logtalk.org/" - url "https://github.com/LogtalkDotOrg/logtalk3/archive/lgt3390stable.tar.gz" - version "3.39.0" - sha256 "766890e64e43967bf8c7d8e8bb69369d2992a87d9adee2df90cc715542103d53" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "bfdf6bcc0b104468335d1177d859c0dfe895ec78cb5aa0c6cad920e437021446" => :catalina - sha256 "dced74f97317e6334f8e5be6b482968d790758fd730176155c67bc800f2c15ee" => :mojave - sha256 "419e1e654803bd9beabbf2433e8e7d643b6b7afe02f13da89633a455d15862b6" => :high_sierra - end - - depends_on "gnu-prolog" - - def install - cd("scripts") { system "./install.sh", "-p", prefix } - end -end diff --git a/Formula/lolcat.rb b/Formula/lolcat.rb deleted file mode 100644 index 3981dee14c296..0000000000000 --- a/Formula/lolcat.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Lolcat < Formula - desc "Rainbows and unicorns in your console!" - homepage "https://github.com/busyloop/lolcat" - url "https://github.com/busyloop/lolcat.git", - :tag => "v100.0.1", - :revision => "27441adfb51bc16073d65dbef300c8d3d7e86dc7" - - bottle do - cellar :any_skip_relocation - sha256 "c0e179d579938e4301f04b4896bb2c234f4b643e53e53cbd4a7f796978d2ea6d" => :catalina - sha256 "ac56190c6ec7e25d49f979aff7f6cc3e45820002ef22fbc444196b64de2590f9" => :mojave - sha256 "1eb5cf4cd5565e07659f37e2531be1e72b0e2e8e57587af229e230fa00315ed3" => :high_sierra - end - - depends_on "ruby" if MacOS.version <= :sierra - - def install - ENV["GEM_HOME"] = libexec - system "gem", "build", "lolcat.gemspec" - system "gem", "install", "lolcat-#{version}.gem" - bin.install libexec/"bin/lolcat" - bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) - man6.install "man/lolcat.6" - end - - test do - (testpath/"test.txt").write <<~EOS - This is - a test - EOS - - system bin/"lolcat", "test.txt" - end -end diff --git a/Formula/lolcode.rb b/Formula/lolcode.rb deleted file mode 100644 index fd2f8c8b38a96..0000000000000 --- a/Formula/lolcode.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Lolcode < Formula - desc "Esoteric programming language" - homepage "http://www.lolcode.org/" - # NOTE: 0.10.* releases are stable, 0.11.* is dev. We moved over to - # 0.11.x accidentally, should move back to stable when possible. - url "https://github.com/justinmeza/lci/archive/v0.11.2.tar.gz" - sha256 "cb1065936d3a7463928dcddfc345a8d7d8602678394efc0e54981f9dd98c27d2" - license "GPL-3.0" - head "https://github.com/justinmeza/lolcode.git" - - bottle do - cellar :any_skip_relocation - sha256 "546e86a771457249146ea07ff5669f0e19bd26b3d3e3818ed33925497ae6cfda" => :catalina - sha256 "766522d1d3730e62d1a05e54962b0493db19d62a3cd7ce66328861630508c4ee" => :mojave - sha256 "e6cb7d51d26fe4b54f41a14bf183216bb9ca87a6d0b8db25ebf55e64227ac5aa" => :high_sierra - sha256 "47b268e8334d901868a6498738772b1c776fe34ab249befa702658489e53dff9" => :sierra - sha256 "74920cea828644c7ad0fe3b12ee5c9a4c06a46ec37c2826280327e37e30f5513" => :el_capitan - sha256 "571a57a0fa8b60aac62ce3a358c0b123efcd2af9ec4004c51194c549ad8dd3f1" => :yosemite - sha256 "9159a0b5f907f400f7e233c026579568dd2c6a98d952fde2759f84cb52101508" => :mavericks - end - - depends_on "cmake" => :build - - conflicts_with "lci", :because => "both install `lci` binaries" - - def install - system "cmake", ".", *std_cmake_args - system "make" - # Don't use `make install` for this one file - bin.install "lci" - end - - test do - path = testpath/"test.lol" - path.write <<~EOS - HAI 1.2 - CAN HAS STDIO? - VISIBLE "HAI WORLD" - KTHXBYE - EOS - assert_equal "HAI WORLD\n", shell_output("#{bin}/lci #{path}") - end -end diff --git a/Formula/lorem.rb b/Formula/lorem.rb deleted file mode 100644 index 961692881fd63..0000000000000 --- a/Formula/lorem.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Lorem < Formula - desc "Python generator for the console" - homepage "https://github.com/per9000/lorem" - url "https://github.com/per9000/lorem/archive/v0.8.0.tar.gz" - sha256 "3eec439d616a044e61a6733730b1fc009972466f869dae358991f95abd57e8b3" - license "GPL-3.0" - head "https://github.com/per9000/lorem.git" - - bottle :unneeded - - def install - bin.install "lorem" - end - - test do - assert_equal "lorem ipsum", shell_output("#{bin}/lorem -n 2").strip.downcase - end -end diff --git a/Formula/loudmouth.rb b/Formula/loudmouth.rb deleted file mode 100644 index aa7508bde2b98..0000000000000 --- a/Formula/loudmouth.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Loudmouth < Formula - desc "Lightweight C library for the Jabber protocol" - homepage "https://mcabber.com/" - url "https://mcabber.com/files/loudmouth/loudmouth-1.5.3.tar.bz2" - sha256 "54329415cb1bacb783c20f5f1f975de4fc460165d0d8a1e3b789367b5f69d32c" - license "LGPL-2.1" - revision 2 - - bottle do - cellar :any - sha256 "88dfcc04d5dec8056ce00c91d881a31b01044f5eb4084da599df451b5a700471" => :catalina - sha256 "43052aa18cefe00338ba03fe866badd2b2f17cb6766ae2a1203bdcd54cf2ca6b" => :mojave - sha256 "28635ff511d03492181d4b2c9f4cfe5b65600f512bc4ed8dc02611ff1c4b1b56" => :high_sierra - sha256 "72854a1ff4e2492f0b90d1f435c523ae3801e1ea60d65e033909043081004db0" => :sierra - end - - head do - url "https://github.com/mcabber/loudmouth.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "gnutls" - depends_on "libidn" - - def install - system "./autogen.sh", "-n" if build.head? - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--with-ssl=gnutls" - system "make" - system "make", "check" - system "make", "install" - (pkgshare/"examples").install Dir["examples/*.c"] - end - - test do - cp pkgshare/"examples/lm-send-async.c", testpath - system ENV.cc, "lm-send-async.c", "-o", "test", - "-L#{lib}", "-L#{Formula["glib"].opt_lib}", "-lloudmouth-1", "-lglib-2.0", - "-I#{include}/loudmouth-1.0", - "-I#{Formula["glib"].opt_include}/glib-2.0", - "-I#{Formula["glib"].opt_lib}/glib-2.0/include" - system "./test", "--help" - end -end diff --git a/Formula/lout.rb b/Formula/lout.rb deleted file mode 100644 index e46d8e14b9d57..0000000000000 --- a/Formula/lout.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Lout < Formula - desc "Text formatting like TeX, but simpler" - homepage "https://savannah.nongnu.org/projects/lout" - url "https://download.savannah.gnu.org/releases/lout/lout-3.40.tar.gz" - sha256 "3d16f1ce3373ed96419ba57399c2e4d94f88613c2cb4968cb0331ecac3da68bd" - license "GPL-3.0" - - bottle do - sha256 "67aec968bd2e1957d7b4fe7a2ae201b701ef45dd98c9766ffbc7a0ae3ca1af70" => :catalina - sha256 "2f69e0d4097fbf53f05855b5eeb2def0efcaf08c3a5b2487b1fa041031c2eacc" => :mojave - sha256 "2de1b1b7526f7427b8a57b6239a5a8c199ee05365ead7ed8d722a9e7e3123a0e" => :high_sierra - sha256 "2cfc68ddba21e6f485a4a57df9e810b6996d5364374c66e77b06d41ce230f060" => :sierra - sha256 "2fbc90ffc3f12312dc11e31996ba94da3b8a4ba1c55f33ca60a5d81aef4e137f" => :el_capitan - sha256 "366023d41536d0220a3d226a9f7a5e65b89fcf8ec212bfd6e53f8c2b4110abce" => :yosemite - sha256 "7cbcdcbf720e5e93c7e8d41861fedbcb0f1b46233414c7897e94671e4e42a9fa" => :mavericks - end - - def install - bin.mkpath - man1.mkpath - (doc/"lout").mkpath - system "make", "PREFIX=#{prefix}", "LOUTLIBDIR=#{lib}", "LOUTDOCDIR=#{doc}", "MANDIR=#{man}", "allinstall" - end - - test do - input = "test.lout" - (testpath/input).write <<~EOS - @SysInclude { doc } - @Doc @Text @Begin - @Display @Heading { Blindtext } - The quick brown fox jumps over the lazy dog. - @End @Text - EOS - assert_match /^\s+Blindtext\s+The quick brown fox.*\n+$/, shell_output("#{bin}/lout -p #{input}") - end -end diff --git a/Formula/lpc21isp.rb b/Formula/lpc21isp.rb deleted file mode 100644 index 1b650331b8780..0000000000000 --- a/Formula/lpc21isp.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Lpc21isp < Formula - desc "In-circuit programming (ISP) tool for several NXP microcontrollers" - homepage "https://lpc21isp.sourceforge.io/" - url "https://downloads.sourceforge.net/project/lpc21isp/lpc21isp/1.97/lpc21isp_197.tar.gz" - version "1.97" - sha256 "9f7d80382e4b70bfa4200233466f29f73a36fea7dc604e32f05b9aa69ef591dc" - - bottle do - cellar :any_skip_relocation - sha256 "e5231b41e3d08d835d4c3a457b594c60576c42802347c01555acc94c04067d94" => :catalina - sha256 "bf40168803e67310ecdf47f5ad8f1c8738d6775a91b99b5cda221fdc85e65a51" => :mojave - sha256 "fa1c7462808e18f1b2a180c5db6c0ccd4481b5c0d29c5e834dd1feb888c96dba" => :high_sierra - sha256 "68c3756fd99268814cfdc861e971d1201bac42bf5b922ab37119fcb082c86a1c" => :sierra - sha256 "c12b33d514be2490a3a5bb9d3c1f8468e7e24d13eee0a636a9d067f486af59fc" => :el_capitan - sha256 "10deab3f8de3cb88b27ea38344ba7c641b758faf45f9a247f3fca968f6db456b" => :yosemite - sha256 "5631ccbccd2bb128a1592399a558cbb837d63eb9b1ac2d8187c34fb42064b226" => :mavericks - end - - def install - system "make" - bin.install ["lpc21isp"] - end -end diff --git a/Formula/lrdf.rb b/Formula/lrdf.rb deleted file mode 100644 index dc4a390562a1f..0000000000000 --- a/Formula/lrdf.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Lrdf < Formula - desc "RDF library for accessing plugin metadata in the LADSPA plugin system" - homepage "https://github.com/swh/LRDF" - url "https://github.com/swh/LRDF/archive/v0.6.1.tar.gz" - sha256 "d579417c477ac3635844cd1b94f273ee2529a8c3b6b21f9b09d15f462b89b1ef" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "38b2c487542d1e264b31f560eb582829f178f2aa1abb28ce055475c9dffce9f4" => :catalina - sha256 "1940f0eb408453bc179cc15c2588ad90eedeef608ec830a10881faee75c00d87" => :mojave - sha256 "e15d0f6129cd4ba502860f0ab0367eceadf2a377be9dd25af30c52ebffd064c6" => :high_sierra - sha256 "27f0d95eed42b70eb6685ffe8608465b0f39b88b544dbee080fe3decf81512ed" => :sierra - sha256 "f615e775140216eff74cd0fe751ace5993030c00921574da635a44b41d8bba57" => :el_capitan - sha256 "053602eb98310d03ea0ba7838cd0f746dd34a60759a35fcbae7c41ca08a2919f" => :yosemite - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "raptor" - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - (pkgshare/"examples").install Dir["examples/*"] - Dir["examples/Makefile*"] - end - - test do - cp_r pkgshare/"examples/.", testpath - system ENV.cc, "add_test.c", "-o", "test", "-I#{include}", - "-I#{Formula["raptor"].opt_include}/raptor2", - "-L#{lib}", "-llrdf" - system "./test" - assert_match " \"4\"", File.read("test-out.n3") - end -end diff --git a/Formula/lrzip.rb b/Formula/lrzip.rb deleted file mode 100644 index 4c8cb006fdd28..0000000000000 --- a/Formula/lrzip.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Lrzip < Formula - desc "Compression program with a very high compression ratio" - homepage "http://lrzip.kolivas.org/" - url "http://ck.kolivas.org/apps/lrzip/lrzip-0.631.tar.bz2" - sha256 "0d11e268d0d72310d6d73a8ce6bb3d85e26de3f34d8a713055f3f25a77226455" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "15f270984b1591a12a87dc8698edb9be86df691f8081f204307a6176325a2b96" => :catalina - sha256 "c4fd1cfc9b09ab7f175bd056865c8712f9e6310c918cd03cfdf6e30f283c8761" => :mojave - sha256 "97797937ad456c0658fe24399dc757f30771e971647395fe1fefaa227f615fea" => :high_sierra - sha256 "b0c60e0773da9cf70d3164f362b3b527a7a87acd10b632291055d58ca2da7cfc" => :sierra - sha256 "c0ea3854495bd5d98f040f1a6b5a08e01857436aac25ead3f7a3fb44841f738a" => :el_capitan - sha256 "345d0f65ddc44faab696c5e5bfabf6a6d408435858f49cfd630ee74e61f0c97c" => :yosemite - end - - depends_on "pkg-config" => :build - depends_on "lzo" - - uses_from_macos "bzip2" - uses_from_macos "zlib" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - path = testpath/"data.txt" - original_contents = "." * 1000 - path.write original_contents - - # compress: data.txt -> data.txt.lrz - system bin/"lrzip", "-o", "#{path}.lrz", path - path.unlink - - # decompress: data.txt.lrz -> data.txt - system bin/"lrzip", "-d", "#{path}.lrz" - assert_equal original_contents, path.read - end -end diff --git a/Formula/lrzsz.rb b/Formula/lrzsz.rb deleted file mode 100644 index 61a8807d42882..0000000000000 --- a/Formula/lrzsz.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Lrzsz < Formula - desc "Tools for zmodem/xmodem/ymodem file transfer" - homepage "https://www.ohse.de/uwe/software/lrzsz.html" - url "https://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/lrzsz-0.12.20.tar.gz" - sha256 "c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "e8d2badf80013a07d43d89b2a2e2f99c2feb3abd2b6eeb579a52f01b39a9dd49" => :catalina - sha256 "c828fb5694c30334ccd6dd68da5136e2d6c9d53d2e8ac558ef3ba246a7824ef8" => :mojave - sha256 "c23cc0b0c9a0a7fae5a2e3d69ba01a7e6d09ad5e5a7d06c76620b72773ffebed" => :high_sierra - sha256 "997f5b81f84b7814b0f4f78f056404f6c309eba1e62136e5f8ddf4b34d953b59" => :sierra - sha256 "1d6517842b64582f629f36e469b61ee91563e1ef1a1b1841a8a4634759dcb0f1" => :el_capitan - end - - patch :p0 do - url "https://raw.githubusercontent.com/macports/macports-ports/2319730/comms/lrzsz/files/patch-man-lsz.diff" - sha256 "71783e1d004661c03a1cdf77d0d76a378332272ea47bf29b1eb4c58cbf050a8d" - end - - patch :p0 do - url "https://raw.githubusercontent.com/macports/macports-ports/2319730/comms/lrzsz/files/patch-po-Makefile.in.in.diff" - sha256 "132facaeb102588e16d4ceecca67bc86b5a98b3c0cb6ffec7e7c4549abec574d" - end - - patch :p0 do - url "https://raw.githubusercontent.com/macports/macports-ports/2319730/comms/lrzsz/files/patch-src-Makefile.in.diff" - sha256 "51e5b0b9f0575c1dad18774e4a2c3ddf086c8e81c8fb7407a44584cfc18f73f6" - end - - patch :p0 do - url "https://raw.githubusercontent.com/macports/macports-ports/ed7e89d/comms/lrzsz/files/patch-zglobal.h.diff" - sha256 "16c2097ceb2c5c9a6c4872aa9f903b57b557b428765d0f981579206c68f927b9" - end - - # Patch CVE-2018-10195. - # https://bugzilla.novell.com/show_bug.cgi?id=1090051 - patch :p0 do - url "https://raw.githubusercontent.com/macports/macports-ports/2319730/comms/lrzsz/files/patch-CVE-2018-10195.diff" - sha256 "97f8ac95ebe4068250e18836ab5ad44f067ead90f8389d593d2dd8659a630099" - end - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--disable-nls" - system "make" - - # there's a bug in lrzsz when using custom --prefix - # must install the binaries manually first - bin.install "src/lrz", "src/lsz" - - system "make", "install" - bin.install_symlink "lrz" => "rz", "lsz" => "sz" - end - - test do - assert_match version.to_s, shell_output("#{bin}/lrb --help 2>&1") - end -end diff --git a/Formula/lsd.rb b/Formula/lsd.rb deleted file mode 100644 index e2ad8575585bd..0000000000000 --- a/Formula/lsd.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Lsd < Formula - desc "Clone of ls with colorful output, file type icons, and more" - homepage "https://github.com/Peltoche/lsd" - url "https://github.com/Peltoche/lsd/archive/0.17.0.tar.gz" - sha256 "65b03ae322c4d3ed47f502866b4da2b2c7029b6cb5dc989e98664d564a57de1d" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "7522117f464233363dc65128ba98dd51863e86acab321326c687a0fe8a7e2541" => :catalina - sha256 "a53f4d8e3bbfdbd9382fc17e770a1a050efd020bd92d84fcfe17542df42af785" => :mojave - sha256 "9ee5f02f84c89b1c430339831f7de094dbb38874cb47f6832b23e2b30c2af2d9" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - output = shell_output("#{bin}/lsd -l #{prefix}") - assert_match "README.md", output - end -end diff --git a/Formula/lsdvd.rb b/Formula/lsdvd.rb deleted file mode 100644 index 0d37131595cf2..0000000000000 --- a/Formula/lsdvd.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Lsdvd < Formula - desc "Read the content info of a DVD" - homepage "https://sourceforge.net/projects/lsdvd" - url "https://downloads.sourceforge.net/project/lsdvd/lsdvd/lsdvd-0.17.tar.gz" - sha256 "7d2c5bd964acd266b99a61d9054ea64e01204e8e3e1a107abe41b1274969e488" - revision 3 - - bottle do - cellar :any - sha256 "63e52d4264e765ca6095153de37b08dee02d59676ae98b2f0c36b29c0fdae48e" => :catalina - sha256 "1489bcdd29d86d725cbf76a68ff77335729c676fcf1155555da799d7096ee933" => :mojave - sha256 "d5a945ffb9e6172df4625d0ed5b3e5c6aecd2dfc6c9ab5b2a83d88267027edc8" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libdvdcss" - depends_on "libdvdread" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - test do - system bin/"lsdvd", "--help" - end -end diff --git a/Formula/lsof.rb b/Formula/lsof.rb deleted file mode 100644 index 07205dd24f580..0000000000000 --- a/Formula/lsof.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Lsof < Formula - desc "Utility to list open files" - homepage "https://people.freebsd.org/~abe/" - url "https://github.com/lsof-org/lsof/archive/4.93.2.tar.gz" - sha256 "3df912bd966fc24dc73ddea3e36a61d79270b21b085936a4caabca56e5b486a2" - - bottle do - cellar :any_skip_relocation - sha256 "b50a86c814c6bbc1d1f716cb39b254ad628c55a6850588f907c1792b5dc6fa3f" => :catalina - sha256 "3532e9650fc5b836d5584cd8733f83218229d170859bf2c85e62b4abad08d356" => :mojave - sha256 "8ebe4f68ada3d1c1984bbfb660437984f5fc9d61c93b3da8024bfd0d797a2172" => :high_sierra - sha256 "e07f28fd45b1eae5231393b45360920da4ad4386a83ccb6a256fc7ea26509f59" => :sierra - end - - keg_only :provided_by_macos - - def install - ENV["LSOF_INCLUDE"] = "#{MacOS.sdk_path}/usr/include" - ENV["LSOF_CC"] = ENV.cc - ENV["LSOF_CCV"] = ENV.cxx - - # Source hardcodes full header paths at /usr/include - inreplace %w[ - dialects/darwin/kmem/dlsof.h - dialects/darwin/kmem/machine.h - dialects/darwin/libproc/machine.h - ], "/usr/include", "#{MacOS.sdk_path}/usr/include" - - mv "00README", "README" - system "./Configure", "-n", "darwin" - - system "make" - bin.install "lsof" - man8.install "lsof.8" - prefix.install_metafiles - end - - test do - (testpath/"test").open("w") do - system "#{bin}/lsof", testpath/"test" - end - end -end diff --git a/Formula/lsusb.rb b/Formula/lsusb.rb deleted file mode 100644 index 136c7987e3977..0000000000000 --- a/Formula/lsusb.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Lsusb < Formula - desc "List USB devices, just like the Linux lsusb command" - homepage "https://github.com/jlhonora/lsusb" - url "https://github.com/jlhonora/lsusb/releases/download/1.0/lsusb-1.0.tar.gz" - sha256 "68cfa4a820360ecf3bbd2a24a58f287d41f66c62ada99468c36d5bf33f9a3b94" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "7ab2cb027f186840ea1c96e47b4d48a8dfc42d91847d79bdd3faa6677ef603ca" => :catalina - sha256 "4f2f4f45cb6df2d5262bb823e02f750e7e5b4f117dca8a41fc6956435a277cb9" => :mojave - sha256 "e696db36d09169064b3e97852d07464125e5bc6e400cb2a4cc186e6aa606574a" => :high_sierra - sha256 "e696db36d09169064b3e97852d07464125e5bc6e400cb2a4cc186e6aa606574a" => :sierra - sha256 "e696db36d09169064b3e97852d07464125e5bc6e400cb2a4cc186e6aa606574a" => :el_capitan - end - - def install - bin.install "lsusb" - man8.install "man/lsusb.8" - end - - test do - output = shell_output("#{bin}/lsusb") - assert_match /^Bus [0-9]+ Device [0-9]+:/, output - end -end diff --git a/Formula/lsyncd.rb b/Formula/lsyncd.rb deleted file mode 100644 index cfe9abf6e3a1a..0000000000000 --- a/Formula/lsyncd.rb +++ /dev/null @@ -1,100 +0,0 @@ -class Lsyncd < Formula - desc "Synchronize local directories with remote targets" - homepage "https://github.com/axkibe/lsyncd" - url "https://github.com/axkibe/lsyncd/archive/release-2.2.3.tar.gz" - sha256 "7bcd0f4ae126040bb078c482ff856c87e61c22472c23fa3071798dcb1dc388dd" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 3 - sha256 "0debd8aa085f8cf12d26130566cc529db249898beabace826983703c6f0cce6d" => :catalina - sha256 "227ed2454a78e615514adfe0abf8958c05ebf15e4e276a628ead4b182b111ba0" => :mojave - sha256 "d99630522e8cff9064be87cc4539854c02b75eedf76f866e8d41e59afa6a8423" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "lua" - - xnu_headers = { - "10.7" => ["xnu-1699.22.73.tar.gz", "c9d24560af543e6099b6248bdbcef3581e7ba4af3afd92974719f7c5a8db5bd2"], - "10.7.1" => ["xnu-1699.22.81.tar.gz", "b1422aadf0d3842f3c97e61178adfddb6596e67ba1d877da7f11e2f455fa8dec"], - "10.7.2" => ["xnu-1699.24.8.tar.gz", "4268ce69799db51f1b48e400b6fa6a7041b266a1a5404034398aa51b7084b269"], - "10.7.3" => ["xnu-1699.24.23.tar.gz", "f91a2e8128e220c7ea21ff5c0b61cf76b2afcae83f057d2116837272fd46bead"], - "10.7.4" => ["xnu-1699.26.8.tar.gz", "76f0e6e703218b3b1620b29b7fabb5eb177c990af20711a90085a5a6afc54022"], - "10.7.5" => ["xnu-1699.32.7.tar.gz", "2163816aae990675d8f45cdced4b680bb112fb7a600eb0063af2c2bc2ea15e15"], - "10.8" => ["xnu-2050.7.9.tar.gz", "25c8fc346d1c209f6d20b456dcb256f1e829e844f67b262c090caf088559f4b1"], - "10.8.1" => ["xnu-2050.9.2.tar.gz", "f342179c625413ae3a74fc1a5747fc555c1353cfef6259c595626469744a6405"], - "10.8.2" => ["xnu-2050.18.24.tar.gz", "5d018b33efd9eebb05142958432b9a5058febe04a3b92ba5a16a285490a83445"], - "10.8.3" => ["xnu-2050.22.13.tar.gz", "54011448f0cbb84792146657f4f5f8f64beca52e63bd0eb6028aadedf153a4d6"], - "10.8.4" => ["xnu-2050.24.15.tar.gz", "24e6dc5d98d8f2be450832ea9cfaf2fc85c090422e5b89b24c2a80f0d2957a04"], - "10.8.5" => ["xnu-2050.48.11.tar.gz", "454203188d19a368f850f335a6b4c8fbfc383e929116b2b06e63d8365ccd207e"], - "10.9" => ["xnu-2422.1.72.tar.gz", "fbefe23943d0c4c12b3d7abd3f304224176f269b19ef6ad801314bc69cf773db"], - "10.9.1" => ["xnu-2422.1.72.tar.gz", "fbefe23943d0c4c12b3d7abd3f304224176f269b19ef6ad801314bc69cf773db"], - "10.9.2" => ["xnu-2422.90.20.tar.gz", "7bf3c6bc2f10b99e57b996631a7747b79d1e1684df719196db1e5c98a5585c23"], - "10.9.3" => ["xnu-2422.100.13.tar.gz", "0deb3a323804a18e23261b1f770a7b85b6329213cb77f525d5a2663e8961d87a"], - "10.9.4" => ["xnu-2422.110.17.tar.gz", "0b973913648d5773367f264002f7832bd01510687fa55a28ef1438c86affa141"], - "10.9.5" => ["xnu-2422.115.4.tar.gz", "1a505922bbf232a616a7398e17eff4477fb0621a6c046ff802a2c7b7bf2b5ceb"], - "10.10" => ["xnu-2782.1.97.tar.gz", "18fd93155c53fa66c48c2c876313311bba55cff260ea10e7b67dd7ed1f4b945c"], - "10.10.1" => ["xnu-2782.1.97.tar.gz", "18fd93155c53fa66c48c2c876313311bba55cff260ea10e7b67dd7ed1f4b945c"], - "10.10.2" => ["xnu-2782.10.72.tar.gz", "0725dfc77ce245e37b57d226445217c17d0a7750db099d3ca69a4ad1c7f39356"], - "10.10.3" => ["xnu-2782.20.48.tar.gz", "d1d7cfdf282b6b651415d5adb7f591f3d7ee0e0ccdd29db664c0ec3f9f827146"], - "10.10.4" => ["xnu-2782.30.5.tar.gz", "16fbd88fb5833fdfb6d8169b7c330d344c12b6a644678a1eb68f27c318b8811d"], - "10.10.5" => ["xnu-2782.40.9.tar.gz", "f9f2524124edebe81bb1ead2f69c3daeed1f37641aef68ac4df5bcffd2ab0898"], - "10.11" => ["xnu-3247.1.106.tar.gz", "660f8f107d284fe797675b0a266c63016876aa5bb4add99d88ffb9cd9001d84f"], - "10.11.1" => ["xnu-3247.10.11.tar.gz", "66ff554039e3b8351fdb2103c4dfb6bf8015c6f9a219f70c057b839cb10b1640"], - "10.11.2" => ["xnu-3248.20.55.tar.gz", "10c3acf0da74d6f4684d6a870b425546fc9c9dcb9c39541556f47cba2440a2ab"], - "10.11.3" => ["xnu-3248.30.4.tar.gz", "106a8a3a9e01bd73b06298f81b397fe3d772428e0a650edb24b340315a4d0e84"], - "10.11.4" => ["xnu-3248.40.184.tar.gz", "a9e1b03ae9cde203f83602260ea1994822cb4e38c81b99e74797a124f6cd10ab"], - "10.11.5" => ["xnu-3248.50.21.tar.gz", "e1daa3666c7cdf35d7d320a0b0dae8b7d03ea35c7383ea681371e0543fb5d4b5"], - "10.11.6" => ["xnu-3248.60.10.tar.gz", "295b69cee59f2a7419eab3d95744595fa8cd614716fb6ddc958b61dc088e1f7a"], - "10.12" => ["xnu-3789.1.32.tar.gz", "5bff9606bf32d9ae11d964d8eb280ed9543e4e4fef1cc394d272d7b6ce3f1e55"], - "10.12.1" => ["xnu-3789.21.4.tar.gz", "0e866d90f1b966ccb466ea0c7d4dd8f1e32d40132bbac5c21a857fb6c2522119"], - "10.12.2" => ["xnu-3789.31.2.tar.gz", "768087e43fd16e4ce93862070a91f4b8b47c8d27640b4c35d68bb49a2ca3e4bd"], - "10.12.3" => ["xnu-3789.41.3.tar.gz", "910a8a5d69330d635a5a716ae1d70a2c503c1700fba7612d3ce604feee4eb3dd"], - "10.12.4" => ["xnu-3789.51.2.tar.gz", "126c377a9f0b6364d6eb7618cb8ab863deab045c3d06338632f887e7e99261fa"], - "10.12.5" => ["xnu-3789.60.24.tar.gz", "00e0a95c0ba451863397680e9316dc579cbfacb114264cee417bceecaa256b22"], - "10.12.6" => ["xnu-3789.70.16.tar.gz", "e5b912036a7ceca92e7ada44ef4b264de928bd247a7c02c50604fd8f4f044bea"], - "10.13" => ["xnu-4570.1.46.tar.gz", "18c418c906d08acc7db471d0783269f50aeae73fff0aae0b61c848c4c926c767"], - "10.13.1" => ["xnu-4570.20.62.tar.gz", "4968ae345a83d7aca3a8da65bf09bdc637e2eefbc236f7931c38abb879fe05df"], - "10.13.2" => ["xnu-4570.31.3.tar.gz", "1c364646d001f1a6eee80fa71f746b1142121203eabd808f1eab18317ade576c"], - "10.13.3" => ["xnu-4570.41.2.tar.gz", "e26ea5451126278d22dff7399b956c0fd1fbbdca82d90d4bb105b1ad0731162d"], - "10.13.4" => ["xnu-4570.51.1.tar.gz", "2c392ff711d596ffd8833c794f45f2781d4f66e09b949df974f2fed4871d5642"], - "10.13.5" => ["xnu-4570.61.1.tar.gz", "7655d0864e2b1c45c543ea65deab41cf093dc2cda1c78707d75488849ddd9670"], - "10.13.6" => ["xnu-4570.71.2.tar.gz", "7dc621cbf4345315badae37dfab6bf133265fff43a4daaf47bea1feb00f490cc"], - "10.14" => ["xnu-4903.221.2.tar.gz", "c7a4f66bacfd4432b217ef4883798499fd223e1b717f7c5814fccc3a4ae7f4eb"], - "10.14.1" => ["xnu-4903.221.2.tar.gz", "c7a4f66bacfd4432b217ef4883798499fd223e1b717f7c5814fccc3a4ae7f4eb"], - "10.14.2" => ["xnu-4903.231.4.tar.gz", "4aeb745dd26aecc82e44d293fc125099d93e50fe1248bd9178df272e9503be0a"], - "10.14.3" => ["xnu-4903.241.1.tar.gz", "6de5253718f93401dc752eb69d08b6253c7abcd9a60349f7e0617776eeda1924"], - "10.14.4" => ["xnu-4903.241.1.tar.gz", "6de5253718f93401dc752eb69d08b6253c7abcd9a60349f7e0617776eeda1924"], - "10.14.5" => ["xnu-4903.241.1.tar.gz", "6de5253718f93401dc752eb69d08b6253c7abcd9a60349f7e0617776eeda1924"], - "10.14.6" => ["xnu-4903.270.47.tar.gz", "126856fa7a1aaa5f5480034855bd58d4c7f60693397b8279aaac2c83a502a552"], - "10.15" => ["xnu-6153.11.26.tar.gz", "ec75b9ec8aaed5619cc81836f09fac9aa2c26d5ffda8444d4ae0edbb10bac574"], - "10.15.1" => ["xnu-6153.41.3.tar.gz", "a1a8c57cf26a987760be3fe982a16d32714cc8eb49435704ef16f6160d549762"], - "10.15.2" => ["xnu-6153.41.3.tar.gz", "a1a8c57cf26a987760be3fe982a16d32714cc8eb49435704ef16f6160d549762"], - "10.15.3" => ["xnu-6153.41.3.tar.gz", "a1a8c57cf26a987760be3fe982a16d32714cc8eb49435704ef16f6160d549762"], - "10.15.4" => ["xnu-6153.41.3.tar.gz", "a1a8c57cf26a987760be3fe982a16d32714cc8eb49435704ef16f6160d549762"], - } - - tarball, checksum = if xnu_headers.key? MacOS.full_version - xnu_headers.fetch(MacOS.full_version) - else - xnu_headers.values.last # Fallback - end - resource "xnu" do - url "https://opensource.apple.com/tarballs/xnu/#{tarball}" - sha256 checksum - end - - def install - inreplace "CMakeLists.txt", "DESTINATION man", "DESTINATION share/man/man1" - resource("xnu").stage buildpath/"xnu" - system "cmake", ".", "-DWITH_INOTIFY=OFF", "-DWITH_FSEVENTS=ON", - "-DXNU_DIR=#{buildpath}/xnu", *std_cmake_args - system "make", "install" - end - - test do - system bin/"lsyncd", "--version" - end -end diff --git a/Formula/ltc-tools.rb b/Formula/ltc-tools.rb deleted file mode 100644 index 52a51974d45ea..0000000000000 --- a/Formula/ltc-tools.rb +++ /dev/null @@ -1,31 +0,0 @@ -class LtcTools < Formula - desc "Tools to deal with linear-timecode (LTC)" - homepage "https://github.com/x42/ltc-tools" - url "https://github.com/x42/ltc-tools/archive/v0.7.0.tar.gz" - sha256 "5b7a2ab7f98bef6c99bafbbc5605a3364e01c9c19fe81411ddea0e1a01cd6287" - license "GPL-2.0" - head "https://github.com/x42/ltc-tools.git" - - bottle do - cellar :any - sha256 "bcd064f64a21f101f6599646306ba65c40ce7ec44fd7b6e2d8f29b4fefeebcc9" => :catalina - sha256 "ae65212fa593ee7015eb7bfa63b4e7e7691e56a7db0fc1a82a311aef184aae55" => :mojave - sha256 "15da8efd84adb9d9eb9c7b4450c75e326679b20bed258c8e7011fc6eb2cc9b20" => :high_sierra - sha256 "51df0ba95565d43955bbdf0cfbc216696b4002f8cc95c80d8f6b387eece034d1" => :sierra - end - - depends_on "help2man" => :build - depends_on "pkg-config" => :build - depends_on "jack" - depends_on "libltc" - depends_on "libsndfile" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system bin/"ltcgen", "test.wav" - system bin/"ltcdump", "test.wav" - end -end diff --git a/Formula/ltl2ba.rb b/Formula/ltl2ba.rb deleted file mode 100644 index 70074a2d66520..0000000000000 --- a/Formula/ltl2ba.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Ltl2ba < Formula - desc "Translate LTL formulae to Buchi automata" - homepage "https://www.lsv.ens-cachan.fr/~gastin/ltl2ba/" - url "https://www.lsv.fr/~gastin/ltl2ba/ltl2ba-1.3.tar.gz" - sha256 "912877cb2929cddeadfd545a467135a2c61c507bbd5ae0edb695f8b5af7ce9af" - - bottle do - cellar :any_skip_relocation - sha256 "ede3b5e5b22b886bce4f6f2ead352dc4a676e3d8a95f9543930f2be2b3a0b4b4" => :catalina - sha256 "3e5ddce23730195799dfe85c97a57d63e892f168cda5207c72c68b459e5a92a0" => :mojave - sha256 "533a278e70570b8f83550c784ccb7c921d9fb5b93ac613c3f971703090dd7921" => :high_sierra - end - - def install - system "make" - bin.install "ltl2ba" - end - - test do - assert_match ":: (p) -> goto accept_all", shell_output("#{bin}/ltl2ba -f 'p if p ∈ w(0)'") - end -end diff --git a/Formula/lua.rb b/Formula/lua.rb deleted file mode 100644 index 3746406224aab..0000000000000 --- a/Formula/lua.rb +++ /dev/null @@ -1,147 +0,0 @@ -class Lua < Formula - desc "Powerful, lightweight programming language" - homepage "https://www.lua.org/" - url "https://www.lua.org/ftp/lua-5.3.5.tar.gz" - sha256 "0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac" - revision 1 - - bottle do - cellar :any - sha256 "56169dfd607a4e873d7b5ad619a179375b8b69007cfb527316865dbdcfe7f493" => :catalina - sha256 "f045a6bc17caa285b9201e2e34c69903cf45ddb4190a5012143eb9f2cb789434" => :mojave - sha256 "fcf36c0a4785ed9f515a1a18d8e158ad806c8ff92a5359959fbfa1b84bc52454" => :high_sierra - sha256 "17947facfc289e35fc19a1c4091f4d26387bdc254150df75e0aa95d881e58135" => :sierra - sha256 "b6e9699312e768aaa800d06e1f1e445f1bed64c8eb614083915c60e0a2e3d746" => :el_capitan - end - - # Be sure to build a dylib, or else runtime modules will pull in another static copy of liblua = crashy - # See: https://github.com/Homebrew/legacy-homebrew/pull/5043 - # ***Update me with each version bump!*** - patch :DATA - - def install - # Subtitute formula prefix in `src/Makefile` for install name (dylib ID). - # Use our CC/CFLAGS to compile. - inreplace "src/Makefile" do |s| - s.gsub! "@LUA_PREFIX@", prefix - s.remove_make_var! "CC" - s.change_make_var! "CFLAGS", "#{ENV.cflags} -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)" - s.change_make_var! "MYLDFLAGS", ENV.ldflags - end - - # Fix path in the config header - inreplace "src/luaconf.h", "/usr/local", HOMEBREW_PREFIX - - # We ship our own pkg-config file as Lua no longer provide them upstream. - system "make", "macosx", "INSTALL_TOP=#{prefix}", "INSTALL_INC=#{include}/lua", "INSTALL_MAN=#{man1}" - system "make", "install", "INSTALL_TOP=#{prefix}", "INSTALL_INC=#{include}/lua", "INSTALL_MAN=#{man1}" - (lib/"pkgconfig/lua.pc").write pc_file - - # Fix some software potentially hunting for different pc names. - bin.install_symlink "lua" => "lua5.3" - bin.install_symlink "lua" => "lua-5.3" - bin.install_symlink "luac" => "luac5.3" - bin.install_symlink "luac" => "luac-5.3" - (include/"lua5.3").install_symlink Dir[include/"lua/*"] - lib.install_symlink "liblua.5.3.dylib" => "liblua5.3.dylib" - (lib/"pkgconfig").install_symlink "lua.pc" => "lua5.3.pc" - (lib/"pkgconfig").install_symlink "lua.pc" => "lua-5.3.pc" - end - - def pc_file - <<~EOS - V= 5.3 - R= #{version} - prefix=#{HOMEBREW_PREFIX} - INSTALL_BIN= ${prefix}/bin - INSTALL_INC= ${prefix}/include/lua - INSTALL_LIB= ${prefix}/lib - INSTALL_MAN= ${prefix}/share/man/man1 - INSTALL_LMOD= ${prefix}/share/lua/${V} - INSTALL_CMOD= ${prefix}/lib/lua/${V} - exec_prefix=${prefix} - libdir=${exec_prefix}/lib - includedir=${prefix}/include/lua - - Name: Lua - Description: An Extensible Extension Language - Version: #{version} - Requires: - Libs: -L${libdir} -llua -lm - Cflags: -I${includedir} - EOS - end - - def caveats - <<~EOS - You may also want luarocks: - brew install luarocks - EOS - end - - test do - system "#{bin}/lua", "-e", "print ('Ducks are cool')" - end -end - -__END__ -diff --git a/Makefile b/Makefile -index 7fa91c8..a825198 100644 ---- a/Makefile -+++ b/Makefile -@@ -41,7 +41,7 @@ PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris - # 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.5.3.5.dylib - TO_MAN= lua.1 luac.1 - - # Lua version and release. -@@ -63,6 +63,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) -+ ln -s -f liblua.5.3.5.dylib $(INSTALL_LIB)/liblua.5.3.dylib -+ ln -s -f liblua.5.3.dylib $(INSTALL_LIB)/liblua.dylib - - uninstall: - cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) -diff --git a/src/Makefile b/src/Makefile -index 2e7a412..d0c4898 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -28,7 +28,7 @@ MYOBJS= - - PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris - --LUA_A= liblua.a -+LUA_A= liblua.5.3.5.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 -@@ -56,11 +56,12 @@ o: $(ALL_O) - a: $(ALL_A) - - $(LUA_A): $(BASE_O) -- $(AR) $@ $(BASE_O) -- $(RANLIB) $@ -+ $(CC) -dynamiclib -install_name @LUA_PREFIX@/lib/liblua.5.3.dylib \ -+ -compatibility_version 5.3 -current_version 5.3.5 \ -+ -o liblua.5.3.5.dylib $^ - - $(LUA_T): $(LUA_O) $(LUA_A) -- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) -+ $(CC) -fno-common $(MYLDFLAGS) -o $@ $(LUA_O) $(LUA_A) -L. -llua.5.3.5 $(LIBS) - - $(LUAC_T): $(LUAC_O) $(LUA_A) - $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) -@@ -110,7 +111,7 @@ linux: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" - - macosx: -- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" -+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -fno-common" SYSLIBS="-lreadline" - - mingw: - $(MAKE) "LUA_A=lua53.dll" "LUA_T=lua.exe" \ diff --git a/Formula/lua@5.1.rb b/Formula/lua@5.1.rb deleted file mode 100644 index 9c01990007347..0000000000000 --- a/Formula/lua@5.1.rb +++ /dev/null @@ -1,138 +0,0 @@ -class LuaAT51 < Formula - # 5.3 is not fully backwards compatible so we must retain 2 Luas for now. - desc "Powerful, lightweight programming language (v5.1.5)" - homepage "https://www.lua.org/" - url "https://www.lua.org/ftp/lua-5.1.5.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/l/lua5.1/lua5.1_5.1.5.orig.tar.gz" - sha256 "2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333" - revision 8 - - bottle do - cellar :any - sha256 "bbc328f48c0cf137907ccabe206f75cc7ade66cf76cafe82ced3a5f885c73da8" => :catalina - sha256 "4578b515c3e1a255f766d7fa542e632007ac2de8282e207b92192d0bb9bafd11" => :mojave - sha256 "d374b94b3e4b9af93cb5c04086f4a9836c06953b4b1941c68a92986ba57356b1" => :high_sierra - sha256 "67ce3661b56fe8dd0daf6f94b7da31a9516b00ae85d9bbe9eabd7ed2e1dbb324" => :sierra - sha256 "e43d1c75fe4462c5dca2d95ebee9b0e4897c872f03c4331d5898a06a408cbcb3" => :el_capitan - end - - # Be sure to build a dylib, or else runtime modules will pull in another static copy of liblua = crashy - # See: https://github.com/Homebrew/homebrew/pull/5043 - patch :DATA - - def install - # Use our CC/CFLAGS to compile. - inreplace "src/Makefile" do |s| - s.gsub! "@LUA_PREFIX@", prefix - s.remove_make_var! "CC" - s.change_make_var! "CFLAGS", "#{ENV.cflags} $(MYCFLAGS)" - s.change_make_var! "MYLDFLAGS", ENV.ldflags - s.sub! "MYCFLAGS_VAL", "-fno-common -DLUA_USE_LINUX" - end - - # Fix path in the config header - inreplace "src/luaconf.h", "/usr/local", HOMEBREW_PREFIX - - # Fix paths in the .pc - inreplace "etc/lua.pc" do |s| - s.gsub! "prefix= /usr/local", "prefix=#{HOMEBREW_PREFIX}" - s.gsub! "INSTALL_MAN= ${prefix}/man/man1", "INSTALL_MAN= ${prefix}/share/man/man1" - s.gsub! "INSTALL_INC= ${prefix}/include", "INSTALL_INC= ${prefix}/include/lua-5.1" - s.gsub! "includedir=${prefix}/include", "includedir=${prefix}/include/lua-5.1" - s.gsub! "Libs: -L${libdir} -llua -lm", "Libs: -L${libdir} -llua.5.1 -lm" - end - - system "make", "macosx", "INSTALL_TOP=#{prefix}", "INSTALL_MAN=#{man1}", "INSTALL_INC=#{include}/lua-5.1" - system "make", "install", "INSTALL_TOP=#{prefix}", "INSTALL_MAN=#{man1}", "INSTALL_INC=#{include}/lua-5.1" - - (lib/"pkgconfig").install "etc/lua.pc" - - # Renaming from Lua to Lua51. - # Note that the naming must be both lua-version & lua.version. - # Software can't find the libraries without supporting both the - # hyphen and full stop. - mv bin/"lua", bin/"lua-5.1" - mv bin/"luac", bin/"luac-5.1" - mv man1/"lua.1", man1/"lua-5.1.1" - mv man1/"luac.1", man1/"luac-5.1.1" - mv lib/"pkgconfig/lua.pc", lib/"pkgconfig/lua-5.1.pc" - bin.install_symlink "lua-5.1" => "lua5.1" - bin.install_symlink "luac-5.1" => "luac5.1" - include.install_symlink "lua-5.1" => "lua5.1" - (lib/"pkgconfig").install_symlink "lua-5.1.pc" => "lua5.1.pc" - (libexec/"lib/pkgconfig").install_symlink lib/"pkgconfig/lua-5.1.pc" => "lua.pc" - end - - def caveats - <<~EOS - You may also want luarocks: - brew install luarocks - EOS - end - - test do - system "#{bin}/lua5.1", "-e", "print ('Ducks are cool')" - end -end - -__END__ -diff --git a/Makefile b/Makefile -index 209a132..9387b09 100644 ---- a/Makefile -+++ b/Makefile -@@ -43,7 +43,7 @@ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris - # What to install. - TO_BIN= lua luac - TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp --TO_LIB= liblua.a -+TO_LIB= liblua.5.1.5.dylib - TO_MAN= lua.1 luac.1 - - # Lua version and release. -@@ -64,6 +64,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) -+ ln -s -f liblua.5.1.5.dylib $(INSTALL_LIB)/liblua.5.1.dylib -+ ln -s -f liblua.5.1.dylib $(INSTALL_LIB)/liblua5.1.dylib - - ranlib: - cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB) -diff --git a/src/Makefile b/src/Makefile -index e0d4c9f..4477d7b 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -22,7 +22,7 @@ MYLIBS= - - PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris - --LUA_A= liblua.a -+LUA_A= liblua.5.1.5.dylib - CORE_O= lapi.o lcode.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 -@@ -48,11 +48,13 @@ o: $(ALL_O) - a: $(ALL_A) - - $(LUA_A): $(CORE_O) $(LIB_O) -- $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files -- $(RANLIB) $@ -+ $(CC) -dynamiclib -install_name @LUA_PREFIX@/lib/liblua.5.1.dylib \ -+ -compatibility_version 5.1 -current_version 5.1.5 \ -+ -o liblua.5.1.5.dylib $^ - - $(LUA_T): $(LUA_O) $(LUA_A) -- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) -+ $(CC) -fno-common $(MYLDFLAGS) \ -+ -o $@ $(LUA_O) $(LUA_A) -L. -llua.5.1.5 $(LIBS) - - $(LUAC_T): $(LUAC_O) $(LUA_A) - $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) -@@ -99,7 +101,7 @@ linux: - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" - - macosx: -- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline" -+ $(MAKE) all MYCFLAGS="MYCFLAGS_VAL" MYLIBS="-lreadline" - # use this on Mac OS X 10.3- - # $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX diff --git a/Formula/luabind.rb b/Formula/luabind.rb deleted file mode 100644 index 37154a5fee89e..0000000000000 --- a/Formula/luabind.rb +++ /dev/null @@ -1,104 +0,0 @@ -class Luabind < Formula - desc "Library for bindings between C++ and Lua" - homepage "https://github.com/luabind/luabind" - url "https://downloads.sourceforge.net/project/luabind/luabind/0.9.1/luabind-0.9.1.tar.gz" - sha256 "80de5e04918678dd8e6dac3b22a34b3247f74bf744c719bae21faaa49649aaae" - revision 2 - - bottle do - cellar :any - sha256 "aa095d38915e09287c86d11d65871b5a4e6604799a961f0e055c9bf526ba403b" => :mojave - sha256 "736bb4cb6a49338eecab9a179f3104e8328d7133366b921b2fece14b6fd2aa26" => :high_sierra - sha256 "39e74593d47fd648230e177e9a8a90e1b3a888c84d6c7d38f358265d5b93ce94" => :sierra - sha256 "914a79679264790d9ffb0726a1f303954d816da3dd23db3b8816873cf467677f" => :el_capitan - sha256 "171123f48a6cf2431d6b143b84bf31dbb955f103195aa30597a61b7a61943982" => :yosemite - end - - depends_on "boost-build" => :build - depends_on "boost" - depends_on "lua@5.1" - - # boost 1.57 compatibility - # https://github.com/Homebrew/homebrew/pull/33890#issuecomment-67723688 - # https://github.com/luabind/luabind/issues/27 - patch do - url "https://gist.githubusercontent.com/tdsmith/e6d9d3559ec1d9284c0b/raw/4ac01936561ef9d7541cf8e78a230bebef1a8e10/luabind.diff" - sha256 "f22a283752994e821922316a5ef3cbb16f7bbe15fc64d97c02325ed4aaa53985" - end - - # patch Jamroot to perform lookup for shared objects with .dylib suffix - patch do - url "https://gist.githubusercontent.com/DennisOSRM/3728987/raw/052251fcdc23602770f6c543be9b3e12f0cac50a/Jamroot.diff" - sha256 "bc06d76069d08af4dc55a102f963931a0247173a36ad0ae43e11d82b23f8d2b3" - end - - # apply upstream commit to enable building with clang - patch do - url "https://github.com/luabind/luabind/commit/3044a9053ac50977684a75c4af42b2bddb853fad.diff?full_index=1" - sha256 "d04cbe7e5ed732943b1caf547321ac81b1db49271a5956a5f218905016c8900e" - end - - # include C header that is not pulled in automatically on OS X 10.9 anymore - # submitted https://github.com/luabind/luabind/pull/20 - patch do - url "https://gist.githubusercontent.com/DennisOSRM/a246514bf7d01631dda8/raw/0e83503dbf862ebfb6ac063338a6d7bca793f94d/object_rep.diff" - sha256 "2fef524ac5e319d7092fbb28f6d4e3d3eccd6a570e7789a9b5b0c9a25e714523" - end - - def install - ENV["LUA_PATH"] = Formula["lua@5.1"].opt_prefix - - args = %w[release install] - if ENV.compiler == :clang - args << "--toolset=clang" - elsif ENV.compiler == :gcc - args << "--toolset=darwin" - end - args << "--prefix=#{prefix}" - system "bjam", *args - - (lib/"pkgconfig/luabind.pc").write pc_file - end - - def pc_file - <<~EOS - prefix=#{HOMEBREW_PREFIX} - exec_prefix=${prefix} - libdir=${exec_prefix}/lib - includedir=${exec_prefix}/include - - Name: luabind - Description: Library for bindings between C++ and Lua - Version: 0.9.1 - Libs: -L${libdir} -lluabind - Cflags: -I${includedir} - EOS - end - - test do - (testpath/"hello.cpp").write <<~EOS - extern "C" { - #include - } - #include - #include - void greet() { std::cout << "hello world!\\n"; } - extern "C" int init(lua_State* L) - { - using namespace luabind; - open(L); - module(L) - [ - def("greet", &greet) - ]; - return 0; - } - EOS - system ENV.cxx, "-shared", "hello.cpp", "-o", "hello.dylib", - "-I#{Formula["lua@5.1"].include}/lua-5.1", - "-L#{lib}", "-lluabind", - "-L#{Formula["lua@5.1"].lib}", "-llua5.1" - output = `lua5.1 -e "package.loadlib('#{testpath}/hello.dylib', 'init')(); greet()"` - assert_match "hello world!", output - end -end diff --git a/Formula/luajit.rb b/Formula/luajit.rb deleted file mode 100644 index a652f0af72330..0000000000000 --- a/Formula/luajit.rb +++ /dev/null @@ -1,491 +0,0 @@ -class Luajit < Formula - desc "Just-In-Time Compiler (JIT) for the Lua programming language" - homepage "https://luajit.org/luajit.html" - head "https://luajit.org/git/luajit-2.0.git", :branch => "v2.1" - - stable do - url "https://luajit.org/download/LuaJIT-2.0.5.tar.gz" - sha256 "874b1f8297c697821f561f9b73b57ffd419ed8f4278c82e05b48806d30c1e979" - - # Fix for macOS 10.15 Catalina SDK - # https://github.com/LuaJIT/LuaJIT/issues/521 - patch :DATA - end - - bottle do - cellar :any - rebuild 3 - sha256 "907d7fbbd3be370fac28341bf902a551c1d07dd929b9379bb19e30ccaf0bdef6" => :catalina - sha256 "a127723ca4997acaa45e3b548eeb43f06ada464f2f59d518c4d68a89d9cfe6cf" => :mojave - sha256 "afd383c796b7d3d7826a6a72acea41ecf57cf183ae84d590a777fb6a71166e80" => :high_sierra - end - - def install - # 1 - Override the hardcoded gcc. - # 2 - Remove the "-march=i686" so we can set the march in cflags. - # Both changes should persist and were discussed upstream. - inreplace "src/Makefile" do |f| - f.change_make_var! "CC", ENV.cc - f.change_make_var! "CCOPT_x86", "" - end - - # Xcode 11 fix - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - # 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 - - ENV.O2 # Respect the developer's choice. - - args = %W[PREFIX=#{prefix}] - - # Build with 64-bit support - args << "XCFLAGS=-DLUAJIT_ENABLE_GC64" if build.head? - - system "make", "amalg", *args - system "make", "install", *args - - # LuaJIT doesn't automatically symlink unversioned libraries: - # https://github.com/Homebrew/homebrew/issues/45854. - lib.install_symlink lib/"libluajit-5.1.dylib" => "libluajit.dylib" - lib.install_symlink lib/"libluajit-5.1.a" => "libluajit.a" - - # Fix path in pkg-config so modules are installed - # to permanent location rather than inside the Cellar. - inreplace lib/"pkgconfig/luajit.pc" do |s| - s.gsub! "INSTALL_LMOD=${prefix}/share/lua/${abiver}", - "INSTALL_LMOD=#{HOMEBREW_PREFIX}/share/lua/${abiver}" - s.gsub! "INSTALL_CMOD=${prefix}/${multilib}/lua/${abiver}", - "INSTALL_CMOD=#{HOMEBREW_PREFIX}/${multilib}/lua/${abiver}" - unless build.head? - s.gsub! "Libs:", - "Libs: -pagezero_size 10000 -image_base 100000000" - end - end - - # Having an empty Lua dir in lib/share can mess with other Homebrew Luas. - %W[#{lib}/lua #{share}/lua].each { |d| rm_rf d } - end - - test do - system "#{bin}/luajit", "-e", <<~EOS - local ffi = require("ffi") - ffi.cdef("int printf(const char *fmt, ...);") - ffi.C.printf("Hello %s!\\n", "#{ENV["USER"]}") - EOS - end -end - -__END__ ---- a/src/lj_alloc.c -+++ b/src/lj_alloc.c -@@ -72,13 +72,56 @@ - - #define IS_DIRECT_BIT (SIZE_T_ONE) - -+ -+/* Determine system-specific block allocation method. */ - #if LJ_TARGET_WINDOWS - - #define WIN32_LEAN_AND_MEAN - #include - -+#define LJ_ALLOC_VIRTUALALLOC 1 -+ -+#if LJ_64 && !LJ_GC64 -+#define LJ_ALLOC_NTAVM 1 -+#endif -+ -+#else -+ -+#include -+/* If this include fails, then rebuild with: -DLUAJIT_USE_SYSMALLOC */ -+#include -+ -+#define LJ_ALLOC_MMAP 1 -+ - #if LJ_64 - -+#define LJ_ALLOC_MMAP_PROBE 1 -+ -+#if LJ_GC64 -+#define LJ_ALLOC_MBITS 47 /* 128 TB in LJ_GC64 mode. */ -+#elif LJ_TARGET_X64 && LJ_HASJIT -+/* Due to limitations in the x64 compiler backend. */ -+#define LJ_ALLOC_MBITS 31 /* 2 GB on x64 with !LJ_GC64. */ -+#else -+#define LJ_ALLOC_MBITS 32 /* 4 GB on other archs with !LJ_GC64. */ -+#endif -+ -+#endif -+ -+#if LJ_64 && !LJ_GC64 && defined(MAP_32BIT) -+#define LJ_ALLOC_MMAP32 1 -+#endif -+ -+#if LJ_TARGET_LINUX -+#define LJ_ALLOC_MREMAP 1 -+#endif -+ -+#endif -+ -+ -+#if LJ_ALLOC_VIRTUALALLOC -+ -+#if LJ_ALLOC_NTAVM - /* Undocumented, but hey, that's what we all love so much about Windows. */ - typedef long (*PNTAVM)(HANDLE handle, void **addr, ULONG zbits, - size_t *size, ULONG alloctype, ULONG prot); -@@ -89,14 +132,15 @@ - */ - #define NTAVM_ZEROBITS 1 - --static void INIT_MMAP(void) -+static void init_mmap(void) - { - ntavm = (PNTAVM)GetProcAddress(GetModuleHandleA("ntdll.dll"), - "NtAllocateVirtualMemory"); - } -+#define INIT_MMAP() init_mmap() - - /* Win64 32 bit MMAP via NtAllocateVirtualMemory. */ --static LJ_AINLINE void *CALL_MMAP(size_t size) -+static void *CALL_MMAP(size_t size) - { - DWORD olderr = GetLastError(); - void *ptr = NULL; -@@ -107,7 +151,7 @@ - } - - /* For direct MMAP, use MEM_TOP_DOWN to minimize interference */ --static LJ_AINLINE void *DIRECT_MMAP(size_t size) -+static void *DIRECT_MMAP(size_t size) - { - DWORD olderr = GetLastError(); - void *ptr = NULL; -@@ -119,23 +163,21 @@ - - #else - --#define INIT_MMAP() ((void)0) -- - /* Win32 MMAP via VirtualAlloc */ --static LJ_AINLINE void *CALL_MMAP(size_t size) -+static void *CALL_MMAP(size_t size) - { - DWORD olderr = GetLastError(); -- void *ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); -+ void *ptr = LJ_WIN_VALLOC(0, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); - SetLastError(olderr); - return ptr ? ptr : MFAIL; - } - - /* For direct MMAP, use MEM_TOP_DOWN to minimize interference */ --static LJ_AINLINE void *DIRECT_MMAP(size_t size) -+static void *DIRECT_MMAP(size_t size) - { - DWORD olderr = GetLastError(); -- void *ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN, -- PAGE_READWRITE); -+ void *ptr = LJ_WIN_VALLOC(0, size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN, -+ PAGE_READWRITE); - SetLastError(olderr); - return ptr ? ptr : MFAIL; - } -@@ -143,7 +185,7 @@ - #endif - - /* This function supports releasing coalesed segments */ --static LJ_AINLINE int CALL_MUNMAP(void *ptr, size_t size) -+static int CALL_MUNMAP(void *ptr, size_t size) - { - DWORD olderr = GetLastError(); - MEMORY_BASIC_INFORMATION minfo; -@@ -163,10 +205,7 @@ - return 0; - } - --#else -- --#include --#include -+#elif LJ_ALLOC_MMAP - - #define MMAP_PROT (PROT_READ|PROT_WRITE) - #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) -@@ -174,105 +213,152 @@ - #endif - #define MMAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS) - --#if LJ_64 --/* 64 bit mode needs special support for allocating memory in the lower 2GB. */ -- --#if defined(MAP_32BIT) -- --#if defined(__sun__) --#define MMAP_REGION_START ((uintptr_t)0x1000) -+#if LJ_ALLOC_MMAP_PROBE -+ -+#ifdef MAP_TRYFIXED -+#define MMAP_FLAGS_PROBE (MMAP_FLAGS|MAP_TRYFIXED) - #else --/* Actually this only gives us max. 1GB in current Linux kernels. */ --#define MMAP_REGION_START ((uintptr_t)0) --#endif -- --static LJ_AINLINE void *CALL_MMAP(size_t size) --{ -+#define MMAP_FLAGS_PROBE MMAP_FLAGS -+#endif -+ -+#define LJ_ALLOC_MMAP_PROBE_MAX 30 -+#define LJ_ALLOC_MMAP_PROBE_LINEAR 5 -+ -+#define LJ_ALLOC_MMAP_PROBE_LOWER ((uintptr_t)0x4000) -+ -+/* No point in a giant ifdef mess. Just try to open /dev/urandom. -+** It doesn't really matter if this fails, since we get some ASLR bits from -+** every unsuitable allocation, too. And we prefer linear allocation, anyway. -+*/ -+#include -+#include -+ -+static uintptr_t mmap_probe_seed(void) -+{ -+ uintptr_t val; -+ int fd = open("/dev/urandom", O_RDONLY); -+ if (fd != -1) { -+ int ok = ((size_t)read(fd, &val, sizeof(val)) == sizeof(val)); -+ (void)close(fd); -+ if (ok) return val; -+ } -+ return 1; /* Punt. */ -+} -+ -+static void *mmap_probe(size_t size) -+{ -+ /* Hint for next allocation. Doesn't need to be thread-safe. */ -+ static uintptr_t hint_addr = 0; -+ static uintptr_t hint_prng = 0; - int olderr = errno; -- void *ptr = mmap((void *)MMAP_REGION_START, size, MMAP_PROT, MAP_32BIT|MMAP_FLAGS, -1, 0); -- errno = olderr; -- return ptr; --} -- --#elif LJ_TARGET_OSX || LJ_TARGET_PS4 || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__sun__) || LJ_TARGET_CYGWIN -- --/* OSX and FreeBSD mmap() use a naive first-fit linear search. --** That's perfect for us. Except that -pagezero_size must be set for OSX, --** otherwise the lower 4GB are blocked. And the 32GB RLIMIT_DATA needs --** to be reduced to 250MB on FreeBSD. --*/ --#if LJ_TARGET_OSX || defined(__DragonFly__) --#define MMAP_REGION_START ((uintptr_t)0x10000) --#elif LJ_TARGET_PS4 --#define MMAP_REGION_START ((uintptr_t)0x4000) --#else --#define MMAP_REGION_START ((uintptr_t)0x10000000) --#endif --#define MMAP_REGION_END ((uintptr_t)0x80000000) -- --#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !LJ_TARGET_PS4 --#include --#endif -- --static LJ_AINLINE void *CALL_MMAP(size_t size) --{ -- int olderr = errno; -- /* Hint for next allocation. Doesn't need to be thread-safe. */ -- static uintptr_t alloc_hint = MMAP_REGION_START; -- int retry = 0; --#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !LJ_TARGET_PS4 -- static int rlimit_modified = 0; -- if (LJ_UNLIKELY(rlimit_modified == 0)) { -- struct rlimit rlim; -- rlim.rlim_cur = rlim.rlim_max = MMAP_REGION_START; -- setrlimit(RLIMIT_DATA, &rlim); /* Ignore result. May fail below. */ -- rlimit_modified = 1; -- } --#endif -- for (;;) { -- void *p = mmap((void *)alloc_hint, size, MMAP_PROT, MMAP_FLAGS, -1, 0); -- if ((uintptr_t)p >= MMAP_REGION_START && -- (uintptr_t)p + size < MMAP_REGION_END) { -- alloc_hint = (uintptr_t)p + size; -+ int retry; -+ for (retry = 0; retry < LJ_ALLOC_MMAP_PROBE_MAX; retry++) { -+ void *p = mmap((void *)hint_addr, size, MMAP_PROT, MMAP_FLAGS_PROBE, -1, 0); -+ uintptr_t addr = (uintptr_t)p; -+ if ((addr >> LJ_ALLOC_MBITS) == 0 && addr >= LJ_ALLOC_MMAP_PROBE_LOWER && -+ ((addr + size) >> LJ_ALLOC_MBITS) == 0) { -+ /* We got a suitable address. Bump the hint address. */ -+ hint_addr = addr + size; - errno = olderr; - return p; - } -- if (p != CMFAIL) munmap(p, size); --#if defined(__sun__) || defined(__DragonFly__) -- alloc_hint += 0x1000000; /* Need near-exhaustive linear scan. */ -- if (alloc_hint + size < MMAP_REGION_END) continue; --#endif -- if (retry) break; -- retry = 1; -- alloc_hint = MMAP_REGION_START; -+ if (p != MFAIL) { -+ munmap(p, size); -+ } else if (errno == ENOMEM) { -+ return MFAIL; -+ } -+ if (hint_addr) { -+ /* First, try linear probing. */ -+ if (retry < LJ_ALLOC_MMAP_PROBE_LINEAR) { -+ hint_addr += 0x1000000; -+ if (((hint_addr + size) >> LJ_ALLOC_MBITS) != 0) -+ hint_addr = 0; -+ continue; -+ } else if (retry == LJ_ALLOC_MMAP_PROBE_LINEAR) { -+ /* Next, try a no-hint probe to get back an ASLR address. */ -+ hint_addr = 0; -+ continue; -+ } -+ } -+ /* Finally, try pseudo-random probing. */ -+ if (LJ_UNLIKELY(hint_prng == 0)) { -+ hint_prng = mmap_probe_seed(); -+ } -+ /* The unsuitable address we got has some ASLR PRNG bits. */ -+ hint_addr ^= addr & ~((uintptr_t)(LJ_PAGESIZE-1)); -+ do { /* The PRNG itself is very weak, but see above. */ -+ hint_prng = hint_prng * 1103515245 + 12345; -+ hint_addr ^= hint_prng * (uintptr_t)LJ_PAGESIZE; -+ hint_addr &= (((uintptr_t)1 << LJ_ALLOC_MBITS)-1); -+ } while (hint_addr < LJ_ALLOC_MMAP_PROBE_LOWER); - } - errno = olderr; -- return CMFAIL; --} -- -+ return MFAIL; -+} -+ -+#endif -+ -+#if LJ_ALLOC_MMAP32 -+ -+#if defined(__sun__) -+#define LJ_ALLOC_MMAP32_START ((uintptr_t)0x1000) - #else -- --#error "NYI: need an equivalent of MAP_32BIT for this 64 bit OS" -- --#endif -- -+#define LJ_ALLOC_MMAP32_START ((uintptr_t)0) -+#endif -+ -+static void *mmap_map32(size_t size) -+{ -+#if LJ_ALLOC_MMAP_PROBE -+ static int fallback = 0; -+ if (fallback) -+ return mmap_probe(size); -+#endif -+ { -+ int olderr = errno; -+ void *ptr = mmap((void *)LJ_ALLOC_MMAP32_START, size, MMAP_PROT, MAP_32BIT|MMAP_FLAGS, -1, 0); -+ errno = olderr; -+ /* This only allows 1GB on Linux. So fallback to probing to get 2GB. */ -+#if LJ_ALLOC_MMAP_PROBE -+ if (ptr == MFAIL) { -+ fallback = 1; -+ return mmap_probe(size); -+ } -+#endif -+ return ptr; -+ } -+} -+ -+#endif -+ -+#if LJ_ALLOC_MMAP32 -+#define CALL_MMAP(size) mmap_map32(size) -+#elif LJ_ALLOC_MMAP_PROBE -+#define CALL_MMAP(size) mmap_probe(size) - #else -- --/* 32 bit mode is easy. */ --static LJ_AINLINE void *CALL_MMAP(size_t size) -+static void *CALL_MMAP(size_t size) - { - int olderr = errno; - void *ptr = mmap(NULL, size, MMAP_PROT, MMAP_FLAGS, -1, 0); - errno = olderr; - return ptr; - } -- --#endif -- --#define INIT_MMAP() ((void)0) --#define DIRECT_MMAP(s) CALL_MMAP(s) -- --static LJ_AINLINE int CALL_MUNMAP(void *ptr, size_t size) -+#endif -+ -+#if LJ_64 && !LJ_GC64 && ((defined(__FreeBSD__) && __FreeBSD__ < 10) || defined(__FreeBSD_kernel__)) && !LJ_TARGET_PS4 -+ -+#include -+ -+static void init_mmap(void) -+{ -+ struct rlimit rlim; -+ rlim.rlim_cur = rlim.rlim_max = 0x10000; -+ setrlimit(RLIMIT_DATA, &rlim); /* Ignore result. May fail later. */ -+} -+#define INIT_MMAP() init_mmap() -+ -+#endif -+ -+static int CALL_MUNMAP(void *ptr, size_t size) - { - int olderr = errno; - int ret = munmap(ptr, size); -@@ -280,10 +366,9 @@ - return ret; - } - --#if LJ_TARGET_LINUX -+#if LJ_ALLOC_MREMAP - /* Need to define _GNU_SOURCE to get the mremap prototype. */ --static LJ_AINLINE void *CALL_MREMAP_(void *ptr, size_t osz, size_t nsz, -- int flags) -+static void *CALL_MREMAP_(void *ptr, size_t osz, size_t nsz, int flags) - { - int olderr = errno; - ptr = mremap(ptr, osz, nsz, flags); -@@ -294,13 +379,22 @@ - #define CALL_MREMAP(addr, osz, nsz, mv) CALL_MREMAP_((addr), (osz), (nsz), (mv)) - #define CALL_MREMAP_NOMOVE 0 - #define CALL_MREMAP_MAYMOVE 1 --#if LJ_64 -+#if LJ_64 && !LJ_GC64 - #define CALL_MREMAP_MV CALL_MREMAP_NOMOVE - #else - #define CALL_MREMAP_MV CALL_MREMAP_MAYMOVE - #endif - #endif - -+#endif -+ -+ -+#ifndef INIT_MMAP -+#define INIT_MMAP() ((void)0) -+#endif -+ -+#ifndef DIRECT_MMAP -+#define DIRECT_MMAP(s) CALL_MMAP(s) - #endif - - #ifndef CALL_MREMAP - diff --git a/Formula/luaradio.rb b/Formula/luaradio.rb deleted file mode 100644 index 281f825c13914..0000000000000 --- a/Formula/luaradio.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Luaradio < Formula - desc "Lightweight, embeddable flow graph signal processing framework for SDR" - homepage "https://luaradio.io/" - url "https://github.com/vsergeev/luaradio/archive/v0.7.0.tar.gz" - sha256 "7414c7bafc4ca3a9b0ac33e436987080602df53d0476f3618f0f37801e854aa6" - head "https://github.com/vsergeev/luaradio.git" - - bottle do - cellar :any - sha256 "df3f0b9ba19651e37c5b7c8e6bbe04658f852bd909fcebc14d9c08c9926e1061" => :catalina - sha256 "909850451f26146b3c9e65129177afd31a715e463223c2713b414d345929376d" => :mojave - sha256 "6d16f13182248aac79fcda6cbc11284ddbfa0e660cb9ba38a4b5e76262113e26" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "fftw" - depends_on "liquid-dsp" - depends_on "luajit" - - def install - cd "embed" do - # Ensure file placement is compatible with HOMEBREW_SANDBOX. - inreplace "Makefile" do |s| - s.gsub! "install -d $(DESTDIR)$(INSTALL_CMOD)", - "install -d $(PREFIX)/lib/lua/5.1" - s.gsub! "$(DESTDIR)$(INSTALL_CMOD)/radio.so", - "$(PREFIX)/lib/lua/5.1/radio.so" - end - system "make", "install", "PREFIX=#{prefix}" - end - end - - test do - (testpath/"hello").write("Hello, world!") - (testpath/"test.lua").write <<~EOS - local radio = require('radio') - - local PrintBytes = radio.block.factory("PrintBytes") - - function PrintBytes:instantiate() - self:add_type_signature({radio.block.Input("in", radio.types.Byte)}, {}) - end - - function PrintBytes:process(c) - for i = 0, c.length - 1 do - io.write(string.char(c.data[i].value)) - end - end - - local source = radio.RawFileSource("hello", radio.types.Byte, 1e6) - local sink = PrintBytes() - local top = radio.CompositeBlock() - - top:connect(source, sink) - top:run() - EOS - - assert_equal "Hello, world!", shell_output("#{bin}/luaradio test.lua") - end -end diff --git a/Formula/luarocks.rb b/Formula/luarocks.rb deleted file mode 100644 index d7af583d66b9d..0000000000000 --- a/Formula/luarocks.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Luarocks < Formula - desc "Package manager for the Lua programming language" - homepage "https://luarocks.org/" - url "https://luarocks.org/releases/luarocks-3.3.1.tar.gz" - sha256 "eb20cd9814df05535d9aae98da532217c590fc07d48d90ca237e2a7cdcf284fe" - license "MIT" - head "https://github.com/luarocks/luarocks.git" - - bottle do - cellar :any_skip_relocation - sha256 "edacb067e2c9fc03920b9b9d9f4b804632a1f71f7fb5013b0dcdb2ad277b2352" => :catalina - sha256 "edacb067e2c9fc03920b9b9d9f4b804632a1f71f7fb5013b0dcdb2ad277b2352" => :mojave - sha256 "edacb067e2c9fc03920b9b9d9f4b804632a1f71f7fb5013b0dcdb2ad277b2352" => :high_sierra - end - - depends_on "lua@5.1" => :test - depends_on "lua" - - def install - system "./configure", "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--rocks-tree=#{HOMEBREW_PREFIX}" - system "make", "install" - end - - def caveats - <<~EOS - LuaRocks supports multiple versions of Lua. By default it is configured - to use Lua5.3, but you can require it to use another version at runtime - with the `--lua-dir` flag, like this: - - luarocks --lua-dir=#{Formula["lua@5.1"].opt_prefix} install say - EOS - end - - test do - ENV["LUA_PATH"] = "#{testpath}/share/lua/5.3/?.lua" - ENV["LUA_CPATH"] = "#{testpath}/lib/lua/5.3/?.so" - - (testpath/"lfs_53test.lua").write <<~EOS - require("lfs") - print(lfs.currentdir()) - EOS - - system "#{bin}/luarocks", "--tree=#{testpath}", "install", "luafilesystem" - system "lua", "-e", "require('lfs')" - assert_match testpath.to_s, shell_output("lua lfs_53test.lua") - - ENV["LUA_PATH"] = "#{testpath}/share/lua/5.1/?.lua" - ENV["LUA_CPATH"] = "#{testpath}/lib/lua/5.1/?.so" - - (testpath/"lfs_51test.lua").write <<~EOS - require("lfs") - lfs.mkdir("blank_space") - EOS - - system "#{bin}/luarocks", "--tree=#{testpath}", - "--lua-dir=#{Formula["lua@5.1"].opt_prefix}", - "install", "luafilesystem" - system "lua5.1", "-e", "require('lfs')" - system "lua5.1", "lfs_51test.lua" - assert_predicate testpath/"blank_space", :directory?, - "Luafilesystem failed to create the expected directory" - end -end diff --git a/Formula/luaver.rb b/Formula/luaver.rb deleted file mode 100644 index 396a5d3de80fa..0000000000000 --- a/Formula/luaver.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Luaver < Formula - desc "Manage and switch between versions of Lua, LuaJIT, and Luarocks" - homepage "https://github.com/DhavalKapil/luaver" - url "https://github.com/DhavalKapil/luaver/archive/v1.1.0.tar.gz" - sha256 "441b1b72818889593d15a035807c95321118ac34270da49cf8d5d64f5f2e486d" - license "MIT" - head "https://github.com/DhavalKapil/luaver.git" - - bottle :unneeded - - depends_on "wget" - - def install - bin.install "luaver" - end - - def caveats - <<~EOS - Add the following at the end of the correct file yourself: - if which luaver > /dev/null; then . `which luaver`; fi - EOS - end - - test do - lua_versions = %w[5.3.3 5.2.4 5.1.5] - lua_versions.each do |v| - ENV.deparallelize { system ". #{bin}/luaver install #{v} < /dev/null" } - system ". #{bin}/luaver use #{v} && lua -v" - end - luajit_versions = %w[2.0.4] - luajit_versions.each do |v| - system ". #{bin}/luaver install-luajit #{v} < /dev/null" - system ". #{bin}/luaver use-luajit #{v} && luajit -v" - end - end -end diff --git a/Formula/luit.rb b/Formula/luit.rb deleted file mode 100644 index 1ce07d88d3837..0000000000000 --- a/Formula/luit.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Luit < Formula - desc "Filter run between arbitrary application and UTF-8 terminal emulator" - homepage "https://invisible-island.net/luit/" - url "https://invisible-mirror.net/archives/luit/luit-20190106.tgz" - sha256 "2b900f65ccdc38f8bfc11c6020069d055ba63fce6f90baefe8efc222a5ca3920" - - bottle do - cellar :any_skip_relocation - sha256 "3aafc250abb3e80b97eb19c4cd33760526086ce59c6c4609a75504e34a5b25bf" => :catalina - sha256 "11e27c20be2a427608f074fdc2d42d7647dd78671cf8242f436441a15fcbc001" => :mojave - sha256 "83411e2dbc25e9b93bff916334d2dbf4c0534deb526ac2369e878eb6bcd0cbcc" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}", "--without-x" - system "make", "install" - end - - test do - require "pty" - (testpath/"input").write("#end {bye}\n") - PTY.spawn(bin/"luit", "-encoding", "GBK", "echo", "foobar") do |r, _w, _pid| - assert_match "foobar", r.read - end - end -end diff --git a/Formula/lutok.rb b/Formula/lutok.rb deleted file mode 100644 index d4f5c06a80b4b..0000000000000 --- a/Formula/lutok.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Lutok < Formula - desc "Lightweight C++ API for Lua" - homepage "https://github.com/jmmv/lutok" - url "https://github.com/jmmv/lutok/releases/download/lutok-0.4/lutok-0.4.tar.gz" - sha256 "2cec51efa0c8d65ace8b21eaa08384b77abc5087b46e785f78de1c21fb754cd5" - license "BSD-3-Clause" - revision 1 - - bottle do - cellar :any - sha256 "20554341566479d2c715f0707ec96db12fa0fdfbc7fdb6d6bfc4e85e5407479e" => :catalina - sha256 "88e2ba9da751f966f9f6c1b030e8f65ac4042dada954ed41d0d832e051d2e58b" => :mojave - sha256 "1a78a65920384f74c126fcc1b0dd50d32050e624b31c13832258e25c8ddeeb85" => :high_sierra - sha256 "3574212320ef541e098198f1465cca7162cb59daff416af2190127d948a119eb" => :sierra - sha256 "f96ca1b1429b412a1cdd65347cf84572f2904ac70c60dfacf88235861a7237e7" => :el_capitan - end - - depends_on "pkg-config" => :build - depends_on "lua" - - def install - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - ENV.deparallelize - system "make", "check" - system "make", "install" - system "make", "installcheck" - end -end diff --git a/Formula/luvit.rb b/Formula/luvit.rb deleted file mode 100644 index 89c3672c959ff..0000000000000 --- a/Formula/luvit.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Luvit < Formula - desc "Asynchronous I/O for Lua" - homepage "https://luvit.io/" - url "https://github.com/luvit/luvit/archive/2.17.0.tar.gz" - sha256 "80657aa752322560fcde780212b6807b626b45d65aca3f3dae254e5c4fb0ee78" - license "Apache-2.0" - head "https://github.com/luvit/luvit.git" - - bottle do - cellar :any_skip_relocation - sha256 "a1210dda91aa024d11bd4d15a67b71654dcbbbc2ba14a87d1d34ab012f4d5c2a" => :catalina - sha256 "a3a37fdf8f0e99efdfc1736978ea9d8cdea74e939b42696fe771c3c5c9914f8f" => :mojave - sha256 "2c704b1f98b965c0b6010a897a0c951f47cb896bbbf5381e7d4ee80238692033" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "luajit" - depends_on "openssl@1.1" - - def install - ENV["USE_SYSTEM_SSL"] = "1" - ENV["USE_SYSTEM_LUAJIT"] = "1" - ENV["PREFIX"] = prefix - system "make" - system "make", "install" - end - - test do - assert_equal "Hello World\n", shell_output("#{bin}/luvit -e 'print(\"Hello World\")'") - end -end diff --git a/Formula/lv.rb b/Formula/lv.rb deleted file mode 100644 index 67d62e74fe72c..0000000000000 --- a/Formula/lv.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Lv < Formula - desc "Powerful multi-lingual file viewer/grep" - homepage "https://web.archive.org/web/20160310122517/www.ff.iij4u.or.jp/~nrt/lv/" - url "https://web.archive.org/web/20150915000000/www.ff.iij4u.or.jp/~nrt/freeware/lv451.tar.gz" - version "4.51" - sha256 "e1cd2e27109fbdbc6d435f2c3a99c8a6ef2898941f5d2f7bacf0c1ad70158bcf" - revision 1 - - bottle do - sha256 "74f154bdfaabb2819bfab9969a88addff7e0b08cca3aafe3ea13805fa588e68d" => :catalina - sha256 "491aa872d9c617f7d323aa368498f25728d25bbdf1e60fde272e62b149831c99" => :mojave - sha256 "90a79ade2abcd36772eb50db1c93298a67766d626a5316a3eeb1638312fbd377" => :high_sierra - end - - on_linux do - depends_on "gzip" - end - - # See https://github.com/Homebrew/homebrew-core/pull/53085 - patch :DATA - - def install - # zcat doesn't handle gzip'd data on OSX. - # Reported upstream to nrt@ff.iij4u.or.jp - inreplace "src/stream.c", 'gz_filter = "zcat"', 'gz_filter = "gzcat"' - - cd "build" do - system "../src/configure", "--prefix=#{prefix}" - system "make" - bin.install "lv" - bin.install_symlink "lv" => "lgrep" - end - - man1.install "lv.1" - (lib+"lv").install "lv.hlp" - end - - test do - system "lv", "-V" - end -end - -__END__ ---- a/src/escape.c -+++ b/src/escape.c -@@ -62,6 +62,10 @@ - break; - } while( 'm' != ch ); - -+ if( 'K' == ch ){ -+ return TRUE; -+ } -+ - SIDX = index; - - if( 'm' != ch ){ diff --git a/Formula/lv2.rb b/Formula/lv2.rb deleted file mode 100644 index 16274202b4d8e..0000000000000 --- a/Formula/lv2.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Lv2 < Formula - desc "Portable plugin standard for audio systems" - homepage "https://lv2plug.in/" - url "https://lv2plug.in/spec/lv2-1.18.0.tar.bz2" - sha256 "90a3e5cf8bdca81b49def917e89fd6bba1d5845261642cd54e7888df0320473f" - - bottle do - cellar :any_skip_relocation - sha256 "6cafb26479b24f5b6746557359b665d03bc42dd47ee7acea5a9c0b742c23936e" => :catalina - sha256 "6cafb26479b24f5b6746557359b665d03bc42dd47ee7acea5a9c0b742c23936e" => :mojave - sha256 "6cafb26479b24f5b6746557359b665d03bc42dd47ee7acea5a9c0b742c23936e" => :high_sierra - end - - depends_on :macos # Due to Python 2 - - def install - system "./waf", "configure", "--prefix=#{prefix}", "--no-plugins", "--lv2dir=#{lib}" - system "./waf", "build" - system "./waf", "install" - end -end diff --git a/Formula/lwtools.rb b/Formula/lwtools.rb deleted file mode 100644 index a556b46688950..0000000000000 --- a/Formula/lwtools.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Lwtools < Formula - desc "Cross-development tools for Motorola 6809 and Hitachi 6309" - homepage "http://lwtools.projects.l-w.ca/" - url "http://lwtools.projects.l-w.ca/releases/lwtools/lwtools-4.17.tar.gz" - sha256 "a93ab316ca0176901822873dba4bc286d3a5cf86e6a853d3edb7a51ecc96a91c" - - bottle do - cellar :any_skip_relocation - sha256 "1ce602bff92ea48cca7732b218e999350d62a3f76d7c69c3e73573da2139d662" => :catalina - sha256 "3cfae9c3afc0a2fa0d8fdf48c88cb504056f35702f45a4afe5070ceb408d4919" => :mojave - sha256 "8c0c67d34661986431d9fdb2fe5b6315a0da6b4ec9b4eac139868bfa1ee18069" => :high_sierra - sha256 "d4f5b062ba3fbd7c7d3115c6f6451fdaa4daf331e0e7f0641580df19dc3c65e4" => :sierra - end - - def install - system "make" - system "make", "install", "INSTALLDIR=#{bin}" - end - - test do - # lwasm - (testpath/"foo.asm").write " SECTION foo\n stb $1234,x\n" - system "#{bin}/lwasm", "--obj", "--output=foo.obj", "foo.asm" - - # lwlink - system "#{bin}/lwlink", "--format=raw", "--output=foo.bin", "foo.obj" - code = File.open("foo.bin", "rb") { |f| f.read.unpack("C*") } - assert_equal [0xe7, 0x89, 0x12, 0x34], code - - # lwobjdump - dump = `#{bin}/lwobjdump foo.obj` - assert_equal 0, $CHILD_STATUS.exitstatus - assert dump.start_with?("SECTION foo") - - # lwar - system "#{bin}/lwar", "--create", "foo.lwa", "foo.obj" - list = `#{bin}/lwar --list foo.lwa` - assert_equal 0, $CHILD_STATUS.exitstatus - assert list.start_with?("foo.obj") - end -end diff --git a/Formula/lxc.rb b/Formula/lxc.rb deleted file mode 100644 index 55e0a3e5148ca..0000000000000 --- a/Formula/lxc.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Lxc < Formula - desc "CLI client for interacting with LXD" - homepage "https://linuxcontainers.org/" - url "https://linuxcontainers.org/downloads/lxd/lxd-4.3.tar.gz" - sha256 "b6891ee6086a2d26409385fcd50d627e6a72e0af17f88c5693c1e100ed9dca1f" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "5f2595ccdaad48ac032a0ae9d187ba74b7e53dc6d58614c9d7fc235b5685a247" => :catalina - sha256 "4f6ff1af48947a98587f341f31b8cb2fc8d948a11b81c113eea0fe0b2d665345" => :mojave - sha256 "1706400532ce10e71cac18d345cd75e42b2f05cab6bbfdf43ade9b9825970626" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = bin - - ln_s buildpath/"_dist/src", buildpath/"src" - system "go", "install", "-v", "github.com/lxc/lxd/lxc" - end - - test do - system "#{bin}/lxc", "--version" - end -end diff --git a/Formula/lxsplit.rb b/Formula/lxsplit.rb deleted file mode 100644 index 78bf33921d546..0000000000000 --- a/Formula/lxsplit.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Lxsplit < Formula - desc "Tool for splitting or joining files" - homepage "https://lxsplit.sourceforge.io/" - url "https://downloads.sourceforge.net/lxsplit/lxsplit-0.2.4.tar.gz" - sha256 "858fa939803b2eba97ccc5ec57011c4f4b613ff299abbdc51e2f921016845056" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "8f2c02d85a1aec1e2ec692564896c668cb6d7c4cd28b0d3b1f08da1be7070b07" => :catalina - sha256 "ffc9b9b7e9669e1cff8a46b3930d052ffa149179897134439b1228d8ee178777" => :mojave - sha256 "da1b73f5843b77ce947ce546fb77a47f2c1b989efbf70fdd61b9d05f81a386b5" => :high_sierra - sha256 "f4d271c94546ca73b9e5262ff53bf7b51dcde2a83998d5a2e4b663109f2f69d8" => :sierra - sha256 "25699d54183a01f446015fb02521a50b3967ef2d250e56bb1fe3fd0a5aaec2e1" => :el_capitan - sha256 "d7d8d9eb204599056a4e109c63114c90e3be797d2be700e114cc3675d8eba0bb" => :yosemite - sha256 "da0ee88012d21dc120c7247fd856305fe14a213e38babcd39ab652af06483b7e" => :mavericks - end - - def install - bin.mkpath - inreplace "Makefile", "/usr/local/bin", bin - system "make" - system "make", "install" - end -end diff --git a/Formula/lynis.rb b/Formula/lynis.rb deleted file mode 100644 index 7435adbbbdfcd..0000000000000 --- a/Formula/lynis.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Lynis < Formula - desc "Security and system auditing tool to harden systems" - homepage "https://cisofy.com/lynis/" - url "https://downloads.cisofy.com/lynis/lynis-3.0.0.tar.gz" - sha256 "3cc165f9007ba41de6d0b693a1167dbaf0179085f9506dcba64b4b8e37e1bda2" - - bottle :unneeded - - def install - inreplace "lynis" do |s| - s.gsub! 'tINCLUDE_TARGETS="/usr/local/include/lynis ' \ - '/usr/local/lynis/include /usr/share/lynis/include ./include"', - %Q(tINCLUDE_TARGETS="#{include}") - s.gsub! 'tPLUGIN_TARGETS="/usr/local/lynis/plugins ' \ - "/usr/local/share/lynis/plugins /usr/share/lynis/plugins " \ - '/etc/lynis/plugins ./plugins"', - %Q(tPLUGIN_TARGETS="#{prefix}/plugins") - s.gsub! 'tDB_TARGETS="/usr/local/share/lynis/db /usr/local/lynis/db ' \ - '/usr/share/lynis/db ./db"', - %Q(tDB_TARGETS="#{prefix}/db") - end - inreplace "include/functions" do |s| - s.gsub! 'tPROFILE_TARGETS="/usr/local/etc/lynis /etc/lynis ' \ - '/usr/local/lynis ."', - %Q(tPROFILE_TARGETS="#{prefix}") - end - - prefix.install "db", "include", "plugins", "default.prf" - bin.install "lynis" - man8.install "lynis.8" - end - - test do - assert_match "lynis", shell_output("#{bin}/lynis --invalid 2>&1", 64) - end -end diff --git a/Formula/lynx.rb b/Formula/lynx.rb deleted file mode 100644 index 9512b92dc46da..0000000000000 --- a/Formula/lynx.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Lynx < Formula - desc "Text-based web browser" - homepage "https://invisible-island.net/lynx/" - url "https://invisible-mirror.net/archives/lynx/tarballs/lynx2.8.9rel.1.tar.bz2" - version "2.8.9rel.1" - sha256 "387f193d7792f9cfada14c60b0e5c0bff18f227d9257a39483e14fa1aaf79595" - revision 1 - - bottle do - sha256 "b7b36f0697736fc1744026c18968bec4d5c1433356678e853d734406f9dc3612" => :catalina - sha256 "3b4c3a636d19106a2fea571889a4159fd49b82fbd2694c206d4851b15281fddd" => :mojave - sha256 "68eb083eff0962b83dc121e9194d430d4e9c2eb7d559cb998ba992da9b566479" => :high_sierra - sha256 "b8ee13323a4e8760f21a82da3b579d3373e282398ff7efe56c7ec8ae9cb0d064" => :sierra - end - - depends_on "openssl@1.1" - - uses_from_macos "ncurses" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--disable-echo", - "--enable-default-colors", - "--with-zlib", - "--with-bzlib", - "--with-ssl=#{Formula["openssl@1.1"].opt_prefix}", - "--enable-ipv6" - system "make", "install" - end - - test do - system "#{bin}/lynx", "-dump", "https://example.org/" - end -end diff --git a/Formula/lz4.rb b/Formula/lz4.rb deleted file mode 100644 index 7e2162a2da6fe..0000000000000 --- a/Formula/lz4.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Lz4 < Formula - desc "Extremely Fast Compression algorithm" - homepage "https://lz4.org/" - url "https://github.com/lz4/lz4/archive/v1.9.2.tar.gz" - sha256 "658ba6191fa44c92280d4aa2c271b0f4fbc0e34d249578dd05e50e76d0e5efcc" - head "https://github.com/lz4/lz4.git" - - bottle do - cellar :any - sha256 "7de6165d86c7a7ae01d254a5d0ea0a6d5876f90cffb63a2570942d46cca6373a" => :catalina - sha256 "67ca428e60e2c2f6e524dd3de42629c1a616d28b2c743b66bf4cbdcc3b28ea46" => :mojave - sha256 "7f60879b81a3a9ee52b3e9b87ed265c4934058b841e8f5320044f826b4660a92" => :high_sierra - sha256 "00d3610cf09b0fcde34928890f5dac870ebcaffacd6eb51eaea05b754753e462" => :sierra - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - input = "testing compression and decompression" - input_file = testpath/"in" - input_file.write input - output_file = testpath/"out" - system "sh", "-c", "cat #{input_file} | #{bin}/lz4 | #{bin}/lz4 -d > #{output_file}" - assert_equal output_file.read, input - end -end diff --git a/Formula/lzfse.rb b/Formula/lzfse.rb deleted file mode 100644 index 5895bc3edafc7..0000000000000 --- a/Formula/lzfse.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Lzfse < Formula - desc "Apple LZFSE compression library and command-line tool" - homepage "https://github.com/lzfse/lzfse" - url "https://github.com/lzfse/lzfse/archive/lzfse-1.0.tar.gz" - sha256 "cf85f373f09e9177c0b21dbfbb427efaedc02d035d2aade65eb58a3cbf9ad267" - - bottle do - cellar :any - sha256 "bf5a9fba1911206046cb4698e9b23ac23f247bcd1c47cdd779fa7a786c40aa27" => :catalina - sha256 "2f42a21db8de9f71535a0a9b7ca084f1a0e89174cbda174915f5da2e1ec5d3d2" => :mojave - sha256 "e2a28bc48a8d90dd26cf2fe92d9186cbe0f19c8a58a5d15c8591826cd047b43b" => :high_sierra - sha256 "2da23959f27fe8a141b2967a591052c6ec081224b7b3c9c65c4a854faba77456" => :sierra - sha256 "4fcadd0779483cf14e95f7566002af22e9b488585c37fba1b5e75f715b930c01" => :el_capitan - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - end - - test do - File.open("original", "wb") do |f| - f.write(Random.new.bytes(0xFFFF)) - end - - system "#{bin}/lzfse", "-encode", "-i", "original", "-o", "encoded" - system "#{bin}/lzfse", "-decode", "-i", "encoded", "-o", "decoded" - - assert compare_file("original", "decoded") - end -end diff --git a/Formula/lzip.rb b/Formula/lzip.rb deleted file mode 100644 index c32978fc97cc6..0000000000000 --- a/Formula/lzip.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Lzip < Formula - desc "LZMA-based compression program similar to gzip or bzip2" - homepage "https://www.nongnu.org/lzip/" - url "https://download-mirror.savannah.gnu.org/releases/lzip/lzip-1.21.tar.gz" - sha256 "e48b5039d3164d670791f9c5dbaa832bf2df080cb1fbb4f33aa7b3300b670d8b" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e69bdf0e079d8b94221625310d0a0f6ad5cee544b4055d6a55d721f791a5b7f9" => :catalina - sha256 "54716b72b43e41cb8d9912fe3f61aeef651f890bf42f8b92482adfd0f2c99798" => :mojave - sha256 "bfe47a5379c4d793e15d1d71f5f6b12047a486e2531718f31f675683d54df595" => :high_sierra - sha256 "aba0ea18470d9aa4f619c0f6c133a4f459d4b02327ff539a44a1f473a2112369" => :sierra - end - - def install - system "./configure", "--prefix=#{prefix}", - "CXX=#{ENV.cxx}", - "CXXFLAGS=#{ENV.cflags}" - system "make", "check" - ENV.deparallelize - system "make", "install" - end - - test do - path = testpath/"data.txt" - original_contents = "." * 1000 - path.write original_contents - - # compress: data.txt -> data.txt.lz - system "#{bin}/lzip", path - refute_predicate path, :exist? - - # decompress: data.txt.lz -> data.txt - system "#{bin}/lzip", "-d", "#{path}.lz" - assert_equal original_contents, path.read - end -end diff --git a/Formula/lzlib.rb b/Formula/lzlib.rb deleted file mode 100644 index 7f681b4c086b1..0000000000000 --- a/Formula/lzlib.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Lzlib < Formula - desc "Data compression library" - homepage "https://www.nongnu.org/lzip/lzlib.html" - url "https://download.savannah.gnu.org/releases/lzip/lzlib/lzlib-1.11.tar.gz" - sha256 "6c5c5f8759d1ab7c4c3c53788ea2d9daad04aeddcf338226893f8ff134914d36" - - bottle do - cellar :any_skip_relocation - sha256 "8d43e434cb121e5fd9c1be9adfc0ff6c8afa8f51c786a5b855117eb6f3e9e2dd" => :catalina - sha256 "3c28dea3721b03227d660c7c453673d3cb40f00f41e2e4ba3f163a7171926da0" => :mojave - sha256 "a49b8dfcf257d31c46841a733f1925020dd49493554d049a479467e602e3e796" => :high_sierra - sha256 "3c6df94a873fc2268478e10c23d1aa631c6b29e1afff38de63e2839ad0f1968c" => :sierra - end - - def install - system "./configure", "--prefix=#{prefix}", - "CC=#{ENV.cc}", - "CFLAGS=#{ENV.cflags}" - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include "lzlib.h" - int main (void) { - printf ("%s", LZ_version()); - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-llz", - "-o", "test" - assert_equal version.to_s, shell_output("./test") - end -end diff --git a/Formula/lzo.rb b/Formula/lzo.rb deleted file mode 100644 index 6ac03f6d01a42..0000000000000 --- a/Formula/lzo.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Lzo < Formula - desc "Real-time data compression library" - homepage "https://www.oberhumer.com/opensource/lzo/" - url "https://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz" - sha256 "c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "c8f55ba0de85273c1851136f47b89f43ba3cce9cbf0ba9f2bba7db311544a000" => :catalina - sha256 "84f4e3223c03375b0be93bd87be98f512e092621b4f6b4216e3da7210c56ddad" => :mojave - sha256 "2420aac02d4765ecfd5e9b4d05402f42416c438e8bbaa43dca19e03ecff2a670" => :high_sierra - sha256 "26969f416ec79374e074f8434d6b7eece891fcbc8bee386e9bbd6d418149bc52" => :sierra - sha256 "77abd933fd899707c99b88731a743d5289cc6826bd4ff854a30e088fbbc61222" => :el_capitan - sha256 "0c3824de467014932ebdb3a2915a114de95036d7661c4d09df0c0191c9149e22" => :yosemite - end - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-shared" - system "make" - system "make", "check" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - printf("Testing LZO v%s in Homebrew.\\n", - LZO_VERSION_STRING); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-o", "test" - assert_match "Testing LZO v#{version} in Homebrew.", shell_output("./test") - end -end diff --git a/Formula/lzop.rb b/Formula/lzop.rb deleted file mode 100644 index f31747250644e..0000000000000 --- a/Formula/lzop.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Lzop < Formula - desc "File compressor" - homepage "https://www.lzop.org/" - url "https://dl.bintray.com/homebrew/mirror/lzop-1.04.tar.gz" - mirror "https://www.lzop.org/download/lzop-1.04.tar.gz" - sha256 "7e72b62a8a60aff5200a047eea0773a8fb205caf7acbe1774d95147f305a2f41" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "3aa57a50254d383c0fe0e4d0d0585e1525d50d0cd30f87390d087523348044a0" => :catalina - sha256 "0ec93aa163500d45c456bce3ee100dbe61c4db080494ee41383286ca10f4d246" => :mojave - sha256 "d42fafd3f1f39d9ab512f755bd216edd24002caf8a4da82f80818fe2c29f0556" => :high_sierra - sha256 "73c2ce334be9317ca79509aec3acef2fa1eff0ffb69fdc10b3850b7f51101f72" => :sierra - sha256 "26e49bf0d06fb60d7cd5c431634966f28993edc250c4d06b0db26b28aae3cd0d" => :el_capitan - sha256 "d9e12c4bb51c43dd306d5283fde5c3350e3e1f7f1d48c05c831a57b058db1354" => :yosemite - end - - depends_on "lzo" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - path = testpath/"test" - text = "This is Homebrew" - path.write text - - system "#{bin}/lzop", "test" - assert_predicate testpath/"test.lzo", :exist? - rm path - - system "#{bin}/lzop", "-d", "test.lzo" - assert_equal text, path.read - end -end diff --git a/Formula/m-cli.rb b/Formula/m-cli.rb deleted file mode 100644 index e801935bf549e..0000000000000 --- a/Formula/m-cli.rb +++ /dev/null @@ -1,34 +0,0 @@ -class MCli < Formula - desc "Swiss Army Knife for macOS" - homepage "https://github.com/rgcr/m-cli" - url "https://github.com/rgcr/m-cli/archive/v0.2.5.tar.gz" - sha256 "91ed60091c27c6585018484bd4851acf3ff81bbf5c916f85c95ece11788b4324" - license "MIT" - head "https://github.com/rgcr/m-cli.git" - - bottle :unneeded - - def install - prefix.install Dir["*"] - inreplace prefix/"m" do |s| - # Use absolute rather than relative path to plugins. - s.gsub! /^\[ -L.*|^\s+\|\| pushd.*|^popd.*/, "" - s.gsub! /MPATH=.*/, "MPATH=#{prefix}" - # Disable options "update" && "uninstall", they must be handled by brew - s.gsub! /update_mcli &&.*/, "printf \"Try: brew update && brew upgrade m-cli \\n\" && exit 0" - s.gsub! /uninstall_mcli &&.*/, "printf \"Try: brew uninstall m-cli \\n\" && exit 0" - end - - bin.install_symlink "#{prefix}/m" => "m" - bash_completion.install prefix/"completion/bash/m" - zsh_completion.install prefix/"completion/zsh/_m" - fish_completion.install prefix/"completion/fish/m.fish" - end - - test do - output = pipe_output("#{bin}/m help 2>&1") - assert_no_match /.*No such file or directory.*/, output - assert_no_match /.*command not found.*/, output - assert_match /.*Swiss Army Knife for macOS.*/, output - end -end diff --git a/Formula/m/m-cli.rb b/Formula/m/m-cli.rb new file mode 100644 index 0000000000000..6a1748d5e837e --- /dev/null +++ b/Formula/m/m-cli.rb @@ -0,0 +1,48 @@ +class MCli < Formula + desc "Swiss Army Knife for macOS" + homepage "https://github.com/rgcr/m-cli" + url "https://github.com/rgcr/m-cli/archive/refs/tags/v0.3.0.tar.gz" + sha256 "623be61aebf074754b148e725933aebe205fbf2d7d2ea3854a8aa6054ea3307e" + license "MIT" + head "https://github.com/rgcr/m-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6c34603cd51adaa1e6dabc3c9ca533b2b72e2eb2a0626ecbac725b04428a4f7e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "16476d5b167268a327662d0aa26bf9c46aaf41bba5b08527f862b9ef2ce14034" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dad744034a6378e1cac4bf308ed7b85beab6036667a4e1bed74842f095857ce6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "dad811c6cd0ca58a310fe482101f036bfcfe99e4675bf0682b6736db7e3d8a80" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "57f125ffaf0e6a50c2d820b23921c4d804349a51df9780e00f79f4a41b9e4e39" + sha256 cellar: :any_skip_relocation, sonoma: "effe750906370768f69a1705deff0e41f2eca0f53b9399a0cb3842a222773f51" + sha256 cellar: :any_skip_relocation, ventura: "c19300f8154066b9e1f9fecf8ba3dd0f423bedfd25dd5573b0255bda0f9a635a" + sha256 cellar: :any_skip_relocation, monterey: "a2def96834871cfd7618f2186662afdf5ef52f0c909b19d2d3b98cd4193fbd6d" + sha256 cellar: :any_skip_relocation, big_sur: "5131627ba06d37f0e1512cd3bbc7cda2c696deec07a3495c98974553ba900fa9" + sha256 cellar: :any_skip_relocation, catalina: "5131627ba06d37f0e1512cd3bbc7cda2c696deec07a3495c98974553ba900fa9" + sha256 cellar: :any_skip_relocation, mojave: "5131627ba06d37f0e1512cd3bbc7cda2c696deec07a3495c98974553ba900fa9" + end + + depends_on :macos + + def install + prefix.install Dir["*"] + inreplace prefix/"m" do |s| + # Use absolute rather than relative path to plugins. + s.gsub!(/^\[ -L.*|^\s+\|\| pushd.*|^popd.*/, "") + s.gsub!(/MPATH=.*/, "MPATH=#{prefix}") + # Disable options "update" && "uninstall", they must be handled by brew + s.gsub!(/update_mcli &&.*/, "printf \"Try: brew update && brew upgrade m-cli \\n\" && exit 0") + s.gsub!(/uninstall_mcli &&.*/, "printf \"Try: brew uninstall m-cli \\n\" && exit 0") + end + + bin.install_symlink "#{prefix}/m" => "m" + bash_completion.install prefix/"completion/bash/m" + zsh_completion.install prefix/"completion/zsh/_m" + fish_completion.install prefix/"completion/fish/m.fish" + end + + test do + output = pipe_output("#{bin}/m help 2>&1") + refute_match(/.*No such file or directory.*/, output) + refute_match(/.*command not found.*/, output) + assert_match(/.*Swiss Army Knife for macOS.*/, output) + end +end diff --git a/Formula/m/m1ddc.rb b/Formula/m/m1ddc.rb new file mode 100644 index 0000000000000..917d690d3a9af --- /dev/null +++ b/Formula/m/m1ddc.rb @@ -0,0 +1,33 @@ +class M1ddc < Formula + desc "Control external displays (USB-C/DisplayPort Alt Mode) using DDC/CI on M1 Macs" + homepage "https://github.com/waydabber/m1ddc" + url "https://github.com/waydabber/m1ddc/archive/refs/tags/v1.2.0.tar.gz" + sha256 "d633c06502e650108bb2f581b5db25d2592955fa9a57de7feeae3ed7710c59ca" + license "MIT" + head "https://github.com/waydabber/m1ddc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6c98df1f1bf1c0eda16a07f70a9c2dc539762b08bd0fc1801b38dead4dc96373" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "15f255dfd3bffa355ed5cea88646a647a7cd889070a71f8de30e2f77da35f74e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fd4b3c88cd24a1992cb6eb8fa0c82edc301ef5831de19416cc5691c758b4b03d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8d0636faa4400e20f160adba62245a506f7c087c6f047b9c2f03ce1db4f3863f" + end + + depends_on arch: :arm64 + depends_on macos: :monterey + depends_on :macos + + def install + system "make" + bin.install "m1ddc" + end + + test do + # Ensure helptext is rendered + assert_includes shell_output("#{bin}/m1ddc help", 1), "Controls volume, luminance" + + # Attempt getting maximum luminance (usually 100), + # will return code 1 if a screen can't be found (e.g., in CI) + assert_match(/(\d*)|(Could not find a suitable external display\.)/, pipe_output("#{bin}/m1ddc get luminance")) + end +end diff --git a/Formula/m/m4.rb b/Formula/m/m4.rb new file mode 100644 index 0000000000000..78cf05c855a9b --- /dev/null +++ b/Formula/m/m4.rb @@ -0,0 +1,32 @@ +class M4 < Formula + desc "Macro processing language" + homepage "https://www.gnu.org/software/m4/" + url "https://ftp.gnu.org/gnu/m4/m4-1.4.20.tar.xz" + mirror "https://ftpmirror.gnu.org/m4/m4-1.4.19.tar.xz" + sha256 "e236ea3a1ccf5f6c270b1c4bb60726f371fa49459a8eaaebc90b216b328daf2b" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "80bd9ecaa8798a7db6a2e86acc61089dc31d83e6e9e01495a6a57c3703155f47" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d218aa1dbe24f70c8386a85aa8e95ffa1a4b875e3ce031061ac45541144f8cba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d2542fbf7937c71d36279c65313915039fc083dd831831f7b0a6a88caf0ed936" + sha256 cellar: :any_skip_relocation, sequoia: "72ae6db69f54b605594324fbbd4f2d6f6d3317289518ce698c4de2b806ff1b67" + sha256 cellar: :any_skip_relocation, sonoma: "9c949c70570c40706b0bf864e11ff646866072b59df94bd5a5b381b475a52137" + sha256 cellar: :any_skip_relocation, ventura: "11309d2a93df1a7f3aa467d99e2b7f210c5fd3a720831766d47b62e82a1a4068" + sha256 arm64_linux: "8f051741304b492c0ea6cfc4826839c0076e4ef1e4801cf11573b28c20b1b410" + sha256 x86_64_linux: "5f34f9a110c2abb1b32915cbacf6b9ecaddb2ff2438263047c59bb8636c6c220" + end + + keg_only :provided_by_macos + + 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/m/m68k-elf-binutils.rb b/Formula/m/m68k-elf-binutils.rb new file mode 100644 index 0000000000000..dd606636c1b61 --- /dev/null +++ b/Formula/m/m68k-elf-binutils.rb @@ -0,0 +1,59 @@ +class M68kElfBinutils < Formula + desc "GNU Binutils for m68k-elf cross development" + homepage "https://www.gnu.org/software/binutils/" + url "https://ftp.gnu.org/gnu/binutils/binutils-2.44.tar.bz2" + mirror "https://ftpmirror.gnu.org/binutils/binutils-2.44.tar.bz2" + sha256 "f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_sequoia: "2d13019a91e96df4bec9d103b27bf8e762937caf8f06bd9b3a82593ffc411ee4" + sha256 arm64_sonoma: "0f60c3ff36204622b577350ce4031ce145d4c6c8284245f04de949816702284c" + sha256 arm64_ventura: "a5ed324082026d635a02de4cc13bd7a4295be5d35206473dedbd7a551bff7254" + sha256 sonoma: "02e128023ae78f6353cf68d79e00e92e7bda8ca424f0f6e7dbf0d01e781979b9" + sha256 ventura: "b138ddd64a69bb9a42a5c5e76c3223365f3b23b3e282fba0df09feaa6b5fc5a4" + sha256 arm64_linux: "2ebde00a78fe1ae79422738253647d1142850bc58467376a99a971842460b4b5" + sha256 x86_64_linux: "8f2c362af5db10ad9e8aa38efbe0cb2440231d73747f54a2c3f48f49cff52277" + 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 = "m68k-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 <<~M68K + .section .text + .globl _start + _start: + move.b #42, d0 + move.b #42, d1 + M68K + + system bin/"m68k-elf-as", "-o", "test-s.o", "test-s.s" + assert_match "file format elf32-m68k", + shell_output("#{bin}/m68k-elf-objdump -a test-s.o") + assert_match "f()", shell_output("#{bin}/m68k-elf-c++filt _Z1fv") + end +end diff --git a/Formula/m/m68k-elf-gcc.rb b/Formula/m/m68k-elf-gcc.rb new file mode 100644 index 0000000000000..8ea0165807b6f --- /dev/null +++ b/Formula/m/m68k-elf-gcc.rb @@ -0,0 +1,70 @@ +class M68kElfGcc < Formula + desc "GNU compiler collection m68k-elf" + homepage "https://gcc.gnu.org/" + url "https://ftp.gnu.org/gnu/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + mirror "https://ftpmirror.gnu.org/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + sha256 "e2b09ec21660f01fecffb715e0120265216943f038d0e48a9868713e54f06cea" + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + + livecheck do + formula "gcc" + end + + bottle do + sha256 arm64_sequoia: "0cdf924191056c6e031693917100611ee49822804e0e79f8e0f50b4c56e269bc" + sha256 arm64_sonoma: "0d4302073e264000fb12a3d29ec231da28d65dbe66c3a8d36c9fb44e6b7aff09" + sha256 arm64_ventura: "84d996e6f45cf1aafc3b0cbb4469f83dbfb30d56283223f9013469ce45d246ad" + sha256 sonoma: "fdb5f77a76a5906c161da0f582e25353f137d2b5499f8d8a4a0e69a469352218" + sha256 ventura: "ec5d0f17e32bba4373b493b15a6a85432d9fb3a8e8e8f747cdbd38543aad9805" + sha256 arm64_linux: "6fc90bc1eafa40db0a8093ee45df2833e1475c7ae60ac6e6288846d67a0bc459" + sha256 x86_64_linux: "4956d94e592faccc5b4008fda4ea7a1387cc8ca8c1d4255d6aeff582fbe6f9c0" + end + + depends_on "gmp" + depends_on "isl" + depends_on "libmpc" + depends_on "m68k-elf-binutils" + depends_on "mpfr" + depends_on "zstd" + + uses_from_macos "zlib" + + def install + target = "m68k-elf" + mkdir "m68k-elf-build" do + system "../configure", "--target=#{target}", + "--prefix=#{prefix}", + "--infodir=#{info}/#{target}", + "--disable-nls", + "--without-headers", + "--with-as=#{Formula["m68k-elf-binutils"].bin}/m68k-elf-as", + "--with-ld=#{Formula["m68k-elf-binutils"].bin}/m68k-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/"m68k-elf-gcc", "-c", "-o", "test-c.o", "test-c.c" + assert_match "file format elf32-m68k", + shell_output("#{Formula["m68k-elf-binutils"].bin}/m68k-elf-objdump -a test-c.o") + end +end diff --git a/Formula/m/mabel.rb b/Formula/m/mabel.rb new file mode 100644 index 0000000000000..c1e2862202377 --- /dev/null +++ b/Formula/m/mabel.rb @@ -0,0 +1,50 @@ +class Mabel < Formula + desc "Fancy BitTorrent client for the terminal" + homepage "https://github.com/smmr-software/mabel" + url "https://github.com/smmr-software/mabel.git", + tag: "v0.1.7", + revision: "1e74a44f69ce86a0ada6d162c0dabcf2ad3c5077" + license "GPL-3.0-or-later" + head "https://github.com/smmr-software/mabel.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1dd81700a7baedc7bca0ec9daa263464c693f57f56cdcbb57e2def3449207e01" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7bf38463d084fe08c99e94d6db50a410bba56792550bacb94e360246eba52620" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d9a2e1ca4eafe45d6cc7a28fe77631cc32dffaf3d766f4991cb467fd21ae531" + sha256 cellar: :any_skip_relocation, arm64_monterey: "633e0d76b3a7368f5c84544996dca69a93e8c0e3a0a0646f4123629e027d8fba" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5411828b95a20f7b4b0364b10edf02fe510da922fde1bb014f1b2ed2e6f01603" + sha256 cellar: :any_skip_relocation, sonoma: "aa4371cca2ceb58486dd3a0c57e4952a8448f749c6c0657aaade9287dacf66b4" + sha256 cellar: :any_skip_relocation, ventura: "d716d6bc90d55927c92b18046ef89baf4f13dc24c3419c22e288384784c3e8d6" + sha256 cellar: :any_skip_relocation, monterey: "0f44e456ff3baaf737ccc551b9d35f9861b8bc9167bf07e4fbf9cf8685932bf8" + sha256 cellar: :any_skip_relocation, big_sur: "6844db2f3fdffac755f626c6875b5f06eb80ea389dd7d2ff67d685ba50a88325" + sha256 cellar: :any_skip_relocation, arm64_linux: "e510772573fb47351b50ae37138a50e34b9ef23e735f5848e573c1d8b7a880de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2924f4b5c702e64acc23bd090f4897e06d83473711921aed113391b7fb9e0bcb" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{Utils.git_head} + -X main.builtBy=#{tap.user} + -X main.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + vrsn_out = shell_output("#{bin}/mabel --version") + assert_match "Mabel #{version}", vrsn_out + assert_match "Built by: #{tap.user}", vrsn_out + + trnt_out = shell_output("#{bin}/mabel 'test.torrent' 2>&1", 1) + error_message = if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + "open /dev/tty: no such device or address" + else + "open test.torrent: no such file or directory" + end + assert_match error_message, trnt_out + end +end diff --git a/Formula/m/mac-robber.rb b/Formula/m/mac-robber.rb new file mode 100644 index 0000000000000..4ea71fbe74d3e --- /dev/null +++ b/Formula/m/mac-robber.rb @@ -0,0 +1,31 @@ +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" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "872680f432b3c3542cf35f30795d0bb9cf0e03c12aacd2522644d0c2f56f2e4a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "857246f4d354a3df452fd928e59e15667f3e713928c1da2fd207e3163892ffdb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3a95d6147c4806004b72f8dc70e77a4d3bcb4697dbf991193289facbf4d7b296" + sha256 cellar: :any_skip_relocation, arm64_monterey: "79d32b7d6cea8d48155f51c6f95ac062b0f905ccc2538b07674118a23371807e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3b884509ff648339c4d66a27fff082ac80b7762c831ae9aa5599419c68d86cfd" + sha256 cellar: :any_skip_relocation, sonoma: "224025cbdd0d6d77a208e36caf9f375b760038101f242d5bc0d0e1bf077a6d25" + sha256 cellar: :any_skip_relocation, ventura: "5e6711eddd41368e2988dc8d834e0ff2470d9de53576bbb3a9ee757757f4a190" + sha256 cellar: :any_skip_relocation, monterey: "9a0cd671a8a723dc4a8207cfc7e5f08628d2cadda34debd8554a92beb3ad2ed5" + sha256 cellar: :any_skip_relocation, big_sur: "0cba6aa1a9eeca9b46559e0592b2b667d84d99f344781bce1b994aa5ad7a6e05" + sha256 cellar: :any_skip_relocation, catalina: "cb1d422835804b5ea784a2b9157ae77a0940902771397b235d4ad784b88f961a" + sha256 cellar: :any_skip_relocation, mojave: "e1fc7f112efeac70ca2583db78ad6436d5f6615a9959889f3e4c695aa72a27e8" + sha256 cellar: :any_skip_relocation, high_sierra: "20c99447899b82d2da937aa81a0b3afd2c865f67a97d2ca1183e01151fef9de0" + sha256 cellar: :any_skip_relocation, sierra: "160983c4988cb22bd68a0beeb48de91a8af3461722a42e65e523c4a6af08f444" + sha256 cellar: :any_skip_relocation, el_capitan: "0647670a38eb3ae5d8085ad1126f8d70b6e9ac99b086c0ec2f3301ac51ecdb3f" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1de023a55e034e053a0b9def5895de322fb65c50bbed184391cb1d7e98f877b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac53384d4cfcdf2b78d8abc6e8882ce7e6efd95304a9f09895a9e8a6108a4a9a" + end + + def install + system "make", "CC=#{ENV.cc}", "GCC_OPT=#{ENV.cflags}" + bin.install "mac-robber" + end +end diff --git a/Formula/m/mac.rb b/Formula/m/mac.rb new file mode 100644 index 0000000000000..3ef2f3ad37a47 --- /dev/null +++ b/Formula/m/mac.rb @@ -0,0 +1,41 @@ +class Mac < Formula + desc "Monkey's Audio lossless codec" + homepage "https://www.monkeysaudio.com/" + url "https://monkeysaudio.com/files/MAC_1110_SDK.zip" + version "11.10" + sha256 "fe6f481e15eb03e0d4e0f8144a4fd1aff4398c77c419ff36aec99e807b38a54c" + license "BSD-3-Clause" + + livecheck do + url "https://www.monkeysaudio.com/versionhistory.html" + regex(%r{Version\s+(.*)\s+\(.*\)
}i) + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_sequoia: "1a28e1060c1e6d8c7bfbfd5b9ff29824999313a5eca8c64b3a59a5fe6a6eceed" + sha256 cellar: :any, arm64_sonoma: "9455b4f32c8a08bafce683674d6ad6c2f4ea03f0dc6b505654b307d97a20581d" + sha256 cellar: :any, arm64_ventura: "1ae807cabcfc1019390293032251dc89eddaba94234e575e1ce69f5940b1b052" + sha256 cellar: :any, sonoma: "44f4599deecb2327079d5f90e0c9282956f1576eaaae3550f81f435e57519112" + sha256 cellar: :any, ventura: "bc4a5536617910ba0ee64c79e5a733b0aec1aa943c68a35409641fff9f879248" + sha256 cellar: :any_skip_relocation, arm64_linux: "6649cc3d8da73a30b57b8adb05321d90f3717693e93d5c19f8eeec8a82854d98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c5de0aaca2f22685bf39cc889e903f445f9d0359669d7781d0e3c5dd9834b18" + 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/"mac", test_fixtures("test.wav"), "test.ape", "-c2000" + system bin/"mac", "test.ape", "-V" + system bin/"mac", "test.ape", "test.wav", "-d" + assert_equal Digest::SHA256.hexdigest(test_fixtures("test.wav").read), + Digest::SHA256.hexdigest((testpath/"test.wav").read) + end +end diff --git a/Formula/m/macchina.rb b/Formula/m/macchina.rb new file mode 100644 index 0000000000000..790ce7ca8470e --- /dev/null +++ b/Formula/m/macchina.rb @@ -0,0 +1,29 @@ +class Macchina < Formula + desc "System information fetcher, with an emphasis on performance and minimalism" + homepage "https://github.com/Macchina-CLI/macchina" + url "https://github.com/Macchina-CLI/macchina/archive/refs/tags/v6.4.0.tar.gz" + sha256 "edd7591565f199c1365420655a144507bcd2838aed09b79fefdc8b661180432f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7ced4610d20e2d1279ae391a02ef966e22984dc0bf615b6341b9672a45d2d0f0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e8e972a287563d557df33bfeee21eb54fb2bd13ae2399ed0451e6381aad554b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0edf9f8eb64c603d3d2a173a0d933902ace99b500e16c8a3cd7daec854703232" + sha256 cellar: :any_skip_relocation, sonoma: "922e43abc17df8b48ffa744fd346f50f60754ea4abb2a5b82703b94686f91620" + sha256 cellar: :any_skip_relocation, ventura: "d544f58c1d3f84ab87fded15c43ee4deb67e18c3f2a3d81e40919875a795942a" + sha256 cellar: :any_skip_relocation, arm64_linux: "5597f411de344cdc7261ae72f1262dd5c9f0aa02201d76fc2e0d95adc75106ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2dee8bb6fa398bbe5e7ed7dc13dbf811d9511a131a9ec678aa487b323e2528b" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match "We've collected a total of 19 readouts", shell_output("#{bin}/macchina --doctor") + + assert_match version.to_s, shell_output("#{bin}/macchina --version") + end +end diff --git a/Formula/m/mackup.rb b/Formula/m/mackup.rb new file mode 100644 index 0000000000000..40552bffbadab --- /dev/null +++ b/Formula/m/mackup.rb @@ -0,0 +1,29 @@ +class Mackup < Formula + include Language::Python::Virtualenv + + desc "Keep your Mac's application settings in sync" + homepage "https://github.com/lra/mackup" + url "https://files.pythonhosted.org/packages/c9/80/3c0f1755c612f32a215b2ebc8a2669a9b7f78d2ada58bbf1002d94601c79/mackup-0.8.43.tar.gz" + sha256 "22bb21412dfee660a5ec2ef018b95302eb72635cf45b04cbc7f53364de24ed54" + license "GPL-3.0-or-later" + head "https://github.com/lra/mackup.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f0d80fa9efb59208a386293d95384f3440291ba11121fc43dd4c69707b515fce" + end + + depends_on "python@3.13" + + resource "docopt-ng" do + url "https://files.pythonhosted.org/packages/e4/50/8d6806cf13138127692ae6ff79ddeb4e25eb3b0bcc3c1bd033e7e04531a9/docopt_ng-0.9.0.tar.gz" + sha256 "91c6da10b5bb6f2e9e25345829fb8278c78af019f6fc40887ad49b060483b1d7" + end + + def install + virtualenv_install_with_resources + end + + test do + system bin/"mackup", "--help" + end +end diff --git a/Formula/m/maclaunch.rb b/Formula/m/maclaunch.rb new file mode 100644 index 0000000000000..aab01d4eb7ba2 --- /dev/null +++ b/Formula/m/maclaunch.rb @@ -0,0 +1,21 @@ +class Maclaunch < Formula + desc "Manage your macOS startup items" + homepage "https://github.com/hazcod/maclaunch" + url "https://github.com/hazcod/maclaunch/archive/refs/tags/2.5.tar.gz" + sha256 "b2d5f8669cd2c09096759f6472db4c8c50a3abf90581e6d629f7c5128bbfa88c" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "e2e8116deaaa5e73abcb0d97dedb8d6b708b0b7cfdab81edc35c885db833522b" + end + depends_on :macos + + def install + bin.install "maclaunch.sh" => "maclaunch" + end + + test do + system bin/"maclaunch", "list" + end +end diff --git a/Formula/m/macmon.rb b/Formula/m/macmon.rb new file mode 100644 index 0000000000000..838836e3f5f6d --- /dev/null +++ b/Formula/m/macmon.rb @@ -0,0 +1,27 @@ +class Macmon < Formula + desc "Sudoless performance monitoring for Apple Silicon processors" + homepage "https://github.com/vladkens/macmon" + url "https://github.com/vladkens/macmon/archive/refs/tags/v0.6.0.tar.gz" + sha256 "791336207740ff2e2f5494ebd9250e45eea57c4aa496a9255ecde7b2518fb712" + license "MIT" + head "https://github.com/vladkens/macmon.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86c4a08eb9ef5a4dc0d03f4f8d042ceed0757406e901d9121d6d7965743ade58" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "53b56d5b51966957a43c9899dfbb766e623fdf43021d59147bb047d22052daf8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cb50d512e081d21d590426196c8e5de0a95d0b8ed70933a548acfefa532a2adc" + end + + depends_on "rust" => :build + depends_on arch: :arm64 + depends_on :macos + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/macmon --version") + assert_match "Failed to get channels", shell_output("#{bin}/macmon debug 2>&1", 1) + end +end diff --git a/Formula/m/macos-term-size.rb b/Formula/m/macos-term-size.rb new file mode 100644 index 0000000000000..8baa3698464c3 --- /dev/null +++ b/Formula/m/macos-term-size.rb @@ -0,0 +1,36 @@ +class MacosTermSize < Formula + desc "Get the terminal window size on macOS" + homepage "https://github.com/sindresorhus/macos-term-size" + url "https://github.com/sindresorhus/macos-term-size/archive/refs/tags/v1.0.0.tar.gz" + sha256 "5ec39d49a461e4495f20660609276b0630ef245bf8eb80c8447c090a5fefda3c" + license "MIT" + head "https://github.com/sindresorhus/macos-term-size.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "08a0e517feb1a5fea5bb36871b5d3abbe781978e11e458574e92041f4cd07042" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3424acd9de93f00406b4a94e2320a01169a092704c8ab9c66e23f230979c9ff1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6bc40ca23b802dbca1e7895f476a61f62cabbd2ee4b149028cf7e9a57b1ee1cd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f44cab0d2907e1fe48658f15eb8719e2df21e904df6b00ccd69b3dda4be38752" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0d921643767d4c489f435e467e0f5bd9d50a1f8a93ccf2be116eb6987af36d86" + sha256 cellar: :any_skip_relocation, sonoma: "2876bb5510a2d431e9b6097223a224b8fd4a7239d7bf0d312d5b2935d0598b93" + sha256 cellar: :any_skip_relocation, ventura: "34b5f31903d75d3524c533e43a4edcdd5501d0fb93ea7c09e0ea3e7b4dc27f13" + sha256 cellar: :any_skip_relocation, monterey: "c9171245cbf3ba0231147e961ae6cb2e4d8e13a8c7abc64bad1a0e57a4274efb" + sha256 cellar: :any_skip_relocation, big_sur: "a19d9785c6b4d8ccf231187d4042174a0c70ce7cb81733880c01d5a24329d31d" + sha256 cellar: :any_skip_relocation, catalina: "c5134e35cdce944ea758f7d9a0b3275924bc1b323c42685835afea6646f07d85" + sha256 cellar: :any_skip_relocation, mojave: "37ad145efc846c8cad42a969a4ccfb74c8f18462f776414c852346f4c6c37c07" + end + + depends_on :macos + + def install + # https://github.com/sindresorhus/macos-term-size/blob/main/build#L6 + system ENV.cc, "-std=c99", "term-size.c", "-o", "term-size" + bin.install "term-size" + end + + test do + require "pty" + out, = PTY.spawn(bin/"term-size") + assert_match(/\d+\s+\d+/, out.read.chomp) + end +end diff --git a/Formula/m/macos-trash.rb b/Formula/m/macos-trash.rb new file mode 100644 index 0000000000000..d8f62a74d3cdf --- /dev/null +++ b/Formula/m/macos-trash.rb @@ -0,0 +1,30 @@ +class MacosTrash < Formula + desc "Move files and folders to the trash" + homepage "https://github.com/sindresorhus/macos-trash" + url "https://github.com/sindresorhus/macos-trash/archive/refs/tags/v2.0.0.tar.gz" + sha256 "95eeea2a96e5d989145da4697206062798b9f708101dc426ae5a489969619114" + license "MIT" + head "https://github.com/sindresorhus/macos-trash.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d2428e281cfd65f72086b510be7e425635e855f4fda1d272964c30b5253a9df4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8aff9fa300a5df44f6659bfc66c7976e79b8e3aee583c22148ee50062517b281" + sha256 cellar: :any_skip_relocation, sonoma: "240b1bf992d89a5b41c1f5346188c5059bd5b2ed0ba8c475f7a02310cc299e31" + end + + keg_only :shadowed_by_macos + + depends_on xcode: ["16.0", :build] + depends_on :macos + uses_from_macos "swift", since: :sonoma # Swift 6.0 + + def install + system "swift", "build", "--disable-sandbox", "-c", "release" + bin.install ".build/release/trash" + end + + test do + assert_match version.to_s, shell_output("#{bin}/trash --version") + system bin/"trash", "--help" + end +end diff --git a/Formula/m/macosvpn.rb b/Formula/m/macosvpn.rb new file mode 100644 index 0000000000000..e34a75775d3de --- /dev/null +++ b/Formula/m/macosvpn.rb @@ -0,0 +1,37 @@ +class Macosvpn < Formula + desc "Create Mac OS VPNs programmatically" + homepage "https://github.com/halo/macosvpn" + url "https://github.com/halo/macosvpn/archive/refs/tags/2.0.0.tar.gz" + sha256 "bf91fad369d616907d675be39de7d0c6a78ac0a8c184b59c0af2b6b4a722ca74" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7ac4947917a99f3fd96ac3a81a6dbe18be590d25df2bfef024dd0c3e564e9b1b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "35c57637ae70f1265c5cc8df4f370e89eb5fcc441bda03ce4c6b3c294d498899" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ba041bd58d4f5a2c58e25ba148a1e9381e0c1f9144661f3f0c0e039f0140c993" + sha256 cellar: :any_skip_relocation, arm64_monterey: "05556552fac0910a7f96aa82a60d84fb81269399183eb1c44262536eb898fd9f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ca5acfb04df29355633ded3a1c63b35e6c8f2cf63f0f76b065b35e3cad76e319" + sha256 cellar: :any_skip_relocation, sonoma: "c921fa16adaf91069156266afc6930ebc2dbd580e3653b099336e0154e7a2e3f" + sha256 cellar: :any_skip_relocation, ventura: "4bef08a42e37828e824db81873a433b47843e64ffeaba297fd0a190d9bbe2301" + sha256 cellar: :any_skip_relocation, monterey: "e0a039a15c681f44320e6cefc8d2b87f035ec25aabb5919adbc65656889d95c0" + sha256 cellar: :any_skip_relocation, big_sur: "8a85ae6d100ebe8ce596b3c430784083c4bfec7b833c8abb630b5838faaec8b9" + sha256 cellar: :any_skip_relocation, catalina: "a23588080999163bfe86a43034b4caa6bfc09c5ab6dde3a4cf09ba6c6d5c1209" + end + + depends_on xcode: ["11.1", :build] + depends_on :macos + + def install + xcodebuild "-arch", Hardware::CPU.arch, "SYMROOT=build" + bin.install "build/Release/macosvpn" + end + + test do + assert_match version.to_s, shell_output("#{bin}/macosvpn version", 2) + end +end diff --git a/Formula/m/macpine.rb b/Formula/m/macpine.rb new file mode 100644 index 0000000000000..b84275307e9f7 --- /dev/null +++ b/Formula/m/macpine.rb @@ -0,0 +1,50 @@ +class Macpine < Formula + desc "Lightweight Linux VMs on MacOS" + homepage "https://beringresearch.github.io/macpine/" + url "https://github.com/beringresearch/macpine/archive/refs/tags/v1.1.0.tar.gz" + sha256 "51ec817e933eb43f5c7524b1faa339d84e8d25b6b52e2b5e4b05f8f82b09d45e" + license "Apache-2.0" + head "https://github.com/beringresearch/macpine.git", branch: "main" + + livecheck do + url :stable + regex(/^v?\.?(\d+(?:\.\d+)*)$/i) + strategy :git do |tags, regex| + tags.map do |tag| + version = tag[regex, 1] + next if version.blank? + + # Naively convert tags like `v.01` to `0.1` + tag.match?(/^v\.?\d+$/i) ? version.chars.join(".") : version + end + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e93c3ad2fff32d4d7010b2d1fda57f8b82abc315ad3254ae6594f26675957ca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c6b779505c84d4e020509ba403ae177f2ffaff724fb3063267ec0210489de1f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1abb05be29c2bbb93893609746f930cdccceb6cc4750a0bddfe4f0a96e7749dd" + sha256 cellar: :any_skip_relocation, sonoma: "49a57dd39d01b3240bcff7b240fe1a07ff27e3c6d95477fc81e371fed2830a22" + sha256 cellar: :any_skip_relocation, ventura: "3dbd19039af3a51ef87df80ec743a53b418c77de5c4b64cfa0641aadfe2da763" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65e300e8f2fa926f1b69e8fd63c1449444614d7b9ba88a58c50f31959fb40668" + end + + depends_on "go" => :build + depends_on "qemu" + + conflicts_with "alpine", because: "both install `alpine` binaries" + + def install + system "make", "install", "PREFIX=#{prefix}" + generate_completions_from_executable(bin/"alpine", "completion") + end + + service do + run macos: [opt_bin/"alpine", "start", "+launchctl-autostart"] + environment_variables PATH: std_service_path_env + end + + test do + assert_match "NAME STATUS SSH PORTS ARCH PID TAGS \n", shell_output("#{bin}/alpine list") + end +end diff --git a/Formula/m/mactop.rb b/Formula/m/mactop.rb new file mode 100644 index 0000000000000..8c78b6e5a9bd2 --- /dev/null +++ b/Formula/m/mactop.rb @@ -0,0 +1,34 @@ +class Mactop < Formula + desc "Apple Silicon Monitor Top written in Golang" + homepage "https://github.com/context-labs/mactop" + url "https://github.com/context-labs/mactop/archive/refs/tags/v0.2.3.tar.gz" + sha256 "37bc8567f66d31b0cbcdd7b39deee3fd0155cffbe65daba53044cbcd69d5dbfd" + license "MIT" + head "https://github.com/context-labs/mactop.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd7f16331f6a5bfab13fc8fc33ca1abc815409a7ab59317b75aa797c16e7897f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "764a410ff884d3dfec56671f410c8134b69c76faa6e2bfd864a3f30be4476dea" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bf7d1feea9cb49fde8e6f9d3b4675c49ea78dfdd5eeb8e6857fd448e643d85e7" + end + + depends_on "go" => :build + depends_on arch: :arm64 + depends_on :macos + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + def caveats + <<~EOS + mactop requires root privileges, so you will need to run `sudo mactop`. + You should be certain that you trust any software you grant root privileges. + EOS + end + + test do + test_input = "This is a test input for brew" + assert_match "Test input received: #{test_input}", shell_output("#{bin}/mactop --test '#{test_input}'") + end +end diff --git a/Formula/m/macvim.rb b/Formula/m/macvim.rb new file mode 100644 index 0000000000000..02b069e9ceb43 --- /dev/null +++ b/Formula/m/macvim.rb @@ -0,0 +1,103 @@ +# 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/refs/tags/release-181.tar.gz" + version "9.1.1128" + sha256 "ee4127ff18f55f04b69e401fc444c94b9e4d2bf60580ed18e85b78f2e34efbd3" + license "Vim" + head "https://github.com/macvim-dev/macvim.git", branch: "master" + + # The stable Git tags use a `release-123` format and it's necessary to check + # the GitHub release description to identify the Vim version from the + # "Updated to Vim 1.2.3456" text. + livecheck do + url :stable + regex(/Updated\s+to\s+Vim\s+v?(\d+(?:\.\d+)+)/i) + strategy :github_latest do |json, regex| + match = json["body"]&.match(regex) + next if match.blank? + + match[1] + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "7eed55dfdd99df0050437af8528d20382f13760845ae638f1bf505a415a3bfa3" + sha256 cellar: :any, arm64_sonoma: "55fe4b8cd65abdae6855028c63607cde1a7d85e3a47de4673ced52abbb65128b" + sha256 cellar: :any, arm64_ventura: "17523b2cee9b5c9de657016799262bf547c1c8eb2cf20bac7169691490fc2c91" + sha256 cellar: :any, sonoma: "2be24658c5b61ed7f725cc952b0a75b02c5fa53701921aec00af563f829089c5" + sha256 cellar: :any, ventura: "848643f8227520cbc1f619dff734d8e3521568d4b2dd275edf98029761bb1760" + end + + depends_on "gettext" => :build + depends_on "libsodium" => :build + depends_on xcode: :build # for xcodebuild + depends_on "cscope" + depends_on "lua" + depends_on :macos + depends_on "python@3.13" + depends_on "ruby" + + conflicts_with "ex-vi", because: "both install `vi` and `view` binaries" + conflicts_with "vim", because: "both install vi* binaries" + conflicts_with cask: "macvim" + + def install + # Avoid issues finding Ruby headers + ENV.delete("SDKROOT") + + # MacVim doesn't have or require any Python package, so unset PYTHONPATH + ENV.delete("PYTHONPATH") + + # We don't want the deployment target to include the minor version on Big Sur and newer. + # https://github.com/Homebrew/homebrew-core/issues/111693 + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version + + # make sure that CC is set to "clang" + ENV.clang + + system "./configure", "--with-features=huge", + "--enable-multibyte", + "--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", + "--disable-sparkle", + "--with-macarchs=#{Hardware::CPU.arch}" + system "make" + + prefix.install "src/MacVim/build/Release/MacVim.app" + %w[gvimtutor mvim vimtutor xxd].each { |e| bin.install_symlink prefix/"MacVim.app/Contents/bin/#{e}" } + + # 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 + assert_match "+gettext", output + assert_match "+sodium", output + + # Simple test to check if MacVim was linked to Homebrew's Python 3 + py3_exec_prefix = shell_output(Formula["python@3.13"].opt_libexec/"bin/python-config --exec-prefix") + assert_match py3_exec_prefix.chomp, output + (testpath/"commands.vim").write <<~VIM + :python3 import vim; vim.current.buffer[0] = 'hello python3' + :wq + VIM + 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/m/mad.rb b/Formula/m/mad.rb new file mode 100644 index 0000000000000..a9645d449df5b --- /dev/null +++ b/Formula/m/mad.rb @@ -0,0 +1,67 @@ +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" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/libmad[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t}i) + end + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "1facd8abee7e62bba7c7e445d2cbc5900dfe2dc7903be43a40b128c68f519b02" + sha256 cellar: :any, arm64_sonoma: "ccc2d73926af48cbc320bbe9d029a8d7043c6a8b3375cecc5d9d031cee83b245" + sha256 cellar: :any, arm64_ventura: "9d6ef63d6de6de6a1fecf34c3f5be58952ca778829c93df51e4ec491b97b0fa3" + sha256 cellar: :any, arm64_monterey: "e6a54111ab617580c360bfa07c8503cddf52b1df5bda2cd51da086e4e9470223" + sha256 cellar: :any, arm64_big_sur: "ee9a37f6202a784c1564ac92613821e9bfd0f75fca8ef24262e444e5ec424ca6" + sha256 cellar: :any, sonoma: "fd9ab67d8f1b77a62a47b0308eb0b9275f331162079de54b600f7226638c8145" + sha256 cellar: :any, ventura: "435f04d35968bb228b0f9078190f5895d90d5a46db66d5731b02cf916b1014a3" + sha256 cellar: :any, monterey: "912da077a9ff47e8e0b19ed160646c8a365e448b81786fbc2f64a2813c8d6b33" + sha256 cellar: :any, big_sur: "0ad06329f73d5dc15cba262feca6e1c582e10ad3b9ca0476e46c37e6d878d0ab" + sha256 cellar: :any, catalina: "5416172dc7ccd3c5a5065b3f7dc18c00e83a7e20dfc6b09e0586afc4a76c5722" + sha256 cellar: :any, mojave: "5baadb23763805521d306268861ff82fe2055da1eb7976aaa7c78f83d3c2f43a" + sha256 cellar: :any_skip_relocation, arm64_linux: "668e0c8d4351150999731a1dd2072f503ac4fac27e6e215df78a795743535260" + sha256 cellar: :any_skip_relocation, x86_64_linux: "05670a88d2d0a50d03407a39987c573806c8bf9b7d67f2df4db3d121328123ae" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + touch "NEWS" + touch "AUTHORS" + touch "ChangeLog" + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", "--disable-debugging", "--enable-fpm=64bit", *std_configure_args + system "make", "CFLAGS=#{ENV.cflags}", "LDFLAGS=#{ENV.ldflags}", "install" + (lib+"pkgconfig/mad.pc").write pc_file + pkgshare.install "minimad.c" + end + + test do + system ENV.cc, "-I#{include}", pkgshare/"minimad.c", "-L#{lib}", "-lmad", "-o", "minimad" + system "./minimad <#{test_fixtures("test.mp3")} >test.wav" + assert_equal 4608, (testpath/"test.wav").size? + 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/m/madplay.rb b/Formula/m/madplay.rb new file mode 100644 index 0000000000000..834231e9e1166 --- /dev/null +++ b/Formula/m/madplay.rb @@ -0,0 +1,50 @@ +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" + license "GPL-2.0-or-later" + revision 3 + + livecheck do + url :stable + regex(%r{url=.*?/madplay[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t}i) + end + + bottle do + sha256 arm64_sequoia: "ba09b6ca2c1a89b49f0df90e4d4330c7271dd39f11d35cf165cb26a9899a6584" + sha256 arm64_sonoma: "bb53d0d999f2179e53c438c9fbcfc1fa57a6dfb0a0e87b144fe8d9f5c91689de" + sha256 arm64_ventura: "544e014609eb4449054c2cb5ec02f550ec5ab3619e48faf881db9b71bf9a390b" + sha256 arm64_monterey: "e66c7d9d05cd323ad4091b07d063ce9ea5d65dd86fbc06e78ac9316522710432" + sha256 sonoma: "719d4a1feb495f2c6f4f4e9e9e00689bdf4c4b21ad54add5d91ba97238fbd687" + sha256 ventura: "3ad559cb2e38b5b0719a29bade20758642ecfd89c1afb724557b65442ca31e65" + sha256 monterey: "0042b125f11f24d15a45f1b231f3ac2e3cda228c67a9ba0ddb1a3f8ceef336bd" + sha256 arm64_linux: "cc83e5325da519f92d3ea70ea21391bb1019435cc38b30fd6b13792e5db35abd" + sha256 x86_64_linux: "dcf38528c7c57f08ecc8e8ec764d8d7a4be39fb7cec6a37320bb5999cc495e17" + 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=x86_64 + ] + + system "./configure", *args + system "make", "install" + end + + test do + system bin/"madplay", "--version" + end +end diff --git a/Formula/m/maeparser.rb b/Formula/m/maeparser.rb new file mode 100644 index 0000000000000..6af240206b0df --- /dev/null +++ b/Formula/m/maeparser.rb @@ -0,0 +1,38 @@ +class Maeparser < Formula + desc "Maestro file parser" + homepage "https://github.com/schrodinger/maeparser" + url "https://github.com/schrodinger/maeparser/archive/refs/tags/v1.3.2.tar.gz" + sha256 "431ae029957534324b59eb3974486f3cad97d06e9bacd88ec94dc598046dfcd3" + license "MIT" + revision 1 + head "https://github.com/schrodinger/maeparser.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4c70a47373e7c2e0e640fa52dc2a8d0dc58c420f176fa47f2279d5aee38e15a8" + sha256 cellar: :any, arm64_sonoma: "f9d519ae0b51e2f22cbfa6c133bb3dc43b1f42bba3f6996edbe218665ce7894e" + sha256 cellar: :any, arm64_ventura: "1f9189fef43fd479e43c02abd49c135a0010fb41c0301e878a3955ef0d638d4c" + sha256 cellar: :any, sonoma: "6abfa8f7ca248db12f5048cc9739d6e4c04a957289ab1f0d1194dfc8ed3b7fe0" + sha256 cellar: :any, ventura: "3e5456a0d0e57249fb9e48f547ebac4ba83dd7ce457837fe18c8f80c4d23bbac" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff0a8d3ddf905b3fd9f516348ae97d49fb470170fa90cd110c9ca70d0d7be464" + sha256 cellar: :any_skip_relocation, x86_64_linux: "41c46db410204afb11ff5c5e3bc29fb3fa148003d5b21619d4576db390e981d1" + end + + depends_on "cmake" => :build + depends_on "boost" + + def install + system "cmake", "-S", ".", "-B", "build", "-DMAEPARSER_BUILD_TESTS=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "test/MainTestSuite.cpp", "test/UsageDemo.cpp", "test/test2.maegz" + end + + test do + cp pkgshare.children, testpath + system ENV.cxx, "-std=c++11", "MainTestSuite.cpp", "UsageDemo.cpp", "-o", "test", + "-DTEST_SAMPLES_PATH=\"#{testpath}\"", "-DBOOST_ALL_DYN_LINK", + "-I#{include}/maeparser", "-L#{lib}", "-lmaeparser", + "-L#{Formula["boost"].opt_lib}", "-lboost_filesystem", "-lboost_unit_test_framework" + system "./test" + end +end diff --git a/Formula/m/mafft.rb b/Formula/m/mafft.rb new file mode 100644 index 0000000000000..d52aa1cea39f2 --- /dev/null +++ b/Formula/m/mafft.rb @@ -0,0 +1,37 @@ +class Mafft < Formula + desc "Multiple alignments with fast Fourier transforms" + homepage "https://mafft.cbrc.jp/alignment/software/" + url "https://gitlab.com/sysimm/mafft.git", + tag: "v7.526", + revision: "ee9799916df6a5d5103d46d54933f8eb6d28e244" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/The latest version is (\d+(?:\.\d+)+)/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "435f07a25b111e3acb645fdb613854e7872c0fa7cb0134a084efcd45f5df5099" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c6bc4e37e3c7e5ee2d37791927eb80e1ab0704029765cfad46d604cd093ab4fa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ad09be10bf7387c18b0ed95d7a3f5a497902299744ef101914e87e4b651cb155" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bf69c5b35b4a713690785897d4543e0bb7e5c92ff580c8e005ae6d258bf1d082" + sha256 cellar: :any_skip_relocation, sonoma: "c2bb12ef558ba26f6f8a4a7c99d9242249cd90131049fb142f33dd3498a48dff" + sha256 cellar: :any_skip_relocation, ventura: "6a8c4efa40ecb9439d1ea9dbcfdccca5ebbfb956d628804e8ec72247c1eec97d" + sha256 cellar: :any_skip_relocation, monterey: "ef1474d6acd018dbabf4d0ba62fbed486c678fe3dcf75df62d8b8a25580895d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "90835e351fa993cae4c7be392839d812ec10c8186ab29833e600322b9ef2cd51" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ee6f5f787b6cb179ae7c08d31b8b3f8be1f0ace537c2c9747bb2645f99df37a5" + end + + 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/m/mage.rb b/Formula/m/mage.rb new file mode 100644 index 0000000000000..facec42a74267 --- /dev/null +++ b/Formula/m/mage.rb @@ -0,0 +1,40 @@ +class Mage < Formula + desc "Make/rake-like build tool using Go" + homepage "https://magefile.org/" + url "https://github.com/magefile/mage.git", + tag: "v1.15.0", + revision: "9e91a03eaa438d0d077aca5654c7757141536a60" + license "Apache-2.0" + head "https://github.com/magefile/mage.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "28b336fab95d06098802501b558552c9d89a4d67fd0eccd3362fbf21588da6bb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "97099907714e6c713ed43d40e4a67ca112a7a9a9d84bfaabb69d680c92db5c68" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d5edee3b01ecc1dc26cf07372e9cbcfd7bc0c6c98ad8f5d89ab6255efe1af28c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d5edee3b01ecc1dc26cf07372e9cbcfd7bc0c6c98ad8f5d89ab6255efe1af28c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d5edee3b01ecc1dc26cf07372e9cbcfd7bc0c6c98ad8f5d89ab6255efe1af28c" + sha256 cellar: :any_skip_relocation, sonoma: "591710efff0b81f7e371a19a1f0cd6bc858975638fa2c99efd53d30688700140" + sha256 cellar: :any_skip_relocation, ventura: "0fe71622f956586e54e08ec69f49dd719c16bca43fe62370720f32e8cb015a71" + sha256 cellar: :any_skip_relocation, monterey: "0fe71622f956586e54e08ec69f49dd719c16bca43fe62370720f32e8cb015a71" + sha256 cellar: :any_skip_relocation, big_sur: "0fe71622f956586e54e08ec69f49dd719c16bca43fe62370720f32e8cb015a71" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed5ea666a4ba52cf7ec5ec2b977b86aa969e88fe071043c257f302be90d01fdd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f4c08f1a7d6d80eeda6054fcdaea66ef2d344a952d9e249561781f8fabe54fff" + end + + depends_on "go" + + def install + ldflags = %W[ + -s -w + -X github.com/magefile/mage/mage.timestamp=#{time.iso8601} + -X github.com/magefile/mage/mage.commitHash=#{Utils.git_short_head} + -X github.com/magefile/mage/mage.gitTag=#{version} + ] + system "go", "build", *std_go_args(ldflags:) + end + + test do + assert_match "magefile.go created", shell_output("#{bin}/mage -init 2>&1") + assert_path_exists testpath/"magefile.go" + end +end diff --git a/Formula/m/magic-wormhole.rb b/Formula/m/magic-wormhole.rb new file mode 100644 index 0000000000000..8bc778fb1449e --- /dev/null +++ b/Formula/m/magic-wormhole.rb @@ -0,0 +1,171 @@ +class MagicWormhole < Formula + include Language::Python::Virtualenv + + desc "Securely transfers data between computers" + homepage "https://github.com/magic-wormhole/magic-wormhole" + url "https://files.pythonhosted.org/packages/18/a5/aa48cfccc9c823678506b27892dbc6f4646ec5474c43676e4f1990efa106/magic-wormhole-0.18.0.tar.gz" + sha256 "66fdee0861ec63ab494560aa1c68ebe3b21e955d0cabd84eadf93013e332852c" + license "MIT" + head "https://github.com/magic-wormhole/magic-wormhole.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e745711c8cbe84fbc091ec9fd6f8faa83f5fcfda96b6f2e3d4a37dbd5257b741" + sha256 cellar: :any, arm64_sonoma: "162ec34aa32ed8a20e74a1677bd32c59b8e48bd21be45b43be9176b417d8ebad" + sha256 cellar: :any, arm64_ventura: "486ff65f25c563874cd1ffd5ed45fd2986b8d12cd10381b44b01df13aa820239" + sha256 cellar: :any, sonoma: "0bda90dd409da246fe2df1e708a8a868d6426b3b69e9cfc5eac2eb09e48d8246" + sha256 cellar: :any, ventura: "3163b1f39f3cf563b372f08e983496766fe5e55face13ae73af7f27c18f6273d" + sha256 cellar: :any_skip_relocation, arm64_linux: "c70fc25eb831ff8663e69d7998a9663da06c9cce3805aac6b2742452dfbcb54d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a07e42aedd93126145047c115948f86cb29c1e0f084fcdb8031c961ed87d2f1f" + end + + depends_on "cryptography" + depends_on "libsodium" + depends_on "python@3.13" + + uses_from_macos "libffi" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/49/7c/fdf464bcc51d23881d110abd74b512a42b3d5d376a55a831b44c603ae17f/attrs-25.1.0.tar.gz" + sha256 "1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e" + end + + resource "autobahn" do + url "https://files.pythonhosted.org/packages/38/f2/8dffb3b709383ba5b47628b0cc4e43e8d12d59eecbddb62cfccac2e7cf6a/autobahn-24.4.2.tar.gz" + sha256 "a2d71ef1b0cf780b6d11f8b205fd2c7749765e65795f2ea7d823796642ee92c9" + end + + resource "automat" do + url "https://files.pythonhosted.org/packages/8d/2d/ede4ad7fc34ab4482389fa3369d304f2fa22e50770af706678f6a332fa82/automat-24.8.1.tar.gz" + sha256 "b34227cf63f6325b8ad2399ede780675083e439b20c323d376373d8ee6306d88" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "constantly" do + url "https://files.pythonhosted.org/packages/4d/6f/cb2a94494ff74aa9528a36c5b1422756330a75a8367bf20bd63171fc324d/constantly-23.10.4.tar.gz" + sha256 "aa92b70a33e2ac0bb33cd745eb61776594dc48764b06c35e0efd050b7f1c7cbd" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/5b/8c/4f2f0784d08a383b5de3d3b1d65a6f204cc5dc487621c91c550388d756af/humanize-4.12.1.tar.gz" + sha256 "1338ba97415c96556758a6e2f65977ed406dddf4620d4c6db9bbdfd07f0f1232" + 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 "iterable-io" do + url "https://files.pythonhosted.org/packages/40/be/27d59b5c1d74ecbd26c1142f84b61d6cb04f0d0337697149645f34406b2d/iterable-io-1.0.0.tar.gz" + sha256 "fb9e1b739587a9ba0d5c60a3e1eb71246761583bc9f18b3c35bb112b44b18c3c" + 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 "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + end + + resource "qrcode" do + url "https://files.pythonhosted.org/packages/d7/db/6fc9631cac1327f609d2c8ae3680ecd987a2e97472437f2de7ead1235156/qrcode-8.0.tar.gz" + sha256 "025ce2b150f7fe4296d116ee9bad455a6643ab4f6e7dce541613a4758cbce347" + 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/32/d2/7b171caf085ba0d40d8391f54e1c75a1cda9255f542becf84575cfd8a732/setuptools-76.0.0.tar.gz" + sha256 "43b4ee60e10b0d0ee98ad11918e114c70701bc6051662a9a675a0496c1a158f4" + end + + resource "spake2" do + url "https://files.pythonhosted.org/packages/c5/4b/32ad65f8ff5c49254e218ccaae8fc16900cfc289954fb372686159ebe315/spake2-0.9.tar.gz" + sha256 "421fc4a8d5ac395af7af0206ffd9e6cdf188c105cb1b883d9d683312bb5a9334" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz" + sha256 "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2" + end + + resource "twisted" do + url "https://files.pythonhosted.org/packages/77/1c/e07af0df31229250ab58a943077e4adbd5e227d9f2ac826920416b3e5fa2/twisted-24.11.0.tar.gz" + sha256 "695d0556d5ec579dcc464d2856b634880ed1319f45b10d19043f2b57eb0115b5" + end + + resource "txaio" do + url "https://files.pythonhosted.org/packages/51/91/bc9fd5aa84703f874dea27313b11fde505d343f3ef3ad702bddbe20bfd6e/txaio-23.1.1.tar.gz" + sha256 "f9a9216e976e5e3246dfd112ad7ad55ca915606b60b84a757ac769bd404ff704" + end + + resource "txtorcon" do + url "https://files.pythonhosted.org/packages/b9/9f/7815b07d8bc775d9578d9131267bb7ce3e91e31305688736ed796ae724d1/txtorcon-24.8.0.tar.gz" + sha256 "befe19138d9c8c5307b6ee6d4fe446d0c201ffd1cc404aeb265ed90309978ad0" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "zipstream-ng" do + url "https://files.pythonhosted.org/packages/ac/16/5d9224baf640214255c34a0a0e9528c8403d2b89e2ba7df9d7cada58beb1/zipstream_ng-1.8.0.tar.gz" + sha256 "b7129d2c15d26934b3e1cb22256593b6bdbd03c553c26f4199a5bf05110642bc" + end + + resource "zope-interface" do + url "https://files.pythonhosted.org/packages/30/93/9210e7606be57a2dfc6277ac97dcc864fd8d39f142ca194fdc186d596fda/zope.interface-7.2.tar.gz" + sha256 "8b49f1a3d1ee4cdaf5b32d2e738362c7f5e40ac8b46dd7d1a65e82a4872728fe" + end + + def install + virtualenv_install_with_resources + man1.install "docs/wormhole.1" + bash_completion.install "wormhole_complete.bash"=> "wormhole" + fish_completion.install "wormhole_complete.fish" => "wormhole.fish" + zsh_completion.install "wormhole_complete.zsh" => "_wormhole" + end + + test do + ENV["LC_ALL"] = "en_US.UTF-8" + n = rand(1e6) + pid = spawn bin/"wormhole", "send", "--code=#{n}-homebrew-test", "--text=foo" + begin + sleep 1 + assert_match "foo\n", shell_output("#{bin}/wormhole receive #{n}-homebrew-test") + ensure + Process.wait(pid) + end + end +end diff --git a/Formula/m/magic-wormhole.rs.rb b/Formula/m/magic-wormhole.rs.rb new file mode 100644 index 0000000000000..4c93082dfa49a --- /dev/null +++ b/Formula/m/magic-wormhole.rs.rb @@ -0,0 +1,39 @@ +class MagicWormholeRs < Formula + desc "Rust implementation of Magic Wormhole, with new features and enhancements" + homepage "https://github.com/magic-wormhole/magic-wormhole.rs" + url "https://github.com/magic-wormhole/magic-wormhole.rs/archive/refs/tags/0.7.6.tar.gz" + sha256 "1d76e80108291f0a31e1a0e2e1d6199decb55bec73bc725baacb93ea0ae06e5e" + license "EUPL-1.2" + head "https://github.com/magic-wormhole/magic-wormhole.rs.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9a058269ba3e3e3c576f06dee4eb6a70314d3c0dd0719d515e6f56e33e111992" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a24e2037972109a21496b081c6fa088bb6b8b25f62f68a809f3a8d072a11560b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "94c8ee7bcc6387c3c52241a68a2477e615d39507720fe119d839b378274b09c8" + sha256 cellar: :any_skip_relocation, sonoma: "d314198a3901d447399ad6ebd117abfec4ab8cd0f54baf6b5b3e9abcfff9175e" + sha256 cellar: :any_skip_relocation, ventura: "9abb33389fee9aa69696240610c279ca352f31288734567abcab358b2d6f5316" + sha256 cellar: :any_skip_relocation, arm64_linux: "a29c5e0d8c9519a3d2ac5e19c27bcdd43cf9541f95a30c9610f71ccdd2fe586f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e782d1de02d84ac02c48447eaa78fca5a60b23d3131d3f661683f2ce41ec734" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + + generate_completions_from_executable(bin/"wormhole-rs", "completion") + end + + test do + n = rand(1e6) + pid = spawn bin/"wormhole-rs", "send", "--code=#{n}-homebrew-test", test_fixtures("test.svg") + begin + sleep 1 + exec bin/"wormhole-rs", "receive", "--noconfirm", "#{n}-homebrew-test" + assert_path_exists testpath/"received.svg" + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/m/magic_enum.rb b/Formula/m/magic_enum.rb new file mode 100644 index 0000000000000..d8e74e65123a4 --- /dev/null +++ b/Formula/m/magic_enum.rb @@ -0,0 +1,41 @@ +class MagicEnum < Formula + desc "Static reflection for enums (to string, from string, iteration) for modern C++" + homepage "https://github.com/Neargye/magic_enum" + url "https://github.com/Neargye/magic_enum/archive/refs/tags/v0.9.7.tar.gz" + sha256 "b403d3dad4ef542fdc3024fa37d3a6cedb4ad33c72e31b6d9bab89dcaf69edf7" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "4522b89be3d394cfd87829cc5ed355bb25ac0a66c38eb2ad4106b8338719e276" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + system "./build/test/test-cpp17" + system "./build/test/test-cpp20" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + + enum class Color : int { RED = -10, BLUE = 0, GREEN = 10 }; + + int main() { + Color c1 = Color::RED; + auto c1_name = magic_enum::enum_name(c1); + std::cout << c1_name << std::endl; + return 0; + } + CPP + + system ENV.cxx, "test.cpp", "-I#{include}/magic_enum", "-std=c++17", "-o", "test" + assert_equal "RED\n", shell_output(testpath/"test") + end +end diff --git a/Formula/m/mago.rb b/Formula/m/mago.rb new file mode 100644 index 0000000000000..a5e5ed880bcfb --- /dev/null +++ b/Formula/m/mago.rb @@ -0,0 +1,40 @@ +class Mago < Formula + desc "Toolchain for PHP to help developers write better code" + homepage "https://github.com/carthage-software/mago" + url "https://github.com/carthage-software/mago/archive/refs/tags/0.23.0.tar.gz" + sha256 "b92206a289c9a862593be5ea6b73dcf043279fe115732fe92f25f9cbc2cad628" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e26e375e9bc199c01e433def7971d56d160989f6abf9b3ef10d6066c74ed5626" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e4f668ce417da71a5bb9abb68ac1e81d2ba055661302cbc1c5ea5f14926e1c4e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d6da15d1ad47314930371de1f2793322e5a50f239598b7d1bb3d767161f99326" + sha256 cellar: :any_skip_relocation, sonoma: "d27cad282d60f2a1def1fa43fd6cb8e98d1ad02abc7ef806f414c2eb316de572" + sha256 cellar: :any_skip_relocation, ventura: "a3eb15a33bd3c377fa844a9ffdd05e90c7c9ecafac73ce1f3020dd7b9a761536" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc337c41ebd864d98210933f082ce568307fd9f9bbf45244bec80a4769c8f2e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "59c66e605bf31dbca5bf9e5a9adac25ee311c4121d4d2839f8fb063260b925df" + 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}/mago --version") + + (testpath/"example.php").write("&1") + assert_match " Missing `declare(strict_types=1);` statement at the beginning of the file", output + + (testpath/"unformatted.php").write("") + system bin/"mago", "fmt" + assert_match " :build + end + + # see https://github.com/Homebrew/homebrew-core/pull/158322 + # https://github.com/Homebrew/homebrew-core/pull/138608 + deprecate! date: "2024-08-03", because: "does not build with 14.1" + + depends_on "hadoop" + depends_on "openjdk@11" + + def install + ENV["JAVA_HOME"] = Language::Java.java_home("11") + + 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", JAVA_HOME: ENV["JAVA_HOME"] + end + + test do + (testpath/"test.csv").write <<~CSV + "x","y" + 0.1234567,0.101201201 + CSV + + assert_match "0.101201201", pipe_output("#{bin}/mahout cat #{testpath}/test.csv") + end +end diff --git a/Formula/m/mailcatcher.rb b/Formula/m/mailcatcher.rb new file mode 100644 index 0000000000000..cba103fa7a4a9 --- /dev/null +++ b/Formula/m/mailcatcher.rb @@ -0,0 +1,215 @@ +class Mailcatcher < Formula + desc "Catches mail and serves it through a dream" + homepage "https://mailcatcher.me/" + url "https://github.com/sj26/mailcatcher/archive/refs/tags/v0.10.0.tar.gz" + sha256 "4cd027e22878342d6a002402306d42ada1f34045cc1d7f35b5a7fa37b944326e" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "42f5b6813789c297bfb3f2cf9867cb89c387124336f78f0b2db31a9490ff8e39" + sha256 cellar: :any, arm64_sonoma: "98688362105e37e7b5642971887ec454fa5953c013c499b7401ec75f1705f6d3" + sha256 cellar: :any, arm64_ventura: "d8947cfeb3b8e095f9e9df810fe9eccb62e1da2e73889fac2e1b60794056655d" + sha256 cellar: :any, sonoma: "65c435eea0ed3421e911b11a64f8cc73c53070b1ae015dbc2523abe62bc1c06c" + sha256 cellar: :any, ventura: "aab17598a1e1836e38c145aaae6777516b92b0163b4deece91839d2c790280b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "3c166212f22ec358d05746d6ca05518198425233c862a414a5fc34319a226b03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "391be8e92219c2ecdb1a9990be909b52d5d45ca818a82ae02953f291aec5649c" + end + + depends_on "pkgconf" => :build + depends_on "libedit" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "ruby" + + uses_from_macos "xz" => :build + uses_from_macos "libffi" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + on_linux do + depends_on "node" => :build + end + + resource "rack" do + url "https://rubygems.org/downloads/rack-2.2.9.gem" + sha256 "fd6301a97a1c1e955e68f85c861fcb1cde6145a32c532e1ea321a72ff8cc4042" + end + + resource "eventmachine" do + url "https://rubygems.org/downloads/eventmachine-1.2.7.gem" + sha256 "994016e42aa041477ba9cff45cbe50de2047f25dd418eba003e84f0d16560972" + end + + resource "daemons" do + url "https://rubygems.org/downloads/daemons-1.4.1.gem" + sha256 "8fc76d76faec669feb5e455d72f35bd4c46dc6735e28c420afb822fac1fa9a1d" + end + + resource "thin" do + url "https://rubygems.org/downloads/thin-1.8.2.gem" + sha256 "1c55251aba5bee7cf6936ea18b048f4d3c74ef810aa5e6906cf6edff0df6e121" + end + + # needed for sqlite + resource "mini_portile2" do + url "https://rubygems.org/downloads/mini_portile2-2.8.5.gem" + sha256 "7a37db8ae758086c3c3ac3a59c036704d331e965d5e106635e4a42d6e66089ce" + end + + resource "sqlite" do + url "https://rubygems.org/downloads/sqlite3-1.7.3.gem" + sha256 "fa77f63c709548f46d4e9b6bb45cda52aa3881aa12cc85991132758e8968701c" + end + + resource "tilt" do + url "https://rubygems.org/downloads/tilt-2.3.0.gem" + sha256 "82dd903d61213c63679d28e404ee8e10d1b0fdf5270f1ad0898ec314cc3e745c" + end + + resource "base64" do + url "https://rubygems.org/downloads/base64-0.2.0.gem" + sha256 "0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507" + end + + resource "rack-protection" do + url "https://rubygems.org/downloads/rack-protection-3.2.0.gem" + sha256 "3c74ba7fc59066453d61af9bcba5b6fe7a9b3dab6f445418d3b391d5ea8efbff" + end + + resource "ruby2_keywords" do + url "https://rubygems.org/downloads/ruby2_keywords-0.0.5.gem" + sha256 "ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef" + end + + resource "mustermann" do + url "https://rubygems.org/downloads/mustermann-3.0.0.gem" + sha256 "6d3569aa3c3b2f048c60626f48d9b2d561cc8d2ef269296943b03da181c08b67" + end + + resource "sinatra" do + url "https://rubygems.org/downloads/sinatra-3.2.0.gem" + sha256 "6e727f4d034e87067d9aab37f328021d7c16722ffd293ef07b6e968915109807" + end + + resource "timeout" do + url "https://rubygems.org/downloads/timeout-0.4.1.gem" + sha256 "6f1f4edd4bca28cffa59501733a94215407c6960bd2107331f0280d4abdebb9a" + end + + resource "net-protocol" do + url "https://rubygems.org/downloads/net-protocol-0.2.2.gem" + sha256 "aa73e0cba6a125369de9837b8d8ef82a61849360eba0521900e2c3713aa162a8" + end + + resource "net-smtp" do + url "https://rubygems.org/downloads/net-smtp-0.4.0.1.gem" + sha256 "098d28fab9d9bc280a2cfada77692cdca89c83c6789bdbb8d8429f97f1bf5a33" + end + + resource "net-pop" do + url "https://rubygems.org/downloads/net-pop-0.1.2.gem" + sha256 "848b4e982013c15b2f0382792268763b748cce91c9e91e36b0f27ed26420dff3" + end + + resource "date" do + url "https://rubygems.org/downloads/date-3.3.4.gem" + sha256 "971f2cb66b945bcbea4ddd9c7908c9400b31a71bc316833cb42fa584b59d3291" + end + + resource "net-imap" do + url "https://rubygems.org/downloads/net-imap-0.4.9.1.gem" + sha256 "2f869dc18e3f4a61e5f4c68d6e33e2db5b6d661dfa9151b2b20aa7dfdd342e7d" + end + + resource "mini_mime" do + url "https://rubygems.org/downloads/mini_mime-1.1.5.gem" + sha256 "8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef" + end + + resource "mail" do + url "https://rubygems.org/downloads/mail-2.8.1.gem" + sha256 "ec3b9fadcf2b3755c78785cb17bc9a0ca9ee9857108a64b6f5cfc9c0b5bfc9ad" + end + + resource "websocket-extensions" do + url "https://rubygems.org/downloads/websocket-extensions-0.1.5.gem" + sha256 "1c6ba63092cda343eb53fc657110c71c754c56484aad42578495227d717a8241" + end + + resource "websocket-driver" do + url "https://rubygems.org/downloads/websocket-driver-0.7.6.gem" + sha256 "f69400be7bc197879726ad8e6f5869a61823147372fd8928836a53c2c741d0db" + end + + resource "faye-websocket" do + url "https://rubygems.org/downloads/faye-websocket-0.11.3.gem" + sha256 "109187161939c57032d2bba9e5c45621251d73f806bb608d2d4c3ab2cabeb307" + end + + def install + if OS.mac? && MacOS.version >= :mojave && MacOS::CLT.installed? + ENV["SDKROOT"] = ENV["HOMEBREW_SDKROOT"] = MacOS::CLT.sdk_path(MacOS.version) + end + + 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", "#{name}.gemspec" + system "gem", "install", "--ignore-dependencies", "#{name}-#{version}.gem" + bin.install libexec/"bin"/name, libexec/"bin/catchmail" + bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) + + # Remove temporary logs that reference Homebrew shims. + # TODO: See if we can handle this better: + # https://github.com/sparklemotion/sqlite3-ruby/discussions/394 + rm_r(libexec/"gems/sqlite3-#{resource("sqlite").version}/ext/sqlite3/tmp") + end + + service do + run [opt_bin/"mailcatcher", "-f"] + log_path var/"log/mailcatcher.log" + error_log_path var/"log/mailcatcher.log" + keep_alive true + end + + test do + smtp_port = free_port + http_port = free_port + system bin/"mailcatcher", "--smtp-port", smtp_port.to_s, "--http-port", http_port.to_s + + TCPSocket.open("localhost", smtp_port) do |sock| + assert_match "220 ", sock.gets + sock.puts "HELO example.org" + assert_match "250 ", sock.gets + sock.puts "MAIL FROM:" + assert_match "250 ", sock.gets + sock.puts "RCPT TO:" + assert_match "250 ", sock.gets + sock.puts "DATA" + assert_match "354 ", sock.gets + sock.puts <<~TEXT + From: Bob Example + To: Alice Example + Date: Tue, 15 Jan 2008 16:02:43 -0500 + Subject: Test message + + Hello Alice. + . + TEXT + assert_match "250 ", sock.gets + sock.puts "QUIT" + assert_match "221 ", sock.gets + ensure + sock.close + end + + assert_match "bob@example.org", shell_output("curl --silent http://localhost:#{http_port}/messages") + assert_equal "Hello Alice.", shell_output("curl --silent http://localhost:#{http_port}/messages/1.plain").strip + system "curl", "--silent", "-X", "DELETE", "http://localhost/#{http_port}/" + end +end diff --git a/Formula/m/mailcheck.rb b/Formula/m/mailcheck.rb new file mode 100644 index 0000000000000..a9ea0694ddc11 --- /dev/null +++ b/Formula/m/mailcheck.rb @@ -0,0 +1,33 @@ +class Mailcheck < Formula + desc "Check multiple mailboxes/maildirs for mail" + homepage "https://mailcheck.sourceforge.net/" + url "https://downloads.sourceforge.net/project/mailcheck/mailcheck/1.91.2/mailcheck_1.91.2.tar.gz" + sha256 "6ca6da5c9f8cc2361d4b64226c7d9486ff0962602c321fc85b724babbbfa0a5c" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9826a29c8ea6cc9f8a3c2c1a85c39726d0412898ab38feccdc027ccf505a5662" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5892072eefc7d2c38a7acabbb05bb380943380d11e46ea2c6f514abe08979184" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aa14d797b2b2de01428e52e56c0e26ffe36d72227393ec4554c0749b8189aa60" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ebfbf5a09b426cf879dc604f856b3512febfe7013bc74039dc35dcbf0d28b57e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9cb8f491eff846164c8732bf372b323f8546830237ac097dc55dfba3747d6331" + sha256 cellar: :any_skip_relocation, sonoma: "193fcd7805d976190391ae4bcf34afd28ebd82bfd45aff54c307aa6325a7a93f" + sha256 cellar: :any_skip_relocation, ventura: "d6e91d19af4b560df0f8a4c02dc922e7e31273812076b8d326109f394a8d7dbf" + sha256 cellar: :any_skip_relocation, monterey: "212f413b638cf5e1e95f27edec31f6f197cf4ff2f20d24e0580d7db1957b2ea6" + sha256 cellar: :any_skip_relocation, big_sur: "59d3c8716efff8670b81cec68c47b0663ffa079938ee6aae55078770564fa481" + sha256 cellar: :any_skip_relocation, catalina: "66fa586c21ec0cd9a842fcb99e8bbf822681c8858b864b14aa7d57ea89c47a99" + sha256 cellar: :any_skip_relocation, mojave: "7ea23945f9750c34d71ff05c5f41c0f5352e3eecaf1c7cf485d4f51096b9dd4e" + sha256 cellar: :any_skip_relocation, high_sierra: "c630704fee3dea86402e7486295a13601077bd991e45f23d3ac841c95a9c4474" + sha256 cellar: :any_skip_relocation, sierra: "8d33e3b08eef4dfaa7fa3d2c4e5f4a697cd2e5eb950c963f1f0845c0651da5ea" + sha256 cellar: :any_skip_relocation, el_capitan: "b7c134dc23431dfaa3f402b859b7154cab5e176711363bd884dc82ce896d7c7a" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1c3ac175abf729a56d77e55d0039cafe7f478c9e069961a8383f1b2c6f1e963" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84fa4f1d288f0f8824334bb68621b8589b65e0d9e21a4ca0961a33aae5d0ef63" + end + + def install + system "make", "mailcheck" + bin.install "mailcheck" + man1.install "mailcheck.1" + etc.install "mailcheckrc" + end +end diff --git a/Formula/m/mailhog.rb b/Formula/m/mailhog.rb new file mode 100644 index 0000000000000..1380fa0202f89 --- /dev/null +++ b/Formula/m/mailhog.rb @@ -0,0 +1,63 @@ +class Mailhog < Formula + desc "Web and API based SMTP testing tool" + homepage "https://github.com/mailhog/MailHog" + url "https://github.com/mailhog/MailHog/archive/refs/tags/v1.0.1.tar.gz" + sha256 "6227b566f3f7acbfee0011643c46721e20389eba4c8c2d795c0d2f4d2905f282" + license "MIT" + head "https://github.com/mailhog/MailHog.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4c49d108311e4eb9021edf775bb06695e02dad66525853a7da265be2dfdfb9bb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "51e6965b16a8d1c9fa3be69f3f30dc922bac2b721c040b3891afe53178d5c2cf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ced5d8a79864ec2e24dd10244c8f8c02ea877f5039cebbc52d67008878a90384" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a5b089cb4b0b631510bd8454442227cc126847626f414c3607bba679aa98f10a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a2cd7cb1b3d603d1696ffe8f6ff7704e7cf5a46fce3989160f66bf552fd1d754" + sha256 cellar: :any_skip_relocation, sonoma: "fe103d8427c4a381eae006d4b8fe928cc2abcb1bde31f1ece0018eddb7932a41" + sha256 cellar: :any_skip_relocation, ventura: "6a45f9cc5d9d2de936cc8d045927ab623c87afbad9616ddf3e6e5b09c6f55dda" + sha256 cellar: :any_skip_relocation, monterey: "0e54558a9977b4e4106dd96395cb854253af643661089c0523cd26dbf77bca65" + sha256 cellar: :any_skip_relocation, big_sur: "427f2af18b97af3d6b99e5d311b663a52ef85f6c2b04a6952ba691247e65df3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b66c1a2cbd67663bd1046ec584e8a9fd8518b7b68a3907ded7b6225d55774da" + end + + # No support for Go modules and needs deprecated `go_resource` DSL. + # https://github.com/mailhog/MailHog/issues/442#issuecomment-1493415258 + deprecate! date: "2024-03-27", because: :unmaintained + disable! date: "2025-03-31", because: :unmaintained + + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "auto" + + path = buildpath/"src/github.com/mailhog/MailHog" + path.install buildpath.children + + system "go", "build", *std_go_args(output: bin/"MailHog", ldflags: "-s -w"), path + end + + service do + run [ + opt_bin/"MailHog", + "-api-bind-addr", + "127.0.0.1:8025", + "-smtp-bind-addr", + "127.0.0.1:1025", + "-ui-bind-addr", + "127.0.0.1:8025", + ] + keep_alive true + log_path var/"log/mailhog.log" + error_log_path var/"log/mailhog.log" + end + + test do + address = "127.0.0.1:#{free_port}" + fork { exec "#{bin}/MailHog", "-ui-bind-addr", address } + sleep 2 + + output = shell_output("curl --silent #{address}") + assert_match "MailHog", output + end +end diff --git a/Formula/m/mailpit.rb b/Formula/m/mailpit.rb new file mode 100644 index 0000000000000..c84f0756f8597 --- /dev/null +++ b/Formula/m/mailpit.rb @@ -0,0 +1,45 @@ +class Mailpit < Formula + desc "Web and API based SMTP testing" + homepage "https://mailpit.axllent.org/" + url "https://github.com/axllent/mailpit/archive/refs/tags/v1.24.2.tar.gz" + sha256 "1d98f5def313edc19670052ecb123779f03b742ec4a7413b4098e811cb239390" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4256d3386c1c3ff095a65c77d73812d950c9e837da7b637123014a0ed7b659c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6006e52211565404f1b0226645c9fa33b81ea5d8d96ef07e7fdee743d00bc26e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "025bf9679437ff022fe605e880555d9de48e36d6feb389d788d0dbeab0b8cc82" + sha256 cellar: :any_skip_relocation, sonoma: "04951a1b4f904651849a23d1da0ede63153beaf8d705fe078ef18efd1a3ecbdd" + sha256 cellar: :any_skip_relocation, ventura: "7bdbaa0b55e5f428648c4abe54b4569f54708a3031b2d8f52d39badff30b3404" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e30809811aeafc670be90f0b9c648473c8b00913c28fed2b5fadfa96a90400c" + end + + depends_on "go" => :build + depends_on "node" => :build + + def install + system "npm", "install", *std_npm_args(prefix: false) + system "npm", "run", "build" + + ldflags = "-s -w -X github.com/axllent/mailpit/config.Version=v#{version}" + system "go", "build", *std_go_args(ldflags:) + + generate_completions_from_executable(bin/"mailpit", "completion") + end + + service do + run opt_bin/"mailpit" + keep_alive true + log_path var/"log/mailpit.log" + error_log_path var/"log/mailpit.log" + end + + test do + (testpath/"test_email.txt").write "wrong format message" + + output = shell_output("#{bin}/mailpit sendmail < #{testpath}/test_email.txt 2>&1", 11) + assert_match "error parsing message body: malformed header line", output + + assert_match "mailpit v#{version}", shell_output("#{bin}/mailpit version") + end +end diff --git a/Formula/m/mailsy.rb b/Formula/m/mailsy.rb new file mode 100644 index 0000000000000..c5c3c9e8e9fbb --- /dev/null +++ b/Formula/m/mailsy.rb @@ -0,0 +1,32 @@ +class Mailsy < Formula + desc "Quickly generate a temporary email address" + homepage "https://github.com/BalliAsghar/Mailsy" + url "https://registry.npmjs.org/mailsy/-/mailsy-5.0.0.tgz" + sha256 "ab89f60c2472f4b20ad7c507cff4653de6bd28411a39bfd9435829a1ad534414" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b3020835bf4bc4375afaf73df846d48e805448377b4a8013ae8e59480cf4981b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5eb1d27527f9b27d2bbd577ef5805e696d9b64b95d3db4f8f025899fda4d9289" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5eb1d27527f9b27d2bbd577ef5805e696d9b64b95d3db4f8f025899fda4d9289" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5eb1d27527f9b27d2bbd577ef5805e696d9b64b95d3db4f8f025899fda4d9289" + sha256 cellar: :any_skip_relocation, sonoma: "0ffc5714684754005b04200b5f379adb9fe3fd861d92b6cb64300065543f7205" + sha256 cellar: :any_skip_relocation, ventura: "0ffc5714684754005b04200b5f379adb9fe3fd861d92b6cb64300065543f7205" + sha256 cellar: :any_skip_relocation, monterey: "0ffc5714684754005b04200b5f379adb9fe3fd861d92b6cb64300065543f7205" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f7edbd95c0eeb40083f65f01a87f3cef1a2aa2500258712a3c342353ff8e180" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70af352d946453cfea208005eb47d49d7f9284dc9fb899169b520d9dd8586a98" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_match "Account not created yet", shell_output("#{bin}/mailsy me") + assert_match "Account not created yet", shell_output("#{bin}/mailsy d") + end +end diff --git a/Formula/m/mailutils.rb b/Formula/m/mailutils.rb new file mode 100644 index 0000000000000..a27f426c54ba4 --- /dev/null +++ b/Formula/m/mailutils.rb @@ -0,0 +1,51 @@ +class Mailutils < Formula + desc "Swiss Army knife of email handling" + homepage "https://mailutils.org/" + url "https://ftp.gnu.org/gnu/mailutils/mailutils-3.19.tar.gz" + mirror "https://ftpmirror.gnu.org/mailutils/mailutils-3.19.tar.gz" + sha256 "aeb6d5fca9179da0402cf6adef36026f656d6ae6de4e7142c6b0a035161fd7dd" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "d790720aa6cb28ca860975492e83556a861c5ad47d4992096c09dc4583f44191" + sha256 arm64_sonoma: "02507fd28f0de0b0a4ede1239678aa3814611eb46b74e30f8c90c1db97c2629a" + sha256 arm64_ventura: "fe58a7bd2bdb2ef56d042c1c80958c866883921354116018346712406a528bae" + sha256 sonoma: "fc9e4ba51f56ceafd83ea5717d64c5743eba692ec06d4f80362c908a3e7a2f5f" + sha256 ventura: "e7cf415dcd40794880d95390f3add8fec9525d205cc74ecd40ffc1fc812eb778" + sha256 arm64_linux: "c7dba705daf92061c4e674ddbcd8a84e0a500db7d1f5e3e52b2b7e2a05501388" + sha256 x86_64_linux: "8cf1753255aa8749c4669d1abdec367627998243decd6f8c72500068efb326c6" + end + + depends_on "gnutls" + depends_on "gsasl" + depends_on "libtool" + depends_on "libunistring" + depends_on "readline" + + uses_from_macos "libxcrypt" + + on_macos do + depends_on "gettext" + end + + def install + # This is hardcoded to be owned by `root`, but we have no privileges on installation. + inreplace buildpath.glob("dotlock/Makefile.*") do |s| + s.gsub! "chown root:mail", "true" + s.gsub! "chmod 2755", "chmod 755" + end + + system "./configure", "--disable-mh", + "--disable-silent-rules", + "--without-fribidi", + "--without-gdbm", + "--without-guile", + "--without-tokyocabinet", + *std_configure_args + system "make", "install" + end + + test do + system bin/"movemail", "--version" + end +end diff --git a/Formula/m/mairix.rb b/Formula/m/mairix.rb new file mode 100644 index 0000000000000..bc7b0fd6ee777 --- /dev/null +++ b/Formula/m/mairix.rb @@ -0,0 +1,47 @@ +class Mairix < Formula + desc "Email index and search tool" + homepage "https://github.com/vandry/mairix" + url "https://github.com/vandry/mairix/releases/download/0.24/mairix-0.24.tar.gz" + sha256 "a0702e079c768b6fbe25687ebcbabe7965eb493d269a105998c7c1c2caef4a57" + license "GPL-2.0-only" + head "https://github.com/vandry/mairix.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4fe9dceecdc765588a0da520eac43995f92e4ee5b0c4c73debba1cc89bf24e26" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc607dc417397d6c0d44c2665b7a47528d3db54f7099ae8827b3dafde391fefd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "588fe8d2cc66f1f63c8ba35ed5fed8df99c839cecc867107371c8d8b9741dd8a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ca582c86e13846ea4d659ae4f63ebb6db21a7199d8ea713c9a764997b05925dc" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b47d8c878e9315d316c48f8bde023532b8704785cde690f6d1c69e2b92a26787" + sha256 cellar: :any_skip_relocation, sonoma: "ab4c27b818c8fb1fe0a160c901822b38023ac7d99c7c7d57fa5a655938989bea" + sha256 cellar: :any_skip_relocation, ventura: "fe9fd8565bf77b7f4577330fd55cc019c5fd8e00900326143393c608aacf7264" + sha256 cellar: :any_skip_relocation, monterey: "86f72db4522c569ac628e9ef8b726ec4cac27bfd2c06d264070349c1ceb5e3a3" + sha256 cellar: :any_skip_relocation, big_sur: "26221ca2d6ce638ad3f47a597a4b67654ecaaa335f54577b380404951733113e" + sha256 cellar: :any_skip_relocation, catalina: "3c74d81ccb04da6f3fa9f0f734861738f6dcc924bde12dc8055fd73ea1be68ce" + sha256 cellar: :any_skip_relocation, mojave: "483128f4a24cbf40c26ceef2a9951c44992c57f114327671883b8ab7b9da8569" + sha256 cellar: :any_skip_relocation, high_sierra: "5975d9e5b741611279f008a50febebfa9d91c4e3e8448c4d8eda80cbd5c371af" + sha256 cellar: :any_skip_relocation, sierra: "9cfafed3ea8980b65d1fa5910db71468b3dfd5b81b598d20ff1bf317c55edbca" + sha256 cellar: :any_skip_relocation, el_capitan: "207bd087f9675c188a430ead82700870c9d3088597a788c334d020d92148caa8" + sha256 cellar: :any_skip_relocation, arm64_linux: "555dfa5bfb9a00a332bcd747b33887ecb72ed2eefcdafc915d88a12a580af7d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c89d5ea2923e5399c484b49c2237d198eac9fc624428358ef8a3cf6f8e0e4cf3" + end + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "zlib" + + 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/m/make.rb b/Formula/m/make.rb new file mode 100644 index 0000000000000..0d0154ab8ff24 --- /dev/null +++ b/Formula/m/make.rb @@ -0,0 +1,86 @@ +class Make < Formula + desc "Utility for directing compilation" + homepage "https://www.gnu.org/software/make/" + url "https://ftp.gnu.org/gnu/make/make-4.4.1.tar.lz" + mirror "https://ftpmirror.gnu.org/make/make-4.4.1.tar.lz" + sha256 "8814ba072182b605d156d7589c19a43b89fc58ea479b9355146160946f8cf6e9" + license "GPL-3.0-only" + + bottle do + rebuild 1 + sha256 arm64_sequoia: "f361639a5ec1a9355e12f985c511dd6631b6790452a52057032a3a07a690ca4e" + sha256 arm64_sonoma: "94377dc5a364da305c75fd7aa923a42897993de9edd1eb074428e13c3f2aaf93" + sha256 arm64_ventura: "389fd41ada645cde1c43c97f16fc829c80b2312db9c43f358ce774f19d0130d7" + sha256 arm64_monterey: "49fa5e3e19d0793bdc32cc453a3c209697553ec1fd92964cfbdaf67c6a72a03f" + sha256 sequoia: "cd86f41f2d02a827e15380a13a055606ba2f61819ad5100e4feba0400ef685a7" + sha256 sonoma: "3cc4a3aa1a3fe8ef30b2c7089708c5bdb04be3ae47ebc620f2cfd270941e96f2" + sha256 ventura: "e5b435315db19e1634289e888fcbd4282ed985a85591a7bec9661595a091d56f" + sha256 monterey: "d6d6e4b66e31ed8499dd7d1fecdc4d33b11af9073d0d884aedf9248bcbe6ac3e" + sha256 arm64_linux: "8f7572f0b8e63ba05ce8487f7742bcd815413cdb9803f59e0c276564af36daab" + sha256 x86_64_linux: "b9fc9f80dd7f93b1b5eb9545044d6f7b016a372e7b2beb03f3e1a045e701410f" + end + + head do + url "https://git.savannah.gnu.org/git/make.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "gettext" => :build # for autopoint + depends_on "libtool" => :build + depends_on "texinfo" => :build + depends_on "wget" => :build # used by autopull + + uses_from_macos "m4" => :build + + fails_with :clang # fails with invalid arguments sent to compiler + end + + def install + if build.head? + system "./autopull.sh" # downloads gnulib files from git that autogen.sh needs + system "./autogen.sh" + end + + args = %W[ + --disable-dependency-tracking + --prefix=#{prefix} + ] + + args << "--program-prefix=g" if OS.mac? + system "./configure", *args + system "make", "install" + + if OS.mac? + (libexec/"gnubin").install_symlink bin/"gmake" =>"make" + (libexec/"gnuman/man1").install_symlink man1/"gmake.1" => "make.1" + end + + (libexec/"gnubin").install_symlink "../gnuman" => "man" + end + + def caveats + on_macos do + <<~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" + EOS + end + end + + test do + (testpath/"Makefile").write <<~MAKE + default: + @echo Homebrew + MAKE + + if OS.mac? + assert_equal "Homebrew\n", shell_output(bin/"gmake") + assert_equal "Homebrew\n", shell_output(libexec/"gnubin/make") + else + assert_equal "Homebrew\n", shell_output(bin/"make") + end + end +end diff --git a/Formula/m/makedepend.rb b/Formula/m/makedepend.rb new file mode 100644 index 0000000000000..77e3ff8d280d8 --- /dev/null +++ b/Formula/m/makedepend.rb @@ -0,0 +1,38 @@ +class Makedepend < Formula + desc "Creates dependencies in makefiles" + homepage "https://x.org/" + url "https://xorg.freedesktop.org/releases/individual/util/makedepend-1.0.9.tar.xz" + sha256 "92d0deb659fff6d8ddbc1d27fc4ca8ceb2b6dbe15d73f0a04edc09f1c5782dd4" + license "MIT" + + livecheck do + url "https://xorg.freedesktop.org/releases/individual/util/" + regex(/href=.*?makedepend[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9b0e3a47a0d4bf48d695e8e2cb8353cc49acf3cf470f45b3b1ba48d049cdb190" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "065db2cad1fdc8a5da5cb54ff2ed60820fa3db8c5d0a643b99e46769ca1d89c6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "90aefc577a198b25cdd9d0ac5e873b3d33741416db9dcdcc3277664af8c07fad" + sha256 cellar: :any_skip_relocation, arm64_monterey: "25e7994da9aa7cc77c32388b041bb3dabd5885dbfc0e9d88e890289ec71853ae" + sha256 cellar: :any_skip_relocation, sonoma: "c6874f996ef7a5687bf1f83a0f1697c0e8360b4dda635b18be0926411dfabb7a" + sha256 cellar: :any_skip_relocation, ventura: "9b32d643af15de0c40854c16e50b5f6c5972825156d58b5fc03433cc1c4b63c8" + sha256 cellar: :any_skip_relocation, monterey: "febb3e4989051d186f36914a7df4ce155d52784a5a9d702a8c81ef6cc34d0e6c" + sha256 cellar: :any_skip_relocation, arm64_linux: "d285353719e76dfc8b61c138d72ed14b3e3167b3aeb817a3dfd5b2a6710250a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3513c65618644fc944f76db3cb1975f843d82eaf6198d58770c23ee145c1efed" + end + + depends_on "pkgconf" => :build + depends_on "util-macros" + depends_on "xorgproto" + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + + test do + touch "Makefile" + system bin/"makedepend" + end +end diff --git a/Formula/m/makefile2graph.rb b/Formula/m/makefile2graph.rb new file mode 100644 index 0000000000000..65e3b63152aa0 --- /dev/null +++ b/Formula/m/makefile2graph.rb @@ -0,0 +1,47 @@ +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/refs/tags/2021.11.06.tar.gz" + sha256 "5be8e528fa2945412357a8ef233e68fa3729639307ec1c38fd63768aad642c41" + license "MIT" + head "https://github.com/lindenb/makefile2graph.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f81db552d0aeb5eeed846fe79b930bf69aae6b2b9552bec55ab68db856162a10" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "19431085aae2ceefa936a5a426a0d56d30ffd2f1385723741dd8b0fba4d7b624" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d99f194c17cf570aac2bf56cea06e6bfb319e8fbaeba1ec5c536fa04c38bedfc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "96deab75f00bf9fa63e78af5b6623816b3a390c32adc0c4667099f3879938883" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5eb90095c4579d7d8616732bec7f266164f7b5f7665ef15fd3272720a4577cae" + sha256 cellar: :any_skip_relocation, sonoma: "48a8a10a83e44b435b6d27db946fdae90dc9c1a8d92e62814b6bd5bb4bb1ecbd" + sha256 cellar: :any_skip_relocation, ventura: "9474d06d702c8a26fbe45928416150354d8510dcbeb948b3e3dfc937612197b8" + sha256 cellar: :any_skip_relocation, monterey: "6010cadf93231ec03033a5248ad53ff57b099915ec8a72aa847a9a80a401257f" + sha256 cellar: :any_skip_relocation, big_sur: "7018264b838135807ab0a5e062a6315cf20b8de88b8dcff3f71afa03251eb8a2" + sha256 cellar: :any_skip_relocation, catalina: "58d4ab28a477688fb01b4db124c5d7deda3d7c2076e94e4c303ea1e8ab9a65c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "27d4553201201baa4731be6cf4dab2ffbce9f74a524bc1b6783300db9dd1a309" + sha256 cellar: :any_skip_relocation, x86_64_linux: "073d9b3b0eb9ff852a6f3f12aba6e3e2547d84e0d1257382b423a176df567299" + 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 :build + depends_on "scons" => :build + + uses_from_macos "zlib" + + resource "nsis" do + url "https://downloads.sourceforge.net/project/nsis/NSIS%203/3.11/nsis-3.11.zip" + sha256 "c7d27f780ddb6cffb4730138cd1591e841f4b7edb155856901cdf5f214394fa1" + + livecheck do + formula :parent + end + end + + def install + if OS.linux? + ENV.append_to_cflags "-I#{Formula["zlib"].opt_include}" + ENV.append "LDFLAGS", "-Wl,-rpath,#{rpath}" + end + + args = [ + "CC=#{ENV.cc}", + "CXX=#{ENV.cxx}", + "PREFIX=#{prefix}", + "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}", + # Scons dependency disables superenv in brew + "APPEND_CCFLAGS=#{ENV.cflags}", + "APPEND_LINKFLAGS=#{ENV.ldflags}", + ] + + system "scons", "makensis", *args + bin.install "build/urelease/makensis/makensis" + (share/"nsis").install resource("nsis") + end + + test do + # Workaround for https://sourceforge.net/p/nsis/bugs/1165/ + ENV["LANG"] = "en_GB.UTF-8" + %w[COLLATE CTYPE MESSAGES MONETARY NUMERIC TIME].each do |lc_var| + ENV["LC_#{lc_var}"] = "en_GB.UTF-8" + end + + system bin/"makensis", "-VERSION" + system bin/"makensis", "#{share}/nsis/Examples/bigtest.nsi", "-XOutfile /dev/null" + end +end diff --git a/Formula/m/makepkg.rb b/Formula/m/makepkg.rb new file mode 100644 index 0000000000000..0d4438acccbf6 --- /dev/null +++ b/Formula/m/makepkg.rb @@ -0,0 +1,69 @@ +class Makepkg < Formula + desc "Compile and build packages suitable for installation with pacman" + homepage "https://wiki.archlinux.org/index.php/makepkg" + url "https://gitlab.archlinux.org/pacman/pacman.git", + tag: "v7.0.0", + revision: "138cbae58448b7fde90335526add3029875784ee" + license "GPL-2.0-or-later" + head "https://gitlab.archlinux.org/pacman/pacman.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "dd4038eb9b4f8d3928e251be3159e1af208a92f54b404412ac6b7a68f7fe03a7" + sha256 arm64_sonoma: "61faf5587194320721c0360027347b28d97c3ce0b157ff78504b9fbf8af28ccf" + sha256 arm64_ventura: "da4a03fa1256800c68b4d97faa71a8defd17e99afc9401c0c9882baf1db79dcb" + sha256 arm64_monterey: "c6354bff149380a83c87fb59b6730fedb015407362e243be8e98736d14df50c4" + sha256 sonoma: "45597fa37e62ddd69aee401a4a9d34dc5ec1afdb367da9a1ed25035346462ed9" + sha256 ventura: "10997d0ff1dd13d24378863f421d1554c46502ebe5859f178df7055dc85f0ffe" + sha256 monterey: "b9b8be7872828bbb3da1488513d1a60a3b870f9880e2c929576da152e8cd230b" + sha256 arm64_linux: "57074a70ac1e5c270e4056174ce541e1e99f258a0a9f31f955ae3efdc8be84f8" + sha256 x86_64_linux: "77d749e913352e3d8b15a627f5368a267700fc25771476efe9749d9b5b5472a2" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "bash" + depends_on "fakeroot" + depends_on "libarchive" + depends_on "openssl@3" + + uses_from_macos "m4" => :build + uses_from_macos "python" => :build + uses_from_macos "libxslt" + + on_sonoma :or_older do + depends_on "coreutils" => :test # for md5sum + end + + on_linux do + depends_on "gettext" + end + + def install + ENV["XML_CATALOG_FILES"] = etc/"xml/catalog" + + args = %W[ + -Dmakepkg-template-dir=#{share}/makepkg-template + -Dsysconfdir=#{etc} + -Dlocalstatedir=#{var} + -Ddoc=disabled + ] + args << "-Di18n=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/"PKGBUILD").write <<~EOS + pkgname=androidnetworktester + pkgname=test + source=(https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/androidnetworktester/10kb.txt) + pkgrel=0 + pkgver=0 + md5sums=('e232a2683c04881e292d5f7617d6dc6f') + EOS + assert_match "md5sums=('e232a2683c0", pipe_output("#{bin}/makepkg -dg 2>&1") + end +end diff --git a/Formula/m/makeself.rb b/Formula/m/makeself.rb new file mode 100644 index 0000000000000..113f25e300415 --- /dev/null +++ b/Formula/m/makeself.rb @@ -0,0 +1,37 @@ +class Makeself < Formula + desc "Generates a self-extracting compressed tar archive" + homepage "https://makeself.io/" + url "https://github.com/megastep/makeself/archive/refs/tags/release-2.5.0.tar.gz" + sha256 "705d0376db9109a8ef1d4f3876c9997ee6bed454a23619e1dbc03d25033e46ea" + license "GPL-2.0-or-later" + head "https://github.com/megastep/makeself.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "3e45d0c2e2373b3a70edf4d95447341b46f57eca3acf42e10ac0403cac4cd620" + end + + def install + # Replace `/usr/local` references to make bottles uniform + inreplace ["makeself-header.sh", "makeself.sh"], "/usr/local", HOMEBREW_PREFIX + 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 + source = testpath/"source" + source.mkdir + (source/"foo").write "bar" + (source/"script.sh").write <<~SH + #!/bin/sh + echo 'Hello Homebrew!' + SH + chmod 0755, source/"script.sh" + system bin/"makeself", source, "testfile.run", "'A test file'", "./script.sh" + assert_match "Hello Homebrew!", shell_output("./testfile.run --target output") + assert_equal (source/"foo").read, (testpath/"output/foo").read + end +end diff --git a/Formula/m/mako.rb b/Formula/m/mako.rb new file mode 100644 index 0000000000000..bfe42bb1751bc --- /dev/null +++ b/Formula/m/mako.rb @@ -0,0 +1,37 @@ +class Mako < Formula + desc "Production-grade web bundler based on Rust" + homepage "https://makojs.dev/" + url "https://registry.npmjs.org/@umijs/mako/-/mako-0.11.11.tgz" + sha256 "e01d3901af50d122a82f8249211978725ce6e0b7f4aeb3bfb3cfe0786840c5cf" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7838b2a47fd447410185327ca1fcb2674c5062ff72843de812089e096f31a9db" + sha256 cellar: :any, arm64_sonoma: "7838b2a47fd447410185327ca1fcb2674c5062ff72843de812089e096f31a9db" + sha256 cellar: :any, arm64_ventura: "7838b2a47fd447410185327ca1fcb2674c5062ff72843de812089e096f31a9db" + sha256 cellar: :any, sonoma: "4581d14ee9138dfd6312cbbc683ac479cb036d2f52adcab69d653c848d59a5a6" + sha256 cellar: :any, ventura: "4581d14ee9138dfd6312cbbc683ac479cb036d2f52adcab69d653c848d59a5a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "a5070fb1219090d4b8592d89e7f998a75dd2bcaf930f643a4e3289382ec6685d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "405f30504e483614212ece1383f4145ab8e7f812b397ab2ac2541e20726293a2" + 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 + libexec.glob("lib/node_modules/@umijs/mako/node_modules/nice-napi/prebuilds/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + end + + test do + assert_match version.to_s, shell_output("#{bin}/mako --version") + + output = shell_output("#{bin}/mako build 2>&1", 1) + assert_match(/Load config failed/, output) + end +end diff --git a/Formula/m/malbolge.rb b/Formula/m/malbolge.rb new file mode 100644 index 0000000000000..f19e0aa7cf696 --- /dev/null +++ b/Formula/m/malbolge.rb @@ -0,0 +1,40 @@ +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" + license :public_domain + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a27217c73ffd65f6eeb9249e6120ec69dfbc0121bf2bd721d9270c9173f543e8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "21e3313bf2fc20b33e637016710d778140383e9dbc2a4e45b14a564ddb081d30" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8dbf31191633eab5119ca16eda4b541264a42261c5c7b7103e50446d1505dfc0" + sha256 cellar: :any_skip_relocation, arm64_monterey: "05e689895ba5a84f1d6b44eab314ef7b71111ad3a19e054fb1a0b73e81a43f5a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "df9e2b8bc55e587840b6f51c5fcc09b7820f148daa34fcf19fd64e18dd6b8769" + sha256 cellar: :any_skip_relocation, sonoma: "8cdaf2b347f1cde3026c930c0b928dd07d48c11fd958487b26fcac0fe6032161" + sha256 cellar: :any_skip_relocation, ventura: "7c371b9845e7eb81eb6a9a9ed0611713d092e58b1a8e6e04f86c29656a6afaad" + sha256 cellar: :any_skip_relocation, monterey: "4a7325d76aaadf2cc7da73b26ef40bbbf3e36e26a915f9cca27beb1c742432c7" + sha256 cellar: :any_skip_relocation, big_sur: "1d20423d7d367645816e29d674ea45b2efd683cf781428c79a7fb73abb15974f" + sha256 cellar: :any_skip_relocation, catalina: "fc544c2c918c4a4882cf3ea49b28d8e5fdec31637c8f8e4a33874229ac54d6b3" + sha256 cellar: :any_skip_relocation, mojave: "40942ff18c1bc85e171257e95516c3b2f20066971c81c6c773d5884285590216" + sha256 cellar: :any_skip_relocation, high_sierra: "5499e81bdb3bb7c6d93f7087c1d79a632e1dc5909e279bb1d37eb93906ca8c20" + sha256 cellar: :any_skip_relocation, sierra: "4e4b604d3ce7e8ccc5933dd949b55e77bdd59d21f084b4183b950e9dd552f368" + sha256 cellar: :any_skip_relocation, el_capitan: "20f743a8bcb4085f5958e65a54bc20399de6894155ecd64dfc056431d93ec477" + sha256 cellar: :any_skip_relocation, arm64_linux: "fde58cf2cc3ca5bd14497c96ec0edd11c89f9570b0c8d8da7cc1ff52c927517e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d562330170f412427bd1d214d7521b400c8dd5d198d27d86ff1c47cf60339322" + 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/m/malcontent.rb b/Formula/m/malcontent.rb new file mode 100644 index 0000000000000..1d8bfcb8f597c --- /dev/null +++ b/Formula/m/malcontent.rb @@ -0,0 +1,37 @@ +class Malcontent < Formula + desc "Supply Chain Attack Detection, via context differential analysis and YARA" + homepage "https://github.com/chainguard-dev/malcontent" + url "https://github.com/chainguard-dev/malcontent/archive/refs/tags/v1.10.3.tar.gz" + sha256 "a57e3d7d6419e407a2dfe608f0629eab70817925df230b3f308256e1967c0e8b" + license "Apache-2.0" + head "https://github.com/chainguard-dev/malcontent.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c675b9b0d603b1e0acd06cac7d8f1df76b49cedb66a2ec1275d645e8b2dbd30e" + sha256 cellar: :any, arm64_sonoma: "12eebb5054f2eb5402f2e9c3631637ee92fb6d0024a0bb96307e694b58780810" + sha256 cellar: :any, arm64_ventura: "1a032989e90bdb7d13bba29812924c7475b3b2b5ede4a9d3793b2b14bbde90b9" + sha256 cellar: :any, sonoma: "6f6a817a2b3e17c8dc2ac7c03b8b0f41c66f2d531e91edb706674743f59c5f44" + sha256 cellar: :any, ventura: "5cfbc8b9ec9c966ab92841925fa4933ff966878dc4aeb62a1df3d20a1e6f2bfa" + sha256 cellar: :any_skip_relocation, arm64_linux: "44018ab4bd5d07758ac2cdc86ecf64f60bbd755671b73e1b6f467d666992b34d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e137f0731c71c2feb59310f496b7f9f7811539485bc56069fdf15872d3f6837" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + depends_on "yara-x" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.BuildVersion=#{version}", output: bin/"mal"), "./cmd/mal" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mal --version") + + (testpath/"test.py").write <<~PYTHON + import subprocess + subprocess.run(["echo", "execute external program"]) + PYTHON + + assert_match "program — execute external program", shell_output("#{bin}/mal analyze #{testpath}") + end +end diff --git a/Formula/m/mallet.rb b/Formula/m/mallet.rb new file mode 100644 index 0000000000000..fa942905b1c64 --- /dev/null +++ b/Formula/m/mallet.rb @@ -0,0 +1,38 @@ +class Mallet < Formula + desc "MAchine Learning for LanguagE Toolkit" + homepage "https://mimno.github.io/Mallet/index" + # We use the zip as the 202108 tarball was generated with macOS metadata so + # it is unpacked incorrectly on Linux and prevents `all` bottle creation + url "https://github.com/mimno/Mallet/releases/download/v202108/Mallet-202108-bin.zip" + sha256 "874e682add31d638fb6b97c0ad485ff8fbc45e08c47305843139604b7dc15f62" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "2a79370bb96c6b93c4e5ccea01dfd09deeea7bcd7410c34ebfbd0584e24939e3" + end + + depends_on "openjdk" + + 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", JAVA_HOME: Formula["openjdk"].opt_prefix) + end + + test do + resource "homebrew-testdata" do + url "https://raw.githubusercontent.com/mimno/Mallet/master/sample-data/stackexchange/tsv/testing.tsv" + sha256 "06b4a0b3f27afa532ded841e8304449764a604fb202ba60eb762eaa79e9e02f3" + end + + resource("homebrew-testdata").stage do + system bin/"mallet", "import-file", "--input", "testing.tsv", "--keep-sequence" + assert_equal "seconds", + shell_output("#{bin}/mallet train-topics --input text.vectors " \ + "--show-topics-interval 0 --num-iterations 100 2>&1").split.last + end + end +end diff --git a/Formula/m/mame.rb b/Formula/m/mame.rb new file mode 100644 index 0000000000000..e1a831cb4a581 --- /dev/null +++ b/Formula/m/mame.rb @@ -0,0 +1,102 @@ +class Mame < Formula + desc "Multiple Arcade Machine Emulator" + homepage "https://mamedev.org/" + url "https://github.com/mamedev/mame/archive/refs/tags/mame0277.tar.gz" + version "0.277" + sha256 "60055b19fc96306927257c5ffc265ecebcbe5c944cf98113d4d78f6304556c67" + license "GPL-2.0-or-later" + head "https://github.com/mamedev/mame.git", branch: "master" + + # MAME tags (and filenames) are formatted like `mame0226`, so livecheck will + # report the version like `0226`. We work around this by matching the link + # text for the release title, since it contains the properly formatted version + # (e.g., 0.226). + 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_sequoia: "653d10b5b1ff22f71204f1c651b3798f6ff39a57553cbb56dba162787679aab2" + sha256 cellar: :any, arm64_sonoma: "f053646362da97c810b777ceeb429599e7d4c15f75c62148eb41252564883ff3" + sha256 cellar: :any, arm64_ventura: "cd80fb753be5faab9347d0cb72e4cfe79655a43e5e772b01a534fa7bb35261c1" + sha256 cellar: :any, sonoma: "25b3818e85d82775288447ae80fbd9dbf119d2f70429241571f025ef8501e5a1" + sha256 cellar: :any, ventura: "4e4fc9be40c34bff8c323be929ed7914c5f1ac9cbf3c3644b5f28f5f8d6f897b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "53e1a81217afa65b26f5fe11f0a24166535b707be78f4f1d3bce77eb2f8ae33c" + end + + # `asio`` v1.30.1 is bundled and it is not compatible with the `asio` formula + # Unless mame is updated to use the newer one, let's use the bundled one. + depends_on "glm" => :build + depends_on "pkgconf" => :build + depends_on "rapidjson" => :build + depends_on "sphinx-doc" => :build + depends_on "flac" + depends_on "jpeg-turbo" + # Need C++ compiler and standard library support C++17. + depends_on macos: :high_sierra + depends_on "portaudio" + depends_on "portmidi" + depends_on "pugixml" + depends_on "sdl2" + depends_on "sqlite" + depends_on "utf8proc" + depends_on "zstd" + + uses_from_macos "python" => :build + uses_from_macos "expat" + uses_from_macos "zlib" + + on_linux do + depends_on "fontconfig" + depends_on "libx11" + depends_on "libxi" + depends_on "mesa" + depends_on "pulseaudio" + depends_on "qt" + depends_on "sdl2_ttf" + end + + def install + ENV["QT_HOME"] = Formula["qt"].opt_prefix if OS.linux? + + # Cut sdl2-config's invalid option. + inreplace "scripts/src/osd/sdl.lua", "--static", "" + + # Use bundled lua instead of latest version. + # https://github.com/mamedev/mame/issues/5349 + system "make", "PYTHON_EXECUTABLE=#{which("python3")}", + "USE_LIBSDL=1", + "USE_SYSTEM_LIB_EXPAT=1", + "USE_SYSTEM_LIB_ZLIB=1", + "USE_SYSTEM_LIB_ASIO=0", # Use bundled one for compatibility + "USE_SYSTEM_LIB_FLAC=1", + "USE_SYSTEM_LIB_GLM=1", + "USE_SYSTEM_LIB_JPEG=1", + "USE_SYSTEM_LIB_PORTAUDIO=1", + "USE_SYSTEM_LIB_PORTMIDI=1", + "USE_SYSTEM_LIB_PUGIXML=1", + "USE_SYSTEM_LIB_RAPIDJSON=1", + "USE_SYSTEM_LIB_SQLITE3=1", + "USE_SYSTEM_LIB_UTF8PROC=1", + "USE_SYSTEM_LIB_ZSTD=1", + "VERBOSE=1" + bin.install "mame" + cd "docs" do + # We don't convert SVG files into PDF files, don't load the related extensions. + inreplace "source/conf.py", "'sphinxcontrib.rsvgconverter',", "" + 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 language 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/m/man-db.rb b/Formula/m/man-db.rb new file mode 100644 index 0000000000000..30e3d27089620 --- /dev/null +++ b/Formula/m/man-db.rb @@ -0,0 +1,100 @@ +class ManDb < Formula + desc "Unix documentation system" + homepage "https://man-db.gitlab.io/man-db/" + url "https://download.savannah.gnu.org/releases/man-db/man-db-2.13.1.tar.xz" + mirror "https://download-mirror.savannah.gnu.org/releases/man-db/man-db-2.13.1.tar.xz" + sha256 "8afebb6f7eb6bb8542929458841f5c7e6f240e30c86358c1fbcefbea076c87d9" + license "GPL-2.0-or-later" + + livecheck do + url "https://download.savannah.gnu.org/releases/man-db/" + regex(/href=.*?man-db[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "814476e3056aff5c88da27acca3153f44e60cd64ec964689998728ec86f074bf" + sha256 arm64_sonoma: "4cdc0506f77895a91bbd2bb3e66841a00ac8fe05826eff469e63e8f73a89cacb" + sha256 arm64_ventura: "80dccecdde51608a0007a5b55a68ad152d9df01edb4d20943bdee1d25d59cf07" + sha256 sonoma: "f6c8b05ccbaf7c5834bd1aa3d30b55d5e51d6de8864e829555c060823e09aaea" + sha256 ventura: "da8b0c64287f926108f16d8d41e037af06f01f26778fabf25c531f7aa872e58d" + sha256 arm64_linux: "6bc4fa308acf12f0365268ade917e6dc496b0d75b8a4ffc5ebc80bcfcfb0fd29" + sha256 x86_64_linux: "d337092513af299c568743a128b5ab5aad480e9c42b122cec9f507b00938809f" + end + + depends_on "pkgconf" => :build + depends_on "groff" + depends_on "libpipeline" + + uses_from_macos "zlib" + + on_linux do + depends_on "gdbm" + end + + def install + man_db_conf = etc/"man_db.conf" + args = %W[ + --disable-silent-rules + --disable-cache-owner + --disable-setuid + --disable-nls + --program-prefix=g + --localstatedir=#{var} + --with-config-file=#{man_db_conf} + --with-systemdtmpfilesdir=#{etc}/tmpfiles.d + --with-systemdsystemunitdir=#{etc}/systemd/system + ] + + system "./configure", *args, *std_configure_args + system "make", "install" + + # Use Homebrew's `var` directory instead of `/var`. + inreplace man_db_conf, "/var", var + + # Symlink commands without 'g' prefix into libexec/bin and + # man pages into libexec/man + %w[apropos catman lexgrog man mandb manpath whatis].each do |cmd| + (libexec/"bin").install_symlink bin/"g#{cmd}" => cmd + end + (libexec/"sbin").install_symlink sbin/"gaccessdb" => "accessdb" + %w[apropos lexgrog man manconv manpath whatis zsoelim].each do |cmd| + (libexec/"man"/"man1").install_symlink man1/"g#{cmd}.1" => "#{cmd}.1" + end + (libexec/"man"/"man5").install_symlink man5/"gmanpath.5" => "manpath.5" + %w[accessdb catman mandb].each do |cmd| + (libexec/"man"/"man8").install_symlink man8/"g#{cmd}.8" => "#{cmd}.8" + end + + # Symlink non-conflicting binaries and man pages + %w[catman lexgrog mandb].each do |cmd| + bin.install_symlink "g#{cmd}" => cmd + end + sbin.install_symlink "gaccessdb" => "accessdb" + + %w[accessdb catman mandb].each do |cmd| + man8.install_symlink "g#{cmd}.8" => "#{cmd}.8" + end + man1.install_symlink "glexgrog.1" => "lexgrog.1" + end + + def caveats + <<~EOS + Commands also provided by macOS have been installed with the prefix "g". + If you need to use these commands with their normal names, you + can add a "bin" directory to your PATH from your bashrc like: + PATH="#{opt_libexec}/bin:$PATH" + EOS + end + + test do + ENV["PAGER"] = "cat" + if OS.mac? + output = shell_output("#{bin}/gman true") + assert_match "General Commands Manual", output + assert_match(/The true utility always returns with (an )?exit code (of )?zero/, output) + else + output = shell_output("#{bin}/gman gman") + assert_match "gman - an interface to the system reference manuals", output + end + end +end diff --git a/Formula/m/man2html.rb b/Formula/m/man2html.rb new file mode 100644 index 0000000000000..352296e449d0b --- /dev/null +++ b/Formula/m/man2html.rb @@ -0,0 +1,44 @@ +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" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.mhonarc.org/release/misc/" + regex(/href=.*?man2html[._-]?v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ecc7e32cd32d246ff8e3efc5061325d43178e0ed1f32847b501af7c394540483" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "57f83bcc5fc4cc1278e1e8fa671a51959ff91c4952a3a2da10f602c3331f141d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ad45d9711383728beed965692eeff5cf47f26017c9a68254aa00af577e950c7e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ad45d9711383728beed965692eeff5cf47f26017c9a68254aa00af577e950c7e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "74778ca60783522eafd3f718104a650b2d3b9d6b3bf357c39990bfe669ba622a" + sha256 cellar: :any_skip_relocation, sonoma: "76a872bb8d19a508618c542676ca19cd871fa58f8f89308cd1d3cb5aef351798" + sha256 cellar: :any_skip_relocation, ventura: "52150cc353b92e2591decb511790b28c22921c11a5e716931e3c003f0c1ab5b6" + sha256 cellar: :any_skip_relocation, monterey: "52150cc353b92e2591decb511790b28c22921c11a5e716931e3c003f0c1ab5b6" + sha256 cellar: :any_skip_relocation, big_sur: "f7c753526a25dfa4b3331da2129ff867199b9f4357e8c6b38d1df2d1c20c7886" + sha256 cellar: :any_skip_relocation, catalina: "760f302a2a8c5178b683688d47e7ec55b17bf85a51ee404b00b2a3eb02030fcb" + sha256 cellar: :any_skip_relocation, mojave: "5096761bebb1f08c8eb8bac3e99b35884116086b7e39bf3d3daad3340645ff75" + sha256 cellar: :any_skip_relocation, high_sierra: "9fe2dcdd8c5f344106dfe57db3e70bec51f78594fb2c968f5561506d1bd7dbbe" + sha256 cellar: :any_skip_relocation, sierra: "ced5194219735226831e611db4247de1affdec0c2e53e813d5c1a7c5d3bce928" + sha256 cellar: :any_skip_relocation, el_capitan: "37bfcf3cab42938fff23a66429872e935b59cf769caf238928bd4acc6544d8d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "168ef1ce0acff7648651cea049462261dc8111cd2207e80d42feeb090f927a68" + sha256 cellar: :any_skip_relocation, x86_64_linux: "481efdcde976cadff40796f063650a6926dff892b7e3753ee9cf65e669d8aab1" + 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/m/mandoc.rb b/Formula/m/mandoc.rb new file mode 100644 index 0000000000000..e3099c2bf7219 --- /dev/null +++ b/Formula/m/mandoc.rb @@ -0,0 +1,97 @@ +class Mandoc < Formula + desc "UNIX manpage compiler toolset" + homepage "https://mandoc.bsd.lv/" + url "https://mandoc.bsd.lv/snapshots/mandoc-1.14.6.tar.gz" + sha256 "8bf0d570f01e70a6e124884088870cbed7537f36328d512909eb10cd53179d9c" + license "ISC" + revision 1 + head "anoncvs@mandoc.bsd.lv:/cvs", using: :cvs + + livecheck do + url "https://mandoc.bsd.lv/snapshots/" + regex(/href=.*?mandoc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cc7045b49fb8f8d57fae60c7ddcd9ea21ebb3abbf4f79e8e9a276273a122fd56" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e52aaa74b6654469741aa21738507e636c4b09576109ff602f78a445a4ce30dc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "086aeecdaad50178bb76546745cf350195ed758d02a495e4128c1dc210ec5b5f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "86fc7de6ddf02952dd6615916d2a787d0e87954337d7b214c760f3871575a771" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1a009788bd3b10af69f0563904143dda9a41f0872514ac7e64e8a08a46fcf5fb" + sha256 cellar: :any_skip_relocation, sonoma: "8cf397d08e94ff1666fcb58ebeb06d70e86d9fe243291fd2ebc66b5724bc4af4" + sha256 cellar: :any_skip_relocation, ventura: "b328a5df78ce08be360ed248be3fa61b83b4a485c9cf0159351b4049735bf2f7" + sha256 cellar: :any_skip_relocation, monterey: "6e8f22f43770525c78280535cf293a4500eba441baab688dbe04e4c872a505a7" + sha256 cellar: :any_skip_relocation, big_sur: "a4f63ae6f10fe8912986b92fecc22f7421ed0bad4495811f6159b895d5b42f6d" + sha256 cellar: :any_skip_relocation, catalina: "0190c6cc439cedfb1eb83d60b5be68974e12b993bafc87387ced2b948b526a2c" + sha256 arm64_linux: "43d5c42978ac400ff4d16be038df91fb52d5dd794e6a6c69b86edf3253553682" + sha256 cellar: :any_skip_relocation, x86_64_linux: "048e9149279a52292a203c6e6b4fd688b7b32501b8e05d806a5708587526a83c" + end + + uses_from_macos "zlib" + + 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". + "BINM_SOELIM=bsdsoelim", # conflicts with groff's soelim + + # 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", + + # 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", + ] + + # Bottom corner signature line. + localconfig << if OS.mac? + "OSNAME='macOS #{MacOS.version}'" + else + "OSNAME='Linux'" + end + + 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/m/mandown.rb b/Formula/m/mandown.rb new file mode 100644 index 0000000000000..bef3de20220ed --- /dev/null +++ b/Formula/m/mandown.rb @@ -0,0 +1,45 @@ +class Mandown < Formula + desc "Man-page inspired Markdown viewer" + homepage "https://github.com/Titor8115/mandown" + url "https://github.com/Titor8115/mandown/archive/refs/tags/v1.0.5.2.tar.gz" + sha256 "9903203fb95364a8b2774fe4eb4260daa725873d8f9a6e079d4c2ace81bede92" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "16dc6fc0dce771f2568a38212dbb8ee9a4c262d737e83ae2a05575f1f29931bc" + sha256 cellar: :any, arm64_sonoma: "7ae97c8f48213d8aad67e3d9edb24d832569fa69487a4fb7c1db3447b2a024c8" + sha256 cellar: :any, arm64_ventura: "24b373ecb63b84230f0f86f745cb4249239a042b32ab1cbfd40605078460119d" + sha256 cellar: :any, sonoma: "6992cc1fe420af48147fb1a65db14b4c802977e42d5398bd794761c735131d53" + sha256 cellar: :any, ventura: "8eae3a3b31cd0d843b6ff09dfe3469ec3bee7767a51fcb39c189de9f6526148a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4f3e1393953047b195a1393c6ff664ed8ca7c9b96dc0d510acd7b4b3ab05cd1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7f23f558c76c49fff56ffa50d019c8866b34eb3314a038e4229d12cfe6036fed" + end + + depends_on "pkgconf" => :build + depends_on "libconfig" + depends_on "ncurses" # undeclared identifier 'BUTTON5_PRESSED' with macos + uses_from_macos "libxml2" + + def install + system "make", "install", "PREFIX=#{prefix}", "PKG_CONFIG=pkg-config" + end + + test do + (testpath/".config/mdn").mkpath # `mdn` may misbehave when its config directory is missing. + (testpath/"test.md").write <<~MARKDOWN + # Hi from readme file! + MARKDOWN + expected_output = <<~HTML + test.md(7)

Hi from readme file!

+ + HTML + if OS.mac? + system bin/"mdn", "-f", "test.md", "-o", "test" + else + require "pty" + _, _, pid = PTY.spawn(bin/"mdn", "-f", "test.md", "-o", "test") + Process.wait(pid) + end + assert_equal expected_output, File.read("test") + end +end diff --git a/Formula/m/mani.rb b/Formula/m/mani.rb new file mode 100644 index 0000000000000..b4100feeda92f --- /dev/null +++ b/Formula/m/mani.rb @@ -0,0 +1,53 @@ +class Mani < Formula + desc "CLI tool to help you manage repositories" + homepage "https://manicli.com/" + url "https://github.com/alajmo/mani/archive/refs/tags/v0.30.1.tar.gz" + sha256 "a75984fda15ac431424964fe0a1d2c936e123583f2482eb3147c1ef20ba85c80" + license "MIT" + head "https://github.com/alajmo/mani.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "066be4f13259634fe85d0a18574c98e6b275eaed65ca124f5c0e339e88497a07" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "066be4f13259634fe85d0a18574c98e6b275eaed65ca124f5c0e339e88497a07" + sha256 cellar: :any_skip_relocation, arm64_ventura: "066be4f13259634fe85d0a18574c98e6b275eaed65ca124f5c0e339e88497a07" + sha256 cellar: :any_skip_relocation, sonoma: "3a55190358a002ec44fdb57444ce463a5e185654811ab3bd6928618bf51a1880" + sha256 cellar: :any_skip_relocation, ventura: "3a55190358a002ec44fdb57444ce463a5e185654811ab3bd6928618bf51a1880" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae89704ef4652bd3516c984967682192519dbdf4e69aab4317287166c6c288c8" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/alajmo/mani/cmd.version=#{version} + -X github.com/alajmo/mani/core/tui.version=#{version} + -X github.com/alajmo/mani/cmd.commit=#{tap.user} + -X github.com/alajmo/mani/cmd.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:, tags: "netgo") + generate_completions_from_executable(bin/"mani", "completion") + system bin/"mani", "gen" + man1.install "mani.1" + end + + test do + assert_match "Version: #{version}", shell_output("#{bin}/mani --version") + + (testpath/"mani.yaml").write <<~YAML + projects: + mani: + url: https://github.com/alajmo/mani.git + desc: CLI tool to help you manage repositories + tags: [cli, git] + + tasks: + git-status: + desc: Show working tree status + cmd: git status + YAML + + system bin/"mani", "sync" + assert_match "On branch main", shell_output("#{bin}/mani run git-status --tags cli") + end +end diff --git a/Formula/m/manifest-tool.rb b/Formula/m/manifest-tool.rb new file mode 100644 index 0000000000000..c61c1c87b19d6 --- /dev/null +++ b/Formula/m/manifest-tool.rb @@ -0,0 +1,45 @@ +class ManifestTool < Formula + desc "Command-line tool to create and query container image manifest list/indexes" + homepage "https://github.com/estesp/manifest-tool/" + url "https://github.com/estesp/manifest-tool/archive/refs/tags/v2.2.0.tar.gz" + sha256 "a3d770b7fde65d3146c0987e7e7b7be796a2a7a0556476c48b24bd237890cb06" + license "Apache-2.0" + head "https://github.com/estesp/manifest-tool.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8a037dc929dd0dfb5cad51397794e1a946d788a81bb54225498ecdb903271adb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "52f7836f4546243d9036b58302d182eae370e2050586e83383bd863e94c4e84a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "04bea67d020b0f2db42ef098245253cda322f46bae79e4b4c235089821cf8a5b" + sha256 cellar: :any_skip_relocation, sonoma: "fc3743f5f152b83dafc3081ef83286b8352280b7f4cda6fd1d04c0b3e0ab48f8" + sha256 cellar: :any_skip_relocation, ventura: "de24ccb775d338266c850e3a72fb5cac0b872f6040a4dde6b6003f9a36286f42" + sha256 cellar: :any_skip_relocation, x86_64_linux: "784d810a6b808231da1660a46363ef9d55991f12b8edb69e5d5b38eaa2440227" + end + + depends_on "go" => :build + + def install + system "make", "all" + system "make", "install", "PREFIX=#{prefix}" + end + + test do + package = "busybox:latest" + stdout, stderr, = Open3.capture3( + bin/"manifest-tool", "inspect", + package + ) + + if stderr.lines.grep(/429 Too Many Requests/).first + print "Can't test against docker hub\n" + print stderr.lines.join("\n") + else + assert_match package, stdout.lines.grep(/^Name:/).first + assert_match "sha", stdout.lines.grep(/Digest:/).first + assert_match "Platform:", stdout.lines.grep(/Platform:/).first + assert_match "OS:", stdout.lines.grep(/OS:\s*linux/).first + assert_match "Arch:", stdout.lines.grep(/Arch:\s*amd64/).first + end + + assert_match version.to_s, shell_output("#{bin}/manifest-tool --version") + end +end diff --git a/Formula/m/manim.rb b/Formula/m/manim.rb new file mode 100644 index 0000000000000..ce557c30b5839 --- /dev/null +++ b/Formula/m/manim.rb @@ -0,0 +1,236 @@ +class Manim < Formula + include Language::Python::Virtualenv + + desc "Animation engine for explanatory math videos" + homepage "https://www.manim.community/" + url "https://files.pythonhosted.org/packages/52/79/29f287beebcf52464c2cfd88015720992515062dd373bd37c2ed34955cdd/manim-0.19.0.tar.gz" + sha256 "748115ffc1dea24940fd6d7a3edcae0ccedc3e1874ebc1f5d7e5c6d69a4f4505" + license "MIT" + head "https://github.com/manimCommunity/manim.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "86ce8a53e79ff80f036a4d0db7f0530ee449a257f61dc9258fe8b5b87a7c2834" + sha256 cellar: :any, arm64_sonoma: "3e0aa0d42452ea76ed4a6518455791f86356910438ab80d5fc1f38ca3b17d8e1" + sha256 cellar: :any, arm64_ventura: "1a75f199f3ab86fdb7bf6c566c6da67ceb33035f5e028638b08bc7f02c6c0be3" + sha256 cellar: :any, sonoma: "cf4b5d144679779e524b99299b51bf112da008ccb700ded181a9b192b7b4831f" + sha256 cellar: :any, ventura: "e3c1047b923d039b971f1bcde3c75f9c74e4efb828446ee5b187cf9916a95c82" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf7672f05239bb0b4a5f2b673376f391c4a6454a8efb2e8b4e80b9c68b4650ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae49172db57af504a7455c843c67ca1cfac5e78759388f73107c42173567780e" + end + + depends_on "cmake" => :build # for mapbox_earcut + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "cairo" # for cairo.h + depends_on "ffmpeg" + depends_on "fontconfig" + depends_on "freetype" + depends_on "glib" + depends_on "numpy" + depends_on "pango" + depends_on "pillow" + depends_on "py3cairo" + depends_on "python@3.13" + depends_on "scipy" + + on_macos do + depends_on "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "cmake" => :build + depends_on "patchelf" => :build + end + + resource "audioop-lts" do + url "https://files.pythonhosted.org/packages/dd/3b/69ff8a885e4c1c42014c2765275c4bd91fe7bc9847e9d8543dbcbb09f820/audioop_lts-0.2.1.tar.gz" + sha256 "e81268da0baa880431b68b1308ab7257eb33f356e57a5f9b1f915dfb13dd1387" + end + + resource "av" do + url "https://files.pythonhosted.org/packages/0c/9d/486d31e76784cc0ad943f420c5e05867263b32b37e2f4b0f7f22fdc1ca3a/av-13.1.0.tar.gz" + sha256 "d3da736c55847d8596eb8c26c60e036f193001db3bc5c10da8665622d906c17e" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/b3/ca/824b1195773ce6166d388573fc106ce56d4a805bd7427b624e063596ec58/beautifulsoup4-4.12.3.tar.gz" + sha256 "74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "cloup" do + url "https://files.pythonhosted.org/packages/cf/71/608e4546208e5a421ef00b484f582e58ce0f17da05459b915c8ba22dfb78/cloup-3.0.5.tar.gz" + sha256 "c92b261c7bb7e13004930f3fb4b3edad8de2d1f12994dcddbe05bc21990443c5" + end + + resource "cython" do + url "https://files.pythonhosted.org/packages/84/4d/b720d6000f4ca77f030bd70f12550820f0766b568e43f11af7f7ad9061aa/cython-3.0.11.tar.gz" + sha256 "7146dd2af8682b4ca61331851e6aebce9fe5158e75300343f80c07ca80b1faff" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/66/0c/8d907af351aa16b42caae42f9d6aa37b900c67308052d10fdce809f8d952/decorator-5.1.1.tar.gz" + sha256 "637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330" + end + + resource "glcontext" do + url "https://files.pythonhosted.org/packages/3a/80/8238a0e6e972292061176141c1028b5e670aa8c94cf4c2f819bd730d314e/glcontext-3.0.0.tar.gz" + sha256 "57168edcd38df2fc0d70c318edf6f7e59091fba1cd3dadb289d0aa50449211ef" + end + + resource "isosurfaces" do + url "https://files.pythonhosted.org/packages/da/cf/bd7e70bb7b8dfd77afdc79aba8d83afd4a9263f045861cd4ddd34b7f6a12/isosurfaces-0.1.2.tar.gz" + sha256 "fa51ebe864ea9355b26830e27fdd6a41d5a58b419fa8d4b47e3b8b80718d6e21" + end + + resource "manimpango" do + url "https://files.pythonhosted.org/packages/2a/8e/7f7a49d4bbe2c6dbef4a82c58e15fc5a35eedcf97a8f7c67ce5fa9a8c827/manimpango-0.6.0.tar.gz" + sha256 "d959708e5c05e87317b37df5f6c5258aa9d1ed694a0b25b19d6a4f861841e191" + end + + resource "mapbox-earcut" do + url "https://files.pythonhosted.org/packages/8d/70/0a322197c1178f47941e5e6e13b0a4adeaaa7c465c18e3b4ead3eba49860/mapbox_earcut-1.0.3.tar.gz" + sha256 "b6bac5d519d9947a6321a699c15d58e0b5740da61b9210ed229e05ad207c1c04" + 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 "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "moderngl" do + url "https://files.pythonhosted.org/packages/da/52/540e2f8c45060bb2709f56eb5a44ae828dfcc97ccecb342c1a7deb467889/moderngl-5.12.0.tar.gz" + sha256 "52936a98ccb2f2e1d6e3cb18528b2919f6831e7e3f924e788b5873badce5129b" + end + + resource "moderngl-window" do + url "https://files.pythonhosted.org/packages/90/02/92e235891300c901f59647112a0267a07454f58aeb2041aa44f6b85f9cb3/moderngl_window-3.1.1.tar.gz" + sha256 "29c2827505f87399f3461d480b2778910fddeebe44ea803301215cf212a6c1bc" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz" + sha256 "307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1" + end + + resource "pycairo" do + url "https://files.pythonhosted.org/packages/07/4a/42b26390181a7517718600fa7d98b951da20be982a50cd4afb3d46c2e603/pycairo-1.27.0.tar.gz" + sha256 "5cb21e7a00a2afcafea7f14390235be33497a2cce53a98a19389492a60628430" + end + + resource "pydub" do + url "https://files.pythonhosted.org/packages/fe/9a/e6bca0eed82db26562c73b5076539a4a08d3cffd19c3cc5913a3e61145fd/pydub-0.25.1.tar.gz" + sha256 "980a33ce9949cab2a569606b65674d748ecbca4f0796887fd6f46173a7b0d30f" + end + + resource "pyglet" do + url "https://files.pythonhosted.org/packages/20/60/bf154aba98e66bcc9d58e3d8bbea3d68a960f05b968a81693b17a76ece99/pyglet-2.1.1.tar.gz" + sha256 "47f49890a00e9fefc4d0ea74dc5b9d6b9be1c5455bb5746b2df118012cfa3124" + end + + resource "pyglm" do + url "https://files.pythonhosted.org/packages/fe/a1/123daa472f20022785b18d6cdf6c71e30272aae03584a8ab861fa5fa01a5/pyglm-2.7.3.tar.gz" + sha256 "4ccb6c027622b948aebc501cd8c3c23690293115dc98108f8ed3b7fd533b398f" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyobjc-core" do + url "https://files.pythonhosted.org/packages/5d/07/2b3d63c0349fe4cf34d787a52a22faa156225808db2d1531fe58fabd779d/pyobjc_core-10.3.2.tar.gz" + sha256 "dbf1475d864ce594288ce03e94e3a98dc7f0e4639971eb1e312bdf6661c21e0e" + end + + resource "pyobjc-framework-cocoa" do + url "https://files.pythonhosted.org/packages/39/41/4f09a5e9a6769b4dafb293ea597ed693cc0def0e07867ad0a42664f530b6/pyobjc_framework_cocoa-10.3.2.tar.gz" + sha256 "673968e5435845bef969bfe374f31a1a6dc660c98608d2b84d5cae6eafa5c39d" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "screeninfo" do + url "https://files.pythonhosted.org/packages/ec/bb/e69e5e628d43f118e0af4fc063c20058faa8635c95a1296764acc8167e27/screeninfo-0.8.1.tar.gz" + sha256 "9983076bcc7e34402a1a9e4d7dabf3729411fd2abb3f3b4be7eba73519cd2ed1" + end + + resource "skia-pathops" do + url "https://files.pythonhosted.org/packages/e5/85/4c6ce1f1f3e8d3888165f2830adcf340922416c155647b12ebac2dcc423e/skia_pathops-0.8.0.post2.zip" + sha256 "9e252cdeb6c4d162e82986d31dbd89c675d1677cb8019c2e13e6295d4a557269" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + end + + resource "srt" do + url "https://files.pythonhosted.org/packages/66/b7/4a1bc231e0681ebf339337b0cd05b91dc6a0d701fa852bb812e244b7a030/srt-3.5.3.tar.gz" + sha256 "4884315043a4f0740fd1f878ed6caa376ac06d70e135f306a6dc44632eed0cc0" + end + + resource "svgelements" do + url "https://files.pythonhosted.org/packages/5d/29/1c93c94a2289675ba2ff898612f9c9a03f46d69f253bdf4da0dfc08a599d/svgelements-1.9.6.tar.gz" + sha256 "7c02ad6404cd3d1771fd50e40fbfc0550b0893933466f86a6eb815f3ba3f37f7" + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "watchdog" do + url "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz" + sha256 "9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + if OS.mac? + # Help `pyobjc-framework-cocoa` pick correct SDK after removing -isysroot from Python formula + ENV.append_to_cflags "-isysroot #{MacOS.sdk_path}" + else + without = resources.filter_map { |r| r.name if r.name.start_with?("pyobjc") } + end + virtualenv_install_with_resources(without:) + + generate_completions_from_executable(bin/"manim", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + (testpath/"testscene.py").write <<~PYTHON + from manim import * + + class CreateCircle(Scene): + def construct(self): + circle = Circle() # create a circle + circle.set_fill(PINK, opacity=0.5) # set the color and transparency + self.play(Create(circle)) # show the circle on screen + PYTHON + + system bin/"manim", "-ql", testpath/"testscene.py", "CreateCircle" + assert_path_exists testpath/"media/videos/testscene/480p15/CreateCircle.mp4" + end +end diff --git a/Formula/m/manticoresearch.rb b/Formula/m/manticoresearch.rb new file mode 100644 index 0000000000000..788b00a510f25 --- /dev/null +++ b/Formula/m/manticoresearch.rb @@ -0,0 +1,111 @@ +class Manticoresearch < Formula + desc "Open source text search engine" + homepage "https://manticoresearch.com/" + url "https://github.com/manticoresoftware/manticoresearch/archive/refs/tags/9.5.4.tar.gz" + sha256 "9e910b027a3a26a3857994f7b1a257a1ffcdd56f8e4686f095d6f612eaedd9af" + license all_of: [ + "GPL-3.0-or-later", + "GPL-2.0-only", # wsrep + { "GPL-2.0-only" => { with: "x11vnc-openssl-exception" } }, # galera + { any_of: ["Unlicense", "MIT"] }, # uni-algo (our formula is too new) + ] + version_scheme 1 + head "https://github.com/manticoresoftware/manticoresearch.git", branch: "master" + + # Only even patch versions are stable releases + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+\.\d*[02468])$/i) + end + + bottle do + sha256 arm64_sequoia: "b19e239f224181cc8c70e1509ee1e89b992cf32d0eec418998340ce07c5cfbc3" + sha256 arm64_sonoma: "7b25220b3a50909ac84f70262549deb7811f62d34089c77d0d92c458c3a953b5" + sha256 arm64_ventura: "0aad4b6d891625d66809504e356671117a7e4f265bac036f429e16b45bd96d44" + sha256 sonoma: "23d557592ff89115889be641101cefcabdf83a245705f6dd1417d318adb3b025" + sha256 ventura: "77c2904daa0ffef13a643bd7cc73e9e1bfbd02d17814fff896bffb8b9304d5af" + sha256 arm64_linux: "47269042186e170f7383e1dfbfdb35c752dc63efb69ddf545b5e621a95f9a9e8" + sha256 x86_64_linux: "5686bef94ac394b77b0d11e70aeac2e78f59e3a23033ffd0c1b89260afbe02d7" + end + + depends_on "cmake" => :build + depends_on "nlohmann-json" => :build + depends_on "snowball" => :build # for libstemmer.a + + # NOTE: `libpq`, `mariadb-connector-c`, `unixodbc` and `zstd` are dynamically loaded rather than linked + depends_on "boost" + depends_on "cctz" + depends_on "icu4c@77" + depends_on "libpq" + depends_on "mariadb-connector-c" + depends_on "openssl@3" + depends_on "re2" + depends_on "unixodbc" + depends_on "xxhash" + depends_on "zstd" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "expat" + uses_from_macos "libxml2" + uses_from_macos "zlib" + + def install + # Avoid statically linking to boost + inreplace "src/CMakeLists.txt", "set ( Boost_USE_STATIC_LIBS ON )", "set ( Boost_USE_STATIC_LIBS OFF )" + + ENV["ICU_ROOT"] = deps.find { |dep| dep.name.match?(/^icu4c(@\d+)?$/) } + .to_formula.opt_prefix.to_s + ENV["OPENSSL_ROOT_DIR"] = Formula["openssl@3"].opt_prefix.to_s + ENV["PostgreSQL_ROOT"] = Formula["libpq"].opt_prefix.to_s + + args = %W[ + -DDISTR_BUILD=homebrew + -DCMAKE_INSTALL_LOCALSTATEDIR=#{var} + -DCMAKE_INSTALL_SYSCONFDIR=#{etc} + -DCMAKE_REQUIRE_FIND_PACKAGE_ICU=ON + -DCMAKE_REQUIRE_FIND_PACKAGE_cctz=ON + -DCMAKE_REQUIRE_FIND_PACKAGE_nlohmann_json=ON + -DCMAKE_REQUIRE_FIND_PACKAGE_re2=ON + -DCMAKE_REQUIRE_FIND_PACKAGE_stemmer=ON + -DCMAKE_REQUIRE_FIND_PACKAGE_xxHash=ON + -DMYSQL_CONFIG_EXECUTABLE=#{Formula["mariadb-connector-c"].opt_bin}/mariadb_config + -DRE2_LIBRARY=#{Formula["re2"].opt_lib/shared_library("libre2")} + -DWITH_ICU_FORCE_STATIC=OFF + -DWITH_RE2_FORCE_STATIC=OFF + -DWITH_STEMMER_FORCE_STATIC=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + def post_install + (var/"run/manticore").mkpath + (var/"log/manticore").mkpath + (var/"manticore/data").mkpath + + # Fix old config path (actually it was always wrong and never worked; however let's check) + mv etc/"manticore/manticore.conf", etc/"manticoresearch/manticore.conf" if (etc/"manticore/manticore.conf").exist? + end + + service do + run [opt_bin/"searchd", "--config", etc/"manticoresearch/manticore.conf", "--nodetach"] + keep_alive false + working_dir HOMEBREW_PREFIX + end + + test do + (testpath/"manticore.conf").write <<~EOS + searchd { + pid_file = searchd.pid + binlog_path=# + } + EOS + pid = spawn(bin/"searchd") + ensure + Process.kill(9, pid) + Process.wait(pid) + end +end diff --git a/Formula/m/mantra.rb b/Formula/m/mantra.rb new file mode 100644 index 0000000000000..cefc536ae0ef2 --- /dev/null +++ b/Formula/m/mantra.rb @@ -0,0 +1,30 @@ +class Mantra < Formula + desc "Tool to hunt down API key leaks in JS files and pages" + homepage "https://amoloht.github.io/" + url "https://github.com/MrEmpy/mantra/archive/refs/tags/v2.0.tar.gz" + sha256 "f6eecb667fea6978cc53e8ff0f18f86b6ea6e25a651af24d00c941bdfd0c8ab2" + license "GPL-3.0-only" + head "https://github.com/MrEmpy/mantra.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7c1c351dc805308006e2e3d5d0f4da28603a711b3044dc76813c63b5d0794a0d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6a53d93d65ced3c59f29695d6480b91651e866b01a7858aa6f748389e02fd0e4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8a0d0e35be8c8c9bb772cbd486fa108fcf4454861c6a025ad0db15273dc57c73" + sha256 cellar: :any_skip_relocation, arm64_monterey: "bc5e2eca313a3583f9ce1453b229b46b01ede7d97a984c258fab50e195039814" + sha256 cellar: :any_skip_relocation, sonoma: "d4c9bb02500093b2a41ffce55b75a6fdfdd3b522366c4e4f6dada9d94cbc5b04" + sha256 cellar: :any_skip_relocation, ventura: "0b5d253645f863d03554c0fe4ed3fb2d1bc8f1b8248289e7cff6d28c542464b9" + sha256 cellar: :any_skip_relocation, monterey: "9bc954f6399c3ebc4cbe352c295c0a92a2bb3c649edf98fa965bbb2dc5297eac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a18404491b344866ef5a92dca510b02a79da2be1f87f6627d180da3e2bc3456" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + end + + test do + output = pipe_output(bin/"mantra", "https://brew.sh/") + assert_match "\"indexName\":\"brew_all\"", output + end +end diff --git a/Formula/m/mapcidr.rb b/Formula/m/mapcidr.rb new file mode 100644 index 0000000000000..6ace0e84f3756 --- /dev/null +++ b/Formula/m/mapcidr.rb @@ -0,0 +1,31 @@ +class Mapcidr < Formula + desc "Subnet/CIDR operation utility" + homepage "https://projectdiscovery.io/" + url "https://github.com/projectdiscovery/mapcidr/archive/refs/tags/v1.1.34.tar.gz" + sha256 "296950c4123d34554a9f0746f1bef074374b7ff778fa5fbcc92a24fe149fe78d" + license "MIT" + head "https://github.com/projectdiscovery/mapcidr.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0f78e69af4afb917cf0a41804f2519b6bea04bdb690b01510b7101fddcc13d19" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb89cba8eb2951d6031b6596f645ff095a0a45fa32e801eba3428112e9805262" + sha256 cellar: :any_skip_relocation, arm64_ventura: "14c162c1728ed3a4db440a87a7c50a83a56e1850cf3b63ffe6141a13dea3685f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d6bdc1c16bde927ed10481ae997d383d1cc8e51ba21c8c8d70f287dc16607939" + sha256 cellar: :any_skip_relocation, sonoma: "402aadaa69b3d0d49ea79073f889c83abc4e06ce2168aa9d8970271e3ae14805" + sha256 cellar: :any_skip_relocation, ventura: "8e872b8888bcd318860259bd57a024b1fc4f339ecfc226f8f9473b230d040843" + sha256 cellar: :any_skip_relocation, monterey: "e8dfa1fb2323413d735e839062901fff2b9ede039ce62c1ce62cf0ac46f58507" + sha256 cellar: :any_skip_relocation, x86_64_linux: "59d005c2c7a7f0e9f40d332ab2eca37651bb4480d83baeef707d1c9619d99c62" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/mapcidr" + end + + test do + expected = "192.168.0.0/18\n192.168.64.0/18\n192.168.128.0/18\n192.168.192.0/18\n" + output = shell_output("#{bin}/mapcidr -cidr 192.168.1.0/16 -sbh 16384 -silent") + assert_equal expected, output + end +end diff --git a/Formula/m/mapcrafter.rb b/Formula/m/mapcrafter.rb new file mode 100644 index 0000000000000..3bfd30c5387f6 --- /dev/null +++ b/Formula/m/mapcrafter.rb @@ -0,0 +1,46 @@ +class Mapcrafter < Formula + desc "Minecraft map renderer" + homepage "https://github.com/mapcrafter/mapcrafter" + url "https://github.com/mapcrafter/mapcrafter/archive/refs/tags/v.2.4.tar.gz" + sha256 "f3b698d34c02c2da0c4d2b7f4e251bcba058d0d1e4479c0418eeba264d1c8dae" + license "GPL-3.0-or-later" + revision 14 + + bottle do + sha256 cellar: :any, arm64_sequoia: "cf44a24edf03e087564b71015e5d4850e1a381e5577d0b0f328b91deb42991f9" + sha256 cellar: :any, arm64_sonoma: "33a53c814d6290f940b3381f19fcbf150e1073e53492b1d359a7810fb7494340" + sha256 cellar: :any, arm64_ventura: "90e69caaa3caa385e93e053b2933b4d8d56ef5220cfe3b662ff18ef66b663e22" + sha256 cellar: :any, sonoma: "b0345c0382d6dbad06e25f58f52e3d25835cf236d0d460b06faeac65dcff96f9" + sha256 cellar: :any, ventura: "5d758ab032c8da63851103cc4f8e1024f48ef58abeddf75e6a8918d8f3b86ca7" + sha256 cellar: :any_skip_relocation, arm64_linux: "24a6e30afa385527820775880d487d2752eb59bd779e5be0d7d7651368b8b240" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ecb89abeca0415b5cba90d2251d01ea2d66a29611880b951341d6bb5345d7a60" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "jpeg-turbo" + depends_on "libpng" + + # Fix build with `boost` 1.85.0 using open PR. + # PR ref: https://github.com/mapcrafter/mapcrafter/pull/394 + patch do + url "https://github.com/mapcrafter/mapcrafter/commit/28dbc86803650eb487782e937cbb4513dbd0a650.patch?full_index=1" + sha256 "55edc91aee2fbe0727282d8b3e967ac654455e7fb4ca424c490caf7556eca179" + end + + def install + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DOPT_SKIP_TESTS=ON", + "-DJPEG_INCLUDE_DIR=#{Formula["jpeg-turbo"].opt_include}", + "-DJPEG_LIBRARY=#{Formula["jpeg-turbo"].opt_lib/shared_library("libjpeg")}", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + assert_match(/Mapcrafter/, shell_output("#{bin}/mapcrafter --version")) + end +end diff --git a/Formula/m/mapnik.rb b/Formula/m/mapnik.rb new file mode 100644 index 0000000000000..286e3b9093e06 --- /dev/null +++ b/Formula/m/mapnik.rb @@ -0,0 +1,73 @@ +class Mapnik < Formula + desc "Toolkit for developing mapping applications" + homepage "https://mapnik.org/" + # needs submodules + url "https://github.com/mapnik/mapnik.git", + tag: "v4.0.7", + revision: "d9d4288bea04c5ef9925c03db353cf5f308e06ad" + license "LGPL-2.1-or-later" + revision 2 + head "https://github.com/mapnik/mapnik.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "29a822426649d23d451319bd0e8a97ca73befc6b26b2643cabd9ed6aea578e8a" + sha256 cellar: :any, arm64_sonoma: "a078278f51be82e77b0392328a77750f8b3d10aa506ba953a3182a90b7a06d0a" + sha256 cellar: :any, arm64_ventura: "2aa1748de65ed49fcbdc2f2483e1933e9238d5d08f23f0e199334de7e10efee1" + sha256 cellar: :any, sonoma: "44dd1ff51b0290cda60df185e662717209a8b7d0eadd05da7d6df429d521fddb" + sha256 cellar: :any, ventura: "83221debd01d9073623d4b84cfce8d28dd76ee9199333130eabc2c0685d640a9" + sha256 arm64_linux: "d4fb224d070a7cd94e3c17674e16c39a9c7d07293bdb5c7115f75a3b1a82fa57" + sha256 x86_64_linux: "344607e36fe3ed140f6eda570637cf093c1abbca17dfa541efa01a15e04672fa" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "cairo" + depends_on "freetype" + depends_on "gdal" + depends_on "harfbuzz" + depends_on "icu4c@77" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libpq" + depends_on "libtiff" + depends_on "libxml2" + depends_on "proj" + depends_on "sqlite" + depends_on "webp" + + uses_from_macos "zlib" + + conflicts_with "osrm-backend", because: "both install Mapbox Variant headers" + conflicts_with "svg2png", because: "both install `svg2png` binaries" + + def install + cmake_args = %W[ + -DBUILD_BENCHMARK:BOOL=OFF + -DBUILD_DEMO_CPP:BOOL=OFF + -DBUILD_DEMO_VIEWER:BOOL=OFF + -DCMAKE_INSTALL_RPATH:PATH=#{rpath} + ] + + system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "ctest", "--verbose", "--parallel", ENV.make_jobs, "--test-dir", "build" + system "cmake", "--install", "build" + end + + test do + output = shell_output("#{Formula["pkgconf"].bin}/pkgconf libmapnik --variable prefix").chomp + assert_equal prefix.to_s, output + + output = shell_output("#{bin}/mapnik-index --version 2>&1", 1).chomp + assert_equal "version #{stable.version}", output + + output = shell_output("#{bin}/mapnik-render --version 2>&1", 1).chomp + assert_equal "version #{stable.version}", output + end +end diff --git a/Formula/m/mapproxy.rb b/Formula/m/mapproxy.rb new file mode 100644 index 0000000000000..58ee89d7f719e --- /dev/null +++ b/Formula/m/mapproxy.rb @@ -0,0 +1,86 @@ +class Mapproxy < Formula + include Language::Python::Virtualenv + + desc "Accelerating web map proxy" + # `mapproxy.org` is 404, upstream bug report, https://github.com/mapproxy/mapproxy/issues/983 + homepage "https://github.com/mapproxy/mapproxy" + url "https://files.pythonhosted.org/packages/3f/bd/c53da466ea00a958bd916f581b044ff8bfeaa326e7c286eebf8876c90539/mapproxy-4.1.1.tar.gz" + sha256 "dbeb1ba315803fafc43cb1c20fb8c0f5be35cb1d5c3aec4ca48b339a7f32486a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "48c51650310101e3dddd061ef1c1551c11dbc6662855579cee4aca65398e8aa2" + sha256 cellar: :any, arm64_sonoma: "11fac67ac54f7f300ea1692b230a2813a8460ba730000d61bfe0a19e7453f9d2" + sha256 cellar: :any, arm64_ventura: "4f8cb94468c7d59c8a571781a555b59694acea9413257771372d7d318681c832" + sha256 cellar: :any, sonoma: "867356cd84ea7224304f20880e00a6038e77ca992af7865de57f3b26420b76ef" + sha256 cellar: :any, ventura: "e29185f3960e626520849bc27032e0f7ab6c8803a5b1c2452cbd99a298e39c77" + sha256 cellar: :any_skip_relocation, arm64_linux: "ac9d07a24f205ee40a6725ac38b01034bac472eabeee4c0affbde4e54ae7ae9f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "799eabffb8695cb89b1eee8a2bffb68ab0b568c875166e97f7e045abf94d6eca" + end + + depends_on "rust" => :build # for rpds-py + depends_on "certifi" + depends_on "libyaml" + depends_on "pillow" + depends_on "proj" + depends_on "python@3.13" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "future" do + url "https://files.pythonhosted.org/packages/a7/b2/4140c69c6a66432916b26158687e821ba631a4c9273c474343badf84d3ba/future-1.0.0.tar.gz" + sha256 "bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05" + 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/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" + sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "pyproj" do + url "https://files.pythonhosted.org/packages/67/10/a8480ea27ea4bbe896c168808854d00f2a9b49f95c0319ddcbba693c8a90/pyproj-3.7.1.tar.gz" + sha256 "60d72facd7b6b79853f19744779abcd3f804c4e0d4fa8815469db20c9f640a47" + 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 "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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 + system bin/"mapproxy-util", "create", "-t", "base-config", testpath + assert_path_exists testpath/"seed.yaml" + end +end diff --git a/Formula/m/mapserver.rb b/Formula/m/mapserver.rb new file mode 100644 index 0000000000000..c13a02745633c --- /dev/null +++ b/Formula/m/mapserver.rb @@ -0,0 +1,85 @@ +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-8.4.0.tar.gz" + sha256 "b0cb3612cd58458cca0808b117c16b9415b3231af39aefb90d668e8b8b188e2c" + license "MIT" + revision 1 + + livecheck do + url "https://mapserver.org/download.html" + regex(/href=.*?mapserver[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "a4e500674e554d55bd55eaf1e02fc5b9e92acc8186249916b7a2580c69d0252f" + sha256 cellar: :any, arm64_sonoma: "6660cb93a5203442144bf4ca85bfc3c21e6d7bf586375e3095af54d946002cc4" + sha256 cellar: :any, arm64_ventura: "f90d19bd7df3901cce2cd86c0f17c5ea72f864c07461e25e3999a4aef19a51b0" + sha256 cellar: :any, sonoma: "92d448babff50b7594d87edbe7647422c2eee391385a7578d59a00f738639ebc" + sha256 cellar: :any, ventura: "2a6c194a77dd8a90c1e891709d75c3126397525853f9bfb8310473a2bbe89807" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e54d30a20448f15b9c47aac2ce9e6e248e4831f13e9c3dada3ea5e063d7485b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8bdcab5848d320edb7eb9d8dce253e900197f37d89be4246c65b9c786945247d" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "swig" => :build + depends_on "cairo" + depends_on "fcgi" + depends_on "freetype" + depends_on "gdal" + depends_on "geos" + depends_on "giflib" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libpq" + depends_on "libxml2" + depends_on "pcre2" + depends_on "proj" + depends_on "protobuf-c" + depends_on "python@3.13" + + uses_from_macos "curl" + + def python3 + "python3.13" + end + + def install + if OS.mac? + mapscript_rpath = rpath(source: prefix/Language::Python.site_packages(python3)/"mapscript") + # Install within our sandbox and add missing RPATH due to _mapscript.so not using CMake install() + inreplace "src/mapscript/python/CMakeLists.txt", "${Python_LIBRARIES}", + "-Wl,-undefined,dynamic_lookup,-rpath,#{mapscript_rpath}" + end + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-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_PYTHON=ON", + "-DWITH_SOS=ON", + "-DWITH_WFS=ON", + "-DPython_EXECUTABLE=#{which(python3)}", + "-DPHP_EXTENSION_DIR=#{lib}/php/extensions", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + system python3, "-m", "pip", "install", *std_pip_args(build_isolation: true), "./build/src/mapscript/python" + end + + test do + assert_match version.to_s, shell_output("#{bin}/mapserv -v") + system python3, "-c", "import mapscript" + end +end diff --git a/Formula/m/marcli.rb b/Formula/m/marcli.rb new file mode 100644 index 0000000000000..f5bcd07c75010 --- /dev/null +++ b/Formula/m/marcli.rb @@ -0,0 +1,36 @@ +class Marcli < Formula + desc "Parse MARC (ISO 2709) files" + homepage "https://github.com/hectorcorrea/marcli" + url "https://github.com/hectorcorrea/marcli/archive/refs/tags/v1.2.0.tar.gz" + sha256 "673f3237baa843db13f671c5a2e3986aa272566a38835bdd042377327ff9d9cb" + license "MIT" + head "https://github.com/hectorcorrea/marcli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "094b57f3f543ddd6cfdbe59ae3471ff70b5c1558290d0af936274d47c02e7a01" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "094b57f3f543ddd6cfdbe59ae3471ff70b5c1558290d0af936274d47c02e7a01" + sha256 cellar: :any_skip_relocation, arm64_ventura: "094b57f3f543ddd6cfdbe59ae3471ff70b5c1558290d0af936274d47c02e7a01" + sha256 cellar: :any_skip_relocation, sonoma: "a7d0a23c4c74f8067d2019c713baecf5d1217c10b308dc5fb95b7005aa9d2228" + sha256 cellar: :any_skip_relocation, ventura: "a7d0a23c4c74f8067d2019c713baecf5d1217c10b308dc5fb95b7005aa9d2228" + sha256 cellar: :any_skip_relocation, arm64_linux: "55d7013246601fa973521af7319642cd92b6a0b1bf911867fe9e215f19999159" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9ff92374dc575521c6033af290af42f3cb52cf092035c740f79bd5afa43c966" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/marcli" + end + + test do + resource "testdata" do + url "https://raw.githubusercontent.com/hectorcorrea/marcli/5434a2f85c6f03771f92ad9f0d5af5241f3385a6/data/test_1a.mrc" + sha256 "7359455ae04b1619f3879fe39eb22ad4187fb3550510f71cb4f27693f60cf386" + end + + resource("testdata").stage do + assert_equal "=650 \\0$aCoal$xAnalysis.\r\n=650 \\0$aCoal$xSampling.\r\n\r\n", + shell_output("#{bin}/marcli -file test_1a.mrc -fields 650") + end + end +end diff --git a/Formula/m/mariadb-connector-c.rb b/Formula/m/mariadb-connector-c.rb new file mode 100644 index 0000000000000..036acbea47d28 --- /dev/null +++ b/Formula/m/mariadb-connector-c.rb @@ -0,0 +1,80 @@ +class MariadbConnectorC < Formula + desc "MariaDB database connector for C applications" + homepage "https://mariadb.org/download/?tab=connector&prod=connector-c" + # TODO: Remove backward compatibility library symlinks on breaking version bump + url "https://archive.mariadb.org/connector-c-3.4.5/mariadb-connector-c-3.4.5-src.tar.gz" + mirror "https://fossies.org/linux/misc/mariadb-connector-c-3.4.5-src.tar.gz/" + sha256 "b17e193816cb25c3364c2cc92a0ad3f1d0ad9f0f484dc76b8e7bdb5b50eac1a3" + license "LGPL-2.1-or-later" + head "https://github.com/mariadb-corporation/mariadb-connector-c.git", branch: "3.4" + + # The REST API may omit the newest major/minor versions unless the + # `olderReleases` parameter is set to `true`. + livecheck do + url "https://downloads.mariadb.org/rest-api/connector-c/all-releases/?olderReleases=true" + strategy :json do |json| + json["releases"]&.map do |_, group| + group["children"]&.map do |release| + next if release["status"] != "stable" + + release["release_number"] + end + end&.flatten + end + end + + bottle do + sha256 arm64_sequoia: "0f6e48401540ad5fca8583d02329792604df22c02a9137fec1ab02a4c1955756" + sha256 arm64_sonoma: "b96d0241b6244af7eca596aeb9d158c98d44d2e5f914023ca2ce8557ccbb5f77" + sha256 arm64_ventura: "57809abf5e712cf20a0a5e1b9ea2f0f4c989b17b1e325aeff60d490e2c49cc3b" + sha256 sonoma: "7550489b9f9ad42c71427f97b2a9fc2fa1eecb4742b6ac6412b1cf4a9ed03fb6" + sha256 ventura: "17f76960fce3ba3b002d770da9a85eec2a5c97f01d00033db3a141d696047da2" + sha256 arm64_linux: "5166bacc7622caca103cbca8393791b1e61c840e7c0871337532ccbc2971bbce" + sha256 x86_64_linux: "12d8c56920e856f27a2adc9840590b6381e72c286c8bbb99579f45e2cc49671d" + end + + keg_only "it conflicts with mariadb" + + depends_on "cmake" => :build + depends_on "openssl@3" + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "krb5" + uses_from_macos "zlib" + + def install + rm_r "external" + + # -DINSTALL_* are relative to prefix + args = %w[ + -DINSTALL_LIBDIR=lib + -DINSTALL_MANDIR=share/man + -DWITH_EXTERNAL_ZLIB=ON + -DWITH_MYSQLCOMPAT=ON + -DWITH_UNIT_TESTS=OFF + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # Add mysql_config symlink for compatibility which simplifies building + # some dependents. This is done in the full `mariadb` installation[^1] + # but not in the standalone `mariadb-connector-c`. + # + # [^1]: https://github.com/MariaDB/server/blob/main/cmake/symlinks.cmake + bin.install_symlink "mariadb_config" => "mysql_config" + + # Temporary symlinks for backwards compatibility. + # TODO: Remove in future version update. + (lib/"mariadb").install_symlink lib.glob(shared_library("*")) + + # TODO: Automatically compress manpages in brew + Utils::Gzip.compress(*man3.glob("*.3")) + end + + test do + system bin/"mariadb_config", "--cflags" + end +end diff --git a/Formula/m/mariadb-connector-odbc.rb b/Formula/m/mariadb-connector-odbc.rb new file mode 100644 index 0000000000000..c284658c8bd2a --- /dev/null +++ b/Formula/m/mariadb-connector-odbc.rb @@ -0,0 +1,66 @@ +class MariadbConnectorOdbc < Formula + desc "Database driver using the industry standard ODBC API" + homepage "https://mariadb.org/download/?tab=connector&prod=connector-odbc" + url "https://archive.mariadb.org/connector-odbc-3.2.5/mariadb-connector-odbc-3.2.5-src.tar.gz" + mirror "https://fossies.org/linux/misc/mariadb-connector-odbc-3.2.5-src.tar.gz/" + sha256 "3b728f8b5f446581759cc3fb0d7a66ee83d33f96c0a77389b37886bdd9c27e31" + license "LGPL-2.1-or-later" + + livecheck do + url "https://downloads.mariadb.org/rest-api/connector-odbc/all-releases/?olderReleases=false" + strategy :json do |json| + json["releases"]&.map do |release| + next if release["status"] != "stable" + + release["release_number"] + end + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1cab56f15dd35ed8c393e3a445ddafc6df35dc91a5ba683e2bd12d58fba48018" + sha256 cellar: :any, arm64_sonoma: "9147c94a43745b22d550d87f43e3281e8d8e6846b3420b9fe809f08337c9625f" + sha256 cellar: :any, arm64_ventura: "afef9afb946a690d32cdccee6c780f36e24b539c7be0c7a38033f84440f58fa8" + sha256 cellar: :any, sonoma: "30c5cbc64f95f1329de018a9b631260e9dc8b3947d6a6e6c3cc0ad7bcc040b9a" + sha256 cellar: :any, ventura: "2b851dac6b57ca7d360abf3acd14562b46c9b8659fe8b361a0fef71d206d79b2" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b1a31a76c901d52ed43fc7a1be602a63bdd904fd0740d90de24a5d5d525d55a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb7ceb001faf0bb863b136fac7da261cd92b28b135d1d880252a58859be587cc" + end + + depends_on "cmake" => :build + depends_on "mariadb-connector-c" + depends_on "openssl@3" + depends_on "unixodbc" + + def install + ENV.append_to_cflags "-I#{Formula["mariadb-connector-c"].opt_include}/mariadb" + ENV.append "LDFLAGS", "-L#{Formula["mariadb-connector-c"].opt_lib}/mariadb" + ENV.append "LDFLAGS", "-Wl,-rpath,#{Formula["mariadb-connector-c"].opt_lib}/mariadb" if OS.linux? + args = [ + "-DMARIADB_LINK_DYNAMIC=1", + "-DWITH_SSL=OPENSSL", + "-DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix}", + "-DWITH_IODBC=0", + "-DICONV_INCLUDE_DIR=/usr/include", + ] + + if OS.mac? + # Workaround 3.1.11 issues finding system's built-in -liconv + # See https://jira.mariadb.org/browse/ODBC-299 + args << "-DICONV_LIBRARIES=#{MacOS.sdk_path}/usr/lib/libiconv.tbd" + end + + system "cmake", ".", *args, *std_cmake_args + + # By default, the installer pkg is built - we don't want that. + # maodbc limits the build to just the connector itself. + # install/fast prevents an "all" build being invoked that a regular "install" would do. + system "make", "maodbc" + system "make", "install/fast" + end + + test do + output = shell_output("#{Formula["unixodbc"].opt_bin}/dltest #{lib}/mariadb/#{shared_library("libmaodbc")}") + assert_equal "SUCCESS: Loaded #{lib}/mariadb/#{shared_library("libmaodbc")}", output.chomp + end +end diff --git a/Formula/m/mariadb.rb b/Formula/m/mariadb.rb new file mode 100644 index 0000000000000..d9df9e3992bbe --- /dev/null +++ b/Formula/m/mariadb.rb @@ -0,0 +1,212 @@ +class Mariadb < Formula + desc "Drop-in replacement for MySQL" + homepage "https://mariadb.org/" + url "https://archive.mariadb.org/mariadb-11.7.2/source/mariadb-11.7.2.tar.gz" + sha256 "557a89f08e74015d1d6909595e003dca75d4df21ed1ef8180d63cdd74e5e71b3" + license "GPL-2.0-only" + + livecheck do + url "https://downloads.mariadb.org/rest-api/mariadb/all-releases/?olderReleases=false" + strategy :json do |json| + json["releases"]&.map do |release| + next if release["status"] != "stable" + + release["release_number"] + end + end + end + + bottle do + sha256 arm64_sequoia: "f483e528ab5b816e2c20b88598d8a5bfe9134cecca4c0de9ac64d312e6b00969" + sha256 arm64_sonoma: "fe4e4c88bbd489d87b7f36de38274249a9ac824d7b2903a4c5042301e539d6ce" + sha256 arm64_ventura: "93d5d35242544df13cd074a324ee5d93565ca75e1278efb7393f3e767eb343c3" + sha256 sonoma: "a6274271328cb579529ec17ec0a5daca2a98c490ad9c2c726be4cc74a99e3ba8" + sha256 ventura: "7d03aa1668de2cfb383369d4a84d86aa8445a0000950a152e6b92865489d4d7c" + sha256 arm64_linux: "9e75ebe01b3ef57d95ea18bbaa32e8dab5c00a90596b2739dc0a95365be73250" + sha256 x86_64_linux: "74ce4ec27335b9aec7c54cb57a76d1e686f31f4e24a5705e93fe3ff8affe8ade" + end + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "pkgconf" => :build + depends_on "groonga" + depends_on "lz4" + depends_on "lzo" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "krb5" + uses_from_macos "libedit" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_macos do + depends_on "openjdk" => :build + end + + on_linux do + depends_on "linux-pam" + end + + conflicts_with "mysql", "percona-server", because: "mariadb, mysql, and percona install the same binaries" + + # system libfmt patch, upstream pr ref, https://github.com/MariaDB/server/pull/3786 + patch do + url "https://github.com/MariaDB/server/commit/b6a924b8478d2fab5d51245ff6719b365d7db7f4.patch?full_index=1" + sha256 "77b65b35cf0166b8bb576254ac289845db5a8e64e03b41f1bf4b2045ac1cd2d1" + end + + # Backport fix for CMake 4.0 + patch do + url "https://github.com/codership/wsrep-lib/commit/324b01e4315623ce026688dd9da1a5f921ce7084.patch?full_index=1" + sha256 "eaa0c3b648b712b3dbab3d37dfca7fef8a072908dc28f2ed383fbe8d217be421" + directory "wsrep-lib" + end + + def install + ENV.runtime_cpu_detection + + # Backport fix for CMake 4.0 + # https://github.com/MariaDB/server/commit/cacaaebf01939d387645fb850ceeec5392496171 + inreplace "storage/mroonga/CMakeLists.txt", "cmake_minimum_required(VERSION 2.8.12)", "" + + # 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 + + # Use brew groonga + rm_r "storage/mroonga/vendor/groonga" + rm_r "extra/wolfssl" + rm_r "zlib" + + # -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_LIBFMT=system + -DWITH_PCRE=system + -DWITH_SSL=system + -DWITH_ZLIB=system + -DWITH_UNIT_TESTS=OFF + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_general_ci + -DINSTALL_SYSCONFDIR=#{etc} + -DCOMPILATION_COMMENT=#{tap.user} + ] + + if OS.linux? + args << "-DWITH_NUMA=OFF" + args << "-DENABLE_DTRACE=NO" + args << "-DCONNECT_WITH_JDBC=OFF" + end + + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args, *args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # 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" + + # Save space + rm_r(prefix/"mariadb-test") + rm_r(prefix/"sql-bench") + + # Link the setup scripts into bin + bin.install_symlink [ + prefix/"scripts/mariadb-install-db", + 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" + + # Fix user variable used by su_kill - Credit: https://stackoverflow.com/questions/59936589 + inreplace "#{prefix}/support-files/mysql.server", /^user='mysql'/, "user=$(whoami)" + + # 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_mariabackup + ].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 + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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 + EOS + end + + service do + run [opt_bin/"mariadbd-safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + system bin/"mysql_install_db", "--no-defaults", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp", + "--auth-root-authentication-method=normal" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end diff --git a/Formula/m/mariadb@10.10.rb b/Formula/m/mariadb@10.10.rb new file mode 100644 index 0000000000000..eaf9f81a16969 --- /dev/null +++ b/Formula/m/mariadb@10.10.rb @@ -0,0 +1,180 @@ +class MariadbAT1010 < Formula + desc "Drop-in replacement for MySQL" + homepage "https://mariadb.org/" + url "https://archive.mariadb.org/mariadb-10.10.7/source/mariadb-10.10.7.tar.gz" + sha256 "6db3d7be275b77181cf361499b76f40fa41b762a71ba75e78dec95e7b8215eb0" + license "GPL-2.0-only" + + bottle do + sha256 arm64_sonoma: "5f460c753a8cf8b47bcd6e35932ad51ec185e4f9c2f4c2ac464c2a537aaeb095" + sha256 arm64_ventura: "efdc0681e993b65fe71f5067886cbfe49ca51c622e46a0f39d688fba58687c94" + sha256 arm64_monterey: "2fe7becdef2925dc4c6f5cee6faae4031375fe8037adefc748d944abd6d3b82a" + sha256 sonoma: "f6760a3815638ae6e12c22c649b31c15af291774cabaa809b5ddc38f3a7ad4e4" + sha256 ventura: "6f1ac3e75141a3305852dd34fea5a703820161582d75232f7f7622eaeebc6c0d" + sha256 monterey: "c1d996bb543fd428313b650660eaa2d559759bc5e28504c85be78cf074077b62" + sha256 x86_64_linux: "607fd3dd9ceeab2bc0a761a7022c591ab82f03e21ab9aef3800bc5ba4ce2a07a" + end + + keg_only :versioned_formula + + # See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-1010/ + # End-of-life on 2023-11-17: https://mariadb.org/about/#maintenance-policy + disable! date: "2024-07-26", because: :unsupported + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "pkgconf" => :build + depends_on "groonga" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + depends_on "readline" # uses libedit on macOS + end + + def install + ENV.cxx11 + + # 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 + + # Use brew groonga + rm_r "storage/mroonga/vendor/groonga" + + # -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_LIBFMT=system + -DWITH_SSL=system + -DWITH_UNIT_TESTS=OFF + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_general_ci + -DINSTALL_SYSCONFDIR=#{etc} + -DCOMPILATION_COMMENT=#{tap.user} + ] + + if OS.linux? + args << "-DWITH_NUMA=OFF" + args << "-DENABLE_DTRACE=NO" + args << "-DCONNECT_WITH_JDBC=OFF" + end + + # Disable RocksDB on Apple Silicon (currently not supported) + args << "-DPLUGIN_ROCKSDB=NO" if Hardware::CPU.arm? + + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args, *args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # 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_r(prefix/"data") + + # Save space + rm_r(prefix/"mysql-test") + rm_r(prefix/"sql-bench") + + # Link the setup scripts into bin + bin.install_symlink [ + prefix/"scripts/mariadb-install-db", + 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_mariabackup + ].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 <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + 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 + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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 + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + system bin/"mysql_install_db", "--no-defaults", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp", + "--auth-root-authentication-method=normal" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end diff --git a/Formula/m/mariadb@10.11.rb b/Formula/m/mariadb@10.11.rb new file mode 100644 index 0000000000000..490d237c009e5 --- /dev/null +++ b/Formula/m/mariadb@10.11.rb @@ -0,0 +1,203 @@ +class MariadbAT1011 < Formula + desc "Drop-in replacement for MySQL" + homepage "https://mariadb.org/" + url "https://archive.mariadb.org/mariadb-10.11.12/source/mariadb-10.11.12.tar.gz" + sha256 "d61f23090cfc14f43e8a27c2d3ce7f80247e74481bb26a2d3a6308b8d194e167" + license "GPL-2.0-only" + + livecheck do + url "https://downloads.mariadb.org/rest-api/mariadb/all-releases/?olderReleases=false" + strategy :json do |json| + json["releases"]&.map do |release| + next unless release["release_number"]&.start_with?(version.major_minor) + next if release["status"] != "stable" + + release["release_number"] + end + end + end + + bottle do + sha256 arm64_sequoia: "cd0fbe5bf3e9035fb2e8799d0e91c897c47a31bc38401d31509b8d9411286d1a" + sha256 arm64_sonoma: "af1719894b04e042421e4317d6068263927814425836991d541333fb5ada39db" + sha256 arm64_ventura: "f4f4a43875c097500c3da176586f19f532893e2cff43cab2cbfe91696e6e3aca" + sha256 sonoma: "0787ae74054567bc9fdf7d29f5ccbdbe6e51826bf9686dcb690360f116edbc72" + sha256 ventura: "d1eb3e6452d85a1b5b991be1133f149955bd0ee37bacd4c801842d9ad85a883b" + sha256 arm64_linux: "929665421463109a022d8cc7506ad3eb0f6b48aa6de5e0dd46760b97e2d5e549" + sha256 x86_64_linux: "0a1f70f085cc78310f369d371f92ee18334b84e27fea363ac4a89c1daff2e41d" + end + + keg_only :versioned_formula + + # See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-1011/ + # End-of-life on 2028-02-16: https://mariadb.org/about/#maintenance-policy + deprecate! date: "2028-02-16", because: :unsupported + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "openjdk" => :build + depends_on "pkgconf" => :build + + depends_on "groonga" + depends_on "lz4" + depends_on "lzo" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "krb5" + uses_from_macos "libedit" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + depends_on "readline" # uses libedit on macOS + end + + def install + ENV.runtime_cpu_detection + ENV.cxx11 + + # Backport fix for CMake 4.0 in columnstore submodule + # https://github.com/mariadb-corporation/mariadb-columnstore-engine/commit/726cc3684b4de08934c2b14f347799fd8c3aac9a + # https://github.com/mariadb-corporation/mariadb-columnstore-engine/commit/7e17d8825409fb8cc0629bfd052ffac6e542b50e + inreplace "storage/columnstore/columnstore/CMakeLists.txt", + "CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)", + "CMAKE_MINIMUM_REQUIRED(VERSION 3.10)" + + # 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 + + # Use brew groonga + rm_r "storage/mroonga/vendor/groonga" + + # -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_LIBFMT=system + -DWITH_SSL=system + -DWITH_UNIT_TESTS=OFF + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_general_ci + -DINSTALL_SYSCONFDIR=#{etc} + -DCOMPILATION_COMMENT=#{tap.user} + ] + + if OS.linux? + args << "-DWITH_NUMA=OFF" + args << "-DENABLE_DTRACE=NO" + args << "-DCONNECT_WITH_JDBC=OFF" + end + + # Disable RocksDB on Apple Silicon (currently not supported) + args << "-DPLUGIN_ROCKSDB=NO" if Hardware::CPU.arm? + + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args, *args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # 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" + + # Save space + rm_r(prefix/"mysql-test") + rm_r(prefix/"sql-bench") + + # Link the setup scripts into bin + bin.install_symlink [ + prefix/"scripts/mariadb-install-db", + 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_mariabackup + ].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 <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + 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 + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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 + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + system bin/"mysql_install_db", "--no-defaults", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp", + "--auth-root-authentication-method=normal" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end diff --git a/Formula/m/mariadb@10.4.rb b/Formula/m/mariadb@10.4.rb new file mode 100644 index 0000000000000..f870360cad277 --- /dev/null +++ b/Formula/m/mariadb@10.4.rb @@ -0,0 +1,179 @@ +class MariadbAT104 < Formula + desc "Drop-in replacement for MySQL" + homepage "https://mariadb.org/" + url "https://archive.mariadb.org/mariadb-10.4.34/source/mariadb-10.4.34.tar.gz" + sha256 "c657bdbca790c3106dc781a207f4b67d467571945164725d37cc7e42cc2a590a" + license "GPL-2.0-only" + + bottle do + sha256 arm64_sonoma: "3a5bb21c7310991538c31c4851db1c0fdc93698ff5dca5d19326d8f1196a2424" + sha256 arm64_ventura: "6d16a9889a56479bf5795e9d031f5c983de4c0655b7de37ac57e330b99db50f5" + sha256 arm64_monterey: "5c82ee18f3a09d2a354ecdd54cae80ffc4d2edf2c7b12e94307ab2db27a80bea" + sha256 sonoma: "2de52f8d7109c23e04cf81a1691ef34cfce5d03802b20828bcf2e00b057d5a56" + sha256 ventura: "18fbd5965a4060a7345efe359dc7f38399eb51fd52fc0b905c71d25878e2bb41" + sha256 monterey: "0878ebf0913e0766441d60758105e804cacae4cdebbbfddf64bcae9bc61662a2" + sha256 x86_64_linux: "560cdb9cc44b8eb6a2663b616ca44cd5f5948ccdec61c162fb7b6be499d5dc5d" + end + + keg_only :versioned_formula + + # See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-104/ + # End-of-life on 2024-06-18: https://mariadb.org/about/#maintenance-policy + # Cannot use `openssl@3`, so we match the deprecation date of `openssl@1.1` + disable! date: "2024-08-01", because: :unsupported + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "groonga" + depends_on "openssl@1.1" + depends_on "pcre2" + + uses_from_macos "bzip2" + uses_from_macos "krb5" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "xz" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + end + + 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 + + # Use brew groonga + rm_r "storage/mroonga/vendor/groonga" + + # -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_READLINE=yes + -DWITH_SSL=yes + -DWITH_UNIT_TESTS=OFF + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_general_ci + -DINSTALL_SYSCONFDIR=#{etc} + -DCOMPILATION_COMMENT=Homebrew + ] + + if OS.linux? + args << "-DWITH_NUMA=OFF" + args << "-DENABLE_DTRACE=NO" + args << "-DCONNECT_WITH_JDBC=OFF" + end + + if OS.mac? + args << "-DWITH_READLINE=NO" # uses libedit on macOS + end + + # disable TokuDB, which is currently not supported on macOS + args << "-DPLUGIN_TOKUDB=NO" + + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args, *args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # 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_r(prefix/"data") + + # Save space + rm_r(prefix/"mysql-test") + rm_r(prefix/"sql-bench") + + # 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_mariabackup + ].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 <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + 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 + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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 + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + system bin/"mysql_install_db", "--no-defaults", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp", + "--auth-root-authentication-method=normal" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end diff --git a/Formula/m/mariadb@10.5.rb b/Formula/m/mariadb@10.5.rb new file mode 100644 index 0000000000000..a6fee3ad4d562 --- /dev/null +++ b/Formula/m/mariadb@10.5.rb @@ -0,0 +1,204 @@ +class MariadbAT105 < Formula + desc "Drop-in replacement for MySQL" + homepage "https://mariadb.org/" + url "https://archive.mariadb.org/mariadb-10.5.29/source/mariadb-10.5.29.tar.gz" + sha256 "de49ed417f6fa90e8fee72a41e526e0983dc47f388caff9e703803cec263b826" + license "GPL-2.0-only" + + livecheck do + url "https://downloads.mariadb.org/rest-api/mariadb/all-releases/?olderReleases=false" + strategy :json do |json| + json["releases"]&.map do |release| + next unless release["release_number"]&.start_with?(version.major_minor) + next if release["status"] != "stable" + + release["release_number"] + end + end + end + + bottle do + sha256 arm64_sequoia: "fbc6c60828c5b08de909657354aa0ae4b61ed7016e16fe3cb0ba0202f761a163" + sha256 arm64_sonoma: "4d82bc0d05b270c8d6b1aff58a8303b9eaaa694c4c6d99ffb3f980dd95a9ad6e" + sha256 arm64_ventura: "b639bb146a4e838d542810b16b2fe090b5223428d1d832e7bca6afdf0a976555" + sha256 sonoma: "9820c413100a32e67e7efb0027a18b8a314eedd15dcd7fb6bb91b34c3fdef322" + sha256 ventura: "12ef4bda287ca4dde510dbb1cee7ebddc8abdf8f2117fcc8f37cb23263d21015" + sha256 arm64_linux: "50752547002571ba3b54aa3624e7ac74b8d3a514b9a23513c6c3e27336c6b64b" + sha256 x86_64_linux: "a35b606e2aac03025965c0ac65a7894de48d6c1eb94e9786c60cc5ac3f9514db" + end + + keg_only :versioned_formula + + # See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-105/ + # End-of-life on 2025-06-24: https://mariadb.org/about/#maintenance-policy + deprecate! date: "2025-06-24", because: :unsupported + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "openjdk" => :build + depends_on "pkgconf" => :build + + depends_on "groonga" + depends_on "lz4" + depends_on "lzo" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "krb5" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "xz" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + end + + def install + ENV.runtime_cpu_detection + + # Backport fix for CMake 4.0 in columnstore submodule + # https://github.com/mariadb-corporation/mariadb-columnstore-engine/commit/726cc3684b4de08934c2b14f347799fd8c3aac9a + # https://github.com/mariadb-corporation/mariadb-columnstore-engine/commit/7e17d8825409fb8cc0629bfd052ffac6e542b50e + inreplace "storage/columnstore/columnstore/CMakeLists.txt", + "CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)", + "CMAKE_MINIMUM_REQUIRED(VERSION 3.10)" + + # 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 + + # Use brew groonga + rm_r "storage/mroonga/vendor/groonga" + + # -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_READLINE=yes + -DWITH_SSL=yes + -DWITH_UNIT_TESTS=OFF + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_general_ci + -DINSTALL_SYSCONFDIR=#{etc} + -DCOMPILATION_COMMENT=#{tap.user} + ] + + if OS.linux? + args << "-DWITH_NUMA=OFF" + args << "-DENABLE_DTRACE=NO" + args << "-DCONNECT_WITH_JDBC=OFF" + end + + if OS.mac? + args << "-DWITH_READLINE=NO" # uses libedit on macOS + end + + # disable TokuDB, which is currently not supported on macOS + args << "-DPLUGIN_TOKUDB=NO" + + # Disable RocksDB on Apple Silicon (currently not supported) + args << "-DPLUGIN_ROCKSDB=NO" if Hardware::CPU.arm? + + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args, *args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # 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" + + # Save space + rm_r(prefix/"mysql-test") + rm_r(prefix/"sql-bench") + + # 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_mariabackup + ].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 <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + 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 + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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 + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + system bin/"mysql_install_db", "--no-defaults", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp", + "--auth-root-authentication-method=normal" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end diff --git a/Formula/m/mariadb@10.6.rb b/Formula/m/mariadb@10.6.rb new file mode 100644 index 0000000000000..c98e97380b274 --- /dev/null +++ b/Formula/m/mariadb@10.6.rb @@ -0,0 +1,197 @@ +class MariadbAT106 < Formula + desc "Drop-in replacement for MySQL" + homepage "https://mariadb.org/" + url "https://archive.mariadb.org/mariadb-10.6.22/source/mariadb-10.6.22.tar.gz" + sha256 "2ca600dc7e85ead1f33c212f9d76b1f2f812d249c8bde02e5f38ead098ade420" + license "GPL-2.0-only" + + livecheck do + url "https://downloads.mariadb.org/rest-api/mariadb/all-releases/?olderReleases=false" + strategy :json do |json| + json["releases"]&.map do |release| + next unless release["release_number"]&.start_with?(version.major_minor) + next if release["status"] != "stable" + + release["release_number"] + end + end + end + + bottle do + sha256 arm64_sequoia: "942a2ce7b84cc905ac82fa13d235d7f38bbf53a77f1d3d68ca66bad93d047a55" + sha256 arm64_sonoma: "c716ee48c769c11bece7fb3e7c8cba9ca6aca9201474089695b676a4a7fd2c6a" + sha256 arm64_ventura: "ce6ec0d37c64f103680b05280fed1cfb35a23a7746320a5b8584923b87205cdf" + sha256 sonoma: "f5e97c072d4943f9423669205f43914485f7154731d3cee33d2d67db93ee8bc9" + sha256 ventura: "689b21abf431d8ea1904f684c69a6b4d4ab994bda8a32a750f41a235013e0003" + sha256 arm64_linux: "1e1dd55600e0864ed9a58760bd6f77486d9db76b6fb2ca9c69af2b0b6fbc63f3" + sha256 x86_64_linux: "0d482c2aed000e5bc0fcba8673782af0479b0313bf2a2f78c223a9d742c51e6b" + end + + keg_only :versioned_formula + + # See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-106/ + deprecate! date: "2026-06-01", because: :unsupported + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "openjdk" => :build + depends_on "pkgconf" => :build + + depends_on "groonga" + depends_on "lz4" + depends_on "lzo" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "krb5" + uses_from_macos "libedit" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "xz" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + depends_on "readline" # uses libedit on macOS + end + + def install + ENV.runtime_cpu_detection + + # Backport fix for CMake 4.0 in columnstore submodule + # https://github.com/mariadb-corporation/mariadb-columnstore-engine/commit/726cc3684b4de08934c2b14f347799fd8c3aac9a + # https://github.com/mariadb-corporation/mariadb-columnstore-engine/commit/7e17d8825409fb8cc0629bfd052ffac6e542b50e + inreplace "storage/columnstore/columnstore/CMakeLists.txt", + "CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)", + "CMAKE_MINIMUM_REQUIRED(VERSION 3.10)" + + # 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 + + # Use brew groonga + rm_r "storage/mroonga/vendor/groonga" + + # -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_SSL=yes + -DWITH_UNIT_TESTS=OFF + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_general_ci + -DINSTALL_SYSCONFDIR=#{etc} + -DCOMPILATION_COMMENT=#{tap.user} + ] + + if OS.linux? + args << "-DWITH_NUMA=OFF" + args << "-DENABLE_DTRACE=NO" + args << "-DCONNECT_WITH_JDBC=OFF" + end + + # Disable RocksDB on Apple Silicon (currently not supported) + args << "-DPLUGIN_ROCKSDB=NO" if Hardware::CPU.arm? + + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args, *args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # 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" + + # Save space + rm_r(prefix/"mysql-test") + rm_r(prefix/"sql-bench") + + # 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_mariabackup + ].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 + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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 + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + system bin/"mysql_install_db", "--no-defaults", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp", + "--auth-root-authentication-method=normal" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end diff --git a/Formula/m/mariadb@10.9.rb b/Formula/m/mariadb@10.9.rb new file mode 100644 index 0000000000000..054c946f0d3f9 --- /dev/null +++ b/Formula/m/mariadb@10.9.rb @@ -0,0 +1,193 @@ +class MariadbAT109 < Formula + desc "Drop-in replacement for MySQL" + homepage "https://mariadb.org/" + url "https://archive.mariadb.org/mariadb-10.9.8/source/mariadb-10.9.8.tar.gz" + sha256 "fcdc6f73882477c20310e795a02f746e54934aa7a8b368900bd45e78a5daf6ed" + license "GPL-2.0-only" + + bottle do + sha256 arm64_sonoma: "2026b53c5752ce6113ed7c8af1318fdbc0e0d6733115b8dada7bd035cf9bf7c4" + sha256 arm64_ventura: "65cb2f2fdd5c29ad8f14f9f0a55970b61285fa2be6e5ed29dcdfa1872638b5c8" + sha256 arm64_monterey: "1d9aa2dcc5ec1cc3856d7d3caf36b98eee15044105e7df4d44c43c7eba9e2547" + sha256 arm64_big_sur: "4caba5b164a403900c0678b4407c05b05b98458d9aaa63e0661421d8548a58c4" + sha256 sonoma: "206df40f0fb3bae52c8edb5994260ae35e7090ec9bdf39bc8b83c9cb13701418" + sha256 ventura: "7d10b5f059ddab6df41cffe7c0956307b0a5dbade98a317aa39b3d414ba01708" + sha256 monterey: "6f76bcbba2e365771130061f42b8618dd5c33783507aa8257bc151e27ecab0f5" + sha256 big_sur: "404272fdb775d32dd35cea91a4affb3e2a7bd938f84ef7ad038f3bede3edc52d" + sha256 x86_64_linux: "703f2525b34e8745ca5586a4372eba4380cda8a32504f70d10f1105647391314" + end + + keg_only :versioned_formula + + # See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-109/ + # End-of-life on 2023-08-22: https://mariadb.org/about/#maintenance-policy + disable! date: "2024-07-26", because: :unsupported + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "pkgconf" => :build + depends_on "groonga" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + depends_on "readline" # uses libedit on macOS + end + + # Fix libfmt usage. + # https://github.com/MariaDB/server/pull/2732 + patch do + url "https://github.com/MariaDB/server/commit/f4cec369a392c8a6056207012992ad4a5639965a.patch?full_index=1" + sha256 "1851d5ae209c770e8fd1ba834b840be12d7b537b96c7efa3d4e7c9523f188912" + end + patch do + url "https://github.com/MariaDB/server/commit/cd5808eb8da13c5626d4bdeb452cef6ada29cb1d.patch?full_index=1" + sha256 "4d288f82f56c61278aefecba8a90d214810b754e234f40b338e8cc809e0369e9" + end + + def install + ENV.cxx11 + + # 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 + + # Use brew groonga + rm_r "storage/mroonga/vendor/groonga" + + # -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_LIBFMT=system + -DWITH_SSL=system + -DWITH_UNIT_TESTS=OFF + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_general_ci + -DINSTALL_SYSCONFDIR=#{etc} + -DCOMPILATION_COMMENT=#{tap.user} + ] + + if OS.linux? + args << "-DWITH_NUMA=OFF" + args << "-DENABLE_DTRACE=NO" + args << "-DCONNECT_WITH_JDBC=OFF" + end + + # Disable RocksDB on Apple Silicon (currently not supported) + args << "-DPLUGIN_ROCKSDB=NO" if Hardware::CPU.arm? + + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args, *args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # 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_r(prefix/"data") + + # Save space + rm_r(prefix/"mysql-test") + rm_r(prefix/"sql-bench") + + # Link the setup scripts into bin + bin.install_symlink [ + prefix/"scripts/mariadb-install-db", + 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_mariabackup + ].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 <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + 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 + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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 + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + system bin/"mysql_install_db", "--no-defaults", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp", + "--auth-root-authentication-method=normal" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end diff --git a/Formula/m/mariadb@11.0.rb b/Formula/m/mariadb@11.0.rb new file mode 100644 index 0000000000000..e6f56809c93e7 --- /dev/null +++ b/Formula/m/mariadb@11.0.rb @@ -0,0 +1,184 @@ +class MariadbAT110 < Formula + desc "Drop-in replacement for MySQL" + homepage "https://mariadb.org/" + url "https://archive.mariadb.org/mariadb-11.0.6/source/mariadb-11.0.6.tar.gz" + sha256 "0189d62946c37c6db46bf1a468ba9580bcba8e80f05958ec483c3387eccf9a00" + license "GPL-2.0-only" + + bottle do + sha256 arm64_sonoma: "89a7b94bb9f795bbe4f842da5648232c6a974e0dd76ba69fe8a0952db13d836f" + sha256 arm64_ventura: "7bddd7c137bfc4085f961af777564355dc3180d20855f958638462690cc2eda3" + sha256 arm64_monterey: "05de2b71a4a1959456dd3b093a2281ec73a075aa89fb8313565587b86de1ee3a" + sha256 sonoma: "29b52fc34f3baafed57a2b5640555dd72bf2e1a7753ebdd4a5031312080641e8" + sha256 ventura: "5f3045c31659a0cb39c53252c4bc1b5d0091e91fddd095884989ae8562ad61ba" + sha256 monterey: "c6f4fbfcd81558b8982b86eb0fa60a4b024d4b0382a78a5e099afd165f9901f8" + sha256 x86_64_linux: "de33515a31b8b4cd6a72c2c7bc17b64396f977573a394804cd7eabbc2448e2db" + end + + keg_only :versioned_formula + + # See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-11-0/ + # End-of-life on 2024-06-06: https://mariadb.org/about/#maintenance-policy + disable! date: "2024-08-16", because: :unsupported + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "pkgconf" => :build + depends_on "groonga" + depends_on "lz4" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "krb5" + uses_from_macos "libedit" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + depends_on "readline" # uses libedit on macOS + end + + def install + ENV.cxx11 + + # 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 + + # Use brew groonga + rm_r "storage/mroonga/vendor/groonga" + + # -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_LIBFMT=system + -DWITH_SSL=system + -DWITH_UNIT_TESTS=OFF + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_general_ci + -DINSTALL_SYSCONFDIR=#{etc} + -DCOMPILATION_COMMENT=#{tap.user} + ] + + if OS.linux? + args << "-DWITH_NUMA=OFF" + args << "-DENABLE_DTRACE=NO" + args << "-DCONNECT_WITH_JDBC=OFF" + end + + # Disable RocksDB on Apple Silicon (currently not supported) + args << "-DPLUGIN_ROCKSDB=NO" if Hardware::CPU.arm? + + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args, *args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # 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_r(prefix/"data") + + # Save space + rm_r(prefix/"mysql-test") + rm_r(prefix/"sql-bench") + + # Link the setup scripts into bin + bin.install_symlink [ + prefix/"scripts/mariadb-install-db", + 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_mariabackup + ].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 + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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 + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + system bin/"mysql_install_db", "--no-defaults", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp", + "--auth-root-authentication-method=normal" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end diff --git a/Formula/m/mariadb@11.1.rb b/Formula/m/mariadb@11.1.rb new file mode 100644 index 0000000000000..9df24a58b5567 --- /dev/null +++ b/Formula/m/mariadb@11.1.rb @@ -0,0 +1,183 @@ +class MariadbAT111 < Formula + desc "Drop-in replacement for MySQL" + homepage "https://mariadb.org/" + url "https://archive.mariadb.org/mariadb-11.1.6/source/mariadb-11.1.6.tar.gz" + sha256 "57845d2e67664bed7257ea49bb448b9956a7a6a35bef3f4808c08db2ee2e62a0" + license "GPL-2.0-only" + + bottle do + sha256 arm64_sonoma: "4ef5348f4474d01d8269a3f5fc9070958c322960798b9c031f1ccb638a83ff54" + sha256 arm64_ventura: "3c1bf67f7a0d7632dff4e6a131884b38dc96f030b8e192fbb7c4f7a53b20de00" + sha256 arm64_monterey: "bf7ff61e7f400daca83e949a8bec0f2a2e6798cf0d0074efec38382b0a6c7faf" + sha256 sonoma: "707fdba48d56488fe6c550b965a42e5b286c5fb23fbedfab6aa2bd22f4c5b42a" + sha256 ventura: "f0a104da95debbd06b606ba196c3981ca5202f11f83bdcae75632d333941d72b" + sha256 monterey: "1005279887b8e624b1c45770ff53b09bd459f9abfba331c72c2739f8e6a5eadf" + sha256 x86_64_linux: "d138411289737b7730bfdd3d4e4b741d841ce4f025a63e75bddcbf78fd06a701" + end + + keg_only :versioned_formula + + # See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-11-1/ + # End-of-life on 2024-08-21: https://mariadb.org/about/#maintenance-policy + disable! date: "2024-08-21", because: :unsupported + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "openjdk" => :build + depends_on "pkgconf" => :build + + depends_on "groonga" + depends_on "lz4" + depends_on "lzo" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "krb5" + uses_from_macos "libedit" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + depends_on "readline" # uses libedit on macOS + end + + def install + ENV.cxx11 + + # 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 + + # Use brew groonga + rm_r "storage/mroonga/vendor/groonga" + + # -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_LIBFMT=system + -DWITH_SSL=system + -DWITH_UNIT_TESTS=OFF + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_general_ci + -DINSTALL_SYSCONFDIR=#{etc} + -DCOMPILATION_COMMENT=#{tap.user} + ] + + if OS.linux? + args << "-DWITH_NUMA=OFF" + args << "-DENABLE_DTRACE=NO" + args << "-DCONNECT_WITH_JDBC=OFF" + end + + # Disable RocksDB on Apple Silicon (currently not supported) + args << "-DPLUGIN_ROCKSDB=NO" if Hardware::CPU.arm? + + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args, *args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # 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" + + # Save space + rm_r(prefix/"mariadb-test") + rm_r(prefix/"sql-bench") + + # Link the setup scripts into bin + bin.install_symlink [ + prefix/"scripts/mariadb-install-db", + 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_mariabackup + ].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 + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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 + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + system bin/"mysql_install_db", "--no-defaults", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp", + "--auth-root-authentication-method=normal" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end diff --git a/Formula/m/mariadb@11.2.rb b/Formula/m/mariadb@11.2.rb new file mode 100644 index 0000000000000..6a67b3f0f2e65 --- /dev/null +++ b/Formula/m/mariadb@11.2.rb @@ -0,0 +1,182 @@ +class MariadbAT112 < Formula + desc "Drop-in replacement for MySQL" + homepage "https://mariadb.org/" + url "https://archive.mariadb.org/mariadb-11.2.6/source/mariadb-11.2.6.tar.gz" + sha256 "1cd0a7cfd5f9e25d8526aa70b1130743f9e551d8d03fe7ccdd2107b4e172d579" + license "GPL-2.0-only" + + bottle do + sha256 arm64_sequoia: "951ac2e9c45f3ff6510824fe7cfdcbb5f33252230b71487859444fb192c6ef87" + sha256 arm64_sonoma: "a7bacbd1b817fd5d0a81a7f386e844326b8851c36e766b06dad96d8d0d297bf3" + sha256 arm64_ventura: "60995c9313f47d351f0d2001b98e1ce3c7553c6c67408d6f1155bf39b8187a8b" + sha256 sonoma: "5fe3cfcf0a013dc6a8fcd034db430c86c9521fe4220f6cbbf9bad0e88d13511b" + sha256 ventura: "cd711685382e00b4f01e48fda8878c8133b55de7b0a837eda8c8d9d6c870f333" + sha256 x86_64_linux: "92ff06ac0983475276d49f456bac29c649898c2855e313e751073e37a84e89f6" + end + + keg_only :versioned_formula + + # See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-11-2/ + # End-of-life on 2024-11-21: https://mariadb.org/about/#maintenance-policy + disable! date: "2024-11-21", because: :unsupported + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "openjdk" => :build + depends_on "pkgconf" => :build + + depends_on "groonga" + depends_on "lz4" + depends_on "lzo" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "krb5" + uses_from_macos "libedit" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_linux do + depends_on "linux-pam" + depends_on "readline" # uses libedit on macOS + end + + def install + ENV.cxx11 + + # 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 + + # Use brew groonga + rm_r "storage/mroonga/vendor/groonga" + + # -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_LIBFMT=system + -DWITH_SSL=system + -DWITH_UNIT_TESTS=OFF + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_general_ci + -DINSTALL_SYSCONFDIR=#{etc} + -DCOMPILATION_COMMENT=#{tap.user} + ] + + if OS.linux? + args << "-DWITH_NUMA=OFF" + args << "-DENABLE_DTRACE=NO" + args << "-DCONNECT_WITH_JDBC=OFF" + end + + # Disable RocksDB on Apple Silicon (currently not supported) + args << "-DPLUGIN_ROCKSDB=NO" if Hardware::CPU.arm? + + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args, *args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # 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" + + # Save space + rm_r(prefix/"mariadb-test") + rm_r(prefix/"sql-bench") + + # Link the setup scripts into bin + bin.install_symlink [ + prefix/"scripts/mariadb-install-db", + 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_mariabackup + ].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 <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + 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 + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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 + EOS + end + + service do + run [opt_bin/"mysqld_safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + system bin/"mysql_install_db", "--no-defaults", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp", + "--auth-root-authentication-method=normal" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end diff --git a/Formula/m/mariadb@11.4.rb b/Formula/m/mariadb@11.4.rb new file mode 100644 index 0000000000000..967227e64e9db --- /dev/null +++ b/Formula/m/mariadb@11.4.rb @@ -0,0 +1,197 @@ +class MariadbAT114 < Formula + desc "Drop-in replacement for MySQL" + homepage "https://mariadb.org/" + url "https://archive.mariadb.org/mariadb-11.4.6/source/mariadb-11.4.6.tar.gz" + sha256 "1b26c0bb2d025dbfac3b9852d2b7eafda56a171b67ac2e27831ec0414fb7df07" + license "GPL-2.0-only" + + livecheck do + url "https://downloads.mariadb.org/rest-api/mariadb/all-releases/?olderReleases=false" + strategy :json do |json| + json["releases"]&.map do |release| + next unless release["release_number"]&.start_with?(version.major_minor) + next if release["status"] != "stable" + + release["release_number"] + end + end + end + + bottle do + sha256 arm64_sequoia: "69c66775aaf4416a552e06026e7830dd6d9ed516fd482b39d078e75ea4a1f35a" + sha256 arm64_sonoma: "b46c4fdd9bbb04c8e692855bea7eba13751e5fa36686674a036fa52d1491f6e0" + sha256 arm64_ventura: "7a6c80e7d28e49822f1a417308f5826f97a6a11cf934af3f64c40c0c378fff60" + sha256 sonoma: "25a5671345926af66ed688162d1af6ec714715ed0c59169299c36618eab65dbb" + sha256 ventura: "001bd3c1d200bda85099131acac703803b9dd1f43fe13555a15e68a86d73d21e" + sha256 arm64_linux: "902fbdaf9b7a501a7d4496f501fac13151c63b9f88590277047e66e71e4b0806" + sha256 x86_64_linux: "fbdd67efee538d64a9fb5ae707eb2f8307be19e25615ef5a1c2652fa626ab232" + end + + keg_only :versioned_formula + + # See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-11-4/ + # End-of-life on 2029-05-29: https://mariadb.org/about/#maintenance-policy + deprecate! date: "2029-05-29", because: :unsupported + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "fmt" => :build + depends_on "pkgconf" => :build + depends_on "groonga" + depends_on "lz4" + depends_on "lzo" + depends_on "openssl@3" + depends_on "pcre2" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "krb5" + uses_from_macos "libedit" + uses_from_macos "libxcrypt" + uses_from_macos "libxml2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_macos do + depends_on "openjdk" => :build + end + + on_linux do + depends_on "linux-pam" + end + + def install + ENV.runtime_cpu_detection + + # 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 + + # Use brew groonga + rm_r "storage/mroonga/vendor/groonga" + rm_r "extra/wolfssl" + rm_r "zlib" + + # -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_LIBFMT=system + -DWITH_PCRE=system + -DWITH_SSL=system + -DWITH_ZLIB=system + -DWITH_UNIT_TESTS=OFF + -DDEFAULT_CHARSET=utf8mb4 + -DDEFAULT_COLLATION=utf8mb4_general_ci + -DINSTALL_SYSCONFDIR=#{etc} + -DCOMPILATION_COMMENT=#{tap.user} + ] + + if OS.linux? + args << "-DWITH_NUMA=OFF" + args << "-DENABLE_DTRACE=NO" + args << "-DCONNECT_WITH_JDBC=OFF" + end + + system "cmake", "-S", ".", "-B", "_build", *std_cmake_args, *args + system "cmake", "--build", "_build" + system "cmake", "--install", "_build" + + # 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" + + # Save space + rm_r(prefix/"mariadb-test") + rm_r(prefix/"sql-bench") + + # Link the setup scripts into bin + bin.install_symlink [ + prefix/"scripts/mariadb-install-db", + 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_mariabackup + ].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 <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + 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 + + # Don't initialize database, it clashes when testing other MySQL-like implementations. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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 + EOS + end + + service do + run [opt_bin/"mariadbd-safe", "--datadir=#{var}/mysql"] + keep_alive true + working_dir var + end + + test do + (testpath/"mysql").mkpath + (testpath/"tmp").mkpath + system bin/"mysql_install_db", "--no-defaults", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp", + "--auth-root-authentication-method=normal" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end diff --git a/Formula/m/marisa.rb b/Formula/m/marisa.rb new file mode 100644 index 0000000000000..313140559f82c --- /dev/null +++ b/Formula/m/marisa.rb @@ -0,0 +1,51 @@ +class Marisa < Formula + desc "Matching Algorithm with Recursively Implemented StorAge" + homepage "https://github.com/s-yata/marisa-trie" + url "https://github.com/s-yata/marisa-trie/archive/refs/tags/v0.2.6.tar.gz" + sha256 "1063a27c789e75afa2ee6f1716cc6a5486631dcfcb7f4d56d6485d2462e566de" + license all_of: ["BSD-2-Clause", "LGPL-2.1-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "3e875c402f816ea59607b35dfaba1ca3556934b77f3adf9522a662b474a531de" + sha256 cellar: :any, arm64_sonoma: "71fa0487725231a5d3c5d53f7564279b4f40d684939392d90f2d446502304666" + sha256 cellar: :any, arm64_ventura: "96d9aac1c7bd7c4f0d927619215b2216791f83ed80693b86706e0077062dfe81" + sha256 cellar: :any, sonoma: "89899d1173f4dcacc825068599a458c818f42c9ff2c6ae9dccac56a0eec837e6" + sha256 cellar: :any, ventura: "fc0d60913ac0333a5dc9f977e77f466388b5484c8e77cf190e80c48b582f9deb" + sha256 cellar: :any_skip_relocation, arm64_linux: "85694a17eae4c73ae6a61c691bc6fa526a662389bc215decaf9e2d4cd97465c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45455df30c80232d1c7d16146b550fea52fbd71d0bc341bdbe3acae2038b4286" + 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" + system "make", "install" + end + + test do + (testpath/"test.cc").write <<~CPP + #include + #include + #include + #include + #include + #include + + #include + + int main(void) + { + int x = 100, y = 200; + marisa::swap(x, y); + std::cout << x << "," << y << std::endl; + } + CPP + + system ENV.cxx, "./test.cc", "-o", "test" + assert_equal "200,100", shell_output("./test").strip + end +end diff --git a/Formula/m/markdown-oxide.rb b/Formula/m/markdown-oxide.rb new file mode 100644 index 0000000000000..c4b7296bbc3ea --- /dev/null +++ b/Formula/m/markdown-oxide.rb @@ -0,0 +1,39 @@ +class MarkdownOxide < Formula + desc "Personal Knowledge Management System for the LSP" + homepage "https://oxide.md/" + url "https://github.com/Feel-ix-343/markdown-oxide/archive/refs/tags/v0.25.1.tar.gz" + sha256 "2c711aa5f191de202b8496f397b74403c252a6fefc47e69dccc3f335972cc14e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5de9a51f1ad3805fbcd2788ef966ec5689beb2c8e2c3dc45da68565208c676e8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "15c0d7be3f8de4d1a75407bb7b5ae4521edbfb581411fd84d072f6e57c5efc26" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3cd3d13fd7aab27c124a6aeb1ea3cfce9bb01b787143687480f450ae699c66e7" + sha256 cellar: :any_skip_relocation, sonoma: "756a5a988edc724638d826f909acaccf2595244d7c9b68a3750e58bcdc96f85d" + sha256 cellar: :any_skip_relocation, ventura: "9f59ed0bfa0121cec2ca7cd9184cdc88ba3d1e7c011621be4bfed65aa99f0476" + sha256 cellar: :any_skip_relocation, arm64_linux: "dba7466889612e1c2876bd03ae2533e4ab9a178b72f46494a5f59fe438b87d61" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77247a34ce563268c068275123ef43abd3e32f9bb9ac034c962cf351c8f4f61b" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + assert_match(/^Content-Length: \d+/i, + pipe_output(bin/"markdown-oxide", "Content-Length: #{json.size}\r\n\r\n#{json}")) + end +end diff --git a/Formula/m/markdown-toc.rb b/Formula/m/markdown-toc.rb new file mode 100644 index 0000000000000..86ec0c7c99fde --- /dev/null +++ b/Formula/m/markdown-toc.rb @@ -0,0 +1,24 @@ +class MarkdownToc < Formula + desc "Generate a markdown TOC (table of contents) with Remarkable" + homepage "https://github.com/jonschlinkert/markdown-toc" + url "https://registry.npmjs.org/markdown-toc/-/markdown-toc-1.2.0.tgz" + sha256 "4a5bf3efafb21217889ab240caacd795a1101bfbe07cd8abb228cc44937acd9c" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "2817812b6a1d6a1e613ad337524dbd04afcc3ee306c8ddecab56c6835468d11c" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_equal "- [One](#one)\n- [Two](#two)", + shell_output("bash -c \"#{bin}/markdown-toc - <<< $'# One\\n\\n# Two'\"").strip + end +end diff --git a/Formula/m/markdown.rb b/Formula/m/markdown.rb new file mode 100644 index 0000000000000..48530875ce4e0 --- /dev/null +++ b/Formula/m/markdown.rb @@ -0,0 +1,28 @@ +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" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?Markdown[._-]v?(\d+(?:\.\d+)+)\.zip/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "ba5a95424267c48417d20a1ca2a253366c9741d7d2dcbe71fd7715c1babd1b8a" + 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/m/markdownlint-cli.rb b/Formula/m/markdownlint-cli.rb new file mode 100644 index 0000000000000..07dd04200fcd3 --- /dev/null +++ b/Formula/m/markdownlint-cli.rb @@ -0,0 +1,39 @@ +class MarkdownlintCli < Formula + desc "CLI for Node.js style checker and lint tool for Markdown files" + homepage "https://github.com/igorshubovych/markdownlint-cli" + url "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.44.0.tgz" + sha256 "df1ea79f06226d09e539f59e80b9c1f49baa01af3f97011fb5c621a3fd92bf6d" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "37d23e1edb5a0361a19123e2e6a2536b242bf37952c6c44d39256c6bd60cc7a1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "37d23e1edb5a0361a19123e2e6a2536b242bf37952c6c44d39256c6bd60cc7a1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "37d23e1edb5a0361a19123e2e6a2536b242bf37952c6c44d39256c6bd60cc7a1" + sha256 cellar: :any_skip_relocation, sonoma: "c85a970380cbbe474257782bf59f347f8c9ebd62af9258dc0df33f0806a1ca88" + sha256 cellar: :any_skip_relocation, ventura: "c85a970380cbbe474257782bf59f347f8c9ebd62af9258dc0df33f0806a1ca88" + sha256 cellar: :any_skip_relocation, arm64_linux: "bdb8a913761a1c7f03768d5d2eb86bb12b89161056d21e75d0d641d8d1873707" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37d23e1edb5a0361a19123e2e6a2536b242bf37952c6c44d39256c6bd60cc7a1" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test-bad.md").write <<~MARKDOWN + # Header 1 + body + MARKDOWN + (testpath/"test-good.md").write <<~MARKDOWN + # Header 1 + + body + MARKDOWN + assert_match "MD022/blanks-around-headings Headings should be surrounded by blank lines", + shell_output("#{bin}/markdownlint #{testpath}/test-bad.md 2>&1", 1) + assert_empty shell_output("#{bin}/markdownlint #{testpath}/test-good.md") + end +end diff --git a/Formula/m/markdownlint-cli2.rb b/Formula/m/markdownlint-cli2.rb new file mode 100644 index 0000000000000..5c86304b42303 --- /dev/null +++ b/Formula/m/markdownlint-cli2.rb @@ -0,0 +1,34 @@ +class MarkdownlintCli2 < Formula + desc "Fast, flexible, config-based cli for linting Markdown/CommonMark files" + homepage "https://github.com/DavidAnson/markdownlint-cli2" + url "https://registry.npmjs.org/markdownlint-cli2/-/markdownlint-cli2-0.18.1.tgz" + sha256 "c35d3ff486bf201d8b75877762f33f9e7d673082a85d0cdc29b05055880431ec" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "9e6e7eb65eaf3bfe2141af846369a2cd4dbb41aafa99734bc56d656cea6fca32" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test-bad.md").write <<~MARKDOWN + # Header 1 + body + MARKDOWN + (testpath/"test-good.md").write <<~MARKDOWN + # Header 1 + + body + MARKDOWN + assert_match "Summary: 1 error(s)", + shell_output("#{bin}/markdownlint-cli2 :#{testpath}/test-bad.md 2>&1", 1) + assert_match "Summary: 0 error(s)", + shell_output("#{bin}/markdownlint-cli2 :#{testpath}/test-good.md") + end +end diff --git a/Formula/m/marked.rb b/Formula/m/marked.rb new file mode 100644 index 0000000000000..51146c00396ea --- /dev/null +++ b/Formula/m/marked.rb @@ -0,0 +1,22 @@ +class Marked < Formula + desc "Markdown parser and compiler built for speed" + homepage "https://marked.js.org/" + url "https://registry.npmjs.org/marked/-/marked-15.0.11.tgz" + sha256 "ceb989894e243b04249c188c42d45e18cdccf7eaa20e8bc227b2360b6555f3ad" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1f460e335f5218ce50745434325c6ccc014bf7b8331e4ea1b44aff2e9dbb87c1" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + assert_equal "

hello world

", pipe_output(bin/"marked", "hello *world*").strip + end +end diff --git a/Formula/m/marksman.rb b/Formula/m/marksman.rb new file mode 100644 index 0000000000000..1fabd30ac531f --- /dev/null +++ b/Formula/m/marksman.rb @@ -0,0 +1,66 @@ +class Marksman < Formula + desc "Language Server Protocol for Markdown" + homepage "https://github.com/artempyanykh/marksman" + url "https://github.com/artempyanykh/marksman/archive/refs/tags/2024-12-18.tar.gz" + sha256 "7392822c196e6bef68fc1cef3a873aac79b27bf95478c2419ea4761651a6a957" + license "MIT" + head "https://github.com/artempyanykh/marksman.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b9d34d209ff066fc670ef526ef4e1921698345ce643eeeb8e2d5dfff80bffbfc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "abb4ee028058af4d4f464c83157d3f49783c96f2917fd671bdff11a8dcc3c6bd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bea0c8d782eb874e6a3f92dc47884e1e71afaba9741a6c705ef5790c5aadae1c" + sha256 cellar: :any_skip_relocation, ventura: "5d4e38cbf29fea160804f0181cd6a000a877aad5b74222a0fc8f4be2aff1b452" + sha256 cellar: :any_skip_relocation, arm64_linux: "490ef5bbb1269f76d14f8945e37f92b66adc1b3a8ee72d681b1f722484a7f659" + sha256 cellar: :any_skip_relocation, x86_64_linux: "50abec82ec280c5c3c35c770fe08bceeafc3bb20ba8e474843b15a49272907ff" + 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:PublishSingleFile=true + -p:DebugType=embedded + ] + args << "-p:VersionString=#{version}" if build.stable? + + system "dotnet", "publish", "Marksman/Marksman.fsproj", *args + (bin/"marksman").write_env_script libexec/"marksman", DOTNET_ROOT: dotnet.opt_libexec + end + + test do + require "open3" + + json = <<~JSON + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": null, + "capabilities": {} + } + } + JSON + + ENV["DOTNET_SYSTEM_GLOBALIZATION_INVARIANT"] = "1" + + Open3.popen3(bin/"marksman", "server") 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/m/marmite.rb b/Formula/m/marmite.rb new file mode 100644 index 0000000000000..6127ad02a7c3f --- /dev/null +++ b/Formula/m/marmite.rb @@ -0,0 +1,31 @@ +class Marmite < Formula + desc "Static Site Generator for Blogs using Markdown" + homepage "https://rochacbruno.github.io/marmite/" + url "https://github.com/rochacbruno/marmite/archive/refs/tags/0.2.5.tar.gz" + sha256 "b1de4525533185b9d0dcd592bb2eb7e9af7cdc863bf110a45720be2534e2e301" + license "AGPL-3.0-or-later" + head "https://github.com/rochacbruno/marmite.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9044fed2abbe05930f74bee4f4f1de20700f8d6f32a1e0d03fe6141f1036c8e8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f7636b8ca3ec1608843d67c90590ea95c71b4aefbdeba4d163fb40df66d8bc5b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "88830317a2357d363919fe06b1b4c0804860f257f0a859aa39f1ef622e0840de" + sha256 cellar: :any_skip_relocation, sonoma: "bff5c7b07e1e059b78fc491dc3898d8e2c1d2c3d6d76d27e9845c674edab3d15" + sha256 cellar: :any_skip_relocation, ventura: "cc0448b1262edc1fe173095d3317c8945dd444d6627b07c81374cd901d279243" + sha256 cellar: :any_skip_relocation, arm64_linux: "2cc57b7a0831ae19203aaccee8ccc5226d277ed76f60939639b727cd8a4a1da1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "591b5b32a8a0e8ccf269226dfe0ece3947db93e80f58138a1db37a1836575e88" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + end + + test do + assert_match version.to_s, shell_output("#{bin}/marmite --version") + + system bin/"marmite", testpath/"site", "--init-site" + assert_path_exists testpath/"site" + end +end diff --git a/Formula/m/marp-cli.rb b/Formula/m/marp-cli.rb new file mode 100644 index 0000000000000..1427905c55e03 --- /dev/null +++ b/Formula/m/marp-cli.rb @@ -0,0 +1,55 @@ +class MarpCli < Formula + desc "Easily convert Marp Markdown files into static HTML/CSS, PDF, PPT and images" + homepage "https://github.com/marp-team/marp-cli" + url "https://registry.npmjs.org/@marp-team/marp-cli/-/marp-cli-4.1.2.tgz" + sha256 "6f7e20e66b12906be9e4ed7225621ccbd0bf02690b03716647103e64dadb1b84" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "da62b75e00504397c018a751576c1b783e7f6ba3929d0e9611fd53888614fcf3" + sha256 cellar: :any, arm64_sonoma: "da62b75e00504397c018a751576c1b783e7f6ba3929d0e9611fd53888614fcf3" + sha256 cellar: :any, arm64_ventura: "da62b75e00504397c018a751576c1b783e7f6ba3929d0e9611fd53888614fcf3" + sha256 cellar: :any, sonoma: "c6155d61543ee99565db5b1ad20bb9124e38389d5306303c8ba7425f75de869c" + sha256 cellar: :any, ventura: "c6155d61543ee99565db5b1ad20bb9124e38389d5306303c8ba7425f75de869c" + sha256 cellar: :any_skip_relocation, arm64_linux: "87c5fb7463b29b211d2af1e0a5e4e691e90868403b16475d2531f354a1724259" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c48d21a663d8d84bbb1be5da79a56a45148e22fdc67674fdee91bcc99de9ab3e" + 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/@marp-team/marp-cli/node_modules" + node_modules.glob("{bare-fs,bare-os}/prebuilds/*") + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } + end + + test do + (testpath/"deck.md").write <<~MARKDOWN + --- + theme: uncover + --- + + # Hello, Homebrew! + + --- + + + + # :+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..e93afcca08e55 --- /dev/null +++ b/Formula/m/martin.rb @@ -0,0 +1,39 @@ +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/v0.16.0.tar.gz" + sha256 "45ba255464607583f71d692989d54ca557c7595a900ed0600c02d1695489e507" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bdf8a4dbd81d1e71ddb760ec3abad683cf7ac6b80bca2e89e112c485bb3f04a3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "952a48e9ffb9018bb8b705b59c353352fcf8ae66685ee129159a96e96ef4ba89" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5f12ed21d38f2015f688ec434c119be73a30887d48c5b2b293a765ed8a39c8f8" + sha256 cellar: :any_skip_relocation, sonoma: "b317b6efad68b7e530854b586907ddc2a8cba57e23e4706a1a19acf730ac28ef" + sha256 cellar: :any_skip_relocation, ventura: "f76bf5cadbfbaf80150402e3b61a5a91ff7651de783fb018d706322125c59d21" + sha256 cellar: :any_skip_relocation, arm64_linux: "97113c097cd49add4114998a89ec8feb1cfb97c57585c81d7506b98ee5b64da8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "65d54137e39a352ac5722e2bfc671af4c1af017fe07b45b4874103d4ea208193" + end + + depends_on "node" => :build + depends_on "rust" => :build + + 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 + mbtiles = pkgshare/"mbtiles/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..294ae04eeae11 --- /dev/null +++ b/Formula/m/mas.rb @@ -0,0 +1,39 @@ +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.2.2", + revision: "7dacbbf3fb9a622247c1b0b9f18a4a9c7673ee53" + license "MIT" + head "https://github.com/mas-cli/mas.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a4cba95e2f584f56e2e726c7808df195ceb0c1fe20aa3436f126ef0c527c59c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "de10dbbddeff1469e06acd6ce7edefd35872fb013b75c55a6f60f8b4e6a15803" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c289261da5fa0e1b120bcb0dcb5ebf7abc67bb014f55f2a346f3ade71d2fd06b" + sha256 cellar: :any_skip_relocation, sonoma: "ff349aa8bb8af56798e3bcfe5344ecd801bc082c1aa6eb68e458a4c7de74b79a" + sha256 cellar: :any_skip_relocation, ventura: "dabfebb8a16bf2da2058dcb0f6c6df51d7448728412001b135549802ba360303" + end + + depends_on xcode: ["15.0", :build] + depends_on :macos + + def install + ENV["MAS_DIRTY_INDICATOR"] = "" + system "script/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..540c13288c74d --- /dev/null +++ b/Formula/m/mask.rb @@ -0,0 +1,38 @@ +class Mask < Formula + desc "CLI task runner defined by a simple markdown file" + homepage "https://github.com/jakedeichert/mask/" + url "https://github.com/jacobdeichert/mask/archive/refs/tags/mask/0.11.6.tar.gz" + sha256 "e76ae20a120c3ab44f1b14e73ff3f1b39d900bc66f8d2dab7fed4706bacd92fd" + license "MIT" + + bottle do + 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..e55483741647a --- /dev/null +++ b/Formula/m/masscan.rb @@ -0,0 +1,38 @@ +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 + + bottle do + 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, mojave: "19def74a8381541e80c530a5f0599bc92f067ac3e211ecc173afbbb0aee72752" + 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..fe5c135630f63 --- /dev/null +++ b/Formula/m/massdns.rb @@ -0,0 +1,50 @@ +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" + + bottle do + 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..2226e6015c6be --- /dev/null +++ b/Formula/m/massdriver.rb @@ -0,0 +1,48 @@ +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.10.7.tar.gz" + sha256 "fbaa8281509139d83b64f10a8851630242cd1648a2437b4be38c0e9e39e87775" + 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_sequoia: "b7114dc9c2b595a774f1c445a69d51148301c25e33010d4657ac041b2156b56a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b7114dc9c2b595a774f1c445a69d51148301c25e33010d4657ac041b2156b56a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b7114dc9c2b595a774f1c445a69d51148301c25e33010d4657ac041b2156b56a" + sha256 cellar: :any_skip_relocation, sonoma: "6ee801a50cfa9434d2c50152ac985fdbcb69a0aad4a1786312ed31f08a054609" + sha256 cellar: :any_skip_relocation, ventura: "6ee801a50cfa9434d2c50152ac985fdbcb69a0aad4a1786312ed31f08a054609" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0a66e63f10ba634f78cce3b411070652425fea60f61965c08aeffa74d1cc353" + 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 + output = shell_output("#{bin}/mass bundle build 2>&1", 1) + assert_match "Error: open massdriver.yaml: no such file or directory", output + + output = shell_output("#{bin}/mass bundle lint 2>&1", 1) + assert_match "OrgID: missing required value: MASSDRIVER_ORG_ID", output + + assert_match version.to_s, shell_output("#{bin}/mass version") + end +end diff --git a/Formula/m/massren.rb b/Formula/m/massren.rb new file mode 100644 index 0000000000000..193535c058a59 --- /dev/null +++ b/Formula/m/massren.rb @@ -0,0 +1,30 @@ +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_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..d212b3ea9fb94 --- /dev/null +++ b/Formula/m/mat2.rb @@ -0,0 +1,35 @@ +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 + sha256 cellar: :any_skip_relocation, all: "7b534040135d940e613435f419dd0556e98b876b3ff9364d67dc001ac3412ec7" + end + + depends_on "exiftool" + depends_on "ffmpeg" + depends_on "gdk-pixbuf" + depends_on "librsvg" + depends_on "poppler" + depends_on "py3cairo" + depends_on "pygobject3" + depends_on "python@3.13" + + 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..f6f355276d852 --- /dev/null +++ b/Formula/m/math-comp.rb @@ -0,0 +1,67 @@ +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-1.19.0.tar.gz" + sha256 "786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394" + license "CECILL-B" + revision 6 + head "https://github.com/math-comp/math-comp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "37fb1f8770ce323d60e7849b3309f8accaf18b2983133717d75690791f15fe09" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "40ed5c77b4b2121aa239a976b013efb9e0e589f0105ad50f44c304cc7388d422" + sha256 cellar: :any_skip_relocation, arm64_ventura: "315f3de4e2a6edea5d1207fc0220459059fdad6e7c4ce3fd68f84cb023c0c83e" + sha256 cellar: :any_skip_relocation, sonoma: "3b4c7071557fe00030e6af03c50ef3b2088971c9321a856460f9d3381463cca8" + sha256 cellar: :any_skip_relocation, ventura: "95303c41552038239d8a4836bbbf1dd5c2529b4c705eb74f0c636ae225b222f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "8efe5c163d39035ce18892f5385020a9ea37d72f99a539fc7374ed8e7eeeedcd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9d62a49ccc03fce4f95434502d11351864301b8dfa8a68bedf21d71a2d65fa7" + end + + depends_on "ocaml" => :build + depends_on "ocaml-findlib" => :build + depends_on "coq" + + 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 + + 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 + # 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 <<~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/m/mathlibtools.rb b/Formula/m/mathlibtools.rb new file mode 100644 index 0000000000000..74ebe11680b56 --- /dev/null +++ b/Formula/m/mathlibtools.rb @@ -0,0 +1,141 @@ +class Mathlibtools < Formula + include Language::Python::Virtualenv + + desc "Lean prover mathlib supporting tools" + homepage "https://pypi.org/project/mathlibtools" + url "https://files.pythonhosted.org/packages/ae/6a/815d7f65dc853973b13be082fefe797074e633407ef1262a62bc0be84203/mathlibtools-1.3.2.tar.gz" + sha256 "9a49f4cb7355fda72792a5738bcc5df927b1e102efc719adfbe16db199a0ac6b" + license "Apache-2.0" + revision 5 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sonoma: "5c30b6bd959cec65f56d140dff795e4f6d139b2c0b9bb35e4d964378d810b729" + sha256 cellar: :any, arm64_ventura: "e7b4098b3b86e02c75fe7b9eb1d3e1233d8d941aba977e703d2a27a1e0d7c3d2" + sha256 cellar: :any, arm64_monterey: "3ca76a75c8f500659d6717edbf8920b4a98a3232b4571852c1024cde7b7cd5f5" + sha256 cellar: :any, sonoma: "524e34d53bb6d589d02b9dc8fdb364786593a3731b07eaa139d2c4fdf0381c86" + sha256 cellar: :any, ventura: "6fb10a6aca23e710cf3bdab9ae2d72dd13ff614910d14a1cd9edebeb402b4e66" + sha256 cellar: :any, monterey: "7b62c45d6c24e66b8659f246fec6f92bde2d75785d2370deaccb047d95dbfa95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "749aa46ceb3aaf5e592562d7f952384543f65702848507e613b07684ce75d12d" + end + + disable! date: "2024-09-09", because: :repo_archived + + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.12" + + resource "atomicwrites" do + url "https://files.pythonhosted.org/packages/87/c6/53da25344e3e3a9c01095a89f16dbcda021c609ddb42dd6d7c0528236fb2/atomicwrites-1.4.1.tar.gz" + sha256 "81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/63/09/c1bc53dab74b1816a00d8d030de5bf98f724c52c1635e07681d312f20be8/charset-normalizer-3.3.2.tar.gz" + sha256 "f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "deprecated" do + url "https://files.pythonhosted.org/packages/92/14/1e41f504a246fc224d2ac264c227975427a85caf37c3979979edb9b1b232/Deprecated-1.2.14.tar.gz" + sha256 "e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/19/0d/bbb5b5ee188dec84647a4664f3e11b06ade2bde568dbd489d9d64adef8ed/gitdb-4.0.11.tar.gz" + sha256 "bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/8f/12/71a40ffce4aae431c69c45a191e5f03aca2304639264faf5666c2767acc4/GitPython-3.1.42.tar.gz" + sha256 "2d99869e0fef71a73cbd242528105af1d6c1b108c60dfabd994bf292f76c3ceb" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/bf/3f/ea4b9117521a1e9c50344b909be7886dd00a519552724809bb1f486986c2/idna-3.6.tar.gz" + sha256 "9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/c4/80/a84676339aaae2f1cfdf9f418701dd634aef9cc76f708ef55c36ff39c3ca/networkx-3.2.1.tar.gz" + sha256 "9f1bb5cf3409bf324e0a722c20bdb4c20ee39bf1c30ce8ae499c8502b0b5e0c6" + end + + resource "pydot" do + url "https://files.pythonhosted.org/packages/d7/2f/482fcbc389e180e7f8d7e7cb06bc5a7c37be6c57939dfb950951d97f2722/pydot-2.0.0.tar.gz" + sha256 "60246af215123fa062f21cd791be67dda23a6f280df09f68919e637a1e4f3235" + end + + resource "pygithub" do + url "https://files.pythonhosted.org/packages/98/a8/ceb6f51d2fff91ce4a670218c2aa9bff44f05f541ba7e1ccc632c2751f5b/PyGithub-2.2.0.tar.gz" + sha256 "e39be7c4dc39418bdd6e3ecab5931c636170b8b21b4d26f9ecf7e6102a3b51c3" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/30/72/8259b2bccfe4673330cea843ab23f86858a419d8f1493f66d413a76c7e3b/PyJWT-2.8.0.tar.gz" + sha256 "57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de" + 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/46/3a/31fd28064d016a2182584d579e033ec95b809d8e220e74c4af6f0f2e8842/pyparsing-3.1.2.tar.gz" + sha256 "a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/cd/e5/af35f7ea75cf72f2cd079c95ee16797de7cd71f29ea7c68ae5ce7be1eda0/PyYAML-6.0.1.tar.gz" + sha256 "bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/9d/be/10918a2eac4ae9f02f6cfe6414b7a155ccd8f7f9d4380d62fd5b955065c3/requests-2.31.0.tar.gz" + sha256 "942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/88/04/b5bf6d21dc4041000ccba7eb17dd3055feb237e7ffc2c20d3fae3af62baa/smmap-5.0.1.tar.gz" + sha256 "dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62" + 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/ea/85/3ce0f9f7d3f596e7ea57f4e5ce8c18cb44e4a9daa58ddb46ee0d13d6bff8/tqdm-4.66.2.tar.gz" + sha256 "6cd52cdf0fef0e0f543299cfc96fec90d7b8a7e88745f411ec33eb44d5ed3531" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz" + sha256 "b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/7a/50/7fd50a27caa0652cd4caf224aa87741ea41d3265ad13f010886167cfcc79/urllib3-2.2.1.tar.gz" + sha256 "d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/4c/063a912e20bcef7124e0df97282a8af3ff3e4b603ce84c481d6d7346be0a/wrapt-1.16.0.tar.gz" + sha256 "5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_equal "Could not find a leanpkg.toml\n", shell_output("#{bin}/leanproject build 2>&1", 255) + end +end diff --git a/Formula/m/matlab2tikz.rb b/Formula/m/matlab2tikz.rb new file mode 100644 index 0000000000000..b0f761ca77e4a --- /dev/null +++ b/Formula/m/matlab2tikz.rb @@ -0,0 +1,17 @@ +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" + + 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..9accdb5138d32 --- /dev/null +++ b/Formula/m/matplotplusplus.rb @@ -0,0 +1,51 @@ +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_sonoma: "19c28227de5d694cef734a453ae5a5fa9235100178c330a89e0bf69b1152c9c3" + sha256 cellar: :any, arm64_ventura: "a6ea197fbc598aea232a2a2ee3f34a49d901fe7bcb5ef1669fad420bc9761df9" + sha256 cellar: :any, sonoma: "fd6ad4314564c49faa1c3a579059e691bd42ad7bc806bfdd9b6da50de1493136" + sha256 cellar: :any, ventura: "1629d3f81ffeea448e2a23ce724c64108e4b98d28fff1c94c9caf42aad066fd8" + 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..6be803cb72565 --- /dev/null +++ b/Formula/m/matterbridge.rb @@ -0,0 +1,32 @@ +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_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, 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..6612bfcd0cc98 --- /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.8.6.tar.gz" + sha256 "ab092813266355e08b2feeb0b138c8a47be7cac44a0ed45c9e04722ae94b8bf5" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/PyO3/maturin.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d4604fc872a8d902a59f8f8f00aed7ebc6e84697abc8aba7eb841db1614697fa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ffd64bda1299b9fbbf6ff9739f102652ae0d447ba3e65d0b7695dc92e8cb8c66" + sha256 cellar: :any_skip_relocation, arm64_ventura: "18a29b6b4ee5e90e9479c4388c2235073d2336d0f333b97a91d13de51330deb7" + sha256 cellar: :any_skip_relocation, sonoma: "983104a3c26f06773586c01d329dbeb90920707d55210d8683fd3a1cfee16513" + sha256 cellar: :any_skip_relocation, ventura: "0791bd493ee99234a59419e8352275c992131e38be0239d659fe0aa76b15cab1" + sha256 cellar: :any_skip_relocation, arm64_linux: "88a16df0161807aa5c4feda7bfeb2a66a3e2f5406d353d995dd83dd6eaef3a44" + sha256 cellar: :any_skip_relocation, x86_64_linux: "123b144d3952ff54df35a13843738028fc5e8b72d3165b9ebf28e59a52b83bb1" + end + + depends_on "python@3.13" => :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 + python = "python3.13" + system "cargo", "init", "--name=brew", "--bin" + system bin/"maturin", "build", "-o", "dist", "--compatibility", "off" + system python, "-m", "pip", "install", "brew", "--prefix=./dist", "--no-index", "--find-links=./dist" + system python, "-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..d1c5a725bc869 --- /dev/null +++ b/Formula/m/maven-completion.rb @@ -0,0 +1,22 @@ +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" + + 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..e3a3509b51a76 --- /dev/null +++ b/Formula/m/maven-shell.rb @@ -0,0 +1,24 @@ +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 + + 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..d83ba8fa6fffc --- /dev/null +++ b/Formula/m/maven.rb @@ -0,0 +1,79 @@ +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.9/binaries/apache-maven-3.9.9-bin.tar.gz" + mirror "https://archive.apache.org/dist/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz" + sha256 "7a9cdf674fc1703d6382f5f330b3d110ea1b512b51f1652846d9e4e8a588d766" + 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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "106bdaaec0342b1656442dd5d1521b3edf69df22576726110bf1d56af0d4bfef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "106bdaaec0342b1656442dd5d1521b3edf69df22576726110bf1d56af0d4bfef" + sha256 cellar: :any_skip_relocation, arm64_ventura: "106bdaaec0342b1656442dd5d1521b3edf69df22576726110bf1d56af0d4bfef" + sha256 cellar: :any_skip_relocation, arm64_monterey: "106bdaaec0342b1656442dd5d1521b3edf69df22576726110bf1d56af0d4bfef" + sha256 cellar: :any_skip_relocation, sonoma: "019b91415dce288368bd462ebbfa009a262f7d9a4eb05f1bf64a4d09c4f65d91" + sha256 cellar: :any_skip_relocation, ventura: "019b91415dce288368bd462ebbfa009a262f7d9a4eb05f1bf64a4d09c4f65d91" + sha256 cellar: :any_skip_relocation, monterey: "019b91415dce288368bd462ebbfa009a262f7d9a4eb05f1bf64a4d09c4f65d91" + sha256 cellar: :any_skip_relocation, arm64_linux: "bef4d063e3e32355e8b2d139fd09395bbbfcadb87af73403984c6c9ce146fcf7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "106bdaaec0342b1656442dd5d1521b3edf69df22576726110bf1d56af0d4bfef" + end + + depends_on "openjdk" + + conflicts_with "mvnvm", because: "also installs a 'mvn' executable" + + 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["*"] + + # 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..a1bc7b99658b8 --- /dev/null +++ b/Formula/m/mavsdk.rb @@ -0,0 +1,114 @@ +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.3.4", + revision: "ce476ac7f48ac4e6b40236d7af92c2f165fba622" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "e5da0552040b6632f7832a29ddc0bd3d7f31309a6265a7d70691c52d1f214c6f" + sha256 arm64_sonoma: "060afb8de879ea900c5b71ac382a9e690d3d0f870beb502b12e8650e6c816e74" + sha256 arm64_ventura: "778c6611349b5f5d522d54bac2e8bb580d89e193f83eb79e4d3688c32884fb4c" + sha256 cellar: :any, sonoma: "01c7a15fd24acd731f00648bd2929233707a530f79b805df4a4ce7d44787f49b" + sha256 cellar: :any, ventura: "8e7bc7c6cf95d634639b591012945f34fd8dfeeada831dad21c41ae6262a2a4c" + sha256 cellar: :any_skip_relocation, arm64_linux: "eea56d156b23aa0ed7ca3fc94a403b3468c9139492612098b23e2446f34a0fb4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fbd097b8693c0adffdd10267f88b6655916c0ba5a879bc443de058c96ef7d28c" + end + + depends_on "cmake" => :build + depends_on "python@3.13" => :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 + + # ver={version} && \ + # curl -s https://raw.githubusercontent.com/mavlink/MAVSDK/v$ver/third_party/mavlink/CMakeLists.txt \ + # | grep 'MAVLINK_GIT_HASH' + resource "mavlink" do + url "https://github.com/mavlink/mavlink.git", + revision: "5e3a42b8f3f53038f2779f9f69bd64767b913bb8" + 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" + + resource("mavlink").stage do + system "cmake", "-S", ".", "-B", "build", + "-DPython_EXECUTABLE=#{which("python3.13")}", + *std_cmake_args(install_prefix: libexec) + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + # Source build adapted from + # https://mavsdk.mavlink.io/develop/en/contributing/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} + ] + + 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..05f2ca7ec7e33 --- /dev/null +++ b/Formula/m/mawk.rb @@ -0,0 +1,38 @@ +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_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..7a444ed6a84bb --- /dev/null +++ b/Formula/m/maxima.rb @@ -0,0 +1,48 @@ +class Maxima < Formula + desc "Computer algebra system" + homepage "https://maxima.sourceforge.io/" + url "https://downloads.sourceforge.net/project/maxima/Maxima-source/5.47.0-source/maxima-5.47.0.tar.gz" + sha256 "9104021b24fd53e8c03a983509cb42e937a925e8c0c85c335d7709a14fd40f7a" + license "GPL-2.0-only" + revision 21 + + livecheck do + url :stable + regex(%r{url=.*?/maxima[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c06983e9d021a124550f5615ebda6601c4f0c3a68cad65fdfd9eef19155e0b1b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0f17bae77e9e2ffc4006cfbfe373f45c5be77502ef291b9408d1b9ddbccec407" + sha256 cellar: :any_skip_relocation, sonoma: "b321b497346ba5a245b324934c85eed5e9b1836aed2349944044a27571fb94c3" + sha256 cellar: :any_skip_relocation, ventura: "9be3c5c7129f9e483b44d06a1f1b1826e21e316803945670ea7556f6705e57ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "781e89cc152c5f13223bfc7442df7a277a2e3f06d5e17ee3a754262f1e3f50df" + 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", + "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--enable-gettext", + "--enable-sbcl", + "--with-emacs-prefix=#{share}/emacs/site-lisp/#{name}", + "--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/m/maxwell.rb b/Formula/m/maxwell.rb new file mode 100644 index 0000000000000..5ef2b9fda473f --- /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.43.2/maxwell-1.43.2.tar.gz" + sha256 "8c00fa74a0717f2a5103b37c6d92138b247dca68264efe226d9e902713dd25da" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "ed1b476d18951f81c7cd7bf171b60d077eac420a3b1b12d636d7297e714a53a3" + 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..73bd2ef0188d2 --- /dev/null +++ b/Formula/m/mbedtls.rb @@ -0,0 +1,67 @@ +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.3/mbedtls-3.6.3.tar.bz2" + sha256 "64cd73842cdc05e101172f7b437c65e7312e476206e1dbfd644433d11bc56327" + 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_sequoia: "d595b50d6404bb6b941f8f3ddc61cee7fe17a669518b5b756b801aae462af4ec" + sha256 cellar: :any, arm64_sonoma: "d77d2d06fb3bac8feb447ae1d7d011c37a330a3045eb8c9e07db4bc91c8a79d3" + sha256 cellar: :any, arm64_ventura: "bcd4e4824bcf9ba6e43e9c9e87898f9f39025a735758363a1c03066949857915" + sha256 cellar: :any, sonoma: "f491400c71a84da4b071bab8aab100be7758c720275f2a6d998e9fa79d5ee4c5" + sha256 cellar: :any, ventura: "2b167d31cac564ab7d677ed7ba56516a1e6978b39b0a866011afd64a80b80f13" + sha256 cellar: :any_skip_relocation, arm64_linux: "49a136b77e4044c460b3479189cabc01d911be9c76e24ec0862ece0131c234d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0ccfd6ef827e572504fa60630a3644215357415ab86dbd21075a4ac95b9b288" + end + + depends_on "cmake" => :build + depends_on "python@3.13" => :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.13")}", + "-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..91e84d70ab57f --- /dev/null +++ b/Formula/m/mbedtls@2.rb @@ -0,0 +1,63 @@ +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" + head "https://github.com/Mbed-TLS/mbedtls.git", branch: "mbedtls-2.28" + + bottle do + 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 + + system "cmake", "-S", ".", "-B", "build", + "-DUSE_SHARED_MBEDTLS_LIBRARY=On", + "-DPython3_EXECUTABLE=#{which("python3.12")}", + *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..7f184fa968393 --- /dev/null +++ b/Formula/m/mbelib.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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, mojave: "85f9f705e2e25ea205b637ad34bdc1e3d24734e646e6e6e53d39ab085a691303" + sha256 cellar: :any, high_sierra: "710bc1a0458b96c12c0a3b675a3410b1d86257ceb36370fd94952891e1a9b744" + sha256 cellar: :any, sierra: "45f0f9fafbe773fab43f621c62ce0c117c1d9a01fe32528b8b18fa6e94671a22" + sha256 cellar: :any, el_capitan: "8cd7158aaccceca6fe78a8031f1d58189b269b0dee86a10c349d3d514c4e33e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "bd598eb6c1483c8d083384b4e8edce2a37fbdebaf0efcfd7585f26440ffd66f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2aa416bb9571e03c0bb7b877a44f08e874f069367367ca6c3bd6cefb87ecd70d" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *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..6e5c47793cf7e --- /dev/null +++ b/Formula/m/mbpoll.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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" + + 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..8202367342541 --- /dev/null +++ b/Formula/m/mbt.rb @@ -0,0 +1,29 @@ +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_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, 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..1de7207588fab --- /dev/null +++ b/Formula/m/mbw.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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..d72c69eeefda1 --- /dev/null +++ b/Formula/m/mcabber.rb @@ -0,0 +1,75 @@ +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 1 + + livecheck do + url :homepage + regex(/href=.*?mcabber[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "22148b4dac302fc1e66326cd0a1790831aa8b2a1fe8911b41944125056d2cd20" + sha256 arm64_sonoma: "4360dd97e2380a7f382a3b7c2ca1a0e75525b6611c72f28e65709cafe6b30bb1" + sha256 arm64_ventura: "7815be33fdbe1617a9bd769ddcefb123668d13957690faf188608d569570242e" + sha256 arm64_monterey: "7e1900fb7c58c6a948cb2329a3e52f9dcdf7fe69afa5519cc7d8b096db950c31" + sha256 sonoma: "5d40492fc3afb54bcce4b07f51feb4139af51e968ad0b70a876fd36a33e77df3" + sha256 ventura: "0ba512ce535bed85a080c9117179e67e9e7f49243b02989a7b09456d0f50faa3" + sha256 monterey: "498e9db79846d370de50a85ce3eef354bc27b6f6a6ea7ecd43008a65a3d7eef2" + sha256 arm64_linux: "c60a7ff2bca6ab6ecf15c6d362a8910042f63d1bec9221a19b3146416cc1913f" + sha256 x86_64_linux: "9dd90456ae959bdf7893656a4ab0177937fc9d25f618a753a54e5730095d18b8" + 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..2a6bc85543f11 --- /dev/null +++ b/Formula/m/mcap.rb @@ -0,0 +1,65 @@ +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.53.tar.gz" + sha256 "1dea3f72747de3fc5b254008551468d30c0405ebf13a7e3d27d02e50c2a13e0a" + 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_sequoia: "9e37b7daf00b078c7f33852753ca7f3b05feba296a498d5b961e4ebd592b9d47" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d1e495570b9381ec70f69f49e6e2d39e2bcd719a1681402bd0c8c26620e60c86" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c5fbda70d150a1356a7d6d7e56d2d3fd5cce9a30ff8cb01df60f50733deef198" + sha256 cellar: :any_skip_relocation, sonoma: "d27b20a0976af88458f35d143917d388d7b45896e331caf3268d3923824356fe" + sha256 cellar: :any_skip_relocation, ventura: "75e8f9c45a0e94345fc3193e62c214df180207e7627337c77a3da3c6c22f5876" + sha256 cellar: :any_skip_relocation, arm64_linux: "7178a980cb38092fa21b86e638d8e98a58c347f9ca7f10435afc1cd7bd284826" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bff77b759aba4f8888cc8f9f71f68c2f9d1555d5c679e48c9afaadf9a6cf0db1" + 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..e680f28ab632a --- /dev/null +++ b/Formula/m/mcfly.rb @@ -0,0 +1,29 @@ +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_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/mcpm.rb b/Formula/m/mcpm.rb new file mode 100644 index 0000000000000..bd7eaa7c6fe6d --- /dev/null +++ b/Formula/m/mcpm.rb @@ -0,0 +1,196 @@ +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/35/07/cc64bc0a475a1124ac24f2d47ef7b768649d257ed5019a6b4eaa1ec9448f/mcpm-1.11.0.tar.gz" + sha256 "36602aa78318b74ef2aabcee9846497c2955cd8cbea7792ff43970aa6d80c5ce" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4a925f01fc026294beababec36d62d5cbb0da5a64c97cbb0c51786ce74d33c96" + sha256 cellar: :any, arm64_sonoma: "da0194e27d277cbe7a4ca8b592162158cfb28775854e20f86c669e79eeb7ed07" + sha256 cellar: :any, arm64_ventura: "ff1dfb5921bb386f159afc9c705b4ecde56318e8efa006526bffb42ba44e006b" + sha256 cellar: :any, sonoma: "6e25651828a07c4f0769fd6bca633afd147757eac59a94dacf14b790be5b8254" + sha256 cellar: :any, ventura: "eec9ad64c1f9ba56e27005409983f304b950249e6793fa07981f3d0f4c3c994a" + sha256 cellar: :any_skip_relocation, arm64_linux: "20241c8a7119195cce817ef5ed3fda56cf6b9b13ab275bff6dfeabd9d62a8de6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0bd46cd8940d0d230beced58f34289b5fd13bf84db542202846a6d0f5a854172" + end + + depends_on "rust" => :build + depends_on "python@3.13" + + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/e8/9e/c05b3920a3b7d20d3d3310465f50348e5b3694f4f88c6daf736eef3024c4/certifi-2025.4.26.tar.gz" + sha256 "0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6" + 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/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + end + + resource "duckdb" do + url "https://files.pythonhosted.org/packages/28/b8/0f86278684fb7a1fac7c0c869fc6d68ed005cdc91c963eb4373e0551bc0a/duckdb-1.2.2.tar.gz" + sha256 "1e53555dece49201df08645dbfa4510c86440339889667702f936b7d28d39e43" + 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/4c/60/8f4281fa9bbf3c8034fd54c0e7412e66edbab6bc74c4996bd616f8d0406e/httpx-sse-0.4.0.tar.gz" + sha256 "1e81a3a3070ce322add1d3529ed42eb5f70817f45ed6ec915ab753f961139721" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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 "mcp" do + url "https://files.pythonhosted.org/packages/95/d2/f587cb965a56e992634bebc8611c5b579af912b74e04eb9164bd49527d21/mcp-1.6.0.tar.gz" + sha256 "d9324876de2c5637369f43161cd71eebfd803df5a95e46225cab8d280e366723" + 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/bb/6e/9d084c929dfe9e3bfe0c6a47e31f78a25c54627d64a66e884a8bf5474f1c/prompt_toolkit-3.0.51.tar.gz" + sha256 "931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/88/2c/7bb1416c5620485aa793f2de31d3df393d3686aa8a8506d11e10e13c5baf/python_dotenv-1.1.0.tar.gz" + sha256 "41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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 "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/10/5f/28f45b1ff14bee871bacafd0a97213f7ec70e389939a80c60c0fb72a9fc9/sse_starlette-2.3.5.tar.gz" + sha256 "228357b6e42dcc73a427990e2b4a03c023e2495ecee82e14f07ba15077e334b2" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/ce/20/08dfcd9c983f6a6f4a1000d934b9e6d626cff8d2eeb77a89a68eef20a2b7/starlette-0.46.2.tar.gz" + sha256 "7f7361f34eed179294600af672f565727419830b54b7b084efe44bb82d2fccd5" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/a6/ae/9bbb19b9e1c450cf9ecaef06463e40234d98d95bf572fab11b4f19ae5ded/uvicorn-0.34.2.tar.gz" + sha256 "0e929828f6186353a80b58ea719861d2629d766293b6d19baf086ba31d4f3328" + end + + resource "watchfiles" do + url "https://files.pythonhosted.org/packages/03/e2/8ed598c42057de7aa5d97c472254af4906ff0a59a66699d426fc9ef795d7/watchfiles-1.0.5.tar.gz" + sha256 "b7529b5dcc114679d43827d8c35a07c493ad6f083633d573d81c660abc5979e9" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match version.to_s, shell_output("#{bin}/mcpm --version") + assert_match "Supported MCP Clients", 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..6e9aee7e656de --- /dev/null +++ b/Formula/m/mcpp.rb @@ -0,0 +1,70 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "40a63165c2df3feab3ed58c09a3f4b60daef5e112ec2f101f056aee56ca9819f" + sha256 cellar: :any, high_sierra: "fe1489ca47b0d9e551b4aa1b6cb2a4135848be79e3982856442080f75fcb45d7" + sha256 cellar: :any, sierra: "cdd368c63dc6403832c938967f8f099ec3d02acfcc5c75ab0426ad1cd213b045" + sha256 cellar: :any, el_capitan: "0be73930b3dbc8bc247c9a26acbc6115d3f5f665daaabc9ab64606ac6793ace9" + 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/formula-patches/3fd7fba/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/md2pdf.rb b/Formula/m/md2pdf.rb new file mode 100644 index 0000000000000..393f38a716260 --- /dev/null +++ b/Formula/m/md2pdf.rb @@ -0,0 +1,33 @@ +class Md2pdf < Formula + desc "CLI utility that generates PDF from Markdown" + homepage "https://github.com/solworktech/mdtopdf" + url "https://github.com/solworktech/mdtopdf/archive/refs/tags/v2.2.13.tar.gz" + sha256 "e973b25d84a233848d4c839e1f0e18b22dee23f5774a59b8789b081638bd60e0" + license "MIT" + head "https://github.com/solworktech/mdtopdf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe15170715e7929a4f32c28cf8fdc869074e1d61f6686015c038c70df0f30643" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe15170715e7929a4f32c28cf8fdc869074e1d61f6686015c038c70df0f30643" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fe15170715e7929a4f32c28cf8fdc869074e1d61f6686015c038c70df0f30643" + sha256 cellar: :any_skip_relocation, sonoma: "fe47f4128efb7f929da33f2b4517d74be49b04a9d6de441bdc4e5219782fb124" + sha256 cellar: :any_skip_relocation, ventura: "fe47f4128efb7f929da33f2b4517d74be49b04a9d6de441bdc4e5219782fb124" + sha256 cellar: :any_skip_relocation, x86_64_linux: "795b3c1070eaaa6c22d9ba0d8c4a42023b399db5a03cc26897bf92ce192fe94f" + 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..fab9ce9ca9f5f --- /dev/null +++ b/Formula/m/md4c.rb @@ -0,0 +1,61 @@ +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_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..8b4eae72ea97c --- /dev/null +++ b/Formula/m/md5deep.rb @@ -0,0 +1,82 @@ +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" + + bottle do + 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, mojave: "c9e915e46aec5d2ec5460d6b8d73cd7f21b615b8882ab7eef3bbea6c25a8821e" + 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..094244e926d5f --- /dev/null +++ b/Formula/m/md5sha1sum.rb @@ -0,0 +1,57 @@ +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 + + bottle do + rebuild 1 + 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..4575a50a96013 --- /dev/null +++ b/Formula/m/mda-lv2.rb @@ -0,0 +1,46 @@ +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 + + bottle do + rebuild 2 + 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..d141e012617bf --- /dev/null +++ b/Formula/m/mdbook.rb @@ -0,0 +1,32 @@ +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.49.tar.gz" + sha256 "103a1cae7a8036c81dfce14e8e421ba6d983acc708b52ebbffc98ca544419906" + license "MPL-2.0" + head "https://github.com/rust-lang/mdBook.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "960969d153a88ababb2b6c5641af626a65b12d0e0231bdb60e6e883009276602" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e24bca4e21f8e9b2b081929cd2826ba0fd0a29d89dcd8e56287a387ef35873e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "45a81039c1530f45e3ae14d6e4a1284cd918aa57ff86bce665f6461a689df8bf" + sha256 cellar: :any_skip_relocation, sonoma: "173107c74eca3cfd92636559b2f9649c865b863c0dff12309b4ef83b0ed42cdf" + sha256 cellar: :any_skip_relocation, ventura: "083f3528a0b257cb59d85db82da22725bf8e3db181a51dcd6c217825864f4f1d" + sha256 cellar: :any_skip_relocation, arm64_linux: "dceca028780cec3fe73cacf73a0d00b14e1793e2de9b39868629dd5566598de8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30d858fdfabd2c52ee1dccdd7018aabdeead57b7ed43402da0a5a1df910a4709" + 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..04fad5208688c --- /dev/null +++ b/Formula/m/mdbtools.rb @@ -0,0 +1,48 @@ +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_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 "autoconf" => :build + depends_on "automake" => :build + depends_on "bison" => :build + depends_on "gawk" => :build + depends_on "gettext" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "glib" + depends_on "readline" + + on_macos do + depends_on "gettext" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" + 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..2f6ca6684f0e6 --- /dev/null +++ b/Formula/m/mdcat.rb @@ -0,0 +1,47 @@ +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: :repo_archived + + depends_on "asciidoctor" => :build + depends_on "rust" => :build + + uses_from_macos "curl" + + on_linux do + depends_on "pkgconf" => :build + 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..4e4f46c271b2f --- /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://kohei.us/files/mdds/src/mdds-3.0.0.tar.bz2" + sha256 "5a0fb2dd88a6420e0a69ec4c7259bcd1fe8f4a80b232c150e11f3da4c68236d7" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "99803095584226de0e850b613fff80995a39fc01e40777c81bdebd43eb0991a8" + 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..8b4fc56c81b82 --- /dev/null +++ b/Formula/m/mdf2iso.rb @@ -0,0 +1,41 @@ +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_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, mojave: "444df3ab6a8ee34700f26459e93488d7ac3d3974ea29baa5d83f59d0014f6232" + sha256 cellar: :any_skip_relocation, high_sierra: "b41429cb8a4191a705b656b627a375cc32aaf8992cb241e30fe6c66c4ab56c9c" + sha256 cellar: :any_skip_relocation, sierra: "bc1358412281b1e486d9d1b6d25ae5665b02ac14f93f03603a966bd44ffda1d7" + sha256 cellar: :any_skip_relocation, el_capitan: "fbe092bfc501d4abf8b0df052e26307219ea4bb9fb4eddb20df8b7734ff7fdf5" + 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..54f04da2026b0 --- /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/fc/eb/b5cbf2484411af039a3d4aeb53a5160fae25dd8c84af6a4243bc2f3fedb3/mdformat-0.7.22.tar.gz" + sha256 "eef84fa8f233d3162734683c2a8a6222227a229b9206872e6139658d99acb1ea" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "8de37d6131f8a139fd4493056489324953ac35c54314d0bfbfe3d64064fffb64" + end + + depends_on "python@3.13" + + 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 "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..99c1469d514c1 --- /dev/null +++ b/Formula/m/mdk.rb @@ -0,0 +1,84 @@ +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.3.0/mdk-1.3.0.tar.gz" + mirror "https://ftpmirror.gnu.org/mdk/v1.3.0/mdk-1.3.0.tar.gz" + sha256 "8b1e5dd7f47b738cb966ef717be92a501494d9ba6d87038f09e8fa29101b132e" + license "GPL-3.0-or-later" + revision 1 + + livecheck do + url :stable + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_sequoia: "7f8f1976f4085fd2069b0e8e36c7b4dc939a9da53776d446c5bd00587c166ba7" + sha256 arm64_sonoma: "fd1a717d1a4c992880d8afd9217b46416521dbe7d4c87b6caf86efdc9e603bb7" + sha256 arm64_ventura: "916131e068d96db724db7c8fb50fa406dd2847ef028222b40a2c13bd2ee4d667" + sha256 arm64_monterey: "82a2cadce9c1f29cd4d7b53ec2ca15b8382a964627219ed87f3cd75927f851b8" + sha256 sonoma: "af8fd1f81a41417af557691fc2cd065b7f4e9bca2f84110bca43a235c066eb0b" + sha256 ventura: "c2b79558a41c36b848cb8b9ef2500a82ee961c1c427a09a01fce486e5b9b2a06" + sha256 monterey: "90c9293131de5a4a7533cb6a1bc613cad2d9c1750833bde1fcd795cbbc7923ae" + sha256 arm64_linux: "60f4588de7ace79258c78dbbeff43ed39e97a0f3fc8dde564a88e8863ac9d05f" + sha256 x86_64_linux: "baf283b8cdb2d96c284ced6a347f7754132b5f696663552bda24d45ca9ca2ca5" + end + + depends_on "gettext" => :build + depends_on "intltool" => :build + depends_on "pkgconf" => :build + + depends_on "adwaita-icon-theme" + depends_on "flex" + depends_on "glib" + depends_on "gtk+3" + depends_on "guile" + depends_on "pango" + depends_on "readline" + + on_macos do + depends_on "at-spi2-core" + depends_on "bdw-gc" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "gettext" + depends_on "harfbuzz" + end + + def install + system "./configure", "--disable-silent-rules", *std_configure_args + 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..2e1fb37316faa --- /dev/null +++ b/Formula/m/mdless.rb @@ -0,0 +1,39 @@ +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.58.tar.gz" + sha256 "c82a52a2ff76c2a7e184268ae961bae398fa97012d46ab8dad092f21e2fa8752" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c3170bec5e29e4aa9037952afd01517d85fc9ec217d80e109bcd4bc1bd9f4692" + sha256 cellar: :any, arm64_sonoma: "1c26f3603c1b1d8d5951631240ea826f2256d7e9d7d03f3373c81c458c3f9546" + sha256 cellar: :any, arm64_ventura: "5f69d4e24aa3c4899df7800a264427150a0effb5e4cbd62bca9b4cacd58dfade" + sha256 cellar: :any, sonoma: "b64d98c5631d8f3bf59e308861d63f955d8737521131704e475269b237ccdc28" + sha256 cellar: :any, ventura: "08ba0765eb24fd5a0219e415a5fc794f30a7efa901e2a88f9808481ac199ea8f" + sha256 cellar: :any_skip_relocation, arm64_linux: "4dac47d6094557b5e505b99b40321e9b4c5572503bc1ba9b76e6b930ea56c340" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5422bb32ab7aaaf248af272af66f297e91c9c81bac139a47f69dd201a48dc10a" + 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..5788a9e466cfd --- /dev/null +++ b/Formula/m/mdp.rb @@ -0,0 +1,38 @@ +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.15.tar.gz" + sha256 "3edc8ea1551fdf290d6bba721105e2e2c23964070ac18c13b4b8d959cdf6116f" + license "GPL-3.0-or-later" + head "https://github.com/visit1985/mdp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9f0539ae98eb89b4de2ae0048c6d79bedfe28757a11d09ef99879fa6ab2dd04" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f016a8106040ad6eb3d2d5ec053b87559f48752588177ef6165e7bee1e91166c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "24f08fa3b94a8f8c5e29944011c5604bdf7b15669db7df886bdfef39a8691929" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a05d67cc6d17e503937cb9ee56b48b96028f095ca8e4a2aced6cac4086bb519b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4807986d02b7d09a0bcdd726ab3efd74434a2a2a298a0e4db4f88301f0c5c5be" + sha256 cellar: :any_skip_relocation, sonoma: "f7129044631c39382c1f557f9a0a46ff745926b702096aef0c97cd29cdd69ad8" + sha256 cellar: :any_skip_relocation, ventura: "a0a8b3917f4bcaca6054386a4522a90567c78adb1a30ac9366403b00c15a09b3" + sha256 cellar: :any_skip_relocation, monterey: "72a1a991542a0980bf369d4eae9a85e9c1ad1a353fd407bb35b2af014071db61" + sha256 cellar: :any_skip_relocation, big_sur: "422a1aa5fdbc6c1286036480a306c5842876a26982d78809b3ad84c448971018" + sha256 cellar: :any_skip_relocation, catalina: "4d4430aea06ed48c1284b8a6b064d2e69a8a37cafb27de9ad5c65ce08c4681c4" + sha256 cellar: :any_skip_relocation, mojave: "606ffc22ff72a524f46ae683466098409e2db33cb5de58dad6ea179a9390cdbc" + sha256 cellar: :any_skip_relocation, high_sierra: "0bfa062ad64e8da4fa6d1df9be7e8a52da7799f87fc012b80847ac58adf81830" + sha256 cellar: :any_skip_relocation, sierra: "b38a74964fd0ac22fcbb50eb569b165128799f77a32d582f102278252b6bd291" + sha256 cellar: :any_skip_relocation, arm64_linux: "5f7437c7a5afe730d485ac13fd553a9d640ce69e912eaea36bc48d7c0fa62aa1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d06532b3145412b30883758c3a91d72c0e8ab2dbc933094164b6b030fd90b9fe" + 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..afbe6543a4326 --- /dev/null +++ b/Formula/m/mdq.rb @@ -0,0 +1,48 @@ +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.7.2.tar.gz" + sha256 "78c4a7d3aef8b9db3a96bf5e8cfce4de6140b54e199f95bb0aa12e3faf945e6d" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/yshavit/mdq.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "48d62733d4ff5786040dabb855faf2bdfd3afc18dc71e2e5e8eba6a95ea34cac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ca7f9c992511e132f00af206e1260b67bb6620bbec88895d04e82b55af431651" + sha256 cellar: :any_skip_relocation, arm64_ventura: "97cec42ba436163973a4114d8e02887b685677e54f24ce521fb4929b2d01c6fe" + sha256 cellar: :any_skip_relocation, sonoma: "3d45788370c0ef381358a5121db6d0b8ac226c556e617da582850f43d4604e51" + sha256 cellar: :any_skip_relocation, ventura: "1c5bcc3686cc5e5326fc03b6b19c14c222ad5caadc798c0bfaf77b54bc4d237f" + sha256 cellar: :any_skip_relocation, arm64_linux: "7bcd6ba524cc957fd3b1d8f333df22712848a4fb716f73185b1ddf3f99115b34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb272362a34a995b2f341b55c5800e0e60c228145e2ff8f0fddacf1e5016d12a" + 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/mdsh.rb b/Formula/m/mdsh.rb new file mode 100644 index 0000000000000..a88623c653a7d --- /dev/null +++ b/Formula/m/mdsh.rb @@ -0,0 +1,41 @@ +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_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..df19dfaaac473 --- /dev/null +++ b/Formula/m/mdt.rb @@ -0,0 +1,23 @@ +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" + + 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..1d08d2fb841f8 --- /dev/null +++ b/Formula/m/mdv.rb @@ -0,0 +1,51 @@ +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 4 + sha256 cellar: :any, arm64_sequoia: "ef4e272237c57fc919e84a83ec656a2573fc2c2e9abcb1f8ee38337674c4547d" + sha256 cellar: :any, arm64_sonoma: "01a862f7035899d724bbeed466ad5ab40ade22df6a1ff1bd6c925c2771d27a52" + sha256 cellar: :any, arm64_ventura: "339a027a25e48fb1e5c1a5cdb0315413d2a22852d01fce952590cfaac67bc1ed" + sha256 cellar: :any, sonoma: "8b80fe566da1c2fadee35bee233b56184e4a48e7c21faeda2a564d2d8112ffe8" + sha256 cellar: :any, ventura: "12e0ea9ebce34b1860ad367c9e22e0939307015a31e7dc3ea35b49476fd14d38" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d26f20621c5873d0dba005a698850a57371ad314eeda2648546021c32ba6787" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e0a7931adf9d985ed1cb030375174607fc4fd2b676d3e28dbc193558bde2f9c" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "markdown" do + url "https://files.pythonhosted.org/packages/54/28/3af612670f82f4c056911fbbbb42760255801b3068c48de792d354ff4472/markdown-3.7.tar.gz" + sha256 "2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + 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/"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..399ec00562242 --- /dev/null +++ b/Formula/m/mdxmini.rb @@ -0,0 +1,126 @@ +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" + + bottle do + 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..1848032cbfca9 --- /dev/null +++ b/Formula/m/mdz.rb @@ -0,0 +1,42 @@ +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/v2.1.0.tar.gz" + sha256 "a7b886cec0a60d8c3c80f741269fd73e6022f09581c07dffad8d695f44d8d153" + license "Apache-2.0" + head "https://github.com/LerianStudio/midaz.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8603cddee2269c2336e148ba060abe7017172345c2f36ddee38ed5c3d8aeaaf8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "89fce0e69b4ff1263e047fdaa785d0088ee64b1c936f043e328a1e6dfdb88e64" + sha256 cellar: :any_skip_relocation, arm64_ventura: "24951c62de3eae38a010d5a41380524ec3eef56dc26846437c6e4a71c3b07578" + sha256 cellar: :any_skip_relocation, sonoma: "164c7913c7ee1f24960a0df7483c14111567b9bf69d373893de60544de1c654b" + sha256 cellar: :any_skip_relocation, ventura: "a17a0659ab28f7a7df3ce59dfb7a24f604efa6554e5dde778f2ab490f102b1ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "384556000af0673883e23be60727257d87c597cb6c337675f5c3b015c971ee4a" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/LerianStudio/midaz/components/mdz/pkg/environment.Version=#{version}" + system "go", "build", *std_go_args(ldflags:), "./components/mdz" + 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..5a7b8ec82c8fd --- /dev/null +++ b/Formula/m/mdzk.rb @@ -0,0 +1,47 @@ +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_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..0aabae98ba006 --- /dev/null +++ b/Formula/m/mecab-ipadic.rb @@ -0,0 +1,63 @@ +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 + + bottle do + rebuild 1 + 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..d3a2569163e80 --- /dev/null +++ b/Formula/m/mecab-jumandic.rb @@ -0,0 +1,59 @@ +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" + + bottle do + 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, mojave: "c9e83fb2bd4fd8aaa18b9475b512c7fb1e39a5903aca41ce23f9cccfdbdd0f09" + sha256 cellar: :any_skip_relocation, high_sierra: "eefafd1bf8ea2aa43a50542328ee97492beab4730e52c4ec8ce6ed06844e8382" + sha256 cellar: :any_skip_relocation, sierra: "4b821839b99982c506a1e262c9fa8b650620bc546a8725a5eaa1dc54b45e4822" + sha256 cellar: :any_skip_relocation, el_capitan: "4b821839b99982c506a1e262c9fa8b650620bc546a8725a5eaa1dc54b45e4822" + 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..00d54daf17e2e --- /dev/null +++ b/Formula/m/mecab-ko-dic.rb @@ -0,0 +1,54 @@ +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 + + bottle do + 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, mojave: "8d9c37045d060855f558ef8706cee66e918e553ff5c8893811e5cf78767893cb" + 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..a268fc6aa9dbb --- /dev/null +++ b/Formula/m/mecab-ko.rb @@ -0,0 +1,55 @@ +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 + + bottle do + rebuild 1 + 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 mojave: "a1a0b40d2cb5a689ae24a439af990c7a85f8136bfa2bc5c3fd0708300b2fd111" + sha256 high_sierra: "d254239a9fec5e99de9590feb8d7c82f87e31324908003b059aea9a5d6092f2a" + sha256 sierra: "86b35c767cb97ab0b5e895475c3254589b101bdc3c8666abc694ea9a480421ec" + sha256 el_capitan: "c348042904040c28772c3f8f299debe574c6ebaaed7e41b23cac4980aeb8aa97" + 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..65a79681e3404 --- /dev/null +++ b/Formula/m/mecab-unidic-extended.rb @@ -0,0 +1,62 @@ +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" + 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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c22fe677d5ab8e9fea7fdae111d0cb7af0e3971ccd5717c54e5e770cf46d5d4a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "243fbb81ef84212672b3b793c96460ae56d66b61b2bad5ca965df3effcd959e7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cd9013ad7c93c14834061c6591eff7ef5fd67fe8508ee461ab484bd74e68edef" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cd9013ad7c93c14834061c6591eff7ef5fd67fe8508ee461ab484bd74e68edef" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3afff6a9a967b7c92eb79ca6efcaf3289596c331214ba6130989d757cd7757b2" + sha256 cellar: :any_skip_relocation, sonoma: "243fbb81ef84212672b3b793c96460ae56d66b61b2bad5ca965df3effcd959e7" + sha256 cellar: :any_skip_relocation, ventura: "cd9013ad7c93c14834061c6591eff7ef5fd67fe8508ee461ab484bd74e68edef" + sha256 cellar: :any_skip_relocation, monterey: "cd9013ad7c93c14834061c6591eff7ef5fd67fe8508ee461ab484bd74e68edef" + sha256 cellar: :any_skip_relocation, big_sur: "7566096a08a09b4c695c2f59766dc3d8ed5156d87180a3da1d504be9e038a30b" + sha256 cellar: :any_skip_relocation, catalina: "2624e794b1f765e78dbd593b50b8ea2b3055ede30192694cfc3ed7f5c4eb8a9b" + sha256 cellar: :any_skip_relocation, mojave: "7b297ee9b0d51169a5d5f7dd7047c1aaf18ade6bcaeccf2b570263aa6ab694b2" + sha256 cellar: :any_skip_relocation, high_sierra: "8890b4d95d0c3ee114ec48ea95d66c1d8b8a273949a912140fa477ad9265be0b" + sha256 cellar: :any_skip_relocation, sierra: "8890b4d95d0c3ee114ec48ea95d66c1d8b8a273949a912140fa477ad9265be0b" + sha256 cellar: :any_skip_relocation, el_capitan: "8890b4d95d0c3ee114ec48ea95d66c1d8b8a273949a912140fa477ad9265be0b" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ea4b9b91cb3e1b611eb27a4b1602cf6488dc719d887e5c8ab0aec5ea4184622" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4445b4f69062be6b5142324088eef2a83e958a584665e9ac36806a2c1102bef5" + 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/m/mecab-unidic.rb b/Formula/m/mecab-unidic.rb new file mode 100644 index 0000000000000..848d14660617e --- /dev/null +++ b/Formula/m/mecab-unidic.rb @@ -0,0 +1,45 @@ +class MecabUnidic < Formula + desc "Morphological analyzer for MeCab" + homepage "https://clrd.ninjal.ac.jp/unidic/en/" + # 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" + 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", "--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/m/mecab.rb b/Formula/m/mecab.rb new file mode 100644 index 0000000000000..044f26490c370 --- /dev/null +++ b/Formula/m/mecab.rb @@ -0,0 +1,52 @@ +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 + + bottle do + rebuild 4 + 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-info.rb b/Formula/m/media-info.rb new file mode 100644 index 0000000000000..8a506b1186f4f --- /dev/null +++ b/Formula/m/media-info.rb @@ -0,0 +1,47 @@ +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.04/MediaInfo_CLI_25.04_GNU_FromSource.tar.xz" + sha256 "ecd286de77cb13ea4b6ce0ebdbbff3f3da89c67ec2d5c330d47f385a4329c5d2" + 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_sequoia: "8192fe05feba4545f5c999c17f9704b9e9d360953bb43c738f8083cf704a8247" + sha256 cellar: :any, arm64_sonoma: "04613befc701ccd6091d073267bdda7e52cb78b1982f217e7fe6a631f427821a" + sha256 cellar: :any, arm64_ventura: "2831b71e363c3eb13aaa7ced2c1ffc8edff3d720753e58d7146b54583fbb0e62" + sha256 cellar: :any, sonoma: "2fc6c2dd452484b04ba831a177b96ee62daae499c648f1af93bb60fddd47b4f7" + sha256 cellar: :any, ventura: "2891d62049369ababdeab6042f2407fa02ec5ec54e4a558c9f02f6cf065c2387" + sha256 cellar: :any_skip_relocation, arm64_linux: "07227cdcb7c36ff2efe2956f3cfad66527e76b8542d310cbd3d27c71125ef790" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a2a49777a08a3c25d247fa65df979117e4e4540a16cbcfa3e60b997a065e937" + 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..41943c6c1ee4c --- /dev/null +++ b/Formula/m/mediaconch.rb @@ -0,0 +1,48 @@ +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_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..dd8351ade0cd8 --- /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.12.2", + revision: "de46a288acf3d9189b25023a0fea1b2fd22ec14d" + license "MIT" + head "https://github.com/bluenviron/mediamtx.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ff28231b6bf33f10fef4cbd76b6fe4506ed47420cd6a793085ab951ba35571d8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ff28231b6bf33f10fef4cbd76b6fe4506ed47420cd6a793085ab951ba35571d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ff28231b6bf33f10fef4cbd76b6fe4506ed47420cd6a793085ab951ba35571d8" + sha256 cellar: :any_skip_relocation, sonoma: "11c841a67ce3ce7c44790d10884dad4595415f5f76199c23e91dc1560d9c3840" + sha256 cellar: :any_skip_relocation, ventura: "11c841a67ce3ce7c44790d10884dad4595415f5f76199c23e91dc1560d9c3840" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc03ae80f11ec30f4efaaa8c99cd58e729d18e3a6a2cd076d5611f8f014a63e3" + 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..ca804468e5f58 --- /dev/null +++ b/Formula/m/mednafen.rb @@ -0,0 +1,66 @@ +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 + sha256 arm64_sequoia: "e100baeaab0eb1f32d42f02ed07741683c6e344d9df1a73498b5ae1388d69329" + sha256 arm64_sonoma: "1a44117a0ab7696c1fc8a53fe01857dc50c79687f22191b669cb3fb0ba2eb762" + sha256 arm64_ventura: "41f73f24d64c67f03e321ca8c5e69cb63af7335865894bd977d1733ffc47a2dd" + sha256 sonoma: "64d38f660b3c5b464efe66424b0cbd5b20601a69a00b138733bc706ffa88cc55" + sha256 ventura: "b40afba5777537935fe7c79d0b275e0ef186d91d4220cdc82de150d31d212575" + sha256 arm64_linux: "3a7871f139d7ab711a311bf62be6de85445694aa79e0fb11f1e532d5600bce61" + sha256 x86_64_linux: "dfd1940dfa9917d20668ee7f53f30b682d49b6674a768b43dd77db6f181d135d" + end + + depends_on "gettext" => :build + depends_on "pkgconf" => :build + + depends_on "flac" + depends_on "libsndfile" + depends_on "lzo" + depends_on macos: :sierra # needs clock_gettime + depends_on "sdl2" + depends_on "zstd" + + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + # musepack is not bottled on Linux + # https://github.com/Homebrew/homebrew-core/pull/92041 + depends_on "musepack" + end + + on_linux do + depends_on "alsa-lib" + depends_on "mesa" + end + + def install + args = %w[ + --with-external-lzo + --with-external-libzstd + --enable-ss + ] + args << "--with-external-mpcdec" if OS.mac? # musepack + + 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..0a0ced0bdeec4 --- /dev/null +++ b/Formula/m/medusa.rb @@ -0,0 +1,49 @@ +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.2.1.tar.gz" + sha256 "dc1d759a0037350b51adce293cc678bf441386606ccf622745e8ff2d04a86cb0" + license "AGPL-3.0-only" + head "https://github.com/crytic/medusa.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d0a87e647f278b365177ba8493606325a91557de070e7f8e1346cec0854dc7df" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "87ccb12465609526c2dcee37bbabffcb38affa4f5c9b5560d77b1dc270a996b5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f1f7b37a0f797128ba0a10bcc296fb75d2ecf3097b51d37b5aae1029da4bb4d9" + sha256 cellar: :any_skip_relocation, sonoma: "a7549c4a058ea66ba043d5e66dc312f2f401b4ef3fad6ec5e06123036a93642a" + sha256 cellar: :any_skip_relocation, ventura: "88830664a5ad9f7075537f5423e414cf287e93183209f1518fd153504cde2533" + sha256 cellar: :any_skip_relocation, arm64_linux: "c688934508215e0501c484964785c04174f89092cd564951d2a9406351b0804d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8dfb057a32ef14cef7b32b4b62970d18de576fd31a3bfbfe9ca42f3784ca93d" + 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..a231ab345d618 --- /dev/null +++ b/Formula/m/meek.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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, 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..cbd9f9aa6d3a0 --- /dev/null +++ b/Formula/m/megacmd.rb @@ -0,0 +1,34 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "a24988b1613d43a55748a6516f3d0ac15b13a533b92c201200d0c0998c4dbeb1" + 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..43bdb2f34e773 --- /dev/null +++ b/Formula/m/megatools.rb @@ -0,0 +1,49 @@ +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.4.20250411.tar.gz" + sha256 "f404ea598c9c5a67a966a007421945dc212460d673fa66bea44544fd82f8e7c9" + 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_sequoia: "dedf753291d155903aea83187d4623a4d89e5b446221fe3876ff0b2adb4b97ee" + sha256 cellar: :any, arm64_sonoma: "f51bf27cb6af48490aefd72b8270266c297535abf1eeec4bf5312138931ae174" + sha256 cellar: :any, arm64_ventura: "0edb1ed78ce72f15c4298581d29d9bc916cbdd39ea4584fb7cf232cf97b87dfc" + sha256 cellar: :any, sonoma: "74ed6b7c70b424092c8d0c88df0c74b56c8a413950f2d42e96b4399cdb581aa8" + sha256 cellar: :any, ventura: "bdcf5c5258307e845a9adabc6f46ebdf008c5cb9249df6e342029d32779c554f" + sha256 arm64_linux: "be8366823801f4988a542a3b663238c182f3e5ce724f53e88a68c2da914bdf60" + sha256 x86_64_linux: "0227d05b62821cba64ad74219460d7a58f3e44a8f6e0320ac335252a6deabf5c" + 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..466ff60c04cc0 --- /dev/null +++ b/Formula/m/meilisearch.rb @@ -0,0 +1,48 @@ +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.14.0.tar.gz" + sha256 "0909838996e0a0e3bff84d1c60d1272401732b58136267542956699cd156708b" + 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_sequoia: "9f633aae34dcbf8153a7b346e5b2c3534261ac930f96d4a8dfca2ab2f86ebfcf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0a2efc9b49afe34f29b010f24e26dcc850bff34a9cb2040387c3bb07fcf253af" + sha256 cellar: :any_skip_relocation, arm64_ventura: "43eb911e1e5ad829ae812f5f3907cc20f9d491d9808d3d471472253fbc3becb8" + sha256 cellar: :any_skip_relocation, sonoma: "ccb45d33442cd73ab5c8fb841629e365536b6d4212513cf601a588d2c7eca93c" + sha256 cellar: :any_skip_relocation, ventura: "1d30788f0a9c4420b82fed791de43a86d19288ba598052d0f681ced30c20480a" + sha256 cellar: :any_skip_relocation, arm64_linux: "df9a514e60ce18d8cc04a1afb7a4297e96079a2741b83a831666e7576962039d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "190c237be9d9f69bd0dce54d36d3fadc7778d1d80ea3561bce05977c848be5a4" + 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..8df5493bd280b --- /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.24.0.tar.gz" + sha256 "b1e90f2d90ddf1c1e83f0ac6096e317e46805adf513bdfa48f62b79ef437c539" + 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_sequoia: "673d0096592665ee9a81f1e23b663ed3a9c11b5c86d52388d0923f4014260e15" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7193723e019f909885528dd0fd5b4133723488f3d185db5c43b61447bde79681" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f4503730af611a59a27e0e0bc9133ff5a8aefa471c53a60d5ef2b1bb146eaba3" + sha256 cellar: :any_skip_relocation, sonoma: "8eb09a9a306083a3483d3b3347abb77d7daed89cb376a8e71e3699278df9782f" + sha256 cellar: :any_skip_relocation, ventura: "d048d7e294a3a37fa576f61872005d4cef38b9502875e67d53d90b84f8aafc73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ba4b36f2246a47ebb2bbf2fe5e87a5fed3c58ba8a825753ce1ef1bd23d3556e" + 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..60ec9e4903208 --- /dev/null +++ b/Formula/m/meli.rb @@ -0,0 +1,44 @@ +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_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..67380ead7cb3f --- /dev/null +++ b/Formula/m/melody.rb @@ -0,0 +1,32 @@ +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_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/memcache-top.rb b/Formula/m/memcache-top.rb new file mode 100644 index 0000000000000..7e777cfc47e30 --- /dev/null +++ b/Formula/m/memcache-top.rb @@ -0,0 +1,16 @@ +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" + + 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..c112bb21e273c --- /dev/null +++ b/Formula/m/memcached.rb @@ -0,0 +1,55 @@ +class Memcached < Formula + desc "High performance, distributed memory object caching system" + homepage "https://memcached.org/" + url "https://www.memcached.org/files/memcached-1.6.38.tar.gz" + sha256 "334d792294e37738796b5b03375c47bb6db283b1152e2ea4ccb720152dd17c66" + 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_sequoia: "55e33499cbed86c1a636623339b01d38a157762cd0a22c752ec7ac4ce8b0dbc4" + sha256 cellar: :any, arm64_sonoma: "e10a0b70add9be90f02ed55ee193e38060e335cbd8c42cf01d75dfb0c70d261f" + sha256 cellar: :any, arm64_ventura: "46db0d5cac37e824195ad729bab7083ece84ffe4811a47f1483f24ec496d020c" + sha256 cellar: :any, sonoma: "ceddd38dc375d131965565fe18cf33bf9e020377af45b78be2b72b1bfd50334b" + sha256 cellar: :any, ventura: "83422d1d6f8922a08aff1cf178fd5e421dab23a634501c747c5fb374e52137ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "97c6d8b0e593fbce3ee68048853c183ede7c1ae010ce35ab61ce539dc47d50f9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "563f4bb84cde98107303ee8a4de6c64f46b5c83fb8f335f62ac3fa8e20615a2c" + 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..6f6c0137fb451 --- /dev/null +++ b/Formula/m/memcacheq.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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..b359a875f0dc3 --- /dev/null +++ b/Formula/m/memray.rb @@ -0,0 +1,121 @@ +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/df/40/66e6ae86c0a22b8b998779fa8d6c0ab9ee63f0943198adcf714934286cbf/memray-1.17.2.tar.gz" + sha256 "eb75c075874a6eccddf361513d9d4a9223dd940580c6370a6ba5339bae5d0ba2" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1c4efb8fb7ecbf0afe0d4caabec09224e2b2536bd9ed879d158c889328707a6a" + sha256 cellar: :any, arm64_sonoma: "6339196a5e610a541f4e9514ba7f39f4964e32e034a7a3c813f476a5526badc9" + sha256 cellar: :any, arm64_ventura: "0441f370654154a80c6ff3d829b604608f65e7f470e4e57995231bb4ec1c7071" + sha256 cellar: :any, sonoma: "bf7bad5d0a61b6bb39e233627bde0270b2491667a44f65fb788afb39824df938" + sha256 cellar: :any, ventura: "f9385c4a945339ff46b94106acb15adb96d44ff77f57908219663000618121f2" + sha256 cellar: :any_skip_relocation, arm64_linux: "025020899fa12f0a4dd1889e0680836d51e3c83dbd720ac6e480f38e246cfe23" + sha256 cellar: :any_skip_relocation, x86_64_linux: "25a28919d12faf4b7c84f982a791ec7b034d4606c03563973220eb0cf6315af6" + end + + depends_on "lz4" + depends_on "python@3.13" + + 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/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 "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/19/03/a2ecab526543b152300717cf232bb4bb8605b6edb946c845016fa9c9c9fd/mdit_py_plugins-0.4.2.tar.gz" + sha256 "5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5" + 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/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "textual" do + url "https://files.pythonhosted.org/packages/34/99/8408761a1a1076b2bb69d4859ec110d74be7515552407ac1cb6b68630eb6/textual-3.2.0.tar.gz" + sha256 "d2f3b0c39e02535bb5f2aec1c45e10bd3ee7508ed1e240b7505c3cf02a6f00ed" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + 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..3e5f2812a0df1 --- /dev/null +++ b/Formula/m/memtester.rb @@ -0,0 +1,37 @@ +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_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/mender-artifact.rb b/Formula/m/mender-artifact.rb new file mode 100644 index 0000000000000..bca54eccf9a12 --- /dev/null +++ b/Formula/m/mender-artifact.rb @@ -0,0 +1,55 @@ +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.1.0.tar.gz" + sha256 "d82cd2f802033d53f2e947ed8d9d6cdd7a036fadbd92a2696b72122bd2070039" + 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 + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "d9c42ade066c950f156d48249363f17ae1976ac3a4ff9cd511cff92bd57b02c9" + sha256 cellar: :any, arm64_sonoma: "64a6cdafadb4b633f303a00fe2880fbd7a450a85c9586b2d246972c600917ec9" + sha256 cellar: :any, arm64_ventura: "b91a6a9767b4847fb9c954d1107b9b072f906137a767b22562e6faabe355e155" + sha256 cellar: :any, sonoma: "515fbdff1f6d0ff7bbfed64647309df28c9021dbe2e85d80332782c2a30089bb" + sha256 cellar: :any, ventura: "340b7365db24c4a352647eb37f50c589464585ac7d12b54ebab8037a2574a39e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48b8f124a177b145ddea1a11bcc974408c634113177f3b4341bb758016c5fc55" + end + + depends_on "go" => :build + depends_on "pkgconf" => :build + depends_on "openssl@3" + + def install + ldflags = "-s -w -X github.com/mendersoftware/mender-artifact/cli.Version=#{version}" + system "go", "build", *std_go_args(ldflags: ldflags) + 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/menhir.rb b/Formula/m/menhir.rb new file mode 100644 index 0000000000000..8b608e37aa488 --- /dev/null +++ b/Formula/m/menhir.rb @@ -0,0 +1,51 @@ +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/20240715/menhir-20240715.tar.bz2" + sha256 "b986cfb9f30d4955e52387b37f56bc642b0be8962b1f64b134e878b30a3fe640" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "14dd16a69a570a455240d296e6f44805c9ae87eeb98b54daf50d5201a3b031eb" + sha256 cellar: :any, arm64_sonoma: "981738a0ed04e59a302c4195b157870e59dc8f7be663f1bb0bd9493cbdcf9277" + sha256 cellar: :any, arm64_ventura: "83193b946be4684240e7ccfdf7cb722fb1791e0dfbea95bc47f7afa2c347f61c" + sha256 cellar: :any, arm64_monterey: "a32cf574977558f2dfa79b986e7a20f7340a32b0d998d65759e7b7db45d1d5c0" + sha256 cellar: :any, sonoma: "5c51478563460c4bf57f48a599f4f6d3cec0374734e163f1b05dcaf1a2d14acd" + sha256 cellar: :any, ventura: "ff8d04832ebadaec926d1ceffb2188a32e5ed8dfa500175af6afdd338b0be10d" + sha256 cellar: :any, monterey: "8548accbcc37dbf510d010b5a664c6645b9407af5995be09a8ef24c1653bf5f2" + sha256 cellar: :any_skip_relocation, arm64_linux: "7009e018d3ce59a82b4ef105f7dd27dd2dade641f081352544273bbfd35209dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b59171d340c6db652b67aaa74357024684510313d81be23b6298b0d6cd5c61e3" + 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..b015198797442 --- /dev/null +++ b/Formula/m/mentat.rb @@ -0,0 +1,322 @@ +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 3 + head "https://github.com/AbanteAI/mentat.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "70908e1d24255383875aa9aa7d8bb2119923a5786f7dfe58ffdbb21548a71160" + sha256 cellar: :any, arm64_sonoma: "0e7fd8f07a03e6ceb8776679a14e37c1be7ad10e63b591604ae85ec1ba58e915" + sha256 cellar: :any, arm64_ventura: "da02fd79ddd6e866f7d9cdc4459548c24eaeb04d9c57fb0c3c4f5756b2a437c2" + sha256 cellar: :any, sonoma: "45d47f97037d79f06a20e6b28c43deac9d9cfe0968aca3881a19a0c3c2d95430" + sha256 cellar: :any, ventura: "30951808b6bbebe3cd919b11ff7b82fea0b3737773bb684dde2cc1619872c760" + sha256 cellar: :any_skip_relocation, arm64_linux: "217d8ab6cc5f2e324ebe8e23f36322e0c6deb979c590dc2d06708895861b270e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc06886c4c5577b995aae0dbcf6d3c34185f477bd51601752a0cc0bc8fbdf69a" + 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" + depends_on "numpy" + depends_on "pillow" + depends_on "python@3.13" + + uses_from_macos "libffi" + + 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/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 "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/19/0d/bbb5b5ee188dec84647a4664f3e11b06ade2bde568dbd489d9d64adef8ed/gitdb-4.0.11.tar.gz" + sha256 "bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b" + 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/f5/38/3af3d3633a34a3316095b39c8e8fb4853a28a536e55d347bd8d8e9a14b03/h11-0.14.0.tar.gz" + sha256 "8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/6a/41/d7d0a89eb493922c37d343b607bc1b5da7f5be7e383740b4753ad8943e90/httpcore-1.0.7.tar.gz" + sha256 "8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c" + end + + resource "httpx" do + url "https://files.pythonhosted.org/packages/10/df/676b7cf674dd1bdc71a64ad393c89879f75e4a0ab8395165b498262ae106/httpx-0.28.0.tar.gz" + sha256 "0858d3bab51ba7e386637f22a61d8ccddaeec5f3fe4209da3a6168dbb91573e0" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz" + sha256 "2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + 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/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/a9/b7/d9e3f12af310e1120c21603644a1cd86f59060e040ec5c3a80b8f05fae30/pydantic-2.9.2.tar.gz" + sha256 "d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/e2/aa/6b6a9b9f8537b872f552ddd46dd3da230367754b6f707b8e1e963f515ea3/pydantic_core-2.23.4.tar.gz" + sha256 "2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863" + 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 "pytest" do + url "https://files.pythonhosted.org/packages/a7/f3/dadfbdbf6b6c8b5bd02adb1e08bc9fbb45ba51c68b0893fa536378cdf485/pytest-7.4.0.tar.gz" + sha256 "b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a" + end + + resource "pytest-asyncio" do + url "https://files.pythonhosted.org/packages/5a/85/d39ef5f69d5597a206f213ce387bcdfa47922423875829f7a98a87d33281/pytest-asyncio-0.21.1.tar.gz" + sha256 "40a7eae6dded22c7b604986855ea48400ab15b069ae38116e8c01238e9eeb64d" + end + + resource "pytest-mock" do + url "https://files.pythonhosted.org/packages/d8/2d/b3a811ec4fa24190a9ec5013e23c89421a7916167c6240c31fdc445f850c/pytest-mock-3.11.1.tar.gz" + sha256 "7f6b125602ac6d743e523ae0bfa71e1a697a2f5534064528c6ff84c2f7c2fc7f" + end + + resource "pytest-reportlog" do + url "https://files.pythonhosted.org/packages/da/a0/d1372b23d415a0766389480633a676fb1530e94ae8f6ea84619cae0ac215/pytest-reportlog-0.4.0.tar.gz" + sha256 "c9f2079504ee51f776d3118dcf5e4730f163d3dcf26ebc8f600c1fa307bf638c" + 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/99/5b/73ca1f8e72fff6fa52119dbd185f73a907b1989428917b24cff660129b6d/referencing-0.35.1.tar.gz" + sha256 "25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/23/80/afdf96daf9b27d61483ef05b38f282121db0e38f5fd4e89f40f5c86c2a4f/rpds_py-0.21.0.tar.gz" + sha256 "ed6378c9d66d0de903763e7706383d60c33829581f0adff47b6535f1802fa6db" + 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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/88/04/b5bf6d21dc4041000ccba7eb17dd3055feb237e7ffc2c20d3fae3af62baa/smmap-5.0.1.tar.gz" + sha256 "dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62" + 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/dd/36/abad2385853077424a11b818d9fd8350d249d9e31d583cb9c11cd4c85eda/trio-websocket-0.11.1.tar.gz" + sha256 "18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + 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 "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 + 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..794342f2d2d98 --- /dev/null +++ b/Formula/m/mercurial.rb @@ -0,0 +1,76 @@ +# 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.0.2.tar.gz" + sha256 "f7731f1b42acaeaacb8cf7e41c0a472a7aa31a8f47e518baea735f1cb2987e0c" + license "GPL-2.0-or-later" + + livecheck do + url "https://www.mercurial-scm.org/release/" + regex(/href=.*?mercurial[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "adcdd94f98f4e8214b39b1146dfc80d506147de819550038c96b960ecff9eb0e" + sha256 arm64_sonoma: "3fe5462406773aa19b203c2ca413acfa8f71e1efe7ab1c36ddc547d878fda0d3" + sha256 arm64_ventura: "0429c995db285cbaeb2efc82b1d33ad2046cb664de0fc80ea08893ce2553a880" + sha256 sonoma: "e1821949354dd3457e591a72600497769e419a52d2fc64136ba74974e3fc20bf" + sha256 ventura: "9a7a4d71679097671e9fbc6c06c5d148c037676be4b08e163c936bb69a55654a" + sha256 arm64_linux: "7c5d9f264c42b27e1e2082feb8330eea70dc8e949230b3a2dbdf5796274a123a" + sha256 x86_64_linux: "5b9a76306427e100dd319136e80aede8e5b0dba734a1b788a57a9308f49c5932" + end + + depends_on "python@3.13" + + def install + python3 = "python3.13" + 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 caveats + 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? + + <<~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..f17c8095f2641 --- /dev/null +++ b/Formula/m/mercury.rb @@ -0,0 +1,70 @@ +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 + + bottle do + 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..2ce86116c2624 --- /dev/null +++ b/Formula/m/mergelog.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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, mojave: "31d639e39928eee4373d5b18b619d168e02da3021e02d4d01e07209244d7712a" + sha256 cellar: :any_skip_relocation, high_sierra: "87f4253bd8e0d556dadfabcb376d4f138d6d07a5884c331074692b21cff16397" + sha256 cellar: :any_skip_relocation, sierra: "8f74bd002165acfb3009054be72f89794c11427194bb4bda229ea1c55fe0f4fb" + sha256 cellar: :any_skip_relocation, el_capitan: "70f188fb9d576b86d968a82bc5b19daabeb17660a2fa155b31b1006d27767deb" + 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..c0393add2e9d8 --- /dev/null +++ b/Formula/m/mergiraf.rb @@ -0,0 +1,30 @@ +class Mergiraf < Formula + desc "Syntax-aware git merge driver" + homepage "https://mergiraf.org/" + url "https://codeberg.org/mergiraf/mergiraf/archive/v0.8.0.tar.gz" + sha256 "77a7e27c317a60b6babd3fad426b8db648887cc2d48e59dbc62ef1484f673105" + license "GPL-3.0-only" + head "https://codeberg.org/mergiraf/mergiraf.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8e34612a680493ba907fa4a2cfc3b9999ce9791985c9f6426bab235e50d2fff9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e260505c1c1b17533e87550004026f3bf6cc28edb554d42166c32311ab43297a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6ecc221c9a95265df64bd1d577091db78ac579b5e53d9ef5f384d70a8502c3e" + sha256 cellar: :any_skip_relocation, sonoma: "df251f754c964da92d4d5b8bb453bf18e5da71780ffea6b82cbd4ee53290bb5f" + sha256 cellar: :any_skip_relocation, ventura: "429c2fdc52a580d90b62698b5f07d000afdee4d9f46ec47f8dac3a5df3455829" + sha256 cellar: :any_skip_relocation, arm64_linux: "9deae7208ea102a840e63e50b04ed3cf80d60b289ac9e7c8bf4d145bc9960c2e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ef53a28bf831e9e7d0c0889879010332c814e3ccad29fb4e646dafce77ea620" + 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/mesa-glu.rb b/Formula/m/mesa-glu.rb new file mode 100644 index 0000000000000..7ae91b6810a0b --- /dev/null +++ b/Formula/m/mesa-glu.rb @@ -0,0 +1,55 @@ +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" + + bottle do + 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..e0be492409a52 --- /dev/null +++ b/Formula/m/mesa.rb @@ -0,0 +1,217 @@ +class Mesa < Formula + include Language::Python::Virtualenv + + desc "Graphics Library" + homepage "https://www.mesa3d.org/" + url "https://archive.mesa3d.org/mesa-25.1.0.tar.xz" + sha256 "b1c45888969ee5df997e2542654f735ab1b772924b442f3016d2293414c99c14" + 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_sequoia: "777b9fa0f6f9e1ad1186791fb48c6d9bcbe0475f590a7e38e914b45dbfe7183d" + sha256 arm64_sonoma: "663e5837a6ac2f580981461c38c1a483f4cb4df8df7dddb0256eac219a8da4e2" + sha256 arm64_ventura: "2a15734c4aeeb7f038fa62f458cba3d8eed0dda744cc456e8899a673bf98b9f5" + sha256 sonoma: "972527f4df7484e478ec9514bd4ccc27c2b3b73f8ddacea2eae4fef41130119e" + sha256 ventura: "2a98d20998b8be10e9b5bce8208a2c2653f7e0959ee193c2a7dfa93832deb8b7" + sha256 arm64_linux: "dcc6fbe4c3cd1ce989abe5198430b94e974335969dd61de3c5c7dfa65aebfb1b" + sha256 x86_64_linux: "72521490ca2c248dccc81d6c2b930661633361af44d6087ab6765934322639b4" + 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.13" => :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 "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_arm do + depends_on "pycparser" => :build + end + + on_intel do + depends_on "cbindgen" => :build + end + 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 + + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + def python3 + "python3.13" + 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 + -Dopengl=true + -Dstrip=true + -Dllvm=enabled + + -Dvideo-codecs=all + -Dgallium-rusticl=true + ] + args += if OS.mac? + %W[ + -Dgallium-drivers=llvmpipe,zink + -Dvulkan-drivers=swrast + -Dvulkan-layers=intel-nullhw,overlay,screenshot + -Dtools=etnaviv,glsl,nir,nouveau,imagination,dlclose-skip + -Dmoltenvk-dir=#{Formula["molten-vk"].prefix} + ] + else + %w[ + -Degl=enabled + -Dgallium-drivers=auto + -Dgallium-extra-hud=true + -Dgallium-nine=true + -Dgallium-va=enabled + -Dgallium-vdpau=enabled + -Dgallium-xa=enabled + -Dgbm=enabled + -Dgles1=enabled + -Dgles2=enabled + -Dglx=dri + -Dintel-clc=enabled + -Dlmsensors=enabled + -Dmicrosoft-clc=disabled + -Dplatforms=x11,wayland + -Dshared-glapi=enabled + -Dtools=drm-shim,dlclose-skip,etnaviv,freedreno,glsl,intel,lima,nir,nouveau,asahi,imagination + -Dvalgrind=enabled + -Dvulkan-drivers=auto + -Dvulkan-layers=device-select,intel-nullhw,overlay,screenshot + --force-fallback-for=indexmap,paste,pest_generator,roxmltree,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/8ecad14b04ccb3d4f7084122ff278b5032afd59a/src/xdemos/glxgears.c" + sha256 "cbb5a797cf3d2d8b3fce01cfaf01643d6162ca2b0e97d760cc2e5aec8d707601" + 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..a8d9ec758fcdf --- /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_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, mojave: "39c625451d18574ed9b9fcd6383c3a3e3b0ac7633f85d28df97a3594ea02e37a" + sha256 cellar: :any, high_sierra: "fdd89421a230f4b3ea4c2b73cae82cd37d3b44bc61afd5b9e7274dc23491dc8b" + 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 + + 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..84da482cd62c4 --- /dev/null +++ b/Formula/m/mesheryctl.rb @@ -0,0 +1,46 @@ +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.81", + revision: "13e09c50cce9c1fcda34124ea150b5a76b24868a" + 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_sequoia: "b0932a86522bd45c9806310487eef80717c627fa038c2489d840479947e7be00" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b0932a86522bd45c9806310487eef80717c627fa038c2489d840479947e7be00" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b0932a86522bd45c9806310487eef80717c627fa038c2489d840479947e7be00" + sha256 cellar: :any_skip_relocation, sonoma: "c2a5fed627cea42de294c184ec7aaccd180517dab5f6f298ca0926a33386c8f9" + sha256 cellar: :any_skip_relocation, ventura: "c2a5fed627cea42de294c184ec7aaccd180517dab5f6f298ca0926a33386c8f9" + sha256 cellar: :any_skip_relocation, arm64_linux: "154fd09dd5a0b02c8107d47100a06f69fa79c0abc91c2e54a35fba49821b5104" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98d79184a02cde85c404901c5a77db4f6f768b7c046df079ce43931d9b61417a" + end + + depends_on "go" => :build + + def install + ENV["CGO_ENABLED"] = "0" + + ldflags = %W[ + -s -w + -X github.com/layer5io/meshery/mesheryctl/internal/cli/root/constants.version=v#{version} + -X github.com/layer5io/meshery/mesheryctl/internal/cli/root/constants.commitsha=#{Utils.git_short_head} + -X github.com/layer5io/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..381c31cad17e6 --- /dev/null +++ b/Formula/m/meson.rb @@ -0,0 +1,74 @@ +class Meson < Formula + desc "Fast and user friendly build system" + homepage "https://mesonbuild.com/" + url "https://github.com/mesonbuild/meson/releases/download/1.8.0/meson-1.8.0.tar.gz" + sha256 "0a9b23311271519bd03dca12d7d8b0eab582c3a2c5da433d465b6e519dc88e2f" + license "Apache-2.0" + head "https://github.com/mesonbuild/meson.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ee511fa7d68ab46780ee6c812ee8ccfbfd85c40e7805eaa98ed382bfc2044ff8" + end + + depends_on "ninja" + depends_on "python@3.13" + + def install + python3 = "python3.13" + 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..1b57edb9deead --- /dev/null +++ b/Formula/m/meta-package-manager.rb @@ -0,0 +1,329 @@ +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/5d/84/ad19b35a37b1a78366f9c0ef4c431d563a812264a56f598dadff85b864a7/meta_package_manager-5.20.0.tar.gz" + sha256 "d479c123a1db677d7bf7b5519a0199c1759617a8796e53b0b84bd1ea77a4d37c" + license "GPL-2.0-or-later" + head "https://github.com/kdeldycke/meta-package-manager.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "ff773a351cbd752f6a402f4ff344817bb69cfa2fcb9f665570172df2c2a51924" + sha256 cellar: :any, arm64_sonoma: "0365193ee89f16e09e8cccf5a89cecaa7786e30b53207b1b6a479f8673cc5d55" + sha256 cellar: :any, arm64_ventura: "4fc787d52a7d884903bdca03a5bd3d1cf8ade9497d881da85a19986f7e6c709e" + sha256 cellar: :any, sonoma: "a09a4fae321228c575444a597f050b97b4e30a80ce75ab170569bb365326ad4a" + sha256 cellar: :any, ventura: "5ef47cff88cbcc062492a62d7edbc7877de4d8e93fadeb726a3ce9f99760c420" + sha256 cellar: :any_skip_relocation, arm64_linux: "b193b5f89bba2ed6497db904c2c9d2a67c5b5224218ee51c80c5da3b378927ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dffc1654fbe7af22ead2d939727e289c42e8914fc0a56fa4c0d5d409def943df" + end + + depends_on "rust" => :build # for rpds-py + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + 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/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" + sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" + end + + resource "beartype" do + url "https://files.pythonhosted.org/packages/6f/e1/00515b97afa3993b4a314e4bc168fbde0917fd5845435cb6f16a19770746/beartype-0.19.0.tar.gz" + sha256 "de42dfc1ba5c3710fde6c3002e3bd2cad236ed4d2aabe876345ab0b4234a6573" + end + + resource "boltons" do + url "https://files.pythonhosted.org/packages/84/76/dfc34232b3e88634025563f52a430be0838182647c063f99569086922554/boltons-24.1.0.tar.gz" + sha256 "4a49b7d57ee055b83a458c8682a2a6f199d263a8aa517098bda9bab813554b87" + end + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/a2/d9/b6e56a303d221fc0bdff2c775e4eef7fedd58194aa5a96fa89fb71634cc9/boolean.py-4.0.tar.gz" + sha256 "17b9a181630e43dde1851d42bef546d616d5d9b4480357514597e78b203d06e4" + end + + resource "bracex" do + url "https://files.pythonhosted.org/packages/d6/6c/57418c4404cd22fe6275b8301ca2b46a8cdaa8157938017a9ae0b3edf363/bracex-2.5.post1.tar.gz" + sha256 "12c50952415bfa773d2d9ccb8e79651b8cdb1f31a42f6091b804f6ba2b4a66b6" + 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 "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "click-extra" do + url "https://files.pythonhosted.org/packages/6b/95/91202f785473dbd40af553f669921911159eb9bd433e2ef6d9140faa5c61/click_extra-4.11.5.tar.gz" + sha256 "cab14bd14e7173ab335b08d37bd0ff31175bc4d3f1cb8b701683211f67139335" + end + + resource "cloup" do + url "https://files.pythonhosted.org/packages/cf/71/608e4546208e5a421ef00b484f582e58ce0f17da05459b915c8ba22dfb78/cloup-3.0.5.tar.gz" + sha256 "c92b261c7bb7e13004930f3fb4b3edad8de2d1f12994dcddbe05bc21990443c5" + end + + resource "commentjson" do + url "https://files.pythonhosted.org/packages/c0/76/c4aa9e408dbacee3f4de8e6c5417e5f55de7e62fb5a50300e1233a2c9cb5/commentjson-0.9.0.tar.gz" + sha256 "42f9f231d97d93aff3286a4dc0de39bfd91ae823d1d9eba9fa901fe0c7113dd4" + end + + resource "cyclonedx-python-lib" do + url "https://files.pythonhosted.org/packages/67/a8/c735131c5e2a4e778c335b9f2c0500829d947b095e20331c401cfd0b6ef6/cyclonedx_python_lib-8.5.0.tar.gz" + sha256 "35f7a139042e4df17ff414fa228cec83c7e4e493bdec990847357791ca72f3a5" + 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/e0/a7/7fb81009b351e4f3194806cad083515bc11d9df0c86d731c7913840598fa/extra_platforms-1.6.0.tar.gz" + sha256 "dbef8d68019362690bd87fcb98ea287e7d381d7b1758a500d66abea320485234" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz" + sha256 "2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + end + + resource "lark-parser" do + url "https://files.pythonhosted.org/packages/34/b8/aa7d6cf2d5efdd2fcd85cf39b33584fe12a0f7086ed451176ceb7fb510eb/lark-parser-0.7.8.tar.gz" + sha256 "26215ebb157e6fb2ee74319aa4445b9f3b7e456e26be215ce19fdaaa901c20a4" + end + + resource "license-expression" do + url "https://files.pythonhosted.org/packages/c7/97/df5570fe2f1046bb5f6eeed55815ef11e371e9310d53bd94ec8efe4173f4/license_expression-30.4.0.tar.gz" + sha256 "6464397f8ed4353cc778999caec43b099f8d8d5b335f282e26a9eb9435522f05" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/e7/6b/20c3a4b24751377aaa6307eb230b66701024012c29dd374999cc92983269/lxml-5.3.0.tar.gz" + sha256 "4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f" + 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/51/78/65922308c4248e0eb08ebcbe67c95d48615cc6f27854b6f2e57143e9178f/more-itertools-10.5.0.tar.gz" + sha256 "5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + 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/16/cf/6e482507764034d6c41423a19f33fdd59655052fdb2ca4358faa3b0bcfd1/py_serializable-1.1.2.tar.gz" + sha256 "89af30bc319047d4aa0d8708af412f6ce73835e18bacf1a080028bb9e2f42bdb" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/8c/d5/e5aeee5387091148a19e1145f63606619cb5f20b83fccb63efae6474e7b2/pyparsing-3.2.0.tar.gz" + sha256 "cbf74e27246d595d9a74b186b810f6fbb86726dbf3b9532efb343f6d7294fe9c" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/8b/6c/62bbd536103af674e227c41a8f3dcd022d591f6eed5facb5a0f31ee33bbc/pytest-8.3.3.tar.gz" + sha256 "70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181" + 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 "rdflib" do + url "https://files.pythonhosted.org/packages/62/b6/4cee25689c7a3dfafeb481d358e74696fe3a8543da4cb2c1b71c0cb6583d/rdflib-7.1.1.tar.gz" + sha256 "164de86bd3564558802ca983d84f6616a4a1a420c7a17a8152f5016076b2913e" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/99/5b/73ca1f8e72fff6fa52119dbd185f73a907b1989428917b24cff660129b6d/referencing-0.35.1.tar.gz" + sha256 "25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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 "rpds-py" do + url "https://files.pythonhosted.org/packages/23/80/afdf96daf9b27d61483ef05b38f282121db0e38f5fd4e89f40f5c86c2a4f/rpds_py-0.21.0.tar.gz" + sha256 "ed6378c9d66d0de903763e7706383d60c33829581f0adff47b6535f1802fa6db" + 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/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 "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/d4/19/b65f1a088ee23e37cdea415b357843eca8b1422a7b11a9eee6e35d4ec273/tomli_w-1.1.0.tar.gz" + sha256 "49e847a3a304d516a169a601184932ef0f6b61623fe680f836a2aa7128ed0d33" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/31/f8/f6ee4c803a7beccffee21bb29a71573b39f7037c224843eff53e5308c16e/types-python-dateutil-2.9.0.20241003.tar.gz" + sha256 "58cb85449b2a56d6684e41aeefb4c4280631246a0da1a719bdbe6f3fb0317446" + 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/d3/43/4182fb2a03145e6d38698e38b49114ce59bc8c79063452eb585a58f8ce78/uritools-4.0.3.tar.gz" + sha256 "ee06a182a9c849464ce9d5fa917539aacc8edd2a4924d1b7aabeeecabcae3bc2" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "wcmatch" do + url "https://files.pythonhosted.org/packages/41/ab/b3a52228538ccb983653c446c1656eddf1d5303b9cb8b9aef6a91299f862/wcmatch-10.0.tar.gz" + sha256 "e72f0de09bba6a04e0de70937b0cf06e55f36f37b3deb422dfaf854b867b840a" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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", shells: [:fish, :zsh], 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..5cc6c76784747 --- /dev/null +++ b/Formula/m/metabase.rb @@ -0,0 +1,50 @@ +class Metabase < Formula + desc "Business intelligence report server" + homepage "https://www.metabase.com/" + url "https://downloads.metabase.com/v0.54.7/metabase.jar" + sha256 "63257bf260a91f7bbe4d3074ac703b8aae61bb9f0fab54429b236ca58c2db650" + license "AGPL-3.0-only" + + livecheck do + url "https://www.metabase.com/start/oss/jar.html" + regex(%r{href=.*?/v?(\d+(?:\.\d+)+)/metabase\.jar}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "dfae765818ce9476eddf330c00696ab7de20b6292cb9ad0b9427c7bc9bb13c33" + 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..f676e1875b892 --- /dev/null +++ b/Formula/m/metalang99.rb @@ -0,0 +1,35 @@ +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" + + 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..90b592ca42f11 --- /dev/null +++ b/Formula/m/metals.rb @@ -0,0 +1,73 @@ +class Metals < Formula + desc "Scala language server" + homepage "https://github.com/scalameta/metals" + url "https://github.com/scalameta/metals/archive/refs/tags/v1.5.3.tar.gz" + sha256 "008a39fd5b8c8589cf6221e3baaf887cab4f3c7554a7be91a875b02cf1da9578" + 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_sequoia: "5d375d0d8813da31c2f4bc9a1ec5799fea294f1f1bc88b1ed4dc5b6d93cf1d53" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e6bbdd1472833d5412bebcf5af842c85dcf30319c49d5fbd87fe3ceb41c22f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "147516fe36c60676aa1923d958ea50e3f8b572fdfa8b6109a83eca3134683847" + sha256 cellar: :any_skip_relocation, sonoma: "11cd8d503e6dcc3193aa69cbdfed6068bfc9ff8d6b60c6d089b4c449a447d30a" + sha256 cellar: :any_skip_relocation, ventura: "daf54b479006a2a8b59760297593649bea3589f5c7a6cf4de8cbf6d44531157a" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b0853607504f74c18109afda0b65d62ce439d3b11fb3d575cfc694d4a80ba0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba54ad830ad08452908417651cfec07ca8c4d83b75ac9d5a79533e6d0cb09e14" + 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) { |it| it.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..e412f1862579f --- /dev/null +++ b/Formula/m/metaproxy.rb @@ -0,0 +1,69 @@ +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.0.tar.gz" + sha256 "0e23e251509451170f26e7adf649fa8cc40bd9ade36cdac24a6045ec9efb93ac" + license "GPL-2.0-or-later" + + # 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_sequoia: "7835fb6cae644ed2f39a5664c5666a9e99d0b3c2d933c66d8e409794563973b4" + sha256 cellar: :any, arm64_sonoma: "4fbd1191d8611e77b713ea885cfbb4943bc10ff9599c262231c20a0b765a3240" + sha256 cellar: :any, arm64_ventura: "2ee377cd3bdd574ddccefa39c1684c91d4d05870997166109a0c036c8b10b90c" + sha256 cellar: :any, sonoma: "e239d6eb5b4aab05803d2577a9ad2a295608a87b8957158697c20cc87874c38d" + sha256 cellar: :any, ventura: "66b591ffa521626a5dfd61409ce25dfef21051920c7298dfaa600dd8fcda5643" + sha256 cellar: :any_skip_relocation, arm64_linux: "e26a07e78261675b72915ce44711749a706d54601c110db6cd6133bb18c7ea35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a5b8efcb37c726dd8284a18f67b95bc304be3c59f1487542ef157990a78eb16" + 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..d490a2c8a60c7 --- /dev/null +++ b/Formula/m/metashell.rb @@ -0,0 +1,70 @@ +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" + + bottle do + rebuild 1 + 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..9b1a27e2b2595 --- /dev/null +++ b/Formula/m/metis.rb @@ -0,0 +1,53 @@ +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 + + bottle do + 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, mojave: "f3cdcf0cc5af4ddd27a4550d4a73cffcb34058fe34604b09d453610460d24465" + sha256 cellar: :any, high_sierra: "88b6965d941a87044150238387971c4bb94ed2ffca327affccaf311d666a2b4b" + sha256 cellar: :any, sierra: "9c8deed80ece8c24e7ebccbce8410557b27afe711d3f59fccb7d781254d0cc34" + sha256 cellar: :any, el_capitan: "54f75262475744bc6ad3ba66ac801e03c18bbac00a9bcf0ca9d05853f2022498" + sha256 cellar: :any_skip_relocation, arm64_linux: "8703574aca9ad47530cd56fdb31ec1e24b16643390a0cda290e19271a9a47690" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8daac6acbeaad9583ff26d72a8ad440ac41efb8656973213902bdfe66cd61e6" + 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/m/metricbeat.rb b/Formula/m/metricbeat.rb new file mode 100644 index 0000000000000..21cf89fb44231 --- /dev/null +++ b/Formula/m/metricbeat.rb @@ -0,0 +1,88 @@ +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.0.1", + revision: "bce373f7dcd56a5575ad2c0ec40159722607e801" + license "Apache-2.0" + head "https://github.com/elastic/beats.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "855b4056e9dfb1a13f2af2647ccd65f1891fbe693530e0aa21242b8a3aa7b8af" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e52e91099d3af4ef488dc5dbde3552d92a426d2617a76bc52216cf4c148228b7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "077b31d7881455128ac761ea9b3a19ca10c59ce336b6742c365f81c7128d4c64" + sha256 cellar: :any_skip_relocation, sonoma: "1ef9e9148bb93e99acabd6bf9ece0c5774c4f791ce82226146f7d4e298835fcf" + sha256 cellar: :any_skip_relocation, ventura: "fbea922f1f94630bcccecbb8deca76e4f8cee3fe4f580ef43bedd260f8a1149d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9df91e264926fd73d167e8925c10862741aafac4010a9d887a3e18cb7de1fd2c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "85f32bea95151a59f2f27b43c5cd335449ea9fb53d393a7f761b3b124e5c1357" + end + + depends_on "go" => :build + depends_on "mage" => :build + + def install + # 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..f3800a17128a9 --- /dev/null +++ b/Formula/m/metview.rb @@ -0,0 +1,112 @@ +class Metview < Formula + desc "Meteorological workstation software" + homepage "https://metview.readthedocs.io/en/latest/" + url "https://confluence.ecmwf.int/download/attachments/51731119/MetviewBundle-2024.11.0-Source.tar.gz" + version "5.23.1" + sha256 "4af1333431664bdbf0a11a6ff20bac847f83647358319864d1b1ad421d33970a" + license "Apache-2.0" + revision 1 + + 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 "openssl@3" + depends_on "pango" + depends_on "proj" + depends_on "qt" + + 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 "gettext" + depends_on "harfbuzz" + end + + on_linux do + depends_on "libtirpc" + depends_on "openblas" + depends_on "snappy" + end + + def install + 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..b06544b4301f1 --- /dev/null +++ b/Formula/m/mfcuk.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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, mojave: "2540f3232f4220dac3cf296c43fea2f2582c71ab18037e9d0c047c4f1df39f71" + sha256 cellar: :any, high_sierra: "f624f03ed0674915332412b50d0013a9495aece4b1ef773767024d11b8fd0d8c" + 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..9cc8b74487418 --- /dev/null +++ b/Formula/m/mfem.rb @@ -0,0 +1,56 @@ +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" + head "https://github.com/mfem/mfem.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3e9c3599701802b5f1fe3c2e8fcd933dbec04f03adc247b1f2e438545dac1e4c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "66b1e7f21b8baa4524495b5fdd9418081f0db55d935697164e486ed0a730eb1a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8e1de7199a836c46ec439fc0f1d5617cfa2f760407c1c24ae87cd9a488c64367" + sha256 cellar: :any_skip_relocation, sonoma: "89e928432924db722ffdf9662d6603529879e1c0772b5b732eae23da819abf56" + sha256 cellar: :any_skip_relocation, ventura: "1e43c80cef99645d02450848774f812ba9978f72302b4eaa1c96d0adadf25a55" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd00cc4e92a1d4565fd1014d93d1fbff1405e381e7e308f9737cbfe05cdd7650" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c35e1927d2e7ebe08eab48bfe60551a05d4138b1d89d743269216ea304664674" + end + + depends_on "cmake" => :build + depends_on "hypre" # optional "mpi" + depends_on "metis" # optional "metis" + depends_on "openblas" + depends_on "suite-sparse" + + 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 = [ + "-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..40027f3181cf4 --- /dev/null +++ b/Formula/m/mfoc.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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..a8216225416d4 --- /dev/null +++ b/Formula/m/mfterm.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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..18be611c95060 --- /dev/null +++ b/Formula/m/mftrace.rb @@ -0,0 +1,52 @@ +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 + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "097fa4cc166f51d4033415a651817207d3a5734ef50237969b84f5a8fc6ddfb4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9415613e99216e1174b5e962761cef44084c8e9ef41208673b31e44d55879828" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e639eb620cac19e786da74b7a387f742f23837823bb2dee341e42a5b6df751d2" + sha256 cellar: :any_skip_relocation, sonoma: "69753e27a76317dfa0c872ac7a7a90e8c0849c39fae13a1cc677a1b1ded7c26f" + sha256 cellar: :any_skip_relocation, ventura: "406e8d33e1825be811ad65d5b77d9f9538011238b3811b9cda2f40bdf50a3b80" + sha256 cellar: :any_skip_relocation, arm64_linux: "d5e079fcd7a317dfd7018ce822dbaef57907cbe203c96230df05adfba693fbe8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "138d79020d6a8942911908b01c237b00dc0847d9d8e4a506818db60e54aef44c" + 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.13" + 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.13") + 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..0d3b152248b49 --- /dev/null +++ b/Formula/m/mg.rb @@ -0,0 +1,47 @@ +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 + + bottle do + 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..5bc9684d5ffdb --- /dev/null +++ b/Formula/m/mgba.rb @@ -0,0 +1,86 @@ +class Mgba < Formula + desc "Game Boy Advance emulator" + homepage "https://mgba.io/" + url "https://github.com/mgba-emu/mgba/archive/refs/tags/0.10.5.tar.gz" + sha256 "91d6fbd32abcbdf030d58d3f562de25ebbc9d56040d513ff8e5c19bee9dacf14" + license "MPL-2.0" + head "https://github.com/mgba-emu/mgba.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "d8ebe6fbc8f70d57496bdebbc8fc268c85f0ffbfa43c75803f99373ad8e2c7c4" + sha256 arm64_sonoma: "384c4b392c485731de5660702fb07898aeeb84f75cf0034d8e9fb2d3d0580fa4" + sha256 arm64_ventura: "2fbcf8eb43d84643bb7b785700ce107b73cdbe2355ae7fd644bae4a5b27a1365" + sha256 sonoma: "b48c92a1317213099f472790e21a95b2706caa5d4dc926d265947557fef71511" + sha256 ventura: "9c1ea93c98a50f653d8420817ca951ed455e8f9d9e75326e15ff490e89d4bb1c" + sha256 x86_64_linux: "1fcfaba1760543dc1cdbdf8c3f2a020d98aefe30d2050ee58d792ca2e6fb550f" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "ffmpeg" + depends_on "libepoxy" + depends_on "libpng" + depends_on "libsamplerate" + depends_on "libzip" + depends_on "lua" + depends_on "qt@5" + 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 + # https://github.com/mgba-emu/mgba/issues/3115 + args = [] + 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? + inreplace "CMakeLists.txt", + "list(APPEND DEPENDENCY_LIB ${EPOXY_LIBRARIES})", + 'list(APPEND DEPENDENCY_LIB ${EPOXY_LIBRARIES} "-framework OpenGL")' + 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..3f719959b43c2 --- /dev/null +++ b/Formula/m/mgis.rb @@ -0,0 +1,67 @@ +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 1 + head "https://github.com/thelfer/MFrontGenericInterfaceSupport.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "609ed0597809fb94917de333e84bc8e4576ca5578fc9cfd597683930c8271319" + sha256 cellar: :any, arm64_sonoma: "f0840ea4a984ff1e339fe09aa34a15558e7006188307b15240d7c80d6061c9aa" + sha256 cellar: :any, arm64_ventura: "3cff91f04f779e56f1153c0321747fc33d2e836abaff7eaa16fce596872b7392" + sha256 cellar: :any, sonoma: "5529533762511b3008c9bff15f41e9531901e783f245029b6257e7c17832325d" + sha256 cellar: :any, ventura: "1732d4ba927e76eedc4ad01d9bc881df0502b5136a76a83854bc188a1770c917" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d0346eb3292a2c9b6502edbb0b7af1da1c89dd6f05f4499728095df471bc3a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b829e753ccdb888bd8a946a37f4a83d1090bfc033341fb3f9bdf29faad363609" + end + + depends_on "cmake" => :build + + depends_on "boost-python3" + depends_on "gcc" # for gfortran + depends_on "numpy" + depends_on "python@3.13" + + def python3 + which("python3.13") + 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..a679369dad8c2 --- /dev/null +++ b/Formula/m/mhash.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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, mojave: "b4ee65a9ee33f5e19e085c477ec1634e2aa1626331eb2465484713759b264163" + sha256 cellar: :any, high_sierra: "82f39af8037f070fafcad0280b151dc58e1b5b8c3ea1fb75f4ee372256d3ad2b" + sha256 cellar: :any, sierra: "f630165dd7f7a0f8e5b710e0e0af5ebca6ca0edc98cd46a01b617a3e16bff7ea" + sha256 cellar: :any, el_capitan: "8817cea2b724d7ea00fd1efb348aa8bdb5d93ca155cb9ccf8eb316f76b42941b" + 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..9438cd3facbe7 --- /dev/null +++ b/Formula/m/mhonarc.rb @@ -0,0 +1,31 @@ +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" + + 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..a1a9199c83a02 --- /dev/null +++ b/Formula/m/micro.rb @@ -0,0 +1,32 @@ +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_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, 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..2f53886b5440f --- /dev/null +++ b/Formula/m/micro_inetd.rb @@ -0,0 +1,47 @@ +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_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..7dceecac98f6c --- /dev/null +++ b/Formula/m/micromamba.rb @@ -0,0 +1,84 @@ +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.1.1.tar.gz" + sha256 "789d3d89fe8ca9f06344da21797e3d949ad1ff0ae4c633dc242a333e0ee37485" + license "BSD-3-Clause" + 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_sequoia: "74d15240890ade0f18fc3177f478b15637cd472afa8b07394c658cf318719e51" + sha256 cellar: :any, arm64_sonoma: "928e0f64d19adf80b818f62bd1fd62bbeecf751b7c8aaf2ed3cad596f22feb4c" + sha256 cellar: :any, arm64_ventura: "afdc521ae40b2719038bb2f823dd2aeae29f2228f3dd3cc52222dba2f44740b6" + sha256 cellar: :any, sonoma: "a04b81ba206040796ad0bea5aa1a86271b4223e5b56d2c2e7fa7b26e9f7e81f7" + sha256 cellar: :any, ventura: "58cb2cf31fddd3bd268c6d7a129beddf92c475d3d10e8dd11ddfbdf05c8b5c55" + sha256 cellar: :any_skip_relocation, arm64_linux: "3bdda7e4d68b3a7956c17afba45ede0f90c80ad5a406258a815fa216fac1150f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f22521844f3e9957a8be3a860443643ee5a38220163c20b496f083404fe020ce" + 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" + + def install + 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 + + python_version = "3.9.13" + system bin/"mamba", "create", "-n", "test", "python=#{python_version}", "-y", "-c", "conda-forge" + assert_match "Python #{python_version}", shell_output("#{bin}/mamba run -n test python --version").strip + end +end diff --git a/Formula/m/micronaut.rb b/Formula/m/micronaut.rb new file mode 100644 index 0000000000000..6f0f93066bb19 --- /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.8.2.tar.gz" + sha256 "d768dce993cdcd4ae56c9da689dbf168aaa46f051906408388fb6391bd5da60c" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "52a8f30b0de3d8e2954f4c945fcf51ffe16ab43d916648863a42c58a6548cf6b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "29fd88aeb5c52f58568540efdc57b5f1776e53ebd98472de962d9d9fc0bdc387" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d255cf754fe77aa497eb9860735d733722587fbd4cf9f251acbe5a88f12f148b" + sha256 cellar: :any_skip_relocation, sonoma: "2b5729824f9d66059db65e654460f0d93cd53d0c7767b6e9dc85187538c02fb9" + sha256 cellar: :any_skip_relocation, ventura: "4bebccef3affccbf431c1f03a83f320e2d850e855d9e60aaf1cb93f5c33a1f6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "5eadd7a5c96c83b82a3d79d2ec4ed9450b76b3d9b824f8f379a422c18031bff2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2fe630d48eabf62824767519ae2afb5df5a85e877006800182d605ac154ef55e" + end + + depends_on "gradle" => :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..c782877ddb659 --- /dev/null +++ b/Formula/m/microplane.rb @@ -0,0 +1,45 @@ +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.36.tar.gz" + sha256 "efa78a7b3b385124e73e230d71667a6af45cd294cd901ea25d47031a97c7498c" + license "Apache-2.0" + head "https://github.com/Clever/microplane.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4d3f92ce6eb78de3a8789aeb12afe4c021c98c0c257bb46519a5a85fb725d02a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d3f92ce6eb78de3a8789aeb12afe4c021c98c0c257bb46519a5a85fb725d02a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4d3f92ce6eb78de3a8789aeb12afe4c021c98c0c257bb46519a5a85fb725d02a" + sha256 cellar: :any_skip_relocation, sonoma: "22a8fd778008830116ac7046f6bcaea8e19b647d4660768e337a59359db6f12c" + sha256 cellar: :any_skip_relocation, ventura: "22a8fd778008830116ac7046f6bcaea8e19b647d4660768e337a59359db6f12c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd4a6e1e4dc1ab0adbeb7815c059ae06a93cad65ae9786756dc413fc74614cdb" + end + + depends_on "go" => :build + + # bump to go 1.23, upstream pr ref, https://github.com/Clever/microplane/pull/295 + patch do + url "https://github.com/Clever/microplane/commit/3e2f1371e56af6d65fc62af5c306a7d6485321ad.patch?full_index=1" + sha256 "6ba123167defb192f0f97d6dc918be9a557014f8a0367f6be663232b930e3dd5" + end + + 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..e6960dcb469d3 --- /dev/null +++ b/Formula/m/micropython.rb @@ -0,0 +1,42 @@ +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.25.0/micropython-1.25.0.tar.xz" + sha256 "9fe99ad5808e66bb40d374f5cad187c32c7d1c49cf47f72b38fd453c28c2aebe" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "470bfae6fc4f82301df5ae1f265b00d7b981a5db70120b4242b67890c5190a98" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "545f7cf7279b407e843e349024e2fcd264032be5312c1bd7fc9a59f440aae5fb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "295730364d3c8f548e2fa71c71d9ddbb5acd3dd7b1e37ee3cc2af7862f4f92c3" + sha256 cellar: :any_skip_relocation, sonoma: "936cc289f796f38be76d8e61d895498007aac8a3d686d3a7f10260d77cb77657" + sha256 cellar: :any_skip_relocation, ventura: "2d473ef1dbda05c2759730d8c592599ce8a5712ea2607154db81c0244258241e" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a9e34b94bc6d146b7c7db61c02fba86eedf56812dc389fbe0b8d712d54c43a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e6f131cc475b96a98e22d54c82905c055d46072a4b15d6fdb027fe25100d25d" + end + + depends_on "pkgconf" => :build + uses_from_macos "libffi", since: :catalina + 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..593522efca76e --- /dev/null +++ b/Formula/m/microsocks.rb @@ -0,0 +1,32 @@ +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_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..2b064ce8167dc --- /dev/null +++ b/Formula/m/midicsv.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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, mojave: "3fcfcbe9f5b248c681f57eccd4c17c2f93d1a977c3a19949cbeee6dd77038787" + sha256 cellar: :any_skip_relocation, high_sierra: "737ea2eda70a778d076568af902f16d609aaae4baeb7ada7795c32d4de886f81" + sha256 cellar: :any_skip_relocation, sierra: "314a21ac6aaad39594a54bae4bf3ecc64e3ef0cd655e7c18c6ff05ebd72c9b86" + sha256 cellar: :any_skip_relocation, el_capitan: "230ba9ec9cbb40c2c128c1a063152fd07888210f59bf37f1f68bcd2f33d4d863" + 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..b165ac16409b2 --- /dev/null +++ b/Formula/m/midnight-commander.rb @@ -0,0 +1,66 @@ +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_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..d768f56de46ca --- /dev/null +++ b/Formula/m/mighttpd2.rb @@ -0,0 +1,39 @@ +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.8/mighttpd2-4.0.8.tar.gz" + sha256 "cad7a92e3f9ce636d0099b226e080d0102a2498b9ef9d0abfc6b24e24f1d127b" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8c8f8195c36bbea691d3faf56681c1a9ec10932a550d9854342d41a78427c1ca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c7ea8b3e622834bff079b88311cb158ee882dd195136973eab5fdafdb0b798dc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "594c27cc4bb9feec025e53492bd863f03a622beb0ed5efab87e0d35d3e02f129" + sha256 cellar: :any_skip_relocation, sonoma: "f614b9817495f3a71a5bd712bf6d72668e13f0ede9bc682e25c85eebb2372f4d" + sha256 cellar: :any_skip_relocation, ventura: "04e1a56bce1760a82b6845e1ed2b864d984182d8015c3c641a32e6e3262f7d80" + sha256 cellar: :any_skip_relocation, arm64_linux: "64e3f7e55d5ec5f611e61e6e8e15d542b5e6af80d363306479adff36682e5ae1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "686df4669d80d3e379576984ffe0dfbe07197f286dc944045d7bab7ee6e26137" + 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..3ae25f64ac0aa --- /dev/null +++ b/Formula/m/mihomo.rb @@ -0,0 +1,58 @@ +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.8.tar.gz" + sha256 "47e38ea4220f5b84485b06d980ff06cc9a48cd7bd9bdf1236168adf728a99835" + license "GPL-3.0-or-later" + head "https://github.com/MetaCubeX/mihomo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e778993459c59f6503b6e5cf36a2510094f56e39563801f811a030b39b49b22e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "684a00e5f154a0dc54a34efc8860a144b67add97c026366479530cbe5855ebe7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0ad47220dc55097cae7ea5a0060dc21a15516ca5e9af00b4494940360a57b041" + sha256 cellar: :any_skip_relocation, sonoma: "b26d0e0a997d80a2df55f7d2638b0e389968229598948373f090cff06617d6c9" + sha256 cellar: :any_skip_relocation, ventura: "60d53ce49c24fca624a5e39cd1945e96a88a226cbff99312002b1287a7ee7e7e" + sha256 cellar: :any_skip_relocation, arm64_linux: "20e41714ba9bd2d6bb867f8b85da2a2f57e9ed5a84d52890989b5b4549883452" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0df5d71a8aa56d7c8f1be92cc5614ac1c75d5c5c842c2c2aa43eef0f42aae71" + 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..cf09c687bc1b3 --- /dev/null +++ b/Formula/m/mikmod.rb @@ -0,0 +1,37 @@ +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_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..d7968fbf27b7f --- /dev/null +++ b/Formula/m/mikutter.rb @@ -0,0 +1,330 @@ +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: "develop" + + livecheck do + url "https://mikutter.hachune.net/download" + regex(/href=.*?mikutter.?v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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..2f6f7f331cc30 --- /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/0.12.11/mill-dist-0.12.11.jar" + 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: "317801b292e4332605d7dc2a06b20206cb33db9def24b1af80e451c5cef5afce" + 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..cf8e37e64fd68 --- /dev/null +++ b/Formula/m/miller.rb @@ -0,0 +1,35 @@ +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.13.0.tar.gz" + sha256 "6beca48af3066fc8d87c3ce17c5dd3debac61ff8f296c0e95c0634fd3ab05599" + license "BSD-2-Clause" + head "https://github.com/johnkerl/miller.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "09b57aa36476019c512c15cd66d8cc080e5f219ff1acc83eeb52bcb166b776c7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "11dee02cb195a2b70c76d71f718007093b3c115b48bde88a910578fd17f964d6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7f604a40e7a20e6150d5abbc6d5a6c654dab3dbcef141027208b2e4c7da457e8" + sha256 cellar: :any_skip_relocation, sonoma: "c37ec76071260833d18befdfeeeaaf4162386c0c25477346c8b6a64f4bedc296" + sha256 cellar: :any_skip_relocation, ventura: "1781bcd50d09557818dd14aab3f1b51d0aa328c08a9495236e676205ebabc158" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5fbf792b92ccb4015c4fe4ad2581f81a0cc4d8e110d76ccbd149d02e57f96255" + 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..0a483682d22e6 --- /dev/null +++ b/Formula/m/millet.rb @@ -0,0 +1,99 @@ +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_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..ae15baf106675 --- /dev/null +++ b/Formula/m/mimalloc.rb @@ -0,0 +1,37 @@ +class Mimalloc < Formula + desc "Compact general purpose allocator" + homepage "https://github.com/microsoft/mimalloc" + url "https://github.com/microsoft/mimalloc/archive/refs/tags/v3.0.3.tar.gz" + sha256 "baf343041420e2924e1760bbbc0c111101c44e1cecb998e7951f646a957ee05f" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "b657c7aca154a9b170620ac048e5debd9f0b851408136e9d3491e70649492947" + sha256 cellar: :any, arm64_sonoma: "cb4094377d756f2611176257b1110e6e965990c2ae2472411031e9493975c16a" + sha256 cellar: :any, arm64_ventura: "417efc86d46f48ce567097aaeeb1520953a01757aab9e419bedf5912076187c5" + sha256 cellar: :any, sonoma: "55982e35a14e02cb0520d13f785bf7b120c5f85d6c1ba5d20bd4875c93724f5f" + sha256 cellar: :any, ventura: "1ab149295b0719eb3f7fa08c5b6729bc8dfa81ab053e4f906e004fbea4300f5e" + sha256 cellar: :any_skip_relocation, arm64_linux: "60df33e9543a3f69549eea7e959c2358bf55804e9e4a1cfe7e90513e74a740b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fbadee26452799c56fbdb76c6a5da92852b2332cab14be7da3b4e26be484f145" + 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..1aeac8a488c18 --- /dev/null +++ b/Formula/m/mimic.rb @@ -0,0 +1,54 @@ +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] + + bottle do + 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 mojave: "a185641e0d84aae004df33923ca0612b9ba0d59c9a1d4a5fd80ebd6d1de69f58" + sha256 high_sierra: "98a927ebfffb3a965506102d758fe4a5e76d0c6bd732972e6b113505d28241c8" + 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..ae8a81d140e5b --- /dev/null +++ b/Formula/m/mimirtool.rb @@ -0,0 +1,57 @@ +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.16.0", + revision: "b4f36dac3af7046a0a7a287bb88b503737e07c48" + 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_sequoia: "28e5a0931ba134b497468a2f463c2be3aa46b108487571743ea63089288bbafc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "41821384aafbb860c72ec59d102d73f64d3ef3056fb253ea3d1207eb26d0a554" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a14c5fe71d7de72a30b98e92c9e3d9f2a7c04b39ab27aa0e7d2156706c827021" + sha256 cellar: :any_skip_relocation, sonoma: "8745d740719833ce966e41ff4940acaea9f550e8f7028a1778a0f429dbb90606" + sha256 cellar: :any_skip_relocation, ventura: "e455e12db8479fbaf6faa1bf646a1cc4c0df8a092289c39c8a43c749804d7fb8" + sha256 cellar: :any_skip_relocation, arm64_linux: "acfac3537d9c5ede709c59a61674f881e7a955fb7e868a35f313d56626463ae0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5edce97f22531f53937378a98faa840bf774ae3ec048aec8928e0a34be5c3974" + 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/minder.rb b/Formula/m/minder.rb new file mode 100644 index 0000000000000..bbbe772aaab96 --- /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.0.89.tar.gz" + sha256 "8cc2ecfd5730d6718d8ffd54b4557aed84f2aa36d524783767345018341c1b84" + license "Apache-2.0" + head "https://github.com/mindersec/minder.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1aaf51fbcb5e872ab87fcb71067b8e1499c2a4ea836504be50ff393b42ee8fe8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1aaf51fbcb5e872ab87fcb71067b8e1499c2a4ea836504be50ff393b42ee8fe8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1aaf51fbcb5e872ab87fcb71067b8e1499c2a4ea836504be50ff393b42ee8fe8" + sha256 cellar: :any_skip_relocation, sonoma: "a5fe2cbeabb3a3d6840a25d5c91a8d289f98a9b088da2d35c627fa832e614dd6" + sha256 cellar: :any_skip_relocation, ventura: "41c7932e9dd3c308c4c87ae6246e7338f4b09cb2312a0d72e925e5e15599898a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fffc005a4f80bc0ad7392a7e80cf7ecf87d4c1a7a4155cdf6a3c88b09d345d23" + 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") + + output = shell_output("#{bin}/minder artifact list -p github 2>&1", 16) + assert_match "No config file present, using default values", output + end +end diff --git a/Formula/m/mingw-w64.rb b/Formula/m/mingw-w64.rb new file mode 100644 index 0000000000000..fe841ab9e6799 --- /dev/null +++ b/Formula/m/mingw-w64.rb @@ -0,0 +1,237 @@ +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-v12.0.0.tar.bz2" + sha256 "cc41898aac4b6e8dd5cffd7331b9d9515b912df4420a3a612b5ea2955bbeed2f" + license "ZPL-2.1" + revision 3 + + livecheck do + url :stable + regex(%r{url=.*?release/mingw-w64[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_sequoia: "5a9ae42e386047663ce83a4bfdd5baba0f3194a82a7b027ebd007b195036374b" + sha256 arm64_sonoma: "92f23f47355fe2b1e528190538ebb34d458d8696834c63a585e41e2ef965ec20" + sha256 arm64_ventura: "f81707aced2a718e657628136c3d2eafc27aabf9f2da819d4a52c03d8b16a486" + sha256 sonoma: "e344d42914b81fc67338747aa5d79e21976b1dd2fa8ad5eb1c12449500c45959" + sha256 ventura: "a677397d8fc7fe99d1b51fa9cb5dcd385c576dfa10e95089843c8ba0471fe169" + sha256 arm64_linux: "7560388b1897195f4c425bd1d22a970d422fbaf3e6f17732baeaa0c381654099" + sha256 x86_64_linux: "e76356b3bb0aa7fd99d07fcd0f04ffd87870e6b77b2a8861f18ced039355cfe9" + 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://ftp.gnu.org/gnu/binutils/binutils-2.44.tar.bz2" + mirror "https://ftpmirror.gnu.org/binutils/binutils-2.44.tar.bz2" + sha256 "f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a" + end + + resource "gcc" do + url "https://ftp.gnu.org/gnu/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + mirror "https://ftpmirror.gnu.org/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + sha256 "e2b09ec21660f01fecffb715e0120265216943f038d0e48a9868713e54f06cea" + 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..da9139881e86c --- /dev/null +++ b/Formula/m/minica.rb @@ -0,0 +1,35 @@ +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_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, 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..fd7d94eb887a1 --- /dev/null +++ b/Formula/m/minicom.rb @@ -0,0 +1,65 @@ +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_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..32f27f5ef9358 --- /dev/null +++ b/Formula/m/minidjvu.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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..352ceaedaa725 --- /dev/null +++ b/Formula/m/minidlna.rb @@ -0,0 +1,117 @@ +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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "d3a971dd6797fd9bc19c0473305861658dea94629092eeb4599f0820388b22b4" + sha256 cellar: :any, arm64_sonoma: "ec3048945b8e139ac5f5c5f155716e5e78b8a752ba539661148e1aac1d9c6e46" + sha256 cellar: :any, arm64_ventura: "a0e8d265dd82a964d6e912a74e35b174eba83329466180ccc7b6fcce918c3f3b" + sha256 cellar: :any, sonoma: "359ca672fd75a717663eac68d270f1d855002404cc82dc7fe22ab72eedc70601" + sha256 cellar: :any, ventura: "c6e43a0397d8e87ddba11a2d75f8e656d6340af549c9e72132a327ca459dbef1" + sha256 cellar: :any_skip_relocation, arm64_linux: "1fdde2237ecdca8be2b2d35b0ad861b17a7767b12b674530e56020f768af0ce9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4b4e7f1931b7df49351bc9a5b982346ef79188ce57e7b3f977846664d1b942b" + 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@6" # ffmpeg 7 issue: https://sourceforge.net/p/minidlna/bugs/363/ + 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" + + # 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 File.exist? pkgshare/"minidlna.conf" + 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..339153713d5d4 --- /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.8.tar.gz" + sha256 "1c360012c3dd0202601db26755c511969b6c527f96d6829861a74095633a35c2" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1e0d27dd1fef8dcdcd23598be51cc9819419419c84b62a62bf0b97d28db08b70" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "45f578e2d4597071549c305ffeced5dc3e364ff171c28d365d253ec891e32bcd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "042c119283d08ce163e03ed113287b3da869ec3c2f9dd9b29d553b2b2c9155ab" + sha256 cellar: :any_skip_relocation, sonoma: "1697fb84642eeaed22e169595f8ae33fe18126d7d8121ad9278eaebff95b7137" + sha256 cellar: :any_skip_relocation, ventura: "39e5e3f7701a0bb7dff79506a00c95958e79b0afd0c02f8c857cc3918e820305" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be8b87cc40ab4b80182e3041936b2cf60de72623149b6cd216f3e5eeeff2c592" + end + + depends_on "go" => :build + depends_on "postgresql@17" => :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@17"].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/minigraph.rb b/Formula/m/minigraph.rb new file mode 100644 index 0000000000000..f4e66713183f3 --- /dev/null +++ b/Formula/m/minigraph.rb @@ -0,0 +1,48 @@ +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_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..1063db4505f15 --- /dev/null +++ b/Formula/m/minijinja-cli.rb @@ -0,0 +1,38 @@ +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.10.2.tar.gz" + sha256 "d3d87f55bc6c36345602023946ddc1c68d345a51f5f1e8891176efc2dc0e7ec2" + 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_sequoia: "fdab575674a5aba3287226ea984f48f5f726ff1a0b9e0b4f9bf7f89859577d15" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ebdba325ebd5763d2582a2f8bf37617f3480a474c593e34d44c2535c4645558c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f81b9d6b7c267b0f19a82bb18fd2819be637d7732fa6e9a78c16b708d298209d" + sha256 cellar: :any_skip_relocation, sonoma: "41d21db20b1c5814f4fa9f414180a667a53f56eaea3ddbca4cb66bfa96a23ba5" + sha256 cellar: :any_skip_relocation, ventura: "c45256f4dc5780cca1800b1f31236350c7f7bb1511cee70cd644741253452478" + sha256 cellar: :any_skip_relocation, arm64_linux: "ef6f8c2a3020b5099850488a2faf33845c70738e67d3ff83e5ccfb235ca96bc4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82d050d407ccece77126f7fcdc76f7df392244757fdd7cba1f6bc5729a5174ab" + 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..154e7c2e87e68 --- /dev/null +++ b/Formula/m/minikube.rb @@ -0,0 +1,42 @@ +class Minikube < Formula + desc "Run a Kubernetes cluster locally" + homepage "https://minikube.sigs.k8s.io/" + url "https://github.com/kubernetes/minikube.git", + tag: "v1.35.0", + revision: "dd5d320e41b5451cdf3c01891bc4e13d189586ed" + license "Apache-2.0" + head "https://github.com/kubernetes/minikube.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7892fe64bf008ddcbb54b27bca16d162ba2ac2d6aae8c5a80459e4dc063fd6f7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5736711e2375732dfb96adf43e10c4f19be2462114311508e3b7c7ef94ea190d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9a374a4d807f2fdaf2656cc1ece11ba93d8b339741450aa073aec5838a2da9bf" + sha256 cellar: :any_skip_relocation, sonoma: "3b4fdb423c0a9a216cc41eb9330550b5e23b6e4c069df40b2635fe99a2a4d1a9" + sha256 cellar: :any_skip_relocation, ventura: "1f8d986fcb54cc99a5a78d056b96d16ce7760e5dc930710d113a7f5a187e2aa4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "542f520e0e71d3e4910333b69ac14fe80fa22d566743b0a9f910bb640002e56a" + end + + depends_on "go" => :build + depends_on "go-bindata" => :build + depends_on "kubernetes-cli" + + def install + 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..cb50c086f9403 --- /dev/null +++ b/Formula/m/minimal-racket.rb @@ -0,0 +1,121 @@ +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.16/racket-minimal-8.16-src.tgz" + sha256 "4e727db75574ab11d6bec7af5e5d72a084fa7f662e200c35d5bc200772f5ce96" + 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_sequoia: "1c13971c4685d61b4a998d18f53b1285044604be397e03b84291e68e08547a6f" + sha256 arm64_sonoma: "12f2f918bf8ae7c880fa3e96d3c5de0fe872b5d087b54615e6d16c4e176e0d84" + sha256 arm64_ventura: "1913e3527eeeb09b2a601a406a64500c3d0d31d3d66c1733f542e6f6d2f33a9f" + sha256 sonoma: "a318548748b2c74fe576f00623b8c63eb999faf4cbc36aadaea23485ea9e09a7" + sha256 ventura: "55e3661eb9f4c4544a4595ba98dc4f6ecb39ac725c04562ee8126855ef5e09ff" + sha256 arm64_linux: "be6ee4a1db72e1a0a33e4aa6562f907f30740f0d529b42f9d15e1be187ce7e54" + sha256 x86_64_linux: "907ef000531b5bac63feadcae9ca4e6518709384e088c6f33139bb43b1867575" + 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..cfa2c52dd5602 --- /dev/null +++ b/Formula/m/minimap2.rb @@ -0,0 +1,40 @@ +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.29.tar.gz" + sha256 "008d5e9848b918e4eb09d054aa3d6c272d50e92b8fc8537abf5081a507019718" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a17ef19c327d33af21ce663a5c00e731b427ce5539a4fd444c69d08ed13ac031" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "02c4899b062bf0c3bd592ffdc4ebfcab5061468533230c6c1fea0c7cd1fc04bf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f8dbbb0a2e1de72ee94b40027b7efcc23a49e8ec71fea90737e71e3df0d78c92" + sha256 cellar: :any_skip_relocation, sonoma: "1451d3de7af2dd6f59cb1612f218c78c89be826afb339f36223d15454de33eda" + sha256 cellar: :any_skip_relocation, ventura: "820288efa0f55a08807d60affff35dd8853caba901878b4db15e1597d8d20284" + sha256 cellar: :any_skip_relocation, arm64_linux: "0796c7908c2694f083f9159dc476820ad29fed7caff4a4a5c471bfb6357f7a77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3543ef1808df306f48f1677511c6eb81109ca635f5873f521480f61eaef56a7c" + 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..e89ac692076fd --- /dev/null +++ b/Formula/m/minimodem.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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, mojave: "4c89fe35fbc5478c20d1db50f023c7c89467b7fbd17bd77810a6e8ff63e4b945" + sha256 cellar: :any, high_sierra: "091170cbfa058de152f2f1af5f2436963297c01e323e80fdfcd5bcf6d8c9cabd" + sha256 cellar: :any, sierra: "224fc001ea92a1df8133680c6eb9b6d659912d5e8ce84e8c12509a671538d8ae" + sha256 cellar: :any, el_capitan: "1539133df2fe9f85e8dcdf56e2a62d5ae116861e6dbc3b02e45680fbf8a467a9" + 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..06a8181d5f082 --- /dev/null +++ b/Formula/m/minio-mc.rb @@ -0,0 +1,57 @@ +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-04-16T18-13-26Z", + revision: "b00526b153a31b36767991a4f5ce2cced435ee8e" + version "2025-04-16T18-13-26Z" + 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_sequoia: "db913373f18141dec15e6a5cbd3057c1388a9f3ddfe9dbd31a99c352bc57ea53" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6f92466432bb6100f807dedc3cf4a6900fcbc0128d97884e8fa80348adae028a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e81ca22774f09f03f0a7cedc97527fa0b64183a7b19d1ed41667a08d3c3fec07" + sha256 cellar: :any_skip_relocation, sonoma: "a0c9ffe52177ca726b66a160633b6ec98bcc3890accdf825842b6db181b3ebc4" + sha256 cellar: :any_skip_relocation, ventura: "2cba7fc036ecf5b7a7d7ef0c8bdc2343c3bcb70d7192f24a3782b5ecb69730bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e2099365ee59980cb2bdc4cf738248ef7f75b5ae11316a0709991c485a5df966" + 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..e391012b1f1fe --- /dev/null +++ b/Formula/m/minio-warp.rb @@ -0,0 +1,47 @@ +class MinioWarp < Formula + desc "S3 benchmarking tool" + homepage "https://github.com/minio/warp" + license "AGPL-3.0-or-later" + head "https://github.com/minio/warp.git", branch: "master" + + stable do + url "https://github.com/minio/warp/archive/refs/tags/v1.1.4.tar.gz" + sha256 "1a8055bd4a8fc2e9bee6b93ebf3f0fa5dbbc560c8f9f53832ee885c88566fef5" + + # go.sum update + patch do + url "https://github.com/minio/warp/commit/c830e94367efce6e6d70c337d490a3b6eba5e558.patch?full_index=1" + sha256 "69d59f334cb60fd0d8aaf6426c27a1a995cad494e49024187673baba3bf35ec6" + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5f96a3959319137654f59cf95f39b802f4294e903b496f1bb818f55a248fedaa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ad0cc0c54056c3e1a65140276c1a4859222e6866a75343bbf062a0575c50332c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "34275103e3292958edc850991c4b0fa4cb575366cc4f6077b0fc20676f8224c0" + sha256 cellar: :any_skip_relocation, sonoma: "8812e75d4f70ae276dcafb3c5e5ce2cfc458b9ad8be9948bad9225ae6abe3231" + sha256 cellar: :any_skip_relocation, ventura: "e51bcfc2fde33bd43e3e9293eb22cec1a3176a3e797487bb1bb654b61210225e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd0deb74bdb394b6f27aa152a0da6eac1ebccaf345233fc5dcf2423910301b82" + 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..33dec07f92a79 --- /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-04-22T22-12-26Z", + revision: "0d7408fc9969caf07de6a8c3a84f9fbb10a6739e" + version "2025-04-22T22-12-26Z" + 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_sequoia: "69f0f37fb7db353a80d3087cdf9ff81b6360ddf7093f5a4afa5be83e4bcd1286" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a7f55c4ab143390090946862ae237d929f76acbdbbf4feb2a0869f59a1c02c68" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1efe823c24504e9001f70788b843f10c6ba9238ae6f26baf99dade55c46f745c" + sha256 cellar: :any_skip_relocation, sonoma: "617e0a7dd68d74177f009ec9c6204357c25ece9c0dfe39fc4a39eaf429a7b9f5" + sha256 cellar: :any_skip_relocation, ventura: "9085d34412161f4bed9faad79c08152840aa134d50f02790e486b65bba82f970" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae2e80eeb88ec3e0220104d49ba55c32c134bc5b20af4919eaa07414e91494fa" + 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..9a2319d2b4567 --- /dev/null +++ b/Formula/m/minipro.rb @@ -0,0 +1,41 @@ +class Minipro < Formula + desc "Open controller for the MiniPRO TL866xx series of chip programmers" + homepage "https://gitlab.com/DavidGriffith/minipro/" + url "https://gitlab.com/DavidGriffith/minipro/-/archive/0.7.3/minipro-0.7.3.tar.gz" + sha256 "49e7ddd448c12e1235631720bfbbe03dee3758ce717c16258a297112fb2a5eea" + license "GPL-3.0-or-later" + head "https://gitlab.com/DavidGriffith/minipro.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "c2262f766cd51c2f60136665bb54b28479895f2f45e3132fa6347f4653865619" + sha256 arm64_sonoma: "c7cc2ecf133cb887aeaf2789a5182fd7e2254a002458e96597a5bbfea7b80903" + sha256 arm64_ventura: "35da060df2788344cb4961b20d12d07f46af3b91f57205d29ff4eb8b0d04c71d" + sha256 sonoma: "ca12a15a1d8c7e34a91effb9f626d69a0cee7767e57b551411b9d1c629282c88" + sha256 ventura: "eda2df1cfd62ac8a350a42fbcba5d5d7d9949966c173f1b49dc67da079851ac7" + sha256 arm64_linux: "2bf6d4454b10358270335f584f2e985e521759d0a87cf972dd0678c194411f3b" + sha256 x86_64_linux: "92dd7c6ee958eabca1365c51859dc4c959406623cb963e0c41075b09fc54f97d" + 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/minisat.rb b/Formula/m/minisat.rb new file mode 100644 index 0000000000000..8b7428504c95d --- /dev/null +++ b/Formula/m/minisat.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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, mojave: "cc7b59b30490175c56a6068c97956c39da31068df2522376da99998761972319" + 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", *std_cmake_args, "-DSTATIC_BINARIES=OFF" + 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..61ee6d910fc74 --- /dev/null +++ b/Formula/m/minised.rb @@ -0,0 +1,37 @@ +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 + + bottle do + 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..de3d8ba740b8c --- /dev/null +++ b/Formula/m/miniserve.rb @@ -0,0 +1,43 @@ +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.29.0.tar.gz" + sha256 "48351a8165bd51f3c855695af1c25032b502f873c80f52f98a538174951cbb9f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0737d1957f73bbd2eab87296da1781bc7bd4de476715fce743abf4dbf0bf4333" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4ee123de7e3a28158c1f54c80212f2805b5456054c7eac394e37e2d5b5dcba4f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8e775b2fc727210da8bf295ecbc0dd02b013af0e0bb4a90e0dd540391074cdc3" + sha256 cellar: :any_skip_relocation, sonoma: "c8b4efb102194aa5934ff2a666b2dc602a676a4ae895e4099202974b4b464e06" + sha256 cellar: :any_skip_relocation, ventura: "b1535654a5a0e5c5907340965c8dcd3e2bbc3430afbbe794a70df7a1e98920c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "e6762e154da3ffc86f85cc9d67a1bb9a2b666696e6f1490bf9ebec53dca88ca9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3abba9ddbbe7f139aa9cccbbd15d1eb3067e3e3881c437b9fea20274934a58d2" + 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..32e7ac5b720f5 --- /dev/null +++ b/Formula/m/minisign.rb @@ -0,0 +1,64 @@ +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_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..25a7b297be7ef --- /dev/null +++ b/Formula/m/miniupnpc.rb @@ -0,0 +1,38 @@ +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.2.tar.gz" + mirror "http://miniupnp.free.fr/files/miniupnpc-2.3.2.tar.gz" + sha256 "985de16d2e5449c3ba0d3663a0c76cb2bff82472a0eb7a306107d93f44586ffe" + license "BSD-3-Clause" + + # 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_sequoia: "c4fdfdf22605ea11dfd6e866d3242bb664a53cc3b7eea62bfb423058b9b9b3cf" + sha256 cellar: :any, arm64_sonoma: "bb9ac898c244e04860ec28b0a3a489db6dac386b486eaa8de62099c11483bba2" + sha256 cellar: :any, arm64_ventura: "bd2a1273aff1fbf36a9075705a9015aebe5b73442ea0e2a341d719ad3c415620" + sha256 cellar: :any, sonoma: "9da80d7aaa922c85494958a198c9143418e9f2fe8de15f1513c5e5227408c8c1" + sha256 cellar: :any, ventura: "28659765506db23ae9af44a4cde57a4cc80b2a2e74287e718e4e7550546c6b73" + sha256 cellar: :any_skip_relocation, arm64_linux: "c497462f5aab9c34fa69be465e3a178842091883f6bf36933652d78ff28a7873" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac5988243371ce9002e68ec9132dbe93b54ba905e307b6950a110ae1504fa931" + end + + def install + system "make", "INSTALLPREFIX=#{prefix}", "install" + 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..121251b2fe7c4 --- /dev/null +++ b/Formula/m/minizinc.rb @@ -0,0 +1,49 @@ +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.2.tar.gz" + sha256 "1787b352bfad537246fc7278325b1039723b436293f5b90d9c394b696b67da2b" + license "MPL-2.0" + head "https://github.com/MiniZinc/libminizinc.git", branch: "develop" + + bottle do + sha256 arm64_sonoma: "1dce891dac1d830a87bf2e1cbd5ea0e62ef4f16cdca70371f8c8612528511bea" + sha256 arm64_ventura: "f37150a907dbe696da806cced948c75d50d2650b5edf169cb3906f05fef33f97" + sha256 cellar: :any, sonoma: "76f11ade9a6b4bf1699dc47929b52d907b5c8ceb32431ec7ec265633a53eabfa" + sha256 cellar: :any, ventura: "6485c5a3808c9d82737c8790db4331590eb5145457768be9647147e45dbcf63d" + sha256 x86_64_linux: "19ec06eff879436bc33c5f438a359dafb3949b29c76f7db069760573345fa7db" + 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..bc598bd921111 --- /dev/null +++ b/Formula/m/minizip-ng.rb @@ -0,0 +1,66 @@ +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: "dev" + + bottle do + 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..9e4eae2112acc --- /dev/null +++ b/Formula/m/minizip.rb @@ -0,0 +1,114 @@ +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_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..a099160fa38d5 --- /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.17.5.tar.gz" + sha256 "f55350f7778c4ccd38311ed36f39287ff74bb63eb230f6d448e35e7f934c489c" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3fc482e70ccaeccba4657dd863bb31d30be2875e8352ba4be2b72e8f57f8ff68" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "219b7e7aa07d76183fd4e3512226b64ce5c75fa9ce163cb570bea085c2712b40" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a00bd6097b4202256a07c898fae04dce40aa51b62b173694b62d431073760fb9" + sha256 cellar: :any_skip_relocation, sonoma: "a7052e202732f908080c493de6b0daba9e48ccdd7d19a3846afe951c63009fe0" + sha256 cellar: :any_skip_relocation, ventura: "4bee455c6966630660ac785f84b894b1a036e6abff5e3642ecc2a194662bae62" + sha256 cellar: :any_skip_relocation, arm64_linux: "50239877c00a44b5b9bddf51944fdc4cfec571ea2e41244e519443b2e9138255" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5228b1e9dada4c9b4721064ba858ed361778fa7ff36cb2b682c906737ec31b92" + 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..a672b89e15be9 --- /dev/null +++ b/Formula/m/mintoolkit.rb @@ -0,0 +1,75 @@ +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_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..d94cc25705cf0 --- /dev/null +++ b/Formula/m/minuit2.rb @@ -0,0 +1,45 @@ +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.34.08.source.tar.gz" + sha256 "806045b156de03fe8f5661a670eab877f2e4d2da6c234dc3e31e98e2d7d96fe8" + 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_sequoia: "8c446b5ec05217b864c054b6f8446ab5394438bd51a918a494e2eabed6d4f518" + sha256 cellar: :any, arm64_sonoma: "d28f6057405a99f8370f25bfc008f17d4910cac0ec6a48c6aae8921b85b48406" + sha256 cellar: :any, arm64_ventura: "dc115ea123a1cb40511aa16334a44e6c4a5743e9e23d1b72c87f461da6eedb7b" + sha256 cellar: :any, sonoma: "43083e3f4fd576122bea19ce2570f7d25faac4f04482e840a294e9e3cba023f6" + sha256 cellar: :any, ventura: "bbd8a23a4887b10dcdd40faa3f419577f7f207c0fbeeba2969ee11d3dd199659" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbfd5df62d1e4014353cee97f8cc5facca727428ae89945b1fae938f414fb373" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99d252cae913c1d6b222821d159d9ae69d8b757aa3d960eef5f418f469e88c93" + 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..49b31a0ac3fed --- /dev/null +++ b/Formula/m/miruo.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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, mojave: "a71716a29094f72b62cc6a84284abb509916907c5559b25a2b85196148b86c84" + sha256 cellar: :any_skip_relocation, high_sierra: "36df62e0454d4b7e5743a002a2ff3293e087a9fb607c369f3d23732d87330e4e" + sha256 cellar: :any_skip_relocation, sierra: "dbe92dd3ab515528597eb76aa986f4e9d8dd512504d76ca60b86b5dc5dc70449" + sha256 cellar: :any_skip_relocation, el_capitan: "8a5402f68bcb73e22f13fb0b049caea5d186520e81bf77889c91a558d9988c59" + 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..7eb9b4a5889c5 --- /dev/null +++ b/Formula/m/mise.rb @@ -0,0 +1,65 @@ +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.5.5.tar.gz" + sha256 "6ac35ea90bed5ee28db23a85877839a7043b414ba70a3127df712b1e6e82a5a2" + license "MIT" + head "https://github.com/jdx/mise.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + no_autobump! because: :bumped_by_upstream + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cde523a1d6934b1a43691b78c45f2f17d00e943c27f74010f6768ddc600ce50e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9a769accfb2095e959dbc362ceb127bcdc70757195e5c2f159177db53335229d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6c16671d7c9aeb6718399e0c3581f1c367965097e8a82aa4dc82db357cf6e8b" + sha256 cellar: :any_skip_relocation, sonoma: "de644e4d0960d84a1d9fd930618bcf19cd045a13027cb38464dc81ed63fa2cbe" + sha256 cellar: :any_skip_relocation, ventura: "651c6c68d1f7448844bbd26b597843197e9dfa57b892c41e82544cf0e3e8bbd9" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b5f4dd62ec34e2a59f235dc5dfb950953befa4d00dc25c3520f3cdbfc9f924c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "792372aa18cb323dbaec28a61f64a015d83c2611a30cafa1d49b803acb9d690c" + end + + 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" + generate_completions_from_executable(bin/"mise", "completion") + 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 + 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..af12aace2ad1b --- /dev/null +++ b/Formula/m/mist-cli.rb @@ -0,0 +1,40 @@ +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.1.1.tar.gz" + sha256 "aec30c9ff043e17ce0e6dd563480bd8015910ea1f110d4b767522e41e92bc00e" + license "MIT" + head "https://github.com/ninxsoft/mist-cli.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e3de5cfe1043e9d802d578250bf5ec02386c0e1541c8e6bf8c1f57883bb01155" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d52878ebf4acd1c8e3462bc7dc477df052682bef4bd8f696a9f2fa83188d403e" + sha256 cellar: :any, arm64_ventura: "7e304d64f0ef30b675ca7b6fc8df1c3bea09c5f69eaf5cc5ec547d73b9b8a012" + sha256 cellar: :any_skip_relocation, sonoma: "7515d36129473828d4ea0272a182ffb8824ac3ed7c5ecdce65b6633289cc500d" + sha256 cellar: :any, ventura: "485d54f96a0ecb0c3739b310b459007a270587746b0187a596da10f04fbbf3c4" + 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" + 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..8237e1b4feb89 --- /dev/null +++ b/Formula/m/mit-scheme.rb @@ -0,0 +1,110 @@ +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/12.1/mit-scheme-12.1-svm1-64le.tar.gz" + mirror "https://ftpmirror.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://ftp.gnu.org/gnu/mit-scheme/stable.pkg/?C=M&O=D" + regex(%r{href=.*?v?(\d+(?:\.\d+)+)/?["' >]}i) + strategy :page_match + end + + bottle do + 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..26e184873f0ca --- /dev/null +++ b/Formula/m/mitie.rb @@ -0,0 +1,52 @@ +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" + + bottle do + rebuild 3 + 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/mix-completion.rb b/Formula/m/mix-completion.rb new file mode 100644 index 0000000000000..218addaf052ca --- /dev/null +++ b/Formula/m/mix-completion.rb @@ -0,0 +1,23 @@ +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/refs/tags/0.8.2.tar.gz" + sha256 "0e3e94b199f847926f3668b4cebf1b132e63a44d438425dd5c45ac4a299f28f3" + head "https://github.com/davidhq/mix-power-completion.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c07b1060823fba51931d64cdd01ff90ec6b03ba5f0bd6b41406456e0343e389b" + end + + disable! date: "2024-08-10", because: :no_license + + def install + bash_completion.install "mix" + end + + test do + assert_match "-F _mix", + shell_output("bash -c 'source #{bash_completion}/mix && complete -p mix'") + end +end diff --git a/Formula/m/mjml.rb b/Formula/m/mjml.rb new file mode 100644 index 0000000000000..b69f85d6d6ffa --- /dev/null +++ b/Formula/m/mjml.rb @@ -0,0 +1,50 @@ +class Mjml < Formula + desc "JavaScript framework that makes responsive-email easy" + homepage "https://mjml.io/" + url "https://registry.npmjs.org/mjml/-/mjml-4.15.3.tgz" + sha256 "1918171314f07c1283a84f24bbf6e9cd1325906d48722b26a4b901f0eea00176" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bcde646a47d51238258b06388c69a52115f850eef26ea76c218ad5e7318a2f57" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1a681f3fa1b9bfc3159325c2faa63b1cbe148e94d4cfd1a2b2c94587c30b25de" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1a681f3fa1b9bfc3159325c2faa63b1cbe148e94d4cfd1a2b2c94587c30b25de" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1a681f3fa1b9bfc3159325c2faa63b1cbe148e94d4cfd1a2b2c94587c30b25de" + sha256 cellar: :any_skip_relocation, sonoma: "464b8c2813c2c1a80ac3f4b91fbb5fc3e2a9e189191ee6858c210d0674e00868" + sha256 cellar: :any_skip_relocation, ventura: "464b8c2813c2c1a80ac3f4b91fbb5fc3e2a9e189191ee6858c210d0674e00868" + sha256 cellar: :any_skip_relocation, monterey: "464b8c2813c2c1a80ac3f4b91fbb5fc3e2a9e189191ee6858c210d0674e00868" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc3910a4837159ccb50f1492a97f8333658ed83af7c6d28c44f22eb69ec23222" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b7056b342d8ea37e7da098cc2b2cc3764d3a418e5d36d3d2f07058f634fe12b2" + 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..c1e1976604eba --- /dev/null +++ b/Formula/m/mjpegtools.rb @@ -0,0 +1,37 @@ +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 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + 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..c6f54891f70c4 --- /dev/null +++ b/Formula/m/mk-configure.rb @@ -0,0 +1,38 @@ +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_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/mkcert.rb b/Formula/m/mkcert.rb new file mode 100644 index 0000000000000..01d9292b04e5a --- /dev/null +++ b/Formula/m/mkcert.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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, 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..38ae711dc68b4 --- /dev/null +++ b/Formula/m/mkclean.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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, mojave: "ab570a0a6db26d6dbe08ab347ef3b8f881f77766ce2fbfffdf9a9c3b61a94f46" + sha256 cellar: :any_skip_relocation, arm64_linux: "76406007335cf3bd4fde0daa9516bc34a2ace73fcd132ebdabb43513496b9f35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "784dfd7ae978f145af4b1a57535c915014f82f60f9a1876fd9e5edc69a947066" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *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..b8b5dd7da4da6 --- /dev/null +++ b/Formula/m/mkcue.rb @@ -0,0 +1,51 @@ +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" + + bottle do + rebuild 2 + 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, mojave: "8efe5acfdcd27c465e5b570d4d0a602370912fa83dd6edbe73b26144e420429c" + sha256 cellar: :any_skip_relocation, high_sierra: "284cfe9fe5a81a75f59610d93710627167dbc48c1d72b89311562c87cea8f8ff" + sha256 cellar: :any_skip_relocation, sierra: "b1bec8cabaddb6a78a3c2e0a13f73eb426922b64e6d9ef3c0103e92e203f6af4" + sha256 cellar: :any_skip_relocation, el_capitan: "7677f358f99d733a6f43d02cbf5365f3c59b4f93c6a59ee05bd48045a12cbb52" + 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..54ea79a4a0748 --- /dev/null +++ b/Formula/m/mkdocs-material.rb @@ -0,0 +1,186 @@ +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/b3/fa/0101de32af88f87cf5cc23ad5f2e2030d00995f74e616306513431b8ab4b/mkdocs_material-9.6.14.tar.gz" + sha256 "39d795e90dce6b531387c255bd07e866e027828b7346d3eba5ac3de265053754" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0e91741378cbf7f59a15a2b44c34cde15c7a6a5c55025e432084da8c700fe026" + sha256 cellar: :any, arm64_sonoma: "ccb033943c42c4fb467be5050f46e523b3829aedad110c556a13255416ba415d" + sha256 cellar: :any, arm64_ventura: "5b22330cd379dae30cf252f9e88aee00cd977ea3d7a4e22cc1376bf6ebac016e" + sha256 cellar: :any, sonoma: "0b6ff46b2a1176b34b19260786159e7240ae628ee974446dc15bb39bb566141d" + sha256 cellar: :any, ventura: "e17adccd68c47a24e7e4710c787daed969edd5f117fe2674ce57989d454871ed" + sha256 cellar: :any_skip_relocation, arm64_linux: "ece77c6c4ed36eb494fb265e9f4eb4f560b1a735899fe567bb84b9f7b887797f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95b6e1e5e768ec5bcc6ef9fd193dc80792841435f3d69a798450f54bbc23819d" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/6c/46/caba1eb32fa5784428ab401a5487f73db4104590ecd939ed9daaf18b47e0/backrefs-5.8.tar.gz" + sha256 "2cab642a205ce966af3dd4b38ee36009b31fa9502a35fd61d59ccc116e40a6bd" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/e8/9e/c05b3920a3b7d20d3d3310465f50348e5b3694f4f88c6daf736eef3024c4/certifi-2025.4.26.tar.gz" + sha256 "0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6" + 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/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + 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/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 "markdown" do + url "https://files.pythonhosted.org/packages/2f/15/222b423b0b88689c266d9eac4e61396fe2cc53464459d6a37618ac863b24/markdown-3.8.tar.gz" + sha256 "7df81e63f0df5c4b24b7d156eb81e4690595239b7d70937d0409f1b0de319c6f" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pymdown-extensions" do + url "https://files.pythonhosted.org/packages/08/92/a7296491dbf5585b3a987f3f3fc87af0e632121ff3e490c14b5f2d2b4eb5/pymdown_extensions-10.15.tar.gz" + sha256 "0e5994e32155f4b03504f939e501b981d306daf7ec2aa1cd2eb6bd300784f8f7" + 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 "pyyaml-env-tag" do + url "https://files.pythonhosted.org/packages/c2/95/32c8c79d784552ed687c676924381c0dc88b2a0248b50a32f4b5ac0ba03c/pyyaml_env_tag-1.0.tar.gz" + sha256 "bc952534a872b583f66f916e2dd83e7a7b9087847f4afca6d9c957c48b258ed2" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "watchdog" do + url "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz" + sha256 "9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282" + end + + def install + ENV["PIP_USE_PEP517"] = "1" + 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..f0d75ea0ea6ef --- /dev/null +++ b/Formula/m/mkdocs.rb @@ -0,0 +1,124 @@ +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 + sha256 cellar: :any, arm64_sequoia: "8949d2400c8ac7907722453a9dd3eda5fb2fa59d108780cf39ec08c0e6f85839" + sha256 cellar: :any, arm64_sonoma: "18027883a996c60ba30c512355f1191f6511012d10f923a823054ec84433d676" + sha256 cellar: :any, arm64_ventura: "da17c04e73e0303c652227c3430ff796ad56d4413ecf83dd70d56e726a32c50f" + sha256 cellar: :any, sonoma: "4ea1fe98fa94007b603783f49613bbb2a78f17e1eef3ed25d4ba8bc7df058093" + sha256 cellar: :any, ventura: "a971cd332ce793ad02a26af1c969939159312cae8e8912cade00bd3ed8ff82d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f5431f94afb48e3c3f075f972b4cbb6ce369a92025cc0c68bf8d56006f8f4aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef7464dc0f884425c657bd71d5f29700644c6c5ca4825a8bfdfe5daf5ca74481" + end + + depends_on "libyaml" + depends_on "python@3.13" + + conflicts_with "mkdocs-material", because: "both install `mkdocs` binaries" + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/54/28/3af612670f82f4c056911fbbbb42760255801b3068c48de792d354ff4472/markdown-3.7.tar.gz" + sha256 "2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + 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 "pyyaml-env-tag" do + url "https://files.pythonhosted.org/packages/fb/8e/da1c6c58f751b70f8ceb1eb25bc25d524e8f14fe16edcce3f4e3ba08629c/pyyaml_env_tag-0.1.tar.gz" + sha256 "70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb" + 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 + ENV["PIP_USE_PEP517"] = "1" + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"mkdocs", shells: [:fish, :zsh], 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..1d95e1be96b5b --- /dev/null +++ b/Formula/m/mkfontscale.rb @@ -0,0 +1,43 @@ +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_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..4ac7a5dbd2903 --- /dev/null +++ b/Formula/m/mkhexgrid.rb @@ -0,0 +1,68 @@ +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 + + bottle do + 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, mojave: "dc24513041f3dc8ae8cd27abb07aeb028074a636b3a139dfa6e862eee73237f5" + sha256 cellar: :any, high_sierra: "66011c65d0a32036f58b67ae41ca6a61eb307bc92d958dec026f88e180cab972" + sha256 cellar: :any, sierra: "d2be4b1376fbeb90429433d0cae9b95b8b927701038156a7cb3d73a49620548f" + sha256 cellar: :any, el_capitan: "a87808f88a90308adfb14cf89b3bd89251580301f40ba18d08816de2df0be632" + 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/mkp224o.rb b/Formula/m/mkp224o.rb new file mode 100644 index 0000000000000..b649b4dec435f --- /dev/null +++ b/Formula/m/mkp224o.rb @@ -0,0 +1,32 @@ +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" + + bottle do + 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..84de9a33285a8 --- /dev/null +++ b/Formula/m/mksh.rb @@ -0,0 +1,41 @@ +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 + + bottle do + 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, mojave: "354bd63fa78b08ba32eec9478a1ac6ee48276e529c3d37321808be3c5b3b3050" + sha256 cellar: :any_skip_relocation, high_sierra: "82f9d2a32196df99bc9b2a21e1a062bfc99c263a9a0ee522831d12dce3fd5b5e" + 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..841b6a45cc567 --- /dev/null +++ b/Formula/m/mktorrent.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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..04b35d7cca8e2 --- /dev/null +++ b/Formula/m/mkvalidator.rb @@ -0,0 +1,47 @@ +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 + + bottle do + 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, mojave: "4e2d50be71341f0a47591587ce3cc428da8493af87ea2bcdcca64c86cacd44f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "7460fa4aa8b4de099df311c8058767d8c538e9950045134c3267f6fc47ec3790" + sha256 cellar: :any_skip_relocation, x86_64_linux: "83b78fb761e9d2bccbc88b9893d6760f445eef59c2d122dace22541ef1e04791" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *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..afc251addecaa --- /dev/null +++ b/Formula/m/mkvdts2ac3.rb @@ -0,0 +1,35 @@ +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/formula-patches/85fa66a9/mkvdts2ac3/1.6.0.patch" + sha256 "208393d170387092cb953b6cd32e8c0201ba73560e25ed4930e4e2af6f72e4d9" + end + end + + 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..b41682ed18ab0 --- /dev/null +++ b/Formula/m/mkvtomp4.rb @@ -0,0 +1,34 @@ +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 5 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "19c4993069753ad76887c0d42e472ab10e86c1888747713f0368d31130997a9c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "19c4993069753ad76887c0d42e472ab10e86c1888747713f0368d31130997a9c" + sha256 cellar: :any_skip_relocation, sonoma: "19c4993069753ad76887c0d42e472ab10e86c1888747713f0368d31130997a9c" + sha256 cellar: :any_skip_relocation, ventura: "19c4993069753ad76887c0d42e472ab10e86c1888747713f0368d31130997a9c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "47a445773cf25560a4dc6e1413e3a4180d4358419d05466c03616f91e9dbd443" + end + + depends_on "ffmpeg" + depends_on "gpac" + depends_on "mkvtoolnix" + depends_on "python@3.13" + + 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..57c29c0506d16 --- /dev/null +++ b/Formula/m/mkvtoolnix.rb @@ -0,0 +1,99 @@ +class Mkvtoolnix < Formula + desc "Matroska media files manipulation tools" + homepage "https://mkvtoolnix.download/" + url "https://mkvtoolnix.download/sources/mkvtoolnix-92.0.tar.xz" + mirror "https://fossies.org/linux/misc/mkvtoolnix-92.0.tar.xz" + sha256 "657c1aa1c176510e57de12716492ca9d0b59ba5f17ace2f76ffe77c592c88929" + license "GPL-2.0-or-later" + + livecheck do + url "https://mkvtoolnix.download/sources/" + regex(/href=.*?mkvtoolnix[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "6da6a237a775b44d53c54136f5d03136e1682cb08825f5d8d8fd2b6b6d3b2cd0" + sha256 cellar: :any, arm64_ventura: "2f557d620485177feb5867e66afa83042bb8b3f4855461842c028280581961e8" + sha256 cellar: :any, sonoma: "dced4969048872b19874ba079d279e3e5a564ca8e9c5beaf83aeb2e0f2b6c268" + sha256 cellar: :any, ventura: "dc85bc62549404393e52b1b194a93412802a51791b1f88888046eb7207b5288e" + sha256 x86_64_linux: "15af3b32952d97a42de597cb0e570cea9d13fe16734b14d3fefe3c9a4569339e" + end + + head do + url "https://gitlab.com/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" + # https://mkvtoolnix.download/downloads.html#macosx + depends_on macos: :catalina # C++17 + depends_on "pugixml" + depends_on "qt" + + 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" + + 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/mle.rb b/Formula/m/mle.rb new file mode 100644 index 0000000000000..ba2146e2ada94 --- /dev/null +++ b/Formula/m/mle.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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..6e1ba746f22f8 --- /dev/null +++ b/Formula/m/mlkit.rb @@ -0,0 +1,56 @@ +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" + + 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..d49a3ffbf0a9e --- /dev/null +++ b/Formula/m/mlogger.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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, mojave: "003cc065352384eeb31109f19c9be3223b5e94cbe859dc3c55c9b1f4e3bd0cb3" + sha256 cellar: :any_skip_relocation, high_sierra: "9eec751c684f9043f667bf5e9d793379ca3a9824a05b359ed91af2d7e41d52b7" + sha256 cellar: :any_skip_relocation, sierra: "1f7392a3d16a2bf595487a4b35bf5c866fa00c0967629eef46f07cbf6e696ff4" + sha256 cellar: :any_skip_relocation, el_capitan: "e1f78a9ef569085efcac8c41bd2a70feda85e7fcba5eb7b46a9ee5341cf8cb2d" + 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..412515a313241 --- /dev/null +++ b/Formula/m/mlpack.rb @@ -0,0 +1,87 @@ +class Mlpack < Formula + desc "Scalable C++ machine learning library" + homepage "https://www.mlpack.org/" + url "https://mlpack.org/files/mlpack-4.6.0.tar.gz" + sha256 "8b90c18b25f94319c5969796e63fea96f3f85d9eff41323f12e9964706935632" + license all_of: ["BSD-3-Clause", "MPL-2.0", "BSL-1.0", "MIT"] + head "https://github.com/mlpack/mlpack.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0a848971744841b9c2b69e72f9278ccc3919e0cb1e76c17d5746d6f8995fe632" + sha256 cellar: :any, arm64_sonoma: "4847d0506016e9dc8f02e767b5429c774e0fad94d9dd3b9fc0ed20df0eb09130" + sha256 cellar: :any, arm64_ventura: "ab482efe1cb0d76d14e830324fc86e3fc94a1f73693c0b8f3a5d997c15d1e0b2" + sha256 cellar: :any, sonoma: "bf5ffec4001dc1e4fd99c1725908774c0276b9c2935ab0b6e7d0f05c3fc10c39" + sha256 cellar: :any, ventura: "6713071f58a6590bf0f7c3fde1665bdcbd196d4de767619557b3a59701d38d12" + sha256 cellar: :any_skip_relocation, arm64_linux: "b7bd5686814b5585bbd65a62483dcc657e1d8d5ef89e6fb05c177e17f8ba4633" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea78fedd0a7920c99f65b2f1a9ed618c84b2bb5e844c5a58e82edff18a424432" + 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..3962dc2f22917 --- /dev/null +++ b/Formula/m/mlt.rb @@ -0,0 +1,76 @@ +class Mlt < Formula + desc "Author, manage, and run multitrack audio/video compositions" + homepage "https://www.mltframework.org/" + url "https://github.com/mltframework/mlt/releases/download/v7.32.0/mlt-7.32.0.tar.gz" + sha256 "1ca5aadfe27995c879b9253b3a48d1dcc3b1247ea0b5620b087d58f5521be028" + license "LGPL-2.1-only" + head "https://github.com/mltframework/mlt.git", branch: "master" + + bottle do + sha256 arm64_sonoma: "7af2750dbcf09aca5479d570e56c43a8e180d168a5f7a4603099eac650c3096f" + sha256 arm64_ventura: "6c9fe0de14917afb7d7eb5146e5ad011abe85acb19a4fd416380ad35f3258ac9" + sha256 sonoma: "eab1dff7f3e3e2fbf3616e903ab8c90ad7624d80bd1ebd02ad737671025fa657" + sha256 ventura: "7de16a6e73f1f5bd759430b63ae31dd4ccfe2b944d67df61a0e8ff4177d9bdc6" + sha256 x86_64_linux: "b38d747109cfd0aff7ab1826c1f9a1560ac17454fdb7325dca1989a06e9eb611" + 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 "qt" + 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 diff --git a/Formula/m/mlton.rb b/Formula/m/mlton.rb new file mode 100644 index 0000000000000..87aac3d59c165 --- /dev/null +++ b/Formula/m/mlton.rb @@ -0,0 +1,95 @@ +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_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.rb b/Formula/m/mlx.rb new file mode 100644 index 0000000000000..59516171f66c1 --- /dev/null +++ b/Formula/m/mlx.rb @@ -0,0 +1,121 @@ +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.25.2.tar.gz" + sha256 "de01c18f59c72f8160c3194b822eebe0f0e6ef77207e239a925c72009518089b" + 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_sequoia: "6c44962cad5a0418f7d888b0cc1c32bf5ec820e65f31c53e5aaa9792378dfa73" + sha256 cellar: :any, arm64_sonoma: "564ccfc953e7675deae57f7021319f0a3c5c966ac3bcd54e7b7f521264566a2e" + sha256 cellar: :any, arm64_ventura: "27471e57abdedc23ae260f135facafed41d760ae542807edaaa6a41ba001f10c" + sha256 cellar: :any, sonoma: "2e4480e8eab481305971a3ea5d0adf9805e91715d4ce42bf425fa43cf699cdfd" + sha256 cellar: :any, ventura: "b6c09fa5b59d983579b4f3b713f185e8443368e978187a67d118d7ff18ce0ac5" + 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.13" + + 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#L98 + # 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#L21 + resource "gguflib" do + url "https://github.com/antirez/gguf-tools/archive/af7d88d808a7608a33723fba067036202910acb3.tar.gz" + sha256 "1ee2dde74a3f9506af9ad61d7638a5e87b5e891b5e36a5dd3d5f412a8ce8dd03" + end + + def python3 + "python3.13" + 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..6fb62b39172ef --- /dev/null +++ b/Formula/m/mm-common.rb @@ -0,0 +1,33 @@ +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.6.tar.xz" + sha256 "b55c46037dbcdabc5cee3b389ea11cc3910adb68ebe883e9477847aa660862e7" + license "GPL-2.0-or-later" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "51e28647cb23b6c7259a8487adf36301731684c5d12bdccba36247ef0603312f" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "python@3.13" + + 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..fac40611c2b27 --- /dev/null +++ b/Formula/m/mmark.rb @@ -0,0 +1,36 @@ +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.46.tar.gz" + sha256 "829659158f0dc4f079105b4d35e090045420ec678ee5946a60885c698703255a" + license "BSD-2-Clause" + head "https://github.com/mmarkdown/mmark.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "262640ffecbc9ef0162b833564471b356178a90a941c31f1a22f1843ab9dd4fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "262640ffecbc9ef0162b833564471b356178a90a941c31f1a22f1843ab9dd4fc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "262640ffecbc9ef0162b833564471b356178a90a941c31f1a22f1843ab9dd4fc" + sha256 cellar: :any_skip_relocation, sonoma: "3fea4feca2a305de18c36ecfefd1b8d33b77bbba4ab2f5ea96ca5bf53991a6aa" + sha256 cellar: :any_skip_relocation, ventura: "3fea4feca2a305de18c36ecfefd1b8d33b77bbba4ab2f5ea96ca5bf53991a6aa" + sha256 cellar: :any_skip_relocation, arm64_linux: "194e0b3e6f02124ecde4c25462131623cc3304d211610358501be2c9e868d46f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "310b97f3f8e757e84390f318b426679ab91af7beb1f4444c3b7d27592d32289c" + end + + depends_on "go" => :build + + resource "homebrew-test" do + url "https://raw.githubusercontent.com/mmarkdown/mmark/v2.2.19/rfc/2100.md" + sha256 "0e12576b4506addc5aa9589b459bcc02ed92b936ff58f87129385d661b400c41" + end + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + man1.install "mmark.1" + end + + test do + 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..5442210e1d2be --- /dev/null +++ b/Formula/m/mmctl.rb @@ -0,0 +1,43 @@ +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/v10.7.2.tar.gz" + sha256 "7b570a6ed3c94549d758014ba4ada8a09ddeafacc07d4f89240d2bf8bd385bd2" + 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_sequoia: "6ff49964cc573544dbd806fcd736ffca3dca9b1bac4290afd8c4781b46f06169" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6ff49964cc573544dbd806fcd736ffca3dca9b1bac4290afd8c4781b46f06169" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ff49964cc573544dbd806fcd736ffca3dca9b1bac4290afd8c4781b46f06169" + sha256 cellar: :any_skip_relocation, sonoma: "f19752a71fc5d4743e5bae14653ac5d5203d943fba1bdd3504cf36a66eff777f" + sha256 cellar: :any_skip_relocation, ventura: "f19752a71fc5d4743e5bae14653ac5d5203d943fba1bdd3504cf36a66eff777f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "932146d69f61e08440d70c6f19c4dcdb749fb821a9b7c86a48844687ed5bed16" + end + + depends_on "go" => :build + + def install + # remove non open source files + rm_r("server/enterprise") + + 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..cb69dc885160a --- /dev/null +++ b/Formula/m/mmdbctl.rb @@ -0,0 +1,39 @@ +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.7.tar.gz" + sha256 "b871a2d0ad556868ce9610cf819447fc38566aeace7a66294f00ab5544588a77" + license "Apache-2.0" + head "https://github.com/ipinfo/mmdbctl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "32af5fb6ace4686dc1a624dadabb094be9c280f58fad3b10f892a452eeb415a5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "32af5fb6ace4686dc1a624dadabb094be9c280f58fad3b10f892a452eeb415a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "32af5fb6ace4686dc1a624dadabb094be9c280f58fad3b10f892a452eeb415a5" + sha256 cellar: :any_skip_relocation, sonoma: "8152bb594c50bfea37db1fce61244638710bada48c1cf4e25377018e6b80f9c0" + sha256 cellar: :any_skip_relocation, ventura: "8152bb594c50bfea37db1fce61244638710bada48c1cf4e25377018e6b80f9c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b989aa9b091f0af0fb337c856e4ea5ae1cf1ef09f20977f82b5c529d5bfa25d2" + 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..4ff47baa67062 --- /dev/null +++ b/Formula/m/mmdbinspect.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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, 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..fc8e4ada48058 --- /dev/null +++ b/Formula/m/mmix.rb @@ -0,0 +1,81 @@ +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 + + bottle do + 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, mojave: "8b1cc6672a548ea1c3320ac4889e6b081792c3181fd4ecfc126ebe9c2fb18365" + sha256 cellar: :any_skip_relocation, high_sierra: "7bc054e2d244fe693b4ed5ef47c56e23ac4952b15ddc5de55d19150d4dc2bf30" + sha256 cellar: :any_skip_relocation, sierra: "b694920e61edf2dec094618910be78fcd4fbbcad22d4d37363555aad38ee0af0" + sha256 cellar: :any_skip_relocation, el_capitan: "c1e8e0d2d627b3ab2c2c68a8b358981dab07466c3c70f3a2e4df8557006deb92" + 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..74b2fec5e8d47 --- /dev/null +++ b/Formula/m/mmseqs2.rb @@ -0,0 +1,81 @@ +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/17-b804f.tar.gz" + version "17-b804f" + sha256 "300ebd14bf4e007b339037e5f73d8ff9c4e34f8495204c4a8c59c7672b689db2" + license "MIT" + head "https://github.com/soedinglab/MMseqs2.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "d6e60b4dab916c2783b876db9af4351b6a2a8db35a4bcd566e14ad897b2cdd30" + sha256 cellar: :any, arm64_sonoma: "48f4da646306654a7ba6e6a7a08f8a023a57468544f3e7586f55d1b10379e6bd" + sha256 cellar: :any, arm64_ventura: "5ff54b4b1996f420d1bc76d40ca69748a3e51ffb9da937abaf73488bfe2c13d2" + sha256 cellar: :any, sonoma: "6f417d8a97a1fccbfedef502bbdf2fc35d1c1635f1f0343f85f230e2fac34654" + sha256 cellar: :any, ventura: "411080f71627445783e1333574c5de1cbe9a41b3852fc5eeaa693efb8de1d4e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "d996d17e951ff3ce554fff2f1eaf834220b35ac4991b566ef078ae90bad3b40f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5fc3d695d1c1db71311cf2c0306d7affdc088ff445618970413c896b641a210c" + 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: "b1ccffcaf6be0f857e37670a260311f2416b6794" + end + + def install + args = %W[ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -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 + + def caveats + on_intel do + "MMseqs2 requires at least SSE4.1 CPU instruction support." unless Hardware::CPU.sse4? + end + 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..0a0e399d44706 --- /dev/null +++ b/Formula/m/mmsrip.rb @@ -0,0 +1,45 @@ +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_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, mojave: "1cff3346265ccfa27553e90225de862c7a1ac61ff54c8fdb8fabfc4204d1bad3" + sha256 cellar: :any_skip_relocation, high_sierra: "e7c12a6c8e6ef612d1c789fad3e06c0b21acfe6e4dbac1643ae7797faeafcb35" + sha256 cellar: :any_skip_relocation, sierra: "b4578327661828737b3aa71615806ba6e2781d7c0815a12815023242ac80e598" + sha256 cellar: :any_skip_relocation, el_capitan: "cf0bc6b407f4861b174eddf55ae5da45330d37abc428013ca19f173d36a96d2a" + 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..061924add6890 --- /dev/null +++ b/Formula/m/mmtabbarview.rb @@ -0,0 +1,54 @@ +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" + + bottle do + 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" + sha256 cellar: :any, mojave: "6ce9ac264e1e62f9ee98dd08e6837def238b99c3a5506cc0c470be4c5442ba3e" + 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 MacOS.version >= :sequoia + 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]; + [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..9a024be7ba59f --- /dev/null +++ b/Formula/m/mmv.rb @@ -0,0 +1,45 @@ +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_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/moar.rb b/Formula/m/moar.rb new file mode 100644 index 0000000000000..daf82adfcb7bc --- /dev/null +++ b/Formula/m/moar.rb @@ -0,0 +1,36 @@ +class Moar < Formula + desc "Nice to use pager for humans" + homepage "https://github.com/walles/moar" + url "https://github.com/walles/moar/archive/refs/tags/v1.31.5.tar.gz" + sha256 "2c03100e24f88163d808d52b7a5763c0fe731b29c46fd44a103a089c5429eb72" + license "BSD-2-Clause" + head "https://github.com/walles/moar.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c29b3cddfad460bfcb1f1a4e9d9f8f4bad261fa2ca9dbc414ae8a4e27e264cf5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c29b3cddfad460bfcb1f1a4e9d9f8f4bad261fa2ca9dbc414ae8a4e27e264cf5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c29b3cddfad460bfcb1f1a4e9d9f8f4bad261fa2ca9dbc414ae8a4e27e264cf5" + sha256 cellar: :any_skip_relocation, sonoma: "6990b776f80530fdf07b08e9f36a265c7a82d81554981f00e8b3788a33030fcd" + sha256 cellar: :any_skip_relocation, ventura: "6990b776f80530fdf07b08e9f36a265c7a82d81554981f00e8b3788a33030fcd" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad7dc8145638ec7ce02822b25a5d2fde61ee74d83c7ab36dff4e69d63daf4ec0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d41de53e9734c1228e96ced53910486a262e7f21da55a2cc9de68dfa382f47b2" + 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:) + man1.install "moar.1" + end + + test do + # Test piping text through moar + (testpath/"test.txt").write <<~EOS + tyre kicking + EOS + assert_equal "tyre kicking", shell_output("#{bin}/moar test.txt").strip + end +end diff --git a/Formula/m/moarvm.rb b/Formula/m/moarvm.rb new file mode 100644 index 0000000000000..b07fbf8b352df --- /dev/null +++ b/Formula/m/moarvm.rb @@ -0,0 +1,76 @@ +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.04/MoarVM-2025.04.tar.gz" + sha256 "71c44dce2d3d6630959a3ffd95e5bb456433426635217f1a77efde152c11109c" + license "Artistic-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "528a377c060a38b277a09de993360f48e289713873cc797d21ab3dfc16952202" + sha256 arm64_sonoma: "4ee294808e8515772563e482acb0b7cc26686398720456df7ccdb461e97b4e88" + sha256 arm64_ventura: "b7c902d177369c62a349c827d3aec1d9cf1f63b8175a09868996c9cff55a79aa" + sha256 sonoma: "0466fa55712c186964dccac1f4bc2774b43c2441cbf80ca82c25193348fcfc1b" + sha256 ventura: "2b582555de1d278dd80f4ec926090ad10ff99edabb104267e09080da211ef1b3" + sha256 arm64_linux: "fc077769e4a3675e673067e2fe0da748941e129eea8832a8c9e523fff7f21fa0" + sha256 x86_64_linux: "e1e8c2652328a0116c78a5ee4c6a5104217a8ae0b366ba413b106fcac7b7e5bc" + 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 "moar", 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.04/nqp-2025.04.tar.gz" + sha256 "6468566fd63a75b743979df433beab99690125c4d90972c3b371f6ace82528a0" + 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..7a51804f7a3d9 --- /dev/null +++ b/Formula/m/mob.rb @@ -0,0 +1,28 @@ +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" + + bottle do + 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, 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..f11c594875e25 --- /dev/null +++ b/Formula/m/mobiledevice.rb @@ -0,0 +1,41 @@ +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" + + bottle do + rebuild 2 + 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" + sha256 cellar: :any_skip_relocation, mojave: "1d327ce17e123f4039b9b0e6c351277d8e781a6757dd23060b6b207d791380f8" + sha256 cellar: :any_skip_relocation, high_sierra: "7ac3822649356127001c8b452df55c1435c467938193f223da61bbcdf2a7c11b" + 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..726c683148702 --- /dev/null +++ b/Formula/m/moc.rb @@ -0,0 +1,101 @@ +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/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 + + livecheck do + url "https://moc.daper.net/download" + regex(/href=.*?moc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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 + + # Not needed for > 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..038afdaab3144 --- /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.2.5.tar.gz" + sha256 "e3f21fbe91e662b7375588b2ea08f710afaafa594e9383dbe8879a0787806138" + 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_sequoia: "6c26da80872583720b599e42bd62a7149fd06c72e8818a938205d90beb525144" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6c26da80872583720b599e42bd62a7149fd06c72e8818a938205d90beb525144" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6c26da80872583720b599e42bd62a7149fd06c72e8818a938205d90beb525144" + sha256 cellar: :any_skip_relocation, sonoma: "6686824820921b0a6bb7f6d2544eae85014c1ec1be1c36dcd8aa341a60810095" + sha256 cellar: :any_skip_relocation, ventura: "6686824820921b0a6bb7f6d2544eae85014c1ec1be1c36dcd8aa341a60810095" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a5a4dd38d7a705bdb0a13a881b1591e058ae059d5366f5c93a78eb01b4a1ba8" + 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..959891b3ebb22 --- /dev/null +++ b/Formula/m/mockolo.rb @@ -0,0 +1,66 @@ +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.3.1.tar.gz" + sha256 "b4cf043d0f606b8e7744a5febdcef907c63f38fd35c4b11cb14ce90242eb56e5" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "21db991c7dc13e12fbd75ed7f6692222ed005c211eef03f27a18a23b115cf06f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1b0726cdef7ae2ee5e4248a36dce0c4bdec6a6c8fcb1f9a7cd65f3e206819910" + sha256 cellar: :any_skip_relocation, sonoma: "6e8778005fb76e85b0eba303110ef437760803943622425ba7bf08f261018bda" + sha256 cellar: :any_skip_relocation, arm64_linux: "551717f7aa5740c1dbb9816643acc0ab1634e804199bb247b2e64cc0cc5000a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de62f57ed9cb0ede299a2b323a257edbeca7336c243433f4b9eda7ea48926b24" + 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" + 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/modgit.rb b/Formula/m/modgit.rb new file mode 100644 index 0000000000000..3a910bc6c1063 --- /dev/null +++ b/Formula/m/modgit.rb @@ -0,0 +1,21 @@ +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/refs/tags/v1.1.0.tar.gz" + sha256 "9d279c370eee29f54017ca20cf543efda87534bd6a584e7c0f489bbf931dccb8" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "5d74396c99246d4279d33abfaa9c4ca5671be43bb9f174b487f0d7cff0334f8c" + end + + disable! date: "2024-08-10", because: :no_license + + def install + bin.install "modgit" + end + + test do + system bin/"modgit" + end +end diff --git a/Formula/m/modman.rb b/Formula/m/modman.rb new file mode 100644 index 0000000000000..f3b1d58a3726f --- /dev/null +++ b/Formula/m/modman.rb @@ -0,0 +1,21 @@ +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" + + 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..6d443f0a71da7 --- /dev/null +++ b/Formula/m/mods.rb @@ -0,0 +1,35 @@ +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.7.0.tar.gz" + sha256 "44e15c13d70d74369467df4d18b0a5ad9d977b344e76a39898002a04712271ca" + license "MIT" + head "https://github.com/charmbracelet/mods.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef4507075257b543ce0352b27723e0b70310221b5af17ee5ad2e45e660d39fb8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef4507075257b543ce0352b27723e0b70310221b5af17ee5ad2e45e660d39fb8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef4507075257b543ce0352b27723e0b70310221b5af17ee5ad2e45e660d39fb8" + sha256 cellar: :any_skip_relocation, sonoma: "6f172da97622950b4d688514b07d9bd7711b4e935bb77602bf642f96525ca8db" + sha256 cellar: :any_skip_relocation, ventura: "6f172da97622950b4d688514b07d9bd7711b4e935bb77602bf642f96525ca8db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f7ce569623766cf59c6ab7df40eb76dd857055683aa1ad75dafc7b3482f0a92" + 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") + end + + test do + ENV["OPENAI_API_KEY"] = "faketest" + + output = pipe_output(bin/"mods 2>&1", "Hello, Homebrew!", 1) + assert_match "ERROR Invalid openai API key", output + + assert_match version.to_s, shell_output(bin/"mods --version") + end +end diff --git a/Formula/m/modsecurity.rb b/Formula/m/modsecurity.rb new file mode 100644 index 0000000000000..d68ac91349b5d --- /dev/null +++ b/Formula/m/modsecurity.rb @@ -0,0 +1,63 @@ +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_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..05c4b20fa610c --- /dev/null +++ b/Formula/m/modsurfer.rb @@ -0,0 +1,41 @@ +class Modsurfer < Formula + desc "Validate, audit and investigate WebAssembly binaries" + homepage "https://dev.dylibso.com/docs/modsurfer/" + url "https://github.com/dylibso/modsurfer/archive/refs/tags/v0.0.10.tar.gz" + sha256 "2f5defcfe8668d7323a83dab0b323282e2855a4171c1d0d4eacf5963aa3729b1" + license "Apache-2.0" + + bottle do + 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..08a757f0d31e8 --- /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.5.0/modules-5.5.0.tar.bz2" + sha256 "cb6355b0c81566a4d3ecd06fb4ae6afc9665a087b1e9039c5b5ffbc46fa282e2" + license "GPL-2.0-or-later" + + livecheck do + url :stable + regex(%r{url=.*?/modules[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "5ee8c71190aeced9c34d24f7b6390cfa0bf50b956a5a2290ee551b01c9aa1086" + sha256 cellar: :any, arm64_sonoma: "86119337a0e011b3caf42509870164f5066f0c75089998113da9c0f06125e8c4" + sha256 cellar: :any, arm64_ventura: "9de919dfb835f533aed25bf0c0b0136c910e7d630b932b38254c27570315b578" + sha256 cellar: :any, sonoma: "aebb442a0032596c907ffc37e7a18c277ca3573d1cca286672082fb6854e49f5" + sha256 cellar: :any, ventura: "384d55d505817dec102466f81f646fdb554d9736a0259f806a29743b88f0c332" + sha256 cellar: :any_skip_relocation, arm64_linux: "939d940fd4a1d0ae531dc363ba8f7c08812728ef86248cd1b0b482c9e06a75ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da598032599f2d8333a49d29652dadad9aaa674ea502eeeccfd33bb822414cc8" + 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..ebcc50655b4f7 --- /dev/null +++ b/Formula/m/moe.rb @@ -0,0 +1,29 @@ +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.15.tar.lz" + mirror "https://ftpmirror.gnu.org/moe/moe-1.15.tar.lz" + sha256 "41f8c8b099ce3047945ca4e097a60d9243e9c73fbb268c194a12da8b0d9f0a66" + license "GPL-2.0-or-later" + + bottle do + 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..8a0d10c73467c --- /dev/null +++ b/Formula/m/mogenerator.rb @@ -0,0 +1,46 @@ +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" + + bottle do + rebuild 1 + 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" + sha256 cellar: :any_skip_relocation, mojave: "dcb658659b696e44f13e382f553c92199a7ab0be48ff69f33a35ef98ee8a09ac" + 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..3b52a8b47a41d --- /dev/null +++ b/Formula/m/mold.rb @@ -0,0 +1,128 @@ +class Mold < Formula + desc "Modern Linker" + homepage "https://github.com/rui314/mold" + url "https://github.com/rui314/mold/archive/refs/tags/v2.39.1.tar.gz" + sha256 "231ea3643a14fe5b88478c97b68b31f7c975b57b247a81356ffd889d015b5cc1" + 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_sequoia: "10c8ed21ca271d1ddf4733a41443a86856b3f61778a7cbc182632fdb2e0b05e4" + sha256 cellar: :any, arm64_sonoma: "5b88ab281021a1d4e65bc4e0dffc13f521c26bdd14751e2a0558758da81757ea" + sha256 cellar: :any, arm64_ventura: "2fa9d9fc9d7f72c2836752dae3d206c7e36795ba6bc8ea572ece5a8718132d58" + sha256 cellar: :any, sonoma: "0abea8cf2462b287ee6380d24f26c1656bf7b77c8260cd483b66b21a30c5f0df" + sha256 cellar: :any, ventura: "bb7ddfaaf0813f53304ec0dd9e2048ca336f3811601259c05904223895907896" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe568aa6e726ed08a082f2fc79149d57aa8fcd200287e2cb2fbe83373a19e320" + sha256 cellar: :any_skip_relocation, x86_64_linux: "570db503c502e9da521834d7dfe10eccd97efe7472dfd46f71494b87c1c2dbd2" + 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..50c87104ca44f --- /dev/null +++ b/Formula/m/molecule.rb @@ -0,0 +1,229 @@ +class Molecule < Formula + include Language::Python::Virtualenv + + desc "Automated testing for Ansible roles" + homepage "https://molecule.readthedocs.io/" + url "https://files.pythonhosted.org/packages/13/48/fd6d948ab1ab6aa60ea26fec77366a732a19d7db4bb0efe130b647024ad9/molecule-25.4.0.tar.gz" + sha256 "c531e2a1051f827f3878dcd7d40d6d6868da066d461ef28b5e8fedea5e93f0f9" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ed13a6a442814b0d4250b459845b57000b29530f0029d66acab0e3a21a366daa" + sha256 cellar: :any, arm64_sonoma: "da756af8b3b12b24fccd1ac93bb3ff4177d7bfe95b45d05173f6e67f5ea410cb" + sha256 cellar: :any, arm64_ventura: "93d37c01816fd2faa0fbf752b10f67d77789007964d5ab3cac0920fc9159c185" + sha256 cellar: :any, sonoma: "10193238dbf0163f0166671840e736e5d2bc927c88186f80a640e9b31df8f54b" + sha256 cellar: :any, ventura: "caa149049a7ca2ea664b87a3c1f1d406575d62620c0b5a1efa745e49c17b9344" + sha256 cellar: :any_skip_relocation, arm64_linux: "98066dc81f221d85f25fad10395b0c6bdaac3edb522d421981dbfad33ad1635b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "79f2fd80152a6576cb39f8af85b7f82d07d3e11cdcb7d032eb725c90e9da258a" + end + + depends_on "rust" => :build + depends_on "ansible" + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libffi" + + on_linux do + depends_on "gmp" + end + + resource "ansible-compat" do + url "https://files.pythonhosted.org/packages/b9/51/52af1cd75769bcc9cd54b012210c400eafaa6cd459302517fec08899b3ed/ansible_compat-25.1.4.tar.gz" + sha256 "ebf8620021dd25c2d7c3e8e9382efbe7328db58ea396cbbe688ebef80dc8f8ae" + end + + resource "ansible-core" do + url "https://files.pythonhosted.org/packages/9c/cc/ffab05d33cb327001cd5b48209cbf4312608b09c8604286eab3da1263912/ansible_core-2.18.4.tar.gz" + sha256 "e1f8f5c33546362b0ee933e0969a3ba364b486515a6fa1bc25ebb5d95f8ec5f4" + 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/d6/6c/57418c4404cd22fe6275b8301ca2b46a8cdaa8157938017a9ae0b3edf363/bracex-2.5.post1.tar.gz" + sha256 "12c50952415bfa773d2d9ccb8e79651b8cdb1f31a42f6091b804f6ba2b4a66b6" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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 "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + 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 "enrich" do + url "https://files.pythonhosted.org/packages/bb/77/cb9b3d6f2e2e5f8104e907ea4c4d575267238f52c51cf9f864b865a99710/enrich-1.2.7.tar.gz" + sha256 "0a2ab0d2931dff8947012602d1234d2a3ee002d9a355b5d70be6bf5466008893" + 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 "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/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + 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 "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "molecule-vagrant" do + url "https://files.pythonhosted.org/packages/c9/ad/0ed60a69cd6887622ff03d67beacbc54183f9d6fa45978c37dc35a315b30/molecule-vagrant-2.0.0.tar.gz" + sha256 "bb27f4ec482d0f68231f31136bfba328fc8ef7d81341874284bdd71295e278d5" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "resolvelib" do + url "https://files.pythonhosted.org/packages/ce/10/f699366ce577423cbc3df3280063099054c23df70856465080798c6ebad6/resolvelib-1.0.1.tar.gz" + sha256 "04ce76cbd63fded2078ce224785da6ecd42b9564b1390793f64ddecbe997b309" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + end + + resource "selinux" do + url "https://files.pythonhosted.org/packages/25/07/51acd62e1e15e1172d46f7e32faf138725b147f8c08dbf2d512159d7a310/selinux-0.3.0.tar.gz" + sha256 "2a88b337ac46ad0f06f557b2806c3df62421972f766673dd8bf26732fb75a9ea" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + 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 "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "wcmatch" do + url "https://files.pythonhosted.org/packages/41/ab/b3a52228538ccb983653c446c1656eddf1d5303b9cb8b9aef6a91299f862/wcmatch-10.0.tar.gz" + sha256 "e72f0de09bba6a04e0de70937b0cf06e55f36f37b3deb422dfaf854b867b840a" + 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 python3 + "python3.13" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"molecule", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + ENV["ANSIBLE_REMOTE_TMP"] = testpath/"tmp" + ENV["ANSIBLE_PYTHON_INTERPRETER"] = which(python3) + # Test the Vagrant driver + system bin/"molecule", "init", "scenario", "acme.foo_vagrant", "--driver-name", + "vagrant", "--provisioner-name", "ansible" + 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").chomp + assert_match "Scenario Name: acme.foo_vagrant", output + end +end diff --git a/Formula/m/molten-vk.rb b/Formula/m/molten-vk.rb new file mode 100644 index 0000000000000..16d0385161dac --- /dev/null +++ b/Formula/m/molten-vk.rb @@ -0,0 +1,182 @@ +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.3.0.tar.gz" + sha256 "9476033d49ef02776ebab288fffae3e28fd627a3e29b7ae5975a1e1c785bf912" + + # 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: "7918775748c5e2f5c40d9918ce68825035b5a1e1" + 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: "e2e53a724677f6eba8ff0ce1ccb64ee321785cbd" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "4994cc7e6e7f8af2fb2898fb4d8f806f55ff064d6249beca4ab2f208fd5de319" + sha256 cellar: :any, arm64_sonoma: "c7b7d5d02a925546a6e0cc0c4187fe0b643731abbb32b590a4e60906f688046f" + sha256 cellar: :any, arm64_ventura: "cf825bb401b89d746b3fd1274a839e61e15aa4a8fa0c7f327db2b1d4e14fe334" + sha256 cellar: :any, sonoma: "e208e8fe6f90aecc6a16bb3f883cb56f4da55d1b04daae6794f70ace0d835f57" + sha256 cellar: :any, ventura: "b2e3d1f9dc95f2d45b3f25483bf75bc014950b61a830768615a130111bbaa6f5" + 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] + # Requires IOSurface/IOSurfaceRef.h. + depends_on macos: :sierra + depends_on :macos # Linux does not have a Metal implementation. Not implied by the line above. + + uses_from_macos "python" => :build, since: :catalina + + 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..feb5358c0d3f6 --- /dev/null +++ b/Formula/m/mon.rb @@ -0,0 +1,36 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "ac4640eab6cb255b7cc14f7009b5e8c5a18f9b623559950a1e6d55eb134d483e" + sha256 cellar: :any_skip_relocation, high_sierra: "66fe59cb8307fd1371885fe1739a824d01becb1644a8480f8e27584726494f09" + sha256 cellar: :any_skip_relocation, sierra: "0d22815460538deda7a6a979d0b7dcdf38124ed9473764f6a90d8252cb9bf1aa" + sha256 cellar: :any_skip_relocation, el_capitan: "4f2d05a85fac75167df3a445a0803f7d5eddb2bacf967b10738db5066955024a" + 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..a6c5d475f1f8e --- /dev/null +++ b/Formula/m/monero.rb @@ -0,0 +1,68 @@ +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.0.tar.bz2" + sha256 "fe982ced4603aa7e54989326e3d1830ac1a1387e99722c419e2b103b8e8aa1a0" + license "BSD-3-Clause" + revision 1 + + livecheck do + url "https://downloads.getmonero.org/cli/source" + strategy :header_match + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "4d11233f8d872a584044b48518bec606f618408a085ed695384c7460be8f7d30" + sha256 cellar: :any, arm64_sonoma: "5700c11e92e5385aee771c6c16e91147704cc06cf170fedfad745b8b21327332" + sha256 cellar: :any, arm64_ventura: "22a14172dbc0dace455ea6b87e9827647f7ce2da3ebf878624104709421924cb" + sha256 cellar: :any, sonoma: "2076e2cf86f7c12e81c2630135e68031a411c9fdc324cebf4967d68268e8059d" + sha256 cellar: :any, ventura: "e35fa36f1b4b71f23dde1d057919219cdb956560b953cb2f8bc28c9596e18788" + sha256 cellar: :any_skip_relocation, arm64_linux: "0da015fa3f891e47604cf0d5d43e5a66f9119ffa4d13400aa092da6fb24b8145" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd3e523b3f94f80cce7aaedffeb6ab6a5465fbe6d8d2890bf7f9b1d7fb8abf42" + 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" + + conflicts_with "wownero", because: "both install a wallet2_api.h header" + + def install + # Partial backport for CMake 4 compatibility + # https://github.com/monero-project/monero/commit/eb083ca423c6dc7431d3f1e2992307cfccec4a9f + inreplace "CMakeLists.txt", "cmake_minimum_required(VERSION 3.1)", + "cmake_minimum_required(VERSION 3.5)" + + 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..8204d3919b8a4 --- /dev/null +++ b/Formula/m/monetdb.rb @@ -0,0 +1,75 @@ +class Monetdb < Formula + desc "Column-store database" + homepage "https://www.monetdb.org/" + url "https://www.monetdb.org/downloads/sources/Mar2025/MonetDB-11.53.3.tar.xz" + sha256 "23e1f6a73ac721298f9b611f18930b8ceda34c6f497a4e458034b7131660c070" + license "MPL-2.0" + head "https://dev.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 + + bottle do + sha256 arm64_sequoia: "92579b5419866811ca88e4ee4d03dac2850756ca79de954dea65c9d859f1b8ee" + sha256 arm64_sonoma: "76c21dace99d0c7183e29a23e22347b2bd58d5e0538cab00dd94681ffd68d9c1" + sha256 arm64_ventura: "ddd6364ddb2ee11232a1d4e166b3fa068a02738fc615378ff6e2b5540a6ec887" + sha256 sonoma: "d6066e9bd909f4afa9a98f4230bcdf0c7d62a5aa702d2017877cb4de7fdf986f" + sha256 ventura: "f347fb8324a90053e83520a520fcd91995cc8a426a54485d8a9f5140e642760a" + sha256 arm64_linux: "493a56abb54f14e25905f9d73fa276af7ca8afd9953c5a236ba513b544b3518b" + sha256 x86_64_linux: "9245ff70b7bbfee8da7c1607154aaa930b5d34a4dd89a9216c6f0842b3813d21" + 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..15d652122a933 --- /dev/null +++ b/Formula/m/mongo-c-driver.rb @@ -0,0 +1,54 @@ +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/1.30.2.tar.gz" + sha256 "e3b2d7c18f27b868b99c0ab2e9c811852fa4d86fe2d1d55a53f42d51859dd99d" + 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_sequoia: "27fb9714cd35894ea2ff3ba8a8f15404e7e8891828017af6de24bd42b07e2800" + sha256 cellar: :any, arm64_sonoma: "32e547870031851b3593b3ae1b47448cd0f16716104565ec0a47e61396ef4e39" + sha256 cellar: :any, arm64_ventura: "3e3797c1b3afb92ac3735f24fefd37538bc62e4c2d271582d371203afee4adad" + sha256 cellar: :any, sonoma: "3ffda9abb00eaf6679997f0f3f9a132e94d31ceae9795538ae717ba4cf6572f8" + sha256 cellar: :any, ventura: "48296c8aa08d70a3ea1c68b0696a8ee41d6cf4e6cbe96699a22f2e5860768327" + sha256 cellar: :any_skip_relocation, arm64_linux: "0bc0b2d8fe455186465e54c541572da488e67a4c86715e540fe0443646067e66" + sha256 cellar: :any_skip_relocation, x86_64_linux: "28e1ebf7816f3553b3a0bd82b2a078177f1ddef47020adea67144781a459e0b2" + 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 unless build.head? + 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..a2e71e109b124 --- /dev/null +++ b/Formula/m/mongo-cxx-driver.rb @@ -0,0 +1,58 @@ +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.0.0/mongo-cxx-driver-r4.0.0.tar.gz" + sha256 "d8a254bde203d0fe2df14243ef2c3bab7f12381dc9206d0c1b450f6ae02da7cf" + 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_sequoia: "6c93c0b4cb94f4e319bcaa7d684ef898443a0b0b02512f00d860637f334bf376" + sha256 cellar: :any, arm64_sonoma: "2e091b2c5bfa0ed21a67b8c2fda02864183329b83afced303367cd90e2fc2424" + sha256 cellar: :any, arm64_ventura: "24ff232dff402332fdb24ba5ed406f93422ae56613d89e6e34961e1cc8ce45e8" + sha256 cellar: :any, sonoma: "4786e509bbebf0e1bb24802426d0027463126bfe495958cf0412d70a37aca9b2" + sha256 cellar: :any, ventura: "acd7dfee17966b718af51c503237001f3ffdd8d1965ae18a6e864a1289e8f662" + sha256 cellar: :any_skip_relocation, arm64_linux: "c5ae666c8d2a548c041618ab1ccbaf2192f34b49b04855e6cc1161fd4d36e120" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0a8a48e56b662d49b9ccbb710d7c31ca71860a3a7f716ed8493397e2225d303" + 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..8246631631671 --- /dev/null +++ b/Formula/m/mongo-orchestration.rb @@ -0,0 +1,86 @@ +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/73/8f/f087958ff2ce6b0f06d5be16717e48d2009d598e4ae26270437b473a211a/mongo_orchestration-0.11.0.tar.gz" + sha256 "6f53db5cb6bc1ab4a8f282f2638e1c2d35b7fdcb15f6c8e034acf5d0676e3df5" + license "Apache-2.0" + head "https://github.com/10gen/mongo-orchestration.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8abc7643eb1d0ddbc458fdbb8d806f7af9f84be7d0094729dfeaf28307f113f3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4bccf9535d58505d0aaa6bf9429e76322c059f0b1f75ee7361bae53b6ceb0673" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dbcb57f04d98bb9d462d7047d245752e12c4b9236d1a33bd308e2accbdb5eb10" + sha256 cellar: :any_skip_relocation, sonoma: "5fcd6f986675f1a135eb375da060a46af0303aae7384d51268c77cf0caea230e" + sha256 cellar: :any_skip_relocation, ventura: "4cbaa37de6faf043f5081423868a65f90daef4da3af8871f91a4c1ae93f498ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "2364fb22a2f2d66b15c340ed94a92819f11cd097e32b9b3dcdd9df327813b7e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e04db3d3881b772f140d09a397b6570951fbdca51ad5f51eade6b686ec03577" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "bottle" do + url "https://files.pythonhosted.org/packages/1b/fb/97839b95c2a2ea1ca91877a846988f90f4ca16ee42c0bb79e079171c0c06/bottle-0.13.2.tar.gz" + sha256 "e53803b9d298c7d343d00ba7d27b0059415f04b9f6f40b8d58b5bf914ba9d348" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "cheroot" do + url "https://files.pythonhosted.org/packages/63/e2/f85981a51281bd30525bf664309332faa7c81782bb49e331af603421dbd1/cheroot-10.0.1.tar.gz" + sha256 "e0b82f797658d26b8613ec8eb563c3b08e6bd6a7921e9d5089bd1175ad1b1740" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "jaraco-functools" do + url "https://files.pythonhosted.org/packages/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/51/78/65922308c4248e0eb08ebcbe67c95d48615cc6f27854b6f2e57143e9178f/more-itertools-10.5.0.tar.gz" + sha256 "5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6" + end + + resource "pymongo" do + url "https://files.pythonhosted.org/packages/1a/35/b62a3139f908c68b69aac6a6a3f8cc146869de0a7929b994600e2c587c77/pymongo-4.10.1.tar.gz" + sha256 "a9de02be53b6bb98efe0b9eda84ffa1ec027fcb23a2de62c4f941d9a2f2f3330" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..b5d2a90653e41 --- /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.4.tar.gz" + sha256 "30ffcc61931147c6ace31e87ac487cc2b125a6cb65178e63e8c0f73e6b454cbe" + license "Apache-2.0" + head "https://github.com/mongodb/mongodb-cli.git", branch: "main" + + livecheck do + url :stable + regex(%r{^mongocli/v?(\d+(?:\.\d+)+)$}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d0c52b4c6e706d1389f19727c753ca29ef1a0940b4213dca72482bd231bb5db" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "440b512b69c89ab20fbe28fcfcb998eec7a1aae02f247fd5a0371126ff189ea0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c1b3f86cab303584d947c08fd06bde708c713a3e5274cb4e9f228b9e4902d58d" + sha256 cellar: :any_skip_relocation, sonoma: "047ab97e0d080a6ab9485d44637cdfc5c519e7f1004263c34149ff09b176d24b" + sha256 cellar: :any_skip_relocation, ventura: "32b03be3eab6e447440e4de98a8c80f72cb98823266d8c7d9c9e357879d83529" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5be0afe265ea707d682d30cfce89888c5a20e51068aa0ce44ea0a6b757223f1" + 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..08cd02f87b8d4 --- /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.42.2.tar.gz" + sha256 "8b7565024b6e73ed00c8b451cd76aefa3944951198d676305879e80a223e54d1" + 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_sequoia: "e6f860f3e1e6d90af9d5f35024550ee10fd65844af8b904c4d200f29192b4b2f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "33af21e7bed48ca70be29bb1c7cf4ac9434b5deec8745dc6edc887d51fd4b006" + sha256 cellar: :any_skip_relocation, arm64_ventura: "624a8ffab4868f37250845b90994e2c8a17de2e7de59c75f5b28f6591739f686" + sha256 cellar: :any_skip_relocation, sonoma: "e71eef399664a2501cb57d8b053898df3bedfe8208b081a557746e21f35b7a96" + sha256 cellar: :any_skip_relocation, ventura: "52d0ebdff7f86bf340726edc66dac8f087d52bed119ac3e4386f9bc7ad3a1c8c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "953bd43cedfab77e8ebad820247a7bc59a85faa6328dbbf99fc5a6dff1fb6ec7" + 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: this action requires authentication", 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..8af67d3df5bc5 --- /dev/null +++ b/Formula/m/mongoose.rb @@ -0,0 +1,61 @@ +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.17.tar.gz" + sha256 "b6a6f69912c2cd0c67f85633c6b578d4dcdf385c3628acdcd21de28787c676e5" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f7da67987c2601a85ef6a8fb31d271df8e88582b157371dd26bc4f920d7592bf" + sha256 cellar: :any, arm64_sonoma: "429001b79c2fb2e12ce300294c6ce4ab91c4d185378246ff012c59ef0b7e6434" + sha256 cellar: :any, arm64_ventura: "c46ce284b116d0724884adaeffed83f45977a77ffa0fc95c29b0dedb9af2f69f" + sha256 cellar: :any, sonoma: "f660079a2c16a85cee9f5eae7ba8a471aae39c2d8e06bf12e15e73043f8333b4" + sha256 cellar: :any, ventura: "3cedda3660d3c3402437c936a5786d2d80f3fdcb5ad1654581a47c000e975499" + sha256 cellar: :any_skip_relocation, arm64_linux: "2cecfabb0f8ec0a12573cb00814dc99b83e6f3cbac2c84310fb343cbd3534026" + sha256 cellar: :any_skip_relocation, x86_64_linux: "497858a95dcd1814149278dd48f62d2d9e58a58137562b52a3c29bab1a33b6c2" + 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 "examples" + 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..35d5f44be2606 --- /dev/null +++ b/Formula/m/mongosh.rb @@ -0,0 +1,30 @@ +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.1.tgz" + sha256 "1e351091e1bddae2481ea9139e426e3386e900c2ad8010a9e9840325c2888635" + license "Apache-2.0" + + bottle do + sha256 arm64_sequoia: "ddaadfdddc67ae54f3a2af87b0b213dc2948456ddb6dc450567aa2ffa1bce603" + sha256 arm64_sonoma: "fdb04c1cb5f7f7b00f60d338da7ae61945634256e72deb255add4284c7dccf06" + sha256 arm64_ventura: "47ef66869f1b6ca5fbb218c9b278391dab4d414a0860faa0a952c0390c581a5b" + sha256 sonoma: "d56ca68a87ecd26e55308352958691763d48d8e0c7bd5237995b1b1032202b22" + sha256 ventura: "55689391b9d636b79c83158f63bff0a2cb0e02f41bc5455cfa2d8061e06ee536" + sha256 cellar: :any_skip_relocation, arm64_linux: "3a0dca3cea6b10b9fad3b4211c599dd3f59c42683e5d7396b0a93af2db88029f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2ca00974438664edb23065058e2e89656cf5ab92b9ccb5093f5ef50e68550c81" + 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..adf8bb715b7a0 --- /dev/null +++ b/Formula/m/mongrel2.rb @@ -0,0 +1,60 @@ +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: "develop" + + 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 + + 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/mongroup.rb b/Formula/m/mongroup.rb new file mode 100644 index 0000000000000..6d2b4758e393c --- /dev/null +++ b/Formula/m/mongroup.rb @@ -0,0 +1,37 @@ +class Mongroup < Formula + desc "Monitor a group of processes with mon" + homepage "https://github.com/jgallen23/mongroup" + url "https://github.com/jgallen23/mongroup/archive/refs/tags/0.4.1.tar.gz" + sha256 "50c6fb0eb6880fa837238a2036f9bc77d2f6db8c66b8c9a041479e2771a925ae" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b3bba7e546bcc3272ead45417072af6058106e894824d2a62395b0bcef1ffbf6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "16deb20baa844034c6a1c8bfcb61971a71f576fbebd0dd6170321aeed2866ee7" + sha256 cellar: :any_skip_relocation, arm64_monterey: "16deb20baa844034c6a1c8bfcb61971a71f576fbebd0dd6170321aeed2866ee7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "bc40264f75aafc4f194f10d2b7472e152a4c9f58ec104db6ebeac3dc346c4370" + sha256 cellar: :any_skip_relocation, sonoma: "b3bba7e546bcc3272ead45417072af6058106e894824d2a62395b0bcef1ffbf6" + sha256 cellar: :any_skip_relocation, ventura: "16deb20baa844034c6a1c8bfcb61971a71f576fbebd0dd6170321aeed2866ee7" + sha256 cellar: :any_skip_relocation, monterey: "16deb20baa844034c6a1c8bfcb61971a71f576fbebd0dd6170321aeed2866ee7" + sha256 cellar: :any_skip_relocation, big_sur: "d2112e201508ee22715b2e318b2fd97ae0cf4044e1d74d0893abf12598fb72bc" + sha256 cellar: :any_skip_relocation, catalina: "57c107a2746fae7e9db832f54df3d5170449defc30334094939794288659f026" + sha256 cellar: :any_skip_relocation, mojave: "4c11751013bae001ff2dcf55c3566613e83fe0d9257e0691c9da7b2aec298918" + sha256 cellar: :any_skip_relocation, high_sierra: "230996b629ff1a72b405ba6c7fbb8cdd0fd06292b16bacf124bc2e30c5f9917e" + sha256 cellar: :any_skip_relocation, sierra: "d3065cb969df510f29b742e1d6606151328af2afe3542bb3ff3462e7551ade9b" + sha256 cellar: :any_skip_relocation, el_capitan: "8e801dac08ad7a776d698dc8bfc170f1df2fcb621561b86c789cc0e8098b1b38" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16deb20baa844034c6a1c8bfcb61971a71f576fbebd0dd6170321aeed2866ee7" + end + + disable! date: "2024-08-10", because: :no_license + + 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/m/monika.rb b/Formula/m/monika.rb new file mode 100644 index 0000000000000..8cf6fb2cc3f47 --- /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" + + bottle do + sha256 arm64_sequoia: "b454a3a9c3ab9b5ae518e59e49ffa26ef65cf251158612f1bf035de1d8a94e73" + sha256 arm64_sonoma: "dbb6ee7aad6c0737edfcdb194fb4c198b9314ad759a3c09136cd5a934da61fe4" + sha256 arm64_ventura: "432a1fa231644bc3afab36e6b57c1103a7763bbb4c32e308edb9f83adffa7541" + sha256 sonoma: "6d1e3680020b3fb8fabd44383bd2ef3d802742142781bac50f3602ab527932c7" + sha256 ventura: "36ff8854590a71d7ada5d70fbcbe314c1d8259a830fac7f86a06bff3427798a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "678bacbee424d600e2dfb41f6d45bb8ead8086cebd1fe94ab578614030943f7a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a1daac5d355750602a48ef01fcc34867c21ce4a725659e431f94f277ac818ff" + end + + depends_on "node" + + 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 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/@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..729ff41d82d34 --- /dev/null +++ b/Formula/m/monit.rb @@ -0,0 +1,49 @@ +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_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..9e1806b1cf338 --- /dev/null +++ b/Formula/m/monitoring-plugins.rb @@ -0,0 +1,62 @@ +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_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..3055588528132 --- /dev/null +++ b/Formula/m/monkeysphere.rb @@ -0,0 +1,83 @@ +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 + + bottle do + 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..cdffce7c4fc77 --- /dev/null +++ b/Formula/m/mono-libgdiplus.rb @@ -0,0 +1,63 @@ +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 + + bottle do + 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..7e7a088f855ed --- /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 + sha256 arm64_sequoia: "41128a9161b2880c1ff0da606a970a610255f46426ea970ac505c7f7cc77c817" + sha256 arm64_sonoma: "2207ce97c51add48bdb178771a7e6496da62c099a8a740c976772a4f69ff2cd4" + sha256 arm64_ventura: "a98870bf0b93c31318f1edbf9b441c24ecb805ef32e0c2e92654b457dd27346a" + sha256 sonoma: "3a024c3814922097b3b8b08d9a80b7ce81100e1da46b137857507eb0565bd63e" + sha256 ventura: "90b8a3c1bb6caea2325c4fc796890c8d0256a8ffc9058699fdc6917538f187c3" + sha256 arm64_linux: "acbf40ca28dfb5b841e215db980aea60894545ce8104864b78b3e447467dc70e" + sha256 x86_64_linux: "e444b5cd477167205ef6e5fcb7ecddf09781ea3edc2ce53ea0879511fcc2055b" + 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.13" + + 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: "homebrew/cask-versions/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..c473d5bf1a1d3 --- /dev/null +++ b/Formula/m/monocle.rb @@ -0,0 +1,28 @@ +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.8.0.tar.gz" + sha256 "571f53116c345f1f8279a07e1aaaee3850ceb0fc01ba9c5cef3f393fbefa4a6c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "90179dc8e760a4a85ad5e03a25f8512295fc528a0f2eed38cc756a8c8a6edc61" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "62f25e9b9ac204329a2d3452c1e98de2f64e63f6ae3d40e0d1c896d61c679e1a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3e631476b096bdd088521de3c2ae615874cc20c82a890216a79a82896951e078" + sha256 cellar: :any_skip_relocation, sonoma: "a7d4adb1ef908b164dac34ec908485d2af8c2928eb49b6fede7ccedc1b357471" + sha256 cellar: :any_skip_relocation, ventura: "b3675f8eb3b4217d5289474d6d420d1fd78598a00d339a3813e826d27d416d5a" + sha256 cellar: :any_skip_relocation, arm64_linux: "429f56dfb8e38b70ddeeded089aa85d2b1cde684c350d369493526d672d7305c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75afdf472f8f6e0978c755ee28f683f52f2025645fe14165ca189b43caacd0f5" + 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..488c5a5bbce78 --- /dev/null +++ b/Formula/m/monolith.rb @@ -0,0 +1,32 @@ +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_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..54d0fe001817b --- /dev/null +++ b/Formula/m/montage.rb @@ -0,0 +1,69 @@ +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 + + bottle do + rebuild 1 + 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/moon-buggy.rb b/Formula/m/moon-buggy.rb new file mode 100644 index 0000000000000..8283651a54334 --- /dev/null +++ b/Formula/m/moon-buggy.rb @@ -0,0 +1,57 @@ +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 + + bottle do + 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 mojave: "d7baa37058fd1e08a0a9028a912288bde8c0699b50f7632ce792d19d52c9fa73" + sha256 high_sierra: "54948d0646240382661b765ab2253258946fb10b2974587d719b24a771172d91" + sha256 sierra: "fb2abda84d3e2b20f286caa036fadb9bfd6c4df151352a171385a54ca43acda9" + sha256 el_capitan: "b71bfe4abfb1d2c3d35db544850cb56f1b2ba50df18d27d3fef3ed5845b30e76" + 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..7b7d5fda7dc7b --- /dev/null +++ b/Formula/m/moon.rb @@ -0,0 +1,50 @@ +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.35.7.tar.gz" + sha256 "096ebf70acac0331b4083ba8d9e62388cd1c411936faed45df366e4766180638" + 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_sequoia: "9bb7afacaa8b6d4119c9fbf42a1a68726eef9b7cf2bd6eaaa412404e91cb3dd6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f4fdedf83412ba16edf07c7ddccce2bdd3b50d3565a31ff29451e52431c9f668" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7a4b2f9e28d437c6d1e1cfcd9f44179079a50cb09110263115b9f6bba2fe1c42" + sha256 cellar: :any_skip_relocation, sonoma: "69b49c416be826e34ecb2491a998bd27da23174d40202e297c486aec76186e1d" + sha256 cellar: :any_skip_relocation, ventura: "f9e46fdfd72a2abce480c8148ffb8ebfd8f18a7f1c44645fea5e06e2423da3e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "0767da4db4ab491194384460c021c33481dd2c2edff50b658c56849f22b7b316" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b0069a7844114b970a61b65da4228ae150ff6dd7da2a8da89d68f88c1b978cd" + 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 + system bin/"moon", "init", "--minimal", "--yes" + assert_path_exists testpath/".moon/workspace.yml" + end +end diff --git a/Formula/m/moreutils.rb b/Formula/m/moreutils.rb new file mode 100644 index 0000000000000..a6da1f8e45d00 --- /dev/null +++ b/Formula/m/moreutils.rb @@ -0,0 +1,75 @@ +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 + + bottle do + 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 + 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/morpheus.rb b/Formula/m/morpheus.rb new file mode 100644 index 0000000000000..c9b49fcb20df9 --- /dev/null +++ b/Formula/m/morpheus.rb @@ -0,0 +1,98 @@ +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 + sha256 arm64_sequoia: "11e3811c5e5932f71678bea042c542a8a9ca5e0e24be85d4ce37f04b2096af1f" + sha256 arm64_sonoma: "5875ccd833c4e41e3c0d6a92a6e345bebf5b79cb6fddde17e25383dc20a7330c" + sha256 arm64_ventura: "e7e28d8b1bd4020ca3e99ddcceeb9c3af6abc63bb4bdc60bfd6302f04f50d849" + sha256 cellar: :any, sonoma: "31b3c036148a0c2ffbd42abc324e85fd5709323ef52977340b128ff92cac7c86" + sha256 cellar: :any, ventura: "29d8f5b2730cbda1d887ea580c643d26f80bcd224de09f27245595361f820862" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac0786ead33d0beb6c8fd5ba6554e2de1df213ba821576fa849a1a8dff1fb4a0" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "ninja" => :build + 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 + + def install + # 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..f8360b4b989f3 --- /dev/null +++ b/Formula/m/morse.rb @@ -0,0 +1,67 @@ +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_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" + # Mosh provides remote shell access, so let's run the tests to avoid shipping an insecure build. + system "make", "check" if OS.mac? # Fails on Linux. + 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..66a5a7f6c9b2a --- /dev/null +++ b/Formula/m/mosml.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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 mojave: "f1a7484f284f194ece9c3bc25a99b8f38312ff504b207a57337b7de7f4e46755" + sha256 high_sierra: "7a888abd233069f837cf9aba4021baa71387a4b720bc53323d40a963433b566a" + sha256 sierra: "297c05c55f2784f3b934a2fdb3ec2f91d8b11a06453c8649c1f6562cefdc089e" + sha256 el_capitan: "5dae62ca2034ba70844d684111cec58561895eac39db3177d439747512206002" + 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..c7befd4b2fecc --- /dev/null +++ b/Formula/m/mosquitto.rb @@ -0,0 +1,74 @@ +class Mosquitto < Formula + desc "Message broker implementing the MQTT protocol" + homepage "https://mosquitto.org/" + url "https://mosquitto.org/files/source/mosquitto-2.0.21.tar.gz" + sha256 "7ad5e84caeb8d2bb6ed0c04614b2a7042def961af82d87f688ba33db857b899d" + # # 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"] + + livecheck do + url "https://mosquitto.org/download/" + regex(/href=.*?mosquitto[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2f7f1f3f4762d867f5becdfc8c4a9b3a937794cbc9ea617b62304db97990b034" + sha256 cellar: :any, arm64_sonoma: "d86b058b1dc26c63f613552aa05a509708ac71296e98df8cb9a56884712685e4" + sha256 cellar: :any, arm64_ventura: "8454c87786ea6c22427a93837a9245f5e11e361e9cf0bbf0dc65b4e606c9df92" + sha256 cellar: :any, sonoma: "6f3c1be1652b15e940304f6354f8d9dfaee1df2d773d58e6cc9dfb8246d4574d" + sha256 cellar: :any, ventura: "b48c0a1ca034fc2c958686125ac443db99b66149b0bf50b1fc0ce56d2577661a" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c3ed1d516bd691d832028634921690f4b1a64c7ec9a15ab00ccb771d6845a75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b8eccb6a949e8194b38e90d7d35c94a7df188058ab656bc9e0d961c5e119978" + 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", 3) + 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..22078d94872c5 --- /dev/null +++ b/Formula/m/most.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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..e9aa399e8f129 --- /dev/null +++ b/Formula/m/moto.rb @@ -0,0 +1,342 @@ +class Moto < Formula + include Language::Python::Virtualenv + + desc "Mock AWS services" + homepage "http://getmoto.org/" + url "https://files.pythonhosted.org/packages/4e/17/059cd6fa5962fa75575f74bb8d31d0e9cb3e656414cb79b4b3736b2b40eb/moto-5.1.4.tar.gz" + sha256 "b339c3514f2986ebefa465671b688bdbf51796705702214b1bad46490b68507a" + license "Apache-2.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "61e14f944899faa22581ea50cd4ade6fce949c38a0a69ea226c5783f5388eabc" + sha256 cellar: :any, arm64_sonoma: "07fdc39c87e3472369ec414a116cea8b5d4307cef5cbf941dbaa8f81cb56a8ee" + sha256 cellar: :any, arm64_ventura: "c87385415784559c44e6e64ef6fea9c12f330806f5f13b104f37e383ac7f7ab1" + sha256 cellar: :any, sonoma: "9d91642e9b566834d4d351326d2472625be45bd1ebcf5ce1c729f2155e5748ac" + sha256 cellar: :any, ventura: "d83cbb2588aaf428b1e31a13fa3c59f63cf087834f374e552f439c0d404126ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "9ae106539c0c62dbbc1ad584a94ca8068f74ea348a29b182737a203e3b3d487b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "52c7b092542ca6041c7b3d9c09e1351333be916e9379fb33d5ca0bf3e149fa83" + end + + depends_on "rust" => :build # for pydantic_core + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "aws-sam-translator" do + url "https://files.pythonhosted.org/packages/13/01/3a9a3fea6ed942239f22c4fa9b3cd9d8b69545607f257fbb47d28d115dde/aws_sam_translator-1.97.0.tar.gz" + sha256 "6f7ec94de0a9b220dd1f1a0bf7e2df95dd44a85592301ee830744da2f209b7e6" + end + + resource "aws-xray-sdk" do + url "https://files.pythonhosted.org/packages/e0/6c/8e7fb2a45f20afc5c19d52807b560793fb48b0feca1de7de116b62a7893e/aws_xray_sdk-2.14.0.tar.gz" + sha256 "aab843c331af9ab9ba5cefb3a303832a19db186140894a523edafc024cc0493c" + 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/e2/b5/f2cdcc4f909bd4a3b545571da9e7faa69a7ecc54bc5cc103f39dac53d115/boto3-1.38.15.tar.gz" + sha256 "dca60f7a3ead91c05cf471f7750e54d63b92bfc0e61fa122e2e3f5140e020a8d" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/00/35/0591b8cda1af4f308a0c073b838b02618547ae306504dc5a165a0ee88fd8/botocore-1.38.15.tar.gz" + sha256 "6adb3b1b0739153d5dc9758e5e06f7596290999c07ed8f9167ca62a1f97c6592" + end + + resource "cfn-lint" do + url "https://files.pythonhosted.org/packages/e5/11/d52bf891ec937b75a640996d84ba34abf55a59c80857968ccc5b51491957/cfn_lint-1.35.1.tar.gz" + sha256 "0a564819088c95ba88c5dca23ba1fb3c6cdb86b2f6a40219f1abf2134c5b47d7" + 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/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + 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/c0/de/e47735752347f4128bcf354e0da07ef311a78244eba9e3dc1d4a5ab21a98/flask-3.1.1.tar.gz" + sha256 "284c7b8f2f58cb737f0cf1c30fd7eaf0ccfcde196099d24ecede3fc2005aa59e" + end + + resource "flask-cors" do + url "https://files.pythonhosted.org/packages/32/d8/667bd90d1ee41c96e938bafe81052494e70b7abd9498c4a0215c103b9667/flask_cors-5.0.1.tar.gz" + sha256 "6ccb38d16d6b72bbc156c1c3f192bc435bfcc3c2bc864b2df1eb9b2d97b2403c" + end + + resource "graphql-core" do + url "https://files.pythonhosted.org/packages/c4/16/7574029da84834349b60ed71614d66ca3afe46e9bf9c7b9562102acb7d4f/graphql_core-3.2.6.tar.gz" + sha256 "c08eec22f9e40f0bd61d805907e3b3b1b9a320bc606e23dc145eebca07c8fbab" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/6a/e4/4c649e364bafa7cd2dd44ab5c301a721d3ff4942c43feb562deded60b414/joserfc-1.0.4.tar.gz" + sha256 "dc3fc216cfcfc952d4c0d4b06c759a04711af0b667e5973adc47dbb1ba784127" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + 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/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" + sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" + end + + resource "lazy-object-proxy" do + url "https://files.pythonhosted.org/packages/57/f9/1f56571ed82fb324f293661690635cf42c41deb8a70a6c9e6edc3e9bb3c8/lazy_object_proxy-1.11.0.tar.gz" + sha256 "18874411864c9fbbbaa47f9fc1dd7aea754c86cfde21278ef427639d1dd78e9c" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/df/91/6c93b6a95e6a99ef929a99d019fbf5b5f7fd3368389a0b1ec7ce0a23565b/multipart-1.2.1.tar.gz" + sha256 "829b909b67bc1ad1c6d4488fcdc6391c2847842b08323addf5200db88dbe9480" + end + + resource "networkx" do + url "https://files.pythonhosted.org/packages/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz" + sha256 "307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1" + 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/67/fe/21954ff978239dc29ebb313f5c87eeb4ec929b694b9667323086730998e2/openapi_spec_validator-0.7.1.tar.gz" + sha256 "8577b85a8268685da6f8aa30990b83b7960d4d1117e901d451b5d572605e5ec7" + 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/58/a1/0a2867e48b232b4f82c4929ef7135f2a5d72c3886b957dccf63c70aa2fcb/py_partiql_parser-0.6.1.tar.gz" + sha256 "8583ff2a0e15560ef3bc3df109a7714d17f87d81d33e8c38b7fed4e58a63215d" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "pyparsing" do + url "https://files.pythonhosted.org/packages/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + 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 "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/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "responses" do + url "https://files.pythonhosted.org/packages/81/7e/2345ac3299bd62bd7163216702bbc88976c099cfceba5b889f2a457727a1/responses-0.25.7.tar.gz" + sha256 "8ebae11405d7a5df79ab6fd54277f6f2bc29b2d002d0dd2d5c632594d1ddcedb" + 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 "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/fc/9e/73b14aed38ee1f62cd30ab93cd0072dec7fb01f3033d116875ae3e7b8b44/s3transfer-0.12.0.tar.gz" + sha256 "8ac58bc1989a3fdb7c7f3ee0918a66b160d038a147c7b5db1500930a607e9a1c" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/95/32/0cc40fe41fd2adb80a2f388987f4f8db3c866c69e33e0b4c8b093fdf700e/setuptools-80.4.0.tar.gz" + sha256 "5a78f61820bc088c8e4add52932ae6b8cf423da2aff268c23f813cfbb13b4006" + 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-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/50/05/51dcca9a9bf5e1bce52582683ce50980bcadbc4fa5143b9f2b19ab99958f/xmltodict-0.14.2.tar.gz" + sha256 "201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553" + end + + def python3 + which("python3.13") + 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 = fork do + exec bin/"moto_server", "--port=#{port}" + end + + 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..9240494863bc0 --- /dev/null +++ b/Formula/m/movgrab.rb @@ -0,0 +1,74 @@ +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 9 + + bottle do + sha256 cellar: :any, arm64_sequoia: "eebe35ad85f24d6670b44de90e944d2ec6e7d8b3d678581d765b47a37b5921de" + sha256 cellar: :any, arm64_sonoma: "8258f2373e9954cec98e1794809aceb67cb86a67b700534ca8e897399a462c1d" + sha256 cellar: :any, arm64_ventura: "be7032419023759e5106d77fe86d01c97967ae01cc30947fd6e35df5d6f9b0e5" + sha256 cellar: :any, sonoma: "612d50cc540559cd4350504e7e31caa719e5f9bf1b68f6d0930328f4e56c0c17" + sha256 cellar: :any, ventura: "44d0c548daababf4c81fd834331066cbfc94ff74b50df78d8689d21d4ab0f5a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad5d58b74de4a42085e384ad4e090bd6f43c063119ee56dbba896653d20c1f60" + sha256 cellar: :any_skip_relocation, x86_64_linux: "471324368d1763fdfac90349087bad2257726ba13eb462803435ed8c37a09131" + 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://github.com/Homebrew/formula-patches/raw/936597e74d22ab8cf421bcc9c3a936cdae0f0d96/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/formula-patches/6e5fdfd05ce62383c7f3ac4b23ba31f5ffbac5b2/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/formula-patches/ba252015727b6f0fb362fec3edfb7c53a3f888c2/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..6275965768400 --- /dev/null +++ b/Formula/m/mox.rb @@ -0,0 +1,46 @@ +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_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, 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..e8bf824e932b0 --- /dev/null +++ b/Formula/m/moz-git-tools.rb @@ -0,0 +1,44 @@ +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 + + 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..7b35fcb3026e9 --- /dev/null +++ b/Formula/m/mozjpeg.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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 "mozjpeg is not linked to prevent 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] + 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..1a85d52764784 --- /dev/null +++ b/Formula/m/mp3blaster.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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" + + 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/m/mp3cat.rb b/Formula/m/mp3cat.rb new file mode 100644 index 0000000000000..17887989b760a --- /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" + + bottle do + 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, mojave: "e075f29990e6b5222d3e82ed27de698bed42257097e9bd59f0d60f64ea7ae46b" + sha256 cellar: :any_skip_relocation, high_sierra: "91152cced755097c42117c72e71f3db9023716e2e9befd1e8a6630fd225e3cea" + sha256 cellar: :any_skip_relocation, sierra: "3954ad75806e1948a4e69efb74fb2e86a4920c7e6b61537ca48f696289ca998a" + 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..9b13d6b26a2d1 --- /dev/null +++ b/Formula/m/mp3check.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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, mojave: "e19a17b2360f7a7974fe798cc68a12735155b14c68bb8c0d7a13439dd3fa5a29" + sha256 cellar: :any_skip_relocation, high_sierra: "99c5e5b8458a0cda5f50d92d858ccbd968f059a3b639130a3378c499331e427e" + sha256 cellar: :any_skip_relocation, sierra: "2846b7bd6201b58c40ce9b6193a929c5404fcbe77e97854876e53bba5c9d0d82" + sha256 cellar: :any_skip_relocation, el_capitan: "d63ba27cfd87cf1f8b1871fe8b0531882c037f116933cbc59caf429dfeaab735" + 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 GCC + patch do + on_linux do + url "https://salsa.debian.org/reichel/mp3check/-/raw/2154e6fcb25189ab45c3ae6f787adc8526ad1377/debian/patches/fix_ftbfs_with_gcc_9" + sha256 "00c90ab89e181cbbfe8ac54280acd17cfe6a1d3f4844685aca0426b9291f932f" + end + 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..d481718cd55e4 --- /dev/null +++ b/Formula/m/mp3fs.rb @@ -0,0 +1,30 @@ +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 + + 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..d04b756979810 --- /dev/null +++ b/Formula/m/mp3gain.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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, mojave: "6db408b86b074e8713476fa60ea252ad3f4213dbf63cdca3342ffe989bd372d5" + sha256 cellar: :any, high_sierra: "5aa37ac4ab2013f5365da14969494111500337cae3c6d7614b72dfb9e94352f2" + sha256 cellar: :any, sierra: "66684a469ee1de432a00f1264c89b3921d3558854fa736b24a3942e351617c47" + sha256 cellar: :any, el_capitan: "4c97894216600ba8ac03094a45fe68a7d107f69adbcd638d40c967ad10e95480" + 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..ae92776ffa938 --- /dev/null +++ b/Formula/m/mp3info.rb @@ -0,0 +1,49 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "74e04cc5b66e44632a9f3187f2360eba1f1f13ea153f7c6e4e0b4e466f58f084" + sha256 cellar: :any_skip_relocation, high_sierra: "9b966553a2ed76afb888577cad6ae8f359cde30e445bb0742a87ff2c5d5dfa85" + sha256 cellar: :any_skip_relocation, sierra: "dd9e2ab142307a9587ca28f8ca574cf3115f380f2692f1eb1e38e24d4e5a1008" + sha256 cellar: :any_skip_relocation, el_capitan: "30c85d8b2afd6e6ad03e473de3bd83ef9c6c607b979570798cfc778ad887b902" + 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/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/m/mp3splt.rb b/Formula/m/mp3splt.rb new file mode 100644 index 0000000000000..5585112d6cee4 --- /dev/null +++ b/Formula/m/mp3splt.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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..b4ad2e13d1e4d --- /dev/null +++ b/Formula/m/mp3unicode.rb @@ -0,0 +1,55 @@ +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 + + bottle do + rebuild 2 + 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..82003c883af0e --- /dev/null +++ b/Formula/m/mp3val.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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, mojave: "4ca5fe184a5427aea0df6910d654955c162268f803c1c372d11dd2305ad67513" + sha256 cellar: :any_skip_relocation, high_sierra: "f17a5c03d59e7665d2b85db559561a3375ff03a6e02911514a0adde35e188a06" + sha256 cellar: :any_skip_relocation, sierra: "649cf78ba7bc387f346a6685b8c83bec495a5e75ea0fa6d93135cc36ec898f5f" + sha256 cellar: :any_skip_relocation, el_capitan: "d13a9b31c885d1704a0cc5e1ff6b995acd616248abcf5276fc068b78f7be785f" + 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..c153d2f781c06 --- /dev/null +++ b/Formula/m/mp3wrap.rb @@ -0,0 +1,46 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "ef3c37644b60e3644b2763a999ab189ceffe59d0506617db2d23cb3f3b430056" + sha256 cellar: :any_skip_relocation, high_sierra: "3c85e837e2dbcfcbbccb0b074ebfa9283c13d2453b206c246bc4d77600328dfb" + sha256 cellar: :any_skip_relocation, sierra: "0471701ab4f6b59423503b7c250376ba597a9f28d9962f6f9b35a107d58411ab" + sha256 cellar: :any_skip_relocation, el_capitan: "c65886799c1397eec33f48ef73774ad6a509fec44a18dec4a50c8755736f040a" + 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..503b04779324c --- /dev/null +++ b/Formula/m/mp4v2.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..07837d84acfb4 --- /dev/null +++ b/Formula/m/mpack.rb @@ -0,0 +1,46 @@ +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 + + # 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 + + # Fix build failure because of missing include statements on Linux. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/6e7bc4dd7b971cabc3cc794236e62e732981102f/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..f45f5f36c3b5f --- /dev/null +++ b/Formula/m/mpage.rb @@ -0,0 +1,40 @@ +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 + + bottle do + 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..76b486e2783b5 --- /dev/null +++ b/Formula/m/mpc.rb @@ -0,0 +1,43 @@ +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_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..fa537fed7a716 --- /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 + + bottle do + 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, mojave: "e819ac8ce7eab3b4f83bcdf83cfbb129a9e3cebb36e314dabca646f808ed6257" + sha256 cellar: :any_skip_relocation, high_sierra: "3ecd47f83f5645cfaf2bfef23b5b9a1b14bb36f2ec146409ca44d9d5f25c3401" + sha256 cellar: :any_skip_relocation, sierra: "cd283270b83cf83c3e3a3c393404c1eca16e1620ced195821b97fe5ad6b39236" + 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..dfb18a907cebf --- /dev/null +++ b/Formula/m/mpd.rb @@ -0,0 +1,161 @@ +class Mpd < Formula + desc "Music Player Daemon" + homepage "https://www.musicpd.org/" + url "https://github.com/MusicPlayerDaemon/MPD/archive/refs/tags/v0.24.3.tar.gz" + sha256 "80bb03c32cc2c85cb2e91711f96c6e25cba5546908b003d0254946397f42acf7" + license "GPL-2.0-or-later" + head "https://github.com/MusicPlayerDaemon/MPD.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a7d9949ec3f0f88c797180ee7019a1c44df2681978547e0bde2dcf8e68036201" + sha256 cellar: :any, arm64_sonoma: "734d5549a13cc23d026f5e5d753a6620ab08e0d6096c8fc948d8ded1d3b455cd" + sha256 cellar: :any, arm64_ventura: "4438d702c743f05bba8be6e061defc3256b7c3fbbfa69c2f844c0c6cdc21d244" + sha256 cellar: :any, sonoma: "94293b58505c532dd6e622125de61c0b64b591b7ce8acabf1ffb3647a1315652" + sha256 cellar: :any, ventura: "bc99d04f570580fb5f47036deff8c7bbdd4fcebb86fa3b5d9e41d5713b95be70" + sha256 arm64_linux: "2230b7523e4621a0e521c7c601dac2aa4d5a339471481b18a9a6ce450a847d66" + sha256 x86_64_linux: "8606c8825eabbc1ff262131f95d715c87608f10d8eddcc3486512203db62230e" + end + + depends_on "boost" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + + depends_on "chromaprint" + depends_on "expat" + depends_on "faad2" + depends_on "ffmpeg" + depends_on "flac" + depends_on "fluid-synth" + depends_on "fmt" + depends_on "game-music-emu" + depends_on "glib" + depends_on "icu4c@77" + depends_on "lame" + depends_on "libao" + depends_on "libgcrypt" + 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 macos: :mojave # requires C++17 features unavailable in High Sierra + depends_on "mpg123" + depends_on "nlohmann-json" + depends_on "opus" + depends_on "pcre2" + depends_on "sqlite" + depends_on "wavpack" + + uses_from_macos "bzip2" + uses_from_macos "curl" + 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 + + def install + if OS.mac? && 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 + + 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..cb83151de161c --- /dev/null +++ b/Formula/m/mpdas.rb @@ -0,0 +1,50 @@ +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 + + bottle do + rebuild 1 + 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 mojave: "4b6a70ab4c6599598c88dc0da91b3646a5d36bc7db9c174ed1cad387861f4370" + 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..88b8fa5f67c0f --- /dev/null +++ b/Formula/m/mpdecimal.rb @@ -0,0 +1,67 @@ +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_sequoia: "e21da583e42e86d5a2f0aedfaf7820e51b8af3065da599cff179d1a39903f3ab" + sha256 cellar: :any, arm64_sonoma: "51a9fd907163c4f99be93607db99668cbb3e115ff577f9413e5dd6e5d4070e2c" + sha256 cellar: :any, arm64_ventura: "e764118699fff81e4861a081d5e50546be2631a2fa2f58f4681dee6727648a87" + 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..ddfb665997033 --- /dev/null +++ b/Formula/m/mpdscribble.rb @@ -0,0 +1,57 @@ +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 + + bottle do + 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 "boost" => :build + 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..0ba807df65a2a --- /dev/null +++ b/Formula/m/mpegdemux.rb @@ -0,0 +1,36 @@ +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 + + bottle do + 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..df2d3f9e29190 --- /dev/null +++ b/Formula/m/mpfi.rb @@ -0,0 +1,56 @@ +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 + + bottle do + 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..dc222cf46afcb --- /dev/null +++ b/Formula/m/mpfr.rb @@ -0,0 +1,80 @@ +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.2.2.tar.xz" + mirror "https://ftpmirror.gnu.org/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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "ed822b7e77645d7c17abb3ee9cc2b2a82a4d0f003acc7615b5df6226031479b2" + sha256 cellar: :any, arm64_sonoma: "15168719e4dbbc4f497e6f7ec91dfec55659113020e2af705a704af566dbe888" + sha256 cellar: :any, arm64_ventura: "12528a52c96fb1318bf07778ee236d69f4f1c67e616f0c97375431056c27e34e" + 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..7bdec1a7e51d4 --- /dev/null +++ b/Formula/m/mpfrcx.rb @@ -0,0 +1,50 @@ +class Mpfrcx < Formula + desc "Arbitrary precision library for arithmetic of univariate polynomials" + homepage "https://www.multiprecision.org/mpfrcx/home.html" + 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" + + bottle do + 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..4db0bb52624a0 --- /dev/null +++ b/Formula/m/mpg123.rb @@ -0,0 +1,45 @@ +class Mpg123 < Formula + desc "MP3 player for Linux and UNIX" + homepage "https://www.mpg123.de/" + url "https://www.mpg123.de/download/mpg123-1.32.10.tar.bz2" + mirror "https://downloads.sourceforge.net/project/mpg123/mpg123/1.32.10/mpg123-1.32.10.tar.bz2" + sha256 "87b2c17fe0c979d3ef38eeceff6362b35b28ac8589fbf1854b5be75c9ab6557c" + 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_sequoia: "a7e88250498abc0521be5e43103aa1d411f33ccc08d55bbb37fd34b42015e38e" + sha256 arm64_sonoma: "af9d70581ff2cb103d8d4ef92b63ed8e3568687b5a505a145653a50b9277b78f" + sha256 arm64_ventura: "bc9e0b6ff94df269e8741e8f1ba0234adec63445498f008c93eca30860373188" + sha256 sonoma: "8368344c162b5b09a4e270c7bec9bc3356744c32d4375fac5fde9ec09ac366bb" + sha256 ventura: "870777a32e3bcdca0eaffde89a3d968b21aba3bae9047c7e36b76ca23a5b7721" + sha256 arm64_linux: "7e4c8351af4cc50acf7dc1463483b33e2a3adc8f73a4c51d336137926f07d003" + sha256 x86_64_linux: "ceea33a9d7ec86a51a6c26936b253ce738915e344d0e577b628d70065829596a" + 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..708f4dc90c092 --- /dev/null +++ b/Formula/m/mpg321.rb @@ -0,0 +1,60 @@ +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 + + bottle do + 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/formula-patches/85fa66a9/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..c282be294d083 --- /dev/null +++ b/Formula/m/mpgtx.rb @@ -0,0 +1,45 @@ +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 + + bottle do + 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, mojave: "40240b442f8d3c41f89a38da8055cbf30fc10a4ea8b4dd469903d19c424851ce" + sha256 cellar: :any_skip_relocation, high_sierra: "6a003e12c03f1cc24bd520e1cf153da02729b4d30e7bdffcba5cecf832c19238" + sha256 cellar: :any_skip_relocation, sierra: "70e1dfed0338fb8b8cda36ca05e05b8cd3fd456782db58408b18bbf2361f09aa" + sha256 cellar: :any_skip_relocation, el_capitan: "566ce06d938b4e3b7886a729d456bd3034325985acbdb5e21355b076d7acccf5" + 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..42dda9b806aca --- /dev/null +++ b/Formula/m/mpi4py.rb @@ -0,0 +1,39 @@ +class Mpi4py < Formula + desc "Python bindings for MPI" + homepage "https://mpi4py.github.io/" + url "https://github.com/mpi4py/mpi4py/releases/download/4.0.3/mpi4py-4.0.3.tar.gz" + sha256 "de2710d73e25e115865a3ab63d34a54b2d8608b724f761c567b6ad58dd475609" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0501e4b0090b389f28bf811e030cce459046822bb64e071f94d5c74964e84d26" + sha256 cellar: :any, arm64_sonoma: "b393c5ebd793e9e199cc2681d75a7eb88d2b76dded65415ba5f8f90cc340c24f" + sha256 cellar: :any, arm64_ventura: "c6eed01d56ba9ea0428fb4e1642841f0a1c5dfb557ef35ed6b4cd1ed8b4d31b4" + sha256 cellar: :any, sonoma: "744208f4b105609b87741f35086ea216e1398b4c6c09d9fb787bd4d22325f549" + sha256 cellar: :any, ventura: "299052d6163ebd6bec99ed7f6bf45335ac789b8997ebf6ddaf17d230f6cce39e" + sha256 arm64_linux: "7946ccf43c5b2b2c847aacd671197ab0cc490c809cd430650f464b9c2f16fe7f" + sha256 x86_64_linux: "3f62e99678a4742ac5f2fa8abcce5cead52a9c1bc884993e6547e063aea672a3" + 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..d0cd851a3c0a7 --- /dev/null +++ b/Formula/m/mpich.rb @@ -0,0 +1,120 @@ +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.0/mpich-4.3.0.tar.gz" + mirror "https://fossies.org/linux/misc/mpich-4.3.0.tar.gz" + sha256 "5e04132984ad83cab9cc53f76072d2b5ef5a6d24b0a9ff9047a8ff96121bcc63" + 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_sequoia: "d3dca8bd92f54bef8002be665288e64224c06bc9d21e02f51159da5acaf0f366" + sha256 cellar: :any, arm64_sonoma: "13e3cdf67d22d9fe0a2e329a3e744ccefb9639347d993ee61db03fcc3ea94e7c" + sha256 cellar: :any, arm64_ventura: "ae8445c78a080da251f7feacf10c5af2536253957e2017e631019c2906222238" + sha256 cellar: :any, sonoma: "adb7e8ba25ae9220c61c39d894175a2552471989cb7847dea8b1af38b6349f24" + sha256 cellar: :any, ventura: "225a762f2f84644bd79521f473310223b18bfc6c55f4df26827006c6551292fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "f048aa161a96151f3ee7cd8cd9ee7b1f3a827369ffdbd905c532097854103d3c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f77974a6ff8587c775b90de3c499eb30328c2abc029515a76e094c490f2eb96" + 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..c4108a13239b7 --- /dev/null +++ b/Formula/m/mplayer.rb @@ -0,0 +1,96 @@ +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 + + bottle do + rebuild 2 + 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..3250242d854cd --- /dev/null +++ b/Formula/m/mplayershell.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "1be2bb2a8eccce7fa190b85af6e67fb7fe36393c32a8295852af0e6e390b6ee9" + sha256 cellar: :any_skip_relocation, high_sierra: "c0b558e0508d80fe05a1d9617b7aa1986066c54bc0a3da585631eb406da5eb93" + sha256 cellar: :any_skip_relocation, sierra: "e9377eaebb65903037105bf3ed6ee301a182452791e9daeaadd08ccb732d9d1b" + sha256 cellar: :any_skip_relocation, el_capitan: "ae4c1c9d069053afa7e71867256b577e23bd0dec87a90ccab2ebeab089a3634b" + 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..e9a42f9d06616 --- /dev/null +++ b/Formula/m/mpop.rb @@ -0,0 +1,36 @@ +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_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/mprocs.rb b/Formula/m/mprocs.rb new file mode 100644 index 0000000000000..8b72f54fb6b01 --- /dev/null +++ b/Formula/m/mprocs.rb @@ -0,0 +1,46 @@ +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.2.tar.gz" + sha256 "13059e3f474b17b0d806b2b6a79c17dd9b817793a0a6442ffd43ddaacb1db60c" + license "MIT" + head "https://github.com/pvolok/mprocs.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3a57e422a9ce6bc06b5cde9fc4a4f6e461587a3bcacd641a70dec691ea8b3d27" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f1819269384051c7fecaa338edae853b7f7cf4eb8782a230a18e23d6d152e054" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c41ca551b20bfe19729407fab771d7271e0ae382ece946d248fbdf364f931411" + sha256 cellar: :any_skip_relocation, sonoma: "9c3e50b429cef4068997ce7c9b18711ca4e6df1be6bf0e59ee97af3ccb202661" + sha256 cellar: :any_skip_relocation, ventura: "f82c17acb72bc3ffc783ee1488084ddee1ce98f7920e8333609f3be868d1c8b6" + sha256 cellar: :any_skip_relocation, arm64_linux: "13e4cd9a9f153a7a8cc3bbd92e7d6c9d8cccd391c2b6b1364c19058915108cf8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bfa1c70b7654a7950eb5bc057cdb700ace216b46ad0f903d771ab2535f1cd2c4" + 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..398180c2867b8 --- /dev/null +++ b/Formula/m/mpssh.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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, mojave: "e37b5e479ba7f9ad86373e646c63485b55dd1381c2cbc130150e108886675b72" + sha256 cellar: :any_skip_relocation, high_sierra: "1057c47b866d50031a23a0bd244d3bc056b9f12a4d9bf0aeebc0ea292c484638" + sha256 cellar: :any_skip_relocation, sierra: "90d758a0f7accf0b63755c3de8100a880b500e732fc8924123ab2a1c7ce688f8" + sha256 cellar: :any_skip_relocation, el_capitan: "e5ac485861dfca0be2bb1ca2eb5826b5ca5977c0d2abb12dc58de011c18046f1" + 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..8c64ca773ca16 --- /dev/null +++ b/Formula/m/mpv.rb @@ -0,0 +1,138 @@ +class Mpv < Formula + desc "Media player based on MPlayer and mplayer2" + homepage "https://mpv.io/" + url "https://github.com/mpv-player/mpv/archive/refs/tags/v0.40.0.tar.gz" + sha256 "10a0f4654f62140a6dd4d380dcf0bbdbdcf6e697556863dc499c296182f081a3" + license :cannot_represent + head "https://github.com/mpv-player/mpv.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "5955cf22cdde31fa7f6968d63af6bc9349b46cc8b0b8c16106a0b6472f4a37ef" + sha256 arm64_sonoma: "6f109ef9959b7a8cf389253c951d522da82102156679fe3b2c83d96d21bbe982" + sha256 arm64_ventura: "0cd6d5afa3c9fdf52939b3efe53542669d4dc3eb36bad2fd81fee909cc7894c5" + sha256 sonoma: "fbf379a4b04f73397466692ff0977972862178e93702cdb106ee5f0897f89fb9" + sha256 ventura: "edbd8605a162f20ddcfad0cff8d0f3626c394eef645d89d0329017a2770a101d" + sha256 arm64_linux: "2f2da23614a1d6b915b5016f68e485819a3e7d8bd94a5ef496adcdddd5c9ab87" + sha256 x86_64_linux: "3f8d46888b8a730bbb89dc414f032f3137d8f9cdd6cb410270a31a1bae04674a" + 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_ventura :or_older do + depends_on "lld" => :build + 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? + + # Work around https://github.com/mpv-player/mpv/issues/15591 + # This bug happens running classic ld, which is the default + # prior to Xcode 15 and we enable it in the superenv prior to + # Xcode 15.3 when using -dead_strip_dylibs (default for meson). + if OS.mac? && MacOS.version <= :ventura + ENV.append "LDFLAGS", "-fuse-ld=lld" + ENV.O1 # -Os is not supported for lld and we don't have ENV.O2 + end + + 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..58f62a74ad3e8 --- /dev/null +++ b/Formula/m/mqttui.rb @@ -0,0 +1,34 @@ +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_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..a161381269617 --- /dev/null +++ b/Formula/m/mr.rb @@ -0,0 +1,44 @@ +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 + + 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..5eb1f4a6f0a8a --- /dev/null +++ b/Formula/m/mrbayes.rb @@ -0,0 +1,66 @@ +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 + + bottle do + 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..46c4605912075 --- /dev/null +++ b/Formula/m/mrboom.rb @@ -0,0 +1,35 @@ +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_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..b1d5af6fdcbd8 --- /dev/null +++ b/Formula/m/mrtg.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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..1483c3c0e2879 --- /dev/null +++ b/Formula/m/mruby.rb @@ -0,0 +1,46 @@ +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_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..ccf78121ebf0d --- /dev/null +++ b/Formula/m/msc-generator.rb @@ -0,0 +1,99 @@ +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.2/msc-generator-8.6.2.tar.gz" + sha256 "7d565cf5ff39e2ecb04d29daec0eaf674278f6d0a1cb507eed580fe8bc8a0893" + 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 + + bottle do + sha256 arm64_sequoia: "c1f15322760c6c6832f4391aa34e426e3107322cf0150b38ecb504e66c7f0229" + sha256 arm64_sonoma: "0099d9bdd7c1cfce442bd16cbc462126e9ea9d8407d8c40538edfcde102f0c57" + sha256 arm64_ventura: "d825f247ee7805fb1a8bb12019c2414ddb0ccb08bd93a775945d0283084a4aae" + sha256 sonoma: "f21ce8e7b8f247951fd1c3dcb46bc8e5ba8f1913da99a1254f93ad39fcf9f015" + sha256 ventura: "602abed907a5dae536b0c0857dfd7b08c46783c5c0eb09897025075c1f122cfe" + sha256 arm64_linux: "ea6647b991286227f59ef2ea715c4f92dced7a42a8cf53e8466614a3c3965448" + sha256 x86_64_linux: "c60b5ba0e5437cee822f8cea5b1c6687711e87278a7ac2e09b36d02650286d95" + 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 + # Issue ref: https://gitlab.com/msc-generator/msc-generator/-/issues/96 + odie "Check if workarounds for newer GraphViz can be removed!" if version > "8.6.2" + ENV.append_to_cflags "-DGRAPHVIZ_VER=#{Formula["graphviz"].version.major}00 -DTRUE=1" + inreplace "src/libgvgen/gvgraphs.cpp", "std::max((float)0, std::min((float)1,", "std::max(0.0, std::min(1.0," + + 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..b1fbedc9a5b99 --- /dev/null +++ b/Formula/m/mscgen.rb @@ -0,0 +1,94 @@ +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 + + bottle do + 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..2c90afce21ff6 --- /dev/null +++ b/Formula/m/msdl.rb @@ -0,0 +1,67 @@ +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 + + bottle do + 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, mojave: "30deed1f7ba83c707aa002a217438e341aae978e27cfc6d39239a063f2b14cde" + sha256 cellar: :any_skip_relocation, high_sierra: "5f2922fa4f3b69f3f00cb7e29854c5a43c163e209c87d961253da9c4a7c3ec73" + sha256 cellar: :any_skip_relocation, sierra: "69b04b6f10ea552b6c862110434cc63dfa6bfccdc8034edd70fed5db0f79e68b" + sha256 cellar: :any_skip_relocation, el_capitan: "34ba320e82d1ce97fb0a106abd2c5ec848ba16857730ba51cadd0a030bee62ab" + 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/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..ad36d01005674 --- /dev/null +++ b/Formula/m/msgpack-tools.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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, mojave: "30f69cfbcfe93c148fec339d86775357cc804f50c58c42594708f7ae9abad226" + sha256 cellar: :any_skip_relocation, high_sierra: "9c12c496640b2913caa23147bdacffed803115e68607c56975bdab106b4b83b0" + sha256 cellar: :any_skip_relocation, sierra: "c576acc7e6078360a79bf7270336e0f3dc9012161e860681cbfe7f2de1313857" + 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 + system "cmake", "-S", ".", "-B", "build", *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..d4f2db707c9ed --- /dev/null +++ b/Formula/m/msgpack.rb @@ -0,0 +1,83 @@ +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_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..df74c87f8c5bc --- /dev/null +++ b/Formula/m/msgpuck.rb @@ -0,0 +1,75 @@ +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, mojave: "0fedf815d4ba46d10e5fe7910cbcc06f1ea2906e40a4ef994ffd3aa04289c423" + sha256 cellar: :any_skip_relocation, high_sierra: "50197e08a5b55fbe804109ad01dfa815a6dde2b11b688d89a58154fed2d8d54f" + sha256 cellar: :any_skip_relocation, sierra: "6f4011d177bf2e42f94f853bc93283ada6c48df8fdb7269135def453e65e598d" + sha256 cellar: :any_skip_relocation, el_capitan: "b0accfedd2582109acec3297878bb943360282520a31b0d1c16c4ec1aa70a362" + 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..e22e1b55a5135 --- /dev/null +++ b/Formula/m/msieve.rb @@ -0,0 +1,38 @@ +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 + + bottle do + 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..6c862dd3a47b0 --- /dev/null +++ b/Formula/m/msitools.rb @@ -0,0 +1,106 @@ +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_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..0a6b72f75b05d --- /dev/null +++ b/Formula/m/msktutil.rb @@ -0,0 +1,34 @@ +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_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..715f845c3a060 --- /dev/null +++ b/Formula/m/msmtp.rb @@ -0,0 +1,37 @@ +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.28.tar.xz" + sha256 "3a57f155f54e4860f7dd42138d9bea1af615b99dfab5ab4cd728fc8c09a647a4" + 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 arm64_sequoia: "c4c70693d1e16a0c6b8a55bf52a548760b3bc16df35bf0c70312ef2d57ffe187" + sha256 arm64_sonoma: "9194d0b211b262ff0022ff7e54e9c6ae3b91fbac8117e9efc4d20bafbf6a2bf1" + sha256 arm64_ventura: "b529bbf1481c29d5d14fe62a45ab2860c29c173071add866bfe30627ff4b5da1" + sha256 sonoma: "d44aa70e8a8bebc73d42ed949d93269434aca16cd400826bba636d4a7e5d8d6e" + sha256 ventura: "0df3276cf5404eec6e3d88c2b052e0d16d957033eb55aff75e2e4d83f518cb5e" + sha256 arm64_linux: "c88f3518fbb8f4a3ff15a0806a64d5526af4a53bb379b276b72c691f6c6039a2" + sha256 x86_64_linux: "0ee69d963d12c0ec32977dcd57b555755024e480a433abb0cb40b0ecdb8425f2" + 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/mspdebug.rb b/Formula/m/mspdebug.rb new file mode 100644 index 0000000000000..1d7690ad3303f --- /dev/null +++ b/Formula/m/mspdebug.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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 mojave: "4d5d8c35966a0000b010bbaea7c2c403ff4921d1306d34d752ccceb3f3d3b155" + sha256 high_sierra: "4124d4fbd9e191d941153962bb74aed50cc200c473b5ad5850610a1bc85f87b4" + sha256 sierra: "e16447e04c99d74b8cdc49a063c230c64d09e34402d0221542594f3aacac5940" + sha256 el_capitan: "22fc92bc5a594451eb0d0b943bce812619302c795fdad0ca4305c059ccf10a88" + 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..71bca623dea42 --- /dev/null +++ b/Formula/m/mstch.rb @@ -0,0 +1,66 @@ +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 + + bottle do + 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", *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..55195236e54d0 --- /dev/null +++ b/Formula/m/mt32emu.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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..03558636d0d30 --- /dev/null +++ b/Formula/m/mtbl.rb @@ -0,0 +1,45 @@ +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_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..4d882db7a360e --- /dev/null +++ b/Formula/m/mtm.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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..cd23a21325adc --- /dev/null +++ b/Formula/m/mtoc.rb @@ -0,0 +1,89 @@ +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-1024.3.tar.gz" + sha256 "ffe47144929605307826d9cc5697369e18c83f681860e3c397b6c11279e03318" + license "APSL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ee82cf8117b696fd2cbbf0994706e9efa73aa2403adc15a5fbc50fa0be9b8e03" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d3c766c433b8ae315ef4a2386327c5ae674b5a360faaa29f0449677ae32f74e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9605d52ea43f7661e05cf626ebfe6a68e57a5aa2985d05ac0c64f54c07ed55b7" + sha256 cellar: :any_skip_relocation, sonoma: "b41ec3a03f405eb6d60abec7c08f3e97e6c19de4f291050281f2ac9df680b53d" + sha256 cellar: :any_skip_relocation, ventura: "5e882dbfadd1b1c6a167e4930f6c5aeda8b8f25c110dd7c679167ba0abc0e971" + 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..a94f76bf16bd9 --- /dev/null +++ b/Formula/m/mtools.rb @@ -0,0 +1,43 @@ +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.48.tar.gz" + mirror "https://ftpmirror.gnu.org/mtools/mtools-4.0.48.tar.gz" + sha256 "88f273c6629ad5464482e98a9980727f585eead8736c50717c95e36f05ca05dc" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c9e24a85323344ba64d5e22d8af0e392c70b05b583476d6cf8f7d31c963dea2a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b47985d9ea303292ffbfee4de611e4f30cf1df07006af728862dfd00cd81dd26" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ac530692ed65ed59fee5bb71bc60343581860cdac2c9b6c7da35b57fae0cff60" + sha256 cellar: :any_skip_relocation, sonoma: "2d459e925ce754b2ad4bd21743843159bed88fc84700c8d72ac8b36a8a713261" + sha256 cellar: :any_skip_relocation, ventura: "f1d8831b6a65b99b20e1ff6864dff373d8bf921e782f44b0acfe2f787a206f93" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2d5a2e8c4c343781210aefe1bcac205a4dbb490bf99400d4ccaaf8a7eb49073" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8163f99ee69a63637c3f2a70927e7f16a8f6a75d2cece8f19aa6f2bf059beb64" + 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..15fd74832fa95 --- /dev/null +++ b/Formula/m/mtr.rb @@ -0,0 +1,70 @@ +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.95.tar.gz" + sha256 "12490fb660ba5fb34df8c06a0f62b4f9cbd11a584fc3f6eceda0a99124e8596f" + # 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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "de2a8c8ebe004fa34eb74e44a23eda5371a0b00d794c31541369afc9383dcb59" + sha256 cellar: :any, arm64_sonoma: "d1d03f6a4f9a9e49321d656b787d4e53f1f6acad08384d68bb4ad8199bf1626e" + sha256 cellar: :any, arm64_ventura: "83d9da1de6a03855e99e0db1f8060f196fda988b187493aaad8d15b039176644" + sha256 cellar: :any, arm64_monterey: "832e28a80e1b4340c19c4dc3511504672ec03ff5cb54d7294e932b7d9aa80085" + sha256 cellar: :any, arm64_big_sur: "0e41037f1e0f662b87155307468c740594d2e16761e2b120a3086e0922c7bda5" + sha256 cellar: :any, sonoma: "fad686ff163def04ca773130a81921c8498606f072ff7af37c62463e8aaf5412" + sha256 cellar: :any, ventura: "bbff689ff843d38238f2379af5022b4bd0848234a9bc4e0a79fae8669510cc8b" + sha256 cellar: :any, monterey: "8388e7af1b04e7749ffa93b3a9479df605cbe16d7a88c02625ecd229e36043f9" + sha256 cellar: :any, big_sur: "bb07a178a739fc8c8a15fc7645efc7fe749b81663752bcd66cb1efcd47217371" + sha256 cellar: :any, catalina: "7ee23cbae756e561d02a0ffe3b32476cd635b54f70240a937c43e7608c27766d" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd12499c2fd410879561de9ffbc0a47393cb2b370d8889091b2b751678f32411" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b2707211f207742525047d68e4b3e870b524f093ea8ce8f76b8fb3999e6f8d5" + 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..7aad05730a1f9 --- /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 2 + sha256 cellar: :any_skip_relocation, all: "c1a12185e6ce3889731ba486e3fe58b862edcb5123e3877166b361aa7f3132ca" + end + + depends_on "python@3.13" + + 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..964b5f2c9bfbd --- /dev/null +++ b/Formula/m/mu.rb @@ -0,0 +1,89 @@ +# 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.11/mu-1.12.11.tar.xz" + sha256 "c6e463f4936edc7f2c0a0b0d038183783b35430b35887b79301072bf1d5e9daf" + 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_sequoia: "e49a9a1faec9d09e51fd82bd1428f536bab37ae41446c469b0db4f153c49cdf5" + sha256 cellar: :any, arm64_sonoma: "444bfab5ed4d65febfd676d59e00b8de3b6b58418c1de8f5f6497a2869473d21" + sha256 cellar: :any, arm64_ventura: "ccc8d27a9f9303f1a276a63de329f09d51f6a5b6c8f401c101f416472909092b" + sha256 cellar: :any, sonoma: "0bd5ed64c5018490820f6e665e42cced0b6a1c4f4b00aa97f355baf31b422185" + sha256 cellar: :any, ventura: "28239f6e4b080a37103b0449219db681c1fb2c77adbeabbf751f7b36411fa9e6" + sha256 arm64_linux: "691b2119acd7c04413b29a07de72c046e19dfa24b66f74b6a62e1f75edee4a9d" + sha256 x86_64_linux: "de514ad234daf1ff4026f6cf26efd26b90dabb8f08a679124b9949ece069cb2f" + 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..c961ad24984c9 --- /dev/null +++ b/Formula/m/mubeng.rb @@ -0,0 +1,31 @@ +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.22.0.tar.gz" + sha256 "533490d11563af3f30bcd892a594d4675f0e8555f4455d9c85899b27fb113847" + license "Apache-2.0" + head "https://github.com/mubeng/mubeng.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4200b06232b9b251aa8d9c207d468bddc8f8d0331e7c177819e8fd29f9ac2b79" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4200b06232b9b251aa8d9c207d468bddc8f8d0331e7c177819e8fd29f9ac2b79" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4200b06232b9b251aa8d9c207d468bddc8f8d0331e7c177819e8fd29f9ac2b79" + sha256 cellar: :any_skip_relocation, sonoma: "89119546ada6f6603c2bf77025c65f626f21c3dd9f479aaa15d75f8cea701c6e" + sha256 cellar: :any_skip_relocation, ventura: "89119546ada6f6603c2bf77025c65f626f21c3dd9f479aaa15d75f8cea701c6e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c4176e1bb53a2acf2a0b5fed9cbf243921f985d5a4ebb8725e4a405e668797e" + 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..6a0c01b88b8a5 --- /dev/null +++ b/Formula/m/muffet.rb @@ -0,0 +1,31 @@ +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.10.9.tar.gz" + sha256 "ef87bde42c6539c79d8b15a5e2389fedaf3cc35857b6684bbaf070a7807575a0" + license "MIT" + head "https://github.com/raviqqe/muffet.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "44df4d1456f7aa3fdae7fd9694a8e1174a79bcb29de7116739e856e1e05b5f7c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44df4d1456f7aa3fdae7fd9694a8e1174a79bcb29de7116739e856e1e05b5f7c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "44df4d1456f7aa3fdae7fd9694a8e1174a79bcb29de7116739e856e1e05b5f7c" + sha256 cellar: :any_skip_relocation, sonoma: "4236f6ad7f7533df8e4d3aa833bb2e992160b63d5834211b9806263a55e4250f" + sha256 cellar: :any_skip_relocation, ventura: "4236f6ad7f7533df8e4d3aa833bb2e992160b63d5834211b9806263a55e4250f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a188c71114cf40e552dd8ba765852326d950f1ae762f7ef4955fbfecde20623e" + 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..bc57e3500f200 --- /dev/null +++ b/Formula/m/mujs.rb @@ -0,0 +1,48 @@ +class Mujs < Formula + desc "Embeddable Javascript interpreter" + homepage "https://www.mujs.com/" + url "https://mujs.com/downloads/mujs-1.3.6.tar.gz" + sha256 "7cf3a5e622cff41903efff0334518fc94af063256752c38ba4618a5191e44f18" + 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_sequoia: "839b3fa73f32ef2b53a2e52af833fa2257786dd32bf6094f19dba18d4d47f274" + sha256 cellar: :any, arm64_sonoma: "84220bdaa3fc8a2e33185fb4e1b0426cf37a31f83bcfdeed90a2fb37e50780c1" + sha256 cellar: :any, arm64_ventura: "0765c40d6deb118da5f0f8edd014bd4de89d889bee4fed10a7b7c64c23affcee" + sha256 cellar: :any, sonoma: "8a354ea3d674b092ead9ed37be5d584c2ef8470ebbbad298c00af7fb7fbc0f8e" + sha256 cellar: :any, ventura: "20a7ee4f3d183a7fcae93ecedfd9562485b3462a6cc013e74e0cc66a5ad34ace" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e7bab595f2280b58d8c3193370ed5d9f12e864b60ec18aec64c70e0122ad6c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16f8f85b13a69a0962fab110a0215ebd002220ab84878bd164cd3dd7171cf9db" + end + + depends_on "pkgconf" => :test + + on_linux do + depends_on "readline" + 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..bc4ec9baf887a --- /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.57.1.tar.gz" + sha256 "a5fb523d5bc53f1526439d79d45770c32596f7a0a5de4dbbe53ea2ab47494e7e" + license "Apache-2.0" + head "https://github.com/lindell/multi-gitter.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7a6b08b1ce3221f66eeae7ac47825bd859c6643bc867779515a3edec5e4218db" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7a6b08b1ce3221f66eeae7ac47825bd859c6643bc867779515a3edec5e4218db" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7a6b08b1ce3221f66eeae7ac47825bd859c6643bc867779515a3edec5e4218db" + sha256 cellar: :any_skip_relocation, sonoma: "3ae4e5b447e47aaf60d67c55ec876d78414d4958a20a703c003a96e9df578c29" + sha256 cellar: :any_skip_relocation, ventura: "3ae4e5b447e47aaf60d67c55ec876d78414d4958a20a703c003a96e9df578c29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e6cf8ec9f2f8039dedb212885637778aef83830c25cabdc42672fee664842f7" + 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..224ded949bb8d --- /dev/null +++ b/Formula/m/multimarkdown.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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" + + 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..5281aeca874f2 --- /dev/null +++ b/Formula/m/multitail.rb @@ -0,0 +1,40 @@ +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_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..d562eae7f5bd5 --- /dev/null +++ b/Formula/m/multitime.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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, mojave: "8d570dbc59cd06a441633d77bc126f0000c3b96a4b11abd48233b95ba403ab7d" + 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..5ea77c9e0583c --- /dev/null +++ b/Formula/m/mummer.rb @@ -0,0 +1,60 @@ +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" + + bottle do + rebuild 1 + 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..fad7d2dc24765 --- /dev/null +++ b/Formula/m/muon.rb @@ -0,0 +1,62 @@ +class Muon < Formula + desc "Meson-compatible build system" + homepage "https://muon.build/" + url "https://git.sr.ht/~lattis/muon/archive/0.4.0.tar.gz" + sha256 "c2ce8302e886b2d3534ec38896a824dc83f43698d085d57bb19a751611d94e86" + license "GPL-3.0-only" + revision 1 + head "https://git.sr.ht/~lattis/muon", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c6f0a6432a429272a8dfe0fc8c463ff95cbed4059fcc49c0b2d83e0437e72ba3" + sha256 cellar: :any, arm64_sonoma: "edb4791c7f8790b96b4361e3a4886ad654b977a90f52fb9632b5e4af622e1e34" + sha256 cellar: :any, arm64_ventura: "328b33b0c04a614dbc4b5ec87b842530dc75b92ab729d4e0bd79b4922ea4e04f" + sha256 cellar: :any, sonoma: "9f5a94990f9ba7dad39a19b227ab8a43c1e1957a82cd49eff60a33d9015b3d0d" + sha256 cellar: :any, ventura: "1093a8dc08368070464f5c182b80df1196b6e4a04f70978072ae9f66f5297c99" + sha256 arm64_linux: "59e9b0a588a9beb8c1f5f5b953c368f0a5073e5a61884af80325b9b22a566f05" + sha256 x86_64_linux: "e9f55dec1f94791d47db778e7ae1288523f02ec2b3bf676976e678e8915d4aa1" + end + + depends_on "meson" => :build + depends_on "libarchive" + depends_on "ninja" + depends_on "pkgconf" + + uses_from_macos "curl" + + def install + args = %w[ + -Ddocs=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..25bee26685eb9 --- /dev/null +++ b/Formula/m/muparser.rb @@ -0,0 +1,69 @@ +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 1 + head "https://github.com/beltoforion/muparser.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b9dd0fef93be805c1e9d38e0a65f780482e4f31600e2ca06de03117961482515" + sha256 cellar: :any, arm64_sonoma: "45cdabf66b22739dc8e558b062cc6a1f330d38d0ec7400c0ba0399f4b70f8d18" + sha256 cellar: :any, arm64_ventura: "0e8b448240be0fc032dee25dae2d40a7d4c143b7acbabd7abfce2f066e09da24" + sha256 cellar: :any, sonoma: "bb235a4e1df126fe983925b4debd0b971abab5d2d588d1184fa55cef232b7eef" + sha256 cellar: :any, ventura: "a17fbefec1301c80a8ff8f5d1fece66401a4e959c6f9aded0290f51cf31edede" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d3d3f6acf9815f9e2c3bb3210ea66d744f88d72a75a70e9a3214bafb8306f14" + sha256 cellar: :any_skip_relocation, x86_64_linux: "531bcd3892d0938e5fd2b8e174be8a0ddb75183601bea0a31199bfdeabbf822a" + end + + depends_on "cmake" => :build + + on_macos do + 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=#{OS.mac? ? "OFF" : "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..286313e1fac7a --- /dev/null +++ b/Formula/m/mupdf-tools.rb @@ -0,0 +1,42 @@ +class MupdfTools < Formula + desc "Lightweight PDF and XPS viewer" + homepage "https://mupdf.com/" + url "https://mupdf.com/downloads/archive/mupdf-1.26.0-source.tar.gz" + sha256 "d896f89eabfc5aaaabcdddc30f4592f6df33075640759292dd338d8e69e59c63" + license "AGPL-3.0-or-later" + head "https://git.ghostscript.com/mupdf.git", branch: "master" + + livecheck do + formula "mupdf" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8df3f6ebbf2c50eb2c02ff622a745948223df1fffe515fe0a0e4838bc509c9b5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c85d08c24c772344bed0b7f5e99e7088c18b914018cb8e4e113b32411201a0a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "758971a3bc4791263721b3d84285a032949d8e59b8b89521ed29c47fd694b460" + sha256 cellar: :any_skip_relocation, sonoma: "28618ba854f25915520ed4c9c61666da7da57484509a177d7d35a89ada4ae50b" + sha256 cellar: :any_skip_relocation, ventura: "154f0dab73d3dabbfd5fa55f536e0917e39567c934c98968e3d24583637a7797" + sha256 cellar: :any_skip_relocation, arm64_linux: "c66948ee6d0210fe61cbcd82268dc87ad2656f3585917e143bb58e57d6f62922" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0902c56662a2551e00bb2493052c09e6c1745d1db1f8bcbe0db0662e09f51e13" + 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..62f9d5d93dbe8 --- /dev/null +++ b/Formula/m/mupdf.rb @@ -0,0 +1,124 @@ +class Mupdf < Formula + desc "Lightweight PDF and XPS viewer" + homepage "https://mupdf.com/" + url "https://mupdf.com/downloads/archive/mupdf-1.26.0-source.tar.gz" + sha256 "d896f89eabfc5aaaabcdddc30f4592f6df33075640759292dd338d8e69e59c63" + license "AGPL-3.0-or-later" + head "https://git.ghostscript.com/mupdf.git", branch: "master" + + livecheck do + url "https://mupdf.com/releases" + regex(/href=.*?mupdf[._-]v?(\d+(?:\.\d+)+)-source\.(?:t|zip)/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e773216e231cdc4ea471d63edddc90a67ad6bc0d990b9e14a163c4952e60738c" + sha256 cellar: :any, arm64_sonoma: "046e8262a45c3b24d3ad077eb2e6addaa43d6b778f518c6bb433ffbab2da2b87" + sha256 cellar: :any, arm64_ventura: "18aea7bc53249cefaf910f26c3da52fe77dec817990d16f35f97196cdf71b61b" + sha256 cellar: :any, sonoma: "e25e8958256ec743cdc880d63dc68204a4bc82710a91454aece8851295c1d6c8" + sha256 cellar: :any, ventura: "13cfb67461ebc03a94eb4773c781649cc0eef12781ea2efcf1fe0d8130b1143a" + sha256 cellar: :any_skip_relocation, arm64_linux: "875be13108d7114c44c1348db764c5818f41f235f6065605f7551ad1f6779dbc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04febebca733ebaaa2fd1d3650165ce160a0bc058fb05b264d0e0dada1a1ec31" + 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.13" + 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.13") + 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..4b2a56f437b2c --- /dev/null +++ b/Formula/m/mupen64plus.rb @@ -0,0 +1,74 @@ +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 + + bottle do + 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 CI because it hangs because a display is not available. + return if OS.linux? && 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..cd7675d572934 --- /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/v6.4.2063.tar.gz" + sha256 "e980fdb8d822bf9ad8f26aa412b2771bdf154561e2dba4c30cc040db19232dd2" + 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_sequoia: "ef6be22c52e53857cd33246c1c5e9232f762005db6b19583d8baef15f1a64c2b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef6be22c52e53857cd33246c1c5e9232f762005db6b19583d8baef15f1a64c2b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef6be22c52e53857cd33246c1c5e9232f762005db6b19583d8baef15f1a64c2b" + sha256 cellar: :any_skip_relocation, sonoma: "7e82a5cb3b5b6e410012c8c2d8d2488f96996586cdfbfc0c18e4b9c6071d5844" + sha256 cellar: :any_skip_relocation, ventura: "7e82a5cb3b5b6e410012c8c2d8d2488f96996586cdfbfc0c18e4b9c6071d5844" + sha256 cellar: :any_skip_relocation, x86_64_linux: "839235b629a4335b65bd919e1d1e1d1b0671490bda7282bec06881f3da09bc63" + 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..f3bc0459ccd06 --- /dev/null +++ b/Formula/m/musepack.rb @@ -0,0 +1,85 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "5efee306aff13a0c0b8f98371e3cbe3eab6b73b0e92bdd59237d7db608a17708" + sha256 cellar: :any, high_sierra: "e1b6641d11a5338d395de8f5573464beddb81dc3dce16998e53361b43502844b" + 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/formula-patches/743dc747e291fd5b1c6ebedfef2778f1f7cde77d/musepack/r479.patch" + sha256 "efef0421e3bb25c065c5e77d6c2e4bcdcc89fbcb03c7a7cfd7565ee5478fc8ba" + end + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/743dc747e291fd5b1c6ebedfef2778f1f7cde77d/musepack/r482.patch" + sha256 "b147cc7effe9230401a0a865fdea1805be8eb26a24059bb36e39da1012e8da4b" + end + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/743dc747e291fd5b1c6ebedfef2778f1f7cde77d/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..d79dd0a86e337 --- /dev/null +++ b/Formula/m/musikcube.rb @@ -0,0 +1,86 @@ +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.4.tar.gz" + sha256 "25bb95b8705d8c79bde447e7c7019372eea7eaed9d0268510278e7fcdb1378a5" + 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* + ] + revision 1 + 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_sequoia: "f73dfdfe63a9d034ac0bfff95a25efe4144b6f82955335ef1d8e11db6d78cad0" + sha256 cellar: :any, arm64_sonoma: "686b56f4049b753532bab59ed5b36981f705d8689654b1670438774add89a6d0" + sha256 cellar: :any, arm64_ventura: "4ec1abcb7d9a85fc28ceae28af1a1014d7de50e3aef60411d09922f6021762ee" + sha256 cellar: :any, sonoma: "7df9f38a3362c63f77a79bd668021e4fde8351d389768808a23599ea37c12662" + sha256 cellar: :any, ventura: "089a80a914b6798ddc2280b64f0a4db3bb9df588538b53b22b2e760080452ceb" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b968756c76097c32a5a47f8573bd330d16c2e8c792aa9c07cfc7d26f784339f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b9242501e64de113097a77d7b3e5353ec15192e4261e25637f046a3aa392331" + 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..bc2a055186825 --- /dev/null +++ b/Formula/m/mussh.rb @@ -0,0 +1,21 @@ +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" + + 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..997f7cf17a7e7 --- /dev/null +++ b/Formula/m/mutt.rb @@ -0,0 +1,116 @@ +# 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-2.2.14.tar.gz" + sha256 "d162fb6d491e3af43d6f62f949b7e687bb0c7c2584da52c99a99354a25de14ef" + license "GPL-2.0-or-later" + + # Livecheck uses GitLab tags to determine current version. + # They all have `-rel` suffix which needs to be omitted. + # + # BitBucket strategy doesn't work for some reason. + livecheck do + url "https://gitlab.com/muttmua/mutt.git" + regex(/^mutt[._-]v?(\d+(?:-\d+)+)-rel$/i) + end + + bottle do + sha256 arm64_sequoia: "e11bd2be69fee9b5c24190699cf2318559ca0cda04520ae1845a5512e0fcd843" + sha256 arm64_sonoma: "b5ef0c774e2c1926a13345f73f2f6370aa28d54bd4dfff553f945fb7f9ab7858" + sha256 arm64_ventura: "da5fc14cf6e06faab09da46efbea32504378573518a19f58645809f80d2e7781" + sha256 sonoma: "a2b125aa772f366ed34ee8da0d71565e88334f0dadc37c10513f358fc0c4d106" + sha256 ventura: "a17770bc4c28b5f01f213145fc6f78967616b8dd4b4b95839935981d9f00b058" + sha256 arm64_linux: "9ba607d24fa2463909af8d212233024e9c3c7fde6868bc8a2ea3c901d68d9e18" + sha256 x86_64_linux: "17374083e28fb5d5bad686eb2c301a0f37bf49e46c8bcd30c5a04cc90c8c79ee" + 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..8d0cea876784d --- /dev/null +++ b/Formula/m/mvfst.rb @@ -0,0 +1,89 @@ +class Mvfst < Formula + desc "QUIC transport protocol implementation" + homepage "https://github.com/facebook/mvfst" + url "https://github.com/facebook/mvfst/archive/refs/tags/v2025.04.28.00.tar.gz" + sha256 "10f47a23f96dfbe14587666821b5a8f06eb38972c5ef403a1bfb2135fae8976a" + license "MIT" + head "https://github.com/facebook/mvfst.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "22cc2215303e5d288e42863bcc3782734c272e9a05ab90c4c3e81ce2f5d29e66" + sha256 arm64_sonoma: "0c93f591f4ae8857bbff2fad3c4431212309af9da17fd765e34b328040aa8c46" + sha256 arm64_ventura: "08182583110c78be07422ed698191dc0fcb8acacf41574d928bd1543f499798b" + sha256 cellar: :any, sonoma: "334f8480e9d7a87c47b51dcbf5c78919c45df0f9e41d64690611b8c32a896f21" + sha256 cellar: :any, ventura: "605cf3db630d713f95092a496e1e3fa4458a1ebc34cb3d08322e88b78970c5f2" + sha256 cellar: :any_skip_relocation, arm64_linux: "c12e0faf3049caa08d867721cd01d89cca48cec4f36431a37d3ff7278fc75f20" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69a986ceaa672cc32f11f8b8a19f177db4f264db0239dcc3ed747e6ee3b9af48" + 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| + 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 + 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..c46e8adcaed04 --- /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: "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 + 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..f44c2406598d6 --- /dev/null +++ b/Formula/m/mvt.rb @@ -0,0 +1,160 @@ +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/cb/59/ebec439c4f00a2a2f290fe5123e0d697024e43b7d8cf107a057c79cc7298/mvt-2.6.0.tar.gz" + sha256 "5ef62cac4c84f9b6707bfc83c47f33afdf8e6a2a16bf8156701c5595969b8c29" + license :cannot_represent # Adaptation of MPL-2.0 + head "https://github.com/mvt-project/mvt.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e9d2a466119b63dde7fc528be5e6aea55b36dba330c27e3d9c08258a03e89a1c" + sha256 cellar: :any, arm64_sonoma: "607c5f59dbd08c428c29d4b83c525d4e1ee4b5f2b71d70aa822de39dc89b4ea0" + sha256 cellar: :any, arm64_ventura: "4f92a4a195e51bed398ccac5e6e4d1f23cab5f3eda6f9ad11b1367222d5ea222" + sha256 cellar: :any, sonoma: "32c6f03c6f0e9e465d579edaac5a38e672f9d209d908d98ee252c9107358d131" + sha256 cellar: :any, ventura: "054c3c39ddc0b13ce7df8eeea14be0cfb44124633a3c9151dd3c00b402d5ece4" + sha256 cellar: :any_skip_relocation, arm64_linux: "73502e7220a1bbc886445cd31e9c61b6c77cec576783035df4fc5d02cfe69ffd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29e681c4766dec54f9f00b79211fdfc150fd8111f77f614b873d4ef6ab90d679" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + resource "adb-shell" do + url "https://files.pythonhosted.org/packages/8f/73/d246034db6f3e374dad9a35ee3f61345a6b239d4febd2a41ab69df9936fe/adb_shell-0.4.4.tar.gz" + sha256 "04c305f30a2ca25d5c54b3cd6ce9bb64c36e5f07967b23b3fb6aaecc851b90b6" + end + + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/d9/b7/9e833af6cb52fa2aece1c6a1378667ca0172bead14f63ffccc3cb9862df3/libusb1-3.2.0.tar.gz" + sha256 "a11a6095e718cd49418a96329314da271cca6be7b4317a142724523371ac8961" + 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 "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/13/52/13b9db4a913eee948152a079fe58d035bd3d1a519584155da8e786f767e6/pycryptodome-3.21.0.tar.gz" + sha256 "f7787e0d469bdae763b876174cf2e6c0f7be79808af26b1da96f1a64bcf47297" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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 "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "rsa" do + url "https://files.pythonhosted.org/packages/aa/65/7d973b89c4d2351d7fb232c2e452547ddfa243e93131e7cfa766da627b52/rsa-4.9.tar.gz" + sha256 "e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21" + end + + resource "simplejson" do + url "https://files.pythonhosted.org/packages/3d/29/085111f19717f865eceaf0d4397bf3e76b08d60428b076b64e2a1903706d/simplejson-3.19.3.tar.gz" + sha256 "8e086896c36210ab6050f2f9f095a5f1e03c83fa0e7f296d6cba425411364680" + end + + resource "tld" do + url "https://files.pythonhosted.org/packages/19/2b/678082222bc1d2823ea8384c6806085b85226ff73885c703fe0c7143ef64/tld-0.13.tar.gz" + sha256 "93dde5e1c04bdf1844976eae440706379d21f4ab235b73c05d7483e074fb5629" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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, shells: [:fish, :zsh], 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..61e9fa9bd22ef --- /dev/null +++ b/Formula/m/mvtools.rb @@ -0,0 +1,56 @@ +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_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..14ab2e2d21b6e --- /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.50.1.tar.gz" + sha256 "5cc6726f0251911eeb888c692640969ab2c401a0958b025612123b98b0944ef0" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "d3b186348e869f9a2a710508cfdc5ab591963cf0e8c80814f70b856f2bd5c296" + end + + depends_on "openjdk" => :test + depends_on "python@3.13" + + def install + libexec.install Dir["*"] + (bin/"mx").write_env_script libexec/"mx", MX_PYTHON: "#{Formula["python@3.13"].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..7fb14642ecca6 --- /dev/null +++ b/Formula/m/mycli.rb @@ -0,0 +1,101 @@ +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/81/24/53ec786e8796f5b30a14a3cdc907d19ac0ca1117971b6b1fb810ffa35c87/mycli-1.31.2.tar.gz" + sha256 "6f4929da427fb724d07e197428e32e0f93b2a45beb2308c81fc3e8384583d72b" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f53242ff341da54a69e965558ad8af890052ac0fa87c453f4e0069b7fcaa5a96" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f53242ff341da54a69e965558ad8af890052ac0fa87c453f4e0069b7fcaa5a96" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f53242ff341da54a69e965558ad8af890052ac0fa87c453f4e0069b7fcaa5a96" + sha256 cellar: :any_skip_relocation, sonoma: "3042d016f9997f4f373a121acd3fe4f2d245b5a48b985552fc7a09432c83b30f" + sha256 cellar: :any_skip_relocation, ventura: "3042d016f9997f4f373a121acd3fe4f2d245b5a48b985552fc7a09432c83b30f" + sha256 cellar: :any_skip_relocation, arm64_linux: "f53242ff341da54a69e965558ad8af890052ac0fa87c453f4e0069b7fcaa5a96" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f53242ff341da54a69e965558ad8af890052ac0fa87c453f4e0069b7fcaa5a96" + end + + depends_on "cryptography" + depends_on "python@3.13" + + uses_from_macos "libffi" + + resource "cli-helpers" do + url "https://files.pythonhosted.org/packages/f9/7c/3344a9b856b9582df36c7a525f5710294f349499d16dcbf343453f70bdb8/cli_helpers-2.4.0.tar.gz" + sha256 "55903b705a212a473731db20fa26f58655e354078b99cb13c99ec06940287a4d" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz" + sha256 "03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848" + 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 "pyaes" do + url "https://files.pythonhosted.org/packages/44/66/2c17bae31c906613795711fc78045c285048168919ace2220daa372c7d72/pyaes-1.6.1.tar.gz" + sha256 "02c1b1405c38d3c370b085fb952dd8bea3fadcee6411ad99f312cc129c536d8f" + 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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pymysql" do + url "https://files.pythonhosted.org/packages/b3/8f/ce59b5e5ed4ce8512f879ff1fa5ab699d211ae2495f1adaa5fbba2a1eada/pymysql-1.1.1.tar.gz" + sha256 "e127611aaf2b417403c60bf4dc570124aeb4a57f5f37b8e95ae399a42f904cd0" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz" + sha256 "b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310" + end + + resource "sqlglot" do + url "https://files.pythonhosted.org/packages/05/2e/236e291d3a99edc59a4cb8dd6abedd522540fc5cba57eb4f39f790e8e686/sqlglot-26.16.3.tar.gz" + sha256 "691d2d9128af94b853db97c06856d40d276482dce1429246b5094c3f6cc364a3" + 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 "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + virtualenv_install_with_resources + + # Click does not support bash version older than 4.4 + generate_completions_from_executable(bin/"mycli", shells: [:fish, :zsh], + 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..2a32a20911976 --- /dev/null +++ b/Formula/m/mycorrhiza.rb @@ -0,0 +1,55 @@ +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_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..36c64356e3c26 --- /dev/null +++ b/Formula/m/mydumper.rb @@ -0,0 +1,54 @@ +class Mydumper < Formula + desc "MySQL logical backup tool" + homepage "https://github.com/mydumper/mydumper" + url "https://github.com/mydumper/mydumper/archive/refs/tags/v0.19.1-3.tar.gz" + sha256 "e7feab21b8073a5a7809cf7cc56a08ae0f93313dfe3f6f1fe5c96eec12f09f9d" + 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_sequoia: "17b15d765a3b9dd55a58cd299e1b82b318a77872f015bace521bd4c5f9b4007d" + sha256 cellar: :any, arm64_sonoma: "2e103237038c2913cf0ea2b36c1e3cd0420ed633020e07598755da52c25e4885" + sha256 cellar: :any, arm64_ventura: "2a8a9307520a9fdf50fa6ccfe233fdc1d488b5d218c4472742541b2a3dff4e06" + sha256 cellar: :any, sonoma: "450d772960aad232b7b639c7c52a254a76c68e85c2bcfacaffc3ec7d80814931" + sha256 cellar: :any, ventura: "6614ed61e8b36f9e7f02f48d985a2b46053652f92dade60bca559c1acb63f511" + sha256 cellar: :any_skip_relocation, arm64_linux: "7cdb629423cc0f18ddcf7ef7a0c2eab87970c00d7c4e42f822b9f567b73a4ccf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0318d32774a013eb348768d2a18ad8c6797d5dcfdc14fb0226a6676973176931" + 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..1093c1163fdb5 --- /dev/null +++ b/Formula/m/myman.rb @@ -0,0 +1,58 @@ +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" + head ":pserver:anonymous:@myman.cvs.sourceforge.net:/cvsroot/myman", using: :cvs + + bottle do + rebuild 2 + 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 mojave: "1ff1470d676dabb177f06c2683b67da5e70e39bbab28f7457762d4adda5cffb0" + sha256 high_sierra: "b5f0af51ce1098ea35e48bc50f4097cbb9e647989decd6d7791476b062ef7582" + sha256 sierra: "376c71ad2f5abcc0233b3873d70cc963e54ac0ca00a552eceb025ac09b931ff6" + sha256 el_capitan: "d3b66de7eae03edecb2573524d94239bd013ffd57eeb1980411da12f6d2b2b98" + 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..d0ce43013a538 --- /dev/null +++ b/Formula/m/mypaint-brushes.rb @@ -0,0 +1,31 @@ +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" + + 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..b6bd678c39a98 --- /dev/null +++ b/Formula/m/mypy.rb @@ -0,0 +1,51 @@ +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/ce/43/d5e49a86afa64bd3839ea0d5b9c7103487007d728e1293f52525d6d5486a/mypy-1.15.0.tar.gz" + sha256 "404534629d51d3efea5c800ee7c42b72a6554d6c400e6a79eafe15d11341fd43" + license "MIT" + head "https://github.com/python/mypy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "47a46cf281316caa47a3c03130a1dbb302bf9c4b744300d848ebb98e31b936f4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5ed30d04ea17719cff0a7a43dc8f2c038c3e776c1cadf97936203787bb63360d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "60f43861fad3cb704383a97d5ce98829b77a076afe2ba8c0129f7179f3590c6a" + sha256 cellar: :any_skip_relocation, sonoma: "0e578864a81144771caffa814b3334c2fcedd2863a57ae170f02bc432743e6ce" + sha256 cellar: :any_skip_relocation, ventura: "492cdd65beec15229107beca1198e90a9c560138f8c749ddefc5539f392c5ed4" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8765920d1c8270415ec11c3e121512cd97b497f1ba4277bae9a4fd053f91b87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eceba777bfcaf012dcf14739c7899fbfcf08c9b01369a019f0e3d662760db1c0" + end + + depends_on "python@3.13" + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz" + sha256 "75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" + 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 + 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..992355fc3c8d5 --- /dev/null +++ b/Formula/m/mysql++.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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..8814b9fba3a55 --- /dev/null +++ b/Formula/m/mysql-client.rb @@ -0,0 +1,93 @@ +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.3/mysql-9.3.0.tar.gz" + sha256 "1a3ee236f1daac5ef897c6325c9b0e0aae486389be1b8001deb3ff77ce682d60" + license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" } + + livecheck do + formula "mysql" + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "975fd82ddc975521c79adc5b8d91c8fe739e2d4b4f2f7716bb52dfaad32cd8cb" + sha256 arm64_sonoma: "b0f29c9fbf56dd9f36ba0518e6a08fcedd7cf39884a2828a34e3c1b69cf5ac5d" + sha256 arm64_ventura: "20d77f2b858872d0fdfdddc552d0f0c513bdc4e939bfe43eea57a6b47fb7070d" + sha256 sonoma: "418c9c100877a4dae7dd49b6e78c1aafb0db23bcddbf94e522e39a78c8130398" + sha256 ventura: "3529c333d6cc9ca4925f0297a4ed70cf5d41bbcdb3d45dfee4a81bd16b56a8e7" + sha256 arm64_linux: "b7cb2de7878be31f6896f08617393a83d836620192ad20649361c101a48b591f" + sha256 x86_64_linux: "b19afb43de7e7a05235af8abbabec78a12fddac8278079d449cda6824683205e" + 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" + # GCC is not supported either, so exclude for El Capitan. + depends_on macos: :sierra if DevelopmentTools.clang_build_version < 900 + 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@5.7.rb b/Formula/m/mysql-client@5.7.rb new file mode 100644 index 0000000000000..d2d0f7bb362df --- /dev/null +++ b/Formula/m/mysql-client@5.7.rb @@ -0,0 +1,58 @@ +class MysqlClientAT57 < Formula + desc "Open source relational database management system" + homepage "https://dev.mysql.com/doc/refman/5.7/en/" + url "https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.42.tar.gz" + sha256 "7e1a7d45e7ca382eb3a992f63631c380904dd49c89f3382ec950aef01997524f" + + bottle do + sha256 arm64_sonoma: "1bc3efd20113dbe76c87fee1871d171b9c55896b4a89a7ed7d1f235cb518b650" + sha256 arm64_ventura: "223ac8c2302eef56a26c1b76068581df25cfb19b92f2d7b04b281554d515d52d" + sha256 arm64_monterey: "2ff11cb1eaf22ee421580481e1d1101c10b3e22ac670944fcc3630bb9b25d5f9" + sha256 arm64_big_sur: "ff7c8463bdf3a1b1064c82e6da8f8165f12684defcb68d57c4aa48d65045af14" + sha256 sonoma: "a83537cb5e942ece6ede11b1893c0f966204decd173b96fee15c3bd865df4c3f" + sha256 ventura: "d3d0898ebca83a38365b6aa72a31d2ea72ab1727c0ab576c8bf385eb9d8bcd48" + sha256 monterey: "9deda0454a1ab6be155966e328a6e1354bc19859efb35ad470615adf241691e2" + sha256 big_sur: "13a2302e62a0494ce327197bd877a453a7b97299dec4e0547b7d8ee37c3b48bb" + sha256 x86_64_linux: "ef8c64ab59f1df568cc8fb40340358cb69cc5623581f63bfd628db4f0562224a" + end + + keg_only :versioned_formula + + disable! date: "2024-08-01", because: :unsupported + + depends_on "cmake" => :build + depends_on "openssl@1.1" + uses_from_macos "libedit" + + 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", "-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..ea07e357daabd --- /dev/null +++ b/Formula/m/mysql-client@8.0.rb @@ -0,0 +1,74 @@ +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.42.tar.gz" + sha256 "c2aa67c618edfa1bc379107fe819ca8e94cba5d85f156d1053b8fedc88cc5f8f" + license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" } + + livecheck do + formula "mysql@8.0" + end + + bottle do + sha256 arm64_sequoia: "59d43aed334afcda44273940a08e0a60d50228607fbd57965657f25578e3fd61" + sha256 arm64_sonoma: "ced161166185b2f6c1dc0676b771a4d794eb5bcaa85393411993bb7b8c6a31de" + sha256 arm64_ventura: "b18647515429259f046aa0fb49e93929cbed48065d506e6260962b7e4ad87d5e" + sha256 sonoma: "e282d68aadf1142ac6058970a904b323c8483e6a72eda42e987b7078218136d8" + sha256 ventura: "cb190923a14eb844124f48aa292aeb696220f96231dd6be5cac916ea4cb5a7bb" + sha256 arm64_linux: "cf5203c31e25fafe9f5b0663262fcd36abf05be669337ca10a0eedf4bc9deaf8" + sha256 x86_64_linux: "3b94ce7a61aca93ad2c91e7f387231cb490a603e22cb9ed5869a7e7cde2abe25" + end + + keg_only :versioned_formula + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "libfido2" + # GCC is not supported either, so exclude for El Capitan. + depends_on macos: :sierra if DevelopmentTools.clang_build_version < 900 + 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 + -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 + -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..112123fd8f305 --- /dev/null +++ b/Formula/m/mysql-client@8.4.rb @@ -0,0 +1,73 @@ +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.5.tar.gz" + sha256 "53639592a720a719fdfadf2c921b947eac86c06e333202e47667852a5781bd1a" + license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" } + + livecheck do + formula "mysql@8.4" + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "64277d6ec414f92e516089a4e2c6ad176fdb6152a607676392995002149a1a17" + sha256 arm64_sonoma: "43b670624ca50f578df25b7a8fa655bd31e283afa27083018f07d759cb43bfdf" + sha256 arm64_ventura: "630f42abd4c09710dcd37691ed213e84aac2f1ebd10c56023ba1098265694b36" + sha256 sonoma: "2ff98ae96608ebb56f38ffbdccf9583902bf9bf75357d9ff4535814177f9b3c2" + sha256 ventura: "4b163c87cd423182b1ddfd4da72e81ddc3361994d9edd824c9f942164332681b" + sha256 arm64_linux: "8ba67332d9fb971c345746a9765de11e57b08df6b729c5119ab654df230a86e0" + sha256 x86_64_linux: "3f1027c7649a348bc50137d817aa9d119808ab02408431063fc5d71dd58761e6" + end + + keg_only :versioned_formula + + depends_on "bison" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "libevent" + depends_on "libfido2" + # GCC is not supported either, so exclude for El Capitan. + depends_on macos: :sierra if DevelopmentTools.clang_build_version < 900 + 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..85daa743bbe34 --- /dev/null +++ b/Formula/m/mysql-connector-c++.rb @@ -0,0 +1,63 @@ +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.3.0-src.tar.gz" + sha256 "268a6f7f4a6cb59f53dde59623be1559f913a29ec1de81bf0ffccbf780d1b416" + 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_sequoia: "b9fb2e53db8e66e690169f2f2de4b29ff2075256e9c6a3e6b6b5b726eed64987" + sha256 cellar: :any, arm64_sonoma: "ce2e5744046cb1337129d204a5444dd35023a80052caf55da8c49fa7987984e4" + sha256 cellar: :any, arm64_ventura: "d85ecee591ca559101de9fd260f29577b22ece7f9764003b4f70aaaa221eda1f" + sha256 cellar: :any, sonoma: "6b7582900baea050d27da4e7d11c664e6db4fa663b83d0f859b3bd38284aca68" + sha256 cellar: :any, ventura: "3813e6d044a752fb35926e88eb4fcb15a7ef17ceb0255aa384f5e8f1ba576f7b" + sha256 cellar: :any_skip_relocation, arm64_linux: "695e5c79c45aff0ea0f2a7ad5f9d49a6bb8290bacef69e3588e36bf2f8baf4e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57bf19bc54526110f1e05873cf1286d9e90195abc44deb45c648a4de80f7c3a2" + 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..d515e660f8bcb --- /dev/null +++ b/Formula/m/mysql.rb @@ -0,0 +1,264 @@ +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.3/mysql-9.3.0.tar.gz" + sha256 "1a3ee236f1daac5ef897c6325c9b0e0aae486389be1b8001deb3ff77ce682d60" + 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 + + bottle do + sha256 arm64_sequoia: "a1c4bcbfc9cd29ebd827d898ee23fa671d38e53fe38ed941d4de9dc5f2925bab" + sha256 arm64_sonoma: "a85846ee100275d3aff0e1fb367d236efe2f08b01486a4e17d95f44065a99777" + sha256 arm64_ventura: "bbd5331e6cad86f69fd249644870e12298fb7700941c4b442766d6b39ad2efcd" + sha256 sonoma: "246637314ceb5efb5f4df6e8e9548523fd24bf99d2ab2249baf55c990323a083" + sha256 ventura: "e3485cdac165beee6846f57b678938929e2339e80fa83f1f16f152130c1f46b1" + sha256 arm64_linux: "6b3feff6a22a3dc3ebc0b52aa20be21de6c15c4508236e6c2c718c6630f235b0" + sha256 x86_64_linux: "4f4f12f8b6e178121b92995ed4a3153dca966f6c304fc74765066761aa86a56e" + 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@29" + 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", "status", "--vardir=#{buildpath}/mysql-test-vardir" + 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 + + # 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 + s = <<~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 + 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 + + 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@5.7.rb b/Formula/m/mysql@5.7.rb new file mode 100644 index 0000000000000..e52f30ebd5424 --- /dev/null +++ b/Formula/m/mysql@5.7.rb @@ -0,0 +1,195 @@ +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.44.tar.gz" + sha256 "b8fe262c4679cb7bbc379a3f1addc723844db168628ce2acf78d33906849e491" + license "GPL-2.0-only" + revision 1 + + bottle do + sha256 arm64_sonoma: "ca2e5c8b98bd92843578ffeae0e6280d3066afc33c814cb1ba49299fe9285f50" + sha256 arm64_ventura: "c0ff4905882e49d8baf0446652ee9fa6158b00bcd0d17ef2c1a017d0875c5ae5" + sha256 arm64_monterey: "326f59da12d2b0f0c18465085d6539930cb75dc500856e7dd05ecc734b91a3f4" + sha256 sonoma: "8676947218acdace558ac56f01a14c4499963201aa5834041146f8b3efe6eea0" + sha256 ventura: "6e9e12bd8918e60560b4c95f3d3b4135bffba820bcdb7b671e7a43af3e948f5c" + sha256 monterey: "de04d1a5af2794e0ee6ff76f3f17882ce4e8bbe81705483c7bfb799d42227266" + sha256 x86_64_linux: "cf11c67e97a5a88a6788a07e7088f4525979f7eb4192dd41948ddcac6f1016c2" + end + + keg_only :versioned_formula + + # https://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf + disable! date: "2024-08-01", because: :unsupported + + depends_on "cmake" => :build + depends_on "libevent" + depends_on "lz4" + depends_on "openssl@1.1" + depends_on "protobuf" + + uses_from_macos "curl" + uses_from_macos "cyrus-sasl" + uses_from_macos "libedit" + + on_linux do + depends_on "pkgconf" => :build + depends_on "libtirpc" + end + + def datadir + var/"mysql" + end + + # Fixes loading of VERSION file, backported from mysql/mysql-server@51675dd + patch :DATA + + def install + if OS.linux? + # Fix libmysqlgcs.a(gcs_logging.cc.o): relocation R_X86_64_32 + # against `_ZN17Gcs_debug_options12m_debug_noneB5cxx11E' can not be used when making + # a shared object; recompile with -fPIC + ENV.append_to_cflags "-fPIC" + end + + # Fixes loading of VERSION file; used in conjunction with patch + File.rename "VERSION", "MYSQL_VERSION" + + # -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_NUMA=OFF + -DWITH_UNIT_TESTS=OFF + -DWITH_EMBEDDED_SERVER=ON + ] + + args << if OS.mac? + "-DWITH_INNODB_MEMCACHED=ON" # InnoDB memcached plugin build fails on Linux + else + "-DENABLE_DTRACE=0" + end + + 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_r(prefix/"mysql-test") + + # Don't create databases inside of the prefix! + # See: https://github.com/Homebrew/homebrew/issues/4975 + rm_r(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 <<~INI + # Default Homebrew MySQL server config + [mysqld] + # Only allow connections from localhost + 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 + + # 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 + 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 + + 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 + system bin/"mysqld", "--no-defaults", "--initialize-insecure", "--user=#{ENV["USER"]}", + "--basedir=#{prefix}", "--datadir=#{testpath}/mysql", "--tmpdir=#{testpath}/tmp" + port = free_port + fork do + system bin/"mysqld", "--no-defaults", "--user=#{ENV["USER"]}", + "--datadir=#{testpath}/mysql", "--port=#{port}", "--tmpdir=#{testpath}/tmp" + end + sleep 5 + assert_match "information_schema", + shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'") + system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown" + end +end + +__END__ +diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake +index 43d731e..3031258 100644 +--- a/cmake/mysql_version.cmake ++++ b/cmake/mysql_version.cmake +@@ -31,7 +31,7 @@ SET(DOT_FRM_VERSION "6") + + # Generate "something" to trigger cmake rerun when VERSION changes + CONFIGURE_FILE( +- ${CMAKE_SOURCE_DIR}/VERSION ++ ${CMAKE_SOURCE_DIR}/MYSQL_VERSION + ${CMAKE_BINARY_DIR}/VERSION.dep + ) + +@@ -39,7 +39,7 @@ CONFIGURE_FILE( + + MACRO(MYSQL_GET_CONFIG_VALUE keyword var) + IF(NOT ${var}) +- FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=") ++ FILE (STRINGS ${CMAKE_SOURCE_DIR}/MYSQL_VERSION str REGEX "^[ ]*${keyword}=") + IF(str) + STRING(REPLACE "${keyword}=" "" str ${str}) + STRING(REGEX REPLACE "[ ].*" "" str "${str}") + diff --git a/Formula/m/mysql@8.0.rb b/Formula/m/mysql@8.0.rb new file mode 100644 index 0000000000000..cc2dc26587a2c --- /dev/null +++ b/Formula/m/mysql@8.0.rb @@ -0,0 +1,238 @@ +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.42.tar.gz" + sha256 "c2aa67c618edfa1bc379107fe819ca8e94cba5d85f156d1053b8fedc88cc5f8f" + 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 + + bottle do + sha256 arm64_sequoia: "374dcbdffa60dd5a7c01788235ea51faf12c11d8276ed79339c361ada06a77cd" + sha256 arm64_sonoma: "e1450da39223da0f12db39461a164ed9522a087e47a08df96cfb3e55bda4a4b4" + sha256 arm64_ventura: "4e256b2b28f4b9225536419d453c8d38c5129f7a35f275946c022f4dca16f4e1" + sha256 sonoma: "49d14b9e9f9e46b4b1e2dd4d02ecb4129ab28020b67da39500abd8b6a05358a5" + sha256 ventura: "94381480fb745013b9d709cf1463630fb094e2878a5fd6e769690813a16a93b0" + sha256 arm64_linux: "7ccb69ac582f17faee3a17a4ab366fd7ae372fd066801e172d47e181f4a52065" + sha256 x86_64_linux: "93cea0c407ddc6acf6e794315aede77261f9c75bb58dfeb3083e59cadf0ef4f8" + 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@29" + 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", "status", "--vardir=#{buildpath}/mysql-test-vardir" + 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 + + # 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 + 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 -u root + 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 + + 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..aafe5b30dfb1a --- /dev/null +++ b/Formula/m/mysql@8.4.rb @@ -0,0 +1,257 @@ +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.5.tar.gz" + sha256 "53639592a720a719fdfadf2c921b947eac86c06e333202e47667852a5781bd1a" + 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 + + bottle do + sha256 arm64_sequoia: "c87d556622e48fbd47e0be9a7c5de2c9fb5824358c2dd2c897fe4ea2e604878e" + sha256 arm64_sonoma: "a050552d7300ac04971d466c4d04d747a7ff15dbe15a41ab21d9f6bb0d4b92b0" + sha256 arm64_ventura: "8d64b363c45a52693e7b53a9c95a94f9878462c2bd5e3d8505a8ae10759d560e" + sha256 sonoma: "13ef76f34992f0d2c4fc474eced6910b417c242f6568a8dd3a66d08edf56dc04" + sha256 ventura: "6dfd8121bb7fcef0b6381cafddaa2db986e0cd852b68149a22241f562b6c4015" + sha256 arm64_linux: "284529229c8646bee5bb018659f1d796ed309a4115edd212347b18abba80906c" + sha256 x86_64_linux: "0f0eae4f5736c9b2e12e3209c59089c7d7545048c6b513dbfe6ecfc1cc169922" + 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@29" + 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", "status", "--vardir=#{buildpath}/mysql-test-vardir" + 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 + + # 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 + 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 -u root + 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 + + 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..3e59f5cb27b87 --- /dev/null +++ b/Formula/m/mysqltuner.rb @@ -0,0 +1,31 @@ +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.6.0.tar.gz" + sha256 "9ba57ecc616c1791907c1e7befe593fee23315bcff0121adc13dbd62b2553a3c" + license "GPL-3.0-or-later" + head "https://github.com/major/MySQLTuner-perl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4318628650fdf57da48a1c5ed8c9f6f15f7fe6ae5d59dbacfe4121ccc5e25d4c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "74f01fb8c0235b1e38e4fff0977de554aae2f6743be6d6e91c4788e0fc972373" + sha256 cellar: :any_skip_relocation, arm64_ventura: "74f01fb8c0235b1e38e4fff0977de554aae2f6743be6d6e91c4788e0fc972373" + sha256 cellar: :any_skip_relocation, arm64_monterey: "74f01fb8c0235b1e38e4fff0977de554aae2f6743be6d6e91c4788e0fc972373" + sha256 cellar: :any_skip_relocation, sonoma: "20ff3ee36a24a74ef56302b7d61732af0411ae442f20c9d89ff4db4acb38bc29" + sha256 cellar: :any_skip_relocation, ventura: "20ff3ee36a24a74ef56302b7d61732af0411ae442f20c9d89ff4db4acb38bc29" + sha256 cellar: :any_skip_relocation, monterey: "20ff3ee36a24a74ef56302b7d61732af0411ae442f20c9d89ff4db4acb38bc29" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3fc02d373f9e51b493d7f687d282469839e9482f4e0f9161b397226343f09f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74f01fb8c0235b1e38e4fff0977de554aae2f6743be6d6e91c4788e0fc972373" + 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 e0170d88070d3..0000000000000 --- a/Formula/m2c.rb +++ /dev/null @@ -1,54 +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" - license "GPL-2.0" - head "https://git.savannah.nongnu.org/git/m2c.git" - - bottle do - sha256 "41ec9e9d3cb13e9964934a337daf04567b82591aa00dcd37a2bff6211cc98f08" => :catalina - sha256 "aa393a46d4182ad747153a3f7dbd4f8188b35f9677e0fce322ac6d0c5c86fa21" => :mojave - sha256 "86e4297b644fed6095a29cd67885e8c72d3abfcc259e3d19f2692e01b39f44a0" => :high_sierra - sha256 "e98a99fb06c6b72bd0cf11d8369df21e1e9e57253e0a9d63ae8641444079df93" => :sierra - sha256 "4aa6ac4f5fd855f4f84d5577ff6f79495fda9edc2ce5335c64bd96a881975eb0" => :el_capitan - sha256 "67659bd6a5fe922c1b34d5068a5cecbfee1f804e5ff432e32c8682a04029ccac" => :yosemite - sha256 "7bf62153eeb0976851785db04e1319f745709294aa9d0bc99e47ffee3eba1315" => :mavericks - 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 0d601b29c465b..0000000000000 --- a/Formula/m4.rb +++ /dev/null @@ -1,40 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "7a8429bfaf8bac7bd0e31d77ba1344b8ec54edb2c462444febfcc5811d44424c" => :catalina - 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 989a09cbdc324..0000000000000 --- a/Formula/mac-robber.rb +++ /dev/null @@ -1,23 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "cb1d422835804b5ea784a2b9157ae77a0940902771397b235d4ad784b88f961a" => :catalina - 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 9123ec50ccebc..0000000000000 --- a/Formula/mackup.rb +++ /dev/null @@ -1,37 +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.29.tar.gz" - sha256 "2be19200ed93d277dc5ac91bae392a88c1ce31d49181ba5a6ca4e5193333ff29" - license "GPL-3.0" - head "https://github.com/lra/mackup.git" - - bottle do - cellar :any_skip_relocation - sha256 "be195c66e0330cd8cbc4bef06e8be0d919d613774870de537af8b6ef81d22ad2" => :catalina - sha256 "8ee4dc679e9c944d3407febb22b7b0cb59fc2cd45308ffaf637ff0e11bb26604" => :mojave - sha256 "da0ee240b7e1b3626becaea6b66673a58a9c0ec803e6e5da4e4f95672a51879b" => :high_sierra - end - - depends_on "python@3.8" - - 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/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - def install - virtualenv_install_with_resources - end - - test do - system "#{bin}/mackup", "--help" - end -end diff --git a/Formula/macos-trash.rb b/Formula/macos-trash.rb deleted file mode 100644 index 5ea9b8c528e27..0000000000000 --- a/Formula/macos-trash.rb +++ /dev/null @@ -1,29 +0,0 @@ -class MacosTrash < Formula - desc "Move files and folders to the trash" - homepage "https://github.com/sindresorhus/macos-trash" - url "https://github.com/sindresorhus/macos-trash/archive/1.1.0.tar.gz" - sha256 "31c09d385bb50b0f76818a1fe2c850cf56b9575c9fa27ea963cba38dfaba7d04" - head "https://github.com/sindresorhus/macos-trash.git" - - bottle do - cellar :any_skip_relocation - sha256 "5962bfd5851549b6a251dc4b9632794622af126175faec6a4d97468d45de22c6" => :catalina - sha256 "030b17bc67400a3f0873bd6983954fe0b55166b26c764e77b1d8cd1adc1bc1b7" => :mojave - end - - depends_on :xcode => ["11.0", :build] - depends_on :macos => :yosemite - - conflicts_with "trash", :because => "both install a `trash` binary" - conflicts_with "trash-cli", :because => "both install a `trash` binary" - - def install - system "./build" - bin.install "trash" - end - - test do - assert_match version.to_s, shell_output("#{bin}/trash --version") - system "#{bin}/trash", "--help" - end -end diff --git a/Formula/macosvpn.rb b/Formula/macosvpn.rb deleted file mode 100644 index e68ed47954550..0000000000000 --- a/Formula/macosvpn.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Macosvpn < Formula - desc "Create Mac OS VPNs programmatically" - homepage "https://github.com/halo/macosvpn" - url "https://github.com/halo/macosvpn/archive/1.0.2.tar.gz" - sha256 "bcc1ddb7714c1c0030f1cf97c581dd03b30b189ffc33fd1f805dd9d0bd3e0363" - - bottle do - cellar :any_skip_relocation - sha256 "8a2d3103fe6c5c674b9180af8c1c0e15e0583874a3986e84ac3a29cc76227329" => :catalina - sha256 "e31d705b812175220fef63839c6310ae3ee28e2e8d61dc04bdb2972dd970f513" => :mojave - end - - depends_on :xcode => ["11.1", :build] - - def install - xcodebuild "SYMROOT=build" - bin.install "build/Release/macosvpn" - end - - test do - assert_match version.to_s, shell_output("#{bin}/macosvpn version", 2) - end -end diff --git a/Formula/macvim.rb b/Formula/macvim.rb deleted file mode 100644 index cf7dda424292a..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-163.tar.gz" - version "8.2-163" - sha256 "3af72f22b25cf4f94b1b6e27a74d74bdefa8ed1529fe6edec59ae2756b3ca209" - revision 2 - head "https://github.com/macvim-dev/macvim.git" - - bottle do - cellar :any - sha256 "316de5c66d247961309a072307784c1073f650b5fac87af32c67ca80bf62b0c1" => :catalina - sha256 "56c860f1dd98ebe374cf0721bac29e830dfc9665a5fe4f2dd26697d58713f9e1" => :mojave - sha256 "4b67795ddfcf1018ac1f260231f8a534072edbcb7b4ff060296667fd965a0abb" => :high_sierra - end - - depends_on :xcode => :build - depends_on "cscope" - depends_on "lua" - depends_on "python@3.8" - depends_on "ruby" - - conflicts_with "vim", - :because => "vim and macvim both install vi* binaries" - - def install - # Avoid issues finding Ruby headers - ENV.delete("SDKROOT") - - # MacVim doesn't have or require any Python package, so unset PYTHONPATH - ENV.delete("PYTHONPATH") - - # make sure that CC is set to "clang" - ENV.clang - - system "./configure", "--with-features=huge", - "--enable-multibyte", - "--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", - "--disable-sparkle" - 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 = shell_output(Formula["python@3.8"].opt_bin/"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 2b190834c6ec3..0000000000000 --- a/Formula/mad.rb +++ /dev/null @@ -1,41 +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 "adaf5e3453712cd9006f477b8a62982ed198bc621ff153f139ecbb77eff9c4f5" => :catalina - sha256 "8e94986575bc44817f6db6f5c9c777c457c3cadc3124ba57481a0fe9f2da490c" => :mojave - sha256 "a053f1e30d1d04f8c1f472d9b0b243d9572c3e7ff2c3e46a665564021bf37432" => :high_sierra - sha256 "1b48168bf5df9fc66703afc68ad3574b9ceb723fbcbf0f1e84c3c1c18fe6ff92" => :sierra - sha256 "a8a162813aad00169410a8f14a39927028969c914929fafb0685f0eb80075546" => :el_capitan - sha256 "863c71f31ecda8f97effc4dd148564e03219f8ddd162c89e054a7e57623c18c6" => :yosemite - sha256 "7bd46d4da0f695b3a5bcc899b7139f14d11741f2e47d34f21a984f9bab953c81" => :mavericks - 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 c9be8daf4bc83..0000000000000 --- a/Formula/madplay.rb +++ /dev/null @@ -1,41 +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 "06320361fe8d3687b541149a2c26f78b9a251a813ef7ca1ecfe09e6dfd7ec1b9" => :catalina - 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=x86_64 - ] - - 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 bfeb4e3435af8..0000000000000 --- a/Formula/mafft.rb +++ /dev/null @@ -1,25 +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.471-with-extensions-src.tgz" - sha256 "2c4993e9ebdaf4dcc6ea2b0daf30f58cbbe98fdba3e2cfcb46145bb2c62e94ef" - - bottle do - cellar :any_skip_relocation - sha256 "47030809ef8372782fbf5770b2b95057f31bcbf81ead53cb06cb09e2ecbd2f87" => :catalina - sha256 "f7820f8386beaa0b0bfcfccc75bea1563d3b5947e32a0aba5051edb621491026" => :mojave - sha256 "a194f9f065024b846417688c2da31c22c058598880c4fb8ef5369e10299ecf2f" => :high_sierra - end - - 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/mage.rb b/Formula/mage.rb deleted file mode 100644 index 6ee3c3b5a788b..0000000000000 --- a/Formula/mage.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Mage < Formula - desc "Make/rake-like build tool using Go" - homepage "https://magefile.org/" - url "https://github.com/magefile/mage.git", - :tag => "v1.9.0", - :revision => "1c36bf78a98209d91af71354deb001cca75e11fc" - sha256 "e8fdfa30f68c8a90fcadd4e82f49c9136011accabff55e073ea26f5ee4280cf0" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "4b908f4975776815efc1fb7e019ecec36a58e597575f1597fad536ad382c6fa3" => :catalina - sha256 "ac88cd06d100522e8a7af513dd4169706c28f1742dfcf237bf1135836ab045a5" => :mojave - sha256 "4cd5deec2b988ba21b372214ece919ea3cbb0e5bb7413ce7e372b21d34e3dbb1" => :high_sierra - sha256 "568bb7334e6f30d467fdd6d136284dbda53e2ad70279e8f22f5ba99feffdbb34" => :sierra - end - - depends_on "go" - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/magefile/mage").install buildpath.children - cd "src/github.com/magefile/mage" do - system "go", "run", "bootstrap.go" - bin.install buildpath/"bin/mage" - prefix.install_metafiles - end - end - - test do - assert_match "magefile.go created", shell_output("#{bin}/mage -init 2>&1") - assert_predicate testpath/"magefile.go", :exist? - end -end diff --git a/Formula/magic-wormhole.rb b/Formula/magic-wormhole.rb deleted file mode 100644 index ef2fca1836b8d..0000000000000 --- a/Formula/magic-wormhole.rb +++ /dev/null @@ -1,178 +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/d4/62/5e4a86f7c4b111e016577f1b304063ebe604f430db15465ac58b13993608/magic-wormhole-0.12.0.tar.gz" - sha256 "1b0fd8a334da978f3dd96b620fa9b9348cabedf26a87f74baac7a37052928160" - license "MIT" - - bottle do - cellar :any - sha256 "2a7df1e4f3f866733c53a8dc8c6656eeb4634d57386ba8f75d49656582891225" => :catalina - sha256 "8dc8d54c2e161693d905b51710f8111c8d4469c597010f43412f6a169b1318d8" => :mojave - sha256 "3e836c232597424b884bd7cc218bbf0e9c844d13518a3a3af8e3ae190feb788c" => :high_sierra - end - - depends_on "libsodium" - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "autobahn" do - url "https://files.pythonhosted.org/packages/a3/2e/58f68840eef4a6740a41f59c5d3206a76e49993f90c954ae9777b120e09c/autobahn-20.4.1.tar.gz" - sha256 "6d3989e4d8b0e961c9d3bb1fe133099767bbd5080cea21b2bdc2a0a1b4581b2e" - end - - resource "Automat" do - url "https://files.pythonhosted.org/packages/80/c5/82c63bad570f4ef745cc5c2f0713c8eddcd07153b4bee7f72a8dc9f9384b/Automat-20.2.0.tar.gz" - sha256 "7979803c74610e11ef0c0d68a2942b152df52da55336e0c9d58daf1831cbdf33" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - 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/9d/0a/d7060601834b1a0a84845d6ae2cd59be077aafa2133455062e47c9733024/cryptography-2.9.tar.gz" - sha256 "0cacd3ef5c604b8e5f59bf2582c076c98a37fe206b31430d0cd08138aff0986e" - 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/17/b7/ed02060fd1b8c0de361b929355cd26e42ed31bea1a9229d9e7d8bc3b7faa/humanize-2.3.0.tar.gz" - sha256 "98b7ac9d1a70ad62175c8e0dd44beebbd92418727fc4e214468dfb2baa8ebfb5" - end - - resource "hyperlink" do - url "https://files.pythonhosted.org/packages/e0/46/1451027b513a75edf676d25a47f601ca00b06a6a7a109e5644d921e7462d/hyperlink-19.0.0.tar.gz" - sha256 "4288e34705da077fada1111a24a0aa08bb1e76699c9ce49876af722441845654" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "incremental" do - url "https://files.pythonhosted.org/packages/8f/26/02c4016aa95f45479eea37c90c34f8fab6775732ae62587a874b619ca097/incremental-17.5.0.tar.gz" - sha256 "7b751696aaf36eebfab537e458929e194460051ccad279c72b755a167eebd4b3" - 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/88/87/72eb9ccf8a58021c542de2588a867dbefc7556e14b2866d1e40e9e2b587e/pyasn1-modules-0.2.8.tar.gz" - sha256 "905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "PyHamcrest" do - url "https://files.pythonhosted.org/packages/58/05/7b993fabb44ff0b52a90916d96bfd91a65ecf90b8248e72bba325ba8e438/PyHamcrest-2.0.2.tar.gz" - sha256 "412e00137858f04bde0729913874a48485665f2d36fe9ee449f26be864af9316" - 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/0d/1d/6cc4bd4e79f78be6640fab268555a11af48474fac9df187c3361a1d1d2f0/pyOpenSSL-19.1.0.tar.gz" - sha256 "9a24494b2602aaf402be5c9e30a0b82d4a5c67528fe8fb475e3f3bc00dd69507" - end - - resource "service_identity" do - url "https://files.pythonhosted.org/packages/9a/3d/9eb0563e066ea0540cf580695593ab079376e920016d4d1b3ff2fd8abf4b/service_identity-18.1.0.tar.gz" - sha256 "0858a54aabc5b459d1aafa8a518ed2081a285087f349fe3e55197989232e2e2d" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - 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/12/67/e736c012c6c8b4092dd54bb9bdd7737acf9a140a98c58b87c35363d0105d/tqdm-4.45.0.tar.gz" - sha256 "00339634a22c10a7a22476ee946bbde2dbe48d042ded784e4d88e0236eca5d81" - end - - resource "Twisted" do - url "https://files.pythonhosted.org/packages/4a/b4/4973c7ccb5be2ec0abc779b7d5f9d5f24b17b0349e23240cfc9dc3bd83cc/Twisted-20.3.0.tar.bz2" - sha256 "d72c55b5d56e176563b91d11952d13b01af8725c623e498db5507b6614fc1e10" - end - - resource "txaio" do - url "https://files.pythonhosted.org/packages/e7/dd/c0c90b080c3fad0ac8e2382eddbe86591d4fa1a5c1aea652de0adf245fc0/txaio-20.4.1.tar.gz" - sha256 "17938f2bca4a9cabce61346758e482ca4e600160cbc28e861493eac74a19539d" - end - - resource "txtorcon" do - url "https://files.pythonhosted.org/packages/a5/12/4d39a81dd2f60d7c54d2be5484054d668fed27741bee02ebebe55123838a/txtorcon-20.0.0.tar.gz" - sha256 "122cd081786396f57718adda1c1a5eb01b8e9a4832fcd140918b45c10359377a" - end - - resource "zope.interface" do - url "https://files.pythonhosted.org/packages/af/d2/9675302d7ced7ec721481f4bbecd28a390a8db4ff753d28c64057b975396/zope.interface-5.1.0.tar.gz" - sha256 "40e4c42bd27ed3c11b2c983fecfb03356fae1209de10686d03c02c8696a1d90e" - 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 71a7ee224249a..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 - - # 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 614729f5bb894..0000000000000 --- a/Formula/mahout.rb +++ /dev/null @@ -1,50 +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.lua?path=mahout/0.13.0/apache-mahout-distribution-0.13.0.tar.gz" - mirror "https://archive.apache.org/dist/mahout/0.13.0/apache-mahout-distribution-0.13.0.tar.gz" - sha256 "87bdc86e16b5817d6b5a810b94d7389604887f7de9c680f34faaf0cbb8dabf6f" - revision 1 - - head do - url "https://github.com/apache/mahout.git" - depends_on "maven" => :build - end - - bottle :unneeded - - depends_on "hadoop" - depends_on "openjdk" - - def install - ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix - - 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", :JAVA_HOME => ENV["JAVA_HOME"] - 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 e2c6cc575cfdc..0000000000000 --- a/Formula/mailcheck.rb +++ /dev/null @@ -1,25 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "66fa586c21ec0cd9a842fcb99e8bbf822681c8858b864b14aa7d57ea89c47a99" => :catalina - 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 15d787f1646d5..0000000000000 --- a/Formula/mailhog.rb +++ /dev/null @@ -1,175 +0,0 @@ -require "language/go" - -class Mailhog < Formula - desc "Web and API based SMTP testing tool" - homepage "https://github.com/mailhog/MailHog" - license "MIT" - 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 - rebuild 1 - sha256 "e127d4cd9bc97838be1586912d0fa14370062f9f98f901ce0de9faf6c9d4fba4" => :catalina - sha256 "58b7a9427521adeb1f65aa961e7548532c3d2c1141bd167deba8ff031d90d2c9" => :mojave - sha256 "de3accd2587eb597e92b31fcf6dd93e78b0c0e52511680a6354d17d066ed776f" => :high_sierra - 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 - address = "127.0.0.1:#{free_port}" - fork { exec "#{bin}/MailHog", "-ui-bind-addr", address } - sleep 2 - - output = shell_output("curl --silent #{address}") - assert_match "MailHog", output - end -end diff --git a/Formula/mailutils.rb b/Formula/mailutils.rb deleted file mode 100644 index f92ba0219c6d5..0000000000000 --- a/Formula/mailutils.rb +++ /dev/null @@ -1,33 +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.9.tar.gz" - mirror "https://ftpmirror.gnu.org/mailutils/mailutils-3.9.tar.gz" - sha256 "64a16dcdbd08ac3dfcde3b898871e9cfbb604bebfb8d4aa43d68b7ea86aabbf5" - license "GPL-3.0" - - bottle do - sha256 "35f9c47a5686e1d32fbb262cfe107713724968c1803ff514c9af42cc2d0b4814" => :catalina - sha256 "7674dc436a80ad930a23ea27fc5e68cccafa98f1f14ccaa14a67f363cf94a004" => :mojave - sha256 "e498a1ff3f1b8d80dd04425e13b7f74ccd18736743e063315347c242e0b67b79" => :high_sierra - end - - depends_on "gnutls" - depends_on "gsasl" - depends_on "libtool" - depends_on "readline" - - def install - system "./configure", "--disable-mh", - "--prefix=#{prefix}", - "--without-fribidi", - "--without-gdbm", - "--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 918fce6d50651..0000000000000 --- a/Formula/mairix.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - head "https://github.com/rc0/mairix.git" - - bottle do - cellar :any_skip_relocation - sha256 "3c74d81ccb04da6f3fa9f0f734861738f6dcc924bde12dc8055fd73ea1be68ce" => :catalina - 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 94ce0f48f441f..0000000000000 --- a/Formula/make.rb +++ /dev/null @@ -1,50 +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.3.tar.lz" - mirror "https://ftpmirror.gnu.org/make/make-4.3.tar.lz" - sha256 "de1a441c4edf952521db30bfca80baae86a0ff1acd0a00402999344f04c45e82" - license "GPL-3.0" - - bottle do - sha256 "b2cbb6b854495469de4d065825c94540ad3053a1ff7c1832f4eb7781ee6b8231" => :catalina - sha256 "50ac9c7185e08349c35531d8ee30e755713aec340229cab2008ba1a2ceac15c9" => :mojave - sha256 "e7f49884dbeaae3e7ccc9dc3a58fec587c2a594f50314dbc33cde44c6f807f53" => :high_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" - - libexec.install_symlink "gnuman" => "man" - 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" - 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 3ab4ed2f87be0..0000000000000 --- a/Formula/makedepend.rb +++ /dev/null @@ -1,56 +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.6.tar.bz2" - sha256 "d558a52e8017d984ee59596a9582c8d699a1962391b632bec3bb6804bf4d501c" - - bottle do - cellar :any_skip_relocation - sha256 "afe76789b5f01ccfee8cc0d4ffa308015fb5d8791a1d7ce6b2dc1ee4bf2a020f" => :catalina - sha256 "a25fb9fd3ce11f6b98da2c53fad8f046174697087f5f34664999afb9df5f41de" => :mojave - sha256 "0f463e197923867ff9387b2ccd1461d4b410e89205bd3896ae98c5d52679c4c8" => :high_sierra - end - - depends_on "pkg-config" => :build - - resource "xproto" do - url "https://xorg.freedesktop.org/releases/individual/proto/xproto-7.0.31.tar.gz" - mirror "http://xorg.mirrors.pair.com/individual/proto/xproto-7.0.31.tar.gz" - sha256 "6d755eaae27b45c5cc75529a12855fed5de5969b367ed05003944cf901ed43c7" - end - - resource "xorg-macros" do - url "https://xorg.freedesktop.org/releases/individual/util/util-macros-1.19.2.tar.bz2" - mirror "http://xorg.mirrors.pair.com/individual/util/util-macros-1.19.2.tar.bz2" - sha256 "d7e43376ad220411499a79735020f9d145fdc159284867e99467e0d771f3e712" - end - - def install - resource("xproto").stage do - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{buildpath}/xproto" - - # https://github.com/spack/spack/issues/4805#issuecomment-316130729 build fix for xproto - ENV.deparallelize { 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 c9370827aae14..0000000000000 --- a/Formula/makefile2graph.rb +++ /dev/null @@ -1,43 +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" - license "MIT" - head "https://github.com/lindenb/makefile2graph.git" - - bottle do - cellar :any_skip_relocation - sha256 "af7dba0cbb045f067076706310b30c52eddbd6732e60d16017ccbfadd4bc866d" => :catalina - sha256 "5b5cb69a698628af41b3de70146580bbcb2e88a8b6d87d7fe9b4f58a2f2fdfb2" => :mojave - sha256 "51231ed0ef44fd31a10f4ea0a7500570181332786ddd5a8a9a886958ad1b1408" => :high_sierra - sha256 "274ee025c45df9757d608249d64105b9314c8e59fc52a81ad6906f807498b67c" => :sierra - sha256 "ed1939b1b0fd106f3e328e310a887cf454b81481f78fdf57ce75c0480a922d7d" => :el_capitan - sha256 "37aebae489e0f341f80417ec711e5c2817f5b8097c3493dcc11bc754bdd1b1cf" => :yosemite - sha256 "0de3d4a2492797c3259798493e287ac2403f02254c6cfcf74948a16bcc4bcd0d" => :mavericks - 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 "c2a5afff3eee709316951ad70c8244fe5c628ae98fdb2e15ea607c7638733d63" => :catalina - sha256 "16d2135a49e22ffe920567c7ac382d5f706ef7ce5de377750553a0e59414819a" => :mojave - sha256 "c40907f2d30603bdfe8402e90cbb35209b46cee1e7967d0ab06c21d5d7935eb8" => :high_sierra - sha256 "3a673790c42724f75b905713e269f8bfa3e54bb64fde48130164c68b5656c871" => :sierra - sha256 "96f91bccf728f040931c2816156a7c5de739ae91e63191795cd108d0a46370ac" => :el_capitan - sha256 "40c3d4befe2d4625d7013ea40f307b4f5b26e122a6dad51706a25bb22734f075" => :yosemite - sha256 "8c54ce9e5f819dda4eb274f8bf8a22d49e1d0086e33300f236840acf1a46837f" => :mavericks - 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 2a79a338de252..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.05/nsis-3.05-src.tar.bz2" - sha256 "b6e1b309ab907086c6797618ab2879cb95387ec144dab36656b0b5fb77e97ce9" - - bottle do - cellar :any_skip_relocation - sha256 "348b4b8c905eebcb4b981348beace630806e7d22bec5f52c345946c41579a85e" => :catalina - sha256 "5a5d075b298e34c2ac5c0324675f8163cdff0f906d1cb38848640394ff1f66fc" => :mojave - sha256 "d6614f82109ed400dca5a0215d256c522c47480e63fe36196570fec8ad0dcbe8" => :high_sierra - end - - depends_on "mingw-w64" => :build - depends_on "scons" => :build - - resource "nsis" do - url "https://downloads.sourceforge.net/project/nsis/NSIS%203/3.05/nsis-3.05.zip" - sha256 "3280c579b767a27b9bf53c17696cba550aed439d32fac972fe4469c97b198873" - 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 7b11b40fcc0ce..0000000000000 --- a/Formula/makepkg.rb +++ /dev/null @@ -1,51 +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://git.archlinux.org/pacman.git", - :tag => "v5.0.2", - :revision => "0c633c27eaeab2a9d30efb01199579896ccf63c9" - license "GPL-2.0" - head "https://git.archlinux.org/pacman.git" - - bottle do - rebuild 2 - sha256 "fb89c76eb6c2a50b14d2380ad1440b37f96e86f39d5bd60378ab5ac85cd02b08" => :catalina - sha256 "b6606a63e0727072c1016ffa8b60db28de0de67d3b5d3f495aa8d0728b7325c9" => :mojave - sha256 "c8f2f6999669c56b5e40e2608ad1e0adfe2c8eb73f8cef959a229856d21da6ed" => :high_sierra - 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" - depends_on "openssl@1.1" - - uses_from_macos "m4" => :build - uses_from_macos "libxslt" - - 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 004a73dad9ddd..0000000000000 --- a/Formula/makepp.rb +++ /dev/null @@ -1,26 +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 "0dfbbcc3fafad36964f7e4c0820726c9764d89a9b56aa190a5cfd44cd0a53dc8" => :catalina - 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 ac73b4b72a9bb..0000000000000 --- a/Formula/makeself.rb +++ /dev/null @@ -1,24 +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.2.tar.gz" - sha256 "8789312db5e93fc471a1e4fb88ec13227ef63a9c7aad297f3bbf35f9511f8d62" - license "GPL-2.0" - 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 750bf62f50145..0000000000000 --- a/Formula/malbolge.rb +++ /dev/null @@ -1,31 +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 "fc544c2c918c4a4882cf3ea49b28d8e5fdec31637c8f8e4a33874229ac54d6b3" => :catalina - 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 8f1de3b40ce6d..0000000000000 --- a/Formula/mallet.rb +++ /dev/null @@ -1,32 +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" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - 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", :JAVA_HOME => Formula["openjdk"].opt_prefix) - end - - test do - resource("testdata").stage do - system "#{bin}/mallet", "import-file", "--input", "testing.tsv", "--keep-sequence" - assert_equal "seconds", - shell_output("#{bin}/mallet train-topics --input text.vectors " \ - "--show-topics-interval 0 --num-iterations 100 2>&1").split.last - end - end -end diff --git a/Formula/mame.rb b/Formula/mame.rb deleted file mode 100644 index e1d40f281e65d..0000000000000 --- a/Formula/mame.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Mame < Formula - desc "Multiple Arcade Machine Emulator" - homepage "https://mamedev.org/" - url "https://github.com/mamedev/mame/archive/mame0222.tar.gz" - version "0.222" - sha256 "3380b86d1bc5bc09f5bb4099f3833b6fba924a8bd189aac4dab149afba799ce7" - head "https://github.com/mamedev/mame.git" - - bottle do - cellar :any - sha256 "000191564dea106488133ae2ea461996a9c8cd8b8b3a3997374d98e09ddefc3d" => :catalina - sha256 "c0235ae12cd2635ae685b54b29b7d8417790788a2b9c4103abde25dff289d546" => :mojave - sha256 "51713083e7f08faacfb9aa5dc9a758a43915b6466109ccfe994498c83b5b3311" => :high_sierra - end - - depends_on "glm" => :build - depends_on "pkg-config" => :build - depends_on "pugixml" => :build - depends_on "rapidjson" => :build - depends_on "sphinx-doc" => :build - depends_on "flac" - depends_on "jpeg" - depends_on "lua" - # Need C++ compiler and standard library support C++14. - # Build failure on Sierra, see: - # https://github.com/Homebrew/homebrew-core/pull/39388 - depends_on :macos => :high_sierra - depends_on "portaudio" - depends_on "portmidi" - depends_on "sdl2" - depends_on "sqlite" - depends_on "utf8proc" - - def install - inreplace "scripts/src/osd/sdl.lua", "--static", "" - - # Mame's build system genie can't find headers and libraries with version suffix. - ENV.append "CPPFLAGS", "-I#{Formula["lua"].opt_include}/lua" - ENV.append "CPPFLAGS", "-I#{Formula["pugixml"].opt_include}/pugixml-1.9" - ENV.append "LDFLAGS", "-L#{Formula["pugixml"].opt_lib}/pugixml-1.9" - - system "make", "USE_LIBSDL=1", - "USE_SYSTEM_LIB_EXPAT=1", - "USE_SYSTEM_LIB_ZLIB=1", - "USE_SYSTEM_LIB_FLAC=1", - "USE_SYSTEM_LIB_GLM=1", - "USE_SYSTEM_LIB_JPEG=1", - "USE_SYSTEM_LIB_LUA=1", - "USE_SYSTEM_LIB_PORTMIDI=1", - "USE_SYSTEM_LIB_PORTAUDIO=1", - "USE_SYSTEM_LIB_PUGIXML=1", - "USE_SYSTEM_LIB_RAPIDJSON=1", - "USE_SYSTEM_LIB_SQLITE3=1", - "USE_SYSTEM_LIB_UTF8PROC=1" - bin.install "mame64" => "mame" - cd "docs" do - # We don't convert SVG files into PDF files, don't load the related extensions. - inreplace "source/conf.py", "'sphinxcontrib.rsvgconverter'", "" - 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/man-db.rb b/Formula/man-db.rb deleted file mode 100644 index 4fa4b06c3b699..0000000000000 --- a/Formula/man-db.rb +++ /dev/null @@ -1,94 +0,0 @@ -class ManDb < Formula - desc "Unix documentation system" - homepage "https://www.nongnu.org/man-db/" - url "https://download.savannah.gnu.org/releases/man-db/man-db-2.9.3.tar.xz" - mirror "https://download-mirror.savannah.gnu.org/releases/man-db/man-db-2.9.3.tar.xz" - sha256 "fa5aa11ab0692daf737e76947f45669225db310b2801a5911bceb7551c5597b8" - - bottle do - sha256 "1f203de0472712f459bee1b66dc93d4fa0c6fc190bdf467c018319add61a22ff" => :catalina - sha256 "3eb1e906db4927d45eaa4cd26d28bd69cf62eaa94316f32c3f29266d0070a978" => :mojave - sha256 "6827bc87f0ccf3b9e3f04adb8e0aba1d63497291704773bd9f6691d73cf4ee1d" => :high_sierra - end - - depends_on "pkg-config" => :build - - uses_from_macos "groff" - uses_from_macos "zlib" - - resource "libpipeline" do - url "https://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.5.2.tar.gz" - sha256 "fd59c649c1ae9d67604d1644f116ad4d297eaa66f838e3dfab96b41e85b059fb" - end - - def install - resource("libpipeline").stage do - system "./configure", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{buildpath}/libpipeline", - "--enable-static", - "--disable-shared" - system "make" - system "make", "install" - end - - ENV["libpipeline_CFLAGS"] = "-I#{buildpath}/libpipeline/include" - ENV["libpipeline_LIBS"] = "-L#{buildpath}/libpipeline/lib -lpipeline" - - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --disable-cache-owner - --disable-setuid - --program-prefix=g - ] - - system "./configure", *args - - system "make", "CFLAGS=#{ENV.cflags}" - system "make", "install" - - # Symlink commands without 'g' prefix into libexec/bin and - # man pages into libexec/man - %w[apropos catman lexgrog man mandb manpath whatis].each do |cmd| - (libexec/"bin").install_symlink bin/"g#{cmd}" => cmd - end - (libexec/"sbin").install_symlink sbin/"gaccessdb" => "accessdb" - %w[apropos lexgrog man manconv manpath whatis zsoelim].each do |cmd| - (libexec/"man"/"man1").install_symlink man1/"g#{cmd}.1" => "#{cmd}.1" - end - (libexec/"man"/"man5").install_symlink man5/"gmanpath.5" => "manpath.5" - %w[accessdb catman mandb].each do |cmd| - (libexec/"man"/"man8").install_symlink man8/"g#{cmd}.8" => "#{cmd}.8" - end - - # Symlink non-conflicting binaries and man pages - %w[catman lexgrog mandb].each do |cmd| - bin.install_symlink "g#{cmd}" => cmd - end - sbin.install_symlink "gaccessdb" => "accessdb" - - %w[accessdb catman mandb].each do |cmd| - man8.install_symlink "g#{cmd}.8" => "#{cmd}.8" - end - man1.install_symlink "glexgrog.1" => "lexgrog.1" - end - - def caveats - <<~EOS - Commands also provided by macOS have been installed with the prefix "g". - If you need to use these commands with their normal names, you - can add a "bin" directory to your PATH from your bashrc like: - PATH="#{opt_libexec}/bin:$PATH" - EOS - end - - test do - ENV["PAGER"] = "cat" - output = shell_output("#{bin}/gman true") - assert_match "BSD General Commands Manual", output - assert_match "The true utility always returns with exit code zero", output - end -end diff --git a/Formula/man2html.rb b/Formula/man2html.rb deleted file mode 100644 index 2ec4f18169839..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 "760f302a2a8c5178b683688d47e7ec55b17bf85a51ee404b00b2a3eb02030fcb" => :catalina - sha256 "5096761bebb1f08c8eb8bac3e99b35884116086b7e39bf3d3daad3340645ff75" => :mojave - sha256 "9fe2dcdd8c5f344106dfe57db3e70bec51f78594fb2c968f5561506d1bd7dbbe" => :high_sierra - sha256 "ced5194219735226831e611db4247de1affdec0c2e53e813d5c1a7c5d3bce928" => :sierra - sha256 "37bfcf3cab42938fff23a66429872e935b59cf769caf238928bd4acc6544d8d4" => :el_capitan - sha256 "2e3cc12c0e7bc0ae5b194f397874015df1fe6b8a8ab52c6972e17ad992732463" => :yosemite - sha256 "7ebaf5a969df65809220222b69414a51ed06b90601a28fc2ad140955e17febe0" => :mavericks - 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 d5994ed7855f9..0000000000000 --- a/Formula/mandoc.rb +++ /dev/null @@ -1,76 +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.5.tar.gz" - sha256 "8219b42cb56fc07b2aa660574e6211ac38eefdbf21f41b698d3348793ba5d8f7" - head "anoncvs@mandoc.bsd.lv:/cvs", :using => :cvs - - bottle do - sha256 "f408752db9b1ba4cc1fc8f47fdf41e1ade8abbcf243e947938efbbea550006b4" => :catalina - sha256 "78ffbf8bee7e5135ea303bb861f432288f2d48d403d7e932753b1ef962348917" => :mojave - sha256 "3236fdca9fe2cd8cca29d246d9252eaeea8ceeb7d8f5251574c2bc771a841647" => :high_sierra - sha256 "6176fcab59057d2188db3047849f96170bcb2133bfbe1f8c94845895d6a89bec" => :sierra - end - - uses_from_macos "zlib" - - 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/mandown.rb b/Formula/mandown.rb deleted file mode 100644 index 67ab924052954..0000000000000 --- a/Formula/mandown.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Mandown < Formula - desc "Man-page inspired Markdown viewer" - homepage "https://github.com/Titor8115/mandown" - url "https://github.com/Titor8115/mandown/archive/v1.0.1.tar.gz" - sha256 "b014a44b27f921c12505ba4d8dba15487ca2b442764da645cd6d0fd607ef068c" - - bottle do - cellar :any_skip_relocation - sha256 "09ad2e54a3b54c9687580b4499f4c5247dfd2e18fb64230b3c255fbc7df1c5be" => :catalina - sha256 "9186b868866dd17f080343297e145161f3fe6303701a12bd0a47f8ef246f6630" => :mojave - sha256 "acf617ed0300f38b429ed05504c47bb9e403441316d335ae83bf28c18baa63a6" => :high_sierra - end - - uses_from_macos "libxml2" - uses_from_macos "ncurses" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - (testpath/"test.md").write <<~EOS - #Hi from readme file! - EOS - expected_output = <<~EOS - test.md(7) -

Hi from readme file!

- EOS - system "#{bin}/mdn", "-f", "test.md", "-o", "test" - assert_equal expected_output, File.read("test") - end -end diff --git a/Formula/manticoresearch.rb b/Formula/manticoresearch.rb deleted file mode 100644 index b598716f5f9bc..0000000000000 --- a/Formula/manticoresearch.rb +++ /dev/null @@ -1,85 +0,0 @@ -class Manticoresearch < Formula - desc "Open source text search engine" - homepage "https://www.manticoresearch.com/" - url "https://github.com/manticoresoftware/manticoresearch/releases/download/3.4.2/manticore-3.4.2-200410-6903305-release.tar.gz" - version "3.4.2" - sha256 "a5dcdb561db57fd59fab63531eb23f0585f48432ef8be2b94ec6d979d0f35894" - license "GPL-2.0" - version_scheme 1 - head "https://github.com/manticoresoftware/manticoresearch.git" - - bottle do - sha256 "040e35553be1cba6b646bca39b25be32a6ce5cd9e9abcc7be1979d9efcd7649d" => :catalina - sha256 "15c3a9697847baf7879269c99f7590fb1ca07afc528cfeca8ef170a783bf1998" => :mojave - sha256 "f7a83e56c1392ebea74ef19929c7d3f4f29cfb5f4bbe08a36a55395ca3277d40" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "icu4c" => :build - depends_on "libpq" => :build - depends_on "mysql" => :build - depends_on "unixodbc" => :build - depends_on "openssl@1.1" - - conflicts_with "sphinx", :because => "manticoresearch is a fork of sphinx" - - def install - args = %W[ - -DCMAKE_INSTALL_LOCALSTATEDIR=#{var} - -DDISTR_BUILD=macosbrew - ] - mkdir "build" do - system "cmake", "..", *std_cmake_args, *args - system "make", "install" - end - end - - def post_install - (var/"run/manticore").mkpath - (var/"log/manticore").mkpath - (var/"manticore/data").mkpath - end - - plist_options :manual => "searchd --config #{HOMEBREW_PREFIX}/etc/manticore/manticore.conf" - - def plist - <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{opt_bin}/searchd - --config - #{etc}/manticore/manticore.conf - --nodetach - - WorkingDirectory - #{HOMEBREW_PREFIX} - - - EOS - end - - test do - (testpath/"manticore.conf").write <<~EOS - searchd { - pid_file = searchd.pid - binlog_path=# - } - EOS - pid = fork do - exec bin/"searchd" - end - ensure - Process.kill(9, pid) - Process.wait(pid) - end -end diff --git a/Formula/mapcrafter.rb b/Formula/mapcrafter.rb deleted file mode 100644 index e0bd0f1e5997b..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" - license "GPL-3.0" - revision 3 - - bottle do - cellar :any - sha256 "986224321f7be4d777cb1ac012a237535c2cbb44586e86327cf84589fe85c327" => :catalina - 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" - - 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 36da120f7abfe..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.23/mapnik-v3.0.23.tar.bz2" - sha256 "4b1352e01f7ce25ab099e586d7ae98e0b74145a3bf94dd365cb0a2bdab3b9dc2" - license "LGPL-2.1" - revision 3 - head "https://github.com/mapnik/mapnik.git" - - bottle do - cellar :any - sha256 "ba583ea99a13377783c2dabc25c55ccc2d1a296cfb1f52e9a4a08dc82a0b0576" => :catalina - sha256 "5c6ebca702fb213f0ca8a678726a57c54d1b97a48d88d61b90ccfb6bd2b0d605" => :mojave - sha256 "ef6e65090ed5b627874c66ab30e5365ffcd90c7c9b4f810b318113c014b7a528" => :high_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" - - 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 - - # Use Proj 6.0.0 compatibility headers - # https://github.com/mapnik/mapnik/issues/4036 - ENV.append_to_cflags "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" - - 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 c4c72b568bda5..0000000000000 --- a/Formula/mapserver.rb +++ /dev/null @@ -1,78 +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.6.0.tar.gz" - sha256 "12380737ce71d78520ddaad90d1562a7e321436ad78d463923999030a03b4bda" - revision 2 - - bottle do - cellar :any - sha256 "ee13231864abe8d2b12128eb9fb1145ffd919834630c4b42af103af9621024f7" => :catalina - sha256 "2f8f2490d6db00e9a27fbe419c8b0eed2d9de84c7463dfdae5ff29a93452594b" => :mojave - sha256 "538a79844d0921cd40ee505b9935c4b2be686767e978aa38a24fb7f07dcdea4f" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "swig@3" => :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" - depends_on "python@3.8" - - uses_from_macos "curl" - - def install - ENV.cxx11 - - args = std_cmake_args + %w[ - -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_PYTHON=ON - -DWITH_SOS=ON - -DWITH_WFS=ON - ] - args << "-DPYTHON_EXECUTABLE=#{Formula["python@3.8"].opt_bin/"python3"}" - args << "-DPHP_EXTENSION_DIR=#{lib}/php/extensions" - - # Install within our sandbox - inreplace "mapscript/python/CMakeLists.txt" do |s| - s.gsub! "${PYTHON_LIBRARIES}", "-Wl,-undefined,dynamic_lookup" - end - - # 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" - cd "mapscript/python" do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(prefix) - end - end - end - - test do - assert_match version.to_s, shell_output("#{bin}/mapserv -v") - system Formula["python@3.8"].opt_bin/"python3", "-c", "import mapscript" - end -end diff --git a/Formula/mariadb-connector-c.rb b/Formula/mariadb-connector-c.rb deleted file mode 100644 index e3cf78df70231..0000000000000 --- a/Formula/mariadb-connector-c.rb +++ /dev/null @@ -1,34 +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.1.9/mariadb-connector-c-3.1.9-src.tar.gz" - sha256 "108d99bf2add434dcb3bd9526ba1d89a2b9a943b62dcd9d0a41fcbef8ffbf2c7" - head "https://github.com/mariadb-corporation/mariadb-connector-c.git" - - bottle do - sha256 "830dec16151d5d8f7d2c4e3925f9fba5b911d7fe3b9ec07eec23079e0b85293b" => :catalina - sha256 "3ce47f04785021838696176ba2da5b79cf5ed5bd7870531701efc47d2e20cbc4" => :mojave - sha256 "330e6d5f322494e9deaefd46ec3a8604509b5880b08bc125f6e1a164e01933de" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - uses_from_macos "curl" - - conflicts_with "mariadb", :because => "both install `mariadb_config`" - - def install - args = std_cmake_args - args << "-DWITH_OPENSSL=On" - args << "-DOPENSSL_INCLUDE_DIR=#{Formula["openssl@1.1"].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 9bbf27af6285b..0000000000000 --- a/Formula/mariadb-connector-odbc.rb +++ /dev/null @@ -1,40 +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.1.7/mariadb-connector-odbc-3.1.7-ga-src.tar.gz" - sha256 "699c575e169d770ccfae1c1e776aa7725d849046476bf6579d292c89e8c8593e" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "98bfc0e11134fa8958aa38810c9c16eb12bda27f4b319ebf8cb218845bec7a89" => :catalina - sha256 "28fb8b7089115c8be14b968ab3a604f2a3c2642a8592272bc4caf3812b6e25ba" => :mojave - sha256 "84ddb76363d80231117b6a026e1371463478e5d8d15733c0ba786e141c3b8667" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "mariadb-connector-c" - depends_on "openssl@1.1" - depends_on "unixodbc" - - def install - ENV.append_to_cflags "-I#{Formula["mariadb-connector-c"].opt_include}/mariadb" - ENV.append "LDFLAGS", "-L#{Formula["mariadb-connector-c"].opt_lib}/mariadb" - system "cmake", ".", "-DMARIADB_LINK_DYNAMIC=1", - "-DWITH_SSL=OPENSSL", - "-DOPENSSL_ROOT_DIR=#{Formula["openssl@1.1"].opt_prefix}", - "-DWITH_IODBC=0", - *std_cmake_args - - # By default, the installer pkg is built - we don't want that. - # maodbc limits the build to just the connector itself. - # install/fast prevents an "all" build being invoked that a regular "install" would do. - system "make", "maodbc" - system "make", "install/fast" - 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 20998562a7c8f..0000000000000 --- a/Formula/mariadb.rb +++ /dev/null @@ -1,160 +0,0 @@ -class Mariadb < Formula - desc "Drop-in replacement for MySQL" - homepage "https://mariadb.org/" - url "https://downloads.mariadb.com/MariaDB/mariadb-10.4.13/source/mariadb-10.4.13.tar.gz" - sha256 "45bbbb12d1de8febd9edf630e940c23cf14efd60570c743b268069516a5d91df" - license "GPL-2.0" - - bottle do - sha256 "114d02c80a84ce764b21e8b013f053ce0c66198a6530c1c56ca73318993c718e" => :catalina - sha256 "e444515e91d27dd3fb11e923ae81fd87cbd057170419cea061992253ba1ab7c9" => :mojave - sha256 "70e0007bfdaf8a8667b3c0d57f9441db0cc22c55e8dafc666be777f689a0d58e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "groonga" - depends_on "openssl@1.1" - - uses_from_macos "bison" => :build - uses_from_macos "bzip2" - uses_from_macos "ncurses" - uses_from_macos "zlib" - - conflicts_with "mysql", "percona-server", - :because => "mariadb, mysql, and percona install the same binaries" - conflicts_with "mytop", :because => "both install `mytop` binaries" - conflicts_with "mariadb-connector-c", :because => "both install `mariadb_config`" - - 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 - - # Use brew groonga - rm_r "storage/mroonga/vendor/groonga" - - # -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_mariabackup - ].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 - 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" - prune_file = etc/"my.cnf.d/.homebrew_dont_prune_me" - assert_predicate prune_file, :exist?, "Failed to find #{prune_file}!" - end -end diff --git a/Formula/mariadb@10.1.rb b/Formula/mariadb@10.1.rb deleted file mode 100644 index 3b96fbd878d59..0000000000000 --- a/Formula/mariadb@10.1.rb +++ /dev/null @@ -1,159 +0,0 @@ -class MariadbAT101 < Formula - desc "Drop-in replacement for MySQL" - homepage "https://mariadb.org/" - url "https://downloads.mariadb.org/f/mariadb-10.1.45/source/mariadb-10.1.45.tar.gz" - sha256 "9d8f0f71f9613b2028ffc5c5be8b98948ec955eb0d89600d18ed7cc04807dad5" - - bottle do - sha256 "bc23160ad65b005fa2548a15279eba9514a93526c79fdfb311370b5215a1ba9d" => :catalina - sha256 "2ae7f80a01184bd035a51f77be142a3d85d4cc54e9d34a8d02c597d19134da7d" => :mojave - sha256 "0da7b90040d6f28180bd892d7d84fbf37969038d084d106bc2ab03d074ef9ff5" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "groonga" - depends_on "openssl@1.1" - - uses_from_macos "bzip2" - uses_from_macos "ncurses" - - 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 - - # Use brew groonga - rm_r "storage/mroonga/vendor/groonga" - - # -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" - - # Avoid references to the Homebrew shims directory - inreplace bin/"mysqlbug", HOMEBREW_SHIMS_PATH/"mac/super/", "" - - # 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 7657253d485bf..0000000000000 --- a/Formula/mariadb@10.2.rb +++ /dev/null @@ -1,154 +0,0 @@ -class MariadbAT102 < Formula - desc "Drop-in replacement for MySQL" - homepage "https://mariadb.org/" - url "https://downloads.mariadb.org/f/mariadb-10.2.32/source/mariadb-10.2.32.tar.gz" - sha256 "ea4fb28095e1079297eb3ba7ec5e215c641f2dff37964db778f6e9c37e0189b3" - license "GPL-2.0" - - bottle do - sha256 "7cd378e6fe322f9456a119be681cabe358b934019446402a7d7a3ebdf28ea353" => :catalina - sha256 "2768d5d4101ac669ca3a8e5b0dc2fd5d06d630cc4e50afad0c2ad89ee920bdd0" => :mojave - sha256 "c592f1f9da3f224916a046ccadd8d8adfa7f25ad17809114a9128a7395bcc924" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "groonga" - depends_on "openssl@1.1" - - 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 - - # Use brew groonga - rm_r "storage/mroonga/vendor/groonga" - - # -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/mariadb@10.3.rb b/Formula/mariadb@10.3.rb deleted file mode 100644 index 817ff626cfef4..0000000000000 --- a/Formula/mariadb@10.3.rb +++ /dev/null @@ -1,153 +0,0 @@ -class MariadbAT103 < Formula - desc "Drop-in replacement for MySQL" - homepage "https://mariadb.org/" - url "https://downloads.mariadb.org/f/mariadb-10.3.23/source/mariadb-10.3.23.tar.gz" - sha256 "fc405022457d8eec5991b870cc1c9a07b83b551d6165c414c4d8f31523aa86ae" - license "GPL-2.0" - - bottle do - sha256 "4e0414a8ef71a9e4a1c0d46f954500877878fd5d9ecea6b152998966ab063fd0" => :catalina - sha256 "67a130cc71905931aabcb08171153c575d8774a99409eeb3aa2031e37be30276" => :mojave - sha256 "05c3f9c86b6f43935a85d505244be5ac5a70cd45c22752a06912b8d07f86534b" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "groonga" - depends_on "openssl@1.1" - - 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 - - # Use brew groonga - rm_r "storage/mroonga/vendor/groonga" - - # -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_mariabackup - ].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.3/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 100c9abd4b8be..0000000000000 --- a/Formula/markdown.rb +++ /dev/null @@ -1,28 +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 "35864422386d1390de813462b697b604813bc3a7caac7bf3fd172335e25b2a55" => :catalina - 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 823e6dba1ef3e..0000000000000 --- a/Formula/marst.rb +++ /dev/null @@ -1,32 +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" - license "GPL-3.0" - - bottle do - cellar :any - rebuild 1 - sha256 "3d8c6f68d93c04a892934b0b2b9cb071fc6ca53ec2ecc24e725748aa850ee446" => :catalina - 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 2da2667ad0289..0000000000000 --- a/Formula/mas.rb +++ /dev/null @@ -1,42 +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.7.0", - :revision => "35575ff962687cfd9a12f859668cf61d5ea819c2" - license "MIT" - head "https://github.com/mas-cli/mas.git" - - bottle do - cellar :any - sha256 "b985d100947063ee94961f7f1290f232786634b869d20d56bd553197cf91188b" => :catalina - sha256 "c7005c34a3cf38d23f98e9cc238a0deae61f50ea5dfbcf51a34cc689a9db315e" => :mojave - end - - depends_on "carthage" => :build - depends_on :xcode => ["10.2", :build] - - 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 - - # Only build necessary dependencies - system "carthage", "bootstrap", "--platform", "macOS", "Commandant" - system "script/install", prefix - - 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_include shell_output("#{bin}/mas info 497799835"), "Xcode" - end -end diff --git a/Formula/mask.rb b/Formula/mask.rb deleted file mode 100644 index 172c522bc92e2..0000000000000 --- a/Formula/mask.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Mask < Formula - desc "CLI task runner defined by a simple markdown file" - homepage "https://github.com/jakedeichert/mask/" - url "https://github.com/jakedeichert/mask/archive/v0.8.0.tar.gz" - sha256 "cbf660b083d162d0b8edd99fd320b56838dd7444099cf1988104d5b96d4c681b" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "bb0ac6320fe9f43f1730324ff10cad256b92540790aa06b86d992d21d445359d" => :catalina - sha256 "0dc267ba57be2e1bd11ddcb294bbc8561020b8a420cd2178f0e13b65835cc77c" => :mojave - sha256 "278e1f1da1694e4248777f00d8b8270169c1401d99deac0a2344a05fb24f2e30" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - (testpath/"maskfile.md").write <<~EOS - # Example maskfile - - ## hello (name) - - ```sh - printf "Hello %s!" "$name" - ``` - EOS - assert_equal "Hello Homebrew!", shell_output("#{bin}/mask hello Homebrew") - end -end diff --git a/Formula/masscan.rb b/Formula/masscan.rb deleted file mode 100644 index d7a410fdabf43..0000000000000 --- a/Formula/masscan.rb +++ /dev/null @@ -1,31 +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 "480e77a29b46bf529743f0d4e21a8e69d55e41d19bbb4e3b1665d329c8b3e94f" => :catalina - 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.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 87359565e5609..0000000000000 --- a/Formula/massren.rb +++ /dev/null @@ -1,31 +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 "501c6c8684475cb9c83e57917be164e86aeba079fe7ac4523be108b10f2ef545" => :catalina - 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 4befeef207e6b..0000000000000 --- a/Formula/mat2.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Mat2 < Formula - desc "Metadata anonymization toolkit" - homepage "https://0xacab.org/jvoisin/mat2" - url "https://0xacab.org/jvoisin/mat2/-/archive/0.11.0/mat2-0.11.0.tar.gz" - sha256 "c37be119f4bc6226257cd72048bba4eaf3bb24a62fd38c2a34d9b937e6bd36b7" - license "LGPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "34a6c1014ecd99466de27658a669939047ab794d2d6272b483066a52988fb911" => :catalina - sha256 "34a6c1014ecd99466de27658a669939047ab794d2d6272b483066a52988fb911" => :mojave - sha256 "34a6c1014ecd99466de27658a669939047ab794d2d6272b483066a52988fb911" => :high_sierra - end - - depends_on "exiftool" - depends_on "ffmpeg" - depends_on "gdk-pixbuf" - depends_on "librsvg" - depends_on "poppler" - depends_on "py3cairo" - depends_on "pygobject3" - depends_on "python@3.8" - - resource "mutagen" do - url "https://files.pythonhosted.org/packages/96/9f/280220926cabbf4822f80e094a5190fb3df245209648e169c8bcf708697b/mutagen-1.44.0.tar.gz" - sha256 "56065d8a9ca0bc64610a4d0f37e2bd4453381dde3226b8835ee656faa3287be4" - end - - def install - version = Language::Python.major_minor_version Formula["python@3.8"].bin/"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 Formula["python@3.8"].bin/"python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - system Formula["python@3.8"].bin/"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 diff --git a/Formula/math-comp.rb b/Formula/math-comp.rb deleted file mode 100644 index 8cca7bca74222..0000000000000 --- a/Formula/math-comp.rb +++ /dev/null @@ -1,51 +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.11.0.tar.gz" - sha256 "b16108320f77d15dd19ecc5aad90775b576edfa50c971682a1a439f6d364fef6" - head "https://github.com/math-comp/math-comp.git" - - bottle do - cellar :any_skip_relocation - sha256 "544a1e3aabdbf5d276d1365156da0fc345bb98f96572477c78d015534354c5cc" => :catalina - sha256 "56b7c095a4a4fffffab65be91dd6cf217eab04a2831d179469c4e672b2e36654" => :mojave - sha256 "f1e7424619f165819c82f0b201c2dd53c5068c1c415e4da489e2382f4b0e9a21" => :high_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 0b631a610bd3a..0000000000000 --- a/Formula/matlab2tikz.rb +++ /dev/null @@ -1,14 +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" - license "BSD-2-Clause" - 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 1d8df107963a4..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/archive/20200420.tar.gz" - sha256 "eb4ef412d140e19e7d3ce23adb7f8fcce566f44388cfdc8c1e766a3c4b183d3d" - license "Apache-2.0" - 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 c193d6e92196e..0000000000000 --- a/Formula/maven.rb +++ /dev/null @@ -1,62 +0,0 @@ -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.6.3/binaries/apache-maven-3.6.3-bin.tar.gz" - mirror "https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz" - sha256 "26ad91d751b3a9a53087aefa743f4e16a17741d3915b219cf74112bf87a438c5" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - 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, :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - 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 2dba2ce1a1784..0000000000000 --- a/Formula/maven@3.2.rb +++ /dev/null @@ -1,63 +0,0 @@ -class MavenAT32 < Formula - desc "Java-based project management" - homepage "https://maven.apache.org/" - url "https://www.apache.org/dyn/closer.lua?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" - revision 1 - - bottle :unneeded - - keg_only :versioned_formula - - depends_on "openjdk" - - 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, :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - 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 605aba55959cb..0000000000000 --- a/Formula/maven@3.3.rb +++ /dev/null @@ -1,62 +0,0 @@ -class MavenAT33 < Formula - desc "Java-based project management" - homepage "https://maven.apache.org/" - url "https://www.apache.org/dyn/closer.lua?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" - revision 1 - - bottle :unneeded - - keg_only :versioned_formula - - depends_on "openjdk" - - 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, :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - 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 23c19bfc7086b..0000000000000 --- a/Formula/maven@3.5.rb +++ /dev/null @@ -1,62 +0,0 @@ -class MavenAT35 < Formula - desc "Java-based project management" - homepage "https://maven.apache.org/" - url "https://www.apache.org/dyn/closer.lua?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" - revision 1 - - bottle :unneeded - - keg_only :versioned_formula - - depends_on "openjdk" - - 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, :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - 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/mavsdk.rb b/Formula/mavsdk.rb deleted file mode 100644 index 7eeb83cc98ae2..0000000000000 --- a/Formula/mavsdk.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Mavsdk < Formula - desc "API and library for MAVLink compatible systems written in C++11" - homepage "https://mavsdk.mavlink.io/" - url "https://github.com/mavlink/MAVSDK.git", - :tag => "v0.28.0", - :revision => "a9b2416293aad8dee1b6ad0f9d39f7072b1e66b4" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "21ec782d1a4aa1783920a53c924c698fec26e9d42c32042fd66ed11953efb1cd" => :catalina - sha256 "41383056b82b35e21af26de42729fb6a9ea130b6171d225dfb49d834e955751b" => :mojave - sha256 "c3dc48e7f6c46b186c01be66fa5b59ee90050ae76a2692ee99c475cead5c82a9" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", *std_cmake_args, - "-Bbuild/default", - "-DBUILD_BACKEND=ON", - "-H." - system "cmake", "--build", "build/default", "--target", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - mavsdk::Mavsdk mavsdk; - mavsdk.version(); - mavsdk::System& system = mavsdk.system(); - auto info = std::make_shared(system); - return 0; - } - EOS - system ENV.cxx, "-std=c++11", testpath/"test.cpp", "-o", "test", - "-I#{include}/mavsdk", - "-L#{lib}", - "-lmavsdk", - "-lmavsdk_info" - system "./test" - - assert_equal "Usage: backend_bin [-h | --help]", - shell_output("#{bin}/mavsdk_server --help").split("\n").first - end -end diff --git a/Formula/mawk.rb b/Formula/mawk.rb deleted file mode 100644 index 4d15e1ef0c6ba..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-20200120.tgz" - sha256 "7fd4cd1e1fae9290fe089171181bbc6291dfd9bca939ca804f0ddb851c8b8237" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "03f9aa87a079b35b6f93813e4016e85d102c578d8b65f2f967b0b7c5c5d869ad" => :catalina - sha256 "802b3592430ca644c6590acad265f45ac892fe47fb37732e678afac13f8cf1f0" => :mojave - sha256 "d113f78e1c20c8bf86fcf5ce083e206aeca58ee857e7d0a3acb0158d2b01fb45" => :high_sierra - 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 46109598d8e82..0000000000000 --- a/Formula/maxima.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Maxima < Formula - desc "Computer algebra system" - homepage "https://maxima.sourceforge.io/" - url "https://downloads.sourceforge.net/project/maxima/Maxima-source/5.44.0-source/maxima-5.44.0.tar.gz" - sha256 "d93f5e48c4daf8f085d609cb3c7b0bdf342c667fd04cf750c846426874c9d2ec" - - bottle do - cellar :any_skip_relocation - sha256 "f873f22d3e0540feb2a696cb2ec18ca7786742ae2a00faafcce968bbda56e5a9" => :catalina - sha256 "b6d47595e2d411752408890c331efba31819cc006284b849d8473f80dfa12948" => :mojave - sha256 "bb6196d4dafeacd3060782b7d46e32df9281cb8d0c5d4eb5ea280c3531ab0ab3" => :high_sierra - end - - depends_on "gawk" => :build - depends_on "gnu-sed" => :build - depends_on "perl" => :build - depends_on "sbcl" => :build - depends_on "texinfo" => :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-emacs-prefix=#{share}/emacs/site-lisp/#{name}", - "--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 76a26a0e4b8f8..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 "https://maxwells-daemon.io/" - url "https://github.com/zendesk/maxwell/releases/download/v1.27.0/maxwell-1.27.0.tar.gz" - sha256 "e39fc99954b8625a82ea25877f3d15ed21e794b02d730439ee25af4d9f9ea7af" - - 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 98133a1e51d6c..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.16.6-apache.tgz" - sha256 "66455e23a6190a30142cdc1113f7418158839331a9d8e6b0778631d077281770" - license "Apache-2.0" - head "https://github.com/ARMmbed/mbedtls.git", :branch => "development" - - bottle do - cellar :any - sha256 "eda862a92461ba28c8b122dca7264bc81e487735de652b7f15a227de3b7eaa86" => :catalina - sha256 "efb7c341a158a90fce32f24f13d93e0e5b40dbbc6d68f328418f8117005b2b7b" => :mojave - sha256 "dd6c1d8ca7d4156b9c4ac7f39c2f50cb99ce09a64db37d0b4b0341c93d4def49" => :high_sierra - 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 c63afec2d2cd9..0000000000000 --- a/Formula/mbelib.rb +++ /dev/null @@ -1,44 +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 "fb29c40fb9af7c0303d9f7929e61941e8c10c8aad57662f366a671d3a73be116" => :catalina - 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 0eb5d86db5842..0000000000000 --- a/Formula/mboxgrep.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Mboxgrep < Formula - desc "Scan a mailbox for messages matching a regular expression" - homepage "https://datatipp.se/mboxgrep/" - url "https://downloads.sourceforge.net/project/mboxgrep/mboxgrep/0.7.9/mboxgrep-0.7.9.tar.gz" - sha256 "78d375a05c3520fad4bca88509d4da0dbe9fba31f36790bd20880e212acd99d7" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "abf21ae4b879f4a3e4c9c9b3d6640d4a104bb6d640c9f485bfecd261d217ca40" => :catalina - 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 261573ab631a8..0000000000000 --- a/Formula/mcabber.rb +++ /dev/null @@ -1,59 +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 2 - - bottle do - sha256 "4d9680b14dd136a5b1d70f47d8567fcfa7962eb044e43f2f987bb5797b71c74a" => :catalina - sha256 "fe6ea0970c446bab941b3d4f0206e75673e112dff88c55b5ee429d18f0c9fd68" => :mojave - sha256 "55b6b38bfe8d3b924f7eb9b707c3e72324e81d312dd589ec99e283aa567b7ba9" => :high_sierra - sha256 "4be58f58cf92107259a4cc18cf17480dabbeeb130cfc6a182daca0bf76634ac5" => :sierra - 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 5c53e2310930f..0000000000000 --- a/Formula/mcpp.rb +++ /dev/null @@ -1,32 +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 "742a861cb7087caedaed90aa40c4780a1e6e4ad50be74ee64b251c6ae1ebe21c" => :catalina - 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 b78dbae6fe412..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" - license "GPL-3.0" - - bottle do - cellar :any - rebuild 2 - sha256 "c9d3313218375e8bca6e22b00fcb47f11550c386ae64422bb59869af161cf6eb" => :catalina - sha256 "b79e4ba583c523e382d1cc08430c96252c8e048cc1661ab3a9bed90468c8b06c" => :mojave - sha256 "e11c2a7a1caf26c2a1d3d171d3291888e065ba0328f6934882cffcaec72475cd" => :high_sierra - end - - depends_on "mhash" - - uses_from_macos "zlib" - - 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 1653503052a7e..0000000000000 --- a/Formula/md.rb +++ /dev/null @@ -1,36 +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 "919611448c8b0f207aa7c08ca3277b987623f7f17fe31a13c9bc0118f4c27f2b" => :catalina - 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 45cbcd9415df3..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 "d97c8bf86272ad4201cb2050196185f420dc78579266dee86e7f1ac4a7f7eeb7" => :catalina - sha256 "48fe3167c6211f51af6d8c1e39062438a7385e1b136078fbc0215170842ecbbe" => :mojave - sha256 "5f5636f7731398f775d757cb4ae913762f725d4d7bd3060a2640c155207d7a2a" => :high_sierra - sha256 "4ee90230c25f9872541d3f895fbe010765dd2e5449e56a0987e3652f89014916" => :sierra - sha256 "986dad46d2945aac775eb625e41b0236f2413b3924244d5e9aba445994c38687" => :el_capitan - sha256 "227b8b8e4f4dd71972cd02062faefef90515b44ef5c3ce55f5c665cf679a26d1" => :yosemite - sha256 "1bacd45d420975ff8b90d633e361b54c7f6a14776a41f175313360d31fb03ba4" => :mavericks - 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 2edd012e7a0f8..0000000000000 --- a/Formula/md5sha1sum.rb +++ /dev/null @@ -1,41 +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" - revision 1 - - bottle do - cellar :any - sha256 "d498b282ccd1e70d8676184b3eda51eea4e99baacb92e6d69df2fd05a98d511f" => :catalina - sha256 "b1dc1ded1df513c24b7eab764707b088f42661c2cf53395e42ee4e03c245ac5d" => :mojave - sha256 "7ed564b5da0f1adf33c0242bffcd4e456d4e46540b578d3cdb810a9f6a28474b" => :high_sierra - sha256 "66ff4c578f7eff04b561192dd7789e013714caed61dac322df99f5652790abc7" => :sierra - end - - depends_on "openssl@1.1" - - conflicts_with "coreutils", :because => "both install `md5sum` and `sha1sum` binaries" - - def install - openssl = Formula["openssl@1.1"] - 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 dab7786613421..0000000000000 --- a/Formula/mda-lv2.rb +++ /dev/null @@ -1,23 +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.4.tar.bz2" - sha256 "a81a00e19594881174526cd6ee7a3e301236e0ca25191982f5c9af5eb8d96ca8" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "d79b7ac328f0064f2ca3d14b4ddfb7dc999aaf5386f21e7122d239dca72dfbbc" => :catalina - sha256 "852451a5e46cacc35f5ca529d2a9edba3d6874c21e1d0478c46cafcb93c8291a" => :mojave - sha256 "616562cb40d0af01063e188d5d46a505455a947fc93c008b0f0eb6c65d0dd2af" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "lv2" - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf" - system "./waf", "install", "--destdir=#{prefix}" - end -end diff --git a/Formula/mdbook.rb b/Formula/mdbook.rb deleted file mode 100644 index 602973340505a..0000000000000 --- a/Formula/mdbook.rb +++ /dev/null @@ -1,26 +0,0 @@ -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/v0.4.1.tar.gz" - sha256 "48ee2d7102b440dbdb5ecb0849e82368a57777b03f3d6750ac7c47157b1da7ac" - head "https://github.com/rust-lang/mdBook.git" - - bottle do - cellar :any_skip_relocation - sha256 "80e2274cd77ad98d5e3a4b131d3c8b2b190cb1a2711334989413f9c54c2afad8" => :catalina - sha256 "1ccf1f4096e69ee5775c4e9874ae9189784d590d81faa1ace5160c9eda00a646" => :mojave - sha256 "d521821171b2bd636edbdd75b3bb921b68435ca556e335955a32f412329d3264" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - 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/mdbtools.rb b/Formula/mdbtools.rb deleted file mode 100644 index 033c58e77d295..0000000000000 --- a/Formula/mdbtools.rb +++ /dev/null @@ -1,30 +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 3 - - bottle do - cellar :any - sha256 "3c14e11a6603273676d09141b8da9fed42bacd992dbb7d82979c1279ed488ba4" => :catalina - sha256 "7ba58781f1d60f4b5ea1e9af6f75d52be36a7cfec10fef414e1e99d447ad10e5" => :mojave - sha256 "57bc1d0d1df78a20881b0d0340a302ec3a7d359a80eaffe78d809bf4dc150521" => :high_sierra - sha256 "1e1f75dc87ac2f423ecbf993a118220fe8d309ad179ec9986d099b98f959f216" => :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 - - 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 39e06f7104bcc..0000000000000 --- a/Formula/mdcat.rb +++ /dev/null @@ -1,33 +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.20.0.tar.gz" - sha256 "c62e3fbe7461410b72b3fd27dcaa543aa0bec99cbfd78c87aa8fe441972e79ff" - license "MPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "db4b660b7c98bbfad7e97bc49e0202df69dac3af72e3b1186f8e6a715860a1ad" => :catalina - sha256 "70c41663a9c9f77a156eb0b7324d32be397ceef0343c5e42a01bd30e8947e88e" => :mojave - sha256 "ef9bf2c8c6313e379215f70151e5dea9d58ac4837e09fb527162abda85807a07" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "rust" => :build - - on_linux do - depends_on "pkg-config" => :build - end - - def install - system "cargo", "install", *std_cargo_args - 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 975d534d5470c..0000000000000 --- a/Formula/mdds.rb +++ /dev/null @@ -1,57 +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.6.0.tar.bz2" - sha256 "f1585c9cbd12f83a6d43d395ac1ab6a9d9d5d77f062c7b5f704e24ed72dae07d" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "c7415479dc1b23ba867eef310cd265d6813ea9523591a2d30670f3ee20a99923" => :catalina - sha256 "ccfeb176c14e310b913302c74ba30d5973184662e62060ec8eea0f16c931f607" => :mojave - sha256 "ccfeb176c14e310b913302c74ba30d5973184662e62060ec8eea0f16c931f607" => :high_sierra - end - - head do - url "https://gitlab.com/mdds/mdds.git" - - 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 <<~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 ec2e66b88d174..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://deb.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 "ac57f5ffc3e1ac884d74b08dddce518e60f878e627cbfccc7dcb4642c5eb0653" => :catalina - 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 84cafcbe037f4..0000000000000 --- a/Formula/mdk.rb +++ /dev/null @@ -1,63 +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.10/mdk-1.2.10.tar.gz" - mirror "https://ftpmirror.gnu.org/mdk/v1.2.10/mdk-1.2.10.tar.gz" - sha256 "b0f4323a607a3346769499b00fdd6d4748af5a61dd8a24511867ef5d96c08ce7" - revision 2 - - bottle do - sha256 "11d143b7ea88fb34427d08f9755bc62fb5129b577a7a2fcc813c3cacf4c7c644" => :catalina - sha256 "344482a184e612e63d0839e0e254c1c27b44971dcf62dc4cba96fb45a5db4aaf" => :mojave - sha256 "261bdee4241a6db4a361aca51bd4b052fc4686bd9f2ece6b24391c569c1c1558" => :high_sierra - 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 be8f959ad0826..0000000000000 --- a/Formula/mdp.rb +++ /dev/null @@ -1,28 +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" - license "GPL-3.0" - head "https://github.com/visit1985/mdp.git" - - bottle do - cellar :any_skip_relocation - sha256 "4d4430aea06ed48c1284b8a6b064d2e69a8a37cafb27de9ad5c65ce08c4681c4" => :catalina - sha256 "606ffc22ff72a524f46ae683466098409e2db33cb5de58dad6ea179a9390cdbc" => :mojave - sha256 "0bfa062ad64e8da4fa6d1df9be7e8a52da7799f87fc012b80847ac58adf81830" => :high_sierra - sha256 "b38a74964fd0ac22fcbb50eb569b165128799f77a32d582f102278252b6bd291" => :sierra - 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/mdr.rb b/Formula/mdr.rb deleted file mode 100644 index e95a8de7f959f..0000000000000 --- a/Formula/mdr.rb +++ /dev/null @@ -1,28 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "9da0233ef931bc31dff9356e3298f5c838fbbe3422d64cbfa1e3751bd09545d0" => :catalina - sha256 "6dec04545f16f59af2b9b2397d4ebf65c204c827fef52cb20ef81c12d2273cda" => :mojave - sha256 "58d0fa82a0e6291d934bbc3f12f586fbb35282f9d15db017126e042f209dd664" => :high_sierra - sha256 "ef68c4389ee92beeb6c04e1859f398d108ffcce03fe692dd5776f7e12d776672" => :sierra - sha256 "0b522120151f1116ae7e681ff2fb129ecd26486202ca753d6b1de902f6f29334" => :el_capitan - sha256 "7048e71ef8f9a1d5c1712dce6cb33df08029038d771789021a1b8bc1e5f4ad10" => :yosemite - sha256 "b80b64d56e7e77e9b53dd8c308dd50450552b782a72204cb710adf2de28c4f9e" => :mavericks - 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 7c78d4f69586b..0000000000000 --- a/Formula/mdv.rb +++ /dev/null @@ -1,55 +0,0 @@ -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/70/6d/831e188f8079c9793eac4f62ae55d04a93d90979fd2d8271113687605380/mdv-1.7.4.tar.gz" - sha256 "1534f477c85d580352c82141436f6fdba79d329af8a5ee7e329fea14424a660d" - - bottle do - cellar :any_skip_relocation - sha256 "ba336eac38af86dd98d74dbba06226d13b0bc8af719e1e40a863f9f394da4de8" => :catalina - sha256 "ecb421e63e0278668ae2d570c8095186cb3e4695c5ba9891f20d16c2ba3c6e6c" => :mojave - sha256 "3b9847a65d7c9820148cd848687efdb598193cc76abb031c1f71841bad2ec60d" => :high_sierra - end - - depends_on "python@3.8" - - 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 - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/57/6f/213d075ad03c84991d44e63b6516dd7d185091df5e1d02a660874f8f7e1e/tabulate-0.8.7.tar.gz" - sha256 "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007" - 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 2a07b9ca5f405..0000000000000 --- a/Formula/mdxmini.rb +++ /dev/null @@ -1,73 +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 "04b985db291b09f8f1c4a57e522700f9c67eadcd1074faae78ab0e2ff268d9da" => :catalina - 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 c2e4627ff6622..0000000000000 --- a/Formula/mecab-ipadic.rb +++ /dev/null @@ -1,51 +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://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" - - bottle do - cellar :any_skip_relocation - sha256 "90271975d35925136a14f2563e4b5201bed51b5c1fc27249d916676027c1016e" => :catalina - sha256 "30967b4167d34f05c79f185d71a40198fff4067d0cce82aed59383548c898681" => :mojave - sha256 "ef5cf167b05fd74457d5c31a46750450e8f80720ebc705766ee10df6ed41a861" => :high_sierra - sha256 "33f42c18d7347708a56d8846c0bde5c8291b7685ce06b342e96442bca35f6663" => :sierra - sha256 "9f0ae0a62141e3b28807349cb7a9560e36770acb869f4a4e7a54ea1a28ef8ba5" => :el_capitan - sha256 "55703c812de3e7cff503b9cd1eafa0656b3f17c4885165ce4d8e4d2b2356050e" => :yosemite - sha256 "0a9ea36b7cc03f73ae34f72e078b7e84ebe814cf8e1cfbea2d5f876c1893b1c5" => :mavericks - 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 a677df658c5c8..0000000000000 --- a/Formula/mecab-jumandic.rb +++ /dev/null @@ -1,49 +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 "57d02ae309f76a73adeb47ddf1a02afaf21443c4516afadb0a4cb16b0b1a2a79" => :catalina - 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 28eb5fbe23031..0000000000000 --- a/Formula/mecab-ko-dic.rb +++ /dev/null @@ -1,44 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "5c3d0709fbddf74067362680d226f5ecf170ee903532f8d34399b731d188a13d" => :catalina - sha256 "ce481dc10cc5b42ba1aeb863e3fdec5edd69dbf80eb3636a30adbf088c4d0508" => :mojave - sha256 "6e7d71dc788c552a2d2e345ff67aad4a6f5c9078eb776056ccf96dd599c63f52" => :high_sierra - sha256 "68715d65e93b56fa18f70579b515b4e69128777e89c069da9af9ab6dd689bc9e" => :sierra - sha256 "51c5a40a0aad7906cbd83265fbecbc4de3a4f116abceebf9fdb02d17c75f5f69" => :el_capitan - sha256 "92be006bcc8552fdaddf82d21b9f8f528af010128febc721a5a5ba262eca99ce" => :yosemite - sha256 "0c958bf826cd358431f144dfb3d2d3da08c67cda59efe1d2998b54a401678515" => :mavericks - 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 c8f6374e10ac3..0000000000000 --- a/Formula/mecab-ko.rb +++ /dev/null @@ -1,37 +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 "d9655e7122ee6a56194faf5e44062c3bf3c2bf145ba6f8f7b3e6dd1154bf7516" => :catalina - 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 df49f70581adb..0000000000000 --- a/Formula/mecab-unidic-extended.rb +++ /dev/null @@ -1,43 +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 "2624e794b1f765e78dbd593b50b8ea2b3055ede30192694cfc3ed7f5c4eb8a9b" => :catalina - 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 deffeaa15e828..0000000000000 --- a/Formula/mecab-unidic.rb +++ /dev/null @@ -1,46 +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 "f1419955f289e83845d58e3c9932952e2dac7984edad0d85d083c7f281a6558c" => :catalina - 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 9677e97ae61dd..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://deb.debian.org/debian/pool/main/m/mecab/mecab_0.996.orig.tar.gz" - sha256 "e073325783135b72e666145c781bb48fada583d5224fb2490fb6c1403ba69c59" - - bottle do - rebuild 3 - sha256 "dba6306bcd5ddb9a824cb366b5432a036889440f2253634c99410fbb0abe0047" => :catalina - 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 279ba7cf04e54..0000000000000 --- a/Formula/media-info.rb +++ /dev/null @@ -1,51 +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/20.03/MediaInfo_CLI_20.03_GNU_FromSource.tar.bz2" - sha256 "3ea86061ba398c2f57292dc1c844a8962481fb2c8984be424ba6ffa746b83d3e" - - bottle do - cellar :any - sha256 "d2d02196a863e262a5437917d4171ecc0cd6ee04af9aa68afdd91a11c0edfc84" => :catalina - sha256 "f0c39a5f20693be853f15a2424541eb009b539508e5719ceea99f15177613d86" => :mojave - sha256 "43a6de49a3e7ebe1fa462da717c18cc8fae8668d713677cc417d995c37ed37ae" => :high_sierra - end - - depends_on "pkg-config" => :build - - uses_from_macos "curl" - uses_from_macos "zlib" - - 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 5e113a7ae1d23..0000000000000 --- a/Formula/mediaconch.rb +++ /dev/null @@ -1,61 +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" - sha256 "8f8f31f1c3eb55449799ebb2031ef373934a0a9826ce6c2b2bdd32dacbf5ec4c" - revision 1 - - bottle do - cellar :any - sha256 "41a49bbafbffc220f140d8e466f1507757cbe552f8de4ca306217affbf1e6dd5" => :catalina - sha256 "9d59b85fecc5d5caba622fe57358caab23c8ea904954a137b99e66dd4f7fedec" => :mojave - sha256 "d59cfb9ac07ffb7eacc4c7970c38676a3909f0966481b99c745735bf87db7b8e" => :high_sierra - sha256 "fdb3934174a68121357c21d4f0800e8bbbaa6a296f3386ab52e5298fde96a6b6" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "jansson" - depends_on "libevent" - depends_on "sqlite" - - uses_from_macos "curl" - uses_from_macos "libxslt" - - 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 8dd491eae75a0..0000000000000 --- a/Formula/mednafen.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Mednafen < Formula - desc "Multi-system emulator" - homepage "https://mednafen.github.io/" - url "https://mednafen.github.io/releases/files/mednafen-1.24.3.tar.xz" - sha256 "3dea853f784364557fa59e9ba11a17eb2674fc0fb93205f33bdbdaba1da3f70f" - license "GPL-2.0" - - bottle do - sha256 "b0d899239eba87b09c5a14c3cd8b539a8ae251304b5cccefbc192947fb299a19" => :catalina - sha256 "43ad97110859253ce5dde1a3c2d0f947a16afb3f893852d15f055133dd8609e1" => :mojave - sha256 "87a76e8115dbf4f4a4d7b4515e7b3d184f9a34ac916228fc98ac8cd5e1f090c8" => :high_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 3390c5d83ccb8..0000000000000 --- a/Formula/megacmd.rb +++ /dev/null @@ -1,30 +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.016.tar.gz" - sha256 "def4cda692860c85529c8de9b0bdb8624a30f57d265f7e70994fc212e5da7e40" - head "https://github.com/t3rm1n4l/megacmd.git" - - bottle do - cellar :any_skip_relocation - sha256 "80a5775ff5e5fe1e958cc6345a2d53f13e37bf366c7f4c8f3033f218851de813" => :catalina - sha256 "e7612192a4ac2e79363d8441f7d0f007c319a5aafd8e4f56e805335cbfa72d21" => :mojave - sha256 "02e75c7bbada7c3b3a230f3395448ec1dfb8598e7053ac6ad6a2b0b2f264d9ad" => :high_sierra - sha256 "8f60fb2783c1481f086e401e7cbfb2ada3a6e82a35e6d2e1a24643a7c7d8453f" => :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 ba2275bdf909d..0000000000000 --- a/Formula/megatools.rb +++ /dev/null @@ -1,38 +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.3.tar.gz" - sha256 "8dc1ca348633fd49de7eb832b323e8dc295f1c55aefb484d30e6475218558bdb" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "88c7b8cf60517507c7d6e7d9709b53bca671d949c7363c117e27ffb7d860f855" => :catalina - sha256 "21844a1f366aec458b92ad00debef361388aca790bdd43583ebe51df22e7f68d" => :mojave - sha256 "0f295ea8f68a858f114ef09bd4f53b82c5a401664e16beee28af7cca2d1aef5c" => :high_sierra - end - - depends_on "asciidoc" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "glib-networking" - depends_on "openssl@1.1" - - uses_from_macos "curl" - - 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/meilisearch.rb b/Formula/meilisearch.rb deleted file mode 100644 index 11a4ca48a7ad6..0000000000000 --- a/Formula/meilisearch.rb +++ /dev/null @@ -1,61 +0,0 @@ -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/v0.12.0.tar.gz" - sha256 "69dc0492083b26c365954b9d65d8c3f601b6b4b11a45f789a70e2413b82a8429" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "e4da6b5e4f556b575af454d45e5879e2138c70424ad57aa28092a4b61c013ff9" => :catalina - sha256 "cc03a32a747f4a592cc674b70076c7aa8b3562b5e245e50c8725495d14d8c5aa" => :mojave - sha256 "1b436742cf77b5ba7bfce1ff772e0642a9015b2f057c0fc32a3603ebe2f1a80a" => :high_sierra - end - - depends_on "rust" => :build - - def install - cd "meilisearch-http" do - system "cargo", "install", *std_cargo_args - end - end - - plist_options :manual => "meilisearch" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/meilisearch - --db-path - #{var}/meilisearch/data.ms - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/meilisearch.log - StandardOutPath - #{var}/log/meilisearch.log - - - EOS - end - - test do - port = free_port - fork { exec bin/"meilisearch", "--http-addr", "127.0.0.1:#{port}" } - sleep(3) - output = shell_output("curl -s 127.0.0.1:#{port}/version") - assert_match version.to_s, output - 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 39f2e71587e8f..0000000000000 --- a/Formula/memcached.rb +++ /dev/null @@ -1,57 +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.6.6.tar.gz" - sha256 "908f0eecfa559129c9e44edc46f02e73afe8faca355b4efc5c86d902fc3e32f7" - head "https://github.com/memcached/memcached.git" - - bottle do - cellar :any - sha256 "e942aa7a5eb09af40e100d242a5f65a7caffa077b7aecd2b94b4e81ce5f9c3ff" => :catalina - sha256 "72ea783ac973864336ac1b7652475edeb523ce716e66ae4d6f745956429a66f5" => :mojave - sha256 "47b162f67655a7cc95a706d5df0df04408038d82e4a859cd747b28590921c175" => :high_sierra - end - - depends_on "libevent" - - def install - system "./configure", "--prefix=#{prefix}", "--disable-coverage", "--enable-tls" - 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" - system bin/"memcached", "--listen=localhost:#{free_port}", "--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 e4f6379a37c3a..0000000000000 --- a/Formula/memcacheq.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Memcacheq < Formula - desc "Queue service for memcache" - homepage "https://code.google.com/archive/p/memcacheq/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/memcacheq/memcacheq-0.2.0.tar.gz" - sha256 "b314c46e1fb80d33d185742afe3b9a4fadee5575155cb1a63292ac2f28393046" - revision 4 - - bottle do - cellar :any - sha256 "214615ae51f807fb4a2990c337545be6376b74741467e91faaff57fb49008ea0" => :catalina - sha256 "3a41379223936c7802a6df61454f70cb14fb6df6ae43e46d32fea87b1194c11b" => :mojave - sha256 "8e519465f17eadf1db20439176d6d4c120572ca700e3c6d33706df73788f88f7" => :high_sierra - sha256 "89f6b5b9085f13f38bacdff51c0082dc17ec992bc8c5366ebfd38542d91d5703" => :sierra - 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 c462ba51f44ca..0000000000000 --- a/Formula/memtester.rb +++ /dev/null @@ -1,31 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "8f2029ec6a035a7c0316410340114f6a954e3c423a08d928b956dd168bc271fe" => :catalina - sha256 "03b5970aafd201b0959c2ea339a1aa0cc97895e63707f3a441a5c9e3af8e9ace" => :mojave - sha256 "4c4e1dc949d00a6cd7728c5cc8502c81e2f7fb4bb6859bc3f87f6835928cbc70" => :high_sierra - sha256 "46f00de9e84e9c3b57533c7b16ef6410add54f13bc9af39a39dcce37d4b78751" => :sierra - sha256 "e9acbfc46d698da87473227fe344e9999642212289f8365dd4485bc52ce55238" => :el_capitan - sha256 "fc38d748b19b83c69547ab95bae6adce7009d14b6b21668e20417e7596691c6e" => :yosemite - sha256 "e2690d42f2744e37e9f0e119736653a92d0d1be2d10aed7ebc7364dad0eeb640" => :mavericks - 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 407991e228bfe..0000000000000 --- a/Formula/menhir.rb +++ /dev/null @@ -1,45 +0,0 @@ -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/20200624/menhir-20200624.tar.bz2" - sha256 "2c436b29f2374566f5e63cb32033a47106c37b625ce45be8ade6857ee6ef0130" - - bottle do - cellar :any - sha256 "1d8fe51d871a8ceb81aa9fd8ab2f6afe52827fd1fb9f44920db00d44013c9612" => :catalina - sha256 "143e14a2c00f6b0ca8749c86d3c90da34f1a86b82c777aa0ecd10fd8287a9146" => :mojave - sha256 "47f172389fa83b5c27cb50dff49253566dfe992e058a32d656c91733c87ac947" => :high_sierra - 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_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 914b96ebe2b64..0000000000000 --- a/Formula/mercurial.rb +++ /dev/null @@ -1,66 +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-5.4.2.tar.gz" - sha256 "5c8b93da701ee39e312da9e35a7f3163e17ed173a4707857bc467c3b3ab74853" - license "GPL-2.0" - - bottle do - sha256 "4442d9b0fb15881077b1db6c4a16b371e4bc2f154de1ed81a11e9a41ee679077" => :catalina - sha256 "88e37b6acefc5dd471484482bdb6f4f12b7fa44621cd11233176b08facc2648b" => :mojave - sha256 "8419bbee00d870653b44dbf144b8509e1a8db22e5c8560624ddf596aa7d6d47b" => :high_sierra - end - - depends_on "python@3.8" - - def install - ENV["HGPYTHON3"] = "1" - - system "make", "PREFIX=#{prefix}", "PYTHON=python3", "install-bin" - - # Install chg (see https://www.mercurial-scm.org/wiki/CHg) - cd "contrib/chg" do - system "make", "PREFIX=#{prefix}", "PYTHON=python3", "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 52127af4fcb80..0000000000000 --- a/Formula/mercury.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Mercury < Formula - desc "Logic/functional programming language" - homepage "https://mercurylang.org/" - url "https://dl.mercurylang.org/release/mercury-srcdist-20.06.tar.gz" - sha256 "b9c6965d41af49b4218d2444440c4860630d6f50c18dc6f1f4f8374d114f79be" - - bottle do - cellar :any - sha256 "8a643b7f50072e004089659525f9e08b05fdecbc031db32d591dbd4aa1fa110d" => :catalina - sha256 "f343d99ebc86c3eecff969e744fbea6e90400884650781bda85984978dfb6848" => :mojave - sha256 "6ec1305a6b2c81e8bc0c8c57aaeeace93a600e01913794d83ac3420c69959456" => :high_sierra - end - - depends_on "openjdk" - - def install - args = ["--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}"] - - system "./configure", *args - - system "make", "install", "PARALLEL=-j" - - # 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", "-o", "hello_c", "hello" - assert_predicate testpath/"hello_c", :exist? - - assert_equal test_string, shell_output("#{testpath}/hello_c") - - system "#{bin}/mmc", "--grade", "java", "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 49449501579c4..0000000000000 --- a/Formula/mergelog.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "41acae4f1614c4ba0a3ea3e05bb88c150c930a07c50560df1d4bfc4a49c9bdf1" => :catalina - 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 aec80ce824f80..0000000000000 --- a/Formula/mergepbx.rb +++ /dev/null @@ -1,44 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "afb3b3ce84c58a241b7c96e81068851273d1fdd31403737a13ae1e75ba57240f" => :catalina - 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 175e4f1098da4..0000000000000 --- a/Formula/mesa.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Mesa < Formula - desc "Graphics Library" - homepage "https://www.mesa3d.org/" - url "https://archive.mesa3d.org/mesa-20.1.3.tar.xz" - sha256 "9872b8d46bee822177ffbe4292addff7bdb84cefc1fe776b8e6b2881a8362bf1" - head "https://gitlab.freedesktop.org/mesa/mesa.git" - - bottle do - cellar :any - sha256 "0ca7669cebc82d5b59c9a41d1f9b5ebc9e07215e9297b7f7bad32f92182e920e" => :catalina - sha256 "2e70646a569df862685e6daabb723a83dae64b59d0ee2e26441c70f69948fdc5" => :mojave - sha256 "6827b0ade68f0cffc757741b9a9c735a76a357fe42a1231510d9bf6f284fe12d" => :high_sierra - end - - depends_on "meson-internal" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "freeglut" => :test - depends_on "expat" - depends_on "gettext" - - resource "Mako" do - url "https://files.pythonhosted.org/packages/72/89/402d2b4589e120ca76a6aed8fee906a0f5ae204b50e455edd36eda6e778d/Mako-1.1.3.tar.gz" - sha256 "8195c8c1400ceb53496064314c6736719c6f25e7479cd24c77be3d9361cddc27" - end - - resource "gears.c" do - url "https://www.opengl.org/archives/resources/code/samples/glut_examples/mesademos/gears.c" - sha256 "7df9d8cda1af9d0a1f64cc028df7556705d98471fdf3d0830282d4dcfb7a78cc" - end - - def install - python3 = Formula["python@3.8"].opt_bin/"python3" - xy = Language::Python.major_minor_version python3 - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python#{xy}/site-packages" - - resource("Mako").stage do - system python3, *Language::Python.setup_install_args(buildpath/"vendor") - end - - resource("gears.c").stage(pkgshare.to_s) - - mkdir "build" do - system "meson", *std_meson_args, "..", "-Dbuildtype=plain", "-Db_ndebug=true", - "-Dplatforms=surfaceless", "-Dglx=disabled" - system "ninja" - system "ninja", "install" - end - end - - test do - flags = %W[ - -framework OpenGL - -I#{Formula["freeglut"].opt_include} - -L#{Formula["freeglut"].opt_lib} - -lglut - ] - system ENV.cc, "#{pkgshare}/gears.c", "-o", "gears", *flags - end -end diff --git a/Formula/mesalib-glw.rb b/Formula/mesalib-glw.rb deleted file mode 100644 index fc171717296e9..0000000000000 --- a/Formula/mesalib-glw.rb +++ /dev/null @@ -1,26 +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 "53d9e0afd006865c0030300392ec85eb24f55ce2457e6a44c3b83582a1227649" => :catalina - 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 086217d12eaf6..0000000000000 --- a/Formula/meson-internal.rb +++ /dev/null @@ -1,55 +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" - license "Apache-2.0" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "2081b7b2d37614f170b2b55855d77bd2788922a02103da66f2d0d33952541a3f" => :catalina - sha256 "c00f702a075153263b34ade26d43a9a3a98673b6b8d30ce7d17e36581b16f2bf" => :mojave - sha256 "e5c4655a955250b17edc8fbd17a3bd56b5a99d1fc34db303f2bfa684a2c76167" => :high_sierra - 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@3.8" - - # 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 dbfd1d05114ea..0000000000000 --- a/Formula/meson.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Meson < Formula - desc "Fast and user friendly build system" - homepage "https://mesonbuild.com/" - url "https://github.com/mesonbuild/meson/releases/download/0.54.3/meson-0.54.3.tar.gz" - sha256 "f2bdf4cf0694e696b48261cdd14380fb1d0fe33d24744d8b2df0c12f33ebb662" - license "Apache-2.0" - revision 1 - head "https://github.com/mesonbuild/meson.git" - - bottle do - cellar :any_skip_relocation - sha256 "e7f74e33b1d750fe1ae058a507fb029a2b01d94cafdad0c87ccd04de478f3e40" => :catalina - sha256 "6cfc8a50d28eb418dd6c203ffba8554e530a09f84d7376c33080b5b9e5286b01" => :mojave - sha256 "e7f74e33b1d750fe1ae058a507fb029a2b01d94cafdad0c87ccd04de478f3e40" => :high_sierra - end - - depends_on "ninja" - depends_on "python@3.8" - - def install - version = Language::Python.major_minor_version Formula["python@3.8"].bin/"python3" - ENV["PYTHONPATH"] = lib/"python#{version}/site-packages" - - system Formula["python@3.8"].bin/"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 3a86471c9d3b9..0000000000000 --- a/Formula/mesos.rb +++ /dev/null @@ -1,157 +0,0 @@ -class Mesos < Formula - desc "Apache cluster manager" - homepage "https://mesos.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=mesos/1.8.1/mesos-1.8.1.tar.gz" - mirror "https://archive.apache.org/dist/mesos/1.8.1/mesos-1.8.1.tar.gz" - sha256 "583f2ad0de36c3e3ce08609a6df1a3ef1145e84f453b3d56fd8332767c3a84e7" - revision 1 - - bottle do - sha256 "c128f8863bce7aa677dd4a5702c7133637336c9c8761c915e34a1eb3351e2cf1" => :catalina - sha256 "8c2bd9e66b055b83b6acbfcde4664b06387691fccc35fdd46974fb68bc863163" => :mojave - sha256 "b58e9a2208f2f018c4e54cd573ff43494bf653a72dd5bde269a5f84301d7369c" => :high_sierra - end - - depends_on "maven" => :build - depends_on "apr-util" - depends_on :java => "1.8" - depends_on :macos # Due to Python 2 - depends_on "subversion" - - conflicts_with "nanopb-generator", :because => "they depend on an incompatible version of protobuf" - conflicts_with "rapidjson", :because => "mesos installs a copy of rapidjson headers" - - 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 - - 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. - ENV["ac_have_clock_syscall"] = "no" if MacOS.version == "10.11" && MacOS::Xcode.version >= "8.0" - - # 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 - ln_s buildpath/"protobuf/lib/python2.7/site-packages/google/apputils", "google/apputils" if r == "protobuf" - 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 2db93608e1192..0000000000000 --- a/Formula/metabase.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Metabase < Formula - desc "Business intelligence report server" - homepage "https://www.metabase.com/" - url "https://downloads.metabase.com/v0.35.4/metabase.jar" - sha256 "a839b608d19701047aac6fcf2d61dc74d9734cf9488d69c9540ec148daccefd5" - - 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 8bb330ebe674a..0000000000000 --- a/Formula/metaproxy.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Metaproxy < Formula - desc "Z39.50 proxy and router utilizing Yaz toolkit" - homepage "https://www.indexdata.com/resources/software/metaproxy" - url "http://ftp.indexdata.dk/pub/metaproxy/metaproxy-1.17.1.tar.gz" - sha256 "61ba411cadf7c2689cfa120568bed666a68cfb5efacdec488e054d3ef4f30177" - - bottle do - cellar :any - sha256 "a209d1ac13cb8014558068155a556301ea9dd5067e69e6a986b9128070246628" => :catalina - sha256 "8f4f2416e154d2e7f877dc68ce9dea75a26b0b3fa5f178cd0ff62dd7e50d5419" => :mojave - sha256 "6cce930bf3e212fbaaab5cb521c3417474719e1289fbd7db9b2117fa943fc9a9" => :high_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 80784a16244fd..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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "792f1b46b5f17933b21ec7adb62cf0b6add03ef94e8a73e5e691e12e9aa85049" => :catalina - sha256 "4629398ca4b1bf5cf7779b8d5c9e6f066ea5e96f66063c265f0b13e106a0cba0" => :mojave - sha256 "05387acf4adf651aaa011d02f5a08ddf49725a550440cc7eb496c1112166852b" => :high_sierra - sha256 "14fc35b7b932170333d8260b8bda881844ffc68870aeb1a120ebd74072ef900c" => :sierra - sha256 "209c4c475fa58cb42a2e98bd34c11a983463465ce4ee5470474177d6740fb2e5" => :el_capitan - end - - depends_on "cmake" => :build - - 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 995a67aa34f06..0000000000000 --- a/Formula/metis.rb +++ /dev/null @@ -1,37 +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 "b410b124973bf31beb58806d4050b8dda1fb3dca679fc3443514025200fd4a37" => :catalina - 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 76100ad6eeaab..0000000000000 --- a/Formula/metricbeat.rb +++ /dev/null @@ -1,98 +0,0 @@ -class Metricbeat < Formula - desc "Collect metrics from your systems and services" - homepage "https://www.elastic.co/products/beats/metricbeat" - url "https://github.com/elastic/beats.git", - :tag => "v7.8.0", - :revision => "f79387d32717d79f689d94fda1ec80b2cf285d30" - head "https://github.com/elastic/beats.git" - - bottle do - cellar :any_skip_relocation - sha256 "94061562ce2b364c8cb894b7bcf4cc284212889075c59e8b93290a83b7be2898" => :catalina - sha256 "f36ff6afe301d299a897d70fd975646bb8ee7a679e385cb81acf7a84a164cf44" => :mojave - sha256 "a05f7d01d0c9ed964e737231d7af4285e25a887ea1986d87ba64f81519367d69" => :high_sierra - end - - depends_on "go" => :build - depends_on "python@3.8" => :build - - def install - # remove non open source files - rm_rf "x-pack" - - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/elastic/beats").install buildpath.children - ENV.prepend_path "PATH", buildpath/"bin" # for mage (build tool) - - cd "src/github.com/elastic/beats/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 "make", "mage" - system "mage", "-v", "build" - ENV.deparallelize - system "mage", "-v", "update" - - (etc/"metricbeat").install Dir["metricbeat.*", "fields.yml", "modules.d"] - (libexec/"bin").install "metricbeat" - prefix.install "build/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 - - fork do - exec bin/"metricbeat", "-path.config", testpath/"config", "-path.data", - testpath/"data" - end - - sleep 30 - assert_predicate testpath/"data/metricbeat", :exist? - end -end diff --git a/Formula/mfcuk.rb b/Formula/mfcuk.rb deleted file mode 100644 index 7a0ff5c0f8abe..0000000000000 --- a/Formula/mfcuk.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - revision 1 - - bottle do - cellar :any - sha256 "c9191edf0484422fa432827e017d05d4854cde1fd8194a3735eec0e060884652" => :catalina - sha256 "2540f3232f4220dac3cf296c43fea2f2582c71ab18037e9d0c047c4f1df39f71" => :mojave - sha256 "f624f03ed0674915332412b50d0013a9495aece4b1ef773767024d11b8fd0d8c" => :high_sierra - 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 06352cae0a549..0000000000000 --- a/Formula/mfoc.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - revision 1 - - bottle do - cellar :any - sha256 "14c431c29b0b0e746d1533606ab13097a84b853c13d4399672027cf9256dad32" => :catalina - sha256 "ff9f6c43ef70b8ae6fee40c43cf5f0acd6f72acd5507874e75d82703aeed5fc3" => :mojave - sha256 "83a0236f5971e007e67e620730d458f8dcdcb7ff7770cc97c07407a771dbf69a" => :high_sierra - 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 248aa5230cb1d..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" - license "GPL-3.0" - revision 2 - - bottle do - cellar :any - sha256 "1c9230a17ab7102f4b171e37a972ade6c7e2d5708102a17ea5494be0b1d1a42e" => :catalina - sha256 "2b4c61222b70b25c523c6083efd85ff53f1187a6afd7d88115f12cb788fa6b13" => :mojave - sha256 "c481733fcc5f8057aac9fa38d5445a88e6faf54a016533bcc72eba2335d9754b" => :high_sierra - 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@1.1" - - def install - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@1.1"].opt_include}" - ENV.prepend "LDFLAGS", "-L#{Formula["openssl@1.1"].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 9d83b8fb04bb3..0000000000000 --- a/Formula/mftrace.rb +++ /dev/null @@ -1,42 +0,0 @@ -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" - mirror "https://dl.bintray.com/homebrew/mirror/mftrace-1.2.20.tar.gz" - sha256 "626b7a9945a768c086195ba392632a68d6af5ea24ef525dcd0a4a8b199ea5f6f" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "175bd6e04490a7aa2bc79be8057c5708eb4fd8ec36c521e111bb5dd33b472725" => :catalina - sha256 "de07330354ae8048feccc55e6ad551a13fedc82408718d33c5b93a96aff4ab0b" => :mojave - sha256 "90e60837a6d4c750d0634ff3bfc84b373b6c89a1deaa4792c82e94f52e06c072" => :high_sierra - end - - head do - url "https://github.com/hanwen/mftrace.git" - depends_on "autoconf" => :build - end - - depends_on "fontforge" - depends_on "potrace" - depends_on "python@3.8" - 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 - buildpath.install resource("manpage") if build.stable? - 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 8446bcd02d207..0000000000000 --- a/Formula/mg.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Mg < Formula - desc "Small Emacs-like editor" - homepage "https://github.com/ibara/mg" - url "https://github.com/ibara/mg/releases/download/mg-6.7/mg-6.7.tar.gz" - sha256 "02583d90df743e994fb1e411befbd23488fd1eaeb82c9db1fd4957d1a8f1abde" - version_scheme 1 - - bottle do - cellar :any_skip_relocation - sha256 "44271237cfb495988cd88029e0ac465a46e14bdb583ac09c1acdf73f95bd4fc4" => :catalina - sha256 "ac5ac7054d3feb7aaef8746482678e66380893958299a36eeff1101cfa407d92" => :mojave - sha256 "dfff27703d404052738009ab8c19a6d94b3a784c346962001eb80fa5cd9de4c4" => :high_sierra - end - - 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 a540ffc104c49..0000000000000 --- a/Formula/mgba.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Mgba < Formula - desc "Game Boy Advance emulator" - homepage "https://mgba.io/" - url "https://github.com/mgba-emu/mgba/archive/0.8.1.tar.gz" - sha256 "df136ea50c9cca380ab93e00fd8d87811e41a49a804c5b0e018babef0c490f13" - license "MPL-2.0" - revision 2 - head "https://github.com/mgba-emu/mgba.git" - - bottle do - sha256 "725b64e2132aecbf40204da4c96a5656672724c916213158e820278ba8c269f3" => :catalina - sha256 "c5b2bd58f48bf590aa55160ec3f51d34c18fc272c6e39cae2e72db31df23bd38" => :mojave - sha256 "b83acf3eb47d4d2b381d07d39893f55488199efaf1202722240e7cd0b54899ad" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "ffmpeg" - 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 - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version if MacOS.version <= :el_capitan - - # 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 7be65705430f6..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 "d7d0a96656fbae5b279223d120bfe456c775a0c751090049bcf3ffffb2231761" => :catalina - sha256 "b4ee65a9ee33f5e19e085c477ec1634e2aa1626331eb2465484713759b264163" => :mojave - sha256 "82f39af8037f070fafcad0280b151dc58e1b5b8c3ea1fb75f4ee372256d3ad2b" => :high_sierra - sha256 "f630165dd7f7a0f8e5b710e0e0af5ebca6ca0edc98cd46a01b617a3e16bff7ea" => :sierra - sha256 "8817cea2b724d7ea00fd1efb348aa8bdb5d93ca155cb9ccf8eb316f76b42941b" => :el_capitan - sha256 "fb03873f042a16fd2db5ae2a7eb62e970927b75a9dff92decbb3fd035a2bd41f" => :yosemite - sha256 "eb2799dca9f7c9d020e76034361c5859a4dc7e8aecaf4f1e989901b12ef4420c" => :mavericks - 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 58704eadc3c0b..0000000000000 --- a/Formula/micro.rb +++ /dev/null @@ -1,28 +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.git", - :tag => "v2.0.6", - :revision => "60846f549ccd02598dea5889992f1e4cddc8e86d" - head "https://github.com/zyedidia/micro.git" - - bottle do - cellar :any_skip_relocation - sha256 "be03936409bc31c0897e2df70b2c1387bcb7a9059ef484691bc5d8a4f68f7b18" => :catalina - sha256 "f88ea0a7ac16b204ddc9f1a34b6cb3ad98c964b0177682e1928854e476700348" => :mojave - sha256 "dc08b92df8eab987e5bbc012d624075cc98b63df9e7f603c12a7606d33639a74" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "build-tags" - bin.install "micro" - man1.install "assets/packaging/micro.1" - prefix.install_metafiles - 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 acf6797610860..0000000000000 --- a/Formula/micronaut.rb +++ /dev/null @@ -1,20 +0,0 @@ -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/v2.0.0.RC1.tar.gz" - sha256 "91dc71b200c598a91b95a20792dcc3f3cb160b8e169b581f6b98689dc713acad" - license "Apache-2.0" - - depends_on "gradle" => :build - depends_on "openjdk" - - def install - system "gradle", "build" - (bin/"mn").write_env_script libexec/"bin/mn", Language::Java.overridable_java_home_env - 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 1c00196190d6c..0000000000000 --- a/Formula/micropython.rb +++ /dev/null @@ -1,49 +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.12", - :revision => "1f371947309c5ea6023b6d9065415697cbc75578" - license "MIT" - revision 2 - - bottle do - cellar :any - sha256 "af98b434dd38d24a28541b3bdc168a689b914b425aa80a6bf384c18862ed3737" => :catalina - sha256 "dff6248820013f3f31408252de971418ac26f6eacd20791c6eaeb9527ea552f2" => :mojave - sha256 "19800fe474da81062c005732c1dd6c3e66e6a2a8e04f38a4a69ce8513808895c" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libffi" # Requires libffi v3 closure API; macOS version is too old - depends_on "python@3.8" # Requires python3 executable - - def install - # Build mpy-cross before building the rest of micropython. Build process expects executable at - # path buildpath/"mpy-cross/mpy-cross", so build it and leave it here for now, install later. - cd "mpy-cross" do - system "make" - end - - cd "ports/unix" do - system "make", "axtls" - system "make", "install", "PREFIX=#{prefix}" - end - - bin.install "mpy-cross/mpy-cross" - 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 e7a7ddb3e9eef..0000000000000 --- a/Formula/midgard2.rb +++ /dev/null @@ -1,46 +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 2 - - bottle do - sha256 "c3ed243fb5c433a40f959a357c8c78258a62b2fcc7eb5f3e6d94ca0b9cae3159" => :catalina - sha256 "d37c0fefe73ad6e8360585d80e26e11f7e1f5735fdf8382f0c3795f95fa93d68" => :mojave - sha256 "08df9e1d7487d38c8174047aa9d0620bc1f430f23602acba90c2ec9978a3fdd9" => :high_sierra - sha256 "2aec9cbfb7a432a4ad73157831b9d5f6573ae4b85141410040cb0f053435541a" => :sierra - 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 3083b0338baa4..0000000000000 --- a/Formula/midicsv.rb +++ /dev/null @@ -1,28 +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 "5d36fed687c5f4b23c0705ff261a798697bcda5d4fefa6d86d6a1449ad1efa50" => :catalina - 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 97665eaf9868e..0000000000000 --- a/Formula/midnight-commander.rb +++ /dev/null @@ -1,51 +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.24.tar.xz" - sha256 "859f1cc070450bf6eb4d319ffcb6a5ac29deb0ac0d81559fb2e71242b1176d46" - - bottle do - sha256 "c6adcb70e949c89ba12ba91fffb89ad00c55e8c3a063ae6d01954a02a84512f2" => :catalina - sha256 "2e3e95bd852f0edd7069b09ff24e897e94bb495f3b852230f7cc3400acfc2d9a" => :mojave - sha256 "2e888d8d8cec7a0c881d0df09f5662080494f89e1871fbcccf30e9a0cc18aa1b" => :high_sierra - end - - head do - url "https://github.com/MidnightCommander/mc.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libssh2" - depends_on "openssl@1.1" - depends_on "s-lang" - - conflicts_with "minio-mc", :because => "both install an `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 "./autogen.sh" if build.head? - 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 0d623d7ec5227..0000000000000 --- a/Formula/mighttpd2.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Mighttpd2 < Formula - desc "HTTP server" - homepage "https://www.mew.org/~kazu/proj/mighttpd/en/" - url "https://hackage.haskell.org/package/mighttpd2-3.4.6/mighttpd2-3.4.6.tar.gz" - sha256 "fe14264ea0e45281591c86030cad2b349480f16540ad1d9e3a29657ddf62e471" - license "BSD-3-Clause" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "bcea435a9feba47df19b64d9fac972a1df8f580647204b07a73b2ade2e14c479" => :catalina - sha256 "68e563757fb405de41a4312c03f7b72da99586430ea8f0aff98fdab48213635f" => :mojave - sha256 "7b033c6ce128310465134a09bae1ef3df9cb630db732167a06028c1a5773576e" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - uses_from_macos "zlib" - - def install - system "cabal", "v2-update" - system "cabal", "v2-install", "-ftls", *std_cabal_v2_args - 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 fbc324f9b9cad..0000000000000 --- a/Formula/mikmod.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - sha256 "6d6794da1daf749a56cf55738f796fe5b6a7b337456730b21a5efba2fab60f38" => :catalina - 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 c72ddbdaabac9..0000000000000 --- a/Formula/mikutter.rb +++ /dev/null @@ -1,258 +0,0 @@ -class Mikutter < Formula - desc "Extensible Twitter client" - homepage "https://mikutter.hachune.net/" - url "https://mikutter.hachune.net/bin/mikutter-4.0.6.tar.gz" - sha256 "3ac0292aafbbd6a8f978091244ef20f3911ecb1c26a85e8e3c6ef86211f279cd" - license "MIT" - head "git://mikutter.hachune.net/mikutter.git", :branch => "develop" - - bottle do - cellar :any - sha256 "cb4bba033f7a9e68459cdb2bbb8a3a19a3d6d174784b227f4f2da1fba6978725" => :catalina - sha256 "59caaf25a9766b967d2388c2b3de3563fd5f02c645a4d477eec387003f8afe3e" => :mojave - sha256 "371302f304c78f0c79acef28bdb32d9cbb61030cde9e5f45f6d262a92d101167" => :high_sierra - end - - depends_on "gobject-introspection" - depends_on "gtk+" - depends_on "libidn" - depends_on "ruby" - depends_on "terminal-notifier" - - uses_from_macos "xz" - - resource "addressable" do - url "https://rubygems.org/downloads/addressable-2.7.0.gem" - sha256 "5e9b62fe1239091ea9b2893cd00ffe1bcbdd9371f4e1d35fac595c98c5856cbb" - end - - resource "atk" do - url "https://rubygems.org/downloads/atk-3.4.1.gem" - sha256 "88240dd7f28f38d05349363585827df2da258412c531744bf18f74e3824a1829" - end - - resource "cairo" do - url "https://rubygems.org/downloads/cairo-1.16.5.gem" - sha256 "f11f243d74b6902bb0306c860e17b8be530883a617b0ece1abe488ab40085bba" - end - - resource "cairo-gobject" do - url "https://rubygems.org/downloads/cairo-gobject-3.4.1.gem" - sha256 "4800f1dc9720640060ba63602e235fa5f5b7469434c68788ce3c6f46b56b7d3e" - end - - resource "delayer" do - url "https://rubygems.org/downloads/delayer-1.0.2.gem" - sha256 "b5bc78b8d1b484021d91ce630e9d10b4a87ccd8925b2760799f3193d38203842" - end - - resource "delayer-deferred" do - url "https://rubygems.org/downloads/delayer-deferred-2.1.3.gem" - sha256 "cd1464eb228d4c08ba29af200a28892dde32c4d3f39e6fe6300c7a3c148686de" - end - - resource "diva" do - url "https://rubygems.org/downloads/diva-1.0.2.gem" - sha256 "4f702b8fee7e737847c25324807f47206d4402969f929b2d7976ef531e279417" - end - - resource "gdk_pixbuf2" do - url "https://rubygems.org/downloads/gdk_pixbuf2-3.4.1.gem" - sha256 "55dd9255105b81954c3f49c0669e26262380eea634b323017454c509ec7f2405" - end - - resource "gettext" do - url "https://rubygems.org/gems/gettext-3.3.5.gem" - sha256 "955f115e1099ea705949c4e221164efdbbf07ec6e148131a777873c0f419bb04" - end - - resource "gio2" do - url "https://rubygems.org/downloads/gio2-3.4.1.gem" - sha256 "efd470c1b32641bce0df4ec689a2770d19503a7f98cd5b19eca5acddd6bb72d0" - end - - resource "glib2" do - url "https://rubygems.org/downloads/glib2-3.4.1.gem" - sha256 "2c60c23752cb62cd82feab5d640844876e6e1a5e2226372d550582eb80f594a1" - end - - resource "gobject-introspection" do - url "https://rubygems.org/downloads/gobject-introspection-3.4.1.gem" - sha256 "5680367a577bc1d5a0145d8da26a516b946c0c2f14c91f411f5d2d1d23467da8" - end - - resource "gtk2" do - url "https://rubygems.org/downloads/gtk2-3.4.1.gem" - sha256 "ad8ae7763cc3e8658e8dd4eca31a639880b8d485e2c9d52648fffb60c1435f9d" - end - - resource "httpclient" do - url "https://rubygems.org/gems/httpclient-2.8.3.gem" - sha256 "2951e4991214464c3e92107e46438527d23048e634f3aee91c719e0bdfaebda6" - end - - resource "instance_storage" do - url "https://rubygems.org/gems/instance_storage-1.0.0.gem" - sha256 "f41e64da2fe4f5f7d6c8cf9809ef898e660870f39d4e5569c293b584a12bce22" - end - - resource "locale" do - url "https://rubygems.org/downloads/locale-2.1.3.gem" - sha256 "b6ddee011e157817cb98e521b3ce7cb626424d5882f1e844aafdee3e8b212725" - end - - resource "memoist" do - url "https://rubygems.org/downloads/memoist-0.16.2.gem" - sha256 "a52c53a3f25b5875151670b2f3fd44388633486dc0f09f9a7150ead1e3bf3c45" - end - - resource "mini_portile2" do - url "https://rubygems.org/gems/mini_portile2-2.4.0.gem" - sha256 "7e178a397ad62bb8a96977986130dc81f1b13201c6dd95a48bd8cec1dda5f797" - end - - resource "moneta" do - url "https://rubygems.org/downloads/moneta-1.3.0.gem" - sha256 "38ffd4f10d3a2f48ad8362eaf63f619da89ca2b5d5a0bae2f8447ce4880f9590" - end - - resource "native-package-installer" do - url "https://rubygems.org/downloads/native-package-installer-1.0.9.gem" - sha256 "80bad0273706eeb4fc49ac8fa589b25eb6728c85a09fd241c8f0f06bdca32c5e" - end - - resource "nokogiri" do - url "https://rubygems.org/downloads/nokogiri-1.10.9.gem" - sha256 "d562108c5cdf7e9208c267107a0a54581d868689aefed9c5480898bb4033478a" - end - - resource "oauth" do - url "https://rubygems.org/gems/oauth-0.5.4.gem" - sha256 "3e017ed1c107eb6fe42c977b78c8a8409249869032b343cf2f23ac80d16b5fff" - end - - resource "pango" do - url "https://rubygems.org/downloads/pango-3.4.1.gem" - sha256 "77e14073e93bbddb53ad6e3debf3e054f5444de4e2748c36cb2ede8741b10cb4" - end - - resource "pkg-config" do - url "https://rubygems.org/downloads/pkg-config-1.4.1.gem" - sha256 "dca87a58534dfc3ff61c5de1289ed6622a5bd1f5b48fb2dc7a1cc5ef8f6b4ef2" - end - - resource "pluggaloid" do - url "https://rubygems.org/gems/pluggaloid-1.2.0.gem" - sha256 "108eb89db1cc35f94f69d838f673d9d501b7e1f57e8eec5e200cb1d8a4cc60bf" - end - - resource "public_suffix" do - url "https://rubygems.org/downloads/public_suffix-4.0.5.gem" - sha256 "efbc976b8f8cd7e2f9387b41ad4dc5447bcc7e862cf3afd909f13b0048a3dc6f" - end - - resource "rake" do - url "https://rubygems.org/downloads/rake-13.0.1.gem" - sha256 "292a08eb3064e972e3e07e4c297d54a93433439ff429e58a403ae05584fad870" - end - - resource "text" do - url "https://rubygems.org/gems/text-1.3.1.gem" - sha256 "2fbbbc82c1ce79c4195b13018a87cbb00d762bda39241bb3cdc32792759dd3f4" - end - - resource "typed-array" do - url "https://rubygems.org/gems/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", "install", - "--local", "--path=#{lib}/mikutter/vendor" - - rm_rf "vendor" - (lib/"mikutter").install "plugin" - libexec.install Dir["*"] - - ruby_series = Formula["ruby"].version.to_s.split(".")[0..1].join(".") - 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 <<~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 0ef1b579a356d..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.7.4/0.7.4" - sha256 "a5c63964935d84e93770c93f082d88ee38b0791d212cd0d23dbee9e2b10794fd" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"].shift => "mill" - chmod 0555, libexec/"mill" - (bin/"mill").write_env_script libexec/"mill", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - end - - test do - (testpath/"build.sc").write <<~EOS - import mill._ - import mill.scalalib._ - object foo extends ScalaModule { - def scalaVersion = "2.12.8" - } - 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 71d25b8b20d7d..0000000000000 --- a/Formula/miller.rb +++ /dev/null @@ -1,41 +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/v5.7.0/mlr-5.7.0.tar.gz" - sha256 "3896a8be073427671e7ba84993c071891fb39769696fd566b8b77ec0abd3ea51" - head "https://github.com/johnkerl/miller.git" - - bottle do - cellar :any_skip_relocation - sha256 "b1e99a7173ec7eac19ac3daa5fd565016897774c9270def0c95610549634a032" => :catalina - sha256 "4d5d800c42bedc655093ca0ceb522782721e46af78f1c61e0ebf9fde74f0d9a4" => :mojave - sha256 "0485537d6ba6927d11484e5c9f3377c51aa0da38fcecbf701c7833f76812a99d" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - uses_from_macos "flex" => :build - - def install - # Profiling build fails with Xcode 11, remove it - inreplace "c/Makefile.am", /noinst_PROGRAMS=\s*mlrg/, "" - system "autoreconf", "-fvi" - - system "./configure", "--prefix=#{prefix}", "--disable-silent-rules", - "--disable-dependency-tracking" - system "make" - 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 8f0e6229788fd..0000000000000 --- a/Formula/mimic.rb +++ /dev/null @@ -1,36 +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/mimic1/archive/1.3.0.1.tar.gz" - sha256 "9041f5c7d3720899c90c890ada179c92c3b542b90bb655c247e4a4835df79249" - - bottle do - sha256 "72b346f8eefbbc70abc0a67bc72265b3bec7f99e53b18418ad6835df52518f1e" => :catalina - sha256 "a185641e0d84aae004df33923ca0612b9ba0d59c9a1d4a5fd80ebd6d1de69f58" => :mojave - sha256 "98a927ebfffb3a965506102d758fe4a5e76d0c6bd732972e6b113505d28241c8" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - depends_on "icu4c" - depends_on "pcre2" - 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 510790fe59bd3..0000000000000 --- a/Formula/minbif.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Minbif < Formula - desc "IRC-to-other-IM-networks gateway using Pidgin library" - homepage "https://symlink.me/projects/minbif/wiki/" - url "https://deb.debian.org/debian/pool/main/m/minbif/minbif_1.0.5+git20150505.orig.tar.gz" - version "1.0.5-20150505" - sha256 "4e264fce518a0281de9fc3d44450677c5fa91097a0597ef7a0d2a688ee66d40b" - revision 3 - - bottle do - cellar :any - sha256 "57dc630a96ec93b8168d569cc1ff0152f381ca52c10d2b6b7bffc1d91cbc14a2" => :catalina - sha256 "479cfbb3b59f2c0c05b0553188ae2497ee313b02e5850172bb7055231def61b8" => :mojave - sha256 "5b8a0fd609cda94163f95c7d0b6620c143b3ff127178d37a57b76493231c73cc" => :sierra - 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 b705b32bf723a..0000000000000 --- a/Formula/minetest.rb +++ /dev/null @@ -1,66 +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/5.2.0.tar.gz" - sha256 "4996c7c50a6600d0c7140680d4bd995cb9aae910f216b46373953b49d6b13a5d" - - resource "minetest_game" do - url "https://github.com/minetest/minetest_game/archive/5.2.0.tar.gz" - sha256 "0c49fd6e310de1aba2e8cb8ae72efe0e06bb6bc8d7c5efea23bc201b6a80ce94" - end - end - - bottle do - sha256 "ef42a92c6aac3639392dece9de7e465bea986deac1e3af95c532beaf1e679a65" => :catalina - sha256 "fb9f521a5d2df6e4d888c35c5e1b9dd067403429e926872db421c16e6819d103" => :mojave - sha256 "13aa90c2642b7a8946657d5b2e804bdd8feb4288dca8242e4af509f14e03c674" => :high_sierra - 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" - - 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}" - - 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 - "#{prefix}/minetest.app/Contents/MacOS/minetest --server". - EOS - end - - test do - system "#{prefix}/minetest.app/Contents/MacOS/minetest", "--version" - end -end diff --git a/Formula/mingw-w64.rb b/Formula/mingw-w64.rb deleted file mode 100644 index 82303a3e3893f..0000000000000 --- a/Formula/mingw-w64.rb +++ /dev/null @@ -1,177 +0,0 @@ -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-v7.0.0.tar.bz2" - sha256 "aa20dfff3596f08a7f427aab74315a6cb80c2b086b4a107ed35af02f9496b628" - revision 2 - - bottle do - sha256 "092d1d30ae9f2de677a35f14ec2907d285b85f9b4ed465a506f72a970deea715" => :catalina - sha256 "cdefb18e91d0102ba193caa2c6994d83c30742fa03e03e12b3fc5864ca6b003c" => :mojave - sha256 "2658e687bbfee45cfa9d0d74c9c129f9ffc2ac1de017143d25b4017aa899404f" => :high_sierra - end - - # 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.34.tar.xz" - mirror "https://ftpmirror.gnu.org/binutils/binutils-2.34.tar.xz" - sha256 "f00b0e8803dc9bab1e2165bd568528135be734df3fabf8d0161828cd56028952" - end - - resource "gcc" do - url "https://ftp.gnu.org/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gcc/gcc-9.3.0/gcc-9.3.0.tar.xz" - sha256 "71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1" - 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 - ] - 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=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 - --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} - ] - - 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} - --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 - - # 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" - ENV.remove_macosxsdk - 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 diff --git a/Formula/minica.rb b/Formula/minica.rb deleted file mode 100644 index 00c566a122c0d..0000000000000 --- a/Formula/minica.rb +++ /dev/null @@ -1,25 +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.2.tar.gz" - sha256 "c5b7e6c890ad472eb39f7e44d777da1b623930fd099b414213ced14bb599c6ec" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "6ed3047835593e51bddc2f1150ca3db84f736c4714442140ed693e23561053ee" => :catalina - sha256 "3665f724fc7ca7da303894232bceda5f53b3aa75d6fe010f77635f75062212d7" => :mojave - sha256 "898ae6355e98099a2692f397b58c497dbed656a7859ed8bfb9e045fc4af56a0f" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"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 6c52728ae9e09..0000000000000 --- a/Formula/minicom.rb +++ /dev/null @@ -1,51 +0,0 @@ -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.7.1.orig.tar.gz" - sha256 "532f836b7a677eb0cb1dca8d70302b73729c3d30df26d58368d712e5cca041f1" - - bottle do - sha256 "9a95136e2a0176a25874a996fd93ff2e77da00b17e450fc532c85bbdc80edfd3" => :catalina - 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 93d9001feed94..0000000000000 --- a/Formula/minidjvu.rb +++ /dev/null @@ -1,34 +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" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "ac5ddf434a115b421a2fd20645d09c690b559e7c135bfa71687d540f80e9dadb" => :catalina - 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 04f37a6b96082..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 3 - - bottle do - cellar :any - sha256 "200ede8d7a76a0ddf22978ec19f464e7716ae1e33c0c01b17877de7fcf0a0ea9" => :catalina - sha256 "c8b56b111f9625c1baaf66e9f06f6e7df6b039e1ebb188995edb16c2e264830c" => :mojave - sha256 "09e2127980deb0e8ed824e72bfa575f110b737ed4fa653ef0edb629faa815369" => :high_sierra - 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/minikube.rb b/Formula/minikube.rb deleted file mode 100644 index e526019ebc6cb..0000000000000 --- a/Formula/minikube.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Minikube < Formula - desc "Run a Kubernetes cluster locally" - homepage "https://minikube.sigs.k8s.io/" - url "https://github.com/kubernetes/minikube.git", - :tag => "v1.11.0", - :revision => "57e2f55f47effe9ce396cea42a1e0eb4f611ebbd" - license "Apache-2.0" - head "https://github.com/kubernetes/minikube.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b1725719ff2a2973f20e5583021584302bb29d9dd23448709e016a19c101ba4f" => :catalina - sha256 "6d825680b695c127d29ad63a50ad3d8dd1c129d35fa90ce623f878eb7fe7dd32" => :mojave - sha256 "7ff75886b7fb884af278652c63e715afadeb940e1a66d491637a59aa95980165" => :high_sierra - end - - depends_on "go" => :build - depends_on "go-bindata" => :build - depends_on "kubernetes-cli" - - def install - system "make" - bin.install "out/minikube" - - output = Utils.safe_popen_read("#{bin}/minikube", "completion", "bash") - (bash_completion/"minikube").write output - - output = Utils.safe_popen_read("#{bin}/minikube", "completion", "zsh") - (zsh_completion/"_minikube").write output - end - - test do - output = shell_output("#{bin}/minikube version") - assert_match "version: v#{version}", output - - (testpath/".minikube/config/config.json").write <<~EOS - { - "vm-driver": "virtualbox" - } - EOS - output = shell_output("#{bin}/minikube config view") - assert_match "vm-driver: virtualbox", output - end -end diff --git a/Formula/minimal-racket.rb b/Formula/minimal-racket.rb deleted file mode 100644 index 6fc9521d87d76..0000000000000 --- a/Formula/minimal-racket.rb +++ /dev/null @@ -1,71 +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.7/racket-minimal-7.7-src-builtpkgs.tgz" - sha256 "65712392a334f9a091a6090345d4d392165d9b897e8d918e8aefdcfb0e59a4f8" - - bottle do - cellar :any - sha256 "c16ada1784dafe74e56c4a860f310752060fb161a4acce72bd9f3ac9f85897f3" => :catalina - sha256 "7b32a64228abada82c29a05e5bac3fc172b49adb2d86fa27f46665b416f1825b" => :mojave - sha256 "a8d174fecc59249af342499b0a174d78f07bd4ea037cd71a177487b980579d7b" => :high_sierra - end - - uses_from_macos "libffi" - - # these two files are amended when (un)installing packages - skip_clean "lib/racket/launchers.rktd", "lib/racket/mans.rktd" - - 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" - - cd "src" do - args = %W[ - --disable-debug - --disable-dependency-tracking - --enable-origtree=no - --enable-macprefix - --prefix=#{prefix} - --mandir=#{man} - --sysconfdir=#{etc} - --enable-useprefix - ] - - system "./configure", *args - system "make" - system "make", "install" - 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 b5357bb2d5c40..0000000000000 --- a/Formula/minimesos.rb +++ /dev/null @@ -1,19 +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" - license "Apache-2.0" - 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 50faa444298b2..0000000000000 --- a/Formula/minimodem.rb +++ /dev/null @@ -1,34 +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://deb.debian.org/debian/pool/main/m/minimodem/minimodem_0.24.orig.tar.gz" - sha256 "f8cca4db8e3f284d67f843054d6bb4d88a3db5e77b26192410e41e9a06f4378e" - - bottle do - cellar :any - sha256 "5f9cd0c17ee17754bfe88c6e275111270e0a0d0cdebb663a0045d6ad49c8b9a8" => :catalina - 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 667079951071d..0000000000000 --- a/Formula/minio-mc.rb +++ /dev/null @@ -1,44 +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.2020-06-26T19-56-55Z", - :revision => "bb3c0d45f2e64eab2b83e7f5376e1b621f0821a9" - version "20200626195655" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e3e9d880b26de8185b686342ec11066769a8b8d96ddeb8c12679f01a644bea97" => :catalina - sha256 "36f68fb6f0e4e068cce1df13f1e4b3b0360e47ec01d1af4219f442c9f28723db" => :mojave - sha256 "b3e3584fe6a7bded08a5ec2f4795b81f4d0f254599e5b36052502a0836c32e13" => :high_sierra - end - - depends_on "go" => :build - - conflicts_with "midnight-commander", :because => "both install an `mc` binary" - - def install - if build.head? - system "go", "build", "-trimpath", "-o", bin/"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", "-trimpath", "-o", bin/"mc", "-ldflags", <<~EOS - -X #{proj}/cmd.Version=#{minio_version} - -X #{proj}/cmd.ReleaseTag=#{minio_release} - -X #{proj}/cmd.CommitID=#{minio_commit} - EOS - end - - 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 90271ed01fbb4..0000000000000 --- a/Formula/minio.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Minio < Formula - desc "High Performance, Kubernetes Native Object Storage" - homepage "https://min.io/" - url "https://github.com/minio/minio.git", - :tag => "RELEASE.2020-07-02T00-15-09Z", - :revision => "11021b6a002c8ea32f8849f91ddd5e5c2aa47198" - version "20200702001509" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "2e82e7d89e2559865c52f412170299bc2fde6c7c80eb485f22ff776e5f34872e" => :catalina - sha256 "a3746a51498cb79ca0670ac2488d7462504d980861d0b90f2c38b637c8dd21c7" => :mojave - sha256 "5f3e0d0f9d96af49048e71e22da26321b2d0a33abcb943704fb92cb7152dd325" => :high_sierra - end - - depends_on "go" => :build - - def install - if build.head? - system "go", "build", "-trimpath", "-o", bin/"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", "-trimpath", "-o", bin/"minio", "-ldflags", <<~EOS - -X #{proj}/cmd.Version=#{version} - -X #{proj}/cmd.ReleaseTag=#{release} - -X #{proj}/cmd.CommitID=#{commit} - EOS - end - - 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.log - StandardOutPath - #{var}/log/minio.log - RunAtLoad - - - - EOS - end - - test do - system "#{bin}/minio", "--version" - end -end diff --git a/Formula/minipro.rb b/Formula/minipro.rb deleted file mode 100644 index 94fe59c1f210a..0000000000000 --- a/Formula/minipro.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Minipro < Formula - desc "Open controller for the MiniPRO TL866xx series of chip programmers" - homepage "https://gitlab.com/DavidGriffith/minipro/" - url "https://gitlab.com/DavidGriffith/minipro/-/archive/0.4/minipro-0.4.tar.gz" - sha256 "05e0090eab33a236992f5864f3485924fb5dfad95d8f16916a17296999c094cc" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "eca0b4a6206491f7d429f75032bf16312078ac7bd36fffc8b97dc19b9999dbc4" => :catalina - sha256 "a636a9d69994308ecc1340ed93285171e04c5c25f3ad7c970d31d11e7c6123cd" => :mojave - sha256 "0969900d68207aab7fc9edca1d49f8816d2bf48a754af904ffa57466463b9c28" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libusb" - depends_on "srecord" - - def install - system "make", "CC=clang" - system "make", "PREFIX=#{prefix}", "MANDIR=#{share}", "install" - end - - test do - output_minipro = shell_output("#{bin}/minipro 2>&1") - assert_match "minipro version #{version}", output_minipro - output_miniprohex = shell_output("#{bin}/miniprohex 2>&1") - assert_match "miniprohex by Al Williams", output_miniprohex - - output_minipro_read_nonexistent = shell_output("#{bin}/minipro -p \"ST21C325@DIP7\" -b 2>&1", 1) - if (!output_minipro_read_nonexistent.include? "Device ST21C325@DIP7 not found!") && - (!output_minipro_read_nonexistent.include? "Error opening device") - raise "Error validating minipro device database." - end - end -end diff --git a/Formula/minised.rb b/Formula/minised.rb deleted file mode 100644 index 35aa147ef5f6a..0000000000000 --- a/Formula/minised.rb +++ /dev/null @@ -1,29 +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" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "64c474b8f3728b7593222b7218d5e5a1d17b9f1c33f4abb94eab2339a1398826" => :catalina - 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 52aa9a877b4b1..0000000000000 --- a/Formula/miniserve.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Miniserve < Formula - desc "High performance static file server" - homepage "https://github.com/svenstaro/miniserve" - # Bumpable only when it doesn't use features only available in Rust Nightly. - # Check for resolution of https://github.com/svenstaro/miniserve/issues/291. - url "https://github.com/svenstaro/miniserve/archive/v0.3.0.tar.gz" - sha256 "80ee5d661730ddad14671f961b560467f3b3a9f0544b9b11dec65098eb4a1f7e" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "e8955f888b8c0828d741d5541a2ae6567704d78db99600d59b3d9a02dc571089" => :mojave - sha256 "8711ae0bb727abd3ed3ad8d1335275d26fbc473f19bacfbad76b10b5a0bf4efc" => :high_sierra - sha256 "a00b82cfce9fecd067b62ec3135a0e9cc59d3133f97ed3c0e7b815e4921c32d0" => :sierra - end - - depends_on "rust" - - def install - system "cargo", "install", *std_cargo_args - 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/minisign.rb b/Formula/minisign.rb deleted file mode 100644 index ace27c50d8bf9..0000000000000 --- a/Formula/minisign.rb +++ /dev/null @@ -1,57 +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.9.tar.gz" - sha256 "caa4b3dd314e065c6f387b2713f7603673e39a8a0b1a76f96ef6c9a5b845da0f" - - bottle do - cellar :any - sha256 "ff5a04ebf89d246f641855d36290a38810d18308dbc37377e15e0ae008137685" => :catalina - sha256 "25fc3bf106e6df3ad1e32d074faa895ebe22611b3af25df32efd399d88f1a094" => :mojave - sha256 "6bcd186e46f2cb55b9c07e6c4562caa2b3c16c5cd10c67c4294356a592e5c01b" => :high_sierra - 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 0d7b2e95f5a15..0000000000000 --- a/Formula/miniupnpc.rb +++ /dev/null @@ -1,24 +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 "de583006c4f55d9d085ac9bb94123bc55e769aba1e7f483fcb51f7a1db490c84" => :catalina - 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 7bdad3fb516b0..0000000000000 --- a/Formula/minizinc.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Minizinc < Formula - desc "Medium-level constraint modeling language" - homepage "https://www.minizinc.org/" - url "https://github.com/MiniZinc/libminizinc/archive/2.4.3.tar.gz" - sha256 "c5c379b0275cc6c0fefd4568e621a43b6f1f0b4af793fea5995be7c6cf73cc07" - license "MPL-2.0" - head "https://github.com/MiniZinc/libminizinc.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "ac8a3708d18b387b114d96c11c689c0578e3d0119d6d86c491675759e6e7d4f7" => :catalina - sha256 "c08c60f5bb8d063262f6c787ab7c5ad7a44d2f42aa0be2b783f20d4f6effac11" => :mojave - sha256 "41f9a16e2ced9b258ff971a301b03a03a09b691f04917478a79239cdacb6b706" => :high_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/"minizinc/std/all_different.mzn" - end -end diff --git a/Formula/minizip.rb b/Formula/minizip.rb deleted file mode 100644 index 0d6d4ef5079c2..0000000000000 --- a/Formula/minizip.rb +++ /dev/null @@ -1,48 +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 2 - sha256 "80d48e6cf3f3c64f618f1cb7487c6ac9a7259ba46c536dac286ef6bdffaacd8c" => :catalina - sha256 "503832d6da09e7f16b7036ee1cf3055c25ba3602d3ea9815a9800d1840fb69ea" => :mojave - sha256 "9fa636770888ef4e9aaa3c1bbf2d3c18fb0e4c393305c2ecf265ca79ecee6e71" => :high_sierra - sha256 "83e4b5b1b52ff484a0ba73637e0961ed3d41ecba4ee3c3cfe667d13ef7e51ad7" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - uses_from_macos "zlib" - - conflicts_with "minizip2", - :because => "both install a `libminizip.a` library" - - 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/minizip2.rb b/Formula/minizip2.rb deleted file mode 100644 index fea18dd1b324b..0000000000000 --- a/Formula/minizip2.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Minizip2 < Formula - desc "Zip file manipulation library with minizip 1.x compatibility layer" - homepage "https://github.com/nmoinvaz/minizip" - url "https://github.com/nmoinvaz/minizip/archive/2.10.0.tar.gz" - sha256 "4c7f236268fef57ce5dcbd9645235a22890d62480a592e1b0515ecff93f9989b" - - bottle do - cellar :any_skip_relocation - sha256 "1e27e8b43a651ef11893cb6ce591c05b1d0bc86c092c633faa43140657a63ee3" => :catalina - sha256 "a878c57c455068783abeec0704ad27da5cffd5b28eae9a2f0f57b2077650e187" => :mojave - sha256 "e76bd49d513bfe9939d35c41451ff76807f9230b31b8761e34a26877414d2519" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "zstd" - - uses_from_macos "bzip2" - uses_from_macos "libiconv" - uses_from_macos "zlib" - - conflicts_with "minizip", - :because => "both install a `libminizip.a` library" - conflicts_with "libtcod", "libzip", - :because => "libtcod, libzip and minizip2 install a `zip.h` header" - - def install - system "cmake", ".", *std_cmake_args, "-DIconv_IS_BUILT_IN=on" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include "mz_zip.h" - #include "mz_compat.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; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", - "-lminizip", "-lz", "-lbz2", "-liconv", - "-L#{Formula["zstd"].opt_lib}", "-lzstd", - "-framework", "CoreFoundation", "-framework", "Security", "-o", "test" - system "./test" - end -end diff --git a/Formula/mint.rb b/Formula/mint.rb deleted file mode 100644 index e723fece30a4b..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.14.2.tar.gz" - sha256 "0ed7107159ee00fbc3f69b3325363406e868bdd0dd23ee50670eca8f14622ef5" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "cc7a17ee517fe97f12852c71252896c9ca30dfe8236f816f2990b2d0553ff5b3" => :catalina - sha256 "f70e96558839243a845c67f15defbd8718ad5a9e094ae1c1b998ac9faf4399b0" => :mojave - end - - depends_on :xcode => ["10.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 23274f17fbb6d..0000000000000 --- a/Formula/minuit2.rb +++ /dev/null @@ -1,26 +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 "94d14435083239aeca25cc36037c4c1445d7327c9e28f216dfdbcb3be16525ec" => :catalina - 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 f594a7e59d67f..0000000000000 --- a/Formula/miruo.rb +++ /dev/null @@ -1,31 +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 "044456429802d6f6d8ba2a8d00547e0e0695e99edd1cceb1af29e70eb004d13f" => :catalina - 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 e644c9001c732..0000000000000 --- a/Formula/mit-scheme.rb +++ /dev/null @@ -1,121 +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/10.1.11/mit-scheme-10.1.11.tar.gz" - mirror "https://ftpmirror.gnu.org/gnu/mit-scheme/stable.pkg/10.1.11/mit-scheme-10.1.11.tar.gz" - sha256 "03a6df3b9d4c2472b9db7ad92010ea06423d81b018b12d0231d4241b57c80d54" - - bottle do - sha256 "5ae123ef4a76b34e2b927873991a823b0ab68a5518d1543f1e76bf9d3c36e589" => :catalina - sha256 "7f74120df838cc2f4542c73f20b7f3e3473f23a775d249e2b8170e6acfd43ed1" => :mojave - sha256 "cf0d2bf18da0dd0454f53f125bcb4d85632619cd8a79f3dd30ddb16a19c0d470" => :high_sierra - 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@1.1" - - resource "bootstrap" do - url "https://ftp.gnu.org/gnu/mit-scheme/stable.pkg/10.1.11/mit-scheme-10.1.11-x86-64.tar.gz" - sha256 "32c29fe08588ed325774113bac00dce72c2454955c64ba32fc40f30db011c21c" - end - - 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? - - resource("bootstrap").stage do - cd "src" - system "./configure", "--prefix=#{buildpath}/staging", "--without-x" - system "make" - system "make", "install" - end - - # 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}" - 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" - # Copy over all.com and runtime.com from the original bootstrap - # binaries to avoid shims - %w[ - mit-scheme-x86-64/all.com - mit-scheme-x86-64/runtime.com - ].each do |f| - cp buildpath/"staging/lib/#{f}", lib/f - end - 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 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 977c76394b10a..0000000000000 --- a/Formula/mitie.rb +++ /dev/null @@ -1,48 +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.7.tar.gz" - sha256 "0830955e64c2a4cceab803884355f090cf8e9086e68ac5df43058f05c34697e8" - revision 1 - head "https://github.com/mit-nlp/MITIE.git" - - bottle do - cellar :any - sha256 "194f53bc1f0f2bcc8c833d486229cb960c33705b389d7e83d0edf0afb14756eb" => :catalina - sha256 "f433ff3785259a3ca1a76066ac500639cf8bfe80cb5e327b3ff0a5345ec27442" => :mojave - sha256 "4ca2709376e8a37abe3a3f2763b698489b79fb2ff3c65d6845cbd2aefa9a2e9b" => :high_sierra - end - - depends_on "python@3.8" - - 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" - - xy = Language::Python.major_minor_version "python3" - (lib/"python#{xy}/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 80b85690cc4bc..0000000000000 --- a/Formula/mitmproxy.rb +++ /dev/null @@ -1,203 +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/v5.1.1.tar.gz" - sha256 "555bbe9612e01d41858fbbe9f5d841b65bef3ac989ec26bb5c4c3d12a19dd57c" - license "MIT" - head "https://github.com/mitmproxy/mitmproxy.git" - - bottle do - cellar :any - sha256 "f4760f88345a950aec6fcb46177ec243c8f41b023fcafb9ce831cf2fa3ff27f9" => :catalina - sha256 "19c5b3c7dd7d1aed811659a1aefd514965a4656d6cf3a7196a0ce3f3d0c9d522" => :mojave - sha256 "6d43b715648d8998795f843fde02be9ef19b14bc42f27ccbd0d4296e8689e277" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "protobuf" - depends_on "python@3.8" - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/9f/3d/8beae739ed8c1c8f00ceac0ab6b0e97299b42da869e24cf82851b27a9123/asn1crypto-1.3.0.tar.gz" - sha256 "5a215cb8dc12f892244e3a113fe05397ee23c5c4ca7a69cd6e69811755efc42d" - end - - resource "blinker" do - url "https://files.pythonhosted.org/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz" - sha256 "471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6" - end - - resource "Brotli" do - url "https://files.pythonhosted.org/packages/cd/9c/7955895f5672ecc85270244582c6b53ff95bb4c24bf77bd9271d42351635/Brotli-1.0.7.zip" - sha256 "0538dc1744fd17c314d2adc409ea7d1b779783b89fd95bcfb0c2acc93a6ea5a7" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/bf/9d214a5af07debc6acf7f3f257265618f1db242a3f8e49a9b516f24523a6/certifi-2019.11.28.tar.gz" - sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/9d/0a/d7060601834b1a0a84845d6ae2cd59be077aafa2133455062e47c9733024/cryptography-2.9.tar.gz" - sha256 "0cacd3ef5c604b8e5f59bf2582c076c98a37fe206b31430d0cd08138aff0986e" - end - - resource "flask" do - url "https://files.pythonhosted.org/packages/4e/0b/cb02268c90e67545a0e3a37ea1ca3d45de3aca43ceb7dbf1712fb5127d5d/Flask-1.1.2.tar.gz" - sha256 "4efa1ae2d7c9865af48986de8aeb8504bf32c7f3d6fdc9353d34b21f4b127060" - end - - resource "h11" do - url "https://files.pythonhosted.org/packages/34/5a/abaa557d20b210117d8c3e6b0b817ce9b329b2e81f87612e60102a924323/h11-0.9.0.tar.gz" - sha256 "33d4bca7be0fa039f4e84d50ab00531047e53d6ee8ffbc83501ea602c169cae1" - end - - resource "h2" do - url "https://files.pythonhosted.org/packages/08/0a/033df0fc05fe94f72517ccd393dd9ff99b1773fd198307638e6d3568a518/h2-3.2.0.tar.gz" - sha256 "875f41ebd6f2c44781259005b157faed1a5031df3ae5aa7bcb4628a6c0782f14" - 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/e6/7f/9a4834af1010dc1d570d5f394dfd9323a7d7ada7d25586bd299fc4cb0356/hyperframe-5.2.0.tar.gz" - sha256 "a9f5c17f2cc3c719b917c4f33ed1c61bd1f8dfac4b1bd23b7c80b3400971b41f" - end - - resource "itsdangerous" do - url "https://files.pythonhosted.org/packages/68/1a/f27de07a8a304ad5fa817bbe383d1238ac4396da447fa11ed937039fa04b/itsdangerous-1.1.0.tar.gz" - sha256 "321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/d8/03/e491f423379ea14bb3a02a5238507f7d446de639b623187bccc111fbecdf/Jinja2-2.11.1.tar.gz" - sha256 "93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250" - 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/c2/49/3bf179229a92ae87ff2dca1609c2ad599c497938f90fd5d66d02aa8e977e/ldap3-2.7.tar.gz" - sha256 "17f04298b70bf7ecaa5db8a7d8622b5a962ef7fc2b245b2eea705ac1c24338c0" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "passlib" do - url "https://files.pythonhosted.org/packages/6d/6b/4bfca0c13506535289b58f9c9761d20f56ed89439bfe6b8e07416ce58ee1/passlib-1.7.2.tar.gz" - sha256 "8d666cef936198bc2ab47ee9b0410c94adf2ba798e5a84bf220be079ae7ab6a8" - end - - resource "protobuf" do - url "https://files.pythonhosted.org/packages/c9/d5/e6e789e50e478463a84bd1cdb45aa408d49a2e1aaffc45da43d10722c007/protobuf-3.11.3.tar.gz" - sha256 "c77c974d1dadf246d789f6dad1c24426137c9091e930dbf50e0a29c1fcf00b1f" - end - - resource "publicsuffix2" do - url "https://files.pythonhosted.org/packages/5a/04/1759906c4c5b67b2903f546de234a824d4028ef24eb0b1122daa43376c20/publicsuffix2-2.20191221.tar.gz" - sha256 "00f8cc31aa8d0d5592a5ced19cccba7de428ebca985db26ac852d920ddd6fe7b" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/a4/db/fffec68299e6d7bad3d504147f9094830b704527a7fc098b721d38cc7fa7/pyasn1-0.4.8.tar.gz" - sha256 "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "pyOpenSSL" do - url "https://files.pythonhosted.org/packages/0d/1d/6cc4bd4e79f78be6640fab268555a11af48474fac9df187c3361a1d1d2f0/pyOpenSSL-19.1.0.tar.gz" - sha256 "9a24494b2602aaf402be5c9e30a0b82d4a5c67528fe8fb475e3f3bc00dd69507" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/a2/56/0404c03c83cfcca229071d3c921d7d79ed385060bbe969fde3fd8f774ebd/pyparsing-2.4.6.tar.gz" - sha256 "4c830582a84fb022400b85429791bc551f1f4871c33f23e44f353119e92f969f" - end - - resource "pyperclip" do - url "https://files.pythonhosted.org/packages/f6/5b/55866e1cde0f86f5eec59dab5de8a66628cb0d53da74b8dbc15ad8dabda3/pyperclip-1.8.0.tar.gz" - sha256 "b75b975160428d84608c26edba2dec146e7799566aea42c1fe1b32e72b6028f2" - end - - resource "ruamel.yaml.clib" do - url "https://files.pythonhosted.org/packages/92/28/612085de3fae9f82d62d80255d9f4cf05b1b341db1e180adcf28c1bf748d/ruamel.yaml.clib-0.2.0.tar.gz" - sha256 "b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/16/8b/54a26c1031595e5edd0e616028b922d78d8ffba8bc775f0a4faeada846cc/ruamel.yaml-0.16.10.tar.gz" - sha256 "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "sortedcontainers" do - url "https://files.pythonhosted.org/packages/29/e0/135df2e733790a3d3bcda970fd080617be8cea3bd98f411e76e6847c17ef/sortedcontainers-2.1.0.tar.gz" - sha256 "974e9a32f56b17c1bac2aebd9dcf197f3eb9cd30553c5852a3187ad162e1a03a" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/95/84/119a46d494f008969bf0c775cb2c6b3579d3c4cc1bb1b41a022aa93ee242/tornado-6.0.4.tar.gz" - sha256 "0fe2d45ba43b00a41cd73f8be321a44936dc1aba233dee979f17a042b83eb6dc" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/45/dd/d57924f77b0914f8a61c81222647888fbb583f89168a376ffeb5613b02a6/urwid-2.1.0.tar.gz" - sha256 "0896f36060beb6bf3801cb554303fef336a79661401797551ba106d23ab4cd86" - end - - resource "Werkzeug" do - url "https://files.pythonhosted.org/packages/10/27/a33329150147594eff0ea4c33c2036c0eadd933141055be0ff911f7f8d04/Werkzeug-1.0.1.tar.gz" - sha256 "6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c" - end - - resource "wsproto" do - url "https://files.pythonhosted.org/packages/7b/5c/7b125c14fbdbeb7913d61e5841e20a453d71d5a5d961354a384c3ceeb81c/wsproto-0.15.0.tar.gz" - sha256 "614798c30e5dc2b3f65acc03d2d50842b97621487350ce79a80a711229edfa9d" - end - - resource "zstandard" do - url "https://files.pythonhosted.org/packages/71/bb/dbd6b2f27b94574b51e6055abd753b1f4b211933d478329e37eaae76f721/zstandard-0.12.0.tar.gz" - sha256 "a110fb3ad1db344fbb563942d314ec5f0f3bdfd6753ec6331dded03ad6c2affb" - 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 4a55f1ec7873a..0000000000000 --- a/Formula/mjpegtools.rb +++ /dev/null @@ -1,27 +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 "5628d3b16a0e3172ba49a38b903b5be2fcb2595ce4919e32c41e39a89a250102" => :catalina - 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 3e3109538cc21..0000000000000 --- a/Formula/mk-configure.rb +++ /dev/null @@ -1,29 +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.34.2/mk-configure-0.34.2.tar.gz" - sha256 "7ca9b577e2521ea79cf0a7c95e4339e5b49e9fe852777220687995529ace7cbf" - - bottle do - cellar :any_skip_relocation - sha256 "6953adbce89d8a07e95d89431881dbc3bf100e5de24ade46c409740db728fe8b" => :catalina - sha256 "59821ba5bb3b8801fe52e309813b4edec6615a9698de164364ca8e723fa2ecb9" => :mojave - sha256 "762f92188096b5c68bf6696a86310e6893829a67ca1bc3bf404fa931c6a7f48b" => :high_sierra - 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 a303125786d13..0000000000000 --- a/Formula/mkcert.rb +++ /dev/null @@ -1,37 +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.4.1.tar.gz" - sha256 "b539e11ac0a06ff4831b76134b8d391610287cf8e56b002365b3786b96e0acbe" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "b7cc76858dc35c6d3aabb07242ab6f5f079c4cb85deea4a9f66114528980914b" => :catalina - sha256 "9100c7f044d91e6ca0c483ed572217de28daa34c04fa6e2a130116175ba162e9" => :mojave - sha256 "f7d3255bc7f40e66bc75fd6ebfacc6b02c91514f412de9cf4b85b0d332bc4931" => :high_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", "-ldflags", "-X main.Version=v#{version}" - 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 e6cfa7f42bc30..0000000000000 --- a/Formula/mkclean.rb +++ /dev/null @@ -1,48 +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 "8bbf507533210f38e1ec8e8f18238194b9d67cc54c9d037b25670f6d48fbac6b" => :catalina - 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 67b59a3d1abed..0000000000000 --- a/Formula/mkcue.rb +++ /dev/null @@ -1,33 +0,0 @@ -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" - version "1" - sha256 "2aaf57da4d0f2e24329d5e952e90ec182d4aa82e4b2e025283e42370f9494867" - license "LGPL-2.1" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "04a1028cdb9608369a30f1c7f54204963bfd9ccac697d098499846df035c2886" => :catalina - 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 d1751beefd03c..0000000000000 --- a/Formula/mkdocs.rb +++ /dev/null @@ -1,94 +0,0 @@ -class Mkdocs < Formula - include Language::Python::Virtualenv - - desc "Project documentation with Markdown" - homepage "https://www.mkdocs.org/" - url "https://files.pythonhosted.org/packages/78/a3/ec98a4eab53b7adf435df6c17765e1d7b603e1487ad6ab7c824d5488bf5c/mkdocs-1.1.2.tar.gz" - sha256 "f0b61e5402b99d7789efa032c7a74c90a20220a9c81749da06dbfbcbd52ffb39" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "3f45e40b1f8cb82988b294a9a44c57b33fcfcc718b4130b2aa684ba6b95fa08f" => :catalina - sha256 "456b37b9de877e5bf5836337075add02d844169aa28dd39c3d42c69b04b887a0" => :mojave - sha256 "9f8fbedf9f950579f4c6496807ff8de30d47b117ea76877ada80133f9fd795ee" => :high_sierra - end - - depends_on "python@3.8" - - resource "click" do - url "https://files.pythonhosted.org/packages/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz" - sha256 "b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/d8/03/e491f423379ea14bb3a02a5238507f7d446de639b623187bccc111fbecdf/Jinja2-2.11.1.tar.gz" - sha256 "93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250" - end - - resource "livereload" do - url "https://files.pythonhosted.org/packages/27/26/85ba3851d2e4905be7d2d41082adca833182bb1d7de9dfc7f623383d36e1/livereload-2.6.1.tar.gz" - sha256 "89254f78d7529d7ea0a3417d224c34287ebfe266b05e67e51facaf82c27f0f66" - end - - resource "lunr" do - url "https://files.pythonhosted.org/packages/ad/c0/431b92d6707a4bf7692ea76bcfb00aa0f1db737cd3daf4b4f6a85e2b9d6c/lunr-0.5.8.tar.gz" - sha256 "c4fb063b98eff775dd638b3df380008ae85e6cb1d1a24d1cd81a10ef6391c26e" - end - - resource "Markdown" do - url "https://files.pythonhosted.org/packages/98/79/ce6984767cb9478e6818bd0994283db55c423d733cc62a88a3ffb8581e11/Markdown-3.2.1.tar.gz" - sha256 "90fee683eeabe1a92e149f7ba74e5ccdc81cd397bd6c516d93a8da0ef90b6902" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "nltk" do - url "https://files.pythonhosted.org/packages/f6/1d/d925cfb4f324ede997f6d47bea4d9babba51b49e87a767c170b77005889d/nltk-3.4.5.zip" - sha256 "bed45551259aa2101381bbdd5df37d44ca2669c5c3dad72439fa459b29137d94" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/95/84/119a46d494f008969bf0c775cb2c6b3579d3c4cc1bb1b41a022aa93ee242/tornado-6.0.4.tar.gz" - sha256 "0fe2d45ba43b00a41cd73f8be321a44936dc1aba233dee979f17a042b83eb6dc" - 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 b3a387b869f62..0000000000000 --- a/Formula/mkhexgrid.rb +++ /dev/null @@ -1,43 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "0e358685212d241af28055f0a47392bf077575469426e5bc4e38352847451325" => :catalina - 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/mksh.rb b/Formula/mksh.rb deleted file mode 100644 index fe411f253cb50..0000000000000 --- a/Formula/mksh.rb +++ /dev/null @@ -1,26 +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-R59b.tgz" - mirror "https://pub.allbsd.org/MirOS/dist/mir/mksh/mksh-R59b.tgz" - version "59b" - sha256 "907ed1a9586e7f18bdefdd4a763aaa8397b755e15034aa54f4d753bfb272e0e6" - - bottle do - cellar :any_skip_relocation - sha256 "e6b59cb6a1bb326e97bbbad191d735e85e39f899726a68225c01e137ea88066f" => :catalina - sha256 "1360021d58dfbb2b4baedc74ad72890ee1aa4178865c4aa61e6142da58ba8c06" => :mojave - sha256 "249f6b7a2ea7d278fd5b21ec947d9f88eeb8d803f28c286e140aa293beaf301d" => :high_sierra - 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/mktorrent.rb b/Formula/mktorrent.rb deleted file mode 100644 index f7811142695cf..0000000000000 --- a/Formula/mktorrent.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Mktorrent < Formula - desc "Create BitTorrent metainfo files" - homepage "https://github.com/Rudde/mktorrent/wiki" - url "https://github.com/Rudde/mktorrent/archive/v1.1.tar.gz" - sha256 "d0f47500192605d01b5a2569c605e51ed319f557d24cfcbcb23a26d51d6138c9" - revision 1 - - bottle do - cellar :any - sha256 "3c9a180d450b8e49d1c4a6fc967df8599f602f955b7b27f8589b2052e0d77a91" => :catalina - sha256 "22bc8649ce5fea25549610eec4110d45f3fa1d05335cfc982df82806ff34d71b" => :mojave - sha256 "60be732dfea657c6faffa7e9d644f6ade7f974e7fea6ec46fa2941baac5eee80" => :high_sierra - sha256 "3e7f91587dbea47713351b40a99b50728a878a9eb720eca14bd125541e62606f" => :sierra - end - - depends_on "openssl@1.1" - - 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 365781ffc760e..0000000000000 --- a/Formula/mkvalidator.rb +++ /dev/null @@ -1,38 +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 "ee45e5e5abe82cd60c970947d680a93f6987ee879b0f504ebff40c150b0a58dd" => :catalina - 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 c3b808c1951c5..0000000000000 --- a/Formula/mkvdts2ac3.rb +++ /dev/null @@ -1,41 +0,0 @@ -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" - - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/mkvdts2ac3/1.6.0.patch" - sha256 "208393d170387092cb953b6cd32e8c0201ba73560e25ed4930e4e2af6f72e4d9" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "76873d06126eddea9f43414bbaa9b35d2aa50e9f17f3ab0a490d733c6cf71438" => :catalina - 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 diff --git a/Formula/mkvtomp4.rb b/Formula/mkvtomp4.rb deleted file mode 100644 index e7d51f19cda51..0000000000000 --- a/Formula/mkvtomp4.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Mkvtomp4 < Formula - include Language::Python::Virtualenv - - desc "Convert mkv files to mp4" - homepage "https://github.com/gavinbeatty/mkvtomp4/" - url "https://github.com/gavinbeatty/mkvtomp4/archive/mkvtomp4-v2.0.tar.gz" - sha256 "0f9aa1754d4b33a6a83c0a71a373836d4872b3288dae9cfb6168c35f09887f2d" - license "MIT" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "e5c272e7c510016304912ce0a469a46e67fe5a04fd12656c8402882dfe43942d" => :catalina - sha256 "2767559ea465b35db52e6b7b20ad141f80798402796d3eb67471e26e1ea3cf3e" => :mojave - end - - depends_on "ffmpeg" - depends_on "gpac" - depends_on "mkvtoolnix" - depends_on "python@3.8" - - def install - virtualenv_install_with_resources - bin.install_symlink bin/"mkvtomp4.py" => "mkvtomp4" - prefix.install libexec/"share" - end - - test do - system "#{bin}/mkvtomp4", "--help" - end -end diff --git a/Formula/mkvtoolnix.rb b/Formula/mkvtoolnix.rb deleted file mode 100644 index 18f41005627ad..0000000000000 --- a/Formula/mkvtoolnix.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Mkvtoolnix < Formula - desc "Matroska media files manipulation tools" - homepage "https://mkvtoolnix.download/" - url "https://mkvtoolnix.download/sources/mkvtoolnix-48.0.0.tar.xz" - sha256 "f22c443506ce630bb96f9ef1f704b02b0137883fa74babab1632f68679900a83" - license "GPL-2.0" - revision 1 - - bottle do - cellar :any - sha256 "7e14ea2456fe8aa3435e9b835d782f1ff60dc6cf326bcf9dca840511ee96a6d5" => :catalina - sha256 "d9cdf539429485bff6b61a42503b0b52d84d4c420cb75de77eb1ecf643249cdd" => :mojave - 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 "pkg-config" => :build - depends_on "pugixml" => :build - depends_on "boost" - depends_on "flac" - depends_on "fmt" - depends_on "gettext" - depends_on "libebml" - depends_on "libmagic" - depends_on "libmatroska" - depends_on "libogg" - depends_on "libvorbis" - depends_on :macos => :mojave # C++17 - - uses_from_macos "libxslt" => :build - uses_from_macos "ruby" => :build - - 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/mlkit.rb b/Formula/mlkit.rb deleted file mode 100644 index a15983b72d84f..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.4.3.tar.gz" - sha256 "51ee5ced1dc639f2c58556dca0dec5c3243dba4705e1cdb91247fa9644b16625" - head "https://github.com/melsman/mlkit.git" - - bottle do - sha256 "52ac5d00915774111535053f287c05a63976c83ed7a5a900bbc263f030ea6900" => :mojave - sha256 "79694e15c915cb2c08b680b2b4404cfbbb6fff56e8f6b5f0196fcc485466d41b" => :high_sierra - sha256 "5df6b95fad69e10b31352824433251d3306a42c55c5e7164b0c47b986ea1009d" => :sierra - 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 aa37def745bac..0000000000000 --- a/Formula/mlogger.rb +++ /dev/null @@ -1,25 +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 "553fe787f0d6a1982544a74ec268d3db6bdf800d538238cd627ba39d8bb1cc37" => :catalina - 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/mlpack.rb b/Formula/mlpack.rb deleted file mode 100644 index f73f484f749ce..0000000000000 --- a/Formula/mlpack.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Mlpack < Formula - desc "Scalable C++ machine learning library" - homepage "https://www.mlpack.org/" - url "https://mlpack.org/files/mlpack-3.3.2.tar.gz" - sha256 "11904a39a7e34ee66028292fd054afb460eacd07ec5e6c63789aba117e4d854c" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "3b98834eb65f185a1b8d6c2d505995e51ee77443dad98da8c1f16b5ad5e665ee" => :catalina - sha256 "bee3717f1ce59530b51fed4f454fc0f56d459e15cf04cd262d9896ab98c3f0ac" => :mojave - sha256 "42fba9f2653c3deab2acec2de9276dd9787b09ce902ea5857d4bef9f10593ab1" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "pkg-config" => :build - depends_on "armadillo" - depends_on "boost" - depends_on "ensmallen" - depends_on "graphviz" - - resource "stb_image" do - url "https://mlpack.org/files/stb-2.22/stb_image.h" - sha256 "0e28238d865510073b5740ae8eba8cd8032cc5b25f94e0f7505fac8036864909" - end - - resource "stb_image_write" do - url "https://mlpack.org/files/stb-1.13/stb_image_write.h" - sha256 "0e8b3d80bc6eb8fdb64abc4db9fec608b489bc73418eaf14beda102a0699a4c9" - end - - def install - resources.each do |r| - r.stage do - (include/"stb").install "#{r.name}.h" - end - end - cmake_args = std_cmake_args + %W[ - -DDEBUG=OFF - -DPROFILE=OFF - -DBUILD_TESTS=OFF - -DDISABLE_DOWNLOADS=ON - -DUSE_OPENMP=OFF - -DARMADILLO_INCLUDE_DIR=#{Formula["armadillo"].opt_include} - -DENSMALLEN_INCLUDE_DIR=#{Formula["ensmallen"].opt_include} - -DARMADILLO_LIBRARY=#{Formula["armadillo"].opt_lib}/libarmadillo.dylib - -DSTB_IMAGE_INCLUDE_DIR=#{include/"stb"} - ] - mkdir "build" do - system "cmake", "..", *cmake_args - system "make", "install" - end - doc.install Dir["doc/*"] - (pkgshare/"tests").install "src/mlpack/tests/data" # Includes test data. - end - - test do - cd testpath do - system "#{bin}/mlpack_knn", - "-r", "#{pkgshare}/tests/data/GroupLensSmall.csv", - "-n", "neighbors.csv", - "-d", "distances.csv", - "-k", "5", "-v" - end - - (testpath/"test.cpp").write <<-EOS - #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; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-I#{Formula["armadillo"].opt_lib}/libarmadillo", - "-L#{lib}", "-lmlpack", "-o", "test" - system "./test", "--verbose" - end -end diff --git a/Formula/mlt.rb b/Formula/mlt.rb deleted file mode 100644 index 23e04d59bc7e8..0000000000000 --- a/Formula/mlt.rb +++ /dev/null @@ -1,36 +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.20.0.tar.gz" - sha256 "ab211e27c06c0688f9cbe2d74dc0623624ef75ea4f94eea915cdc313196be2dd" - license "LGPL-2.1" - - bottle do - sha256 "5703d5533277335653085a3beed96f9df7053865b49d069d2d9fc2106550c8f2" => :catalina - sha256 "3b5dbf20d3443b7695977c5b2e9a8dbdbe1aca98e60f79530ec61dcd01c42ca7" => :mojave - sha256 "5a16fe520d4e3f3b03178c528dfa2147309af558a3b08bb10f2cc283a59f218c" => :high_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 b6ece51565622..0000000000000 --- a/Formula/mlton.rb +++ /dev/null @@ -1,64 +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" - revision 1 - head "https://github.com/MLton/mlton.git" - - bottle do - cellar :any - sha256 "e4d9e5fec0e55d60bdc81cd6ffc97183ba8cd5c66c78fedcaa0a4272d582144c" => :catalina - sha256 "2749da8835666e447d6b8ab53046efe6ae8dbc9d85c2183c1fd69138a3988e91" => :mojave - sha256 "8a759cb940cabd8f547da4eb0d408b466c2afcea6e2ecf76691616885583cca9" => :high_sierra - end - - depends_on "gmp" - - # The corresponding upstream binary release used to bootstrap. - resource "bootstrap" do - on_macos do - url "https://downloads.sourceforge.net/project/mlton/mlton/20180207/mlton-20180207-1.amd64-darwin.gmp-static.tgz" - sha256 "bb2d982ef97d6ef4efe078d23a09baf3e52f6fd6c8f1a60016e1624438f487b3" - end - - on_linux do - url "https://downloads.sourceforge.net/project/mlton/mlton/20180207/mlton-20180207-1.amd64-linux.tgz" - sha256 "8e4abdb9f3ef81c01b989a66734dca2a7f4189c55673a1c8bbad54e7cb299838" - 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 - ] - 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 5e4b96033b283..0000000000000 --- a/Formula/mm-common.rb +++ /dev/null @@ -1,37 +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/1.0/mm-common-1.0.1.tar.xz" - sha256 "28a2d775afbf05c5c957b24b220ed6e9b2023179b98ecde471d89e9754ea5ac9" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "d7a3510229c192e7aad13d7099a922ad2626eb9edccefc5428cb62dc6eb3b31e" => :catalina - sha256 "bba33c2217224dc5a3ed1c091201db2c3cf5ce1a497ec690e39eb63fedb63116" => :mojave - sha256 "bba33c2217224dc5a3ed1c091201db2c3cf5ce1a497ec690e39eb63fedb63116" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "python@3.8" - - def install - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja" - system "ninja", "install" - end - end - - test do - mkdir testpath/"test" - touch testpath/"test/a" - - system bin/"mm-common-prepare", "-c", testpath/"test/a" - assert_predicate testpath/"test/compile-binding.am", :exist? - assert_predicate testpath/"test/dist-changelog.am", :exist? - assert_predicate testpath/"test/doc-reference.am", :exist? - assert_predicate testpath/"test/generate-binding.am", :exist? - end -end diff --git a/Formula/mmark.rb b/Formula/mmark.rb deleted file mode 100644 index 908bdd6e21faf..0000000000000 --- a/Formula/mmark.rb +++ /dev/null @@ -1,32 +0,0 @@ -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/v2.2.8.tar.gz" - sha256 "40b60dec408da6cc74844006ab3677b3e6218e1efbe9840ee4e96f9adc2e2564" - - bottle do - cellar :any_skip_relocation - sha256 "d32daeffa0d39c6a035fffc346b76d43f4a5976c75d8c1860b57e2a6ea2a3919" => :catalina - sha256 "a546cd07a4a8337a4371f91c1711b1c359760177e8f03a81f9e501864efc0a17" => :mojave - sha256 "a546cd07a4a8337a4371f91c1711b1c359760177e8f03a81f9e501864efc0a17" => :high_sierra - end - - depends_on "go" => :build - - resource "test" do - url "https://raw.githubusercontent.com/mmarkdown/mmark/master/rfc/2100.md" - sha256 "0b5383917a0fbc0d2a4ef009d6ccd787444ce2e80c1ea06088cb96269ecf11f0" - end - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"mmark" - man1.install "mmark.1" - prefix.install_metafiles - end - - test do - resource("test").stage do - assert_match "The Naming of Hosts", shell_output("#{bin}/mmark -ast 2100.md") - end - end -end diff --git a/Formula/mmctl.rb b/Formula/mmctl.rb deleted file mode 100644 index a23ceda1eccbe..0000000000000 --- a/Formula/mmctl.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Mmctl < Formula - desc "Remote CLI tool for Mattermost server" - homepage "https://github.com/mattermost/mmctl" - url "https://github.com/mattermost/mmctl.git", - :tag => "v5.25.0", - :revision => "c81bdf8d687f76c5da0205f8f612dc7f48969ca0" - license "Apache-2.0" - head "https://github.com/mattermost/mmctl.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "415f9f7185ece2cade017d9e5ace6843d60e9d298cac1e3159f954bd8cdf7da6" => :catalina - sha256 "b9516986947dcbe5bb62707b68d8b831dd0423d722f01151bef3e31582edae47" => :mojave - sha256 "5ca91ee16f3a798b7c9b68f589d5dc76b5b89ef01035f77871c2c03f087783a5" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOBIN"] = buildpath/bin - ENV["ADVANCED_VET"] = "FALSE" - ENV["BUILD_HASH"] = Utils.safe_popen_read("git", "rev-parse", "HEAD").chomp - ENV["BUILD_VERSION"] = version.to_s - (buildpath/"src/github.com/mattermost/mmctl").install buildpath.children - cd "src/github.com/mattermost/mmctl" do - system "make", "install" - - # Install the zsh and bash completions - output = Utils.safe_popen_read("#{bin}/mmctl", "completion", "bash") - (bash_completion/"mmctl").write output - output = Utils.safe_popen_read("#{bin}/mmctl", "completion", "zsh") - (zsh_completion/"_mmctl").write output - end - end - - test do - output = pipe_output("#{bin}/mmctl help 2>&1") - assert_no_match /.*No such file or directory.*/, output - assert_no_match /.*command not found.*/, output - assert_match /.*mmctl \[command\].*/, output - end -end diff --git a/Formula/mmix.rb b/Formula/mmix.rb deleted file mode 100644 index 3d48b4ec1cec6..0000000000000 --- a/Formula/mmix.rb +++ /dev/null @@ -1,41 +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 "ca577c8e313e25ce4b0ccdf1067a9fa1765b23a3f63b26905ad3aea044507ece" => :catalina - 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 2621b644bd81c..0000000000000 --- a/Formula/mmseqs2.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Mmseqs2 < Formula - desc "Software suite for very fast sequence search and clustering" - homepage "https://mmseqs.com/" - url "https://github.com/soedinglab/MMseqs2/archive/11-e1a1c.tar.gz" - version "11-e1a1c" - sha256 "ffe1ae300dbe1a0e3d72fc9e947356a4807f07951cb56316f36974d8d5875cbb" - license "GPL-3.0" - revision 1 - head "https://github.com/soedinglab/MMseqs2.git" - - bottle do - cellar :any_skip_relocation - sha256 "9bc41128722a0a926cc30fca2cfb29574bb150deb8acc482cd61e7e49e8169fb" => :catalina - sha256 "789fa0f2f9bef66df73de586236dbffb037f8a32794e47768818d1fc732c05e2" => :mojave - sha256 "d3f8b1a3ba35b0af1e80a0a917d915e8c19ea542bde20879c3031f1138af55aa" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libomp" - depends_on "wget" - - uses_from_macos "bzip2" - uses_from_macos "zlib" - - resource "documentation" do - url "https://github.com/soedinglab/MMseqs2.wiki.git", - :revision => "c77918c9cebb24075f3c102a73fb1d413017a1a5" - end - - def install - args = *std_cmake_args << "-DHAVE_TESTS=0" << "-DHAVE_MPI=0" - args << "-DVERSION_OVERRIDE=#{version}" - args << "-DHAVE_SSE4_1=1" - - libomp = Formula["libomp"] - args << "-DOpenMP_C_FLAGS=-Xpreprocessor\ -fopenmp\ -I#{libomp.opt_include}" - args << "-DOpenMP_C_LIB_NAMES=omp" - args << "-DOpenMP_CXX_FLAGS=-Xpreprocessor\ -fopenmp\ -I#{libomp.opt_include}" - args << "-DOpenMP_CXX_LIB_NAMES=omp" - args << "-DOpenMP_omp_LIBRARY=#{libomp.opt_lib}/libomp.a" - - 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 - "MMseqs2 requires at least SSE4.1 CPU instruction support." unless Hardware::CPU.sse4? - end - - test do - system "#{bin}/mmseqs", "createdb", "#{pkgshare}/examples/QUERY.fasta", "q" - system "#{bin}/mmseqs", "cluster", "q", "res", "tmp", "-s", "1" - system "#{bin}/mmseqs", "createtsv", "q", "q", "res", "res.tsv" - assert_predicate testpath/"res.tsv", :exist? - assert_predicate (testpath/"res.tsv").size, :positive? - end -end diff --git a/Formula/mmsrip.rb b/Formula/mmsrip.rb deleted file mode 100644 index 8952e96529d3e..0000000000000 --- a/Formula/mmsrip.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "084dec614496303468f92768c1f262f3a72abf9b839791e84711ed9288efb402" => :catalina - 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 1618befaf6833..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://deb.debian.org/debian/pool/main/m/mmv/mmv_1.01b.orig.tar.gz" - sha256 "0399c027ea1e51fd607266c1e33573866d4db89f64a74be8b4a1d2d1ff1fdeef" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "51d7db3a7205fc98d83a432261c2f86bc6992a30716fb8bbcb6c60c571cde00f" => :catalina - 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://raw.githubusercontent.com/Homebrew/formula-patches/0f8a80f7b337416d1a63ce453740fbe5bb5d158d/mmv/mmv_1.01b-15.diff" - sha256 "76f111f119c3e69e5b543276b3c680f453b9b72a0bfc12b4e95fb40770db60c1" - 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 76f3ab1f6bc27..0000000000000 --- a/Formula/moarvm.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Moarvm < Formula - desc "Virtual machine for NQP and Rakudo Perl 6" - homepage "https://moarvm.org/" - url "https://github.com/MoarVM/MoarVM/releases/download/2020.06/MoarVM-2020.06.tar.gz" - sha256 "db9759f16f76cb6d3b1f4baff9616c5ddb99fbb47ea62f54a5cc251b6ea99dc2" - - bottle do - sha256 "c72de5db670e00640c9d275c44d0450d5aba135941736db72f556db2a58986fc" => :catalina - sha256 "c7d5df8a6b997858d47fbbc7fced224b54054b632e4c651d51bdb208cf806bec" => :mojave - sha256 "b70cdc02c5da86e7d59d4fb636e3bddb9006ba88d744c5d3fb0b3a24b8fa00cc" => :high_sierra - end - - depends_on "libatomic_ops" - depends_on "libffi" - depends_on "libtommath" - depends_on "libuv" - - conflicts_with "rakudo-star", :because => "rakudo-star currently ships with moarvm included" - - resource("nqp") do - url "https://github.com/perl6/nqp/releases/download/2020.05/nqp-2020.05.tar.gz" - sha256 "291b92d9db968a691195adb1c9533edc1076d12d6617d6d931e40595e906b577" - 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") - 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 44a8c754b47e2..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" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "6912247da18b0d7f033d37115939a67629b93d036458f1369944a58953c12f69" => :catalina - sha256 "1d327ce17e123f4039b9b0e6c351277d8e781a6757dd23060b6b207d791380f8" => :mojave - sha256 "7ac3822649356127001c8b452df55c1435c467938193f223da61bbcdf2a7c11b" => :high_sierra - end - - # 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/moc.rb b/Formula/moc.rb deleted file mode 100644 index 5bf52096aeb23..0000000000000 --- a/Formula/moc.rb +++ /dev/null @@ -1,78 +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 "c2fce2f2fdc2d5eb7efddf393de7dc3d75ca4e387d84ae10029120eb5e2a4e53" => :catalina - 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 - "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/mockolo.rb b/Formula/mockolo.rb deleted file mode 100644 index 31262c3cc4069..0000000000000 --- a/Formula/mockolo.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Mockolo < Formula - desc "Efficient Mock Generator for Swift" - homepage "https://github.com/uber/mockolo" - url "https://github.com/uber/mockolo/archive/1.2.4.tar.gz" - sha256 "c2394a4f5e94cd0a6c8d380085b806e0fa4e52586ea3c888148ad9767ad9ef3b" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "1177ebf6dd5b6507305913a9738c54c842291a2956658fbc73ca682e04a50b21" => :catalina - end - - depends_on :xcode => ["11.4", :build] - - def install - system "swift", "build", "-c", "release", "--disable-sandbox" - bin.install ".build/release/mockolo" - end - - test do - (testpath/"testfile.swift").write(" - /// @mockable - public protocol Foo { - var num: Int { get set } - func bar(arg: Float) -> String - }") - system "#{bin}/mockolo", "-srcs", testpath/"testfile.swift", "-d", testpath/"GeneratedMocks.swift" - assert_predicate testpath/"GeneratedMocks.swift", :exist? - assert_equal " - /// - /// @Generated by Mockolo - /// - public class FooMock: Foo { - public init() { } - public init(num: Int = 0) { - self.num = num - } - - public var numSetCallCount = 0 - public var num: Int = 0 { didSet { numSetCallCount += 1 } } - - public var barCallCount = 0 - public var barHandler: ((Float) -> (String))? - public func bar(arg: Float) -> String { - barCallCount += 1 - if let barHandler = barHandler { - return barHandler(arg) - } - return \"\" - } - }".gsub(/\s+/, "").strip, shell_output("cat #{testpath/"GeneratedMocks.swift"}").gsub(/\s+/, "").strip - end -end diff --git a/Formula/mockserver.rb b/Formula/mockserver.rb deleted file mode 100644 index d618176d5ad4b..0000000000000 --- a/Formula/mockserver.rb +++ /dev/null @@ -1,39 +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.11.0/mockserver-netty-5.11.0-brew-tar.tar" - sha256 "458a2b8a62b17803a08385b0cc00df38128264cb5ab809f5f91d9ee5d56c327c" - - bottle :unneeded - - depends_on "openjdk" - - def install - 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/moco.rb b/Formula/moco.rb deleted file mode 100644 index 439ad542a5527..0000000000000 --- a/Formula/moco.rb +++ /dev/null @@ -1,41 +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/1.1.0/moco-runner-1.1.0-standalone.jar" - sha256 "cf970d4a74b834e8fc0df2059368c2d153924bb37c34f6a8cef5b8d886e71463" - - bottle :unneeded - - 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 <<~EOS - [ - { - "response" : - { - "text" : "Hello, Moco" - } - } - ] - EOS - - 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/modd.rb b/Formula/modd.rb deleted file mode 100644 index 87ed16e48b221..0000000000000 --- a/Formula/modd.rb +++ /dev/null @@ -1,42 +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.8.tar.gz" - sha256 "04e9bacf5a73cddea9455f591700f452d2465001ccc0c8e6f37d27b8b376b6e0" - license "MIT" - head "https://github.com/cortesi/modd.git" - - bottle do - cellar :any_skip_relocation - sha256 "bc54b5c78bf68af83b2ae7233f5bcaf20295ba803e82aa4a1ccd77e5a9dd9a9f" => :catalina - sha256 "d1b77821aff14d108379646434442ec9ca4869ec50867083c8e109c35dfb5095" => :mojave - sha256 "9dab505f6322b00919c69a8b396b25efb04f38341d2113c0681e6d12181b13d0" => :high_sierra - sha256 "165da808127db6197c4dd7e4b527118baf29aa74747d9c7ae84cad47d1bd8e79" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = "amd64" - 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 bc3bd3891f198..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.1.0.tar.gz" - sha256 "9d279c370eee29f54017ca20cf543efda87534bd6a584e7c0f489bbf931dccb8" - - 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 97bf5ac081423..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.13.tar.gz" - sha256 "d9efe8786826f54c3d2afa16f62a08e9a4e108cac429653a447055f6e5a0e8ec" - - 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 9ba037dc51013..0000000000000 --- a/Formula/modules.rb +++ /dev/null @@ -1,40 +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.5.1/modules-4.5.1.tar.bz2" - sha256 "8d9829905f79d379c2cf753c7fe6f7be1188853e859f81b44f5116337e8f49d9" - - bottle do - cellar :any - sha256 "0eff45eac8ca106c0682606a4e20e134dbdf0c76ff9273984a88fc48744a8190" => :catalina - sha256 "45dcef5e8a7e67b96b25cae336343eee677a699afff66ea4039742d1d6599d74" => :mojave - sha256 "06b3c839f16bda9ebdac25ea1519533994fdb84dd89dfe6de8f56fe685508765" => :high_sierra - end - - def install - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --datarootdir=#{share} - --with-tcl=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework - --without-x - ] - 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 3354fbb3ff65c..0000000000000 --- a/Formula/moe.rb +++ /dev/null @@ -1,26 +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.10.tar.lz" - mirror "https://ftpmirror.gnu.org/moe/moe-1.10.tar.lz" - sha256 "8cfd44ab5623ed4185ee53962b879fd9bdd18eab47bf5dd9bdb8271f1bf7d53b" - license "GPL-2.0" - - bottle do - sha256 "204f87443d288dd953d310ca2e2fa3de0051f460f1586e357ddfdcc540411412" => :catalina - sha256 "934ee30ec5f7f95c74183e5faf6ccc7ac36c426747476a5a0fb9628a6169de04" => :mojave - sha256 "fdfffe18871a25a5f0a8cf86ac8682f2cc6623dea335575d39f1dd529ee2ae46" => :high_sierra - sha256 "f83a8e961f1a7d295741a6abfe7434580761fa485e32498327ffb0e09322fa1e" => :sierra - 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/mogenerator.rb b/Formula/mogenerator.rb deleted file mode 100644 index 8913d5a39e3ff..0000000000000 --- a/Formula/mogenerator.rb +++ /dev/null @@ -1,27 +0,0 @@ -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/1.32.tar.gz" - sha256 "4fa660a19934d94d7ef35626d68ada9912d925416395a6bf4497bd7df35d7a8b" - license "MIT" - head "https://github.com/rentzsch/mogenerator.git" - - bottle do - cellar :any_skip_relocation - sha256 "ee338f12698ed624689a19d0d65bf7a7b471b1e70319757923c1f8e7feb3e597" => :catalina - sha256 "634c78c86eef97f5d9feb531b3864469806b672e0ca5dff6cd00762b76f3084c" => :mojave - sha256 "5e477fee1c770d7b4b676c1627017727a925aafd81fd38c30037691a4b624ebf" => :high_sierra - sha256 "aadafc4a282f98739d296f105f24c94666c90417f92c05644fd965dbb42aa37d" => :sierra - end - - depends_on :xcode => :build - - 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 8b7b090e78d46..0000000000000 --- a/Formula/molecule.rb +++ /dev/null @@ -1,327 +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/a9/fd/15bbaea312aaac5a5ab07bb20a9828cf389c15f28a615bd7b8ac3b4e4822/molecule-3.0.4.tar.gz" - sha256 "29137de659d45ecdef28d107c0dc7e85ab3d5e37d5d17813430a7cc15be5b02e" - license "MIT" - - bottle do - cellar :any - sha256 "7a5c0719f10cf8fb407a36a66dfbaf875c465278d8ad72264563f480764d55d8" => :catalina - sha256 "90688bf741045d1471d5ff2159924a6a78e4d53e85e5eaee15b28328540899ca" => :mojave - sha256 "f60c6c6614a5df0032b4b9f7de5775542608c925cef98c7cc9f4b31dc39ec0fc" => :high_sierra - end - - depends_on "ansible" - depends_on "openssl@1.1" - depends_on "python@3.8" - - on_linux do - depends_on "pkg-config" => :build - end - - # Collect requirements from: - # molecule - # docker-py - # python-vagrant - - resource "ansible" do - url "https://files.pythonhosted.org/packages/ae/b7/c717363f767f7af33d90af9458d5f1e0960db9c2393a6c221c2ce97ad1aa/ansible-2.9.6.tar.gz" - sha256 "59cf3a0781f89992d1dae5205b07e802dff1db205eebd238de9e503b62b8cbc9" - end - - resource "ansible-lint" do - url "https://files.pythonhosted.org/packages/fc/e6/e3cf96cb73b1920584cdcc8579164a70b7e8aab276b198f2130a7939efcc/ansible-lint-4.2.0.tar.gz" - sha256 "eb925d8682d70563ccb80e2aca7b3edf84fb0b768cea3edc6846aac7abdc414a" - end - - resource "anyconfig" do - url "https://files.pythonhosted.org/packages/4c/00/cc525eb0240b6ef196b98300d505114339bbb7ddd68e3155483f1eb32050/anyconfig-0.9.10.tar.gz" - sha256 "4e1674d184e5d9e56aad5321ee65612abaa7a05a03081ccf2ee452b2d557aeed" - end - - resource "arrow" do - url "https://files.pythonhosted.org/packages/17/d0/8a69308a5cf4f07c53dca744402606610ec910dda1a9cdc94b3fc4a0c3a5/arrow-0.15.5.tar.gz" - sha256 "5390e464e2c5f76971b60ffa7ee29c598c7501a294bc9f5e6dadcb251a5d027b" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/9f/3d/8beae739ed8c1c8f00ceac0ab6b0e97299b42da869e24cf82851b27a9123/asn1crypto-1.3.0.tar.gz" - sha256 "5a215cb8dc12f892244e3a113fe05397ee23c5c4ca7a69cd6e69811755efc42d" - end - - resource "backports.ssl_match_hostname" do - url "https://files.pythonhosted.org/packages/ff/2b/8265224812912bc5b7a607c44bf7b027554e1b9775e9ee0de8032e3de4b2/backports.ssl_match_hostname-3.7.0.1.tar.gz" - sha256 "bb82e60f9fbf4c080eabd957c39f0641f0fc247d9a16e31e26d594d8f42b9fd2" - end - - resource "binaryornot" do - url "https://files.pythonhosted.org/packages/a7/fe/7ebfec74d49f97fc55cd38240c7a7d08134002b1e14be8c3897c0dd5e49b/binaryornot-0.4.4.tar.gz" - sha256 "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061" - end - - resource "cerberus" do - url "https://files.pythonhosted.org/packages/90/a7/71c6ed2d46a81065e68c007ac63378b96fa54c7bb614d653c68232f9c50c/Cerberus-1.3.2.tar.gz" - sha256 "302e6694f206dd85cb63f13fd5025b31ab6d38c99c50c6d769f8fa0b0f299589" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - 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_help_colors" do - url "https://files.pythonhosted.org/packages/cc/3f/6d6f3edb803eb58cd619a19f3af073f9e1b80529c73e8b02b8cc12e0ee3c/click-help-colors-0.8.tar.gz" - sha256 "119e5faf69cfc919c995c5962326ac8fd87f11e56a371af594e3dfd8458f4c6e" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "configparser" do - url "https://files.pythonhosted.org/packages/e5/7c/d4ccbcde76b4eea8cbd73b67b88c72578e8b4944d1270021596e80b13deb/configparser-5.0.0.tar.gz" - sha256 "2ca44140ee259b5e3d8aaf47c79c36a7ab0d5e94d70bd4105c03ede7a20ea5a1" - end - - resource "cookiecutter" do - url "https://files.pythonhosted.org/packages/85/8a/2de4edcd122ba39506e349db6c1c7bb911763c8640b5aedbd18e201383c0/cookiecutter-1.7.0.tar.gz" - sha256 "479997e1c26c51bbbaf04097ef7d82b1d91cfb03f570cb5fb5ca265c88db04ae" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/9d/0a/d7060601834b1a0a84845d6ae2cd59be077aafa2133455062e47c9733024/cryptography-2.9.tar.gz" - sha256 "0cacd3ef5c604b8e5f59bf2582c076c98a37fe206b31430d0cd08138aff0986e" - 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 "flake8" do - url "https://files.pythonhosted.org/packages/a5/bb/7e707d8001aca96f15f684b02176ecb0575786f041293f090b44ea04f2d0/flake8-3.7.9.tar.gz" - sha256 "45681a117ecc81e870cbf1262835ae4af5e7a8b08e40b944a8a6e6b895914cfb" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz" - sha256 "b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - 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/d8/03/e491f423379ea14bb3a02a5238507f7d446de639b623187bccc111fbecdf/Jinja2-2.11.1.tar.gz" - sha256 "93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250" - 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/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - 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/ac/15/4351003352e11300b9f44a13576bff52dcdc6e4a911129c07447bda0a358/paramiko-2.7.1.tar.gz" - sha256 "920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/8a/a8/bb34d7997eb360bc3e98d201a20b5ef44e54098bb2b8e978ae620d933002/pbr-5.4.5.tar.gz" - sha256 "07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c" - end - - resource "pexpect" do - url "https://files.pythonhosted.org/packages/e5/9b/ff402e0e930e70467a7178abb7c128709a30dfb22d8777c043e501bc1b10/pexpect-4.8.0.tar.gz" - sha256 "fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" - end - - resource "pluggy" do - url "https://files.pythonhosted.org/packages/f8/04/7a8542bed4b16a65c2714bf76cf5a0b026157da7f75e87cc88774aa10b14/pluggy-0.13.1.tar.gz" - sha256 "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0" - end - - resource "poyo" do - url "https://files.pythonhosted.org/packages/7d/56/01b496f36bbd496aed9351dd1b06cf57fd2f5028480a87adbcf7a4ff1f65/poyo-0.5.0.tar.gz" - sha256 "e26956aa780c45f011ca9886f044590e2d8fd8b61db7b1c1cf4e0869f48ed4dd" - end - - resource "ptyprocess" do - url "https://files.pythonhosted.org/packages/7d/2d/e4b8733cf79b7309d84c9081a4ab558c89d8c89da5961bf4ddb050ca1ce0/ptyprocess-0.6.0.tar.gz" - sha256 "923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0" - end - - resource "py" do - url "https://files.pythonhosted.org/packages/bd/8f/169d08dcac7d6e311333c96b63cbe92e7947778475e1a619b674989ba1ed/py-1.8.1.tar.gz" - sha256 "5e27081401262157467ad6e7f851b7aa402c5852dbcb3dae06768434de5752aa" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/a4/db/fffec68299e6d7bad3d504147f9094830b704527a7fc098b721d38cc7fa7/pyasn1-0.4.8.tar.gz" - sha256 "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba" - end - - resource "pycodestyle" do - url "https://files.pythonhosted.org/packages/1c/d1/41294da5915f4cae7f4b388cea6c2cd0d6cd53039788635f6875dfe8c72f/pycodestyle-2.5.0.tar.gz" - sha256 "e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "pyflakes" do - url "https://files.pythonhosted.org/packages/f1/e2/e02fc89959619590eec0c35f366902535ade2728479fc3082c8af8840013/pyflakes-2.2.0.tar.gz" - sha256 "35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8" - end - - resource "pytest" do - url "https://files.pythonhosted.org/packages/6d/4e/572aed20422dee7fa2bd27995b2a53a32de90c1826e5531c9df6d3ea77ed/pytest-5.4.1.tar.gz" - sha256 "84dde37075b8805f3d1f392cc47e38a0e59518fb46a431cfdaf7cf1ce805f970" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "python-gilt/" do - url "https://files.pythonhosted.org/packages/01/18/01d7e1c159db5094ab04140ec66a4003db3622d843845dd706662b73f352/python-gilt-1.2.1.tar.gz" - sha256 "e23a45a6905e6bb7aec3ff7652b48309933a6991fad4546d9e793ac7e0513f8a" - 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/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "sh" do - url "https://files.pythonhosted.org/packages/7c/71/199d27d3e7e78bf448bcecae0105a1d5b29173ffd2bbadaa95a74c156770/sh-1.12.14.tar.gz" - sha256 "b52bf5833ed01c7b5c5fb73a7f71b3d98d48e9b9b8764236237bdc7ecae850fc" - end - - resource "shellingham" do - url "https://files.pythonhosted.org/packages/4b/f0/39516ebeaca978d6607609a283b15e7637622faffc5f01ecf78a49b24cd5/shellingham-1.3.2.tar.gz" - sha256 "576c1982bea0ba82fb46c36feb951319d7f42214a82634233f58b40d858a751e" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/57/6f/213d075ad03c84991d44e63b6516dd7d185091df5e1d02a660874f8f7e1e/tabulate-0.8.7.tar.gz" - sha256 "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007" - end - - resource "testinfra" do - url "https://files.pythonhosted.org/packages/df/56/a558a82fe91749c5682ab33fb1e17b8cbbec96fb254d03cc38527c790bd2/testinfra-5.0.0.tar.gz" - sha256 "b603bf25db98a6c5f13660c4197e73fa29722c6551bdf054f6eeadf8ef81541a" - end - - resource "tree-format" do - url "https://files.pythonhosted.org/packages/0d/91/8d860c75c3e70e6bbec7b898b5f753bf5da404be9296e245034360759645/tree-format-0.1.2.tar.gz" - sha256 "a538523aa78ae7a4b10003b04f3e1b37708e0e089d99c9d3b9e1c71384c9a7f9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - end - - resource "websocket-client" do - url "https://files.pythonhosted.org/packages/8b/0f/52de51b9b450ed52694208ab952d5af6ebbcbce7f166a48784095d930d8c/websocket_client-0.57.0.tar.gz" - sha256 "d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010" - end - - resource "whichcraft" do - url "https://files.pythonhosted.org/packages/67/f5/546c1494f1f8f004de512b5c9c89a8b7afb1d030c9307dd65df48e5772a3/whichcraft-0.6.1.tar.gz" - sha256 "acdbb91b63d6a15efbd6430d1d7b2d36e44a71697e93e19b7ded477afd9fce87" - end - - resource "yamllint" do - url "https://files.pythonhosted.org/packages/d5/27/40ebc69c0d9315d8102de1acdbec98263ac3c1665e6f6cfe5ed12db58ac8/yamllint-1.21.0.tar.gz" - sha256 "7e1e698b3d344b64bc46cbe8c4df7dfdfe7c00ed1a8d1c851ecd5b552d93d193" - end - - # Plugins - resource "molecule-vagrant" do - url "https://files.pythonhosted.org/packages/c6/43/04715a2ea68da7a255f5f3e54bbc74ae7cdccf4cf38ef6053e870be2a2df/molecule-vagrant-0.2.tar.gz" - sha256 "f963890c00d337535f51815971484dad1d6f4dcb7a485baa233f85ab70cbf036" - end - - def install - virtualenv_install_with_resources - end - - test do - # Test the Vagrant driver - system bin/"molecule", "init", "role", "foo-vagrant", "--driver-name", - "vagrant", "--verifier-name", "testinfra" - assert_predicate testpath/"foo-vagrant/molecule/default/molecule.yml", :exist?, - "Failed to create 'foo-vagrant/molecule/default/molecule.yml' file!" - assert_predicate testpath/"foo-vagrant/molecule/default/tests/test_default.py", :exist?, - "Failed to create 'foo-vagrant/molecule/default/tests/test_default.py' file!" - cd "foo-vagrant" do - system bin/"molecule", "list" - end - end -end diff --git a/Formula/molten-vk.rb b/Formula/molten-vk.rb deleted file mode 100644 index fabbde16b40c4..0000000000000 --- a/Formula/molten-vk.rb +++ /dev/null @@ -1,150 +0,0 @@ -class MoltenVk < Formula - desc "Implementation of the Vulkan graphics and compute API on top of Metal" - homepage "https://github.com/KhronosGroup/MoltenVK" - url "https://github.com/KhronosGroup/MoltenVK/archive/v1.0.41.tar.gz" - sha256 "a11208f3bc2eb5cd6cfebbc0bc09ac2af8ecbe5cc3e57cde817bc8bc96d2cc33" - license "Apache-2.0" - revision 1 - - bottle do - cellar :any - sha256 "1ec7cccd793a59f616a1e30cdfc31a4ee6013b22bf9c7e2c45dbec3f7ad9a34f" => :catalina - sha256 "519cedaddc397cc3a1234a61c5c25e5a7df589e097871e24d61fb9a15da64feb" => :mojave - end - - depends_on "cmake" => :build - depends_on "python@3.8" => :build - depends_on :xcode => ["11.0", :build] - # Requires IOSurface/IOSurfaceRef.h. - depends_on :macos => :sierra - - # MoltenVK depends on very specific revisions of its dependencies. - # For each resource the path to the file describing the expected - # revision is listed. - resource "cereal" do - # ExternalRevisions/cereal_repo_revision - url "https://github.com/USCiLab/cereal.git", - :revision => "51cbda5f30e56c801c07fe3d3aba5d7fb9e6cca4" - end - - resource "Vulkan-Headers" do - # ExternalRevisions/Vulkan-Headers_repo_revision - url "https://github.com/KhronosGroup/Vulkan-Headers.git", - :revision => "fb7f9c9bcd1d1544ea203a1f3d4253d0e90c5a90" - end - - resource "Vulkan-Portability" do - # ExternalRevisions/Vulkan-Portability_repo_revision - url "https://github.com/KhronosGroup/Vulkan-Portability.git", - :revision => "53be040f04ce55463d0e5b25fd132f45f003e903" - end - - resource "SPIRV-Cross" do - # ExternalRevisions/SPIRV-Cross_repo_revision - url "https://github.com/KhronosGroup/SPIRV-Cross.git", - :revision => "e58e8d5dbe03ea2cc755dbaf43ffefa1b8d77bef" - end - - resource "glslang" do - # ExternalRevisions/glslang_repo_revision - url "https://github.com/KhronosGroup/glslang.git", - :revision => "e157435c1e777aa1052f446dafed162b4a722e03" - end - - resource "SPIRV-Tools" do - # External/glslang/known_good.json - url "https://github.com/KhronosGroup/SPIRV-Tools.git", - :revision => "fd8e130510a6b002b28eee5885a9505040a9bdc9" - end - - resource "SPIRV-Headers" do - # External/glslang/known_good.json - url "https://github.com/KhronosGroup/SPIRV-Headers.git", - :revision => "f8bf11a0253a32375c32cad92c841237b96696c0" - end - - resource "Vulkan-Tools" do - # ExternalRevisions/Vulkan-Tools_repo_revision - url "https://github.com/KhronosGroup/Vulkan-Tools.git", - :revision => "7844b9b4e180612c7ca35bcb07ce7f86610b22c4" - end - - def install - resources.each do |res| - res.stage(buildpath/"External"/res.name) - end - mv "External/SPIRV-Tools", "External/glslang/External/spirv-tools" - mv "External/SPIRV-Headers", "External/glslang/External/spirv-tools/external/spirv-headers" - - mkdir "External/glslang/External/spirv-tools/build" do - # Required due to files being generated during build. - system "cmake", "..", *std_cmake_args - system "make" - end - - xcodebuild "-project", "ExternalDependencies.xcodeproj", - "-scheme", "ExternalDependencies-macOS", - "-derivedDataPath", "External/build", - "SYMROOT=External/build", "OBJROOT=External/build", - "build" - - xcodebuild "-project", "MoltenVKPackaging.xcodeproj", - "-scheme", "MoltenVK Package (macOS only)", - "SYMROOT=#{buildpath}/build", "OBJROOT=build", - "build" - - (libexec/"lib").install Dir["External/build/macOS/lib{SPIRVCross,SPIRVTools,glslang}.a"] - glslang_dir = Pathname.new("External/glslang") - Pathname.glob("External/glslang/{glslang,SPIRV}/**/*.{h,hpp}") do |header| - header.chmod 0644 - (libexec/"include"/header.parent.relative_path_from(glslang_dir)).install header - end - (libexec/"include").install "External/SPIRV-Cross/include/spirv_cross" - (libexec/"include").install "External/glslang/External/spirv-tools/include/spirv-tools" - (libexec/"include").install "External/Vulkan-Headers/include/vulkan" => "vulkan" - (libexec/"include").install "External/Vulkan-Portability/include/vulkan" => "vulkan-portability" - - frameworks.install "Package/Release/MoltenVK/macOS/framework/MoltenVK.framework" - lib.install "Package/Release/MoltenVK/macOS/dynamic/libMoltenVK.dylib" - lib.install "Package/Release/MoltenVK/macOS/static/libMoltenVK.a" - include.install "MoltenVK/MoltenVK/API" => "MoltenVK" - - bin.install "Package/Release/MoltenVKShaderConverter/Tools/MoltenVKShaderConverter" - frameworks.install "Package/Release/MoltenVKShaderConverter/MoltenVKGLSLToSPIRVConverter/" \ - "macOS/framework/MoltenVKGLSLToSPIRVConverter.framework" - frameworks.install "Package/Release/MoltenVKShaderConverter/MoltenVKSPIRVToMSLConverter/" \ - "macOS/framework/MoltenVKSPIRVToMSLConverter.framework" - lib.install "Package/Release/MoltenVKShaderConverter/MoltenVKGLSLToSPIRVConverter/" \ - "macOS/dynamic/libMoltenVKGLSLToSPIRVConverter.dylib" - lib.install "Package/Release/MoltenVKShaderConverter/MoltenVKGLSLToSPIRVConverter/" \ - "macOS/static/libMoltenVKGLSLToSPIRVConverter.a" - lib.install "Package/Release/MoltenVKShaderConverter/MoltenVKSPIRVToMSLConverter/" \ - "macOS/dynamic/libMoltenVKSPIRVToMSLConverter.dylib" - lib.install "Package/Release/MoltenVKShaderConverter/MoltenVKSPIRVToMSLConverter/" \ - "macOS/static/libMoltenVKSPIRVToMSLConverter.a" - include.install Dir["Package/Release/MoltenVKShaderConverter/include/" \ - "{MoltenVKGLSLToSPIRVConverter,MoltenVKSPIRVToMSLConverter}"] - - (share/"vulkan").install "MoltenVK/icd" => "icd.d" - end - - test do - (testpath/"test.cpp").write <<~EOS - #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; - } - EOS - system ENV.cc, "-o", "test", "test.cpp", "-I#{include}", "-I#{libexec/"include"}", "-L#{lib}", "-lMoltenVK" - system "./test" - end -end diff --git a/Formula/mon.rb b/Formula/mon.rb deleted file mode 100644 index 7b12eec1c9ac7..0000000000000 --- a/Formula/mon.rb +++ /dev/null @@ -1,26 +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 "becdcce9ec6a3ec5156cf27db02c50c26e99a9db9626c864abf9eb2f178ea57e" => :catalina - 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/monero.rb b/Formula/monero.rb deleted file mode 100644 index df3567b490569..0000000000000 --- a/Formula/monero.rb +++ /dev/null @@ -1,67 +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.16.0.1", - :revision => "a498a1b4ce432941dee47d74c7e05bf87acd3ad6" - - bottle do - cellar :any - sha256 "4154ef1ba9eb6f9edde06952f6d86766c3f1a83f4d8a2aaae79e6356985caf23" => :catalina - sha256 "3f442ab635b2d13ebdb52b4bc1cba06bf78e7e5ad655fe927118cdcdee26d26e" => :mojave - sha256 "bafff74dce6d7a44edfbed7abe7ac3792eb5693587f92006afc7357489aa7760" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "hidapi" - depends_on "libsodium" - depends_on "openssl@1.1" - depends_on "protobuf" - depends_on "readline" - depends_on "unbound" - depends_on "zeromq" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - - # Fix conflict with miniupnpc. - # This has been reported at https://github.com/monero-project/monero/issues/3862 - rm lib/"libminiupnpc.a" - end - - plist_options :manual => "monerod" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/monerod - --non-interactive - - RunAtLoad - - - - EOS - 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 aa5b5cea4faf0..0000000000000 --- a/Formula/monetdb.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Monetdb < Formula - desc "Column-store database" - homepage "https://www.monetdb.org/" - url "https://www.monetdb.org/downloads/sources/Jun2020/MonetDB-11.37.7.tar.xz" - sha256 "8496c9cb3a5e8d5493060f173ad92f773e804d6ba03b0e0f6fa607b57642b447" - - bottle do - rebuild 1 - sha256 "a3c41056e62e92756366845ea2c8edd548a55a5b29887f310e668ab6cd749ffd" => :catalina - sha256 "8d50a624839fff2dea6424b18549e0893e028b0233b64ee18a3bbdfe5523aca2" => :mojave - sha256 "d5d9aba84c98e71d848532723c74fbdfb616306d39ba696f89001e88b6837b3e" => :high_sierra - end - - head do - url "https://dev.monetdb.org/hg/MonetDB", :using => :hg - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "bison" => :build - depends_on "gettext" => :build - depends_on "libtool" => :build - end - - depends_on "libatomic_ops" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - 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" - system "make", "install" - end - - test do - # assert_match "Usage", shell_output("#{bin}/mclient --help 2>&1") - system("#{bin}/monetdbd", "create", "#{testpath}/dbfarm") - assert_predicate testpath/"dbfarm", :exist? - end -end diff --git a/Formula/mongo-c-driver.rb b/Formula/mongo-c-driver.rb deleted file mode 100644 index 5131c897452c3..0000000000000 --- a/Formula/mongo-c-driver.rb +++ /dev/null @@ -1,42 +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.16.2/mongo-c-driver-1.16.2.tar.gz" - sha256 "0a722180e5b5c86c415b9256d753b2d5552901dc5d95c9f022072c3cd336887e" - license "Apache-2.0" - head "https://github.com/mongodb/mongo-c-driver.git" - - bottle do - cellar :any - sha256 "bb6ab84a6dc183139d0f3fd2f8680094812fb9465858c4ddfd6a0479e9f6453f" => :catalina - sha256 "9fb343166799b012645fa0f031f81ec068ab5f196b60ddab201b0bb2446fe218" => :mojave - sha256 "2030cb7799a73518a952ee5b59348cbd90e52c56f41af0eb427a9edf3392da0e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "sphinx-doc" => :build - - uses_from_macos "zlib" - - def install - cmake_args = std_cmake_args - cmake_args << "-DBUILD_VERSION=1.17.0-pre" if build.head? - system "cmake", ".", *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 bee241633fedd..0000000000000 --- a/Formula/mongo-cxx-driver.rb +++ /dev/null @@ -1,48 +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.5.0.tar.gz" - sha256 "2a61369e616c4c08310586c339a27bddee0482305e1dcc83ce08e3529cfa5b7a" - license "Apache-2.0" - head "https://github.com/mongodb/mongo-cxx-driver.git" - - bottle do - cellar :any - sha256 "dc2851f80300a7e98efbca1943ed38ec8041af38443558b7e45273add8de9695" => :catalina - sha256 "d02839391a9fcd20c69442be2bd00a7c23bc604e4b1ce7828b7f9a4596debb66" => :mojave - sha256 "0b14ae6bcc3279d9257b89c8b5e3508876f8adbdb7a9bc67bff1f988ba7f0ee2" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "mongo-c-driver" - - def install - mongo_c_prefix = Formula["mongo-c-driver"].opt_prefix - system "cmake", ".", *std_cmake_args, - "-DBUILD_VERSION=#{version}", - "-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 513405cc9e363..0000000000000 --- a/Formula/mongo-orchestration.rb +++ /dev/null @@ -1,74 +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/72/34/9f010c4ac8569314569ea69a93a234d1dedf211666ab0b01b919d7843dba/mongo-orchestration-0.6.12.tar.gz" - sha256 "d73f7666424ee6e4b2143c1e2f72025b15236dacd07c80a374a44bb056d53a6b" - license "Apache-2.0" - head "https://github.com/10gen/mongo-orchestration.git" - - bottle do - cellar :any_skip_relocation - sha256 "33576a232a292049ed59ff028ce32bfd14e770742d2156cc04ee26cf20cb45ff" => :catalina - sha256 "cb16ab4631efca5cb55fa62e45b84d274169d432964ecef16c34e49380a636f7" => :mojave - sha256 "0f068f4639a7e4f7686bf5b6a80bd08b32e2ef4514dcecb4fbfb3dcd86c379be" => :high_sierra - end - - depends_on "python@3.8" - - resource "bottle" do - url "https://files.pythonhosted.org/packages/d9/4f/57887a07944140dae0d039d8bc270c249fc7fc4a00744effd73ae2cde0a9/bottle-0.12.18.tar.gz" - sha256 "0819b74b145a7def225c0e83b16a4d5711fde751cd92bae467a69efce720f69e" - 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/mongoose.rb b/Formula/mongoose.rb deleted file mode 100644 index ca3af3db16672..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.17.tar.gz" - sha256 "5bff3cc70bb2248cf87d06a3543f120f3b29b9368d25a7715443cb10612987cc" - - bottle do - cellar :any - sha256 "3eb55e73c26957e647dcc4f978fa7d4d5ae2b223fa631d208f07b341d26ac0d5" => :catalina - sha256 "cb43e1b9e539db8348d6038fbe56ca787b02428f3c585cd0528c3c4521a26222" => :mojave - sha256 "a65aaee3abb441a26728b8f08c5fa81845f5636d676fadaba5881da4da04ee71" => :high_sierra - end - - depends_on "openssl@1.1" - - 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 2e59f5c82aa84..0000000000000 --- a/Formula/mongrel2.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Mongrel2 < Formula - desc "Application, language, and network architecture agnostic web server" - homepage "https://mongrel2.org/" - license "BSD-3-Clause" - 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 "a8fec9c22f23f3347c2ffff44b25e07920ba8dd7e24c0001f0b3fc73fce07407" => :catalina - sha256 "cfda97fdc8cf6fa5ee0b4f1b48b07840b1560bd73ced286bb574f838148e6f25" => :mojave - sha256 "67696f654ab1d878ac7c2a3fa254b0ee86c1d444578045997a971ca44189b2fe" => :high_sierra - sha256 "293b0edc8bcc0b7e3a97748a6accbc5000916ed145fd467aeb809303438a207a" => :sierra - sha256 "7a6880cbc814b084a3ac91e379b7a720438951e31a18119c232f976fded229c3" => :el_capitan - sha256 "0b2926fe3d79ab934e95f0e5c067e8bb23b6900b99255482defee9388a0dee07" => :yosemite - sha256 "dd07092a2384c243fcd8c54ed67f2a728f3da698276540fc1c9b201eb3c5cbbb" => :mavericks - end - - depends_on "zeromq" - - uses_from_macos "sqlite" - - 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 2731c6eb9e0dc..0000000000000 --- a/Formula/mongroup.rb +++ /dev/null @@ -1,28 +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 "57c107a2746fae7e9db832f54df3d5170449defc30334094939794288659f026" => :catalina - 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 8ddd3d52dd93e..0000000000000 --- a/Formula/monit.rb +++ /dev/null @@ -1,54 +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.27.0.tar.gz" - sha256 "d8c0deef624f193a952502fe9baabfa66e3d8d057df5738da43f9a37792afca4" - - bottle do - cellar :any - sha256 "244bbb87c88f90a08e157cf9fb50e501d15369a1c79cf66badb766bdd8de6fbb" => :catalina - sha256 "dfe692f5f8a4320956f237dd920d59a06801c8e89dfcca6aba01a2e2f9a0bbab" => :mojave - sha256 "7548c14639efa1102971eaf6f1d61dd32e4a6384afe2cfb70e20333979aa7338" => :high_sierra - end - - depends_on "openssl@1.1" - - def install - system "./configure", "--prefix=#{prefix}", - "--localstatedir=#{var}/monit", - "--sysconfdir=#{etc}/monit", - "--with-ssl-dir=#{Formula["openssl@1.1"].opt_prefix}" - system "make" - system "make", "install" - etc.install "monitrc" - end - - plist_options :manual => "monit -I -c #{HOMEBREW_PREFIX}/etc/monitrc" - - def plist - <<~EOS - - - - - Label #{plist_name} - ProcessType Adaptive - Disabled - RunAtLoad - LaunchOnlyOnce - ProgramArguments - - #{opt_bin}/monit - -I - -c - #{etc}/monitrc - - - - EOS - end - - test do - system bin/"monit", "-c", "#{etc}/monitrc", "-t" - end -end diff --git a/Formula/monitoring-plugins.rb b/Formula/monitoring-plugins.rb deleted file mode 100644 index 21eda192a8a12..0000000000000 --- a/Formula/monitoring-plugins.rb +++ /dev/null @@ -1,44 +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" - revision 1 - - bottle do - cellar :any - sha256 "24ba799d36a93d5cde26e1e52616166881164cabddd6c1c14a19316a07eebd6b" => :catalina - sha256 "3aa775909751c2a826325b07f0a9b77df5160af6bacfa4f8cb082e635045c620" => :mojave - sha256 "81f794e4736584eba6ecfc32b6c79b877579b3841e66b9f70754f98c499a5098" => :high_sierra - sha256 "0fa42fdf9687faa06a7566322cf9014d06040338e5a988da6aef130b15e2953a" => :sierra - end - - depends_on "openssl@1.1" - - conflicts_with "nagios-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@1.1"].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 "DNS OK", output - end -end diff --git a/Formula/monkeysphere.rb b/Formula/monkeysphere.rb deleted file mode 100644 index ffff4aa87cbbb..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://deb.debian.org/debian/pool/main/m/monkeysphere/monkeysphere_0.44.orig.tar.gz" - sha256 "6ac6979fa1a4a0332cbea39e408b9f981452d092ff2b14ed3549be94918707aa" - revision 1 - head "git://git.monkeysphere.info/monkeysphere" - - bottle do - cellar :any - sha256 "b81913712d547ed0cafbb84478af579142a7409a8c15a2349c8e0eadba5693eb" => :catalina - sha256 "d5c8badc7a3296cd5150f3520a0abf61aa4a683a43d121961b412ff619aaa4d1" => :mojave - sha256 "5928a7723f50b5ce5c505571570a6bb82823f6faf0133ab2f9b0f2757a9b68fc" => :high_sierra - sha256 "f1bbf185764cd974016f73e4a6d037cec60a83b57c3a3314797aa8aa60edf1bb" => :sierra - end - - depends_on "gnu-sed" => :build - depends_on "gnupg" - depends_on "libassuan" - depends_on "libgcrypt" - depends_on "libgpg-error" - depends_on "openssl@1.1" - - 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 - - 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 f8c052fcb40d1..0000000000000 --- a/Formula/mono-libgdiplus.rb +++ /dev/null @@ -1,56 +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/6.0.5.tar.gz" - sha256 "1fd034f4b636214cc24e94c563cd10b3f3444d9f0660927b60e63fd4131d97fa" - - bottle do - cellar :any - sha256 "14bb84ad43cf17791299bcc76e3d410f7c7176f169f2cfcfcbc65bda3d8abbf8" => :catalina - sha256 "1e7e0566530f6cbefd2e7a57d1fdcaead797d36f07a1688e2b7a8460a0ac96f7" => :mojave - sha256 "3c57fe1805bb35d6bc87b1c96e99e523357226a1089b4892efc520941dbfc245" => :high_sierra - 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 a647fa0a7d7ba..0000000000000 --- a/Formula/mono.rb +++ /dev/null @@ -1,148 +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-6.8.0.123.tar.xz" - sha256 "e2e42d36e19f083fc0d82f6c02f7db80611d69767112af353df2f279744a2ac5" - - bottle do - sha256 "5d9418923f6bc1705af86db81c56beff8b3a3d12c15e99ecbc7dffc2306817e1" => :catalina - sha256 "c7e8edb593056e88bbf9e2e2bf990045f1400ed72d77ebcfcd90818d07f4ecce" => :mojave - sha256 "7fcbbda42e4f412d8849ac21c070ccc2333e086049efe17a03703413952ddd8f" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on :macos # Due to Python 2 - - 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.3", - :revision => "e31bc96e8a5e5742af1c6c45d55d5cc06bb524cb" - 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 => "ad9c9926a76e3db0d2b878a24d44446d73640d19" - end - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-silent-rules", - "--enable-nls=no" - 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 "./eng/cibuild_bootstrapped_msbuild.sh", "--host_type", "mono", - "--configuration", "Release", "--skip_tests" - 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 - resource("fsharp").stage do - ENV.prepend_path "PKG_CONFIG_PATH", lib/"pkgconfig" - system "make" - system "make", "install" - end - 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 <<~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" - - # 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 diff --git a/Formula/monolith.rb b/Formula/monolith.rb deleted file mode 100644 index 6d0736baef7f1..0000000000000 --- a/Formula/monolith.rb +++ /dev/null @@ -1,26 +0,0 @@ -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/v2.2.7.tar.gz" - sha256 "8fa8ea66383f7278f6fcbe1ba75ffc9243b93031a88725135ca3b0eeb38c7df9" - license "Unlicense" - - bottle do - cellar :any_skip_relocation - sha256 "dfe598be69f1960dbf3168d1f4f18f385ccc771912196fe903f7850426ef8116" => :catalina - sha256 "99ff8d9c27b9d6fa01c45d91307b73bab26c1245803909f0ebe22eadafdb329d" => :mojave - sha256 "4f7ecfda2f7bf61a960d53a804a64d89fce3cae3f9c48b1a28e8b75fe435df82" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "openssl@1.1" - - 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/montage.rb b/Formula/montage.rb deleted file mode 100644 index c52353d5bda14..0000000000000 --- a/Formula/montage.rb +++ /dev/null @@ -1,36 +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 "0335521dd15d7debbfb5db21efbf5f751c571d406fd91aeaa9996226cca63d33" => :catalina - 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 75397010976d4..0000000000000 --- a/Formula/moon-buggy.rb +++ /dev/null @@ -1,35 +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" - license "GPL-3.0" - - bottle do - sha256 "65bae44959589316ec4762947051a3f737ea8545d0b93e696d0c251ef38285dc" => :catalina - 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 2ebca86e7a232..0000000000000 --- a/Formula/moreutils.rb +++ /dev/null @@ -1,63 +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.63", - :revision => "aeddd0f4caa9d10aaa691040773fa4764e12ff46" - head "https://git.joeyh.name/git/moreutils.git" - - bottle do - cellar :any_skip_relocation - sha256 "0277b44f53cc7e581c338a28fa330e4d436cd05757d99cfc9baa1f5ca095af4c" => :catalina - sha256 "a3d5a342bf079998b52d172f0f5e8b066b256145e2eb3ded393a0e6e2680b573" => :mojave - sha256 "3731c1304a72a7a0486891bf592cd82b7422d0c37cadeb00b6f633e62f20aa35" => :high_sierra - sha256 "fac2ba67a62889ff07edb8257e0d13aa96143a7421521ffdf3e0cf685a1cdc1e" => :sierra - end - - depends_on "docbook-xsl" => :build - - uses_from_macos "libxml2" => :build - uses_from_macos "libxslt" => :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 71a208ee0d8ba..0000000000000 --- a/Formula/morse.rb +++ /dev/null @@ -1,24 +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 "b97853e5c7a071e81c9fc7845f9467ebe00fab07fd0c738532230d3463d1826b" => :catalina - 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 6952fdc30a24f..0000000000000 --- a/Formula/mosh.rb +++ /dev/null @@ -1,52 +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 11 - - bottle do - cellar :any - sha256 "d864ba6a3869df2fd47894862f5f0b7d8e5f5f55daf58742243fa3ca8c69d474" => :catalina - sha256 "1f46edf8fbd83303ea4156530357207b6ad538a6abbbd5118f9c39e4898a4a19" => :mojave - sha256 "c8aa1ef313d62059bd8abee131880d5fa73f45e961388c055bc5f89970bcaf24" => :high_sierra - 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 - depends_on "protobuf" - - uses_from_macos "ncurses" - - # Fix mojave build. - unless build.head? - patch do - url "https://github.com/mobile-shell/mosh/commit/e5f8a826ef9ff5da4cfce3bb8151f9526ec19db0.patch?full_index=1" - sha256 "022bf82de1179b2ceb7dc6ae7b922961dfacd52fbccc30472c527cb7c87c96f0" - end - end - - 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" - 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 c36bada79febe..0000000000000 --- a/Formula/mosml.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Mosml < Formula - desc "Moscow ML" - homepage "https://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 - 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 de11496e700dc..0000000000000 --- a/Formula/mosquitto.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Mosquitto < Formula - desc "Message broker implementing the MQTT protocol" - homepage "https://mosquitto.org/" - url "https://mosquitto.org/files/source/mosquitto-1.6.10.tar.gz" - sha256 "92d1807717f0f6d57d1ac1207ffdb952e8377e916c7b0bb4718f745239774232" - - bottle do - cellar :any - sha256 "5ddfb287cb31bebc6ed03919d4dad9929a41a32d208b18e84fa7d93004a4bf4c" => :catalina - sha256 "26b87ebf33eb37ee27f1ea0eb05841c4e6d68c0ec3436ba1df15c542734fc27e" => :mojave - sha256 "c93f76bc649b7999229e88478fdae1501a18292fe122353bbcd1eb3323f5747e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "libwebsockets" - depends_on "openssl@1.1" - - on_linux do - depends_on "util-linux" - end - - 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 1c03cbb72e788..0000000000000 --- a/Formula/most.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Most < Formula - desc "Powerful paging program" - homepage "https://www.jedsoft.org/most/" - url "https://www.jedsoft.org/releases/most/most-5.1.0.tar.gz" - sha256 "db805d1ffad3e85890802061ac8c90e3c89e25afb184a794e03715a3ed190501" - head "git://git.jedsoft.org/git/most.git" - - bottle do - cellar :any - sha256 "2971d721787d978c1855827c1f2cb6143ee0d1efabdfe1caa50bda981865a24d" => :catalina - sha256 "aa9766e4fa0be084108b370c639060b7a27e5ff8eb90c649cbc643160659932f" => :mojave - sha256 "192ccb3fe86ae7766bd1aadb8e92d8bc7a28cb666fffe52d0750c6c2a4450657" => :high_sierra - sha256 "9a9d74a50ade82af787d47e5f6514df01a47b5159dc1521d93c470ce8554743e" => :sierra - 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 02e4b647ed854..0000000000000 --- a/Formula/movgrab.rb +++ /dev/null @@ -1,52 +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://github.com/ColumPaget/Movgrab/archive/3.1.2.tar.gz" - sha256 "30be6057ddbd9ac32f6e3d5456145b09526cc6bd5e3f3fb3999cc05283457529" - license "GPL-3.0" - revision 2 - - bottle do - cellar :any - sha256 "b3032648e55b090ca256192c989683f3b0a26942f38f0460dce9457548c14fe0" => :catalina - sha256 "b0e5153f5147c8d256685dfa8be4ac67bc863bb472afcaf769caa133fb94b889" => :mojave - sha256 "7702b7817fc398f4901014bd6162578294da414a18b1ae4e5f10ef8cf05a678c" => :high_sierra - end - - depends_on "libressl" - - # 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://github.com/Homebrew/formula-patches/raw/936597e74d22ab8cf421bcc9c3a936cdae0f0d96/movgrab/libUseful_xattr_backport.diff" - sha256 "d77c6661386f1a6d361c32f375b05bfdb4ac42804076922a4c0748da891367c2" - end - - def install - # 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", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking", "--enable-ssl" - 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 b48ce873733d4..0000000000000 --- a/Formula/moz-git-tools.rb +++ /dev/null @@ -1,47 +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 "2bd3c22ef9b16601e84d060db320ca9f0a3ad8713a0a8a1274446ea35c418d0c" => :catalina - 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 dd6b242d45772..0000000000000 --- a/Formula/mozjpeg.rb +++ /dev/null @@ -1,39 +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 "ef7d5b06f03e05a4babab7b464bb83475a9a3fedbaa78e1ceedf23f051828e4c" => :catalina - 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 37f9b47423b06..0000000000000 --- a/Formula/mp3blaster.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - - bottle do - sha256 "5345ef5c262adc849318b2ee1cb092d794be9b9b952ebf23b0dbf666f8a5f460" => :catalina - 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 42b87925e16b1..0000000000000 --- a/Formula/mp3cat.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Mp3cat < Formula - desc "Reads and writes mp3 files" - homepage "https://tomclegg.ca/mp3cat" - url "https://github.com/tomclegg/mp3cat/archive/0.5.tar.gz" - sha256 "b1ec915c09c7e1c0ff48f54844db273505bc0157163bed7b2940792dca8ff951" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "07766f0495aa6c8566d8594a64f5004d1ad56f7e522f90cc1dcaf58001e7d2ab" => :catalina - sha256 "e075f29990e6b5222d3e82ed27de698bed42257097e9bd59f0d60f64ea7ae46b" => :mojave - sha256 "91152cced755097c42117c72e71f3db9023716e2e9befd1e8a6630fd225e3cea" => :high_sierra - sha256 "3954ad75806e1948a4e69efb74fb2e86a4920c7e6b61537ca48f696289ca998a" => :sierra - 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 d06d1c51b2c14..0000000000000 --- a/Formula/mp3check.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a98298c030d1ee1a28e2227ed41970fcad21d2af6486c471d045b07010ac232b" => :catalina - 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 21c154c94f19c..0000000000000 --- a/Formula/mp3fs.rb +++ /dev/null @@ -1,30 +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/v1.0/mp3fs-1.0.tar.gz" - sha256 "cbb52062d712e8dfd3491d0b105e2e05715d493a0fd14b53a23919694a348069" - - bottle do - cellar :any - sha256 "26d991c2fb34055035c01d12033f28b5a694954ad9b3f650658dfa1ebc9994ea" => :catalina - sha256 "a9f6095147b767a892891bdc0a44b61eef40880e38bc50e54c0a30d96de89985" => :mojave - sha256 "b3b2e431e9a782dbde9d758505c372a0d6ed60eff44ebc21c9b979c01b0df189" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "lame" - depends_on "libid3tag" - depends_on "libvorbis" - 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 dbe5c2f321b2a..0000000000000 --- a/Formula/mp3gain.rb +++ /dev/null @@ -1,27 +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 "27dbf67d73a4f63cd06cc568b8a40d09e3fec5e858c447da1750b2093046d795" => :catalina - 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 ac52d0fd16446..0000000000000 --- a/Formula/mp3info.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "4f70eb02805d1fe2a93dc169b9baf2a3d1c685ded71094241189c93599ba6662" => :catalina - 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 d04bf079133d8..0000000000000 --- a/Formula/mp3splt.rb +++ /dev/null @@ -1,27 +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" - revision 1 - - bottle do - sha256 "d2a1ca7bd32f12b0cb152031cf812ab5af2fcef906f4a5d4fc1939f5d6b37e12" => :catalina - sha256 "fb9ec207370028ac673f0f4e067dbae93d19e567ca80ab46e9e49d895262ac81" => :mojave - sha256 "5dac4b6a6632c234ad5137084275924e1fcc32833a333924cc55fc50da51afe3" => :high_sierra - sha256 "86a18b472c2b9a7b603da79caa1e406c3ca73d717a508cf6999ae2c73a6b7870" => :sierra - 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 aefb669ec26e3..0000000000000 --- a/Formula/mp3unicode.rb +++ /dev/null @@ -1,40 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "61f39a1605947240874a49624d9aff5aa848c3edcf24017c70f70fc1c7c04e2b" => :catalina - 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 0c914abc12ea0..0000000000000 --- a/Formula/mp3val.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "c08b493f2f59730486c427b795112ea1c730fb9bb7dcbc0bc9158c2c28a30c51" => :catalina - sha256 "4ca5fe184a5427aea0df6910d654955c162268f803c1c372d11dd2305ad67513" => :mojave - sha256 "f17a5c03d59e7665d2b85db559561a3375ff03a6e02911514a0adde35e188a06" => :high_sierra - sha256 "649cf78ba7bc387f346a6685b8c83bec495a5e75ea0fa6d93135cc36ec898f5f" => :sierra - sha256 "d13a9b31c885d1704a0cc5e1ff6b995acd616248abcf5276fc068b78f7be785f" => :el_capitan - sha256 "298b6b2835de5f1aa3cef2f9435da3935ffbcfa49468511676661e8eaff8ca70" => :yosemite - sha256 "0828eb9f4e02af5014e1b8d82be9ad54797b0de6a299b05a1ef0daa86bc5dbe2" => :mavericks - 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 7e9019b1219a6..0000000000000 --- a/Formula/mp3wrap.rb +++ /dev/null @@ -1,31 +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 "fa93ce86b2a055521e166325b4219773f04c6886075bd77932dcb6dff436ddce" => :catalina - 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 71c1bb8da4982..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 "bf2838fe1bf196c40546bfb7a5800bce710aaf55305a05b719d07d9de2e5b24e" => :catalina - sha256 "bd4c8e435216cbfc4ed60030e1cd4135156643f8befa1477061c1e59292394bb" => :mojave - sha256 "359eecfb160a0d31975961933b50c7ba512891aedd053e3e9153edba1da364c3" => :high_sierra - sha256 "6cab2b32c845f6d54cdb8d64c558126cec39c27fb77a92f204bb8abda1c0ccfa" => :sierra - sha256 "52d299e61126db288d73a3e6e8b40c3eff25af1c7498c4a74787dce2dda02e9a" => :el_capitan - sha256 "14ca4b71690959d461d41b4338be70005de4553566996677f973094c1a56c3fb" => :yosemite - sha256 "bb51275338ca5b157b303fb9d024922c9b73ddcac69973ba2fe9d880ad6dc914" => :mavericks - 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 b55ab7309ac0d..0000000000000 --- a/Formula/mpack.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Mpack < Formula - desc "MIME mail packing and unpacking" - homepage "https://web.archive.org/web/20190220145801/ftp.andrew.cmu.edu/pub/mpack/" - url "https://web.archive.org/web/20190220145801/ftp.andrew.cmu.edu/pub/mpack/mpack-1.6.tar.gz" - mirror "https://fossies.org/linux/misc/old/mpack-1.6.tar.gz" - sha256 "274108bb3a39982a4efc14fb3a65298e66c8e71367c3dabf49338162d207a94c" - - bottle do - cellar :any_skip_relocation - sha256 "ff16423c77dd09cecfe82eccf516d4159cefe7b7d1b18b48af31ad14ec6d93d6" => :catalina - 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 559ea3aba81bd..0000000000000 --- a/Formula/mpage.rb +++ /dev/null @@ -1,28 +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 "4b21863fb89e5381c2d4c3ad496809014479b961c3885dbe09ee55434382db6f" => :catalina - 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 33c4471254596..0000000000000 --- a/Formula/mpc.rb +++ /dev/null @@ -1,33 +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.33.tar.xz" - sha256 "4f40ccbe18f5095437283cfc525a97815e983cbfd3a29e48ff610fa4f1bf1296" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "341a4c3cef23004a47f37fa299047e63baedceb07405813d6fc112c9ad7d4ff2" => :catalina - sha256 "29742180fafe0fffeba3fc09c3d355395084ef3d063004347a96bc37c72682db" => :mojave - sha256 "84bd2c475a7880bf1f36c560a5696c12c27ff6cdb5cd907082d14ffd094b1081" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "libmpdclient" - - def install - system "meson", *std_meson_args, ".", "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 dd1733f761841..0000000000000 --- a/Formula/mpck.rb +++ /dev/null @@ -1,25 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "45f8695f2758dd07237c333e8a17aa38f8d0aed4e87e8b5dc7fea7bf4537b0e9" => :catalina - sha256 "e819ac8ce7eab3b4f83bcdf83cfbb129a9e3cebb36e314dabca646f808ed6257" => :mojave - sha256 "3ecd47f83f5645cfaf2bfef23b5b9a1b14bb36f2ec146409ca44d9d5f25c3401" => :high_sierra - sha256 "cd283270b83cf83c3e3a3c393404c1eca16e1620ced195821b97fe5ad6b39236" => :sierra - 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 2563de5d4a171..0000000000000 --- a/Formula/mpd.rb +++ /dev/null @@ -1,134 +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.24.tar.xz" - sha256 "84632a7e82e672b3a6d71651a75d05fb7acd62645c33e3f3af5a1067cfa64cd6" - license "GPL-2.0" - head "https://github.com/MusicPlayerDaemon/MPD.git" - - bottle do - cellar :any - sha256 "afeeb86ddfedd0c66cb703abad7d967dcd5e5d5199b880642f00390c678d9c97" => :catalina - sha256 "cfad8e2a2f6ddf22d85cab6570c784da25776782c67c5b6d65fa2596c8c10467" => :mojave - sha256 "2d303a1da07f1d9fbdca65fb08fdef4134fd066e6408c6dddbe750000f4323fb" => :high_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 "libgcrypt" - depends_on "libid3tag" - depends_on "libmpdclient" - depends_on "libnfs" - depends_on "libsamplerate" - depends_on "libupnp" - depends_on "libvorbis" - depends_on "opus" - depends_on "sqlite" - - 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 = std_meson_args + %W[ - --sysconfdir=#{etc} - -Dlibwrap=disabled - -Dmad=disabled - -Dmpcdec=disabled - -Dsoundcloud=disabled - -Dao=enabled - -Dbzip2=enabled - -Dexpat=enabled - -Dffmpeg=enabled - -Dfluidsynth=enabled - -Dnfs=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 - port = free_port - - (testpath/"mpd.conf").write <<~EOS - bind_to_address "127.0.0.1" - port "#{port}" - EOS - - pid = fork do - exec "#{bin}/mpd --stdout --no-daemon #{testpath}/mpd.conf" - end - sleep 2 - - begin - 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 - 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 6df65e1c73d58..0000000000000 --- a/Formula/mpdas.rb +++ /dev/null @@ -1,52 +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 "db93645db3fef2737193f310b8261a435ad79c426e186c6127017b37cc81ef66" => :catalina - 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 - - plist_options :manual => "mpdas" - - def plist - <<~EOS - - - - - Label - #{plist_name} - WorkingDirectory - #{HOMEBREW_PREFIX} - ProgramArguments - - #{opt_bin}/mpdas - - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - system bin/"mpdas", "-v" - end -end diff --git a/Formula/mpdscribble.rb b/Formula/mpdscribble.rb deleted file mode 100644 index d4e3c7aac685c..0000000000000 --- a/Formula/mpdscribble.rb +++ /dev/null @@ -1,59 +0,0 @@ -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.22/mpdscribble-0.22.tar.gz" - sha256 "ff882d02bd830bdcbccfe3c3c9b0d32f4f98d9becdb68dc3135f7480465f1e38" - revision 2 - - bottle do - sha256 "d8e226d580e44da3f93849bfdd6065a356e9d0e2cf086c31cc4be273e3152980" => :catalina - sha256 "f6c7e1d2b4f6112ae2b0548e0571580f4f671789e81eb799efc92ac236cd2d0b" => :mojave - sha256 "68c6dcdc89b8cbdd8b8c5fea0822cfdb883874b390cb5a9a69192880a3b03838" => :high_sierra - sha256 "bfc893a2fe7e712bfc17f83aeb7e5f9cf46d260f3d5756cd499a6a6100c1feec" => :sierra - 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 4ebf452fda916..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" - license "MIT" - - bottle do - cellar :any - rebuild 1 - sha256 "f65d98aebf9bee4de6dce79983fe91b20f95d731be71999021639bdd7c8c14e9" => :catalina - sha256 "dcc5deb65626637f6a4182f96e1ccd441a462c55657e134d2277a70be8246278" => :mojave - sha256 "1f1b0b01dcfd1c37b7820ae93a9775abcd5b1abcdb8a5a4038d348e517b3c87a" => :high_sierra - 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 b3f25e50a1cb4..0000000000000 --- a/Formula/mpegdemux.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "1fd3f22495cec5d802f73def919457122829cc617e0a7ca82a91d10e0ab8001f" => :catalina - 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 28ca0cc307dd2..0000000000000 --- a/Formula/mpfi.rb +++ /dev/null @@ -1,46 +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" - license "GPL-3.0" - - bottle do - cellar :any - rebuild 1 - sha256 "950fb479ad3748345f0410a7ce02d70527d9757d0c20ea1ed73d8f3f4e1c512c" => :catalina - sha256 "55d8819c0310e6b8bc66742f7ab5881b9b552a9c60eaf940595ed08e8a320a56" => :mojave - sha256 "d4464bdbbb2861861fa92e471f75e1b658e7c5f5814028a6c57f74c76092b013" => :high_sierra - sha256 "50d3b78c1ef6837198a0320dbbe0852ad524f83bc2e12460bfbdc188bd1da76a" => :sierra - 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", "-o", "test", - "-L#{lib}", "-lmpfi", - "-L#{Formula["mpfr"].lib}", "-lmpfr", - "-L#{Formula["gmp"].lib}", "-lgmp" - system "./test" - end -end diff --git a/Formula/mpfr.rb b/Formula/mpfr.rb deleted file mode 100644 index 8804b15cd554d..0000000000000 --- a/Formula/mpfr.rb +++ /dev/null @@ -1,53 +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.2.tar.xz" - mirror "https://ftpmirror.gnu.org/mpfr/mpfr-4.0.2.tar.xz" - sha256 "1d3be708604eae0e42d578ba93b390c2a145f17743a744d8f3f8c2ad5855a38a" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "140d29bfee0c8cf356fbb5391465f781df559e6076988de3ea8bcfd812f3c5bd" => :catalina - sha256 "cfce7ab866e98360c9364cd924da620ae7936d3a224d686aacc209c2107d19aa" => :mojave - sha256 "bf5d21e7e8e549f7e8d07791a90f44a487f4c7151897b7c64d02928b5bd73520" => :high_sierra - sha256 "4fb1860a481e24c70eefc8e5782030612840f1bb8f50586ca76a4c6c53629deb" => :sierra - end - - depends_on "gmp" - - def install - # Work around macOS Catalina / Xcode 11 code generation bug - # (test failure t-toom53, due to wrong code in mpn/toom53_mul.o) - ENV.append_to_cflags "-fno-stack-check" - - 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 26cade9575d3c..0000000000000 --- a/Formula/mpg123.rb +++ /dev/null @@ -1,32 +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.26.2/mpg123-1.26.2.tar.bz2" - sha256 "00f7bf7ea64fcec2c9d07751d6ad8849343ee09c282ea3b0d5dd486e886e2ff3" - - bottle do - sha256 "29e4e2b5e306f94d2ce0e900f8413b4751f5df28488a476558527119b09bf015" => :catalina - sha256 "9e80680b18a8b2e000d32aee02c5b5b03e95d617119d1a922a1ac48da4df66f6" => :mojave - sha256 "6a9d7414515325f52473be05e484faa1c314ffb65582588d9c312400d3e9d6bd" => :high_sierra - end - - def install - # Work around Xcode 11 clang bug - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - 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 648c4a357be3e..0000000000000 --- a/Formula/mpg321.rb +++ /dev/null @@ -1,48 +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" - license "GPL-2.0" - - bottle do - sha256 "fdea1076a22b6af12c33b02e9eb040fceb11d39ed2eaa7307574bf5331d8f8dc" => :catalina - 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: - # 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/formula-patches/85fa66a9/mpg321/0.3.2.patch" - sha256 "a856292a913d3d94b3389ae7b1020d662e85bd4557d1a9d1c8ebe517978e62a1" - end - - 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 diff --git a/Formula/mpgtx.rb b/Formula/mpgtx.rb deleted file mode 100644 index e4d9ed7d53328..0000000000000 --- a/Formula/mpgtx.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "116812d4c0401a6ceeae3bd8bd0bc3f4870c0cac7f9ec166ceb97f5279c10d32" => :catalina - 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/mpi4py.rb b/Formula/mpi4py.rb deleted file mode 100644 index d92e344d27e56..0000000000000 --- a/Formula/mpi4py.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Mpi4py < Formula - desc "Python bindings for MPI" - homepage "https://mpi4py.readthedocs.io/" - url "https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-3.0.3.tar.gz" - sha256 "012d716c8b9ed1e513fcc4b18e5af16a8791f51e6d1716baccf988ad355c5a1f" - revision 1 - - bottle do - cellar :any - sha256 "f32637afaa7a9e9b1de6db1df8707faa1bf3b82f9184f1d4415154c80907fa2d" => :catalina - sha256 "0722fb13f9b85970dbdd113d4616ea7c47ea69fdc89747c51fa882adc1fe62d4" => :mojave - sha256 "f8cb782c83655a5a97f0016bd519a6528d9f6b73fe61ccd8420f33d4b9a34155" => :high_sierra - end - - depends_on "cython" => :build - depends_on "open-mpi" - depends_on "python@3.8" - - def install - system "#{Formula["python@3.8"].opt_bin}/python3", - *Language::Python.setup_install_args(libexec) - - system Formula["python@3.8"].bin/"python3", "setup.py", - "build", "--mpicc=mpicc -shared", "--parallel=#{ENV.make_jobs}", - "install", "--prefix=#{prefix}", - "--single-version-externally-managed", "--record=installed.txt" - end - - test do - system Formula["python@3.8"].opt_bin/"python3", - "-c", "import mpi4py" - system Formula["python@3.8"].opt_bin/"python3", - "-c", "import mpi4py.MPI" - system Formula["python@3.8"].opt_bin/"python3", - "-c", "import mpi4py.futures" - system "mpiexec", "-n", "4", Formula["python@3.8"].opt_bin/"python3", - "-m", "mpi4py.run", "-m", "mpi4py.bench", "helloworld" - system "mpiexec", "-n", "4", Formula["python@3.8"].opt_bin/"python3", - "-m", "mpi4py.run", "-m", "mpi4py.bench", "ringtest", - "-l", "10", "-n", "1024" - end -end diff --git a/Formula/mpich.rb b/Formula/mpich.rb deleted file mode 100644 index c9eb1f003379b..0000000000000 --- a/Formula/mpich.rb +++ /dev/null @@ -1,86 +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.2/mpich-3.3.2.tar.gz" - mirror "https://fossies.org/linux/misc/mpich-3.3.2.tar.gz" - sha256 "4bfaf8837a54771d3e4922c84071ef80ffebddbb6971a006038d91ee7ef959b9" - revision 1 - - bottle do - cellar :any - sha256 "3927047d7322310cef941a5e790c43b858a29716bea54d493bd1901b8d0bcb3d" => :catalina - sha256 "44511bb2ad213ccc7e47a505895cf6aa4dbdd1a7dbba468095a130e83ca7bff3" => :mojave - sha256 "0498e1ee125ed94a3822179663e552ecf29bdca1ae3837520284fadae3782cef" => :high_sierra - end - - head do - url "https://github.com/pmodels/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}", - # Flag for compatibility with GCC 10 - # https://lists.mpich.org/pipermail/discuss/2020-January/005863.html - "FFLAGS=-fallow-argument-mismatch" - - 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 f84590fb7d98f..0000000000000 --- a/Formula/mpir.rb +++ /dev/null @@ -1,44 +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" - license "GPL-3.0" - - bottle do - cellar :any - rebuild 1 - sha256 "d45de304310770a0788c528faff83b5c16ad8903f54e7788fcb5b0d16182d049" => :catalina - sha256 "5fd2ec4df58a2c8a1dd74729c90dd6928893f9c87c8ee06af8519dfb7ea9d71f" => :mojave - sha256 "e9786b8cd2ee485e34b6e63c95bb7f71289c038dc9be0fdf583279853056302a" => :high_sierra - sha256 "006955801271b94f2e412ac056450000785965ed631d134554d7190deaf675d1" => :sierra - end - - depends_on "yasm" => :build - - def install - args = %W[--disable-silent-rules --prefix=#{prefix} --enable-cxx] - args << "--build=#{Hardware.oldest_cpu}-apple-darwin#{`uname -r`.to_i}" - 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 4f539b9cda9b8..0000000000000 --- a/Formula/mplayer.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Mplayer < Formula - desc "UNIX movie player" - homepage "https://mplayerhq.hu/" - url "https://mplayerhq.hu/MPlayer/releases/MPlayer-1.4.tar.xz" - sha256 "82596ed558478d28248c7bc3828eb09e6948c099bbd76bb7ee745a0e3275b548" - - bottle do - cellar :any - sha256 "d46c9afd22fbdda5423877d2583732e6c88ee9bd52b26c8b79ea8e90c9af7d59" => :catalina - sha256 "72da2446b0077085121da3cc3437a3e07d0bd2136529dd7dfba79d05bca1b405" => :mojave - sha256 "11c01635f619e3aa77a85cd095be0b302d2b25fdd4362f47340c93122a113775" => :high_sierra - sha256 "225e2628b4edf16a4ffea768e03587a8cc1c3f67544c92cb3fb8f3332feee51d" => :sierra - 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 "pkg-config" => :build - depends_on "yasm" => :build - depends_on "fontconfig" - depends_on "freetype" - depends_on "libcaca" - - 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 - --enable-caca - --enable-freetype - ] - 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 1d973e41fcd87..0000000000000 --- a/Formula/mplayershell.rb +++ /dev/null @@ -1,39 +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" - license "MIT" - head "https://github.com/donmelton/MPlayerShell.git" - - bottle do - cellar :any_skip_relocation - sha256 "09cfdf5d08af35a3be96623c6535fece3acfbc60cf81247b118778cb2b68acc3" => :catalina - sha256 "1be2bb2a8eccce7fa190b85af6e67fb7fe36393c32a8295852af0e6e390b6ee9" => :mojave - sha256 "c0b558e0508d80fe05a1d9617b7aa1986066c54bc0a3da585631eb406da5eb93" => :high_sierra - sha256 "e9377eaebb65903037105bf3ed6ee301a182452791e9daeaadd08ccb732d9d1b" => :sierra - sha256 "ae4c1c9d069053afa7e71867256b577e23bd0dec87a90ccab2ebeab089a3634b" => :el_capitan - sha256 "1637360e180d7b48367cb7c4f01d03856b9d13247000e4cc33f0af5f6ed92101" => :yosemite - sha256 "a95437813704c56c3e52bd1b17974bec24c209e26df8e9dfe07af45d51ecaf49" => :mavericks - end - - depends_on :xcode => :build - - 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 6185c99e7594f..0000000000000 --- a/Formula/mpop.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Mpop < Formula - desc "POP3 client" - homepage "https://marlam.de/mpop/" - url "https://marlam.de/mpop/releases/mpop-1.4.10.tar.xz" - sha256 "9e9b6523f08df50a3d3eec75d94d4c0104ee016c0c913baaf8fbf178bf828388" - license "GPL-3.0" - - bottle do - sha256 "4d62437fccd5d773e888126e465f1cea07fdcbdc7f0b5fb826267d78747cfa0c" => :catalina - sha256 "e2638049d1e7b182aa5ad981436660969d029ee3a7b2afe0cb3a3906817578f3" => :mojave - sha256 "0576fae054e001c3fd7954c5b013323aa0bb54d37c7c51b400cef87144d690a1" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gnutls" - - 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 249200e1523fe..0000000000000 --- a/Formula/mps-youtube.rb +++ /dev/null @@ -1,52 +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 10 - - bottle do - cellar :any_skip_relocation - sha256 "28c642ad9a2ddad76e66cdcfed51e99a6252ed263bba1dfc11a3bd616ebfb11d" => :catalina - sha256 "08d5bae85877ec5459934e372f964177dbd7659343d26f9692d3215429925cc7" => :mojave - sha256 "84d055c7b77afa7c1ffb27ec3b1de09bb1a622061408d7f9dde615892c405341" => :high_sierra - end - - depends_on "mplayer" - depends_on "python@3.8" - - resource "pafy" do - url "https://files.pythonhosted.org/packages/7e/02/b70f4d2ad64bbc7d2a00018c6545d9b9039208553358534e73e6dd5bbaf6/pafy-0.5.5.tar.gz" - sha256 "364f1d1312c89582d97dc7225cf6858cde27cb11dfd64a9c2bab1a2f32133b1e" - end - - resource "youtube_dl" do - url "https://files.pythonhosted.org/packages/51/80/d3938814a40163d3598f8a1ced6abd02d591d9bb38e66b3229aebe1e2cd0/youtube_dl-2020.5.3.tar.gz" - sha256 "e7a400a61e35b7cb010296864953c992122db4b0d6c9c6e2630f3e0b9a655043" - end - - def install - venv = virtualenv_create(libexec, "python3.8") - - %w[youtube_dl pafy].each do |r| - venv.pip_install resource(r) - end - - venv.pip_install_and_link buildpath - end - - def caveats - <<~EOS - Install the optional mpv app with Homebrew Cask: - brew cask install mpv - EOS - 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 cd3d89ba7babf..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 "714e7b0e97a942f68885baefa599d97e143631154480d0246d04e21a49910acf" => :catalina - sha256 "e37b5e479ba7f9ad86373e646c63485b55dd1381c2cbc130150e108886675b72" => :mojave - sha256 "1057c47b866d50031a23a0bd244d3bc056b9f12a4d9bf0aeebc0ea292c484638" => :high_sierra - sha256 "90d758a0f7accf0b63755c3de8100a880b500e732fc8924123ab2a1c7ce688f8" => :sierra - sha256 "e5ac485861dfca0be2bb1ca2eb5826b5ca5977c0d2abb12dc58de011c18046f1" => :el_capitan - sha256 "2b91c9a9dbae19e99b8b8735bb3292cc056dcf8e06472c0b2d354f64896a4186" => :yosemite - sha256 "60d489a872cb7ed8855c0f95913af4fffe3082b6bee8669b0080c3d30d73249d" => :mavericks - 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 b14e03163cd48..0000000000000 --- a/Formula/mpv.rb +++ /dev/null @@ -1,65 +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.32.0.tar.gz" - sha256 "9163f64832226d22e24bbc4874ebd6ac02372cd717bef15c28a0aa858c5fe592" - revision 5 - head "https://github.com/mpv-player/mpv.git" - - bottle do - sha256 "b5ee75305e024dda4255af1c113e22c9dcafa7d3c3979f90ddf99a042335a1f2" => :catalina - sha256 "10dc99da93819fb90252d5e28fc89cbefaa670274fec72f87f6c4d64876142b0" => :mojave - sha256 "59ed6368c7afcd763040459c00f0bc985ee1df86fcd0857279ff5fede14c30fc" => :high_sierra - end - - depends_on "docutils" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on :xcode => :build - - depends_on "ffmpeg" - depends_on "jpeg" - depends_on "libarchive" - depends_on "libass" - depends_on "little-cms2" - depends_on "lua@5.1" - depends_on "mujs" - depends_on "uchardet" - depends_on "vapoursynth" - depends_on "youtube-dl" - - 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" - - # libarchive is keg-only - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libarchive"].opt_lib/"pkgconfig" - - args = %W[ - --prefix=#{prefix} - --enable-html-build - --enable-javascript - --enable-libmpv-shared - --enable-lua - --enable-libarchive - --enable-uchardet - --confdir=#{etc}/mpv - --datadir=#{pkgshare} - --mandir=#{man} - --docdir=#{doc} - --zshdir=#{zsh_completion} - --lua=51deb - ] - - system Formula["python@3.8"].opt_bin/"python3", "bootstrap.py" - system Formula["python@3.8"].opt_bin/"python3", "waf", "configure", *args - system Formula["python@3.8"].opt_bin/"python3", "waf", "install" - end - - test do - system bin/"mpv", "--ao=null", test_fixtures("test.wav") - assert_match "vapoursynth", shell_output(bin/"mpv --vf=help") - end -end diff --git a/Formula/mpw.rb b/Formula/mpw.rb deleted file mode 100644 index 954498726c973..0000000000000 --- a/Formula/mpw.rb +++ /dev/null @@ -1,39 +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 2 - head "https://gitlab.com/MasterPassword/MasterPassword.git" - - bottle do - cellar :any - sha256 "2f275d762a9c73bd6b3f2e5a7f3f13a9c99ddfc3e2f89a2ededa07ba89b6de40" => :catalina - sha256 "9103716223529cd3e2cb969e904892bf2022cb8e73918418f2d3d343d1325c80" => :mojave - sha256 "07b89df8d96f9c1cebbf6296a4e98b2bac833c45f736b646a1eba24bd5244732" => :high_sierra - end - - depends_on "json-c" - depends_on "libsodium" - depends_on "ncurses" - - def install - cd "platform-independent/c/cli" if build.head? - - ENV["targets"] = "mpw" - # not compatible with json-c 0.14 yet - ENV["mpw_json"] = "0" - 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 6acbe851c5a8a..0000000000000 --- a/Formula/mr.rb +++ /dev/null @@ -1,34 +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 "90ab23bd6811b507860b5ddcc7e9a181abd3f126fc2ab193739987d6d4b31612" => :catalina - 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 089297383f1ae..0000000000000 --- a/Formula/mrboom.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Mrboom < Formula - desc "Eight player Bomberman clone" - homepage "http://mrboom.mumblecore.org/" - url "https://github.com/Javanaise/mrboom-libretro/archive/4.9.tar.gz" - sha256 "062cf1f91364d2d6ea717e92304ca163cfba5d14b30bb440ee118d1b8e10328d" - license "MIT" - - bottle do - cellar :any - sha256 "d85ec4ab953ce62ec26b3f632943f4155c7b4b06a6c7bfeec4af334bd3453c5d" => :catalina - sha256 "8a4663dd80ed90899b51c5a568b1a8330b06441eba93cfa70e773514dbba4b2d" => :mojave - sha256 "a3c07658f4050be94c37c341f262b7c82a808dd696f349841aa0e83b07eaf8e7" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libmodplug" - depends_on "minizip" - depends_on "sdl2" - depends_on "sdl2_mixer" - - # fix Makefile issue, remove in next release - patch do - url "https://github.com/Javanaise/mrboom-libretro/commit/c777f1059c9a4b3fcefe6e2a19cfe9f81a13740b.diff?full_index=1" - sha256 "19f469ccde5f1a9bc45fa440fd4cbfd294947f17b191f299822db17de66a5a23" - end - - def install - system "make", "mrboom", "LIBSDL2=1" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - require "pty" - require "expect" - require "timeout" - PTY.spawn(bin/"mrboom", "-m", "-f 0", "-z") do |r, _w, pid| - sleep 1 - Process.kill "SIGINT", pid - assert_match "monster", r.expect(/monster/, 10)[0] - ensure - begin - Timeout.timeout(10) do - Process.wait pid - end - rescue Timeout::Error - Process.kill "KILL", pid - end - end - end -end diff --git a/Formula/mrtg.rb b/Formula/mrtg.rb deleted file mode 100644 index c745227e32cfa..0000000000000 --- a/Formula/mrtg.rb +++ /dev/null @@ -1,26 +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 "cae75a7387673aa555bf72112a1a00e24f9c2c87f87ffe2fcdf839c6b31a95ce" => :catalina - 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 5842301d80f43..0000000000000 --- a/Formula/mruby-cli.rb +++ /dev/null @@ -1,41 +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" - license "MIT" - head "https://github.com/hone/mruby-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "0418ca77d1a6adeaaf3184e9cbd566bab2829f2f736cc0f7f07ecf79e3bb6195" => :catalina - 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 564d689f8896d..0000000000000 --- a/Formula/mruby.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Mruby < Formula - desc "Lightweight implementation of the Ruby language" - homepage "https://mruby.org/" - url "https://github.com/mruby/mruby/archive/2.1.1.tar.gz" - sha256 "bb27397ee9cb7e0ddf4ff51caf5b0a193d636b7a3c52399684c8c383b41c362a" - license "MIT" - head "https://github.com/mruby/mruby.git" - - bottle do - cellar :any_skip_relocation - sha256 "1266b351ab448a0d30f7a6bea0bf5e395b3ee40af5eb134c7a6c6bad3c958457" => :catalina - sha256 "ec046526f5cdc28b079efe9d514702a8b98a61f6388fb4479f0e0666559e5997" => :mojave - sha256 "1b924c188725c14fd0958f5c5314f723cdfca53fc9eb59b266d7b1678e43552c" => :high_sierra - end - - depends_on "bison" => :build - - uses_from_macos "ruby" - - 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 d6af8b44dba89..0000000000000 --- a/Formula/mscgen.rb +++ /dev/null @@ -1,27 +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 "315656cf5f9d72907591b4c8a91e635e6aa9b2116cadefe9fdd76db4cff7ae87" => :catalina - 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 81a382dcb6fb2..0000000000000 --- a/Formula/msdl.rb +++ /dev/null @@ -1,44 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "71fb71cf2c24085221ee1d24c57fbe07f1b6cc437d84385d22231a4723771207" => :catalina - 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-tools.rb b/Formula/msgpack-tools.rb deleted file mode 100644 index ba0349b540eca..0000000000000 --- a/Formula/msgpack-tools.rb +++ /dev/null @@ -1,29 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "901f0f7dadb40b70b20de05a699e5cd9ca37095f3ce9bb277aff3e4421219290" => :catalina - sha256 "30f69cfbcfe93c148fec339d86775357cc804f50c58c42594708f7ae9abad226" => :mojave - sha256 "9c12c496640b2913caa23147bdacffed803115e68607c56975bdab106b4b83b0" => :high_sierra - sha256 "c576acc7e6078360a79bf7270336e0f3dc9012161e860681cbfe7f2de1313857" => :sierra - end - - depends_on "cmake" => :build - - conflicts_with "remarshal", :because => "both install 'json2msgpack' binary" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install", "PREFIX=#{prefix}/" - end - - test do - json_data = '{"hello":"world"}' - assert_equal json_data, - pipe_output("#{bin}/json2msgpack | #{bin}/msgpack2json", json_data, 0) - end -end diff --git a/Formula/msgpack.rb b/Formula/msgpack.rb deleted file mode 100644 index 36923e1d655c9..0000000000000 --- a/Formula/msgpack.rb +++ /dev/null @@ -1,58 +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.3.0/msgpack-3.3.0.tar.gz" - sha256 "6e114d12a5ddb8cb11f669f83f32246e484a8addd0ce93f274996f1941c1f07b" - head "https://github.com/msgpack/msgpack-c.git" - - bottle do - sha256 "bb3e3af7ce4994911518db90db9ff4747e72492832b3aa98ff7c82fd3d5990b2" => :catalina - sha256 "f418d11d056dd08160b27088d19ee12d4a9e36dbd913ffae8d2c9838a1449475" => :mojave - sha256 "7424d6d9dee3edd0f07c4ea6f11567255dea4f1bbffbb6c41f20c5412952028d" => :high_sierra - 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/HEAD/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 a5b7a1ca84b40..0000000000000 --- a/Formula/msgpuck.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Msgpuck < Formula - desc "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" - license "BSD-2-Clause" - head "https://github.com/rtsisyk/msgpuck.git" - - bottle do - cellar :any_skip_relocation - sha256 "01dbdca0333694d379bd7b209d52d8dd8e48f5416d9df441d43cdb29c2751738" => :catalina - 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 63e45717d8364..0000000000000 --- a/Formula/msitools.rb +++ /dev/null @@ -1,105 +0,0 @@ -class Msitools < Formula - desc "Windows installer (.MSI) tool" - homepage "https://wiki.gnome.org/msitools" - url "https://download.gnome.org/sources/msitools/0.100/msitools-0.100.tar.xz" - sha256 "bbf1a6e3a9c2323b860a3227ac176736a3eafc4a44a67346c6844591f10978ea" - license "GPL-2.0" - - bottle do - sha256 "f9b65f68c973c323e96a0492df562bae32e3ede79d9e5a6f24b89f53ef085883" => :catalina - sha256 "b7646423954ae62a8dcb8ee413f98e0f5e1c4b8a73876255fcd2f0371e547f92" => :mojave - sha256 "fd8689ba0902ed4d784f85969d281a0e1c58bb76f0fe17a93d96ba2d3f845cdb" => :high_sierra - 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" - - # Workaround for https://gitlab.gnome.org/GNOME/msitools/issues/15 - # Merged upstream in the following commits: - # https://gitlab.gnome.org/GNOME/msitools/commit/248450a2f2a23df59428fa816865a26f7e2496e0 - # https://gitlab.gnome.org/GNOME/msitools/commit/9bbcc6da06ccf6144258c26ddcaab3262538d3ce - # Remove in next release. - patch do - url "https://gitlab.gnome.org/GNOME/msitools/commit/248450a2f2a23df59428fa816865a26f7e2496e0.diff" - sha256 "5046316e61af8af32a2b7d4ed2579a88fe0618e56d0aca32fea2c8a64b747f06" - end - - patch do - url "https://gitlab.gnome.org/GNOME/msitools/commit/9bbcc6da06ccf6144258c26ddcaab3262538d3ce.diff" - sha256 "fadc1c5ade1afd8add5f5a4997a10098efa9f24a5788230a16af89965551c1c7" - end - - 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 309e07c763421..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.1.tar.bz2" - sha256 "56bf4af8f74d8be6a8d94b90a527acf1508cd58212886fcfe54daa9799dcaf6f" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "aa3eeff895b2de1989222a0da68b9bfd1f82a84e1aa09e060f96a018c51c9f1d" => :catalina - sha256 "c81aaec915e611272f5c74d5a4ee7b14d9e7342d7bc2639f45dd90b0f3fc639b" => :mojave - sha256 "8f3695f42884ee17bc1b701ee968c60e5ff115c17b9514986c7dd499b8e229c2" => :high_sierra - sha256 "05fc6f711b6109052fa1a795bf88063490e5c2ed73bcf2f2168610c77e996d88" => :sierra - 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 cb2b779601e8d..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.8.11.tar.xz" - sha256 "f25f0fa177ce9e0ad65c127e790a37f35fb64fee9e33d90345844c5c86780e60" - license "GPL-3.0" - - bottle do - sha256 "465356913ededba9a76ab0f76f597913a3e7eb5901f47780494e140917a94447" => :catalina - sha256 "8ce3ca882b2e0fbc6bad2fdf544f20f53413616bda869544f90c51e9bd87a521" => :mojave - sha256 "61d5d5c532afb5f5297ccd3e5d2e7ba09b3810f8b128701160c981e6c16fc73e" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gnutls" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --with-macosx-keyring - --prefix=#{prefix} - ] - - 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 89287715ee2dc..0000000000000 --- a/Formula/mspdebug.rb +++ /dev/null @@ -1,37 +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" - license "GPL-2.0" - head "https://github.com/dlbeer/mspdebug.git" - - bottle do - sha256 "4e512b296b8a655fbe8632afca020866f6499c461fb715aef5c4eb6bdda88034" => :catalina - 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 087a12fe991fa..0000000000000 --- a/Formula/mstch.rb +++ /dev/null @@ -1,60 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "cd7adf5ad11d8958ecf32613bc1b5ecd6c166eea4576175e02ef265b1cf800ee" => :catalina - 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/mtoc.rb b/Formula/mtoc.rb deleted file mode 100644 index 624ccc9cc8529..0000000000000 --- a/Formula/mtoc.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Mtoc < Formula - desc "Mach-O to PE/COFF binary converter" - homepage "https://opensource.apple.com/source/cctools/cctools-949.0.1/" - url "https://opensource.apple.com/tarballs/cctools/cctools-949.0.1.tar.gz" - sha256 "830485ac7c563cd55331f643952caab2f0690dfbd01e92eb432c45098b28a5d0" - - bottle do - cellar :any_skip_relocation - sha256 "2f60b3731066cf662f3d8e9451ce0f94954980100780c9e79b6e8ea066ad8def" => :catalina - sha256 "c9cba74c5669816e90ae2fa9110be8c9b6b9d1a90ec7d1f246687a3f512e08ab" => :mojave - sha256 "62587e723f38c2a51d3a951dca42df10b9aa1ac67c88d8e286b27e6957edd985" => :high_sierra - end - - depends_on "llvm" => :build - - patch do - url "https://raw.githubusercontent.com/acidanthera/ocbuild/d3e57820ce85bc2ed4ce20cc25819e763c17c114/patches/mtoc-permissions.patch" - sha256 "0d20ee119368e30913936dfee51055a1055b96dde835f277099cb7bcd4a34daf" - end - - def install - system "make", "LTO=", "EFITOOLS=efitools", "-C", "libstuff" - system "make", "-C", "efitools" - system "strip", "-x", "efitools/mtoc.NEW" - - bin.install "efitools/mtoc.NEW" => "mtoc" - man1.install "man/mtoc.1" - end - - test do - (testpath/"test.c").write <<~EOS - __attribute__((naked)) int start() {} - EOS - - args = %W[ - -nostdlib - -Wl,-preload - -Wl,-e,_start - -seg1addr 0x1000 - -o #{testpath}/test - #{testpath}/test.c - ] - system "cc", *args - system "#{bin}/mtoc", "#{testpath}/test", "#{testpath}/test.pe" - end -end diff --git a/Formula/mtools.rb b/Formula/mtools.rb deleted file mode 100644 index c93f54edfcece..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.24.tar.gz" - mirror "https://ftpmirror.gnu.org/mtools/mtools-4.0.24.tar.gz" - sha256 "3483bdf233e77d0cf060de31df8e9f624c4bf26bd8a38ef22e06ca799d60c74e" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "a5229fbfcd666abf4c79cd065be6a58801228460f999319a0234319ccb8aba3a" => :catalina - sha256 "3a9d80e7a7e9a6dd377d0030a5fbc29e509ca6dd598e24943b36169ed1512670" => :mojave - sha256 "ebed9be10002c3a8a68089ff43702b24f1f2c451be9e14778eaece3ad4e0cdc0" => :high_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 c4e69e5f137e3..0000000000000 --- a/Formula/mtr.rb +++ /dev/null @@ -1,58 +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.93.tar.gz" - sha256 "3a1ab330104ddee3135af3cfa567b9608001c5deecbf200c08b545ed6d7a4c8f" - license "GPL-2.0" - revision 1 - head "https://github.com/traviscross/mtr.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "a952c5da397d034d9dda48176adc6c95e80817885d7668bb655f3fae5ecd3ddd" => :catalina - sha256 "4a4715a86749b16145a303a90d872aaf4f30d21f90718cc091db319a76061cc8" => :mojave - sha256 "a1ce74b90b7647841648e097bc8a3215bca12a050727234486c5ea90c9387627" => :high_sierra - sha256 "a0c602faaa5af45b8bc5efcc9897a765cc22c1f94411de07ceb32fe5aa721183" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - - # Pull request submitted upstream as https://github.com/traviscross/mtr/pull/315 - patch do - url "https://github.com/traviscross/mtr/pull/315.patch?full_index=1" - sha256 "c67b455198d4ad8269de56464366ed2bbbc5b363ceda0285ee84be40e4893668" - end - - def install - # Fix UNKNOWN version reported by `mtr --version`. - inreplace "configure.ac", - "m4_esyscmd([build-aux/git-version-gen .tarball-version])", - version.to_s - - # 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 85c7d0906dd04..0000000000000 --- a/Formula/mu.rb +++ /dev/null @@ -1,83 +0,0 @@ -# Note that 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/archive/1.4.10.tar.gz" - sha256 "a3fd3b56fb0872892427909888d55bae2c3f0d574494cb27853ae4907b2c8af9" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "ff8820080a32067627c8b8ea26a2a80e94d24833d33ffd5c130a251f36243dce" => :catalina - sha256 "ae98cf1ff0fdbae8771d01a22078478cfb4b4248c3f664c135a7be6735194d4f" => :mojave - sha256 "a9ef200573c8092384f30fcec9cd7b9ecf3e34b29a72fb17a72aadef86772c51" => :high_sierra - 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 "emacs" => :build - depends_on "libgpg-error" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "gmime" - depends_on "xapian" - - def install - system "autoreconf", "-ivf" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-lispdir=#{elisp}" - system "make" - system "make", "install" - 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/mujs.rb b/Formula/mujs.rb deleted file mode 100644 index fe20208c02ff6..0000000000000 --- a/Formula/mujs.rb +++ /dev/null @@ -1,31 +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.7", - :revision => "90aca80865e28a1b9be9bc5ef1118438f62e4f8f" - license "ISC" - head "https://github.com/ccxvii/mujs.git" - - bottle do - cellar :any_skip_relocation - sha256 "876610c369e104a1245828afa6578d717b3214ff472ccf4d29e03b38a1adf98e" => :catalina - sha256 "8c52be2a15fc45f4cbf0aba09c672e12afb9e6d6ae676b97fa7ae17454fb9c10" => :mojave - sha256 "c72f3e89f750198a8e3432043dbb67a40895126e248536babeff9ecd8628e843" => :high_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 345b0ce22a4ff..0000000000000 --- a/Formula/multimarkdown.rb +++ /dev/null @@ -1,35 +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.5.2.tar.gz" - sha256 "97e9bb25e8eb151f178fd34212852f5d40d8fd01b317e718fded11603fafb773" - head "https://github.com/fletcher/MultiMarkdown-6.git" - - bottle do - cellar :any_skip_relocation - sha256 "fda293b3a57480609f06eee55ec2ba8d65799577df2be38c0af1cc70e22fcd9d" => :catalina - sha256 "ce5d41628cd36556b2e6375a88dce78d90da7502033fe147fff90c3d542bd7c9" => :mojave - sha256 "fde9097e38d1fdb2161d71eb81758e25c1a1a39120a27c931e2d408ac8338fd6" => :high_sierra - 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 - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - bin.install "multimarkdown" - end - - 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/multitail.rb b/Formula/multitail.rb deleted file mode 100644 index 7c6eb2e179f02..0000000000000 --- a/Formula/multitail.rb +++ /dev/null @@ -1,34 +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.5.0.tgz" - sha256 "b29d5e77dfc663c7500f78da67de5d82d35d9417a4741a89a18ce9ee7bdba9ed" - license "GPL-2.0" - head "https://github.com/flok99/multitail.git" - - bottle do - cellar :any - sha256 "6d0d74b45d02adc52fa6a5f666484c62941457da3cb10e50d65f5d772cc59c02" => :catalina - sha256 "933801e9ec5999742cfcea6cc59580f69fc966ad82858326c2a90f68868de60f" => :mojave - sha256 "57526de43035b0d5d2520d54b252d29c20a4efb146c019ac044ad5067be5351a" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "ncurses" - - 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 401fe47fec34a..0000000000000 --- a/Formula/muparser.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Muparser < Formula - desc "C++ math expression parser library" - homepage "https://beltoforion.de/en/muparser/" - url "https://github.com/beltoforion/muparser/archive/v2.3.2.tar.gz" - sha256 "b35fc84e3667d432e3414c8667d5764dfa450ed24a99eeef7ee3f6647d44f301" - license "BSD-2-Clause" - revision 1 - head "https://github.com/beltoforion/muparser.git" - - bottle do - cellar :any - sha256 "c99b69d002f22fa51ca8b53f2add5a094effc2e81dcbda20cfdf483be5f96619" => :catalina - sha256 "6b1ccfe8b7d30fff5de4eee181e878e285131365e8893bbb95d1838d255b808b" => :mojave - sha256 "b1e0e3e51369d70e3c69045e07977b14e2c06ad6f48cd31a9621204be99a64b7" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "gcc" - - fails_with :clang # no OpenMP support - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - 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 14db1799c2791..0000000000000 --- a/Formula/mupdf-tools.rb +++ /dev/null @@ -1,39 +0,0 @@ -class MupdfTools < Formula - desc "Lightweight PDF and XPS viewer" - homepage "https://mupdf.com/" - url "https://mupdf.com/downloads/archive/mupdf-1.17.0-source.tar.xz" - sha256 "c935fb2593d9a28d9b56b59dad6e3b0716a6790f8a257a68fa7dcb4430bc6086" - license "AGPL-3.0" - head "https://git.ghostscript.com/mupdf.git" - - bottle do - cellar :any_skip_relocation - sha256 "469777d46f4da93ca69069fc283b1464ec65db3f03df430290fbfb77c1fd5b2d" => :catalina - sha256 "02993c27c49e2ae8f2bf30a3fe3680770320bec2873124990c7dd5561ec16f19" => :mojave - sha256 "6bd4ca00d57e19125e20cf04e7b6ff1ed7de306d1d0a8f75eb23ad878b94ba99" => :high_sierra - end - - conflicts_with "mupdf", - :because => "mupdf and mupdf-tools install the same binaries" - - def install - # Work around Xcode 11 clang bug - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - 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/mupdf.rb b/Formula/mupdf.rb deleted file mode 100644 index 906a2edf929f3..0000000000000 --- a/Formula/mupdf.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Mupdf < Formula - desc "Lightweight PDF and XPS viewer" - homepage "https://mupdf.com/" - url "https://mupdf.com/downloads/archive/mupdf-1.17.0-source.tar.xz" - sha256 "c935fb2593d9a28d9b56b59dad6e3b0716a6790f8a257a68fa7dcb4430bc6086" - license "AGPL-3.0" - head "https://git.ghostscript.com/mupdf.git" - - bottle do - cellar :any_skip_relocation - sha256 "473cb909d61450baa808fab50f18342811665f4e9e31f26a21e03f6bc5e70363" => :catalina - sha256 "abe79a517f7debadd94a67d3c7130c017ec8b985f381f0af7c9d08c75df13501" => :mojave - sha256 "e12021a10707afc92cea6d8a7633ee2a8d0f89359bb2f166c6e53d89e411f0f3" => :high_sierra - end - - depends_on :x11 - - conflicts_with "mupdf-tools", - :because => "mupdf and mupdf-tools install the same binaries" - - def install - # Work around Xcode 11 clang bug - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - 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 4e3129407b86d..0000000000000 --- a/Formula/mupen64plus.rb +++ /dev/null @@ -1,77 +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 "999b60faedf8eb2299f854991995c44b81898de85a73ca0568902e5b63641e42" => :catalina - 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 1e10d22407153..0000000000000 --- a/Formula/musepack.rb +++ /dev/null @@ -1,37 +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 - rebuild 1 - sha256 "847cacb946b6289a5fbfbfe4e1a38f1ec5b7f1e32d6c12145aaf1044317e4ce0" => :catalina - sha256 "5efee306aff13a0c0b8f98371e3cbe3eab6b73b0e92bdd59237d7db608a17708" => :mojave - sha256 "e1b6641d11a5338d395de8f5573464beddb81dc3dce16998e53361b43502844b" => :high_sierra - 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 faac1a5c8b96c..0000000000000 --- a/Formula/mutt.rb +++ /dev/null @@ -1,95 +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.14.5.tar.gz" - sha256 "316b11cabd41a21c1d981f11d93e000337a628800d50127df19fe2593f8e3d5c" - - bottle do - sha256 "775636e22b688047209d4d76773c5ff89a5c91f7c0954d48b8c6a20e1fe67873" => :catalina - sha256 "6962697b2d8379cbf44e32f8e215048e220cbbe89960aaa1a38281356b214925" => :mojave - sha256 "deac7667a1ccd43bfeaabf1a224a73651ca638078dfa1537ffa3f344c54d47da" => :high_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 "gpgme" - depends_on "openssl@1.1" - depends_on "tokyo-cabinet" - - uses_from_macos "bzip2" - uses_from_macos "ncurses" - uses_from_macos "zlib" - - 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@1.1"].opt_prefix} - --with-tokyocabinet - --enable-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 - 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 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/mvnvm.rb b/Formula/mvnvm.rb deleted file mode 100644 index f7f87803daab6..0000000000000 --- a/Formula/mvnvm.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Mvnvm < Formula - desc "Maven version manager" - homepage "https://mvnvm.org/" - url "https://bitbucket.org/mjensen/mvnvm/get/mvnvm-1.0.14.tar.gz" - sha256 "09c61a1a7aa0b7e94db122d0b705267f22dce429d3bbcf2345b08ee7a92564c7" - head "https://bitbucket.org/mjensen/mvnvm.git" - - bottle :unneeded - - depends_on "openjdk" - - conflicts_with "maven", :because => "also installs a 'mvn' executable" - - def install - bin.install "mvn" - bin.install "mvnDebug" - bin.env_script_all_files libexec/"bin", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - 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 0f2f73c110908..0000000000000 --- a/Formula/mvtools.rb +++ /dev/null @@ -1,48 +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/v23.tar.gz" - sha256 "3b5fdad2b52a2525764510a04af01eab3bc5e8fe6a02aba44b78955887a47d44" - head "https://github.com/dubhater/vapoursynth-mvtools.git" - - bottle do - cellar :any - sha256 "0da74491af99cf7cb20d4387d449af550b94abdf6f5330fd95da083689bb80b0" => :catalina - sha256 "9349ea16136c2d54c9f132af9e5c1768f486ce4ed6bcababf3f1f2f1944a7389" => :mojave - sha256 "d8dfbb4ea0e148a954fb50745230b3827f4e02457d739599d2fdec76e31058d8" => :high_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 "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 Formula["python@3.8"].opt_bin/"python3", "-c", script - end -end diff --git a/Formula/mycli.rb b/Formula/mycli.rb deleted file mode 100644 index 0189967d637d2..0000000000000 --- a/Formula/mycli.rb +++ /dev/null @@ -1,101 +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/dc/b4/4a252eb2ba8343a419b468655a8d1570c146db3e4ab3bc96fb1cd60acdba/mycli-1.21.1.tar.gz" - sha256 "8f630a0847243fbed2eeead05b0952963916e1b60a11a065bffbb234a30737e1" - - bottle do - cellar :any - sha256 "2754cde5c61c591c521dc89584717f35d8dd1463fbe9791034245e0c1d9c5164" => :catalina - sha256 "5c1cc0dd09e092145a2493f920183d3542b80b0f5ed9f947c41522d8a8d2c866" => :mojave - sha256 "6f9ddc6aecb867a5610c4ce093ce3afa6a5dfcc33215abb9c3ee83d3e363628c" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "python@3.8" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "cli-helpers" do - url "https://files.pythonhosted.org/packages/43/36/ba00975df9d393c0ccc3b1bf1610227bc4c4d611a5c69249b57be8ba6253/cli_helpers-1.2.1.tar.gz" - sha256 "98db22eaa86827d99ee6af9f5f3923142d04df256425204530842b032849a165" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - 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/9d/0a/d7060601834b1a0a84845d6ae2cd59be077aafa2133455062e47c9733024/cryptography-2.9.tar.gz" - sha256 "0cacd3ef5c604b8e5f59bf2582c076c98a37fe206b31430d0cd08138aff0986e" - end - - # prompt_toolkit>=2.0.6,<3.0.0 - resource "prompt_toolkit" do - url "https://files.pythonhosted.org/packages/0c/37/7ad3bf3c6dbe96facf9927ddf066fdafa0f86766237cff32c3c7355d3b7c/prompt_toolkit-2.0.10.tar.gz" - sha256 "f15af68f66e664eaa559d4ac8a928111eebd5feda0c11738b5998045224829db" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "PyMySQL" do - url "https://files.pythonhosted.org/packages/da/15/23ba6592920e21cb40eb0fe0ea002d2b6177beb1ca8a4c1add5a8f32754d/PyMySQL-0.9.3.tar.gz" - sha256 "d8c059dcd81dedb85a9f034d5e22dcb4442c0b201908bede99e306d65ea7c8e7" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "sqlparse" do - url "https://files.pythonhosted.org/packages/67/4b/253b6902c1526885af6d361ca8c6b1400292e649f0e9c95ee0d2e8ec8681/sqlparse-0.3.1.tar.gz" - sha256 "e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/57/6f/213d075ad03c84991d44e63b6516dd7d185091df5e1d02a660874f8f7e1e/tabulate-0.8.7.tar.gz" - sha256 "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007" - 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/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" - sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" - 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 8e28d03041b1e..0000000000000 --- a/Formula/mydumper.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Mydumper < Formula - desc "How MySQL DBA & support engineer would imagine 'mysqldump' ;-)" - homepage "https://launchpad.net/mydumper" - url "https://github.com/maxbube/mydumper/archive/v0.9.5.tar.gz" - sha256 "544d434b13ec192976d596d9a7977f46b330f5ae3370f066dbe680c1a4697eb6" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "157bb28e44f0033093c6dc1e46ad6f72e72fb0ae39c9d480e4cff4d90b0a4384" => :catalina - sha256 "d4a3a359cd266b24313e64204a8c99d8c1bfe0ec71fece2a31b8551bbb904eaa" => :mojave - sha256 "2f3f2f488038ee040fe619c6f3c35efc414c97a18bfb04885a245528645f8ade" => :high_sierra - 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@1.1" - 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 .so.1) -+set(CMAKE_FIND_LIBRARY_SUFFIXES .so .lib .dylib .so.1) - 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 d8a90067a021e..0000000000000 --- a/Formula/myman.rb +++ /dev/null @@ -1,38 +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 "90c5dee20ff2517495521e588b09678789462a8a63dc6a600da13a76cb5e86b0" => :catalina - 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 - - uses_from_macos "ncurses" - - 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 a4595749eb087..0000000000000 --- a/Formula/mypy.rb +++ /dev/null @@ -1,87 +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.782", - :revision => "39b6bc47b9f7e7d72778886419d07eb4acf3c50a" - head "https://github.com/python/mypy.git" - - bottle do - cellar :any_skip_relocation - sha256 "be8e5e9cd4eadfb2609ddba88e9772e85004b0031b682b40d0e1934aafe056b9" => :catalina - sha256 "516821003d007ca5f28aab49d9bac6695824f8dcb1682908af2575a86e0896b9" => :mojave - sha256 "c73b8cc86ec220dc7bcf90902307d23aee12e2a9e0b4e633a734927b7c47786d" => :high_sierra - end - - depends_on "sphinx-doc" => :build - depends_on "python@3.8" - - resource "mypy-extensions" do - url "https://files.pythonhosted.org/packages/63/60/0582ce2eaced55f65a4406fc97beba256de4b7a95a0034c6576458c6519f/mypy_extensions-0.4.3.tar.gz" - sha256 "2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8" - end - - resource "psutil" do - url "https://files.pythonhosted.org/packages/c4/b8/3512f0e93e0db23a71d82485ba256071ebef99b227351f0f5540f744af41/psutil-5.7.0.tar.gz" - sha256 "685ec16ca14d079455892f25bd124df26ff9137664af445563c1bd36629b5e0e" - end - - resource "sphinx-rtd-theme" do - url "https://files.pythonhosted.org/packages/ed/73/7e550d6e4cf9f78a0e0b60b9d93dba295389c3d271c034bf2ea3463a79f9/sphinx_rtd_theme-0.4.3.tar.gz" - sha256 "728607e34d60456d736cc7991fd236afb828b21b82f956c5ea75f94c8414040a" - end - - resource "typed-ast" do - url "https://files.pythonhosted.org/packages/18/09/b6a6b14bb8c5ec4a24fe0cf0160aa0b784fd55a6fd7f8da602197c5c461e/typed_ast-1.4.1.tar.gz" - sha256 "8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b" - end - - resource "typing-extensions" do - url "https://files.pythonhosted.org/packages/6a/28/d32852f2af6b5ead85d396249d5bdf450833f3a69896d76eb480d9c5e406/typing_extensions-3.7.4.2.tar.gz" - sha256 "79ee589a3caca649a9bfd2a8de4709837400dfa00b6cc81962a1e6a1815969ae" - end - - def install - python3 = Formula["python@3.8"].opt_bin/"python3" - 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" - ENV["MYPY_USE_MYPYC"] = "1" - 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 1db1e5237cfbc..0000000000000 --- a/Formula/mysql++.rb +++ /dev/null @@ -1,42 +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.5.tar.gz" - sha256 "b780beeb3a9cd9ce6a9043028527484df8e822c58c5274d4d67ec5ba2fc0a778" - revision 1 - - bottle do - cellar :any - sha256 "657ebf2f50f14f877b6892bbee2c5e92aef47093a22918a9d14b871769d76a30" => :catalina - sha256 "0e2b71648130ccac76a5d861e609538ffc697e629db9c352b0f69b513df4aa4e" => :mojave - sha256 "a8bb0d5cdc09c45b28b15e6e3de0b20260b8f11f395fb968d1f6a4c931d9a292" => :high_sierra - 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 76160c70511fa..0000000000000 --- a/Formula/mysql-client.rb +++ /dev/null @@ -1,48 +0,0 @@ -class MysqlClient < 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.19.tar.gz" - sha256 "3622d2a53236ed9ca62de0616a7e80fd477a9a3f862ba09d503da188f53ca523" - - bottle do - sha256 "43a72c20ae7b146f6dc7d01b9f63bef605972c26ecf2970de841f4ecd02c4b9e" => :catalina - sha256 "c8d2434da809237c64cd3dd4139a2bd148b6773fca040c001cc7af468354e761" => :mojave - sha256 "cb1fdc14848bdeaf8c3e4ebb1550cabd794771e7f7918be1716e08b43e8889b9" => :high_sierra - end - - keg_only "it conflicts with mysql (which contains client libraries)" - - depends_on "cmake" => :build - # GCC is not supported either, so exclude for El Capitan. - depends_on :macos => :sierra if DevelopmentTools.clang_build_version < 900 - depends_on "openssl@1.1" - - uses_from_macos "libedit" - - def install - # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) - args = %W[ - -DFORCE_INSOURCE_BUILD=1 - -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 - -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-client@5.7.rb b/Formula/mysql-client@5.7.rb deleted file mode 100644 index 36607cc4b978b..0000000000000 --- a/Formula/mysql-client@5.7.rb +++ /dev/null @@ -1,49 +0,0 @@ -class MysqlClientAT57 < 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.29.tar.gz" - sha256 "00f514124de2bad1ba7b380cbbd46e316cae7fc7bc3a5621456cabf352f27978" - - bottle do - sha256 "f6708680504eee30c923cd496380cd75e6e90b8b48c4b5fc76497e26d012d2b0" => :catalina - sha256 "a10197d6594410082510efcb27ab460265a1235ae9e7c8b8c3b604396cf9ef0c" => :mojave - sha256 "d1c843f81568ad49b6856d76b04d96069f9ddafcfe27162dee92ea0e7373cc97" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - - depends_on "openssl@1.1" - - 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-connector-c++.rb b/Formula/mysql-connector-c++.rb deleted file mode 100644 index 757ec7342066c..0000000000000 --- a/Formula/mysql-connector-c++.rb +++ /dev/null @@ -1,45 +0,0 @@ -class MysqlConnectorCxx < Formula - desc "MySQL database connector for C++ applications" - homepage "https://dev.mysql.com/downloads/connector/cpp/" - url "https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-8.0.20-src.tar.gz" - sha256 "50eaebd1d59b5681b6959a8c5b95bdeeffd021db0f06264eb497706dbc5b39cb" - - bottle do - cellar :any - sha256 "d135296e51b3c7b0eb1a4735250fae125d08ee7367107b9fc71ec43810b009b7" => :catalina - sha256 "02a6351ad7a7be72463d65ead3b4fe23ad8322ca46a8516fefb7054cadddf29a" => :mojave - sha256 "093917f65031b2e8a0998b54854976bd5c7ae26ec0a63cfcf48a4906135756e2" => :high_sierra - end - - depends_on "boost" => :build - depends_on "cmake" => :build - depends_on "mysql-client" - depends_on "openssl@1.1" - - def install - system "cmake", ".", *std_cmake_args, - "-DINSTALL_LIB_DIR=lib" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #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; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", - "-L#{lib}", "-lmysqlcppconn8", "-o", "test" - output = shell_output("./test") - assert_match "Connection refused", output - end -end diff --git a/Formula/mysql-connector-c++@1.1.rb b/Formula/mysql-connector-c++@1.1.rb deleted file mode 100644 index 82a2e3eddffdf..0000000000000 --- a/Formula/mysql-connector-c++@1.1.rb +++ /dev/null @@ -1,43 +0,0 @@ -class MysqlConnectorCxxAT11 < Formula - desc "MySQL database connector for C++ applications" - homepage "https://dev.mysql.com/downloads/connector/cpp/" - url "https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-1.1.13.tar.gz" - sha256 "332c87330ab167c17606b95d27af110c3f8f228658e8ba0d1f6e5f0a0acf3b41" - revision 1 - - bottle do - cellar :any - sha256 "08bf6fb8a787b7b007717ce1099121239c44e02a4cce5d0c7c5dcb82835d3447" => :catalina - sha256 "759c0753dba575dbe1d13eb9a8a6658fb9ed93a840cc1147eb36f8bbcc98f3ea" => :mojave - sha256 "57d1006de8cc2f45f4860b1a4726cf1426f665810f6167dee1c77ba2f006a471" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "boost" => :build - depends_on "cmake" => :build - depends_on "mysql-client" - depends_on "openssl@1.1" - - 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}", - "-I#{include}", "-L#{lib}", "-lmysqlcppconn", "-o", "test" - system "./test" - end -end diff --git a/Formula/mysql-sandbox.rb b/Formula/mysql-sandbox.rb deleted file mode 100644 index af824cc05be36..0000000000000 --- a/Formula/mysql-sandbox.rb +++ /dev/null @@ -1,32 +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" - license "Apache-2.0" - head "https://github.com/datacharmer/mysql-sandbox.git" - - bottle do - cellar :any_skip_relocation - sha256 "243b5248bbf998820b15079d4d2228a8289a9f48471723d06764ba4dc4a27a3e" => :catalina - 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 56402828273d3..0000000000000 --- a/Formula/mysql-search-replace.rb +++ /dev/null @@ -1,20 +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/4.1.2.tar.gz" - sha256 "3da4b2af67bb820534c0e8d8dc6b87f4b38be6fe2410df90177a39dc24ae4593" - license "GPL-3.0" - - 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.rb b/Formula/mysql.rb deleted file mode 100644 index 15937460fb006..0000000000000 --- a/Formula/mysql.rb +++ /dev/null @@ -1,173 +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.19.tar.gz" - sha256 "3622d2a53236ed9ca62de0616a7e80fd477a9a3f862ba09d503da188f53ca523" - revision 1 - - bottle do - sha256 "e5a5455d254260e9ca9821cb9c5e9ba623d724315c5f20ab2e26b9d2c3891f50" => :catalina - sha256 "35b85e2bb6cb5c45b230e488a9d8d8f543d066db133aa52e3b94c32246ea7841" => :mojave - sha256 "f75655d4d35ca527bbe94020fa09ff65991e9059d5cc4e66520b7c3692de72e1" => :high_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 - depends_on "openssl@1.1" - depends_on "protobuf" - - uses_from_macos "libedit" - - conflicts_with "mariadb", "percona-server", - :because => "mysql, mariadb, and percona install the same binaries" - - # 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[ - -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 - -DINSTALL_PLUGINDIR=lib/plugin - -DMYSQL_DATADIR=#{datadir} - -DSYSCONFDIR=#{etc} - -DWITH_BOOST=boost - -DWITH_EDITLINE=system - -DWITH_SSL=#{Formula["openssl@1.1"].opt_prefix} - -DWITH_PROTOBUF=system - -DWITH_UNIT_TESTS=OFF - -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 libssl copies as the binaries use the keg anyway and they create problems for other applications - rm_rf lib/"libssl.dylib" - rm_rf lib/"libssl.1.1.dylib" - rm_rf lib/"libcrypto.1.1.dylib" - rm_rf lib/"libcrypto.dylib" - rm_rf lib/"plugin/libcrypto.1.1.dylib" - rm_rf lib/"plugin/libssl.1.1.dylib" - - # 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 - mysqlx-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 - # 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}" - - port = free_port - pid = fork do - exec bin/"mysqld", "--bind-address=127.0.0.1", "--datadir=#{dir}", "--port=#{port}" - end - sleep 2 - - output = shell_output("curl 127.0.0.1:#{port}") - 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 diff --git a/Formula/mysql@5.6.rb b/Formula/mysql@5.6.rb deleted file mode 100644 index 91d32fad47ca9..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.47.tar.gz" - sha256 "0919096705784c62af831bb607e99345083edd76967c8c65966728742a9127fe" - - bottle do - sha256 "3ae76dae15820186fc74aef54f6365a55e19abc7c6d7826db5a1c774b9d9c759" => :catalina - sha256 "85d0cd1ae169ee42eb5fbc95a6a337c17d79d042e041ffb7f01c8313874989c7" => :mojave - sha256 "bf8272f7d912896a94f21ba7802e78ca49b70b20fc9c01f610d0f9b449469fae" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - 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[ - -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 - -DMYSQL_DATADIR=#{datadir} - -DSYSCONFDIR=#{etc} - -DWITH_EDITLINE=system - -DWITH_SSL=yes - -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=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" - - # 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 - # 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}" - - port = free_port - pid = fork do - exec bin/"mysqld", "--datadir=#{dir}", "--port=#{port}" - end - sleep 2 - - output = shell_output("curl 127.0.0.1:#{port}") - 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 diff --git a/Formula/mysql@5.7.rb b/Formula/mysql@5.7.rb deleted file mode 100644 index b35fa6240eff1..0000000000000 --- a/Formula/mysql@5.7.rb +++ /dev/null @@ -1,157 +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.29.tar.gz" - sha256 "00f514124de2bad1ba7b380cbbd46e316cae7fc7bc3a5621456cabf352f27978" - - bottle do - sha256 "bf0cdc294df996455c8abad3e03b6691f2145a4036085ad2570ec6c993e6b9c0" => :catalina - sha256 "88cf1f9f07a84694654f790507da937909eee1b16a0e47d473b2fc45e19c9ec1" => :mojave - sha256 "b4bf218448de13e40027117d3813d9a7a72d3205deb9658da16b85f74ad390af" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - uses_from_macos "libedit" - - on_linux do - depends_on "pkg-config" => :build - end - - 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 - # 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}" - - port = free_port - pid = fork do - exec bin/"mysqld", "--bind-address=127.0.0.1", "--datadir=#{dir}", "--port=#{port}" - end - sleep 2 - - output = shell_output("curl 127.0.0.1:#{port}") - 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 diff --git a/Formula/mysqltuner.rb b/Formula/mysqltuner.rb deleted file mode 100644 index 79e0615ab5b30..0000000000000 --- a/Formula/mysqltuner.rb +++ /dev/null @@ -1,21 +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.17.tar.gz" - sha256 "c82f29aa017360ab8888808393bd06e79af6fa447a62908a3b3dddea92b768b5" - license "GPL-3.0" - 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 24a45702a8520..0000000000000 --- a/Formula/mytop.rb +++ /dev/null @@ -1,80 +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://deb.debian.org/debian/pool/main/m/mytop/mytop_1.9.1.orig.tar.gz" - sha256 "179d79459d0013ab9cea2040a41c49a79822162d6e64a7a85f84cdc44828145e" - revision 8 - - bottle do - cellar :any - sha256 "69930f7d5c68b0d6ce75c89820732f269d3b3c6651358875b0db58ae1ead38f0" => :catalina - sha256 "ac13ecf239ff9d4bb1d39ad584c46ac9a5c95f3b96b3991bf9108280b30c0a19" => :mojave - sha256 "2862de7630947648898e1ef348a8357fdd25622310c9af03450c40ea33fc925c" => :high_sierra - end - - depends_on "mysql-client" - depends_on "openssl@1.1" - - 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://deb.debian.org/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 3c09ad8dd36fb..0000000000000 --- a/Formula/n.rb +++ /dev/null @@ -1,24 +0,0 @@ -class N < Formula - desc "Node version management" - homepage "https://github.com/tj/n" - url "https://github.com/tj/n/archive/v6.6.0.tar.gz" - sha256 "c082e234e89928f5facd33dfa57ecb1de88b246429a8e88a3e14b7d69ce52964" - license "MIT" - head "https://github.com/tj/n.git" - - bottle do - cellar :any_skip_relocation - sha256 "7dcbe4416e8bf6e460f0061878b9a0efda09586f34b91cebbca3851c929378d4" => :catalina - sha256 "7dcbe4416e8bf6e460f0061878b9a0efda09586f34b91cebbca3851c929378d4" => :mojave - sha256 "7dcbe4416e8bf6e460f0061878b9a0efda09586f34b91cebbca3851c929378d4" => :high_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..970d8409fe6f0 --- /dev/null +++ b/Formula/n/n.rb @@ -0,0 +1,27 @@ +class N < Formula + desc "Node version management" + homepage "https://github.com/tj/n" + url "https://github.com/tj/n/archive/refs/tags/v10.1.0.tar.gz" + sha256 "53f686808ef37728922ad22e8a5560f4caf1d214d706639ef8eca6e72b891697" + license "MIT" + head "https://github.com/tj/n.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "81646c87b6a7b3f3f74de589a2246cc12f9477a1b04a1fa3dadc08d991842a74" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "81646c87b6a7b3f3f74de589a2246cc12f9477a1b04a1fa3dadc08d991842a74" + sha256 cellar: :any_skip_relocation, arm64_ventura: "81646c87b6a7b3f3f74de589a2246cc12f9477a1b04a1fa3dadc08d991842a74" + sha256 cellar: :any_skip_relocation, sonoma: "658d2c03d442e49143a223a77d49a462ec2ce5ee40d22da4a932e178920234d4" + sha256 cellar: :any_skip_relocation, ventura: "658d2c03d442e49143a223a77d49a462ec2ce5ee40d22da4a932e178920234d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "81646c87b6a7b3f3f74de589a2246cc12f9477a1b04a1fa3dadc08d991842a74" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81646c87b6a7b3f3f74de589a2246cc12f9477a1b04a1fa3dadc08d991842a74" + end + + def install + bin.mkdir + system "make", "PREFIX=#{prefix}", "install" + end + + test do + system bin/"n", "ls" + end +end diff --git a/Formula/n/naabu.rb b/Formula/n/naabu.rb new file mode 100644 index 0000000000000..abdd3e11c912d --- /dev/null +++ b/Formula/n/naabu.rb @@ -0,0 +1,32 @@ +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.4.tar.gz" + sha256 "51f2bb5d00b5951798973b578eec3a2e353c76da22a29844dab27d7f01baabd8" + license "MIT" + head "https://github.com/projectdiscovery/naabu.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "afe496cdde964c4e1af352070b5dd5c39d5be1472f5c0eb6a0285195740ea745" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe12a077d5686f65488fb0d0f767f4435ec1fb77eb36e4b98eae763d6e147cd8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0e37e1203f18e2a403ee4013180b52948c1c1d81faaee2e85681f6e364f1c353" + sha256 cellar: :any_skip_relocation, sonoma: "e1c3e6145fe672066ef1ad60dc764610c775c5596adce6df632346238d42f5f4" + sha256 cellar: :any_skip_relocation, ventura: "905d018934cb185e075e2016f78cb51bbd0c8ae1ae6105e625d22a8c9bb4dd37" + sha256 cellar: :any_skip_relocation, arm64_linux: "a55af6311bc0b3cb436b0e44a9df8b3a10708585b0a599830cb9662673693665" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75c58e20514c22dfccb43653c25566d8ea71d411d3e606184ae54132c817bd1d" + 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..1a060cb7b6df4 --- /dev/null +++ b/Formula/n/nacl.rb @@ -0,0 +1,59 @@ +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 + + 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..5a4a0fe514e3f --- /dev/null +++ b/Formula/n/naga-cli.rb @@ -0,0 +1,152 @@ +class NagaCli < Formula + desc "Shader translation command-line tool" + homepage "https://wgpu.rs/" + url "https://static.crates.io/crates/naga-cli/naga-cli-25.0.0.crate" + sha256 "ede66d4c10828909e20b14811b0e70b1d4ae8ff03945e0ec91eb4d75842a2309" + 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_sequoia: "9f381df3f1f5551ef09d6f5a1db7c785ec7e1988cda561a593f94a32225c8993" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d457e86412f3df14521e8267d1ae644d399252c77fcf9bfa9384240307221465" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b9280d8353ef24bb2e18d9e51ebb092169f6d7320f5206abe2c7b5640c4ed54d" + sha256 cellar: :any_skip_relocation, sonoma: "bc3ea3f9e021d67d263779865162628850433346461726780d2c1236cdc80c74" + sha256 cellar: :any_skip_relocation, ventura: "baa2ba2e910a5516ee2ad96fd0688287eb9c4995bf72c057ffaf573bee22e336" + sha256 cellar: :any_skip_relocation, arm64_linux: "1299f4b9af4abfe2831665c53af2223929f4b0dfd6f1ec6bf534bfee77b7a075" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00a19e82f71008d5e690cb4c72fcc9ecc7c86c9a3d0626fab0918d12bf25ecd7" + 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..fd4833f986229 --- /dev/null +++ b/Formula/n/naga.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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, mojave: "0deef9e2936b7e5256c4f3e6f22c85389e3b8e53a586018854cbad3b983adc53" + sha256 cellar: :any_skip_relocation, high_sierra: "324d31a0ae721075843ff5e326f35efcd1a03d784e92ef8419b954b40a55fae3" + sha256 cellar: :any_skip_relocation, sierra: "8baa28b92a0d6970a857c859b11e4a1df878db5270f259bd3ccfe3b5f57f3303" + sha256 cellar: :any_skip_relocation, el_capitan: "6ff3dd51d1cdeed9364c36c25d1c2794f973e2927077eaeb251fa0dbfc48a531" + 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..03a8558522dbd --- /dev/null +++ b/Formula/n/nagios-plugins.rb @@ -0,0 +1,53 @@ +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_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..b0c97fbc7f00e --- /dev/null +++ b/Formula/n/nagios.rb @@ -0,0 +1,105 @@ +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_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..946c5c3179937 --- /dev/null +++ b/Formula/n/nak.rb @@ -0,0 +1,29 @@ +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.13.2.tar.gz" + sha256 "7475d887f172ae0890d469dc1e584feb90e55535923ca3ecf2c45e53f8f50b3c" + license "Unlicense" + head "https://github.com/fiatjaf/nak.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5cacf6f0b6f40719a2c144fe6fa654cd9c822e7ec5ccc21eebf49a3b81a4716c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5cacf6f0b6f40719a2c144fe6fa654cd9c822e7ec5ccc21eebf49a3b81a4716c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5cacf6f0b6f40719a2c144fe6fa654cd9c822e7ec5ccc21eebf49a3b81a4716c" + sha256 cellar: :any_skip_relocation, sonoma: "cb1df2c9bc9ceee0ac90c31b5aaffd4cb9ec6a614475b6f0615141ae4c02a949" + sha256 cellar: :any_skip_relocation, ventura: "cb1df2c9bc9ceee0ac90c31b5aaffd4cb9ec6a614475b6f0615141ae4c02a949" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08bd417d012989c03343b52af9e121e5a75dd8810f7f7f84c4cb6777923fed54" + 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 "\"method\":\"listblockedips\"", shell_output("#{bin}/nak relay listblockedips") + end +end diff --git a/Formula/n/nali.rb b/Formula/n/nali.rb new file mode 100644 index 0000000000000..2d39a1831be18 --- /dev/null +++ b/Formula/n/nali.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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, 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..94aa728bf46b3 --- /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 4 + sha256 cellar: :any_skip_relocation, all: "ebc63e1cd2a29eded2a1d8bd312f4df14882bd40e4e98f713e69aad521b47e0e" + end + + depends_on "python@3.13" + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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 "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/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/aa/9e/1784d15b057b0075e5136445aaea92d23955aad2c93eaede673718a40d95/rich-13.9.2.tar.gz" + sha256 "51a2c62057461aaf7152b4d611168f93a9fc73068f8ded2790f29fe2b5366d0c" + end + + def install + virtualenv_install_with_resources + + %w[name-that-hash nth].each do |cmd| + generate_completions_from_executable(bin/cmd, shells: [:fish, :zsh], 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..b610611af9695 --- /dev/null +++ b/Formula/n/naml.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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, 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..fb15272a9c11b --- /dev/null +++ b/Formula/n/nano.rb @@ -0,0 +1,46 @@ +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.4.tar.xz" + sha256 "5ad29222bbd55624d87ea677928b3106a743114d6c6f9b41f36c97be2a8e628d" + 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_sequoia: "d2f5ea1b33cec52869da9ca76f2965254dc1b85fcf496d5754353ccadafc4bbd" + sha256 arm64_sonoma: "f17394e1f1723dea883838a5ffe80ca4d2936d90aec0ae978e1b170b99153286" + sha256 arm64_ventura: "ccc99590f0bb5322c290c25da9df6ee50afeabcc7b46a0c5307ab46826363232" + sha256 sonoma: "8b32bd52654b34f36b0467c708682bc36e9ab88f136fc03c0ad420c757295b77" + sha256 ventura: "861c213bcbcfda215fd4e12957b8f06f2bb18e6b5f5f75e0b3e86e4f9dff9e67" + sha256 arm64_linux: "8eb34575f7aa47e1076a9c9225bd9997171f4a6db9961c5064bdcf7c993653f8" + sha256 x86_64_linux: "3fcf803e2e1e8b8b732f97bc45d1df1ce043f1a5cc3023194195dc53ac415627" + 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" + end +end diff --git a/Formula/n/nanobind.rb b/Formula/n/nanobind.rb new file mode 100644 index 0000000000000..f40a57b1a7e04 --- /dev/null +++ b/Formula/n/nanobind.rb @@ -0,0 +1,96 @@ +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.7.0.tar.gz" + sha256 "6c8c6bf0435b9d8da9312801686affcf34b6dbba142db60feec8d8e220830499" + license "BSD-3-Clause" + head "https://github.com/wjakob/nanobind.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "27262487a8a0bb8435e7652f543f2058057b1c7f5d3d71f36fd3c2cf1f34bcba" + end + + depends_on "cmake" => [:build, :test] + depends_on "python@3.13" => [: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.13" + + (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} 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/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..cd64c3dba4cc5 --- /dev/null +++ b/Formula/n/nanomsg.rb @@ -0,0 +1,48 @@ +class Nanomsg < Formula + desc "Socket library in C" + homepage "https://nanomsg.org/" + url "https://github.com/nanomsg/nanomsg/archive/refs/tags/1.2.tar.gz" + sha256 "6ef7282e833df6a364f3617692ef21e59d5c4878acea4f2d7d36e21c8858de67" + 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_sequoia: "16e338dbc680d97de181c2e8d8aae40cd825a7f7bf4c10415d0c802e7b442c89" + sha256 cellar: :any, arm64_sonoma: "643d76f342c533285619f3be66314377ace8a7a99dc5536a65f6971dcabd88fd" + sha256 cellar: :any, arm64_ventura: "308cf4314ea400020c0b85222f3fe0fb09f80ad204c1e2bc6271f0011df14feb" + sha256 cellar: :any, arm64_monterey: "dcfbd463f07433a38c053f412678fcf5eb718ba13bafc86930bac6c7af651d55" + sha256 cellar: :any, arm64_big_sur: "78c5546a8a36be470a1aab0bfd05c473e841981ce51388ea395dcc94ce5c7a93" + sha256 cellar: :any, sonoma: "85bb59067acdb04c0c0b3319a5194316dff9a08cbe1002a227319e6dea9af76c" + sha256 cellar: :any, ventura: "4cd22f2ae9bcccba55906434a857271ece101a8ce4bf2fb554d5b9fe8fa146fb" + sha256 cellar: :any, monterey: "112db66905b5f3b99bc8740e33b7735a5ea3da4eb4d5e14ddd466c736b24e4eb" + sha256 cellar: :any, big_sur: "4ef65cd7590b96d868f21168e970892fdbe216f3bc0a74beb35006b24049b6ea" + sha256 cellar: :any, catalina: "421059d935dabba7625c58d56408f0658dab708c3dae59caf7f459c38d9bb632" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc6eb07f28e8b7ccbd1312ae26298b5c7d35de21addc43d73b76f74aee2bab31" + sha256 cellar: :any_skip_relocation, x86_64_linux: "099a03bfe5111a28fe413cc3e15958844adaf5324b68f86d30497ad4a87ded53" + 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..d99dec626433e --- /dev/null +++ b/Formula/n/nanomsgxx.rb @@ -0,0 +1,93 @@ +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 + + bottle do + 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..a83d5fa6addea --- /dev/null +++ b/Formula/n/nanopb.rb @@ -0,0 +1,71 @@ +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 1 + + livecheck do + url "https://jpa.kapsi.fi/nanopb/download/" + regex(/href=.*?nanopb[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2752728b93432f3038baf1265309816fa727ca0047be7e4741a5b2b66dcb2db4" + sha256 cellar: :any, arm64_sonoma: "6a8a0983e5cef877a39983eee07a476e9ce6872ac35e8d20612ccc34c32ea87e" + sha256 cellar: :any, arm64_ventura: "a7acbc645e97667aa9924d1fb85a579cd6c4f628e79deabb467033a027db4de4" + sha256 cellar: :any, sonoma: "d60addc61d0a2454f9118b4b8c727c59ba271b4aa04c758d2b242dbb5514dff5" + sha256 cellar: :any, ventura: "39d4114c8a87b5bffac3e7dd7c230fb774ecd1c3c3b09d91e5bb9d631f43b5c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "4ad24fb383ea51833f9d0f785b5f5ad96694e167becdfd8fe209e1b6815a31fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "efeceec89652aa4621f289e3b1918c83fb768f958792cf85cee62f3dd38b4471" + end + + depends_on "cmake" => :build + depends_on "protobuf" + depends_on "python@3.13" + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/55/de/8216061897a67b2ffe302fd51aaa76bbf613001f01cd96e2416a4955dd2b/protobuf-6.30.1.tar.gz" + sha256 "535fb4e44d0236893d5cf1263a0f706f1160b689a7ab962e9da8a9ce4050b780" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/81/ed/7101d53811fd359333583330ff976e5177c5e871ca8b909d1d6c30553aa3/setuptools-77.0.3.tar.gz" + sha256 "583b361c8da8de57403743e756609670de6fb2345920e36dc5c2d914c319c945" + end + + def install + ENV.append_to_cflags "-DPB_ENABLE_MALLOC=1" + venv = virtualenv_create(libexec, "python3.13") + 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..86d43d36d569f --- /dev/null +++ b/Formula/n/nanorc.rb @@ -0,0 +1,25 @@ +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" + + 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..a439edc3f124f --- /dev/null +++ b/Formula/n/nap.rb @@ -0,0 +1,33 @@ +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" + + bottle do + rebuild 1 + 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..56492a392f815 --- /dev/null +++ b/Formula/n/nasm.rb @@ -0,0 +1,53 @@ +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.16.03/nasm-2.16.03.tar.xz" + sha256 "1412a1c760bbd05db026b6c0d1657affd6631cd0a63cddb6f73cc6d4aa616148" + 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_sequoia: "7f641dcb5ae03d3eebbfe11b3284a1b655f794f79a9aabf8c396003d8940d059" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c04988e99839f591ced743c876289c18fb403b3a6826effaa3a0a9ba9385ddbc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "265e501fd778167b9c9122097acbf94c0d0577b8c5e2e94722d88cc89a07ba3f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f354fd20ce32d149d1fe08b9cc5ba1c1facdd19d6c3ee16c88ecdeaef3d012e2" + sha256 cellar: :any_skip_relocation, sonoma: "81b2abb78f56dc299b3cd69a8626b04997f6fd06df71f3d56058331089a58a4e" + sha256 cellar: :any_skip_relocation, ventura: "79b87e6bfcb38df38909219e8ae172e970324236074912a5a23704449e5e097b" + sha256 cellar: :any_skip_relocation, monterey: "7d00b410fdb6d366f344057cb17fa58b5d65c6ee888394bd14c5e210122d0b8a" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b5609eb18359a83013e5dfa1371b802602d9676802736df2ed0a1cef211c582" + sha256 cellar: :any_skip_relocation, x86_64_linux: "138876a9a24c01fda90cecba6aaba7b6e8e94e95768215338e709cc63b80821c" + 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..5b6b017ad535d --- /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.11.3.tar.gz" + sha256 "bde3ec9e82ea88386dafbda2a26fec85a4ac7f2bcd75bda298beb9e2eb81f01d" + 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_sequoia: "b3976757fcebb042cc22f8ee3c9204aed53b7980840768d022b3da4840691041" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b3976757fcebb042cc22f8ee3c9204aed53b7980840768d022b3da4840691041" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b3976757fcebb042cc22f8ee3c9204aed53b7980840768d022b3da4840691041" + sha256 cellar: :any_skip_relocation, sonoma: "f83052e32158f7684730217b10da5dc328e4967a6b7ac4b43abd46d15582d511" + sha256 cellar: :any_skip_relocation, ventura: "f83052e32158f7684730217b10da5dc328e4967a6b7ac4b43abd46d15582d511" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b049f6bdd69e0bbc9c1e0270669c767e31e89c52c9e0f26dae39938f03503e0" + 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..e2c400537937c --- /dev/null +++ b/Formula/n/nats-streaming-server.rb @@ -0,0 +1,51 @@ +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_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, 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..6435c0693d81d --- /dev/null +++ b/Formula/n/naturaldocs.rb @@ -0,0 +1,49 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cd5b8ae5f4eb425cfedd08ac4d23b5a5515851257576a0faf77592ba129c4d5c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd5b8ae5f4eb425cfedd08ac4d23b5a5515851257576a0faf77592ba129c4d5c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cd5b8ae5f4eb425cfedd08ac4d23b5a5515851257576a0faf77592ba129c4d5c" + sha256 cellar: :any_skip_relocation, sonoma: "cd5b8ae5f4eb425cfedd08ac4d23b5a5515851257576a0faf77592ba129c4d5c" + sha256 cellar: :any_skip_relocation, ventura: "cd5b8ae5f4eb425cfedd08ac4d23b5a5515851257576a0faf77592ba129c4d5c" + sha256 cellar: :any_skip_relocation, arm64_linux: "42c3c57a234e360a982c706672b29094dcd6cf848e4854e91c57f852f9d90ba3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42c3c57a234e360a982c706672b29094dcd6cf848e4854e91c57f852f9d90ba3" + 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..b084a5b1abcc9 --- /dev/null +++ b/Formula/n/nauty.rb @@ -0,0 +1,71 @@ +class Nauty < Formula + desc "Automorphism groups of graphs and digraphs" + homepage "https://pallini.di.uniroma1.it/" + url "https://pallini.di.uniroma1.it/nauty2_8_9.tar.gz" + mirror "https://users.cecs.anu.edu.au/~bdm/nauty/nauty2_8_9.tar.gz" + sha256 "c97ab42bf48796a86a598bce3e9269047ca2b32c14fc23e07208a244fe52c4ee" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "578e9a6a33dacc5574586019c8a22244879573c241e7a1be9ad7183cd4c91aa4" + sha256 cellar: :any, arm64_sonoma: "022ba063976e84dd4e0712d6931a0958db497c4f2f4e561ec518172ff26d2eeb" + sha256 cellar: :any, arm64_ventura: "fa1634a9e589d67b2df80daca50f4417d46a26f9c03fe0ac3a9acbe59dacfdd0" + sha256 cellar: :any, arm64_monterey: "3d521857063e06e2e1bbd12a7fc139b4402288ba388a37606c5df19c885942e5" + sha256 cellar: :any, sonoma: "f44e77ba13875fdfd450ca378080aa6be8a7e48d6082623846b18a3f525d7d1a" + sha256 cellar: :any, ventura: "4a288706331ed1966319cbe0aced25c694e426c587ed56167a2905cfbf2ba584" + sha256 cellar: :any, monterey: "129084aaac09aac1e749cf4ed1eb0c716afc2c6c9d7689a877b96bdf12e5c837" + sha256 cellar: :any_skip_relocation, arm64_linux: "844934bff50859c4bb0add9d80cc6e07cdf22c967fdea1a3950cfee0e33b35b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6858f23478175ad58d2aa59eaa599ab3610476043c9b8062e6ef4d897051d412" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + 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..f589dc8c8d960 --- /dev/null +++ b/Formula/n/nave.rb @@ -0,0 +1,26 @@ +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: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cf0777ec6f533a7c1d68910219d1d5d87d5e75c01411e39113781bfea4ba31ee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cf0777ec6f533a7c1d68910219d1d5d87d5e75c01411e39113781bfea4ba31ee" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cf0777ec6f533a7c1d68910219d1d5d87d5e75c01411e39113781bfea4ba31ee" + sha256 cellar: :any_skip_relocation, sonoma: "8ac556a8a994120d89fd325ec1e851d601ba006baa180045fe5659f8c0d1276d" + sha256 cellar: :any_skip_relocation, ventura: "8ac556a8a994120d89fd325ec1e851d601ba006baa180045fe5659f8c0d1276d" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf0777ec6f533a7c1d68910219d1d5d87d5e75c01411e39113781bfea4ba31ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "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..17232c9237623 --- /dev/null +++ b/Formula/n/navi.rb @@ -0,0 +1,32 @@ +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_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, 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..278c59131088a --- /dev/null +++ b/Formula/n/navidrome.rb @@ -0,0 +1,47 @@ +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.55.2.tar.gz" + sha256 "bdc609bca68531190bac7591b9ba14b3aed356c989087803f16c2d888a8878a8" + license "GPL-3.0-only" + head "https://github.com/navidrome/navidrome.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e4253eb9086dc0ab26cbc6c0e1affbc1feacfe69679c2bf2bcea9f3d67e2e22d" + sha256 cellar: :any, arm64_sonoma: "bf31eb52e348146caf5e0352a8de412a16023a0fa8d57b5eaa2dd36784a43677" + sha256 cellar: :any, arm64_ventura: "eba8fc0b55cfdae27cbb1f390f6e625947374d7fb6c92c7b10fb282eaa7612f0" + sha256 cellar: :any, sonoma: "525a5fe97f039722515d3100f14af57196037db3648ace6a8b07407b65bb95f7" + sha256 cellar: :any, ventura: "d0ed9c8dfe3749fc0cf6635c9bfa8dac7c53ac52940ac5bd2d50028a2b2c3274" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe065d7c8c4602d973e22d1066047a4ecafc4e7a57742bb8bd812a0079ccc209" + end + + depends_on "go" => :build + depends_on "node" => :build + depends_on "pkgconf" => :build + depends_on "ffmpeg" + depends_on "taglib" + + def install + 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..ec318cabef743 --- /dev/null +++ b/Formula/n/nb.rb @@ -0,0 +1,48 @@ +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.19.0.tar.gz" + sha256 "a1f7c6d8832a10161d5e05e91410564371f6bac9f4c9a10a02b1ecd23b6bc623" + license "AGPL-3.0-or-later" + head "https://github.com/xwmx/nb.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "30c82fbe5089614a1bcc9bd876ed3dd5b544359a33fa9b1fdbb4588ce38f991c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "30c82fbe5089614a1bcc9bd876ed3dd5b544359a33fa9b1fdbb4588ce38f991c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "30c82fbe5089614a1bcc9bd876ed3dd5b544359a33fa9b1fdbb4588ce38f991c" + sha256 cellar: :any_skip_relocation, sonoma: "cce374d8304d0945ae6aa2925e27e56d0a334ab018d5bef3fefd6f68d2bd8c91" + sha256 cellar: :any_skip_relocation, ventura: "cce374d8304d0945ae6aa2925e27e56d0a334ab018d5bef3fefd6f68d2bd8c91" + sha256 cellar: :any_skip_relocation, arm64_linux: "30c82fbe5089614a1bcc9bd876ed3dd5b544359a33fa9b1fdbb4588ce38f991c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30c82fbe5089614a1bcc9bd876ed3dd5b544359a33fa9b1fdbb4588ce38f991c" + 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..8b88260fda55f --- /dev/null +++ b/Formula/n/nbdime.rb @@ -0,0 +1,160 @@ +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 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "372c2579d50170bbd4f3bded9adeec40d9a29b82f7e5f982462aa0180912fb29" + end + + depends_on "certifi" + depends_on "jupyterlab" # only to provide jupyter-server and nbconvert + depends_on "python@3.13" + + 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 "gitdb" do + url "https://files.pythonhosted.org/packages/19/0d/bbb5b5ee188dec84647a4664f3e11b06ade2bde568dbd489d9d64adef8ed/gitdb-4.0.11.tar.gz" + sha256 "bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/b6/a1/106fd9fa2dd989b6fb36e5893961f82992cf676381707253e0bf93eb1662/GitPython-3.1.43.tar.gz" + sha256 "35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/88/04/b5bf6d21dc4041000ccba7eb17dd3055feb237e7ffc2c20d3fae3af62baa/smmap-5.0.1.tar.gz" + sha256 "dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/43/6d/fa469ae21497ddc8bc93e5877702dca7cb8f911e337aca7452b5724f1bb6/urllib3-2.2.2.tar.gz" + sha256 "dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168" + 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..908a1ed10a86b --- /dev/null +++ b/Formula/n/nbimg.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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, mojave: "f78297721594cdf2c825c589c193fc29f01bfd2e3bfe6f63c3c788ed2699fcc5" + sha256 cellar: :any_skip_relocation, high_sierra: "20d4ae1588773f9ccd4ff2181def08297ea1119ca70f39392ef11648cb72270f" + sha256 cellar: :any_skip_relocation, sierra: "75fd1505a68d1c499ddcf73e912947910659d9bd127c208cafeb3e8899664fbd" + sha256 cellar: :any_skip_relocation, el_capitan: "402904e3588fe5a8ae00d7131fe29821880f31a8ec19fb89e70a79f76e067452" + sha256 cellar: :any_skip_relocation, arm64_linux: "c337e9b4f70cc61fda6ad272b9760f456e3a32c36d7d9842e2c3bc44b06134eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4c91a552e56c4f2e78422c8a4721d7ffbb54bb0bdb326e983f9989c5c9500ce" + end + + resource "homebrew-test-bmp" do + url "https://gist.githubusercontent.com/staticfloat/8253400/raw/41aa4aca5f1aa0a82c85c126967677f830fe98ee/tiny.bmp" + sha256 "08556be354e0766eb4a1fd216c26989ad652902040676379e1d0f0b14c12f2e2" + 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").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..5635318db75f7 --- /dev/null +++ b/Formula/n/nbsdgames.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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..7e0b349ac2d68 --- /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.3.tgz" + sha256 "c9f9d715af74152fd248220a43a2a09868fdab68f7438dd558bbb69aa487bb86" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d7ae75f4531238b8bf4a1b0e6359d09c834da531093d63e8b022885435f3b09d" + 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..ef53585fb5ea2 --- /dev/null +++ b/Formula/n/ncdc.rb @@ -0,0 +1,52 @@ +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_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..6bbd77e807ea3 --- /dev/null +++ b/Formula/n/ncdu.rb @@ -0,0 +1,65 @@ +class Ncdu < Formula + desc "NCurses Disk Usage" + homepage "https://dev.yorhel.nl/ncdu" + url "https://dev.yorhel.nl/download/ncdu-2.8.2.tar.gz" + sha256 "022fa765d35a79797acdc80c831707df43c9a3ba60d1ae3e6ea4cc1b7a2c013d" + 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_sequoia: "8c6101ddddef74f72707d35042f89908d7e4809245aac6922f68ca9e802867ab" + sha256 cellar: :any, arm64_sonoma: "e2dc1b149d0902dd2a80bbe464dd76a03fc80f60eab9f9310e0ba7918e6ec945" + sha256 cellar: :any, arm64_ventura: "e38712f677f37a2c2e1f0c4b13232ddb4a9a8d9e865f18a506aece66a2f5dbbf" + sha256 cellar: :any, sonoma: "61dcdfbcc8ec7b2363d0d3ed9243bbb6db3e0faa3c9d846ba0ee09702fd56b39" + sha256 cellar: :any, ventura: "9e243cfcba2adc77d82a62444d13a200c71f435d203ccdd9241010e47457e58f" + sha256 cellar: :any_skip_relocation, arm64_linux: "010b5d4e07e41140c166a8066a26a6246f92c9229b6e4327a1a8ca29c99aa096" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3390c8fbb71866adbb6099023254feb4cf1112cf8bb6a59418fde4b3ce2dbdce" + 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..cb378242166b1 --- /dev/null +++ b/Formula/n/ncftp.rb @@ -0,0 +1,42 @@ +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_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..d11364eb4fbb5 --- /dev/null +++ b/Formula/n/ncmdump.rb @@ -0,0 +1,47 @@ +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.0.tar.gz" + sha256 "f59e4e5296b939c88a45d37844545d2e9c4c2cd3bb4f1f1a53a8c4fb72d53a2d" + license "MIT" + head "https://github.com/taurusxin/ncmdump.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9b8b18693e23e28c86536d252255072708216e857cd2e8e7102551dbbd07e4ea" + sha256 cellar: :any, arm64_sonoma: "6cc0adacd3083f40ad30cf8ea914f508c23e1720d23020775d914011615dffc3" + sha256 cellar: :any, arm64_ventura: "50fe70048df8144284e69b364daa834e073dddae300321bfec326d076d7f4733" + sha256 cellar: :any, sonoma: "6ce7bd73a815fe8a87ea4edf1df074ab29f5b57793888f7f45b8f08d5146617c" + sha256 cellar: :any, ventura: "08a148b759c425f00c14dd9a47e488e81654e6cd8a3473488ca1d91529e07b6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "73fb1e271e16219093c407dabfafedf583fe4d1665ae2aa0d0886e883ac703ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77421b520db321edb6b48416603b3c3ffc1319d4c3937ca0bd067e344662caa5" + end + + depends_on "cmake" => :build + depends_on "taglib" + + def install + # Use Homebrew's taglib + # See discussion: https://github.com/taurusxin/ncmdump/discussions/49 + inreplace "CMakeLists.txt", "add_subdirectory(taglib)\n", "" + inreplace buildpath/"src/ncmcrypt.cpp" do |s| + s.gsub! "#define TAGLIB_STATIC\n", "" + s.gsub! "#include \"taglib/tag.h\"", "#include " + s.gsub!(%r{#include "taglib/.*/(.*)\.h"}, '#include ') + end + + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_PREFIX_PATH=#{Formula["taglib"].opt_prefix}", *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..9f64aaaf69025 --- /dev/null +++ b/Formula/n/ncmpc.rb @@ -0,0 +1,69 @@ +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" + + livecheck do + url "https://www.musicpd.org/download/ncmpc/0/" + regex(/href=.*?ncmpc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "3e4c3f1696738bc7953a5e066430fabe411a08ac18637c0055237f7fbec8461b" + sha256 arm64_sonoma: "e6c82a7bfc8790701e5ae101608cd015c84f18f0a31e007b80ec5b3078555e62" + sha256 arm64_ventura: "f7c1bf501994b1028ab1fbd9ac4dd4d83c96bb3ab83b25b4ce8cf8f0e8f692fe" + sha256 sonoma: "9d2b5eb8ff59ba6b5cf65df8c0106197cdfb69a7970198950e433407087c005b" + sha256 ventura: "709d7f29cb41e2e081f09941a33fc2e49f9cb7bd47e9231acf8baf4869106cb0" + sha256 arm64_linux: "035d0b5dcd1e9f4847560b81d629c2cb35597521a00fe75ed56cf9ffb171879b" + sha256 x86_64_linux: "f47ead26271a682a4c3bff3720dce9a2ef700a80d92123477d7254056c2d1fb3" + 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 + 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..7cf1270ddeabe --- /dev/null +++ b/Formula/n/ncmpcpp.rb @@ -0,0 +1,58 @@ +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 4 + head "https://github.com/ncmpcpp/ncmpcpp.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "85bce87b0b6063cdbf8be5b857c8a2d411a645d11f37f12d66dc99431bf7b034" + sha256 cellar: :any, arm64_sonoma: "ac040b1f822500333c9193ebab20bd7910598c23a8e6aaada597ade970137a91" + sha256 cellar: :any, arm64_ventura: "317dbae909e32339ebf1134a8ae55bf0f609d04c5050a183cd644fcf2c301c10" + sha256 cellar: :any, sonoma: "f6d94110dc3839f47f1011b489eb4aaf82d7afa2e8bd55484baeae6d178c41c3" + sha256 cellar: :any, ventura: "0651a6f3101ce2af14a7e4af064bc6a765244966db3fe9afa6da2adf0fcc8c4b" + sha256 cellar: :any_skip_relocation, arm64_linux: "08416eed22effd6c038ac64dfa1a7955df0ed74633fc8bb105b64207c22047c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fad7efcda3ef45c061a14d4b0517d8b4eed7ba186085e7abc6ad559167bc4873" + 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" + + 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..862d9d056b1bd --- /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/20250503.tar.gz" + sha256 "3afea4cf092ce97d06305b72c6affbcfb3530f536ae8e81a4f22007d82b729e9" + license "BSD-3-Clause" + head "https://github.com/Tencent/ncnn.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "72f1114fb730f083917dc054456e626e247c09d6012693754c69e75446fcd7f3" + sha256 cellar: :any, arm64_sonoma: "314599df10d983a2722f4ad64cf5ba79131669e306df2a2679121ef982b29511" + sha256 cellar: :any, arm64_ventura: "ee5a8ebd8783619317e16ed78b4854382db9374dea0d509130d63855b4221544" + sha256 cellar: :any, sonoma: "2d1590ecf51ef059278cfb8a1ffa8ff83e249ecf20fd185da90a63898e4b4a2f" + sha256 cellar: :any, ventura: "d2dbbb88a45a32cd6f4586b8d59dae0ee00704a9cc4af11c8d952b2cb9771970" + sha256 cellar: :any_skip_relocation, arm64_linux: "16ba12900dea4fe6f37b2dcc859d072d3ac7450bb071be0d304eb1cb044cd588" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f93165c65c7f1b938e25dccdbe574420d82df1adc416191023b1ce8114cca5a1" + 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..4de5ac04f576f --- /dev/null +++ b/Formula/n/nco.rb @@ -0,0 +1,79 @@ +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.3.tar.gz" + sha256 "f9185e115e246fe884dcae0804146b56df7257f53de7ba190fea66977ccd5a64" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "016683051edaab8c463bb06d0e67abb7f676e73bbc56da209b8117523fbcbe8c" + sha256 cellar: :any, arm64_sonoma: "06b88bf96fe1fcb98214c7fa0f18ac13f95f0dfb87354e9aaa470f25ddf19f88" + sha256 cellar: :any, arm64_ventura: "0b9dfb56a0715a8493a38de209db30264ee3330c71a60c11a0e90e5b14feff5c" + sha256 cellar: :any, sonoma: "d36b2ab46f025cefe922332b0e79378fae84ac103b180c1ec2a6ce08c1740a5c" + sha256 cellar: :any, ventura: "6826e166a0f390722aa352f3f0d5a38af73d0d172eb67e95bd36eb0a481e82ea" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d68df0d8dc0af882b0ba189fdc6bf412935dc841f62d4d1ab97e0e82c1a93bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e18741d889ae6f8aef1edc838490626baf3c18c6b99e2ddac7b0ab3f0c598c6c" + 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://www.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..ba5a487590f77 --- /dev/null +++ b/Formula/n/ncompress.rb @@ -0,0 +1,45 @@ +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 + + bottle do + 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, mojave: "e680253759776cc3de92aee1afac39c180f1758113bc56e25bbd469206df0c5a" + 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..6f67020f94655 --- /dev/null +++ b/Formula/n/ncrack.rb @@ -0,0 +1,56 @@ +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 + + bottle do + 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..82c2b2ae935c2 --- /dev/null +++ b/Formula/n/ncspot.rb @@ -0,0 +1,54 @@ +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.2.2.tar.gz" + sha256 "11555a61be381afa6196b0603d12ea34ee0c6e1660d7c586d13927f3e5ba802c" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "550dd0374f89b19ec42d30d166eead73d38681c7317fece9af40757b36ec413c" + sha256 cellar: :any, arm64_sonoma: "fdc0d374b07983da672dabd0c0dd1a7fdfca47b69f4c346d53f408b16224058c" + sha256 cellar: :any, arm64_ventura: "30da4cb1e0c494bb35a115792ae58efed2e14075f6da9aa87db399d0445e1557" + sha256 cellar: :any, sonoma: "b9cb4a5b28d90399618594b3f6cf0d7e3032f56962c42b8a1a8ddb0ec2e847fc" + sha256 cellar: :any, ventura: "2ffab85ac8029a9406c7d3604f91b1ec56c27d377d09ab46cfb98fa7a1bdf614" + sha256 cellar: :any_skip_relocation, arm64_linux: "beece05f5b43cf0f7df06edfd81a0ba07904ba1be052b4a7fbfb756f823096eb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc62314bdc978974ec4f7f75a925189066309ad2ef83543efca8efc47ea5eb1f" + end + + depends_on "rust" => :build + depends_on "portaudio" + + uses_from_macos "python" => :build + uses_from_macos "ncurses" + + on_linux do + depends_on "pkgconf" => :build + 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..dc9610acb2995 --- /dev/null +++ b/Formula/n/ncurses.rb @@ -0,0 +1,107 @@ +class Ncurses < Formula + desc "Text-based UI library" + homepage "https://invisible-island.net/ncurses/announce.html" + url "https://ftp.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://ftpmirror.gnu.org/ncurses/ncurses-6.5.tar.gz" + sha256 "136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6" + license "MIT" + + bottle do + 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 + + depends_on "pkgconf" => :build + + on_linux do + depends_on "gpatch" => :build + end + + def install + # Workaround for + # macOS: mkdir: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/12: Operation not permitted + # Linux: configure: error: expected a pathname, not "" + (lib/"pkgconfig").mkpath + + 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? + + 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..cdbe7be81f2f3 --- /dev/null +++ b/Formula/n/ncview.rb @@ -0,0 +1,54 @@ +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_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..7370fc0d0fa7d --- /dev/null +++ b/Formula/n/ndenv.rb @@ -0,0 +1,47 @@ +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_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, mojave: "11134806587add67781fb03d7be2fd2322029e77e4b744d927fba9afbe6e1b82" + sha256 cellar: :any_skip_relocation, arm64_linux: "c5c259e192f7344bd7e565e602495bbdbba873162f5cd149109148730f189e85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "50382fe45272fa7f72497bb0f40a02fd4bf9e293eca303777b9e154021f7c501" + end + + 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..e8d2f1b057782 --- /dev/null +++ b/Formula/n/ndiff.rb @@ -0,0 +1,51 @@ +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 + + bottle do + 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, mojave: "1849064e29be787191a0e1dba0322ca1f06361cff18127a26a926e5e7c12c79c" + sha256 cellar: :any_skip_relocation, high_sierra: "e07f1749ab348c33f3918e0278ac4dacbb6aee0553dbb62434a8b59174d20746" + sha256 cellar: :any_skip_relocation, sierra: "ed6f753f9fe240486de3b6589350fcc0e7afbe345ae2e01bf6b47e132de9be4e" + sha256 cellar: :any_skip_relocation, el_capitan: "6faf20ce4c88110019c76cc4253cd65e5743fab7cff109fc8a7d41c8f411012e" + 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..f99c9013c4217 --- /dev/null +++ b/Formula/n/ndpi.rb @@ -0,0 +1,37 @@ +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.10.tar.gz" + sha256 "58e17cc4cb9f9df851d6e3fbf3b0429aa3d15b17d910e8d4e7cd194f337c8f84" + license "LGPL-3.0-or-later" + head "https://github.com/ntop/nDPI.git", branch: "dev" + + bottle do + sha256 cellar: :any, arm64_sequoia: "cf0637b3cf5f016b1aa4a58bd144c3ced2c88656bb5be973b74e3366a74be4ba" + sha256 cellar: :any, arm64_sonoma: "516d894aea4a68b618a156a03ead2500bfd82d7aefc6695cbf69af46e217eb1e" + sha256 cellar: :any, arm64_ventura: "d297b296f2dfda154d6f25de7c442de06dd1184e7b5091876b5217a5cd5d033b" + sha256 cellar: :any, sonoma: "93315328adbb6bd402a3beadae655f4169f4cbbf3f3ddf4a88ba6d2f1d6a9de2" + sha256 cellar: :any, ventura: "4f7060394acb0ce6edc09f5e58ec250a93c9476555761959af6a5b8ef7af4e9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f47166ca3478522dd97db73e25098ba12ffd3909ee4aaffc558489e855e1041" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77dc577fa30a25ad44a5016594faf8b22cce222b528f7862f70e59146aeda3c8" + 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..cda0c946a690d --- /dev/null +++ b/Formula/n/ne.rb @@ -0,0 +1,66 @@ +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_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..9b98ebb421636 --- /dev/null +++ b/Formula/n/neatvi.rb @@ -0,0 +1,30 @@ +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: "16", + revision: "ae775781dbeb2763b4d81ad87cb2342a4fd79627" + license "ISC" + head "https://repo.or.cz/neatvi.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f8c33e90d161462cde41b8478e3888b11edc0f66fb44020013e8e95e6626c36c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9e6fc6d9a26ae8d6feffc6988320edf81863c016b2a79b5bc810535c29af1124" + sha256 cellar: :any_skip_relocation, arm64_ventura: "80727bb03a4a3634186642354ddd57dfbce3fe89ddfafc72ea57bf77b6843cc6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "621d8c8e74a4f6f79927103e66da64da81f6da507d9bb57f140777f6276f4af3" + sha256 cellar: :any_skip_relocation, sonoma: "87a69fc6726751688c0788ec03b247e30e2144f6587ca8c9ec59ba050d2ca3b4" + sha256 cellar: :any_skip_relocation, ventura: "20d4b6eb92b0164f67fb3ad9ff59480aedb7553faf21b0df1c1ce7f693454dd7" + sha256 cellar: :any_skip_relocation, monterey: "d808818b120b3ea8e1ef9eb3099cd1ae6ce1053878291f26b471bfc097c4c06a" + sha256 cellar: :any_skip_relocation, arm64_linux: "d9fbeff5e48a98bcbab78a21fdcb350668e270f5d8a6bcddf5e29dd72f9fd616" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3af0fc40824aa6b3cf776c443eee3e23cd9572bdec30ab06f468ffd058501801" + 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..c647da3171b03 --- /dev/null +++ b/Formula/n/nebula.rb @@ -0,0 +1,47 @@ +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.5.tar.gz" + sha256 "5f7000e943cbe8cc7d7e2651ee2301121654fe1f51902f010ca908ac9ca0eede" + license "MIT" + head "https://github.com/slackhq/nebula.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9be5d6d3107b432e480fee5d8de763b7a635f8405e89dc18d03e2eb87280c519" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9be5d6d3107b432e480fee5d8de763b7a635f8405e89dc18d03e2eb87280c519" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9be5d6d3107b432e480fee5d8de763b7a635f8405e89dc18d03e2eb87280c519" + sha256 cellar: :any_skip_relocation, sonoma: "f99c5d8ee04af63d8b66d8621a7fdade99320a79d40c858e41ae9d63b3afbb07" + sha256 cellar: :any_skip_relocation, ventura: "f99c5d8ee04af63d8b66d8621a7fdade99320a79d40c858e41ae9d63b3afbb07" + sha256 cellar: :any_skip_relocation, arm64_linux: "12e43169ea6e398f43373feead4749abe76ca79a4ecf0bc515527d625c8b6350" + sha256 cellar: :any_skip_relocation, x86_64_linux: "261454c498815640ce24b1e470de31ec0edc17a37818b07f08c7c3037cc8d716" + 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/config.yml"] + 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..39af3a24cd247 --- /dev/null +++ b/Formula/n/nedit.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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, mojave: "7e3760fcb4d5a78393094c94b0c97a4e9b73487eeca6510963f098ebaeddf281" + sha256 cellar: :any, high_sierra: "0f1ea26247cf5abe89ecc7038820b937ee20046fa44b504363604af4a7bbb093" + 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..281a2593eb272 --- /dev/null +++ b/Formula/n/needle.rb @@ -0,0 +1,57 @@ +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_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..420a34a607fe8 --- /dev/null +++ b/Formula/n/nef.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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..baebcac9405b4 --- /dev/null +++ b/Formula/n/negfix8.rb @@ -0,0 +1,28 @@ +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 + + 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..e45c75b6edaf8 --- /dev/null +++ b/Formula/n/neko.rb @@ -0,0 +1,71 @@ +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" + + bottle do + 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 + if HOMEBREW_PREFIX.to_s != "/usr/local" + <<~EOS + You must add the following line to your .bashrc or equivalent: + export NEKOPATH="#{HOMEBREW_PREFIX}/lib/neko" + EOS + end + 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..0a484b196fabe --- /dev/null +++ b/Formula/n/nelm.rb @@ -0,0 +1,45 @@ +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.4.0.tar.gz" + sha256 "19fae429a70848da726e330ffe48976b20111a73c5a4ad6479f2dd82e26176ff" + license "Apache-2.0" + head "https://github.com/werf/nelm.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8c36377a0caa9137a815f57826ffd3ddc7e93423c3bdab4297cc05767b640316" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "92599f3444e7d4df8935e44b7eca276fa62957a414121f262070c2ebcd2e3360" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8260419b0e66803645057099c7e4b0d847d78179f225c3d818df693e2eb79239" + sha256 cellar: :any_skip_relocation, sonoma: "a695fb7343cfb94b0fbd6e54a5b3c77b9c01eb01bca03fa143dad7aaa695deca" + sha256 cellar: :any_skip_relocation, ventura: "c240543c746bd7876174e8006167065e101368bcc38025ed687a33df6adc9bad" + sha256 cellar: :any_skip_relocation, arm64_linux: "8062c2e5b4f6d3e7095118301ee654384ddf181f063d61fdd85b1a0d65a30a49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c320376a4a1a5827b7e9dd78740d627ad96d411dc1958dadccd4e56cfdf4c143" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/werf/nelm/internal/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..764a246049613 --- /dev/null +++ b/Formula/n/nemu.rb @@ -0,0 +1,45 @@ +class Nemu < Formula + desc "Ncurses UI for QEMU" + homepage "https://github.com/nemuTUI/nemu" + url "https://github.com/nemuTUI/nemu/archive/refs/tags/v3.3.1.tar.gz" + sha256 "7cdb27cbf5df1957d0f0a258fc334f15d9e2d06a450a982bb796094efc3960c0" + license "BSD-2-Clause" + + bottle do + sha256 arm64_sequoia: "4c96f0430555710f094365598dddb0e2089ab38b1c756532a11f2a3303bd2768" + sha256 arm64_sonoma: "af6f110c24124397c439c2b8ffc7dd0b9186fcbfe9946ad0d45a4a3a094146de" + sha256 arm64_ventura: "7ee1275f2d0d4420779817a5379e3b5aba1189a2912ccc3bc099c0d149614bf6" + sha256 arm64_monterey: "d1e08e1f8edafdf159a802c2f37e4413a61c15265f9cc2821b8d538d293a0a93" + sha256 sonoma: "4eae6f67f094316ff9ae0aaea3be33254e870a74677b962735c2f78a5bfc7682" + sha256 ventura: "f01fb55760affcd6ff698e4b680c3ae12212493b3ed530f75ef626cdba48b82b" + sha256 monterey: "5feb7ba4d086208474da5fbf0c1a98ceb26d783bc2950fe3a9ae1d90519a7289" + sha256 arm64_linux: "14a133841c2ab6395959d5d2a84b20ea4c585571c7bc9ea3d435efc0a4af4872" + sha256 x86_64_linux: "babf6558252a668a49b3fb0552415c50ebabbcee6ba4dad54a64e8f01b8dc79f" + 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..cd8a4f86fdea4 --- /dev/null +++ b/Formula/n/neo4j.rb @@ -0,0 +1,70 @@ +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.04.0-unix.tar.gz" + sha256 "118cb439904d1aaad67f2421be518d2acc2b754f621acc209ee3362e5b67ba65" + 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: "68bdaaa4ea98456b892250aa3e3a17a004dcda68e44cb1bc95c5d780c3c1c9dd" + 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 + # Ensure uniform bottles by replacing comments that reference `/usr/local`. + inreplace bash_completion.children, "/usr/local", HOMEBREW_PREFIX + 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 + 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..64de65cd19dc1 --- /dev/null +++ b/Formula/n/neocmakelsp.rb @@ -0,0 +1,37 @@ +class Neocmakelsp < Formula + desc "Another cmake lsp" + homepage "https://neocmakelsp.github.io/" + url "https://github.com/neocmakelsp/neocmakelsp/archive/refs/tags/v0.8.22.tar.gz" + sha256 "ec6c505fd74b5160c29e6c52bba4c5835f5456bf39983c105bccf0b0622bc72b" + license "MIT" + head "https://github.com/neocmakelsp/neocmakelsp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "afb3619688ad4b02f867457e092ebf0146c7bbb3ad32058a07f991076e25ecf5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c8a46e3731b8322e9e43b6fde818e5a7a586dc0ae8c0611e9ab712ec04188a41" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0334e33cafbae620b3305fb03af12d4514ee0bda56d4af26b5ba9debe2de542b" + sha256 cellar: :any_skip_relocation, sonoma: "f285ffa6b9d94b0a6a005c79e789a5b489ff2b287275bdb8ad2ff0f04da97b4b" + sha256 cellar: :any_skip_relocation, ventura: "74f8d6ab530803bb93d8a4420a93ecbb8836fde242d6649a6412fff30438bf69" + sha256 cellar: :any_skip_relocation, arm64_linux: "91fef34df832f85a8160a31cef3c9ae09c04656a4387b695819961de21646e0a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f6ecbd9c2f45d26d669140399461b41e23520b92b8a1d21310868b5c294e5b7b" + 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..cb7bb11bb9696 --- /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/20250510.tar.gz" + sha256 "12d225e270d8e16cda41d855880b9d938750a4f1d647f55c6353337d32ffd653" + license "GPL-2.0-or-later" + head "https://github.com/neomutt/neomutt.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "aeeccca4cdcc5bcfdd187ff32ec295746bd0ff57a92b108a67609917ca6ca96e" + sha256 arm64_sonoma: "e7494884f1e9a9289e3993fd0fca9ae0f310d1d30b3886cc95abe0a58bbf18cd" + sha256 arm64_ventura: "2b2fd04f1c68cb95cca733c59c6892b7e9a91e33583844bcd36327c23ae08ddf" + sha256 sonoma: "fe987a4cb6230c846a72b1eb4a7112bbe6699400f349ca3152811a5d7b941999" + sha256 ventura: "695b0073f3d0b12d395f8b4c82606d941879ef26c091ce3c29f358a26c1da1bf" + sha256 arm64_linux: "6b80fca262c7f3614cb79765ca84c2dc49b0b00ac42262f387939bb5cfad4736" + sha256 x86_64_linux: "a04f64ef9d7de760165d6816de3256163f3473d26e4b25967e09a1d1e6f7320f" + 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 + output = shell_output("#{bin}/neomutt -F /dev/null -Q debug_level", 1) + assert_equal "set debug_level = 0", output.chomp + end +end diff --git a/Formula/n/neon.rb b/Formula/n/neon.rb new file mode 100644 index 0000000000000..8744d1be6fce2 --- /dev/null +++ b/Formula/n/neon.rb @@ -0,0 +1,88 @@ +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.34.2.tar.gz" + mirror "https://fossies.org/linux/www/neon-0.34.2.tar.gz" + sha256 "f98ce3c74300be05eddf05dccbdca498b14d40c289f773195dd1a559cffa5856" + 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_sequoia: "3f496943bca776d801cc69ed3030cbc674c2fbc0389eff638f695b254bd0c7f7" + sha256 cellar: :any, arm64_sonoma: "cdeeaa3cea7d5264e40ab92a95390e69f3a03edcb98fc16bdbb6575e0a26668f" + sha256 cellar: :any, arm64_ventura: "6f9a4360b98d572185c32090f352e4ad3d3cbe454d0b91126ee6569946a2171d" + sha256 cellar: :any, sonoma: "32590d82f754c66457a2d9b9881cd12802b714d80eabc71f792a340be3e08a86" + sha256 cellar: :any, ventura: "09a70e28898fc6a10d5ec3e95b3ba90e9fe25d5115c90d5c18e68e2a71e794fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "62017abdb6ff75cc096e9e953e8e663d5b8d2d2ba16bffedc0d3b88db7397b7e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3316437aca39c321785644e5cfc62a627c4cf9b90e7b271b339ef89c15488611" + 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..d42f8d6f5540d --- /dev/null +++ b/Formula/n/neonctl.rb @@ -0,0 +1,33 @@ +class Neonctl < Formula + desc "Neon CLI tool" + homepage "https://neon.tech/docs/reference/neon-cli" + url "https://registry.npmjs.org/neonctl/-/neonctl-2.9.2.tgz" + sha256 "680ea4a627427ee7c7e1f7ef7dae55deafe9a717cb941ca1eb03228adc8e02c9" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "34690b17434aac6e9badb3a6ab988ffd767e1340d488551d85d4b0b78ec6b29c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "34690b17434aac6e9badb3a6ab988ffd767e1340d488551d85d4b0b78ec6b29c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "34690b17434aac6e9badb3a6ab988ffd767e1340d488551d85d4b0b78ec6b29c" + sha256 cellar: :any_skip_relocation, sonoma: "360d71f2e532a47fc45749eabb98e7b965f5b20f380725b6d9a7e605656ecb23" + sha256 cellar: :any_skip_relocation, ventura: "360d71f2e532a47fc45749eabb98e7b965f5b20f380725b6d9a7e605656ecb23" + sha256 cellar: :any_skip_relocation, arm64_linux: "34690b17434aac6e9badb3a6ab988ffd767e1340d488551d85d4b0b78ec6b29c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34690b17434aac6e9badb3a6ab988ffd767e1340d488551d85d4b0b78ec6b29c" + 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 + 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..902dae6a9714c --- /dev/null +++ b/Formula/n/neosync.rb @@ -0,0 +1,38 @@ +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.37.tar.gz" + sha256 "38b9588fdb55c14f3569da2e2be6c3ff128132871f175c43cd211b5a3f59fa63" + license "MIT" + head "https://github.com/nucleuscloud/neosync.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ed5357c5020d4c0555c2926f97f155179d0789b93b4f530ab68f5c98b7333fbc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed5357c5020d4c0555c2926f97f155179d0789b93b4f530ab68f5c98b7333fbc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ed5357c5020d4c0555c2926f97f155179d0789b93b4f530ab68f5c98b7333fbc" + sha256 cellar: :any_skip_relocation, sonoma: "addc1107c5233a7aa54177371d7eb53e42be2fa5e50157f35d16705c2f870bf8" + sha256 cellar: :any_skip_relocation, ventura: "addc1107c5233a7aa54177371d7eb53e42be2fa5e50157f35d16705c2f870bf8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "28aa003dd6ee0822bd4c049009165ada9a452d75c3e97ee96f5941f0b7cb6841" + end + + 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..2cab311c0c124 --- /dev/null +++ b/Formula/n/neovide.rb @@ -0,0 +1,92 @@ +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.0.tar.gz" + sha256 "89900673314f4dba66a1716197aca3b51f01365d9f8351563c3dc5604b3e48ab" + license "MIT" + head "https://github.com/neovide/neovide.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "beadfba290080cf999c7cec2415e8e2000b6d3d2cd8d43be6acd235a97c57482" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6db047e1f2a6180d2bdf1341448f9f64c5414371fa5c33c664258d23bd803b11" + sha256 cellar: :any_skip_relocation, arm64_ventura: "71903190f94bd7018ecf017d70bc02e1dabdf795391cb2921831437ca58f3876" + sha256 cellar: :any_skip_relocation, sonoma: "20f05f6186c0cb44b9f67c0968117cc157a081cbc8aefb24bfb6ec19c99ce63b" + sha256 cellar: :any_skip_relocation, ventura: "f89ba563de5b80e997b90c80e8efe1d03d4813de13ef0b70af325ac1392afc51" + sha256 cellar: :any_skip_relocation, arm64_linux: "441334ea72a94f2eb7fa628194f9730e15c38778001568b9afc00eab460ed7af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2473d65387128d4bb25a636fee7200ef68cbf875cb0ba135cb54f7fe25a2cdae" + end + + depends_on "ninja" => :build + depends_on "rust" => :build + depends_on "neovim" + + uses_from_macos "llvm" => :build + uses_from_macos "python" => :build, since: :catalina + + 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" + bin.write_exec_script prefix/"Neovide.app/Contents/MacOS/neovide" + end + + test do + test_server = "localhost:#{free_port}" + nvim_cmd = ["nvim", "--headless", "--listen", test_server] + ohai nvim_cmd.join(" ") + nvim_pid = spawn(*nvim_cmd) + + sleep 10 + + neovide_cmd = [bin/"neovide", "--no-fork", "--remote-tcp=#{test_server}"] + ohai neovide_cmd.join(" ") + neovide_pid = spawn(*neovide_cmd) + + sleep 10 + system "nvim", "--server", test_server, "--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..a760900eaa24b --- /dev/null +++ b/Formula/n/neovim-qt.rb @@ -0,0 +1,64 @@ +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 + sha256 cellar: :any, arm64_sonoma: "dd8bbbc56a52276068547d4cb4e84cbdd1e9f05293800e7fc60aae9cd1c96bd0" + sha256 cellar: :any, arm64_ventura: "7ab5ee7ef90dc33466c2525ab9afb54cf697406025424e3cb6e8171fc1c61f7a" + sha256 cellar: :any, sonoma: "a535fb79e82a33cce34998ce1b38b104539117b89549f09621978d87521e33e7" + sha256 cellar: :any, ventura: "edbafb81758da42687579cac4f13b06b4658488bb6132b5fe20fb9012dfb9156" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22f2e5fc2cf3d1f0863688b460cca53ebca3a23e9fd79d0bb769c3bbb8d6e640" + end + + depends_on "cmake" => :build + depends_on "msgpack" + depends_on "neovim" + depends_on "qt" + + 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..22d23d115f477 --- /dev/null +++ b/Formula/n/neovim-remote.rb @@ -0,0 +1,78 @@ +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 2 + head "https://github.com/mhinz/neovim-remote.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "969080e39441d8db18d446ebae92c9a95d1d4738d64ac3528d7be2787fcef349" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a92d145e3bfd46ebca31454bef1d0089cc2eb3f34991e73ccdfe7e83eb38165" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2c90e4d80be180455c9922bcca4c7d9da06c52fa5a229c84c287f1bd3e93b0d3" + sha256 cellar: :any_skip_relocation, sonoma: "005a3b436ae67a59fb9c41e20117e9fb8236ab8c255db39e511a51c31d918958" + sha256 cellar: :any_skip_relocation, ventura: "4867e1eb46ec92e136a1500a70b5675bd26a37b374cf89a47adba12c64045bcb" + sha256 cellar: :any_skip_relocation, arm64_linux: "6657c430639a92f1d6d4a73f0a85d58bfb080e2cdfa437a92f17ff2cee10a7bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b914c93bc339131a9eafe74dd7b8ec2123a954934b29433aff5d6694644339e" + end + + depends_on "neovim" + depends_on "python@3.13" + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/2f/ff/df5fede753cc10f6a5be0931204ea30c35fa2f2ea7a35b25bdaf4fe40e46/greenlet-3.1.1.tar.gz" + sha256 "4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/18/c7/8c6872f7372eb6a6b2e4708b88419fb46b857f7a2e1892966b851cc79fc9/psutil-6.0.0.tar.gz" + sha256 "8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2" + end + + resource "pynvim" do + url "https://files.pythonhosted.org/packages/ce/17/259ab6acfb3fc85e209a649b0de1800c50f875bb946ac9df050827da8970/pynvim-0.5.0.tar.gz" + sha256 "e80a11f6f5d194c6a47bea4135b90b55faca24da3544da7cf4a5f7ba8fb09215" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + end + + def install + virtualenv_install_with_resources + end + + test do + socket = testpath/"nvimsocket" + file = testpath/"test.txt" + ENV["NVIM_LISTEN_ADDRESS"] = socket + + nvim = spawn( + { "NVIM_LISTEN_ADDRESS" => socket }, + Formula["neovim"].opt_bin/"nvim", "--headless", "-i", "NONE", "-u", "NONE", file, + [:out, :err] => "/dev/null" + ) + sleep 5 + + str = "Hello from neovim-remote!" + system bin/"nvr", "--remote-send", "i#{str}:write" + assert_equal str, file.read.chomp + assert_equal Process.kill(0, nvim), 1 + + system bin/"nvr", "--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..cc4583057db4a --- /dev/null +++ b/Formula/n/neovim.rb @@ -0,0 +1,140 @@ +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.1.tar.gz" + sha256 "ffe7f9a7633ed895ff6adb1039af7516cd6453715c8889ad844b6fa39c3df443" + + # Keep resources updated according to: + # https://github.com/neovim/neovim/blob/v#{version}/cmake.deps/CMakeLists.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.23.4.tar.gz" + sha256 "b66c5043e26d84e5f17a059af71b157bcf202221069ed220aa1696d7d1d28a7a" + end + + resource "tree-sitter-lua" do + url "https://github.com/tree-sitter-grammars/tree-sitter-lua/archive/refs/tags/v0.3.0.tar.gz" + sha256 "a34cc70abfd8d2d4b0fabf01403ea05f848e1a4bc37d8a4bfea7164657b35d31" + end + + resource "tree-sitter-vim" do + url "https://github.com/tree-sitter-grammars/tree-sitter-vim/archive/refs/tags/v0.5.0.tar.gz" + sha256 "90019d12d2da0751c027124f27f5335babf069a050457adaed53693b5e9cf10a" + end + + resource "tree-sitter-vimdoc" do + url "https://github.com/neovim/tree-sitter-vimdoc/archive/refs/tags/v3.0.1.tar.gz" + sha256 "76b65e5bee9ff78eb21256619b1995aac4d80f252c19e1c710a4839481ded09e" + end + + resource "tree-sitter-query" do + url "https://github.com/nvim-treesitter/tree-sitter-query/archive/refs/tags/v0.5.1.tar.gz" + sha256 "fe8c712880a529d454347cd4c58336ac2db22243bae5055bdb5844fb3ea56192" + end + + resource "tree-sitter-markdown" do + url "https://github.com/tree-sitter-grammars/tree-sitter-markdown/archive/refs/tags/v0.4.1.tar.gz" + sha256 "e0fdb2dca1eb3063940122e1475c9c2b069062a638c95939e374c5427eddee9f" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "371e99be7b1d20d76b2d08615156d1d2c374526baf54dffb2245a0e65eaca68c" + sha256 arm64_sonoma: "ad9124bcbc7a972899a91ff64788e8c05bd304fc48a2f178afa398318ac255e4" + sha256 arm64_ventura: "2bf780725a36d678dd6d687380db074c6ffa34fd90df7abb0afc8d119a9fafa3" + sha256 sonoma: "5ddbcda1bba79b13591960a797bebae27834c332ac6d69a29ce5e589a8a36a09" + sha256 ventura: "bc08b7cfa6822335edcc514f55fab5a63be316bee1b68360f965461692579f08" + sha256 arm64_linux: "e4fc50b684a3f3fcd71e63b2050ea41eb3817abbfed7933ebcca188f83beace6" + sha256 x86_64_linux: "c5d732c24b1252be3bbe98e44cddd5237a7dea2e94f9c712e4fe9764008655e3" + 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..7de9b4e8876ed --- /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.1.tar.gz" + sha256 "fb8dbdc8954aaf9dbf05396f51289a094a4927e385cc974bc410ecc3fcf16d03" + license "Apache-2.0" + head "https://github.com/containerd/nerdctl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "4649f0d0c5202c2657ab8b083e9ef443715d38df2a54332c86ca93e07c61ee4c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b7f4da0cf2057b8bebff9826b5a55ca9ced45f3e36fb73f93e1b2bee468b339" + 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..a8d282a42a442 --- /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.3.1.tar.gz" + sha256 "07722131df254910b0ff336350b87341bc0413b18a9a197543bf2c97ee634c88" + license "MIT" + head "https://github.com/ThatOneCalculator/NerdFetch.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f9021e78e9092a4d8fcf8ec6d71b64b401adf5c2d28a42c073376000a614d298" + 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..57b85286b3b8b --- /dev/null +++ b/Formula/n/nerdfix.rb @@ -0,0 +1,33 @@ +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_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..ebeaa44f4ef52 --- /dev/null +++ b/Formula/n/nerdlog.rb @@ -0,0 +1,52 @@ +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.7.2.tar.gz" + sha256 "58e14206c74d4a1f0d85a3cb08ae8b4c60c9d37adaf7fdf0b63ee53c9d8b3bd8" + license "BSD-2-Clause" + head "https://github.com/dimonomid/nerdlog.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "352bacc589c1cafbea8e2989fabc306792598fed3549de85612ec84d7e1e7fa8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4fe02e39a138bea3795bfdf1a5939312f8d50ae92ec00f073cdf558b32e7e9b8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4b5ab4f1f7142a0227dde5942fabae1d25478027f4baaf4e62fc12c3fb221812" + sha256 cellar: :any_skip_relocation, sonoma: "2dd4af014d0f1c82a8e5f251d31d47f371196e815cba34ca2a06bb11be1aac83" + sha256 cellar: :any_skip_relocation, ventura: "f314a695461cd74a28ff16fce9b6b8527ed6e323c1a0a434bea8ae794bb4bfe6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "81441f01e45aebc9e89d16a110f34dd019a5cb1cf4183d80eca52f4a727defc6" + 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..6be9e4911fe3e --- /dev/null +++ b/Formula/n/nesc.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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, mojave: "9b261a0f665954574e417d0f7509d2253d09ab45f43e6db48ddaa4e81120e8ba" + sha256 cellar: :any_skip_relocation, high_sierra: "bb30d87ef9a3896e8dc9fa346854ecad17d2ac42ebdb3d5d800a548b839afc37" + 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/nest.rb b/Formula/n/nest.rb new file mode 100644 index 0000000000000..2a91654d5b395 --- /dev/null +++ b/Formula/n/nest.rb @@ -0,0 +1,74 @@ +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.8.tar.gz" + sha256 "eb255f8828be001abea0cddad2f14d78b70857fc82bece724551f27c698318c8" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "1a34d790312185592e775e4e8fe4aef7383006d5043b7c97847d3c0d7db56394" + sha256 arm64_sonoma: "7d9f9e7ad474c91f30af1f8befd084621a645b6753780c98a03c3bda4c39f681" + sha256 arm64_ventura: "e4997e4c854f79114bf6126b93073cedd165b443f14d1086f7a246690b77b547" + sha256 sonoma: "c6628a5bb1198d80c5c1e56a2bdea010d585c067bac0603a744bf1f009191b8a" + sha256 ventura: "a77c3c6db49b56fe36710c8a05bfc36dc4604bc8bd5448ceb7744fdf216ce86c" + sha256 arm64_linux: "74f9abe8a628e7dd0737b8e16389309f48b3784f275b366ca83463acdc22a368" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e29d5b0a924beffaed5eef267c5c08b78529d3894a8099578d68e0853fb0d65" + end + + depends_on "cmake" => :build + depends_on "cython" => :build + depends_on "gsl" + depends_on "libtool" + depends_on "numpy" + depends_on "python@3.13" + 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.13 formula. + If you want to use PyNEST, use the Python interpreter from this path: + + #{Formula["python@3.13"].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.13"].bin/"python3.13", "-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..faddbf8981d5d --- /dev/null +++ b/Formula/n/nestopia-ue.rb @@ -0,0 +1,47 @@ +class NestopiaUe < Formula + desc "NES emulator" + homepage "http://0ldsk00l.ca/nestopia/" + url "https://github.com/0ldsk00l/nestopia/archive/refs/tags/1.53.1.tar.gz" + sha256 "21aa45f6c608fe290d73fdec0e6f362538a975455b16a4cc54bcdd10962fff3e" + license "GPL-2.0-or-later" + head "https://github.com/0ldsk00l/nestopia.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "9a00ff8b6b1eff8d5774ed427afbdb669cb512905268409ca102f15d32e7757b" + sha256 arm64_sonoma: "536e84f8e7dddec0baa5f84701f03022bc71019b4249475ea69d452f998c8468" + sha256 arm64_ventura: "4e9a0b4a72e6e41b6ce1064504e0784f56282f8e923baf7be176c98a3cc262d5" + sha256 sonoma: "ae9bddfba1d0fcb99e3b6fcb0a1c8f5671db3c76431ce9e3654fb7387da0a8ee" + sha256 ventura: "107be843559d0aa3bb8b331cd75a3e1361eac8c2ce73463c73e944d0ff9fd66f" + sha256 arm64_linux: "7d2a96b45a372cb24b73391d12423a3056dfc2167f4926528b292b4de763efa1" + sha256 x86_64_linux: "a04a201661a975527c42693e5b84b11f2f3eff999a78c7ee966483165959d7ed" + 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..7944bb5cd74c5 --- /dev/null +++ b/Formula/n/net-snmp.rb @@ -0,0 +1,76 @@ +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 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..12c7c99e2653c --- /dev/null +++ b/Formula/n/net-tools.rb @@ -0,0 +1,29 @@ +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" + + 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..785ea326fe493 --- /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 2 + sha256 cellar: :any_skip_relocation, all: "956b7206ec84b8593a134a61a6239ebd708be777740155aee63d8f8d0731c2d9" + end + + depends_on "python@3.13" + + 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..ff247944dfa77 --- /dev/null +++ b/Formula/n/netatalk.rb @@ -0,0 +1,111 @@ +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-2-3/netatalk-4.2.3.tar.xz" + sha256 "10a3c3a4c11acec657df9c33c69a6269e319dba759c5e1dfa41ee5a3f1b80c43" + 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_sequoia: "69e46dedf08d65bed39339feb1f8869e067cbe388dcaf5656dd387f0d9daf4cc" + sha256 arm64_sonoma: "f6955cafb3b273d5206c68b9b0dfb84cc96710a7ee7e88c27b0dbb38a288a53b" + sha256 arm64_ventura: "3fc7701c21ebfae0713083310756a0c44587c652394862905e66d360f39218d2" + sha256 sonoma: "d3fc3a551b589e4447939b2d2a45534c3e34ddb251a70b0b75b599a177b4217d" + sha256 ventura: "a4f38fa00e4d3e5d3a55e2131c0ea2b5962c9c46c2bd2427e38be834c4583ec0" + sha256 arm64_linux: "92aa0794215554271e9a7fbc52db72c474a7a12d2465da5345db5e95726c681c" + sha256 x86_64_linux: "a217b1d01f114b2a69080e4102066b2be1ccf566c203b5bd62f58b9a88ccea9a" + 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 "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" + + 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-init-dir=#{prefix}", + "-Dwith-init-hooks=false", + "-Dwith-install-hooks=false", + "-Dwith-lockfile-path=#{var}/run", + "-Dwith-pam-config-path=#{etc}/pam.d", + "-Dwith-rpath=false", + "-Dwith-spotlight=false", + "-Dwith-statedir-path=#{var}", + ] + + 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 + system sbin/"netatalk", "-V" + system sbin/"afpd", "-V" + assert_empty shell_output(sbin/"netatalk") + end +end diff --git a/Formula/n/netcat.rb b/Formula/n/netcat.rb new file mode 100644 index 0000000000000..3bb66a7f90ec9 --- /dev/null +++ b/Formula/n/netcat.rb @@ -0,0 +1,53 @@ +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" + + bottle do + rebuild 1 + 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 cellar: :any_skip_relocation, mojave: "3ac133de6b67a147954d78b9bd0c4c4cf4e0f43bdbbb98f51d8d962bb752d973" + sha256 cellar: :any_skip_relocation, high_sierra: "879d9c32f09e9ef31cb672983707f9d95341f6639bb8a4db54d7a6ea0878b946" + sha256 cellar: :any_skip_relocation, sierra: "9027fd429d5407fba0b3206bd0cd198c669f4744155efcf8e0dbdd6ba69b6d34" + sha256 cellar: :any_skip_relocation, el_capitan: "1f346605e0236ea7880258da2abf0bde1d7d8d8735a07d6d32feaf12425ff6da" + 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..21121d4b52168 --- /dev/null +++ b/Formula/n/netcdf-cxx.rb @@ -0,0 +1,78 @@ +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 + + bottle do + 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}" + + 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..47c9f7ab32dd9 --- /dev/null +++ b/Formula/n/netcdf-fortran.rb @@ -0,0 +1,67 @@ +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_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..da0a540aff9c0 --- /dev/null +++ b/Formula/n/netcdf.rb @@ -0,0 +1,68 @@ +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_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..7cc6359ff013b --- /dev/null +++ b/Formula/n/netdata.rb @@ -0,0 +1,98 @@ +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.5.1/netdata-v2.5.1.tar.gz" + sha256 "d61f641433e60b2046ba1b25b1f789637d4e763bef2d1644dfb1aa38b962ef8e" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "01487e74f848eb9fa5282d42ce827f5927b344627a68e9864c226de24001602a" + sha256 arm64_sonoma: "484cd8954181bef1cb77255572b93cda5fb5df321eb4dd6b7409ac0edf1a0a8c" + sha256 arm64_ventura: "f99fa3beb234a37afae94f96796e22a42b849ff450629ef92b333477685c3e22" + sha256 sonoma: "46cfad6207388f9e81769a56280c6c86196db7e07234dd3796a436f76ebb570a" + sha256 ventura: "61bacc8956878fc7710486be7a48f21d160031298fa4c567e861d6c3c0b6f1b6" + sha256 x86_64_linux: "d6ec4dc2eee29a30f240962d696832168a556953d934fad82e0f25703af1712f" + end + + depends_on "cmake" => :build + depends_on "go" => :build + depends_on "pkgconf" => :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 + + def install + # 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 + + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_FOR_PACKAGING=ON", + "-DENABLE_PLUGIN_NFACCT=OFF", + "-DENABLE_PLUGIN_XENSTAT=OFF", + *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..02ccc19d28125 --- /dev/null +++ b/Formula/n/netfetch.rb @@ -0,0 +1,37 @@ +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_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, 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..d14bb237b3cf1 --- /dev/null +++ b/Formula/n/nethack.rb @@ -0,0 +1,105 @@ +# 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 + + bottle do + 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? && MacOS.version >= :mojave + 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..56edc3720658b --- /dev/null +++ b/Formula/n/nethogs.rb @@ -0,0 +1,30 @@ +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_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..2c87c5d4be2c6 --- /dev/null +++ b/Formula/n/netlify-cli.rb @@ -0,0 +1,59 @@ +class NetlifyCli < Formula + desc "Netlify command-line tool" + homepage "https://www.netlify.com/docs/cli" + url "https://registry.npmjs.org/netlify-cli/-/netlify-cli-21.4.2.tgz" + sha256 "585595eaf343e03cee95402ea8c492dfab4f128881c296a872a82307ea21f01d" + license "MIT" + head "https://github.com/netlify/cli.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "81b9175167db2678626ac4f151a7856528c6e9fd1ee86744fd3dfcc93bf89ddd" + sha256 arm64_sonoma: "7d7855e3a619acbdfa5cb94c97f014196617c180e4b975e2f5ace19e96e2a629" + sha256 arm64_ventura: "c72b88ea20e0e98c32a01ddd4d689ae97fc0a12aedad455c9668c98d928ad32a" + sha256 sonoma: "5249580d5d4269240cd33a64d4bf5fee6d31d07721a6bcc438d02eae6fcbb84d" + sha256 ventura: "15cd6ef632b4e85768ee7dba80d4e71d8f63f57039c382553be041f706e6389d" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e5f70e0bf3c6c26a93e1a4fa60836c762e4f4922bafefece285a34ab62d362d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef19b55d9270a4945f4589777c4589f8275a1de9d59b1d6770a437b6692b4281" + end + + depends_on "node" + + on_linux do + depends_on "glib" + 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 site 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..78cac86b83c9a --- /dev/null +++ b/Formula/n/netlistsvg.rb @@ -0,0 +1,36 @@ +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" + + 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..c78efa7836cb2 --- /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.4.4.tar.gz" + sha256 "7e4801029a1db868cfb98661bcfdf2152e49d436d41f8748f124d1f4a3409d83" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "34b5efeb5d392402b007185b47d974e9a664dad743bcc135dae35e9db685c2b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "393080df1ab114d1d2beec62850676aa931445fe1b5dc99cad1b0454efe2a1ab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b933d4ec7f084d202afd3b48feb3230c7eed31ec58b1aa0dd87f2b87d1397a6a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e386fc98127ef24109de173931633f0705dc8963e7e5a236ed69991e280d116c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "611337cf807c5344df21127e4e0b982e8454237256779683346ff39adebd634d" + sha256 cellar: :any_skip_relocation, sonoma: "a0edb5db8bff90464d9f07c37b4cdad798163b76ef7a62dbcbfe7407c8467ad6" + sha256 cellar: :any_skip_relocation, ventura: "9388589b57733eda2e0cf8ec83bb49de8222603f5c7286b4dc6b57c69063a677" + sha256 cellar: :any_skip_relocation, monterey: "278a82473770a98ef3704737f2c2f4902ad818af931ff3bb872798f3c9169424" + sha256 cellar: :any_skip_relocation, big_sur: "6e304176fcc71ee0657520960c4e6b12304ef9bce2a73135b5ff69d0fe68e2ac" + sha256 cellar: :any_skip_relocation, catalina: "1561dc4ab182e2a3ac7f66553f9a7695683467201355969a041199464333c029" + sha256 cellar: :any_skip_relocation, arm64_linux: "a282249ce6794465154293b1548ee88268476ba2447836f50356253fbd6577c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1cb4bad8bac486dc82f994b64c823e9830afc267992fbe48dfda89eb7687729a" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + + on_system :linux, macos: :ventura_or_newer do + depends_on "texinfo" => :build + end + + def install + system "./autogen" + 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..161017b05bc98 --- /dev/null +++ b/Formula/n/netpbm.rb @@ -0,0 +1,148 @@ +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: "5068" + version "11.02.16" + 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 + + bottle do + sha256 arm64_sequoia: "f6c4cfbcc54fe4b12b0364bc7b63fa2421b3293d9882f1cd0cc463ab0fd62520" + sha256 arm64_sonoma: "e99104bac04be92f18c6ec18a1a2d0cef85b9df6eb7fac3eb9ef1489c985018e" + sha256 arm64_ventura: "c3d2a5860792dd9b10360f03786d548e66c19952b46ec08e6be1a90b90b3a05c" + sha256 sonoma: "3dc3d72415e4b961c18deb1050d6b6e318128e7f0ccfc0772159520b47720863" + sha256 ventura: "c3e3837d30af77ce18298e98e131dca5d1df2221530ed78166539bab186c07d2" + sha256 arm64_linux: "59987a8c5c81597cb6f3f3360bbc9f811b1908e92aef15d711d9bad9c4fef716" + sha256 x86_64_linux: "5fe045ecdade954e7b30584d5183f4b34ab8697ca5b3083eb69fb988bb57a58c" + 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: "5071" + version "5071" + + 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..a4da7f8fd69e8 --- /dev/null +++ b/Formula/n/netris.rb @@ -0,0 +1,102 @@ +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_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, mojave: "25697a4b18177f5e976dd5510b68cac949a589a7c9abe2e2d148b930db0d1f89" + sha256 cellar: :any_skip_relocation, high_sierra: "2ba4eea757cc21504d1da74796a29fcd23264b5d735c0c6debe1083614c2d57a" + sha256 cellar: :any_skip_relocation, sierra: "4ac49c49b3d000fcb5c9161f4b217231e9bee9faf29d5e4e7fc9f5d8e10772ec" + sha256 cellar: :any_skip_relocation, el_capitan: "0e793cab922cded47c3eccbf4e9ba8840a71f24830d7e01da8e2262d08d61c56" + 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/netsurf-buildsystem.rb b/Formula/n/netsurf-buildsystem.rb new file mode 100644 index 0000000000000..7f04e37806c62 --- /dev/null +++ b/Formula/n/netsurf-buildsystem.rb @@ -0,0 +1,54 @@ +class NetsurfBuildsystem < Formula + desc "Makefiles shared by NetSurf projects" + homepage "https://source.netsurf-browser.org/buildsystem.git" + url "https://download.netsurf-browser.org/libs/releases/buildsystem-1.10.tar.gz" + sha256 "3d3e39d569e44677c4b179129bde614c65798e2b3e6253160239d1fd6eae4d79" + license "MIT" + head "https://git.netsurf-browser.org/buildsystem.git", branch: "master" + + 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..ff058adc48833 --- /dev/null +++ b/Formula/n/nettle.rb @@ -0,0 +1,57 @@ +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.10.1.tar.gz" + mirror "https://ftpmirror.gnu.org/nettle/nettle-3.10.1.tar.gz" + sha256 "b0fcdd7fc0cdea6e80dcf1dd85ba794af0d5b4a57e26397eee3bc193272d9132" + license any_of: ["GPL-2.0-or-later", "LGPL-3.0-or-later"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "df8b22b1a4deeafeae7f4afe13cd7403a3700c7779715916c43a45fad7ca5aaa" + sha256 cellar: :any, arm64_sonoma: "87c602d6924a588d6fb7164f714cc3f29a63c6edd83ffb6b437faccc263133b8" + sha256 cellar: :any, arm64_ventura: "10243a9374699001a49008a6856904821a75e9a644ab49b9c2ac66c22ac31aa5" + sha256 cellar: :any, sonoma: "6e502038a53a443864edeb85e3423986ec5c383c0fd8c3061ba95af71d369744" + sha256 cellar: :any, ventura: "7d924af8b68729fbd75a279173b03da71219ee53c8c660198360dd4c8c0cde59" + sha256 cellar: :any_skip_relocation, arm64_linux: "56925c4200b245efa3e7587be30ef3f4881a5d8ad789e1d1d6edf810bb793d40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8aeaad58a40d92dc7e23b80d7b1663ece6d7a46d9b919a52c4553cbed9a9e214" + 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.13" + depends_on "scipy" + + on_macos do + depends_on "libomp" + end + + def python3 + which("python3.13") + end + + def install + 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..b955194b9e068 --- /dev/null +++ b/Formula/n/never.rb @@ -0,0 +1,70 @@ +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 + + bottle do + 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? + + system "cmake", "-S", ".", "-B", "build", *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..fc13041d91a2d --- /dev/null +++ b/Formula/n/neverest.rb @@ -0,0 +1,34 @@ +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 + + 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..5f14d1e19266d --- /dev/null +++ b/Formula/n/newlisp.rb @@ -0,0 +1,58 @@ +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 + + bottle do + 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 mojave: "179146b49c20011f3da4dbdb9b66a6ed66d5dd9f15d07aeca9b8717219a62eeb" + sha256 high_sierra: "5a0d4085a0e7fc364b3165be7e92a9dfeb2f4882e1971663ac74c70348a5c4a4" + 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..705ea655acc2a --- /dev/null +++ b/Formula/n/newman.rb @@ -0,0 +1,68 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "572ef9f591942dec78b5810920a2cba00b28f5267f4d06e82e6ac942817e9683" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa712cc0a93477ee5448241048937ca8ad4b9f4a21d19a29f30a359e4f4cb833" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa712cc0a93477ee5448241048937ca8ad4b9f4a21d19a29f30a359e4f4cb833" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fa712cc0a93477ee5448241048937ca8ad4b9f4a21d19a29f30a359e4f4cb833" + sha256 cellar: :any_skip_relocation, sonoma: "1e795f5512a9fe59808b928884c3026a9ee5c2962053faef9f053d08214a1705" + sha256 cellar: :any_skip_relocation, ventura: "1e795f5512a9fe59808b928884c3026a9ee5c2962053faef9f053d08214a1705" + sha256 cellar: :any_skip_relocation, monterey: "1e795f5512a9fe59808b928884c3026a9ee5c2962053faef9f053d08214a1705" + sha256 cellar: :any_skip_relocation, arm64_linux: "293d0a0e52c8d5c1e3ddebee286788baa6329839f4e664ee12240f7c80b28831" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa712cc0a93477ee5448241048937ca8ad4b9f4a21d19a29f30a359e4f4cb833" + 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..5c2330d882278 --- /dev/null +++ b/Formula/n/newrelic-cli.rb @@ -0,0 +1,41 @@ +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.98.2.tar.gz" + sha256 "383bf85ba72668538c780c3c50d7009cfe186b9ea13ec71dacf808d511b65e95" + 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_sequoia: "d53a47408781b4614ecdf0d4653b7b57bc0cee8da59aa2c55a8441cc0d74b2a3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e8ffad24460e35c2f82cc2b2845d5dc0911a4e95efec56f6f2dd9daf667a8dd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6672c2abaf574bee3d7b687faf20c12422ca4edc9e342f4e6766b9d73655a9aa" + sha256 cellar: :any_skip_relocation, sonoma: "1676e29e313c7eaa8eb6ed7ff333fd65751ed516b72e0589963f510d80b3e3e3" + sha256 cellar: :any_skip_relocation, ventura: "a7ef8b15aed2662d76360b91f99869ae4f3cc8ba2afb021364ca9f29699f850b" + sha256 cellar: :any_skip_relocation, arm64_linux: "385f4e4d47b0b4f4b89e0ad85c81e2586a3124f15424798b36f2031ec24401a2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fed705f119aa4f53a5132b21657eb064ec8367b62a9904708243a95dc8e3791c" + 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..19bcd1de4c37f --- /dev/null +++ b/Formula/n/newrelic-infra-agent.rb @@ -0,0 +1,59 @@ +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.63.1", + revision: "440f5b7726fec45a7b0380b4a385959039bc505f" + 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_sequoia: "92e23fd0e56dd3418a9e0c8cb10cbe68e2a818ec4eef8d6c7352d6d8affc6122" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "498dd89ebc822d621c785aef5a71697f441258991fc4febcdf292669afdde98e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "15f370f9939a6ad4cd83f5f735c869d85ce7ed856f260b41960e798578342b30" + sha256 cellar: :any_skip_relocation, sonoma: "d7f2a50f4529a2a01f6118fa79558c896753daedde7fae4d823e06bffd54f288" + sha256 cellar: :any_skip_relocation, ventura: "7dc6c1dcbfb61296fd12840af4c5118d3c9876369580fe732d71b7018c123c42" + sha256 cellar: :any_skip_relocation, arm64_linux: "31da91cd110a6805675b9b89f7561a5f2c60c9c39383dbf9f9c1e98d8a56d6c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c216630ff1a21844c9c9dbfcd6b29105ca2f40b1d07b405ad424b8ba230b7c54" + 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..0ab60cd70bee1 --- /dev/null +++ b/Formula/n/newsboat.rb @@ -0,0 +1,108 @@ +class Newsboat < Formula + desc "RSS/Atom feed reader for text terminals" + homepage "https://newsboat.org/" + url "https://newsboat.org/releases/2.39/newsboat-2.39.tar.xz" + sha256 "62551a7d574d7fb3af7a87f9dbd0795e4d9420ca7136abc2265b4b06663be503" + license "MIT" + head "https://github.com/newsboat/newsboat.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "784097ba80326b979eb1911e3069703e74931f098b4b4b09e6860d55625436a9" + sha256 arm64_sonoma: "cb4fb9c1e39faebed2936c9024596c5aae56a04d5383d114b2764fa231314e79" + sha256 arm64_ventura: "0f259c3cfdc92b561aba4dab533c737000591552ee2741f2e18dd8b575ca1df4" + sha256 sonoma: "118530c4024a841179a291c9cb8cc510def37e0dadc51204423cc55d1d5ef12d" + sha256 ventura: "64d63a00c216d589829b44c64d8cc1ff6c833d8fb0eff4bd8f699be39aca7998" + sha256 arm64_linux: "c5fc2f3b3031c7959cd6aca3038143adc52f77525e92d9d2b043717f9985ac1a" + sha256 x86_64_linux: "9594e4b2d0db3616517b295e687cc0832b149a68546dcdce2ab9309a622ea32d" + 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 + + # 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.com/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..1428ad309aa57 --- /dev/null +++ b/Formula/n/newsraft.rb @@ -0,0 +1,37 @@ +class Newsraft < Formula + desc "Terminal feed reader" + homepage "https://codeberg.org/newsraft/newsraft" + url "https://codeberg.org/newsraft/newsraft/archive/newsraft-0.30.tar.gz" + sha256 "5ae782d7eb19042cd05e260c8ec0fe4d0544e51716885a4b1e96a673576bd998" + license "ISC" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "fc25441587a212a0e2ff3ea4f3da8ea8ae4ee6eb056734f34457e359226c5075" + sha256 cellar: :any, arm64_sonoma: "ccbf32aa2aad3feca89328629e5639cc590cceb84e0819014d92c7b9edc7cd09" + sha256 cellar: :any, arm64_ventura: "28c538465291b8b65247cee90652ab3a81bdc4dff555386798a7cb2cdcedd87a" + sha256 cellar: :any, sonoma: "6524f7e716bd15f1a0b53de139f1ddbef314ef15700e5c1d0b3e6bfe04127a7c" + sha256 cellar: :any, ventura: "2d0e01a5a206136515d82bca07ae11c478995e9f1f9bb7d70c251428992f5519" + sha256 cellar: :any_skip_relocation, arm64_linux: "416ea9344c2a5e145eb76c0cc7238ba0214a85fbec51a3c2ba4335fe8ec813c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "984b829e7f58382aa6a5af27221be3424fef32dca3c7965c37dd04c7e332a575" + end + + depends_on "scdoc" => :build + depends_on "gumbo-parser" + depends_on "ncurses" + + uses_from_macos "curl" + uses_from_macos "expat" + uses_from_macos "sqlite" + + def install + 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 "Trying to initialize curses library...", File.read("test") + end +end diff --git a/Formula/n/newt.rb b/Formula/n/newt.rb new file mode 100644 index 0000000000000..7833e5afce55f --- /dev/null +++ b/Formula/n/newt.rb @@ -0,0 +1,73 @@ +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" + + livecheck do + url "https://releases.pagure.org/newt/" + regex(/href=.*?newt[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "ea9696a197929f238a1b30a02fefcf818e3b858d8203822c941c9a687609c1fc" + sha256 cellar: :any, arm64_sonoma: "5ca2f04f2776a526ef75eb1021bc62b913014533e6ba23aa7698f55ab04c2a6d" + sha256 cellar: :any, arm64_ventura: "effe0810ddce425071a2977345c49b817169da634debc65495804edf6f8aa479" + sha256 cellar: :any, sonoma: "66fa052a1ffa07040d784b9673cd691378e3511567899b0912156023cf1540d4" + sha256 cellar: :any, ventura: "4e2d05a8b49ac5145b7d2cc12912ee1cb4d95af69455556f3cb2c890c6b1f8ea" + sha256 cellar: :any_skip_relocation, arm64_linux: "686377c6653387d4c4099330479420648f484a0846d817bf8be4f81b1261919f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7dd7eb05b5dce0dad968eceac5f75d67354cb1cf8f1421dafa2e6dbb1e81b2bb" + end + + depends_on "popt" + depends_on "python@3.13" + depends_on "s-lang" + + on_macos do + depends_on "gettext" + end + + def python3 + "python3.13" + 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.13/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..3006f60211a89 --- /dev/null +++ b/Formula/n/nextdns.rb @@ -0,0 +1,39 @@ +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.45.0.tar.gz" + sha256 "6222359c4a1ea3106c0a13d470806ed833bfbc7a1d10bd91aa3f4701927031b0" + license "MIT" + head "https://github.com/nextdns/nextdns.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7c22e8b27dddf03f2d284ad7e2c52253af0b2fcdf99e659b0412aca0abb507cf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6c8437e377626604b3c60ecf0a93942276d7981e18402ed0312d2da7ffde3b06" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4de219fb06a06fa4fb45d7623bda26345d7f1ca91d8a963b3747c805edd034f0" + sha256 cellar: :any_skip_relocation, sonoma: "4de99ef7a9206a2adbdc0c1d91c0c1614338a3ace18700ac75c127725c836873" + sha256 cellar: :any_skip_relocation, ventura: "78f243bdbcae80d65405ac24eb110f31b820401b141491ecf18c3a7c5e8dffb2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ca408d706026e9cb54aae6f6b0ade858d3f21c26f35da8522df5cc942c307975" + 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/nexttrace.rb b/Formula/n/nexttrace.rb new file mode 100644 index 0000000000000..3fed9e5ca3692 --- /dev/null +++ b/Formula/n/nexttrace.rb @@ -0,0 +1,53 @@ +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.0.tar.gz" + sha256 "acbc3a56cf3606314879986cf2a420a3dcb6c797c0611085fe13f514c12e4c91" + 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_sequoia: "6c8eff199a60fb4fc9bd389cfdfe29142de509dd96fde45fa5fbd2abc20f9858" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6c8eff199a60fb4fc9bd389cfdfe29142de509dd96fde45fa5fbd2abc20f9858" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6c8eff199a60fb4fc9bd389cfdfe29142de509dd96fde45fa5fbd2abc20f9858" + sha256 cellar: :any_skip_relocation, sonoma: "82463700fd53766aaaad3d1fe2d0d2148c15e561e66e52c6138366dff6312a07" + sha256 cellar: :any_skip_relocation, ventura: "82463700fd53766aaaad3d1fe2d0d2148c15e561e66e52c6138366dff6312a07" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69ded2be31dff1a588b4a28ea40e45eb2a87fc64d01b09522168fe62fd2aa577" + 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..b202478779ad5 --- /dev/null +++ b/Formula/n/nexus.rb @@ -0,0 +1,139 @@ +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 + + bottle do + 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..6861e084a3d45 --- /dev/null +++ b/Formula/n/nfcutils.rb @@ -0,0 +1,35 @@ +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 + + bottle do + 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, mojave: "972af2e69529bde17b450d36ccfbb4b9d124c59beb7bb4d69a9c63b76f7cff58" + sha256 cellar: :any, high_sierra: "44dc64d49e9edc0c7b8f22c7f259262d5706f83bb452099b968b9f3576047367" + 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..341965839f5bf --- /dev/null +++ b/Formula/n/nfdump.rb @@ -0,0 +1,38 @@ +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_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..cd5855067a3c7 --- /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.42.0.tar.gz" + sha256 "038541bc4d22fe52f79e2925d6b64d25398970ac9ddc32a4ff1823f189cd8ea4" + license "MIT" + head "https://github.com/goreleaser/nfpm.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "39d4448467d5d192affcbedf2c70f701567ef024cdcbcd94b3335a4921e3d4f2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "39d4448467d5d192affcbedf2c70f701567ef024cdcbcd94b3335a4921e3d4f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "39d4448467d5d192affcbedf2c70f701567ef024cdcbcd94b3335a4921e3d4f2" + sha256 cellar: :any_skip_relocation, sonoma: "1d11a3bbff39d65b432875c056285d9c7bf3c4458793a653ed33125524503101" + sha256 cellar: :any_skip_relocation, ventura: "1d11a3bbff39d65b432875c056285d9c7bf3c4458793a653ed33125524503101" + sha256 cellar: :any_skip_relocation, x86_64_linux: "01075afc56f6fbbe34b4e5de4a5bb4b3d7617fb77abedcfcdaede017aba6bb45" + 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..4730b9ac6c705 --- /dev/null +++ b/Formula/n/nftables.rb @@ -0,0 +1,42 @@ +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.3.tar.xz" + sha256 "9c8a64b59c90b0825e540a9b8fcb9d2d942c636f81ba50199f068fde44f34ed8" + 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 + sha256 arm64_linux: "19a175d38550ac4c326c1e4188e8df5fb005e9e6081e277f81039195297fdcaf" + sha256 x86_64_linux: "bb22f5e217d3160d41da139b1088f37b28efc2d83df39ea1bb2635701cf5f745" + end + + depends_on "pkgconf" => :build + depends_on "python@3.13" => :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.13") + 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..e60932c8fcaec --- /dev/null +++ b/Formula/n/nghttp2.rb @@ -0,0 +1,90 @@ +class Nghttp2 < Formula + desc "HTTP/2 C Library" + homepage "https://nghttp2.org/" + url "https://github.com/nghttp2/nghttp2/releases/download/v1.65.0/nghttp2-1.65.0.tar.gz" + mirror "http://fresh-center.net/linux/www/nghttp2-1.65.0.tar.gz" + sha256 "8ca4f2a77ba7aac20aca3e3517a2c96cfcf7c6b064ab7d4a0809e7e4e9eb9914" + license "MIT" + + bottle do + sha256 arm64_sequoia: "73507c5419805c1f355705a6da6d19675faa7df1db7b094e49147f73c4aca5a9" + sha256 arm64_sonoma: "7061b3fc947b387e23d8c83f037c1f795e9527bb23f68302d8002469a323738f" + sha256 arm64_ventura: "21df76f5d99ef51a4e60dc146725c50da4f638aa7e531a164ebb632b7e8162b3" + sha256 sonoma: "87ad83548afab293d8f235b5d7821e77e8cd5a689db449e07ece94cfedaab169" + sha256 ventura: "257ead75ec0f1999cf0c901efd7fdb2ae22942377fe8a806ab93d95b77f059ff" + sha256 arm64_linux: "d79b088b2f12cf0e605864e710100b7901f2333324539b0e313063b0d33de59f" + sha256 x86_64_linux: "1a923f926f8dd37a197164c955270b4a37297711031e6c204d03535aef8ffa12" + 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 "openssl@3" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + on_macos do + # macOS 12 or older + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1400 + end + + on_linux do + depends_on "gcc" + end + + fails_with :clang do + build 1400 + cause "Requires C++20 support" + end + + fails_with :gcc do + version "11" + cause "Requires C++20 support" + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1400 + + # 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..ea8744fe0f28b --- /dev/null +++ b/Formula/n/nginx.rb @@ -0,0 +1,182 @@ +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.27.5.tar.gz" + sha256 "e96acebb9c2a6db8a000c3dd1b32ecba1b810f0cd586232d4d921e376674dd0e" + 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_sequoia: "972063bdf74564fca762d847ce7cde789e3b2b195d6cbf6a05927c8fda1f1b1c" + sha256 arm64_sonoma: "6ec8b8438449b35e333d29ff2bf53b525efe7a48d588ace187d75e61596501ab" + sha256 arm64_ventura: "adad8ede39f78697c70cba86e96822827a5661692a01f765dad9f47f98c53c3f" + sha256 sonoma: "e901bf7d34765ebf766f3385058da8159c7b7e897392745e4cc787e87a52f167" + sha256 ventura: "c4cc442a7b38cd644ccf0e85f63033109fe677bf66634ec322d958e3adb645d6" + sha256 arm64_linux: "570847468bb0e31f37e7859850ed848a0717d17a2f2d7d16963c3528b002f207" + sha256 x86_64_linux: "a65d15b224f4388f5c11272ffb6c1c83df981cd69838a63e5476e9ce58ffbf8f" + 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..122bda3745994 --- /dev/null +++ b/Formula/n/ngircd.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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..80bd78939ca28 --- /dev/null +++ b/Formula/n/ngrep.rb @@ -0,0 +1,68 @@ +class Ngrep < Formula + desc "Network grep" + homepage "https://github.com/jpr5/ngrep" + url "https://github.com/jpr5/ngrep/archive/refs/tags/V1_47.tar.gz" + sha256 "dc4dbe20991cc36bac5e97e99475e2a1522fd88c59ee2e08f813432c04c5fff3" + license :cannot_represent # Described as 'BSD with advertising' here: https://src.fedoraproject.org/rpms/ngrep/blob/rawhide/f/ngrep.spec#_8 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a2f5ada3b9c16b15c122b7a749d12ec3f52e65b710e6cc8f4ea03f81a4eb0a3e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1065c49a35fa2a04d53e7f7e46a622776697eb3545e7d9fc04836d50aa816339" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6eb14e55176c89bc45e0cda15f725b5ff35d15d8dc017a5bf47609c763964271" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c9539b7c9783bce244c1310c691766b6c14fbc9a1c0b00ed9b480ed41575717d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5bc88f61eaba46026963de70f44e84f73f04b041e913051fb21f3351d16cd9e4" + sha256 cellar: :any_skip_relocation, sonoma: "8b377219b442558f62cd2dd1ce4fbf71ca5daa93e5352712870cd9bfe15c7a0a" + sha256 cellar: :any_skip_relocation, ventura: "2f7aa884659d815ab2ace822663bd3a444ef90b8580dfe1ece26b4a93eacc79f" + sha256 cellar: :any_skip_relocation, monterey: "b7f33fabe9f42533580c021d441d4ef8132150c345add38cf9fc6452efa611a5" + sha256 cellar: :any_skip_relocation, big_sur: "6ab0d459dad3462b127af805de369dac2f099844126d70e89e531ea181d0e794" + sha256 cellar: :any_skip_relocation, catalina: "53bf6d68b15a2f07a01d828cdcd137131a45871141da411328c376ed90768265" + sha256 cellar: :any_skip_relocation, mojave: "0d1948b2fbf7c60fb6e46f15d32a51a3f7754e7372924e4e984cce98282ca281" + sha256 cellar: :any_skip_relocation, high_sierra: "390424274552105e21b3f3e926b933322a09333cee02274d2f84a5e23f4ea74d" + sha256 cellar: :any_skip_relocation, sierra: "0e915d1e3b7e7da8e58a48457de4e40359cb0f870eb45a77302d36c1b767d044" + sha256 cellar: :any_skip_relocation, el_capitan: "d057c167d3b695ff915c13fd39e3cd7b3e6e2a5b3f82bce6bb8ea4c030e8f6e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "c5118b8b54a6577bbf48d50a9fe39309a39461336dacb5aee639f89ceb978ec1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b54a418af69d95d16a04604e385faa40791e6ae6bc488a7f146b0f22a2845a5b" + end + + uses_from_macos "libpcap" + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + sdk = if OS.mac? && MacOS.sdk_path_if_needed + MacOS.sdk_path + else + "" + end + + args = [ + "--enable-ipv6", + "--prefix=#{prefix}", + # this line required to avoid segfaults + # see https://github.com/jpr5/ngrep/commit/e29fc29 + # https://github.com/Homebrew/homebrew/issues/27171 + "--disable-pcap-restart", + ] + + args << if OS.mac? + # this line required to make configure succeed + "--with-pcap-includes=#{sdk}/usr/include/pcap" + else + # this line required to make configure succeed + "--with-pcap-includes=#{Formula["libpcap"].opt_include}/pcap" + end + + # Resolve implicit `stdlib.h` function declarations + args << "ac_cv_header_stdc=yes" if OS.mac? + + 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..38cd27ba3eefe --- /dev/null +++ b/Formula/n/ngs.rb @@ -0,0 +1,39 @@ +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_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..4d38ab78860c7 --- /dev/null +++ b/Formula/n/ngspice.rb @@ -0,0 +1,94 @@ +class Ngspice < Formula + desc "Spice circuit simulator" + homepage "https://ngspice.sourceforge.io/" + url "https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/44.2/ngspice-44.2.tar.gz" + sha256 "e7dadfb7bd5474fd22409c1e5a67acdec19f77e597df68e17c5549bc1390d7fd" + license :cannot_represent + + livecheck do + url :stable + regex(%r{url=.*?/ngspice[._-]v?(\d+(?:\.\d+)*)\.t}i) + end + + bottle do + sha256 arm64_sequoia: "1ffc6582d286ba7c1055977a97500cd471eb9f9841c25367fcd1d95732236ef8" + sha256 arm64_sonoma: "9552d93ee2085bf77d77231dc028067699663683f109f5ed2c946f54f2d407f6" + sha256 arm64_ventura: "a2da2fd8087760d6dad8e20002165dca3b131d3905376eaedf70b6d681abc9b6" + sha256 sonoma: "f624fb44bf82600cdda20654e6ba1f4fd1b9e5f14f424771fe248160da3a77d1" + sha256 ventura: "94a359bbe2d18e22422fbff5d654404e99b1aad7ba98854c9ae686cfe6e0636e" + sha256 arm64_linux: "2e59dddfbbbedb1a710590ede896261865481cce64e3e551a3d67850e2a77348" + sha256 x86_64_linux: "516b7806491d2da1e788ec6d0fc7074716171ee10d04fdddc004f6cdb7e05ab8" + end + + head do + url "https://git.code.sf.net/p/ngspice/ngspice.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + 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 + # 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..fb3b13add0b94 --- /dev/null +++ b/Formula/n/ngt.rb @@ -0,0 +1,49 @@ +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.3.15.tar.gz" + sha256 "a44b019e97583bbfce41706c474b9b8c304826445d0ef9471f09f3a8111faae6" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "bf7acaa14502f4c21b9fa4ff25d50d321765d0991f5722171064cf58ee71b5f2" + sha256 cellar: :any, arm64_sonoma: "4358f3a14fe3015fe7cb6a7c53e61422238286b89d508246440a48c913b42f6a" + sha256 cellar: :any, arm64_ventura: "a879630fb1595e01e2c5ed8eadee2c15eb127dcf0b85f8aa1977a8a6df70ff57" + sha256 cellar: :any, sonoma: "170faadf6f19e2064059a8c55d9a24f5b168f7c28ac9ed4d2a40fed4ab01da6c" + sha256 cellar: :any, ventura: "895a69fb8dd9da98186d63206fc78c3736f4eb7d54a3baf62f23581891565eb9" + sha256 cellar: :any_skip_relocation, arm64_linux: "6bc38f7a3cacf66faaef43cb8ab52e098af2b6025784900ebd51b09b3f12dd1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9776678ad67fa7037676e31bb8ad70f2ca68132b8573b3d95a9537123e538e2c" + 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/nickel.rb b/Formula/n/nickel.rb new file mode 100644 index 0000000000000..c93a84ddb8e6a --- /dev/null +++ b/Formula/n/nickel.rb @@ -0,0 +1,44 @@ +class Nickel < Formula + desc "Better configuration for less" + homepage "https://nickel-lang.org/" + url "https://github.com/tweag/nickel/archive/refs/tags/1.11.0.tar.gz" + sha256 "b80e9bdd3c28644135ba757b0b2d38e63152ef9f045973ea4dd955630d3ed6d3" + 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_sequoia: "3993b5e0839d124ed4f5576a6d8c1aef7a4e5fa2824bf82915c1fe758f56c149" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f52b6ce6114559b2f6d0b8fda667756411cc6aa84ef91977b22ae51753db0061" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b441b7c58a2a8b98855e07f7a571e60e53a8933d23446ef99107d4918b5a2f99" + sha256 cellar: :any_skip_relocation, sonoma: "5a55d8b72a2cdba23a84607173d908f02cc41efd03da6a217c330994710a8c5a" + sha256 cellar: :any_skip_relocation, ventura: "61f0f0e97440c7a9f9a627090f47b998a21ca4cd40242cc727de75a65a9128ea" + sha256 cellar: :any_skip_relocation, arm64_linux: "788a1e37a667b69394949007add28911d146a71ed696967db1a18ddd28f1b4e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73b50599a34cf55be4723120ff5f829fb6089de57e7b043451f37dc37b733e0b" + 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..e6f6b535fd655 --- /dev/null +++ b/Formula/n/nickle.rb @@ -0,0 +1,41 @@ +class Nickle < Formula + desc "Desk calculator language" + homepage "https://www.nickle.org/" + url "https://nickle.org/release/nickle-2.103.tar.xz" + sha256 "5ec34861d3888956bcb1d50bb3a917f6a53f228a967b88401afe8a9f0f2f36c0" + license "MIT" + + livecheck do + url "https://nickle.org/release/" + regex(/href=.*?nickle[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "05fe04bd87e1683f8ade70c6b9ad53b59b958322151516fcbbc41b79fb9f2ad4" + sha256 arm64_sonoma: "c6c317696897c7ec062413e912e0c1826b05c1156bd8d824cd0d304fc66da361" + sha256 arm64_ventura: "0fd866fe7d1ce93c062602166bdb78f23d361e2878d21484271d1779491d8151" + sha256 sonoma: "2b5f09ba8a23cebb6a8eeedc8b925b583ffb84dc3adc323be1c7ac97e50abbc3" + sha256 ventura: "97d9d0a48b9cd94f5b740fb2b4a7105807a0c38ace4362c681392fb34ba94ce8" + sha256 arm64_linux: "3ca75636c5293bde54e93fb922b6f3c34b0a9d698cffac1452902e0caff1033f" + sha256 x86_64_linux: "3e484518933728d2e31d47c464f9ae017dd79d06221c1d47aa500010d2a6d42e" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "flex" => :build # conflicting types for 'yyget_leng' + depends_on "pkgconf" => :build + depends_on "readline" + + uses_from_macos "bison" => :build + uses_from_macos "libedit" + + def install + ENV["CC_FOR_BUILD"] = ENV.cc + system "./autogen.sh", *std_configure_args + system "make", "install" + 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..50a0c600db309 --- /dev/null +++ b/Formula/n/nicotine-plus.rb @@ -0,0 +1,36 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, all: "86dd09af957c7be8e3c7559e1c9b67d2536f0c3025cd70bbe08a17d98ad1f89a" + end + + depends_on "adwaita-icon-theme" + depends_on "gtk4" + depends_on "libadwaita" + depends_on "py3cairo" + depends_on "pygobject3" + depends_on "python@3.13" + + on_linux do + depends_on "gettext" => :build # for `msgfmt` + end + + conflicts_with "httm", because: "both install `nicotine` binaries" + + 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..8773cc86e4ec5 --- /dev/null +++ b/Formula/n/nicovideo-dl.rb @@ -0,0 +1,36 @@ +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 + + livecheck do + url "https://osdn.net/projects/nicovideo-dl/releases/" + regex(%r{value=.*?/rel/nicovideo-dl/v?(\d+(?:\.\d+)+)["']}i) + end + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "3ed938a610ab72d8bd9d90764672eb2ed5d9930e0803929c05b3e34d4c1a815d" + end + + 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..2e6107bd6b94c --- /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.4.0/nifi-registry-2.4.0-bin.zip" + mirror "https://archive.apache.org/dist/nifi/2.4.0/nifi-registry-2.4.0-bin.zip" + sha256 "f89d559a678773846c24ae48dfcd0bad377453a3788aabb091aaf9ad485dffd2" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b38540966a260b39ad953fc715b87297da6df0a5680bda9011f4c86ff534d243" + 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.rb b/Formula/n/nifi.rb new file mode 100644 index 0000000000000..b16c1504a90aa --- /dev/null +++ b/Formula/n/nifi.rb @@ -0,0 +1,28 @@ +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.4.0/nifi-2.4.0-bin.zip" + mirror "https://archive.apache.org/dist/nifi/2.4.0/nifi-2.4.0-bin.zip" + sha256 "3937c5b1a6fbd28be4b2aab5b588d19993b8d2a416970f18a81d5fe2e330550f" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "28c357c40be403487a5eac16e68d4810906a75c76290628b6a9f57ad86b4c943" + 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) + + # ensure uniform bottles + inreplace libexec/"python/framework/py4j/java_gateway.py", "/usr/local", HOMEBREW_PREFIX + 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..9e7e0ad287090 --- /dev/null +++ b/Formula/n/nift.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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 + + 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..97e84c0e89cf9 --- /dev/null +++ b/Formula/n/nikto.rb @@ -0,0 +1,50 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c7930d224684f5422ede023a9737e1df3f259861ad5085414ba83a27e8f690b8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e822edd4d19c031489f940d9f0d3bd37765470baa55519e8c7f0e141f54b8dd6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e822edd4d19c031489f940d9f0d3bd37765470baa55519e8c7f0e141f54b8dd6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e822edd4d19c031489f940d9f0d3bd37765470baa55519e8c7f0e141f54b8dd6" + sha256 cellar: :any_skip_relocation, sonoma: "d8f31869f1d8481474a9689d80247d222fa9a79a780a3c936be268feab852a16" + sha256 cellar: :any_skip_relocation, ventura: "d8f31869f1d8481474a9689d80247d222fa9a79a780a3c936be268feab852a16" + sha256 cellar: :any_skip_relocation, monterey: "d8f31869f1d8481474a9689d80247d222fa9a79a780a3c936be268feab852a16" + sha256 cellar: :any_skip_relocation, arm64_linux: "c6fe5537fb0856e36dcb4f232fbd133b03888cf8d4e7338cf84dded6401c6aa6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e822edd4d19c031489f940d9f0d3bd37765470baa55519e8c7f0e141f54b8dd6" + 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}/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.default" => "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/n/nim.rb b/Formula/n/nim.rb new file mode 100644 index 0000000000000..0800516d4dcb7 --- /dev/null +++ b/Formula/n/nim.rb @@ -0,0 +1,83 @@ +class Nim < Formula + desc "Statically typed compiled systems programming language" + homepage "https://nim-lang.org/" + url "https://nim-lang.org/download/nim-2.2.4.tar.xz" + sha256 "f82b419750fcce561f3f897a0486b180186845d76fb5d99f248ce166108189c7" + 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_sequoia: "7b253ab1acb1ccae1a0530bbeb7f101b335bb6fce1ed9813d01bbfa5d05e0413" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c93fb307e80b60809d6209b0e16f20e009878964ea74f701dc7ece4666a3fa70" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f3df4b38e174bfef1cc73029021bc1674f005dc0e54c2e2c648a0432d08dde7" + sha256 cellar: :any_skip_relocation, sonoma: "baa4eb7a7c6ec3bbcd9ae6da71c058f2e1435364548d299c476600323d287fe6" + sha256 cellar: :any_skip_relocation, ventura: "a3fccf2fcc860c5add56455604c071f49c29c374efbfc16c5c98220d046da4dc" + sha256 cellar: :any_skip_relocation, arm64_linux: "8936a401e75c0a211f66e48f4159314e82251b542a60216d1c42dd99df695dcb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4083ac43fc55d0349ef42598ea47ab909cc11d13306a158c2c76aef8562b3d99" + 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..8c6fe2d33a7a5 --- /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.12.1.tar.gz" + sha256 "821bdff48a3f683bc4bb3b6f0b5fe7b2d647cf65d52aeb63328c91a6c6df285a" + 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 + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "977f9c2ad831aed827b3cf8ad38606f64b11b4c1c6a170ecc0a2bf8118911b63" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "474df4968035d4949cc7d955302036f3e665d3bc6dc37fd221598bb3e1aef31b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1c7814f2fc23794608edce7b86d8dfcf20fd810acbd5a66515f8731aeafd0585" + sha256 cellar: :any_skip_relocation, sonoma: "8cf692e5eabf45fee86530ee3313fa68a3942405587606e3ee39cadc781e3ff5" + sha256 cellar: :any_skip_relocation, ventura: "e2fa65aa91a9ec6054bf01c693ca4c8a9c086270020c7c281d729dc3a5cef70e" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e50a8c0ecd4e893f973b313e213fe3a8dd1ee883ac121ee5204f1f5fd818b03" + sha256 cellar: :any_skip_relocation, x86_64_linux: "99758937cfb53c0e214a4e752b50d38bf9e32e87ec31c7802b84953a802cbe6c" + end + + uses_from_macos "python" => [:build, :test], since: :catalina + + 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" + elisp.install "misc/ninja-mode.el" + (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..1f70467828745 --- /dev/null +++ b/Formula/n/ninvaders.rb @@ -0,0 +1,48 @@ +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" + + bottle do + 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, mojave: "4cb75493161c6153611c727bef8837c6c41fbd5db8872239d682cabadc7d2311" + sha256 cellar: :any_skip_relocation, high_sierra: "75247d901255b6fba826ca60d909b5bb1c349c969b98f65275c898ca45b32b7c" + sha256 cellar: :any_skip_relocation, sierra: "3de94522f9f6f5560e1e6f354470aef0c46de68792fd93bd2b044d45db8328c6" + sha256 cellar: :any_skip_relocation, el_capitan: "b2d4f23349e2214d5a0c8b51218974b0f8b2704d333f1bca19ca4b4539e2b9f1" + 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..190520d59c457 --- /dev/null +++ b/Formula/n/nip4.rb @@ -0,0 +1,62 @@ +class Nip4 < Formula + desc "Image processing spreadsheet" + homepage "https://github.com/jcupitt/nip4" + url "https://github.com/jcupitt/nip4/releases/download/v9.0.8-2/nip4-9.0.8-2.tar.xz" + sha256 "d15453bdafaf46093e210c27c0f5c1abed29c0d2ec157400b35bac9b3eca1b9b" + license "GPL-2.0-or-later" + head "https://github.com/jcupitt/nip4.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1a0d17abf55ba7785f5304339f23864d36b2eb2842b9ae45a35bb36cda504165" + sha256 cellar: :any, arm64_sonoma: "e68839e250be2b23a86d924436680aeea9d9ce6a841810ca51bb9fc876bdd8b4" + sha256 cellar: :any, arm64_ventura: "66bae0981443edff45c5257483ba237b1276b921e4cf6ac307ef8942842bfe75" + sha256 cellar: :any, sonoma: "284343572d69807ed796087e5fef71a22ff817bf451babd7e5365466ea870181" + sha256 cellar: :any, ventura: "dcd89305c680dbd3e40094666d8bb0982f52ddcd7138c848662804dc03c570db" + sha256 arm64_linux: "2ac0ab2cbb24405e1cc55444914444dd924edfcec07c5d0cfeae08221744c143" + sha256 x86_64_linux: "b8eab0f1a7d56a692b96ef495bc8ebf17f2028ae03295f9d6bbf6e3cdfb7d289" + 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.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/nixpacks.rb b/Formula/n/nixpacks.rb new file mode 100644 index 0000000000000..e7c22a98a8920 --- /dev/null +++ b/Formula/n/nixpacks.rb @@ -0,0 +1,31 @@ +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.39.0.tar.gz" + sha256 "ec65a45ddf5a9c33797c1efb73bbcf161c66083ce13c18439d2fb32d50462c21" + license "MIT" + head "https://github.com/railwayapp/nixpacks.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6812145f5c4012be3d49b54eed485a0cd6648ffd432de1817a2264d3a809239e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68ed68ee3d7cde690d946a09ddb156344ea161a52eacde1370fcbb81694fbee3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ea8e4fdf659c3628a45b69ebcfca3aff29c0477f5b2420dde27602d906a9987a" + sha256 cellar: :any_skip_relocation, sonoma: "0aadd297cb4308f8abff20d7a580deeeafe75fb5ba9734076882ab16769326ca" + sha256 cellar: :any_skip_relocation, ventura: "8eef015d3c8c721e6a57a009fb52304c7412aa5d6dec47d5854a9c568687b2d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "8fa13df53ce48b6e2ede328ab20d3e571676f967ac60d02a60b1bd2f5e3f38ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "54332642d6a027f9d51fbc6c0c97f5b6a9fb6ca4113148abb9aaf7c9be87b68c" + 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..900c52bea8d41 --- /dev/null +++ b/Formula/n/nkf.rb @@ -0,0 +1,43 @@ +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/70406/nkf-2.1.5.tar.gz" + sha256 "d1a7df435847a79f2f33a92388bca1d90d1b837b1b56523dcafc4695165bad44" + license "Zlib" + + livecheck do + url "https://osdn.net/projects/nkf/releases/" + regex(%r{=.*?rel/nkf/v?(\d+(?:\.\d+)+[a-z]?)["' >]}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "67d8e9dea97994ba77574c0be558cb009448a7aa9d3d577b54e3d5728d1fb1d6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "89c0a1d6d5886045189b7a3e393b451c84ea7abf7e6f68663819b96651c58f58" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fcc652ba1cfeec1bec89e5108c3e6eae31652606bf7babd5af25dc6522dc44a1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cd946546a2e3f86974d8d6685e891efaca8e4b609ba64cb537629a9b371df518" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "85bfff310d48fea503f95092b12a3a2fa19b48ba634cbbdb84c083b8701cd948" + sha256 cellar: :any_skip_relocation, sonoma: "0567d1f3d49a3bc0c8850890f1a67d381bfa0e9990ad1467e81da071e7c1c0b1" + sha256 cellar: :any_skip_relocation, ventura: "88af0934e1a4eb4750fcca73d2cdf3b84219d7ca4f1995f86048da271102bec0" + sha256 cellar: :any_skip_relocation, monterey: "bdf97f3712176e9da065dcacabede2187d244e201a6f326bda4d227a259e75fc" + sha256 cellar: :any_skip_relocation, big_sur: "40a30c72ca018734cf05b3e029d4e5d3eb6297f847da07e699f9891558480ad4" + sha256 cellar: :any_skip_relocation, catalina: "4a0694aedea8fcf96ecdfb6c60c0e14825591e7e7247e3944a00966d883398e6" + sha256 cellar: :any_skip_relocation, mojave: "85183c457daaecd9a3ce59cea556189ad0131c6134d77e7890643a3fb75e3965" + sha256 cellar: :any_skip_relocation, high_sierra: "9af47f293d4531c8d7ec5a81bd041349773f982b9710edca03eb3eb59b02a8b5" + sha256 cellar: :any_skip_relocation, sierra: "8d908ee97c34e85ed85c268c895e143d57c7afdd9bc232a75b690067281765fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "815d1d6de637a2a1b79024544b7c8c9ff9ea634493c33925ac228b4a97f933c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "03ddaa51a6fc6341348d4ee40c5a0a7309817b9fb957171b01b8aeab6ea6fe25" + 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..f9d4340a1cf88 --- /dev/null +++ b/Formula/n/nload.rb @@ -0,0 +1,75 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "1dbf614f22611f66ee49efa6b1f5a1af29066be04e461d56e9766b84aeb68077" + sha256 cellar: :any_skip_relocation, high_sierra: "3bcdee6e4f2e404d0ec728620b025524de265f94fccc290b29fc81f04f85be36" + 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..dd00800adb18e --- /dev/null +++ b/Formula/n/nlohmann-json.rb @@ -0,0 +1,57 @@ +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" + + 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..5d77133a46a38 --- /dev/null +++ b/Formula/n/nlopt.rb @@ -0,0 +1,55 @@ +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_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..a59c399635ff7 --- /dev/null +++ b/Formula/n/nmail.rb @@ -0,0 +1,53 @@ +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.3.5.tar.gz" + sha256 "071abc7c9c1d5a26616410872d4f7310cd00416f8da0860e1f368ca642ccc025" + license "MIT" + revision 2 + head "https://github.com/d99kris/nmail.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7e72b5c52451568c90d29fbc3c6b62f9e1c5d39ca4b231ee034934c36aa78085" + sha256 cellar: :any, arm64_sonoma: "81d11f446f22d205340d8710d8b396d868f191be9243debea62fa6889f602ae2" + sha256 cellar: :any, arm64_ventura: "99fbb7162cbd512d0ad904c331c558d03477c272e586abd93bb73acef2ec9198" + sha256 cellar: :any, sonoma: "dfc51de93f0972a4d15c3afeda9956e5ea3d60b8c82c6d9c8b42be32a3f58cf9" + sha256 cellar: :any, ventura: "0b3c105b12c2965b5ecd6d4de5771fe721a9dc9895c99f93b95994874891a4ee" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a22770c3730478c2a81197ec336127b1259b8914704337a5600cb92ea86c24e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "91b354d89d63c49fbc07412c4c81becb69cbe78c6bf6b97a861d2e4b957388ad" + 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..88d33e192edc8 --- /dev/null +++ b/Formula/n/nmap.rb @@ -0,0 +1,86 @@ +class Nmap < Formula + desc "Port scanning utility for large networks" + homepage "https://nmap.org/" + url "https://nmap.org/dist/nmap-7.95.tar.bz2" + sha256 "e14ab530e47b5afd88f1c8a2bac7f89cd8fe6b478e22d255c5b9bddb7a1c5778" + license :cannot_represent + revision 1 + 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 1 + sha256 arm64_sequoia: "50ff67cd6a9106fd4813f23563e93afb1c010e72d2440210547ab1e85a9a2f8b" + sha256 arm64_sonoma: "903b327e4d5670592fce8006045465c25f4906860124a6fadd09c8c6f075173d" + sha256 arm64_ventura: "ea8100a4be7170fc892f4b07ae93c6a783cdf4b73637f8bc6b77e70e1a3da9e2" + sha256 sonoma: "29886e3599134f930e515d864133d5560ca4fa6688683d6d6651a3e74659bd1e" + sha256 ventura: "7960ae55e221cd465ec9c81bab21c68e3deba12a42ba54a062b5a7357d8aedf2" + sha256 arm64_linux: "ba802ad8db113e38cb97d0052043909b48fe830ba6ba4fd5ff17dedfd3a5b564" + sha256 x86_64_linux: "6d61d459f9d25a07da0695b7c6be96392fcb8f662babb6bedb64b371575da6d5" + end + + 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" + + 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 + 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 + ] + + system "./configure", *args, *std_configure_args + system "make" # separate steps required otherwise the build fails + system "make", "install" + + bin.glob("uninstall_*").map(&:unlink) # Users should use brew uninstall. + return unless (bin/"ndiff").exist? # Needs Python + + # We can't use `rewrite_shebang` here because `detected_python_shebang` only works + # for shebangs that start with `/usr/bin`, but the shebang we want to replace + # might start with `/Applications` (for the `python3` inside Xcode.app). + inreplace bin/"ndiff", %r{\A#!.*/python(\d+(\.\d+)?)?$}, "#!/usr/bin/env python3" + end + + def caveats + on_macos do + <<~EOS + If using `ndiff` returns an error about not being able to import the ndiff module, try: + chmod go-w #{HOMEBREW_CELLAR} + EOS + end + end + + test do + system bin/"nmap", "-p80,443", "google.com" + end +end diff --git a/Formula/n/nmh.rb b/Formula/n/nmh.rb new file mode 100644 index 0000000000000..79626d62650ce --- /dev/null +++ b/Formula/n/nmh.rb @@ -0,0 +1,78 @@ +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 + + bottle do + 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" + + 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..32616a986a1f3 --- /dev/null +++ b/Formula/n/nmrpflash.rb @@ -0,0 +1,32 @@ +class Nmrpflash < Formula + desc "Netgear Unbrick Utility" + homepage "https://github.com/jclehner/nmrpflash" + url "https://github.com/jclehner/nmrpflash/archive/refs/tags/v0.9.25.tar.gz" + sha256 "729b2890620febda4748b502f652f17b9343c9bdd80c1608656c2767e86f6b04" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "58b638caa14a68dc8396e69df7a8774d5f32afa8ff94259842b58ea2bb835b3c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4ee2c4b9e0928711561e54d90a74ba22729ea004ee8a680fadfb03ceaf4d44b7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1170fff7a61b522585f0de7fed71eee17acdada99eddcb876de3f1209fa72aa7" + sha256 cellar: :any_skip_relocation, sonoma: "5118548149535c43336bc6c42a6907ac529bfa1387b47621cb3a14655def1556" + sha256 cellar: :any_skip_relocation, ventura: "55c02b5c5686dc38ae336ffd865874146fdf315a30381f962d8929ebca04bf87" + sha256 cellar: :any_skip_relocation, arm64_linux: "48c4d4e7e9cbb093ce3f552eef69e1ad5adc0e8b84279e347f03489c138937ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02204c8781d87e4c00790807d5367f6826f8420984af35eccaa606f8c1217d90" + end + + uses_from_macos "libpcap" + + on_linux do + depends_on "pkgconf" => :build + 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..0f67729b00899 --- /dev/null +++ b/Formula/n/nmstatectl.rb @@ -0,0 +1,37 @@ +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.44/nmstate-2.2.44.tar.gz" + sha256 "2a5645786befd5155192ba4f8ce5d3d91964ddb78d8c0c144cc8ca94bc45255d" + license "Apache-2.0" + head "https://github.com/nmstate/nmstate.git", branch: "base" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6ba3b3a37f3f629d0d854770ff2b634e54e7319b78eb8f7800babcf8eadafbf5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ddca9ff5f3f699c7dd69e4710ee9f906e75d66755590e1fc3515c997a326cef8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ec57761b440a7becc1b472223a5f1d7bf1b864e2ecc3b206bbb7bedd0b66b5db" + sha256 cellar: :any_skip_relocation, sonoma: "2cf45fb2a6d14f9d71404597d8ec320e28d8bed4461c8b233d020ac7e6277fdb" + sha256 cellar: :any_skip_relocation, ventura: "dcb801697950fe4753a4f6b2b816548c2261b6f75d9295240cb78760e0e2dd90" + sha256 cellar: :any_skip_relocation, arm64_linux: "efcbd142adc478e2b2ed84af39691e83133f0fb9c2fb4e59147f131bc58ffbbe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb23e47da25e472c357a0ea1fd20b1d47c8d575bd6880d80ce4273ef4dd6a3cf" + 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..efd07ba8e1f65 --- /dev/null +++ b/Formula/n/nng.rb @@ -0,0 +1,47 @@ +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.10.1.tar.gz" + sha256 "a05936a64851809ea4b6d4d96d80f2a1b815ef14d6c4f6dd2c8716bd38dd1822" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "f789508482605d3898a720b13ee0dd824ae18cdfce0bf84c2658bd4b9d8c307d" + sha256 cellar: :any, arm64_sonoma: "cd22208f26b61a5fbac9c6e056bc0363be4ab8ec5edb12da7c3a6a900e64140d" + sha256 cellar: :any, arm64_ventura: "cc1d18cfce4ade76e5ad37f8c1f01762be60458447460b4580240e74d19c2196" + sha256 cellar: :any, sonoma: "df7377f8a991aa85c06cef8cca79f2c3d6b2a5d788731ae7e383c9b49d763d62" + sha256 cellar: :any, ventura: "1c9e50f925a44ed332d98420c2e3c12538336d175896e2fca83f04d809cbf6da" + sha256 cellar: :any_skip_relocation, arm64_linux: "627182101a9a3e1288114a3156f64dc01ce0b010d6e26ed144208ff9c59b1f8e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c69fc95eeee497679a4e5914bb9cdf0f43aa5cd30418f89cb562c896420b919b" + 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..ab4b7dac0c786 --- /dev/null +++ b/Formula/n/nnn.rb @@ -0,0 +1,47 @@ +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_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..121422aed6559 --- /dev/null +++ b/Formula/n/no-more-secrets.rb @@ -0,0 +1,32 @@ +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" + + bottle do + 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, mojave: "05abb8f3a139e05d602efa4e14b5dc108f4be477330955523f3a3b2673d8ca13" + 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..acbb2bd7fda00 --- /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.0.tar.gz" + sha256 "d4a3f59b8b6e5e06f7a4b4d1ca6a5ea7d4fb5e004b536f65622c05f33b653fad" + license "MIT" + head "https://github.com/nodenv/node-build.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "ce4e201486bfd69885b4fc7b176de00e86c65684554379dfaaafb18d19a2477b" + 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..140caad110416 --- /dev/null +++ b/Formula/n/node-red.rb @@ -0,0 +1,50 @@ +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.0.9.tgz" + sha256 "d8548204752c8ed7c1c5648e6fe2843342797ff5f0214647bdd1078366811cba" + license "Apache-2.0" + head "https://github.com/node-red/node-red.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ef1c67c28407a8a57ed82cbc8c1da9a0535dc4432be1db15b815fb4bd6920fc5" + sha256 cellar: :any, arm64_sonoma: "ef1c67c28407a8a57ed82cbc8c1da9a0535dc4432be1db15b815fb4bd6920fc5" + sha256 cellar: :any, arm64_ventura: "ef1c67c28407a8a57ed82cbc8c1da9a0535dc4432be1db15b815fb4bd6920fc5" + sha256 cellar: :any, sonoma: "d48c0d73840489fe500398d2a58cce5d112c62ccbd8ce1f294688a43562045fc" + sha256 cellar: :any, ventura: "d48c0d73840489fe500398d2a58cce5d112c62ccbd8ce1f294688a43562045fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "0eebad2f551bf8639e8bb5eb9e52cc6cb97518d8902e06d712b80c517b1a4d46" + sha256 cellar: :any_skip_relocation, x86_64_linux: "94b147afe0b47f633a38f2055292a62dcfd78d7a31a4f336e7f84b29879d57f1" + 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..fa0268b50e920 --- /dev/null +++ b/Formula/n/node-sass.rb @@ -0,0 +1,37 @@ +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.88.0.tgz" + sha256 "9e58589ea4c64b2a4d62b7732a07358ed5be3a3057c11e0e26ee2f514757da40" + license "MIT" + + bottle do + sha256 arm64_sequoia: "9dc25f426b1655b48f60b8002b6838263f4c9ea271cd6d63b5d4b323190d19a4" + sha256 arm64_sonoma: "e8c398374be44a1bd27435bf607e25c52c73d7e54fe16cb53f60353357fa0fd1" + sha256 arm64_ventura: "bf6a7c1bcb90177fee697e4e3128efc147ebe186ba2c02ed795f232f82828623" + sha256 sonoma: "5ea2a19118f888cf4a38832367689651726e9f63a964a1d257e9a6111f8e7736" + sha256 ventura: "f2f40d4ef6622d78f4e780b547753a40d409079329395e4c8a4ff0f253384e6b" + sha256 cellar: :any_skip_relocation, arm64_linux: "922580385a4d68c74c5de7f38311d402682185bcfb1445e826cf6c7eed6c3a09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e179f3a0e920f9808ed203f902664dc58eddf305f6b977711aeafc71f156db25" + 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..d86e9c9579beb --- /dev/null +++ b/Formula/n/node.rb @@ -0,0 +1,192 @@ +class Node < Formula + desc "Platform built on V8 to build network applications" + homepage "https://nodejs.org/" + url "https://nodejs.org/dist/v23.11.0/node-v23.11.0.tar.xz" + sha256 "f2c5db21fc5d3c3d78c7e8823bff770cef0da8078c3b5ac4fa6d17d5a41be99d" + license "MIT" + 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 + rebuild 1 + sha256 arm64_sequoia: "5e18e143193267631cacdb1b349af222a4e0354461a844840b8f74e1096ee187" + sha256 arm64_sonoma: "9bbd828006bd4a3beacca4c5c4169921c0652f71c5f329a6d41dfac23c36a0bd" + sha256 arm64_ventura: "9be149abb8ce827d580ea1557c6be8a71222fa38cb785af0cb879694bd0db28d" + sha256 sonoma: "31eb61b74270e89351c557b688948fe90a50f9838ca1870fe304c19816e6a7af" + sha256 ventura: "815de04f73bb36c3d71799b1f44601a2d7b10b56bc16fee1fac1d8c39c7c2c75" + sha256 arm64_linux: "f82e24cf67c6b2d58da09272dda33d760834aabed910267847c09265b2320f71" + sha256 x86_64_linux: "2cee5b721e8a6f1dd08dd9117222ddc3353d368153e5ecbeff2cb3e21eb76da7" + end + + 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", since: :catalina + uses_from_macos "zlib" + + on_macos do + depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1500 + end + + on_linux do + # Avoid newer GCC which creates binary with higher GLIBCXX requiring runtime dependency + depends_on "gcc@12" => :build if DevelopmentTools.gcc_version("/usr/bin/gcc") < 12 + end + + # https://github.com/swiftlang/llvm-project/commit/94461822c75d5080bf648f86552f7a59b76905c9 + fails_with :clang do + build 1500 + cause "needs std::ranges::elements_view" + 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-10.9.2.tgz" + sha256 "5cd1e5ab971ea6333f910bc2d50700167c5ef4e66da279b2a3efc874c6b116e4" + end + + def install + ENV.llvm_clang if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + + # 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") + + # 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-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 + ] + args << "--tag=head" if build.head? + + # 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. + args << "--enable-lto" if OS.mac? && DevelopmentTools.clang_build_version > 1500 && 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" + + bash_completion.install bootstrap/"lib/utils/completion.sh" => "npm" + 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 + # 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 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") + end +end diff --git a/Formula/n/node@16.rb b/Formula/n/node@16.rb new file mode 100644 index 0000000000000..9fa3751010a3f --- /dev/null +++ b/Formula/n/node@16.rb @@ -0,0 +1,119 @@ +class NodeAT16 < Formula + desc "Platform built on V8 to build network applications" + homepage "https://nodejs.org/" + url "https://nodejs.org/dist/v16.20.2/node-v16.20.2.tar.xz" + sha256 "576f1a03c455e491a8d132b587eb6b3b84651fc8974bb3638433dd44d22c8f49" + license "MIT" + revision 3 + + bottle do + sha256 cellar: :any, arm64_sequoia: "b13be0d32da21d723781c78c3f5a3bdf84d86541d867c99944ce845752efb7f7" + sha256 cellar: :any, arm64_sonoma: "77f8dc24029ff4a327a08e34ca03b9bffb2d2af3154a72d3e715dbdbd5dcc056" + sha256 cellar: :any, arm64_ventura: "4684f8478761fc02996757f54c0e8cd1f1b8f8a91919048f6759e4fa09cd2e9f" + sha256 cellar: :any, sonoma: "510b6314af58d227186a4e19d056281935b7ada207a4119399d5b0b97501530b" + sha256 cellar: :any, ventura: "1c4481d6303b9e416c629879cce704d61d8ca58ddf8a37cedacd8d04b212d3a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae8ad6360d6350f4ea98930aa626aa0448bbd264c075959c7ad7d8940109f354" + end + + keg_only :versioned_formula + + # https://nodejs.org/en/about/releases/ + disable! date: "2024-11-03", because: :unsupported + + depends_on "pkgconf" => :build + depends_on "python@3.11" => :build + depends_on "brotli" + depends_on "c-ares" + depends_on "icu4c@76" + depends_on "libnghttp2" + depends_on "libuv" + depends_on "openssl@3" + + uses_from_macos "zlib" + + # node-gyp bundled in npm does not support Python 3.12. + on_system :linux, macos: :mojave_or_older do + depends_on "python@3.11" + end + + fails_with :clang do + build 1099 + cause "Node requires Xcode CLT 11+" + 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 + # icu4c 75+ needs C++17. Node 16 uses `-std=gnu++14` so keep GNU extensions + ENV.append "CXXFLAGS", "-std=gnu++17" + # ../deps/v8/src/base/bit-field.h:43:29: error: integer value 7 is outside + # the valid range of values [0, 3] for this enumeration type + # [-Wenum-constexpr-conversion] + ENV.append_to_cflags "-Wno-enum-constexpr-conversion" if DevelopmentTools.clang_build_version >= 1500 + + python3 = "python3.11" + # make sure subprocesses spawned by make are using our Python 3 + ENV["PYTHON"] = which(python3) + + 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 python3, "configure.py", *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" + if OS.linux? || (OS.mac? && MacOS.version <= :mojave) + ENV.prepend_path "PATH", Formula["python@3.11"].opt_libexec/"bin" + end + 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@18.rb b/Formula/n/node@18.rb new file mode 100644 index 0000000000000..8325b6b854b9c --- /dev/null +++ b/Formula/n/node@18.rb @@ -0,0 +1,124 @@ +class NodeAT18 < Formula + desc "Platform built on V8 to build network applications" + homepage "https://nodejs.org/" + url "https://nodejs.org/dist/v18.20.8/node-v18.20.8.tar.xz" + sha256 "36a7bf1a76d62ce4badd881ee5974a323c70e1d8d19165732684e145632460d9" + license "MIT" + + # Remove livecheck on 2025-04-30 + livecheck do + url "https://nodejs.org/dist/" + regex(%r{href=["']?v?(18(?:\.\d+)+)/?["' >]}i) + end + + bottle do + 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 + # disable! date: "2025-04-30", because: :unsupported + deprecate! date: "2024-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", since: :catalina + 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) + + # 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..b6951cb863909 --- /dev/null +++ b/Formula/n/node@20.rb @@ -0,0 +1,126 @@ +class NodeAT20 < Formula + desc "Platform built on V8 to build network applications" + homepage "https://nodejs.org/" + url "https://nodejs.org/dist/v20.19.0/node-v20.19.0.tar.xz" + sha256 "5ac2516fc905b6a0bc1a33e7302937eac664a820b887cc86bd48c035fba392d7" + license "MIT" + revision 1 + + livecheck do + url "https://nodejs.org/dist/" + regex(%r{href=["']?v?(20(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_sequoia: "6dbede32ed7d323ceeed43a83789824ab7cdfaf9df92041a2486eb522ca6769e" + sha256 arm64_sonoma: "055407d0f413c52142e700b193a4fac6b309e4e6bc90a14e6f7ee59d848d18d2" + sha256 arm64_ventura: "cd12c0e1b8d6bf21f683165fbaf5cf59826d9e9b153edd279e2903275bd7547c" + sha256 sonoma: "a5d4e6820e57c3ffc0e18ca743d8b691e9c4767a8446fede3033bf0fe9c712f4" + sha256 ventura: "27208e60a4e8c5efeb422ae6511e4a7e8136ab68e7c1d8b7122d41f386fac6b2" + sha256 arm64_linux: "204ccf94c351e5d9b53cc06e3954f60afb4d1abfe623c5182cafd652bff9acef" + sha256 x86_64_linux: "839975a075d3f16bf8d6cc47e229b8a3a0bbd43146356bba927de449135dcbb8" + 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", since: :catalina + 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' + # Pre-Catalina macOS also can't build with LTO + # LTO is unpleasant if you have to build from source. + args << "--enable-lto" if OS.mac? && MacOS.version >= :catalina && 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..d751a0fb8b789 --- /dev/null +++ b/Formula/n/node@22.rb @@ -0,0 +1,125 @@ +class NodeAT22 < Formula + desc "Platform built on V8 to build network applications" + homepage "https://nodejs.org/" + url "https://nodejs.org/dist/v22.15.1/node-v22.15.1.tar.xz" + sha256 "c19f0177d21c621746625e5f37590bd0d79a72043b77b53784cba5f145e7263e" + license "MIT" + + livecheck do + url "https://nodejs.org/dist/" + regex(%r{href=["']?v?(22(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_sequoia: "37c633ea425fe3e595c7fc89e8c09b669db0f4438e5af1b33d6cab2d9ead7bfc" + sha256 arm64_sonoma: "62f826efa4f0dcb9069baf36e93e38d5011eef1124ccbdaa7ec54ddd64cb5d3f" + sha256 arm64_ventura: "815b24e33a3afac6730c3be272fc6669b7f7dcecb864febc3173db4f456bd912" + sha256 sonoma: "e88a14bdf6a5d9743587608e28d1340d74a1d1b4cd2394c3565e48e35b561e31" + sha256 ventura: "92b62f7a7012e622e9b4fd664c14dbcc7ae9b20e217cea5dc86747cd2e1b2cec" + sha256 arm64_linux: "2d78fc96c79eada9843e6acc5ba08af771135cfdd0026e0b6a5f0d9205144e47" + sha256 x86_64_linux: "3b46bf2a13fb8cd78098bb2b48b769a4a2cc1ff065aedc7226ace178b2e4a4fd" + 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 "libuv" + depends_on "openssl@3" + + uses_from_macos "python", since: :catalina + 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' + # Pre-Catalina macOS also can't build with LTO + # LTO is unpleasant if you have to build from source. + args << "--enable-lto" if OS.mac? && MacOS.version >= :catalina && 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", "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_exporter.rb b/Formula/n/node_exporter.rb new file mode 100644 index 0000000000000..94861562f875d --- /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.9.1.tar.gz" + sha256 "ac80b13ced462e88f243ad5e98c12bbcee2628bf552c0d19bb5ae125ce09730d" + 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_sequoia: "565cd465b106577cc18e06dd38849171c6b2d21bbb52b77bde2acd62ba410507" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "92d7ecfaab3f175f5456d0139ee7dca60226d7fe709c64f3442b5f7c3430aa73" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1055c3e3d6071109e65dbe6035fa09d895235cacbe20e089a4c2e8f5053b05b0" + sha256 cellar: :any_skip_relocation, sonoma: "97088503f43c259232260ae0b5795c6cae1c1d304e3dcb9b3b648995c5a3a744" + sha256 cellar: :any_skip_relocation, ventura: "0b9f53c0e755e2d7c01b325303647106c54f96a60a90f552b6c13c6bbbaa1a3f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d866c49ec2dd77096b45308bb18d209f81545bdff34b3309f97d6b43ae42dc5" + 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..a90f7cd92acfc --- /dev/null +++ b/Formula/n/nodebrew.rb @@ -0,0 +1,36 @@ +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" + + 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..71618c450892c --- /dev/null +++ b/Formula/n/nodeenv.rb @@ -0,0 +1,34 @@ +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 + if OS.linux? || MacOS.version >= :catalina + rewrite_shebang detected_python_shebang(use_python_from_path: true), "nodeenv.py" + end + 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..3cb261e33e32a --- /dev/null +++ b/Formula/n/nodenv.rb @@ -0,0 +1,49 @@ +class Nodenv < Formula + desc "Manage multiple NodeJS versions" + homepage "https://github.com/nodenv/nodenv" + url "https://github.com/nodenv/nodenv/archive/refs/tags/v1.5.0.tar.gz" + sha256 "f11bd5acd3ff99c5a1b4df3f0cc6bca0814ec03df658ad90f53e5f2f173a25e8" + license "MIT" + head "https://github.com/nodenv/nodenv.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "cb8c3e5c3bec0417f019c7c50ed7151ff7f401ab52a3e6eabd63f7d67a523700" + sha256 cellar: :any, arm64_sonoma: "95484196709cd9fa76534d9baf11807a588699fef0e706723732fda6560e1f15" + sha256 cellar: :any, arm64_ventura: "ea7d85a9a683cfa60b81ff25dd6f5cf03147f7c1a96865356bfcc3240b5fa183" + sha256 cellar: :any, arm64_monterey: "ca9de16f487e86fe442702a0a7e88b3abfd5020c355659fd8c052989397a22d4" + sha256 cellar: :any, sonoma: "0cd1dc555dc16d7120944a6e5998c037573d9aa2fed040d2d53eb9ccfb35f330" + sha256 cellar: :any, ventura: "7d77938b7d856eeca7535de6171805392a59338e3a22f31fcfa478ab37fcbc29" + sha256 cellar: :any, monterey: "2f344ef55716f73ee7ad9ebe9b6b09581010dea4955559eb1f7d5519c14a9c89" + sha256 cellar: :any_skip_relocation, arm64_linux: "33a5bcabce0ae707a9b863ff16f16cab19c064fdfbe13d5f0a1af5c78a58f248" + sha256 cellar: :any_skip_relocation, x86_64_linux: "506fa918399e018d9492f86a2caa5bfe58ec4fe42561cfcd46c3a4c34e3bc81c" + end + + 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 + inreplace "libexec/nodenv---version", /^(version=.+)/, + "\\1--g#{Utils.git_short_head}" + end + + prefix.install "bin", "completions", "libexec" + end + + test do + shell_output("eval \"$(#{bin}/nodenv init -)\" && nodenv --version") + end +end diff --git a/Formula/n/noir.rb b/Formula/n/noir.rb new file mode 100644 index 0000000000000..dbc1d46280798 --- /dev/null +++ b/Formula/n/noir.rb @@ -0,0 +1,53 @@ +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.21.0.tar.gz" + sha256 "6ec985a2e2ae3a37ed8f3126ec938ae74beecbaba80ab8e61d449ac65b08b8a2" + license "MIT" + head "https://github.com/owasp-noir/noir.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "81663c60a678b01581fd89a6223cc7e54cd8d48133f5e8ed731ff837de1f580e" + sha256 cellar: :any, arm64_sonoma: "f69291a56d689be070db28f9e51562bac79ec90f4474081e79a8502248cbeab9" + sha256 cellar: :any, arm64_ventura: "c06bb74abc335932be17b35a7a1ac029831311e91e1bf1e819a51e958fe96a27" + sha256 cellar: :any, sonoma: "bdc56a249561db5dc7b757b530c8983a1a8262cebf6988c5c3fe54ed2249e181" + sha256 cellar: :any, ventura: "3bb07f4bfcce918e0a34d4aadf5fccfcc45a1c1bbd7a1c79f3341daa579ef1e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "81111e451b97d17c907f375e2889e66fdccb503b218808625969b36f3fc433c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9df939a35f28fa76a58224f3189fa645ab7372acd118118e97f64b531a5fa0b4" + 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..223619dacdbd6 --- /dev/null +++ b/Formula/n/nom.rb @@ -0,0 +1,30 @@ +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.8.0.tar.gz" + sha256 "7bcd5052bd754a61e326d644d1094875fe51f174f94794583d1d1966575000e0" + license "GPL-3.0-only" + head "https://github.com/guyfedwards/nom.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ad1167f93d1d86040408c1200a923907feac5d467032fe0dfe25c92d3b7d8b5b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7def7056b9d48ef2621420fea1cbe9b99d3b80918fe85d921ec942e34e02e401" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a20fff5b4fb576ff589f23baaf61d6ec3eacd6d33c516e536f960fd52144a790" + sha256 cellar: :any_skip_relocation, sonoma: "72a12abd7850ccb5bfe333e93ca61449c2aa6e1328c43952d4342e6f49e57222" + sha256 cellar: :any_skip_relocation, ventura: "3004f549ae78e8c02c5dac1c0d251a6fa314cdb1bb4788d3f999f70c5bd173a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "3efadaeacfe8f5eb1ff3dfe61712329a33e08fd8fb064ff9bf17293fc48bc47b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b48cde85533ac9590ea76a153e7072fdcb2ca0357453758155b1fc1c160ef997" + end + + depends_on "go" => :build + + def install + 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/nomad.rb b/Formula/n/nomad.rb new file mode 100644 index 0000000000000..a102d0cbabce0 --- /dev/null +++ b/Formula/n/nomad.rb @@ -0,0 +1,62 @@ +class Nomad < Formula + desc "Distributed, Highly Available, Datacenter-Aware Scheduler" + homepage "https://www.nomadproject.io/" + # NOTE: Do not bump to v1.7.0+ as license changed to BUSL-1.1 + # https://github.com/hashicorp/nomad/pull/18187 + # https://github.com/hashicorp/nomad/pull/18218 + url "https://github.com/hashicorp/nomad/archive/refs/tags/v1.6.2.tar.gz" + sha256 "8f6f0c2759654b10f64a185ee35c33f221fe662a6a2ba800f7339d955bbec8e5" + license "MPL-2.0" + head "https://github.com/hashicorp/nomad.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "31470c7ad52709c0483c07b31d915d1247759b9d7b900aeba8e909d892bd54a7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "57af75515a8706b2bf7229d144870f017890bf41f11dd908af028e18dabc75a3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ed444abdde4adcbf77a5c91ebbe57cd40de9f9275b57772b7a5d2abc42c3ba1e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e85355b125037326086493552b1af5c8b6079b92e5ab272d38949ee756315ca4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "3d1502e3b25a243f1aafb47d3d251271691f53e672f9561a17c67fafc9282741" + sha256 cellar: :any_skip_relocation, sonoma: "5ff7924f9708395e40faaf842996971fe0383c3e2addbdc2b5ed32bc28f4d8f7" + sha256 cellar: :any_skip_relocation, ventura: "40c38a4e90bbcad4b67ea3f0402968fb48bd4e4e8a27fc888bb686470559e3dd" + sha256 cellar: :any_skip_relocation, monterey: "0e093b904787ccdcd37af3f127c16fbb2482c77bc1f9de77bf4c0df5b3bce4cd" + sha256 cellar: :any_skip_relocation, big_sur: "2e247a13f25c6bf03e21e21567484dab364337864661b3a0728879527974ca20" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23763707912294f817844f4442751351ff8a294748f8d46ca81f29d7187e926d" + end + + # https://www.hashicorp.com/blog/hashicorp-adopts-business-source-license + disable! date: "2024-09-27", because: "will change its license to BUSL on the next release" + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w", tags: "ui") + end + + def caveats + <<~EOS + We will not accept any new nomad releases in homebrew/core (with the BUSL license). + The next release will change 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 + + service do + run [opt_bin/"nomad", "agent", "-dev"] + keep_alive true + working_dir var + log_path var/"log/nomad.log" + error_log_path var/"log/nomad.log" + end + + test do + 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 diff --git a/Formula/n/nomino.rb b/Formula/n/nomino.rb new file mode 100644 index 0000000000000..3d15e7501be6c --- /dev/null +++ b/Formula/n/nomino.rb @@ -0,0 +1,37 @@ +class Nomino < Formula + desc "Batch rename utility" + homepage "https://github.com/yaa110/nomino" + url "https://github.com/yaa110/nomino/archive/refs/tags/1.6.1.tar.gz" + sha256 "8d6a664b7b557d7d3e7f057eada63e153a26af68bedbbce45523164641d497c0" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/yaa110/nomino.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b95d0c88287d5238b0a97ab6798ead5edba94048077558a4725efee43b32fb51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3c6d478132735d240053a7e633e4c95427aecd54a056ac286da8442a40021c55" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4471731584112265bb13937d2dd8fbb861100d74d9fde989ee81fbc1569504b" + sha256 cellar: :any_skip_relocation, sonoma: "17a299ee5a482716c18c115614d95a176790afe2fe003d1f26b81b3efda2a267" + sha256 cellar: :any_skip_relocation, ventura: "9c6ce75e5565cdcac444af92b510379cf5b7f7723f71eb4ac96a01c74b8fad22" + sha256 cellar: :any_skip_relocation, arm64_linux: "31c8aaea80c57609902d641da9f07163cf43f80a70c4c3a3e2b2fd320e7be652" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dbff625abb4d8f07a1e052a6e3149c0f7d58ea5c4d66939fa42e82facffec17c" + 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..87f6fb3d150a2 --- /dev/null +++ b/Formula/n/nopoll.rb @@ -0,0 +1,44 @@ +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_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..0662edb622589 --- /dev/null +++ b/Formula/n/norm.rb @@ -0,0 +1,59 @@ +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" + + bottle do + rebuild 1 + 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..da79dfc324888 --- /dev/null +++ b/Formula/n/normalize.rb @@ -0,0 +1,50 @@ +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 + + bottle do + rebuild 1 + 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 cellar: :any, mojave: "8e1ac6ecbf84164c27a804b158201b75ddaabd3237e5826d7ffc78fbe8ee7377" + sha256 cellar: :any, high_sierra: "e4dd195c639807e3e2e25fee6c5c6f3c4263a37a4c7f8f25ab656a96395faeaf" + sha256 cellar: :any, sierra: "1165de2721e8b4d7f373b9ad10f52c2cd49c44a24cd8fddab5ba51983164cefe" + sha256 cellar: :any, el_capitan: "052ab2e8b1f6a2aa1e634a30749612d927b5cee5cc9302e057bd02c599a1c256" + 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..3bc949edcf6fb --- /dev/null +++ b/Formula/n/noseyparker.rb @@ -0,0 +1,44 @@ +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_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..b53f354f6fb9d --- /dev/null +++ b/Formula/n/notation.rb @@ -0,0 +1,39 @@ +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_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, 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..f1fd03ab7edc3 --- /dev/null +++ b/Formula/n/notcurses.rb @@ -0,0 +1,39 @@ +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.16.tar.gz" + sha256 "e893c507eab2183b6c598a8071f2a695efa9e4de4b7f7819a457d4b579bacf05" + license "Apache-2.0" + + bottle do + sha256 arm64_sequoia: "84131b1243f2e5549bb6447676154e3fdc89645af7878da42bb95db1e18a48cd" + sha256 arm64_sonoma: "05b2fab227b9544777d87743dad78203723d947a11620770fea5e323ebd30ce0" + sha256 arm64_ventura: "2471d064f62373e83af6e105491d0b8d36a5f8acd178d52fe981a1d57dc096b4" + sha256 sonoma: "f7e722cc893f7f1bfb9c4e83b5cabb3894767edfae89718a290c45fbc2c21032" + sha256 ventura: "669e599e85ff4d89808b791fd3d001420e3f65526be3a278fabb0c2e9d46d94a" + sha256 arm64_linux: "9029a9ffcb2f68d1f374df14b553ffb72cc9f613ed3a13b84916559838c44471" + sha256 x86_64_linux: "f8861705f6f75c3ae9ce526d5fe1a3268ab72d6b31c185a31bfb91580cfeec7c" + 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..6371a016e9f7c --- /dev/null +++ b/Formula/n/noti.rb @@ -0,0 +1,34 @@ +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_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, 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..62004c2d043a2 --- /dev/null +++ b/Formula/n/notifiers.rb @@ -0,0 +1,83 @@ +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/51/c2/1e36b5774b3ccbcb5f63133bf3fade097cd58fbdd9947248ab43777f705a/notifiers-1.3.5.tar.gz" + sha256 "bae24057f4dcb85563712c57bb1439dd96aeb0794df6697dff77c17efbc4dd43" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "11ebab39c6d85a806a6e9fc9f1b72adf92f8993783f8a75312bb1a5794e83c5f" + sha256 cellar: :any, arm64_sonoma: "c615419b970c4dcfd8728efe90253909e8211054cb92d8980afd9b44462df506" + sha256 cellar: :any, arm64_ventura: "9e9f4b2e767226a0817e045f475f589c9bdda8fc34538cd37ef25b6d49012034" + sha256 cellar: :any, sonoma: "c23986b48ab53a2b654b61c02dde1ef9f107f3155f1625c25e3f6e71b36a2bc5" + sha256 cellar: :any, ventura: "cba2fdef7b1f6da1ba6584d6d4656c25222aacdb00a2cf51e77d2bd78a1aee8b" + sha256 cellar: :any_skip_relocation, arm64_linux: "90abd812f4f5d7d295cb4187b26842221edc9f0fa8a124e1eb0e5acf85da08db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88ae7c98d8435e74025269957c336a44b975dbffe26eba29e1b192bb55cb9807" + end + + depends_on "rust" => :build # for rpds-py + depends_on "certifi" + depends_on "python@3.13" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"notifiers", shells: [:fish, :zsh], 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..e73464936fedd --- /dev/null +++ b/Formula/n/notify.rb @@ -0,0 +1,29 @@ +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: "master" + + bottle do + 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, 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/notmuch-mutt.rb b/Formula/n/notmuch-mutt.rb new file mode 100644 index 0000000000000..43a5ce4dc948e --- /dev/null +++ b/Formula/n/notmuch-mutt.rb @@ -0,0 +1,119 @@ +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 + + bottle do + 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..99d888d970253 --- /dev/null +++ b/Formula/n/notmuch.rb @@ -0,0 +1,93 @@ +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" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "d82ad567f35dc86cfe9c3238f211849ec7ebd6a64d39728d1be7979885c19a2d" + sha256 cellar: :any, arm64_sonoma: "ff9e440133a39ffb3a01054b5762e0d5ed7ed14b7aa66db9dc3d586540fc0918" + sha256 cellar: :any, arm64_ventura: "e384a4f762886b8d5e59f6e752574085d2af177c370caab601668eda1725549f" + sha256 cellar: :any, sonoma: "f2234ee4ad5abe3603aafdd2a79f838c409b5385b4e57cfc9e9e4a794d87d4bc" + sha256 cellar: :any, ventura: "66dc7a1087e43c91d4a4173a1e8f1f84ec30c9ce852be303440d5f8fc735179d" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ba411d8183c7e59331dc5bb6df073d8b2b2cbf17ca94c5d61a382a9a2400816" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66b8788cc35e7be17f259b58f807332e5a18bf444578a33e54b3e4f9162f058f" + 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.13" + depends_on "sfsexp" + depends_on "talloc" + depends_on "xapian" + + uses_from_macos "zlib", since: :sierra + + on_macos do + depends_on "gettext" + end + + def python3 + "python3.13" + 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/noweb.rb b/Formula/n/noweb.rb new file mode 100644 index 0000000000000..40f4a30d5a861 --- /dev/null +++ b/Formula/n/noweb.rb @@ -0,0 +1,135 @@ +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" + + bottle do + 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..7240b8d21eb1f --- /dev/null +++ b/Formula/n/nowplaying-cli.rb @@ -0,0 +1,28 @@ +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_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 + + 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..d0452f8481597 --- /dev/null +++ b/Formula/n/nox.rb @@ -0,0 +1,92 @@ +class Nox < Formula + include Language::Python::Virtualenv + + desc "Flexible test automation for Python" + homepage "https://nox.thea.codes/" + url "https://files.pythonhosted.org/packages/b4/80/47712208c410defec169992e57c179f0f4d92f5dd17ba8daca50a8077e23/nox-2025.5.1.tar.gz" + sha256 "2a571dfa7a58acc726521ac3cd8184455ebcdcbf26401c7b737b5bc6701427b2" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3e2714259195a768dc9390d04a0d2f9f0bcc1a1bd6cad293b3865a0b305eac9b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e2714259195a768dc9390d04a0d2f9f0bcc1a1bd6cad293b3865a0b305eac9b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3e2714259195a768dc9390d04a0d2f9f0bcc1a1bd6cad293b3865a0b305eac9b" + sha256 cellar: :any_skip_relocation, sonoma: "f9718d5d586aad781bf74f6808694ffe294b2e7ef40e07bd185ced9c9831531c" + sha256 cellar: :any_skip_relocation, ventura: "f9718d5d586aad781bf74f6808694ffe294b2e7ef40e07bd185ced9c9831531c" + sha256 cellar: :any_skip_relocation, arm64_linux: "8fe7df1af903820f571e1d6b1c08449a743f06e9908e1bcd6005eed4225a0140" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8fe7df1af903820f571e1d6b1c08449a743f06e9908e1bcd6005eed4225a0140" + end + + depends_on "python@3.13" + + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "colorlog" do + url "https://files.pythonhosted.org/packages/d3/7a/359f4d5df2353f26172b3cc39ea32daa39af8de522205f512f458923e677/colorlog-6.9.0.tar.gz" + sha256 "bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2" + end + + resource "dependency-groups" do + url "https://files.pythonhosted.org/packages/b4/57/cd53c3e335eafbb0894449af078e2b71db47e9939ce2b45013e5a9fe89b7/dependency_groups-1.3.0.tar.gz" + sha256 "5b9751d5d98fbd6dfd038a560a69c8382e41afcbf7ffdbcc28a2a3f85498830f" + 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 "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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/38/e0/633e369b91bbc664df47dcb5454b6c7cf441e8f5b9d0c250ce9f0546401e/virtualenv-20.30.0.tar.gz" + sha256 "800863162bcaa5450a6e4d721049730e7f2dae07720e0902b0e4040bd6f9ada8" + end + + def install + virtualenv_install_with_resources + (bin/"tox-to-nox").unlink + + generate_completions_from_executable(libexec/"bin/register-python-argcomplete", "nox", + shell_parameter_format: :arg) + 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..a292f3c1a2cc7 --- /dev/null +++ b/Formula/n/nping.rb @@ -0,0 +1,34 @@ +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.3.1.tar.gz" + sha256 "2332facafc52ab150cc1e7932af2cae5c524c6aaa10c192193e0277b53a41030" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "42b3c52109c69ca82e11c86388004bf3df15c382ad8b53ba7509bb4366ed6855" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "abb02e2f6286cf4558615b4227510752538f1442e3a083e5c76b39c4ac302582" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a123e18d81379c6f08cf219f0e81f022e02abb371483e2daea1d8cdd8cdf8119" + sha256 cellar: :any_skip_relocation, sonoma: "aa4bf367b25e6b6fcb1e18202fe9600df06291ef40eee9f5dcfb9385a6c9822b" + sha256 cellar: :any_skip_relocation, ventura: "b741edce320ae13d462d8abe2d9d4b4f2efe4d73d9c3a655351ffdedb9e90dbd" + sha256 cellar: :any_skip_relocation, arm64_linux: "b500d9d44a1e3cf1a11f556c0ff58fecabd60e7342fbd86e4a2309f0d6088617" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3dba5c232d2fa9d783f9a15d97329ea90ed67897290a0cf24abddce27024f9c" + 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..00892fd0eb0d0 --- /dev/null +++ b/Formula/n/npm-check-updates.rb @@ -0,0 +1,49 @@ +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-18.0.1.tgz" + sha256 "78acf53174831af4e208f469a90242d277990bec0a356d408566cad182fa5f83" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "488928229409efa74b0cb47e1b91fe2b7e907471276f3a852e6f5982062a0abe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "488928229409efa74b0cb47e1b91fe2b7e907471276f3a852e6f5982062a0abe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "488928229409efa74b0cb47e1b91fe2b7e907471276f3a852e6f5982062a0abe" + sha256 cellar: :any_skip_relocation, sonoma: "26edec4b36c15b232b4e30e205cd6aa938dd474e94b4c41f781e47ab46d1939d" + sha256 cellar: :any_skip_relocation, ventura: "26edec4b36c15b232b4e30e205cd6aa938dd474e94b4c41f781e47ab46d1939d" + sha256 cellar: :any_skip_relocation, arm64_linux: "488928229409efa74b0cb47e1b91fe2b7e907471276f3a852e6f5982062a0abe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "488928229409efa74b0cb47e1b91fe2b7e907471276f3a852e6f5982062a0abe" + 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/npth.rb b/Formula/n/npth.rb new file mode 100644 index 0000000000000..286da0a0ddd2e --- /dev/null +++ b/Formula/n/npth.rb @@ -0,0 +1,58 @@ +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_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..a457ae4ace5ad --- /dev/null +++ b/Formula/n/npush.rb @@ -0,0 +1,41 @@ +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/" + + bottle do + 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, mojave: "fb3618689797a95b8296a7b37f3c8f2e9cb29fdcbd9b2fc9ac9d585e46d6eab3" + sha256 cellar: :any_skip_relocation, high_sierra: "c3d40f8709487c01053f5ea09e35c047ae6bfede34d21e97703d38c9985d67b0" + sha256 cellar: :any_skip_relocation, sierra: "ce2f958ef8d766791137266e74b7c2cd0843755d080ecbbd6a7074bc7d035c19" + sha256 cellar: :any_skip_relocation, el_capitan: "c37e743784c68e9c1bb1527d4c6161a5653831de44b3203be8c1cb07d9eeb7c2" + 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..280ae2b24e96b --- /dev/null +++ b/Formula/n/nq.rb @@ -0,0 +1,31 @@ +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_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..7a53a79339d2e --- /dev/null +++ b/Formula/n/nqp.rb @@ -0,0 +1,47 @@ +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.04/nqp-2025.04.tar.gz" + sha256 "6468566fd63a75b743979df433beab99690125c4d90972c3b371f6ace82528a0" + license "Artistic-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "e2463fc727bac12ca2dd08224c9b0da9e43ca68bf6b5c802da3dd1faac6ec2ed" + sha256 arm64_sonoma: "c3d32229c07c0bc65db3d4eaede67e497dda45b024de66e6848be3268c045581" + sha256 arm64_ventura: "ae32fdad142b625ffb29a5d41f164f9a1f49382cc880ee2ae8e1716eb6d490a3" + sha256 sonoma: "636e461d6dff50ed188a840cd6b8df5debb7ae854bdbf804108cb4ea4f4fbddc" + sha256 ventura: "739bef0247c89a509b05876e87a2319f4d378c0ed749ee7a2ba2e742f7846eac" + sha256 arm64_linux: "68f61319361ee737557599af2546a18c10a4135c8e1553d3e92fd693739624f9" + sha256 x86_64_linux: "0dec3fcf774a1b16d4588bebeb55b646fbacdd28639e616eb591f386deb58328" + 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..c76ea7202cccc --- /dev/null +++ b/Formula/n/nrg2iso.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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, mojave: "3d965e8881897c8c2b42acc476b066398eeb074acce577f011c850c0ee7b5eec" + 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..9b3dd11865059 --- /dev/null +++ b/Formula/n/nrm.rb @@ -0,0 +1,30 @@ +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.0.1.tgz" + sha256 "64f2462cb18a097a82c7520e9f84bf10159b1d5af85c20e2b760268993af1866" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e8ef94c49faddff846db68abb006e2c3973688b0f2b9aab235b933156dae66be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e8ef94c49faddff846db68abb006e2c3973688b0f2b9aab235b933156dae66be" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e8ef94c49faddff846db68abb006e2c3973688b0f2b9aab235b933156dae66be" + sha256 cellar: :any_skip_relocation, sonoma: "5cad57eed54947a284788f5ea7b977b8e3086c04707a384e689bb0e4f4925735" + sha256 cellar: :any_skip_relocation, ventura: "5cad57eed54947a284788f5ea7b977b8e3086c04707a384e689bb0e4f4925735" + sha256 cellar: :any_skip_relocation, arm64_linux: "9ce402b087b6886249926829cb3bfa7759b62b3f0bc4ac76cd680dcc78f86ee6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8ef94c49faddff846db68abb006e2c3973688b0f2b9aab235b933156dae66be" + 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..e6ce30b258010 --- /dev/null +++ b/Formula/n/nrpe.rb @@ -0,0 +1,88 @@ +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_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..f82375e63c29e --- /dev/null +++ b/Formula/n/ns-3.rb @@ -0,0 +1,51 @@ +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.44/ns-3-dev-ns-3.44.tar.gz" + sha256 "14539f7e73d54788514597c03f110d2cf9a251386543bd389b28bf9ab122e58e" + license "GPL-2.0-only" + + bottle do + sha256 arm64_sequoia: "1b2401c6ee8a679908199458daddaac700f901aa75b5d3fe27989d98d2629019" + sha256 arm64_sonoma: "b8d7754bc3619c27ded759f220c8f2db346ec7f1756a85360a1517e5e603ddcf" + sha256 arm64_ventura: "5213e90d6642839fd03c0dd859be2e840a36463b08a2d8f2c1557d27c38df356" + sha256 sonoma: "c795c64d2bdd26376c506c21511198689d7fb47f853b5320928a26b8c08a43fc" + sha256 ventura: "17c2a8f7c608157f7b227a67c6502f85f13c13aa1c2afb874bdc61ee522b66d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "516bebae3e854dc0359693bfe5dad2f2561cd32dd222a67322ed7cc78484e1b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7826cdd902f244fd4352db46004e28c895616af90bc0e25d78671e7a4e46eb92" + 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 binding's rpath + linker_flags = ["-Wl,-rpath,#{loader_path}"] + + system "cmake", "-S", ".", "-B", "build", + "-DNS3_GTK3=OFF", + "-DNS3_PYTHON_BINDINGS=OFF", + "-DNS3_MPI=ON", + "-DCMAKE_SHARED_LINKER_FLAGS=#{linker_flags.join(" ")}", + *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..320feedefe3e7 --- /dev/null +++ b/Formula/n/nsd.rb @@ -0,0 +1,48 @@ +class Nsd < Formula + desc "Name server daemon" + homepage "https://www.nlnetlabs.nl/projects/nsd/" + url "https://www.nlnetlabs.nl/downloads/nsd/nsd-4.12.0.tar.gz" + sha256 "f9ecc2cf79ba50580f2df62918efc440084c5bf11057db44c19aa9643cd4b5e8" + 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 + sha256 arm64_sequoia: "85bb70cef58045b06ced5a968940b759002712735aed244bc11332a9f39dcb94" + sha256 arm64_sonoma: "25250277cb9ea1362f84c54ebedb00bf7d0495137bb6cd382837066827088565" + sha256 arm64_ventura: "d9bfd250e34039636ce4b0f280f1355b2c1df8fb23a8d1f3fc79a3396dd88aeb" + sha256 sonoma: "46f180636949a9d29fdc7407781738e88e682310d17f75d8a149973c851aba28" + sha256 ventura: "17aaaf7af44e90ff1ed56862b487cff20aa5c07e88a5e062d81f01626bba8418" + sha256 arm64_linux: "74c83fbff5f64a0c06dc293f179c42f09ebef07e2d0053ba175e8d9fb7fbd180" + sha256 x86_64_linux: "5d1dff89d0761927aabd2c62ef96c1e304f1f411ee1b7f454792364c81aadf04" + 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}", + "--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..b9f897f935059 --- /dev/null +++ b/Formula/n/nsh.rb @@ -0,0 +1,34 @@ +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" + + bottle do + rebuild 1 + 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..554847bac8e88 --- /dev/null +++ b/Formula/n/nsnake.rb @@ -0,0 +1,41 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "195e486eb84a9fa230bfa31558d6b3fb8ae6715ab444f3aead9c997a43f981d8" + sha256 cellar: :any_skip_relocation, high_sierra: "5f8de3bf4148a6d9fdb32b5584e4aa5890c8f373ad5be36b17473e4d7c2f0a96" + 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..09c64b79730f0 --- /dev/null +++ b/Formula/n/nspr.rb @@ -0,0 +1,53 @@ +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.36/src/nspr-4.36.tar.gz" + sha256 "55dec317f1401cd2e5dba844d340b930ab7547f818179a4002bce62e6f1c6895" + 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_sequoia: "74fa5a145de56d105daeb2686e5e998a926602260b87d8bcd3d8331ae89fc313" + sha256 cellar: :any, arm64_sonoma: "7fd364727614ff8e1b09ffeafc42c616515fcc8c4c2bdcfa4df4ba216a6a2e5e" + sha256 cellar: :any, arm64_ventura: "8dfb7cfb064a45c9b0d271ceebb4763c18870bc315a24edf2dfccc0cd2317356" + sha256 cellar: :any, sonoma: "4872910fad9fa87badb31ca4e531e859524c0e70fbdecdf7cb4a5b0486a062e2" + sha256 cellar: :any, ventura: "4c66879d6672278c32c08a858337dd3d430e216140afa53ffc88d85f3c47f3e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "4a9fbf463d239e77fb99cbb51f5eb3b918ad7d0afe1992a6f25e9c06fe439935" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf40b06a4583043f75d1d4b47a27d097b412c938ba316c84749db59af7ded134" + 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..03d6ae7f9a072 --- /dev/null +++ b/Formula/n/nsq.rb @@ -0,0 +1,73 @@ +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_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, 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..82f5e9e6cdb14 --- /dev/null +++ b/Formula/n/nss.rb @@ -0,0 +1,124 @@ +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_111_RTM/src/nss-3.111.tar.gz" + sha256 "5a4d5a44e91ef03cdc0c4897cf616e3c92f4e590ea835d3e0ccad8b005bd73c6" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "83cbf29ef48c82f08f81c27dfc531570353e5c0585ea72d78b6a62fdd4fde9a2" + sha256 cellar: :any, arm64_sonoma: "68306dec6d42b1d520682a4b7aa2f29bf2805098f9bd6fb8a240598327715860" + sha256 cellar: :any, arm64_ventura: "c7eb5124aa8027a3873a009f74593bdca3c5342978d20a6a3a7ae31a1d40bfea" + sha256 cellar: :any, sonoma: "014215b9426bf0ce6413cfecc555b7617a57979140bf4284d4cf1f72c40108af" + sha256 cellar: :any, ventura: "294c54f54fa01012728320d8f2ec620fd79d550fbd84d2b63f6088b31ede6c77" + sha256 cellar: :any_skip_relocation, arm64_linux: "363f07eaf3bb284aaf46031610244695aa48b71856aab2e959d76f16ffbdbb0c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b378a5bc096c37ebdeec0034f1911d5997dc5810e7b92215cf4881d8b93f9bfc" + 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..2e79fd42e34e9 --- /dev/null +++ b/Formula/n/nsuds.rb @@ -0,0 +1,59 @@ +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 + + bottle do + 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 mojave: "60d318290bb60415eb4abfdd7ffad468a24294892ac4ff90895cc0e589ea3da6" + sha256 high_sierra: "26e82eae22288d51eda3742c0ae4f3e1b0b17a003461f1baec38ccaa52495d9f" + sha256 sierra: "89ae2f310d8b21d98ababce7110f20d3d41da06b7a751447c56aa6dbd13a1950" + sha256 el_capitan: "596fc55d7e2cc63e8fdc4f3648a23d2c3c9c9eee9775a6579410c28708c0a358" + 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..88d0409413a86 --- /dev/null +++ b/Formula/n/nsync.rb @@ -0,0 +1,61 @@ +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.29.2.tar.gz" + sha256 "1d63e967973733d2c97e841e3c05fac4d3fa299f01d14c86f2695594c7a4a2ec" + license "Apache-2.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "5646e78dfc90e6ea7a9575f5b51ccb91e142838e61170087a5ea89dd7076d1fd" + sha256 cellar: :any, arm64_sonoma: "fdcf50215956176ee21750ef95dea641a5464aa2c474e024d63c8032ddc99da1" + sha256 cellar: :any, arm64_ventura: "163b4942545d21ed0042db6343b07b7ceb810010cd513a77d2f2d8060ace3b9a" + sha256 cellar: :any, sonoma: "03ffb1919593d89b4ce5e8bd58b540ebce76dedbfea579f06dfd3a1578af6120" + sha256 cellar: :any, ventura: "d8573c05ff6039c4074be9a4bb3119200ce4904e8f55b3747b50c2d9c08cb10f" + sha256 cellar: :any_skip_relocation, arm64_linux: "e7685d7883604fa8746a3e28034b2ac85632a807d575f0ae5e32173b0c96bc93" + sha256 cellar: :any_skip_relocation, x86_64_linux: "371b938f9cc2b55990b934c679a18967d749bf7a82783dce7ac49585fedb0379" + end + + depends_on "cmake" => :build + + # PR ref: https://github.com/google/nsync/pull/24 + patch :DATA + + def install + system "cmake", "-S", ".", "-B", "_build", "-DBUILD_SHARED_LIBS=ON", "-DNSYNC_ENABLE_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() { + 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 + +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fcc3f41..9dbe677 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -125,7 +125,6 @@ elseif ("${CMAKE_SYSTEM_NAME}X" STREQUAL "DarwinX") + ${NSYNC_OS_CPP_SRC} + "platform/c++11/src/nsync_semaphore_mutex.cc" + "platform/posix/src/clock_gettime.c" +- "platform/posix/src/nsync_semaphore_mutex.c" + ) + elseif ("${CMAKE_SYSTEM_NAME}X" STREQUAL "LinuxX") + set (NSYNC_POSIX ON) diff --git a/Formula/n/ntbtls.rb b/Formula/n/ntbtls.rb new file mode 100644 index 0000000000000..739750c6f6c16 --- /dev/null +++ b/Formula/n/ntbtls.rb @@ -0,0 +1,58 @@ +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 + + bottle do + 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..5fd5ecab4ed0e --- /dev/null +++ b/Formula/n/ntfs-3g.rb @@ -0,0 +1,97 @@ +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 + + 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..d340ed0f08364 --- /dev/null +++ b/Formula/n/ntfy.rb @@ -0,0 +1,38 @@ +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.11.0.tar.gz" + sha256 "56b4c91d53e479e207b8064d894516030f608848c76c6d4eed2d37277d337e71" + license any_of: ["Apache-2.0", "GPL-2.0-only"] + head "https://github.com/binwiederhier/ntfy.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "abc17b439d382f5daf76f7dd15581a8dec3e9704d4437a1e6baf9b8619b4ec6a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "abc17b439d382f5daf76f7dd15581a8dec3e9704d4437a1e6baf9b8619b4ec6a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "abc17b439d382f5daf76f7dd15581a8dec3e9704d4437a1e6baf9b8619b4ec6a" + sha256 cellar: :any_skip_relocation, sonoma: "cb248dc77fe6a324db6329ba5135236737ea76b14c288e59f886cd2f8987e995" + sha256 cellar: :any_skip_relocation, ventura: "cb248dc77fe6a324db6329ba5135236737ea76b14c288e59f886cd2f8987e995" + sha256 cellar: :any_skip_relocation, x86_64_linux: "903dd3fc5c04f5ac38ac940439a60b28c554b44afabe4550c435e56e07f50b34" + 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..e06b3929bcd5e --- /dev/null +++ b/Formula/n/ntl.rb @@ -0,0 +1,74 @@ +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 + + bottle do + 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, mojave: "bc2ffa687c16e3ee99c093dc0b55275df08c278e20c1d2281e798f1144816634" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..eb2d05a3071b1 --- /dev/null +++ b/Formula/n/ntopng.rb @@ -0,0 +1,99 @@ +class Ntopng < Formula + desc "Next generation version of the original ntop" + homepage "https://www.ntop.org/products/traffic-analysis/ntop/" + license "GPL-3.0-only" + revision 2 + + stable do + url "https://github.com/ntop/ntopng/archive/refs/tags/6.2.tar.gz" + sha256 "de6ef8d468be3272bce27719ab06d5b7eed6e4a33872528f64c930a81000ccd1" + + depends_on "ndpi" + + # Apply Gentoo patch to force dynamically linking nDPI + patch do + url "https://gitweb.gentoo.org/repo/gentoo.git/plain/net-analyzer/ntopng/files/ntopng-5.4-ndpi-linking.patch?id=25646dfc75b15c2bcc9c80ab3aba7a6bab5eec68" + sha256 "ddbfb32a642e890878bef52c4c8e02232e9f11c132e348c78d47c7865d5649e0" + end + end + + bottle do + sha256 arm64_sequoia: "9f6d0f239b8dc0835e0698849377f502301bc4299936fb3d0aba624e11885604" + sha256 arm64_sonoma: "be65c430079ebbe79ab62ce1ffce5aa7d084fc0b33bc7153b0e1b57bb240c3ad" + sha256 arm64_ventura: "a80a9b44e9aaa5852b96d308be805bc44099e83487d92f2cd28f6a88442c73f5" + sha256 sonoma: "df1b923da4e9371ba304e9f72713c6672cc124bc803bde6402e93f9e654fdde0" + sha256 ventura: "4da8a2ccd7d3c0092e1a95c73b36b8a01d8b1ed2dab9f64e004a57b37274c565" + sha256 arm64_linux: "9328b2d8059fc248392e57bf053ac1d2c0ced06c1cb997ea93e2cf269936800b" + sha256 x86_64_linux: "81e384a601f5d00d27a9ec914e9bd4b25266999afa15e4e11a9ad3109609a4b9" + 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 "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 "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 + + def install + # Remove bundled libraries + rm_r Dir["third-party/{json-c,rrdtool}*"] + + args = [] + if build.head? + resource("nDPI").stage do + system "./autogen.sh" + system "make" + (buildpath/"nDPI").install Dir["*"] + end + else + args << "--with-ndpi-includes=#{Formula["ndpi"].opt_include}/ndpi" + end + + 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..6e73aaec8e08c --- /dev/null +++ b/Formula/n/ntp.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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..8227a4d6b0a16 --- /dev/null +++ b/Formula/n/nu.rb @@ -0,0 +1,128 @@ +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: "master" + + bottle do + 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 + + 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 "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.delete("SDKROOT") if OS.mac? && MacOS.version < :sierra + 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..9a6e64b6fb957 --- /dev/null +++ b/Formula/n/nuclei.rb @@ -0,0 +1,31 @@ +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.3.tar.gz" + sha256 "3db79d91ab3bf7df021224e193e36a32442232c2a861326bb50492893f3f4276" + license "MIT" + head "https://github.com/projectdiscovery/nuclei.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5cf625e411928040cfe6e0d126911999d36f769e457e9e23c509386951555c46" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b3b156c51f194b28785087cb77036ae78d4c23204cc83886e1e245ce69ebb659" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4089527d55eda54f02d44d534639d09a8a01c5e1f73e059dfca3894691b3891a" + sha256 cellar: :any_skip_relocation, sonoma: "52448e747ba8fd12215fd8efcc4c927a4be08a821781f7e7aa923459f16f017d" + sha256 cellar: :any_skip_relocation, ventura: "736ae50afe2e7a953e6274536504d48a36ae64299a40da1b1f563088661c9cb8" + sha256 cellar: :any_skip_relocation, arm64_linux: "75427b9b57cff5d419b2924d92f3f930c0c5abeaf3e8838185e66b40a05e1f9c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3b7ecd0307a71fcb4f43609e417b2d79a3c64444c82249cf49be5112b4b2be7" + 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..6da62f260104a --- /dev/null +++ b/Formula/n/nudoku.rb @@ -0,0 +1,40 @@ +class Nudoku < Formula + desc "Ncurses based sudoku game" + homepage "https://jubalh.github.io/nudoku/" + url "https://github.com/jubalh/nudoku/archive/refs/tags/5.0.0.tar.gz" + sha256 "ba60a99c9832b5c950a00a0a9d1e0938fddf2cef32765bca18041e770afc3c4a" + license "GPL-3.0-or-later" + head "https://github.com/jubalh/nudoku.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "f829eb3b002dc33ea48c3d58926a3ca3c5a0378941ce0b587737d4ed1a11a100" + sha256 arm64_sonoma: "969ddf28f4eb7014b9c44cf6bac0106f2d00306fef670f08b8d57fa08873ca9f" + sha256 arm64_ventura: "8e257d6a76e89ded708920215a7446a845c2ed74fe1cb31ee695de5f08129864" + sha256 arm64_monterey: "ad835249ee203dac6d4c7fdd7b95d1395e113f6aaa0ec7a4d2d14c9405e61cc3" + sha256 sonoma: "d4f87f815b143cddae90e6bcf12bb8609a53e7f112cb19580585613e92a2fd49" + sha256 ventura: "a58e28aa1ffac9ef8d792ef34190e7bd1605828aa2ae29550042e28740863023" + sha256 monterey: "c208d8a2b1a5bbe9179a4969f284e2412ad354ee00da078f423552adc67698fa" + sha256 arm64_linux: "b91300e0ac30944be3a94ba767f3ee11aff11ed7fd41f7987b0d9195989a2fef" + sha256 x86_64_linux: "6050f8f3ab9a15cafee9cf73e62cfc236bd98f445015cbed8f2a48fb82de0efc" + 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..16d85cbc0ec33 --- /dev/null +++ b/Formula/n/nuitka.rb @@ -0,0 +1,57 @@ +class Nuitka < Formula + include Language::Python::Virtualenv + + desc "Python compiler written in Python" + homepage "https://nuitka.net/" + url "https://files.pythonhosted.org/packages/68/78/ccc32d807985cf9b8f8578f921ed087a7964280be0851142d31d5abfab1e/Nuitka-2.7.2.tar.gz" + sha256 "4e8d315d6cd5370ef346f1243849681170f649bc9f6e4c10310f58b60861ef1d" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "062f4630395724bb0be3c1799ed0c6e1f2887f7ef5b6c9919b58173583680dc3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91fbdd7e80b8f51575f052129ccdf673b91c07fcfe3efbb518594c38ade7c0ee" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9420362d1409f4f17d5f954b8f4081d44eeafeadc94bc96ade49e63c95e664cc" + sha256 cellar: :any_skip_relocation, sonoma: "6f2560ec5ea0546338d69824a80e2c5d5c1726ed4dabdc23ab0ce1c4b011e1c6" + sha256 cellar: :any_skip_relocation, ventura: "d92c27418d167b1488900a40e5c479c873f2b3f0b8f2d5adae76adff017c797d" + sha256 cellar: :any_skip_relocation, arm64_linux: "79864604721914928128417672eecd050cf323b35c5138a55c2edbd3da99656d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e640923b82d797c84958752964a661bb34a019dfa851f293286aa06f324be20" + 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/ed/f6/2ac0287b442160a89d726b17a9184a4c615bb5237db763791a7fd16d9df1/zstandard-0.23.0.tar.gz" + sha256 "b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09" + 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("python3 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..6cfed3f9cb101 --- /dev/null +++ b/Formula/n/num-utils.rb @@ -0,0 +1,37 @@ +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 + + 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..89be142f088c6 --- /dev/null +++ b/Formula/n/numbat.rb @@ -0,0 +1,37 @@ +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_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..aac9b7e095e28 --- /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.1.tar.gz" + sha256 "a535939304f1dccef4ddfc1d46e6202da658a41f1ef83de6485301268d2dc26d" + license "MIT" + head "https://github.com/dpilger26/NumCpp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0fc0fdfbdf091db4c3838048be4f92e3015d6d086c5cb04aea972fb785739d6c" + 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..8fcd742f9d1f4 --- /dev/null +++ b/Formula/n/numdiff.rb @@ -0,0 +1,54 @@ +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 + + bottle do + 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..a8930c7195cbb --- /dev/null +++ b/Formula/n/numpy.rb @@ -0,0 +1,62 @@ +class Numpy < Formula + desc "Package for scientific computing with Python" + homepage "https://www.numpy.org/" + url "https://files.pythonhosted.org/packages/dc/b2/ce4b867d8cd9c0ee84938ae1e6a6f7926ebf928c9090d036fc3c6a04f946/numpy-2.2.5.tar.gz" + sha256 "a9c0d994680cd991b1cb772e8b297340085466a6fe964bc9d4e80f5e2f43c291" + license "BSD-3-Clause" + head "https://github.com/numpy/numpy.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ada13da2a330ff6e0f36050853d87dc84dca63bb0ac17e4ca0e5d233a9a6f343" + sha256 cellar: :any, arm64_sonoma: "54f821ddca9b79f706db7525add662e9b391eb1e5546d806cffb3f7c74b1d7f5" + sha256 cellar: :any, arm64_ventura: "d1d5211a2f30129f91f3f7a3ebf9a8a183fb1fd6a59e3acf2f00d1d016c78e1e" + sha256 cellar: :any, sonoma: "d251fc5442202475bf16c719ee300c3ac89ae4260f22777945971698db55e7d5" + sha256 cellar: :any, ventura: "1a1dc5ad1452da1010d006f942984356cb47954a90604d3ff9ddf9199bd8c10f" + sha256 cellar: :any_skip_relocation, arm64_linux: "1d15aa7ae1b18a7c359f8392a91a382c10535ed2cfb9df7076dedf4527336a91" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec49077596cf92216b8f7a3447865c85cc6933f570a616c585a2c28315a161b6" + end + + depends_on "gcc" => :build # for gfortran + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [: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..138839cd8c2cf --- /dev/null +++ b/Formula/n/nuraft.rb @@ -0,0 +1,43 @@ +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_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..e95f92753609f --- /dev/null +++ b/Formula/n/nushell.rb @@ -0,0 +1,52 @@ +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.104.0.tar.gz" + sha256 "2964ef7148d0f67fa4860fa3eab1c7d15c51ec5292be0cd0865996816f46fe84" + 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_sequoia: "1262513559b84e8f818f3389e8c36dee5d0ceaab8db24926ec9527383f412dc5" + sha256 cellar: :any, arm64_sonoma: "86c404706c73487df9f2cbb8db52485696915d17425c1a55c71b6f16ca27f5d1" + sha256 cellar: :any, arm64_ventura: "090650105b09f896f1dad6866b1572874b40c2b69b7d4509bfe32f50a230e6fc" + sha256 cellar: :any, sonoma: "88b286ab8c4ab3608d952b507c74e0e7212ed3be9ce32c34c1ca804a8e37bc43" + sha256 cellar: :any, ventura: "ce3f3dc6f3c22dc2c94bc8cafd6f66c8685db02fd9f1ba6c0d3c333d8e1b9843" + sha256 cellar: :any_skip_relocation, arm64_linux: "94e3a3a5e15e2acf70cfc156479b15af9c2c4698a1b217ec6f147f64969d6044" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74df9f405ca0e22317fa1efe0ddfffb7a62ab2603b375a9f35a46aabd3c10e61" + end + + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "curl" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + 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..759fc356302b6 --- /dev/null +++ b/Formula/n/nuspell.rb @@ -0,0 +1,96 @@ +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_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..275057d0127f7 --- /dev/null +++ b/Formula/n/nut.rb @@ -0,0 +1,96 @@ +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.2/nut-2.8.2.tar.gz" + sha256 "e4b4b0cbe7dd39ba9097be7f7d787bb2fffbe35df64dff53b5fe393d659c597d" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "dbfab84f13ae9c17fe130e2230f7dc957bbd1c01e6cb281fdd03d5cc3e82fc6a" + sha256 arm64_sonoma: "43c9c0fc601204d370924ebdfe1a51a68ceec7be66b9cbde21fa748ca705c05f" + sha256 arm64_ventura: "5c56ac1e0389d0991c2c94ed36e3cabb5dbedd8b695fa4a9747add1b3eca5c8f" + sha256 arm64_monterey: "1858aeb052a2b605a7d2ba9f231db1f0d997b9ddeb2da4cabae29520978e57b1" + sha256 sonoma: "98df930592937b8cc3c9ed6137c4e3fc6e920d4b3b0122dbb5cd4ceb0c557f0e" + sha256 ventura: "80b5f09bfb88e4a7ffa611a3b698385fa4c14a3474ae2f3d270a593276dcf106" + sha256 monterey: "17722e1bb6e5e707dc81da194caa13848b035ebf81673261e716d188ef9693c2" + sha256 arm64_linux: "38bfb42d6bfb9cf0d158dcdbdf63e61f42240d391702d9d82365c7ad02b4af09" + sha256 x86_64_linux: "61047b843accc5c9a8b9de7fb525759445b7e30c07f0a682e06eb32724e96ce1" + 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..ed1f6fe51f7bc --- /dev/null +++ b/Formula/n/nutcracker.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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, mojave: "eabbabd68f1627872a910374a15186b3c57c7ef7ebfa99a8d1a32bc15edf2f8a" + 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/formula-patches/0e1ac7ef20e83159554b6522380b1c4b48ce4f2f/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..b44f5bf72b4e0 --- /dev/null +++ b/Formula/n/nuttcp.rb @@ -0,0 +1,40 @@ +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 + + bottle do + 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, mojave: "de0d1395983d9980dfff73de8282b76bf70c987fb36c68ff5e341f245507100a" + sha256 cellar: :any_skip_relocation, high_sierra: "8d9ea3c88d5347b34cc4b3385b6898f942b8e4ff5a4f4a26897e4b66297e2692" + 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..3f8dc7ae37dd3 --- /dev/null +++ b/Formula/n/nuvie.rb @@ -0,0 +1,90 @@ +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 + + bottle do + 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 failure due to default C++17 standard. + # We use C++03 standard as C++11 standard needs upstream fix. + # Ref: https://github.com/nuvie/nuvie/commit/69fb52d35d5eaffcf3bca56929ab58a99defec3d + ENV.append "CXXFLAGS", "-std=c++03" if OS.linux? + + 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..f3d073522aa7b --- /dev/null +++ b/Formula/n/nuxeo.rb @@ -0,0 +1,80 @@ +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 + + bottle do + 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/nvc.rb b/Formula/n/nvc.rb new file mode 100644 index 0000000000000..53511aaecf17c --- /dev/null +++ b/Formula/n/nvc.rb @@ -0,0 +1,67 @@ +class Nvc < Formula + desc "VHDL compiler and simulator" + homepage "https://www.nickg.me.uk/nvc/" + url "https://github.com/nickg/nvc/releases/download/r1.16.1/nvc-1.16.1.tar.gz" + sha256 "47e5a62bf5919829075a18b86d0506b5329d049709bd2e939a7b2814b36b9cce" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "f212f790b7773755f193f24309fc295d5fcee3dc5e7d322a02dd2a9cc512b688" + sha256 arm64_sonoma: "58b27a43bf6abf5bca361454b7acacc98d692f589417903460fae04518a0ba22" + sha256 arm64_ventura: "5af45da380fc4ad9fef063638679e6734cd5b8ba0616921d1575d20072aa194c" + sha256 sonoma: "29f01531b9fc6f54fe496b6c39670adc5f8e1e3d8ea20941d35b44ca97fba775" + sha256 ventura: "a152b8ae5366828795c883149cbb26f9b5e72302a7aef6d52cc6937b8e63d32d" + sha256 arm64_linux: "75f2f85a60c9f5019228e0819269ad752416a05bdc10096a6f5e6369a38e6aac" + sha256 x86_64_linux: "efb90d8fb00572e94e752e2d257bd11bf99e337bb053fccb2bcdee2187bcade7" + 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..f283f3c6c7e79 --- /dev/null +++ b/Formula/n/nvchecker.rb @@ -0,0 +1,64 @@ +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/09/a9/d1ae2b45e798593b31fcc2a9f9aa91df169c8592f03fdddbc0a2a1037f21/nvchecker-2.17.tar.gz" + sha256 "06995aec5a5e81e8ac19796741095609916b6f5bea46dd803e0b0aedb4fa2fb6" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c75e3685064ce5156714f628fd0a778ac51d9f5a3df9971073eaccf9df910475" + sha256 cellar: :any, arm64_sonoma: "0bdcef43afc810b011ba8d26bc73c6c2f5f335fd991d390313fe5161a88430c2" + sha256 cellar: :any, arm64_ventura: "b1e3b628d384309fce5cd6c696855ecbb4e98c6cc394f8464afafaa58fc408a9" + sha256 cellar: :any, sonoma: "f3c1c657166a0e5b205bd0f77afb03742a9547f444950eb8953c79ebcbc92aa0" + sha256 cellar: :any, ventura: "ca5c0620d36e8944cc21d3ec4ebd39a038f1d40e883b59a945b6b596a41796ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "d5ae6c723086420d4ec8fe1908f38564a1201a7d2a91490981de2de313692773" + sha256 cellar: :any_skip_relocation, x86_64_linux: "626bf81b2fd4f36f58e9ea5d5cc2058c9bc778d2f877de91913048c4a2493bad" + end + + depends_on "curl" + depends_on "openssl@3" + depends_on "python@3.13" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + end + + resource "pycurl" do + url "https://files.pythonhosted.org/packages/71/35/fe5088d914905391ef2995102cf5e1892cf32cab1fa6ef8130631c89ec01/pycurl-7.45.6.tar.gz" + sha256 "2b73e66b22719ea48ac08a93fc88e57ef36d46d03cb09d972063c9aa86bb74e6" + end + + resource "structlog" do + url "https://files.pythonhosted.org/packages/78/b8/d3670aec25747e32d54cd5258102ae0d69b9c61c79e7aa326be61a570d0d/structlog-25.2.0.tar.gz" + sha256 "d9f9776944207d1035b8b26072b9b140c63702fd7aa57c2f85d28ab701bd8e92" + end + + resource "tornado" do + url "https://files.pythonhosted.org/packages/59/45/a0daf161f7d6f36c3ea5fc0c2de619746cc3dd4c76402e9db545bd920f63/tornado-6.4.2.tar.gz" + sha256 "92bad5b4746e9879fd7bf1eb21dce4e3fc5128d71601f80005afa39237ad620b" + 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..3595df396ea29 --- /dev/null +++ b/Formula/n/nvi.rb @@ -0,0 +1,99 @@ +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 + + bottle do + 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/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 + + 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..46c46f330266e --- /dev/null +++ b/Formula/n/nvimpager.rb @@ -0,0 +1,44 @@ +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_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..574b10ccf7424 --- /dev/null +++ b/Formula/n/nvtop.rb @@ -0,0 +1,36 @@ +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_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..c98bc95cc8b4d --- /dev/null +++ b/Formula/n/nwchem.rb @@ -0,0 +1,96 @@ +class Nwchem < Formula + desc "High-performance computational chemistry tools" + homepage "https://nwchemgit.github.io/" + url "https://github.com/nwchemgit/nwchem/releases/download/v7.2.3-release/nwchem-7.2.3-release.revision-d690e065-src.2024-08-27.tar.xz" + version "7.2.3" + sha256 "7788e6af9be8681e6384b8df4df5ac57d010b2c7aa50842d735c562d92f94c25" + license "ECL-2.0" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)-release$/i) + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "9e7d38520a012a3b258b13b79d2e21fa1f65c69d6a80e442db8543c301ebf8c4" + sha256 arm64_sonoma: "cbd863d1ffb5625c8551e5bccae2ac62d2d09af075e9e10956033d4e3ddaa2b9" + sha256 arm64_ventura: "7fce8b94f1233bcf022bfaa7456abf9587baeb3319ffc47b725dd83eb1d83b6c" + sha256 cellar: :any, sonoma: "2e2473703a5f2d268135f72189557e4c150059774540e9c89c74b66774a6931f" + sha256 cellar: :any, ventura: "dd0b5829832ca473260b2da63478f93cee2e4bdf388898f0fc546e1f2e2a52f9" + sha256 arm64_linux: "9f72b9c318ebea8a8f992aa16617e1c928d9402a487a5baf48887c6d65c68251" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0aa305807bdecc60ae25c0b3798ea4cc9fa9251be63dda2e7c460351106b393" + 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.13" + depends_on "scalapack" + + uses_from_macos "libxcrypt" + + # fix download url in build_dftd3a.sh, upstream pr ref, https://github.com/nwchemgit/nwchem/pull/1054 + patch do + url "https://github.com/nwchemgit/nwchem/commit/65ce7726d9fa418f7c01665bebfc1e2181f15adf.patch?full_index=1" + sha256 "13410bdadc51ae60e0f6fb3a1ce4dece8a2c97a19c4e59ee027ea8443b6d3f2f" + end + + 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.13" + 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/nyancat.rb b/Formula/n/nyancat.rb new file mode 100644 index 0000000000000..44155727cf50b --- /dev/null +++ b/Formula/n/nyancat.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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, mojave: "6f14b77291021020bc45ea2182063fe16215faee9862786763798362ac664822" + sha256 cellar: :any_skip_relocation, high_sierra: "2272aa5028ca779224f68fd25a3c07ff41c71bb7d14511186808a6b59bfe32c3" + sha256 cellar: :any_skip_relocation, sierra: "413a6ff99b622e60b0878ca74c3051d0feac094a7eb1fa9e90db715735cdd2bf" + sha256 cellar: :any_skip_relocation, el_capitan: "2484fb6eabaaa65a988191b9c2f920d7290bc20f73dbf41e4a996e0306827364" + 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..b20e1ca2d4a18 --- /dev/null +++ b/Formula/n/nylon.rb @@ -0,0 +1,46 @@ +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_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, mojave: "cb2cbfbd8df94b8581a116807075daf9fadbe9b9c5cfa537ea30dfa76537dd5c" + sha256 cellar: :any, high_sierra: "3df9b3197c8dc9a227221027047c8de77ddb6ad9ce2edd14544c2d6e4923b660" + sha256 cellar: :any, sierra: "b7eeab5896aaaca9c73166e519d092a71f15a36e800a28742729f8cbc270e6d8" + 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..95743babbf047 --- /dev/null +++ b/Formula/n/nyx.rb @@ -0,0 +1,87 @@ +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 + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5d7b2a2b86698a16d079eaa5f30e5f21fa0dcef3f356f2532fc3eae3bc8353ef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5d7b2a2b86698a16d079eaa5f30e5f21fa0dcef3f356f2532fc3eae3bc8353ef" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5d7b2a2b86698a16d079eaa5f30e5f21fa0dcef3f356f2532fc3eae3bc8353ef" + sha256 cellar: :any_skip_relocation, sonoma: "c01145218094ee9fe66681f2fef001e7f5f12f15f83506626da97b03de4b7d96" + sha256 cellar: :any_skip_relocation, ventura: "c01145218094ee9fe66681f2fef001e7f5f12f15f83506626da97b03de4b7d96" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e66bd75e96eb2c49a0a6ff381205b7d9639dabda79d2aaa512a4baa7028b224" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d7b2a2b86698a16d079eaa5f30e5f21fa0dcef3f356f2532fc3eae3bc8353ef" + end + + depends_on "python@3.13" + + 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..1dc9f5ecccba8 --- /dev/null +++ b/Formula/n/nzbget.rb @@ -0,0 +1,62 @@ +class Nzbget < Formula + desc "Binary newsgrabber for nzb files" + homepage "https://nzbget.com/" + url "https://github.com/nzbgetcom/nzbget/archive/refs/tags/v25.0.tar.gz" + sha256 "104ebd7b0abed02ae11e968073063df27b0b39d4b62170e5785103a9a10d9999" + license "GPL-2.0-or-later" + head "https://github.com/nzbgetcom/nzbget.git", branch: "develop" + + bottle do + sha256 cellar: :any, arm64_sequoia: "371d055797f59c911e6be17f10eb42112abe701114f5d8f60a4855048ff26d67" + sha256 cellar: :any, arm64_sonoma: "8909eb1f6343e497a84b8978669471eb422449b8474ce1022fe620a68a09a9fa" + sha256 cellar: :any, arm64_ventura: "de057a02a644af8dad13c30511d71bd24c9c73be018c4119587e99a1439ca432" + sha256 sonoma: "6d6a39e4990d42f45c927d09138167d5aef5f24f60e8e541f3807bc60e02aea5" + sha256 ventura: "816f3371545857cadd216e2c3b102ec28ccc5ff63311a514025354a94723f50b" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e88197900adac0cfc6bb08322ac67cac5626dd00cea49080351d8067dd1b73b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec23d3eb13a1763e72658adb7e4a2ef20c802771491e86cc8fea7e70eb6aa366" + 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" + + if OS.mac? + # 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" + # Update 7z cmd to match homebrew binary + inreplace "nzbget.conf", "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 8bb1cf72c714d..0000000000000 --- a/Formula/nacl.rb +++ /dev/null @@ -1,53 +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://deb.debian.org/debian/pool/main/n/nacl/nacl_20110221.orig.tar.bz2" - sha256 "4f277f89735c8b0b8a6bbd043b3efb3fa1cc68a9a5da6a076507d067fc3b3bf8" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "b9fb1445709388168d0e1c56964a7540e8ff4e6294d31eb23c62368ce56e6d1b" => :catalina - 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 = "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/naga.rb b/Formula/naga.rb deleted file mode 100644 index 6e7ac04d780dc..0000000000000 --- a/Formula/naga.rb +++ /dev/null @@ -1,26 +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" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "4a397ca0cf60725415818826e47fbf20c4b9cad2bc754128ece0d50279b715fd" => :catalina - 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 17cf61529f76f..0000000000000 --- a/Formula/nagios-plugins.rb +++ /dev/null @@ -1,47 +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.3.3.tar.gz" - sha256 "07859071632ded58c5135d613438137022232da75f8bdc1687f3f75da2fe597f" - license "GPL-3.0" - head "https://github.com/nagios-plugins/nagios-plugins.git" - - bottle do - cellar :any - sha256 "b90c6f268ed5a5310a797855d87730f016c5d5077fa7b131c929aee042a1ee6c" => :catalina - sha256 "9dc95d628b0ca0e63df426e933f2be374442fa6ea3c6db0ea24ffb5967d098b1" => :mojave - sha256 "873811a29453153cd0ace61f92be73ae33b4a5bec1a4ece13baf128b32250e6e" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "openssl@1.1" - - 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@1.1"].opt_prefix} - ] - - system "./tools/setup" if build.head? - 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/nagios.rb b/Formula/nagios.rb deleted file mode 100644 index 90c46e4da3336..0000000000000 --- a/Formula/nagios.rb +++ /dev/null @@ -1,142 +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.6/nagios-4.4.6.tar.gz" - sha256 "ab0d5a52caf01e6f4dcd84252c4eb5df5a24f90bb7f951f03875eef54f5ab0f4" - license "GPL-2.0" - - bottle do - rebuild 1 - sha256 "a9c2c8baae137bfbfa46f67d62f7fb29a0fb4327b7a366cfe44a1502207d62fd" => :catalina - sha256 "c074419ad5ee9d3446410e7ff05b8454c840771f5cae1246a9de20e33775d4f0" => :mojave - sha256 "162b5d50061d7a2ef4bfa8a9899d7fad3558ccfea80e105c43a66061d1780cd9" => :high_sierra - 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.safe_popen_read("id", "-un").chomp - end - - def group - Utils.safe_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 6c6300e58f5a9..0000000000000 --- a/Formula/nailgun.rb +++ /dev/null @@ -1,40 +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-1.0.1.tar.gz" - sha256 "c05fc01d28c895d0003b8ec6151c10ee38690552dcfaeb304497836f558006d5" - license "Apache-2.0" - head "https://github.com/facebook/nailgun.git" - - bottle do - cellar :any_skip_relocation - sha256 "9e4e7836ebcef4beb89f43ba07ff7e1fffb0765b8843cda5338eca8b34bafed3" => :catalina - sha256 "4cbbab0f095c5f5890ae326e7b88b82b4eefa877afe91a63fa161ea82999ee5d" => :mojave - sha256 "7f5d7051e631b174fd1d7d0c0aea2b957d3b4946e2176828ec687baddaaa4e04" => :high_sierra - end - - depends_on "maven" => :build - depends_on :java => "1.8" - - 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 - port = free_port.to_s - fork { exec "#{bin}/ng-server", port } - sleep 2 - system "#{bin}/ng", "--nailgun-port", port, "ng-version" - system "#{bin}/ng", "--nailgun-port", port, "ng-stop" - end -end diff --git a/Formula/namazu.rb b/Formula/namazu.rb deleted file mode 100644 index a752a6cad8d87..0000000000000 --- a/Formula/namazu.rb +++ /dev/null @@ -1,42 +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" - license "GPL-2.0" - - bottle do - rebuild 1 - sha256 "36353c27b263366bddb893b1ea47ae52e9ea61b18abf068395883868725a5a0c" => :catalina - 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 03b54e1d802a0..0000000000000 --- a/Formula/namebench.rb +++ /dev/null @@ -1,32 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "c958cb3841f9462efd7e2199cad803262dcb3b0b6ab766af53681910090e95e2" => :catalina - 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 642a78764589f..0000000000000 --- a/Formula/nano.rb +++ /dev/null @@ -1,35 +0,0 @@ -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/v4/nano-4.9.3.tar.xz" - sha256 "6e3438f033a0ed07d3d74c30d0803cbda3d2366ba1601b7bbf9b16ac371f51b4" - license "GPL-3.0" - - bottle do - sha256 "199872e5dbe7229dc98f1a4bf2c51a72b37289ba226618a49d065b8c15f4f90c" => :catalina - sha256 "7714d03eed965ed869fefb0140ae7c6accc423664643b85c6abb9e88498af9ca" => :mojave - sha256 "d1e31bd078e9d26b892e7431b4bc1f66e5b297eef8eae8651d25a783563d5363" => :high_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 989c396db7382..0000000000000 --- a/Formula/nanomsg.rb +++ /dev/null @@ -1,34 +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 "81cd453e3fdf65da66a54fda36c84248a1eb923ac92125fd14bdf68989aeb9b7" => :catalina - 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:#{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/nanomsgxx.rb b/Formula/nanomsgxx.rb deleted file mode 100644 index 0da0669d2243a..0000000000000 --- a/Formula/nanomsgxx.rb +++ /dev/null @@ -1,45 +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" - license "MIT" - revision 2 - - bottle do - cellar :any - rebuild 2 - sha256 "3c094b3df14d706b6824d0f0e4ec90e2d6aace65e8f7fe484b38fc51b2fe298f" => :catalina - sha256 "b4e9a2d42d4307ef122c71288afed6662f0db91be922c73324abe6e5a2b08735" => :mojave - sha256 "c48e210289abc4d384fc1139d4565616bb04fbced6f6fae9a6817f2c710ba118" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on :macos # Due to Python 2 - 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 5fab1831d642e..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.4.2.tar.gz" - sha256 "3fae3a8efb61cf06124732fc775088389f259f0c8d85f1ca3330da295282f912" - - bottle do - cellar :any_skip_relocation - sha256 "42459566535f189ab887bc2d8f2a2cb0bdc6b262b56ba9306434d410d2af8c38" => :catalina - sha256 "6bbf097a240a30f9a4560a036d46dc0f10c09f04ca05a45a67430dda911e3397" => :mojave - sha256 "6bbf097a240a30f9a4560a036d46dc0f10c09f04ca05a45a67430dda911e3397" => :high_sierra - end - - depends_on "protobuf" - depends_on "python@3.8" - - 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 python3$}, - "#!/usr/bin/env #{Formula["python@3.8"].opt_bin}/python3" - 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", testpath/"test.pb.c" - system "grep", "Test", 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 5e0c66ec6dae8..0000000000000 --- a/Formula/nasm.rb +++ /dev/null @@ -1,43 +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.15.02/nasm-2.15.02.tar.xz" - sha256 "f4fd1329b1713e1ccd34b2fc121c4bcd278c9f91cc4cb205ae8fcd2e4728dd14" - - bottle do - cellar :any_skip_relocation - sha256 "8bd0bdbfb3471d37857357458dc599650465b53d1661459900f61ef60effe4a1" => :catalina - sha256 "833f4b88e5d32727234e7934d77eebafa661b868bc19dc320fa032ab72e8419a" => :mojave - sha256 "457a1648b0b8447bd693068e10c366dcda1a71dc4ce0f27838520b32db653d01" => :high_sierra - end - - head do - url "https://github.com/netwide-assembler/nasm.git" - 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", "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 163effcb6f503..0000000000000 --- a/Formula/natalie.rb +++ /dev/null @@ -1,29 +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" - license "MIT" - revision 1 - head "https://github.com/krzyzanowskim/Natalie.git" - - bottle do - cellar :any_skip_relocation - sha256 "218ec8bb0ac3ac4de7a6fa8489f3ad7013b1beb051a7c0e74a6e37ade79eee6c" => :catalina - sha256 "9dcc093fc648175eb165aec20413246ace7427d0d3c4a9884d37cfad9a851dca" => :mojave - sha256 "dd51e00a1969ffdd478e954bed48bedd1c5a9813b67931aa146711f49cb58223" => :high_sierra - end - - depends_on :xcode => ["9.4", :build] - - def install - system "swift", "build", "--disable-sandbox", "-c", "release", "--static-swift-stdlib" - bin.install ".build/release/natalie" - share.install "NatalieExample" - end - - test do - generated_code = shell_output("#{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 40aa7fec089c7..0000000000000 --- a/Formula/nativefier.rb +++ /dev/null @@ -1,27 +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-9.0.0.tgz" - sha256 "2743c4c1339c15b8cf7f93ea0532b557ff6cdcc16dc38eeb64d0f7a99e7d997c" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "330bdc626c754bec5d99aee484139c2c5feaa6f5793ef12ad2246e36376bf03d" => :catalina - sha256 "c241951545708abf02ebe88bf208e18aaba9d11e23a4e1b411200d7c17540c92" => :mojave - sha256 "7d74b9bd002ae241140ea4ca2b33dd466dd795f0fb29e28d9e7f80a53f0c9f47" => :high_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-server.rb b/Formula/nats-server.rb deleted file mode 100644 index d582dcecad048..0000000000000 --- a/Formula/nats-server.rb +++ /dev/null @@ -1,61 +0,0 @@ -class NatsServer < Formula - desc "Lightweight cloud messaging system" - homepage "https://nats.io/" - url "https://github.com/nats-io/nats-server/archive/v2.1.7.tar.gz" - sha256 "2e571b8c23c5ba1b083b2b4822bb2b4aca99692112a0cd4212237a92d5aa1e2e" - license "Apache-2.0" - head "https://github.com/nats-io/nats-server.git" - - bottle do - cellar :any_skip_relocation - sha256 "75373587ef838b12f3ace83a39e8987496d551c786711ccd46c4f1d3c038d44c" => :catalina - sha256 "66a6cb75b86ccc17aebd7d1494de0fdf06b880186a0e1cbac2eb131e870cf461" => :mojave - sha256 "2c3f3a8192cc2358a30c0a8d6bccc1bd6faf2f4e49c726dfb8d71606496ea6f1" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"nats-server" - prefix.install_metafiles - end - - plist_options :manual => "nats-server" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/nats-server - - RunAtLoad - - - - EOS - end - - test do - pid = fork do - exec bin/"nats-server", - "--port=8085", - "--pid=#{testpath}/pid", - "--log=#{testpath}/log" - end - sleep 3 - - begin - assert_match version.to_s, shell_output("curl localhost:8085") - assert_predicate testpath/"log", :exist? - ensure - Process.kill "SIGINT", pid - Process.wait pid - end - end -end diff --git a/Formula/nats-streaming-server.rb b/Formula/nats-streaming-server.rb deleted file mode 100644 index 7e46706cc2426..0000000000000 --- a/Formula/nats-streaming-server.rb +++ /dev/null @@ -1,59 +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.18.0.tar.gz" - sha256 "b1127d5317612178b0ba19468066ff3f59212a407fcd88401ffb6c6df9b68d1a" - license "Apache-2.0" - head "https://github.com/nats-io/nats-streaming-server.git" - - bottle do - cellar :any_skip_relocation - sha256 "a06f30c69dd3207cb6d57af4e360228d6e322a5f11da0ee6b953f64a7f8f7c0e" => :catalina - sha256 "35893ee9e92a67a057358be54b30f37ddfb44210feac598e80c0646bd3aec3ff" => :mojave - sha256 "00f582b64e5cf8c8170f0b9fff79a37d82d60d2ac8af18ac5ea703a779924a72" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"nats-streaming-server" - prefix.install_metafiles - 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/nauty.rb b/Formula/nauty.rb deleted file mode 100644 index 428879d4cc6f7..0000000000000 --- a/Formula/nauty.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Nauty < Formula - desc "Automorphism groups of graphs and digraphs" - homepage "https://pallini.di.uniroma1.it/" - url "https://pallini.di.uniroma1.it/nauty27r1.tar.gz" - version "27r1" - sha256 "76ca5d196e402c83a987f90c28ff706bcc5a333bb4a8fbb979a62d3b99c34e77" - - bottle do - cellar :any_skip_relocation - sha256 "5d118260b6fdabceb476c1421e4b4dd41d3027943b623ff7a4dc81baf6e284b9" => :catalina - sha256 "2fa3783663f6e67d9a6e42c492c68412fdeeff7201d81e557b75927ff50b78f1" => :mojave - sha256 "a5333c52eecb023c23be9638ebd916606db43f8f7ef1d7ada4877ca00355d65a" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "all" - - bin.install %w[ - NRswitchg addedgeg amtog assembleg biplabg catg complg converseg - copyg countg cubhamg deledgeg delptg directg dreadnaut dretodot - dretog edgetransg genbg genbgL geng gengL genquarticg genrang - genspecialg gentourng gentreeg hamheuristic labelg linegraphg - listg multig newedgeg pickg planarg ranlabg shortg showg - subdivideg twohamg underlyingg vcolg watercluster2 - ] - - (include/"nauty").install Dir["*.h"] - - lib.install "nauty.a" => "libnauty.a" - - doc.install "nug27.pdf", "README", Dir["*.txt"] - - # Ancillary source files listed in README - pkgshare.install %w[sumlines.c sorttemplates.c bliss2dre.c blisstog.c poptest.c dretodot.c] - end - - test do - # from ./runalltests - out1 = shell_output("#{bin}/geng -ud1D7t 11 2>&1") - out2 = shell_output("#{bin}/genrang -r3 114 100 | #{bin}/countg --nedDr -q") - - 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 <<~EOS - #define MAXN 1000 - #include - - int main() - { - int n = 12345; - int m = SETWORDSNEEDED(n); - nauty_check(WORDSIZE, m, n, NAUTYVERSIONID); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}/nauty", "-L#{lib}", "-lnauty", "-o", "test" - system "./test" - end -end diff --git a/Formula/nave.rb b/Formula/nave.rb deleted file mode 100644 index 06e10ef7cb6fb..0000000000000 --- a/Formula/nave.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Nave < Formula - desc "Virtual environments for Node.js" - homepage "https://github.com/isaacs/nave" - url "https://github.com/isaacs/nave/archive/v3.2.2.tar.gz" - sha256 "a8eb92bb47f6d00326b710f086aea23ae76ceadd277f79256263f524d3540ed1" - license "ISC" - 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/navi.rb b/Formula/navi.rb deleted file mode 100644 index ed474c7a77a39..0000000000000 --- a/Formula/navi.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Navi < Formula - desc "Interactive cheatsheet tool for the command-line" - homepage "https://github.com/denisidoro/navi" - url "https://github.com/denisidoro/navi/archive/v2.7.0.tar.gz" - sha256 "47a6aa786702eb5387e9bc77790749d77240835293982cffc9ba3a329a359c13" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "4bb0a094d284ae344216ff510acab238c0ac9de53d62718736692ddcfa82b4d3" => :catalina - sha256 "d01ac98c9b810e673232f9e56aaa8e3316866d0e3579d7a3ab349fc68cc68f6f" => :mojave - sha256 "05e2b50a3d499792f11f3faa95afb74e4c4d3b1556a6ab53b65f43cbb62ff1f2" => :high_sierra - end - - depends_on "rust" => :build - depends_on "fzf" - - 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 best foo") - end -end diff --git a/Formula/nbdime.rb b/Formula/nbdime.rb deleted file mode 100644 index 9deff83652149..0000000000000 --- a/Formula/nbdime.rb +++ /dev/null @@ -1,374 +0,0 @@ -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/92/84/6358505bef11c164fce3b747b4193ec9d9617cb2db9bb6c60c9f6d30109c/nbdime-2.0.0.tar.gz" - sha256 "896f79a23557f190b73a3981fdceb128a2d24454701daef74d82aac2aa10715d" - - bottle do - cellar :any_skip_relocation - sha256 "bc9d3b4ad550bd9f907b54e13a7879661da04102cd689abe87dc8f7e4a31b93b" => :catalina - sha256 "2f73b31f7e365e8680cc146bbd53445e0c24996127e7d3c3d1fe9d945ea52959" => :mojave - sha256 "3d5a18f4e22e1d704d23a3dbafed19261d2b0bc74036443fff65c6038b7c3dc9" => :high_sierra - end - - depends_on "python@3.8" - - resource "appnope" do - url "https://files.pythonhosted.org/packages/26/34/0f3a5efac31f27fabce64645f8c609de9d925fe2915304d1a40f544cff0e/appnope-0.1.0.tar.gz" - sha256 "8b995ffe925347a2138d7ac0fe77155e4311a0ea6d6da4f5128fe4b3cbe5ed71" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "backcall" do - url "https://files.pythonhosted.org/packages/84/71/c8ca4f5bb1e08401b916c68003acf0a0655df935d74d93bf3f3364b310e0/backcall-0.1.0.tar.gz" - sha256 "38ecd85be2c1e78f77fd91700c76e14667dc21e2713b63876c0eb901196e01e4" - end - - resource "bleach" do - url "https://files.pythonhosted.org/packages/3f/63/8665338373efc632dc60de6526460ba33fa21bae1eaa5e4f37159ca38e94/bleach-3.1.4.tar.gz" - sha256 "e78e426105ac07026ba098f04de8abe9b6e3e98b5befbf89b51a5ef0a4292b03" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "defusedxml" do - url "https://files.pythonhosted.org/packages/a4/5f/f8aa58ca0cf01cbcee728abc9d88bfeb74e95e6cb4334cfd5bed5673ea77/defusedxml-0.6.0.tar.gz" - sha256 "f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5" - end - - resource "entrypoints" do - url "https://files.pythonhosted.org/packages/b4/ef/063484f1f9ba3081e920ec9972c96664e2edb9fdc3d8669b0e3b8fc0ad7c/entrypoints-0.3.tar.gz" - sha256 "c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451" - end - - resource "gitdb" do - url "https://files.pythonhosted.org/packages/bc/f2/a2191834e7f9bb34ff14a0c2db90d2bf8510cf74fa395544c9f10731dc25/gitdb-4.0.4.tar.gz" - sha256 "6f0ecd46f99bb4874e5678d628c3a198e2b4ef38daea2756a2bfd8df7dd5c1a5" - end - - resource "gitdb2" do - url "https://files.pythonhosted.org/packages/97/97/6ad081c9f3efa1545fd11149f14602a53e2003c153312c8bfa825ba27b89/gitdb2-4.0.2.tar.gz" - sha256 "0986cb4003de743f2b3aba4c828edd1ab58ce98e1c4a8acf72ef02760d4beb4e" - end - - resource "GitPython" do - url "https://files.pythonhosted.org/packages/ac/3d/9fe11d9cf14b49553e8e35a4dce360e18f25f964638b631dc5b9ca23a88f/GitPython-3.1.1.tar.gz" - sha256 "6d4f10e2aaad1864bb0f17ec06a2c2831534140e5883c350d58b4e85189dab74" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "importlib-metadata" do - url "https://files.pythonhosted.org/packages/b4/1b/baab42e3cd64c9d5caac25a9d6c054f8324cdc38975a44d600569f1f7158/importlib_metadata-1.6.0.tar.gz" - sha256 "34513a8a0c4962bc66d35b359558fd8a5e10cd472d37aec5f66858addef32c1e" - end - - resource "ipykernel" do - url "https://files.pythonhosted.org/packages/6a/1a/6b15e6086f869d9367ed1289ea190b61382768624c4eb80c3419e5cb5e88/ipykernel-5.2.0.tar.gz" - sha256 "37c65d2e2da3326e5cf114405df6d47d997b8a3eba99e2cc4b75833bf71a5e18" - end - - resource "ipython" do - url "https://files.pythonhosted.org/packages/76/d4/13001e8671e8b012ec25acb9a695d3271ceed2dc6aa8f94103a6dd0c4577/ipython-7.13.0.tar.gz" - sha256 "ca478e52ae1f88da0102360e57e528b92f3ae4316aabac80a2cd7f7ab2efb48a" - end - - resource "ipython_genutils" do - url "https://files.pythonhosted.org/packages/e8/69/fbeffffc05236398ebfcfb512b6d2511c622871dca1746361006da310399/ipython_genutils-0.2.0.tar.gz" - sha256 "eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8" - end - - resource "jedi" do - url "https://files.pythonhosted.org/packages/5a/b7/d7bdce4e0ae654125404b397b293ec8a0060a55c9e860794538701b19653/jedi-0.16.0.tar.gz" - sha256 "d5c871cb9360b414f981e7072c52c33258d598305280fef91c6cae34739d65d5" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/d8/03/e491f423379ea14bb3a02a5238507f7d446de639b623187bccc111fbecdf/Jinja2-2.11.1.tar.gz" - sha256 "93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" - sha256 "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" - end - - resource "jupyter-client" do - url "https://files.pythonhosted.org/packages/5e/f2/29dc6ef4c734cdad56ae15dd50af00c2804ed2f1271c5b2413d0ae6ad091/jupyter_client-6.1.2.tar.gz" - sha256 "5724827aedb1948ed6ed15131372bc304a8d3ad9ac67ac19da7c95120d6b17e0" - end - - resource "jupyter-core" do - url "https://files.pythonhosted.org/packages/28/64/8bdde111be57a2a3d54376db29b5f25ab9c68ffd3d6554989db24d5c1b7a/jupyter_core-4.6.3.tar.gz" - sha256 "394fd5dd787e7c8861741880bdf8a00ce39f95de5d18e579c74b882522219e7e" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "mistune" do - url "https://files.pythonhosted.org/packages/2d/a4/509f6e7783ddd35482feda27bc7f72e65b5e7dc910eca4ab2164daf9c577/mistune-0.8.4.tar.gz" - sha256 "59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e" - end - - resource "more-itertools" do - url "https://files.pythonhosted.org/packages/a0/47/6ff6d07d84c67e3462c50fa33bf649cda859a8773b53dc73842e84455c05/more-itertools-8.2.0.tar.gz" - sha256 "b1ddb932186d8a6ac451e1d95844b382f55e12686d51ca0c68b6f61f2ab7a507" - end - - resource "nbconvert" do - url "https://files.pythonhosted.org/packages/04/f2/299fa4b15155ecbe2aefe7412249f0dd91f953b7a9b37c336317d564a1ca/nbconvert-5.6.1.tar.gz" - sha256 "21fb48e700b43e82ba0e3142421a659d7739b65568cc832a13976a77be16b523" - end - - resource "nbformat" do - url "https://files.pythonhosted.org/packages/7b/55/21fa0554181db56f28b51171e14e90cf0aa2bbc9b3a6252ca437d67fed9b/nbformat-5.0.5.tar.gz" - sha256 "f0c47cf93c505cb943e2f131ef32b8ae869292b5f9f279db2bafb35867923f69" - end - - resource "notebook" do - url "https://files.pythonhosted.org/packages/a9/c8/77ab314f1a0102c50762efcc2b58be99780ddffb88bcd5820e2715e1799e/notebook-6.0.3.tar.gz" - sha256 "47a9092975c9e7965ada00b9a20f0cf637d001db60d241d479f53c0be117ad48" - end - - resource "pandocfilters" do - url "https://files.pythonhosted.org/packages/4c/ea/236e2584af67bb6df960832731a6e5325fd4441de001767da328c33368ce/pandocfilters-1.4.2.tar.gz" - sha256 "b3dd70e169bb5449e6bc6ff96aea89c5eea8c5f6ab5e207fc2f521a2cf4a0da9" - end - - resource "parso" do - url "https://files.pythonhosted.org/packages/e7/43/d1a87101b7d738ffae32951c140fcbca12b35daf11a918e0964a2fd07fbd/parso-0.6.2.tar.gz" - sha256 "0c5659e0c6eba20636f99a04f469798dca8da279645ce5c387315b2c23912157" - end - - resource "pexpect" do - url "https://files.pythonhosted.org/packages/e5/9b/ff402e0e930e70467a7178abb7c128709a30dfb22d8777c043e501bc1b10/pexpect-4.8.0.tar.gz" - sha256 "fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" - end - - resource "pickleshare" do - url "https://files.pythonhosted.org/packages/d8/b6/df3c1c9b616e9c0edbc4fbab6ddd09df9535849c64ba51fcb6531c32d4d8/pickleshare-0.7.5.tar.gz" - sha256 "87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca" - end - - resource "prometheus_client" do - url "https://files.pythonhosted.org/packages/b3/23/41a5a24b502d35a4ad50a5bb7202a5e1d9a0364d0c12f56db3dbf7aca76d/prometheus_client-0.7.1.tar.gz" - sha256 "71cd24a2b3eb335cb800c7159f423df1bd4dcd5171b234be15e3f31ec9f622da" - end - - resource "prompt_toolkit" do - url "https://files.pythonhosted.org/packages/69/19/3aa4bf17e1cbbdfe934eb3d5b394ae9a0a7fb23594a2ff27e0fdaf8b4c59/prompt_toolkit-3.0.5.tar.gz" - sha256 "563d1a4140b63ff9dd587bda9557cffb2fe73650205ab6f4383092fb882e7dc8" - end - - resource "ptyprocess" do - url "https://files.pythonhosted.org/packages/7d/2d/e4b8733cf79b7309d84c9081a4ab558c89d8c89da5961bf4ddb050ca1ce0/ptyprocess-0.6.0.tar.gz" - sha256 "923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "pyrsistent" do - url "https://files.pythonhosted.org/packages/9f/0d/cbca4d0bbc5671822a59f270e4ce3f2195f8a899c97d0d5abb81b191efb5/pyrsistent-0.16.0.tar.gz" - sha256 "28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pyzmq" do - url "https://files.pythonhosted.org/packages/16/4c/762c2c3063c4d45baf4a49acea7a4f561f7b78a45cd04b58d63f4c5f6b8d/pyzmq-19.0.0.tar.gz" - sha256 "5e1f65e576ab07aed83f444e201d86deb01cd27dcf3f37c727bc8729246a60a8" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "Send2Trash" do - url "https://files.pythonhosted.org/packages/13/2e/ea40de0304bb1dc4eb309de90aeec39871b9b7c4bd30f1a3cdcb3496f5c0/Send2Trash-1.5.0.tar.gz" - sha256 "60001cc07d707fe247c94f74ca6ac0d3255aabcb930529690897ca2a39db28b2" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "smmap" do - url "https://files.pythonhosted.org/packages/89/2f/8902ee436e7e24e059973f9d7cbc1a433df10c93239f59c1d8539a86a6a5/smmap-3.0.2.tar.gz" - sha256 "b46d3fc69ba5f367df96d91f8271e8ad667a198d5a28e215a6c3d9acd133a911" - end - - resource "smmap2" do - url "https://files.pythonhosted.org/packages/88/77/b1542b654fa594580fa82a1e0af4bf81074323d272a50a838c943e3de7b4/smmap2-3.0.1.tar.gz" - sha256 "44cc8bdaf96442dbb9a8e2e14377d074b3d0eea292eee3c95c8c449b6c92c557" - end - - resource "terminado" do - url "https://files.pythonhosted.org/packages/13/5b/57e995382718d176aba6168632bd15cf5371a7b1205c83a7e4aae0bc6c2e/terminado-0.8.3.tar.gz" - sha256 "4804a774f802306a7d9af7322193c5390f1da0abb429e082a10ef1d46e6fb2c2" - end - - resource "testpath" do - url "https://files.pythonhosted.org/packages/2c/b3/5d57205e896d8998d77ad12aa42ebce75cd97d8b9a97d00ba078c4c9ffeb/testpath-0.4.4.tar.gz" - sha256 "60e0a3261c149755f4399a1fff7d37523179a70fdc3abdf78de9fc2604aeec7e" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/95/84/119a46d494f008969bf0c775cb2c6b3579d3c4cc1bb1b41a022aa93ee242/tornado-6.0.4.tar.gz" - sha256 "0fe2d45ba43b00a41cd73f8be321a44936dc1aba233dee979f17a042b83eb6dc" - end - - resource "traitlets" do - url "https://files.pythonhosted.org/packages/75/b0/43deb021bc943f18f07cbe3dac1d681626a48997b7ffa1e7fb14ef922b21/traitlets-4.3.3.tar.gz" - sha256 "d023ee369ddd2763310e4c3eae1ff649689440d4ae59d7485eb4cfbbe3e359f7" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" - sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" - end - - resource "webencodings" do - url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" - sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" - end - - resource "zipp" do - url "https://files.pythonhosted.org/packages/ce/8c/2c5f7dc1b418f659d36c04dec9446612fc7b45c8095cc7369dd772513055/zipp-3.1.0.tar.gz" - sha256 "c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"old.ipynb").write <<~EOS - { - "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 - } - EOS - (testpath/"new.ipynb").write <<~EOS - { - "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 - } - EOS - # 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/nbimg.rb b/Formula/nbimg.rb deleted file mode 100644 index 5a15037f681c8..0000000000000 --- a/Formula/nbimg.rb +++ /dev/null @@ -1,33 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "50cafca29cd1fb950794b9f240da2813dbd7dc682dfdb8c75c091cdc9666737e" => :catalina - 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 e67f30dd2ae34..0000000000000 --- a/Formula/ncdc.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Ncdc < Formula - desc "NCurses direct connect" - homepage "https://dev.yorhel.nl/ncdc" - url "https://dev.yorhel.nl/download/ncdc-1.22.1.tar.gz" - sha256 "d15fd378aa345f423e59a38691c668f69b516cd4b8afbbcdc446007740c3afad" - license "MIT" - - bottle do - cellar :any - sha256 "2f074f7eb6aa1a1d0024e1f900315cb4bd056ad711c0f504acb160714e07597a" => :catalina - sha256 "4490571bb2101e00e3edc39ab25baf75a63dfd9617381ae0f102a274a2fbf622" => :mojave - sha256 "bd143dd032839762597253796c562607e43c654c128d4f4162fd382fd660dbfd" => :high_sierra - sha256 "59f5011b9c39b78c75a2bf5d93ae398a16660852a3b8fd8ed3a3389ea463fbf7" => :sierra - 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 "ncurses" - 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 80f2b8309139b..0000000000000 --- a/Formula/ncdu.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Ncdu < Formula - desc "NCurses Disk Usage" - homepage "https://dev.yorhel.nl/ncdu" - url "https://dev.yorhel.nl/download/ncdu-1.15.1.tar.gz" - sha256 "b02ddc4dbf1db139cc6fbbe2f54a282770380f0ca5c17089855eab52a9ea3fb0" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "994f7f4e9624a0984ec7c37b5b15b9ae5c24663ebffaba19b0979f4e99919fee" => :catalina - sha256 "f7908eaf47c7842b15e56e17279583f4c938a9c920e1bae41f05d3e5506a99fb" => :mojave - sha256 "d094385dbfd71831c5f2b03f0817a06df9471a44f5437aaf577676d2723bc865" => :high_sierra - end - - head do - url "https://g.blicky.net/ncdu.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - uses_from_macos "ncurses" - - 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 ad925eed2e429..0000000000000 --- a/Formula/ncftp.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Ncftp < Formula - desc "FTP client with an advanced user interface" - homepage "https://www.ncftp.com/" - url "https://mirrorservice.org/sites/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 "4082ca1bf2427d1780e0ebcf96b1d90d78630544a318ef94808ba003bfb49f47" => :catalina - 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 e4044981a96de..0000000000000 --- a/Formula/ncmpc.rb +++ /dev/null @@ -1,39 +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.38.tar.xz" - sha256 "2bc1aa38aacd23131895cd9aa3abd9d1ca5700857034d9f35209e13e061e27a2" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "ca880e781bb617e6fbbcfb70168ac8939b8b5a04bbc24128d68bb9450b4af498" => :catalina - sha256 "aacbb298f4ceb0911d117babf04e5ce7e2dc17f8999805bc40cd784c256814be" => :mojave - sha256 "7891f4939522591774bdeab323a49c53f3f0742f64eed19389ece06762b2beec" => :high_sierra - end - - depends_on "boost" => :build - 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 "libmpdclient" - depends_on "pcre" - - fails_with :clang do - build 800 - cause "error: no matching constructor for initialization of 'value_type'" - end - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Dcolors=false", "-Dnls=disabled", ".." - 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 d2b6b59349e1e..0000000000000 --- a/Formula/ncmpcpp.rb +++ /dev/null @@ -1,58 +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 10 - - bottle do - cellar :any - sha256 "39f724cd65b57fa561ce5a5dab21e96269042d4ca921f827847de0d5890d41cd" => :catalina - sha256 "ee143c268becf7473de485dbd5b27e6a3b0fac5ed7145cb745370ac501eba990" => :mojave - sha256 "787aafd5fac18afb95cf1fef68e6484973d808c3e2b35e66163d5c7112aee937" => :high_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" - - 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 c5ae54df22152..0000000000000 --- a/Formula/nco.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Nco < Formula - desc "Command-line operators for netCDF and HDF files" - homepage "https://nco.sourceforge.io/" - url "https://github.com/nco/nco/archive/4.9.3.tar.gz" - sha256 "eade5b79f3814b11ae3f52c34159567e76a73f05f0ab141eccaac68f0ca94aee" - - bottle do - cellar :any - sha256 "d5e36895012c95cd251850c78603e44e8abc31cc7f728046fbf49a3e29d6aac9" => :catalina - sha256 "dbb85ca7a1fce56f687bded4da9a1cf22dc9a2e2f9cd3e13c80711f86c1b416d" => :mojave - sha256 "e7a71fa592453f83a04c696e4314347199a233109a2b6b0a95f3697f25ae192c" => :high_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 62ca189ac59d7..0000000000000 --- a/Formula/ncompress.rb +++ /dev/null @@ -1,26 +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.6.tar.gz" - sha256 "fb7b6a00060bd4c6e35ba4cc96a5ca7e78c193e6267487dd53376d80e061836b" - head "https://github.com/vapier/ncompress.git" - - bottle do - cellar :any_skip_relocation - sha256 "cc232677371ee83d7af62598553c028e11071e309d8620818965b94d2a43b9a4" => :catalina - sha256 "c5d28fad3558616e2347c16a3aa8a353c7c5b0317c175a1b99e5d6e0f6bae736" => :mojave - sha256 "b1fa7c42647c420dd48849ad9fb0f05da911ef3bec9459f9ba3892de2d05a58b" => :high_sierra - 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 705b82d808406..0000000000000 --- a/Formula/ncp.rb +++ /dev/null @@ -1,44 +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 "26d9db0b0da97a1556e5b20afd08c82be35fd7f8530ab63110d83fb1ba542ac2" => :catalina - 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 61d0bd4ec6024..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/0.7.tar.gz" - sha256 "f3f971cd677c4a0c0668cb369002c581d305050b3b0411e18dd3cb9cc270d14a" - head "https://github.com/nmap/ncrack.git" - - bottle do - sha256 "8b37ec44db091fce2d12844eb369f94adf96b21775da7265bd1aca9b9bdbc9f2" => :catalina - sha256 "b323c29b588f397487e74ee9e7312a8344a4b4c728043cf825838a0e19c58c17" => :mojave - sha256 "297c3ca427025e5e07a435e8c46f96846c10c88a3a19eaf432639d05c1e82d12" => :high_sierra - sha256 "5f1be0ae0ed5b38dc19ff32b4b157b81929bbfa2e8ebf524f0406a5dca962fc2" => :sierra - end - - depends_on "openssl@1.1" - - 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 505d0054b66b0..0000000000000 --- a/Formula/ncurses.rb +++ /dev/null @@ -1,72 +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.2.tar.gz" - mirror "https://ftpmirror.gnu.org/ncurses/ncurses-6.2.tar.gz" - sha256 "30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d" - - bottle do - sha256 "eae51ad3391edafe3d6c649ba44f607ee1464b4b5d9ee48770e9817ee5f0ccdd" => :catalina - sha256 "1771e0ce821cf8cbe38d0ce8d1843fd559532923222edc5dbf5b31fcf24fed90" => :mojave - sha256 "4648be8457b081026d3da80f290abaf3fbfdcb49d62914861a63fc706f9adabe" => :high_sierra - 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" - (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/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 2525be4aafd34..0000000000000 --- a/Formula/ncview.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Ncview < Formula - desc "Visual browser for netCDF format files" - homepage "https://cirrus.ucsd.edu/ncview/" - url "ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.8.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/ncview-2.1.8.tar.gz" - sha256 "e8badc507b9b774801288d1c2d59eb79ab31b004df4858d0674ed0d87dfc91be" - revision 3 - - bottle do - sha256 "0a1594bb793189d1359cbd800e44d830cc9cf39b713d71128d41323b284e687a" => :catalina - sha256 "d0b8e9fb871edf26633325c7309269689d0b4bd858f16a45527230dc16533abf" => :mojave - sha256 "5511d243f73fd1a7867bb4dd0263afe215dd0e4e29ef77199efee5db08c2d207" => :high_sierra - end - - depends_on "libpng" - 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 071c7a654ce20..0000000000000 --- a/Formula/ndiff.rb +++ /dev/null @@ -1,35 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "0998b523aa16873d2ed4d776d29df511154e941ffba972d7560176c82add4515" => :catalina - 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 bf682fe5aaa40..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/3.2.tar.gz" - sha256 "6808c8c4495343e67863f4d30bb261c1e2daec5628ae0be257ba2a2dea7ec70a" - license "LGPL-3.0" - revision 1 - head "https://github.com/ntop/nDPI.git", :branch => "dev" - - bottle do - cellar :any - sha256 "51abcf1acf93e23b6c9ac4394546b3c4cf10728ab4ddaeeedfb1113652c4df5d" => :catalina - sha256 "022d0450ad519fb8bab4399ad40cef22421162b44b138e4279cdc1588f49c985" => :mojave - sha256 "e5dd2608031a9fee47f714c8795b013c645c05ad573d64fdd603accc9c878a1a" => :high_sierra - 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 824cf30f3ed48..0000000000000 --- a/Formula/ne.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Ne < Formula - desc "The nice editor" - homepage "https://github.com/vigna/ne" - url "https://github.com/vigna/ne/archive/3.3.0.tar.gz" - sha256 "77a0c8e8564a29cd18069eebf04cee4855fae183f1e8f25d5fbb0c2651f07e6c" - license "GPL-3.0" - head "https://github.com/vigna/ne.git" - - bottle do - sha256 "9c247087abcddef37c90d601611a7473b871d411340b4af1e72660fa60e829e2" => :catalina - sha256 "f7eb99d6a26252a621d18ec846920df9319b33c78053771bae8e39eb1997333f" => :mojave - sha256 "5de11e9bf7bd2cc2d703a61ba43f154fcf93534a76d195627902061cdf70b6bc" => :high_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/neatvi.rb b/Formula/neatvi.rb deleted file mode 100644 index 576146f1d8524..0000000000000 --- a/Formula/neatvi.rb +++ /dev/null @@ -1,24 +0,0 @@ -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 => "08", - :revision => "49e4029728927afb1a22864698be10cf445413aa" - head "https://repo.or.cz/neatvi.git" - - bottle do - cellar :any_skip_relocation - sha256 "c2c83bfb47a438d99fb7086a756292a4442dfb1d7eebd0314132814201cd944e" => :catalina - sha256 "240fb8ec097a95ed3bb86f02f6f3fbd074b671529055009835eb95c6f2dccc6d" => :mojave - sha256 "4244c126297140059a43449c435407de2d041486bc56ea44bd2d324649304818" => :high_sierra - end - - def install - system "make" - bin.install "vi" => "neatvi" - end - - test do - pipe_output("#{bin}/neatvi", ":q\n") - end -end diff --git a/Formula/nebula.rb b/Formula/nebula.rb deleted file mode 100644 index 6e557e8a25dff..0000000000000 --- a/Formula/nebula.rb +++ /dev/null @@ -1,69 +0,0 @@ -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/v1.2.0.tar.gz" - sha256 "1d00594d74e147406f5809380860f538ceed5c19c3f390dd1d8e364f99b303b6" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "4a8afd93fe529dae21fdbd7a9fa25d0aee5411b1601563f660bbd4b539488645" => :catalina - sha256 "71d30d68a8a92cd82a522348010020a358e50487571f0e147deb89d1afefdadb" => :mojave - sha256 "ed3fa03a2fe956c9cf610d17a8df6b60e3d75508c15dc3fd46c47cd7decf2967" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["BUILD_NUMBER"] = version - system "make", "bin" - bin.install "./nebula" - bin.install "./nebula-cert" - prefix.install_metafiles - end - - plist_options :startup => true - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/nebula - -config - #{etc}/nebula/config.yml - - StandardErrorPath - #{var}/log/nebula.log - StandardOutPath - #{var}/log/nebula.log - RunAtLoad - - KeepAlive - - NetworkState - - - - - EOS - 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 <<~EOS - pki: - ca: #{testpath}/ca.crt - cert: #{testpath}/host.crt - key: #{testpath}/host.key - EOS - system "#{bin}/nebula", "-test", "-config", "config.yml" - end -end diff --git a/Formula/nedit.rb b/Formula/nedit.rb deleted file mode 100644 index 7a336ebd09235..0000000000000 --- a/Formula/nedit.rb +++ /dev/null @@ -1,36 +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" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "94f8ffca9fa3ac5376460da0b2b74bd835f8fecd6bbfaf009925492902f9fa29" => :catalina - sha256 "c4f3db1d3a4772caf72caeba2f4dbdcd063d8983d5252f763870dcea70eaf59e" => :mojave - sha256 "74a4e728ef503642b5ad4dc4466f26a2d6f241e7d495099c8b14defd4e12f350" => :high_sierra - 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/needle.rb b/Formula/needle.rb deleted file mode 100644 index 7248c7c4e3108..0000000000000 --- a/Formula/needle.rb +++ /dev/null @@ -1,25 +0,0 @@ -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.git", - :tag => "v0.15.0", - :revision => "f2bf540f14d671ad809548bcaea87cea21782d8f" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "81c7cf7764f4a7293c96b9c3251d2f462ce278504631135f0288a5a2b4ea3956" => :catalina - sha256 "38800eea19a89fcecdfe57fd7fc2fce85d4f1dfbe3b29437794d34b5523df32d" => :mojave - end - - depends_on :xcode => ["11.3", :build] - depends_on :xcode => "6.0" - - def install - system "make", "install", "BINARY_FOLDER_PREFIX=#{prefix}" - end - - test do - assert_match version.to_s, shell_output("#{bin}/needle version") - end -end diff --git a/Formula/nef.rb b/Formula/nef.rb deleted file mode 100644 index ae386263dec95..0000000000000 --- a/Formula/nef.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Nef < Formula - desc "💊 steroids for Xcode Playgrounds" - homepage "https://nef.bow-swift.io/" - url "https://github.com/bow-swift/nef/archive/0.6.1.tar.gz" - sha256 "182d5f91e3048f046a63bf81d148f94acc7c667b5314cf76f36a9fb75efdb3a7" - - bottle do - cellar :any_skip_relocation - sha256 "db1f3b419794b096f913f805f08b56e0f51cb01cfa20d4a8bfd77cc6ae1f236c" => :catalina - end - - depends_on :xcode => "11.4" - - 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_exist "#{testpath}/nef/library/apis.md", :exist? - 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 33ced308dc36f..0000000000000 --- a/Formula/neko.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Neko < Formula - desc "High-level, dynamically typed programming language" - homepage "https://nekovm.org/" - url "https://github.com/HaxeFoundation/neko/archive/v2-3-0/neko-2.3.0.tar.gz" - sha256 "850e7e317bdaf24ed652efeff89c1cb21380ca19f20e68a296c84f6bad4ee995" - revision 1 - head "https://github.com/HaxeFoundation/neko.git" - - bottle do - cellar :any - rebuild 2 - sha256 "f101a4304c00fef7c7bbe59cc3e13c29bdfd0c8fc6d0675143011157eb3a245b" => :catalina - sha256 "1e6101a96f295482f8b4c427ddb4aec296bcf4d43e28f7c004a6b8a14aa8658a" => :mojave - sha256 "2bca5474e29dae508cf5095f695fa8348f8b599233ed299b3c693aa02e7f8087" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "bdw-gc" - depends_on "mbedtls" - depends_on "openssl@1.1" - depends_on "pcre" - - def install - inreplace "libs/mysql/CMakeLists.txt", - %r{https://downloads.mariadb.org/f/}, - "https://downloads.mariadb.com/Connectors/c/" - - # 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-client. - 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" - (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/neo4j.rb b/Formula/neo4j.rb deleted file mode 100644 index 213cff9381185..0000000000000 --- a/Formula/neo4j.rb +++ /dev/null @@ -1,82 +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-4.1.0-unix.tar.gz" - sha256 "b598edeb3401e5ec40fb7bc3370307addfcaa21565f731016c9c7f8e70af659a" - - 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 - # As of v4.1.0, neo4j still needs to build with java 1.8 - # https://github.com/neo4j/neo4j/issues/12516 - 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 - dbms.directories.data=#{var}/neo4j/data - dbms.directories.logs=#{var}/log/neo4j - EOS - end - - def post_install - (var/"log/neo4j").mkpath - (var/"neo4j").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 3653fbdb35406..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/7.0.0.tar.gz" - sha256 "8c6bd217cf6d34fc1f3dcbb0e8b1137655bc13fbb21165273dbb2a7bce0d3130" - license "MIT" - head "https://github.com/dylanaraps/neofetch.git" - - bottle do - cellar :any_skip_relocation - sha256 "bfb4c9f42eee7659b0028a7d4de28524d5a6eb8f1199f83789fa0242b37c456e" => :catalina - sha256 "bfb4c9f42eee7659b0028a7d4de28524d5a6eb8f1199f83789fa0242b37c456e" => :mojave - sha256 "bfb4c9f42eee7659b0028a7d4de28524d5a6eb8f1199f83789fa0242b37c456e" => :high_sierra - 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 23cefeb34626b..0000000000000 --- a/Formula/neomutt.rb +++ /dev/null @@ -1,46 +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/20200626.tar.gz" - sha256 "94b2e59667a080cb9d531050c3ad320f9951ba7ba09eb7eda15427899627f89e" - license "GPL-2.0" - head "https://github.com/neomutt/neomutt.git" - - bottle do - sha256 "d1f6edf36d492185a4f8fa35296c9176862641939bef9335d00773c69359b242" => :catalina - sha256 "03ca3d480c10bc301cd37b58d88700129d747be4250333b10654280af6602b8b" => :mojave - sha256 "d7834ff5bcf0b475d2794e8b83ec16de4e4ba25981afc98a78143b3cd7696e18" => :high_sierra - end - - depends_on "docbook-xsl" => :build - depends_on "gettext" - depends_on "gpgme" - depends_on "libidn" - depends_on "lmdb" - depends_on "lua" - depends_on "notmuch" - depends_on "openssl@1.1" - depends_on "tokyo-cabinet" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "./configure", "--prefix=#{prefix}", - "--enable-gpgme", - "--with-gpgme=#{Formula["gpgme"].opt_prefix}", - "--gss", - "--lmdb", - "--notmuch", - "--sasl", - "--tokyocabinet", - "--with-ssl=#{Formula["openssl@1.1"].opt_prefix}", - "--with-ui=ncurses", - "--lua", - "--with-lua=#{Formula["lua"].prefix}" - system "make", "install" - end - - test do - output = shell_output("#{bin}/neomutt -F /dev/null -Q debug_level") - assert_equal "set debug_level = 0", output.chomp - end -end diff --git a/Formula/neon.rb b/Formula/neon.rb deleted file mode 100644 index ce22406f8b34b..0000000000000 --- a/Formula/neon.rb +++ /dev/null @@ -1,48 +0,0 @@ -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.31.2.tar.gz" - mirror "https://fossies.org/linux/www/neon-0.31.2.tar.gz" - sha256 "cf1ee3ac27a215814a9c80803fcee4f0ede8466ebead40267a9bd115e16a8678" - - bottle do - cellar :any - sha256 "4cb9cac535f8d40ca71c0bb04fe2baa24f929685d06caf71311d285933ac0828" => :catalina - sha256 "3aef45d339688bda9dd7dc6682bebb97f8c0eb349a0ebb9a92d92e01635a5f75" => :mojave - sha256 "e1a66cf7af9daade4ce304c14b11b797610f448f194306e996ffacab04c2af5d" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - # 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@1.1"].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 26c6af41eb1fa..0000000000000 --- a/Formula/neopop-sdl.rb +++ /dev/null @@ -1,42 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "c4bd22db58945139a07d7c007c546e2edb3be1c3763f2d3f3008b575f30cef84" => :catalina - 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 e838e25c27a8e..0000000000000 --- a/Formula/neovim.rb +++ /dev/null @@ -1,111 +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.4.3.tar.gz" - sha256 "91a0b5d32204a821bf414690e6b48cf69224d1961d37158c2b383f6a6cf854d2" - - bottle do - sha256 "389ab254794ea04df8a106bf281c227c4fdee27c609d52951f32b9a0239031d6" => :catalina - sha256 "fb6cc38c45be4650a4a750a314cec27f6f7643dc7c22a1f5abae347e1b39b388" => :mojave - sha256 "b2f7450e005f4eb22bfaf650fe7741fa8629393a947b4dd48c9f91e7fc258113" => :high_sierra - end - - head do - url "https://github.com/neovim/neovim.git" - depends_on "utf8proc" - end - - depends_on "cmake" => :build - depends_on "luarocks" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "libtermkey" - depends_on "libuv" - depends_on "libvterm" - depends_on "luajit" - depends_on "msgpack" - depends_on "unibilium" - - 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 "lpeg" do - url "https://luarocks.org/manifests/gvvaughan/lpeg-1.0.2-1.src.rock" - sha256 "e0d0d687897f06588558168eeb1902ac41a11edd1b58f1aa61b99d0ea0abbfbc" - end - - resource "inspect" do - url "https://luarocks.org/manifests/kikito/inspect-3.1.1-0.src.rock" - sha256 "ea1f347663cebb523e88622b1d6fe38126c79436da4dbf442674208aa14a8f4c" - end - - resource "lua-compat-5.3" do - url "https://github.com/keplerproject/lua-compat-5.3/archive/v0.7.tar.gz" - sha256 "bec3a23114a3d9b3218038309657f0f506ad10dfbc03bb54e91da7e5ffdba0a2" - end - - resource "luv" do - url "https://github.com/luvit/luv/releases/download/1.30.0-0/luv-1.30.0-0.tar.gz" - sha256 "5cc75a012bfa9a5a1543d0167952676474f31c2d7fd8d450b56d8929dbebb5ef" - 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["luajit"].opt_prefix}" - - cd "deps-build" do - %w[ - mpack/mpack-1.0.7-0.rockspec - lpeg/lpeg-1.0.2-1.src.rock - inspect/inspect-3.1.1-0.src.rock - ].each do |rock| - dir, rock = rock.split("/") - cd "build/src/#{dir}" do - output = Utils.safe_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 - - cd "build/src/luv" do - cmake_args = std_cmake_args.reject { |s| s["CMAKE_INSTALL_PREFIX"] } - cmake_args += %W[ - -DCMAKE_INSTALL_PREFIX=#{buildpath}/deps-build - -DLUA_BUILD_TYPE=System - -DWITH_SHARED_LIBUV=ON - -DBUILD_SHARED_LIBS=OFF - -DBUILD_MODULE=OFF - -DLUA_COMPAT53_DIR=#{buildpath}/deps-build/build/src/lua-compat-5.3 - ] - system "cmake", ".", *cmake_args - system "make", "install" - end - end - - mkdir "build" do - cmake_args = std_cmake_args - cmake_args += %W[ - -DLIBLUV_INCLUDE_DIR=#{buildpath}/deps-build/include - -DLIBLUV_LIBRARY=#{buildpath}/deps-build/lib/libluv.a - ] - system "cmake", "..", *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 a7057c459cf65..0000000000000 --- a/Formula/nesc.rb +++ /dev/null @@ -1,31 +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" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "b2ce356c9fb1177a17e2e2b82cc7e91f9126ecc68435ba0cea0ea94f65def27c" => :catalina - sha256 "9b261a0f665954574e417d0f7509d2253d09ab45f43e6db48ddaa4e81120e8ba" => :mojave - sha256 "bb30d87ef9a3896e8dc9fa346854ecad17d2ac42ebdb3d5d800a548b839afc37" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "openjdk" => :build - depends_on "emacs" if MacOS.version >= :catalina - - def install - 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/nest.rb b/Formula/nest.rb deleted file mode 100644 index ca62117158e80..0000000000000 --- a/Formula/nest.rb +++ /dev/null @@ -1,96 +0,0 @@ -class Nest < Formula - desc "The Neural Simulation Tool (NEST) with Python3 bindings (PyNEST)" - homepage "https://www.nest-simulator.org/" - url "https://github.com/nest/nest-simulator/archive/v2.20.0.tar.gz" - sha256 "40e33187c22d6e843d80095b221fa7fd5ebe4dbc0116765a91fc5c425dd0eca4" - revision 1 - - bottle do - sha256 "38bfd492f381cd059a495122d1c3342e8fb5095501c0422e6c9e04e861cc0d31" => :catalina - sha256 "fa62ef7c40613906f8c038d40a8ae0bbda04b070943056829d03c5febaed130f" => :mojave - sha256 "c69623f995b427d9ea0a4da78011656a76935d9358f1e9f8470d280670a25aac" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "cython" => :build - depends_on "gsl" - depends_on "libomp" - depends_on "libtool" - depends_on "numpy" - depends_on "python@3.8" - depends_on "readline" - depends_on "scipy" - - resource "nose" do - url "https://files.pythonhosted.org/packages/58/a5/0dc93c3ec33f4e281849523a5a913fa1eea9a3068acfa754d44d88107a44/nose-1.3.7.tar.gz" - sha256 "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98" - end - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - def install - args = ["-DCMAKE_INSTALL_PREFIX:PATH=#{prefix}"] - - libomp = Formula["libomp"] - args << "-Dwith-python=3" - args << "-Dwith-openmp=ON" - args << "-Dwith-libraries=#{libomp.opt_lib}/libomp.dylib" - args << "-DOpenMP_C_FLAGS=-Xpreprocessor\ -fopenmp\ -I#{libomp.opt_include}" - args << "-DOpenMP_C_LIB_NAMES=omp" - args << "-DOpenMP_CXX_FLAGS=-Xpreprocessor\ -fopenmp\ -I#{libomp.opt_include}" - args << "-DOpenMP_CXX_LIB_NAMES=omp" - args << "-DOpenMP_omp_LIBRARY=#{libomp.opt_lib}/libomp.dylib" - python = Formula["python@3.8"] - python_exec = python.opt_bin/"python3" - - resource("nose").stage do - system python_exec, *Language::Python.setup_install_args(libexec) - end - resource("six").stage do - system python_exec, *Language::Python.setup_install_args(libexec) - end - version = Language::Python.major_minor_version python.opt_bin/"python3" - site_packages = "lib/python#{version}/site-packages" - pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n" - (prefix/site_packages/"homebrew-nest.pth").write pth_contents - - ENV.prepend_create_path "PATH", libexec/"bin" - ENV.prepend_create_path "PYTHONPATH", libexec/site_packages - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - system "make", "installcheck" - end - - # Replace internally accessible gcc with externally accesible version - # in nest-config if required - inreplace bin/"nest-config", - %r{#{HOMEBREW_REPOSITORY}/Library/Homebrew/shims.*/super}, - "#{HOMEBREW_PREFIX}/bin" - end - - def caveats - python = Formula["python@3.8"] - <<~EOS - The PyNEST bindings and its dependencies are installed with the python@3.8 formula. - If you want to use PyNEST, use the Python interpreter from this path: - - #{python.bin} - - You may want to add this to your PATH. - EOS - end - - test do - python = Formula["python@3.8"] - # check whether NEST was compiled & linked - system bin/"nest", "--version" - - # check whether NEST is importable form python - system python.bin/"python3.8", "-c", "'import nest'" - end -end diff --git a/Formula/nestopia-ue.rb b/Formula/nestopia-ue.rb deleted file mode 100644 index fd3257a17e9e0..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://github.com/0ldsk00l/nestopia/archive/1.50.tar.gz" - sha256 "f0274f8b033852007c67237897c69725b811c0df8a6d0120f39c23e990662aae" - license "GPL-2.0" - head "https://github.com/0ldsk00l/nestopia.git" - - bottle do - sha256 "19acd9260a874dec614062d0362a5936a0d9322e9fe66f0f8426d0dec67a6dd6" => :catalina - sha256 "e41a57949e9ebeffd1fa72de619da0dc2bbc813adf1b83922a0151362a9b9f04" => :mojave - sha256 "dc7632deb424cbfd112350aa1ddad0d1b0715cce9ebfda0bbbd8e77640cea044" => :high_sierra - 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 e9f2dc921fd32..0000000000000 --- a/Formula/net-snmp.rb +++ /dev/null @@ -1,58 +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" - revision 1 - - bottle do - sha256 "365760ffedb84e252289adc26a17365b62de654b3cff95952b6eff2ff90df7db" => :catalina - sha256 "efd1bcbd0e99fc29571de33c64fd1494db705a114778800d8181a27424a24421" => :mojave - sha256 "f5774ae4c5cc7f5a7fe5eb9eaa60f35842af5f6c2c184444428cc2e412f040fb" => :high_sierra - sha256 "1b1ea4f4456b6fc36c501398852b2e9979791387f38993129382b75782176f97" => :sierra - end - - keg_only :provided_by_macos - - depends_on "openssl@1.1" - - 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 - (buildpath/"include/net-snmp/system/darwin19.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@1.1"].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 ce56564086736..0000000000000 --- a/Formula/netcat.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "13bd349dfb08b3a5a474498eec4e20ffff722f82446b255d9c6e0540b02b362b" => :catalina - 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 0109f8a0675ee..0000000000000 --- a/Formula/netcat6.rb +++ /dev/null @@ -1,27 +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://deb.debian.org/debian/pool/main/n/nc6/nc6_1.0.orig.tar.gz" - sha256 "db7462839dd135ff1215911157b666df8512df6f7343a075b2f9a2ef46fe5412" - license "GPL-2.0" - - bottle do - rebuild 1 - sha256 "fbba0de060d7d38efc84e3a098de48d127467fd8e6d90edf2ed96bc20b5e38df" => :catalina - 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 ebda2227d892b..0000000000000 --- a/Formula/netcdf.rb +++ /dev/null @@ -1,155 +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.7.4.tar.gz" - mirror "https://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-c-4.7.4.tar.gz" - sha256 "0e476f00aeed95af8771ff2727b7a15b2de353fb7bb3074a0d340b55c2bd4ea8" - license "BSD-3-Clause" - revision 1 - head "https://github.com/Unidata/netcdf-c.git" - - bottle do - sha256 "0ae7c27bd0ac68071faecbd09f67fb2ce91d86b030b92488dca64851e6d40de0" => :catalina - sha256 "db149e5597eab59a0a908c48efc35df09735ddc8bac006c94b6a02a644822814" => :mojave - sha256 "c1704dcf4cd4d59e48b5e71e752c44220cc098810e67d49aaa8985cc09b5724b" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "gcc" # for gfortran - depends_on "hdf5" - - uses_from_macos "curl" - - resource "cxx" do - url "https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx4-4.3.1.tar.gz" - mirror "https://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-cxx4-4.3.1.tar.gz" - sha256 "6a1189a181eed043b5859e15d5c080c30d0e107406fbb212c8fb9814e90f3445" - 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.5.2.tar.gz" - mirror "https://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-fortran-4.5.2.tar.gz" - sha256 "b959937d7d9045184e9d2040a915d94a7f4d0185f4a9dceb8f08c94b0c3304aa" - end - - def install - ENV.deparallelize - - common_args = std_cmake_args << "-DBUILD_TESTING=OFF" - - mkdir "build" do - args = common_args.dup - args << "-DNC_EXTRA_DEPS=-lmpi" if Tab.for_name("hdf5").with? "mpi" - args << "-DENABLE_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}/libnetcdf.dylib" - - 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" - - # Fix for netcdf-fortran with GCC 10, remove with next version - ENV.prepend "FFLAGS", "-fallow-argument-mismatch" - - 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" - if head? - assert_match /^\d+(?:\.\d+)+/, `./test` - else - assert_equal version.to_s, `./test` - end - - (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 967ab2a99e581..0000000000000 --- a/Formula/netdata.rb +++ /dev/null @@ -1,108 +0,0 @@ -class Netdata < Formula - desc "Diagnose infrastructure problems with metrics, visualizations & alarms" - homepage "https://netdata.cloud/" - url "https://github.com/netdata/netdata/releases/download/v1.23.1/netdata-v1.23.1.tar.gz" - sha256 "2bc16dbe9eb7a41513efc068e4c78af6b8fde0549fbe1c99a87205c8101d33db" - license "GPL-3.0" - revision 1 - - bottle do - sha256 "0bb637eba8cc55715d035e36a2c72c2f6a2589ff6e3f3c1b5f34e4d0a91e411a" => :catalina - sha256 "965e682aa835cf6e0d82b3f711700632bf5bf71766be079a600d1b472ca2441e" => :mojave - sha256 "bcb75635cee37a8ca02ad2b41945bbdfbb646867e34a6edb264a94bc6e867d41" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "json-c" - depends_on "libuv" - depends_on "lz4" - depends_on "openssl@1.1" - - 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 "autoreconf", "-ivf" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}", - "--libexecdir=#{libexec}", - "--with-math", - "--with-zlib", - "--enable-dbengine", - "--with-user=netdata", - "UUID_CFLAGS=-I/usr/include", - "UUID_LIBS=-lc" - system "make", "clean" - 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 - (var/"cache/netdata/unittest-dbengine/dbengine").mkpath - (var/"lib/netdata/registry").mkpath - (var/"log/netdata").mkpath - (var/"netdata").mkpath - 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", "set", "registry", "netdata management api key file", - "#{testpath}/netdata.api.key" - end -end diff --git a/Formula/nethack.rb b/Formula/nethack.rb deleted file mode 100644 index 889fa32105cb8..0000000000000 --- a/Formula/nethack.rb +++ /dev/null @@ -1,76 +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.6/nethack-366-src.tgz" - version "3.6.6" - sha256 "cfde0c3ab6dd7c22ae82e1e5a59ab80152304eb23fb06e3129439271e5643ed2" - head "https://github.com/NetHack/NetHack.git" - - bottle do - sha256 "69418bfcba43b656118140a7e50992772567c4c2ab4827ce0af343892a149945" => :catalina - sha256 "4d186d190dcab9cc719a3868aa73a6c311407f8c1510e1d3bfd185a8070177bc" => :mojave - sha256 "6b6b5eb3571c69d31ac0c88f42acae3cea5f42ec513bafd03960db8c9f994177" => :high_sierra - end - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - uses_from_macos "ncurses" - - def install - ENV.deparallelize - - # Fixes https://github.com/NetHack/NetHack/issues/274 - ENV.O0 - - cd "sys/unix" do - hintfile = if MacOS.version >= :mojave - "macosx10.14" - else - "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" - s.gsub! "#WANT_WIN_CURSES=1", - "WANT_WIN_CURSES=1\nCFLAGS+=-DVAR_PLAYGROUND='\"#{HOMEBREW_PREFIX}/share/nethack\"'" - end - - system "sh", "setup.sh", "hints/#{hintfile}" - end - - 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/nethacked.rb b/Formula/nethacked.rb deleted file mode 100644 index 58f224528d548..0000000000000 --- a/Formula/nethacked.rb +++ /dev/null @@ -1,93 +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 "619034420b0ce7a657824a14c45af647132ac8263839b9a56fc0b64ff100aa64" => :catalina - 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 0a0f5fc61fd8b..0000000000000 --- a/Formula/nethogs.rb +++ /dev/null @@ -1,26 +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.6.tar.gz" - sha256 "317c1d5235d4be677e494e931c41d063a783ac0ac51e35e345e621d261c2e5a0" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "6f6124fdf95847d5a49d15733e1bebb0b7060995f7ad672863fcd89bb985ef1d" => :catalina - sha256 "e61f5ad80657ad381414c992a391d454689f6845965387c7b803f115b5fd72b4" => :mojave - sha256 "f994c61fe07025f7c18de9a15be44c3de107e12c19cde6e3cd53a892cc61b7b4" => :high_sierra - end - - uses_from_macos "libpcap" - uses_from_macos "ncurses" - - 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/netlify-cli.rb b/Formula/netlify-cli.rb deleted file mode 100644 index 85a10e8916c39..0000000000000 --- a/Formula/netlify-cli.rb +++ /dev/null @@ -1,34 +0,0 @@ -require "language/node" - -class NetlifyCli < Formula - desc "Netlify command-line tool" - homepage "https://www.netlify.com/docs/cli" - url "https://registry.npmjs.org/netlify-cli/-/netlify-cli-2.58.0.tgz" - sha256 "b1e0901936e154c15ab1f1e3c41ccc20642077d97b760d1ce7f9a431c6d32eb1" - license "MIT" - head "https://github.com/netlify/cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "6c07fa0ca8817032653bcf59e0454bb9eed029844410dc5d0a4ac00457041f50" => :catalina - sha256 "e2c026acb4c0dbbd81b2bdfb95c923b8a4ff002190185cb1026692567eef5e32" => :mojave - sha256 "b2cca2b6069979df9edef65af4c5e0e683d6f7bd55dcf1388b49ce81bf8d482f" => :high_sierra - end - - depends_on "node" - - uses_from_macos "expect" => :test - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - (testpath/"test.exp").write <<~EOS - spawn #{bin}/netlify login - expect "Opening" - EOS - assert_match "Logging in", shell_output("expect -f test.exp") - end -end diff --git a/Formula/netpbm.rb b/Formula/netpbm.rb deleted file mode 100644 index b1a44629d5d11..0000000000000 --- a/Formula/netpbm.rb +++ /dev/null @@ -1,72 +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 "https://svn.code.sf.net/p/netpbm/code/stable", :revision => 3870 - version "10.86.15" - version_scheme 1 - head "https://svn.code.sf.net/p/netpbm/code/trunk" - - bottle do - cellar :any - sha256 "37a97b0de551ec64acca8e1c9506e332fa6d89c9e1aabf0a17da0f6eda8209bf" => :catalina - sha256 "c41c2506bf6902e2c20ca671b146b7f61b7280f70e592a1c577dc6e6258af8bf" => :mojave - sha256 "cd6bde5ae0be1518e7413f5304433635ab6cc30179565b6ed58182081408cf94" => :high_sierra - end - - depends_on "subversion" => :build, :since => :catalina - depends_on "jasper" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - - uses_from_macos "flex" => :build - uses_from_macos "libxml2" - uses_from_macos "zlib" - - 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 - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra || MacOS.version == :el_capitan - - 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] - lib.install Dir["staticlink/*.a"], Dir["sharedlink/*.dylib"] - (lib/"pkgconfig").install "pkgconfig_template" => "netpbm.pc" - 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_predicate testpath/"testing_0_0.", :exist? - end -end diff --git a/Formula/netperf.rb b/Formula/netperf.rb deleted file mode 100644 index c84c661be2e95..0000000000000 --- a/Formula/netperf.rb +++ /dev/null @@ -1,27 +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 "da28e83fa25e8284ee5acc7fa327d886bb53ab20035cd07703909b7556ab25e1" => :catalina - 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 311dd5293b7dd..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://deb.debian.org/debian/pool/main/n/netris/netris_0.52.orig.tar.gz" - sha256 "8bc770ebb2c3ead1611ca7a1a2f3d833e169536c78d53b3fcf49381164ee9706" - license "GPL-2.0" - - 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 "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 - 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 1a6d1545c436e..0000000000000 --- a/Formula/nettle.rb +++ /dev/null @@ -1,64 +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.6.tar.gz" - mirror "https://ftpmirror.gnu.org/nettle/nettle-3.6.tar.gz" - sha256 "d24c0d0f2abffbc8f4f34dcf114b0f131ec3774895f3555922fe2f40f3d5e3f1" - - bottle do - cellar :any - sha256 "7ac7677ba653dbef81dd83ed8cde3dfcb7b464d04442886c396179932f4f9faa" => :catalina - sha256 "d378b026725d8d449ca6497ce2158b93c991a0e0326921a5f914bc4847da3a92" => :mojave - sha256 "07c65cb4d172b05065dcceb702b41ca3408b31b6154690c7a4cfa430b2de074d" => :high_sierra - end - - depends_on "gmp" - - uses_from_macos "m4" => :build - - def install - # 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 :catalina - sha256 "2d45bfae915cfc4425e45393a9868c4e586379c05e61f35aaf704cc54376c17c" => :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/networkit.rb b/Formula/networkit.rb deleted file mode 100644 index e6fd6e35a7aa3..0000000000000 --- a/Formula/networkit.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Networkit < Formula - include Language::Python::Virtualenv - - desc "Performance toolkit for large-scale network analysis" - homepage "https://networkit.github.io/" - url "https://github.com/networkit/networkit.git", - :tag => "7.0", - :revision => "d8e952f1e4d5e2758e4744e7c6ea7429a59c7cdf" - - bottle do - sha256 "6c31d49396ef373700c7c852fb9a0df5793fedb882b8b32fb5149bfc8c4bcffe" => :catalina - sha256 "53fcb186c2e3b629a6edbe33f9ceff4cb2fefed36f21c721f6273d75e7fb2af2" => :mojave - sha256 "fe03e0e1716b223d4a0319a36e39c7391477454203fcc3a0a65f5684fce5cf62" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "cython" => :build - depends_on "libnetworkit" - depends_on "numpy" - depends_on "python@3.8" - depends_on "scipy" - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - rpath_addons = Formula["libnetworkit"].opt_lib - - ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python#{xy}/site-packages/" - system Formula["python@3.8"].opt_bin/"python3", "setup.py", "build_ext", - "--networkit-external-core", - "--rpath=@loader_path;#{rpath_addons}" - system Formula["python@3.8"].opt_bin/"python3", "setup.py", "install", - "--single-version-externally-managed", - "--record=installed.txt", - "--prefix=#{libexec}" - site_packages = "lib/python#{xy}/site-packages" - pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n" - (prefix/site_packages/"homebrew-networkit.pth").write pth_contents - end - - test do - system Formula["python@3.8"].opt_bin/"python3", "-c", <<~EOS - 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 - EOS - end -end diff --git a/Formula/newlisp.rb b/Formula/newlisp.rb deleted file mode 100644 index 7aca3bffa4d24..0000000000000 --- a/Formula/newlisp.rb +++ /dev/null @@ -1,41 +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.5.tgz" - sha256 "dc2d0ff651c2b275bc4af3af8ba59851a6fb6e1eaddc20ae75fb60b1e90126ec" - - bottle do - sha256 "62fd116459d24ab0db976221fb16fd83a7a7db5447298bcc7f8b0dbf9a55f91f" => :catalina - sha256 "179146b49c20011f3da4dbdb9b66a6ed66d5dd9f15d07aeca9b8717219a62eeb" => :mojave - sha256 "5a0d4085a0e7fc364b3165be7e92a9dfeb2f4882e1971663ac74c70348a5c4a4" => :high_sierra - 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/newman.rb b/Formula/newman.rb deleted file mode 100644 index 3fe4425ef075e..0000000000000 --- a/Formula/newman.rb +++ /dev/null @@ -1,65 +0,0 @@ -require "language/node" - -class Newman < Formula - desc "Command-line collection runner for Postman" - homepage "https://www.getpostman.com/" - url "https://registry.npmjs.org/newman/-/newman-5.1.1.tgz" - sha256 "0b6c4a7ac3f487c0351205c97ff5ce95a5fc2bd3c7397788e706a608e38bb09b" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "b80e304708dd3d1b68cd402779a62953941b646d5e990ccbfcbd28c8e0e8ae3d" => :catalina - sha256 "51e3c6a2cb29d72931820f1a1e52f7c4470ef71c893d3fcb5f792c2dfebf54ed" => :mojave - sha256 "a714b5c7d88a374272ebd88e261ed4bb842ae9ba94c61074a6a65a87140ce48b" => :high_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 - path = testpath/"test-collection.json" - path.write <<~EOS - { - "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": [] - } - ] - } - EOS - - 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/newrelic-cli.rb b/Formula/newrelic-cli.rb deleted file mode 100644 index 043b199432a20..0000000000000 --- a/Formula/newrelic-cli.rb +++ /dev/null @@ -1,36 +0,0 @@ -class NewrelicCli < Formula - desc "The New Relic Command-line Interface" - homepage "https://github.com/newrelic/newrelic-cli" - url "https://github.com/newrelic/newrelic-cli/archive/v0.9.0.tar.gz" - sha256 "4c64549baaefae241ae8ff152e600e6092f33a1e1525a39a323cc69e459c66cd" - license "Apache-2.0" - head "https://github.com/newrelic/newrelic-cli.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d3461f9cb5de529d9f21edcbc6c37fda1e5f679ae4d68d427c6638acf5d33323" => :catalina - sha256 "b92c372e43878215759ad43a2ba0ef5f4cc5b562bd3222814aef765a3d185e7a" => :mojave - sha256 "fd6dec2387f7bf2e7872ce8378be318f14642d1a5905e616e8bf2c594b96b0dd" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["PROJECT_VER"] = version - system "make", "compile-only" - bin.install "bin/darwin/newrelic" - - output = Utils.safe_popen_read("#{bin}/newrelic", "completion", "--shell", "bash") - (bash_completion/"newrelic").write output - output = Utils.safe_popen_read("#{bin}/newrelic", "completion", "--shell", "zsh") - (zsh_completion/"_newrelic").write output - end - - test do - assert_match /pluginDir/, shell_output("#{bin}/newrelic config list") - assert_match /logLevel/, shell_output("#{bin}/newrelic config list") - assert_match /sendUsageData/, shell_output("#{bin}/newrelic config list") - assert_match version.to_s, shell_output("#{bin}/newrelic version 2>&1") - end -end diff --git a/Formula/newsboat.rb b/Formula/newsboat.rb deleted file mode 100644 index 12f7eaa353f2c..0000000000000 --- a/Formula/newsboat.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Newsboat < Formula - desc "RSS/Atom feed reader for text terminals" - homepage "https://newsboat.org/" - url "https://newsboat.org/releases/2.20.1/newsboat-2.20.1.tar.xz" - sha256 "82782079b75fe307f7a5a17dff9e712aa5975678fa550fb728d5a46867943566" - license "MIT" - head "https://github.com/newsboat/newsboat.git" - - bottle do - sha256 "185195a5551a37bebb3978986b9820557e71d6f7472dc47ac23cd73689a7c3ac" => :catalina - sha256 "0bea20044257f4fd9128cfbed1c7d6d4c7d702128153c9f5203d4770b501e5ad" => :mojave - sha256 "7bc4d0c9214a3b858848c11f0b11fd3a1fa2229ad5576ab134555afb1945b031" => :high_sierra - end - - depends_on "asciidoctor" => :build - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "gettext" - depends_on "json-c" - depends_on "libstfl" - - uses_from_macos "curl" - uses_from_macos "libxml2" - uses_from_macos "libxslt" - - def install - 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" - - 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 663292c819fa4..0000000000000 --- a/Formula/newt.rb +++ /dev/null @@ -1,51 +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.21.tar.gz" - sha256 "265eb46b55d7eaeb887fca7a1d51fe115658882dfe148164b6c49fccac5abb31" - - bottle do - cellar :any - sha256 "82ea49582f5bcf3bbaf6a39d4d6128c966889eaff682bf83601954c995ee1276" => :catalina - sha256 "2b902ecc6fc52b2f2681eb23e4eb568684a018deeada88e5a920952de8cc1080" => :mojave - sha256 "7a88cbe033eb207df57a6410f19339975a672e331c073e3ee79e467652c8753c" => :high_sierra - sha256 "4d82531bb783ba5e3f8a64150582e61b2fd4a9fb8be96d0bee88fa3bbe0dc3c3" => :sierra - 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" - (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 306073cb420e2..0000000000000 --- a/Formula/nexus.rb +++ /dev/null @@ -1,46 +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/downloads-prod-group/oss/nexus-2.14.18-01-bundle.tar.gz" - version "2.14.18-01" - sha256 "350af8b270bec7fda5861a15b8a5b7870fd8903d0b9a210754113d5a966ce6a6" - - 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 22abb00a461c5..0000000000000 --- a/Formula/nfcutils.rb +++ /dev/null @@ -1,27 +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" - license "GPL-3.0" - revision 1 - - bottle do - cellar :any - sha256 "963e5bf77bc285e81b9f7480f8b0362c73e5138bced77608043742df6e0992cd" => :catalina - sha256 "972af2e69529bde17b450d36ccfbb4b9d124c59beb7bb4d69a9c63b76f7cff58" => :mojave - sha256 "44dc64d49e9edc0c7b8f22c7f259262d5706f83bb452099b968b9f3576047367" => :high_sierra - 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 4e6a721886846..0000000000000 --- a/Formula/nfdump.rb +++ /dev/null @@ -1,28 +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.20.tar.gz" - sha256 "672f4fbe2b7424cfdba5917441100a440cbc9083f2a79147562fb5a966838543" - - bottle do - cellar :any - sha256 "c83ba9aaa48563952986ff836401cf32eb218025b976f0b16400db4ca4e191c4" => :catalina - sha256 "2d8e2b2f2515b141dd79bc26994320a2e2d1aae7927f7a62d8183afae07f7689" => :mojave - sha256 "75ca1d3a74970fa228e2d5ef5c54e39e9f9b9b434e90220fdf8c41ba5bed9c3c" => :high_sierra - 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 e8ecb2b5bd588..0000000000000 --- a/Formula/nghttp2.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Nghttp2 < Formula - desc "HTTP/2 C Library" - homepage "https://nghttp2.org/" - url "https://github.com/nghttp2/nghttp2/releases/download/v1.41.0/nghttp2-1.41.0.tar.xz" - sha256 "abc25b8dc601f5b3fefe084ce50fcbdc63e3385621bee0cbfa7b57f9ec3e67c2" - - bottle do - sha256 "d81b96cf82189cd4049ff7fe400a4e5b05eed38029d34e8325b751e7b9f3d730" => :catalina - sha256 "718a1b33f18b2b72b92110d2fb3f83e9ab6e4831f9bc2bdf7636757129104552" => :mojave - sha256 "f56e7c923879fd77d7c9737395c7c5df1ab3e9ffa03baa900385b53a91469803" => :high_sierra - end - - head do - url "https://github.com/nghttp2/nghttp2.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 - depends_on "c-ares" - depends_on "jansson" - depends_on "jemalloc" - depends_on "libev" - depends_on "libevent" - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - ENV.cxx11 - - args = %W[ - --prefix=#{prefix} - --disable-silent-rules - --enable-app - --disable-python-bindings - --with-xml-prefix=/usr - ] - - # requires thread-local storage features only available in 10.11+ - args << "--disable-threads" if MacOS.version < :el_capitan - - system "autoreconf", "-ivf" if build.head? - system "./configure", *args - system "make" - system "make", "check" - system "make", "install" - 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 fcb961bddedf2..0000000000000 --- a/Formula/nginx.rb +++ /dev/null @@ -1,188 +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.19.1.tar.gz" - sha256 "a004776c64ed3c5c7bc9b6116ba99efab3265e6b81d49a57ca4471ff90655492" - head "https://hg.nginx.org/nginx/", :using => :hg - - bottle do - sha256 "0c70950aa5eb51b432ecd5bc9f5d13cb9b4e583b946b8068b1250fe7205831e6" => :catalina - sha256 "de38ebc4e7e3196289215508f30de98458fdfa3da752d516916dcff676115b75" => :mojave - sha256 "aa42ffce60ab7b3b330fe997634d34b88ef4ecd5e3b3a3195854ae2731ad321b" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "pcre" - - 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"), "--options", "compression-level=9", "." - - # 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@1.1"] - 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-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-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? - 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 - 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 - - 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 599bb95cdb732..0000000000000 --- a/Formula/ngircd.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Ngircd < Formula - desc "Lightweight Internet Relay Chat server" - homepage "https://ngircd.barton.de/" - url "https://ngircd.barton.de/pub/ngircd/ngircd-26.tar.gz" - mirror "http://ngircd.sourceforge.net/pub/ngircd/ngircd-26.tar.gz" - sha256 "128441256c489f67a63c6d8459b97f0106959526ccd70b513eba2508dfbac651" - - bottle do - rebuild 1 - sha256 "129bf331b86f1d54735cf773a36b402323af0667afc1e2a1da4554899d05e8e3" => :catalina - sha256 "7fdce95437555b6de33aa1b0c9d3e3441405b5d3c9ec2f728a7b28f35983402d" => :mojave - sha256 "b58cacea0c009487e46b48d7220623001e49ad31722704ee805fd7029313f5d6" => :high_sierra - end - - depends_on "libident" - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - 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 8872c4e784172..0000000000000 --- a/Formula/ngrep.rb +++ /dev/null @@ -1,33 +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 "53bf6d68b15a2f07a01d828cdcd137131a45871141da411328c376ed90768265" => :catalina - 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 072c34a91731d..0000000000000 --- a/Formula/ngspice.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Ngspice < Formula - desc "Spice circuit simulator" - homepage "https://ngspice.sourceforge.io/" - url "https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/32/ngspice-32.tar.gz" - sha256 "3cd90c4e94516d87c5b4d02a3a6405b1136b25d05c871d4fee1fd7c4c0d03ef2" - - bottle do - sha256 "924b787c656fc7062bd5e3c96b0a2b33f458013d27c1aa55cd85f56218ac7a8e" => :catalina - sha256 "7a93fe4be3e1508b76d1549ee9d749fbcadb801dc0d2333d0d3042880044ad96" => :mojave - sha256 "c8c737e0652d05084ed7496af7bc0e1cb55e9f6b2a1ccaaaeff5a436a0d96f92" => :high_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 - - depends_on "fftw" - depends_on "readline" - - def install - system "./autogen.sh" if build.head? - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --with-readline=yes - --enable-xspice - --without-x - ] - - 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/ngt.rb b/Formula/ngt.rb deleted file mode 100644 index 75b46c8b02ece..0000000000000 --- a/Formula/ngt.rb +++ /dev/null @@ -1,31 +0,0 @@ -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/v1.12.0.tar.gz" - sha256 "1fc8342c0f0568d2cb3b3b641bcc70893c4088166bd48145432bf6a045a15105" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "65cfc323a6f03bea0bc24a8cc1265e4320181a2786838f533103887424f2db42" => :catalina - sha256 "276ff815ce319420fe6126205d2558ee9ff1b534121588475e8b20ba8e933a10" => :mojave - sha256 "6d14d20024b9edf98e551b3e97d593df05c46daa4206efffaeac6c7f3648cded" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libomp" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "install" - end - 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/nickle.rb b/Formula/nickle.rb deleted file mode 100644 index 4afdd8aafb8d1..0000000000000 --- a/Formula/nickle.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Nickle < Formula - desc "Desk calculator language" - homepage "https://www.nickle.org/" - url "https://www.nickle.org/release/nickle-2.86.tar.gz" - sha256 "2dca6c8e8d1fc4100d94b87d243053afd3340dbc6d284b5b2e48ce5ea159b17c" - - bottle do - sha256 "d27c9f22a0526d8db09e27371181023ad120132f8a2ae63412b7d3b9e2564f0c" => :catalina - sha256 "456ad0c96d0c02e44571cf8e24f4fbe9bc9a1a5296c896a0cfae05fea9e576d2" => :mojave - sha256 "5887f0f5de76945279b8fe90c1be0dde47563b4ea5a97433611491c87e2487b3" => :high_sierra - 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/nicovideo-dl.rb b/Formula/nicovideo-dl.rb deleted file mode 100644 index ca82ac3464218..0000000000000 --- a/Formula/nicovideo-dl.rb +++ /dev/null @@ -1,23 +0,0 @@ -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" - revision 1 - - bottle :unneeded - - depends_on "python@3.8" - - def install - rewrite_shebang detected_python_shebang, "nicovideo-dl" - 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 dc9aac83fe1e7..0000000000000 --- a/Formula/nifi-registry.rb +++ /dev/null @@ -1,22 +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.6.0/nifi-registry-0.6.0-bin.tar.gz" - mirror "https://archive.apache.org/dist/nifi/nifi-registry/nifi-registry-0.6.0/nifi-registry-0.6.0-bin.tar.gz" - sha256 "e52d07e5689dbab5a04fa6afb4e89b316980daac781144c9651aa81a68c38068" - - 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 9694319f4b281..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.lua?path=/nifi/1.11.4/nifi-1.11.4-bin.tar.gz" - mirror "https://archive.apache.org/dist/nifi/1.11.4/nifi-1.11.4-bin.tar.gz" - sha256 "5bb68014f818f74b475bcd774ce8c446fc20368ec3062c5ef86e4af9b2ba9aef" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"] - - (bin/"nifi").write_env_script libexec/"bin/nifi.sh", - :NIFI_HOME => libexec, - :JAVA_HOME => Formula["openjdk"].opt_prefix - end - - test do - system bin/"nifi", "status" - end -end diff --git a/Formula/nift.rb b/Formula/nift.rb deleted file mode 100644 index 70a95d9623a61..0000000000000 --- a/Formula/nift.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Nift < Formula - desc "Cross-platform open source framework for managing and generating websites" - homepage "https://nift.cc/" - url "https://github.com/nifty-site-manager/nsm/archive/v2.3.10.tar.gz" - sha256 "ef4410d423fca8dfb67a349a188a0a46bec67f7eb0157d146ae2fbb28f2f2295" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "f08a936baa0f3e81ec0aa8343fb4970c39a7c73b308bad8df4e21fd665320ade" => :catalina - sha256 "56e8f7ea837fbff3d3a887bd57134364c55f352c0c4e9a5bf38301dbb7e4bdda" => :mojave - sha256 "ad7c89b1c61ba4659dff5fb3b021b3283f253e158ed72830b0598afdc33198c8" => :high_sierra - end - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - mkdir "empty" do - system "#{bin}/nsm", "init", ".html" - assert_predicate testpath/"empty/output/index.html", :exist? - end - end -end diff --git a/Formula/nikto.rb b/Formula/nikto.rb deleted file mode 100644 index 853a3c09115ae..0000000000000 --- a/Formula/nikto.rb +++ /dev/null @@ -1,40 +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" - license "GPL-2.0" - - 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 c60c235b7d4b7..0000000000000 --- a/Formula/nim.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Nim < Formula - desc "Statically typed compiled systems programming language" - homepage "https://nim-lang.org/" - url "https://nim-lang.org/download/nim-1.2.4.tar.xz" - sha256 "eef18f32fabe65f0d06a40f32e297d1f6daba66463c33f3ab57edc4d3530d636" - - bottle do - cellar :any_skip_relocation - sha256 "d9893915c7306617053c8e74b383315a573d624e396e1fa9c9bef069446d29b5" => :catalina - sha256 "206367c0fec082a793187aff91fe92cb350cd95db78ec96d844d488ee4e88a64" => :mojave - sha256 "57cfb08ba8102472526a48cb9870b8a2ce32fd864ff10c9a833c8d78aac70766" => :high_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" - (buildpath/"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 nimble/nimgrep/nimpretty/nimsuggest - system "./koch", "tools" - system "./koch", "geninstall" - system "/bin/sh", "install.sh", prefix - - target = prefix/"nim/bin" - bin.install_symlink target/"nim" - tools = %w[nimble nimgrep nimpretty nimsuggest] - tools.each do |t| - 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/ninja.rb b/Formula/ninja.rb deleted file mode 100644 index af2472b1c70db..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.10.0.tar.gz" - sha256 "3810318b08489435f8efc19c05525e80a993af5a55baa0dfeae0465a9d45f99f" - license "Apache-2.0" - head "https://github.com/ninja-build/ninja.git" - - bottle do - cellar :any_skip_relocation - sha256 "b536415ef20ab14e808ef3fe558bbcd4c86de048d7e47cc86906fed4e1507fdc" => :catalina - sha256 "07c7d5eab06643969950a168b7a4ce34a39d236869e909942294eb136dfe3063" => :mojave - sha256 "e413c88eed509424d118a0b61b7b3c63535fc7c8c92cd336322db7a8af9cf6e0" => :high_sierra - 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 d1c04974f8b71..0000000000000 --- a/Formula/ninvaders.rb +++ /dev/null @@ -1,32 +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 "fc5a1eb5df34f13a6d63777b20ec5fea7a8a0351e8f9b8561e6ec95c42ced2c2" => :catalina - 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 7bb3c2f07f9fd..0000000000000 --- a/Formula/nkf.rb +++ /dev/null @@ -1,27 +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/70406/nkf-2.1.5.tar.gz" - sha256 "d1a7df435847a79f2f33a92388bca1d90d1b837b1b56523dcafc4695165bad44" - - bottle do - cellar :any_skip_relocation - sha256 "4a0694aedea8fcf96ecdfb6c60c0e14825591e7e7247e3944a00966d883398e6" => :catalina - sha256 "85183c457daaecd9a3ce59cea556189ad0131c6134d77e7890643a3fb75e3965" => :mojave - sha256 "9af47f293d4531c8d7ec5a81bd041349773f982b9710edca03eb3eb59b02a8b5" => :high_sierra - sha256 "8d908ee97c34e85ed85c268c895e143d57c7afdd9bc232a75b690067281765fc" => :sierra - 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 bfa943ceadf2a..0000000000000 --- a/Formula/nload.rb +++ /dev/null @@ -1,58 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "2e566035d80abd97c43955ac5fa05ba347b67dbbd10d0543faef3cf5cc7b0bfb" => :catalina - sha256 "1dbf614f22611f66ee49efa6b1f5a1af29066be04e461d56e9766b84aeb68077" => :mojave - sha256 "3bcdee6e4f2e404d0ec728620b025524de265f94fccc290b29fc81f04f85be36" => :high_sierra - 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" - 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/nlohmann-json.rb b/Formula/nlohmann-json.rb deleted file mode 100644 index 1dd9693044783..0000000000000 --- a/Formula/nlohmann-json.rb +++ /dev/null @@ -1,52 +0,0 @@ -class NlohmannJson < Formula - desc "JSON for modern C++" - homepage "https://github.com/nlohmann/json" - url "https://github.com/nlohmann/json/archive/v3.8.0.tar.gz" - sha256 "7d0edf65f2ac7390af5e5a0b323b31202a6c11d744a74b588dc30f5a8c9865ba" - license "MIT" - head "https://github.com/nlohmann/json.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "9479d4d551e9d1a65641770101eaabaf38b5b1b26f4dc91bbd1038de8b8e6daf" => :catalina - sha256 "9479d4d551e9d1a65641770101eaabaf38b5b1b26f4dc91bbd1038de8b8e6daf" => :mojave - sha256 "9479d4d551e9d1a65641770101eaabaf38b5b1b26f4dc91bbd1038de8b8e6daf" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", "-DJSON_BuildTests=OFF", *std_cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.cc").write <<~EOS - #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; - } - EOS - - system ENV.cxx, "test.cc", "-I#{include}", "-std=c++11", "-o", "test" - std_output = <<~EOS - {"list":[1,0,2],"name":"Niels","object":{"happy":true,"nothing":null},"pi":3.141} - EOS - assert_match std_output, shell_output("./test") - end -end diff --git a/Formula/nlopt.rb b/Formula/nlopt.rb deleted file mode 100644 index 536cf6b1f22c0..0000000000000 --- a/Formula/nlopt.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Nlopt < Formula - desc "Free/open-source library for nonlinear optimization" - homepage "https://nlopt.readthedocs.io/" - url "https://github.com/stevengj/nlopt/archive/v2.6.2.tar.gz" - sha256 "cfa5981736dd60d0109c534984c4e13c615314d3584cf1c392a155bfe1a3b17e" - head "https://github.com/stevengj/nlopt.git" - - bottle do - sha256 "67fbb937e618ea96f22cae30d9f71c3abc4d36b8e9b3d48a0ac47074189da936" => :catalina - sha256 "849095263f9cac072ca976169f1689ed51b04be20f89e219513bcc7db8a01937" => :mojave - sha256 "aef5b9054a8b604ad90fa7bb689b3daa3b671b9d65f16e53d25b7a9fa8e074d8" => :high_sierra - end - - depends_on "cmake" => [:build, :test] - - def install - args = *std_cmake_args + %w[ - -DNLOPT_GUILE=OFF - -DNLOPT_MATLAB=OFF - -DNLOPT_OCTAVE=OFF - -DNLOPT_PYTHON=OFF - -DNLOPT_SWIG=OFF - -DNLOPT_TESTS=OFF - ] - - mkdir "build" do - system "cmake", *args, ".." - system "make" - system "make", "install" - end - - pkgshare.install "test/box.c" - end - - test do - (testpath/"CMakeLists.txt").write <<~EOS - cmake_minimum_required(VERSION 3.0) - project(box C) - find_package(NLopt REQUIRED) - add_executable(box "#{pkgshare}/box.c") - target_link_libraries(box NLopt::nlopt) - EOS - system "cmake", "." - system "make" - assert_match "found", shell_output("./box") - end -end diff --git a/Formula/nmap.rb b/Formula/nmap.rb deleted file mode 100644 index b6352b229505b..0000000000000 --- a/Formula/nmap.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Nmap < Formula - desc "Port scanning utility for large networks" - homepage "https://nmap.org/" - url "https://nmap.org/dist/nmap-7.80.tar.bz2" - sha256 "fcfa5a0e42099e12e4bf7a68ebe6fde05553383a682e816a7ec9256ab4773faa" - revision 1 - head "https://svn.nmap.org/nmap/" - - bottle do - sha256 "ada1fae22e64234618a2df68d1ef43f4f0a186b80fb80ccce927c1679df9d66f" => :catalina - sha256 "bc12b9340cf3c23ac9f5a4eb6102884baf556b2347f46c3971600b91fb081125" => :mojave - sha256 "3cbc937428a7db08be8fa106b3a70ffad16f4a4d80808d2113490dd9ab60786c" => :high_sierra - sha256 "afa1fde2e44927ccb36447a0ce1dde08927ae67fd789afeb3883a95bd61edbc4" => :sierra - end - - depends_on "openssl@1.1" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - uses_from_macos "zlib" - - 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@1.1"].opt_prefix} - --without-nmap-update - --disable-universal - --without-zenmap - ] - - 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 0f50e87787faf..0000000000000 --- a/Formula/nmh.rb +++ /dev/null @@ -1,49 +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" - revision 1 - - bottle do - sha256 "5ed10257c9024848ec26fc4c80e1ddbbba3cca6199b83cf62fbbdc9a1970e404" => :catalina - sha256 "9c53df993c2f8f0dd45dea112d082d7cfc67efd34e58be2f62d95bfb44d3c9b7" => :mojave - sha256 "f46c5ca5a87081a9a8f7f454e0cb36de543dff666ac0ba8e1bcb867a2f7e7763" => :high_sierra - sha256 "8b70320e7046fc756ba490a44d5f7923a0e45db4f645dc02f80c19823eefa823" => :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@1.1" - 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 10e9929686cde..0000000000000 --- a/Formula/nng.rb +++ /dev/null @@ -1,37 +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.3.0.tar.gz" - sha256 "e8fe50d0f79ec3243733f8b4c25099c88b2597ed1bb0d94a27c4385a2a24ecac" - license "MIT" - - bottle do - sha256 "feea9c352fd19ca9d625a4b64458a7b7cedd3d027e2c1065dfdede3f4cdd81e7" => :catalina - sha256 "832c27a3418c241ec128f93ccb395c21a53de85942bacf91eb110456500c9294" => :mojave - sha256 "79f4d2e9a49be6044dde80c90b7ebb0cb781b86ece50bfb2cdab11c401b70244" => :high_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:#{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/nnn.rb b/Formula/nnn.rb deleted file mode 100644 index 6b1313527d59e..0000000000000 --- a/Formula/nnn.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Nnn < Formula - desc "Tiny, lightning fast, feature-packed file manager" - homepage "https://github.com/jarun/nnn" - url "https://github.com/jarun/nnn/archive/v3.2.tar.gz" - sha256 "4ebbd024776153ecb79c75d1a58fc5cd7cd168c6e8217100b5edf322fdf9d4fd" - license "BSD-2-Clause" - head "https://github.com/jarun/nnn.git" - - bottle do - cellar :any - sha256 "03b76b59a614592af2124a28a93002a524401fe3e59044ccaa73b0c19e4510d3" => :catalina - sha256 "61f5a2b9a55a57121752c805f49f9978d6fccb6aae8a90d1889004b6298926a4" => :mojave - sha256 "453a6724e2dabfe6a1b0dd059b421788f0243fc07ed3703fc822edf4584a4b6d" => :high_sierra - end - - depends_on "readline" - - uses_from_macos "ncurses" - - def install - system "make", "install", "PREFIX=#{prefix}" - - bash_completion.install "misc/auto-completion/bash/nnn-completion.bash" - zsh_completion.install "misc/auto-completion/zsh/_nnn" - fish_completion.install "misc/auto-completion/fish/nnn.fish" - 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 9cb409ba6a397..0000000000000 --- a/Formula/no-more-secrets.rb +++ /dev/null @@ -1,25 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "0a47f3f151de373eeb54010f4f5fa3db680866f740a25231452852a22fe3477c" => :catalina - 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 7e6ff1ca6fa73..0000000000000 --- a/Formula/node-build.rb +++ /dev/null @@ -1,23 +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.9.1.tar.gz" - sha256 "be3f11748c50b1b0e8e1eac7bde5056d5c60df5114babeb16778d27b710931e8" - license "MIT" - head "https://github.com/nodenv/node-build.git" - - bottle :unneeded - - depends_on "autoconf" - depends_on "openssl@1.1" - 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-sass.rb b/Formula/node-sass.rb deleted file mode 100644 index f63606919c044..0000000000000 --- a/Formula/node-sass.rb +++ /dev/null @@ -1,38 +0,0 @@ -class NodeSass < Formula - require "language/node" - - desc "JavaScript implementation of a Sass compiler" - homepage "https://github.com/sass/dart-sass" - url "https://registry.npmjs.org/sass/-/sass-1.26.10.tgz" - sha256 "c4eaec5fce24d37920d9b537df3e699fcf356981193695eb000115b03f56be5f" - - bottle do - cellar :any_skip_relocation - sha256 "12168b49fff68e0dd1b80baddfedae78f87285fef8377ecab846d0c00c60e3e1" => :catalina - sha256 "4ccd800040beb3b50ed40d4a1ca308b2343265ee03dfa87e3febc0685285120c" => :mojave - sha256 "9c003f625be9dac77603b56a37a462f49dc96558e557ab4485b408c2ce4074a7" => :high_sierra - end - - depends_on "node" - - # waiting for pull request at #47438 - # conflicts_with "dart-sass", :because => "both install a `sass` binary" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - 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/node.rb b/Formula/node.rb deleted file mode 100644 index 2347f8930b544..0000000000000 --- a/Formula/node.rb +++ /dev/null @@ -1,108 +0,0 @@ -class Node < Formula - desc "Platform built on V8 to build network applications" - homepage "https://nodejs.org/" - url "https://nodejs.org/dist/v14.5.0/node-v14.5.0.tar.xz" - sha256 "eb51c962d625da8870c336ef3f15f7a73f1c86a71d5553cf8d73e1d8983fdcb4" - head "https://github.com/nodejs/node.git" - - bottle do - cellar :any - sha256 "91096144949902e76d46a3c0cfa26f5f55665da838f77ac96c58c416940d28d0" => :catalina - sha256 "3f29cb2043ac857f2339ed390d54ea6124ff7be1c6fbb5a2a40a43261775247e" => :mojave - sha256 "6d4ea6d0ed5ea232ca3614f187c106a813c07eee44f68fba884fcf4edc8b01b6" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "icu4c" - - # 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.14.5.tgz" - sha256 "968b6309573a6555ce97fab1255a4e7addb035e67026cf98d90b1a38fb9a3b74" - end - - def install - # make sure subprocesses spawned by make are using our Python 3 - ENV["PYTHON"] = Formula["python@3.8"].opt_bin/"python3" - - # 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" - - # 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_f 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_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 3e87fcbb1b9ba..0000000000000 --- a/Formula/node@10.rb +++ /dev/null @@ -1,55 +0,0 @@ -class NodeAT10 < Formula - desc "Platform built on V8 to build network applications" - homepage "https://nodejs.org/" - url "https://nodejs.org/dist/v10.21.0/node-v10.21.0.tar.xz" - sha256 "26b01fa28338cacaa8a66d7963ab2514e81678c268ab52ec55dcf937aadcb73b" - - bottle do - cellar :any - sha256 "aced8e64c7f31ee9c816eee1c8a3bf2107a4973c82c6d95f5d7e4de50d806e63" => :catalina - sha256 "11f1d58110562399626b05aff0f116b037f4c2c83002a8778d850bf63c5ad235" => :mojave - sha256 "732c01d9c17a076ae5da0fd8772fa59cd8928576cf04ced3b70055fa48c2ffa0" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "icu4c" - depends_on :macos # Due to Python 2 (Will not work with Python 3 without extensive patching) - # Node 10 will be EOL April 2021 - - 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@12.rb b/Formula/node@12.rb deleted file mode 100644 index 3af87f4791a0d..0000000000000 --- a/Formula/node@12.rb +++ /dev/null @@ -1,57 +0,0 @@ -class NodeAT12 < Formula - desc "Platform built on V8 to build network applications" - homepage "https://nodejs.org/" - url "https://nodejs.org/dist/v12.18.2/node-v12.18.2.tar.xz" - sha256 "38bd10ad72370010641531d1473ebb62b8c39cf0380d086c2cfa61a8c552ddf2" - - bottle do - cellar :any - sha256 "8225f6b3fae5c26fd2925a6ce270124e7b63988229b55ca5699b55acfa0e694c" => :catalina - sha256 "cbb2eaaa45c608f8de9037cd9dcafaba5cea8d56efd75bd54bef4e68e3c6505b" => :mojave - sha256 "d4b91c2d0815ac6f2002b54a3eb0af1ef22e02a299c5c4fce65611a8e574b514" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "icu4c" - - def install - # make sure subprocesses spawned by make are using our Python 3 - ENV["PYTHON"] = Formula["python@3.8"].opt_bin/"python3" - - system "python3", "configure.py", "--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", "bufferutil" - 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 004e40b5d036f..0000000000000 --- a/Formula/node_exporter.rb +++ /dev/null @@ -1,77 +0,0 @@ -class NodeExporter < Formula - desc "Prometheus exporter for machine metrics" - homepage "https://prometheus.io/" - url "https://github.com/prometheus/node_exporter/archive/v1.0.1.tar.gz" - sha256 "a841bf3e236376840be9e1d8e6c4a38196be6f3957b0982d1c7970a5e416b0ad" - license "Apache-2.0" - head "https://github.com/prometheus/node_exporter.git" - - bottle do - cellar :any_skip_relocation - sha256 "7b68d39007278906d3a749370131c4ee7026f410350c48de3f65eeb4bd0c9310" => :catalina - sha256 "1ff2d6c27e863565b9b6415ee406d8f2585366c855f7ff9d64577043dec78b7e" => :mojave - sha256 "3d902e39d3d2be664928596a6a1af176af4a73194d3714341c6e365be3894d86" => :high_sierra - end - - depends_on "go" => :build - - def install - ldflags = %W[ - -X github.com/prometheus/common/version.Version=#{version} - -X github.com/prometheus/common/version.BuildUser=Homebrew - ] - system "go", "build", "-ldflags", ldflags.join(" "), "-trimpath", - "-o", bin/"node_exporter" - prefix.install_metafiles - - touch etc/"node_exporter.args" - - (bin/"node_exporter_brew_services").write <<~EOS - #!/bin/bash - exec #{bin}/node_exporter $(<#{etc}/node_exporter.args) - EOS - 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 - - plist_options :manual => "node_exporter" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/node_exporter_brew_services - - RunAtLoad - - KeepAlive - - StandardErrorPath - #{var}/log/node_exporter.err.log - StandardOutPath - #{var}/log/node_exporter.log - - - EOS - 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/nodebrew.rb b/Formula/nodebrew.rb deleted file mode 100644 index 6a7a8a080a8db..0000000000000 --- a/Formula/nodebrew.rb +++ /dev/null @@ -1,33 +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" - license "MIT" - 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 175d599a30b38..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.4.0.tar.gz" - sha256 "dbe5f7e966c6130038aa1966e432ff67a9e99f8e489d5ea8849b02770096389d" - - 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 39ca672f19bbd..0000000000000 --- a/Formula/nodenv.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Nodenv < Formula - desc "Manage multiple NodeJS versions" - homepage "https://github.com/nodenv/nodenv" - url "https://github.com/nodenv/nodenv/archive/v1.3.2.tar.gz" - sha256 "db2b777c3e2de8c9b0f27aefd84bc9eb523b328b61ea910adb030185dea7a238" - license "MIT" - 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 0d403d3a729e3..0000000000000 --- a/Formula/nomad.rb +++ /dev/null @@ -1,72 +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.11.3.tar.gz" - sha256 "4ac797fd87a9e24a99e45a5dae91dd1064ab90a9da180ee2d0914a6ded4d3272" - license "MPL-2.0" - head "https://github.com/hashicorp/nomad.git" - - bottle do - cellar :any_skip_relocation - sha256 "6b28f6f35597d1d8abbc9c2bf939e576a1589d4c464a512f79686de0e0c646b5" => :catalina - sha256 "04f65b111785238902f0586a8d54d5636467c1963da741230b1fecfe7bb54fa9" => :mojave - sha256 "c8d63cb29684bc567472d537ae602fec78fc117417e0f13809e4dc85cd8114c3" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - src = buildpath/"src/github.com/hashicorp/nomad" - src.install buildpath.children - src.cd do - system "go", "build", "-tags", "ui", "-o", bin/"nomad" - prefix.install_metafiles - end - end - - plist_options :manual => "nomad agent -dev" - - def plist - <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/nomad - agent - -dev - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/nomad.log - StandardOutPath - #{var}/log/nomad.log - - - EOS - end - - test do - 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 diff --git a/Formula/nopoll.rb b/Formula/nopoll.rb deleted file mode 100644 index 3ae76f73a80fa..0000000000000 --- a/Formula/nopoll.rb +++ /dev/null @@ -1,39 +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" - revision 1 - - bottle do - cellar :any - sha256 "e2cb3119545fe042968b9df9d19a94cc5c02f9f3ab04fcdd91bc1a8670dfa496" => :catalina - sha256 "dcd358fc9a1f1e106aae15d59b1190956f0ac4e7f52673d24833edca3c1146cb" => :mojave - sha256 "16bde638c91fd329d946b5854cd44291cbf516af2888e7880c5fa47dcb777936" => :high_sierra - sha256 "dd12a792cc0cb95a56cce2037d22b4c1141b85da48d2c511f6495914351ce2f0" => :sierra - end - - depends_on "openssl@1.1" - - 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/norm.rb b/Formula/norm.rb deleted file mode 100644 index 2c4968ea71312..0000000000000 --- a/Formula/norm.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Norm < Formula - desc "NACK-Oriented Reliable Multicast" - homepage "https://www.nrl.navy.mil/itd/ncs/products/norm" - url "https://github.com/USNavalResearchLaboratory/norm/archive/v1.5.8.tar.gz" - sha256 "ee7493c9ae9a129e7cbcd090a412fb0d0e25ab3acaa4748e5dc696bf822a62b5" - - bottle do - cellar :any - sha256 "b01566af6d67555366f350e72a9717479c1510af885a89b60827356aeba7d2af" => :catalina - sha256 "bc9f51046dc479949b480bb9a27143679bccb5f4bab0928c5968d280f9489d86" => :mojave - sha256 "c46470e7594148cbee61f851b57373374abdc6a94e91c722efabd3c90f36ec06" => :high_sierra - end - - resource "protolib" do - url "https://github.com/USNavalResearchLaboratory/protolib/archive/v3.0b1.tar.gz" - sha256 "1e15bbbef4758e0179672d456c2ad2b2087927a3796adc4a18e2338f300bc3e6" - end - - def install - (buildpath/"protolib").install resource("protolib") - - 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 b9f3f7e3bebc2..0000000000000 --- a/Formula/normalize.rb +++ /dev/null @@ -1,40 +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" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "363ac4a56ccb75ff32f3af3ef42a6cf5d74f24b977939bb08c14fddc30ff2ef5" => :catalina - 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 4b24a858a08e0..0000000000000 --- a/Formula/noti.rb +++ /dev/null @@ -1,26 +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.4.0.tar.gz" - sha256 "8fcf494084ea6eacac2e55dfcaf978452e1af0139205cd23fce71bfb20dd17fe" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "2c1a4a0b6f970c9cccabcb119b9ec8c43494eba00c14fb2fc851ac4063cb88dc" => :catalina - sha256 "013130b6505c40b91c091663726343f92d401727d4b02e84c5268a2a64a22f62" => :mojave - sha256 "ed27cb9b0e02a8cd9ef880a95036ffa2159880fff334786ee594fef3677f97d1" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-mod=vendor", "-o", "#{bin}/noti", "cmd/noti/main.go" - man1.install "docs/man/noti.1" - man5.install "docs/man/noti.yaml.5" - end - - test do - system "#{bin}/noti", "-t", "Noti", "-m", "'Noti recipe installation test has finished.'" - end -end diff --git a/Formula/notifiers.rb b/Formula/notifiers.rb deleted file mode 100644 index 477ebd13bf8b7..0000000000000 --- a/Formula/notifiers.rb +++ /dev/null @@ -1,81 +0,0 @@ -class Notifiers < Formula - include Language::Python::Virtualenv - - desc "The easy way to send notifications" - homepage "https://pypi.org/project/notifiers/" - url "https://files.pythonhosted.org/packages/4f/36/4c300f55949b9be84284d51253ae48d564dc2c4f2bffb94f26c8c1485f07/notifiers-1.2.1.tar.gz" - sha256 "34625af405f4aa19293eaaefe145ccc92c6018ae9798f53a03a7fcc996e541aa" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "627cae6d4d4620c83fe486beea84a42868880ba68aedbee156a23d4d9fa0047e" => :catalina - sha256 "011b44eafa3ba60a890f050f45c3c0356cabdc449797ceb1ed6cf2c42d844fc0" => :mojave - sha256 "99759b6553b572f9b417f500f75c1f6d1a8006265154be77877229ff70683d0a" => :high_sierra - end - - depends_on "python@3.8" - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b4/19/53433f37a31543364c8676f30b291d128cdf4cd5b31b755b7890f8e89ac8/certifi-2020.4.5.2.tar.gz" - sha256 "5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1" - 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/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" - sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" - sha256 "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" - end - - resource "pyrsistent" do - url "https://files.pythonhosted.org/packages/9f/0d/cbca4d0bbc5671822a59f270e4ce3f2195f8a899c97d0d5abb81b191efb5/pyrsistent-0.16.0.tar.gz" - sha256 "28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "rfc3987" do - url "https://files.pythonhosted.org/packages/14/bb/f1395c4b62f251a1cb503ff884500ebd248eed593f41b469f89caa3547bd/rfc3987-1.3.8.tar.gz" - sha256 "d3c4d257a560d544e9826b38bc81db676890c79ab9d7ac92b39c7a253d5ca733" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match "notifiers", shell_output("#{bin}/notifiers --help") - end -end diff --git a/Formula/notmuch.rb b/Formula/notmuch.rb deleted file mode 100644 index 6ee2dd1dd85b8..0000000000000 --- a/Formula/notmuch.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Notmuch < Formula - desc "Thread-based email index, search, and tagging" - homepage "https://notmuchmail.org/" - url "https://notmuchmail.org/releases/notmuch-0.29.3.tar.xz" - sha256 "d5f704b9a72395e43303de9b1f4d8e14dd27bf3646fdbb374bb3dbb7d150dc35" - revision 1 - head "https://git.notmuchmail.org/git/notmuch", :using => :git - - bottle do - cellar :any - rebuild 1 - sha256 "789d748a2d59bd2df69de4f0f3d5e42fb6fa7e7e739ca2b86fd8a85408088b99" => :catalina - sha256 "f3fb3267ac22265010553b2f72c1fb1c2b997a31759859a8e68a93cadf3bf9c1" => :mojave - sha256 "7f2d8203b81fd29dde272a18f98235e31b43c28fc6e847906a79a0fa72219f6b" => :high_sierra - end - - 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 "python@3.8" - depends_on "talloc" - depends_on "xapian" - depends_on "zlib" - - def install - args = %W[ - --prefix=#{prefix} - --mandir=#{man} - --emacslispdir=#{elisp} - --emacsetcdir=#{elisp} - --bashcompletiondir=#{bash_completion} - --zshcompletiondir=#{zsh_completion} - --without-ruby - ] - - ENV.append_path "PYTHONPATH", Formula["sphinx-doc"].opt_libexec/"lib/python3.8/site-packages" - - system "./configure", *args - system "make", "V=1", "install" - - bash_completion.install "completion/notmuch-completion.bash" - - (prefix/"vim/plugin").install "vim/notmuch.vim" - (prefix/"vim/doc").install "vim/notmuch.txt" - (prefix/"vim").install "vim/syntax" - - cd "bindings/python" do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(prefix) - 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 diff --git a/Formula/now-cli.rb b/Formula/now-cli.rb deleted file mode 100644 index 3a74456bbdf29..0000000000000 --- a/Formula/now-cli.rb +++ /dev/null @@ -1,31 +0,0 @@ -require "language/node" - -class NowCli < Formula - desc "The command-line interface for Now" - homepage "https://zeit.co/now" - url "https://registry.npmjs.org/now/-/now-19.1.1.tgz" - sha256 "759fdc112d130750fc47ce7ba0fc39fa631349dfcbdb6b97a10c0bd355f82d69" - - bottle do - cellar :any_skip_relocation - sha256 "db56419b05b4a2984a8fc4e9c82748ff8136ae7539d95750bef0be691b26a725" => :catalina - sha256 "e6c305750e8fb94e54425984f5c60bc33fc512e6e04cb8218aaf7612b22c0b92" => :mojave - sha256 "ac1ecc0139340ef1ee4a829bbf8ca924f4d449b70cf331e62e0e5afcc36ca446" => :high_sierra - end - - depends_on "node" - - def install - rm Dir["dist/{*.exe,xsel}"] - inreplace "dist/index.js", "t.default=getUpdateCommand", - "t.default=async()=>'brew upgrade now-cli'" - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - system "#{bin}/now", "init", "jekyll" - assert_predicate testpath/"jekyll/_config.yml", :exist?, "_config.yml must exist" - assert_predicate testpath/"jekyll/README.md", :exist?, "README.md must exist" - end -end diff --git a/Formula/noweb.rb b/Formula/noweb.rb deleted file mode 100644 index 2f4e6a7bf45a9..0000000000000 --- a/Formula/noweb.rb +++ /dev/null @@ -1,93 +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 - rebuild 2 - sha256 "b52d3febc8494ae943db6f99e0734b61333f95d67994b6b609d4c5129d52f788" => :catalina - sha256 "17439b95ee2d05eacf81c621aa76645e5bfd9a3c5b5ad61ffd98e1438bb69264" => :mojave - sha256 "f3ca23f070a74c5e499232667ef64e73d68943d13f6344e70b74426feccca524" => :high_sierra - 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/npth.rb b/Formula/npth.rb deleted file mode 100644 index 1f4861395946a..0000000000000 --- a/Formula/npth.rb +++ /dev/null @@ -1,27 +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 "ecb35292b1cbcf24e42f9dd0691dc9030345e8b8b1b7f9c9a865fca2fb25932c" => :catalina - 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 6cf83a64a7e76..0000000000000 --- a/Formula/npush.rb +++ /dev/null @@ -1,27 +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" - license "GPL-2.0" - head "https://svn.code.sf.net/p/npush/code/" - - bottle do - cellar :any_skip_relocation - sha256 "fdb6d7cd95fa85086a4dc01edfb5859fcf65d2932c56d931d716814157f5449e" => :catalina - 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 c4f2dda0d3fe9..0000000000000 --- a/Formula/nq.rb +++ /dev/null @@ -1,27 +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 "95011ee6d48728704ee95480374c545d3c2bcea8f4482cecd9b8dbbab9a2407b" => :catalina - sha256 "b5b3f7b76cc79a5bc6d4a55e4fb3e018b08052dc7faa173300b1ddf2e16e6bee" => :mojave - sha256 "a6d18f2d7f1fafd661a5d145599969707efe71969ccc6ac34593f3f60c59081a" => :high_sierra - sha256 "0e8d6557f7713be4c1e5074ea909d36cd12e2e17d85a1c0a1141ac64f06953d3" => :sierra - sha256 "67374f5db8a35f877a16e0fdbd313276fb269db81ce49e7654fb61fa865417cd" => :el_capitan - 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}/fq -a") - assert_predicate testpath/"TEST", :exist? - end -end diff --git a/Formula/nqp.rb b/Formula/nqp.rb deleted file mode 100644 index 82a41086528c2..0000000000000 --- a/Formula/nqp.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Nqp < Formula - desc "Lightweight Perl 6-like environment for virtual machines" - homepage "https://github.com/perl6/nqp" - url "https://github.com/perl6/nqp/releases/download/2020.06/nqp-2020.06.tar.gz" - sha256 "a49e3374cf628d845043b50d192d36131adf0ab91e7e0795a1dc20dd7b83938f" - - bottle do - sha256 "e5fed6211e4c2923526d88fd83a6e49ccf5eb6994c6b6cc465aa2762750c0239" => :catalina - sha256 "e50bef373949fbc54f82d6ab8a24f83fff9dc9f8faaa1dc5c33113c1a31277eb" => :mojave - sha256 "2584ab57c5fd7f37cfee93e4f37da2ecd0b24adae41b1e77da1fbc0d43d56348" => :high_sierra - end - - depends_on "moarvm" - - conflicts_with "rakudo-star", :because => "rakudo-star currently ships with nqp included" - - 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 5ee684030a0e7..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 "709c3f50eaf96b520116f8990fdab7cd52e271b3025d52724ba04aa50b025f17" => :catalina - sha256 "6ff39712b0f4c8ba707eb1850ced8e9e0f14d3dc615cb9fb5a16456f0f69d680" => :mojave - sha256 "7fcd88c9587e77ec07210ace97b4432197545ea4d70ff547b1b44977aef8eb8a" => :high_sierra - sha256 "01177e7bc064b062c454caad61c24b80deb20768ab2d880c77ba20708ac6e709" => :sierra - sha256 "fed88dfb217cc0b5fa0a4f7a7aec40342314998624e084921e1b5cc02d08d27d" => :el_capitan - sha256 "18949f41b9ba386c996a49541875d3320184b88dccb04136846f32b3d681e647" => :yosemite - sha256 "a46624bc9fc5f7883e923920dbc96aef720e5bb37b4ac71a281d101b96decee6" => :mavericks - 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 b046851126293..0000000000000 --- a/Formula/nrpe.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Nrpe < Formula - desc "Nagios remote plugin executor" - homepage "https://www.nagios.org/" - url "https://downloads.sourceforge.net/project/nagios/nrpe-4.x/nrpe-4.0.3/nrpe-4.0.3.tar.gz" - sha256 "f907ba15381adfc6eef211508abd027f8e1973116080faa4534a1191211c0340" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "6ef7387202f3b9afda335fd77f16a268a82bed7a9f6ef856faa83741b308d8f2" => :catalina - sha256 "90463f41b64e1ac2149dd917d536e406ed22ba9cef8a27e06618bab53c4e673e" => :mojave - sha256 "e109e63ca7f6f5386eae058d19e510c5d3a5deb2633f8ef014df1ac24d414cb9" => :high_sierra - end - - depends_on "nagios-plugins" - depends_on "openssl@1.1" - - 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@1.1"].opt_prefix}", - # Set both or it still looks for /usr/lib - "--with-ssl-lib=#{Formula["openssl@1.1"].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 cc3c194e0f554..0000000000000 --- a/Formula/nsd.rb +++ /dev/null @@ -1,29 +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.3.1.tar.gz" - sha256 "f4b34ace6651a81386464cc990f046e7328aa2485274fe8743086997129d8987" - license "BSD-3-Clause" - - bottle do - sha256 "69f6d9d52527c392e5d01ec67d78b71113a799e3ce02e15837e8e947f0509c81" => :catalina - sha256 "f6f707defe682c1e7f5d477166f5adae5687bfb5ff25895ece916be1674ba5d0" => :mojave - sha256 "e9780a88833916958fa7f276efe27d792b996d64a988f5684acd8c2c336eba50" => :high_sierra - end - - depends_on "libevent" - depends_on "openssl@1.1" - - def install - system "./configure", "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--localstatedir=#{var}", - "--with-libevent=#{Formula["libevent"].opt_prefix}", - "--with-ssl=#{Formula["openssl@1.1"].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 94dfd728dcb3b..0000000000000 --- a/Formula/nsnake.rb +++ /dev/null @@ -1,29 +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" - license "GPL-3.0" - head "https://github.com/alexdantas/nSnake.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "6ff26e57639f58e6bc2bbd36c511d3c21cf0b5e818b270efb6ae14e542c780c0" => :catalina - sha256 "195e486eb84a9fa230bfa31558d6b3fb8ae6715ab444f3aead9c997a43f981d8" => :mojave - sha256 "5f8de3bf4148a6d9fdb32b5584e4aa5890c8f373ad5be36b17473e4d7c2f0a96" => :high_sierra - 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 bc2f12387d1de..0000000000000 --- a/Formula/nspr.rb +++ /dev/null @@ -1,45 +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/nspr/releases/v4.26/src/nspr-4.26.tar.gz" - sha256 "fc9d142d85b74ffd2e6374a0c9016f3f2dac074225e24df3070e5a72d31b773d" - - bottle do - cellar :any - sha256 "70c30f08abf5a0499dcbe9d97061bd2c48d25ffaff0d435e8d7eede589f4c046" => :catalina - sha256 "039c4d5ad25a611c6c62bd6542e1faa505a9fb4c4c43ac742b8ecaa947f85dd5" => :mojave - sha256 "d94d9687669abfc4f85f2a275c5ab7bbb0f3f49873d6939a2def529910182459" => :high_sierra - 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 42d67b9319e8a..0000000000000 --- a/Formula/nsq.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Nsq < Formula - desc "Realtime distributed messaging platform" - homepage "https://nsq.io/" - url "https://github.com/nsqio/nsq/archive/v1.2.0.tar.gz" - sha256 "98e24d748550f01dd8775e5e40f3ae657f5b513f875a15081cdcdc567b745480" - license "MIT" - head "https://github.com/nsqio/nsq.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "2aae6c19e55ebd926426301fa85dd5716bce20a04bfbc11a5519dbada6a67368" => :catalina - sha256 "bffff40b52e50eb181b9a02c8650b51924e45e8d650a5ed17051b8b1c0ce46cc" => :mojave - sha256 "96ead21ddbb8f6f004141aac2e7c5a23d8740eaa5d4730eb4b0d6d94a0b63683" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "DESTDIR=#{prefix}", "PREFIX=", "install" - prefix.install_metafiles - 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 - 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/nss.rb b/Formula/nss.rb deleted file mode 100644 index b100944d7f486..0000000000000 --- a/Formula/nss.rb +++ /dev/null @@ -1,104 +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_54_RTM/src/nss-3.54.tar.gz" - sha256 "dab18bbfcf5e347934cda664df75ce9fd912a5772686c40d3c805e53c08d6e43" - - bottle do - cellar :any - sha256 "798172411c4a3c7d71ba3eb98968d883591f63135371e45727af89436802f409" => :catalina - sha256 "eec53f7a5a977c814331941b8ae158d630f24fb0c441f72460b9bc9e92f1dbaf" => :mojave - sha256 "3ecc262ca4a64ebeccce66ffa777e492ad0e5ed7ffc06201061a636688b7a10a" => :high_sierra - end - - depends_on "nspr" - - uses_from_macos "sqlite" - uses_from_macos "zlib" - - def install - ENV.deparallelize - cd "nss" - - args = %W[ - BUILD_OPT=1 - NSS_ALLOW_SSLKEYLOGFILE=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 7d28cf3beb507..0000000000000 --- a/Formula/nsuds.rb +++ /dev/null @@ -1,34 +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" - license "GPL-2.0" - - bottle do - sha256 "dcccae0ffd504a9a09ed57bfe0ac26127723c92513177eb862fa132e21c6968a" => :catalina - 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 20df1b21823c7..0000000000000 --- a/Formula/ntfs-3g.rb +++ /dev/null @@ -1,104 +0,0 @@ -class Ntfs3g < Formula - desc "Read-write NTFS driver for FUSE" - homepage "https://www.tuxera.com/community/open-source-ntfs-3g/" - revision 3 - stable do - url "https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz" - sha256 "3e5a021d7b761261836dcb305370af299793eedbded731df3d6943802e1262d5" - - # Fails to build on Xcode 9+. Fixed upstream in a0bc659c7ff0205cfa2b2fc3429ee4d944e1bcc3 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/3933b61bbae505fa95a24f8d7681a9c5fa26dbc2/ntfs-3g/lowntfs-3g.c.patch" - sha256 "749653cfdfe128b9499f02625e893c710e2167eb93e7b117e33cfa468659f697" - end - end - - bottle do - cellar :any - rebuild 1 - sha256 "512daef6a2d9d74416ebb67c08d1c750cae0ba717b6338bd188b3434ad5725db" => :catalina - sha256 "58304b5065b3ec2e32f2e455c9cc2bcd7f60b6f177c57c60dd0a3eb607d6d4a1" => :mojave - sha256 "0c52a06810814dafc2837fa631a08e607a49da99e3be000ee61cd763f24ca7fc" => :high_sierra - 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 "coreutils" => :test - depends_on "gettext" - depends_on :osxfuse - - def install - ENV.append "LDFLAGS", "-lintl" - - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - --exec-prefix=#{prefix} - --mandir=#{man} - --with-fuse=external - --enable-extras - ] - - 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_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/ntl.rb b/Formula/ntl.rb deleted file mode 100644 index 15ecc1ba4baec..0000000000000 --- a/Formula/ntl.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Ntl < Formula - desc "C++ number theory library" - homepage "https://www.shoup.net/ntl" - url "https://www.shoup.net/ntl/ntl-11.4.3.tar.gz" - sha256 "b7c1ccdc64840e6a24351eb4a1e68887d29974f03073a1941c906562c0b83ad2" - - bottle do - cellar :any - sha256 "fc44a358782565b05098a29f2694fe16100c2b5aa096c04875edd093adf78b5d" => :catalina - sha256 "d0739cc2ebea1427d1fae3b0f871105b69d6f9c4c765415ed2f328af1e925598" => :mojave - sha256 "5747add8bf85ae5a46d8c12635efbf61a2b5c402e35fdaebcf7499148c682564" => :high_sierra - 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 f2903c99f4428..0000000000000 --- a/Formula/ntopng.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Ntopng < Formula - desc "Next generation version of the original ntop" - homepage "https://www.ntop.org/products/traffic-analysis/ntop/" - license "GPL-3.0" - revision 1 - - stable do - url "https://github.com/ntop/ntopng/archive/4.0.tar.gz" - sha256 "caf3aeec5c66eca7ddc3a1d4edc4a109b6c963a22bfcf6843e402a569c8e12a1" - - resource "nDPI" do - url "https://github.com/ntop/nDPI/archive/3.2.tar.gz" - sha256 "6808c8c4495343e67863f4d30bb261c1e2daec5628ae0be257ba2a2dea7ec70a" - - # Contains an API change which ntopng 4.0 uses. - patch do - url "https://github.com/ntop/nDPI/commit/e4512dbcb9e1db0500290b712257e501d1440d71.patch?full_index=1" - sha256 "b753532c7c4e68bd20ac432e4ea2159b38609ee7bf6296e96b511222813cc633" - end - end - end - - bottle do - sha256 "0f5da1b5b0fe34429ce4c85d246117ccae35d6cc91db37b0606bdcd2cc8a1383" => :catalina - sha256 "17616993b42436771976fd8a55bd23147d446e52956f5f96e4fa6685f7c75561" => :mojave - sha256 "173a972b8696abeb4f645c2a2ec84fbe5e82b01ff66fa8ef0769906304af65b2" => :high_sierra - 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 72bde18f05b9c..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.8p15.tar.gz" - version "4.2.8p15" - sha256 "f65840deab68614d5d7ceb2d0bb9304ff70dcdedd09abb79754a87536b849c19" - - bottle do - cellar :any - sha256 "3c6a8893b0e76b8af1a4fd19ab664279b5409c1129062bf1feee4643318236b3" => :catalina - sha256 "b69ded37b2c8304157c3f46e4484af9099b4fd1e077929c35bb630903d059856" => :mojave - sha256 "9f7ce9c3ff545ff738fcf4049445923c968ec807cf1ecde451be76412442e6f1" => :high_sierra - end - - depends_on "openssl@1.1" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-openssl-libdir=#{Formula["openssl@1.1"].lib} - --with-openssl-incdir=#{Formula["openssl@1.1"].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 9502f8b6a323e..0000000000000 --- a/Formula/nu-smv.rb +++ /dev/null @@ -1,33 +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 "90dad1b30d80ee7ddba984d6ad2536fff08896e79cf1a26a083a5e9990fc3c43" => :catalina - 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 a4f74190052cf..0000000000000 --- a/Formula/nu.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Nu < Formula - desc "Object-oriented, Lisp-like programming language" - homepage "https://programming.nu/" - url "https://github.com/nulang/nu/archive/v2.3.0.tar.gz" - sha256 "1a6839c1f45aff10797dd4ce5498edaf2f04c415b3c28cd06a7e0697d6133342" - - bottle do - cellar :any - sha256 "d785730e9226dbfe78513a268657bfa50bacd5427b8779f838d00f1c312cc2a8" => :catalina - sha256 "a3e605c8fca139258b5b5d49f85ac4d57a781017ae0deac8096a74d491219121" => :mojave - sha256 "119f4f3eed1bf677c4e8d0248bd4d042d6c7333d21e6442b90440504bb2e276a" => :high_sierra - end - - depends_on "pcre" - - 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 8e13e02f8f42d..0000000000000 --- a/Formula/nudoku.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Nudoku < Formula - desc "Ncurses based sudoku game" - homepage "https://jubalh.github.io/nudoku/" - url "https://github.com/jubalh/nudoku/archive/2.0.0.tar.gz" - sha256 "44d3ec1ff34a010910ac7a92f6d84e8a7a4678a966999b7be27d224609ae54e1" - license "GPL-3.0" - head "https://github.com/jubalh/nudoku.git" - - bottle do - sha256 "42af644b71eee33e827eb588221eddc0a2b16d552907f9bd80116177e91b748a" => :catalina - sha256 "c31813e8e20e6a7f3869bd0869d21e24877ee15de9f00f7eaf812bc81244418f" => :mojave - sha256 "fabdc0fc21df7b01f097ae89884d8234d8efe1a3b4335a4d2897f98df5291e67" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - - uses_from_macos "ncurses" - - # gettext 0.20 compatibility. - # Remove with next release. - patch do - url "https://github.com/jubalh/nudoku/commit/9a4ffc359fe72f6af0e3654ae19ae421ab941ea8.patch?full_index=1" - sha256 "e4b52f5ac48bfd192f28ae4b3a2fb146c7bc1bec1a441e8e10f4ad90550d4e66" - end - - 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 9b3c91354b8f1..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/v5.6.0/nuget.exe" # make sure libexec.install below matches case - sha256 "f8593a00dcd769d4978df7e8f9b5d3d93b33f4e1cc62a757e19aa595d759f76c" - - 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 packageid:NuGet.Protocol.Core.v3") - end -end diff --git a/Formula/num-utils.rb b/Formula/num-utils.rb deleted file mode 100644 index 6ae9f569c0e57..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://deb.debian.org/debian/pool/main/n/num-utils/num-utils_0.5.orig.tar.gz" - sha256 "03592760fc7844492163b14ddc9bb4e4d6526e17b468b5317b4a702ea7f6c64e" - - bottle do - cellar :any_skip_relocation - sha256 "8e0385979e9fbba3b30e1b492e8a0160c203e22ce648f959c764848ceb2f30c3" => :catalina - sha256 "ed2b66381fa6949dbf99e34e2fcf1b4b0519c892d44d8472af1f8abfa94c1c91" => :mojave - sha256 "0fb446d9d8068e05f3144c22261672b7ad22589e55b3a6d15d65f6bebabf9a14" => :high_sierra - sha256 "37c24f625dae12d9db8592de4dc9003d4ce267a7a0bb6076e156f54d8ec990d1" => :sierra - sha256 "f2021913b67fe8ece09b204aa2715a4c8067121908695cee830b363a52a987eb" => :el_capitan - sha256 "41a55ac6c46aca45473ca365443fb1fd2d77fdb6e4540edbe849d723d31ba0e0" => :yosemite - sha256 "188ff1f94691f8bf5099ec1012d4732be8fa385bf738671f86780376dd2597b9" => :mavericks - 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 f6c68c8967b6d..0000000000000 --- a/Formula/numpy.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Numpy < Formula - desc "Package for scientific computing with Python" - homepage "https://www.numpy.org/" - url "https://files.pythonhosted.org/packages/f1/2c/717bdd12404c73ec0c8c734c81a0bad7048866bc36a88a1b69fd52b01c07/numpy-1.19.0.zip" - sha256 "76766cc80d6128750075378d3bb7812cf146415bd29b588616f72c943c00d598" - license "BSD-3-Clause" - head "https://github.com/numpy/numpy.git" - - bottle do - cellar :any - sha256 "fa9c808a7473eac7f9366142edf410530792f0b7491fcb0035b05e6e9bfe19d1" => :catalina - sha256 "2caa9558fe1122f529c3bc6a88eff97fc1b76ab53c7c45997adb7d08c7c8042b" => :mojave - sha256 "e6ca79c3ca935316f3ec4c55572ac93baf1f0d73cb83e81df7c1cbc93eb9fa85" => :high_sierra - end - - depends_on "cython" => :build - depends_on "gcc" => :build # for gfortran - depends_on "openblas" - depends_on "python@3.8" - - 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 - - version = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", Formula["cython"].opt_libexec/"lib/python#{version}/site-packages" - - system Formula["python@3.8"].opt_bin/"python3", "setup.py", - "build", "--fcompiler=gnu95", "--parallel=#{ENV.make_jobs}", - "install", "--prefix=#{prefix}", - "--single-version-externally-managed", "--record=installed.txt" - end - - test do - system Formula["python@3.8"].opt_bin/"python3", "-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 diff --git a/Formula/numpy@1.16.rb b/Formula/numpy@1.16.rb deleted file mode 100644 index 717808717f863..0000000000000 --- a/Formula/numpy@1.16.rb +++ /dev/null @@ -1,75 +0,0 @@ -class NumpyAT116 < Formula - desc "Package for scientific computing with Python" - homepage "https://www.numpy.org/" - url "https://github.com/numpy/numpy/releases/download/v1.16.6/numpy-1.16.6.zip" - sha256 "e5cf3fdf13401885e8eea8170624ec96225e2174eb0c611c6f26dd33b489e3ff" - license "BSD-3-Clause" - revision 1 - - bottle do - cellar :any - sha256 "fff9f604e35a06cc3197cc818a851d037f6d8f30df04fc7640144966bfb15c91" => :catalina - sha256 "0d6a4439397cf4c684b6e01fb7038ed9b9943582d5ef15f080503755330ca615" => :mojave - sha256 "ed8d4fa6634bea85689ae4d5e316e9a3546469e44358aba6a9f73183fdcb4272" => :high_sierra - end - - depends_on "gcc" => :build # for gfortran - depends_on :macos # Due to Python 2 - depends_on "openblas" - - resource "Cython" do - url "https://files.pythonhosted.org/packages/d9/82/d01e767abb9c4a5c07a6a1e6f4d5a8dfce7369318d31f48a52374094372e/Cython-0.29.15.tar.gz" - sha256 "60d859e1efa5cc80436d58aecd3718ff2e74b987db0518376046adedba97ac30" - end - - 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 - - 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 - - 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 - - system "python", "setup.py", - "build", "--fcompiler=gnu95", "--parallel=#{ENV.make_jobs}", - "install", "--prefix=#{prefix}", - "--single-version-externally-managed", "--record=installed.txt" - - rm_f bin/"f2py" # avoid conflict with numpy - end - - test do - 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 diff --git a/Formula/nushell.rb b/Formula/nushell.rb deleted file mode 100644 index 74c33d921e64f..0000000000000 --- a/Formula/nushell.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Nushell < Formula - desc "Modern shell for the GitHub era" - homepage "https://www.nushell.sh/" - url "https://github.com/nushell/nushell/archive/0.16.0.tar.gz" - sha256 "ba596706bfdb58d10f1185ae0f9cd0988ab77a9972daefba5c93306f6ed314d6" - license "MIT" - head "https://github.com/nushell/nushell.git" - - bottle do - cellar :any_skip_relocation - sha256 "cab65dc4a1aaa49c1c46fb2bf20efbaec4bdca1714b1fc1151fde7fe55d20550" => :catalina - sha256 "cbb0c4a390446a75278ac24f61ffa6778ae930f289876d18a22fe742b9ef9058" => :mojave - sha256 "3f0bc08545bc91d89b8ca6499ae714b11b5d397e6812e1a490c0bc7722005989" => :high_sierra - end - - depends_on "rust" => :build - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - on_linux do - depends_on "pkg-config" => :build - end - - def install - system "cargo", "install", "--features", "stable", *std_cargo_args - end - - test do - assert_match "homebrew_test", - pipe_output("#{bin}/nu", 'echo \'{"foo":1, "bar" : "homebrew_test"}\' | from json | get bar') - end -end diff --git a/Formula/nut.rb b/Formula/nut.rb deleted file mode 100644 index 4933fbcbcb044..0000000000000 --- a/Formula/nut.rb +++ /dev/null @@ -1,103 +0,0 @@ -class Nut < Formula - desc "Network UPS Tools: Support for various power devices" - homepage "https://networkupstools.org/" - revision 2 - - stable do - url "https://networkupstools.org/source/2.7/nut-2.7.4.tar.gz" - sha256 "980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7" - - # Upstream fix for OpenSSL 1.1 compatibility - # https://github.com/networkupstools/nut/pull/504 - patch do - url "https://github.com/networkupstools/nut/commit/612c05ef.diff?full_index=1" - sha256 "9d21e425eba72fbefba3c3d74465d239726798f95063c3b90b2e4b9a12414e12" - end - end - - bottle do - sha256 "1586ba300fc949859b2bebb55af99bc634362db7633e91a0db30aad28bef9c09" => :catalina - sha256 "dde3a1e3dc4e86f77d01071c0d669ea600569b41f8e9f11bb16a6b19e39286ca" => :mojave - sha256 "6fda08463f3e551d255b80e6e467b1f2938c973ab016f81b1585dd73373da562" => :high_sierra - end - - head do - url "https://github.com/networkupstools/nut.git" - depends_on "asciidoc" => :build - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libusb-compat" - depends_on "openssl@1.1" - - conflicts_with "rhino", :because => "both install `rhino` binaries" - - def install - if build.head? - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "./autogen.sh" - else - # Regenerate configure, due to patch applied - system "autoreconf", "-i" - end - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--localstatedir=#{var}", - "--sysconfdir=#{etc}/nut", - "--with-statepath=#{var}/state/ups", - "--with-pidpath=#{var}/run", - "--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 - - def post_install - (var/"state/ups").mkpath - (var/"run").mkpath - end - - plist_options :manual => "upsmon -D" - - def plist - <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - ProgramArguments - - #{opt_sbin}/upsmon - -D - - - - EOS - 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 8a5411834e347..0000000000000 --- a/Formula/nutcracker.rb +++ /dev/null @@ -1,36 +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" - license "Apache-2.0" - head "https://github.com/twitter/twemproxy.git" - - bottle do - cellar :any_skip_relocation - sha256 "ffac57428129de09b69d1cff52add5e369dc61a7ff70882c44bebe05d1705ae0" => :catalina - 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 f007b59743134..0000000000000 --- a/Formula/nuttcp.rb +++ /dev/null @@ -1,25 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "0f5e7a2b61f91360023ef643c0a77fa711855b34006ff07867f1283051aded5c" => :catalina - sha256 "de0d1395983d9980dfff73de8282b76bf70c987fb36c68ff5e341f245507100a" => :mojave - sha256 "8d9ea3c88d5347b34cc4b3385b6898f942b8e4ff5a4f4a26897e4b66297e2692" => :high_sierra - 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 57214d033ca1c..0000000000000 --- a/Formula/nuvie.rb +++ /dev/null @@ -1,74 +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" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "286980f2c5b977f355d59bf2b10366b3c38613764b66707852e2934649089bc6" => :catalina - sha256 "b1cefbd62e4b350d330853e14f789cc0b137c19b434271d1837114e10a73b0ca" => :mojave - sha256 "f066beb078dd00f4b339ce25b7ff06dadd6ddf62283008ee149d2758c80e439b" => :high_sierra - 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 - - test do - pid = fork do - exec bin/"nuvie" - end - sleep 3 - - assert_predicate bin/"nuvie", :exist? - assert_predicate bin/"nuvie", :executable? - ensure - Process.kill("TERM", pid) - Process.wait(pid) - end -end diff --git a/Formula/nuxeo.rb b/Formula/nuxeo.rb deleted file mode 100644 index 8a72f88391b08..0000000000000 --- a/Formula/nuxeo.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Nuxeo < Formula - desc "Enterprise Content Management" - homepage "https://nuxeo.github.io/" - url "https://cdn.nuxeo.com/nuxeo-10.10/nuxeo-server-10.10-tomcat.zip" - sha256 "93a923a6e654d216a57fc91767a428e8c22cf5a879f264474f8976016e34ca6f" - - 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 4e5a30666c27b..0000000000000 --- a/Formula/nvc.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Nvc < Formula - desc "VHDL compiler and simulator" - homepage "https://github.com/nickg/nvc" - license "GPL-3.0" - revision 1 - - stable do - url "https://github.com/nickg/nvc/releases/download/r1.4.0/nvc-1.4.0.tar.gz" - sha256 "1a874bde284408c137a93b22f8f12b5b8c3368cefe30f3a5458ccdeffa0c6ad6" - # Upstream issue, only fix on master branch - # at the end of installation, nvc tries to donwload from IEEE, - # however the IEEE website changes the download path - # this patch fixes this issue - patch do - url "https://github.com/nickg/nvc/commit/db4565c33f7effcab4c8b886d664398a85b653f6.patch?full_index=1" - sha256 "41a7de8c78730cbf674246abdc3e824ba26723db963536cb019ed9deb77dc0a3" - end - end - - bottle do - sha256 "fa793a160f27114d00283841aa3b62f84fd96294ab32edec126b2394b2922e17" => :catalina - sha256 "7956048641f3bb90fedd773aa989ec8539ee4d8e896ebc8df1e9b73a5548a35a" => :mojave - sha256 "fa79164877d0f31bc605aca1bb2d4fea9f97dc22e83ece3c73b231529dfd4820" => :high_sierra - 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 "pkg-config" => :build - # llvm 8+ is not supported https://github.com/nickg/nvc/commit/c3d1ae5700cfba6070293ad1bb5a6c198c631195 - # and llvm 7 has issue on stable https://github.com/nickg/nvc/commit/dfd5606a182e00d5f7a9e28902234b374c7b2863 - depends_on "llvm@6" - - 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@6"].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 c4257f31a6fcb..0000000000000 --- a/Formula/nvi.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Nvi < Formula - desc "44BSD re-implementation of vi" - homepage "https://sites.google.com/a/bostic.com/keithbostic/vi/" - url "https://deb.debian.org/debian/pool/main/n/nvi/nvi_1.81.6.orig.tar.gz" - sha256 "8bc348889159a34cf268f80720b26f459dbd723b5616107d36739d007e4c978d" - revision 5 - - bottle do - cellar :any - sha256 "433ad12463c8b8f36f78295307d75b9886799b9dd924e2e483667c302a7a8b47" => :catalina - 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" - - uses_from_macos "ncurses" - - # 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://deb.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 a59aea417b1f6..0000000000000 --- a/Formula/nvm.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Nvm < Formula - desc "Manage multiple Node.js versions" - homepage "https://github.com/nvm-sh/nvm" - url "https://github.com/creationix/nvm/archive/v0.35.3.tar.gz" - sha256 "a88c8c1e920ca24c09a2f9f0733afa9d6ccf03fe068e9ffba488416d9710d4fb" - head "https://github.com/nvm-sh/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.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") - 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 900562dc00646..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/v7.0.0-release/nwchem-7.0.0-release.revision-2c9a1c7c-src.2020-02-26.tar.bz2" - version "7.0.0" - sha256 "1046e13a4c7f95860c8e8fac2b4d80657900ecd07a8242943d564048ce303514" - revision 2 - - bottle do - cellar :any - sha256 "fb3cfb7f4fb39a67732ca6998eda76e6cc1c16e8bec2c6798d0f11f1551329a8" => :catalina - sha256 "8bfc48faf6c9c75f1ac2f4888c6c5efde34ed13423b3f0672f33629951f8e3de" => :mojave - sha256 "2b21719fbfaa701d3b68381ce04a2fa115cafb94f11ace38519bf91b9569c89f" => :high_sierra - end - - depends_on "gcc" # for gfortran - depends_on "open-mpi" - depends_on "openblas" - depends_on "python@3.8" - 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["NWCHEM_LONG_PATHS"] = "Y" - # needed to use python 3.X to skip using default python2 - ENV["PYTHONVERSION"] = Language::Python.major_minor_version "python3" - 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["USE_64TO32"] = "y" - system "make", "nwchem_config", "NWCHEM_MODULES=all python" - 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", "0", "dft_he2+", "pyqa3", "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 eecf397f5fc51..0000000000000 --- a/Formula/nxengine.rb +++ /dev/null @@ -1,75 +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" - license "GPL-3.0" - - bottle do - cellar :any - rebuild 1 - sha256 "9184041001a3035713542230c9e4a536491919ff0459cc79f294366ab20719a5" => :catalina - sha256 "69ef501ebc7a488fc46b4546b91288c7b8dc1cfdadb2bc1ee73611dd062f38e5" => :mojave - sha256 "79eece70c7ab5ddb92c8c711a609b996456ff5b7c6c8a008166a351e6889797f" => :high_sierra - 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 0c8657872a3ba..0000000000000 --- a/Formula/nyancat.rb +++ /dev/null @@ -1,30 +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 "997fc4e89ef493a356e781543d69343e96a08547aba3bec53bd1db64b48f3436" => :catalina - 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 37d89b461e14a..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 2 - - bottle do - cellar :any - sha256 "6138b062f2a435928485795e2b3bdef81983a87137d4bf73029838f19c1210f5" => :catalina - sha256 "cb2cbfbd8df94b8581a116807075daf9fadbe9b9c5cfa537ea30dfa76537dd5c" => :mojave - sha256 "3df9b3197c8dc9a227221027047c8de77ddb6ad9ce2edd14544c2d6e4923b660" => :high_sierra - sha256 "b7eeab5896aaaca9c73166e519d092a71f15a36e800a28742729f8cbc270e6d8" => :sierra - 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 023a5dd6a60f4..0000000000000 --- a/Formula/nyx.rb +++ /dev/null @@ -1,31 +0,0 @@ -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" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "606f92ecc381c9d319537d607305fdaae230de8e426e6d5df41fc0c878f2a0d1" => :catalina - sha256 "21ed9b2f6e986b53916eedad3e5d69a8d3c32fedfd61824e78381d68ec7b548d" => :mojave - sha256 "61f9d689b22252460f42ec83b59a425f6d3a77d308d741360afa6435c429ed62" => :high_sierra - end - - depends_on "python@3.8" - - resource "stem" do - url "https://files.pythonhosted.org/packages/71/bd/ab05ffcbfe74dca704e860312e00c53ef690b1ddcb23be7a4d9ea4f40260/stem-1.8.0.tar.gz" - sha256 "a0b48ea6224e95f22aa34c0bc3415f0eb4667ddeae3dfb5e32a6920c185568c2" - end - - def install - virtualenv_install_with_resources - 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 f34fcc25b91b4..0000000000000 --- a/Formula/nzbget.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Nzbget < Formula - desc "Binary newsgrabber for nzb files" - homepage "https://nzbget.net/" - url "https://github.com/nzbget/nzbget/releases/download/v21.0/nzbget-21.0-src.tar.gz" - sha256 "65a5d58eb8f301e62cf086b72212cbf91de72316ffc19182ae45119ddd058d53" - license "GPL-2.0" - revision 1 - head "https://github.com/nzbget/nzbget.git", :branch => "develop" - - bottle do - sha256 "d44d1a8dbd26f5cdb307c08f3294bd381ca79d51c48f51df98ae10a19272397e" => :catalina - sha256 "1d69e26d929d2a1be4824ea8c2134d543033462302bc5527269d5ca7b1b2c575" => :mojave - sha256 "862bd9889d1590b8e3f600419f2bbf84f1ea7582ed55c58eccc024382d6db245" => :high_sierra - sha256 "2e174f6c4df74ef3cd5decca500963db0c99d71553da624693ec4e9d085a0a56" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - uses_from_macos "libxml2" - uses_from_macos "ncurses" - - 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..d694f97527c54 --- /dev/null +++ b/Formula/o/oak.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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, 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..6654b0b390a7e --- /dev/null +++ b/Formula/o/oakc.rb @@ -0,0 +1,40 @@ +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" + + bottle do + rebuild 2 + 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..a459f3a028f10 --- /dev/null +++ b/Formula/o/oasdiff.rb @@ -0,0 +1,52 @@ +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.4.tar.gz" + sha256 "9e000211f5a9561ffeb6ab078e02177349f1f262a69f0619d9b0a507cc73498e" + 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_sequoia: "2492fce9f9c04e2a63065f318202b8096faa8fe2d10137eaa440a1fce32d57a8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2492fce9f9c04e2a63065f318202b8096faa8fe2d10137eaa440a1fce32d57a8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2492fce9f9c04e2a63065f318202b8096faa8fe2d10137eaa440a1fce32d57a8" + sha256 cellar: :any_skip_relocation, sonoma: "1e30d27b8221cac705df90e3d5da2a044b8ddb646f5b294319c6fecb88cc3b47" + sha256 cellar: :any_skip_relocation, ventura: "1e30d27b8221cac705df90e3d5da2a044b8ddb646f5b294319c6fecb88cc3b47" + sha256 cellar: :any_skip_relocation, x86_64_linux: "79814fa3454417be7ebf2da31ebf0f627850637a0c8192739f5dd8dc02b45d86" + 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/oath-toolkit.rb b/Formula/o/oath-toolkit.rb new file mode 100644 index 0000000000000..012d24bc28685 --- /dev/null +++ b/Formula/o/oath-toolkit.rb @@ -0,0 +1,50 @@ +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.12.tar.gz" + mirror "https://fossies.org/linux/privat/oath-toolkit-2.6.12.tar.gz" + sha256 "cafdf739b1ec4b276441c6aedae6411434bbd870071f66154b909cc6e2d9e8ba" + 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_sequoia: "48cff9d9c17d7a8955db7df8ed9df1b542b1860f45a85ac321534faf1ba9f48b" + sha256 cellar: :any, arm64_sonoma: "24dcc5b994f410171e1eaf2f45b032ddec6dd2a41daba5228ca5b247327a5d32" + sha256 cellar: :any, arm64_ventura: "68298fee2815c22a314f1b121b2ac624cbc3b160831c80a4727f625ac4e98450" + sha256 sonoma: "8238e0cbb73ddbeaf854e2d72ebc780a6770960011c4170e33693c33e5d87272" + sha256 ventura: "9720311caa80a8b5ca3968337a05e788c051738ac3626c4e879e72f860728963" + sha256 arm64_linux: "90be7b01eca8aed744b3db5c82a49be6f2e3cfeb666c8f7c9436855c2044d928" + sha256 x86_64_linux: "c161af7b8bd8f281efc7d65c226d812283125c0d7cd3b9ce272c123a7ae5749a" + 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/oauth2_proxy.rb b/Formula/o/oauth2_proxy.rb new file mode 100644 index 0000000000000..7f08d1dfc5149 --- /dev/null +++ b/Formula/o/oauth2_proxy.rb @@ -0,0 +1,68 @@ +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.9.0.tar.gz" + sha256 "a9c5884c1366d7597a42cdcea9b3c16778d4866fb3bfee3077ec4b8cdd95443f" + license "MIT" + head "https://github.com/oauth2-proxy/oauth2-proxy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d6917ee41aa37f9c2be286d42366a8f2d098064dbb114a116395682be1a09d26" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b0dd5e6fecea930baf695257d4e6bb067d602d20dd93fec4941804e501a69ec" + sha256 cellar: :any_skip_relocation, arm64_ventura: "21e18c0a40289d7850f9eb4ec31a724bdcf1fe6366d602f3bd84dad14b6753b6" + sha256 cellar: :any_skip_relocation, sonoma: "be6c51e0f49d011ba9bf4fb927ca455b995ab87cf58210705ab6351f9d70b177" + sha256 cellar: :any_skip_relocation, ventura: "c6e16d7025e6caf1fc1655f1cea4806868f027aa7850311b1d6f6275e6fe52b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c0782f2a35e85a6b1ef8519f5cbd584268b05a95c93ff9c2ab588619efcd226" + 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..7681684645fb3 --- /dev/null +++ b/Formula/o/oauth2c.rb @@ -0,0 +1,37 @@ +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_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, 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..61272ace8dd9b --- /dev/null +++ b/Formula/o/oauth2l.rb @@ -0,0 +1,27 @@ +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_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, 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..9cc7bb90603aa --- /dev/null +++ b/Formula/o/obfs4proxy.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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, 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..55c7f96757614 --- /dev/null +++ b/Formula/o/objc-codegenutils.rb @@ -0,0 +1,60 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "7a10354a20ef417eeb521c983f4714be063b68e6d74bec7ddf6f72b99d3cbfbe" + sha256 cellar: :any_skip_relocation, high_sierra: "118c03e858a60fa17c71fbc84fb5a8b9c5f778a0c68531e3df576e1d85d9c91a" + sha256 cellar: :any_skip_relocation, sierra: "d7b3d3d26970add3af78b0820f3ef8b5e0290f1b2114f5bf06acddcd8d6bdb34" + sha256 cellar: :any_skip_relocation, el_capitan: "d7b945db595b07ee5677902586e01002ba555affdcae366f1fcbe919a6013772" + 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..600e1f93ac188 --- /dev/null +++ b/Formula/o/objc-run.rb @@ -0,0 +1,26 @@ +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" + + 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..0238d3a123d00 --- /dev/null +++ b/Formula/o/objconv.rb @@ -0,0 +1,57 @@ +class Objconv < Formula + desc "Object file converter" + homepage "https://www.agner.org/optimize/#objconv" + url "https://www.agner.org/optimize/objconv.zip" + version "2023-03-29" + sha256 "0c5ca8fbc7ef1c4afe3cc7cc9018711a5885afacbe8bcebc48028d1ec90ccc7c" + 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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b4714a356e16792f3980afc77dc4be1dc71f422b1f018581add5627a7029938" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e8ce3fb8918b114d7db84a03abb75f67cdc66f19278aad8cde5b22e11db7522" + sha256 cellar: :any_skip_relocation, arm64_ventura: "85414b31d4d8ea9a57997b842eb53f709b5c72783c3bd5c7481b4b5004d72d99" + sha256 cellar: :any_skip_relocation, arm64_monterey: "203bc4a3d83551c9ad541a48616c8471affbe9560d16b36b302ae94d2b939f78" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "d5b8bc140a605c3aba686d7ba7a28a50ca68b7a8b67cd78bda3e2c95f5c227f4" + sha256 cellar: :any_skip_relocation, sonoma: "a507a2d6fa3e3459f77ca6803b0b126de5e3ab51303dae842925928a3f7dd32d" + sha256 cellar: :any_skip_relocation, ventura: "17dd03b46e6b029335e573035c4ab7fb60bb17ce8a64d83109a711df0ed8124d" + sha256 cellar: :any_skip_relocation, monterey: "362a2f558092bd6268378d3248d477a10aa8dd771d54d7f1e8f12f2bd91b9952" + sha256 cellar: :any_skip_relocation, big_sur: "2853283d56d4f091e9931fa84f10652f0a9e3df302471bfc523a317b7cd3c02c" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4006dcb1682c6f8c22ba8956c307e6124def71c1aa47b227b2232de81426f91" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0377932fae0f1e90636136f000858e53e8ca96e2a00c1554a5a217766b9cb7b" + 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..b5de11067cfe4 --- /dev/null +++ b/Formula/o/objfw.rb @@ -0,0 +1,75 @@ +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.3.tar.gz" + sha256 "de9e8a84437c01dacb9e83d7de0e3f7add3152165707d51a4caec640e4f56ba6" + license "LGPL-3.0-only" + head "https://objfw.nil.im/", using: :fossil + + livecheck do + url "https://objfw.nil.im/wiki?name=Releases" + regex(/href=.*?objfw[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "4c9acb6b2cbb4c5f60327bc0b45eaded42f416f56efcaa4b079b1841b563e486" + sha256 arm64_sonoma: "e07a67967f009dad95cac824238475e5509ddabb2908c8a8318ed600b54bef8c" + sha256 arm64_ventura: "c2263362599830bcb994be5ec834960386f52542d8aed892837c418d6b821fb8" + sha256 sonoma: "105960305b587763883ef15b78e9babb71bd74d64328e37d4c438ab4dbaedfe2" + sha256 ventura: "e13c3bf6a4a1f6d389d75978d3c8ccc3236d0c599a4c24b133a024dcf48274fc" + sha256 arm64_linux: "02e8e1ec91e72f84e041911ab4fadd221c5d54d78b3660dcd84d4d705a028f6d" + sha256 x86_64_linux: "abc0b34c221438f218cb7b667bde87c888d05a1c6f4bafe333e2052d668305a4" + 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 + patch do + # Fix building for macOS 13 with old SDK, as used by Homebrew. + url "https://github.com/ObjFW/ObjFW/commit/2d297b2d3702d24662819016b57f0a67d902990d.patch?full_index=1" + sha256 "39ccc15f5f5123dae4c86ce6dfbb21ce08a4b4b600e6d6faa19268657e5cf3e8" + end + + 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,${prefix}/Library/Frameworks/$$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..030bf9b34b2d4 --- /dev/null +++ b/Formula/o/observerward.rb @@ -0,0 +1,31 @@ +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.5.15.tar.gz" + sha256 "c7c6b546f411c7fc05c72f81e1a78a42337b628ea6ad555f93f882c6f5256708" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4a91d718b3fed1b3e8eafacd6ed00d7f785ee44df5afd77617f711275d127cd2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d1225c14ac4d89b0f6d98e32b99bc8a49198f402ea52fe530615b39e3666f8b3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "09122df4ec6181ea8327efdf7828423082617cec80d82b874857fa26e5cd0ad9" + sha256 cellar: :any_skip_relocation, sonoma: "47e0c202ce6d9035a2628bebec2ad98c1ea9eeb51a075967ba16e028e8ef4e5a" + sha256 cellar: :any_skip_relocation, ventura: "c18b353c57bc5d4d088d3ef0c6bf168a942036e0ae0896436acfe4d9c41fa2df" + sha256 cellar: :any_skip_relocation, arm64_linux: "d1730c67652acef23a72664f496516bdc199f47008a75d5c373edfae25914619" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16254e5e8789333392aefd58d3fcd2d6391d14d94aaf73ceeba71aaed67a6523" + 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..da423728cffba --- /dev/null +++ b/Formula/o/ocaml-findlib.rb @@ -0,0 +1,56 @@ +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 1 + + livecheck do + url "http://download.camlcity.org/download/" + regex(/href=.*?findlib[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "9364a3bfccbfa17b1de67b0811237748181251ca875105e010deca7c8b8c7c38" + sha256 arm64_sonoma: "45a15d80b15f259a02a9665646a85ec6844445670e3b7f083ab1bcd447b2d480" + sha256 arm64_ventura: "70d057e89961c844b0a54234a7630f0e73ef9654bda57da6da9ac98bd4ea6e26" + sha256 sonoma: "7d40608def1547faa7db079f9d6e8e1bb84ecd22bb3b51af0562416eae5b580d" + sha256 ventura: "9953fc46d00a4952c6f5982e241743aee3a1587abbaaa2ab084e3c1a07f5f94a" + sha256 arm64_linux: "946dec027ce88f81d2342a021bb3839ca38d7eda3e8777bb115f369575af4cd6" + sha256 x86_64_linux: "2aada46fd1e1d708cbb09f084dc896e26d35869ea8fdfd2830fb0d31caeb0b27" + 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..2447061ee2993 --- /dev/null +++ b/Formula/o/ocaml-num.rb @@ -0,0 +1,55 @@ +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.5.tar.gz" + sha256 "7ae07c8f5601e2dfc5008a62dcaf2719912ae596a19365c5d7bdf2230515959a" + license "LGPL-2.1-only" => { with: "OCaml-LGPL-linking-exception" } + revision 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "6d725e2394822cf187d7e62e026e2074d3634cc0d446b99628b940fb17a98fc5" + sha256 cellar: :any, arm64_sonoma: "0770ab23c6c1522658854b81feee508616d0961ed59df5fce51668b148ec663c" + sha256 cellar: :any, arm64_ventura: "4c8ae18c3e506a523126dfbaa5c0e985403b3755605acd2958e77c8ae8b92ddb" + sha256 cellar: :any, sonoma: "893b09b47a9314c067180e6ed6aef8ee5409367b879b34c0bcfa9f2f4fb6dbbe" + sha256 cellar: :any, ventura: "8ac2491b750fcba45378a3078a59c946d05f770a97852e2f6ed300b47b91517f" + sha256 cellar: :any_skip_relocation, arm64_linux: "bea4a13f1bd4a051e1589226b5349defd7d7b61a37817e673c15edc56d9dccdb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db6ecc0fac0cfe98ec8caa2f97962d497d9e892aa9064a81490852555f65fc19" + end + + depends_on "ocaml-findlib" => :build + 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 "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..300521f66f563 --- /dev/null +++ b/Formula/o/ocaml-zarith.rb @@ -0,0 +1,58 @@ +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 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "ed8861f99b854e2e65c9d294e01f6b8ed0788abc19ebd3d4dc3ce7cfa34db096" + sha256 cellar: :any, arm64_sonoma: "1fef98a78a16f4a16510d4504391226ef04dae87230d44e8bc31e5b90909e8e7" + sha256 cellar: :any, arm64_ventura: "c19075b8f0aa1e49811a07157d742fb7efd44cacc40bcf4f6a333b41c90b3414" + sha256 cellar: :any, sonoma: "3786c671d7fffb86a26e445c1da3f7144f612baf1830e53bbb45941df0b693c4" + sha256 cellar: :any, ventura: "1ca4591569e5651a8f6dcee7e567eefa1801bda9a30e1494ef1c059aa1da7f17" + sha256 cellar: :any_skip_relocation, arm64_linux: "4757ac0829b2b289ca4400f4cf7a881a80d2e7a1d8f8bd8aef0eddab7d54b543" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3ab7fd9e6eb25af8bf079f8b35985320694dbba6f44c4764ba123f129d9749b" + 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..481aedb414e22 --- /dev/null +++ b/Formula/o/ocaml.rb @@ -0,0 +1,65 @@ +# 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.2/ocaml-5.2.1.tar.xz" + sha256 "06cda7a23d79c1d3b36b3aa7283a5ed58798ddd871f2c269712611dc69f573b2" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "1cb7adeb65626b6c5b9963d956885356d97683f0f2a1d54d2c198a5edefbd44c" + sha256 cellar: :any, arm64_sonoma: "92d197de2d3c53e0b59812f4633cea69ffe0283c1e4a58ee40aaf78a0d59280c" + sha256 cellar: :any, arm64_ventura: "bbc25adfbb86c127354d2d53d2981a4ad86daad08011b77ca32e82fd5efbe87f" + sha256 cellar: :any, sonoma: "97ba2b31fa0ff21902f5cf1fb12ffe1460abd5a5501ccd6737cdf860b3cac073" + sha256 cellar: :any, ventura: "2c59bbe9532886d0240b4d8e1c3cd084042e62d4eaadf86004dcdab7e2c47f0c" + sha256 arm64_linux: "cb0092ebb8c80fbb2fc64101e0d6fb9f371498a2932b92284aee1ecfd2692317" + sha256 x86_64_linux: "8bb80e167c8c295f6c078ab998b5f12d54c764bed796f0b576e951691c8de384" + 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 + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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=#{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..2dac60c22862b --- /dev/null +++ b/Formula/o/ocaml@4.rb @@ -0,0 +1,61 @@ +# 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 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..a53642bca107c --- /dev/null +++ b/Formula/o/ocamlbuild.rb @@ -0,0 +1,35 @@ +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_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..432e472a40cd3 --- /dev/null +++ b/Formula/o/oci-cli.rb @@ -0,0 +1,120 @@ +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/8b/b4/04a981faddbae6b5a0a28abfc679b1414fa919fa9dd179b90cb10c2b4771/oci_cli-3.54.5.tar.gz" + sha256 "b1a8067a7660e99969d63909e781ab15ee7299abaaf71564f3430a82ba2441f0" + 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_sequoia: "9b7ade20a1260ee240c1173f690e2b186bbf1be22410df97b4c6493e5fd98abd" + sha256 cellar: :any, arm64_sonoma: "cd0d616737faf7674d834962ded4f71850be43eb1c1d14da28babc359c93fa16" + sha256 cellar: :any, arm64_ventura: "fa9ecb4f744d02cdb58167cbd8e3d5ee08036fa480356bd6dcb8cc8448ef9a46" + sha256 cellar: :any, sonoma: "fc11e1de840cf989d35a4a902ae3ce243c784975d4f94a03850a4e4ebd42d159" + sha256 cellar: :any, ventura: "8b6afacb22c159eeab5b7f87e85880abec034672dca8df8076f10573cd4f1453" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d697e1d1d4bcdc2f3af782854b1d95b21741dddd7954b0307e0e894f84e63a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0eedf48f83a0e922f004078476e6f69aed1319a1c9e8fa44ca556b0c22ee5d4" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + resource "arrow" do + url "https://files.pythonhosted.org/packages/2e/00/0f6e8fcdb23ea632c866620cc872729ff43ed91d284c866b515c6342b173/arrow-1.3.0.tar.gz" + sha256 "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" + 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/50/f6/b6a45db992966e15a166e3ebe7db7ef0231fb99a1a0a1e438f312ea957bd/oci-2.150.3.tar.gz" + sha256 "f5208670d9dd92e4af2e2c46f9747cc6ac897416d245f8ff9a87b305feb01f69" + 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/c1/d4/1067b82c4fc674d6f6e9e8d26b3dff978da46d351ca3bac171544693e085/pyopenssl-24.3.0.tar.gz" + sha256 "49f7a019577d834746bc55c5fce6ecbcec0f2b4ec5ce1cf43a9a173b8138bb36" + 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 "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 "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/a9/60/47d92293d9bc521cd2301e423a358abfac0ad409b3a1606d8fbae1321961/types_python_dateutil-2.9.0.20241206.tar.gz" + sha256 "18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + # Loosen `pyyaml` version pin: https://github.com/oracle/oci-cli/pull/858 + inreplace "setup.py", "PyYAML>=5.4,<=6.0.1", "PyYAML>=5.4,<=6.0.2" + + 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_and_link Pathname.pwd + end + + generate_completions_from_executable(bin/"oci", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + version_out = shell_output("#{bin}/oci --version") + assert_match version.to_s, version_out + + 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..eef638609598a --- /dev/null +++ b/Formula/o/ocicl.rb @@ -0,0 +1,61 @@ +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.5.22.tar.gz" + sha256 "78e378a84f96f52a0dd8518a9d049f94d2d76ee0c3ec7db1384104e45b5c20e5" + license "MIT" + revision 2 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2c34b753fac4edbd33b038d6ddf96cdcb6d2805818b9f4ea88630e2587682f1c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "588cb750c2337b57daa5f554d579c66a6b461159056b7cb599cbb96b1ce733b1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "273cc467c930cd4aad386cdd73074b0e4458899665d21340ad36187661465c17" + sha256 cellar: :any_skip_relocation, sonoma: "c053d1994fa359e3b98e771eca7b3daa50cec28cc96e0a724a9533e1c0b08313" + sha256 cellar: :any_skip_relocation, ventura: "f5985e0d9e81cc99ac8a826fc53d3483116666c71ca67e2e9eae0bfc1628c7b3" + sha256 cellar: :any_skip_relocation, arm64_linux: "99d3aa5b3200fe1a2115554d1ae13f5351b6ff59c082d2b9854d2e2a48200364" + sha256 cellar: :any_skip_relocation, x86_64_linux: "03e4a516d90ad60992b99ee680c4a6585a9dfe20f1daf2abb4bb14fb32fd85c6" + 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..acaf6b64c0c59 --- /dev/null +++ b/Formula/o/ocl-icd.rb @@ -0,0 +1,64 @@ +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.3.tar.gz" + sha256 "8cd8e8e129db3081a64090fc1252bec39dc88cdb7b3f929315e014b75069bd9d" + license "BSD-2-Clause" + head "https://github.com/OCL-dev/ocl-icd.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d7c8afe9e6b8ffe2a22f19d6e5c83308d667b9900ecbbeea099877edd9158eb6" + sha256 cellar: :any, arm64_sonoma: "8a01c3947a0c26d9838becad8e921973b537e082a3eeaeaec6fd096451f63aa5" + sha256 cellar: :any, arm64_ventura: "a1a5c38cc3f5225611ae2bb8d374150bbcb6477df308cda5f2794578f1fa2741" + sha256 cellar: :any, sonoma: "ca8f8666d60286deb53df27393f6bd8aaf992189205cc11906252a119d6e2e2d" + sha256 cellar: :any, ventura: "fc457f354e908f301613f53f00724dfd2004703095db6cd07e24eb4836e7fb38" + sha256 cellar: :any_skip_relocation, arm64_linux: "3544838851909491b806b9c6123ec2b86521f98f09100a6613fe6f56d47fcda6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cecdc2cd21d76f3037b0357fbbe8bfbbd5eba87007131cfc71b5cb47177302dc" + 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..51e80f38c087e --- /dev/null +++ b/Formula/o/oclgrind.rb @@ -0,0 +1,164 @@ +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 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "0dcf5df23a8e0972f081f74a530e1181e17d1fb7ad6d4af5d5a0d40faf25626b" + sha256 cellar: :any, arm64_ventura: "ed53c5dcfe4878ac26531acdffe5ab48647c48b06f43332993f523986f99c797" + sha256 cellar: :any, arm64_monterey: "39f07818c2dffcce37d58d8aaeba1c824c68c33db786e89d6b692b262b76647a" + sha256 cellar: :any, sonoma: "8c0333807ba86699af7cbe5daaf1fe1545f1ef0ebd4c93e081ba5b0722a97fba" + sha256 cellar: :any, ventura: "ddaa39e73997893783482ef2744877704d393e069ddb999aa34ebedd9435d8b9" + sha256 cellar: :any, monterey: "a04a89b7bde89c7bfa2d83ab13521f8ed5ea8b6b3ce7470ecf3c995408527986" + sha256 cellar: :any_skip_relocation, arm64_linux: "6a473d7f99466f9479d86534e11c73b7ba417bd7f02d5e5736490991645c3cdc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "867889a512d1c460d03496a763adf0d8c0d18b3ceea4d6ade2907d9513241b9a" + end + + depends_on "cmake" => :build + depends_on "llvm@14" # Issue for newer LLVM: https://github.com/jrprice/Oclgrind/issues/209 + 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 + + 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..b4eb3883ba59b --- /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.5.tar.gz" + sha256 "517bf06ca0185fa6e6debece168a83ec63a28cda71477f90a7889921b7cc703f" + license "Apache-2.0" + head "https://github.com/openshift-online/ocm-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0dec937d8c52fdbd9cec924899c1e88d76912f2ef8e9b4893ad63ce7c1745908" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b2702120f14af14d391a5d1d4bec7c7b56366526dd50e4535c4e506344b22235" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1b66aa2e4cedc890b370c40d4ec5a75b6ef5af5b6e8ba9ddc8fbfd58320aa589" + sha256 cellar: :any_skip_relocation, sonoma: "297b69f6612e5adf0c02b2707b53a0c3d2e66301599267fe555921ab58207d2b" + sha256 cellar: :any_skip_relocation, ventura: "ebb746a466988fd7dbc251b2753fc65e3f9b41dae7311afa2c8ed269921a884c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5d8793d32d0e2ca7e7f2b79ac9daa9f1ffdea4b92cfee811ae796e84416fd82" + 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..6caaa979e0a42 --- /dev/null +++ b/Formula/o/ocmtoc.rb @@ -0,0 +1,55 @@ +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.3.tar.gz" + sha256 "9954194f28823e4b1774d2029a1d043e63b99ff31900bff2841973a63f9e916f" + license "APSL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "76c855fd1977f72607d1a5e666eb281e43d39ed12d80195f2ac223ce23a0f72f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "12fda27f6b2cd588a3d5bbea9cc63834f08cf32e6b62f78b8bcee54d3435519d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "78b7bf8993b3b48e9844cd01811ae6365c9ffd3880d304977ae0833f4c0eaac3" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3e754be1f248ee6535ac24a9b60a2bbcd4aedd7d8e6d3ade111ec7b0a34e30f7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "5268ef4754ba65b4b3414e39baf1a748501c5451650e72adae13b9411caeded0" + sha256 cellar: :any_skip_relocation, sonoma: "a7958ebea6eb25570b0ff9539c6fba863d8815fc3893d0960bd413ca8c69bbae" + sha256 cellar: :any_skip_relocation, ventura: "15a56ba72b6a997bf4607a99eb88bf9d6d3edcf0e5720a6ac0bcd21afd793fa4" + sha256 cellar: :any_skip_relocation, monterey: "8d7d0bf8c739d0d4aac299ba7a8e340ebac0e05f7ac077184cef31f24c143de6" + sha256 cellar: :any_skip_relocation, big_sur: "ee2274b07ea977cf6b3b66815d5c91e9d01d1b9a7ebe8df60712aded4dc0cfbb" + end + + depends_on xcode: :build + depends_on :macos + + conflicts_with "mtoc", because: "both install `mtoc` binaries" + + def install + # error: DT_TOOLCHAIN_DIR cannot be used to evaluate HEADER_SEARCH_PATHS, use TOOLCHAIN_DIR instead + inreplace "xcode/libstuff.xcconfig", "${DT_TOOLCHAIN_DIR}/usr/local/include", + "${TOOLCHAIN_DIR}/usr/local/include" + + 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..510acdf385147 --- /dev/null +++ b/Formula/o/ocp.rb @@ -0,0 +1,91 @@ +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_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://ftp.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..bd51a370f2c89 --- /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 + + bottle do + 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, mojave: "786f0c42a3d282b78d8dc2fa18c36e46707451f4ac848e9af7dd82ab31b40f6d" + sha256 cellar: :any, high_sierra: "0cd70ac67ebd419b869ad4dd70c6cd1217248c8e7b7a57d3a7c8e15c7d2f7dfc" + sha256 cellar: :any, sierra: "8e33eae007c082ec9b6787210096a4e20992151a7b2c5f345941f68c478ae0e2" + 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..19c6f9ac3e49e --- /dev/null +++ b/Formula/o/ocrad.rb @@ -0,0 +1,46 @@ +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.29.tar.lz" + mirror "https://ftpmirror.gnu.org/ocrad/ocrad-0.29.tar.lz" + sha256 "11200cc6b0b7ba16884a72dccb58ef694f7aa26cd2b2041e555580f064d2d9e9" + license "GPL-2.0-or-later" + + bottle do + 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..def478bec7cbe --- /dev/null +++ b/Formula/o/ocrmypdf.rb @@ -0,0 +1,127 @@ +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/cd/67/524ae8f93dd60f59b10798f09286efe6670d1b277d4add78a1916a94003e/ocrmypdf-16.10.1.tar.gz" + sha256 "9f32059fc97e25931aaa0a8a4027b8c9faca7d9e1183089f32e0cba5631449f1" + license "MPL-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bbd2d06d0499eaaa54a81faf386aaeb75531ed6dffe9545101c12bd2635b5072" + sha256 cellar: :any, arm64_sonoma: "a0392d121b861fb3991467007ee4b272a1530088782548025ad7788f0b3b557e" + sha256 cellar: :any, arm64_ventura: "c37f857a1cfc986775d4a12186141f20a27a91591e12671eb452227fbcdc7dc6" + sha256 cellar: :any, sonoma: "5a4ad00c5b89de17316f4fe20f5dfcd83c07d103f75e758aa5d471841467bcf5" + sha256 cellar: :any, ventura: "0297fd55d99762e9a327eec657f103febf16f7bb9738e86c1ae3a7e019808c53" + sha256 cellar: :any_skip_relocation, arm64_linux: "3bbc89c60fcabc7d54118972c2dba1d51f12f7b8b7b9d53047b02f5ade333fa6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5a6ed079684bb461316fe25c27015841fd11750645a3bd25dcbf94a0022a4528" + end + + depends_on "pkgconf" => :build + depends_on "cryptography" + depends_on "freetype" + depends_on "ghostscript" + depends_on "img2pdf" + depends_on "jbig2enc" + depends_on "libheif" + depends_on "libpng" + depends_on "pillow" + depends_on "pngquant" + depends_on "pybind11" + depends_on "python@3.13" + depends_on "qpdf" + depends_on "tesseract" + depends_on "unpaper" + + uses_from_macos "libffi", since: :catalina + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/c2/62/c7402ffe11d43e88dbab6b7255f16743f8b9cbb3e7d3405f95a677a98c47/img2pdf-0.6.0.tar.gz" + sha256 "85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + 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 "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/a8/27/1a99ce4cfce829bb91040f82a53f33b33fec4e070d2b9c1b45f6796cd8dc/pdfminer_six-20250416.tar.gz" + sha256 "30956a85f9d0add806a4e460ed0d67c2b6a48b53323c7ac87de23174596d3acd" + end + + resource "pi-heif" do + url "https://files.pythonhosted.org/packages/4f/90/ff6dcd9aa3b725f7eba9d70e1a12003effe45aa5bd438e3a20d14818f846/pi_heif-0.22.0.tar.gz" + sha256 "489ddda3c9fed948715a9c8642c6ee24c3b438a7fbf85b3a8f097d632d7082a8" + end + + resource "pikepdf" do + url "https://files.pythonhosted.org/packages/9d/eb/4756ba366b5b243a1b5711e02993ea932d45d7e2d750bf01eb0029dc443e/pikepdf-9.7.0.tar.gz" + sha256 "ab54895a246768a2660cafe48052dbf5425c76f6f04e0f53b911df6cfd7e1c95" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + 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..6f995305e0d6c --- /dev/null +++ b/Formula/o/octave.rb @@ -0,0 +1,168 @@ +class Octave < Formula + desc "High-level interpreted language for numerical computing" + homepage "https://octave.org/index.html" + url "https://ftp.gnu.org/gnu/octave/octave-9.4.0.tar.xz" + mirror "https://ftpmirror.gnu.org/octave/octave-9.4.0.tar.xz" + sha256 "fff911909ef79f95ba244dab5b8c1cb8c693a6c447d31deabb53994f17cb7b3d" + 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 + sha256 arm64_sonoma: "02df3b19d768b9c9c916ac8f83c2e5ce5a2bb6f4378e2636815f8955803e6517" + sha256 arm64_ventura: "717833173d4174a853985c754a15beb66a08c71c2e9ffa82dadffe621c825941" + sha256 sonoma: "6fd05e8553e29919169dc215ac199329a097be10051b6e8b1c0e4f4b6797affe" + sha256 ventura: "af03a3c1861f1c67835332ebaa6039f3c11bf3b7a4533fb5b46e9ae9406c6d84" + sha256 x86_64_linux: "7992c7b4af1378136ce26a6df328e2414be9deab5adcdfc3be385ec28bc804f8" + 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 "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 "qt" + 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 + + # 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)%/, + '""' + + ENV.prepend_path "PKG_CONFIG_PATH", Formula["qt"].opt_libexec/"lib/pkgconfig" if OS.mac? + + 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++11', '-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++11', '-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..ded8e13062803 --- /dev/null +++ b/Formula/o/octobuild.rb @@ -0,0 +1,57 @@ +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.7.2.tar.gz" + sha256 "8917f689546d590442a0720f09b4a30485b4ca660a63427cd2851d7e977ae794" + license "MIT" + head "https://github.com/octobuild/octobuild.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dcf28ddedd6966f418a0261937675783fdc28b05b039110ad12c303c5461dcf7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb47d1bfe2700c29530168a58e6a891886e3b9c2f3a116995f9166424bae6efc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8195cf1ddc828a99454636f95333cc9fd697af4bb3403d5ebdf7ff1e79227f02" + sha256 cellar: :any_skip_relocation, sonoma: "fd15daa3735cc44f80697b2804d13c980dcade0849ba1551e518ddee28e2cacf" + sha256 cellar: :any_skip_relocation, ventura: "f636e240f0593534d816805fa35d40dd1a189d234c5ca19c99be3b45ddd09c8e" + sha256 cellar: :any_skip_relocation, arm64_linux: "7eaa98da0a1213bc41b5452d2816d5a8a98a5bdf2c474b0e22f986dc59f15e50" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3362d910f2f9b447046d75f7feb044b679c35bcb1991597b1e0320fc24f9a695" + end + + depends_on "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + 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..b1b0627e38e69 --- /dev/null +++ b/Formula/o/octomap.rb @@ -0,0 +1,44 @@ +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_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..642346d6e19bc --- /dev/null +++ b/Formula/o/octosql.rb @@ -0,0 +1,52 @@ +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_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, 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..954fa39190237 --- /dev/null +++ b/Formula/o/odbc2parquet.rb @@ -0,0 +1,37 @@ +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.0.0.tar.gz" + sha256 "d0f311edd3b6386b15c1510a03c9dae088ef3ce680912545e9f3ceecce340643" + license "MIT" + head "https://github.com/pacman82/odbc2parquet.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ec29707b33d331e1289bacc553550225ecc0d4919ed6f0a37eb04631b7f5eb91" + sha256 cellar: :any, arm64_sonoma: "758e0d65f61d16d76f95b2c0c28ce1b7f4361cab11f476ea78b7104a7072ce58" + sha256 cellar: :any, arm64_ventura: "3396a7a65d0ab6c85f140aa75d85efc9fdd85338bc83af0b190790fd05c171b1" + sha256 cellar: :any, sonoma: "b57e6021b2ac0e23978793a886ad96b862ba992fdd24c2cf9052a7cbf64afaa6" + sha256 cellar: :any, ventura: "393a7afcc299f124264980c9db43abe8ca36f0ff3cbda29d71eb70d5d9a11ffc" + sha256 cellar: :any_skip_relocation, arm64_linux: "14ba98ea2068f86bb9f950cc06c0f396e90dd94addcbf1cf310a94ef55e33969" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e622159247dcc3876ef43754e852e87f47061a98224d2ce962d93c25d9d2a2c" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "unixodbc" + + def install + # upstream patch PR to improve dynamic unixODBC library path handling, https://github.com/pacman82/odbc-sys/pull/50 + ENV["RUSTFLAGS"] = "-L#{Formula["unixodbc"].opt_lib}" + ENV["ODBC_SYS_STATIC_PATH"] = Formula["unixodbc"].opt_lib + + 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..48dfabe19d3c9 --- /dev/null +++ b/Formula/o/ode.rb @@ -0,0 +1,84 @@ +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_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..a5fd5ff4cbf41 --- /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-04", + revision: "d9f990d42e2a1bccf3e7be8ba02efa6504e9af9b" + version "2025-04" + license "BSD-3-Clause" + head "https://github.com/odin-lang/Odin.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "7db718db30a1550b4a257bf38a8c4760444fe690e79823bec57ef72531e19453" + sha256 arm64_sonoma: "29b07670d0f84f2d3cbf5e44797246913f1408e25633c2842b18d13edc5aab2c" + sha256 arm64_ventura: "a1c4e779f3e0f4eeef5c06c5190b576c451efbe7db4bf7e4048e05c4084d09eb" + sha256 cellar: :any, sonoma: "a57b5002a4131c081be1d99ad99d319ac271406704b5e1a817c39da4bb6deb0d" + sha256 cellar: :any, ventura: "9f92112d2995381ea558c36c2f93605c452d9cdba7d215a26ae648539c4a7c66" + sha256 cellar: :any_skip_relocation, arm64_linux: "69c5405ef06d38cb1bd97a307fd108ba79b7bdb3cf2d31632726b6ad13bba14b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff99f77d215a0919e14ee0c7241979b07e8f36f372e4ea99cee3042b787251f0" + end + + depends_on "glfw" + depends_on "lld" + depends_on "llvm" + 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_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}" unless build.head? + 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 odin "#{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..3580b290ee520 --- /dev/null +++ b/Formula/o/odo-dev.rb @@ -0,0 +1,59 @@ +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_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..737739d69e3c3 --- /dev/null +++ b/Formula/o/odo.rb @@ -0,0 +1,41 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "f2bee7fa62ba66589fb75b3eb9b32c843e0bfc4f054521876fd891388765eec9" + sha256 cellar: :any_skip_relocation, high_sierra: "0bfc54617186d149c98593c74dfaa59a42b2edcc7df1855fd452594ec42f1476" + sha256 cellar: :any_skip_relocation, sierra: "06af025b0a2df201a9b79944dcc4809708b305242622a90c92a9906a18adf2d6" + sha256 cellar: :any_skip_relocation, el_capitan: "979cc7131a35180614e848fa5fa12a72f734da7321358c89dfbd425fc8dff837" + 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..fa14e3f9aace6 --- /dev/null +++ b/Formula/o/odpi.rb @@ -0,0 +1,42 @@ +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.5.1.tar.gz" + sha256 "8325384f9b332c4a3c91b5fa8189f26b07e8febba4310654d0b1b5d69687a0f6" + license any_of: ["Apache-2.0", "UPL-1.0"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "bc20e1e7c5dae5d19e845cde1c3d0497c71015ebdb13d36cff8f08741a4131b8" + sha256 cellar: :any, arm64_sonoma: "80b473d1a752d762306c4ddf263a5574050ed86d8cbaa89875e6a42361a08ceb" + sha256 cellar: :any, arm64_ventura: "01459cd115f60ee3c8a6ba124960b1b489801542152b1b6d203c01f0713fa433" + sha256 cellar: :any, sonoma: "ec0f29e806f41a0ffa56b81f1c4352f46f2d7d82be5885a4a673372019c10047" + sha256 cellar: :any, ventura: "7746fe52f85d8de435e00b0199009f6684d9deb224b4346cf8d68b67e7be14cb" + sha256 cellar: :any_skip_relocation, arm64_linux: "deaa4b1012c15bb7d9bcd07bfe50c308ac13c31599d4463505981eda31e71b5b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2175bfc184bc703d0c92fda2a7c685b8b0079ebf71292d65633816f568047437" + 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..10d1147f198fb --- /dev/null +++ b/Formula/o/odt2txt.rb @@ -0,0 +1,43 @@ +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" + + bottle do + rebuild 2 + 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, mojave: "eb4ea913c8c1f5108adae12acf43ada9033c3bdd2e6976fcce9726108b47df2b" + sha256 cellar: :any_skip_relocation, high_sierra: "02dd0957fda7e5845824951a3e98d2ac9a1a623a02709631d26496bbe0353dee" + sha256 cellar: :any_skip_relocation, sierra: "88fb433f9e72c6c727f9af5ff017d6bac07f29bc64bfa59f6b53d4ab52f42cb3" + sha256 cellar: :any_skip_relocation, el_capitan: "4b86c07be0d96899d76adee3bf65390beb4288eeddbfb531dfcdbc3f17ff5bc8" + 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..9422f9333999f --- /dev/null +++ b/Formula/o/offlineimap.rb @@ -0,0 +1,224 @@ +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.0.tar.gz" + sha256 "5d40c163ca2fbf89658116e29f8fa75050d0c34c29619019eee1a84c90fcab32" + license "GPL-2.0-or-later" + revision 3 + head "https://github.com/OfflineIMAP/offlineimap3.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2182b73d2eb5f2fc88614f4cd78889da9a8fa1cf7cf78e83884856f5dbc9e2da" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f075541e1fe801e4f1aae1391e7042d8dfc763910e556d6cbb84b7ecd222c89f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8ed6b9597ffe2c607b0098e3bf9b228412dbf51e06ca9046722874d178400131" + sha256 cellar: :any_skip_relocation, sonoma: "923fa39061bc987f7b370d44df0bc9af79e2c7fa1682b2cddbe8d102d1b122f4" + sha256 cellar: :any_skip_relocation, ventura: "19482c631666b82f1d13bdb2e73dbcc9fd6b97b00c5f0449077ef7b6b24fc1e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb60efdcd9b609890d2aaf97808112b99d4d4f233070f0832cf1c72741d36dd3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5be2017abd6712c16b557a9f64631f9ee673c707bc80d48a79fe74181902bd54" + end + + depends_on "certifi" + depends_on "python@3.13" + + uses_from_macos "krb5" + + resource "decorator" do + url "https://files.pythonhosted.org/packages/66/0c/8d907af351aa16b42caae42f9d6aa37b900c67308052d10fdce809f8d952/decorator-5.1.1.tar.gz" + sha256 "637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "gssapi" do + url "https://files.pythonhosted.org/packages/04/2f/fcffb772a00e658f608e657791484e3111a19a722b464e893fef35f35097/gssapi-1.9.0.tar.gz" + sha256 "f468fac8f3f5fca8f4d1ca19e3cd4d2e10bd91074e7285464b22715d13548afe" + 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 "portalocker" do + url "https://files.pythonhosted.org/packages/ed/d3/c6c64067759e87af98cc668c1cc75171347d0f1577fab7ca3749134e3cd4/portalocker-2.10.1.tar.gz" + sha256 "ef1bf844e878ab08aee7e40184156e1151f228f103aa5c6bd0724cc330960f8f" + 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 + + # Fix compatibility with Python 3.11+. + patch do + url "https://github.com/OfflineIMAP/offlineimap3/commit/7cd32cf834b34a3d4675b29bebcd32dc1e5ef128.patch?full_index=1" + sha256 "ffddf6f43398ee13a761c78bece1b4262f9a46cc678966da6af2705ee0fbf1ba" + end + + # Support python 3.12 + patch do + url "https://github.com/OfflineIMAP/offlineimap3/commit/b0c75495db9e1b2b2879e7b0500a885df937bc66.patch?full_index=1" + sha256 "6f22557b8d3bfabc9923e76ade72ac1d671c313b751980493f7f05619f57a8f9" + end + + patch do + url "https://github.com/OfflineIMAP/offlineimap3/commit/a1951559299b297492b8454850fcfe6eb9822a38.patch?full_index=1" + sha256 "64065e061d5efb1a416d43e9f6b776732d9b3b358ffcedafee76ca75abd782da" + end + + patch do + url "https://github.com/OfflineIMAP/offlineimap3/commit/4601f50d98cffcb182fddb04f8a78c795004bc73.patch?full_index=1" + sha256 "a38595f54fa70d3cdb44aec2f858c256265421171a8ec331a34cbe6041072954" + end + + # Fix warnings with Python 3.12+. + # Adapted from: https://github.com/OfflineIMAP/offlineimap3/commit/489ff3bdb1fbd9b483b094f24936e7161f30a754 + patch :DATA + + 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 + +__END__ +diff --git a/offlineimap/folder/Base.py b/offlineimap/folder/Base.py +index f871d6f..e798fb7 100644 +--- a/offlineimap/folder/Base.py ++++ b/offlineimap/folder/Base.py +@@ -24,7 +24,6 @@ from sys import exc_info + + from email import policy + from email.parser import BytesParser +-from email.generator import BytesGenerator + from email.utils import parsedate_tz, mktime_tz + + from offlineimap import threadutil +@@ -249,7 +248,7 @@ class BaseFolder: + basename = self.name.replace('/', '.') + # Replace with literal 'dot' if final path name is '.' as '.' is + # an invalid file name. +- basename = re.sub('(^|\/)\.$', '\\1dot', basename) ++ basename = re.sub(r'(^|\/)\.$', '\\1dot', basename) + return basename + + def check_uidvalidity(self): +@@ -866,7 +865,7 @@ class BaseFolder: + """ + msg_header = re.split(b'[\r]?\n[\r]?\n', raw_msg_bytes)[0] + try: +- msg_id = re.search(b"\nmessage-id:[\s]+(<[A-Za-z0-9!#$%&'*+-/=?^_`{}|~.@ ]+>)", ++ msg_id = re.search(br"\nmessage-id:[\s]+(<[A-Za-z0-9!#$%&'*+-/=?^_`{}|~.@ ]+>)", + msg_header, re.IGNORECASE).group(1) + except AttributeError: + # No match - Likely not following RFC rules. Try and find anything +diff --git a/offlineimap/folder/Gmail.py b/offlineimap/folder/Gmail.py +index 544931a..c71720a 100644 +--- a/offlineimap/folder/Gmail.py ++++ b/offlineimap/folder/Gmail.py +@@ -75,7 +75,7 @@ class GmailFolder(IMAPFolder): + + # Embed the labels into the message headers + if self.synclabels: +- m = re.search('X-GM-LABELS\s*[(](.*)[)]', data[0]) ++ m = re.search(r'X-GM-LABELS\s*[(](.*)[)]', data[0]) + if m: + labels = set([imaputil.dequote(lb) for lb in imaputil.imapsplit(m.group(1))]) + else: +diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py +index c9318c2..a2883a0 100644 +--- a/offlineimap/folder/IMAP.py ++++ b/offlineimap/folder/IMAP.py +@@ -509,14 +509,14 @@ class IMAPFolder(BaseFolder): + item = [x.decode('utf-8') for x in item] + + # Walk just tuples. +- if re.search("(?:^|\\r|\\n)%s:\s*%s(?:\\r|\\n)" % ++ if re.search(r"(?:^|\\r|\\n)%s:\s*%s(?:\\r|\\n)" % + (headername, headervalue), + item[1], flags=re.IGNORECASE): + found = item[0] + elif found is not None: + if isinstance(item, bytes): + item = item.decode('utf-8') +- uid = re.search("UID\s+(\d+)", item, flags=re.IGNORECASE) ++ uid = re.search(r"UID\s+(\d+)", item, flags=re.IGNORECASE) + if uid: + return int(uid.group(1)) + else: +@@ -526,7 +526,7 @@ class IMAPFolder(BaseFolder): + # ')' + # and item[0] stored in "found" is like: + # '1694 (UID 1694 RFC822.HEADER {1294}' +- uid = re.search("\d+\s+\(UID\s+(\d+)", found, ++ uid = re.search(r"\d+\s+\(UID\s+(\d+)", found, + flags=re.IGNORECASE) + if uid: + return int(uid.group(1)) +diff --git a/offlineimap/folder/Maildir.py b/offlineimap/folder/Maildir.py +index f319b66..198927f 100644 +--- a/offlineimap/folder/Maildir.py ++++ b/offlineimap/folder/Maildir.py +@@ -28,9 +28,9 @@ from .Base import BaseFolder + from email.errors import NoBoundaryInMultipartDefect + + # Find the UID in a message filename +-re_uidmatch = re.compile(',U=(\d+)') ++re_uidmatch = re.compile(r',U=(\d+)') + # Find a numeric timestamp in a string (filename prefix) +-re_timestampmatch = re.compile('(\d+)') ++re_timestampmatch = re.compile(r'(\d+)') + + timehash = {} + timelock = Lock() +@@ -61,7 +61,7 @@ class MaildirFolder(BaseFolder): + "Account " + self.accountname, "maildir-windows-compatible", False) + self.infosep = '!' if self.wincompatible else ':' + """infosep is the separator between maildir name and flag appendix""" +- self.re_flagmatch = re.compile('%s2,(\w*)' % self.infosep) ++ self.re_flagmatch = re.compile(r'%s2,(\w*)' % self.infosep) + # self.ui is set in BaseFolder.init() + # Everything up to the first comma or colon (or ! if Windows): + self.re_prefixmatch = re.compile('([^' + self.infosep + ',]*)') diff --git a/Formula/o/oggz.rb b/Formula/o/oggz.rb new file mode 100644 index 0000000000000..3f45afa407931 --- /dev/null +++ b/Formula/o/oggz.rb @@ -0,0 +1,41 @@ +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_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/formula-patches/c7dd59ab42edc3652529563bfb12ca9d1140c4af/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..77b4e42eb0986 --- /dev/null +++ b/Formula/o/ogmtools.rb @@ -0,0 +1,59 @@ +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 + + bottle do + 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, mojave: "0c4c8271cbdc79f5d444aca60f7e32c489961f364923e475107021f857122b64" + sha256 cellar: :any, high_sierra: "c84b3fe9a525a0f6719bab86a5b919af73b067b48134e9b9ff3225af9b728260" + sha256 cellar: :any, sierra: "ec07a396ce68d5c646c838e3129dbe6c8ca8ff7ea9126cd31f9844016582d0ec" + sha256 cellar: :any, el_capitan: "8e0ceae59b3a69647511dff89566a734d25a96a764893c7599ee1ece73890db5" + 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/formula-patches/e4957439/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..460fb235dc4f5 --- /dev/null +++ b/Formula/o/oh-my-posh.rb @@ -0,0 +1,47 @@ +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/v25.23.0.tar.gz" + sha256 "a51432663462ff79318b3ff4bc8d956c8ae0831df9f324a96f58e9532dbe4db8" + 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_sequoia: "3f77104bb35231eff14435c7f28e617eb911694ccd79f384311099890d690a8e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "298f7ea4aec71d3a2d5b0dea2d4adf853f104ebd9ea9fff7feef22ff5e0577d6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b8ebf6a87297da940d5644c2e01f01749120f9436e7eb77fa6681473649a6dbe" + sha256 cellar: :any_skip_relocation, sonoma: "7e9b5a29d95616a4d54d2a7c6580280f0cd3bf41506e1cfdb43023142fb0a9ae" + sha256 cellar: :any_skip_relocation, ventura: "955bf0e7add88f3b83fbd804cbec52c0ec65dba6a0947de0e00cd3303041ca23" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7486228f9b18fe6fab6d17544541d7d6737e588833f2fbbf49f9ab52479e425e" + 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 "Oh My Posh", shell_output("#{bin}/oh-my-posh init bash") + assert_match version.to_s, shell_output("#{bin}/oh-my-posh version") + end +end diff --git a/Formula/o/oha.rb b/Formula/o/oha.rb new file mode 100644 index 0000000000000..2394ddc66bf2e --- /dev/null +++ b/Formula/o/oha.rb @@ -0,0 +1,37 @@ +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.8.0.tar.gz" + sha256 "c09dce5de2020529a03309b96c98e51f6b94c63a73191c281df32024d62c19a7" + license "MIT" + head "https://github.com/hatoo/oha.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "720dacc70b5da848322d14e2c123629f17d62f8d38795e60a334c3137cad6918" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "847b9e1e0f85d79c3c77405ae08152cb4ddfdfa8e33fcd05c7e3f4619a327de1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fd38248ad25b39a3c0230aa6ea6cdf25387461d1f5f12f7f5352dde59790a44e" + sha256 cellar: :any_skip_relocation, sonoma: "e1bfbf08156b676f74baae9defdef6986bc2b8c8d3cf3b914140619292688d52" + sha256 cellar: :any_skip_relocation, ventura: "ab9eae1e4a28088cfd64254288d77007c043ab90122401b81a01dd754f9debe7" + sha256 cellar: :any_skip_relocation, arm64_linux: "7319f4969f55f0a581e0d233b5593fd54b32403decea445f58510456e21b588a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bd3866d6dcf4784ce901f91d15abc57a7fb6ab940917137236d4a8fd3750ce50" + 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..c06a7fed4262a --- /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: "master" + + bottle do + 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 cellar: :any, mojave: "b93054a4459a246895a524de21559fc1387e8cc6436d83481c7d85afc10be9e8" + sha256 cellar: :any, high_sierra: "2bcddb3687af78d9317be143579afe692f8a3034c51b1e7e07ddd53491792365" + sha256 cellar: :any, sierra: "716a64cf45acdb062651994384e88e74e5bf258a1b70b9b29cf09c5c115084e5" + 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..edede9f76e6d9 --- /dev/null +++ b/Formula/o/ohdear-cli.rb @@ -0,0 +1,24 @@ +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.3.0/ohdear.phar" + sha256 "6351b1e43f483fea283b0f3baf8753659ab067c8174c2bfa22dcd56b37840d12" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e29768367f0f27a1a99624c8d8f7d6cfaecb32fa245eb8f946040857eee7a8fb" + 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..d5ec8ec5556b4 --- /dev/null +++ b/Formula/o/oil.rb @@ -0,0 +1,59 @@ +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_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..60a5b2e9c8608 --- /dev/null +++ b/Formula/o/oils-for-unix.rb @@ -0,0 +1,44 @@ +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.29.0.tar.gz" + sha256 "34fdb53f1dbd2b8742ef74cd3a46d87abfcda18d0d645f29762c4fddb9a2b3ac" + 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_sequoia: "458894469477f2983786c18e710fb7dcba117fca119fa663790dc7bcd87672ed" + sha256 cellar: :any, arm64_sonoma: "aabac2877de0025ec567ca0b7ee4fd5e2c027d7a95f20326f3637118ce2f5acd" + sha256 cellar: :any, arm64_ventura: "277b088921164cc8a30de0ca14c997f4668b3bc72a869ff18bfabce0887cbc18" + sha256 cellar: :any, sonoma: "4d13d4d2d8333adaed0548b3b115197c2e60a63514d06f6e0fc22329a626693b" + sha256 cellar: :any, ventura: "c884e5a9dc13ffec8be12cc3aab1ebea5beb5651551a1c58a8310162ee6f7885" + sha256 cellar: :any_skip_relocation, arm64_linux: "16f179fc7f86eb971cf518be492415cf53e4786b9e4cf82e56279cb455513b81" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e594b3ab097a968c7412e1e99d1b174df101bf9fcec02c5d4584d7040727c58" + 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 parse_backticks" + 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..969bf80d3ea44 --- /dev/null +++ b/Formula/o/oj.rb @@ -0,0 +1,28 @@ +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.5.tar.gz" + sha256 "dfa9ce6608ea3d94584e4a47c6568a90844dd9d8f3fd35f8e893fa7fdd5d7bd7" + license "MIT" + head "https://github.com/ohler55/ojg.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7758e7e09c133bb4754fdcac53726583c0f8d27bd11553768212e87eba62026b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7758e7e09c133bb4754fdcac53726583c0f8d27bd11553768212e87eba62026b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7758e7e09c133bb4754fdcac53726583c0f8d27bd11553768212e87eba62026b" + sha256 cellar: :any_skip_relocation, sonoma: "519c8688bf5c29924491d87f7c323dec8104d2a0b68f82d5c5df11a89345d395" + sha256 cellar: :any_skip_relocation, ventura: "519c8688bf5c29924491d87f7c323dec8104d2a0b68f82d5c5df11a89345d395" + sha256 cellar: :any_skip_relocation, arm64_linux: "cf8e9cb061d52938211963f94baa609ed43d33ccee3e8b5f9cc70e48cfa25cee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ca280f0077e0c2e62ab224b7f3102b5faa39aa413bb5db455229debaf1f9f27" + 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..1d4c0590a548c --- /dev/null +++ b/Formula/o/oksh.rb @@ -0,0 +1,28 @@ +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.7/oksh-7.7.tar.gz" + sha256 "98a758f590bc570e657263f56eb81577a018ff6d2f6e085f8efedf9d68749f95" + 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_sequoia: "9793c9e02f01a8feff896ebd1bf1779f9cd3ce9b028b8f4882c9c11bcfc8eb38" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d1595b03d4c714d2c27d0e62bbcc9d13b68852c19ca3d83d08eb3523277a8555" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d838994b217f2fda5f7863ddf7f7219cfe10d6341109ab8f5049af5ada25b6be" + sha256 cellar: :any_skip_relocation, sonoma: "c7d7155672ef96777d6c99ae22019f151ea78fd6b7df4d5c2017659a796952ca" + sha256 cellar: :any_skip_relocation, ventura: "9c9215d0bc365cceba31c7663bd89d50eb90b20f64f9a54e15e62bbdcbb2e8ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "57077f64c3422719c5855422574060ddfd32773c6b59f69842c5d9184a0ff18d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "53579c85a910b31bb43252b91eb9fa6701b47774df80257f5f865ea3c8aa0f8d" + 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..e0c1ed6e35b21 --- /dev/null +++ b/Formula/o/okta-aws-cli.rb @@ -0,0 +1,35 @@ +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.4.1.tar.gz" + sha256 "dff4578c0572ce76d4c567ab114ad8f346c570e82fbad319f4a5784b9231c4f8" + 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_sequoia: "107cbec811d65d4095f9d84716183f08c5eeb6c0c8cf7857a7fc1cda5d6f37d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "107cbec811d65d4095f9d84716183f08c5eeb6c0c8cf7857a7fc1cda5d6f37d5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "107cbec811d65d4095f9d84716183f08c5eeb6c0c8cf7857a7fc1cda5d6f37d5" + sha256 cellar: :any_skip_relocation, sonoma: "b62f8cf74290855aa37a79d13958e9ec90edec3b9fb3a472fa20ac73c4c84ed8" + sha256 cellar: :any_skip_relocation, ventura: "b62f8cf74290855aa37a79d13958e9ec90edec3b9fb3a472fa20ac73c4c84ed8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33d3c4bad569a197addaf2839c094624097f51ac4fc40a5e5dfd8b923aa33927" + 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..055ae0ed53e5e --- /dev/null +++ b/Formula/o/okta-awscli.rb @@ -0,0 +1,106 @@ +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 3 + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, all: "317022aacef6cb0a90882bf72ab59192d700c916ea9633f046ffd2ab6049ca8d" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/b3/ca/824b1195773ce6166d388573fc106ce56d4a805bd7427b624e063596ec58/beautifulsoup4-4.12.3.tar.gz" + sha256 "74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b8/29/10988ceaa300ddc628cb899875d85d9998e3da4803226398e002d95b2741/boto3-1.35.39.tar.gz" + sha256 "670f811c65e3c5fe4ed8c8d69be0b44b1d649e992c0fc16de43816d1188f88f1" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/28/d83dbd69d7015892b53ada4fded79a5bc1b7d77259361eb8302f88c2da81/botocore-1.35.39.tar.gz" + sha256 "cb7f851933b5ccc2fba4f0a8b846252410aa0efac5bfbe93b82d10801f5f8e90" + 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 "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "configparser" do + url "https://files.pythonhosted.org/packages/a5/2e/a8d83652990ecb5df54680baa0c53d182051d9e164a25baa0582363841d1/configparser-7.1.0.tar.gz" + sha256 "eb82646c892dbdf773dae19c633044d163c3129971ae09b49410a303b8e0a5f7" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "validators" do + url "https://files.pythonhosted.org/packages/64/07/91582d69320f6f6daaf2d8072608a4ad8884683d4840e7e4f3a9dbdcc639/validators-0.34.0.tar.gz" + sha256 "647fe407b45af9a74d245b943b18e6a816acf4926974278f6dd617778e1e781f" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"okta-awscli", shells: [:fish, :zsh], 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..beac8a5fa0817 --- /dev/null +++ b/Formula/o/okteto.rb @@ -0,0 +1,34 @@ +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.7.0.tar.gz" + sha256 "d546611c64d7e39a65bae28a44e878c21f1ef759ab2ae0a26cf5573b1074d84f" + license "Apache-2.0" + head "https://github.com/okteto/okteto.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2e7afd43d02b1f5421ac7180bc828cf7ba2c8c4118b56d28b78a18a88a4ccd69" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "02e8454db51f7dbf0b53eceb8da1570df68e6b12f1e920321ce866d344db02af" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cc1006702348ce55fe47c8f94c9b814170ea98ac17f966f2bb0d76b04ae1d686" + sha256 cellar: :any_skip_relocation, sonoma: "bbf2dac62f3aa45545082188ece218d08d34251c6e4a0d116ad2b8cc7c5cc8f7" + sha256 cellar: :any_skip_relocation, ventura: "67582281b1bd37c1c8eff1c1d84a4b804ed45dc8b4fc5f71d2f44af87b2dd29b" + sha256 cellar: :any_skip_relocation, arm64_linux: "a57f6bffccfe635b3fe6a890cc9a69a1efd1cdf1686e81ad3368c52db99a7878" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de0800a06c51a01f9d4cf6e02028279578b21c67415ec25e8e04158c6c38d98d" + 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..4298e787b3806 --- /dev/null +++ b/Formula/o/ol.rb @@ -0,0 +1,35 @@ +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_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..046b1dea254e6 --- /dev/null +++ b/Formula/o/ola.rb @@ -0,0 +1,144 @@ +class Ola < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "Open Lighting Architecture for lighting control information" + homepage "https://www.openlighting.org/ola/" + license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"] + revision 5 + + 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 + + bottle do + sha256 arm64_sequoia: "6d4182b55d3ec40ac585f082515e7ee1125e42acbc6902e3ab1d15c01721b465" + sha256 arm64_sonoma: "9b45e675b229a1443b89f643533a07aaf3f9674062bbf6115ba899d1b5388b49" + sha256 arm64_ventura: "98db8a67a41af2686b691188404ac2c3ba49c1e63f20c929f2c37048a63aea12" + sha256 sonoma: "a548628c89e92f9d84659e771a35e745b44cab0713a49a0885f3a56ed075666c" + sha256 ventura: "b87bb7a4367d5859724b59883b8912bfeaa05317813dbedba687ba7c2b15d48b" + sha256 arm64_linux: "2ec0f72ea286942021bc89f5dd8d91bc7cf40efb18fdd0c917daf51fd31a69f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74cc94c3489eafd39fe993859da64ea188d1f1d40532fe044c75fe1f27e7ed27" + 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" + depends_on "python@3.13" + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "ncurses" + + on_linux do + depends_on "util-linux" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/f7/d1/e0a911544ca9993e0f17ce6d3cc0932752356c1b0a834397f28e63479344/protobuf-5.29.3.tar.gz" + sha256 "5da0f41edaf117bde316404bad1a486cb4ededf8e4a54891296f648e8e076620" + 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.13" + 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 == :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 + + # Skip flaky python tests. Remove when no longer running tests + inreplace "python/ola/Makefile.mk", /^test_scripts \+= \\$/, "skipped_test_scripts = \\" + + 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. + system "make", "check" + 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 + + 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..57fb8c6ba175a --- /dev/null +++ b/Formula/o/ollama.rb @@ -0,0 +1,67 @@ +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.7.0", + revision: "bd68d3ae50c67ba46ee94a584fa6d0386e4b8522" + 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_sequoia: "b12511e015536d79ba3a5b4c4f7eb0d00e595fe0ca6b993d9c2f6c648127504d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6b86e85c211c50aef0592246496264b9faed72f86f5ca6f1e46ccbbba0737c7e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b0bcd6c503926548d11f194539d2f2b7d11223b62b8a5261c5f45d41a38e2fb5" + sha256 cellar: :any_skip_relocation, sonoma: "b742ebcc4cfbf9b068d31478946f2dd29f344da12284de47ef6437f2fe70b77f" + sha256 cellar: :any_skip_relocation, ventura: "18424fccbc163c861f4da1ed533264c43da7485691e47e0aa99f377c075c1a38" + sha256 cellar: :any_skip_relocation, arm64_linux: "dbde55fd77e661b659863c334c49ed30fb78e2077307834996f12f7e7194764f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "701dc173be8b285a7df844d277fca713631787fba0fbd84af4e68b0c7cfed349" + end + + depends_on "cmake" => :build + depends_on "go" => :build + + conflicts_with cask: "ollama" + + def install + # 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" + 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..6a56958f2b058 --- /dev/null +++ b/Formula/o/olsrd.rb @@ -0,0 +1,86 @@ +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 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "874cb9fc08951755b92d6f4310d46d3204bf67785ae95d96d07ef754f22fbb83" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6c4e30770465a800d9d40fbf7098db2cbcffb15c511fdff67f9e6efda615122" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5855775631424ec0e2b51d6f3a08a83e595865c4f3090c24756d77a36f2d088b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "595f6879e8ea37977d87ce63927c7e731dde41717b070cec7faa8426e1c43109" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "46f59369b499e8dd35c9ae619ce0b893e0324778500a08007ece6c1329d19cdd" + sha256 cellar: :any_skip_relocation, sonoma: "e3a78a11535c74218df2662750962b39aab888ecd39e5c57571befaf0a608b5d" + sha256 cellar: :any_skip_relocation, ventura: "b8950dc67c22e934018c5898834001cfa8345f2828acee9fea14ce7b7131dc4f" + sha256 cellar: :any_skip_relocation, monterey: "a995c9cac2e2cb70a3235322c39fb259e634c932b45f0a64499c347003a03489" + sha256 cellar: :any_skip_relocation, big_sur: "5e94afd5a8ed394b3fae056b10af1575c6a4383500978c7afe0b1ee375c8b4bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8073b7d08955c4be42a261b9445bb61780e5e4650c9f8aca128eae05287b873" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2acf80ab45800922a52d9df98d466e657ff8b7d2dedb05cd9cd1c18f09457388" + 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..cf15c3bf54eaf --- /dev/null +++ b/Formula/o/omake.rb @@ -0,0 +1,61 @@ +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_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..b083c022c94b5 --- /dev/null +++ b/Formula/o/omega.rb @@ -0,0 +1,39 @@ +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_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/omniorb.rb b/Formula/o/omniorb.rb new file mode 100644 index 0000000000000..9936baadeef31 --- /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 + sha256 cellar: :any, arm64_sequoia: "e7abf96e7284d7abf7480684e14abf446fbe20776591a9d4eb64bfcfabf3cf25" + sha256 cellar: :any, arm64_sonoma: "0062f041ee755a5499bcad12c6d304a5f84b77de5633d5fd9528b6a6035900e4" + sha256 cellar: :any, arm64_ventura: "06e5fcc950f5bd8934951855e1acbca7a18777d99ca2073218ee13e888b24cac" + sha256 cellar: :any, sonoma: "93972edcb883ea5c63561cdda88284a7bd30ef24e83409a05c89fed5505c80fd" + sha256 cellar: :any, ventura: "0cb78910e40ccc4833f93ead6794755d5883be7b1f0ae27ff7af40626d880dcb" + sha256 cellar: :any_skip_relocation, arm64_linux: "04357c618eb071ed217ed53de4207e1df04180a0bb25db3c0887d7b0f0ddb9f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "26ff4fff24e440de45145c7d5db68cd860036563a2dbeb1a0606fc4af2c45bc6" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "python@3.13" + 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.13") + 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..a9cc1ccba40fc --- /dev/null +++ b/Formula/o/ompl.rb @@ -0,0 +1,65 @@ +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 1 + 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_sequoia: "041e10c377511ea45af40e962fa9ce470616dae2cde49c01333731dfe38f4b56" + sha256 cellar: :any, arm64_sonoma: "b821378e7302d00b6f8aadc22dd606392bda600b236ce744ab04a90617029477" + sha256 cellar: :any, arm64_ventura: "44393bc2559ef2cb1064943fdd2858cd6086b78a04cc0f98dcf19ec53f01bcb1" + sha256 cellar: :any, sonoma: "7cba8c475175ae9ad1824cb05b8dacf2605092883cb99a0d8fea2f73c21d939f" + sha256 cellar: :any, ventura: "7aa7fdf5d6d5e83483ce4a3ae8c923f8c212cef486896bba4b3bbfecd125a5eb" + sha256 cellar: :any_skip_relocation, arm64_linux: "36d4e4c8ae8e76a01f710f8af160e47e2e995633b8e53c09e8c67509ed64e79c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0800e3f94cdbf5727e2f79e6a90fa1a80ac182519e4557d2245d63346d5cbf4" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "eigen" + depends_on "flann" + depends_on "ode" + + 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 diff --git a/Formula/o/ondir.rb b/Formula/o/ondir.rb new file mode 100644 index 0000000000000..d67be3a223f5f --- /dev/null +++ b/Formula/o/ondir.rb @@ -0,0 +1,34 @@ +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_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..6d4bef959ce1b --- /dev/null +++ b/Formula/o/one-ml.rb @@ -0,0 +1,50 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "ddd62944bea4f0182b771d405d2255c1d5cdd9e217a2bc00891018de9458b7c2" + sha256 cellar: :any_skip_relocation, high_sierra: "d377a804f2f05d9f48869a6822bb42070be94b225d1d24ee0f4a3e23019532c8" + 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..ea6ef7d771940 --- /dev/null +++ b/Formula/o/onednn.rb @@ -0,0 +1,46 @@ +class Onednn < Formula + desc "Basic building blocks for deep learning applications" + homepage "https://www.oneapi.io/open-source/" + url "https://github.com/oneapi-src/oneDNN/archive/refs/tags/v3.8.tar.gz" + sha256 "06c11b9e4d25ddaaec219f0e93f6bdbbbc27dcf8eb992f76b768a2a056a087a9" + license "Apache-2.0" + head "https://github.com/oneapi-src/onednn.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e42d753c017a4e5500215f1da35107ac56151e25a9ea7666938c8a725114c73d" + sha256 cellar: :any, arm64_sonoma: "1e3f1a23fad88728134a6ac98434186de4a4636ed53b823ca215b5971e7882d6" + sha256 cellar: :any, arm64_ventura: "7eb34b92c93de40314a520bbeef8864e32f6a69f8a88d38a7d54968cf9db44fd" + sha256 cellar: :any, sonoma: "fbd866baa63a125581698f932aa553624b2a83c709a208da762882017d0615e8" + sha256 cellar: :any, ventura: "253634f300fd2d1a6271892b82db065b67da14a8fa68784f654852fb208f2e06" + sha256 cellar: :any_skip_relocation, arm64_linux: "95dd950079e37cacfd9b163a17c6b69d33723bb453a862bf2513166d9cdc0501" + sha256 cellar: :any_skip_relocation, x86_64_linux: "291943a184e27b72f6701a76a9a13bd3178b0aaee19ee8cbda4daabdf76c465f" + 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..671f8ba458d2d --- /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/oneapi-src/oneDPL" + url "https://github.com/oneapi-src/oneDPL/archive/refs/tags/oneDPL-2022.8.0-release.tar.gz" + sha256 "d500007e64efb778a72d34f25508db5b8e0f596eb2ec58f4c9211f9b461ef70b" + # Apache License Version 2.0 with LLVM exceptions + license "Apache-2.0" => { with: "LLVM-exception" } + + livecheck do + url :stable + regex(/^oneDPL[._-](\d+(?:\.\d+)+)(?:[._-]release)?$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "ac492d8a27791d6d828725a273b0473275bfc32ea4f9fc56406b9f171d049144" + 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.rb b/Formula/o/onedrive.rb new file mode 100644 index 0000000000000..4c39060b2a050 --- /dev/null +++ b/Formula/o/onedrive.rb @@ -0,0 +1,43 @@ +class Onedrive < Formula + desc "Folder synchronization with OneDrive" + homepage "https://github.com/abraunegg/onedrive" + url "https://github.com/abraunegg/onedrive/archive/refs/tags/v2.5.5.tar.gz" + sha256 "413a4e02c18c7c37d4cb6b57121116de7e628c7be1fce14e7db3fbcb1a0d364b" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "f1ead5dc849ef0116935be7dadfe2dddd5bf51f1785ae14655557646bc72af87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b273403588785ee1442e2189d69ec4fd6c9bbd28b3a65852ce613a8c591521dc" + end + + depends_on "ldc" => :build + depends_on "pkgconf" => :build + depends_on "curl" + 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..9fc0024df6498 --- /dev/null +++ b/Formula/o/onefetch.rb @@ -0,0 +1,48 @@ +class Onefetch < Formula + desc "Command-line Git information tool" + homepage "https://onefetch.dev/" + url "https://github.com/o2sh/onefetch/archive/refs/tags/2.24.0.tar.gz" + sha256 "41f457c9a8145de94980bcae497d84a56cd75c1598a6a9eeb45984947bf4f1f8" + license "MIT" + head "https://github.com/o2sh/onefetch.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c79034fef2b28abfb613dab6543eef17e6af769c95757166f1f727d37d5a42e8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c710fccdd294242271b24039e0fa3061a31e5dbbf51284c76f5787cdafc576a8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9d5b20ed5411fe25cb11826d296747c450106ec05a39c75f4aaa4c02e4270413" + sha256 cellar: :any_skip_relocation, sonoma: "abaf9ef77c37013d923120998bf635fef83a9306c49a4cef33e6d8b52abb5d8b" + sha256 cellar: :any_skip_relocation, ventura: "282e6231286ee1202b43383ad6fb4c204fe7f74dd8cc8d105e11615f1c455118" + sha256 cellar: :any_skip_relocation, arm64_linux: "4aa3c84ab3e60e49ef85ba76bb5de32fdf3d9cc0deaf31e8457accdd740d6a98" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8b5b8a5b8b13919f6d912ac00b3ddeeddca5efe0b0a721deabfba8a024b57106" + 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/oniguruma.rb b/Formula/o/oniguruma.rb new file mode 100644 index 0000000000000..c63f0b877b146 --- /dev/null +++ b/Formula/o/oniguruma.rb @@ -0,0 +1,37 @@ +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_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..c372635b3d0fe --- /dev/null +++ b/Formula/o/onion-location.rb @@ -0,0 +1,55 @@ +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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "554a06ca904691fa000b6821292db2a79bfaafafcc4d454fe2ce0620e172b313" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2617c96caf91e062cf0db6056b60950578d20a6df6fe812f4ee53c4309f40e84" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1ea093e13440726264ce4bd5efdf417960122feaa76a42b4609fdd2c3304d809" + sha256 cellar: :any_skip_relocation, sonoma: "f2afd83f62b2d82a043c85d6414616e302f98d47066d9bef7a5a02cd318e2254" + sha256 cellar: :any_skip_relocation, ventura: "0a15e033f4f7a39d15922df96da2dbbc45827f5aebdf2989f402819311b011f4" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7598772dd5bf3dc703622b0000e20d0f79e937e4f2865fc16e003c184057fde" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c3e568ec6369393e43bf7123fa7ef1e8fad4cfdd7a98b42f854f17fd8f07bca" + end + + depends_on "python@3.13" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/b3/ca/824b1195773ce6166d388573fc106ce56d4a805bd7427b624e063596ec58/beautifulsoup4-4.12.3.tar.gz" + sha256 "74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051" + 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/e7/6b/20c3a4b24751377aaa6307eb230b66701024012c29dd374999cc92983269/lxml-5.3.0.tar.gz" + sha256 "4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + 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..a8f684760a73e --- /dev/null +++ b/Formula/o/onioncat.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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..69d3086ffd275 --- /dev/null +++ b/Formula/o/onionprobe.rb @@ -0,0 +1,77 @@ +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/17/7c/e016a43640336dd392cd7abcac375341b499f95cf6ebc92ce5eda5e4845f/onionprobe-1.3.0.tar.gz" + sha256 "3024e0c737e38f4b9dce265d9e2bd7ef03879c46b2cd40c336a5161eb0affbd7" + license "GPL-3.0-or-later" + head "https://gitlab.torproject.org/tpo/onion-services/onionprobe.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9222f214b1620a345e9cf321b087dcc34542a7a98c74ff46555c3a9b52dd1a30" + sha256 cellar: :any, arm64_sonoma: "2b5d468661d595f8f431d6e7ea60d7b39354a914c0b4573c432d2d6d36477fe8" + sha256 cellar: :any, arm64_ventura: "0a14c6c6d81752053ab04199df5e67e1749939bc39fb6df43890ebd325f37d60" + sha256 cellar: :any, sonoma: "3a77783777dce8d656a6003f0cb8efd4df8cf9a93d45579b563a631bcb4da4c2" + sha256 cellar: :any, ventura: "8afcf6e56779767135cd9b45a7d968d22d6a98e409c9ff29a747a4feb88dcb1f" + sha256 cellar: :any_skip_relocation, arm64_linux: "69261fbf674c9daa3cdecab548a8d20de52e6dc1e71945cb9d10fa2beaa43a80" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38203b9e39cfecb4d59d439bc6f8f79f1df32e78532cb42297f215b223a3669f" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + depends_on "tor" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "prometheus-client" do + url "https://files.pythonhosted.org/packages/62/14/7d0f567991f3a9af8d1cd4f619040c93b68f09a02b6d0b6ab1b2d1ded5fe/prometheus_client-0.21.1.tar.gz" + sha256 "252505a722ac04b0456be05c05f75f45d760c2911ffc45f2a06bcaed9f3ae3fb" + 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/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 "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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..cf09eabbd3e95 --- /dev/null +++ b/Formula/o/onlykey-agent.rb @@ -0,0 +1,206 @@ +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 4 + + bottle do + rebuild 5 + sha256 cellar: :any, arm64_sequoia: "b815e4288102059716896bc6bfb08cd00ef2f126f2c3769da0bf7672d80c873e" + sha256 cellar: :any, arm64_sonoma: "1514e42110537c744a075238c45fca5d832f7057f517787d35b1dc864a418577" + sha256 cellar: :any, arm64_ventura: "dc66fe96ea14c51b5e890e0aebc6ab7d14cd6ed113545a12d907f3a38c642958" + sha256 cellar: :any, sonoma: "d2c8c844451378fbfcb691acab825950ea5f74ec2e8324d2a3c9ebcb3d201d2e" + sha256 cellar: :any, ventura: "20b57aec00914cb13cf6b455be4f34e4b415e9ee69c983640cf0740b44f25ef0" + sha256 cellar: :any_skip_relocation, arm64_linux: "fdeb03a92ecefbea76749a8986ee5524f357edb163b36d4cdf08602de21002a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "936e4decb9ea4681973c1572b7ee8e7e204c920abd35d2e1bcff1b6935a1aa4e" + end + + depends_on "pkgconf" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "gnupg" + depends_on "hidapi" + depends_on "libsodium" # for pynacl + depends_on "libusb" # for pyusb + depends_on "python@3.13" + + resource "aenum" do + url "https://files.pythonhosted.org/packages/d0/f8/33e75863394f42e429bb553e05fda7c59763f0fd6848de847a25b3fbccf6/aenum-3.1.15.tar.gz" + sha256 "8cbd76cd18c4f870ff39b24284d3ea028fbe8731a58df3aa581e434c575b9559" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/70/8a/73f1008adfad01cb923255b924b1528727b8270e67cb4ef41eabdc7d783e/ConfigArgParse-1.7.tar.gz" + sha256 "e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1" + end + + resource "cython" do + url "https://files.pythonhosted.org/packages/5a/25/886e197c97a4b8e254173002cdc141441e878ff29aaa7d9ba560cd6e4866/cython-3.0.12.tar.gz" + sha256 "b988bb297ce76c671e28c97d017b95411010f7c77fa6623dd0bb47eed1aee1bc" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/bb/6e/9d084c929dfe9e3bfe0c6a47e31f78a25c54627d64a66e884a8bf5474f1c/prompt_toolkit-3.0.51.tar.gz" + sha256 "931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/44/e6/099310419df5ada522ff34ffc2f1a48a11b37fc6a76f51a6854c182dbd3e/pycryptodome-3.22.0.tar.gz" + sha256 "fd7ab568b3ad7b77c908d7c3f7e167ec5a8f035c64ff74f10d47a4edd043d723" + end + + resource "pymsgbox" do + url "https://files.pythonhosted.org/packages/7d/ff/4c6f31a4f08979f12a663f2aeb6c8b765d3bd592e66eaaac445f547bb875/PyMsgBox-1.0.9.tar.gz" + sha256 "2194227de8bff7a3d6da541848705a155dcbb2a06ee120d9f280a1d7f51263ff" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + 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/f7/89/19151076a006b9ac0dd37b1354e031f5297891ee507eb624755e58e10d3e/Unidecode-1.3.8.tar.gz" + sha256 "cfdb349d46ed3873ece4586b96aa75258726e2fa8ec21d6f00a591d98806c2f4" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..75dbd24d3edc5 --- /dev/null +++ b/Formula/o/onnx.rb @@ -0,0 +1,109 @@ +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 2 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "87e803d38d384328e30a6104d461aa429168f34f90166034effa1f2393e68cc2" + sha256 cellar: :any, arm64_sonoma: "24042b9d2631f8eaa656651f4d8ae2c0bcf21c9494ad83af0d4157171df0a1dd" + sha256 cellar: :any, arm64_ventura: "4ea1894f1dbcf250d0a5a8fc6189dae1223c4c8f0540c6e2ce6ddb275d8e578a" + sha256 cellar: :any, sonoma: "d3d1459cffc0e2547efc589427b32bf67cf6d5e6daedf30c62747d7bc1bedb61" + sha256 cellar: :any, ventura: "657fa2a17084889403dc19a6385df4979c6bade3eea063e559668f387d5017c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f8ade75bd41095e4e6104c6fa4f3a296c52c626a5fc58ff63c13d8d859e53a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9527543ac126f35a52e537eb66386e7a73abc22c197cfc6e5e199dd3eeb949ad" + end + + depends_on "cmake" => [:build, :test] + depends_on "abseil" + depends_on "protobuf" + + uses_from_macos "python" => :build + + 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..ab1ffc66125e4 --- /dev/null +++ b/Formula/o/onnxruntime.rb @@ -0,0 +1,98 @@ +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.0", + revision: "f217402897f40ebba457e2421bc0a4702771968e" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "3f86b87a8fb5510d6f8c05918ba95c9d5c8ed00daa61cb01bb189d6523ae6f92" + sha256 cellar: :any, arm64_sonoma: "a4351dd4c5f4fe151b0053d8d3826e9456271cfab20dfeed65e2f8fb4f981e17" + sha256 cellar: :any, arm64_ventura: "031529e7abd12c6d314a8bb9b02b9411134c593aeeb203afa798381954a430ae" + sha256 cellar: :any, sonoma: "989b25e16644e5e6ca672ffd17dc03d4db442a22315d5b7ee6072f8c329e380a" + sha256 cellar: :any, ventura: "1e370da96913bbf6a18d94ecf11e80eeef02eac9bf238d05cbee11f4b8e212fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d8de910a50997637a731b2cd3af8525524f8e398bda38b0fc285bdd82acae46" + sha256 cellar: :any_skip_relocation, x86_64_linux: "421226c4a5e4c1f469d12197715dddf281b167fe6c4db790a2280eec9d0e7f0d" + 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.13" => :build + depends_on "safeint" => :build + depends_on "abseil" + depends_on "nsync" + 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' + # + # https://github.com/microsoft/onnxruntime/blob/v#{version}/cmake/deps.txt#L25 + resource "eigen3" do + url "https://gitlab.com/libeigen/eigen/-/archive/1d8b82b0740839c0de7f1242a3585e3390ff5f33/eigen-1d8b82b0740839c0de7f1242a3585e3390ff5f33.tar.bz2" + sha256 "37c2385d5b18471d46ac8c971ce9cf6a5a25d30112f5e4a2761a18c968faa202" + end + + # https://github.com/microsoft/onnxruntime/blob/v#{version}/cmake/deps.txt#L51 + resource "pytorch_cpuinfo" do + url "https://github.com/pytorch/cpuinfo/archive/8a1772a0c5c447df2d18edf33ec4603a8c9c04a6.tar.gz" + sha256 "37bb2fd2d1e87102baea8d131a0c550c4ceff5a12fba61faeb1bff63868155f1" + end + + def install + python3 = which("python3.13") + 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_SOURCE_DIR_PYTORCH_CLOG=#{buildpath}/build/_deps/pytorch_cpuinfo-src + -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 + (testpath/"test.c").write <<~C + #include + #include + int main() + { + printf("%s\\n", OrtGetApiBase()->GetVersionString()); + return 0; + } + C + system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-lonnxruntime", "-o", "test" + assert_equal version, shell_output("./test").strip + end +end diff --git a/Formula/o/ooniprobe.rb b/Formula/o/ooniprobe.rb new file mode 100644 index 0000000000000..cc25bc949c00a --- /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.25.0.tar.gz" + sha256 "9222fb2d0b93ba1bf4cf7edcee7dfac6518fc622d606204724d8ed7de43fb5dd" + 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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f0712a91bde69b39e58c852018aa946b59553651d4e1fb34941a71993061b43" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c2c22444bad6411e2a1ba3c9641b62f6c52dc9c7ea9e11be14f69ed5069138b5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6886c7bd5714d7538b1b498ef9836387b73c7809c84071a7c14cad22564a530d" + sha256 cellar: :any_skip_relocation, sonoma: "73124bf2ae34df1fb14d8437d0afd0de84b5f0c40fb6a0685d82beb183fea83f" + sha256 cellar: :any_skip_relocation, ventura: "38f19827d1dd5fcbc271af1292ad920cc5d326158aab620c7eb3a9d77278182d" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ffa28943b2b4596d531eb77d1d382ae3a8aae98a7fb094d860d87fa220df6f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "238e11d37af2c226c2ed7f6f6dcda09c5b05600492d3f3524ed1671149b8d9b8" + 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..5abeed6766f76 --- /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.4.2.tar.gz" + sha256 "ef85e8a0f9f4804dc4578fa26fc0cedcac6a1efedb2b8f0291f6fefe5139861b" + license "Apache-2.0" + head "https://github.com/open-policy-agent/opa.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a94e39a49537a87e5bfb1f6e636e6025a2ce0508cb1dbc012cb32217fac4430e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "67bda8251f5644ad1b7fc569214ec337d0855944ea233999052d9e4e8ac18eb2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7997283fbbfe5e6279802b65abbada40ac18ba32b64df574fd7f8fa9aa728487" + sha256 cellar: :any_skip_relocation, sonoma: "2415cda5c0cae247f4811ac846023f4667049c751ad1705d82123a823124287f" + sha256 cellar: :any_skip_relocation, ventura: "ff4ee8bc1ff6ca7f79bda12ed80f63c737f03ac8ed2db4b2a68528693cd67000" + sha256 cellar: :any_skip_relocation, x86_64_linux: "143dbba475e0de49c178e5701315ff883ef76a01e87c814e06bb5c61969cb180" + 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..67977e632a406 --- /dev/null +++ b/Formula/o/opal.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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..3deb013940b01 --- /dev/null +++ b/Formula/o/opam.rb @@ -0,0 +1,63 @@ +class Opam < Formula + desc "OCaml package manager" + homepage "https://opam.ocaml.org/" + url "https://github.com/ocaml/opam/releases/download/2.3.0/opam-full-2.3.0.tar.gz" + sha256 "506ba76865dc315b67df9aa89e7abd5c1a897a7f0a92d7b2694974fdc532b346" + license "LGPL-2.1-only" + 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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "47acff18f55443e9c33b6c39cbd9a20e884f98adcb2919d29854c5d0e4cd089d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "62cde967f16957eb5ed95c3c4519b91bd36feef87b382fec69e68ec8d4bf0f20" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eea0a5362042e93f2532e0d263a00dd8c2025ec894203255af4791a247fee125" + sha256 cellar: :any_skip_relocation, sonoma: "e58068cb65843ce811808ddc622bb5333cd1b13eef483f0c4420bf2e904013e2" + sha256 cellar: :any_skip_relocation, ventura: "98346e4e16d18be444cbbd432798a5dd1e9664c3519af0f070f0aa2cb230b283" + sha256 cellar: :any_skip_relocation, arm64_linux: "b89e24fa3d72680f6640b9e3faf38ee1e92a8681ffab4d686d125636fc3b1acc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0a94893ed75763ac3ef12792c4873ed120f9165f30b20bb27a24a1d01a395f5" + end + + depends_on "ocaml" => [:build, :test] + depends_on "gpatch" + + 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", "--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..2dab4c2d04262 --- /dev/null +++ b/Formula/o/open-adventure.rb @@ -0,0 +1,57 @@ +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" + + livecheck do + url :homepage + regex(/href=.*?advent[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6eec5f4234610108d0981675069e9cb399629b5583375e8a3646cf40106ce84e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b79ead7a8777908582bbae02d996718401ad1e8ac590bc67acb9f47e90f6bdf0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "37eb08a624d5b0bed4316bdf8cbd41a32d61a47aa1049d6f14102b26cd3a7f8b" + sha256 cellar: :any_skip_relocation, sonoma: "29b1fc41c2bafbc1d51339ff08dfb7368014c747ed611230760e41007885dca3" + sha256 cellar: :any_skip_relocation, ventura: "48635b97a030dc943aa46c63ffc9d2577364d2c9b228361b3dc699db76d68976" + sha256 cellar: :any_skip_relocation, arm64_linux: "f83e115dd977b51f17c67a75324e40803f45791dec3539e8a8e6115098047b62" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cdd8abc0993bac8839ef252f7e567b40760072687fb0fd982967c599c19e758b" + end + + depends_on "asciidoc" => :build + depends_on "libyaml" => :build + depends_on "python@3.13" => :build + + uses_from_macos "libxml2" => :build + uses_from_macos "libedit" + + on_linux do + depends_on "pkgconf" => :build + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + def install + venv = virtualenv_create(buildpath, "python3.13") + 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..b33424de1b7a3 --- /dev/null +++ b/Formula/o/open-babel.rb @@ -0,0 +1,85 @@ +class OpenBabel < Formula + desc "Chemical toolbox" + homepage "https://github.com/openbabel/openbabel" + license "GPL-2.0-only" + revision 2 + 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 + + bottle do + rebuild 4 + sha256 arm64_sequoia: "6e65ad2651937d58c9c4c023948ef066fb47d80c1add72a46478dc068a3b8889" + sha256 arm64_sonoma: "4dae715c5d682d7dbc2629f8942de25888cb0a17ecf7097d0e4b0b5293f6a599" + sha256 arm64_ventura: "74af59afb37e1a715f5993d8f2003c2a4b9cfcd8c0d25706658318ca8e0bfe4b" + sha256 sonoma: "e5e91a303d0090db9fe25ea23850d11967f37f4bc97a242c98e3309d35323d58" + sha256 ventura: "0a1482bfbb03ce95e687277d86aa7c1bac4dd1b4f9daeeebb5e7197196877c8e" + sha256 cellar: :any_skip_relocation, arm64_linux: "742382d270de232c3470fb281db5d1c5f47e15e19912fab122dfb33459075b72" + sha256 x86_64_linux: "e9f6607712d55e1397a70b5e5242664ad606f8a0b990deb36161f3f11ddaa1af" + 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.13" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + def python3 + "python3.13" + end + + conflicts_with "surelog", because: "both install `roundtrip` binaries" + + def install + system "cmake", "-S", ".", "-B", "build", + "-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)}", + *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..937e577fe3a5c --- /dev/null +++ b/Formula/o/open-completion.rb @@ -0,0 +1,24 @@ +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" + + 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..c0afe793bfe33 --- /dev/null +++ b/Formula/o/open-image-denoise.rb @@ -0,0 +1,48 @@ +class OpenImageDenoise < Formula + desc "High-performance denoising library for ray tracing" + homepage "https://openimagedenoise.github.io/" + url "https://github.com/OpenImageDenoise/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_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 + # clang: error: unknown argument: '-fopenmp-simd' + # https://github.com/OpenImageDenoise/oidn/issues/35 + depends_on macos: :high_sierra + 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..d5f1d52cf1fd7 --- /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"] + + bottle do + 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, mojave: "bed36f972fe3dc3d5f286eff5c1b1605a1bcfae6cc755b7b2aee57fc497f7913" + sha256 cellar: :any_skip_relocation, high_sierra: "cd50656bb81db4528b82b844c773440d6cdfec63e545a64002a473da05a7eb18" + sha256 cellar: :any_skip_relocation, sierra: "b015d173b77980d0da3a8eedad02fdff95ac919c790917ba9cb197db91207235" + 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..ebd9111968c01 --- /dev/null +++ b/Formula/o/open-mesh.rb @@ -0,0 +1,88 @@ +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_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..4ff133e9fed92 --- /dev/null +++ b/Formula/o/open-mpi.rb @@ -0,0 +1,164 @@ +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.7.tar.bz2" + sha256 "119f2009936a403334d0df3c0d74d5595a32d99497f9b1d41e90019fee2fc2dd" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/MPI v?(\d+(?:\.\d+)+) release/i) + end + + bottle do + sha256 arm64_sequoia: "29d2b61321a1b307229996e2a8cc6ad9f502bc1aeb32851bdc4b4baee8c90385" + sha256 arm64_sonoma: "850bb2b559721fb00e5f4df1e545940b504fd4ac2594b0be223c06915d66a20c" + sha256 arm64_ventura: "4adde9da7b928971c0204baa3d22015b2e593bea4bd382a070b0feeea7a53b74" + sha256 sonoma: "b3649a0c27cc4b8dc7dd12afeb0f4ef771add7edcc915552380ae960d95b3a12" + sha256 ventura: "20e6dd96c8535dceffb1fef0943a780d23c129f8ecb88b1e84b0d98db8048d0c" + sha256 arm64_linux: "8457a4d6716736c3c58fe9f2b34f1e4205e20e0ffb42e21071b1264d9820f173" + sha256 x86_64_linux: "35c717284633ea4e0524d2efa8bd9ad3e88809a5c5cbb7fb71eee5eede885bf5" + 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..0e691d3801aae --- /dev/null +++ b/Formula/o/open-ocd.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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 "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..4dce3a7ca1394 --- /dev/null +++ b/Formula/o/open-scene-graph.rb @@ -0,0 +1,109 @@ +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 + + bottle do + 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 + # Fix "fatal error: 'os/availability.h' file not found" on 10.11 and + # "error: expected function body after function declarator" on 10.12 + # Requires the CLT to be the active developer directory if Xcode is installed + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? && MacOS.version <= :sierra + + 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..b97a6da8380cf --- /dev/null +++ b/Formula/o/open-simh.rb @@ -0,0 +1,56 @@ +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 + + bottle do + 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 "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..79dd19224b0e4 --- /dev/null +++ b/Formula/o/open-sp.rb @@ -0,0 +1,66 @@ +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" + + bottle do + rebuild 5 + 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, mojave: "47a3595b023164a54f73009f5d0a1bd092355f7c5b357cb86e1ec781b101bcb8" + 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..2d8440cd8a65e --- /dev/null +++ b/Formula/o/open-tyrian.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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/open-zwave.rb b/Formula/o/open-zwave.rb new file mode 100644 index 0000000000000..44c91f27581a4 --- /dev/null +++ b/Formula/o/open-zwave.rb @@ -0,0 +1,52 @@ +class OpenZwave < Formula + desc "Library that interfaces with selected Z-Wave PC controllers" + homepage "https://github.com/OpenZWave/open-zwave" + url "http://old.openzwave.com/downloads/openzwave-1.6.1914.tar.gz" + sha256 "c4e4eb643709eb73c30cc25cffc24e9e7b6d7c49bd97ee8986c309d168d9ad2f" + license "LGPL-3.0-or-later" + + bottle do + sha256 arm64_ventura: "8d7c20fa4a5bd2b5691c3f8bf77b2cfe00669e0c7c779418c9c67c73d91ccb0e" + sha256 arm64_monterey: "46059e0f107fa894491dcca4afbc27487374077ac10d0c9e0466b70a21b98bdf" + sha256 arm64_big_sur: "946d78311179280c3460097a1b60331daa782d916b10e819b97fa80a06037c3f" + sha256 ventura: "83d061c5682540707b37c61c42567bb4b153803a0d7ec53d0c32c993b4d1d460" + sha256 monterey: "510ea3942d2bac0c420ce6f096c55d00158cb9d68eef036e893bb66c135a4246" + sha256 big_sur: "e3c9055c54562fc0fc8879f094359263626bb0cbb0b67a1c48999420f2f223c4" + sha256 catalina: "af0ac45b4c07da453526cc464cf777d17cdbb3760c34ddefcfb3435977139d91" + sha256 mojave: "9680488853f6ee6db1f0e299ff1f00597e8652c095ecb411e322a99b8b43caad" + sha256 x86_64_linux: "32e72b176dcd28b5876df5dca595f9d9a93c159d475fbbe2affb9e21d6e1c30b" + end + + disable! date: "2024-08-24", because: :unmaintained + + depends_on "doxygen" => :build + depends_on "pkgconf" => :build + + def install + ENV["BUILD"] = "release" + ENV["PREFIX"] = prefix + + # The following is needed to bypass an issue that will not be fixed upstream + ENV["pkgconfigdir"] = "#{lib}/pkgconfig" + + # Make sure library is installed in lib and not lib64 on Linux. + inreplace "cpp/build/support.mk", "instlibdir.x86_64 = /lib64/", "instlibdir.x86_64 = /lib/" + + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~CPP + #include + #include + #include + int main() + { + return OpenZWave::Manager::getVersionAsString().empty(); + } + CPP + system ENV.cxx, "-std=c++11", "test.cpp", "-I#{include}/openzwave", + "-L#{lib}", "-lopenzwave", "-lpthread", "-o", "test" + system "./test" + end +end diff --git a/Formula/o/open62541.rb b/Formula/o/open62541.rb new file mode 100644 index 0000000000000..349e75c13402b --- /dev/null +++ b/Formula/o/open62541.rb @@ -0,0 +1,52 @@ +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.12.tar.gz" + sha256 "4a551ca504d49fd4c87ebe64c82bcd51307d53c982ab5a9f23dbd902b18e9521" + license "MPL-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0b1646b7c40cfa81afb5d8d698c485b7bda4f0d0ea85cbf3032fca0756bc737c" + sha256 cellar: :any, arm64_sonoma: "9e7713dc172579cdd8a37a4b4dcd375012d78bbf13619e6653ca2977c7800526" + sha256 cellar: :any, arm64_ventura: "44206af81292c7b75535a9e7fc2636f8a70af5b818edec7078cd761ad83a0b21" + sha256 cellar: :any, sonoma: "68b278f1c3770de43facf11636d1d67e2aa53c1fab87ef6ba865c1154ccd6b70" + sha256 cellar: :any, ventura: "8f0f1b0fbdd8d933db23acfdacf8caab70cf1f7a82d7c996b28e0f0c5f59a2ea" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ea8a328474cbfdb06bd0b19d29a12381e4a12dae09366392d87737851c3c6f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c77a81f4455938891f7f5e2c572ec8bed6ed8539cffa3764964db085a173e970" + 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..e09930e816945 --- /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/f5/77/952ca71515f81919bd8a6a4a3f89a27b09e73880cebf90957eda8f2f8545/openai-whisper-20240930.tar.gz" + sha256 "b7178e9c1615576807a300024f4daa6353f7e1a815dac5e38c33f1ef055dd2d2" + license "MIT" + revision 1 + head "https://github.com/openai/whisper.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fb20c184addee014fbd43a8035592e76c148b5ea8ce30e22fd5b1f17ca38b7aa" + sha256 cellar: :any, arm64_sonoma: "2ff5f9e031d71cdc3b66795bfadb17c67f9ad75466e695ad601dde1a60dce069" + sha256 cellar: :any, arm64_ventura: "175aba1ee80e67f54dae13ef88f265a53cce12e0acf3c43353a780cf11979573" + sha256 cellar: :any, sonoma: "60a4054c514839aade340a6f9e394c57f1f6d43e8f85bad84aa775c2aa5d49a3" + sha256 cellar: :any, ventura: "3b78fc5f446614ae7367a8c8204da6f3af00501437381e40306c904ad1dcad88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1b019e05f4ec4d9a1cab322adc279ec2d89d07b32e0fa48b906902a3eaeb2c6" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build # for tiktoken + depends_on "certifi" + depends_on "ffmpeg" + depends_on "llvm@16" # LLVM 17 PR: https://github.com/numba/llvmlite/pull/1042 + depends_on "numpy" + depends_on "python@3.13" + depends_on "pytorch" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "llvmlite" do + # Fetch from Git hash for compatibility with the new version of `numba` below. + # Use git checkout to avoid .gitattributes causing checksum changes and unknown version info + url "https://github.com/numba/llvmlite.git", + revision: "ca123c3ae2a6f7db865661ae509862277ec5d692" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/51/78/65922308c4248e0eb08ebcbe67c95d48615cc6f27854b6f2e57143e9178f/more-itertools-10.5.0.tar.gz" + sha256 "5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6" + end + + resource "numba" do + # Fetch from Git hash for numpy 2.1 and python 3.13 compatibility. + # Use git checkout to avoid .gitattributes causing checksum changes and unknown version info + url "https://github.com/numba/numba.git", + revision: "391511bcb0b97af8d311cd276a46030774bc30b7" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/f9/38/148df33b4dbca3bd069b963acab5e0fa1a9dbd6820f8c322d0dd6faeff96/regex-2024.9.11.tar.gz" + sha256 "6c188c307e8433bcb63dc1915022deb553b4203a70722fc542c363bf120a01fd" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/58/83/6ba9844a41128c62e810fddddd72473201f3eacde02046066142a2d96cc5/tqdm-4.66.5.tar.gz" + sha256 "e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + ENV["LLVM_CONFIG"] = Formula["llvm@16"].opt_bin/"llvm-config" + inreplace "setup.py", "version=read_version()", "version='#{version}'" + 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..79b837e578abe --- /dev/null +++ b/Formula/o/openal-soft.rb @@ -0,0 +1,58 @@ +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.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_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..adbf7672c2d33 --- /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.1.tar.gz" + sha256 "3f1ac2e37d2646bc3b6a19e532a181d60ed43b2f33af6bdc7b1f18b8d51cf265" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f965cbd0d4205412532a6a9176762fe6d3cea30bf41ae38e54ab139d7a79d7ae" + 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..af56a5a489c44 --- /dev/null +++ b/Formula/o/openapi-generator.rb @@ -0,0 +1,68 @@ +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.13.0/openapi-generator-cli-7.13.0.jar" + sha256 "d06da46809b62fde9ca7a8ac9bd399bfba2651661b17e24caa530342d0681fe2" + 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 + + bottle do + sha256 cellar: :any_skip_relocation, all: "ebd105ba0aa8f5caebe47027b68bb0e3cc754a96238ae2001876dba676cb681b" + 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..1981b4ea18cbb --- /dev/null +++ b/Formula/o/openapi-tui.rb @@ -0,0 +1,48 @@ +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_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/openbao.rb b/Formula/o/openbao.rb new file mode 100644 index 0000000000000..65946ba2bba7b --- /dev/null +++ b/Formula/o/openbao.rb @@ -0,0 +1,58 @@ +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.2.1", + revision: "91733be3109e5a5000b750939e5748433c78cfcf" + 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_sequoia: "4be4d711deb728156cb50fd2b5339ce0656f80e9042753562aba2ab88624abb1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4ea6c64e48beba47eb34b0ffde2e70a6ffd4f5a6e7056368852f75daacb4236e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "386726c8ba46ba423523347d1ca67011a9e7a0e107f4cca8d5fe268351dcbc10" + sha256 cellar: :any_skip_relocation, sonoma: "44d192119cf5a0b4aee8962a05f869ba9576d6a03b4c4082fd137c6323006e77" + sha256 cellar: :any_skip_relocation, ventura: "36c50ccfea48b3b1d975f9f45c4961be11335c115659662e6105c2df2af7d032" + sha256 cellar: :any_skip_relocation, arm64_linux: "c1e397cdfe9a93c66a5ae5b2309788efe9dd58c3d3df8935936821b9358c80c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02e96b1a8f153d10fa2f687911a4385d710d8c28a79af49232730f4c04701a46" + 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..89d1616d5e722 --- /dev/null +++ b/Formula/o/openblas.rb @@ -0,0 +1,92 @@ +class Openblas < Formula + desc "Optimized BLAS library" + homepage "https://www.openblas.net/" + url "https://github.com/OpenMathLib/OpenBLAS/archive/refs/tags/v0.3.29.tar.gz" + sha256 "38240eee1b29e2bde47ebb5d61160207dc68668a54cac62c076bb5032013b1eb" + # 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_sequoia: "0cef0ab521810fae27b78f5d9f0a2fc42a74d52b568b70b2a5ecc229711c0920" + sha256 cellar: :any, arm64_sonoma: "88e8c3f9d4af71ebfcd068cdc95017deda958d2666fb29de1c88f8f77dd8d57d" + sha256 cellar: :any, arm64_ventura: "3a0e4b4da3526b6e939d51f9ae3d5d3123b3e70a28962384851f04a521475b71" + sha256 cellar: :any, sonoma: "56dc157bbb4fae7ac26abe2e481d5fa0cb76062c84d8da88cf3cf1cb17ff4ba0" + sha256 cellar: :any, ventura: "15432ddfd653901f19a86b6377458ba442f10112569b2b8cf60e5fe5e7b2c178" + sha256 cellar: :any_skip_relocation, arm64_linux: "ced93cd8441bd4939aa2835000ba3a8ea0394cb850594b20077798ce9605b940" + sha256 cellar: :any_skip_relocation, x86_64_linux: "20cfbd105f1fd674475da44c41fda406ac10a9cf8d1ae521b337ad046e957a29" + end + + keg_only :shadowed_by_macos, "macOS provides BLAS in Accelerate.framework" + + 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/xianyi/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") + 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" + end +end diff --git a/Formula/o/opencascade.rb b/Formula/o/opencascade.rb new file mode 100644 index 0000000000000..399ed0534b50c --- /dev/null +++ b/Formula/o/opencascade.rb @@ -0,0 +1,139 @@ +class Opencascade < Formula + desc "3D modeling and numerical simulation software for CAD/CAM/CAE" + homepage "https://dev.opencascade.org/" + url "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_9_0;sf=tgz" + version "7.9.0" + sha256 "ff118a524ec451867e8f0ac3b631522c98f2b4353c7dbf2786bf239589909ec6" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "4859dfeb89c2e8f650f80ba42e3c0ab573d8e6aeb42a0bf1cc08b5ec51614444" + sha256 cellar: :any, arm64_sonoma: "288f7cc7ce278d5c1e8cd354bf2c516dbf9e82e7d00ee9e0c78511b32f965f5e" + sha256 cellar: :any, arm64_ventura: "c4b464fe8f78edcf70d5a8f9662fce4a470746c3d0010e1a7f7a39a4a319e8f8" + sha256 cellar: :any, sonoma: "ec0c1ef905475a63e3970aaf523b4d7282756d158dba923d026f8b293077e604" + sha256 cellar: :any, ventura: "9a0a430bd6c19e8eb09552e7ca9d243e62edf8354c8e11cd354a094437b7d7a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1081e3305009581bef27218ae339299e175f79d6c614e2a6528ac551259bc98b" + end + + depends_on "cmake" => [:build, :test] + depends_on "doxygen" => :build + depends_on "rapidjson" => :build + depends_on "fontconfig" + depends_on "freeimage" + 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 + 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=ON", + "-DUSE_RAPIDJSON=ON", + "-DUSE_TBB=ON", + "-DINSTALL_DOC_Overview=ON", + "-DBUILD_RELEASE_DISABLE_EXCEPTIONS=OFF", + "-D3RDPARTY_FREEIMAGE_DIR=#{Formula["freeimage"].opt_prefix}", + "-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..c529db7c24081 --- /dev/null +++ b/Formula/o/opencbm.rb @@ -0,0 +1,53 @@ +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://git.code.sf.net/p/opencbm/code.git", branch: "master" + + livecheck do + url :homepage + regex(/]*?>VERSION v?(\d+(?:\.\d+)+)/i) + end + + bottle do + rebuild 1 + 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..1cb4b07f872b0 --- /dev/null +++ b/Formula/o/opencc.rb @@ -0,0 +1,41 @@ +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" + + bottle do + rebuild 1 + 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..b0cb3464a753e --- /dev/null +++ b/Formula/o/opencl-clhpp-headers.rb @@ -0,0 +1,34 @@ +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/v2024.10.24.tar.gz" + sha256 "51aebe848514b3bc74101036e111f8ee98703649eec7035944831dc6e05cec14" + license "Apache-2.0" + revision 1 + head "https://github.com/KhronosGroup/OpenCL-CLHPP.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e1503e98660c926e8ab6463346a74979c9f8c94b687688a136665b4b05a35830" + 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..08c17bc161a81 --- /dev/null +++ b/Formula/o/opencl-headers.rb @@ -0,0 +1,43 @@ +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/v2024.10.24.tar.gz" + sha256 "159f2a550592bae49859fee83d372acd152328fdf95c0dcd8b9409f8fad5db93" + license "Apache-2.0" + head "https://github.com/KhronosGroup/OpenCL-Headers.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "48ca1aea759fd7b22344fb9b3103c071b892e2bae7a47717306c5ed857d8793b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "48ca1aea759fd7b22344fb9b3103c071b892e2bae7a47717306c5ed857d8793b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "48ca1aea759fd7b22344fb9b3103c071b892e2bae7a47717306c5ed857d8793b" + sha256 cellar: :any_skip_relocation, sonoma: "48ca1aea759fd7b22344fb9b3103c071b892e2bae7a47717306c5ed857d8793b" + sha256 cellar: :any_skip_relocation, ventura: "48ca1aea759fd7b22344fb9b3103c071b892e2bae7a47717306c5ed857d8793b" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb2cfe0d4bcf9b84ada89ca96c58bf6fb9573f84c9bdfcf1103d0a5ea61a7060" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23cb70827358da453160139e62a4f60bfbb65499b5f03dd8c2468ef63cf3f315" + 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" + 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..14f5d0090e613 --- /dev/null +++ b/Formula/o/opencl-icd-loader.rb @@ -0,0 +1,57 @@ +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/v2024.10.24.tar.gz" + sha256 "95f2f0cda375b13d2760290df044ebea9c6ff954a7d7faa0867422442c9174dc" + license "Apache-2.0" + head "https://github.com/KhronosGroup/OpenCL-ICD-Loader.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "da02c657410f1f99d71a8fb4a512a65dffb83725d0e3e5fe83c56dadd5195951" + sha256 cellar: :any, arm64_sonoma: "f36123fdfa33c94abf75c45da21db3e9ee754fc4c063424d2cd166ffe2eb7674" + sha256 cellar: :any, arm64_ventura: "5a4d5eadae6145a4af771b5ad522c1aded5748287844d02dd22917f292a3fec6" + sha256 cellar: :any, sonoma: "a639175e931247933d74fc27cff123e75c313ab12b53d45037f58d86a0a15636" + sha256 cellar: :any, ventura: "738951620c894c8550ee9bec207375649f79c3b8dcbb8c13b528d19df336ed42" + sha256 cellar: :any_skip_relocation, arm64_linux: "197ba359c64d660b2a44bb0f9e688eddba9c033bbaf377b9d55c3a3daa8662d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "86de1cb308f14d4b4bc63ad1bf3b7107a2ab8da41735bdbd287b584ce1902986" + 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..18e7173313efd --- /dev/null +++ b/Formula/o/opencoarrays.rb @@ -0,0 +1,61 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e263b0b0243719cdaf1ef02de84c8d70c52b1ba4b75254e75eec540daba88fde" + sha256 cellar: :any, arm64_sonoma: "8c6e809fff5e543d60f2ee038ca04aa99e398a69b3aec9db067249c84b2beef0" + sha256 cellar: :any, arm64_ventura: "343c2414094be734db3423e6c2fab208320996971c0475f27e9b4328e20307a3" + sha256 cellar: :any, sonoma: "bf66d20a900e5b7880971a9d5c0801cc9b18f3f4fded8be925bf482fb9b86d00" + sha256 cellar: :any, ventura: "6918670d6f5c0b401d2aaea00dc994ac8a5879ec7430c0212c058c7a8654f90e" + sha256 cellar: :any_skip_relocation, arm64_linux: "565fc597f9fee0da1af004bf3ac41b7b161468d4c6814e5d67fb2d3280a0a2ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3be56cc15f1203f55853c88f265444b90868d9228e88fc3c405b5219e401eab5" + end + + depends_on "cmake" => :build + depends_on "gcc" + depends_on "open-mpi" + + def install + system "cmake", "-S", ".", "-B", "build", *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_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/opencolorio.rb b/Formula/o/opencolorio.rb new file mode 100644 index 0000000000000..b06230b8aaa8a --- /dev/null +++ b/Formula/o/opencolorio.rb @@ -0,0 +1,74 @@ +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.4.2.tar.gz" + sha256 "2d8f2c47c40476d6e8cea9d878f6601d04f6d5642b47018eaafa9e9f833f3690" + license "BSD-3-Clause" + head "https://github.com/AcademySoftwareFoundation/OpenColorIO.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fd4ce40466893d4cfb51455109afc4b3f69024d6a4fdd008f87cc61658e4fd37" + sha256 cellar: :any, arm64_sonoma: "da363d024bb2473440be47e1c3cb5720219ab747815fc96e83ccb16558720e22" + sha256 cellar: :any, arm64_ventura: "7df6dc5b16c82aaecc3c6d5366b471f908e479e5583152948d5829b2a9fc024f" + sha256 cellar: :any, sonoma: "4be7e329a8f5b155d8fa8209d01d2fcb8bb1953bdbd9ffc64282f3fe28eade8f" + sha256 cellar: :any, ventura: "4c67b15aaaaba4b75bcd3d0dba1193edeb25ab3d9ca77365a35fb11970efe86d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9c0f0c49ea791180f3d12d806882b2b60c36b0e27b0022d69223a1b06a2e6b69" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e366c2cf6a6dab2e5abac729a3b08af8bb16c1711e2c6642e05e23802df2a1f2" + end + + depends_on "cmake" => :build + depends_on "pybind11" => :build + depends_on "python@3.13" => [:build, :test] # for bindings, avoid runtime dependency due to `expat` + depends_on "imath" + depends_on "little-cms2" + depends_on "minizip-ng" + depends_on "openexr" + depends_on "pystring" + depends_on "yaml-cpp" + + uses_from_macos "expat" + uses_from_macos "zlib" + + on_arm do + depends_on "sse2neon" => :build + end + + def python3 + "python3.13" + 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..41851899bae3a --- /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 + + bottle do + rebuild 2 + sha256 arm64_sequoia: "76a21b129bbc6a7dbcd67f88f4b2e2a0ca6cb3d5188b7ba763ef669013b58b7c" + sha256 arm64_sonoma: "a6594e9c2ba4bfa4f235839a9f504f354e82722ae1a2f6e7f3d9a17727ece429" + sha256 arm64_ventura: "c1f6c601ae384e7ccb83c875c762ab73134dac41ce77a8cfc0fd41d166dda58a" + sha256 arm64_monterey: "63304d1ce4715c73c59abd0777fc34f1f77e413c4ce4d1933d78b629abb7d95e" + sha256 sonoma: "330f76952b9e047eaab8fbc0e55378e600367504cded0c4c2879630559a0f6eb" + sha256 ventura: "c6b26f039f0ad3f5ce853111ebb62556885c48fba36cd63f48353f8dd8a12287" + sha256 monterey: "236d104feadaa7f99b8c10fef77adf469fa7499ffd55de499db04da7fd47a710" + sha256 arm64_linux: "a02ae24c78dd35967c78c1212f92e47867615fca7275aa37c9f0aad836014bf3" + sha256 x86_64_linux: "35d66b532fb2760b5265d32eca18f98fb8a938edcef09498fe6126e81c9fd085" + 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 caveats + s = <<~EOS + A `vpnc-script` has been installed at #{etc}/vpnc/vpnc-script. + EOS + + s += if (etc/"vpnc/vpnc-script.default").exist? + <<~EOS + + To avoid destroying any local changes you have made, a newer version of this script has + been installed as `vpnc-script.default`. + EOS + end.to_s + + s + 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..116c9eed5d635 --- /dev/null +++ b/Formula/o/opencore-amr.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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..2dbd7042864e7 --- /dev/null +++ b/Formula/o/opencsg.rb @@ -0,0 +1,52 @@ +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_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..91e11d3b1efdc --- /dev/null +++ b/Formula/o/opencv.rb @@ -0,0 +1,205 @@ +class Opencv < Formula + desc "Open source computer vision library" + homepage "https://opencv.org/" + license "Apache-2.0" + revision 1 + + stable do + url "https://github.com/opencv/opencv/archive/refs/tags/4.11.0.tar.gz" + sha256 "9a7c11f924eff5f8d8070e297b322ee68b9227e003fd600d4b8122198091665f" + + resource "contrib" do + url "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.11.0.tar.gz" + sha256 "2dfc5957201de2aa785064711125af6abb2e80a64e2dc246aca4119b19687041" + + livecheck do + formula :parent + end + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sonoma: "14e468ccb54da0d671e31730284f933508d5195a208aca7a9b08541ada70c32a" + sha256 arm64_ventura: "b70e530ca8d0aeb8e6bc91a13c5d1fffd114fce6807f517b8d87c9375cf18b05" + sha256 sonoma: "b2ff125058f1b6c8b409c3510d833fbd22ee9a025663f8acb91bab12d03aec5e" + sha256 ventura: "690e423d0e51cca672a27d570f452ed7d8d867ba43d808ac7fb5156768d5d6c5" + sha256 x86_64_linux: "f91667972adca2f3e7e286ab0a8cd1623b7b14954f01d233a7efb8143cf66e85" + end + + head do + url "https://github.com/opencv/opencv.git", branch: "master" + + resource "contrib" do + url "https://github.com/opencv/opencv_contrib.git", branch: "master" + 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.13" + 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.13" + 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 + -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 + + 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..87ddf55d80b71 --- /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 + + bottle do + 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 mojave: "9f4ed6175131681d7aa68a5cc62a3fab535f428f05982873c756d534ce4a71f9" + sha256 high_sierra: "8acc7893f16018ca7946d5a087459f7defbaa3fa3a17759d9eec5eaaffd27458" + sha256 sierra: "4adab552ad5d1fca471ba71734b784de2d6005717cef6908c0e8366b217c4dd1" + 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..8590612082234 --- /dev/null +++ b/Formula/o/opendetex.rb @@ -0,0 +1,42 @@ +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_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..706bf0560fb9c --- /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.3.1.tar.gz" + sha256 "ce93396fc7aa118a69353ba75c6615dbea965d7d8607f55a50bb442bd21bed2e" + license "GPL-3.0-or-later" + + # 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_sequoia: "1d47bd78265faeeb87d774862c13a4befad2ee1fb96661f0e95225a71d670558" + sha256 cellar: :any, arm64_sonoma: "42c6d746788177da5b3fcd1e39446a9c51216b6d0700fec73f47ec84e77cba16" + sha256 cellar: :any, arm64_ventura: "25d3b25e42a10d6cb47ca10435c2909af91b7bb36dea3f60cbc1f0c9e77b75f9" + sha256 cellar: :any, sonoma: "99e170ce8ee9fd0fa1f9ce55106f1064ade38216a8a76626288ee3fd03460fe9" + sha256 cellar: :any, ventura: "6904b5cdd9c7d40dca0859380069c93e87912f61d75c3d3f9944f14d48d2efe3" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f7238bbff2cad047c70d520eed1cac148849f70fe451fab0553a7e788a33cf9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ed9c7d62405933255495e87727695f89913563975962f8b652dd3c4347f50d4" + 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..0c1948e026719 --- /dev/null +++ b/Formula/o/openexr.rb @@ -0,0 +1,49 @@ +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.3.3.tar.gz" + sha256 "0ffbd842a7ee2128d44affdea30f42294b4061293cde3aa75b61a53573413d1e" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "095b03c2de45fa33ca35a42af614570d627a9a804dc99dc1c207b4687437c4b6" + sha256 cellar: :any, arm64_sonoma: "120c5a42eb3a3ef8f77336da362cd413fdb0d1a5d2afb9057ad141e55995a9bd" + sha256 cellar: :any, arm64_ventura: "ce83bbf9a04d07873a41f9232740e20890da994b9fa38b524346929f98e7ed9d" + sha256 cellar: :any, sonoma: "c3fce261a7a0b29e32312f5fd2d539ef6e50984dbaf479439e5ca894e8827fa8" + sha256 cellar: :any, ventura: "e425a3e4a316cdb3c325e7baf1c196c66d9e76c0728b557903201841f711617d" + sha256 cellar: :any_skip_relocation, arm64_linux: "c12a57a4b9226facb0e536f7a181600ce8594168c2652d06adae51b18ee6fcf9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "862cc7b4a884fd67c2cc91e695d5b01a5a35f4216222a1d33f93f24e5c45836a" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "imath" + depends_on "libdeflate" + + 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..6f29a9eb3fd73 --- /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_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 + depends_on "gcc" # for gfortran + + 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..b14d3fe3176e3 --- /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.0.4", + revision: "d28a823169e75029d73362b07a2942d0a454f03b" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2e89b7a85921381093c8ebb7c03d3453287725e32bf548a78c4d96687e13984d" + sha256 cellar: :any, arm64_sonoma: "aae62eb732843dccd695d0228166fb77bd7f39350464ebec9b1dadf83116434c" + sha256 cellar: :any, arm64_ventura: "a651f9197f973c8b9846d3e5d4d8415d4f846dd074b44d4c9cc6aee38027c2d5" + sha256 cellar: :any, sonoma: "baaeffca5e7d33ecea19f76071bd3679845c3626dda3d3fef36506609b13569c" + sha256 cellar: :any, ventura: "56d53252d63b0ef61aa6465401500bc692c2ea3bc90324f10d72f5370bb8dd63" + sha256 cellar: :any_skip_relocation, arm64_linux: "4660629844154eb7e200d48e84b842108d3649096881db26348b0472a7d66cdb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d8a1b246f53b43a2e7db5d6fd5c3ec12209be17374cdc5b310e1129e43843c6" + end + + depends_on "cmake" => :build + depends_on "gcc" + depends_on "netcdf" + 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..2ae4a14f299e0 --- /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.8.12.tar.gz" + sha256 "2e938bec6576429fcf9196b7a3413c8314a2f4fe367dc55dbb83864eb485adb0" + license "Apache-2.0" + head "https://github.com/openfga/openfga.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5447d55367b64e98640e25bbd3b1ae59d38688cb6ff96e270f8b0c0c60b81ac2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e2a9627a82fc9ab6511760ffa908432e8f6c87dcf533eea02cb9ab71d712ca85" + sha256 cellar: :any_skip_relocation, arm64_ventura: "34147e3d892ca5d756f4374d66f7005c924a831fc68371a35607f7760ce6dbd5" + sha256 cellar: :any_skip_relocation, sonoma: "a42a78962855c8c3beac9ef9cadaea914406f8609f17fa702caff953e503dac9" + sha256 cellar: :any_skip_relocation, ventura: "530198366665eb3c4070e7ed11978d44e76908a62a9cb52f1624536a8c1ee648" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9941db7627c217009327e186e1f5af7aaef1bae8c169786f39f310a2c5a87f0c" + 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..eb27bf74c0304 --- /dev/null +++ b/Formula/o/openfortivpn.rb @@ -0,0 +1,47 @@ +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_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..bb2c2b8613391 --- /dev/null +++ b/Formula/o/openfpgaloader.rb @@ -0,0 +1,43 @@ +class Openfpgaloader < Formula + desc "Universal utility for programming FPGA" + homepage "https://github.com/trabucayre/openFPGALoader" + url "https://github.com/trabucayre/openFPGALoader/archive/refs/tags/v0.13.1.tar.gz" + sha256 "372f1942dec8a088bc7475f94ccf5a86264cb74e9154d8a162b8d4d26d3971e3" + license "Apache-2.0" + head "https://github.com/trabucayre/openFPGALoader.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "3d2834dbd959beb410e957fe036b89061ed6c3917f5bc95aa095263a7fde0441" + sha256 arm64_sonoma: "adecca7a524b314f0783020843c1e243556ad09725ad61173a67b51746969201" + sha256 arm64_ventura: "f5bf61cadaa7161e3c3620406c446e0b4fe3774738b8ee85e96e36c3f754fd4e" + sha256 sonoma: "c6c284837966c0bbf5bffee515c6f1f9d82f9c3833e9bee7897fa9f54d80ce25" + sha256 ventura: "b999c7d101214bbcf8948d2692f00d0d0c53f654f870ea321e7105fb317dd4db" + sha256 arm64_linux: "892a2eb10a5eb21dc823147313fffd50937fe4436a8ab441fa61465a8a7c0822" + sha256 x86_64_linux: "16261ec88867b7acb11f2f4d9fcd0bdd008c5152d2aee7a81282a4e8d1a1a6bf" + 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..347a61fdacf7c --- /dev/null +++ b/Formula/o/openfst.rb @@ -0,0 +1,59 @@ +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_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..1478ed1be840d --- /dev/null +++ b/Formula/o/openh264.rb @@ -0,0 +1,46 @@ +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_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..4c06011b1fcc6 --- /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" + + bottle do + 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, mojave: "796c1a6f06715aa8a3304cca0083378d5fe2a1006b55da8727938922b5408c8d" + sha256 cellar: :any, high_sierra: "1c54727de5836916bca42065d0ed53f0a796d07ec6866408a69213c94b151092" + sha256 cellar: :any, sierra: "97f5dff1e77b6b615544ed6611aa6d8c3395e3c6dc759c4576084d87a4e976ad" + 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..eedfa1ad11090 --- /dev/null +++ b/Formula/o/openiked.rb @@ -0,0 +1,62 @@ +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_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..b9f536ad0f3d1 --- /dev/null +++ b/Formula/o/openimageio.rb @@ -0,0 +1,95 @@ +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.0.6.1.tar.gz" + sha256 "4d0fb92e4964f79dfaed77ac73f1a7f754c671a9f5ad29c7950c0844916ce5f5" + license "Apache-2.0" + head "https://github.com/AcademySoftwareFoundation/OpenImageIO.git", branch: "master" + + livecheck do + url :stable + regex(/(?:Release[._-])?v?(\d+(?:\.\d+)+)/i) + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "042229d9572e0781d83d52782d51425adefbca12103ddf8d35748ba534ad489e" + sha256 cellar: :any, arm64_sonoma: "c6811474b4f0ba603e7867b406fe79d9f1e9bcac7ae0d680952b93d8df2bef34" + sha256 cellar: :any, arm64_ventura: "80b3bd93516c2e8b5c638bba24c955c64d17c5dd16fc1cf35822488dbf36d937" + sha256 cellar: :any, sonoma: "9fbd6f150c6fdd9a5c44138483948ed4b02dd227d9f685d6ac08e602ac15e779" + sha256 cellar: :any, ventura: "529c49719bf807377ffb84fe0177bc739902b66b87d9d1b02267eb0dd60f3664" + sha256 cellar: :any_skip_relocation, arm64_linux: "22376d93e5365079d1c2aee035f527dff439d0012ceda68ed2937d94d5e437a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82535c15c16e7de879d951152f1b50712cda8689466624f7b89db7df711009b7" + 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.13" + depends_on "tbb" + depends_on "webp" + + uses_from_macos "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.13" + 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..d11351d6abd06 --- /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.10", + revision: "f7310370514b5b8af3deb750636cb526532488e5" + license "MIT" + head "https://github.com/OpenIoTHub/server-go.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ff60cb2080f4e92c45ee271102c92674ebee6deb262719f7edc4b7120c8d4feb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "640c7715e7a89f0c7e0b9ee212430fac3932ce414eca2a47f7f1e359de104fa2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "640c7715e7a89f0c7e0b9ee212430fac3932ce414eca2a47f7f1e359de104fa2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "640c7715e7a89f0c7e0b9ee212430fac3932ce414eca2a47f7f1e359de104fa2" + sha256 cellar: :any_skip_relocation, sonoma: "dec2d884d8a4fa8a523ee7e93a915ff880d245df19f626f53e307648504c6437" + sha256 cellar: :any_skip_relocation, ventura: "dec2d884d8a4fa8a523ee7e93a915ff880d245df19f626f53e307648504c6437" + sha256 cellar: :any_skip_relocation, monterey: "dec2d884d8a4fa8a523ee7e93a915ff880d245df19f626f53e307648504c6437" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f1c53efeaa347391a0546b0dd71e20a371885883a3ed96029035ffb546d809a" + 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..0840d805de758 --- /dev/null +++ b/Formula/o/openj9.rb @@ -0,0 +1,215 @@ +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_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" + end + + resource "openj9-openjdk-jdk" do + url "https://github.com/ibmruntimes/openj9-openjdk-jdk22.git", + tag: "openj9-0.46.1", + revision: "b77827589c585158319340068dae8497b75322c6" + end + + 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 diff --git a/Formula/o/openjazz.rb b/Formula/o/openjazz.rb new file mode 100644 index 0000000000000..f19c0183bba1b --- /dev/null +++ b/Formula/o/openjazz.rb @@ -0,0 +1,56 @@ +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_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..922500b82e1ff --- /dev/null +++ b/Formula/o/openjdk.rb @@ -0,0 +1,185 @@ +class Openjdk < Formula + desc "Development kit for the Java programming language" + homepage "https://openjdk.java.net/" + url "https://github.com/openjdk/jdk23u/archive/refs/tags/jdk-23.0.2-ga.tar.gz" + sha256 "0812e2e4d51ab1d752c1d532150297a56bd47557db67f8e2b298199e7f65db1c" + 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_sequoia: "1285eadf2b5998cda49e4470ee3875e855b0be199765401ad77dc38aea573f49" + sha256 cellar: :any, arm64_sonoma: "1cccc8bb39130612a61ff9d18a208ec232b86a21d646748a7af3f3f693eab804" + sha256 cellar: :any, arm64_ventura: "bb9bc5a4c4128b4c61a99d419026811f7f5fcf3ac243b1e393449aa680715d36" + sha256 cellar: :any, sonoma: "e0999137182b5abc4e0738330f4d9cb2f45b4d9642deffed420c0e7be4f337e8" + sha256 cellar: :any, ventura: "f5effdfcbab956c20d0f65bdc504ac27723d81d9fe940abadf81764782881650" + sha256 arm64_linux: "22f0dfa8e53631d88561eb4152be6a13fed08e9121e2a5234dbdff316e3c3369" + sha256 x86_64_linux: "a7bd3a62568d49149d566ed5cf98ec8a5cd2ab130019918ce42c8eaeb268b45b" + 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" + depends_on macos: :catalina + + 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/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_macos-aarch64_bin.tar.gz" + sha256 "cd626e636fdd7e68467a9ca27d71107a27bd500c33ab40a91b57317c0c0f949f" + end + on_intel do + url "https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_macos-x64_bin.tar.gz" + sha256 "3661d387ea2f1248364bc384a1e36197b3633f63dde7fd1f61b296e89eb0f768" + end + end + on_linux do + on_arm do + url "https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_linux-aarch64_bin.tar.gz" + sha256 "94586630f70f1e87d90c252a6a2a202655399d1358c9b226834179e8bcf800e9" + end + on_intel do + url "https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_linux-x64_bin.tar.gz" + sha256 "dc9b6adc1550afd95e30e131c1c38044925cb656923f92f6dbf0fbd8c1405629" + end + end + end + + # Fix build with `--with-harfbuzz=system`. + # https://github.com/openjdk/jdk/pull/19739 + patch do + url "https://github.com/openjdk/jdk/commit/ba5a4670b8ad86fefb41a939752754bf36aac9dc.patch?full_index=1" + sha256 "ff6c66f3fa81bef3fb18e88196c520cfa867aa5d57ebf26574635723b4d06d16" + 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(" ")}" + + 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..6cb988fe262a4 --- /dev/null +++ b/Formula/o/openjdk@11.rb @@ -0,0 +1,176 @@ +class OpenjdkAT11 < Formula + desc "Development kit for the Java programming language" + homepage "https://openjdk.java.net/" + url "https://github.com/openjdk/jdk11u/archive/refs/tags/jdk-11.0.27-ga.tar.gz" + sha256 "eb1d802f854824261d7babac917179ce21c608a39675cf6e78f2ab19121cc7d0" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(/^jdk[._-]v?(11(?:\.\d+)*)-ga$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9157b4fbd9639c0f0883b5fd5ceae4eeda0700bb3807d320ed2b72a3c802aec0" + sha256 cellar: :any, arm64_sonoma: "950dc219e095f26315840c2799a4788bc57cfb52dae8d0b3003c2b534e64b526" + sha256 cellar: :any, arm64_ventura: "416364e4ba1a5639c493526ce24774dd65b7e78aeb47cff5652d266039a29e5f" + sha256 cellar: :any, sonoma: "b0c482904b5f09bfa89ea86c5b83eada87d13eea5c756d3ea52120c4fa9c07ed" + sha256 cellar: :any, ventura: "0393436da6670cd7ab79aa6fd8ed37471101de76c3f8a3763d053848b204c162" + sha256 cellar: :any_skip_relocation, arm64_linux: "5649d2248a80ade02a9d5fc4af67db156495355d0b2d2138e34b6db62163a293" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9f3618a9669acc39a9420a8666867908ceaded5d554b5b786f05b2dc2531253" + 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..c7e96641d4a05 --- /dev/null +++ b/Formula/o/openjdk@17.rb @@ -0,0 +1,175 @@ +class OpenjdkAT17 < Formula + desc "Development kit for the Java programming language" + homepage "https://openjdk.java.net/" + url "https://github.com/openjdk/jdk17u/archive/refs/tags/jdk-17.0.15-ga.tar.gz" + sha256 "ae623441d95d0563690f85edad765a12fc89bbb89ed1877ec5cf677a5ae4fbd7" + 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_sequoia: "18263028ef126d4c4c24fe38950378da312cd399f0c30ec0728c60064bbb172a" + sha256 cellar: :any, arm64_sonoma: "35988993a9c667c35b1f69c60e6a843ada498d2584eb408f791e8812300114e3" + sha256 cellar: :any, arm64_ventura: "c6f435fba43d3474fa6e6ee5551af7e573dc38b77e1bd4b3f719789c8d687552" + sha256 cellar: :any, sonoma: "54797db5cd75643fb6089c5e9b9f7e67f85337688aa39598b056d8520b1a9559" + sha256 cellar: :any, ventura: "39b359e24c430d3f92f1b71ba1f50d3638a242152116b7ba2c5bd3f9dd278c18" + sha256 arm64_linux: "e175372ab81054272e82d0878b6dc181cccd6921ba7034d4ead6ba4e281484f0" + sha256 x86_64_linux: "5067c93f3183b79b01ae789f71e9f454b517a70a30c8ffbd40ca48aa5572c706" + 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..9888f28cc5bf4 --- /dev/null +++ b/Formula/o/openjdk@21.rb @@ -0,0 +1,175 @@ +class OpenjdkAT21 < Formula + desc "Development kit for the Java programming language" + homepage "https://openjdk.java.net/" + url "https://github.com/openjdk/jdk21u/archive/refs/tags/jdk-21.0.7-ga.tar.gz" + sha256 "d8637e7d6fece0757b7fada49d32d0b3334a15a110445acef8cfea64b4672ca2" + 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_sequoia: "2277d1c2928cda2ae3374c9645645cc238cb376887cf091b6681c03a3d12984d" + sha256 cellar: :any, arm64_sonoma: "7e35222a56e6605bd8cadd8751a13f619bb1944449b783f65063b64f46873274" + sha256 cellar: :any, arm64_ventura: "6811ad429eaf03ffc51e426b41eb66a1e04a39d70bb4b410ba017da21c031d3a" + sha256 cellar: :any, sonoma: "e8071b04932df52f030b2608bc123f68b58567d100f3fb68fc8587eb71801c04" + sha256 cellar: :any, ventura: "84a43a2c301ddb9723f9160e19fa9cbcf34dca5189254bdbe46b80356da7acb0" + sha256 arm64_linux: "e9b684cf1117aa18f29d92179b5fab21a07f965d82022de76089acd423491840" + sha256 x86_64_linux: "e83a003d88721a27a35db5459470dce43cb5cfb28f5bcdef3feb98cffa4580bc" + 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" + depends_on macos: :catalina + + 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..5ea8a510aab4d --- /dev/null +++ b/Formula/o/openjdk@8.rb @@ -0,0 +1,268 @@ +class OpenjdkAT8 < Formula + desc "Development kit for the Java programming language" + homepage "https://openjdk.java.net/" + url "https://github.com/openjdk/jdk8u/archive/refs/tags/jdk8u452-ga.tar.gz" + version "1.8.0-452" + BUILD_NUMBER = "b09".freeze # Please update when a new GA release is available: https://wiki.openjdk.org/display/jdk8u. + sha256 "cf1009e18b6332ef2b4a54257a6087611970bcdab5368907ac67ada1e9709676" + 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: "79dbf7dcfd23168817af9383b5a17a8fd908be0f106d0ec920327438625dc588" + sha256 cellar: :any, ventura: "f60a98b1d90f1480b60fff0c121857e470a680115cead8892af69419b48db5be" + sha256 cellar: :any_skip_relocation, arm64_linux: "586959a85569b0cca59fde64c8fcf8dbc38a68a088e0c2beea1f89b17f10abd6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95ad19e02cfa50d6bb0c737445d3b5b2106e910e1ebd3b58d1066ce6b826a53b" + 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..76dace3009710 --- /dev/null +++ b/Formula/o/openjpeg.rb @@ -0,0 +1,52 @@ +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.3.tar.gz" + sha256 "368fe0468228e767433c9ebdea82ad9d801a3ad1e4234421f352c8b06e7aa707" + license "BSD-2-Clause" + head "https://github.com/uclouvain/openjpeg.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a8091181f4cdd66cc41e7c4bebdfb205c70fc52c069f8ddfdc26bc91e3fa417a" + sha256 cellar: :any, arm64_sonoma: "9597528b11f6ce50ea16e4b3baa4ff13dc018bccb63f9f8a8b788a5378059dcd" + sha256 cellar: :any, arm64_ventura: "10a4d7d2b3201baa4762b09a3d399361a11685706e5428cd003d02489cf158b5" + sha256 cellar: :any, sonoma: "9c66e3db546bab6fbc2f277075f9a49f1bac10f757f1150e7820f63157c43f24" + sha256 cellar: :any, ventura: "5619b9551a495ddbe261ccbcf9e1e457c1eaa920b1e56b7af38775545c106bfb" + sha256 cellar: :any_skip_relocation, arm64_linux: "bacf020994b0d334e1facae54af915d11d5cab319e745f4db5f9c39cab270758" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ccea9d571cc6a31c0d32b38608d8507f7b90b555faf276d61375844c6d38205c" + 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..a4f0467cb5ebf --- /dev/null +++ b/Formula/o/openjph.rb @@ -0,0 +1,45 @@ +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.21.2.tar.gz" + sha256 "5c25f5fe820ccb4fee3b7a0d3246bf836508e313708f0b57f3654dbe8b0c4a01" + license "BSD-2-Clause" + head "https://github.com/aous72/OpenJPH.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c73a3e7f1c8a3addca3acc291298227987a27d63d64b39ee16d336805fa393bc" + sha256 cellar: :any, arm64_sonoma: "a0afe7ab8f37d6886c997d54bfdb788ad8199ea1f67ca6910cb201288bb54d02" + sha256 cellar: :any, arm64_ventura: "d79bb7861bd20f92c7047d10358b04be37f4b2c59b6fe5fa1c02344a2ce3d8b3" + sha256 cellar: :any, sonoma: "6fc7ba2486fef01ef88051d57debef07ece8497c65c192e440cb9109f318a159" + sha256 cellar: :any, ventura: "92b8a6f1bae509c87aff49ab8c3b847ffa94b121b2a02d744b06612423b19dfa" + sha256 cellar: :any_skip_relocation, arm64_linux: "b18370cd84f883815cc92e1832552dbc7bb3ae6c9861dccd3d9594a9818e58da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c1bed2eba22b7dd9c77079c62bf6d6d928a2b7056a631cff958aa181adfef71e" + 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..fc0968a5e693d --- /dev/null +++ b/Formula/o/openkim-models.rb @@ -0,0 +1,52 @@ +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 + + bottle do + 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 + ] + + 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..e1d1c9d6cf241 --- /dev/null +++ b/Formula/o/openldap.rb @@ -0,0 +1,96 @@ +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.9.tgz" + mirror "http://fresh-center.net/linux/misc/openldap-2.6.9.tgz" + mirror "http://fresh-center.net/linux/misc/legacy/openldap-2.6.9.tgz" + sha256 "2cb7dc73e9c8340dff0d99357fbaa578abf30cc6619f0521972c555681e6b2ff" + license "OLDAP-2.8" + + livecheck do + url "https://www.openldap.org/software/download/OpenLDAP/openldap-release/" + regex(/href=.*?openldap[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "d46daf11a6c5a4dc952cf9bb6eb2e9fd9b8d413939052ceee114108b15584adf" + sha256 arm64_sonoma: "f7a11d5195b4e1426d6690470ccfe7dee9f7e8bc524b9af7519b97e67f10346c" + sha256 arm64_ventura: "f9f450125e7b6548a81b0d9f83babf08409a6cbe80d40617b8c3f256261a2a6b" + sha256 sonoma: "1c584b75365da368f6aec0830d6e5cddbdb1dc5fb7a16a818c299574c173f904" + sha256 ventura: "542bbb6594a79baf910a87c265ae57d33d6cd0dec19ed536596ab26b2131b623" + sha256 arm64_linux: "3fca9fbb6de4c3c9115041de0adef3c683f51e347e8af2990bba5c37e687c418" + sha256 x86_64_linux: "f4ae258483526f378f60511ec5ecb77f3aeea3819ac2b9d369d6c76d2d74c563" + end + + keg_only :provided_by_macos + + depends_on "openssl@3" + + uses_from_macos "mandoc" => :build + + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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-translucent + --enable-unique + --enable-valsort + --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..1301a97214e6c --- /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.4/openliberty-javaee8-25.0.0.4.zip" + sha256 "215f7e220e6718aa147771e982b051ba248433a82bd3c1d4536e5cb483e91463" + 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: "71c9663056a0d44555028cb4c2585ab42833e92f91b435a279a8d4795183ca3d" + 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..cd3fe61fc11f6 --- /dev/null +++ b/Formula/o/openliberty-jakartaee9.rb @@ -0,0 +1,48 @@ +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 + + 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..3328d0aa4eb93 --- /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.4/openliberty-microProfile4-25.0.0.4.zip" + sha256 "9b077c53256b8773e9365e530bd97adf238b46f39818138cbcbe2a699a60cfde" + 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: "bfdc2d5a6219711ddff7b3faaf21a82782823dac6d0e1b64d5fbb5d125493240" + 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..da48a347c1578 --- /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.4/openliberty-webProfile8-25.0.0.4.zip" + sha256 "5cf94fef3784c5ce95d8e9f3a9afe3eb4e5edde56d2ffc7f809bae4e066e1575" + 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: "c2e255b45443b9f1e5ee80240536d591fa672cf8d106fec59346317a1fc2736e" + 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..9a8537d1f8cd7 --- /dev/null +++ b/Formula/o/openliberty-webprofile9.rb @@ -0,0 +1,48 @@ +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 + + 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..4f9c2b966501a --- /dev/null +++ b/Formula/o/openlibm.rb @@ -0,0 +1,42 @@ +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.6.tar.gz" + sha256 "347998968cfeb2f9b91de6a8e85d2ba92dec0915d53500a4bc483e056f85b94c" + license all_of: ["MIT", "ISC", "BSD-2-Clause"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "a0dc81e93df4ac3b526f26c735c5c08da119a54209e49fc0f2a5d2bb4d82b6af" + sha256 cellar: :any, arm64_sonoma: "64d50bcefebd111f29c11bc05eb551b037fd35a7fbf28faf564a69963a153700" + sha256 cellar: :any, arm64_ventura: "0830994898d6ba15c3b9185e930d38f94693cf033d1dbdcd90d02795921e8a51" + sha256 cellar: :any, sonoma: "d578955d8218e8c931a6e351119a53e3ab5038abdc616952b1ee7e6f86d31607" + sha256 cellar: :any, ventura: "2704daa0edcd8da9b5d5329354936ded7d51126b2814fe2c9f54a0da17b440cc" + sha256 cellar: :any_skip_relocation, arm64_linux: "e93592d2ad7669d07160dcd5dc74701275e0acca572e6f13dbd5b44fb19fe191" + sha256 cellar: :any_skip_relocation, x86_64_linux: "226b4eb1ee269df454fb708a5f862f2d9e98cbc7d4a9ce0d662cc239fa37d0a8" + 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..9a6f2b12061de --- /dev/null +++ b/Formula/o/openmama.rb @@ -0,0 +1,79 @@ +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 + + bottle do + 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..6e08aeaae4b1d --- /dev/null +++ b/Formula/o/openmotif.rb @@ -0,0 +1,77 @@ +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 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..265e18ec36856 --- /dev/null +++ b/Formula/o/openmsx.rb @@ -0,0 +1,86 @@ +class Openmsx < Formula + desc "MSX emulator" + homepage "https://openmsx.org/" + url "https://github.com/openMSX/openMSX/releases/download/RELEASE_20_0/openmsx-20.0.tar.gz" + sha256 "4c645e5a063e00919fa04720d39f62fb8dcb6321276637b16b5788dea5cd1ebf" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "ee0a9be62e2b1c04669a5fdbadbf59ece48fb64cfc5c6287cc3c404ce39f884f" + sha256 cellar: :any, arm64_sonoma: "ed81ae7655dd0ca38610c9c5fd48ede0676f2244e29cbdaef8e8dfd62f153abf" + sha256 cellar: :any, arm64_ventura: "89b5d4a1cb8f3c248549e45542e47d15030eac7246d2f59162da2c9f4e162fcd" + sha256 cellar: :any, sonoma: "9362583e5d32849d94162a48cfc68d4294d01dd20d2fe968e54a2684590584cb" + sha256 cellar: :any, ventura: "66143d111af9938f34491c5e892c5884ddd501b5d10ca73fcd6665548f0fa7d5" + sha256 arm64_linux: "b28d983fd5fb53554e68e953bf0545ef30c7e5c3a61873f5bfc9b4d5591a7ab8" + sha256 x86_64_linux: "ab58976a39c13c22ef52e773f9faf6ea1f489e61164b4ff41d71e28376d4f30a" + 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 "theora" + + uses_from_macos "python" => :build + uses_from_macos "zlib" + + on_ventura :or_older do + depends_on "llvm" => :build + + fails_with :clang do + cause "Requires C++20" + end + end + + on_linux do + depends_on "alsa-lib" + depends_on "mesa" + depends_on "tcl-tk@8" + end + + fails_with :gcc do + version "7" + cause "Requires C++20" + end + + def install + ENV.llvm_clang if OS.mac? && MacOS.version <= :ventura + + # 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"] = OS.mac? ? MacOS.sdk_path/"System/Library/Frameworks/Tcl.framework" : Formula["tcl-tk@8"].lib + + system "./configure" + system "make", "CXX=#{ENV.cxx}" + + 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/openrct2.rb b/Formula/o/openrct2.rb new file mode 100644 index 0000000000000..36756eeb2ebfd --- /dev/null +++ b/Formula/o/openrct2.rb @@ -0,0 +1,102 @@ +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.4.22", + revision: "b7199e30991d52ca66e416c4604bbe31c0a826d5" + license "GPL-3.0-only" + head "https://github.com/OpenRCT2/OpenRCT2.git", branch: "develop" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c1f7ee4afbf3562352e459004395faafcf8a1766ca007c6351a7942b71b1c7e6" + sha256 cellar: :any, arm64_sonoma: "223c776a2034bc006f21f8ddf54c96d8fda19f4090d8625bdd4cab8348c1b162" + sha256 cellar: :any, sonoma: "69f288a413ba65d9df377d47ce87aa50c8d4d099c8aa70f00425c5df2679d31a" + sha256 arm64_linux: "43f42a4cc57a1cc3edf61eeda95f825c61f0619fb8d01fec565927f160e162f1" + sha256 x86_64_linux: "d0c938effee1cfaf81194bbb335b6e9f040605ca5886da83845ae507c74b43a8" + end + + depends_on "cmake" => :build + depends_on "nlohmann-json" => :build + depends_on "pkgconf" => :build + + depends_on "duktape" + depends_on "flac" + depends_on "freetype" + depends_on "icu4c@77" + depends_on "libogg" + depends_on "libpng" + depends_on "libvorbis" + depends_on "libzip" + depends_on macos: :sonoma # Needs C++20 features not in Ventura + depends_on "openssl@3" + depends_on "sdl2" + depends_on "speexdsp" + + uses_from_macos "zlib" + + on_linux do + depends_on "curl" + depends_on "fontconfig" + depends_on "mesa" + end + + resource "title-sequences" do + url "https://github.com/OpenRCT2/title-sequences/releases/download/v0.4.14/title-sequences.zip" + sha256 "140df714e806fed411cc49763e7f16b0fcf2a487a57001d1e50fce8f9148a9f3" + end + + resource "objects" do + url "https://github.com/OpenRCT2/objects/releases/download/v1.6.1/objects.zip" + sha256 "6829186630e52c332b6a4847ebb936c549a522fcadaf8f5e5e4579c4c91a4450" + end + + resource "openmusic" do + url "https://github.com/OpenRCT2/OpenMusic/releases/download/v1.6/openmusic.zip" + sha256 "f097d3a4ccd39f7546f97db3ecb1b8be73648f53b7a7595b86cccbdc1a7557e4" + end + + resource "opensound" do + url "https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.5/opensound.zip" + sha256 "a952148be164c128e4fd3aea96822e5f051edd9a0b1f2c84de7f7628ce3b2e18" + end + + def install + # Avoid letting CMake download things during the build process. + (buildpath/"data/sequence").install resource("title-sequences") + (buildpath/"data/object").install resource("objects") + resource("openmusic").stage do + (buildpath/"data/assetpack").install Dir["assetpack/*"] + (buildpath/"data/object/official").install "object/official/music" + end + resource("opensound").stage do + (buildpath/"data/assetpack").install Dir["assetpack/*"] + (buildpath/"data/object/official").install "object/official/audio" + end + + args = %w[ + -DWITH_TESTS=OFF + -DDOWNLOAD_TITLE_SEQUENCES=OFF + -DDOWNLOAD_OBJECTS=OFF + -DDOWNLOAD_OPENMSX=OFF + -DDOWNLOAD_OPENSFX=OFF + -DMACOS_USE_DEPENDENCIES=OFF + -DDISABLE_DISCORD_RPC=ON + ] + args << "-DCMAKE_OSX_DEPLOYMENT_TARGET=#{MacOS.version}" if OS.mac? + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + # By default, the macOS build only looks for data in app bundle Resources. + libexec.install bin/"openrct2" + (bin/"openrct2").write <<~BASH + #!/bin/bash + exec "#{libexec}/openrct2" "$@" "--openrct2-data-path=#{pkgshare}" + BASH + end + + test do + assert_match "OpenRCT2, v#{version}", shell_output("#{bin}/openrct2 -v") + end +end diff --git a/Formula/o/openrtsp.rb b/Formula/o/openrtsp.rb new file mode 100644 index 0000000000000..cd740ff361fd7 --- /dev/null +++ b/Formula/o/openrtsp.rb @@ -0,0 +1,65 @@ +class Openrtsp < Formula + desc "Command-line RTSP client" + homepage "http://www.live555.com/openRTSP" + url "http://www.live555.com/liveMedia/public/live.2025.05.08.tar.gz" + mirror "https://download.videolan.org/pub/videolan/testing/contrib/live555/live.2025.05.08.tar.gz" + # Keep a mirror as upstream tarballs are removed after each version + sha256 "52f6ad40580c00693dbc382e0e7e2aabc1b1bb0d6dcf1fc45f7d491fdcd023ef" + 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_sequoia: "29e06962412562175dad661c57cfe715af9925cebf0fab898b210e2fc73b6eda" + sha256 cellar: :any, arm64_sonoma: "758f7456a9c59e03fdc0a8cced0c283b50af553bf655eb13572e6eab4e3b3ad1" + sha256 cellar: :any, arm64_ventura: "c010ca5fa02921b7ae923aa6bab43ddc92c41b06e237a3eb0da500de03bc3b20" + sha256 cellar: :any, sonoma: "dc73335a0fda284247ad1bdaccbfe9d9d0916a6d4cd2367720e58593175f09fa" + sha256 cellar: :any, ventura: "acc1be7d6dd5e2622ee37878577f6cc40d18bb5fe7408718ab0a0ebe35eb0fc8" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ab9222b7e1557cc44b2bb633dd191945424cb18ef0bf1cb18d3641a850614ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84bdec8d93e663e328a55db8b376c985dfc0130aaa547600a8ab9a9c4ca79af6" + 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..d69302741c422 --- /dev/null +++ b/Formula/o/opensaml.rb @@ -0,0 +1,41 @@ +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_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..3efa3e0053532 --- /dev/null +++ b/Formula/o/opensc.rb @@ -0,0 +1,71 @@ +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_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_high_sierra :or_newer do + <<~EOS + The OpenSSH PKCS11 smartcard integration will not work from High Sierra + onwards. 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..fc575a1086f0b --- /dev/null +++ b/Formula/o/opensca-cli.rb @@ -0,0 +1,31 @@ +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.7.tar.gz" + sha256 "ccf553dbfd5fea4e33dbc35a25d61db3392370f5b9976d1ee2c2763c27076ea1" + license "Apache-2.0" + head "https://github.com/XmirrorSecurity/OpenSCA-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5209a8c6a9858c7671fdb89eef3c5e2054e79604d9bbf809c63fcfd59a71feaf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e266e781fad368e3fad32b50ec6cacfd33f9c78f776e512c7262c161a6f5b901" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b19c63574ca16ebfb800f75104ff2a06a7238ac3aba6b60c03be5a007519d193" + sha256 cellar: :any_skip_relocation, sonoma: "3ba8e5e130f6803f188669e9faa74a2dd85dffbda04ac5719651bbfb9cbd59ac" + sha256 cellar: :any_skip_relocation, ventura: "21248219510663cff235f854091d2814f792960deb166f926cd589f372f70fd8" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f354006480e757ef28169c45ffe8d594620e087ec0de50ff86d2917a328a580" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8baaebe279ae6ac1683d6a89af883fc5688b592b4d8f52cd5ff30808e9450d41" + 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..cfd7f71c33cbf --- /dev/null +++ b/Formula/o/opensearch-dashboards.rb @@ -0,0 +1,193 @@ +class OpensearchDashboards < Formula + desc "Open source visualization dashboards for OpenSearch" + homepage "https://opensearch.org/docs/dashboards/index/" + url "https://github.com/opensearch-project/OpenSearch-Dashboards.git", + tag: "2.19.1", + revision: "782801008fa7d872292e48caca1aca74be5304a6" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "95d945ea43dec1783d7bdc106aed4b69700c5180d6e9226b83e424d29d13c8d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "95d945ea43dec1783d7bdc106aed4b69700c5180d6e9226b83e424d29d13c8d9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "95d945ea43dec1783d7bdc106aed4b69700c5180d6e9226b83e424d29d13c8d9" + sha256 cellar: :any_skip_relocation, sonoma: "69656dbbd31c1c65560db170f3fd53f80600df218b94b49694a6c9e0ef864e7d" + sha256 cellar: :any_skip_relocation, ventura: "69656dbbd31c1c65560db170f3fd53f80600df218b94b49694a6c9e0ef864e7d" + sha256 cellar: :any_skip_relocation, arm64_linux: "7b6abff88ff2905b620ba16d9c8040074e8291b92fb71816a7f128eb954fb072" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5dadc59e74bce5e73e3a3b628b96186912e52bd9f32998d8437441ebeef72258" + end + + # Match deprecation date of `node@18`. + # disable! date: "2025-04-30", because: "uses deprecated `node@18`" + deprecate! date: "2024-10-29", because: "uses deprecated `node@18`" + + depends_on "yarn" => :build + depends_on "opensearch" => :test + depends_on "node@18" # https://github.com/opensearch-project/OpenSearch-Dashboards/issues/9459 + + # - 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@18"].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..0c0a5b308037e --- /dev/null +++ b/Formula/o/opensearch.rb @@ -0,0 +1,108 @@ +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.0.0.tar.gz" + sha256 "5701c0a0e801a27cb1fb6521c17138c43a0933e364fa2cfb5a62cfcdcb4e1270" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "02c7d73c1f51d079efc702aeabc45e840dfbd6f9c3e3a5d5d39845b7e084f9b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "08a110cc034a792732c5612adfa6879b8d0cd360d0abb538f4987be274bdf829" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3ff98574221a06111ee8663c5a55f9de0661b3275f85c93fea08cc4b93a21abb" + sha256 cellar: :any_skip_relocation, sonoma: "9ac2af223ccdc1bc9df151bd53e56415c3ea5a3dd664e9ff6efd32734df83974" + sha256 cellar: :any_skip_relocation, ventura: "7316664aaad936f205d760e5e3292b3f567723d05acd4eaf7cf3c7818333a60b" + sha256 cellar: :any_skip_relocation, arm64_linux: "2af72cc2f707be2ca3ea709fbf1e597a923e4daa7a3e5610178bb697bb022eb8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c7f8b518e5898e1af368400a5053ee50e2df258bc05de53dfcc8549ffffab46f" + end + + depends_on "gradle" => :build + # Can be updated after https://github.com/opensearch-project/OpenSearch/pull/18085 is released. + depends_on "openjdk@21" + + 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" + # Can be updated after https://github.com/opensearch-project/OpenSearch/pull/18085 is released. + bin.env_script_all_files(libexec/"bin", JAVA_HOME: Formula["openjdk@21"].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..923ddba9db08e --- /dev/null +++ b/Formula/o/openshift-cli.rb @@ -0,0 +1,67 @@ +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.18.12/openshift-client-src.tar.gz" + # This project employs synchronized versioning so the sha256 may not change on version bumps + sha256 "583abfd280c49a651f9edabb0ea3988ec2bc961c8723a24d6705ec1232c241ba" + license "Apache-2.0" + head "https://github.com/openshift/oc.git", shallow: false, branch: "master" + + 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_sequoia: "640b59e9c31a7b89430e6d585dfe8fdc4e0111574f7f9a1aa2c48c50e2bad501" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0f209ce30ea92f8e70c4b35e9bcde7374fcc98d3fe6976b43ae0f226d04abd12" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e6a5546a30eb281fb76636ccff6dabf77745b58f2c85ded3765929785a5bd98f" + sha256 cellar: :any_skip_relocation, sonoma: "4e2c33356eb9d7bf4a5da06e2c327c0ca5f96a795efef8aa8ac2cb4d8edace0a" + sha256 cellar: :any_skip_relocation, ventura: "1f67da91ca17357ccb1bf7a38ee5f0d036c9843bb8b13ef17f6fcf745656cc1a" + sha256 cellar: :any_skip_relocation, arm64_linux: "015a63b57578926dbbfba839b4884da1294517ebc250b33466b5446126c95091" + sha256 cellar: :any_skip_relocation, x86_64_linux: "28ef815f319febed17c816e819c96b3cd13deebaa79d686a2ded6c8361742bc2" + 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..691a6a0ca9310 --- /dev/null +++ b/Formula/o/openslide.rb @@ -0,0 +1,57 @@ +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" + + bottle do + 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..6c68db964a6af --- /dev/null +++ b/Formula/o/openslp.rb @@ -0,0 +1,30 @@ +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" + + bottle do + rebuild 1 + sha256 sonoma: "9f8b91c18c4a8e0738618531ad35f6068daa27cb6069362510622592113aada5" + sha256 ventura: "517653bc27072c320f9159e57040c51d5ba0b4ea8b234bb5af9af55a9aea9f42" + sha256 arm64_linux: "7f3de41c36959025ce20d867cfa90c065fba46d872b055d0b7c2a2e6a631b44d" + sha256 x86_64_linux: "aa1988503f1e9688dfd80e0331392ab29a053e62197b60653e933ee1bc681efb" + end + + on_macos do + depends_on arch: :x86_64 + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + + def install + system "./configure", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/o/openssh.rb b/Formula/o/openssh.rb new file mode 100644 index 0000000000000..d894da68f844d --- /dev/null +++ b/Formula/o/openssh.rb @@ -0,0 +1,123 @@ +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-9.9p2.tar.gz" + mirror "https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.9p2.tar.gz" + version "9.9p2" + sha256 "91aadb603e08cc285eddf965e1199d02585fa94d994d6cae5b41e1721e215673" + 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_sequoia: "0f9bafc94fa471cbb2385c7d6c94555007562649922e994db8c0445a509f7309" + sha256 arm64_sonoma: "3d29bd75979fa18a5ffedeb87e980935130badc1e66eb1b03fbe939395d69faa" + sha256 arm64_ventura: "f5ce25d2a671debd1114ce92ba6fc9ecefafce11d8e3fed5287fe29039cb547a" + sha256 sonoma: "abfddd2952c084d370508dbc9f73d841b21a79086798e503f433973c0a96d8f2" + sha256 ventura: "4b3a0a5eedf70dd18d80c2062d2fd3ac370e774b928d21c227dd09d0b18598de" + sha256 arm64_linux: "3161bee35d5c534421e678ac88d5c9c5c4b9cc3027ef84de29158c21b4753853" + sha256 x86_64_linux: "94e604bf4f8b0554621c22291d50063101c43bd4b99b48dbd0c7120a1f5178b5" + 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_macos do + # Both these patches are applied by Apple. + # https://github.com/apple-oss-distributions/OpenSSH/blob/main/openssh/sandbox-darwin.c#L66 + patch do + url "https://raw.githubusercontent.com/Homebrew/patches/1860b0a745f1fe726900974845d1b0dd3c3398d6/openssh/patch-sandbox-darwin.c-apple-sandbox-named-external.diff" + sha256 "d886b98f99fd27e3157b02b5b57f3fb49f43fd33806195970d4567f12be66e71" + end + + # https://github.com/apple-oss-distributions/OpenSSH/blob/main/openssh/sshd.c#L532 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/aa6c71920318f97370d74f2303d6aea387fb68e4/openssh/patch-sshd.c-apple-sandbox-named-external.diff" + sha256 "3f06fc03bcbbf3e6ba6360ef93edd2301f73efcd8069e516245aea7c4fb21279" + end + end + + 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 + if OS.mac? + 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" + + # FIXME: `ssh-keygen` errors out when this is built with optimisation. + # Reported upstream at https://bugzilla.mindrot.org/show_bug.cgi?id=3584 + # Also can segfault at runtime: https://github.com/Homebrew/homebrew-core/issues/135200 + if Hardware::CPU.intel? && DevelopmentTools.clang_build_version == 1403 + inreplace "configure", "-fzero-call-used-regs=all", "-fzero-call-used-regs=used" + end + end + + 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@1.1.rb b/Formula/o/openssl@1.1.rb new file mode 100644 index 0000000000000..06aa785a4e06d --- /dev/null +++ b/Formula/o/openssl@1.1.rb @@ -0,0 +1,147 @@ +class OpensslAT11 < Formula + desc "Cryptography and SSL/TLS Toolkit" + homepage "https://openssl.org/" + url "https://www.openssl.org/source/openssl-1.1.1w.tar.gz" + mirror "https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.1.1w.tar.gz" + mirror "http://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.1.1w.tar.gz" + mirror "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gz" + mirror "https://www.mirrorservice.org/sites/ftp.openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gz" + mirror "http://www.mirrorservice.org/sites/ftp.openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gz" + sha256 "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8" + license "OpenSSL" + version_scheme 1 + + bottle do + rebuild 1 + sha256 arm64_sequoia: "e49b48327359eb6f1e1a0c67f4810105d803b560cd0d70c7247f2157f7cffe61" + sha256 arm64_sonoma: "00fe912a43983918e60fa5b009e81347c7775c6bfbcd89ee067dc293f35547f9" + sha256 arm64_ventura: "eaec02db0f43d4f11ff1299ecbcbe182ea30af62b22e5cfaaf6b77d5bbbddbbb" + sha256 arm64_monterey: "edb44a1452fe8d30491d156b0cdad749027f2daf80d4e0f04953ee2b192f7dc4" + sha256 sonoma: "8b6e4ba1f184ffe1f74c66e028887aba08c1810ae7c5ed226fe491a6de8bc8e1" + sha256 ventura: "8111bc5385b46990584fa3fc1ecd20b0f0532fa20a7efbef2a5f4ebe2ca5ba2d" + sha256 monterey: "aee993c9e2f76f76b6015446c786ca9fbebf20486c34a52d5047a843bb50fc30" + sha256 x86_64_linux: "076d0f3ec7d6938cd2b360ca39a4f70395214d0a545fe0fa8a6c5d23659b65c2" + end + + keg_only :versioned_formula + + # See: https://www.openssl.org/policies/releasestrat.html + disable! date: "2024-10-24", 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.44.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/L/LE/LEONT/Test-Harness-3.44.tar.gz" + sha256 "7eb591ea6b499ece6745ff3e80e60cee669f0037f9ccbc4e4511425f593e5297" + end + + resource "Test::More" do + url "https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302195.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302195.tar.gz" + sha256 "b390bb23592e0b946c95adbb3c30b11bc634a286b2847be611ad929c57e39a6c" + end + + resource "ExtUtils::MakeMaker" do + url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.70.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.70.tar.gz" + sha256 "f108bd46420d2f00d242825f865b0f68851084924924f92261d684c49e3e7a74" + 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} + no-ssl3 + no-ssl3-method + no-zlib + ] + on_linux do + args += (ENV.cflags || "").split + args += (ENV.cppflags || "").split + args += (ENV.ldflags || "").split + args << "enable-md2" + 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 + + system "perl", "./Configure", *(configure_args + arch_args) + system "make" + system "make", "install", "MANDIR=#{man}", "MANSUFFIX=ssl" + system "make", "test" + + # Prevent `brew` from pruning the `certs` and `private` directories. + touch %w[certs private].map { |subdir| openssldir/subdir/".keepme" } + end + + def openssldir + etc/"openssl@1.1" + 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.0.rb b/Formula/o/openssl@3.0.rb new file mode 100644 index 0000000000000..ba3e1d9abeb63 --- /dev/null +++ b/Formula/o/openssl@3.0.rb @@ -0,0 +1,142 @@ +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.16/openssl-3.0.16.tar.gz" + sha256 "57e03c50feab5d31b152af2b764f10379aecd8ee92f16c985983ce4a99f7ef86" + 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_sequoia: "233627d17c14610b73e61d9fbe8483047964a25288129439f75796cfdfbec284" + sha256 arm64_sonoma: "46463e4f63526dc94b47d5cf35742fc9f582037af4701408a47ff67d460b8729" + sha256 arm64_ventura: "68703232022ea59ffbaa9df18af2729deafd8156d429eeee776d8ef3bdb71d42" + sha256 sonoma: "78f7c4e520022d939f044b633e445285464d750335673415580e4276edd4832d" + sha256 ventura: "99481795ad61ca2c0c5d4b2b04289e34d60af0e4a134cb45cb51c959b97f70fb" + sha256 arm64_linux: "27ff49771ec269c196f1186c71379dc14efa2dc36d128480a72f3c0e1980e073" + sha256 x86_64_linux: "8bb05cb857db7d6c328960cf1bfc9ba72b566cc0a4efaddab5879b91b44d369f" + 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.50.tar.gz" + mirror "http://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.302209.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302209.tar.gz" + sha256 "dde1a388b94e178808039361f6393c7195f72518c39967a7a3582299b8c39e3e" + end + + resource "ExtUtils::MakeMaker" do + url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.70.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.70.tar.gz" + sha256 "f108bd46420d2f00d242825f865b0f68851084924924f92261d684c49e3e7a74" + 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.rb b/Formula/o/openssl@3.rb new file mode 100644 index 0000000000000..372b4199ad1a8 --- /dev/null +++ b/Formula/o/openssl@3.rb @@ -0,0 +1,175 @@ +class OpensslAT3 < Formula + desc "Cryptography and SSL/TLS Toolkit" + homepage "https://openssl-library.org/" + url "https://github.com/openssl/openssl/releases/download/openssl-3.5.0/openssl-3.5.0.tar.gz" + mirror "http://fresh-center.net/linux/misc/openssl-3.5.0.tar.gz" + sha256 "344d0a79f1a9b08029b0744e2cc401a43f9c90acd1044d09a530b4885a8e9fc0" + 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_sequoia: "7bbac0e84510570ec550deee1dce185569917378411263a9d1329ae395f52d70" + sha256 arm64_sonoma: "3bb3709fe0c67077cb54af5436442e81288804647ba513b34413c5163b43f9b8" + sha256 arm64_ventura: "e74364d568abea9347f89f356bf437e3146deaf5c4cf31c72b4ab4521700df50" + sha256 sequoia: "15431f4b9cf582e4b9b5d638057c8ed1db23fd166e425d66bcca0d36aa2ab585" + sha256 sonoma: "0c5f237b38048abfe7fe045f709d334f235e3dfe39853f7877dd248f5c7670fe" + sha256 ventura: "75baf6311dd7c014d765a11805b49b890af1be7d98c0f29c9870bf1ada112547" + sha256 arm64_linux: "9e4199643ddb0220c637e8830a6c34fab3b9a9a06abb9f44da516b4f26cdd681" + sha256 x86_64_linux: "178ae44b213319b0aa9e6d7b41772705099f50bd6b5de4ba1e6ae526e25af37a" + 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.50.tar.gz" + mirror "http://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.302210.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302210.tar.gz" + sha256 "acb9ca8d582b8c0bbe53c6d9b3264f1cf66eaa7135f41f979747104183aea509" + end + + resource "ExtUtils::MakeMaker" do + url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.74.tar.gz" + mirror "http://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.74.tar.gz" + sha256 "8ad2be00713b49dcfd386286e0a64ff9297b771a485f2425fbc144794f5a3e8c" + 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 + 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" + 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..ab531f11f9327 --- /dev/null +++ b/Formula/o/openstackclient.rb @@ -0,0 +1,418 @@ +class Openstackclient < Formula + include Language::Python::Virtualenv + + desc "Command-line client for OpenStack" + homepage "https://openstack.org/" + # TODO: remove `setuptools` from pypi_formula_mappings.json after https://review.opendev.org/c/openstack/pbr/+/924216 + url "https://files.pythonhosted.org/packages/81/81/afb257489a665cfc330129cc8bb74c4131a085c310eeb74cc86391c3dd06/python_openstackclient-8.0.0.tar.gz" + sha256 "5b7a5e06893f833b5d296d019c50d42c7368e37748ee6be8e9b15655b999424e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "77b83d23f06af1b5c79620681e92ed0908673ec287fa56afd58fd1004db4d6fc" + sha256 cellar: :any, arm64_sonoma: "deafaede5af3f1775f7ac3137bd7595aff4800bb3fb719dd10b6e8b89fe0890d" + sha256 cellar: :any, arm64_ventura: "41b5705d23ea14c61ae84599cbad7613187a9b5370700353b8606944a465dc58" + sha256 cellar: :any, sonoma: "e118b22f30959e97a33993c2cc2929eba4c02c38a5002108b965dc2cf52342a7" + sha256 cellar: :any, ventura: "00e5146fb5dac09a3776710acf055b96ee1129988036d1c2353004e2ed2b72d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "597b585e51c06b172855b186dd62f108140e07476b972da22e53091bfc24d9c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed9b7ae8f895dded24e0f300b49f58df4795d5a4444e600a4aa72f305124bdb2" + end + + depends_on "rust" => :build # for rpds-py + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "cliff" do + url "https://files.pythonhosted.org/packages/62/74/c7fb720990b17da636064a7993506c230f7a913b752f0116ad2a2e39d621/cliff-4.9.1.tar.gz" + sha256 "5b392198293c0b9225d459be8ba710cf8248f1ee33006bdeb3d92fb0012592b4" + end + + resource "cmd2" do + url "https://files.pythonhosted.org/packages/f7/2a/018fe937e25e1db0cafeb358c117644a58cdba24f5bbee69c003faf0b454/cmd2-2.5.11.tar.gz" + sha256 "30a0d385021fbe4a4116672845e5695bbe56eb682f9096066776394f954a7429" + 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/cb/b7/2fa37f52b4f38bc8eb6d4923163dd822ca6f9e2f817378478a5de73b239e/dogpile_cache-1.3.4.tar.gz" + sha256 "4f0295575f5fdd3f7e13c84ba8e36656971d1869a2081b4737ec99ede378a8c0" + 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 "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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + end + + resource "jsonschema-specifications" do + url "https://files.pythonhosted.org/packages/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + end + + resource "keystoneauth-websso" do + url "https://files.pythonhosted.org/packages/bf/e0/f138694f014d5b43ecdec1e105db8a872c3f966ed4f96dbf736149f64ee6/keystoneauth_websso-0.2.0.tar.gz" + sha256 "f381ad0583a1fe462630c939568c9f970dcdac1bb1915fd58fe8a1f126f0cc0a" + end + + resource "keystoneauth1" do + url "https://files.pythonhosted.org/packages/59/f8/39aa1ac0c7fb9e7c8849f17e663eac208262689b7b9db02861b5e1093500/keystoneauth1-5.10.0.tar.gz" + sha256 "34b870dbbcf806cdb5aec98483b62820a6568d364eca7b1174ca6a8b5a9c77ed" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + end + + resource "multipart" do + url "https://files.pythonhosted.org/packages/df/91/6c93b6a95e6a99ef929a99d019fbf5b5f7fd3368389a0b1ec7ce0a23565b/multipart-1.2.1.tar.gz" + sha256 "829b909b67bc1ad1c6d4488fcdc6391c2847842b08323addf5200db88dbe9480" + 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/c2/9e/dc50e3821ba3dda7e94071a25f8daa34575d92752e94e0d3e8583064856e/openstacksdk-4.4.0.tar.gz" + sha256 "157437563d64f3f6feec1796fbd8552d56277332461778c4dbe76d1828fd31e0" + 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/47/84/ecd798d1aee59b5501de21e8e69f98f5ba275464053be62309a4d4a4b85b/osc_lib-4.0.0.tar.gz" + sha256 "1dd15dd64c2b62101487a0f774821839df6b2baa5abc1a572c8e6c53314ee3e7" + end + + resource "osc-placement" do + url "https://files.pythonhosted.org/packages/e4/fb/5a692bbb4ce3fd59233dae986fec7ac53aca2a0053cf6218e452169071d8/osc_placement-4.6.0.tar.gz" + sha256 "36ae070edbf76af42c1f0eccd7f6153a782040dbc910fbcd2ba7eeb02efd3b8d" + end + + resource "oslo-config" do + url "https://files.pythonhosted.org/packages/3c/ac/aa17577d353a8c90b758a0edb1a94de7fffa24283c7f82cd2c485cb0a740/oslo_config-9.7.1.tar.gz" + sha256 "5558b34bcc2b52f2208e80fcad955a4f7b2c41bb245b6451d43a621ad1263bbd" + end + + resource "oslo-context" do + url "https://files.pythonhosted.org/packages/a3/65/17722b5f616aa129cee9b5f4a34952ffac7845f7a2cb842472b27c990caa/oslo_context-5.7.1.tar.gz" + sha256 "0c511fe153732aff0c1b3b44abd2f51008a83c707bb929bee01e1255ac964889" + end + + resource "oslo-i18n" do + url "https://files.pythonhosted.org/packages/cc/94/8ab2746a3251e805be8f7fd5243df44fe6289269ce9f7105bdbe418be90d/oslo_i18n-6.5.1.tar.gz" + sha256 "ea856a70c5af7c76efb6590994231289deabe23be8477159d37901cef33b109d" + end + + resource "oslo-log" do + url "https://files.pythonhosted.org/packages/72/e9/ed065144ab6dec839fe7bafebfa803b775eb2149db33878ca5ff613f6b11/oslo_log-7.1.0.tar.gz" + sha256 "9a2b3c18be6f59152dfe25f34deabe71343db7fb8248a633967fb6a04707629d" + end + + resource "oslo-serialization" do + url "https://files.pythonhosted.org/packages/a7/44/e7f2aaef66d7a02c74ce425f2bad8c4aaf11f39bb02fea98eeb7452a0910/oslo_serialization-5.7.0.tar.gz" + sha256 "bdc4d3dd97b80639b3505e46d9aa439fc95028814177f30b91743e81366c3be7" + end + + resource "oslo-utils" do + url "https://files.pythonhosted.org/packages/f1/98/0c74172604f4ea9db117933fa9794e82a66438481a1e5a538584479c92f8/oslo_utils-8.2.0.tar.gz" + sha256 "dcf78d14b968fb7b14263c77278b2b930a7861d3caa887d3a58b2890f6659835" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/01/d2/510cc0d218e753ba62a1bc1434651db3cd797a9716a0a66cc714cb4f0935/pbr-6.1.1.tar.gz" + sha256 "93ea72ce6989eb2eed99d0f75721474f69ad88128afdef5ac377eb797c4bf76b" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + 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-barbicanclient" do + url "https://files.pythonhosted.org/packages/8b/43/6fe98492ea213d3e9d10bd666668790bea70f73b4f2eb17a10c26a030ceb/python_barbicanclient-7.1.0.tar.gz" + sha256 "1394b72a7a2c46378d78a7f3a3c8fbec5fe7f8598ae5ead47522afd8ffdb1696" + end + + resource "python-cinderclient" do + url "https://files.pythonhosted.org/packages/ed/25/a2bf747f91f86e25f56115499da2654b7cab849c816c0774128066da2a3e/python_cinderclient-9.7.0.tar.gz" + sha256 "18c4501e549677984d85b0b10fd074efbd265e30add2a796d28176055a8d7dcf" + end + + resource "python-cloudkittyclient" do + url "https://files.pythonhosted.org/packages/3c/cb/f67c65313297d8a3d93975012a2ab2364740b153493e54598f87bc1705a2/python_cloudkittyclient-5.3.1.tar.gz" + sha256 "3528e4fe2d7ad52304dbd5d61e0f65f8590a33714e92994e270f520ede4826af" + 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/e1/f9/f326c606aa5a1ce383c223b6fa58747ebf6049890085e68bb3001d76f4ae/python_designateclient-6.2.0.tar.gz" + sha256 "d25c8f136c4ff1dedd4255df620ddacb6949740a1324f6ac1d3c593b320380ed" + end + + resource "python-glanceclient" do + url "https://files.pythonhosted.org/packages/9d/55/996a756318b17f162665cbc9f7e6219d6dc56875684693f07a60c02d7148/python_glanceclient-4.8.0.tar.gz" + sha256 "f85b6fc81f27b34da1c87484b3097659db0529abd1c67595d2f0fe7cb159036c" + end + + resource "python-heatclient" do + url "https://files.pythonhosted.org/packages/15/1a/d53aae3b7f281af51ee738b3b275ff781ee5b47e68992f8d90523624d9cd/python-heatclient-4.1.0.tar.gz" + sha256 "d68499ce67031304e105b17c33f9ef63ffdac492f2414c4301539822c2ebf70d" + end + + resource "python-ironicclient" do + url "https://files.pythonhosted.org/packages/c9/be/c8fa91c8c3554eceff66ba998af9f8b90b94c467353e251c9c05618f4eb7/python-ironicclient-5.10.0.tar.gz" + sha256 "120d9e6a4ae2e7ed613ee2b2abdf9fe1d2f7de297a1b82d82d9be85987d4e0b6" + end + + resource "python-keystoneclient" do + url "https://files.pythonhosted.org/packages/91/d9/e6b430abdd77caccfc0f47005f7ff2125d143b16bd6f9aaa46ceaac75b90/python_keystoneclient-5.6.0.tar.gz" + sha256 "721de2aec7710076389c674ee27b6712e97d86c7e0ff487b0b4409c8fcee10e7" + end + + resource "python-magnumclient" do + url "https://files.pythonhosted.org/packages/71/d5/16f96df3637d21e2c70657726270cd535001fbc233aa0fc3dc10e2337d0e/python_magnumclient-4.8.1.tar.gz" + sha256 "6cd7d6f4ca508603f773344a4eb4e0d1968727171c726d12ee86d67635a7e3b5" + end + + resource "python-manilaclient" do + url "https://files.pythonhosted.org/packages/34/a6/d3969f862c0a5c512233c4e6e764738b25acbb4149e23d9f04f837abb3e3/python_manilaclient-5.4.0.tar.gz" + sha256 "e7c018673a45c06e157760175b5598c736ca46d32b8bb73263b91ba2abfd10df" + end + + resource "python-mistralclient" do + url "https://files.pythonhosted.org/packages/f4/e7/90ffb6e62715db2856d2b1e245c147abffbd0812c444caa51ccaa210cd99/python_mistralclient-5.4.0.tar.gz" + sha256 "38e34060e89cf2bef4d750f131f61f86a45738d345d0d3918061c76e3f04d968" + end + + resource "python-neutronclient" do + url "https://files.pythonhosted.org/packages/62/f5/43ac046c8bc32068faccd4d0b79e44c08ec96b7104a0ac70974c2a17ac76/python-neutronclient-11.4.0.tar.gz" + sha256 "8741219362e4bf9c2e43f2e6cae4d4991ed8f9df9063f43408a0b658b03d62e2" + end + + resource "python-octaviaclient" do + url "https://files.pythonhosted.org/packages/b5/10/feaf9e2365c99739b1530f31f19e98ec3817543d156bf76a0458d27cbeb4/python_octaviaclient-3.10.0.tar.gz" + sha256 "db2667b8f7611b27c48d2e5b2d76d18e197fbfe990cb2cd896fde06f3b4d6228" + end + + resource "python-swiftclient" do + url "https://files.pythonhosted.org/packages/6b/75/80d296c0ee9d48acde631adae21877b8199c3d8facaedfad998d87bbea56/python_swiftclient-4.7.0.tar.gz" + sha256 "afd7575753d8e49617adcb11550187fd0b120fcd819f1e782c0b538f2d093773" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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 "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + 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/28/3f/13cacea96900bbd31bb05c6b74135f85d15564fc583802be56976c940470/stevedore-5.4.1.tar.gz" + sha256 "3135b5ae50fe12816ef291baff420acb727fcd356106e3e9cbfa9e5985cd6f4b" + 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 "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 "warlock" do + url "https://files.pythonhosted.org/packages/de/cf/ba9ac96d09b797c377e2c12c0eb6b19565f3b2a2efb55932d319e319b622/warlock-2.0.1.tar.gz" + sha256 "99abbf9525b2a77f2cde896d3a9f18a5b4590db063db65e08207694d2e0137fc" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + 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-manliaclient + "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..d564b160f7ad0 --- /dev/null +++ b/Formula/o/opensubdiv.rb @@ -0,0 +1,55 @@ +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_6_0.tar.gz" + sha256 "bebfd61ab6657a4f4ff27845fb66a167d00395783bfbd253254d87447ed1d879" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:[._]\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "82514e22222203cd7f1311d3e327cade6c43276a8824f86438fafe8bc14b8b33" + sha256 cellar: :any, arm64_sonoma: "0eedbb0c9de3bac83f8a80d501d6dc419942e8f09c4eecc5a49ce5dbb2243d64" + sha256 cellar: :any, arm64_ventura: "50e2cc8bbc3be3c7f3b507f4a65e75888c932ea97bee2a8478d8a71ff6f8726a" + sha256 cellar: :any, arm64_monterey: "7d1d66be2ebc32bcb9479e69f329bd228ae2542233792d19bb26c1163dd3ef4a" + sha256 cellar: :any, arm64_big_sur: "1d94e5690cec6024c9bd13615a794ac68dc3a10119c80485df785515995125a7" + sha256 cellar: :any, sonoma: "f0fd75bc49465fe550a484cc1f24adeb18916eafaac7e63df182a5d5c27f7b43" + sha256 cellar: :any, ventura: "bc2da69a8b23d92d1e7101a48cc807064fd41a14cd6a8da1c940ae906106d048" + sha256 cellar: :any, monterey: "4f62d8949eeac18135b8e8a4de554a46dea88476283633085330856c8e034a7f" + sha256 cellar: :any, big_sur: "e895c57930e63805ce8493a73b83a3aaf92269fc5e9755234868a3aab2532cea" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e571546749c5a3bbd1b04aad99b75518e10d645e3829d2d392a5d3d16e0a183" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ce1c6ebb77690c1f20e601272430e50f0dbc21d7a8a8952a8f1b6ed0dffbd6c" + 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..3ba0489687f34 --- /dev/null +++ b/Formula/o/opentelemetry-cpp.rb @@ -0,0 +1,91 @@ +class OpentelemetryCpp < Formula + desc "OpenTelemetry C++ Client" + homepage "https://opentelemetry.io/" + url "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.20.0.tar.gz" + sha256 "4b6eeb852f075133c21b95948017f13a3e21740e55b921d27e42970a47314297" + license "Apache-2.0" + revision 1 + head "https://github.com/open-telemetry/opentelemetry-cpp.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "35e9ca4b73c2c1d56d7ca729e97fc03bfd58828d292a8e389c2e738fb0a5f0a9" + sha256 arm64_sonoma: "f6d35a1e84bfdb23df33c5d8497ddf2d95a29b47985b851cedbd2d55e20746be" + sha256 arm64_ventura: "24fbda4dc221d206bd6c2f552479d21c2a508589bc11fdd0d980d17a95e25bf6" + sha256 cellar: :any, sonoma: "a41d6d05b61c3b03e658bc3f879c1fa61e5f8f0c481f221cc54b47e1fbb84f6d" + sha256 cellar: :any, ventura: "5c3e342a047945186156c271b72cea821fadafc03a9c2eeca781e78c0e1ad2bf" + sha256 cellar: :any_skip_relocation, arm64_linux: "a08936476fec3b89447d2370cefb0f3c8ed3dd0f137f2b26365f90e13118d577" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bce1da330e1ccd543776e3e397a383ed1f887a92d02c934512b0a512d8e98bad" + 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 + + def install + 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}", + "-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..2ae33d54c795e --- /dev/null +++ b/Formula/o/opentofu.rb @@ -0,0 +1,60 @@ +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.9.1.tar.gz" + sha256 "8fc573e33db7336d307aa671ccea407bd6c3d092a84d22b65f4c1e9968502972" + license "MPL-2.0" + head "https://github.com/opentofu/opentofu.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "10e8e16af41570eaa36c2b1258308ba3dccda2ccaaa88be5f6f59849730ef1f7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "10e8e16af41570eaa36c2b1258308ba3dccda2ccaaa88be5f6f59849730ef1f7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "10e8e16af41570eaa36c2b1258308ba3dccda2ccaaa88be5f6f59849730ef1f7" + sha256 cellar: :any_skip_relocation, sonoma: "8b49cbe48ccf38ce2c7153649686db9ea0cc9b3f7d1d6da65dcbbfec9f65b641" + sha256 cellar: :any_skip_relocation, ventura: "8b49cbe48ccf38ce2c7153649686db9ea0cc9b3f7d1d6da65dcbbfec9f65b641" + sha256 cellar: :any_skip_relocation, x86_64_linux: "185f53c8518d3613ed1b5e7378c35a694839707a603d43a4a9b6bdde4ed84191" + end + + depends_on "go" => :build + + conflicts_with "tenv", "tofuenv", because: "both install tofu binary" + + def install + 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 + 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/"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..defc93d12e0c2 --- /dev/null +++ b/Formula/o/opentracing-cpp.rb @@ -0,0 +1,43 @@ +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, mojave: "5a10c35e98785ee6567c241e845e3fd24a2fa52f15ade1d4e6a91f939752bd8c" + sha256 cellar: :any, high_sierra: "7747ffc077d879fbbbf4509e65fcfc154f238c9c92482bf94d1fb176156be563" + 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..a0e87a6de5274 --- /dev/null +++ b/Formula/o/opentsdb.rb @@ -0,0 +1,137 @@ +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 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, sonoma: "1e94a2ce5cc95c944f5763df3442cc2fe71d12279f134b0a051549c6b4bd902a" + sha256 cellar: :any_skip_relocation, ventura: "022671a452bff9bacb3c84213f26adfb9d4fc50bdfbd28e2997262f6f5936607" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c51dd6ebd008e6868a745d85dfe01374ef3b4e3ada22a54d4015d89e7973443" + end + + 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/openttd.rb b/Formula/o/openttd.rb new file mode 100644 index 0000000000000..61318d03d22fa --- /dev/null +++ b/Formula/o/openttd.rb @@ -0,0 +1,136 @@ +class Openttd < Formula + desc "Simulation game based upon Transport Tycoon Deluxe" + homepage "https://www.openttd.org/" + url "https://cdn.openttd.org/openttd-releases/14.1/openttd-14.1-source.tar.xz" + sha256 "2c14c8f01f44148c4f2c88c169a30abcdb002eb128a92b9adb76baa76b013494" + license "GPL-2.0-only" + head "https://github.com/OpenTTD/OpenTTD.git", branch: "master" + + livecheck do + url "https://cdn.openttd.org/openttd-releases/latest.yaml" + strategy :yaml do |yaml| + yaml["latest"]&.map do |item| + next if item["name"] != "stable" + + item["version"]&.to_s + end + end + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "9bf761325d3daef0e00c49a0342f01c6644eeb8e02e4e5ea2a0e97ff9e082bb3" + sha256 cellar: :any, arm64_sonoma: "ae5d3950fa4f5657138cb1065b1cdbabb002e45bb477c36043b222337309adba" + sha256 cellar: :any, arm64_ventura: "96fc8bd75124c582c395b096510ac5a5181011324e864245405868b986e5c98a" + sha256 cellar: :any, sonoma: "21fe8f3bdf5dc3a72cb9611b803ded25636c2810011e92473ea746e8a408aa47" + sha256 cellar: :any, ventura: "ec77cc4c95af77799c2633ad0a923407d1bdc41b1f01f64c19c02e49fa4474a1" + sha256 arm64_linux: "08de4aa05ee549111d0864cd81896e025b36f4bf003b0a309a799e0b8692ee4d" + sha256 x86_64_linux: "3f9df17a1ca7f18ea2c30b5de7c02658d9dee44dbdf1561d34c9c58fe6043906" + end + + depends_on "cmake" => :build + depends_on "libpng" + depends_on "lzo" + depends_on macos: :catalina # needs C++20 + depends_on "xz" + + uses_from_macos "zlib" + + on_linux do + depends_on "fluid-synth" + depends_on "fontconfig" + depends_on "freetype" + depends_on "mesa" # no linkage as dynamically loaded by SDL2 + depends_on "sdl2" + end + + resource "opengfx" do + url "https://cdn.openttd.org/opengfx-releases/7.1/opengfx-7.1-all.zip" + sha256 "928fcf34efd0719a3560cbab6821d71ce686b6315e8825360fba87a7a94d7846" + + livecheck do + url "https://cdn.openttd.org/opengfx-releases/latest.yaml" + strategy :yaml do |yaml| + yaml["latest"]&.map do |item| + next if item["name"] != "stable" + + item["version"]&.to_s + end + end + end + end + + resource "openmsx" do + url "https://cdn.openttd.org/openmsx-releases/0.4.2/openmsx-0.4.2-all.zip" + sha256 "5a4277a2e62d87f2952ea5020dc20fb2f6ffafdccf9913fbf35ad45ee30ec762" + + livecheck do + url "https://cdn.openttd.org/openmsx-releases/latest.yaml" + strategy :yaml do |yaml| + yaml["latest"]&.map do |item| + next if item["name"] != "stable" + + item["version"]&.to_s + end + end + end + end + + resource "opensfx" do + url "https://cdn.openttd.org/opensfx-releases/1.0.3/opensfx-1.0.3-all.zip" + sha256 "e0a218b7dd9438e701503b0f84c25a97c1c11b7c2f025323fb19d6db16ef3759" + + livecheck do + url "https://cdn.openttd.org/opensfx-releases/latest.yaml" + strategy :yaml do |yaml| + yaml["latest"]&.map do |item| + next if item["name"] != "stable" + + item["version"]&.to_s + end + end + end + end + + def install + # Disable CMake fixup_bundle to prevent copying dylibs + inreplace "cmake/PackageBundle.cmake", "fixup_bundle(", "# \\0" + # Have CMake use our FIND_FRAMEWORK setting + inreplace "CMakeLists.txt", "set(CMAKE_FIND_FRAMEWORK LAST)", "" + + args = std_cmake_args(find_framework: "FIRST") + unless OS.mac? + args << "-DCMAKE_INSTALL_BINDIR=bin" + args << "-DCMAKE_INSTALL_DATADIR=#{share}" + end + + system "cmake", "-S", ".", "-B", "build", *args + system "cmake", "--build", "build" + if OS.mac? + cd "build" do + system "cpack || :" + end + else + system "cmake", "--install", "build" + end + + arch = Hardware::CPU.arm? ? "arm64" : "amd64" + app = "build/_CPack_Packages/#{arch}/Bundle/openttd-#{version}-macos-#{arch}/OpenTTD.app" + resources.each do |r| + if OS.mac? + (buildpath/"#{app}/Contents/Resources/baseset/#{r.name}").install r + else + (pkgshare/"baseset"/r.name).install r + end + end + + if OS.mac? + prefix.install app + bin.write_exec_script "#{prefix}/OpenTTD.app/Contents/MacOS/openttd" + end + end + + test do + assert_match "OpenTTD #{version}\n", shell_output("#{bin}/openttd -h") + end +end diff --git a/Formula/o/openvdb.rb b/Formula/o/openvdb.rb new file mode 100644 index 0000000000000..3d5d6d3c8aea3 --- /dev/null +++ b/Formula/o/openvdb.rb @@ -0,0 +1,53 @@ +class Openvdb < Formula + desc "Sparse volumetric data processing toolkit" + homepage "https://www.openvdb.org/" + url "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v12.0.1.tar.gz" + sha256 "a3c8724ecadabaf558b6e1bd6f1d695e93b82a7cfdf144b8551e5253340ddce0" + license "MPL-2.0" + revision 1 + head "https://github.com/AcademySoftwareFoundation/openvdb.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e5e2388088cb975d19b0664d6ef76daa9c6e5fb580a51edd5b2eb7e25baeb934" + sha256 cellar: :any, arm64_sonoma: "396a754a3814699ae6e6e7685b40d355200be6317d417f792c66fd65f739d107" + sha256 cellar: :any, arm64_ventura: "666ef7438d1b4351383e6a400d8c0b1372c31a8cf49d416ce4bbdab78445911e" + sha256 cellar: :any, sonoma: "1daabc3991fdcb0bf124a0c836a4f58546b5b940a995251ad1c2222c01c4bc33" + sha256 cellar: :any, ventura: "c2b06fb2567d93f54d5ab86662aaa68e8aaa8d870cf1913f5a88770d35f0a0fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "5813a2bfa6606edf0e917c40730f99c041fb6f80d33bda806fb95c6f5c283157" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fdd3215c373c647f4c9d74dfe93e2da68c0127647c28467ae67febe89a7acd98" + 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..a44a2edd6f54d --- /dev/null +++ b/Formula/o/openvi.rb @@ -0,0 +1,30 @@ +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.6.31.tar.gz" + sha256 "75ef62fd882d8a18e388509f5fe4eca6b241f3286f6121e2bcbea65ec592ae11" + license "BSD-3-Clause" + head "https://github.com/johnsonjh/OpenVi.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7782e6ed0969f0329395994ababca79b94ea7a8e576b97cdb71ec6698f070e45" + sha256 cellar: :any, arm64_sonoma: "3516b1e080308c873e3d03a050a07f0e0515abe4baa306cd9bc8a838371a7d1f" + sha256 cellar: :any, arm64_ventura: "51f83e5960cdae0f320dd3d9c84b0130c454bf30f834b196c0ad204d979b4b13" + sha256 cellar: :any, sonoma: "bb4fcc6193748bca32f6d5994ac0d03305a1656ebca9ab146cffe8f2d0efbe10" + sha256 cellar: :any, ventura: "a8f35299f732a8d44488d8dbfdcdcc697f4b2e3e0c26e3b9c20d0a00a01ede58" + sha256 cellar: :any_skip_relocation, arm64_linux: "639cbb47ed0bfba8d0a0623d0a8b2cc804408088169992779c42c09d74d78206" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec194a9a4049c4c7ae786e494072d97261b1d0865661819796668caa2ad893be" + end + + depends_on "ncurses" # https://github.com/johnsonjh/OpenVi/issues/32 + + def install + system "make", "install", "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..c40a34fed7968 --- /dev/null +++ b/Formula/o/openvino.rb @@ -0,0 +1,207 @@ +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.0.0.tar.gz" + sha256 "d2cbff5a0ac1bc738c33ba103569f8daf20d3a17d3db94da11ae207ffb9e4395" + license "Apache-2.0" + head "https://github.com/openvinotoolkit/openvino.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "95709208344d92723a834f0ebee93d7070547e49eb677a46d66f5289039891fd" + sha256 cellar: :any, arm64_sonoma: "2c6c71ee8441e3f45f14cda2ed0b9e95c582aa9dce3f80a90bd2cc4e2ada3526" + sha256 cellar: :any, arm64_ventura: "dbb9da7ce2c386c0d28b3349d01524b3298afdf46a0c1be8f7c7ef9bf0c65e60" + sha256 cellar: :any, sonoma: "6443b56a2b56b273f04a716e87dc25d96e486f3955733631c2ac5c92dab80f94" + sha256 cellar: :any, ventura: "ec5ed79b6a10cf6dab861e3eafe3fdc925ce9fdaafb8a89e7cca6e379fe8e10a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db2178c8c3450d514c0ec118be1e84710cde5c516ea0c3c32c6ae8b458287394" + end + + depends_on "cmake" => [:build, :test] + depends_on "flatbuffers" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "pybind11" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "abseil" + depends_on "numpy" + depends_on "onnx" + depends_on "protobuf" + depends_on "pugixml" + depends_on "snappy" + depends_on "tbb" + + on_linux do + 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/oneapi-src/oneDNN/archive/706a3ce3b391cf1d8a904a8efa981c70078719eb.tar.gz" + sha256 "1a656eb32f383cef82b703c355d762b2162f5aaa7b6f54b2c1e47995a9cee1f2" + end + end + + on_arm do + depends_on "scons" => :build + + resource "arm_compute" do + url "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v24.09.tar.gz" + sha256 "49b8620f21cbbe49e825a131d9eacd548532646289b50e070b83860bd88087fe" + end + end + + on_intel do + depends_on "xbyak" => :build + 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/1789b1e0ae441de15d793123003a900a35d1dc71.tar.gz" + sha256 "551070032ce5d2ed6adc2216e9b061782da097b1ce28c403eaa16b230b09f6a7" + end + + resource "openvino-telemetry" do + url "https://files.pythonhosted.org/packages/2b/c7/ca3bb8cfb17c46cf50d951e0f4dd4bf3f7004e0c207b25164df70e091f6d/openvino-telemetry-2024.1.0.tar.gz" + sha256 "6df9a8f499e75d893d0bece3c272e798109f0bd40d1eb2488adca6a0da1d9b9f" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + end + + def python3 + "python3.13" + end + + def install + # 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" + elsif OS.linux? + resource("onednn_gpu").stage buildpath/"src/plugins/intel_gpu/thirdparty/onednn_gpu" + end + + cmake_args = %w[ + -DCMAKE_OSX_DEPLOYMENT_TARGET= + -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 + ] + + 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" + + venv = virtualenv_create(libexec, python3) + venv.pip_install resources.select { |r| r.url.start_with?("https://files.pythonhosted.org/") } + venv.pip_install_and_link "./src/bindings/python/wheel" + (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 + + #define OV_CALL(statement) \ + if ((statement) != 0) \ + return 1; + + 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)); + #ifndef __APPLE__ + 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..8bd4da267b8f2 --- /dev/null +++ b/Formula/o/openvpn.rb @@ -0,0 +1,76 @@ +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.14.tar.gz" + mirror "https://build.openvpn.net/downloads/releases/openvpn-2.6.14.tar.gz" + sha256 "9eb6a6618352f9e7b771a9d38ae1631b5edfeed6d40233e243e602ddf2195e7a" + 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_sequoia: "d304c987b52e8ceab1217df11dc29d146cb7365691c204a198083b6ddac212a6" + sha256 arm64_sonoma: "02b8aa3654cc4b7a849edf562c2d38f5d99117351eff12cd3bb3aed0518d394c" + sha256 arm64_ventura: "b842dee9d24123a0926ea9ea4a050b85b5e440597dfbf07e2e1b078f468ecf50" + sha256 sonoma: "c87079ceb7eff3e98c9918243698dd4d3f1f499a52a9250fc235b5f7615d666e" + sha256 ventura: "61e23b893b99b322dcbe38e006a6d2016c654099970add6357c99dac6be5e692" + sha256 arm64_linux: "0c18f74edca2b997ef8b663487f796f715a7bce351a08c2c97992614c3f05102" + sha256 x86_64_linux: "27fde18eb1f1bc5105c2a94812af5e270ef7eead8acec56446a620718613a00e" + 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..6f3ef82b8fc77 --- /dev/null +++ b/Formula/o/operator-sdk.rb @@ -0,0 +1,49 @@ +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.39.2", + revision: "f01ea5405979ab9ce7049877f9a0c23927ccb2ec" + 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_sequoia: "e3f6bdbd5c2f859d6ede458c91159e9f613f82c9032b9b1fa008966022bdf18b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "43813b6b92a0d5cfa17744dc0d5561d88a1172506042f92a42dca10a62319489" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bfe47acd143c07f4646ca9fa8b97787d1994a2503b8f1f1c90def180789ee3ff" + sha256 cellar: :any_skip_relocation, sonoma: "223cfe0f8cecbc25ec416c32abf50dbda9e473761b5c7049c07bbf00fd9f29dd" + sha256 cellar: :any_skip_relocation, ventura: "c13d35cc77513c33496557eae537ce32322c53a14c2beac2c98158f50f6b5fb2" + sha256 cellar: :any_skip_relocation, arm64_linux: "509d069ebfcfb21a8d8aa096ac3b7dac5fd261bd0a04c4b0c6f3080ec72a4526" + sha256 cellar: :any_skip_relocation, x86_64_linux: "50747c090a3153b7e2d2604b66870551c4a5a5a0496c885d7c6dc1dde3d7b12b" + end + + depends_on "go" + + def install + ENV["GOBIN"] = bin + system "make", "install" + + 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..4bf133524d111 --- /dev/null +++ b/Formula/o/ophcrack.rb @@ -0,0 +1,47 @@ +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 + + bottle do + rebuild 1 + 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..56dc1dcd93197 --- /dev/null +++ b/Formula/o/opkssh.rb @@ -0,0 +1,34 @@ +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.6.1.tar.gz" + sha256 "edb4b2ef3aaf9a16d409e92b27ed1467494edebedcca8ad51060916b175e401b" + license "Apache-2.0" + head "https://github.com/openpubkey/opkssh.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0640a6e10bcf5282b59ab11d54b3a3973aef75cda201bfef82ea154038874049" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0640a6e10bcf5282b59ab11d54b3a3973aef75cda201bfef82ea154038874049" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0640a6e10bcf5282b59ab11d54b3a3973aef75cda201bfef82ea154038874049" + sha256 cellar: :any_skip_relocation, sonoma: "8cea435db14b96a57869334e18959795cbc81374161dc21aef66a46474b01008" + sha256 cellar: :any_skip_relocation, ventura: "8cea435db14b96a57869334e18959795cbc81374161dc21aef66a46474b01008" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45007bb3b43f295e163035bcb02ded4287029f227c936f42a632e6f3f4830675" + 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..9bfc6b80326ff --- /dev/null +++ b/Formula/o/optipng.rb @@ -0,0 +1,36 @@ +class Optipng < Formula + desc "PNG file optimizer" + homepage "https://optipng.sourceforge.net/" + url "https://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.8/optipng-0.7.8.tar.gz" + sha256 "25a3bd68481f21502ccaa0f4c13f84dcf6b20338e4c4e8c51f2cefbd8513398c" + license "Zlib" + head "http://hg.code.sf.net/p/optipng/mercurial", using: :hg + + bottle do + sha256 cellar: :any, arm64_sequoia: "d7f218d549637362a08fa6f6ee66b1557ab007472ede88d63957de611b15ad34" + sha256 cellar: :any, arm64_sonoma: "c1b42258526f71e84ecda4f7e72ca8c8a9e6685179a7b0b792d37c29cbbb03a2" + sha256 cellar: :any, arm64_ventura: "ad99b4693060ef805451b6d3a3bc9c2fbbdec2284d18395a686eeba68d33a5d3" + sha256 cellar: :any, arm64_monterey: "c560ecc7ba7c3f33620b4d808e498ee8d1cdb693da8830424aa2de76fc8561a9" + sha256 cellar: :any, sonoma: "345a986c5e59c4c14d43500de9862e5b3c09f75916da5d979603877d0b27f844" + sha256 cellar: :any, ventura: "03b4a5b9aba8fa77b708a64417d26362860fcbfb8b563b4d2fa7f1be2e15135a" + sha256 cellar: :any, monterey: "86ff3ec0b11f375a0efe8b02bfd6e39d929199623f6b898651ce5f565983f685" + sha256 cellar: :any_skip_relocation, arm64_linux: "00f72faa1368f7044ca97f70b724063c41dda652061ee00c8c0eb7025f960a7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e41ab8506824deb6ce70a14bef6d4c9d15209e1c19316934c859e6111fccee4" + 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..d25161eccffbe --- /dev/null +++ b/Formula/o/opus-tools.rb @@ -0,0 +1,53 @@ +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 + + bottle do + 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..45155663a358e --- /dev/null +++ b/Formula/o/opus.rb @@ -0,0 +1,70 @@ +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_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..953b7502d5554 --- /dev/null +++ b/Formula/o/opusfile.rb @@ -0,0 +1,77 @@ +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 + + bottle do + 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..bed11e0f43b5e --- /dev/null +++ b/Formula/o/oq.rb @@ -0,0 +1,43 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3c85406e1243e64b72d6c6e29e57312acdf1da6bf5ad3bd0ad0103fcd6d5ae9f" + sha256 cellar: :any, arm64_sonoma: "99fc2a852c9fcd9346ab49b10a2fffca37b96c874311073bde9875b1317dcaa3" + sha256 cellar: :any, arm64_ventura: "79c06b62ee8b7a819e2c752656a17e24192206454206a8f13f23f69764b35b72" + sha256 cellar: :any, arm64_monterey: "86d0284e415fa4dcf91a75c6c5dab04e73044c161777fb52449c62a62c4b3c4b" + sha256 cellar: :any, sonoma: "d7b699f030dc0c632c034b5ffefb4db85a34976919ee4853e1814cd9caf93a5d" + sha256 cellar: :any, ventura: "d55554139463e1d576a3c240c55fb868a7520f87073383baa74a9dc2a0769fb0" + sha256 cellar: :any, monterey: "1ab1903afd02e46a04c19996dab38cfb49051d023a0138bb079b725d29df5c56" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e812e3b89e7e79cfab5322b70482a26e96e64319a9d37b18149b2d9ce3d7fe3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6875c56c9a0b5c7f0bb103c94bc6e4a0b770f48ec90e46dc58f72e54bc71811e" + 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_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..2b66cf36ecee4 --- /dev/null +++ b/Formula/o/or-tools.rb @@ -0,0 +1,100 @@ +class OrTools < Formula + desc "Google's Operations Research tools" + homepage "https://developers.google.com/optimization/" + url "https://github.com/google/or-tools/archive/refs/tags/v9.11.tar.gz" + sha256 "f6a0bd5b9f3058aa1a814b798db5d393c31ec9cbb6103486728997b49ab127bc" + license "Apache-2.0" + revision 7 + head "https://github.com/google/or-tools.git", branch: "stable" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8bc0f154bd8ff5f8b52a8ce5e7464c1d53cdcf6a5418d633502645c3fd66b4dd" + sha256 cellar: :any, arm64_sonoma: "3dcbf65d964704779f14c14b20f86014fced57438d169a50c3bbba0bcae00022" + sha256 cellar: :any, arm64_ventura: "8bc94a0ec0b40991e4044d3361e88380c9be48f3a8eb5b9bb2c915dfd2c5891b" + sha256 cellar: :any, sonoma: "d62f64f14cab6e8fecc648a8891cce343c8185ae3d1165be7666a88aeedd1e0c" + sha256 cellar: :any, ventura: "3deca1cee3cf7498faed2c5c0dd968fa6544c4c6fd7bfb218f0e88a4be701d41" + sha256 cellar: :any_skip_relocation, arm64_linux: "2163e77817e35fafb0b95d956d7eb14286004689c4b9fc1656bf767e0f05b442" + sha256 cellar: :any_skip_relocation, x86_64_linux: "64e9589608bbe0fd1ebd91e3e94a62502d48a880437d695d377b6671c223dc24" + 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 "openblas" + depends_on "osi" + depends_on "protobuf" + depends_on "re2" + depends_on "scip" + uses_from_macos "zlib" + + # Add missing `#include`s to fix incompatibility with `abseil` 20240722.0. + # https://github.com/google/or-tools/pull/4339 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/bb1af4bcb2ac8b2af4de4411d1ce8a6876ed9c15/or-tools/abseil-vlog-is-on.patch" + sha256 "0f8f28e7363a36c6bafb9b60dc6da880b39d5b56d8ead350f27c8cb1e275f6b6" + end + + def install + # FIXME: Upstream enabled Highs support in their binary distribution, but our build fails with it. + args = %w[ + -DUSE_HIGHS=OFF + -DBUILD_DEPS=OFF + -DBUILD_SAMPLES=OFF + -DBUILD_EXAMPLES=OFF + ] + 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", + *shell_output("pkg-config --cflags --libs absl_check absl_log").chomp.split, + "-o", "simple_routing_program" + system "./simple_routing_program" + + # Sat Solver + system ENV.cxx, "-std=c++17", pkgshare/"simple_sat_program.cc", + "-I#{include}", "-L#{lib}", "-lortools", + *shell_output("pkg-config --cflags --libs absl_check absl_log absl_raw_hash_set").chomp.split, + "-o", "simple_sat_program" + system "./simple_sat_program" + end +end diff --git a/Formula/o/oranda.rb b/Formula/o/oranda.rb new file mode 100644 index 0000000000000..045eca90d1a21 --- /dev/null +++ b/Formula/o/oranda.rb @@ -0,0 +1,53 @@ +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_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..1f390b0e27e22 --- /dev/null +++ b/Formula/o/oras.rb @@ -0,0 +1,50 @@ +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.2.3.tar.gz" + sha256 "f08ddcccaedbb336e85942b6ccb9625c2a7e4e411d5909bd6f670eb0d7ab3977" + license "Apache-2.0" + head "https://github.com/oras-project/oras.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cc809d29e38e49c915a7df9dcfaa2071638430e5c3c4cd072473a5e98962cc81" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cc809d29e38e49c915a7df9dcfaa2071638430e5c3c4cd072473a5e98962cc81" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cc809d29e38e49c915a7df9dcfaa2071638430e5c3c4cd072473a5e98962cc81" + sha256 cellar: :any_skip_relocation, sonoma: "ad350040cacf68be5334bf9ee4b236a2308a2a21ed0e5d303706b881c9ef50e8" + sha256 cellar: :any_skip_relocation, ventura: "ad350040cacf68be5334bf9ee4b236a2308a2a21ed0e5d303706b881c9ef50e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12b21aabf4213e0b7e5833a535a4a7942d71290117108d083f0d518025f589f7" + 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..b2f4c6a969595 --- /dev/null +++ b/Formula/o/orbiton.rb @@ -0,0 +1,48 @@ +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.69.0.tar.gz" + sha256 "dd8205b863a7c177cca3d26c952455f3b1c5ee6614408f2c262a22e8386228bb" + 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_sequoia: "c246e25a7f0c7f226f130b76500913222ad331aec17bcf12617cab6803f4f146" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c246e25a7f0c7f226f130b76500913222ad331aec17bcf12617cab6803f4f146" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c246e25a7f0c7f226f130b76500913222ad331aec17bcf12617cab6803f4f146" + sha256 cellar: :any_skip_relocation, sonoma: "d55a4750c9fad01cad8f136783b0236b57a446fc03ed7764db239e8d449126be" + sha256 cellar: :any_skip_relocation, ventura: "d55a4750c9fad01cad8f136783b0236b57a446fc03ed7764db239e8d449126be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "909b0a9743154e539333ea0666d55d5b3976373bc2dff363f5a7482abd6f438a" + 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..31863490a34a1 --- /dev/null +++ b/Formula/o/orbuculum.rb @@ -0,0 +1,66 @@ +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" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "ebd5fc98ad26b52efc86a68e8bd5da5f8891c1212dca4382bd1dc55c61697e0f" + sha256 cellar: :any, arm64_sonoma: "ea72ca06cea3b25c72ced4adbe45457176ff5ce9a2a3850c9ce15f77c9d56315" + sha256 cellar: :any, arm64_ventura: "1844273329b7624bef902a7578db500bade46d0d4e6f055bd85c47cbb49a829e" + sha256 cellar: :any, sonoma: "6fb59089dc3bccd5478c38f162eb76908f50ab352b0980a0ae8e621b305b882c" + sha256 cellar: :any, ventura: "c464ab9e54fd94ad671079698b68813746c50af3bfe97e1a9aa7169abb35e27e" + sha256 arm64_linux: "4e0735b40e690002488e00b62e92b142bbc36f729ba686e6405f6b8b53537f59" + sha256 x86_64_linux: "7c9eb6c5596b7d5a8673f89b7359c325aaeda5937b209d500d5db29392efb06a" + 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).sub("\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..3f8ec291995c1 --- /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.1.2/orc-tools-2.1.2-uber.jar" + sha256 "a68ad18cc3f1f3620b7b541d12c8460bf248459559c0bb71b36b731bb62bd7dd" + 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: "4d4e5db80dfb21e9afeae9b3e6cf2f94d5f15bc54843f63d3629a63f5be0b9b3" + 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..d735b319d9da1 --- /dev/null +++ b/Formula/o/orc.rb @@ -0,0 +1,49 @@ +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_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..50f190d11a266 --- /dev/null +++ b/Formula/o/orcania.rb @@ -0,0 +1,68 @@ +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" + + bottle do + 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..2a41f28189d8f --- /dev/null +++ b/Formula/o/ord.rb @@ -0,0 +1,40 @@ +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.1.tar.gz" + sha256 "bacd90dbd470883035edcaba1ff85ea34360d35b93c0b7539dfe94399fdca184" + license "CC0-1.0" + head "https://github.com/ordinals/ord.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d4ee2eaba425e6410dfdc382fd2f3defef29ae493efc8a5b91966a99a8b17cee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2abed74bff0ae175a7c224b4feee92f0ab63ec9eb8341304fd5117e1413b98fd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d738ef2c19ce1c82d782c09b76c720a3ccf02fa57d252e84683cf0e1d2a99f9d" + sha256 cellar: :any_skip_relocation, sonoma: "b8a4057e0162e8ab8e81a3da38fc71ba9898b54b80e5452adbc7c18dc2f0165d" + sha256 cellar: :any_skip_relocation, ventura: "bd82a40dcc24ffe1551d783cf18cc1f3a7e424148efd0860e2448b61876442b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d91b7ec987202d1855e304795d345732698e0d4e3ea61d984fd1b8209af106f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3011ef48bbc7057fa537d216751b77379cce59439f6d544f494af01b2931aa0" + 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..e304bdc55fb17 --- /dev/null +++ b/Formula/o/orgalorg.rb @@ -0,0 +1,43 @@ +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_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, 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..006330a8d7bd4 --- /dev/null +++ b/Formula/o/organize-tool.rb @@ -0,0 +1,228 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b6f9e95698b7fd36da9dd8b1496a8b9f256ec621afd2c5ee9189c0a76209102d" + sha256 cellar: :any, arm64_sonoma: "46e1ea475ee507110ebd029f5ac455ae9a8e94ca019fa35c83e631f3868c600f" + sha256 cellar: :any, arm64_ventura: "0af9326f3082652c5f4a070deebbca7ecc3265796c5a099bea4e1f8a2e45658c" + sha256 cellar: :any, sonoma: "cba1bb955b16375cb5016b074f40a28c7bcc4537317d2696207d87e1199c4238" + sha256 cellar: :any, ventura: "376a6ae7bec093eb725a2072c57ec2f1d2212050a7e56c7e29fb463f3fccb47c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5de16020295eb310e19dc91a697f789018f28c25da331b1ddc85dad7b032700c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa0df1e16c90a4270ed94a57647b8b573817b6e92dded236af8bf53aac107f36" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build # for macos-tags + depends_on "rust" => :build + depends_on "cryptography" + depends_on "freetype" + depends_on "libyaml" + depends_on "openjpeg" + depends_on "python@3.13" + + 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/2e/00/0f6e8fcdb23ea632c866620cc872729ff43ed91d284c866b515c6342b173/arrow-1.3.0.tar.gz" + sha256 "d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85" + 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 "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/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz" + sha256 "4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369" + 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/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 "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/e3/37/63cb918ffa21412dd5d54e32e190e69bfc340f3d6aa072ad740bec9386bb/pdfminer.six-20240706.tar.gz" + sha256 "c631a46d5da957a9ffe4460c5dce21e8431dabb615fee5f9f4400603a58d95a6" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/41/86/a03390cb12cf64e2a8df07c267f3eb8d5035e0f9a04bb20fb79403d2a00e/pydantic-2.10.2.tar.gz" + sha256 "2bc2d7f17232e0841cbba4641e65ba1eb6fafb3a08de3a091ff3ce14a197c4fa" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/a6/9f/7de1f19b6aea45aeb441838782d68352e71bfa98ee6fa048d5041991b33e/pydantic_core-2.27.1.tar.gz" + sha256 "62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "pyobjc-core" do + url "https://files.pythonhosted.org/packages/b7/40/a38d78627bd882d86c447db5a195ff307001ae02c1892962c656f2fd6b83/pyobjc_core-10.3.1.tar.gz" + sha256 "b204a80ccc070f9ab3f8af423a3a25a6fd787e228508d00c4c30f8ac538ba720" + end + + resource "pyobjc-framework-cocoa" do + url "https://files.pythonhosted.org/packages/a7/6c/b62e31e6e00f24e70b62f680e35a0d663ba14ff7601ae591b5d20e251161/pyobjc_framework_cocoa-10.3.1.tar.gz" + sha256 "1cf20714daaa986b488fb62d69713049f635c9d41a60c8da97d835710445281a" + + # Backport commit to avoid Xcode.app dependency. Remove in the next release + # https://github.com/ronaldoussoren/pyobjc/commit/864a21829c578f6479ac6401d191fb759215175e + patch :DATA + 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 "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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/31/f8/f6ee4c803a7beccffee21bb29a71573b39f7037c224843eff53e5308c16e/types-python-dateutil-2.9.0.20241003.tar.gz" + sha256 "58cb85449b2a56d6684e41aeefb4c4280631246a0da1a719bdbe6f3fb0317446" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + 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}" + 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 + +__END__ +--- a/pyobjc_setup.py ++++ b/pyobjc_setup.py +@@ -510,15 +510,6 @@ def Extension(*args, **kwds): + % (tuple(map(int, os_level.split(".")[:2]))) + ) + +- # XCode 15 has a bug w.r.t. weak linking for older macOS versions, +- # fall back to older linker when using that compiler. +- # XXX: This should be in _fixup_compiler but doesn't work there... +- lines = subprocess.check_output(["xcodebuild", "-version"], text=True).splitlines() +- if lines[0].startswith("Xcode"): +- xcode_vers = int(lines[0].split()[-1].split(".")[0]) +- if xcode_vers >= 15: +- ldflags.append("-Wl,-ld_classic") +- + if os_level == "10.4": + cflags.append("-DNO_OBJC2_RUNTIME") diff --git a/Formula/o/orientdb.rb b/Formula/o/orientdb.rb new file mode 100644 index 0000000000000..567f257175ea4 --- /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.39/orientdb-community-3.2.39.zip" + sha256 "7c60fb87ca825bdadd75a4bd664ff507e35d4239b158e3b0bbd3e0bba98224a7" + 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: "92d69de0b12d28862d7dcdaacfec1b04e9be26c8af0b8ed6df5e237b90ed2b20" + 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 + 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..2bec8051ea982 --- /dev/null +++ b/Formula/o/ormolu.rb @@ -0,0 +1,67 @@ +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.0.tar.gz" + sha256 "e3948bfa80984b70cf0b701b15d206c9010862ea29d44a9a3ebd417646854948" + license "BSD-3-Clause" + head "https://github.com/tweag/ormolu.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6cee9b02ace0ce65f8a84cc635178647a8007b1daea9c652573e57399d43e80e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae68f6fd985883a51bb7f6cfaa98e9a6c44eb247a78e19088e80a2701ed6861d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "84da61972b5d54b7d2a461c0b9a408ca0fdf2856abb1eacd777cd4b7bef69626" + sha256 cellar: :any_skip_relocation, sonoma: "ace0cda866c90b4427927a38936d65db91ac1422b62a451b92a31e70a1b34eba" + sha256 cellar: :any_skip_relocation, ventura: "c5d8fb13f9d1a8be511e9fd39c62237c0adb65ebc8f7fb373fe8d7d15eab45eb" + sha256 cellar: :any_skip_relocation, arm64_linux: "870089f99132b6a942b3a35cbf7db091df5487feb0812baabd09a626d1b6260d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24cdc78d741ef47efd1f3b5ffcd480d538b43f427e7cc381ed09c453118fc01f" + 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..49120e67d2964 --- /dev/null +++ b/Formula/o/orocos-kdl.rb @@ -0,0 +1,61 @@ +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/v1.5.1.tar.gz" + sha256 "5acb90acd82b10971717aca6c17874390762ecdaa3a8e4db04984ea1d4a2af9b" + license "LGPL-2.1-or-later" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "56fb6d1bb7796ec39b73f9a1cd8da6f9f946549e90517b526139761bfbd2f820" + sha256 cellar: :any, arm64_sonoma: "1f64cef75b8d38a0f735e2e173b8fbfe1eaec26519bfee0f05ee5be52e0fd26e" + sha256 cellar: :any, arm64_ventura: "819c0a9c91a7572f68752d59feb7af82a9b91426d8cd7c14f1614a353f0e7a6e" + sha256 cellar: :any, arm64_monterey: "5b68c4676de398ade876c5c31510527a2b77be2c4b5cb992f5a8beb208d89d52" + sha256 cellar: :any, arm64_big_sur: "75fc67af57edc2045d8932d1e3cea5b07ac3dfb4c9bbf9632def9c44e769635a" + sha256 cellar: :any, sonoma: "b73b649ea45a3e8c44dff9cbbc7577e0c5e4e1d9ca2753e85b6df42eb38b4829" + sha256 cellar: :any, ventura: "b06f4e556b6818d26b38fa070cc9aa704459ce3fe4525f3d530ace039d0338a1" + sha256 cellar: :any, monterey: "0f49e657e15966fbd854e659a570141eb3f86028074eba50f90a3d0f66cf5d5e" + sha256 cellar: :any, big_sur: "e7a5a2769dcbf1645d7f2daaf2d3814d4ee80497683ff18fd12196732f0135f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "866593697a60ffc5e5150e69f0048ddd5829a23d799c662eecc53d378fb3fa99" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4992170c0dd7c7076a2bcbcc760518d2c815b2f918e7b1abcabf21c712f1c544" + end + + depends_on "cmake" => :build + depends_on "eigen" + + # $(brew --prefix orocos-kdl)/share/orocos_kdl/cmake/OrocosKDLTargets.cmake does not export the includes + # orocos-kdl v1.5.1 was released in September 2021: https://github.com/orocos/orocos_kinematics_dynamics/commit/db25b7e480e068df068232064f2443b8d52a83c7 + # Issue was solved in October 2021: https://github.com/orocos/orocos_kinematics_dynamics/commit/ef39a4fd5cfb1400b2e6e034b1a99b8ad91192cf + # No new release since then, so we should provide a hotfix. + # Can be removed with next release. + patch do + url "https://github.com/orocos/orocos_kinematics_dynamics/commit/ef39a4fd5cfb1400b2e6e034b1a99b8ad91192cf.patch?full_index=1" + sha256 "b2ac2ff5d5d3285e7dfb4fbfc81364b1abc808cdd7d22415e446bfbdca189edd" + end + + def install + system "cmake", "-S", "orocos_kdl", "-B", "build", + "-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", "-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..95bc887faace2 --- /dev/null +++ b/Formula/o/orogene.rb @@ -0,0 +1,48 @@ +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" + + bottle do + rebuild 1 + 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..cb4609464591f --- /dev/null +++ b/Formula/o/ortp.rb @@ -0,0 +1,120 @@ +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.15/ortp-5.4.15.tar.bz2" + sha256 "463a2f3bb2da09937dc587dad6afd948d928cda4ebf9ec9e750312ca9fe70778" + + depends_on "mbedtls" + + # 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.15/bctoolbox-5.4.15.tar.bz2" + sha256 "ca6c43592d9c7f915b9a0d7767deb7fbff54b777947070212901ba566c0dca27" + + livecheck do + formula :parent + end + + patch :DATA + end + end + + no_autobump! because: "resources cannot be updated automatically" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2182e953d4b591fbc3f7c649e71b1bf70ef3bc7cb74102ad1aa2b77414de549c" + sha256 cellar: :any, arm64_sonoma: "1652eab81e33e472541404591cf9464d954da74816276cdd1bfb8d2d27ab72df" + sha256 cellar: :any, arm64_ventura: "2fb6fb95bb806a05158b013fb0e6a11657ac7eeab2d41e392c3451147b1a5d40" + sha256 cellar: :any, sonoma: "ff6ee4c95d0ee48f6bf26f62a354d5d2379e2b42643e5fc6f609562e1dbcf42b" + sha256 cellar: :any, ventura: "e6eb1c0397b19d2cb59eaa3f847cae1e2a8311a77cb67b112e98b7d9cb9ab60d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8357c50b8179031066d3403a84199299a854bcf047e7ecfa92ad8eb1f9dc0c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1244b6dd6fd2438e24994a84a3c7160638dbdbbb3935bf6a194addb6abc4f280" + 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..6495f125b887c --- /dev/null +++ b/Formula/o/ory-hydra.rb @@ -0,0 +1,58 @@ +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_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..6b97f5864c9ef --- /dev/null +++ b/Formula/o/osc-cli.rb @@ -0,0 +1,104 @@ +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 6 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46acc0336a9fa29be5457cea8338f0fc7296fa50103b169c6669fb1ff79cfa0c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "46acc0336a9fa29be5457cea8338f0fc7296fa50103b169c6669fb1ff79cfa0c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "46acc0336a9fa29be5457cea8338f0fc7296fa50103b169c6669fb1ff79cfa0c" + sha256 cellar: :any_skip_relocation, sonoma: "1e55dd48fb5238a36312d356789c4ab2419231b258c638486065675be404b312" + sha256 cellar: :any_skip_relocation, ventura: "1e55dd48fb5238a36312d356789c4ab2419231b258c638486065675be404b312" + sha256 cellar: :any_skip_relocation, arm64_linux: "23824445e25290b333b09b2cf357d0816afd9656c1827c080bde09fda212f344" + sha256 cellar: :any_skip_relocation, x86_64_linux: "06688a38b6c308a92561d6d157e48b31eabc43fcca3d4c5f100a2676d32a1b87" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + 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/6b/b6/82c7e601d6d3c3278c40b7bd35e17e82aa227f050aa9f66cb7b7fce29471/fire-0.7.0.tar.gz" + sha256 "961550f07936eaf65ad1dc8360f2b2bf8408fad46abbfa4d2a3794f8d2a95cdf" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/37/72/88311445fd44c455c7d553e61f95412cf89054308a1aa2434ab835075fc5/termcolor-2.5.0.tar.gz" + sha256 "998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/98/f7/d29b8cdc9d8d075673be0f800013c1161e2fd4234546a140855a1bcc9eb4/xmltodict-0.14.1.tar.gz" + sha256 "338c8431e4fc554517651972d62f06958718f6262b04316917008e8fd677a6b0" + 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..abbc6f1cc1eb0 --- /dev/null +++ b/Formula/o/osc.rb @@ -0,0 +1,69 @@ +class Osc < Formula + include Language::Python::Virtualenv + + desc "Command-line interface to work with an Open Build Service" + homepage "https://openbuildservice.org/" + url "https://github.com/openSUSE/osc/archive/refs/tags/1.15.1.tar.gz" + sha256 "730f8729fb7d29425d852c99d0359e94c5ba77575be9fe0521ff39b219910d67" + license "GPL-2.0-or-later" + head "https://github.com/openSUSE/osc.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7950e723a879d0c054e41bfe2c7b41749f766723e9114f7a266df18f3f8df678" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7950e723a879d0c054e41bfe2c7b41749f766723e9114f7a266df18f3f8df678" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7950e723a879d0c054e41bfe2c7b41749f766723e9114f7a266df18f3f8df678" + sha256 cellar: :any_skip_relocation, sonoma: "b3d2244d69cb01ede8df9142651dbc0357ea0b20778944df540b91a9f1bcaa01" + sha256 cellar: :any_skip_relocation, ventura: "b3d2244d69cb01ede8df9142651dbc0357ea0b20778944df540b91a9f1bcaa01" + sha256 cellar: :any_skip_relocation, arm64_linux: "7950e723a879d0c054e41bfe2c7b41749f766723e9114f7a266df18f3f8df678" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7950e723a879d0c054e41bfe2c7b41749f766723e9114f7a266df18f3f8df678" + end + + depends_on "cryptography" + depends_on "python@3.13" + + uses_from_macos "curl" + uses_from_macos "libffi" + + resource "rpm" do + url "https://files.pythonhosted.org/packages/d3/36/3dae1ccf058414ee9cc1d39722216db0e0430002ce5008c0b0244f1886fd/rpm-0.3.1.tar.gz" + sha256 "d75c5dcb581f1e9c4f89cb6667e938e944c6e7c17dd96829e1553c39f3a4c961" + 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 "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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 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..d8b51bc75dcdd --- /dev/null +++ b/Formula/o/oscats.rb @@ -0,0 +1,66 @@ +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 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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/formula-patches/29a7d4c819af3ea8e48efb68bb98e6bd2a4b6196/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..015edeee8542b --- /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.4.tar.gz" + sha256 "1c4f8ef27539e071ce8af437b2a1d046f2e0af34eb2a7aa8016ee201cc55b0bf" + license "MIT" + head "https://github.com/jmpsec/osctrl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cfa9cc7ba8022d4aedfb2f06d055927fb41fc4738a43f6857e067d64448d8583" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cfa9cc7ba8022d4aedfb2f06d055927fb41fc4738a43f6857e067d64448d8583" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cfa9cc7ba8022d4aedfb2f06d055927fb41fc4738a43f6857e067d64448d8583" + sha256 cellar: :any_skip_relocation, sonoma: "c599bda781744313a18a705dbcfe69748c2e0afceb9031a15d5adc75005518c3" + sha256 cellar: :any_skip_relocation, ventura: "c599bda781744313a18a705dbcfe69748c2e0afceb9031a15d5adc75005518c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c22023d1893395c2a9e550527e492d7b4cc92000697bdecc6a29495836216524" + 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 execute - 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..27b314e0d8aed --- /dev/null +++ b/Formula/o/osi.rb @@ -0,0 +1,55 @@ +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_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..6660c56d9bc9e --- /dev/null +++ b/Formula/o/osinfo-db-tools.rb @@ -0,0 +1,47 @@ +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_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..45fe9de690868 --- /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-20250124.tar.xz", using: :nounzip + sha256 "7ca717f0975a798135a2b39eefdd1436a0b0682e29685c7fd01ef7f83a257250" + 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: "0f63a7d54ad267ae4178a13f7a465bd0c2a9875bca1c3e23c9d1c2e4f795630a" + 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..99cb9e9d09e99 --- /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.12.0.tar.gz" + sha256 "d76baf57820b896a648b720e387bb6f8c6137bc05f888a3b1e0e2029827cd607" + license "Apache-2.0" + head "https://github.com/openslo/oslo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a5977795384029ca047af4c7226a66c98907587e183469462a0f6c8ecb46e659" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8aa369ef73a62437f2aa4bd37d40e508c15a77faf74be64b254052c09f7136d1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "588243b56e54179dbabc31b5441cd280fd48e8c0d4c6e810728e432f21f1cdfc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "081177cd01addb83aa55c63a939fc19a14a957ee288271553fd0f044c551ee66" + sha256 cellar: :any_skip_relocation, sonoma: "a73ea7107111dc167676f2bc7e9ab87d6fde983a81240c158d77cac3bb74a5e7" + sha256 cellar: :any_skip_relocation, ventura: "6d05071e13f3980b317c5ff34678006735d85b0dd6e1254b8685586f9d112eb5" + sha256 cellar: :any_skip_relocation, monterey: "60bc14460a1534923cd36f62ec3a4b48e2f65decddb0cacb2c8ee8789bba433d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb22c17240703d9b7348e2e5711b6949751a9a6b629e22b39101d19bc14e369c" + 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 "examples" + end + + test do + test_file = pkgshare/"examples/definitions/slo.yaml" + assert_match "Valid!", shell_output("#{bin}/oslo validate -f #{test_file}") + + output = shell_output("#{bin}/oslo convert -f #{test_file} -o nobl9 2>&1", 1) + assert_match "the convert command is only supported for apiVersion 'openslo/v1'", 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..95ba1e4334b1a --- /dev/null +++ b/Formula/o/osm-gps-map.rb @@ -0,0 +1,83 @@ +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 + url "https://github.com/nzjrs/osm-gps-map/releases/download/1.2.0/osm-gps-map-1.2.0.tar.gz" + sha256 "ddec11449f37b5dffb4bca134d024623897c6140af1f9981a8acc512dbf6a7a5" + + depends_on "libsoup@2" + + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + bottle do + sha256 arm64_sequoia: "86a72e93e60138253d415f0f8350e2a08f01cf670631f159cbcb9aef453991f0" + sha256 arm64_sonoma: "4e99312645cad4b62bce40d08360aaf0071a7a5fce6e8331c3940fc9956d6a30" + sha256 arm64_ventura: "2bc5f12b6808b31bbc6fb791a90a8561c33eb88ac4d937d9d48df795570fe2fb" + sha256 arm64_monterey: "8dddb7d2eee3341e52742fb0d9d2503a081dcf53777048e614ee0d873314af3a" + sha256 sonoma: "14f294ea2b9e3031d6e7f53b06f926846e3a2de6e7ff7c61a1ab68ed5f651d58" + sha256 ventura: "6cda5bd18d03de3bb11ddff9bf3b4451257f612ae26a03cf3d2f2cf09bdea496" + sha256 monterey: "23bdada15af6c8a29c89925199ebf59225d69edc709531a33f82f8e9be659085" + sha256 cellar: :any_skip_relocation, arm64_linux: "796fe43d3fd75d366860ad62c3f15e98a00183616f71ceea03e6256975152406" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9267eb6c95ec708b3d3d1df50e7201f58ae05fb05816cf17656c5a4c71875ab2" + end + + head do + url "https://github.com/nzjrs/osm-gps-map.git", branch: "master" + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build + depends_on "automake" => :build + depends_on "gtk-doc" => :build + depends_on "libtool" => :build + depends_on "libsoup" + end + + depends_on "gobject-introspection" => :build + depends_on "pkgconf" => [:build, :test] + + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" + depends_on "gtk+3" + + on_macos do + depends_on "at-spi2-core" + depends_on "gettext" + depends_on "harfbuzz" + depends_on "pango" + end + + def install + 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 + + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libsoup@2"].opt_lib/"pkgconfig" + 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..93774a6adbcc1 --- /dev/null +++ b/Formula/o/osm-pbf.rb @@ -0,0 +1,35 @@ +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 13 + + bottle do + sha256 cellar: :any, arm64_sequoia: "ed7762d14a46871ddbed1b0dc1c0ab5232c679650fc4f7d26e1a2f00f5d1a39d" + sha256 cellar: :any, arm64_sonoma: "31d0e2574171450149af2225ce6d8904de1b1ecc057a3cf38114de3e0873f432" + sha256 cellar: :any, arm64_ventura: "3d76915fded9c47bcd48d982cbb569f20580eb8d14013f66a1d4111b7aef64c8" + sha256 cellar: :any, sonoma: "764fd73e39d4ef37c2197000d2e160b80075efe6b18f93fdcb1b5a9ebc9000d3" + sha256 cellar: :any, ventura: "5d243d081e1840bce4a5af93bb1ed38db77bb8e40a62680d6f2ef447af312696" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce7769b6bc5da9b84f3219258c70461cb2457534eb78d218d65dc8d7cd39c7e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "384056a52cfb9450f57f3c7f41654a988e10b5cb0d5cd99c3f275ea7f7332aea" + 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..83d421ca4cd41 --- /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 unless build.head? + 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..9eaac2bfe66ba --- /dev/null +++ b/Formula/o/osm2pgrouting.rb @@ -0,0 +1,54 @@ +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/v2.3.8.tar.gz" + sha256 "e3a58bcacf0c8811e0dcf3cf3791a4a7cc5ea2a901276133eacf227b30fd8355" + license "GPL-2.0-or-later" + revision 16 + head "https://github.com/pgRouting/osm2pgrouting.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "8d5da6cbb1019f6896dcd1c2ec6b5b85364f5ab8e1eaf03faa363a9ac741f708" + sha256 cellar: :any, arm64_sonoma: "07719354b8de8ec105fb5fff9b6f5555af88d5fa25b2c740669beb753d4d879d" + sha256 cellar: :any, arm64_ventura: "5c8c6568d0a0a8b8e2e702fbaeef2423d56e6da413a39aab02d6247da9c8bce3" + sha256 cellar: :any, sonoma: "e062d6e09ecbd479fbd21d8abfa972dcb0fffb463ad2f80e0cddbc844304ac6b" + sha256 cellar: :any, ventura: "db7de5922d67e005b7f007b8a00448e668dcf292766858c8415e52f5301592a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac2b94e89037e79c0faa8acbf0d4f702f03d55905be7a0edf452c2eebf6b9408" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "expat" + depends_on "libpq" + depends_on "libpqxx" + depends_on "pgrouting" + depends_on "postgis" + + # Fix build failure due to missing include + # src/osm_elements/osm_tag.cpp:34:18: error: 'transform' is not a member of 'std' + patch :DATA + + 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/"osm2pgrouting", "--help" + end +end + +__END__ +diff --git a/src/osm_elements/osm_tag.cpp b/src/osm_elements/osm_tag.cpp +index 6f122ec..b41d6ff 100644 +--- a/src/osm_elements/osm_tag.cpp ++++ b/src/osm_elements/osm_tag.cpp +@@ -20,6 +20,7 @@ + + + #include "osm_elements/osm_tag.h" ++#include + #include + + namespace osm2pgr { diff --git a/Formula/o/osm2pgsql.rb b/Formula/o/osm2pgsql.rb new file mode 100644 index 0000000000000..2e4c0270190ba --- /dev/null +++ b/Formula/o/osm2pgsql.rb @@ -0,0 +1,65 @@ +class Osm2pgsql < Formula + desc "OpenStreetMap data to PostgreSQL converter" + homepage "https://osm2pgsql.org/" + url "https://github.com/openstreetmap/osm2pgsql/archive/refs/tags/2.1.1.tar.gz" + sha256 "b084e4a79317043410ff13ece4350a801384bd34e6c2c5959fa1e1424ce195b0" + license "GPL-2.0-only" + head "https://github.com/openstreetmap/osm2pgsql.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "ae6732f4577555118510370adccaeefe194a43638f3edf8c6fa7d74883b70daa" + sha256 arm64_sonoma: "602428b81887e949678e2f9782e11ab3896374620192652e7ddb6f5454ea5151" + sha256 arm64_ventura: "fdfaabdf6101e1536d70b8e21b37c5a1cecaf347e191dd957b032a853be0d09e" + sha256 sonoma: "16d621193033944ea29ecfb9e66d73ace20b600f6847cf8ebfc1532cdc6e1904" + sha256 ventura: "7f08026614bfb7a6322d5b35f8f3f143aec648c28de9fd6856db4c7a493bd030" + sha256 arm64_linux: "9733201f7d985df8d12dfb1c16f9b6d36ed9615ac3fa0102ddf9866795514ef7" + sha256 x86_64_linux: "a8ca71c29e64154abd15af163974e84eb4b78f603a0efa3a2c492df80af18274" + 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 "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 + -DPROTOZERO_INCLUDE_DIR=#{Formula["libosmium"].opt_libexec}/include + -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..4d20e45b20f4e --- /dev/null +++ b/Formula/o/osmcoastline.rb @@ -0,0 +1,61 @@ +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 + sha256 cellar: :any, arm64_sequoia: "c35ab027223ca2ea5a8555eb16f6f28e3b08dd4b2041d4796331391a1458a5f7" + sha256 cellar: :any, arm64_sonoma: "4792911cf6b33270e68cac5e9bb1810dff2a0869410905ae47c1978a5683e7b5" + sha256 cellar: :any, arm64_ventura: "a791ac1186a07fb44e973b7d08e2db4d73694e34d45aac133ebf399900e72486" + sha256 cellar: :any, sonoma: "aef43094262f2b19ef4fa3c689ecfa6a51064e8ecddd9fda6d625cb690a6b0a1" + sha256 cellar: :any, ventura: "51f97203e6f852e9ee35a14a98ba7d65f8aa1dea74a5711123e897e3e54eec8c" + sha256 cellar: :any_skip_relocation, arm64_linux: "cfd02b5ffbd8862c4c8f753c921c6db4930f64740883e9c4bd76ca0d7a89e1d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "512cdfad91e7e710a01e2f387d73661032fb267fc90c6a51131953c184956bb0" + end + + depends_on "cmake" => :build + depends_on "libosmium" => :build + + depends_on "expat" + depends_on "gdal" + depends_on "geos" + depends_on "libspatialite" + depends_on "lz4" + + uses_from_macos "bzip2" + uses_from_macos "sqlite" + uses_from_macos "zlib" + + 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 + recursive_dependencies + .select { |d| d.name.match?(/^llvm(@\d+)?$/) } + .map { |llvm_dep| llvm_dep.to_formula.opt_lib } + .each { |llvm_lib| ENV.remove "HOMEBREW_LIBRARY_PATHS", llvm_lib } + end + + protozero = Formula["libosmium"].opt_libexec/"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 <<~EOS + 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 + EOS + 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..d63634532583e --- /dev/null +++ b/Formula/o/osmfilter.rb @@ -0,0 +1,52 @@ +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" + + bottle do + 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, mojave: "470532603de299b9073f5511b8be798558d430f86ba4f37b330a497ec9fdae48" + sha256 cellar: :any_skip_relocation, high_sierra: "b2e2d4190462b0b0e473da4a50ab5e25da007aca21db898d2d359e9e9eb2cde7" + sha256 cellar: :any_skip_relocation, sierra: "d7a8285fe18af71d0093b89e9b5613a4fe30ceb4978e07f61ad1974e734d7f50" + sha256 cellar: :any_skip_relocation, el_capitan: "6a0fd608e0bc8094f08edb6f86a51b45745506d3ef84e0454ef1498dd77f61b0" + 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..1571f7423aa8d --- /dev/null +++ b/Formula/o/osmium-tool.rb @@ -0,0 +1,60 @@ +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 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "0cab1102b6f99a0d5556f3f928b3ce66c47168a3af0a2c9f68515688b66cb725" + sha256 cellar: :any, arm64_sonoma: "40315fb6f5f58d47790c6157cf87b558f77cb69c2b58b26bf1d614b059304a68" + sha256 cellar: :any, arm64_ventura: "0a22fe26b6c72c6e121016d76297cf9d27554bca154d89615bb7b6c810c4b396" + sha256 cellar: :any, sonoma: "367ed9eedac294312bfd850de02a3b473756c5087a29bc9aa419cd866aad6667" + sha256 cellar: :any, ventura: "34d3160c4d7488c5a7bde951b81de589cd93477d7d75ba69ba6209424fa7e2a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "68645a5288ae2d775939bdd3d860712854ad59d7595ce3bfd167a093f6f2e9be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d4b896b74aeb6e8c6104bfec7cf7c29f6e0b79d97830c518e8a8331800695edf" + end + + depends_on "cmake" => :build + depends_on "libosmium" => :build + depends_on "nlohmann-json" => :build + depends_on "pandoc" => :build + depends_on "boost" + depends_on "lz4" + + uses_from_macos "bzip2" + uses_from_macos "expat" + uses_from_macos "zlib" + + def install + protozero = Formula["libosmium"].opt_libexec/"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..fe5c1eb7a9e66 --- /dev/null +++ b/Formula/o/osmosis.rb @@ -0,0 +1,66 @@ +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 + + 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..a369c74cdcff8 --- /dev/null +++ b/Formula/o/ospray.rb @@ -0,0 +1,83 @@ +class Ospray < Formula + desc "Ray-tracing-based rendering engine for high-fidelity visualization" + homepage "https://www.ospray.org/" + url "https://github.com/ospray/ospray/archive/refs/tags/v3.2.0.tar.gz" + sha256 "2c8108df2950bc5d1bc2a62f74629233dbe4f36e3f6a8ea032907d4a3fdc6750" + license "Apache-2.0" + head "https://github.com/ospray/ospray.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + 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/ospray/rkcommon/archive/refs/tags/v1.14.0.tar.gz" + sha256 "5aef75afc8d4fccf9e70df4cbdf29a1b28b39ee51b5588b94b83a14c6a166d83" + end + + resource "openvkl" do + url "https://github.com/openvkl/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..dbb736dcb99fb --- /dev/null +++ b/Formula/o/osqp.rb @@ -0,0 +1,99 @@ +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" + + bottle do + 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..7c2f5df4f2dd8 --- /dev/null +++ b/Formula/o/osrm-backend.rb @@ -0,0 +1,195 @@ +class OsrmBackend < Formula + desc "High performance routing engine" + homepage "https://project-osrm.org/" + license "BSD-2-Clause" + revision 8 + head "https://github.com/Project-OSRM/osrm-backend.git", branch: "master" + + # TODO: Remove `conflicts_with "mapnik"` in release that has following commit: + # https://github.com/Project-OSRM/osrm-backend/commit/c1ed73126dd467171dc7adb4ad07864909bcb90f + stable do + url "https://github.com/Project-OSRM/osrm-backend/archive/refs/tags/v5.27.1.tar.gz" + sha256 "52391580e0f92663dd7b21cbcc7b9064d6704470e2601bf3ec5c5170b471629a" + + # Backport commit to build with CMake 4. Remove in the next release + patch do + url "https://github.com/Project-OSRM/osrm-backend/commit/d691af4860350287041676178ceb511b240c336c.patch?full_index=1" + sha256 "216a143e58ee96abf4585b0f1d046469f7b42966e175b3b7b30350c232b48fff" + end + + # Backport fix for Boost 1.85.0. Remove in the next release. + # PR ref: https://github.com/Project-OSRM/osrm-backend/pull/6856 + patch do + url "https://github.com/Project-OSRM/osrm-backend/commit/10ec6fc33547e4b96a5929c18db57fb701152c68.patch?full_index=1" + sha256 "4f475ed8a08aa95a2b626ba23c9d8ac3dc55d54c3f163e3d505d4a45c2d4e504" + end + + # Backport fix for missing include. Remove in the next release. + # Ref: https://github.com/Project-OSRM/osrm-backend/commit/565959b3896945a0eb437cc799b697be023121ef + # + # Also backport sol2.hpp workaround to avoid a Clang bug. Remove in the next release + # Ref: https://github.com/Project-OSRM/osrm-backend/commit/523ee762f077908d03b66d0976c877b52adf22fa + # + # Also add diff from open PR to support Boost 1.87.0 + # Ref: https://github.com/Project-OSRM/osrm-backend/pull/7073 + patch :DATA + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "81bccb3ebd19507e9fd25afecce4ebef9226f4a2fdc7438c8cfd1f4e39d03932" + sha256 cellar: :any, arm64_sonoma: "3d055a3ce881d4d191620dc35ea7d7fcc4c30578eb0ba9de126a6c53daeeed19" + sha256 cellar: :any, arm64_ventura: "22e157f68d7694ee9f4e3be99e571dbb782a4322df6b5126bafacc8c68c25bd7" + sha256 cellar: :any, sonoma: "1bbde2078ad5bf2dc875f06e5ce07725962e3e47263ed5e35b649beb3d25b7f7" + sha256 cellar: :any, ventura: "4e3d544640bbfefb638be3bf2e098463db14f12ede06285d1a284a8446335e92" + sha256 cellar: :any_skip_relocation, arm64_linux: "448c8a5d909afa8bd305ee80e5cbdeda34f1bebdc4df34b869ec8a85ab12fffd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b010082cf4787ceec009ed78886362aded2f95eb0605a543328e92a3d38e758" + end + + depends_on "cmake" => :build + + depends_on "boost" + depends_on "libstxxl" + depends_on "libxml2" + depends_on "libzip" + 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" + conflicts_with "mapnik", because: "both install Mapbox Variant headers" + + def install + # Workaround to build with CMake 4. Remove in the next release + if build.stable? + odie "Remove CMake 4 workaround!" if version >= 6 + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + end + + # Work around build failure: duplicate symbol 'boost::phoenix::placeholders::uarg9' + # Issue ref: https://github.com/boostorg/phoenix/issues/111 + ENV.append_to_cflags "-DBOOST_PHOENIX_STL_TUPLE_H_" + # Work around build failure on Linux: + # /tmp/osrm-backend-20221105-7617-1itecwd/osrm-backend-5.27.1/src/osrm/osrm.cpp:83:1: + # /usr/include/c++/11/ext/new_allocator.h:145:26: error: 'void operator delete(void*, std::size_t)' + # called on unallocated object 'result' [-Werror=free-nonheap-object] + ENV.append_to_cflags "-Wno-free-nonheap-object" if OS.linux? + + 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 + +__END__ +diff --git a/include/extractor/suffix_table.hpp b/include/extractor/suffix_table.hpp +index 5d16fe6..2c378bf 100644 +--- a/include/extractor/suffix_table.hpp ++++ b/include/extractor/suffix_table.hpp +@@ -3,6 +3,7 @@ + + #include + #include ++#include + + #include "util/string_view.hpp" + +diff --git a/third_party/sol2-3.3.0/include/sol/sol.hpp b/third_party/sol2-3.3.0/include/sol/sol.hpp +index 8b0b7d36ea4ef2a36133ce28476ae1620fcd72b5..d7da763f735434bf4a40b204ff735f4e464c1b13 100644 +--- a/third_party/sol2-3.3.0/include/sol/sol.hpp ++++ b/third_party/sol2-3.3.0/include/sol/sol.hpp +@@ -19416,7 +19416,14 @@ namespace sol { namespace function_detail { + } + + template +- static int call(lua_State* L) noexcept(std::is_nothrow_copy_assignable_v) { ++ static int call(lua_State* L) ++// see https://github.com/ThePhD/sol2/issues/1581#issuecomment-2103463524 ++#if SOL_IS_ON(SOL_COMPILER_CLANG) ++ // apparent regression in clang 18 - llvm/llvm-project#91362 ++#else ++ noexcept(std::is_nothrow_copy_assignable_v) ++#endif ++ { + int nr; + if constexpr (no_trampoline) { + nr = real_call(L); +@@ -19456,7 +19463,14 @@ namespace sol { namespace function_detail { + } + + template +- static int call(lua_State* L) noexcept(std::is_nothrow_copy_assignable_v) { ++ static int call(lua_State* L) ++// see https://github.com/ThePhD/sol2/issues/1581#issuecomment-2103463524 ++#if SOL_IS_ON(SOL_COMPILER_CLANG) ++ // apparent regression in clang 18 - llvm/llvm-project#91362 ++#else ++ noexcept(std::is_nothrow_copy_assignable_v) ++#endif ++ { + int nr; + if constexpr (no_trampoline) { + nr = real_call(L); +diff --git a/include/server/server.hpp b/include/server/server.hpp +index 34b8982e67..02b0dda050 100644 +--- a/include/server/server.hpp ++++ b/include/server/server.hpp +@@ -53,8 +53,7 @@ class Server + const auto port_string = std::to_string(port); + + boost::asio::ip::tcp::resolver resolver(io_context); +- boost::asio::ip::tcp::resolver::query query(address, port_string); +- boost::asio::ip::tcp::endpoint endpoint = *resolver.resolve(query); ++ boost::asio::ip::tcp::endpoint endpoint = *resolver.resolve(address, port_string).begin(); + + acceptor.open(endpoint.protocol()); + #ifdef SO_REUSEPORT diff --git a/Formula/o/osslsigncode.rb b/Formula/o/osslsigncode.rb new file mode 100644 index 0000000000000..049ce117e2ccb --- /dev/null +++ b/Formula/o/osslsigncode.rb @@ -0,0 +1,56 @@ +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.9.tar.gz" + sha256 "3fe5488e442ad99f91410efeb7b029275366b5df9aa02371dcc89a8f8569ff55" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fe12f26f3bd487dc6663ffdc0d6091547e52b4c3f00f003eff28d932d23bddcf" + sha256 cellar: :any, arm64_sonoma: "917f9ac6b5ceaa7558b47929da67fa0aa3a7b3d6e4d2e7fb40f582c29bde91a2" + sha256 cellar: :any, arm64_ventura: "3024c29dd0838b5fa7c57edab3ed3e2373515e65dd211421d8384fe9088642cb" + sha256 cellar: :any, arm64_monterey: "aa7c4c53ebf2aa83120b5883b0f8229e119fe1a4ac5bb97c1d3e9fcf141c1241" + sha256 cellar: :any, sonoma: "6278aff15a055a409edbc6aa4a69176befc7777325b3980afc58cd71737cf11a" + sha256 cellar: :any, ventura: "c09dfe8cb41d3af6327fb73695a7a5691c799b36f09331454b21a23e0e04ffbb" + sha256 cellar: :any, monterey: "a329dc07e46683d428cd6f8d9fe9b2bd6c02fc03b3f5c86dfbed1e5fdb244913" + sha256 cellar: :any_skip_relocation, arm64_linux: "16aed1f489966abf85c8f7390840d8c2d487d1ee95026da0ca95085809b0f87a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e35630485849326c73bc6135118ccc391fdef8afd579371432207dd0aaec5f05" + 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..6c441f96e49be --- /dev/null +++ b/Formula/o/ossp-uuid.rb @@ -0,0 +1,70 @@ +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 + + bottle do + 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, mojave: "a6852dac557e1b804a240b4f558d9b2e262adebb64424061f2ee8002a3d19476" + sha256 cellar: :any, high_sierra: "a04214b22c58bd5167778925cb9e55b98f28330bcc6c6a37929e6085ea3a0162" + sha256 cellar: :any, sierra: "3c15cd0e25e3039e0d05b94d14b714745cec3033863d5dc7a6d9ddd7cacc1c71" + sha256 cellar: :any, el_capitan: "ac4456fc1c29db7e0d565ebdd392cf827be315b52c9eb3abcd113c4c7b981f25" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..910eb0f55f8b5 --- /dev/null +++ b/Formula/o/osv-scanner.rb @@ -0,0 +1,41 @@ +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.0.2.tar.gz" + sha256 "c419edd454980d7a8c7401baed04748d40342d6a77c1317696876986f171664b" + license "Apache-2.0" + head "https://github.com/google/osv-scanner.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1c3c1f4261ecf813b1110603f51d6b366e45942e0f507ecd7a2d9e5330d6127b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c3c1f4261ecf813b1110603f51d6b366e45942e0f507ecd7a2d9e5330d6127b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1c3c1f4261ecf813b1110603f51d6b366e45942e0f507ecd7a2d9e5330d6127b" + sha256 cellar: :any_skip_relocation, sonoma: "3fc1f27d4999f3fe9cf2ca8d878d32b2b8054744be8d2781afece1868953446f" + sha256 cellar: :any_skip_relocation, ventura: "3fc1f27d4999f3fe9cf2ca8d878d32b2b8054744be8d2781afece1868953446f" + sha256 cellar: :any_skip_relocation, arm64_linux: "096db7ab35d07767ec68d7d6786724f05e8b9607d2d42815d0ec0b568d6f2554" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02a02d4253a8de9c56969ea49d09bfd04e53e1d632ecb4c3aa5d3c745e786515" + 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..675bc150239eb --- /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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "c0301d2c47c23bc8ed0042fbaf447e82ca8dbbf10b1939d9a4f684961a24d0d2" + sha256 cellar: :any_skip_relocation, high_sierra: "2255aa28242ce07a62fc0eabaf146592fb70745e641cfc775a21f99841cec625" + sha256 cellar: :any_skip_relocation, sierra: "d68a47b126eaee8f75d281785322877055187f89540eb2744b9cd4da15ca6a69" + 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/osxutils.rb b/Formula/o/osxutils.rb new file mode 100644 index 0000000000000..9700a83dc7017 --- /dev/null +++ b/Formula/o/osxutils.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "744e327d1fb2183de8785880c3f7a127abdd896977e3d30cade00933ea137521" + sha256 cellar: :any_skip_relocation, high_sierra: "d665cbec1973b73e1e1d290014786b95d36d9cfe7028fd69fa37f698d18e81dd" + sha256 cellar: :any_skip_relocation, sierra: "8021183b4ad9c646920020e51446e555210bbb24e22da923557e1e0370353dfd" + sha256 cellar: :any_skip_relocation, el_capitan: "3bd65cf2550b709c111e31db7cb7d829a9260ed5dd35a682c370ed01593c1989" + 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..c84ce953617d0 --- /dev/null +++ b/Formula/o/otel-cli.rb @@ -0,0 +1,31 @@ +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_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, 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/otf2.rb b/Formula/o/otf2.rb new file mode 100644 index 0000000000000..86b22cc7cf24e --- /dev/null +++ b/Formula/o/otf2.rb @@ -0,0 +1,108 @@ +class Otf2 < Formula + desc "Open Trace Format 2 file handling library" + homepage "https://www.vi-hps.org/projects/score-p/" + 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 :homepage + regex(/href=.*?otf2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "bf03e30a4b748814623d920cf6ca4ba61462ae684a44771f989c05ba2b0934d2" + sha256 arm64_sonoma: "b4dff2dd5254e62c3cd810ac1c16867b18a81234d6a093ab75133d4079fe647b" + sha256 arm64_ventura: "638de457bf40ab80944527bfd56ca70b2235b38e2a4af71f6cde66f12d2389b4" + sha256 sonoma: "4987fe04a326f4736ec4eeaa3d332bf8daf4b0e3683fd5349cb001161a602eb9" + sha256 ventura: "d6190ba13bb60f56336225dfabce7506d0cc08e70acf92ae114c93782171d279" + sha256 arm64_linux: "5681d5b715c4940a4abb1b0dfb8572ac775ed99f05d04fb63fa9e32203aab63d" + sha256 x86_64_linux: "9b35e4c7047c6fbe7ff749e16f4f900710005fa459230f0db3281bb433b8f149" + end + + depends_on "python-setuptools" => :build + depends_on "sphinx-doc" => :build + depends_on "gcc" # for gfortran + depends_on "open-mpi" + depends_on "python@3.13" + + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + directory "build-frontend" + end + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + directory "build-backend" + end + + def python3 + "python3.13" + 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..ce8b7c553aa28 --- /dev/null +++ b/Formula/o/otf2bdf.rb @@ -0,0 +1,53 @@ +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 + + bottle do + 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..f32cc286c17d1 --- /dev/null +++ b/Formula/o/otree.rb @@ -0,0 +1,49 @@ +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.4.0.tar.gz" + sha256 "d1bfb69c22b667a3102a33e879175cb2a883456123fafdb5cf2fdbbf23fbab10" + license "MIT" + head "https://github.com/fioncat/otree.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "544a1df36ab809149ba5fc0199e3c7ce1cd74469c1a09c1cc2f9f89284b3d1d0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "62e01f50768e8ae21aaa986aa54870f40a204c31b94fd78fab775ea02772dd61" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ce7feef0ba1ae948b2806f2b9bf4a8146b6955e8f6ab8553906448e4dd9992f" + sha256 cellar: :any_skip_relocation, sonoma: "2da3b1f383e3a5276ca3ffc7d887603e211c285dac9113856a1bdb8733f4c07d" + sha256 cellar: :any_skip_relocation, ventura: "9aea34c04e62986699148a24fc25a6145a83197546c490b885814979c31e09d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "944bc56d293c7dcac2a0431939d5c7b57daeaf85cc7d870bffca32938702cf82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3eb2a28a8e2fd9baa127a64e26093a345a629acf84f97e978a55f11cc7053505" + 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..98b161524ebf5 --- /dev/null +++ b/Formula/o/ots.rb @@ -0,0 +1,34 @@ +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_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, 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..4bcecda4f4550 --- /dev/null +++ b/Formula/o/ott.rb @@ -0,0 +1,47 @@ +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_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 + opamroot = buildpath/".opam" + ENV["OPAMROOT"] = opamroot + ENV["OPAMYES"] = "1" + + system "opam", "init", "--no-setup", "--disable-sandboxing" + system "opam", "exec", "--", "opam", "install", ".", "--deps-only", "-y", "--no-depexts" + system "opam", "exec", "--", "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/o/otterdog.rb b/Formula/o/otterdog.rb new file mode 100644 index 0000000000000..b738c292ee3e0 --- /dev/null +++ b/Formula/o/otterdog.rb @@ -0,0 +1,259 @@ +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/be/34/c9e793cc09652565d41dc02be07efe6d3ef361274d8d6c3c1004e91041df/otterdog-1.0.3.tar.gz" + sha256 "f57ae79cd3fa246aefb2948e4f82ed1a6f40f6ac9f1f2c5d57a4a67dab2cd2eb" + license "EPL-2.0" + 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 + sha256 cellar: :any, arm64_sequoia: "ed7395e48203a66f4a5ecf18bc2a5c4b5b13b300c10e54754e0aeb348e25211d" + sha256 cellar: :any, arm64_sonoma: "24158bb6b2ddad480d9aa42ef20120f03101ea1b4624f1ded975be744426a851" + sha256 cellar: :any, arm64_ventura: "4adf708a2840eb1a3a2e8599d5b406f0aa99ce0b48fa5a895b5fb20f81b378f3" + sha256 cellar: :any, sonoma: "1cf7e6699bd648d4fca206277f02e1f2be8793d4d76097b510513729629215d6" + sha256 cellar: :any, ventura: "43b6ab8c899e3002ad6aba4a068798a164bf2564432748f91e81ba7c650a53fa" + sha256 cellar: :any_skip_relocation, arm64_linux: "c88d60b55b76b2c70a50c75a6d106f7f1e52a10f2da2516f5d69a4fced7869ac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b309a21685eae5d0a009753d9cd046329d2d0fa25d13842b39df6e31aa9b2d23" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "libsodium" + depends_on "python@3.13" + + 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/63/e7/fa1a8c00e2c54b05dc8cb5d1439f627f7c267874e3f7bb047146116020f9/aiohttp-3.11.18.tar.gz" + sha256 "ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a" + end + + resource "aiohttp-client-cache" do + url "https://files.pythonhosted.org/packages/fc/6b/2c09e4a0dd7d8f1b23ad0afac1ebdb200ed59445057f6caca3f653e7510a/aiohttp_client_cache-0.13.0.tar.gz" + sha256 "dc5cd62340adbee18e0fedc7b0c37542692df08f8ed9945d751b7292a0433853" + 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/75/e4/ef86f1777a9bc0c51d50487b471644ae20941afe503591d3a4c86e456dac/aioshutil-1.5.tar.gz" + sha256 "2756d6cd3bb03405dc7348ac11a0b60eb949ebd63cdd15f56e922410231c1201" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "asyncer" do + url "https://files.pythonhosted.org/packages/ff/67/7ea59c3e69eaeee42e7fc91a5be67ca5849c8979acac2b920249760c6af2/asyncer-0.0.8.tar.gz" + sha256 "a589d980f57e20efb07ed91d0dbe67f1d2fd343e7142c66d3a099f05c620739c" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + 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 "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/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/ee/f4/d744cba2da59b5c1d88823cf9e8a6c74e4659e2b27604ed973be2a0bf5ab/frozenlist-1.6.0.tar.gz" + sha256 "b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68" + 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 "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/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/ab/d1/9455e5ef09044a550500b32ff276a30f44928ab84b2db9ef13352bffd154/jsonata_python-0.5.3.tar.gz" + sha256 "c83f45127f8dc45e5ca5f20fd8b8635f094ef6bbb2d203a75bdde11ffece61e2" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + 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 "jwt" do + url "https://files.pythonhosted.org/packages/ad/66/1e792aef36645b96271b4d27c2a8cc9fc7bbbaf06277a849b9e1a6360e6a/jwt-1.3.1-py3-none-any.whl" + sha256 "61c9170f92e736b530655e75374681d4fcca9cfa8763ab42be57353b2b203494" + 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 "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/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + end + + resource "playwright" do + url "https://github.com/microsoft/playwright-python/archive/refs/tags/v1.52.0.tar.gz" + sha256 "cf21ec7ab8b751f960b9ccfc65272698ef2908c0170459064fbab6152adf863c" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "rjsonnet" do + url "https://files.pythonhosted.org/packages/70/65/4c6b1e4baf48ebbc6ff0c8cf8b50f08c63173d9abd5dd7f3af03b4bcd460/rjsonnet-0.5.6.tar.gz" + sha256 "47bd8f63b4b1def67f83001c07ff7d43d6a90dbf89cb6fb680c941db809a60ce" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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 "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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/62/51/c0edba5219027f6eab262e139f73e2417b0f4efffa23bf562f6e18f76ca5/yarl-1.20.0.tar.gz" + sha256 "686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + 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, shells: [:bash, :zsh]) + 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..a6ba8344a585b --- /dev/null +++ b/Formula/o/ouch.rb @@ -0,0 +1,65 @@ +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_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..d345be10ffe97 --- /dev/null +++ b/Formula/o/ov.rb @@ -0,0 +1,31 @@ +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.40.1.tar.gz" + sha256 "fc582e832dd1b85c04ec0347454a56288d119a1eff76e2e7d63da34680b855a4" + license "MIT" + head "https://github.com/noborus/ov.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c4e0460d4041ff75791b38c95b305132b9ff0584ed79ccc55b17902476a1de4a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c4e0460d4041ff75791b38c95b305132b9ff0584ed79ccc55b17902476a1de4a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c4e0460d4041ff75791b38c95b305132b9ff0584ed79ccc55b17902476a1de4a" + sha256 cellar: :any_skip_relocation, sonoma: "8bf6bf0251b6fc0e11722f4bab2ba7177469ad9a91025080c4d7090fc7a52f20" + sha256 cellar: :any_skip_relocation, ventura: "8bf6bf0251b6fc0e11722f4bab2ba7177469ad9a91025080c4d7090fc7a52f20" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e2979b74576b3a37bc49b328999ae34fe7b874789cd115fea90859a671bdf972" + 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:) + 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..f92f37bbd032b --- /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.37.0/overarch.jar" + sha256 "96724a6a9d77947736b5da399ebc1c2956f8296ac2b24a8e11a2bedb1c59c2d4" + license "EPL-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "55d09b3385931bcb1cdcde16ff5a371f95707e4ef651525817e29020b4932272" + 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..20d534102aeef --- /dev/null +++ b/Formula/o/overdrive.rb @@ -0,0 +1,31 @@ +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.0.tar.gz" + sha256 "17d5d3d382f48de9f5b013564026ed9e37909e8dc64bc953354b3f8ae9674f48" + license "MIT" + head "https://github.com/chbrown/overdrive.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "7c631fa29290fc91d46393bb20bd54c4c853087d20245a3fc0b3a08ccc5d6576" + end + + uses_from_macos "curl" + uses_from_macos "libxml2" + + 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..3df7af6e6a2f2 --- /dev/null +++ b/Formula/o/overmind.rb @@ -0,0 +1,34 @@ +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_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, 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..4319cf22bdd6a --- /dev/null +++ b/Formula/o/overtls.rb @@ -0,0 +1,33 @@ +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.2.42.tar.gz" + sha256 "28beb29bb65a054890da817112ac670ce054da1de182bffbc2150c17f4b1a806" + license "MIT" + head "https://github.com/ShadowsocksR-Live/overtls.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e3d4bd3739f98d72de5464c526e0851d2fb109f22d4e6dbdc7cb4445e88ca970" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7581d481bb3af741c877cca49f18c3d9f24db7639f235409cf6e102871f45c82" + sha256 cellar: :any_skip_relocation, arm64_ventura: "575a55a9baedee36c58bca1e229607d89952028d5fb9fd056118ab923c365de2" + sha256 cellar: :any_skip_relocation, sonoma: "c834aec5d5a72c3ab8cfcbba77a221b50dccd61e63683265e6ac93f3749901ab" + sha256 cellar: :any_skip_relocation, ventura: "1e6972dc2fb08ea5c614580d56863688b4753592a69b9bd157042ba381e948cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "573b0fe3839bbf408211f0c811bbe12ec2a88c85a6969a1fa6760febe4dac4c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da5534fb2eb8c7f91a9232553524ee70346d8b9e4d432190882720da8ba52f33" + 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/owamp.rb b/Formula/o/owamp.rb new file mode 100644 index 0000000000000..55baea1f87f5b --- /dev/null +++ b/Formula/o/owamp.rb @@ -0,0 +1,79 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "22833b09d6faa093c2d186560cd22e328b9ab11efa8f9774543392e7dca127f2" + sha256 cellar: :any_skip_relocation, high_sierra: "0ce1d8385c1cb2036acbccbcd92ed5778c8ec0aa8e4db5c06a9ea018621f58dc" + sha256 cellar: :any_skip_relocation, sierra: "afdeaab138caa02c535fd9d2b847c5b5b24273beef19271fc60415de16d0681f" + sha256 cellar: :any_skip_relocation, el_capitan: "6f86a33c176ba1394560b7707466c088930f13db102b7adc159e80e889fdc5cf" + 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..a8f7c0e0d64d4 --- /dev/null +++ b/Formula/o/owfs.rb @@ -0,0 +1,54 @@ +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" + + bottle do + 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, mojave: "f67044700191dc6becb4b768d2c89f8e6714411ec4182c8297edcf3d3eac1318" + sha256 cellar: :any, high_sierra: "1812f6546d6e6957fc34aefadb1ce83ab8c7995a4c9c67b85f0ff7ba4e7e381c" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..d94b2d02f5655 --- /dev/null +++ b/Formula/o/ox.rb @@ -0,0 +1,30 @@ +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_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/oxipng.rb b/Formula/o/oxipng.rb new file mode 100644 index 0000000000000..e8ef6e759e5aa --- /dev/null +++ b/Formula/o/oxipng.rb @@ -0,0 +1,43 @@ +class Oxipng < Formula + desc "Multithreaded PNG optimizer written in Rust" + homepage "https://github.com/shssoichiro/oxipng" + url "https://github.com/shssoichiro/oxipng/archive/refs/tags/v9.1.5.tar.gz" + sha256 "8f99d5c67efa2a7550023bf610b90e65d421375c9ed7f37097f83ae5c05f85bd" + license "MIT" + + bottle do + 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/shssoichiro/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..bec7ef9666d98 --- /dev/null +++ b/Formula/o/oxker.rb @@ -0,0 +1,31 @@ +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.10.3.tar.gz" + sha256 "6d27d6e9dfbe38270560751f932cd72659b73d4891117042aa21eba800f2ad9e" + license "MIT" + head "https://github.com/mrjackwills/oxker.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e02a7a9d1545f4e9d227c5fbb1046f72611e43bc4480270f573cb87c0a625cbf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8a5cf4e716332ded13596d787d5c23f73897c7a77fbe086b480e1e1307f6d702" + sha256 cellar: :any_skip_relocation, arm64_ventura: "198fa27793541fb09603c68c74b516c3c702495c1b4ae935a17d8e3b1ed521e6" + sha256 cellar: :any_skip_relocation, sonoma: "a80cddf2f024cb60e2b5c3896671befa452d74541c330c80c2b5c5d35fbdf7a5" + sha256 cellar: :any_skip_relocation, ventura: "8c6b2986ce0c4bd11e40722188c53f746f4309b5d6348823dcece4f8dc8ac396" + sha256 cellar: :any_skip_relocation, arm64_linux: "e4414e8f4e92b3d7c8f745957f3d193f2120bf2c68146afd55b2a67dc6da28aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dc321af614e20ee574d398ddad12d4b50a5b75761464162aac094986ca7c4287" + 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..27dbf19e65e3d --- /dev/null +++ b/Formula/o/oxlint.rb @@ -0,0 +1,38 @@ +class Oxlint < Formula + desc "Suite of high-performance tools for JavaScript and TypeScript written in Rust" + homepage "https://oxc.rs/" + url "https://github.com/oxc-project/oxc/archive/refs/tags/oxlint_v0.16.10.tar.gz" + sha256 "f2f2f56ab75eeddd0dd129db0b1c816022c0121e80a1f2c0aaaf768abd08f99d" + license "MIT" + head "https://github.com/oxc-project/oxc.git", branch: "main" + + livecheck do + url :stable + regex(/^oxlint[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "010fb93348b0dddd0d84418ef0b6987048980a2b5df1fd13344e07aad76c8b7d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "30795ee01f3a0d51c62857101f7808a9243e68fd90a0a2b6c007d94c5ce3e131" + sha256 cellar: :any_skip_relocation, arm64_ventura: "52e2efe941dc85db6d37054f5fe10b06a30683dbc3e2977a486a286e2067087d" + sha256 cellar: :any_skip_relocation, sonoma: "1e98cb8c5cd7f91432e1db4b0faecf89d2678e821b9f039ccef98c044bebbb27" + sha256 cellar: :any_skip_relocation, ventura: "3d6bc8145e6087226413560833f7c5577fc0a04edd9afc3583bb80e9a84a8b33" + sha256 cellar: :any_skip_relocation, arm64_linux: "5d5ff0303477c5ef9a1f9d3a95eb9da9222e63c6be6db543b39adfefe53b779c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c551e1084c2847e2a4cd225073b94338d24626c0ec24dc3f3db6847402a21d9d" + end + + depends_on "rust" => :build + + def install + ENV["OXC_VERSION"] = version.to_s + system "cargo", "install", *std_cargo_args(path: "apps/oxlint") + 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 8749503da543e..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" - revision 1 - - bottle do - rebuild 1 - sha256 "24a65399ed4b462a3291c542616e1a5dad4df008dcb116fd12c34030f05135b0" => :catalina - sha256 "ab9cbc2e7e8c7004c5a3db7fbc4b6a0cbc9560a353a306cba0fa4d1174a46f68" => :mojave - sha256 "a7fbff2831b4c6a61896c65b482b3db50d2e070e1e74772e7fb929bbd4a586f0" => :high_sierra - 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 18f5ff2d3c38c..0000000000000 --- a/Formula/oauth2_proxy.rb +++ /dev/null @@ -1,87 +0,0 @@ -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/v6.0.0.tar.gz" - sha256 "cff836f293895393f4cf853725cb7e72c9bee6e41f732e4e957420fc753a41e3" - head "https://github.com/oauth2-proxy/oauth2-proxy.git" - - bottle do - cellar :any_skip_relocation - sha256 "3e0e5bea2da5eb741b19e09baa616cf1d4a31c99f6685e3ffa0567f101df9b2d" => :catalina - sha256 "6068811d81c7cd039836d5b565904d0499038a777c19a1adc73ad8712deba17c" => :mojave - sha256 "a336681bf3c0c142aa8578095b7c7c0dc508cfca75ba007a7bb951b104371ec3" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w -X main.VERSION=#{version}", - "-trimpath", - "-o", 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 - - 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 "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/oauth2l.rb b/Formula/oauth2l.rb deleted file mode 100644 index e4e29a8b62c41..0000000000000 --- a/Formula/oauth2l.rb +++ /dev/null @@ -1,29 +0,0 @@ -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/v1.0.2.tar.gz" - sha256 "86dbc2cd0952db7e9b51cb41852f795488ecaf9e31c7ac8e0be54d719f53ebd7" - license "Apache-2.0" - head "https://github.com/google/oauth2l.git" - - bottle do - cellar :any_skip_relocation - sha256 "5cc7ab09462ced7fde59421399d9a2eaa6bdc6a7c223f82ea6c2998961ec690d" => :catalina - sha256 "7273e656e6e6d24e0a2e0a1a2e21e4fc9704b03f0e26e4172c2f51ca851d441b" => :mojave - sha256 "950e998aeae2d56005f4c4915f05458d1a59715f024811e6a70eaca886aa8aaa" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GO111MODULE"] = "on" - - system "go", "build", "-o", "oauth2l" - bin.install "oauth2l" - end - - test do - assert_match "Invalid Value", - shell_output("#{bin}/oauth2l info abcd1234") - end -end diff --git a/Formula/objc-codegenutils.rb b/Formula/objc-codegenutils.rb deleted file mode 100644 index 6a5ccc633cbd5..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 "24745ae53d47e15598835ee0538c3f121c48b31b21902b1fd3fab0a8c9886543" => :catalina - sha256 "7a10354a20ef417eeb521c983f4714be063b68e6d74bec7ddf6f72b99d3cbfbe" => :mojave - sha256 "118c03e858a60fa17c71fbc84fb5a8b9c5f778a0c68531e3df576e1d85d9c91a" => :high_sierra - sha256 "d7b3d3d26970add3af78b0820f3ef8b5e0290f1b2114f5bf06acddcd8d6bdb34" => :sierra - sha256 "d7b945db595b07ee5677902586e01002ba555affdcae366f1fcbe919a6013772" => :el_capitan - sha256 "46d389e6ec12462dfbdd97822ce7c6e8156bbe9fac7a3baf04c20cb1991d9f75" => :mavericks - end - - depends_on :xcode => :build - - 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 84c4d9fe3fcea..0000000000000 --- a/Formula/objc-run.rb +++ /dev/null @@ -1,20 +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" - license "MIT" - 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 73a6b9b143655..0000000000000 --- a/Formula/objfw.rb +++ /dev/null @@ -1,24 +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 "07ede29c16dec01d6eb8dd2dca6f79ec993f99298b38a78276f6257ebfb71c6a" => :catalina - 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 6efbac76d8f0c..0000000000000 --- a/Formula/ocaml-findlib.rb +++ /dev/null @@ -1,37 +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.1.tar.gz" - sha256 "8e85cfa57e8745715432df3116697c8f41cb24b5ec16d1d5acd25e0196d34303" - revision 3 - - bottle do - sha256 "ba498040816b2b5b00ed84a96107119a99a52a0815b86ace5e5708f807be1ddb" => :catalina - sha256 "b9af770177876ae3ffff6cca808a7ea72866a0bfe3b92a987878629fc42b3eff" => :mojave - sha256 "a412ed75fa6bd7180846f2305eea5d2a4170bb41535c26fb047fbbd2b0adef8a" => :high_sierra - end - - depends_on "ocaml" - - uses_from_macos "m4" => :build - - def install - 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" - - # Avoid conflict with ocaml-num package - rm_rf Dir[lib/"ocaml/num", lib/"ocaml/num-top"] - 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 2f69575212a3c..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.3.tar.gz" - sha256 "4f79c30e81ea9553c5b2c5b5b57bb19968ccad1e85256b3c446b5df58f33e94d" - revision 1 - - bottle do - cellar :any - sha256 "7890616190d8d7071d8c3cf2ea494885a115fc3b2d4058cb4be81132622e6cf2" => :catalina - sha256 "e6feb685e5bc9486eee9c9a3a8f8712a6df05bc6564c518b0549052e835500c0" => :mojave - sha256 "16e31884645c7deca510218f7611d6c2ed105ef5229efcf3f17b4ab7a5f6330c" => :high_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 81ffeed47ee19..0000000000000 --- a/Formula/ocaml.rb +++ /dev/null @@ -1,53 +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: -# - 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-4.09/ocaml-4.09.0.tar.xz" - sha256 "f2fb91dfe86bae00a33fc5ba51685e95a68564274f5277f787c31931b22a7fec" - head "https://github.com/ocaml/ocaml.git", :branch => "trunk" - - bottle do - cellar :any - sha256 "d3661fa949c06ce4132df11fb82bca7f0a58b3ba555700e54fafc264b621af0b" => :catalina - sha256 "39551915056e6652aa10579c926e43ff2a0d744202be2ba89dd4107f1d4346cf" => :mojave - sha256 "4e96119913768af5be322c05efe1ddb5716d389bedfaa582fd8cb5eee1abfed1" => :high_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 - - 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 = 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 7827130bf90fd..0000000000000 --- a/Formula/ocamlbuild.rb +++ /dev/null @@ -1,26 +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.14.0.tar.gz" - sha256 "87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78" - revision 2 - head "https://github.com/ocaml/ocamlbuild.git" - - bottle do - sha256 "8f6fc7e7413b24faa041b7651349a3128f9eadefae5c9aa0c50f0d1a56e010f6" => :catalina - sha256 "04fed811edb4dd3903f742ec6678643f9959e85c4fcb763972c8779dec059515" => :mojave - sha256 "e4cd0274f9657874e29add30545055af4ea8697d426ed95f799ddce63aef5cfe" => :high_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 4f60aca47fddf..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 13 - - bottle do - cellar :any - sha256 "8ccd0c9f59b9fad6fe084e57e726cd20d0f26497e71e4be94ff7f603512cbef8" => :catalina - sha256 "6cd21f03d8a557368499d9cd61233dab4bab11fcd99c312036d58d660598c539" => :mojave - sha256 "6ae2abcf123aef7ce6cc2c5aad0d912bc459fdd9e7e2abfa99135d672767ddb7" => :high_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 992e8ca91fa92..0000000000000 --- a/Formula/oclgrind.rb +++ /dev/null @@ -1,134 +0,0 @@ -class Oclgrind < Formula - desc "OpenCL device simulator and debugger" - homepage "https://github.com/jrprice/Oclgrind" - url "https://github.com/jrprice/Oclgrind/archive/v19.10.tar.gz" - sha256 "f9a8f22cb9f6d88670f2578c46ba0d728ba8eaee5c481c2811129dc157c43dc0" - revision 3 - - bottle do - cellar :any - sha256 "1fd792bb90fa78dd58cc2d7ffe824084b80caf2211363096b14a3d9a6f3411c9" => :catalina - sha256 "f6728b30db78fa358b2136d4c1e51dbcafa79b4a9ddbf3a601f28c01e0e26805" => :mojave - sha256 "fe3d0a3798f2ac0092e8469a6f824bdfb29b0fb92f0d3b3fa0edeb8875f54ee6" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "llvm@9" - - 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); - - 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); - } - EOS - - system ENV.cc, "rot13.c", "-o", "rot13", "-framework", "OpenCL" - output = shell_output("#{bin}/oclgrind ./rot13 2>&1").chomp - assert_equal "Hello, World!", output - end -end diff --git a/Formula/ocp.rb b/Formula/ocp.rb deleted file mode 100644 index aac3bbb9299d3..0000000000000 --- a/Formula/ocp.rb +++ /dev/null @@ -1,48 +0,0 @@ -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-0.2.1.tar.bz2" - sha256 "238ed6547e4c96b775d93aa6e4252982a763f62ecd201f6312f041212edc1798" - license "GPL-2.0" - - bottle do - sha256 "d9c557bc2f3161818fcf4701e7cc123bd6d2f85ff9e80df5976392de9102a737" => :catalina - sha256 "e23ff51d2b5b9adaa44f5d851da94c836f68886bacc2cd739b30166a2ec04312" => :mojave - sha256 "6b40bde3ba007a8b18451502bcf49841d8a3f75ec06a7d6a8e748f508e7dc1f9" => :high_sierra - end - - depends_on "flac" - depends_on "libvorbis" - depends_on "mad" - - # Fix duplicate symbol errors, remove in next release - # https://github.com/mywave82/opencubicplayer/issues/15 - patch do - url "https://github.com/mywave82/opencubicplayer/commit/04368dc54e649050517fe3a058e919fb5fb5f150.diff?full_index=1" - sha256 "baf237701358a45c79fd9e31fec5ecf3c8087597b30e9846023ef2e76006bb58" - end - patch do - url "https://github.com/mywave82/opencubicplayer/commit/1907b8f85e3e5fa61a02ad0ca3ce9bd30bfc0ea6.diff?full_index=1" - sha256 "fc82d4d7f630885097efa2223bba4c941456f2d70e625b6721ca2e825fad2d43" - end - - def install - ENV.deparallelize - - args = %W[ - --prefix=#{prefix} - --without-x11 - --without-sdl - --without-sdl2 - --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 3136c17a0994d..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" - revision 1 - head "https://github.com/cernekee/ocproxy.git" - - bottle do - cellar :any - sha256 "53016c9f83444b015e71e2f1678b1aab1e7914f42a8c5d8de1ab581fca130ef8" => :catalina - sha256 "786f0c42a3d282b78d8dc2fa18c36e46707451f4ac848e9af7dd82ab31b40f6d" => :mojave - sha256 "0cd70ac67ebd419b869ad4dd70c6cd1217248c8e7b7a57d3a7c8e15c7d2f7dfc" => :high_sierra - sha256 "8e33eae007c082ec9b6787210096a4e20992151a7b2c5f345941f68c478ae0e2" => :sierra - 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 d520b0e173919..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.27.tar.lz" - mirror "https://ftpmirror.gnu.org/ocrad/ocrad-0.27.tar.lz" - sha256 "a9bfe67e9a040907aff5640dca56392476b6a89e48e37dc94ba846c5b6733b36" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "6533cd452587714531d20b4aa74ea7fc1e323ff893c8a7c9729655ede1ec9df7" => :catalina - sha256 "3d1c85bb36faedf5ab12f78e8c3511dcc4164561ba8bc09924b48f6aa3fa0b37" => :mojave - sha256 "ba9b30eeabc11634502e30fd9a730d5727668550f9708d46fbefc03bcb3917de" => :high_sierra - sha256 "903ce6530395c0973418020561ddd60da739f3a36e865500776922e18975460b" => :sierra - 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 25b063515fc2a..0000000000000 --- a/Formula/ocrmypdf.rb +++ /dev/null @@ -1,153 +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/4e/bb/35a55dfaf1b5df31fccef7276362515e4eaea5ca1f37a853cfe46273196b/ocrmypdf-10.2.0.tar.gz" - sha256 "eb9defb761ff221e3cf724823772dc7495db9bb4bf1aca9b4312b1b4bc583cd7" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "517262a5bc1e7798ec806bef42fd76f798ca18ef42b9fa4b76dfbefc3e1585f3" => :catalina - sha256 "7d33c1954df20a093cf26ef72b480ddda4e98ca6139b208cc135d875f7e15e2c" => :mojave - sha256 "49f6e8246090a26c0ab52fe5221981bd04f937a156ad45c17c71387543fd2e50" => :high_sierra - end - - depends_on "pkg-config" => :build - 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@3.8" - depends_on "qpdf" - depends_on "tesseract" - depends_on "unpaper" - - uses_from_macos "libffi" - uses_from_macos "libxml2" - uses_from_macos "libxslt" - uses_from_macos "zlib" - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "coloredlogs" do - url "https://files.pythonhosted.org/packages/84/1b/1ecdd371fa68839cfbda15cc671d0f6c92d2c42688df995a9bf6e36f3511/coloredlogs-14.0.tar.gz" - sha256 "a1fab193d2053aa6c0a97608c4342d031f1f93a3d1218432c59322441d31a505" - end - - resource "humanfriendly" do - url "https://files.pythonhosted.org/packages/6c/19/8e3b4c6fa7cca4788817db398c05274d98ecc6a35e0eaad2846fde90c863/humanfriendly-8.2.tar.gz" - sha256 "bf52ec91244819c780341a3438d5d7b09f431d3f113a475147ac9b7b167a3d12" - end - - resource "img2pdf" do - url "https://files.pythonhosted.org/packages/65/12/6ee1a77614df6decefd88f781cf95b73acf93f0cc9eb03bd5042d116b85d/img2pdf-0.3.6.tar.gz" - sha256 "8cd5509a60b75f4442b897bad3d593e25ebd314105f3034a8f17def396a4a0fb" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/03/a8/73d795778143be51d8b86750b371b3efcd7139987f71618ad9f4b8b65543/lxml-4.5.1.tar.gz" - sha256 "27ee0faf8077c7c1a589573b1450743011117f1aa1a91d5ae776bbc5ca6070f2" - end - - resource "pdfminer.six" do - url "https://files.pythonhosted.org/packages/62/d1/d5132e95f0e708de344d69eef8309aadd21721a5d12b5770c120a2225797/pdfminer.six-20200517.tar.gz" - sha256 "429a099d2ca76cedff79652e17cfc37d7751a26d50f30af0fa791a69f68a3ddc" - end - - resource "pikepdf" do - url "https://files.pythonhosted.org/packages/d2/22/6f77d3112ce7b1f25d4013e7a94fbb627938f5d297c7d4e9118a1e50792b/pikepdf-1.15.1.tar.gz" - sha256 "59c3ff9251752e740b8863d5bb327d4fb598afa336db9e2b6038e7beb0fd57a5" - end - - resource "Pillow" do - url "https://files.pythonhosted.org/packages/ce/ef/e793f6ffe245c960c42492d0bb50f8d14e2ba223f1922a5c3c81569cec44/Pillow-7.1.2.tar.gz" - sha256 "a0b49960110bc6ff5fead46013bcb8825d101026d466f3a4de3476defe0fb0dd" - end - - resource "pluggy" do - url "https://files.pythonhosted.org/packages/f8/04/7a8542bed4b16a65c2714bf76cf5a0b026157da7f75e87cc88774aa10b14/pluggy-0.13.1.tar.gz" - sha256 "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "pycryptodome" do - url "https://files.pythonhosted.org/packages/69/2a/298b2689bee8e88c502c7e85ba1c9f07c7e182ea91c705c449f693056c9f/pycryptodome-3.9.7.tar.gz" - sha256 "f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2" - end - - resource "reportlab" do - url "https://files.pythonhosted.org/packages/74/0b/34dc83ed0108417358716d218eec8528b24c30597570a71cab929bce2432/reportlab-3.5.42.tar.gz" - sha256 "9c21f202697a6cea57b9d716288fc919d99cbabeb30222eebfc7ff77eac32744" - end - - resource "sortedcontainers" do - url "https://files.pythonhosted.org/packages/3b/fb/48f6fa11e4953c530b09fa0f2976df5234b0eaabcd158625c3e73535aeb8/sortedcontainers-2.2.2.tar.gz" - sha256 "4e73a757831fc3ca4de2859c422564239a31d8213d09a2a666e375807034d2ba" - end - - resource "tqdm" do - url "https://files.pythonhosted.org/packages/a9/03/df1d77e852dd697c0ff7b7b1b9888739517e5f97dfbd2cf7ebd13234084c/tqdm-4.46.1.tar.gz" - sha256 "cd140979c2bebd2311dfb14781d8f19bd5a9debb92dcab9f6ef899c987fcf71f" - end - - def install - venv = virtualenv_create(libexec, Formula["python@3.8"].bin/"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! "xcb.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 - 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 - 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 - 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_predicate testpath/"ocr.pdf", :exist? - end -end diff --git a/Formula/octant.rb b/Formula/octant.rb deleted file mode 100644 index 805f7f1d826b4..0000000000000 --- a/Formula/octant.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Octant < Formula - desc "Kubernetes introspection tool for developers" - homepage "https://octant.dev/" - url "https://github.com/vmware-tanzu/octant.git", - :tag => "v0.13.1", - :revision => "72c5ea94283ab48cc6c2b7e91d7c901af031ecb3" - license "Apache-2.0" - head "https://github.com/vmware-tanzu/octant.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "eb2db3382c70bfc6decf386bfe901b9e9f2e0319768da4a31cfecebf3bb523b0" => :catalina - sha256 "6715f3635314af566c04869c3e36369a895754f6022f0f06eaf6c4d79a4b7346" => :mojave - sha256 "f448aee1de3d242ea718a605dcecd55f6fdc01af2dc233dca8c3278c8bbf1fbb" => :high_sierra - end - - depends_on "go" => :build - depends_on "node" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOFLAGS"] = "-mod=vendor" - - ENV.append_path "PATH", HOMEBREW_PREFIX/"bin" - - dir = buildpath/"src/github.com/vmware-tanzu/octant" - dir.install buildpath.children - - cd "src/github.com/vmware-tanzu/octant" do - system "go", "run", "build.go", "go-install" - ENV.prepend_path "PATH", buildpath/"bin" - - system "go", "generate", "./pkg/icon" - system "go", "run", "build.go", "web-build" - - commit = Utils.safe_popen_read("git", "rev-parse", "HEAD").chomp - build_time = Utils.safe_popen_read("date -u +'%Y-%m-%dT%H:%M:%SZ' 2> /dev/null").chomp - ldflags = ["-X \"main.version=#{version}\"", - "-X \"main.gitCommit=#{commit}\"", - "-X \"main.buildTime=#{build_time}\""] - - system "go", "build", "-o", bin/"octant", "-ldflags", ldflags.join(" "), - "-v", "./cmd/octant" - end - end - - test do - kubeconfig = testpath/"config" - output = shell_output("#{bin}/octant --kubeconfig #{kubeconfig} 2>&1", 1) - assert_match "failed to init cluster client", output - - assert_match version.to_s, shell_output("#{bin}/octant version") - end -end diff --git a/Formula/octave.rb b/Formula/octave.rb deleted file mode 100644 index d7db44cf6b7ac..0000000000000 --- a/Formula/octave.rb +++ /dev/null @@ -1,122 +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-5.2.0.tar.xz" - mirror "https://ftpmirror.gnu.org/octave/octave-5.2.0.tar.xz" - sha256 "2757b5cc1854c9326d6c99d2900c7cec2909ac7ed500212d170d0df592bfd26b" - revision 9 - - bottle do - sha256 "5c9af6d3f0f61cd764067c1f66997b0044788dc76e8ddc28c6f64194a275d09c" => :catalina - sha256 "37389123fb6ec5bda0ef8874596231b6e22a20d60ce9cb792a97c18bff7f307f" => :mojave - sha256 "e44de6cb9315e2f125ea516733513c048b38fd9c77719eb270717daff43360a6" => :high_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 "openjdk" => :build - 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 "openblas" - depends_on "pcre" - depends_on "portaudio" - depends_on "pstoedit" - depends_on "qhull" - depends_on "qrupdate" - depends_on "qt" - depends_on "readline" - depends_on "suite-sparse" - depends_on "sundials" - depends_on "texinfo" - - uses_from_macos "curl" - - # Dependencies use Fortran, leading to spurious messages about GCC - cxxstdlib_check :skip - - # Octave fails to build due to error with java. See also - # https://github.com/Homebrew/homebrew-core/issues/39848 - # Patch submitted upstream at: https://savannah.gnu.org/patch/index.php?9806 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/a8124b73c5216cc81d63627a4b41203ab1d91a4d/octave/5.1.0-java-version.patch" - sha256 "7ea1e9b410a759fa136d153fb8482ecfc3425a39bfe71c1e71b3ff0f7d9a0b54" - end - - 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)%/, - '""' - - # Qt 5.12 compatibility - # https://savannah.gnu.org/bugs/?55187 - ENV["QCOLLECTIONGENERATOR"] = "qhelpgenerator" - # These "shouldn't" be necessary, but the build breaks without them. - # https://savannah.gnu.org/bugs/?55883 - ENV["QT_CPPFLAGS"]="-I#{Formula["qt"].opt_include}" - ENV.append "CPPFLAGS", "-I#{Formula["qt"].opt_include}" - ENV["QT_LDFLAGS"]="-F#{Formula["qt"].opt_lib}" - ENV.append "LDFLAGS", "-F#{Formula["qt"].opt_lib}" - - system "./bootstrap" if build.head? - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--enable-link-all-dependencies", - "--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" - system "make", "all" - - # 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 - 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])" - end -end diff --git a/Formula/octomap.rb b/Formula/octomap.rb deleted file mode 100644 index 2aea18cf88431..0000000000000 --- a/Formula/octomap.rb +++ /dev/null @@ -1,36 +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.5.tar.gz" - sha256 "adf87320c4c830c0fd85fe8d913d8aa174e2f72d0ea64c917599a50a561092b6" - - bottle do - sha256 "dcf938ee253a527143d78cbc39c20046015519b5aff741656016f0a67ff705b9" => :catalina - sha256 "878681f950a14d49b47bd69605a12bae4f42f127b4cc7750de14b7a16f6a9930" => :mojave - sha256 "92def71d469ce8d5a660d371eded16f8d25f9346e2fc3f34ffd105f3bbd2060c" => :high_sierra - 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 7a83790e21fc1..0000000000000 --- a/Formula/ode.rb +++ /dev/null @@ -1,49 +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.16.1.tar.gz" - sha256 "b228acad81f33781d53eaf313437cc5d6f66aec5a4e56c515fc1b2d51e6e8eba" - head "https://bitbucket.org/odedevs/ode.git" - - bottle do - cellar :any - rebuild 1 - sha256 "4bddeed55b5f77a87a6719a804e18421ede97a40350038aef4496c1d8d95a77c" => :catalina - sha256 "430c17a4551ea6c7d4473d5344dc7b0c3951cce4cf8ce099edcfb5c88424fd67" => :mojave - sha256 "87666bd9ae5c66430a48c0d8fd805fc3b8aff01a5a2b82c984f63b5307cd8009" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libccd" - - def install - inreplace "bootstrap", "libtoolize", "glibtoolize" - system "./bootstrap" - - system "./configure", "--prefix=#{prefix}", - "--enable-libccd", - "--enable-shared", - "--disable-static", - "--enable-double-precision" - 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/odin.rb b/Formula/odin.rb deleted file mode 100644 index 364ff39e754b7..0000000000000 --- a/Formula/odin.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Odin < Formula - desc "The Odin Programming Language" - homepage "https://odin-lang.org/" - url "https://github.com/odin-lang/Odin/archive/v0.12.0.tar.gz" - sha256 "8356124c8cc7e08ac39872e5bb10593a412e67f81df621124097facd9b2b26cc" - license "BSD-2-Clause" - revision 1 - head "https://github.com/odin-lang/Odin.git" - - bottle do - cellar :any - sha256 "fa220553a803117a6da6b751710098c3bab7149548328d34fcc0e20d46a208ef" => :catalina - sha256 "55a364b6cf75db9dbb38a0f0bba169e26ccc291d9c1e7e61db943e1c43c3aa7a" => :mojave - sha256 "5db7f315b542a5c648a72a682a8f026dbfd37c9ebacf81cdb29cde972b023cbc" => :high_sierra - end - - depends_on "llvm" - - uses_from_macos "libiconv" - - def install - system "make", "release" - libexec.install "odin", "core", "shared" - (bin/"odin").write <<~EOS - #!/bin/bash - export PATH="#{Formula["llvm"].opt_bin}:$PATH" - exec -a odin "#{libexec}/odin" "$@" - EOS - pkgshare.install "examples" - end - - test do - assert_match version.to_s, shell_output("#{bin}/odin version") - - (testpath/"hellope.odin").write <<~EOS - package main - - import "core:fmt" - - main :: proc() { - fmt.println("Hellope!"); - } - EOS - system "#{bin}/odin", "build", "hellope.odin" - assert_equal "Hellope!\n", `./hellope` - end -end diff --git a/Formula/odo.rb b/Formula/odo.rb deleted file mode 100644 index 085ed57de348a..0000000000000 --- a/Formula/odo.rb +++ /dev/null @@ -1,29 +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 "e5d74a7c45e3d3e8781b1b7d563733953cb15e6dffed8bcc525b063dbd5d7d69" => :catalina - 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 8143d2af0f3b4..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/v4.0.1.tar.gz" - sha256 "7e4b9f09607e80f9836990678cd45a542eaedf99c3334e1c6f8956ffc5d88c02" - - bottle do - cellar :any - sha256 "e5694f2aaf70a12bd5c4706baf2a245f9a263b8c397bf2d072d1d3a8a487787b" => :catalina - sha256 "7290f588c312521a1468696d8f6d463fdc804655c385292fbde07808c5929343" => :mojave - sha256 "64a67b0695f49cebf4d21495278752babdc34ab44639fec64c645cf08fdfd112" => :high_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 5d6bb19b2c285..0000000000000 --- a/Formula/odt2txt.rb +++ /dev/null @@ -1,33 +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 "31e17f05898b06469cbc33244f357c61baf059120e96b34d472325e38adfa4d7" => :catalina - 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.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 135f0e1d4c965..0000000000000 --- a/Formula/offlineimap.rb +++ /dev/null @@ -1,107 +0,0 @@ -class Offlineimap < Formula - desc "Synchronizes emails between two repositories" - homepage "https://www.offlineimap.org/" - url "https://files.pythonhosted.org/packages/40/41/5c9fae40b32ced68ad09e12f967be6e41309d63359948c6518d4c42de4a4/offlineimap-7.3.3.tar.gz" - sha256 "ce7642e30e00a93d81d1990ec68debc7548b575b66424b79977bc685657c1862" - head "https://github.com/OfflineIMAP/offlineimap.git" - - bottle do - cellar :any_skip_relocation - sha256 "2d21d8216b9d9ad3197181632dd8583d8bd15f46851365e906d9581ae67ff30e" => :catalina - sha256 "ff922fc76e1e5571628d7ecb4bd436180895352768979c2cd9bcfee048b5d0f4" => :mojave - sha256 "ff922fc76e1e5571628d7ecb4bd436180895352768979c2cd9bcfee048b5d0f4" => :high_sierra - end - - depends_on :macos # Due to Python 2 (Will never support Python 3) - # https://github.com/OfflineIMAP/offlineimap/issues/616#issuecomment-491003691 - uses_from_macos "libxml2" - uses_from_macos "libxslt" - - resource "rfc6555" do - url "https://files.pythonhosted.org/packages/58/a8/1dfba2db1f744657065562386069e547eefea9432d3f520d4af5b5fabd28/rfc6555-0.0.0.tar.gz" - sha256 "191cbba0315b53654155321e56a93466f42cd0a474b4f341df4d03264dcb5217" - end - - resource "selectors2" do - url "https://files.pythonhosted.org/packages/a4/54/d690d931777ca7310562997fab09019582e6e557984c02d7647f3654f7f5/selectors2-2.0.1.tar.gz" - sha256 "81b77c4c6f607248b1d6bbdb5935403fef294b224b842a830bbfabb400c81884" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - def install - ENV.delete("PYTHONPATH") - 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 - - # Remove hardcoded python2 that does not exist on high-sierra or mojave - inreplace "Makefile", "python2", "python" - inreplace "bin/offlineimap", "python2", "python" - - 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 44c084e6684a3..0000000000000 --- a/Formula/oggz.rb +++ /dev/null @@ -1,32 +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" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "6a107479a443028d27afcfa51b68899449120637dcbe8e6987ce0e5191b1ee59" => :catalina - sha256 "21ee59402b2854a91629c96c0e3540a1e97e9661984800d4d80d650069fcf0be" => :mojave - sha256 "f444304f94866179ffcbe6322d6f25193b4fcd2dc49ad71f9c9527b0d85934de" => :high_sierra - sha256 "a0fad22ba18930be45c7226f2db0fe8b39c988c84c392807ddc75e2d40b3a9ad" => :sierra - sha256 "4c1819dbc134981faf5e2e03dc69d210deb8dabd59b71969c1f479fa32322635" => :el_capitan - sha256 "c6076111f111c5d77dc608bcb4892f10dffb84e5b4f5ebdfba311ec332fa6623" => :yosemite - sha256 "a3aa5e741dd3e7a9aebb65748f80f45947549a79915b68161a79f12cb37b4b12" => :mavericks - 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 76f39a857260a..0000000000000 --- a/Formula/ogmtools.rb +++ /dev/null @@ -1,43 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "6a2e3ed95e0569dca709b5d0431ea309c008400f3f88b91133d6854340babed7" => :catalina - 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/oha.rb b/Formula/oha.rb deleted file mode 100644 index 94ca669ea7b5a..0000000000000 --- a/Formula/oha.rb +++ /dev/null @@ -1,25 +0,0 @@ -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/v0.3.1.tar.gz" - sha256 "54edf861415d12e5482c09296d2715aad0a828ff8a5c6241fa80e6d08fd058c1" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "748634b4dee5550ad9cfbcfc2d0f31fca67126bac60e6d0be32ad40a891525d2" => :catalina - sha256 "e22630186be4a6409259c46904779dac011f32d96d48b1d610057dbdfe049420" => :mojave - sha256 "f67098ac6246795347f7fe3014bd12249d21a0e9279df4671a1743866be819bb" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - output = "[200] 200 responses" - assert_match output.to_s, shell_output("#{bin}/oha --no-tui https://www.google.com") - end -end diff --git a/Formula/ohcount.rb b/Formula/ohcount.rb deleted file mode 100644 index a4b5e8ae7947b..0000000000000 --- a/Formula/ohcount.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Ohcount < Formula - desc "Source code line counter" - homepage "https://github.com/blackducksoftware/ohcount" - url "https://github.com/blackducksoftware/ohcount/archive/4.0.0.tar.gz" - sha256 "d71f69fd025f5bae58040988108f0d8d84f7204edda1247013cae555bfdae1b9" - license "GPL-2.0" - head "https://github.com/blackducksoftware/ohcount.git" - - bottle do - cellar :any - sha256 "49de65862c42d1e653b84aa09a3ca9015de5afa40d9c1069d5a7f5a4e35060e5" => :catalina - sha256 "b93054a4459a246895a524de21559fc1387e8cc6436d83481c7d85afc10be9e8" => :mojave - sha256 "2bcddb3687af78d9317be143579afe692f8a3034c51b1e7e07ddd53491792365" => :high_sierra - sha256 "716a64cf45acdb062651994384e88e74e5bf258a1b70b9b29cf09c5c115084e5" => :sierra - 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 <<~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/oil.rb b/Formula/oil.rb deleted file mode 100644 index 52d5d0cc394fc..0000000000000 --- a/Formula/oil.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Oil < Formula - desc "Bash-compatible Unix shell with more consistent syntax and semantics" - homepage "https://www.oilshell.org/" - url "https://www.oilshell.org/download/oil-0.7.0.tar.gz" - sha256 "da462387a467661cb9d0ec9b667aecd7be3f54ce662cfbb2292f4795fd3f7f20" - head "https://github.com/oilshell/oil.git" - - bottle do - sha256 "8e5714ec5cc0700623b37e8c6e64c2fc85bec5cb91a48ecdd23c2139d2e0615c" => :catalina - sha256 "8e135274574ff3c21248feca2ba837e8197bba55b78c41b0f80f7a3ff0cdb3b1" => :mojave - sha256 "89427ac26ef12831c9e1a737abad953791a753d2c806bc5cf369b152fa308b1d" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "./install" - end - - test do - assert_equal pipe_output("#{bin}/osh -c 'pwd'").strip, testpath.to_s - end -end diff --git a/Formula/okteto.rb b/Formula/okteto.rb deleted file mode 100644 index 9b5575f31dcd1..0000000000000 --- a/Formula/okteto.rb +++ /dev/null @@ -1,39 +0,0 @@ -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/1.8.14.tar.gz" - sha256 "ead78ef55439f66f775757886ccce26cf741e9acbeb557dd6a4ee0e2f7c463ea" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a4580da25ca78cb6dc4ec045b6e18f0ef3708d02b4ab962d454324890962656f" => :catalina - sha256 "173848fd9d90011204bf416e46f47fbdff7d80d788ba8979f5dd37c85e4c6dcd" => :mojave - sha256 "def71f2dec68765d91d0b6e65d20ec73ff336ae4123b4384e5e7535058b8c767" => :high_sierra - 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", "-o", "#{bin}/#{name}", "-trimpath", "-ldflags", ldflags, "-tags", tags - end - - test do - touch "test.rb" - system "echo | okteto init --overwrite --file test.yml" - expected = <<~EOS - name: #{Pathname.getwd.basename} - image: okteto/ruby:2 - command: - - bash - workdir: /okteto - forward: - - 1234:1234 - - 8080:8080 - EOS - got = File.read("test.yml") - assert_equal expected, got - end -end diff --git a/Formula/ola.rb b/Formula/ola.rb deleted file mode 100644 index 66443d96f7e55..0000000000000 --- a/Formula/ola.rb +++ /dev/null @@ -1,56 +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" - revision 4 - head "https://github.com/OpenLightingProject/ola.git" - - bottle do - sha256 "350f7200c8bf51cc0d71e6088142a14104b4574f1968faa61acf3a0fa56ac267" => :catalina - sha256 "56e441f86ce6fc1a13281ceed57d02083704f68a5cbae19df80ac96e9f685f2e" => :mojave - sha256 "27661bfe7dcc570ba2eee7fc92be48c8bb740daed4aa4e7a4dfda395a141c99f" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "liblo" - depends_on "libmicrohttpd" - depends_on "libusb" - depends_on "numpy" - depends_on "protobuf@3.6" - depends_on "python@3.8" - - # remove in version 0.11 - patch do - url "https://raw.githubusercontent.com/macports/macports-ports/89b697d200c7112839e8f2472cd2ff8dfa6509de/net/ola/files/patch-protobuf3.diff" - sha256 "bbbcb5952b0bdcd01083cef92b72a747d3adbe7ca9e50d865a0c69ae31a8fb4a" - end - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].bin/"python3" - protobuf_pth = Formula["protobuf@3.6"].opt_lib/"python#{xy}/site-packages/homebrew-protobuf.pth" - (buildpath/".brew_home/Library/Python/#{xy}/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 - ] - - ENV["PYTHON"] = Formula["python@3.8"].bin/"python3" - system "autoreconf", "-fvi" - 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 8104b343f83fa..0000000000000 --- a/Formula/olsrd.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Olsrd < Formula - desc "Implementation of the optimized link state routing protocol" - homepage "http://www.olsr.org/" - # olsr's website is "ill" and does not contain the latest release. - # https://github.com/OLSR/olsrd/issues/48 - url "https://github.com/OLSR/olsrd/archive/v0.9.8.tar.gz" - sha256 "ee9e524224e5d5304dcf61f1dc5485c569da09d382934ff85b233be3e24821a3" - - bottle do - cellar :any_skip_relocation - sha256 "95e531e19da3a6e11bf48851691e411d3fb27acf7dc18ccf5bed5c32aa3df4ff" => :catalina - sha256 "5ba1b0c584a2efe1d518be4032432818fca8bbccd3078e23ef7bbb3a9359a73e" => :mojave - sha256 "70402085753c70fb12f3e0f249bf109ac77e0a22d7be890ac6484d7ffce8501f" => :high_sierra - end - - depends_on "coreutils" => :build # needs GNU cp - - def install - ENV.prepend_path "PATH", Formula["coreutils"].libexec/"gnubin" - 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, pipe_output("#{sbin}/olsrd") - end -end diff --git a/Formula/omake.rb b/Formula/omake.rb deleted file mode 100644 index c4eb0a7cb0c4d..0000000000000 --- a/Formula/omake.rb +++ /dev/null @@ -1,48 +0,0 @@ -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/omake-0.10.3.tar.gz" - sha256 "5f42aabdb4088b5c4e86c7a08e235dc7d537fd6b3064852154303bb92f5df70e" - license "GPL-2.0-only" - head "https://github.com/ocaml-omake/omake.git" - - bottle do - sha256 "21933568db9ed765a0bf8c1f04b9f38e5923b6a320372a570499b221fb2afe6d" => :catalina - sha256 "f54a0498316969552424a646ef36b15c567162e689e04203c95a5f8a4536c589" => :mojave - sha256 "587b563698dc29ea2c662ffa58458f45e212f131e3687a37d26d8f379f089588" => :high_sierra - end - - depends_on "ocaml" => [:build, :test] - depends_on "ocaml-findlib" => :test - - conflicts_with "oil", :because => "both install 'osh' binaries" - conflicts_with "etsh", :because => "both install 'osh' binaries" - - def install - system "./configure", "-prefix", prefix - system "make", "install" - end - - test do - # example run adapted from the documentation's "quickstart guide" - system bin/"omake", "--install" - (testpath/"hello_code.c").write <<~EOF - #include - - int main(int argc, char **argv) - { - printf("Hello, world!\\n"); - return 0; - } - EOF - 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 shell_output(testpath/"hello"), "Hello, world!\n" - end -end diff --git a/Formula/omega-rpg.rb b/Formula/omega-rpg.rb deleted file mode 100644 index ddf2017bdb713..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 - cellar :any_skip_relocation - rebuild 1 - sha256 "4ab6747f5c291b26c9ba5b750d98ee6368f42dc35039bf23b2e401a318fb87f6" => :catalina - sha256 "8161e569d07cae64b550fa2f2e795171ca82b65b283cf1e45056b61d12fa71f5" => :mojave - sha256 "0b08d090868aa2b1da56645e74ea87d6a15043c473aba35e56f3fbf2e4b4f4d4" => :high_sierra - 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 78a62706eda9c..0000000000000 --- a/Formula/omega.rb +++ /dev/null @@ -1,31 +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.16/xapian-omega-1.4.16.tar.xz" - sha256 "b4fbeb9922d84af42ba80c0258cd07d103fd7f56c719f147049aa84598557694" - license "GPL-2.0" - - bottle do - sha256 "21def29541640883bd956e842a3370d9ac7dde45bd166add19ca83013f86189f" => :catalina - sha256 "5625e477813a8c7bd720e17416b6dd80faf959f5d7210c3262031ba30c3e1f6e" => :mojave - sha256 "ff44c076ce6ad71238f2293e35ad7c8fed610dfeb5eb15e8a52c0e68d9a0b62d" => :high_sierra - end - - depends_on "pkg-config" => :build - 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 fe7d0982d2c1f..0000000000000 --- a/Formula/omniorb.rb +++ /dev/null @@ -1,36 +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.4/omniORB-4.2.4.tar.bz2" - sha256 "28c01cd0df76c1e81524ca369dc9e6e75f57dc70f30688c99c67926e4bdc7a6f" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "a467b416e7657794555b547ee7caf8f0395e67ecf7501b393d29c620598af535" => :catalina - sha256 "cb9ddb09f1d53ac587cd9eb83e198757350d8d1432cfa8c3f091a3ab78f0c922" => :mojave - sha256 "e7465503bce133c41d4f122107e22559a5e82785f0a3af7747da8ccc44975035" => :high_sierra - end - - depends_on "pkg-config" => :build - - resource "bindings" do - url "https://downloads.sourceforge.net/project/omniorb/omniORBpy/omniORBpy-4.2.4/omniORBpy-4.2.4.tar.bz2" - sha256 "dae8d867559cc934002b756bc01ad7fabbc63f19c2d52f755369989a7a1d27b6" - 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 db98827af332a..0000000000000 --- a/Formula/ompl.rb +++ /dev/null @@ -1,51 +0,0 @@ -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/1.5.0.tar.gz" - sha256 "a7df8611b7823ef44c731f02897571adfc23551e85c6618d926e7720004267a5" - head "https://github.com/ompl/ompl.git" - - bottle do - sha256 "f58fc1ff49aeac3a38aa2629385019ad854e9624b4c6e3a3f9051456494984f9" => :catalina - sha256 "9d66bb50880af5db4f3fc3a1d85140170643518fc72e78ccc6b7b7814261d198" => :mojave - sha256 "b11650509f65bcf45ea04acdd7fe4bebaff22f829c512d73c308e75476f0a94a" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "eigen" - depends_on "flann" - depends_on "ode" - - def install - ENV.cxx11 - args = std_cmake_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", ".", *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.cxx, "test.cpp", "-I#{include}/ompl-1.5", "-L#{lib}", "-lompl", "-o", "test" - system "./test" - end -end diff --git a/Formula/ondir.rb b/Formula/ondir.rb deleted file mode 100644 index a6952768c49a6..0000000000000 --- a/Formula/ondir.rb +++ /dev/null @@ -1,24 +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" - license "GPL-2.0" - head "https://github.com/alecthomas/ondir.git" - - bottle do - cellar :any_skip_relocation - sha256 "99ac333a6908b1862267764e69850b8f21b9ed160e271719393eb82e83becf42" => :catalina - 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 a3fa3bd96e2d2..0000000000000 --- a/Formula/one-ml.rb +++ /dev/null @@ -1,34 +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 - rebuild 1 - sha256 "309111ca64b6c6fa02f1a93dcdc83858d74bc4d7e6a1bcb898443b72e2fa62fc" => :catalina - sha256 "ddd62944bea4f0182b771d405d2255c1d5cdd9e217a2bc00891018de9458b7c2" => :mojave - sha256 "d377a804f2f05d9f48869a6822bb42070be94b225d1d24ee0f4a3e23019532c8" => :high_sierra - 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/onednn.rb b/Formula/onednn.rb deleted file mode 100644 index 7b64fa1d3508b..0000000000000 --- a/Formula/onednn.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Onednn < Formula - desc "Basic building blocks for deep learning applications" - homepage "https://01.org/oneDNN" - url "https://github.com/oneapi-src/onednn/archive/v1.5.1.tar.gz" - sha256 "aef4d2a726f76f5b98902491a1a4ac69954039aa8e5a1d67ef6ce58ed00e23a6" - head "https://github.com/oneapi-src/onednn.git" - - bottle do - cellar :any - sha256 "bcb6c748b97370fea41fb730f939e5cd33bd2b9d486fe997dd5fcb948786835e" => :catalina - sha256 "a23e16f86f51179216af505fcb90915e4052d5b88a2ccbc38d3e28a9049fe967" => :mojave - sha256 "f0f53d3f8d772f451cec3c9da678acdc9a0f3f4202e5ebba29a10272cebeafa8" => :high_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/onefetch.rb b/Formula/onefetch.rb deleted file mode 100644 index 3716f926557ee..0000000000000 --- a/Formula/onefetch.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Onefetch < Formula - desc "Git repository summary on your terminal" - homepage "https://github.com/o2sh/onefetch" - url "https://github.com/o2sh/onefetch/archive/v2.2.0.tar.gz" - sha256 "99e00a760670ac3e8653762fe690f37ce8214470d2887c37aeb778c2c1344734" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "54ce778668b9953a5c683ba12045998a2a4ae1291a0a2f0e5c4a51aba63e7bc3" => :catalina - sha256 "4937b9ddd81bf626dd5b5a0b6ec2d289c74ef125a0e5bb0c87641e343d687412" => :mojave - sha256 "eca2bbb2a918e3ffdf41de1e3703941397265c618a31793a29fba4a37f887427" => :high_sierra - end - - depends_on "rust" => :build - - uses_from_macos "zlib" - - def install - system "cargo", "install", *std_cargo_args - end - - test do - system "#{bin}/onefetch", "--help" - assert_match "onefetch " + version.to_s, shell_output("#{bin}/onefetch -V").chomp - system "git init && echo \"puts 'Hello, world'\" > main.rb && git add main.rb && git commit -m \"First commit\"" - assert_match /Language:.*Ruby/, shell_output("#{bin}/onefetch").chomp - end -end diff --git a/Formula/onetime.rb b/Formula/onetime.rb deleted file mode 100644 index 9fcd3224f7103..0000000000000 --- a/Formula/onetime.rb +++ /dev/null @@ -1,43 +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 "b55bb2391f7518b4139e2e57f851d0805329191be23630a6cf4d2a154a0e416c" => :catalina - 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 e0084e927845f..0000000000000 --- a/Formula/oniguruma.rb +++ /dev/null @@ -1,30 +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.5_rev1/onig-6.9.5-rev1.tar.gz" - version "6.9.5-rev1" - sha256 "d33c849d1672af227944878cefe0a8fcf26fc62bedba32aa517f2f63c314a99e" - head "https://github.com/kkos/oniguruma.git" - - bottle do - cellar :any - sha256 "15241cccbb727a11200b6eb7398500795057bb065784a3af6ec9c98cd6ce7686" => :catalina - sha256 "40fd839d421fba70280c0b6f879c4a5889205e4ba2292a568df935dc410fecb2" => :mojave - sha256 "b522dc58b0b37db5102213150acd1ea740c201d489d65d6a3b63cced744acf6c" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-vfi" - 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/onioncat.rb b/Formula/onioncat.rb deleted file mode 100644 index 19f3dd0507baf..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/0.2.x/onioncat-0.2.8.tar.gz" - sha256 "fed003e151458ef2b6964e957266afbbb493e048cb54a46b948edb70df171d62" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "4ef31c45ecf525bfc963069d8020dfd8d63ccad9b779ad1efa4ea4c6ae8832db" => :catalina - sha256 "f69495ac60b021b3d84b8abd2f74152d93bba7bbb59a5c0a28f0edcaf7149c0c" => :mojave - sha256 "62bfd76828320dd38f8081086ebdfed307f112f88019a348c39d43b53882893d" => :high_sierra - 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/onnxruntime.rb b/Formula/onnxruntime.rb deleted file mode 100644 index 81f45a5dfaabf..0000000000000 --- a/Formula/onnxruntime.rb +++ /dev/null @@ -1,49 +0,0 @@ -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.3.1", - :revision => "530117cfdb230228c3429ab39d1b7cf1f68c0567" - license "MIT" - - bottle do - cellar :any - sha256 "8523ac42679c8d4ab9b7224468020781a2654abad851d7e95a3d570cd29456c2" => :catalina - sha256 "c9f06b98661dfba06e3bdebc1743274f1a77c0af78f3f7b5290c01f900e5ee2d" => :mojave - sha256 "21055d5a282b4c9501d3623a6d3b5dae04954e6cf925fbdc93d4d9723d634e7d" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "python@3.8" => :build - - def install - cmake_args = %W[ - -Donnxruntime_RUN_ONNX_TESTS=OFF - -Donnxruntime_GENERATE_TEST_REPORTS=OFF - -DPYTHON_EXECUTABLE=#{Formula["python@3.8"].opt_bin}/python3 - -Donnxruntime_BUILD_SHARED_LIB=ON - -Donnxruntime_BUILD_UNIT_TESTS=OFF - -DCMAKE_BUILD_TYPE=Release - ] - - mkdir "build" do - system "cmake", "../cmake", *std_cmake_args, *cmake_args - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() - { - printf("%s\\n", OrtGetApiBase()->GetVersionString()); - return 0; - } - EOS - system ENV.cc, "-I#{include}", "-L#{lib}", "-lonnxruntime", - testpath/"test.c", "-o", testpath/"test" - assert_equal version, shell_output("./test").strip - end -end diff --git a/Formula/onscripter.rb b/Formula/onscripter.rb deleted file mode 100644 index 2e74efa1abaa7..0000000000000 --- a/Formula/onscripter.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Onscripter < Formula - desc "NScripter-compatible visual novel engine" - homepage "https://onscripter.osdn.jp/" - url "https://onscripter.osdn.jp/onscripter-20200621.tar.gz" - sha256 "5c8db8c3f27ead7ba26bd2230082fabca10223111ff80dfbed311903e1593e8f" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "cc893d1d1872b61b966141887a64729c283b80f6f5bf7621135a0c57e0333485" => :catalina - sha256 "a35223c03996e4992917fe076bbc0557ea7c521b632130d1fe2b2d2de8b01906" => :mojave - sha256 "6f45ea9a469c617972933f3b871f860f2a1ab2f1ff2c3e4f4fdd0853df9759f6" => :high_sierra - 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" - - 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 f66ed9ad05c47..0000000000000 --- a/Formula/ooniprobe.rb +++ /dev/null @@ -1,284 +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" - revision 3 - - bottle do - cellar :any - sha256 "9a5d8c8b6bda3609642113631ba7c39b2cbf4fc27b09bd4b2fccc832befdd3e5" => :catalina - sha256 "e8e120b4342f22d48efbcfa45cde2faa28c9edd045121373f3b2ba8349e1d6fc" => :mojave - sha256 "3e13549c0175e9f3167f24526ed0c45bd7096b84c0360042654be9b4dff980f7" => :high_sierra - end - - depends_on "geoip" - depends_on "libdnet" - depends_on "libyaml" - depends_on :macos # Due to Python 2 (Unmaintained, use https://github.com/ooni/probe-cli once out of pre-release) - depends_on "openssl@1.1" - 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/c1/a9/86bfedaf41ca590747b4c9075bc470d0b2ec44fb5db5d378bc61447b3b6b/asn1crypto-1.2.0.tar.gz" - sha256 "87620880a477123e01177a1f73d0f327210b43a3cdbd714efcd2fa49a8d7b384" - 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/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz" - sha256 "e6347742ac8f35ded4a46ff835c60e68c22a536a8ae5c4422966d06946b6d4c6" - 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 - - ENV.append "CPPFLAGS", "-I#{MacOS.sdk_path}/usr/include/ffi" if MacOS.sdk_path_if_needed - - 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 044fe83545832..0000000000000 --- a/Formula/opa.rb +++ /dev/null @@ -1,31 +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.21.0.tar.gz" - sha256 "dde2c49e1d133216da8ce33b0d5276a00dfea18535ed91ca3b3fad514ec0175d" - license "Apache-2.0" - head "https://github.com/open-policy-agent/opa.git" - - bottle do - cellar :any_skip_relocation - sha256 "ad97bf77534ea5b72012148ec96e08700b1762b89f1222738e5c51f43c74f5d8" => :catalina - sha256 "8ef806fc00001368ac78a50df08024c0b52d76438b1f7963ab9d71e02c045b4f" => :mojave - sha256 "271f1584b341382fd5f9b5f601707d4fcb0efe96b66d82bf958221f091a287a9" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"opa", "-trimpath", "-ldflags", - "-X github.com/open-policy-agent/opa/version.Version=#{version}" - system "./build/gen-man.sh", "man1" - man.install "man1" - prefix.install_metafiles - 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 6680e2979c616..0000000000000 --- a/Formula/opam.rb +++ /dev/null @@ -1,44 +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.7/opam-full-2.0.7.tar.gz" - sha256 "9c0dac1094ed624158fff13000cdfa8edbc96798d32b9fab40b0b5330f9490a2" - head "https://github.com/ocaml/opam.git" - - bottle do - cellar :any_skip_relocation - sha256 "f159a779ee6521c95c06b382fbea72bd1cedf6463d9be8bc85f5cfac4ef16b0d" => :catalina - sha256 "fec93e54a1a635c7d2b5ca4acfbd051665a606f6760b5336b846b23ca8663e23" => :mojave - sha256 "5fef1c5aca812af337373a34b9a97e2f0bd7bf3f22a36c3d184af73a4c2ea7f7" => :high_sierra - end - - depends_on "ocaml" => [:build, :test] - - uses_from_macos "unzip" - - def install - ENV.deparallelize - - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "lib-ext" - 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", "--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 4d75c19e167a7..0000000000000 --- a/Formula/open-babel.rb +++ /dev/null @@ -1,41 +0,0 @@ -class OpenBabel < Formula - desc "Chemical toolbox" - homepage "https://openbabel.org/" - url "https://github.com/openbabel/openbabel/archive/openbabel-3-1-1.tar.gz" - version "3.1.1" - sha256 "c97023ac6300d26176c97d4ef39957f06e68848d64f1a04b0b284ccff2744f02" - license "GPL-2.0" - head "https://github.com/openbabel/openbabel.git" - - bottle do - sha256 "997886c087d6c342ea47649bb6de0e50fa807a2116aaad2119490b8921b85edf" => :catalina - sha256 "d8bf12ee10f070e6ca4396fa37d02da80f5449f5c3927a0050ffbb028331a01a" => :mojave - sha256 "035d300440fbfaaf20939137db63e8f78246983a16db563dcd1b66f4980685f4" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "rapidjson" => :build - depends_on "swig" => :build - depends_on "cairo" - depends_on "eigen" - depends_on "python@3.8" - - def install - args = std_cmake_args + %W[ - -DRUN_SWIG=ON - -DPYTHON_BINDINGS=ON - -DPYTHON_EXECUTABLE=#{Formula["python@3.8"].opt_bin}/python3 - ] - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - end - - test do - system "#{bin}/obabel", "-:'C1=CC=CC=C1Br'", "-omol" - end -end diff --git a/Formula/open-completion.rb b/Formula/open-completion.rb deleted file mode 100644 index bf2fd828cd214..0000000000000 --- a/Formula/open-completion.rb +++ /dev/null @@ -1,19 +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.4.tar.gz" - sha256 "23a8a30f9f65f5b3eb60aa6f2d1c60d7d0a858ea753a58f31ddb51d40e16b668" - license "MIT" - 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("bash -c 'source #{bash_completion}/open && complete -p open'") - end -end diff --git a/Formula/open-image-denoise.rb b/Formula/open-image-denoise.rb deleted file mode 100644 index ec145177195df..0000000000000 --- a/Formula/open-image-denoise.rb +++ /dev/null @@ -1,41 +0,0 @@ -class OpenImageDenoise < Formula - desc "High-performance denoising library for ray tracing" - homepage "https://openimagedenoise.github.io/" - url "https://github.com/OpenImageDenoise/oidn/releases/download/v1.2.1/oidn-1.2.1.src.tar.gz" - sha256 "bc75d28f472628c80768435e800a28fdb18a5d058c16dac98c00f9aae8c536e6" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "5c36d9284a8e1d31ca9769c14650816126e43302acf5c8be3ee66d7f75f00ed7" => :catalina - sha256 "defb1bb5d21e21f0fd1487b632568cb52daa581ecd8204cdc2a31861b1cc2e1d" => :mojave - sha256 "6c04bd559262a2b15f03ca3e62291929d68184a63144035cca9877d1f0c2d931" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "ispc" => :build - # clang: error: unknown argument: '-fopenmp-simd' - # https://github.com/OpenImageDenoise/oidn/issues/35 - depends_on :macos => :high_sierra - depends_on "tbb" - - def install - mkdir "build" do - system "cmake", *std_cmake_args, ".." - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() { - OIDNDevice device = oidnNewDevice(OIDN_DEVICE_TYPE_DEFAULT); - oidnCommitDevice(device); - return oidnGetDeviceError(device, 0); - } - EOS - system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-lOpenImageDenoise" - system "./a.out" - end -end diff --git a/Formula/open-jtalk.rb b/Formula/open-jtalk.rb deleted file mode 100644 index 274dcaa681926..0000000000000 --- a/Formula/open-jtalk.rb +++ /dev/null @@ -1,59 +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.11/open_jtalk-1.11.tar.gz" - sha256 "20fdc6aeb6c757866034abc175820573db43e4284707c866fcd02c8ec18de71f" - - bottle do - cellar :any_skip_relocation - sha256 "0a251febe3197994355ab780ce02aa45264c7d148b0f1b0dfd1a80a7f7aa9937" => :catalina - sha256 "bed36f972fe3dc3d5f286eff5c1b1605a1bcfae6cc755b7b2aee57fc497f7913" => :mojave - sha256 "cd50656bb81db4528b82b844c773440d6cdfec63e545a64002a473da05a7eb18" => :high_sierra - sha256 "b015d173b77980d0da3a8eedad02fdff95ac919c790917ba9cb197db91207235" => :sierra - 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/open-mesh.rb b/Formula/open-mesh.rb deleted file mode 100644 index cbf3f38987b26..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/8.1/OpenMesh-8.1.tar.bz2" - sha256 "9bc43a3201ba27ed63de66c4c09e23746272882c37a3451e71f0cf956f9be076" - head "https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh.git" - - bottle do - cellar :any - sha256 "40eabd6160d88b74bb3298b42dfce249c327bee9a596b5911a4015462b457dfb" => :catalina - sha256 "3c523efbed147ef236ba22b7fdfc8fddae883b4ce7b9f03e970af199416adbe5" => :mojave - sha256 "a1b6514505ea011f01e8a61fd20dec9f31b900a42e8581e24a23beca738dc5f3" => :high_sierra - 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 - --std=c++11 - ] - 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 82af9e6b47a2e..0000000000000 --- a/Formula/open-mpi.rb +++ /dev/null @@ -1,107 +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.4.tar.bz2" - sha256 "47e24eb2223fe5d24438658958a313b6b7a55bb281563542e1afc9dec4a31ac4" - revision 1 - - bottle do - sha256 "d0fff667ea8857e586804896e548941e21b164a6967ef5b5d4e6f19023e27370" => :catalina - sha256 "2a7c4fccb0807f159fa0f5b4021214385e7a38cd573a3f0ae8ea59aa96734e58" => :mojave - sha256 "6ca3b12ced550f1ecf9ba0440a86474d1415691cd14e84e949466c82732a72f2" => :high_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 - - depends_on "gcc" - depends_on "hwloc" - depends_on "libevent" - - conflicts_with "mpich", :because => "both install MPI compiler wrappers" - - def install - # otherwise libmpi_usempi_ignore_tkr gets built as a static library - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version - - # Avoid references to the Homebrew shims directory - %w[ - ompi/tools/ompi_info/param.c - orte/tools/orte-info/param.c - oshmem/tools/oshmem_info/param.c - opal/mca/pmix/pmix3x/pmix/src/tools/pmix_info/support.c - ].each do |fname| - inreplace fname, /(OPAL|PMIX)_CC_ABSOLUTE/, "\"#{ENV.cc}\"" - end - - %w[ - ompi/tools/ompi_info/param.c - oshmem/tools/oshmem_info/param.c - ].each do |fname| - inreplace fname, "OMPI_CXX_ABSOLUTE", "\"#{ENV.cxx}\"" - end - - 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? - - 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 2303a8cd82ab2..0000000000000 --- a/Formula/open-ocd.rb +++ /dev/null @@ -1,44 +0,0 @@ -class OpenOcd < Formula - desc "On-chip debugging, in-system programming and boundary-scan testing" - homepage "http://openocd.org/" - url "https://downloads.sourceforge.net/project/openocd/openocd/0.10.0/openocd-0.10.0.tar.bz2" - sha256 "7312e7d680752ac088b8b8f2b5ba3ff0d30e0a78139531847be4b75c101316ae" - license "GPL-2.0" - - bottle do - rebuild 2 - sha256 "73738a0c3bfffa98beea25c441d5eddfd743dc5c7c79418685519354975bb840" => :catalina - 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 41e8b46779a52..0000000000000 --- a/Formula/open-scene-graph.rb +++ /dev/null @@ -1,83 +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.5.tar.gz" - sha256 "aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12" - head "https://github.com/openscenegraph/OpenSceneGraph.git" - - bottle do - sha256 "a5af0114a8096d9bdc63682eb7a913b1a72b6f0d6cc20f526c0734b8111b7499" => :catalina - sha256 "35070bb7f3ac7460d14df196d7d0e9110fbdf84e61fa10b0ed2613d697310aa0" => :mojave - sha256 "9bbb98357b02428b90ffd8eadb5da85afcc2360aee2c8de8820fbed241f94a1d" => :high_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-turbo" - depends_on "sdl" - - # patch necessary to ensure support for gtkglext-quartz - # filed as an issue to the developers https://github.com/openscenegraph/OpenSceneGraph/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 - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra || MacOS.version == :el_capitan - - args = std_cmake_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_TIFF=ON - -DCMAKE_CXX_FLAGS=-Wno-error=narrowing - -DCMAKE_OSX_ARCHITECTURES=x86_64 - -DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio - -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 f6bf6b6a03088..0000000000000 --- a/Formula/open-sp.rb +++ /dev/null @@ -1,47 +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 "ed66b34bcf33e9b7908ec466dd66db245b1a2556c2778705d14c99f73f5038f0" => :catalina - 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 58081c37e7cdc..0000000000000 --- a/Formula/open-tyrian.rb +++ /dev/null @@ -1,44 +0,0 @@ -class OpenTyrian < Formula - desc "Open-source port of Tyrian" - homepage "https://github.com/opentyrian/opentyrian" - url "https://www.camanis.net/opentyrian/releases/opentyrian-2.1.20130907-src.tar.gz" - sha256 "f54b6b3cedcefa187c9f605d6164aae29ec46a731a6df30d351af4c008dee45f" - license "GPL-2.0" - head "https://github.com/opentyrian/opentyrian.git" - - bottle do - rebuild 1 - sha256 "5e66ea919c426dcce63be043164439b258a22a906ece3b3b1ec1e41147ac0b76" => :catalina - sha256 "f49d2282ee86031f1c1442b6d1eb2fb2753286cb89207b63f03ee98e51e9221f" => :mojave - sha256 "541d2f9a00f4a56b9464c44994c94da0afeab340c1b3809b61a0c437fda69b7f" => :high_sierra - 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 a52c0b014259f..0000000000000 --- a/Formula/open-zwave.rb +++ /dev/null @@ -1,40 +0,0 @@ -class OpenZwave < Formula - desc "Library that interfaces with selected Z-Wave PC controllers" - homepage "http://www.openzwave.com/" - url "http://old.openzwave.com/downloads/openzwave-1.6.1080.tar.gz" - sha256 "61c4b1857bb80c67b06f83bbeb956275184e30e12401984587dfe79070218d3c" - license "LGPL-3.0" - - bottle do - sha256 "28b55791a9d9ab0a1c772e11ba7459d42b5e9cbed50d9e1db4af154b2ad84d5e" => :catalina - sha256 "7e79dc03f657d9d92305f036d6118df60b56e2ddcbf8506234aa8b73dd9f4d31" => :mojave - sha256 "e3bc4eeb04ec86a43d3a63f263db9aa28090123822de81869c44dcef4af08f8d" => :high_sierra - end - - depends_on "doxygen" => :build - depends_on "pkg-config" => :build - - def install - ENV["BUILD"] = "release" - ENV["PREFIX"] = prefix - - # The following is needed to bypass an issue that will not be fixed upstream - ENV["pkgconfigdir"] = "#{lib}/pkgconfig" - - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() - { - return OpenZWave::Manager::getVersionAsString().empty(); - } - EOS - system ENV.cxx, "test.cpp", "-I#{include}/openzwave", - "-L#{lib}", "-lopenzwave", "-o", "test" - system "./test" - end -end diff --git a/Formula/openal-soft.rb b/Formula/openal-soft.rb deleted file mode 100644 index 2da36f3f852e1..0000000000000 --- a/Formula/openal-soft.rb +++ /dev/null @@ -1,47 +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.20.1.tar.bz2" - sha256 "b6ceb051325732c23f5c8b6d37dbd89534517e6439a87e970882b447c3025d6d" - head "https://github.com/kcat/openal-soft.git" - - bottle do - cellar :any - sha256 "b62337bb563eaaacec777b6861de4b6ba1d33ad8e19418b4b5a0cdfb37473fcf" => :catalina - sha256 "f6448e18550e62cd283bebe24e98f6253c5c18758aeb7c44f3816f1840082b25" => :mojave - sha256 "26dbb8819cd991e4a901f3f90f0cc2339c9e4220330329dcf7caa37b14d048d7" => :high_sierra - end - - keg_only :shadowed_by_macos, "macOS provides OpenAL.framework" - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - - 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 fb85ec6a9b8ea..0000000000000 --- a/Formula/openapi-generator.rb +++ /dev/null @@ -1,53 +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/4.3.1/openapi-generator-cli-4.3.1.jar" - sha256 "f438cd16bc1db28d3363e314cefb59384f252361db9cb1a04a322e7eb5b331c1" - license "Apache-2.0" - - head do - url "https://github.com/OpenAPITools/openapi-generator.git" - - depends_on "maven" => :build - end - - bottle :unneeded - - 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/"openapi-generator").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" $JAVA_OPTS -jar "#{libexec}/openapi-generator-cli.jar" "$@" - EOS - 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", "-o", "./" - end -end diff --git a/Formula/openblas.rb b/Formula/openblas.rb deleted file mode 100644 index e16ed7e738a30..0000000000000 --- a/Formula/openblas.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Openblas < Formula - desc "Optimized BLAS library" - homepage "https://www.openblas.net/" - url "https://github.com/xianyi/OpenBLAS/archive/v0.3.10.tar.gz" - sha256 "0484d275f87e9b8641ff2eecaa9df2830cbe276ac79ad80494822721de6e1693" - license "BSD-3-Clause" - revision 1 - head "https://github.com/xianyi/OpenBLAS.git", :branch => "develop" - - bottle do - cellar :any - sha256 "dcffce6b09f1710f3b620122c67a31aea99073ef036a9abf2e8261a999c5cbb5" => :catalina - sha256 "cf345fcf861d1a699832126476a7385b9cc212dc5b1b985749e219481473e836" => :mojave - sha256 "09e6222e227fccb3d1a86aa0b0ac77fec3e512ba9266ecf72f235c58c6795009" => :high_sierra - end - - keg_only :shadowed_by_macos, "macOS provides BLAS in Accelerate.framework" - - depends_on "gcc" # for gfortran - fails_with :clang - - def install - ENV["DYNAMIC_ARCH"] = "1" - ENV["USE_OPENMP"] = "1" - ENV["NO_AVX512"] = "1" - - # 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 df29a202c8340..0000000000000 --- a/Formula/opencascade.rb +++ /dev/null @@ -1,50 +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_4_0;sf=tgz" - version "7.4.0" - sha256 "655da7717dac3460a22a6a7ee68860c1da56da2fec9c380d8ac0ac0349d67676" - revision 1 - - bottle do - cellar :any - sha256 "c40f93c6b10493d4bba40d037128e7babd92beeb7881f21e79c307d8f5691be7" => :catalina - sha256 "6db3f5251bd8db10fcc4503f1be714d1689544013ddbd25d24c1f59f72cce80a" => :mojave - sha256 "9ea4dc36a4e19c022c7fdd40250e8272cfea1817ec516573a1d0994c7b62e797" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "rapidjson" => :build - depends_on "freeimage" - depends_on "freetype" - depends_on "tbb" - - def install - system "cmake", ".", - "-DUSE_FREEIMAGE=ON", - "-DUSE_RAPIDJSON=ON", - "-DUSE_TBB=ON", - "-DINSTALL_DOC_Overview=ON", - "-D3RDPARTY_FREEIMAGE_DIR=#{Formula["freeimage"].opt_prefix}", - "-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=#{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 50a9a0434274d..0000000000000 --- a/Formula/opencbm.rb +++ /dev/null @@ -1,46 +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 "0fcf92ca18ebde6b9d431dfd1ab8667ca93ee59c53f85e818eed9f0b8ba78306" => :catalina - 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 83517faf61271..0000000000000 --- a/Formula/opencc.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Opencc < Formula - desc "Simplified-traditional Chinese conversion tool" - homepage "https://github.com/BYVoid/OpenCC" - url "https://github.com/BYVoid/OpenCC/archive/ver.1.1.1.tar.gz" - sha256 "2d4987dc84275f252d47bc6d8c81b452f6a6e82caa26f284c854a8153ccf5933" - license "Apache-2.0" - - bottle do - sha256 "dddf951ae0363e1e92c34d3d0087233d8d07053682557fd1bbed457aa98c677f" => :catalina - sha256 "0503b49e5fcec9652ea10a3ab14d182babf48aae43644c68b243b94c2a781182" => :mojave - sha256 "d48b56dec1d0f6f0fe0eb2690f8ac152e8dc13971c40649fe5e6ba810efdec17" => :high_sierra - end - - depends_on "cmake" => :build - - 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 9c98604d2b5a6..0000000000000 --- a/Formula/openclonk.rb +++ /dev/null @@ -1,41 +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 "210a3ff7a897e476db83eff28e4dad3ea6e56d0fd1df0161a63bf34214fd71dc" => :catalina - 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" - - 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 ec2594784f134..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.9.0/OpenCoarrays-2.9.0.tar.gz" - sha256 "0efaf5946955e449c4ee84036c950841dbc5f2546e0e20e7422fd70605720333" - license "BSD-3-Clause" - head "https://github.com/sourceryinstitute/opencoarrays.git" - - bottle do - cellar :any - sha256 "48bd64ed964c65972ee81dd6f9998e9d53ee4c14c90e2f887c0f2c63983ae79e" => :catalina - sha256 "e73c0a505511aca5d03122dc2323229fdbf1f962ec214c45b6900b5524c1d41b" => :mojave - sha256 "8e5787bb25f0c0b61c3260b264bb964a3dcf2d393f9ff1a4094e720b2769f6ad" => :high_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 36f4e1fd1e37e..0000000000000 --- a/Formula/opencolorio.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Opencolorio < Formula - desc "Color management solution geared towards motion picture production" - homepage "https://opencolorio.org/" - url "https://github.com/imageworks/OpenColorIO/archive/v1.1.1.tar.gz" - sha256 "c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8" - revision 2 - head "https://github.com/imageworks/OpenColorIO.git" - - bottle do - cellar :any - sha256 "d47e35411a692bf51624ecd4958d48a24788d1e1ec0d0ceefa7b86120d7d3a0d" => :catalina - sha256 "8f8c1e02c9f4006463476b5dc870c3decc945e3df78fad43cfe93c4b5d1ec35e" => :mojave - sha256 "be544d7630cd26c9694474393de260c0114435b3bb1a7dd85b0379f49673c66b" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "little-cms2" - depends_on "python@3.8" - - def install - args = std_cmake_args + %W[ - -DCMAKE_VERBOSE_MAKEFILE=OFF - -DPYTHON=python3 - -DPYTHON_EXECUTABLE=#{Formula["python@3.8"].opt_bin}/"python3" - ] - - 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: - 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) - end -end diff --git a/Formula/openconnect.rb b/Formula/openconnect.rb deleted file mode 100644 index 1eb3b8cbe34ac..0000000000000 --- a/Formula/openconnect.rb +++ /dev/null @@ -1,54 +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.10.tar.gz" - mirror "https://fossies.org/linux/privat/openconnect-8.10.tar.gz" - sha256 "30e64c6eca4be47bbf1d61f53dc003c6621213738d4ea7a35e5cf1ac2de9bab1" - - bottle do - sha256 "b4144970e695adc8f049319408cd431c96eb2ca4714feb903e0f01f3926dfd1f" => :catalina - sha256 "5f4d9cb8a0a39983205bad4e1e6d7a2ae586f0725571fa83eac6421b8d6f4b9a" => :mojave - sha256 "4d306766b4a334c7dcc8497b0684005c9011cd8913131b25bae2f56f3b3217d1" => :high_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" - depends_on "stoken" - - resource "vpnc-script" do - url "http://git.infradead.org/users/dwmw2/vpnc-scripts.git/blob_plain/c0122e891f7e033f35f047dad963702199d5cb9e:/vpnc-script" - sha256 "3ddd9d6b46e92d76e6e26d89447e3a82d797ecda125d31792f14c203742dea0f" - 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 "POST https://localhost/", pipe_output("#{bin}/openconnect localhost 2>&1") - end -end diff --git a/Formula/opencore-amr.rb b/Formula/opencore-amr.rb deleted file mode 100644 index bd102fffc24f5..0000000000000 --- a/Formula/opencore-amr.rb +++ /dev/null @@ -1,22 +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" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "424d294d95aa7539842f1c2402a0be6ba558fa22680a0f5681998b12cf45a152" => :catalina - 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 5af597010424a..0000000000000 --- a/Formula/opencsg.rb +++ /dev/null @@ -1,50 +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 "7f78e244d208d395aaf59f04b491148d328af66197c60bf98abb4dadae86d7af" => :catalina - 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 26bc03ac8400e..0000000000000 --- a/Formula/opencv.rb +++ /dev/null @@ -1,123 +0,0 @@ -class Opencv < Formula - desc "Open source computer vision library" - homepage "https://opencv.org/" - url "https://github.com/opencv/opencv/archive/4.3.0.tar.gz" - sha256 "68bc40cbf47fdb8ee73dfaf0d9c6494cd095cf6294d99de445ab64cf853d278a" - revision 5 - - bottle do - sha256 "0d457dd4616dd0f7788ff299c39274aa54a9477fe3b290430576408f1ac47cb5" => :catalina - sha256 "b8b104f25eb19a2b26b681bee7c791d9afa2a5648e65210bc0766df363f5fc34" => :mojave - sha256 "c49eeb4793c2a85efe9cacb691b1d54298858c7f486d4b97ee95c8d8a910ab16" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "ceres-solver" - depends_on "eigen" - depends_on "ffmpeg" - depends_on "glog" - depends_on "harfbuzz" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "numpy" - depends_on "openblas" - depends_on "openexr" - depends_on "protobuf" - depends_on "python@3.8" - depends_on "tbb" - depends_on "webp" - - resource "contrib" do - url "https://github.com/opencv/opencv_contrib/archive/4.3.0.tar.gz" - sha256 "acb8e89c9e7d1174e63e40532125b60d248b00e517255a98a419d415228c6a55" - end - - def install - ENV.cxx11 - - resource("contrib").stage buildpath/"opencv_contrib" - - # Avoid Accelerate.framework - ENV["OpenBLAS_HOME"] = Formula["openblas"].opt_prefix - - # Reset PYTHONPATH, workaround for https://github.com/Homebrew/homebrew-science/pull/4885 - ENV.delete("PYTHONPATH") - - 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_PROTOBUF=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_QT=OFF - -DWITH_TBB=ON - -DWITH_VTK=OFF - -DBUILD_opencv_python2=OFF - -DBUILD_opencv_python3=ON - -DPYTHON3_EXECUTABLE=#{Formula["python@3.8"].opt_bin}/python3 - ] - - # The compiler on older Mac OS cannot build some OpenCV files using AVX2 - # extensions, failing with errors such as - # "error: use of undeclared identifier '_mm256_cvtps_ph'" - # Work around this by not trying to build AVX2 code. - args << "-DCPU_DISPATCH=SSE4_1,SSE4_2,AVX" if MacOS.version <= :yosemite - - args << "-DENABLE_AVX=OFF" << "-DENABLE_AVX2=OFF" - args << "-DENABLE_SSE41=OFF" << "-DENABLE_SSE42=OFF" unless MacOS.version.requires_sse42? - - mkdir "build" do - system "cmake", "..", *args - inreplace "modules/core/version_string.inc", "#{HOMEBREW_SHIMS_PATH}/mac/super/", "" - system "make" - system "make", "install" - system "make", "clean" - system "cmake", "..", "-DBUILD_SHARED_LIBS=OFF", *args - inreplace "modules/core/version_string.inc", "#{HOMEBREW_SHIMS_PATH}/mac/super/", "" - 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 - - output = shell_output(Formula["python@3.8"].opt_bin/"python3 -c 'import cv2; print(cv2.__version__)'") - assert_equal version.to_s, output.chomp - end -end diff --git a/Formula/opencv@2.rb b/Formula/opencv@2.rb deleted file mode 100644 index c7d101f8f86ee..0000000000000 --- a/Formula/opencv@2.rb +++ /dev/null @@ -1,91 +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 11 - - bottle do - sha256 "180d6d38c261fbb8d8a874fe21018c0ad1fa9e9a526e9234ff5645affe04512f" => :catalina - sha256 "9beadffa6f23d7c7ea58a501d88e8512a67ac4f0848b8a9920209fc6430ab0ed" => :mojave - sha256 "b90a2e7e26ef9d18a2f87a954a786a6bc983047fbcae2280b662df66e254e76c" => :high_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 :macos # Due to Python 2 - depends_on "numpy@1.16" - depends_on "openexr" - - def install - ENV.cxx11 - 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 - -DENABLE_SSSE3=ON - ] - - 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}" - - args << "-DENABLE_SSE41=ON" << "-DENABLE_SSE42=ON" if MacOS.version.requires_sse42? - - mkdir "build" do - system "cmake", "..", *args - inreplace "modules/core/version_string.inc", "#{HOMEBREW_SHIMS_PATH}/mac/super/", "" - 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/opencv@3.rb b/Formula/opencv@3.rb deleted file mode 100644 index 289ac2c42b029..0000000000000 --- a/Formula/opencv@3.rb +++ /dev/null @@ -1,110 +0,0 @@ -class OpencvAT3 < Formula - desc "Open source computer vision library" - homepage "https://opencv.org/" - url "https://github.com/opencv/opencv/archive/3.4.10.tar.gz" - sha256 "1ed6f5b02a7baf14daca04817566e7c98ec668cec381e0edf534fa49f10f58a2" - revision 4 - - bottle do - sha256 "890dcb6beccc060f02a7d5f594e604ac29cb10b7c5a471dd5cc2f8cdea026d5d" => :catalina - sha256 "36ed82e801b3e60ddf08592d28f03add4acbab5b26630a3856ebbafc137eaeb8" => :mojave - sha256 "3f48062f043a2208fde3360abb0cbb373674b2768218cc49aed55637fad2b5dc" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "ceres-solver" - depends_on "eigen" - depends_on "ffmpeg" - depends_on "gflags" - depends_on "glog" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "numpy" - depends_on "openexr" - depends_on "python@3.8" - depends_on "tbb" - - resource "contrib" do - url "https://github.com/opencv/opencv_contrib/archive/3.4.10.tar.gz" - sha256 "45be02486feaa5c66efc497c463a9b9d6671aa4a125ca8ea2467b8c81201971c" - end - - def install - ENV.cxx11 - - resource("contrib").stage buildpath/"opencv_contrib" - - # Reset PYTHONPATH, workaround for https://github.com/Homebrew/homebrew-science/pull/4885 - ENV.delete("PYTHONPATH") - - 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 - -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=OFF - -DBUILD_opencv_python3=ON - -DPYTHON3_EXECUTABLE=#{Formula["python@3.8"].opt_bin}/python3 - ] - - args << "-DENABLE_AVX=OFF" << "-DENABLE_AVX2=OFF" - args << "-DENABLE_SSE41=OFF" << "-DENABLE_SSE42=OFF" unless MacOS.version.requires_sse42? - - mkdir "build" do - system "cmake", "..", *args - inreplace "modules/core/version_string.inc", "#{HOMEBREW_SHIMS_PATH}/mac/super/", "" - system "make" - system "make", "install" - system "make", "clean" - system "cmake", "..", "-DBUILD_SHARED_LIBS=OFF", *args - inreplace "modules/core/version_string.inc", "#{HOMEBREW_SHIMS_PATH}/mac/super/", "" - 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, "test.cpp", "-I#{include}", "-L#{lib}", "-o", "test" - assert_equal `./test`.strip, version.to_s - - py3_version = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV["PYTHONPATH"] = lib/"python#{py3_version}/site-packages" - output = shell_output(Formula["python@3.8"].opt_bin/"python3 -c 'import cv2; print(cv2.__version__)'") - assert_equal version.to_s, output.chomp - end -end diff --git a/Formula/opendbx.rb b/Formula/opendbx.rb deleted file mode 100644 index 6499691bee76f..0000000000000 --- a/Formula/opendbx.rb +++ /dev/null @@ -1,42 +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 2 - - bottle do - sha256 "9a95027d4121667ec569d3aac52ec540a0aacd393e584b503aae73f35808ab0d" => :catalina - sha256 "9f4ed6175131681d7aa68a5cc62a3fab535f428f05982873c756d534ce4a71f9" => :mojave - sha256 "8acc7893f16018ca7946d5a087459f7defbaa3fa3a17759d9eec5eaaffd27458" => :high_sierra - sha256 "4adab552ad5d1fca471ba71734b784de2d6005717cef6908c0e8366b217c4dd1" => :sierra - 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 3c77e9d89a68a..0000000000000 --- a/Formula/opendetex.rb +++ /dev/null @@ -1,34 +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/releases/download/v2.8.8/opendetex-2.8.8.tar.bz2" - sha256 "085a149f64bf497fbcc07745969c5c1e423c95a8f4caaadb36ed3f2287fb2ee1" - - bottle do - cellar :any_skip_relocation - sha256 "db8c07a7987de189582449f403d15ecbcf7867cac9b1a6694ffe91217fa3f2cb" => :catalina - sha256 "d9b5550e47478394dd53f9b307bd0398488ac93311a4aa1544f9b7172a0a310c" => :mojave - sha256 "59bfca18bfe6cf097d158a3e411e0f24f4c800b52d4d43d4f939c8e23082d009" => :high_sierra - end - - uses_from_macos "flex" => :build - - def install - system "make" - bin.install "detex" - bin.install "delatex" - man1.install "detex.1" - end - - test do - (testpath/"test.tex").write <<~EOS - \\documentclass{article} - \\begin{document} - Simple \\emph{text}. - \\end{document} - EOS - - output = shell_output("#{bin}/detex test.tex") - assert_equal "Simple text.\n", output - end -end diff --git a/Formula/openexr.rb b/Formula/openexr.rb deleted file mode 100644 index 4a75307a4c58d..0000000000000 --- a/Formula/openexr.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Openexr < Formula - desc "High dynamic-range image file format" - homepage "https://www.openexr.com/" - url "https://github.com/openexr/openexr/archive/v2.5.2.tar.gz" - sha256 "5da8dff448d0c4a529e52c97daf238a461d01cd233944f75095668d6d7528761" - - bottle do - sha256 "cd7b32d91f6e70711a4010f2027be140189d8fc92f5fcdb12331228a9e762817" => :catalina - sha256 "057ebb08dfa17cefc33121b6fe39af3ac43b59b4c197abba473a0e4724f07802" => :mojave - sha256 "a5d9520a67acdb84ac3593290d2d65d3f4dd0c4db4ed4fe9f5c07c4b5a441ae2" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "ilmbase" - - uses_from_macos "zlib" - - resource "exr" do - url "https://github.com/openexr/openexr-images/raw/master/TestImages/AllHalfValues.exr" - sha256 "eede573a0b59b79f21de15ee9d3b7649d58d8f2a8e7787ea34f192db3b3c84a4" - end - - def install - cd "OpenEXR" do - system "cmake", ".", *std_cmake_args - system "make", "install" - end - end - - test do - resource("exr").stage do - system bin/"exrheader", "AllHalfValues.exr" - end - end -end diff --git a/Formula/openfast.rb b/Formula/openfast.rb deleted file mode 100644 index 9d266c2bde4b7..0000000000000 --- a/Formula/openfast.rb +++ /dev/null @@ -1,326 +0,0 @@ -class Openfast < Formula - desc "NREL-supported OpenFAST whole-turbine simulation code" - homepage "https://openfast.readthedocs.io/" - url "https://github.com/openfast/openfast/archive/v2.3.0.tar.gz" - sha256 "2b368e8c8211ebed03e87fb3e89ef733b7e4be4848834da4034f8419d618446c" - license "Apache-2.0" - revision 1 - - bottle do - cellar :any - sha256 "a3853476d60b961beb46c9dd2e6d57cfa82b566336630d7d761295f67a1eef39" => :catalina - sha256 "083887ac9bc3bff177b483423fbbe7dae850e70b81c481a2e48b5263fef48671" => :mojave - sha256 "e02a5cff1f9c007018873388a77a719a6db38da7e935e150a4b49a0f4feeb0ed" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "gcc" - depends_on "openblas" - - def install - args = std_cmake_args + %w[ - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DBLA_VENDOR=OpenBLAS - ] - - mkdir "build" do - system "cmake", "..", *args - system "make", "openfast" - bin.install "glue-codes/openfast/openfast" - end - end - - test do - (testpath/"homebrew.fst").write <<~EOS - ------- OpenFAST INPUT FILE ---------------------------------------------------- - Simple test case to validate Homebrew installation - ---------------------- SIMULATION CONTROL -------------------------------------- - False Echo - Echo input data to .ech (flag) - "FATAL" AbortLevel - Error level when simulation should abort (string) {"WARNING", "SEVERE", "FATAL"} - 0.01 TMax - Total run time (s) - 0.005 DT - Recommended module time step (s) - 2 InterpOrder - Interpolation order for input/output time history (-) {1=linear, 2=quadratic} - 0 NumCrctn - Number of correction iterations (-) {0=explicit calculation, i.e., no corrections} - 99999 DT_UJac - Time between calls to get Jacobians (s) - 1E+06 UJacSclFact - Scaling factor used in Jacobians (-) - ---------------------- FEATURE SWITCHES AND FLAGS ------------------------------ - 1 CompElast - Compute structural dynamics (switch) {1=ElastoDyn; 2=ElastoDyn + BeamDyn for blades} - 0 CompInflow - Compute inflow wind velocities (switch) {0=still air; 1=InflowWind; 2=external from OpenFOAM} - 0 CompAero - Compute aerodynamic loads (switch) {0=None; 1=AeroDyn v14; 2=AeroDyn v15} - 0 CompServo - Compute control and electrical-drive dynamics (switch) {0=None; 1=ServoDyn} - 0 CompHydro - Compute hydrodynamic loads (switch) {0=None; 1=HydroDyn} - 0 CompSub - Compute sub-structural dynamics (switch) {0=None; 1=SubDyn; 2=External Platform MCKF} - 0 CompMooring - Compute mooring system (switch) {0=None; 1=MAP++; 2=FEAMooring; 3=MoorDyn; 4=OrcaFlex} - 0 CompIce - Compute ice loads (switch) {0=None; 1=IceFloe; 2=IceDyn} - ---------------------- INPUT FILES --------------------------------------------- - "elastodyn.dat" EDFile - Name of file containing ElastoDyn input parameters (quoted string) - "unused" BDBldFile(1) - Name of file containing BeamDyn input parameters for blade 1 (quoted string) - "unused" BDBldFile(2) - Name of file containing BeamDyn input parameters for blade 2 (quoted string) - "unused" BDBldFile(3) - Name of file containing BeamDyn input parameters for blade 3 (quoted string) - "unused" InflowFile - Name of file containing inflow wind input parameters (quoted string) - "unused" AeroFile - Name of file containing aerodynamic input parameters (quoted string) - "unused" ServoFile - Name of file containing control and electrical-drive input parameters (quoted string) - "unused" HydroFile - Name of file containing hydrodynamic input parameters (quoted string) - "unused" SubFile - Name of file containing sub-structural input parameters (quoted string) - "unused" MooringFile - Name of file containing mooring system input parameters (quoted string) - "unused" IceFile - Name of file containing ice input parameters (quoted string) - ---------------------- OUTPUT -------------------------------------------------- - False SumPrint - Print summary data to ".sum" (flag) - 5 SttsTime - Amount of time between screen status messages (s) - 99999 ChkptTime - Amount of time between creating checkpoint files for potential restart (s) - 0.005 DT_Out - Time step for tabular output (s) (or "default") - 0 TStart - Time to begin tabular output (s) - 1 OutFileFmt - Format for tabular (time-marching) output file (switch) {1: text file [.out], 2: binary file [.outb], 3: both} - True TabDelim - Use tab delimiters in text tabular output file? (flag) {uses spaces if false} - "ES10.3E2" OutFmt - Format used for text tabular output, excluding the time channel. Resulting field should be 10 characters. (quoted string) - ---------------------- LINEARIZATION ------------------------------------------- - False Linearize - Linearization analysis (flag) - 2 NLinTimes - Number of times to linearize (-) [>=1] [unused if Linearize=False] - 30, 60 LinTimes - List of times at which to linearize (s) [1 to NLinTimes] [unused if Linearize=False] - 1 LinInputs - Inputs included in linearization (switch) {0=none; 1=standard; 2=all module inputs (debug)} [unused if Linearize=False] - 1 LinOutputs - Outputs included in linearization (switch) {0=none; 1=from OutList(s); 2=all module outputs (debug)} [unused if Linearize=False] - False LinOutJac - Include full Jacobians in linearization output (for debug) (flag) [unused if Linearize=False; used only if LinInputs=LinOutputs=2] - False LinOutMod - Write module-level linearization output files in addition to output for full system? (flag) [unused if Linearize=False] - ---------------------- VISUALIZATION ------------------------------------------ - 0 WrVTK - VTK visualization data output: (switch) {0=none; 1=initialization data only; 2=animation} - 2 VTK_type - Type of VTK visualization data: (switch) {1=surfaces; 2=basic meshes (lines/points); 3=all meshes (debug)} [unused if WrVTK=0] - false VTK_fields - Write mesh fields to VTK data files? (flag) {true/false} [unused if WrVTK=0] - 15 VTK_fps - Frame rate for VTK output (frames per second){will use closest integer multiple of DT} [used only if WrVTK=2] - EOS - - (testpath/"blade.dat").write <<~EOS - ------- ELASTODYN V1.00.* INDIVIDUAL BLADE INPUT FILE -------------------------- - AOC 15/50 blade file. GJStiff -> EdgEAof are mostly lies. - ---------------------- BLADE PARAMETERS ---------------------------------------- - 11 NBlInpSt - Number of blade input stations (-) - 4 BldFlDmp(1) - Blade flap mode #1 structural damping in percent of critical (%) - 4 BldFlDmp(2) - Blade flap mode #2 structural damping in percent of critical (%) - 4 BldEdDmp(1) - Blade edge mode #1 structural damping in percent of critical (%) - ---------------------- BLADE ADJUSTMENT FACTORS -------------------------------- - 1 FlStTunr(1) - Blade flapwise modal stiffness tuner, 1st mode (-) - 1 FlStTunr(2) - Blade flapwise modal stiffness tuner, 2nd mode (-) - 1 AdjBlMs - Factor to adjust blade mass density (-) - 1 AdjFlSt - Factor to adjust blade flap stiffness (-) - 1 AdjEdSt - Factor to adjust blade edge stiffness (-) - ---------------------- DISTRIBUTED BLADE PROPERTIES ---------------------------- - BlFract PitchAxis StrcTwst BMassDen FlpStff EdgStff - (-) (-) (deg) (kg/m) (Nm^2) (Nm^2) - 0.0000000E+00 2.5000000E-01 7.6900000E+00 4.9750000E+01 8.2448500E+06 7.6431600E+06 - 1.0000000E-01 2.5000000E-01 5.3500000E+00 3.3570000E+01 5.7297000E+06 1.0364760E+07 - 2.0000000E-01 2.5000000E-01 4.6600000E+00 2.1680000E+01 2.6900000E+06 1.0999800E+07 - 3.0000000E-01 2.5000000E-01 4.3100000E+00 2.2890000E+01 1.9233500E+06 1.2632760E+07 - 4.0000000E-01 2.5000000E-01 3.9100000E+00 1.8990000E+01 1.3988000E+06 1.1158560E+07 - 5.0000000E-01 2.5000000E-01 3.2500000E+00 1.6800000E+01 8.8770000E+05 5.8968000E+06 - 6.0000000E-01 2.5000000E-01 2.5600000E+00 1.5590000E+01 4.9899500E+05 3.8329200E+06 - 7.0000000E-01 2.5000000E-01 1.8600000E+00 1.2370000E+01 2.5017000E+05 2.3360400E+06 - 8.0000000E-01 2.5000000E-01 1.1600000E+00 1.1240000E+01 8.2314000E+04 1.1748240E+06 - 9.0000000E-01 2.5000000E-01 7.3000000E-01 1.0110000E+01 5.5818000E+04 9.0720000E+05 - 1.0000000E+00 2.5000000E-01 3.5000000E-01 8.9800000E+00 2.9456000E+04 6.4184400E+05 - ---------------------- BLADE MODE SHAPES --------------------------------------- - 0.2506 BldFl1Sh(2) - Flap mode 1, coeff of x^2 - 1.215 BldFl1Sh(3) - , coeff of x^3 - -2.0261 BldFl1Sh(4) - , coeff of x^4 - 2.7203 BldFl1Sh(5) - , coeff of x^5 - -1.1598 BldFl1Sh(6) - , coeff of x^6 - -2.3421 BldFl2Sh(2) - Flap mode 2, coeff of x^2 - 5.0047 BldFl2Sh(3) - , coeff of x^3 - -25.9119 BldFl2Sh(4) - , coeff of x^4 - 40.8648 BldFl2Sh(5) - , coeff of x^5 - -16.6154 BldFl2Sh(6) - , coeff of x^6 - 1.8381 BldEdgSh(2) - Edge mode 1, coeff of x^2 - -2.0103 BldEdgSh(3) - , coeff of x^3 - 0.9662 BldEdgSh(4) - , coeff of x^4 - 0.9933 BldEdgSh(5) - , coeff of x^5 - -0.7874 BldEdgSh(6) - , coeff of x^6 - EOS - - (testpath/"tower.dat").write <<~EOS - ------- ELASTODYN V1.00.* TOWER INPUT FILE ------------------------------------- - AOC tower data. This is pure fiction. - ---------------------- TOWER PARAMETERS ---------------------------------------- - 11 NTwInpSt - Number of input stations to specify tower geometry - 3 TwrFADmp(1) - Tower 1st fore-aft mode structural damping ratio (%) - 3 TwrFADmp(2) - Tower 2nd fore-aft mode structural damping ratio (%) - 3 TwrSSDmp(1) - Tower 1st side-to-side mode structural damping ratio (%) - 3 TwrSSDmp(2) - Tower 2nd side-to-side mode structural damping ratio (%) - ---------------------- TOWER ADJUSTMUNT FACTORS -------------------------------- - 1 FAStTunr(1) - Tower fore-aft modal stiffness tuner, 1st mode (-) - 1 FAStTunr(2) - Tower fore-aft modal stiffness tuner, 2nd mode (-) - 1 SSStTunr(1) - Tower side-to-side stiffness tuner, 1st mode (-) - 1 SSStTunr(2) - Tower side-to-side stiffness tuner, 2nd mode (-) - 1 AdjTwMa - Factor to adjust tower mass density (-) - 1 AdjFASt - Factor to adjust tower fore-aft stiffness (-) - 1 AdjSSSt - Factor to adjust tower side-to-side stiffness (-) - ---------------------- DISTRIBUTED TOWER PROPERTIES ---------------------------- - HtFract TMassDen TwFAStif TwSSStif - (-) (kg/m) (Nm^2) (Nm^2) - 0.0000000E+00 1.5110000E+02 2.3500000E+09 2.3500000E+09 - 1.0000000E-01 1.4170000E+02 2.1200000E+09 2.1200000E+09 - 2.0000000E-01 1.3560000E+02 1.8800000E+09 1.8800000E+09 - 3.0000000E-01 1.3220000E+02 1.6500000E+09 1.6500000E+09 - 4.0000000E-01 1.3070000E+02 1.4200000E+09 1.4200000E+09 - 5.0000000E-01 1.3030000E+02 1.1900000E+09 1.1900000E+09 - 6.0000000E-01 1.3030000E+02 9.5700000E+08 9.5700000E+08 - 7.0000000E-01 1.2980000E+02 7.2600000E+08 7.2600000E+08 - 8.0000000E-01 1.2820000E+02 4.9400000E+08 4.9400000E+08 - 9.0000000E-01 1.2460000E+02 2.6200000E+08 2.6200000E+08 - 1.0000000E+00 1.1840000E+02 3.0000000E+07 3.0000000E+07 - ---------------------- TOWER FORE-AFT MODE SHAPES ------------------------------ - 1.0495 TwFAM1Sh(2) - Mode 1, coefficient of x^2 term - 0.0694 TwFAM1Sh(3) - , coefficient of x^3 term - -0.289 TwFAM1Sh(4) - , coefficient of x^4 term - 0.3003 TwFAM1Sh(5) - , coefficient of x^5 term - -0.1301 TwFAM1Sh(6) - , coefficient of x^6 term - -25.1012 TwFAM2Sh(2) - Mode 2, coefficient of x^2 term - 20.1243 TwFAM2Sh(3) - , coefficient of x^3 term - 0.9012 TwFAM2Sh(4) - , coefficient of x^4 term - 16.6452 TwFAM2Sh(5) - , coefficient of x^5 term - -11.5696 TwFAM2Sh(6) - , coefficient of x^6 term - ---------------------- TOWER SIDE-TO-SIDE MODE SHAPES -------------------------- - 1.0495 TwSSM1Sh(2) - Mode 1, coefficient of x^2 term - 0.0694 TwSSM1Sh(3) - , coefficient of x^3 term - -0.289 TwSSM1Sh(4) - , coefficient of x^4 term - 0.3003 TwSSM1Sh(5) - , coefficient of x^5 term - -0.1301 TwSSM1Sh(6) - , coefficient of x^6 term - -25.1012 TwSSM2Sh(2) - Mode 2, coefficient of x^2 term - 20.1243 TwSSM2Sh(3) - , coefficient of x^3 term - 0.9012 TwSSM2Sh(4) - , coefficient of x^4 term - 16.6452 TwSSM2Sh(5) - , coefficient of x^5 term - -11.5696 TwSSM2Sh(6) - , coefficient of x^6 term - EOS - - (testpath/"elastodyn.dat").write <<~EOS - ------- ELASTODYN v1.03.* INPUT FILE ------------------------------------------- - FAST certification Test #08: AOC 15/50 with many DOFs with fixed yaw error and steady wind. Many parameters are pure fiction. - ---------------------- SIMULATION CONTROL -------------------------------------- - False Echo - Echo input data to ".ech" (flag) - 3 Method - Integration method: {1: RK4, 2: AB4, or 3: ABM4} (-) - 0.005 DT - Integration time step (s) - ---------------------- ENVIRONMENTAL CONDITION --------------------------------- - 9.80665 Gravity - Gravitational acceleration (m/s^2) - ---------------------- DEGREES OF FREEDOM -------------------------------------- - True FlapDOF1 - First flapwise blade mode DOF (flag) - True FlapDOF2 - Second flapwise blade mode DOF (flag) - True EdgeDOF - First edgewise blade mode DOF (flag) - False TeetDOF - Rotor-teeter DOF (flag) [unused for 3 blades] - False DrTrDOF - Drivetrain rotational-flexibility DOF (flag) - False GenDOF - Generator DOF (flag) - False YawDOF - Yaw DOF (flag) - True TwFADOF1 - First fore-aft tower bending-mode DOF (flag) - True TwFADOF2 - Second fore-aft tower bending-mode DOF (flag) - True TwSSDOF1 - First side-to-side tower bending-mode DOF (flag) - True TwSSDOF2 - Second side-to-side tower bending-mode DOF (flag) - False PtfmSgDOF - Platform horizontal surge translation DOF (flag) - False PtfmSwDOF - Platform horizontal sway translation DOF (flag) - False PtfmHvDOF - Platform vertical heave translation DOF (flag) - False PtfmRDOF - Platform roll tilt rotation DOF (flag) - False PtfmPDOF - Platform pitch tilt rotation DOF (flag) - False PtfmYDOF - Platform yaw rotation DOF (flag) - ---------------------- INITIAL CONDITIONS -------------------------------------- - 0 OoPDefl - Initial out-of-plane blade-tip displacement (meters) - 0 IPDefl - Initial in-plane blade-tip deflection (meters) - 1.54 BlPitch(1) - Blade 1 initial pitch (degrees) - 1.54 BlPitch(2) - Blade 2 initial pitch (degrees) - 1.54 BlPitch(3) - Blade 3 initial pitch (degrees) [unused for 2 blades] - 0 TeetDefl - Initial or fixed teeter angle (degrees) [unused for 3 blades] - 0 Azimuth - Initial azimuth angle for blade 1 (degrees) - 64.14 RotSpeed - Initial or fixed rotor speed (rpm) - -15 NacYaw - Initial or fixed nacelle-yaw angle (degrees) - 0 TTDspFA - Initial fore-aft tower-top displacement (meters) - 0 TTDspSS - Initial side-to-side tower-top displacement (meters) - 0 PtfmSurge - Initial or fixed horizontal surge translational displacement of platform (meters) - 0 PtfmSway - Initial or fixed horizontal sway translational displacement of platform (meters) - 0 PtfmHeave - Initial or fixed vertical heave translational displacement of platform (meters) - 0 PtfmRoll - Initial or fixed roll tilt rotational displacement of platform (degrees) - 0 PtfmPitch - Initial or fixed pitch tilt rotational displacement of platform (degrees) - 0 PtfmYaw - Initial or fixed yaw rotational displacement of platform (degrees) - ---------------------- TURBINE CONFIGURATION ----------------------------------- - 3 NumBl - Number of blades (-) - 7.49 TipRad - The distance from the rotor apex to the blade tip (meters) - 0.28 HubRad - The distance from the rotor apex to the blade root (meters) - 6 PreCone(1) - Blade 1 cone angle (degrees) - 6 PreCone(2) - Blade 2 cone angle (degrees) - 6 PreCone(3) - Blade 3 cone angle (degrees) [unused for 2 blades] - 0 HubCM - Distance from rotor apex to hub mass [positive downwind] (meters) - 0 UndSling - Undersling length [distance from teeter pin to the rotor apex] (meters) [unused for 3 blades] - 0 Delta3 - Delta-3 angle for teetering rotors (degrees) [unused for 3 blades] - 0 AzimB1Up - Azimuth value to use for I/O when blade 1 points up (degrees) - 1.341 OverHang - Distance from yaw axis to rotor apex [3 blades] or teeter pin [2 blades] (meters) - 0.5 ShftGagL - Distance from rotor apex [3 blades] or teeter pin [2 blades] to shaft strain gages [positive for upwind rotors] (meters) - 0 ShftTilt - Rotor shaft tilt angle (degrees) - 0 NacCMxn - Downwind distance from the tower-top to the nacelle CM (meters) - 0 NacCMyn - Lateral distance from the tower-top to the nacelle CM (meters) - 0.6 NacCMzn - Vertical distance from the tower-top to the nacelle CM (meters) - 0 NcIMUxn - Downwind distance from the tower-top to the nacelle IMU (meters) - 0 NcIMUyn - Lateral distance from the tower-top to the nacelle IMU (meters) - 0 NcIMUzn - Vertical distance from the tower-top to the nacelle IMU (meters) - 0.6 Twr2Shft - Vertical distance from the tower-top to the rotor shaft (meters) - 24.4 TowerHt - Height of tower above ground level [onshore] or MSL [offshore] (meters) - 0 TowerBsHt - Height of tower base above ground level [onshore] or MSL [offshore] (meters) - 0 PtfmCMxt - Downwind distance from the ground level [onshore] or MSL [offshore] to the platform CM (meters) - 0 PtfmCMyt - Lateral distance from the ground level [onshore] or MSL [offshore] to the platform CM (meters) - -0 PtfmCMzt - Vertical distance from the ground level [onshore] or MSL [offshore] to the platform CM (meters) - -0 PtfmRefzt - Vertical distance from the ground level [onshore] or MSL [offshore] to the platform reference point (meters) - ---------------------- MASS AND INERTIA ---------------------------------------- - 5.9 TipMass(1) - Tip-brake mass, blade 1 (kg) - 5.9 TipMass(2) - Tip-brake mass, blade 2 (kg) - 5.9 TipMass(3) - Tip-brake mass, blade 3 (kg) [unused for 2 blades] - 247.3 HubMass - Hub mass (kg) - 9 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2) - 10 GenIner - Generator inertia about HSS (kg m^2) - 1747 NacMass - Nacelle mass (kg) - 976.3 NacYIner - Nacelle inertia about yaw axis (kg m^2) - 0 YawBrMass - Yaw bearing mass (kg) - 0 PtfmMass - Platform mass (kg) - 0 PtfmRIner - Platform inertia for roll tilt rotation about the platform CM (kg m^2) - 0 PtfmPIner - Platform inertia for pitch tilt rotation about the platform CM (kg m^2) - 0 PtfmYIner - Platform inertia for yaw rotation about the platform CM (kg m^2) - ---------------------- BLADE --------------------------------------------------- - 10 BldNodes - Number of blade nodes (per blade) used for analysis (-) - "blade.dat" BldFile(1) - Name of file containing properties for blade 1 (quoted string) - "blade.dat" BldFile(2) - Name of file containing properties for blade 2 (quoted string) - "blade.dat" BldFile(3) - Name of file containing properties for blade 3 (quoted string) [unused for 2 blades] - ---------------------- ROTOR-TEETER -------------------------------------------- - 0 TeetMod - Rotor-teeter spring/damper model {0: none, 1: standard, 2: user-defined from routine UserTeet} (switch) [unused for 3 blades] - 0 TeetDmpP - Rotor-teeter damper position (degrees) [used only for 2 blades and when TeetMod=1] - 0 TeetDmp - Rotor-teeter damping constant (N-m/(rad/s)) [used only for 2 blades and when TeetMod=1] - 0 TeetCDmp - Rotor-teeter rate-independent Coulomb-damping moment (N-m) [used only for 2 blades and when TeetMod=1] - 0 TeetSStP - Rotor-teeter soft-stop position (degrees) [used only for 2 blades and when TeetMod=1] - 0 TeetHStP - Rotor-teeter hard-stop position (degrees) [used only for 2 blades and when TeetMod=1] - 0 TeetSSSp - Rotor-teeter soft-stop linear-spring constant (N-m/rad) [used only for 2 blades and when TeetMod=1] - 0 TeetHSSp - Rotor-teeter hard-stop linear-spring constant (N-m/rad) [used only for 2 blades and when TeetMod=1] - ---------------------- DRIVETRAIN ---------------------------------------------- - 100 GBoxEff - Gearbox efficiency (%) - 28.25 GBRatio - Gearbox ratio (-) - 600000 DTTorSpr - Drivetrain torsional spring (N-m/rad) - 100000 DTTorDmp - Drivetrain torsional damper (N-m/(rad/s)) - ---------------------- FURLING ------------------------------------------------- - False Furling - Read in additional model properties for furling turbine (flag) [must currently be FALSE) - "unused" FurlFile - Name of file containing furling properties (quoted string) [unused when Furling=False] - ---------------------- TOWER --------------------------------------------------- - 11 TwrNodes - Number of tower nodes used for analysis (-) - "tower.dat" TwrFile - Name of file containing tower properties (quoted string) - ---------------------- OUTPUT -------------------------------------------------- - False SumPrint - Print summary data to ".sum" (flag) - 1 OutFile - Switch to determine where output will be placed: {1: in module output file only; 2: in glue code output file only; 3: both} (currently unused) - True TabDelim - Use tab delimiters in text tabular output file? (flag) (currently unused) - "ES10.3E2" OutFmt - Format used for text tabular output (except time). Resulting field should be 10 characters. (quoted string) (currently unused) - 10 TStart - Time to begin tabular output (s) (currently unused) - 10 DecFact - Decimation factor for tabular output {1: output every time step} (-) (currently unused) - 0 NTwGages - Number of tower nodes that have strain gages for output [0 to 9] (-) - 0 TwrGagNd - List of tower nodes that have strain gages [1 to TwrNodes] (-) [unused if NTwGages=0] - 2 NBlGages - Number of blade nodes that have strain gages for output [0 to 9] (-) - 2, 6 BldGagNd - List of blade nodes that have strain gages [1 to BldNodes] (-) [unused if NBlGages=0] - OutList - The next line(s) contains a list of output parameters. See OutListParameters.xlsx for a listing of available output channels, (-) - "TipDxb1" - Blade flapwise tip deflections - "TipDxb2" - Blade flapwise tip deflections - "TipDyb1" - Blade edgewise tip deflections - "TipDyb2" - Blade edgewise tip deflections - END of input file (the word "END" must appear in the first 3 columns of this last OutList line) - --------------------------------------------------------------------------------------- - EOS - - system bin/"openfast", "homebrew.fst" - assert_predicate testpath/"homebrew.out", :exist? - end -end diff --git a/Formula/openfortivpn.rb b/Formula/openfortivpn.rb deleted file mode 100644 index a564ce05c1bb5..0000000000000 --- a/Formula/openfortivpn.rb +++ /dev/null @@ -1,30 +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.14.1.tar.gz" - sha256 "bc62fc6ecaaa6c6f8f2510e14a067a0cb9762158d9460c04555990bba44b50ca" - revision 1 - - bottle do - sha256 "0c04566ef63f3cc1cb5062c3a18b78f6fed368dd6d449670e3a2fedf2d6f3806" => :catalina - sha256 "d35fe4166d8371cf285e6b54fe3b92d380bb8932b9f307f3ba1d6f51650013d0" => :mojave - sha256 "7bb4c80c9b516bc18ab034ef0d928d254212aec7d4ee34d43e3f94fe16115044" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}/openfortivpn" - 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 0528b353f139f..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/v2.1.1.tar.gz" - sha256 "af173e90fce65f80722fa894e1af0d6b07572292e76de7b65273df4c0a8be678" - license "BSD-2-Clause" - head "https://github.com/cisco/openh264.git" - - bottle do - cellar :any - sha256 "40bbd156c791be70467bebecb927745edc9b54dd46aa2c4a317562a4cf1dce8e" => :catalina - sha256 "952ae4b5cafae14722588046032ee363b7b027178aa30ec450e4ee916b85eb4b" => :mojave - sha256 "de7a5593d7a401e606b44d88347e83651508538d2461e4510b024f41b8b0f42e" => :high_sierra - 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 4beec1f32ce1c..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.3.0.tar.gz" - sha256 "ec5c97ab456046a8aef3cde6d59e474603af398f1d064a66e364fe3c0b26a0fa" - license "BSL-1.0" - head "https://github.com/OpenHMD/OpenHMD.git" - - bottle do - cellar :any - sha256 "351e8d9e6bfa22b63b035c0f9c0c7e37be52b9e4058c50d7b7ac321eca880e5b" => :catalina - sha256 "796c1a6f06715aa8a3304cca0083378d5fe2a1006b55da8727938922b5408c8d" => :mojave - sha256 "1c54727de5836916bca42065d0ed53f0a796d07ec6866408a69213c94b151092" => :high_sierra - sha256 "97f5dff1e77b6b615544ed6611aa6d8c3395e3c6dc759c4576084d87a4e976ad" => :sierra - 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 d8e26ea66fb49..0000000000000 --- a/Formula/openimageio.rb +++ /dev/null @@ -1,85 +0,0 @@ -class Openimageio < Formula - desc "Library for reading, processing and writing images" - homepage "https://openimageio.org/" - url "https://github.com/OpenImageIO/oiio/archive/Release-2.1.17.0.tar.gz" - version "2.1.17" - sha256 "6f20536226f1da4fbf0d522815de47eef60a443f9b67a15705b96c34cc8921a7" - head "https://github.com/OpenImageIO/oiio.git" - - bottle do - sha256 "8d14eddacdafeb822d0b8cbfaf9c74fb82742834017ca1ad8f8eff61792426d3" => :catalina - sha256 "f64239c6986e07b4a16eb1e38da4228fedf460c83b5d90a147368589768f7612" => :mojave - sha256 "689597d81d0bed355b92881316ff69cfb49320360f3e6627c235e4e74330c90d" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "boost-python3" - depends_on "ffmpeg" - depends_on "freetype" - depends_on "giflib" - depends_on "ilmbase" - depends_on "jpeg" - depends_on "libheif" - depends_on "libpng" - depends_on "libraw" - depends_on "libtiff" - depends_on "opencolorio" - depends_on "openexr" - depends_on "python@3.8" - depends_on "webp" - - def install - args = std_cmake_args + %w[ - -DCCACHE_FOUND= - -DEMBEDPLUGINS=ON - -DUSE_FIELD3D=OFF - -DUSE_JPEGTURBO=OFF - -DUSE_NUKE=OFF - -DUSE_OPENCV=OFF - -DUSE_OPENGL=OFF - -DUSE_OPENJPEG=OFF - -DUSE_PTEX=OFF - -DUSE_QT=OFF - ] - - # CMake picks up the system's python dylib, even if we have a brewed one. - py3ver = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - py3prefix = Formula["python@3.8"].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}" - - # CMake picks up boost-python instead of boost-python3 - args << "-DBOOST_ROOT=#{Formula["boost"].opt_prefix}" - boost_lib = Formula["boost-python3"].opt_lib - py3ver_without_dots = py3ver.to_s.delete(".") - args << "-DBoost_PYTHON_LIBRARIES=#{boost_lib}/libboost_python#{py3ver_without_dots}-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=''" - - mkdir "build" 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") - - output = <<~EOS - from __future__ import print_function - import OpenImageIO - print(OpenImageIO.VERSION_STRING) - EOS - assert_match version.to_s, pipe_output(Formula["python@3.8"].opt_bin/"python3", output, 0) - end -end diff --git a/Formula/openjazz.rb b/Formula/openjazz.rb deleted file mode 100644 index 8112a209c4617..0000000000000 --- a/Formula/openjazz.rb +++ /dev/null @@ -1,80 +0,0 @@ -class Openjazz < Formula - desc "Open source Jazz Jackrabit engine" - homepage "http://www.alister.eu/jazz/oj/" - url "https://github.com/AlisterT/openjazz/archive/20190106.tar.gz" - sha256 "27da3ab32cb6b806502a213c435e1b3b6ecebb9f099592f71caf6574135b1662" - license "GPL-2.0" - head "https://github.com/AlisterT/openjazz.git" - - bottle do - cellar :any - sha256 "9f6f4144256364824f4c16c430aaa738e6675f031f8bd7eaa76fa33d4d367430" => :catalina - sha256 "06066b8e0bf792d894ceb24ed1ec5409ad896982db87ecab8c07278eabdc3f98" => :mojave - sha256 "b5684fc3faa686f06f9600e8c4bb9c787c7cbf3eb100fc8a64a52502e84ce2ca" => :high_sierra - 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/openjdk.rb b/Formula/openjdk.rb deleted file mode 100644 index f47196fafaf1d..0000000000000 --- a/Formula/openjdk.rb +++ /dev/null @@ -1,79 +0,0 @@ -class Openjdk < Formula - desc "Development kit for the Java programming language" - homepage "https://openjdk.java.net/" - url "https://hg.openjdk.java.net/jdk-updates/jdk14u/archive/jdk-14.0.1-ga.tar.bz2" - sha256 "f9c4a55ac858f858222bc5fe6e4b890f9b4a3f942fd0211575b0418aec5c14d6" - - bottle do - cellar :any - sha256 "d44db8c5b212a36d73f1102468106124e5f5e2f20600768a9d8cecc172df4601" => :catalina - sha256 "4549644dc93f35362c65fe12543bd77d580944673d836f71108f4bcaabf7c206" => :mojave - sha256 "b72286cb7187fa0682761f70ea5e6f6922667ceac4de4ac3ebd855786358c773" => :high_sierra - end - - keg_only "it shadows the macOS `java` wrapper" - - depends_on "autoconf" => :build - - on_linux do - depends_on "pkg-config" => :build - end - - # From https://jdk.java.net/archive/ - resource "boot-jdk" do - url "https://download.java.net/java/GA/jdk13.0.2/d4173c853231432d94f001e99d882ca7/8/GPL/openjdk-13.0.2_osx-x64_bin.tar.gz" - sha256 "08fd2db3a3ab6fb82bb9091a035f9ffe8ae56c31725f4e17d573e48c39ca10dd" - end - - def install - boot_jdk_dir = Pathname.pwd/"boot-jdk" - resource("boot-jdk").stage boot_jdk_dir - boot_jdk = boot_jdk_dir/"Contents/Home" - java_options = ENV.delete("_JAVA_OPTIONS") - - _, _, build = version.to_s.rpartition("+") - - chmod 0755, "configure" - system "./configure", "--without-version-pre", - "--without-version-opt", - "--with-version-build=#{build}", - "--with-toolchain-path=/usr/bin", - "--with-extra-ldflags=-headerpad_max_install_names", - "--with-boot-jdk=#{boot_jdk}", - "--with-boot-jdk-jvmargs=#{java_options}", - "--with-debug-level=release", - "--with-native-debug-symbols=none", - "--enable-dtrace=auto", - "--with-jvm-variants=server" - - ENV["MAKEFLAGS"] = "JOBS=#{ENV.make_jobs}" - system "make", "images" - - jdk = Dir["build/*/images/jdk-bundle/*"].first - libexec.install jdk => "openjdk.jdk" - bin.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/bin/*"] - include.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/include/*.h"] - include.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/include/darwin/*.h"] - end - - def caveats - <<~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 - - test do - (testpath/"HelloWorld.java").write <<~EOS - class HelloWorld { - public static void main(String args[]) { - System.out.println("Hello, world!"); - } - } - EOS - - system bin/"javac", "HelloWorld.java" - - assert_match "Hello, world!", shell_output("#{bin}/java HelloWorld") - end -end diff --git a/Formula/openjdk@11.rb b/Formula/openjdk@11.rb deleted file mode 100644 index baea557396abf..0000000000000 --- a/Formula/openjdk@11.rb +++ /dev/null @@ -1,80 +0,0 @@ -class OpenjdkAT11 < Formula - desc "Development kit for the Java programming language" - homepage "https://openjdk.java.net/" - url "https://hg.openjdk.java.net/jdk-updates/jdk11u/archive/jdk-11.0.7+10.tar.bz2" - version "11.0.7+10" - sha256 "e86d27cc3119be2178fc20c0115f8863fa86ac3ffd0c825fef7d16683f78b852" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "1cef37f5566ca7c60c03bad337c81516525459a7c4892519bc9badf90633a935" => :catalina - sha256 "5bb229b65beda25d23ffee46f02bc8a921ad21c9312716e20ea4eba2cfb27901" => :mojave - sha256 "2ee32dada456c7c8560ebda3d6b182a80a83b015cd91a30e82602ae0b5e4ce0a" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "autoconf" => :build - - on_linux do - depends_on "pkg-config" => :build - end - - resource "boot-jdk" do - url "https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_osx-x64_bin.tar.gz" - sha256 "77ea7675ee29b85aa7df138014790f91047bfdafbc997cb41a1030a0417356d7" - end - - def install - boot_jdk_dir = Pathname.pwd/"boot-jdk" - resource("boot-jdk").stage boot_jdk_dir - boot_jdk = boot_jdk_dir/"Contents/Home" - java_options = ENV.delete("_JAVA_OPTIONS") - - short_version, _, build = version.to_s.rpartition("+") - - chmod 0755, "configure" - system "./configure", "--without-version-pre", - "--without-version-opt", - "--with-version-build=#{build}", - "--with-toolchain-path=/usr/bin", - "--with-extra-ldflags=-headerpad_max_install_names", - "--with-boot-jdk=#{boot_jdk}", - "--with-boot-jdk-jvmargs=#{java_options}", - "--with-debug-level=release", - "--with-native-debug-symbols=none", - "--enable-dtrace=auto", - "--with-jvm-variants=server" - - ENV["MAKEFLAGS"] = "JOBS=#{ENV.make_jobs}" - system "make", "images" - - jdk = "build/macosx-x86_64-normal-server-release/images/jdk-bundle/jdk-#{short_version}.jdk" - libexec.install jdk => "openjdk.jdk" - bin.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/bin/*"] - include.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/include/*.h"] - include.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/include/darwin/*.h"] - end - - def caveats - <<~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 - - test do - (testpath/"HelloWorld.java").write <<~EOS - class HelloWorld { - public static void main(String args[]) { - System.out.println("Hello, world!"); - } - } - EOS - - system bin/"javac", "HelloWorld.java" - - assert_match "Hello, world!", shell_output("#{bin}/java HelloWorld") - end -end diff --git a/Formula/openjpeg.rb b/Formula/openjpeg.rb deleted file mode 100644 index bd99916166c94..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.1.tar.gz" - sha256 "63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9" - head "https://github.com/uclouvain/openjpeg.git" - - bottle do - cellar :any - sha256 "29b9e0e1ed01683fd26a2fb07d7ee354d8d236033305d8b0ca1dd5f36568fc65" => :catalina - sha256 "6de317bfef3ab808ff5f3eb9c1aa47f77e7236fba8ad0d606b29b38eb47c321e" => :mojave - sha256 "1eb8b2f698ecf16196e06a2d9f7ba20eb7f0ba447d351e36eb3344d3ed6c5c58" => :high_sierra - sha256 "d2b377424ff5387892bc1af653654fdcc70702e4524f3309b3f0874ac6e2d84c" => :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/openkim-models.rb b/Formula/openkim-models.rb deleted file mode 100644 index 0e7d801e6575b..0000000000000 --- a/Formula/openkim-models.rb +++ /dev/null @@ -1,30 +0,0 @@ -class OpenkimModels < Formula - desc "All OpenKIM Models compatible with kim-api" - homepage "https://openkim.org/" - url "https://s3.openkim.org/archives/collection/openkim-models-2019-07-25.txz" - sha256 "50338084ece92ec0fb13b0bbdf357b5d7450e26068ba501f23c315f814befc26" - revision 1 - - bottle do - sha256 "9420d4f91176705c43778e8566407d3310924b35dc0e10c3ceaaac86dc5c3713" => :catalina - sha256 "236e77924307da8aa61a6a34242dd1623d501db8ef408e3c33d3ca8b4ca387f4" => :mojave - sha256 "d962559c861be90a61189489af855947e8cd883a3480863c4097a3b1a0410e6f" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "kim-api" - - def install - args = std_cmake_args - args << "-DKIM_API_MODEL_DRIVER_INSTALL_PREFIX=#{lib}/openkim-models/model-drivers" - args << "-DKIM_API_PORTABLE_MODEL_INSTALL_PREFIX=#{lib}/openkim-models/portable-models" - args << "-DKIM_API_SIMULATOR_MODEL_INSTALL_PREFIX=#{lib}/openkim-models/simulator-models" - system "cmake", ".", *args - system "make", "install" - 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/openldap.rb b/Formula/openldap.rb deleted file mode 100644 index db2d015d89d47..0000000000000 --- a/Formula/openldap.rb +++ /dev/null @@ -1,59 +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.50.tgz" - sha256 "5cb57d958bf5c55a678c6a0f06821e0e5504d5a92e6a33240841fbca1db586b8" - - bottle do - sha256 "c0f1fe7a472cba83a584bd574ba2a4d8e04b73fac95259855ee8697359f7e117" => :catalina - sha256 "b4273ace070b3f6afb965b0f2c9d43524a38d1521b55febe84833586a5d773fb" => :mojave - sha256 "fe64b6a62c8fddfa647f8e48ad233ee09514cc0bc7ba43058b85b0809e4cfab2" => :high_sierra - end - - keg_only :provided_by_macos - - depends_on "openssl@1.1" - - on_linux do - depends_on "util-linux" - 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-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/openlibm.rb b/Formula/openlibm.rb deleted file mode 100644 index c4189c3eacc73..0000000000000 --- a/Formula/openlibm.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Openlibm < Formula - desc "High quality, portable, open source libm implementation" - homepage "https://openlibm.org/" - url "https://github.com/JuliaMath/openlibm/archive/v0.7.0.tar.gz" - sha256 "1699f773198018b55b12631db9c1801fe3ed191e618a1ee1be743f4570ae06a3" - - bottle do - cellar :any - sha256 "a7d18405ee96e1409a3de89904263280b364ae5e0d046be6a1391031f6ec5bb9" => :catalina - sha256 "d7f73575a6b6b7efb4307165f578e172a1563955ed476683b27bbaca6c0cafb6" => :mojave - sha256 "4f769ffeda11f2bc17a5cd52a4bcd59723586b9258b789adcdb628fb700cca86" => :high_sierra - end - - keg_only :provided_by_macos - - 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 <<~EOS - #include - #include "openlibm.h" - int main (void) { - printf("%.1f", cos(acos(0.0))); - } - EOS - 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/openmotif.rb b/Formula/openmotif.rb deleted file mode 100644 index 84283d5c38508..0000000000000 --- a/Formula/openmotif.rb +++ /dev/null @@ -1,40 +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" - license "LGPL-2.1" - - bottle do - sha256 "a997ddf37cc71329a09ca6616cbf0ef63bbe1a477a65a94781fdb72d8ec15822" => :catalina - 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 => "both 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 d5b2ee80ae4ba..0000000000000 --- a/Formula/openmsx.rb +++ /dev/null @@ -1,46 +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 "d747a6fb6c9f9a489468f55765dbe8ef19664c1feb7346a42ed3f093cc61499a" => :catalina - 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 4ebe696322552..0000000000000 --- a/Formula/openrct2.rb +++ /dev/null @@ -1,62 +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.6", - :revision => "6c3c857dfa5cd0d267b89a9d70930fbacdfbaea4" - license "GPL-3.0" - revision 2 - head "https://github.com/OpenRCT2/OpenRCT2.git", :branch => "develop" - - bottle do - cellar :any - sha256 "b77f8f232b8af2d615734f94c43b60bebc656c3dacdd1ad50a3b31b7f3e945e0" => :catalina - sha256 "2f9f44ee3c1f9b60b32a60cb40b8a1eabbcddad89d8a3c6c37a04fa41c799493" => :mojave - sha256 "50f6ea68a2265b15ee444ffe1ed624d3ff3cfee98fc914cac148d42b6232d920" => :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@1.1" - 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.2c/title-sequences.zip" - sha256 "5284333fa501270835b5f0cf420cb52155742335f5658d7889ea35d136b52517" - end - - resource "objects" do - url "https://github.com/OpenRCT2/objects/releases/download/v1.0.14/objects.zip" - sha256 "574477ddcdfdd4d827ce1a0fbc4971cbb56df561dcfff7151c62a9878d3bbb54" - 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") - - 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 0cbe2bf234698..0000000000000 --- a/Formula/openrtsp.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Openrtsp < Formula - desc "Command-line RTSP client" - homepage "http://www.live555.com/openRTSP" - url "http://www.live555.com/liveMedia/public/live.2020.06.25.tar.gz" - mirror "https://download.videolan.org/pub/videolan/testing/contrib/live555/live.2020.06.25.tar.gz" - # Keep a mirror as upstream tarballs are removed after each version - sha256 "f206309f10d281990889b7a0c92c26a7fa55ac0e8568bf594b9b27433b4db585" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "b0ad030b1976244e06cd87b206eb090f8110583480c0fc574dd0a3896fc107f9" => :catalina - sha256 "ba59938a250409e9a2e7a46439312629789527c2cdffd90912cf60c3963ce954" => :mojave - sha256 "3b8b67993c7065d47c69df729f182460a0484f8c027953c582aa489b9b509824" => :high_sierra - end - - depends_on "openssl@1.1" - - def install - # Avoid linkage to system OpenSSL - libs = [ - Formula["openssl@1.1"].opt_lib/"libcrypto.dylib", - Formula["openssl@1.1"].opt_lib/"libssl.dylib", - ] - - system "./genMakefiles", "macosx" - 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/opensaml.rb b/Formula/opensaml.rb deleted file mode 100644 index 4e2a813496b77..0000000000000 --- a/Formula/opensaml.rb +++ /dev/null @@ -1,27 +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.1.0/opensaml-3.1.0.tar.bz2" - sha256 "7b632d2cf6556b213e80ec1473b5298dbfa17f665cb3911f933c4ad5fe2983b0" - - bottle do - cellar :any - sha256 "fb766a10e4471cb65da1e9833ab752e360af38a598f50fe4190881950abed391" => :catalina - sha256 "06438e82b7723985c2089d8ab2198dc8ac7bfc0cf3e86c3b78c0bea8586ecb41" => :mojave - sha256 "55e58f4e0e0a077ea5dc4a936e759a9f5e710fab05b2f9f6efb4b01144130d3a" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "log4shib" - depends_on "openssl@1.1" - depends_on "xerces-c" - depends_on "xml-security-c" - depends_on "xml-tooling-c" - - 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 efb0d4e01c436..0000000000000 --- a/Formula/opensc.rb +++ /dev/null @@ -1,48 +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.20.0/opensc-0.20.0.tar.gz" - sha256 "bbf4b4f4a44463645c90a525e820a8059b2f742a53b7b944f941de3c97ba4863" - license "LGPL-2.1" - head "https://github.com/OpenSC/OpenSC.git" - - bottle do - sha256 "38a3b5cb96dc21a68ecb7a5ec55cb4e16245718f43494442c43c7bf1dfbc9cbd" => :catalina - sha256 "a4f9ffe8088a618dc349e74463ac7a846335dc847b8dc37c8037ec8c7e3244de" => :mojave - sha256 "ec40e0b292df9c7819244653977a7ce03b1121f2f98cf2960c0e6f611f18eaf1" => :high_sierra - 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@1.1" - - 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 - - def caveats - <<~EOS - The OpenSSH PKCS11 smartcard integration will not work from High Sierra - onwards. If you need this functionality, unlink this formula, then install - the OpenSC cask. - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/opensc-tool -i") - end -end diff --git a/Formula/openshift-cli.rb b/Formula/openshift-cli.rb deleted file mode 100644 index 71ac6510e69fe..0000000000000 --- a/Formula/openshift-cli.rb +++ /dev/null @@ -1,58 +0,0 @@ -class OpenshiftCli < Formula - desc "OpenShift command-line interface tools" - homepage "https://www.openshift.com/" - url "https://github.com/openshift/origin.git", - :tag => "v4.1.0", - :revision => "b4261e07eda19d9c42aa9d1c748c34f8cba09168", - :shallow => false - license "Apache-2.0" - revision 1 - head "https://github.com/openshift/origin.git", - :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "bd72706773e6bb0620c90731c955d5b1f97e724493d9844210bb2fa06a1bd2d0" => :catalina - sha256 "e565ddf932f76f4638e2fcf6ae85a76b4c528d000df4dc8f8ae35ee77c860adb" => :mojave - sha256 "4e8426318d66ff09d71200bbef8154d0ba965c7ae67a6f23b18a94bf59d05b3f" => :high_sierra - sha256 "3fb7f73cdb5b933e3e05b5724ac09dddef5c6d133c7474900cb8e47321f225f6" => :sierra - end - - depends_on "coreutils" => :build - depends_on "go" => :build - depends_on "socat" - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/openshift/origin" - dir.install buildpath.children - [buildpath/".brew_home"] - - cd dir do - # make target is changing in >v4.1; remove this if statement when next - # bumping stable version - if build.stable? - system "make", "all", "WHAT=cmd/oc" - else - system "make", "all", "WHAT=staging/src/github.com/openshift/oc/cmd/oc" - end - - bin.install "_output/local/bin/darwin/amd64/oc" - - prefix.install_metafiles - - bash_completion.install "contrib/completions/bash/oc" - zsh_completion.install "contrib/completions/zsh/oc" => "_oc" - end - end - - test do - version_output = shell_output("#{bin}/oc version --client 2>&1") - assert_match "GitTreeState:\"clean\"", version_output - if build.stable? - assert_match "GitVersion:\"v#{version}", version_output - assert_match stable.instance_variable_get(:@resource) - .instance_variable_get(:@specs)[:revision].slice(0, 9), - version_output - end - end -end diff --git a/Formula/openslide.rb b/Formula/openslide.rb deleted file mode 100644 index 11267769a8e44..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 5 - - bottle do - cellar :any - sha256 "6b59207518417bb5a45a716d6c26a01ed8d9977af51992b00d0479a7d9a4ffae" => :catalina - sha256 "d90e3ee5514064389cea2bdf1d4369cc2be4e1d965ac9d56f47e0c6e22f310af" => :mojave - sha256 "1d70f22fad80e061bcfa5d4955d522d37bd077c51cad4697579a104759233ad2" => :high_sierra - sha256 "de34071d033c87c731be7954d7c0ced87ddf086100c29fea07410d68621b9929" => :sierra - 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 e2dd29cd9e278..0000000000000 --- a/Formula/openslp.rb +++ /dev/null @@ -1,22 +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 "fee6eb82ad60bf1446278498ff8860584dcd2192a7505f3c57eec2bab55f337f" => :catalina - 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 91129deeb8085..0000000000000 --- a/Formula/openssh.rb +++ /dev/null @@ -1,79 +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-8.3p1.tar.gz" - mirror "https://mirror.vdms.io/pub/OpenBSD/OpenSSH/portable/openssh-8.3p1.tar.gz" - version "8.3p1" - sha256 "f2befbe0472fe7eb75d23340eb17531cb6b3aac24075e2066b41f814e12387b2" - - bottle do - sha256 "3f5a9e5b5bbf82235fb47f893b71f514b10adc344c7d3c0f57b3837cfa50458f" => :catalina - sha256 "d7b58684502abed77b364c5742ea4a1682e29e2df08d86a1ff6f249409e4b085" => :mojave - sha256 "a096eab677ff45aa7e4e1b7da4f2a0f7ebf34ff579d6bc679858cda8d482b6c8" => :high_sierra - end - - # Please don't resubmit the keychain patch option. It will never be accepted. - # https://archive.is/hSB6d#10%25 - - depends_on "pkg-config" => :build - depends_on "ldns" - depends_on "libfido2" - depends_on "openssl@1.1" - - 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/1860b0a745f1fe726900974845d1b0dd3c3398d6/openssh/patch-sandbox-darwin.c-apple-sandbox-named-external.diff" - sha256 "d886b98f99fd27e3157b02b5b57f3fb49f43fd33806195970d4567f12be66e71" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/patches/d8b2d8c2612fd251ac6de17bf0cc5174c3aab94c/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@1.1"].opt_prefix} - --with-security-key-builtin - ] - - 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") - - port = free_port - fork { exec sbin/"sshd", "-D", "-p", port.to_s } - sleep 2 - assert_match "sshd", shell_output("lsof -i :#{port}") - end -end diff --git a/Formula/openssl@1.1.rb b/Formula/openssl@1.1.rb deleted file mode 100644 index 2f1e5c708440e..0000000000000 --- a/Formula/openssl@1.1.rb +++ /dev/null @@ -1,105 +0,0 @@ -class OpensslAT11 < Formula - desc "Cryptography and SSL/TLS Toolkit" - homepage "https://openssl.org/" - url "https://www.openssl.org/source/openssl-1.1.1g.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/openssl-1.1.1g.tar.gz" - mirror "https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.1.1g.tar.gz" - sha256 "ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46" - version_scheme 1 - - bottle do - sha256 "1926679569c6af5337de812d86f4dad2b21ff883ad3a5d2cd9e8836ac5ac7ffe" => :catalina - sha256 "5c9d113393ff3efc95e5509175305fc9304fba35390a61915ed2864941c423f2" => :mojave - sha256 "eebad96faa46489dc8bf8502b16ec0192f5ff9d803794c9744ad50352bfca0f7" => :high_sierra - end - - keg_only :shadowed_by_macos, "macOS provides LibreSSL" - - # 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. - ENV["PERL"] = Formula["perl"].opt_bin/"perl" if which("perl") == Formula["perl"].opt_bin/"perl" - - arch_args = %w[darwin64-x86_64-cc enable-ec_nistp_64_gcc_128] - # Remove `no-asm` workaround when upstream releases a fix - # See also: https://github.com/openssl/openssl/issues/12254 - arch_args << "no-asm" if Hardware::CPU.arm? - - 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 pkgetc/"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/openstackclient.rb b/Formula/openstackclient.rb deleted file mode 100644 index c1f44ffaa1913..0000000000000 --- a/Formula/openstackclient.rb +++ /dev/null @@ -1,273 +0,0 @@ -class Openstackclient < Formula - include Language::Python::Virtualenv - - desc "OpenStack Client" - homepage "https://openstack.org/" - url "https://files.pythonhosted.org/packages/56/e9/eb6e88074b8c1f20a622b7cc7f7d1e4be0e81ddf22ceb49949f414bd52c6/python-openstackclient-5.2.1.tar.gz" - sha256 "7df547491f41f71f0b5f2c578a3837bbd6c93e5b3426d993b6fb85c1f48ae6e2" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "76bf0efebf0a8323b53693e09fbe1632b51b92b40380f571b971ec65b043ce80" => :catalina - sha256 "e293198da3ea11c9f2645bb810ed18d9269423cce915146f3b04ffbd2c46810b" => :mojave - sha256 "ec67e8a2c7674cab301b45c5240be5ad799390a99b2a5bd8f720401befed34da" => :high_sierra - end - - depends_on "python@3.8" - - 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/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "Babel" do - url "https://files.pythonhosted.org/packages/34/18/8706cfa5b2c73f5a549fdc0ef2e24db71812a2685959cff31cbdfc010136/Babel-2.8.0.tar.gz" - sha256 "1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b4/19/53433f37a31543364c8676f30b291d128cdf4cd5b31b755b7890f8e89ac8/certifi-2020.4.5.2.tar.gz" - sha256 "5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/c7/c4/38ea8a52809dd2fd7b6282d21bb17a5f3d13d79df57b53b96dddb41dc2b6/cliff-3.3.0.tar.gz" - sha256 "611595ad7b4bdf57aa252027796dac3273ab0f4bc1511e839cce230a351cb710" - end - - resource "cmd2" do - url "https://files.pythonhosted.org/packages/bc/38/c622733aceaaca9b1fb91ccbf8e2455cb1742fac6fe3255543d0ea1ece37/cmd2-1.1.0.tar.gz" - sha256 "d233b5ad4b9ee264a43fb14668f287d25f998f4b443a81b4efdfd292f1a77108" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "debtcollector" do - url "https://files.pythonhosted.org/packages/a1/09/d463e1514308f0c04a46cdcc2502fb2d652f6b19659a403d0592ae6e6f6f/debtcollector-2.1.0.tar.gz" - sha256 "a25fc6215560d81cb9f2a0b58d6c834f2a24010987027bde169599e138a205af" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "dogpile.cache" do - url "https://files.pythonhosted.org/packages/b5/02/9692c82808341747afc87a7c2b701c8eed76c05ec6bc98844c102a537de7/dogpile.cache-0.9.2.tar.gz" - sha256 "bc9dde1ffa5de0179efbcdc73773ef0553921130ad01955422f2932be35c059e" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "iso8601" do - url "https://files.pythonhosted.org/packages/45/13/3db24895497345fb44c4248c08b16da34a9eb02643cea2754b21b5ed08b0/iso8601-0.1.12.tar.gz" - sha256 "49c4b20e1f38aa5cf109ddcd39647ac419f928512c869dc01d5c7098eddede82" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz" - sha256 "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9" - end - - resource "jsonpatch" do - url "https://files.pythonhosted.org/packages/70/9f/6f0bfbb4cc1401ce994d336bcb4ed2aa924f395e7fd1926511c04a52eee1/jsonpatch-1.25.tar.gz" - sha256 "ddc0f7628b8bfdd62e3cbfbc24ca6671b0b6265b50d186c2cf3659dc0f78fd6a" - end - - resource "jsonpointer" do - url "https://files.pythonhosted.org/packages/52/e7/246d9ef2366d430f0ce7bdc494ea2df8b49d7a2a41ba51f5655f68cfe85f/jsonpointer-2.0.tar.gz" - sha256 "c192ba86648e05fdae4f08a17ec25180a9aef5008d973407b581798a83975362" - end - - resource "keystoneauth1" do - url "https://files.pythonhosted.org/packages/ba/b4/f9d85343fb7b268048bba893c20b9eaddcfe57b230a8169505cbe48107e9/keystoneauth1-4.0.0.tar.gz" - sha256 "02b283a662552cba65c1e6b5e89c06acfa242ff96355f59ab7def861e765a695" - end - - resource "msgpack" do - url "https://files.pythonhosted.org/packages/e4/4f/057549afbd12fdd5d9aae9df19a6773a3d91988afe7be45b277e8cee2f4d/msgpack-1.0.0.tar.gz" - sha256 "9534d5cc480d4aff720233411a1f765be90885750b07df772380b34c10ecb5c0" - end - - resource "munch" do - url "https://files.pythonhosted.org/packages/43/a1/ec48010724eedfe2add68eb7592a0d238590e14e08b95a4ffb3c7b2f0808/munch-2.5.0.tar.gz" - sha256 "2d735f6f24d4dba3417fa448cae40c6e896ec1fdab6cdb5e6510999758a4dbd2" - end - - resource "netaddr" do - url "https://files.pythonhosted.org/packages/47/1b/d115c8cfe20f33176982807a3624b82930ff508196f0d875f6985cd28911/netaddr-0.7.20.tar.gz" - sha256 "d09252e5aec3913815d77eb8e8ea8fa6eb33521253e52f977f6abaa964776f3e" - end - - resource "netifaces" do - url "https://files.pythonhosted.org/packages/0d/18/fd6e9c71a35b67a73160ec80a49da63d1eed2d2055054cc2995714949132/netifaces-0.10.9.tar.gz" - sha256 "2dee9ffdd16292878336a58d04a20f0ffe95555465fee7c9bd23b3490ef2abf3" - end - - resource "openstacksdk" do - url "https://files.pythonhosted.org/packages/90/99/3f72e506b12ae63e3a6e12eb320247783c95a93d0ab4751b42c160fadf1a/openstacksdk-0.46.0.tar.gz" - sha256 "a1617f00810a0ec1353e66e7da9fe9b4f926a830bb14b48643b6461b8808ef29" - 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/ad/71/ee714a1bc985f6153cf91941c1de9c7664d8d9527706344051e9f416f1e9/osc-lib-2.2.0.tar.gz" - sha256 "fcfce4d63a633c3161e2a6666764446e3f32668e814a94ab98da12e3908ee1d6" - end - - resource "oslo.config" do - url "https://files.pythonhosted.org/packages/2b/16/182a40587eaf4081e5ec6c9fd9b3d1fe4372b14f98ad462e4974654df6dc/oslo.config-8.2.0.tar.gz" - sha256 "116ff3a7b98b0309b083af7906d99f8c6bea67df5ee03a85e2ac02700dd75d30" - end - - resource "oslo.i18n" do - url "https://files.pythonhosted.org/packages/fe/40/8cbad079b6930ce7958af9187c208789bb77b90815eea6b01af169ea8f86/oslo.i18n-5.0.0.tar.gz" - sha256 "2e71ae3ec73a74ac71f8f407e6653243dc267eed404624255a296c34f1fc6887" - end - - resource "oslo.serialization" do - url "https://files.pythonhosted.org/packages/0f/42/3625893aee1450957caf49514810e13514c1b00b0cfbe2a08194bf392aa5/oslo.serialization-4.0.0.tar.gz" - sha256 "f465df171be564282cb3e86ec895f5b6ae5e5b0760e9af2be96a942a5255a860" - end - - resource "oslo.utils" do - url "https://files.pythonhosted.org/packages/a5/4e/cf7860e3390bf736d50c25f707bfadd9d615fc51afc9a101b941f59fec15/oslo.utils-4.2.1.tar.gz" - sha256 "4231498577d575053df8d05338127728226d862d98863a7c4e03ebcca55d72ad" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/8a/a8/bb34d7997eb360bc3e98d201a20b5ef44e54098bb2b8e978ae620d933002/pbr-5.4.5.tar.gz" - sha256 "07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c" - 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/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "pyperclip" do - url "https://files.pythonhosted.org/packages/f6/5b/55866e1cde0f86f5eec59dab5de8a66628cb0d53da74b8dbc15ad8dabda3/pyperclip-1.8.0.tar.gz" - sha256 "b75b975160428d84608c26edba2dec146e7799566aea42c1fe1b32e72b6028f2" - end - - resource "python-cinderclient" do - url "https://files.pythonhosted.org/packages/be/d7/850a47c96039b2f79175820c65f80038b68d51b70ba13f602c2892a62452/python-cinderclient-7.1.0.tar.gz" - sha256 "625d34dd6a3626f9a02e83af554441d96ff91ab20aa081412c7530c1e87ec642" - end - - resource "python-keystoneclient" do - url "https://files.pythonhosted.org/packages/c9/ec/5cce3af48ac2bd891e1ff7dcaffa2d7322b4438f2324fc3c1d0125c6cd10/python-keystoneclient-4.0.0.tar.gz" - sha256 "6d93efd494b43d8b4cd8a62281c82d3f02aa531c5523e6bbe7d696e37bc77ba8" - end - - resource "python-novaclient" do - url "https://files.pythonhosted.org/packages/f6/e3/37f1c627745149d38a4e4016b00b252fe4026d7f4aa8b14ebfd603d67e10/python-novaclient-17.0.0.tar.gz" - sha256 "3a0ab422f217eeb9043ba786ecb3925c8b66baa142195ed211db37c78eff3c5f" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - 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/70/e2/1344681ad04a0971e8884b9a9856e5a13cc4824d15c047f8b0bbcc0b2029/rfc3986-1.4.0.tar.gz" - sha256 "112398da31a3344dc25dbf477d8df6cb34f9278a94fee2625d89e4514be8bb9d" - end - - resource "simplejson" do - url "https://files.pythonhosted.org/packages/98/87/a7b98aa9256c8843f92878966dc3d8d914c14aad97e2c5ce4798d5743e07/simplejson-3.17.0.tar.gz" - sha256 "2b4b2b738b3b99819a17feaf118265d0753d5536049ea570b3c43b51c4701e81" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "stevedore" do - url "https://files.pythonhosted.org/packages/4e/a6/0c96ae5f3e817d3cff551a4ebce82da21452b8267dfbf00d6120e401e76d/stevedore-2.0.0.tar.gz" - sha256 "001e90cd704be6470d46cc9076434e2d0d566c1379187e7013eb296d3a6032d9" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/2e/30/268d9d3ed18439b6983a8e630cd52d81fd7460a152d6e801d1b8394e51a1/wcwidth-0.2.4.tar.gz" - sha256 "8c6b5b6ee1360b842645f336d9e5d68c55817c26d3050f46b235ef2bc650e48f" - end - - resource "wrapt" do - url "https://files.pythonhosted.org/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz" - sha256 "b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" - end - - def install - virtualenv_install_with_resources - end - - test do - system bin/"openstack", "-h" - output = shell_output("#{bin}/openstack server list 2>&1", 1) - assert_match "Missing value auth-url required", output - end -end diff --git a/Formula/opensubdiv.rb b/Formula/opensubdiv.rb deleted file mode 100644 index afaefb426ff5f..0000000000000 --- a/Formula/opensubdiv.rb +++ /dev/null @@ -1,44 +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_4_3.tar.gz" - sha256 "7b22eb27d636ab0c1e03722c7a5a5bd4f11664ee65c9b48f341a6d0ce7f36745" - license "Apache-2.0" - - bottle do - sha256 "ef8b813dc962503a90798c4327805730eb6eba3989dfa7a3a137ea6021777e56" => :catalina - sha256 "8b00f0fe55b6163755170a122fa3dbceaf740fe806ae6b856a37cd7b5928a856" => :mojave - sha256 "41f202b119fff15151d6d2c8259b71c94f9d129141fc16992e6b75552b0b1ec7" => :high_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 d4cbad84ca886..0000000000000 --- a/Formula/opentracing-cpp.rb +++ /dev/null @@ -1,29 +0,0 @@ -class OpentracingCpp < Formula - desc "OpenTracing API for C++" - homepage "https://opentracing.io/" - url "https://github.com/opentracing/opentracing-cpp/archive/v1.6.0.tar.gz" - sha256 "5b170042da4d1c4c231df6594da120875429d5231e9baa5179822ee8d1054ac3" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "151a5af54448492f668979eb3a0e9fb92e2e1a99cb6766ba3985a9a88f26526a" => :catalina - sha256 "5a10c35e98785ee6567c241e845e3fd24a2fa52f15ade1d4e6a91f939752bd8c" => :mojave - sha256 "7747ffc077d879fbbbf4509e65fcfc154f238c9c92482bf94d1fb176156be563" => :high_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 486c2d91a545d..0000000000000 --- a/Formula/opentsdb.rb +++ /dev/null @@ -1,142 +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" - license "LGPL-2.1" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "c7a7848d2299118c202814b09e6ca78e06633b37466b13fe345bd0473195331a" => :catalina - sha256 "11f786340e681f624b8377062449c2d71c6e2aaaec7c286acdac6d5d761c25d6" => :mojave - sha256 "61eb190b7e44b4cfad0c1aceb09bd56525195ae5ec87bf6c63108f4e373d5dcc" => :high_sierra - end - - depends_on "gnuplot" - depends_on "hbase" - depends_on :java => "1.8" - depends_on "lzo" - - 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" - fork do - $stderr.reopen(tsdb_err, "w") - $stdout.reopen(tsdb_out, "w") - exec("#{bin}/start-tsdb.sh") - end - sleep 15 - - 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 - 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 460f017d98483..0000000000000 --- a/Formula/openttd.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Openttd < Formula - desc "Simulation game based upon Transport Tycoon Deluxe" - homepage "https://www.openttd.org/" - url "https://cdn.openttd.org/openttd-releases/1.10.2/openttd-1.10.2-source.tar.xz" - sha256 "939c55d259fb13cb47dfb3244e8f7b9e2f723883ebb2119410d8a282724eb6f5" - license "GPL-2.0" - head "https://github.com/OpenTTD/OpenTTD.git" - - bottle do - cellar :any - sha256 "8acdc3d403b125fad2fc1ae5c59e37528fe98d47beb79cb0509a49ddbebce636" => :catalina - sha256 "1d6f2b4a6df282fbd53aa8a88ef3a722e3d5d3b4a8f82b306b3ad6851038fc1b" => :mojave - sha256 "4ea9ad94978b8f40c35e60ddca64de7795dc0faf36fb4967a676879ca8221444" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "lzo" - depends_on "xz" - - resource "opengfx" do - url "https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip" - sha256 "d419c0f5f22131de15f66ebefde464df3b34eb10e0645fe218c59cbc26c20774" - end - - resource "opensfx" do - url "https://cdn.openttd.org/opensfx-releases/0.2.3/opensfx-0.2.3-all.zip" - sha256 "6831b651b3dc8b494026f7277989a1d757961b67c17b75d3c2e097451f75af02" - end - - resource "openmsx" do - url "https://cdn.openttd.org/openmsx-releases/0.3.1/openmsx-0.3.1-all.zip" - sha256 "92e293ae89f13ad679f43185e83fb81fb8cad47fe63f4af3d3d9f955130460f5" - end - - def install - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - 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 2f6682f7e89b3..0000000000000 --- a/Formula/openvdb.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Openvdb < Formula - desc "Sparse volume processing toolkit" - homepage "https://www.openvdb.org/" - url "https://github.com/AcademySoftwareFoundation/openvdb/archive/v7.0.0.tar.gz" - sha256 "97bc8ae35ef7ccbf49a4e25cb73e8c2eccae6b235bac86f2150707efcd1e910d" - license "MPL-2.0" - revision 2 - head "https://github.com/AcademySoftwareFoundation/openvdb.git" - - bottle do - sha256 "a52e3f045f00380b3b3a0246d36e6f084b197df696c8b229e83772bda2ed3017" => :catalina - sha256 "b55dd56f20ba824ad2daa83d4ed41d656911e8b596e45f39d2ed953f04a3ac79" => :mojave - sha256 "a7d3e9cc992f2699b1dea70a51dbd9333b423113a1c8ca819265bbbb0df0d3ca" => :high_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 "https://artifacts.aswf.io/io/aswf/openvdb/models/cube.vdb/1.0.0/cube.vdb-1.0.0.zip" - sha256 "05476e84e91c0214ad7593850e6e7c28f777aa4ff0a1d88d91168a7dd050f922" - end - - def install - # 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 f23aba7c89c2f..0000000000000 --- a/Formula/openvpn.rb +++ /dev/null @@ -1,81 +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.9.tar.xz" - mirror "https://build.openvpn.net/downloads/releases/openvpn-2.4.9.tar.xz" - sha256 "641f3add8694b2ccc39fd4fd92554e4f089ad16a8db6d2b473ec284839a5ebe2" - - bottle do - sha256 "b4d2c905d810562fc11e83c226ed8572386482f1e856e0f8de3e5ff63ee00526" => :catalina - sha256 "315e55c0f3b2cdbf4c3e8545c98702e1c4eeff20bc37dbf89921389494b3ef54" => :mojave - sha256 "bb3ce3b1fbbdf51cf5a207d00a1f60d22eb9b98096595fb81c563dffac077c0f" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "lz4" - depends_on "lzo" - - depends_on "openssl@1.1" - depends_on "pkcs11-helper" - - def install - 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/operator-sdk.rb b/Formula/operator-sdk.rb deleted file mode 100644 index 22aa7cf89dcaa..0000000000000 --- a/Formula/operator-sdk.rb +++ /dev/null @@ -1,65 +0,0 @@ -class OperatorSdk < Formula - desc "SDK for building Kubernetes applications" - homepage "https://coreos.com/operators/" - url "https://github.com/operator-framework/operator-sdk.git", - :tag => "v0.18.2", - :revision => "f059b5e17447b0bbcef50846859519340c17ffad" - license "Apache-2.0" - head "https://github.com/operator-framework/operator-sdk.git" - - bottle do - rebuild 1 - sha256 "5b645526d83936c9b13eb77bdc5be0a28d299ddd70b8024a88848cfc20fde94c" => :catalina - sha256 "04379c383bbb7bbe2bdc4517c7fedd865ff2fef97a95d5e70532a3f04f7d8545" => :mojave - sha256 "9fee5fc8872a25065bb32febe4e4cb7fd8130242833a7a37c123e7f05b529c4e" => :high_sierra - end - - depends_on "go" - - def install - # TODO: Do not set GOROOT. This is a fix for failing tests when compiled with Go 1.13. - # See https://github.com/Homebrew/homebrew-core/pull/43820. - ENV["GOROOT"] = Formula["go"].opt_libexec - - ENV["GOPATH"] = buildpath - - dir = buildpath/"src/github.com/operator-framework/operator-sdk" - dir.install buildpath.children - [buildpath/".brew_home"] - dir.cd do - # Make binary - system "make", "install" - bin.install buildpath/"bin/operator-sdk" - - # Install bash completion - output = Utils.safe_popen_read("#{bin}/operator-sdk", "completion", "bash") - (bash_completion/"operator-sdk").write output - - # Install zsh completion - output = Utils.safe_popen_read("#{bin}/operator-sdk", "completion", "zsh") - (zsh_completion/"_operator-sdk").write output - - prefix.install_metafiles - end - end - - test do - # Use the offical golang module cache to prevent network flakes and allow - # this test to complete before timing out. - ENV["GOPROXY"] = "https://proxy.golang.org/" - - if build.stable? - version_output = shell_output("#{bin}/operator-sdk version") - assert_match "version: \"v#{version}\"", version_output - assert_match stable.specs[:revision], version_output - end - - # Create a new, blank operator - system "#{bin}/operator-sdk", "new", "test", "--repo=github.com/example-inc/app-operator" - - cd "test" do - # Add an example API resource. This exercises most of the various pieces - # of generation logic. - system "#{bin}/operator-sdk", "add", "api", "--api-version=app.example.com/v1alpha1", "--kind=AppService" - end - end -end diff --git a/Formula/ophcrack.rb b/Formula/ophcrack.rb deleted file mode 100644 index be07440d76d6e..0000000000000 --- a/Formula/ophcrack.rb +++ /dev/null @@ -1,32 +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://deb.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2" - sha256 "048a6df57983a3a5a31ac7c4ec12df16aa49e652a29676d93d4ef959d50aeee0" - revision 1 - - bottle do - cellar :any - sha256 "47361d9c18591930ce871fa3c7ab36eaa43003a8a5339238648787cdd748d962" => :catalina - sha256 "0bdbfbee37e693edff5fc8f71c52f1fb12d6dd07c1e64aa1a20401df0789853a" => :mojave - sha256 "a1061331c1e9b4a726c818005a3d795ba8c73b29ecd78a3828b5e5eafac18107" => :high_sierra - sha256 "6229ee0c1e44192fa0d513b7e72e5c72e7fbd29b5ad7f61cd5c5824d76d49105" => :sierra - end - - depends_on "openssl@1.1" - - uses_from_macos "expat" - - def install - system "./configure", "--disable-debug", - "--disable-gui", - "--with-libssl=#{Formula["openssl@1.1"].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 def96804d0d75..0000000000000 --- a/Formula/optipng.rb +++ /dev/null @@ -1,29 +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 "093c6a64c408594726d3bbf646394d1bec0ff05e95e8a71b7ca244afb67929ee" => :catalina - sha256 "150c2cace53963fa77b40e30e403fea731ac87ce3aa5bf0528205f3bcd0626ab" => :mojave - sha256 "b64e8d6bd75de2e40d481c7b0e816f45b0865e2dfa42f03e507f67607804ef2b" => :high_sierra - sha256 "416ce24daab37aaef4fecda949fc80bed2b1d9b9714406f972b093846578ab3a" => :sierra - sha256 "f59e3cedb808003915ee214f6487b968e3e6dcea669452f0a732fcced03aaa8f" => :el_capitan - end - - uses_from_macos "zlib" - - 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 91bc778d5cc28..0000000000000 --- a/Formula/opus-tools.rb +++ /dev/null @@ -1,44 +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 - rebuild 1 - sha256 "964b3493cffeb5e32411c7a34e1813e8e83e940419aca39f50be7db9b0c8fab2" => :catalina - sha256 "c4059aca471c3b1ec384323c1c801b844a2d2b61f17434ebc43c0accffde9f9b" => :mojave - sha256 "0f8828cf6044f2d7b0cac9c591295b420244e8f086dc0afae9ae5420e6be7cb9" => :high_sierra - end - - head do - url "https://gitlab.xiph.org/xiph/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 7060cbba6ce12..0000000000000 --- a/Formula/opus.rb +++ /dev/null @@ -1,60 +0,0 @@ -class Opus < Formula - desc "Audio codec" - homepage "https://www.opus-codec.org/" - url "https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz" - sha256 "65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d" - - bottle do - cellar :any - rebuild 1 - sha256 "5cb191f66da0ef2b8d03985c79cb18a59506aaba8a01cc0b1a821c293e88d576" => :catalina - sha256 "21fa4c22a63bccc5e188dabb9c85af63a57d19582c4f616716bccb063e2befec" => :mojave - sha256 "8b45ac09baae56bdc2c7ee224d5a1ae68efb826a9aec2220e0b27e8ce633b8aa" => :high_sierra - end - - head do - url "https://gitlab.xiph.org/xiph/opus.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", - "--disable-doc", "--prefix=#{prefix}" - 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 d4acbe88e1f92..0000000000000 --- a/Formula/opusfile.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Opusfile < Formula - desc "API for decoding and seeking in .opus files" - homepage "https://www.opus-codec.org/" - url "https://downloads.xiph.org/releases/opus/opusfile-0.12.tar.gz" - sha256 "118d8601c12dd6a44f52423e68ca9083cc9f2bfe72da7a8c1acb22a80ae3550b" - - bottle do - cellar :any - sha256 "c43c50e65738c25ef72af85e5509577314764c3dad0fb4c122704591d6f3a515" => :catalina - sha256 "8754dfcc9abec5de74e8cd7af31614c06e8208bd623f9ad5446048ad14218a97" => :mojave - sha256 "ff718107c425123a06270b62aa9a7bd3fee4f785d03dac21a58f7059720be22b" => :high_sierra - end - - head do - url "https://gitlab.xiph.org/xiph/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@1.1" - depends_on "opus" - - resource "music_48kbps.opus" do - url "https://www.opus-codec.org/static/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.install resource("music_48kbps.opus") - (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" - system "./test", "music_48kbps.opus" - end -end diff --git a/Formula/oq.rb b/Formula/oq.rb deleted file mode 100644 index 551d6fa1bf090..0000000000000 --- a/Formula/oq.rb +++ /dev/null @@ -1,34 +0,0 @@ -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/v1.1.2.tar.gz" - sha256 "1bd940a72af556a4e685086ca0d3a363d71e3cfedeffb36f865f38d44386f94a" - - bottle do - cellar :any - sha256 "916037c7be0a4d68aefc50766972bd9af94d1aed6c4f799464df7ddfc757597b" => :catalina - sha256 "0a75e9085381291184131f31551bbce6fce440587165a93ca577805fdb077a5c" => :mojave - sha256 "19d5820ecbf9fb4eba3f799c2bf0c1aca9924dcb3e7b82b041bf13c757d828fd" => :high_sierra - end - - depends_on "crystal" => :build - depends_on "jq" - depends_on "libevent" - depends_on "libyaml" - - 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_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/orbit.rb b/Formula/orbit.rb deleted file mode 100644 index 2ea8018f8dca3..0000000000000 --- a/Formula/orbit.rb +++ /dev/null @@ -1,39 +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" - revision 1 - - bottle do - rebuild 1 - sha256 "a604838d3a9e9690eceefb5f798aa5c02a6d46b5e1f1cbb50bbc5cc95df451e9" => :catalina - sha256 "367cb438ac5ee8c44cd932d259f82b43458af90df8df28803e2248ad75952800" => :mojave - sha256 "50487080b7e4614d077b4cbb818a726a7bae7a7a281fc85fabd6ff88ed848016" => :high_sierra - 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 46c9fdad59837..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.6.3/orc-tools-1.6.3-uber.jar" - sha256 "348503fdd3241ef22e3f306b36c308bd783637b9486d9d336072048414b7c918" - - 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 f685ea273d026..0000000000000 --- a/Formula/orc.rb +++ /dev/null @@ -1,28 +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.31.tar.xz" - sha256 "a0ab5f10a6a9ae7c3a6b4218246564c3bf00d657cbdf587e6d34ec3ef0616075" - - bottle do - cellar :any - sha256 "c4a11fbf1e2d645b0bbcbabc467c6f7fe604282833ece90264b063806a1e4909" => :catalina - sha256 "b9c58730d763ca611867504ff7005245e95ca435b027d85ff7f7471dc7431b59" => :mojave - sha256 "b732bc9e7fa9825222b0dda3dfdbe7f38cf45aeb46c239f432fc646d98079e76" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Dgtk_doc=disabled", ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - system "#{bin}/orcc", "--version" - end -end diff --git a/Formula/ori.rb b/Formula/ori.rb deleted file mode 100644 index 3ac08d6b1736f..0000000000000 --- a/Formula/ori.rb +++ /dev/null @@ -1,37 +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.2.tar.xz" - sha256 "a9b12ac23beaf259aa830addea11b519d16068f38c479f916b2747644194672c" - revision 2 - - bottle do - cellar :any - sha256 "7a7309ce9c2910c06ef1e1476ab733f72b561914e8fbac72fde592aef0e319e2" => :catalina - sha256 "2dc4c7383255f7d3abd165745afd4430aceb307448d2f7798cc2674697503e02" => :mojave - sha256 "181896615606cbb6a43a8d9cc5380290985c70c839d579db434c3cdf1e0d4582" => :high_sierra - sha256 "7808e13ef9dd8a689053855d6efbdfbed0e474d1474ac981e67d3aa9f75a0d6f" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "scons" => :build - depends_on "libevent" - depends_on "openssl@1.1" - depends_on :osxfuse - - # Patch adapted from upstream for OpenSSL 1.1 compatibility - # https://bitbucket.org/orifs/ori/pull-requests/7/adjust-to-libssl-api-changes-from-10-to-11/diff - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/ori/openssl-1.1.diff" - sha256 "234448ebdf393723fb077960e66c3f5768c93989f9d169816f17600ef64e8219" - end - - 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 0800b4f821167..0000000000000 --- a/Formula/orientdb.rb +++ /dev/null @@ -1,108 +0,0 @@ -class Orientdb < Formula - desc "Graph database" - homepage "https://orientdb.com/" - url "https://s3.us-east-2.amazonaws.com/orientdb3/releases/3.1.1/orientdb-3.1.1.zip" - sha256 "1538bfcc5d1a83e8a686be37950a69a2466d19eb824f754367a7b254c56b748f" - - bottle do - cellar :any_skip_relocation - sha256 "4dd8ac529ac0d88ebe0924e4c67ab6ec12e516286a503997061586e1c4a19164" => :catalina - sha256 "4dd8ac529ac0d88ebe0924e4c67ab6ec12e516286a503997061586e1c4a19164" => :mojave - sha256 "4dd8ac529ac0d88ebe0924e4c67ab6ec12e516286a503997061586e1c4a19164" => :high_sierra - end - - depends_on "maven" => :build - depends_on "openjdk" - - def install - rm_rf 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.com/docs/last/security/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 079b6921bfef8..0000000000000 --- a/Formula/orocos-kdl.rb +++ /dev/null @@ -1,43 +0,0 @@ -class OrocosKdl < Formula - desc "Orocos Kinematics and Dynamics C++ library" - homepage "https://orocos.org/" - url "https://github.com/orocos/orocos_kinematics_dynamics/archive/v1.4.0.tar.gz" - sha256 "05b93e759923684dc07433ccae1e476d158d89b3c2be5079c20062406da7b4dd" - - bottle do - cellar :any - sha256 "e65054479e7b34fd559f72f4485a5e34b57b457325bb8487576309ddad7a26fa" => :catalina - 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 adf0e6e3d4ba5..0000000000000 --- a/Formula/ortp.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Ortp < Formula - desc "Real-time transport protocol (RTP, RFC3550) library" - homepage "https://www.linphone.org/technical-corner/ortp" - url "https://gitlab.linphone.org/BC/public/ortp/-/archive/4.3.2/ortp-4.3.2.tar.bz2" - sha256 "1796a7faaaced1278fae55657686e7b9fee66ca4d9dabd8f1c83f21957fc002b" - license "GPL-3.0" - head "https://gitlab.linphone.org/BC/public/ortp.git" - - bottle do - sha256 "942d93781ca52a133ae19952fb044a6b02060cff30177a8525ab2a5e4a0991d4" => :catalina - sha256 "231dc8ca885b103e360e347498277f41c2fc0d446420b8c1324e00e301a8eedd" => :mojave - sha256 "ea6fc0e9626908e8a62b22cc86a2f87d513716c2091cfa52bac39c5c9c7a5d79" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "mbedtls" - - resource "bctoolbox" do - url "https://gitlab.linphone.org/BC/public/bctoolbox/-/archive/4.3.1/bctoolbox-4.3.1.tar.bz2" - sha256 "1b7ec1a7fa2af2a6741ebda7602c82996752aa46fb17d6c9ddb2ed0846872384" - 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 - - ENV.prepend_path "PKG_CONFIG_PATH", libexec/"lib/pkgconfig" - - args = std_cmake_args + %W[ - -DCMAKE_PREFIX_PATH=#{libexec} - -DCMAKE_C_FLAGS=-I#{libexec}/include - -DENABLE_DOC=NO - ] - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - 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}", "-I#{libexec}/include", "-L#{lib}", "-lortp", - testpath/"test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/ory-hydra.rb b/Formula/ory-hydra.rb deleted file mode 100644 index 6153f3fa311b1..0000000000000 --- a/Formula/ory-hydra.rb +++ /dev/null @@ -1,42 +0,0 @@ -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/archive/v1.5.2.tar.gz" - sha256 "50f7c09b1d6186ff35eed717c75f77884d038120f8096f5f0456526e49976a94" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "5bc6be9f9dbd75db15304fc8e6e2eda6c398d75831285afe42986022781c9ab7" => :catalina - sha256 "1dd0d349b402e1051ed828e1be9051af5e6cd816517c891d429d21bb576c1675" => :mojave - sha256 "aae2b39200e3a5debd9840e6d0845f8268df4ab867ce2f6396620c5c4272b70d" => :high_sierra - end - - depends_on "go" => :build - - conflicts_with "hydra", :because => "both install `hydra` binaries" - - def install - ENV["GOBIN"] = bin - system "make", "install" - end - - test do - admin_port = free_port - (testpath/"config.yaml").write <<~EOS - dsn: memory - serve: - public: - port: #{free_port} - admin: - port: #{admin_port} - EOS - - fork { exec bin/"hydra", "serve", "all", "--config", "config.yaml" } - sleep 5 - - endpoint = "https://127.0.0.1/#{admin_port}/" - output = shell_output("#{bin}/hydra clients list --endpoint #{endpoint} --skip-tls-verify") - assert_match "| CLIENT ID |", output - end -end diff --git a/Formula/osc.rb b/Formula/osc.rb deleted file mode 100644 index c061b17562b7a..0000000000000 --- a/Formula/osc.rb +++ /dev/null @@ -1,46 +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.169.1.tar.gz" - sha256 "ae87225d4ce3ca115a95188235ecd90b008b0e6b25b79ba818c5e7d09e7ec7d6" - license "GPL-2.0" - head "https://github.com/openSUSE/osc.git" - - bottle do - cellar :any - sha256 "c0b5be694e7a7be280746d507ab928392365d24c4f5130f5070e9da6169f744a" => :catalina - sha256 "452a9846612deb1fa4205b492152826ea3d11e0391dab3f6633f8fd04395313a" => :mojave - sha256 "ac1bb79ace0cc7eb7e5abe8bbb36cf67bbaaed1ce4b5d3d2dcbd360672308b44" => :high_sierra - end - - depends_on "swig" => :build - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "curl" - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "M2Crypto" do - url "https://files.pythonhosted.org/packages/74/18/3beedd4ac48b52d1a4d12f2a8c5cf0ae342ce974859fba838cbbc1580249/M2Crypto-0.35.2.tar.gz" - sha256 "4c6ad45ffb88670c590233683074f2440d96aaccb05b831371869fc387cbd127" - end - - def install - openssl = Formula["openssl@1.1"] - ENV["SWIG_FEATURES"] = "-I#{openssl.opt_include}" - - inreplace "osc/conf.py", "'/etc/ssl/certs'", "'#{openssl.pkgetc}/cert.pem'" - virtualenv_install_with_resources - 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 236eb91084d6e..0000000000000 --- a/Formula/oscats.rb +++ /dev/null @@ -1,24 +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 4 - - bottle do - cellar :any - sha256 "275703a9a65db9ab2a972eed4ff974f187ba2f7549305540189807c967cb45e7" => :catalina - sha256 "6e4434a738c9cce8524c2fc344c82599d11ae17621cd7cc3f506db07cbbbea5b" => :mojave - sha256 "41402210d7c753b1e13e2cf549bc805d219811b543b494940537e038c205fd41" => :high_sierra - sha256 "8ac60125dc045b55d30b3859da251f7df9004c0b8a8d32b3c10282b78becacc7" => :sierra - 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 69dc36b351665..0000000000000 --- a/Formula/osm-gps-map.rb +++ /dev/null @@ -1,87 +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" - license "GPL-2.0" - revision 4 - - bottle do - sha256 "41017b3853def67e1f6934c3221f332615e7d23164cd83905d60d5fbdf772cca" => :catalina - sha256 "b875524242e2a476b29bcce97b8455823d7ead1c437407609bc936f0ccaded12" => :mojave - sha256 "0cd54fa291d41f94f0387c64099ef26c1192c7abb1aab5bb5d36d642e14044c6" => :high_sierra - 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"] - harfbuzz = Formula["harfbuzz"] - 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#{harfbuzz.opt_include}/harfbuzz - -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 bbbbe56225659..0000000000000 --- a/Formula/osm-pbf.rb +++ /dev/null @@ -1,28 +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 "db4cb3b0e482ef14c640c0b0bad82b0a766a6552d165920af671c04ba5b4af4f" => :catalina - sha256 "3199cc807995df84916d63c216d0a2793ed8af5513bed9488d397e4efcf745c2" => :mojave - sha256 "68e5bf0c9924719525b0522da2656ae43a7cdb11bcdf3a6c05e481c3f5b242ec" => :high_sierra - sha256 "c4f104fa72861e982b9071e656675a3ed3c4bf2d37fddeab3c5eb952d7864d9b" => :sierra - sha256 "6e6902ebcdb50d95ab0aeeb9fcc086956eb768110f1646839dba876b1f31c643" => :el_capitan - end - - depends_on "protobuf" - - 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 14fdd1808f751..0000000000000 --- a/Formula/osm2pgrouting.rb +++ /dev/null @@ -1,34 +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" - revision 2 - head "https://github.com/pgRouting/osm2pgrouting.git" - - bottle do - cellar :any - sha256 "99b349358db3adfb8a52dfcd2cfde049cecd5cea0b46cc6fa2a4fb6e2e9b4523" => :catalina - sha256 "c99a46012e8a582678e3b28e73f8c570606477d2b76d125dee5070fde5516b5c" => :mojave - sha256 "1ec262b471c1dd25b7609b5c36b53798375fb5d1015eb0d968a8023a698ed113" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "expat" - depends_on "libpqxx@6" - 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 78740d6fb87e8..0000000000000 --- a/Formula/osm2pgsql.rb +++ /dev/null @@ -1,44 +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/1.2.2.tar.gz" - sha256 "fc386fc996f24e67cbfb4963de438b2a80c82c9a46f6ca17ade69c7d562d8680" - license "GPL-2.0" - head "https://github.com/openstreetmap/osm2pgsql.git" - - bottle do - sha256 "4780322e6a538730d945e40f3be991101a33e7326d4e0c847f0bd86237ae78b1" => :catalina - sha256 "d2a2fb8456cc3f62e16ea412c27beef6681036ea64a33a0eb3b6a70e0b4069b9" => :mojave - sha256 "4154c1bd9f91b7f72df47570a36208b5ae3b233c7b200dce4d4ce5a99d05a3a0" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "geos" - depends_on "lua" - depends_on "luajit" - depends_on "postgresql" - depends_on "proj" - - 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", "LUA_VERSIONS5 5.3 5.2 5.1 5.0", - "LUA_VERSIONS5 #{lua_version}" - - # Use Proj 6.0.0 compatibility headers - # https://github.com/openstreetmap/osm2pgsql/issues/922 - # and https://github.com/osmcode/libosmium/issues/277 - ENV.append_to_cflags "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" - - mkdir "build" do - system "cmake", "-DWITH_LUAJIT=ON", "..", *std_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 31920c6341087..0000000000000 --- a/Formula/osmfilter.rb +++ /dev/null @@ -1,42 +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" - license "AGPL-3.0" - head "https://gitlab.com/osm-c-tools/osmctools.git" - - bottle do - cellar :any_skip_relocation - sha256 "5e2b755a970b7432fb076d787cb1777df18861832d0e4d45132fd84e4d7aea20" => :catalina - sha256 "470532603de299b9073f5511b8be798558d430f86ba4f37b330a497ec9fdae48" => :mojave - sha256 "b2e2d4190462b0b0e473da4a50ab5e25da007aca21db898d2d359e9e9eb2cde7" => :high_sierra - sha256 "d7a8285fe18af71d0093b89e9b5613a4fe30ceb4978e07f61ad1974e734d7f50" => :sierra - sha256 "6a0fd608e0bc8094f08edb6f86a51b45745506d3ef84e0454ef1498dd77f61b0" => :el_capitan - 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", "-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 a0d8139a4dd86..0000000000000 --- a/Formula/osmium-tool.rb +++ /dev/null @@ -1,47 +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.12.1.tar.gz" - sha256 "c8945b2b85fda7898faaf97b57faf759a06a4cf6a2c591f857779dcc503f32f2" - - bottle do - cellar :any - sha256 "5bc39388890c18e37d0fa87b1644a7f3768860721980ac324fe5737d411eefca" => :catalina - sha256 "67e2e3075ab367207375d3d84dcd4c5cd014757fcae8213787cf45b3a2e262d0" => :mojave - sha256 "b892d8dabfb211da58b6a3e2ffa6a5a65c2d5f8ceb481979fa14667be4a1ba62" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libosmium" => :build - depends_on "boost" - - uses_from_macos "expat" - - 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 cb739cf798ae4..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://github.com/openstreetmap/osmosis/releases/download/0.48.1/osmosis-0.48.1.tgz" - sha256 "6e205738ceefbd41751cb9e3de04a249b0cc18c9c506ea05b2b37ed453a8d6d4" - - 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/ospray.rb b/Formula/ospray.rb deleted file mode 100644 index 0fafb2f8b95c7..0000000000000 --- a/Formula/ospray.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Ospray < Formula - desc "Ray-tracing-based rendering engine for high-fidelity visualization" - homepage "https://www.ospray.org/" - url "https://github.com/ospray/ospray/archive/v2.1.1.tar.gz" - sha256 "342061794dd0851f1580e53256c8e506b4e0950dd67209e1df573694c4d85e6f" - license "Apache-2.0" - head "https://github.com/ospray/ospray.git" - - bottle do - cellar :any - sha256 "c8c5b0e3f26cde1dececff86042892c96e85421afc71d76f4c52d5ca587aefd1" => :catalina - sha256 "74c6cd09e7a63e0f31cc5045f9f1d9c298a6d3a470ed8db837f9683e707e0f75" => :mojave - end - - depends_on "cmake" => :build - depends_on "ispc" => :build - depends_on "embree" - depends_on :macos => :mojave # Needs embree bottle built with SSE4.2. - depends_on "tbb" - - resource "ospcommon" do - url "https://github.com/ospray/ospcommon/archive/v1.3.1.tar.gz" - sha256 "1c043c4a09e68fb7319db61f28a5830fc09f1457b24155a42b5f7c6421bcca73" - end - - resource "openvkl" do - url "https://github.com/openvkl/openvkl/archive/v0.9.0.tar.gz" - sha256 "06aa82c8c3ff68ab93fb8240f4881a1bc238b3de681812e71145f8a1629d3fee" - end - - def install - resources.each do |r| - r.stage do - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DBUILD_EXAMPLES=OFF", - "-DBUILD_TESTING=OFF" - system "make" - system "make", "install" - end - end - end - - args = std_cmake_args + %W[ - -DCMAKE_INSTALL_NAME_DIR=#{opt_lib} - -DCMAKE_INSTALL_RPATH=#{opt_lib} - -DOSPRAY_ENABLE_APPS=OFF - -DOSPRAY_ENABLE_TESTING=OFF - -DOSPRAY_ENABLE_TUTORIALS=OFF - ] - - mkdir "build" do - system "cmake", *args, ".." - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main(int argc, const char **argv) { - OSPError error = ospInit(&argc, argv); - assert(error == OSP_NO_ERROR); - ospShutdown(); - return 0; - } - EOS - - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lospray" - system "./a.out" - end -end diff --git a/Formula/osqp.rb b/Formula/osqp.rb deleted file mode 100644 index 4cc39c9782585..0000000000000 --- a/Formula/osqp.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Osqp < Formula - desc "Operator splitting QP solver" - homepage "https://osqp.org/" - url "https://github.com/oxfordcontrol/osqp/archive/v0.6.0.tar.gz" - sha256 "6e00d11d1f88c1e32a4419324b7539b89e8f9cbb1c50afe69f375347c989ba2b" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "50feea323216bf8cc5d8dda92264a9354d547b5076d4c3b37b75792d0ac14c3f" => :catalina - sha256 "99a2f2810fc34c0241c0bc4a7bc31704a5b1ccc8201d112735e75cda14bb4bca" => :mojave - sha256 "2f50e046d34b7556891c7351aeab94347d1404b4ac1dcb041c413c4fb42bf16d" => :high_sierra - end - - depends_on "cmake" => [:build, :test] - - resource "qdldl" do - url "https://github.com/oxfordcontrol/qdldl/archive/v0.1.3.tar.gz" - sha256 "a2c3a7d0c6a48b2fab7400fa8ca72a34fb1e3a19964b281c73564178f97afe54" - end - - def install - # Install qdldl git submodule not included in release source archive. - (buildpath/"lin_sys/direct/qdldl/qdldl_sources").install resource("qdldl") - - args = *std_cmake_args + %w[ - -DENABLE_MKL_PARDISO=OFF - ] - - mkdir "build" do - system "cmake", *args, ".." - system "make" - system "make", "install" - end - - # Remove unnecessary qdldl install. - rm_rf include/"qdldl" - rm_rf lib/"cmake/qdldl" - rm lib/"libqdldl.a" - rm lib/"libqdldl.dylib" - end - - test do - (testpath/"CMakeLists.txt").write <<~EOS - cmake_minimum_required(VERSION 3.2 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) - add_executable(osqp_demo_static osqp_demo.c) - target_link_libraries(osqp_demo_static PRIVATE osqp::osqpstatic) - EOS - # from https://github.com/oxfordcontrol/osqp/blob/HEAD/tests/demo/test_demo.h - (testpath/"osqp_demo.c").write <<~EOS - #include - #include - int main() { - c_float P_x[3] = { 4.0, 1.0, 2.0, }; - c_int P_nnz = 3; - c_int P_i[3] = { 0, 0, 1, }; - c_int P_p[3] = { 0, 1, 3, }; - c_float q[2] = { 1.0, 1.0, }; - c_float A_x[4] = { 1.0, 1.0, 1.0, 1.0, }; - c_int A_nnz = 4; - c_int A_i[4] = { 0, 1, 0, 2, }; - c_int A_p[3] = { 0, 2, 4, }; - c_float l[3] = { 1.0, 0.0, 0.0, }; - c_float u[3] = { 1.0, 0.7, 0.7, }; - c_int n = 2; - c_int m = 3; - c_int exitflag; - OSQPSettings *settings = (OSQPSettings *)c_malloc(sizeof(OSQPSettings)); - OSQPWorkspace *work; - OSQPData *data; - data = (OSQPData *)c_malloc(sizeof(OSQPData)); - data->n = n; - data->m = m; - data->P = csc_matrix(data->n, data->n, P_nnz, P_x, P_i, P_p); - data->q = q; - data->A = csc_matrix(data->m, data->n, A_nnz, A_x, A_i, A_p); - data->l = l; - data->u = u; - osqp_set_default_settings(settings); - exitflag = osqp_setup(&work, data, settings); - assert(exitflag == 0); - osqp_solve(work); - assert(work->info->status_val == OSQP_SOLVED); - osqp_cleanup(work); - c_free(data->A); - c_free(data->P); - c_free(data); - c_free(settings); - return 0; - } - EOS - system "cmake", "." - system "make" - system "./osqp_demo" - system "./osqp_demo_static" - end -end diff --git a/Formula/osquery.rb b/Formula/osquery.rb deleted file mode 100644 index 47b5a2fde3e77..0000000000000 --- a/Formula/osquery.rb +++ /dev/null @@ -1,150 +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.2.tar.gz" - sha256 "74280181f45046209053a3e15114d93adc80929a91570cc4497931cfb87679e4" - revision 16 - - bottle do - cellar :any - sha256 "ea852c037cabbc09798dcdba8ce675e49d56f3a576b3b1fbf541bd9ca40ba1d1" => :catalina - sha256 "ec9daadf541bd30127bef694fc8e1ad1689de9338936ddbf28a0a138d25890b0" => :mojave - sha256 "9c70ccbcc111293ceddc2421035cf6b0748709d96979c3db01a5d8dee1053db4" => :high_sierra - end - - disable! - - depends_on "bison" => :build - depends_on "cmake" => :build - depends_on "python@3.8" => :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@1.1" - depends_on "rapidjson" - depends_on "rocksdb" - depends_on "sleuthkit" - depends_on "ssdeep" - depends_on "thrift" - depends_on "xz" - depends_on "yara" - depends_on "zstd" - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - 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.4.55.tar.gz" - sha256 "0a70c2998d29cc4d8a4db08aac58eb196d404073f6586a136d074730317fe408" - end - - # Upstream fix for boost 1.69, remove in next version - # https://github.com/facebook/osquery/pull/5496 - patch do - url "https://github.com/facebook/osquery/commit/130b3b3324e2.diff?full_index=1" - sha256 "46bce0c62f1a8f0df506855049991e6fceb6d1cc4e1113a2f657e76b5c5bdd14" - end - - # Patch for compatibility with OpenSSL 1.1 - # submitted upstream: https://github.com/osquery/osquery/issues/5755 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/osquery/openssl-1.1.diff" - sha256 "18ace03c11e06b0728060382284a8da115bd6e14247db20ac0188246e5ff8af4" - 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 - - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", buildpath/"third-party/python/lib/python#{xy}/site-packages" - - res = resources.map(&:name).to_set - %w[aws-sdk-cpp third-party] - res.each do |r| - resource(r).stage do - system Formula["python@3.8"].opt_bin/"python3", - "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 c6529e9f4d87b..0000000000000 --- a/Formula/osrm-backend.rb +++ /dev/null @@ -1,70 +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.22.0.tar.gz" - sha256 "df0987a04bcf65d74f9c4e18f34a01982bf3bb97aa47f9d86cfb8b35f17a6a55" - license "BSD-2-Clause" - revision 2 - head "https://github.com/Project-OSRM/osrm-backend.git" - - bottle do - cellar :any - rebuild 1 - sha256 "12ec9670281dc1918f3d22cd39fc8f710008ee729b9997d65c10b6cfd4d6de1d" => :catalina - sha256 "db542349d5f721c7746b8222902d451828d593d7fe8d2b9235a6eb31ca3fffbc" => :mojave - sha256 "b43652ac087d596ecb02d922a88e9fc82769bf2d8a55be424ca6102807a03e45" => :high_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 8188f282ade78..0000000000000 --- a/Formula/osslsigncode.rb +++ /dev/null @@ -1,34 +0,0 @@ -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/2.0.tar.gz" - sha256 "5a60e0a4b3e0b4d655317b2f12a810211c50242138322b16e7e01c6fbb89d92f" - revision 1 - - bottle do - cellar :any - sha256 "9f9d6f343dc0a7e6ecf34a27e97049b62952e5a05319b1f7aa4c235cf793fc5e" => :catalina - sha256 "cf48ec533b5cc0db3cf56903091936822c422d484371c28b2397bd02bd3bdbbb" => :mojave - sha256 "5999a97a256941d082e171faceb5cbf7fb54720031d71cc1c086d8d08d18ff01" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libgsf" - depends_on "openssl@1.1" - - uses_from_macos "curl" - - def install - system "./autogen.sh" - system "./configure", "--with-gsf", "--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 00943e2645d06..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://deb.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 "fd727fb38c48eda8d6bcb36be17e281b2152a54144298d39cab50ec7743e8a95" => :catalina - 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/osx-cpu-temp.rb b/Formula/osx-cpu-temp.rb deleted file mode 100644 index 713e1de834167..0000000000000 --- a/Formula/osx-cpu-temp.rb +++ /dev/null @@ -1,24 +0,0 @@ -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/1.1.0.tar.gz" - sha256 "94b90ce9a1c7a428855453408708a5557bfdb76fa45eef2b8ded4686a1558363" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e1df41402ed817941f591a5cc094fe4491b092de8d5177dd363eccecff811bec" => :catalina - sha256 "c0301d2c47c23bc8ed0042fbaf447e82ca8dbbf10b1939d9a4f684961a24d0d2" => :mojave - sha256 "2255aa28242ce07a62fc0eabaf146592fb70745e641cfc775a21f99841cec625" => :high_sierra - sha256 "d68a47b126eaee8f75d281785322877055187f89540eb2744b9cd4da15ca6a69" => :sierra - end - - 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/osxutils.rb b/Formula/osxutils.rb deleted file mode 100644 index c54c51d6d0fe8..0000000000000 --- a/Formula/osxutils.rb +++ /dev/null @@ -1,26 +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" - license "GPL-2.0" - head "https://github.com/specious/osxutils.git" - - bottle do - cellar :any_skip_relocation - sha256 "95f394fa7721dc587b75adcb0a698c32858bfabf04bb569b6bf6ab0d7f52fb03" => :catalina - 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/otf2.rb b/Formula/otf2.rb deleted file mode 100644 index 528f89b70d225..0000000000000 --- a/Formula/otf2.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Otf2 < Formula - desc "Open Trace Format 2 file handling library" - homepage "https://www.vi-hps.org/projects/score-p/" - url "https://www.vi-hps.org/cms/upload/packages/otf2/otf2-2.2.tar.gz" - sha256 "d0519af93839dc778eddca2ce1447b1ee23002c41e60beac41ea7fe43117172d" - revision 1 - - bottle do - sha256 "4c532e5cb9864669bc29b6ad5007669c92a6abb3e069d7904ab3b102169ec2bc" => :catalina - sha256 "ec63ae3bd66e7231b05f6bbd5ce8b0606126ad25e871f59d9e066fa62b9e26d8" => :mojave - sha256 "dbf4c3c761e51a184a675d369a54dea5247d25d96e78899ca3b268a04c629c48" => :high_sierra - end - - depends_on "sphinx-doc" => :build - depends_on "gcc" - depends_on "open-mpi" - depends_on "python@3.8" - - resource "future" do - url "https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz" - sha256 "b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" - end - - def install - python3 = Formula["python@3.8"].opt_bin/"python3" - xy = Language::Python.major_minor_version python3 - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - - resource("future").stage do - system python3, *Language::Python.setup_install_args(libexec/"vendor") - end - ENV["PYTHON"] = python3 - ENV["SPHINX"] = Formula["sphinx-doc"].opt_bin/"sphinx-build" - - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "install" - 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_predicate workdir/p, :exist? } - system "./otf2_writer_example" - assert_predicate workdir/"ArchivePath/ArchiveName.otf2", :exist? - system "./otf2_reader_example" - rm_rf "./ArchivePath" - system Formula["open-mpi"].opt_bin/"mpirun", "-n", "2", "./otf2_mpi_writer_example" - assert_predicate workdir/"ArchivePath/ArchiveName.otf2", :exist? - (0...2).each do |n| - assert_predicate workdir/"ArchivePath/ArchiveName/#{n}.evt", :exist? - end - system Formula["open-mpi"].opt_bin/"mpirun", "-n", "2", "./otf2_mpi_reader_example" - system "./otf2_reader_example" - rm_rf "./ArchivePath" - system "./otf2_pthread_writer_example" - assert_predicate workdir/"ArchivePath/ArchiveName.otf2", :exist? - system "./otf2_reader_example" - end - end -end diff --git a/Formula/otf2bdf.rb b/Formula/otf2bdf.rb deleted file mode 100644 index a1ac7c8ef014c..0000000000000 --- a/Formula/otf2bdf.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Otf2bdf < Formula - desc "OpenType to BDF font converter" - homepage "http://sofia.nmsu.edu/~mleisher/Software/otf2bdf/" - url "http://sofia.nmsu.edu/~mleisher/Software/otf2bdf/otf2bdf-3.1.tbz2" - sha256 "3d63892e81187d5192edb96c0dc6efca2e59577f00e461c28503006681aa5a83" - - bottle do - cellar :any - rebuild 1 - sha256 "200d4f317f5fda0c3c4a350ba773322af4a29af56a65f9e3de11b406ab517522" => :catalina - sha256 "76e89f43b017f0bc2f90c3d49e70d75ac9da5260b9567d1078449f1b80af60bf" => :mojave - sha256 "208ef317e3c51e88818c4f59ca0333a76d6efeed97b04affe66c3cd6b601bada" => :high_sierra - end - - depends_on "freetype" - - resource "mkinstalldirs" do - url "http://sofia.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 c78fde0206f27..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.31.tar.gz" - sha256 "3203f1b3eeb30e6aead9f63f6df22f5ead2407964ac9bb3cd5b0ae78df4568f8" - revision 1 - head "https://github.com/ott-lang/ott.git" - - bottle do - cellar :any_skip_relocation - sha256 "22f441ac37e494c9b667838b43e87f820dcf2fe090c4794db7eb0cc3cbd514a6" => :catalina - sha256 "7f4274253521ef41f38b674247906a6f9567dce515c80a5150111a1da0dc5caf" => :mojave - sha256 "a59bb92116efa3e1b7c13da59a95dd7ad7a2618c6efc4b09d74a59001478bde5" => :high_sierra - 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 d717dce91b3ff..0000000000000 --- a/Formula/overmind.rb +++ /dev/null @@ -1,31 +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/v2.1.1.tar.gz" - sha256 "250d60bebb5d353b449a34f4eae7e036e0b6f46bd23b2c7b8d333acff7c7a615" - license "MIT" - head "https://github.com/DarthSim/overmind.git" - - bottle do - cellar :any_skip_relocation - sha256 "92947cadb4c81d86710dd03679ee41323c0a15481349f3d381c40551e9dc564c" => :catalina - sha256 "173ee92b1df1bb52c09e0e7dcb7949774ed8abaa022a66f0d8d04699ab83f9b7" => :mojave - sha256 "be3a5f096fd9495c2cdd4835751d759568a7cf1f16b85768b5dd3c1d73b9f40d" => :high_sierra - end - - depends_on "go" => :build - depends_on "tmux" - - def install - system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"overmind" - prefix.install_metafiles - 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 = "test message" - 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 e4d1ae7161a88..0000000000000 --- a/Formula/owamp.rb +++ /dev/null @@ -1,55 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "a7bce114bb407f1663671ee68793b7751d512e0451cf9bbf35c1f36ad9b4c3f9" => :catalina - 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 0b5abd3375737..0000000000000 --- a/Formula/owfs.rb +++ /dev/null @@ -1,38 +0,0 @@ -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.2p3/owfs-3.2p3.tar.gz" - version "3.2p3" - sha256 "b8d33eba57d4a2f6c8a11ff23f233e3248bd75a42c8219b058a888846edd8717" - revision 1 - - bottle do - cellar :any - sha256 "2b3d52a12424dddee938a0fe9a4620938b4c01a0989f68f34efb5eadb2098bcb" => :catalina - sha256 "118ad185bc83ac080c485e1572c5dbf9118c5620a89076e7c2715a45f07684c8" => :mojave - sha256 "63f73726171fbc413a80a30581a604a68f6371d05d86db9a848d1ddbf5cb7913" => :high_sierra - sha256 "76c620684afb471f5d348badbc1c7429054b348c8ebe4a8c4f70b02b3ab26374" => :sierra - 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/oxipng.rb b/Formula/oxipng.rb deleted file mode 100644 index 874da7367602a..0000000000000 --- a/Formula/oxipng.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Oxipng < Formula - desc "Multithreaded PNG optimizer written in Rust" - homepage "https://github.com/shssoichiro/oxipng" - url "https://github.com/shssoichiro/oxipng/archive/v3.0.0.tar.gz" - sha256 "fd7584299375a630322b152878756297b0083492b7e4b9b17ae9978662e8c36a" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "efec4545006c363b196773b0667a80a2894b020b8fe83e8fa63c3b2494193b25" => :catalina - sha256 "3bdd648e50bad274f4616a7445d482752526df13f924623ba653031568b73c57" => :mojave - sha256 "ed093c935c899acb8ae58b23611e383eb54e48b7fb645ad71b42344c6fd4275a" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - system "#{bin}/oxipng", "--pretend", test_fixtures("test.png") - 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..34658a3d53d40 --- /dev/null +++ b/Formula/p/p0f.rb @@ -0,0 +1,65 @@ +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 + + bottle do + rebuild 3 + 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..f1d36e3fac282 --- /dev/null +++ b/Formula/p/p11-kit.rb @@ -0,0 +1,63 @@ +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.5/p11-kit-0.25.5.tar.xz" + sha256 "04d0a86450cdb1be018f26af6699857171a188ac6d5b8c90786a60854e1198e5" + license "BSD-3-Clause" + + bottle do + rebuild 1 + sha256 arm64_sequoia: "a411c523067edccdf5288ff53f725d590c60d0a182f1e69238fcfc86018f3395" + sha256 arm64_sonoma: "844c2f2f63155c6da1a6af44030866700c57981c974f71f4159a6d794e05fcfc" + sha256 arm64_ventura: "97ccac96157529edec341b35d57e6ca9579fb25f42d62bb573a1013572101eed" + sha256 arm64_monterey: "aab401574960e088578df801ab10d600bfe6277f6d174bfc1bf90ea8348529e8" + sha256 sonoma: "38423db237bdda5e2485a28e5f30c106f324c440d64a4e10bffb5fc997d91aa6" + sha256 ventura: "ab67e4c145d61683447ef09ec9315bd22cc95efa699bbac9e2fc476104a579c0" + sha256 monterey: "25fc56254568c72ad22c39c2768ca249992df53a9da2cbeee55ac221f67e1ae3" + sha256 arm64_linux: "630a4eaece70b3e7d8d0330018e955ea2ffa3fb84263a48aec0056cef5c2e1cf" + sha256 x86_64_linux: "65efc1a95ab97b86e0eb36f2e8782d3f6140d795f3bc33cb6e20267d5fee45f0" + 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", since: :catalina + + 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..c9c2f2bba2a69 --- /dev/null +++ b/Formula/p/p7zip.rb @@ -0,0 +1,70 @@ +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_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..bc7fec9284c8b --- /dev/null +++ b/Formula/p/pachi.rb @@ -0,0 +1,50 @@ +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" + + bottle do + 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| + unless build.head? + 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..09776ed8244a2 --- /dev/null +++ b/Formula/p/packcc.rb @@ -0,0 +1,39 @@ +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 "9f4d486ff34ff191cb01bd6ac41e707e93a90a581f997d45414422958af142f6" + license "MIT" + head "https://github.com/arithy/packcc.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "3d37ed91a62162fbb2cfb2d37e196177a3584e43c18bfb938be202052a8219b3" + sha256 arm64_sonoma: "21241274aba27be73f8ff6390bb869d8156fa6d10600fef5b1700c14a4ced794" + sha256 arm64_ventura: "ec0467faea2cfa65c990ceb31fe1abfd7ed10ede453ba4544b8f445d241af1bb" + sha256 sonoma: "30b0c8452bd024c265e2199bfbde85b7d87def62dbf6f7138ef4109feeff8286" + sha256 ventura: "8798726082b26db0a5d03b25f0e4928d91f7f2f44ca2a8d735e6df20e7c95eb0" + sha256 x86_64_linux: "9cff89541011aba3df7ed2ee6cc72c08fd3afce9ab9cecb82a57c1d812ab7609" + 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/packer.rb b/Formula/p/packer.rb new file mode 100644 index 0000000000000..45a3502a24596 --- /dev/null +++ b/Formula/p/packer.rb @@ -0,0 +1,72 @@ +class Packer < Formula + desc "Tool for creating identical machine images for multiple platforms" + homepage "https://packer.io/" + # NOTE: Do not bump to 1.10.0 as license changed to BUSL-1.1 + # https://github.com/hashicorp/packer/pull/12568 + # https://github.com/hashicorp/packer/pull/12575 + url "https://github.com/hashicorp/packer/archive/refs/tags/v1.9.4.tar.gz" + sha256 "c07db8375190668571077784f4a650514d6ef879ae45cb4c3c1717ad8308c47e" + license "MPL-2.0" + head "https://github.com/hashicorp/packer.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d67db7e0fdf90d1d7531d79c42383ded2451fe88b6c3da67342a3b29e2cda2f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a88ef4032fc80f0347ece6d35b91a41ebed9aed3ed04af63d1dd03e809d324aa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e14a06bebe83306fa56aade8483619adaf96fd85fb1a00ee7b6369b55b631995" + sha256 cellar: :any_skip_relocation, arm64_monterey: "05ab86d40ff440b8ccc078834079db25b5c1b68503e43cd6a04770dd73a6630c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "e645398c3ce8a27db807c07d120d260a659edf07fd3a922820a7d14c6a0d1da3" + sha256 cellar: :any_skip_relocation, sonoma: "58511c7a5f98921bbd6eb7ec41547ad2d1e5d2e6cb62c2ea5dbcbdc4f64c46d1" + sha256 cellar: :any_skip_relocation, ventura: "3a0ca5788a1c761f798a042d914b62249f29e40c360192531eb6e2ba4701773f" + sha256 cellar: :any_skip_relocation, monterey: "5c93d433afad1eda9266a8306f0af89821bd514936acff2110457e3c2fa1c39d" + sha256 cellar: :any_skip_relocation, big_sur: "0300b120685c80a97e1d4059e9fca8005dfeb45313d5499935bd782bb592288c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd24e327731cd263982ff7b0b47e6c9d4ac253c7b3da82ad79d15f182abed659" + end + + # https://www.hashicorp.com/blog/hashicorp-adopts-business-source-license + disable! date: "2024-09-27", because: "will change its license to BUSL on the next release" + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + # Allow packer to find plugins in Homebrew prefix + bin.env_script_all_files libexec/"bin", PACKER_PLUGIN_PATH: "$PACKER_PLUGIN_PATH:#{HOMEBREW_PREFIX/"bin"}" + + zsh_completion.install "contrib/zsh-completion/_packer" + end + + def caveats + <<~EOS + We will not accept any new packer releases in homebrew/core (with the BUSL license). + The next release will change 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.json" + minimal.write <<~JSON + { + "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" + ] + }] + } + JSON + system bin/"packer", "validate", "-syntax-only", minimal + end +end diff --git a/Formula/p/packetbeat.rb b/Formula/p/packetbeat.rb new file mode 100644 index 0000000000000..ae4a039715511 --- /dev/null +++ b/Formula/p/packetbeat.rb @@ -0,0 +1,74 @@ +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.0.1", + revision: "bce373f7dcd56a5575ad2c0ec40159722607e801" + license "Apache-2.0" + head "https://github.com/elastic/beats.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d6ba61fea2c646b41065635286bab932498249d95c0e812f779f3dc133c9ca36" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26941adacc26f1853a73aabcbf0db0602e8bd6552b2115825b8e70c7b03d7317" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9f6e26237d347c41163c0df987d711d34af5a4ab4e86ad537f9477184e4da781" + sha256 cellar: :any_skip_relocation, sonoma: "8498b02c67f6843fffae62598ccb3994d54ab57ebbacc504cabf6c712e7baedb" + sha256 cellar: :any_skip_relocation, ventura: "9d35526cea1ee11edbc7606026cc49bcf377a97e514fdefd50af5b6e7967aeef" + sha256 cellar: :any_skip_relocation, arm64_linux: "20da136b85fa68abd4468e113813cc269cf55f5dca3626a563330ee10e544505" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b488e505a3b595b8b3de004e148994405cb9cd1ec3251fa687a3087da5ecb90" + end + + depends_on "go" => :build + depends_on "mage" => :build + + uses_from_macos "libpcap" + + def install + # 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..16b3a67bc5b5d --- /dev/null +++ b/Formula/p/packetq.rb @@ -0,0 +1,36 @@ +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_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..82cd88128035e --- /dev/null +++ b/Formula/p/packetry.rb @@ -0,0 +1,43 @@ +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.4.0.tar.gz" + sha256 "2f2e36500fd29a46bf9043cf3b9a8dde6d14864ac7e6a1782cdce573b81859ee" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "22c49ae08e3854c4719cd38f6946c7a23f937d95f2af9d4f124adb5d85418fdf" + sha256 cellar: :any, arm64_sonoma: "1522f63e422bbab63675874bdf08cf8696ffd5478eb9c7986928dc5226eae06b" + sha256 cellar: :any, arm64_ventura: "ac33c2598d3ab7e4ba32c23b306510eea957383caddcbd8f9a8d4ec4fde0564e" + sha256 cellar: :any, sonoma: "08dddc60262a32e355af6a43d70c1eaa0c782d482c61f958891359d672405005" + sha256 cellar: :any, ventura: "21ddfa4541496350dada1a3ec6361180ae1a70c2d5bf3920cc92c1190437f376" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7f3300e7ef993045cc58515cb726db211888c35a3765c7553f7fed862fb8da6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "46ab971b2e7e71791bf0e2bfbcbc2a8d89beed2069f3b82b9c096a6f17914273" + 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..9076ccf3fc26e --- /dev/null +++ b/Formula/p/packmol.rb @@ -0,0 +1,51 @@ +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.0.2.tar.gz" + sha256 "4b63d73400f7702347d9ff0cc4d0009be5a752afa7af00ad612554e8918f00fd" + 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_sequoia: "ff3dc31853b5ed73c4ed37e81f0e1fe05d0a8af80096c045622a9d6dce28dbda" + sha256 cellar: :any, arm64_sonoma: "aaa1f1d5d09a01d6ce4035e1ec5c4f3fa74f136241881464da849e28ce84f736" + sha256 cellar: :any, arm64_ventura: "18317fd790c03ec39ad0c291f1b56fc94083d6ccfdce9d4f222c977777799daf" + sha256 cellar: :any, sonoma: "e348a69540b5961cd274a140e6c776c6b1be60284d616b4a55f1714a880b6d68" + sha256 cellar: :any, ventura: "6694cd43a3320660608ca071a6467924095f624ef3ec30cf9f6d1d6e6b00e239" + sha256 cellar: :any_skip_relocation, arm64_linux: "eece5b9234339d41d38f1468f0c00222b8e30ce29548f8860fb509f184d013bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4ab86f29d725aa61afcfcca95dd7a941cb606b6f36218765da30a7c7e260b65" + 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 + + # support cmake 4.0, upstream pr ref, https://github.com/m3g/packmol/pull/94 + patch do + url "https://github.com/m3g/packmol/commit/a1da16a7f3aeb2e004a963cf92bf9e57e94e4982.patch?full_index=1" + sha256 "5e073f744559a3b47c1b78075b445e3dd0b4e89e3918f4cbf8e651c77b83d173" + 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..fc8e6b168015b --- /dev/null +++ b/Formula/p/pacmc.rb @@ -0,0 +1,24 @@ +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" + + 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..29f2df3987809 --- /dev/null +++ b/Formula/p/pacparser.rb @@ -0,0 +1,114 @@ +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.5.tar.gz" + sha256 "fac205f41d000e245519244dc3e730e649a0ac1c61b5f2d1d0660056e1680b2d" + license "LGPL-3.0-or-later" + head "https://github.com/manugarg/pacparser.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "270415ce44db451091e58c371dae0db097c42b98970153c67e55a7d63eef399d" + sha256 cellar: :any, arm64_sonoma: "22d47d663a8dee08bffab1c78bb4ed863317da5c9fa5bd8a937fe87784d8996e" + sha256 cellar: :any, arm64_ventura: "2eb88d3fbf6f69a38d7e9f95d8781d3471ad1b3cc89cfbfb7bbe4b08f9150a91" + sha256 cellar: :any, arm64_monterey: "10f108fb57f52d0774b9f02981e5bdb2c0c569c9bd1b5fa789a7f8d4383d1e26" + sha256 cellar: :any, sonoma: "4d184243ed935d24e10744195addf345d21822ab299309636345ef1a8c5f14ae" + sha256 cellar: :any, ventura: "67d627d395f5c153f5025fe552c70931e6ab55f0dd2e7171414de5d43497e20d" + sha256 cellar: :any, monterey: "541bd6827519339d49f1521f5733fd9854961aec2fd48b157f70f99953e144a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "48d7f1676aa913adcc2892321ed98f34648bb6113d9085fa89186875271d7b60" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea64d408d99ac2dfd8426d17e8afd6e39ed561ab0b17b62baf9fe6d871e87982" + 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..a5a4335e41514 --- /dev/null +++ b/Formula/p/pacvim.rb @@ -0,0 +1,42 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "e2ecd6cc1337adb4c9e760c50a83ae04a8cb86495d3c1ea167bfa5930d7a16a0" + sha256 cellar: :any_skip_relocation, high_sierra: "b8ef8cdba34802db97fba770e013393973e908e11486b87a4f5189f139e468dc" + 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..e1519734eb5b2 --- /dev/null +++ b/Formula/p/page.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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..26fced16f45a4 --- /dev/null +++ b/Formula/p/pagmo.rb @@ -0,0 +1,81 @@ +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 4 + + bottle do + sha256 cellar: :any, arm64_sequoia: "de89536a11df055792e5438ec658c6cd16c55315b84c6c424b49e3982a9dbd44" + sha256 cellar: :any, arm64_sonoma: "b3ebceb0271d0a389f1ae4078941e8269c9efbec372e5305a172102de4b74f8f" + sha256 cellar: :any, arm64_ventura: "1154611438e8b1316c7f3f8ce0951deab54322bf5537b59494eec4106f8a7e48" + sha256 cellar: :any, sonoma: "5f3bef1e0ed24dfbbde890a7b5b2474b585a1cdbd412c559d6a54043ed378c76" + sha256 cellar: :any, ventura: "d4f0b7cbda497ce7f766efd08984bd52534a2ceddb7e070c91213bfba60a0567" + sha256 cellar: :any_skip_relocation, arm64_linux: "c3a36065e0fc45e3705fac89c77412947deb37532f777538d8aa98bb71d8abd9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1c3b4f42b1a460e73058cf7e82ce44fccd069ba476755ba37c0c07ff78787d34" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "eigen" + depends_on "nlopt" + depends_on "tbb" + + 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..259ececa19e8e --- /dev/null +++ b/Formula/p/pakchois.rb @@ -0,0 +1,69 @@ +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 + + bottle do + rebuild 3 + 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 cellar: :any, mojave: "cc98c7b706f27320ee7c673d906b4da22b402afe0d93b4c66f73a8cde86f7929" + 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..6a319606b797c --- /dev/null +++ b/Formula/p/pam-reattach.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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..fc32801a74c67 --- /dev/null +++ b/Formula/p/pam-u2f.rb @@ -0,0 +1,58 @@ +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_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/pam_yubico.rb b/Formula/p/pam_yubico.rb new file mode 100644 index 0000000000000..bda7df462481e --- /dev/null +++ b/Formula/p/pam_yubico.rb @@ -0,0 +1,48 @@ +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.27.tar.gz" + sha256 "63d02788852644d871746e1a7a1d16c272c583c226f62576f5ad232a6a44e18c" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sonoma: "7fc128f00d5170584104e0c4c49e4307043fd3ba3db125792138dab3279853b9" + sha256 cellar: :any, arm64_ventura: "e763d80b575c27eb381f559494636cb7737a0721f884d98523d0452911262273" + sha256 cellar: :any, arm64_monterey: "203b85ed98819720e7f40971f9978956b4fd458133a3935f402a10dfc2ab85b5" + sha256 cellar: :any, arm64_big_sur: "8d4405a65463be4dc6b5472b2cff454301591e57ff5c3b5fb4e8e40fb6981a66" + sha256 cellar: :any, sonoma: "2dd57b621d3107d7d4b5d4486a4cfe82035e81c45042c304f81b389bb20ae2d6" + sha256 cellar: :any, ventura: "3c949be5b7c5dd7f64b427e4bc90599c3bc8101deb6bf1b282eebb42312b10c8" + sha256 cellar: :any, monterey: "07bd1f48953cef8653bc75f23fcbf9fab5de45a3551d7ba7f23db22e558b9247" + sha256 cellar: :any, big_sur: "4abde2a6a123b3816945f79b07c760b95d2709fc791b5c5c7509d9ed1544e491" + sha256 cellar: :any, catalina: "2405af18c4c1b4c2573c221ff6699afcb37a42fe211ebb8b726314d31e13ce1a" + sha256 cellar: :any, mojave: "e40398cff74d597a3c0f203c59906b8276d3985a976c87812269bdc56ee06c72" + sha256 cellar: :any_skip_relocation, x86_64_linux: "396c081539899c3450ea38767fe2d33e547367da9351bb7c2726c7455516fcad" + end + + # Deprecation date set to 1 year after upstream issue was created. + # Issue opened on 2022-07-29: https://github.com/Yubico/yubico-pam/issues/242 + disable! date: "2024-08-03", because: "uses deprecated `ykclient`" + + depends_on "pkgconf" => :build + depends_on "libyubikey" + depends_on "ykclient" + depends_on "ykpers" + + on_linux do + depends_on "linux-pam" + end + + 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/p/pan.rb b/Formula/p/pan.rb new file mode 100644 index 0000000000000..5abc1c8c2f943 --- /dev/null +++ b/Formula/p/pan.rb @@ -0,0 +1,72 @@ +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.162/pan-v0.162.tar.bz2" + sha256 "f33b136621f7c0e7feac9ed6d0ff3fe15013335a100cb48b4151f4528be10059" + license "GPL-2.0-only" + + bottle do + sha256 arm64_sequoia: "5b8acb1334a483317caf49231f22b3e7c88a774fc6d7ae20fe8f121d6ab63219" + sha256 arm64_sonoma: "445b8bcc58239fc28ac1ca22356bf46be9af2f63f4ba9cfe7cb46f389b37b05c" + sha256 arm64_ventura: "874072ee564ccd310d01af2f7975fa9d4bd3de07070f201e82e4c6c75b365b48" + sha256 sonoma: "8bf0fdba14f34573e28ea4c186071827dd7e48e682eb1414ccf13ab0fc0cb21f" + sha256 ventura: "9e262aca5d840b964d81ea871a56bf80096e7af7c25feef09e5cbd644ec35878" + sha256 arm64_linux: "9ac64caa1826df8797d08c20e3a7c88fe7b8fadc70872c2c610501aab0a9d040" + sha256 x86_64_linux: "7b6334b42d03f519f8bbbc6e97c4ce20de77a18fde5ae5dc1df3d0cadcfc1019" + 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..9e84d8d36a367 --- /dev/null +++ b/Formula/p/pandemics.rb @@ -0,0 +1,44 @@ +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" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "445777877cbca7a8c5e0c8096b16948aa2b93c2a5ae41b71cb75e660ba2710d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ba38e44b4f4b7d27ff08bb11cfc4d0ff0c3acc0643748668cdd9cca3e015f365" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ba38e44b4f4b7d27ff08bb11cfc4d0ff0c3acc0643748668cdd9cca3e015f365" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ba38e44b4f4b7d27ff08bb11cfc4d0ff0c3acc0643748668cdd9cca3e015f365" + sha256 cellar: :any_skip_relocation, sonoma: "a759108afc20634004c21dde25897cf10004a275c33706af36f4c6a2e19bbaf0" + sha256 cellar: :any_skip_relocation, ventura: "a759108afc20634004c21dde25897cf10004a275c33706af36f4c6a2e19bbaf0" + sha256 cellar: :any_skip_relocation, monterey: "a759108afc20634004c21dde25897cf10004a275c33706af36f4c6a2e19bbaf0" + sha256 cellar: :any_skip_relocation, arm64_linux: "64951c574fd94a0802e1cc2a5934927ca9a4c35f418f6e212b5d462e22177ff7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c286b0bc6887c50d894e25699b0e312a2663b40e5d8c44dbc73501cca334d8e4" + 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..b5c3d0a6efc7e --- /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.18.2.tar.gz" + sha256 "a7b95fcf6807c3092684cf622da87afa34df3c2e6655a20dd5c243390f5e5ffd" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c31c2e8d6cbf71a6471a59ff0af50309109f69600f0ca6f9fcb0faa0b8c973d7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5d3f7c2debc407d04db35dc18f24f9dd1bb7c61b846d8d50755e664d42e182a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b767c8f3a07c9a70ef21be148c4691908039322b7e4528b211c6a03c53bc9528" + sha256 cellar: :any_skip_relocation, sonoma: "912f9f13386e61b1ce6102dea06e376cdf09d2bbfddefe5c6316cb3bba864f57" + sha256 cellar: :any_skip_relocation, ventura: "ec217ff88096135b8f1dd5fb087a9467ed54941fb0b72b758cea1fe66c61adfd" + sha256 cellar: :any_skip_relocation, arm64_linux: "51f9f4fa3294746fb739276dbcfa0eab29ef9ccbb3e1ecde907199d1df45e751" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9ff2b5d1c5379da0b17cad7ab5a0b241c38c76042497148fecc6b8bba76c095" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :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..6c500e2555850 --- /dev/null +++ b/Formula/p/pandoc-plot.rb @@ -0,0 +1,65 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "277fe6f242119166f8d77f2b07b109129425ed673547fbaaa2d6f01e68c5d7c3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4647b4e4e30b594f08bd6c871dac82b26d7bb1fbe75d850a77d8c445a1b8774a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a576bb85965c0aaab47ea0d10b1ce99310ce7ea453361e28f90fd6142644da7c" + sha256 cellar: :any_skip_relocation, sonoma: "eb0f022f0722c571818a6d9a4786e6aa92ed6a7ce0af8e47ce43bae83dd0c193" + sha256 cellar: :any_skip_relocation, ventura: "624f4ee454a269b92a633a306632b99e0365e952b0bd2de17e40bfec21443fb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8054d18e5ca238e9dc229083d65ea5aba64262cac3f175fd412038dd70981b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "177f0c90f6cb82159908834ad1ad93a3b60d4df9e282036862a9b9634f29bb2f" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + depends_on "graphviz" => :test + + depends_on "pandoc" + + 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..2f02962684e36 --- /dev/null +++ b/Formula/p/pandoc.rb @@ -0,0 +1,46 @@ +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.6.4.tar.gz" + sha256 "a343ac43502b699467051948f24f53746d25391c25e3a8dadb30bbd7db313d81" + license "GPL-2.0-or-later" + head "https://github.com/jgm/pandoc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5f0301201b216abcc0ba4bf6bc39ee6b94a77cdc9f7285a45576e57fe2699d16" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1dd1b5885da18faaf4b6ab062679578ad65ffab0bd4d62b24d3e913f37c5457a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4d4840372e692b8dd8a29f5f209b78ae2d73886a2c9bfc263c157c3721841ae3" + sha256 cellar: :any_skip_relocation, sonoma: "a3bc92d621607b1bea6ebda5374d24bb1ebede20d8039e73894b1b82051b9b87" + sha256 cellar: :any_skip_relocation, ventura: "0155aee5bcc2916df8a1a69232c0f43d1f9efd33f66cf96716cbb04558c446cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "963549fdbd70cdb14d55bec244eabd87f1c6735cba7704f8789ef559520fdfed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e4c600cc033ebad74e6acecef8358e8b7d42006651c58f79e07fb9f36860fc3" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + + uses_from_macos "unzip" => :build # for cabal install + 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/pango.rb b/Formula/p/pango.rb new file mode 100644 index 0000000000000..b84abbb96c20d --- /dev/null +++ b/Formula/p/pango.rb @@ -0,0 +1,72 @@ +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.56/pango-1.56.3.tar.xz" + sha256 "2606252bc25cd8d24e1b7f7e92c3a272b37acd6734347b73b47a482834ba2491" + license "LGPL-2.0-or-later" + 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_sequoia: "39c8338524e71bf6019b72a2bbebebc78c6935dfad75a76db43ff9a8815bfe6b" + sha256 cellar: :any, arm64_sonoma: "10d76601d1eee9482d66a31d570c6704bb318eead6f83ec1404d6e520be581f2" + sha256 cellar: :any, arm64_ventura: "4d619b28828586db45c6eee3e82b1aca65596af17195a6b975c3b9fa7ccad963" + sha256 cellar: :any, sonoma: "2e141cb0c33eb33fd2771efbac614b75dad3db4ed332ef84526e81e6a64b7d01" + sha256 cellar: :any, ventura: "cbc5448e13f060afeb0aee80cba9fd228f4a8e199761c4a4114b39700e840c39" + sha256 arm64_linux: "751a44f3853807b2ed64eaa5bfddf90cbd5bd4095a2d3e6c5939196355e219e8" + sha256 x86_64_linux: "cdcdca05be1495b3afd63d5b1951040e359278ee8bfbcbb65e37128c844a3737" + 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" + + 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..6b5dde13c379c --- /dev/null +++ b/Formula/p/pangomm.rb @@ -0,0 +1,48 @@ +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_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..df4737e54d971 --- /dev/null +++ b/Formula/p/pangomm@2.46.rb @@ -0,0 +1,52 @@ +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 + + bottle do + rebuild 1 + 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..412b2a72cbba4 --- /dev/null +++ b/Formula/p/paperjam.rb @@ -0,0 +1,84 @@ +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.1.tar.gz" + sha256 "bd38ed3539011f07e8443b21985bb5cd97c656e12d9363571f925d039124839b" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?paperjam[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "271b0d2b33c3f06f81fac58248a81a95eef0bcc36929230e2bad7b4d38ff34db" + sha256 cellar: :any, arm64_sonoma: "4df949ea647a2056ea7d7ab0ea2d298f45da5643ae92c25aaac80aad7e1301c7" + sha256 cellar: :any, arm64_ventura: "1fd3b138f16296ab6107a43387eb5ea3b54e5dac2358b7b5b6e8bc6c7951f512" + sha256 cellar: :any, sonoma: "0d6af7df1e10f96f42f56cf222c6bfb35d384ed547f1b8b0e11352906a5af41c" + sha256 cellar: :any, ventura: "2fc406ca453bf24ade3b65111f80bb3fd0b1a761c316ee48540ed8341afc6d63" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a6fdbd3537bf7e095cf7ec80429789e08c0310083fd086ffdc9bf2956d37eb0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "05712c9aeabd27e0ca3dd38ce377228044e31bccb7ee9bfb0a218b239f4838be" + end + + depends_on "asciidoc" => :build + depends_on "docbook-xsl" => :build + depends_on "libpaper" + depends_on "qpdf" + + uses_from_macos "libxslt" + + # notified the upstream about the patch + patch :DATA + + 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 + +__END__ +diff --git a/pdf-tools.cc b/pdf-tools.cc +index 0d74ca3..23d5ee4 100644 +--- a/pdf-tools.cc ++++ b/pdf-tools.cc +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + #include + +@@ -229,7 +230,7 @@ QPDFObjectHandle page_to_xobject(QPDF *out, QPDFObjectHandle page) + } + + vector contents = page.getPageContents(); +- auto ph = PointerHolder(new CombineFromContents_Provider(contents)); ++ auto ph = std::shared_ptr(new CombineFromContents_Provider(contents)); + xo_stream.replaceStreamData(ph, QPDFObjectHandle::newNull(), QPDFObjectHandle::newNull()); + return xo_stream; + } +diff --git a/pdf.cc b/pdf.cc +index 9f8dc12..41a158b 100644 +--- a/pdf.cc ++++ b/pdf.cc +@@ -185,7 +185,11 @@ static void make_info_dict() + { + const string to_copy[] = { "/Title", "/Author", "/Subject", "/Keywords", "/Creator", "/CreationDate" }; + for (string key: to_copy) +- info.replaceOrRemoveKey(key, orig_info.getKey(key)); ++ { ++ QPDFObjectHandle value = orig_info.getKey(key); ++ if (!value.isNull()) ++ info.replaceKey(key, value); ++ } + } + } diff --git a/Formula/p/paperkey.rb b/Formula/p/paperkey.rb new file mode 100644 index 0000000000000..c0176f201bcb1 --- /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 + + bottle do + 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, mojave: "894ef3339013be6574f736e316c61cbf54fbc3dcac358df14f1d54b1d7387854" + sha256 cellar: :any_skip_relocation, high_sierra: "82e49c6aa559a349ce73521a90881acb74a540de03d355ad7461c177d00bb8e8" + sha256 cellar: :any_skip_relocation, sierra: "fecd3e866173f93ddd6d89e91f2850d29c10e8edf27bb969a95de581ec382c56" + 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..5c52414b7cbed --- /dev/null +++ b/Formula/p/papilo.rb @@ -0,0 +1,47 @@ +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.2.tar.gz" + sha256 "d2042c06b77db8dbb63d21ae238a110ffbc21d3378a0838c8091dcb9fab3ca4a" + license all_of: ["LGPL-3.0-only", "GPL-3.0-only"] + version_scheme 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "69303d7be4cae54e6057a1b8f427dde0e1ef88f306a439a7f0ac3ddb00f73a15" + sha256 cellar: :any, arm64_sonoma: "9bf7eb8e4a5d124a463f0edf233de0879bb51a6b55df5dd2e4d86e5d3223dcf3" + sha256 cellar: :any, arm64_ventura: "3353842b47b32e67ab07c771fcddcc72a1d91f6946b74e47d6b2bb641b11ea8f" + sha256 cellar: :any, sonoma: "ccdfd62b1da17bd86e69831130a8fcf6fdc78117707471e3086fd5230cbb2f6b" + sha256 cellar: :any, ventura: "7b3e64c58cad180dc630f30058d9abe663639e7ee3dc939b8bce53261c15c979" + sha256 cellar: :any_skip_relocation, arm64_linux: "f48be228befa3be195b667fe421a60c7f64d7998340cfa39e8c32b35661a35ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bf1ca4dacaa67aa46d0f48a3350dc66f18468f775a92c19942804d4ed0a8c3b" + 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..bc1197a0faeb6 --- /dev/null +++ b/Formula/p/paps.rb @@ -0,0 +1,53 @@ +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 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "1dc9e0d4ae5edd03013091933251474c8dcd4b1bc4f72a4df502734228c62f6f" + sha256 cellar: :any, arm64_sonoma: "df67721a4260dd63be5164d348ba57058f3a43298915726c7c1d0d3c43927794" + sha256 cellar: :any, arm64_ventura: "fa4ca77e9a2dd79350b705ec7cfcb559cce5e726777431b9a286ebb9b2ec00d2" + sha256 cellar: :any, arm64_monterey: "b66abd39b5a6c8ee5b65603beb8e33357448af5a0fd8112610b63ffe6fc09df7" + sha256 cellar: :any, sonoma: "d9cd43c14cd780ac32cbd23e42b129db879e0dc6f1dd13e1b6d554845b46cc11" + sha256 cellar: :any, ventura: "eae81c50573f8ef3d0220e2237326bd8b712f15ed7c37cac40709feafdab7c86" + sha256 cellar: :any, monterey: "82f0ec08cfa698dafb97b18e8f5508c8648c9f1a80445c2077a3ab80168c7829" + sha256 arm64_linux: "1400c61fe5c429d51c0a3032a6f8a405503b89062b8082d7ab415466cff7f61f" + sha256 x86_64_linux: "9edc0fa1b1d9b411f896f492b1bc10fe2c8e85c70065212630f358b1c8d5d771" + 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 + + 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..a6cf056bfd9f9 --- /dev/null +++ b/Formula/p/par.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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, mojave: "ef5da7a3e359ba4c72ad4f11c2f1fb18adea19c6c51409d0fc7400ec60ef2422" + sha256 cellar: :any_skip_relocation, high_sierra: "344dd1109a03e8c6017c2ca26a17c9f07c700c743b89b42786efce956bac70e1" + 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..82dce337431ec --- /dev/null +++ b/Formula/p/par2.rb @@ -0,0 +1,54 @@ +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 + + bottle do + 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..b51f0fd583b34 --- /dev/null +++ b/Formula/p/parallel-disk-usage.rb @@ -0,0 +1,42 @@ +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.11.0.tar.gz" + sha256 "a11e19906981c46d5cc694cfc2908163e88d84cd9f4f8b2d516487e5f150d588" + license "Apache-2.0" + head "https://github.com/KSXGitHub/parallel-disk-usage.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "54a80c6cab3c8a5865b1b518f193f63d49dd6d7990d45d725407faa3afb55927" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "30b5f5b49a939dd902b34b6d13be2aa49d632ca8fce5b5754ba397d358699ad1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "813b20404ed758b4e2fceecc75ef706871696c98930ad185f182fd14c96bc20b" + sha256 cellar: :any_skip_relocation, sonoma: "ab569a47c73fcfa96edf0bcb3015caee836d7630ed0b064533c9e258382fc0ec" + sha256 cellar: :any_skip_relocation, ventura: "27d6b6a2502e8c45bb315b12864ce6fe7a8d9c07ef2bccffc7dd1f4547fc72a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbbbe4c829a923733c3c721b7699b0b61be65954fbca5454df55a7c683a11e4a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f233a9ade03a7211653eca2b211b91538a9c54a5f4ebfab3b0865c9b4eb168d4" + 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..5802949ef79a7 --- /dev/null +++ b/Formula/p/parallel.rb @@ -0,0 +1,55 @@ +class Parallel < Formula + desc "Shell command parallelization utility" + homepage "https://savannah.gnu.org/projects/parallel/" + url "https://ftp.gnu.org/gnu/parallel/parallel-20250322.tar.bz2" + mirror "https://ftpmirror.gnu.org/parallel/parallel-20250322.tar.bz2" + sha256 "c82896e779b18c2a157527f32f35de9a6d984f8b8ebad2b41dbc78c33adbaabe" + 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: "4485af6cbea6ea6fe9bdc37bb5a92046e59d5571d5d69ff41fe88e518976996b" + 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" + + inreplace_files = [ + bin/"parallel", + doc/"parallel.texi", + doc/"parallel_design.texi", + doc/"parallel_examples.texi", + man1/"parallel.1", + man7/"parallel_design.7", + man7/"parallel_examples.7", + ] + + # Ignore `inreplace` failures when building from HEAD or not building a bottle. + inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX, build.stable? && build.bottle? + 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..d2fe6df9a4fdd --- /dev/null +++ b/Formula/p/parca.rb @@ -0,0 +1,56 @@ +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.23.1.tar.gz" + sha256 "fb5f0c1778e257cc1dd48e883ce0904535b0be25816b02dc61bc5b054eb822a5" + license "Apache-2.0" + head "https://github.com/parca-dev/parca.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "803754a46d4237e5be3309e230dd8a180cb367c7efe9b1d42a9b0a2d494fd5d1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d411a908e2c433b447a9a8c6bd55999c48da4bc3b556dc97a7b38015077dae5d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d411a908e2c433b447a9a8c6bd55999c48da4bc3b556dc97a7b38015077dae5d" + sha256 cellar: :any_skip_relocation, sonoma: "ad7cd30f86b9f6dfa1a1f953830b8cf013b0963fa884087b1062b9c26baed0e6" + sha256 cellar: :any_skip_relocation, ventura: "ad7cd30f86b9f6dfa1a1f953830b8cf013b0963fa884087b1062b9c26baed0e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0d0a6297c3de266f603d6682c3f672ef2bd295876d64f7bfbedaf35399229707" + end + + depends_on "go" => :build + depends_on "node" => :build + depends_on "pnpm" => :build + + # remove unused `@ts-expect-error` directive, upstream pr ref, https://github.com/parca-dev/parca/pull/5518 + patch do + url "https://github.com/parca-dev/parca/commit/a99156d7a5c8f6a1a42f1f83f7af864cbc11fef8.patch?full_index=1" + sha256 "01d5f31de779146e333a55f4371f20f39a554d2b9f8e2fe78b9ba747650d14c6" + end + + 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..42de13b8b4c0e --- /dev/null +++ b/Formula/p/pari-elldata.rb @@ -0,0 +1,38 @@ +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 + + 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..618c27b0f6d3e --- /dev/null +++ b/Formula/p/pari-galdata.rb @@ -0,0 +1,36 @@ +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 + + 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..099ebf8e38ed3 --- /dev/null +++ b/Formula/p/pari-galpol.rb @@ -0,0 +1,40 @@ +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 + + 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..08d0bd7a8af4f --- /dev/null +++ b/Formula/p/pari-nflistdata.rb @@ -0,0 +1,49 @@ +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 + + 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..4fe7e8e9e5a5d --- /dev/null +++ b/Formula/p/pari-seadata-big.rb @@ -0,0 +1,38 @@ +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 + + 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..f3a84c2c51333 --- /dev/null +++ b/Formula/p/pari-seadata.rb @@ -0,0 +1,37 @@ +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 + + 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..1985cd3173828 --- /dev/null +++ b/Formula/p/pari.rb @@ -0,0 +1,72 @@ +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_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..0ea1dcc634f80 --- /dev/null +++ b/Formula/p/parlay.rb @@ -0,0 +1,64 @@ +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.8.0.tar.gz" + sha256 "6eccd4b992d54c6066909b1a891ed9f6f5de4fbb43015edba5b0c1c35b2cb4e5" + license "Apache-2.0" + head "https://github.com/snyk/parlay.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "456169da5e7f9bfdb41468ca3ef6da4cc0633bd53223dda865131da73eabf013" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "456169da5e7f9bfdb41468ca3ef6da4cc0633bd53223dda865131da73eabf013" + sha256 cellar: :any_skip_relocation, arm64_ventura: "456169da5e7f9bfdb41468ca3ef6da4cc0633bd53223dda865131da73eabf013" + sha256 cellar: :any_skip_relocation, sonoma: "8f7f8ab6b8b264968c52d0406f6e076dcf4fa9708f4e5cb193dfe197633a3739" + sha256 cellar: :any_skip_relocation, ventura: "8f7f8ab6b8b264968c52d0406f6e076dcf4fa9708f4e5cb193dfe197633a3739" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1daa00909693aa418948b5433d7e1a484e78572c7043a536f98a70c4508a4780" + 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..e52f20049fc9b --- /dev/null +++ b/Formula/p/parliament.rb @@ -0,0 +1,89 @@ +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" + head "https://github.com/duo-labs/parliament.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d9403346c9966ef7acf2569c4eb997136dc526a81b9579f455ac63620fe3c2da" + sha256 cellar: :any, arm64_sonoma: "9a65b166b6ccfca15fddf77d536eae03cd77902913cdba068c4eb09bc5551615" + sha256 cellar: :any, arm64_ventura: "b3cc44cfbdfdcdbb07782df04b2c2be92f97d5fd237da1fe6b758b0e247fc9d4" + sha256 cellar: :any, sonoma: "47f8fb5e12e69fbcc66a96db6d13d68658121bb862bb0fa7521db1bdbdca6647" + sha256 cellar: :any, ventura: "6fd5021c681409134fbf7f4ff46bc32a3893446ba03f0754901d69ec28bb8652" + sha256 cellar: :any_skip_relocation, arm64_linux: "4443335de6c820bfeb4f6664b11b7cf647cf4a0c6cc6742d004d5402839d5f82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e903562d94d8918dfeeba821465831ec0d8462be17cd5e17d4cbbe950f83d44" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/61/ce/d6fbf9cdda1b40023ef60507adc1de1d7ba0786dc73ddca59f4bed487e40/boto3-1.38.3.tar.gz" + sha256 "655d51abcd68a40a33c52dbaa2ca73fc63c746b894e2ae22ed8ddc1912ddd93f" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/92/ee/b47c0286ada750271897f5cc3e40b4405f1218ff392cd15df993893f0099/botocore-1.38.3.tar.gz" + sha256 "790f8f966201781f5fcf486d48b4492e9f734446bbf9d19ef8159d08be854243" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/fc/9e/73b14aed38ee1f62cd30ab93cd0072dec7fb01f3033d116875ae3e7b8b44/s3transfer-0.12.0.tar.gz" + sha256 "8ac58bc1989a3fdb7c7f3ee0918a66b160d038a147c7b5db1500930a607e9a1c" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/bb/71/b6365e6325b3290e14957b2c3a804a529968c77a049b2ed40c095f749707/setuptools-79.0.1.tar.gz" + sha256 "128ce7b8f33c3079fd1b067ecbb4051a66e8526e7b65f6cec075dfc650ddfa88" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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..6f450ccb2d63b --- /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.15.2.tar.gz" + sha256 "2880d7f532bd53d6780ec82e9df8f34edc9acfd95eb725747bd8205909517641" + license "Apache-2.0" + head "https://github.com/apache/parquet-mr.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "935468cd7393a349c49631272dc7d032ada87c9e2236771c46a4012cb2488c3b" + 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..896b3cd2af322 --- /dev/null +++ b/Formula/p/parrot.rb @@ -0,0 +1,94 @@ +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_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 mojave: "91a463baca8872dbd12183a61326c78c8ac0e05a01bd1a0421578cb0f6e58427" + sha256 high_sierra: "c3ce1d1fe24e6f5172629cd092cc03db16b957649865af052ee6a72d75fa10e6" + sha256 sierra: "e8c50fee6a2111412b5f6ac31292f3ff7d3e4dd2be9a02cc94a890026588ae63" + sha256 el_capitan: "3b78be029276ca642cb2bc705888ed0cd7745c0398cf90bf67031190191c76a8" + 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..13b9bdb1f6622 --- /dev/null +++ b/Formula/p/parsedmarc.rb @@ -0,0 +1,388 @@ +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/93/23/e7de791f709e493e7ac5b6c2f03f722157f8948dcda3b5e1685fdc6a4adb/parsedmarc-8.18.1.tar.gz" + sha256 "a84fd6328bd5941f6ed25c959771daa47cef846f9f1930bee830c150a454ff6c" + license "Apache-2.0" + head "https://github.com/domainaware/parsedmarc.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e720c0dd6507fca5a58f8dc186ed53c56b44840f1ea5c2df752b08994bbd828c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eaa1287ebcfa20f93bb26d9ec86cdf53c85776a148631adbc9ad90418096c19b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef1b2bcb360e2b1350fd7566e1dcae9de796b3bf5456b90c512ecb71f3d10f84" + sha256 cellar: :any_skip_relocation, sonoma: "b50af3e70df6f37be1cd2c1ab981e784c9842bd07a6550f133748eda396dbc1b" + sha256 cellar: :any_skip_relocation, ventura: "eacde4669f7b0ab431952a7b498c5a9211dfb473b64d432f85a76a7daf4d0bff" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8ef556723d35e1a4e0acf09ae04e3a52895d01b0021bc775ca696ca5682162f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f0d302883a5a0da36b64ded785e08dd4b173df574c07ab413f2d39b9019e9b4" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/08/07/508f9ebba367fc3370162e53a3cfd12f5652ad79f0e0bfdf9f9847c6f159/aiohappyeyeballs-2.4.6.tar.gz" + sha256 "9b05052f9042985d32ecbe4b59a77ae19c006a78f1344d7fdad69d28ded3d0b0" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/37/4b/952d49c73084fb790cb5c6ead50848c8e96b4980ad806cf4d2ad341eaa03/aiohttp-3.11.12.tar.gz" + sha256 "7603ca26d75b1b86160ce1bbe2787a0b706e592af5b2504e12caa88a217767b0" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/49/7c/fdf464bcc51d23881d110abd74b512a42b3d5d376a55a831b44c603ae17f/attrs-25.1.0.tar.gz" + sha256 "1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e" + end + + resource "azure-core" do + url "https://files.pythonhosted.org/packages/cc/ee/668328306a9e963a5ad9f152cd98c7adad86c822729fd1d2a01613ad1e67/azure_core-1.32.0.tar.gz" + sha256 "22b3c35d6b2dae14990f6c1be2912bf23ffe50b220e708a28ab1bb92b1c730e5" + end + + resource "azure-identity" do + url "https://files.pythonhosted.org/packages/ee/89/7d170fab0b85d9650cdb7abda087e849644beb52bd28f6804620dd0cecd9/azure_identity-1.20.0.tar.gz" + sha256 "40597210d56c83e15031b0fe2ea3b26420189e1e7f3e20bdbb292315da1ba014" + end + + resource "azure-monitor-ingestion" do + url "https://files.pythonhosted.org/packages/7d/41/4faf617e09a90f45c253190e600941bf97f10cfd1a811ec139ae3b54e56b/azure-monitor-ingestion-1.0.4.tar.gz" + sha256 "254d75993a1fe707d198f014aef5a14faa570cee7369b35bb03ae2aa8f99be79" + end + + resource "boto3" do + url "https://files.pythonhosted.org/packages/af/cb/745ca9a661be42f3dc0c5b6ea4d3182d9dd5dfd4204aad4910af20775a26/boto3-1.36.21.tar.gz" + sha256 "41eb2b73eb612d300e629e3328b83f1ffea0fc6633e75c241a72a76746c1db26" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/69/9f/17b7610f2bfc5ccba6d2395f1cc856dd3e7e50f0088fc22949e56ae9f569/botocore-1.36.21.tar.gz" + sha256 "da746240e2ad64fd4997f7f3664a0a8e303d18075fc1d473727cb6375080ea16" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/d9/74/57df1ab0ce6bc5f6fa868e08de20df8ac58f9c44330c7671ad922d2bbeae/cachetools-5.5.1.tar.gz" + sha256 "70f238fbba50383ef62e55c6aff6d9673175fe59f7c6782c7a0b9e38f4a9df95" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "dateparser" do + url "https://files.pythonhosted.org/packages/bd/3f/d3207a05f5b6a78c66d86631e60bfba5af163738a599a5b9aa2c2737a09e/dateparser-1.2.1.tar.gz" + sha256 "7e4919aeb48481dbfc01ac9683c8e20bfe95bb715a38c1e9f6af889f4f30ccc3" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + 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/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + end + + resource "geoip2" do + url "https://files.pythonhosted.org/packages/17/d7/21cfa1072b8ec5937c6af0cf8b624b4be9b44a7ca82f4335900df5482076/geoip2-5.0.1.tar.gz" + sha256 "90af8b6d3687f3bef251f2708ad017b30d627d1144c0040eabc4c9017a807d86" + end + + resource "google-api-core" do + url "https://files.pythonhosted.org/packages/b8/b7/481c83223d7b4f02c7651713fceca648fa3336e1571b9804713f66bca2d8/google_api_core-2.24.1.tar.gz" + sha256 "f8b36f5456ab0dd99a1b693a40a31d1e7757beea380ad1b38faaf8941eae9d8a" + end + + resource "google-api-python-client" do + url "https://files.pythonhosted.org/packages/0a/50/c8d2d3c4e65e081c4c07b15e4fe35671676c5ecdb3674a167229e83ce49a/google_api_python_client-2.161.0.tar.gz" + sha256 "324c0cce73e9ea0a0d2afd5937e01b7c2d6a4d7e2579cdb6c384f9699d6c9f37" + end + + resource "google-auth" do + url "https://files.pythonhosted.org/packages/c6/eb/d504ba1daf190af6b204a9d4714d457462b486043744901a6eeea711f913/google_auth-2.38.0.tar.gz" + sha256 "8285113607d3b80a3f1543b75962447ba8a09fe85783432a784fdeef6ac094c4" + 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/cc/0f/1772edb8d75ecf6280f1c7f51cbcebe274e8b17878b382f63738fd96cee5/google_auth_oauthlib-1.2.1.tar.gz" + sha256 "afd0cad092a2eaa53cd8e8298557d6de1034c6cb4a740500b5357b648af97263" + end + + resource "googleapis-common-protos" do + url "https://files.pythonhosted.org/packages/31/e1/fbffb85a624f1404133b5bb624834e77e0f549e2b8548146fe18c56e1411/googleapis_common_protos-1.67.0.tar.gz" + sha256 "21398025365f138be356d5923e9168737d94d46a72aefee4a6110a1f23463c86" + end + + resource "html2text" do + url "https://files.pythonhosted.org/packages/1a/43/e1d53588561e533212117750ee79ad0ba02a41f52a08c1df3396bd466c05/html2text-2024.2.26.tar.gz" + sha256 "05f8e367d15aaabc96415376776cdd11afd5127a77fce6e36afc60c563ca2c32" + end + + resource "httplib2" do + url "https://files.pythonhosted.org/packages/3d/ad/2371116b22d616c194aa25ec410c9c6c37f23599dcd590502b74db197584/httplib2-0.22.0.tar.gz" + sha256 "d7a10bc5ef5ab08322488bde8c726eeee5c8618723fdb399597ec58f3d82df81" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/ef/f6/c15ca8e5646e937c148e147244817672cf920b56ac0bf2cc1512ae674be8/lxml-5.3.1.tar.gz" + sha256 "106b7b5d2977b339f1e97efe2778e2ab20e99994cbb0ec5e55771ed0795920c8" + end + + resource "mail-parser" do + url "https://files.pythonhosted.org/packages/2b/3d/7f096230c4b61857c7682dc5497000a987b5f7e8376f54f0a5ed73e2cc3d/mail-parser-3.15.0.tar.gz" + sha256 "d66638acf0633dfd8a718e1e3646a6d58f8e9d75080c94638c7b267b4b0d6c86" + end + + resource "mailsuite" do + url "https://files.pythonhosted.org/packages/9b/c2/97b6096f8b291aa910866eb2fe12b0d87f74b35cfbd1ba9b634db6f03558/mailsuite-1.9.18.tar.gz" + sha256 "deb2b93e070038a56f65b153ecf6995fd96153cc8aa4f428cef87617c99391f0" + end + + resource "maxminddb" do + url "https://files.pythonhosted.org/packages/57/ae/422ec0f3b6a40f23de9477c42fce90126a3994dd51d06b50582973c0088e/maxminddb-2.6.3.tar.gz" + sha256 "d2c3806baa7aa047aa1bac7419e7e353db435f88f09d51106a84dbacf645d254" + end + + resource "msal" do + url "https://files.pythonhosted.org/packages/3f/f3/cdf2681e83a73c3355883c2884b6ff2f2d2aadfc399c28e9ac4edc3994fd/msal-1.31.1.tar.gz" + sha256 "11b5e6a3f802ffd3a72107203e20c4eac6ef53401961b880af2835b723d80578" + 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 "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/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + end + + resource "opensearch-py" do + url "https://files.pythonhosted.org/packages/7c/e4/192c97ca676c81f69e138a22e10fb03f64e14a55633cb2acffb41bf6d061/opensearch_py-2.8.0.tar.gz" + sha256 "6598df0bc7a003294edd0ba88a331e0793acbb8c910c43edf398791e3b2eccda" + end + + resource "portalocker" do + url "https://files.pythonhosted.org/packages/ed/d3/c6c64067759e87af98cc668c1cc75171347d0f1577fab7ca3749134e3cd4/portalocker-2.10.1.tar.gz" + sha256 "ef1bf844e878ab08aee7e40184156e1151f228f103aa5c6bd0724cc330960f8f" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/20/c8/2a13f78d82211490855b2fb303b6721348d0787fdd9a12ac46d99d3acde1/propcache-0.2.1.tar.gz" + sha256 "3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/26/79/a5c6cbb42268cfd3ddc652dc526889044a8798c688a03ff58e5e92b743c8/proto_plus-1.26.0.tar.gz" + sha256 "6e93d5f5ca267b54300880fff156b6a3386b3fa3f43b1da62e680fc0c586ef22" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/f7/d1/e0a911544ca9993e0f17ce6d3cc0932752356c1b0a834397f28e63479344/protobuf-5.29.3.tar.gz" + sha256 "5da0f41edaf117bde316404bad1a486cb4ededf8e4a54891296f648e8e076620" + 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/23/02/b0f669e2d1c31a3fabf0f9fce064b86111b63732741f16b46598245cd43b/publicsuffixlist-1.0.2.20250213.tar.gz" + sha256 "81b4fa9ff8ebf868180e1d34e3a0ec4e241eb09ea3a7b5904bfc2fc1eff4342c" + 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 "pygelf" do + url "https://files.pythonhosted.org/packages/fe/d3/73d1fe74a156f9a0e519bedc87815ed309e64af19c73b94352e4c0959ddb/pygelf-0.4.2.tar.gz" + sha256 "d0bb8f45ff648a9a187713f4a05c09f685fcb8add7b04bb7471f20071bd11aad" + 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/8b/1a/3544f4f299a47911c2ab3710f534e52fea62a633c96806995da5d25be4b2/pyparsing-3.2.1.tar.gz" + sha256 "61980854fd66de3a90028d679a954d5f2623e83144b5afe5ee86f43d762e5f0a" + 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/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/aa/65/7d973b89c4d2351d7fb232c2e452547ddfa243e93131e7cfa766da627b52/rsa-4.9.tar.gz" + sha256 "e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/62/45/2323b5928f86fd29f9afdcef4659f68fa73eaa5356912b774227f5cf46b5/s3transfer-0.11.2.tar.gz" + sha256 "3b39185cb72f5acc77db1a58b6e25b977f28d20496b6e58d6813d75f464d632f" + end + + resource "simplejson" do + url "https://files.pythonhosted.org/packages/af/92/51b417685abd96b31308b61b9acce7ec50d8e1de8fbc39a7fd4962c60689/simplejson-3.20.1.tar.gz" + sha256 "e64139b4ec4f1f24c142ff7dcafe55a22b811a74d86d66560c8815687143037d" + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/33/cc/11360404b20a6340b9b4ed39a3338c4af47bc63f87f6cea94dbcbde07029/tzlocal-5.3.tar.gz" + sha256 "2fafbfc07e9d8b49ade18f898d6bcd37ae88ce3ad6486842a2e4f03af68323d2" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/d2/5a/4742fdba39cd02a56226815abfa72fe0aa81c33bed16ed045647d6000eba/uritemplate-4.1.1.tar.gz" + sha256 "4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0" + 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/50/05/51dcca9a9bf5e1bce52582683ce50980bcadbc4fa5143b9f2b19ab99958f/xmltodict-0.14.2.tar.gz" + sha256 "201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/b7/9d/4b94a8e6d2b51b599516a5cb88e5bc99b4d8d4583e468057eaa29d5f0918/yarl-1.18.3.tar.gz" + sha256 "ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1" + 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..c0ae40824fa84 --- /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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d590d5b336289ccc4cd9f862c647d95bbd69f338667fe20b7919b85aaa0be0cd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "915f63605c761393c849667661d157e7dea78ad590877de5b5bac17e94c746a6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b11218fc52dd89ebea09525a28d6c545598962faf5b9faf63607c357944fcc5" + sha256 cellar: :any_skip_relocation, sonoma: "95b4c5061132adf97267f3a52c0a35476124df0f40ad54c93d7e0c141605277f" + sha256 cellar: :any_skip_relocation, ventura: "7300f161aaa679f5798b6a8bab305da1a22777b5a17e6a07ee7e4d2b750ba93e" + sha256 cellar: :any_skip_relocation, arm64_linux: "5866cdd8c7d761d3cacdea80dc76cf177dc986e9b0b2e2518b2d325b2b556a76" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5376a76f425c703390142d15aec36b56a8b14cd9ef133abca229838a377c238c" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "python@3.13" + + 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..1579103fc1a83 --- /dev/null +++ b/Formula/p/pass-git-helper.rb @@ -0,0 +1,62 @@ +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/v3.3.0.tar.gz" + sha256 "d602ddf2ab45ecaa6ec50815f4468fdeafccfb979ac5191e541a53b54b658e33" + license "LGPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8173dc09953993aae822147c4929171be223c97cda7241a00d86a3bbec556b08" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8173dc09953993aae822147c4929171be223c97cda7241a00d86a3bbec556b08" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8173dc09953993aae822147c4929171be223c97cda7241a00d86a3bbec556b08" + sha256 cellar: :any_skip_relocation, sonoma: "734b7c223f2a2c32694c7ebbbb5448c43fe87612d7fac5257c2a7a4470a9a1e4" + sha256 cellar: :any_skip_relocation, ventura: "734b7c223f2a2c32694c7ebbbb5448c43fe87612d7fac5257c2a7a4470a9a1e4" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e3ef45b751679ee4fb0e5d18ccb8f01ed166f0facb33d517456ef4528056157" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8173dc09953993aae822147c4929171be223c97cda7241a00d86a3bbec556b08" + end + + depends_on "gnupg" => :test + depends_on "pass" + depends_on "python@3.13" + + 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..752c7e8556031 --- /dev/null +++ b/Formula/p/pass-import.rb @@ -0,0 +1,73 @@ +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 3 + head "https://github.com/roddhjav/pass-import.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "e2263e0d94a2fd744c5748f9cd6a3966fc11ae33deca1ffb34e5997b47c2dafc" + sha256 cellar: :any, arm64_sonoma: "bf43aba56684c5ae1ff7be2b57090632c4a0a14dc7ae95223dbc89fe3e87b6e5" + sha256 cellar: :any, arm64_ventura: "590406753c0fe6cb030055867702051112366e5f7d199f9341f860222b544513" + sha256 cellar: :any, sonoma: "175a6f288828c380052249095a738b05c5e81741ab3061ba975494433827aee1" + sha256 cellar: :any, ventura: "475bc32225a5f5b3edc4339b83e0a69b68a4156ea3e3bf7f2c994249a40fd817" + sha256 cellar: :any_skip_relocation, arm64_linux: "7bf7123a1879198f333664b612cb03ea9c7620ca00f41961b2fe6bb42b59127a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "27a3f4f49b185cb3996cf80ee3026d58dec59e21da067caddf3832189d31c39f" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "pyaml" do + url "https://files.pythonhosted.org/packages/fd/a6/5b51160ff7ce60b0c60ec825359c0e818b0ce4a2504fa3dd1470f42f9b10/pyaml-24.9.0.tar.gz" + sha256 "e78dee8b0d4fed56bb9fa11a8a7858e6fade1ec70a9a122cee6736efac3e69b5" + 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 "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "zxcvbn" do + url "https://files.pythonhosted.org/packages/54/67/c6712608c99e7720598e769b8fb09ebd202119785adad0bbce25d330243c/zxcvbn-4.4.28.tar.gz" + sha256 "151bd816817e645e9064c354b13544f85137ea3320ca3be1fb6873ea75ef7dc1" + 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..992ce7c47db26 --- /dev/null +++ b/Formula/p/pass-otp.rb @@ -0,0 +1,46 @@ +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" + + 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..1e5c879792736 --- /dev/null +++ b/Formula/p/pass.rb @@ -0,0 +1,66 @@ +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 + + bottle do + rebuild 1 + 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..980b90cef72f2 --- /dev/null +++ b/Formula/p/passenger.rb @@ -0,0 +1,159 @@ +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.27/passenger-6.0.27.tar.gz" + sha256 "82c830aee98feece09e84309c2d0c6bb3f7b22a3c8e33cfe93b5e0d498615d0f" + license "MIT" + revision 1 + head "https://github.com/phusion/passenger.git", branch: "stable-6.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fb575dc46a6e6d1d1a85e8ac4c90b3b6b1623e3b28e7b23b1ba0f3b7e44826cf" + sha256 cellar: :any, arm64_sonoma: "77fb3c9b9d992a403b279bb45d843220eb99dff0e0bff8a80f9b799d1c8bac30" + sha256 cellar: :any, arm64_ventura: "635617b7bd47cd784e4593b6618147379147ae4b9c144c4b1da92b0bb56e2ef8" + sha256 cellar: :any, sonoma: "44ddd90f8347de1294b9e264c0b27437f770b0a360c0833a0721590bfdb376b7" + sha256 cellar: :any, ventura: "bb7139dea38467bacc2720d2ce907c9e9e00cde7190770328fef81df2dcf1187" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe4bc221df7cdb0fc10eb7b72a38b78e3ef5d4b404f96a1e2889bf379106270f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8214b7d4f61fba592c54c482cda3fe017b7261defff173a5ab254622b5ec3afd" + 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", since: :catalina + uses_from_macos "zlib" + + def install + if OS.mac? && MacOS.version >= :mojave && 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..87bc5304b7a64 --- /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_05_12.8ec1341.tar.xz" + version "2025_05_12.8ec1341" + sha256 "0e2f72073a2ab8c9a4dbb604d18b7f3c0c3bd37106453fbf22d1e4f410d0f7df" + 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: "aedae3e99a9dc67df0690c9a1a168dd3ad33b923294825fcb15ba6e6b5df380a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5466a3d8359e64160aa75aa414b39ea77c514a83ad46246c3734680ae57ec32c" + 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..db76aa490a09c --- /dev/null +++ b/Formula/p/passwdqc.rb @@ -0,0 +1,66 @@ +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 + + bottle do + 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..88acd76c19a7f --- /dev/null +++ b/Formula/p/pastebinit.rb @@ -0,0 +1,40 @@ +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" + license "GPL-2.0-or-later" + revision 4 + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "01413047be89a3e516a5a8e4668488ae73c1b30e90d98ed6e4c47d43e4672a46" + end + + depends_on "docbook2x" => :build + depends_on "python@3.13" + + # Remove for next release + patch do + url "https://github.com/lubuntu-team/pastebinit/commit/ab05aa431a6bf76b28586ad97c98069b8de5e46a.patch?full_index=1" + sha256 "1abd0ec274cf0952a371e6738fcd3ece67bb9a4dd52f997296cd107f035f5690" + end + + def install + inreplace "pastebinit" do |s| + s.gsub! "/usr/bin/python3", which("python3.13") + 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/p/pastel.rb b/Formula/p/pastel.rb new file mode 100644 index 0000000000000..47aaf3145f9b7 --- /dev/null +++ b/Formula/p/pastel.rb @@ -0,0 +1,37 @@ +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.10.0.tar.gz" + sha256 "7848cd6d2ad8db6543b609dece7c9c28b4720c09fb13aeb204dd03d152159dd2" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/sharkdp/pastel.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e812865926cc13b1568b5d4b1e201d2beb9266a4c4c9c8e3ea484b258938061b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "15d534aa1d21c0f2b1a5ef082a24e7ef5ab01d43cc2019e9ac69a1abf0bd050e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "57803257b4273b72d306b3a75e8a9caa5187a693a67f62f5044d30f646d8021f" + sha256 cellar: :any_skip_relocation, sonoma: "b735957971ed222ad72bf9e6e2aa6da522ec06840667ae398e7d5ff1e38c26f2" + sha256 cellar: :any_skip_relocation, ventura: "6a0219597bb7b66fac01792cf31430bccc9fc9491f778d34f7c7885ea48013a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "96bb15eb536e16cd183a3482fb3873ee1297fd9a316a1e60ff20152247fa894d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ed39ba06bbc613002a222b647bb81c1280e3630e89c6944bf8758b78216ee5f" + 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..24a3c7ede3d9b --- /dev/null +++ b/Formula/p/patat.rb @@ -0,0 +1,44 @@ +class Patat < Formula + desc "Terminal-based presentations using Pandoc" + homepage "https://github.com/jaspervdj/patat" + url "https://hackage.haskell.org/package/patat-0.15.0.0/patat-0.15.0.0.tar.gz" + sha256 "7fbd8fb0acaa6a076cc80fb6ac94b8eb02ee2eac524af842ddee9802eab855ed" + license "GPL-2.0-or-later" + head "https://github.com/jaspervdj/patat.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6922262a5456b9f2c0fb6d035f4b48ea5c31eabf54bfab3396b7832af525df75" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7752af0892c87f4e1e4b8ab6b176cda21c06c9e9fff30253a174feee9ca4b604" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d74d8ef26abb5124378368df7fdf4d74943b2a48ef97d77858031232e5368e6" + sha256 cellar: :any_skip_relocation, sonoma: "c8c5c4de61348f06d137c102c5adb6ca5c2e87c592e7d149dd8ba868c7058ee3" + sha256 cellar: :any_skip_relocation, ventura: "637694b462ba2b5d2fd2bfdde614e34b9d1fde8b90496fbd2fbdbd0e081fc822" + sha256 cellar: :any_skip_relocation, arm64_linux: "6390067a6165e948ac19e1acbc7fd963f65ba9c75ea651a7fbebf22b4645023f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd3d53ae252d26191e0afda4140ea3a2e1d6f671e2d7326f05ba7789119a21a8" + 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..ef2273e4b90fe --- /dev/null +++ b/Formula/p/patch-package.rb @@ -0,0 +1,46 @@ +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.0.tgz" + sha256 "4d2bd29c0d73a6eb8c43270125998bb7586d4f4128a2f1f7002e69edc5fed8e2" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dcccd910c1f42974369839c896362e5ffcb2b29c6bcc71d74b13c2590a9e0291" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "431f269a2de6319327359c7fe0ce21b7d10b4dfa92bff4557527987a5efb810e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "431f269a2de6319327359c7fe0ce21b7d10b4dfa92bff4557527987a5efb810e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "431f269a2de6319327359c7fe0ce21b7d10b4dfa92bff4557527987a5efb810e" + sha256 cellar: :any_skip_relocation, sonoma: "c658029b2ce64459dc717ef566600b5cba4d4228c2c0790769782e4868d550b4" + sha256 cellar: :any_skip_relocation, ventura: "c658029b2ce64459dc717ef566600b5cba4d4228c2c0790769782e4868d550b4" + sha256 cellar: :any_skip_relocation, monterey: "c658029b2ce64459dc717ef566600b5cba4d4228c2c0790769782e4868d550b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed67febe2dce537c9d9ffe24c04d33bdba70d10f73308fa9c8cb9f1e2dbe9093" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ac48440106abcb40eb35ade08df6ce7f0998ee7c6cf895905350ee23ead3944" + 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..aad5ffac0f8a8 --- /dev/null +++ b/Formula/p/patchelf.rb @@ -0,0 +1,63 @@ +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_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 + + resource "homebrew-helloworld" do + url "http://timelessname.com/elfbin/helloworld.tar.gz" + sha256 "d8c1e93f13e0b7d8fc13ce75d5b089f4d4cec15dad91d08d94a166822d749459" + 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").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..c6d1b696c5f5e --- /dev/null +++ b/Formula/p/patchutils.rb @@ -0,0 +1,50 @@ +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.2.tar.xz" + mirror "https://deb.debian.org/debian/pool/main/p/patchutils/patchutils_0.4.2.orig.tar.xz" + sha256 "8875b0965fe33de62b890f6cd793be7fafe41a4e552edbf641f1fed5ebbf45ed" + 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_sequoia: "ebaaeda4882f4e6dd9d0846db19d4def5d2d3a975996c7c41ab3d38dfaaa19d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b3008f1cd6e1e6907825d99562cba86f85284013eaa46202236a11e043558d3f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e49dcfa14b90a261ebaa265f80d2eb895c419457ca4fa26ff0fb4cb11b921e9c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d1198ecdb82f8fdb68b989ad39a3afdce9caeb9553b462f2fb337c6671b7767b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cc5cba6808061043a4275dfff1ffbc9dfc623b604bd80df87731302d24d9e8a7" + sha256 cellar: :any_skip_relocation, sonoma: "b3cb01b0c0f9df8fbb423782b2c80ce73e1f6e108200185c4a548fc817adb2f7" + sha256 cellar: :any_skip_relocation, ventura: "3809ec36a492f423a2e1d1eb2eb046bd2d4f0c780c79ebf98e0827e387b5adf2" + sha256 cellar: :any_skip_relocation, monterey: "827a4a8a0b1532b302f0b19db90f4f7fbc561057d1c7b95677f89ba955bc21da" + sha256 cellar: :any_skip_relocation, big_sur: "2305540f050f688ecb19afbd61daaee0dc51cf27d43cd2baff3e8542ea631680" + sha256 cellar: :any_skip_relocation, catalina: "3ee4d0c62b3f2b26e28fbf476c37eaeb8ccca9000c4f8f2766cd2c662de855bc" + sha256 cellar: :any_skip_relocation, mojave: "12cd388801c5c628db409cb043d6a2fc436f44ae8f01a754f430763380043af4" + sha256 cellar: :any_skip_relocation, high_sierra: "84b5013e7c6647e1cda9faa1ab9b31834ed6e2ef6c1a48d21ab7c459dc4462b3" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3d285fd561ed5b073a80c22f965792d0fd9f5c18e3b8cd91fd9b441cada08c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3195e7dccef8379cfd2976c51bb7675cd170783f0017232749cd0a18487345ae" + 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" 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/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..d5b0c573438a2 --- /dev/null +++ b/Formula/p/pax-runner.rb @@ -0,0 +1,27 @@ +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 + + 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..3f6ea535326c2 --- /dev/null +++ b/Formula/p/pax.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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 + + on_macos do + keg_only "provided by macOS" + end + + 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..6b57c5071acb7 --- /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.5/payara-6.2025.5.zip" + sha256 "53e655689c4dc1c72cb561613e04283c76e99efe2d02de1487900a188b739e32" + 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: "ed2898eb89dcf15aff96ae385e7c2fe25b11b405a12faa3cbb8394dc4f207565" + 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..fc27831d49e1d --- /dev/null +++ b/Formula/p/payload-dumper-go.rb @@ -0,0 +1,80 @@ +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_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..4bf25248346d2 --- /dev/null +++ b/Formula/p/pazpar2.rb @@ -0,0 +1,58 @@ +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 + + bottle do + 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..054b8067676e6 --- /dev/null +++ b/Formula/p/pbc-sig.rb @@ -0,0 +1,91 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "134c203178bb93b406b4c5fb5aecf171db6473d558d0bf62cf9b1682b57448e9" + sha256 cellar: :any, high_sierra: "79c31a3f1bcc2429648a2258974ccb1185cfe244d4fcbbfa2840c7393e7e058a" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..b2f8387e79192 --- /dev/null +++ b/Formula/p/pbc.rb @@ -0,0 +1,95 @@ +class Pbc < Formula + desc "Pairing-based cryptography" + homepage "https://crypto.stanford.edu/pbc/" + license "LGPL-3.0-only" + + stable do + url "https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz" + sha256 "772527404117587560080241cedaf441e5cac3269009cdde4c588a1dce4c23d2" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + end + + livecheck do + url "https://crypto.stanford.edu/pbc/download.html" + regex(/href=.*?pbc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "566ef59675030399f76d4f7c067ca04cecaa3ebb4d9102aa480dbe39c24ba487" + sha256 cellar: :any, arm64_sonoma: "4e89883c3b22eccfdf0904017650418af4c2f50bc9ae41a535235ac1d235f27f" + sha256 cellar: :any, arm64_ventura: "e22db03b394884a0f34163c74d87b6c33210aefd98cc751d2ab61108c667fdf0" + sha256 cellar: :any, arm64_monterey: "2397daa1cad88180149983c0f6557b6a48fa2124c24ac78a8d95dd0af9cac8a0" + sha256 cellar: :any, arm64_big_sur: "ac722f3534f9cf0679f2c999353a524d822d4068d8f9877a5967fe6fbcef9f04" + sha256 cellar: :any, sonoma: "3cdb93d8e2e6876981b58d28a7e4b67e299db718ab0a9ffef12d53164d2a7a9e" + sha256 cellar: :any, ventura: "903a04400b010de2e1c4311881dfaa8cfc9f04ee40a83f369a19fd334e6b4446" + sha256 cellar: :any, monterey: "dfe0e9676dd479513ec0cf524d6a225229de96aa058492a6319cdd914dd3509f" + sha256 cellar: :any, big_sur: "c14c0514c725c35d0dffbc7dc410ddc5be033e061ffc66d9c039033b0ca1e6e4" + sha256 cellar: :any, catalina: "83d464696ab79f463ec2dc930cbd9c3ecbdedde5c578e70a4994b2cd8fec1f6d" + sha256 cellar: :any, mojave: "85855bfe6dfe9a4fc0b0359f74aa7ea587283c1c724a6c4aee77972ecfc1d390" + sha256 cellar: :any, high_sierra: "adc712fd4cc68990b669922be5b8ab15e4d499176c09facb5b129c6d7c847262" + sha256 cellar: :any_skip_relocation, arm64_linux: "85ffa4238451ccfe2c90072b100d48a53d352e6209613bdee067f2347d088d47" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cefb9bc4223d88aa32583abbee1bf2af89e36760b8cabbe4af2e11819f993eb1" + 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 + 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..26eb1f437e32c --- /dev/null +++ b/Formula/p/pbzip2.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, mojave: "5594212d69f619f7fa59cfec23ce2c6eefa0f8c69d5e77cdd84cf9e2478d0d51" + sha256 cellar: :any_skip_relocation, high_sierra: "d72e618d7301937ab6a392e1ef3d9ed1f8d5380cd6516ea17b4e4bde11eea9a7" + sha256 cellar: :any_skip_relocation, sierra: "c15b9c38b5302286033e54ff4be006c3b31ccb179f96641e44f1126958527d7e" + sha256 cellar: :any_skip_relocation, el_capitan: "be653d724b6f061cb9939dbdbf457aebc275e16dbf599f598b9ff3999fdd5db3" + sha256 cellar: :any_skip_relocation, arm64_linux: "c63518fb5d60d394bcc30e58d8af968509e373d1b658fdcc0a42b48368fd4b1d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33c30ab657b712607e295bb648c8d7ce7c5590ec916aef948e2f38dc25c51551" + end + + uses_from_macos "bzip2" + + 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/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..e0f46c5dcead2 --- /dev/null +++ b/Formula/p/pc6001vx.rb @@ -0,0 +1,69 @@ +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.12_src.tar.gz" + sha256 "344c8c4a8947d3dd8430ff4eb4a6e5679ac574bc268d0c4cefe3c341f1b79610" + license "LGPL-2.1-or-later" + head "https://github.com/eighttails/PC6001VX.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sonoma: "6c44a7961c6c4cb75d0436f10e5dbb163ccda2fa50663a29c06a3f90658328ad" + sha256 cellar: :any, arm64_ventura: "2f51ff79b4b4942c922556e2a2ac618a6d2084ecce9d5cf6c4db1b8f7bbb4c6f" + sha256 cellar: :any, sonoma: "8fc6c40989a9c9fccd205a0ceca1a345508dfb5903188fca943ce655c9f0304e" + sha256 cellar: :any, ventura: "4d8400ad9c8288c9fe10f1dcefd75656e50424254523215bcb74794f5354740e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3915318816e5fbec75f5ca1610c47c28f00e7576f89c180cdfdac14a0722518a" + end + + depends_on "pkgconf" => :build + depends_on "ffmpeg" + depends_on "qt" + 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..d3de3310c11ee --- /dev/null +++ b/Formula/p/pcal.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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, mojave: "0d4a63fb432c80894e629b89cf5500ffb1a03928b68b0e8c334c96adda01ce2b" + sha256 cellar: :any_skip_relocation, high_sierra: "25a667f9b166482637d890497e6fc9465ff8e28a4315a25ba5413fef9c68d79c" + sha256 cellar: :any_skip_relocation, sierra: "134df5abc458995e6092041db145e9bca45e2ff71eeeec9de410d497afbe7177" + sha256 cellar: :any_skip_relocation, el_capitan: "271667aef1031a0007e042fb3f933708aa33398d6bf9982a7353e6023d0d955c" + 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..460b4d3b55627 --- /dev/null +++ b/Formula/p/pcalc.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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..5c8cb4806900b --- /dev/null +++ b/Formula/p/pcapplusplus.rb @@ -0,0 +1,62 @@ +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_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, x86_64_linux: "42c2a06a698bfd44bef147d045900a270af1418a3d2828d0ff406f1eeb0c02af" + end + + depends_on "cmake" => [:build, :test] + uses_from_macos "libpcap" + + def install + cmake_args = %w[ + -DPCAPPP_BUILD_EXAMPLES=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..98d32e74423ba --- /dev/null +++ b/Formula/p/pcaudiolib.rb @@ -0,0 +1,58 @@ +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_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..ca6e748b4f214 --- /dev/null +++ b/Formula/p/pcb.rb @@ -0,0 +1,89 @@ +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 + + livecheck do + url :stable + regex(%r{url=.*?/pcb[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + 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 + + 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..f3d48dff673b0 --- /dev/null +++ b/Formula/p/pcb2gcode.rb @@ -0,0 +1,122 @@ +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 9 + head "https://github.com/pcb2gcode/pcb2gcode.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sonoma: "b0c34ab4eeed7f51c74bda44421ef4a5b56b4c5916498de6253b6bf581a39664" + sha256 cellar: :any, arm64_ventura: "8fa1390aa15ea9ef167594ca339f0f3687aa1dcce8f91b0eee0cf779a5a1f70f" + sha256 cellar: :any, sonoma: "635a5ed1cdbbfe328708eee192e6702403a538065f40eab9db06d77d13a85849" + sha256 cellar: :any, ventura: "376e08e44994e602079a27d5253f9b5104486d4396d564a365b26dca7cd92faf" + sha256 cellar: :any_skip_relocation, arm64_linux: "32fa3e537d38d72f38ce03f848d8c181fb4fd656f805b3b22fc128a5af658622" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb3d914b7ec389c946a1f7e22b3ca190895798e029b1438276d9acc59cc917d7" + 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..9c8d9a2f96e3e --- /dev/null +++ b/Formula/p/pce.rb @@ -0,0 +1,66 @@ +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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "17114b6c0a358160aabd06b3ae1999cfecb546fd8a4e070605e1fa52c318b767" + sha256 cellar: :any, arm64_sonoma: "06c5d604c5179ef189ace688dd996d55754841ce310066779725b257919a3285" + sha256 cellar: :any, arm64_ventura: "f4bcc186e10297c857c01a2c1f49f38dd8abe2324de512253fef924664b41dc5" + sha256 cellar: :any, arm64_monterey: "e91060cfda85a63fee4413b7eb726714f8775e0cd452edd0957eba43c578fdd4" + sha256 cellar: :any, arm64_big_sur: "a549787c54e01ed779ac141bf523bca16b00151802f77fa869c2f2d660dc2732" + sha256 cellar: :any, sonoma: "7620244037240613d4c450263da7b0bf50dbd69654bfb2d19ea80caaf14c1efc" + sha256 cellar: :any, ventura: "8fa6df0cb0f1403a8f57260e983d38b7090cc7128ef5da6c8b5fe13e0918fda4" + sha256 cellar: :any, monterey: "a393cdc7dadc636acfe2f16510d4422ffd2a9fa565c094e8b82c26a7c4574456" + sha256 cellar: :any, big_sur: "84d3de8d69880534cd5a1daa04370df793e7cd81ea4c97d7146c567e904a9c28" + sha256 cellar: :any, catalina: "2d003611fb1b523196faccd42360b38a5ef955ba9a5accf213270381499c00d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "397646dba64dee1d8feb62274c7b1e5a3ec7d6e25e7fb1c13f9c3ac5b53b2c58" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8085c1b4a0418582fd72b74f50d33b8cc04d3b791ed023e1ef31b96e6a631c8f" + end + + head do + url "git://git.hampa.ch/pce.git", branch: "master" + depends_on "sdl2" + end + + depends_on "readline" + + on_high_sierra :or_newer do + depends_on "nasm" => :build + end + + 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? + + system "./configure", *std_configure_args, + "--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/p/pciutils.rb b/Formula/p/pciutils.rb new file mode 100644 index 0000000000000..40b68d022a54d --- /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.13.0.tar.gz" + sha256 "861fc26151a4596f5c3cb6f97d6c75c675051fa014959e26fb871c8c932ebc67" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_linux: "a90ffab769185ce520f0252389c17a5c7f74e233d858d4554cf92d0e66282db5" + sha256 x86_64_linux: "8642b280a07552b6b9e2d4a887963900158155ea00b5cd85558b0f481e8204a8" + end + + depends_on :linux + 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..21b2f72b84a97 --- /dev/null +++ b/Formula/p/pcl.rb @@ -0,0 +1,136 @@ +class Pcl < Formula + desc "Library for 2D/3D image and point cloud processing" + homepage "https://pointclouds.org/" + url "https://github.com/PointCloudLibrary/pcl/archive/refs/tags/pcl-1.15.0.tar.gz" + sha256 "e90c981c21e89c45201c5083db8308e099f34c1782f92fd65a0a4eb0b72c6fbf" + license "BSD-3-Clause" + revision 1 + head "https://github.com/PointCloudLibrary/pcl.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sonoma: "03fde7c94634272d2b7b00d03942edbfd0a522be1dccb79d6cc7c5bbc8a31f42" + sha256 cellar: :any, arm64_ventura: "747c17ba17c637e726e7bd4016af13867223c979a513705293ca6f912b2db62a" + sha256 cellar: :any, sonoma: "43a7b7cb8a0712dc1db29cdb073242ef20200ae6883eca9616c9ada9f0b00367" + sha256 cellar: :any, ventura: "174bdea4b9e66ef9e3a8f5887f65dbfa3f9edf7cb3808860b379d2df11cdc25e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a5d708d8ddda9491022bea26195a43f176f7bf4a1d89d1b09a160c5c41a154e2" + 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 "qt" + 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 + + 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? + + 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..d6a995f6108b9 --- /dev/null +++ b/Formula/p/pcp.rb @@ -0,0 +1,44 @@ +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_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, mojave: "d5e48f3b7f8e0e0034dede947f94b0d5a23311e6ced60093b2cdfea9427389e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be128448d96fd7005c9cbda1c1ba2c71e7f7a58468c1c5bb3ec7a1f75c5109c5" + end + + 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..2d8094be1234d --- /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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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_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, mojave: "a42b79956773d18c4ac337868cfc15fadadf5e779d65c12ffd6f8fd379b5514c" + 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 or OS older than sierra + args << "--enable-jit" if OS.mac? && MacOS.version >= :sierra && !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..0017c51b6a26a --- /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.45/pcre2-10.45.tar.bz2" + sha256 "21547f3516120c75597e5b30a992e27a592a31950b5140e7b8bfde3f192033c4" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^pcre2[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "f2abc87de6796a4e639f93d42c6d515cad90418fd7b701bcf322fb8e1443704e" + sha256 cellar: :any, arm64_sonoma: "549a4a79676a6e2c58896cb46cf7d36a8c86f3696e61c43f07dca6660c32cd08" + sha256 cellar: :any, arm64_ventura: "a780535fb2f47a39bd16d28f966da1c99b868d7e15b2d18b75b509b6deb85e0d" + sha256 cellar: :any, sonoma: "5b1916e8e569da37aabc596561eb93a6bdf7cff4d55d35a351576c071ce723cc" + sha256 cellar: :any, ventura: "83722732df9490388e3fa729d06063fbd3fe7e245b0269c5b67f736ffa8c9ba5" + sha256 cellar: :any_skip_relocation, arm64_linux: "5081c77793061bb49fd74ffdefee2b52cdf49df0d2f9799888d943a826dac75a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a5727c5e1b6d0aa922bc2d30ae6510dca32f1b738a7501bcdf18823c59e120e" + 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..639c8d4ad2e00 --- /dev/null +++ b/Formula/p/pcsc-lite.rb @@ -0,0 +1,56 @@ +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.3.3.tar.xz" + sha256 "cdff7d7153a0b37aa74e26dfec89ec7dc5c5286aa21b91b903e38739d227e8e7" + 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_sequoia: "f95249f28b4c8f7c3cc0a5e271bacfa26f6e1a496604daad4b08085b6c472bdc" + sha256 cellar: :any, arm64_sonoma: "6a8a48b4a42c96852e25c8cef498c0c69fd81d88870905f843950c046ba27782" + sha256 cellar: :any, arm64_ventura: "cd73572b68d633209717cdf8b804b5bbd099a74f36d330e8e96e09286e45430f" + sha256 cellar: :any, sonoma: "6b85920c94e2410027d9e6c32a6c0260ba41bd0edf673e681177c87435650fb7" + sha256 cellar: :any, ventura: "4e5b67b3d0b3cbd84386e8d1c8032c8fb92406e41f9f6a26411028bfa5a831f1" + sha256 arm64_linux: "7b3bce7cfc254db6c5aced0f48a73daae93a0082f01c1db1aadb828f681c8733" + sha256 x86_64_linux: "3264145e978cc211a9c213676ddbe44f8b890296d5aded28c9f8e247bd321c6b" + 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..725d50bd1ecbc --- /dev/null +++ b/Formula/p/pdal.rb @@ -0,0 +1,74 @@ +class Pdal < Formula + desc "Point data abstraction library" + homepage "https://www.pdal.io/" + url "https://github.com/PDAL/PDAL/releases/download/2.8.4/PDAL-2.8.4-src.tar.bz2" + sha256 "c27dc79af0b26f9cb3209b694703e9d576f1b0c8c05b36206fd5e310494e75b5" + 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_sequoia: "64bb0d0e90ce547231899e349d64126c75c9a89e4564e57ede59eeca6c654e5e" + sha256 cellar: :any, arm64_sonoma: "6b051c39b6bb6c691cc76aca04fd53191515ac9ae64971185f601f5dfadbe32c" + sha256 cellar: :any, arm64_ventura: "7b44dbcbfdfac6af9dcf1d59f2cc37182224638c5289fc16374c465aae0a415b" + sha256 cellar: :any, sonoma: "4bc10dded0e56135067113caa32b25833dda96c80bb14673b840952b58e85f29" + sha256 cellar: :any, ventura: "725b858faef46f66946bc1e29ae644bef8f42c71295196a070bec68ec6222de2" + sha256 cellar: :any_skip_relocation, arm64_linux: "be97476fd1203ef225f9aa71469adac4aac70314af62aafe9abf8921e812f32c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e28a8d44c02b9f638c76824ad8a17a90cbb9f806bf4b5aba66a49a29ee91738b" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "gdal" + depends_on "hdf5" + depends_on "laszip" + depends_on "libgeotiff" + depends_on "libpq" + depends_on "libxml2" + depends_on "numpy" + depends_on "openssl@3" + depends_on "proj" + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "zlib" + + on_linux do + depends_on "libunwind" + end + + def install + args = %w[ + -DWITH_LASZIP=TRUE + -DBUILD_PLUGIN_GREYHOUND=ON + -DBUILD_PLUGIN_ICEBRIDGE=ON + -DBUILD_PLUGIN_PGPOINTCLOUD=ON + -DBUILD_PLUGIN_PYTHON=ON + -DBUILD_PLUGIN_SQLITE=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..17f746d37d9ff --- /dev/null +++ b/Formula/p/pdf-diff.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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..dba2f2f1e9a3a --- /dev/null +++ b/Formula/p/pdf2image.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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 mojave: "00f2f25eb5580dc2a4bbab2ac2913fea732967098cd373e52b6f5317098d8936" + sha256 high_sierra: "622e0f3caa2eeffe59384682a196fd42b381e638d67ddb399e39342e08fee1b1" + 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..f09ae0222b33c --- /dev/null +++ b/Formula/p/pdf2json.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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, mojave: "abf950838b700f50ff4279501533176cb5a1929fb0b88c8ccf94b07ac362c66d" + sha256 cellar: :any_skip_relocation, high_sierra: "4bee4b8c61362c64d72a3f011f8c5ef223c5e80d269e442a18472adc42e108e9" + 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..1373a931ead4b --- /dev/null +++ b/Formula/p/pdf2svg.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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..a991d3a7c57db --- /dev/null +++ b/Formula/p/pdfalyzer.rb @@ -0,0 +1,102 @@ +class Pdfalyzer < Formula + include Language::Python::Virtualenv + + desc "PDF analysis toolkit" + homepage "https://github.com/michelcrypt4d4mus/pdfalyzer" + url "https://files.pythonhosted.org/packages/d4/5b/2d87bbf1a5a81defc6ddb99ff2a5af5a2ada576de32db3b8278f54874009/pdfalyzer-1.16.1.tar.gz" + sha256 "da776a725ad5e165922848317a3a745e10372e1a96b6eefb45883f4acdb29a0a" + license "GPL-3.0-or-later" + head "https://github.com/michelcrypt4d4mus/pdfalyzer.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "74359e0a47ca459f2246af0cfc394136b85eeacfe75214d35c31a27f332a2fce" + sha256 cellar: :any, arm64_sonoma: "cc147583cb9801e40f2d55608fbfedac681f94eb11a505af26db9005e9a09bad" + sha256 cellar: :any, arm64_ventura: "5361a33d1fe1f885075108905620352027aae864fd7b893fdc896dd9333d00ce" + sha256 cellar: :any, sonoma: "667add8cd26e9cdc19c9175f7da5c90bbf3afd4d9427882b952b020d7f7b05b5" + sha256 cellar: :any, ventura: "48efa4ee33cfe1011ad23591fbbbcb9cfbd4b94536238200bf1d97e1b7e309d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "7303e0c0d12775502629ad71741439fda209dae5ea76dd85bd62cd88d97cd9e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bd8f55ccc9165e438fcf522f0232091719d1dd571ebd4e3049af1d5bad718b35" + end + + depends_on "openssl@3" + depends_on "python@3.13" + + resource "anytree" do + url "https://files.pythonhosted.org/packages/f9/44/2dd9c5d0c3befe899738b930aa056e003b1441bfbf34aab8fce90b2b7dea/anytree-2.12.1.tar.gz" + sha256 "244def434ccf31b668ed282954e5d315b4e066c4940b94aff4a7962d85947830" + + # poetry build patch, upstream pr ref, https://github.com/c0fec0de/anytree/pull/271 + patch do + url "https://github.com/c0fec0de/anytree/commit/aa20d31631403f9650f3b4090d5c8579f9abaf5b.patch?full_index=1" + sha256 "05b9b5ecf80986fcecb195d798e1277c9e7c69ed5fd44fea9898e20a44828587" + end + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" + sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" + 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/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "pypdf" do + url "https://files.pythonhosted.org/packages/9d/28/6bc2ca8a521512f2904e6aa3028af43a864fe2b66c77ea01bbbc97f52b98/pypdf-5.0.1.tar.gz" + sha256 "a361c3c372b4a659f9c8dd438d5ce29a753c79c620dc6e1fd66977651f5547ea" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/f5/d7/d548e0d5a68b328a8d69af833a861be415a17cb15ce3d8f0cd850073d2e1/python-dotenv-0.21.1.tar.gz" + sha256 "1c93de8f636cde3ce377292818d0e440b6e45a82f215c3744979151fa8151c49" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/11/23/814edf09ec6470d52022b9e95c23c1bef77f0bc451761e1504ebd09606d3/rich-12.6.0.tar.gz" + sha256 "ba3a3775974105c221d31141f2c116f4fd65c5ceb0698657a11e9f295ec93fd0" + 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 "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "yara-python" do + url "https://files.pythonhosted.org/packages/2f/3a/0d2970e76215ab7a835ebf06ba0015f98a9d8e11b9969e60f1ca63f04ba5/yara_python-4.5.1.tar.gz" + sha256 "52ab24422b021ae648be3de25090cbf9e6c6caa20488f498860d07f7be397930" + end + + resource "yaralyzer" do + url "https://files.pythonhosted.org/packages/23/73/9adfae6d87a9faaaaaccf2766e75c364314c127c81366cfecc3cce1d735d/yaralyzer-0.9.4.tar.gz" + sha256 "a30f655e7e42221bdb069c2f4c6a8c67d10408f3d0f3e4be08dab7dbf0ffe6ba" + 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..8d42febf1d6b8 --- /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.10.2.tar.gz" + sha256 "a07cc50446ef6526fa26d5fe2c9e207724971e0b6917f3d70680ec39cfc53aec" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dbfe66486cb5610e9b1dd03580ab566c557929770eb73938aa092b2f6cf7bbad" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dbfe66486cb5610e9b1dd03580ab566c557929770eb73938aa092b2f6cf7bbad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dbfe66486cb5610e9b1dd03580ab566c557929770eb73938aa092b2f6cf7bbad" + sha256 cellar: :any_skip_relocation, sonoma: "4d543ddf966abd6bd5b0a3e24cc0f2d79567e6de3d79283aaf973e341de0d8b7" + sha256 cellar: :any_skip_relocation, ventura: "4d543ddf966abd6bd5b0a3e24cc0f2d79567e6de3d79283aaf973e341de0d8b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "913e9c226dc778530c8a0941460bf3cb5990070a8763815bc263c3e6f32063e3" + 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..651c5659f1ab6 --- /dev/null +++ b/Formula/p/pdfcrack.rb @@ -0,0 +1,31 @@ +class Pdfcrack < Formula + desc "PDF files password cracker" + homepage "https://pdfcrack.sourceforge.net/" + url "https://downloads.sourceforge.net/project/pdfcrack/pdfcrack/pdfcrack-0.20/pdfcrack-0.20.tar.gz" + sha256 "7b8b29b18fcd5cb984aeb640ee06edf09fede4709b59c32fee4f2d86860de5b4" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b014cb16fb3c9c3d8d587c792f9d94d2c1c7efc6032cdffab864c3e8c93786f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "db85d14c7177eed695a8947e0d8ffb49c9378ac5b5a704a27a9375736b063e2d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fedea0ab3ba0838a429e8ed114d60d4f58da156c5c744fc2d20346e3a48a7f06" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cca12550f347ca49f8a11858013225bd36cd851c4ad43505d4ba6b205914c31a" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8b8b8b66dc3d864bb5bc16363fb64aa1fbc467f29fd41bd0184b23da9a37fc41" + sha256 cellar: :any_skip_relocation, sonoma: "923edc7797d1589d947b9b885980d7b767a16aa6eaeeac4c230f7ad9a9a3e2c9" + sha256 cellar: :any_skip_relocation, ventura: "9867baec308baa565b939bc7699ebf762a3a9f7c7b31bd2fd0411dff01725390" + sha256 cellar: :any_skip_relocation, monterey: "7bb75581bf7567d9992fffc9cbfa6742c43e4bd41b6adbe4906f441666a98e76" + sha256 cellar: :any_skip_relocation, big_sur: "dc978f3e5078c22cc095f8b6947d6e09ef903720e9c5035a178594abe2ccd573" + sha256 cellar: :any_skip_relocation, catalina: "e333186830217c419886e8c068204c355044d70ff45e6210498894f8da12d13d" + sha256 cellar: :any_skip_relocation, arm64_linux: "461c25aa48ea7ea33702e9e5a196a25ff329fd9da902a007821a61109eac8b5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac7d9f63248e7c6828bc9c9e0df709dad76b2e3954246fb7c382da62d6ca4859" + 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..09673b90f5657 --- /dev/null +++ b/Formula/p/pdfgrep.rb @@ -0,0 +1,47 @@ +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_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..59912e28577f1 --- /dev/null +++ b/Formula/p/pdfly.rb @@ -0,0 +1,124 @@ +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/6d/d2/201b4033263245785e4f7f91265609d6c433bd45648e907be9e47cbb784d/pdfly-0.4.0.tar.gz" + sha256 "aff261b45397b2c6eb1e2cdd42fd89325aa5e88c2dae9f0af15d3859bdcba9b9" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7e91da36531c3b7076bcffd1dde7aba56d94e8c11b13447fe1d40496b7e498b6" + sha256 cellar: :any, arm64_sonoma: "26394b3ed577a21919b60a24c74c983e4480564b85ec159dbb0b0224599737b1" + sha256 cellar: :any, arm64_ventura: "09f6c3a13a4e014c9c588cab0cae45322d271214b6aec592a2321b31c45074ef" + sha256 cellar: :any, sonoma: "f6facb62383357c88042f90b1dbe8a8fe82b48b00568dc851d16708c26928f1f" + sha256 cellar: :any, ventura: "e58d87bc2e341ca79f8b965d3610ee8e8b895517e91b4ca16397d65ad0d0a814" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5f900e8fdd5dfdd164461a48597936485983ef42fedd0c8ae33634f4f77a480" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a38bab6d6d1cdec358d0ec1caa52fab83d4bbae465e0d5b133636f4636ebd64" + end + + depends_on "rust" => :build # for pydantic-core + depends_on "pillow" + depends_on "python@3.13" + + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + end + + resource "fonttools" do + url "https://files.pythonhosted.org/packages/1c/8c/9ffa2a555af0e5e5d0e2ed7fdd8c9bef474ed676995bb4c57c9cd0014248/fonttools-4.56.0.tar.gz" + sha256 "a114d1567e1a1586b7e9e7fc2ff686ca542a82769a296cef131e4c4af51e58f4" + end + + resource "fpdf2" do + url "https://files.pythonhosted.org/packages/b0/54/0e86f986e81abad9e6b348f5176048a2aa046920d46292c42a581064d93e/fpdf2-2.8.2.tar.gz" + sha256 "3a2c6699c39b23b786fc6ad9fc3de5432e59f6b6383bb9ab4ce1f994a5f3e762" + 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 "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/b7/ae/d5220c5c52b158b1de7ca89fc5edb72f304a70a4c540c84c8844bf4008de/pydantic-2.10.6.tar.gz" + sha256 "ca5daa827cce33de7a42be142548b0096bf05a7e7b365aebfa5f8eeec7128236" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/fc/01/f3e5ac5e7c25833db5eb555f7b7ab24cd6f8c322d3a3ad2d67a952dc0abc/pydantic_core-2.27.2.tar.gz" + sha256 "eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pypdf" do + url "https://files.pythonhosted.org/packages/2a/c6/9b0920ddcb29ce980f84f2fb585b515b1431625a1b9aeb5fd5753ee0f62e/pypdf-5.3.0.tar.gz" + sha256 "08393660dfea25b27ec6fe863fb2f2248e6270da5103fae49e9dea8178741951" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + 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/cb/ce/dca7b219718afd37a0068f4f2530a727c2b74a8b6e8e0c0080a4c0de4fcd/typer-0.15.1.tar.gz" + sha256 "a0588c0a7fa68a1978a069818657778f86abe6ff5ea6abf472f940a08bfe4f0a" + 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 + 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..858378d7ae611 --- /dev/null +++ b/Formula/p/pdfpc.rb @@ -0,0 +1,62 @@ +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" + + bottle do + 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..04a967e422591 --- /dev/null +++ b/Formula/p/pdfrip.rb @@ -0,0 +1,37 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bca08e27db986d69640df5ab539f1b84fcaada7f43d6f8235d472bfb26acc1f1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "92eafcb03fc927dbe7a94aa8b5657038621d342f1405c2a09d6766a94ee04231" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b6c3dfc1b88440a91d4cdcdf76699599cf6955b8c31d1376bbff00b13751ead1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0d5def9d0760ae745a23e26a0b37afb953a340ea6de90940a3f218b0dc369ebc" + sha256 cellar: :any_skip_relocation, sonoma: "a1d72c6cfcec8a572e0e8c3e07acea03120fb692c321c8c88993dac530a127e0" + sha256 cellar: :any_skip_relocation, ventura: "83cd8a56b4a4238f6ccf0dca5519393686ec2c4e144d035841c71228637a7933" + sha256 cellar: :any_skip_relocation, monterey: "cf71e60e04dc370096a46ba62694e46749dbeaf9e5fbdd9050bd355f0d8be40b" + sha256 cellar: :any_skip_relocation, arm64_linux: "c4ce0bc480f1229dfb409f87690ac832a3022a56d0bfe56b562c3d1a192d5a8f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "311c5aacf5d23a6e692524c39f632bac0bc0a4984b0a5de34ff452f6490d9a28" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + 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 diff --git a/Formula/p/pdfsandwich.rb b/Formula/p/pdfsandwich.rb new file mode 100644 index 0000000000000..5a7fe1d64cd0a --- /dev/null +++ b/Formula/p/pdfsandwich.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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, mojave: "dd4a617ef7bb8bb83cb9da94556537624bcf188789846e978ccb25926fcd7027" + 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..1f3261759a8fe --- /dev/null +++ b/Formula/p/pdftilecut.rb @@ -0,0 +1,32 @@ +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 + + bottle do + 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..c04d3c900b7f5 --- /dev/null +++ b/Formula/p/pdftk-java.rb @@ -0,0 +1,41 @@ +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_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 + + depends_on "gradle" => :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..5fb3f1ca43573 --- /dev/null +++ b/Formula/p/pdftohtml.rb @@ -0,0 +1,42 @@ +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 + + bottle do + rebuild 2 + 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, mojave: "c49245634c48c7c24501cfb848a98e4b6a281ff0cf89235bb7a7ce09619e66ad" + sha256 cellar: :any_skip_relocation, high_sierra: "200be428031e013f58b792b092b56e74743d6362d747b0c883bb95269d7a5e72" + 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..c2bf875520bf5 --- /dev/null +++ b/Formula/p/pdftoipe.rb @@ -0,0 +1,35 @@ +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 6 + + bottle do + sha256 cellar: :any, arm64_sequoia: "9e93f97375ae15498043bc1cfe9733bd2939f2a000817f4c497a055407e13349" + sha256 cellar: :any, arm64_sonoma: "dcd657a43dbc49efb2f2de2bf4a78c6ed1e93576365e97947e2f78e006851e0c" + sha256 cellar: :any, arm64_ventura: "ce7e36a7df776d6955d39cae2ac448785c1f0e791a623448bc6b4e3faf6198d0" + sha256 cellar: :any, sonoma: "7668361aa148108d8d71cee8242525543fdd6228a3ea4bb94e3d216a84f919ff" + sha256 cellar: :any, ventura: "a1d8e7abc1851aff252b5ee0925843a8cd3f32587730a5da3145d970c1905bb3" + sha256 cellar: :any_skip_relocation, arm64_linux: "24d9edff97cc36b7050ed98a75baeba2184f941710ca7257b10d7cad82b48fb0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13364e0ade978267567a9687c4a783c7761b6cb9b8bab6f2c77b147d91414711" + end + + depends_on "pkgconf" => :build + depends_on "poppler" + + 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..461d0556f1253 --- /dev/null +++ b/Formula/p/pdm.rb @@ -0,0 +1,219 @@ +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/f2/ca/29bfb48005d956c1f67385f9c6e134aea0a7ab298181fc82e201fa27ae78/pdm-2.24.1.tar.gz" + sha256 "fc8adf011caa4ee2b0f25dabf890152aa4153cc21599ea67fe0c14e533dcd6d9" + license "MIT" + revision 1 + head "https://github.com/pdm-project/pdm.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "79a1a34f8d372add0a8aab703275aa4e10646e8e1e1e7174e67fc0d85c26b45e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "20002b4af467a74d1cecc647ce727c0c89ccf4e7f2784a43c6b826abd8b0f593" + sha256 cellar: :any_skip_relocation, arm64_ventura: "55658a3cbba262a6cd35eb4c56f591f23d1d690dfac923da61059968df66c37e" + sha256 cellar: :any_skip_relocation, sonoma: "02aba6e81032c60da5eb3d2997f56825fd6d6bb7ff371f6a53f4f22a0de202a0" + sha256 cellar: :any_skip_relocation, ventura: "29c4e2de509ec426dca59f22b9c0135f062f0659c266f9c968ef67072a05890d" + sha256 cellar: :any_skip_relocation, arm64_linux: "13414281e34ac0ebc6c4a6835e06edfd569b7f056c98ddff4b0e130ca49dc1f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04f39f75e3fdc0ca1d1d2262f2fa5b6580b1159feeb76c7a6af17e16fc3555e2" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "dep-logic" do + url "https://files.pythonhosted.org/packages/02/c8/f2d9d1e5ed8c4d37ed898ea4cdf20bed829d351fbf3426e815b68db3fa51/dep_logic-0.5.0.tar.gz" + sha256 "be92e772f15d2563edd6b8694a6818846ad2822310dfc8f39cd20ebb0b03e329" + 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 "findpython" do + url "https://files.pythonhosted.org/packages/2d/73/ab2c4fb7972145c1595c07837cffc1456c1510a908f5c8bda9745930ee60/findpython-0.6.3.tar.gz" + sha256 "5863ea55556d8aadc693481a14ac4f3624952719efc1c5591abb0b4a9e965c94" + 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/a8/3d/f754187b9703a8db211e80cef0fc4e27e0ab2edbeacccf1257c096dade48/hishel-0.1.2.tar.gz" + sha256 "6643450bfb1cfa2ecd6002769f6f5069d0d048c9c1f1e29a98a48302d5875092" + 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/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 "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 "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/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + 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/b9/f4/f60628d7424c7d7461c97317b642c48c3e21e9e09025f96179f9df61710f/pbs_installer-2025.4.9.tar.gz" + sha256 "15755bc94769a544af5dda155f973c70caf76f0e70b21f3c8a8ed506f102f88f" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/88/2c/7bb1416c5620485aa793f2de31d3df393d3686aa8a8506d11e10e13c5baf/python_dotenv-1.1.0.tar.gz" + sha256 "41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "resolvelib" do + url "https://files.pythonhosted.org/packages/79/e6/53dc936ddd11353967e5cb7361f537042914745fccfcaa3475505c9ac596/resolvelib-1.1.0.tar.gz" + sha256 "b68591ef748f58c1e2a2ac28d0961b3586ae8b25f60b0ba9a5e4f3d87c1d6a79" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + resource "truststore" do + url "https://files.pythonhosted.org/packages/0f/a7/b7a43228762966a13598a404f3dfb4803ea29a906f449d8b0e73ed0bcd30/truststore-0.10.1.tar.gz" + sha256 "eda021616b59021812e800fa0a071e51b266721bef3ce092db8a699e21c63539" + end + + resource "unearth" do + url "https://files.pythonhosted.org/packages/24/df/033117cc4636974ab79837b37bc79cecb18ff27bf172b5a2f7c4246bd0bc/unearth-0.17.5.tar.gz" + sha256 "a19e1c02e64b40518d088079c7416fc41b45a648b81a4128aac02597234ee6ba" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/38/e0/633e369b91bbc664df47dcb5454b6c7cf441e8f5b9d0c250ce9f0546401e/virtualenv-20.30.0.tar.gz" + sha256 "800863162bcaa5450a6e4d721049730e7f2dae07720e0902b0e4040bd6f9ada8" + end + + def install + virtualenv_install_with_resources + generate_completions_from_executable(bin/"pdm", "completion") + 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..8ef63e2da9d12 --- /dev/null +++ b/Formula/p/pdns.rb @@ -0,0 +1,69 @@ +class Pdns < Formula + desc "Authoritative nameserver" + homepage "https://www.powerdns.com/" + url "https://downloads.powerdns.com/releases/pdns-4.9.5.tar.bz2" + sha256 "669bb7b99823b32c3901337d69b38c9f8073f2fc02e8764933b8c5c0974e2724" + 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_sequoia: "fb8632a4bed8ad090c89ec5f1f45f80258173583e2d94f874a51ffe3872c57e4" + sha256 arm64_sonoma: "020265542e8be2ca67232914147fa9777fee495c0959902d7119170d7e3b20c3" + sha256 arm64_ventura: "70fde4ca2ab25d973dcf35597ec31c3048e7a69703f148b096c323d699a92335" + sha256 sonoma: "e95ffc9d3a7c07239dad247fdcaaed963377601bde673fd31848f336d1d05569" + sha256 ventura: "cae7d9a935325d132ca86e49d311df8adc4215ed8ecbd0137170b8b0d8643dbb" + sha256 arm64_linux: "04b8ead3952463b591b9045f73a0adb843d8f7d234cb8b98f28cc83ca668025a" + sha256 x86_64_linux: "1de0c061b0be4150cda9313024254850c4b20359fc2fd0c4ec866ffe0b872bdb" + 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..4d7c33e6f5fe6 --- /dev/null +++ b/Formula/p/pdnsd.rb @@ -0,0 +1,76 @@ +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 mojave: "822ab7ede7c626ab8cb0c5e7340f3896cdef7cc112c8d9843e55d601f5847297" + sha256 high_sierra: "be218973e8fe1d807e7d9ec2762cab2a9968ce302fb46fb89974a686c1afcc43" + sha256 sierra: "81c4852b1093820909afc140f052f732cbd94e428d9aff261b90d74cb4935b09" + sha256 el_capitan: "1fa2f1f6ba9fc4fe710c1dc1d5bfb2b9663c557f5cdddf3a2fff8394f138a08f" + 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..64fa9bd05f34a --- /dev/null +++ b/Formula/p/pdnsrec.rb @@ -0,0 +1,66 @@ +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.2.2.tar.bz2" + sha256 "f9c95274231ee3c5c94197f6d05011d55abf06b2937535ba8e78e24ea4fbbd6e" + license "GPL-2.0-only" => { with: "openvpn-openssl-exception" } + revision 1 + + livecheck do + url "https://downloads.powerdns.com/releases/" + regex(/href=.*?pdns-recursor[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "f1c32a790a3d511170a0d43ca6a633560ae5fc4b4a8f4af7e71da0df25a85b7c" + sha256 arm64_sonoma: "deeffd24ff65163be3517d0aefd874e7188e38fd32676350cab0bf63f0fda980" + sha256 arm64_ventura: "30ccac5a2d9a95a3fdea53f665ae9c1e22112d1fd4414f3dc831764e729ac1c4" + sha256 sonoma: "cdafb6f30983bd1ac6290f2eb38a8b850e2219e47b9ebf7b51eb8656e49c23b0" + sha256 ventura: "a6d7f49b060d760b96a7de7bd3742a80b6fb66c0a04705e97191657611c58b62" + sha256 arm64_linux: "8b8092a66706010bbfe1b6f20cdfe56135bdf8d8fd7e2fdab253a5a7baf62943" + sha256 x86_64_linux: "337e469971505d70d1aebd084b7ff273f69397d0c4efc57f2850d0f499cba161" + end + + depends_on "pkgconf" => :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..379aed1c674bf --- /dev/null +++ b/Formula/p/pdsh.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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/peco.rb b/Formula/p/peco.rb new file mode 100644 index 0000000000000..8a408bf8868e8 --- /dev/null +++ b/Formula/p/peco.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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..25cc1b8044dc8 --- /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" + + bottle do + 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, mojave: "a60087175a8f3c5242e9183eeddb433e6bdbe68409cae0a7c61d66da4622b150" + sha256 cellar: :any, high_sierra: "207764b26b253904cf61e9e13eb32e81a51d61d548b7dafd366da5a5394a5f08" + sha256 cellar: :any, sierra: "2d75448f008aa176b624ecb02bc6e3f7492ea8953a99f84fcdacc6b301b39412" + 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..bf429e28d2bd9 --- /dev/null +++ b/Formula/p/peg.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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/pelikan.rb b/Formula/p/pelikan.rb new file mode 100644 index 0000000000000..14c83eb16031b --- /dev/null +++ b/Formula/p/pelikan.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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, mojave: "a313660eb003974995537cef07e391d3051218f7c65f3326c270b68f0855a59f" + sha256 cellar: :any_skip_relocation, high_sierra: "a80ae1b508d4eae75d03fc5ad07477039a50a37419681b2472af4f9dc5f240ea" + sha256 cellar: :any_skip_relocation, sierra: "37a675674b7ef33f07099029042f56c054f09b5d22400010d583fbfa41c0ce50" + sha256 cellar: :any_skip_relocation, el_capitan: "e314ce6288bf76e271bf69ce844e2e846b16cad68ce635faf1e5130c3c6911d0" + 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? + + system "cmake", "-S", ".", "-B", "build", *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/perceptualdiff.rb b/Formula/p/perceptualdiff.rb new file mode 100644 index 0000000000000..583296f7513aa --- /dev/null +++ b/Formula/p/perceptualdiff.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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, x86_64_linux: "2d9a1e10f07e3467e60a855f18c75a07fee4c238d746dc0b91652c147733e9c8" + end + + depends_on "cmake" => :build + depends_on "freeimage" + + def install + system "cmake", "-S", ".", "-B", "build", *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..175f03ecbe5f9 --- /dev/null +++ b/Formula/p/percol.rb @@ -0,0 +1,60 @@ +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 4 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f21f389ba2e22503900f31d63739513f239347fa1a798a24a1d57812c0b0bcd9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f21f389ba2e22503900f31d63739513f239347fa1a798a24a1d57812c0b0bcd9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f21f389ba2e22503900f31d63739513f239347fa1a798a24a1d57812c0b0bcd9" + sha256 cellar: :any_skip_relocation, sonoma: "bb22665ca96a92b9319f8fdb694b809feaf104a1cfa6ea71369e13685af6fe01" + sha256 cellar: :any_skip_relocation, ventura: "bb22665ca96a92b9319f8fdb694b809feaf104a1cfa6ea71369e13685af6fe01" + sha256 cellar: :any_skip_relocation, arm64_linux: "bbbfae25a44da386c2c12756a0a6300adebdebf7b3e56793d32a916a0d856428" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f21f389ba2e22503900f31d63739513f239347fa1a798a24a1d57812c0b0bcd9" + end + + depends_on "python@3.13" + + 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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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..3ff9b7d9e477c --- /dev/null +++ b/Formula/p/percona-server.rb @@ -0,0 +1,282 @@ +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.3-3/source/tarball/percona-server-8.4.3-3.tar.gz" + sha256 "dfb5b46fccd8284ad3a09054f9a62d0a6423a2b703b6fb86d186cec09cee660a" + license "BSD-3-Clause" + revision 3 + + 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 + + bottle do + sha256 arm64_sequoia: "667692148bc552e299c087fe201d5b3c2433853d83d319f788e12c890d920563" + sha256 arm64_sonoma: "aef3e0bec890a7011a100df94c56d672f0b05c408f45691c3cb65615c67e1937" + sha256 arm64_ventura: "7737f1363d22039a2128e182d972582b70d7c7f9857b6b9ae499a41a8b211291" + sha256 sonoma: "5834d901d5a515e4c87d7ca1202039e59d5ce4a305cef02975b32d2ab04d7104" + sha256 ventura: "bdafc8bba5adc53febfa71285d0afd280c5dc2d5d4cea6b02010d201bcca5edf" + sha256 arm64_linux: "051f0ebc2f4ec908ea0303b61153be100ab92e68767951368eeea48f978a13eb" + sha256 x86_64_linux: "ba6a6a6afb166a0de797496fd1cea7ff7114b5a6b594b06f61bb2ac5ff8c79ef" + 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@29" + 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/Darwin.cmake + fails_with :clang do + build 999 + cause "Requires Apple Clang 10.0 or newer" + end + + # 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 + + # Backport fix for CMake 4.0 + patch do + url "https://github.com/Percona-Lab/coredumper/commit/715fa9da1d7958e39d69e9b959c7a23fec8650ab.patch?full_index=1" + sha256 "632a6aff4091d9cbe010ed600eeb548ae7762ac7e822113f9c93e3fef9aafb4f" + directory "extra/coredumper" + 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] + (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? + + 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", "status", *test_args + 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 + + # 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 + 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 -u root + 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 + + 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..b8701d7cf5bb0 --- /dev/null +++ b/Formula/p/percona-server@8.0.rb @@ -0,0 +1,266 @@ +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.40-31/source/tarball/percona-server-8.0.40-31.tar.gz" + sha256 "1318670d8e176c24df74019f748f5f233e2787f865dd3d41d61790ab5a772c4e" + license "BSD-3-Clause" + revision 3 + + 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 + + bottle do + sha256 arm64_sequoia: "32768a4fd0fe75e7a288731d9a3a1789548cbc6091f95a55cd068ea589340e27" + sha256 arm64_sonoma: "d209d4ad284ebc053169ab6f615ef487eaeedb76b17b8a71d77e8821dfe3bf75" + sha256 arm64_ventura: "0c920c59d823d73888e88abc3102626ab4574422f71a391428d2e18b198d5008" + sha256 sonoma: "450c309327f0a71240e8b6c54bd561749a930d662343e002ddde4eadc982154d" + sha256 ventura: "d289a66cdfd3de7ed9f87d98dda41ebeba1dc18ac8223604b92e122ccd37d8e0" + sha256 arm64_linux: "558a1988053cb70145a837ca6b62fe99396a02f4191a2801c7c5ddde6da00bb4" + sha256 x86_64_linux: "5614bdeb9028553c82137264547db91e208c016ad98c2796eb703c8f66959848" + 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@29" + 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/8.0/cmake/os/Darwin.cmake + fails_with :clang do + build 999 + cause "Requires Apple Clang 10.0 or newer" + 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 + + # 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 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/030f7433e89376ffcff836bb68b3903ab90f9cdc/mysql/boost-check.patch" + sha256 "af27e4b82c84f958f91404a9661e999ccd1742f57853978d8baec2f993b51153" + 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 + + # Backport fix for CMake 4.0 + patch do + url "https://github.com/Percona-Lab/coredumper/commit/715fa9da1d7958e39d69e9b959c7a23fec8650ab.patch?full_index=1" + sha256 "632a6aff4091d9cbe010ed600eeb548ae7762ac7e822113f9c93e3fef9aafb4f" + directory "extra/coredumper" + end + + 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[coredumper duktape libkmip lz4 opensslpp rapidjson robin-hood-hashing unordered_dense] + (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", "status", *test_args + 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 + + # 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 + 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 -u root + 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 + + 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 diff --git a/Formula/p/percona-toolkit.rb b/Formula/p/percona-toolkit.rb new file mode 100644 index 0000000000000..cfc13063d6667 --- /dev/null +++ b/Formula/p/percona-toolkit.rb @@ -0,0 +1,64 @@ +class PerconaToolkit < Formula + desc "Command-line tools for MySQL, MariaDB and system tasks" + homepage "https://www.percona.com/software/percona-toolkit/" + url "https://www.percona.com/downloads/percona-toolkit/3.7.0/source/tarball/percona-toolkit-3.7.0.tar.gz" + sha256 "e79f53c3227ac31c858fad061d8a000162cb5ecf8b446b90b574adde9e9ab455" + license any_of: ["GPL-2.0-only", "Artistic-1.0-Perl"] + head "lp:percona-toolkit", using: :bzr + + 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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a37d5376a12782664896830ae588d515b1bbde0d4452156c9319e6b391a453ea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a37d5376a12782664896830ae588d515b1bbde0d4452156c9319e6b391a453ea" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5986cbc073b8a2f0cf7b6b53b1a2a7e1029e2f498d0471dd46189067884f8f1a" + sha256 cellar: :any_skip_relocation, sonoma: "f3cbec25f4fa8beb974b310c074a90e6ef1eb58bcef0c1274f59217931983a93" + sha256 cellar: :any_skip_relocation, ventura: "51e79707676df290463b16f92541773bd254a0b1014dac67b4c238db6cbfb6e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "40e8a0ed87eaa24b89d1b6c7c47bd3298281b8fa1ea653bd80761112cbf165d1" + 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..67a7dda9e48ae --- /dev/null +++ b/Formula/p/percona-xtrabackup.rb @@ -0,0 +1,199 @@ +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-2/source/tarball/percona-xtrabackup-8.4.0-2.tar.gz" + sha256 "0777e3d3c3b4d4649ed23ed7197ec0aa71379b4a4a41b969b7286f6cf8888b4a" + license "GPL-2.0-only" + revision 1 + + 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_sequoia: "8cc6f81a5301e2b99e83c06e51ffc55fc0ab22d77bf566f2830ee42623d8da00" + sha256 arm64_sonoma: "2bf722f0ef5bc1f125e5cc04180a4c3ffad36af5a627564328610853184ea20e" + sha256 arm64_ventura: "a736c555bcfc109e19c1ffcd8f24af0b14b251e5a8895eb09098cee6b4263f30" + sha256 sonoma: "1a7adbbc1ab31a5729855d9f955af58afbf81785314d51fb87492d90cc4416df" + sha256 ventura: "e28fb7ac2afbad20555eab2b174d40b0367611421d033fd2bb7a9bbf1be2f05f" + sha256 arm64_linux: "ac6bcb3444927d7acf41510cfb78abfeddd2bb12558f4bc36d6e69e15cbe30ff" + sha256 x86_64_linux: "b360d2f4ca281109afbc8cb699f1958344fd12aac19df355bb69207a69744610" + 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 "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 + + # 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 + + # 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 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) } + + 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_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" + 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.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_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 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-xtrabackup@8.0.rb b/Formula/p/percona-xtrabackup@8.0.rb new file mode 100644 index 0000000000000..b214bd67625e7 --- /dev/null +++ b/Formula/p/percona-xtrabackup@8.0.rb @@ -0,0 +1,216 @@ +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-32/source/tarball/percona-xtrabackup-8.0.35-32.tar.gz" + sha256 "04982a36e36d0e9dfb8487afa77329dd0d2d38da163a205f0179635ceea1aff1" + license "GPL-2.0-only" + revision 1 + + 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_sequoia: "aaf08ac38f73f8a1ecb870e2c9945b00c2e637ea2e4a26fe0fba465e614ddac6" + sha256 arm64_sonoma: "296d2c759f2236e179682dd36cdc0cecb45a4a4b198a3e0d0d4a6277226676a5" + sha256 arm64_ventura: "a0da8e7bd3c6266a70efaeec915b2b8abbc76b3203a0cccac0672ab1b6301614" + sha256 sonoma: "8272e48e426dc7afde133864602e13646a97d92900d60a0b09cc78e34ae764ca" + sha256 ventura: "c5d995c22fc7f0e1858721a26d69eef69b0e3e2408c61c3b60595c329d76e7c9" + sha256 arm64_linux: "2eb8a6b98004ab5876e4ad9159bda41021819750bd7f47b89077e00098504d55" + sha256 x86_64_linux: "e6d1817ee7da075c9511e16798160c030d3f96d04bafd5c2ab8b1a143008b7bb" + 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 --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 + 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 + + # 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 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 a/Formula/p/periphery.rb b/Formula/p/periphery.rb new file mode 100644 index 0000000000000..a15708a88ac79 --- /dev/null +++ b/Formula/p/periphery.rb @@ -0,0 +1,47 @@ +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.1.0.tar.gz" + sha256 "14ff391e6438301e0640da82160dd55da981b773967ce3930a2366a301142fd1" + license "MIT" + head "https://github.com/peripheryapp/periphery.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "90ad3d39f0c214a787731e6efde1dc501ae5afe9fc552495261b02e93fe0ff1f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e41cb8cb73325e37d7db58465aa8a55f243766037b520ffdb7cec208a48a101" + sha256 cellar: :any_skip_relocation, sonoma: "c03608455e65262df0c604ddd83cdc93524df9a4005fe6eb0c80172685e1367a" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed618fe7a6c9d2fe5ecd0d9916d93c11da6fad57382b9207a3c298442d333db2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c976edd4df2f4218896580dc677e3547f1bad2b12e992e42af3297a23960b0ec" + 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" + 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..f770a70a7d195 --- /dev/null +++ b/Formula/p/periscope.rb @@ -0,0 +1,60 @@ +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.0", + revision: "3d398cb7c9d8e41690c54371861d1b0a0119c485" + license "GPL-3.0-only" + head "https://github.com/anishathalye/periscope.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9640cda5271196d7ae0b4ec8fd4aac56378bf70a89529dcae21995c9bb53ab36" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b2c4e1a39fe80211258e6269f9ad212d261519b223e89f1f0f93f84c64f18d00" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d3a14af2b8bbc5def8dc556de099ddb30f2c4f129743ddfde14226af0f2397a" + sha256 cellar: :any_skip_relocation, sonoma: "9a2d6787de19316613a10a7c2e1cc921047575b031ac6363e2dadf9425e91ca5" + sha256 cellar: :any_skip_relocation, ventura: "2eef76919c4d079f13b3f67dc36c45e24b64daced55875b33d3537fdaee34c9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "37af0b84717118647d205579a7afda747ba18dd3be41d9506c9c046e5d00799f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "730c36044c98b82acf32c59bb4137e3b572970e0b8bd0d05198f8bd24d79ac83" + 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..f645540db23da --- /dev/null +++ b/Formula/p/perl-build.rb @@ -0,0 +1,136 @@ +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" + + bottle do + rebuild 1 + 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..1c4e168434069 --- /dev/null +++ b/Formula/p/perl-dbd-mysql.rb @@ -0,0 +1,119 @@ +# 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.012.tar.gz" + sha256 "f54ad1bb7ae167e26cd557b5e1b87f7fa49c1dd126f3523eaace6e5c19dbaf46" + 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_sequoia: "a818c34194b7033c3468ec5d901cdbf66afe40d5a4efccb7d634eecd773b0677" + sha256 cellar: :any, arm64_sonoma: "377d85c6b652c4e94befb922f6cbe3a4736306b1e8c5846a6bf8e4d6cfa6d7b6" + sha256 cellar: :any, arm64_ventura: "51d1372055361e144df670899db7e349a6b044050ac6857ab7c02930865f3647" + sha256 cellar: :any, sonoma: "6107ea139da53c0a82292c9df4f44b499715893afefd7fb9eab6479b87c2d3f8" + sha256 cellar: :any, ventura: "53036da34b010da8aae2779c40af2ab50f74af7a4e4efeb49c3600d754d47ca8" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b2557186487224db79a8dc207eed88e1f6d309f585d7056c8b40770442daa20" + sha256 cellar: :any_skip_relocation, x86_64_linux: "639203685dc517e9960efaa4a3bfe8004456627ba79f2328d6034c48cc1e0710" + 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..bfbedb2789334 --- /dev/null +++ b/Formula/p/perl-xml-parser.rb @@ -0,0 +1,43 @@ +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" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6652df7d2ee4241d47bd7696f6b6b063ce31cfca2d922f5be08adb4364df9952" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4219900b1c2f9105cefb7e34c0d2d8ef42dee9696881a46646a58a4ed83f339d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6d8331557430f37f003b838ab9dce30073e0876bddacaa1dbc07aed0ab2c3e2d" + sha256 cellar: :any_skip_relocation, sonoma: "636cdbf8bf30e94da13d51d4785cf3c4bd578338cc5f84c2b219a26b788886f4" + sha256 cellar: :any_skip_relocation, ventura: "9876b8022ee76c8f4b100bc392c04c7fc65975b2a2b08cd24edb7057fe6d1419" + sha256 cellar: :any_skip_relocation, arm64_linux: "428b10afda30e79f0fd6a06f9eadbfe784c00ab92a2add9c25f4ff8ab1eb4cef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b353076b4fc4b713b7ae09fd42468ff3f77bed5ac08106c7558d4dd3347316e" + 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", "PERL5LIB=#{ENV["PERL5LIB"]}" + system "make", "install" + + man.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..67a1ac414e280 --- /dev/null +++ b/Formula/p/perl.rb @@ -0,0 +1,88 @@ +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_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..cdb637631315a --- /dev/null +++ b/Formula/p/perltidy.rb @@ -0,0 +1,63 @@ +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/20250311/Perl-Tidy-20250311.tar.gz" + sha256 "7fc6ceda4e3c9fc79c777afbcf8d167ecc35b16ff81c9cbeaf727b15d0502d8a" + 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_sequoia: "502111e4bf98e0a250df10e6484e19659445c33caaed5405363b4c024a8844ab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "502111e4bf98e0a250df10e6484e19659445c33caaed5405363b4c024a8844ab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "21b06e9daad00a6bebddda0650227633c82aa5e3bcb7b0f7111915b8d0733bde" + sha256 cellar: :any_skip_relocation, sonoma: "8f327e270db665ac52f0227cc4d71f6af5dda2964725956ee22e7f0e5cc37838" + sha256 cellar: :any_skip_relocation, ventura: "088a45ef5f7a47039f72b1dfeb94ad23f446807bbaa593c31e4eacf6baad4cb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b7b2bd46e00f58ab89441f3848db04ff3bdf2363d7ad7d32625bd2f4720a872" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68a48bbaa91035f33ccb1cdc50935d79f812e598c456c472ff0ff7b9365a0e41" + 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/peru.rb b/Formula/p/peru.rb new file mode 100644 index 0000000000000..cf30d0952681e --- /dev/null +++ b/Formula/p/peru.rb @@ -0,0 +1,49 @@ +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/a8/45/cec03aca5ab8a8a1ff8248dcd5c9f17e5a7e9c9e8e9d0b9a135a1c0605e7/peru-1.3.3.tar.gz" + sha256 "ac6b0d0e85fbe7d57d4587b4e58551de83fd4af4f8245a0851414898cce3e1b1" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fd7035d7b44788659c3c228fdbca57d6f918799469ca542046e70b64465e3855" + sha256 cellar: :any, arm64_sonoma: "124352399f26fd9fdc5a396a33f6f624ef613eb7a5eb07b50aac7262ac12a0c3" + sha256 cellar: :any, arm64_ventura: "ad488293d43ee05ac8eccf9e5278e7613b26a8ac960b1385d128fa78e1465f15" + sha256 cellar: :any, sonoma: "e575c707cc3431e180e541d516812c8f4303adfd3e786198da14f4af7c27ddc5" + sha256 cellar: :any, ventura: "45a48b49b8eef723df7537615fb968eb984c1c6e6a4a44634177c3ce35b367d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "7e5028dc6124874490ec40f9f0ff0a588e6dce432432ebf5d8832b2c178dd00b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73ab93c07fc0d53f07452e107fa9352fc3a269a608f0284a4baa41369c9e6257" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + def install + # Fix plugins (executed like an executable) looking for Python outside the virtualenv + Dir["peru/resources/plugins/**/*.py"].each do |f| + inreplace f, "#! /usr/bin/env python3", "#!#{libexec}/bin/python3.13" + end + + virtualenv_install_with_resources + 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..56c1cbc139b77 --- /dev/null +++ b/Formula/p/petsc-complex.rb @@ -0,0 +1,79 @@ +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.23.2.tar.gz" + sha256 "030ec6c4e9ed885457a6155f20b6f914593a1cd960b28706521a19a9cdadd5e2" + license "BSD-2-Clause" + + livecheck do + formula "petsc" + end + + bottle do + sha256 arm64_sequoia: "a270b9d18b5a43f2634ad7f54b52f77e94a4fa6f8e508d007ec4005ff4ed37be" + sha256 arm64_sonoma: "a5aa4fa9f8aadfd3aca5d07e71f354adf20584999fc6e73ae8132561964d712f" + sha256 arm64_ventura: "6681b2335e439eb559c3d2e8ab36aa6e1c6c45c3d0e158e5527e6df76798fefd" + sha256 sonoma: "2dddcf28ca47cc094ea334791a5553feec054490d61b0afbc450ef9f01745f53" + sha256 ventura: "1bd27a81d27a325abc1b591bacad34f8d49ce565f42fe825b9696dc066b182e0" + sha256 arm64_linux: "e55c7ec714461d45d135da91d7ea4b6fd2905ba220ad4b12dca6bff45cb640cd" + sha256 x86_64_linux: "d866af1bda598550a5c096b6ab1c1b6b702ed4b2a13fc35debbd894b4d3d4ee3" + 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..a6f206c5d5e62 --- /dev/null +++ b/Formula/p/petsc.rb @@ -0,0 +1,89 @@ +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.23.2.tar.gz" + sha256 "030ec6c4e9ed885457a6155f20b6f914593a1cd960b28706521a19a9cdadd5e2" + 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_sequoia: "30f809bb0a45ea8c480fd142bdb792126bf30840a09168a2beb027e5740865e4" + sha256 arm64_sonoma: "5c30a449eaac70cb7ce18cdd5bb3084a2332519ea7a83a7f3dd1265b203cd18c" + sha256 arm64_ventura: "5c9d667058c338be9d5a16a534d5755e78a7ada3e07473cee0573e373aa1eb14" + sha256 sonoma: "9b2b984b308c2db93b72a20dccf338045209b1c6370fda60cf918db60b5dd1e8" + sha256 ventura: "9e3bbc2b27248c5a3cc0ccf661165471a5fd7a25de5f9c059a73e21a44cee79b" + sha256 arm64_linux: "4096ce20d5653589e1b69b1519d4475b889cfdcb6b653b3b701a4e1b1d22cefb" + sha256 x86_64_linux: "310208cedc18ec2c344faf805aab8c60c89ebd709f268ceb4fc39cc070d96d19" + 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..e58c0ff1098f4 --- /dev/null +++ b/Formula/p/pex.rb @@ -0,0 +1,30 @@ +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 + + 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..8adabf9c6a45c --- /dev/null +++ b/Formula/p/pferd.rb @@ -0,0 +1,155 @@ +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/1a/4d/26c20017b81c5b791edd63403ae00a6ea10d01f4c420415861e4da671d12/pferd-3.8.2.tar.gz" + sha256 "6defe3f73153f352869b5b5790f9a0e56614e17d1379f5e26d683318e0426e91" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e507fe202f645025301ddfd34ebad47536568b51876b1de1ca0a369764548c5b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d3a39872ad61cb23b9054d0ad9e2ae66ace63130fe141ae26ca98ec580aec99" + sha256 cellar: :any_skip_relocation, arm64_ventura: "66f2d66cacd7875e0b7c4aba3dabc4c10e5d79c75913fb74681b57a1218f22f3" + sha256 cellar: :any_skip_relocation, sonoma: "b1f539247d5799d290988e79a141f7bea2c65ae524931e703007e21e0f8d1eed" + sha256 cellar: :any_skip_relocation, ventura: "f9eb39c4ee15b2b2303a960b72a601cfa421c6f120137182952e2c400d4633a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "44dcdd8f47adf976640bc29bff080d3f1c0e44f281a7e8f8ce64620adc1b1606" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f78c4d8737becda6102385b6b89f92347a4872b9e2d54b827432d445e70af627" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + 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/63/e7/fa1a8c00e2c54b05dc8cb5d1439f627f7c267874e3f7bb047146116020f9/aiohttp-3.11.18.tar.gz" + sha256 "ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/d8/e4/0c4c39e18fd76d6a628d4dd8da40543d136ce2d1752bd6eeeab0791f4d6b/beautifulsoup4-4.13.4.tar.gz" + sha256 "dbb3c4e1ceae6aefebdaf2423247260cd062430a410e38c66f2baa50a8437195" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/ee/f4/d744cba2da59b5c1d88823cf9e8a6c74e4659e2b27604ed973be2a0bf5ab/frozenlist-1.6.0.tar.gz" + sha256 "b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + 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 "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 "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/ce/a0/834b0cebabbfc7e311f30b46c8188790a37f89fc8d756660346fe5abfd09/more_itertools-10.7.0.tar.gz" + sha256 "9fddd5403be01a94b204faadcff459ec3568cf110265d3c54323e1e866ad29d3" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz" + sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/3f/f4/4a80cd6ef364b2e8b65b15816a843c0980f7a5a2b4dc701fc574952aa19f/soupsieve-2.7.tar.gz" + sha256 "ad282f9b6926286d2ead4750552c8a6142bc4c783fd66b0293547c8fe6ae126a" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/62/51/c0edba5219027f6eab262e139f73e2417b0f4efffa23bf562f6e18f76ca5/yarl-1.20.0.tar.gz" + sha256 "686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307" + 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..9eef0f67f7eae --- /dev/null +++ b/Formula/p/pfetch-rs.rb @@ -0,0 +1,28 @@ +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_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..ab462b63cb77d --- /dev/null +++ b/Formula/p/pfetch.rb @@ -0,0 +1,42 @@ +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, mojave: "f93914feee7f4e3cda77341c3bddf2cf51eb4b2aed01f6ace771db75078da570" + sha256 cellar: :any_skip_relocation, high_sierra: "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_cron.rb b/Formula/p/pg_cron.rb new file mode 100644 index 0000000000000..c596517925657 --- /dev/null +++ b/Formula/p/pg_cron.rb @@ -0,0 +1,70 @@ +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.5.tar.gz" + sha256 "0118080f995fec67e25e58d44c66953e7b2bf5a47bb0602fd2ad147ea646d808" + license "PostgreSQL" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e652baea4a5497dccbe7a785953c08f43e820712efee0c47b7ea4299645888dd" + sha256 cellar: :any, arm64_sonoma: "5d5ef653d695a0e1029f119532988583d01b18b1bcd0996d7c79f344912bf870" + sha256 cellar: :any, arm64_ventura: "8617379afc5a21586ac1558c3320d82aaddb8078382fe51e7eb034c2d1772cfa" + sha256 cellar: :any, sonoma: "5160bb9284524342df8e0c8140d5715b420c26cf3ff874a9d6462530313c6adf" + sha256 cellar: :any, ventura: "44132449e3e3733f9d7342a5e12c23d571402bea3bb7074a23b197b605fca091" + sha256 cellar: :any_skip_relocation, arm64_linux: "8babbb9f6137aded2381013aadc7f8a238163910e7c8a6b32d12cd689ef36d82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45b413c1332572e44d2e73a04f0d90a932bb34ad1ac7aee78541f9176ecf7b65" + end + + depends_on "postgresql@14" => [:build, :test] + depends_on "postgresql@17" => [: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 + # 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)}", + "pkglibdir=#{lib/postgresql.name}", + "datadir=#{share/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_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..b6384cf1c9d97 --- /dev/null +++ b/Formula/p/pg_partman.rb @@ -0,0 +1,60 @@ +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.2.4.tar.gz" + sha256 "462464d83389ef20256b982960646a1572341c0beb09eeff32b4a69f04e31b76" + license "PostgreSQL" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bc8d0101a41b8462c808e3b89ced8cf4c35abd2859da258810f45c7cc3d08eab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fbb25523f90c489a1d3e960c72a5e25e2015203f076b422979105d4237548fa7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "da418435f548516e2c08d7152618cba4944c05ea97e7a6caf885d392367d6b1f" + sha256 cellar: :any_skip_relocation, sonoma: "4ff364c6122dd2f76874efa3993473d44c1875a9af05f87ac2b6162e0d3c3081" + sha256 cellar: :any_skip_relocation, ventura: "d354534be1f5892af69af5ad223d00864f39f49a1a05a161a45c32440f51bb87" + sha256 cellar: :any_skip_relocation, arm64_linux: "514b8f6796d0853c9dee95b01cae31d554351c999f1ebbc989553d0572fe833a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "35d4cb1858223e0a1b0badd91bc8d83393da2fcd30d9609bef6285d8fe5fef3c" + end + + depends_on "postgresql@14" => [:build, :test] + depends_on "postgresql@17" => [:build, :test] + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + 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..1c937b539ce93 --- /dev/null +++ b/Formula/p/pg_top.rb @@ -0,0 +1,58 @@ +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 + + bottle do + 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..773b61ee1cb95 --- /dev/null +++ b/Formula/p/pgbackrest.rb @@ -0,0 +1,45 @@ +class Pgbackrest < Formula + desc "Reliable PostgreSQL Backup & Restore" + homepage "https://pgbackrest.org/" + url "https://github.com/pgbackrest/pgbackrest/archive/refs/tags/release/2.55.1.tar.gz" + sha256 "5f050ad751feb5b506cf3c58a5cf1674a7b502328abcb50b37756175f80990e9" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "14f05c57dcf96a4e1096fe8b9b924d1439cd21ccb4737d334232235b091ed3da" + sha256 cellar: :any, arm64_sonoma: "116313dd70a612c5cfdb47033069bd3912a32f8cfb5fee45d1ddc3e277cd1fd1" + sha256 cellar: :any, arm64_ventura: "5fae48146afd2f5db6e36083779a9a8bdca40630513d5515f5ad0be14469dddc" + sha256 cellar: :any, sonoma: "4c2a1572e6c95fb8050f7719d756b8836f0f63be8d90e02226214d8f0544d3b9" + sha256 cellar: :any, ventura: "48c571b082a3c402fa3e220494dba9c65aef820c1cc018828a227e3d76b1e0a0" + sha256 arm64_linux: "9ccbef3723ec786682bf644f6e7eaf6f4f9b466816721e8647a23fe74247e580" + sha256 x86_64_linux: "36fc1f723b68db34d8c9a0acf8bffb632bd12d1eb5453532a10c7e6989ada54e" + 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..400b640167a37 --- /dev/null +++ b/Formula/p/pgbadger.rb @@ -0,0 +1,61 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d3e83fad1caf40cefd5ac3dd5d536286e5d1de2ba73cacb5c91de04ff359088f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d3e83fad1caf40cefd5ac3dd5d536286e5d1de2ba73cacb5c91de04ff359088f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aaffda73eea02684a47c7e8fbba2d1ba4787be1cea304204a938408fa3ea9022" + sha256 cellar: :any_skip_relocation, sonoma: "93fe9851cb986a58f8db18251ec636ab6e09d317f0813bbc7600b65f5989d284" + sha256 cellar: :any_skip_relocation, ventura: "5fd44b906bbbbfa63e11b886b1514b97f2913d73a026d132f4cf84cbe4811657" + sha256 cellar: :any_skip_relocation, arm64_linux: "24267f87df6ab44c1a9abd0b000338804af5514d865d7a82c1101bb9a9ae96d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24267f87df6ab44c1a9abd0b000338804af5514d865d7a82c1101bb9a9ae96d3" + 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..9c18631fb3e0b --- /dev/null +++ b/Formula/p/pgbouncer.rb @@ -0,0 +1,74 @@ +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_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..949ccdbe916e6 --- /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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c94fe9b94951859f7ae906c57baba733adf00dc5f1fcfff6323ad0342bb517a0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d7242c372c8216ae21576bcc4a446bbe3b41fbcbc5e2e20e3b7b82474541e416" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aa6197e523dfa68d26564db1da6fc4d8db2185c4891cec5bd2f7f0a6d1e54b4b" + sha256 cellar: :any_skip_relocation, sonoma: "0d5a3cbee22958f4352243b85b8b762c55404c26d8de4474656f9a2da5814a21" + sha256 cellar: :any_skip_relocation, ventura: "393f05d8cf7191679029acba7ded5c126ef90e064cb9b8d3ed781693790fe766" + sha256 cellar: :any_skip_relocation, arm64_linux: "e15814871dc8fc3a7e6ddd94a4ee0a79b8aed7b11aef6302eb59252a2ce80681" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa8fb9bf4416e8568cfbd768480ef55024d770204790d947732bed7ba606cac0" + end + + depends_on "libpq" + depends_on "python@3.13" + + resource "cli-helpers" do + url "https://files.pythonhosted.org/packages/f9/7c/3344a9b856b9582df36c7a525f5710294f349499d16dcbf343453f70bdb8/cli_helpers-2.4.0.tar.gz" + sha256 "55903b705a212a473731db20fa26f58655e354078b99cb13c99ec06940287a4d" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/b6/bd/21d05caf4c66b87abb4f1a7340ac2596f10087e9f60b95c84369febcf377/pgspecial-2.1.3.tar.gz" + sha256 "6d4d2316aff7d47954db99d4c391d6c0bb26568ebcb9d151f65dab7938b6cbe2" + end + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/e1/bd15cb8ffdcfeeb2bdc215de3c3cffca11408d829e4b8416dcfe71ba8854/prompt_toolkit-3.0.50.tar.gz" + sha256 "544748f3860a2623ca5cd6d2795e7a14f3d0e1c3c9728359013f79877fc89bab" + end + + resource "psycopg" do + url "https://files.pythonhosted.org/packages/67/97/eea08f74f1c6dd2a02ee81b4ebfe5b558beb468ebbd11031adbf58d31be0/psycopg-3.2.6.tar.gz" + sha256 "16fa094efa2698f260f2af74f3710f781e4a6f226efe9d1fd0c37f384639ed8a" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "setproctitle" do + url "https://files.pythonhosted.org/packages/c4/4d/6a840c8d2baa07b57329490e7094f90aac177a1d5226bc919046f1106860/setproctitle-1.3.5.tar.gz" + sha256 "1e6eaeaf8a734d428a95d8c104643b39af7d247d604f40a7bebcf3960a853c5e" + 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/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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", shells: [:fish, :zsh], 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..b4275e15b780f --- /dev/null +++ b/Formula/p/pgcopydb.rb @@ -0,0 +1,48 @@ +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" + + bottle do + rebuild 1 + 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..152d881b0fb6c --- /dev/null +++ b/Formula/p/pgdbf.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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, mojave: "4a76ca05c6b73ea6fcf57d6699cbaf3e249c5e3b20990e51ab33d11bfbdd7d50" + sha256 cellar: :any_skip_relocation, high_sierra: "caf544eee09339bb34ab68a35880bc863bb13aa7943de98ef25680cb0182f901" + sha256 cellar: :any_skip_relocation, sierra: "7d0eabf3051e9cf450d985987f89cf0d70476b37202b3b5bdc84ec48e8cb670d" + sha256 cellar: :any_skip_relocation, el_capitan: "72ad6b801d25db2008d0ab4badd2bb280f55eb6f6956925ee5620d62d8f06bbb" + 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..6e3fa3b5b32bc --- /dev/null +++ b/Formula/p/pget.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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, 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/master/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..db9375127abb0 --- /dev/null +++ b/Formula/p/pgformatter.rb @@ -0,0 +1,39 @@ +class Pgformatter < Formula + desc "PostgreSQL syntax beautifier" + homepage "https://sqlformat.darold.net/" + url "https://github.com/darold/pgFormatter/archive/refs/tags/v5.6.tar.gz" + sha256 "21a7f958cd3fe5d9c7851a882948278440bc9fd609e1a79ed5b8cf613d267fab" + license "PostgreSQL" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a96e7ddda61fab03d6dd3ecac2ebf62a0342d1d53b66b24101e012241e4dfe31" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a96e7ddda61fab03d6dd3ecac2ebf62a0342d1d53b66b24101e012241e4dfe31" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eb7e8053fc84262c6514411081df0468ba5d3b487133bfe6584ee3c0421cbc6e" + sha256 cellar: :any_skip_relocation, sonoma: "490179e8a81e00b47ad1e798df25009fa4b17cd5a0e0bf209a5b05f12933a67f" + sha256 cellar: :any_skip_relocation, ventura: "462fff310c1dabda0ae24884c4bf25c61d8e3d9efe589bdf10581847160234e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a5af8f5f719b5c58be11c02afa9eff6dc15e249b7f22431a5118d7005912e1b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5a5af8f5f719b5c58be11c02afa9eff6dc15e249b7f22431a5118d7005912e1b" + end + + def install + system "perl", "Makefile.PL", "DESTDIR=." + 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" + 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..8ba894e32dfe8 --- /dev/null +++ b/Formula/p/pgloader.rb @@ -0,0 +1,50 @@ +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 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "cb7f5d7b24d71a33f540c1deac860c14ac23a722ea8d090dcee236d323fb91c7" + sha256 cellar: :any, arm64_sonoma: "e9e988b590421ba3ebbf60331db3cb54d713d3629e53905218cdfe677d83190b" + sha256 cellar: :any, arm64_ventura: "66c38d5680137c97900e8bc0345212df6ef9c246688263d27a1612f0c68362a3" + sha256 cellar: :any, arm64_monterey: "368d8f4b75362e444098030d8a7de45e09c495d501037a679670a1349bc366a8" + sha256 cellar: :any, sonoma: "4b2bb7c9ae9bd104768e44181fcb9536928d5d37a20a39b66dd29d3446eecef8" + sha256 cellar: :any, ventura: "8abc681975f40539f48f3444ffee0d6028080ee7dfbff23a69d2d1ad283079cd" + sha256 cellar: :any, monterey: "52cdba8d7bf8f2a836eeba8b6e2eae1521d95a31a0203edb0f5ae9b1a05ae394" + sha256 cellar: :any_skip_relocation, arm64_linux: "cbd685f4531bdf498e069785d26e5944ee7f25a505c9e6f3e5a9a41d2a6d2dbe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3066fd9fdb9548c8e1d3f6bb445017b0da557e00247d72bb8c2cafc4aed41d3" + end + + depends_on "buildapp" => :build + + depends_on "freetds" + depends_on "libpq" + depends_on "openssl@3" + depends_on "sbcl" + depends_on "zstd" + + def install + system "make" + bin.install "bin/pgloader" + end + + test do + # Fails in Linux CI with "Can't find sbcl.core" + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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..adb142f8dbc4d --- /dev/null +++ b/Formula/p/pgpdump.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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..c6f1af6b08a95 --- /dev/null +++ b/Formula/p/pgpool-ii.rb @@ -0,0 +1,66 @@ +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.1.tar.gz" + sha256 "0f8805d93bc40002c8019dc40ae03a71a3d144bd39f3dffe6fa01f7fc19bb8e8" + 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_sequoia: "0d774d83f673c97c10c8dda0010d2601c30c0503ba1703b04402228fa72f6106" + sha256 arm64_sonoma: "ddb5ea019862cda6838e1f7a1f43523bd93b6c124dfc0a3ef9639e25413e5af3" + sha256 arm64_ventura: "e6b55691e0012dc832cb7da2401535d26a9f3cc95f41dc0998472520c2350394" + sha256 sonoma: "e5fbe3277a008d083b74c1c70c91d095ec1b5e2199ef38593025816d88b16fc7" + sha256 ventura: "059fc165f6b150ebe0c1d56f00d0f8398830695523656830babe2ff695155ce6" + sha256 arm64_linux: "883ec20e6862835cc6927698a579750596dfea4f3dc70d13bed3d477b58d4a59" + sha256 x86_64_linux: "7e4b2f7427759194ccaa25ea2c91eb38f10893694a9d7a932765e98bad1079ea" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..93e50124760ac --- /dev/null +++ b/Formula/p/pgrok.rb @@ -0,0 +1,42 @@ +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.5.tar.gz" + sha256 "b43c145970d8a3f02aa7f1e96d5607ea57daabd675e0d760bbc837f7113bdc43" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "72caa37de045c38a7f309e615264d7debd46d4aef4db4eecbc1bd27242363366" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "72caa37de045c38a7f309e615264d7debd46d4aef4db4eecbc1bd27242363366" + sha256 cellar: :any_skip_relocation, arm64_ventura: "72caa37de045c38a7f309e615264d7debd46d4aef4db4eecbc1bd27242363366" + sha256 cellar: :any_skip_relocation, sonoma: "20cd73267e742a16928e424e9dcbd4d2df87c454a1b82a89eaa5f7bc4f4651b8" + sha256 cellar: :any_skip_relocation, ventura: "20cd73267e742a16928e424e9dcbd4d2df87c454a1b82a89eaa5f7bc4f4651b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cde6109a399efd862ca12f6c59a5153ce46d40fe1533d1b3e21cc3e4a46e8eb2" + 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..4728ff7079261 --- /dev/null +++ b/Formula/p/pgroonga.rb @@ -0,0 +1,65 @@ +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.1.tar.gz" + sha256 "e2dfe40f3a0342e9ce4f1212043c46564fda3678e8cfda8587bbc37b103ebd17" + 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_sequoia: "aa5b5427b783ffc3883f0c7bed63cfa61523ceb262dc8f12828d556744ad1173" + sha256 cellar: :any, arm64_sonoma: "4099e0f0a91fc915c153d9065418c6bde0735c33918a553b060b9e72b7d91615" + sha256 cellar: :any, arm64_ventura: "566650be1da201e6b58e18550dc401de99f37ea306fbc9594e996b6609a1eba2" + sha256 cellar: :any, sonoma: "bb3eb6dc07a7dde21c8425cc50a384a345a2d3af35e06e8048763701ce89be03" + sha256 cellar: :any, ventura: "ac024d77294e071078565678f948821774d596b97152f8d660c547bfdde11b44" + sha256 cellar: :any_skip_relocation, arm64_linux: "d95b94358412a53dc2f15df1f277953581a1a4d2a3ae526b1553c6ee0fd0d29d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d3a3e602ca372150b2c8b9d3ae993fef0434fd9a86bcea549335c37bd2cd38b" + end + + depends_on "pkgconf" => :build + depends_on "postgresql@14" => [:build, :test] + depends_on "postgresql@17" => [:build, :test] + depends_on "groonga" + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + 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..7deb422cb0373 --- /dev/null +++ b/Formula/p/pgrouting.rb @@ -0,0 +1,84 @@ +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" + 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_sequoia: "2d1298e0d55177fa19efd6cc79c0a54733481ac27126ac3fad54495b614b1f08" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c019e8d253e0a1242e6faf24ef0dfa5c8e413f9ac6e936b2f62a250b488cdf0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ac46316a8e7440784db41c6047fff8603b29d46ee19e89a5b0cb08c53ee31ac9" + sha256 cellar: :any_skip_relocation, sonoma: "6db98cc05d362db522ebda306baaf618c5750a4813e90fb0c14cac5c1b1c55db" + sha256 cellar: :any_skip_relocation, ventura: "1f839ae39b9725eda43fff5fdb29b9aaa8421fe00ff3274512ca025bb7134f6b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ea9fd403a6b1f28bdda54dc537dc60173056cf163f8efb7258f4a69a9f9ffc4" + end + + depends_on "boost" => :build + depends_on "cmake" => :build + depends_on "postgresql@14" => [:build, :test] + depends_on "postgresql@17" => [:build, :test] + depends_on "postgis" + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + 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 + recursive_dependencies + .select { |d| d.name.match?(/^llvm(@\d+)?$/) } + .map { |llvm_dep| llvm_dep.to_formula.opt_lib } + .each { |llvm_lib| ENV.remove "HOMEBREW_LIBRARY_PATHS", llvm_lib } + end + + 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..2edb9a1917d3d --- /dev/null +++ b/Formula/p/pgrx.rb @@ -0,0 +1,39 @@ +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.14.3.tar.gz" + sha256 "af5e0026d9e734d1412f5dcf3be196b6b51f952867b6eb361f49df6d55fccf5f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd02c5e460fd47f8fb36dc2966c0eecf4a4e3e9faf6e713df5c2a067edf61045" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d0a1b58df6c06550e38892f3f25ab51b34b3be375251dde286f61e41d359f12" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4f8bf7e100e277219b0a01eb10ebe9681e566067aebecef165335882184c7017" + sha256 cellar: :any_skip_relocation, sonoma: "de59c11d9ba2a511e83181330416cb1ad54ec0e8aea2d88220846e6059385766" + sha256 cellar: :any_skip_relocation, ventura: "59078b5be62dbe49c6778ce12d87b13c803803848ce250da6d142ee455d784c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "d1320cf98cf58207fde64dd91bfdb6c3db3f882058b19825788a5f77bea3aa2a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a9df726b9148c6593f1e4b3beaf78903a99d41cd999e11f6464d634246b7c25e" + 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/pgsync.rb b/Formula/p/pgsync.rb new file mode 100644 index 0000000000000..06f1afd489561 --- /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.0.tar.gz" + sha256 "385aa0be8683ae4877fc6b39a3a4a0664680ed1631559fadd7b5113d7724ecea" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "d569525a961f1543642f07928fe0ca9317ac819c670a7f6d6735d8752168bac6" + sha256 cellar: :any, arm64_sonoma: "95f8e9b647da0ca010fe39d6f289e64e849b25f212f0e50fb7906e3a88e854fe" + sha256 cellar: :any, arm64_ventura: "c3fe3a0ab9336a9fd3343e1466ba5a137294d2ffbae99110adb2e2c152f1e206" + sha256 cellar: :any, sonoma: "0b1082fa75fb757eea994e9d50be3116d701587c5880430fb20d3a018b875a3d" + sha256 cellar: :any, ventura: "01e1f89f86a1cb51e8c4821a98611c5bad2f18d7145c82e39498d474af9af87c" + sha256 cellar: :any_skip_relocation, arm64_linux: "d7c5c55097831aec49697673333f9806f2a989ae19f1cdaf2b37dad97007a657" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce4b49836360a1abe20cd60228f4e555765a5e41483709706584931abb6dd64d" + end + + depends_on "libpq" + depends_on "ruby" + + resource "parallel" do + url "https://rubygems.org/gems/parallel-1.25.1.gem" + sha256 "12e089b9aa36ea2343f6e93f18cfcebd031798253db8260590d26a7f70b1ab90" + end + + resource "pg" do + url "https://rubygems.org/gems/pg-1.5.6.gem" + sha256 "4bc3ad2438825eea68457373555e3fd4ea1a82027b8a6be98ef57c0d57292b1c" + 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..229354f2b6fca --- /dev/null +++ b/Formula/p/pgtoolkit.rb @@ -0,0 +1,23 @@ +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" + + 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..889f7dddf5b12 --- /dev/null +++ b/Formula/p/pgtune.rb @@ -0,0 +1,32 @@ +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 + + 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..33ff0abca50b1 --- /dev/null +++ b/Formula/p/pgvector.rb @@ -0,0 +1,56 @@ +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.0.tar.gz" + sha256 "867a2c328d4928a5a9d6f052cd3bc78c7d60228a9b914ad32aa3db88e9de27b0" + license "PostgreSQL" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d0ea074a0dd35acc1957c1f2f6d90df297a16d7e47f94368b85e3a309e9540fe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "01a8036c0a03daa290fca07e915e406356fd36cdbd084117e9246d772955b438" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d0edb94eda91ef957b4497c0173c33579f860843d6c105d5668f1ceb86d11a7" + sha256 cellar: :any_skip_relocation, sonoma: "b9e229a72dbc9e7b8e4587389823caa307fc1ee0f2338e45140a49e4ece5c4eb" + sha256 cellar: :any_skip_relocation, ventura: "21e40f77e8afca2fae9303cc45216b53ec79d48ebc3f8d7cd79b2fa8a22aa6ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "0bd92df44356b7200defec0029fc583550a1121a5ceddc0e8a0fab98a42571e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7765039d7b20e78006e2ff2c3b197185a9c80e8b930a384b8e5feeb88eaf3afa" + end + + depends_on "postgresql@14" => [:build, :test] + depends_on "postgresql@17" => [:build, :test] + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + 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..1fdc5f35cd953 --- /dev/null +++ b/Formula/p/pgweb.rb @@ -0,0 +1,44 @@ +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_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, 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..534bc81ffe1f4 --- /dev/null +++ b/Formula/p/pgxnclient.rb @@ -0,0 +1,34 @@ +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 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f1b1f557db76ca77277fc59e96c5432107680f75068454279508736f0ccb4116" + end + + depends_on "python@3.13" + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + def install + venv = virtualenv_install_with_resources + inreplace venv.site_packages/name/"__init__.py", + "/usr/local/libexec/pgxnclient", HOMEBREW_PREFIX/"libexec/#{name}" + end + + test do + assert_match "pgxn", shell_output("#{bin}/pgxnclient mirror") + assert_match version.to_s, shell_output("#{bin}/pgxnclient --version") + assert_match "#{HOMEBREW_PREFIX}/libexec/#{name}", 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..fadf66834e9f1 --- /dev/null +++ b/Formula/p/phodav.rb @@ -0,0 +1,69 @@ +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" + + bottle do + 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..8a43d8211645f --- /dev/null +++ b/Formula/p/phoneinfoga.rb @@ -0,0 +1,44 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7753aee0c8aa77f686eff25f3c74b9f53d620dee4f7be890afc31bddb631c95d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d56737c84d3cbb5cf5e4545e77d5b5f2ddc9c589305b68bc929187381dfa0bff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f08a417535abb3f01a6515580727b1f903ab3da8b4245f9c9cc4653fba8ec124" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d7d428e6d911e94cca96ba259e884d3019e699aa5d7579d84da3770e23f1bccd" + sha256 cellar: :any_skip_relocation, sonoma: "9069391e52de3863ee44302bde11312aff29cdc199e0a3c0db158a149ce5b423" + sha256 cellar: :any_skip_relocation, ventura: "9c8cac2d134f82943c99c898e346093a11f3ab6f318532733b9c72340fec41a4" + sha256 cellar: :any_skip_relocation, monterey: "cca610f2c321e702af581ee8f2dc0e8253428d6882700c4a54a6bd81697a6ebc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f916109ebc6121eed5ebc4c013f3d7bb0b5f132fc6748e6ebc8611969a942d6c" + end + + depends_on "go" => :build + depends_on "yarn" => :build + depends_on "node" + + def install + cd "web/client" do + 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..26884c350e7fe --- /dev/null +++ b/Formula/p/phoon.rb @@ -0,0 +1,48 @@ +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 + + bottle do + 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, mojave: "86ea843f6ba29b5e23023f92b05460d7e105ef08d98dfc2094f579f667a53504" + 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..5be4e8f004c93 --- /dev/null +++ b/Formula/p/phoronix-test-suite.rb @@ -0,0 +1,55 @@ +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" + head "https://github.com/phoronix-test-suite/phoronix-test-suite.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d8beb2d827d15178d10e085be46ed6a5c752dfc26a7a471379700dcac98f152" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8d864f4ef6757c34a9633f69b1096ade2927797be0493d5e9d5969cba375f512" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8d864f4ef6757c34a9633f69b1096ade2927797be0493d5e9d5969cba375f512" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8d864f4ef6757c34a9633f69b1096ade2927797be0493d5e9d5969cba375f512" + sha256 cellar: :any_skip_relocation, sonoma: "f97dee399c72ee996f9deb479a9bcdb016a4cc4329b7f96c99ebe617daa3333b" + sha256 cellar: :any_skip_relocation, ventura: "f97dee399c72ee996f9deb479a9bcdb016a4cc4329b7f96c99ebe617daa3333b" + sha256 cellar: :any_skip_relocation, monterey: "f97dee399c72ee996f9deb479a9bcdb016a4cc4329b7f96c99ebe617daa3333b" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb1ad060dea2cecad6a238116fb42bc49596d85221ac7219e02a2be5799b6100" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8d864f4ef6757c34a9633f69b1096ade2927797be0493d5e9d5969cba375f512" + end + + depends_on "php" + + 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 + + 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..cbdf2c67f17a0 --- /dev/null +++ b/Formula/p/php-code-sniffer.rb @@ -0,0 +1,48 @@ +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/3.13.0/phpcs.phar" + sha256 "6f0a11d596aa6d6dba3d07d7375371adbeffa83a619f85f4bac49a7fd5a0baa2" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "4db99c2fc84c7763ef67075de9861770db967fd4af4dd9b45c5e9128e6ed64f6" + end + + depends_on "php" + + resource "phpcbf.phar" do + url "https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.13.0/phpcbf.phar" + sha256 "8c977a5fa4d4cd013775873962872fab44c2c3fa6599544783f4c2559b3cc0f8" + + 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 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/p/php-cs-fixer.rb b/Formula/p/php-cs-fixer.rb new file mode 100644 index 0000000000000..ec9676c3a8f13 --- /dev/null +++ b/Formula/p/php-cs-fixer.rb @@ -0,0 +1,37 @@ +class PhpCsFixer < Formula + desc "Tool to automatically fix PHP coding standards issues" + homepage "https://cs.symfony.com/" + # Bump to php 8.4 on the next release, if possible. + url "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/v3.75.0/php-cs-fixer.phar" + sha256 "6fcd912a97f48069f06cc6447a9b3694d81d0baf7299b84f66368cd1ee516ee0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e162bedf7bf598c0687c913d0dbd3c9c069ccbc7db8a2dff76d9eb7e01e7eadd" + end + + depends_on "php@8.3" # php 8.4 support milestone, https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/milestone/173 + + def install + libexec.install "php-cs-fixer.phar" + + (bin/"php-cs-fixer").write <<~PHP + #!#{Formula["php@8.3"].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.rb b/Formula/p/php.rb new file mode 100644 index 0000000000000..5b31ff93bfb2b --- /dev/null +++ b/Formula/p/php.rb @@ -0,0 +1,473 @@ +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.7.tar.xz" + mirror "https://fossies.org/linux/www/php-8.4.7.tar.xz" + sha256 "e29f4c23be2816ed005aa3f06bbb8eae0f22cc133863862e893515fc841e65e3" + license "PHP-3.01" + + livecheck do + url "https://www.php.net/downloads" + regex(/href=.*?php[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "1273b93a27dce41ba12ba51d9c2b078cf114b46fed5abe138d68c4eb0206cf92" + sha256 arm64_sonoma: "309eeb21bf084b3219f69843c6db9bc3184b37704069d25eb3cf30ac8f23cc9a" + sha256 arm64_ventura: "be3ba74801eb3eb2c2e1ca076e7502f935ad9819b68cbc4ce950576e0a2ffc81" + sha256 sonoma: "af954145a05d8c3efe5fb809ef0508dbfb6df5502d8e1cb196c17bc0a295742a" + sha256 ventura: "172bb53f19902688da91c29f2e9f7a3a65bf7c902bae6639219f964f89ecea8f" + sha256 arm64_linux: "bc289c45f821fe8f0b1c873f61a0f6740e245596a76f31e53e601d3470a40872" + sha256 x86_64_linux: "263664826438a7252cd55580b6fa7d79b15447929fdeb3d38aaa12b04d26c386" + 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 "gettext" + depends_on "gmp" + depends_on "icu4c@77" + depends_on "krb5" + 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", since: :catalina + 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! "$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 + + # 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-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" + 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" + 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 <<~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 e45b22b7..4624b390 100644 +--- a/build/php.m4 ++++ b/build/php.m4 +@@ -429,7 +429,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]) +@@ -476,7 +476,7 @@ dnl paths are prepended to the beginning of INCLUDES. + dnl + AC_DEFUN([PHP_ADD_INCLUDE], [ + for include_path in m4_normalize(m4_expand([$1])); do +- AS_IF([test "$include_path" != "/usr/include"], [ ++ AS_IF([test "$include_path" != "$PHP_OS_SDKPATH/usr/include"], [ + PHP_EXPAND_PATH([$include_path], [ai_p]) + PHP_RUN_ONCE([INCLUDEPATH], [$ai_p], [m4_ifnblank([$2], + [INCLUDES="-I$ai_p $INCLUDES"], +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.1.rb b/Formula/p/php@8.1.rb new file mode 100644 index 0000000000000..a4c4a2d8e75f9 --- /dev/null +++ b/Formula/p/php@8.1.rb @@ -0,0 +1,489 @@ +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.32.tar.xz" + mirror "https://fossies.org/linux/www/php-8.1.32.tar.xz" + sha256 "c582ac682a280bbc69bc2186c21eb7e3313cc73099be61a6bc1d2cd337cbf383" + license "PHP-3.01" + revision 1 + + livecheck do + url "https://www.php.net/downloads" + regex(/href=.*?php[._-]v?(#{Regexp.escape(version.major_minor)}(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "8741b2bf1ee76c03c8455ccaf40f6fd3939431152754acdb82e129228779e5c0" + sha256 arm64_sonoma: "b7ea998659cd7bb495ae300a703585dac6170e46b211faff7203f193fb18f0d9" + sha256 arm64_ventura: "440f6c45064641e9c9d55bdf9160492933366bf2229e68e1d108bac4e51f0b65" + sha256 sonoma: "4927feb05aaad3f40488221cc2dd9bec99dcc26de44ff5aa71b14b134d23358a" + sha256 ventura: "07fab86e1b3ee51ce0155986142fdd3d5dbd9f1ce7e37df14426af04ee7fbbcc" + sha256 arm64_linux: "97cd6e5d281bd2a00a0ac75e74344672b6dba99c41d3605f4f2f3aedfa406901" + sha256 x86_64_linux: "aa0f34a74a2a6bbcd6244b115116e1ad1d25a2f1f026c3d2bf6698b794538fc0" + 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", since: :catalina + 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("@", "\\@") + "'" + 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..ad9a5547c537e --- /dev/null +++ b/Formula/p/php@8.2.rb @@ -0,0 +1,479 @@ +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.28.tar.xz" + mirror "https://fossies.org/linux/www/php-8.2.28.tar.xz" + sha256 "af8c9153153a7f489153b7a74f2f29a5ee36f5cb2c6c6929c98411a577e89c91" + license "PHP-3.01" + revision 1 + + livecheck do + url "https://www.php.net/downloads" + regex(/href=.*?php[._-]v?(#{Regexp.escape(version.major_minor)}(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "e2246998dd5e7e7afec8fca2021d72ed1649d895893c5547d0bb029497f8c44c" + sha256 arm64_sonoma: "11e6e340314c547ddbb00f158b752da356b8b6818b41f4a365fc582729ee1c5e" + sha256 arm64_ventura: "35103bc809c21c425335f36677e68863488a247ed5069b41e050d090911c331e" + sha256 sonoma: "869dae33045c9f7aca8ae21ac65e1fe847e096427a65cf5885a777ebe124855e" + sha256 ventura: "596b75299759024eb833f033284ffa70b454e1b0cf0dbe09aca2c9786f3782d4" + sha256 arm64_linux: "8460ac3ae3ca87db6f41494ab1c0fdb54225eb3524f16f325fb48afe72942ab1" + sha256 x86_64_linux: "31f6e8f11605a676b758e586f6e74219a5fdb31dfb71c3ee0edeb1491679d827" + 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", since: :catalina + 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("@", "\\@") + "'" + 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..7ec053bbbe3fe --- /dev/null +++ b/Formula/p/php@8.3.rb @@ -0,0 +1,478 @@ +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.21.tar.xz" + mirror "https://fossies.org/linux/www/php-8.3.21.tar.xz" + sha256 "4dfb329f209a552c3716394fc123bb62e80a468b55ce27fc8cb0fd5f30b9dcd6" + license "PHP-3.01" + + livecheck do + url "https://www.php.net/downloads" + regex(/href=.*?php[._-]v?(#{Regexp.escape(version.major_minor)}(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "e3197f9bd177aefd63f9bcce8f7e5dcaf45246dc4170bd946bb06196772b98fa" + sha256 arm64_sonoma: "2eb9ae3177ee96bbe2d478264c169cab5268d4fba837fbf18565e86161a6da6b" + sha256 arm64_ventura: "619b9853cd24b379e582d97447bc4460e781a518a53eaab315a95f0f77b2d0c5" + sha256 sonoma: "0ae63bf1ef0935e560f264e3f4b99d18fe58c890686a5e015b641998fad76309" + sha256 ventura: "3aef53edbf54403cfff6a48d62c426a859d67082fde9cefabda16b767d1f6925" + sha256 arm64_linux: "f80bbee7cfeefe6403d9be7660432cd273f0977d6d6aea115496ddcfccc9a0a9" + sha256 x86_64_linux: "c3c97efcd65600bd1c4391e93063df436bd5fa0c206d7984a933cb91feddba2a" + 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", since: :catalina + 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("@", "\\@") + "'" + 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..da3e1de8b0e58 --- /dev/null +++ b/Formula/p/phpbrew.rb @@ -0,0 +1,38 @@ +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" + + bottle do + rebuild 2 + 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..d92f0247cc0f4 --- /dev/null +++ b/Formula/p/phpmd.rb @@ -0,0 +1,36 @@ +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 + + 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_sequoia: "93d7d0a1972beb0f25710049a6a9397be080440c3f8aec1c43b151607133f6f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "93d7d0a1972beb0f25710049a6a9397be080440c3f8aec1c43b151607133f6f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "93d7d0a1972beb0f25710049a6a9397be080440c3f8aec1c43b151607133f6f8" + sha256 cellar: :any_skip_relocation, sonoma: "82e7df63e44dff329d37ab987bdee2415dea8c4ac14fb636e80ab471860d958a" + sha256 cellar: :any_skip_relocation, ventura: "82e7df63e44dff329d37ab987bdee2415dea8c4ac14fb636e80ab471860d958a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a2dea00945d920af4a076e5034ac58a13bc88821298828068a4d35da29bc96ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2dea00945d920af4a076e5034ac58a13bc88821298828068a4d35da29bc96ef" + 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..9b572ac9454d1 --- /dev/null +++ b/Formula/p/phpstan.rb @@ -0,0 +1,93 @@ +class Phpstan < Formula + desc "PHP Static Analysis Tool" + homepage "https://github.com/phpstan/phpstan" + url "https://github.com/phpstan/phpstan/releases/download/2.1.14/phpstan.phar" + sha256 "91f767184bc328019440ca8aad41689ac4acc9fa4bad50058f4331a24ac86a71" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dc1e96b21b8e711a3f41f994cb0e22b9eb4b7f887cc0ace9fc24980a7a659b79" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc1e96b21b8e711a3f41f994cb0e22b9eb4b7f887cc0ace9fc24980a7a659b79" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dc1e96b21b8e711a3f41f994cb0e22b9eb4b7f887cc0ace9fc24980a7a659b79" + sha256 cellar: :any_skip_relocation, sonoma: "96e08a94c264f4df70f916db882372d98360d7960cb8904e5f295b92486ae332" + sha256 cellar: :any_skip_relocation, ventura: "96e08a94c264f4df70f916db882372d98360d7960cb8904e5f295b92486ae332" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3eea15fb147042f630758beaa08454a00e31ebf3e69873d893ad36b4e5cd706" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3eea15fb147042f630758beaa08454a00e31ebf3e69873d893ad36b4e5cd706" + 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 79% rename from Formula/phpunit.rb rename to Formula/p/phpunit.rb index 794e0210d57b3..ac77d436d1567 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-9.2.5.phar" - sha256 "4e229c51ab441da2c2e4e7eb824fb79d3cf5e55607cc86e0c09b74f1474b105f" + url "https://phar.phpunit.de/phpunit-12.1.5.phar" + sha256 "913bd53647b3d78928335f12948b290a75a0970c43b599ba2c3922b77f93e6c5" + 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: "5e25f01a5f05c762bc6e41ea89dec7c3db1f3157a12ae3ecfb97da40a1e87348" + 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..baf6ba68c876b --- /dev/null +++ b/Formula/p/phylum-cli.rb @@ -0,0 +1,50 @@ +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_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..737aee9c67200 --- /dev/null +++ b/Formula/p/physfs.rb @@ -0,0 +1,55 @@ +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" + + bottle do + 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 + 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..6ae6c1e681a77 --- /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.2.0.tar.gz" + sha256 "e9bcce99d9c90ac8ce96746eff49c20b7c9717aee08b3cd6e58127c7ad9fa7c6" + license "BSL-1.0" + head "https://github.com/martinmoene/PhysUnits-CT-Cpp11.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d1aab63a49f0f5ca8b530354e7efe1b884c7d57e69509aca43bc4416191e3079" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "builddir", *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..1779592b5741b --- /dev/null +++ b/Formula/p/pianod.rb @@ -0,0 +1,50 @@ +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_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..f586b7f3f6d16 --- /dev/null +++ b/Formula/p/picat.rb @@ -0,0 +1,42 @@ +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/picat38_src.tar.gz" + version "3.8" + sha256 "c238a474f345a1b339acbd00d5fc332bd908e9822b9bd89fb855d2c8a7a10e72" + license "MPL-2.0" + + livecheck do + url "https://picat-lang.org/download.html" + regex(/>\s*?Released version v?(\d+(?:[.#]\d+)+)\s*?,/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8baa72e2d29b850efa2c9f048041e4efbf1264b303d2f87907f21ba702022255" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ec6711ce15529f9918b690ac2a897f375768f9b1188212449ef5a10b52305820" + sha256 cellar: :any_skip_relocation, arm64_ventura: "da90a0ec7a0b2d745e06880c27e9851004140559b83e2e62adccee92b5b1eb62" + sha256 cellar: :any_skip_relocation, sonoma: "4e7142a99b62517ab3ec4ef69bc87b0f2a2495679bb96071e8bde0f4032b26f7" + sha256 cellar: :any_skip_relocation, ventura: "f32341afb685b5a5a1c34bea930101e949c03a414ffaa3fb8dfc197228c0b262" + sha256 cellar: :any_skip_relocation, arm64_linux: "db5c79f8eb48c3e0e107f5b9f7b40786d5827b030432db5c0635af347956caac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a1a72ffb232b2ac33a9eb001751a63ddee735c248cdf55c43cb0482be26391d" + 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..f8939c1aff7d5 --- /dev/null +++ b/Formula/p/pick.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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, mojave: "55596e8ab28fd4fc36d064f6395c38ce51314bcc0d2f2f3862515a683bc92182" + sha256 cellar: :any_skip_relocation, high_sierra: "0fc521881c760d4f9e4f8625795716e0e1c0e1ed1522ccb5efd055313b2729bc" + 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..8238ebe08fae5 --- /dev/null +++ b/Formula/p/pickle.rb @@ -0,0 +1,35 @@ +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" + + bottle do + rebuild 1 + 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..10e625b9b86fa --- /dev/null +++ b/Formula/p/picoc.rb @@ -0,0 +1,58 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "0251ecfb5772bffbb92457af974af44856d25215d1d9bd692530b6b53517f71a" + sha256 cellar: :any_skip_relocation, high_sierra: "5b2c6a5c8c3404cbd75b4b0e1c6f6cbf1be0246ca0b3d1df70d78a6785e51711" + 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..7cfaa78ca2b8d --- /dev/null +++ b/Formula/p/picocom.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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..cf7bb48f36753 --- /dev/null +++ b/Formula/p/picotool.rb @@ -0,0 +1,75 @@ +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.1.1.tar.gz" + sha256 "19200c6dc4be5acd6fb53de3d7f35c826af596c18879d56f214b795300100260" + + resource "pico-sdk" do + url "https://github.com/raspberrypi/pico-sdk/archive/refs/tags/2.1.1.tar.gz" + sha256 "179c5531e75ac7f82d0679e70b6e8881f871738dc0ef17baf3b4ff4679291c41" + + livecheck do + formula :parent + end + end + end + + bottle do + sha256 arm64_sequoia: "8e51e1b6845de5e0b23a077e14d62833a1a278dd152af0c3dfef5e61cc2256b5" + sha256 arm64_sonoma: "cd8546607360520cf90fb05023ddedf4314f5091a405b26a14258671de27d43f" + sha256 arm64_ventura: "d4f3ee5104586f5333b44791ddab8cb73335674e9c34bba6087ac2b5173977bb" + sha256 sonoma: "5a30e1353a4d3ab7d2dfc5ceb9e129e24d5909fd2a78e49a15f440c47d99b832" + sha256 ventura: "968e9358bedbeb778f48ceea8aac90f86be7166073f560273a4a1175a17a1f74" + sha256 arm64_linux: "238fcbc4f902a9f507d68e3f8a4988ae59b04e7cff40ab729d6eddc57d6f9643" + sha256 x86_64_linux: "e1eedbfbeb6bbd81d3e6bdf3e3c086ef33689ea341967e00b1cdeef528f77ce8" + 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..2e228f2578b99 --- /dev/null +++ b/Formula/p/pict.rb @@ -0,0 +1,43 @@ +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" + + bottle do + rebuild 1 + 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..530adb5d677de --- /dev/null +++ b/Formula/p/pidcat.rb @@ -0,0 +1,33 @@ +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" + + 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..19e7989cd250b --- /dev/null +++ b/Formula/p/pidgin.rb @@ -0,0 +1,172 @@ +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` + + uses_from_macos "cyrus-sasl" + uses_from_macos "expat" + uses_from_macos "perl" + uses_from_macos "tcl-tk" + + 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 + sha256 arm64_sonoma: "caa350ca46ced5772132c46319aade98a688e44e84c1b01358f5fb220255757b" + sha256 arm64_ventura: "20f82c9ff843f0dd90c67d8c0131819566f7890053a5e8f09650044fd63fe88e" + sha256 sonoma: "b4703a7a10e3aa6d834336bd7a4bb0733060cec56f1cb3f104608efe7499b6ee" + sha256 ventura: "7879c09f11287eece7b6850933b7a9846e810d040b6d17439f2be82912583b08" + sha256 arm64_linux: "840058d985fa2d5fd430323c4a74147a6f421730c4126987430872e22812c12c" + sha256 x86_64_linux: "fcfbc1d059e9878a6ef4e729a66d3f914996e9234c90bd3cdcd6cd6f431c9016" + end + + head do + url "https://keep.imfreedom.org/pidgin/pidgin/", branch: "default", using: :hg + + depends_on "gobject-introspection" => :build + depends_on "gstreamer" => :build + depends_on "mercurial" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + + depends_on "gplugin" + depends_on "gtk4" + depends_on "json-glib" + depends_on "libadwaita" + depends_on "libsoup" + 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"] = "/" + system "meson", "setup", "build", "--force-fallback-for=birb,hasl,ibis,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 + + ENV["ac_cv_func_perl_run"] = "yes" if OS.mac? && MacOS.version == :high_sierra + 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} + ] + + args += if OS.mac? + %W[ + --with-tclconfig=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework + --with-tkconfig=#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework + --without-x + ] + else + %W[ + --with-tclconfig=#{Formula["tcl-tk"].opt_lib} + --with-tkconfig=#{Formula["tcl-tk"].opt_lib} + ] + end + + # 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..e8b22957fb750 --- /dev/null +++ b/Formula/p/pidof.rb @@ -0,0 +1,72 @@ +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_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" + sha256 cellar: :any_skip_relocation, mojave: "1a88c923954c4511fb64fe6cbfb27f5248c39d1676053c671ab71c652a377a2f" + sha256 cellar: :any_skip_relocation, high_sierra: "fd5f89cf3a9685142e08a23980d9438e961096d74ee508a96ccbaecb55da6e1a" + sha256 cellar: :any_skip_relocation, sierra: "6991d110a73724959f84edc398647e3cac5a029645daedef5f263ae51218130d" + sha256 cellar: :any_skip_relocation, el_capitan: "d02c826db5564d7750c0e309a771b164f7764250507955d0b87d09837c3c2ba6" + 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..acc0334628c5d --- /dev/null +++ b/Formula/p/pie.rb @@ -0,0 +1,28 @@ +class Pie < Formula + desc "PHP Installer for Extensions" + homepage "https://github.com/php/pie" + url "https://github.com/php/pie/releases/download/0.12.0/pie.phar" + sha256 "6dc2e231640eac61d722d3752e4cc983490d7f24885eea1bbac24be58e042df9" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "924e81ed22bf6031807fff34bb58ae2d6f85b105dcd5d9f2c2d0c285009f0582" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "924e81ed22bf6031807fff34bb58ae2d6f85b105dcd5d9f2c2d0c285009f0582" + sha256 cellar: :any_skip_relocation, arm64_ventura: "924e81ed22bf6031807fff34bb58ae2d6f85b105dcd5d9f2c2d0c285009f0582" + sha256 cellar: :any_skip_relocation, sonoma: "967cf150edcd369fb961412df340fbbcccff93a8b3495d094aee5688c3d73a30" + sha256 cellar: :any_skip_relocation, ventura: "967cf150edcd369fb961412df340fbbcccff93a8b3495d094aee5688c3d73a30" + sha256 cellar: :any_skip_relocation, arm64_linux: "34b866e5613091e039a57b839a5a92a7e96f8acc9985e8941fd8ead85021ea61" + sha256 cellar: :any_skip_relocation, x86_64_linux: "34b866e5613091e039a57b839a5a92a7e96f8acc9985e8941fd8ead85021ea61" + 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..8d3d375b835dd --- /dev/null +++ b/Formula/p/pieces-cli.rb @@ -0,0 +1,140 @@ +class PiecesCli < Formula + include Language::Python::Virtualenv + + desc "Command-line tool for Pieces.app" + homepage "https://pieces.app/" + url "https://storage.googleapis.com/app-releases-production/pieces_cli/release/pieces_cli-1.14.0.tar.gz" + sha256 "f3cb1116d1d939aa6795fcbea8d91886a3c5e11c5dae350a547dfa52f6d4da22" + + license "MIT" + + livecheck do + url "https://builds.pieces.app/stages/production/pieces_cli/version" + strategy :json do |json| + json["version"] + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "4d9815455763b274a4d08e888875257af71212813fc7d0e492b3e06b79993231" + sha256 cellar: :any, arm64_sonoma: "88922a51c7c77e7bacf9eedcb4853105d13825d245eb0bb12821fe3c23a610b2" + sha256 cellar: :any, arm64_ventura: "093dff983a32c3a28d2d5602396222f2a373aa195fe647f281822f8b76c73c21" + sha256 cellar: :any, sonoma: "4a7f8b42c8f1cd1c9dbc5478aec25d9daeec2527a42f0a6def51805a49fd4655" + sha256 cellar: :any, ventura: "1d751ae27246eeacc08b539951dffb077c72f9eabbd8476139bb475ede98ebf5" + sha256 cellar: :any_skip_relocation, arm64_linux: "e95c04f61413041db78d96bb5420d465119792587fcd625d7a3882755b45e32e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ee24ddbabab556682a2c0068b146f156ef3b7d25ad67946bcc5fb2ce0780f4d" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "aenum" do + url "https://files.pythonhosted.org/packages/d0/f8/33e75863394f42e429bb553e05fda7c59763f0fd6848de847a25b3fbccf6/aenum-3.1.15.tar.gz" + sha256 "8cbd76cd18c4f870ff39b24284d3ea028fbe8731a58df3aa581e434c575b9559" + 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 "mdurl" do + url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" + sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + end + + resource "pieces-os-client" do + url "https://files.pythonhosted.org/packages/6e/18/a14106e311333ae6d1c2ff580af7fb27cc0b0a65aea8417f3d26704eabbd/pieces_os_client-4.2.0.tar.gz" + sha256 "764b1b16a0c3d90ac054a827f886bf8826c96bd075d586e58c70aa3f8f769290" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + 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/9a/57/5996c63f0deec09e9e901a2b838247c97c6844999562eac4e435bcb83938/pydantic-1.10.22.tar.gz" + sha256 "ee1006cebd43a8e7158fb7190bb8f4e2da9649719bff65d0c287282ec38dec6d" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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 "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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 "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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 + 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) + list_output = shell_output("#{bin}/pieces --ignore-onboarding list", 2) + assert_match "Please make sure PiecesOS is running", list_output + + ### 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..e4fdfe5ee0793 --- /dev/null +++ b/Formula/p/pigz.rb @@ -0,0 +1,49 @@ +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 + + bottle do + 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..6a6a8c593a07f --- /dev/null +++ b/Formula/p/pike.rb @@ -0,0 +1,82 @@ +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_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? + + 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..bcad903f715c1 --- /dev/null +++ b/Formula/p/piknik.rb @@ -0,0 +1,61 @@ +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_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, 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/pillar.rb b/Formula/p/pillar.rb new file mode 100644 index 0000000000000..04d4859cac998 --- /dev/null +++ b/Formula/p/pillar.rb @@ -0,0 +1,46 @@ +class Pillar < Formula + desc "Manage migrations for Cassandra data stores" + homepage "https://github.com/comeara/pillar" + url "https://github.com/comeara/pillar/archive/refs/tags/v2.3.0.tar.gz" + sha256 "f1bb1f2913b10529263b5cf738dd171b14aff70e97a3c9f654c6fb49c91ef16f" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, sonoma: "764efeebd41e17d3c2024497dd036f074235b0d7c145e6d1dfd936a7ea85f1ad" + sha256 cellar: :any_skip_relocation, ventura: "4abaecf745c4a7fc8b4e116ec80c22a81a41aa906a7bccae2fa8b409b12bc8f1" + sha256 cellar: :any_skip_relocation, monterey: "75a3f4f0ac66b98d05a55687f126fadca0dc86c8a82c5b97b2cf22a1db98615e" + sha256 cellar: :any_skip_relocation, big_sur: "4edab61108a48ddf41f90c46872bbced08a6fb600ed84b8faa2a270be2d4eea4" + sha256 cellar: :any_skip_relocation, catalina: "8aac25711310b56913c1838c9d6b4ef72af78ade7b20ca0f5b8519805854e285" + sha256 cellar: :any_skip_relocation, mojave: "935f68b739a2d86174a045032b5606fffb8c1fa4f7ef74fd0aabc6608dfe068a" + sha256 cellar: :any_skip_relocation, high_sierra: "74bd2dde375b70f3a6ad14c7c55bc511d372998d4901daebd627f0ca5200c6bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b7faa8f2febab2a7b0b5e035f08ba4b7bad74574806d5dfc15fdeef735589ef" + end + + # Last release on 2016-08-16 + # Also, build uses deprecated sbt.version==0.13.11 and is not compatible with newer version. + # Ref: https://github.com/comeara/pillar/blob/master/project/build.properties + disable! date: "2024-10-11", because: :unmaintained + + depends_on "sbt" => :build + depends_on arch: :x86_64 # openjdk@8 is not supported on ARM + depends_on "openjdk@8" + + def install + inreplace "src/main/bash/pillar" do |s| + s.gsub! "$JAVA ", "#{Formula["openjdk@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/p/pillow.rb b/Formula/p/pillow.rb new file mode 100644 index 0000000000000..acd52e3c56cd9 --- /dev/null +++ b/Formula/p/pillow.rb @@ -0,0 +1,72 @@ +class Pillow < Formula + desc "Friendly PIL fork (Python Imaging Library)" + homepage "https://python-pillow.github.io/" + url "https://files.pythonhosted.org/packages/af/cb/bb5c01fcd2a69335b86c22142b2bccfc3464087efb7fd382eee5ffc7fdf7/pillow-11.2.1.tar.gz" + sha256 "a64dd61998416367b7ef979b73d3a85853ba9bec4c2925f74e588879a58716b6" + license "HPND" + head "https://github.com/python-pillow/Pillow.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4795f66c54ecabe2ff51bac254ddd4d928b8a39a876a032f4c2beb256ca45d13" + sha256 cellar: :any, arm64_sonoma: "83db61f72687352e8bffc56fa0ddfadbe8bae693465903ba39cfbd704d9f0788" + sha256 cellar: :any, arm64_ventura: "bde65e4cd9b46783baa63f524890ac05fbfca173a37eaf55d4dd5071e094d02c" + sha256 cellar: :any, sonoma: "753a0e4f8ad99015b2eecddc0b2f487ec1728457b5c1dc2ec43ef497a682a413" + sha256 cellar: :any, ventura: "696e9a6bf06b41ef627a78ad56a61bc9c810791b1d61c358d1b19474b54f5609" + sha256 arm64_linux: "98f94cdcaa3aacd87fc53c638e92629a9d6a351db69ad2211568f9c78b739fd5" + sha256 x86_64_linux: "beade070b75c473a215372cb8bc41ec9aba0919c3fa09a66f1def1fc3881687a" + end + + depends_on "pkgconf" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + depends_on "freetype" + depends_on "jpeg-turbo" + 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", + "." + 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 + end +end diff --git a/Formula/p/pinact.rb b/Formula/p/pinact.rb new file mode 100644 index 0000000000000..d5e486c2fb005 --- /dev/null +++ b/Formula/p/pinact.rb @@ -0,0 +1,57 @@ +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.1.1.tar.gz" + sha256 "9988045463cb1769253fe04ed40754c7cee9b267dfd7e381c6c887752d002d45" + 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_sequoia: "e24e1f6607d0f1538bc582137a6fbb612979fcb85a25ae38d24196aa27f4a63d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e24e1f6607d0f1538bc582137a6fbb612979fcb85a25ae38d24196aa27f4a63d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e24e1f6607d0f1538bc582137a6fbb612979fcb85a25ae38d24196aa27f4a63d" + sha256 cellar: :any_skip_relocation, sonoma: "af684ef906aa6a734b4cff70db78d5a62f83b5ca3bb6886c8dc4e25f75749558" + sha256 cellar: :any_skip_relocation, ventura: "af684ef906aa6a734b4cff70db78d5a62f83b5ca3bb6886c8dc4e25f75749558" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c26163a3855ce551b0728ab4b5033e111264cee912dd0a16bc172084c5dedfb2" + 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..505a9b4dbcea9 --- /dev/null +++ b/Formula/p/pinboard-notes-backup.rb @@ -0,0 +1,44 @@ +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.tar.gz" + sha256 "bd26a1cd7ec4e0a83cd06c1234420ac9262d39c926a42820958502967005f63c" + license "GPL-3.0-or-later" + head "https://github.com/bdesham/pinboard-notes-backup.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "db4446ba2acc253e4311931498466fcbb817a7d4f0a40586c57a398199e28272" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "269d2c336cc103226d08d1347b641d2ed03a98b41468e14b97c619b1ec0182b4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0bbaa3f7e02e6359afb9b42066fc2e975c31f2ed2cfc3cfb4e5cfdf3649da43c" + sha256 cellar: :any_skip_relocation, sonoma: "878786cea9c65cb998b04c9986bd0ef267203e57bac2c0c413b914a79c2b3215" + sha256 cellar: :any_skip_relocation, ventura: "1e1d6084bee6d414a922988d46a79f8f8d34d20fb983d151049889ded6a47154" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ea494e407702d438d26039b44082e145d14fbc04d38fe5fe66062b08fdcb06d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c73c136aeeb04488e72260d28b820e81791f13cdcf7da540f0e80352a4a3365d" + 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 + args = [ + "--allow-newer=http-api-data:base", # https://github.com/fizruk/http-api-data/pull/146 + "--allow-newer=req:template-haskell", # https://github.com/mrkkrp/req/pull/182 + ] + + system "cabal", "v2-update" + system "cabal", "v2-install", *args, *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..4f83caaa39867 --- /dev/null +++ b/Formula/p/pinentry-mac.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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 "libtool" => :build + depends_on xcode: :build # for ibtool + depends_on "libassuan" + depends_on "libgpg-error" + depends_on :macos + + def install + 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..00ec52269cf43 --- /dev/null +++ b/Formula/p/pinentry.rb @@ -0,0 +1,61 @@ +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.1.tar.bz2" + mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/pinentry/pinentry-1.3.1.tar.bz2" + sha256 "bc72ee27c7239007ab1896c3c2fae53b076e2c9bd2483dc2769a16902bce8c04" + license "GPL-2.0-only" + revision 1 + + livecheck do + url "https://gnupg.org/ftp/gcrypt/pinentry/" + regex(/href=.*?pinentry[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1d5fc3eb19d7e41caa4a8b61530e7040d0f3fbffb812ca24e116d6b247a0dadc" + sha256 cellar: :any, arm64_sonoma: "d657fb607715d8f374bb50e79be0a1bb129bf1f0cfb0f706dc0688d10058ee89" + sha256 cellar: :any, arm64_ventura: "5dc139b14332cfb907a8179e28d36a501266686699ce387f48452b060a21ebb3" + sha256 cellar: :any, arm64_monterey: "829c5388c7fc1c40eaeba29199ae97ebd727bc2df2f143f1a6818f07b79dff12" + sha256 cellar: :any, sonoma: "6eb6f95ae8513f179cb658043457e39dbed3b95bbf1a7bb8aece3158d2fd4299" + sha256 cellar: :any, ventura: "1a750d73932b1c874887b38e186ad2017a36f230f3306983575bfa8b35c25e0d" + sha256 cellar: :any, monterey: "4bed735f12804f39955128939408210a31a8d0fd0b7d61f309779daa66053692" + sha256 cellar: :any_skip_relocation, arm64_linux: "ccf9f241e021929831e1da0c43206b87f99d1886d46e77ea8294f671ceb06c4b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3e303a0b8099dedac66bbc95a0fdc3cfda679e594e60972d99eb3025c6f79fb" + 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..ff2e1bcd6222f --- /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 + + bottle do + 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 mojave: "b81b1202add75d938802681618f5bf95dd245e03ff80f5f0ca67a5ba8b7bfb84" + sha256 high_sierra: "84edf6ec00f570004abc6f3d0335196b513a4a52e589919ca1e70c35b31525cc" + sha256 sierra: "9b8e3d359081d68626f86cab8b048926b6471f8ca1be8e47ca8625e22da5021f" + 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..a3768051bdcdd --- /dev/null +++ b/Formula/p/pinocchio.rb @@ -0,0 +1,68 @@ +class Pinocchio < Formula + desc "Efficient and fast C++ library implementing Rigid Body Dynamics algorithms" + homepage "https://stack-of-tasks.github.io/pinocchio" + url "https://github.com/stack-of-tasks/pinocchio/releases/download/v3.6.0/pinocchio-3.6.0.tar.gz" + sha256 "3008e313e3d3321fa0a74d1c35a667c368953def040d74ca5a9b98f43ea50342" + license "BSD-2-Clause" + head "https://github.com/stack-of-tasks/pinocchio.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "b9f39e535b830d12e624b2367e4b86c1fa76d61404c945963f92fb03e09b70d8" + sha256 arm64_sonoma: "41cef46a824769a36b8e426d5e86b7cf03562085889f18daf08b5ac9b6c18e21" + sha256 arm64_ventura: "f5046d2daf9dabb289e350f8cdfbc639838563e7beb9b4cd48f5a8b7f9f2fec2" + sha256 cellar: :any, sonoma: "3c9a2bf916b020e7ffddb28b8028f4eb6db17ecce5edc8451e9f56ebe7cdbea7" + sha256 cellar: :any, ventura: "80c34d1477a6c1dd6de9f8d1255e6461ae07a0e3979fcd0b066358c8f2fe8c6d" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a155e68165ee3752bf7e35dc7da46a02be231aff06c190f41358a2cefbef987" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2edcad83df0b003a0887f3ab833914e406913f031a073b3b5d79733f8edc7247" + 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.13" + depends_on "urdfdom" + + on_macos do + depends_on "octomap" + end + + def python3 + "python3.13" + 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..c3aa0c21ef7f5 --- /dev/null +++ b/Formula/p/pinot.rb @@ -0,0 +1,69 @@ +class Pinot < Formula + desc "Realtime distributed OLAP datastore" + homepage "https://pinot.apache.org/" + url "https://downloads.apache.org/pinot/apache-pinot-1.3.0/apache-pinot-1.3.0-bin.tar.gz" + sha256 "9cdc4423187c44569b8c6dd376d0162cc05339f56498a7f3a594303f17e44af0" + license "Apache-2.0" + head "https://github.com/apache/pinot.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "dd4c35dab1e00cb76d570424d53e76cb020343111b7be8fc3ed73dee0c6dcc90" + 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..b7154b566066e --- /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.73.6.tar.gz" + sha256 "c838908b202a690f88c6154d93cb1aac864917a299a4f6337c15e57947b86a79" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e96a0fd724bcbfde21d2a30fbd68c7c3c8b8d73581739485876a8087c3e9a157" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "43695c10d71bc3ddb5e399653e879ea3f266c9d133f35310cded16fb9edaa0c8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6697f85bb37c654056bd6b70dcecbde14f2714ba6949ece4e6ccdbd6d3ca4223" + sha256 cellar: :any_skip_relocation, sonoma: "ca80aa920633fe738854b958404232efda544b66e7fd1a33bf05193d8df3ef31" + sha256 cellar: :any_skip_relocation, ventura: "cdb3b637711cbf8700dda2098c259ee8a3a30f850716f103ffaa328c19265863" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d9ef42fe2822ef5072e5dcd005783b4473e46a5507ef24f24368c213d98df9b3" + 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..98709bc789aef --- /dev/null +++ b/Formula/p/pioneer.rb @@ -0,0 +1,51 @@ +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" + head "https://github.com/pioneerspacesim/pioneer.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "3f0963e3b117f8b462cd62d28d0d4d6508d3a3cb72a71f23049f938ce5df6a2c" + sha256 arm64_sonoma: "9b016db2cf4b55cf30719eebdada5c22714e2cff5e0af527f22396a189127ce1" + sha256 arm64_ventura: "6395cbe506ea3c1ce1df39cbde8bdd182e8283611befd8ee8669ee6c9c4cbc82" + sha256 sonoma: "b8db4414b2f2075a425ad8db7d8fbe1e2bcb62ad053c4b8bd28b02a43f0f784c" + sha256 ventura: "2ba87a5173d1a17393017efa27b5c7c3b28f9ab3d5e7c493ce25e45507c88395" + sha256 arm64_linux: "5392c601ef313258e8c2d24fe0cec56462216610a32993f951982e5b6e9700d4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab19f4af575a7c78812be7530e593d02a1bd931db8f320153de1ecb94ed51f56" + 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..dbad1b471e608 --- /dev/null +++ b/Formula/p/pioneers.rb @@ -0,0 +1,66 @@ +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 + + bottle do + 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..82c858d6ef8a5 --- /dev/null +++ b/Formula/p/pip-audit.rb @@ -0,0 +1,156 @@ +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" + version_scheme 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0c04dbedb66f03b3e026a1dab2241b9abe3da270eb3761bcdc786f009a42939b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f2abb8a1c828c4ab0c6b7c866e35924b47511fe7bc875d8213a608273db2e2bf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7d5e88d4e1e7a949be3f0bdb4dea0e93e4615c94a5ecade03e3f572a31da02e3" + sha256 cellar: :any_skip_relocation, sonoma: "6e5b2763f263655dda4daf3f923df01cd742d5bc366c09b639d7f5d2be558c4e" + sha256 cellar: :any_skip_relocation, ventura: "8e3d3b324ce93a041a5add3ad843c5160dc4b711b76d54295230cd68f8552923" + sha256 cellar: :any_skip_relocation, arm64_linux: "13f470970241a4ce5afbaf95d36d6419713f986a13198d0861cbf26ad779018c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45a6780656c96bd9a25b4f5d68f9183dc1d705d4196ab79c9e4f8fccce251a5c" + end + + depends_on "certifi" + depends_on "python@3.13" + + 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/b7/a4/3390ac4dfa1773f661c8780368018230e8207ec4fd3800d2c0c3adee4456/cachecontrol-0.14.2.tar.gz" + sha256 "7d47d19f866409b98ff6025b6a0fca8e4c791fb31abbd95f622093894ce903a2" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + 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/74/6f/8709031ea6e0573e6075d24ea34507b0eb32f83f10e1420f2e34606bf0da/license_expression-30.4.1.tar.gz" + sha256 "9f02105f9e0fcecba6a85dfbbed7d94ea1c3a70cf23ddbfb5adf3438a6f6fce0" + 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 "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/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "py-serializable" do + url "https://files.pythonhosted.org/packages/f0/75/813967eae0542776314c6def33feac687642a193b9d5591c20684b2eafd8/py_serializable-2.0.0.tar.gz" + sha256 "e9e6491dd7d29c31daf1050232b57f9657f9e8a43b867cca1ff204752cf420a5" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..05f1e70933b09 --- /dev/null +++ b/Formula/p/pip-tools.rb @@ -0,0 +1,72 @@ +class PipTools < Formula + include Language::Python::Virtualenv + + desc "Locking and sync for Pip requirements files" + homepage "https://pip-tools.readthedocs.io/" + url "https://files.pythonhosted.org/packages/1a/87/1ef453f10fb0772f43549686f924460cc0a2404b828b348f72c52cb2f5bf/pip-tools-7.4.1.tar.gz" + sha256 "864826f5073864450e24dbeeb85ce3920cdfb09848a3d69ebf537b521f14bcc9" + license "BSD-3-Clause" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aa9da34f416d318a7c3a9526cfe69b1683cbc52c61a768c7935c29b7da7492ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aa9da34f416d318a7c3a9526cfe69b1683cbc52c61a768c7935c29b7da7492ac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aa9da34f416d318a7c3a9526cfe69b1683cbc52c61a768c7935c29b7da7492ac" + sha256 cellar: :any_skip_relocation, sonoma: "f52c7c1b06c27e8ca825371dc8ac46aa9ef4586e5196a2c876dc9c7170006cb0" + sha256 cellar: :any_skip_relocation, ventura: "f52c7c1b06c27e8ca825371dc8ac46aa9ef4586e5196a2c876dc9c7170006cb0" + sha256 cellar: :any_skip_relocation, arm64_linux: "875deedf0324f719831864e1ccf1044da7752c1db9509777a99d2e2c1a6bef99" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f038065823c2098303d0c13de5bedc7de731721ed2588762def4ea1da0c4bd37" + end + + depends_on "python@3.13" + + resource "build" do + url "https://files.pythonhosted.org/packages/7d/46/aeab111f8e06793e4f0e421fcad593d547fb8313b50990f31681ee2fb1ad/build-1.2.2.post1.tar.gz" + sha256 "b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + 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/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/b7/a0/95e9e962c5fd9da11c1e28aa4c0d8210ab277b1ada951d2aee336b505813/wheel-0.44.0.tar.gz" + sha256 "a29c3f2817e95ab89aa4660681ad547c0e9547f20e75b0562fe7723c9a2a9d49" + end + + def install + virtualenv_install_with_resources + + %w[pip-compile pip-sync].each do |script| + generate_completions_from_executable(bin/script, shells: [:fish, :zsh], 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..f6b23554f166f --- /dev/null +++ b/Formula/p/pipdeptree.rb @@ -0,0 +1,38 @@ +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/74/ef/9158ee3b28274667986d39191760c988a2de22c6321be1262e21c8a19ccf/pipdeptree-2.26.1.tar.gz" + sha256 "92a8f37ab79235dacb46af107e691a1309ca4a429315ba2a1df97d1cd56e27ac" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "522d354e5706c06a83b1b1b58b6967363100f003bba3761c885448b9792ccff4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "522d354e5706c06a83b1b1b58b6967363100f003bba3761c885448b9792ccff4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "522d354e5706c06a83b1b1b58b6967363100f003bba3761c885448b9792ccff4" + sha256 cellar: :any_skip_relocation, sonoma: "ac623f210f353911644b09784a94f5d110437ec9aaacd0bc2418cefa9cb3557d" + sha256 cellar: :any_skip_relocation, ventura: "ac623f210f353911644b09784a94f5d110437ec9aaacd0bc2418cefa9cb3557d" + sha256 cellar: :any_skip_relocation, arm64_linux: "522d354e5706c06a83b1b1b58b6967363100f003bba3761c885448b9792ccff4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "522d354e5706c06a83b1b1b58b6967363100f003bba3761c885448b9792ccff4" + end + + depends_on "python@3.13" + + 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..3552d5a8621f1 --- /dev/null +++ b/Formula/p/pipe-rename.rb @@ -0,0 +1,42 @@ +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 "41edf419ab3d7b3c16d2efe209b3ca3d3f7104a3365f61fe821a59caac31810b" + license "MIT" + head "https://github.com/marcusbuffett/pipe-rename.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "79ceea8ede307d9f114d6d476bc2538a9fc2dbaba609c42821ef6206057e251a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a48ff406bcb8a5357d9c53071cba3f22c1cd76dd57677c1e5eae824688eb1857" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0f2226ebc20e21cf3e60864f754b16858f9142e91c075dce3f40aca885a170ec" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e416289ce81261b7049d6373b155523194d248e71d30578d4dde81dd2acabf39" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "70261a45024958a3552434d796c921342e067237e27fc49fe6434b9fc4faa87d" + sha256 cellar: :any_skip_relocation, sonoma: "21eaac4bb7efc7c16d23d434a51940509892ecc6b7e15e09c93c1d03b4075fc4" + sha256 cellar: :any_skip_relocation, ventura: "ea7df5f5f537f9b59746a41b5c54f9a84fb0fa41a7e1f120b110cdd591e65db0" + sha256 cellar: :any_skip_relocation, monterey: "d8c2ce2e9e90728f5e2901d0062ec2613b5f9e88b3c1d2dc3c42ebf45a2f4b55" + sha256 cellar: :any_skip_relocation, big_sur: "1147a22a59b737ff14028deb0c524307ff036a9953ad5f57a5568c277ce27ceb" + sha256 cellar: :any_skip_relocation, arm64_linux: "f6cdca957d667f07c4a51217258857ef20342a8fe6857447972db65b82b58c68" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd5c54a0bdf37c614971f1dc2b5326b5b391ca0c03a86d58b50970401ea7e444" + 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..6d161d4954a59 --- /dev/null +++ b/Formula/p/pipebench.rb @@ -0,0 +1,48 @@ +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 + + bottle do + 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, mojave: "7489b10153744c61c74be048fb8c5d0acb4abae2f03437a0a633a312253c3345" + sha256 cellar: :any_skip_relocation, high_sierra: "9ece6aaf7dcf0e1dbdbba28979ffbb6384f1d69aee8d194db2e009994c655cf2" + sha256 cellar: :any_skip_relocation, sierra: "213e31962005a876277c6f8edd3c9cd8964c253496f7945d48aef7338c76277e" + sha256 cellar: :any_skip_relocation, el_capitan: "353cabdaf04a41e2169c1e489cd038f9fbe7f33cfd24a5a0b3068449ccc3446d" + 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..f7cac325e49be --- /dev/null +++ b/Formula/p/pipelight.rb @@ -0,0 +1,57 @@ +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_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..676cdae8e4223 --- /dev/null +++ b/Formula/p/pipemeter.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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, mojave: "73de834fc4df5c79baf9cffc35fbe14df34e35e8414c1d3648326de9a5ced34c" + 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..1b1f35f588c3b --- /dev/null +++ b/Formula/p/pipenv.rb @@ -0,0 +1,87 @@ +class Pipenv < Formula + include Language::Python::Virtualenv + + desc "Python dependency management tool" + homepage "https://github.com/pypa/pipenv" + url "https://files.pythonhosted.org/packages/bd/59/472253c58d877aa61efa5ede1f9f3f187c8bcf5fdf87c662ad3de1d5defe/pipenv-2025.0.2.tar.gz" + sha256 "85d42e13da78f27f0213c998dba9a59f3ba6a6fe9e420b75b561acc344f021ad" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f2676c205403dded049b689813d7d8cf3cfd937a96aac444bf8ebbcde39714a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1f2676c205403dded049b689813d7d8cf3cfd937a96aac444bf8ebbcde39714a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1f2676c205403dded049b689813d7d8cf3cfd937a96aac444bf8ebbcde39714a" + sha256 cellar: :any_skip_relocation, sonoma: "298d706e644c222812b73954e6c8939bca6b215b0e028572ead164b291d13d4e" + sha256 cellar: :any_skip_relocation, ventura: "298d706e644c222812b73954e6c8939bca6b215b0e028572ead164b291d13d4e" + sha256 cellar: :any_skip_relocation, arm64_linux: "74beeb186ea51d9c4db4b2026c0bec0a46b98de350bc5a601f7d49b41e45ad84" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74beeb186ea51d9c4db4b2026c0bec0a46b98de350bc5a601f7d49b41e45ad84" + end + + depends_on "certifi" + depends_on "python@3.13" + + def python3 + "python3.13" + 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 "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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/aa/b2/bd26ed086b842b68c8fe9aac380ad7e5118cf84fa7abd45bb059a88368a8/setuptools-80.1.0.tar.gz" + sha256 "2e308396e1d83de287ada2c2fd6e64286008fe6aca5008e0b6a8cb0e2c86eedd" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/38/e0/633e369b91bbc664df47dcb5454b6c7cf441e8f5b9d0c250ce9f0546401e/virtualenv-20.30.0.tar.gz" + sha256 "800863162bcaa5450a6e4d721049730e7f2dae07720e0902b0e4040bd6f9ada8" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(libexec/"bin/pipenv", shells: [:fish, :zsh], + 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..798a63576edf5 --- /dev/null +++ b/Formula/p/pipes-sh.rb @@ -0,0 +1,28 @@ +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 + + 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..33cbad6c11a12 --- /dev/null +++ b/Formula/p/pipet.rb @@ -0,0 +1,32 @@ +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_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, 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..f6919b8aa9827 --- /dev/null +++ b/Formula/p/pipgrip.rb @@ -0,0 +1,60 @@ +class Pipgrip < Formula + include Language::Python::Virtualenv + + desc "Lightweight pip dependency resolver" + homepage "https://github.com/ddelange/pipgrip" + url "https://files.pythonhosted.org/packages/40/8e/a3d17fcdab26b738c6067142461d721c03da8e627944b184bfb28ec8ae3b/pipgrip-0.10.14.tar.gz" + sha256 "f99791cbe4819f4477237b3487bc8f69258236058f3093c5ccdfd9b157405308" + license "BSD-3-Clause" + head "https://github.com/ddelange/pipgrip.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "158d120e374774c7e6a9c613a19cee2e29ef587030627b7425eb86532342c2cf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "158d120e374774c7e6a9c613a19cee2e29ef587030627b7425eb86532342c2cf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "158d120e374774c7e6a9c613a19cee2e29ef587030627b7425eb86532342c2cf" + sha256 cellar: :any_skip_relocation, sonoma: "955d231bc75581deb2be9fb31e6f6997a510784c929bd5bf1616e24c20e716fe" + sha256 cellar: :any_skip_relocation, ventura: "955d231bc75581deb2be9fb31e6f6997a510784c929bd5bf1616e24c20e716fe" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d77cf7e45e6a83a1624774b8f55dd8544ba98d037a0d3b0e82a0254aabd1b47" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d77cf7e45e6a83a1624774b8f55dd8544ba98d037a0d3b0e82a0254aabd1b47" + end + + depends_on "python@3.13" + + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + 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", shells: [:fish, :zsh], 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..07e717f7ed187 --- /dev/null +++ b/Formula/p/pipx.rb @@ -0,0 +1,73 @@ +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/17/21/dd6b9a9c4f0cb659ce3dad991f0e8dde852b2c81922224ef77df4222ab7a/pipx-1.7.1.tar.gz" + sha256 "762de134e16a462be92645166d225ecef446afaef534917f5f70008d63584360" + license "MIT" + revision 1 + head "https://github.com/pypa/pipx.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ca676ccaaf770e835c5a9ae2d3a648ef4539893c02aa8a70875bfd3e338b8484" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ca676ccaaf770e835c5a9ae2d3a648ef4539893c02aa8a70875bfd3e338b8484" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ca676ccaaf770e835c5a9ae2d3a648ef4539893c02aa8a70875bfd3e338b8484" + sha256 cellar: :any_skip_relocation, sonoma: "69ef5656f96b42ca04100279ec7319a7c82217550028e245ccf5f05638986799" + sha256 cellar: :any_skip_relocation, ventura: "69ef5656f96b42ca04100279ec7319a7c82217550028e245ccf5f05638986799" + sha256 cellar: :any_skip_relocation, arm64_linux: "3c2f3a3c349cb76bc1cbb52c387500db77c0bdb79d9acc835a008efdac9d1630" + sha256 cellar: :any_skip_relocation, x86_64_linux: "621bb41e77afe49a6f4b2042485659267c80617331e8a1728ee1f31ff02c0c10" + end + + depends_on "python@3.13" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/7f/03/581b1c29d88fffaa08abbced2e628c34dd92d32f1adaed7e42fc416938b0/argcomplete-3.5.2.tar.gz" + sha256 "23146ed7ac4403b70bd6026402468942ceba34a6732255b9edf5b7354f68a6bb" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + 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) + 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..88b32e78491f2 --- /dev/null +++ b/Formula/p/pistache.rb @@ -0,0 +1,170 @@ +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" + + bottle do + 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..ae3d2009de9bf --- /dev/null +++ b/Formula/p/pit.rb @@ -0,0 +1,64 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "7c23637b9f925de09953cc5288e884ee9c08a5b62b2a16a3596cf6fcfc3c0677" + sha256 cellar: :any_skip_relocation, high_sierra: "0fcb58f56565c207f8030853336ba313d93ba9bd3f1c09480a0ad37de1d961f2" + sha256 cellar: :any_skip_relocation, sierra: "fd6ce87e3c42f5418c28e6a8a60184ac51b596bb59343de5523930980071103b" + sha256 cellar: :any_skip_relocation, el_capitan: "20064d0b1496360f820f55aae90b0e4adf00a70cb4f607668a6beadd0ae11c08" + 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..2d7eebdc710b2 --- /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: "master" + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, all: "3f3e1fff9df0dffb6684ab3c51f31f7d45fa3ae4be39e97f6695d5f4164494a2" + end + + depends_on "gnupg" + depends_on "python@3.13" + + 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..8c99b8ec6a3fd --- /dev/null +++ b/Formula/p/pivit.rb @@ -0,0 +1,35 @@ +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_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 + + on_linux do + depends_on "pkgconf" => :build + 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..052d2e1e83873 --- /dev/null +++ b/Formula/p/pivy.rb @@ -0,0 +1,54 @@ +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 + sha256 cellar: :any, arm64_sonoma: "8b87dac25665d8517854cb34f96c4e9237495781555a4eb8c8de59a1c6476037" + sha256 cellar: :any, arm64_ventura: "0378b486fef297474f82175e844633a21a00772f523acc0f84ccf97e368ce143" + sha256 cellar: :any, sonoma: "d9f23884af3e774e654ee22911feeed221e02f3d829f94d8f95582fb2997b9b1" + sha256 cellar: :any, ventura: "73bc75f176e815f882879135054ac7e018482292250f8101a9206b12156bb7f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0f07d2aca7c37e78d292ef734d91d07bd5fad4adf46359a0a86123fd82fabbd" + end + + depends_on "cmake" => :build + depends_on "swig" => :build + depends_on "coin3d" + depends_on "pyside" + depends_on "python@3.13" + depends_on "qt" + + 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..212910f426975 --- /dev/null +++ b/Formula/p/pixd.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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..ffdf952b9d947 --- /dev/null +++ b/Formula/p/pixi-pack.rb @@ -0,0 +1,68 @@ +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.6.4.tar.gz" + sha256 "f0f7c8afc6f8a15e714323e7e437a15b9e9130953670570359eef13a997d1bdd" + license "BSD-3-Clause" + head "https://github.com/quantco/pixi-pack.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d31fabaca7ad3e5ff43938eb6780118c3769f7f8da9b8ff77e9188840aca9c56" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a345181ec3f97f756b4011ca0a0426a61215d994b2d2ae86330ea5e9840f254a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d1ca47df2d8a8b82a014fba811e3275eb00559cbd533cec1577336a7aeaadcc1" + sha256 cellar: :any_skip_relocation, sonoma: "f978e42fe8dd18c7efb1a170bcbdbfce8768c1e62e96b327f048f80c9c91f29f" + sha256 cellar: :any_skip_relocation, ventura: "e7c414a0fb061b803fa709ab7ee8325d1bc25c6cab58b0396b4c7cdef1650a55" + sha256 cellar: :any_skip_relocation, arm64_linux: "67692fc93c9bc0e68d0fa2d792574992821c1dcbedf5eae664a470c44e31f531" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6af820f22d39ec80cd3a27099473eeafad8200fc6a5854f89c4c8040b5ccb943" + 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") + end + + test do + assert_equal "pixi-pack #{version}", shell_output("#{bin}/pixi-pack --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/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda + packages: + - conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda + sha256: afee721baa6d988e27fef1832f68d6f32ac8cc99cdf6015732224c2841a09cea + md5: c27d1c142233b5bc9ca570c6e2e0c244 + arch: x86_64 + platform: linux + license: ISC + size: 159003 + timestamp: 1725018903918 + YAML + + (testpath/"pixi.toml").write <<~TOML + [project] + name = "test" + version = "0.1.0" + TOML + + system bin/"pixi-pack", "pack", "--platform", "linux-64" + assert_path_exists testpath/"environment.tar" + end +end diff --git a/Formula/p/pixi.rb b/Formula/p/pixi.rb new file mode 100644 index 0000000000000..067f75eee9788 --- /dev/null +++ b/Formula/p/pixi.rb @@ -0,0 +1,56 @@ +class Pixi < Formula + desc "Package management made easy" + homepage "https://pixi.sh/" + url "https://github.com/prefix-dev/pixi/archive/refs/tags/v0.47.0.tar.gz" + sha256 "a1bdf15b861b63d2a7d12947980e415e35d6ae268194b4c09bb765a406fe0259" + 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_sequoia: "61fdae6bcf25d9d0f0dc4a115d1f318cb7797b6d076f9f56c9c5ce15e3b3a23d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fd6f42fc9aab2115fd0cc34aa50ac71149a74b469558ca192cd28be3cfe238dc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1ab7a204d1da6c9917f9b1b733222a1db66b7d92f12496f415786bb378888389" + sha256 cellar: :any_skip_relocation, sonoma: "dbc475fb568f7aec4d093616c882eacb2248eb7a951221e91239a98188812e76" + sha256 cellar: :any_skip_relocation, ventura: "729d89ffd6c09784b93fb9558553d420f4f1e70b0076addb416e6c8e199022b3" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad0d4dd9eeedb704bbffa7accd3ba5ef84df40a9bcf9a1ad71bfc5705a1d32ce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3bbcfe741234910c8a70674f3d8091610fbdbaf5e9a657a5be0b4281c022d4e5" + 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 + + generate_completions_from_executable(bin/"pixi", "completion", "-s") + end + + test do + 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..0e9f2399d660f --- /dev/null +++ b/Formula/p/pixie.rb @@ -0,0 +1,50 @@ +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_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..bd0a5a1c08920 --- /dev/null +++ b/Formula/p/pixiewps.rb @@ -0,0 +1,52 @@ +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" + + bottle do + 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..6a6b626d2973f --- /dev/null +++ b/Formula/p/pixman.rb @@ -0,0 +1,50 @@ +class Pixman < Formula + desc "Low-level library for pixel manipulation" + homepage "https://cairographics.org/" + url "https://cairographics.org/releases/pixman-0.46.0.tar.gz" + sha256 "02d9ff7b8458ef61731c3d355f854bbf461fd0a4d3563c51f1c1c7b00638050d" + 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 + sha256 cellar: :any, arm64_sequoia: "6d08a20cf16a9f69e925000085b4062501df3c8838b25284a7a5733608fd944a" + sha256 cellar: :any, arm64_sonoma: "bb33e3bd843674caaa950a8709d05642098e812eca15c31857a43433ed90ba25" + sha256 cellar: :any, arm64_ventura: "3d828f7c89d6c86df8e446f236491d601568b57b7a921c8638bc7b2a624c4d9d" + sha256 cellar: :any, sonoma: "c2d900dfd371707c26fd4cb0cc39d1cacecfad46996c7221a7cc076f187d3d5f" + sha256 cellar: :any, ventura: "ba2d352ce10d31e30df0f902a726e7b57937768844a75452f93cb7cc7b80649f" + sha256 cellar: :any_skip_relocation, arm64_linux: "41be5dc73da1641d3c1a717cf63080e5d905038afa6a0db9d672e5eb8a009595" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7db0ed1a87555ff2b1327d980ab335f6f1ee6c6008be640b16a3fe51b0b48ad2" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :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.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..f63b97b45b23c --- /dev/null +++ b/Formula/p/pixz.rb @@ -0,0 +1,49 @@ +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" + + bottle do + rebuild 1 + 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..fdac235897a61 --- /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_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 macos: :high_sierra # Uses Security framework API enum cases introduced in 10.13.4 + 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..7fcd195d6e671 --- /dev/null +++ b/Formula/p/pk.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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, mojave: "56a1d31b7c52fddecdd11dba3c394b91b38cdf91a9d294c24ae849fa7e27321a" + sha256 cellar: :any_skip_relocation, high_sierra: "12cc1f5a82f305734355bc527d6dc936039a86f0b8888d226d0b36a9400d234f" + sha256 cellar: :any_skip_relocation, sierra: "790f7e9670dcda15b7472264eea54666e7e34e8adb4343b3699ab87a60c9f3b1" + sha256 cellar: :any_skip_relocation, el_capitan: "74c7822b2e3a74bc657d5e8490f184af120eddf9230695fe26dbb075391e10e6" + 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..c0a130a445acc --- /dev/null +++ b/Formula/p/pkcs11-helper.rb @@ -0,0 +1,53 @@ +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 + + bottle do + 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..ba676578bdacc --- /dev/null +++ b/Formula/p/pkcs11-tools.rb @@ -0,0 +1,68 @@ +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" + + bottle do + 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..9fa8075764a84 --- /dev/null +++ b/Formula/p/pkg-config-wrapper.rb @@ -0,0 +1,33 @@ +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_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, 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..4e630e2ccf3ef --- /dev/null +++ b/Formula/p/pkgconf.rb @@ -0,0 +1,113 @@ +class Pkgconf < Formula + desc "Package compiler and linker metadata toolkit" + homepage "https://github.com/pkgconf/pkgconf" + url "https://distfiles.ariadne.space/pkgconf/pkgconf-2.4.3.tar.xz" + mirror "http://distfiles.ariadne.space/pkgconf/pkgconf-2.4.3.tar.xz" + sha256 "51203d99ed573fa7344bf07ca626f10c7cc094e0846ac4aa0023bd0c83c25a41" + license "ISC" + + livecheck do + url "https://distfiles.ariadne.space/pkgconf/" + regex(/href=.*?pkgconf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "3feba2e952500e4ab9261ac59a19e07c310d1147e31496f62b591e4b21b68683" + sha256 arm64_sonoma: "24e921aaf87bc253adf250761cb4bf717d14dec995d2f6302cf966f30f28fe59" + sha256 arm64_ventura: "2df66bd11baf8300451fb850f365c93e0a9cc47677887d1d0f2f575c148e4b52" + sha256 sequoia: "60803149fa486b8da14591ce5c016e37c9388c1ded2a88d9167a84926cc74957" + sha256 sonoma: "9f5e12ea8ab25db6afc5c09543d6840d72f6556b894d167ac79007e8f187feb0" + sha256 ventura: "3d7bbea2ca2d4d611c55dcd2d890628b2c4f45451fef6e39755f30acf1c4aeea" + sha256 arm64_linux: "6d8ad2faadd3f05fabbc70b12cf2cda9a4543fe7cb6d62bf6288db842461c57d" + sha256 x86_64_linux: "9177b7f842d88798bfd86929360ac3a412d3d7e0133f0e9b0dca0d5306c46dc1" + 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..e17854ad36cb8 --- /dev/null +++ b/Formula/p/pkgx.rb @@ -0,0 +1,41 @@ +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_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..ae988fa6e71e8 --- /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.3.2/pkl-lsp-0.3.2.jar" + sha256 "f374e5e2e8729a58243d7fa7a44994337b7228bf0e01554fe3f306ab7e20a16f" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "b967045ece7c18199320edb7ad50e29436ea3918eb6f06cf2d21bce8483a3141" + 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..b80d155421ac4 --- /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.28.2.tar.gz" + sha256 "b63a0c672a7b810daf4606d37dc18d37b012a0fc011df5c5c2c96d708227a18b" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c9f7f1777064b70061f7b7b8bdd1c493b034397af8d1728641e69f963bb03465" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8c21a4185136ae375d83cc589fa1be4626513e4fa0c97da3184ebc335f0e5fa6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "70d649fdc593bd1d7ce6dee2edf6e62366e4579675d5e450bd6d17222ec0667f" + sha256 cellar: :any_skip_relocation, sonoma: "511cecba0df4e994d99575832ddc03a1c388a82f32bcb119cb094996416b2e90" + sha256 cellar: :any_skip_relocation, ventura: "93c166e637de735ce561dece7bc33a32668edc667d15d5875173a62b476fa03e" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed219ebb3e536eb5406298c4e3149cca22ba23fe41279877ebfcd55401331c3d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e882f2790dc353736341ad0d08a6b006cf779bca81eb67ce3935f597c944e87c" + end + + depends_on "gradle" => :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 = "#{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" + 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..0e0fffed75d06 --- /dev/null +++ b/Formula/p/pktanon.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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..a3c7510436663 --- /dev/null +++ b/Formula/p/pla.rb @@ -0,0 +1,52 @@ +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" + + bottle do + 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, mojave: "f5199145d23f1b5c686958a7086b46ddbeb9e1b5041f456d94144cd4c7939821" + sha256 cellar: :any, high_sierra: "dd5b14bc8630dc3b16657e3e764b48cd9d851967daa1c7f039298bf4f2af7b78" + 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/planck.rb b/Formula/p/planck.rb new file mode 100644 index 0000000000000..766bcb84d41e2 --- /dev/null +++ b/Formula/p/planck.rb @@ -0,0 +1,98 @@ +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 + + bottle do + 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..e606f0c5cbc02 --- /dev/null +++ b/Formula/p/plank.rb @@ -0,0 +1,62 @@ +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 + + bottle do + 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, mojave: "04d2dddb094914fa219304fea8f6e5aa3315c2e51b63ef4077fcf25a54c8b268" + 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/formula-patches/65b5a59920d2e06d62ce7fa0a9d7a6fcc72aa23d/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..2274960980da1 --- /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.2/plantuml-1.2025.2.jar" + sha256 "862c7d6d0d3bde3c819eac4dfc03cf549046bf1d49c04d18a779eb2d834b77c9" + 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: "1846557e79667e79f2ad6e129c6931f731d696daef53f7ba23702497cfa433a1" + 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..0a5ffc19a8abe --- /dev/null +++ b/Formula/p/planus.rb @@ -0,0 +1,61 @@ +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.1.1.tar.gz" + sha256 "d79f5d9a1acfcadc86376537c297853dcd6f326016f8049c28df57bb4f39c957" + 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_sequoia: "d9dba48be6e547ba8587b1817226ca0ae1f55641cdc1d6f2dd9c41c9c8fb1903" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4cb483d4499fe5f26af67e782d259a6177668d94189c234f583a61d2191c41b5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "72c79d7843232d9129eb468d6754bb7c3f01743de385b026b83f83f815935199" + sha256 cellar: :any_skip_relocation, sonoma: "b447d497d16a77f75046ec5e21dfd4d460a89bfa80d59d7b66cfb78beff0c917" + sha256 cellar: :any_skip_relocation, ventura: "e211abbe537766952f09d5d299cb0e07bafe15d274756ed313416734aa1c2203" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba9ef40ac2f198d20d28af060fe9ba25e7a7e16aaac08a0b85a23ff1c362ae0b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "01b73a1936dac8940d36d78673f5cdd9d8643981b70eaa71afc2c38256904226" + 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..770ece7ba1d11 --- /dev/null +++ b/Formula/p/platformio.rb @@ -0,0 +1,134 @@ +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 1 + head "https://github.com/platformio/platformio-core.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, all: "965af2ec33c2097cf9d0a7d0e2b03c878cd95a4b19f542e390476b157ff2a040" + end + + depends_on "certifi" + depends_on "python@3.13" + + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "bottle" do + url "https://files.pythonhosted.org/packages/f5/3b/efa9540213c71be3500e14592c5823bd3f9ddd881d306e01b5dd490ddab5/bottle-0.13.3.tar.gz" + sha256 "1c23aeb30aa8a13f39c60c0da494530ddd5de3da235bc431b818a50d999de49f" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/a6/ae/9bbb19b9e1c450cf9ecaef06463e40234d98d95bf572fab11b4f19ae5ded/uvicorn-0.34.2.tar.gz" + sha256 "0e929828f6186353a80b58ea719861d2629d766293b6d19baf086ba31d4f3328" + 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", shells: [:fish, :zsh], 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/plenv.rb b/Formula/p/plenv.rb new file mode 100644 index 0000000000000..a6cf8ee5e532a --- /dev/null +++ b/Formula/p/plenv.rb @@ -0,0 +1,48 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ae1be5da65e151734516a4c61d65dcdf5c64895c6477a28bce5351888f57627" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f269a34269c43edc721fe59d7d6bed6740c27544de3b7936290a52644957d2da" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9b7e0d4973dfe5c197b36672d2d07f355d90b831b36189208c021770bfa1465d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9b7e0d4973dfe5c197b36672d2d07f355d90b831b36189208c021770bfa1465d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8003aaa1404beacb1ef33010bbf1ed82abb2436e9a3764a6d5f2cac83aa085ba" + sha256 cellar: :any_skip_relocation, sonoma: "b31005f49894bcd4160911f841489e89a44f7d4e6f610d96573c9e58d35d97fe" + sha256 cellar: :any_skip_relocation, ventura: "3cb9ef92ada0b01f97c1ccd746cd976673b8b21b0672995dbdf5fc0205aa0795" + sha256 cellar: :any_skip_relocation, monterey: "3cb9ef92ada0b01f97c1ccd746cd976673b8b21b0672995dbdf5fc0205aa0795" + sha256 cellar: :any_skip_relocation, big_sur: "ae532487be7748372f5e4af1f5f5543ea98c2821ae63a28b85fe5a47c17734a2" + sha256 cellar: :any_skip_relocation, catalina: "ae532487be7748372f5e4af1f5f5543ea98c2821ae63a28b85fe5a47c17734a2" + sha256 cellar: :any_skip_relocation, mojave: "ae532487be7748372f5e4af1f5f5543ea98c2821ae63a28b85fe5a47c17734a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b80e2706c6cc7af6ec145bb53a32deab34a91b0a9339ad8e16e4a6cbc7c0c40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6898b01d73122d18ac80e714614e566482fdc1b8055a3ef01cc11a3c9cde503c" + end + + depends_on "perl-build" + + 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 + 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..e37da32a125f7 --- /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, mojave: "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 + + 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..3b827ebfcf129 --- /dev/null +++ b/Formula/p/plog.rb @@ -0,0 +1,60 @@ +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.10.tar.gz" + sha256 "55a090fc2b46ab44d0dde562a91fe5fc15445a3caedfaedda89fe3925da4705a" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "97760bb532e44bf5f1d01856ec41448c1ba1f092b5abacaa5338c9a27be6567a" + 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.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..7d21aacd1eaa2 --- /dev/null +++ b/Formula/p/plotutils.rb @@ -0,0 +1,63 @@ +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" + license "GPL-3.0-or-later" + revision 1 + + bottle do + rebuild 1 + 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, mojave: "96a618ea8123f08d676b0db38c1c3b93dc8f707c742e97442b74650c2dd8e4c5" + sha256 cellar: :any, high_sierra: "00796c7f6aa36203eb0fd919ef4f096c6016d3c5973b2032328c95c87b354d92" + sha256 cellar: :any, sierra: "b63f4f051452f8fd9b5ddb50f9d574122c2277c9778e1a56c3f2d59e55c3da73" + sha256 cellar: :any, el_capitan: "b734cdcbc7ce11c4a716bc96ee7671f3883a5d41dadceac28d994ad2c20292f9" + 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..d67d69447cb43 --- /dev/null +++ b/Formula/p/plow.rb @@ -0,0 +1,32 @@ +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_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, 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..a03955d96aeb1 --- /dev/null +++ b/Formula/p/plowshare.rb @@ -0,0 +1,46 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "fb3eb1ea28870d541ff8ab28efc057f5cb653ba851a4b794319ff3b0bbf48446" + 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..ecab295ec5597 --- /dev/null +++ b/Formula/p/plplot.rb @@ -0,0 +1,79 @@ +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 + + bottle do + rebuild 1 + 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..114f940ca058c --- /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.21.6.tar.gz" + sha256 "a924d9e37b5d60564d06b7bf11feb78e9fec4a6c4261681583f1a8c42613598d" + license "Apache-2.0" + head "https://github.com/FairwindsOps/pluto.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8e67107a7d805fa5b9d3634e575a349b2e9b8354339b596a1534ecea846032e9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8e67107a7d805fa5b9d3634e575a349b2e9b8354339b596a1534ecea846032e9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8e67107a7d805fa5b9d3634e575a349b2e9b8354339b596a1534ecea846032e9" + sha256 cellar: :any_skip_relocation, sonoma: "86c69bdcf5d472f64e30949ce06b6fe313216a9eb0323aeb62a922e04f16befa" + sha256 cellar: :any_skip_relocation, ventura: "86c69bdcf5d472f64e30949ce06b6fe313216a9eb0323aeb62a922e04f16befa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c5c27f26c7ed7515650b3f0bc058fad12e916abe60eeaceccc84b7261019e0ae" + 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/plz-cli.rb b/Formula/p/plz-cli.rb new file mode 100644 index 0000000000000..b0b5791311c64 --- /dev/null +++ b/Formula/p/plz-cli.rb @@ -0,0 +1,31 @@ +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" + + bottle do + 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..871ffd36120ff --- /dev/null +++ b/Formula/p/plzip.rb @@ -0,0 +1,39 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "90e3cd08078f11ba7ceed4c93c1e0fdc788decf11d2d4d0855c52e803e3ade99" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c69f87f246b7b84977dd3690867ec9db32e05610a415d2fbe9a6be69ff4b63da" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bedd1525dd0a949b298fc354e05ce35f3c08bc9b8edb9778ccc9186e838d0624" + sha256 cellar: :any_skip_relocation, sonoma: "3a6fa3ffd911737b50041ffbede6cf6d39cf54608be10093c755b28dae1d7121" + sha256 cellar: :any_skip_relocation, ventura: "21bed828b80d4dd6b40a0e75b236996f334ab8b76f92155192b3ea984410df6e" + sha256 cellar: :any_skip_relocation, arm64_linux: "d600a14782d931755a8998785a5b284296bbee80a13f76ebfadbbf69c0cf9ddb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a35aab3bc41f9112cd01216df0902af5b126cdbe340c91396acdbf006506fe3d" + end + + depends_on "lzlib" + + 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/p/pmccabe.rb b/Formula/p/pmccabe.rb new file mode 100644 index 0000000000000..5c521de3b58ba --- /dev/null +++ b/Formula/p/pmccabe.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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..176c6db268ee1 --- /dev/null +++ b/Formula/p/pmd.rb @@ -0,0 +1,36 @@ +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.13.0/pmd-dist-7.13.0-bin.zip" + sha256 "8fdafc7ab40bf798d033861cecfd5d436c2d6ecb4149a8526ea82cdf75b0b256" + license "BSD-4-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b5817774e20b16c9d1e9d5daa027a44c2733425c30a806d7fe19f22f2518a213" + 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..a8052649e9c3a --- /dev/null +++ b/Formula/p/pmdmini.rb @@ -0,0 +1,85 @@ +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" + + bottle do + 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}", "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..961f40db236cd --- /dev/null +++ b/Formula/p/pmix.rb @@ -0,0 +1,84 @@ +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.8/pmix-5.0.8.tar.bz2" + sha256 "bf5f0a341d0ec7f465627a7570f4dcda3b931bc859256428a35f6c72f13462d0" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "a7d99c8e194b5a0191094bf5c301466aecf2cdddc4a30f82f49fe72eb8b61373" + sha256 arm64_sonoma: "d52b37238c114a79dc57612d0fb2217bdd6f37ac81a3c3836121377c341677b0" + sha256 arm64_ventura: "6151bd4898bad61e4f9a58ba50f8b10f3c211c71c1907bfd70c6721ce7e6bba7" + sha256 sonoma: "8eb6695bd7001e3d7dc6cc0a404e14592d5bb69ec9e29cebfa21d95972199896" + sha256 ventura: "fdeaf1f3920bb26ac0d4242ca443f5b07af478b6e7fb8b2de33b4d972401387e" + sha256 arm64_linux: "be81426a4e1b74b7c6cfd8b62eb05407731580fe470ffd0c7a10cda31491d091" + sha256 x86_64_linux: "3a4abb4032f58acdc7b067183ed6a8a8199e4482d72a9e5c536a079722c98f58" + 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..c039f9b676612 --- /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 + + bottle do + 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, mojave: "0c43ee20313b6616c6ececb9c906da12720b035862a894a3f9dd11984c640b30" + sha256 cellar: :any, high_sierra: "f01d2f4db91f6b6bcf35f86c7a0d2b0fbed17941d9556fe0ba71e855c7667638" + sha256 cellar: :any, sierra: "fa90afc92fc9d1e57a9a0a74dc63d3ec5ba92f1430caf5cad8fa54362b0da298" + 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..bd88a852a5d88 --- /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.0.tar.gz" + sha256 "fcfdfa4224e2186a1672abd19bbeaa34d72df336df0cb83e8c5934c2de8ec8a8" + license "BSD-3-Clause" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7845744525ceed9ee9987f1c5ed3fa25aabd5ce5388dbe9834c67b1393625d1c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7845744525ceed9ee9987f1c5ed3fa25aabd5ce5388dbe9834c67b1393625d1c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7845744525ceed9ee9987f1c5ed3fa25aabd5ce5388dbe9834c67b1393625d1c" + sha256 cellar: :any_skip_relocation, sonoma: "e1d5edb8edb69c777e0167bdab69af915f04f1374aeb5c3b165514f85ef1ab2d" + sha256 cellar: :any_skip_relocation, ventura: "e1d5edb8edb69c777e0167bdab69af915f04f1374aeb5c3b165514f85ef1ab2d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4fedf75ba18133f3e1f13830033f2934d507643e2b1d394cff04c366c6866fb" + 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..d9cdded95e45b --- /dev/null +++ b/Formula/p/pnetcdf.rb @@ -0,0 +1,86 @@ +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.0.tar.gz" + sha256 "e5a7e87dcf7d526b97e8ffdce05df0d2845965787a7d21242fafa9656950e402" + license "NetCDF" + + livecheck do + url "https://parallel-netcdf.github.io/wiki/Download.html" + regex(/href=.*?pnetcdf[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "19b8144af18eadad7d9d794d37864fa81c62e6907b5a118b9b14a8b27e4d30b0" + sha256 arm64_sonoma: "3385c56d53190c61d92bf85b9b3c7b92086c58b644bec5a8b66fdf4555a8ac66" + sha256 arm64_ventura: "360874963214b4e9b9338ee78448420a150b9cb00756ebb8d5df0b97ae359320" + sha256 sonoma: "a46e740e91a836a35faf7ef12039280dcf14cd35a908dc6d6f65d30202436d8f" + sha256 ventura: "1caabb8afcf508fc98e0afc9af8d1f449c9f61c49fc003b81c040ea75147fa4d" + sha256 x86_64_linux: "a94a617103f87b61c162f9bd9eeff3887a5e44c507406c662034231cfd38441e" + end + + depends_on "gcc" + depends_on "open-mpi" + + uses_from_macos "m4" => :build + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + # Work around asm incompatibility with new linker (FB13194320) + # https://github.com/Parallel-NetCDF/PnetCDF/issues/139 + ENV.append "LDFLAGS", "-Wl,-ld_classic" if DevelopmentTools.clang_build_version >= 1500 + + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--enable-shared" + + 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..73791a37c5020 --- /dev/null +++ b/Formula/p/png++.rb @@ -0,0 +1,50 @@ +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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "acf63a60a34fbd3c3491c29b7ea5081736b7ce316d6d27b7732313920f450701" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5eec08e707d28e9849abb32efc3d218abfb2ff953ee1e9ed6fe3790646713090" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7ede8356bf0fad95a8d5e0ff94f9e586bcca7ca67ef24097d50bb69e3bc20173" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7ede8356bf0fad95a8d5e0ff94f9e586bcca7ca67ef24097d50bb69e3bc20173" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "4ff35d41f1ad4d5cff20cc77fa72c905a6cab65f0102dfe898241082ffc53b24" + sha256 cellar: :any_skip_relocation, sonoma: "dec92097253de6c3aeaa2213cc13800294a76d97a82245bcea915d1963efac4f" + sha256 cellar: :any_skip_relocation, ventura: "49ec98d8aa47bff88e3572d13c1613d107a450dd60421e39102aa90d7e001608" + sha256 cellar: :any_skip_relocation, monterey: "49ec98d8aa47bff88e3572d13c1613d107a450dd60421e39102aa90d7e001608" + sha256 cellar: :any_skip_relocation, big_sur: "536874bdcfa9f6b546f8a924bf4b72b8b6beba84883e6ee93645080632b51a2e" + sha256 cellar: :any_skip_relocation, catalina: "c6377c5185e7ae53ff7ec9a133b8c12618a400f64d14b55ee751dc7c85cbc491" + sha256 cellar: :any_skip_relocation, mojave: "536f9c2dd05cfd2ae8a4f7f5d0c5c38575cf91609498f98bd6c3f97c4de2c520" + sha256 cellar: :any_skip_relocation, high_sierra: "536f9c2dd05cfd2ae8a4f7f5d0c5c38575cf91609498f98bd6c3f97c4de2c520" + sha256 cellar: :any_skip_relocation, sierra: "cee110f568bae723e8e5172e8bab36c8f4c5adb8bf339a444926a572bfa13f89" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ad881818b116ae124ab2f34ded71329044961ce3bcc58ad722fca0fc293d1ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ede8356bf0fad95a8d5e0ff94f9e586bcca7ca67ef24097d50bb69e3bc20173" + 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..a555f771db0a1 --- /dev/null +++ b/Formula/p/png2ico.rb @@ -0,0 +1,65 @@ +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" + license "GPL-2.0-only" + revision 1 + + livecheck do + url :homepage + regex(/href=.*?png2ico-src[._-]v?(\d+(?:[.-]\d+)+)\.t/i) + end + + bottle do + rebuild 2 + 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, mojave: "52180eb9b080ae4cfbe33f441e0119d2cbcd2654c2b7c7d1b37120912215df95" + sha256 cellar: :any, high_sierra: "986b5a9efe66ddeec63f2f523a36214f0bbf3ce43a9697c83adb3c237912f38b" + sha256 cellar: :any, sierra: "63d789e767bf5fdfd3b26102441a7331531d83215c73fa61ae2b548ecf08ea74" + sha256 cellar: :any, el_capitan: "6b3b8e132ff06ed21308e73e1a30a3b74a593092e56dc94693c27ae4d03add09" + 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..5cfbb1f50321c --- /dev/null +++ b/Formula/p/pngcheck.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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, mojave: "6423830817d3166ce48ea9cb88f3a83f1f7e381d8a1039c4db153e465450d5c5" + 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..6845fcdcd516d --- /dev/null +++ b/Formula/p/pngcrush.rb @@ -0,0 +1,58 @@ +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 + + bottle do + rebuild 1 + 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..faa31d52ab398 --- /dev/null +++ b/Formula/p/pngnq.rb @@ -0,0 +1,63 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "2287986066f131dbcac5ab97b033898a611b2b07348847ce5094f09bba06c7fa" + sha256 cellar: :any, high_sierra: "258abdbd2805617e3c36c0926b3168e0632d3eafacba9e9b63c8e35dee6c28f7" + sha256 cellar: :any, sierra: "0914104edfd7c6089ae4b053e5a57cf1b5a0d9bb476424ce654a923cafef651c" + sha256 cellar: :any, el_capitan: "dd6970fb9055fb1a6702c820e75a3d7b826e165e61c23c17b0845cca780c3da9" + 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..9e76593fd0340 --- /dev/null +++ b/Formula/p/pngpaste.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "b67e349eaa3680c7be1746511a8a934e04320182d9396e75ca1936398d746779" + sha256 cellar: :any_skip_relocation, high_sierra: "eed393d2dbd516f60bdaa445df330a140853bee95cd49b0c3730345f57136676" + 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..b7403d759c73a --- /dev/null +++ b/Formula/p/pngquant.rb @@ -0,0 +1,43 @@ +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_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..555a55d2f1199 --- /dev/null +++ b/Formula/p/pnpm.rb @@ -0,0 +1,52 @@ +class Pnpm < Formula + desc "Fast, disk space efficient package manager" + homepage "https://pnpm.io/" + url "https://registry.npmjs.org/pnpm/-/pnpm-10.11.0.tgz" + sha256 "a69e9cb077da419d47d18f1dd52e207245b29cac6e076acedbeb8be3b1a67bd7" + 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_sequoia: "991ed869cc2b766673e5cf015c60d4a7a02f15ab5cb5751080c9cbe19f6c05ba" + sha256 cellar: :any, arm64_sonoma: "991ed869cc2b766673e5cf015c60d4a7a02f15ab5cb5751080c9cbe19f6c05ba" + sha256 cellar: :any, arm64_ventura: "991ed869cc2b766673e5cf015c60d4a7a02f15ab5cb5751080c9cbe19f6c05ba" + sha256 cellar: :any, sonoma: "bb8ea180f59e9c1c54daa31fd13fdd25d1236440d6861af734214891f77dcc97" + sha256 cellar: :any, ventura: "bb8ea180f59e9c1c54daa31fd13fdd25d1236440d6861af734214891f77dcc97" + sha256 cellar: :any_skip_relocation, arm64_linux: "885044cafbac9751c1c356228f291f0004bc30947a223823b61e3cedc581c3e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "885044cafbac9751c1c356228f291f0004bc30947a223823b61e3cedc581c3e1" + 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..1e7498465f709 --- /dev/null +++ b/Formula/p/pnpm@8.rb @@ -0,0 +1,61 @@ +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" + + livecheck do + url "https://registry.npmjs.org/pnpm/latest-8" + strategy :json do |json| + json["version"] + end + end + + 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..643f1e93d9d1f --- /dev/null +++ b/Formula/p/pnpm@9.rb @@ -0,0 +1,56 @@ +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_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..9504ee023a86f --- /dev/null +++ b/Formula/p/po4a.rb @@ -0,0 +1,141 @@ +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.73.tar.gz" + sha256 "ad5edc38bf004807843622fddbf67bd5ac604fc16e14c2bfefa7b07718ad21f3" + license "GPL-2.0-or-later" + revision 1 + head "https://github.com/mquinson/po4a.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "afb479bc9624626a1f950a4f201fda2d5e959b59f414b0d87b6a6e8cc2baaae4" + sha256 cellar: :any, arm64_sonoma: "2d74dc1e677bfaf935771544981f7f44ffdd3b5f661e0df07748e5c71849420a" + sha256 cellar: :any, arm64_ventura: "7a4016850542e5ab42173906e8ed86d13fe971b7161103ca49abb787fbdad05c" + sha256 cellar: :any, sonoma: "aea5106a47029e857b9c5ec0ac0a87e87b4cf7843717251df7b41a0461b84a34" + sha256 cellar: :any, ventura: "b0c068aac3d53b27fde2125a35bc474b019e5fc3cee5102d1c2b0b3a32a708e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "c3a29385695c13c92d30a21e04f0b2c8c10e01bb3f22ddc55535e7498349b4da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c667b5f9d44d0d116b73b0524d100d362aa202a414c69ee6ce06f68ae9ae0f70" + 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.74.tar.gz" + sha256 "7b38ca9f5d3ce24230a6b8bdc1f47f5b2db348e7f7f9666c26f5955636e33d6c" + 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 "XS::Parse::Keyword::Builder" do + url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/XS-Parse-Keyword-0.42.tar.gz" + sha256 "7e498879e7813c9a7ecf4296c74774a32e40131e3a64efcc63c8010c0eb11382" + end + + resource "Syntax::Keyword::Try" do + url "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Syntax-Keyword-Try-0.29.tar.gz" + sha256 "cc320719d3608daa9514743a43dac2be99cb8ccd989b1fefa285290cb1d59d8f" + 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..c4808d7d9983e --- /dev/null +++ b/Formula/p/pocketbase.rb @@ -0,0 +1,47 @@ +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.28.1.tar.gz" + sha256 "27a162a62f547b786b12d16813948473c67da201df4d367982f4d7fc4bda6f4b" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2fa8308cf24cadfb6c185a18cfe318e2ca03fc7f46960606ef90a7d62c2fbaf5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2fa8308cf24cadfb6c185a18cfe318e2ca03fc7f46960606ef90a7d62c2fbaf5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2fa8308cf24cadfb6c185a18cfe318e2ca03fc7f46960606ef90a7d62c2fbaf5" + sha256 cellar: :any_skip_relocation, sonoma: "57ef31113ba7513a9ba22737c579e4dbd0d390a5e858172950c0f6ba3117f67f" + sha256 cellar: :any_skip_relocation, ventura: "57ef31113ba7513a9ba22737c579e4dbd0d390a5e858172950c0f6ba3117f67f" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e741fbb3e07adeb307aa6a0912575091166b8fd4957249872bc8108fcd1634c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ed0509aede1a79739508551e7871b0ca839e6d2f82f23c40c981d5d45e32d40" + 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..adbb41553fa14 --- /dev/null +++ b/Formula/p/pocl.rb @@ -0,0 +1,83 @@ +class Pocl < Formula + desc "Portable Computing Language" + homepage "https://portablecl.org/" + license "MIT" + revision 1 + + stable do + # TODO: Update to newer LLVM on next release + url "https://github.com/pocl/pocl/archive/refs/tags/v6.0.tar.gz" + sha256 "de9710223fc1855f833dbbf42ea2681e06aa8ec0464f0201104dc80a74dfd1f2" + + depends_on "llvm@18" # LLVM 19: https://github.com/pocl/pocl/commit/802d347bd09921d5e6333ad9dd2c99c35004f398 + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "37c8ffad1dc251ad96358273fa375ee12c54f760c422545aeb6ca8d2e7f64345" + sha256 arm64_sonoma: "bf1d743d75558e518e6bf58c9b1414259ba4c715429d99fb4d5aa18ebe1f01d5" + sha256 arm64_ventura: "d267fbd4dd48b16abaa5d8d7ae1d321848f48bf029bdc2850a7236f94fb576b5" + sha256 sonoma: "8e04092d421186a60170dadaa223f2bbe3b58702a3d1b7188a38b85635cf643b" + sha256 ventura: "f5b3f006dabc0dedeb515e70a641938917550889cdfc1bbdb1671b24bc9b4a05" + sha256 arm64_linux: "47a27c76f96b16002f643678deaf229eb13b6fdc7c1b942c2bda0be9d5bbccb8" + sha256 x86_64_linux: "5eb94f47dc4e2c6a34259afa0fb0ac297ee9b985c1934f8fc3e25d48ce009b14" + end + + head do + url "https://github.com/pocl/pocl.git", branch: "main" + + depends_on "llvm" + end + + depends_on "cmake" => :build + depends_on "opencl-headers" => :build + depends_on "pkgconf" => :build + depends_on "hwloc" + 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 + -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} + ] + # Avoid installing another copy of OpenCL headers on macOS + args << "-DOPENCL_H=#{Formula["opencl-headers"].opt_include}/CL/opencl.h" if OS.mac? + # Only x86_64 supports "distro" which allows runtime detection of SSE/AVX + args << "-DKERNELLIB_HOST_CPU_VARIANTS=distro" if Hardware::CPU.intel? + + 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..8fd61746bd6b5 --- /dev/null +++ b/Formula/p/poco.rb @@ -0,0 +1,49 @@ +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_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..2b7c6dc0ae7c7 --- /dev/null +++ b/Formula/p/pocsuite3.rb @@ -0,0 +1,161 @@ +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" + head "https://github.com/knownsec/pocsuite3.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6fcd0d853a1ebac12792c165de9f44d70b817ebb9daa50f2a54dac46d1144d1c" + sha256 cellar: :any, arm64_sonoma: "1bb0ed43b2e6fb1cb4d7151cf565025cb522538279397685b6deb04fd6f6f3d3" + sha256 cellar: :any, arm64_ventura: "1024b8dd052d7fe620044a0b586b68d30b9a47458befc5505fabc3763ef0b781" + sha256 cellar: :any, sonoma: "8ff6c043f358751b8ec87f4e31e809e2d327c8106d1af9902300467ebb1b23ee" + sha256 cellar: :any, ventura: "d28d2d073a6750baab12d7c6634ab49414285ff0514431fbdd03be91b92c1ada" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce20d9a3bde0fcfe61f007f09c4bbbfa53264182dc810ca4d9759ab1c0e82cd4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac20fffbe19b7f2cc52fe4f16c89dd193023686dc2857957720816bb8d81486c" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libffi" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + on_linux do + depends_on "pkgconf" => :build + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/55/8f/40d002bed58bd6b79bf970505582b769fc975afcacc62c2fe1518d5729c2/faker-36.1.1.tar.gz" + sha256 "7cb2bbd4c8f040e4a340ae4019e9a48b6cf1db6a71bda4e5a61d8d13b7bef28d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "jq" do + url "https://files.pythonhosted.org/packages/ba/32/3eaca3ac81c804d6849da2e9f536ac200f4ad46a696890854c1f73b2f749/jq-1.8.0.tar.gz" + sha256 "53141eebca4bf8b4f2da5e44271a8a3694220dfd22d2b4b2cfb4816b2b6c9057" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/ef/f6/c15ca8e5646e937c148e147244817672cf920b56ac0bf2cc1512ae674be8/lxml-5.3.1.tar.gz" + sha256 "106b7b5d2977b339f1e97efe2778e2ab20e99994cbb0ec5e55771ed0795920c8" + end + + resource "mmh3" do + url "https://files.pythonhosted.org/packages/47/1b/1fc6888c74cbd8abad1292dde2ddfcf8fc059e114c97dd6bf16d12f36293/mmh3-5.1.0.tar.gz" + sha256 "136e1e670500f177f49ec106a4ebf0adf20d18d96990cc36ea492c651d2b406c" + 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/38/95/78080e58efbdde46cda8d4498737bf9687839ed4a9744b068cc730a073ed/prettytable-3.15.1.tar.gz" + sha256 "f0edb38060cb9161b2417939bfd5cd9877da73388fb19d1e8bf7987e8558896e" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/11/dc/e66551683ade663b5f07d7b3bc46434bf703491dbd22ee12d1f979ca828f/pycryptodomex-3.21.0.tar.gz" + sha256 "222d0bd05381dd25c32dd6065c071ebf084212ab79bab4599ba9e6a3e0009e6c" + end + + resource "pyopenssl" do + url "https://files.pythonhosted.org/packages/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + 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/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-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/37/72/88311445fd44c455c7d553e61f95412cf89054308a1aa2434ab835075fc5/termcolor-2.5.0.tar.gz" + sha256 "998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/43/0f/fa4723f22942480be4ca9527bbde8d43f6c3f2fe8412f00e7f5f6746bc8b/tzdata-2025.1.tar.gz" + sha256 "24894909e88cdb28bd1636c6887801df64cb485bd593f2fd83ef29075a81d694" + 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/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..d51d8cd01a4c0 --- /dev/null +++ b/Formula/p/pod2man.rb @@ -0,0 +1,53 @@ +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_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 "perl ships with pod2man" + + 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/podiff.rb b/Formula/p/podiff.rb new file mode 100644 index 0000000000000..6e27c6b2df627 --- /dev/null +++ b/Formula/p/podiff.rb @@ -0,0 +1,53 @@ +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 + + bottle do + 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..b6a6d5e610216 --- /dev/null +++ b/Formula/p/podlet.rb @@ -0,0 +1,36 @@ +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_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..0b0e4a262f08d --- /dev/null +++ b/Formula/p/podman-compose.rb @@ -0,0 +1,60 @@ +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/a8/e7/0d23c675128a53bc220c296e6abdcbda872dd1fef48d4513f351f4031d24/podman_compose-1.3.0.tar.gz" + sha256 "e65a70e8fa26bd195d2017ac5893149b40c0df5a0c20d480a338c4f60218b1fa" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e9a57d22695b12c676270eac773014f29b71915dc86c54b2fdb7fa04ea1a784e" + sha256 cellar: :any, arm64_sonoma: "f04f6a13dc14bce1bd009a15b2a1a5c87b38b2d76040c1ed5eba2a8ce40bc8ff" + sha256 cellar: :any, arm64_ventura: "096c98f916a1fb28cc5fa2bd80c26a05afdb9a4bab6dfafeb8060957c7180281" + sha256 cellar: :any, sonoma: "3da16d68c06a2cd8020cbd587e794b5310ae8c6e8c4a7583e0a08d68d1d8287a" + sha256 cellar: :any, ventura: "49ebdb098d3af1a52d20aa9fbf0e9c4cfe85e2936a5e95b35a29696142bf2305" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f5b61059e28b5bcfb7b04605cb01dcb8e6441025baeccfa88bb7a69234ce40b" + end + + depends_on "libyaml" + depends_on "podman" + depends_on "python@3.13" + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/bc/57/e84d88dfe0aec03b7a2d4327012c1627ab5f03652216c63d49846d7a6c58/python-dotenv-1.0.1.tar.gz" + sha256 "e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca" + end + + 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 + 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..af58b5e267452 --- /dev/null +++ b/Formula/p/podman-tui.rb @@ -0,0 +1,48 @@ +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.5.0.tar.gz" + sha256 "d9ba16d37f959d7ae5ca6650c3ccc7b0e1a726215791c99604f8f5955ee8f61d" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6373d0a136f4711366640206e349fe97c42901a443405d8da56132878ebd7b4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "447fa401d2369f4db5988c3910c9066ffc6a82787a24c1f9ee6a4f51c59b13fd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e5797f063a42c71149249dfa692825479024b0cdc1d2258590866a505a3d428b" + sha256 cellar: :any_skip_relocation, sonoma: "bd7caa45fbbf484b796118e46f372ac401edbed58099cdb78b89017659d5d804" + sha256 cellar: :any_skip_relocation, ventura: "20181373cdee7592badce91436a5c476ba041c5c8e1532ed3f51d965c392cd21" + sha256 cellar: :any_skip_relocation, arm64_linux: "680ba3c02fc1085a06b1f60d28e494b963fe7b50407da7005f25f7569b9cc699" + sha256 cellar: :any_skip_relocation, x86_64_linux: "430de3be21283d8c8b4b5ac63f04271cb497dbbe09c4bebfdb37b52f8b46d3f5" + end + + depends_on "go" => :build + + def install + if OS.mac? + system "make", "binary-darwin" + bin.install "bin/darwin/podman-tui" => "podman-tui" + else + system "make", "binary" + bin.install "bin/podman-tui" => "podman-tui" + end + 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..4caf7348fc09e --- /dev/null +++ b/Formula/p/podman.rb @@ -0,0 +1,228 @@ +class Podman < Formula + desc "Tool for managing OCI containers and pods" + homepage "https://podman.io/" + license all_of: ["Apache-2.0", "GPL-3.0-or-later"] + head "https://github.com/containers/podman.git", branch: "main" + + stable do + url "https://github.com/containers/podman/archive/refs/tags/v5.5.0.tar.gz" + sha256 "a4abfc72ef9a59ba80d081ea604ad2976ff967ae526e50e234edc1d2481bd9d1" + + # build patch for go1.24.3, upstream pr ref, https://github.com/containers/podman/pull/26137 + patch do + url "https://github.com/containers/podman/commit/db65baaa215b68d73996ca17dd8c596901ab8bdb.patch?full_index=1" + sha256 "b9e8ca69b6c9d4bf99307f0afca96c4c9c6d39674628d88358e5df56b1cac839" + end + end + + # 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_sequoia: "8326e41b43e41f71fa6cf9c32197bd6326249edb1abe5d56f182c5a4ae5491ea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe77f82f04ef18c3a3ad6457340e8bbc1451467c0babc7a27ebed477ab3a7efd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "184ef91d1d9262339e77cbf68af5230b2d4e3fa2c02919eea92ece9e69429fc2" + sha256 cellar: :any_skip_relocation, sonoma: "56c83d6ce5ee4811cb81388fb1d98b561a7384a72d4fef58180d1ba5ba0101ec" + sha256 cellar: :any_skip_relocation, ventura: "c03c4bda67fda6af378728aa48cfc5b54627a8462b79c6a0ec917f0f708a3702" + sha256 x86_64_linux: "41451408fa6ba525f18d8389aef3a4f174a6cddd9c1891ed3e20a065374d0db7" + 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 "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.6.tar.gz" + sha256 "eb08309d452823ca7e309da2f58c031bb42bb1b1f2f0bf09ca98b299e326b215" + 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.15.0.tar.gz" + sha256 "efda776e538ce33050b1f6ce58c5070efeb45653d48fe4d17a47524c8fc17cf1" + end + end + + resource "aardvark-dns" do + on_linux do + url "https://github.com/containers/aardvark-dns/archive/refs/tags/v1.15.0.tar.gz" + sha256 "4ecc3996eeb8c579fbfe50901a2d73662441730ca4101e88983751a96b9fc010" + 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" + + 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..90528c0177c67 --- /dev/null +++ b/Formula/p/podofo.rb @@ -0,0 +1,57 @@ +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/0.10.4.tar.gz" + sha256 "6b1b13cdfb2ba5e8bbc549df507023dd4873bc946211bc6942183b8496986904" + 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_sequoia: "7c435c43229584af3a6dacf57822271969610de7507f61397b457afb83145d13" + sha256 cellar: :any, arm64_sonoma: "021956f2a96a9661ce424e048a17c70f4e01a117eccdcf161e8d770122ec5fdf" + sha256 cellar: :any, arm64_ventura: "6efa2ab68a3d25d65c43adf0ff70d5ecfd3c2d2c132f7ab491225842992335a7" + sha256 cellar: :any, sonoma: "5de8cfae5cf79354203b9a6a4138d0aeee038feb186430f9d2bc1a3b94329d75" + sha256 cellar: :any, ventura: "8d58c3e164bce391cf4fe8ad987b2d81a79bf2f4f40dde4f0c9b1137ebaa9a4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f46f50ea998e67693cbb46550684b3845902f6c985765ade57e21e207173f45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b850c51ef8df89ab04d0c37364bf7e20a91d7f30c7be86c474141be7add8be52" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + + depends_on "fontconfig" + depends_on "freetype" + depends_on "jpeg-turbo" + depends_on "libidn" + depends_on "libpng" + depends_on "libtiff" + depends_on "openssl@3" + + uses_from_macos "libxml2" + uses_from_macos "zlib" + + def install + args = %W[ + -DCMAKE_INSTALL_NAME_DIR=#{opt_lib} + -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON + -DCMAKE_DISABLE_FIND_PACKAGE_CppUnit=ON + -DCMAKE_DISABLE_FIND_PACKAGE_LUA=ON + -DPODOFO_BUILD_TOOLS=TRUE + -DFREETYPE_INCLUDE_DIR_FT2BUILD=#{Formula["freetype"].opt_include}/freetype2 + -DFREETYPE_INCLUDE_DIR_FTHEADER=#{Formula["freetype"].opt_include}/freetype2/config/ + ] + 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..02bd0c60b9cf5 --- /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.7.0.tar.gz" + sha256 "9852b5ef187f31f281c7968c644202770fb8f6f1b8bf5c91d811d486cac54a34" + license "MIT" + head "https://github.com/mxpv/podsync.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "20be398a640998d4759372f56a4fd365e79eea1ca785366bd863700915177ca8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e01a9ac695520eec8a398618bc9b5eab8577e3bcbeee146e9c3f8f5ffdaaebe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d1eda2a20fd3c5697c4cce16248960e105b36603e6e5d838156bd5f9b47e3784" + sha256 cellar: :any_skip_relocation, arm64_monterey: "8d61e7e03d5b60ea673f3065870229d9359eb2b6ac0ed5e4ea98a6da86ed0547" + sha256 cellar: :any_skip_relocation, sonoma: "602bba68f7ecc9dcfa776a522c80a64bf63df21efbf2a794f377789887d1efbe" + sha256 cellar: :any_skip_relocation, ventura: "5a0792de081350d678e627f2a6557e0c82bfd4d1a02588ea9d88c8dc062159f3" + sha256 cellar: :any_skip_relocation, monterey: "b68c090c3038e2b6497030fa3f9412aad1aaa22deee3fed78d1d0c5af1b7a7db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "21dd15567642059e94a37909abcb9492bb2e7c524e00f33f6f4a1a5b7acb1279" + 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 1 + + 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..eafc4c48d8dd2 --- /dev/null +++ b/Formula/p/poetry.rb @@ -0,0 +1,274 @@ +class Poetry < Formula + include Language::Python::Virtualenv + + desc "Python package management tool" + homepage "https://python-poetry.org/" + url "https://files.pythonhosted.org/packages/db/12/1c8d8b2c6017a33a9c9c708c6d2bb883af7f447520a466dc21d2c74ecfe1/poetry-2.1.3.tar.gz" + sha256 "f2c9bd6790b19475976d88ea4553bcc3533c0dc73f740edc4fffe9e2add50594" + license "MIT" + head "https://github.com/python-poetry/poetry.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4476e2b7ff814bf9cbc260e6ec940ca4aaff3cdc69de7324024cbbc7433ef715" + sha256 cellar: :any, arm64_sonoma: "6a8750d139660fce7b84de370f8e2841f4f4d6f62e2409b7288df0abd5834e8a" + sha256 cellar: :any, arm64_ventura: "6609da248aa4a8e31c626729c164f03bad50b7635f0a0f1034bb59a46af5e31a" + sha256 cellar: :any, sonoma: "53b28f73d32d7b9bc74d2d7558a1a9e02d6e5c5e32d538398d24001053dadbff" + sha256 cellar: :any, ventura: "f7b4144c519f655cda720b66f533c061fba2d5dbc83570070a94742f371ad994" + sha256 cellar: :any_skip_relocation, arm64_linux: "74c11f90bf3f210708ae0cb9f4c37c29e4a3ef45b61e3346283902b6dbd88cc3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9153007f80c9621afd275fe6bf06a8549f92e346cab56751044a63968f837865" + 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.13" + depends_on "zstd" + + uses_from_macos "libffi" + + on_linux do + depends_on "cryptography" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "build" do + url "https://files.pythonhosted.org/packages/7d/46/aeab111f8e06793e4f0e421fcad593d547fb8313b50990f31681ee2fb1ad/build-1.2.2.post1.tar.gz" + sha256 "b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7" + 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/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + 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/0d/dd/1bec4c5ddb504ca60fc29472f3d27e8d4da1257a854e1d96742f15c1d02d/distlib-0.3.9.tar.gz" + sha256 "a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403" + end + + resource "dulwich" do + url "https://files.pythonhosted.org/packages/d4/8b/0f2de00c0c0d5881dc39be147ec2918725fb3628deeeb1f27d1c6cf6d9f4/dulwich-0.22.8.tar.gz" + sha256 "701547310415de300269331abe29cb5717aa1ea377af826bf513d0adfb1c209b" + end + + resource "fastjsonschema" do + url "https://files.pythonhosted.org/packages/8b/50/4b769ce1ac4071a1ef6d86b1a3fb56cdc3a37615e8c5519e1af96cdac366/fastjsonschema-2.21.1.tar.gz" + sha256 "794d4f0a58f848961ba16af7b9c85a3e88cd360df008c59aac6fc5ae9323b5d4" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + end + + resource "findpython" do + url "https://files.pythonhosted.org/packages/2d/73/ab2c4fb7972145c1595c07837cffc1456c1510a908f5c8bda9745930ee60/findpython-0.6.3.tar.gz" + sha256 "5863ea55556d8aadc693481a14ac4f3624952719efc1c5591abb0b4a9e965c94" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + 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/ce/a0/834b0cebabbfc7e311f30b46c8188790a37f89fc8d756660346fe5abfd09/more_itertools-10.7.0.tar.gz" + sha256 "9fddd5403be01a94b204faadcff459ec3568cf110265d3c54323e1e866ad29d3" + end + + resource "msgpack" do + url "https://files.pythonhosted.org/packages/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz" + sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e" + 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/b9/f4/f60628d7424c7d7461c97317b642c48c3e21e9e09025f96179f9df61710f/pbs_installer-2025.4.9.tar.gz" + sha256 "15755bc94769a544af5dda155f973c70caf76f0e70b21f3c8a8ed506f102f88f" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "poetry-core" do + url "https://files.pythonhosted.org/packages/44/ca/c2d21635a4525d427ae969d4cde155fb055c3b5d0bc4199b6de35bb6a826/poetry_core-2.1.3.tar.gz" + sha256 "0522a015477ed622c89aad56a477a57813cace0c8e7ff2a2906b7ef4a2e296a4" + 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/f6/6895abc3a3d056b9698da3199b04c0e56226d530ae44a470edabf8b664f0/rapidfuzz-3.13.0.tar.gz" + sha256 "d2eaf3839e52cbcc0accbe9817a67b4b0fcf70aaeb229cfddc1c28061f9ce5d8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz" + sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77" + 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/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + resource "trove-classifiers" do + url "https://files.pythonhosted.org/packages/dc/81/a43db75173e49b1204d2a826b2a3a0e2dee45fb0d9abfac2ce1ff928eebf/trove_classifiers-2025.5.1.12.tar.gz" + sha256 "28d24c3d043dc6b0459813d6bf4a231e788509b55ee3d54ba08ce72638031182" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/38/e0/633e369b91bbc664df47dcb5454b6c7cf441e8f5b9d0c250ce9f0546401e/virtualenv-20.30.0.tar.gz" + sha256 "800863162bcaa5450a6e4d721049730e7f2dae07720e0902b0e4040bd6f9ada8" + end + + resource "xattr" do + url "https://files.pythonhosted.org/packages/62/bf/8b98081f9f8fd56d67b9478ff1e0f8c337cde08bcb92f0d592f0a7958983/xattr-1.1.4.tar.gz" + sha256 "b7b02ecb2270da5b7e7deaeea8f8b528c17368401c2b9d5f63e91f545b45d372" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/ed/f6/2ac0287b442160a89d726b17a9184a4c615bb5237db763791a7fd16d9df1/zstandard-0.23.0.tar.gz" + sha256 "b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + 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..c263ebe11a161 --- /dev/null +++ b/Formula/p/poke.rb @@ -0,0 +1,48 @@ +class Poke < Formula + desc "Extensible editor for structured binary data" + homepage "https://jemarch.net/poke" + url "https://ftp.gnu.org/gnu/poke/poke-4.3.tar.gz" + sha256 "a84cb9175d50d45a411f2481fd0662b83cb32ce517316b889cfb570819579373" + license "GPL-3.0-or-later" + + bottle do + 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..2c85109ae7bfa --- /dev/null +++ b/Formula/p/pokerstove.rb @@ -0,0 +1,38 @@ +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 5 + + bottle do + sha256 cellar: :any, arm64_sequoia: "1e01296c7643407ad16a6b088f9d332fd2af4afa1ef32f73b373899aae59ea19" + sha256 cellar: :any, arm64_sonoma: "9ee487daa2e45f4b5be25714ddda3f282ebde3926652c9d50b90dc52399c0291" + sha256 cellar: :any, arm64_ventura: "5a06bb9fbeb33f3506aec1c7271e650b127938b71638a94a3552c2f0050ee620" + sha256 cellar: :any, sonoma: "3141d03acae5a77b360906f91d59b017852f17e4d05e99444fbecedd5f9a0f67" + sha256 cellar: :any, ventura: "0895e6cacc2202f228f0b5da270fe46df7d1aa622c5233ac36778c9575b39e12" + sha256 cellar: :any_skip_relocation, arm64_linux: "4943f804a65e9d0a872a0f0ae086f509090fa295b989a6f5cefba4f4578fc533" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e6a4cce5e269cb4f965d3cd32db88e2e44ce5b0ba94d7b7f1badd7156e969312" + 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/policy-engine.rb b/Formula/p/policy-engine.rb new file mode 100644 index 0000000000000..c95e196c5ddd2 --- /dev/null +++ b/Formula/p/policy-engine.rb @@ -0,0 +1,45 @@ +class PolicyEngine < Formula + desc "Unified Policy Engine" + homepage "https://github.com/snyk/policy-engine" + url "https://github.com/snyk/policy-engine/archive/refs/tags/v0.33.3.tar.gz" + sha256 "79504bdabad8338215ddb8bd79980a760f5f913226422fc7fa551a4bac15c5f6" + license "Apache-2.0" + head "https://github.com/snyk/policy-engine.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "004a49eb32e9601864fa2abe9c9b24b583d33b6d312a48410a4700bf8e0f879f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "004a49eb32e9601864fa2abe9c9b24b583d33b6d312a48410a4700bf8e0f879f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "004a49eb32e9601864fa2abe9c9b24b583d33b6d312a48410a4700bf8e0f879f" + sha256 cellar: :any_skip_relocation, sonoma: "d25b892684455ac1aac97f56b0eb41bf1086dc61aa9c840c3a0ce3bc6192fef6" + sha256 cellar: :any_skip_relocation, ventura: "d25b892684455ac1aac97f56b0eb41bf1086dc61aa9c840c3a0ce3bc6192fef6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f117fbb9c6c7a90dd188f198efebbd9f03b2e0e00a11d01a9eab3ddea703d29a" + 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..7f489e1a15eb6 --- /dev/null +++ b/Formula/p/policy_sentry.rb @@ -0,0 +1,91 @@ +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/bc/4b/e03bbe626379bfee06c944a01ef25ad14ce30bc9dd86988dfda1cf343347/policy_sentry-0.14.0.tar.gz" + sha256 "5c52cebebad26e2360393f34af523c1685541d67b0dfd721b0779dbe9e327f1a" + license "MIT" + head "https://github.com/salesforce/policy_sentry.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "860c76164176b1eeff4f588f406f401dde52783bd361ba984510b6ce91f0b5a8" + sha256 cellar: :any, arm64_sonoma: "3555491fe5d02633cf2a50f65547fc2fb80525c56a3ef99a95d626832a6cb6f8" + sha256 cellar: :any, arm64_ventura: "aaa2e1c8171a28f5d2f86cb44d7c040edcfc7902da1f7e089aaeeb47829e12e2" + sha256 cellar: :any, sonoma: "bcca67ecf36d4e7fbac2f7e820d8200cb51530e3e40c0f13fff17b96d31d232a" + sha256 cellar: :any, ventura: "9242e399c04dc2bdd00852dc63f5310ef080a7cb43b25f5f2783754a770be818" + sha256 cellar: :any_skip_relocation, arm64_linux: "c392a8829cfe475ad49180103fec41f2c113845605080cc2de5fa4c2b13d044b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7c73b7b5dea54f6d5e0902da6190458092be9a7e5652d76baf2c9fe654e76417" + end + + depends_on "rust" => :build # for orjson + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/b3/ca/824b1195773ce6166d388573fc106ce56d4a805bd7427b624e063596ec58/beautifulsoup4-4.12.3.tar.gz" + sha256 "74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/45/0b/8c7eaf1e2152f1e0fb28ae7b22e2b35a6b1992953a1ebe0371ba4d41d3ad/orjson-3.10.13.tar.gz" + sha256 "eb9bfb14ab8f68d9d9492d4817ae497788a15fd7da72e14dfabc289c3bb088ec" + 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 "schema" do + url "https://files.pythonhosted.org/packages/d4/01/0ea2e66bad2f13271e93b729c653747614784d3ebde219679e41ccdceecd/schema-0.7.7.tar.gz" + sha256 "7da553abd2958a19dc2547c388cde53398b39196175a9be59ea1caf5ab0a1807" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"policy_sentry", shells: [:fish, :zsh], 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..6f99b7a8d950f --- /dev/null +++ b/Formula/p/polkit.rb @@ -0,0 +1,76 @@ +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_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..67502624e49f6 --- /dev/null +++ b/Formula/p/polyglot.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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, mojave: "8427c9bc2e5ca5137ee27ce8f6fc5f74cf0c216519ec20a66270fdff8547fb33" + sha256 cellar: :any_skip_relocation, high_sierra: "7192204bd2c30b3d2d3eb482678c76e0c6069e7bb931864a26728f961116982f" + sha256 cellar: :any_skip_relocation, sierra: "de7a79cd7b59fb412b245a50c601ec0546da345f5901b2bec260fba86fc27ce9" + sha256 cellar: :any_skip_relocation, el_capitan: "36d5170db384175c1f6f097f6d179243d265c3a06dcf34a11266cbd370be5aad" + 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..1877b57eb9a31 --- /dev/null +++ b/Formula/p/polyml.rb @@ -0,0 +1,64 @@ +class Polyml < Formula + desc "Standard ML implementation" + homepage "https://www.polyml.org/" + url "https://github.com/polyml/polyml/archive/refs/tags/v5.9.1.tar.gz" + sha256 "52f56a57a4f308f79446d479e744312195b298aa65181893bce2dfc023a3663c" + license "LGPL-2.1-or-later" + head "https://github.com/polyml/polyml.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "956ba9b862e294bd6ebd6efb29ab46446bbcf9d29c09dcbab2003d4ba76bc4eb" + sha256 arm64_sonoma: "8da7733920403e84fc73e04e2ba73e163630f063daf01d325f777c21ef2faf4c" + sha256 arm64_ventura: "e747d6bb96b8aaa374e27d1bb85cfa599f136ab1cfeecbdfffecc01e9dd0326f" + sha256 arm64_monterey: "92714106cbec11b63c34e38e358e9df4702ba7db81142fc8b6ba80d6e8f36c64" + sha256 sonoma: "09a1a0630dadbaca774010a8bf8a017025aeea595f3bf2f1cafbe4a9bdc55431" + sha256 ventura: "08a8aea9356cf8fbc35a863668dd554ba4f7196176969f9a95e8217279747e7b" + sha256 monterey: "9a8ef34cc09cbbd5871f0de8167a63aa80e7ac476f3169e6c2726b28ef5b9db2" + sha256 arm64_linux: "c17c19d56fb21ebd5df29726c787d7a53deeee0206a79d2dc20a297dd6f77458" + sha256 x86_64_linux: "2c629afd3ff1ad92cdbc78d7b3f638747e4851f8011e1393498aada95c3f452b" + end + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + # Use ld_classic to work around 'ld: LINKEDIT overlap of start of LINKEDIT and symbol table' + # Issue ref: https://github.com/polyml/polyml/issues/194 + ENV.append "LDFLAGS", "-Wl,-ld_classic" if DevelopmentTools.clang_build_version >= 1500 + + args = ["--disable-silent-rules"] + # Disable native code generation on CI ARM macOS to work around: + # Bus error: 10 ./polyimport ./bootstrap/bootstrap64.txt -I . < ./bootstrap/Stage1.sml + # Issue ref: https://github.com/polyml/polyml/issues/199 + args << "--disable-native-codegeneration" if ENV["HOMEBREW_GITHUB_ACTIONS"] && OS.mac? && Hardware::CPU.arm? + + system "./configure", *args, *std_configure_args + system "make" + system "make", "install" + end + + def caveats + on_macos do + on_arm do + <<~EOS + The `polyml` bottle was built with native code generator disabled due to + the build failure seen in https://github.com/polyml/polyml/issues/199. + EOS + end + end + 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..918bf9229d0a3 --- /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 + sha256 cellar: :any, arm64_sequoia: "9b2efac6f87a4b3c29b2d12a93fffa42f2198d8836ef438ef1e56e40332601f2" + sha256 cellar: :any, arm64_sonoma: "70cfaab129c7d151d28295af6ed37ce251b2a37b619cde49ec20b5325309226b" + sha256 cellar: :any, arm64_ventura: "b7d8fe06b593b1b8ee381b6b28d64a6202db69ddb988ac46fef84886bfac5725" + sha256 cellar: :any, sonoma: "07716c02135db664f847fbb3c85676582729d19218ab3bbef44a0f6903debf52" + sha256 cellar: :any, ventura: "3364fdd8e9136617db7a9a647e2175ff16e215cc18bfd85a67c007ce581cd2d3" + sha256 arm64_linux: "ee7e85ff4e412dbad97ac25b161252099eb1a90c82863e4e4f1a87f9622cf5d8" + sha256 x86_64_linux: "a62217d545dcbb8a7944defde2cade6f1dc802478f10749a688f370e19d0dc4e" + end + + depends_on "numpy" # used by `jep` for Java primitive arrays + depends_on "openjdk" + depends_on "python@3.13" + + 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.13" + + 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/pomsky.rb b/Formula/p/pomsky.rb new file mode 100644 index 0000000000000..b324941853fdd --- /dev/null +++ b/Formula/p/pomsky.rb @@ -0,0 +1,36 @@ +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" + + bottle do + rebuild 1 + 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..c9ac9dc0995a1 --- /dev/null +++ b/Formula/p/ponyc.rb @@ -0,0 +1,60 @@ +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.59.0", + revision: "9a5a2d65b422c2ff104877ad4a0b7048eedba68c" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "728c3386ec7bd017a34babadc96370b47a0eb4a9756a950cf0c2acc810bab034" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c8bfee9875312e88092509e7f45326312f341f99da29d6568e36e96145f1ad39" + sha256 cellar: :any_skip_relocation, arm64_ventura: "95f1d38db12a9d94c316bd91cf96d36dfc29b1090dee086dcf56444b1c56326c" + sha256 cellar: :any_skip_relocation, sonoma: "92d259585ce0d1fe70c20526a227d73532a7a9547127d5b2ca86cf041a263b3b" + sha256 cellar: :any_skip_relocation, ventura: "8df48e6967ddd333b5fbd49498cd412cdbc7026e04fde18e5e740e165641f1b7" + sha256 cellar: :any_skip_relocation, arm64_linux: "8606e19315e4e90e562865e6f3c9c2e9420c855a5250d1a47b227780fae0c8cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0759f7698a899a653162f55a54b7f3d416b3d13f35c28362d9c95d40d50ea512" + 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..18b581f1ae783 --- /dev/null +++ b/Formula/p/ponysay.rb @@ -0,0 +1,53 @@ +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 + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ab0fc5205ff5d90e766f69e722c887b690ab68caa3d8c1c5f761362f39487eda" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ce90b90f2442f9fb488ed6d6e01e2a054baa6028d0da97cbd26e74f608877791" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d412af3a212b5e3535e7832aa0c6d64a37e1271715ca89db5e56a56d2b8717a1" + sha256 cellar: :any_skip_relocation, sonoma: "a399855bc086848892024a1480ac18e1b53d5a53c2b8bbb472779870bceb92cc" + sha256 cellar: :any_skip_relocation, ventura: "2ad3b739716124c282a0d73df44ca1423865feb2afca9c01d1ef8783b33dd57e" + sha256 cellar: :any_skip_relocation, arm64_linux: "2504c83a81ba25e6eb424014ebb4056ad61f9e7fa5090931a14920f1542d20f7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "80f37044f82a22ebc8480e11efd3c0a17934acebcc2cbc304b2f5c43a4a15843" + end + + depends_on "gzip" => :build + depends_on "coreutils" + depends_on "python@3.13" + + 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.13"].opt_bin}/python3.13", + "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..4cc32d6b7dab5 --- /dev/null +++ b/Formula/p/pop.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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, 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..82e8198de0528 --- /dev/null +++ b/Formula/p/popeye.rb @@ -0,0 +1,38 @@ +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_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..d523454f574ac --- /dev/null +++ b/Formula/p/poppler-qt5.rb @@ -0,0 +1,89 @@ +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.05.0.tar.xz" + sha256 "9b1627c5b76816ac5e4052a03f5b605ba40b45cf06b02cadd0479620b499ab38" + license "GPL-2.0-only" + head "https://gitlab.freedesktop.org/poppler/poppler.git", branch: "master" + + livecheck do + formula "poppler" + end + + bottle do + sha256 arm64_sequoia: "11a3271980ff355366de1befa3dd81079b4fc72de0fc5f3f84e816637cc71b24" + sha256 arm64_sonoma: "26f344648a7db1ec6d7e863f2ae923c08af94f5bf68908c55dcaf170f90cfb94" + sha256 arm64_ventura: "7960861dae7186f997321c8b4b86bc6cf862810000c272d669475b52dc60ac0d" + sha256 sonoma: "c833682ef064ffa06277272577a6aaf416336d753a41aff2688da96ec20a1e2a" + sha256 ventura: "871809e895d027f941d191c6ef0f3046e1f2d169ac4cef67f24521218d0693e0" + sha256 x86_64_linux: "3de8d53b9aa3fef18570ff59f773831aef2283cc6551cb366f6a3eae2c1a6710" + end + + keg_only "it conflicts with poppler" + + 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 "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" + 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..ba9b796b86984 --- /dev/null +++ b/Formula/p/poppler.rb @@ -0,0 +1,94 @@ +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.05.0.tar.xz" + sha256 "9b1627c5b76816ac5e4052a03f5b605ba40b45cf06b02cadd0479620b499ab38" + 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_sequoia: "6c6526104230e40d95e50b7657eb567fc2a1fef0c117670a6f1b659aa86052bc" + sha256 arm64_sonoma: "6056a3bc79fd3c1a85578ce8d26b570fec0592dc54bc10e02c979ac09efcb4c0" + sha256 arm64_ventura: "284d9f68f0ff027cce10f938193a750943a48b28a9fd561b50b58b1e72567e16" + sha256 sonoma: "54ccf1788b4003b73d0c61449e1b67de5b395148336b10cfdbd1044e2991a544" + sha256 ventura: "3f615edf94c296970f264ad47f8be82fc352d2bb6a0c2a89d6065a5b71ce02da" + sha256 arm64_linux: "51582af2fe6a1e72fceae50f66b8f5719063cc052db83930685435c115c09d04" + sha256 x86_64_linux: "a2852f19befc38347002466d6ee35d20088c0d3eef3055181712eff1ac1fcf09" + 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 "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" + end + + def install + ENV.cxx11 + + # removes /usr/include from CFLAGS (not clear why) + ENV["PKG_CONFIG_SYSTEM_INCLUDE_PATH"] = "/usr/include" if OS.mac? && MacOS.version < :mojave + + 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..8ed63c930138d --- /dev/null +++ b/Formula/p/popt.rb @@ -0,0 +1,95 @@ +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 + + bottle do + 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/portablegl.rb b/Formula/p/portablegl.rb new file mode 100644 index 0000000000000..25a37b9b0fd18 --- /dev/null +++ b/Formula/p/portablegl.rb @@ -0,0 +1,33 @@ +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.98.0", + revision: "79fe2816009bca0f8f5f06c21930531e854edb89" + license "MIT" + head "https://github.com/rswinkle/PortableGL.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e44ca6367a1db6932e876a273760e39003eff57ece05810fbc50dd94c8e3f46a" + end + + depends_on "sdl2" => :test + + def install + include.install "portablegl.h" + include.install "portablegl_unsafe.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..68661a42d6191 --- /dev/null +++ b/Formula/p/portal.rb @@ -0,0 +1,67 @@ +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" + + bottle do + rebuild 3 + 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, 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..83ffed9e1582c --- /dev/null +++ b/Formula/p/portaudio.rb @@ -0,0 +1,78 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "e69bcb7966fae64dabb4866a9f791437b59ef1991112b2a6fb31ee94a76b9244" + 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..f5590224793fb --- /dev/null +++ b/Formula/p/porter.rb @@ -0,0 +1,37 @@ +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.2.1.tar.gz" + sha256 "927c88d7342439594b4f416f6d18d116afd2418bc48876efedeb1cc8e4716fda" + license "Apache-2.0" + head "https://github.com/getporter/porter.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1bbb8d0fec75d619cb3157967dc5673647c69e2e2abddb4f6ce311ef12bbabfc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1bbb8d0fec75d619cb3157967dc5673647c69e2e2abddb4f6ce311ef12bbabfc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1bbb8d0fec75d619cb3157967dc5673647c69e2e2abddb4f6ce311ef12bbabfc" + sha256 cellar: :any_skip_relocation, sonoma: "f58637b322064fd390d0832cacc06c14eaad6c6d630b352344bd44bd43067f1e" + sha256 cellar: :any_skip_relocation, ventura: "f58637b322064fd390d0832cacc06c14eaad6c6d630b352344bd44bd43067f1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "01040892418ef902c033e9d4504661445774151d63e6f91417ba2a9c0cf4897d" + 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..5cd6a5eb866d9 --- /dev/null +++ b/Formula/p/portmidi.rb @@ -0,0 +1,71 @@ +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.4.tar.gz" + sha256 "64893e823ae146cabd3ad7f9a9a9c5332746abe7847c557b99b2577afa8a607c" + license "MIT" + revision 1 + version_scheme 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "a02a8f130081aeda7fd82a826b510f4b2afdcf7af21cffe1d22963fcd3560065" + sha256 cellar: :any, arm64_sonoma: "c24a75dda06927ed08b718df274d6eae2f6f8ded0601673ccd4311a210f89681" + sha256 cellar: :any, arm64_ventura: "2d722c4357f6263f73456060dc5d131eb0b3b34ea54bef1cfe47d15bdc4ed75f" + sha256 cellar: :any, arm64_monterey: "94415b613563629ea6425c629dc768e3c9319823870e948c4060742d24401588" + sha256 cellar: :any, arm64_big_sur: "f8ea203ccc085feee9e2e5c8f97ebcd59117f41331ac654dc542cfa8a901e2a9" + sha256 cellar: :any, sonoma: "ec2f3c4ed9b0fa14de06bf6802a8a111c7de434beaa0c3f082c99613cf12cc0f" + sha256 cellar: :any, ventura: "505796ff7499cb66673b8774af23109d1803cd0ca79e45de041d66985cb553e6" + sha256 cellar: :any, monterey: "7e348bdf4837001ff61ebad737ee19326a92c11ea2e122874abb39246a15b99e" + sha256 cellar: :any, big_sur: "3025725eb9196f45005ee6305883d78fb98fd6412569fdb2c3685e9f6f117009" + sha256 cellar: :any_skip_relocation, arm64_linux: "27c42711f68465a36ce8c41694202a58ad5ee05f1589ffcea67173f643c4576d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af653a873aa1e1a5255269323d28c28b97c6860f52687dc4677020aa5bfbf7de" + end + + depends_on "cmake" => :build + + on_linux do + depends_on "alsa-lib" + end + + # Upstream patch, should be included in 2.0.5 + # Fixes the following CMake error: + # The link interface of target "PortMidi::portmidi" contains: + # Threads::Threads + # but the target was not found. + patch do + url "https://github.com/PortMidi/portmidi/commit/a47be8c58b25e2c122588e0b56306c0cfdce756c.patch?full_index=1" + sha256 "aeeb22a3809fb79d370003936a6d5b110d33cfc88b39fc0f83d060e1b79dab4c" + end + + def install + if OS.mac? && MacOS.version <= :sierra + # Fix "fatal error: 'os/availability.h' file not found" on 10.11 and + # "error: expected function body after function declarator" on 10.12 + # Requires the CLT to be the active developer directory if Xcode is + # installed + ENV["SDKROOT"] = MacOS.sdk_path + end + + 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..ee703aa5542fe --- /dev/null +++ b/Formula/p/poselib.rb @@ -0,0 +1,81 @@ +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.4.tar.gz" + sha256 "caa0c1c9b882f6e36b5ced6f781406ed97d4c1f0f61aa31345ebe54633d67c16" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "62ba1d9d73288e53a7fa31462a0aeef5eb5d32305d77c5207bf626d0c8d52711" + sha256 cellar: :any, arm64_sonoma: "0c58c6ca1d520956f808e52273fdd32ea132021906e629325272272dacb90c7b" + sha256 cellar: :any, arm64_ventura: "7b6e8c4abb3b2e00c8dfa0aa600599c9d930724e09d1dcf45339c903121fa8f1" + sha256 cellar: :any, sonoma: "e520e1731c729e1ee2dc91a3d6e3d5773bc6f5414098b6b0d61aa7984a3d7467" + sha256 cellar: :any, ventura: "3e3d39c0763a6efacdc2f9154851ee80174ac64ad3aa0518fa9e35871e42cb53" + sha256 cellar: :any_skip_relocation, arm64_linux: "39566056afc9dc3a3f6aa15adbe8fa603b1f2650a3903c76f94c053e8ec8f0bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "598ee718057f572aebb473a515f4201391808f59563811eaa8809a5dcc7bbacf" + 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..582cee2406c84 --- /dev/null +++ b/Formula/p/posh.rb @@ -0,0 +1,43 @@ +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.1/posh-debian-0.14.1.tar.bz2" + sha256 "3c9ca430977d85ad95d439656269b878bd5bde16521b778c222708910d111c80" + 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_sequoia: "4521f3540d2fab592dafd00531ecb265fb361568e62a608eb3965258f3de58ea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bdbfb5bbceaa13a46364fc19af24197741066064ab0a158f0ea3d46e550b9ef7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f3c1625c3fcfbf58672e6870e8ab89869ca68dc90978d2bd518d21f5f9fcac86" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6678d5df02415c5e8bb866a7c5e7819f10ef23dd7bb19ba61f8f2cdad612e01f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1b66fa64e195d0429fb1f7c0d0bf7f93c147ffa8533934f694d4ac6da5c4b78f" + sha256 cellar: :any_skip_relocation, sonoma: "887174ac1fe9df5034ce03dbf74d373f29b12c9097576467f65773a0d0780ea3" + sha256 cellar: :any_skip_relocation, ventura: "f7fe58efa692f3f29ed734868afc118cd0875a6bc82d912bf9d30444f9cd1058" + sha256 cellar: :any_skip_relocation, monterey: "5e83a4ac84636b1aa38b60ecda3a475f5e10c17aed479d1e9a91162765ab0bf6" + sha256 cellar: :any_skip_relocation, big_sur: "970ac65535d1bb793b2312b7d1ce56861576c981ffc4c1fe049d290a5ba98118" + sha256 cellar: :any_skip_relocation, catalina: "9a30988f801e9c31ad6fefd48a232a5c95990300eb396a4c32a991176f8350b6" + sha256 cellar: :any_skip_relocation, mojave: "20157fe0e9ff5389d07f85079a3137112cd6ad5bff5081d247e8778a082281c8" + sha256 cellar: :any_skip_relocation, high_sierra: "bfee90257c267d2bd68ec3501887901179f4464d3e6d5b9afb42580ef1db4677" + sha256 cellar: :any_skip_relocation, arm64_linux: "d6f9cc2a8b87c35e6a3cad23a58dc1d6753e489ddb0c69c295174655d5b615cc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d97ee0b895a51027075cf2ba1b4644b7a9c0202b4b1ea989252bae13924a41d" + 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..73a936ee51494 --- /dev/null +++ b/Formula/p/poster.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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, mojave: "110db1120ca8bcf6b68f14cfb24cf92f0027b6897fb9a44a8c067f4feca54182" + sha256 cellar: :any_skip_relocation, high_sierra: "74db7055649cd3f68316b99db48139641f916b4434008300f2bfcd1146f92c77" + sha256 cellar: :any_skip_relocation, sierra: "caa5474e5d7baf13ae6495c01a7530146d55531e41c88a469b0e44ee892c4be4" + sha256 cellar: :any_skip_relocation, el_capitan: "07702fc6f1d43a3875637f8ff9d3509d6eb913abda301c24c23d824a76a858b6" + 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..b7d74c9f2be11 --- /dev/null +++ b/Formula/p/postgis.rb @@ -0,0 +1,174 @@ +class Postgis < Formula + desc "Adds support for geographic objects to PostgreSQL" + homepage "https://postgis.net/" + url "https://download.osgeo.org/postgis/source/postgis-3.5.2.tar.gz" + sha256 "fb9f95d56e3aaef6a296473c76a3b99005ac41864d486c197cd478c9b14f791a" + license "GPL-2.0-or-later" + revision 2 + + livecheck do + url "https://download.osgeo.org/postgis/source/" + regex(/href=.*?postgis[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "7cde869dbfa86b47cdcd49832a2b8e6bdd4dbf5ca9dfce485cc1c9a9bd22fe16" + sha256 cellar: :any, arm64_sonoma: "ac95fffb200e82ef02675537f7cb3d9ecbd83a1492809c7b4fe2e4392b86faca" + sha256 cellar: :any, arm64_ventura: "3ae39bd0c77d72713a2a75acb0a25725c51b08971be6ed5556316292de716505" + sha256 cellar: :any, sonoma: "e2f95cd1153bda9a37a02e4d1bffd3d35fd320a47e9d27a173def4747fe64dba" + sha256 cellar: :any, ventura: "4c4dc9de4d418524492e039b3265e8010749c38f0d94927c35e1908bb0dad33a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92b0473355cfe2b17b4f49c7c4bd6efabb55086fe9645dbc191a6b9f31c0f9b7" + 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@14" => [:build, :test] + depends_on "postgresql@17" => [: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 + # 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..760f63800e814 --- /dev/null +++ b/Formula/p/postgraphile.rb @@ -0,0 +1,44 @@ +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" + head "https://github.com/graphile/postgraphile.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4b4305806f3dfd7348eae61c3dcd47b8d33e353becbeb00c917ec745e4851b1f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4b4305806f3dfd7348eae61c3dcd47b8d33e353becbeb00c917ec745e4851b1f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4b4305806f3dfd7348eae61c3dcd47b8d33e353becbeb00c917ec745e4851b1f" + sha256 cellar: :any_skip_relocation, sonoma: "3f0403af0d6526117f1d49c548adf246a011abe313b30e4b41261b76dae90c79" + sha256 cellar: :any_skip_relocation, ventura: "3f0403af0d6526117f1d49c548adf246a011abe313b30e4b41261b76dae90c79" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b4305806f3dfd7348eae61c3dcd47b8d33e353becbeb00c917ec745e4851b1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b4305806f3dfd7348eae61c3dcd47b8d33e353becbeb00c917ec745e4851b1f" + end + + depends_on "postgresql@17" => :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@17"].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/postgresql-hll.rb b/Formula/p/postgresql-hll.rb new file mode 100644 index 0000000000000..9cc9e27007180 --- /dev/null +++ b/Formula/p/postgresql-hll.rb @@ -0,0 +1,56 @@ +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.18.tar.gz" + sha256 "e2f55a6f4c4ab95ee4f1b4a2b73280258c5136b161fe9d059559556079694f0e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "27480a860a6ad43655bbc46261a3802ea26252038b3c0ada7900d7727654248d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7c452476e1fa061eff0b1e1ed08ded91385d0ea266b47173ecac203e009ddcc4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7eff2df8ade96abbf8b6ea92b187994a875ef21491f57628b67b3e17524a896b" + sha256 cellar: :any_skip_relocation, sonoma: "ef85b1da74c48d8c1338dd3ba819f728d3c10ff0e2eb9df0144b684741bdcd55" + sha256 cellar: :any_skip_relocation, ventura: "f02c71f284135ed072743b270584d958183d8951c85faa42472dc0c602748b5f" + sha256 cellar: :any_skip_relocation, arm64_linux: "01e309e288fe1c16b2b47e4ec6ea57bc17da8d41bda3f49bbd869ef6aa62fd16" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87c9b558987de3f251c0339c3427bf6e0c8172b887a697048b13b7cb0710e4de" + end + + depends_on "postgresql@14" => [:build, :test] + depends_on "postgresql@17" => [:build, :test] + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + 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..8223fc33fed7f --- /dev/null +++ b/Formula/p/postgresql@12.rb @@ -0,0 +1,144 @@ +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_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..d4d23c390abd4 --- /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.21/postgresql-13.21.tar.bz2" + sha256 "dcda1294df45f033b0656cf7a8e4afbbc624c25e1b144aec79530f74d7ef4ab4" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(13(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_sequoia: "1980c3a1f68d4bd9aa0c329377c021274193e428ca6ba1197596e9784b2358ba" + sha256 arm64_sonoma: "a3486347b6ec66ec75d9fb2cac42c37657d34876c5cde406e3534d5241455a51" + sha256 arm64_ventura: "30ab5734a6e187838ffc311461dcda32c9d1690c9e04cccf06592998cd5913b7" + sha256 sonoma: "465e489a5a3797a997ecaf56f3e08a5b242203e9a6734779eebe720486b729d0" + sha256 ventura: "a9f7551558b0ba8b55ee7c7764b550952f0e281d5633d80e6acc47808dec7bd6" + sha256 arm64_linux: "00c713e2f487fcdfbb7f58864576511ed6e3e7c4da0be4fa0a0adac747db6c56" + sha256 x86_64_linux: "7c9e4641b785c0659b855c0c8c729f06d26e640a0846c24e940947860a44e79f" + end + + keg_only :versioned_formula + + # https://www.postgresql.org/support/versioning/ + deprecate! date: "2025-11-13", 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@14.rb b/Formula/p/postgresql@14.rb new file mode 100644 index 0000000000000..218a967f298d4 --- /dev/null +++ b/Formula/p/postgresql@14.rb @@ -0,0 +1,151 @@ +class PostgresqlAT14 < Formula + desc "Object-relational database system" + homepage "https://www.postgresql.org/" + url "https://ftp.postgresql.org/pub/source/v14.18/postgresql-14.18.tar.bz2" + sha256 "83ab29d6bfc3dc58b2ed3c664114fdfbeb6a0450c4b8d7fa69aee91e3ca14f8e" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(14(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_sequoia: "9cdd37849beb706374d3ab14ebbbe24faae4d1a5d522e003b1404c705b7e0ffd" + sha256 arm64_sonoma: "40b6d7576b8833748a3664fb43d67d8c0bffe68f21a5cdbb219109b20e111115" + sha256 arm64_ventura: "34aba0f06f3d43762f477927a514d372459f88c2175a7c0e740b3e1baf621247" + sha256 sonoma: "fae9107044e20a44a7169eedf090cc6482cb01f262aee7cd574ce4ee62039fc9" + sha256 ventura: "3422679db5af8c0495cc7ac5e4378f62190b7531d48962d7b9708210fda41889" + sha256 arm64_linux: "3ae3bef2cf0f72b4e8b46bc59515df03a322a746cd067d69a745b3aee8589cc3" + sha256 x86_64_linux: "9e83804e685fafcacecb289b580985ead1996e08db17bb7c6838cf9176bb8cdb" + end + + # https://www.postgresql.org/support/versioning/ + deprecate! 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=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 "#{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..4e1bf33b120b1 --- /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.13/postgresql-15.13.tar.bz2" + sha256 "4f62e133d22ea08a0401b0840920e26698644d01a80c34341fb732dd0a90ca5d" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(15(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_sequoia: "ddd77e338e6b7f83158fe3ec5d4686d8b78842f296d69be34d1dc3d4bac7fa00" + sha256 arm64_sonoma: "db6b10d1c052bc1e3e82ec85ba946e01377aa4196498d7693b8464f3db2270c3" + sha256 arm64_ventura: "efc10abdc19b004468c6b44bc77e19a8ecc1510f46dcd15aad79cf3cea2353f9" + sha256 sonoma: "c86e24f88411a288fe9f44ab54d97542de4a9ca4c959adec7feb7c4422e1aa87" + sha256 ventura: "04cae6d17b914018b6bd0435b51fcb8d3dbe4dd4d47107de196a0cf1ac6a092f" + sha256 arm64_linux: "1f0e609f516fa3824cfc2e4f7e2834e2c3c96ce13b19f67842580b9364f30ef5" + sha256 x86_64_linux: "fcb0a5332f255ed90bcd91338914a42e560689260427bd993e0ad8674a04e02b" + 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=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] + environment_variables LC_ALL: "C" + 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 + 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..01097150268bf --- /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.9/postgresql-16.9.tar.bz2" + sha256 "07c00fb824df0a0c295f249f44691b86e3266753b380c96f633c3311e10bd005" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(16(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_sequoia: "8e883e6e9e7231d49b90965f42ebc53981efb02e6ed7fdcbd1ebfdc2bfb5959a" + sha256 arm64_sonoma: "1cb655cb347c5395da0b1b8de82e16dfd20f18f9833c1f9195b2f43a50f53908" + sha256 arm64_ventura: "6b979f6f6f69d679edead92cce444a040698dead47ce11042f032c4ed0f99bf5" + sha256 sonoma: "93db108d959400a8f55a1161c0b0ca78face7370e4e44c374c9d1819f8335487" + sha256 ventura: "4082217252ea7be1c2cb20851ce039e72a7c0a6835d7bdc5ad88650bdbc8b113" + sha256 arm64_linux: "f5192ae99aa883cb0a1f5806af14ac45c0d10d3592c455c2e1e820244d02bcc7" + sha256 x86_64_linux: "0f3b5ffbb0a01071af4e4e565de8125894c621d8087781cc63442f3fa3f7902e" + 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=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] + environment_variables LC_ALL: "C" + 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 + 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..078f9f5ba6b33 --- /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.5/postgresql-17.5.tar.bz2" + sha256 "fcb7ab38e23b264d1902cb25e6adafb4525a6ebcbd015434aeef9eda80f528d8" + license "PostgreSQL" + + livecheck do + url "https://ftp.postgresql.org/pub/source/" + regex(%r{href=["']?v?(17(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 arm64_sequoia: "2c9bea8ba80e55662401b8fdb3895162395c552980bf06b0ccad2262f6188b01" + sha256 arm64_sonoma: "1a820991a1607aa5fd67806a0349aaabed4dd4fb38c6cc5b95bbb4d76fe7ca83" + sha256 arm64_ventura: "e43f4917861c6e80d4bb440405ceb51c1a2a59e00cb43a2f3518cebec298efa1" + sha256 sonoma: "767044a8d803b861e1c7c58a652f063916b275b5f48ca2f7391ee11c79384488" + sha256 ventura: "7548c817fbb5b4d7867b5df02b393e07d2565e2b97b83a0f67024be475de8112" + sha256 arm64_linux: "6dbe6c54d311e8d0c69a838ce7ffdad494369efe754ef257a591264cbc01eff0" + sha256 x86_64_linux: "6b2b1227c7b121dbdc93d15f9c716502c605f64247867e266844bcdad5f5ee6b" + 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=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} + + 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: "C" + 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"] + [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..c44c04daf1a56 --- /dev/null +++ b/Formula/p/postgrest.rb @@ -0,0 +1,42 @@ +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/v13.0.0.tar.gz" + sha256 "61273ba81af1c84965695f35ff058da576d968b70a781ea6445701cb75929b97" + 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_sequoia: "d9290700cd7ddb3a617430c9c7cc3e12f5ba2c1195b8a4c9f0c822ab4cf193f9" + sha256 cellar: :any, arm64_sonoma: "ee9085f8de34c1a2e99cd8ed6a0b3b22fdc2722d33c546f8190793caaf96ce09" + sha256 cellar: :any, arm64_ventura: "395ae0c69a1e06db5bd4339b8ca40a9a9f8241ec7c0730c52a81d139e15932d7" + sha256 cellar: :any, sonoma: "f0a37bbbc2f54ae0ed72a91e0759dcef52e58841cb283c2f473eb408f912ff03" + sha256 cellar: :any, ventura: "e00742b17b0999d69eb31c6c45953b2ddea0b7f2e9656c145a6908127a9c4798" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed9e02e34c6dc43b24561992a65f447a668e5362850edb3c6341327b8dbfa8b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a6d14fa04538cd872c63ed61c2ff303e0e7104219e0ac455c95c23913a6264d0" + 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..5a4512daee496 --- /dev/null +++ b/Formula/p/posting.rb @@ -0,0 +1,224 @@ +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/57/c5/50f29f97c0d477b0bc70362230e195ef49e4776a5f719e8db8866a615d81/posting-2.6.0.tar.gz" + sha256 "d4654399299b2d0d226c5ad806d452fe6a94931569609cb283f100052745bf91" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "104b4c64dbb8364e1b09952405db0c48bf5a901ef9b90681b05f6b5e3c9934f4" + sha256 cellar: :any, arm64_sonoma: "9b76d6af1d70bdbe77ed393853e29eca2c8f4893a6a82e1b91f30f3a699e4fb3" + sha256 cellar: :any, arm64_ventura: "44848246f531e8800cd1eb38b11a81047b32ff9ce9d4b64735e5c6902852b98d" + sha256 cellar: :any, sonoma: "9170fd60a78cc6aba8081ba0492897dbfccacea60c16ae9c7c6aabf52a264a29" + sha256 cellar: :any, ventura: "4424415f29b6e9553eeabc773f7dd80e08e80dadca79e6998bdc5874235cf4c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "d22e0c1da88f01a742e41cd3ad3d16c303a5b1d76fd375c8bcd0e4e92b3fa4b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4aaa8fbcfa8112aa69e36d8b10af8c88f1c12db9bffa4b983574d37d4c8095d" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + depends_on "brotli" + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + depends_on "tree-sitter" + + 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/a3/73/199a98fc2dae33535d6b8e8e6ec01f8c1d76c9adb096c6b7d64823038cde/anyio-4.8.0.tar.gz" + sha256 "1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/f5/38/3af3d3633a34a3316095b39c8e8fb4853a28a536e55d347bd8d8e9a14b03/h11-0.14.0.tar.gz" + sha256 "8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d" + end + + resource "httpcore" do + url "https://files.pythonhosted.org/packages/6a/41/d7d0a89eb493922c37d343b607bc1b5da7f5be7e383740b4753ad8943e90/httpcore-1.0.7.tar.gz" + sha256 "8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c" + 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 "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 "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/19/03/a2ecab526543b152300717cf232bb4bb8605b6edb946c845016fa9c9c9fd/mdit_py_plugins-0.4.2.tar.gz" + sha256 "5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/b0/41/832125a41fe098b58d1fdd04ae819b4dc6b34d6b09ed78304fd93d4bc051/pydantic-2.11.2.tar.gz" + sha256 "2138628e050bd7a1e70b91d4bf4a91167f4ad76fdb83209b107c8d84b854917e" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + end + + resource "pydantic-settings" do + url "https://files.pythonhosted.org/packages/88/82/c79424d7d8c29b994fb01d277da57b0a9b09cc03c3ff875f9bd8a86b2145/pydantic_settings-2.8.1.tar.gz" + sha256 "d5c663dfbe9db9d5e1c646b2e161da12f0d734d422ee56f567d0ea2cee4e8585" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz" + sha256 "b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/88/2c/7bb1416c5620485aa793f2de31d3df393d3686aa8a8506d11e10e13c5baf/python_dotenv-1.1.0.tar.gz" + sha256 "41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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/28/7f/9423d4d9e1aabaa6841a7f77e2bf8249a7cae4209c4d6b33d77f55ed24c3/textual-3.0.0.tar.gz" + sha256 "0bf9f8523541340d5357724d60868db652fb287ac7b13e6cf4553d45a6d9a9d5" + end + + resource "textual-autocomplete" do + url "https://files.pythonhosted.org/packages/7a/cf/9cf23ac193c70e7b0a6999dc9409650e9ab9960b1be167e7dda54f1028a8/textual_autocomplete-4.0.4.tar.gz" + sha256 "0969987b90a53c1f75753dfe3ad2c7ea0d974b5839dc2a00a2d332c000057871" + end + + # Unmaintained package and so use a fork of original + # Issue ref: https://github.com/Aider-AI/grep-ast/issues/7 + resource "tree-sitter-languages" do + url "https://github.com/Textualize/py-tree-sitter-languages/archive/refs/tags/v1.11.0b0.tar.gz" + sha256 "17b13f25f479e1ca39cddab1ec59541236ae25449ba136e70e842c3c8340c507" + 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 "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + 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/f5/26/c705fc77d0a9ecdb9b66f1e2976d95b81df3cae518967431e7dbf9b5e219/watchfiles-1.0.4.tar.gz" + sha256 "6ba473efd11062d73e4f00c2b730255f9c1bdd73cd5f9fe5b5da8dbd4a717205" + 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", shells: [:fish, :zsh], 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 "Successfully imported OpenAPI spec", output + end +end diff --git a/Formula/p/potrace.rb b/Formula/p/potrace.rb new file mode 100644 index 0000000000000..b45b3bcf6bdcb --- /dev/null +++ b/Formula/p/potrace.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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, mojave: "3ad69cce4edecea6e5170b766201845b703a98bbac3c5272ef6a045f828643e2" + sha256 cellar: :any, high_sierra: "56d821a4d3579bedf64ebf5357fc04f214cb2efbea7ddb681b202e684e71d97e" + 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..9ef0720ddee34 --- /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/v0.17.0.tar.gz" + sha256 "6d98171b2c4100d2677c219258fcd1c00b6ef184f9cb5994e0cacb3a0ac30b47" + license "Apache-2.0" + head "https://github.com/boostsecurityio/poutine.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8a68b0e4d2eb59afbf494b16aa9924e7b8e84d385ec63eb842dc0a400b984491" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "40314a9f7b10a379035b65cbd619f5647deac536e39fe6c98eb77e77514ea635" + sha256 cellar: :any_skip_relocation, arm64_ventura: "83e057f632d96a7e3ccc2f2ec6576c0f7c01fa9920f44770494c5387daedcfd8" + sha256 cellar: :any_skip_relocation, sonoma: "edf15bb654cf74c0fea4ec087fa930a9ce81ae0f3b6f05f691e7fc960de88aec" + sha256 cellar: :any_skip_relocation, ventura: "a77e2d668fd598fb00138d3a04a82c3a9e41cb65bb5e3d50121863d7a577bdfe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e043de17490b9eb9b7f7b785fd423ee0ee8115378056c8e76bb2a98f53c86db7" + 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..1211cd992cf7f --- /dev/null +++ b/Formula/p/povray.rb @@ -0,0 +1,74 @@ +class Povray < Formula + desc "Persistence Of Vision RAYtracer (POVRAY)" + homepage "https://www.povray.org/" + url "https://github.com/POV-Ray/povray/archive/refs/tags/v3.7.0.10.tar.gz" + sha256 "7bee83d9296b98b7956eb94210cf30aa5c1bbeada8ef6b93bb52228bbc83abff" + license "AGPL-3.0-or-later" + revision 13 + head "https://github.com/POV-Ray/povray.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+\.\d{1,4})$/i) + end + + bottle do + sha256 arm64_sequoia: "a43f64589b9b2abbc3dd1460e56c79c0d8473e0b0cdd343f7fae52474450adc9" + sha256 arm64_sonoma: "ffc8acf31801cc124cf903e3ad6014014e6f5e3784938b43f42bcb39758d3f95" + sha256 arm64_ventura: "e3b9af45cf02e6e071dac8e9e15681a727817ceb26e21400dd2f10c4c161211e" + sha256 sonoma: "d43346c84ebe723c8099104abe49b6d28850f4597ef07a0be97bf5af616c6384" + sha256 ventura: "bda46d7ccad80bb6488dac7d09fecc8214ff19bd39c267fbc143cb846d4d2882" + sha256 arm64_linux: "4a6efde256e0f9880d0eef16f7f3f7a70208e751a353313f687040e100a3449c" + sha256 x86_64_linux: "757f8971fcd168f2eedea18303542b1566eaf0308fbcee6833de2aa4b11bdc31" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "boost" + depends_on "imath" + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "libtiff" + depends_on "openexr" + + uses_from_macos "zlib" + + 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 = share.glob("povray-3.7/scenes/advanced/teapot/*.pov") + refute_empty scenes, "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/p/powerlevel10k.rb b/Formula/p/powerlevel10k.rb new file mode 100644 index 0000000000000..acd3be175ce00 --- /dev/null +++ b/Formula/p/powerlevel10k.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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..c1f85529cc7b5 --- /dev/null +++ b/Formula/p/powerline-go.rb @@ -0,0 +1,26 @@ +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_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, 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..b539b325da4ae --- /dev/null +++ b/Formula/p/powerman-dockerize.rb @@ -0,0 +1,28 @@ +class PowermanDockerize < Formula + desc "Utility to simplify running applications in docker containers" + homepage "https://github.com/powerman/dockerize" + url "https://github.com/powerman/dockerize/archive/refs/tags/v0.20.2.tar.gz" + sha256 "b9c10d73a222379c95c8cb02da882857ce0ff001e084468218ccb33375f1043e" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "77eb12272817fa2070e5ffff79c53db97e822776cee3b599cf1731c47b5bf96c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "77eb12272817fa2070e5ffff79c53db97e822776cee3b599cf1731c47b5bf96c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "77eb12272817fa2070e5ffff79c53db97e822776cee3b599cf1731c47b5bf96c" + sha256 cellar: :any_skip_relocation, sonoma: "0613ab1a6aef4c559a4b566c13323fe02400dbab2698cad61fc6ea099908b0dc" + sha256 cellar: :any_skip_relocation, ventura: "0613ab1a6aef4c559a4b566c13323fe02400dbab2698cad61fc6ea099908b0dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0f2fc4582b62b2b7bb8c7a947862a82f1e4e46e0a22c620a7d6d920ae5f8ef2a" + 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 -X main.ver=#{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/p/powerman.rb b/Formula/p/powerman.rb new file mode 100644 index 0000000000000..90dd067bad193 --- /dev/null +++ b/Formula/p/powerman.rb @@ -0,0 +1,50 @@ +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_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..371e969e585f2 --- /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://www.bugseng.com/products/ppl/download/ftp/releases/1.2/ppl-1.2.tar.xz" + mirror "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://www.bugseng.com/content/ppl-download" + regex(/href=.*?ppl[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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 mojave: "253714635b8718e7822853e1385c546b665450b7059e8067e4008ed865eae261" + sha256 high_sierra: "7a9b9ceabcf71bf31ed8185caaa6e78c065511ba3e6cf805be13402983c2a7e1" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..301d971f9e6ec --- /dev/null +++ b/Formula/p/ppss.rb @@ -0,0 +1,20 @@ +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" + + 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..38f0002cbb3c2 --- /dev/null +++ b/Formula/p/ppsspp.rb @@ -0,0 +1,191 @@ +class Ppsspp < Formula + desc "PlayStation Portable emulator" + homepage "https://ppsspp.org/" + license all_of: ["GPL-2.0-or-later", "BSD-3-Clause"] + revision 3 + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "11a86d48ffacea0abad6d65685f44e569be22641d643450ca1f4bfb78d711033" + sha256 cellar: :any, arm64_sonoma: "3b1a983666fa0dd5c9aac25279414f33adeb30782d4a62f35e13f6494dc65b50" + sha256 cellar: :any, arm64_ventura: "32cdd20ec459258c4164f679fe9c2e4565d91ac3e38b52a261070e345f2611f1" + sha256 cellar: :any, sonoma: "7a107b64aa9e2360810677ddc833e1651cdaed20c1083612110074fc44463283" + sha256 cellar: :any, ventura: "83f5f34097a2800f0b52f2b754b90c3624fdcd61acaf8a4372963d8de955d64e" + sha256 arm64_linux: "e60baf589f6ffdc362c9ce45666c2ad54979d4b3f862d45af88c55992e14feb2" + sha256 x86_64_linux: "3b2eb05c61f97055537b379b39ccf2154e15f5b099d8f337d78f5a01f02c67ac" + 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, since: :catalina + 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..a2a9baf010e34 --- /dev/null +++ b/Formula/p/pqiv.rb @@ -0,0 +1,53 @@ +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_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..454029a32ffd4 --- /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/08/39/679ca9b26c7bb2999ff122d50faa301e49af82ca9c066ec061cfbc0c6784/pre_commit-4.2.0.tar.gz" + sha256 "601283b9757afd87d40c4c4a9b2b5de9637a8ea02eaff7adc2d0fb4e04841146" + license "MIT" + head "https://github.com/pre-commit/pre-commit.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "39a4189a5c833b1931cfa2a9b465bb8be81a920bdb4dbd4f754846bacd9a3a1c" + sha256 cellar: :any, arm64_sonoma: "9b65bc0a56fb8f0915c928f7fb028ed567dcca6fe577caa46ef98092a768c14b" + sha256 cellar: :any, arm64_ventura: "25a08eff57dfde10ddd6c0519d8fd6bb5ed3ced529d4e54a7b08c96ed336a1cf" + sha256 cellar: :any, sonoma: "b6f9257326364e4ffa66c3ec962062c672a393c103bacd2e506443be6d08be40" + sha256 cellar: :any, ventura: "fe5c110c13a889acfc336eb92d16f6556043b2399ba898cf17cc3b64dfd483be" + sha256 cellar: :any_skip_relocation, arm64_linux: "7f5e64243078fdb6b9ac41f2cf5347484d531849122289ec2506a8e4aa75d8fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16ee6fbd4e0131a38e2db8c9fb69d76bf9438ec269080f1cd61d4bd4c8aecc3d" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/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 "identify" do + url "https://files.pythonhosted.org/packages/9b/98/a71ab060daec766acc30fb47dfca219d03de34a70d616a79a38c6066c5bf/identify-2.6.9.tar.gz" + sha256 "d40dfe3142a1421d8518e3d3985ef5ac42890683e32306ad614a29490abeb6bf" + 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/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/c7/9c/57d19fa093bcf5ac61a48087dd44d00655f85421d1aa9722f8befbf3f40a/virtualenv-20.29.3.tar.gz" + sha256 "95e39403fcf3940ac45bc717597dba16110b74506131845d9b687d5e73d947ac" + end + + def python3 + "python3.13" + 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/precious.rb b/Formula/p/precious.rb new file mode 100644 index 0000000000000..726a0615f151e --- /dev/null +++ b/Formula/p/precious.rb @@ -0,0 +1,31 @@ +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.8.0.tar.gz" + sha256 "163b284fff7b723f9645312d1a45fe7149885fa40269c6ee92866d46a1da177b" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/houseabsolute/precious.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b457ca7da867684a3c0f3604cdb058d4817f2371ab90804a45bf8b1511d80de3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e8ebd1903d575ace899f49c82c6a986aae358b53442e688beb84d27caca8e7b2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0a07763a1d8571b9d212a65decd5d027e70d1f69ae53f8ad22bdb618f054a6ca" + sha256 cellar: :any_skip_relocation, sonoma: "f59b2871ebbdf1243e0fe21cc311717d9519bfd87cd971ba89d1c7450cf2c866" + sha256 cellar: :any_skip_relocation, ventura: "bc0492d280551835ef5e9d2fe17dd11c0c89f03a95d0b40c24477b40862e3a09" + sha256 cellar: :any_skip_relocation, arm64_linux: "97803d50efa42e499787e243a4d415fa628eabd04850920fd5cb5cb5f84e66a4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f065796d18580e7962b43e1dbf6f58ce2e1e948ebd27c8bc8493d1546c271642" + 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..b8d2435cd7ac7 --- /dev/null +++ b/Formula/p/precomp.rb @@ -0,0 +1,48 @@ +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" + + bottle do + 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, mojave: "7488435759867b2bb152cdd3ea78d2358659b34ff838e2cb97b54bd3a322147b" + sha256 cellar: :any_skip_relocation, high_sierra: "92824cc03c547d276436e1bdf55e905d402f77eeccf61f25a720d4315e5bd4cf" + sha256 cellar: :any_skip_relocation, sierra: "5d852d83cf57987a521471b74e450a65473ed20e32bb14e83b5d99e969e37458" + 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 " + + system "cmake", "-S", ".", "-B", "build", *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..88b807a8d9782 --- /dev/null +++ b/Formula/p/preevy.rb @@ -0,0 +1,30 @@ +class Preevy < Formula + desc "Quickly deploy preview environments to the cloud" + homepage "https://preevy.dev/" + url "https://registry.npmjs.org/preevy/-/preevy-0.0.66.tgz" + sha256 "aae290aabc6046dc7770d853888dd9a7c13e57f3aa68397e249c2af608fd0460" + license "Apache-2.0" + + bottle do + sha256 arm64_sequoia: "78974bbfc835ed42c5462e63bfa4436d0733864f4639c60b57beafd21367d27e" + sha256 arm64_sonoma: "8160125c713db37824ba46f37b579ff95ad82b5a69f5f3d3a1ea877220831370" + sha256 arm64_ventura: "6e43c51cf5c2c7f9f97e3baa256e450f1d339b5057652eeb1e189ac835aaa6c3" + sha256 sonoma: "da3d04b932348cbd77ee2aeef6f3cb4b580a25c2f9acde5a205eccbc95c61d06" + sha256 ventura: "6e449e896eb19609d9353ea31ede1e084e173a81c5ecb8c8f949d23875112e89" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45268a366541af205d7f0f6ea20684ede2ce74689e446fbf91a79192191ab825" + 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..676fc10da8b93 --- /dev/null +++ b/Formula/p/prefixsuffix.rb @@ -0,0 +1,67 @@ +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 + + bottle do + 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/premake.rb b/Formula/p/premake.rb new file mode 100644 index 0000000000000..27d3aa368208f --- /dev/null +++ b/Formula/p/premake.rb @@ -0,0 +1,45 @@ +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_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 + + 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..5b6fa90a5c4df --- /dev/null +++ b/Formula/p/presenterm.rb @@ -0,0 +1,29 @@ +class Presenterm < Formula + desc "Terminal slideshow tool" + homepage "https://github.com/mfontanini/presenterm" + url "https://github.com/mfontanini/presenterm/archive/refs/tags/v0.13.0.tar.gz" + sha256 "6df48d339f9ae010ceaee04ad3f1f37a516f3923117c350b9483f816c5e982c3" + license "BSD-2-Clause" + head "https://github.com/mfontanini/presenterm.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "150e62a7f0c85b0e9fb659c2ad255b8809c0316fdbc09d5f3428a9727273302f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac13250fa529d9dbe9ccfae5db396fb6cffe02cdd7c425c1ce98727f9f590be2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6f13cae51ae4d01d23a9c1cc98e591d6b29c7f17f22dd8f653d949a9cacc1ca0" + sha256 cellar: :any_skip_relocation, sonoma: "936efa0aa8238b756850af7097aff6b85ba6377051f7fe71402176fc6f4bafc4" + sha256 cellar: :any_skip_relocation, ventura: "5856abff3cfdb55eff80d5119ee553c5a63992731e84fdace4f3de7793de46d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "431171720c7256b4496ec99493fc93e472a12453e599543c25031b18205c4f5d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "df822e6c1e7117c289b43e0ca9a93174d0637fe7d884d55bfc17b377c52adc32" + 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..874ee61ba50a0 --- /dev/null +++ b/Formula/p/prestd.rb @@ -0,0 +1,52 @@ +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_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..a8aec2f71bae5 --- /dev/null +++ b/Formula/p/prestodb.rb @@ -0,0 +1,126 @@ +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.292/presto-server-0.292.tar.gz", using: :nounzip + sha256 "4063126a908867f143e9c16b6cd3afeb49f6ad1de298dfc9810c4045f1c78693" + 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 + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "4eddb6530bd68a0cdcbfc9ffa891dcbef3a359110881db51d89af58fce4629bb" + end + + depends_on "openjdk@17" + depends_on "python@3.13" + + resource "presto-cli" do + url "https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-cli/0.292/presto-cli-0.292-executable.jar" + sha256 "874fb6c5adea4544e1dc297e20362d24a2bf5ef280900ab967ff735cc2c9abdb" + + 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 + + # Manually extract tarball to avoid multiple copies/moves of over 2GB of files + libexec.mkpath + system "tar", "-C", libexec.to_s, "--strip-components", "1", "-xzf", "presto-server-#{version}.tar.gz" + + (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 + -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..1a4ba416236d4 --- /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.5.3.tgz" + sha256 "14841de7b71a93123d22997db22d088debb13976778d869e3622199108e85b4b" + license "MIT" + head "https://github.com/prettier/prettier.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "cb69b804b070304805b7b8cd627382b5ede99c8f10d2f904beec36588d84645d" + 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..943fc663125af --- /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.1.tgz" + sha256 "aae1a7c3dcdbc7e98b4aa456ad090adec954258c65308a0e7ef1c55c7f5e54c9" + license "ISC" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c32988c0ba23d111f611bdc5183ce8bc1ffe67209062029edc73435803c4587a" + 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..ed2445331a79e --- /dev/null +++ b/Formula/p/prettyping.rb @@ -0,0 +1,28 @@ +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.0.1.tar.gz" + sha256 "48ff5dce1d18761c4ee3c860afd3360266f7079b8e85af9e231eb15c45247323" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "507cf7f326024d3e369d6dd816af6391849d3a6c03dd942c5be7df370856317d" + end + + # 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/p/primecount.rb b/Formula/p/primecount.rb new file mode 100644 index 0000000000000..33b310a977bb9 --- /dev/null +++ b/Formula/p/primecount.rb @@ -0,0 +1,37 @@ +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.17.tar.gz" + sha256 "f42abde9cdf133d66ef20296c871e7326ee9bf7a026de5885be6cb8b18affcb7" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "dd191a8713e1cebb4c9e7c63e727a3d98a4c2c59cf139f3183680dab65300f11" + sha256 cellar: :any, arm64_sonoma: "3571b935c636074a568b1de2ff672864cf96aed1dea511253212b01a975d3b9f" + sha256 cellar: :any, arm64_ventura: "bf6acf0ab6d48b10a667f2dd8674fc1a96b9d380988240cf3cf116bd8bbec91b" + sha256 cellar: :any, sonoma: "79a1ea2c7bd5124d5882caa28609c293d22b68a71bca2ede05ad5fbe147e38dc" + sha256 cellar: :any, ventura: "ffff8ef56217acc89e263130120e1977114a76b4fe14883685fc9425ab76f33d" + sha256 cellar: :any_skip_relocation, arm64_linux: "8197787ecf566640c18ce142183ce7ba90d37c315c6e55e45e5550503b7c1ea1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "175a17d85159304392d9a7011a9fb19b2ae46fa0553bb02d4a387758b273e1be" + 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..9ce631d8fb5b2 --- /dev/null +++ b/Formula/p/primer3.rb @@ -0,0 +1,36 @@ +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 + + bottle do + 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..4b524732149f9 --- /dev/null +++ b/Formula/p/primesieve.rb @@ -0,0 +1,29 @@ +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.8.tar.gz" + sha256 "a0bf618a60a6b815c628196da9cb47e878e1414a06b4025acc5a1f9050223282" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "072dc55469ad98fde0be15c7a76f5c445ad8bc7b0a6197dc6384c9f3b675b7cb" + sha256 cellar: :any, arm64_sonoma: "28fdf884dc6f4c4d9977a49d3179d5aa5f440f3433e86e2c7c0052dda2184216" + sha256 cellar: :any, arm64_ventura: "a053a061ebff146a659ab8d7b78ef5d6a20fd7ca791dc20d1c4e2f655edd5b52" + sha256 cellar: :any, sonoma: "17f77017c06b4a90342698668fbdb77d97acf7af1b9456a2553be1fb4c9d1629" + sha256 cellar: :any, ventura: "dabb01f28475cc7d04cd19989ace39586869bba156a8acd35effc1f4dfe0758e" + sha256 cellar: :any_skip_relocation, arm64_linux: "22b00e5b4b4990a40c2c17dbec815193809c38dd4c4e37a70acc66bff091268b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5122a6511be3675c9bf086442ae5f939a817cda7d83fa34b675f6c6d2ffee4a1" + 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..87172563e2e9e --- /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 4 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "74cc8482977efe4ff30d7a6d0bc3e97b764144359dc8f172410e3cf579afab34" + end + + depends_on "python@3.13" + + resource "botocore" do + url "https://files.pythonhosted.org/packages/c7/b6/f73335bd06007e09ae027bb1568fca59f0ffc7773eb295db369b182d7759/botocore-1.35.38.tar.gz" + sha256 "55d9305c44e5ba29476df456120fa4fb919f03f066afa82f2ae400485e7465f4" + 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/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + end + + resource "pydot" do + url "https://files.pythonhosted.org/packages/85/10/4e4da8c271540dc35914e927546cbb821397f0f9477f4079cd8732946699/pydot-3.0.2.tar.gz" + sha256 "9180da540b51b3aa09fbf81140b3edfbe2315d778e8589a7d0a4a69c41332bae" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/83/08/13f3bce01b2061f2bbd582c9df82723de943784cf719a35ac886c652043a/pyparsing-3.1.4.tar.gz" + sha256 "f86ec8d1a83f11977c9a6ea7598e8c27fc5cddfa5b07ea2241edbbde1d7bc032" + 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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..afd4501e223e2 --- /dev/null +++ b/Formula/p/prips.rb @@ -0,0 +1,33 @@ +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 + + bottle do + 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..7a7099ec70d96 --- /dev/null +++ b/Formula/p/prism-cli.rb @@ -0,0 +1,39 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c8333b92f1cfcab951b0ebd6506a1c3449a31e7ea128bfdb68c09a43f8f925fe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c8333b92f1cfcab951b0ebd6506a1c3449a31e7ea128bfdb68c09a43f8f925fe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c8333b92f1cfcab951b0ebd6506a1c3449a31e7ea128bfdb68c09a43f8f925fe" + sha256 cellar: :any_skip_relocation, sonoma: "54e69a8479659e2bb814608927794cb89b42b50e0d76f8d7694696bfa62dd390" + sha256 cellar: :any_skip_relocation, ventura: "54e69a8479659e2bb814608927794cb89b42b50e0d76f8d7694696bfa62dd390" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8333b92f1cfcab951b0ebd6506a1c3449a31e7ea128bfdb68c09a43f8f925fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8333b92f1cfcab951b0ebd6506a1c3449a31e7ea128bfdb68c09a43f8f925fe" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + 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 5 + sleep 10 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/privoxy.rb b/Formula/p/privoxy.rb new file mode 100644 index 0000000000000..582cd6c45cb6e --- /dev/null +++ b/Formula/p/privoxy.rb @@ -0,0 +1,59 @@ +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_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..9dbbab78bb540 --- /dev/null +++ b/Formula/p/prjtrellis.rb @@ -0,0 +1,58 @@ +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 5 + + bottle do + sha256 cellar: :any, arm64_sequoia: "9b1dba8073f95e4e62578867fa4413c96546ed01af8a9368dd71f226e242f824" + sha256 cellar: :any, arm64_sonoma: "c88a90c50cf9b1118812077911e320ada13ad47ca5e26bb9b71cea451cc83935" + sha256 cellar: :any, arm64_ventura: "528c6c2f526e1a8a9a6374a27740ec190b09e2cd8d55166d7adb8954e5f481e5" + sha256 cellar: :any, sonoma: "17166123d4960d5612ddd664fb46a4728162fae98327f379b2940ea05dd5cf61" + sha256 cellar: :any, ventura: "66fe4759bb1294f951a36d578ed68cba116539ddbd4bb71cf73c0f5bc2eca105" + sha256 cellar: :any_skip_relocation, arm64_linux: "c2244c986587aae3a6d6feb0b89d8e2650999ebad9cd3b6f77fe138b1f0b326e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a091d4126aff828ab290e08cf68316f68a7952fb192482a993ab4484dc21a5b" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "boost-python3" + depends_on "python@3.13" + + resource "prjtrellis-db" do + url "https://github.com/YosysHQ/prjtrellis/releases/download/1.4/prjtrellis-db-1.4.zip" + sha256 "4f8a8a5344f85c628fb3ba3862476058c80bcb8ffb3604c5cca84fede11ff9f0" + end + + 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://kmf2.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 diff --git a/Formula/p/probe-rs-tools.rb b/Formula/p/probe-rs-tools.rb new file mode 100644 index 0000000000000..191bc9d01478b --- /dev/null +++ b/Formula/p/probe-rs-tools.rb @@ -0,0 +1,45 @@ +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.27.0.tar.gz" + sha256 "6f37bd7ca85eeac29aea089fa39415b484a74f3415d9f21e94049dfe765325d2" + 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_sequoia: "508ec9c47f72df213ba496904849f96a574322bb8526d4bda346a168f6308eab" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6e32b5cb5ae48ea5cd3c9582e36123874c3b788e3c8742e5cc5926a1de06d31d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bccd39d22e47d157637e9fee024d22993cf6905d670195ec8558532febacc4a3" + sha256 cellar: :any_skip_relocation, sonoma: "cd67fb6caca4c506c2871ac742f577521cd623eb12410fdad1fa19d73b196a07" + sha256 cellar: :any_skip_relocation, ventura: "56eb3d189525faa8e5f30727ece08fe63a00671dbc6faf2cb965c888d865c293" + sha256 cellar: :any_skip_relocation, arm64_linux: "0703782d00468dda9288ee373f050699d7755b8e0409353eefd6b185457dec83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08aa999824302d17acc664b8dcabb80d5f2955f56008feb05d1c74500092c001" + 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..8ceb5a95759a6 --- /dev/null +++ b/Formula/p/procmail.rb @@ -0,0 +1,48 @@ +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 + + bottle do + 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/procps@3.rb b/Formula/p/procps@3.rb new file mode 100644 index 0000000000000..64773f2ed19a5 --- /dev/null +++ b/Formula/p/procps@3.rb @@ -0,0 +1,37 @@ +class ProcpsAT3 < Formula + desc "Utilities for browsing procfs" + homepage "https://gitlab.com/procps-ng/procps" + url "https://gitlab.com/procps-ng/procps/-/archive/v3.3.17/procps-v3.3.17.tar.gz" + sha256 "efa6f6b4625a795f5c8a3d5bd630a121d270bc8573c5a0b6a6068e73611d6cd5" + license "GPL-2.0-or-later" + + bottle do + sha256 x86_64_linux: "680fec0c339075bb267e208f4074688c6699356c76cce5566033b4d11f1b7508" + end + + keg_only :versioned_formula + + disable! date: "2024-10-11", because: :versioned_formula + + 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..1f8aa7f111027 --- /dev/null +++ b/Formula/p/procs.rb @@ -0,0 +1,37 @@ +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_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..bdf9b79b34468 --- /dev/null +++ b/Formula/p/proctools.rb @@ -0,0 +1,57 @@ +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 + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "f7466405a3aab3cd7b00669ea685b1fe463a19bbdd7fef8b8c25f86595de2d34" + sha256 cellar: :any_skip_relocation, high_sierra: "d41f76776e37f54cabf5d76ce2cb89d13052f1221a70b325245f600a7bd047ae" + sha256 cellar: :any_skip_relocation, sierra: "8567dd0ffde620f8b1dd18e0529d670a235bcde6dac7b3f19d6528ecf843613a" + sha256 cellar: :any_skip_relocation, el_capitan: "ed8136da9f7b607eec69d014b1c3f81b9ef3f004f38cc2904400861c0d6adab0" + 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/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/p/procyon-decompiler.rb b/Formula/p/procyon-decompiler.rb new file mode 100644 index 0000000000000..3b1063b61d5aa --- /dev/null +++ b/Formula/p/procyon-decompiler.rb @@ -0,0 +1,34 @@ +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" + + 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..454cb09ba2c77 --- /dev/null +++ b/Formula/p/prodigal.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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, mojave: "8751eedad40b08714b52a78b9cf48e4101ffa4b871a0ab943830a59137a67e53" + sha256 cellar: :any_skip_relocation, high_sierra: "c120fed8e29bb3b1a4ff69d5ca05e051a0fe3822784b3d585e142da3452d1ac1" + sha256 cellar: :any_skip_relocation, sierra: "a27fe5316181d4826e5aa5291d0fc1b1a7087c32c7b4e6aedabf1209d5a8ac36" + sha256 cellar: :any_skip_relocation, el_capitan: "70b432e3d3da1f4089680b06c0745b7dac3611f05d8ec9440faa918bc82d6fe5" + 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 + + 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/p/profanity.rb b/Formula/p/profanity.rb new file mode 100644 index 0000000000000..ac859f06a7dea --- /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.0.tar.gz" + sha256 "4a9f578f750ec9a7c2a4412ba22e601811b92bba877c636631cc3ccc7ceac7fb" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "a125f864203c3d6baa3e2498257ac7bae373dd91ac737a0a098d2e9f9d4b1ab5" + sha256 arm64_sonoma: "1d902913042d0c15d2b1b151215a68e6e230a7355f95209e39e8ea4d54742e03" + sha256 arm64_ventura: "50400b9bdf982500f3d76171990f9379fb287f74f31fa4e58d4e3153940c385f" + sha256 sonoma: "6859c02911c5f4fee55ac153b0ca88c2aabaa254c61438ec1d4e89c55deeae16" + sha256 ventura: "c0626881a455da269346b59f0f2e0fe89e29d42d71a889bcfa7c53976e196f3a" + sha256 arm64_linux: "d5cffb20803a839e6cfcb3d21499a3583abcf0ebea350535b7ffb2fba2866dce" + sha256 x86_64_linux: "935efcd1f5e57ca74f0874255c7fb78027ff498dc76b894163e7e28d91386f28" + 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.13" + 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.13"].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..f577816601b52 --- /dev/null +++ b/Formula/p/proftpd.rb @@ -0,0 +1,57 @@ +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 + sha256 arm64_sequoia: "ff2411cecf1ed7c49a47ab0f432baa31b5e27b9483cc8404179fe4454d0ce186" + sha256 arm64_sonoma: "47c7285cac71305d24a585f231085421221949f7e41da52c4f2d807b5c63e68d" + sha256 arm64_ventura: "556493e923eed83521dbf6cc4cdc92f9feb3ef635e7d00b01eabd0ade523abdb" + sha256 sonoma: "56b20b6b84180fff26fa7f09d6a09a5622912eeafbe47edbdab48dc17ed5d0aa" + sha256 ventura: "cbaa7686fe01b1ee6e707a15cc997cf28b34b9d6ef963ec62680f06cfb322518" + sha256 arm64_linux: "183e2f2eae6a4d81a6d6c692c6fb4c367ffa0f6a1c2a3dc083d4750e7bfea96d" + sha256 x86_64_linux: "3f9384ff1b02d1c0374398868a325d671d60bd9e8a47f7943dd4b7f799c83759" + end + + uses_from_macos "libxcrypt" + + 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}", + "--sbindir=#{sbin}", + "--sysconfdir=#{etc}", + "--localstatedir=#{var}" + ENV.deparallelize + install_user = ENV["USER"] + install_group = Utils.safe_popen_read("groups").split.first + system "make", "all" + system "make", "INSTALL_USER=#{install_user}", "INSTALL_GROUP=#{install_group}", "install" + end + + service do + run [opt_sbin/"proftpd"] + keep_alive false + working_dir HOMEBREW_PREFIX + log_path File::NULL + error_log_path File::NULL + end + + test do + assert_match "ProFTPD Version #{version}", shell_output("#{opt_sbin}/proftpd -v") + end +end diff --git a/Formula/p/prog8.rb b/Formula/p/prog8.rb new file mode 100644 index 0000000000000..f78e10d39ddf9 --- /dev/null +++ b/Formula/p/prog8.rb @@ -0,0 +1,38 @@ +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.3.2.tar.gz" + sha256 "39612423f6afe025fbd24baeaee2f5d61399ae85b186118bfdd609ca7f85b157" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e344f91aa025a43bb4dfb6ef80427a6b478a9a28f6331dace1ebb4b5d246c132" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5598c73083fb8ff691d02dc8ee4804d3a54c504940cd9dfc8e30352f05bf4814" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7cbb13a489ddeacfab5fcae06883d3e2a72fe744ef542343ecc80b23085d31c7" + sha256 cellar: :any_skip_relocation, sonoma: "d63a966cbc3cdd8dcc03fefb6d49359479ac958db7db535b6f5113cf9e6ddee0" + sha256 cellar: :any_skip_relocation, ventura: "cfc9589da9661c562130bbc27af11d4ee9f55c8add4df376e0c4ab565e569d84" + sha256 cellar: :any_skip_relocation, arm64_linux: "4287878ae4f311ce7a610a9be14160d79051e77276318f4e9702a06b0b40bcc0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf5e61604b9294ec1db85479d8620b3ab5bd042db434ea6e59ab029857468374" + 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..d7c889a932de1 --- /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" + + bottle do + 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 + + uses_from_macos "ncurses" + + on_linux do + depends_on "pkgconf" => :build + end + + 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..fd4c481c4838a --- /dev/null +++ b/Formula/p/progressline.rb @@ -0,0 +1,35 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b1ce512768f4802c3951adc6b2dd4add13a71d80ad5e04be15edecf17be6525a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "77d1ab6f1922dbb9b14f3eed38fe30ddd33fdd5c058564389ec692af11e2a943" + sha256 cellar: :any, arm64_ventura: "99959093aafeb1bd100e2f720fbfefc377595338d60e004e31f43b50204e5bf1" + sha256 cellar: :any_skip_relocation, sonoma: "4d86284fddc430f9312ff6e74e0ecd510b6d0b34edcdcaca2c4645c4fbf8cd15" + sha256 cellar: :any, ventura: "1612ae0bb38a9f3a1897a27b87b14509527208e132d6a9d1c4c238bfd5d518ab" + sha256 cellar: :any_skip_relocation, arm64_linux: "e48df80a4b56abf1757d634986174db54dec6d74680a9d6bf65b3847bad0a3f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8429bc2bf925b50e2794b5e1a192e7a4bc896ea666cea8cd33c235a086872266" + 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" + 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..4dc19b41bf309 --- /dev/null +++ b/Formula/p/proguard.rb @@ -0,0 +1,43 @@ +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.7/proguard-7.7.0.tar.gz" + sha256 "6769a5c6219a81651c34554228497b52a4fc162d341e2ff07875b32e730c64d7" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "6cbbd228033de155297ce16984c8f4b876c85c9d4d398c72060241bb5a01e735" + 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..2d8ba61414193 --- /dev/null +++ b/Formula/p/proj.rb @@ -0,0 +1,66 @@ +class Proj < Formula + desc "Cartographic Projections Library" + homepage "https://proj.org/" + url "https://github.com/OSGeo/PROJ/releases/download/9.6.0/proj-9.6.0.tar.gz" + sha256 "d8cae521c311c39513193657e75767f7cfbf2f91bd202fcd4a200028d3b57e14" + license "MIT" + head "https://github.com/OSGeo/proj.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "0261f2c43f7824430e3c60e5babb33aeb669aced7984ec4780d12dd392a59e2c" + sha256 arm64_sonoma: "6d269647a386547eee11e8e093f94540c9f6beb262181ca897f8bf5b248a90da" + sha256 arm64_ventura: "074e44f24a5afb86a56562189c6355f9b409fd6740a5c04a4dc556f3600af078" + sha256 sonoma: "e45bde228e370c95135aa3e8fa3a678ef3bf66e00de487819a784d917420fc40" + sha256 ventura: "22297d1171aa46943b6761b2be9d40b9916c6f15479b678b13808661ce3c716c" + sha256 arm64_linux: "5f93515c62af9522505323647c4aaa4b268ac2064c105db497c54ea999327a57" + sha256 x86_64_linux: "7109cbe388e8dbbc74ffb1511b9dae09dec6ad05e43a59c6ba032171ff3b270a" + 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://download.osgeo.org/proj/proj-data-1.21.zip" + sha256 "6bc292cd5dddefed1972549876587a8d45add1bf05824b6ad48637053719de74" + 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..83c282d6369d3 --- /dev/null +++ b/Formula/p/projectable.rb @@ -0,0 +1,66 @@ +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_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..0c5ed9ed3210e --- /dev/null +++ b/Formula/p/projectm.rb @@ -0,0 +1,83 @@ +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" + + bottle do + 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 mojave: "9f7aef06ab68d557c1c989e08709903511a4fcd74fd166559d4f7bbf6af55548" + 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..edbbde00bd0e7 --- /dev/null +++ b/Formula/p/prometheus-cpp.rb @@ -0,0 +1,46 @@ +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_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..aff1c96379d70 --- /dev/null +++ b/Formula/p/prometheus.rb @@ -0,0 +1,91 @@ +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.3.1.tar.gz" + sha256 "2d4a71efb7c662f265c7af5f7db3367b2a7d3981fdc8860103909148b9a82846" + 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_sequoia: "1530554821070f6a0a8113caca211ed5f9ebf575505786bd22125d73a7758b74" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ede17aaaaa817827a0b151e73fae139cd252d3b9d804ac701aab4b0d66605359" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d325517ee5b7166fc029cb1e8ca5a208dfeb210ecdee80f7de63a474d2a773ba" + sha256 cellar: :any_skip_relocation, sonoma: "8e432e017596f207db19b748643b10583bfc3ab20a1230bf569386c9d5727b78" + sha256 cellar: :any_skip_relocation, ventura: "69f858faddcadb7fb651cba924423dee8bc2f73dcbdd56a5d5ac96d29058e7b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "393241c19c2222cdbc853c703a902fa685684f8e3bd19e313b1f066291212904" + sha256 cellar: :any_skip_relocation, x86_64_linux: "590756e5c7f42fc959e922f2c4b740fadb422da6117f88c931935cf5d6eaa158" + 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..7228b3cb1c966 --- /dev/null +++ b/Formula/p/promptfoo.rb @@ -0,0 +1,34 @@ +class Promptfoo < Formula + desc "Test your LLM app locally" + homepage "https://promptfoo.dev/" + url "https://registry.npmjs.org/promptfoo/-/promptfoo-0.112.7.tgz" + sha256 "ea889b3beeffc2563736860d0965906ee3a333b75e95a2f2429cdd1d76bc799c" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0e674a141ba66666fdc3ac75e2438f3c5af8f26fb05437461243ddb730dc0b30" + sha256 cellar: :any, arm64_sonoma: "d7b8aa3e48760f5a472aa431b10a8649a39c08905684390d6eea47b5c396fe5d" + sha256 cellar: :any, arm64_ventura: "083f6a3ab03c63801d3dd4a06587fc289d4bf9283aa8798f596110b16061c277" + sha256 sonoma: "7b347f73f611ad51bab474aff3a4ef11f437388a72d86e9182731be72608f084" + sha256 ventura: "c5463a1b90c14d76d771b82d6db365b8dd380ec69c20c8c784f37fdd1b51c2ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "c37ef53ccafa5c69516a54f98695b2f1466be476b885f9871b06c9675e1d198a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1582446ee6c87ff5cd9970eb5d5b64f3dee15357995e36dd2e20687dd07be598" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + 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..07d9524ca5812 --- /dev/null +++ b/Formula/p/promtail.rb @@ -0,0 +1,59 @@ +class Promtail < Formula + desc "Log agent for Loki" + homepage "https://grafana.com/loki" + url "https://github.com/grafana/loki/archive/refs/tags/v3.5.0.tar.gz" + sha256 "584d7f45cc85f884e8eb7e8ed8c35eacd2157c6edd0f2a2d0161ba39d22b86ae" + 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_sequoia: "a18ca8d85e8eff9655dc09ba314f177301a053c60375411482e1d43471201f81" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "38540001bdb70e65b5b285332e7a2d0db6b903f583ab1329c123f657226bfd48" + sha256 cellar: :any_skip_relocation, arm64_ventura: "89e9e892ce8e374ce1cfeff3d75076a1fdc8c3bc5fee5fd8c15c5bab0c369917" + sha256 cellar: :any_skip_relocation, sonoma: "9674fba5c336a8b684856ccbf9d21fbc3d6acbd072f35611d929312e3d60543e" + sha256 cellar: :any_skip_relocation, ventura: "ecbe3543e0d56f289e46f6c25edaf01591878d4cf4ff2f9428e0016a4195741c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0807b22381049e32bc05990e02c663abac6f3d48446d55ae736480232734a627" + end + + depends_on "go" => :build + + on_linux do + depends_on "systemd" + 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..8ef7f32037b18 --- /dev/null +++ b/Formula/p/proof-general.rb @@ -0,0 +1,58 @@ +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" + + bottle do + rebuild 1 + 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..0f96905100c43 --- /dev/null +++ b/Formula/p/proper.rb @@ -0,0 +1,38 @@ +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_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..c583863c8227b --- /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 2 + sha256 cellar: :any_skip_relocation, all: "fe5583b1309c7b518421055b260ab9d02734219408b363a30daf2feefb54ecee" + end + + depends_on "python@3.13" + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"proselint", shells: [:fish, :zsh], 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..b1169cd0b6f03 --- /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.5/proteinortho-v6.3.5.tar.gz" + sha256 "1b477657c44eeba304d3ec6d5179733d4c2b3857ad92dcbfe151564790328ce0" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "fb9d08681faf0c8464fa65b131900c097876bac2c1a3c340dfaa85ad3a459702" + sha256 cellar: :any, arm64_sonoma: "26e80497cc9d2284466a31dcc6dfd95357ea071ccc733c60eb0e79a086af374d" + sha256 cellar: :any, arm64_ventura: "8e23bd4abefac07aca474bba3e4e56f469b38cd7e3c9e46f792e573710415009" + sha256 cellar: :any, sonoma: "e1862ac62a9b9b594a008d5e50c30faa0388224af3249a0b8f0f4f8ee1666aea" + sha256 cellar: :any, ventura: "fc7eddf0b7441b7bcf81cdf6fe97ebb3c53354a4f538569a5334f554338f6c86" + sha256 cellar: :any_skip_relocation, arm64_linux: "833760c644e5a42573ff7166c7b1201a925847350deb7a8ff7e35fc7ba97a02c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f93ee04f2ff9dc0c6a526f1567f6410deefaf8b4e340994ecd98734c9c685181" + 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..2a3a4503078a0 --- /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.49.1.tar.gz" + sha256 "a52d107dcd27088f7c5957c50beddc7bf264572b9211a1c9adda69bbeca72645" + 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_sequoia: "f948675b4f97fe1b693535e7889b39877565de431794df0417fca1c16c73203e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "640404e75f4ed2f31616b67ec355917a5a4b175dcc07ea0089000998524ab673" + sha256 cellar: :any_skip_relocation, arm64_ventura: "435b98997038400decc468f3255462af67958d11f720a7bc03fda7c639163765" + sha256 cellar: :any_skip_relocation, sonoma: "ff261d2845fa20ade56d1d05851779c8a9ee255369d8f4bf0c3981498ebdbc41" + sha256 cellar: :any_skip_relocation, ventura: "078957fe1f309d79682158a5acc47388d78873bf7815ddc53a611a85e9c58453" + sha256 cellar: :any_skip_relocation, arm64_linux: "ba9ce944d1765a7b89ff41a11affb0402bade5d59da5ff018c958fdbb44b46d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f95c44bf379c6ebed2c77b3407844106501bd4e0579fd14ca659bdc724e8988c" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + + on_linux do + 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..186af646c8dcf --- /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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a4c6dbe4ec1d26e23e6e64fcf119bf6b09c558fb4433a53be2e2de0e1ed6611a" + sha256 cellar: :any, arm64_sonoma: "2c43aeeb810402ebfda6130aa5c542e039ef220430beff018ea5f882d2507ff9" + sha256 cellar: :any, arm64_ventura: "34f6256e4e965cb4feabad6f18797443f9b8828019e2a8952ae5e4d71a180b13" + sha256 cellar: :any, sonoma: "3bf90fd0fb9e303a6c50b66e2ac116c30a81b45491b3345027f3ba6d0e87e841" + sha256 cellar: :any, ventura: "7489118f2098d2374da1776d28924c0830a235ee20128383d0c7deae7ed7e04b" + sha256 cellar: :any_skip_relocation, arm64_linux: "dae0763672aca79ff944c60ecb03b040c47f7e1f6be998f7c473977ba9d689fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b145453b03874422ac9c7890113ae68c34c07d679ba05f47e2bab90b093a59e9" + 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..2da66f1470894 --- /dev/null +++ b/Formula/p/protobuf.rb @@ -0,0 +1,77 @@ +class Protobuf < Formula + desc "Protocol buffers (Google's data interchange format)" + homepage "https://protobuf.dev/" + url "https://github.com/protocolbuffers/protobuf/releases/download/v29.3/protobuf-29.3.tar.gz" + sha256 "008a11cc56f9b96679b4c285fd05f46d317d685be3ab524b2a310be0fbad987e" + license "BSD-3-Clause" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "8ac9ede06ec4f11b5b2c47b3f15a35cfb74043b716e4a91b4287b7345cdd80fb" + sha256 arm64_sonoma: "2150b2720b5ae9bae3d1a7389b5ffb7085847eea5d0acf2757ebccb68289ca29" + sha256 arm64_ventura: "1db7cb15f9a82062cec8fb21d911eade129bb44067ea936db52ae42411a3e864" + sha256 cellar: :any, sonoma: "c02c1b1d259c09adfb869080dbbda7737d50fa6a3f0da77e431900f903cbea7a" + sha256 cellar: :any, ventura: "1d5a65d7d6155938c6de69878710c8058da2e57c61fcc4d45af0e189cebb7154" + sha256 cellar: :any_skip_relocation, arm64_linux: "03fc2bf06769c453368a8018168655efce163d57cda11671a5bd92306f864bdd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d26e7e4f01c1f4259ddaacdaab92bb709623e2e4b0ba963400d26c367c24d4b3" + end + + depends_on "cmake" => :build + depends_on "abseil" + uses_from_macos "zlib" + + on_macos do + # We currently only run tests on macOS. + # Running them on Linux requires rebuilding googletest with `-fPIC`. + depends_on "googletest" => :build + end + + # Backport to expose java-related symbols + patch do + url "https://github.com/protocolbuffers/protobuf/commit/9dc5aaa1e99f16065e25be4b9aab0a19bfb65ea2.patch?full_index=1" + sha256 "edc1befbc3d7f7eded6b7516b3b21e1aa339aee70e17c96ab337f22e60e154d7" + end + + 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=#{OS.mac? ? "ON" : "OFF"} + -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" if OS.mac? + 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..007ebb9d65509 --- /dev/null +++ b/Formula/p/protobuf@21.rb @@ -0,0 +1,101 @@ +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_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 + + 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..c1e3d870c865c --- /dev/null +++ b/Formula/p/protobuf@29.rb @@ -0,0 +1,82 @@ +class ProtobufAT29 < Formula + desc "Protocol buffers (Google's data interchange format)" + homepage "https://protobuf.dev/" + url "https://github.com/protocolbuffers/protobuf/releases/download/v29.4/protobuf-29.4.tar.gz" + sha256 "6bd9dcc91b17ef25c26adf86db71c67ec02431dc92e9589eaf82e22889230496" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^v?(29(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "201dfed6c12d9a7eb607c3f42c880633f92ef4c0ac74f09d87c8698104b0d6fe" + sha256 arm64_sonoma: "44a4fec5d0f3979f8ed747fcbf4d957f0b71ce5cfb95dc0dfa45f29ecc289ee8" + sha256 arm64_ventura: "2a4d3e77575a4867e8374dea35c266096cac7178bdea9f3a097d47d308b0fa31" + sha256 cellar: :any, sonoma: "eb0a700c134c204d4c933894671fc3d77933997d75403455b0b15ff4273932f3" + sha256 cellar: :any, ventura: "e6d5d1bb932672dab79550da9bd7794054d6c071771afec9b983959703e5559e" + sha256 cellar: :any_skip_relocation, arm64_linux: "54d6518d1895616b61f84a09080472e3f92616b597e83e9a7fccb89f924a6202" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c4e211562fcd5b1ed97bee9dff771e5b03b667d15f7c8ce066d6659c28a854d" + 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 "abseil" + uses_from_macos "zlib" + + on_macos do + # We currently only run tests on macOS. + # Running them on Linux requires rebuilding googletest with `-fPIC`. + depends_on "googletest" => :build + end + + # Backport to expose java-related symbols + patch do + url "https://github.com/protocolbuffers/protobuf/commit/9dc5aaa1e99f16065e25be4b9aab0a19bfb65ea2.patch?full_index=1" + sha256 "edc1befbc3d7f7eded6b7516b3b21e1aa339aee70e17c96ab337f22e60e154d7" + end + + 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=#{OS.mac? ? "ON" : "OFF"} + -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" if OS.mac? + 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@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..9f0e0aa107621 --- /dev/null +++ b/Formula/p/protoc-gen-doc.rb @@ -0,0 +1,43 @@ +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_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, 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..2f5b1344c6346 --- /dev/null +++ b/Formula/p/protoc-gen-go-grpc.rb @@ -0,0 +1,51 @@ +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_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..9b4527483b64a --- /dev/null +++ b/Formula/p/protoc-gen-go.rb @@ -0,0 +1,41 @@ +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.6.tar.gz" + sha256 "afa2b0e8f86d6da9d09c51ab4270d93c2888327220316982be9db345f523a6a1" + license "BSD-3-Clause" + head "https://github.com/protocolbuffers/protobuf-go.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "24ad37f1f73d1474cfa3a1b6218b9800b4216f5ba530dcb842328474c2797524" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "24ad37f1f73d1474cfa3a1b6218b9800b4216f5ba530dcb842328474c2797524" + sha256 cellar: :any_skip_relocation, arm64_ventura: "24ad37f1f73d1474cfa3a1b6218b9800b4216f5ba530dcb842328474c2797524" + sha256 cellar: :any_skip_relocation, sonoma: "27d05a9fb2bd374860fe55eef13ec0c0f42ec4341719e69b0eced035c04e494b" + sha256 cellar: :any_skip_relocation, ventura: "27d05a9fb2bd374860fe55eef13ec0c0f42ec4341719e69b0eced035c04e494b" + sha256 cellar: :any_skip_relocation, arm64_linux: "d5fb6bfcb3e2cf28ab4e97c2f41d215dac135638eaf4be1836ccceadff88adea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4be3e922fc3702067fda53a06bcad228ed713198afcda82079e6611e05cbea64" + 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..3957677288e4b --- /dev/null +++ b/Formula/p/protoc-gen-grpc-java.rb @@ -0,0 +1,51 @@ +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.72.0.tar.gz" + sha256 "524a3d687f06ffd1c6ab66dbbb5de5b9f6adaa662570aa56e553d86c2065eb31" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a280f76a988ef5687ffa6eb223727986ab2cf513cc051a608978c6df0270ef76" + sha256 cellar: :any, arm64_sonoma: "fca9edd4960cf6b741e710392c0150231a5c4dd57d044838b55baf6a885e6c2f" + sha256 cellar: :any, arm64_ventura: "472759f812aa8ce1cc1ddbb6c5f6fe0a1bffb7bda96c59e1580d07ce615fa711" + sha256 cellar: :any, sonoma: "3ea86eefaf5d7940610044a2b3f2e459c2c1d0d0a3859e317120eaefaa67f190" + sha256 cellar: :any, ventura: "03a5350317cc75ebf19ba4cbef9333351bf6016bff7482ae02a652361c9d269d" + sha256 cellar: :any_skip_relocation, arm64_linux: "c28a8f3f8b7ba9af498ec433e6305639cb5a040cead45e2dad89ec47c591059f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7de2038322100e5f877a675a79d24d00d669b4347fdde6f5724325da2669eac0" + end + + depends_on "gradle" => :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 + + system "gradle", "--no-daemon", "--project-dir=compiler", "-PskipAndroid=true", "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..7025f759b31e7 --- /dev/null +++ b/Formula/p/protoc-gen-grpc-swift.rb @@ -0,0 +1,58 @@ +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/1.2.0.tar.gz" + sha256 "63d15e901e46c609915cb5a797537416ab60bb5b21bcdb8a5ed57776f6a0bf65" + 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_sequoia: "e57d5d774c7744e571795d8425a8737e2ccaa05c166110340e5b4de912f9ae48" + sha256 cellar: :any_skip_relocation, arm64_linux: "2071381a7b1744b63fc6fd3f853f335e8fec96ab8acc759d5acec4550729ff06" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b6e68af5721a017a348cd215ae95026eb35360a5b1f1c86f7f46698b9a1cccd" + 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" + bin.install ".build/release/protoc-gen-grpc-swift" + 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_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..271180728bbae --- /dev/null +++ b/Formula/p/protoc-gen-grpc-web.rb @@ -0,0 +1,133 @@ +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/1.5.0.tar.gz" + sha256 "d3043633f1c284288e98e44c802860ca7203c7376b89572b5f5a9e376c2392d5" + license "Apache-2.0" + revision 10 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5f15c9d2e0c6f55a452fc236d472a1463edfc821b0d04998d200b1d4e535e199" + sha256 cellar: :any, arm64_sonoma: "ad9341d5ec52e3f58bfa1503c39ee620cab932e2cd052b0fc9d779144b1f6359" + sha256 cellar: :any, arm64_ventura: "e75fe6e52a34704e491c74ba4ec5b7b666ce5981395525608b600777172d0714" + sha256 cellar: :any, sonoma: "e4ffa319ad9007d9a03c708c7cb66db24e7a8f377763544db0c30ae0894c06c6" + sha256 cellar: :any, ventura: "6ea7c8bc3e7ef2e5920f352f956f22f0c877b2e167969e0218a7611a88fedcf5" + sha256 cellar: :any_skip_relocation, arm64_linux: "777cde709def0014575f71ae1d8b7393b4174040239e55f90a3d15709fb4ed65" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ffc6a7234cf346ecf50d21f4835314df63946f01d3a5df6960db7ef5281783e3" + 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" + + # Backport of https://github.com/grpc/grpc-web/commit/2c39859be8e5bcf55eef129e5a5330149ce460ab + patch :DATA + + 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" + # Specify including lib for `tsc` since `es6` is required for `@types/google-protobuf`. + system "tsc", "--lib", "es6", "test.ts" + end +end + +__END__ +diff --git a/javascript/net/grpc/web/generator/grpc_generator.cc b/javascript/net/grpc/web/generator/grpc_generator.cc +index 158a335bb..1eb97b35d 100644 +--- a/javascript/net/grpc/web/generator/grpc_generator.cc ++++ b/javascript/net/grpc/web/generator/grpc_generator.cc +@@ -841,13 +841,11 @@ void PrintProtoDtsMessage(Printer* printer, const Descriptor* desc, + "set$js_field_name$(value?: $js_field_type$): " + "$class_name$;\n"); + } +- if (field->has_optional_keyword() || +- (field->type() == FieldDescriptor::TYPE_MESSAGE && +- !field->is_repeated() && !field->is_map())) { ++ if (field->has_presence()) { + printer->Print(vars, "has$js_field_name$(): boolean;\n"); + } +- if (field->type() == FieldDescriptor::TYPE_MESSAGE || field->has_optional_keyword() || +- field->is_repeated() || field->is_map()) { ++ if (field->type() == FieldDescriptor::TYPE_MESSAGE || ++ field->has_presence() || field->is_repeated() || field->is_map()) { + printer->Print(vars, "clear$js_field_name$(): $class_name$;\n"); + } + if (field->is_repeated() && !field->is_map()) { +@@ -867,14 +865,12 @@ void PrintProtoDtsMessage(Printer* printer, const Descriptor* desc, + printer->Print("\n"); + } + +- for (int i = 0; i < desc->oneof_decl_count(); i++) { +- const OneofDescriptor* oneof = desc->oneof_decl(i); +- if (!oneof->is_synthetic()) { +- vars["js_oneof_name"] = ToUpperCamel(ParseLowerUnderscore(oneof->name())); +- printer->Print( +- vars, "get$js_oneof_name$Case(): $class_name$.$js_oneof_name$Case;\n"); +- printer->Print("\n"); +- } ++ for (int i = 0; i < desc->real_oneof_decl_count(); i++) { ++ const OneofDescriptor *oneof = desc->real_oneof_decl(i); ++ vars["js_oneof_name"] = ToUpperCamel(ParseLowerUnderscore(oneof->name())); ++ printer->Print( ++ vars, "get$js_oneof_name$Case(): $class_name$.$js_oneof_name$Case;\n"); ++ printer->Print("\n"); + } + + printer->Print( +@@ -904,8 +900,7 @@ void PrintProtoDtsMessage(Printer* printer, const Descriptor* desc, + } + vars["js_field_name"] = js_field_name; + vars["js_field_type"] = AsObjectFieldType(field, file); +- if ((field->type() != FieldDescriptor::TYPE_MESSAGE && !field->has_optional_keyword()) || +- field->is_repeated()) { ++ if (!field->has_presence()) { + printer->Print(vars, "$js_field_name$: $js_field_type$,\n"); + } else { + printer->Print(vars, "$js_field_name$?: $js_field_type$,\n"); diff --git a/Formula/p/protoc-gen-js.rb b/Formula/p/protoc-gen-js.rb new file mode 100644 index 0000000000000..e00742ebfab16 --- /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/v3.21.4.tar.gz" + sha256 "8cef92b4c803429af0c11c4090a76b6a931f82d21e0830760a17f9c6cb358150" + license "BSD-3-Clause" + revision 9 + head "https://github.com/protocolbuffers/protobuf-javascript.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e1d3eb4bac2263ba923f679559e88d7b4c12f678e17399438356941b18604643" + sha256 cellar: :any, arm64_sonoma: "61cd3b85437197c9c3032340d1eb85ba1f94843487e60ce1b6338f61204c7f30" + sha256 cellar: :any, arm64_ventura: "04cd632b292fabc0152c3943e52cd82ed5e8e069d5ad4098177f9498d7e34988" + sha256 cellar: :any, sonoma: "4e1ad32e594ae4a51b04667c0a136ef07a9db1e568fe9d6a303ae8308efcee55" + sha256 cellar: :any, ventura: "101b027ec794658d1a0684c7da07966c1a62463216e02c6a13b959009da82e92" + sha256 cellar: :any_skip_relocation, arm64_linux: "b33b76262e0a6ea80580c7b069b844f3e6de051d1dd0ca0abea845dd95d859c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c81f134c3f3caa2d1e6a79ff11568332a896a1d102b5ff686b8f9f90601eb657" + 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..e2e13e9e38f3e --- /dev/null +++ b/Formula/p/protolint.rb @@ -0,0 +1,53 @@ +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.55.2.tar.gz" + sha256 "95130aa86fb21515d29fe4b2d31dcba873f12ac490159b1cad5892363b0df636" + license "MIT" + head "https://github.com/yoheimuta/protolint.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4e54109fa4b9025a5a3a389e35634b4700308cdcc49b9bc71e45f662b93539d3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4e54109fa4b9025a5a3a389e35634b4700308cdcc49b9bc71e45f662b93539d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4e54109fa4b9025a5a3a389e35634b4700308cdcc49b9bc71e45f662b93539d3" + sha256 cellar: :any_skip_relocation, sonoma: "5c9d44c414fda494a75012380edc17efa7bac3a496566be709c0fadaa6856b24" + sha256 cellar: :any_skip_relocation, ventura: "5c9d44c414fda494a75012380edc17efa7bac3a496566be709c0fadaa6856b24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "56a84caa14100c3ea73f87f180fb0d4ab8b38a3428fa5794715b1bdf7a6d3663" + 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/prover9.rb b/Formula/p/prover9.rb new file mode 100644 index 0000000000000..a3703c6faffd6 --- /dev/null +++ b/Formula/p/prover9.rb @@ -0,0 +1,114 @@ +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 + + bottle do + 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, mojave: "5ae1f642fa781841fc843a548b5327cf1dfb8d8c4fbe5ea83ddffef004282d57" + sha256 cellar: :any_skip_relocation, high_sierra: "055cf6646dd19effa87d7b9fa8e820c24710a023bcefc98c35604205530ab2c3" + 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..f3fd75861906a --- /dev/null +++ b/Formula/p/prowler.rb @@ -0,0 +1,735 @@ +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/ac/cd/fb77106fd83fdafe8e4f27a6de426f4ec931fc527298fcbc8c2dcc845aee/prowler-5.6.0.tar.gz" + sha256 "ee06323c67e0b95c9b54164a7523821913711d21d9411aad5f55ba3ef0b4dbed" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1248ba67b0f33a0326041eb0733d1674029f0ebb3fcce21c77d42f241ab4c5b1" + sha256 cellar: :any, arm64_sonoma: "c0da586baf9f61c0978d815719478fa6631df52bdc72cdcc0beef9e1d02d8b28" + sha256 cellar: :any, arm64_ventura: "8a8cb17d00ad3c159eea6c2eb97db82af8a524523f063592770e69720ae49c0f" + sha256 cellar: :any, sonoma: "8bb8ddc9c83707977a163c5043dbbe8d1acddbec6665fe6d1443fa3c6bf7034b" + sha256 cellar: :any, ventura: "892f76b20ab7d1bb4bc17035b2cc7a23b18b9fa982caaa0278a4db10662e6dc9" + sha256 cellar: :any_skip_relocation, arm64_linux: "77e87d53f6642204199754763609a448a6a9e5a38bd08fff0ad09f7519eb882a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92563a040f176664aa55fe100491521c82364c74fd233ff8e77382ff99572e25" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "rust" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "numpy" + depends_on "python@3.12" # https://github.com/prowler-cloud/prowler/blob/master/pyproject.toml#L68 + + on_linux do + depends_on "patchelf" => :build + end + + 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/63/e7/fa1a8c00e2c54b05dc8cb5d1439f627f7c267874e3f7bb047146116020f9/aiohttp-3.11.18.tar.gz" + sha256 "ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + end + + resource "alive-progress" do + url "https://files.pythonhosted.org/packages/28/66/c2c1e6674b3b7202ce529cf7d9971c93031e843b8e0c86a85f693e6185b8/alive-progress-3.2.0.tar.gz" + sha256 "ede29d046ff454fe56b941f686f89dd9389430c4a5b7658e445cb0b80e0e4deb" + end + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + 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/c9/29/ff7a519a315e41c85bab92a7478c6acd1cf0b14353139a08caee4c691f77/azure_core-1.34.0.tar.gz" + sha256 "bdb544989f246a0ad1c85d72eeb45f2f835afdcbc5b45e43f0dbde7461c81ece" + 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-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/48/9a/9bdc35295a16fe9139a1f99c13d9915563cbc4f30b479efaa40f8694eaf7/azure_mgmt_core-1.5.0.tar.gz" + sha256 "380ae3dfa3639f4a5c246a7db7ed2d08374e88230fd0da3eb899f7c11e5c441a" + 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-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-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-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-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/f7/99/3e8b48f15580672eda20f33439fc1622bd611f6238b6d05407320e1fb98c/boto3-1.35.99.tar.gz" + sha256 "e0abd794a7a591d90558e92e29a9f8837d25ece8e3c120e530526fe27eba5fca" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/7c/9c/1df6deceee17c88f7170bad8325aa91452529d683486273928eecfd946d8/botocore-1.35.99.tar.gz" + sha256 "1eab44e969c39c5f3d9a3104a0836c24715579a455f12b3979a31d7cde51b3c3" + 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/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/5f/1d/45434f64ed749540af821fd7e42b8e4d23ac04b1eda7c26613288d6cd8a8/click-plugins-1.1.1.tar.gz" + sha256 "46ab999744a9d831159c3411bb0c79346d94a444df9a3a3742e9ed63645f264b" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "dash" do + url "https://files.pythonhosted.org/packages/cf/ae/dfd8c42c83cad1b903e4e3e7be7042074d5d7d16be97eaede6656b8ead95/dash-2.18.2.tar.gz" + sha256 "20e8404f73d0fe88ce2eae33c25bbc513cbe52f30d23a401fa5f24dbb44296c8" + end + + resource "dash-bootstrap-components" do + url "https://files.pythonhosted.org/packages/a6/1e/59da44351adaaa2a747eb00993c498cadbe0f642b44ced7e7aabf368eaf6/dash_bootstrap_components-1.6.0.tar.gz" + sha256 "960a1ec9397574792f49a8241024fa3cecde0f5930c971a3fc81f016cbeb1095" + end + + resource "dash-core-components" do + url "https://files.pythonhosted.org/packages/41/55/ad4a2cf9b7d4134779bd8d3a7e5b5f8cc757f421809e07c3e73bb374fdd7/dash_core_components-2.0.0.tar.gz" + sha256 "c6733874af975e552f95a1398a16c2ee7df14ce43fa60bb3718a3c6e0b63ffee" + end + + resource "dash-html-components" do + url "https://files.pythonhosted.org/packages/14/c6/957d5e83b620473eb3c8557a253fb01c6a817b10ca43d3ff9d31796f32a6/dash_html_components-2.0.0.tar.gz" + sha256 "8703a601080f02619a6390998e0b3da4a5daabe97a1fd7a9cebc09d015f26e50" + end + + resource "dash-table" do + url "https://files.pythonhosted.org/packages/3a/81/34983fa0c67125d7fff9d55e5d1a065127bde7ca49ca32d04dedd55f9f35/dash_table-5.0.0.tar.gz" + sha256 "18624d693d4c8ef2ddec99a6f167593437a7ea0bf153aa20f318c170c5bc7308" + 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/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + end + + resource "durationpy" do + url "https://files.pythonhosted.org/packages/31/e9/f49c4e7fccb77fa5c43c2480e09a857a78b41e7331a75e128ed5df45c56b/durationpy-0.9.tar.gz" + sha256 "fd3feb0a69a0057d582ef643c355c40d2fa1c942191f914d12203b1a01ac722a" + 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/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + end + + resource "flask" do + url "https://files.pythonhosted.org/packages/41/e1/d104c83026f8d35dfd2c261df7d64738341067526406b40190bc063e829a/flask-3.0.3.tar.gz" + sha256 "ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/ee/f4/d744cba2da59b5c1d88823cf9e8a6c74e4659e2b27604ed973be2a0bf5ab/frozenlist-1.6.0.tar.gz" + sha256 "b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68" + end + + resource "google-api-core" do + url "https://files.pythonhosted.org/packages/1f/5a/746a50ac46d6cb716fa30bf5686663ac27fb2616d07391d1e8d919dc2acc/google_api_core-2.25.0rc1.tar.gz" + sha256 "ec279085923652b0d2e4c72fd6bb926ee17e9c960f0b8a472df146a42493957e" + 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/94/a5/38c21d0e731bb716cffcf987bd9a3555cb95877ab4b616cfb96939933f20/google_auth-2.40.1.tar.gz" + sha256 "58f0e8416a9814c1d86c9b7f6acf6816b51aba167b2c76821965271bac275540" + 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/39/24/33db22342cf4a2ea27c9955e6713140fedd51e8b141b5ce5260897020f1a/googleapis_common_protos-1.70.0.tar.gz" + sha256 "0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257" + end + + resource "grapheme" do + url "https://files.pythonhosted.org/packages/ce/e7/bbaab0d2a33e07c8278910c1d0d8d4f3781293dfbc70b5c38197159046bf/grapheme-0.6.0.tar.gz" + sha256 "44c2b9f21bbe77cfb05835fec230bd435954275267fea1858013b102f8603cca" + 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/1b/38/d7f80fd13e6582fb8e0df8c9a653dcc02b03ca34f4d72f34869298c5baf8/h2-4.2.0.tar.gz" + sha256 "c8a52129695e88b1a0578d8d2cc6842bbd79128ac685463b887ee278126ad01f" + 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/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 "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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/33/08/c1395a292bb23fd03bdf572a1357c5a733d3eecbab877641ceacab23db6e/importlib_metadata-8.6.1.tar.gz" + sha256 "310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580" + 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/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" + sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" + end + + resource "kubernetes" do + url "https://files.pythonhosted.org/packages/b7/e8/0598f0e8b4af37cd9b10d8b87386cf3173cb8045d834ab5f6ec347a758b3/kubernetes-32.0.1.tar.gz" + sha256 "42f43d49abd437ada79a79a16bd48a604d3471a117a8347e87db693f2ba0ba28" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/3f/90/81dcc50f0be11a8c4dcbae1a9f761a26e5f905231330a7cacc9f04ec4c61/msal-1.32.3.tar.gz" + sha256 "5eea038689c78a5a70ca8ecbe1245458b55a857bd096efb6989c69ba15985d35" + 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/d7/9a/f078f7d0ea8f55ba5c85fa53487bd6ffec2403542c117bf5b2a8b86f11a5/msgraph_core-1.3.3.tar.gz" + sha256 "a3226b08b4cf9b6dbb16b868be21d5f82d8ee514ae8e46d9f0cad896159ef8d3" + 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/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + end + + resource "narwhals" do + url "https://files.pythonhosted.org/packages/dd/fa/f4c2b2524b6b1e7475af933849ecaad280822eab5631151ccb1993d600ce/narwhals-1.38.2.tar.gz" + sha256 "7c5fbc9f2b8e1d5d95f49dcef9c2d94bf17810de68c87ff195dc7d22f7b3eeb5" + 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 "oauthlib" do + url "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + end + + resource "opentelemetry-api" do + url "https://files.pythonhosted.org/packages/42/40/2359245cd33641c2736a0136a50813352d72f3fc209de28fb226950db4a1/opentelemetry_api-1.32.1.tar.gz" + sha256 "a5be71591694a4d9195caf6776b055aa702e964d961051a0715d05f8632c32fb" + end + + resource "opentelemetry-sdk" do + url "https://files.pythonhosted.org/packages/a3/65/2069caef9257fae234ca0040d945c741aa7afbd83a7298ee70fc0bc6b6f4/opentelemetry_sdk-1.32.1.tar.gz" + sha256 "8ef373d490961848f525255a42b193430a0637e064dd132fd2a014d94792a092" + end + + resource "opentelemetry-semantic-conventions" do + url "https://files.pythonhosted.org/packages/5e/b6/3c56e22e9b51bcb89edab30d54830958f049760bbd9ab0a759cece7bca88/opentelemetry_semantic_conventions-0.53b1.tar.gz" + sha256 "4c5a6fede9de61211b2e9fc1e02e8acacce882204cd770177342b6a3be682992" + 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/c7/cc/e41b5f697ae403f0b50e47b7af2e36642a193085f553bf7cc1169362873a/plotly-6.0.1.tar.gz" + sha256 "dd8400229872b6e3c964b099be699f8d00c489a974f2cfccfad5e8240873366b" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + 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/c8/8c/cf2ac658216eebe49eaedf1e06bc06cbf6a143469236294a1171a51357c3/protobuf-6.30.2.tar.gz" + sha256 "35c859ae076d8c56054c25b59e5e59638d86545ed6e2b6efac6be0b6ea3ba048" + end + + resource "py-ocsf-models" do + url "https://files.pythonhosted.org/packages/f7/b7/2810026d92c92f1b5b5c56553f941b6b40beab564957cc708d4a47e25eb6/py_ocsf_models-0.3.1.tar.gz" + sha256 "60defd2cc86e8882f42dc9c6dacca6dc16d6bc05f9477c2a3486a0d4b5882b94" + 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/c3/e9/d99a2c4f8f6d7c711f39f6ecf485b7f3bba66189bbbad505d24eb0106922/pydantic-1.10.21.tar.gz" + sha256 "64b48e2b609a6c22178a56c408ee1215a7206077ecb8a193e2fda31858b2362a" + 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/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + 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/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/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 "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/ce/70/15ce8551d65b324e18c5aa6ef6998880f21ead51ebe5ed743c0950d7d9dd/retrying-1.3.4.tar.gz" + sha256 "345da8c5765bd982b1d1915deb9102fd3d1f7ad16bd84a9700b85f64d24e8f3e" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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/c0/0a/1cdbabf9edd0ea7747efdf6c9ab4e7061b085aa7f9bfc36bb1601563b069/s3transfer-0.10.4.tar.gz" + sha256 "29edc09801743c21eb5ecbc617a152df41d3c287f67b615f73e5f750583666a7" + end + + resource "schema" do + url "https://files.pythonhosted.org/packages/d4/01/0ea2e66bad2f13271e93b729c653747614784d3ebde219679e41ccdceecd/schema-0.7.7.tar.gz" + sha256 "7da553abd2958a19dc2547c388cde53398b39196175a9be59ea1caf5ab0a1807" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/70/dc/3976b322de9d2e87ed0007cf04cc7553969b6c7b3f48a565d0333748fbcd/setuptools-80.3.1.tar.gz" + sha256 "31e2c58dbb67c99c289f51c16d899afedae292b978f8051efaf6262d8212f927" + 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/d8/dd/7b24308aa0a35d14d3f87a54d7c74307e0efbe08c9af092960bd25d83419/std_uritemplate-2.0.3.tar.gz" + sha256 "ad4cb1d671bcf4a3608b3598c687be4b0929867c53a2d69c105989da6a5a2d4c" + 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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + 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/d2/5a/4742fdba39cd02a56226815abfa72fe0aa81c33bed16ed045647d6000eba/uritemplate-4.1.1.tar.gz" + sha256 "4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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 "werkzeug" do + url "https://files.pythonhosted.org/packages/d4/f9/0ba83eaa0df9b9e9d1efeb2ea351d0677c37d41ee5d0f91e98423c7281c9/werkzeug-3.0.6.tar.gz" + sha256 "a8dd59d4de28ca70471a34cba79bed5f7ef2e036a76b3ab0835474246eb41f8d" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + end + + resource "xlsxwriter" do + url "https://files.pythonhosted.org/packages/a7/d1/e026d33dd5d552e5bf3a873dee54dad66b550230df8290d79394f09b2315/xlsxwriter-3.2.3.tar.gz" + sha256 "ad6fd41bdcf1b885876b1f6b7087560aecc9ae5a9cc2ba97dcac7ab2e210d3d5" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/62/51/c0edba5219027f6eab262e139f73e2417b0f4efffa23bf562f6e18f76ca5/yarl-1.20.0.tar.gz" + sha256 "686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + # Multiple resources require `setuptools`, so it must be installed first + venv = virtualenv_install_with_resources without: "plotly", start_with: "setuptools" + venv.pip_install resource("plotly"), build_isolation: false + 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..79e9a54916f0a --- /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.15.tar.gz" + sha256 "21e7d9cfa047d66353e98daeaff9d182091168e2385746dbbd0c194de792fbb5" + license "MIT" + head "https://github.com/projectdiscovery/proxify.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1f8b9039a24126726cf99072edaf44c728c0f71728bc6a87ed69dfab954c0ef1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "43240776e0cca25746be42bd5598599c94852a9a8350eecaac7c16f5c1eea114" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9ccc8da7bc76d1dcac5a26c38701d66d17e47748db1b2faccd16aea943b26f8e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ab56f08717ac71f15def86e44d0c428f556e3f908ac7fc872c75d77c0d4093dd" + sha256 cellar: :any_skip_relocation, sonoma: "38d0cf3fbfc6f854c16756dc89363e97b5824c9c414d6f700e330610a61633c4" + sha256 cellar: :any_skip_relocation, ventura: "e0e1a3233d78f7127319caec65a875960303d869637b77e0ff4c089bd4d6af8c" + sha256 cellar: :any_skip_relocation, monterey: "4571453e9ad967b4d3c17c02c051b015f8f7c96431d7ce9eb614908b68883096" + sha256 cellar: :any_skip_relocation, x86_64_linux: "690625eb2cc8125aa242223b221df8f19311e79a84b7877af6d96847f016a92c" + 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..ec2542bfbe11c --- /dev/null +++ b/Formula/p/proxsuite.rb @@ -0,0 +1,51 @@ +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: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "55eeaba27c0759020f1af4fee87c57cd7f06250654985fcb314aafd65bd94bc2" + sha256 cellar: :any, arm64_sonoma: "039089b526b129afda357462b2c41773e3a711ba40cfd5570cdfa97265e3bd8e" + sha256 cellar: :any, arm64_ventura: "bd8a4c2c6c377eddc448910028a0afde9db6185a77c4bcf600191384c6529eb6" + sha256 cellar: :any, sonoma: "03ca17384128ebc8d2b88b241ccb12947e808186bc52fe15b84499953172bfe7" + sha256 cellar: :any, ventura: "a09b9bbd5e73a56ca6b74b63e278a434adcd3d93d3fd3502dfdbb55e72526212" + sha256 cellar: :any_skip_relocation, arm64_linux: "e9125d101cc2a36b0d25ace483151f343264097ad3e30612e0262ec3e7016e3a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57b4ac4f02b44ae31592270e00b6119b22be2e99d685b2d7981cb9b02820eb06" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "pkgconf" => :build + depends_on "eigen" + depends_on "numpy" + depends_on "python@3.13" + depends_on "scipy" + depends_on "simde" + + def python3 + "python3.13" + end + + def install + system "git", "submodule", "update", "--init", "--recursive" if build.head? + system "cmake", "-S", ".", "-B", "build", + "-DPYTHON_EXECUTABLE=#{which(python3)}", + "-DBUILD_UNIT_TESTS=OFF", + "-DBUILD_PYTHON_INTERFACE=ON", + "-DINSTALL_DOCUMENTATION=ON", + *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..91f09f7601c9c --- /dev/null +++ b/Formula/p/proxychains-ng.rb @@ -0,0 +1,40 @@ +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 + + bottle do + 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..76ad96fb64e16 --- /dev/null +++ b/Formula/p/proxyfor.rb @@ -0,0 +1,47 @@ +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"] + + bottle do + 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..461970ba06b88 --- /dev/null +++ b/Formula/p/proxygen.rb @@ -0,0 +1,78 @@ +class Proxygen < Formula + desc "Collection of C++ HTTP libraries" + homepage "https://github.com/facebook/proxygen" + url "https://github.com/facebook/proxygen/releases/download/v2025.04.28.00/proxygen-v2025.04.28.00.tar.gz" + sha256 "d44cd1582e42a979fdf16848b4e2ba71ea0a4163f39400e09d04c289dc5209a6" + license "BSD-3-Clause" + head "https://github.com/facebook/proxygen.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "dd0d573410d9075ff91017da07659cd1e3c753075c95e283c38399cf8a2e0130" + sha256 arm64_sonoma: "5c1177d9b2b355a91ec4d18baaaf43021b2ecf26dc7792b9b61b7645258aa2d1" + sha256 arm64_ventura: "677faccbc20c1fc73df06e64344de39c8f7ec50823ca652aee77c88865cfe908" + sha256 cellar: :any, sonoma: "d6d8181df7dac436153803dc29d6fdf061f6496d322ccdb41a14e305087be028" + sha256 cellar: :any, ventura: "01e7f456930ec330193e5d7a91366988269629faffcd424605399f03cee9bc7f" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ad65540c12ffc82c6ac3e7b4fd2296f1c0fc9863f73fc22216d42ab5a7de7cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "59d45735aefa2e95c1ae979de15ac481f88c7964b45319d642550c137ab8471c" + end + + depends_on "cmake" => :build + depends_on "boost" + 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" + + # TODO: uses_from_macos "gperf" => :build + uses_from_macos "python" => :build + uses_from_macos "zlib" + + conflicts_with "hq", because: "both install `hq` binaries" + + # FIXME: Build script is not compatible with gperf 3.2 + resource "gperf" do + on_linux do + url "https://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz" + mirror "https://ftpmirror.gnu.org/gperf/gperf-3.1.tar.gz" + sha256 "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2" + end + end + + def install + if OS.linux? + resource("gperf").stage do + system "./configure", *std_configure_args(prefix: buildpath/"gperf") + system "make", "install" + ENV.prepend_path "PATH", buildpath/"gperf/bin" + end + end + + 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..d2bfe22d6e78e --- /dev/null +++ b/Formula/p/proxytunnel.rb @@ -0,0 +1,31 @@ +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_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..238f5fe64b155 --- /dev/null +++ b/Formula/p/prqlc.rb @@ -0,0 +1,34 @@ +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.4.tar.gz" + sha256 "1d214df7827659e9573afc339078e421e326953f7954ba0cba0b996e0d110531" + license "Apache-2.0" + head "https://github.com/prql/prql.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b7e06cd44eb914925c510a1960a2dc4300256a8110e61a48c9376cc5db73f4d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c415be246789f5c4f0186faff43375c7426b6a76c99f524ee8e613381ff28a9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1bf53c05419ba357804e4e7860f7b890d175b81f6ee5c0ef480ca7a2e7bfdddc" + sha256 cellar: :any_skip_relocation, sonoma: "9678c394ba845c4bac9f02060921cb912b7f273e983a5e29e222988445c75156" + sha256 cellar: :any_skip_relocation, ventura: "ad5b425bcd4bca3cd7150d5f791b40e8101b080aa5ebb052a009be39355bb44d" + sha256 cellar: :any_skip_relocation, arm64_linux: "389518823c39646ad75a842c27e22bb599b4c6959d530f869cd2feb6e78945c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d3c89c64c998f4d9d48a827e8bbb099105aef8201029df041faaf0345fd043a" + 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..e5426bc85886d --- /dev/null +++ b/Formula/p/prr.rb @@ -0,0 +1,61 @@ +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.20.0.tar.gz" + sha256 "fa25e4690a6976af37738b417b01f1fa0df7448efd631239aadea0399a9e862a" + license "GPL-2.0-only" + head "https://github.com/danobi/prr.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "020e2b1af8b7a3f2b1f39096597b06e80e338ff308a50d8f9f4b73094728a12d" + sha256 cellar: :any, arm64_sonoma: "43547eb2228e9fa399f34b9bd5202fbe7aed3257095a1a93f75a667d36d8658d" + sha256 cellar: :any, arm64_ventura: "1ae08fc4c7d6625baf22b16df0cf1178efee1f699bfc25c6bb961f3f7560f75e" + sha256 cellar: :any, sonoma: "ff40fe06171b1047bfadd9391918a99f47090ba502584677085052764ff8f71b" + sha256 cellar: :any, ventura: "a3bad778d1010031a272e32535c8ed6c9e487aa0587de878350429f5683cb5ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "3c096eed0ee69a0b6e4e5d7ebd12357edd22d0c2b61d93e3d5b2c2625f216ac9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f78629fe312045ec89e5377a86cf1c165eca5c5ff60114100a111c0ccfe60eef" + 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..8ac6e06357441 --- /dev/null +++ b/Formula/p/prs.rb @@ -0,0 +1,45 @@ +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.2.tar.gz" + sha256 "9d1635ca4c9e916d9c59e05e792f0bdcf249488d63b615d30660a5c8371ab3b0" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bc1d09e088e2321644ccede82abc199cf7ce4531d5a251818bc7655a05b08690" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6fdd9e3be383c66234f0fbc89fa824712756fee672bba0d6a7b0aecb4b58747f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b651bcae0d249232460b03fab22c239a319f977169996197098fb082509685f9" + sha256 cellar: :any_skip_relocation, sonoma: "7b4d56aa801a5b49c63aa220dd73642847cc2469c25776a1e11e91113d8be776" + sha256 cellar: :any_skip_relocation, ventura: "ffd6725497618bb411cb83db32edefe40e6a70260b1cde0801fbb4b45ec4f428" + sha256 cellar: :any_skip_relocation, arm64_linux: "b65df02f12c0b730c212b28b88e3c00f0801981e7069bbccb4ce21befee38181" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a7d2a746d0612f19d99b13216ecbb08dc5fd06fe1e7ff6a9d1690becdba707ec" + end + + depends_on "rust" => :build + depends_on "gpgme" + + on_linux do + depends_on "pkgconf" => :build + 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..30e9cbf9b3925 --- /dev/null +++ b/Formula/p/ps2eps.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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, mojave: "170231b1c48914442e5c4eac304652b1aab7603c46d407f26b1383b932e3c2d9" + 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..717310956e300 --- /dev/null +++ b/Formula/p/psalm.rb @@ -0,0 +1,111 @@ +class Psalm < Formula + desc "PHP Static Analysis Tool" + homepage "https://psalm.dev/" + url "https://github.com/vimeo/psalm/releases/download/6.10.3/psalm.phar" + sha256 "117eed7f09f182065aa8612abe7b9502100fc528ce34d74d41d0dbfa2a735b30" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9856622515229e4b9b4d124aba8d5fa3a76f71affe4bc5105e6f6ce4375ffb1e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9856622515229e4b9b4d124aba8d5fa3a76f71affe4bc5105e6f6ce4375ffb1e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9856622515229e4b9b4d124aba8d5fa3a76f71affe4bc5105e6f6ce4375ffb1e" + sha256 cellar: :any_skip_relocation, sonoma: "c51da1e07bc807b1a43a77bf3ea7ed2b394a380b2f6185fcba44b8fdb235a049" + sha256 cellar: :any_skip_relocation, ventura: "c51da1e07bc807b1a43a77bf3ea7ed2b394a380b2f6185fcba44b8fdb235a049" + sha256 cellar: :any_skip_relocation, arm64_linux: "9856622515229e4b9b4d124aba8d5fa3a76f71affe4bc5105e6f6ce4375ffb1e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9856622515229e4b9b4d124aba8d5fa3a76f71affe4bc5105e6f6ce4375ffb1e" + 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..8d783f90d9741 --- /dev/null +++ b/Formula/p/psc-package.rb @@ -0,0 +1,75 @@ +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 + + bottle do + rebuild 1 + 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..70fe2c4b9e395 --- /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.241.0.tar.gz" + sha256 "3bf31157a13d6b62cac6867e59ab5f762ad95a60c0c3957ecb9dcf3820438f5d" + license "Apache-2.0" + head "https://github.com/planetscale/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "00bc49bde51ecc834a3e20f90644b1538d4fd695423611602a8012c4938da247" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ee7b3d608f465be46c2abaa3c52aa111272db6e1f9575c68b0bc26ae4fdf3625" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f68bbeaac64e2d7b9681b18fc0bdab2c88fb6011c87c424b05e5e24e4f641048" + sha256 cellar: :any_skip_relocation, sonoma: "a3222a624b9a57c1b4bd298ae2276293b4819c7592751cabe79be6aa78d4e1c7" + sha256 cellar: :any_skip_relocation, ventura: "13d46468ca32b19034371133dbaba4b5a9347e247177a86b952a24d4b080d594" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a743c7ef4e8f84d8440f5b885baa449a9db7820f960a8ae88917ea92db66164c" + 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..3f30dd4a249fd --- /dev/null +++ b/Formula/p/psftools.rb @@ -0,0 +1,64 @@ +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 + + bottle do + 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, mojave: "8e53985d7a48b4f927d94ac27339ba7d293181b90fe33d05f22c71ff1e48c126" + 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..b660acc54ca0a --- /dev/null +++ b/Formula/p/psgrep.rb @@ -0,0 +1,23 @@ +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" + + 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..de3e76555960e --- /dev/null +++ b/Formula/p/pspg.rb @@ -0,0 +1,41 @@ +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.11.tar.gz" + sha256 "ae1122d7946c69ca17b3e2e672418957a1b3c6efa221eed62be7d5f7b5e3d0ea" + license "BSD-2-Clause" + head "https://github.com/okbob/pspg.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3143bad00e148c314f25e37badb7796c5890ba816b7654f624db05871e004214" + sha256 cellar: :any, arm64_sonoma: "7e9871c7d9bf2c7a91da45a4c44fc22fd1e567422912c036c1485bb4691c933f" + sha256 cellar: :any, arm64_ventura: "d7916c67a1a411635211fc671b35c0d674079da1748df030be5d621ec372e1d0" + sha256 cellar: :any, sonoma: "922d22058c09a756855f2cce188bfeb95c21898ceef753574d505ff8f7054249" + sha256 cellar: :any, ventura: "ce2080def3035640960ed61538a3ce377f46b6767d74b49f03103889e14f57f5" + sha256 cellar: :any_skip_relocation, arm64_linux: "d45dda1e0800fd8b68c12b46e6209c94c500f0d17c1e0c7ff3c83353150b22c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22ea92fa7dedbae7874668a64a298a9cd3a4cdaae71f818fc5fee4ebc22264b0" + 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..ada454ddd8a58 --- /dev/null +++ b/Formula/p/psql2csv.rb @@ -0,0 +1,25 @@ +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 + + 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..578cfb8e25654 --- /dev/null +++ b/Formula/p/psqlodbc.rb @@ -0,0 +1,45 @@ +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_0004.tar.gz" + sha256 "6d15bc4f49a0c9e0d263ff30b042d4d49ef4ead745c2dd1f0d0d9c3d2a98b4fc" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "9e49dfa5be7d586220140bb26762cf8c05a65dba887e3a09c1500bd7fb5b186b" + sha256 cellar: :any, arm64_sonoma: "bed65e967f687e24a56f233b8def6503ba7a6edcae118b978e429e515a466ccb" + sha256 cellar: :any, arm64_ventura: "5476eb923b4ebdd7377596ee553139a6f059730b2f0e1917cea60e3bc62ecb1d" + sha256 cellar: :any, sonoma: "b34391bdbb4a636e9837e209ba178d1660de9ced2d63d033de3f57f39808ebda" + sha256 cellar: :any, ventura: "b57bbc3a6e580f83e695067836a9eff58fd033ef55b6970cb8c31672429e81b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "5dc7bc2a5663fa87105c9d984d80966dc28ac4e772b3abc381095bea44e53979" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15dfa1958197323d476238ea26efa630f85955c78eca68eb7b0a54a682660034" + 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..de951c004b258 --- /dev/null +++ b/Formula/p/pssh.rb @@ -0,0 +1,42 @@ +class Pssh < Formula + include Language::Python::Virtualenv + + desc "Parallel versions of OpenSSH and related tools" + homepage "https://code.google.com/archive/p/parallel-ssh/" + url "https://files.pythonhosted.org/packages/60/9a/8035af3a7d3d1617ae2c7c174efa4f154e5bf9c24b36b623413b38be8e4a/pssh-2.3.1.tar.gz" + sha256 "539f8d8363b722712310f3296f189d1ae8c690898eca93627fc89a9cb311f6b4" + license "BSD-3-Clause" + revision 6 + + bottle do + rebuild 5 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d5930def7b287c71f933a5f8cf985135891a2a9e3ca750be4a0960aa5768bdaf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d5930def7b287c71f933a5f8cf985135891a2a9e3ca750be4a0960aa5768bdaf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d5930def7b287c71f933a5f8cf985135891a2a9e3ca750be4a0960aa5768bdaf" + sha256 cellar: :any_skip_relocation, sonoma: "639890de52266e0f738b67ad06579d7783b161c4e68c4b0caba5d8bd10edfd55" + sha256 cellar: :any_skip_relocation, ventura: "639890de52266e0f738b67ad06579d7783b161c4e68c4b0caba5d8bd10edfd55" + sha256 cellar: :any_skip_relocation, arm64_linux: "60f1da5f3faf6c95f6892a087b50fc1bc97f229ce25c68604a6a5dc7a294441b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d5930def7b287c71f933a5f8cf985135891a2a9e3ca750be4a0960aa5768bdaf" + end + + depends_on "python@3.13" + + conflicts_with "putty", because: "both install `pscp` binaries" + + # Fix for Python 3 compatibility + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/957fd102811ab8a8c34bf09916a767e71dc6fd66/pssh/python3.patch" + sha256 "aba524c201cdc1be79ecd1896d2b04b758f173cdebd53acf606c32321a7e8c33" + end + + def install + # fix man folder location issue + inreplace "setup.py", "'man/man1'", "'share/man/man1'" + + virtualenv_install_with_resources + 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..d3dfee14b6826 --- /dev/null +++ b/Formula/p/pstoedit.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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..5264b0e69a4f7 --- /dev/null +++ b/Formula/p/pstree.rb @@ -0,0 +1,37 @@ +# 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" + + bottle do + 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..b95b740e9bf67 --- /dev/null +++ b/Formula/p/psutils.rb @@ -0,0 +1,47 @@ +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/e1/00/718c0fba71ed7d035013bab4083195c43ec0dfcd894492a8cfb1efd693a7/psutils-3.3.10.tar.gz" + sha256 "698a18f291183d48d63cd43b6a2e43d133e89ab438d5aef5baa24374660729f7" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "5ac8850f6f31270d73959032ee1f44c86890e03ef54ddb685b7048523c28f0da" + end + + depends_on "libpaper" + depends_on "python@3.13" + + resource "puremagic" do + url "https://files.pythonhosted.org/packages/d6/de/c9dbb741a2e0e657147c6125699e4a2a3b9003840fed62528e17c87c0989/puremagic-1.29.tar.gz" + sha256 "67c115db3f63d43b13433860917b11e2b767e5eaec696a491be2fb544f224f7a" + end + + resource "pypdf" do + url "https://files.pythonhosted.org/packages/e0/c8/543f8ae1cd9e182e9f979d9ab1df18e3445350471abadbdabc0166ae5741/pypdf-5.5.0.tar.gz" + sha256 "8ce6a18389f7394fd09a1d4b7a34b097b11c19088a23cfd09e5008f85893e254" + 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..95dd7cc3692d5 --- /dev/null +++ b/Formula/p/psysh.rb @@ -0,0 +1,33 @@ +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.8/psysh-v0.12.8.tar.gz" + sha256 "3119a55735845612f889baff63a9b96d54e1f63c18d8426f685cd3055ed33a01" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f7af2ac0c32da2877143af8acdd102ca56dbf11939c69447ca6c667a4919a09e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f7af2ac0c32da2877143af8acdd102ca56dbf11939c69447ca6c667a4919a09e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f7af2ac0c32da2877143af8acdd102ca56dbf11939c69447ca6c667a4919a09e" + sha256 cellar: :any_skip_relocation, sonoma: "4ac72659f7e05d491e23124f7acc8c8379ada20040bfee36e056db2a136ddfb4" + sha256 cellar: :any_skip_relocation, ventura: "4ac72659f7e05d491e23124f7acc8c8379ada20040bfee36e056db2a136ddfb4" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7af2ac0c32da2877143af8acdd102ca56dbf11939c69447ca6c667a4919a09e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7af2ac0c32da2877143af8acdd102ca56dbf11939c69447ca6c667a4919a09e" + 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..463ea3fe395b6 --- /dev/null +++ b/Formula/p/pth.rb @@ -0,0 +1,51 @@ +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" + license "LGPL-2.1-or-later" + + bottle do + rebuild 2 + 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, mojave: "e7ed86c562756b07fcf9bb148c76f17c6cb4f3b02bf84ffe82285e3b279e7836" + sha256 cellar: :any, high_sierra: "da4549f9e89a71478b47f4454f9a259dc3a56a109f24083ce8f4ea69b11ac9c5" + sha256 cellar: :any, sierra: "583d6ae1681974c7461650151253c5a302f33fb16dae74b5546a4a693cec71d1" + sha256 cellar: :any, el_capitan: "bac7f73c061797768be28e21bec2e7773cfd70ff7c3f46eafd464b9632d5eae4" + 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..e649a8bb50a23 --- /dev/null +++ b/Formula/p/ptpython.rb @@ -0,0 +1,61 @@ +class Ptpython < Formula + include Language::Python::Virtualenv + + desc "Advanced Python REPL" + homepage "https://github.com/prompt-toolkit/ptpython" + url "https://files.pythonhosted.org/packages/c9/ce/4441ac40762c73d74b48088a7311e368d28beec92602d66e632a59792a93/ptpython-3.0.30.tar.gz" + sha256 "51a07f9b8ebf8435a5aaeb22831cca4a52e87029771a2637df2763c79d3d8776" + license "BSD-3-Clause" + head "https://github.com/prompt-toolkit/ptpython.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9e7da60db0a3a7a9381b6ec4142caee6d7c40ac26ed9f6cb685bbff0ab57596d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9e7da60db0a3a7a9381b6ec4142caee6d7c40ac26ed9f6cb685bbff0ab57596d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9e7da60db0a3a7a9381b6ec4142caee6d7c40ac26ed9f6cb685bbff0ab57596d" + sha256 cellar: :any_skip_relocation, sonoma: "a1cbfb4942dfdea16d8d36d99817f88c6685035c873bf6df156c5cb04b23ce7e" + sha256 cellar: :any_skip_relocation, ventura: "a1cbfb4942dfdea16d8d36d99817f88c6685035c873bf6df156c5cb04b23ce7e" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e7da60db0a3a7a9381b6ec4142caee6d7c40ac26ed9f6cb685bbff0ab57596d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e7da60db0a3a7a9381b6ec4142caee6d7c40ac26ed9f6cb685bbff0ab57596d" + end + + depends_on "python@3.13" + + 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/66/94/68e2e17afaa9169cf6412ab0f28623903be73d1b32e208d9e8e541bb086d/parso-0.8.4.tar.gz" + sha256 "eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d" + 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 "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..a81bea1efe06a --- /dev/null +++ b/Formula/p/ptunnel.rb @@ -0,0 +1,51 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "3c8f8ec4d66e42ad4a6513a4c92e0f3e0babfebe25fb08ff4c690b1a37557fdd" + sha256 cellar: :any_skip_relocation, high_sierra: "67bd833b70dc704ab565d526fd99044e122a4e2fcd583b083db0a5f642d46041" + sha256 cellar: :any_skip_relocation, sierra: "048404c7b3fe3365abfc24fb623bf9548ed7e61458a00148348bbdc2f5f12f33" + sha256 cellar: :any_skip_relocation, el_capitan: "516181dbd16539c1f8817d65637bd42cc951d551e1a3b61a4d83dc6c71dc6397" + 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..509e2cf20153b --- /dev/null +++ b/Formula/p/publish.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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..4bcd3942d1dab --- /dev/null +++ b/Formula/p/pueue.rb @@ -0,0 +1,60 @@ +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.0.tar.gz" + sha256 "b7add2bdd6cdce683eea5b24932ed12534b76c29143d8183216c4afc60beef04" + license "MIT" + head "https://github.com/Nukesor/pueue.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "170ca77ac6679b9328df9d5da9a8d3227161031ff17feec521b271fad097ed43" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44245c1005018aeefff4fe0885265e55ded796af87f194e04d359dad6fc3dad8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "938eef3100512ec81969982800e41b84cb2efa2f4dfcf262c2ef67f146a77dfa" + sha256 cellar: :any_skip_relocation, sonoma: "b68235503ed828ea8d81cd592700abb5e996fc6b24394583182dae26afc643d8" + sha256 cellar: :any_skip_relocation, ventura: "f33c771f11eebc356e0ad2415b690c2e22ce9540894813f4ed2c3d78d36a73cf" + sha256 cellar: :any_skip_relocation, arm64_linux: "419a7fff83bd072580ffd77de633dc95321f9346ff85f7c474f34d22acf15c2e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6cf0e61c3073f9afa2cb68f6e6f4e0a7de02c0142bc845a3e7ed509bacd34a10" + 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..5db74d47c1711 --- /dev/null +++ b/Formula/p/puf.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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, mojave: "0135ce2eda650af382ccefebc51bce5b83b356234ad02177a311309a1799af79" + sha256 cellar: :any_skip_relocation, high_sierra: "e9f5c12dedbca6d80be8321abdea89162af0097d68401b77aadf93605877a967" + sha256 cellar: :any_skip_relocation, sierra: "3153e22f42620f0ceb69f11080e6ba113765d7847cbbb2672f30a7a6766db972" + sha256 cellar: :any_skip_relocation, el_capitan: "24952b79335eb08d7a8880a16714e6afe3b73a65f5f26c59b106020198c1b3f3" + 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..87bb41352bc54 --- /dev/null +++ b/Formula/p/pug.rb @@ -0,0 +1,44 @@ +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_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, 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..15da6d1ce9aba --- /dev/null +++ b/Formula/p/pugixml.rb @@ -0,0 +1,58 @@ +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_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..c6d07687f6b26 --- /dev/null +++ b/Formula/p/pulledpork.rb @@ -0,0 +1,88 @@ +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" + + bottle do + rebuild 1 + 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.rb b/Formula/p/pulp.rb new file mode 100644 index 0000000000000..0c13f21fbb409 --- /dev/null +++ b/Formula/p/pulp.rb @@ -0,0 +1,34 @@ +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 + + 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..62a21f8c14808 --- /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.0.4.2.tar.gz" + sha256 "b12d6bed9555a8d3b1a932961797f29a191bcc7c2b32e6ae608471166f6ed02c" + 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_sequoia: "bd68350615e2fccc1d4409e61b298f5bf4fe8b7e27dbd19423998ea568851b18" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9674dc9e1cfddd7a2f164bf8722c0e4130bbc3371dbaead2554b65e8c8b0af0f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae56d869ba811772b8c20e1b9e83c1b4887ee0959756a789389a8c778208ccfe" + sha256 cellar: :any_skip_relocation, sonoma: "346b8d8f469c31474e73c67207a579228d05eeb5fefaca0a723e30696a7ab573" + sha256 cellar: :any_skip_relocation, ventura: "cb0073e48889b6ca86209e3e05494c5ae972ec991e9fb3479e49575505ef7883" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87cf022299e9e4abc286c92bf05859ebfec37fac0564200eb3cee00515b16a45" + 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..e8e96c290a128 --- /dev/null +++ b/Formula/p/pulseaudio.rb @@ -0,0 +1,102 @@ +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 + + bottle do + sha256 arm64_sequoia: "ceb92ec9cc890a989907d2b0fe1de997e619cde589fbcc5a31eda87f8adccedb" + sha256 arm64_sonoma: "aea71892ba21ebdc3e619819ddc6f641a59d87d0688b671b82352af062cf860b" + sha256 arm64_ventura: "63b0ba13d5187af0e2f9bd56f638bf2f1060c60327bb78f97f094cde6756a07c" + sha256 arm64_monterey: "25d41b1a184588db2fdb9f39367ff6d20f6c7542f9de2e6b67b73bc4f7bd5e09" + sha256 sonoma: "57c4f8e47c04145f0851d231d0c92bd43f57e59bf3416689e25b8e619a7913a3" + sha256 ventura: "fd0835395b77a321e3b5a4542496c02dd0dbdd8134e700bacbfb80c46d6e14cc" + sha256 monterey: "e28e0f3a10c94b089acb2a6f82fd31d19c3cd8cbd7ad180d50a794f473b9adaa" + sha256 arm64_linux: "366a4e3c371e6b5ba54d7f1f8ede79db83865e6e2767b3960b5c78a0ce581a9f" + sha256 x86_64_linux: "504035dfda3bffabae42f352d0e7c0a90c6b8c1f6b925fe7e17502124d5d6529" + 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[ + -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" + 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..237ce0630e306 --- /dev/null +++ b/Formula/p/pulumi.rb @@ -0,0 +1,46 @@ +class Pulumi < Formula + desc "Cloud native development platform" + homepage "https://pulumi.io/" + url "https://github.com/pulumi/pulumi.git", + tag: "v3.170.0", + revision: "1fa4acd0d6e5c3edcdb1454f79d8e18c7c3d895a" + 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_sequoia: "530b040014a8a2e77db6429645e036c5c31c8b6a7e82b6a3561924397c535508" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c601e26a95beecb7934f3f5a722cffd4b102fe4824f5cd6021f7c42ef7c39fce" + sha256 cellar: :any_skip_relocation, arm64_ventura: "779d1d0c328e80932e785c23211e95dedb70ad7f2bafd944f8ddce9947bda7b6" + sha256 cellar: :any_skip_relocation, sonoma: "a92b2497ac1b78eddc324dbc352106b86333ad1718be9ea06bffd8a2aca73c20" + sha256 cellar: :any_skip_relocation, ventura: "fae7891d5512363b52fd1018d6594cf5470a175184b63dc7c324a9d69318529f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e41ab4901f63b41620ddadb199d75cb2393b05a34eba45413b4ba343b47c3dad" + 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 "invalid access token", + shell_output(bin/"pulumi new aws-typescript --generate-only --force --yes 2>&1", 255) + end +end diff --git a/Formula/p/pumba.rb b/Formula/p/pumba.rb new file mode 100644 index 0000000000000..64e7af1b19341 --- /dev/null +++ b/Formula/p/pumba.rb @@ -0,0 +1,44 @@ +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_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, 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..7bfcb35c571ad --- /dev/null +++ b/Formula/p/punktf.rb @@ -0,0 +1,36 @@ +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_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..d8137dcde774a --- /dev/null +++ b/Formula/p/pup.rb @@ -0,0 +1,53 @@ +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, mojave: "1801647618fe8e2367ce3d739513c1811259bf1db3fb9ddfbc9301e559102d9b" + 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..3443074bbef5d --- /dev/null +++ b/Formula/p/pure-ftpd.rb @@ -0,0 +1,60 @@ +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_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..e6f9222c248dd --- /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.23.0.tar.gz" + sha256 "b316fe5aa25be2c2ef895dcad150248a43e12c4ac1476500e1539e2d67877921" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "28aed9b8a2ba35c28ebce54940385451c28af560e0eb22181edd0b56dfd78dc7" + 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..722c71fcc4ea7 --- /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.4.tgz" + sha256 "ff7523d15d2a8093a788a8cf22c8b82ad778315f667cff1086b747465ad11342" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f168a0249dc45427169db1c78eadcc12c7519c957987caf2a7f7540265afcb2f" + 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..eec18b117d7c5 --- /dev/null +++ b/Formula/p/purescript.rb @@ -0,0 +1,54 @@ +class Purescript < Formula + desc "Strongly typed programming language that compiles to JavaScript" + homepage "https://www.purescript.org/" + # 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. + url "https://hackage.haskell.org/package/purescript-0.15.15/purescript-0.15.15.tar.gz" + sha256 "9c4a23ea47ff09adc34e260610beabd940ec5c15088234cf120e8660dd220e67" + license "BSD-3-Clause" + head "https://github.com/purescript/purescript.git", branch: "master" + + bottle do + 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 + + depends_on "cabal-install" => :build + depends_on "ghc@9.6" => :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 + allow_newer_deps = %w[ + aeson + base + memory + template-haskell + ] + + system "cabal", "v2-update" + system "cabal", "v2-install", "--allow-newer=#{allow_newer_deps.join(",")}", *std_cabal_v2_args + 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_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..2aed3ac100691 --- /dev/null +++ b/Formula/p/purr.rb @@ -0,0 +1,48 @@ +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" + + 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..2b170869fe9cd --- /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.40.1/pushpin-1.40.1.tar.bz2" + sha256 "64b6486160ecffdac9d6452463e980433800858cc0877c40736985bf67634044" + license "Apache-2.0" + revision 1 + head "https://github.com/fastly/pushpin.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "b21a3a9a5ebc10ca3f753bde79a40e21b47f12e5c5dff5323f519195efdaa449" + sha256 cellar: :any, arm64_ventura: "93ed50774f9359a82d2758c28a9feb42c967a4699247b1fbbd4ee38f3f0838a4" + sha256 cellar: :any, sonoma: "445efcf66fc080457df5cd035952d9d9e480bb88913b620a64339dc4a5fc19a4" + sha256 cellar: :any, ventura: "5cb0cb08f8b383f1f49ddc488d91282971937f045b1590583bfe8e8cd780d7de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f1d6d7bd7fca315386205d982a48853efa8a1cbe3e04695c63950f0a0d31782" + end + + depends_on "boost" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + + depends_on "openssl@3" + depends_on "python@3.13" + depends_on "qt" + 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.13"].opt_bin/"python3.13", runfile + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + end +end diff --git a/Formula/p/putmail-queue.rb b/Formula/p/putmail-queue.rb new file mode 100644 index 0000000000000..8bbcc9af37388 --- /dev/null +++ b/Formula/p/putmail-queue.rb @@ -0,0 +1,20 @@ +class PutmailQueue < Formula + desc "Queue package for putmail" + homepage "https://putmail.sourceforge.net/home.html" + url "https://downloads.sourceforge.net/project/putmail/putmail-queue/0.2/putmail-queue-0.2.tar.bz2" + sha256 "09349ad26345783e061bfe4ad7586fbbbc5d1cc48e45faa9ba9f667104f9447c" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6fc472e77db929384f6f9e436b6a3433df05d86cc583e499f92bd69373d332c3" + end + + # putmail-queue doesn't support Python 3 + disable! date: "2024-07-03", because: :unsupported + + 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/p/putmail.rb b/Formula/p/putmail.rb new file mode 100644 index 0000000000000..a3b2ab6207504 --- /dev/null +++ b/Formula/p/putmail.rb @@ -0,0 +1,21 @@ +class Putmail < Formula + desc "MTA or SMTP client designed to replace the sendmail command" + homepage "https://putmail.sourceforge.net/home.html" + url "https://downloads.sourceforge.net/project/putmail/putmail.py/1.4/putmail.py-1.4.tar.bz2" + sha256 "1f4e6f33496100ad89b8f029621fb78ab2f80258994c7cd8687fd46730df45be" + license "ICU" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1df81ef382665ba394fb3ee99383dd7662a776290f9efdb0a2c7765ce3a663e4" + end + + # putmail doesn't support Python 3 + disable! date: "2024-07-03", because: :unsupported + + 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/p/putty.rb b/Formula/p/putty.rb new file mode 100644 index 0000000000000..fe7549995b700 --- /dev/null +++ b/Formula/p/putty.rb @@ -0,0 +1,62 @@ +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.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_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..dbd8c58ec6f58 --- /dev/null +++ b/Formula/p/puzzles.rb @@ -0,0 +1,64 @@ +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-20250514.49aad96.tar.gz" + version "20250514" + sha256 "190cc2c954a89ab50121ec11f3c7bc588f00e8a132b9b237de9dabc32dfdf669" + 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_sequoia: "811fae6295b9685cacaf55d6d96785548071686a26a710bbe70f6f071001ba55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a320b7ea3474ad6cf7de8b8c26420043af80c1314f7e008dd26f94161d36341b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3c55edf5b858fd7a51219aa912580a7fed2e9879541d71c237b4cff4f9dc460f" + sha256 cellar: :any_skip_relocation, sonoma: "25efbcdbc0308fd27821e1b68a4a6926838d1bf8962e4daff83f3f42780e0af1" + sha256 cellar: :any_skip_relocation, ventura: "85f8f828868066e6b495aa72b9f4f9a9dfb0cc038ae3aee4c5a1b3f96b4f1855" + sha256 arm64_linux: "54d510f834f659492ff267ed030ccecbf5e9e8d8a3cd99ccf0ba53ba77a28c58" + sha256 x86_64_linux: "dd3f8599af0a1ed9170ee462d0884ba56df6b11a3e92799793e140e5f992ba58" + 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 + 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..0d94e45ac12c0 --- /dev/null +++ b/Formula/p/pv.rb @@ -0,0 +1,43 @@ +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.31.tar.gz" + sha256 "a35e92ec4ac0e8f380e8e840088167ae01014bfa008a3a9d6506b848079daedf" + license "Artistic-2.0" + + livecheck do + url :homepage + regex(/href=.*?pv[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "ebca476acb2b46ba13fa847aac59da72143548df1ba49f4d31682598a702d160" + sha256 arm64_sonoma: "010b70c9a9684a6572a72fd581f2a3e4ba435e029f065fa783c0b659bead01a0" + sha256 arm64_ventura: "772ab52f0c8e255fa4ea867b87afac47b91e34b738db16dd1ccf71e9e19b1b65" + sha256 sonoma: "acda1ee6e20e5c17f04eeef228b0a5f75268e1e035e8f0347e79780eacb97a56" + sha256 ventura: "75acce5dd4bd5efae2066e4e89bc6c99940f51d1dd0196bb6e15e06217d7b59c" + sha256 arm64_linux: "f3610ebfcb754f358faca339e38562f37666d448d4a134df1720b5fbab736e58" + sha256 x86_64_linux: "04aded1e1b833d8f7b2921ac23e2d8ddfae955eb18e6de47ec2b08150c548b94" + 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..dca0f36fbc757 --- /dev/null +++ b/Formula/p/pwgen.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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, mojave: "2f35a2d575e16a2ab0497cabfc927a7b40aba68edba574889bf9bbdf03572c12" + sha256 cellar: :any_skip_relocation, high_sierra: "185f2f56eb03da60277520734452204ec2e0059cbc1f0af5d0fec1e7fa837658" + sha256 cellar: :any_skip_relocation, sierra: "01a0709f74923e7b86d680f03d3ec056d3175cb7e54be176a26d5bfae890fd21" + sha256 cellar: :any_skip_relocation, el_capitan: "7dade70b172cb91635afffe8bb1eadb251f9dbd3368ab9e4a37f98a7c0a14b01" + 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..08ee6c96c3eb7 --- /dev/null +++ b/Formula/p/pwnat.rb @@ -0,0 +1,34 @@ +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" + + bottle do + rebuild 1 + 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..64de95cee1cd9 --- /dev/null +++ b/Formula/p/pwncat.rb @@ -0,0 +1,31 @@ +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 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1971f6379de0d9d4d43605e1cfe6635c966343e2afd1f18e5075059233853433" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1971f6379de0d9d4d43605e1cfe6635c966343e2afd1f18e5075059233853433" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1971f6379de0d9d4d43605e1cfe6635c966343e2afd1f18e5075059233853433" + sha256 cellar: :any_skip_relocation, sonoma: "a5c8fa660a7d88d2d31622417ba79e4757c41c2dcf27cebc3a36d26de3eda54b" + sha256 cellar: :any_skip_relocation, ventura: "a5c8fa660a7d88d2d31622417ba79e4757c41c2dcf27cebc3a36d26de3eda54b" + sha256 cellar: :any_skip_relocation, arm64_linux: "681af452580198940fda3bc55892865dd6d9b839ed8a1dcd2b583018bfa43e2c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1971f6379de0d9d4d43605e1cfe6635c966343e2afd1f18e5075059233853433" + end + + depends_on "python@3.13" + + 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..a7a624fd0ae06 --- /dev/null +++ b/Formula/p/pwntools.rb @@ -0,0 +1,190 @@ +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/21/94/1f39d5a770226b9d240c9900c5c912788fb31f8f189aacd81153c0d59f67/pwntools-4.14.1.tar.gz" + sha256 "60f04976d1722120d18b9d50553408a024664b5cf888f36f258afca4bf035cac" + license "MIT" + head "https://github.com/Gallopsled/pwntools.git", branch: "dev" + + bottle do + sha256 cellar: :any, arm64_sequoia: "8aeabb1da2e073cf98271f5aa6a77bb53f87bd9f6836e87447034d393cc7d443" + sha256 cellar: :any, arm64_sonoma: "bc82947f0006968034657b332a60d3be80385ddd7eb6938fd521b991166ad308" + sha256 cellar: :any, arm64_ventura: "9238f6ca15b8daaad7b7dbc9c45a0edb8491a76bfba181ee972ff865b174dc21" + sha256 cellar: :any, sonoma: "a76835ebbd1f3cfbdab68b4d817a0f6e2f46ac93cff1cb5157d1d2ba1c74acb9" + sha256 cellar: :any, ventura: "f4964b88b6888cbc13b888e4526bfb7f70a97ce0d7461b4ff1ce5acd166e68c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4e1fbf0fcf71e6138c8f49f16cbd4d7d9784a4d91609dd73a5d2b6c016da0aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "932c911b364f5c269486b75ed63bb5a635de5ea626a868f89a2c480134ed3a8c" + end + + depends_on "rust" => :build # for bcrypt + depends_on "capstone" + depends_on "certifi" + depends_on "cryptography" + depends_on "libsodium" # for pynacl + depends_on "python@3.13" + depends_on "unicorn" # 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" + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/bb/5d/6d7433e0f3cd46ce0b43cd65e1db465ea024dbb8216fb2404e919c2ad77b/bcrypt-4.3.0.tar.gz" + sha256 "3a3fd2204178b6d2adcf09cb4f6426ffef54762577a7c9b54c159008cb288c18" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "intervaltree" do + url "https://files.pythonhosted.org/packages/50/fb/396d568039d21344639db96d940d40eb62befe704ef849b27949ded5c3bb/intervaltree-3.1.0.tar.gz" + sha256 "902b1b88936918f9b2a19e0e5eb7ccb430ae45cde4f39ea4b36932920d33952d" + 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 "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/7d/15/ad6ce226e8138315f2451c2aeea985bf35ee910afb477bae7477dc3a8f3b/paramiko-3.5.1.tar.gz" + sha256 "b2c665bc45b2b215bd7d7f039901b14b067da00f3a11e6640995fd58f2664822" + 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/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + 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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/3a/9d/a48fb1246a4b431951947f7cc2b4a24ffe59c0ec4eec1396d275bc6a45ed/rpyc-6.0.1.tar.gz" + sha256 "8a60f3c4401f309c0eb6e754fb6c4e0442231203907cebf61ae74615b52cd38a" + 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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/ed/f6/2ac0287b442160a89d726b17a9184a4c615bb5237db763791a7fd16d9df1/zstandard-0.23.0.tar.gz" + sha256 "b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09" + 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..0a224b209714c --- /dev/null +++ b/Formula/p/pwsafe.rb @@ -0,0 +1,72 @@ +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 + + bottle do + rebuild 1 + 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..d1bdb4f6e603a --- /dev/null +++ b/Formula/p/px.rb @@ -0,0 +1,40 @@ +class Px < Formula + include Language::Python::Virtualenv + + desc "Ps and top for human beings (px / ptop)" + homepage "https://github.com/walles/px" + url "https://github.com/walles/px.git", + tag: "3.6.9", + revision: "e4c9737b03ba8533cc3428524effe1028bd4a7ce" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93676a71991183f97c382f497977592ad790921ca2693e46dab05dd7ed47efc9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "93676a71991183f97c382f497977592ad790921ca2693e46dab05dd7ed47efc9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "93676a71991183f97c382f497977592ad790921ca2693e46dab05dd7ed47efc9" + sha256 cellar: :any_skip_relocation, sonoma: "c4bb31761956dc9ef1e49a06ec566b39062453be62159b534ce7ec5c32ad014d" + sha256 cellar: :any_skip_relocation, ventura: "c4bb31761956dc9ef1e49a06ec566b39062453be62159b534ce7ec5c32ad014d" + sha256 cellar: :any_skip_relocation, arm64_linux: "f35ff630e8bbe3e8f7289e0f72845ca6ad81c95ae4ab500bbdb76578fce5c905" + sha256 cellar: :any_skip_relocation, x86_64_linux: "93676a71991183f97c382f497977592ad790921ca2693e46dab05dd7ed47efc9" + end + + depends_on "python@3.13" + + 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 + + man1.install Dir["doc/*.1"] + 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..8b793bf1db036 --- /dev/null +++ b/Formula/p/py-spy.rb @@ -0,0 +1,41 @@ +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.0.tar.gz" + sha256 "13a5c4b949947425670eedac05b6dd27edbc736b75f1587899efca1a7ef79ac3" + license "MIT" + head "https://github.com/benfred/py-spy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fbcd2bcf46a3f65af4dbde6a6a92eb8d59a301922b23b680225d16daffb8c0be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d3bb71312de168ff73871311d675eaeeb3b1b6e18f16b9e293fdd2e0cf8c9790" + sha256 cellar: :any_skip_relocation, arm64_ventura: "435af0f030c2ea05c0b55327f5947b3605159116f2f78e770c690a16a39da565" + sha256 cellar: :any_skip_relocation, sonoma: "54396a0c050b5504064dca4b99be3a6fdaaaeca5c774877b4df8f442374bc62c" + sha256 cellar: :any_skip_relocation, ventura: "b9c65a548a147573ebe2659f64b0474e449ca41e6f803b9ad876bf0712316869" + sha256 cellar: :any_skip_relocation, arm64_linux: "57c660efd24bd7a643482fffb7f1ccd0813dc608691b3975b3263c0d709bc139" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cdc38114b097523653b6afaf18982784c63dd1001057278e8c22a6b8f4724bbf" + 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..ed2f2592cae14 --- /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"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "a3215f667bbecd5f84bd93fe29455894e9b051c088f69199224477652882f412" + sha256 cellar: :any, arm64_sonoma: "98f74d9de2ff0b9da6a0f3752725925cd946dc007620beca4b8670933fdcccb3" + sha256 cellar: :any, arm64_ventura: "923bd6b36c154365fedc3d8cbc3f89f367749ea3c95852533db49d8d80907ee7" + sha256 cellar: :any, sonoma: "5f0839825ff8083f998042f7bbd37c368e75afa03d011d2c3d6df14978493459" + sha256 cellar: :any, ventura: "3ffe657d6f48d2ff7fcec7fb705de41c1c3eb4b64cdf539936fd4bd323f80233" + sha256 arm64_linux: "e7b6f3f1a4edcd963b16352778e82f8cd65f31c47b130ecdf5301ae8a77b3510" + sha256 x86_64_linux: "087eee4fa2c8b32998d1a57b09fd8b5256fe6b9deec5cef3c4593e715b10f988" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [: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..df5521cd1d4f7 --- /dev/null +++ b/Formula/p/pybind11.rb @@ -0,0 +1,122 @@ +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/v2.13.6.tar.gz" + sha256 "e08cb87f4773da97fa7b5f035de8763abc656d87d5773e62f6da0587d1f0ec20" + license "BSD-3-Clause" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "d1ac19b7042b5f6b94bff8f1766307bfee68335ecb4dc7423040ae89940173bf" + end + + depends_on "cmake" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [: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/"cmake/pybind11/FindPythonLibsNew.cmake", "/usr/local", HOMEBREW_PREFIX + 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, "." + + 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..b31a76c353cbc --- /dev/null +++ b/Formula/p/pycodestyle.rb @@ -0,0 +1,44 @@ +class Pycodestyle < Formula + include Language::Python::Shebang + + desc "Simple Python style checker in one Python file" + homepage "https://pycodestyle.pycqa.org/" + url "https://github.com/PyCQA/pycodestyle/archive/refs/tags/2.13.0.tar.gz" + sha256 "b1a4db0d9b8285f6643bcdb41362be6d6c94b891b13ead09c57a2513c46b717b" + license "MIT" + head "https://github.com/PyCQA/pycodestyle.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f8318ea63471f50206c5957f21508ee39131d6a8090162da679838386d98bc85" + end + + depends_on "python@3.13" + + def install + rewrite_shebang detected_python_shebang, "pycodestyle.py" + bin.install "pycodestyle.py" => "pycodestyle" + 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..cdfcb199123da --- /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/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + license "BSD-3-Clause" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "96eddd22a812be4f919562d6525ab8fa19b03b700426d2fbf892da0f4fd02e73" + end + + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [: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/pyenv-ccache.rb b/Formula/p/pyenv-ccache.rb new file mode 100644 index 0000000000000..a92eb4955f1eb --- /dev/null +++ b/Formula/p/pyenv-ccache.rb @@ -0,0 +1,26 @@ +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" + + 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..cb8dba691f1b8 --- /dev/null +++ b/Formula/p/pyenv-pip-migrate.rb @@ -0,0 +1,23 @@ +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" + + 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..b280f152fb35b --- /dev/null +++ b/Formula/p/pyenv-virtualenv.rb @@ -0,0 +1,45 @@ +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_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..e1fdb4f769abe --- /dev/null +++ b/Formula/p/pyenv-virtualenvwrapper.rb @@ -0,0 +1,24 @@ +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" + + 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..628f4e1e20b69 --- /dev/null +++ b/Formula/p/pyenv.rb @@ -0,0 +1,80 @@ +class Pyenv < Formula + desc "Python version management" + homepage "https://github.com/pyenv/pyenv" + url "https://github.com/pyenv/pyenv/archive/refs/tags/v2.5.7.tar.gz" + sha256 "8f8a9269e8ac676001b57291a002e08c85c1921185bcfb517d2db569b4fdb158" + 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_sequoia: "e92da67e25841718343f019895fdd466b1f087a434c9c017a6f6be4cd56bd985" + sha256 cellar: :any, arm64_sonoma: "6fc91b1ce33f9b47111bdbfb69189cdde7ff2b345515bd95cdad8a9f5c5fdb5c" + sha256 cellar: :any, arm64_ventura: "6c4ccadbcca559187fb4bd96ac4460a0aba5aee91bcc540b88ad8a441fd18fd9" + sha256 cellar: :any, sonoma: "5176551daf7dcd43fa132b52c619f1932b43a4ac92c4186aac9a9f87fc8668e3" + sha256 cellar: :any, ventura: "5bec0b7618ddd7ae565131343bb8bdf95b0560980c94ac787559cca9413a399b" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7639f6be19a307f91505bdc31dcd2c8f4fab2d586d5b3b9454cb133441a52e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82e11c654d55d1cfbc229ddc6766c0e28185f3154e67aa37337083fd99458d70" + 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..108ed3843810b --- /dev/null +++ b/Formula/p/pyflow.rb @@ -0,0 +1,41 @@ +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_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 + + 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..86e6e5dbaf3e4 --- /dev/null +++ b/Formula/p/pygit2.rb @@ -0,0 +1,64 @@ +class Pygit2 < Formula + desc "Bindings to the libgit2 shared library" + homepage "https://github.com/libgit2/pygit2" + url "https://files.pythonhosted.org/packages/c1/4a/72a5f3572912d93d8096f8447a20fe3aff5b5dc65aca08a2083eae54d148/pygit2-1.18.0.tar.gz" + sha256 "fbd01d04a4d2ce289aaa02cf858043679bf0dd1f9855c6b88ed95382c1f5011a" + 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_sequoia: "15e1773e05f8fc685fdcb8f312a2229ef95e13a07439ef05b3e0739258cd72cc" + sha256 cellar: :any, arm64_sonoma: "6a0e000b2cdcf75710eeedc2b11e8394904e226ba8f85397f61b0527d14e14f7" + sha256 cellar: :any, arm64_ventura: "e4f58494b0888b4895119214f28bf0b0318d6caa813d96b25f6b66b19144163c" + sha256 cellar: :any, sonoma: "f3a5c74edf5535663fe1c6f07b64c4c0c4bf70720bb6ebd59a5115b800dda225" + sha256 cellar: :any, ventura: "c9f6b051139c27561442e5f7dd0549b07f617f92bf3ac875235352a8853095e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e3f7ec5aa21746f1858b947eebcc6ffedac2ac50c0d3fa4f31ae2a8b81a90e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2848a70fbce205a1cc0d0f150f26d9abc43571104f0a47d6d5d4a6091db7c03d" + end + + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + depends_on "cffi" + depends_on "libgit2" + + 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..2708ac008c7b8 --- /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 1 + sha256 cellar: :any_skip_relocation, all: "e32f3c3171ea0e3d8c6f4b3c733f76d89b4c16e00b3e66872d8425506dadb79e" + end + + depends_on "python@3.13" + + 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/19/0d/bbb5b5ee188dec84647a4664f3e11b06ade2bde568dbd489d9d64adef8ed/gitdb-4.0.11.tar.gz" + sha256 "bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/b6/a1/106fd9fa2dd989b6fb36e5893961f82992cf676381707253e0bf93eb1662/GitPython-3.1.43.tar.gz" + sha256 "35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/88/04/b5bf6d21dc4041000ccba7eb17dd3055feb237e7ffc2c20d3fae3af62baa/smmap-5.0.1.tar.gz" + sha256 "dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62" + 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..fd6df4699ab43 --- /dev/null +++ b/Formula/p/pygments.rb @@ -0,0 +1,31 @@ +class Pygments < Formula + include Language::Python::Virtualenv + + desc "Generic syntax highlighter" + homepage "https://pygments.org/" + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + license "BSD-2-Clause" + head "https://github.com/pygments/pygments.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "98328d1e104147cef03596a6f3be5ef664810d9cae9cf17d6d8eaf2803285775" + end + + depends_on "python@3.13" + + 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..065a457c667b3 --- /dev/null +++ b/Formula/p/pygobject3.rb @@ -0,0 +1,67 @@ +class Pygobject3 < Formula + desc "GNOME Python bindings (based on GObject Introspection)" + homepage "https://pygobject.gnome.org/" + url "https://download.gnome.org/sources/pygobject/3.52/pygobject-3.52.3.tar.gz" + sha256 "00e427d291e957462a8fad659a9f9c8be776ff82a8b76bdf402f1eaeec086d82" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b8d91047912ee452e7b000c29413dc0646134deee82d94181c8063ab5f33fd70" + sha256 cellar: :any, arm64_sonoma: "def6801a1a2cda4fa6873130411bbd3c5a57cfc8027ede2aed8b557d2932b1a0" + sha256 cellar: :any, arm64_ventura: "45ccc44e5d04c45b4019c3669bb2faf7348b417fd1e3da58f24c4cf19ef86538" + sha256 cellar: :any, sonoma: "87b3fe1cbb732c37d112c4a24acebd29a778836cf3360f3dfb356d6d0c561885" + sha256 cellar: :any, ventura: "bfd291c8f04e022750b169ca41f2976ed9980b99e65e22cd0dcedcf484702bc9" + sha256 arm64_linux: "e2bccaf4b84f7b54193c369b6ea4a738e6343ddf3498e5a26f69dda3db59e0a5" + sha256 x86_64_linux: "0367b4bfcc0e178c788629172392956f88494ab1e04577b092b53eaf5b008a60" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [: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..899e30c4cb9e2 --- /dev/null +++ b/Formula/p/pyinstaller.rb @@ -0,0 +1,69 @@ +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/a8/b1/2949fe6d3874e961898ca5cfc1bf2cf13bdeea488b302e74a745bc28c8ba/pyinstaller-6.13.0.tar.gz" + sha256 "38911feec2c5e215e5159a7e66fdb12400168bd116143b54a8a7a37f08733456" + license "GPL-2.0-or-later" + head "https://github.com/pyinstaller/pyinstaller.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "587564f2b16d8a3ddea2a2092dfce0b13a41cf58e754a4005d90e2879c161ee8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "08f530d0f592cb413f5aeaeb78b4c29c6ecf0fe948ef29bfb893753553789028" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d84b07ebb17fee1edef346faf70d4d70052ed1fdcb9153f2a970607e0b5591a3" + sha256 cellar: :any_skip_relocation, sonoma: "2d9d52524af170915bee4968f4ca8430257894b377cb308dc66c6835771c713f" + sha256 cellar: :any_skip_relocation, ventura: "6ae43e011c0829ebb0ba4a972e44a680c10e6e058180abc4d68e2574053b6cbb" + sha256 cellar: :any_skip_relocation, arm64_linux: "a284364b0a6ac12e91293ce5b64a9bababcdbdf5044abb5dea1fbb5939e3f623" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9acf51b2ade652c578e709190d7c983c639faba1f0c46a4e2cffd15c5bf2eda8" + end + + depends_on "python@3.13" + + uses_from_macos "zlib" + + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pyinstaller-hooks-contrib" do + url "https://files.pythonhosted.org/packages/99/14/6725808804b52cc2420a659c8935e511221837ad863e3bbc4269897d5b4d/pyinstaller_hooks_contrib-2025.2.tar.gz" + sha256 "ccdd41bc30290f725f3e48f4a39985d11855af81d614d167e3021e303acb9102" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + end + + def install + cd "bootloader" do + system "python3.13", "./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..bc6f79be022d3 --- /dev/null +++ b/Formula/p/pyinvoke.rb @@ -0,0 +1,44 @@ +class Pyinvoke < Formula + include Language::Python::Virtualenv + + desc "Pythonic task management & command execution" + homepage "https://www.pyinvoke.org/" + url "https://files.pythonhosted.org/packages/f9/42/127e6d792884ab860defc3f4d80a8f9812e48ace584ffc5a346de58cdc6c/invoke-2.2.0.tar.gz" + sha256 "ee6cbb101af1a859c7fe84f2a264c059020b0cb7fe3535f9424300ab568f6bd5" + license "BSD-2-Clause" + revision 2 + head "https://github.com/pyinvoke/invoke.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "0244d25e686d6574fcaf35d14725a415c00b33dd0b2c697fc66a78160d9227a1" + end + + depends_on "python@3.13" # 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..f00c30ba24e0e --- /dev/null +++ b/Formula/p/pylint.rb @@ -0,0 +1,105 @@ +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/1c/e4/83e487d3ddd64ab27749b66137b26dc0c5b5c161be680e6beffdc99070b3/pylint-3.3.7.tar.gz" + sha256 "2b11de8bde49f9c5059452e0c310c079c746a0a8eeaa789e5aa966ecc23e4559" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "79a2fd54f5ec3e5e174319d1a93bd2c2fda90209a405694ef6a4a3540965ec5e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "79a2fd54f5ec3e5e174319d1a93bd2c2fda90209a405694ef6a4a3540965ec5e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "79a2fd54f5ec3e5e174319d1a93bd2c2fda90209a405694ef6a4a3540965ec5e" + sha256 cellar: :any_skip_relocation, sonoma: "be7aadfecc2d88f2aaea4047fe52024444cb92943e3d73bee049a0d71e8f6bfa" + sha256 cellar: :any_skip_relocation, ventura: "be7aadfecc2d88f2aaea4047fe52024444cb92943e3d73bee049a0d71e8f6bfa" + sha256 cellar: :any_skip_relocation, arm64_linux: "777c0a4c91cbe15b862df038ffdb7fb2ab415ad6fb691d6469794308b7eb63bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "777c0a4c91cbe15b862df038ffdb7fb2ab415ad6fb691d6469794308b7eb63bd" + end + + depends_on "python@3.13" + + resource "astroid" do + url "https://files.pythonhosted.org/packages/39/33/536530122a22a7504b159bccaf30a1f76aa19d23028bd8b5009eb9b2efea/astroid-3.3.9.tar.gz" + sha256 "622cc8e3048684aa42c820d9d218978021c3c3d174fb03a9f0d615921744f550" + + # fix `setuptools.errors.InvalidConfigError: 'project.license-files' is defined already` + # commit ref, https://github.com/pylint-dev/astroid/commit/9faee90fdb66049162834a8bb066c6cb40a0e449 + patch :DATA + end + + resource "astroid" do + url "https://files.pythonhosted.org/packages/39/33/536530122a22a7504b159bccaf30a1f76aa19d23028bd8b5009eb9b2efea/astroid-3.3.9.tar.gz" + sha256 "622cc8e3048684aa42c820d9d218978021c3c3d174fb03a9f0d615921744f550" + 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/b8/21/1e2a441f74a653a144224d7d21afe8f4169e6c7c20bb13aec3a2dc3815e0/isort-6.0.1.tar.gz" + sha256 "1cb5df28dfbc742e490c5e41bad6da41b805b0a8be7bc93cd0fb2a8a890ac450" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + 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 + +__END__ +diff --git a/pyproject.toml b/pyproject.toml +index b0078e8..fcc3996 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -4,15 +4,15 @@ build-backend = "setuptools.build_meta" + + [project] + name = "astroid" +-license = {text = "LGPL-2.1-or-later"} + description = "An abstract syntax tree for Python with inference support." + readme = "README.rst" + keywords = ["static code analysis", "python", "abstract syntax tree"] ++license = "LGPL-2.1-or-later" ++license-files = [ "LICENSE", "CONTRIBUTORS.txt" ] + classifiers = [ + "Development Status :: 6 - Mature", + "Environment :: Console", + "Intended Audience :: Developers", +- "License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", +@@ -40,9 +40,6 @@ dynamic = ["version"] + "Bug tracker" = "https://github.com/pylint-dev/astroid/issues" + "Discord server" = "https://discord.gg/Egy6P8AMB5" + +-[tool.setuptools] +-license-files = ["LICENSE", "CONTRIBUTORS.txt"] # Keep in sync with setup.cfg +- + [tool.setuptools.package-dir] + "" = "." diff --git a/Formula/p/pylyzer.rb b/Formula/p/pylyzer.rb new file mode 100644 index 0000000000000..3ed85b2849667 --- /dev/null +++ b/Formula/p/pylyzer.rb @@ -0,0 +1,42 @@ +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_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..ea24f9ae5bc75 --- /dev/null +++ b/Formula/p/pymol.rb @@ -0,0 +1,98 @@ +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 + sha256 cellar: :any, arm64_sonoma: "13f683c319c06b8e30f2b961c56e16a079b364780de4d237a5b35c576ce7bcfb" + sha256 cellar: :any, arm64_ventura: "1fd72c9332cf93d45638faa9f2b39e8a1eb60694e6ef6c2466167ba3990fb935" + sha256 cellar: :any, sonoma: "8af0422ae606f64c6f0736f19b50ad315513e36ab4d8cec860767b988ac70c4a" + sha256 cellar: :any, ventura: "a6346a1171b662880f9f793835ce90420e32352b80e866a2a26a07dd2fc89879" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af7204c635fb07c2cd01164d36765a20e9e297060cd94fb67d9d71d0a0509ddd" + 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.13" + + 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 + + def python3 + which("python3.13") + 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..97334478d594e --- /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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "64f35865fbde010d4e3de039977eec6bc1bbe6dabb19fca1f9c3f9da709e1593" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ad170caf12af4322d5b0f819cdf13616af3d389de0400f157ac7638cce10fcff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3ec3fed16c5ce89078a32c6b63d2f1c14753463ccfc5ec2a15d2d04f133714fc" + sha256 cellar: :any_skip_relocation, sonoma: "a2674da110b3e8914940e4433d6a2be31235f1ebd87e6511d5365e0fda822b8f" + sha256 cellar: :any_skip_relocation, ventura: "4bddb67288e852dd28024c0f2d850f09f7c26c4becf42aa4701e0e4904579e7e" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0bc4386fb18cdbfb144e8ffb7d532a55eacee02a76540260f5ccda0e7104e06" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0bc4386fb18cdbfb144e8ffb7d532a55eacee02a76540260f5ccda0e7104e06" + 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.13" + + 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..1a28b480100d5 --- /dev/null +++ b/Formula/p/pymupdf.rb @@ -0,0 +1,63 @@ +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/f9/af/3d5d363241b9a74470273cf1534436f13a0a61fc5ef6efd19e5afe9de812/pymupdf-1.25.5.tar.gz" + sha256 "5f96311cacd13254c905f6654a004a0a2025b71cabc04fda667f5472f72c15a0" + license "AGPL-3.0-only" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "6403ec1f83d72f37814ecfd6bb97a282ee77da09c0c23365489a87827fb8ab13" + sha256 cellar: :any, arm64_sonoma: "785565c0fd451871fcbe8bb521ef5bfdcd9345ecf52d88778f853dabe0118834" + sha256 cellar: :any, arm64_ventura: "2d44908b7480e3566706299e60cfd7368bf6cc9dd93882655f8bc837e4950c60" + sha256 cellar: :any, sonoma: "9a1f423034d94a39abd45411c9d1d4cfa913b930afc1d47be15e36d0665d635b" + sha256 cellar: :any, ventura: "b986d4b8eb5b9036f109eaf87247d06447cc1ee8219b03bec85eefd57af3ee95" + sha256 cellar: :any_skip_relocation, arm64_linux: "8f9c66135b7ad940d5ffbfbf5eabe43c69533684e2bf5d5d042bdee4224fa040" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fa9e18b05f1099139b172fccbeec5f0bd407b14c306cf6728ab63719ce761ef" + end + + depends_on "freetype" => :build + depends_on "python-setuptools" => :build + depends_on "swig" => :build + depends_on "mupdf" + depends_on "python@3.13" + + def python3 + "python3.13" + 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..00ac78bc0a625 --- /dev/null +++ b/Formula/p/pyoxidizer.rb @@ -0,0 +1,56 @@ +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_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..e307cc2c9f0b0 --- /dev/null +++ b/Formula/p/pyp.rb @@ -0,0 +1,24 @@ +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 + sha256 cellar: :any_skip_relocation, all: "0b8eaab0a5475a43fcbc136c96cd81caed5abb0b755395652d6d238cc9968f4b" + end + + depends_on "python@3.13" + + 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..2d848832509ac --- /dev/null +++ b/Formula/p/pypy.rb @@ -0,0 +1,238 @@ +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.19-src.tar.bz2" + sha256 "8703cdcb01f9f82966dd43b6a6018f140399db51ebb43c125c1f9a215e7bb003" + 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_sequoia: "58bb108411e8647d3dd78869113ae11b982b243785136d876c9181a8e1d35132" + sha256 cellar: :any, arm64_sonoma: "04f649d0679c90024d9c74bada227b201e119d427a30c0221ae1569e5cd78501" + sha256 cellar: :any, arm64_ventura: "bd4c3f56ba5df8881c381dde593ea05084fc2aed6aeaf023700f1e62d84666e1" + sha256 cellar: :any, sonoma: "731e075bdfe1a731a2f95731def57dc4effc35a9eff413b9710874996d24cc38" + sha256 cellar: :any, ventura: "1c0d7f23afe5b128b2be5c93af7c22dab16af4c76bd8fac5626050b5223e099c" + sha256 cellar: :any_skip_relocation, arm64_linux: "e428e5396ea79feeedc99e1a753b6af06d7bed608bcf432633c550345158a603" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3eb0b648e17940b5e7c4bbb7f5c04ad0cee9bdfab7f7585a384dedd53c027329" + 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 :DATA + + 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 + +__END__ +--- 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/Formula/p/pypy3.10.rb b/Formula/p/pypy3.10.rb new file mode 100644 index 0000000000000..c1ecf602ad44c --- /dev/null +++ b/Formula/p/pypy3.10.rb @@ -0,0 +1,249 @@ +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(?:\.\d+)*[._-]v?(\d+(?:\.\d+)+)-src\.t/i) + end + + bottle do + 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 :DATA + + 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 + +__END__ +--- 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/Formula/p/pypy3.9.rb b/Formula/p/pypy3.9.rb new file mode 100644 index 0000000000000..9b5dd12945aeb --- /dev/null +++ b/Formula/p/pypy3.9.rb @@ -0,0 +1,253 @@ +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 + + 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" + + # 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 :DATA + + 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 + +__END__ +--- 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/Formula/p/pyqt-builder.rb b/Formula/p/pyqt-builder.rb new file mode 100644 index 0000000000000..25f7afdeef55d --- /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/0b/0a/e7684c054c3b85999354bb3be7ccbd6e6d9b751940cec8ecff5e7a8ea9f7/pyqt_builder-1.18.1.tar.gz" + sha256 "3f7a3a2715947a293a97530a76fd59f1309fcb8e57a5830f45c79fe7249b3998" + license "BSD-2-Clause" + head "https://github.com/Python-PyQt/PyQt-builder.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5591035e0e903e2c6c628105abd0f2a4e35fbf23d9da415a0c7f9f0522602517" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5591035e0e903e2c6c628105abd0f2a4e35fbf23d9da415a0c7f9f0522602517" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5591035e0e903e2c6c628105abd0f2a4e35fbf23d9da415a0c7f9f0522602517" + sha256 cellar: :any_skip_relocation, sonoma: "7592ce5a7b68fadabf2660c09f2f895ed264d83ff822cfaaa14bc2479222d227" + sha256 cellar: :any_skip_relocation, ventura: "7592ce5a7b68fadabf2660c09f2f895ed264d83ff822cfaaa14bc2479222d227" + sha256 cellar: :any_skip_relocation, arm64_linux: "697a182e104921d51f042edcb6b9fa3ced6510ee6e7fd874ecc6bf294c3b301d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ec6626acbdf3949d211cec6b10036c95ca58f17289dd941b628306a289b0daaa" + end + + depends_on "python@3.13" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/92/ec/089608b791d210aec4e7f97488e67ab0d33add3efccb83a056cbafe3a2a6/setuptools-75.8.0.tar.gz" + sha256 "c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6" + end + + resource "sip" do + url "https://files.pythonhosted.org/packages/62/9a/78122735697dbfc6c1db363627309eb0da7e44d8c05ba017b08666530586/sip-6.10.0.tar.gz" + sha256 "fa0515697d4c98dbe04d9e898d816de1427e5b9ae5d0e152169109fd21f5d29c" + end + + def python3 + "python3.13" + 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..ae3ff68421c1a --- /dev/null +++ b/Formula/p/pyqt.rb @@ -0,0 +1,116 @@ +class Pyqt < Formula + desc "Python bindings for v6 of Qt" + homepage "https://www.riverbankcomputing.com/software/pyqt/intro" + url "https://files.pythonhosted.org/packages/32/de/102e8e66149085acf38bbf01df572a2cd53259bcd99b7d8ecef0d6b36172/pyqt6-6.9.0.tar.gz" + sha256 "6a8ff8e3cd18311bb7d937f7d741e787040ae7ff47ce751c28a94c5cddc1b4e6" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any, arm64_sonoma: "9d2e7040345f46c69227e5dd30def0a1c0476514d243e5b5dead7d41d56afa4c" + sha256 cellar: :any, arm64_ventura: "d9ad0408c1b54060d3de9e2dd1f3e677a294e04731117826c53e3fa439acae4e" + sha256 cellar: :any, sonoma: "a32ce76f5d3bfe77347e5cbda5f8e03d078776ab79d2f727745ae6fc6816f562" + sha256 cellar: :any, ventura: "221fd42552d92677b357637d303cbe7f62f78ce3263dfb48051fbcbd0ae1189f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "11224506e0d20f285ad01c36b366dda4e6b5b1723056f100c32935bf27a26fa9" + end + + depends_on "pyqt-builder" => :build + depends_on "python@3.13" + depends_on "qt" + + # extra components + resource "pyqt6-3d" do + url "https://files.pythonhosted.org/packages/b3/1a/89e4bbc1c604d3a450111a7600d256b371200bf616157efd48c13f5646d3/pyqt6_3d-6.9.0.tar.gz" + sha256 "af4b497e34f30e8dba53da2f2683e82994bc6d6f512fb7a91c3150aa31b6d49a" + end + + resource "pyqt6-charts" do + url "https://files.pythonhosted.org/packages/05/2e/d818e649751bd74df5aac3f8cfc7bc96c739ce19ae22fbaee75625a387e0/pyqt6_charts-6.9.0.tar.gz" + sha256 "7efbe9bb7e6ad4f9845211a0efe0f91ca5e14f9362ed1ba84d55f2b8515091f7" + end + + resource "pyqt6-datavisualization" do + url "https://files.pythonhosted.org/packages/0e/64/2fb8f276b6231d9c7a4333279b39834fd05d9e503651db8e94c2c1980d3f/pyqt6_datavisualization-6.9.0.tar.gz" + sha256 "1515475f1b2c37275ecf6ac74017a64fae8335d97b87fbbaf14bac3f82cdaa0a" + end + + resource "pyqt6-networkauth" do + url "https://files.pythonhosted.org/packages/88/6d/cc1fb6ae4fa7b455dbda92f8e41fefe6393a1081dfa2ebd9ddc7daf28ade/pyqt6_networkauth-6.9.0.tar.gz" + sha256 "9acb6e97bd54584bbaeac2aabc40ec17a79d868f7da37a163c7bd4b7a8f04b09" + end + + resource "pyqt6-sip" do + url "https://files.pythonhosted.org/packages/90/18/0405c54acba0c8e276dd6f0601890e6e735198218d031a6646104870fe22/pyqt6_sip-13.10.0.tar.gz" + sha256 "d6daa95a0bd315d9ec523b549e0ce97455f61ded65d5eafecd83ed2aa4ae5350" + 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.13" + 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" && OS.mac? && MacOS.version <= :ventura + + 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 OS.linux? || MacOS.version > :ventura + 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..f3a010f41b885 --- /dev/null +++ b/Formula/p/pyqt@5.rb @@ -0,0 +1,109 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ee754605e872d1b42d4dafe9b53980d4917a49003f4b54c32d282fafbc2dbe25" + sha256 cellar: :any, arm64_sonoma: "4d1a259a2b1c7e926f1b84f60bf574348ce11d148e75ab7f47ca1f1310d696b2" + sha256 cellar: :any, arm64_ventura: "3216d813b7409248232632126fdf3532a167a7796bc1e269440d8afae51d465e" + sha256 cellar: :any, sonoma: "a090e036da0b1d1dd57eedce4b51c5b0cc5032120b976cdaef3ceb57ae3d6eb5" + sha256 cellar: :any, ventura: "751f0e1bd98b6beae7643760f65ab8ae33a992010e5265fbddeb4c9c012b676b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f6a880862f2f69cc6fad70b2e6ca750bdfe8bb19ad41d41568cdeb4497d7278" + end + + depends_on "pyqt-builder" => :build + depends_on "python@3.13" + depends_on "qt@5" + + # 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/01/79/086b50414bafa71df494398ad277d72e58229a3d1c1b1c766d12b14c2e6d/pyqt5_sip-12.17.0.tar.gz" + sha256 "682dadcdbd2239af9fdc0c0628e2776b820e128bec88b49b8d692fe682f90b4f" + 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.13" + 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/pyright.rb b/Formula/p/pyright.rb new file mode 100644 index 0000000000000..d094bf6fbd9f5 --- /dev/null +++ b/Formula/p/pyright.rb @@ -0,0 +1,34 @@ +class Pyright < Formula + desc "Static type checker for Python" + homepage "https://github.com/microsoft/pyright" + url "https://registry.npmjs.org/pyright/-/pyright-1.1.400.tgz" + sha256 "2ccba7af9c8b14bb81c8fa9bb558d8b5181b586ec4dfc448b78eb4209e7a429a" + license "MIT" + head "https://github.com/microsoft/pyright.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c6c6bc2be25115565840bed82c24bce19606cab80d3a2eda9c0bf6d5a70e77b5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c6c6bc2be25115565840bed82c24bce19606cab80d3a2eda9c0bf6d5a70e77b5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6c6bc2be25115565840bed82c24bce19606cab80d3a2eda9c0bf6d5a70e77b5" + sha256 cellar: :any_skip_relocation, sonoma: "1929d9048610b09e242de322cd0d1017aeac20b47f658006b22e4a5891f395ad" + sha256 cellar: :any_skip_relocation, ventura: "1929d9048610b09e242de322cd0d1017aeac20b47f658006b22e4a5891f395ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "c6c6bc2be25115565840bed82c24bce19606cab80d3a2eda9c0bf6d5a70e77b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c6c6bc2be25115565840bed82c24bce19606cab80d3a2eda9c0bf6d5a70e77b5" + 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/pyside.rb b/Formula/p/pyside.rb new file mode 100644 index 0000000000000..89e993ab1c06e --- /dev/null +++ b/Formula/p/pyside.rb @@ -0,0 +1,149 @@ +class Pyside < Formula + include Language::Python::Virtualenv + + 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.0-src/pyside-setup-everywhere-src-6.9.0.tar.xz" + mirror "https://cdimage.debian.org/mirror/qt.io/qtproject/official_releases/QtForPython/pyside6/PySide6-6.9.0-src/pyside-setup-everywhere-src-6.9.0.tar.xz" + sha256 "315b73bb7570d5b9e6793a8d3fafd1d2dd7f43d35eebb01d2b554ea206aad88e" + # 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 + sha256 cellar: :any, arm64_sonoma: "01d53933c30b3bf63d7514a55b161bf8a411bf42b4ce04f55dc9b562559c873c" + sha256 cellar: :any, arm64_ventura: "8d483c1e6c26af22143c13459029df148587e3322dfeee4c31aaf35ff1c043fe" + sha256 cellar: :any, sonoma: "6cc5f927b8f393383f632ebc637b902cd419618f8e3c4ebc2e77dc4362f7adad" + sha256 cellar: :any, ventura: "7b570827012a0a43ee2371387db4958e89145ed16b7485a822e9ced04217d8b2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "249bc3164d2967cc7c0087c4498ce4dca80f82d76fe3b8a9ed16dada2ea39c44" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "python-setuptools" => :build + depends_on xcode: :build + depends_on "pkgconf" => :test + depends_on "llvm" + depends_on "python@3.13" + depends_on "qt" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + on_linux do + depends_on "mesa" + 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" + if OS.mac? + # Avoid detection of unwanted formulae. Should be handled in brew instead + ENV["CMAKE_PREFIX_PATH"] = ENV["CMAKE_PREFIX_PATH"].split(":") + .reject { |p| p == HOMEBREW_PREFIX.to_s } + .join(":") + end + + extra_include_dirs = [Formula["qt"].opt_include] + extra_include_dirs << Formula["mesa"].opt_include if OS.linux? + + # 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 + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{lib}", + "-DCMAKE_PREFIX_PATH=#{Formula["qt"].opt_lib}", + "-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? || MacOS.version > :ventura + 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..019b732776ff4 --- /dev/null +++ b/Formula/p/pyside@2.rb @@ -0,0 +1,149 @@ +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.16-src/pyside-setup-opensource-src-5.15.16.tar.xz" + sha256 "6d3ed6fd17275ea74829ab56df9c2e7641bfca6b5b201cf244998fa81cf07360" + # 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"] }, + ] + + livecheck do + url "https://download.qt.io/official_releases/QtForPython/pyside2/" + regex(%r{href=.*?PySide2[._-]v?(\d+(?:\.\d+)+)-src/}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "306fed8cdc3df64383e383bc48f5a890f2097e6b9d6931df1db6f3f4db8c2ceb" + sha256 cellar: :any, arm64_sonoma: "11ee1dbaa5ca85382f669e72b4cd8de39d7468c2b3634e4c324bea235d097f9e" + sha256 cellar: :any, arm64_ventura: "03368c735c411d97738b675829caf91040ee7c2cab0dce9ed6f59ca75ed9df74" + sha256 cellar: :any, sonoma: "e7c5048a3bc60c86038cda301239cb00f5442c693b8fe6d164d55e9d9a9600bb" + sha256 cellar: :any, ventura: "e7c2d3c4175db918d43d300206d628d8f2a1074e54ef5bbe36b9d80548bd64b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b2bd5978ba6c32184505241867615f67125ba4e597ac23a98be767e265c492d" + 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..189db349a8f9a --- /dev/null +++ b/Formula/p/pyspelling.rb @@ -0,0 +1,108 @@ +class Pyspelling < Formula + include Language::Python::Virtualenv + + desc "Spell checker automation tool" + homepage "https://facelessuser.github.io/pyspelling/" + url "https://files.pythonhosted.org/packages/12/07/168a857755a29b7e41550a28cd8f527025bc62fcb36a951d8f3f2eedcdf7/pyspelling-2.10.tar.gz" + sha256 "acd67133c1b7cecd410e3d4489e61f2e4b1f0b6acf1ae6c48c240fbb21729c37" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "f364a5e63736d91e836130acd9578fd23178557d496b47a8085bc5ea68c9e556" + sha256 cellar: :any, arm64_sonoma: "a0b442e7373165dbfb8f25214b59a65f777b184297b119fab94e3e0ca6c86694" + sha256 cellar: :any, arm64_ventura: "48009640d75f18f1846423c97fbd40f3380efea76eb8a62769e588ea222fe978" + sha256 cellar: :any, sonoma: "8ba1a7461c8dcb5b99bcc94b1ab9a3475ec188db46b6a96963c277175728413f" + sha256 cellar: :any, ventura: "de5ae39942a758e650b22e596f9e0a81107f7dc964cbfe0281428fca71537cc5" + sha256 cellar: :any_skip_relocation, arm64_linux: "26c14629d1fd22e1d6b83af9b72891b1160f08d3fdcc28c9c4aa529e4910168a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd3f06b840816904dffb43f08a37efdf852255d22b6f4a393abe28319b5ea116" + end + + depends_on "aspell" => :test + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/b3/ca/824b1195773ce6166d388573fc106ce56d4a805bd7427b624e063596ec58/beautifulsoup4-4.12.3.tar.gz" + sha256 "74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051" + end + + resource "bracex" do + url "https://files.pythonhosted.org/packages/d6/6c/57418c4404cd22fe6275b8301ca2b46a8cdaa8157938017a9ae0b3edf363/bracex-2.5.post1.tar.gz" + sha256 "12c50952415bfa773d2d9ccb8e79651b8cdb1f31a42f6091b804f6ba2b4a66b6" + end + + resource "html5lib" do + url "https://files.pythonhosted.org/packages/ac/b6/b55c3f49042f1df3dcd422b7f224f939892ee94f22abcf503a9b7339eaf2/html5lib-1.1.tar.gz" + sha256 "b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/e7/6b/20c3a4b24751377aaa6307eb230b66701024012c29dd374999cc92983269/lxml-5.3.0.tar.gz" + sha256 "4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f" + end + + resource "markdown" do + url "https://files.pythonhosted.org/packages/54/28/3af612670f82f4c056911fbbbb42760255801b3068c48de792d354ff4472/markdown-3.7.tar.gz" + sha256 "2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + end + + resource "wcmatch" do + url "https://files.pythonhosted.org/packages/41/ab/b3a52228538ccb983653c446c1656eddf1d5303b9cb8b9aef6a91299f862/wcmatch-10.0.tar.gz" + sha256 "e72f0de09bba6a04e0de70937b0cf06e55f36f37b3deb422dfaf854b867b840a" + 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..684fa0fe2a45e --- /dev/null +++ b/Formula/p/pystring.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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 + 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..0ff38917985a2 --- /dev/null +++ b/Formula/p/pytest.rb @@ -0,0 +1,42 @@ +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/ae/3c/c9d525a414d506893f0cd8a8d0de7706446213181570cdbd766691164e40/pytest-8.3.5.tar.gz" + sha256 "f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e8201f8651135ef002d6de2722e35260548dca904644c9a244ea71420b4e61db" + end + + depends_on "python@3.13" + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz" + sha256 "2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + 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..83d65729ff487 --- /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/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ab68f1949e1049b9d0d2b844312090763d9b589c5e0cf7727486f987a6a28088" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ab68f1949e1049b9d0d2b844312090763d9b589c5e0cf7727486f987a6a28088" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ab68f1949e1049b9d0d2b844312090763d9b589c5e0cf7727486f987a6a28088" + sha256 cellar: :any_skip_relocation, sonoma: "bf80f1c3d1bbc90a5fb4fae7c8452c430db2ddba42d274d2fc8c5e3646c95b29" + sha256 cellar: :any_skip_relocation, ventura: "bf80f1c3d1bbc90a5fb4fae7c8452c430db2ddba42d274d2fc8c5e3646c95b29" + sha256 cellar: :any_skip_relocation, arm64_linux: "0afc8245b8dd5253ca6303cae254b3f9ecc25755b13a7d23f71d2040223f3dc5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0afc8245b8dd5253ca6303cae254b3f9ecc25755b13a7d23f71d2040223f3dc5" + end + + depends_on "python@3.13" + + 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" + 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..1cc7a1c1582f5 --- /dev/null +++ b/Formula/p/python-build.rb @@ -0,0 +1,42 @@ +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/7d/46/aeab111f8e06793e4f0e421fcad593d547fb8313b50990f31681ee2fb1ad/build-1.2.2.post1.tar.gz" + sha256 "b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7" + license "MIT" + head "https://github.com/pypa/build.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "f23085e3fdd3df2e26645ead412a79b3ff824d7c2621c6c185548a88595c8caa" + end + + depends_on "python@3.13" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + 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 + + # Ensure uniform bottles by replacing a `/usr/local` reference in a comment. + inreplace libexec/"lib/python3.13/site-packages/build/env.py", "/usr/local", HOMEBREW_PREFIX + 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..d1c9bd5341e6c --- /dev/null +++ b/Formula/p/python-freethreading.rb @@ -0,0 +1,469 @@ +class PythonFreethreading < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.13.3/Python-3.13.3.tgz" + sha256 "988d735a6d33568cbaff1384a65cb22a1fb18a9ecb73d43ef868000193ce23ed" + license "Python-2.0" + + livecheck do + formula "python" + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "780698a792348a25f93c7b284a922a8c70bcc2d45b2d48448ff8f930356c83a9" + sha256 arm64_sonoma: "d5b4985f277da8b709d9fefb01db68d6dd9ce06d5cb4a79d188184f47877ca67" + sha256 arm64_ventura: "595d95dd44ff8977a90b93ba19e06d955bcc22d3bccd8167f37a45dcd348bc58" + sha256 sequoia: "c2b278641312607921e8b492893c70792564497caa30ca6ca90f6ae69d5b093b" + sha256 sonoma: "429c39c05aaa5c7e347938ae3a32fd46af6a953ecc9e830b185b19697596446e" + sha256 ventura: "d5c3801396068e28ee0ce985a859c0536faf5086083ac0407eaf999ce5ed295f" + sha256 arm64_linux: "325bf7a74398a202e6200dfb833a0023cd541eca5bb3ee30ba72e9dfee769bcb" + sha256 x86_64_linux: "5b8957b64f45da4232da4a675f650447e609c2f61c3225568e6c40e190d3890b" + end + + depends_on "pkgconf" => :build + depends_on "mpdecimal" + depends_on "openssl@3" + depends_on "sqlite" + depends_on "xz" + + # 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", since: :catalina + 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.13t/site-packages/pip*" + link_overwrite "lib/python3.13t/site-packages/wheel*" + + # Always update to latest release + resource "flit-core" do + url "https://files.pythonhosted.org/packages/d5/ae/09427bea9227a33ec834ed5461432752fd5d02b14f93dd68406c91684622/flit_core-3.10.1.tar.gz" + sha256 "66e5b87874a0d6e39691f0e22f09306736b633548670ad3c09ec9db03c5662f7" + end + + resource "pip" do + url "https://files.pythonhosted.org/packages/f4/b1/b422acd212ad7eedddaf7981eee6e5de085154ff726459cf2da7c5a184c1/pip-24.3.1.tar.gz" + sha256 "ebcb60557f2aefabc2e0f918751cd24ea0d56d8ec5445fe1807f1d2109660b99" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/43/54/292f26c208734e9a7f067aea4a7e282c080750c4546559b58e2e45413ca0/setuptools-75.6.0.tar.gz" + sha256 "8199222558df7c86216af4f84c30e9b34a61d8ba19366cc914424cdbd28252f6" + 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/formula-patches/22f07354b9778579dd3297bbce0ed3d3244dd982/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 setuptools].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" + + # 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..7d65b0946d761 --- /dev/null +++ b/Formula/p/python-gdbm@3.11.rb @@ -0,0 +1,62 @@ +class PythonGdbmAT311 < Formula + desc "Python interface to gdbm" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.11.12/Python-3.11.12.tgz" + sha256 "379c9929a989a9d65a1f5d854e011f4872b142259f4fc0a8c4062d2815ed7fba" + license "Python-2.0" + + livecheck do + formula "python@3.11" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "2b7c4d7ee9c2f8b6ce40037744162a7d082ac85aaac788bfb84b75e22eecf950" + sha256 cellar: :any, arm64_sonoma: "a4365561edde1e9348922a82fbc241e153e48b54a273e5078d10024227f76f9c" + sha256 cellar: :any, arm64_ventura: "06685a9c327490fb54c0fc7812f4b72bb4be58da4f088aa99d52aae2fbab4644" + sha256 cellar: :any, sonoma: "6a3f1fbd69a02dd0678b770ed15a2115961eaee3cd4e8f6e2281498eb074eb70" + sha256 cellar: :any, ventura: "d94e887af451811b87ec461c85f50606f29d8985d92dfc2719e6fc81467841df" + sha256 arm64_linux: "788c449cda242d125479d70279b280337af1056cf5c57685372756f2907ee7c8" + sha256 x86_64_linux: "bdfbc550557657b083c1e0f9a1f91d49b79a8563548f126ee1e8c8dbfa8cbcd5" + 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..f5ec791fac382 --- /dev/null +++ b/Formula/p/python-gdbm@3.12.rb @@ -0,0 +1,70 @@ +class PythonGdbmAT312 < Formula + desc "Python interface to gdbm" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.12.10/Python-3.12.10.tgz" + sha256 "15d9c623abfd2165fe816ea1fb385d6ed8cf3c664661ab357f1782e3036a6dac" + license "Python-2.0" + + livecheck do + formula "python@3.12" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "d1c8217aca34078b11bcc486dd24b4fb9b73c3e40e458eb80e2f7dd48bbd7a8c" + sha256 cellar: :any, arm64_sonoma: "2235422e60703d43bb908b61d668bd32ac41258e46b0927f37a015b0829de3f3" + sha256 cellar: :any, arm64_ventura: "ec356282e7e466619e82265b82ea1a75abbb7ad95548ec4e795a188eea16e0dd" + sha256 cellar: :any, sonoma: "18d9ba31b571e6365849f5f0c8c0a9fd541eac65b6535a12d8629bb30fe10cbf" + sha256 cellar: :any, ventura: "8d04a7b48ed2f2cac5a3016cbe4fd76379cb691a5daf0ccf053f8828059b9705" + sha256 arm64_linux: "d33b60d7a05278e3417edbb677d27284ef618c8913d094e8b770d42681425d3d" + sha256 x86_64_linux: "1ba9cff9e3e6bf6095e92e04ac84db78a2a88bbf112e0a5bc196e569ea3e2f4b" + 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..453d3f9b381b2 --- /dev/null +++ b/Formula/p/python-gdbm@3.13.rb @@ -0,0 +1,70 @@ +class PythonGdbmAT313 < Formula + desc "Python interface to gdbm" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.13.3/Python-3.13.3.tgz" + sha256 "988d735a6d33568cbaff1384a65cb22a1fb18a9ecb73d43ef868000193ce23ed" + license "Python-2.0" + + livecheck do + formula "python@3.13" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e159fc9a3a64443c8aff10846b32551521a1526ae21a65713593569b6d4e01e4" + sha256 cellar: :any, arm64_sonoma: "f697ae9ed3f4e57c603fcf21a03a0ea9a0c55379f0db6cf993a824b69c9d7cd6" + sha256 cellar: :any, arm64_ventura: "9e52c8f2f96f48f922f28f4a32cdcf4474ca1dd245b6d8d2fe2f9d9c548e795c" + sha256 cellar: :any, sonoma: "ed6f0255cf007af4739a547399ebfb5f061dab02ebf78e6753db42ba1369495f" + sha256 cellar: :any, ventura: "89dfc33ead9e4287511aaa1db652b0019df7c3e294c500ea4b70caa3cccc7ffb" + sha256 arm64_linux: "afa2912ff94b2e0c7d5dd7b769d9d7622dbb6dea51f6efdf91d0b9868dc43175" + sha256 x86_64_linux: "96a755eb5a2dc3426127d0ba94886c6a9275e1a67c34b084ddac5904c84492be" + 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-launcher.rb b/Formula/p/python-launcher.rb new file mode 100644 index 0000000000000..95777daab9519 --- /dev/null +++ b/Formula/p/python-launcher.rb @@ -0,0 +1,37 @@ +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_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..05ea1c9ac55e5 --- /dev/null +++ b/Formula/p/python-lsp-server.rb @@ -0,0 +1,180 @@ +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/cc/0f/3d63c5f37edca529a2a003a30add97dcce67a83a99dd932528f623aa1df9/python_lsp_server-1.12.2.tar.gz" + sha256 "fea039a36b3132774d0f803671184cf7dde0c688e7b924f23a6359a66094126d" + license "MIT" + head "https://github.com/python-lsp/python-lsp-server.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "09e26824b2fc762a010b20771dd5d0c5e948d77fbac433add17a9be4c2d99a00" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5946bfeb95bcea26c07523e5df3ce8a4efa8b880ce34da7c5c4d70923eb63a79" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d8223f1b63a319f769af3457b8a8e1adcf1217c4c81ea0fc753874558fadaeee" + sha256 cellar: :any_skip_relocation, sonoma: "09958cfb289fbad98f382d57307d690e834168c1938ca6b63e64974178c5baab" + sha256 cellar: :any_skip_relocation, ventura: "4a0fb462a375ea36f7c0286d01f77af6435172beb877c51e467f680092eb1a9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e2cd4e57a8bc41770a17c68e5a9ddc6b689b3e5ac9d4c4854b2f30d96e7acfe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57f4b38c13ab091a898b105768ff448fac040603c1c3492c65261893959f6ceb" + end + + depends_on "rust" => :build + depends_on "python@3.13" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/49/7c/fdf464bcc51d23881d110abd74b512a42b3d5d376a55a831b44c603ae17f/attrs-25.1.0.tar.gz" + sha256 "1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e" + end + + resource "black" do + url "https://files.pythonhosted.org/packages/94/49/26a7b0f3f35da4b5a65f081943b7bcd22d7002f5f0fb8098ec1ff21cb6ef/black-25.1.0.tar.gz" + sha256 "33496d5cd1222ad73391352b4ae8da15253c5de89b93a80b3e2c8d9a19ec2666" + end + + resource "cattrs" do + url "https://files.pythonhosted.org/packages/64/65/af6d57da2cb32c076319b7489ae0958f746949d407109e3ccf4d115f147c/cattrs-24.1.2.tar.gz" + sha256 "8028cfe1ff5382df59dd36474a86e02d817b06eaf8af84555441bac915d2ef85" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "docstring-to-markdown" do + url "https://files.pythonhosted.org/packages/7a/ad/6a66abd14676619bd56f6b924c96321a2e2d7d86558841d94a30023eec53/docstring-to-markdown-0.15.tar.gz" + sha256 "e146114d9c50c181b1d25505054a8d0f7a476837f0da2c19f07e06eaed52b73d" + 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/9d/f6/6e80484ec078d0b50699ceb1833597b792a6c695f90c645fbaf54b947e6f/lsprotocol-2023.0.1.tar.gz" + sha256 "cc5c15130d2403c18b734304339e51242d3018a05c4f7d0f198ad6e0cd21861d" + end + + resource "mypy" do + url "https://files.pythonhosted.org/packages/ce/43/d5e49a86afa64bd3839ea0d5b9c7103487007d728e1293f52525d6d5486a/mypy-1.15.0.tar.gz" + sha256 "404534629d51d3efea5c800ee7c42b72a6554d6c400e6a79eafe15d11341fd43" + end + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz" + sha256 "75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "parso" do + url "https://files.pythonhosted.org/packages/66/94/68e2e17afaa9169cf6412ab0f28623903be73d1b32e208d9e8e541bb086d/parso-0.8.4.tar.gz" + sha256 "eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d" + 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/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + 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/ea/ec/475febe2f9e799f44afa476a2c0e063368d4289a65b80457ed737f6d05c0/python_lsp_ruff-2.2.2.tar.gz" + sha256 "3f80bdb0b4a8ee24624596a1cff60b28cc37771773730f9bf7d946ddff9f0cac" + 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/1c/c1/875e0270ac39b764fcb16c2dfece14a42747dbd0f181ac3864bff3126af1/rope-1.13.0.tar.gz" + sha256 "51437d2decc8806cd5e9dd1fd9c1306a6d9075ecaf78d191af85fc1dfface880" + end + + resource "ruff" do + url "https://files.pythonhosted.org/packages/02/74/6c359f6b9ed85b88df6ef31febce18faeb852f6c9855651dfb1184a46845/ruff-0.9.5.tar.gz" + sha256 "11aecd7a633932875ab3cb05a484c99970b9d52606ce9ea912b690b02653d56c" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "ujson" do + url "https://files.pythonhosted.org/packages/f0/00/3110fd566786bfa542adb7932d62035e0c0ef662a8ff6544b6643b3d6fd7/ujson-5.10.0.tar.gz" + sha256 "b3cd8f3c5d8c7738257f1018880444f7b7d9b66232c64649f562d7ba86ad4bc1" + end + + resource "websockets" do + url "https://files.pythonhosted.org/packages/94/54/8359678c726243d19fae38ca14a334e740782336c9f19700858c4eb64a1e/websockets-14.2.tar.gz" + sha256 "5059ed9c54945efb321f097084b4c7e52c246f2c869815876a69d1efc4ad6eb5" + end + + def install + ENV["PIP_USE_PEP517"] = "1" + 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..b22aebaa02d54 --- /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/2f/15/222b423b0b88689c266d9eac4e61396fe2cc53464459d6a37618ac863b24/markdown-3.8.tar.gz" + sha256 "7df81e63f0df5c4b24b7d156eb81e4690595239b7d70937d0409f1b0de319c6f" + license "BSD-3-Clause" + head "https://github.com/Python-Markdown/markdown.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "9236e8371fe094ff61d9d5de0ea231a1078e39757016b2d484b232d621f8985e" + end + + depends_on "python@3.13" + + 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..5016641a76d77 --- /dev/null +++ b/Formula/p/python-matplotlib.rb @@ -0,0 +1,92 @@ +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/26/91/d49359a21893183ed2a5b6c76bec40e0b1dcbf8ca148f864d134897cfc75/matplotlib-3.10.3.tar.gz" + sha256 "2f82d2c5bb7ae93aaaa4cd42aca65d76ce6376f83304fa3a630b569aca274df0" + license "PSF-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f846f0a1c9d5d48422448f07e15a9dcd0daebefac582812edfb8ebd6cf2b7943" + sha256 cellar: :any, arm64_sonoma: "0e570ef8a32efdcbba04f783a18f2b7c30323c69858d5800b824c116ac25b290" + sha256 cellar: :any, arm64_ventura: "7faf623e8955a64ef19a948d333fdbe837c7d83d49c35117e3b880380a4bee21" + sha256 cellar: :any, sonoma: "fc4ebc05b8a4a9ea3c54a9bc1d085ba379c3531fab651d45c6e0d2de76ef682e" + sha256 cellar: :any, ventura: "8c4e8ef8163b0a475e15c64c9ae1130088ea44dae426cab338f1e367d9b3323d" + sha256 cellar: :any_skip_relocation, arm64_linux: "33e103e653c5f859d61c6894c5e30634ceeb86fd6f2983061d237ad5d00d3fff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4bd3e43699f52a0b9efa651e983d63cfff9520461647886c2807ef4e13ccc7dc" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "freetype" + depends_on "numpy" + depends_on "pillow" + depends_on "python@3.13" + depends_on "qhull" + + on_linux do + depends_on "patchelf" => :build + end + + resource "contourpy" do + url "https://files.pythonhosted.org/packages/66/54/eb9bfc647b19f2009dd5c7f5ec51c4e6ca831725f1aea7a993034f483147/contourpy-1.3.2.tar.gz" + sha256 "b6945942715a034c671b7fc54f9588126b0b8bf23db2696e3ca8328f3ff0ab54" + 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/03/2d/a9a0b6e3a0cf6bd502e64fc16d894269011930cabfc89aee20d1635b1441/fonttools-4.57.0.tar.gz" + sha256 "727ece10e065be2f9dd239d15dd5d60a66e17eac11aea47d447f9f03fdbc42de" + end + + resource "kiwisolver" do + url "https://files.pythonhosted.org/packages/82/59/7c91426a8ac292e1cdd53a63b6d9439abd573c875c3f92c146767dd33faf/kiwisolver-1.4.8.tar.gz" + sha256 "23d5f023bdc8c7e54eb65f03ca5d5bb25b601eac4d7f1a042888a1f45237987e" + 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/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + 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.13") + 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..09f9bfc24f01d --- /dev/null +++ b/Formula/p/python-packaging.rb @@ -0,0 +1,34 @@ +# 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"] + + bottle do + sha256 cellar: :any_skip_relocation, all: "7c3767daa1d8923c2925f453921178557d2a43271dff5217e4503a928815aef9" + end + + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [: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..1fead9fb04676 --- /dev/null +++ b/Formula/p/python-setuptools.rb @@ -0,0 +1,45 @@ +class PythonSetuptools < Formula + desc "Easily download, build, install, upgrade, and uninstall Python packages" + homepage "https://setuptools.pypa.io/" + url "https://files.pythonhosted.org/packages/9e/8b/dc1773e8e5d07fd27c1632c45c1de856ac3dbf09c0147f782ca6d990cf15/setuptools-80.7.1.tar.gz" + sha256 "f6ffc5f0142b1bd8d0ca94ee91b30c0ca862ffd50826da1ea85258a06fd94552" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f5ece7706e412e5c7af0bfeefc088ebfc6f97cee5558caa58f6c7a6c88ad0a39" + end + + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.match?(/^python@\d\.\d+$/) } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + inreplace_paths = %w[ + _distutils/compilers/C/unix.py + _vendor/platformdirs/unix.py + ] + + pythons.each do |python| + system python, "-m", "pip", "install", *std_pip_args, "." + + # Ensure uniform bottles + setuptools_site_packages = prefix/Language::Python.site_packages(python)/"setuptools" + inreplace setuptools_site_packages/"_vendor/platformdirs/macos.py", "/opt/homebrew", HOMEBREW_PREFIX + + inreplace_files = inreplace_paths.map { |file| setuptools_site_packages/file } + inreplace_files += setuptools_site_packages.glob("_vendor/platformdirs-*dist-info/METADATA") + inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX + end + end + + test do + pythons.each do |python| + system 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..fe59cb05c9513 --- /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 4 + sha256 cellar: :any_skip_relocation, all: "cea38c8f00045852ff2e04f39f4e1e9f1b1a83a4f21f8f94bd2765b2ed75240e" + end + + depends_on "python@3.13" + + 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..7b5fca029c852 --- /dev/null +++ b/Formula/p/python-tk@3.10.rb @@ -0,0 +1,62 @@ +class PythonTkAT310 < Formula + desc "Python interface to Tcl/Tk" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.10.17/Python-3.10.17.tgz" + sha256 "8fcda0fbdc131859a4a4223abb925fd522a77e3fb3b52c46cea5f3bc2ae0cd9f" + license "Python-2.0" + + livecheck do + formula "python@3.10" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "4a01d642ccdc00918edf1d1d7b98ed2f16cfe51d33b7e71c32fec64563bb5879" + sha256 cellar: :any, arm64_sonoma: "620622c1b79a62e6b44917024469937e773f99ac7c4f6386de3a1036e27ef749" + sha256 cellar: :any, arm64_ventura: "c6bc2fa3384949b69cfc44a4e3b0db03717e3ff319b06145ff2ce631ad66a1d9" + sha256 cellar: :any, sonoma: "29de8774c5638894b20592447ca8812b0982c0eae4e2abaeda961223711f459f" + sha256 cellar: :any, ventura: "26c2e7c3e1f958bc89a3bedbc6011aa20d8bfff502d8a88b973ff7363baae17c" + sha256 cellar: :any_skip_relocation, arm64_linux: "d039a25172dfd16b51a49eb019a9710cf537255cf4f194d68b83e684ee067724" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a8c2852664e43e4ea79488192dbd32d22aae7f9304c77d59f366ef57bbf891a" + 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..e7f96698c3848 --- /dev/null +++ b/Formula/p/python-tk@3.11.rb @@ -0,0 +1,60 @@ +class PythonTkAT311 < Formula + desc "Python interface to Tcl/Tk" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.11.12/Python-3.11.12.tgz" + sha256 "379c9929a989a9d65a1f5d854e011f4872b142259f4fc0a8c4062d2815ed7fba" + license "Python-2.0" + + livecheck do + formula "python@3.11" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "672aecb6ab1193e4a2dbdfcb3720679b998f012a61bb8c13579881c064b53e65" + sha256 cellar: :any, arm64_sonoma: "1e80c600dc458c670be96f05e134fcdb0835a1bb0c711e689fdd0ebda486f2f5" + sha256 cellar: :any, arm64_ventura: "55632e676b562fa016c95d109ae0ed7347988a48f1281024f6cfd67df118d63e" + sha256 cellar: :any, sonoma: "c10a084ec54b28fbb8973128666616335ec7ca3b7a05ca7c5dba46759094cc8f" + sha256 cellar: :any, ventura: "e99d656fa71673fcdf75badbcab914ab9f156ea322a2ec1049301a1d56856aae" + sha256 cellar: :any_skip_relocation, arm64_linux: "3a8e65ca09eca6756e94281113bed781522698102dd42b61fc73f70285651c14" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a3388da80f4fee1b80eea795ed2e0f9af2c94b73d8fec91affc1a02e6262bb2" + 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..b10d9f857a4cb --- /dev/null +++ b/Formula/p/python-tk@3.12.rb @@ -0,0 +1,123 @@ +class PythonTkAT312 < Formula + desc "Python interface to Tcl/Tk" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.12.10/Python-3.12.10.tgz" + sha256 "15d9c623abfd2165fe816ea1fb385d6ed8cf3c664661ab357f1782e3036a6dac" + license "Python-2.0" + + livecheck do + formula "python@3.12" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "4f832d4f9d8159f5f43965a918ef8ba9ea84a42e4c165eb344d8b319e6585285" + sha256 cellar: :any, arm64_sonoma: "a2e2a63a3c42b4e8679b8ae5ec1c996d61eb101fed24a7b119222a856f5291f3" + sha256 cellar: :any, arm64_ventura: "2ebc6fd91d82f4b92983349a9727feba917f64838b64cc33f273676ef9af1809" + sha256 cellar: :any, sonoma: "c08bb26635a9e2e68a1b345dbe6db5c188e304d2acd496b6c9e7cfb89494d206" + sha256 cellar: :any, ventura: "df8622d18ffcddcf2cc83f44cab17b35e4dd3284154dff83882ff5ce1ed6da89" + sha256 arm64_linux: "1b0e9487ab705bd667c5938d99f73f6e5a4fb0cc9f8de20617eb0e54a5e0a17c" + sha256 x86_64_linux: "e2e34bffb1d1eb5b3c7c3e9cff5bdf41d8a991f18927674a5eafa03911626b93" + 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..18e15e6584375 --- /dev/null +++ b/Formula/p/python-tk@3.13.rb @@ -0,0 +1,123 @@ +class PythonTkAT313 < Formula + desc "Python interface to Tcl/Tk" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.13.3/Python-3.13.3.tgz" + sha256 "988d735a6d33568cbaff1384a65cb22a1fb18a9ecb73d43ef868000193ce23ed" + license "Python-2.0" + + livecheck do + formula "python@3.13" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "82c80aaceb7c8f25672f3a0730d253d6909999d8f4ae4adb58d6b89566f25239" + sha256 cellar: :any, arm64_sonoma: "2f40d41384a436d14268d32b882658ea843524e1324cc24a3b770eb501c2e330" + sha256 cellar: :any, arm64_ventura: "5c90e8539ed24a5def32acfe3475e82cde41632f276c3b001db386ca2b3127c5" + sha256 cellar: :any, sonoma: "8cc81ba5382e9def03ab1139eec5212392473de4ee89535c3ac7fd81c4462806" + sha256 cellar: :any, ventura: "4ec0dc85b2161fa24726e8ece4984eef382c03a9ea14c8848d0f2a7219efd905" + sha256 arm64_linux: "baf3ff28f59f02f4bfbb9ea703f47c9781d18b8721585775705954730f41dedd" + sha256 x86_64_linux: "5d7d7ce41a88c63bd571eaf2cb870247b39fe1f9aeb5b0557da90a04b741a344" + 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.9.rb b/Formula/p/python-tk@3.9.rb new file mode 100644 index 0000000000000..f6973f99d409e --- /dev/null +++ b/Formula/p/python-tk@3.9.rb @@ -0,0 +1,60 @@ +class PythonTkAT39 < Formula + desc "Python interface to Tcl/Tk" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.9.22/Python-3.9.22.tar.xz" + sha256 "8c136d199d3637a1fce98a16adc809c1d83c922d02d41f3614b34f8b6e7d38ec" + license "Python-2.0" + + livecheck do + formula "python@3.9" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "97ff0ebb45169ef1ff0c84f9a371a26366c1f7d5dcbdd44731d7aafef909dbdf" + sha256 cellar: :any, arm64_sonoma: "bee7e5c80ede81876ed8f19d5162558d1800860d9f4c921b05e70f715f086848" + sha256 cellar: :any, arm64_ventura: "8f0e72d74b73201b8e4308472f0e62cc472a2c857fc4530281d6f4cd1073b8be" + sha256 cellar: :any, sonoma: "2bd134ab988daff8d742f16f1d7812797d3768923329e09bad20a1ec869fe046" + sha256 cellar: :any, ventura: "6dde244305b1c4422d73cb4cfa89d074b17ad6fa66c2b47c1ea0a8b80c10c690" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8a69bf13e7d5218ce7454239a7a4841dc2f49ed9ecafa528e1a22b29145da55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c022b1b83102ca8f5d347c378d210034f881fcdd8de06d9dee2204c3fbec851b" + end + + 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..ce4348fdc8dcd --- /dev/null +++ b/Formula/p/python-yq.rb @@ -0,0 +1,69 @@ +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 1 + sha256 cellar: :any, arm64_sequoia: "fc51885dc4afeb945b9da323e5ab75751a5b861f20c0523a79360343cf4f57db" + sha256 cellar: :any, arm64_sonoma: "8b33d265380df20b66a575e0b84592c86ba02422298dfb9a095fd46c407f913a" + sha256 cellar: :any, arm64_ventura: "b7cfa07975355ba6d17eb32c40d7fc6ca2814de0ce84707e242bbf0050758902" + sha256 cellar: :any, sonoma: "148ae1e845bfbbc487ae9b2d152eaff0aca6650233a5c613fe06b1fddcf7ccf8" + sha256 cellar: :any, ventura: "509f944e20ed31d27571ae35409f52a3af4d2856295882edc4435bc2cd0243a2" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5fd740b29833a5d142cb96772a21c8c4ee77384de3c3f781e1acc1e03b72727" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30bfa94a1f5bc51fffcfebb345afc1e4de7997833264112ce802774131b14278" + end + + depends_on "jq" + depends_on "libyaml" + depends_on "python@3.13" + + 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/7f/03/581b1c29d88fffaa08abbced2e628c34dd92d32f1adaed7e42fc416938b0/argcomplete-3.5.2.tar.gz" + sha256 "23146ed7ac4403b70bd6026402468942ceba34a6732255b9edf5b7354f68a6bb" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + resource "xmltodict" do + url "https://files.pythonhosted.org/packages/98/f7/d29b8cdc9d8d075673be0f800013c1161e2fd4234546a140855a1bcc9eb4/xmltodict-0.14.1.tar.gz" + sha256 "338c8431e4fc554517651972d62f06958718f6262b04316917008e8fd677a6b0" + 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..17d71ee223ffe --- /dev/null +++ b/Formula/p/python@3.10.rb @@ -0,0 +1,505 @@ +class PythonAT310 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.10.17/Python-3.10.17.tgz" + sha256 "8fcda0fbdc131859a4a4223abb925fd522a77e3fb3b52c46cea5f3bc2ae0cd9f" + license "Python-2.0" + + livecheck do + url "https://www.python.org/ftp/python/" + regex(%r{href=.*?v?(3\.10(?:\.\d+)*)/?["' >]}i) + end + + bottle do + sha256 arm64_sequoia: "7fb330605dcc89c705fa2e8be8658d0781c1637d689c90794181a9a1b61dabaf" + sha256 arm64_sonoma: "d3e5b9b1c2a08706db3f4f8e463fcb20975c40065c06acc64ea9c8889b222311" + sha256 arm64_ventura: "4e99ca3f568db7794c0a832e0665778fed10de2fd261fb07db58818a76a6404c" + sha256 sonoma: "59c3c20b8a8a3ebffa4331110188a9c035c05d8b02041a1b9372ce33340a287d" + sha256 ventura: "8b3dd9649ae7a3090b4418b6c4917bf1327d7305f0220ce89819b4f11331c68e" + sha256 arm64_linux: "bae6fadea117aa83105dd70455668cb1d6641d3efe2f5da920adc4166a4ac490" + sha256 x86_64_linux: "720a4e20092809889deb6a74e7e3a1b24591ec536f8bd284a45ba3c01667e0ef" + 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", since: :catalina + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + on_linux do + depends_on "libnsl" + end + + # 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/70/53/b309b4a497b09655cb7e07088966881a57d082f48ac3cb54ea729fd2c6cf/pip-25.0.1.tar.gz" + sha256 "88f96547ea48b940a3a385494e181e29fb8637898f88d88737c5049780f196ea" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + 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/formula-patches/a1618a5005d0b01d63b720321806820a03432f1a/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/formula-patches/a1618a5005d0b01d63b720321806820a03432f1a/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", "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 + + tkinter is no longer included with this formula, but it 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..ca6c19332f97c --- /dev/null +++ b/Formula/p/python@3.11.rb @@ -0,0 +1,521 @@ +class PythonAT311 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.11.12/Python-3.11.12.tgz" + sha256 "379c9929a989a9d65a1f5d854e011f4872b142259f4fc0a8c4062d2815ed7fba" + license "Python-2.0" + + livecheck do + url "https://www.python.org/ftp/python/" + regex(%r{href=.*?v?(3\.11(?:\.\d+)*)/?["' >]}i) + end + + bottle do + sha256 arm64_sequoia: "ef44fa3fc4d611b9d18af77e61fec677986cafc96a92ff733ad971178b1afbc2" + sha256 arm64_sonoma: "550e45bd4e9165d1c64fc4a5a22535531a2eee5ed3f7e97f5067ccf6e54d65a7" + sha256 arm64_ventura: "2f9cea9a1ca7f8ff71b8b9523e1e549d14a76f3b3ab98d09ffd72f30b64f30db" + sha256 sonoma: "217057320ac5e61a97785f2a95bbad88b03ecd6657c0b5508f6ecb940b4562aa" + sha256 ventura: "dc632d4dce345d6a8f99802b9868053750767d2208a7efa2f4d53523551b7788" + sha256 arm64_linux: "0fdd8f0e8ba35f2ebb8a5bda280ca35efbec46d1b5019f2b581361f080986c65" + sha256 x86_64_linux: "7f691672863098565c7b044237a870c7f536b7e0f009839b525195889927ff0d" + 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", since: :catalina + 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" + end + + # 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/70/53/b309b4a497b09655cb7e07088966881a57d082f48ac3cb54ea729fd2c6cf/pip-25.0.1.tar.gz" + sha256 "88f96547ea48b940a3a385494e181e29fb8637898f88d88737c5049780f196ea" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + 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/formula-patches/6d2fba8de3159182025237d373a6f4f78b8bd203/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/formula-patches/a1618a5005d0b01d63b720321806820a03432f1a/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", "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 + + tkinter is no longer included with this formula, but it 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..8af0d9cbce503 --- /dev/null +++ b/Formula/p/python@3.12.rb @@ -0,0 +1,515 @@ +class PythonAT312 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.12.10/Python-3.12.10.tgz" + sha256 "15d9c623abfd2165fe816ea1fb385d6ed8cf3c664661ab357f1782e3036a6dac" + 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_sequoia: "98e11945b3a54fc3808078abe98db7388a72e9c5e5bea0d0babff53727fd93b3" + sha256 arm64_sonoma: "f522d321b5526f70e4a29729d269188054dd129cab8b6930cf971c4aa99a3713" + sha256 arm64_ventura: "a3f1a47648149212f123735a5bc93db3cffd269153ade01ca52a11ea98b3b3b0" + sha256 sequoia: "9f9c763c5ec343a3ce3aed0dcd20da0ab37b043895ccbd878254c0ec07774933" + sha256 sonoma: "f0470476a2220c11246bb764cb53e3cbd0959366de38b589d0279da57785429a" + sha256 ventura: "b8903f75e06dad5672e072d05a893ffc5134b04a7fed0e24c8807033b1db4973" + sha256 arm64_linux: "51bc75443efba9d4409d6d534f2e2f325678e91f9e9febfcc8a1d07428efa86a" + sha256 x86_64_linux: "24515d4d18265bb5233decf37912ebc579e42c15e50bf385aaf1477fe20dc261" + 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", since: :catalina + 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*" + + # 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/70/53/b309b4a497b09655cb7e07088966881a57d082f48ac3cb54ea729fd2c6cf/pip-25.0.1.tar.gz" + sha256 "88f96547ea48b940a3a385494e181e29fb8637898f88d88737c5049780f196ea" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + 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/formula-patches/6d2fba8de3159182025237d373a6f4f78b8bd203/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" + 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? + 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 + + # 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) + 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.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 setuptools].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 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 + + # 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.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 + + 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 + + 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 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..f82ccec8d031c --- /dev/null +++ b/Formula/p/python@3.13.rb @@ -0,0 +1,494 @@ +class PythonAT313 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.13.3/Python-3.13.3.tgz" + sha256 "988d735a6d33568cbaff1384a65cb22a1fb18a9ecb73d43ef868000193ce23ed" + license "Python-2.0" + + livecheck do + url "https://www.python.org/ftp/python/" + regex(%r{href=.*?v?(3\.13(?:\.\d+)*)/?["' >]}i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "243ab8eec20fbc33c7d6760af6097842a400a9e67c07316cbc9b8de4c2762df7" + sha256 arm64_sonoma: "7db8454a41dc2260025320248f7509a993a6a5c2ae031ad7c0d680655556e032" + sha256 arm64_ventura: "ea46d6b11e664d1c703bffc6e4d5cda138b9272374eab1b9ef51dc79ab430893" + sha256 sequoia: "06226a6baaacbf231e768abbc089467adda132991735b8884f0fcc4ee570a2ee" + sha256 sonoma: "5a9d812e4c3d6c01dff3fba709c3b3ee3575be47fb869b54f236ff6e1dc9bee8" + sha256 ventura: "6d656bdabcedee8aff8a05c38cbf2b7be69c8adae884b4bd1624e81643d398db" + sha256 arm64_linux: "b9b2ce016403eba77b0d7280951986648d1c344f14fc0a325fb382e42e507b9a" + sha256 x86_64_linux: "fbca800b2b6c5b7ffbf00167ae9375990ab2a747ed038b0410bc3dee41816e50" + 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", since: :catalina + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "zlib" + + on_linux do + depends_on "berkeley-db@5" + end + + link_overwrite "bin/2to3" + 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.13/site-packages/pip*" + link_overwrite "lib/python3.13/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" + + # 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/70/53/b309b4a497b09655cb7e07088966881a57d082f48ac3cb54ea729fd2c6cf/pip-25.0.1.tar.gz" + sha256 "88f96547ea48b940a3a385494e181e29fb8637898f88d88737c5049780f196ea" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + 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/formula-patches/8b5bcbb262d1ea4e572bba55043bf7d2341a6821/python/3.13-sysconfig.diff" + sha256 "e1c2699cf3e39731a19207ed69400a67336cda7767aa08f6f46029f26b1d733b" + 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" + + # 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 + # 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 = 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'" + 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}" + 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 setuptools].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 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", + }.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" + mv bin/"wheel", bin/"wheel#{version.major_minor}" + bin.install_symlink "wheel#{version.major_minor}" => "wheel3" + + # Install unversioned symlinks in libexec/bin. + { + "pip" => "pip#{version.major_minor}", + "wheel" => "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 + + 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" + + # 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.8.rb b/Formula/p/python@3.8.rb new file mode 100644 index 0000000000000..8f4753be28bc6 --- /dev/null +++ b/Formula/p/python@3.8.rb @@ -0,0 +1,415 @@ +class PythonAT38 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.8.20/Python-3.8.20.tar.xz" + sha256 "6fb89a7124201c61125c0ab4cf7f6894df339a40c02833bfd28ab4d7691fafb4" + license "Python-2.0" + + bottle do + sha256 arm64_sequoia: "1fa19eccb400ea5724d9cd6077ef473ecb1d506b8f515034b3565222f0cd8cb6" + sha256 arm64_sonoma: "49082bc289bc3547b509f24e962cc8cbefad015345c0675631e42b3b23d2ecc7" + sha256 arm64_ventura: "d1b22ac3c7066fb48a1c5274f14bc5f0df724c25a309bd479b5880120c8e44a0" + sha256 arm64_monterey: "339f24fcd11f9c005d7f1818a88bcc79683938b2bc1ff95dc236eab157f112a2" + sha256 sonoma: "125c3d7416bee3f05086683dd74455604064ecda2808af868720e54c6b9e7e6a" + sha256 ventura: "6760f38435697b00dcb5dc9f5dfd6adfd57df3c63158e03ebf486e88afb2cdc8" + sha256 monterey: "15cd39037b6f0aa7e9776c32f984862606c47252d668ecbb0be3d924aa5d245a" + sha256 x86_64_linux: "35120e0281d3baffdb30ea545cc728b67f7bc3bd732e2e06dc26692f467b9d8c" + 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 + disable! date: "2024-10-14", 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 "tcl-tk" + depends_on "xz" + + uses_from_macos "bzip2" + uses_from_macos "libffi" + uses_from_macos "libxcrypt" + uses_from_macos "ncurses" + uses_from_macos "unzip" + uses_from_macos "xz" + uses_from_macos "zlib" + + on_linux do + depends_on "libnsl" + end + + # Always update to latest release + # 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/3e/2c/f0a538a2f91ce633a78daaeb34cbfb93a54bd2132a6de1f6cec028eee6ef/setuptools-74.1.2.tar.gz" + sha256 "95b40ed940a1c67eb70fc099094bd6e99c6ee7c23aa2306f4d2697ba7916f9c6" + end + + resource "wheel" do + url "https://files.pythonhosted.org/packages/b7/a0/95e9e962c5fd9da11c1e28aa4c0d8210ab277b1ada951d2aee336b505813/wheel-0.44.0.tar.gz" + sha256 "a29c3f2817e95ab89aa4660681ad547c0e9547f20e75b0562fe7723c9a2a9d49" + end + + # Link against libmpdec.so.3, update for mpdecimal.h symbol cleanup. + patch do + url "https://www.bytereef.org/contrib/decimal-3.8.diff" + sha256 "104083617f086375974908f619369cd64005d5ffc314038c31b8b49032280148" + 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 + + args = %W[ + --prefix=#{prefix} + --enable-ipv6 + --datarootdir=#{share} + --datadir=#{share} + --enable-loadable-sqlite-extensions + --without-ensurepip + --with-openssl=#{Formula["openssl@3"].opt_prefix} + --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 + + args << "--with-tcltk-includes=-I#{Formula["tcl-tk"].opt_include/"tcl-tk"}" + args << "--with-tcltk-libs=-L#{Formula["tcl-tk"].opt_lib} -ltcl8.6 -ltk8.6" + + # 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" + + # 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) + + %w[setuptools pip wheel].each do |r| + (libexec/r).install resource(r) + end + + # Remove wheel test data. + # It's for people editing wheel and contains binaries which fail `brew linkage`. + rm_r libexec/"wheel/tests" + + # 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 + + # Write our sitecustomize.py + rm_r(site_packages.glob("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_r(Dir["#{site_packages}/setuptools*"]) + rm_r(Dir["#{site_packages}/distribute*"]) + rm_r(Dir["#{site_packages}/pip[-_.][0-9]*", "#{site_packages}/pip"]) + + %w[setuptools pip wheel].each do |pkg| + (libexec/pkg).cd do + system 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_r(bin.glob("{easy_install,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], Formula["tcl-tk"].opt_include/"tcl-tk" + library_dirs = [HOMEBREW_PREFIX/"lib", Formula["openssl@3"].opt_lib, + Formula["sqlite"].opt_lib], Formula["tcl-tk"].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 + 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 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(f'Your PYTHONPATH points to a site-packages dir for Python 3.x ' + f'but you are running Python {sys.version_info[0]}.x!\\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 = '#{opt_bin}/python#{version.major_minor}' + 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 + + 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 if some other modules import. Then the linked libs are working. + system python3, "-c", "import _decimal" + system python3, "-c", "import _gdbm" + system python3, "-c", "import zlib" + system python3, "-c", "import tkinter; root = tkinter.Tk()" if OS.mac? + + system bin/"pip#{version.major_minor}", "list", "--format=columns" + + if OS.mac? + assert_match "#{opt_frameworks}/Python.framework/Versions/#{version.major_minor}", + shell_output("#{bin}/python#{version.major_minor}-config --prefix") + else + assert_match opt_prefix.to_s, + shell_output("#{bin}/python#{version.major_minor}-config --prefix") + assert_match opt_lib.to_s, + shell_output("#{bin}/python#{version.major_minor}-config --ldflags") + end + end +end diff --git a/Formula/p/python@3.9.rb b/Formula/p/python@3.9.rb new file mode 100644 index 0000000000000..75f837a944a73 --- /dev/null +++ b/Formula/p/python@3.9.rb @@ -0,0 +1,520 @@ +class PythonAT39 < Formula + desc "Interpreted, interactive, object-oriented programming language" + homepage "https://www.python.org/" + url "https://www.python.org/ftp/python/3.9.22/Python-3.9.22.tar.xz" + sha256 "8c136d199d3637a1fce98a16adc809c1d83c922d02d41f3614b34f8b6e7d38ec" + 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_sequoia: "87f9a866cba5103b6e2551f109781f413d6b69ef7d6bd0137222054dce965dc9" + sha256 arm64_sonoma: "cd7e1f45d0a0f898cca96e61411f3a32360e7cc28276f784be7876a98f064500" + sha256 arm64_ventura: "c13bd1128b70283d76c86b38fd2029fd7ee6c2dbdbc7ce7de98f59b217977001" + sha256 sonoma: "f9f06241188b3bc368b5533f3fa175b4deff12a882bdd2d58e1f6d7b72d93292" + sha256 ventura: "16e029a7744e63c97c9e3339ccd664203af5c449eab55a6c2ad6e6e6fdd93e53" + sha256 arm64_linux: "03a115cf797cfa15f8313e3ce113b45c9f99a4fdfe6ad98f4fe775c275a1747c" + sha256 x86_64_linux: "ac113081bcc9fa8d2e4967ba47444aea8df3c07e017e3ef89d5bc6cad8171d4d" + 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 + + 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", since: :catalina + 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 + + # 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/70/53/b309b4a497b09655cb7e07088966881a57d082f48ac3cb54ea729fd2c6cf/pip-25.0.1.tar.gz" + sha256 "88f96547ea48b940a3a385494e181e29fb8637898f88d88737c5049780f196ea" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + 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 + + tkinter is no longer included with this formula, but it 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..74c08dbf8c238 --- /dev/null +++ b/Formula/p/pythran.rb @@ -0,0 +1,103 @@ +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/34/2d/4ac363a2eecd68c372b058d1b95a5f262c70776e107619cdcb5a4b68e1a3/pythran-0.17.0.tar.gz" + sha256 "3b77d6d970a6cf5b448facc7d4f6229c3e73909ac27ea2480c843afdadbad0fb" + license "BSD-3-Clause" + head "https://github.com/serge-sans-paille/pythran.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7c5edb0e5ce4922aa85e330bc47602b8b452983804ae81ada51d7a73a9a40efd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7c5edb0e5ce4922aa85e330bc47602b8b452983804ae81ada51d7a73a9a40efd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7c5edb0e5ce4922aa85e330bc47602b8b452983804ae81ada51d7a73a9a40efd" + sha256 cellar: :any_skip_relocation, sonoma: "32a4cb2d097c7576508c61e7e1b031748da9da5de8f2562cb31c6326ca50b05e" + sha256 cellar: :any_skip_relocation, ventura: "32a4cb2d097c7576508c61e7e1b031748da9da5de8f2562cb31c6326ca50b05e" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc9a9b4a3ef9fb1af4e59ee8a63aa4bf9ac2c153efa479899f6ddbb78d00fb19" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ccebee6a9c4e0bfb70a5120c7e0becc2a2bdde2313f064552ff75fd1ff0ea23" + end + + depends_on "gcc" # for OpenMP + depends_on "numpy" + depends_on "openblas" + depends_on "python@3.13" + + 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/aa/60/5db2249526c9b453c5bb8b9f6965fcab0ddb7f40ad734420b3b421f7da44/setuptools-70.0.0.tar.gz" + sha256 "f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0" + 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.13") + 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..94fb0977edf4d --- /dev/null +++ b/Formula/p/pytorch.rb @@ -0,0 +1,169 @@ +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.5.1/pytorch-v2.5.1.tar.gz" + sha256 "740eb5fff95e33cfe699bad43be83523f569c7cc7f9c285c2a255416443dd266" + license "BSD-3-Clause" + revision 4 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "ec01ffac0aa0b57f68f549662c25d92a1dad3f2e339f7c3dc854170c17605971" + sha256 cellar: :any, arm64_sonoma: "5014d4b9765a0d095e999622a2d3dd11b86fe35cd3fdbd8326c650899ec9fba8" + sha256 cellar: :any, arm64_ventura: "c605e16c0afed8013bb521270d19b816709769962b2a086faa22dcd131a11e06" + sha256 cellar: :any, sonoma: "3385569ccb7ac7be5aabdbd7011b30f99c646ce1c78b6857c73cf5f63ee5f0de" + sha256 cellar: :any, ventura: "3e7459213ca3d58b131768f6fe0b89b1f0054fc39a9ca0d80a1ea5bd6bdc307d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba32d918d891c1ad8f8b76c128599dac25cba702616f32d21a0b66402b77c8bd" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "python@3.13" => [: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 + + resource "filelock" do + url "https://files.pythonhosted.org/packages/9d/db/3ef5bb276dae18d6ec2124224403d1d67bccdbefc17af4cc8f553e341ab1/filelock-3.16.1.tar.gz" + sha256 "c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435" + end + + resource "fsspec" do + url "https://files.pythonhosted.org/packages/62/7c/12b0943011daaaa9c35c2a2e22e5eb929ac90002f08f1259d69aedad84de/fsspec-2024.9.0.tar.gz" + sha256 "4b0afb90c2f21832df142f292649035d80b421f60a9e1c027802e5a0da2b04e8" + end + + resource "jinja2" do + url "https://files.pythonhosted.org/packages/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz" + sha256 "4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/36/2b/20ad9eecdda3f1b0dc63fb8f82d2ea99163dbca08bfa392594fc2ed81869/networkx-3.4.1.tar.gz" + sha256 "f9df45e85b78f5bd010993e897b4f1fdb242c11e015b101bd951e5c0e29982d8" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/07/37/b31be7e4b9f13b59cde9dcaeff112d401d49e0dc5b37ed4a9fc8fb12f409/setuptools-75.2.0.tar.gz" + sha256 "753bb6ebf1f465a1912e19ed1d41f403a79173a9acf66a42e7e6aec45c3c16ec" + end + + resource "sympy" do + url "https://files.pythonhosted.org/packages/ca/99/5a5b6f19ff9f083671ddf7b9632028436167cd3d33e11015754e41b249a4/sympy-1.13.1.tar.gz" + sha256 "9cebf7e04ff162015ce31c9c6c9144daa34a93bd082f54fd8f12deca4f47515f" + 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 + python3 = "python3.13" + + # Avoid building AVX512 code + inreplace "cmake/Modules/FindAVX.cmake", /^CHECK_SSE\(CXX "AVX512"/, "#\\0" + + ENV["ATEN_NO_TEST"] = "ON" + ENV["BLAS"] = "OpenBLAS" + ENV["BUILD_CUSTOM_PROTOBUF"] = "OFF" + ENV["BUILD_PYTHON"] = "ON" + ENV["BUILD_TEST"] = "OFF" + 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? + + # 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 + venv.pip_install_and_link(buildpath, build_isolation: false) + + # Expose C++ API + torch = venv.site_packages/"torch" + include.install_symlink (torch/"include").children + 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/pytouhou.rb b/Formula/p/pytouhou.rb new file mode 100644 index 0000000000000..e24d513fe7f20 --- /dev/null +++ b/Formula/p/pytouhou.rb @@ -0,0 +1,130 @@ +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" + license "GPL-3.0-only" + revision 9 + head "https://hg.linkmauve.fr/touhou", using: :hg + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "e83c5e161c69cc14081b875a18043a08fa60db38b9a6703d290c5f6d80da95aa" + sha256 cellar: :any, arm64_ventura: "5529fede19cacc4e69b69985db53991070de184c7a4d50adb7649264b9df7ef3" + sha256 cellar: :any, arm64_monterey: "b7da4dfc02540ed042b90827630e16026eeb6dbf0cc8e66657acf2e768a78776" + sha256 cellar: :any, arm64_big_sur: "a967c785a6916c4930e9dcbc3418eba15f26242ef1988a9fbdd272059bd45bd9" + sha256 cellar: :any, sonoma: "4844e4ee6302412c6814ace3d8429b82ea87adc30f6e0fe5970dcb757e532f57" + sha256 cellar: :any, ventura: "aaa8b69e4983370a51fd4799b5605e4d073610011170e8332eb674e5b4a6ccf2" + sha256 cellar: :any, monterey: "6a73d4bdbe1bf13e38d5a3a2ee5edbc6f41399894d28c5260d76ed7e02dbea8c" + sha256 cellar: :any, big_sur: "68865e9179adfb70ee4b113563e577f09ef0fe1bdbe1fe6f226931fe407e7fda" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb8bff86fc2cabba2ebc07150a44d8251dd66dc69168d0ad081c1c1ced81cda8" + end + + # Repo fails to `hg pull` with recent `mercurial` + # Repo is 502 erroring and bottles are currently broken + disable! date: "2024-10-11", because: :does_not_build + + depends_on "pkgconf" => :build + depends_on "cython" + depends_on "glfw" + depends_on "gtk+3" + depends_on "libepoxy" + depends_on "py3cairo" + depends_on "pygobject3" + depends_on "python@3.11" + depends_on "sdl2" + depends_on "sdl2_image" + depends_on "sdl2_mixer" + depends_on "sdl2_ttf" + + # Fix for parallel cythonize + # It just put setup call in `if __name__ == '__main__'` block + patch :p0, :DATA + + def install + python = "python3.11" + ENV.prepend_path "PYTHONPATH", Formula["cython"].opt_libexec/Language::Python.site_packages(python) + + # hg can't determine revision number (no .hg on the stage) + inreplace "setup.py", /(version)=.+,$/, "\\1='#{version}'," + + ENV.prepend_create_path "PYTHONPATH", libexec/Language::Python.site_packages(python) + system python, *Language::Python.setup_install_args(libexec, python) + + # Set default game path to pkgshare + inreplace libexec/"bin/pytouhou", /('path'): '\.'/, "\\1: '#{pkgshare}/game'" + + bin.install (libexec/"bin").children + 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 + +__END__ +--- setup.py 2019-10-21 08:55:06.000000000 +0100 ++++ setup.py 2019-10-21 08:56:15.000000000 +0100 +@@ -172,29 +172,29 @@ + if not os.path.exists(temp_data_dir): + os.symlink(os.path.join(current_dir, 'data'), temp_data_dir) + ++if __name__ == '__main__': ++ setup(name='PyTouhou', ++ version=check_output(['hg', 'heads', '.', '-T', '{rev}']).decode(), ++ author='Thibaut Girka', ++ author_email='thib@sitedethib.com', ++ url='http://pytouhou.linkmauve.fr/', ++ license='GPLv3', ++ py_modules=py_modules, ++ ext_modules=cythonize(ext_modules, nthreads=nthreads, annotate=debug, ++ language_level=3, ++ compiler_directives={'infer_types': True, ++ 'infer_types.verbose': debug, ++ 'profile': debug}, ++ compile_time_env={'MAX_TEXTURES': 128, ++ 'MAX_ELEMENTS': 640 * 4 * 3, ++ 'MAX_SOUNDS': 26, ++ 'USE_OPENGL': use_opengl}), ++ scripts=['scripts/pytouhou'] + (['scripts/anmviewer'] if anmviewer else []), ++ packages=['pytouhou'], ++ package_data={'pytouhou': ['data/menu.glade']}, ++ **extra) + +-setup(name='PyTouhou', +- version=check_output(['hg', 'heads', '.', '-T', '{rev}']).decode(), +- author='Thibaut Girka', +- author_email='thib@sitedethib.com', +- url='http://pytouhou.linkmauve.fr/', +- license='GPLv3', +- py_modules=py_modules, +- ext_modules=cythonize(ext_modules, nthreads=nthreads, annotate=debug, +- language_level=3, +- compiler_directives={'infer_types': True, +- 'infer_types.verbose': debug, +- 'profile': debug}, +- compile_time_env={'MAX_TEXTURES': 128, +- 'MAX_ELEMENTS': 640 * 4 * 3, +- 'MAX_SOUNDS': 26, +- 'USE_OPENGL': use_opengl}), +- scripts=['scripts/pytouhou'] + (['scripts/anmviewer'] if anmviewer else []), +- packages=['pytouhou'], +- package_data={'pytouhou': ['data/menu.glade']}, +- **extra) + +- +-# Remove the link afterwards +-if os.path.exists(temp_data_dir): +- os.unlink(temp_data_dir) ++ # Remove the link afterwards ++ if os.path.exists(temp_data_dir): ++ os.unlink(temp_data_dir) diff --git a/Formula/p/pyupgrade.rb b/Formula/p/pyupgrade.rb new file mode 100644 index 0000000000000..11c507db2a4ba --- /dev/null +++ b/Formula/p/pyupgrade.rb @@ -0,0 +1,34 @@ +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/35/3a/efa8e75cf84d53f1b3f0113387ab120ef460396a4068e41b6cf18a3d216d/pyupgrade-3.19.1.tar.gz" + sha256 "d10e8c5f54b8327211828769e98d95d95e4715de632a3414f1eef3f51357b9e2" + license "MIT" + head "https://github.com/asottile/pyupgrade.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "7a603075222ee69b22abf8d0cca0d665197f3bc0e330e4cf0990c7e18b41c0de" + end + + depends_on "python@3.13" + + resource "tokenize-rt" do + url "https://files.pythonhosted.org/packages/6b/0a/5854d8ced8c1e00193d1353d13db82d7f813f99bd5dcb776ce3e2a4c0d19/tokenize_rt-6.1.0.tar.gz" + sha256 "e8ee836616c0877ab7c7b54776d2fefcc3bde714449a206762425ae114b53c86" + 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..9b42ae3c55b41 --- /dev/null +++ b/Formula/p/pyvim.rb @@ -0,0 +1,66 @@ +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 4 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "704fda45ac7e30a081b5490c20420d172244219adbe364367f10bc0a2d550465" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "704fda45ac7e30a081b5490c20420d172244219adbe364367f10bc0a2d550465" + sha256 cellar: :any_skip_relocation, arm64_ventura: "704fda45ac7e30a081b5490c20420d172244219adbe364367f10bc0a2d550465" + sha256 cellar: :any_skip_relocation, sonoma: "747334faeda98a61b4d7c24ff0ff889327485c5bb537752219434fab188c71fd" + sha256 cellar: :any_skip_relocation, ventura: "747334faeda98a61b4d7c24ff0ff889327485c5bb537752219434fab188c71fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "04d636c06d1064f60fc65972601654289156bbfbaeb63f085d39c67ef4c1097a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "704fda45ac7e30a081b5490c20420d172244219adbe364367f10bc0a2d550465" + end + + depends_on "python@3.13" + + 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/2d/4f/feb5e137aff82f7c7f3248267b97451da3644f6cdc218edfe549fb354127/prompt_toolkit-3.0.48.tar.gz" + sha256 "d6623ab0477a80df74e646bdbc93621143f5caf104206aa29294d53de1a03d90" + end + + resource "pyflakes" do + url "https://files.pythonhosted.org/packages/57/f9/669d8c9c86613c9d568757c7f5824bd3197d7b1c6c27553bc5618a27cce2/pyflakes-3.2.0.tar.gz" + sha256 "1c61603ff154621fb2a9172037d84dca3500def8c8b630657d1701f026f8af3f" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..6ab807dde677e --- /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 7 + sha256 cellar: :any_skip_relocation, all: "eecfe7a731f32a7dfb75fb042843e4042df47df756abcabeb8fa9b5216cc3584" + end + + depends_on "python@3.13" + + 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/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + 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/p/pyyaml.rb b/Formula/p/pyyaml.rb new file mode 100644 index 0000000000000..6a96bb6562cb4 --- /dev/null +++ b/Formula/p/pyyaml.rb @@ -0,0 +1,64 @@ +class Pyyaml < Formula + desc "YAML framework for Python" + homepage "https://pyyaml.org/" + url "https://files.pythonhosted.org/packages/cd/e5/af35f7ea75cf72f2cd079c95ee16797de7cd71f29ea7c68ae5ce7be1eda0/PyYAML-6.0.1.tar.gz" + sha256 "bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "87a238bf1e44a97f54755f0e95ba11860884b186678d3ce163db3034b7b2d7cc" + sha256 cellar: :any, arm64_sonoma: "b538bcab64b4ab3f6351c219cff42e2d163201efcaa272e4ee7e58783ffb3ce6" + sha256 cellar: :any, arm64_ventura: "eb0cb94ff9dc6ac7926c1ee71ccdc42dc844ad3ab949b9105456cf131c25027d" + sha256 cellar: :any, arm64_monterey: "d87fbc05ae74fc9f2c882c5047f6f9587bd782165776a2132ab26fd3fa11dab7" + sha256 cellar: :any, sonoma: "1ac9a131912b8c3d48e751d7d39c17c1c8d3d84d81353ab82d66fa5fb6d31772" + sha256 cellar: :any, ventura: "dc66728628c4bb38e894111a480f8ac86369ac73d87b148874878f8c565bb0c5" + sha256 cellar: :any, monterey: "e01aba3d0afab94578fc5f708ee01adf0549572005aa82c2c292679663c23995" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d53f5c35de430f055c83fdbb1e857b3423cbea9c66523f929cb525876ef55fae" + end + + disable! date: "2024-10-06", because: "does not meet homebrew/core's requirements for Python library formulae" + + depends_on "python@3.11" => [:build, :test] + depends_on "python@3.12" => [:build, :test] + depends_on "libyaml" + + def pythons + deps.select { |dep| dep.name.start_with?("python@") } + .map(&:to_formula) + .sort_by(&:version) + end + + def install + pythons.each do |python| + python3 = python.opt_libexec/"bin/python" + system python3, "-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 `yaml` module for Python #{python_versions}. + If you need `yaml` for a different version of Python, use pip. + + Additional details on upcoming formula removal are available at: + * https://github.com/Homebrew/homebrew-core/issues/157500 + * https://docs.brew.sh/Python-for-Formula-Authors#libraries + * https://docs.brew.sh/Homebrew-and-Python#pep-668-python312-and-virtual-environments + EOS + end + + test do + pythons.each do |python| + system python.opt_libexec/"bin/python", "-c", <<~PYTHON + import yaml + assert yaml.__with_libyaml__ + assert yaml.dump({"foo": "bar"}) == "foo: bar\\n" + PYTHON + end + end +end diff --git a/Formula/p0f.rb b/Formula/p0f.rb deleted file mode 100644 index 8ca85b5ed521b..0000000000000 --- a/Formula/p0f.rb +++ /dev/null @@ -1,26 +0,0 @@ -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" - - bottle do - rebuild 1 - sha256 "6b3829d6561d30d480ad2dd550dce91f7b38f7ab98c73b921803b75728fd784c" => :catalina - 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 8854d2e646491..0000000000000 --- a/Formula/p11-kit.rb +++ /dev/null @@ -1,49 +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.20/p11-kit-0.23.20.tar.xz" - sha256 "14d86024c3dfd6b967d9bc0b4ec7b2973014fe7423481f4d230a1a63b8aa6104" - revision 1 - - bottle do - sha256 "f9d23713a5fbd8e1eea89bcc9ab8da6792e1f7e66553da0e307ae8437a7fd950" => :catalina - sha256 "72d092bf908d2623a9be13c716fd8ca04734382bd42b3ab5dd8bf2b1ab2dc00b" => :mojave - sha256 "bf2e9dc6ae194c9d39d079bbd7714f4dda32b2800e37c67a2a86409aa69771bd" => :high_sierra - 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", "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 9629e38de0efd..0000000000000 --- a/Formula/p7zip.rb +++ /dev/null @@ -1,44 +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 2 - - bottle do - cellar :any_skip_relocation - sha256 "b9f5fb1321ce5738d0129b3c48f51fc36a947bd84450f95ce9caa90e767fbd1b" => :catalina - sha256 "0de20c4bd05dc5652ca5f188895bf74e52eb701aaed502a0d1271eb58236f898" => :mojave - sha256 "5951a42bd864da7dba5ef5781a2efba206daba8b6f75c60c0cfd910dae218482" => :high_sierra - sha256 "73fe6276e906f67cd28adc0f5a22c914d57fd3cfdd54134ad64e5330f710235a" => :sierra - end - - patch do - url "https://deb.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 - - patch :p4 do - url "https://github.com/aonez/Keka/files/2940620/15-Enhanced-encryption-strength.patch.zip" - sha256 "838dd2175c3112dc34193e99b8414d1dc1b2b20b861bdde0df2b32dbf59d1ce4" - 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 c54bd1bd8cc28..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.3.tar.gz" - sha256 "4dcf0bad070b09267b9c7b77bf5f9ff525c57915a17e9ee63e1ee53413a635ff" - - bottle do - cellar :any_skip_relocation - sha256 "88560339524e9f110cb58ddd3e8744cc44d6e24f86c0b9ca05ef01a059c55be2" => :catalina - sha256 "88560339524e9f110cb58ddd3e8744cc44d6e24f86c0b9ca05ef01a059c55be2" => :mojave - sha256 "88560339524e9f110cb58ddd3e8744cc44d6e24f86c0b9ca05ef01a059c55be2" => :high_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 d99942b71dafc..0000000000000 --- a/Formula/pachi.rb +++ /dev/null @@ -1,60 +0,0 @@ -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/pachi-12.50.tar.gz" - sha256 "62c8d44bd4610fe9534a1f21bb092da209c9fb8dcb8d39558d79adabe31e740a" - license "GPL-2.0" - head "https://github.com/pasky/pachi.git" - - bottle do - cellar :any_skip_relocation - sha256 "e1cac19564a176a50d27f08b4e395a53ff4144dc17fd93dcaa013adfc8cca83a" => :catalina - sha256 "76edc1b521dfb93e8c6573b689c8bc5a01103888f2f7310fd46aa53d8b6ea0dc" => :mojave - sha256 "476509041b907edfd0380bc91a3fd4fc41b359bae58524ab4ab8017df4f61fe0" => :high_sierra - end - - 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" - - # Work around Xcode 11 clang bug - if DevelopmentTools.clang_build_version >= 1010 - inreplace "Makefile", "CFLAGS :=", "CFLAGS := -fno-stack-check" - end - - # https://github.com/pasky/pachi/issues/78 - inreplace "Makefile", "build.h: .git/HEAD .git/index", "build.h:" - inreplace "Makefile", "DCNN=1", "DCNN=0" - - 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 dc71484bdd3ff..0000000000000 --- a/Formula/packer-completion.rb +++ /dev/null @@ -1,19 +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.4.3.tar.gz" - sha256 "af7b3b49b29ffdb05b519dad2d83066f3d166dd8e29abd406ca0f3d480901df4" - license "MIT" - 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 4e59610347fa6..0000000000000 --- a/Formula/packer.rb +++ /dev/null @@ -1,48 +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.6.0", - :revision => "b05ca9e9e1989e832e02b5f676917a5b9c683606" - license "MPL-2.0" - head "https://github.com/hashicorp/packer.git" - - bottle do - cellar :any_skip_relocation - sha256 "84918bf57b75d3127afc1aefddeb90eafa5b9f9669cbb87e823a94822ec12aa9" => :catalina - sha256 "a6bea8c5bbe38a62d40e530b86d46ab747463affe288963adadd9334bf07c810" => :mojave - sha256 "653dcd30c77a8989039754053efbee6fe901db91866e675b8f0ff8e0d046195e" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args - zsh_completion.install "contrib/zsh-completion/_packer" - prefix.install_metafiles - 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 6f53069b01fd5..0000000000000 --- a/Formula/packetbeat.rb +++ /dev/null @@ -1,93 +0,0 @@ -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 => "v7.8.0", - :revision => "f79387d32717d79f689d94fda1ec80b2cf285d30" - head "https://github.com/elastic/beats.git" - - bottle do - cellar :any_skip_relocation - sha256 "ff43fefdb4651acf59bfcdbe49e0099a2b59f040fcc946747370808c208aceb4" => :catalina - sha256 "2f121a452bdae8308fc9ca93f42c06906c726437931a8ae52eb5a6df4a953a71" => :mojave - sha256 "d03f78cc6f07f38bc9ae4f0ce11892234570f01042fb0bb9b44babd1d368ea3f" => :high_sierra - end - - depends_on "go" => :build - depends_on "python@3.8" => :build - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz" - sha256 "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54" - end - - def install - # remove non open source files - rm_rf "x-pack" - - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/elastic/beats").install buildpath.children - - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python#{xy}/site-packages" - - resource("virtualenv").stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(buildpath/"vendor") - end - - ENV.prepend_path "PATH", buildpath/"vendor/bin" # for virtualenv - ENV.prepend_path "PATH", buildpath/"bin" # for mage (build tool) - - cd "src/github.com/elastic/beats/packetbeat" do - system "make", "mage" - # prevent downloading binary wheels during python setup - system "make", "PIP_INSTALL_COMMANDS=--no-binary :all", "python-env" - system "mage", "-v", "build" - ENV.deparallelize - system "mage", "-v", "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 - assert_match "0: en0", shell_output("#{bin}/packetbeat devices") - assert_match version.to_s, shell_output("#{bin}/packetbeat version") - end -end diff --git a/Formula/packetq.rb b/Formula/packetq.rb deleted file mode 100644 index 2a6afaed04e65..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.2.tar.gz" - sha256 "696cfcae6d341b910b86673baa428ffa09d00dd42a70d2d3ac57db13c6977122" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "f9838e0f004b12ca2b43feb321d4a90c5e2778a22fabd9b9b528b783c0ef98b4" => :catalina - sha256 "bc56d9875b526794212e1267b17ea7ba24a639f1efaf804fe2f528f334e2854a" => :mojave - sha256 "6c085b37c22ef43c3dc4bff3c68c8fb2aa02acd5ba83e6767ac3574f00e278f8" => :high_sierra - 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 d730dd791a9d8..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/mcubeg/packmol/archive/20.010.tar.gz" - sha256 "23285f2a9e2bef0e8253250d7eae2d4026a9535ddcc2b9b383f5ad45b19e123d" - revision 1 - head "https://github.com/mcubeg/packmol.git" - - bottle do - sha256 "2de3ad79e6630d32fe68ac901ab113ba8ae3370e1976909390bcf4eb76a9a1d9" => :catalina - sha256 "2db13531577dfafcaa3d654a714e0c44503049b968ae3f6622baf3d53933afec" => :mojave - sha256 "ccdde7eab41ce8847bc3fcabdb482c68ea3f39c029abe0c146ec9ea370c97bfe" => :high_sierra - 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/packr.rb b/Formula/packr.rb deleted file mode 100644 index c661505c6b0c6..0000000000000 --- a/Formula/packr.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Packr < Formula - desc "Easy way to embed static files into Go binaries" - homepage "https://github.com/gobuffalo/packr" - url "https://github.com/gobuffalo/packr/archive/v2.8.0.tar.gz" - sha256 "2cab1e8d60734af05d594346f8e4bffcef0ac2aea4895b08bd9f3c40fc24c639" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "8561f6d5f99b51a6df9fb1df10f8f421daacf63a5548e043c0fbc970bf5f6dba" => :catalina - sha256 "ee4c60e7fc20bd3323fa89d0ef296162e05435cbab809b6365b75cfbde6c6ddb" => :mojave - sha256 "2317f06a9fe8d49069f0ed59eca5aac45d82caa5f45d88f7f3c1f60e679c8cd9" => :high_sierra - end - - depends_on "go" => [:build, :test] - - def install - system "go", "build", *std_go_args, "./packr" - end - - test do - mkdir_p testpath/"templates/admin" - - (testpath/"templates/admin/index.html").write <<~EOS - - - - Example - - - - - EOS - - (testpath/"main.go").write <<~EOS - package main - - import ( - "fmt" - "log" - - "github.com/gobuffalo/packr" - ) - - func main() { - box := packr.NewBox("./templates") - - s, err := box.FindString("admin/index.html") - if err != nil { - log.Fatal(err) - } - - fmt.Print(s) - } - EOS - - system "go", "mod", "init", "example" - system bin/"packr" - system "go", "build" - system bin/"packr", "clean" - - assert_equal File.read("templates/admin/index.html"), shell_output("./example") - end -end diff --git a/Formula/pacman4console.rb b/Formula/pacman4console.rb deleted file mode 100644 index 87c1b480c5354..0000000000000 --- a/Formula/pacman4console.rb +++ /dev/null @@ -1,22 +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" - license "GPL-2.0" - - bottle do - sha256 "6fdf8244cec5bb8ab55eefb1be9dc8f034c31ddbb3b39b21cd83f535e4e1a500" => :catalina - 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 419fd8ba95df1..0000000000000 --- a/Formula/pacparser.rb +++ /dev/null @@ -1,110 +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 "985bbf12ff200cd4f521eddbc17e084f1cb1fd8166853a52fd4b30228bdefd46" => :catalina - 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 f5b9caa593bd2..0000000000000 --- a/Formula/pacvim.rb +++ /dev/null @@ -1,23 +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" - license "LGPL-3.0" - head "https://github.com/jmoon018/PacVim.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "85bd0087ecc54716772881e46ce00553ee037eb2ea200d34d5db28709092369f" => :catalina - sha256 "e2ecd6cc1337adb4c9e760c50a83ae04a8cb86495d3c1ea167bfa5930d7a16a0" => :mojave - sha256 "b8ef8cdba34802db97fba770e013393973e908e11486b87a4f5189f139e468dc" => :high_sierra - end - - uses_from_macos "ncurses" - - 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 145eb7ef08bfa..0000000000000 --- a/Formula/pagmo.rb +++ /dev/null @@ -1,69 +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.15.0.tar.gz" - sha256 "07977be690b512ea11fc40d5b8bfa0a7a8507ce9053a615c2bc4725d355ef9a8" - - bottle do - cellar :any - sha256 "0f50a88dc4df4c8cabafceb3a96a9fb93d913db185257ca91830345dc7f5e13f" => :catalina - sha256 "acd5be5bb4b9fa2b93512c7a480dae7c1a84025330f866157bf0db9640f8948e" => :mojave - sha256 "4146ac95f0a01a6901c696cd54808b5834942e39bb10689b8ea6094be45d1582" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "eigen" - depends_on "nlopt" - depends_on "tbb" - - 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#{include}", "-L#{lib}", "-lpagmo", - "-std=c++11", "-o", "test" - system "./test" - end -end diff --git a/Formula/pakchois.rb b/Formula/pakchois.rb deleted file mode 100644 index 1b1d3081382c3..0000000000000 --- a/Formula/pakchois.rb +++ /dev/null @@ -1,20 +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 - cellar :any - rebuild 1 - sha256 "0312304691fe567185eb8fe854d6ca036f887c39ae4ca5652cc53bd0f837cb44" => :catalina - sha256 "5c6f1f39ca7bd268ba0df6f1f0f24a167aef86c77257fd6f8fccee7146b94c0d" => :mojave - sha256 "0ff5336b2165a755efeab1185edcde604ddc77f3cc359d5c41a07f3d5d8b9c0f" => :high_sierra - 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 dea4c7fd1f874..0000000000000 --- a/Formula/paket.rb +++ /dev/null @@ -1,47 +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.247.4/paket.exe" - sha256 "17f3b54647491dcc246f1fd2099813de211446afa67c9aba359ceccada2ee6d8" - license "MIT" - - 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 69bd68d0568b8..0000000000000 --- a/Formula/pam-u2f.rb +++ /dev/null @@ -1,47 +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.8.tar.gz" - sha256 "52a203a6fab6160e06c1369ff104afed62007ca3ffbb40c297352232fa975c99" - license "BSD-2-Clause" - revision 1 - head "https://github.com/Yubico/pam-u2f.git" - - bottle do - cellar :any - sha256 "879e5ac58f8b3dbf4eed7fb075cee4683fae3e9a121000539eb810146c87f0d6" => :catalina - sha256 "7967b151cd1ca9c32c61515c0921ec1bc265ae3a5f6a9681c342872974c139b7" => :mojave - sha256 "82c61c7cc3d348e81b3669e3d3c1832ac7b97e34840a46f28a213c9052ad1df5" => :high_sierra - 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 ff0b1a6c286be..0000000000000 --- a/Formula/pam_yubico.rb +++ /dev/null @@ -1,34 +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" - license "BSD-2-Clause" - revision 1 - - bottle do - cellar :any - sha256 "6e4eb4afca28e15098998d561b21ab65930ab57898fcf26ed0ba657263d2f130" => :catalina - sha256 "3679137d1149195219a4cc36154356f8d749b757d47ec7ab75850ae9eace84e8" => :mojave - sha256 "a321eb909c66465f67e0a25e9e38df33cc2d76c6e9ac9c834cb7ba17b247597f" => :high_sierra - 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 c3de9d7c7afdf..0000000000000 --- a/Formula/pandoc-citeproc.rb +++ /dev/null @@ -1,56 +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.17.0.1/pandoc-citeproc-0.17.0.1.tar.gz" - sha256 "f3e5ce3d1d21c27178f2fc69580750e3ce97fc5f962f2d01f7b6aa2e090c2342" - license "BSD-3-Clause" - head "https://github.com/jgm/pandoc-citeproc.git" - - bottle do - sha256 "8aa3dc134d660c43794acdd2b63523497448050ed89e42cac976be9968ebc991" => :catalina - sha256 "33d551134f7176547f6cb873ae0bee3d8c6a39a08a7b12dc1bc9c9ed7bb361a0" => :mojave - sha256 "4d1c933cba04f09fd3aea5fb71694f8b0cd990a9453539cb02cb000e3f40f2c2" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.8" => :build - depends_on "pandoc" - - uses_from_macos "unzip" => :build - - def install - install_cabal_package - 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 fc1b590391ecd..0000000000000 --- a/Formula/pandoc-crossref.rb +++ /dev/null @@ -1,38 +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.6.4/pandoc-crossref-0.3.6.4.tar.gz" - sha256 "668e6e51d5977f9c021a1443bce7410eddf2def0696323497d78ffe7a074cfcc" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e9355fce7f468cad1ecb3e3684b13baf330f3862243ed952b09da446d2620190" => :catalina - sha256 "a7fb56b64077f57aa9692758fc1270e65606e695caa85fbaa0ac1176e9cb9bbb" => :mojave - sha256 "4ff3f56bfe457eef132522a5a721d891fd2580fa47b583f58154592901ccc5bb" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.6" => :build - depends_on "pandoc" - - def install - install_cabal_package - 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-include-code.rb b/Formula/pandoc-include-code.rb deleted file mode 100644 index 885da4504c820..0000000000000 --- a/Formula/pandoc-include-code.rb +++ /dev/null @@ -1,36 +0,0 @@ -class PandocIncludeCode < Formula - desc "Pandoc filter for including code from source files" - homepage "https://github.com/owickstrom/pandoc-include-code" - url "https://hackage.haskell.org/package/pandoc-include-code-1.5.0.0/pandoc-include-code-1.5.0.0.tar.gz" - sha256 "5d01a95f8a28cd858144d503631be6bb2d015faf9284326ee3c82c8d8433501d" - - head "https://github.com/owickstrom/pandoc-include-code.git" - - bottle do - cellar :any_skip_relocation - sha256 "00437f205875a67ba6131e7e6643c0d947d5fe7bcbfa5cdd0c8640e863f827ac" => :catalina - sha256 "901fd1495a596e376ba96e744333726f80eeef0a0c97571c1ab871167822894d" => :mojave - sha256 "86aaeb61035401d0288d5352ee6613e688c3d22ff26f785e76ef5065cf13f993" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - depends_on "pandoc" - - def install - system "cabal", "v2-update" - system "cabal", "v2-install", *std_cabal_v2_args - end - - test do - (testpath/"hello.md").write <<~EOS - ```{include=test.rb} - ``` - EOS - (testpath/"test.rb").write <<~EOS - puts "Hello" - EOS - system Formula["pandoc"].bin/"pandoc", "-F", bin/"pandoc-include-code", "-o", "out.html", "hello.md" - assert_match "Hello", (testpath/"out.html").read - end -end diff --git a/Formula/pandoc.rb b/Formula/pandoc.rb deleted file mode 100644 index 4550e31a62e66..0000000000000 --- a/Formula/pandoc.rb +++ /dev/null @@ -1,45 +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.9.2.1/pandoc-2.9.2.1.tar.gz" - sha256 "c26d35372cf8b7d53062c9c495c0bca2ee370891c2349d3798a44f9ca33bdf57" - head "https://github.com/jgm/pandoc.git" - - bottle do - cellar :any_skip_relocation - sha256 "040eafbe1ebb8fe4c2b27425d7d3e566770c8c531eee7fdec2c96e01f4bf32a4" => :catalina - sha256 "61493929e5168952bc5bc64149bf67f8bec818313950aee764273b146b126442" => :mojave - sha256 "0fa6bfa3d880c8dcc41a469bd60ae74202094fb16bf6ca7ed48bf1cba11aea0b" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc" => :build - - uses_from_macos "unzip" => :build # for cabal install - uses_from_macos "zlib" - - def install - cabal_sandbox do - install_cabal_package :flags => ["embed_data_files"] - end - (bash_completion/"pandoc").write `#{bin}/pandoc --bash-completion` - man1.install "man/pandoc.1" - 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 85d018354efb6..0000000000000 --- a/Formula/pango.rb +++ /dev/null @@ -1,88 +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.44/pango-1.44.7.tar.xz" - sha256 "66a5b6cc13db73efed67b8e933584509f8ddb7b10a8a40c3850ca4a985ea1b1f" - - bottle do - sha256 "38a8cab63ed7ea37fc5448b74dae21b7f935d4f4ea9c08b658f3553f20ec8f28" => :catalina - sha256 "643284e68fcb4699572e7ab327a16ae3eb1c242527a96cb404cd98f14f22a893" => :mojave - sha256 "42552a9d26655f006f2361c9a1773d56bd5c5cabcd4f6ad5861fec29bd27c2cc" => :high_sierra - end - - head do - url "https://gitlab.gnome.org/GNOME/pango.git" - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "fontconfig" - depends_on "fribidi" - depends_on "glib" - depends_on "harfbuzz" - - def install - mkdir "build" do - system "meson", *std_meson_args, - "-Ddefault_library=both", - "-Dintrospection=true", - "-Duse_fontconfig=true", - ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - 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"] - harfbuzz = Formula["harfbuzz"] - 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#{harfbuzz.opt_include}/harfbuzz - -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 e3241339a6333..0000000000000 --- a/Formula/pangomm.rb +++ /dev/null @@ -1,87 +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.1.tar.xz" - sha256 "14bf04939930870d5cfa96860ed953ad2ce07c3fd8713add4a1bfe585589f40f" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "52e1c201a3967f61e5b3867c172f98cc44f169e60b03af47e00e487a67a53690" => :catalina - sha256 "45d67e560dffb346b957011717b33873b53fca560da86648d4f90a40a8b6df98" => :mojave - sha256 "a2097268ad9f93093aa809ba243edbe515b00e6e378c1c6b4dac01b32c24fb20" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "cairomm" - depends_on "glibmm" - depends_on "pango" - - 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++@2"] - 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 a92c8f912ee35..0000000000000 --- a/Formula/paperkey.rb +++ /dev/null @@ -1,34 +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.6.tar.gz" - sha256 "a245fd13271a8d2afa03dde979af3a29eb3d4ebb1fbcad4a9b52cf67a27d05f7" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "12be9f841cfb0d4069be3e461cd5e783ba4ea11195507a13763f90ccc026f31e" => :catalina - sha256 "894ef3339013be6574f736e316c61cbf54fbc3dcac358df14f1d54b1d7387854" => :mojave - sha256 "82e49c6aa559a349ce73521a90881acb74a540de03d355ad7461c177d00bb8e8" => :high_sierra - sha256 "fecd3e866173f93ddd6d89e91f2850d29c10e8edf27bb969a95de581ec382c56" => :sierra - 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 2ea80c68d5cb3..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/v0.7.1.tar.gz" - sha256 "b8cbd16f8dd5832ecfa9907d31411b35a7f12d81a5ec472a1555d00a8a205e0e" - - bottle do - cellar :any - sha256 "4f19499edc025464f4ce74b0755ede3c404c41d131156aebd7d24ef3ca1fe64f" => :catalina - sha256 "2852cb269611539d7d9fa227cca164318da3d1d3acec66b7a006ea958dc31d93" => :mojave - sha256 "bef1ee9210f3591f0768817f4f748e49ea708742f56ce47e744bc4a1507f3f36" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "intltool" => :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", "--encoding=UTF-8", "-o", "paps.ps" - assert_predicate testpath/"paps.ps", :exist? - assert_match "%!PS-Adobe-3.0", (testpath/"paps.ps").read - end -end diff --git a/Formula/par.rb b/Formula/par.rb deleted file mode 100644 index 0a002c4f7b0b0..0000000000000 --- a/Formula/par.rb +++ /dev/null @@ -1,26 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "457e5ff8ba94268a745fc954f84cbbaab7ac7d3a239ca602107a85a2e5d146a8" => :catalina - sha256 "ef5da7a3e359ba4c72ad4f11c2f1fb18adea19c6c51409d0fc7400ec60ef2422" => :mojave - sha256 "344dd1109a03e8c6017c2ca26a17c9f07c700c743b89b42786efce956bac70e1" => :high_sierra - end - - conflicts_with "rancid", :because => "both install `par` binaries" - - 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 5615343a6427f..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.1/par2cmdline-0.8.1.tar.bz2" - sha256 "5fcd712cae2b73002b0bf450c939b211b3d1037f9bb9c3ae52d6d24a0ba075e4" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "26609c45028599a4845f68cda2a5cd08c2a0dc37ae3987d4abf86aed99499f50" => :catalina - sha256 "cded10d8f18c5ab236ceb624854afb672681bd1a86f21e47d70de793db378580" => :mojave - sha256 "35477bcfecd91b7fe885739737f576b63545aab51ba997bc60f9a74927b775dc" => :high_sierra - 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 c1c9a02c71305..0000000000000 --- a/Formula/parallel.rb +++ /dev/null @@ -1,28 +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-20200622.tar.bz2" - mirror "https://ftpmirror.gnu.org/parallel/parallel-20200622.tar.bz2" - sha256 "ff8fafe192a76850e5640b98adb6428f8bdd85ef52c7c43787438c0ac3bc1d3f" - license "GPL-3.0" - head "https://git.savannah.gnu.org/git/parallel.git" - - bottle do - cellar :any_skip_relocation - sha256 "eff11ec3d9bf05b44b379c0993c5f3687f775b564864cd1557a1168a51ebad61" => :catalina - sha256 "eff11ec3d9bf05b44b379c0993c5f3687f775b564864cd1557a1168a51ebad61" => :mojave - sha256 "eff11ec3d9bf05b44b379c0993c5f3687f775b564864cd1557a1168a51ebad61" => :high_sierra - end - - conflicts_with "moreutils", :because => "both install a `parallel` executable" - - 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 34d9c99f38850..0000000000000 --- a/Formula/parallelstl.rb +++ /dev/null @@ -1,44 +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/20200330.tar.gz" - sha256 "47d78920a7220828cde9b0c0cf808c70774b2db05ab4dd689b8bbd350afb9e6e" - - bottle do - cellar :any_skip_relocation - sha256 "5b3837f32d57d6d5398da1127eb4bba489a85821ae32e125fc486edb3abbca11" => :catalina - sha256 "5b3837f32d57d6d5398da1127eb4bba489a85821ae32e125fc486edb3abbca11" => :mojave - sha256 "5b3837f32d57d6d5398da1127eb4bba489a85821ae32e125fc486edb3abbca11" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "tbb" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - prefix.install "stdlib" - 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#{prefix}/stdlib", "-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 e2f55695cbad8..0000000000000 --- a/Formula/pari.rb +++ /dev/null @@ -1,43 +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.4.tar.gz" - sha256 "bfc88fc4f7352f4840e6e352c72f0369cbea8a45403b1834a6269f3709970b1c" - license "GPL-2.0" - - bottle do - sha256 "34bff086dc53fc97511828c3329f71ab67c394011f88d551dc5d820fad455a93" => :catalina - sha256 "bb2a09ef34d5e55b7f357169c34cd8e5942bb074770b789757e21388d440d80d" => :mojave - sha256 "13613061281235cc2ffb502fd6541775a305ab61aa6ff85ed8ca15b23ec44ae4" => :high_sierra - end - - depends_on "gmp" - depends_on "readline" - - def install - readline = Formula["readline"].opt_prefix - gmp = Formula["gmp"].opt_prefix - system "./Configure", "--prefix=#{prefix}", - "--with-gmp=#{gmp}", - "--with-readline=#{readline}", - "--graphic=ps" - # make needs to be done in two steps - system "make", "all" - system "make", "install" - - # Avoid references to Homebrew shims - inreplace lib/"pari/pari.cfg", HOMEBREW_LIBRARY/"Homebrew/shims/mac/super/", "/usr/bin/" - end - - def caveats - <<~EOS - If you need the graphical plotting functions you need to install X11 with: - brew cask install 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" - end -end diff --git a/Formula/parquet-tools.rb b/Formula/parquet-tools.rb deleted file mode 100644 index 839af4961cd25..0000000000000 --- a/Formula/parquet-tools.rb +++ /dev/null @@ -1,32 +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" - license "Apache-2.0" - head "https://github.com/apache/parquet-mr.git" - - bottle do - cellar :any_skip_relocation - sha256 "663df850056a24973c7a164823fe859efdd8b1b84bc5b622f12f2922bcad5eb8" => :catalina - 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 f0e0999988944..0000000000000 --- a/Formula/parrot.rb +++ /dev/null @@ -1,65 +0,0 @@ -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" - - 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 "5ffc3252e0454d3d69689e8fa260011079d5684d568f5bb4a5d7d3f60368414f" => :catalina - 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 00c3a92adaac4..0000000000000 --- a/Formula/partio.rb +++ /dev/null @@ -1,30 +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.10.1.tar.gz" - sha256 "49f0d61bcca4ac3900dc68fdf11fa325cec6fab6cedde37c5a2ce365b1b46112" - - bottle do - cellar :any - sha256 "2f968d33da264dca45bec37b40d60bac33d47c158e2ba7ccf3c3589c0fdc5535" => :catalina - sha256 "7b6a89f27d152c1ad4593d9df79e79efa4757058b404802b41e68e5c85191eb9" => :mojave - sha256 "2a3dbcd7e576aa70904b21e5cee1b733720d2322b1f5ab8fb9064a31b7ed9531" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "doc" - system "make", "install" - end - 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/pass-git-helper.rb b/Formula/pass-git-helper.rb deleted file mode 100644 index b0e06bf8e5d18..0000000000000 --- a/Formula/pass-git-helper.rb +++ /dev/null @@ -1,59 +0,0 @@ -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/v1.1.0.tar.gz" - sha256 "85c9e2f1f544227da9129503d91ce5d502be127c83ad24cbc6dc8ba3ab746b8e" - license "LGPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "1f3954dd243690c880e3feb3a919e6c2778646ec90e56f0b1e285837c8441c20" => :catalina - sha256 "e08a67118a8d49dc0d3088dfd239b7f8869eebd1fcfd833aaa26bf799eb12fde" => :mojave - sha256 "1e05bbb2761624c80e9eb1c952f70a97ae6d214bc2e9cee9c17949e3eb099933" => :high_sierra - end - - depends_on "gnupg" => :test - depends_on "pass" - depends_on "python@3.8" - - resource "pyxdg" do - url "https://files.pythonhosted.org/packages/47/6e/311d5f22e2b76381719b5d0c6e9dc39cd33999adae67db71d7279a6d70f4/pyxdg-0.26.tar.gz" - sha256 "fe2928d3f532ed32b39c32a482b54136fe766d19936afc96c8f00645f9da1a06" - 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/pass-otp.rb b/Formula/pass-otp.rb deleted file mode 100644 index 60494e73e003f..0000000000000 --- a/Formula/pass-otp.rb +++ /dev/null @@ -1,50 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "515eb09606a7e6d384d81a2cb045189b0f1dbda605f4743cd06f9bdb665ff0db" => :catalina - sha256 "4fd5893adc28693cf5b532d0ad1d469d58842e355d676cb3371c4832ed1e7a0c" => :mojave - sha256 "4fd5893adc28693cf5b532d0ad1d469d58842e355d676cb3371c4832ed1e7a0c" => :high_sierra - sha256 "bd30d129efb90973ffa102df943b0b3f07c47f28cb70027bec07a75d66bfd145" => :sierra - 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", `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 a0e84eb9414d1..0000000000000 --- a/Formula/pass.rb +++ /dev/null @@ -1,52 +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.git" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "8130755986b8124ead30b7444bbab1f5b12b5481ddf914a310e221fdda736eb3" => :catalina - sha256 "8130755986b8124ead30b7444bbab1f5b12b5481ddf914a310e221fdda736eb3" => :mojave - sha256 "8130755986b8124ead30b7444bbab1f5b12b5481ddf914a310e221fdda736eb3" => :high_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 7704d389300ef..0000000000000 --- a/Formula/passenger.rb +++ /dev/null @@ -1,140 +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.5/passenger-6.0.5.tar.gz" - sha256 "94c25d5669c6cd1bc93854a020701c9869012eec621bce331bfe2d0c9c8c3532" - license "MIT" - revision 1 - head "https://github.com/phusion/passenger.git", :branch => "stable-6.0" - - bottle do - cellar :any - sha256 "1d784fa0b9f722a3409378bcd34fe63f3759e5640cd696da72b026b457a90b02" => :catalina - sha256 "0da4deae2720ad05a1fc543dc687319806778897f913c724464a03d0f5d24591" => :mojave - sha256 "417250b329d2f44f6f8c3626d9f86f1d402f9b9643fca274d027270e5b561537" => :high_sierra - end - - # to build nginx module - depends_on "nginx" => [:build, :test] - depends_on "openssl@1.1" - depends_on "pcre" - - def install - if MacOS.version >= :mojave && 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@1.1"].opt_include}" - s.gsub! "-L/usr/local/opt/openssl/lib", "-L#{Formula["openssl@1.1"].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_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 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/*"] - - system "./bin/passenger-config", "compile-nginx-engine" - 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/passpie.rb b/Formula/passpie.rb deleted file mode 100644 index 770392a1970a3..0000000000000 --- a/Formula/passpie.rb +++ /dev/null @@ -1,58 +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" - license "MIT" - revision 1 - head "https://github.com/marcwebbie/passpie.git" - - bottle do - cellar :any - sha256 "29a24482b5c955a6d14b7a285d6937c04ab89a53f110c8343221d2ccef2cb508" => :catalina - sha256 "9f524fdab59188aab2b53fe7c3e5084ecdc27149dd742abffdfb13af074ba0ee" => :mojave - sha256 "acac2254266a3c741c15e28403482e67517d447dc4a4c0411934ec93ab902945" => :high_sierra - end - - depends_on "gnupg" - depends_on "libyaml" - depends_on "python@3.8" - - 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/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz" - sha256 "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf" - 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 - # PyYAML 3.11 cannot be compiled on Python 3.7+ - inreplace "setup.py", "PyYAML==3.11", "PyYAML==3.13" - - 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 83aa4b8cf4b21..0000000000000 --- a/Formula/passwdqc.rb +++ /dev/null @@ -1,34 +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.4.0.tar.gz" - sha256 "72689c31c34d48349a7c2aab2cf6cf95b8d22818758aba329d5e0ead9f95fc97" - - bottle do - cellar :any - sha256 "79af7b94b6b1cf7063931c89285dc47440c4b1a66b273c80900e5f0b839ee527" => :catalina - sha256 "41115da2512aa8ee6f62fdda8b822d26a63d6eeaf5496ca624adbe25b384cb55" => :mojave - sha256 "e7da5597bd23a730aa9b28fa3e3efa749952beaa7a480959cad4e7c6a238400d" => :high_sierra - 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 5e2764ae13e48..0000000000000 --- a/Formula/pastebinit.rb +++ /dev/null @@ -1,41 +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 2 - - bottle do - cellar :any_skip_relocation - sha256 "088a0565e08ea4beced3319aff9ebc0fa97101be72c9e54f34c603ee3c501c80" => :catalina - sha256 "088a0565e08ea4beced3319aff9ebc0fa97101be72c9e54f34c603ee3c501c80" => :mojave - sha256 "088a0565e08ea4beced3319aff9ebc0fa97101be72c9e54f34c603ee3c501c80" => :high_sierra - end - - depends_on "docbook2x" => :build - depends_on "python@3.8" - - # Remove for next release - patch do - url "https://github.com/lubuntu-team/pastebinit/commit/ab05aa431a6bf76b28586ad97c98069b8de5e46a.patch?full_index=1" - sha256 "1abd0ec274cf0952a371e6738fcd3ece67bb9a4dd52f997296cd107f035f5690" - end - - def install - inreplace "pastebinit" do |s| - s.gsub! "/usr/bin/python3", Formula["python@3.8"].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/pastel.rb b/Formula/pastel.rb deleted file mode 100644 index 570770502cbca..0000000000000 --- a/Formula/pastel.rb +++ /dev/null @@ -1,31 +0,0 @@ -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/v0.8.0.tar.gz" - sha256 "603dc63d6aa261f159178dffeb389471a845c1a5d62187a275a3d33a66fe9a69" - - bottle do - cellar :any_skip_relocation - sha256 "e2478748ed0561c76af8f68b4067f42cd365ad7735a9d44dda159e9bd35a1c1d" => :catalina - sha256 "3d9fcb9c4f2e70010681b88f0ceca5795773b849e7bc6f59689e90ad969a673c" => :mojave - sha256 "06f87da95e1d1b0f53fbcd9c9ff36e4c8a0d3ea85825ac7bc648b3ab445e61ee" => :high_sierra - 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" - 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/patchelf.rb b/Formula/patchelf.rb deleted file mode 100644 index d77d276a0bf32..0000000000000 --- a/Formula/patchelf.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Patchelf < Formula - desc "Modify dynamic ELF executables" - homepage "https://github.com/NixOS/patchelf" - url "https://github.com/NixOS/patchelf/archive/0.11.tar.gz" - sha256 "e9dc4dbed842e475176ef60531c2805ed37a71c34cc6dc5d1b9ad68d889aeb6b" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "91944c42c39963a6a4c39fa330062ed1d269b0a2be0b5010ae6bac61cff16e53" => :catalina - sha256 "8a5e731cb4724804c386ffd3218b47a4adb06a86003929d03d24ae8d388c7722" => :mojave - sha256 "7646ae37a16d2e63594a7ebefb482884f3e60fc7089acb72e0b2aea49659bdf0" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - resource "helloworld" do - url "http://timelessname.com/elfbin/helloworld.tar.gz" - sha256 "d8c1e93f13e0b7d8fc13ce75d5b089f4d4cec15dad91d08d94a166822d749459" - end - - def install - system "./bootstrap.sh" - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-silent-rules" - system "make", "install" - end - - test do - resource("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_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 c1d52cc5f1370..0000000000000 --- a/Formula/patchutils.rb +++ /dev/null @@ -1,40 +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://deb.debian.org/debian/pool/main/p/patchutils/patchutils_0.3.4.orig.tar.xz" - sha256 "cf55d4db83ead41188f5b6be16f60f6b76a87d5db1c42f5459d596e81dabe876" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "8bb5cb6b431a18e81e68fbe6e2657420ceb9a53cd71d0f88d82f5094cca32c04" => :catalina - 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 8b6babd4cfc18..0000000000000 --- a/Formula/path-extractor.rb +++ /dev/null @@ -1,36 +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 "f882b9d1c9ba8fdc8ba16d6bbad852034182636d9c968cfbacf8cc1e08009a7d" => :catalina - 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 d88cff4e7edde..0000000000000 --- a/Formula/payara.rb +++ /dev/null @@ -1,76 +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.192/payara-5.192.zip" - sha256 "272352a4d8a6fd19a0e3e02bde946fb9a860c1206fc6e39a41279a73f43b2995" - - 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 506c43a26c1fb..0000000000000 --- a/Formula/pazpar2.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Pazpar2 < Formula - desc "Metasearching middleware webservice" - homepage "https://www.indexdata.com/pazpar2" - url "http://ftp.indexdata.dk/pub/pazpar2/pazpar2-1.14.0.tar.gz" - sha256 "3b0012450c66d6932009ac0decb72436690cc939af33e2ad96c0fec85863d13d" - license "GPL-2.0" - revision 2 - - bottle do - cellar :any - sha256 "6341978a6229069f3078497aa242dfacfb265fdd54c22a8864a516906c83921d" => :catalina - sha256 "1921d7b34876024b8c0145df01e1c88a385c2851752fb30b2dc918f9ed8ee6d8" => :mojave - sha256 "bde0d429ddb8f2012ea87a66a0ea1928ef491d414eec5efe231dec219f4d4675" => :high_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 580b97f0c2f5a..0000000000000 --- a/Formula/pbc-sig.rb +++ /dev/null @@ -1,61 +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" - license "GPL-3.0" - - bottle do - cellar :any - rebuild 1 - sha256 "47773fefdfeb3f7381046934974bbaf7f41a641c3d3f3af5802d07a7ea340ba6" => :catalina - sha256 "134c203178bb93b406b4c5fb5aecf171db6473d558d0bf62cf9b1682b57448e9" => :mojave - sha256 "79c31a3f1bcc2429648a2258974ccb1185cfe244d4fcbbfa2840c7393e7e058a" => :high_sierra - 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#{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/pbc.rb b/Formula/pbc.rb deleted file mode 100644 index f2e64e1991531..0000000000000 --- a/Formula/pbc.rb +++ /dev/null @@ -1,61 +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" - license "LGPL-3.0" - head "https://repo.or.cz/pbc.git" - - bottle do - cellar :any - rebuild 1 - sha256 "83d464696ab79f463ec2dc930cbd9c3ecbdedde5c578e70a4994b2cd8fec1f6d" => :catalina - sha256 "85855bfe6dfe9a4fc0b0359f74aa7ea587283c1c724a6c4aee77972ecfc1d390" => :mojave - sha256 "adc712fd4cc68990b669922be5b8ab15e4d499176c09facb5b129c6d7c847262" => :high_sierra - 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", "-L#{Formula["gmp"].lib}", "-lgmp", "-L#{lib}", - "-lpbc", "-o", "test" - system "./test" - end -end diff --git a/Formula/pbzip2.rb b/Formula/pbzip2.rb deleted file mode 100644 index d048c5cc96f4a..0000000000000 --- a/Formula/pbzip2.rb +++ /dev/null @@ -1,28 +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 "57c1c1065cd29ee37187b87705adfb73b84d114fc46408d4690024f3a29ac837" => :catalina - 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 4f5747d381cd4..0000000000000 --- a/Formula/pc6001vx.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Pc6001vx < Formula - desc "PC-6001 emulator" - homepage "https://eighttails.seesaa.net/" - url "https://eighttails.up.seesaa.net/bin/PC6001VX_3.5.2_src.tar.gz" - sha256 "0e3052a6c9f8504943b46a92f950d1d706ed4e47b9cff312306eb82ad27b553c" - license "LGPL-2.1" - head "https://github.com/eighttails/PC6001VX.git" - - bottle do - cellar :any - sha256 "6710d77319faeafe8e4f3719a79827311065a3faa7f04bb30393209b6357b067" => :catalina - sha256 "c7276580bc2c742722fbe10c6a69ccddd9e68dd26682e42a560131962302fdf3" => :mojave - sha256 "f7b5e4e335a22a6962a6ff2f7844ed64672243307abe97fe6324afac2636788c" => :high_sierra - 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 bdd39f9d4fe7e..0000000000000 --- a/Formula/pcal.rb +++ /dev/null @@ -1,28 +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 "9d7f46d2cbf308cd81bcce8fb98e48d295917562a46e509e739cad51d90dcf2c" => :catalina - 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 974f441d52438..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://pcapplusplus.github.io/" - url "https://github.com/seladb/PcapPlusPlus/archive/v19.12.tar.gz" - sha256 "9bebe2972a6678b8fb80f93b92a3caf9babae346137f2171e6941f35b56f88bb" - license "Unlicense" - - bottle do - cellar :any_skip_relocation - sha256 "7b028a7ef2438fc52a831baaeaa5475282a4ac811b17464304d0a4b77d9f031b" => :catalina - sha256 "712589c7198116011221a502c0cb158bf5b901ae06cb6a51ba7e523fb413ba48" => :mojave - sha256 "23854dd42a6afc6abcc8056f3661309c394496292470fb15b76ab211f38b965b" => :high_sierra - 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++ -L#{lib} -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 39f8d913dc1fc..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.2.2/pcb-4.2.2.tar.gz" - sha256 "1ceeaf1bdbe0508b9b140ca421eb600836579114c04dee939341c5d594f36e5d" - license "GPL-2.0" - version_scheme 1 - - bottle do - sha256 "a1dca0926d6752943013906f21eb4f1d14156fcbb3dfc9906953df52ab7e7b51" => :catalina - sha256 "0f598ed594a62cf96451a20635e186967957db8a536c20398285d26d88505772" => :mojave - sha256 "95e752fd6939e81b4fe3a1b5e035a2240921e8ad9e507373735b5c81336978e1" => :high_sierra - 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 04e131339d667..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/archive/v2.1.0.tar.gz" - sha256 "ee546f0e002e83434862c7a5a2171a2276038d239909a09adb36e148e7d7319a" - license "GPL-3.0" - head "https://github.com/pcb2gcode/pcb2gcode.git" - - bottle do - cellar :any - sha256 "f061b44896db47c40e3ff5d58434aa701c7ba974b22a82f82b0206338181a200" => :catalina - sha256 "dae5016ae6634dda64d1ddc9ead1cd1dba55d8ef23f74dd2b9e848248bfdfee6" => :mojave - sha256 "bc556eccf6a7eb74ffaf14ce4396c5d311f8961cc035638692193009dda195f5" => :high_sierra - end - - # Release 2.0.0 doesn't include an autoreconfed tarball - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "gerbv" - depends_on "gtkmm" - depends_on "librsvg" - - # 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" - - # Fix build on Xcode 11.4 - patch do - url "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1" - sha256 "04a4df38ed9c5a4346fbb50ae4ccc948a1440328beac03cb3586c8e2e241be08" - directory "tools/build" - end - 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 - ] - - args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" if ENV.compiler == :clang - - system "./bootstrap.sh", *bootstrap_args - system "./b2", "headers" - system "./b2", *args - end - - system "autoreconf", "-fvi" - 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 - 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/pce.rb b/Formula/pce.rb deleted file mode 100644 index 9760a7be6655f..0000000000000 --- a/Formula/pce.rb +++ /dev/null @@ -1,38 +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 2 - head "git://git.hampa.ch/pce.git" - - bottle do - cellar :any - sha256 "de9b733199b55e9cf2cdd0d73643c3ea199d132320600adf81428d08ebfba8af" => :catalina - sha256 "8c0364c490a9b01875ab9c05c7bc5a6cba190e27d941c72bbbb3e17af71ab88a" => :mojave - sha256 "6c67f811c813423d7380894d6de77aeeeba20d9f18fd36a71653c23b97c433f6" => :high_sierra - sha256 "ae09a42321608dfa10291d2a2a1afed87a137c9612a54e513360022de8e908b3" => :sierra - end - - depends_on "nasm" => :build if MacOS.version >= :high_sierra - 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 a2ee29d8560aa..0000000000000 --- a/Formula/pcl.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Pcl < Formula - desc "Library for 2D/3D image and point cloud processing" - homepage "https://pointclouds.org/" - url "https://github.com/PointCloudLibrary/pcl/archive/pcl-1.9.1.tar.gz" - sha256 "0add34d53cd27f8c468a59b8e931a636ad3174b60581c0387abb98a9fc9cddb6" - revision 9 - head "https://github.com/PointCloudLibrary/pcl.git" - - bottle do - sha256 "f7a89d9b04578cbfcf21160d5ebd78fa6feeab3ded876678b7bfc23f989a8f2e" => :catalina - sha256 "593a588bbdce10f083057cb56a2c66abd632f066ab90f35c40facf6b152ee5b9" => :mojave - sha256 "d14889b636e81d1427a7d0300c028b571ac038e54b3760eba8900a7175d210c1" => :high_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" - - # Upstream patch for boost 1.70.0 - patch do - url "https://github.com/PointCloudLibrary/pcl/commit/648932bc.diff?full_index=1" - sha256 "23f2cced7786715c59b49a48e4037eb9dea9abee099c4c5c92d95a647636b5ec" - end - - 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 - ] - - args << if build.head? - "-DBUILD_apps_modeler=AUTO_OFF" - else - "-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 30b45416a90d7..0000000000000 --- a/Formula/pcre++.rb +++ /dev/null @@ -1,70 +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" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "61b2942fa6a519289532736eaaa9754f8d0020ffca215eb8ba18324ed1682ab0" => :catalina - 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 252afb8ae4041..0000000000000 --- a/Formula/pcre.rb +++ /dev/null @@ -1,51 +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.44.tar.bz2" - mirror "https://www.mirrorservice.org/sites/ftp.exim.org/pub/pcre/pcre-8.44.tar.bz2" - sha256 "19108658b23b3ec5058edc9f66ac545ea19f9537234be1ec62b714c84399366d" - - bottle do - cellar :any - sha256 "f8ac266e04f984fa55091a43f0fdc39a40d57c2489d289a186c88ccedaba7eeb" => :catalina - sha256 "ed9b483538da7bc6559d2e63dd36659736fab9510681661d970d707a18731de4" => :mojave - sha256 "aeea1351e1439847d00c3cee54bd28639493e686f809568cf42fea7bb28da2a5" => :high_sierra - 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 - ] - args << "--enable-jit" if MacOS.version >= :sierra && Hardware::CPU.arch == :x86_64 - - 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/pcre2.rb b/Formula/pcre2.rb deleted file mode 100644 index 9079d7dd44a1e..0000000000000 --- a/Formula/pcre2.rb +++ /dev/null @@ -1,37 +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.35.tar.bz2" - sha256 "9ccba8e02b0ce78046cdfb52e5c177f0f445e421059e43becca4359c669d4613" - head "svn://vcs.exim.org/pcre2/code/trunk" - - bottle do - cellar :any - sha256 "6a1e59a5db23d684f92d2bf695601d1b466f3e9d5407f704ba4679d885d13cef" => :catalina - sha256 "d7be9b0193654484e40bc30dd330711cc1e72fa9bf29f854dd50458f6a827d1b" => :mojave - sha256 "69c4fb400d19d1910df33376974b274362ed715ab7d67ee480b5211156174784" => :high_sierra - 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 - ] - args << "--enable-jit" if Hardware::CPU.arch == :x86_64 - - system "./configure", *args - 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 1a077f0f86945..0000000000000 --- a/Formula/pcsc-lite.rb +++ /dev/null @@ -1,32 +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.9.0.tar.bz2" - sha256 "0148d403137124552c5d0f10f8cdab2cbb8dfc7c6ce75e018faf667be34f2ef9" - - bottle do - cellar :any - sha256 "650bd1cb922417a5ef04f6667261e9b11393ebbd24750f6332ed067716a5e192" => :catalina - sha256 "fca41c0447251ec74156c0dd68e6b38b695d9f14d7176c329964c223cfb983e6" => :mojave - sha256 "4fc95dd4040b9ac313724c6db99937949dc18013c8a59839f806885e0d5e2e50" => :high_sierra - end - - keg_only :shadowed_by_macos, "macOS provides PCSC.framework" - - on_linux do - depends_on "pkg-config" => :build - end - - 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 0bfb84e42f39e..0000000000000 --- a/Formula/pdal.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Pdal < Formula - desc "Point data abstraction library" - homepage "https://www.pdal.io/" - url "https://github.com/PDAL/PDAL/releases/download/2.1.0/PDAL-2.1.0-src.tar.gz" - sha256 "c300de7935d52cb96e24bdaceea5d189b1840e88636e6deca1f6dad51f909571" - revision 2 - head "https://github.com/PDAL/PDAL.git" - - bottle do - sha256 "da0f5ab64298b3c1eb5d23589a1bc9eda8ae98c3ebd28458f1422d550fec2e71" => :catalina - sha256 "c770fc0555b3a070cea3fabca63e0ab5c2d8ccd011c3a70aab6af87b4b3f607e" => :mojave - sha256 "7b9f7e54194ab7f3615a243abde2f3bbb7de666a8babad77a2d42f40a7d44943" => :high_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" - rm_rf "test/unit" - 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 014f40d376b9a..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" - license "GPL-3.0" - revision 1 - head "https://github.com/firstlookmedia/pdf-redact-tools.git" - - bottle do - cellar :any_skip_relocation - sha256 "d36fd54bdf0fecba50c0d2e4c8ec7c4702bc626b7228f55482fa04527837e80a" => :catalina - sha256 "1d5dddb4adc486d89537a5368550c787b9dbae0c6cd9cddba9b2e45820b025e1" => :mojave - sha256 "1d5dddb4adc486d89537a5368550c787b9dbae0c6cd9cddba9b2e45820b025e1" => :high_sierra - end - - depends_on "exiftool" - depends_on "ghostscript" - depends_on "imagemagick" - depends_on :macos # Due to Python 2 (https://github.com/firstlookmedia/pdf-redact-tools/pull/34) - - 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 e812ba1c1d37c..0000000000000 --- a/Formula/pdf2htmlex.rb +++ /dev/null @@ -1,105 +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 24 - head "https://github.com/coolwanglu/pdf2htmlEX.git" - - bottle do - sha256 "76c5b16da33231ee6d269f95c5b9b3f0f06b9f5d5634e003d55e6ad5e123a387" => :catalina - sha256 "0cf6aa3cd87e96aab2fc58b618f8a9127edec88a624bd6cf2f5816fd575c0a50" => :mojave - sha256 "8a55a7cd0d373d223162ee92bc6f02c269b4f17fe987471ba3388ea257cf870f" => :high_sierra - 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 "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 - 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" - - system "./autogen.sh" - system "./configure", "--prefix=#{libexec}/fontforge", - "--without-libzmq", - "--without-x", - "--without-iconv", - "--without-libspiro", - "--without-libuninameslist", - "--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 9b63222fbe7c4..0000000000000 --- a/Formula/pdf2image.rb +++ /dev/null @@ -1,44 +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 "7a62006adfc88fc38c5333d94836127d4f51228291dfddc726f10a1cac1b6383" => :catalina - 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 "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)" - - # 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 b2ad59ddb3642..0000000000000 --- a/Formula/pdf2json.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Pdf2json < Formula - desc "PDF to JSON and XML converter" - homepage "https://github.com/flexpaper/pdf2json" - url "https://github.com/flexpaper/pdf2json/archive/0.71.tar.gz" - sha256 "54878473a2afb568caf2da11d6804cabe0abe505da77584a3f8f52bcd37d9c55" - - bottle do - cellar :any_skip_relocation - sha256 "035c69de85f1cad569ff743faef796a88b9f9a706be802bf111a83505858b366" => :catalina - sha256 "abf950838b700f50ff4279501533176cb5a1929fb0b88c8ccf94b07ac362c66d" => :mojave - sha256 "4bee4b8c61362c64d72a3f011f8c5ef223c5e80d269e442a18472adc42e108e9" => :high_sierra - 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 3ce9086907318..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 5 - - bottle do - cellar :any - sha256 "8350da4f06838454cf26788b9ea27cbd9255d567be906d4fde5dea332b035734" => :catalina - sha256 "3999f52a6638bd2090feabd62cf91112a6b98bf6577a112771941ec6781eabd8" => :mojave - sha256 "9477928316e8a5cb7edc7d03568a22a2f2fb87e1440a96e100c79695c1b5cde9" => :high_sierra - sha256 "ec7f985d7a62787268265f4e05c87d59926a7f242c22972e32418e7cfaa5448e" => :sierra - 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/pdfcpu.rb b/Formula/pdfcpu.rb deleted file mode 100644 index b197b4f08d225..0000000000000 --- a/Formula/pdfcpu.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Pdfcpu < Formula - desc "PDF processor written in Go" - homepage "https://pdfcpu.io/" - url "https://github.com/pdfcpu/pdfcpu/archive/v0.3.4.tar.gz" - sha256 "e4a088b008e29ef037665811abc027266fca1f5c5866d96d67c69de59ba87b15" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "6678b5940ae2cc31abc7d551390d8b3d36b40990ec66dfea9ddf4f495eb3af6b" => :catalina - sha256 "6678b5940ae2cc31abc7d551390d8b3d36b40990ec66dfea9ddf4f495eb3af6b" => :mojave - sha256 "6678b5940ae2cc31abc7d551390d8b3d36b40990ec66dfea9ddf4f495eb3af6b" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-trimpath", "-o", bin/"pdfcpu", "-ldflags", - "-X github.com/pdfcpu/pdfcpu/pkg/pdfcpu.VersionStr=#{version}", "./cmd/pdfcpu" - end - - test do - info_output = shell_output("#{bin}/pdfcpu info #{test_fixtures("test.pdf")}") - assert_match "PDF version: 1.6", info_output - assert_match "Page count: 1", info_output - assert_match "Page size: 500.00 x 800.00 points", info_output - assert_match "Encrypted: No", info_output - assert_match "Permissions: Full access", info_output - assert_match "validation ok", shell_output("#{bin}/pdfcpu validate #{test_fixtures("test.pdf")}") - end -end diff --git a/Formula/pdfcrack.rb b/Formula/pdfcrack.rb deleted file mode 100644 index 82e54c7e1ead4..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.19/pdfcrack-0.19.tar.gz" - sha256 "3115206998b7cddf13971dd4b50946c077fc96e220aca1c0734798d907a2c0ed" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "2c26ba3ca3a1edd9cc9e6570cb5d1c7838a152a3d8281a2a16c6be5276d47b23" => :catalina - sha256 "12310e0c5841db19ecf51f527cde0aaba1663a04aa78c760a5d6e02218dc4e3c" => :mojave - sha256 "9923fadda54414a1d0cd5e86b0796aec8bbaf7c80e96e7518b5ae136d50d5674" => :high_sierra - 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 f0e73167b9ad1..0000000000000 --- a/Formula/pdfgrep.rb +++ /dev/null @@ -1,41 +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.2.tar.gz" - sha256 "0ef3dca1d749323f08112ffe68e6f4eb7bc25f56f90a2e933db477261b082aba" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "575608fb99410f9271656ed1bf051456318cd7bece7ae654d122db930ddbd7b3" => :catalina - sha256 "4e6828ef5db24086dae00e10c9c18671352303c6e79a2148f62bd9104678ea08" => :mojave - sha256 "95ffadce5ed5baa82a48c71e1bb8915d080c9e9d4a14e63982945eb543e58b10" => :high_sierra - sha256 "b004e7801489c6cb0361c5032278d11cafd4ace151a02ee97214c79dba0f89be" => :sierra - 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 "pcre" - depends_on "poppler" - - def install - ENV.cxx11 - system "./autogen.sh" if build.head? - - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - - 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 d1080daa87f97..0000000000000 --- a/Formula/pdflib-lite.rb +++ /dev/null @@ -1,46 +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 "200edc8d498349fcebe26df1d692c4c8b7599055b6efadead3199356e9b750b8" => :catalina - 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 66fb5d2d39723..0000000000000 --- a/Formula/pdfpc.rb +++ /dev/null @@ -1,32 +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.4.0.tar.gz" - sha256 "5fc457b081cdf02708436bb708940fd6b689e03fc336d3faab652f0b85592c00" - license "GPL-2.0" - revision 4 - head "https://github.com/pdfpc/pdfpc.git" - - bottle do - sha256 "aa21bf874d02d920eefc1ec3d8b2ce35cac2712a18d18817d1cbb0594639fb9d" => :catalina - sha256 "85befb240c734d282ed137ebec82ed69da0b62ee9cf72288e7c052030e0daf56" => :mojave - sha256 "028edb85cd773f143754f616fb54064d60126316de3330e9dc67f6332d9b5f09" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "vala" => :build - depends_on "gst-plugins-good" - depends_on "gtk+3" - depends_on "libgee" - depends_on "librsvg" - depends_on "poppler" - - def install - system "cmake", ".", "-DMOVIES=on", *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 e463093873b8f..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" - revision 1 - head "https://svn.code.sf.net/p/pdfsandwich/code/trunk/src" - - bottle do - cellar :any_skip_relocation - sha256 "f02f16a0b4762dd522dcfc633727e3f68dca40966e34d9c89015dc896d47cacc" => :catalina - sha256 "1c11166775d495add7143bce32ef70def752462bfd91a54ff5f69ff671324259" => :mojave - sha256 "d7397999d8b60f0f74956cf53c20994ee565db95d501b7143cc5efe48c3759ae" => :high_sierra - 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/pdftk-java.rb b/Formula/pdftk-java.rb deleted file mode 100644 index 6207f9668ae2d..0000000000000 --- a/Formula/pdftk-java.rb +++ /dev/null @@ -1,32 +0,0 @@ -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.1.3/pdftk-v3.1.3.tar.gz" - sha256 "d9145976adf2dd5f8cd70e1e2345262e46790be6bfb2da1728a2ad4f6e4b2021" - license "GPL-2.0" - revision 1 - head "https://gitlab.com/pdftk-java/pdftk.git" - - bottle do - cellar :any_skip_relocation - sha256 "3eb4ac53b5e6f4603509e5eb785c3574a050df65252b1f6aeb6f9f7300604fd4" => :catalina - sha256 "a269cdfe44ed002b830a5e574f49b9eec4923b0cc3ad791b3cb46773d2952c40" => :mojave - sha256 "72e5f070fa22a8f394a6fcdfe1b40a65f95ee945f655377677106a7a369b8c08" => :high_sierra - end - - depends_on "gradle" => :build - depends_on :java => "1.8" - - def install - system "gradle", "shadowJar", "--no-daemon" - libexec.install "build/libs/pdftk-all.jar" - bin.write_jar_script libexec/"pdftk-all.jar", "pdftk", :java_version => "1.8" - 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/pdftohtml.rb b/Formula/pdftohtml.rb deleted file mode 100644 index bbfe20b295c45..0000000000000 --- a/Formula/pdftohtml.rb +++ /dev/null @@ -1,22 +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 - cellar :any_skip_relocation - rebuild 2 - sha256 "d8a6e5bb1d84ee766898543d77307b4a9a6e6f826ebe9cc48ce6db8bb24c8923" => :catalina - sha256 "c49245634c48c7c24501cfb848a98e4b6a281ff0cf89235bb7a7ce09619e66ad" => :mojave - sha256 "200be428031e013f58b792b092b56e74743d6362d747b0c883bb95269d7a5e72" => :high_sierra - end - - conflicts_with "pdf2image", "poppler", "xpdf", - :because => "poppler, pdftohtml, pdf2image, and xpdf install conflicting executables" - - 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 34d5b0450d54d..0000000000000 --- a/Formula/pdftoipe.rb +++ /dev/null @@ -1,33 +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.13.1.tar.gz" - sha256 "c8725d78e43b7d6a04465e8a156bc4c6a78121f291aac74e0b0a10286ef95544" - revision 7 - - bottle do - cellar :any - sha256 "2a87dbf06db83c9d397994817e64c6727c1dc593f6263822ca80d050f2495e56" => :catalina - sha256 "d6ad23747f3c1319cbbe7e2b1faf6f91c68199d4ef712a8e1005082acb526451" => :mojave - sha256 "bfbb2639bc3c0817f2a05fcfcceca6bd8741103f04a7f81826eb5d1dc6541880" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "poppler" - - 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 "", File.read("test.ipe") - end -end diff --git a/Formula/pdns.rb b/Formula/pdns.rb deleted file mode 100644 index 205d67da2fd6c..0000000000000 --- a/Formula/pdns.rb +++ /dev/null @@ -1,79 +0,0 @@ -class Pdns < Formula - desc "Authoritative nameserver" - homepage "https://www.powerdns.com/" - url "https://downloads.powerdns.com/releases/pdns-4.3.0.tar.bz2" - sha256 "6be2e70f100df6f32cb431d5f57ca0aabde1fba6c11d947eccc86d44bdf95d08" - license "GPL-2.0" - - bottle do - sha256 "abda262260fff1178494b353f70b32087e48c934001d15eb92418360a4111ea5" => :catalina - sha256 "b3dfd65d42e150a2ce1da416507a975f72cd28bbd9092497c933796afa172e04" => :mojave - sha256 "2647076a193298b4cd3db2701a027fcb4e583b556400b13e282e81be5538c24c" => :high_sierra - 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 - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "lua" - depends_on "openssl@1.1" - depends_on "sqlite" - - uses_from_macos "curl" - - 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-libcrypto=#{Formula["openssl@1.1"].opt_prefix} - --with-sqlite3 - --with-modules=gsqlite3 - ] - - 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 31067f5129824..0000000000000 --- a/Formula/pdnsd.rb +++ /dev/null @@ -1,79 +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" - license "GPL-3.0" - - bottle do - rebuild 2 - sha256 "125b690bbac734558cd9a4510c1336e2a92c3fd4748ba2ed216af9a5041c5d60" => :catalina - 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 3cbaf64230c21..0000000000000 --- a/Formula/pdnsrec.rb +++ /dev/null @@ -1,41 +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.3.2.tar.bz2" - sha256 "fcaeba94d5005ec3b973c1800d22eee686f785d3e635ad495d6f44067a4561e1" - license "GPL-2.0" - - bottle do - sha256 "e10f8080dc0217d7b070d0fb2b55484834dce4a6816d192a4300997233424851" => :catalina - sha256 "16ff5c044d1c7c412f5ec0542e9aff7cf5ea72c9f79809ce4b82d21004b0ed9d" => :mojave - sha256 "c844e730c0615a742e7b83c1ff0579149dddef844e8d1552eae080924414d691" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "gcc" if DevelopmentTools.clang_build_version == 600 - depends_on "lua" - depends_on "openssl@1.1" - - def install - ENV.cxx11 - - args = %W[ - --prefix=#{prefix} - --sysconfdir=#{etc}/powerdns - --disable-silent-rules - --with-boost=#{Formula["boost"].opt_prefix} - --with-libcrypto=#{Formula["openssl@1.1"].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 1375c5fc2da48..0000000000000 --- a/Formula/pdsh.rb +++ /dev/null @@ -1,38 +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.34/pdsh-2.34.tar.gz" - sha256 "b47b3e4662736ef44b6fe86e3d380f95e591863e69163aa0592e9f9f618521e9" - license "GPL-2.0" - head "https://github.com/chaos/pdsh.git" - - bottle do - sha256 "db103afd01523d00761df3c077b309ffeaa7e816a538ab9b739fac7b58a8171b" => :catalina - sha256 "d5ce164360edacbda30b059e8964fc6e4c886adc5f63218a37667756419ef51a" => :mojave - sha256 "4063ea4d575eef74e2af6993a74658df6c48e42b81df8a77a49aee745c7527a0" => :high_sierra - 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/peco.rb b/Formula/peco.rb deleted file mode 100644 index d972ad0549574..0000000000000 --- a/Formula/peco.rb +++ /dev/null @@ -1,31 +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.7.tar.gz" - sha256 "9bf4f10b3587270834380e1ea939625bd47eaa166bfabd050e66fad3ffd8f9b0" - license "MIT" - head "https://github.com/peco/peco.git" - - bottle do - cellar :any_skip_relocation - sha256 "e7fdbc66f3eff034c2c652d427952002f8c842f29aa1c7d44170d66e4866bdb6" => :catalina - sha256 "85e61dc800cba2795fef1a8c9f77cc384f7ec7be6ae22819f74c747b2f9b4db5" => :mojave - sha256 "a8e5c5b29e4650a17a2ac48ff6b25563176f66eaf0a2a0d557b72ba0899ddee1" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/peco/peco").install buildpath.children - cd "src/github.com/peco/peco" do - system "make", "build" - 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 be0902639617f..0000000000000 --- a/Formula/peg-markdown.rb +++ /dev/null @@ -1,29 +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" - revision 1 - head "https://github.com/jgm/peg-markdown.git" - - bottle do - cellar :any - sha256 "08910e3fdd97183865c2839a4e14839826101e6dfa48120aebc60fbe838f0689" => :catalina - sha256 "a60087175a8f3c5242e9183eeddb433e6bdbe68409cae0a7c61d66da4622b150" => :mojave - sha256 "207764b26b253904cf61e9e13eb32e81a51d61d548b7dafd366da5a5394a5f08" => :high_sierra - sha256 "2d75448f008aa176b624ecb02bc6e3f7492ea8953a99f84fcdacc6b301b39412" => :sierra - 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 83afe065795fc..0000000000000 --- a/Formula/peg.rb +++ /dev/null @@ -1,34 +0,0 @@ -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.18.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/p/peg/peg_0.1.18.orig.tar.gz" - sha256 "20193bdd673fc7487a38937e297fff08aa73751b633a086ac28c3b34890f9084" - - bottle do - cellar :any_skip_relocation - sha256 "bb6bfe4999b4675d3e3d16a52552fe571430fa5956fdff245837f922d7e39842" => :catalina - 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 63ba0640875e3..0000000000000 --- a/Formula/pegtl.rb +++ /dev/null @@ -1,32 +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.8.3.tar.gz" - sha256 "88b8e4ded6ea1f3f2223cc3e37072e2db1e123b90d36c309816341ae9d966723" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "10ad60dbc5a6c4054579b2e7529dfb053395cfd2c9bc5ddb5c2bf6b939b8f9cd" => :catalina - sha256 "10ad60dbc5a6c4054579b2e7529dfb053395cfd2c9bc5ddb5c2bf6b939b8f9cd" => :mojave - sha256 "10ad60dbc5a6c4054579b2e7529dfb053395cfd2c9bc5ddb5c2bf6b939b8f9cd" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DPEGTL_BUILD_TESTS=OFF", - "-DPEGTL_BUILD_EXAMPLES=OFF" - system "make", "install" - end - 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 a7e2f963739cf..0000000000000 --- a/Formula/pelikan.rb +++ /dev/null @@ -1,32 +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 "61441ad2aeeb6d14ab8fa6183944c1f4ab0733776e3f810ad17b80faf2f25faf" => :catalina - 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 4eae9ed61e2b3..0000000000000 --- a/Formula/perceptualdiff.rb +++ /dev/null @@ -1,25 +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 "9edad00fd4470f908e5f9e1eb8c96c364b94c504dab46d1f38a45036871a10a0" => :catalina - 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 ab75e6af2267e..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 2 - head "https://github.com/mooz/percol.git" - - bottle do - cellar :any_skip_relocation - sha256 "e09b635ba6745c7beacd38c6a48d3d8637d0894618fc4e4ce1fdd8113d227cea" => :catalina - sha256 "e09b635ba6745c7beacd38c6a48d3d8637d0894618fc4e4ce1fdd8113d227cea" => :mojave - sha256 "e09b635ba6745c7beacd38c6a48d3d8637d0894618fc4e4ce1fdd8113d227cea" => :high_sierra - end - - depends_on "python@3.8" - - resource "six" do - url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - 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.rb b/Formula/percona-server.rb deleted file mode 100644 index e6280643febb3..0000000000000 --- a/Formula/percona-server.rb +++ /dev/null @@ -1,184 +0,0 @@ -class PerconaServer < Formula - desc "Drop-in MySQL replacement" - homepage "https://www.percona.com/" - url "https://www.percona.com/downloads/Percona-Server-8.0/Percona-Server-8.0.19-10/source/tarball/percona-server-8.0.19-10.tar.gz" - sha256 "b819d81b9cdef497dd5fd1044ddb033d222b986cf610cb5d4bb1fa5010dba580" - - bottle do - sha256 "c6ad05c52e82f419f65a46bd627c784fec43dfb8545e68fb4939995fb5fefed2" => :catalina - sha256 "cae8782ea16aa5fdfebe4ccac3189d2e7fbdc0d6290c0b8fda6ab46792f956eb" => :mojave - sha256 "30719045c2ee376f8cf269e12fcd307f7d0313338b59b6e1c24861207177b287" => :high_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 - depends_on "openssl@1.1" - - conflicts_with "mariadb", "mysql", - :because => "percona, mariadb, and mysql install the same binaries" - conflicts_with "protobuf", - :because => "both install libprotobuf(-lite) libraries" - - # 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 - - resource "boost" do - url "https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.bz2" - sha256 "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778" - 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 - # -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`) - args = %W[ - -DFORCE_INSOURCE_BUILD=1 - -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} - -DWITH_SSL=yes - -DWITH_UNIT_TESTS=OFF - -DWITH_EMBEDDED_SERVER=ON - -DENABLED_LOCAL_INFILE=1 - -DWITH_INNODB_MEMCACHED=ON - -DWITH_EDITLINE=system - ] - - # 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] - - 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 - # 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 diff --git a/Formula/percona-toolkit.rb b/Formula/percona-toolkit.rb deleted file mode 100644 index 3f4c59722d427..0000000000000 --- a/Formula/percona-toolkit.rb +++ /dev/null @@ -1,83 +0,0 @@ -require "language/perl" - -class PerconaToolkit < Formula - include Language::Perl::Shebang - - desc "Percona Toolkit for MySQL" - homepage "https://www.percona.com/software/percona-toolkit/" - url "https://www.percona.com/downloads/percona-toolkit/3.2.0/source/tarball/percona-toolkit-3.2.0.tar.gz" - sha256 "e7c7028631d5b1c66ba21841c55919537bd4ed2f3a5975f989fa4abd7d9d753d" - license "GPL-2.0" - head "lp:percona-toolkit", :using => :bzr - - bottle do - cellar :any - sha256 "3f64220a3fb90ee0bfe3be99d0590aa42098accd6126440dee3782c9b286161d" => :catalina - sha256 "48322255f937dabee1a5666d206d99a67f36919268dce0090551461fc7cc176f" => :mojave - sha256 "f1952ce63f2c1dc0705aba15741c6afccf0c97f27ea722e24718142a6abcb7e4" => :high_sierra - end - - depends_on "mysql-client" - depends_on "openssl@1.1" - - uses_from_macos "perl" - - # Should be installed before DBD::mysql - resource "Devel::CheckLib" do - url "https://cpan.metacpan.org/authors/id/M/MA/MATTN/Devel-CheckLib-1.14.tar.gz" - sha256 "f21c5e299ad3ce0fdc0cb0f41378dca85a70e8d6c9a7599f0e56a957200ec294" - 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.643.tar.gz" - sha256 "8a2b993db560a2c373c174ee976a51027dd780ec766ae17620c20393d2e836fa" - end - end - - resource "DBD::mysql" do - url "https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz" - sha256 "4f48541ff15a0a7405f76adc10f81627c33996fbf56c95c26c094444c0928d78" - end - - resource "JSON" do - url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.02.tar.gz" - sha256 "444a88755a89ffa2a5424ab4ed1d11dca61808ebef57e81243424619a9e8627c" - end - - def install - ENV.prepend_create_path "PERL5LIB", buildpath/"build_deps/lib/perl5" - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - - build_only_deps = %w[Devel::CheckLib] - resources.each do |r| - r.stage do - install_base = if build_only_deps.include? r.name - buildpath/"build_deps" - else - libexec - end - system "perl", "Makefile.PL", "INSTALL_BASE=#{install_base}" - system "make", "install" - end - end - - system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}" - system "make", "install" - share.install prefix/"man" - - # Disable dynamic selection of perl which may cause segfault when an - # incompatible perl is picked up. - # https://github.com/Homebrew/homebrew-core/issues/4936 - bin.find { |f| rewrite_shebang detected_perl_shebang, f } - - 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 c892882e29d5a..0000000000000 --- a/Formula/percona-xtrabackup.rb +++ /dev/null @@ -1,93 +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/Percona-XtraBackup-LATEST/Percona-XtraBackup-8.0.13/source/tarball/percona-xtrabackup-8.0.13.tar.gz" - sha256 "760f556e85ad55bd54019ad78b1064557c68e31b6e37dc4f4ce1f0065b911f71" - revision 1 - - bottle do - sha256 "2f35a444086da15b1e05ec9ac225f153376abb81546db4490fbf34b4096ec6c0" => :catalina - sha256 "a4f1233ebde9ab66010214fa21c739ae9f97cffcb739bdd51fe542511d5571e1" => :mojave - sha256 "7238c7d0e4977dcdba034ded3aa5ed9cd71884ba060894060755428aa85ea29a" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "sphinx-doc" => :build - depends_on "libev" - depends_on "libgcrypt" - depends_on "mysql-client" - depends_on "openssl@1.1" - - conflicts_with "protobuf", - :because => "both install libprotobuf(-lite) libraries" - - 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.70.0/boost_1_70_0.tar.bz2" - sha256 "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778" - end - - def install - cmake_args = %w[ - -DBUILD_CONFIG=xtrabackup_release - -DCOMPILATION_COMMENT=Homebrew - -DINSTALL_PLUGINDIR=lib/percona-xtrabackup/plugin - -DINSTALL_MANDIR=share/man - -DWITH_MAN_PAGES=ON - -DINSTALL_MYSQLTESTDIR= - -DCMAKE_CXX_FLAGS="-DBOOST_NO_CXX11_HDR_ARRAY" - ] - - # macOS has this value empty by default. - # See https://bugs.python.org/issue18378#msg215215 - ENV["LC_ALL"] = "en_US.UTF-8" - - # 1.70.0 specifically required. Detailed in cmake/boost.cmake - (buildpath/"boost_1_70_0").install resource("boost") - cmake_args << "-DWITH_BOOST=#{buildpath}/boost_1_70_0" - - cmake_args.concat std_cmake_args - - mkdir "build" do - system "cmake", "..", *cmake_args - system "make" - system "make", "install" - end - - # remove conflicting library that is already installed by mysql - rm lib/"libmysqlservices.a" - - 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") - - mkdir "backup" - output = shell_output("#{bin}/xtrabackup --target-dir=backup --backup 2>&1", 1) - assert_match "Failed to connect to MySQL server", output - end -end diff --git a/Formula/perkeep.rb b/Formula/perkeep.rb deleted file mode 100644 index 3c1f03b96bed5..0000000000000 --- a/Formula/perkeep.rb +++ /dev/null @@ -1,88 +0,0 @@ -class Perkeep < Formula - desc "Lets you permanently keep your stuff, for life" - homepage "https://perkeep.org/" - license "Apache-2.0" - - stable do - url "https://github.com/perkeep/perkeep.git", - :tag => "0.10", - :revision => "0cbe4d5e05a40a17efe7441d75ce0ffdf9d6b9f5" - - # gopherjs doesn't tag releases, so just pick the most recent revision for now - resource "gopherjs" do - url "https://github.com/gopherjs/gopherjs/archive/fce0ec30dd00773d3fa974351d04ce2737b5c4d9.tar.gz" - sha256 "e5e6ede5f710fde77e48aa1f6a9b75f5afeb1163223949f76c1300ae44263b84" - end - - depends_on "go@1.12" => :build - end - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "36f18ad54a3e656ac5da55fc438636aac922e107ad1082e0dad7353626f0db84" => :catalina - sha256 "51f41c16b3c4ea80d6a77c5badf28dca0ec323bd5aa2f1f90e855ce568b1c8ca" => :mojave - sha256 "b188c23945a51d253dc6c4435afaa509a2ddaf151124ef1f08a1186611041c92" => :high_sierra - end - - head do - url "https://github.com/perkeep/perkeep.git" - - depends_on "go" => :build - end - - depends_on "pkg-config" => :build - - conflicts_with "hello", :because => "both install `hello` binaries" - - def install - if build.stable? - ENV["GOPATH"] = buildpath - ENV["CAMLI_GOPHERJS_GOROOT"] = Formula["go@1.12"].opt_libexec - - (buildpath/"src/perkeep.org").install buildpath.children - - # Vendored version of gopherjs requires go 1.10, so use the newest available gopherjs, which - # supports up to go 1.12 - rm_rf buildpath/"src/perkeep.org/vendor/github.com/gopherjs/gopherjs" - resource("gopherjs").stage buildpath/"src/perkeep.org/vendor/github.com/gopherjs/gopherjs" - - cd "src/perkeep.org" do - system "go", "run", "make.go" - end - - bin.install Dir["bin/*"].select { |f| File.executable? f } - else - system "go", "run", "make.go" - bin.install Dir[".brew_home/go/bin/*"].select { |f| File.executable? f } - end - 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 679127f9436ab..0000000000000 --- a/Formula/perl-build.rb +++ /dev/null @@ -1,131 +0,0 @@ -class PerlBuild < Formula - desc "Perl builder" - homepage "https://github.com/tokuhirom/Perl-Build" - url "https://github.com/tokuhirom/Perl-Build/archive/1.30.tar.gz" - sha256 "30585889bf7ba9979233d30cfd32686790833f0317ce8d796878dca996fab9bb" - head "https://github.com/tokuhirom/perl-build.git" - - bottle do - cellar :any_skip_relocation - sha256 "f1f873c2ff9d0d82dc32342e4a048b0d766242128aa68c92c28b85e8ac7465ce" => :catalina - sha256 "77795cc97a4a95805804fd05a9a73c3ee2e2fd807f032365d0bd7ebb57ae9117" => :mojave - sha256 "6f32d771c449780efeca88dbb50f841ed15021053932958ce8bd6385a19b9f20" => :high_sierra - end - - uses_from_macos "perl" - - resource "Module::Build" do - url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4229.tar.gz" - sha256 "1fe491a6cda914b01bc8e592faa2b5404e9f35915ca15322f8f2a8d8f9008c18" - 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.15.tar.gz" - sha256 "5d65f0ee20a9e4744acdb3ef12edae78c121f53dcbc9cf00867c5725c4513aa5" - end - - resource "CPAN::Perl::Releases" do - url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/CPAN-Perl-Releases-4.20.tar.gz" - sha256 "71d3310531a644424be33f22148a582f892eb7b12555bc150dbdac4293abd8ed" - 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.076.tar.gz" - sha256 "ddbdaa2fb511339fa621a80021bf1b9733fddafc4fe0245f26c8b92171ef9387" - end - - # Devel::PatchPerl dependency - 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-1.78.tar.gz" - sha256 "93111a37ad7358ea5601444c2e76074b267ca84e4e6aca802547759ed74217e7" - end - - # Pod::Usage dependency - resource "Pod::Text" do - url "https://cpan.metacpan.org/authors/id/R/RR/RRA/podlators-4.12.tar.gz" - sha256 "948717da19630a5f003da4406da90fe1cbdec9ae493671c90dfb6d8b3d63b7eb" - 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 310c492b52ec8..0000000000000 --- a/Formula/perl.rb +++ /dev/null @@ -1,60 +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.32.0.tar.xz" - sha256 "6f436b447cf56d22464f980fac1916e707a040e96d52172984c5d184c09b859b" - head "https://github.com/perl/perl5.git", :branch => "blead" - - bottle do - sha256 "bc6c97521b6edf723c8ee0742aebb1954b5c8fec81bf2d96861c3f8bcc4e404d" => :catalina - sha256 "f09b3fefe2175b36e590ee13e7aa84d28ebcbce3ef8e252e24a0aebb752405ab" => :mojave - sha256 "718a54da6e3b02c33d5230776aaa54eaaac710c09cf412078014c9c50dd0ac51" => :high_sierra - end - - uses_from_macos "expat" - - # 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 - -Dsed=/usr/bin/sed - ] - - args << "-Dusedevel" if build.head? - - system "./Configure", *args - - system "make" - - 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 f5b980ddc3e49..0000000000000 --- a/Formula/perl@5.18.rb +++ /dev/null @@ -1,46 +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" - revision 1 - - bottle do - sha256 "45b388773570fd4ef892caa7a0bb0312fd05dfcb3f73245a03eed16bf9187cc9" => :catalina - sha256 "3e80537039afd47db55b42a09f34c2b1e6fc2a24581c16d09d76b5ad85997ed6" => :mojave - sha256 "4ebffdb24ede27bf2fb4f844c87f4adc962942d399c6762b3c6cf90b929fa50a" => :high_sierra - end - - keg_only :versioned_formula - - def install - ENV.deparallelize if MacOS.version >= :catalina - - args = %W[ - -des - -Dprefix=#{prefix} - -Dman1dir=#{man1} - -Dman3dir=#{man3} - -Duseshrplib - -Duselargefiles - -Dusethreads - -Dsed=/usr/bin/sed - ] - - 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 473871d29bb60..0000000000000 --- a/Formula/perltidy.rb +++ /dev/null @@ -1,41 +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/20200619/Perl-Tidy-20200619.tar.gz" - sha256 "03b0e1b777c95920053d37942d6398a56b746d7c78090d522371138785c8a09e" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e74edc072defecc70cfeac14f6344c0008c8c457f120a377cad20326d7f80e90" => :catalina - sha256 "eb9955c2edb97b5a401a62bda71329e6dead46d357b0357a8761a649bd062e01" => :mojave - sha256 "e33764a067c1b6b7a2ac4b7f05ca7e4f8aab036f2c80964c9f38c3bb0095e0a4" => :high_sierra - 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", "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 7dbfb7f4eb5e6..0000000000000 --- a/Formula/peru.rb +++ /dev/null @@ -1,50 +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/14/ef/9226d6a47f34afacb241b3d8acf25e5cd958a17f7bdb9f24d3b284aa59e0/peru-1.2.0.tar.gz" - sha256 "5bcf70b49fd5a6b089a23d49d93fd6deb05bde560219704de53ae5e48cb49acb" - revision 1 - - bottle do - cellar :any - sha256 "0cdd82ec6457445261cafdf0a64f626f1c5f64a49313bcc6f9b2694e644d4ab3" => :catalina - sha256 "9095dd68d7702875b8138efb6b1ba49a84e9c0ba60a7d8be56019acc5422c466" => :mojave - sha256 "0e543115564fbebe21054c2b05913efb76b03ecceb41b12d8b2081b575459e39" => :high_sierra - end - - depends_on "libyaml" - depends_on "python@3.8" - - 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/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - def install - # Fix plugins (executed like an executable) looking for Python outside the virtualenv - Dir["peru/resources/plugins/**/*.py"].each do |f| - inreplace f, "#! /usr/bin/env python3", "#!#{libexec}/bin/python3.8" - end - - 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 8b44c356c9cd0..0000000000000 --- a/Formula/petsc-complex.rb +++ /dev/null @@ -1,53 +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.13.3.tar.gz" - sha256 "dc744895ee6b9c4491ff817bef0d3abd680c5e3c25e601be44240ce65ab4f337" - revision 1 - - bottle do - sha256 "1504d03c9b97c19588d33d1522a4bc908a8639a1358b07c5223924a6c9d7339d" => :catalina - sha256 "39bec44f2ea27302de43637875d93c3dc02635060b4ec01c600b97437117b04a" => :mojave - sha256 "dbd869fe6b0b06c699dc4c98e65d0c216a80b4c0269f0c08408497d03e03843c" => :high_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 - system "./configure", "--prefix=#{prefix}", - "--with-debugging=0", - "--with-scalar-type=complex", - "--with-x=0", - "--CC=mpicc", - "--CXX=mpicxx", - "--F77=mpif77", - "--FC=mpif90", - "MAKEFLAGS=$MAKEFLAGS" - system "make", "all" - system "make", "install" - - # Avoid references to Homebrew shims - rm_f lib/"petsc/conf/configure-hash" - inreplace lib/"petsc/conf/petscvariables", "#{HOMEBREW_SHIMS_PATH}/mac/super/", "" - end - - test do - test_case = "#{share}/petsc/examples/src/ksp/ksp/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 4932b4ae3fb95..0000000000000 --- a/Formula/petsc.rb +++ /dev/null @@ -1,53 +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.13.3.tar.gz" - sha256 "dc744895ee6b9c4491ff817bef0d3abd680c5e3c25e601be44240ce65ab4f337" - revision 1 - - bottle do - sha256 "3687e6867dfd0cc24ab30467c68814dbdc0a1b92df43f951841042416562f7b6" => :catalina - sha256 "70f4cf2d1f6c9a7593d220a72f2963c5c155587e4c8735be4490649859c46e84" => :mojave - sha256 "414ac2b2bcb076be4be7dd2dc6916105494a55ef84dfd242b28bd07a8c53ed37" => :high_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 - system "./configure", "--prefix=#{prefix}", - "--with-debugging=0", - "--with-scalar-type=real", - "--with-x=0", - "--CC=mpicc", - "--CXX=mpicxx", - "--F77=mpif77", - "--FC=mpif90", - "MAKEFLAGS=$MAKEFLAGS" - system "make", "all" - system "make", "install" - - # Avoid references to Homebrew shims - rm_f lib/"petsc/conf/configure-hash" - inreplace lib/"petsc/conf/petscvariables", "#{HOMEBREW_SHIMS_PATH}/mac/super/", "" - end - - test do - test_case = "#{pkgshare}/examples/src/ksp/ksp/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 da8a3e0909b76..0000000000000 --- a/Formula/pev.rb +++ /dev/null @@ -1,35 +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" - revision 1 - head "https://github.com/merces/pev.git" - - bottle do - sha256 "594049ef545f762b9f6d3cad098fa23971c0b84a3623799004c83e62a7303779" => :catalina - sha256 "e4d191b795eebb97ee0bb6a3122bf45f1c2f05c7b192381e712d96d71cd4ffb0" => :mojave - sha256 "70c993e146e9d78b9d8d129f06c4a67071f110d286d87fccf1132a7022833a1b" => :high_sierra - sha256 "228fda2113236b984e337abf64064684c2e14c8e73eb62367ad1bc5cbe43215b" => :sierra - end - - depends_on "openssl@1.1" - depends_on "pcre" - - # Upstream fix for compatibility with OpenSSL 1.1 - # https://github.com/merces/pev/pull/104 - patch do - url "https://github.com/merces/pev/commit/53eb494b.diff?full_index=1" - sha256 "66eeadd149716597dfa4ecb6dc9c021cb6ab910aa4002b7730c822dd5c8ea654" - end - - 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 d385c800eed89..0000000000000 --- a/Formula/pex.rb +++ /dev/null @@ -1,33 +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 "d266cf66e50d44748ed83ba2a20ffa0bd0530f637d98a85e3ab1b6eb11794319" => :catalina - 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/pfetch.rb b/Formula/pfetch.rb deleted file mode 100644 index 08d0fca8dbc26..0000000000000 --- a/Formula/pfetch.rb +++ /dev/null @@ -1,29 +0,0 @@ -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/0.6.0.tar.gz" - sha256 "d1f611e61c1f8ae55bd14f8f6054d06fcb9a2d973095367c1626842db66b3182" - license "MIT" - head "https://github.com/dylanaraps/pfetch.git" - - bottle do - cellar :any_skip_relocation - sha256 "f93914feee7f4e3cda77341c3bddf2cf51eb4b2aed01f6ace771db75078da570" => :catalina - sha256 "f93914feee7f4e3cda77341c3bddf2cf51eb4b2aed01f6ace771db75078da570" => :mojave - sha256 "f93914feee7f4e3cda77341c3bddf2cf51eb4b2aed01f6ace771db75078da570" => :high_sierra - end - - 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/pg_top.rb b/Formula/pg_top.rb deleted file mode 100644 index 500ec65d4af8b..0000000000000 --- a/Formula/pg_top.rb +++ /dev/null @@ -1,30 +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 "a8bd95ff06d4f746e3763933fee8f4118b5ae6e3d16c4a8e2ff1bc675bd4091a" => :catalina - 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" - 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 f3c0bc26c53e8..0000000000000 --- a/Formula/pgbadger.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Pgbadger < Formula - desc "Log analyzer for PostgreSQL" - homepage "https://pgbadger.darold.net/" - url "https://github.com/darold/pgbadger/archive/v11.2.tar.gz" - sha256 "74527a09e2e68918d2714c55a776f8f19bba9dd62a9f49a3f5ffd59e0812bfa3" - license "PostgreSQL" - head "https://github.com/darold/pgbadger.git" - - bottle do - cellar :any_skip_relocation - sha256 "cecce520a3c653ba69b24eae89587565569fc25191378622704fc3913452a3d6" => :catalina - sha256 "cecce520a3c653ba69b24eae89587565569fc25191378622704fc3913452a3d6" => :mojave - sha256 "1233f5007ae53bbcc82a3bce3a1f7be459494e2d33adb4652eb7e9c484e4baf9" => :high_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 4fd0496bceaa3..0000000000000 --- a/Formula/pgbouncer.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Pgbouncer < Formula - desc "Lightweight connection pooler for PostgreSQL" - homepage "https://www.pgbouncer.org/" - url "https://www.pgbouncer.org/downloads/files/1.14.0/pgbouncer-1.14.0.tar.gz" - sha256 "a0c13d10148f557e36ff7ed31793abb7a49e1f8b09aa2d4695d1c28fa101fee7" - - bottle do - cellar :any - sha256 "eaecbb143f281ccc047d7a63488038c2d53de7ffaf56b56e532dce7089e30106" => :catalina - sha256 "c86c7f6b7fa11965e9427aeb36bc334b6f7f31323d826350736813187622844f" => :mojave - sha256 "4e098f2929939ba16d03e194310df111929dd861e02e89f075ce726f8f67b49d" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "openssl@1.1" - - def install - system "./configure", "--disable-debug", - "--prefix=#{prefix}" - 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 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 - -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 7ab44c3cf2440..0000000000000 --- a/Formula/pgcli.rb +++ /dev/null @@ -1,98 +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/33/d0/646dcdd819f6313c5b534bb41e2970968a1cbccba39e5f969a65858d0bb4/pgcli-3.0.0.tar.gz" - sha256 "4920225838e8004ae6d2ec42f566e0a8b99c4bd42bc2c876d0de8501da0a4082" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "33762e29fe9be52d07d9500b3bb497afca3494ba73b7729e82047f531fe347ca" => :catalina - sha256 "dfc4edc73356fb8059808ae8a502fccf3df013caec1a39e18e6766b39a42ae5c" => :mojave - sha256 "42814524bbec67d415d06d991c17c0decd429c9a072d86c122d92bdf56affa5a" => :high_sierra - end - - depends_on "libpq" - depends_on "openssl@1.1" - depends_on "python@3.8" - - resource "cli-helpers" do - url "https://files.pythonhosted.org/packages/43/36/ba00975df9d393c0ccc3b1bf1610227bc4c4d611a5c69249b57be8ba6253/cli_helpers-1.2.1.tar.gz" - sha256 "98db22eaa86827d99ee6af9f5f3923142d04df256425204530842b032849a165" - end - - resource "Click" do - url "https://files.pythonhosted.org/packages/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - 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/17/b7/ed02060fd1b8c0de361b929355cd26e42ed31bea1a9229d9e7d8bc3b7faa/humanize-2.3.0.tar.gz" - sha256 "98b7ac9d1a70ad62175c8e0dd44beebbd92418727fc4e214468dfb2baa8ebfb5" - end - - resource "pgspecial" do - url "https://files.pythonhosted.org/packages/4e/0c/47957ad5b5cfb488344032326a4a013127b005929422bc5e9ee98bdf18ec/pgspecial-1.11.9.tar.gz" - sha256 "77f8651450ccbde7d3036cfe93486a4eeeb5ade28d1ebc4b2ba186fea0023c56" - end - - resource "prompt-toolkit" do - url "https://files.pythonhosted.org/packages/69/19/3aa4bf17e1cbbdfe934eb3d5b394ae9a0a7fb23594a2ff27e0fdaf8b4c59/prompt_toolkit-3.0.5.tar.gz" - sha256 "563d1a4140b63ff9dd587bda9557cffb2fe73650205ab6f4383092fb882e7dc8" - end - - resource "psycopg2" do - url "https://files.pythonhosted.org/packages/a8/8f/1c5690eebf148d1d1554fc00ccf9101e134636553dbb75bdfef4f85d7647/psycopg2-2.8.5.tar.gz" - sha256 "f7d46240f7a1ae1dd95aab38bd74f7428d46531f69219954266d669da60c0818" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - 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/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "sqlparse" do - url "https://files.pythonhosted.org/packages/67/4b/253b6902c1526885af6d361ca8c6b1400292e649f0e9c95ee0d2e8ec8681/sqlparse-0.3.1.tar.gz" - sha256 "e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/57/6f/213d075ad03c84991d44e63b6516dd7d185091df5e1d02a660874f8f7e1e/tabulate-0.8.7.tar.gz" - sha256 "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007" - 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/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" - sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" - 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 792e88b842c20..0000000000000 --- a/Formula/pgdbf.rb +++ /dev/null @@ -1,24 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "ae8050a5d6a6f91f529a0985a5626981d22573094791274c7bc1759b2770c4c7" => :catalina - 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 2930e8bb5cc24..0000000000000 --- a/Formula/pgformatter.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Pgformatter < Formula - desc "PostgreSQL syntax beautifier" - homepage "https://sqlformat.darold.net/" - url "https://github.com/darold/pgFormatter/archive/v4.3.tar.gz" - sha256 "ab5fecbfa463221f2a0dc457437a2d0fe98e4ee63c1ee15f0ce10286d97bd636" - license "PostgreSQL" - - bottle do - cellar :any_skip_relocation - sha256 "c456132a750decd8e9283605f3c2315e00cdf1256cf82fd346205aaf46de3012" => :catalina - sha256 "c456132a750decd8e9283605f3c2315e00cdf1256cf82fd346205aaf46de3012" => :mojave - sha256 "a09bb4b78a53f3f953ac502388d198d837a84cb0aad9a2a8659b53f5f79eeb54" => :high_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 5493a31366a8d..0000000000000 --- a/Formula/pgloader.rb +++ /dev/null @@ -1,421 +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.6.2.tar.gz" - sha256 "33f87df9cb8f9a36f9836cd691ad6dfa72ae76200a12fe01ee89584f3b771ae7" - head "https://github.com/dimitri/pgloader.git" - - bottle do - sha256 "218a59416c6f94c8e2855b59bf3ca942dbbfe8c3b62665f2dd9561ddd3d00aa8" => :catalina - sha256 "850897627bcfe4367292696644f24d08674fec75a6a74269bca4b5c5d1d74a69" => :mojave - sha256 "6abfe60b76b732f4492f898693ab03fac460848dc5c238c89af26720aa273ba3" => :high_sierra - end - - depends_on "buildapp" => :build - depends_on "sphinx-doc" => :build - depends_on "freetds" - depends_on "openssl@1.1" - depends_on "postgresql" - depends_on "sbcl" - - # 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/2020-02-18/alexandria-20200218-git.tgz" - sha256 "d98d2413f8795fc7a6147c15f24b3cab9823d21c268524aa28b66e343cdd05ba" - end - - resource "anaphora" do - url "https://beta.quicklisp.org/archive/anaphora/2019-10-07/anaphora-20191007-git.tgz" - sha256 "7b9e235272daef16340129909b21e678b05e5aa3215b0977ca927936606b8e47" - 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/2020-02-18/babel-20200218-git.tgz" - sha256 "d3ae4985e7d75473a443866654234770e2d709c2294b2dd421e6a2f39bb62a52" - end - - resource "bordeaux-threads" do - url "https://beta.quicklisp.org/archive/bordeaux-threads/2019-11-30/bordeaux-threads-v0.8.7.tgz" - sha256 "dcd02195af9161f4067995cf23d31cc9196326a20f541bad83de9a50d573c8aa" - end - - resource "cffi" do - url "https://beta.quicklisp.org/archive/cffi/2020-02-18/cffi_0.21.0.tgz" - sha256 "45f22eb261925fbe79a43ed73a29a89cca7691b4714551b6a536c053dde27331" - end - - resource "chipz" do - url "https://beta.quicklisp.org/archive/chipz/2019-02-02/chipz-20190202-git.tgz" - sha256 "aa58d80c12151f854b647b4d730ca29bba24c57f8954cb9ae777ee2968b568ee" - 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/2019-11-30/cl+ssl-20191130-git.tgz" - sha256 "43e86a3b3ff49c87435102f0653854620219863dcf900d2bc55a82d505526b1c" - end - - resource "cl-abnf" do - url "https://beta.quicklisp.org/archive/cl-abnf/2019-05-21/cl-abnf-20190521-git.tgz" - sha256 "449a492271397eb93b8263f32c99c002712c587e5001562f75b39569c85c13b5" - 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/2020-02-18/cl-containers-20200218-git.tgz" - sha256 "cdeaa7651313e84af739006717f81ba5b475d472d492f1eff3a32371d7101d39" - end - - resource "cl-csv" do - url "https://beta.quicklisp.org/archive/cl-csv/2018-08-31/cl-csv-20180831-git.tgz" - sha256 "cda57a231fade697de7531c433fcfbd6f03cc0b7854e706bacd0b051bfbdc233" - end - - resource "cl-db3" do - url "https://beta.quicklisp.org/archive/cl-db3/2020-02-18/cl-db3-20200218-git.tgz" - sha256 "4f3b47f37faddf70866aa6e4be234036eb64a32300c9670e4f66ad2f97b245f1" - end - - resource "cl-fad" do - url "https://beta.quicklisp.org/archive/cl-fad/2020-02-18/cl-fad-20200218-git.tgz" - sha256 "0173da3142d675bb5b2fb3374a08967aaea5d41c46b00bd8460fc6b448c58151" - end - - resource "cl-interpol" do - url "https://beta.quicklisp.org/archive/cl-interpol/2018-07-11/cl-interpol-20180711-git.tgz" - sha256 "196895b193f955488e51e2f69c2afca8adb9beeca0e2cdfc80c9a7c866a908e9" - 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/2019-12-27/cl-markdown-20191227-git.tgz" - sha256 "0d7187af7f42e8fb134d488e58050f865138d59c0aeeff5a2db825b5c1723b2d" - end - - resource "cl-mssql" do - url "https://beta.quicklisp.org/archive/cl-mssql/2019-08-13/cl-mssql-20190813-git.tgz" - sha256 "546ab74ea379d25f56ea32e9458daf3d83051131c6acc14a164bb9c48eb0e56c" - 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/2019-05-21/cl-ppcre-20190521-git.tgz" - sha256 "1d4b08ea962612ba92cec7c6f5bb0b8e82efddb91affa0007ada3a95dc66d25c" - end - - resource "cl-sqlite" do - url "https://beta.quicklisp.org/archive/cl-sqlite/2019-08-13/cl-sqlite-20190813-git.tgz" - sha256 "b3e68114ead48de09b6042806ef05e8bed7eb7086e0ce9f5afef9d78a050f41f" - end - - resource "cl-unicode" do - url "https://beta.quicklisp.org/archive/cl-unicode/2019-05-21/cl-unicode-20190521-git.tgz" - sha256 "ecd90df05f53cec0a33eb504b9d3af0356832ad84cc0ddb3d5dc0dbb70f6405c" - 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/2020-02-18/closer-mop-20200218-git.tgz" - sha256 "f3d6d885ab23a90c0a0152bb26bd4acef06a8559e74ff1b7f06fe8c226e513b0" - end - - resource "closure-common" do - url "https://beta.quicklisp.org/archive/closure-common/2018-10-18/closure-common-20181018-git.tgz" - sha256 "f6f60bdff5e6c2e41bbab98c44a3b4dedaa4f91047b9042ed330a9daad3c77a1" - end - - resource "command-line-arguments" do - url "https://beta.quicklisp.org/archive/command-line-arguments/2019-12-27/command-line-arguments-20191227-git.tgz" - sha256 "ee6905d4c75a67361ca0e399b632adec1916af3e97f174b77218c55685d886a0" - end - - resource "cxml" do - url "https://beta.quicklisp.org/archive/cxml/2018-10-18/cxml-20181018-git.tgz" - sha256 "b6e6391a1f1237c8cbbe6c540c40a3f510e9501fef010bbdcaba5ff70b76f6e8" - end - - resource "drakma" do - url "https://beta.quicklisp.org/archive/drakma/2019-11-30/drakma-v2.0.7.tgz" - sha256 "fc4f54a4b21632ded510a58b420b5a61e6772ce2f2abe53d11d89dae2d801ae4" - 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/2020-02-18/esrap-20200218-git.tgz" - sha256 "114f16c0266a317ddaa7d0e8e48acd6b91d6378d435e65694b34e7c6c4a2296a" - end - - resource "flexi-streams" do - url "https://beta.quicklisp.org/archive/flexi-streams/2019-01-07/flexi-streams-20190107-git.tgz" - sha256 "259a64ec4f19da7abf64296864a4019daf53c330d1dc9945cefb377df59e13bb" - 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 "global-vars" do - url "https://beta.quicklisp.org/archive/global-vars/2014-11-06/global-vars-20141106-git.tgz" - sha256 "f294843bb31144034e1370df1634dd74f24e617e3abb9c00c17927eda2ae4f2e" - 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/2020-02-18/ironclad-v0.48.tgz" - sha256 "3715a9358627667d29382c1d3ecd39688ec810c90e79dce343e321ca2bded6c3" - 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/2019-07-10/local-time-20190710-git.tgz" - sha256 "5396e34bdfe2b3ac5fcc070f52a1a62abb7161e3c464ef1bf64cacecc82bd4b8" - 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/2020-02-18/metabang-bind-20200218-git.tgz" - sha256 "1806db96b93b64450c7eb7665d606582c424a8fddf35caa14ad16cb4b5fbd255" - end - - resource "metatilities-base" do - url "https://beta.quicklisp.org/archive/metatilities-base/2019-12-27/metatilities-base-20191227-git.tgz" - sha256 "347215567615e2139965d8b0f8f72e3c47bb65e3837226a950dece7a6e2854d5" - end - - resource "named-readtables" do - url "https://beta.quicklisp.org/archive/named-readtables/2020-02-18/named-readtables-20200218-git.tgz" - sha256 "0f835698ee26ec0b736742da86362c0cdcdb5eae0f582181df07259c9b9c5ecf" - 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/2020-02-18/postmodern-20200218-git.tgz" - sha256 "375f1f1fcf048362ee0a1e42788dc32b9dfc664b255867100b5472aded0e6f13" - 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/2019-07-10/qmynd-20190710-git.tgz" - sha256 "e29f2d7edc55d0c262a3221d330daef38e5303851fb660ac0377804980e604c4" - end - - resource "quri" do - url "https://beta.quicklisp.org/archive/quri/2019-11-30/quri-20191130-git.tgz" - sha256 "7acd2b92a3de04ae7199e3914dbe195236044ab5820be117253c20465c0f4702" - end - - resource "salza2" do - url "https://beta.quicklisp.org/archive/salza2/2013-07-20/salza2-2.0.9.tgz" - sha256 "6aa36dc25fe2dfb411c03ad62edb39fcbf1d4ca8b45ba17a6ad20ebc9f9e10d4" - end - - resource "split-sequence" do - url "https://beta.quicklisp.org/archive/split-sequence/2019-05-21/split-sequence-v2.0.0.tgz" - sha256 "6aa973591b2ba75a07774638f4702cdf329c2aa668e3f7e9866a06fab9ae9525" - end - - resource "trivial-backtrace" do - url "https://beta.quicklisp.org/archive/trivial-backtrace/2019-07-10/trivial-backtrace-20190710-git.tgz" - sha256 "3dbda4c4a4e742649f6c0cffd2c5b9847f8192370f6770c47dbaf01167b1ff06" - end - - resource "trivial-features" do - url "https://beta.quicklisp.org/archive/trivial-features/2020-02-18/trivial-features-20200218-git.tgz" - sha256 "6800a2ac4987d21af4e2db06206e51912f8b766039c5d6e75f29ef6f262ac120" - end - - resource "trivial-garbage" do - url "https://beta.quicklisp.org/archive/trivial-garbage/2019-05-21/trivial-garbage-20190521-git.tgz" - sha256 "b439d4c011f9b0842c92a32c6cd44c611b94ebb623f0b5397ccfb195673e0b7a" - end - - resource "trivial-gray-streams" do - url "https://beta.quicklisp.org/archive/trivial-gray-streams/2018-10-18/trivial-gray-streams-20181018-git.tgz" - sha256 "3b921381df112515661c174fafa04adf11cf4620ebd7e2cc1d7bfd548fab2d28" - 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 "uiop" do - url "https://beta.quicklisp.org/archive/uiop/2020-02-18/uiop-3.3.4.tgz" - sha256 "5ba983536c94677b07cee5d7616dbad76a31edb3b371afe07f26f21d4bb90e58" - end - - resource "usocket" do - url "https://beta.quicklisp.org/archive/usocket/2019-12-27/usocket-0.8.3.tgz" - sha256 "a7d2d1cceea267da146310621c614dcf6226385f271efba946ba6299b238f4a5" - end - - resource "uuid" do - url "https://beta.quicklisp.org/archive/uuid/2018-08-31/uuid-20180831-git.tgz" - sha256 "3b48ac4db2174100ad45121be09f7245dfbe3897637989b103b2de06581512c2" - end - - resource "yason" do - url "https://beta.quicklisp.org/archive/yason/2019-12-27/yason-v0.7.8.tgz" - sha256 "c1193980a3588f163ecfd7810f221fbafa9fb8d1032e9ed5d5dd121e450ca585" - end - - resource "zs3" do - url "https://beta.quicklisp.org/archive/zs3/2019-10-07/zs3-1.3.3.tgz" - sha256 "d6b5e2958f68957269147a1047e9a4f619d6e18be98e68021e2c8ef208fbccb5" - end - - def install - resources.each do |resource| - resource.stage buildpath/"lib"/resource.name - end - - inreplace buildpath/"lib/cl+ssl/src/reload.lisp", "/usr/local/opt/openssl/lib/libcrypto.dylib", - Formula["openssl@1.1"].opt_lib/"libcrypto.dylib" - inreplace buildpath/"lib/cl+ssl/src/reload.lisp", "/usr/local/opt/openssl/lib/libssl.dylib", - Formula["openssl@1.1"].opt_lib/"libssl.dylib" - - 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| - 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 - - test do - return if ENV["CI"] - - # 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 00bba52422a6a..0000000000000 --- a/Formula/pgpdump.rb +++ /dev/null @@ -1,38 +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 "60bbe481621cc653edc834b9d54b910deb3c1634cc7155dd1e9aca9e3f207ca4" => :catalina - 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 384aa14915e3d..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 "https://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 9 - - bottle do - cellar :any - sha256 "3ed0aa0fd52518e2a8fd10cf856bdd4a892ad5165499df24b39935844fdb6855" => :catalina - sha256 "2422381ec9907e1b1045f3c358b9aafe1a2bc7f8f9849bbd4615d5ae0d63480b" => :mojave - sha256 "837e69addf8bf9a526fbaf1bfb204fb1a4966dec83295b3628568691d633b613" => :high_sierra - 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 -fallow-argument-mismatch" - 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 :catalina - sha256 "a7415fcbf87a371ceb7545b24946e198982aa8af29583506ff6ffaeb0730c92b" => :mojave - sha256 "d3a77fd114c9820e94ca5a16bfc450dffdc1960baaeeba7435eb03390d97f77b" => :high_sierra - 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 b75d6e2bd9e1b..0000000000000 --- a/Formula/pgroonga.rb +++ /dev/null @@ -1,45 +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.2.6.tar.gz" - sha256 "799bb56468d66e3e736759f1e19c0deb8368e07d354932f06979302309efd42a" - - bottle do - cellar :any - sha256 "9fd0decbb8035c8b86a85a9a18c69cc18ca80343aa79142437ebc085d2e92c0c" => :catalina - sha256 "9a7b21ee071a28ce41b2407509801cdf526a4752f84a14e4a5931eec18f32cd2" => :mojave - sha256 "83504f44a4635b8e70d1505b315895bed3a94d2925c968f42f481a23afb1ab10" => :high_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 - return if ENV["CI"] - - 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 50e97f555ce8a..0000000000000 --- a/Formula/pgrouting.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Pgrouting < Formula - desc "Provides geospatial routing for PostGIS/PostgreSQL database" - homepage "https://pgrouting.org/" - url "https://github.com/pgRouting/pgrouting/releases/download/v3.0.1/pgrouting-3.0.1.tar.gz" - sha256 "c68b680e533c7f1272a5970b47120c1ee0c380c87dc7765220b9b08376ca24ff" - head "https://github.com/pgRouting/pgrouting.git" - - bottle do - cellar :any_skip_relocation - sha256 "27162013c5ee71817df7b0dfd2719fa0d4feffa12562459f40be60ef6e9dc489" => :catalina - sha256 "07641049a211aa7b93fd12743b88e33fe2d1cd79c38bff5c66d56a5cd95ce90a" => :mojave - sha256 "8d108e351d1f25eff11f6436fee86065f20d9d5caefa31a2c2b12d65e4985203" => :high_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 - return if ENV["CI"] - - 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 7081ce4f51c87..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.include?("pgcompact - PostgreSQL bloat reducing tool") } - !matches.empty? - end -end diff --git a/Formula/pgtune.rb b/Formula/pgtune.rb deleted file mode 100644 index 6ea5977e76784..0000000000000 --- a/Formula/pgtune.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Pgtune < Formula - desc "Tuning wizard for postgresql.conf" - # Original web server flaky, let's leave it to the archive.org copy - homepage "https://web.archive.org/web/20190717075914/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" - 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" - - 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 7bfca29cc877e..0000000000000 --- a/Formula/pgweb.rb +++ /dev/null @@ -1,47 +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.6.tar.gz" - sha256 "8d692a1220a85884f231c3480e0da305678d86660e795a5eb510d076945adf65" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "0e114aa64f94b8e64b6b26e314a38443c42a793e7e3c6f246b9b7219d2c1c905" => :catalina - sha256 "8e2ff51513713949c869457d39c787ae7f5f13ba75abc11561914378e59fbb11" => :mojave - sha256 "43637e2a033c04ffc96dff95b355e2b99e0fdd263ff432498dceac9f305cc03d" => :high_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 - 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/phoon.rb b/Formula/phoon.rb deleted file mode 100644 index 454c1c0350117..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 "253431291e5159ccd84ff5b7e967656067db28a708703270b2d4eb6e90613cd7" => :catalina - sha256 "fc8ebcd250b06b5f4b387f7ff84c9935b10a0b2cd4515f2d1dfc993d64f528dc" => :mojave - sha256 "b02d96f879caf26f69d807a5f7e4ede911e3d8d954fa3ab943e27efe6da15814" => :high_sierra - sha256 "ef7e685f7a9894e894807a555c4a9d52dd947184c15986f0a5578a46d892e46a" => :sierra - sha256 "ae91a1dc089678416ddeab9bd3dfbe76f0fd9f4789a86b187740167d0658926d" => :el_capitan - sha256 "d6f259769364eab6cacb4e45301f0ab8cd6edab369da99b4ecfbef7927791adc" => :yosemite - sha256 "378c1f09dcffbd0a0fd79cbcbe9a988d8505fa9b657fc803e6c0e5bb62545047" => :mavericks - 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 990ee0cd5d6b6..0000000000000 --- a/Formula/phoronix-test-suite.rb +++ /dev/null @@ -1,27 +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/v9.6.1.tar.gz" - sha256 "088a8c4f4ab9e22bdd4a8bc2626c257233bd5d07b3ee34fc4c6fedd5bac61207" - license "GPL-3.0" - 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 - cd pkgshare - 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 df912b054519f..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.5.5/phpcs.phar" - sha256 "4a2f6aff1b1f760216bb00c0b3070431131e3ed91307436bb1bfb252281a804a" - - bottle :unneeded - - resource "phpcbf.phar" do - url "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.5.5/phpcbf.phar" - sha256 "6f64fe00dee53fa7b256f63656dc0154f5964666fc7e535fac86d0078e7dea41" - 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 f35ca41be4629..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.symfony.com/" - url "https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.4/php-cs-fixer.phar" - sha256 "286faddc6b4b21734adbee732d663b2e87779466a2c5b39096d020d6afdf2d17" - license "MIT" - - 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 6f8347aa1da6b..0000000000000 --- a/Formula/php.rb +++ /dev/null @@ -1,478 +0,0 @@ -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-7.4.7.tar.xz" - mirror "https://fossies.org/linux/www/php-7.4.7.tar.xz" - sha256 "53558f8f24cd8ab6fa0ea252ca8198e2650160649681ce5230c1df1dc2b52faf" - - bottle do - rebuild 1 - sha256 "b71beb1e3270aa038da084e4c49cd2dc79a1f0e9e10e45eb0a0279874fc3c956" => :catalina - sha256 "f0a7264d9be901f47af300b75c914d4958898e5ca281c52e01a1065f8ee7ecac" => :mojave - sha256 "f5c18b09a7980926478503134ec200399fc65b290427130d52f7d680da66105c" => :high_sierra - end - - head do - url "https://github.com/php/php-src.git" - - 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 "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 "libffi" - depends_on "libpng" - depends_on "libpq" - depends_on "libsodium" - depends_on "libzip" - depends_on "oniguruma" - depends_on "openldap" - depends_on "openssl@1.1" - depends_on "sqlite" - depends_on "tidy-html5" - depends_on "unixodbc" - depends_on "webp" - - uses_from_macos "xz" => :build - uses_from_macos "bzip2" - uses_from_macos "krb5" - uses_from_macos "libedit" - uses_from_macos "libxml2" - uses_from_macos "libxslt" - uses_from_macos "zlib" - - # PHP build system incorrectly links system libraries - # see https://github.com/php/php-src/pull/3472 - patch :DATA - - def install - # Ensure that libxml2 will be detected correctly in older MacOS - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :el_capitan || MacOS.version == :sierra - - # 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 ''" - 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/#{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" - - # system pkg-config missing - ENV["KERBEROS_CFLAGS"] = " " - ENV["KERBEROS_LIBS"] = "-lkrb5" - ENV["SASL_CFLAGS"] = "-I#{MacOS.sdk_path_if_needed}/usr/include/sasl" - ENV["SASL_LIBS"] = "-lsasl2" - ENV["EDIT_CFLAGS"] = " " - ENV["EDIT_LIBS"] = "-ledit" - - # 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 - --with-os-sdkpath=#{MacOS.sdk_path_if_needed} - --enable-bcmath - --enable-calendar - --enable-dba - --enable-dtrace - --enable-exif - --enable-ftp - --enable-fpm - --enable-gd - --enable-intl - --enable-mbregex - --enable-mbstring - --enable-mysqlnd - --enable-pcntl - --enable-phpdbg - --enable-phpdbg-readline - --enable-phpdbg-webhelper - --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-ffi - --with-fpm-user=_www - --with-fpm-group=_www - --with-freetype - --with-gettext=#{Formula["gettext"].opt_prefix} - --with-gmp=#{Formula["gmp"].opt_prefix} - --with-iconv#{headers_path} - --with-jpeg - --with-kerberos - --with-layout=GNU - --with-ldap=#{Formula["openldap"].opt_prefix} - --with-ldap-sasl - --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-webp - --with-xmlrpc - --with-xsl - --with-zip - --with-zlib - ] - - 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" - inreplace "php.ini-development", %r{; ?extension_dir = "\./"}, - "extension_dir = \"#{HOMEBREW_PREFIX}/lib/php/pecl/#{orig_ext_dir}\"" - - # Use OpenSSL cert bundle - openssl = Formula["openssl@1.1"] - inreplace "php.ini-development", /; ?openssl\.cafile=/, - "openssl.cafile = \"#{openssl.pkgetc}/cert.pem\"" - inreplace "php.ini-development", /; ?openssl\.capath=/, - "openssl.capath = \"#{openssl.pkgetc}/certs\"" - - 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.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/#{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 /(? - 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 - port = free_port - port_fpm = free_port - - 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/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/php@7.2.rb b/Formula/php@7.2.rb deleted file mode 100644 index 849b2ceb74a51..0000000000000 --- a/Formula/php@7.2.rb +++ /dev/null @@ -1,487 +0,0 @@ -class PhpAT72 < 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-7.2.31.tar.xz" - mirror "https://fossies.org/linux/www/php-7.2.31.tar.xz" - sha256 "8beaa634bb878a96af9bc8643811ea46973f5f41ad2bfb6ab4cfd290e5a39806" - revision 1 - - bottle do - sha256 "88e7932c8403e83c4b7ce1a5a5a704e2b45d0618f79ab568b0e92dc795b896d4" => :catalina - sha256 "2d601cec4b57cefa451e9bd4892df9c8f406de09c1aaafbf7d3a9a88ab540e67" => :mojave - sha256 "d1383e513d27510e4e8974460756cbef14a59c1fcbcd35c9dbeb6624689ea22f" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! :date => "2020-11-30" - - 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@1.1" - depends_on "sqlite" - depends_on "tidy-html5" - depends_on "unixodbc" - depends_on "webp" - - uses_from_macos "bzip2" - uses_from_macos "libxml2" - uses_from_macos "libxslt" - uses_from_macos "zlib" - - # PHP build system incorrectly links system libraries - # see https://github.com/php/php-src/pull/3472 - patch :DATA - - def install - # Ensure that libxml2 will be detected correctly in older MacOS - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :el_capitan || MacOS.version == :sierra - - # 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-readline - --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@1.1"].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.safe_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}\"" - - # Use OpenSSL cert bundle - openssl = Formula["openssl@1.1"] - inreplace "php.ini-development", /; ?openssl\.cafile=/, - "openssl.cafile = \"#{openssl.pkgetc}/cert.pem\"" - inreplace "php.ini-development", /; ?openssl\.capath=/, - "openssl.capath = \"#{openssl.pkgetc}/certs\"" - - 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.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@#{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 /(? - 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 - port = free_port - port_fpm = free_port - - 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.3.rb b/Formula/php@7.3.rb deleted file mode 100644 index 15bc07b04df7f..0000000000000 --- a/Formula/php@7.3.rb +++ /dev/null @@ -1,492 +0,0 @@ -class PhpAT73 < 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-7.3.19.tar.xz" - mirror "https://fossies.org/linux/www/php-7.3.19.tar.xz" - sha256 "6402faa19b1a8c4317c7612632bce985684a5bbae0980a5779a4019439882422" - - bottle do - rebuild 1 - sha256 "e7c2001ba13a28648af8402f768b152fab540b4225c2853f4c2be2ecc65980ab" => :catalina - sha256 "590f40c25fd1cd4153e7fec7763573263eb46f99cb98671e77e48f873a88e7f6" => :mojave - sha256 "8c70e4a66af0f6a9216389d221a18805337ab931283ec6c4a9c77d32bdded175" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! :date => "2021-12-06" - - 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@1.1" - depends_on "sqlite" - depends_on "tidy-html5" - depends_on "unixodbc" - depends_on "webp" - - uses_from_macos "bzip2" - uses_from_macos "libxml2" - uses_from_macos "libxslt" - uses_from_macos "zlib" - - # PHP build system incorrectly links system libraries - # see https://github.com/php/php-src/pull/3472 - patch :DATA - - def install - # Ensure that libxml2 will be detected correctly in older MacOS - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :el_capitan || MacOS.version == :sierra - - # 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-readline - --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@1.1"].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.safe_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}\"" - - # Use OpenSSL cert bundle - openssl = Formula["openssl@1.1"] - inreplace "php.ini-development", /; ?openssl\.cafile=/, - "openssl.cafile = \"#{openssl.pkgetc}/cert.pem\"" - inreplace "php.ini-development", /; ?openssl\.capath=/, - "openssl.capath = \"#{openssl.pkgetc}/certs\"" - - # php 7.3 known bug - # SO discussion: https://stackoverflow.com/a/53709484/791609 - # bug report: https://bugs.php.net/bug.php?id=77260 - inreplace "php.ini-development", ";pcre.jit=1", "pcre.jit=0" - - 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.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@#{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 /(? - 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 - port = free_port - port_fpm = free_port - - 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 64de7cab8c0cb..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-4.2.0_20200308.tar.gz" - version "4.2.0-20200308" - sha256 "a0d0a726dc2662c1bc6fae95c904430b0c68d0b4e4e19c38777da38c2823a094" - - 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: 6 errors, 0 warnings.", output - end -end diff --git a/Formula/phpmd.rb b/Formula/phpmd.rb deleted file mode 100644 index a9867d19025ce..0000000000000 --- a/Formula/phpmd.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Phpmd < Formula - desc "PHP Mess Detector" - homepage "https://phpmd.org/" - url "https://github.com/phpmd/phpmd/releases/download/2.8.2/phpmd.phar" - sha256 "0b531cbbc18a26115eede06077d5670e1f4fd0a8545d7fe547adf068fb7f18c5" - license "BSD-3-Clause" - - bottle :unneeded - - def install - bin.install "phpmd.phar" => "phpmd" - end - - test do - (testpath/"src/HelloWorld/Greetings.php").write <<~EOS - :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/phpstan.rb b/Formula/phpstan.rb deleted file mode 100644 index 157d3de2913cd..0000000000000 --- a/Formula/phpstan.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Phpstan < Formula - desc "PHP Static Analysis Tool" - homepage "https://github.com/phpstan/phpstan" - url "https://github.com/phpstan/phpstan/releases/download/0.12.32/phpstan.phar" - sha256 "f307bf5717522a55c7c91441767e64a1c34d8305ae31b2174792132825f46769" - license "MIT" - - bottle :unneeded - - depends_on "php" => :test - - def install - bin.install "phpstan.phar" => "phpstan" - end - - test do - (testpath/"src/autoload.php").write <<~EOS - '/Email.php' - ); - } - $cn = strtolower($class); - if (isset($classes[$cn])) { - require __DIR__ . $classes[$cn]; - } - }, - true, - false - ); - EOS - - (testpath/"src/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 - 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/physfs.rb b/Formula/physfs.rb deleted file mode 100644 index 3e5636a9a6cab..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.2.tar.bz2" - sha256 "304df76206d633df5360e738b138c94e82ccf086e50ba84f456d3f8432f9f863" - head "https://hg.icculus.org/icculus/physfs/", :using => :hg - - bottle do - cellar :any - sha256 "31693a34c610ea382a1b0832065db2b223db549ced6fe6a2f8c569d6b58bf19a" => :catalina - sha256 "cb97a3a17728f3173d4c19fde495cffbddce965bbf6015e45882e3c27f267cf3" => :mojave - sha256 "296927566472c976a578f89c4bd6bf0f518427a53d586499a8e202896d469ee3" => :high_sierra - sha256 "6742501c33943dcdab748b3c2188cf6292f462b82896da001cdbcfbbcc01e489" => :sierra - 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 68c4a82262ebd..0000000000000 --- a/Formula/pianobar.rb +++ /dev/null @@ -1,44 +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-2020.04.05.tar.bz2" - sha256 "6c173b6b29ccc1f432e0013fb425e8f9cb4261539b58d344e0b2274963726480" - revision 3 - head "https://github.com/PromyLOPh/pianobar.git" - - bottle do - cellar :any - sha256 "110b9a11046cc7948262816411c4ea7c8674ec058593e9a1af4346566fb804a2" => :catalina - sha256 "be9f0156fdb9b50bf22186072d93dba7cf7789888a7ddfaeb51a7f6820099262" => :mojave - sha256 "1982754d59d3f1e01bf1ec265690634ea2578f354e52aa7670292b7d2703126a" => :high_sierra - end - - depends_on "pkg-config" => :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 - 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/pianod.rb b/Formula/pianod.rb deleted file mode 100644 index b664d3332f3f9..0000000000000 --- a/Formula/pianod.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Pianod < Formula - desc "Pandora client with multiple control interfaces" - homepage "https://deviousfish.com/pianod/" - url "https://deviousfish.com/Downloads/pianod2/Devel/pianod2-301.tar.gz" - sha256 "d6fa01d786af65fe3b4e6f4f97fa048db6619b9443e23f655d3ea8ab4766caee" - revision 1 - - bottle do - sha256 "891923360d9e05cc168e08373c41855f4700d84f9549ce6d86de2f7176a96992" => :catalina - sha256 "8d1b17ccc15dc42000b73a5f054791f3ec98c48b47df731f5343e35199406ea9" => :mojave - sha256 "37348131ed49c0cb261bb85f41b710fc791ca6aa423534063c3acb23596bfa27" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "json-c" - depends_on "libao" - depends_on "libgcrypt" - - def install - ENV["OBJCXXFLAGS"] = "-std=c++11" - 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 bca763a6c3d44..0000000000000 --- a/Formula/picard-tools.rb +++ /dev/null @@ -1,29 +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.23.1/picard.jar" - sha256 "b3aeabd152e8a24c913e9d994fda8f05277c6bd4f60061577e3220207a1a85bc" - license "MIT" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "picard.jar" - (bin/"picard").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" $JAVA_OPTS -jar "#{libexec}/picard.jar" "$@" - EOS - 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 d1d6a72cbbcd6..0000000000000 --- a/Formula/picat.rb +++ /dev/null @@ -1,27 +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/picat28_6_src.tar.gz" - version "2.8#6" - sha256 "9366a2b42123645dab4617d849fb456bdaa24a0931e13071c3574bb1332cf29c" - - bottle do - cellar :any_skip_relocation - sha256 "f42825e8a240e0dfccbf1bac492a60762acdee285ad51b164965d2b056296212" => :catalina - sha256 "7b8672d8377c157f4bda1121ba06c5b4dbdc0c7bd4625f4d44440a88999d2168" => :mojave - sha256 "e9ade38737cb631d139939e92033462caa728e9e9244ec99f4e36182349f6aa5" => :high_sierra - end - - def install - system "make", "-C", "emu", "-f", "Makefile.mac64" - 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/pick.rb b/Formula/pick.rb deleted file mode 100644 index cad1884beca46..0000000000000 --- a/Formula/pick.rb +++ /dev/null @@ -1,34 +0,0 @@ -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" - head "https://github.com/mptre/pick.git" - - bottle do - cellar :any_skip_relocation - sha256 "754879e53b48743051bb1571bb4b6180a415ac36af8deaf335f5c193326d232f" => :catalina - sha256 "55596e8ab28fd4fc36d064f6395c38ce51314bcc0d2f2f3862515a683bc92182" => :mojave - sha256 "0fc521881c760d4f9e4f8625795716e0e1c0e1ed1522ccb5efd055313b2729bc" => :high_sierra - end - - uses_from_macos "ncurses" - - 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" - assert_match /foo\r\nbar\r\nbaz\r\n\^D.*foo\r\n\z/, r.read - end - end -end diff --git a/Formula/picoc.rb b/Formula/picoc.rb deleted file mode 100644 index c9083a69387e1..0000000000000 --- a/Formula/picoc.rb +++ /dev/null @@ -1,46 +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 "c3c7b26693b0fc4860ce21bafc778ed705e53b4fe85425d7a869b5cc57ff9d38" => :catalina - 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 c699536561f56..0000000000000 --- a/Formula/picocom.rb +++ /dev/null @@ -1,26 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "87d54fb026172496e7d2c370e9935e53ece5069351ba3bffc8062b4935ecedc3" => :catalina - 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 6a3739dadbdc2..0000000000000 --- a/Formula/pict.rb +++ /dev/null @@ -1,31 +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 "0310bc54de6de7c0901d59c6177129b4d1b989e839eb7ced09b01f41398b8355" => :catalina - 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 b4d9783309e15..0000000000000 --- a/Formula/pidcat.rb +++ /dev/null @@ -1,20 +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" - license "Apache-2.0" - 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 c73a2ed54fb5a..0000000000000 --- a/Formula/pidgin.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Pidgin < Formula - desc "Multi-protocol chat client" - homepage "https://pidgin.im/" - url "https://downloads.sourceforge.net/project/pidgin/Pidgin/2.14.1/pidgin-2.14.1.tar.bz2" - sha256 "f132e18d551117d9e46acce29ba4f40892a86746c366999166a3862b51060780" - - bottle do - sha256 "4634da7bc606d00dcdc9e3ea42f00d33a9764d6d231b6a7baef0c7a3ef451e74" => :catalina - sha256 "a549ae59ccff2482dd02c9eea51db80fb831ab7e720f7f2ec7df37c60eb7f1d8" => :mojave - sha256 "99708561a57b3e47d603b8b46b9f3a7dd8fc7f6bb08746ce996130c10ef13784" => :high_sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "gettext" - depends_on "gnutls" - depends_on "gtk+" - depends_on "libgcrypt" - depends_on "libgnt" - 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 - ] - - ENV["ac_cv_func_perl_run"] = "yes" if MacOS.version == :high_sierra - - # 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 - 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 defa9ecce5621..0000000000000 --- a/Formula/pidof.rb +++ /dev/null @@ -1,49 +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 "634f42559aaa0582a6700c268737ba7cb7ec3bdadf2f3aa37c5a846604759459" => :catalina - sha256 "1a88c923954c4511fb64fe6cbfb27f5248c39d1676053c671ab71c652a377a2f" => :mojave - sha256 "fd5f89cf3a9685142e08a23980d9438e961096d74ee508a96ccbaecb55da6e1a" => :high_sierra - sha256 "6991d110a73724959f84edc398647e3cac5a029645daedef5f263ae51218130d" => :sierra - sha256 "d02c826db5564d7750c0e309a771b164f7764250507955d0b87d09837c3c2ba6" => :el_capitan - sha256 "54ffe0be6ef278aa45cacb856687df925bab1c117d1ab4c1a8f81ae835fb293e" => :mavericks - 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 4fc6c66b89a36..0000000000000 --- a/Formula/pig.rb +++ /dev/null @@ -1,28 +0,0 @@ -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" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - 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", - :PIG_HOME => libexec, - :JAVA_HOME => Formula["openjdk"].opt_prefix - 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 775f0f67bbc86..0000000000000 --- a/Formula/pigz.rb +++ /dev/null @@ -1,41 +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 "f9d47b369bad1ec3571d06fb40a1ad926e14360a13ec6e1fc16a6be8a81b7ed7" => :catalina - sha256 "341c5f3c0a82aedd822b2dd187ecc12b3dbdea9b2f00b08ce7ba049916557314" => :mojave - sha256 "216e716eafd2786ed6fa672daf27bb77b420e05f92a14cfeccab28a6be6b7778" => :high_sierra - sha256 "9173b4bdf36c787ad7a3b7d738236e0393430b607ba44d5a32fa387b008a347a" => :sierra - sha256 "d0c4ec5ac96ab0262d5e67bd5df5432d7dc40ac1404341962c02835ca8451b5c" => :el_capitan - end - - uses_from_macos "zlib" - - 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.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/pike.rb b/Formula/pike.rb deleted file mode 100644 index d56ec4eb38c0b..0000000000000 --- a/Formula/pike.rb +++ /dev/null @@ -1,50 +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" - revision 1 - - bottle do - cellar :any - sha256 "ae20ba3c7fd69c026892555798559bd2da90d53dc3cf07eb5d7423af505082d5" => :catalina - sha256 "ff1e2f11d0beec51cc41d9eb566a80cbf53b51933158c6083054e3b91dfa251c" => :mojave - sha256 "10eb373d72d3c178dc1f560a7e1c35f8b6dc51412d7eb4f4cf4f751109d4fd9d" => :high_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 3cc17171355d9..0000000000000 --- a/Formula/piknik.rb +++ /dev/null @@ -1,90 +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" - license "BSD-2-Clause" - head "https://github.com/jedisct1/piknik.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "4c8bce52891ea6547f5644108b72300405c27e84e539fde0fa60c25e69db7a8e" => :catalina - 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 - 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/pillar.rb b/Formula/pillar.rb deleted file mode 100644 index f3a2038490f24..0000000000000 --- a/Formula/pillar.rb +++ /dev/null @@ -1,38 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "7f179f5550fbff69f3b7357d1a4edc15dfc7b16a76a9e7dd23df7f3ae4031593" => :catalina - 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 327b6e11997f5..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.4.0.tar.gz" - sha256 "9b6524049e4e927179a5a1122129e68c66712752a12ebd3dedf9010188ae73a5" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "1480f6130114fb66f695ea0c0a64b1f882339d057b6e40c6c50f996249a5190f" => :catalina - sha256 "b07bcd3693cdc789a45fdce1b3257b3ca85b018eb65f1cbb45234d41ff935902" => :mojave - sha256 "245160b3bc6e7e6a4b27d3081580c0616e8004ea1b9420367801c2193417caea" => :high_sierra - sha256 "6b9489e424aca469bafc5e7c7ec20470009c713ce1a843efc7ee6b884fb216da" => :sierra - end - - 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 - 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 diff --git a/Formula/pinboard-notes-backup.rb b/Formula/pinboard-notes-backup.rb deleted file mode 100644 index 00391d44d6436..0000000000000 --- a/Formula/pinboard-notes-backup.rb +++ /dev/null @@ -1,31 +0,0 @@ -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/v1.0.5.tar.gz" - sha256 "eb4409edd52745cac16a68faf51f6a86178db1432b3b848e6fb195fd7528e7da" - license "GPL-3.0" - head "https://github.com/bdesham/pinboard-notes-backup.git" - - bottle do - cellar :any_skip_relocation - sha256 "1735309c67f5ff12f212c8f780fe0cfb3d0409c53ce9376ee265597ceb517693" => :catalina - sha256 "244865afa3cd3d89f059dd4e6a162de07ce8d404c9ea2c05dc92ef17869c75e8" => :mojave - sha256 "cddc7122a3aa1aec17c18d2e50f471a154db42006684b7ba8d5fb4b2cfd5842f" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.6" => :build - - 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/pinentry-mac.rb b/Formula/pinentry-mac.rb deleted file mode 100644 index ee2fb73459733..0000000000000 --- a/Formula/pinentry-mac.rb +++ /dev/null @@ -1,45 +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 "936dba5c3bdd8279e5380012645a349a6ef8c69d1cc9066f28f9c6fa6642fd64" => :catalina - sha256 "6b2e8f260b2c9d2d7cd3f39516d7794656492cf7726a92a847aa86ba02d83179" => :mojave - sha256 "aa7a00ec594541e43a74cf7ae16cb05317d5b73c7b6b6647ca349584280eaad7" => :high_sierra - sha256 "3da6a88abbd4bb04eb2455d8e6998f4fc4db77c3f765d52b7eadf364e82aeaa7" => :sierra - sha256 "c3d508c96256c50b6a62f9e64fc4cb28810a910927c21f7defbe8af11a3c5961" => :el_capitan - sha256 "b96a51a263a9447101d4bb8dc4247f324531bd4fd96218f6e170edfc983a87f7" => :yosemite - sha256 "c2538b57edce2eb7ccc10a32e16ccfbbbe8e61c384c4db8d5a62b04d3815c0ed" => :mavericks - 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 2cde603cbf039..0000000000000 --- a/Formula/pinentry.rb +++ /dev/null @@ -1,44 +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 "58dbcd3dc641fe0e14829d2d72be6bc5cadc9a5c26bf50678906866101d2589a" => :catalina - 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" - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --disable-pinentry-fltk - --disable-pinentry-gnome3 - --disable-pinentry-gtk2 - --disable-pinentry-qt - --disable-pinentry-qt5 - --disable-pinentry-tqt - --enable-pinentry-tty - ] - - 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 8007b4c4293aa..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://github.com/baszoetekouw/pinfo/archive/v0.6.13.tar.gz" - sha256 "9dc5e848a7a86cb665a885bc5f0fdf6d09ad60e814d75e78019ae3accb42c217" - license "GPL-2.0" - revision 1 - - bottle do - sha256 "a41b568910292b2119d0f63f53d5015d781b03576a58f08d397535560d407bf5" => :catalina - sha256 "b81b1202add75d938802681618f5bf95dd245e03ff80f5f0ca67a5ba8b7bfb84" => :mojave - sha256 "84edf6ec00f570004abc6f3d0335196b513a4a52e589919ca1e70c35b31525cc" => :high_sierra - sha256 "9b8e3d359081d68626f86cab8b048926b6471f8ca1be8e47ca8625e22da5021f" => :sierra - 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 b94974f732355..0000000000000 --- a/Formula/pioneer.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Pioneer < Formula - desc "Game of lonely space adventure" - homepage "https://pioneerspacesim.net/" - url "https://github.com/pioneerspacesim/pioneer/archive/20200203.tar.gz" - sha256 "3055d63c1bd3377c3794eee830a8adbd650b178bad9e927531e38cb5d5838694" - head "https://github.com/pioneerspacesim/pioneer.git" - - bottle do - sha256 "d6ef58a82bd5d0030f28db39103882a4da8416ba3b1dae5d3e98d09e2d06c5c6" => :catalina - sha256 "837ce3dc518de05e3c50597252acf888b55ee341777f765bd4b1d88faf53592d" => :mojave - sha256 "2d2d2aaeff7ec2231f7908504d4750f9fc2e60fd4d68f059d20808cea36370d7" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :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" - - def install - ENV.cxx11 - - # Set PROJECT_VERSION to be the date of release, not the build date - inreplace "CMakeLists.txt", "string(TIMESTAMP PROJECT_VERSION \"\%Y\%m\%d\")", "set(PROJECT_VERSION #{version})" - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - assert_match "#{name} #{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/pioneers.rb b/Formula/pioneers.rb deleted file mode 100644 index 444b0d678e21b..0000000000000 --- a/Formula/pioneers.rb +++ /dev/null @@ -1,45 +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" - revision 1 - - bottle do - sha256 "6b991f3c68a368a205f15742f65273ab9aef56d06a5918a05a7312513f8c7dbf" => :catalina - sha256 "6dc8e606ea4f6264f662d0516cb67bbf04f661adab74406f34d4b908faf1c91a" => :mojave - sha256 "a7e66d500a9a0787038c1449da19471f451e350d35a1a4035e84144820c2c8df" => :high_sierra - sha256 "b58b5deb27c32495b244527947330028e1d69b1000b6453727dab16ff7572b09" => :sierra - 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 - - 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 4a1aae7960f90..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 => "f5a7216a5620c3da5ae1d4a2c6ce9b64009b31c2" - version "20190723" - 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 f9817f6f2c723..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://deb.debian.org/debian/pool/main/p/pipebench/pipebench_0.40.orig.tar.gz" - sha256 "ca764003446222ad9dbd33bbc7d94cdb96fa72608705299b6cc8734cd3562211" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a7a63d8cdd084919304019c06290b7b808f637071c30f688219b47e2cc49f469" => :catalina - sha256 "7489b10153744c61c74be048fb8c5d0acb4abae2f03437a0a633a312253c3345" => :mojave - sha256 "9ece6aaf7dcf0e1dbdbba28979ffbb6384f1d69aee8d194db2e009994c655cf2" => :high_sierra - sha256 "213e31962005a876277c6f8edd3c9cd8964c253496f7945d48aef7338c76277e" => :sierra - sha256 "353cabdaf04a41e2169c1e489cd038f9fbe7f33cfd24a5a0b3068449ccc3446d" => :el_capitan - sha256 "a999c7ba2978e60d38bdeec63d1f1a8b2667cb0d77d35c4da2e57212a37b85ac" => :yosemite - sha256 "c5b0805588d8a8d9047d30b9330dd0be0215bfe694ed662cf11fa84595bba85c" => :mavericks - 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 5a52cb4fe9315..0000000000000 --- a/Formula/pipemeter.rb +++ /dev/null @@ -1,35 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "fe84476d7d258a2e5f02df94a90e59faafdcc8ed4b1277c6a4347c1de85114f7" => :catalina - sha256 "2e8cc64e9e25c27c2c18680f22f59b68962740d04f6f80c9406ca915747ae990" => :mojave - sha256 "977077866b51a7c0620fe036431ea207b72d38bc383422d682dbfde40a90d6a6" => :high_sierra - sha256 "19c2d3933e5d0ac8e80559ae77ea09ad83bb8746ebf313d4cdd8a30374eadaa3" => :sierra - sha256 "bf99d50927a1277c1a481af0eea25314dfbd1449dbd1394368f7a933da367e9a" => :el_capitan - sha256 "cee0b494c5f7647d0c597e90dbc8be2c7b759d53a12cd87f89f9620b9260c3ac" => :yosemite - sha256 "a1bd1a5466eb44aeeba7ab2563f3bd34978d248deec50964624f985f066fe2bf" => :mavericks - 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 ce863f05810f5..0000000000000 --- a/Formula/pipenv.rb +++ /dev/null @@ -1,104 +0,0 @@ -class Pipenv < Formula - include Language::Python::Virtualenv - - desc "Python dependency management tool" - homepage "https://pipenv.pypa.io/" - url "https://files.pythonhosted.org/packages/2f/e2/434a35cde4ebcb4588e452ea6a59634098f521eb996874f3fe8411dea839/pipenv-2020.6.2.tar.gz" - sha256 "7dd49a7345fa5da7843907bab42a996dece474e45dd309dbd7619739dc60478b" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "12257ab59085420c2ad08dbe12236d9393d814ed387e8ab8f6e7acb730635321" => :catalina - sha256 "82bd72857a8cebceca3f6ea44140d7391ac1d94c84406c6a5ea51e5e87b88a66" => :mojave - sha256 "792be77485b744b5891613c4bf02b6d5544ff1da65b6a02b7c3c59c540e007b5" => :high_sierra - end - - depends_on "python@3.8" - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" - sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - end - - resource "distlib" do - url "https://files.pythonhosted.org/packages/7d/29/694a3a4d7c0e1aef76092e9167fbe372e0f7da055f5dcf4e1313ec21d96a/distlib-0.3.0.zip" - sha256 "2e166e231a26b36d6dfe35a48c4464346620f8645ed0ace01ee31822b288de21" - end - - resource "filelock" do - url "https://files.pythonhosted.org/packages/14/ec/6ee2168387ce0154632f856d5cc5592328e9cf93127c5c9aeca92c8c16cb/filelock-3.0.12.tar.gz" - sha256 "18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/55/67/beb3ecfa973181a52fad76fc959b745631b258c5387348ae1e06c8ca7a81/virtualenv-20.0.21.tar.gz" - sha256 "a116629d4e7f4d03433b8afa27f43deba09d48bc48f5ecefa4f015a178efb6cf" - end - - resource "virtualenv-clone" do - url "https://files.pythonhosted.org/packages/1d/51/076f3a72af6c874e560be8a6145d6ea5be70387f21e65d42ddd771cbd93a/virtualenv-clone-0.5.4.tar.gz" - sha256 "665e48dd54c84b98b71a657acb49104c54e7652bce9c1c4f6c6976ed4c827a29" - 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` 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/pip", libexec/"bin/virtualenv" - env = { - :PATH => "#{libexec}/tools:$PATH", - } - (bin/"pipenv").write_env_script(libexec/"bin/pipenv", env) - - output = Utils.safe_popen_read( - { "PIPENV_SHELL" => "bash" }, libexec/"bin/pipenv", "--completion", { :err => :err } - ) - (bash_completion/"pipenv").write output - - output = Utils.safe_popen_read( - { "PIPENV_SHELL" => "zsh" }, libexec/"bin/pipenv", "--completion", { :err => :err } - ) - (zsh_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 - 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 2ada4d47c6a75..0000000000000 --- a/Formula/pipes-sh.rb +++ /dev/null @@ -1,27 +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" - license "MIT" - head "https://github.com/pipeseroni/pipes.sh.git" - - bottle do - cellar :any_skip_relocation - sha256 "68d379998c00ca3662db8047c1c6e649491d65d851af264e04ce7cbdb7cbd2e2" => :catalina - 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/pipx.rb b/Formula/pipx.rb deleted file mode 100644 index 370e7d16398f7..0000000000000 --- a/Formula/pipx.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Pipx < Formula - desc "Execute binaries from Python packages in isolated environments" - homepage "https://github.com/pipxproject/pipx" - url "https://files.pythonhosted.org/packages/c3/9e/5d93d784225a36c36d8be09144eea0a73f9f85385dfa02881c51644495be/pipx-0.15.4.0.tar.gz" - sha256 "b90285a1c6eddf45ba4e48110b81d7c1e285b127e82fa99a61168937f98e5cb5" - head "https://github.com/pipxproject/pipx.git" - - bottle do - cellar :any_skip_relocation - sha256 "9d3b8ecd4650b1877c489951f774c1a5eedcb289497cbf9d8b3102d1d71322c6" => :catalina - sha256 "9d3b8ecd4650b1877c489951f774c1a5eedcb289497cbf9d8b3102d1d71322c6" => :mojave - sha256 "9d3b8ecd4650b1877c489951f774c1a5eedcb289497cbf9d8b3102d1d71322c6" => :high_sierra - end - - depends_on "python@3.8" - - resource "argcomplete" do - url "https://files.pythonhosted.org/packages/43/61/345856864a72ccc004bea5f74183c58bfd6675f9eab931ff9ce21a8fe06b/argcomplete-1.11.1.tar.gz" - sha256 "5ae7b601be17bf38a749ec06aa07fb04e7b6b5fc17906948dc1866e7facf3740" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" - sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" - end - - resource "userpath" do - url "https://files.pythonhosted.org/packages/09/3a/e8b02ae27ce44a3773a5d7a7fd52c78531ade5c902123694e86a1fa0e909/userpath-1.4.0.tar.gz" - sha256 "8f555126f137c08c576f73e6a9d7089ee394e9ba00a53a75c37f05439ca3cf51" - end - - def install - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - - resources.each do |r| - r.stage do - system "python3", *Language::Python.setup_install_args(libexec) - end - end - - system "python3", *Language::Python.setup_install_args(libexec) - (bin/"pipx").write_env_script(libexec/"bin/pipx", :PYTHONPATH => ENV["PYTHONPATH"]) - (bin/"register-python-argcomplete").write_env_script(libexec/"bin/register-python-argcomplete", - :PYTHONPATH => ENV["PYTHONPATH"]) - end - - test do - assert_match "PIPX_HOME", shell_output("#{bin}/pipx --help") - system "#{bin}/pipx", "install", "csvkit" - assert_true FileTest.exist?("#{testpath}/.local/bin/csvjoin") - system "#{bin}/pipx", "uninstall", "csvkit" - assert_no_match Regexp.new("csvjoin"), shell_output("#{bin}/pipx list") - end -end diff --git a/Formula/pit.rb b/Formula/pit.rb deleted file mode 100644 index 7aea7e783fed5..0000000000000 --- a/Formula/pit.rb +++ /dev/null @@ -1,52 +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 "3ff5098a860de65a101fafe58d9ef76ac4c392f0b127720ecb34f0141554c27d" => :catalina - 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 de66878a9f94f..0000000000000 --- a/Formula/pius.rb +++ /dev/null @@ -1,38 +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/v3.0.0.tar.gz" - sha256 "3454ade5540687caf6d8b271dd18eb773a57ab4f5503fc71b4769cc3c5f2b572" - revision 1 - head "https://github.com/jaymzh/pius.git" - - bottle do - cellar :any_skip_relocation - sha256 "e94572eadd5e0adeda1fb16cb05f44afd486b9ba3667c0139ec5588e7f947775" => :catalina - sha256 "499e1c8b31c8c1930cc8b6a7d187854302890ba51585fdba92515f0f014069ff" => :mojave - sha256 "d0b7237e06c967976ff74ccdf110afe9712cda1b2e0dd870f43599eb337d2eb9" => :high_sierra - end - - depends_on "gnupg" - depends_on "python@3.8" - - 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 d0818d1b85b84..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.40.0.tar.gz" - sha256 "6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc" - - bottle do - cellar :any - sha256 "1862e6826a4bedb97af8dcb9ab849c69754226ed92e5ee19267fa33ee96f94f8" => :catalina - sha256 "70a476e6b14fdfa42188d3df2797f8c13f25bd633528164b0d42c5fb70dfb431" => :mojave - sha256 "e5b78e3dca71370ccc06a013ebda8b9f1c2b89a238e2f3ef11a8086560e3c07b" => :high_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 39cc6b6c8e6d6..0000000000000 --- a/Formula/pixz.rb +++ /dev/null @@ -1,43 +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" - license "BSD-2-Clause" - revision 1 - head "https://github.com/vasi/pixz.git" - - bottle do - cellar :any - sha256 "f8b5da517c4ea08d9dd191c90528fbeeafe696df565dcf7a974c61b3d635b8c5" => :catalina - 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" - - 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/pjproject.rb b/Formula/pjproject.rb deleted file mode 100644 index 7be9e05953ca3..0000000000000 --- a/Formula/pjproject.rb +++ /dev/null @@ -1,34 +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://github.com/pjsip/pjproject/archive/2.10.tar.gz" - sha256 "936a4c5b98601b52325463a397ddf11ab4106c6a7b04f8dc7cdd377efbb597de" - license "GPL-2.0" - head "https://github.com/pjsip/pjproject.git" - - bottle do - cellar :any - rebuild 1 - sha256 "ce9e2f67c5ae7148b7c7883ac3c6dbcc9dd7892695af93c02dc44b3e52f109dd" => :catalina - sha256 "26c273e3e975fc955f3c8ffb03c8332629fd42f123a4144645adb30817f9f428" => :mojave - sha256 "114939ba488f6f78f1d337d27eb1873aacfb9c55788b60543f6dbab7e23f745e" => :high_sierra - end - - depends_on :macos => :high_sierra # Uses Security framework API enum cases introduced in 10.13.4 - depends_on "openssl@1.1" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "dep" - system "make" - system "make", "install" - - arch = Utils.safe_popen_read("uname", "-m").chomp - rel = Utils.safe_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 69704fb5e2052..0000000000000 --- a/Formula/pk.rb +++ /dev/null @@ -1,33 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "2f9c36e03681f154a24e063e2600d0de8f8afd5f9b114083ef1f34656a7721e8" => :catalina - 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 6d589abe5405d..0000000000000 --- a/Formula/pkcrack.rb +++ /dev/null @@ -1,33 +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 "d3a30eacefe197d458f08b01ad58d778376fc5b4d53c35f7c0e5c525c17c32d0" => :catalina - sha256 "43571237e186fe6907bef85b5584772b80ed96b7336e55c47a1b18a41ef75278" => :mojave - sha256 "13c80200a6a1b96c74c590c595c1860447b04a6bb44d10210d82e0fa53e8f61b" => :high_sierra - sha256 "264358646b08985192cd06c9bc032c16296eb00198dd9852521e0cfdfe1703ef" => :sierra - sha256 "9b46e1c0097cc4024d4f5b182ac8fdbc27e3caec52874b19d570aba6f946fc10" => :el_capitan - sha256 "47f2ffa2e27f0dc5e6df45de7335e316a8ea83288153b274ae5d8e11c7157055" => :yosemite - end - - conflicts_with "csound", :because => "both install `extract` binaries" - 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 dd6103c7a06c6..0000000000000 --- a/Formula/pkcs11-helper.rb +++ /dev/null @@ -1,48 +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.26/pkcs11-helper-1.26.0.tar.bz2" - sha256 "e886ec3ad17667a3694b11a71317c584839562f74b29c609d54c002973b387be" - head "https://github.com/OpenSC/pkcs11-helper.git" - - bottle do - cellar :any - sha256 "dc52806291729e3481bb2a90cabb9df77f21c30351ed2cc67213caaefed8c667" => :catalina - sha256 "f2783434ebb595a4e9a9b570c05dcf030a7539d1008e988427e4cd36281b6917" => :mojave - sha256 "6796ffb18fc1f6c22b800caf32e0e4698c1f82e10529ed6535b634afabf237fe" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - 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 6e10d12c05bd5..0000000000000 --- a/Formula/pkg-config.rb +++ /dev/null @@ -1,61 +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" - sha256 "6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591" - revision 3 - - bottle do - cellar :any_skip_relocation - sha256 "80f141e695f73bd058fd82e9f539dc67471666ff6800c5e280b5af7d3050f435" => :catalina - sha256 "0d14b797dba0e0ab595c9afba8ab7ef9c901b60b4f806b36580ef95ebb370232" => :mojave - sha256 "8c6160305abd948b8cf3e0d5c6bb0df192fa765bbb9535dda0b573cb60abbe52" => :high_sierra - end - - pour_bottle? do - # The pc_path is baked into the binary and relocatable detection doesn't pick it up - reason "The bottle only works in the default #{Homebrew::DEFAULT_PREFIX} location." - satisfy { HOMEBREW_PREFIX.to_s == Homebrew::DEFAULT_PREFIX } - 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}", - "--with-system-include-path=#{MacOS.sdk_path_if_needed}/usr/include" - system "make" - system "make", "install" - end - - test do - (testpath/"foo.pc").write <<~EOS - 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 - EOS - - ENV["PKG_CONFIG_LIBDIR"] = testpath - system bin/"pkg-config", "--validate", "foo" - assert_equal "1.0.0\n", shell_output("#{bin}/pkg-config --modversion foo") - assert_equal "-lfoo\n", shell_output("#{bin}/pkg-config --libs foo") - assert_equal "-I/usr/include/foo\n", shell_output("#{bin}/pkg-config --cflags foo") - end -end diff --git a/Formula/pkgdiff.rb b/Formula/pkgdiff.rb deleted file mode 100644 index 66fe385acce40..0000000000000 --- a/Formula/pkgdiff.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "cd5fb92603b642be4817bda4d829389cb6dfe040fddda33d2897aba8c04dd9d1" => :catalina - 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 39b0210a3407b..0000000000000 --- a/Formula/pktanon.rb +++ /dev/null @@ -1,34 +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 "a8509ba2a13056c218fca682edf990df133b67e2b471eb561aac0d49d446bc7e" => :catalina - 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 0191bd43de96a..0000000000000 --- a/Formula/pla.rb +++ /dev/null @@ -1,44 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "a93517a26dab0bab4ab32aff81c7af3b7545ae1be265ce15caacc3772cd6d485" => :catalina - sha256 "9d5e86767de6c9a2ac741e9edd32d053da5fde96563446a63d1b0475f4da595a" => :mojave - sha256 "af3163cf8322d872694753f3d3352384fb9c8ce923c66f7be82f50bdbbe734bc" => :high_sierra - sha256 "c6edebbefcf192ea4bcad704ca5b4c27157f77b4a47e3a993ac2a61e7165c13c" => :sierra - sha256 "3fd0d11d1bdfa24e93bf94cb854e28382307c291b25994c82a2a8c1a64ce5072" => :el_capitan - sha256 "308920e8bf8642826cd973eaa63e22f0fc3dec43a0152485d358ba575638291f" => :yosemite - sha256 "df4b500589672dc1c415866b7da4c678621858f48cbac2cab5765c2b4fb1857d" => :mavericks - 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/planck.rb b/Formula/planck.rb deleted file mode 100644 index d3371e7b57574..0000000000000 --- a/Formula/planck.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Planck < Formula - desc "Stand-alone ClojureScript REPL" - homepage "https://planck-repl.org/" - url "https://github.com/planck-repl/planck/archive/2.25.0.tar.gz" - sha256 "58a3f9b0e3d776bc4e28f1e78a8ce6ab1d98149bebeb5c5328cc14345b925a1f" - license "EPL-1.0" - revision 2 - head "https://github.com/planck-repl/planck.git" - - bottle do - cellar :any - sha256 "5b406713770c2829f37ea2a979339d63e25919d843c2bd99b637965415bc0607" => :catalina - sha256 "9aa890a053401c91cc47614297141f98c368ffbd10c5bccdcd16dfc44c608926" => :mojave - sha256 "a5527c52066b07419fef2617323897d21b90b6ce59a5014637eb4c6f234d8596" => :high_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" - - 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 390f9547667a6..0000000000000 --- a/Formula/plank.rb +++ /dev/null @@ -1,39 +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.6.tar.gz" - sha256 "6a233120905ff371b5c06a23b3fc7dd67e96355dd4d992a58ac087db22c500ef" - license "Apache-2.0" - head "https://github.com/pinterest/plank.git" - - bottle do - cellar :any_skip_relocation - sha256 "fc6838079a8a975c9bb77d17a050aa722d8446fcf9f62ca9fe09c8822d8651b4" => :catalina - sha256 "04d2dddb094914fa219304fea8f6e5aa3315c2e51b63ef4077fcf25a54c8b268" => :mojave - end - - depends_on :xcode => ["11.3", :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 cc822e139dce9..0000000000000 --- a/Formula/plantuml.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Plantuml < Formula - desc "Draw UML diagrams" - homepage "https://plantuml.com/" - url "https://downloads.sourceforge.net/project/plantuml/1.2020.15/plantuml.1.2020.15.jar" - sha256 "1b6903a3a271ed5ce35f6b8ba2ce9cd90a87253f0fc60a7e7ce1e40623117537" - version_scheme 1 - - bottle :unneeded - - 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/platformio.rb b/Formula/platformio.rb deleted file mode 100644 index 5346a58141a80..0000000000000 --- a/Formula/platformio.rb +++ /dev/null @@ -1,92 +0,0 @@ -class Platformio < Formula - include Language::Python::Virtualenv - - desc "Open-source ecosystem for embedded development" - homepage "https://platformio.org/" - url "https://files.pythonhosted.org/packages/af/7a/07e5fa67f08eb738bcea35c9a5aa862463e693de26e02d9f4d393a75f567/platformio-4.3.4.tar.gz" - sha256 "9385860a7072ac7bb4a71c4d7644acf1cdd4bc1e88af8a5ab53ee0e935c31b07" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "b31ae7f3a3e958a2bfde5ee2c063f2b37e76dbedba83bb54a0a65c48579899d6" => :catalina - sha256 "be8b970478e406e3208b1bcd691bcf0790918ca98080b4bb34be0c02881958e2" => :mojave - sha256 "fcef6a7f1eb39afbf29e92212d62fec5264e121ae90818e8b1809b7f82dabe11" => :high_sierra - end - - depends_on "python@3.8" - - resource "bottle" do - url "https://files.pythonhosted.org/packages/d9/4f/57887a07944140dae0d039d8bc270c249fc7fc4a00744effd73ae2cde0a9/bottle-0.12.18.tar.gz" - sha256 "0819b74b145a7def225c0e83b16a4d5711fde751cd92bae467a69efce720f69e" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" - sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "marshmallow" do - url "https://files.pythonhosted.org/packages/8d/1c/145aa43187ddf07ac63f7ab5907591e13710f357b1a7087679832de151bc/marshmallow-3.6.0.tar.gz" - sha256 "c2673233aa21dde264b84349dc2fd1dce5f30ed724a0a00e75426734de5b84ab" - end - - resource "pyelftools" do - url "https://files.pythonhosted.org/packages/9e/0f/82583ae6638a23e416cb3f15e3e3c07af51725fe51a4eaf91ede265f4af9/pyelftools-0.26.tar.gz" - sha256 "86ac6cee19f6c945e8dedf78c6ee74f1112bd14da5a658d8c9d4103aed5756a2" - 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/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "semantic-version" do - url "https://files.pythonhosted.org/packages/d4/52/3be868c7ed1f408cb822bc92ce17ffe4e97d11c42caafce0589f05844dd0/semantic_version-2.8.5.tar.gz" - sha256 "d2cb2de0558762934679b9a104e82eca7af448c9f4974d1f3eeccff651df8a54" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/57/6f/213d075ad03c84991d44e63b6516dd7d185091df5e1d02a660874f8f7e1e/tabulate-0.8.7.tar.gz" - sha256 "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - end - - test do - output = shell_output("#{bin}/pio boards ststm32") - assert_match "ST Nucleo F401RE", output - end -end diff --git a/Formula/platypus.rb b/Formula/platypus.rb deleted file mode 100644 index adc50af8a18bd..0000000000000 --- a/Formula/platypus.rb +++ /dev/null @@ -1,51 +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.3.src.zip" - sha256 "b5b707d4f664ab6f60eed545d49a7d38da7557ce8268cc4791886eee7b3ca571" - license "BSD-3-Clause" - head "https://github.com/sveinbjornt/Platypus.git" - - bottle do - cellar :any_skip_relocation - sha256 "8e1b66ba6d450ba4cef3ccd2192d58c08f1401a443a44338c80a917f7607341e" => :catalina - sha256 "a08defbfae9f265bc7473c639b060fb8fa0dd1b6923746a1cf86756112347250" => :mojave - sha256 "df48127dd7e77c37b7ed73247c74f3bb3d37d0e239590d848f91f8af5f98f628" => :high_sierra - sha256 "d46dd428161d8ed7febf5ea4109f9bcddfa65c75d4e67619781745587c6b6f55" => :sierra - end - - depends_on :xcode => ["8.0", :build] - - def install - xcodebuild "SYMROOT=build", "DSTROOT=#{buildpath}/dst", - "-project", "Platypus.xcodeproj", - "-target", "platypus", - "-target", "ScriptExec", - "CODE_SIGN_IDENTITY=", "CODE_SIGNING_REQUIRED=NO", - "clean", - "install" - - man1.install "CLT/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 ff4562a069da0..0000000000000 --- a/Formula/plenv.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Plenv < Formula - desc "Perl binary manager" - homepage "https://github.com/tokuhirom/plenv" - url "https://github.com/tokuhirom/plenv/archive/2.3.1.tar.gz" - sha256 "12004cfed7ed083911dbda3228a9fb9ce6e40e259b34e791d970c4f335935fa3" - head "https://github.com/tokuhirom/plenv.git" - - bottle :unneeded - - depends_on "perl-build" - - 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 - assert_match(/\* system \(set by/, shell_output("#{bin}/plenv versions")) - 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 ee79ff4a65884..0000000000000 --- a/Formula/ploticus.rb +++ /dev/null @@ -1,57 +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" - sha256 "3f29e4b9f405203a93efec900e5816d9e1b4381821881e241c08cab7dd66e0b0" - revision 1 - - bottle do - sha256 "5b23a77e8f83f384d8b3da9af8d1bd89832099a5dec99f1711a72f50a4d682fe" => :catalina - 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 58f0c73873d59..0000000000000 --- a/Formula/plotutils.rb +++ /dev/null @@ -1,43 +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 "edab5b91771162c1783dc69482834de6a2ca0fd077ea83b79d1934a365f7276d" => :catalina - sha256 "96a618ea8123f08d676b0db38c1c3b93dc8f707c742e97442b74650c2dd8e4c5" => :mojave - sha256 "00796c7f6aa36203eb0fd919ef4f096c6016d3c5973b2032328c95c87b354d92" => :high_sierra - sha256 "b63f4f051452f8fd9b5ddb50f9d574122c2277c9778e1a56c3f2d59e55c3da73" => :sierra - sha256 "b734cdcbc7ce11c4a716bc96ee7671f3883a5d41dadceac28d994ad2c20292f9" => :el_capitan - sha256 "fae89f252628820ac83a0896fa022b1c08cacca6e6234b2fb23c10554f424fd3" => :yosemite - sha256 "e51b4b5c367e8f9ec533f54e20c9df0b887818ee35c4cde19ba8feb73d4d2ff2" => :mavericks - end - - depends_on "libpng" - - 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 - ] - - 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 039f3077c8f43..0000000000000 --- a/Formula/plowshare.rb +++ /dev/null @@ -1,29 +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" - license "GPL-3.0" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "c46e0ffe3e874eed0628aaf03ddd6711b9076e5ae0ba5c6f678c66babc2fa3f7" => :catalina - 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 1ff2d421768c2..0000000000000 --- a/Formula/plplot.rb +++ /dev/null @@ -1,71 +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.15.0%20Source/plplot-5.15.0.tar.gz" - sha256 "b92de4d8f626a9b20c84fc94f4f6a9976edd76e33fb1eae44f6804bdcc628c7b" - revision 2 - - bottle do - sha256 "c37878dbf7a1805da137aa6b9f1222050b6b62eebd36834597279b8f58f5f4d6" => :catalina - sha256 "c647d868b1fd01db2a760965665d9ff22192fefc0ad02641a2f89c4ccf35a37f" => :mojave - sha256 "bc07655baabc8c4faf3f76def152ad8f55a92670cd289a0d10fd33ae550f537a" => :high_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" - - def install - args = std_cmake_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 - ] - - 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 40a7202414c78..0000000000000 --- a/Formula/plustache.rb +++ /dev/null @@ -1,28 +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" - license "MIT" - - bottle do - cellar :any - sha256 "e3348a3114faa9ae6a989344d69a594e5cacaacd927b847213f75f97d399bce1" => :catalina - 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 61027ddba6def..0000000000000 --- a/Formula/plzip.rb +++ /dev/null @@ -1,38 +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.8.tar.gz" - sha256 "edafae3c15142ac0ebd84c2231ff81da4f68db58359a737e750f2780686c3612" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "9cae6af29d979ef1e9ed1869f8a5013fe188f6c65ca138bed9a5f76ce178c881" => :catalina - sha256 "3e266c42c66babd4fbdfe82645ab876fc7224846e94b26a39183c57404e17c35" => :mojave - sha256 "0a5df85c11e9afb266709a907980424cd60f1d1fd3adda71e8b0f9939ddf72a7" => :high_sierra - sha256 "c26a4b45c09173a4cb8ab2a56d2c5bb9018e16332e637d4d617bfcd75f90c0ad" => :sierra - 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 16040b1504409..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://deb.debian.org/debian/pool/main/p/pmccabe/pmccabe_2.6.tar.gz" - sha256 "e490fe7c9368fec3613326265dd44563dc47182d142f579a40eca0e5d20a7028" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "c9509bbb9d642f0245364a542f5b89dded2101968358d352e892564371f1ffd4" => :catalina - 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 eca16b82e19fb..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.25.0/pmd-bin-6.25.0.zip" - sha256 "1338b98af55625ec780bfdf00ca3bae40432aa7258ba3521953c3a4f3d076f7a" - - bottle :unneeded - - depends_on "openjdk" - - def install - rm Dir["bin/*.bat"] - libexec.install Dir["*"] - (bin/"pmd").write_env_script libexec/"bin/run.sh", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - 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 400fd1b2dce5a..0000000000000 --- a/Formula/pmdmini.rb +++ /dev/null @@ -1,57 +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 "cfbf667e152bede1fce92c8d358195a651e807595bc5e704d71ee80cfe65682b" => :catalina - 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 56ebfc77d512e..0000000000000 --- a/Formula/pms.rb +++ /dev/null @@ -1,30 +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" - revision 1 - - bottle do - cellar :any - sha256 "de929bc53474adfa2a300f8954e0597489f88c22a29661e85c66d1ea8cc619ff" => :catalina - sha256 "0c43ee20313b6616c6ececb9c906da12720b035862a894a3f9dd11984c640b30" => :mojave - sha256 "f01d2f4db91f6b6bcf35f86c7a0d2b0fbed17941d9556fe0ba71e855c7667638" => :high_sierra - sha256 "fa90afc92fc9d1e57a9a0a74dc63d3ec5ba92f1430caf5cad8fa54362b0da298" => :sierra - 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/pnetcdf.rb b/Formula/pnetcdf.rb deleted file mode 100644 index d5ed911df27aa..0000000000000 --- a/Formula/pnetcdf.rb +++ /dev/null @@ -1,71 +0,0 @@ -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.12.1.tar.gz" - sha256 "56f5afaa0ddc256791c405719b6436a83b92dcd5be37fe860dea103aee8250a2" - revision 1 - - bottle do - sha256 "89fe221a5cfb46dac697259ace423488721524a62cf9753e2f2b0824a5092316" => :catalina - sha256 "ca2024aecf06507fa3f5018773f59aaa2b6be3291107b73565002f19ed0def02" => :mojave - sha256 "218b5b009bb564ed50117a0ad5842ee2d20b4b29cc134587fd5e30a3e703412b" => :high_sierra - end - - depends_on "gcc" - depends_on "open-mpi" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--enable-shared", - # Fix for GCC 10, remove in next version - # https://github.com/Parallel-NetCDF/PnetCDF/pull/63 - "FFLAGS=-fallow-argument-mismatch", - "FCFLAGS=-fallow-argument-mismatch" - system "make", "install" - end - - # These tests were converted from the netcdf formula. - test do - (testpath/"test.c").write <<~EOS - #include - #include "pnetcdf.h" - int main() - { - printf(PNETCDF_VERSION); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lpnetcdf", - "-o", "test" - assert_equal `./test`, version.to_s - - (testpath/"test.f90").write <<~EOS - 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 - EOS - system "mpif90", "test.f90", "-L#{lib}", "-I#{include}", "-lpnetcdf", - "-o", "testf" - system "./testf" - end -end diff --git a/Formula/png++.rb b/Formula/png++.rb deleted file mode 100644 index c36335b089d5f..0000000000000 --- a/Formula/png++.rb +++ /dev/null @@ -1,34 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "c6377c5185e7ae53ff7ec9a133b8c12618a400f64d14b55ee751dc7c85cbc491" => :catalina - sha256 "536f9c2dd05cfd2ae8a4f7f5d0c5c38575cf91609498f98bd6c3f97c4de2c520" => :mojave - sha256 "536f9c2dd05cfd2ae8a4f7f5d0c5c38575cf91609498f98bd6c3f97c4de2c520" => :high_sierra - sha256 "cee110f568bae723e8e5172e8bab36c8f4c5adb8bf339a444926a572bfa13f89" => :sierra - end - - depends_on "libpng" - - def install - system "make", "PREFIX=#{prefix}", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - png::image image(200, 300); - if (image.get_width() != 200) return 1; - if (image.get_height() != 300) return 2; - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/png2ico.rb b/Formula/png2ico.rb deleted file mode 100644 index f9e55f96c87fa..0000000000000 --- a/Formula/png2ico.rb +++ /dev/null @@ -1,49 +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 "dfe2ebcf6a6b8c7e97e7b80c9d98aa46b27c27de7ace88464750d8db61aadf55" => :catalina - 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 69972a9bb4749..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 "7fb0d821218aba52e2c261c4cdcc50438d71cbf232baba97ef13e861c3386a11" => :catalina - sha256 "22033aa6f7b96ecb9d7eb038b7103e5faa782f4d36c142c3220f1e1ff1fc9e9e" => :mojave - sha256 "f4cdf56cdf51ab156bcc1009cce5cdd46d86de12811549136d50a1a18295b7c7" => :high_sierra - sha256 "c98b0fd09e8b615f98d4ee9762485a8e9026c9cdb3dc576ef81ee0bbff6058d7" => :sierra - sha256 "98e0a49125511f279c09c99fdb33ea5e2d44f489be4a8a6d70ce9faba48e8b92" => :el_capitan - sha256 "2f8901f0259f2ec24478268e5fa4cd8fe904a160592f118efdddf4ba20221dd6" => :yosemite - sha256 "af2af2a3771b7730c0da6fe3c74f6044b3664498c0b9f5070be3cf4d7ec1274e" => :mavericks - 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 b011445304898..0000000000000 --- a/Formula/pngcrush.rb +++ /dev/null @@ -1,28 +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 "f6b31e35011fd69dc4ee678e4529fd5a76ee7be8faba88bb7c9cb0b7cbfafacb" => :catalina - 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 38f63652396d5..0000000000000 --- a/Formula/pngnq.rb +++ /dev/null @@ -1,49 +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 "f438c5d73e9dd9c3c36283aa9f8253168de30f52242955a803714350cc247c80" => :catalina - 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 0dfe654eb0333..0000000000000 --- a/Formula/pngpaste.rb +++ /dev/null @@ -1,30 +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.3.tar.gz" - sha256 "6221201cb05191855f0d2707ce7f4055f6e1330de8efc09d386be2a6629f543b" - - bottle do - cellar :any_skip_relocation - sha256 "692e8f099ee7426310daa078d6bf2103b763b4549804f1775a5238acb1ead616" => :catalina - sha256 "b67e349eaa3680c7be1746511a8a934e04320182d9396e75ca1936398d746779" => :mojave - sha256 "eed393d2dbd516f60bdaa445df330a140853bee95cd49b0c3730345f57136676" => :high_sierra - 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 d6ed700466819..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.5-src.tar.gz" - sha256 "3638936cf6270eeeaabcee42e10768d78e4dc07cac9310307835c1f58b140808" - head "https://github.com/kornelski/pngquant.git" - - bottle do - cellar :any - rebuild 1 - sha256 "6212657919215e9f140239aa7df37b97d1b9820543e884bc4af45ef0deda523a" => :catalina - sha256 "0c90b318acdfa38b8fb7a0bea76c5932a9c1bfb00f2a866bbd30781631876e33" => :mojave - sha256 "da0955f28f17ef1b50dc15256f80b5742c0c940d1c6ce683990edde6fffd642a" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "libpng" - depends_on "little-cms2" - - def install - system "make", "install", "PREFIX=#{prefix}" - 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/pnpm.rb b/Formula/pnpm.rb deleted file mode 100644 index 78d4c9f565198..0000000000000 --- a/Formula/pnpm.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Pnpm < Formula - require "language/node" - - desc "📦🚀 Fast, disk space efficient package manager" - homepage "https://pnpm.js.org/" - url "https://registry.npmjs.org/pnpm/-/pnpm-5.3.0.tgz" - sha256 "afbb61ea8be6b48c57eeb00a62049468be8a64a032ffecf53c73bef0d9f3efc4" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "9c9c85fa26f5bb369ffcd5cd44da68da46115e978714c047ba7e6439b03b7cb8" => :catalina - sha256 "b3efdfc6c62704ed71fc66b38926f43924bb1347f224cc9c554ca1087c33f4e7" => :mojave - sha256 "a36bfca5a0b2ab1bf83d748a1922b14e95dd2668805388c43919906c5e803ad7" => :high_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}/pnpm", "init", "-y" - assert_predicate testpath/"package.json", :exist?, "package.json must exist" - end -end diff --git a/Formula/po4a.rb b/Formula/po4a.rb deleted file mode 100644 index b3819970ba8ad..0000000000000 --- a/Formula/po4a.rb +++ /dev/null @@ -1,108 +0,0 @@ -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/releases/download/v0.59.1/po4a-v0.59.1.tar.gz" - sha256 "a906fd82a6cc3a8898c1fe55d14076f3376fa6879ce9b1828b8b125e2dbe495b" - head "https://github.com/mquinson/po4a.git" - - bottle do - cellar :any - sha256 "62cd7a07c3f5bf0560672bafa0727c5b858f1b9ddfc3ee32a3cb72b6abb8a008" => :catalina - sha256 "56ddf8fef92fcc1ec039a0cdd2bd5c7b748e11b34fdcc265af0a20094cd99309" => :mojave - sha256 "3f77c12ae326c81ad64a5a1cdba22822abc551aaaa3bdc19338e706f7d40224b" => :high_sierra - end - - depends_on "docbook-xsl" => :build - depends_on "gettext" - - uses_from_macos "perl" - - resource "Locale::gettext" do - url "https://cpan.metacpan.org/authors/id/P/PV/PVANDRY/gettext-1.07.tar.gz" - sha256 "909d47954697e7c04218f972915b787bd1244d75e3bd01620bc167d5bbc49c15" - end - - resource "Module::Build" do - # po4a requires Module::Build v0.4200 and above, while standard - # MacOS Perl installation has 0.4003 - url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4231.tar.gz" - sha256 "7e0f4c692c1740c1ac84ea14d7ea3d8bc798b2fb26c09877229e04f430b2b717" - end - - resource "Pod::Parser" do - url "https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Parser-1.63.tar.gz" - sha256 "dbe0b56129975b2f83a02841e8e0ed47be80f060686c66ea37e529d97aa70ccd" - 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.73.tar.gz" - sha256 "bc315fa12e8f1e3ee5e2f430d90b708a5dc7e47c867dba8dce3a6b8fbe257744" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" - ENV.prepend_path "PERL5LIB", libexec/"lib" - - resources.each do |r| - r.stage do - system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}", "NO_MYMETA=1" - system "make", "install" - 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 - (testpath/"en.tex").write <<~EOS - \\documentclass[a4paper]{article} - \\begin{document} - Hello from Homebrew! - \\end{document} - EOS - - system bin/"po4a-gettextize", "-f", "asciidoc", "-m", "en.tex", "-p", "out.pot" - assert_match "Hello from Homebrew!", (testpath/"out.pot").read - end -end diff --git a/Formula/poco.rb b/Formula/poco.rb deleted file mode 100644 index ed8c03e0b877a..0000000000000 --- a/Formula/poco.rb +++ /dev/null @@ -1,30 +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.10.1/poco-1.10.1-all.tar.gz" - sha256 "7f5931e0bb06bc2880a0f3867053a2fddf6c0d3e5dd96342a665460301fc34ca" - head "https://github.com/pocoproject/poco.git", :branch => "develop" - - bottle do - cellar :any - sha256 "0755dff1346ea80aa6202ce3e8269c608960abd4bf0a4566e56075cc99364b57" => :catalina - sha256 "7abccb2c17823c6dda9dee9e5918fa28ef846d8095252681c83c47bbb674f5c8" => :mojave - sha256 "70cea3a570e187c3e70a8dbbe1ad2e43be1c159d0d9118c1bfc1a8cc6441e2a4" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - def install - 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 17c7c5ad1c4e0..0000000000000 --- a/Formula/pod2man.rb +++ /dev/null @@ -1,29 +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.14.tar.xz" - sha256 "e504c3d9772b538d7ea31ce2c5e7a562d64a5b7f7c26277b1d7a0de1f6acfdf4" - - bottle do - cellar :any_skip_relocation - sha256 "3befc44e77ae00da3acfe5f42a579ebc01ce376dde402404aa5496caaa81d572" => :catalina - sha256 "8ba154647a2c2e44cce5251c0172fdb85ad51a7a6fd7f738dfcad9c30de1214d" => :mojave - sha256 "bdff3cadfd2c7a5b017c82501b21c69865ce352d0044daafa07c294fac0865e6" => :high_sierra - 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 a59235b0456f7..0000000000000 --- a/Formula/podiff.rb +++ /dev/null @@ -1,44 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "34c82b7a2caa7d65bea883d10bf20dc29346a04c381c9e7bf4a38473916d079f" => :catalina - 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 fd0021de1800b..0000000000000 --- a/Formula/podofo.rb +++ /dev/null @@ -1,53 +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.6.tar.gz" - sha256 "e9163650955ab8e4b9532e7aa43b841bac45701f7b0f9b793a98c8ca3ef14072" - revision 2 - - bottle do - cellar :any - sha256 "f3a0b9f5f93e268e1b8233bc1af041d26a89bb6f9e66ea0da0ef745b0454dc1d" => :catalina - sha256 "2ad60f4e4acd3fa9d1da1dcfeb7381696f126915bbea881d4bec9bb2cfd4fbab" => :mojave - sha256 "00db9c24295276fa24909d417f2790105bccc990c23f80ffa906210ab70e5af8" => :high_sierra - sha256 "30d51bd12657b4fe2defbe157c8dfea4c804318f13fa1f15011ebefaa7dec016" => :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@1.1" - - # 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_INSTALL_NAME_DIR=#{opt_lib} - -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON - -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/poetry.rb b/Formula/poetry.rb deleted file mode 100644 index f7873d234125f..0000000000000 --- a/Formula/poetry.rb +++ /dev/null @@ -1,203 +0,0 @@ -class Poetry < Formula - include Language::Python::Virtualenv - - desc "Python package management tool" - homepage "https://python-poetry.org/" - url "https://files.pythonhosted.org/packages/65/76/3ce57248bc821634955ffd43eb58e7ea17ed5cf6c15f94059885cb1b6155/poetry-1.0.9.tar.gz" - sha256 "0a4c56983546964b47cbbe0e1b49fef5662277bbf0673e3e350e1215560377ab" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "c9810bd4e5093622639f720dcdf4ecc8f747b1099920baa77450416c1daf2fea" => :catalina - sha256 "42f4f40e31d1f6a09088e565a401cc02f29fad3b90243ff49a6b1ab9908c687f" => :mojave - sha256 "2bbfee7102fd07e8575b83c7d002e02f30f1d3c63e54c7d9ea5c1c7b00b21b3b" => :high_sierra - end - - depends_on "python@3.8" - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "CacheControl" do - url "https://files.pythonhosted.org/packages/44/b9/9a1d4349824ae14de4052e84802a0c372fff1fd2bd6668f7e9efe91ac11d/CacheControl-0.12.6.tar.gz" - sha256 "be9aa45477a134aee56c8fac518627e1154df063e85f67d4f83ce0ccc23688e8" - end - - resource "cachy" do - url "https://files.pythonhosted.org/packages/a0/0c/45b249b0efce50a430b8810ec34c5f338d853c31c24b0b297597fd28edda/cachy-0.3.0.tar.gz" - sha256 "186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b4/19/53433f37a31543364c8676f30b291d128cdf4cd5b31b755b7890f8e89ac8/certifi-2020.4.5.2.tar.gz" - sha256 "5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "cleo" do - url "https://files.pythonhosted.org/packages/99/d5/409b11936085c97ea7c9f596b7fcc3aac0cd9243bbba64be914bb9142bc2/cleo-0.7.6.tar.gz" - sha256 "99cf342406f3499cec43270fcfaf93c126c5164092eca201dfef0f623360b409" - end - - resource "clikit" do - url "https://files.pythonhosted.org/packages/95/55/c9013126e2468e80a30f3aaec8fdb9b55772f4ab91f79ec8290f6426c60b/clikit-0.4.3.tar.gz" - sha256 "6e2d7e115e7c7b35bceb0209109935ab2f9ab50910e9ff2293f7fa0b7abf973e" - 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/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" - sha256 "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" - end - - # keyring<21.0.0,>=20.0.1 - resource "keyring" do - url "https://files.pythonhosted.org/packages/97/b5/983b219cc9288340b1a572dc85b1efd96938d807dae9ebc9355616e0db32/keyring-20.0.1.tar.gz" - sha256 "963bfa7f090269d30bdc5e25589e5fd9dad2cf2a7c6f176a7f2386910e5d0d8d" - end - - resource "lockfile" do - url "https://files.pythonhosted.org/packages/17/47/72cb04a58a35ec495f96984dddb48232b551aafb95bde614605b754fe6f7/lockfile-0.12.2.tar.gz" - sha256 "6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799" - end - - resource "msgpack" do - url "https://files.pythonhosted.org/packages/e4/4f/057549afbd12fdd5d9aae9df19a6773a3d91988afe7be45b277e8cee2f4d/msgpack-1.0.0.tar.gz" - sha256 "9534d5cc480d4aff720233411a1f765be90885750b07df772380b34c10ecb5c0" - end - - resource "pastel" do - url "https://files.pythonhosted.org/packages/c9/c8/aa23c18b1b811b1907f06b1556d39213982675dd2a2e72493d20fe2b6a57/pastel-0.2.0.tar.gz" - sha256 "46155fc523bdd4efcd450bbcb3f2b94a6e3b25edc0eb493e081104ad09e1ca36" - end - - resource "pexpect" do - url "https://files.pythonhosted.org/packages/e5/9b/ff402e0e930e70467a7178abb7c128709a30dfb22d8777c043e501bc1b10/pexpect-4.8.0.tar.gz" - sha256 "fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" - end - - resource "pkginfo" do - url "https://files.pythonhosted.org/packages/6c/04/fd6683d24581894be8b25bc8c68ac7a0a73bf0c4d74b888ac5fe9a28e77f/pkginfo-1.5.0.1.tar.gz" - sha256 "7424f2c8511c186cd5424bbf31045b77435b37a8d604990b79d4e70d741148bb" - end - - resource "ptyprocess" do - url "https://files.pythonhosted.org/packages/7d/2d/e4b8733cf79b7309d84c9081a4ab558c89d8c89da5961bf4ddb050ca1ce0/ptyprocess-0.6.0.tar.gz" - sha256 "923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0" - end - - resource "pylev" do - url "https://files.pythonhosted.org/packages/cc/61/dab2081d3d86dcf0b9f5dcfb11b256d76cd14aad7ccdd7c8dd5e7f7e41a0/pylev-1.3.0.tar.gz" - sha256 "063910098161199b81e453025653ec53556c1be7165a9b7c50be2f4d57eae1c3" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - # pyrsistent<0.15.0,>=0.14.2 - resource "pyrsistent" do - url "https://files.pythonhosted.org/packages/8c/46/4e93ab8a379d7efe93f20a0fb8a27bdfe88942cc954ab0210c3164e783e0/pyrsistent-0.14.11.tar.gz" - sha256 "3ca82748918eb65e2d89f222b702277099aca77e34843c5eb9d52451173970e2" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - # requests-toolbelt<0.9.0,>=0.8.0 - resource "requests-toolbelt" do - url "https://files.pythonhosted.org/packages/86/f9/e80fa23edca6c554f1994040064760c12b51daff54b55f9e379e899cd3d4/requests-toolbelt-0.8.0.tar.gz" - sha256 "f6a531936c6fa4c6cfce1b9c10d5c4f498d16528d2a54a22ca00011205a187b5" - end - - # sdist for 1.3.2 has no setup.py file - resource "shellingham" do - url "https://files.pythonhosted.org/packages/1b/82/52b4facd501d1cdfee1f2b3aa6092dc0ee6c07baf78692f9035adb1357da/shellingham-1.3.1.tar.gz" - sha256 "985b23bbd1feae47ca6a6365eacd314d93d95a8a16f8f346945074c28fe6f3e0" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "tomlkit" do - url "https://files.pythonhosted.org/packages/53/10/1f1186fcd453d10254450a7e947e92e6dbb0bf1418484aa4da2829be44f9/tomlkit-0.5.11.tar.gz" - sha256 "f044eda25647882e5ef22b43a1688fb6ab12af2fc50e8456cdfc751c873101cf" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "webencodings" do - url "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz" - sha256 "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" - end - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - - vendor_site_packages = libexec/"vendor/lib/python#{xy}/site-packages" - ENV.prepend_create_path "PYTHONPATH", vendor_site_packages - resources.each do |r| - r.stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - site_packages = libexec/"lib/python#{xy}/site-packages" - ENV.prepend_create_path "PYTHONPATH", site_packages - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec) - - (bin/"poetry").write <<~PYTHON - #!#{Formula["python@3.8"].opt_bin/"python3"} - import sys - - sys.path.insert(0, "#{site_packages}") - sys.path.insert(0, "#{vendor_site_packages}") - - if __name__ == "__main__": - from poetry.console import main - main() - PYTHON - end - - test do - ENV["LC_ALL"] = "en_US.UTF-8" - - 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_predicate testpath/"homebrew/pyproject.toml", :exist? - assert_predicate testpath/"homebrew/poetry.lock", :exist? - assert_match "requests", (testpath/"homebrew/pyproject.toml").read - assert_match "boto3", (testpath/"homebrew/pyproject.toml").read - end -end diff --git a/Formula/points2grid.rb b/Formula/points2grid.rb deleted file mode 100644 index 877f97c8f74c0..0000000000000 --- a/Formula/points2grid.rb +++ /dev/null @@ -1,32 +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 8 - - bottle do - cellar :any - sha256 "caeb87d3165908356f7af813676c9e9caeaa010031ef555efc7ab7e35840e166" => :catalina - sha256 "daa8956573bbf24c90a630b3af8c732dbae56488d991c7fde2262dd69f79375a" => :mojave - sha256 "d761f8f93883f4d2517c21f7e328a4daed07bc4ed09fdc684068ebffdadb1b4e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "gdal" - - def install - ENV.cxx11 - libexec.install "test/data/example.las" - system "cmake", ".", *std_cmake_args, "-DWITH_GDAL=ON" - 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/pokerstove.rb b/Formula/pokerstove.rb deleted file mode 100644 index 6d2fbf8c35669..0000000000000 --- a/Formula/pokerstove.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Pokerstove < Formula - desc "Poker evaluation and enumeration software" - homepage "https://github.com/andrewprock/pokerstove" - url "https://github.com/andrewprock/pokerstove/archive/v1.0.tar.gz" - sha256 "68503e7fc5a5b2bac451c0591309eacecba738d787874d5421c81f59fde2bc74" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "db03f71aebe4fd46061765ae3659629ee42a5166f2dbb8b225f53b5baf7fbe62" => :catalina - sha256 "60f469d6ec2b39eac5d801c7968f56b21ddd0464ebc074964f6dacb4cd151b74" => :mojave - sha256 "49b7d8bcd4c54b42dbd311f94dcfb71ff04d3a1e273ecda213baaa562ad9b02b" => :high_sierra - sha256 "c78b16c6cfd9981df7ba66dd367f3b25181350d317e0ec00704a3b837383a8e8" => :sierra - end - - depends_on "cmake" => :build - depends_on "boost" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - bin.install Dir["bin/*"] - end - end - - test do - system bin/"peval_tests" - end -end diff --git a/Formula/polipo.rb b/Formula/polipo.rb deleted file mode 100644 index 2295ee77b87bd..0000000000000 --- a/Formula/polipo.rb +++ /dev/null @@ -1,83 +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" - license "MIT" - head "https://github.com/jech/polipo.git" - - bottle do - rebuild 2 - sha256 "c1806514cf77c3b9738131299f04a2c051617a3a44cd1aa4440ecd16103c5bad" => :catalina - sha256 "2653a1ffd719d82318a04fd94b8a2573714c03e974b43ae7b3df6ad4b9e410f3" => :mojave - sha256 "6fe78288ca28698ac07fd96d99fbbf311a6b410eb7150dfac5388564b76d4195" => :high_sierra - sha256 "7a943f9e9952d78c692d5ec155b407319181a6a66ee1367801f77da8f7bb8459" => :sierra - end - - # https://github.com/jech/polipo/commit/4d42ca1b5849518762d110f34b6ce2e03d6df9ec - deprecate! :date => "2016-11-06" - - 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 92311fe835165..0000000000000 --- a/Formula/polyglot.rb +++ /dev/null @@ -1,27 +0,0 @@ -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" - head "http://hgm.nubati.net/git/polyglot.git", :branch => "learn" - - bottle do - cellar :any_skip_relocation - sha256 "2c29c3f2dd2547bfb05fc123f997ac118fae9fccb4354d151ecdb9f4d056c792" => :catalina - 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 f2a16d81deb52..0000000000000 --- a/Formula/polyml.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Polyml < Formula - desc "Standard ML implementation" - homepage "https://www.polyml.org/" - url "https://github.com/polyml/polyml/archive/v5.8.tar.gz" - sha256 "6bcc2c5af91f361ef9e0bb28f39ce20171b0beae73b4db3674df6fc793cec8bf" - license "LGPL-2.1" - head "https://github.com/polyml/polyml.git" - - bottle do - rebuild 1 - sha256 "1439f4258d7fa8adfab0b037ae43c5effaffd9b1c7793c05f73a0f130b65d403" => :catalina - sha256 "356373c5c6483a552164e3aa815076688f37e41d74f8350a52321205f5d4547d" => :mojave - sha256 "d69da52fe77cd77d079de8ba2b389ced34800cebf55202d023c6800d584a5212" => :high_sierra - end - - # Patch for Xcode 11 - # https://github.com/polyml/polyml/pull/119 - patch do - url "https://github.com/polyml/polyml/commit/44efa473.diff?full_index=1" - sha256 "0835165da3f0b540c13e06d79dfdc4bcbcc4cde17207ea2e02978582552ee4d0" - end - - def install - system "./configure", "--disable-dependency-tracking", "--disable-debug", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end -end diff --git a/Formula/polynote.rb b/Formula/polynote.rb deleted file mode 100644 index 8108dfe9aa5e5..0000000000000 --- a/Formula/polynote.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Polynote < Formula - desc "The polyglot notebook with first-class Scala support" - homepage "https://polynote.org/" - url "https://github.com/polynote/polynote/releases/download/0.3.11/polynote-dist.tar.gz" - sha256 "3a35a828554709d61b29ded87af4214d1bbc2eb0ff9609b291559bb2f729dfc0" - license "Apache-2.0" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"] - - (bin/"polynote").write_env_script libexec/"polynote.jar", Language::Java.overridable_java_home_env - end - - test do - mkdir testpath/"notebooks" - - assert_predicate bin/"polynote", :exist? - 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 <<~EOS - listen: - host: 127.0.0.1 - port: #{port} - storage: - dir: #{testpath}/notebooks - EOS - - 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/pony-stable.rb b/Formula/pony-stable.rb deleted file mode 100644 index 234be086cac07..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.2.2.tar.gz" - sha256 "8fca5f0f600e695d648200a7492c5d8cea82581f4e4e138f0bb621911d9e4c13" - license "BSD-2-Clause" - head "https://github.com/ponylang/pony-stable.git" - - bottle do - cellar :any_skip_relocation - sha256 "1375ab1923d90e07e05071bad1effb66aef547bd6d9fd98a40afbdb65596471e" => :catalina - sha256 "1375ab1923d90e07e05071bad1effb66aef547bd6d9fd98a40afbdb65596471e" => :mojave - sha256 "caf0c823ba581ab0e669d0372c06d1cb74262f05334814a5f49370659aa030d1" => :high_sierra - 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 03cec66b72313..0000000000000 --- a/Formula/ponyc.rb +++ /dev/null @@ -1,39 +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.git", - :tag => "0.35.1", - :revision => "579475721b14487e225e57a64ecd44781d244b33" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "398704cb374f8197b391d1abe79f6937b47907ac79bff429c3c7c5436b7baf82" => :catalina - sha256 "32a740aba344f2f864dab4e95ed811ec5274a5dc0f72760bc0dc916b749d0b48" => :mojave - sha256 "4bff26ba76aef06e7d0f5aee757729d7494b8c98605fc06f994ea4de0b2f99f2" => :high_sierra - end - - depends_on "cmake" => :build - - def install - ENV.cxx11 - - 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 - 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 b03486f34c6d8..0000000000000 --- a/Formula/ponysay.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Ponysay < Formula - desc "Cowsay but with ponies" - homepage "https://github.com/erkin/ponysay/" - revision 5 - head "https://github.com/erkin/ponysay.git" - - stable do - url "https://github.com/erkin/ponysay/archive/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.diff?full_index=1" - sha256 "4343703851dee3ea09f153f57c4dbd1731e5eeab582d3316fbbf938f36100542" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "77e5eb82496f017ceec2250b454b536964aff0609e3ab2a4a785b9d9b62c5393" => :catalina - sha256 "30dbf5ef6f9aed9feaf26557e8c954eef25102e79c4c8c020d98d25bbb737bab" => :mojave - sha256 "78743696032607c87bd59c95f765d6e10f2758be4b152728ae3b9ddbfb16e5cd" => :high_sierra - end - - depends_on "gzip" => :build - depends_on "coreutils" - depends_on "python@3.8" - - uses_from_macos "texinfo" => :build - - 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.8"].opt_bin}/python3", - "install" - end - - test do - output = shell_output("#{bin}/ponysay test") - assert_match "test", output - assert_match "____", output - end -end diff --git a/Formula/poppler.rb b/Formula/poppler.rb deleted file mode 100644 index 567147dc05d1f..0000000000000 --- a/Formula/poppler.rb +++ /dev/null @@ -1,81 +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.90.0.tar.xz" - sha256 "94edb0ad3330b74d22caac807aa501e9cc61cbf45a8010625670428b51989685" - license "GPL-2.0" - head "https://anongit.freedesktop.org/git/poppler/poppler.git" - - bottle do - sha256 "cfc03c445b1ec6ab261e39a618154e42b28422dc96cb7ae1190792ece17c1202" => :catalina - sha256 "c86dea1bfd0b20b4e04d40f7ed648f7e4bf65e6f3389d32f44676e78a0b25f4d" => :mojave - sha256 "a609a176e9d035221425bf9993a89166cfb474656f1d7f2caae296ba287caa10" => :high_sierra - end - - 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" - - uses_from_macos "curl" - - 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 - - def install - ENV.cxx11 - - args = std_cmake_args + %w[ - -DBUILD_GTK_TESTS=OFF - -DENABLE_CMS=lcms2 - -DENABLE_GLIB=ON - -DENABLE_QT5=ON - -DENABLE_UNSTABLE_API_ABI_HEADERS=ON - -DWITH_GObjectIntrospection=ON - ] - - 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 - [ - "#{lib}/libpoppler-cpp.dylib", - "#{lib}/libpoppler-glib.dylib", - "#{lib}/libpoppler-qt5.dylib", - *Dir["#{bin}/*"], - ].each do |f| - macho = MachO.open(f) - macho.change_dylib("@rpath/#{libpoppler}", "#{lib}/#{libpoppler}") - macho.write! - end - 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 7a766f14545b6..0000000000000 --- a/Formula/popt.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Popt < Formula - desc "Library like getopt(3) with a number of enhancements" - homepage "https://github.com/rpm-software-management/popt" - url "http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.18.tar.gz" - sha256 "5159bc03a20b28ce363aa96765f37df99ea4d8850b1ece17d1e6ad5c24fdc5d1" - - bottle do - cellar :any - sha256 "a5cbf26e1779c73865c7785adc163117465d321338aa6970dd4980cff4a2ec91" => :catalina - sha256 "5d602602f195811a3ea8c29ce4540cca6e1f36890a08b5a262facf3f74a85cf1" => :mojave - sha256 "554ba881a515b18e53d1abd7f67a544af42d811ea14283e75b13ae5fc2056024" => :high_sierra - 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 - - 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; - } - EOS - 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/portaudio.rb b/Formula/portaudio.rb deleted file mode 100644 index b4242dd08496f..0000000000000 --- a/Formula/portaudio.rb +++ /dev/null @@ -1,58 +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 "fef3e25b903e0e22e1899afe1a456ccb8f372e7123c17eda90607cc5e98271b4" => :catalina - 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 58892b9547517..0000000000000 --- a/Formula/portmidi.rb +++ /dev/null @@ -1,36 +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 - rebuild 1 - sha256 "66b8773aa12201f7fa2bf44044ab32bdab1cdf763db870fde3f0bd7254c5d877" => :catalina - sha256 "2a6258da2f83b668c2ba85edd9e49313114af5bfb288ebc681bd4cde221279c6" => :mojave - sha256 "61f9a94aaca3f317c50e643b06617804d37798e32dd1cfcc1c24aecdc24aec75" => :high_sierra - end - - depends_on "cmake" => :build - - def install - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra || MacOS.version == :el_capitan - - 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 1f4555f9f15cd..0000000000000 --- a/Formula/posh.rb +++ /dev/null @@ -1,30 +0,0 @@ -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.1/posh-debian-0.14.1.tar.bz2" - sha256 "3c9ca430977d85ad95d439656269b878bd5bde16521b778c222708910d111c80" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "9a30988f801e9c31ad6fefd48a232a5c95990300eb396a4c32a991176f8350b6" => :catalina - sha256 "20157fe0e9ff5389d07f85079a3137112cd6ad5bff5081d247e8778a082281c8" => :mojave - sha256 "bfee90257c267d2bd68ec3501887901179f4464d3e6d5b9afb42580ef1db4677" => :high_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 67163cecc901b..0000000000000 --- a/Formula/poster.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e0afaa430ab84862c5a481145e73affbb572c008c1b40d6b8cd93eb465163b4e" => :catalina - 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 a45fd77f36710..0000000000000 --- a/Formula/postgis.rb +++ /dev/null @@ -1,116 +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-3.0.1.tar.gz" - sha256 "5a5432f95150d9bae9215c6d1c7bb354e060482a7c379daa9b8384e1d03e6353" - revision 3 - - bottle do - cellar :any - sha256 "185b59ee4d9bcd7ed6856a05fcf6833f2ad91c87e1240491d785ee573c9fc418" => :catalina - sha256 "cc8eee6692e663b13f5e66a5d8c6f9891fd99a42c5beaeefeca4b28bb8427fdc" => :mojave - sha256 "46b2eb2a7f002baaeffc49e14a0d1c2cf5d5c5d429b0dea5944e754cd00d8a44" => :high_sierra - end - - head do - url "https://git.osgeo.org/gitea/postgis/postgis.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "gpp" => :build - depends_on "pkg-config" => :build - depends_on "gdal" # for GeoJSON and raster handling - depends_on "geos" - depends_on "json-c" # for GeoJSON and raster handling - depends_on "pcre" - depends_on "postgresql" - depends_on "proj" - depends_on "protobuf-c" # for MVT (map vector tiles) support - depends_on "sfcgal" # for advanced 2D/3D functions - - 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", - "--with-protobufdir=#{Formula["protobuf-c"].opt_bin}", - # 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", - ] - - 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 - - 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/postgresql.rb b/Formula/postgresql.rb deleted file mode 100644 index 78caaf5ad3529..0000000000000 --- a/Formula/postgresql.rb +++ /dev/null @@ -1,128 +0,0 @@ -class Postgresql < Formula - desc "Object-relational database system" - homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v12.3/postgresql-12.3.tar.bz2" - sha256 "94ed64a6179048190695c86ec707cc25d016056ce10fc9d229267d9a8f1dcf41" - revision 4 - head "https://github.com/postgres/postgres.git" - - bottle do - sha256 "069912aa3d10ecb548eb2dddd7e3e1be61d1689d236b5993bce3e1a31811bcd0" => :catalina - sha256 "06eb65f3f17b6bf08344cbae35adc295f5c6da22420ee81d1e8fe2787e05a03b" => :mojave - sha256 "93e3b484a26931374ece4ee4f5abd4b3eac0a6e519d2fba696871f2342f0e513" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "icu4c" - - # GSSAPI provided by Kerberos.framework crashes when forked. - # See https://github.com/Homebrew/homebrew-core/issues/47494. - depends_on "krb5" - - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "libxml2" - uses_from_macos "libxslt" - uses_from_macos "perl" - - on_linux do - depends_on "util-linux" - end - - def install - ENV.prepend "LDFLAGS", "-L#{Formula["openssl@1.1"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@1.1"].opt_include} -I#{Formula["readline"].opt_include}" - - args = %W[ - --disable-debug - --prefix=#{prefix} - --datadir=#{HOMEBREW_PREFIX}/share/postgresql - --libdir=#{HOMEBREW_PREFIX}/lib - --includedir=#{HOMEBREW_PREFIX}/include - --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-tcl - --with-uuid=e2fs - ] - - # PostgreSQL by default uses xcodebuild internally to determine this, - # which does not work on CLT-only installs. - args << "PG_SYSROOT=#{MacOS.sdk_path}" if MacOS.sdk_root_needed? - - system "./configure", *args - system "make" - 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 - return if ENV["CI"] - - (var/"log").mkpath - (var/"postgres").mkpath - unless File.exist? "#{var}/postgres/PG_VERSION" - system "#{bin}/initdb", "--locale=C", "-E", "UTF-8", "#{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" unless ENV["CI"] - 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 6ff26567208bc..0000000000000 --- a/Formula/postgresql@10.rb +++ /dev/null @@ -1,132 +0,0 @@ -class PostgresqlAT10 < Formula - desc "Object-relational database system" - homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v10.13/postgresql-10.13.tar.bz2" - sha256 "4d701f450cd92ffb123cf6c296e9656abbc2ab7ea6507894ff1e2475ae0754e1" - revision 3 - - bottle do - sha256 "c812a9a2c22c61cbf408572a1a038ae5bac1c745eba15df0b0edf93543844813" => :catalina - sha256 "e4eb27c6604afda16097707ece291b7e4ce15d55f20e489c3a9d7e7d9bcc14da" => :mojave - sha256 "63157238b665f29e47a1a27aab8d707279d0d8dda4a60540c57ff804ec5c7a2f" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "icu4c" - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "libxslt" - uses_from_macos "perl" - - on_linux do - depends_on "util-linux" - end - - def install - ENV.prepend "LDFLAGS", "-L#{Formula["openssl@1.1"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@1.1"].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-tcl - --with-uuid=e2fs - ] - - # PostgreSQL by default uses xcodebuild internally to determine this, - # which does not work on CLT-only installs. - args << "PG_SYSROOT=#{MacOS.sdk_path}" if MacOS.sdk_root_needed? - - 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 - return if ENV["CI"] - - (var/"log").mkpath - (var/name).mkpath - system "#{bin}/initdb", "#{var}/#{name}" unless File.exist? "#{var}/#{name}/PG_VERSION" - 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" unless ENV["CI"] - 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@11.rb b/Formula/postgresql@11.rb deleted file mode 100644 index fdf3eaa94dc11..0000000000000 --- a/Formula/postgresql@11.rb +++ /dev/null @@ -1,124 +0,0 @@ -class PostgresqlAT11 < Formula - desc "Object-relational database system" - homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v11.8/postgresql-11.8.tar.bz2" - sha256 "eaf2f4329ccc349c89e950761b81daf8c99bb8966abcab5665ccd6ee95c77ae2" - revision 3 - - bottle do - sha256 "420e0588a9c7d13bd60dbd14cd825e3ab94e8190aceae83a326469c2069eccff" => :catalina - sha256 "0f53a997e555a3dd79d58494b0b5d5e11d0d01bb20db2084d544cc750125ab2b" => :mojave - sha256 "2e37db63328194a9445083afbbd2e6ef22535bd6b15ba4514ee231b75e5a74f0" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "icu4c" - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "libxml2" - uses_from_macos "libxslt" - uses_from_macos "perl" - - on_linux do - depends_on "util-linux" - end - - def install - ENV.prepend "LDFLAGS", "-L#{Formula["openssl@1.1"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@1.1"].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-bonjour - --with-gssapi - --with-icu - --with-ldap - --with-libxml - --with-libxslt - --with-openssl - --with-pam - --with-perl - --with-tcl - --with-uuid=e2fs - ] - - # PostgreSQL by default uses xcodebuild internally to determine this, - # which does not work on CLT-only installs. - args << "PG_SYSROOT=#{MacOS.sdk_path}" if 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" - end - - def post_install - return if ENV["CI"] - - (var/"log").mkpath - (var/name).mkpath - unless File.exist? "#{var}/#{name}/PG_VERSION" - system "#{bin}/initdb", "--locale=C", "-E", "UTF-8", "#{var}/#{name}" - 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@11 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" unless ENV["CI"] - 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 diff --git a/Formula/postgresql@9.4.rb b/Formula/postgresql@9.4.rb deleted file mode 100644 index cc0ea18c2c1b2..0000000000000 --- a/Formula/postgresql@9.4.rb +++ /dev/null @@ -1,121 +0,0 @@ -class PostgresqlAT94 < Formula - desc "Object-relational database system" - homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v9.4.26/postgresql-9.4.26.tar.bz2" - sha256 "f5c014fc4a5c94e8cf11314cbadcade4d84213cfcc82081c9123e1b8847a20b9" - - bottle do - rebuild 2 - sha256 "86d9c75e0454e8285764827fb24b96dc0cc75e07dfe7bb808fa3682629467aa6" => :catalina - sha256 "e90c1fd44cd76e40b5326fe7692466c4e21e2380e9856dea816ad8fc1a89ee5c" => :mojave - sha256 "0900dd52dda6b761f64e553274c2d3da33fefd38bfa0e06ed7e6df1636642d28" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! :date => "2020-02-13" - - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "libxslt" - uses_from_macos "perl" - - on_linux do - depends_on "util-linux" - end - - def install - # Fix "configure: error: readline library not found" - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra || MacOS.version == :el_capitan - - ENV.prepend "LDFLAGS", "-L#{Formula["openssl@1.1"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@1.1"].opt_include} -I#{Formula["readline"].opt_include}" - ENV.prepend "PG_SYSROOT", MacOS.sdk_path - 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 - 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 - - system "./configure", *args - system "make", "install-world" - end - - def post_install - return if ENV["CI"] - - (var/"log").mkpath - (var/name).mkpath - system "#{bin}/initdb", "#{var}/#{name}" unless File.exist? "#{var}/#{name}/PG_VERSION" - 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" unless ENV["CI"] - end -end diff --git a/Formula/postgresql@9.5.rb b/Formula/postgresql@9.5.rb deleted file mode 100644 index 48290d5d24d25..0000000000000 --- a/Formula/postgresql@9.5.rb +++ /dev/null @@ -1,139 +0,0 @@ -class PostgresqlAT95 < Formula - desc "Object-relational database system" - homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v9.5.22/postgresql-9.5.22.tar.bz2" - sha256 "48555470a17248cb204d25ab1ad4231ef16295db55161922f006b9942d69640f" - revision 2 - - bottle do - sha256 "33a794b7202e738223650d25749061b779dba8a88f34078ed2d966635605d234" => :catalina - sha256 "192a8daaddd008b006953bec273ae12e4c0238c4c0b34ec9f7008e15654234d3" => :mojave - sha256 "5948803273679d81c357096eabca041fbbaaf7689b5caba8d7b2b745434750a9" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "libxslt" - uses_from_macos "perl" - - on_linux do - depends_on "util-linux" - end - - def install - ENV.prepend "LDFLAGS", "-L#{Formula["openssl@1.1"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@1.1"].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-tcl - --with-uuid=e2fs - ] - - # PostgreSQL by default uses xcodebuild internally to determine this, - # which does not work on CLT-only installs. - args << "PG_SYSROOT=#{MacOS.sdk_path}" if MacOS.sdk_root_needed? - - 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 - return if ENV["CI"] - - (var/"log").mkpath - (var/name).mkpath - system "#{bin}/initdb", "#{var}/#{name}" unless File.exist? "#{var}/#{name}/PG_VERSION" - 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" unless ENV["CI"] - 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 ff4feef8f9d44..0000000000000 --- a/Formula/postgresql@9.6.rb +++ /dev/null @@ -1,139 +0,0 @@ -class PostgresqlAT96 < Formula - desc "Object-relational database system" - homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v9.6.18/postgresql-9.6.18.tar.bz2" - sha256 "517ec282b785e6d22f360c30ba0c5e2a506fca5ca07dcc545427511d94c89999" - revision 2 - - bottle do - sha256 "bb2dcc5e902d8a008ee4910b649859c9a1c36c379984fd154993f815845456b3" => :catalina - sha256 "1f8222b21e01eb165b53c1a1cfdfbef3fdb669078ec4104294d4816da5ab5fda" => :mojave - sha256 "10253285381fec67b3329251271a72e7d6011b6f622ad645b85b39a74a800ab8" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "libxslt" - uses_from_macos "perl" - - on_linux do - depends_on "util-linux" - end - - 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@1.1"].opt_lib} -L#{Formula["readline"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@1.1"].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-tcl - --with-uuid=e2fs - ] - - # PostgreSQL by default uses xcodebuild internally to determine this, - # which does not work on CLT-only installs. - args << "PG_SYSROOT=#{MacOS.sdk_path}" if MacOS.sdk_root_needed? - - 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 - return if ENV["CI"] - - (var/"log").mkpath - (var/name).mkpath - system "#{bin}/initdb", "#{var}/#{name}" unless File.exist? "#{var}/#{name}/PG_VERSION" - 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" unless ENV["CI"] - 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 7055cad0360ed..0000000000000 --- a/Formula/postgrest.rb +++ /dev/null @@ -1,64 +0,0 @@ -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/v7.0.1.tar.gz" - sha256 "12f621065b17934c474c85f91ad7b276bff46f684a5f49795b10b39eaacfdcaa" - license "MIT" - head "https://github.com/PostgREST/postgrest.git" - - bottle do - cellar :any - sha256 "691546e89701fd582d47c697dc27551ef3284ee21933a5912f406e6fee4dd272" => :catalina - sha256 "34c0413e71a41bc8550b7ea5286e0330aa888990d2e2a8fe6d81b57152c83d61" => :mojave - sha256 "6ca3bb9cd14c9ab4ddd028493e4ffd70ddae571be74723997b677c6c67542c87" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.8" => :build - depends_on "postgresql" - - def install - system "cabal", "v2-update" - system "cabal", "v2-install", *std_cabal_v2_args - end - - test do - return if ENV["CI"] - - pg_bin = Formula["postgresql"].bin - pg_port = free_port - 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 - port = free_port - 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 = #{port} - EOS - pid = fork do - exec "#{bin}/postgrest", "postgrest.config" - end - sleep 5 # Wait for the server to start - - output = shell_output("curl -s http://localhost:#{port}") - assert_match "200", output - 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 9958d5b1cd6ba..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://deb.debian.org/debian/pool/main/p/postmark/postmark_1.53.orig.tar.gz" - sha256 "8a88fd322e1c5f0772df759de73c42aa055b1cd36cbba4ce6ee610ac5a3c47d3" - - bottle do - cellar :any_skip_relocation - sha256 "3c588393d3075f1943d481a1db03af3835997d104357108f0812bc4ade44686f" => :catalina - 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 65ace4ec11d37..0000000000000 --- a/Formula/potrace.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Potrace < Formula - desc "Convert bitmaps to vector graphics" - homepage "https://potrace.sourceforge.io/" - url "https://potrace.sourceforge.io/download/1.16/potrace-1.16.tar.gz" - sha256 "be8248a17dedd6ccbaab2fcc45835bb0502d062e40fbded3bc56028ce5eb7acc" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "c3f357a8bd6460384400acd00dab0d8571ad0b1543a81e5b9d5ff49d1ece4fa1" => :catalina - sha256 "3ad69cce4edecea6e5170b766201845b703a98bbac3c5272ef6a045f828643e2" => :mojave - sha256 "56d821a4d3579bedf64ebf5357fc04f214cb2efbea7ddb681b202e684e71d97e" => :high_sierra - 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/povray.rb b/Formula/povray.rb deleted file mode 100644 index 809513f26cf30..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" - license "AGPL-3.0" - revision 1 - - bottle do - rebuild 1 - sha256 "a882f103b0ad016cbafa13cc1fd028046b337590feff3e6188bb574f1e328488" => :catalina - 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 "openexr" - - 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/powerline-go.rb b/Formula/powerline-go.rb deleted file mode 100644 index 565b620a71baf..0000000000000 --- a/Formula/powerline-go.rb +++ /dev/null @@ -1,24 +0,0 @@ -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/v1.17.0.tar.gz" - sha256 "d7825168044159dfdd3983519ea26cf8753f24c3d8c0600ce494c4a6db7a015f" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "85b3fb674ef3946a25e14c89239effff331e6fd9de986932537066d42e62072f" => :catalina - sha256 "789998f2e911d299619dc48ef5065daa6c376ac79ecae129c7fa34bd1b5b95e8" => :mojave - sha256 "48fb69d4fc789942392ee92d5c284c819cd02d50d101739f30a8f2a2506f16af" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", *std_go_args - end - - test do - system "#{bin}/#{name}" - end -end diff --git a/Formula/powerman.rb b/Formula/powerman.rb deleted file mode 100644 index 02fb10df044ba..0000000000000 --- a/Formula/powerman.rb +++ /dev/null @@ -1,40 +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.26/powerman-2.3.26.tar.gz" - sha256 "19e213127f468b835165b8e2082ff2dfff62d6832f3332160f2c6ba8b2d286ad" - license "GPL-2.0" - - bottle do - sha256 "aaa93f0be2fa1d4092c2d06cec0b7fbcc00d4817ff2d6dc4601301a8cb3917fc" => :catalina - sha256 "a2d26575a0a9816dc1f8b0b212531c8ea455a6c8322a42d5fb2630e3a2f85b1b" => :mojave - sha256 "9dd898b2222ba55a6c2aeb4e4414d6eb68d9c9e19794da533b4d1bd6970e6469" => :high_sierra - 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 7552e58d11b25..0000000000000 --- a/Formula/ppl.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Ppl < Formula - desc "Parma Polyhedra Library: numerical abstractions for analysis, verification" - homepage "https://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" - - bottle do - rebuild 1 - sha256 "dd7a6ceafb1719f8aa5968cc4b05f18e1fe1ec37256db061776fc3afb2280e6a" => :catalina - 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/pprint.rb b/Formula/pprint.rb deleted file mode 100644 index 89b1de6e21888..0000000000000 --- a/Formula/pprint.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Pprint < Formula - desc "Pretty printer for modern C++" - homepage "https://github.com/p-ranav/pprint" - url "https://github.com/p-ranav/pprint/archive/v0.9.1.tar.gz" - sha256 "b9cc0d42f7be4abbb50b2e3b6a89589c5399201a3dc1fd7cfa72d412afdb2f86" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "3106733d3d77033431baf9eac61d8cf4b293f48584858ba058d711a045512530" => :catalina - sha256 "8d6d70f63ecea106323bdd852c1c896f32bf9895c3164680b594c0f8a30c1561" => :mojave - sha256 "8d6d70f63ecea106323bdd852c1c896f32bf9895c3164680b594c0f8a30c1561" => :high_sierra - end - - depends_on :macos => :high_sierra # needs C++17 - - def install - include.install "include/pprint.hpp" - pkgshare.install "test" - end - - test do - cp_r pkgshare/"test", testpath - cd "test" do - system ENV.cxx, "--std=c++17", "-I#{testpath}/test", "main.cpp", "-o", "tests" - system "./tests" - end - 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 abcb46fe7332a..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.10.2", - :revision => "9ec2c2baff0894d2b998254d52389d253d1dd386" - head "https://github.com/hrydgard/ppsspp.git" - - bottle do - cellar :any - sha256 "8623d7ac5d3574354f3be6ef61c5cbffd85973012fc3aa6eb120101232da8e0e" => :catalina - sha256 "109cb8b7fe97cc03aa85191d2fb2fc8e138c06924421ec036c53b12e80339c8b" => :mojave - sha256 "9fb3845730765b47e238267395ad55e030c4634c291fc68fb9f008119202fada" => :high_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 66af9590d9b83..0000000000000 --- a/Formula/pqiv.rb +++ /dev/null @@ -1,33 +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" - license "GPL-3.0" - revision 4 - head "https://github.com/phillipberndt/pqiv.git" - - bottle do - cellar :any - sha256 "406bf15556cbc6f3d23f20784f7f8de5c7338675e48ce7237fb9759ad348ebd5" => :catalina - sha256 "c7f56c5b90ce529d8da4e09f7a8d502c49fb3bf15ca7a7a3fe824001f0a4236e" => :mojave - sha256 "b2b084b475294c9ad63da9c073aceaaaaa26d6f1bb6f8a0cd37898b670a9703d" => :high_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 d65d63a284ee6..0000000000000 --- a/Formula/pre-commit.rb +++ /dev/null @@ -1,121 +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/v2.6.0.tar.gz" - sha256 "2e97b47762f75a2dbbb863cfe824ffab6782fc2bb6763e83876efa6164665038" - license "MIT" - - bottle do - cellar :any - sha256 "07f783f5e5d2de8b0422862ff4d42ff640eacba5f5aee8f827a7420bafe1608d" => :catalina - sha256 "81b50ee8b4627c98dd5fd5ce891db89fc4831fdee8402807c02699ec4b449c76" => :mojave - sha256 "abec3b65eb9d7f5f6f7be12bbbbfe19d14bd5bfb0aeafd00c630b01aff8be317" => :high_sierra - end - - depends_on "libyaml" - depends_on "python@3.8" - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" - sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" - end - - resource "cfgv" do - url "https://files.pythonhosted.org/packages/88/e8/159f95e454d6c35d2fc238ca056497672b8d93c3dab568a9b13e7a602331/cfgv-3.1.0.tar.gz" - sha256 "c8e8f552ffcc6194f4e18dd4f68d9aef0c0d58ae7e7be8c82bee3c5e9edfa513" - end - - resource "distlib" do - url "https://files.pythonhosted.org/packages/2f/83/1eba07997b8ba58d92b3e51445d5bf36f9fba9cb8166bcae99b9c3464841/distlib-0.3.1.zip" - sha256 "edf6116872c863e1aa9d5bb7cb5e05a022c519a4594dc703843343a9ddd9bff1" - end - - resource "filelock" do - url "https://files.pythonhosted.org/packages/14/ec/6ee2168387ce0154632f856d5cc5592328e9cf93127c5c9aeca92c8c16cb/filelock-3.0.12.tar.gz" - sha256 "18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59" - end - - resource "identify" do - url "https://files.pythonhosted.org/packages/e8/fc/452629ae3cc3a2c5be5d21ab1bccc84ab0076f6adffeebe4771b6e8d69ee/identify-1.4.21.tar.gz" - sha256 "c4d07f2b979e3931894170a9e0d4b8281e6905ea6d018c326f7ffefaf20db680" - end - - resource "nodeenv" do - url "https://files.pythonhosted.org/packages/00/6e/ed417bd1ed417ab3feada52d0c89ab0ed87d150f91590badf84273e047c9/nodeenv-1.3.3.tar.gz" - sha256 "ad8259494cf1c9034539f6cced78a1da4840a4b157e23640bc4a0c0546b0cb7a" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "toml" do - url "https://files.pythonhosted.org/packages/da/24/84d5c108e818ca294efe7c1ce237b42118643ce58a14d2462b3b2e3800d5/toml-0.10.1.tar.gz" - sha256 "926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f" - end - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/d2/58/6afb5bd05c610e378eb8f1188896fd0a19dfe99d84613cdb60f2ca5cf0ef/virtualenv-20.0.25.tar.gz" - sha256 "f332ba0b2dfbac9f6b1da9f11224f0036b05cdb4df23b228527c2a2d5504aeed" - end - - def install - # Point hook shebang to virtualenv Python. - # The global one also works - but may be keg-only. - # A full path can also move around if we use versioned formulae. - # Git hooks should only have to be installed once and never need changing. - inreplace "pre_commit/commands/install_uninstall.py", - "f'#!/usr/bin/env {py}'", - "'#!#{opt_libexec}/bin/python3'" - - # Avoid Cellar path reference, which is only good for one version. - inreplace "pre_commit/commands/install_uninstall.py", - "'INSTALL_PYTHON': sys.executable", - "'INSTALL_PYTHON': '#{opt_libexec}/bin/python3'" - - 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 - 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 f415e32297df4..0000000000000 --- a/Formula/precomp.rb +++ /dev/null @@ -1,34 +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.7.tar.gz" - sha256 "b4064f9a18b9885e574c274f93d73d8a4e7f2bbd9e959beaa773f2e61292fb2b" - license "Apache-2.0" - head "https://github.com/schnaader/precomp-cpp.git" - - bottle do - cellar :any_skip_relocation - sha256 "9ac9f156315ae463a1e378bdd9ed06d5f36437ccff4505740dfa10ee914b5adf" => :catalina - sha256 "7488435759867b2bb152cdd3ea78d2358659b34ff838e2cb97b54bd3a322147b" => :mojave - sha256 "92824cc03c547d276436e1bdf55e905d402f77eeccf61f25a720d4315e5bd4cf" => :high_sierra - sha256 "5d852d83cf57987a521471b74e450a65473ed20e32bb14e83b5d99e969e37458" => :sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - 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 ca6a58f7f8cde..0000000000000 --- a/Formula/predictionio.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Predictionio < Formula - desc "Source machine learning server" - homepage "https://predictionio.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=predictionio/0.14.0/apache-predictionio-0.14.0-bin.tar.gz" - mirror "https://archive.apache.org/dist/predictionio/0.14.0/apache-predictionio-0.14.0-bin.tar.gz" - sha256 "049c9147ad9a6e2beddc2befcac5c73071845b2150c05a71118164c975de6ed7" - - bottle :unneeded - - depends_on "apache-spark" - depends_on "elasticsearch@6.8" - depends_on "hadoop" - depends_on "hbase" - depends_on :java => "1.8" - - def install - rm_f Dir["bin/*.bat"] - - libexec.install Dir["*"] - (bin/"pio").write_env_script libexec/"bin/pio", Language::Java.java_home_env("1.8") - - inreplace libexec/"conf/pio-env.sh" do |s| - s.gsub! /#\s*ES_CONF_DIR=.+$/, "ES_CONF_DIR=#{Formula["elasticsearch@6.8"].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 442940406eca4..0000000000000 --- a/Formula/prefixsuffix.rb +++ /dev/null @@ -1,34 +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 5 - - bottle do - sha256 "24dc25fc90c2e0187c5ac94ea89856516c3a10573821c0f72f4154ce5694285a" => :catalina - sha256 "cae14def9ca8939d6fc3dcf5c249c7a8e6af3d1bfd9f790157b52dae7b09e901" => :mojave - sha256 "e216a904a8f6e6d2345767d04aac870ecd6efdd95aecb1b031644c3c90d56ec0" => :high_sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "gtkmm3" - - 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 7f1ecd32d4d46..0000000000000 --- a/Formula/premake.rb +++ /dev/null @@ -1,43 +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" - license "BSD-3-Clause" - version_scheme 1 - head "https://github.com/premake/premake-core.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "cf128251e2798e7fd65919002b3adc627537c969dfaf62021ec6cd78fb7eeb12" => :catalina - sha256 "b5fe3f9495148d2f374b048e72cfc3114be0195a9954d57c8c298fca568d2896" => :mojave - sha256 "79e1f3b9c8ba609685ee343f2022aae2fb02cacecc84e44d817014fe7d3dabfc" => :high_sierra - end - - # See: https://groups.google.com/g/premake-development/c/i1uA1Wk6zYM/m/kbp9q4Awu70J - deprecate! :date => "2015-05-28" - - 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 a2d351435c50e..0000000000000 --- a/Formula/prest.rb +++ /dev/null @@ -1,30 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "45be2821fcaa9e3d978d041b91ae6157306ee73f6924b0cb0c7ad7e4eb2b3254" => :catalina - sha256 "bdffe99b9524f0bf10cb23e6a25c3a8eafab8ede6f8303bcb100a8097db9ba23" => :mojave - sha256 "6a79ee6fc88b5a450348d977b8adf0d14c80aa5ba0bbd22375d1795cf3d8e070" => :high_sierra - sha256 "3b6a51b5a9c9ee58510fd70416dc8953f037e3575a255b6171363d2364bce1be" => :sierra - sha256 "e0ec971459deb768c19460db26246dcd2ea71baa34706052d0a4f572bff9606d" => :el_capitan - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", - "-s -w -X github.com/prest/helpers.PrestVersionNumber=#{version}", - "-trimpath", - "-o", bin/"prest" - prefix.install_metafiles - end - - test do - assert_match version.to_s, shell_output("#{bin}/prest version") - end -end diff --git a/Formula/prestodb.rb b/Formula/prestodb.rb deleted file mode 100644 index 528f69273250a..0000000000000 --- a/Formula/prestodb.rb +++ /dev/null @@ -1,111 +0,0 @@ -class Prestodb < 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.235.1/presto-server-0.235.1.tar.gz" - sha256 "862871609b14eb5259530de04f1a1ed69e3bb3b172490f2a1585f8f31fd9453e" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - conflicts_with "prestosql", :because => "both install `presto` and `presto-server` binaries" - - resource "presto-cli" do - url "https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-cli/0.235.1/presto-cli-0.235.1-executable.jar" - sha256 "22deb730fd593eef83f3204d1b9a925eded2a6fb8a06e88b11a5e1e3d82855a8" - 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 - -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" - - (bin/"presto-server").write <<~EOS - #!/bin/bash - export JAVA_HOME="#{Formula["openjdk"].opt_prefix}" - exec "#{libexec}/bin/launcher" "$@" - EOS - - resource("presto-cli").stage do - libexec.install "presto-cli-#{version}-executable.jar" - (bin/"presto").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/presto-cli-#{version}-executable.jar" "$@" - EOS - end - 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 - - 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_match "Presto CLI #{version}", shell_output("#{bin}/presto --version").chomp - end -end diff --git a/Formula/prestosql.rb b/Formula/prestosql.rb deleted file mode 100644 index 193c096107d55..0000000000000 --- a/Formula/prestosql.rb +++ /dev/null @@ -1,110 +0,0 @@ -class Prestosql < Formula - desc "Distributed SQL query engine for big data" - homepage "https://prestosql.io/" - url "https://search.maven.org/remotecontent?filepath=io/prestosql/presto-server/338/presto-server-338.tar.gz" - sha256 "d07e29c3a24b317a0c37694e36e1c57effd2325502873aeb84eaf98d51c6691c" - - bottle :unneeded - - depends_on "openjdk" - - conflicts_with "prestodb", :because => "both install `presto` and `presto-server` binaries" - - resource "presto-cli" do - url "https://search.maven.org/remotecontent?filepath=io/prestosql/presto-cli/338/presto-cli-338-executable.jar" - sha256 "ef1c2254de73f70e1402e1854838f630438bd99b9004a630d34b50817fade7bc" - end - - def install - libexec.install Dir["*"] - - (libexec/"etc/node.properties").write <<~EOS - node.environment=dev - node.id=dev - node.data-dir=#{var}/presto/data - EOS - - (libexec/"etc/jvm.config").write <<~EOS - -XX:+UseG1GC - -XX:G1HeapRegionSize=32M - -XX:+ExplicitGCInvokesConcurrent - -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=1GB - query.max-memory-per-node=1GB - discovery-server.enabled=true - discovery.uri=http://localhost:8080 - EOS - - (libexec/"etc/log.properties").write <<~EOS - io.prestosql=INFO - EOS - - (libexec/"etc/catalog/jmx.properties").write <<~EOS - connector.name=jmx - EOS - - (bin/"presto-server").write <<~EOS - #!/bin/bash - export JAVA_HOME="#{Formula["openjdk"].opt_prefix}" - exec "#{libexec}/bin/launcher" "$@" - EOS - - resource("presto-cli").stage do - libexec.install "presto-cli-#{version}-executable.jar" - (bin/"presto").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/presto-cli-#{version}-executable.jar" "$@" - EOS - end - end - - def post_install - (var/"presto/data").mkpath - end - - def caveats - <<~EOS - Add connectors to #{opt_libexec}/etc/catalog/. See: - https://prestosql.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_match "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 0e6ada96b5447..0000000000000 --- a/Formula/prettier.rb +++ /dev/null @@ -1,30 +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-2.0.5.tgz" - sha256 "6d8af960b3a47645bc897da4bbbf6923de82f7809990cf44e8e4d8077828893f" - license "MIT" - head "https://github.com/prettier/prettier.git" - - bottle do - cellar :any_skip_relocation - sha256 "b1e20fc9be32da04ea3a5d5dbb4153a4589689a2ec5c1a696b0ae01d4c77422b" => :catalina - sha256 "527a6b93bded9ee87b89d8fbb9b9116fcb5e93924e85189630754acf48565efa" => :mojave - sha256 "26a0d0f1879743b66781123895941cb849b38a636be3213dd0dd2ed0b2685250" => :high_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 dca8c1348b118..0000000000000 --- a/Formula/prettyping.rb +++ /dev/null @@ -1,25 +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" - license "MIT" - - 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 d1128e754870e..0000000000000 --- a/Formula/primer3.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "34845e20a0946fd5bc34d281766abddf173a836b492048e20488af58647904d7" => :catalina - 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 0506e97b2ae77..0000000000000 --- a/Formula/primesieve.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Primesieve < Formula - desc "Fast C/C++ prime number generator" - homepage "https://github.com/kimwalisch/primesieve" - url "https://github.com/kimwalisch/primesieve/archive/v7.5.tar.gz" - sha256 "fbc4070b2af4b87e2cff7ce3434f79af04d843594be43bba14293674475ec03c" - license "BSD-2-Clause" - - bottle do - cellar :any - sha256 "93a49e499f6cca69e9bc62e64e3bbf51fd9c8ab3c51e6ba15b6a1ab3feb4d2e8" => :catalina - sha256 "7070ec9a601335d1844820e722c346b9d7003ce80af4450f631521a023c291bc" => :mojave - sha256 "46185fc5980d6e411f4073ea330735498d918bb25dc65cb90909bb41749e8756" => :high_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 3bf3b196b881b..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.1.tar.xz" - sha256 "16efeac69b8bd9d13c80ec365ea66bc3bb8326dc23975acdac03184ee8da63a8" - - bottle do - cellar :any_skip_relocation - sha256 "06f354f3564aa9aa391d56b952fb97056c911f32232f6afeefcb23bce5a8bc0c" => :catalina - sha256 "771e030cbbf61a7914af375462d24bc2fccb6e60e8959110906e23544aacbb17" => :mojave - sha256 "ecf0f743bfaffc303c8f520f5f29f10917b63708866fc50553c10f6952c5e06e" => :high_sierra - sha256 "65a400f8d42e7c38cbc26898dadf3110b0aad7e347ba40585f398d4bcc696d04" => :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 6aa43cdca9fbb..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.28%20%28stable%29/privoxy-3.0.28-stable-src.tar.gz" - sha256 "b5d78cc036aaadb3b7cf860e9d598d7332af468926a26e2d56167f1cb6f2824a" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "27fe56112d9fda97417f830b4c17a5066b4389f7831db250a702c91d8df62131" => :catalina - sha256 "01d3b6f679a5819786936626ed093773d68094aa16a8969bf912a507690043f1" => :mojave - sha256 "1dfa322367c0f6e5013f2a08fe12a825d4627b2c23aba0aecc94e65e10904700" => :high_sierra - sha256 "cd9a919132c032f335f6c7bce15fc5a6abb24fbd56f7ee51884ea30aac710b67" => :sierra - 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:#{free_port}" - (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 d7c372aa7aafd..0000000000000 --- a/Formula/procmail.rb +++ /dev/null @@ -1,38 +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 "a7f6ee9550f27ea88322a4c4c88b04421e6d2c676248a914571a2fbffd6d425f" => :catalina - 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/procs.rb b/Formula/procs.rb deleted file mode 100644 index a4e7f8fc9663a..0000000000000 --- a/Formula/procs.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Procs < Formula - desc "Modern replacement for ps written by Rust" - homepage "https://github.com/dalance/procs" - url "https://github.com/dalance/procs/archive/v0.10.3.tar.gz" - sha256 "cbb31a3a94b0c697aeb687f103c9128b3fed006cd0c802fb47f5c67415c32181" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "e4d64cc107a0b3c5a897655778eb3a1b10a30e2ed065c57c8f7e566ad75eccfb" => :catalina - sha256 "4885c058e98ae2a7a7bca686fb6ba1b9a14e760b4bcf4bd4aace931088b382a8" => :mojave - sha256 "88010001010a5d2b4e30a5e3adf5ba4e75e72d4ccb7bf8da78c326e09e928d4f" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - 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/proctools.rb b/Formula/proctools.rb deleted file mode 100644 index ee84c572fdc0f..0000000000000 --- a/Formula/proctools.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Proctools < Formula - desc "OpenBSD and Darwin versions of pgrep, pkill, and pfind" - 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 "f0fe70530d22c270ac3d5a105f2dbbbb0dc6a664acd03f3ad7da3f86255fd548" => :catalina - 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 2bbee3f582a4c..0000000000000 --- a/Formula/procyon-decompiler.rb +++ /dev/null @@ -1,34 +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.36.jar" - sha256 "74f9f1537113207521a075fafe64bd8265c47a9c73574bbf9fa8854bbf7126bc" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "procyon-decompiler-#{version}.jar" - (bin/"procyon-decompiler").write <<~EOS - #!/bin/bash - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - exec "${JAVA_HOME}/bin/java" -jar "#{libexec}/procyon-decompiler-#{version}.jar" "$@" - EOS - 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 "#{Formula["openjdk"].bin}/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 d98bad8e81944..0000000000000 --- a/Formula/prodigal.rb +++ /dev/null @@ -1,28 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "5cebc25d98ba4439aa810c4e05c9f30e7ecf768035d135d0989cf58c18517a87" => :catalina - 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 b90f770e6c742..0000000000000 --- a/Formula/profanity.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Profanity < Formula - desc "Console based XMPP client" - homepage "https://profanity-im.github.io/" - url "https://profanity-im.github.io/profanity-0.9.5.tar.gz" - sha256 "23f7b2e5c6cf85913b9e7a228802bca9ecb1d1cf3bf8f8f285e9676176a24902" - - bottle do - sha256 "b53f7fbd103d911f55337861bf36957cfaead39e8c38478ed03eceb41b507872" => :catalina - sha256 "7112d51c1a187ca47b6d245d5600b46b3f0765efd5f2a215ce1a2d2327f2b884" => :mojave - sha256 "21837ee57161928d0389dcd7170245b61e0d2f2c8b2f702dc6127bd98380b477" => :high_sierra - 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 "libsignal-protocol-c" - depends_on "libstrophe" - depends_on "openssl@1.1" - depends_on "readline" - depends_on "terminal-notifier" - - uses_from_macos "curl" - - 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 bc72d5bbc3a3c..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.6d.tar.gz" - mirror "https://fossies.org/linux/misc/proftpd-1.3.6d.tar.gz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/proftpd/proftpd-1.3.6d.tar.gz" - sha256 "c338e2e25d1b6f51d397af154a0124fc42eee6b7ff99a2d976777d6b2f97c096" - license "GPL-2.0" - - bottle do - sha256 "64921070d5fec1b23e70f1f94083278005c3075e60064e2bb6842837a5f47f70" => :catalina - sha256 "c1152fa9b77042914ba1c3d80cc365058d0c497ff817d5f3028e4b61ee7fd5aa" => :mojave - sha256 "1168e663193462a081b1f19cf9813ee007b80ed22187f2b81e3c8eaa84536d42" => :high_sierra - 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 89f4cd4b9da06..0000000000000 --- a/Formula/progress.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Progress < Formula - desc "Progress: Coreutils Progress Viewer" - homepage "https://github.com/Xfennec/progress" - url "https://github.com/Xfennec/progress/archive/v0.15.tar.gz" - sha256 "1ed0ac65a912ef1aa605d524eaddaacae92079cf71182096a7c65cbc61687d1b" - license "GPL-3.0" - head "https://github.com/Xfennec/progress.git" - - bottle do - cellar :any_skip_relocation - sha256 "104d62681c513b6c3e7d997245768d7e2e3941ab43dc37fb67b33bb188e4acc4" => :catalina - sha256 "62ea2e563eac2c9c9ad6f8eb3d5565024b2e303313c6d5cf509901893ee01d32" => :mojave - sha256 "699d0712e633d357dbd853e797e94f85bee3af00f70b9e206fe6335d620b8e5c" => :high_sierra - end - - uses_from_macos "ncurses" - - on_linux do - depends_on "pkg-config" => :build - 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 dc54ef19deaa1..0000000000000 --- a/Formula/proguard.rb +++ /dev/null @@ -1,31 +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.2/proguard6.2.2.tar.gz" - sha256 "e38c56f2e96809686e1584f21d4f95ed2433ff1a80406174d44e52c27b36fadd" - - bottle :unneeded - - 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 ] [-verbose] [] - EOS - assert_equal expect, pipe_output("#{bin}/retrace 2>&1") - end -end diff --git a/Formula/proj.rb b/Formula/proj.rb deleted file mode 100644 index 37831630a5c1d..0000000000000 --- a/Formula/proj.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Proj < Formula - desc "Cartographic Projections Library" - homepage "https://proj.org/" - url "https://github.com/OSGeo/PROJ/releases/download/7.1.0/proj-7.1.0.tar.gz" - sha256 "876151e2279346f6bdbc63bd59790b48733496a957bccd5e51b640fdd26eaa8d" - - bottle do - sha256 "53ecef2f47a68f3408c6c1e4c1abe1fdd3359419b8aca0e307f5da6f4c878ec2" => :catalina - sha256 "4ff4088f982c26e43fd33e6eeef921a4731620ad55b8b3f91df1fc3fcdf3474f" => :mojave - sha256 "c68d5683285b248ef35d7709adf5f35ed0ca8158a633e6887a6990af65f03a85" => :high_sierra - end - - head do - url "https://github.com/OSGeo/proj.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "pkg-config" => :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 "datumgrid" do - url "https://download.osgeo.org/proj/proj-datumgrid-1.8.zip" - sha256 "b9838ae7e5f27ee732fb0bfed618f85b36e8bb56d7afb287d506338e9f33861e" - end - - def install - (buildpath/"nad").install resource("datumgrid") - 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 - - output = shell_output("#{bin}/proj +proj=poly +ellps=clrk66 -r #{testpath}/test") - assert_equal match, output - end -end diff --git a/Formula/prometheus.rb b/Formula/prometheus.rb deleted file mode 100644 index 29aa476a6f98c..0000000000000 --- a/Formula/prometheus.rb +++ /dev/null @@ -1,96 +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.19.2.tar.gz" - sha256 "d4e84cae2fed6761bb8a80fcc69b6e0e9f274d19dffc0f38fb5845f11da1bbc3" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "8f12c62113b4add31c0563a7e138c0869cb79aabbb3bb0c7c42f23124a1059d5" => :catalina - sha256 "7dab6c84d32701cb3b4af3280394a5e5ad2bebd9df0cef07c506a5d4e74b68ff" => :mojave - sha256 "cb394f6c68700a46fcfe83cff5fb666d1212be1e9d84e70968d626c9570bfc09" => :high_sierra - end - - depends_on "go" => :build - depends_on "node" => :build - depends_on "yarn" => :build - - def install - 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] - libexec.install %w[consoles console_libraries] - - (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 <<~EOS - global: - scrape_interval: 15s - - scrape_configs: - - job_name: "prometheus" - static_configs: - - targets: ["localhost:9090"] - EOS - 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 - - plist_options :manual => "prometheus" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/prometheus_brew_services - - 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 bf7228d362d1a..0000000000000 --- a/Formula/proof-general.rb +++ /dev/null @@ -1,52 +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" - license "GPL-2.0" - revision 2 - head "https://github.com/ProofGeneral/PG.git" - - bottle do - cellar :any_skip_relocation - rebuild 3 - sha256 "ccc115760830d046c9e53277a571f451eb251c9b10c09589c627f146f4a9a4dd" => :catalina - sha256 "ccc115760830d046c9e53277a571f451eb251c9b10c09589c627f146f4a9a4dd" => :mojave - sha256 "ccc115760830d046c9e53277a571f451eb251c9b10c09589c627f146f4a9a4dd" => :high_sierra - 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/proper.rb b/Formula/proper.rb deleted file mode 100644 index 8333a98496fb2..0000000000000 --- a/Formula/proper.rb +++ /dev/null @@ -1,27 +0,0 @@ -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/v1.3.tar.gz" - sha256 "7e59eeaef12c07b1e42b0891238052cd05cbead58096efdffa3413b602cd8939" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "34011621b0cd440a49ee2c13d0bd968b7cf8ed8b0b817fbd6793082de5d4728c" => :catalina - sha256 "a93bfdd9a7558b9ad0cc013f3aca0cadfe86535948730ab6861c10931cae4b92" => :mojave - sha256 "f9f6404b3c025d06fb1b6ab0155716fe5f59f337ac6884b92d4ac01d6677b4c7" => :high_sierra - sha256 "a80e754b0bb2ce17d223034734cd1aa473532ba743cf45cbff89fa154af18220" => :sierra - end - - depends_on "erlang" - - def install - system "make" - prefix.install Dir["ebin", "include"] - end - - test do - output = shell_output("erl -noshell -pa #{opt_prefix}/ebin -eval 'io:write(code:which(proper))' -s init stop") - assert_not_equal "non_existing", output - end -end diff --git a/Formula/proselint.rb b/Formula/proselint.rb deleted file mode 100644 index ab2a97a0572b8..0000000000000 --- a/Formula/proselint.rb +++ /dev/null @@ -1,44 +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" - license "BSD-3-Clause" - revision 3 - head "https://github.com/amperser/proselint.git" - - bottle do - cellar :any_skip_relocation - sha256 "16677bb488b626f2a5ebab9c85b52e5aa34501861aaf146dd093fdeab9c8d7af" => :catalina - sha256 "2cb69c3b259812c1eeb11cc83ec7fcd5d0e6a01485a784ecdb76c75e55a5ad18" => :mojave - sha256 "51b225461669feb8926219f46de1fa4c438e875e9b6b9669f9191bd883679617" => :high_sierra - end - - depends_on "python@3.8" - - 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/proteinortho.rb b/Formula/proteinortho.rb deleted file mode 100644 index d0b403fdfde2c..0000000000000 --- a/Formula/proteinortho.rb +++ /dev/null @@ -1,28 +0,0 @@ -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.0.18/proteinortho-v6.0.18.tar.gz" - sha256 "c9157bd6c6498d5d54af86acd2a55217c3815177848dc1d4e1e29c514950c00e" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "0fcf6e8d97c506df8f11515c1b1612011a109a4193d8e0ebe8502ccc9318f61a" => :catalina - sha256 "b4c0ff1c19c7b33e6734523c0366722e3c7f58e8b432d7f62fc326d0cffa9d5a" => :mojave - sha256 "ae25e2ee3f4abee2b98cf274f60715e635a301867b852ab3c8c57bcf887cd615" => :high_sierra - end - - depends_on "diamond" - depends_on "openblas" - - def install - bin.mkpath - system "make", "install", "PREFIX=#{bin}" - doc.install "manual.html" - end - - test do - system "#{bin}/proteinortho", "-test" - system "#{bin}/proteinortho_clustering", "-test" - end -end diff --git a/Formula/protobuf-c.rb b/Formula/protobuf-c.rb deleted file mode 100644 index 570aa26c3de44..0000000000000 --- a/Formula/protobuf-c.rb +++ /dev/null @@ -1,39 +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.3/protobuf-c-1.3.3.tar.gz" - sha256 "22956606ef50c60de1fabc13a78fbc50830a0447d780467d3c519f84ad527e78" - revision 1 - - bottle do - cellar :any - sha256 "2af1cf51bac889177c41922236c9a1433749952e4bc76e7a7493bb9c96745319" => :catalina - sha256 "0a8fc62ce9acd99178e21afc4a994cb762c9e13a3d3fec887a19ab0706f9acc8" => :mojave - sha256 "1a66fd256c32caaff9e52748fd7f9987580b36425682d5a6263c0c0db011c405" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "protobuf" - - 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 ab1d2a9efdbe8..0000000000000 --- a/Formula/protobuf-swift.rb +++ /dev/null @@ -1,54 +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" - revision 2 - - bottle do - cellar :any - sha256 "25b96487d0f0d21de51d379e8d81e2dcc9eaf0252e779c9b340de0d089918f26" => :mojave - sha256 "33f57aa9d49598a5101de975b92507964493da967b7a3738e91a64dd8a663180" => :high_sierra - sha256 "42327634f717f0f9276d61af56df6a4595eea57f17d779f405703fdecae55bed" => :sierra - end - - # https://github.com/Homebrew/homebrew-core/pull/54471#issuecomment-627430555 - disable! - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "protobuf@3.7" - - conflicts_with "swift-protobuf", - :because => "both install `protoc-gen-swift` binaries" - - 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 915b3dbaaac34..0000000000000 --- a/Formula/protobuf.rb +++ /dev/null @@ -1,76 +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.12.3", - :revision => "31ebe2ac71400344a5db91ffc13c4ddfb7589f92" - head "https://github.com/protocolbuffers/protobuf.git" - - bottle do - cellar :any - sha256 "3ced83651f35574357814e547e6d83356464065a40a660be13b69154e6fd98be" => :catalina - sha256 "b418f7e29dfff62eca17debe37dff8574295e480dc8607ec9c8591690478cd14" => :mojave - sha256 "ffc0bc6e68a6c48774854de177443ca852c107fe4e6e470486fa9d497334c28f" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "python@3.8" => [:build, :test] - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - 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" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--with-zlib" - system "make" - system "make", "check" - 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}" - - resource("six").stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec) - end - chdir "python" do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec), - "--cpp_implementation" - end - - version = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - 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 - - 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 Formula["python@3.8"].opt_bin/"python3", "-c", "import google.protobuf" - end -end diff --git a/Formula/protobuf@3.6.rb b/Formula/protobuf@3.6.rb deleted file mode 100644 index 842b3656ea024..0000000000000 --- a/Formula/protobuf@3.6.rb +++ /dev/null @@ -1,89 +0,0 @@ -class ProtobufAT36 < Formula - desc "Protocol buffers (Google's data interchange format)" - homepage "https://github.com/protocolbuffers/protobuf/" - url "https://github.com/protocolbuffers/protobuf/archive/v3.6.1.3.tar.gz" - sha256 "73fdad358857e120fd0fa19e071a96e15c0f23bb25f85d3f7009abfd4f264a2a" - revision 2 - - bottle do - cellar :any - rebuild 1 - sha256 "6d2da9252d93ab92e216192a91e71445325e82a660580a63867820d013eb849c" => :catalina - sha256 "4bf947fba8c49983858b40906e8cb56adca645d645bc3a5f3561c6fc76e9f5eb" => :mojave - sha256 "b58011315d7163fcb54491c60f7151cf79eb71bca9c78395d9d2a365ed374626" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "cmake" => :build - depends_on "libtool" => :build - depends_on "python@3.8" - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - 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", ".", *std_cmake_args - system "make" - end - ENV["CXXFLAGS"] = "-I../gtest/googletest/include" - - # 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", "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}" - - resource("six").stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec) - end - chdir "python" do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec), - "--cpp_implementation" - end - - version = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - 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 - - 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=." - end -end diff --git a/Formula/protobuf@3.7.rb b/Formula/protobuf@3.7.rb deleted file mode 100644 index f0d227a679e14..0000000000000 --- a/Formula/protobuf@3.7.rb +++ /dev/null @@ -1,81 +0,0 @@ -class ProtobufAT37 < Formula - desc "Protocol buffers (Google's data interchange format)" - homepage "https://github.com/protocolbuffers/protobuf/" - url "https://github.com/protocolbuffers/protobuf.git", - :tag => "v3.7.1", - :revision => "6973c3a5041636c1d8dc5f7f6c8c1f3c15bc63d6" - revision 1 - - bottle do - cellar :any - sha256 "de40ff1011be89e49ac1baf9a973349d7ec26b3a3ae0f94defe7230d07099ca5" => :mojave - sha256 "cfe4d90579043bd7b4c4844c7a0154a936aada8cf173a78725d1e574547dd290" => :high_sierra - sha256 "df1240601237fe2ae9b40be83c340e7527ab0e442727e4b47afe9468eeb357a7" => :sierra - end - - keg_only :versioned_formula - - # https://github.com/Homebrew/homebrew-core/pull/54471#issuecomment-627430555 - disable! - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "python@3.7" => [:build, :test] - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - 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" - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--with-zlib" - system "make" - system "make", "check" - 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}" - - resource("six").stage do - system "python3", *Language::Python.setup_install_args(libexec) - end - chdir "python" do - system "python3", *Language::Python.setup_install_args(libexec), - "--cpp_implementation" - end - - version = Language::Python.major_minor_version "python3" - 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 - - 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 "python3", "-c", "import google.protobuf" - end -end diff --git a/Formula/protoc-gen-go.rb b/Formula/protoc-gen-go.rb deleted file mode 100644 index ed5c3d5e68851..0000000000000 --- a/Formula/protoc-gen-go.rb +++ /dev/null @@ -1,38 +0,0 @@ -class ProtocGenGo < Formula - desc "Go support for Google's protocol buffers" - homepage "https://github.com/golang/protobuf" - url "https://github.com/golang/protobuf/archive/v1.4.2.tar.gz" - sha256 "a1e486b3ed6f502c43e10cb28bde4e8f020a420ef9958d3fbe61801492c07c87" - license "BSD-3-Clause" - head "https://github.com/golang/protobuf.git" - - bottle do - cellar :any_skip_relocation - sha256 "82ce3ce8a8e158bc9202aebfa2cfcbd5b398aeed9530614ece2d101c7e3e01fb" => :catalina - sha256 "82ce3ce8a8e158bc9202aebfa2cfcbd5b398aeed9530614ece2d101c7e3e01fb" => :mojave - sha256 "82ce3ce8a8e158bc9202aebfa2cfcbd5b398aeed9530614ece2d101c7e3e01fb" => :high_sierra - end - - depends_on "go" => :build - depends_on "protobuf" - - def install - system "go", "build", *std_go_args, "-ldflags", "-s -w", "./protoc-gen-go" - prefix.install_metafiles - end - - test do - protofile = testpath/"proto3.proto" - protofile.write <<~EOS - syntax = "proto3"; - package proto3; - message Request { - string name = 1; - repeated int64 key = 2; - } - EOS - system "protoc", "--go_out=.", "proto3.proto" - assert_predicate testpath/"proto3.pb.go", :exist? - refute_predicate (testpath/"proto3.pb.go").size, :zero? - end -end diff --git a/Formula/protoc-gen-grpc-web.rb b/Formula/protoc-gen-grpc-web.rb deleted file mode 100644 index aa6db45d22049..0000000000000 --- a/Formula/protoc-gen-grpc-web.rb +++ /dev/null @@ -1,60 +0,0 @@ -require "language/node" - -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/1.2.0.tar.gz" - sha256 "8d9b1e9b839a5254aa79cb4068b05fdb6e1de5637c1b8551f95144159a4801f2" - - bottle do - cellar :any - sha256 "6f73cc972d706c31d5f5a18aad3f7a0cc8568b2804dd9c713eed59bebb69aa39" => :catalina - sha256 "296f7f6501fef507feb8e54243221cfa4212c90149efa11afcbccd1ba2b417a3" => :mojave - sha256 "244fbadefd710b79f73f32fa08680053833d651e8ee57c924f6913f9f06f91d0" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "node" => :test - depends_on "typescript" => :test - depends_on "protobuf" - - def install - bin.mkpath - inreplace "javascript/net/grpc/web/Makefile", "/usr/local/bin/", "#{bin}/" - system "make", "install-plugin" - end - - test do - # First use the plugin to generate the files. - testdata = <<~EOS - 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); - } - EOS - (testpath/"test.proto").write testdata - 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. - testts = <<~EOS - import * as grpcWeb from 'grpc-web'; - import {TestServiceClient} from './TestServiceClientPb'; - import {Test, TestResult} from './test_pb'; - EOS - (testpath/"test.ts").write testts - system "npm", "install", *Language::Node.local_npm_install_args, "grpc-web", "@types/google-protobuf" - system "tsc", "test.ts" - end -end diff --git a/Formula/prototool.rb b/Formula/prototool.rb deleted file mode 100644 index 2eb0469532e56..0000000000000 --- a/Formula/prototool.rb +++ /dev/null @@ -1,32 +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.10.0.tar.gz" - sha256 "5b516418f41f7283a405bf4a8feb2c7034d9f3d8c292b2caaebcd218581d2de4" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "e7c678d2842ce666ddfbeee1092c2354a420c9b8b94244e8db2b382f6568e536" => :catalina - sha256 "256435ac965872664fc2707b8188090c2a1d369308ef2b224d53e1b972ee7620" => :mojave - sha256 "373cf39c37bd40c8eb4f9261129226bf0f276771872060ea3495d6a2d56fa911" => :high_sierra - end - - depends_on "go" => :build - - def install - 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 - - test do - system bin/"prototool", "config", "init" - assert_predicate testpath/"prototool.yaml", :exist? - end -end diff --git a/Formula/prover9.rb b/Formula/prover9.rb deleted file mode 100644 index c7c7b21415564..0000000000000 --- a/Formula/prover9.rb +++ /dev/null @@ -1,49 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "1f637c295f07ddf31eedf6bcc73b957584da4d55cb92c7bfea3264d6c3780d1b" => :catalina - sha256 "5ae1f642fa781841fc843a548b5327cf1dfb8d8c4fbe5ea83ddffef004282d57" => :mojave - sha256 "055cf6646dd19effa87d7b9fa8e820c24710a023bcefc98c35604205530ab2c3" => :high_sierra - end - - def install - 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 diff --git a/Formula/proxychains-ng.rb b/Formula/proxychains-ng.rb deleted file mode 100644 index 08ba0c9665056..0000000000000 --- a/Formula/proxychains-ng.rb +++ /dev/null @@ -1,26 +0,0 @@ -class ProxychainsNg < Formula - desc "Hook preloader" - homepage "https://sourceforge.net/projects/proxychains-ng/" - url "https://github.com/rofl0r/proxychains-ng/archive/v4.14.tar.gz" - sha256 "ab31626af7177cc2669433bb244b99a8f98c08031498233bb3df3bcc9711a9cc" - license "GPL-2.0" - head "https://github.com/rofl0r/proxychains-ng.git" - - bottle do - sha256 "1b8b781209633d9c4c45249b78865311e9853c36ba8522146a95cf4793d166b1" => :catalina - sha256 "4b41340fc2a68c579b3ab30affbe82f9be545537f727507d19977b1b67193a96" => :mojave - sha256 "42ba51b1578ff901987212d74e8b3a83ec6313f5ccfe3d554a9b32766f9b65c4" => :high_sierra - sha256 "4c8e8c69bd10529a33b3f70e1a55504f79e3358fe834d521c95adafb2f4eea4a" => :sierra - 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 5ab780b57aa16..0000000000000 --- a/Formula/proxytunnel.rb +++ /dev/null @@ -1,27 +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/v1.10.20200507.tar.gz" - sha256 "6495430e9c60d3df53824a7a0f3bea9953a89d083a3718c72db04dc4d40755ac" - - bottle do - cellar :any - sha256 "f356990b424dc670a68c753c072e1a008d772bf7e27025f34b343c4a63a590d9" => :catalina - sha256 "045219106e5c4b06627cf57fd21b27c8a24d11c5375df3c028e9b23d719e4b0f" => :mojave - sha256 "98cf5abe9bbb285c92ef1c0e504968707fa5106e2783fed2dbfc64fb2a5dafd4" => :high_sierra - end - - depends_on "asciidoc" => :build - depends_on "xmlto" => :build - depends_on "openssl@1.1" - - 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 58ef77724c56a..0000000000000 --- a/Formula/ps2eps.rb +++ /dev/null @@ -1,35 +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 "77353530f3a9a9f4b3776087336b18f76186373f97efeb56f0d2d55e726198f4" => :catalina - 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/psc-package.rb b/Formula/psc-package.rb deleted file mode 100644 index b160d31b622cc..0000000000000 --- a/Formula/psc-package.rb +++ /dev/null @@ -1,33 +0,0 @@ -require "language/haskell" - -class PscPackage < Formula - include Language::Haskell::Cabal - - desc "Package manager for PureScript based on package sets" - homepage "https://psc-package.readthedocs.io/" - url "https://github.com/purescript/psc-package/archive/v0.6.2.tar.gz" - sha256 "96c3bf2c65d381c61eff3d16d600eadd71ac821bbe7db02acec1d8b3b6dbecfc" - - bottle do - cellar :any_skip_relocation - sha256 "6cb82e86e3345b771e1cefa7ddc19f0a2cdad2708b9c313c0d6939d6935f68ee" => :catalina - sha256 "bea963bcef4f13b0b43118ee5230ccc3df88fea815fcf55e455360406d5ae9a6" => :mojave - sha256 "2254f260a569baeb84999bf42cf2ae5563dae197039a7c4c9ee6862996f2523c" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.6" => :build - depends_on "purescript" - - def install - install_cabal_package - 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 diff --git a/Formula/psftools.rb b/Formula/psftools.rb deleted file mode 100644 index aa52eea8dd4a1..0000000000000 --- a/Formula/psftools.rb +++ /dev/null @@ -1,38 +0,0 @@ -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.13.tar.gz" - sha256 "9c61e6885dca2f9591b4aa5fe821e16d4779cd071c3a45ead326629f210def65" - license "GPL-2.0" - version_scheme 1 - - bottle do - cellar :any - sha256 "30d2a62f05343fbd172a0b7d094e84755d3441fae6e9a5734793cf363a9e8c40" => :catalina - sha256 "9a04003b9ff3529c3e1e94f63b062c120b8a5e4af66a99965347d63827004128" => :mojave - sha256 "cd1682c76f401ff6fc6c4dce3e4c5d31aeb50a2deb4b56a31b8bab5830c6ec4b" => :high_sierra - 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 f3a8018c8d5fc..0000000000000 --- a/Formula/psgrep.rb +++ /dev/null @@ -1,19 +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" - license "GPL-3.0" - 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 87c8f140aac51..0000000000000 --- a/Formula/pspg.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Pspg < Formula - desc "Unix pager optimized for psql" - homepage "https://github.com/okbob/pspg" - url "https://github.com/okbob/pspg/archive/3.1.2.tar.gz" - sha256 "f88fe56b08ec00ec4894aa370f90677817af85581154642dd155466e9d64a465" - license "BSD-2-Clause" - head "https://github.com/okbob/pspg.git" - - bottle do - cellar :any - sha256 "6ac86e2f012a8d7e00c41097bc6b73351c6c32270a5bb32a0f6f82892303e648" => :catalina - sha256 "b64dac55a7a70baa9d63bf605fc9a68282af547334ce0a437eac2289e2d110ea" => :mojave - sha256 "062b5f7f8d9090b5de684b40e32bdd061fa8475351a2e60acf93f1fcd434a80c" => :high_sierra - 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.to_f}", shell_output("#{bin}/pspg --version", 1) - end -end diff --git a/Formula/psql2csv.rb b/Formula/psql2csv.rb deleted file mode 100644 index 7fa704afbef84..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.11.tar.gz" - sha256 "f961c3ca980ce4b527a0d86b593c73fbf244829a20ab7df343e1c077818ddba0" - license "MIT" - - 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 443316a96e50f..0000000000000 --- a/Formula/psqlodbc.rb +++ /dev/null @@ -1,37 +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-12.02.0000.tar.gz" - sha256 "7b00d99ee729c06cfc784ab43deb7dee77761b667dd62122c2cb0cd7b043ba67" - - bottle do - cellar :any - sha256 "6ecd918abfb4e8bc95299a8efaeb2d9b2d772caee48d14108a6eeb9781f84776" => :catalina - sha256 "34900a66170b407b00a65824165fb0ddb2bc6d585ef4c9bba75729d73ee32775" => :mojave - sha256 "3cb37c6a2885d5abbd75b74167b0e6a93f29edbd1d36ad074bdf438bd7d1cb39" => :high_sierra - 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@1.1" - 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 30e5464cc7dd1..0000000000000 --- a/Formula/pssh.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Pssh < Formula - include Language::Python::Virtualenv - 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" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "62460d1e1e69472684b09842c05d80e9b6da5f9510815b6d40b527a452067c3c" => :catalina - sha256 "5b456c61d419a842c5c979a41494c5e2d7c4beb71190a621635a89c9c603c772" => :mojave - sha256 "c06b726eead0f61a02e2c0a8f6fcdf8cf78f437deb841112b08447829b828e90" => :high_sierra - end - - depends_on "python@3.8" - - conflicts_with "putty", :because => "both install `pscp` binaries" - - # Fix for Python 3 compatibility - # https://bugs.archlinux.org/task/46571 - patch do - url "https://github.com/nplanel/parallel-ssh/commit/ee379dc5.diff?full_index=1" - sha256 "467df6024d180ea41a7e453b2d4485ef2be2a911410d8845df1b9e6b6dc301ae" - end - - def install - # Fixes import error with python3, see https://github.com/lilydjwg/pssh/issues/70 - # fixed in master, should be removed for versions > 2.3.1 - inreplace "psshlib/cli.py", "import version", "from psshlib import version" - - virtualenv_create(libexec, "python3") - virtualenv_install_with_resources - end - - test do - system bin/"pssh", "--version" - end -end diff --git a/Formula/pstoedit.rb b/Formula/pstoedit.rb deleted file mode 100644 index 27354a896782b..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.75/pstoedit-3.75.tar.gz" - sha256 "b7b5d8510b40a5b148f7751268712fcfd0c1ed2bb46f359f655b6fcdc53364cf" - license "GPL-2.0" - - bottle do - sha256 "f048d902c088f0625c0c9e18d84b159493775b40e742812b040e7b517900260a" => :catalina - sha256 "1f3ec91e58d95e08081694b43e031ed83f13a73cecff15c55c532268282b0ad1" => :mojave - sha256 "22710dd8997d40cec3492c40960a9966b80b386bdbd3fed46515c66bb25053d7" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "ghostscript" - depends_on "imagemagick" - depends_on "plotutils" - - def install - ENV.cxx11 - - system "./configure", "--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 e7e526c703c04..0000000000000 --- a/Formula/pstree.rb +++ /dev/null @@ -1,34 +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 "af4d6c7d6bffd6e12d3cb31ceb6bdd5292b66405ddd1be3a48870373829219a7" => :catalina - 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 1e1307f059b2a..0000000000000 --- a/Formula/psutils.rb +++ /dev/null @@ -1,39 +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 "c2aed2811e263c3e3abcf66eb27d6fdd1b622ca033fa2e3bf4e8095c733df08a" => :catalina - 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 06466ede1cbfd..0000000000000 --- a/Formula/ptex.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Ptex < Formula - desc "Texture mapping system" - homepage "http://ptex.us/" - url "https://github.com/wdas/ptex.git", - :tag => "v2.3.2", - :revision => "1b8bc985a71143317ae9e4969fa08e164da7c2e5" - - bottle do - cellar :any - rebuild 1 - sha256 "309b9d77d69b2797d9161c8bf93d13fbc48db114b4e308674bf208006ad4c571" => :catalina - sha256 "2c55851c7d65d7953fedeed3ca738b9ab80c0ef61a7239633d485fbde53fdb92" => :mojave - sha256 "599291e5ea9a7972828818ac1e940ecbaca107f1ef36af556bf9de4c141fa5a8" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - - uses_from_macos "zlib" - - resource "wtest" do - url "https://raw.githubusercontent.com/wdas/ptex/v2.3.2/src/tests/wtest.cpp" - sha256 "95c78f97421eac034401b579037b7ba4536a96f4b356f8f1bb1e87b9db752444" - end - - def install - system "make", "prefix=#{prefix}" - system "make", "install" - end - - test do - resource("wtest").stage testpath - system ENV.cxx, "wtest.cpp", "-o", "wtest", "-L#{opt_lib}", "-lptex" - system "./wtest" - system "#{bin}/ptxinfo", "-c", "test.ptx" - end -end diff --git a/Formula/pth.rb b/Formula/pth.rb deleted file mode 100644 index fcbad4b617137..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 "4e468eea8984b9eb265dcd2f1e10a12ec5827088986042cea278b24f1a4dc1d4" => :catalina - sha256 "e7ed86c562756b07fcf9bb148c76f17c6cb4f3b02bf84ffe82285e3b279e7836" => :mojave - sha256 "da4549f9e89a71478b47f4454f9a259dc3a56a109f24083ce8f4ea69b11ac9c5" => :high_sierra - sha256 "583d6ae1681974c7461650151253c5a302f33fb16dae74b5546a4a693cec71d1" => :sierra - sha256 "bac7f73c061797768be28e21bec2e7773cfd70ff7c3f46eafd464b9632d5eae4" => :el_capitan - sha256 "7b31c6d65a97c722e661feb4c73a59a9025f1eac6b297ff181931bbdbc894ff3" => :yosemite - sha256 "4271f5c483e95641caa088059669dad1ab6d95774ff66eecae2af1c5c0ddaf0a" => :mavericks - 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 3a13a15a05cfe..0000000000000 --- a/Formula/ptunnel.rb +++ /dev/null @@ -1,35 +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 "15d1785092ce8788e96232fc051be9311aaa6565c6a65dfbb96d0ec597970384" => :catalina - 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/publish.rb b/Formula/publish.rb deleted file mode 100644 index 4c8fb9276e52b..0000000000000 --- a/Formula/publish.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Publish < Formula - desc "Static site generator for Swift developers" - homepage "https://github.com/JohnSundell/Publish" - url "https://github.com/JohnSundell/Publish/archive/0.7.0.tar.gz" - sha256 "71ab0609567c2929639b919e5c52f5a8d02cacd35c9ba4de32c5c992ee49cd33" - license "MIT" - head "https://github.com/JohnSundell/Publish.git" - - bottle do - cellar :any_skip_relocation - sha256 "08f17da7227cb766787838cb6c1d53ac0498cbde6245da0470f8379e84b476aa" => :catalina - end - - # https://github.com/JohnSundell/Publish#system-requirements - depends_on :xcode => ["11.4", :build] - - def install - system "swift", "build", "--disable-sandbox", "-c", "release" - bin.install ".build/release/publish-cli" => "publish" - end - - test do - mkdir testpath/"test" do - system "#{bin}/publish", "new" - assert_predicate testpath/"test"/"Package.swift", :exist? - end - end -end diff --git a/Formula/pueue.rb b/Formula/pueue.rb deleted file mode 100644 index 6ecb7cb2e8ed5..0000000000000 --- a/Formula/pueue.rb +++ /dev/null @@ -1,75 +0,0 @@ -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/v0.6.1.tar.gz" - sha256 "fa9691ff7441bee19eab2bf15238a1c014059968dcc26cc394772061f1000122" - license "MIT" - head "https://github.com/Nukesor/pueue.git" - - bottle do - cellar :any_skip_relocation - sha256 "801759298072f94496653cc498c1513ede1d0574d2d9bd81bcb46f331c257839" => :catalina - sha256 "de5ecda424a1662b9c2b5fb9408e4979c447fedc0f9adf5aa5b9636e19c24f36" => :mojave - sha256 "e0a63dc6a83558ce31105c7c74356b224437a00f1b7ba2759e72780a6d20477d" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - - system "./build_completions.sh" - bash_completion.install "utils/completions/pueue.bash" => "pueue" - fish_completion.install "utils/completions/pueue.fish" => "pueue.fish" - - prefix.install_metafiles - end - - plist_options :manual => "pueued" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/pueued - --verbose - - KeepAlive - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/pueued.log - StandardOutPath - #{var}/log/pueued.log - - - EOS - end - - test do - mkdir testpath/"Library/Preferences" - - begin - pid = fork do - exec bin/"pueued" - end - sleep 5 - cmd = "#{bin}/pueue status" - assert_match /Task list is empty.*/m, shell_output(cmd) - ensure - Process.kill("TERM", pid) - end - - assert_match "Pueue daemon #{version}", shell_output("#{bin}/pueued --version") - assert_match "Pueue client #{version}", shell_output("#{bin}/pueue --version") - end -end diff --git a/Formula/puf.rb b/Formula/puf.rb deleted file mode 100644 index 1b0c3c03ddf74..0000000000000 --- a/Formula/puf.rb +++ /dev/null @@ -1,25 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "cad4c55abee941651ac9e1f203041240aae43b990f3e9efdce7cd9e0342b727c" => :catalina - 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 ed96cf4bb6790..0000000000000 --- a/Formula/pugixml.rb +++ /dev/null @@ -1,46 +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.10/pugixml-1.10.tar.gz" - sha256 "55f399fbb470942410d348584dc953bcaec926415d3462f471ef350f29b5870a" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "ffcc56b93b63ac573480cdcafd859bdee76409e834e4e6b855c0ac4cfa9eb94c" => :catalina - sha256 "ee86188a54388e0644fd3f90e0319c8c734fb6ae254b23da609af17e1f579c9a" => :mojave - sha256 "2b5ce73035deb5e9557fca05fc6100c4a1c18acf33816316185d00d9bb2198fe" => :high_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.cxx, "test.cpp", "-o", "test", "-I#{include}", - "-L#{lib}", "-lpugixml" - system "./test" - end -end diff --git a/Formula/pulledpork.rb b/Formula/pulledpork.rb deleted file mode 100644 index d0432a8283b22..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" - license "GPL-2.0" - revision 3 - head "https://github.com/shirkdog/pulledpork.git" - - bottle do - cellar :any_skip_relocation - sha256 "5b7202182f284a0f71563981e9a0fe833338f85141d1b798996bc5fa91c070b2" => :catalina - sha256 "a58bf34832bfb17003541e1bc081314be348dc2710742143297d7feaab304a64" => :mojave - sha256 "9374159d0d80d83e20c4afb1dbb293d038dac84292ab73fb51155e4cf8c825f5" => :high_sierra - end - - depends_on "openssl@1.1" - - uses_from_macos "perl" - - 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/pulp.rb b/Formula/pulp.rb deleted file mode 100644 index 38c22fc5e2558..0000000000000 --- a/Formula/pulp.rb +++ /dev/null @@ -1,34 +0,0 @@ -require "language/node" - -class Pulp < Formula - desc "Build tool for PureScript projects" - homepage "https://github.com/bodil/pulp" - url "https://registry.npmjs.org/pulp/-/pulp-15.0.0.tgz" - sha256 "695da1581389d060810ed1a5962ab7e53696db8493b224fa7dc2358f255b8b53" - license "LGPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b8171d3e267d32cb7c785ee72fb8a1dbe96d7a66a7d5311a23b314a0e742156c" => :catalina - sha256 "9ee409ce24c46c02db3dade7b2942d8990708de840e03e0a80d5f2498a9bc46e" => :mojave - sha256 "56016abc98b66356ad0d58c0ea951de4da772abca1f12fd2c3635a7700e36c63" => :high_sierra - end - - depends_on "bower" - depends_on "node" - depends_on "purescript" - - def install - system "npm", "install", *Language::Node.std_npm_install_args(libexec) - bin.install_symlink Dir["#{libexec}/bin/*"] - end - - test do - assert_match version.to_s, shell_output("#{bin}/pulp --version") - - system("#{bin}/pulp", "init") - assert_predicate testpath/".gitignore", :exist? - assert_predicate testpath/"bower.json", :exist? - end -end diff --git a/Formula/pulseaudio.rb b/Formula/pulseaudio.rb deleted file mode 100644 index 9e9800c99ee4f..0000000000000 --- a/Formula/pulseaudio.rb +++ /dev/null @@ -1,89 +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-13.0.tar.xz" - sha256 "961b23ca1acfd28f2bc87414c27bb40e12436efcf2158d29721b1e89f3f28057" - revision 1 - - bottle do - sha256 "0e9445dd8d49abd299324e93f00231605e993f791674997d9d2c35b88efec528" => :catalina - sha256 "ae68dfdb8ad584bf3f602ea7fb36d9bc1e4540e6905986a7129e45c6170d8d95" => :mojave - sha256 "687c4c646487eb8a9988303e279dc2ee542b6404504cb54fcfce1d6d6bcf949f" => :high_sierra - 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@1.1" - depends_on "speexdsp" - - uses_from_macos "perl" => :build - uses_from_macos "expat" - uses_from_macos "m4" - - 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 - --exit-idle-time=-1 - --verbose - - RunAtLoad - - KeepAlive - - StandardErrorPath - #{var}/log/#{name}.log - StandardOutPath - #{var}/log/#{name}.log - - - 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 883bb4f36e29f..0000000000000 --- a/Formula/pulumi.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Pulumi < Formula - desc "Cloud native development platform" - homepage "https://pulumi.io/" - url "https://github.com/pulumi/pulumi.git", - :tag => "v2.6.0", - :revision => "4d3545117f6b12d0493db093b83ab279ae1bf5a0" - license "Apache-2.0" - head "https://github.com/pulumi/pulumi.git" - - bottle do - cellar :any_skip_relocation - sha256 "901e556f0cad25ffb21cc929601e8f4f33527a6c37b0dd4508f9fc7146c7136a" => :catalina - sha256 "0a04f731dca99c133e40fab7ef8d4da8ce380570f59391f44c0e7fb58069eb1b" => :mojave - sha256 "4a326f9415437651a916148bcb068a1c197e52a8d430e1c103bae80f92922df7" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GO111MODULE"] = "on" - - dir = buildpath/"src/github.com/pulumi/pulumi" - dir.install buildpath.children - - cd dir do - cd "./sdk" do - system "go", "mod", "download" - end - cd "./pkg" do - system "go", "mod", "download" - end - system "make", "brew" - bin.install Dir["#{buildpath}/bin/*"] - prefix.install_metafiles - - # Install shell completions - (bash_completion/"pulumi.bash").write `#{bin}/pulumi gen-completion bash` - (zsh_completion/"_pulumi").write `#{bin}/pulumi gen-completion zsh` - (fish_completion/"pulumi.fish").write `#{bin}/pulumi gen-completion fish` - 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 673a7c3f25188..0000000000000 --- a/Formula/pumba.rb +++ /dev/null @@ -1,28 +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.7.2.tar.gz" - sha256 "bd3ad4a5e1ff453b246462d3b57707b9d3281511b45ddda03d0d7450cf4c1fbd" - license "Apache-2.0" - head "https://github.com/alexei-led/pumba.git" - - bottle do - cellar :any_skip_relocation - sha256 "1125e8ddb43443e025e01f151de6989df2cda91e2185820e785329a0eb6c8bde" => :catalina - sha256 "b44858bb0ecb84dc2318d8ead146dd3ae3db36568ec9eacf1c049e24300b85bb" => :mojave - sha256 "96f9bc0b4ad4dc2b505a30d3b9c05c40682fa3332d5c2becd2885e907296ac7d" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w -X main.Version=#{version}", - "-trimpath", "-o", bin/"pumba", "./cmd" - prefix.install_metafiles - 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 65f6834b936fc..0000000000000 --- a/Formula/pup.rb +++ /dev/null @@ -1,39 +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" - license "MIT" - head "https://github.com/EricChiang/pup.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b543d371442c8a14f8113396523d65f1775f4b61ca55d4b61b859c180eb20777" => :catalina - 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 - system "gox", "-arch", "amd64", "-os", "darwin", "./..." - bin.install "pup_darwin_amd64" => "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 efe7b94facb05..0000000000000 --- a/Formula/pure-ftpd.rb +++ /dev/null @@ -1,71 +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.49.tar.gz" - sha256 "767bf458c70b24f80c0bb7a1bbc89823399e75a0a7da141d30051a2b8cc892a5" - revision 1 - - bottle do - cellar :any - sha256 "aa0a342b50ae3761120370fc0e6605241e03545441c472d778ef030239784454" => :catalina - sha256 "e3a63b9af91de3c29eef40a76d7962cdf8623a8e8992aeb67bdf3948293c450d" => :mojave - sha256 "a6a9549f3d8bde87cf01210e9fa29b403ed258246a7928d195a57f0c5ace6988" => :high_sierra - sha256 "11dfcec52ae727128c8201a4779fc7feea1d547fe86989a621d4ba339f70de92" => :sierra - end - - depends_on "libsodium" - depends_on "openssl@1.1" - - 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 af9e99a1136ad..0000000000000 --- a/Formula/purescript.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Purescript < Formula - desc "Strongly typed programming language that compiles to JavaScript" - homepage "https://www.purescript.org/" - url "https://hackage.haskell.org/package/purescript-0.13.8/purescript-0.13.8.tar.gz" - sha256 "701fac49de867ec01252b067185e8bbd1b72e4b96997044bac3cca91e3f8096a" - head "https://github.com/purescript/purescript.git" - - bottle do - cellar :any_skip_relocation - sha256 "f9ae94071a81b727b303b9030db5bba1e6bdd62d9197f11792b36c63c24ea8f4" => :catalina - sha256 "722db0bdf3894e87af760e1f04e1ac1c450d9e522c104471457b04675b07f62c" => :mojave - sha256 "9daf0153a5ad5ae5a99030416c6d7f8cf6fb13f16aef52823f1d0c9f7682d6da" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.6" => :build - - uses_from_macos "ncurses" - uses_from_macos "zlib" - - depends_on "hpack" => :build if build.head? - - def install - system "hpack" if build.head? - - system "cabal", "v2-update" - system "cabal", "v2-install", *std_cabal_v2_args - 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 1e924bcf80d1b..0000000000000 --- a/Formula/pushpin.rb +++ /dev/null @@ -1,92 +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.28.0.tar.bz2" - sha256 "3c0e9cc392d560eaf20459d1a3ddbfd9d8ad0453e1fd25ec993a8ce16f369aaf" - license "AGPL-3.0" - head "https://github.com/fanout/pushpin.git" - - bottle do - sha256 "7a458b9e568c40b09e309c3250e627768854060b3de9fd4fab8cb29b6a20fcb4" => :catalina - sha256 "4214e500fbecfdec4aedfea47e230c87debfc86a6af123d7516e5d3ac6d2a6a7" => :mojave - sha256 "822e79bdee9741ee4ba98dde6db15ef5263cd2159f04919f05a8914365f9f277" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "mongrel2" - depends_on "python@3.8" - 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", "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 threading - 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() - with urlopen('http://localhost:7999/test') as f: - body = f.read() - assert(body == b'test response\\n') - EOS - - pid = fork do - exec "#{bin}/pushpin", "--config=#{conffile}" - end - - begin - sleep 3 # make sure pushpin processes have started - system Formula["python@3.8"].opt_bin/"python3", 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 52c05e96ca8f3..0000000000000 --- a/Formula/putty.rb +++ /dev/null @@ -1,72 +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.74/putty-0.74.tar.gz" - sha256 "ddd5d388e51dd9e6e294005b30037f6ae802239a44c9dc9808c779e6d11b847d" - - bottle do - cellar :any_skip_relocation - sha256 "d5e454c08c5d06394527aa7141a332eb721097068f25deff3b4affa847837178" => :catalina - sha256 "5f9844fc7464fefd987780b3579a33b2ca37673be56c2a8249c312a19e20faea" => :mojave - sha256 "6621f31a41a8eedbbb2fda99a0548deed80d432216469105bac8084df66dbcbf" => :high_sierra - end - - head do - url "https://git.tartarus.org/simon/putty.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "halibut" => :build - end - - depends_on "pkg-config" => :build - - uses_from_macos "expect" => :test - - 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 - --without-gtk - ] - - system "./configure", *args - - build_version = build.head? ? "svn-#{version}" : version - system "make", "VER=-DRELEASE=#{build_version}" - - bin.install %w[plink pscp psftp puttygen] - - cd "doc" do - man1.install %w[plink.1 pscp.1 psftp.1 puttygen.1] - 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 906353e434d1d..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-20200610.9aa7b7c.tar.gz" - version "20200610" - sha256 "6e50becfe22f5b48d463293145a1b6dc8f7e7eb89de44c3cfe2165750e0b2d67" - head "https://git.tartarus.org/simon/puzzles.git" - - bottle do - cellar :any_skip_relocation - sha256 "ceafdd23c80d3b19927950e42b87589c577842e0617771cf3cda4696215ad201" => :catalina - sha256 "0aefe3d23e5dc7a2a8ef7414b81f5ebc12566b0b712d67c7328f7ceec67bb6cb" => :mojave - sha256 "e70e7726c99542aa47fd5ff918a121ca0967c3ef5ab4e69d026eefb63141d8ff" => :high_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 55dfe547dd1b0..0000000000000 --- a/Formula/pv.rb +++ /dev/null @@ -1,27 +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 "a5a43d38f36d54dd3e01d70ab6faa68af3ddc7cb80302f02945d1344eee7b7d4" => :catalina - 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 5149602cc83d6..0000000000000 --- a/Formula/pwgen.rb +++ /dev/null @@ -1,27 +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 "725911d1fd71b259acb7b907c09ef86a03545afe95e161856130992fc0789ffc" => :catalina - 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 99ac269a91a02..0000000000000 --- a/Formula/pwnat.rb +++ /dev/null @@ -1,28 +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" - license "GPL-3.0" - head "https://github.com/samyk/pwnat.git" - - bottle do - cellar :any_skip_relocation - sha256 "51a038c40431d552b19beb59e14de49984923d216b5d411646a32a2caed1eff8" => :catalina - sha256 "483e476edd037e89dc1c24fbf115132a815a9a4d6fcb987ceea6a4c07a5944da" => :mojave - sha256 "3a4bf09acd5eda4e54fbe21d0028948613fa398a3a1272722957079a9f18c836" => :high_sierra - sha256 "f8319cece67a334c14129e706f9d1b249d7905cf1ad62df9b5ee9553dbb8d001" => :sierra - sha256 "0149fc977622f2fd55db5845a377437028df31bb847230d3fd73d548e481e289" => :el_capitan - sha256 "cf17568c4053240ffe61594bcc618577c0d0c569abda8b3b956a4e4b441a755e" => :yosemite - sha256 "0baed31dc05b28a330501a0d4119e8997c1038d14311c64f2d7b367ebdf9f01e" => :mavericks - 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/pwncat.rb b/Formula/pwncat.rb deleted file mode 100644 index 55c26921a3323..0000000000000 --- a/Formula/pwncat.rb +++ /dev/null @@ -1,26 +0,0 @@ -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/31/8a/efc45ecc5e91afc76de9c56f89de99af01d575529fead6ee24331a3fddf2/pwncat-0.1.0.tar.gz" - sha256 "4f711c3d0f22650e20ad1429a7f0c9116b930be04435e7f690746ca0e1c5cd69" - - bottle do - cellar :any_skip_relocation - sha256 "effc23c8094a031f9bc1964adf5f5ab050500b86726c948f81fe67d35f5e700d" => :catalina - sha256 "c140bcf0cca3b1b2176e762dbbafb1c02f831c032741ece1dda4f95fa0ada397" => :mojave - sha256 "cc5dcb70ed1762f24f7d0511b74b2f119403f2bf8bc463aec844b8701682e2f2" => :high_sierra - end - - depends_on "python@3.8" - - def install - ENV.prepend_path "PATH", Formula["python@3.8"].opt_libexec/"bin" - virtualenv_install_with_resources - end - - test do - system "echo HEAD | #{bin}/pwncat www.google.com 80 | grep ^HTTP" - end -end diff --git a/Formula/pwntools.rb b/Formula/pwntools.rb deleted file mode 100644 index 5d9186965336c..0000000000000 --- a/Formula/pwntools.rb +++ /dev/null @@ -1,170 +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://files.pythonhosted.org/packages/69/af/6d39a4aa24319f1de0c7901f25f230d0be08ec88f0e656ffaceaca871f9e/pwntools-4.2.0.tar.gz" - sha256 "7051bcdb786fddda77a1140af6ac91ba4e184484353b9ebf7889d5ff26ff3580" - - bottle do - cellar :any - sha256 "1e321095a0b71b2ad00537ad40403715e8d4c0538e5b9f282bf1162537d4b882" => :catalina - sha256 "9e3e40dd62130f52bf16fd9c67d38cad5879bb8e14022d116d81d6f3233797b5" => :mojave - sha256 "41243a83a989df960102f639edc42fb050bd562211b738b5555621c4d0f6648a" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - conflicts_with "moreutils", :because => "both install an `errno` executable" - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz" - sha256 "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42" - end - - resource "capstone" do - url "https://files.pythonhosted.org/packages/f2/ae/21dbb3ccc30d5cc9e8cdd8febfbf5d16d93b8c10e595280d2aa4631a0d1f/capstone-4.0.2.tar.gz" - sha256 "2842913092c9b69fd903744bc1b87488e1451625460baac173056e1808ec1c66" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz" - sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6" - end - - resource "intervaltree" do - url "https://files.pythonhosted.org/packages/e8/f9/76237755b2020cd74549e98667210b2dd54d3fb17c6f4a62631e61d31225/intervaltree-3.0.2.tar.gz" - sha256 "cb4f61c81dcb4fea6c09903f3599015a83c9bdad1f0bbd232495e6681e19e273" - end - - resource "Mako" do - url "https://files.pythonhosted.org/packages/72/89/402d2b4589e120ca76a6aed8fee906a0f5ae204b50e455edd36eda6e778d/Mako-1.1.3.tar.gz" - sha256 "8195c8c1400ceb53496064314c6736719c6f25e7479cd24c77be3d9361cddc27" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/55/fd/fc1aca9cf51ed2f2c11748fa797370027babd82f87829c7a8e6dbe720145/packaging-20.4.tar.gz" - sha256 "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/ac/15/4351003352e11300b9f44a13576bff52dcdc6e4a911129c07447bda0a358/paramiko-2.7.1.tar.gz" - sha256 "920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f" - end - - resource "psutil" do - url "https://files.pythonhosted.org/packages/c4/b8/3512f0e93e0db23a71d82485ba256071ebef99b227351f0f5540f744af41/psutil-5.7.0.tar.gz" - sha256 "685ec16ca14d079455892f25bd124df26ff9137664af445563c1bd36629b5e0e" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "pyelftools" do - url "https://files.pythonhosted.org/packages/9e/0f/82583ae6638a23e416cb3f15e3e3c07af51725fe51a4eaf91ede265f4af9/pyelftools-0.26.tar.gz" - sha256 "86ac6cee19f6c945e8dedf78c6ee74f1112bd14da5a658d8c9d4103aed5756a2" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/cf/5a/25aeb636baeceab15c8e57e66b8aa930c011ec1c035f284170cacb05025e/PyNaCl-1.4.0.tar.gz" - sha256 "54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "pyserial" do - url "https://files.pythonhosted.org/packages/cc/74/11b04703ec416717b247d789103277269d567db575d2fd88f25d9767fe3d/pyserial-3.4.tar.gz" - sha256 "6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627" - 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/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "ROPGadget" do - url "https://files.pythonhosted.org/packages/1a/d4/51d66e65a907605c903040a63b52416665fe8365f55efd54cdb95ab2e366/ROPGadget-6.3.tar.gz" - sha256 "6962cdfaf45612d18845041137abfd4676eb7425c22f6588dde40e1711e2646c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "sortedcontainers" do - url "https://files.pythonhosted.org/packages/3b/fb/48f6fa11e4953c530b09fa0f2976df5234b0eaabcd158625c3e73535aeb8/sortedcontainers-2.2.2.tar.gz" - sha256 "4e73a757831fc3ca4de2859c422564239a31d8213d09a2a666e375807034d2ba" - end - - resource "unicorn" do - url "https://files.pythonhosted.org/packages/6c/c0/7d9870c4ec6f186096d2d5807d278aad8f097cc9b40968f7626031ad3f1f/unicorn-1.0.2rc3.tar.gz" - sha256 "e008dc89e07d5d6263cdb1ae4f72acd84ff6a3f3d785addc981646fb2c950214" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - 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 7d98df9943c07..0000000000000 --- a/Formula/pwsafe.rb +++ /dev/null @@ -1,46 +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 4 - - bottle do - cellar :any - sha256 "5f952aa85147c86d2f77f9054fe228484820388c3b1e92c39c12432a15ca0f54" => :catalina - sha256 "94c4b9684c2709c7cbd168609db33271ede431f1f72c348bb508e65a07bf8faa" => :mojave - sha256 "5d5a277678e752596a342712e46dd2e1ce015d6897ad7f74437509a39f47b5ce" => :high_sierra - sha256 "e5fd7f0c41f73c0bdf2f455b7ad659d27931afc1e78536e11a0553be0e8cade1" => :sierra - end - - depends_on "openssl@1.1" - 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 616c4915d777c..0000000000000 --- a/Formula/py2cairo.rb +++ /dev/null @@ -1,26 +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.2/pycairo-1.18.2.tar.gz" - sha256 "dcb853fd020729516e8828ad364084e752327d4cff8505d20b13504b32b16531" - revision 1 - - bottle do - cellar :any - sha256 "78ab70984d612ac9feba4d673615e3918110aebc4aa0b360a854e81fc7ac0ea7" => :catalina - sha256 "f01c39e8f71339cdec156309fb7358f5bb3e292fb0a84a071c3a935b58234120" => :mojave - sha256 "76dbdbbd42c2a59cae7e9ddc05ad26d331194c8a132e24e7316ceb551a40272b" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on :macos # Due to 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 ea9ba0c748409..0000000000000 --- a/Formula/py3cairo.rb +++ /dev/null @@ -1,26 +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.19.1/pycairo-1.19.1.tar.gz" - sha256 "2c143183280feb67f5beb4e543fd49990c28e7df427301ede04fc550d3562e84" - revision 1 - - bottle do - cellar :any - sha256 "bd80a6817e090c490c828d22359fbd97c38b46cca2b325c7c69e38de9df0e6ea" => :catalina - sha256 "0b586e4cb4e391fcc263c2892d533dda388c1ca139082a486939b2bbc3953d0a" => :mojave - sha256 "e440b8405e3fd9c0d964e74ce0cb02b421077e91f84fbb9d10b6c68f51be328b" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "cairo" - depends_on "python@3.8" - - def install - system Formula["python@3.8"].bin/"python3", *Language::Python.setup_install_args(prefix) - end - - test do - system Formula["python@3.8"].bin/"python3", "-c", "import cairo; print(cairo.version)" - end -end diff --git a/Formula/pybind11.rb b/Formula/pybind11.rb deleted file mode 100644 index 1a496145c0865..0000000000000 --- a/Formula/pybind11.rb +++ /dev/null @@ -1,46 +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.5.0.tar.gz" - sha256 "97504db65640570f32d3fdf701c25a340c8643037c3b69aec469c10c93dc8504" - - bottle do - cellar :any_skip_relocation - sha256 "c154d564868492981456c9a4e3fa21b6cdb821d96ba14d1ca1f4825d642a1384" => :catalina - sha256 "c154d564868492981456c9a4e3fa21b6cdb821d96ba14d1ca1f4825d642a1384" => :mojave - sha256 "c154d564868492981456c9a4e3fa21b6cdb821d96ba14d1ca1f4825d642a1384" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "python@3.8" - - 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 = `#{Formula["python@3.8"].opt_bin}/python3-config --cflags --ldflags --embed`.split(" ") - system ENV.cxx, "-O3", "-shared", "-std=c++11", *python_flags, "example.cpp", "-o", "example.so" - system Formula["python@3.8"].opt_bin/"python3", "example.py" - end -end diff --git a/Formula/pycodestyle.rb b/Formula/pycodestyle.rb deleted file mode 100644 index 26bb4968eb6ae..0000000000000 --- a/Formula/pycodestyle.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Pycodestyle < Formula - desc "Simple Python style checker in one Python file" - homepage "https://pycodestyle.pycqa.org/" - url "https://github.com/PyCQA/pycodestyle/archive/2.6.0.tar.gz" - sha256 "08347fbc48cc92afd33117c1e8af9b99b292a4e5889f6b776f402e062fc39c97" - 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 25198db419991..0000000000000 --- a/Formula/pyenv-ccache.rb +++ /dev/null @@ -1,23 +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" - license "MIT" - 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 2867c38dba1a7..0000000000000 --- a/Formula/pyenv-pip-migrate.rb +++ /dev/null @@ -1,20 +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" - license "MIT" - 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 6caf5e06e9216..0000000000000 --- a/Formula/pyenv-virtualenv.rb +++ /dev/null @@ -1,45 +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.5.tar.gz" - sha256 "27ae3de027a6f6dccdca4085225512e559c6b94b31625bd2b357a18890a1e618" - license "MIT" - version_scheme 1 - head "https://github.com/pyenv/pyenv-virtualenv.git" - - bottle :unneeded - - depends_on "pyenv" - - def install - ENV["PREFIX"] = prefix - system "./install.sh" - - # These inreplace steps may be unnecessary in the future if upstream - # addresses the following issue and PR: - # https://github.com/pyenv/pyenv-virtualenv/issues/307 - # https://github.com/pyenv/pyenv-virtualenv/pull/308 - inreplace bin/"pyenv-virtualenv-prefix" do |s| - s.gsub!('"${BASH_SOURCE%/*}"/../libexec', libexec.to_s) - end - - inreplace bin/"pyenv-virtualenvs" do |s| - s.gsub!('"${BASH_SOURCE%/*}"/../libexec', libexec.to_s) - end - - inreplace libexec/"pyenv-virtualenv-realpath" do |s| - s.gsub!('"${BASH_SOURCE%/*}"/../libexec', libexec.to_s) - end - 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 d48442bc421e4..0000000000000 --- a/Formula/pyenv-virtualenvwrapper.rb +++ /dev/null @@ -1,21 +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" - license "MIT" - 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 71e92c1376f47..0000000000000 --- a/Formula/pyenv-which-ext.rb +++ /dev/null @@ -1,21 +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" - license "MIT" - 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 9a7bdb038ea33..0000000000000 --- a/Formula/pyenv.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Pyenv < Formula - desc "Python version management" - homepage "https://github.com/pyenv/pyenv" - url "https://github.com/pyenv/pyenv/archive/v1.2.19.tar.gz" - sha256 "e93466735ac9c34d68b7d5d71f32c16a2b4b1a6a1adffb85acc4126a3398b9d0" - license "MIT" - version_scheme 1 - head "https://github.com/pyenv/pyenv.git" - - bottle do - cellar :any - sha256 "4090a7f985abe855d3725014be8c6922008d98ff2f5ff10983637b6a4ed3bb59" => :catalina - sha256 "f537513011bf038e306282adce8c65e18dcbcc0a486106819bca019e746fc257" => :mojave - sha256 "5066a95f9ab62623f012d4930171e41cbd1fef9be916c661dc6817c20ed5f97c" => :high_sierra - end - - depends_on "autoconf" - depends_on "openssl@1.1" - depends_on "pkg-config" - depends_on "readline" - - 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 - - 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 6029009afb20c..0000000000000 --- a/Formula/pygitup.rb +++ /dev/null @@ -1,65 +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" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "8dff3146af82b507e97ba0305f76d4aa6296b53b1a094e6cb3ed8b5cd8a4608c" => :catalina - sha256 "bb4c2a88b4063544712c1f8a9704d7af97b11fb76d18ff9c6150a63d9bd59c5b" => :mojave - sha256 "9ca0aeb55d9722c77c77616f2b95d8d53a8c685f5a9c515ddce380b2ae5ad672" => :high_sierra - end - - depends_on "python@3.8" - - 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/pygments.rb b/Formula/pygments.rb deleted file mode 100644 index eb2707d480370..0000000000000 --- a/Formula/pygments.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Pygments < Formula - include Language::Python::Virtualenv - - desc "Generic syntax highlighter" - homepage "https://pygments.org/" - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - license "BSD-2-Clause" - - head "https://github.com/pygments/pygments.git" - - bottle do - cellar :any_skip_relocation - sha256 "509010be01f39644658904cd9396824b6cee202083b4659d8dd7e03e7f8afd17" => :catalina - sha256 "6c413d6695fc730fcc6e547e1de3bf55ed245f66059eebfa2e99a683b240dbe5" => :mojave - sha256 "42cc8f55ba8f2ca0766f7d99b1921671ad6d6aa884f23f1fbe88192e92ec89cb" => :high_sierra - end - - depends_on "python@3.8" - - def install - bash_completion.install "external/pygments.bashcomp" => "pygmentize" - virtualenv_install_with_resources - end - - test do - (testpath/"test.py").write <<~EOS - import os - print(os.getcwd()) - EOS - - system bin/"pygmentize", "-f", "html", "-o", "test.html", testpath/"test.py" - assert_predicate testpath/"test.html", :exist? - end -end diff --git a/Formula/pygobject3.rb b/Formula/pygobject3.rb deleted file mode 100644 index 3ae7ee996e05d..0000000000000 --- a/Formula/pygobject3.rb +++ /dev/null @@ -1,46 +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.36/pygobject-3.36.1.tar.xz" - sha256 "d1bf42802d1cec113b5adaa0e7bf7f3745b44521dc2163588d276d5cd61d718f" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "174079a381809080c02d5720bc2538929bf571d28710f7ab3cb646bfcd2a5bbf" => :catalina - sha256 "c2b276445ce99b5094cd6b68b03fb6dc47a8c2eefbc743b40eacc373b822345c" => :mojave - sha256 "f462700d1cd736cc800d410ef3e4d2509527ca98cb7dc437ac80adb9bc04b6d6" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gobject-introspection" - depends_on "py3cairo" - depends_on "python@3.8" - - def install - mkdir "buildpy3" do - system "meson", *std_meson_args, - "-Dpycairo=true", - "-Dpython=#{Formula["python@3.8"].opt_bin}/python3", - ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - Pathname("test.py").write <<~EOS - 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)) - EOS - - pyversion = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_path "PYTHONPATH", lib/"python#{pyversion}/site-packages" - system Formula["python@3.8"].opt_bin/"python3", "test.py" - end -end diff --git a/Formula/pyinstaller.rb b/Formula/pyinstaller.rb deleted file mode 100644 index bb58559c9f447..0000000000000 --- a/Formula/pyinstaller.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Pyinstaller < Formula - include Language::Python::Virtualenv - - desc "Bundle a Python application and all its dependencies" - homepage "https://www.pyinstaller.org/" - url "https://files.pythonhosted.org/packages/3c/c9/c3f9bc64eb11eee6a824686deba6129884c8cbdf70e750661773b9865ee0/PyInstaller-3.6.tar.gz" - sha256 "3730fa80d088f8bb7084d32480eb87cbb4ddb64123363763cf8f2a1378c1c4b7" - revision 1 - - head "https://github.com/pyinstaller/pyinstaller.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "f5b5c872f6ed44dee85485f97743f066aaba0de5a7ef5a1817330ae9ac3ae502" => :catalina - sha256 "d169b298d3b87b48d0e53591deb6b794128705850a7b9a064786ea323953dda4" => :mojave - sha256 "5ab59b261f6a112da5e0423e7fb08912d421ab2c0ff27f4f477f262e8c55a0f0" => :high_sierra - end - - depends_on "python@3.8" - - resource "altgraph" do - url "https://files.pythonhosted.org/packages/22/5a/ac50b52581bbf0d8f6fd50ad77d20faac19a2263b43c60e7f3af8d1ec880/altgraph-0.17.tar.gz" - sha256 "1f05a47122542f97028caf78775a095fbe6a2699b5089de8477eb583167d69aa" - end - - resource "macholib" do - url "https://files.pythonhosted.org/packages/0d/fe/61e8f6b569c8273a8f2dd73921738239e03a2acbfc55be09f8793261f269/macholib-1.14.tar.gz" - sha256 "0c436bc847e7b1d9bda0560351bf76d7caf930fb585a828d13608839ef42c432" - end - - def install - virtualenv_install_with_resources - end - - test do - xy = Language::Python.major_minor_version "python3.8" - system bin/"pyinstaller", "-F", "--distpath=#{testpath}/dist", "--workpath=#{testpath}/build", - libexec/"lib/python#{xy}/site-packages/easy_install.py" - assert_predicate testpath/"dist/easy_install", :exist? - end -end diff --git a/Formula/pyinvoke.rb b/Formula/pyinvoke.rb deleted file mode 100644 index 5705c0b309457..0000000000000 --- a/Formula/pyinvoke.rb +++ /dev/null @@ -1,46 +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.4.1.tar.gz" - sha256 "ac5880fb5d21f06cc1b29f89736cb8a43b85abea9204b4bb4277458ae025d0b7" - license "BSD-2-Clause" - revision 1 - head "https://github.com/pyinvoke/invoke.git" - - bottle do - cellar :any_skip_relocation - sha256 "6e576690387b7433b3795c926672cebc76f51c1a78d64798db3a9b4fba2a584e" => :catalina - sha256 "576bd35748ea63fcc0a8bd6f42e68755e34c3736b5233adb0f86293dcaf912f3" => :mojave - sha256 "44224c0c6d1c175ddccf9bc20dcc6a0b3c48bd7ab72a30fde8f40db055406eee" => :high_sierra - end - - depends_on "python@3.8" - - 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/pylint.rb b/Formula/pylint.rb deleted file mode 100644 index abaa385df5cb4..0000000000000 --- a/Formula/pylint.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Pylint < Formula - include Language::Python::Virtualenv - - desc "It's not just a linter that annoys you!" - homepage "https://github.com/PyCQA/pylint" - url "https://files.pythonhosted.org/packages/3b/f0/ee19aeccaea881c38d129f015b2be7658724fcefa3a506d7c44747d764d9/pylint-2.5.3.tar.gz" - sha256 "7dd78437f2d8d019717dbf287772d0b2dbdfd13fc016aa7faa08d67bccc46adc" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "0276d309ef75310c6f769fd57bd1c0326c42ad167fada9985d9a18c5219111a8" => :catalina - sha256 "7382a74b8dc90f0a89a09e525a76967c4872c685d8dae62be7bde0474e750bc3" => :mojave - sha256 "8ecaf808929ee9c3a7ee76f707b2df886712a7be0c73b7c274f96d4dbd7ba304" => :high_sierra - end - - depends_on "python@3.8" - - resource "astroid" do - url "https://files.pythonhosted.org/packages/ee/25/d3f01bc7e16641e0acb9a8c12decf1d5c2f04336c1f19ba69dc8e6927dff/astroid-2.4.2.tar.gz" - sha256 "2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703" - end - - resource "isort" do - url "https://files.pythonhosted.org/packages/43/00/8705e8d0c05ba22f042634f791a61f4c678c32175763dcf2ca2a133f4739/isort-4.3.21.tar.gz" - sha256 "54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1" - end - - resource "lazy-object-proxy" do - url "https://files.pythonhosted.org/packages/07/3f/a3d687f83c7d44970f70ff0400677746c8860b11f0c08f6b4e07205f0cdc/lazy-object-proxy-1.4.3.tar.gz" - sha256 "f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0" - end - - resource "mccabe" do - url "https://files.pythonhosted.org/packages/06/18/fa675aa501e11d6d6ca0ae73a101b2f3571a565e0f7d38e062eec18a91ee/mccabe-0.6.1.tar.gz" - sha256 "dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "toml" do - url "https://files.pythonhosted.org/packages/da/24/84d5c108e818ca294efe7c1ce237b42118643ce58a14d2462b3b2e3800d5/toml-0.10.1.tar.gz" - sha256 "926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f" - end - - resource "wrapt" do - url "https://files.pythonhosted.org/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz" - sha256 "b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"pylint_test.py").write <<~EOS - print('Test file' - ) - EOS - system bin/"pylint", "--exit-zero", "pylint_test.py" - end -end diff --git a/Formula/pympress.rb b/Formula/pympress.rb deleted file mode 100644 index 3998aeecc054f..0000000000000 --- a/Formula/pympress.rb +++ /dev/null @@ -1,63 +0,0 @@ -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/92/80/c63ad7748e877dfeb5d7d756c1bdd4c2657e5a857814b4d6edf96d44678c/pympress-1.5.3.tar.gz" - sha256 "d8c10c286d1de2210c19a3e752542b61c8bcc592c48553f7c7043e943a87d05d" - license "GPL-2.0" - head "https://github.com/Cimbali/pympress.git" - - bottle do - cellar :any - sha256 "0882199094438644ae2af8e60ea55f02272990cca88b4ae0cbcfbabc9a68465b" => :catalina - sha256 "7594889ecb2cf373356f01c1eb4e56573ba26bd50fd5ed0de5ece83d75f1adca" => :mojave - sha256 "e6634bc9a8213054574d6be0814ef0b8faf6209e20aafb721753418a718f68af" => :high_sierra - end - - depends_on "gobject-introspection" - depends_on "gtk+3" - depends_on "libyaml" - depends_on "poppler" - depends_on "pygobject3" - depends_on "python@3.8" - - resource "argh" do - url "https://files.pythonhosted.org/packages/e3/75/1183b5d1663a66aebb2c184e0398724b624cecd4f4b679cb6e25de97ed15/argh-0.26.2.tar.gz" - sha256 "e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65" - end - - resource "pathtools" do - url "https://files.pythonhosted.org/packages/e7/7f/470d6fcdf23f9f3518f6b0b76be9df16dcc8630ad409947f8be2eb0ed13a/pathtools-0.1.2.tar.gz" - sha256 "7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0" - end - - resource "python-vlc" do - url "https://files.pythonhosted.org/packages/a8/51/299f4804c43f99d718ed43a63b1ea0712932e25b6bbe1ee1817cb8e954f7/python-vlc-3.0.7110.tar.gz" - sha256 "821bca0dbe08fbff97a65e56ff2318ad7d499330876579c39f01f3fb38c7b679" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz" - sha256 "01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4" - end - - resource "watchdog" do - url "https://files.pythonhosted.org/packages/bb/e3/5a55d48a29300160779f0a0d2776d17c1b762a2039b36de528b093b87d5b/watchdog-0.9.0.tar.gz" - sha256 "965f658d0732de3188211932aeb0bb457587f04f63ab4c1e33eab878e9de961d" - end - - def install - virtualenv_install_with_resources - bin.install_symlink libexec/"bin/pympress" - end - - test do - system bin/"pympress", "--help" - - # Version info contained in log file only if all dependencies loaded successfully - assert_predicate testpath/"Library/Logs/pympress.log", :exist? - output = (testpath/"Library/Logs/pympress.log").read - assert_match /^INFO:pympress.__main__:Pympress: #{version}\s*;/, output - end -end diff --git a/Formula/pypy.rb b/Formula/pypy.rb deleted file mode 100644 index 13f5ba672f4f1..0000000000000 --- a/Formula/pypy.rb +++ /dev/null @@ -1,174 +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.7-v7.3.1-src.tar.bz2" - sha256 "fa3771514c8a354969be9bd3b26d65a489c30e28f91d350e4ad2f4081a9c9321" - revision 1 - head "https://foss.heptapod.net/pypy/pypy", :using => :hg - - bottle do - cellar :any - sha256 "61e8cfe37e26b93cd72b7fa8d758d71c52181bc1e2a04f6221811018237bade1" => :catalina - sha256 "8b6ec82f015f6481f44f30d0d01907872129197efc03bebbc2c14edb54bf598d" => :mojave - sha256 "08f78b30b0a831ce06cfa27f9d1f82efbffa3ff9a3997ba8e6129bfefe9e337d" => :high_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@1.1" - depends_on "sqlite" - depends_on "tcl-tk" - - uses_from_macos "expat" - uses_from_macos "libffi" - uses_from_macos "unzip" - uses_from_macos "zlib" - - resource "bootstrap" do - url "https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.3.0-osx64.tar.bz2" - version "7.3.0" - sha256 "ca7b056b243a6221ad04fa7fc8696e36a2fb858396999dcaa31dbbae53c54474" - end - - resource "setuptools" do - url "https://files.pythonhosted.org/packages/b5/96/af1686ea8c1e503f4a81223d4a3410e7587fd52df03083de24161d0df7d4/setuptools-46.1.3.zip" - sha256 "795e0475ba6cd7fa082b1ee6e90d552209995627a2a227a47c6ea93282f4bfb1" - end - - resource "pip" do - url "https://files.pythonhosted.org/packages/8e/76/66066b7bc71817238924c7e4b448abdb17eb0c92d645769c223f9ace478f/pip-20.0.2.tar.gz" - sha256 "7db0c8ea4c7ea51c8049640e8e6e7fde949de672bfa4949920675563a5a6967f" - end - - def install - ENV.prepend_path "PKG_CONFIG_PATH", "#{prefix}/opt/tcl-tk/lib/pkgconfig" - ENV.prepend "LDFLAGS", "-L#{prefix}/opt/tcl-tk/lib" - ENV.prepend "CPPFLAGS", "-I#{prefix}/opt/tcl-tk/include" - # 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 - - # Fix build on High Sierra - inreplace "lib_pypy/_tkinter/tklib_build.py" do |s| - s.gsub! "/System/Library/Frameworks/Tk.framework/Versions/Current/Headers/", - "#{prefix}/opt/tcl-tk/include" - s.gsub! "libdirs = []", - "libdirs = ['#{prefix}/opt/tcl-tk/lib']" - end - - 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 88f66ddeb584c..0000000000000 --- a/Formula/pypy3.rb +++ /dev/null @@ -1,199 +0,0 @@ -class Pypy3 < Formula - desc "Implementation of Python 3 in Python" - homepage "https://pypy.org/" - url "https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.3.1-src.tar.bz2" - sha256 "0c2cc3229da36c6984baee128c8ff8bb4516d69df1d73275dc4622bf249afa83" - revision 1 - head "https://foss.heptapod.net/pypy/pypy", :using => :hg, :branch => "py3.7" - - bottle do - cellar :any - sha256 "384b960848c433008154103f8cdf57c77b8ee805115818cae4cb502e5485f043" => :catalina - sha256 "de50ccf32775b38c4d1e2324fe7b9c0e23856fbe34eaf6ebd7b23e7d6d8f6459" => :mojave - sha256 "ea4031fc8f85001fea131cc880108416f0d9bbac400655a7d8337ad8cb8f1547" => :high_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@1.1" - depends_on "sqlite" - depends_on "tcl-tk" - depends_on "xz" - - uses_from_macos "expat" - uses_from_macos "libffi" - uses_from_macos "unzip" - uses_from_macos "zlib" - - # packaging depends on pyparsing - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - # packaging and setuptools depend on six - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - # setuptools depends on packaging - resource "packaging" do - url "https://files.pythonhosted.org/packages/65/37/83e3f492eb52d771e2820e88105f605335553fe10422cba9d256faeb1702/packaging-20.3.tar.gz" - sha256 "3c292b474fda1671ec57d46d739d072bfd495a4f51ad01a055121d81e952b7a3" - 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/b5/96/af1686ea8c1e503f4a81223d4a3410e7587fd52df03083de24161d0df7d4/setuptools-46.1.3.zip" - sha256 "795e0475ba6cd7fa082b1ee6e90d552209995627a2a227a47c6ea93282f4bfb1" - end - - resource "pip" do - url "https://files.pythonhosted.org/packages/8e/76/66066b7bc71817238924c7e4b448abdb17eb0c92d645769c223f9ace478f/pip-20.0.2.tar.gz" - sha256 "7db0c8ea4c7ea51c8049640e8e6e7fde949de672bfa4949920675563a5a6967f" - end - - def install - ENV.prepend_path "PKG_CONFIG_PATH", "#{prefix}/opt/openssl/lib/pkgconfig:#{prefix}/opt/tcl-tk/lib/pkgconfig" - ENV.prepend "LDFLAGS", "-L#{prefix}/opt/tcl-tk/lib" - ENV.prepend "CPPFLAGS", "-I#{prefix}/opt/tcl-tk/include" - # Work around "dyld: Symbol not found: _utimensat" - ENV.delete("SDKROOT") if MacOS.version == :sierra && MacOS::Xcode.version >= "9.0" - - # Fix build on High Sierra - inreplace "lib_pypy/_tkinter/tklib_build.py" do |s| - s.gsub! "/System/Library/Frameworks/Tk.framework/Versions/Current/Headers/", - "#{prefix}/opt/tcl-tk/include" - s.gsub! "libdirs = []", - "libdirs = ['#{prefix}/opt/tcl-tk/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"] = "" - 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.6" - 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 six packaging setuptools pyparsing 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 e45cde8d8814e..0000000000000 --- a/Formula/pyqt.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Pyqt < Formula - desc "Python bindings for v5 of Qt" - homepage "https://www.riverbankcomputing.com/software/pyqt/download5" - url "https://files.pythonhosted.org/packages/8c/90/82c62bbbadcca98e8c6fa84f1a638de1ed1c89e85368241e9cc43fcbc320/PyQt5-5.15.0.tar.gz" - sha256 "c6f75488ffd5365a65893bc64ea82a6957db126fbfe33654bcd43ae1c30c52f9" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "a17f79ba93b629d68857864a9b35130b4cd56c650f4c80226fb9c983d40ef199" => :catalina - sha256 "6bc5f85f905eb25f9bfc9e23da8af4d23ba77745ace301fe4d3e8b93ad9a27b7" => :mojave - sha256 "6a823bc3eedf914192f63d8d21d4fc66ee32399100cb9b79b044dfd60fa401bb" => :high_sierra - end - - depends_on "python@3.8" - depends_on "qt" - depends_on "sip" - - def install - version = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - 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}", - "--designer-plugindir=#{pkgshare}/plugins", - "--qml-plugindir=#{pkgshare}/plugins", - "--pyuic5-interpreter=#{Formula["python@3.8"].opt_bin}/python3", - "--verbose"] - - system Formula["python@3.8"].opt_bin/"python3", "configure.py", *args - system "make" - ENV.deparallelize { system "make", "install" } - end - - test do - system "#{bin}/pyuic5", "--version" - system "#{bin}/pylupdate5", "-version" - - system Formula["python@3.8"].opt_bin/"python3", "-c", "import PyQt5" - %w[ - Gui - Location - Multimedia - Network - Quick - Svg - Widgets - Xml - ].each { |mod| system Formula["python@3.8"].opt_bin/"python3", "-c", "import PyQt5.Qt#{mod}" } - end -end diff --git a/Formula/pyside.rb b/Formula/pyside.rb deleted file mode 100644 index 890c3bf1980dd..0000000000000 --- a/Formula/pyside.rb +++ /dev/null @@ -1,58 +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.15.0-src/pyside-setup-opensource-src-5.15.0.tar.xz" - sha256 "f1cdee53de3b76e22c1117a014a91ed95ac16e4760776f4f12dc38cd5a7b6b68" - - bottle do - sha256 "e57b255441e9cd1aeeb0af012c69d54829b6f6fb0306bfa91e46ad4cebe33817" => :catalina - sha256 "926963a98a1d3490ccd21e91428edeef3fb13bd1a9062142625a94a69f1e0991" => :mojave - sha256 "a0c49e08f6a7e2d8d2b6744672c90537c15f9b98846d35a83d599d2e819dc733" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "llvm" => :build - depends_on "python@3.8" - depends_on "qt" - - def install - ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib - - args = %W[ - --ignore-git - --parallel=#{ENV.make_jobs} - --install-scripts #{bin} - ] - - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - - system Formula["python@3.8"].opt_bin/"python3", - *Language::Python.setup_install_args(prefix), - "--install-lib", lib/"python#{xy}/site-packages", *args, - "--build-type=shiboken2" - - system Formula["python@3.8"].opt_bin/"python3", - *Language::Python.setup_install_args(prefix), - "--install-lib", lib/"python#{xy}/site-packages", *args, - "--build-type=pyside2" - - lib.install_symlink Dir.glob(lib/"python#{xy}/site-packages/PySide2/*.dylib") - lib.install_symlink Dir.glob(lib/"python#{xy}/site-packages/shiboken2/*.dylib") - end - - test do - system Formula["python@3.8"].opt_bin/"python3", "-c", "import PySide2" - %w[ - Core - Gui - Location - Multimedia - Network - Quick - Svg - WebEngineWidgets - Widgets - Xml - ].each { |mod| system Formula["python@3.8"].opt_bin/"python3", "-c", "import PySide2.Qt#{mod}" } - end -end diff --git a/Formula/python-markdown.rb b/Formula/python-markdown.rb deleted file mode 100644 index bff6f8528eca4..0000000000000 --- a/Formula/python-markdown.rb +++ /dev/null @@ -1,26 +0,0 @@ -class PythonMarkdown < Formula - include Language::Python::Virtualenv - - desc "Python implementation of Markdown" - homepage "https://pypi.python.org/pypi/Markdown" - url "https://files.pythonhosted.org/packages/44/30/cb4555416609a8f75525e34cbacfc721aa5b0044809968b2cf553fd879c7/Markdown-3.2.2.tar.gz" - sha256 "1fafe3f1ecabfb514a5285fca634a53c1b32a81cb0feb154264d55bf2ff22c17" - - bottle do - cellar :any_skip_relocation - sha256 "a5a1565cdb0c20aa5d1101039e8ed69110dd36262224ed6e2ee107a6d6a0cdc3" => :catalina - sha256 "54d88c62588de8fef562e815b9cb0e83177798c9276b881401b4445e78605872" => :mojave - sha256 "80a8cba20c744e0e49f211240883b9f8fbbd0676c95e9f43abbaf1b290f435b0" => :high_sierra - end - - depends_on "python@3.8" - - 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/python-yq.rb b/Formula/python-yq.rb deleted file mode 100644 index 406c2ece6e2bf..0000000000000 --- a/Formula/python-yq.rb +++ /dev/null @@ -1,84 +0,0 @@ -class PythonYq < Formula - desc "Command-line YAML and XML processor that wraps jq" - homepage "https://kislyuk.github.io/yq/" - url "https://files.pythonhosted.org/packages/b5/b6/84cf7ea7f30c340f8bb40e29ff4b154f787d0fdacf2d47a7c180e3d2b256/yq-2.10.1.tar.gz" - sha256 "f6252a0757d0c2a9e55b4402e176a7e41a99e0e6dd5be4f9d5a4d651eeb4d6c0" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "01134f6bc2acd0c2cc57c572e8d17e31f16ec258f442a87c43a86a2e40839bc7" => :catalina - sha256 "01134f6bc2acd0c2cc57c572e8d17e31f16ec258f442a87c43a86a2e40839bc7" => :mojave - sha256 "01134f6bc2acd0c2cc57c572e8d17e31f16ec258f442a87c43a86a2e40839bc7" => :high_sierra - end - - depends_on "jq" - depends_on "python@3.8" - - conflicts_with "yq", :because => "both install `yq` executables" - - resource "argcomplete" do - url "https://files.pythonhosted.org/packages/84/44/ad7f3fc9483b776dcee11d0a1dcadb6e55c456e06ae611073b82bc8d63d2/argcomplete-1.11.0.tar.gz" - sha256 "783d6a12c6c84a33653dc5bac4d6c0640ba64d1037c2662acd9dbe410c26056f" - end - - resource "importlib-metadata" do - url "https://files.pythonhosted.org/packages/8c/0e/10e247f40c89ba72b7f2a2104ccf1b65de18f79562ffe11bfb837b711acf/importlib_metadata-1.4.0.tar.gz" - sha256 "f17c015735e1a88296994c0697ecea7e11db24290941983b08c9feb30921e6d8" - end - - resource "more-itertools" do - url "https://files.pythonhosted.org/packages/4e/b2/e9e512cccde6c54bf66a8e5820a2af779eb8235028627002ca90d4f75bea/more-itertools-8.0.2.tar.gz" - sha256 "b84b238cce0d9adad5ed87e745778d20a3f8487d0f0cb8b8a586816c7496458d" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/3d/d9/ea9816aea31beeadccd03f1f8b625ecf8f645bd66744484d162d84803ce5/PyYAML-5.3.tar.gz" - sha256 "e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615" - end - - resource "xmltodict" do - url "https://files.pythonhosted.org/packages/58/40/0d783e14112e064127063fbf5d1fe1351723e5dfe9d6daad346a305f6c49/xmltodict-0.12.0.tar.gz" - sha256 "50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21" - end - - resource "zipp" do - url "https://files.pythonhosted.org/packages/57/dd/585d728479d97d25aeeb9aa470d36a4ad8d0ba5610f84e14770128ce6ff7/zipp-0.6.0.tar.gz" - sha256 "3718b1cbcd963c7d4c5511a8240812904164b7f381b647143a89d3b98f9bcd8e" - 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@3.7.rb b/Formula/python@3.7.rb deleted file mode 100644 index 677127da6af54..0000000000000 --- a/Formula/python@3.7.rb +++ /dev/null @@ -1,325 +0,0 @@ -class PythonAT37 < Formula - desc "Interpreted, interactive, object-oriented programming language" - homepage "https://www.python.org/" - url "https://www.python.org/ftp/python/3.7.8/Python-3.7.8.tar.xz" - sha256 "43a543404b363f0037f89df8478f19db2dbc0d6f3ffee310bc2997fa71854a63" - - bottle do - sha256 "ccfeeedbeedc0b75b4a13b38616118dd34da7b0ee1749ff090c4cbe8c3b9a623" => :catalina - sha256 "6d6054a4217294c08fda8ec009db417b2398cc152a08f7afa2ec409b85b57d80" => :mojave - sha256 "fb88eb19f68bcdd588d5f9b8d69bb558195a68b20e70dc7ad3f07579cc3f779f" => :high_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 - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "gdbm" - depends_on "openssl@1.1" - depends_on "readline" - depends_on "sqlite" - depends_on "xz" - - uses_from_macos "bzip2" - uses_from_macos "libffi" - uses_from_macos "ncurses" - uses_from_macos "zlib" - - 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" - - resource "setuptools" do - url "https://files.pythonhosted.org/packages/df/ed/bea598a87a8f7e21ac5bbf464102077c7102557c07db9ff4e207bd9f7806/setuptools-46.0.0.zip" - sha256 "2f00f25b780fbfd0787e46891dcccd805b08d007621f24629025f48afef444b5" - end - - resource "pip" do - url "https://files.pythonhosted.org/packages/8e/76/66066b7bc71817238924c7e4b448abdb17eb0c92d645769c223f9ace478f/pip-20.0.2.tar.gz" - sha256 "7db0c8ea4c7ea51c8049640e8e6e7fde949de672bfa4949920675563a5a6967f" - end - - resource "wheel" do - url "https://files.pythonhosted.org/packages/75/28/521c6dc7fef23a68368efefdcd682f5b3d1d58c2b90b06dc1d0b805b51ae/wheel-0.34.2.tar.gz" - sha256 "8788e9155fe14f54164c1b9eb0a319d98ef02c160725587ad60f14ddc57b6f96" - 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@1.1"].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'" - - # 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 - - # Remove wheel test data. - # It's for people editing wheel and contains binaries which fail `brew linkage`. - rm libexec/"wheel/tox.ini" - rm_r libexec/"wheel/tests" - - # 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@1.1"].opt_include, - Formula["sqlite"].opt_include] - library_dirs = [HOMEBREW_PREFIX/"lib", Formula["openssl@1.1"].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 - xy = if prefix.exist? - (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s - else - 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 - - 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@3.8.rb b/Formula/python@3.8.rb deleted file mode 100644 index 99f633292cae1..0000000000000 --- a/Formula/python@3.8.rb +++ /dev/null @@ -1,356 +0,0 @@ -class PythonAT38 < Formula - desc "Interpreted, interactive, object-oriented programming language" - homepage "https://www.python.org/" - url "https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tar.xz" - sha256 "dfab5ec723c218082fe3d5d7ae17ecbdebffa9a1aea4d64aa3a2ecdd2e795864" - revision 1 - - bottle do - sha256 "142f7ace3f1d12472569e89eaab40526604ea4011dcfc02ecc362e7e9f1cafba" => :catalina - sha256 "f82b79eabc6546155997cecc9c62a8bebba6bc8b138952235b894ea5141ec7ce" => :mojave - sha256 "39812747f7248f24f3c061f9b9206bd0418341d95fcefad648d3ee5e938c9e58" => :high_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@1.1" - depends_on "readline" - depends_on "sqlite" - depends_on "xz" - - uses_from_macos "bzip2" - uses_from_macos "libffi" - uses_from_macos "ncurses" - uses_from_macos "unzip" - uses_from_macos "zlib" - - skip_clean "bin/pip3", "bin/pip-3.4", "bin/pip-3.5", "bin/pip-3.6", "bin/pip-3.7", "bin/pip-3.8" - 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", "bin/easy_install-3.8" - - link_overwrite "bin/2to3" - 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/pkgconfig/python3.pc" - 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" - - resource "setuptools" do - url "https://files.pythonhosted.org/packages/df/ed/bea598a87a8f7e21ac5bbf464102077c7102557c07db9ff4e207bd9f7806/setuptools-46.0.0.zip" - sha256 "2f00f25b780fbfd0787e46891dcccd805b08d007621f24629025f48afef444b5" - end - - resource "pip" do - url "https://files.pythonhosted.org/packages/8e/76/66066b7bc71817238924c7e4b448abdb17eb0c92d645769c223f9ace478f/pip-20.0.2.tar.gz" - sha256 "7db0c8ea4c7ea51c8049640e8e6e7fde949de672bfa4949920675563a5a6967f" - end - - resource "wheel" do - url "https://files.pythonhosted.org/packages/75/28/521c6dc7fef23a68368efefdcd682f5b3d1d58c2b90b06dc1d0b805b51ae/wheel-0.34.2.tar.gz" - sha256 "8788e9155fe14f54164c1b9eb0a319d98ef02c160725587ad60f14ddc57b6f96" - end - - # Remove for > 3.8.3 - # Upstream commit from 2020-06-25 "Support macOS 11 when building" - patch do - url "https://github.com/python/cpython/commit/8ea6353.patch?full_index=1" - sha256 "c47680c85f201f5830bf71741f09ece031b99386040f3c70b20190b4c47fb81d" - end - - # Remove this block when upstream adds arm64 compatibility - if Hardware::CPU.arm? - # Upstream PR #21114, "Support `arm64` in Mac/Tools/pythonw" - patch do - url "https://github.com/python/cpython/pull/21114.patch?full_index=1" - sha256 "a50ddeb9f3a51277c935d681a4607f6e73c0817ec7a10c5e77bc8389814ccb19" - end - - # Upstream PR #21224, "allow python to build for macosx-11.0-arm64" - patch do - url "https://github.com/python/cpython/pull/21224.patch?full_index=1" - sha256 "2a02ad3412a3f41cd67ae26a20f70ffd42dd15ef6791f8c8ef86129572e8f1d7" - end - - # Upstream PR #21249, "ctypes fixes for arm64 Mac OS" - patch do - url "https://github.com/python/cpython/pull/21249.patch?full_index=1" - sha256 "11923d4a249da7b050cc2093bd9d4547dcdfbf61718b20896e8b6447e1967cb3" - end - 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@1.1"].opt_prefix} - ] - - 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(self.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 self.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__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__darwin_darwin.py"], - %r{('LINKFORSHARED': .*?)'(Python.framework/Versions/3.\d+/Python)'}m, - "\\1'#{opt_prefix}/Frameworks/\\2'" - - # 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 - - # Remove wheel test data. - # It's for people editing wheel and contains binaries which fail `brew linkage`. - rm libexec/"wheel/tox.ini" - rm_r libexec/"wheel/tests" - - # 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[pip#{xy} easy_install-#{xy}].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@1.1"].opt_include, - Formula["sqlite"].opt_include] - library_dirs = [HOMEBREW_PREFIX/"lib", Formula["openssl@1.1"].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 - xy = if prefix.exist? - (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s - else - version.to_s.slice(/(3\.\d)/) || "3.8" - end - <<~EOS - Python has been installed as - #{opt_bin}/python3 - - You can install Python packages with - #{opt_bin}/pip3 install - They will install into the site-package directory - #{prefix/"Frameworks/Python.framework/Versions/#{xy}/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/pytouhou.rb b/Formula/pytouhou.rb deleted file mode 100644 index 8109a0358de5b..0000000000000 --- a/Formula/pytouhou.rb +++ /dev/null @@ -1,125 +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 7 - head "https://hg.linkmauve.fr/touhou", :using => :hg - - bottle do - cellar :any - sha256 "e0470e99f10a318e152eeb46e7e555271234e1ee256d26d9115d947bd810beca" => :catalina - sha256 "038adcb10d7aa824288b6a67c85cdd7b950d6f3ec5bfefc9a2a37f55c6c96026" => :mojave - sha256 "5222b26c38e279f14622baf64a1d2dfab9decf6920533b353eed61b9d9f6b411" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "glfw" - depends_on "gtk+3" - depends_on "libepoxy" - depends_on "py3cairo" - depends_on "pygobject3" - depends_on "python@3.8" - depends_on "sdl2" - depends_on "sdl2_image" - depends_on "sdl2_mixer" - depends_on "sdl2_ttf" - - resource "Cython" do - url "https://files.pythonhosted.org/packages/a5/1f/c7c5450c60a90ce058b47ecf60bb5be2bfe46f952ed1d3b95d1d677588be/Cython-0.29.13.tar.gz" - sha256 "c29d069a4a30f472482343c866f7486731ad638ef9af92bfe5fca9c7323d638e" - end - - # Fix for parallel cythonize - # It just put setup call in `if __name__ == '__main__'` block - patch :p0, :DATA - - def install - pyver = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{pyver}/site-packages" - resource("Cython").stage do - system Formula["python@3.8"].opt_bin/"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 Formula["python@3.8"].opt_bin/"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 - -__END__ ---- setup.py 2019-10-21 08:55:06.000000000 +0100 -+++ setup.py 2019-10-21 08:56:15.000000000 +0100 -@@ -172,29 +172,29 @@ - if not os.path.exists(temp_data_dir): - os.symlink(os.path.join(current_dir, 'data'), temp_data_dir) - -+if __name__ == '__main__': -+ setup(name='PyTouhou', -+ version=check_output(['hg', 'heads', '.', '-T', '{rev}']).decode(), -+ author='Thibaut Girka', -+ author_email='thib@sitedethib.com', -+ url='http://pytouhou.linkmauve.fr/', -+ license='GPLv3', -+ py_modules=py_modules, -+ ext_modules=cythonize(ext_modules, nthreads=nthreads, annotate=debug, -+ language_level=3, -+ compiler_directives={'infer_types': True, -+ 'infer_types.verbose': debug, -+ 'profile': debug}, -+ compile_time_env={'MAX_TEXTURES': 128, -+ 'MAX_ELEMENTS': 640 * 4 * 3, -+ 'MAX_SOUNDS': 26, -+ 'USE_OPENGL': use_opengl}), -+ scripts=['scripts/pytouhou'] + (['scripts/anmviewer'] if anmviewer else []), -+ packages=['pytouhou'], -+ package_data={'pytouhou': ['data/menu.glade']}, -+ **extra) - --setup(name='PyTouhou', -- version=check_output(['hg', 'heads', '.', '-T', '{rev}']).decode(), -- author='Thibaut Girka', -- author_email='thib@sitedethib.com', -- url='http://pytouhou.linkmauve.fr/', -- license='GPLv3', -- py_modules=py_modules, -- ext_modules=cythonize(ext_modules, nthreads=nthreads, annotate=debug, -- language_level=3, -- compiler_directives={'infer_types': True, -- 'infer_types.verbose': debug, -- 'profile': debug}, -- compile_time_env={'MAX_TEXTURES': 128, -- 'MAX_ELEMENTS': 640 * 4 * 3, -- 'MAX_SOUNDS': 26, -- 'USE_OPENGL': use_opengl}), -- scripts=['scripts/pytouhou'] + (['scripts/anmviewer'] if anmviewer else []), -- packages=['pytouhou'], -- package_data={'pytouhou': ['data/menu.glade']}, -- **extra) - -- --# Remove the link afterwards --if os.path.exists(temp_data_dir): -- os.unlink(temp_data_dir) -+ # Remove the link afterwards -+ if os.path.exists(temp_data_dir): -+ os.unlink(temp_data_dir) diff --git a/Formula/pyvim.rb b/Formula/pyvim.rb deleted file mode 100644 index 62922a662f6cb..0000000000000 --- a/Formula/pyvim.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Pyvim < Formula - include Language::Python::Virtualenv - - desc "Pure Python Vim clone" - homepage "https://github.com/jonathanslenders/pyvim" - url "https://files.pythonhosted.org/packages/7b/7c/4c44b77642e866bbbe391584433c11977aef5d1dc05da879d3e8476cab10/pyvim-3.0.2.tar.gz" - sha256 "da94f7a8e8c4b2b4611196987c3ca2840b0011cc399618793e551f7149f26c6a" - - bottle do - cellar :any_skip_relocation - sha256 "00673aa2851bbd2112035bf5fcb7e4ee5a7a594f5b43c0cf14a27f3727058902" => :catalina - sha256 "3526d256cf5ab2be293f7b3a0d80ef648b9847780456de3b21992ec79bb58af6" => :mojave - sha256 "b2c764a4186e90c37d43af45fe31432f74ea12566af67a7a9a1103d388fd168c" => :high_sierra - end - - depends_on "python@3.8" - - 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/69/19/3aa4bf17e1cbbdfe934eb3d5b394ae9a0a7fb23594a2ff27e0fdaf8b4c59/prompt_toolkit-3.0.5.tar.gz" - sha256 "563d1a4140b63ff9dd587bda9557cffb2fe73650205ab6f4383092fb882e7dc8" - end - - resource "pyflakes" do - url "https://files.pythonhosted.org/packages/f1/e2/e02fc89959619590eec0c35f366902535ade2728479fc3082c8af8840013/pyflakes-2.2.0.tar.gz" - sha256 "35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" - sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" - end - - def install - virtualenv_install_with_resources - 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 1dbe46c51057a..0000000000000 --- a/Formula/q.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Q < Formula - desc "Treat text as a database" - homepage "https://github.com/harelba/q" - url "https://github.com/harelba/q/archive/2.0.10.tar.gz" - sha256 "c6f96263d32f6facaa34480c6d4c91a356cefdc3edf7f271ec3efd505b20532b" - license "GPL-3.0" - head "https://github.com/harelba/q.git" - - bottle :unneeded - - def install - bin.install "bin/q.py" => "q" - end - - test do - seq = (1..100).map(&:to_s).join("\n") - output = pipe_output("#{bin}/q -c 1 'select sum(c1) from -'", seq) - assert_equal "5050\n", output - end -end diff --git a/Formula/q/qalculate-gtk.rb b/Formula/q/qalculate-gtk.rb new file mode 100644 index 0000000000000..41e5c1f2972ae --- /dev/null +++ b/Formula/q/qalculate-gtk.rb @@ -0,0 +1,50 @@ +class QalculateGtk < Formula + desc "Multi-purpose desktop calculator" + homepage "https://qalculate.github.io/" + url "https://github.com/Qalculate/qalculate-gtk/releases/download/v5.5.1/qalculate-gtk-5.5.1.tar.gz" + sha256 "dcf33e89ec2539c3e0bf9c5aee18b44680f6630b1e02cf23e2e9add6578450c7" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_sonoma: "6c39d6caced24fc7ba6961fe555175467fda6fe25ee2101c3dfd899cb9c591c3" + sha256 arm64_ventura: "9a1c8e13ef2dc561a1f136468738ba34a668fa68593ed8ad69f0262b5de30529" + sha256 sonoma: "074c2652d0fda500db768d049a99bdf5d37397315e03a0097bcd0ebc1307e59d" + sha256 ventura: "3215ef935dbcc30f7ba4285116b25bdcf8e428c3978eff2bd78f7c6ffc09e762" + sha256 x86_64_linux: "df4d889c9daa8452784656dc945bcbfa0b41f1f25a71d7ac1f6dbc7696f04d24" + 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..231c4f965d5c6 --- /dev/null +++ b/Formula/q/qalculate-qt.rb @@ -0,0 +1,43 @@ +class QalculateQt < Formula + desc "Multi-purpose desktop calculator" + homepage "https://qalculate.github.io/" + url "https://github.com/Qalculate/qalculate-qt/releases/download/v5.5.1/qalculate-qt-5.5.1.tar.gz" + sha256 "2d01841f7a7703417c6c251bcd6bcda81db0bf7d5c32827b7a8b396d572af843" + license "GPL-2.0-or-later" + head "https://github.com/Qalculate/qalculate-qt.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sonoma: "b06ff9fe513cb5cf5001cd191b09c8c216b4ecc0fcb72811758e7887cc5504cc" + sha256 cellar: :any, arm64_ventura: "0a09e028d074e3e8e8f7b83b43db1f03b2ae21d59a97e12cb09e22ff53849100" + sha256 cellar: :any, sonoma: "a612516358a27b4d6c6d44d539b1c46b06d13de1143105b199e56964963e5ffd" + sha256 cellar: :any, ventura: "9c64e3a28a9b2fa83c4ba77f289ad8cf163acab3d8b982e67b7cf2333a7da06f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "05413f45291372343722733bc6c2d4d8c1b1d9b77d34a7695d6f5c683bbb9fbb" + end + + depends_on "pkgconf" => :build + + depends_on "libqalculate" + depends_on "qt" + + on_macos do + depends_on "gmp" + depends_on "mpfr" + end + + def install + system Formula["qt"].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..e0ef309032514 --- /dev/null +++ b/Formula/q/qbe.rb @@ -0,0 +1,49 @@ +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_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..efac6496dc388 --- /dev/null +++ b/Formula/q/qbec.rb @@ -0,0 +1,41 @@ +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.16.3.tar.gz" + sha256 "1dfdd8f4db74ba3115c56704e99b26d072ad72aa14f84d5af8e1c419126bb122" + license "Apache-2.0" + head "https://github.com/splunk/qbec.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "87c759042432ed77117d61eff8a1f8e5cbe25e2672df0e2706896be8e78f483c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "290a9669a65e80fd5c4d7045c7a74b8f2d18eabf0083899f733a7ee3caf4675e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4d943895d5ab80e6a17ea36217a092f79cd107f10c4e12aaf0462d9742e7d54f" + sha256 cellar: :any_skip_relocation, sonoma: "026af3dda4133c5fbc36e7c2ae7665dd4b701fb01f4f4619b64c37e88778ef8b" + sha256 cellar: :any_skip_relocation, ventura: "02f0fcba10301230efdec142e29c9b3c09286e1ebf133d3a00cac08ce27aac62" + sha256 cellar: :any_skip_relocation, arm64_linux: "92f342e9bdf53d997f34eba29e635263ba0741935b5110c4d1e7152d3227c6e2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "78a97847c98ce06a3a868af4e5bb008e16dd24d86a219c2ef6607637bdfbc7a0" + 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..123fe084082ef --- /dev/null +++ b/Formula/q/qbittorrent-cli.rb @@ -0,0 +1,39 @@ +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_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, 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..91e4c6ba20ab3 --- /dev/null +++ b/Formula/q/qbs.rb @@ -0,0 +1,61 @@ +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/2.6.1/qbs-src-2.6.1.tar.gz" + sha256 "9f7f1a1f7daaa4a39fe3604f1851d0e520b576ee7750a7f97bf9401bcb849f2d" + 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_sonoma: "546b89eedb0a9c77b99492f62dd202076d820a57791c5c0838ad05c240a6b409" + sha256 cellar: :any, arm64_ventura: "0064fe9dc16510cd84ff7da779c309296a45b904698231cd0e11309f7aff6f40" + sha256 cellar: :any, sonoma: "0c1f18f7ef4ecbf92980c755820a9e6007e559f11ab7d0c4bc8848ca185da3ec" + sha256 cellar: :any, ventura: "a8768d4dc02f5b323d1f3525c6d8f52772217cd47c288b9863248041bd9218d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9223cde738c5a7094813cf1aca6538dd9cd00ff20557f86acef4a46cc3b9f022" + end + + depends_on "cmake" => :build + depends_on "qt" + + def install + qt_dir = Formula["qt"].opt_lib/"cmake/Qt6" + + args = %W[ + -DQt6_DIR=#{qt_dir} + -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 <<~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/q/qca.rb b/Formula/q/qca.rb new file mode 100644 index 0000000000000..3bd6bb54f3fd9 --- /dev/null +++ b/Formula/q/qca.rb @@ -0,0 +1,84 @@ +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 1 + 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_sonoma: "5d1185d69deda47364a7d2e279f27d68ece2a39fcf519e431fd356467a6b3b82" + sha256 cellar: :any, arm64_ventura: "ba134c852c174798c1e3591150a1b8c2b13eab89c164ad64784f46ee7fed1d6b" + sha256 cellar: :any, sonoma: "413848dff121c2d4b2e48decf5e79e06d448be120d62e82f55a2dc8d7a6f45ff" + sha256 cellar: :any, ventura: "0f7e5193b934d41a0d581f613f76317c0a600263859f11da094216fca2c8b39e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2eea9797f98480d589b8f4561ed35a0d306254692490c626ee2aeadb6546877d" + 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 "qt" + + 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..5ff30cfba3e5b --- /dev/null +++ b/Formula/q/qcachegrind.rb @@ -0,0 +1,45 @@ +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.04.1/src/kcachegrind-25.04.1.tar.xz" + sha256 "0b7349b84f5e90a9d9cb05b2642b2a79c27a629dacb85ba94e57b9528be1f975" + 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_sonoma: "51cb12d4d28aba1779e55a2abf0ded2e924f24f67427ebe8aba30831e7c1869b" + sha256 cellar: :any, arm64_ventura: "0b0d9cd39dd7f200f5d33c992ffba32a58ba28d3ff4d11944ee961739f9d2261" + sha256 cellar: :any, sonoma: "e0fc44aac494bba334a51586681b8158f21b73df7bd8d35d5d99caee99c23fb2" + sha256 cellar: :any, ventura: "914e283c91088f2dbf0df3378277116f401a083563f7dadda7c85f5307063365" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f478ae21aa1fa2b484124a399d5a47f82a0474484e9f6ca3843eaf9ed06801d" + end + + depends_on "graphviz" + depends_on "qt" + + def install + args = %w[-config release] + if OS.mac? + spec = (ENV.compiler == :clang) ? "macx-clang" : "macx-g++" + args += %W[-spec #{spec}] + end + + qt = Formula["qt"] + 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..e554790b84d1a --- /dev/null +++ b/Formula/q/qcli.rb @@ -0,0 +1,48 @@ +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: "master" + + bottle do + sha256 cellar: :any, arm64_sonoma: "01381abc80e93b31c44d6f50a65f6e4feebb5d82380b4331b9b1fe58f37b9aaa" + sha256 cellar: :any, arm64_ventura: "5f7e15ca1e3057ef5d2d2c7acc65528922efe573a12affe00f7be4ed37309fba" + sha256 cellar: :any, sonoma: "d92539860c22d368cc5a208b3c04053f5d6f047d25647b3f0dbc8a4c8a55c70c" + sha256 cellar: :any, ventura: "9fb489755752aa7decd8ec2f38dded60cdb7dcbde86377153d8b6953e511ac6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f87bd6039d932ef08d8b6b42d4adc44f497e54eb4ba9b153a44e439646b30209" + end + + depends_on "pkgconf" => :build + depends_on "ffmpeg@6" # Issue ref: https://github.com/bavc/qctools/issues/552 + depends_on "qt" + depends_on "qwt" + + 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/qd.rb b/Formula/q/qd.rb new file mode 100644 index 0000000000000..c4d4a04aa16af --- /dev/null +++ b/Formula/q/qd.rb @@ -0,0 +1,44 @@ +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 "ad6738e8330928308e10346ff7fd357ed17386408f8fb7a23704cd6f5d52a6c8" + 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 + sha256 cellar: :any, arm64_sequoia: "c6e67bc502536e759253deda5d9768807ec776f463adc65b1bd5949d7fb4fa0c" + sha256 cellar: :any, arm64_sonoma: "2d6c0fe69adbd654ff4c13130bce14f46e7fdb3d594b260c7236b32a3bc55a7c" + sha256 cellar: :any, arm64_ventura: "ce4f6ee31dd29ec69e078441f3aba096597de505b0b0098fccb8cb2a6a0edeb8" + sha256 cellar: :any, arm64_monterey: "a77fe42799177e1e4eb2ab359107d450cf3d9cff86f00ddc1bae02330a2e2962" + sha256 cellar: :any, sonoma: "2a13b392dc4c3b7ebe4d016839378fa40f91c6329e883ca291e4de2b8b8234e0" + sha256 cellar: :any, ventura: "c1b6d2b69e6105e815ea8e097483db818ca57de111e79890b01254f807094f04" + sha256 cellar: :any, monterey: "4153abaea2631b5f77092cdc3916e76e5b612306b5439e8b7ade5c7ed086327f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2849d06e8b854584a38e5ace7959467baa93d2bd1816b13b031f25bb97b2b4dd" + 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..dcedf6c7dd975 --- /dev/null +++ b/Formula/q/qdbm.rb @@ -0,0 +1,86 @@ +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 + + bottle do + rebuild 2 + 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..d0e364badd0e6 --- /dev/null +++ b/Formula/q/qdmr.rb @@ -0,0 +1,43 @@ +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.12.1.tar.gz" + sha256 "80eaadc6f817894fde6773d1b021e7a8ec051cbb774f63e6a097e21d8a56d8b5" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "466b1ea108063ed50d951b3e79694867255e395d516cbb43e294cbb9ffce4ca0" + sha256 arm64_sonoma: "b16fb78360a1a05305e2f31dc1b6949e45271b57589b486e930bd77814d2b6cc" + sha256 arm64_ventura: "04817d917185b0e67cd0f9791108465ac2d01b54351931c2c902725f9c17bc91" + sha256 sonoma: "86034b508621ad37972850dc34850dff0031e1ad7827b6ee69f60cc11e79b774" + sha256 ventura: "43852bc488a99f1ea2eeeb638b59c24ddb30b8d559a45e0a978b26efca56b0e7" + sha256 x86_64_linux: "7fbb488e9feba30be04cfa868546e46ea105bae7041549c7132a7e25eacb0910" + end + + depends_on "cmake" => :build + depends_on "libusb" + depends_on "qt@5" + 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..45cc5f808ca39 --- /dev/null +++ b/Formula/q/qemu.rb @@ -0,0 +1,166 @@ +class Qemu < Formula + desc "Generic machine emulator and virtualizer" + homepage "https://www.qemu.org/" + license "GPL-2.0-only" + head "https://gitlab.com/qemu-project/qemu.git", branch: "master" + + stable do + url "https://download.qemu.org/qemu-10.0.0.tar.xz" + sha256 "22c075601fdcf8c7b2671a839ebdcef1d4f2973eb6735254fd2e1bd0f30b3896" + + # The next four patches fix segmentation faults on macOS 15.0-15.3 + # See https://github.com/Homebrew/homebrew-core/issues/221154 + # Changes already merged upstream, remove on next release + + patch do + url "https://gitlab.com/qemu-project/qemu/-/commit/563cd698dffb977eea0ccfef3b95f6f9786766f3.diff" + sha256 "51d07db06532bdd655bec3fdd7eb15cd2004fc96652f0d4dc25522917c9b129a" + end + + patch do + url "https://gitlab.com/qemu-project/qemu/-/commit/6804b89fb531f5dd49c1e038214c89272383e220.diff" + sha256 "7e17787f09488fa731d6de8304b689df767236009c19a3bb662904189028d687" + end + + patch do + url "https://gitlab.com/qemu-project/qemu/-/commit/797150d69d2edba8b1bd4a7d8c7ba2df1219c503.diff" + sha256 "82f14935f588f7ee103e2ba25852aa3cbf19a4319588f270e09d3bd33fe83001" + end + + patch do + url "https://gitlab.com/qemu-project/qemu/-/commit/a5b30be534538dc6e44a68ce9734e45dd08f52ec.diff" + sha256 "a1ff1e8e7c64e7f7dfe7284277f2bef76b837a4c3a86394dd29768d1b1586818" + end + end + + livecheck do + url "https://www.qemu.org/download/" + regex(/href=.*?qemu[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "7231d454bb9f7fd7cfeff99727552963c3e8e3fba527a081497e6f3d4540d308" + sha256 arm64_sonoma: "aef31f95edeedeb93fd423a9baf655e532869cdeec46e206662a0a4f7370b285" + sha256 arm64_ventura: "a071c06840012951d7f2103b64ad44dcaa79ab87aeb80429897f1b3114d8a495" + sha256 sonoma: "409faa24495d47c4246109b8c10ba9a04e911c5682061cfe5872e8dbe2c2a07c" + sha256 ventura: "8edf18802c7b11f88926bc6d6d6de2d09b7c967ad3bd0f678b0b1e7c311d556e" + sha256 arm64_linux: "f1fb82f1381011a958406b1c27ae6070e2d042f73c4d3816c402dbb9e8e285d5" + sha256 x86_64_linux: "e30368126aeb3ca11ed54502921826fd90a4d15535eb3f8a43d7900655af8ff7" + end + + depends_on "libtool" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :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 + + # 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 + + 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 + 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..c76ad9ebf483b --- /dev/null +++ b/Formula/q/qhull.rb @@ -0,0 +1,45 @@ +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 + + bottle do + rebuild 1 + 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 + 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..7e6e3935fdcea --- /dev/null +++ b/Formula/q/qjackctl.rb @@ -0,0 +1,57 @@ +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: "master" + + livecheck do + url :stable + regex(%r{url=.*?/qjackctl[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_sonoma: "6bc46dab635d6d238075bd40608f12f0e2b91da3ea35fcd0f111c950e236819d" + sha256 arm64_ventura: "d4e7befa66d433bda2982d1b2298cd7b031190e2f5341afb82df72aa57bdc126" + sha256 sonoma: "4dcb152f927b45874dcb902c7fa5657c2699511c52a0157cf2f2852d82204aa7" + sha256 ventura: "833e34b3aa6e9a987da110efc4a1e28ab9e9ce37e11d50fa6d17df3aa9f27358" + sha256 x86_64_linux: "2d0274d62dd74b8cdb1edb6dff3137b21a48d73de5258b2e3dc3a714ed8eca40" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "jack" + depends_on "qt" + + 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..8c8bf2b271d94 --- /dev/null +++ b/Formula/q/qjson.rb @@ -0,0 +1,59 @@ +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 + + bottle do + rebuild 1 + 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, x86_64_linux: "b64e82e4791c3dc66f6304add6ac44a993b82a9d88d02704af280daa080f5d64" + end + + depends_on "cmake" => :build + depends_on "qt@5" + + 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() { + 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/qmmp.rb b/Formula/q/qmmp.rb new file mode 100644 index 0000000000000..8dd911597a3ab --- /dev/null +++ b/Formula/q/qmmp.rb @@ -0,0 +1,113 @@ +class Qmmp < Formula + desc "Qt-based Multimedia Player" + homepage "https://qmmp.ylsoftware.com/" + url "https://qmmp.ylsoftware.com/files/qmmp/2.2/qmmp-2.2.5.tar.bz2" + sha256 "58211f327ac385abbc7d75e6a5d8dd64bcdb5cc0f1119329f2927d1631097e18" + 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_sonoma: "da4d29849942a54e81aaecba1120a1e60a307e8198c1a61139a4705912b20753" + sha256 cellar: :any, arm64_ventura: "a7885cfcd49b682ded597300822ecd608fb8568a8ebce0840ccec2f09451f425" + sha256 cellar: :any, sonoma: "f1e021e589dc0d078da8ad510be52b828a554499853aa1e62ff6d0485f1943f1" + sha256 cellar: :any, ventura: "a24704593d01e95c2eafc1ec66497af5c3b30e77b5247ddc8e5ed5900fecc0d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32a0a2618ddbe6ac58cd3697bd7b094214f13e5255da22fee576b8a8c5967238" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :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 "opus" + depends_on "opusfile" + depends_on "projectm" + depends_on "pulseaudio" + depends_on "qt" + depends_on "taglib" + depends_on "wavpack" + depends_on "wildmidi" + + uses_from_macos "curl" + + on_macos do + depends_on "gettext" + depends_on "glib" + # musepack is not bottled on Linux + # https://github.com/Homebrew/homebrew-core/pull/92041 + depends_on "musepack" + 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.2/qmmp-plugin-pack-2.2.2.tar.bz2" + sha256 "0e85c8290b49aceddb7a52f9452d9c0c008539b6fba4ab2296b59a67d0b0846b" + + 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/qodem.rb b/Formula/q/qodem.rb new file mode 100644 index 0000000000000..3b83d3beb44cd --- /dev/null +++ b/Formula/q/qodem.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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, mojave: "e5b1c53c02b9111a447d2eae8d74231ba3f9374ba7775215bd1559eb1b326e61" + 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..2a132ea007d6c --- /dev/null +++ b/Formula/q/qp.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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, mojave: "f119afd6bacbac5af055c398a2dfb5c4f62c8f113bcb9e12dab825800fd8e744" + sha256 cellar: :any_skip_relocation, high_sierra: "d9c595a53f82ddd9f086fac02a5f8da34e65d9b0e7564fce02148304704457ed" + 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..9c1f232148f66 --- /dev/null +++ b/Formula/q/qpdf.rb @@ -0,0 +1,37 @@ +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_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..6361cbd634ec1 --- /dev/null +++ b/Formula/q/qpid-proton.rb @@ -0,0 +1,55 @@ +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_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..1e3999f48d78f --- /dev/null +++ b/Formula/q/qprint.rb @@ -0,0 +1,45 @@ +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 + + bottle do + 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, mojave: "0915aa3e8b8481b717c4c84b0eda595821ecc99c9ffdcd0aa3e4952a3de9ae87" + sha256 cellar: :any_skip_relocation, high_sierra: "57950dba66674d62c84076374427f6c3de6d8cda81448c50b579c11b1b1959e4" + sha256 cellar: :any_skip_relocation, sierra: "f26387daf3d025dd45843784dd90fb3bf77609bdf0eb870f1b66782c89571950" + sha256 cellar: :any_skip_relocation, el_capitan: "9660443356a1f9571b39ea496349482e17f7c0d06829dd06945ca7680291c0bf" + 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..3adf798273a73 --- /dev/null +++ b/Formula/q/qrcp.rb @@ -0,0 +1,61 @@ +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_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, 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..2ddffdd5e2eb2 --- /dev/null +++ b/Formula/q/qrencode.rb @@ -0,0 +1,60 @@ +class Qrencode < Formula + desc "QR Code generation" + homepage "https://fukuchi.org/works/qrencode/index.html.en" + license "LGPL-2.1-or-later" + + stable do + url "https://fukuchi.org/works/qrencode/qrencode-4.1.1.tar.gz" + sha256 "da448ed4f52aba6bcb0cd48cac0dd51b8692bccc4cd127431402fca6f8171e8e" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + livecheck do + url "https://fukuchi.org/works/qrencode/" + regex(/href=.*?qrencode[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "cecf1e7ce43e8748061ac53002415715527fa1f3edb8ae27d0cb406c988a2185" + sha256 cellar: :any, arm64_sonoma: "3226384aaa7dfe12685ac35c627a0bf3878c98e119e7057d8f86a6b8360fc65b" + sha256 cellar: :any, arm64_ventura: "c3065a87ad978bc0c2b3ff5a60371ad8f0d6f1f29d0584ac070e6cd998469561" + sha256 cellar: :any, arm64_monterey: "6fa3a670e9708cf84470f82fd966e5610d0ad9d8c96c1f5987645b4db3fa65cb" + sha256 cellar: :any, arm64_big_sur: "aba117089d1c60fd2fa1d36fbfa06a0929b23d5bb6a7417d6f2dafb5dcc32c5b" + sha256 cellar: :any, sonoma: "3d7be7074b40470b1b4a883642d6a9d6b4d87794c1914c5d4134154b745b5084" + sha256 cellar: :any, ventura: "882d866b0ce145f3eef1b497ad8ffeae5d415984b28bcf77dd684d6dab789bb7" + sha256 cellar: :any, monterey: "ebc1b405866a1c2736d1fc49d268e35d08faf6a676f3151b160e1414b0edadc2" + sha256 cellar: :any, big_sur: "1b3d2022412f9d5486550fb68250aee25bb358a04e2cccc7bb85c7d65b1885b0" + sha256 cellar: :any, catalina: "326d2f182c7c8d9188be7adda5bd0ecb5922269f60f72ac265e404fa17fb310f" + sha256 cellar: :any, mojave: "a8ec712f32c4d8b09d4c098c37264ea41f0f382525c5b67e657248fdd9f1f53d" + sha256 cellar: :any, high_sierra: "a6d123b7f88941fe9959970d8b6ccfbc426c2ec405cfc731bc259f2b0f536171" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f31dee099618d8ba49fd5219663bee1adcc8efbc4a42e0bd9bd9a81bcc76b31" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97aa13d3b6314c8a5d03edffa65c43f2f63b894a91a350de52a45367fe8f862f" + end + + head do + url "https://github.com/fukuchi/libqrencode.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + depends_on "pkgconf" => :build + depends_on "libpng" + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"qrencode", "123456789", "-o", "test.png" + end +end diff --git a/Formula/q/qrtool.rb b/Formula/q/qrtool.rb new file mode 100644 index 0000000000000..5815426f65704 --- /dev/null +++ b/Formula/q/qrtool.rb @@ -0,0 +1,39 @@ +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.11.8.tar.gz" + sha256 "873e9324720bc0d526ca233db31c952902294f72a3b5265bef8333605e31f75c" + 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_sequoia: "08b0026d4a4cb631fabd4351b7b34c73d428018612a327ae779aa721e87fbb29" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "84e50a973f4585383daf8beba9fda0abba46569411793fc9ee93de0d62bd6318" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0b7f4c46fd57d27652f71226670c8350049786933b0126bd3143e5a54f617fda" + sha256 cellar: :any_skip_relocation, sonoma: "7647d101c521fe0871327f9f649c081ba1ea27e46405700e7755384ce95109e1" + sha256 cellar: :any_skip_relocation, ventura: "a21295fe7c80dc30731fa070318aba7ccf4e73569fa9b56c64e5663b2858b27b" + sha256 cellar: :any_skip_relocation, arm64_linux: "1500f4cd68e7911d71c4398bdb33bcef404218641114d8c9869475cc22d462de" + sha256 cellar: :any_skip_relocation, x86_64_linux: "94e5bca91d85d01544e33d003422eb0cf6b20d9dae01405c88ed9dca13432fda" + end + + depends_on "asciidoctor" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"qrtool", "--generate-completion") + + outdir = Dir["target/release/build/qrtool-*/out"].first + man1.install Dir["#{outdir}/*.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..45d4fa57ff202 --- /dev/null +++ b/Formula/q/qrupdate.rb @@ -0,0 +1,59 @@ +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 + + bottle do + 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..c151f0a5ff299 --- /dev/null +++ b/Formula/q/qscintilla2.rb @@ -0,0 +1,96 @@ +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 4 + + # 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 + + bottle do + sha256 cellar: :any, arm64_sonoma: "eef138891327e8f9a5577972ee0c442ca7f3cf64c768541271418c0e577fbfae" + sha256 cellar: :any, arm64_ventura: "19e9c2e210f487a2a54f800c56e0e7b06bfaddf9d5a68a6bc2b54782a4d0d902" + sha256 cellar: :any, sonoma: "62385ab067cc1fef525c0732f0b29b5044a2af79557bc49606a288b182b59a87" + sha256 cellar: :any, ventura: "8a875755a790c4d437e29e2f93d8257bc3feeb0e7e56d0ebc2227f532eec7608" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d578937c4531c8cf6af62e88838e12e2431f46b042737da78841414a5c2fa92" + end + + depends_on "pyqt-builder" => :build + depends_on "pyqt" + depends_on "python@3.13" + depends_on "qt" + + def python3 + "python3.13" + 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["qt"] + 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 + + test do + 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..6bbda66067b13 --- /dev/null +++ b/Formula/q/qshell.rb @@ -0,0 +1,38 @@ +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.0.tar.gz" + sha256 "f0b9e9bec2e9f07b144d7fd660a60d419da07ae4c1882a7a6f7c5a9a7f969002" + license "MIT" + head "https://github.com/qiniu/qshell.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "54e0895a04e25a5389bf6581c15655c9c494752ffd0633ec34ed5f387343284f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "73ff629197d9611911b20554fc6d8facdf740ec4349509e77eaf8b4b7fb99af9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fafa0f83b863d64973e22fe5a4e16567874938e51024be431ffc64701f740f5b" + sha256 cellar: :any_skip_relocation, sonoma: "3c4ca827c917019ca343b5a50eb83023ce09ddd04967a9296e4a5fd9f303e0c4" + sha256 cellar: :any_skip_relocation, ventura: "e445640b9b3068b67019755a83247d9650527bdf6282e2535b93d6ff612ffa54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5149b877deb02d7f1ac5559d7d6b98c247208ffc30d3b84c14228261945caa90" + 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..3f05dba771ec4 --- /dev/null +++ b/Formula/q/qsoas.rb @@ -0,0 +1,59 @@ +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" + 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 + + bottle do + 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, x86_64_linux: "3d99b2b0c412e82eb58102d3722c32b5629773334ac81996ee6d4e58f0dffef3" + end + + depends_on "bison" => :build + depends_on "gsl" + depends_on "mruby" + depends_on "qt@5" + + uses_from_macos "ruby" + + def install + 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..c0334c69b08eb --- /dev/null +++ b/Formula/q/qstat.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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 mojave: "8673b95f024ded9f7e2c7a721a7672b9f36f9258c25dfffa7b83a0b742e308b6" + 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..fdc039fa44dce --- /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/4.0.0.tar.gz" + sha256 "87f53ba8099142e8a1159d600ef6b9e4329bf10a579f38257d757c99a45b33a7" + 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_sequoia: "9b97e11c4747b55adb66c5b14c8ab88150147c1ec557810209f460e692c2f505" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0a98e6ff18be9eb72fe838bbb53b7eef18a72efe202b2366407c60a8f3c0e1cc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "942132a892c830bb3c5152539c8ecd61dcf85240ce51b39c2b477730c16c5e70" + sha256 cellar: :any_skip_relocation, sonoma: "02387ab3ac368ebbe1634eef6a3d54641a9f450db56731c83a1acdeeb7bea9ce" + sha256 cellar: :any_skip_relocation, ventura: "43103014ac89d695da2d064af7cd1e8647a68c517cba655df6b16e8ac2fe6028" + sha256 cellar: :any_skip_relocation, arm64_linux: "954a045ccb42de014bd0daee2daa477236f9f380d093eb3254fb1d90ac1831a5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08b4996fdfb7deec5da50ea5b51b3235506d3c53690b1ef37745c701f982a3e1" + 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 + system "cargo", "install", *std_cargo_args, "--features", "apply,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" + end + + test do + (testpath/"test.csv").write("first header,second header") + assert_equal <<~EOS, shell_output("#{bin}/qsv stats --dataset-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,qsv__value + first header,NULL,,,,,,,,,,,,,,,,,,,,,,0,,, + second header,NULL,,,,,,,,,,,,,,,,,,,,,,0,,, + qsv__rowcount,,,,,,,,,,,,,,,,,,,,,,,,,,0 + qsv__columncount,,,,,,,,,,,,,,,,,,,,,,,,,,2 + qsv__filesize_bytes,,,,,,,,,,,,,,,,,,,,,,,,,,26 + qsv__fingerprint_hash,,,,,,,,,,,,,,,,,,,,,,,,,,589aa48c29e0a4abf207a0ff266da0903608c1281478acd75457c8f8ccea455a + EOS + end +end diff --git a/Formula/q/qt-libiodbc.rb b/Formula/q/qt-libiodbc.rb new file mode 100644 index 0000000000000..cd78b2f4b4265 --- /dev/null +++ b/Formula/q/qt-libiodbc.rb @@ -0,0 +1,93 @@ +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.0/submodules/qtbase-everywhere-src-6.9.0.tar.xz" + sha256 "c1800c2ea835801af04a05d4a32321d79a93954ee3ae2172bbeacf13d1f0598c" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qt" + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "f9695d322f1580faa1ab097dcdf76133857556d6c2b1806b9ddc5376eef4bdcf" + sha256 cellar: :any, arm64_ventura: "1c60ac29bcfe47d79fd1c39179a50c05c651db88b3afd30610c4f5614cef684a" + sha256 cellar: :any, sonoma: "6685078461574924b6e9283f9dc48aebf406181041c24ff094c3ad704deb7e81" + sha256 cellar: :any, ventura: "6d986f8aacb5cece81b516f536f214feeb450354c60504ace05dfd245672735f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e3879e0b730c2b31071475cb674325d28cb417ffccee0c3e37468c36afd950a" + end + + depends_on "cmake" => [:build, :test] + + depends_on "libiodbc" + depends_on "qt" + + 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 + ] + + 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 <<~EOS + QT += core sql + QT -= gui + TARGET = test + CONFIG += console debug + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + EOS + + (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..b81383a275141 --- /dev/null +++ b/Formula/q/qt-mariadb.rb @@ -0,0 +1,94 @@ +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.0/submodules/qtbase-everywhere-src-6.9.0.tar.xz" + sha256 "c1800c2ea835801af04a05d4a32321d79a93954ee3ae2172bbeacf13d1f0598c" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qt" + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "75e3067a257aafc396c73db5a337a1c33a7c30401da3accf5a2361e78b345a78" + sha256 cellar: :any, arm64_ventura: "7b9a4a684d172d026ef92946bbe16a9cbbe4ef77b4d10681c68989a08c4c12df" + sha256 cellar: :any, sonoma: "99a30beac48620120adbb08f0e50634c9a1358b8c3ca3635e297a0ca6d46d562" + sha256 cellar: :any, ventura: "a4516d2e23714635695a4d93d05af1d6dd989fabdcb11d7cfe38ad37bf44cd1d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0413ade80f19948761ab52f5090b9a0ab625609bc18eb8e0d9afdc503c80dbd9" + end + + depends_on "cmake" => [:build, :test] + + depends_on "mariadb" + depends_on "qt" + + 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 + ] + + 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 <<~EOS + QT += core sql + QT -= gui + TARGET = test + CONFIG += console debug + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + EOS + + (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 + + 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..66a30038a38f9 --- /dev/null +++ b/Formula/q/qt-mysql.rb @@ -0,0 +1,94 @@ +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.0/submodules/qtbase-everywhere-src-6.9.0.tar.xz" + sha256 "c1800c2ea835801af04a05d4a32321d79a93954ee3ae2172bbeacf13d1f0598c" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qt" + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "de4214b11bea15051888408a3e19201346a4e3b71f89c5e2c6853e2b44c7cf2e" + sha256 cellar: :any, arm64_ventura: "28d5d9fcbd15e57c87aafaf93ce91f8469715e177f9187a75e2831d2d063a6be" + sha256 cellar: :any, sonoma: "fcf03703da1faa4fce8e35a03318902a6cc5d3b25e1a7cd3be30e64106acb550" + sha256 cellar: :any, ventura: "8e729b4da73140862b5bac43a80d5d67e168da83cf5e5464d27299fffaa773cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4950ce9952329631c482acbff625299c3174643551ae3303a8ecd0bb6aeeb63c" + end + + depends_on "cmake" => [:build, :test] + + depends_on "mysql" + depends_on "qt" + + 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 + ] + + 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 <<~EOS + QT += core sql + QT -= gui + TARGET = test + CONFIG += console debug + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + EOS + + (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 + + 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..9ebcc486d2c59 --- /dev/null +++ b/Formula/q/qt-percona-server.rb @@ -0,0 +1,99 @@ +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.0/submodules/qtbase-everywhere-src-6.9.0.tar.xz" + sha256 "c1800c2ea835801af04a05d4a32321d79a93954ee3ae2172bbeacf13d1f0598c" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qt" + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "534a4ea601ef00f9b21e1d59e00950510183f9d797c6c2ad42f0795bb7eadf12" + sha256 cellar: :any, arm64_ventura: "dd6b700419445afe0ba3d9fca087b618640f8eada89a7fbc0aeb620d014d8f54" + sha256 cellar: :any, sonoma: "a4bcd4c4a9a993b963f0b7b7ccbff58e199d95137e2d41dbf13ef2db2358cb27" + sha256 cellar: :any, ventura: "ee80f7b0d7eddfef84dfc1a06f052d2da7e5cd1fde181582a9da2690c02faaf6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29be2fec6a4ce2d88fb83fd0623271d01370c22448378f91a679e1c5988c3410" + end + + depends_on "cmake" => [:build, :test] + depends_on "pkgconf" => :build + + depends_on "percona-server" + depends_on "qt" + + 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 + ] + # 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 <<~EOS + QT += core sql + QT -= gui + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + EOS + + (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 + + 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..8b0ed6a4947ac --- /dev/null +++ b/Formula/q/qt-postgresql.rb @@ -0,0 +1,91 @@ +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.0/submodules/qtbase-everywhere-src-6.9.0.tar.xz" + sha256 "c1800c2ea835801af04a05d4a32321d79a93954ee3ae2172bbeacf13d1f0598c" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qt" + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "b2b5248e5f9872d540b3864ea2eef265e9b1e46709734334cec94d32b7bbb77e" + sha256 cellar: :any, arm64_ventura: "cfd40bd2d36b50323ff75e579ab892f6c5fc14fba69726ef96a186c995b33f47" + sha256 cellar: :any, sonoma: "a211562ac2bd5de69cd99b5fc37b0470bf2e80af53f2b97cbc9765dd89644a8c" + sha256 cellar: :any, ventura: "39a4ac6b6e25edc41b4f25ff9b3d3ee967207214bf99c8e2f05a7be2205d8579" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dbba9de50eea8ea4c4c8e944e6ea4781b08b7f1fed97adbd4162a6223bca4d00" + end + + depends_on "cmake" => [:build, :test] + + depends_on "libpq" + depends_on "qt" + + 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 + ] + + 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 <<~EOS + QT += core sql + QT -= gui + TARGET = test + CONFIG += console debug + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + EOS + + (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 + + 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..c2f3c5860c3bf --- /dev/null +++ b/Formula/q/qt-unixodbc.rb @@ -0,0 +1,94 @@ +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.0/submodules/qtbase-everywhere-src-6.9.0.tar.xz" + sha256 "c1800c2ea835801af04a05d4a32321d79a93954ee3ae2172bbeacf13d1f0598c" + license any_of: ["GPL-2.0-only", "GPL-3.0-only", "LGPL-3.0-only"] + + livecheck do + formula "qt" + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "e2d985fca29dcb857cb55b7089b7fea68d2dececb867008812e16cca2ca03240" + sha256 cellar: :any, arm64_ventura: "19780170d64a3158c29c59e3caa08bf5bf4c4b4dba329a1342f05ba931d5826a" + sha256 cellar: :any, sonoma: "c62e19715388e42f0cc24d5ec574f454ecb2d69f33b72cbd169fd5da2cbd34a8" + sha256 cellar: :any, ventura: "d865bddc930004939c525dd460763f134a28445b7216878e1647c2b3451e1b6c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf17c47c1144c25ba9429f382d3ab33394a011e5213c855e353481907879fbbf" + end + + depends_on "cmake" => [:build, :test] + + depends_on "qt" + 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 + ] + + 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 <<~EOS + QT += core sql + QT -= gui + TARGET = test + CONFIG += console debug + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + EOS + + (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 + + 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..a6f300a44d5aa --- /dev/null +++ b/Formula/q/qt.rb @@ -0,0 +1,412 @@ +class Qt < Formula + include Language::Python::Virtualenv + + desc "Cross-platform application and UI framework" + homepage "https://www.qt.io/" + url "https://download.qt.io/official_releases/qt/6.9/6.9.0/single/qt-everywhere-src-6.9.0.tar.xz" + mirror "https://qt.mirror.constant.com/archive/qt/6.9/6.9.0/single/qt-everywhere-src-6.9.0.tar.xz" + mirror "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.9/6.9.0/single/qt-everywhere-src-6.9.0.tar.xz" + sha256 "4f61e50551d0004a513fefbdb0a410595d94812a48600646fb7341ea0d17e1cb" + 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", + ] + head "https://code.qt.io/qt/qt5.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 + sha256 cellar: :any, arm64_sonoma: "861acfe809369d19c8cbc923afa94c62f48784f087a150e09d3522e5eeb15f9e" + sha256 cellar: :any, arm64_ventura: "f30408e5e2a56aef97597398e4d552da3286b9fb45ba040e405291584009bea8" + sha256 cellar: :any, sonoma: "1cb92af62ec86c41bd6901428356fc8908ab98706a1f4b1e7791f09fd6cad498" + sha256 cellar: :any, ventura: "3f55e107498966094f5b47f6e729728c7cc97d503f9deed8c59d87ca9f69cfa4" + sha256 x86_64_linux: "0f25abc1c0b90ec910b12b3d5c4db85e77e5f0888a2a8446f2d2dc5c973ede78" + end + + depends_on "cmake" => [:build, :test] + depends_on maximum_macos: [:sonoma, :build] # https://bugreports.qt.io/browse/QTBUG-128900 + depends_on "ninja" => :build + depends_on "node" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.13" => :build + depends_on "vulkan-headers" => [:build, :test] + depends_on "vulkan-loader" => [:build, :test] + depends_on xcode: :build + + depends_on "assimp" + depends_on "brotli" + depends_on "dbus" + depends_on "double-conversion" + depends_on "freetype" + depends_on "glib" + depends_on "harfbuzz" + depends_on "hunspell" + depends_on "icu4c@77" + depends_on "jasper" + depends_on "jpeg-turbo" + depends_on "libb2" + depends_on "libmng" + depends_on "libpng" + depends_on "libtiff" + depends_on "md4c" + depends_on "openssl@3" + 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 "cups" + uses_from_macos "krb5" + uses_from_macos "zlib" + + on_macos do + depends_on "molten-vk" => [:build, :test] + end + + on_linux do + depends_on "alsa-lib" + depends_on "at-spi2-core" + # TODO: depends_on "bluez" + depends_on "expat" + depends_on "ffmpeg" + depends_on "fontconfig" + depends_on "gdk-pixbuf" + depends_on "gstreamer" + depends_on "gtk+3" + # TODO: depends_on "gypsy" + depends_on "libdrm" + depends_on "libevent" + depends_on "libice" + depends_on "libsm" + 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 "pango" + depends_on "pulseaudio" + depends_on "snappy" + depends_on "systemd" + depends_on "wayland" + depends_on "xcb-util" + 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" + 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 + + def install + python3 = "python3.13" + + # Install python dependencies for QtWebEngine + 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 Qt builds + # arch-specific code with runtime detection of capabilities: + # https://bugreports.qt.io/browse/QTBUG-113391 + ENV.runtime_cpu_detection + + # FIXME: GN requires clang in clangBasePath/bin + inreplace "qtwebengine/src/3rdparty/chromium/build/toolchain/apple/toolchain.gni", + 'rebase_path("$clang_base_path/bin/", root_build_dir)', '""' + + # FIXME: See https://bugreports.qt.io/browse/QTBUG-89559 + # and https://codereview.qt-project.org/c/qt/qtbase/+/327393 + # It is not friendly to Homebrew or macOS + # because on macOS `/tmp` -> `/private/tmp` + inreplace "qtwebengine/src/3rdparty/gn/src/base/files/file_util_posix.cc", + "FilePath(full_path)", "FilePath(input)" + + # 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"' + + # We prefer CMake `-DQT_FEATURE_system*=ON` arg over configure `-system-*` arg + # since the latter may be ignored when auto-detection fails. + # + # 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. + 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 + -DQT_FEATURE_clang=OFF + -DQT_FEATURE_relocatable=OFF + + -DFEATURE_pkg_config=ON + -DQT_FEATURE_system_assimp=ON + -DQT_FEATURE_system_doubleconversion=ON + -DQT_FEATURE_system_freetype=ON + -DQT_FEATURE_system_harfbuzz=ON + -DQT_FEATURE_system_hunspell=ON + -DQT_FEATURE_system_jpeg=ON + -DQT_FEATURE_system_libb2=ON + -DQT_FEATURE_system_pcre2=ON + -DQT_FEATURE_system_png=ON + -DQT_FEATURE_system_sqlite=ON + -DQT_FEATURE_system_tiff=ON + -DQT_FEATURE_system_webp=ON + -DQT_FEATURE_system_zlib=ON + -DQT_FEATURE_webengine_proprietary_codecs=ON + -DQT_FEATURE_webengine_kerberos=ON + -DQT_ALLOW_SYMLINK_IN_PATHS=ON + ] + + cmake_args += if OS.mac? + ENV["SDKROOT"] = MacOS.sdk_for_formula(self).path + + # NOTE: `chromium` should be built with the latest SDK because it uses + # `___builtin_available` to ensure compatibility. + # + # Chromium needs Xcode 15.3+ and using LLVM Clang is not supported on macOS + # See https://bugreports.qt.io/browse/QTBUG-130922 + cmake_args << "-DBUILD_qtwebengine=OFF" if MacOS::Xcode.version < "15.3" + + %W[ + -DCMAKE_OSX_DEPLOYMENT_TARGET=#{MacOS.version}.0 + -DQT_FEATURE_ffmpeg=OFF + ] + else + # For QtWebEngine arguments: + # * The vendored copy of `libvpx` is used 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 + # * On macOS Chromium will always use bundled copies and the + # -DQT_FEATURE_webengine_system_*=ON arguments are ignored. + # * As of Qt 6.6.0, webengine_ozone_x11 feature appears to be mandatory for Linux. + %w[ + -DQT_FEATURE_xcb=ON + -DQT_FEATURE_system_xcb_xinput=ON + -DQT_FEATURE_webengine_ozone_x11=ON + -DQT_FEATURE_webengine_system_alsa=ON + -DQT_FEATURE_webengine_system_ffmpeg=ON + -DQT_FEATURE_webengine_system_freetype=ON + -DQT_FEATURE_webengine_system_harfbuzz=ON + -DQT_FEATURE_webengine_system_icu=ON + -DQT_FEATURE_webengine_system_lcms2=ON + -DQT_FEATURE_webengine_system_libevent=ON + -DQT_FEATURE_webengine_system_libjpeg=ON + -DQT_FEATURE_webengine_system_libpng=ON + -DQT_FEATURE_webengine_system_libxml=ON + -DQT_FEATURE_webengine_system_libwebp=ON + -DQT_FEATURE_webengine_system_minizip=ON + -DQT_FEATURE_webengine_system_opus=ON + -DQT_FEATURE_webengine_system_poppler=ON + -DQT_FEATURE_webengine_system_pulseaudio=ON + -DQT_FEATURE_webengine_system_snappy=ON + -DQT_FEATURE_webengine_system_zlib=ON + ] + end + + system "cmake", "-S", ".", "-B", "build", "-G", "Ninja", *cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + 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 + + return unless OS.mac? + + lib.glob("*.framework") do |f| + # Some config scripts will only find Qt in a "Frameworks" folder + frameworks.install_symlink f + # Some dependents' test use include path (e.g. `gecode` and `qwt`) + include.install_symlink f/"Headers" => f.stem + end + + bin.glob("*.app") do |app| + libexec.install app + bin.write_exec_script libexec/app.basename/"Contents/MacOS"/app.stem + end + end + + def caveats + <<~EOS + 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} + EOS + end + + test do + webengine_supported = !OS.mac? || MacOS.version > :ventura + 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 #{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 REQUIRED COMPONENTS #{modules.join(" ")}) + add_executable(test main.cpp) + target_link_libraries(test PRIVATE Qt6::#{modules.join(" Qt6::")}) + CMAKE + + (testpath/"test.pro").write <<~EOS + QT += #{modules.join(" ").downcase} + TARGET = test + CONFIG += console + CONFIG -= app_bundle + TEMPLATE = app + SOURCES += main.cpp + INCLUDEPATH += #{Formula["vulkan-headers"].opt_include} + EOS + + (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_VULKAN_LIB"] = Formula["vulkan-loader"].opt_lib/shared_library("libvulkan") + 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? && MacOS.version > :mojave + 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/qt@5.rb b/Formula/q/qt@5.rb new file mode 100644 index 0000000000000..bd3eb707e8210 --- /dev/null +++ b/Formula/q/qt@5.rb @@ -0,0 +1,396 @@ +# 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.16/single/qt-everywhere-opensource-src-5.15.16.tar.xz" + mirror "https://mirrors.dotsrc.org/qtproject/archive/qt/5.15/5.15.16/single/qt-everywhere-opensource-src-5.15.16.tar.xz" + mirror "https://mirrors.ocf.berkeley.edu/qt/archive/qt/5.15/5.15.16/single/qt-everywhere-opensource-src-5.15.16.tar.xz" + sha256 "efa99827027782974356aceff8a52bd3d2a8a93a54dd0db4cca41b5e35f1041c" + license all_of: ["GFDL-1.3-only", "GPL-2.0-only", "GPL-3.0-only", "LGPL-2.1-only", "LGPL-3.0-only"] + revision 2 + + livecheck do + url "https://download.qt.io/official_releases/qt/5.15/" + regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "a661d1f9b62c9fff165ace3821f3befeb65620166b63d8795301f132cc9aeb50" + sha256 cellar: :any, arm64_sonoma: "1902b5b126785f33ff1fdd612c458a0dd2cca205c925f4c04fc5ef4e6b7d5517" + sha256 cellar: :any, arm64_ventura: "61a83675a351069af55b9ab8cc62962fbf1e763cb5abb8ee2a63102de9c4d438" + sha256 cellar: :any, sonoma: "d86069ffb50778801427abd0574ef955e2377d777d251b496bf38c732ebcf6c4" + sha256 cellar: :any, ventura: "3a50379f30ae54952e5860dfb1a624e903db7b63a420af76a90aa0e0fdc3d3e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0b1afcefd9c62dae5bf3aadf26d9a25e3ed9c8855bb8b979a1fe1cdb0484dd3c" + end + + keg_only :versioned_formula + + 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 macos: :sierra + 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.18-lts", + revision: "87ceb6a2ef5ee25d56f765dc533728c4ca4787e0" + + # 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.18+dfsg-2.debian.tar.xz" + sha256 "2d2d671c26a94ec1ec9d5fb3cbe57b3ec0ed98a2e5cc7471c573b763d8e098e6" + apply "patches/build-with-c++17.patch", + "patches/ninja-1.12.patch", + "patches/python3.12-imp.patch", + "patches/python3.12-six.patch", + "patches/python3.13-pipes.patch" + 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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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 + + # CVE-2023-51714 + # Remove with Qt 5.15.17 + patch do + url "https://download.qt.io/official_releases/qt/5.15/0001-CVE-2023-51714-qtbase-5.15.diff" + sha256 "2129058a5e24d98ee80a776c49a58c2671e06c338dffa7fc0154e82eef96c9d4" + directory "qtbase" + end + patch do + url "https://download.qt.io/official_releases/qt/5.15/0002-CVE-2023-51714-qtbase-5.15.diff" + sha256 "99d5d32527e767d6ab081ee090d92e0b11f27702619a4af8966b711db4f23e42" + directory "qtbase" + end + + # CVE-2024-25580 + # Remove with Qt 5.15.17 + patch do + url "https://download.qt.io/official_releases/qt/5.15/CVE-2024-25580-qtbase-5.15.diff" + sha256 "7cc9bf74f696de8ec5386bb80ce7a2fed5aa3870ac0e2c7db4628621c5c1a731" + directory "qtbase" + end + + # CVE-2024-36048 + # Remove with Qt 5.15.17 + patch do + url "https://download.qt.io/official_releases/qt/5.15/CVE-2024-36048-qtnetworkauth-5.15.diff" + sha256 "e5d385d636b5241b59ac16c4a75359e21e510506b26839a4e2033891245f33f9" + directory "qtnetworkauth" + end + + # 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 + + 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 + ] + + # 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 diff --git a/Formula/q/qtads.rb b/Formula/q/qtads.rb new file mode 100644 index 0000000000000..87e56d76866a3 --- /dev/null +++ b/Formula/q/qtads.rb @@ -0,0 +1,56 @@ +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 + + bottle do + 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, x86_64_linux: "251840532a70387d1007ab9a992bb9f6e8d6c543133fc19d5d41b0dd81c822a5" + end + + 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/qthreads.rb b/Formula/q/qthreads.rb new file mode 100644 index 0000000000000..984da39c4a6ce --- /dev/null +++ b/Formula/q/qthreads.rb @@ -0,0 +1,33 @@ +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_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/qtkeychain.rb b/Formula/q/qtkeychain.rb new file mode 100644 index 0000000000000..b1aaf2e95ccaa --- /dev/null +++ b/Formula/q/qtkeychain.rb @@ -0,0 +1,57 @@ +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 + sha256 cellar: :any, arm64_sonoma: "f216a5ed18ceca5e77ff086b75a0d02dec76f5cce3a6100c172b32e56088b690" + sha256 cellar: :any, arm64_ventura: "a9eb0ce450facf448a458fc661474fdf6e11a8205791ffac65d7ada84717ace8" + sha256 cellar: :any, sonoma: "fa6264c1da4f266fb4ee57570009e9a5e44a15b0000cfd6bf99f3be6a721c6b3" + sha256 cellar: :any, ventura: "63a82f1f3487ffe900540bb42b4baccdfee18d0f689110ab3b2b1b435d010084" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e41763b847c0e19b5fe15d7a61866bd06a0ea001765546462498e5941be9c99d" + end + + depends_on "cmake" => :build + depends_on "qt" + + 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["qt"].opt_include}"] + flags += if OS.mac? + [ + "-F#{Formula["qt"].opt_lib}", + "-framework", "QtCore" + ] + else + [ + "-fPIC", + "-L#{Formula["qt"].opt_lib}", "-lQt6Core", + "-Wl,-rpath,#{Formula["qt"].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/quantlib.rb b/Formula/q/quantlib.rb new file mode 100644 index 0000000000000..674f7dd22ab97 --- /dev/null +++ b/Formula/q/quantlib.rb @@ -0,0 +1,45 @@ +class Quantlib < Formula + desc "Library for quantitative finance" + homepage "https://www.quantlib.org/" + url "https://github.com/lballabio/QuantLib/releases/download/v1.38/QuantLib-1.38.tar.gz" + sha256 "7280ffd0b81901f8a9eb43bb4229e4de78384fc8bb2d9dcfb5aa8cf8b257b439" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e319f444e31940f0364e8398deb1f6077e60a2bda5ed1c90cf5333879e2be89e" + sha256 cellar: :any, arm64_sonoma: "51b6d9361b230a6595f65f1f72192c6500b437d06b55e026af32316402343432" + sha256 cellar: :any, arm64_ventura: "fdaf876b826c57c317e98844d732a6626b9b59c165d1eb0d9bf60bc38d65e244" + sha256 cellar: :any, sonoma: "db571848eeb1677e0b289992082576bca793641d657f946d63b7e5d18135aff7" + sha256 cellar: :any, ventura: "c0603994c664e9b237cc9ab3597021173dd68ee18f6ede7b2e7a1cdb0d5766a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "d120612e1b0d505bd930e2fcbf450d14073e5847bfacfbf69e1415540399bddb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a1a1ee6ad6b4ca595a3ff9c632de0f5b3ff737fa3b7e8f2dc9abb9249230d88a" + 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..6a6150d0021ec --- /dev/null +++ b/Formula/q/quantum++.rb @@ -0,0 +1,50 @@ +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" + head "https://github.com/softwareQinc/qpp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "13832215cff599c6d60a58a3c40d0206d3f1082c0c42f1a8b9ee2a3c49087be8" + end + + depends_on "cmake" => [:build, :test] + depends_on "googletest" => :build + depends_on "eigen" + depends_on "pybind11" + + 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..a825da5983a1f --- /dev/null +++ b/Formula/q/quartz-wm.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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..584c36dfb43d8 --- /dev/null +++ b/Formula/q/quasi88.rb @@ -0,0 +1,53 @@ +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.1.tgz" + sha256 "a9e7097e26cee6605ca3a467f6167b624dca4d11e3d99fd5c9886894b42cc05e" + license "BSD-3-Clause" + + livecheck do + url "https://www.eonet.ne.jp/~showtime/quasi88/download.html" + regex(/href=.*?quasi88[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "0eac8fdd1ee628be1f2f760272599513d3251ec2f0781d98da27fff0f5ab9917" + sha256 cellar: :any, arm64_sonoma: "5f6e0024ba90b4ea8d6db6615f01245ebb26ad6e914d5cd5720751b5b5d22399" + sha256 cellar: :any, arm64_ventura: "c5a10d08e47dfd4e46bb9248aa8ebdb6b85ceaaf26223d2190d01d28167c27d3" + sha256 cellar: :any, arm64_monterey: "52ae75a5b84dab5523b36ea0b827d783a79f419a605cc059fd453ea3e74562a3" + sha256 cellar: :any, sonoma: "42b152e68b2c5b4773be2fa8e54380f3059d3864fa82e6591e6ef7c72e0fa920" + sha256 cellar: :any, ventura: "b5ccd2b099ca8067fdf747d4a97380f58a11d069ddd725e7c7174c0dceb2a88a" + sha256 cellar: :any, monterey: "58db5d7edd11c2a23a92a679d954bd1e4b0be0db0fd52d0ef2adb0425f1d5668" + sha256 cellar: :any_skip_relocation, arm64_linux: "1eb324460bb466483fdd6bcf7d2c9b3f7c3f1b3458f14b14c85c9ae0ebc05468" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5bece28e3cc116e801cbcb9da47c2e3768d0a0e15b24d05bdb2ff0f51e06496b" + 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..89a5fd95445b6 --- /dev/null +++ b/Formula/q/quazip.rb @@ -0,0 +1,60 @@ +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 + sha256 cellar: :any, arm64_sonoma: "568975c79a7542774eba015531d200fba3ab5bea77c1c6497761d8168e09d2ad" + sha256 cellar: :any, arm64_ventura: "6ae800f41e9dd803ededcee7f81736cde1fe9aaabb52ffafd8423620dd8dd701" + sha256 cellar: :any, sonoma: "2f12beb8f666e4e9d885a0c155e1cbab98fe2a7ee17130244e527d11f0a2a7fd" + sha256 cellar: :any, ventura: "e4144bd17991b751d5d43307b07a480b9ba216c0882f555b8c40933a903ac29e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f5ee3084b058aad33e77d0f7e8d07af219f5ada4e3db0f7897d00660de19825" + end + + depends_on "cmake" => :build + depends_on xcode: :build + depends_on "qt" + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + def install + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_PREFIX_PATH=#{Formula["qt"].opt_lib}", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + cd include do + include.install_symlink "QuaZip-Qt#{Formula["qt"].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["qt"].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..f3c538458e3a7 --- /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/8.3.1/questdb-8.3.1-no-jre-bin.tar.gz" + sha256 "cba6ce74034444cfb6d64aafe6d9fa8915711179f7774295cf63fc6243b4ff43" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "33b630ba72465d7033fa21914139c0b1eb3f23618f15c94c431ead4e6504b039" + 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..9b7339bde4e7f --- /dev/null +++ b/Formula/q/quex.rb @@ -0,0 +1,43 @@ +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 + + 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..9464a9d07f6e6 --- /dev/null +++ b/Formula/q/quick-lint-js.rb @@ -0,0 +1,55 @@ +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 5 + head "https://github.com/quick-lint/quick-lint-js.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "22f5b01de393d987ab548240c96e431ad674f3370e77689be3c73348c569af8b" + sha256 cellar: :any, arm64_sonoma: "6201363defa25543f5b7fd1cdaaf326f9a9ad3854413daaa083449ee1315ffb3" + sha256 cellar: :any, arm64_ventura: "2f756eeb26e05573ac69db780c82831f594c12bf36ba194cea767de422b46628" + sha256 cellar: :any, sonoma: "4939daaa3f8d302bfbb3b3061e95b94c33b5b105956bd8190f4916ead9c77369" + sha256 cellar: :any, ventura: "c77cb4db725fe78fa82cceaead890b035a6c05d89e133e9897935919ee2713c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e38faa6ea5b9c72ea1975dad60629e8004aa7fcaeda07acff30f86b72227101" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aec9493f33efc20dd88dbd4172ef4dc1ecce5fc7b79396ce048b871a7ee55f09" + 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..50afb43aab1cd --- /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-04-26.tar.xz" + sha256 "2f20074c25166ef6f781f381c50d57b502cb85d470d639abccebbef7954c83bf" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?quickjs[._-]v?(\d+(?:[.-]\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "c95d9c212cf28f7236c7cec3207bb0e60f9366113dd01fb376758ec63e813486" + sha256 arm64_sonoma: "50ad44fcd6572ec6eca42f8c8b940d443003dcfac3a79389e64c4ba5b9834660" + sha256 arm64_ventura: "90f7789068432ae2c08bdb22d541cfcecfe49215448ffc36cbdaaaaf52c3bf6d" + sha256 sonoma: "87856de7dd77c5ae0866f3d8b2c1f44c6c6cbd5ceb2b3b2627c0db7a837f800a" + sha256 ventura: "b3ddcc47985fd12e9ce6e454ecb5f89a02238c4ead72e41ee7939d958f825cf0" + sha256 arm64_linux: "7e005a218d3fc37162d006ad37207f8ffe087d5ffddf8fff3fa3ccf20d660b0a" + sha256 x86_64_linux: "c2e635a3d0744604802bf5c7ebbf65c3b74faf1898bd2d37db014d4d858c942b" + 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..4fcc15020996a --- /dev/null +++ b/Formula/q/quicktype.rb @@ -0,0 +1,37 @@ +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.0.tgz" + sha256 "b6f257badbb64c56fca9e5a30a09d69ffd5927504ed443d0b291fcba0231a426" + license "Apache-2.0" + head "https://github.com/glideapps/quicktype.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b540f285deddb6cf61cf81620c47288af3f4d8c6813eb65c84f50595845ff3fd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b540f285deddb6cf61cf81620c47288af3f4d8c6813eb65c84f50595845ff3fd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b540f285deddb6cf61cf81620c47288af3f4d8c6813eb65c84f50595845ff3fd" + sha256 cellar: :any_skip_relocation, sonoma: "b09d0ad9d92a9b15984c28062b6b27cb5c10a4da489fedd0c3acad038a16459d" + sha256 cellar: :any_skip_relocation, ventura: "b09d0ad9d92a9b15984c28062b6b27cb5c10a4da489fedd0c3acad038a16459d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b540f285deddb6cf61cf81620c47288af3f4d8c6813eb65c84f50595845ff3fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b540f285deddb6cf61cf81620c47288af3f4d8c6813eb65c84f50595845ff3fd" + 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..3a0a10fb5b10d --- /dev/null +++ b/Formula/q/quictls.rb @@ -0,0 +1,133 @@ +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_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" + + 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..dc840edca54bb --- /dev/null +++ b/Formula/q/quill.rb @@ -0,0 +1,56 @@ +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/v9.0.2.tar.gz" + sha256 "7f5c6fbcc779d7d47a473b209a18908aadd691b2e3c82c4264ea015f6fbe4859" + license "MIT" + head "https://github.com/odygrd/quill.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "00e2136ab27c94e00f70861c444eb112cc3482d0a024f3601d991bdedcac8ae4" + end + + depends_on "cmake" => :build + depends_on macos: :catalina + + 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..edf0dbc112e18 --- /dev/null +++ b/Formula/q/quilt.rb @@ -0,0 +1,64 @@ +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_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/quotatool.rb b/Formula/q/quotatool.rb new file mode 100644 index 0000000000000..dd3d5f397cca7 --- /dev/null +++ b/Formula/q/quotatool.rb @@ -0,0 +1,35 @@ +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_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..03baf5de6c7d6 --- /dev/null +++ b/Formula/q/quran.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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, 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 + op = shell_output("#{bin}/quran 1:1").strip + assert_equal "In the Name of Allah—the Most Compassionate, Most Merciful.", op + end +end diff --git a/Formula/q/qwt-qt5.rb b/Formula/q/qwt-qt5.rb new file mode 100644 index 0000000000000..5108c6a8fa934 --- /dev/null +++ b/Formula/q/qwt-qt5.rb @@ -0,0 +1,110 @@ +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 + + bottle do + 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, x86_64_linux: "9a367f75f804b12fd9f2bd9706a47a0f67cd9862035448063e81d9e8ae1c620e" + end + + keg_only "it conflicts with qwt" + + 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..2e1d371b61f03 --- /dev/null +++ b/Formula/q/qwt.rb @@ -0,0 +1,76 @@ +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 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "136f2812341e94fb98be285e00f938c7078aa855dd766be89e8b27b65ff61729" + sha256 cellar: :any, arm64_ventura: "be7a809955ab72f32520add889794883d4da77781387ba7110bf8ab75b03ce8d" + sha256 cellar: :any, sonoma: "bf1e1368404ef259bdf0a446a2c5765ed38851d8fe8c050f5a6138a757f4044e" + sha256 cellar: :any, ventura: "73c072ac764154eac4940a150ade2716b2b5240f0aec31438b808d1c80abc404" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13db11bcb1836554ed9d2d1be1e2a09c645f4278eeb282c1386554865915adc0" + end + + depends_on "qt" + + # 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["qt"].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..67029f2289b0c --- /dev/null +++ b/Formula/q/qxmpp.rb @@ -0,0 +1,70 @@ +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.10.3/qxmpp-v1.10.3.tar.bz2" + sha256 "d36e6828dee496df14b7c2d3eac6c125c50645b869725b4535ecba443cafaa21" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sonoma: "29058318e3f783571d8bda450b0dcc4c590839a28efff75c21f7ddc01f725c08" + sha256 cellar: :any, arm64_ventura: "91a036eacde3da5f04e1d746a20ff7c5c4112f5550d38856c40454fc182f201d" + sha256 cellar: :any, sonoma: "aefe51ca697447f60bf7730ada2e915787b0c1428c3792de3ccd54ab78cd0be4" + sha256 cellar: :any, ventura: "d2506b6736edaffcdc2a0ed6208c0ccbeb317b5697e7fa79497c57227c5f94ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3277f6e73f001b58df75ae1129d7825299ec27beafe2d5e4a918e431e27a130b" + end + + depends_on "cmake" => :build + depends_on xcode: :build + depends_on "qt" + + 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 <<~EOS + TEMPLATE = app + CONFIG += console + CONFIG -= app_bundle + TARGET = test + QT += network + SOURCES += test.cpp + INCLUDEPATH += #{include} + LIBPATH += #{lib} + LIBS += -lQXmppQt6 + QMAKE_RPATHDIR += #{lib} + EOS + + (testpath/"test.cpp").write <<~CPP + #include + int main() { + QXmppClient client; + return 0; + } + CPP + + system "#{Formula["qt"].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 54a9df4d108bc..0000000000000 --- a/Formula/qalculate-gtk.rb +++ /dev/null @@ -1,29 +0,0 @@ -class QalculateGtk < Formula - desc "Multi-purpose desktop calculator" - homepage "https://qalculate.github.io/" - url "https://github.com/Qalculate/qalculate-gtk/releases/download/v3.11.0/qalculate-gtk-3.11.0.tar.gz" - sha256 "eb2a0502e9c5e93b43d2b2c42608bbafd475d70caf236a51285fea606d9d3167" - license "GPL-2.0" - revision 1 - - bottle do - sha256 "9bda68dafd242f325e2db9c5175d92ccbc1cdd207b79d898f8dd2e568e922c9e" => :catalina - sha256 "3d5c582b8d5b5ed7f673f615522b1efc4cbb21d2bea99e06c1a31598ac695617" => :mojave - sha256 "ee6fba1fad472df1939c6d5b409e9ef9a97e9ab5a06a3211d4f3fcea3c4c332d" => :high_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 66d67bb6a1352..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.16.0/qbs-src-1.16.0.tar.gz" - sha256 "a77be21ec08904b86afdbe798dd3597d070ee8f9ca9cc9ed3f21b87d6fa12b25" - head "https://code.qt.io/qbs/qbs.git" - - bottle do - cellar :any - sha256 "dd1b46fde86c54b18a9212766359f4e09ddde64fc977f7d8661dcc66cf8b99eb" => :catalina - sha256 "276c975b5a1aec7b43521e2af0006f60f5f7119ee1cc55fda7f431fc364d4dea" => :mojave - sha256 "bce183feddefac9637f6cb38c291617057ec85a15441c7d8a1e07a20f47c0c6b" => :high_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 720c8c21e63a4..0000000000000 --- a/Formula/qca.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Qca < Formula - desc "Qt Cryptographic Architecture (QCA)" - homepage "https://userbase.kde.org/QCA" - license "LGPL-2.1" - revision 1 - head "https://invent.kde.org/libraries/qca.git" - - stable do - url "https://download.kde.org/stable/qca/2.3.1/qca-2.3.1.tar.xz" - sha256 "c13851109abefc4623370989fae3a745bf6b1acb3c2a13a8958539823e974e4b" - - # use major version for framework, instead of full version - # see: https://invent.kde.org/libraries/qca/-/merge_requests/34 - patch do - url "https://invent.kde.org/libraries/qca/-/commit/f899a6aaad6747c703a9ee438a4a75bd7f6052f4.diff" - sha256 "1ae6e279d3e1e4dbe10ff80908517dab29e2b538f7c79384901d28bed69cbc9e" - end - end - - bottle do - cellar :any - sha256 "2a841d8b078e42054b374449de243111a63a150b90381bd080349952f8335599" => :catalina - sha256 "c44e0329bf19868a6b06da56b370e411ee7d5dff8c0532e1a40a0720dc54f30e" => :mojave - sha256 "7c5bb96e14843f75764c83eec5a6fde61e5c53cdab6e9ac5f02fce94acff75c6" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "botan" - depends_on "gnupg" - depends_on "libgcrypt" - depends_on "nss" - depends_on "openssl@1.1" - depends_on "pkcs11-helper" - depends_on "qt" - - def install - args = std_cmake_args - 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=ON" - args << "-DWITH_gcrypt_PLUGIN=ON" - args << "-DWITH_gnupg_PLUGIN=ON" - args << "-DWITH_nss_PLUGIN=ON" - args << "-DWITH_pkcs11_PLUGIN=ON" - - # 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 3a737175564fc..0000000000000 --- a/Formula/qcachegrind.rb +++ /dev/null @@ -1,27 +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/19.08.3/src/kcachegrind-19.08.3.tar.xz" - sha256 "8fc5e0643bb826b07cb5d283b8bd6fd5da4979f6125b43b1db3a9db60b02a36a" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "0a16a588310bd7251602e330366a5abde440e1f8ae4ac564eb99ac9e69298c0c" => :catalina - sha256 "0e4e81423ef0fc5dd92f8e5dc247b1add910ddbf1491ba6d11175fe57c9642d2" => :mojave - sha256 "67924a8923c4b2f29b69dd1cde8131d072a674051ec6ffc637547b4b67a7c31d" => :high_sierra - 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 168f2de943cf6..0000000000000 --- a/Formula/qcli.rb +++ /dev/null @@ -1,44 +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.1.tar.gz" - sha256 "e11eb93b02f9c75f88182a57b8ab44248ac10ca931cf066e7f02bd1835f2900c" - revision 2 - head "https://github.com/bavc/qctools.git" - - bottle do - cellar :any - sha256 "a64e0d73cd4a2d8381133b862d8781a63c17380da45ad50fb994560b04430b53" => :catalina - sha256 "3a1bf39203f4167a06479c3d03647e275530e87f2ab73bd9edbf539ff119f0dd" => :mojave - sha256 "5e69cecec0a4762ce9f17b4fc6c40fcb3d8e22a0e9856309e5b981c98c505fa6" => :high_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 56e412238bd06..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.22.tar.gz" - sha256 "30c1ffe46b95a0e9fa91085949ee5fca85f97ff7b41cd5fe79f79bab730206d3" - - bottle do - cellar :any - rebuild 1 - sha256 "381d4980019ee68eb91b62aeea98bc75d481597ec69c05b2d3790eda84b2d979" => :catalina - sha256 "686b9051338bcc167bf940beb8d6fbde45a47d5a9051ae61c80567ba998f35f8" => :mojave - sha256 "669c57dbb78a65de4fb0001ea0ad5e6a95d506bdf3651d38880901ef691659c3" => :high_sierra - 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 06b1623461531..0000000000000 --- a/Formula/qdae.rb +++ /dev/null @@ -1,36 +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" - license "GPL-2.0" - - bottle do - rebuild 1 - sha256 "d951231205b4f4faf3e4f829665d25c82d236f3f52339dd5664fb8adb46e68eb" => :catalina - sha256 "290d931e61684c53227e0a16d808427eb7218fbec76c57eb250c03dbf15bb6b8" => :mojave - sha256 "945b28c4354053f3ebd81bb868ef6a14d8fef1c32d6cebd73455bd17f17332ae" => :high_sierra - 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 acd523007e6bb..0000000000000 --- a/Formula/qdbm.rb +++ /dev/null @@ -1,61 +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" - license "LGPL-2.1" - - bottle do - cellar :any - rebuild 1 - sha256 "0a0ba32270742fbd821ba60bbc6452e6b6b6a476d72e719bdb33fdf535e316f0" => :catalina - 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 05417175cf807..0000000000000 --- a/Formula/qemu.rb +++ /dev/null @@ -1,101 +0,0 @@ -class Qemu < Formula - desc "Emulator for x86 and PowerPC" - homepage "https://www.qemu.org/" - url "https://download.qemu.org/qemu-5.0.0.tar.xz" - sha256 "2f13a92a0fa5c8b69ff0796b59b86b080bbb92ebad5d301a7724dd06b5e78cb6" - revision 2 - head "https://git.qemu.org/git/qemu.git" - - bottle do - sha256 "d502a1077e1adf1653a5f6a704a902885bf1db2b2dc8f8f26610d48ca6b1ba16" => :catalina - sha256 "880d9ad2657c4db9f12871591028604a106fce0138093ec9d1cbb96038e73da6" => :mojave - sha256 "7660efa3ec8a21441ac781229728aa364d3c63160fabd0c147a31c2b9667e448" => :high_sierra - end - - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gnutls" - depends_on "jpeg" - depends_on "libpng" - depends_on "libssh" - depends_on "libusb" - depends_on "lzo" - depends_on "ncurses" - depends_on "nettle" - depends_on "pixman" - depends_on "snappy" - depends_on "vde" - - # 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-libssh - --enable-vde - --extra-cflags=-DNCURSES_WIDECHAR=1 - --enable-cocoa - --disable-sdl - --disable-gtk - ] - # 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" - - 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-aarch64 --version") - assert_match expected, shell_output("#{bin}/qemu-system-alpha --version") - assert_match expected, shell_output("#{bin}/qemu-system-arm --version") - assert_match expected, shell_output("#{bin}/qemu-system-cris --version") - assert_match expected, shell_output("#{bin}/qemu-system-hppa --version") - assert_match expected, shell_output("#{bin}/qemu-system-i386 --version") - assert_match expected, shell_output("#{bin}/qemu-system-lm32 --version") - assert_match expected, shell_output("#{bin}/qemu-system-m68k --version") - assert_match expected, shell_output("#{bin}/qemu-system-microblaze --version") - assert_match expected, shell_output("#{bin}/qemu-system-microblazeel --version") - assert_match expected, shell_output("#{bin}/qemu-system-mips --version") - assert_match expected, shell_output("#{bin}/qemu-system-mips64 --version") - assert_match expected, shell_output("#{bin}/qemu-system-mips64el --version") - assert_match expected, shell_output("#{bin}/qemu-system-mipsel --version") - assert_match expected, shell_output("#{bin}/qemu-system-moxie --version") - assert_match expected, shell_output("#{bin}/qemu-system-nios2 --version") - assert_match expected, shell_output("#{bin}/qemu-system-or1k --version") - assert_match expected, shell_output("#{bin}/qemu-system-ppc --version") - assert_match expected, shell_output("#{bin}/qemu-system-ppc64 --version") - assert_match expected, shell_output("#{bin}/qemu-system-riscv32 --version") - assert_match expected, shell_output("#{bin}/qemu-system-riscv64 --version") - assert_match expected, shell_output("#{bin}/qemu-system-rx --version") - assert_match expected, shell_output("#{bin}/qemu-system-s390x --version") - assert_match expected, shell_output("#{bin}/qemu-system-sh4 --version") - assert_match expected, shell_output("#{bin}/qemu-system-sh4eb --version") - assert_match expected, shell_output("#{bin}/qemu-system-sparc --version") - assert_match expected, shell_output("#{bin}/qemu-system-sparc64 --version") - assert_match expected, shell_output("#{bin}/qemu-system-tricore --version") - assert_match expected, shell_output("#{bin}/qemu-system-unicore32 --version") - assert_match expected, shell_output("#{bin}/qemu-system-x86_64 --version") - assert_match expected, shell_output("#{bin}/qemu-system-xtensa --version") - assert_match expected, shell_output("#{bin}/qemu-system-xtensaeb --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 47f47166b902a..0000000000000 --- a/Formula/qhull.rb +++ /dev/null @@ -1,32 +0,0 @@ -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.0.tgz" - version "2020.1" - sha256 "1ac92a5538f61e297c72aebe4d4ffd731ceb3e6045d6d15faf1c212713798df4" - head "https://github.com/qhull/qhull.git" - - bottle do - cellar :any - sha256 "45f8b6efc0a77e4fd613ef527d6c55545908f860106d4355bd753ad07a934bd1" => :catalina - sha256 "61a2fab7f2854401bdffe54b889a1e2b9d90f6a11e52aba80688875b8f7d08a5" => :mojave - sha256 "36e0e4a621e0c89746584562634768ccb93e71fc500230133620db030b1cc05a" => :high_sierra - end - - depends_on "cmake" => :build - - def install - ENV.cxx11 - - cd "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - 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/qjackctl.rb b/Formula/qjackctl.rb deleted file mode 100644 index 15045eaf6dfa4..0000000000000 --- a/Formula/qjackctl.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Qjackctl < Formula - desc "Simple Qt application to control the JACK sound server daemon" - homepage "https://qjackctl.sourceforge.io/" - url "https://download.sourceforge.net/qjackctl/qjackctl-0.6.2.tar.gz" - sha256 "1ec77d0e8edac1b4d60a32a08d2f4329f90571801920cb48c6147e0eae6f50e6" - license "GPL-2.0" - head "https://git.code.sf.net/p/qjackctl/code.git" - - bottle do - sha256 "8598422d0a0c13a9328e188f91237075aa564f5d8b41579b610e61f475b6023c" => :catalina - sha256 "2b10cef277e90fe3e7342efc529e52ff54d9236448dfb09bf49d3f1aa79951eb" => :mojave - sha256 "ab701ff3dadb5e7adae195e49169bfe9e51a47e7d9ab48cfa6f97e3db24cd7f0" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "jack" - depends_on "qt" - - def install - ENV.cxx11 - system "./configure", "--disable-debug", - "--disable-dbus", - "--disable-portaudio", - "--disable-xunique", - "--prefix=#{prefix}", - "--with-jack=#{Formula["jack"].opt_prefix}", - "--with-qt=#{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 3c8cdd8c2c336..0000000000000 --- a/Formula/qjson.rb +++ /dev/null @@ -1,41 +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" - license "LGPL-2.1" - revision 1 - - bottle do - cellar :any - sha256 "909c5b1e45b05d7bba5c67e116c8b9c1a734f6df155e7792e8fe0fd7a2fd4c84" => :catalina - 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 eb2612eec5c9d..0000000000000 --- a/Formula/qmmp.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Qmmp < Formula - desc "Qt-based Multimedia Player" - homepage "https://qmmp.ylsoftware.com/" - url "https://downloads.sourceforge.net/project/qmmp-dev/qmmp/qmmp-1.4.0.tar.bz2" - sha256 "a8b9cda1fe137f9b50acc54bc02ac1f3ba89051f828f40f5dc9a9056cab4308f" - license "GPL-2.0" - head "https://svn.code.sf.net/p/qmmp-dev/code/branches/qmmp-1.4/" - - bottle do - sha256 "6269f254fbe8cadba8f6e23a7291651978a03628fadb8146aaf660879a748150" => :catalina - sha256 "10ad28d16385025291bf0047719ab2fa223839891aae80abd09e4fceb4c2b616" => :mojave - sha256 "7e7bce18642ee3d3bdf242d4dd83337e8a55723d39bfe870f84e6a67e6911247" => :high_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/qp.rb b/Formula/qp.rb deleted file mode 100644 index 82f54546a9316..0000000000000 --- a/Formula/qp.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Qp < Formula - desc "The query-pipe: command-line (ND)JSON querying" - homepage "https://github.com/paybase/qp" - url "https://github.com/paybase/qp/archive/1.0.1.tar.gz" - sha256 "6ef12fd4494262899ee12cc1ac0361ec0dd7b67e29c6ac6899d1df21efc7642b" - - bottle do - cellar :any_skip_relocation - sha256 "a65499deed12110ed5a21f3bbd657acdaaf1452dea48877caac93bda55759370" => :catalina - sha256 "f119afd6bacbac5af055c398a2dfb5c4f62c8f113bcb9e12dab825800fd8e744" => :mojave - sha256 "d9c595a53f82ddd9f086fac02a5f8da34e65d9b0e7564fce02148304704457ed" => :high_sierra - 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/qpdf.rb b/Formula/qpdf.rb deleted file mode 100644 index 07afa70a451bb..0000000000000 --- a/Formula/qpdf.rb +++ /dev/null @@ -1,28 +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-10.0.1/qpdf-10.0.1.tar.gz" - sha256 "5d2277c738188b7f4e3f01a6db7f2937ed6df54671f1fba834cd3d7ff865827b" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "5ccc930f3c428ba0838eb50778c5e0fbe7c984fb43b468ba959714d70a7813eb" => :catalina - sha256 "38a233da22d6a6e00fea01f8aff2f609c27915fdf9a86687b44153cdf2c07f07" => :mojave - sha256 "4615f85d75741f053733eb37f12c35e3264492f00e9086530f2a40c710a0d7ea" => :high_sierra - end - - depends_on "jpeg" - - uses_from_macos "zlib" - - 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 530a3c6976cdf..0000000000000 --- a/Formula/qpid-proton.rb +++ /dev/null @@ -1,48 +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.31.0/qpid-proton-0.31.0.tar.gz" - mirror "https://archive.apache.org/dist/qpid/proton/0.31.0/qpid-proton-0.31.0.tar.gz" - sha256 "9ae3845188afd5988fed7e640a493c21fa02d3e77d26d39c013abfd937aedcea" - license "Apache-2.0" - head "https://gitbox.apache.org/repos/asf/qpid-proton.git" - - bottle do - cellar :any - sha256 "0a141799096c2d617e2a2c37a2878289b910b3519d1b1c67ad5f89f9258465fc" => :catalina - sha256 "95cdc65b975386aeea18453d2459a74482d21af14f78d1258f70214b233c6dbc" => :mojave - sha256 "04c42fdd07d1e9e489b7e42ac552aa48ddb0fc98fb71a71e4795dbfa348a3c2e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libuv" - depends_on "openssl@1.1" - - def install - mkdir "build" do - system "cmake", "..", "-DBUILD_BINDINGS=", - "-DLIB_INSTALL_DIR=#{lib}", - "-Dproactor=libuv", - *std_cmake_args - system "make", "install" - end - 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 770788a550328..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 - rebuild 1 - sha256 "5d5edc32931995dfa82429a1d8708e700de70208f36767808a433c1e9bb2ffb2" => :catalina - sha256 "f8208ec60e2af6e9d1da2caa0ad1b48b5b027955c2daa51860fa1606b8c5acef" => :mojave - sha256 "8c9d0dde0b7a4292f8fa04337805755ac16ce1aab08710463323afec2f73d551" => :high_sierra - 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 402f276adafe9..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 "081c0663cccb890326323fce7ac57b8bb020d3505eaf0d19f1824dd63c304de2" => :catalina - sha256 "0915aa3e8b8481b717c4c84b0eda595821ecc99c9ffdcd0aa3e4952a3de9ae87" => :mojave - sha256 "57950dba66674d62c84076374427f6c3de6d8cda81448c50b579c11b1b1959e4" => :high_sierra - sha256 "f26387daf3d025dd45843784dd90fb3bf77609bdf0eb870f1b66782c89571950" => :sierra - sha256 "9660443356a1f9571b39ea496349482e17f7c0d06829dd06945ca7680291c0bf" => :el_capitan - sha256 "92470bcb0bd97c4d13181969ebeb0339faa85338ad139bf4a5ac19550635f5c1" => :yosemite - sha256 "fbf2eadbf60b30557e3741e28545070bb377602aa8f1c1c49b5f65375381a2c4" => :mavericks - 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/qrcp.rb b/Formula/qrcp.rb deleted file mode 100644 index 9f373bc85e594..0000000000000 --- a/Formula/qrcp.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Qrcp < Formula - desc "Transfer files to and from your computer by scanning a QR code" - homepage "https://claudiodangelis.com/qrcp" - url "https://github.com/claudiodangelis/qrcp/archive/0.6.3.tar.gz" - sha256 "2d39ba661aad9c60b816bc06f53ef4f3d8747e11d5fc27c104d3687d1e77204c" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "857aa5ad50a7a2124a1c37f7f206b25a65d9f3c76bae0ec9223945238c83d0eb" => :catalina - sha256 "5a1bede14f849cd49815b351325d5f375a9d7dc4d7ae8abd4053505f3fc1b6b0" => :mojave - sha256 "aba7e5ceb1c788d2eeae3e117e6dcae5c14530e5b759832adac7a6f4296565cd" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args - end - - test do - (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 <<~EOS - { - "interface": "any", - "fqdn": "localhost", - "port": #{port} - } - EOS - - 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 shell_output("curl -H \"User-Agent: Mozilla\" #{server_url}"), "Hello there, big world\n" - end -end diff --git a/Formula/qrencode.rb b/Formula/qrencode.rb deleted file mode 100644 index 0ac7f1257e3de..0000000000000 --- a/Formula/qrencode.rb +++ /dev/null @@ -1,39 +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" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "467f54a970d8ceaceaee214d3723aa4adea9277ecc7c5ccd575da3f7a918af77" => :catalina - 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/qrupdate.rb b/Formula/qrupdate.rb deleted file mode 100644 index ba789d5f6da9c..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 13 - - bottle do - cellar :any - sha256 "2b2464b06d3f39c68826319d7cf6f860e7fb4a90377ab5a70609e87c9706ffba" => :catalina - sha256 "f8979b51f613030bbafd0241c918457d26b4f7074ad4e43d50668d20b0ca87be" => :mojave - sha256 "85065f6d6e3362e53fd66118e11a4727faad0cbf01e5c2e8985bee2382123295" => :high_sierra - 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/qscintilla2.rb b/Formula/qscintilla2.rb deleted file mode 100644 index 1dbb7a8e0bf24..0000000000000 --- a/Formula/qscintilla2.rb +++ /dev/null @@ -1,76 +0,0 @@ -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.11.5/QScintilla-2.11.5.tar.gz" - sha256 "9361e26fd7fb7b5819a7eb92c5c1880a18de9bd3ed9dd2eb008e57388696716b" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "ad21b9c248d85d8c76c34c504d5c6e8a3cf0091034c50f916cb8c50e1ca83c28" => :catalina - sha256 "67b316a64f594a424c77ba50f31fc4724856fb8c8f247de60de98e5a311170ad" => :mojave - sha256 "ce35dfa9a500a78cd89bf7bade336304434c99e4de972af80ed4fbed1f6d7318" => :high_sierra - end - - depends_on "pyqt" - depends_on "python@3.8" - depends_on "qt" - depends_on "sip" - - def install - spec = (ENV.compiler == :clang) ? "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 - (share/"sip").mkpath - version = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - pydir = "#{lib}/python#{version}/site-packages/PyQt5" - system Formula["python@3.8"].opt_bin/"python3", "configure.py", "-o", lib, "-n", include, - "--apidir=#{prefix}/qsci", - "--destdir=#{pydir}", - "--stubsdir=#{pydir}", - "--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}", - "--no-dist-info" - system "make" - system "make", "install" - system "make", "clean" - end - end - - test do - (testpath/"test.py").write <<~EOS - import PyQt5.Qsci - assert("QsciLexer" in dir(PyQt5.Qsci)) - EOS - - system Formula["python@3.8"].opt_bin/"python3", "test.py" - end -end diff --git a/Formula/qsoas.rb b/Formula/qsoas.rb deleted file mode 100644 index 80ed5aa1e288d..0000000000000 --- a/Formula/qsoas.rb +++ /dev/null @@ -1,41 +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" - revision 1 - - bottle do - cellar :any - sha256 "0792b9b5e0b57820e9bc0865815e2daef3de3a97a625f06080877bebcffd1d7f" => :catalina - sha256 "001b054635b8e50373f9e3cb2e0b377f558662697f096fdb388c2e3fa066d54d" => :mojave - sha256 "51791b6babc31ea8852e7e5c5c607cd961af8513ef35dd0a04a56766ed0f1200" => :high_sierra - sha256 "bbc71d9440e401a3bfd52f164b709c08c5d11300cdcef056728ca8dd08435d38" => :sierra - end - - depends_on "gsl" - depends_on "mruby" - depends_on "qt" - - patch do - url "https://github.com/fourmond/QSoas/compare/2.2.0...release.diff?full_index=1" - sha256 "06b122580b6da169730ded812290eb53e1a6ff36d6c20ab9930c3e50b7a79b60" - end - - 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 5fec3f8bc39fb..0000000000000 --- a/Formula/qstat.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Qstat < Formula - desc "Query Quake servers from the command-line" - homepage "https://github.com/multiplay/qstat" - url "https://github.com/multiplay/qstat/archive/v2.14.tar.gz" - sha256 "ae906b74d4cce8057b5a265b76859101da8104c2a07c05f11a51f7c9f033ef8b" - license "Artistic-2.0" - - bottle do - sha256 "5bc0a1ad5cab40a918bddf42ffc58283177914ceca264b2cfd1e0687a033185f" => :catalina - sha256 "4f97be89fba9e19e7a0d1285c6c3c8abb12021c0729e45295431072439841bb9" => :mojave - sha256 "d6f890c9c0b11e038d1cf332437efef0ca9fe8e0a57cd8d78f1d68152e96ec44" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - def install - 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/qt.rb b/Formula/qt.rb deleted file mode 100644 index 6036429f9f499..0000000000000 --- a/Formula/qt.rb +++ /dev/null @@ -1,121 +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.15/5.15.0/single/qt-everywhere-src-5.15.0.tar.xz" - mirror "https://mirrors.dotsrc.org/qtproject/archive/qt/5.15/5.15.0/single/qt-everywhere-src-5.15.0.tar.xz" - mirror "https://mirrors.ocf.berkeley.edu/qt/archive/qt/5.15/5.15.0/single/qt-everywhere-src-5.15.0.tar.xz" - sha256 "22b63d7a7a45183865cc4141124f12b673e7a17b1fe2b91e433f6547c5d548c3" - - head "https://code.qt.io/qt/qt5.git", :branch => "dev", :shallow => false - - bottle do - cellar :any - sha256 "c1094fb3e2c5efa2580f4ad36f240a83b08a5118aa8f12a526f08fca27e6d6c7" => :catalina - sha256 "86674d9e61e1f75a20029974a01804a9fa0e6ea2fdc8fe10cb964ab8aea2a4e4" => :mojave - sha256 "c579327b288cfe0f23d6bd41e6e3b672538b6f19fbc0379322ce5c0ba422e794" => :high_sierra - end - - keg_only "Qt 5 has CMake issues when linked" - - depends_on "pkg-config" => :build - depends_on :xcode => :build - depends_on :macos => :sierra - - uses_from_macos "bison" - uses_from_macos "flex" - uses_from_macos "sqlite" - - # Fix build on Linux when the build system has AVX2 - # Patch submitted at https://codereview.qt-project.org/c/qt/qt3d/+/303993 - patch do - url "https://codereview.qt-project.org/gitweb?p=qt/qt3d.git;a=patch;h=b456a7d47a36dc3429a5e7bac7665b12d257efea" - sha256 "e47071f5feb6f24958b3670d83071502fe87243456b29fdc731c6eba677d9a59" - directory "qt3d" - end - - 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 - - # Remove reference to shims directory - inreplace "qtbase/mkspecs/qmodule.pri", - /^PKG_CONFIG_EXECUTABLE = .*$/, - "PKG_CONFIG_EXECUTABLE = #{Formula["pkg-config"].opt_bin/"pkg-config"}" - 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 556183f442cd7..0000000000000 --- a/Formula/qtads.rb +++ /dev/null @@ -1,68 +0,0 @@ -class Qtads < Formula - desc "TADS multimedia interpreter" - homepage "https://qtads.sourceforge.io/" - license "GPL-3.0" - 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 "ddc00587ac0d9f3ebcd6f0bac9e8a4207f9ae930a6646e4f3ce60d186abdc832" => :catalina - 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 7c17f30c2fe60..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 - rebuild 1 - sha256 "abce3f470e0a8b62acd78aa2c58114a3e5b64d7b2117d8ffbaadc23c4eee186e" => :catalina - sha256 "2fac027c66defdafcbaee5b346fd5c5e6c11b5e9a267de40d604b8e837f5d2c4" => :mojave - sha256 "073794a6af64b0fe9f2bc22480b4c605f9497c5ae9087d26fa8e51bdc0230b00" => :high_sierra - 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 0c5ab55ad5168..0000000000000 --- a/Formula/qtkeychain.rb +++ /dev/null @@ -1,36 +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.10.0.tar.gz" - sha256 "5f916cd97843de550467db32d2e10f218b904af5b21cfdfcc7c6425d7dfc3ec2" - - bottle do - cellar :any - sha256 "fc74803523e8bcaff20f75ad93ecdc73eedb133e98e944cc569b686bb7b14706" => :catalina - sha256 "ecb65ad1c7ad4d6d13e1e954009866967c76c2473c0e7409735dc77cad09f16e" => :mojave - sha256 "bc583e9bcea87e8c2c13dedbe3cde99cf34e9c59af2f142bcfabc0569bf8c12e" => :high_sierra - 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 946b97964c9c1..0000000000000 --- a/Formula/quantlib.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Quantlib < Formula - desc "Library for quantitative finance" - homepage "https://www.quantlib.org/" - url "https://dl.bintray.com/quantlib/releases/QuantLib-1.18.tar.gz" - sha256 "d5048e14f2b7ea79f0adee08b2cbcee01b57b9cc282f60225ff4fcfc614c7ebc" - - bottle do - cellar :any - sha256 "1e89efdb70a7a64b10a475202070d39390fffabc0801227acf8723b6194037c4" => :catalina - sha256 "f2bab0408cf9d6f412d6c6a9eeeab9e1ca776257eb2a6d30496bf4646eb76af3" => :mojave - sha256 "ff0934abb2b65d970b00c7217d8563bd6757cf9cb8a02c5e9e5cec8428ecd661" => :high_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 cada902a009c2..0000000000000 --- a/Formula/quasi88.rb +++ /dev/null @@ -1,46 +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 "2a1d1f01c210c06e49f3091dcebb2a30e62e14596e23bc43f349e151e3771d09" => :catalina - 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 bf2d5c04aa37a..0000000000000 --- a/Formula/quazip.rb +++ /dev/null @@ -1,48 +0,0 @@ -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/v0.9.1.tar.gz" - sha256 "5d36b745cb94da440432690050e6db45b99b477cfe9bc3b82fd1a9d36fff95f5" - - bottle do - cellar :any - sha256 "fcc3c28686a10a6e8d0e95ac978c0499400e5af3364c015f6ee128d9c0fd878e" => :catalina - sha256 "b74d9a5c9d2dbc349de524bce7ae4ef45882b37e2187b065c11141d7a2056953" => :mojave - sha256 "632c10f191326e2afc006c9a065f40af0f5ab8d6b562b4013ecdf77e79ed1eaf" => :high_sierra - end - - depends_on :xcode => :build - 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 d52dd8daa8a2c..0000000000000 --- a/Formula/questdb.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Questdb < Formula - desc "Time Series Database" - homepage "https://www.questdb.io/" - url "https://github.com/questdb/questdb/releases/download/5.0.1/questdb-5.0.1-no-jre-bin.tar.gz" - sha256 "812c4d9e9aab003d39374a63b5de865762d35b72c9776c87f5556944aad4d36e" - license "Apache-2.0" - revision 1 - - bottle :unneeded - - depends_on "openjdk@11" - - def install - rm_rf "questdb.exe" - libexec.install Dir["*"] - (bin/"questdb").write_env_script libexec/"questdb.sh", :java_version => "11" - 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 30 - output = shell_output("curl -Is localhost:9000/index.html") - sleep 4 - 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 8dbd0f7cdd212..0000000000000 --- a/Formula/quex.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Quex < Formula - desc "Generate lexical analyzers" - homepage "https://quex.sourceforge.io/" - url "https://downloads.sourceforge.net/project/quex/quex-0.70.0.tar.gz" - sha256 "761b68d68255862001d1fe8bf8876ba3d35586fd1927a46a667aea11511452cd" - head "https://svn.code.sf.net/p/quex/code/trunk" - - bottle do - cellar :any_skip_relocation - sha256 "f3d39a7468e8c529ce1c0d6ab5b2d028f50771304993e9f2e996490f846c4b6c" => :catalina - sha256 "f3d39a7468e8c529ce1c0d6ab5b2d028f50771304993e9f2e996490f846c4b6c" => :mojave - sha256 "f3d39a7468e8c529ce1c0d6ab5b2d028f50771304993e9f2e996490f846c4b6c" => :high_sierra - end - - depends_on :macos # Due to Python 2 (Migration to Python 3 has started) - # https://sourceforge.net/p/quex/git/ci/e0d9de092751dc0b61e0c7fa2777fdc49ea1d13e/) - - 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/easy.qx", "-o", "tiny_lexer" - assert_predicate testpath/"tiny_lexer", :exist? - end -end diff --git a/Formula/quickjs.rb b/Formula/quickjs.rb deleted file mode 100644 index 34d2e1d3f25dc..0000000000000 --- a/Formula/quickjs.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Quickjs < Formula - desc "Small and embeddable JavaScript engine" - homepage "https://bellard.org/quickjs/" - url "https://bellard.org/quickjs/quickjs-2020-07-05.tar.xz" - sha256 "63e9f77a4283cede6b37b75dbbe85cb57edc7dd646367650ac2901d9ef268a99" - - bottle do - sha256 "5bb0910b8bbb4f83a112108a458ac6923db2faa2e4b6e1bf25bbbd0433112802" => :catalina - sha256 "9c21183602722ad0dd52b1693a71fb983cc6171d841ed4a25f98193ae2e7d5c8" => :mojave - sha256 "e6152958ae17351bc0dcb13073a34e0c3647f6f1a864ca8f503ca45a68e56576" => :high_sierra - 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 - - path = testpath/"test.js" - path.write "console.log('hello');" - system "#{bin}/qjsc", path - output = shell_output(testpath/"a.out").strip - assert_equal "hello", output - end -end diff --git a/Formula/quicktype.rb b/Formula/quicktype.rb deleted file mode 100644 index d56a152e98230..0000000000000 --- a/Formula/quicktype.rb +++ /dev/null @@ -1,37 +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.240.tgz" - sha256 "8d33ab80b03db7996d226eab38935505bd073c6d9ed75ca3db77fef0eabd6298" - license "Apache-2.0" - head "https://github.com/quicktype/quicktype.git" - - bottle do - cellar :any_skip_relocation - sha256 "c6dcb4ca8f02a79d042691aa9780ff118421cbb00d6dd1dff170c0f5880e1e3e" => :catalina - sha256 "b9a4a53503d75d0a6e31b67d52688aa484819abd5e539621cb0ddffd0892eeb2" => :mojave - sha256 "840ae4619f54bb0f2e70e1b1580be76a1361c0fb15deb559d3897f2381bdd52c" => :high_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/quill.rb b/Formula/quill.rb deleted file mode 100644 index ee58aecc75af3..0000000000000 --- a/Formula/quill.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Quill < Formula - desc "C++14 Asynchronous Low Latency Logging Library" - homepage "https://github.com/odygrd/quill" - url "https://github.com/odygrd/quill/archive/v1.3.2.tar.gz" - sha256 "bf7090c4770cf548d0093499ffb15c0d80c87d74c9bd4cb648f6b6c1e8de35b5" - license "MIT" - head "https://github.com/odygrd/quill.git" - - bottle do - cellar :any_skip_relocation - sha256 "d38c9b0d87a2e817c913fa8d45c29342c7cc31ca942ef0ce8ee7b5e2ddf113c4" => :catalina - sha256 "19664e186c0f9f01ac54497749166cf3267bdd202531796370bb3739a9d70087" => :mojave - sha256 "45aa31dee147e09e72987911692af54ae2b0e0025764ded37794941fb23d22c8" => :high_sierra - end - - depends_on "cmake" => :build - - def install - ENV.cxx11 - - mkdir "quill-build" do - args = std_cmake_args - args << ".." - system "cmake", *args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include "quill/Quill.h" - int main() - { - quill::start(); - quill::Handler* file_handler = quill::file_handler("#{testpath}/basic-log.txt", "w"); - quill::Logger* logger = quill::create_logger("logger_bar", file_handler); - LOG_INFO(logger, "Test"); - } - EOS - - system ENV.cxx, "-std=c++14", "test.cpp", "-I#{include}", "-L#{lib}", "-lquill", "-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/quilt.rb b/Formula/quilt.rb deleted file mode 100644 index 39389e74debe7..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.66.tar.gz" - sha256 "314b319a6feb13bf9d0f9ffa7ce6683b06919e734a41275087ea457cc9dc6e07" - license "GPL-2.0" - head "https://git.savannah.gnu.org/git/quilt.git" - - bottle do - cellar :any_skip_relocation - sha256 "b7304ce0125f31f6d38f8645d436de553f765b599e4c66f8f659478963bf33f6" => :catalina - sha256 "5d7f412108ec8831b8b6bfbc8e41d8b577523ffd66f9d095853a4680ec23b04f" => :mojave - sha256 "691a01a091194910f0848aea529b331559fb98d44e9821c1ebafba51d2a2d62c" => :high_sierra - sha256 "2305addd5b8f4b256701b2ec89ec9caffa4699dae48e63f8cac0478545b5d860" => :sierra - 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 16fce635ce9cd..0000000000000 --- a/Formula/quotatool.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "b8787cedb9e50c5ea14b10fa2e6cf9ec948e7842a97d5e7212abef0ea87e26c6" => :catalina - sha256 "2d2b6f53466ec7b211f44b0319966b7120e3bbf0e1d57c1f0ae3d272bc8f4ce4" => :mojave - sha256 "bbf7543458972806f3c15b25bf7cd71276159b54ae1ada3beb12e6d29328ec0e" => :high_sierra - sha256 "4d04c382c8cf8b0376b34ce12813be06e879fdf6b60711cf90643d08887304fb" => :sierra - sha256 "da5c90f85204fa90a38da073765ec5c0f0a20333bcdcd131d79b682afa74233f" => :el_capitan - sha256 "8af3549d42247f0b79458c96978f8f5e5fbe04cc1c0dd86f84accdf03e8e510f" => :yosemite - sha256 "724a3fc561188de5e0e050f7459480cc8c613d399faee5290ec7a68b9715960d" => :mavericks - 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 fd9fe09a994fc..0000000000000 --- a/Formula/quvi.rb +++ /dev/null @@ -1,29 +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" - license "LGPL-2.1" - - 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 572b7a88c0dbd..0000000000000 --- a/Formula/qwt.rb +++ /dev/null @@ -1,80 +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.5/qwt-6.1.5.tar.bz2" - sha256 "4076de63ec2b5e84379ddfebf27c7b29b8dc9074f3db7e2ca61d11a1d8adc041" - - bottle do - sha256 "1890f28117b4bc819d39359bfe70af5993d735a9bf4e8b5121992e3681287801" => :catalina - sha256 "79dfcceaa6ad17084d8997201d22de70a19b8228e626094ed1d4a6787c3324f7" => :mojave - sha256 "22baeaa7b5cbaade938f80ab01845e8fb8516389b82cfd2ca8180aeeb676289f" => :high_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"] - args << if ENV.compiler == :clang - "macx-clang" - else - "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 18c82d1d41879..0000000000000 --- a/Formula/qwtpolar.rb +++ /dev/null @@ -1,94 +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 - rebuild 1 - sha256 "29e8dcae83fabafd75613c3299482b3d126ade4837b6c312d882994726fe3667" => :catalina - sha256 "29e8dcae83fabafd75613c3299482b3d126ade4837b6c312d882994726fe3667" => :mojave - sha256 "5bd97a27b353a338b97b1e5f33f1c95b568dacc9e49f9d56a1e085bf554264bb" => :high_sierra - end - - depends_on :xcode => :build - - 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 - # Doc install is broken, remove it to avoid errors - 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 42e5b847f6fd2..0000000000000 --- a/Formula/qxmpp.rb +++ /dev/null @@ -1,52 +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/v1.3.0.tar.gz" - sha256 "3c83d7cb3e790afd62a5232956ca85378aa76b6e1d1875c921ead05b70bb0fa5" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "4c3019ce06ecc7202748b289ecbf1ac13f880f336de7d55f1e4ca717e6255d3e" => :catalina - sha256 "7adb72c5f0920f8642cdbc768bee46e317594d261611c9ad91515c847afe9dee" => :mojave - sha256 "3c656c837d070fb9cf7d6de56056636876440aa6d00bcae8f8dda8945f9581f2" => :high_sierra - end - - depends_on "cmake" => :build - depends_on :xcode => :build - depends_on "qt" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "cmake", "--build", ".", "--target", "install" - end - 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 b09e8180b7f1d..0000000000000 --- a/Formula/r.rb +++ /dev/null @@ -1,101 +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-4/R-4.0.2.tar.gz" - sha256 "d3bceab364da0876625e4097808b42512395fdf41292f4915ab1fd257c1bbe75" - license "GPL-2.0" - revision 1 - - bottle do - sha256 "4d2073c7d93e1117cc35fcc375f6eb112f16c311cc4400d703a805d57f0de71a" => :catalina - sha256 "e337fd3411cd1dffc9be88c1e116d87acac55021b3a5c70af0feba1b1a2c7259" => :mojave - sha256 "9040c02a85ac2c37007f066cb3c388c41ea5f4e9e7cfde864f249999b0ce4026" => :high_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 "pcre2" - depends_on "readline" - depends_on "xz" - - # needed to preserve executable permissions on files without shebangs - skip_clean "lib/R/bin", "lib/R/doc" - - 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-tcltk", - "--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 - - system bin/"Rscript", "-e", "install.packages('gss', '.', 'https://cloud.r-project.org/')" - 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..802d013ab81f6 --- /dev/null +++ b/Formula/r/r.rb @@ -0,0 +1,167 @@ +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.0.tar.gz" + sha256 "3b33ea113e0d1ddc9793874d5949cec2c7386f66e4abfb1cef9aec22846c3ce1" + 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_sequoia: "48e4817e21ff16cd70fe7a3bd11ffb6b117f43b4a6a710d7bbb3c70bb374e239" + sha256 arm64_sonoma: "f2f3b9c3ea83b6a6418ef6d277b46cbaaf58da22fb1bf98bd40ceb4be5bc3bd3" + sha256 arm64_ventura: "b4eeb8e81c83ee1d4d2c3e346c06abb71cfcb173f26cf351011edf5304cf660b" + sha256 sonoma: "87bde25906088da3adaec6dfe8526b8e6992532ffcadfa76039d215cd8dcef72" + sha256 ventura: "6af721dd46ae2605802e8b4719f20d9a8be745da7a8742ad06d9dc40a9bf9316" + sha256 arm64_linux: "d21463fdd1a28126e092e84c3ff604dfc51d21c8a612c5aa4de89b986a070b37" + sha256 x86_64_linux: "030a0cc88f27535c502c31118d10cae6d8398c519df565b275c15dea3d1b9379" + 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@8" + depends_on "xz" + depends_on "zstd" + + uses_from_macos "bzip2" + uses_from_macos "curl" + uses_from_macos "libffi", since: :catalina + 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@8"].opt_lib}/tclConfig.sh", + "--with-tk-config=#{Formula["tcl-tk@8"].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..4458bc79dc58c --- /dev/null +++ b/Formula/r/r3.rb @@ -0,0 +1,61 @@ +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 + + bottle do + 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, mojave: "f136221b1d7a0a4ee057ea0551a2b742d1a49cb50011e5651e8fa5c96327b0b0" + sha256 cellar: :any, high_sierra: "5239e5302b1952367f6cdc066e43483de6b0d30fa70f1dcf2e9f03b10983890f" + sha256 cellar: :any, sierra: "d39c22ae9e69454cc7c205ff0cecc3dd6084a38a1e1742091f55df389e5a8f4a" + sha256 cellar: :any, el_capitan: "6122bbc3566581f130e54cd563ed69f169598f5ce62d6319e7b5a95b10b802ef" + 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..321949473dfc9 --- /dev/null +++ b/Formula/r/ra-multiplex.rb @@ -0,0 +1,91 @@ +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" + + bottle do + 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..d7c4ff0c55889 --- /dev/null +++ b/Formula/r/rabbitmq-c.rb @@ -0,0 +1,42 @@ +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_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..c05ad3c563d46 --- /dev/null +++ b/Formula/r/rabbitmq.rb @@ -0,0 +1,98 @@ +class Rabbitmq < Formula + desc "Messaging and streaming broker" + homepage "https://www.rabbitmq.com/" + url "https://github.com/rabbitmq/rabbitmq-server/releases/download/v4.1.0/rabbitmq-server-generic-unix-4.1.0.tar.xz" + sha256 "9a9c6e1c6a36512e596bbea623caa0d25c80c2fae7092d030327301ddaee5aae" + license "MPL-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "f98fbbeafb22fbe7eb1f188b689a4c16460e64046f60fe4c33eaa9181cd525c3" + 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..5e27afe0cf097 --- /dev/null +++ b/Formula/r/radamsa.rb @@ -0,0 +1,44 @@ +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_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..7f5f09880bc31 --- /dev/null +++ b/Formula/r/radare2.rb @@ -0,0 +1,33 @@ +class Radare2 < Formula + desc "Reverse engineering framework" + homepage "https://radare.org/" + url "https://github.com/radareorg/radare2/archive/refs/tags/5.9.8.tar.gz" + sha256 "e45e4fd342f04b2e00363bc1b68cc375c1cf36041085d3d59caa7a3b7be43836" + 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_sequoia: "e1f3a925db6a3f6587bf18b42db0182e047dfd2e4a7c9bb224715fc084fe2f13" + sha256 arm64_sonoma: "7bb9ae6fb9e64a8be412703e661defce66bea8f0ae0b0286ff47a572ea21f1ff" + sha256 arm64_ventura: "dfaea432a6a13e9b8a614dcf3b3011acd19e7264d545b134a31527da74c5387b" + sha256 sonoma: "a8077a79e428ab9ea479720de7639374bbdf27c1458ed464fb0e2cb7d6a35a94" + sha256 ventura: "4688b0cdaff8b2d8ab3910b8f4c40d3df69282ae89c742735e0155564ceb6e0a" + sha256 arm64_linux: "8cc9896896aa6f94299dae64f0e793075604f900fdb5620a1761e2254895eb6d" + sha256 x86_64_linux: "3945a5e9b1b47d9f11b14c44c5ccf849dcae3be42aca6f3d7b112cd8601c11f3" + end + + 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/rage.rb b/Formula/r/rage.rb new file mode 100644 index 0000000000000..01439e6a48575 --- /dev/null +++ b/Formula/r/rage.rb @@ -0,0 +1,51 @@ +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_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 File.read(testpath/"test.txt.age").start_with?("age-encryption.org") + + # 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..74941a323ba4b --- /dev/null +++ b/Formula/r/ragel.rb @@ -0,0 +1,59 @@ +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 + + bottle do + 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, mojave: "b9b1428abb19b6e6d8de2bccc58a059b75d7c08b38b73956bb40e764a9d0390f" + sha256 cellar: :any_skip_relocation, high_sierra: "8dc6d7e1a3617cd31d9738c5ae595fd57ddb157266c1970646a7d5fbba85a6ae" + sha256 cellar: :any_skip_relocation, sierra: "69d6d65c2ef3da7b829e3391fd17b1ef088b92c2baf64979707033e2a7dd8c01" + sha256 cellar: :any_skip_relocation, el_capitan: "f4ea3a8c0476fd82000223fae69170ac9f266cd36334bd60d9d6cf4fab3273c1" + 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..3fb1f757158e0 --- /dev/null +++ b/Formula/r/rails-completion.rb @@ -0,0 +1,26 @@ +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 + + 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/railway.rb b/Formula/r/railway.rb new file mode 100644 index 0000000000000..4cde01971fdd0 --- /dev/null +++ b/Formula/r/railway.rb @@ -0,0 +1,33 @@ +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.5.1.tar.gz" + sha256 "65e77d90cb3d642e04a92403bcdfeb0e7417661f01d37c67ff11805f8e798dca" + license "MIT" + head "https://github.com/railwayapp/cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aa3ccabfd1518686094d557340c458a574e5aabe7b86503d83a897c99984a13b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "17755ec6b55e14f157678065460e1776afbe27222ef22bfce14091afd52dd6b8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3d617a420c066c05d1025e4f57a064b6701a56b994231c3d0db26a03e65af28d" + sha256 cellar: :any_skip_relocation, sonoma: "7a99d7b4bc8e0a99a5a6ea1ba4967c00c8955755a6cb231c4be43bdc6b69c6a5" + sha256 cellar: :any_skip_relocation, ventura: "0361a2171f7c2150b003e8c422ab140542f0acfea26545df7bcafe5394fefa42" + sha256 cellar: :any_skip_relocation, arm64_linux: "911d8aaa4558fdf68c4363992b2ffcaf2d087f04791dc15f4227adc318517222" + sha256 cellar: :any_skip_relocation, x86_64_linux: "937d91dc990eb698d057a62ab8e35c349c4c3340d2b650b8344965a88efc1c15" + 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..541199f3debc3 --- /dev/null +++ b/Formula/r/rain.rb @@ -0,0 +1,42 @@ +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.0.tar.gz" + sha256 "820724a0cde1066345982b81b42921af86906966d0e51151ed24a6e3c1f08740" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "af2faec2d53bf7ad618047052040f01755d42feff97c7277b13f2618d2ddbc91" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e92b3a6cc6c34bb7a3110090be658ca87af74d6c34c0d7a9f706b2196875a55" + sha256 cellar: :any_skip_relocation, arm64_ventura: "68f9a3eebbb7f1e978c7f9fec953c0c714d92a29f4fc479c945a66a17ac2081b" + sha256 cellar: :any_skip_relocation, sonoma: "30e684ea5984aff5347de23c2a70922093bb75aadbe798bf09ea085f2c58b7ec" + sha256 cellar: :any_skip_relocation, ventura: "66d4bcfaf9dca2fe737fabd9b83b6d211ea79eed8b3fb3fcfb47c54cbbd6fb86" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ef15f4820cb1fa32edddb2872d68a49a1de00d668294acde54110eeabef2a77" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5bc081450e52b65ca0bbfd0fbbdec86755d6faf568e0926bfba406633824fffd" + 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..7275c17a4ca03 --- /dev/null +++ b/Formula/r/rainbarf.rb @@ -0,0 +1,29 @@ +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" + + 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..17b4ae96aafda --- /dev/null +++ b/Formula/r/rainfrog.rb @@ -0,0 +1,29 @@ +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.1.tar.gz" + sha256 "dc04ede15bc894d66d64a5b15db925b5f371f59f4651b6add043bbaa5cef2e50" + license "MIT" + head "https://github.com/achristmascarl/rainfrog.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1ee3d22045e6ee913b2b76862c4eb2b2811ba7920f127ae10f765538a75b7b99" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d6e27385d78c70ebef43a0aa9230a70117b378a6745cf2203d1e03c5b3e6fda6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4023769ffc4fbdd25b9850f9b63a2c4d88e6aeccde5de2c304fb1622f73224c9" + sha256 cellar: :any_skip_relocation, sonoma: "7e50bf071b56407d56b6e3aa868787493818ad32426f0efe93c44a3fb2581a95" + sha256 cellar: :any_skip_relocation, ventura: "ecbad32538d407572729a41e8d7d8cee54ada7668a5f9bbc80bf7b577f0a64d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "4c2461c810472f754280b021c8b2be1bff3082deac57f53ee5f796fd63b79dd1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e2b006afe3735a1ce14abd53cb110cc6c9eb25c4f7d48b573f90ca0d396ffad" + 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..9371a1e76fcf6 --- /dev/null +++ b/Formula/r/rake-completion.rb @@ -0,0 +1,25 @@ +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 + + 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..bdfab71a74ad0 --- /dev/null +++ b/Formula/r/rakudo-star.rb @@ -0,0 +1,170 @@ +class RakudoStar < Formula + desc "Rakudo compiler and commonly used packages" + homepage "https://rakudo.org/" + url "https://github.com/rakudo/star/releases/download/2025.04/rakudo-star-2025.04.tar.gz" + sha256 "9c9fcb04b6fae5b56acbe9e580b688334fd0213d1c0d92118b16a8b9da3e54c8" + license "Artistic-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "7ad5078b0eda6ed1b75e1490552f10f3062bcaccf9a47ff43850d782db6e3cb1" + sha256 arm64_sonoma: "4003960795806760c80e1bb49d280001b5cd0e78f08b5ab98f40d39deee51546" + sha256 arm64_ventura: "a32d2826b6478b74b4d881e325a7840a21f9f295837c874b650097ee55375dfe" + sha256 sonoma: "924d3c51706e3f5f5511b1309a2c7b620bf032946e8b4b1c046dd0924bd63a87" + sha256 ventura: "08bc3921336989f0448023d67d88902525451e9c9ad07628c27fcc80860c7832" + sha256 arm64_linux: "a73d20233fbe6ef7804dfe3177fa344e28ebb3a39f889b53800d51ac46d8e907" + sha256 x86_64_linux: "156596cad01fd776d037ea9439d9533b37b4f61ce98b1866aafab07c4577bd84" + 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", since: :catalina + uses_from_macos "libxml2" + + on_macos do + depends_on "libuv" + end + + conflicts_with "moar", 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" + + # Apply open Config::Parser::json PR to fix unittests run during install + # Ref: https://github.com/arjancwidlak/p6-Config-Parser-json/pull/1 + patch do + url "https://github.com/arjancwidlak/p6-Config-Parser-json/commit/ca1a355c95178034b08ff9ebd1516a2e9d5bc067.patch?full_index=1" + sha256 "d13230dc7d8ec0b72c21bd17e99a62d959fb3559d483eb43ce6be7ded8a0492a" + directory "src/rakudo-star-modules/Config-Parser-json" + end + + # 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 + + 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 + bin.install_symlink (share/"perl6/site/bin").children + 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 LibXML module + (testpath/"libxml.raku").write <<~PERL + use LibXML::Document; + my LibXML::Document $doc .= parse: :string(''); + $doc.root.nodeValue = 'World!'; + print $doc; + PERL + assert_equal "World!", shell_output("#{bin}/raku libxml.raku") + + # 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") + + # Test Config::Parser::json module + (testpath/"test.json").write <<~JSON + { "foo": { "bar": [0, 1] } } + JSON + (testpath/"parser.raku").write <<~PERL + use Config; + use Config::Parser::json; + my $config = Config.new(); + $config.=read("test.json"); + print $config.get('foo.bar'); + PERL + assert_equal "0 1", shell_output("#{bin}/raku parser.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..ff47db7ff0b28 --- /dev/null +++ b/Formula/r/rakudo.rb @@ -0,0 +1,52 @@ +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.04/rakudo-2025.04.tar.gz" + sha256 "6569878db3bbf02c19c9280f7583fd581f75454d9408b847b8360e544bc7fb98" + license "Artistic-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "119377d1090b2eac475b94c5ec543513a02151773ae974c25632f64088626df9" + sha256 arm64_sonoma: "c5ea837d22a9dc4d7fd42920e774b34e8f22629736105e7cd7d3b74c209b78b7" + sha256 arm64_ventura: "bef700ae08f17252cd63dda124a38c980c1b0462c0efecca238ac0cf01329501" + sha256 sonoma: "978af772b09dabb48256d9ca7383f7d43edaa0169b4851b30b1bc9d51e7497f5" + sha256 ventura: "70c1e8889b31e0a320c13c2eb8af99a90bbe3bf3e97b731ed52ddaa97766ebcf" + sha256 arm64_linux: "b7d3f1aecfbaff20c1dd421c23cfb8bbade1e345b0c27de4614c977c1bbdaa46" + sha256 x86_64_linux: "a4ec1ff159add1f020be9193fc1dd66485a7bad5449fe6f582e6d9ade444c305" + 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..356238060af86 --- /dev/null +++ b/Formula/r/ramalama.rb @@ -0,0 +1,44 @@ +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/d0/e1/b76be2c5104562346a05027d8314e2765ae91578fdf7960813e40a599bb5/ramalama-0.8.3.tar.gz" + sha256 "14579571e0f890bcd3f153d163107f5a8d2af1fc4729ed280772f59d2ffa0ad0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d21e57800d083a7a5b462fc09f81340ad99bfa4443bdbc25b74c80db601da399" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d21e57800d083a7a5b462fc09f81340ad99bfa4443bdbc25b74c80db601da399" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d21e57800d083a7a5b462fc09f81340ad99bfa4443bdbc25b74c80db601da399" + sha256 cellar: :any_skip_relocation, sonoma: "ab3de7d6beed92c2ac79cb21ac0775e7930457c88416c46bca2bdd1660573d45" + sha256 cellar: :any_skip_relocation, ventura: "ab3de7d6beed92c2ac79cb21ac0775e7930457c88416c46bca2bdd1660573d45" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4c64e2b26f4c3c655702cfa2f6e07bede295e2450b6ed1b6045b0d710bddb8e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4c64e2b26f4c3c655702cfa2f6e07bede295e2450b6ed1b6045b0d710bddb8e" + end + + depends_on "llama.cpp" + depends_on "python@3.13" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/16/0f/861e168fc813c56a78b35f3c30d91c6757d1fd185af1110f1aec784b35d0/argcomplete-3.6.2.tar.gz" + sha256 "d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf" + end + + def install + virtualenv_install_with_resources + end + + test do + assert_match "invalidllm:latest was not found", shell_output("#{bin}/ramalama run invalidllm 2>&1", 1) + + 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..ac03bf8cd36ce --- /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.11.1.tar.gz" + sha256 "fc41afbfb432c71c731a6def381f28c2c56be91c888a33bde359b6842feff4e5" + license "Apache-2.0" + head "https://github.com/rancher/cli.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_sequoia: "c33ea7a5b435e9686e08424fba51d70da6cbbd627382c579256a8bd5fb5b029f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c33ea7a5b435e9686e08424fba51d70da6cbbd627382c579256a8bd5fb5b029f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c33ea7a5b435e9686e08424fba51d70da6cbbd627382c579256a8bd5fb5b029f" + sha256 cellar: :any_skip_relocation, sonoma: "fae467f616e7b2e8d6274ef78959cdd7d35106375e71cadabf54b8637b150ab7" + sha256 cellar: :any_skip_relocation, ventura: "fae467f616e7b2e8d6274ef78959cdd7d35106375e71cadabf54b8637b150ab7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c28675649a3395b3e53569757f5c2be7605d3d338da58ea96f93cfac9e21cd2c" + 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..6001b420b78c7 --- /dev/null +++ b/Formula/r/rancid.rb @@ -0,0 +1,48 @@ +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 + + bottle do + 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..942dee9a5b203 --- /dev/null +++ b/Formula/r/randomize-lines.rb @@ -0,0 +1,47 @@ +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 + + bottle do + 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, mojave: "58709789bd3fae27aaa79f0c5149fc613128bb01e50e3a5b5dbdc61fe2f1b8bf" + sha256 cellar: :any_skip_relocation, high_sierra: "2d539a346c5a41f2b20773d8373e61f91a5d7e5b72b6d6dde7bd7c99dae64b6e" + sha256 cellar: :any_skip_relocation, sierra: "19f42b1930e7a523778b18834c9615eb3c891ee490a1cb41a73f61bc47c336f6" + sha256 cellar: :any_skip_relocation, el_capitan: "e61c986a537a9f0c77b1382add72096e72f7447ef50ac8acc01320014681e691" + 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..8e68fab86b0d8 --- /dev/null +++ b/Formula/r/range-v3.rb @@ -0,0 +1,46 @@ +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" + + 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..3e35b3a51822a --- /dev/null +++ b/Formula/r/range2cidr.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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, 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..8ee1d9e461601 --- /dev/null +++ b/Formula/r/ranger.rb @@ -0,0 +1,37 @@ +class Ranger < Formula + include Language::Python::Virtualenv + + desc "File browser" + homepage "https://ranger.github.io/" + url "https://github.com/ranger/ranger/archive/refs/tags/v1.9.4.tar.gz" + sha256 "7ad75e0d1b29087335fbb1691b05a800f777f4ec9cba84faa19355075d7f0f89" + license "GPL-3.0-or-later" + head "https://github.com/ranger/ranger.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "97ec1aa9eb07127348df0acbbe74ee70530e3c42b2b34b318d275a5b939b108c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "97ec1aa9eb07127348df0acbbe74ee70530e3c42b2b34b318d275a5b939b108c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "97ec1aa9eb07127348df0acbbe74ee70530e3c42b2b34b318d275a5b939b108c" + sha256 cellar: :any_skip_relocation, sonoma: "9805b7b6198dac4993bf90919395a37d7e26dea6c1a059c87a82f30c56b915af" + sha256 cellar: :any_skip_relocation, ventura: "9805b7b6198dac4993bf90919395a37d7e26dea6c1a059c87a82f30c56b915af" + sha256 cellar: :any_skip_relocation, arm64_linux: "25694caeb635a9e43026ce07350d8d0bbaef2ffa959e910dde876f97e32959c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97ec1aa9eb07127348df0acbbe74ee70530e3c42b2b34b318d275a5b939b108c" + end + + depends_on "python@3.13" + + 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.13"].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..5c13126709c28 --- /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.2.tar.gz" + sha256 "cf619bb1e7a525472077e76287041d9cd89e97073a24095bcb97f81897b0c1d4" + license "MIT" + head "https://github.com/rapidfuzz/rapidfuzz-cpp.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6c3d224d6635841d64372d9214e0557ce73d2792e504557def95e55183a2098d" + 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..beee61f3593d1 --- /dev/null +++ b/Formula/r/rapidjson.rb @@ -0,0 +1,38 @@ +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 + + 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..c1709ac25aff5 --- /dev/null +++ b/Formula/r/rapidyaml.rb @@ -0,0 +1,39 @@ +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.9.0/rapidyaml-0.9.0-src.tgz" + sha256 "e01c66b21dfbe3d7382ecab3dfe7efcdc47a068cd25fcc8279e8f462f69c995d" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a926b5137c4f63bb5ff171b5d7db7b5723ec241ca24151f01e94085796c5e2a5" + sha256 cellar: :any, arm64_sonoma: "eb19678c2ed14af83f23f00a5e290670a10879c10ff45801e758fffd9c710361" + sha256 cellar: :any, arm64_ventura: "d38245d9b58586970547cadeddacdabc64aba97364605fec1818043e7b74b680" + sha256 cellar: :any, sonoma: "53a6ed410c614d69717df813c05e0874aef7b1ddec62faee50dbb10dd7f92158" + sha256 cellar: :any, ventura: "59eede95d14fba8e567d1c3101b30a1dc474038eba06159805caadc2813ed927" + sha256 cellar: :any_skip_relocation, arm64_linux: "6af592cde3cde4adc1af59e80dde10d048d7af6108ec34aeb21f9c4c5ead41a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f4b2a7dae11ce18a1dbe21856222bde0585ab5a96b08349d94741805ff74bd6a" + 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..fb484d64df975 --- /dev/null +++ b/Formula/r/raptor.rb @@ -0,0 +1,45 @@ +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 + + bottle do + 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..e0f5eafab7ac7 --- /dev/null +++ b/Formula/r/rargs.rb @@ -0,0 +1,33 @@ +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" + + bottle do + rebuild 1 + 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..76c77fe073e5e --- /dev/null +++ b/Formula/r/rarian.rb @@ -0,0 +1,45 @@ +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 + + bottle do + 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..ada2b8d9fc882 --- /dev/null +++ b/Formula/r/rasqal.rb @@ -0,0 +1,45 @@ +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 + + bottle do + 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, mojave: "61669830b056a2d79757a38bdaa53ea52c6bb84e58dfcff75804252fa12c752e" + sha256 cellar: :any, high_sierra: "c9a39d850c71f2ffcc6d0368cb9f575df1a0bd727992dfb553baccc8ecec97ce" + sha256 cellar: :any, sierra: "8d57d6803a7323f9e13c45d56b3cea41f71f7dc7cab493ddf9b34d0a2a6b68f5" + sha256 cellar: :any, el_capitan: "fa7368eb30256eb80ead76f7b551bc5980ed15ae8aa655d332a200edb073c2a3" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..67c1e9df64bfe --- /dev/null +++ b/Formula/r/rasterio.rb @@ -0,0 +1,85 @@ +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 + sha256 cellar: :any, arm64_sequoia: "4410576ace32e78400ed9d09167fdb8512765eec039229237a3db59dbdf3a673" + sha256 cellar: :any, arm64_sonoma: "f66b60551ec2f3d51a889d8738a4b0bec36b1212d05183fd0d0623dbcb9a6221" + sha256 cellar: :any, arm64_ventura: "26af3700f3b615d9eac3d871eb2e9efbae7f402294966b12108414ec57296eab" + sha256 cellar: :any, sonoma: "50ad9d3ac08ab03e08678ca3d6551016421b7b186fe95c362b9dbd67a8304214" + sha256 cellar: :any, ventura: "868807093a9173ae0a22dcc9426e4e7a38fce818789bbc9e51192eea11695887" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3591bf74726a6e4663aad38970345a67c0bd75cd5eb553c8ca8b218cc6dacce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00de49b47c6a04925b1575417950a468713913e3a64279ca8e02b77fb86b9131" + end + + depends_on "cmake" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "certifi" + depends_on "gdal" + depends_on "numpy" + depends_on "python@3.13" + + on_linux do + depends_on "patchelf" => :build + end + + conflicts_with "rio", because: "both install `rio` binaries" + conflicts_with cask: "rio", because: "both install `rio` binaries" + + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/5f/1d/45434f64ed749540af821fd7e42b8e4d23ac04b1eda7c26613288d6cd8a8/click-plugins-1.1.1.tar.gz" + sha256 "46ab999744a9d831159c3411bb0c79346d94a444df9a3a3742e9ed63645f264b" + 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/8b/1a/3544f4f299a47911c2ab3710f534e52fea62a633c96806995da5d25be4b2/pyparsing-3.2.1.tar.gz" + sha256 "61980854fd66de3a90028d679a954d5f2623e83144b5afe5ee86f43d762e5f0a" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"rio", shells: [:fish, :zsh], 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/ratarmount.rb b/Formula/r/ratarmount.rb new file mode 100644 index 0000000000000..f5435ab0bb3e1 --- /dev/null +++ b/Formula/r/ratarmount.rb @@ -0,0 +1,109 @@ +class Ratarmount < Formula + include Language::Python::Virtualenv + + desc "Mount and efficiently access archives as filesystems" + homepage "https://github.com/mxmlnkn/ratarmount" + url "https://github.com/mxmlnkn/ratarmount/archive/refs/tags/v1.0.0.tar.gz" + sha256 "fc5fadfc4dc268613eb3df832a0b3a3bc7fd40cd119b6aff83beaaa29ed05254" + license "MIT" + revision 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "71afbf252f7c7f0c94fe39b89175f2abffc5f7ff84b64eaee8e77d0d846e52e8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9834cce582b558270e76d63e92a7a1aed99e55f43401c46c6d2c2910c7a7b284" + end + + depends_on "libffi" + depends_on "libfuse" + depends_on "libgit2" + depends_on :linux + depends_on "python@3.13" + depends_on "zlib" + depends_on "zstd" + + resource "cffi" do + url "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz" + sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" + 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/f2/75/0eff2f73f451d8510a9ab90d96fb974b900cd68fcba0be1d21bc0da62dc2/indexed_gzip-1.9.4.tar.gz" + sha256 "6b415e4a29e799d5a21756ecf309325997992f046ee93526b8fe4ff511502b60" + 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 "libarchive-c" do + url "https://files.pythonhosted.org/packages/a0/f9/3b6cd86e683a06bc28b9c2e1d9fe0bd7215f2750fd5c85dce0df96db8eca/libarchive-c-5.1.tar.gz" + sha256 "7bcce24ea6c0fa3bc62468476c6d2f6264156db2f04878a372027c10615a2721" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + end + + resource "pygit2" do + url "https://files.pythonhosted.org/packages/b7/ea/17aa8ca38750f1ba69511ceeb41d29961f90eb2e0a242b668c70311efd4e/pygit2-1.17.0.tar.gz" + sha256 "fa2bc050b2c2d3e73b54d6d541c792178561a344f07e409f532d5bb97ac7b894" + 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 "rapidgzip" do + url "https://files.pythonhosted.org/packages/0b/ac/0eee3d3279618a3c3810ac6b012b8ee7c1a9f239c9fa37529e619a31bb93/rapidgzip-0.14.3.tar.gz" + sha256 "7d35f0af1657b4051a90c3c0c2c0d2433f3ce839db930fdbed3d6516de2a5df1" + 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/a1/5a/5600a4abe37426e9f3206bed3519b392f01816679226f4058049ea0e4a7d/ratarmountcore-0.8.0.tar.gz" + sha256 "f1991a79b020b94e75c37c92c199677c80186db5f86a7a9717def68f1ae08207" + + # Fix to use libfuse 3.16+ because of ABI problem + # Issue ref: https://github.com/mxmlnkn/ratarmount/issues/153 + # But it is resolved in 3.17.x + # Issue ref: https://github.com/libfuse/libfuse/issues/1029 + patch :DATA + end + + def install + virtualenv_install_with_resources + 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 + +__END__ +diff --git a/ratarmountcore/fusepy/fuse.py b/ratarmountcore/fusepy/fuse.py +index 5e8e976..aedfa06 100644 +--- a/ratarmountcore/fusepy/fuse.py ++++ b/ratarmountcore/fusepy/fuse.py +@@ -171,7 +171,7 @@ if fuse_version_major != 2 and not (fuse_version_major == 3 and _system == 'Linu + f"Found library {_libfuse_path} has wrong major version: {fuse_version_major}. " + "Expected FUSE 2!" + ) +-if fuse_version_major == 3 and fuse_version_minor > 16: ++if fuse_version_major == 3 and fuse_version_minor > 17: + raise AttributeError( + f"Found library {_libfuse_path} is too new ({fuse_version_major}.{fuse_version_minor}) " + "and will not be used because FUSE 3 has no track record of ABI compatibility." diff --git a/Formula/r/ratchet.rb b/Formula/r/ratchet.rb new file mode 100644 index 0000000000000..59d6e2507fac7 --- /dev/null +++ b/Formula/r/ratchet.rb @@ -0,0 +1,40 @@ +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.3.tar.gz" + sha256 "46a9bb0a7f284699fc438713612bf9b619d480254a6c78525103dbf45f1d6ce5" + license "Apache-2.0" + head "https://github.com/sethvargo/ratchet.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "49fa18b970518e752110498b373d02d624522c702c0aa04effb7f97ad9c8d3e3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "49fa18b970518e752110498b373d02d624522c702c0aa04effb7f97ad9c8d3e3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "49fa18b970518e752110498b373d02d624522c702c0aa04effb7f97ad9c8d3e3" + sha256 cellar: :any_skip_relocation, sonoma: "488704c85b23d71d07fd24f54d20f7edef6c542bebc8c11ac5db0ab6e5a571c7" + sha256 cellar: :any_skip_relocation, ventura: "488704c85b23d71d07fd24f54d20f7edef6c542bebc8c11ac5db0ab6e5a571c7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "46ba7b2680cd7aeb5fb0333625cd747975bc71ad549870edc1a995c6d84316f2" + 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..50bea18d2fa0f --- /dev/null +++ b/Formula/r/ratfor.rb @@ -0,0 +1,64 @@ +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_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..15f99590a0309 --- /dev/null +++ b/Formula/r/rathole.rb @@ -0,0 +1,69 @@ +class Rathole < Formula + desc "Reverse proxy for NAT traversal" + homepage "https://github.com/rapiz1/rathole" + url "https://github.com/rapiz1/rathole/archive/refs/tags/v0.5.0.tar.gz" + sha256 "c8698dc507c4c2f7e0032be24cac42dd6656ac1c52269875d17957001aa2de41" + license "Apache-2.0" + + bottle do + rebuild 1 + 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/rapiz1/rathole/issues/380 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/bd353c6adb3601f32de0fa87f3acd34a98da6ec1/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..ccbf834f557a3 --- /dev/null +++ b/Formula/r/ratify.rb @@ -0,0 +1,65 @@ +class Ratify < Formula + desc "Artifact Ratification Framework" + homepage "https://ratify.dev/" + url "https://github.com/ratify-project/ratify/archive/refs/tags/v1.4.0.tar.gz" + sha256 "36b18d2070d76a6e85aa86bf94e4e68350c6c277985d6bc8e87a28c78ebb08b8" + license "Apache-2.0" + head "https://github.com/ratify-project/ratify.git", branch: "dev" + + bottle do + rebuild 1 + 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, 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..180afcbbcd553 --- /dev/null +++ b/Formula/r/rats.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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 mojave: "77244d885c0f203d64bd4054105310a797a9b44333bf4ef1f7b7cec63b0a163f" + sha256 high_sierra: "6ae19bc72cfea62b56b83931f95a70f27ce9a13617026292861a272e22269135" + sha256 sierra: "5f2a74a60c30a825ad036f390e3830346be4fe3299a28a81e25630d54defd119" + sha256 el_capitan: "224ae02df998c8fc296bf3905fbc369a787fc55f5ef295d63f1b3c44bfee7a5d" + 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..e4776d227f0ef --- /dev/null +++ b/Formula/r/rattler-build.rb @@ -0,0 +1,69 @@ +class RattlerBuild < Formula + desc "Universal conda package builder" + homepage "https://rattler.build/" + url "https://github.com/prefix-dev/rattler-build/archive/refs/tags/v0.41.0.tar.gz" + sha256 "dd2192b323aadf42364543325e632f81b90cf8eff74f0f5029cccd940cc8da49" + 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_skip_relocation, arm64_sequoia: "2fa23ee67f4eccb5603b3185e12e76aa5f91b94793bac64d13dfd86efb478674" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d4bcd4e9fe992cf98768558c0d8d5ab2450f0b943b1035107e23bd0be58fd2bb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "88e6df08c6c261e1cbe74af6017fb3cc1fe598e04a7ac8d5331af52e2f2bf68d" + sha256 cellar: :any_skip_relocation, sonoma: "a5da80624f70937df31589d4e0077707444b75df728da54b86bcbc44767cbd31" + sha256 cellar: :any_skip_relocation, ventura: "fbb27b6828173751cc007c12ba477c9036f5838e1fda15dda26ab4cf2967e0c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd8e712ae8194d5e99dafd1615c79513251d4e7d537e77a3a33648440ce39098" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5841b269589776502ac1a7702df758eecc62a6d4b046b6850f78693a4a6b412c" + 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..032371bbb38cf --- /dev/null +++ b/Formula/r/rattler-index.rb @@ -0,0 +1,42 @@ +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.22.6.tar.gz" + sha256 "c50d7e025b50c828ebf71e8393eec4c177a2cf727940478a4d8af17ff1b0ac49" + 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_sequoia: "b50c7557283e9a57c264cdaaaa3d43729d08c86827c908ad988d428428740435" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "472bc6077fb2048b30c5d5de76d0bc2682f07dc229de158e472fe85ce80bcb82" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d524487e009babb919299e2474416b2f186f2feaadff1652fa332c52bf7f55d7" + sha256 cellar: :any_skip_relocation, sonoma: "99848f8c1e25d6f12b665ced4a9ec1ad0b710bbefa3d82c489e228391187e323" + sha256 cellar: :any_skip_relocation, ventura: "473b110809a5e155fd202e78aa5fc9423ef53ecdb723b97256a56504cace9272" + sha256 cellar: :any_skip_relocation, arm64_linux: "989f923cfaf42716b651ac32c155e23f81204a40b155c5c8abbb3c80a6d14b6d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43248f46184d599d8e799ae7fa8afe69473bb46580f0ee5fe6ef91b7f6648e59" + 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", "--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..924d95f708007 --- /dev/null +++ b/Formula/r/rav1e.rb @@ -0,0 +1,47 @@ +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.7.1.tar.gz" + sha256 "da7ae0df2b608e539de5d443c096e109442cdfa6c5e9b4014361211cf61d030c" + 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_sequoia: "fa713f47f3e544d96dc62d374567bbc917d6f8bd5009779454468961c593d43a" + sha256 cellar: :any, arm64_sonoma: "03c3c20f83de1fca64b0e0c67e8eb583a334f30769c047304a6627fcec76c765" + sha256 cellar: :any, arm64_ventura: "ebbacd899e780c0eaa27cd2adb2d3eba5f1d60d1ea38097601e1ea8991c95c30" + sha256 cellar: :any, arm64_monterey: "5a95ecb310417a49fcd0a488a7f69bddede2ab766345e7a90f28235430c27109" + sha256 cellar: :any, sonoma: "824a1de49472fc953a0676070611304e00ec69b4292a7d448a8dc94db0519415" + sha256 cellar: :any, ventura: "1b42472f766a82b42d4b345034cb242a7939ddac1c29dcc761326fe002a87833" + sha256 cellar: :any, monterey: "851887583386e346690659f508b7785936417d94da7429e0f08e11b876d1aceb" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa2652c210eb478276e2aad29ceae2d59c6d3e52b52199642147737cfe9e846f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e4cc6efb6c1c457be8202cc6d09604a79d158d321a4782a2042b5faa34406d1" + 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..ef9e72af1084e --- /dev/null +++ b/Formula/r/raven.rb @@ -0,0 +1,143 @@ +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 1 + sha256 cellar: :any, arm64_sequoia: "ad40e6057f424f0191313b075aaa3fa70b8314c8407a35b36378730cfa40921c" + sha256 cellar: :any, arm64_sonoma: "21a4807ad67f5eb40c57cf361d07f5c80a0f3e20a76ec24eb6cc591e0399764b" + sha256 cellar: :any, arm64_ventura: "e87feeaf89d0ec69e5bcd8e74192d96044ce04de4709eff119f6d78c8a73fae4" + sha256 cellar: :any, sonoma: "42c2241ddee62dbf8aa4560bb76ef906fbdb9d5f1452bef9bf97bc72329206a9" + sha256 cellar: :any, ventura: "b540f6776eead96815c3284d76817239a9220c4a1b3c8aa4f446b311b6dbb1e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "1cb023324db871cb45ca2ca25d744b9d32a2fdf4206ea875e00a00ed16b36147" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73b55d7ea7f06c758090bf97b18ee033450550dda37255753f83a31ebb8df288" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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..04c47cc6f7c0b --- /dev/null +++ b/Formula/r/rawdog.rb @@ -0,0 +1,265 @@ +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 13 + + bottle do + sha256 cellar: :any, arm64_sequoia: "b4e993f8b81885682f56b1f4ada3faa0595df6b79bf50e821876109dbce53aa8" + sha256 cellar: :any, arm64_sonoma: "008330b3971a4995029a32cb9f5a7e3fb38bfceecb9cac802bfda9b806342318" + sha256 cellar: :any, arm64_ventura: "c7be88efea61dd37394baf82a75a8ed4dc99179ae2e2c27840d18fd4dc3196ca" + sha256 cellar: :any, sonoma: "0bca837e79b02500bfae26f42b24747510a5cdfc53ed89b3d5beba14eda93602" + sha256 cellar: :any, ventura: "51b992f04633a9a018a6c89151e3653f366e09edefc6c32fa8a1d1ee3c9c6928" + sha256 cellar: :any_skip_relocation, arm64_linux: "947313934a4b9ef5a46393d59f215b3147d0864f9db26687966dce378dc21e19" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc828fc6cda7d402f3bb0dc75e6315e21298ab45fa20c27c0f19944dcd533f4d" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + 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/63/e7/fa1a8c00e2c54b05dc8cb5d1439f627f7c267874e3f7bb047146116020f9/aiohttp-3.11.18.tar.gz" + sha256 "ae856e1138612b7e412db63b7708735cff4d38d0399f6a5435d3dac2669f558a" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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 "frozenlist" do + url "https://files.pythonhosted.org/packages/ee/f4/d744cba2da59b5c1d88823cf9e8a6c74e4659e2b27604ed973be2a0bf5ab/frozenlist-1.6.0.tar.gz" + sha256 "b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68" + end + + resource "fsspec" do + url "https://files.pythonhosted.org/packages/45/d8/8425e6ba5fcec61a1d16e41b1b71d2bf9344f1fe48012c2b48b9620feae5/fsspec-2025.3.2.tar.gz" + sha256 "e52c77ef398680bbd6a98c0e628fbc469491282981209907bbc8aea76a04fdc6" + 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 "huggingface-hub" do + url "https://files.pythonhosted.org/packages/df/22/8eb91736b1dcb83d879bd49050a09df29a57cc5cd9f38e48a4b1c45ee890/huggingface_hub-0.30.2.tar.gz" + sha256 "9a7897c5b6fd9dad3168a794a8998d6378210f5b9688d0dfc180b1a228dc2466" + 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/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/1e/c2/e4562507f52f0af7036da125bb699602ead37a2332af0788f8e0a3417f36/jiter-0.9.0.tar.gz" + sha256 "aadba0964deb424daa24492abc3d229c60c4a31bfee205aedbf1acc7639d7893" + 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/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" + sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" + end + + resource "litellm" do + url "https://files.pythonhosted.org/packages/a7/61/b974067af7908f19a0391ebda0ebfdff376eb9314c28578a9e60b0b381a7/litellm-1.67.2.tar.gz" + sha256 "9e108827bff16af04fd4c35b0c1a1d6c7746c96db3870189a60141d449797487" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + end + + resource "openai" do + url "https://files.pythonhosted.org/packages/84/51/817969ec969b73d8ddad085670ecd8a45ef1af1811d8c3b8a177ca4d1309/openai-1.76.0.tar.gz" + sha256 "fd2bfaf4608f48102d6b74f9e11c5ecaa058b60dad9c36e409c12477dfd91fb2" + 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/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/88/2c/7bb1416c5620485aa793f2de31d3df393d3686aa8a8506d11e10e13c5baf/python_dotenv-1.1.0.tar.gz" + sha256 "41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5" + 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/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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/ea/cf/756fedf6981e82897f2d570dd25fa597eb3f4459068ae0572d7e888cfd6f/tiktoken-0.9.0.tar.gz" + sha256 "d02a5ca6a938e0490e1ff957bc48c8b078c88cb83977be1625b1fd8aac792c5d" + end + + resource "tokenizers" do + url "https://files.pythonhosted.org/packages/92/76/5ac0c97f1117b91b7eb7323dcd61af80d72f790b4df71249a7850c195f30/tokenizers-0.21.1.tar.gz" + sha256 "a1bb04dc5b448985f86ecd4b05407f5a8d97cb2c0532199b2a302a604a0165ab" + 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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/62/51/c0edba5219027f6eab262e139f73e2417b0f4efffa23bf562f6e18f76ca5/yarl-1.20.0.tar.gz" + sha256 "686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + end + + # poetry 2.0 build patch, upstream pr ref, https://github.com/AbanteAI/rawdog/pull/94 + patch do + url "https://github.com/AbanteAI/rawdog/commit/a3e6dc1a16ad02a53521ea2128760dadc73f8c1d.patch?full_index=1" + sha256 "77a88a315e228c86f36ae876323c140b30916d4e4107f7174e7d6c70f000b853" + end + + def install + virtualenv_install_with_resources + 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..4cdb2d0b8e8b8 --- /dev/null +++ b/Formula/r/raxml-ng.rb @@ -0,0 +1,56 @@ +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_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 + + resource "homebrew-example" do + url "https://cme.h-its.org/exelixis/resource/download/hands-on/dna.phy" + sha256 "c2adc42823313831b97af76b3b1503b84573f10d9d0d563be5815cde0effe0c2" + end + + def install + args = std_cmake_args + ["-DUSE_GMP=ON"] + system "cmake", "-S", ".", "-B", "build", *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? + + system "cmake", "-S", ".", "-B", "build_mpi", *args, "-DUSE_MPI=ON" + system "cmake", "--build", "build_mpi" + system "cmake", "--install", "build_mpi" + end + + test do + 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..ebbad2205789c --- /dev/null +++ b/Formula/r/raylib.rb @@ -0,0 +1,77 @@ +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_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..bd714fdb94225 --- /dev/null +++ b/Formula/r/rbenv-aliases.rb @@ -0,0 +1,24 @@ +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" + + 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..9cdcbe306df25 --- /dev/null +++ b/Formula/r/rbenv-binstubs.rb @@ -0,0 +1,24 @@ +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" + + 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..471f9d2236744 --- /dev/null +++ b/Formula/r/rbenv-bundle-exec.rb @@ -0,0 +1,24 @@ +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" + + 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..36ef6a1115a1f --- /dev/null +++ b/Formula/r/rbenv-bundler-ruby-version.rb @@ -0,0 +1,25 @@ +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" + + 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..54b74979668e1 --- /dev/null +++ b/Formula/r/rbenv-bundler.rb @@ -0,0 +1,23 @@ +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" + + 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..dcf05e700e30d --- /dev/null +++ b/Formula/r/rbenv-chefdk.rb @@ -0,0 +1,26 @@ +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" + + 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..fc2aeea6c8288 --- /dev/null +++ b/Formula/r/rbenv-ctags.rb @@ -0,0 +1,25 @@ +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" + + 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..1e115cd2d76f0 --- /dev/null +++ b/Formula/r/rbenv-default-gems.rb @@ -0,0 +1,30 @@ +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" + + 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..0f816e52613fb --- /dev/null +++ b/Formula/r/rbenv-gemset.rb @@ -0,0 +1,33 @@ +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.10.tar.gz" + sha256 "91b9e6f0cced09a40df5817277c35c654d39feaea4318cc63a5962689b649c94" + license :public_domain + head "https://github.com/jf/rbenv-gemset.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f4b32914a93a0af5a444ff4ace90678f07969a6e0e3aa5d63d0af655e3e570f1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f3a6b6c538ac4b69ed5322a2d056b782ee42a40260359c71465c7817ee87d71a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cd878825e721949e665c84452d74ec2c36c1b04a2da825ffb7dec3301d663fea" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cd878825e721949e665c84452d74ec2c36c1b04a2da825ffb7dec3301d663fea" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cd878825e721949e665c84452d74ec2c36c1b04a2da825ffb7dec3301d663fea" + sha256 cellar: :any_skip_relocation, sonoma: "149f261118f3e0abd75830b85ec456cb3a24edec190b97ea4e6c7083a7904e41" + sha256 cellar: :any_skip_relocation, ventura: "7db514b2352ec2cd623ebf7efe1feebb8125960531fbeda72e7a4e37cfe576f6" + sha256 cellar: :any_skip_relocation, monterey: "7db514b2352ec2cd623ebf7efe1feebb8125960531fbeda72e7a4e37cfe576f6" + sha256 cellar: :any_skip_relocation, big_sur: "7db514b2352ec2cd623ebf7efe1feebb8125960531fbeda72e7a4e37cfe576f6" + sha256 cellar: :any_skip_relocation, catalina: "7db514b2352ec2cd623ebf7efe1feebb8125960531fbeda72e7a4e37cfe576f6" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a35b02c901c91d1e7c94b6aaecce7f143d1164f35f5fec234e55e69b4aef0ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd878825e721949e665c84452d74ec2c36c1b04a2da825ffb7dec3301d663fea" + 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..2d51142690b00 --- /dev/null +++ b/Formula/r/rbenv-vars.rb @@ -0,0 +1,24 @@ +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" + + 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..deb8318515639 --- /dev/null +++ b/Formula/r/rbenv.rb @@ -0,0 +1,53 @@ +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 + + 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..12c21f287609f --- /dev/null +++ b/Formula/r/rbspy.rb @@ -0,0 +1,48 @@ +class Rbspy < Formula + desc "Sampling profiler for Ruby" + homepage "https://rbspy.github.io/" + url "https://github.com/rbspy/rbspy/archive/refs/tags/v0.33.0.tar.gz" + sha256 "3b69a08d54a1ca9e36173f0f95cdb1a6acf479a29010d40351187813082e6b9c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4d8c553b25959cba39500a65e4076c1812995d438176d0ff9207c4fa0aca9c2f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c0e5fa8372d8729d274445c70b378861a798441e660e5aa84bc06494da0b20de" + sha256 cellar: :any_skip_relocation, arm64_ventura: "61636d45614813617bc84fc1ff8a8b423bb7ae2fa53ea4e8e46057cdcd567022" + sha256 cellar: :any_skip_relocation, sonoma: "acd986789548441e5442c10aa0a93b2a99c5279d7d20bb852037b8fcf4f7a290" + sha256 cellar: :any_skip_relocation, ventura: "8ce3db2f9e2eac9d9cdb9b2816fa18cd3f27182c03115f365007974f0618a436" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e834d25fbb7c2490575db059e809e0097df2708b3d784db1f04cb678d14045a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5d82d9e289db4d175b4ed6f95f8aadcb849377386f67d6277946f83da3e8ff87" + 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..462564a0ed460 --- /dev/null +++ b/Formula/r/rbtools.rb @@ -0,0 +1,123 @@ +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/54/0b/47cd58d88cdfc538b99c7c1a9c15b2ea09fd307a993290d8e2f3956e09f2/rbtools-5.2.1.tar.gz" + sha256 "f2863515ef6ff1cfcd3905d5f409ab8c4d12878b364d6f805ba848dcaecb97f2" + license "MIT" + head "https://github.com/reviewboard/rbtools.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a62c7635efca81fa9f6fa7c9a32e6d726f9ad633fe7b1b1f297db99fc4f9ba5a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a62c7635efca81fa9f6fa7c9a32e6d726f9ad633fe7b1b1f297db99fc4f9ba5a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a62c7635efca81fa9f6fa7c9a32e6d726f9ad633fe7b1b1f297db99fc4f9ba5a" + sha256 cellar: :any_skip_relocation, sonoma: "dd18cbd048bcd3881c4d8e19ff4235535282c30e19a183e08370d5740295fc06" + sha256 cellar: :any_skip_relocation, ventura: "dd18cbd048bcd3881c4d8e19ff4235535282c30e19a183e08370d5740295fc06" + sha256 cellar: :any_skip_relocation, arm64_linux: "a62c7635efca81fa9f6fa7c9a32e6d726f9ad633fe7b1b1f297db99fc4f9ba5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a62c7635efca81fa9f6fa7c9a32e6d726f9ad633fe7b1b1f297db99fc4f9ba5a" + end + + depends_on "certifi" + depends_on "python@3.13" + + 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/33/08/c1395a292bb23fd03bdf572a1357c5a733d3eecbab877641ceacab23db6e/importlib_metadata-8.6.1.tar.gz" + sha256 "310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580" + 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/09/2d/40599f25667733e41bbc3d7e4c7c36d5e7860874aa5fe9c584e90b34954d/puremagic-1.28.tar.gz" + sha256 "195893fc129657f611b86b959aab337207d6df7f25372209269ed9e303c1a8c0" + 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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + 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..4f8f792af5d08 --- /dev/null +++ b/Formula/r/rbw.rb @@ -0,0 +1,33 @@ +class Rbw < Formula + desc "Unofficial Bitwarden CLI client" + homepage "https://github.com/doy/rbw" + url "https://github.com/doy/rbw/archive/refs/tags/1.13.2.tar.gz" + sha256 "afe8887b64c4da6e5f33535d02ad4e1fe75c536a55d63291622b4b339522d138" + license "MIT" + head "https://github.com/doy/rbw.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4530789e51dc8c8dd49ebcc833156206f221b7f2f8128ccbbbf45ad1e04bb88b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "096ca704f5351ff2bcf266995070c381f65042f4348b08b6ec1cbd4fa4211488" + sha256 cellar: :any_skip_relocation, arm64_ventura: "866f22cdc9c573ecb5a7d394e5b728ca660bc34e1129f3b970eec946015916e3" + sha256 cellar: :any_skip_relocation, sonoma: "0f03798d05ce72ccce6b6ae4591c6bcbcd48afe4a1c9296998666de69b8ab037" + sha256 cellar: :any_skip_relocation, ventura: "e0c9f8f7d9ec109da08fff90c25e4cd5329384bd130c1c7c2222e5153b7e321a" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb4b8c43695aefa2e3261570b6e96754d3d2c435d9d0fcad89a148f09b1a6198" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d13b82f0928bc39fefe5e9a4ec5445bf4d8035c5a43853739e0353903609d74d" + 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..97a580de6e4c5 --- /dev/null +++ b/Formula/r/rc.rb @@ -0,0 +1,42 @@ +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, mojave: "f14ceeb0e4315379e2052e39a24fafb529f841428b1a64e3009cfd62769b9e4a" + sha256 cellar: :any_skip_relocation, high_sierra: "c2ee55c504be78889adc7d0cba962528f995bf222dc77ce5a6b930210851294e" + sha256 cellar: :any_skip_relocation, sierra: "627e45477eabd5854e3c5f39af5290befd43d03b385d1b20f0ce4b49636fd2d9" + 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 + + 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..bf4aee18cb2a6 --- /dev/null +++ b/Formula/r/rclone.rb @@ -0,0 +1,48 @@ +class Rclone < Formula + desc "Rsync for cloud storage" + homepage "https://rclone.org/" + url "https://github.com/rclone/rclone/archive/refs/tags/v1.69.2.tar.gz" + sha256 "46507a8314742255c8949f3ee7ab57c0cb2cab0b01065c9a4ad7b28da1fb54ae" + license "MIT" + head "https://github.com/rclone/rclone.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c82f4e4d39d340a0bdef40ea3cd877f47796c525ece174a6741cbe1b3f109a2b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5d7c69483dfdf17c6708a24691438332c371542c95c431044939b25c6f0ac6fe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fcfd601b86a54373cdf2df4b260b0d51a72743c90cf87a1317b75088ea38687d" + sha256 cellar: :any_skip_relocation, sonoma: "8de0f38dffc797fe54ac73863913f43d1e53320d942dbd9390b07c94d880b190" + sha256 cellar: :any_skip_relocation, ventura: "4c7acd8802b7b1333a5bd6d5f9def9f596dce3cf331174af0cd6860cd05ed180" + sha256 cellar: :any_skip_relocation, arm64_linux: "f2d28bc874aa3327102820de53b6444b9552cb385e0e01a1995a1721a9fe3f34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "28e6453bb5cc2b2218a80806e35d129b0cf43171bfe74c02461bb3ae4b55f6e2" + 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..7a471f6bfdd2c --- /dev/null +++ b/Formula/r/rcm.rb @@ -0,0 +1,35 @@ +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 + + 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..852c96889caf3 --- /dev/null +++ b/Formula/r/rcs.rb @@ -0,0 +1,39 @@ +class Rcs < Formula + desc "GNU revision control system" + homepage "https://www.gnu.org/software/rcs/" + url "https://ftp.gnu.org/gnu/rcs/rcs-5.10.1.tar.lz" + mirror "https://ftpmirror.gnu.org/rcs/rcs-5.10.1.tar.lz" + sha256 "43ddfe10724a8b85e2468f6403b6000737186f01e60e0bd62fde69d842234cc5" + license "GPL-3.0-or-later" + + bottle do + 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..80adad4343a82 --- /dev/null +++ b/Formula/r/rdap.rb @@ -0,0 +1,39 @@ +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" + + bottle do + rebuild 1 + 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, 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..aac4e455644ab --- /dev/null +++ b/Formula/r/rdate.rb @@ -0,0 +1,45 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "2d4c93b21caa56d3228d8ff2ff790f4142421ad6316cd74d77c568e84602a996" + sha256 cellar: :any_skip_relocation, high_sierra: "02e41a79e9aca3bad86802e1bc32c7148e8a2ea2f410c57765f9e9d8b2686fd1" + sha256 cellar: :any_skip_relocation, sierra: "9f4a6300d6d3ebc9034abeb5388fd40face1f286a7b97610b6a40a1dcdf166b5" + sha256 cellar: :any_skip_relocation, el_capitan: "acb2ae5951a0f32cbdce39e02d86c63cdb85b41fd02aff74aac6ea4939d71d8d" + 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..8ae52a17eb114 --- /dev/null +++ b/Formula/r/rdb.rb @@ -0,0 +1,29 @@ +class Rdb < Formula + desc "Redis RDB parser" + homepage "https://github.com/HDT3213/rdb/" + url "https://github.com/HDT3213/rdb/archive/refs/tags/v1.1.0.tar.gz" + sha256 "88a56e1e022ea1522fb68e3e54e4dc603827494d994f4b5a24ae8c17ecee2069" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "df85087cc26dfc1fe3eb28035105bd3864ab82d9645746e9ad029e11b786eb01" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "df85087cc26dfc1fe3eb28035105bd3864ab82d9645746e9ad029e11b786eb01" + sha256 cellar: :any_skip_relocation, arm64_ventura: "df85087cc26dfc1fe3eb28035105bd3864ab82d9645746e9ad029e11b786eb01" + sha256 cellar: :any_skip_relocation, sonoma: "e5e4cd239b3856d8cf3622dca2448af48905288b1a26586c83f0f1168ebb60a8" + sha256 cellar: :any_skip_relocation, ventura: "e5e4cd239b3856d8cf3622dca2448af48905288b1a26586c83f0f1168ebb60a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "904c8ae38c8ae716375f9ca5927e60fb0a5b54fb216d21b6670e3d0ab3ecd519" + 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..933c2a5bafb68 --- /dev/null +++ b/Formula/r/rdfind.rb @@ -0,0 +1,42 @@ +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_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..acc3f784e2b7f --- /dev/null +++ b/Formula/r/rdiff-backup.rb @@ -0,0 +1,43 @@ +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 2 + sha256 cellar: :any, arm64_sequoia: "b8a183aadfc497b89651c586a63267398a9ffa1b5fc7181bbb3dba635ed50aa8" + sha256 cellar: :any, arm64_sonoma: "e23be48d91740ad07bc9a1f6d17a421353fe1c9456c21d14038a7335a516fbdc" + sha256 cellar: :any, arm64_ventura: "eec850cd941f91e122231dbe65f85451f3255baf5237cce8cb6ca6449c0278af" + sha256 cellar: :any, sonoma: "af6653ad557d8ed7d4a7efefe138381cbd6b470af020456f6aeb0e741ce9c463" + sha256 cellar: :any, ventura: "3c6b2a8ec13479805311c25991032e477935367a99b87f8f5454ea4c35f6a2e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "cc2694d7d63017b164590148e2fd7e2daf87944f017422215dc369d310bf16bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a240b34dd02ee832c2eada0cb754574d303b051e2702b0798bad0ac533db9dd4" + end + + depends_on "librsync" + depends_on "libyaml" + depends_on "python@3.13" + + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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..f5ba06c72e4d4 --- /dev/null +++ b/Formula/r/rdkit.rb @@ -0,0 +1,155 @@ +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_03_2.tar.gz" + sha256 "4db5d503c3e0040321c32a2dc60d60221dc73ee9e5902b8208f2a39057bbfb15" + license "BSD-3-Clause" + 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_sequoia: "fc0084d88f8068bc87338a68421b0178d089cfc10e9d55ba0a58498c1807830c" + sha256 arm64_sonoma: "aff5c49f467699a77fa87cdd1b1ad3cf91a5d5b484e7afe7dc1d2df7f0f90f37" + sha256 arm64_ventura: "59e482ee31900e49c08b716970ebeceaf78e72d678e3a681d2e936c639a3a552" + sha256 cellar: :any, sonoma: "86ab0cbb0d2414b87ee993bffdd75ddaa8bfd197c568645bfc77d122de2cd33a" + sha256 cellar: :any, ventura: "eec570d4cec882a75b3cbe9f7ae1c3346a4cf4cd64b8f314b9f187e01af92dd6" + sha256 cellar: :any_skip_relocation, arm64_linux: "c8c63f853cafee1a32449279e2ac6604a400f6786f4493e2f9167fe94a220933" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8283dbef87308e95d19c0721a67f42470475cf74b19ce4eb8c306197569bddc3" + end + + depends_on "catch2" => :build + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "postgresql@14" => [:build, :test] + depends_on "postgresql@17" => [: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.13" + + 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.13" + end + + def postgresqls + deps.filter_map { |f| f.to_formula if f.name.start_with?("postgresql@") } + .sort_by(&:version) + end + + def install + (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_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..d5889905f9dd4 --- /dev/null +++ b/Formula/r/re-flex.rb @@ -0,0 +1,42 @@ +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/v5.4.0.tar.gz" + sha256 "729b214ecb0eb437c6562120b8f0fa294505684fc6eebac552fe8e335987dc60" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4afb75c344af21a1d8dc9092ae9d2ee425ad0ff728252ef1c5fd8a57d1ff3190" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b46b945ff905b369bb2177cba976ef601995de9fca17d3ebdcfa2308dd111993" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2c4cfdbb722bae3beb2ba5113e8ee57204103a0bdee9fae2505b423205018378" + sha256 cellar: :any_skip_relocation, sonoma: "17add8f83b7b7a406aa0521ba7eda56613af1e5d19f23513efd38412f10a9088" + sha256 cellar: :any_skip_relocation, ventura: "9cbaecc825513c77a7d6ade47928207abfad56ede112453a906d20e70cc969c7" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd3663f209e2957999a8e5d9bc73a87e8e341ebd9310d06b2e6a11b093b03f50" + sha256 cellar: :any_skip_relocation, x86_64_linux: "811efbc1e7a8fcf03d5ab690647ef7fdd81131238fa9dd393b002af5caca21c9" + 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..6da1f58891a3b --- /dev/null +++ b/Formula/r/re2.rb @@ -0,0 +1,68 @@ +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/2024-07-02.tar.gz" + version "20240702" + sha256 "eb2df807c781601c14a260a507a5bb4509be1ee626024cb45acbd57cb9d4032b" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "78c39b1bdfc21ac31d89fc69ef35cc28fe7deabd551c3b3ec29c0f200c56c7ae" + sha256 cellar: :any, arm64_sonoma: "9dc85bc8e5a00a1a642331e812871dc00ed4a272a8415ec523f278d0dbb1faab" + sha256 cellar: :any, arm64_ventura: "5dd906163941f74bc6c69a3cfedd5ebc9c7dc46d7edae24ade05301d57213047" + sha256 cellar: :any, arm64_monterey: "f4605e85f6e65e78edc7235bcc3e94af9f14f085a917f1439eb1cdd925f21c43" + sha256 cellar: :any, sonoma: "3a4ded074a9b16c0989fa50cad39ca056d58f97aabf7727842225b5842f6aeed" + sha256 cellar: :any, ventura: "25f162c211fea6e9809c3bd9a8f629815dbc8210bc5a463f774b3adf5f1d630b" + sha256 cellar: :any, monterey: "a5bad9ec8a9c26b3f5bfc8c1ef9427dd26323bd653a8283fdba5705a8cfca859" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ce851d198aa1ed70bbe6a431fbab0b3bc08fc166b66cd23e20f09e3d25f19df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e12fc1cd41b67cd68a6b8f4c1a925b1027eb8a6528ee2bb140477dcdc7ac445" + 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..13cd1e7c969be --- /dev/null +++ b/Formula/r/re2c.rb @@ -0,0 +1,47 @@ +class Re2c < Formula + desc "Generate C-based recognizers from regular expressions" + homepage "https://re2c.org/" + url "https://github.com/skvadrik/re2c/releases/download/4.2/re2c-4.2.tar.xz" + sha256 "c9dc2b24f340d135a07a1ac63ff53f7f8f74997fed5a4e9132a64050dbc3da1f" + license :public_domain + + bottle do + sha256 arm64_sequoia: "faef128b02d761e48c62e2731aa58333833d1f486d95485b5469da728fbb5a34" + sha256 arm64_sonoma: "22cf1c6043fc18b92f2a889d56becca40999dccbd19af38002ca044d7a1c6f93" + sha256 arm64_ventura: "5172403e61e00a27d0cb0c4076014c4e12142c0bd2796a0f1dd8faa4f0432b43" + sha256 sonoma: "0dd252d6d34f358ef7b32fdd85eb418cbb794b6d7cb9975e7c6682da0c3a15c0" + sha256 ventura: "288ca32046a3739b6544615530fa8ece4b914755469c515cdb405dc05f5d4c60" + sha256 arm64_linux: "c975ffc6ed5497d01308a2ecef95592d2917724e4efb1bb6e7b8d361f71d187d" + sha256 x86_64_linux: "82d080773dbf82587b721cbd4eb1036f5f11d0eb7c4944e9d18a357138d73516" + 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..850b274e25194 --- /dev/null +++ b/Formula/r/react-native-cli.rb @@ -0,0 +1,24 @@ +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" + + 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..68c986364e983 --- /dev/null +++ b/Formula/r/readerwriterqueue.rb @@ -0,0 +1,52 @@ +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"] + + 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..69cf419cd42ae --- /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://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz" + mirror "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz" + version "8.2.13" + sha256 "3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" + license "GPL-3.0-or-later" + + %w[ + 001 bbf97f1ec40a929edab5aa81998c1e2ef435436c597754916e6a5868f273aff7 + 002 e06503822c62f7bc0d9f387d4c78c09e0ce56e53872011363c74786c7cd4c053 + 003 24f587ba46b46ed2b1868ccaf9947504feba154bb8faabd4adaea63ef7e6acb0 + 004 79572eeaeb82afdc6869d7ad4cba9d4f519b1218070e17fa90bbecd49bd525ac + 005 622ba387dae5c185afb4b9b20634804e5f6c1c6e5e87ebee7c35a8f065114c99 + 006 c7b45ff8c0d24d81482e6e0677e81563d13c74241f7b86c4de00d239bc81f5a1 + 007 5911a5b980d7900aabdbee483f86dab7056851e6400efb002776a0a4a1bab6f6 + 008 a177edc9d8c9f82e8c19d0630ab351f3fd1b201d655a1ddb5d51c4cee197b26a + 009 3d9885e692e1998523fd5c61f558cecd2aafd67a07bd3bfe1d7ad5a31777a116 + 010 758e2ec65a0c214cfe6161f5cde3c5af4377c67d820ea01d13de3ca165f67b4c + 011 e0013d907f3a9e6482cc0934de1bd82ee3c3c4fd07a9646aa9899af237544dd7 + 012 6c8adf8ed4a2ca629f7fd11301ed6293a6248c9da0c674f86217df715efccbd3 + 013 1ea434957d6ec3a7b61763f1f3552dad0ebdd6754d65888b5cd6d80db3a788a8 + ].each_slice(2) do |p, checksum| + patch :p0 do + url "https://ftp.gnu.org/gnu/readline/readline-8.2-patches/readline82-#{p}" + mirror "https://ftpmirror.gnu.org/readline/readline-8.2-patches/readline82-#{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://ftp.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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "738c27ceee9a8b198f98438477ef7a513a96a965e3a434ac3aa8fb4ed76494b1" + sha256 cellar: :any, arm64_sonoma: "e46d4ff0c800dd35b9d5cef74e61ade54edc0834231f35c695af206bed9e3608" + sha256 cellar: :any, arm64_ventura: "57580f6ff00c7717c8d791a583f7837944a230c573f1fb8338fd155656be4f04" + sha256 cellar: :any, arm64_monterey: "c3245660eb2d39b76441960dd6c80212debcec51de1ef4d6f86bb13d9a5f1fe3" + sha256 cellar: :any, sequoia: "becf6fdd835be191881959acd788745c1075eeb70cb1fd9ee646a3080597ea6f" + sha256 cellar: :any, sonoma: "0cf2cae0b9bb71bee1f9f9b3ab1e5dfc27b32f474db7f2d38b8b2dffd02da5ff" + sha256 cellar: :any, ventura: "62d86d4a0c7be5d568eaf5abbb6477e4c95dc1821ef232bcb45b658dbf8f9bc4" + sha256 cellar: :any, monterey: "5e5ae8819679057596a21cfde4f575d33c87db70151386d01579bc2863b948fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "3fbfa1938bcf9c9c7b52089a52a9a67a70abf7ae5c00836b6ddd8f4eb5f02ba5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "099378b496dd58f6a0fdb09e4c32d2ccae5631c0b423c1df77626d844553a85f" + 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..f6259ea98c88f --- /dev/null +++ b/Formula/r/readosm.rb @@ -0,0 +1,52 @@ +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 + + bottle do + 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, mojave: "fcc1af52f7c13bfe4b3df0e1ca559ab79cee172c8941f51a335fb0fbb505027f" + 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..7d90c965cd618 --- /dev/null +++ b/Formula/r/readpe.rb @@ -0,0 +1,40 @@ +class Readpe < Formula + desc "PE analysis toolkit" + homepage "https://github.com/mentebinaria/readpe" + url "https://github.com/mentebinaria/readpe/archive/refs/tags/v0.84.tar.gz" + sha256 "2d0dc383735802db62234297ae1703ccbf4b6d2f2754e284eb90d6f0a57aa670" + license "GPL-2.0-or-later" + head "https://github.com/mentebinaria/readpe.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "a68a6f0b54b9428abfeca6dccbac97567ecfafc1b0d2871706dd0f22f65d7c9e" + sha256 arm64_sonoma: "23cc8ab364a477bd245a3771e0fefd945849f6feab70b1288f6db421f1f1a71c" + sha256 arm64_ventura: "8dbca0ad687464fff69c0b7092ff9f08aa76f9eb50595836e239dfd957514032" + sha256 arm64_monterey: "809b896ec49463d5f5246236b6da178b6e34e97df8807ff2b1a3b26ec3342a3a" + sha256 sonoma: "fa76a24e56248862f78f3533071511bbb799a7dc7cf73e7053ce20075df5c36a" + sha256 ventura: "853736579e5cf2720e23fdc87b76743df8f2da3cd443f7800534b5d12f5c1c0f" + sha256 monterey: "ec16bb320368c12138d4d78c7cd1d8d93df6ea966f257d3b15bf0772084a0002" + sha256 arm64_linux: "9a4e8b547d3a3121f13f28da2a37f4ebafe1819dd2de79c07fb9c9e9ea9c6d56" + sha256 x86_64_linux: "7f4cb2c34a30a64949fe31d4597454732c7e99f1bbe3b450d317a9e4f0da5d61" + end + + depends_on "openssl@3" + + resource "homebrew-testfile" do + url "https://the.earth.li/~sgtatham/putty/0.78/w64/putty.exe" + sha256 "fc6f9dbdf4b9f8dd1f5f3a74cb6e55119d3fe2c9db52436e10ba07842e6c3d7c" + end + + 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").stage do + assert_match(/Bytes in last page:\s+120/, shell_output("#{bin}/readpe ./putty.exe")) + end + 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..a755a1b647b97 --- /dev/null +++ b/Formula/r/reattach-to-user-namespace.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "b277145d5bfbc6997bc7d8ebe203e9d93adf8d1aa2f0f1c76152212ee6a23403" + sha256 cellar: :any_skip_relocation, high_sierra: "68e1f00743690086fb23ce013767e0a669ef46807ee9f618fe9ea4a25c50d5c0" + 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..f52eda58df73c --- /dev/null +++ b/Formula/r/reaver.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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..05e4b163c03b6 --- /dev/null +++ b/Formula/r/rebar3.rb @@ -0,0 +1,62 @@ +class Rebar3 < Formula + desc "Erlang build tool" + homepage "https://rebar3.org/" + url "https://github.com/erlang/rebar3/archive/refs/tags/3.24.0.tar.gz" + sha256 "391b0eaa2825bb427fef1e55a0d166493059175f57a33b00346b84a20398216c" + license "Apache-2.0" + revision 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6c00aba8ef8aa1954959241927a697dbb389af2e53113013ec740950859134b7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "081a82ce85c737630c4f454e32031c095b5f7fb8c9139705c26ea1463b56bab2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "daaf2e1860ada7bcaff3c59dd161611f4af4298893ee19d6b543523eecc060fd" + sha256 cellar: :any_skip_relocation, sonoma: "c53cf3cf89d153a1c22c75077eb23e917806af58aac6ab58053537227a438970" + sha256 cellar: :any_skip_relocation, ventura: "96c91363e3a00fc8b4cf1187601941bda4dff426e3e79f06f924225ea6de1c2f" + sha256 cellar: :any_skip_relocation, arm64_linux: "75743131dcfb3133c3b5e2e18197c749633974b348a082888f007e227c43d8c6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33ffd13dc4476f1006a2b10b00fbdc818178f902299d0384a98362c929268954" + end + + depends_on "erlang@25" => [: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..6eecbedfe65ac --- /dev/null +++ b/Formula/r/recc.rb @@ -0,0 +1,128 @@ +class Recc < Formula + desc "Remote Execution Caching Compiler" + homepage "https://buildgrid.gitlab.io/recc" + url "https://gitlab.com/BuildGrid/buildbox/buildbox/-/archive/1.3.11/buildbox-1.3.11.tar.gz" + sha256 "dfebf2b8a25ce9ed21bc3d5c4720279baf21e56dd7fb944ea9d30763a245bf59" + license "Apache-2.0" + revision 1 + head "https://gitlab.com/BuildGrid/buildbox/buildbox.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "dddf3d0abbdc39059981d4f88788ae4bc5e214fca1f9b2a2cc18fa446a64d44e" + sha256 arm64_sonoma: "e74be6e200b16f16ad11921f9fb38f6a27586e2e0ba5bdba476d44a3a351df02" + sha256 arm64_ventura: "88f2fe2acbcff0da6d0a22e211cf3ad4331848590b77c8b75d3626a50b9704c9" + sha256 sonoma: "dee029828bdd85864c3bfbb4b73fcd04d9aa18bc159f32c7c0e95503d6dfa81d" + sha256 ventura: "1b430f9939587470b285ec28c0b2440fa394c7803f36d80329d641445d45c128" + sha256 arm64_linux: "b451693b4ce3d5fdde92a7276ef17bcb7a7534cdfcbc3f9442e7a40e267fd654" + sha256 x86_64_linux: "4015528208f4e72d2ea535a8ff69c677f103bb47d313809716816c915db34ad3" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build # for envsubst + depends_on "tomlplusplus" => :build + depends_on "abseil" + depends_on "c-ares" + depends_on "glog" + depends_on "grpc" + depends_on "openssl@3" + depends_on "protobuf" + depends_on "re2" + 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/recode.rb b/Formula/r/recode.rb new file mode 100644 index 0000000000000..c2b5e757e85f9 --- /dev/null +++ b/Formula/r/recode.rb @@ -0,0 +1,32 @@ +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_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..e7e45997ffd76 --- /dev/null +++ b/Formula/r/recon-ng.rb @@ -0,0 +1,230 @@ +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_formula_mappings.json 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 1 + + bottle do + rebuild 7 + sha256 cellar: :any, arm64_sequoia: "73ef8f988840d76008deb366dcb3540b381b9344ea2dd1633262c2289939771f" + sha256 cellar: :any, arm64_sonoma: "9a8cc5fc58f28ddedd395df597f23d970be791a905c91076edeb23d11436f953" + sha256 cellar: :any, arm64_ventura: "b4f0da3f71e8a0d94b6d493c90c97df2cfb2cfb1b0d49fb33c6339a6fae27078" + sha256 cellar: :any, sonoma: "1f46df526536feb03ea35a060473d3c40603a75e144179ae401afec18676e19e" + sha256 cellar: :any, ventura: "8bdbc862e712b72ed9c9c57ee97fe633b931978a7fc21aee8a9fc88442d41123" + sha256 cellar: :any_skip_relocation, arm64_linux: "77f4480e02a113babc610250e12ba8d5f1a5f773ea1ce0c658ab10c69e368b5b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0f0239b38ecb651e92c002fdaaa8c350e55a035eb2b6f5ec595643aff81759b4" + end + + depends_on "rust" => :build # for rpds-py + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "aniso8601" do + url "https://files.pythonhosted.org/packages/cb/72/be3db445b03944bfbb2b02b82d00cb2a2bcf96275c4543f14bf60fa79e12/aniso8601-9.0.1.tar.gz" + sha256 "72e3117667eedf66951bb2d93f4296a56b94b078a8a95905a052611fb3f1b973" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" + sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" + end + + resource "blinker" do + url "https://files.pythonhosted.org/packages/1e/57/a6a1721eff09598fb01f3c7cda070c1b6a0f12d63c83236edf79a440abcc/blinker-1.8.2.tar.gz" + sha256 "8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83" + 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 "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + 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/41/e1/d104c83026f8d35dfd2c261df7d64738341067526406b40190bc063e829a/flask-3.0.3.tar.gz" + sha256 "ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842" + 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" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz" + sha256 "4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369" + 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/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + 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/b4/d2/38ff920762f2247c3af5cbbbbc40756f575d9692d381d7c520f45deb9b8f/markupsafe-3.0.1.tar.gz" + sha256 "3e683ee4f5d0fa2dde4db77ed8dd8a876686e3fc417655c2ece9a90576905344" + 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/ef/c8/f0173fe3bf85fd891aee2e7bcd8207dfe26c2c683d727c5a6cc3aec7b628/mistune-3.0.2.tar.gz" + sha256 "fc7f93ded930c92394ef2cb6f04a8aabab4117a91449e72dcc8dfa646a508be8" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/3a/31/3c70bf7603cc2dca0f19bdc53b4537a797747a58875b552c8c413d963a3f/pytz-2024.2.tar.gz" + sha256 "2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "redis" do + url "https://files.pythonhosted.org/packages/e0/58/dcf97c3c09d429c3bb830d6075322256da3dba42df25359bd1c82b442d20/redis-5.1.1.tar.gz" + sha256 "f6c997521fedbae53387307c5d0bf784d9acc28d9f1d058abeac566ec4dbed72" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/99/5b/73ca1f8e72fff6fa52119dbd185f73a907b1989428917b24cff660129b6d/referencing-0.35.1.tar.gz" + sha256 "25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/55/64/b693f262791b818880d17268f3f8181ef799b0d187f6f731b1772e05a29a/rpds_py-0.20.0.tar.gz" + sha256 "d72a210824facfdaf8768cf2d7ca25a042c30320b3020de2fa04640920d4e121" + end + + resource "rq" do + url "https://files.pythonhosted.org/packages/c5/1d/a020e8f3559293635dd6283d037bfc15f866136498da3db1e5416c65773d/rq-1.16.2.tar.gz" + sha256 "5c5b9ad5fbaf792b8fada25cc7627f4d206a9a4455aced371d4f501cc3f13b34" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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/0f/e2/6dbcaab07560909ff8f654d3a2e5a60552d937c909455211b1b36d7101dc/werkzeug-3.0.4.tar.gz" + sha256 "34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306" + end + + resource "xlsxwriter" do + url "https://files.pythonhosted.org/packages/a6/c3/b36fa44a0610a0f65d2e65ba6a262cbe2554b819f1449731971f7c16ea3c/XlsxWriter-3.2.0.tar.gz" + sha256 "9977d0c661a72866a61f9f7a809e25ebbb0fb7036baa3b9fe74afcfca6b3cb8c" + 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.13") + 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..9726b4b78ec2c --- /dev/null +++ b/Formula/r/recoverjpeg.rb @@ -0,0 +1,40 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "0f424efc21d5e07c2cdce7a870e28ee1aea42ac8f65f12eb5a845895c49ed958" + sha256 cellar: :any_skip_relocation, high_sierra: "5366edde2383098f7ee4ac866d0d2ff528efbf63af934dd469c3b8e6739678ed" + 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..9d23a6fcab6a1 --- /dev/null +++ b/Formula/r/recoverpy.rb @@ -0,0 +1,78 @@ +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 + sha256 cellar: :any_skip_relocation, all: "7262f578e6eb2a6e8aeaa637c0f1c795491709cdf73c432e6a063f014192460f" + end + + depends_on :linux + depends_on "python@3.13" + + 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 "mdit-py-plugins" do + url "https://files.pythonhosted.org/packages/19/03/a2ecab526543b152300717cf232bb4bb8605b6edb946c845016fa9c9c9fd/mdit_py_plugins-0.4.2.tar.gz" + sha256 "5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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/76/ad/cd3e3465232ec2416ae9b983f27b9e94dc8171d56ac99b345319a9475967/typing_extensions-4.13.1.tar.gz" + sha256 "98795af00fb9640edec5b8e31fc647597b4691f099ad75f469a2616be1a76dff" + 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 = fork { exec bin/"recoverpy" } + sleep 2 + ensure + Process.kill("TERM", pid) + end +end diff --git a/Formula/r/recutils.rb b/Formula/r/recutils.rb new file mode 100644 index 0000000000000..3d56148d73289 --- /dev/null +++ b/Formula/r/recutils.rb @@ -0,0 +1,60 @@ +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.9.tar.gz" + mirror "https://ftpmirror.gnu.org/gnu/recutils/recutils-1.9.tar.gz" + sha256 "6301592b0020c14b456757ef5d434d49f6027b8e5f3a499d13362f205c486e0e" + license "GPL-3.0-or-later" + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..dae64d5d8b606 --- /dev/null +++ b/Formula/r/red-tldr.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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, mojave: "14bf33c09c8b65c74004b2ac8bb036a342d191ccaf8b1d54d9795d13f3cf6fe3" + 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..85f48500ec918 --- /dev/null +++ b/Formula/r/redex.rb @@ -0,0 +1,142 @@ +class Redex < Formula + include Language::Python::Shebang + include Language::Python::Virtualenv + + desc "Bytecode optimizer for Android apps" + homepage "https://fbredex.com/" + license "MIT" + revision 19 + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "65347da8f446206921fbb0603b12153dacc92e1eaa161b1b74ebb38576d5ac3c" + sha256 cellar: :any, arm64_sonoma: "b658660c4464c283aa5cdf0605713ef2dfc3175a2d1fe3b57469596f784eb2c0" + sha256 cellar: :any, arm64_ventura: "055c56e57ce9c88ab726e404aeb3340c4362019441d4f1452a492d2137e123db" + sha256 cellar: :any, sonoma: "dd78be4ea12bac4c61703901214dd005b018d01b281c0ab165a1ff037fd68c39" + sha256 cellar: :any, ventura: "1a3bd9ed872f59a6d1c3ec85b594f3b35efd486aea558aabff2187e10e8dba05" + sha256 cellar: :any_skip_relocation, arm64_linux: "9eaa938b67836b3dd1dffa66155ab941af8a7f934b96e3ec6966956fb2e46030" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96e5068164b73fadae8977be7a224314b14f9146c7dad18f911e9ee041a58259" + 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.13" + + 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.13") + 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..484a201fb5343 --- /dev/null +++ b/Formula/r/redict.rb @@ -0,0 +1,49 @@ +class Redict < Formula + desc "Distributed key/value database" + homepage "https://redict.io/" + url "https://codeberg.org/redict/redict/archive/7.3.3.tar.gz" + sha256 "2248be901a5b368f0c73359c98f27c38a860626b4fe0bf83e6c91f5f50534390" + license "LGPL-3.0-only" + head "https://codeberg.org/redict/redict.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9a19314bcdf7ec4f029a43d7fb5b476202afba06809a72585525dcad2fc86134" + sha256 cellar: :any, arm64_sonoma: "0b2ebed5253b082b293292257489aa5588c0a55babf3104b4744a0268c5e1021" + sha256 cellar: :any, arm64_ventura: "89e1f2d09251d9b8c47e32c837a782a54d63627bedbfa624e11e1ca507209513" + sha256 cellar: :any, sonoma: "47b363ffef54a406ae856413c06f3dfd8ea65d642ecee8250b836df3527a89c4" + sha256 cellar: :any, ventura: "e318935fdd2b135692e16f23ec9f26d7302c9231dfed7fdbe76d046db6f4b434" + sha256 cellar: :any_skip_relocation, arm64_linux: "6270b337d197176772b5bda6c2d4dfb8a6839488f13b3215b803b61b1b345891" + sha256 cellar: :any_skip_relocation, x86_64_linux: "02bf0fbcf1c3b356c69f4e6ace26016dc9a77ff96cf10447e9fdca793154197f" + 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..5006fa86bafb7 --- /dev/null +++ b/Formula/r/redir.rb @@ -0,0 +1,53 @@ +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" + + bottle do + 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..74bc0648735be --- /dev/null +++ b/Formula/r/redis-leveldb.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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..4b5165a0bce37 --- /dev/null +++ b/Formula/r/redis.rb @@ -0,0 +1,63 @@ +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.0.1.tar.gz" + sha256 "d3a11d6ababf44cb98d23f23cee39ae75d17867dcd64aac4add808e21ed36e0c" + 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) + strategy :page_match + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "7f257283869f97ce45045f0f049c27e2a79b686d0ac58458360b6a00c2d75f34" + sha256 cellar: :any, arm64_sonoma: "07deb17bfdf5a0668972ed574e36ae4d66cc613b3cbec6edff7c893adb331767" + sha256 cellar: :any, arm64_ventura: "b02cc3ee192fbcb6c1b8cc7437e1352c15d517304d05415586444d00fd9617b4" + sha256 cellar: :any, sonoma: "73ec7300890dc545e73bba6986cce8709cbc274c3d20b2c3e35ba5660318c603" + sha256 cellar: :any, ventura: "4d00b36d282062de2c494e61ae2431ff404d93e641c22d52cfe19b1bf7512181" + sha256 cellar: :any_skip_relocation, arm64_linux: "78795b13b7e57f9acd185d2db76a135d0e7f182da92d643e69598c2abd1577e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a43fc666a8b8551036c82f6a7e10f84acfc7024a70e7ea542c244768c6397041" + 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..9412494eb8d19 --- /dev/null +++ b/Formula/r/redis@6.2.rb @@ -0,0 +1,59 @@ +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_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..9c97b9bd0987d --- /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.5.3.tar.gz" + sha256 "c5b1746f5c1af905d79247b1e3d808c0da14fd8caf1115023a4d12fe3ad8ebe4" + license "BSD-3-Clause" + head "https://github.com/nalgeon/redka.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d76c91050ffe415ee014050dac28fedb3983a99ddda83e6a04c4009b7a100313" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2afe1b51f17c267bd70f8ced5c96f3d4f3895852883fa19eaba5145c9df7bc62" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8be640a9fe22bb2c23b00fbd7932235ed62dc3aad5fe1dabb1bcc9c9f0ae4e17" + sha256 cellar: :any_skip_relocation, sonoma: "41ce5588bf143a988a41ef0ee17c6e4d581a8e326372c74accd54bcebe1529b1" + sha256 cellar: :any_skip_relocation, ventura: "bb78c4e52d6177cebaf0f1d1afabaf3da46c85841b6feb0e312a605123035d82" + sha256 cellar: :any_skip_relocation, arm64_linux: "8043e1f6e3e88f408e482c41fd195db76126720f546449358728eff9ef6ddc57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a518059a8ea13f550bc38204414142a839adba3458eb31808b17e1a438a59d0e" + 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" + system "go", "build", *std_go_args(ldflags:, output: bin/"redka-cli"), "./cmd/cli" + 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("redis-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..8f6920ac0210f --- /dev/null +++ b/Formula/r/redland.rb @@ -0,0 +1,129 @@ +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 + + bottle do + 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 mojave: "711bdaeff62854f878f02e8fab9782337ee87ebf7398757d7780eb3c8971310b" + sha256 high_sierra: "407f9f1bd2a8682684660826fce445077c33fe3e7f1bfb05e7c0e265e2edacfe" + sha256 sierra: "0ed03c897836946cbadf2e390bd25c79eeb6ad34ea1144ef69d8bf1dfbfaf2eb" + sha256 el_capitan: "38eac3bae25aa65cbb7b688ecfaae91ab79c0c292e7505596ffc3b409bc8ca3b" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..75d3a01b98a22 --- /dev/null +++ b/Formula/r/redo.rb @@ -0,0 +1,85 @@ +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 + + bottle do + rebuild 6 + sha256 cellar: :any_skip_relocation, all: "1efbd77be03b0fe6a112cad4db0910ddb6eeb101f5999322589e8f9ed6ff9870" + end + + depends_on "python@3.13" + + 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.13" + # 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..aafbe38f3a3ed --- /dev/null +++ b/Formula/r/redocly-cli.rb @@ -0,0 +1,92 @@ +class RedoclyCli < Formula + desc "Your all-in-one OpenAPI utility" + homepage "https://redocly.com/docs/cli" + url "https://registry.npmjs.org/@redocly/cli/-/cli-1.34.3.tgz" + sha256 "36e2e9f66eaeebbc69c0528ce7498c3c00854458265e2ce1d64271e788996927" + license "MIT" + head "https://github.com/redocly/redocly-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2db136099fa6e416ab4a89bac19d34f732b7365262aad71a9ff93c58856d48db" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2db136099fa6e416ab4a89bac19d34f732b7365262aad71a9ff93c58856d48db" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2db136099fa6e416ab4a89bac19d34f732b7365262aad71a9ff93c58856d48db" + sha256 cellar: :any_skip_relocation, sonoma: "2100eefa78559107bf5c91de4f02026b3bcfd33122db3ede587b4d2aa95cd4a7" + sha256 cellar: :any_skip_relocation, ventura: "2100eefa78559107bf5c91de4f02026b3bcfd33122db3ede587b4d2aa95cd4a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "2db136099fa6e416ab4a89bac19d34f732b7365262aad71a9ff93c58856d48db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2db136099fa6e416ab4a89bac19d34f732b7365262aad71a9ff93c58856d48db" + 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..efe821f009dac --- /dev/null +++ b/Formula/r/redpen.rb @@ -0,0 +1,39 @@ +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 + + 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..2d2a1a5914ff3 --- /dev/null +++ b/Formula/r/redress.rb @@ -0,0 +1,50 @@ +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.26.tar.gz" + sha256 "70800329d3b3f6efff6b1e514c79dc8a73a2616f7f89bc93b89095469e88d0aa" + 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_sequoia: "1e181df7d78f6d42ff8c7b996a72fe1f56bda11935cdd1815a469e5b597edcd4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1e181df7d78f6d42ff8c7b996a72fe1f56bda11935cdd1815a469e5b597edcd4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1e181df7d78f6d42ff8c7b996a72fe1f56bda11935cdd1815a469e5b597edcd4" + sha256 cellar: :any_skip_relocation, sonoma: "577a62ffc63bd2b590c151dee6015bf48993750b05fd76f992cda3691c46e0cd" + sha256 cellar: :any_skip_relocation, ventura: "577a62ffc63bd2b590c151dee6015bf48993750b05fd76f992cda3691c46e0cd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "319e76382a930d1411825e152d532431d82530eb6d1c19fcbd7f7e25554b7f2c" + 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_module_root = "github.com/goretk/redress" + test_bin_path = bin/"redress" + + output = shell_output("#{bin}/redress info '#{test_bin_path}'") + assert_match(/Main root\s+#{Regexp.escape(test_module_root)}/, output) + end +end diff --git a/Formula/r/redshift.rb b/Formula/r/redshift.rb new file mode 100644 index 0000000000000..fc2d581b60080 --- /dev/null +++ b/Formula/r/redshift.rb @@ -0,0 +1,78 @@ +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" + license "GPL-3.0-or-later" + revision 1 + + bottle do + rebuild 1 + 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 mojave: "71ec07212f543d7a4152f04627f2fe9cabcbc121caae584b24070f05101ae4dd" + 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..034b65e0686fc --- /dev/null +++ b/Formula/r/redstore.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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, mojave: "a17c99ed5d7162eb742eef7b8764c64082fff26895baa81cb26cb75ced03db5e" + sha256 cellar: :any, high_sierra: "fbd9814ed5e35fb1c964d6f581edebfc35e7d35cba0b89ea735247131c5559ac" + sha256 cellar: :any, sierra: "e507eab072e33f0cee1ca08efb51ab06d65cee3a64248ec6badbd4f601f5c674" + sha256 cellar: :any, el_capitan: "5ae64e4a536011ef3f68d2e8b4253624f60995025064de38f3a38308dd005421" + 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..16768e1be0385 --- /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-0.9.9.tar.bz2" + sha256 "f5f8149bba0e4af190235edb6e4664d1a96016324f8a2da5dd60637e03d45630" + license "Apache-2.0" + + livecheck do + url "https://redwax.eu/dist/rt/" + regex(/href=.*?redwax-tool[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "34eff8a283e59a1c44b65e59c11bfb6626e54e848b441441a5ab7bc16bbc1402" + sha256 arm64_sonoma: "2ea52c78dc303b33b192473aaf3b3f2766acd168d2002ac5173030c0e4109838" + sha256 arm64_ventura: "6c1582c3ddf1c69440b407e9108080dedd6f290ed7ed7e1a0ad00c4b20e04262" + sha256 sonoma: "a6ee226d0dd5d1344a5406c2d47f3a818586d1d30ead84b86648403b2a3acf81" + sha256 ventura: "07b54891be06b8e8347481b0ac8c6667f895f8fde8a64ad042af1b75c89aede8" + sha256 arm64_linux: "6830278ea2393b0c1459ee6f6ee2fba6d5e99d5f37582276a11346f6b39e1b1c" + sha256 x86_64_linux: "04dfeac846d6e6714d15df10879fd6f76950a54cc52a69e952c556bd4f3230b3" + 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..9655bd8402777 --- /dev/null +++ b/Formula/r/reflex.rb @@ -0,0 +1,32 @@ +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" + + bottle do + 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, 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..d38c542e93ebe --- /dev/null +++ b/Formula/r/reg.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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, mojave: "fc74e858cf6aa00783292b40d24ddbe0597d53c0e2f04c66dbbb0f103cbb50ec" + sha256 cellar: :any_skip_relocation, high_sierra: "6c834ffc790787be203c01f7d153971f34d4c75f70245058717e4a13f0afcf79" + 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..934e92f3d2535 --- /dev/null +++ b/Formula/r/regal.rb @@ -0,0 +1,49 @@ +class Regal < Formula + desc "Linter and language server for Rego" + homepage "https://docs.styra.com/regal" + url "https://github.com/StyraInc/regal/archive/refs/tags/v0.33.1.tar.gz" + sha256 "a441bd912e7b462674f039a46d77dcbe20da0bad1eb269746e3546d05c77d7e3" + license "Apache-2.0" + head "https://github.com/StyraInc/regal.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ce4b288cc68ca5dd1b994e9939fb942931a45a34a24e9a79382c47a2b0bd7253" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3a35bac092bea0583d31e51c45847dbb60a188a0a9a9de92ed5e4cfd3c4072dc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7aad75bc3bf154d62cc4dd31783f122b6583c3aaefb60b867188bc582058cc13" + sha256 cellar: :any_skip_relocation, sonoma: "889d1339a8cae5085ea48ec0e0771269fd96e6e5280a485fcb252e608dd82638" + sha256 cellar: :any_skip_relocation, ventura: "6ebfa3c2e985b406ff866c127a16a25db15112060456085ed27777965ccdaef0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "66dc139aefda301f748840c692271b6adbe85e906d8fc67119a85d5ceac0409a" + end + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/styrainc/regal/pkg/version.Version=#{version} + -X github.com/styrainc/regal/pkg/version.Commit=#{tap.user} + -X github.com/styrainc/regal/pkg/version.Timestamp=#{time.iso8601} + -X github.com/styrainc/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..dae5eca049cdb --- /dev/null +++ b/Formula/r/regclient.rb @@ -0,0 +1,37 @@ +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.8.3.tar.gz" + sha256 "1685a36a06eba3fdd112f458149ec4561aa68e59839f5a314464037aea291731" + license "Apache-2.0" + head "https://github.com/regclient/regclient.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cab820614f821a5f6501910ca0001efb061918d6c1b56dc6811d7354a761a079" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cab820614f821a5f6501910ca0001efb061918d6c1b56dc6811d7354a761a079" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cab820614f821a5f6501910ca0001efb061918d6c1b56dc6811d7354a761a079" + sha256 cellar: :any_skip_relocation, sonoma: "94288f5c3127faf1d62c9339c5d45e730296af70312974c5f3272e411f3a2753" + sha256 cellar: :any_skip_relocation, ventura: "94288f5c3127faf1d62c9339c5d45e730296af70312974c5f3272e411f3a2753" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f54950f93431a802b9cad54bd44e0bc49c8c3bd28c691ae57495f918772a56ae" + 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..833c812c74b58 --- /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 + + bottle do + rebuild 1 + 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, mojave: "76b26dc9e766e7a8b0806660e966e3a49c593591b94d90439f89b7cbc797d019" + sha256 cellar: :any_skip_relocation, high_sierra: "0e46dec5d46b145e32ca597c00c75fea2e7097e57c5d3131be141e5bea2b96db" + sha256 cellar: :any_skip_relocation, sierra: "68b5f75c9fdb645334ae8a48a5b7e01620e19d5f103811579cb8bf96101c6ac7" + 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..7bb23e68c72a7 --- /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 "27f47cf54f67ca0df04603cce6567bc8f4682f605cfafec2d6de9d1ba96ac429" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_sequoia: "d513d8b3dd19132b2b9f10b29ee3c7e7bebb9f1c970fdbe56e52ef061b25b4d6" + sha256 arm64_sonoma: "f6305fc97baa0dbf21a313a8e02864d41b745c8c6f0cdb4a74d51e4f1e603f4e" + sha256 arm64_ventura: "e803318a602b95ecbc33d9275d1790702ebb7461595eee0c9e2cee36521c8696" + sha256 sonoma: "9557066ae878d7582c732334bedd607ff987b668db841b27f0e32c9855153d46" + sha256 ventura: "07b0fbb0fe1bbefda3db096cabf9e2db7b66cf59b57222520eb91e61972b590f" + sha256 arm64_linux: "1df3d2120fdc1f7c016aaa5001ffbbbb288cfde30d72e8ee3c25bcce5de70e9e" + sha256 x86_64_linux: "808eeafe4cb1da835f4374f9d316219b8e9dcef1c9d725b7fe446961e98403ca" + 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..e43f7e85945de --- /dev/null +++ b/Formula/r/regipy.rb @@ -0,0 +1,64 @@ +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 + sha256 cellar: :any_skip_relocation, all: "87515d59bfae829dce993714af4fc244c4e392e18617d300fc79d3ffbcd51c6a" + end + + depends_on "python@3.13" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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..1839b1122004c --- /dev/null +++ b/Formula/r/regldg.rb @@ -0,0 +1,52 @@ +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" + + bottle do + 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..4be692e8fa162 --- /dev/null +++ b/Formula/r/regula.rb @@ -0,0 +1,57 @@ +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_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, 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..b5b1609448427 --- /dev/null +++ b/Formula/r/rekor-cli.rb @@ -0,0 +1,39 @@ +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.3.10.tar.gz" + sha256 "28967aa7b3168b745f03547dd48b4be4d99b74df5a034942227a87067de29995" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "72adeb8aff63987e2fe31c48b8dc0c193264aa6c85f6524163825a8f3ae494bd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "72adeb8aff63987e2fe31c48b8dc0c193264aa6c85f6524163825a8f3ae494bd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "72adeb8aff63987e2fe31c48b8dc0c193264aa6c85f6524163825a8f3ae494bd" + sha256 cellar: :any_skip_relocation, sonoma: "d333f5e92d551acbbab84c88d69211644b89df5303c36457cc298849c5bbb807" + sha256 cellar: :any_skip_relocation, ventura: "d333f5e92d551acbbab84c88d69211644b89df5303c36457cc298849c5bbb807" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5055688e7d183eb84d4a9bc1653e7a7180bd01dd8a9df2cd76db2072047f4fa3" + 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..6d43623212993 --- /dev/null +++ b/Formula/r/release-it.rb @@ -0,0 +1,38 @@ +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.2.tgz" + sha256 "01479d1ce2790bb3cd627b30aa76a4330aa6e9e33d0c866520fc6e9d3dd68690" + license "MIT" + + livecheck do + url :homepage + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "46e2b43473116c1d1503893eeeb35f0d1e24426e514a0a2459b30556b625d309" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "46e2b43473116c1d1503893eeeb35f0d1e24426e514a0a2459b30556b625d309" + sha256 cellar: :any_skip_relocation, arm64_ventura: "46e2b43473116c1d1503893eeeb35f0d1e24426e514a0a2459b30556b625d309" + sha256 cellar: :any_skip_relocation, sonoma: "afd352d5a5a5ae9fd7925685e4245fbfe1b3ba37e6d9ff6a9497d1b84c9712eb" + sha256 cellar: :any_skip_relocation, ventura: "afd352d5a5a5ae9fd7925685e4245fbfe1b3ba37e6d9ff6a9497d1b84c9712eb" + sha256 cellar: :any_skip_relocation, arm64_linux: "46e2b43473116c1d1503893eeeb35f0d1e24426e514a0a2459b30556b625d309" + sha256 cellar: :any_skip_relocation, x86_64_linux: "46e2b43473116c1d1503893eeeb35f0d1e24426e514a0a2459b30556b625d309" + 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..1bd701198db03 --- /dev/null +++ b/Formula/r/rem.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "4226be6dc999a4467a061055cb36a68babe84a835f40f32a5a23f6137ddd59b4" + sha256 cellar: :any_skip_relocation, high_sierra: "0a3365c8653023f2b4de8c5b6243aec2de7c180d1be982adcdbe58afc159800e" + sha256 cellar: :any_skip_relocation, sierra: "326f7a21f696b7614a55a5edeb57e08482ff7b4c72506bcecff5deaa0552828e" + sha256 cellar: :any_skip_relocation, el_capitan: "c9892df4f6aa5d58097e4cc4d62388ccbb1e0c02604b1139cfe829d47d992442" + 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..8f68142538ac8 --- /dev/null +++ b/Formula/r/remake.rb @@ -0,0 +1,51 @@ +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 + + bottle do + rebuild 1 + 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..7813c77f43d45 --- /dev/null +++ b/Formula/r/remarshal.rb @@ -0,0 +1,104 @@ +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/5a/6a/5e4c74dcbd8f218235321cdaff165b14d1b9e18a033c47032244a0b2566f/remarshal-1.0.0.tar.gz" + sha256 "53edc4f65201f35001722d7a7bba405c11f05d7380cca58ecb57e7f7799cee22" + license "MIT" + head "https://github.com/remarshal-project/remarshal.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "36133f34ccbe538c63d422010e77768939074cfe71335fd3ea947c2c6eeba1e4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "418e4ea525d5368b702cee714bba65bb86d32ef995c0b112061e2fac27726a11" + sha256 cellar: :any_skip_relocation, arm64_ventura: "011215340f166d19fb4cec173aef49fd0ada1d5dd02c142df305339dfe2b4347" + sha256 cellar: :any_skip_relocation, sonoma: "71178642c769ba1c1fa752b9b8605d29ffbcf85263e66f75396ae44c83b3e021" + sha256 cellar: :any_skip_relocation, ventura: "2bc0de85e4fc381ba1f9d7e898a1ac2f4d70b1ab85dbdfa199e457bce957132b" + sha256 cellar: :any_skip_relocation, arm64_linux: "d52098858a8c1ff0822895ca22fda5ede70e855a99b2e65f26eac077c7dd106d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "af55d332e54bb507ccc4c5dcdee15c1f6a50244b4f866044f95995ea16f97bf6" + end + + depends_on "libyaml" + depends_on "python@3.13" + + conflicts_with "msgpack-tools", because: "both install 'json2msgpack' binary" + conflicts_with "toml2json", because: "both install `toml2json` binaries" + + resource "cbor2" do + url "https://files.pythonhosted.org/packages/e4/aa/ba55b47d51d27911981a18743b4d3cebfabccbb0598c09801b734cec4184/cbor2-5.6.5.tar.gz" + sha256 "b682820677ee1dbba45f7da11898d2720f92e06be36acec290867d5ebf3d7e09" + 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/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz" + sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" + 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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "rich-argparse" do + url "https://files.pythonhosted.org/packages/7f/ee/c410251ff6123d4417f2fe8e72c8628f187682b70ce34134a2a3e307a2d5/rich_argparse-1.6.0.tar.gz" + sha256 "092083c30da186f25bcdff8b1d47fdfb571288510fb051e0488a72cc3128de13" + 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 "tomlkit" do + url "https://files.pythonhosted.org/packages/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + 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 + 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..a0f26f509cb6e --- /dev/null +++ b/Formula/r/remctl.rb @@ -0,0 +1,43 @@ +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 + + bottle do + rebuild 1 + 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..823d7ae751151 --- /dev/null +++ b/Formula/r/remind.rb @@ -0,0 +1,42 @@ +class Remind < Formula + desc "Sophisticated calendar and alarm" + homepage "https://dianne.skoll.ca/projects/remind/" + url "https://dianne.skoll.ca/projects/remind/download/remind-05.03.07.tar.gz" + sha256 "d296e5dc4b10d08fbc29e3e0ced7a32abde74ba241bdcd8ba314193877c1e51d" + 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_sequoia: "88f9b83106b2d7239a3e4335b324f3f2f7426db14950ad85d798fc57af3afdb8" + sha256 arm64_sonoma: "17072d149033440ca92ef9f185833b64f322e91243f0747041cb314c9e2ebd7c" + sha256 arm64_ventura: "9221f338967213041b862ab2f32befa678b0d1e920cf45eb90fa7dac52f73174" + sha256 sonoma: "3dce30f94166410f84e74c964e0572b0886fc1622223cc32f03fb753a0db68eb" + sha256 ventura: "a9944a7eed2cb1cc66d29056cb545e46c93486017e017a9cdfd80c36983f63d4" + sha256 arm64_linux: "f2d6a2f90bccf6a2a3c8da3cc6c7f6f72e40861eb78759f53942e70922914ce8" + sha256 x86_64_linux: "9683d158c06c09809e4fad0ae321972d7cb7955d1b9aaa7a0f43114857b6e1ad" + 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..f59fba6f060af --- /dev/null +++ b/Formula/r/ren.rb @@ -0,0 +1,51 @@ +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_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, mojave: "dd045987a704bd9690e5466337f7a55105c25c98807e430c74ad4b8702f4b292" + sha256 cellar: :any_skip_relocation, high_sierra: "7cf1fe07fb7a4cd0e6171f65a8fda8187973c879b8853e416c39282527f1c0ef" + sha256 cellar: :any_skip_relocation, sierra: "bf3e11211d6884d8969fc99ccf8a42b3132dc48bd3100492a442eb5a41fdbd88" + sha256 cellar: :any_skip_relocation, el_capitan: "966876dfcc9f36c4bc3d1358a9a8500c79d9324ebd8697033571146f1e482685" + 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..2bfe53bb28bbd --- /dev/null +++ b/Formula/r/rename.rb @@ -0,0 +1,34 @@ +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" + + 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..9d39cd362b869 --- /dev/null +++ b/Formula/r/renameutils.rb @@ -0,0 +1,67 @@ +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 + + bottle do + 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 cellar: :any, mojave: "4f360267cba9842ef85e9cfbb1baaf73e9576dccfb924aade7f0ad6bbf0bf605" + sha256 cellar: :any, high_sierra: "d25dc64bcc5d30e7695c65a93f7285849b57fdbdb18bf7d5e7bc22f0786cb14c" + 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/formula-patches/85fa66a9/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..673f052331cb6 --- /dev/null +++ b/Formula/r/render.rb @@ -0,0 +1,32 @@ +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.1.4.tar.gz" + sha256 "337e0c786ae796626ffe51699d67e2a875abb65e61f55489a19e2e120bd2568e" + license "Apache-2.0" + head "https://github.com/render-oss/cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e8ef690c5923b9ecbd29e6162dd9f7964f7f20dfaf33e04f51772f78940952af" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e8ef690c5923b9ecbd29e6162dd9f7964f7f20dfaf33e04f51772f78940952af" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e8ef690c5923b9ecbd29e6162dd9f7964f7f20dfaf33e04f51772f78940952af" + sha256 cellar: :any_skip_relocation, sonoma: "092765d8863cd87864afc40dda4994e9548428babf8a6093a2ed382c01d33458" + sha256 cellar: :any_skip_relocation, ventura: "092765d8863cd87864afc40dda4994e9548428babf8a6093a2ed382c01d33458" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12e12127c0094c0a343e5ae12254a06ba7211c2a3563e248d8c5352dcdf264a4" + 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 + error_msg = "Error: run `render login` to authenticate" + assert_match error_msg, shell_output("#{bin}/render services -o json 2>&1", 1) + end +end diff --git a/Formula/r/renovate.rb b/Formula/r/renovate.rb new file mode 100644 index 0000000000000..0de06ad7e939d --- /dev/null +++ b/Formula/r/renovate.rb @@ -0,0 +1,41 @@ +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-40.12.0.tgz" + sha256 "0d0469bf8787cc3a0c77517be297d2fd08f6ff17eb781448566f5b13e1dd6ed7" + 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_sequoia: "9401e944e6328375a34f556d4f2fa9577bf6267612635274f6f999c8a07bc13a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f9ed3bfd801b17e07ce056f304492a30d5f9dbcac61a9d1c401265bcdc05c722" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c7e4e59326730a66dfe40f82a7f6569d89002c7b067059753030718e3bf4e0e1" + sha256 cellar: :any_skip_relocation, sonoma: "0a5d65470d8b00dbfad64cd44a84e930c195c4b2bc8160b1c1f230a06745a5ec" + sha256 cellar: :any_skip_relocation, ventura: "dd6a37a36da307fd6343e9209122134282853ffd74c2175db05513364ddc1a00" + sha256 cellar: :any_skip_relocation, arm64_linux: "6a17cad422369baea856f961e7ae341e07976f300070df41af335a56e3088755" + sha256 cellar: :any_skip_relocation, x86_64_linux: "809101f876a8f0d73d2559d642a53f7ed41b91fff518fe16a28ae28141e4da7c" + 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..415a2242bd63d --- /dev/null +++ b/Formula/r/reop.rb @@ -0,0 +1,61 @@ +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_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..5ffddc61451f7 --- /dev/null +++ b/Formula/r/reorder-python-imports.rb @@ -0,0 +1,34 @@ +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/ee/f3/b49e0e59cfd7c7580e20148d6dd8e39563918f4147e9a8de15d6529133a6/reorder_python_imports-3.14.0.tar.gz" + sha256 "5fc3aea31cdd9dcf9de381c79bf14a03c1e3f792450e35b48325c56599b9e039" + license "MIT" + head "https://github.com/asottile/reorder-python-imports.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "996295cdcb8ea1816cdfc2c4154773b5a06f44d94d2ac20c11475ec39fb22b08" + end + + depends_on "python@3.13" + + 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..08f2d35ba546b --- /dev/null +++ b/Formula/r/repl.rb @@ -0,0 +1,22 @@ +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" + + 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..c80be4f33e547 --- /dev/null +++ b/Formula/r/replxx.rb @@ -0,0 +1,50 @@ +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_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..7f1019df15fb7 --- /dev/null +++ b/Formula/r/repo.rb @@ -0,0 +1,31 @@ +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.54", + revision: "97dc5c1bd9527c2abe2183b16a4b7ef037dc34a7" + license "Apache-2.0" + version_scheme 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "465908accc0c909a44c700675cf9e14fd9d6e6f69bfccc02d1c19714ff7e31a0" + end + + uses_from_macos "python" + + def install + bin.install "repo" + doc.install (buildpath/"docs").children + + # Need Catalina+ for `python3`. + return if OS.mac? && MacOS.version < :catalina + + 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..8f3948f43832b --- /dev/null +++ b/Formula/r/repomix.rb @@ -0,0 +1,48 @@ +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-0.3.5.tgz" + sha256 "59572010f92af2cf03abb553e6e58754bf5f64cbf45c9ee2f304581dff0de3f9" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9098cc7d89f0e4533377e8922f56732721bac01332f1c4dd4c1f0b01d8239a4d" + sha256 cellar: :any, arm64_sonoma: "9098cc7d89f0e4533377e8922f56732721bac01332f1c4dd4c1f0b01d8239a4d" + sha256 cellar: :any, arm64_ventura: "9098cc7d89f0e4533377e8922f56732721bac01332f1c4dd4c1f0b01d8239a4d" + sha256 cellar: :any, sonoma: "e1ff9033bb637b42cd6dc0a78f56406bf8541f92e4b811321caaebb863b48255" + sha256 cellar: :any, ventura: "e1ff9033bb637b42cd6dc0a78f56406bf8541f92e4b811321caaebb863b48255" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4316baec823d6b9ad195d20a19da2e2bcde63a73885f5a783fdfba6e9735b13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c64cd8b0731ab32e9b98105c9b251b28b12ecd3bbe59e0545b4d9ca0297d578b" + 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..6fe2a0ea231da --- /dev/null +++ b/Formula/r/reposurgeon.rb @@ -0,0 +1,48 @@ +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_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, 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..23403ca0e07d2 --- /dev/null +++ b/Formula/r/repren.rb @@ -0,0 +1,31 @@ +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 + sha256 cellar: :any_skip_relocation, all: "5a82077e5896eea071dea3a44430d1061df24d3d2b0b8cb72b3a6f46ab4846d8" + end + + depends_on "python@3.13" + + 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..e7f75df391037 --- /dev/null +++ b/Formula/r/reprepro.rb @@ -0,0 +1,64 @@ +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" + + livecheck do + url "https://deb.debian.org/debian/pool/main/r/reprepro/" + regex(/href=.*?reprepro[._-]v?(\d+(?:\.\d+)+)\.orig\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "badeb1ae69e64807080d2a9a593d5195e784998e9fd7ac3c38666f90c3ac3aea" + sha256 cellar: :any, arm64_sonoma: "6ae8f574c8fbfa13776901135cf93d2764d7fc039d7ab6727c959310785769b6" + sha256 cellar: :any, arm64_ventura: "074ecc0f03f9b65eee888d3c80da0b236267cea25fdca49f6a77f25da6bbcb45" + sha256 cellar: :any, arm64_monterey: "4bd034f17d9a86c6e85173977ad58cbb2affa18678bd471b35216337be0f050f" + sha256 cellar: :any, sonoma: "4b6b3e4d96f54fefc29c8708115b720aed7af8390a11e4527a09adf7d1613512" + sha256 cellar: :any, ventura: "bb3fdf9b10d2edc35f84e82a851cb819aa1a1ba9cba1694ee98c17ef9c5a8e51" + sha256 cellar: :any, monterey: "57d484a17dd70a259e33c8f6b74abba671f6fc689fc09ef8c8c00df1ee83f271" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5afdccc0ef5e723e280503d6c8e17c089a284dce9273fd80fa9d0ee836649d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a79848562e65bd88dce7a8753728ac529fd080a20b36e40a1a58cccbc6f110f1" + 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..4aff9cff6133f --- /dev/null +++ b/Formula/r/reproc.rb @@ -0,0 +1,66 @@ +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_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..c806c8866c61a --- /dev/null +++ b/Formula/r/req.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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, 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..32ba37229e96b --- /dev/null +++ b/Formula/r/reshape.rb @@ -0,0 +1,50 @@ +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" + + bottle do + 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..fba04985a39cf --- /dev/null +++ b/Formula/r/restic.rb @@ -0,0 +1,52 @@ +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.0.tar.gz" + sha256 "fc068d7fdd80dd6a968b57128d736b8c6147aa23bcba584c925eb73832f6523e" + license "BSD-2-Clause" + head "https://github.com/restic/restic.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2c5e5f38a7c321b978414f6539399447307087b8f62ec240196cd8e7f486fb89" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c5e5f38a7c321b978414f6539399447307087b8f62ec240196cd8e7f486fb89" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2c5e5f38a7c321b978414f6539399447307087b8f62ec240196cd8e7f486fb89" + sha256 cellar: :any_skip_relocation, sonoma: "d8a80b0c01d0b542100e14c75ebcc7ea6d9690c9c113c3a043ea17559d20149e" + sha256 cellar: :any_skip_relocation, ventura: "d8a80b0c01d0b542100e14c75ebcc7ea6d9690c9c113c3a043ea17559d20149e" + sha256 cellar: :any_skip_relocation, arm64_linux: "79c6bb25ad8711d2280bc48f9bccb44fc854a03335b664b696ad919c3a60cb53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70a15fea59111ab70cdbac9fa18b5528901a2dbdf4271f08d6438f9c0f6edc80" + 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..f371c23381a21 --- /dev/null +++ b/Formula/r/restish.rb @@ -0,0 +1,35 @@ +class Restish < Formula + desc "CLI tool for interacting with REST-ish HTTP APIs" + homepage "https://rest.sh/" + url "https://github.com/danielgtaylor/restish/archive/refs/tags/v0.20.0.tar.gz" + sha256 "0aebd5eaf4b34870e40c8b94a0cc84ef65c32fde32eddae48e9529c73a31176d" + license "MIT" + head "https://github.com/danielgtaylor/restish.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "af849ab00700354c245e51554623c3ebff73e73c96d4111b27d91fd63c3a46de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af849ab00700354c245e51554623c3ebff73e73c96d4111b27d91fd63c3a46de" + sha256 cellar: :any_skip_relocation, arm64_ventura: "af849ab00700354c245e51554623c3ebff73e73c96d4111b27d91fd63c3a46de" + sha256 cellar: :any_skip_relocation, sonoma: "e095d39764cc37c5a7d04ff8f7844fe85ef49872a48d4edb10e8456aa514b47a" + sha256 cellar: :any_skip_relocation, ventura: "e095d39764cc37c5a7d04ff8f7844fe85ef49872a48d4edb10e8456aa514b47a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a5dc617d1e1861651fba58b970338a23cf9fabbba515d11b4e8a51e8898e9ec" + 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/"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..3d5d5580fd1e3 --- /dev/null +++ b/Formula/r/restview.rb @@ -0,0 +1,74 @@ +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 + sha256 cellar: :any_skip_relocation, all: "5207c409839c90c9be97716a6349e1f988af6a3ad9a74eabab636ac3f91c4c88" + end + + depends_on "python@3.13" + + resource "bleach" do + url "https://files.pythonhosted.org/packages/6d/10/77f32b088738f40d4f5be801daa5f327879eadd4562f36a2b5ab975ae571/bleach-6.1.0.tar.gz" + sha256 "0a31f1837963c41d46bbf1331b8778e1308ea0791db03cc4e7357b97cf42a8fe" + end + + 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/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "readme-renderer" do + url "https://files.pythonhosted.org/packages/15/4e/0ffa80eb3e0d0fcc0c6b901b36d4faa11c47d10b9a066fdd42f24c7e646a/readme_renderer-36.0.tar.gz" + sha256 "f71aeef9a588fcbed1f4cc001ba611370e94a0cd27c75b1140537618ec78f0a2" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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 5 + 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..1c02720c087c1 --- /dev/null +++ b/Formula/r/resty.rb @@ -0,0 +1,81 @@ +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" + + bottle do + rebuild 1 + 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..edab3c1177390 --- /dev/null +++ b/Formula/r/resvg.rb @@ -0,0 +1,77 @@ +class Resvg < Formula + desc "SVG rendering tool and library" + homepage "https://github.com/RazrFalcon/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/RazrFalcon/resvg.git", branch: "master" + + bottle do + 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..c437424b13216 --- /dev/null +++ b/Formula/r/retdec.rb @@ -0,0 +1,43 @@ +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" + + bottle do + rebuild 2 + 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 macos: :catalina + depends_on "openssl@3" + depends_on "python@3.13" + + 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 + 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..de824a1eaee7f --- /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: "next" + + bottle do + 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 + # Can use system Python 2 for older macOS. See https://rethinkdb.com/docs/build + ENV["PYTHON"] = which("python3") if !OS.mac? || MacOS.version >= :catalina + + 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..df2698efe2b1e --- /dev/null +++ b/Formula/r/retire.rb @@ -0,0 +1,27 @@ +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.2.5.tgz" + sha256 "efe906f585495df787e7bb30a3deee5fd49604051b9673a5b5d86fb122fca492" + license "Apache-2.0" + head "https://github.com/RetireJS/retire.js.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "fd05ff437a7512574133be70937a718b96d935e05f3840981fb29896e34e652f" + 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..19e4dbbf74ff1 --- /dev/null +++ b/Formula/r/retry.rb @@ -0,0 +1,42 @@ +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.5/retry-1.0.5.tar.bz2" + sha256 "68e241d10f0e2d784a165634bb2eb12b7baf0a9fd9d27c4d54315382597d892e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ba9aabeed58659b5bb810b2cc266bcce7b9bdafa7767bd553b362e1add65e062" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fab2637e747061b35b938d0ec128394c62e5c6322913ca9e36a780ac7cf7baf5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1c9090a16f0e8aec18d85a0d997c64864332cccbeb036e91144f83e418d2e24b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "43ed02da4008539afbb274d2801b3dc84b52e7a47a43fe441aed74c5ccce93c3" + sha256 cellar: :any_skip_relocation, sonoma: "ad89f09c7a64b4718979c863e1d65b8b59ce1b6ecb95d68153e9fb1aabbab9f7" + sha256 cellar: :any_skip_relocation, ventura: "3bfe43d89d31ed19cd1a822f1e359a7820598ff579428dd438c8fd0574064aba" + sha256 cellar: :any_skip_relocation, monterey: "1bdb2938fe138151ee4325b2cc8fbaa62aa294af7353b276268133c5c59706b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "6fe12ac69139e8ab6a0ef8e81df45c7064f09c150ca81089a8ccc8ec0a6c730c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08c9b562e484816df97ec9ffdb6849201f5e5958397269087f90dbc478b1e354" + 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..9bb34dc941d57 --- /dev/null +++ b/Formula/r/reuse.rb @@ -0,0 +1,100 @@ +class Reuse < Formula + include Language::Python::Virtualenv + + desc "Tool for copyright and license recommendations" + homepage "https://reuse.software/" + url "https://files.pythonhosted.org/packages/08/43/35421efe0e69823787b331362e11cc16bb697cd6f19cbed284d421615f14/reuse-5.0.2.tar.gz" + sha256 "878016ae5dd29c10bad4606d6676c12a268c12aa9fcfea66403598e16eed085c" + license all_of: [ + "GPL-3.0-or-later", + "CC-BY-SA-4.0", + "CC0-1.0", + "Apache-2.0", + ] + revision 1 + head "https://github.com/fsfe/reuse-tool.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "551212af17250b9915380deb399938ef83c9c65421f21f93cebace81a8052473" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5e79cdd016638b994ff1ed958af013f6508befc4a4156ead5cf05a31c686d386" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4a8559c7cde92a42085453e1709d560edb273cbba7727d0a4510e319aa5c4063" + sha256 cellar: :any_skip_relocation, sonoma: "fc3f9f7652314304f811bbfa6417e2167ebaa7c08efca445042db46fc202b7d4" + sha256 cellar: :any_skip_relocation, ventura: "75b6702ee1a9bb535a10b425370d71f36d1a32668f06c56fb030c6431c54d1f0" + sha256 cellar: :any_skip_relocation, arm64_linux: "1b822cf1d2915d1e29304008123e5a97049101f2604f0711c5cd92e7f86cb50a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38c32a28aaa81ffefd92812911a5ed2bcc41004e2166537aea798303804149c7" + end + + depends_on "python@3.13" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/49/7c/fdf464bcc51d23881d110abd74b512a42b3d5d376a55a831b44c603ae17f/attrs-25.1.0.tar.gz" + sha256 "1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e" + end + + resource "binaryornot" do + url "https://files.pythonhosted.org/packages/a7/fe/7ebfec74d49f97fc55cd38240c7a7d08134002b1e14be8c3897c0dd5e49b/binaryornot-0.4.4.tar.gz" + sha256 "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061" + end + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/a2/d9/b6e56a303d221fc0bdff2c775e4eef7fedd58194aa5a96fa89fb71634cc9/boolean.py-4.0.tar.gz" + sha256 "17b9a181630e43dde1851d42bef546d616d5d9b4480357514597e78b203d06e4" + end + + 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/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 "license-expression" do + url "https://files.pythonhosted.org/packages/74/6f/8709031ea6e0573e6075d24ea34507b0eb32f83f10e1420f2e34606bf0da/license_expression-30.4.1.tar.gz" + sha256 "9f02105f9e0fcecba6a85dfbbed7d94ea1c3a70cf23ddbfb5adf3438a6f6fce0" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "python-debian" do + url "https://files.pythonhosted.org/packages/ce/8d/2ebc549adf1f623d4044b108b30ff5cdac5756b0384cd9dddac63fe53eae/python-debian-0.1.49.tar.gz" + sha256 "8cf677a30dbcb4be7a99536c17e11308a827a4d22028dc59a67f6c6dd3f0f58c" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"reuse", shells: [:fish, :zsh], 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..8141cd5e79e0e --- /dev/null +++ b/Formula/r/reveal-md.rb @@ -0,0 +1,46 @@ +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_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` 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}/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..8eefc6e7b2c87 --- /dev/null +++ b/Formula/r/revive.rb @@ -0,0 +1,51 @@ +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.9.0", + revision: "57ed899d0ce6ab78ad51cb83e67d2d9d32873eb2" + license "MIT" + head "https://github.com/mgechev/revive.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3b485fda87a88873ce360319b32fcbcbd01a43251eaeeb0b86ed1df642d72241" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3b485fda87a88873ce360319b32fcbcbd01a43251eaeeb0b86ed1df642d72241" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3b485fda87a88873ce360319b32fcbcbd01a43251eaeeb0b86ed1df642d72241" + sha256 cellar: :any_skip_relocation, sonoma: "7a36bd94a2f69bdda551658a833939d562b359287756f035e946fcf9d15f65a9" + sha256 cellar: :any_skip_relocation, ventura: "7a36bd94a2f69bdda551658a833939d562b359287756f035e946fcf9d15f65a9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2be28421f2fbf5de6bfef7f6178838d19fc728a43e3521ad6f5899d7dcf8d629" + 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}" unless build.head? + + 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..4802d276e9c94 --- /dev/null +++ b/Formula/r/rex.rb @@ -0,0 +1,289 @@ +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.0.tar.gz" + sha256 "d6d9657d29527e15995c6de33d7bf1111da7860d420ac95385c1161daaea2479" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8f00580cf78183073fc1f2377f7ab2aa231b6be9479b78a9d1c29a4aaa7c458a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f00580cf78183073fc1f2377f7ab2aa231b6be9479b78a9d1c29a4aaa7c458a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "14c493b9b4c153b1a4f33e1b624d29527ea7f9aa950a64f994a958d1138cd277" + sha256 cellar: :any_skip_relocation, sonoma: "1ec0b657ca4df29ba4c341308588731d66c7b028ea536da079c1fed4663fa45d" + sha256 cellar: :any_skip_relocation, ventura: "dc84e4db07cd881c8757c6b13f96463a0beadd8dd0200f02ec31baab975310ea" + sha256 cellar: :any_skip_relocation, arm64_linux: "de2713e1304c25fa9969a881b6ee5f91a28c16383721ee2ad3700b60b94c8a36" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b27583c8426ff3a5d7eb06d61a2bcfca88283b51e6d83fbca5d1ebae4e09f5f3" + 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.68.tar.gz" + sha256 "23317e4346fe8747f0167eccd1881d6369aa71023f014cd6f846988843295906" + 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.051.tar.gz" + sha256 "74fdce35e8cd4d787bc2d4fc1d43a291b7bbced4e94dc5fc592bd81ca93a98e9" + 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.77.tar.gz" + sha256 "94a907d6b3ea8d966ef43deffd4fa31f5500142b4c00489bfd403860a5f060e4" + 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.31.tar.gz" + sha256 "b9c4d58b2614b8611ae03a95a6d60ed996f4b311ef3cd5a937b92f1825ecc564" + 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..e587ada57c349 --- /dev/null +++ b/Formula/r/rfcstrip.rb @@ -0,0 +1,29 @@ +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 + + 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..d65ff6fbb3cc2 --- /dev/null +++ b/Formula/r/rgbds.rb @@ -0,0 +1,60 @@ +class Rgbds < Formula + desc "Rednex GameBoy Development System" + homepage "https://rgbds.gbdev.io/" + url "https://github.com/gbdev/rgbds/archive/refs/tags/v0.9.2.tar.gz" + sha256 "ccba03909a9fd2067969134ef04c4165c1acffac5cd45899405214f9abd4157d" + 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_sequoia: "61f9327d50b1584d5b4b3809292b7724cfb7d82acb7a5c4d9c245f60403c61bc" + sha256 cellar: :any, arm64_sonoma: "56c1d55f4e3c04c940954e109746e636711f445fa971ef73e126a2f16713e627" + sha256 cellar: :any, arm64_ventura: "95a36a5c8b9652693eb768ecce13f5456ac0aa1debe21f363b8bf6f520903fd6" + sha256 cellar: :any, sonoma: "765ef83e85524937bb0552c7e303312512fbd1b0a1dda9ce9683cc0d3818f6dd" + sha256 cellar: :any, ventura: "b0ac3c426aec5a5610f8c6e7736b36b99d6693d8bc413cd64e443130651feb02" + sha256 cellar: :any_skip_relocation, arm64_linux: "d5b2817a166380f0cf4b80b579a0eeb761f7dc6c011a3c5f47381158bdffdb44" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6fa0e0ee6496f99733f2ecf3b871716363c3b1ae79a248c9770ac218bd92dd59" + 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/v0.5.0.tar.gz" + sha256 "c05cf86445a4bcf8718389fbe6feeaa6091b9f500ddc746a589cdeb60c7c5519" + 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/rednex/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..1eaa92e851f5c --- /dev/null +++ b/Formula/r/rgf.rb @@ -0,0 +1,54 @@ +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 + + bottle do + 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/rgxg.rb b/Formula/r/rgxg.rb new file mode 100644 index 0000000000000..6e6d7fd4d06b2 --- /dev/null +++ b/Formula/r/rgxg.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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, mojave: "b410fe9ea150e0fb52326e4f7ce6642f946098b0713c5741c64699de3f55f762" + sha256 cellar: :any, high_sierra: "286318be76fc55c094da739c44176d5babd814df1e4f0462711aea283db042f5" + 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..20c7d0ab783b9 --- /dev/null +++ b/Formula/r/rhai.rb @@ -0,0 +1,59 @@ +class Rhai < Formula + desc "Embedded scripting language for Rust" + homepage "https://rhai.rs/" + url "https://github.com/rhaiscript/rhai/archive/refs/tags/v1.21.0.tar.gz" + sha256 "11b1303830b95efe153c8fcab25628b8304b31f4c2b8ecd0791979800db19e49" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/rhaiscript/rhai.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6b13e0af55b0f0ff2c11db28b877fa24fb9b395df051a8cb406e3fbdb8c55439" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fcc91dc8b4817eb2e12ee73a317e283deb4ce9e3cdb61e10ec5f440835e89546" + sha256 cellar: :any_skip_relocation, arm64_ventura: "007a9c01d4d28fb5f1890cbd50db8da29774dfb2166924f3bc46002eca043aff" + sha256 cellar: :any_skip_relocation, sonoma: "0e9e3530ec4b005d6b144c0869754d38f02fbe9f0e0c306684a4a5aac0389a1c" + sha256 cellar: :any_skip_relocation, ventura: "fd7252baec59a484b66ff70db31eec2c15ad6ec57230b014b3dfcf8d4aa45cb9" + sha256 cellar: :any_skip_relocation, arm64_linux: "1882578806acf50e157c2727d61e92a53c9b6d92ab7245e1639f72f412627fd6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "625323d49d84a3cf9e0ea41a65b1d6d5b7bba882a55117da31e9b94bf0036a7b" + 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..28e0c16ff8022 --- /dev/null +++ b/Formula/r/rhash.rb @@ -0,0 +1,40 @@ +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_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..adf28fe6c7ecd --- /dev/null +++ b/Formula/r/rhit.rb @@ -0,0 +1,63 @@ +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_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 + + resource "homebrew-testdata" do + url "https://raw.githubusercontent.com/Canop/rhit/c78d63b/test-data/access.log" + sha256 "e9ec07d6c7267ec326aa3f28a02a8140215c2c769ac2fe51b6294152644165eb" + end + + def install + system "cargo", "install", *std_cargo_args + end + + test do + 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..1db8bb2134bf7 --- /dev/null +++ b/Formula/r/rich-cli.rb @@ -0,0 +1,84 @@ +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/ca/55/e35962573948a148a4f63416d95d25fe75feb06d9ae2f9bb35adc416f894/rich-cli-1.8.0.tar.gz" + sha256 "7f99ed213fb18c25999b644335f74d2be621a3a68593359e7fc62e95fe7e9a8a" + license "MIT" + revision 6 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c3304709ad3006fba00a93e4be5df3a01915f2e1ce0139f10a75f2b1c948e176" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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/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 "pygments" do + url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"rich", shells: [:fish, :zsh], 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..8f0d332ddf687 --- /dev/null +++ b/Formula/r/richgo.rb @@ -0,0 +1,70 @@ +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" + + bottle do + rebuild 1 + 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.com/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..fd7ac7d3b4bcd --- /dev/null +++ b/Formula/r/riemann-client.rb @@ -0,0 +1,41 @@ +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_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..209aff048129a --- /dev/null +++ b/Formula/r/riemann.rb @@ -0,0 +1,44 @@ +class Riemann < Formula + desc "Event stream processor" + homepage "https://riemann.io/" + url "https://github.com/riemann/riemann/releases/download/0.3.11/riemann-0.3.11.tar.bz2" + sha256 "074f5004e5511f1c0f47ba0165abab5cc825c79711fe837b78429586cdd95327" + license "EPL-1.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "d622887f1afb3dc67cc9a03e522516e6d20c418ad2da5eb35b24765293fabb2e" + 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..4375d99091309 --- /dev/null +++ b/Formula/r/riff.rb @@ -0,0 +1,28 @@ +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.3.10.tar.gz" + sha256 "6db6ac7525f00c4a4cb45351b9a229e253b3e9053ab365d6f881c0144159f8da" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "01d7e85273ba9610f58c2bd4b09dae43d26d14ca4fd05c70cb000333b772480c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3c87613d940e55ad55840b4d4d0d5aa2ac0814e3842bbbf1e2cb4e73213def7c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5da675d8d39eaaa590b65cc317ad1f0896d1742176d2e8873631984cdd4d6f6f" + sha256 cellar: :any_skip_relocation, sonoma: "6f06cfea66f3c4770f0994d157e4073af88f43e6756b96fecd281aef18a0c236" + sha256 cellar: :any_skip_relocation, ventura: "1ab76808760298b841530fcb9c94419ac7d39d2ac8ab665f2abf61d2f04fa2ba" + sha256 cellar: :any_skip_relocation, arm64_linux: "8d8f3764b60da68f69d536114a5cbf23423e55837f9669d00ff17da67e826ca1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4f227abf749a35a088e4b416159a682b5eddc5e156d2e49b46892a6aa394ef5" + 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..2862cf32ef322 --- /dev/null +++ b/Formula/r/rig.rb @@ -0,0 +1,54 @@ +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" + + bottle do + 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 cellar: :any_skip_relocation, mojave: "8f311170956140550544c6a9e9b31068b61c5db52fefa2c92dd0ad565c0fc145" + sha256 cellar: :any_skip_relocation, high_sierra: "770e85dcfaeec7cf4e4799572b102bf436afc9f3d28eb828ef838b5a1e1a8152" + sha256 cellar: :any_skip_relocation, sierra: "fcc18ba335af01c00a5a7e7e41f6431192393d13eb374513ebe9b0b2a75ab0a0" + sha256 cellar: :any_skip_relocation, el_capitan: "d82301a0557554e57252ea0d020f32e1d13485077c54f4d68cce01ee9d1b34a3" + 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..8a1f10b18d38c --- /dev/null +++ b/Formula/r/rinetd.rb @@ -0,0 +1,58 @@ +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 + + bottle do + 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..77c2e83b8f5f6 --- /dev/null +++ b/Formula/r/ringojs.rb @@ -0,0 +1,40 @@ +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 + + 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..f6244f5150863 --- /dev/null +++ b/Formula/r/rink.rb @@ -0,0 +1,45 @@ +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"] + + bottle do + 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.rb b/Formula/r/rio.rb new file mode 100644 index 0000000000000..e5fc84100e881 --- /dev/null +++ b/Formula/r/rio.rb @@ -0,0 +1,44 @@ +class Rio < Formula + desc "Hardware-accelerated GPU terminal emulator powered by WebGPU" + homepage "https://raphamorim.io/rio/" + url "https://github.com/raphamorim/rio/archive/refs/tags/v0.2.16.tar.gz" + sha256 "0645113a1677d4a15320b1a8705abd905ab05286113f44b3eada9a142849de20" + 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_sequoia: "60e0f7815ac005bdb04aaeda741ee0c8f8fbb36710d3f6d91064f567890bd740" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1040cd0896cafd0e9ab1000e2bd7492187ebd39f375d355024bafeed04b4db6c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "24b8a8dfc3457e66622a02e77a386b79d47cdde3a298746d78ca4d8f4707630a" + sha256 cellar: :any_skip_relocation, sonoma: "3212ba394d58f010e249d572de9200a19cce94d99bb65f4293af56ee363bd908" + sha256 cellar: :any_skip_relocation, ventura: "acfc487866381e11c305e80bfb2b1a4778422106f4e2045d3e37da155b97d305" + 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") + return if Hardware::CPU.intel? && ENV["HOMEBREW_GITHUB_ACTIONS"].present? + + # This test does pass locally for x86 but it fails for containers + # which is the case of x86 in the CI + + system bin/"rio", "-e", "touch", testpath/"testfile" + assert_path_exists testpath/"testfile" + end +end diff --git a/Formula/r/rip2.rb b/Formula/r/rip2.rb new file mode 100644 index 0000000000000..7e3acc5ef313d --- /dev/null +++ b/Formula/r/rip2.rb @@ -0,0 +1,40 @@ +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.4.tar.gz" + sha256 "e6d3143958b838ebbf421fb933d8e46ecc28c8298f435bdf09f647b4def452f6" + license "GPL-3.0-or-later" + head "https://github.com/MilesCranmer/rip2.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ae3f478f94cdd1f8ee89a203e7512d8d3aa905ed3f3269d601c928043830386" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "45581b64a085df4f559d5042f855fb06aa75f8fe81e4dc44433aa6c850dc3337" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f09b242e19dd0070ad027b4cc0adade3f0686f55c5cf3e236df7c1017acaa9d9" + sha256 cellar: :any_skip_relocation, sonoma: "241fec9cb680a7f54f5de39370bff16932810c5dbbbadfdf6b582502ecf3eef9" + sha256 cellar: :any_skip_relocation, ventura: "77367b4f04e6b99826787e7c780288eb7964958bef28e3769be6941555897773" + sha256 cellar: :any_skip_relocation, arm64_linux: "f0aadb2f2e01fc633c9514cd812e03165c6bc0b1be630c934b5582cbf9e28513" + sha256 cellar: :any_skip_relocation, x86_64_linux: "263a41b50d75bfaa94c739dec7fd55cac5ee1e73c154e4c483e1913a3fa0fadc" + 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..9dc1312314c6a --- /dev/null +++ b/Formula/r/ripgrep-all.rb @@ -0,0 +1,35 @@ +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_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..3c45c95d4a677 --- /dev/null +++ b/Formula/r/ripgrep.rb @@ -0,0 +1,42 @@ +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/14.1.1.tar.gz" + sha256 "4dad02a2f9c8c3c8d89434e47337aa654cb0e2aa50e806589132f186bf5c2b66" + 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_sequoia: "b8bf5e73c9c9b441de067ec86ac167b071ecc2078dcb1d89d2cebbb151feab35" + sha256 cellar: :any, arm64_sonoma: "47b9c3515c866b147f0e98735cab165d6471b9f28fab1ba2c57e59c43da5c10b" + sha256 cellar: :any, arm64_ventura: "e14a94e84c028ff53c1be3b106fdeb5aca4d7c893a819e7fb967e0719b946a28" + sha256 cellar: :any, arm64_monterey: "ad8dc4ab475c84e2a1e60f5b3107f52dd59e33f84a08284b19681d8b98508fd7" + sha256 cellar: :any, sonoma: "71d434eeabc2af220285b037f7264563ce9bc77a41af35eabe2213276a37ec2b" + sha256 cellar: :any, ventura: "0cdb547c696992d08c6613c40934218964f4a061b5413c4b2f013c3f0c3ed253" + sha256 cellar: :any, monterey: "2ce54302e4524ad28389aca5a16333d4193128e911de2881e6b0e953559d89cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "68b2c253fc70593e0e9b6cb5a6f63097662fcfaf1bf76d54c22e5a1e3daa6a5e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97d7cbd33b4d0ed09551e3dbc07f830d3df018c2aefbb2222a12ccfb829aae30" + 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..3dbe5faf84d71 --- /dev/null +++ b/Formula/r/ripmime.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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..6ca5333489f78 --- /dev/null +++ b/Formula/r/ripsecrets.rb @@ -0,0 +1,40 @@ +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.9.tar.gz" + sha256 "d230246a517f2c4cc9e719633b5c2fe771d7251bac25257f3b927e14fc408071" + license "MIT" + head "https://github.com/sirwart/ripsecrets.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8509e834f1ef8f9d72071ffbe9ea369f9e0806f3543848984f0ab6ccdb66c8b0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e149bd76eb597c10c6ce2ef09297ad024214b652a0f22c1e8c4e433da606e426" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bab93d34726fe470b2b110f95f344702066dfea7b81711c6267dd2608c91bd7d" + sha256 cellar: :any_skip_relocation, sonoma: "ca82959fc0f6457931e6dca1b364ff2016ee331739815452bcc75b9241028192" + sha256 cellar: :any_skip_relocation, ventura: "b0686715c0fefea8ae7c6b1a329904f90f3d522cac0a2eb80b6e9f187e4fa4d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff4ae371281630bdaf268d9d2c52cb4ea2e5dae1ee13b4ef2e1ecb94572834e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c7a44e8f93b378dede7a94716d4d494927b8226954d824107e435bf6ce24630" + 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..fd40fdea0b9f9 --- /dev/null +++ b/Formula/r/riscv64-elf-binutils.rb @@ -0,0 +1,60 @@ +class Riscv64ElfBinutils < Formula + desc "GNU Binutils for riscv64-elf cross development" + homepage "https://www.gnu.org/software/binutils/" + url "https://ftp.gnu.org/gnu/binutils/binutils-2.44.tar.bz2" + mirror "https://ftpmirror.gnu.org/binutils/binutils-2.44.tar.bz2" + sha256 "f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_sequoia: "f472f7fe69981f7d860f6f0e6e1bc78e6639226f8bc2f4e7744a9f177b079ce9" + sha256 arm64_sonoma: "c46cd7e69e1749187f014b0fbf1668c191a0424b7fd6a95c24bb2c392a0e66f7" + sha256 arm64_ventura: "cd10f00638540334c0a1c6f2f8af13360c1052075fe86489dbcbbf8407eb2eae" + sha256 sonoma: "13e059cd58a16e9b125a221b4cbe20821a52adbce5de9bb7b446de84030fb4bc" + sha256 ventura: "22a588a8a73828bdcd18a02acb9cb957264ffd69c23e1385d49ced61f5ef20ab" + sha256 arm64_linux: "4b776625620fb882bcfe1abd418e8e7af15a8bf61f3126c735fd8f0aa37b40b4" + sha256 x86_64_linux: "fbe2bc02087b1a79587039dccd73b023b597232412d3b6855c845f3f69d872ae" + 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..b13e8b9e88f55 --- /dev/null +++ b/Formula/r/riscv64-elf-gcc.rb @@ -0,0 +1,67 @@ +class Riscv64ElfGcc < Formula + desc "GNU compiler collection for riscv64-elf" + homepage "https://gcc.gnu.org/" + url "https://ftp.gnu.org/gnu/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + mirror "https://ftpmirror.gnu.org/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + sha256 "e2b09ec21660f01fecffb715e0120265216943f038d0e48a9868713e54f06cea" + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + + livecheck do + formula "gcc" + end + + bottle do + sha256 arm64_sequoia: "faa3952d432ab4c0325ed6e4669d7a011fad1cf7456ad6fe601b529f4a9ac7ef" + sha256 arm64_sonoma: "b5f6ffd04e5be4cd62bec37fa2d24a7e7e3e3a9b41eda9d110db859b0c2bafe1" + sha256 arm64_ventura: "307f3d4dc7a9463a65c413347bfcaa0c27bb54adc719607ff9e0877fbfe8aad2" + sha256 sonoma: "1936a59631f8b412803bf7638e7618059bff6cd497a897fe688c64c883542579" + sha256 ventura: "2d2bb31be008b9d808ec00d9ef7fec9012a433d6e52c5edac0e0de5501f999ce" + sha256 arm64_linux: "42d83c9e9e34493d095782edaa22aa9e88270a02bf085952d4dd2f79990304a2" + sha256 x86_64_linux: "fdf58cac64006b3e62bb182b82fb440c9b623311928818375c50f326f188fe76" + 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..b86fc6f1e8129 --- /dev/null +++ b/Formula/r/riscv64-elf-gdb.rb @@ -0,0 +1,75 @@ +class Riscv64ElfGdb < Formula + desc "GNU debugger for riscv64-elf cross development" + homepage "https://www.gnu.org/software/gdb/" + url "https://ftp.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + mirror "https://ftpmirror.gnu.org/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 + + bottle do + sha256 arm64_sequoia: "fc182c3f9b43f0706c5e38ad0cc227b5a0462f413b3e7975137baafcbf9f75bb" + sha256 arm64_sonoma: "0e376f70fab060eb7a19ea146565b21f25c39fad626b9345f16ba541f98b7e05" + sha256 arm64_ventura: "c6289ed531b09195c7288e49bdd5ea128b7b95d0c28b15408a8a24041dbdc748" + sha256 sonoma: "67fbc5381005c1223d1c3bdd444f7114c748448913a81daa57db9d27df947b1b" + sha256 ventura: "efcdc16f939bad13162938caf972b390bbd62be3f5888af79bf0062d6f87adfb" + sha256 arm64_linux: "1cec187ec64758bdacd6fb7707fbc7851a70efcbe6ba3f42881c0889d19b710e" + sha256 x86_64_linux: "8bf342fa7ae748f0917c42d37db64a0b44e7f2f5c867898f975b93928bd3c292" + end + + depends_on "riscv64-elf-gcc" => :test + depends_on "gmp" + depends_on "mpfr" + depends_on "python@3.13" + depends_on "xz" # required for lzma support + + uses_from_macos "expat", since: :sequoia # minimum macOS due to python + uses_from_macos "ncurses" + 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} + --with-lzma + --with-python=#{which("python3.13")} + --with-system-zlib + --disable-binutils + ] + + 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..8488978e7143f --- /dev/null +++ b/Formula/r/risor.rb @@ -0,0 +1,43 @@ +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_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..e852c00e6cf9f --- /dev/null +++ b/Formula/r/river.rb @@ -0,0 +1,54 @@ +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_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..e360bf2bff5f7 --- /dev/null +++ b/Formula/r/rizin.rb @@ -0,0 +1,83 @@ +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_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..aad906c60cf8f --- /dev/null +++ b/Formula/r/rke.rb @@ -0,0 +1,39 @@ +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.3.tar.gz" + sha256 "788957a4d7728824b0785aed5fbf5ee79c0997af741612bca4152b4907247797" + 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_sequoia: "45e7cd746615dcc044210e07140f47d25275bd4906f986f68d48348a8e749aee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "82cc014aa995a580a3f67ce8e4b2b8c8df5a0b128269d85415ce7b2c712016ab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bb0fdaf6bf164468cf5163343d5bec05424ed75d97d1c4f6d4b6f7f857949599" + sha256 cellar: :any_skip_relocation, sonoma: "b8bf4011c6959df445afcec7eb00177e3042604649087af9651873f812a7952b" + sha256 cellar: :any_skip_relocation, ventura: "51f6b268683ec88e5ab3249c1d019b49e5923ecf570f8344bbafece7aa829f48" + sha256 cellar: :any_skip_relocation, arm64_linux: "df98acb72efe59338ffa3d8a61c64072c2fb58f20f83afc8645bf8f20f137ff6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "adeef60bb701f2845e6a64ff9b17d51e90168e7b479ab71c85e6681258445c1d" + 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..4faf69a2931bc --- /dev/null +++ b/Formula/r/rkflashtool.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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, mojave: "192628d1c348870f6ea1bc381aeb87023cc0bd19b2c198ea3c14b63e954db88e" + sha256 cellar: :any, high_sierra: "72e99558b94cd4e26a5aeb62209c99e03f8e91059fbfbe83bdfbd755fc83f54f" + sha256 cellar: :any, sierra: "cbeb2509bcd210026250c915a9909e8f056e9e2da1f599d7a611695c334f4966" + sha256 cellar: :any, el_capitan: "7a8b5c66395b179ce38845c36369b1a65c6eacc73fd29227809597257669af6d" + 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..7f04f15220095 --- /dev/null +++ b/Formula/r/rkhunter.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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, mojave: "a174d252c029e7336a559e44e5ea7139c943addee52cf11fd1fd4c03d564cf52" + sha256 cellar: :any_skip_relocation, high_sierra: "35df7b4e420968fc71fc0fc0217716393c624594ff51245c80a969a5bb1569eb" + sha256 cellar: :any_skip_relocation, sierra: "8d00f31cf5150d841b22dd3c1cdda33dc8705075529f000d41678d05cb733e0f" + sha256 cellar: :any_skip_relocation, el_capitan: "1aca76cf8e890112cad63d353ca8369e301e0e990e5380bb5fc4236ded810147" + 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..7d68e7565b435 --- /dev/null +++ b/Formula/r/rlog.rb @@ -0,0 +1,93 @@ +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" + + bottle do + 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, mojave: "4ceb686581d1dad40fbbd4dec3d26205f56d9c25179ca4880158a06c2895f197" + sha256 cellar: :any, high_sierra: "5d85e13db4c6dd2892d136a96af4ac46d72254a39b842559ac9a4f9f3841af3e" + sha256 cellar: :any, sierra: "51f6586bcfa2235a19b311189ca63431c596c689c7b014850e4a0cef2275074e" + sha256 cellar: :any, el_capitan: "c95d8998639fd75131f923191eaa857bc3ff8f33ee64ca3b5d459ac1979e6fa2" + 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..18c991e4cff66 --- /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.46.2.tar.gz" + sha256 "9abb0a0dc19e85794d9b8e72e480530563eb4ee1bf243e87c0e0dd05ea4a2f09" + license "GPL-2.0-or-later" + head "https://github.com/hanslub42/rlwrap.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "906fd4f2ac755fb709b34489cfbbfaf5fca3ae746d264f5f3348105721c9a367" + sha256 arm64_sonoma: "587dddf6ead7b200929b507550c2b1e1ad309f8fad2d979a15af7a572cab22c3" + sha256 arm64_ventura: "f447017ce6f993fffbb881bdeb5c82de9c3fd172f3732240ba3b13e0a1a47505" + sha256 sonoma: "7e552c35f02259d75f68e98086d02374a2f5165eba4cc96ea15ec3e072a70ef5" + sha256 ventura: "a9c4c978ab08e6cdafbf80ee9c1298c84ca24bb05587f80574ddc69992a15d19" + sha256 arm64_linux: "1af86f576186eff68c58e5b598439bd7b13767dd359084eb87f12bdf4bd024a4" + sha256 x86_64_linux: "172eba8bec2d2771dbaa277417b499c878fdc8dcd0c71957f89489d794f70832" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + 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..35bed2e415064 --- /dev/null +++ b/Formula/r/rm-improved.rb @@ -0,0 +1,53 @@ +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 + + bottle do + rebuild 1 + 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..423bb9d2bf042 --- /dev/null +++ b/Formula/r/rmate.rb @@ -0,0 +1,23 @@ +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" + + 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..ec49827077547 --- /dev/null +++ b/Formula/r/rmcast.rb @@ -0,0 +1,46 @@ +class Rmcast < Formula + desc "IP Multicast library" + homepage "https://www.land.ufrj.br/tools/rmcast/rmcast.html" + url "https://www.land.ufrj.br/tools/rmcast/download/rmcast-2.0.0.tar.gz" + sha256 "79ccbdbe4a299fd122521574eaf9b3e2d524dd5e074d9bc3eb521f1d934a59b1" + license "QPL-1.0" + + livecheck do + url :homepage + regex(/href=.*?rmcast[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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, mojave: "37226d25db0ae3fe7491c530e1f382b869d134d7e38a851acfbe13cb308f7c1d" + sha256 cellar: :any, high_sierra: "d30e495d583d02a5ea74cd7ec82d1bd67b62981248d853ce7138a7997f6b6ed2" + sha256 cellar: :any, sierra: "9ef73c5d52886029cd89d829cdceccca0d03bce0dc72647d8cce6704d492f080" + sha256 cellar: :any, el_capitan: "4fe0a1745659bb99748972c2fa0640e6b864e92739ba192a89ed12c0614b1372" + sha256 cellar: :any_skip_relocation, arm64_linux: "d9f0ff68c1fcb1dabf6fad88d8987d71bea9d26634fdb94b2611149af01fa967" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ecbaa8a68d7cb766021fb1f1bff97c911a5e16720508cf71648c6e96a2b93c4f" + end + + 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..442355beba721 --- /dev/null +++ b/Formula/r/rmlint.rb @@ -0,0 +1,55 @@ +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_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/rmtrash.rb b/Formula/r/rmtrash.rb new file mode 100644 index 0000000000000..067707424aefb --- /dev/null +++ b/Formula/r/rmtrash.rb @@ -0,0 +1,30 @@ +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" + + bottle do + 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..9f2cde49a6b93 --- /dev/null +++ b/Formula/r/rmw.rb @@ -0,0 +1,49 @@ +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_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/rnr.rb b/Formula/r/rnr.rb new file mode 100644 index 0000000000000..3852776d62b64 --- /dev/null +++ b/Formula/r/rnr.rb @@ -0,0 +1,41 @@ +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_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..0a08b0bada8cd --- /dev/null +++ b/Formula/r/rnv.rb @@ -0,0 +1,36 @@ +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" + license "BSD-3-Clause" + + bottle do + 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, mojave: "06a2cb705d679da7de638434f45e28764dcd448863d31f6b39ab090dfde4c04f" + sha256 cellar: :any, high_sierra: "9bf4571824c6d8e837cfcad7ac5e16c6bfc120d4638f0428cdfb8f14203b8c41" + sha256 cellar: :any, sierra: "8dd3263bb656dcca22605b12faf4c6f54d65e5040e58a7a464c85b69ca19dc99" + sha256 cellar: :any, el_capitan: "1c1aa519b786f842b39720e33900e92a2f2f8deef403755e79e2d3b518897ff1" + sha256 cellar: :any_skip_relocation, arm64_linux: "607237d06383c7a8da2bfa731d52f960d9a9a35ccd465dfee6fcddc485e42d92" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3368e22e32650a6594df96320a449717d447a25d69a8485c907f1e0d10a1c49d" + 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/r/roadrunner.rb b/Formula/r/roadrunner.rb new file mode 100644 index 0000000000000..2003e4648e7b6 --- /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.1.tar.gz" + sha256 "f0469f753b5f968254a696e52f7a0fc7e41d806d71fd53e2eda3d2c25697da20" + license "MIT" + head "https://github.com/roadrunner-server/roadrunner.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e29e079c1f8714dbf759ff598db0f888b6547d9faa11b83d995c885f201ee919" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0ab5493ff6e37044e54637b5bb8462b848e6e4585605e49d14a6e5921ac69c10" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bb4a21273fb432a40498a52f00031df0c46d376f19573835facbd9c832ee1edd" + sha256 cellar: :any_skip_relocation, sonoma: "6af83771144e6080c1003ddfb1ddc5d6dc466691c73bd6f88f4384897a7a352e" + sha256 cellar: :any_skip_relocation, ventura: "c84e57d6688d43869620911fdf16a28b0afc1d50628961b2365fbf58f52aa3e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0cb677fa4a4ca97aeed1c124fb56f5680051398c5a027f1729d2dece43290acc" + 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..d7cf726d68361 --- /dev/null +++ b/Formula/r/roapi.rb @@ -0,0 +1,49 @@ +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.4.tar.gz" + sha256 "93eaccd70b7b21d0d8f349d6ad594761b8c4ecba884c7106cfefa37d86e3649c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4b120ba55e3cae8c3b3979b6a4d899dc07fe831cbd1d81ea5bcd06f455e14e10" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1eaf36297f5273f3465dd39b7441e2d4b17048116d2034e2644d642c06c70da3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3f27bf73c7209c9f00134bbf49a26a20fef0ae6a2e4c2902519117e6c15b9ff9" + sha256 cellar: :any_skip_relocation, sonoma: "f4f39cfc03ef9f4bfe2bd2c3ab2669039927f3febd15ad78bb9c5fd782cd978b" + sha256 cellar: :any_skip_relocation, ventura: "a09c14307b47d74173190e59281ec75b837c7331a7682e9990ad0f5398930f4d" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff9471f171c21d2db112488f7cd9656ab2ca1bcd6bb31c6c878cd18de3e8513b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "83c065cae70543fd020625fda6651e1a2dc3ab1e622db72ebf978d23b986fb57" + end + + depends_on "rust" => :build + + 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..4d53a15c060f3 --- /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.0.tar.gz" + sha256 "7930dbf9634acfc02686d87f615c0f4f33135948130b8922331c16d90a03250c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "dee759da00096cb14d4f6d2777261224091f9a811d94c6a56323ffee76b7c066" + 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..c4f2c0c0dcfe9 --- /dev/null +++ b/Formula/r/robodoc.rb @@ -0,0 +1,50 @@ +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 + + bottle do + rebuild 1 + 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..4939736c4921c --- /dev/null +++ b/Formula/r/robot-framework.rb @@ -0,0 +1,187 @@ +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/01/55/e6decd3155929c1ae0156df0219c991377b6e1c19b7c4a2ef88560069724/robotframework-7.2.2.tar.gz" + sha256 "9c420f6d35e9c8cd4b75b77cc78e36407604534ec4ab0cbddf699d7c0b2fc435" + license "Apache-2.0" + head "https://github.com/robotframework/robotframework.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3558e5aaabafce0cae2f67c9acb79c016c383f8feb42a5e48939f20e3e970f96" + sha256 cellar: :any, arm64_sonoma: "5c45c44f12732699e6305d4210545dac2871f08db082459333aa9894ca09e51f" + sha256 cellar: :any, arm64_ventura: "c3f4ac2aa46986aaae2d1d31691a3d345cff5680223fc787495c8600f1d4451c" + sha256 cellar: :any, sonoma: "b2e65446ff92261be1a0568c8e5aa2e3a9274a8ae5a90b3dd793abfd67300ee5" + sha256 cellar: :any, ventura: "2a29e73d22fbdeb146dadca4b0a15673febbc99ae5242bb2523f44cd208ab514" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b42ed0ebc90dd1569734e11eb7de10b2a6646554f281f724c415161e5cf33ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e22eb6fe4c7fba6c267182ae133fcfee19bf51350f8c543b79baffa0b29f2ba" + end + + depends_on "rust" => :build # for bcrypt + depends_on "certifi" + depends_on "cryptography" + depends_on "libsodium" # for pynacl + depends_on "python@3.13" + + uses_from_macos "zlib" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/49/7c/fdf464bcc51d23881d110abd74b512a42b3d5d376a55a831b44c603ae17f/attrs-25.1.0.tar.gz" + sha256 "1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/56/8c/dd696962612e4cd83c40a9e6b3db77bfe65a830f4b9af44098708584686c/bcrypt-4.2.1.tar.gz" + sha256 "6765386e3ab87f569b276988742039baab087b2cdb01e809d74e74503c2faafe" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/f5/38/3af3d3633a34a3316095b39c8e8fb4853a28a536e55d347bd8d8e9a14b03/h11-0.14.0.tar.gz" + sha256 "8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d" + 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 "paramiko" do + url "https://files.pythonhosted.org/packages/7d/15/ad6ce226e8138315f2451c2aeea985bf35ee910afb477bae7477dc3a8f3b/paramiko-3.5.1.tar.gz" + sha256 "b2c665bc45b2b215bd7d7f039901b14b067da00f3a11e6640995fd58f2664822" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + 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/28/a6/e955df90bf956d13b8a700ab7e09461b96ffd7c8e27e068d6a44a7e86dd4/robotframework_seleniumlibrary-6.7.0.tar.gz" + sha256 "9def0f81d5437604f5f3c3ff6b328fcb3dac888547d39bbb8624440d55114285" + 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/88/38/d62d4e8da649ad699b02eb1e95c3cfc20ff400744b9417b9093c5daebd4b/selenium-4.28.1.tar.gz" + sha256 "0072d08670d7ec32db901bd0107695a330cecac9f196e3afb3fa8163026e022a" + + # Backport fix to build from source distribution + # Ref: https://github.com/SeleniumHQ/selenium/commit/9cb1db9392fec6c9b4c617763ed2ee76ed989c5e + patch :DATA + 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/b3/73/57efab729506a8d4b89814f1e356ec8f3369de0ed4fd7e7616974d09646d/trio-0.28.0.tar.gz" + sha256 "4e547896fe9e8a5658e54e4c7c5fa1db748cbbbaa7c965e7d40505b928c73c05" + end + + resource "trio-websocket" do + url "https://files.pythonhosted.org/packages/dd/36/abad2385853077424a11b818d9fd8350d249d9e31d583cb9c11cd4c85eda/trio-websocket-0.11.1.tar.gz" + sha256 "18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + 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/e6/30/fba0d96b4b5fbf5948ed3f4681f7da2f9f64512e1d303f94b4cc174c24a5/websocket_client-1.8.0.tar.gz" + sha256 "3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da" + 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 + +__END__ +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -43,9 +43,6 @@ exclude = ["test*"] + namespaces = true + # include-package-data is `true` by default in pyproject.toml + +-[[tool.setuptools-rust.ext-modules]] +-target = "selenium.webdriver.common.selenium-manager" +- + [[tool.setuptools-rust.bins]] + target = "selenium.webdriver.common.selenium-manager" + diff --git a/Formula/r/robotfindskitten.rb b/Formula/r/robotfindskitten.rb new file mode 100644 index 0000000000000..2c91dbd835fc9 --- /dev/null +++ b/Formula/r/robotfindskitten.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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 mojave: "8b25c148f43ad7c70d43810639b7c812cbd612b347386be3f7e913b4d0cc14b5" + sha256 high_sierra: "9c6b045c69a6ff5e74f4f184ec109d3bfd293c7dab223e87ba80e7bb150e8dae" + 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..d9d7357f388d9 --- /dev/null +++ b/Formula/r/rocksdb.rb @@ -0,0 +1,106 @@ +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.2.1.tar.gz" + sha256 "d1ddfd3551e649f7e2d180d5a6a006d90cfde56dcfe1e548c58d95b7f1c87049" + 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_sequoia: "074e5716d66bf92a47427fa9122783753547675413ada2616a5a8ade73a85472" + sha256 cellar: :any, arm64_sonoma: "fce848218a5d5bd4b188065c61e5960310a5081706a93b1c582051c2efdc6b4b" + sha256 cellar: :any, arm64_ventura: "32e402bfd89f43f7160fdf195ae8987086214a502d7af223f45b309de4319572" + sha256 cellar: :any, sonoma: "cffdfb44c20a2fb9a84e13c322f4024c27627c9fc57a334b8b68958d44c4d3af" + sha256 cellar: :any, ventura: "e58199c8dba8c8dd3f5ecd0411c499ecfb0d6afd4fa0805a2cfd8d6d7762c9e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "8e1b243bf695a7e811f2f21be48e7b4504c2a3f05b7691d27e657c199416b78e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7758f14b95397f11d5170dfefe17823bbdb2c46d9926d2f19b3270ff7a8d637c" + 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" + + 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++17", + *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 --file=", 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/rofi.rb b/Formula/r/rofi.rb new file mode 100644 index 0000000000000..4eca9ffabe63a --- /dev/null +++ b/Formula/r/rofi.rb @@ -0,0 +1,58 @@ +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/1.7.8/rofi-1.7.8.tar.gz" + sha256 "469fba08ad99f286a4a8c65f857c9f66c07e7b9a3496ac1fe3dcd856f3c687d3" + license "MIT" + head "https://github.com/davatorium/rofi.git", branch: "next" + + bottle do + sha256 arm64_sequoia: "9145e5c0e10e0ad16f63c39596fca4cbbc268f2163764242b1983ccc74beb819" + sha256 arm64_sonoma: "6fc2c12f38a607c36dcea8cb40e1ad8e6bedebe32f6e027ffc1d7db4128a2590" + sha256 arm64_ventura: "4521374727e53f0da2f4956fecf809d1f3a3bc6fd7f9bbd8fa731d2c105ffd5b" + sha256 sonoma: "d0e422907890194f159c82e5877b4b4a7df6993de3c778fcd2d96cca62e6b7f9" + sha256 ventura: "d5825c1f770c36b0de8c90fba3c68eb2ec1fe8b2a62e6d5d1d75f908f5918e36" + sha256 arm64_linux: "7fdfa7e381f332b98daf951e158ce891cec5468a158e2388523b8619c0868c99" + sha256 x86_64_linux: "132a7447727b17fdc5983bfeaa2317458d65d4146c6c4624588af2724b502f15" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "check" => :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 "bison" => :build + uses_from_macos "flex" => :build + + on_macos do + depends_on "xcb-util-keysyms" + end + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + + mkdir "build" do + system "../configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end + 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..734e0fa880f3b --- /dev/null +++ b/Formula/r/rofs-filtered.rb @@ -0,0 +1,27 @@ +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" + + 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..727f1ff115b9e --- /dev/null +++ b/Formula/r/rogcat.rb @@ -0,0 +1,48 @@ +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_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..ad66c48d9ef0f --- /dev/null +++ b/Formula/r/rogue.rb @@ -0,0 +1,66 @@ +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 + + bottle do + rebuild 2 + 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, mojave: "7a7a380bb29967b8e795aa2407e8f205752b93952082491e20fff84394819294" + 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..3bbef024109a9 --- /dev/null +++ b/Formula/r/rojo.rb @@ -0,0 +1,39 @@ +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.5.1", + revision: "b2c4f550ee73985df05e5cca2595ff3d285d37ea" + license "MPL-2.0" + head "https://github.com/rojo-rbx/rojo.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "037768a1eca693218a58a335c29ec37d422b2b6b93d937cbec8e4beae26b5427" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "297641291ed8411808105c23187d9e7041d5b1932f6f0f005b1238c4adedd607" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f4dc7549fc4c5457011ae775846ad419cbc7345bbc80e0aa0944f2c9e4175952" + sha256 cellar: :any_skip_relocation, sonoma: "902353caa2688965ac93fce1fb0257ff4153b2b89a752a833ecaf634b11ff8ab" + sha256 cellar: :any_skip_relocation, ventura: "e63a9354cc43e1ee5ad740d8289d04ead4c404ec8353bf62044cdabd130f3c0d" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ad928d24b8478be1818222f9cabdaecb84a4a6b96ddd60cd18011b3b81bfbb7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4f9098f318c9d9d844b64aa223b69fca4c306fee098cc24ab97f4b2f66aa3203" + 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/roll.rb b/Formula/r/roll.rb new file mode 100644 index 0000000000000..463a4bd2226f6 --- /dev/null +++ b/Formula/r/roll.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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..f8709ff047143 --- /dev/null +++ b/Formula/r/rolldice.rb @@ -0,0 +1,47 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f0b8ac560f934b0d4559fc18471a9fabba189ee9d41e050c03b88c6e56490054" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d805d84d6f2e3083c040c4e3c650009d34516e949c351e1d85a5906faa2c017" + sha256 cellar: :any_skip_relocation, arm64_ventura: "adeb468985368ac97a5e5e16a8276ca39a7c87f9615dbab892298e74d3d0f018" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2fa79795244358b512e08fddb6cc86a27029ce8f14038130ab7fc33b84724f43" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1feb7522fecad653acb8a6d91152475486f1fa0f19107df1086c7674074a6870" + sha256 cellar: :any_skip_relocation, sonoma: "b241b74db5c976f271a7e32ce87054d1c74ac488e258bd0b152ccd173e544412" + sha256 cellar: :any_skip_relocation, ventura: "3f3fa0150cb26cb71c0df08c79226e1258e738eb6c3f965a491d3e649dbf2b4f" + sha256 cellar: :any_skip_relocation, monterey: "66ee3760def3920ddbeb564ed32f772fe12538c5db6124c7ebd56ef1a82eed97" + sha256 cellar: :any_skip_relocation, big_sur: "65289049d189acb12af84edb62fb1fb5b0e8faa55931176aa4430d4442e28cdb" + sha256 cellar: :any_skip_relocation, catalina: "a3fec25c1ccaf264a80a81f276aabf54cea670f3e88a48a40c7ffa9c7942bad4" + sha256 cellar: :any_skip_relocation, mojave: "eb32f285b1ba6a4ce42e22d4c636aac91f9f899e0a5e6355200f14d7f0ccc990" + sha256 cellar: :any_skip_relocation, high_sierra: "74364058c7f8859e71b5b43b80b40c01dd99ce6b80724ef4e97f9a9ea0587775" + sha256 cellar: :any_skip_relocation, sierra: "a7019dfc0a37c4cb814f8d116140b9fac999d6d97e6650e0806c02cb633087fb" + sha256 cellar: :any_skip_relocation, el_capitan: "3ee6afe89723d119075feffe735f4b4d4552d51bab5d79df6b8e100f90d21109" + sha256 cellar: :any_skip_relocation, arm64_linux: "f9367e489792cd6941e69ab7633fc40c8b6c5c964dd02b0e6f90d592eef26656" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c528a9c75ae75ef5bf9c28db1b40cd8e30fee54029580bbd05c7b5cbc8449936" + end + + on_linux do + depends_on "readline" + end + + # 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 + 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..2de4c2d7b6a24 --- /dev/null +++ b/Formula/r/rollup.rb @@ -0,0 +1,51 @@ +class Rollup < Formula + desc "Next-generation ES module bundler" + homepage "https://rollupjs.org/" + url "https://registry.npmjs.org/rollup/-/rollup-4.40.2.tgz" + sha256 "23316e7c4057b4a823809a81dceee139d03cebf5995f766096e88e8f12619275" + license all_of: ["ISC", "MIT"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "48de94f8820c454d8e3d8946107052b301c87f9f42a5c9ad9c2c7f83d7b1bacd" + sha256 cellar: :any, arm64_sonoma: "48de94f8820c454d8e3d8946107052b301c87f9f42a5c9ad9c2c7f83d7b1bacd" + sha256 cellar: :any, arm64_ventura: "48de94f8820c454d8e3d8946107052b301c87f9f42a5c9ad9c2c7f83d7b1bacd" + sha256 cellar: :any, sonoma: "c168b0d87a7cd961026b71adf454a26b219b0a85353ea1fb017f73ea6aba97d6" + sha256 cellar: :any, ventura: "c168b0d87a7cd961026b71adf454a26b219b0a85353ea1fb017f73ea6aba97d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "bffbb8c393fcdca6993e10dc737e49f3cce41fdcbaea133f76e24ad240e7c27f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "053933b13fb84e4ded3e67a7bc376a5b89d60eed5c39a79d7c95065a21584aae" + 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..712d92938af6b --- /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/mame0277.tar.gz" + version "0.277" + sha256 "60055b19fc96306927257c5ffc265ecebcbe5c944cf98113d4d78f6304556c67" + license "GPL-2.0-or-later" + head "https://github.com/mamedev/mame.git", branch: "master" + + livecheck do + formula "mame" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "bd78e16ae965b563b274495eeac4cb0361e68778874d5c5a9616ac4fb1c925d7" + sha256 cellar: :any, arm64_sonoma: "42a638be8c1f2e9b67f9866af6d4fc6bd588978a833db96f999a6214fb4c0575" + sha256 cellar: :any, arm64_ventura: "42c3ff0e18501b365d26a7ae495ad1fbe55ee9413086a734be7255325d2f3fd6" + sha256 cellar: :any, sonoma: "20ee2c9b36b8d0305535b160f9e579c0030c4f47a5d44c7ac8a81babd731091c" + sha256 cellar: :any, ventura: "05bc9c5b586a1fecd3243ee3e305ff0dd37c1e01985e6962997aad0ae00bb423" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2023d41afb0306cdd7b8457ed3d537ac14fddc97b7525465808aaf248a4916b0" + end + + depends_on "asio" => :build + depends_on "pkgconf" => :build + depends_on "flac" + # Need C++ compiler and standard library support C++17. + depends_on macos: :high_sierra + depends_on "sdl2" + depends_on "utf8proc" + depends_on "zstd" + + uses_from_macos "python" => :build, since: :catalina + 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 "qt" => :build + depends_on "sdl2_ttf" => :build + end + + def install + ENV["QT_HOME"] = Formula["qt"].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/rome.rb b/Formula/r/rome.rb new file mode 100644 index 0000000000000..f014a60914ba1 --- /dev/null +++ b/Formula/r/rome.rb @@ -0,0 +1,47 @@ +class Rome < Formula + desc "Carthage cache for S3, Minio, Ceph, Google Storage, Artifactory and many others" + homepage "https://github.com/tmspzz/Rome" + url "https://github.com/tmspzz/Rome/archive/refs/tags/v0.24.0.65.tar.gz" + sha256 "7aee4de208a78208559d6a9ad17788d70f62cace4ff2435b3e817a3e03efdef6" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_monterey: "c9c0cf36af6dfeb99b33b910bf3afbbed3d6dda0ac362be1b8e39dcc690207a1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "67c36d2034fc1266cb59bf8b853a12dca76166f0366b7b7dbc0d8021922a727c" + sha256 cellar: :any_skip_relocation, ventura: "fa13bccb05a85ef64ba51045f2667774ef972a0f5b91f560cc141ed84a4015d0" + sha256 cellar: :any_skip_relocation, monterey: "da6813f56ae217251785dedcdb0683b9ce29d4fd124ec9eb43ec1f296f56e663" + sha256 cellar: :any_skip_relocation, big_sur: "46ad491ba6f8cd906a93890a4389628ef8b774bd3e4a6174c40d324ba25e72dc" + sha256 cellar: :any_skip_relocation, catalina: "135212529c003247ae4ac695a19e5658ae704ee1c1c0dc8131d6b776fa163233" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2a60357d041aa0c5547afc0cd0ea6bc9d2933d0db3ce3bfaeb6607c9b664f0e4" + end + + # https://github.com/tmspzz/Rome/issues/262 + # Original deprecation date: 2023-10-01 + disable! date: "2024-07-26", because: :does_not_build + + depends_on "cabal-install" => :build + depends_on "ghc@8.10" => :build + + uses_from_macos "zlib" + + def install + system "cabal", "v2-update" + system "cabal", "v2-install", *std_cabal_v2_args + end + + test do + (testpath/"Romefile").write <<~EOS + cache: + local: ~/Library/Caches/Rome + EOS + system "git", "init" + system "git", "config", "user.name", "BrewTestBot" + system "git", "config", "user.email", "BrewTestBot@test.com" + system "git", "add", "Romefile" + system "git", "commit", "-m", "test" + (testpath/"Cartfile.resolved").write <<~EOS + github "realm/realm-swift" "v10.20.2" + EOS + assert_match "realm-swift v10.20.2", shell_output("#{bin}/rome list") + end +end diff --git a/Formula/r/ronn-ng.rb b/Formula/r/ronn-ng.rb new file mode 100644 index 0000000000000..3dab980e19e0e --- /dev/null +++ b/Formula/r/ronn-ng.rb @@ -0,0 +1,47 @@ +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_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..70c3da9391bac --- /dev/null +++ b/Formula/r/ronn.rb @@ -0,0 +1,63 @@ +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 + + bottle do + 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..0df3af3644723 --- /dev/null +++ b/Formula/r/root.rb @@ -0,0 +1,234 @@ +class Root < Formula + desc "Analyzing petabytes of data, scientifically" + homepage "https://root.cern/" + url "https://root.cern/download/root_v6.34.08.source.tar.gz" + sha256 "806045b156de03fe8f5661a670eab877f2e4d2da6c234dc3e31e98e2d7d96fe8" + license "LGPL-2.1-or-later" + revision 1 + head "https://github.com/root-project/root.git", branch: "master" + + 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 + sha256 arm64_sequoia: "f46a695e06f2e4c05ede2c921f7240ba752169da241ecbcf8f115bd9a48f160d" + sha256 arm64_sonoma: "d8623c949053b3b43a86726e90905609ceaf9a2f4229a9b612e32f2f44558409" + sha256 arm64_ventura: "a2dba4a7ab0688cbea5a194e8c57a195a354b6e0296fb640a51cca2438d84073" + sha256 sonoma: "88a286786a1ec92b7f23298d7581fba2d71548940d65d88891c0a55265224ddb" + sha256 ventura: "b806bb2a566e9692c4c9316acd7dded9e5816ce15a54f87a3a47124162c7939a" + sha256 arm64_linux: "a2d95824af6ba1c333eae94ff69f364892aa8b270abfee5bc5809da5e9785c44" + sha256 x86_64_linux: "fadc571765a24452c4ec7ae645c26185da731ee68b89c8f9d364b199096007a2" + 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 "pcre" + depends_on "pcre2" + depends_on "python@3.13" + 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.13" + 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 diff --git a/Formula/r/rosa-cli.rb b/Formula/r/rosa-cli.rb new file mode 100644 index 0000000000000..bee56b9fb92ff --- /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.53.tar.gz" + sha256 "4352b72f94d22d3a29aa20b4793c19472ca3c1ba1c689676bb37f8c7a453ecf6" + 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_sequoia: "e9796c06d7d1710c41b9b140b944baedf306184b6957e0ba0743dbd343038f51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a10c1b00979c0ddc77a0f4d71f752a4a6bc008ff7c7892ce5c87390c01d78795" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f8c745e93305763691ec054ec9c265d93d8a0d88b2753d86f55daa8a7535411d" + sha256 cellar: :any_skip_relocation, sonoma: "c4144c78301080388ca575123c69ebd7f482ac4c38916aabe83ee5a7cd811da4" + sha256 cellar: :any_skip_relocation, ventura: "1a1fef6f4d55fa55e3e65271f4deaec59749a64ab8bee65f93c0a7cc6ffeab6b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "639d242acb3115c00b14cfcfc3f21985ee91507d60f5168c2c4c21a3b8ede986" + 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..9b3b66ba2f03b --- /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.14.0.tar.gz" + sha256 "a0a8d60e0d4c0a93a0fe5e781809fcf9c12d278c2624123b2ae2dc9fabbd63e7" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a38299addf3e2fb0de87abb726fb40dc629af9d9b370ba656749efb7490e87ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a38299addf3e2fb0de87abb726fb40dc629af9d9b370ba656749efb7490e87ed" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a38299addf3e2fb0de87abb726fb40dc629af9d9b370ba656749efb7490e87ed" + sha256 cellar: :any_skip_relocation, sonoma: "c8f39e941e155718d2e6033d946952ac1095321a206491ca3908af8574e97187" + sha256 cellar: :any_skip_relocation, ventura: "c8f39e941e155718d2e6033d946952ac1095321a206491ca3908af8574e97187" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aa3e69f483e95ffa4457f8a0f9e68cbbd313c864cdb24c316d729f8ed5693c33" + 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..7b53e20e614f2 --- /dev/null +++ b/Formula/r/roswell.rb @@ -0,0 +1,37 @@ +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_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..952a67c319d1e --- /dev/null +++ b/Formula/r/roundup.rb @@ -0,0 +1,23 @@ +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" + + 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..e0508c97c7678 --- /dev/null +++ b/Formula/r/rover.rb @@ -0,0 +1,38 @@ +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.31.0.tar.gz" + sha256 "82c698bfe2b5f3c10e952f3294bf0a154b79d5410f0521c6fb02c91a0397c0cf" + license "MIT" + head "https://github.com/apollographql/rover.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a300c50b001b528d13e56cd5deb7f2d22272052167e6f2ae4ec4c322afbaea0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "17ef8408ca0918c4a820678eae928f01aa9ea39b51a83b36db303022c6f14a6f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "814230307664a5a6020345cce0a068a6b618656f87f677752c6a696123bbca2d" + sha256 cellar: :any_skip_relocation, sonoma: "74cb899d27c528e865abdc2e76cdee2f85fbc9a97c2cac787cb098530361c778" + sha256 cellar: :any_skip_relocation, ventura: "8b544426dd837e23c0569eec0d3c2f7b67a47f27a96067f3cdcdb62ef2204312" + sha256 cellar: :any_skip_relocation, arm64_linux: "26f25de0bab67a443f0567e197dbe08594364e9b7c18a246354cc222d89a90f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6c4d7716d0a85e54d5e98b882f611ba8339f43bf793afe167943bc48d3667abd" + 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..a833cee1e51d5 --- /dev/null +++ b/Formula/r/roxctl.rb @@ -0,0 +1,40 @@ +class Roxctl < Formula + desc "CLI for Stackrox" + homepage "https://www.stackrox.io/" + url "https://github.com/stackrox/stackrox/archive/refs/tags/4.7.3.tar.gz" + sha256 "5e6d08b85446d36dbf804cfdd9468b339d78b5e7fee72415be3b233faf775d98" + license "Apache-2.0" + head "https://github.com/stackrox/stackrox.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ac8c3e8bcd6371dc472620797137d648d7986d912339e6af9c79c35fbf6ffb7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6aca654c20b635210618ac9a887df28dd5fca6e38be55dede1510ac2e4734154" + sha256 cellar: :any_skip_relocation, arm64_ventura: "da90686df6007e0ed53981c9e0fa0389e9f8d66bce3669b7b14e28d75f3f36f6" + sha256 cellar: :any_skip_relocation, sonoma: "d9e1a9df31e42688987103592beda1a89fb949d4535a1137ce0ac90eb2713b80" + sha256 cellar: :any_skip_relocation, ventura: "62daa61b24b69c0ae5f898be75fd6065a1c7f7fcfa39adb1c2b306adb4aa314c" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee3ce7e447d322c5f41a54e6cc439f26b7e9d6cb3e3c67ef06c9d4bf1f54c1c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0f9e4dad320346264fb4ea364fbf736660a674623e43ec82019f36f5b0c843e3" + 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 <<~EOS, output + ERROR: obtaining auth information for localhost:8443: \ + retrieving token: no credentials found for localhost:8443, please run \ + "roxctl central login" to obtain credentials + EOS + end +end diff --git a/Formula/r/rp.rb b/Formula/r/rp.rb new file mode 100644 index 0000000000000..ade927d51ace2 --- /dev/null +++ b/Formula/r/rp.rb @@ -0,0 +1,36 @@ +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.4.tar.gz" + sha256 "668cbdc4ff02b8774f75680f43fdd38f924359e2a99ddd8291beae9606e09f02" + license "MIT" + head "https://github.com/0vercl0k/rp.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9f0b383f4a76f056c51858a85e93297e26d82356069c3ac1926f6dbe762d186a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "76c538f779acc275b3c613a2a47d4436f54a5f706d81522ae7c8d8ee8bc0cbca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "74c3b3a0eb50b7a6b6c9df3e23568220a98a66becfa38e799e322b3daeb164ec" + sha256 cellar: :any_skip_relocation, sonoma: "f8b1b3226e4adf09046fe02a7378147600ac45dcae81864900f27b17c17b39f1" + sha256 cellar: :any_skip_relocation, ventura: "c58342298a6cadb2e7589487fdac98b3af13176be08c4bd390c084759569e29a" + sha256 cellar: :any_skip_relocation, arm64_linux: "452819270a64c7f92bba7b1ca9fdf8b970171ff11f1424d4e9d177e1f0377e53" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1cbf2ef84363fd1baf5ac98c0484106526da8a14a687580c56c1961d8d277b35" + 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..76e796881635a --- /dev/null +++ b/Formula/r/rpcsvc-proto.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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..ddac09ae3a827 --- /dev/null +++ b/Formula/r/rpds-py.rb @@ -0,0 +1,83 @@ +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/96/d2/7bed8453e53f6c9dea7ff4c19ee980fd87be607b2caf023d62c6579e6c30/rpds_py-0.25.0.tar.gz" + sha256 "4d97661bf5848dd9e5eb7ded480deccf9d32ce2cd500b88a26acbf7bd2864985" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bf2e7fe41dc568ae43cd22cd19a324807f8ce7918ce6ff0cfaa0654653a48ba6" + sha256 cellar: :any, arm64_sonoma: "250de2d26549d0f07bafe0b9c22efcae1aace5e655147576f12e20666b4f3d2d" + sha256 cellar: :any, arm64_ventura: "2b856f712a46755ea73b20242da87bf0649bf6400888239d399c73ada69c8064" + sha256 cellar: :any, sonoma: "1ec7938b506d48b42b31a9344a8bca3fdcc2b6a98fef68462697c38b9f8f089d" + sha256 cellar: :any, ventura: "1fafa494d6590399b88428153993f3c6105387103be546ea90724e89fac53078" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad664c871c65d9d5782cc746f6b1b7ec0533b8ad2899dcee095e55766e0c105e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fdab7eea61662af87f54d0e5cab7374bdffabf7b849c5dfb5c4e957aa4ec14d2" + end + + depends_on "maturin" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + depends_on "rust" => :build + + 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/9e/8b/dc1773e8e5d07fd27c1632c45c1de856ac3dbf09c0147f782ca6d990cf15/setuptools-80.7.1.tar.gz" + sha256 "f6ffc5f0142b1bd8d0ca94ee91b30c0ca862ffd50826da1ea85258a06fd94552" + end + + resource "setuptools-rust" do + url "https://files.pythonhosted.org/packages/e0/92/bf8589b1a2b6107cf9ec8daa9954c0b7620643fe1f37d31d75e572d995f5/setuptools_rust-1.11.1.tar.gz" + sha256 "7dabc4392252ced314b8050d63276e05fdc5d32398fc7d3cce1f6a6ac35b76c0" + end + + def pythons + deps.map(&:to_formula) + .select { |f| f.name.start_with?("python@") } + .map { |f| f.opt_libexec/"bin/python" } + end + + def install + ENV.append_path "PATH", buildpath/"bin" + pythons.each do |python3| + ENV.append_path "PYTHONPATH", buildpath/Language::Python.site_packages(python3) + + deps = %w[setuptools setuptools-rust semantic-version] + deps.each do |r| + resource(r).stage do + system python3, "-m", "pip", "install", *std_pip_args(prefix: buildpath), "." + end + end + + 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..98fdd4aa08db7 --- /dev/null +++ b/Formula/r/rpg-cli.rb @@ -0,0 +1,30 @@ +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_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..b536cdab2fa98 --- /dev/null +++ b/Formula/r/rpki-client.rb @@ -0,0 +1,50 @@ +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.5.tar.gz" + sha256 "daee7ee0d1c74ef3b44ad14fe6315a503919a49187379d2473299c28cb30be43" + 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_sequoia: "3b274b679a0868eff6a36bcb32cf53757f94acbf92b6bb77f377a4d3349d42b3" + sha256 arm64_sonoma: "8d6955d3e1a630fc49c7b75e7d3cb097f607bb07232b8ddea6d42d9f669dbd08" + sha256 arm64_ventura: "65747361f8b7734b16ffccd2efefa7a273d5dfd8352a2bb2f1573b9387c9d7ae" + sha256 sonoma: "757b2720a4aa7e1cca84e95594db9a76cf04cd63ed1a929192180a2af0807245" + sha256 ventura: "87420aa9629f036f89904da817ffe0556117372a551142045ab8ee8ad6682d31" + sha256 arm64_linux: "f6345e6940184ac1074bf3caedbfa663f1af7aca0aef62423361880ae41dd5d8" + sha256 x86_64_linux: "2f9f591f37fea6e7ebb663d2f3efdc6bdf3cd297f16a0413ce2611f719f77784" + 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..e782b895407bd --- /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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4f3a92c152aa85e38ecfa5e723ac3976e7c922bad0a11541fe4fffdfbaaac227" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "027eb212bc7e4016600eec213bf22696297124dad33d0c1ac476c6b833677dc8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "161eab6b8c8144193155d77567883c9ffc7421a2047217c51cfb4766e20ad3fb" + sha256 cellar: :any_skip_relocation, sonoma: "6c8fbc594de8ca5db2fed2073a9b20fa736c2a5a413ccb5037d4ad544e078350" + sha256 cellar: :any_skip_relocation, ventura: "52b0ecfa8e85d9075f871a7de4a4e86c51f31cc8cbc0458ceeea1e3552b5ebec" + sha256 cellar: :any_skip_relocation, arm64_linux: "61dd2a865b8b0922685c91436bea042c9b5d52a51b1e301ff6c5c1bc7ba2eed4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "07d8974cf495884f8d2a663b0e15b9864f05733d0b6e1333567703ff05cbca2c" + end + + depends_on "python@3.13" + + 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/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + 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..56940ab2a6ca4 --- /dev/null +++ b/Formula/r/rpm.rb @@ -0,0 +1,205 @@ +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 + + bottle do + sha256 arm64_sequoia: "b68a3e9add758b36a2547372709f655d29948680c2403d8819a46445a9211a50" + sha256 arm64_sonoma: "7319baf421ef56e8cdf5e937f0624a5ff14521d0d045d27446611faede12a0f8" + sha256 arm64_ventura: "5070355f11041aedf2f1559a4b04af7e87c596576e80c54db3e2674b6d40bd69" + sha256 sonoma: "bc5c3289f2afaf8d6c12b1f530284be837ad9ab1c7376b1da93feb4b8588f2b1" + sha256 ventura: "b47ab72d2f0b6d82eb7cc20e3b69655e92367ea9b5700834330bd76eb2c7eddb" + sha256 arm64_linux: "25fc73da026efc9660a4373b10837df0c99f773ad000ddda3a3d07dcab1a459a" + sha256 x86_64_linux: "529d59e759920b457292f5a378ccb796bf6d98587e6bb1d2b51ac2a17f1bb678" + end + + depends_on "cmake" => :build + depends_on "gettext" => :build + depends_on "python@3.13" => [: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.13" + 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..6576f3652a327 --- /dev/null +++ b/Formula/r/rpm2cpio.rb @@ -0,0 +1,47 @@ +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 + + bottle do + rebuild 3 + 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://rpmfind.net/linux/fedora/linux/releases/39/Everything/x86_64/os/Packages/h/hello-2.12.1-2.fc39.x86_64.rpm" + sha256 "10f9944f95ca54f224133cffab1cfab0c40e3adb64e4190d3d9e8f9dbed680f9" + end + + testpath.install resource "homebrew-testdata" + system bin/"rpm2cpio", "hello-2.12.1-2.fc39.x86_64.rpm" + end +end diff --git a/Formula/r/rpmspectool.rb b/Formula/r/rpmspectool.rb new file mode 100644 index 0000000000000..f7aff8da045d5 --- /dev/null +++ b/Formula/r/rpmspectool.rb @@ -0,0 +1,81 @@ +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/7d/cc/53ef9a699df75f3f29f672d0bdf7aae162829e2c98f7b7b5f063fd5d3a46/rpmspectool-1.99.10.tar.gz" + sha256 "b79d59388ecba5f8b957c722a43a429b5a728435f5ed0992011e9482850e3583" + license "GPL-3.0-or-later" + revision 2 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_linux: "e88e0681a686b19b82467ed2d5f4cc3c42d35133ee03063695d51076c4d034aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c77cc55ad2dd5ef71b1f0e6f962181198567a56ce65828e3ed2c18cafed4cb6" + end + + depends_on "curl" + depends_on :linux + depends_on "openssl@3" + depends_on "python@3.13" + depends_on "rpm" + + resource "argcomplete" do + url "https://files.pythonhosted.org/packages/7f/03/581b1c29d88fffaa08abbced2e628c34dd92d32f1adaed7e42fc416938b0/argcomplete-3.5.2.tar.gz" + sha256 "23146ed7ac4403b70bd6026402468942ceba34a6732255b9edf5b7354f68a6bb" + end + + resource "pycurl" do + url "https://files.pythonhosted.org/packages/c9/5a/e68b8abbc1102113b7839e708ba04ef4c4b8b8a6da392832bb166d09ea72/pycurl-7.45.3.tar.gz" + sha256 "8c2471af9079ad798e1645ec0b0d3d4223db687379d17dd36a70637449f81d6b" + 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/rqlite.rb b/Formula/r/rqlite.rb new file mode 100644 index 0000000000000..6801556d3728b --- /dev/null +++ b/Formula/r/rqlite.rb @@ -0,0 +1,56 @@ +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/v8.37.0.tar.gz" + sha256 "ffac7c381fc3b79ee596f8058e1aaba74f3e62e79323f168ede7ced53c98c28f" + license "MIT" + head "https://github.com/rqlite/rqlite.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "73272258e33f2da35f69bcfe51224b63cf53f5cb7f019ec553f0a1aefb934174" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b9007130df83cfd51961e59b5b3eadc50ede8fb22e971cad59e2e0813f92ece0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "74d5a726c322047a677787aa6fac3bb1623e5df0b96bd99f3e165c573e9c1e67" + sha256 cellar: :any_skip_relocation, sonoma: "ee4992693bc62423763088b402cc9234991591d013c93ebdf0013acf93bdd01a" + sha256 cellar: :any_skip_relocation, ventura: "48baed0fb6a27d9e62e33715f98c0fef7fa0a0547a49e190dc336026dde4ef26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0a73628ddb231b40cd62f28aea6f66dd8b5cabdbbd94fe95beb5f7bf8ea7855" + end + + depends_on "go" => :build + + def install + 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..40bc1ed522aaa --- /dev/null +++ b/Formula/r/rrdtool.rb @@ -0,0 +1,83 @@ +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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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_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..aa9c1e5d8cc5b --- /dev/null +++ b/Formula/r/rsc_2fa.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, mojave: "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..ad7c61067dc03 --- /dev/null +++ b/Formula/r/rsgain.rb @@ -0,0 +1,40 @@ +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 1 + head "https://github.com/complexlogic/rsgain.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "518dcf26b5b0c4c7600e6380f10c9219605ca8802eb2abd29a54510e88cad140" + sha256 arm64_sonoma: "8326d61a3223931540901f5173059fc2579310a0401b76ea81002fe0f06a6a5c" + sha256 arm64_ventura: "7018f1dd0098583ec97d869024699a7f7e12d19515478d4f0b637be240f5adf8" + sha256 sonoma: "ba2789f8f8af6b801229e779dbc43a767ea4f0fad539586285c9e19f2f68f844" + sha256 ventura: "767220b19b5d1d987823284407efd91b84bf9de46c8c7e612bcc0f6272f4055c" + sha256 arm64_linux: "22cdbdadb44fabf91163b2893aa5332c32cf924399081592ccdaf581c9aefdd0" + sha256 x86_64_linux: "e471f4eedcc01d0af23e393ddd50f1795a3e220bf386465fe0398c9c537a18a2" + 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..dbfa8d20b8f46 --- /dev/null +++ b/Formula/r/rshijack.rb @@ -0,0 +1,34 @@ +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_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..b0af7d56fa6cd --- /dev/null +++ b/Formula/r/rslint.rb @@ -0,0 +1,38 @@ +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" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ac8cd4c717dfda47bbf135c332e2468c8129772a797f577836c79ae8a5e427e3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "29fe57341c2b7393232e7f5d17dd736b15a01f72d821697bb26017e536a388d5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6697bbdc7195bc43b2da2d32c7d1e53fbba9748c7f9f462dc08239e11cfd1c9a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "add49e65c3cc1f8d0e544dd43212efa4508082b9c6fdaaa8bf54e2f6ee3880fb" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f935da848cd21f5f58b4cffc7625ec321c51a48a3c167fb956f230cea14684e9" + sha256 cellar: :any_skip_relocation, sonoma: "299278e0be3991ef83ccb8805677ffe5ae523d3e39c232064217074d266e66d0" + sha256 cellar: :any_skip_relocation, ventura: "3e7dfc37a22fe9075f6b8b45fdfac7e60b56a8baf356d46744ca0cb57b708bd3" + sha256 cellar: :any_skip_relocation, monterey: "6e5a4f7bb10c80874a93dec67e40d8cd9288782bb5d97259ec4aa5993bd82bc8" + sha256 cellar: :any_skip_relocation, big_sur: "67894ab1b9743c341e0032f8a62140494625d9196fe53040b7de5482cd2fae35" + sha256 cellar: :any_skip_relocation, catalina: "ee4645f20575b26bb225f0cc02f8d16fbf2bee3d567e61f9ac62205deaa2a2e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "bcf5941ceabbe4a4b694a9f29898172742c9f1cda811628b189b36fa9d851abd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a7afca2f2944a01e7f7605e4e8f63ca50a4881c5655aa61a50ca939b5c800790" + end + + depends_on "rust" => :build + + 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..ac22b3ffa8fd8 --- /dev/null +++ b/Formula/r/rsnapshot.rb @@ -0,0 +1,29 @@ +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_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/rst-lint.rb b/Formula/r/rst-lint.rb new file mode 100644 index 0000000000000..19ad703400818 --- /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 8 + sha256 cellar: :any_skip_relocation, all: "33af15142db56039486e955b7a684f745bb02857f97b0aca3d5095a4b389d35b" + end + + depends_on "python@3.13" + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + 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..c76ecbccaeed1 --- /dev/null +++ b/Formula/r/rswift.rb @@ -0,0 +1,30 @@ +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: "master" + + bottle do + 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..f64a487fd5d9c --- /dev/null +++ b/Formula/r/rsync-time-backup.rb @@ -0,0 +1,22 @@ +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" + + 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..95f430f3cf0c2 --- /dev/null +++ b/Formula/r/rsync.rb @@ -0,0 +1,71 @@ +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_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..4326486eea2b3 --- /dev/null +++ b/Formula/r/rsyncy.rb @@ -0,0 +1,41 @@ +class Rsyncy < Formula + include Language::Python::Virtualenv + + desc "Status/progress bar for rsync" + homepage "https://github.com/laktak/rsyncy" + url "https://github.com/laktak/rsyncy/archive/refs/tags/v0.2.0-1.tar.gz" + sha256 "b2f1c0e49f63266b3a81b0c7925592a405770a3e1296040a106b503a85024b00" + license "MIT" + head "https://github.com/laktak/rsyncy.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c9f3bf3e3e2b3b67497decbe21a1accbc9e18b1a020fcd7c696bc3eb768396b1" + end + + depends_on "python@3.13" + depends_on "rsync" + + uses_from_macos "zlib" + + def install + virtualenv_install_with_resources + 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..5846d96d4966c --- /dev/null +++ b/Formula/r/rsyslog.rb @@ -0,0 +1,66 @@ +class Rsyslog < Formula + desc "Enhanced, multi-threaded syslogd" + homepage "https://www.rsyslog.com/" + url "https://www.rsyslog.com/files/download/rsyslog/rsyslog-8.2412.0.tar.gz" + sha256 "8cdfa5a077cba576bdd6b1841cc2848b774e663b2e44a39512bb820174174802" + 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_sequoia: "a6bdd3c313df1e78f07ad1c17d10ad789fcf81fe36a086e20205f5a7e776e9f0" + sha256 arm64_sonoma: "354d633feb5a36805573f10f8e1c3fcc5f608ffc5026212635047b346b3e197a" + sha256 arm64_ventura: "7ea98249ad0dc1e7a4597e7057f5c6876242a249309b9cc49324be1e7e3e4e59" + sha256 sonoma: "634fdc7ce73d23b03242f48159487efb0b5c4fc260969ecc714efde9420ba2b1" + sha256 ventura: "d062e44b88e5d1b02ffab7237dac1a70fef11e1a204137ffb4a4284123ceddd1" + sha256 arm64_linux: "8bf6e7b74eb77f2caabf141e907132cd9dd3ea91a77c0a91ef10adda9e2baab7" + sha256 x86_64_linux: "b0f6a768aa0755c58ca09703551430588f40df0273679bc4131bdda4bc508c73" + 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..0210adf5920ab --- /dev/null +++ b/Formula/r/rtabmap.rb @@ -0,0 +1,130 @@ +class Rtabmap < Formula + desc "Visual and LiDAR SLAM library and standalone application" + homepage "https://introlab.github.io/rtabmap" + license "BSD-3-Clause" + revision 10 + head "https://github.com/introlab/rtabmap.git", branch: "master" + + stable do + url "https://github.com/introlab/rtabmap/archive/refs/tags/0.21.4.tar.gz" + sha256 "242f8da7c5d20f86a0399d6cfdd1a755e64e9117a9fa250ed591c12f38209157" + + # Backport support for newer PCL + # Ref: https://github.com/introlab/rtabmap/commit/cbd3995b600fc2acc4cb57b81f132288a6c91188 + patch :DATA + end + + # Upstream doesn't create releases for all tagged versions, so we use the + # `GithubLatest` strategy. + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sonoma: "1d433bee617217b945cc97f14e98ef947b3966d804f884f047607fb51fb13852" + sha256 arm64_ventura: "1e9747b0eb5689899563716f8956590a882545c2f0a9e73df82cd4148f1f198c" + sha256 sonoma: "99d65d4e03958e697247bf67bbce34cd78356c48e06c119883252ab0eabc9f6f" + sha256 ventura: "6d1567f28fac55c42410af8f0946efd7f5513a21c66bdce68a609f90918a47df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "78f9cf656952b8ca809bd8f68b6903727b9957aedb88f592e680de09ddbbbf37" + 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 "qt" + 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 "libomp" + depends_on "libpcap" + depends_on "libpng" + depends_on "lz4" + depends_on "qhull" + end + + def install + 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 + +__END__ +diff --git a/corelib/src/CameraThread.cpp b/corelib/src/CameraThread.cpp +index a18fc2c1..d1486b20 100644 +--- a/corelib/src/CameraThread.cpp ++++ b/corelib/src/CameraThread.cpp +@@ -44,7 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + #include + +-#include ++#include + + namespace rtabmap + { diff --git a/Formula/r/rtags.rb b/Formula/r/rtags.rb new file mode 100644 index 0000000000000..0e3e5ccae52d6 --- /dev/null +++ b/Formula/r/rtags.rb @@ -0,0 +1,99 @@ +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_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..3c28f83410f80 --- /dev/null +++ b/Formula/r/rtaudio.rb @@ -0,0 +1,52 @@ +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-6.0.1.tar.gz" + sha256 "42d29cc2b5fa378ba3a978faeb1885a0075acf0fecb5ee50f0d76f6c7d8ab28c" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?rtaudio[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "91a97a9e4ed02b0fef4016d7ee2916edce3c41251bf9942f4aef4a9148c382f3" + sha256 cellar: :any, arm64_sonoma: "1d56ffbaacd143c4ce5215d42f5424d42dfd947bc26eaf57830eb51e7546068b" + sha256 cellar: :any, arm64_ventura: "483296d1cc1b969448614c1a22d004a1222270832842dce62be151465fd21753" + sha256 cellar: :any, arm64_monterey: "87c6a5b3c3eeb5b176786c650f5606de4cf7936ddf152fb669456eca491512cb" + sha256 cellar: :any, sonoma: "0a25a53c7f0cf7dc23dc4e4e9ecaa7df13051b16b3c8513ece3609064a74bab1" + sha256 cellar: :any, ventura: "a3feed53dc08f1210bd32431b16fc0bf0264dc66144ea64716b95b9a34e80902" + sha256 cellar: :any, monterey: "fb3184319287e1a9d056b35033806116fd44390f406cc3a19f2d9fc107148318" + sha256 cellar: :any_skip_relocation, arm64_linux: "5fd5758c63b71ddcc39884b1eabc5408bb4e25c812bf94a7021df35aba3f9881" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5115ee3bbfff48c47089c8051a0826ce35277e2d75397cb8e1b0fe39e8933588" + end + + head do + url "https://github.com/thestk/rtaudio.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + on_linux do + depends_on "alsa-lib" + end + + def install + ENV.cxx11 + system "./autogen.sh", "--no-configure" if build.head? + system "./configure", *std_configure_args + system "make", "install" + doc.install %w[doc/release.txt doc/html doc/images] if build.stable? + (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..213970b096a39 --- /dev/null +++ b/Formula/r/rtf2latex2e.rb @@ -0,0 +1,63 @@ +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 + + bottle do + 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 mojave: "bed54dc624378c20df3c352618645058a3ae3956d9cb5811af63836ffaa2dd10" + sha256 high_sierra: "b31c9387003920d4c27cb846da71203d69711638ed284825861a12247eeabca9" + sha256 sierra: "bbab54edbb07cbc3e16da33bdb0bd68258a330a3d1e2fceb175d1b753e6b81de" + sha256 el_capitan: "0aa7144c74e8af3a935a87c2b9c822581c38566e24351a50ae601bbedca4aec3" + 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..0ddef0f98cfc2 --- /dev/null +++ b/Formula/r/rtl_433.rb @@ -0,0 +1,50 @@ +class Rtl433 < Formula + desc "Program to decode radio transmissions from devices" + homepage "https://github.com/merbanan/rtl_433" + url "https://github.com/merbanan/rtl_433/archive/refs/tags/25.02.tar.gz" + sha256 "5a409ea10e6d3d7d4aa5ea91d2d6cc92ebb2d730eb229c7b37ade65458223432" + license "GPL-2.0-or-later" + head "https://github.com/merbanan/rtl_433.git", branch: "master" + + bottle do + 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..5cf3a4189eb90 --- /dev/null +++ b/Formula/r/rtmidi.rb @@ -0,0 +1,62 @@ +class Rtmidi < Formula + desc "API for realtime MIDI input/output" + homepage "https://www.music.mcgill.ca/~gary/rtmidi/" + url "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-6.0.0.tar.gz" + sha256 "5960ccf64b42c23400720ccc880e2f205677ce9457f747ef758b598acd64db5b" + license "MIT" + + livecheck do + url :homepage + regex(/href=.*?rtmidi[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "1c3e7eb76b81cc7b731bb82550bf888bec6add154b060f975b8f4ef0c907e4cd" + sha256 cellar: :any, arm64_sonoma: "739b40a37e29e6ec2b6f3f4a53cab1e489f7a9dd4698102604b227ea5c140b0b" + sha256 cellar: :any, arm64_ventura: "c18948de83007b0ca3e87cb01f9161c92038f8ad080c075a2a9746bcff14f78a" + sha256 cellar: :any, arm64_monterey: "00a10d87416a8ce037c98b15bc67a4a5c8780f065f8d0f73c470c0eaf3dd5d9a" + sha256 cellar: :any, sonoma: "af76d8dc24430b39e31a093c525d398801eb8908a0c08fc7145bd767879d9422" + sha256 cellar: :any, ventura: "65861bc757b6d02b30addc5fc15751927b3e82e33d03164bb02019976c1a20d5" + sha256 cellar: :any, monterey: "e106cd4273619be027dd5b8c1bc445d0b316753e9d541c7afe07a1dbd84fcdcf" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f090a86a72631f9c0a800dd524f2914b313b7610a82ce34148e0d62a3af266b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fff0e784b8a8779f1b8096e51b4d812d0190f7248c1fdf9ec75c5fe13c11b29" + end + + head do + url "https://github.com/thestk/rtmidi.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + on_linux do + depends_on "alsa-lib" + depends_on "jack" + end + + def install + ENV.cxx11 + system "./autogen.sh", "--no-configure" if build.head? + system "./configure", *std_configure_args + system "make", "install" + doc.install %w[doc/release.txt doc/html doc/images] if build.stable? + 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..c46fcb0531a3e --- /dev/null +++ b/Formula/r/rtmpdump.rb @@ -0,0 +1,66 @@ +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 + + bottle do + 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/JudgeZarbi/RTMPDump-OpenSSL-1.1 + patch :p0 do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/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..55686f96a0da5 --- /dev/null +++ b/Formula/r/rtorrent.rb @@ -0,0 +1,44 @@ +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.15.3/rtorrent-0.15.3.tar.gz" + sha256 "6dfd42c19e6ff2f5ee8b99855314cef4f10bd669663c2670cc85fd6a4e2c4e40" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7abb3f0ac2b614f55c1f55cf4f624137b6532c45e900fa534da392fadac5846f" + sha256 cellar: :any, arm64_sonoma: "7d2c15dd128af1b7403126bbeaf63d0628f579a8eddee6688b51a91b18e4a5b9" + sha256 cellar: :any, arm64_ventura: "e7d9c5a9ba6291a6043aba2a146f37a361afc3382e6a65a8948ee2fa366ae1f3" + sha256 cellar: :any, sonoma: "791e577e539051b785bf7fcd8f02acf6ebaabceec911227204abf027a7ce9620" + sha256 cellar: :any, ventura: "789d7e46ad1019063b7bd7ba94011bc4c56e17ae8fb15c0dc862765dec2bc955" + sha256 cellar: :any_skip_relocation, arm64_linux: "af91d9a66c6d6fcdcbfa44d6489ecd98a2342a7756bdfa8e7334c33e6ede2a6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "acfc175eccfc821a19f64f05a13d92f31311dbb35691f490af727178ad8f0461" + 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..021d304fd021e --- /dev/null +++ b/Formula/r/rtptools.rb @@ -0,0 +1,62 @@ +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 + + bottle do + rebuild 2 + 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, mojave: "eb8412186a92c44426b2f4c4bef7adcffb308afd4bb036a2dd9d1a0d184b504e" + 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..bdd33ba8f03e2 --- /dev/null +++ b/Formula/r/rttr.rb @@ -0,0 +1,60 @@ +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" + + bottle do + 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, mojave: "1130d4fa5016ad615dabc2a88c40aee36d2476ce4fea850a40643b78d44843f2" + 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 + ] + 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..532e6e0b9a202 --- /dev/null +++ b/Formula/r/rubberband.rb @@ -0,0 +1,49 @@ +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_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..32a6c5d6ac28e --- /dev/null +++ b/Formula/r/ruby-build.rb @@ -0,0 +1,30 @@ +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/v20250507.tar.gz" + sha256 "59992f934dccb48d2547969efd3075a5338617e02a5bff8c566ca1e51b6d349d" + license "MIT" + head "https://github.com/rbenv/ruby-build.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "d0ef5d0009457d4850b97d009473a98ad10155e5dd00d02994fef9939c73f452" + end + + depends_on "autoconf" + depends_on "libyaml" + depends_on "openssl@3" + depends_on "pkgconf" + depends_on "readline" + + def install + # these references are (as-of v20210420) only relevant on FreeBSD but they + # prevent having identical bottles between platforms so let's fix that. + inreplace "bin/ruby-build", "/usr/local", HOMEBREW_PREFIX + + 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..52c9dbdec7f7c --- /dev/null +++ b/Formula/r/ruby-completion.rb @@ -0,0 +1,22 @@ +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" + + 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..60dca3c880518 --- /dev/null +++ b/Formula/r/ruby-lsp.rb @@ -0,0 +1,52 @@ +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.23.20.tar.gz" + sha256 "d3776e435d1e0fb76b3437a1f153f6cb16c3efdb67b8dd58d0cf52c1b3c35676" + license "MIT" + head "https://github.com/Shopify/ruby-lsp.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "21879db801d138c1de9c25f07698292571a314d657f8589a0cf6461dcf2cc404" + sha256 cellar: :any, arm64_sonoma: "5fad2a52b428f5136897a5ace063fb7cc782c2a8d1e8346069b1b24533c0c528" + sha256 cellar: :any, arm64_ventura: "b4e6532e3704f987ecd34f2546c9eee45048118540ff9785cc46154f89984e32" + sha256 cellar: :any, sonoma: "aecfd0d494be5c951cfa672bdbe98cff192d4d2ab851f53f1971ae1bc6affdd9" + sha256 cellar: :any, ventura: "c4d9c7b5e61d09f36538cc485ef7d04f591ed7da8e96eb673dcf44c6eafe6580" + sha256 cellar: :any_skip_relocation, arm64_linux: "01b77215e1d26175d24ae1270a310d84f67c4152e80eeb6ffa5b718293fee459" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7991bd7d1869171053227f1f9891e9b1d1150ffb452dc777a921fb9d4d57dba6" + 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..940463f91a08e --- /dev/null +++ b/Formula/r/ruby.rb @@ -0,0 +1,282 @@ +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.4.tar.gz" + sha256 "a0597bfdf312e010efd1effaa8d7f1d7833146fdc17950caa8158ffa3dcbfa85" + + # 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.6.9.tgz" + sha256 "ffdd46c6adbecb9dac561cc003666406efd2ed93ca21b5fcc47062025007209d" + + livecheck do + url "https://rubygems.org/pages/download" + regex(/href=.*?rubygems[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + 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_sequoia: "84a0a1e7ed8d8fec2c7da3297306a1cf1f1e8e4c8c082d4df1e5ccf68a424074" + sha256 arm64_sonoma: "4200c5daba28ad77c9e683c41baa6ecce346c26d3a419c9e9fccc2d7a0a6baab" + sha256 arm64_ventura: "80359f2f29c9f5e6498d6ab1f56a20f5e13333230a8f57cb66a6b4c0d0739134" + sha256 sonoma: "6d159d562e248778b8431a4ccbbe279aab57e0b38a0f91d1cdeb6c7402ae8120" + sha256 ventura: "0f136fac7ee5dc2b3af8ceeaa5bcffa5961a13b247e8cb8fda73b3b7607ade4c" + sha256 arm64_linux: "d17eb1fb6325732801c135a3018ad6d192f7cbc1914a2858ff7466146606b4dc" + sha256 x86_64_linux: "cf369e9e03879a190bf9162ebdd80684e777fae4c0e11870be91922ad2f8ce27" + 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 + # 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}" + + 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 + + unless build.head? # 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@2.7.rb b/Formula/r/ruby@2.7.rb new file mode 100644 index 0000000000000..9cc8e69fec8f1 --- /dev/null +++ b/Formula/r/ruby@2.7.rb @@ -0,0 +1,270 @@ +class RubyAT27 < Formula + desc "Powerful, clean, object-oriented scripting language" + homepage "https://www.ruby-lang.org/" + url "https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.8.tar.xz" + sha256 "f22f662da504d49ce2080e446e4bea7008cee11d5ec4858fc69000d0e5b1d7fb" + license "Ruby" + revision 1 + + bottle do + sha256 arm64_sonoma: "1145b53a7a873516f3408712c8ac546d0f36242c929d8a586d5209bbd136134e" + sha256 arm64_ventura: "3b37017d8a6c722b6ce8b44361d7893a8458c8696e84f393df01be87e4d67faa" + sha256 arm64_monterey: "732ed82a82fed5ceb49de4cd4be5c5c6f4151d02c157df689cbdb1eae668b0f5" + sha256 arm64_big_sur: "7d0763386880e2a4edb83e80151592d9ea074a87cd7091406798c74d3a6b7bea" + sha256 sonoma: "196867c803513c9676084c43be6a9348a73a0babfc741dfa6fd50817930e6141" + sha256 ventura: "34b05f1fce9e839d2039ff581f40f195ae590f803e2b8c5cbdd564130b775716" + sha256 monterey: "f10c957f760ae1b34d12629ad26c958556f9bc84ad0da848f3077a522b0ede5f" + sha256 big_sur: "695d5eaf8dee2c506365e15030a1d139e161c640d455c1eea5ae5d433a0d76de" + sha256 x86_64_linux: "e72683fb67d9a53c863389d2adb94a0f11bfc4f5abe35ce61e68b3ceb453a927" + end + + keg_only :versioned_formula + + # EOL: 2023-03-31 + # https://www.ruby-lang.org/en/downloads/branches/ + disable! date: "2024-06-15", because: :unsupported + + 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.4.10.tgz" + sha256 "55f1c67fa2ae96c9751b81afad5c0f2b3792c5b19cbba6d54d8df9fd821460d3" + end + + # Update the bundled openssl gem for compatibility with OpenSSL 3. + resource "openssl" do + url "https://github.com/ruby/openssl/archive/refs/tags/v3.1.0.tar.gz" + sha256 "3f099acd0b3bea791cbdde520f2d332a709bbd9144abcbe22189a20bac12c6de" + end + + # Update the bundled digest gem for compatibility with the newer openssl gem. + resource "digest" do + url "https://github.com/ruby/digest/archive/refs/tags/v3.1.1.tar.gz" + sha256 "27107e7a982ce090eb9d84f4fa2f0e537feb46389e5cdd50855f6b8f8531d280" + end + + def api_version + "2.7.0" + end + + def rubygems_bindir + HOMEBREW_PREFIX/"lib/ruby/gems/#{api_version}/bin" + end + + def install + # otherwise `gem` command breaks + ENV.delete("SDKROOT") + + %w[openssl digest].each do |r_name| + resource(r_name).stage do + %W[ext/#{r_name} test/#{r_name}].each { |stem| rm_r(buildpath/stem) } + (buildpath/"ext").install "ext/#{r_name}" + Pathname.new("lib").each_child do |child| + if child.directory? + child.each_child { |grandchild| (buildpath/"ext"/r_name/child).install grandchild } + next + end + + (buildpath/"ext"/r_name/"lib").install child + end + (buildpath/"ext"/r_name).install "#{r_name}.gemspec" + (buildpath/"test").install "test/#{r_name}" + end + 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" + (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(%W[ + #{rubygems_bindir}/bundle + #{rubygems_bindir}/bundler + ].select { |file| File.exist?(file) }) + rm_r(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 + alias :old_default_specifications_dir :default_specifications_dir + end + + def self.default_dir + path = [ + "#{HOMEBREW_PREFIX}", + "lib", + "ruby", + "gems", + "#{api_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.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..5a793b0f3f731 --- /dev/null +++ b/Formula/r/ruby@3.1.rb @@ -0,0 +1,250 @@ +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" + + bottle do + rebuild 1 + sha256 arm64_sequoia: "0b2c994b56cc016e46c5897105ec0c68ce7a84dc755e2ffab9fbcbca55997998" + sha256 arm64_sonoma: "3198d30fb1e0727f1a68f20378d7a91be4de039fb2f0ef6fe818e0be1122e36f" + sha256 arm64_ventura: "ccb66ea8882437d80774ca761207d8207d061958615fc5869f8a4e717950d45a" + sha256 sonoma: "6fbb3535f124ecccb1a8d717d724c64d623e8622aac47c19861db79cee5119f6" + sha256 ventura: "4eae88a8a7d9606e90a79a05e9dd26f95f0f3e66741361b43c6f5b09ebe87345" + sha256 arm64_linux: "3ea209c0300bd00dd41982809bcdfae936e4b0dea615be35fbfbadebdeb1fa64" + sha256 x86_64_linux: "09a389c668f653f5d2fbc5de2c94e5bb13591a3161731828561033c8b994db4f" + 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 + + def api_version + "3.1.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 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..6e6417412ccec --- /dev/null +++ b/Formula/r/ruby@3.2.rb @@ -0,0 +1,262 @@ +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.8.tar.gz" + sha256 "77acdd8cfbbe1f8e573b5e6536e03c5103df989dc05fa68c70f011833c356075" + license "Ruby" + + livecheck do + url "https://www.ruby-lang.org/en/downloads/" + regex(/href=.*?ruby[._-]v?(3\.2(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "d01195f2134268b27735407c3c8cde3a87aebcba999e442475ad089293e3c3cc" + sha256 arm64_sonoma: "ff921fc48fb893b36e582546bc819ae32f1cd2b861f469388eaf4671171b8cbc" + sha256 arm64_ventura: "a8e8d74dbc45522aca326360f079b4e6408708e616871a50cbe6c6502533d86f" + sha256 sonoma: "06806826dfd864187f6aee4b4de353cf7378b37758a4712ee9aad94ba2f4b17e" + sha256 ventura: "1a6ab1f5e0a1c94f66ee2f3666f6b02c6f42e830ede9d50318f775da2cda92de" + sha256 arm64_linux: "802e8b940abf118c51861ae6dbcbe0524203a8b5a3711dd2b6b74c33a60b0c46" + sha256 x86_64_linux: "bc347d68a752c8ada0b28275624854dc910b2ff3da0be92dcb7d8275ea49bcd7" + 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.6.6.tgz" + sha256 "b4642fe16598fb93d40d6bcde9f69250debc0f13238cad410a7505c0cf740dad" + + livecheck do + url "https://rubygems.org/pages/download" + regex(/href=.*?rubygems[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + end + + def api_version + "3.2.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 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..72168d6e4935c --- /dev/null +++ b/Formula/r/ruby@3.3.rb @@ -0,0 +1,259 @@ +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.8.tar.gz" + sha256 "5ae28a87a59a3e4ad66bc2931d232dbab953d0aa8f6baf3bc4f8f80977c89cab" + license "Ruby" + + livecheck do + url "https://www.ruby-lang.org/en/downloads/" + regex(/href=.*?ruby[._-]v?(3\.3(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "dc9adec3972b25001078b160b3397c5691dffaf58f4f473d53e51fe790e770cb" + sha256 arm64_sonoma: "1113aa90c9e7f5c6ae74e692e48b4ef914809dcddf2dde39b7f42cb48a9dfc9f" + sha256 arm64_ventura: "bcb80b97bac49bfa3a01387ddfc1316cce13dbbb76ff1c0fd2cb531bb37dee85" + sha256 sonoma: "23b89fe8306d30294c71adea174614dfa2037d0965b9b84e3953ad4dd67daddc" + sha256 ventura: "23d55faa41ee59010f6032b3daf8af40d400ed4dca1f4c148ce526991a452fac" + sha256 arm64_linux: "16926fca0ffd7ab9df6e3159ee9c1b06239eecb551675b448ab0b0932592be15" + sha256 x86_64_linux: "82d5099f32bb50f261407a77d77ee510fe821e069d71b7b32297b21bc684a701" + 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.6.7.tgz" + sha256 "d23cfe2724cf84120d3a5059c7c0eed3a062f8b6e581f9b7bf01a3c447fa2f37" + + 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..c82769986ba40 --- /dev/null +++ b/Formula/r/rubyfmt.rb @@ -0,0 +1,58 @@ +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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "96c578513b4ad8026f8c6202855fbbb50d8f22a1f06fa24672e6d4537bebe3cd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dd1e916ff9236b322ef2fe242e95ff19b0ba244b7798b637c60458e0f9e72311" + sha256 cellar: :any_skip_relocation, arm64_ventura: "deb61a20206f73f26f5333e4691e3436648a6d5f63b20b5f8c13ff5813dc7853" + sha256 cellar: :any_skip_relocation, sonoma: "0abd972a5129624c5d8b8410a1fbc14ca32e6cf747948f15bc51a1976fc0b04d" + sha256 cellar: :any_skip_relocation, ventura: "f102e74c060458edffe138f457118d18ba73198c77bdb01969fb19d9e8f648b9" + sha256 cellar: :any_skip_relocation, arm64_linux: "4839872a36a77a8cf8b14e9c28ec240524417855d86f715325c33c400971b1ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b05509047cd3d31b41d81781cf1db098939b0a6a52848fc861f3b2a71a180d38" + 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["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..be5cc9a1bace6 --- /dev/null +++ b/Formula/r/ruff-lsp.rb @@ -0,0 +1,75 @@ +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 + sha256 cellar: :any_skip_relocation, all: "3eb98e50688bf67252e5779a8948914ae7d063ba511672001fb12d2f498d5316" + end + + deprecate! date: "2025-02-06", because: :deprecated_upstream, replacement_formula: "ruff" + + depends_on "python@3.13" + depends_on "ruff" + + 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/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 "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + 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..996084966151e --- /dev/null +++ b/Formula/r/ruff.rb @@ -0,0 +1,33 @@ +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.11.10.tar.gz" + sha256 "c59405d873151adc5bfa60436ee277ecc33029ef10996795de132182a86c3398" + license "MIT" + head "https://github.com/astral-sh/ruff.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4c9d35d251d22c9946200b3bb6e0f6d9e56c10ffdfd0ccfcacbcb24cd61d46dd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ec8d751138fa779ed8c72cbf19c1f5ee062ebff412ad9db0b9fc2897ba6a00c9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b01800bc9658cf9b1c959dbdaede3ca1ebbdc4744e3a6dcc65f822d7e3d11d8a" + sha256 cellar: :any_skip_relocation, sonoma: "22288ad3889253b06c23d9e4355c6ecc93c9f1adb80cc5f6be19db0d9a777837" + sha256 cellar: :any_skip_relocation, ventura: "e79a5e3af56234b515169c4c8e8847106fb178b29c0009c7e8403e26a42f5f62" + sha256 cellar: :any_skip_relocation, arm64_linux: "cde46c1e89148b66bcd96499d77edcabc89ba9942ac78763ae02d1843ab41420" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7c2677d68bc554855e6882e742b24ef1b6a2c1639dfb0262050df02a7fff249a" + 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/run.rb b/Formula/r/run.rb new file mode 100644 index 0000000000000..e23f50590688d --- /dev/null +++ b/Formula/r/run.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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..3b58b6a765abd --- /dev/null +++ b/Formula/r/rune.rb @@ -0,0 +1,35 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "747aeaf1466ec9ea0ac61457b76c4702a033d7d84e2bc5e19f692d7b978c5ad5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "16715adf035972cf2170822a215f1e93f73bb29fc01f9d3e3791213475ecadde" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d99ccc880724587eb2a50dbf9b33ab46a637de2b7da99fe1c1c802485728530" + sha256 cellar: :any_skip_relocation, sonoma: "7b1a5311a47c795426b0bdbd50c420404d1a051d5e0d2284565cc61e29cb7abb" + sha256 cellar: :any_skip_relocation, ventura: "f79f3974f8391325727dc5ca5945f822bc36b1fc54bc3c7508be75133c79ba3c" + sha256 cellar: :any_skip_relocation, arm64_linux: "25d3b0cc748c065e2553b36c7e8f9508aa9cade4c292894bcaa7fedb14aab558" + sha256 cellar: :any_skip_relocation, x86_64_linux: "550b44eec41fc7dd41f7d0357f1786480a4a389dec9af1687168d3fce29fc850" + end + + depends_on "rust" => :build + + 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..b8e9ba927d572 --- /dev/null +++ b/Formula/r/runit.rb @@ -0,0 +1,72 @@ +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_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..e67f41304112a --- /dev/null +++ b/Formula/r/runitor.rb @@ -0,0 +1,34 @@ +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.3.0.tar.gz" + sha256 "d654d4fb55b2adee445d2160ec937529f9a052220554a46874a8a5c64c52be06" + 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_sequoia: "862b3af6b1b84bd87aad4f08290a459ab3bd59d59a2f9fd4730da8b1e3d63060" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "862b3af6b1b84bd87aad4f08290a459ab3bd59d59a2f9fd4730da8b1e3d63060" + sha256 cellar: :any_skip_relocation, arm64_ventura: "862b3af6b1b84bd87aad4f08290a459ab3bd59d59a2f9fd4730da8b1e3d63060" + sha256 cellar: :any_skip_relocation, sonoma: "98bfedbbce4c27d2fe8166696b4d077b0f2419f23aa34218252db328d874e84b" + sha256 cellar: :any_skip_relocation, ventura: "98bfedbbce4c27d2fe8166696b4d077b0f2419f23aa34218252db328d874e84b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b21a8bf5896b78e2347f111c7922b092685ee4f18c1d91d189059863cf9fe49" + 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..85efe5d8ac7e7 --- /dev/null +++ b/Formula/r/runme.rb @@ -0,0 +1,47 @@ +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.13.2.tar.gz" + sha256 "6aa04d41735d1d3f5cef9f96380ec61c31ff8ec04f82a875958fb3db7d069513" + license "Apache-2.0" + head "https://github.com/runmedev/runme.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8c6f5e81e1355c8867293f14eec182f4779147f732631a1c01243ba5074ab94d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8c6f5e81e1355c8867293f14eec182f4779147f732631a1c01243ba5074ab94d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8c6f5e81e1355c8867293f14eec182f4779147f732631a1c01243ba5074ab94d" + sha256 cellar: :any_skip_relocation, sonoma: "e6a2c2deca518146e7067704a362f026b216f2fe78ecea4839f78501e31b8a99" + sha256 cellar: :any_skip_relocation, ventura: "e6a2c2deca518146e7067704a362f026b216f2fe78ecea4839f78501e31b8a99" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3d231e79a8f53efd35d0dffe40eaf8b771837b1ce9f11db7a1c8e22f17f595f7" + 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..abe72bdf37551 --- /dev/null +++ b/Formula/r/rure.rb @@ -0,0 +1,42 @@ +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.11.1.tar.gz" + sha256 "b346bd18b614325bafa15130f5ea0f3fc0712f19f2090069fdc164e3f83325b8" + license all_of: [ + "Unicode-TOU", + any_of: ["Apache-2.0", "MIT"], + ] + + bottle do + sha256 cellar: :any, arm64_sequoia: "2c5a4892338686036abbec370b25232b93e0c729d9e5ae7f9fb6e0d0fe8b623e" + sha256 cellar: :any, arm64_sonoma: "87c6daa3212314431070b578bc71d4c859f9730ed787987b9eedd4359e3afe62" + sha256 cellar: :any, arm64_ventura: "dc07b8e0b0ccdc26fde897a2c0c3a13fe962f301fe078bffccffb263328bbfd0" + sha256 cellar: :any, sonoma: "28f4e15683930a740c5f030306ac769f7671a0d4c32536756f9d096470041933" + sha256 cellar: :any, ventura: "4de2e95dd8c24f9b16c4f371df152e2e7ac2376bb0e2de16b1ef2fae0abb5d31" + sha256 cellar: :any_skip_relocation, arm64_linux: "49b7ceb0ae53595350deb6fa64b71b4ecb4ae517c2f33b9ffeade35de2f85d3d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "012c9ed074329023e7b518d7829db5e5020dc92f1ae81872ca41fa8550ed273f" + 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..2c4c94cc9119e --- /dev/null +++ b/Formula/r/rush-parallel.rb @@ -0,0 +1,33 @@ +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.6.1.tar.gz" + sha256 "48a6560f32bd5445eb7d19ce594c640875045edac965cb963fd929285ba87f6d" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7ffcdb2c860323b189e6a902b8a15ebcca4e54516159ad3c1799401cda340b6e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cee046ffd999162c6935d400162ba77f890919d00c1b7e011e1396b7c39dcd2a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ed200d11088e84ad20850ce2368a47188104f427d860189a4a9f268f62d1d418" + sha256 cellar: :any_skip_relocation, sonoma: "26067667700bb3b6dc7bee73a980cd2ad762fbe0232c3a4b7d0a7c9f4233f1ac" + sha256 cellar: :any_skip_relocation, ventura: "7820ae2b68c5b49115adeef678fd44f8c61fbdefd2f7592bad4aa5159363702d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15984a832e5cebfbd1d3b138159254acb61e51728b0ead3291f37a39b13e108d" + 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..4738517bf6ec2 --- /dev/null +++ b/Formula/r/rush.rb @@ -0,0 +1,33 @@ +class Rush < Formula + desc "GNU's Restricted User SHell" + homepage "https://www.gnu.org.ua/software/rush/" + url "https://ftp.gnu.org/gnu/rush/rush-2.4.tar.xz" + mirror "https://ftpmirror.gnu.org/rush/rush-2.4.tar.xz" + sha256 "fa95af9d2c7b635581841cc27a1d27af611f60dd962113a93d23a8874aa060f4" + license "GPL-3.0-or-later" + + bottle do + 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..18c1999c476ca --- /dev/null +++ b/Formula/r/rust-analyzer.rb @@ -0,0 +1,75 @@ +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-05-12", + revision: "2bafe9d96c6734aacfd49e115f6cf61e7adc68bc" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e8d6d1ed5455cad6e18df2abd537d836d8dd6de852c532d093425134553cb48b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc304eca320b307923e48746c79823a35551d4d7990cf64024c918568db2427a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9e9b9581e5bd92faadd9fce087a24bea7a886d5cd449ca2342196b3bc958253e" + sha256 cellar: :any_skip_relocation, sonoma: "f42180708d838ad7d66e5cec8c4ba4771e9af0beb5a763365578c3d6e2db7985" + sha256 cellar: :any_skip_relocation, ventura: "465a2177ccac87be2ae92653c63ef0aa0aca68aff6819ab79d488b4a5c3ce6be" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc177fd5a035a62adfb00d42da423b1ec2f475311bf0457edd37312c64aa84a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0f3e4601f073e487bbdf4daeebad57f40853be24150116299e1727c70e6774b" + 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..4fcde2fef6003 --- /dev/null +++ b/Formula/r/rust-parallel.rb @@ -0,0 +1,33 @@ +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_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..3bd38461ac0c1 --- /dev/null +++ b/Formula/r/rust-script.rb @@ -0,0 +1,27 @@ +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.35.0.tar.gz" + sha256 "21061a471cdb25656952750d7436f12b57bac3c292485e9bc71a5352b290d5df" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "84ccef7a3d517ba17b93f95b279529a318501e56e9d6e3c7c9c6122b10c63fac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "960a5c6f1f1dd0c988f547a6de1635c0512d6ee77f9efad1d906484cdd52c03a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2efbde3d56b2021d74f6c0772bf2a00dd8247daf238fe4b7007ecf460dd1f63c" + sha256 cellar: :any_skip_relocation, sonoma: "77723dfc277650d524677611bc1914271411690dc31b833cc787b2d78a867e7f" + sha256 cellar: :any_skip_relocation, ventura: "ebf09f25a4d8584d832ded2b7a63ecfc6c23fc2e70d440c40ee32e7bc33883d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "1c0f9c4fde1d78f136f71bdd2bb4a733bda3142863e48bdd6e765ff30ed74cbf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c4765b6c1f979d3cdae339ed53036f782f3701f5caaaf2dee6e2c2a38bcede3" + 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..6aee2bfcc76d3 --- /dev/null +++ b/Formula/r/rust.rb @@ -0,0 +1,281 @@ +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.86.0-src.tar.gz" + sha256 "022a27286df67900a044d227d9db69d4732ec3d833e4ffc259c4425ed71eed80" + + # 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.87.0.tar.gz" + sha256 "e37e329434ba84e55b87468372dd597de5e275f6b40acf24574e606c2ac5851b" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "971ead27d588e6366d860f852475920761575de9d68638a649bdac997fc457c9" + sha256 cellar: :any, arm64_sonoma: "e611c9aa9342883ad3d71d498d266304243df0f2b962da0d8fffee1143d48a17" + sha256 cellar: :any, arm64_ventura: "0f6bab3da580f6114b6f44140ab7a103d44f408439a054798585c51a12e4c8ae" + sha256 cellar: :any, sonoma: "ab4a1720e42928aea387ec6c7dba884ce5e6bd4a19f22bb6034028bd9ba7e9c6" + sha256 cellar: :any, ventura: "60ee18126b2725fb63d63929c9b8c87a49949922a0eec820c1266a2019ebc90c" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d7b438ee1700bffb3b13f28c06ccbeeb59a1170f2694e950af273142ae61fba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f719908dc9b74c754d48d59e606241600aea5e8738e08bd4441819da1fb08aab" + 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@19" # migrate to LLVM 20 on 1.87.0, https://github.com/rust-lang/rust/pull/135763 + depends_on macos: :sierra + depends_on "openssl@3" + depends_on "pkgconf" + depends_on "zstd" + + uses_from_macos "python" => :build + uses_from_macos "curl" + uses_from_macos "zlib" + + 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-02-20/rustc-1.85.0-aarch64-apple-darwin.tar.xz", using: :nounzip + sha256 "2a03e227b57a49d80b43473b6fa2d56ad661ece0d8ffd81f639cd31600d3823e" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-02-20/rustc-1.85.0-x86_64-apple-darwin.tar.xz", using: :nounzip + sha256 "19bb6d9608d415779b85100eab92544b0e96d6b84b85b7c3eb4a15df9db1656f" + end + end + + on_linux do + on_arm do + url "https://static.rust-lang.org/dist/2025-02-20/rustc-1.85.0-aarch64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "e742b768f67303010b002b515f6613c639e69ffcc78cd0857d6fe7989e9880f6" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-02-20/rustc-1.85.0-x86_64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "7436f13797475082cd87aa65547449e01659d6a810b4cd5f8aedc48bb9f89dfb" + 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-02-20/cargo-1.85.0-aarch64-apple-darwin.tar.xz", using: :nounzip + sha256 "d67766fb2e62214b3ee3faf01dcddddcb48e8d0483c2bb3475a16cb96210afed" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-02-20/cargo-1.85.0-x86_64-apple-darwin.tar.xz", using: :nounzip + sha256 "97cc257fe6a0c547e51b86011f0059a1904ac5e7abdf8f603ed86ec93cc4a9ac" + end + end + + on_linux do + on_arm do + url "https://static.rust-lang.org/dist/2025-02-20/cargo-1.85.0-aarch64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "cdebe48b066d512d664c13441e8fae2d0f67106c2080aa44289d98b24192b8bc" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-02-20/cargo-1.85.0-x86_64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "0aff33b57b0e0b102d762a2b53042846c1ca346cff4b7bd96b5c03c9e8e51d81" + 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-02-20/rust-std-1.85.0-aarch64-apple-darwin.tar.xz", using: :nounzip + sha256 "7da1367209de00e3fb315c0e76658e3605ee2559892d29851a3159ae7ea1ddc5" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-02-20/rust-std-1.85.0-x86_64-apple-darwin.tar.xz", using: :nounzip + sha256 "eefbc63670d44c3825962f7fdf8e00f256ff1f02e22504aba3562e25cea519ec" + end + end + + on_linux do + on_arm do + url "https://static.rust-lang.org/dist/2025-02-20/rust-std-1.85.0-aarch64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "8af1d793f7820e9ad0ee23247a9123542c3ea23f8857a018651c7788af9bc5b7" + end + on_intel do + url "https://static.rust-lang.org/dist/2025-02-20/rust-std-1.85.0-x86_64-unknown-linux-gnu.tar.xz", using: :nounzip + sha256 "285e105d25ebdf501341238d4c0594ecdda50ec9078f45095f793a736b1f1ac2" + end + end + end + + def llvm + Formula["llvm@19"] + 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"), + Formula["zlib"].opt_lib/shared_library("libz"), + ] + 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..498ef8fb8e0e4 --- /dev/null +++ b/Formula/r/rustc-completion.rb @@ -0,0 +1,31 @@ +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 + + 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..c73eea86061fa --- /dev/null +++ b/Formula/r/rustcat.rb @@ -0,0 +1,37 @@ +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_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..1012110a4ff30 --- /dev/null +++ b/Formula/r/rustic.rb @@ -0,0 +1,39 @@ +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.9.5.tar.gz" + sha256 "cb26f48325897946e7e6995d7617741586dfee0229ada1dfecb01e8ac90c4967" + license "Apache-2.0" + head "https://github.com/rustic-rs/rustic.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "855e62b8c968742aa7c9a601d2e421559e9b78cb9f5ef3fbab6ca24fb456a89c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c336b3986e4d26df024f4f9e742a53141c3efd43484d1799de608ee37d8d4720" + sha256 cellar: :any_skip_relocation, arm64_ventura: "51334b62cb18ee4a9dadfbce90575732d0b3537aadc63fa12e83cffa95808df4" + sha256 cellar: :any_skip_relocation, sonoma: "16894672e81b26c149d26c84d226e9bd544a39c68d27bfe831f2e6353722b2e8" + sha256 cellar: :any_skip_relocation, ventura: "5f1b10b808848a9c702b2c2fd12ec10a28227e46f3824957e4e59b7bf0b9bbe3" + sha256 cellar: :any_skip_relocation, arm64_linux: "3aa289175364ed60c1f3e6c37a8d363208698e158c5a9f0740cbbdeb5cb1569f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7369c9e3bf775382e418080ed6395f31c02bcdeb2a7ba0a086beca02fa4d23b" + 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..5f09051d6e2f4 --- /dev/null +++ b/Formula/r/rustls-ffi.rb @@ -0,0 +1,45 @@ +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_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..489af91ea8c60 --- /dev/null +++ b/Formula/r/rustscan.rb @@ -0,0 +1,34 @@ +class Rustscan < Formula + desc "Modern Day Portscanner" + homepage "https://github.com/rustscan/rustscan" + url "https://github.com/RustScan/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_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..0d1e2357491b1 --- /dev/null +++ b/Formula/r/rustup.rb @@ -0,0 +1,77 @@ +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: "master" + + bottle do + 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..c340010068479 --- /dev/null +++ b/Formula/r/rustywind.rb @@ -0,0 +1,44 @@ +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.0.tar.gz" + sha256 "90559cb75c9b28bfafd04a1e800b482e374eadcfc21a6be1ed369651d066ac4d" + license "Apache-2.0" + head "https://github.com/avencera/rustywind.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa6fc45b7eb5a94e38d0e14501733e4830ad1651d7fc1b4bb99540d4a79a06c4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "be6c62e9eaf19501ad9da415b8188525c650dc1cdce403badb622b69abbf3953" + sha256 cellar: :any_skip_relocation, arm64_ventura: "440358b83270c570a29ac7ec98b95ea0f6a8635c0612644661d6d6c90efe4ae0" + sha256 cellar: :any_skip_relocation, sonoma: "f6875be6f7d2da731a802a1cab0080ec1f4fbdc0d9c647830363702ca43769fc" + sha256 cellar: :any_skip_relocation, ventura: "98ff021f7a53e32a4bf2eb01f6deface7b30d3bbbfc18848253a3e7e8039643d" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b9daabcd8287bc970c38b2300894a05844ea64b5a403991e7472eb3c9002a25" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aaa846b03600f391088b6bcaeebb11b9e9bde7ce2eae48b84ce73a34295c5fa5" + 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/rxvt-unicode.rb b/Formula/r/rxvt-unicode.rb new file mode 100644 index 0000000000000..a7de6b52c840f --- /dev/null +++ b/Formula/r/rxvt-unicode.rb @@ -0,0 +1,85 @@ +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 + + bottle do + 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/formula-patches/85fa66a9/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..0ae01c69ce3b0 --- /dev/null +++ b/Formula/r/ry.rb @@ -0,0 +1,39 @@ +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" + + 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..c9a4d1e0ffac3 --- /dev/null +++ b/Formula/r/rye.rb @@ -0,0 +1,58 @@ +class Rye < Formula + desc "Package Management Solution for Python (consider the successor \"uv\" instead)" + 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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "84c1ce8ddff03d794c636fdd224c0ccf873a0a74b330d2eb3b56b7c481ccb9f5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b68d8c0f567cb5d26d3ae99cacb29c56cb7cc1ef4233c73c43d554681a20c740" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bc5259ed968232a6ee88fa9afeba7dd6429dc7eea4a3fafa3dc1eeda259c6a27" + sha256 cellar: :any_skip_relocation, sonoma: "b3a8e7efb4d1cb5070a3182778474e5e196f9f2e94edf30a8584de32bbe1f050" + sha256 cellar: :any_skip_relocation, ventura: "e15f3bbaa74bc6ef7b7fe65e79af32a812567394c27f5074f675726e3f0da24a" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae95a33be1b6eab2d8e8e17e95bdb14e6b23043bfb775094f76ce61964afc2a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2c57f18a9a1dd66aca420ceb0bdd53d91915bfd9b93298b5cfa12411af9558a7" + end + + depends_on "rust" => :build + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + 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..c0b64c2ba18c0 --- /dev/null +++ b/Formula/r/ryelang.rb @@ -0,0 +1,52 @@ +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.81.tar.gz" + sha256 "95e0d9b747f44c216cd084574e1d7ab83428e6d84c3baba3aee0133a5988e8a7" + license "BSD-3-Clause" + head "https://github.com/refaktor/rye.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ad49d5bb66d84b1aae60b31b3cec27dbf854675ca29e3a8449a4c7506e8779be" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc42a012fa02c805dd960b54c3e7a93b5e5620f07afdb21ad1254594596aeba6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3ea69c42fb3de4913149dec330aba0698b5b8219b49fb73adc70725b985d1f1b" + sha256 cellar: :any_skip_relocation, sonoma: "e4d4fa03f8267fb2c06f83d88cea68b11c96df6afbe587a01918d16b8d46ed27" + sha256 cellar: :any_skip_relocation, ventura: "1ff7ebf5900910f3c238421406da6d1d7cb903201fdfddf40fcacdcf7b7502ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "031308d0b340b0aa1520b8553703f1d626ae348e443a24cfe4aa047e51c2b76b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97e14b78f23d3099edd2b40d157884f87d0312e46e32d8a0fc196a39d83c3073" + 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..a3cd8c9a33532 --- /dev/null +++ b/Formula/r/rzip.rb @@ -0,0 +1,61 @@ +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 + + bottle do + 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, mojave: "aa81be3378f5e5410013d08bddf9c4f9c605d639b7a1e53f37bc7cf7264aae82" + sha256 cellar: :any_skip_relocation, high_sierra: "fec6b24d1b5d0555a7cdd732846cfc6357d4fca1b3ff59a3c5fa27e3bc2f4d9e" + sha256 cellar: :any_skip_relocation, sierra: "89a5e7ab518070df7c3f5091a18a412b72910b58a191222e915b1ed9db6ba570" + sha256 cellar: :any_skip_relocation, el_capitan: "4eedb0ca975a72a4591d1e386d1ae01a546fb8401ea4f0b05c0fa71809e159db" + 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 47217e4a91141..0000000000000 --- a/Formula/r3.rb +++ /dev/null @@ -1,50 +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" - license "MIT" - head "https://github.com/c9s/r3.git" - - bottle do - cellar :any - sha256 "96787f402bbc3a37207c3d5c3468d3b98028a12335a66d176d18d268e2406462" => :catalina - 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 58d6226fd7eba..0000000000000 --- a/Formula/rabbitmq-c.rb +++ /dev/null @@ -1,30 +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.10.0.tar.gz" - sha256 "6455efbaebad8891c59f274a852b75b5cc51f4d669dfc78d2ae7e6cc97fcd8c0" - head "https://github.com/alanxz/rabbitmq-c.git" - - bottle do - cellar :any - sha256 "6434a9100eeadfcd57d35fd31d1863d75b71ec163a3a1be29076c217712bda55" => :catalina - sha256 "5f99c633ece8efad2ef2085955b22d0558d8fc2dedcac67b3ba8b58a2640c2c3" => :mojave - sha256 "53d883744a185e5daab18c8bd18fd70fed56dd009cc507356f128663947c2453" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - 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 39091ecff9486..0000000000000 --- a/Formula/rabbitmq.rb +++ /dev/null @@ -1,111 +0,0 @@ -class Rabbitmq < Formula - desc "Messaging broker" - homepage "https://www.rabbitmq.com/" - url "https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.3/rabbitmq-server-generic-unix-3.8.3.tar.xz" - sha256 "5a2739ed1dba77f88316b4c63393d8037fc4acf51881ba922470453e891875b6" - - bottle :unneeded - - depends_on "erlang" - - uses_from_macos "unzip" => :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! /^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" - unless enabled_plugins_path.exist? - enabled_plugins_path.write "[rabbitmq_management,rabbitmq_stomp,rabbitmq_amqp1_0,rabbitmq_mqtt]." - end - - # 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.safe_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" - sleep 5 - 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 d60b7deb5c4fb..0000000000000 --- a/Formula/rack.rb +++ /dev/null @@ -1,43 +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 2 - sha256 "8cf224e3f734308bef6c0ef3cd9aa3a63aa4fdedd9ee626e2ee91099affc83c2" => :catalina - sha256 "a50004c910fc4cbb34404fabf20bfcab87dcf6d7ce510a96c72fecbdc8d458cc" => :mojave - sha256 "5e33e2bc51e9cf346ed59eabbef5849a170619be2a7b034b19d71a1a25a72fcb" => :high_sierra - 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.safe_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 25462073b7013..0000000000000 --- a/Formula/radamsa.rb +++ /dev/null @@ -1,45 +0,0 @@ -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.6/radamsa-v0.6.tar.gz" - sha256 "a68f11da7a559fceb695a7af7035384ecd2982d666c7c95ce74c849405450b5e" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "97fe42099e0b4278519ee560af5a38dd0cb5055e7542cd892d4c4f96d93960c5" => :catalina - sha256 "a4d9d9e07ff76b8bb51333a04d645ea0213663dc635bdea890b1cffb7f2e6543" => :mojave - sha256 "82d2231dcb25adb55f62690bd34d2b4b8978a3d22b956c0f0f2e20640d31c7a0" => :high_sierra - end - - resource "owl" do - url "https://gitlab.com/owl-lisp/owl/uploads/0d0730b500976348d1e66b4a1756cdc3/ol-0.1.19.c.gz" - sha256 "86917b9145cf3745ee8294c81fb822d17106698aa1d021916dfb2e0b8cfbb54d" - end - - def install - resource("owl").stage do - buildpath.install "ol.c" - end - - 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 - - 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 642ffff2a40be..0000000000000 --- a/Formula/radare2.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Radare2 < Formula - desc "Reverse engineering framework" - homepage "https://radare.org/" - url "https://github.com/radareorg/radare2/archive/4.4.0.tar.gz" - sha256 "401ab89f39f7e70e03336f6890dc4fdf52dae4f61201e4cd8a1fbe5a4b9eb451" - license "LGPL-3.0" - head "https://github.com/radare/radare2.git" - - bottle do - sha256 "cbf47bb485878d4fda41e03e67493b0628ed1021ac97ea663736b3725f243f43" => :catalina - sha256 "711e8178801c48a24b84a7ccae21491e07205735eb1e4bd693516a0bc13673eb" => :mojave - sha256 "0893017e56d16e2e692a8928756b89e29df351852999d523f8a7f1c2f7e2e20d" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - 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 26750d94d9c7a..0000000000000 --- a/Formula/ragel.rb +++ /dev/null @@ -1,45 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a402204e97c35c6a9487d2b0707e27766d9b39c9c2116d49e9c561e1d0bd54b7" => :catalina - 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 c81d7c7fd9b7b..0000000000000 --- a/Formula/rails-completion.rb +++ /dev/null @@ -1,20 +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" - license "MIT" - 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/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 1ad67bae200a2..0000000000000 --- a/Formula/rakudo-star.rb +++ /dev/null @@ -1,52 +0,0 @@ -class RakudoStar < Formula - desc "Perl 6 compiler" - homepage "https://rakudo.org/" - url "https://rakudo.org/dl/star/rakudo-star-2020.01.tar.gz" - sha256 "f1696577670d4ff5b464e572b1b0b8c390e6571e1fb8471cbf369fa39712c668" - revision 1 - - bottle do - sha256 "3a2d22c17772726872aefb5afbf216f6640c0bcb441c98a9e27aab73b0edaeff" => :catalina - sha256 "b53dab6ef44c73ea480ce74577a6b4f1593e124d2e5e502d3e134a6e81d7c054" => :mojave - sha256 "e4ecc1142965f84eb7197d8388390d8968f5e7505628bed3b8e2c41a98c324f7" => :high_sierra - end - - depends_on "gmp" - depends_on "icu4c" - depends_on "libffi" - depends_on "pcre" - - conflicts_with "moarvm", "nqp", :because => "rakudo-star currently ships with moarvm and nqp included" - conflicts_with "parrot" - conflicts_with "rakudo" - - 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 402388bb2a6a7..0000000000000 --- a/Formula/rakudo.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Rakudo < Formula - desc "Perl 6 compiler targeting MoarVM" - homepage "https://rakudo.org/" - url "https://github.com/rakudo/rakudo/releases/download/2020.06/rakudo-2020.06.tar.gz" - sha256 "4cd8fe8afae3a2b561544c8e0dad5b4bc6cabbbfc2fdd17c63f5ea39dd46721a" - license "Artistic-2.0" - - bottle do - sha256 "80870b47549bfbee7413bd31e6027c0f538e52572fa1cf0656371480d34016e7" => :catalina - sha256 "973ee2b4de49403c823c1ed47793cbb0ff7114efee3e457876313c4486cc4999" => :mojave - sha256 "d44bd6000cf8003aa86d001e374ed113f98b222469b7d421baa4e751f1bfe34e" => :high_sierra - end - - depends_on "nqp" - - conflicts_with "rakudo-star" - - 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 6368e38c125c4..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.4.5.tar.gz" - sha256 "538152806b030a27d81824fe1319203d0ff27f7c3487faf0cbdec2097aec6909" - license "Apache-2.0" - head "https://github.com/rancher/cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "fc15fd956ef932aca1ea71f708e3825426d72d4d1de22f792f635f23fd7d58b2" => :catalina - sha256 "a02a7621b1dc51132808e15af97ad598dcaf10b0aa20c9c140adf2b7e1a9eca6" => :mojave - sha256 "1de5ece489498a95029d1740daba354fee2da5f955561fc67804ffcfc629b7d6" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-mod=vendor", "-ldflags", - "-w -X main.VERSION=#{version}", - "-trimpath", "-o", 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/rancher-compose.rb b/Formula/rancher-compose.rb deleted file mode 100644 index 156191ab5165b..0000000000000 --- a/Formula/rancher-compose.rb +++ /dev/null @@ -1,33 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "50da809ea2a33343eda8099715391efc6c730b6996476d7c5366fba0d52ab853" => :catalina - 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 c03bee730af7b..0000000000000 --- a/Formula/rancid.rb +++ /dev/null @@ -1,32 +0,0 @@ -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.12.tar.gz" - mirror "https://deb.debian.org/debian/pool/main/r/rancid/rancid_3.12.orig.tar.gz" - sha256 "b1c1415d16ac291e29ff356a3c4f688160f07f1a091869290a95cd1793d4d3fb" - - bottle do - cellar :any_skip_relocation - sha256 "39ec33c962ee398c0e8bbf842debcd8f68142c32c6c6c43c75e52d2b8f453c6a" => :catalina - sha256 "4e95ce8c637515da76bad63aeafd50ddcfd6efa8cb93cb233a1619a0174b71bc" => :mojave - sha256 "3fe616a75b533dc7d4b8989f8719d6eb9d78628572f1e0769c6ddd6e4e769aae" => :high_sierra - 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 223e2f81e2965..0000000000000 --- a/Formula/randomize-lines.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ff6262e5a351158ca8a2b25b577a892fc4cf2b7f9a2330e9fec595970c81674d" => :catalina - 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 "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 18ab5dc164fc1..0000000000000 --- a/Formula/range-v3.rb +++ /dev/null @@ -1,42 +0,0 @@ -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/0.10.0.tar.gz" - sha256 "5a1cd44e7315d0e8dcb1eee4df6802221456a9d1dbeac53da02ac7bd4ea150cd" - - bottle do - cellar :any_skip_relocation - sha256 "765e3422e15f7c6e2c3b4d7aacfdfea919ddcad18cde592a481f2eb5e3fe537d" => :catalina - sha256 "765e3422e15f7c6e2c3b4d7aacfdfea919ddcad18cde592a481f2eb5e3fe537d" => :mojave - sha256 "765e3422e15f7c6e2c3b4d7aacfdfea919ddcad18cde592a481f2eb5e3fe537d" => :high_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++14", "-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 b4d01fd0bed62..0000000000000 --- a/Formula/ranger.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Ranger < Formula - desc "File browser" - homepage "https://ranger.github.io/" - url "https://ranger.github.io/ranger-1.9.3.tar.gz" - sha256 "ce088a04c91c25263a9675dc5c43514b7ec1b38c8ea43d9a9d00923ff6cdd251" - license "GPL-3.0" - 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 2070e2c0cd295..0000000000000 --- a/Formula/rapidjson.rb +++ /dev/null @@ -1,33 +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 "5d8915ade32a25a3c2a973de3536285b2c3d8badd57478c475a9e3eac0f47dc6" => :catalina - 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 - - conflicts_with "mesos", :because => "mesos installs a copy of rapidjson headers" - - 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 513a9a0c60632..0000000000000 --- a/Formula/raptor.rb +++ /dev/null @@ -1,26 +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 "d0be0655a9546fe278830f8b60a19f66dcc10a77445e2bf2cf76ad61a0a802e2" => :catalina - sha256 "cbfcd2b8ce9fa8701a15eba572e766e3a9b3b19eba8438d41618e6ee3ab4501d" => :mojave - sha256 "194f9a66e1aeccb23185abd6f1f1408422594dfd54cad5460c5a5ac3f5e0c48c" => :high_sierra - sha256 "dba42ee8efa54c0b5722f0e12a7a585c2a9fe07a22aea6aec9124aaf09860f1d" => :sierra - sha256 "cc2feb9cd1d6f9eb0f511853f19c43bc96d143de6a73edfd3cdb854647d1d14a" => :el_capitan - sha256 "c23392012fb5edffbe800771eaee6ae81d288e62c477c27332474f2ed342d1b3" => :yosemite - sha256 "5e640e01d5cdd6899ca00704ba581358d254f7cfb9b81d62c901c825bb347681" => :mavericks - end - - uses_from_macos "libxml2" - - 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 9f8d6e47256b6..0000000000000 --- a/Formula/rargs.rb +++ /dev/null @@ -1,24 +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.3.0.tar.gz" - sha256 "22d9aa4368a0f9d1fd82391439d3aabf4ddfb24ad674a680d6407c9e22969da3" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "37d5a3c2a5608eb4a10df0814a1334b88602a7200fdf99db60113f7aea598489" => :catalina - sha256 "1c24f60f8b91301cd167b0040e2c9ec7895fe818eeb21f13d40fca94e6f4f08b" => :mojave - sha256 "9cea3ec1abc342281b94649496e0d28275eead691238a2d03e47c2621afc9801" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - 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 1413cb5972381..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 "6cd01a0bbc9d5168548c6735ddf1057ae3ef403d3868be499ff1ce3ba1cd6ab8" => :catalina - sha256 "e727630f28efcdcb1a577f67525992f00a00c25ee1582277e1e91e2fa060187d" => :mojave - sha256 "815aafc0d05198cd4e3880715a6ad5de21b3bf47ccf25ef4b91aa918848a67ee" => :high_sierra - sha256 "9266addbd38ed67b7394d05702d2be69d44ccafeb8132ef75470a816614a9f8e" => :sierra - sha256 "7784dc13b95c0c2f5818bc3657da52f0365bbe9c6ddf8871d81b8638cb89390c" => :el_capitan - sha256 "069ff9e17c252271d058e72f38eedb2e1196cee49598e1537c64bd45b7f356e6" => :yosemite - sha256 "1a81d2fe1bb961b9b479da410046f24fa65df8db7cac5ee0853cc09f380f6bc4" => :mavericks - 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 6241cdb0dc480..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 "c815139d0154570fcab0e42ce7244682d13c47c4d4102b61260ffd1d0694d218" => :catalina - sha256 "61669830b056a2d79757a38bdaa53ea52c6bb84e58dfcff75804252fa12c752e" => :mojave - sha256 "c9a39d850c71f2ffcc6d0368cb9f575df1a0bd727992dfb553baccc8ecec97ce" => :high_sierra - sha256 "8d57d6803a7323f9e13c45d56b3cea41f71f7dc7cab493ddf9b34d0a2a6b68f5" => :sierra - sha256 "fa7368eb30256eb80ead76f7b551bc5980ed15ae8aa655d332a200edb073c2a3" => :el_capitan - sha256 "c84ec1a4c837b4a30fe597c9cc728f5075764b87978c5977757e2836db3eca0b" => :yosemite - sha256 "8bef11d9b2763b72cb5576926bd251175c2b0c4c7dec6ffc666f98720341ba27" => :mavericks - 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 b87b92dcea9e8..0000000000000 --- a/Formula/ratfor.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Ratfor < Formula - desc "Rational Fortran" - homepage "http://www.dgate.org/ratfor/" - url "http://www.dgate.org/ratfor/tars/ratfor-1.05.tar.gz" - sha256 "826278c5cec11f8956984f146e982137e90b0722af5dde9e8c5bf1fef614853c" - - bottle do - cellar :any_skip_relocation - sha256 "053917ccdf191b7cb15adb1c207cb3f18553def7d4cc9584b09222be07754660" => :catalina - sha256 "054cb6d92e13050233c54a5bbfdd1dc9fbaed09d63937b8426d543d9569ee07b" => :mojave - sha256 "16c83b337e66de93f5e1b21d77242b849a4a1613e2c2e38d1971a77277924bce" => :high_sierra - 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 50aab056f54bd..0000000000000 --- a/Formula/rats.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - sha256 "bf5da3e9088abba09350b4a812691a3f76b00bfce1c74947fb7c016d88eb89f9" => :catalina - 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/rav1e.rb b/Formula/rav1e.rb deleted file mode 100644 index 77414412ab623..0000000000000 --- a/Formula/rav1e.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Rav1e < Formula - desc "The fastest and safest AV1 encoder" - homepage "https://github.com/xiph/rav1e" - url "https://github.com/xiph/rav1e/archive/v0.3.3.tar.gz" - sha256 "a091f3387055e472b6e028aa013cf0f37fb5acce9f4db2605d929bbffb448d01" - - bottle do - cellar :any - sha256 "b8c0b0614f67553f771f709f0849479a9aa86883d5b7c5d59df60fc6544a9a11" => :catalina - sha256 "fec7ae58dbdc997241a5337381d6523388e8e09b19e5e8e3db509aa5052df2fa" => :mojave - sha256 "fe29e3982e41708784f0597c2f4a15ea217843a18b95f88e83f5d0f76a039ab6" => :high_sierra - end - - depends_on "cargo-c" => :build - depends_on "nasm" => :build - depends_on "rust" => :build - - resource "bus_qcif_7.5fps.y4m" do - url "https://media.xiph.org/video/derf/y4m/bus_qcif_7.5fps.y4m" - sha256 "1f5bfcce0c881567ea31c1eb9ecb1da9f9583fdb7d6bb1c80a8c9acfc6b66f6b" - end - - def install - system "cargo", "install", *std_cargo_args - system "cargo", "cinstall", "--prefix", prefix - end - - test do - resource("bus_qcif_7.5fps.y4m").stage do - system "#{bin}/rav1e", "--tile-rows=2", - "bus_qcif_7.5fps.y4m", - "--output=bus_qcif_15fps.ivf" - end - end -end diff --git a/Formula/rawgl.rb b/Formula/rawgl.rb deleted file mode 100644 index a9fd110b07676..0000000000000 --- a/Formula/rawgl.rb +++ /dev/null @@ -1,33 +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 - rebuild 1 - sha256 "96bd31a9298e14d5b4db183c8833d6e1e6bb10344193f49e1681a13cecc0c276" => :catalina - sha256 "59d92a845f19239386ea16af01ae174ab61bedeade38b55e492895b55656f576" => :mojave - sha256 "fb7f71cbce3b517ba8946cea53611c7577a2f1b1618a5f27dd0b67f23e278a25" => :high_sierra - end - - depends_on "sdl2" - depends_on "sdl2_mixer" - - # Upstream fix for SDL2_mixer >= 2.0.2 - patch do - url "https://github.com/cyxx/rawgl/commit/483492fb.diff?full_index=1" - sha256 "7af13dfa6cd1e042b6bbaf789da88471e326a411ccac3dac4c6c4c1124e8a153" - end - - 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 51216d7a87259..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 9 - - bottle do - sha256 "7df849270b754ff329d7e87c96f7338077269aea3a93244795982a61fcc0cdcc" => :catalina - sha256 "da904eb39e7e7fc75b4524cc61975dbc70977d99de1aaf1730b8d9eed7ffe8a5" => :mojave - sha256 "48128a9a74bd85f01a9b7026de2ac590b5f0f70e96849aa17311107a6e243f3f" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "aces_container" - depends_on "boost" - depends_on "ceres-solver" - depends_on "ilmbase" - depends_on "libraw" - - def install - ENV.cxx11 - 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/raxml-ng.rb b/Formula/raxml-ng.rb deleted file mode 100644 index 9bc19aa4a6b7a..0000000000000 --- a/Formula/raxml-ng.rb +++ /dev/null @@ -1,49 +0,0 @@ -class RaxmlNg < Formula - desc "RAxML Next Generation: faster, easier-to-use and more flexible" - homepage "https://sco.h-its.org/exelixis/web/software/raxml/" - url "https://github.com/amkozlov/raxml-ng.git", - :tag => "0.9.0", - :revision => "0a064e9a40f2e00828662795141659d946440c81" - license "AGPL-3.0" - - bottle do - cellar :any - sha256 "3deb449ed9ce39343945ed4b003a8f0ed3caaf84cdd240e990f3a1262edaa1da" => :catalina - sha256 "5b99cd4e7bbc3b688dc32e73c728fc5ff9c1cd7f567e584523c418285de77cd0" => :mojave - sha256 "8e3e83381139bacde52257180a17a9928e6c9c0a833776b245925970570f1937" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "cmake" => :build - depends_on "libtool" => :build - depends_on "gmp" - depends_on "open-mpi" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - - resource "example" do - url "https://sco.h-its.org/exelixis/resource/download/hands-on/dna.phy" - sha256 "c2adc42823313831b97af76b3b1503b84573f10d9d0d563be5815cde0effe0c2" - end - - def install - args = std_cmake_args + ["-DUSE_GMP=ON"] - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - mkdir "build_mpi" do - ENV["CC"] = "mpicc" - ENV["CXX"] = "mpicxx" - system "cmake", "..", *args, "-DUSE_MPI=ON", "-DRAXML_BINARY_NAME=raxml-ng-mpi" - system "make", "install" - end - end - - test do - testpath.install resource("example") - system "#{bin}/raxml-ng", "--msa", "dna.phy", "--start", "--model", "GTR" - end -end diff --git a/Formula/raylib.rb b/Formula/raylib.rb deleted file mode 100644 index 6c8ad8133f096..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/3.0.0.tar.gz" - sha256 "164d1cc1710bb8e711a495e84cc585681b30098948d67d482e11dc37d2054eab" - license "Zlib" - head "https://github.com/raysan5/raylib.git", :branch => "master" - - bottle do - cellar :any - sha256 "e4a993eb3b14cb555d76197d3515c2606782f0d36e37f511512acd3198a1f7a7" => :catalina - sha256 "889ab34922a972bcf77b40c2b931f02e136531f4716efe1d9ba8dec56ea99a58" => :mojave - sha256 "85002fb7e4a095c32af67f399b0974a3346595bfceb99589ddb42753aab0e13d" => :high_sierra - 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 342fa435ccdab..0000000000000 --- a/Formula/rbenv-aliases.rb +++ /dev/null @@ -1,21 +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" - license "MIT" - 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 ea7cec132e90b..0000000000000 --- a/Formula/rbenv-bundle-exec.rb +++ /dev/null @@ -1,21 +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" - license "MIT" - 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 57b81761019d2..0000000000000 --- a/Formula/rbenv-bundler-ruby-version.rb +++ /dev/null @@ -1,22 +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" - license "Unlicense" - 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 387b956ee1422..0000000000000 --- a/Formula/rbenv-bundler.rb +++ /dev/null @@ -1,21 +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" - license "Apache-2.0" - 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 f5463c16e98e4..0000000000000 --- a/Formula/rbenv-chefdk.rb +++ /dev/null @@ -1,23 +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" - license "MIT" - 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 36e8882622ef8..0000000000000 --- a/Formula/rbenv-communal-gems.rb +++ /dev/null @@ -1,20 +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" - license "MIT" - 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 71b80ec889f0a..0000000000000 --- a/Formula/rbenv-ctags.rb +++ /dev/null @@ -1,22 +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" - license "MIT" - 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 61ee31f5246e0..0000000000000 --- a/Formula/rbenv.rb +++ /dev/null @@ -1,44 +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.2.tar.gz" - sha256 "80ad89ffe04c0b481503bd375f05c212bbc7d44ef5f5e649e0acdf25eba86736" - license "MIT" - head "https://github.com/rbenv/rbenv.git" - - bottle do - cellar :any - sha256 "503ed6d818502f00f031b9f49461934e252b9bfba2876e90a326fc27bb1052d6" => :catalina - sha256 "d1019098dee8d037587069398e5ad04e6d736f834dc44ae73943bec46b10b260" => :mojave - sha256 "b5984102794a9d39388ca1f6ec77965aeea29b971cc00cb5af8ede8ee6c926d6" => :high_sierra - sha256 "873175a851e5aa4f5b3438072030b945c252f08a9a07760c64dc045e2cce4724" => :sierra - end - - depends_on "ruby-build" - - uses_from_macos "ruby" => :test - - def install - inreplace "libexec/rbenv" do |s| - s.gsub! '"${BASH_SOURCE%/*}"/../libexec', libexec - s.gsub! ":/usr/local/etc/rbenv.d", ":#{HOMEBREW_PREFIX}/etc/rbenv.d\\0" if HOMEBREW_PREFIX.to_s != "/usr/local" - 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 3ce96d74fbbfd..0000000000000 --- a/Formula/rbspy.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Rbspy < Formula - desc "Sampling profiler for Ruby" - homepage "https://rbspy.github.io/" - url "https://github.com/rbspy/rbspy/archive/v0.3.10.tar.gz" - sha256 "db675284c1275e30f7f99968f44896d3ebe35df65c1290d94418f6787e625821" - - bottle do - cellar :any_skip_relocation - sha256 "3c1cf783482e2b510aaff073a82ab4858b01feaa5327cc3f8666ca2cf2ea3756" => :catalina - sha256 "e0867eac5b9f432fa1218271c1f4ced724e23c99e79d6692e127cb07aaafbe91" => :mojave - sha256 "64e1e766071f1d8155011465545d66e78a20fc5fa0fb164a98c885eb3e452882" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - 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/rbtools.rb b/Formula/rbtools.rb deleted file mode 100644 index ff76e9990a306..0000000000000 --- a/Formula/rbtools.rb +++ /dev/null @@ -1,50 +0,0 @@ -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/04/98/10d5f67470c48e000cf9c95fb748f6a302eb01c0cb006d3ec37ff2f1e7c1/RBTools-1.0.3.tar.gz" - sha256 "ff4cea3ad7b2d1b1666b811021cf5047f1fbe9417428fb5133a40ede81e3e83c" - license "MIT" - head "https://github.com/reviewboard/rbtools.git" - - bottle do - cellar :any_skip_relocation - sha256 "5a748911d650da054e85d6c78c208664b64c9c78a22c6a44ad33959317893b2c" => :catalina - sha256 "cedc380f26e21667b91379462b7108f231c81a736650412f322c5256bb55a2cb" => :mojave - sha256 "6aa5f77cc2368f5e442635294a6878d1e3d738a0ac27083ba3856b255c0b3ba2" => :high_sierra - end - - depends_on "python@3.8" - - resource "colorama" do - url "https://files.pythonhosted.org/packages/76/53/e785891dce0e2f2b9f4b4ff5bc6062a53332ed28833c7afede841f46a5db/colorama-0.4.1.tar.gz" - sha256 "05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - resource "texttable" do - url "https://files.pythonhosted.org/packages/04/c6/7d2514d76fefba65bfe2fa4e1082c3adea9edef5a149a3027b8f2d5ee0eb/texttable-1.6.1.tar.gz" - sha256 "2b60a5304ccfbeac80ffae7350d7c2f5d7a24e9aab5036d0f82489746419d9b2" - end - - resource "tqdm" do - url "https://files.pythonhosted.org/packages/d0/0a/50a145091ce0c02db89d0342a59327c1ddeee206ef2991f09158d4e52406/tqdm-4.32.2.tar.gz" - sha256 "25d4c0ea02a305a688e7e9c2cdc8f862f989ef2a4701ab28ee963295f5b109ab" - end - - def install - virtualenv_install_with_resources - 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 diff --git a/Formula/rc.rb b/Formula/rc.rb deleted file mode 100644 index 07285c3a6a090..0000000000000 --- a/Formula/rc.rb +++ /dev/null @@ -1,27 +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 "http://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" - - bottle do - cellar :any_skip_relocation - sha256 "ab871610d857058773a87f70ad995a5e02fdeb1e6fe3d699e2051892ce60af84" => :catalina - sha256 "f14ceeb0e4315379e2052e39a24fafb529f841428b1a64e3009cfd62769b9e4a" => :mojave - sha256 "c2ee55c504be78889adc7d0cba962528f995bf222dc77ce5a6b930210851294e" => :high_sierra - sha256 "627e45477eabd5854e3c5f39af5290befd43d03b385d1b20f0ce4b49636fd2d9" => :sierra - end - - def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-edit=edit" - 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 5e7f79e96e0bb..0000000000000 --- a/Formula/rclone.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Rclone < Formula - desc "Rsync for cloud storage" - homepage "https://rclone.org/" - url "https://github.com/rclone/rclone/archive/v1.52.2.tar.gz" - sha256 "d85416de69eb4f21a7e1fa6b974677cc84d25c386f1b4e454b5b04c4cf8dbfa4" - license "MIT" - head "https://github.com/rclone/rclone.git" - - bottle do - cellar :any_skip_relocation - sha256 "f5853b3bac460032f54017dce763393f2e35297653d8ea5533402bf98147cef8" => :catalina - sha256 "f024d2cd3dd8a06a4d2a2c855ec3a5640c4fe158abab6b9f231eb58b51515ad3" => :mojave - sha256 "a713fb93e6d02b94b8a8dbe324269836b2f4e5b13ee53aa2acb996646aac3ba8" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args - 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/rcm.rb b/Formula/rcm.rb deleted file mode 100644 index bf749c9970fa6..0000000000000 --- a/Formula/rcm.rb +++ /dev/null @@ -1,31 +0,0 @@ -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.3.tar.gz" - sha256 "935524456f2291afa36ef815e68f1ab4a37a4ed6f0f144b7de7fb270733e13af" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "3fdc7266d9faa6015ef560254f036cc355445ee12861cb17a1c0bf5cc218b368" => :catalina - sha256 "3fdc7266d9faa6015ef560254f036cc355445ee12861cb17a1c0bf5cc218b368" => :mojave - sha256 "3fdc7266d9faa6015ef560254f036cc355445ee12861cb17a1c0bf5cc218b368" => :high_sierra - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (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/rcs.rb b/Formula/rcs.rb deleted file mode 100644 index 171d09e2534bd..0000000000000 --- a/Formula/rcs.rb +++ /dev/null @@ -1,43 +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 "48a77f06f4568a177b0b2e10fde07ee3c2833f34478472cf6b3ce94124d10ee2" => :catalina - 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 811e8ae278cd9..0000000000000 --- a/Formula/rdate.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "68597f7989ddba1ff853f54c0cf3adf36b3567268b69ca43d7b0795d290304b4" => :catalina - 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", "time-b-b.nist.gov" - end -end diff --git a/Formula/rdesktop.rb b/Formula/rdesktop.rb deleted file mode 100644 index f58f72142a53d..0000000000000 --- a/Formula/rdesktop.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Rdesktop < Formula - desc "UNIX client for connecting to Windows Remote Desktop Services" - homepage "https://www.rdesktop.org/" - url "https://github.com/rdesktop/rdesktop/releases/download/v1.9.0/rdesktop-1.9.0.tar.gz" - sha256 "473c2f312391379960efe41caad37852c59312bc8f100f9b5f26609ab5704288" - revision 1 - - bottle do - sha256 "4b504df078255fec4d85c94f9a815eb26e55cec1cd38ebf2755ead4d0bcda3be" => :catalina - sha256 "12d99aa6dd32ee04b5c0030def99ec91ec9de695d11bd7e062429e760a5ece94" => :mojave - sha256 "16afb599f321df0271f1b7b10eb93884b111feefc4cfb7b116ccf7b90dfede46" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gnutls" - depends_on "libao" - depends_on "libtasn1" - depends_on "nettle" - depends_on :x11 - - def install - args = %W[ - --prefix=#{prefix} - --disable-credssp - --enable-smartcard - --with-sound=libao - --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 diff --git a/Formula/rdfind.rb b/Formula/rdfind.rb deleted file mode 100644 index fb450b5fe64bc..0000000000000 --- a/Formula/rdfind.rb +++ /dev/null @@ -1,34 +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.4.1.tar.gz" - sha256 "30c613ec26eba48b188d2520cfbe64244f3b1a541e60909ce9ed2efb381f5e8c" - revision 1 - - bottle do - cellar :any - sha256 "e890406a4cbbd8d026a4c583644efa537433ac71c095a1e582b0454d85a87d00" => :catalina - sha256 "489e104d2c5e5d939439f5b100cd97e19ed070181d355b49fbd1ad2b3320d789" => :mojave - sha256 "2ce91e3b8a129c0fadb57fba46074e74e0d896287c23eb1844cd99e5eef093b1" => :high_sierra - end - - depends_on "nettle" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}" - 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_predicate testpath/"folder/file1", :exist? - assert_predicate testpath/"folder/file2", :exist? - refute_predicate testpath/"folder/file3", :exist? - end -end diff --git a/Formula/rdiff-backup.rb b/Formula/rdiff-backup.rb deleted file mode 100644 index da1ac3111eaee..0000000000000 --- a/Formula/rdiff-backup.rb +++ /dev/null @@ -1,30 +0,0 @@ -class RdiffBackup < Formula - desc "Reverse differential backup tool, over a network or locally" - homepage "https://rdiff-backup.net/" - url "https://github.com/rdiff-backup/rdiff-backup/releases/download/v2.0.3/rdiff-backup-2.0.3.tar.gz" - sha256 "04e2d2c28588d6bb4abb0b7dc7c922e5974f3cb3e7f0671ecc5a90b438dfd5e1" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "e6a3e3f38d6a9e87f10f92bcaeb8d2fcbe09826de82bac82a464848a8930cb60" => :catalina - sha256 "7be7e61ddb4176234d72473d11178a9d96d16f82abe10f9e9936966c05af60a2" => :mojave - sha256 "3074d321311ca9f8b8a001eaf0c92941aa1293630337116f4039d3188a1bea98" => :high_sierra - end - - depends_on "librsync" - depends_on "python@3.8" - - def install - ENV["ARCHFLAGS"] = "-arch x86_64" - system "python3", "setup.py", "build", "--librsync-dir=#{prefix}" - libexec.install Dir["build/lib.macosx*/rdiff_backup"] - libexec.install Dir["build/scripts-*/*"] - man1.install Dir["docs/*.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 cc117ab33d952..0000000000000 --- a/Formula/rds-command-line-tools.rb +++ /dev/null @@ -1,42 +0,0 @@ -class RdsCommandLineTools < Formula - desc "Amazon RDS command-line toolkit" - homepage "https://aws.amazon.com/developertools/2928" - url "https://rds-downloads.s3.amazonaws.com/RDSCli-1.19.004.zip" - sha256 "298c15ccd04bd91f1be457645d233455364992e7dd27e09c48230fbc20b5950c" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - env = { :JAVA_HOME => Formula["openjdk"].opt_prefix, :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 e700fe7b68785..0000000000000 --- a/Formula/rdup.rb +++ /dev/null @@ -1,39 +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" - license "GPL-3.0" - revision 2 - head "https://github.com/miekg/rdup.git" - - bottle do - cellar :any - sha256 "cf02c3004b312a3d90c6e47227f35e39319736270be76d7e4b0705568a21abec" => :catalina - sha256 "fb091d60536b72e20dc5e1448d9876e7b2eaefd16d40f2bfbf7bba48059af348" => :mojave - sha256 "417244fe66e0f47ab1afea65e9a52db01c15ac2f5db5e150ad65d80b2e85e2cc" => :high_sierra - 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/re-flex.rb b/Formula/re-flex.rb deleted file mode 100644 index 4c3d2bf752a1f..0000000000000 --- a/Formula/re-flex.rb +++ /dev/null @@ -1,37 +0,0 @@ -class ReFlex < Formula - desc "The 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/v2.1.1.tar.gz" - sha256 "75994065b7a8aeec0c41f86afe7d33b571a73f124a001ad9a4bfe500641a9670" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "e387dbf803291e3e6697bfc6fe9b3c8c69ad22d4210663f0a66c69afbece5f9a" => :catalina - sha256 "03c06176e433a06473c664278131b1ee0fc2556c85bc148bdceac58b4ef5871d" => :mojave - sha256 "70eb4ac6db4ea719aa42c8ecb081bef540d63025bdd5e28186f2eda239ced202" => :high_sierra - end - - depends_on "pcre2" - - 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_predicate testpath/"lex.yy.cpp", :exist? - end -end diff --git a/Formula/re2.rb b/Formula/re2.rb deleted file mode 100644 index ba87ef4fa129f..0000000000000 --- a/Formula/re2.rb +++ /dev/null @@ -1,36 +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/2020-07-01.tar.gz" - version "20200701" - sha256 "116c74f4490b5d348492bc3822292320c9e5effe18c87bcafb616be464043321" - head "https://github.com/google/re2.git" - - bottle do - cellar :any - sha256 "8bc4b0cf696adeedc101731d1c362785f0e0a91f740b87beba0cff589d6082f0" => :catalina - sha256 "2d57f1f245f2f94728fe6b305d724e22928a92f580f8a12b334737287c6aafcd" => :mojave - sha256 "4afe221faf13b3cc35165e59ae7f8ab6b541b4559fbf2a363691479c16a5a6d0" => :high_sierra - end - - def install - ENV.cxx11 - - system "make", "install", "prefix=#{prefix}" - 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 160b9a1974cc2..0000000000000 --- a/Formula/re2c.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Re2c < Formula - desc "Generate C-based recognizers from regular expressions" - homepage "https://re2c.org/" - url "https://github.com/skvadrik/re2c/releases/download/1.3/re2c-1.3.tar.xz" - sha256 "f37f25ff760e90088e7d03d1232002c2c2672646d5844fdf8e0d51a5cd75a503" - - bottle do - sha256 "374376ae451fe0e6ca93f17634e6353e8503cffa16018fbe44007997b865965d" => :catalina - sha256 "3cb716f9bcb81ad81cafc6e2e5a5be444caa297cec939213bcf2e805fb65f778" => :mojave - sha256 "7d9b2456469379900fc2abddc732710b822241a8a7bd2f734766a18b47b704a9" => :high_sierra - 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 aa0e1f0f8c338..0000000000000 --- a/Formula/react-native-cli.rb +++ /dev/null @@ -1,28 +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 "45feb7f98d12b2ee28b6e5f658e070f60a43571d4d8fab679cb513ac957ca7bd" => :catalina - 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 --version=react-native@0.59.x") - assert_match "Run instructions for Android", output - end -end diff --git a/Formula/readline.rb b/Formula/readline.rb deleted file mode 100644 index 3ac7b9ee828e8..0000000000000 --- a/Formula/readline.rb +++ /dev/null @@ -1,59 +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-8.0.tar.gz" - mirror "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz" - version "8.0.4" - sha256 "e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" - license "GPL-3.0" - - %w[ - 001 d8e5e98933cf5756f862243c0601cb69d3667bb33f2c7b751fe4e40b2c3fd069 - 002 36b0febff1e560091ae7476026921f31b6d1dd4c918dcb7b741aa2dad1aec8f7 - 003 94ddb2210b71eb5389c7756865d60e343666dfb722c85892f8226b26bb3eeaef - 004 b1aa3d2a40eee2dea9708229740742e649c32bb8db13535ea78f8ac15377394c - ].each_slice(2) do |p, checksum| - patch :p0 do - url "https://ftp.gnu.org/gnu/readline/readline-8.0-patches/readline80-#{p}" - mirror "https://ftpmirror.gnu.org/readline/readline-8.0-patches/readline80-#{p}" - sha256 checksum - end - end - - bottle do - cellar :any - sha256 "6ae1c8e7c783f32bd22c6085caa4d838fed7fb386da7e40ca47b87ec9b1237d6" => :catalina - sha256 "29f7102a730ab39c8312cad1e7e439f6da2a67c452ce2b3380581eb185a5d8e8" => :mojave - sha256 "896a3d50ce8962ba56e853bdd590fadeabc00ab36475d143d6c2bea5cc15bb28" => :high_sierra - end - - keg_only :shadowed_by_macos, "macOS provides BSD libedit" - - uses_from_macos "ncurses" - - def install - system "./configure", "--prefix=#{prefix}" - # There is no termcap.pc in the base system, so we have to comment out - # the corresponding Requires.private line. - # Otherwise, pkg-config will consider the readline module unusable. - inreplace "readline.pc", /^(Requires.private: .*)$/, "# \\1" - 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 373c7debf5490..0000000000000 --- a/Formula/readosm.rb +++ /dev/null @@ -1,29 +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 "aa0cbf07d9ba38940bf4a594dcfdcc9b915c64b9b6a1eb79907cb6d84c28d267" => :catalina - 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 605474cb188cb..0000000000000 --- a/Formula/reattach-to-user-namespace.rb +++ /dev/null @@ -1,25 +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.8.tar.gz" - sha256 "8b1b2785f2be19cc29083e7782270e6dcca67a66c66f11f785f4b26c446bbd77" - license "BSD-2-Clause" - head "https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard.git" - - bottle do - cellar :any_skip_relocation - sha256 "165edabd70a4acbdee2f3e09e9a37e9ca23b2d485ebe12d62511cef9c45fd757" => :catalina - sha256 "388e45300bf6cf3888a490878c9a03b97c06a52fe316a18d099ab97bddbed295" => :mojave - sha256 "adc59ad02ccf302e9c71c08d10a4eb95d5d210dbfebe9a00b41648b094c96f09" => :high_sierra - sha256 "1ec537d4be63bbcdaf3644506d0b272051fd2617db84c111152a33d8d0184339" => :sierra - 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 63ba3033aeeb0..0000000000000 --- a/Formula/reaver.rb +++ /dev/null @@ -1,34 +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" - license "GPL-2.0" - - bottle do - sha256 "73539f97836b5df80e030e429eb7f209dec3067c14b1bfd6753bcf7796c1f541" => :catalina - 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 ddc934ea37660..0000000000000 --- a/Formula/rebar.rb +++ /dev/null @@ -1,34 +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" - license "Apache-2.0" - head "https://github.com/rebar/rebar.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "9cf28b95d6114a6eb76e9378f117745bad0c4e304feebae67fb545a6166410b8" => :catalina - 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 3be676a0f7702..0000000000000 --- a/Formula/rebar3.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Rebar3 < Formula - desc "Erlang build tool" - homepage "https://github.com/erlang/rebar3" - url "https://github.com/erlang/rebar3/archive/3.13.2.tar.gz" - sha256 "e14cdc1f5b7d363a238a9f555f89e878bc4fc836c970571b41b90ee947f91505" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a3e0d373e2dd244b89478b684292c13653f70a88e1e808d2f636d8050504c6f5" => :catalina - sha256 "40e2a7521a41345876e63f5426ff7be467bcc5331c47c0769b244a5e82834226" => :mojave - sha256 "bdf484d6864b693b1f975b12d20cf4579259d6f905b4795a53006ad0587d5943" => :high_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 bde5201536df6..0000000000000 --- a/Formula/recode.rb +++ /dev/null @@ -1,41 +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" - revision 1 - - bottle do - sha256 "104914c7dd2db1afbafe61a025ebe41da5a88ed89ac8079c8e7d9150bb7a2e2d" => :catalina - sha256 "541408c872b2c16e999cb6f74fc94e8c340dfb1e2eb3a89aa21d3f118554219d" => :mojave - sha256 "65d9921e28f36fe7a0755d1cab44e4c2d2e5752ab25ed6c35cc7ee9e9072aee3" => :high_sierra - sha256 "d8d1838e5484c1bbdde1a1f4f57907a601ee32b6577c3c9364dde06e095a5605" => :sierra - 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 e6864b0fb951a..0000000000000 --- a/Formula/recon-ng.rb +++ /dev/null @@ -1,203 +0,0 @@ -class ReconNg < Formula - include Language::Python::Virtualenv - - desc "Web Reconnaissance Framework" - homepage "https://github.com/lanmaster53/recon-ng" - url "https://github.com/lanmaster53/recon-ng/archive/v5.1.1.tar.gz" - sha256 "470e293e931c23a0dc76e6915098e04db7f2e254a0639bb2c0383e0758c4fbc2" - license "GPL-3.0" - revision 1 - - bottle do - cellar :any - sha256 "7b4b03cc22d532fa9dbef0f5b705bbf8fb2df69d75d124f06f171e7f9609c048" => :catalina - sha256 "db7c9ed3ef46fb0b192f3fe4194902991b09afeeb56b766c9b212a8deed679b9" => :mojave - sha256 "497f43629d955ccd254e1db15fa6ac4ebaea01a34023e8ffbfa5c0a1a0511af2" => :high_sierra - end - - depends_on "libyaml" - depends_on "python@3.8" - - uses_from_macos "libxml2" - uses_from_macos "libxslt" - - # 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. - - resource "aniso8601" do - url "https://files.pythonhosted.org/packages/2f/45/f2aec388115ea65a2b95b3dc1ba058a8470675fe16bcd4678a44a59776ea/aniso8601-8.0.0.tar.gz" - sha256 "529dcb1f5f26ee0df6c0a1ee84b7b27197c3c50fc3a6321d66c544689237d072" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" - sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" - end - - 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/ec/c5/14bcd63cb6d06092a004793399ec395405edf97c2301dfdc146dfbd5beed/dnspython-1.16.0.zip" - sha256 "36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01" - end - - resource "flasgger" do - url "https://files.pythonhosted.org/packages/27/45/31ef09e68ef063b3ac5356fedbbf59f0adfc768ad7baa5f12835587dbd99/flasgger-0.9.4.tar.gz" - sha256 "37137b3292738580c42e03662bfb8731656a11d636e76f76d30e572c1fa5bd0d" - end - - resource "Flask" do - url "https://files.pythonhosted.org/packages/4e/0b/cb02268c90e67545a0e3a37ea1ca3d45de3aca43ceb7dbf1712fb5127d5d/Flask-1.1.2.tar.gz" - sha256 "4efa1ae2d7c9865af48986de8aeb8504bf32c7f3d6fdc9353d34b21f4b127060" - end - - resource "Flask-RESTful" do - url "https://files.pythonhosted.org/packages/67/65/84f3218666fc115497a13ff727f16d02374d07d1924cd4fd72e275294e8b/Flask-RESTful-0.3.8.tar.gz" - sha256 "5ea9a5991abf2cb69b4aac19793faac6c032300505b325687d7c305ffaa76915" - 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/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "itsdangerous" do - url "https://files.pythonhosted.org/packages/68/1a/f27de07a8a304ad5fa817bbe383d1238ac4396da447fa11ed937039fa04b/itsdangerous-1.1.0.tar.gz" - sha256 "321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" - sha256 "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" - sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "mechanize" do - url "https://files.pythonhosted.org/packages/77/1b/7e4b644108e4e99b136e52c6aae34873fcd267e3d2489f3bd2cff8655a59/mechanize-0.4.5.tar.gz" - sha256 "6355c11141f6d4b54a17fc2106944806b5db2711e60b120d15d83db438c333fd" - end - - resource "mistune" do - url "https://files.pythonhosted.org/packages/2d/a4/509f6e7783ddd35482feda27bc7f72e65b5e7dc910eca4ab2164daf9c577/mistune-0.8.4.tar.gz" - sha256 "59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e" - end - - resource "pyrsistent" do - url "https://files.pythonhosted.org/packages/9f/0d/cbca4d0bbc5671822a59f270e4ce3f2195f8a899c97d0d5abb81b191efb5/pyrsistent-0.16.0.tar.gz" - sha256 "28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "redis" do - url "https://files.pythonhosted.org/packages/05/5e/5e9a329ba600244f2d37f86131ccec19936d41cba0887240086b44cf4f54/redis-3.5.0.tar.gz" - sha256 "7378105cd8ea20c4edc49f028581e830c01ad5f00be851def0f4bc616a83cd89" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "rq" do - url "https://files.pythonhosted.org/packages/a0/a6/e5f731980c1535703369bc5cd0317fe7e6255b2abae6349566ca453e2f99/rq-1.3.0.tar.gz" - sha256 "49c9149fa9301f98d918f3042f36bed4252d37193d222a1ce8b0e25886442377" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - 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/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - 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/10/27/a33329150147594eff0ea4c33c2036c0eadd933141055be0ff911f7f8d04/Werkzeug-1.0.1.tar.gz" - sha256 "6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c" - end - - resource "XlsxWriter" do - url "https://files.pythonhosted.org/packages/6a/50/77a5d3377e0b5caff56609a9075160f57951015c274e6ba891e5ad96f61f/XlsxWriter-1.2.8.tar.gz" - sha256 "488e1988ab16ff3a9cd58c7656d0a58f8abe46ee58b98eecea78c022db28656b" - 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, "python3") - venv.pip_install resources - - # Replace shebang with virtualenv python - inreplace libexec/"recon-ng", "#!/usr/bin/env python3", "#!#{libexec}/bin/python" - - bin.install_symlink libexec/"recon-ng" - end - - test do - (testpath/"resource").write <<~EOS - options list - 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 dc0319656284b..0000000000000 --- a/Formula/recoverjpeg.rb +++ /dev/null @@ -1,25 +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.3.tar.gz" - sha256 "db996231e3680bfaf8ed77b60e4027c665ec4b271648c71b00b76d8a627f3201" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "7b9e6cc406462435f7efc7bf6686205f29beba8bc5f481c6bf754a53d37f9411" => :catalina - sha256 "89bd9fe522bc64508a3c2925edda2a3ae3cfc32e7ff59f7e70eb1069352129b2" => :mojave - sha256 "ce460e293cc4c4c5bf3650cf9860e7b06654017473c414dc88c1df9d82e8466e" => :high_sierra - sha256 "453b0d2c88be1b885407e38900ab0303481e9957ed5c160cb8e6456b6a2f81c2" => :sierra - 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 abfa07418689b..0000000000000 --- a/Formula/recutils.rb +++ /dev/null @@ -1,39 +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" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "a55cbe91cc2c264fe53e5e6425c1f3bb0c090f097f16098fdce766807a38ea6d" => :catalina - 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 e058357eef4c3..0000000000000 --- a/Formula/redex.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Redex < Formula - desc "Bytecode optimizer for Android apps" - homepage "https://fbredex.com/" - license "MIT" - revision 5 - head "https://github.com/facebook/redex.git" - - stable do - url "https://github.com/facebook/redex/archive/v2017.10.31.tar.gz" - sha256 "18a840e4db0fc51f79e17dfd749b2ffcce65a28e7ef9c2b3c255c5ad89f6fd6f" - - # Fix compilation on High Sierra - # Remove for next release - patch :DATA - end - - bottle do - cellar :any - sha256 "38b99353ae775a8a59145ff46abffa6214e13e5069574d6f37d647b99612092b" => :catalina - sha256 "9bfe343fbde2ce7c2f3fb1bf5429ee310c52efe5bd229dd51220542d312ee1aa" => :mojave - sha256 "76a9a498034b150c3fd5a32b10008ce37fe92f6657c0c978a84bb04bc9b8d4b8" => :high_sierra - 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.8" - - resource "test_apk" do - url "https://raw.githubusercontent.com/facebook/redex/fa32d542d4074dbd485584413d69ea0c9c3cbc98/test/instr/redex-test.apk" - sha256 "7851cf2a15230ea6ff076639c2273bc4ca4c3d81917d2e13c05edcc4d537cc04" - end - - def install - # https://github.com/facebook/redex/issues/457 - inreplace "Makefile.am", "/usr/include/jsoncpp", Formula["jsoncpp"].opt_include - - 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 - -__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/Formula/redir.rb b/Formula/redir.rb deleted file mode 100644 index ee7d5999f3ead..0000000000000 --- a/Formula/redir.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Redir < Formula - desc "Port redirector" - homepage "https://web.archive.org/web/20190817033513/sammy.net/~sammy/hacks/" - url "https://github.com/TracyWebTech/redir/archive/2.2.1-9.tar.gz" - version "2.2.1-9" - sha256 "7e6612a0eee1626a0e7d9888de49b9c0fa4b7f75c5c4caca7804bf73d73f01fe" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a811c4d0057b6d190a615a1da5cfb6dbb7321310f41da5141397295e31ffe354" => :catalina - sha256 "5681e33f5a5cb66759b5781989bef550558752c7cd3c1b3e4b590c5441a47082" => :mojave - sha256 "8a94df616b4af201fe512de86ab7310bed38136397ee53b37d6f0a4a2729282e" => :high_sierra - sha256 "cb7132731ff0121978a4e72208203d30d4fd91a10731fda2ac474619ab4472cb" => :sierra - sha256 "6109cd43a30457b4306b701f12088b6b7c1b40dddfb592b805e5ba4eb6b56158" => :el_capitan - sha256 "76c6d218033c27de7a5030e8d9fe1356e0a152e3a31e4210b589314643b9fd0d" => :yosemite - sha256 "19b1d25bc23f38eeecd22c9ed2eac4640e63e97d7a192e7bc71b822d5d29afe0" => :mavericks - 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 ff579f80ab4cf..0000000000000 --- a/Formula/redis-leveldb.rb +++ /dev/null @@ -1,34 +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 "d1c4da1f1f3e3afec9ec5d345743f9d49e85615fa3ffde619bad13e479ce670a" => :catalina - 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 ebf78d3ab63a2..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-6.0.5.tar.gz" - sha256 "42cf86a114d2a451b898fcda96acd4d01062a7dbaaad2801d9164a36f898f596" - head "https://github.com/antirez/redis.git", :branch => "unstable" - - bottle do - cellar :any - sha256 "c4c025a3642417b75e69be73cce61f05042107dd52b5f549d9c21eba8d2c2c1c" => :catalina - sha256 "fc2ff703029e0dfceff2ecde31730b3c8766ecac2cac8dd309270c3aa7b417ae" => :mojave - sha256 "be205c8cecbf8691db5f06b60e9a5dccbfe1e6bef2e1676fe0dbdf109b2fdf9f" => :high_sierra - end - - depends_on "openssl@1.1" - - 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 - - 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 530f7d68d34a2..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.13.tar.gz" - sha256 "862979c9853fdb1d275d9eb9077f34621596fec1843e3e7f2e2f09ce09a387ba" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "e557bee10881f773cfb59d593a874f628b4f7d7239acea2d9cfc1ab394619fba" => :catalina - sha256 "b61b4867149efc9201c51c984a55edcd0809e8a045b372c4bbf00c3b119afea4" => :mojave - sha256 "78a359ac74a02868ba481ae740d1d5046a89fc2e07020ddee6c73e491a162247" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! - - def install - 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 e658788ffe429..0000000000000 --- a/Formula/redis@4.0.rb +++ /dev/null @@ -1,73 +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.14.tar.gz" - sha256 "3b8c6ea4c9db944fe6ec427c1b11d912ca6c5c5e17ee4cfaea98bbda90724752" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "a3da3a3af97a3ca5c36c2399defd06e6cbbd0b105980b2d626f224e384adc017" => :catalina - sha256 "3cbcec571f8c420f2f6daacbef87ed462229f31e4d189be36bee7795a25fc050" => :mojave - sha256 "e2c6a35a448d8a5bc23182d07a499e7005681d522131253d9087de9c091ba8f5" => :high_sierra - end - - keg_only :versioned_formula - - deprecate! - - def install - 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 e5c2e02f0f666..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 "f30068d691ac2748619a288912235236e905f672b1f80a974e95425c5f102a10" => :catalina - sha256 "711bdaeff62854f878f02e8fab9782337ee87ebf7398757d7780eb3c8971310b" => :mojave - sha256 "407f9f1bd2a8682684660826fce445077c33fe3e7f1bfb05e7c0e265e2edacfe" => :high_sierra - sha256 "0ed03c897836946cbadf2e390bd25c79eeb6ad34ea1144ef69d8bf1dfbfaf2eb" => :sierra - sha256 "38eac3bae25aa65cbb7b688ecfaae91ab79c0c292e7505596ffc3b409bc8ca3b" => :el_capitan - sha256 "6047842b51137c968df4787bbfcf2080b4f32b73bb9d3412fa117ee9c1ff22d2" => :yosemite - sha256 "06d1c7c81a9803ad37cd40303987b90456fb565f4305965388bc8faff54c6db7" => :mavericks - 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 45a72140500d6..0000000000000 --- a/Formula/redo.rb +++ /dev/null @@ -1,66 +0,0 @@ -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/redo-0.42c.tar.gz" - sha256 "6f1600c82d00bdfa75445e1e161477f876bd2615eb4371eb1bcf0a7e252dc79f" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a1198ba3e8feb77e588367d6c829fccd07a89baa0eb85a0dddbd27d75d926fa6" => :catalina - sha256 "801a8288a70e024e715b8fdfdcf6b2eca37d51ddb5f3b64d0809bf929c46e180" => :mojave - sha256 "78615055158a19503f04f1ef8698b4dc9cf7f61753b9f5bc59bd3fe99c2c11d9" => :high_sierra - end - - depends_on "python@3.8" - - resource "Markdown" do - url "https://files.pythonhosted.org/packages/44/30/cb4555416609a8f75525e34cbacfc721aa5b0044809968b2cf553fd879c7/Markdown-3.2.2.tar.gz" - sha256 "1fafe3f1ecabfb514a5285fca634a53c1b32a81cb0feb154264d55bf2ff22c17" - end - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/c6/62/8a2bef01214eeaa5a4489eca7104e152968729512ee33cb5fbbc37a896b7/beautifulsoup4-4.9.1.tar.gz" - sha256 "73cc4d115b96f79c7d77c1c7f7a0a8d4c57860d1041df407dd1aae7f07a77fd7" - end - - def install - venv = virtualenv_create(libexec, Formula["python@3.8"].opt_bin/"python3") - venv.pip_install resources - # Set the interpreter so that ./do install can find the pip installed - # resources - ENV["DESTDIR"] = "" - ENV["PREFIX"] = prefix - system "./do", "install" - man1.install Dir["docs/*.1"] - end - - test do - assert_equal version.to_s, shell_output("#{bin}/redo --version").strip - # Test is based on https://redo.readthedocs.io/en/latest/cookbook/hello/ - (testpath/"hello.c").write <<~EOS - #include - - int main() { - printf(\"Hello, world!\\n\"); - return 0; - } - EOS - (testpath/"hello.do").write <<~EOS - redo-ifchange hello.c - cc -o $3 hello.c -Wall - EOS - assert_equal "redo hello", shell_output("redo hello 2>&1").strip - assert_predicate testpath/"hello", :exist? - assert_equal "Hello, world!\n", shell_output("./hello") - assert_equal "redo hello", shell_output("redo hello 2>&1").strip - assert_equal "", shell_output("redo-ifchange hello 2>&1").strip - touch "hello.c" - assert_equal "redo hello", shell_output("redo-ifchange hello 2>&1").strip - (testpath/"all.do").write("redo-ifchange hello") - (testpath/"hello").delete - assert_equal "redo all\nredo hello", shell_output("redo 2>&1").strip - end -end diff --git a/Formula/redpen.rb b/Formula/redpen.rb deleted file mode 100644 index b91b02ed27c55..0000000000000 --- a/Formula/redpen.rb +++ /dev/null @@ -1,26 +0,0 @@ -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" - - bottle :unneeded - - depends_on "openjdk" - - 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", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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").select { |line| line.include?("sampledoc-en.txt") }[0] - end -end diff --git a/Formula/redshift.rb b/Formula/redshift.rb deleted file mode 100644 index 861c14c6c5595..0000000000000 --- a/Formula/redshift.rb +++ /dev/null @@ -1,87 +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" - license "GPL-3.0" - revision 1 - - bottle do - sha256 "b40870e8bcb3d28fdc6fa5a1d7c232939973e4a73a38029afd0bc6f86c199b51" => :catalina - sha256 "197ca4060616fbb79a6e64b93760f60ef581d5d76f838ab099b97076e3e569fe" => :mojave - sha256 "f07311c326eb8c2310d509ffbcb5424d7783a1b0b675d47ac32026116086a39d" => :high_sierra - sha256 "89ab02396a2d3694923f8496217a5d5a47c1cc35e167205cf4bb74033de92ab3" => :sierra - 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 5189c24afb8d5..0000000000000 --- a/Formula/redsocks.rb +++ /dev/null @@ -1,26 +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 2 - - bottle do - cellar :any - sha256 "8e16eb3b2db86a06e6d6eae77a7f2fa20f59f7536ccbd0b9ad15778dfdf31212" => :catalina - sha256 "0da35f33e9faaf37c59043a5f20d1e4a89f5b543644332b856a525183f31fe96" => :mojave - sha256 "4f8630032cb62bc1cc9f318a837ea0f42964704e2310115696766c8a51f8b5f2" => :high_sierra - sha256 "9b528c2ce745b2402d15073e7da4fb62789789caa70e5373946ae1699f663b8b" => :sierra - 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 f1ccf6a1f99c4..0000000000000 --- a/Formula/redstore.rb +++ /dev/null @@ -1,27 +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" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "f473645a1903ac48caf0bea886c13636ca093c4ca6f57f83ce9ffc4864f88ee5" => :catalina - 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 d94e3680027c7..0000000000000 --- a/Formula/regex-opt.rb +++ /dev/null @@ -1,26 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "8a561d7a4dfadf25fd39bd5b19d6a8161a2f0d1be2c459cbe691be17aef85bc0" => :catalina - 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 9a701a2e8cadf..0000000000000 --- a/Formula/regina-rexx.rb +++ /dev/null @@ -1,29 +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.3/regina-rexx-3.9.3.tar.gz" - sha256 "1712aabee5978fdf57aeac82cd5a1a112b8980db8c5d7d045523f6a8b74b0531" - - bottle do - sha256 "7d39d4158fe41ecbd85c8c05f27d1b291883730ae1b745e1920e14ab41dfa0dc" => :catalina - sha256 "396fe213db316516ff28a135217b9c660969244494cb8807111e71b37d5451c9" => :mojave - sha256 "c8e204d8fb1154c31a4be3d571f4bbcc9e9b9ec5406feb61be82f7c567f9c8a7" => :high_sierra - 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 6c14d3dbfb139..0000000000000 --- a/Formula/regldg.rb +++ /dev/null @@ -1,26 +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 "6c69006dc5eb93be0eb6b39cb396e59e8c09aa5d65f56a216cd19753a7f28232" => :catalina - 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 574773b0494b5..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 "bfab3fd2fd8da4e4620d80a632d774b4742c6c34c5b73d89fafd3d246369fce6" => :catalina - sha256 "4226be6dc999a4467a061055cb36a68babe84a835f40f32a5a23f6137ddd59b4" => :mojave - sha256 "0a3365c8653023f2b4de8c5b6243aec2de7c180d1be982adcdbe58afc159800e" => :high_sierra - sha256 "326f7a21f696b7614a55a5edeb57e08482ff7b4c72506bcecff5deaa0552828e" => :sierra - sha256 "c9892df4f6aa5d58097e4cc4d62388ccbb1e0c02604b1139cfe829d47d992442" => :el_capitan - sha256 "d9a6303ff3935923ba53d093e95387caaf24460a4cd7fb7d330fa5c3988b551c" => :yosemite - sha256 "bf65e89ec4ca486b95f04c1c737627b2e0091af8a5c137795e521b96664d75e2" => :mavericks - 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 f6d59b3aa7c17..0000000000000 --- a/Formula/remake.rb +++ /dev/null @@ -1,31 +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.3%2Bdbg-1.5/remake-4.3%2Bdbg-1.5.tar.gz" - version "4.3-1.5" - sha256 "2e6eb709f3e6b85893f14f15e34b4c9b754aceaef0b92bb6ca3a025f10119d76" - license "GPL-3.0" - - bottle do - sha256 "ad7371427c7aa33cc28ac17f8f91fd6dd6a4e15b031a8aedabdc38a8da5ae7f7" => :catalina - sha256 "308ec13eaf2295d55be5d8dd92e9932a8fa9d25dd06001f43436fcd304b638e3" => :mojave - sha256 "835577312df4dc23a7ea0701b15b80db4cd233cfaf4efcfbd6bfea8f0f5b27d5" => :high_sierra - end - - depends_on "readline" - - 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 b0bf6e0904abb..0000000000000 --- a/Formula/remarshal.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Remarshal < Formula - include Language::Python::Virtualenv - - desc "Convert between TOML, YAML and JSON" - homepage "https://github.com/dbohdan/remarshal" - url "https://files.pythonhosted.org/packages/a2/98/8becf6a4ead798c1a517715fddfb73a8867ac58d833179a30f0dfc3dadf0/remarshal-0.12.0.tar.gz" - sha256 "1df0016b3ad47e78e0d4d016a0e0cc7ad5cd6a60232e8dcbc89af4ccc42eb172" - license "MIT" - head "https://github.com/dbohdan/remarshal.git" - - bottle do - cellar :any_skip_relocation - sha256 "ff34ba0168dc79cb1d3c060817d8bd13be31061f3883a2ba5d4ea0098c5a9f76" => :catalina - sha256 "5d09769f8c950743b049109c9f375746ead3d943c54eb4448ead95d1c8cbd76c" => :mojave - sha256 "6e5ebcde81702cb6616be074402cae0e7609c78e3c3fe2eb7357339d73c7924e" => :high_sierra - end - - depends_on "python@3.8" - - conflicts_with "msgpack-tools", :because => "both install 'json2msgpack' binary" - - resource "cbor2" do - url "https://files.pythonhosted.org/packages/ee/80/bc617b7fd89855649e48eb8242e09535e1b75371ec8389313fa0f97e2a70/cbor2-5.1.0.tar.gz" - sha256 "43ce11e8c2fe4971d386d1a60cf83bfa0a4a667b97668ba76acbf5e6398821aa" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "pytoml" do - url "https://files.pythonhosted.org/packages/f4/ba/98ee2054a2d7b8bebd367d442e089489250b6dc2aee558b000e961467212/pytoml-0.1.21.tar.gz" - sha256 "8eecf7c8d0adcff3b375b09fe403407aa9b645c499e5ab8cac670ac4a35f61e7" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "u-msgpack-python" do - url "https://files.pythonhosted.org/packages/75/c4/d9404382d0f7d9be27b5d13498d033a4faa83f325b3893e1c29a0faa83b9/u-msgpack-python-2.5.2.tar.gz" - sha256 "09c85a8af77376034396681e76bf30c249a4fd8e5ebb239f8a468d3655f210d0" - end - - def install - virtualenv_install_with_resources - - %w[toml yaml json msgpack].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 - assert_equal pipe_output("#{bin}/remarshal -if=yaml -of=msgpack", yaml), - pipe_output("#{bin}/remarshal -if=json -of=msgpack", json) - end -end diff --git a/Formula/remctl.rb b/Formula/remctl.rb deleted file mode 100644 index c685cd87b067b..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.16.tar.xz" - sha256 "d1c444ab6c817c82413ec9686d178b9d760cd684eae7d24782bbe5c9ce5b0908" - - bottle do - cellar :any - sha256 "0c94a53cbd26ed882a5b4c8f973562120dd1cf0a6f76457d392cc5fe59d5ee89" => :catalina - sha256 "3472db7e7bd12cb03c12b6dc2db8168439a24eef73bde7fbec775a41db628042" => :mojave - sha256 "777fb3b5f47e4da6caeacba3c4959a38ebf7113a89555aebe74d41854c70104a" => :high_sierra - 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 002043342b889..0000000000000 --- a/Formula/remind.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Remind < Formula - desc "Sophisticated calendar and alarm" - homepage "https://dianne.skoll.ca/projects/remind/" - url "https://dianne.skoll.ca/projects/remind/download/remind-03.03.01.tar.gz" - sha256 "d1a164d1c2d1e963d5f1f251457a8065cae12f36e3914cac1e54275180499478" - - bottle do - cellar :any_skip_relocation - sha256 "cb1470b7207336fee89f03b6a7d540ff21720ec27f3a18abb0c938a815efca05" => :catalina - sha256 "09c627b85760732ba5a9e52e184458e1ea6be7b69d35cad34fe1c0e2d6189d4c" => :mojave - sha256 "2c99a0b697e0b93cd8d43c39fd81f4c220c280ee2c260e573c39ff2f749e01b6" => :high_sierra - 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", "--prefix=#{prefix}" - system "make", "install" - end - - test do - (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 5c493f5faee6f..0000000000000 --- a/Formula/reminiscence.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Reminiscence < Formula - desc "Flashback engine reimplementation" - homepage "http://cyxdown.free.fr/reminiscence/" - url "http://cyxdown.free.fr/reminiscence/REminiscence-0.4.6.tar.bz2" - sha256 "a1738ca7df64cd34e75a0ada3110e70ed495260fda813bc9d8722b521fc6fee0" - - bottle do - cellar :any - rebuild 1 - sha256 "a587449c5846115b5bb4100e1ec50af6256e48bc770c35dad4985850ab8e1b3c" => :catalina - sha256 "a1a752e53d40822409ea80a273b38d307e6e6afdfc52d856dee8e8dcc6ae32d8" => :mojave - sha256 "537b631728a9b8e322cc835d20b3d8bac832c5c14ebc0bdedde43fe0b607bcd2" => :high_sierra - 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" - - uses_from_macos "zlib" - - resource "tremor" do - url "https://gitlab.xiph.org/xiph/tremor.git", - :revision => "7c30a66346199f3f09017a09567c6c8a3a0eedc8" - end - - def install - resource("tremor").stage do - system "./autogen.sh", "--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 806979d94e456..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 "29c6fe9c0e66e571fd15e9593e94d4a27feb3dd4bb5f0091e8fc6d5dc32d3727" => :catalina - sha256 "dd045987a704bd9690e5466337f7a55105c25c98807e430c74ad4b8702f4b292" => :mojave - sha256 "7cf1fe07fb7a4cd0e6171f65a8fda8187973c879b8853e416c39282527f1c0ef" => :high_sierra - sha256 "bf3e11211d6884d8969fc99ccf8a42b3132dc48bd3100492a442eb5a41fdbd88" => :sierra - sha256 "966876dfcc9f36c4bc3d1358a9a8500c79d9324ebd8697033571146f1e482685" => :el_capitan - sha256 "e8ca6bb656f8daca43c6ce446dfff66625fabdedda81604745f0960b419e422a" => :yosemite - sha256 "c7be0857bfd182f310a700521b5989c36e98ea579a2cf14417d42aa4036448dd" => :mavericks - 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 6b66120e6e77b..0000000000000 --- a/Formula/rename.rb +++ /dev/null @@ -1,30 +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.601.tar.gz" - sha256 "e8fd67b662b9deddfb6a19853652306f8694d7959dfac15538a9b67339c87af4" - head "https://github.com/ap/rename.git" - - bottle do - cellar :any_skip_relocation - sha256 "494aba9267348e401431cbcb1193df1c1138fda69d66aaa3c7ee229be51277fd" => :catalina - sha256 "13c919a8edd4935b7e5462a172b8336c0425a627f76fd3aa72c652c35ea233cc" => :mojave - sha256 "86b4b8a450b749f6fd84d86334d2d9f3a1c57fa3832f6e69d602369b4c6e5300" => :high_sierra - sha256 "ed4a9403e533b143f8f1ee307035b28c995a13970c64ed7646719e12688ec7a0" => :sierra - 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 96b0efb61d8b0..0000000000000 --- a/Formula/renameutils.rb +++ /dev/null @@ -1,45 +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 3 - - bottle do - cellar :any - sha256 "2ec48c66fea9f53acf2b2ba3b726e6f7a9ff35778a3fb574fc59e7c6d01f681a" => :catalina - sha256 "4f360267cba9842ef85e9cfbb1baaf73e9576dccfb924aade7f0ad6bbf0bf605" => :mojave - sha256 "d25dc64bcc5d30e7695c65a93f7285849b57fdbdb18bf7d5e7bc22f0786cb14c" => :high_sierra - 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/formula-patches/85fa66a9/renameutils/0.12.0.patch" - sha256 "ed964edbaf388db40a787ffd5ca34d525b24c23d3589c68dc9aedd8b45160cd9" - end - - 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 diff --git a/Formula/reop.rb b/Formula/reop.rb deleted file mode 100644 index 836e1bc7f29fd..0000000000000 --- a/Formula/reop.rb +++ /dev/null @@ -1,47 +0,0 @@ -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" - - bottle do - cellar :any - sha256 "9a871be9b2fa42aa2d9e5035712733c4b764c4eb7497958389018f0451a16cd6" => :catalina - sha256 "ef7c8dc250f93b18a84fc4b22006f1b5c59b34bf5d3fd3caa07da03184a0cf61" => :mojave - sha256 "e0f5cdb5c8b3af4919afa8b442eba703dec9ef9f5b7a25cbe56440e6c646d3b2" => :high_sierra - sha256 "1fdb2fd33a36c6cc57971c3399e2536ee2548acfde8761f0536cee33b2f61354" => :sierra - 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/reorder-python-imports.rb b/Formula/reorder-python-imports.rb deleted file mode 100644 index 3d300c205e5c4..0000000000000 --- a/Formula/reorder-python-imports.rb +++ /dev/null @@ -1,41 +0,0 @@ -class ReorderPythonImports < Formula - include Language::Python::Virtualenv - - desc "Rewrites source to reorder python imports" - homepage "https://github.com/asottile/reorder_python_imports" - url "https://github.com/asottile/reorder_python_imports/archive/v2.3.0.tar.gz" - sha256 "c544b19a2900220e6a8d1a070dd651ce0c6885ca592f4e4af99f7551b6d9807b" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "e2e9009355ccc06372f8ac21000c38de63d468d6f15a99a5c3a948ecf7506fe6" => :catalina - sha256 "b5e2632c0620a4e06a92b641faf4db96773db00f17b12995c44cbd455fe7d277" => :mojave - sha256 "a9613b97997b4137fe7b8fe56717691711573e320af98a10a4cab03694874f8c" => :high_sierra - end - - depends_on "python@3.8" - - resource "aspy.refactor-imports" do - url "https://files.pythonhosted.org/packages/34/6e/37cbfba703b06fca29c38079bef76cc01e8496197701fff8f0dded3b5b38/aspy.refactor_imports-2.1.1.tar.gz" - sha256 "eec8d1a73bedf64ffb8b589ad919a030c1fb14acf7d1ce0ab192f6eedae895c5" - end - - resource "cached-property" do - url "https://files.pythonhosted.org/packages/57/8e/0698e10350a57d46b3bcfe8eff1d4181642fd1724073336079cb13c5cf7f/cached-property-1.5.1.tar.gz" - sha256 "9217a59f14a5682da7c4b8829deadbfc194ac22e9908ccf7c8820234e80a1504" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"test.py").write <<~EOS - from os import path - import sys - EOS - 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/repl.rb b/Formula/repl.rb deleted file mode 100644 index c7a2cd6c1898b..0000000000000 --- a/Formula/repl.rb +++ /dev/null @@ -1,18 +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" - license "MIT" - - 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 9d3140db50f39..0000000000000 --- a/Formula/repo.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Repo < Formula - desc "Repository tool for Android development" - homepage "https://source.android.com/source/developing.html" - url "https://github.com/GerritCodeReview/git-repo.git", - :tag => "v2.8", - :revision => "60fc51bb1dcf8970189a544c2ca75f2cdcfdb6f8" - license "Apache-2.0" - 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") - end -end diff --git a/Formula/reposurgeon.rb b/Formula/reposurgeon.rb deleted file mode 100644 index cb1c6bb7039e4..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.48", - :revision => "911d5c1168f7839855b577ea43971c7c35cacef8" - head "https://gitlab.com/esr/reposurgeon.git" - - bottle do - cellar :any_skip_relocation - sha256 "aba7163a5984e3fb606b59b70e6c4233cf3d0aa69e400bad156c2a41c4800f3e" => :catalina - sha256 "7e3c1b86b32535b698098ffc82231ce1cde18512ffce1ea21cc7b70d0a85a535" => :mojave - sha256 "22f79c6f4746a5fcffe63be2247c748e5335082384a9309bdba061ff686813d0" => :high_sierra - end - - depends_on "asciidoc" => :build - depends_on "go" => :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/reprepro.rb b/Formula/reprepro.rb deleted file mode 100644 index 9a585f96306d0..0000000000000 --- a/Formula/reprepro.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Reprepro < Formula - desc "Debian package repository manager" - homepage "https://salsa.debian.org/brlink/reprepro" - url "https://deb.debian.org/debian/pool/main/r/reprepro/reprepro_5.3.0.orig.tar.gz" - sha256 "5a5404114b43a2d4ca1f8960228b1db32c41fb55de1996f62bc1b36001f3fab4" - revision 2 - - bottle do - cellar :any - sha256 "b4588ca9f8be12fdf56fe66d846ef9dc0c0508fd436fbb3065c0009b7bcd6939" => :catalina - sha256 "70363262c41a09895d4d43a2bd25302ed76e9e9d187edde3512ec917e5a96b48" => :mojave - sha256 "86a0418ad19243949f1dbfb621970022fab9eb409c5690e4bca2d12f441644dd" => :high_sierra - end - - depends_on "berkeley-db@4" - depends_on "gcc" - depends_on "gpgme" - depends_on "libarchive" - depends_on "xz" - - fails_with :clang do - cause "No support for GNU C nested functions" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-gpgme=#{Formula["gpgme"].opt_lib}", - "--with-libarchive=#{Formula["libarchive"].opt_lib}", - "--with-libbz2=yes", - "--with-liblzma=#{Formula["xz"].opt_lib}" - 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/rest-shell.rb b/Formula/rest-shell.rb deleted file mode 100644 index 68efa0972a3d2..0000000000000 --- a/Formula/rest-shell.rb +++ /dev/null @@ -1,17 +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" - 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 26643d97d0790..0000000000000 --- a/Formula/restic.rb +++ /dev/null @@ -1,50 +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.6.tar.gz" - sha256 "1cc8655fa99f06e787871a9f8b5ceec283c856fa341a5b38824a0ca89420b0fe" - license "BSD-2-Clause" - head "https://github.com/restic/restic.git" - - bottle do - cellar :any_skip_relocation - sha256 "cfbf35af0c86f5893fbecfb60085c49edd22ed8eb0861e6921cd85922680de44" => :catalina - sha256 "92b98a560b99f2a295e8e40689cd2fa9b8f04df62d6846fed8d13b63e0c2f960" => :mojave - sha256 "736201b7e7014d36f9ccd79a1deee1f577b231975628a2c405ca424882f00e7f" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - ENV["CGO_ENABLED"] = "1" - - system "go", "run", "-mod=vendor", "build.go", "--enable-cgo" - - 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 343eff4ee40f7..0000000000000 --- a/Formula/restund.rb +++ /dev/null @@ -1,36 +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 - rebuild 1 - sha256 "904de3a9379dac2c1215b992e1aff7cfd42e09f288e5b88df1969c9ba1675050" => :catalina - sha256 "7ec584f71cc4b6f54f30c1dfcae29e11f110b8f26506e1154e5646ce326923b1" => :mojave - sha256 "2d5b243b9971a38fdc00c1d2d332e7875aa17f74ea4d1f083eeacbfaa38d004f" => :high_sierra - sha256 "ea2c7e202307b9a48ed65020570d5ce3236b556757263cb16c35143baa92ca79" => :sierra - end - - depends_on "libre" - - def install - # Configuration file is hardcoded - inreplace "src/main.c", "/etc/restund.conf", "#{etc}/restund.conf" - - 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 4204ce2b0288d..0000000000000 --- a/Formula/restview.rb +++ /dev/null @@ -1,89 +0,0 @@ -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://github.com/mgedmin/restview/archive/2.9.2.tar.gz" - sha256 "155a5744111d3d1f9e7903f4445ff41c04b42c0be29705f57fb98b3d33b283bd" - license "GPL-3.0" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "5ffb757282d3542b8a7b1059e56f3bbf0a952c43c4a630a4aec43050cdf35285" => :catalina - sha256 "126c2097c8981aba77b79069e90803191677fc894f78664eaab9926603766931" => :mojave - sha256 "d91b7a7a04bd5bac8b29cb581bab4929488d0b1f3cbb084ceaf9b49996913099" => :high_sierra - end - - depends_on "python@3.8" - - resource "bleach" do - url "https://files.pythonhosted.org/packages/a9/ac/dc881fca3ac66d6f2c4c3ac46633af4e9c05ed5a0aa2e7e36dc096687dd7/bleach-3.1.5.tar.gz" - sha256 "3c4c520fdb9db59ef139915a5db79f8b51bc2a7257ea0389f30c846883430a4b" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/2f/e0/3d435b34abd2d62e8206171892f174b180cd37b09d57b924ca5c2ef2219d/docutils-0.16.tar.gz" - sha256 "c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/65/37/83e3f492eb52d771e2820e88105f605335553fe10422cba9d256faeb1702/packaging-20.3.tar.gz" - sha256 "3c292b474fda1671ec57d46d739d072bfd495a4f51ad01a055121d81e952b7a3" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "readme-renderer" do - url "https://files.pythonhosted.org/packages/13/d6/8e241e4e40404a1f83567d6a29798abee0b9b50b08c8efc815ce11c41df9/readme_renderer-26.0.tar.gz" - sha256 "cbe9db71defedd2428a1589cdc545f9bd98e59297449f69d721ef8f1cfced68d" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - 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 - venv = virtualenv_create(libexec, "python3.8") - - res = resources.reject { |r| r.name == "sample" } - venv.pip_install res - - venv.pip_install_and_link buildpath - end - - test do - testpath.install resource("sample") - - port = free_port - begin - pid = fork do - exec bin/"restview", "--listen=#{port}", "--no-browser", "sample.rst" - end - sleep 3 - 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 36844eda0e152..0000000000000 --- a/Formula/resty.rb +++ /dev/null @@ -1,63 +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" - license "MIT" - head "https://github.com/micha/resty.git" - - bottle do - cellar :any_skip_relocation - sha256 "cb5ad84cbacf18282a5ad172a48471d0e7ac007e4799f358fff049b8309aa27f" => :catalina - 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 5c733c20967eb..0000000000000 --- a/Formula/rethinkdb.rb +++ /dev/null @@ -1,77 +0,0 @@ -class Rethinkdb < Formula - desc "The open-source database for the realtime web" - homepage "https://rethinkdb.com/" - url "https://download.rethinkdb.com/repository/raw/dist/rethinkdb-2.4.0.tgz" - sha256 "bfb0708710595c6762f42e25613adec692cf568201cd61da74c254f49fa9ee4c" - head "https://github.com/rethinkdb/rethinkdb.git", :branch => "next" - - bottle do - cellar :any - sha256 "1c2ef66f6bf7d2efdf55b377032955905186c74a0dacf1306665671931e1159c" => :catalina - sha256 "5db706fb3f48f378771f5076d167e3d3dc5441b328e3b194e7337fe7bd7dde97" => :mojave - sha256 "7d37fba07988bc8adc4ef0dece038adf443b02d868fdf22d018360fb8958383b" => :high_sierra - end - - depends_on "boost" => :build - depends_on :macos # Due to Python 2 (v8 and gyp fail to build) - # https://github.com/Homebrew/linuxbrew-core/pull/19614 - # https://github.com/rethinkdb/rethinkdb/pull/6401 - depends_on "openssl@1.1" - - uses_from_macos "curl" - - def install - args = ["--prefix=#{prefix}"] - args += ["--allow-fetch"] if build.head? - - # 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 4b4ac72ced783..0000000000000 --- a/Formula/rex.rb +++ /dev/null @@ -1,239 +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/F/FE/FERKI/Rex-1.11.0.tar.gz" - sha256 "73269e5ddad0b88f1cf269173a9eff2f2addff230c303112fda5f43e269c49c5" - - bottle do - cellar :any_skip_relocation - sha256 "de0ca43e439023982668c5563f41340a82d3ae8c45159b457749c1ab0f15d3c5" => :catalina - sha256 "24da3a602c3b434d0069244f546ed33f14e8bd3bbee1f7a99b91ca97a48b0c37" => :mojave - sha256 "dc0b2bb90327f2fc716eb95655366fd7a3ac36d7880f25a69777c9976260d508" => :high_sierra - end - - uses_from_macos "perl" - - 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.4229.tar.gz" - sha256 "1fe491a6cda914b01bc8e592faa2b5404e9f35915ca15322f8f2a8d8f9008c18" - 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::Choose" do - url "https://cpan.metacpan.org/authors/id/H/HE/HERMES/Clone-Choose-0.010.tar.gz" - sha256 "5623481f58cee8edb96cd202aad0df5622d427e5f748b253851dfd62e5123632" - 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-1.002001.tar.gz" - sha256 "a82c334c02ce4b0f9ea77c67bf77738f76a9b8aa4bae5c7209d1c76453d3c48d" - end - - resource "ExtUtils::MakeMaker" do - url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.44.tar.gz" - sha256 "52a18f8271250faf5f3527499dd2b78d3b4fd3b064408d0cfdda9a3538887188" - 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 "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/O/OA/OALDERS/HTTP-Cookies-6.08.tar.gz" - sha256 "49ebb73576eb41063c04bc079477df094496deec805ae033f3be338c23c3af59" - end - - resource "HTTP::Daemon" do - url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Daemon-6.06.tar.gz" - sha256 "fc03a161b54553f766457a4267e7066767f54ad01cacfe9a91d7caa2a0319bad" - 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 "HTTP::Message" do - url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Message-6.22.tar.gz" - sha256 "970efd151b81c95831d2a5f9e117f8032b63a1768cd2cd3f092ad634c85175c3" - 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.300.tar.gz" - sha256 "402fd52191d51415bb7163b7673fb4a108e3156493d7df931b8db4b2af757c40" - 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 "JSON::MaybeXS" do - url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/JSON-MaybeXS-1.004000.tar.gz" - sha256 "59bda02e8f4474c73913723c608b539e2452e16c54ed7f0150c01aad06e0a126" - 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 "List::MoreUtils" do - url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-0.428.tar.gz" - sha256 "713e0945d5f16e62d81d5f3da2b6a7b14a4ce439f6d3a7de74df1fd166476cc2" - end - - resource "List::MoreUtils::XS" do - url "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-XS-0.428.tar.gz" - sha256 "9d9fe621429dfe7cf2eb1299c192699ddebf060953e5ebdc1b4e293c6d6dd62d" - end - - resource "Net::HTTP" do - url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/Net-HTTP-6.19.tar.gz" - sha256 "52b76ec13959522cae64d965f15da3d99dcb445eddd85d2ce4e4f4df385b2fc4" - end - - resource "Net::OpenSSH" do - url "https://cpan.metacpan.org/authors/id/S/SA/SALVA/Net-OpenSSH-0.78.tar.gz" - sha256 "8f10844542a2824389decdb8edec7561d8199dc5f0250e849a0bb56f7aee880c" - end - - resource "PadWalker" do - url "https://cpan.metacpan.org/authors/id/R/RO/ROBIN/PadWalker-2.3.tar.gz" - sha256 "2a6c44fb600861e54568e74081a8d1f121f0060076069ceab34b1ae89d6588cf" - 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.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 "URI" do - url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-1.76.tar.gz" - sha256 "b2c98e1d50d6f572483ee538a6f4ccc8d9185f91f0073fd8af7390898254413e" - 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.46.tar.gz" - sha256 "d331332491c51cccfb4cb94ffc44f9cd73378e618498d4a37df9e043661c515d" - end - - resource "XML::Simple" do - url "https://cpan.metacpan.org/authors/id/G/GR/GRANTM/XML-Simple-2.25.tar.gz" - sha256 "531fddaebea2416743eb5c4fdfab028f502123d9a220405a4100e68fc480dbf8" - end - - resource "YAML" do - url "https://cpan.metacpan.org/authors/id/T/TI/TINITA/YAML-1.30.tar.gz" - sha256 "5030a6d6cbffaf12583050bf552aa800d4646ca9678c187add649227f57479cd" - 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" - - 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/rex", "#!perl", "#!/usr/bin/env perl" - 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? "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}", - "INC=-I#{MacOS.sdk_path}/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" - system "make", "PERL5LIB=#{ENV["PERL5LIB"]}" - system "make", "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 fea430718a4c2..0000000000000 --- a/Formula/rfcmarkup.rb +++ /dev/null @@ -1,25 +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 "044f47bac55957d49b3665d92e0e33b1bc18a42a9cd465f214b6c08b6838495d" => :catalina - 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 ab29e66fc18ef..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.include?("\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 053f2512489c2..0000000000000 --- a/Formula/rgbds.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Rgbds < Formula - desc "Rednex GameBoy Development System" - homepage "https://github.com/rednex/rgbds" - url "https://github.com/rednex/rgbds/archive/v0.4.0.tar.gz" - sha256 "18be4a8ec79e43a6343fa128c6790dae33a229e0ed10e3dcccbbdc0b0c363933" - license "MIT" - head "https://github.com/rednex/rgbds.git" - - bottle do - cellar :any - sha256 "471290b03b60ce630234ba35fedd6108e77a212e9a87cb81998a7c64c9eeac0e" => :catalina - sha256 "23c50475699f8699d083f39bdfc9ca4b60c703f0c818ba22e8112d05b71a70ae" => :mojave - sha256 "4c719b61b59c50d80cae21b6ea5bc8d47d54a653d4ecf403650efefa30927c8f" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libpng" - - def install - system "make", "install", "PREFIX=#{prefix}", "mandir=#{man}" - end - - test do - # https://github.com/rednex/rgbds/blob/HEAD/test/asm/assert-const.asm - (testpath/"source.asm").write <<~EOS - SECTION "rgbasm passing asserts", ROM0[0] - db 0 - assert @ - EOS - system "#{bin}/rgbasm", "source.asm" - end -end diff --git a/Formula/rgf.rb b/Formula/rgf.rb deleted file mode 100644 index b5bf78007841a..0000000000000 --- a/Formula/rgf.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Rgf < Formula - desc "Regularized Greedy Forest library" - homepage "https://github.com/RGF-team/rgf" - url "https://github.com/RGF-team/rgf/archive/3.8.0.tar.gz" - sha256 "f21dce9b877bf802a5699ce58b1b87346337d3be838ddfe78b18cfec45813af7" - - bottle do - cellar :any_skip_relocation - sha256 "472e412b8f6af779fb7764695a5bc621bc6b9b4c2a2c3cd238944e98e8eb7d41" => :catalina - sha256 "768ae58c3d372fdee93dd60893b83fe626be76e25e6ebb099e666e90e1bcfa21" => :mojave - sha256 "5091b77f8e7323e7518d42ad0cbe27b0328f24c6931ed3a5e5fd85fa4828d294" => :high_sierra - end - - depends_on "cmake" => :build - - def install - cd "RGF" do - mkdir "build" do - system "cmake", *std_cmake_args, ".." - system "make" - system "make", "install" # installs to bin/rgf - 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/rgxg.rb b/Formula/rgxg.rb deleted file mode 100644 index 06d5559fd5b96..0000000000000 --- a/Formula/rgxg.rb +++ /dev/null @@ -1,23 +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.2/rgxg-0.1.2.tar.gz" - sha256 "554741f95dcc320459875c248e2cc347b99f809d9555c957d763d3d844e917c6" - license "Zlib" - - bottle do - cellar :any - sha256 "4a07550d93bedfa3b2ac3cb77a8484951321697ca9384d2c2a0301ea261aa954" => :catalina - sha256 "b410fe9ea150e0fb52326e4f7ce6642f946098b0713c5741c64699de3f55f762" => :mojave - sha256 "286318be76fc55c094da739c44176d5babd814df1e4f0462711aea283db042f5" => :high_sierra - 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 e205310a99025..0000000000000 --- a/Formula/rhash.rb +++ /dev/null @@ -1,28 +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.9/rhash-1.3.9-src.tar.gz" - sha256 "42b1006f998adb189b1f316bf1a60e3171da047a85c4aaded2d0d26c1476c9f6" - license "0BSD" - head "https://github.com/rhash/RHash.git" - - bottle do - sha256 "fc4f0d1311c5481c4b53bd1a05644531a986eb501aa1e853131125573cbd0d6a" => :catalina - sha256 "cb70f24905e35fca8812456e91f34d24aa71c54f05bb72c04c4b94610564ab37" => :mojave - sha256 "557acccf2751cbfdd83e6e8e2ec2c6cf5f87a90f0c7a0be9b3d99de0d2f0f6b6" => :high_sierra - end - - def install - system "./configure", "--prefix=#{prefix}" - system "make" - system "make", "install" - lib.install "librhash/librhash.dylib" - system "make", "-C", "librhash", "install-lib-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 779c1d02125d6..0000000000000 --- a/Formula/rhino.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Rhino < Formula - desc "JavaScript engine" - homepage "https://www.mozilla.org/rhino/" - url "https://github.com/mozilla/rhino/releases/download/Rhino1_7_12_Release/rhino-1.7.12.zip" - sha256 "59f074c3b2445381e4bb201eb65aa1e5f2afce021ebcad90003f32b480fbaaba" - license "MPL-2.0" - - 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/riemann-client.rb b/Formula/riemann-client.rb deleted file mode 100644 index 20d70ea53caa7..0000000000000 --- a/Formula/riemann-client.rb +++ /dev/null @@ -1,35 +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" - revision 1 - head "https://github.com/algernon/riemann-c-client.git" - - bottle do - cellar :any - sha256 "3227f7774fb1ff0e7daeb4b8c75c0e976a928593b85a8ef2726542ef3bab634b" => :catalina - sha256 "1a11eb37bbb1021c3aee0e2e5173dba58fb48172418cf632e76811f08483a39d" => :mojave - sha256 "245fe4d845c711bc9d1b99f0697d1cb98811633a608c62f415a4e2c0f05ebd1a" => :high_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 17f53eea71390..0000000000000 --- a/Formula/riemann.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Riemann < Formula - desc "Event stream processor" - homepage "https://riemann.io/" - url "https://github.com/riemann/riemann/releases/download/0.3.5/riemann-0.3.5.tar.bz2" - sha256 "2c0f7de308417af890d33f2a9ac40649337cf1b7e0e0c930d8e69f151e15fbb4" - license "EPL-1.0" - - 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/riff.rb b/Formula/riff.rb deleted file mode 100644 index 5a2ddb35ff648..0000000000000 --- a/Formula/riff.rb +++ /dev/null @@ -1,35 +0,0 @@ -require "open3" - -class Riff < Formula - desc "Function As A Service on top of Kubernetes, riff is for functions" - homepage "https://www.projectriff.io/" - url "https://github.com/projectriff/cli.git", - :tag => "v0.5.0", - :revision => "f96cf2f5ca6fddfaf4716c0045f5f142da2d3828" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "cb64974514f8c764d7479cce8f92cd0a2cbc940e96300b823c684f4752d5b734" => :catalina - sha256 "dd08e62ae58c92239ea1c321b7a3eda01b83912660f2769291cb0443fd128f9d" => :mojave - sha256 "06f5da9420de8bf9aac4a16f93effeb2e3ceb83fedc44a5d1c375a2a6f9f52a4" => :high_sierra - end - - depends_on "go" => :build - depends_on "kubernetes-cli" - - def install - cd buildpath do - system "make", "build" - bin.install "riff" - end - end - - test do - stdout, stderr, status = Open3.capture3("#{bin}/riff --kube-config not-a-kube-config-file doctor") - - assert_equal false, status.success? - assert_equal "", stdout - assert_match "panic: stat not-a-kube-config-file: no such file or directory", stderr - end -end diff --git a/Formula/rig.rb b/Formula/rig.rb deleted file mode 100644 index 3d40077961080..0000000000000 --- a/Formula/rig.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e75fa428f9833207c6fa53e005e32c8d3af48206e08ded637d9633c2af1e0643" => :catalina - 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 df5acbb5158d6..0000000000000 --- a/Formula/rinetd.rb +++ /dev/null @@ -1,49 +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 "d13c2114ebe94b503d90069ef1394894e4b8c02c151c7f87f67de6e19c385e1e" => :catalina - 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 6f8aaebf5e4f4..0000000000000 --- a/Formula/ringojs.rb +++ /dev/null @@ -1,26 +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" - license "Apache-2.0" - - 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-all.rb b/Formula/ripgrep-all.rb deleted file mode 100644 index f5ced16e60919..0000000000000 --- a/Formula/ripgrep-all.rb +++ /dev/null @@ -1,29 +0,0 @@ -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/v0.9.6.tar.gz" - sha256 "8cd7c5d13bd90ef0582168cd2bef73ca13ca6e0b1ecf24b9a5cd7cb886259023" - head "https://github.com/phiresky/ripgrep-all.git" - - bottle do - cellar :any_skip_relocation - sha256 "bc8ee7c7869c23b82cb1997e4f7f5024193b74cc282c20c6bf50af43b55ddbb4" => :catalina - sha256 "b1b26781f754760e790ff28c7a26079eb9df86b983c786cd745eabac0232c861" => :mojave - sha256 "59001d904ce02e54e23842a7d04f9729d41f1e6fd8b81a71676812be5c6a20f5" => :high_sierra - end - - depends_on "rust" => :build - depends_on "ripgrep" - - 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/ripgrep.rb b/Formula/ripgrep.rb deleted file mode 100644 index dc9ac20a62f3f..0000000000000 --- a/Formula/ripgrep.rb +++ /dev/null @@ -1,36 +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/12.1.1.tar.gz" - sha256 "2513338d61a5c12c8fea18a0387b3e0651079ef9b31f306050b1f0aaa926271e" - head "https://github.com/BurntSushi/ripgrep.git" - - bottle do - cellar :any - sha256 "60460d422253113af3ed60332104f309638942821c655332211a6bc2213c472c" => :catalina - sha256 "de4b18789f5d9bc4aaa4d906501200ae4ece7a1971dd1b86e2b2d0a2c8e0d764" => :mojave - sha256 "cfea5335bf4eccfb7cd1d93bec234d96bd49dce8d593ea966687f777909ba291" => :high_sierra - end - - depends_on "asciidoctor" => :build - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "pcre2" - - def install - system "cargo", "install", "--features", "pcre2", *std_cargo_args - - # 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 f81582fe1c8d5..0000000000000 --- a/Formula/ripmime.rb +++ /dev/null @@ -1,24 +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" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "bbdb33bd7b2a1c5a2073b6cbd0c3916caa99d5de809f4915e138f523cb752026" => :catalina - 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 8eb96dd1d8bab..0000000000000 --- a/Formula/rke.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Rke < Formula - desc "Rancher Kubernetes Engine, a Kubernetes installer that works everywhere" - homepage "https://rancher.com/docs/rke/latest/en/" - url "https://github.com/rancher/rke.git", - :tag => "v1.1.3", - :revision => "b3082ecb934e5761de9846d336b6a77350169368" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "9e32789bb442855f6012aa4b96a3d67ee315cdf0b8b851ceaa59a955f372e9ba" => :catalina - sha256 "267e5bee1bc54be1c0f41336dac4b59f309fcf6cce836e0308c6c775eb4530eb" => :mojave - sha256 "f98a5dbb85122f5dc8f0e33a377359b323b36447f9976eed94da0e0998f7a057" => :high_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 6c24a9204b57f..0000000000000 --- a/Formula/rkflashtool.rb +++ /dev/null @@ -1,32 +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 "19915af37cac5f04cea6d0aa71a533ce6fd2a9aa549820286736b526e4be80cc" => :catalina - 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 b89617d867551..0000000000000 --- a/Formula/rkhunter.rb +++ /dev/null @@ -1,23 +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 "e9bfbf9e122295e1fd4ac70dea7502856b3415e0eec187512f196d51a718ab92" => :catalina - 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 2d8fdfffe1e74..0000000000000 --- a/Formula/rlog.rb +++ /dev/null @@ -1,44 +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" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "42b1e5a687f78df9121a75bc0b1194a534f31b8476521592879ea5fe381d634f" => :catalina - 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/rlwrap.rb b/Formula/rlwrap.rb deleted file mode 100644 index 43c093ec8a6cc..0000000000000 --- a/Formula/rlwrap.rb +++ /dev/null @@ -1,33 +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" - license "GPL-2.0" - revision 1 - head "https://github.com/hanslub42/rlwrap.git" - - bottle do - sha256 "d4a2ef8e6f2c143c9156ed301d9b835b74b8e1c8bb232feb7fd8494e5262441c" => :catalina - sha256 "1bd82e889c7f88df7b45b31201d563d7185c362c7a5d3814b5474d295de65f22" => :mojave - sha256 "d8d5c5402f1b0041bc26c2161b2822cfd025e93674a7a5dc0046185d5870181d" => :high_sierra - sha256 "3dd6233bbef1327553b5bd92d070c4d7bd24f5414628c1c367c4c3ad6f1acc76" => :sierra - 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 b402b500f12bb..0000000000000 --- a/Formula/rmcast.rb +++ /dev/null @@ -1,23 +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 "e2054828627f6afdd376cfd276536c770b8dd77b082a44c5b63212e8dff84351" => :catalina - 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 592db06388d18..0000000000000 --- a/Formula/rmlint.rb +++ /dev/null @@ -1,36 +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.9.0.tar.gz" - sha256 "a2d26863e0018efad60f0b1123e7cffd8ef764c8fb574a7987a49260e4e51c8f" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "ed346f576ec02c98e54c337e0370bb3b238abc0ccb90c84cd7d302ddd0d3713d" => :catalina - sha256 "155767f2b4bc9d03e965f56e2dd6b9b8bd2cde55fb6fb553ce05a00fad35bd2a" => :mojave - sha256 "9a05ea7f81263a7e2c0c6f2770b80ca942c92887906741dc3b8faba1d7a41d10" => :high_sierra - sha256 "3c0e9d07bd06e4e9785dc54ccee7a7d0cdd2a95b2fe6a7ff0e12f66e1bbc0a6d" => :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" - system "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 e467b295d8053..0000000000000 --- a/Formula/rmtrash.rb +++ /dev/null @@ -1,36 +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 "00c8b2e19b0e59b1b5bf9b8298b2013f75692fc4f0e667f342b83a2177717a11" => :catalina - 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 4e8e045e78df3..0000000000000 --- a/Formula/rnv.rb +++ /dev/null @@ -1,27 +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 "9a780a7b9ed3b264a7d0471aba7aac503b60640af76156028ecf118a0c35665e" => :catalina - 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 f1987d7b18980..0000000000000 --- a/Formula/robodoc.rb +++ /dev/null @@ -1,39 +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" - license "GPL-3.0" - - bottle do - rebuild 1 - sha256 "2d80013dbc6b8f85599bd793741b69fde224552b0bb543fc3029f488fc2c55bc" => :catalina - 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 5dabfd32e459a..0000000000000 --- a/Formula/robot-framework.rb +++ /dev/null @@ -1,111 +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.2.1.tar.gz" - sha256 "9805faa0990125ff2c9689b673448d5f47e78470e7a8e95af1606a775fa8379f" - head "https://github.com/robotframework/robotframework.git" - - bottle do - cellar :any - sha256 "bf2616c09938e74e4f02b6539c4e63ce5a930a367a624256f9cb236ec40332a1" => :catalina - sha256 "8bf25bce831e36a1dea5abec244c246900d6aeea405228400c43122b34c5e742" => :mojave - sha256 "19aafae1b8d94f325b596e44938c6d105052fdfcaadc892e14f650af33f0509d" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "python@3.8" - depends_on :x11 - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz" - sha256 "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/ac/15/4351003352e11300b9f44a13576bff52dcdc6e4a911129c07447bda0a358/paramiko-2.7.1.tar.gz" - sha256 "920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz" - sha256 "0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c" - 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/ee/8b/1365ae004235bed3d0787bf98651b2e4416b07e8aa6cd5f8dcaa7fe1dd14/robotframework-seleniumlibrary-4.3.0.tar.gz" - sha256 "b4a3a58d3c240a2004d7436e4806b5de669db329cd6fd264f45b65943c5140c4" - end - - resource "robotframework-sshlibrary" do - url "https://files.pythonhosted.org/packages/5e/a3/25010fc4a2c126e1b5dcd1d08d55653aba819509c42d210e4dfbc2f1e844/robotframework-sshlibrary-3.4.0.tar.gz" - sha256 "21fa0183776e6061366f517765db479aaa634b707f3dd9d90ef6972adae6a755" - end - - resource "scp" do - url "https://files.pythonhosted.org/packages/05/e0/ac4169e773e12a08d941ca3c006cb8c91bee9d6d80328a15af850b5e7480/scp-0.13.2.tar.gz" - sha256 "ef9d6e67c0331485d3db146bf9ee9baff8a48f3eb0e6c08276a8584b13bf34b3" - 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/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - end - - test do - (testpath/"HelloWorld.robot").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/"robot", testpath/"HelloWorld.robot" - end -end diff --git a/Formula/robotfindskitten.rb b/Formula/robotfindskitten.rb deleted file mode 100644 index 36beaa96eeab6..0000000000000 --- a/Formula/robotfindskitten.rb +++ /dev/null @@ -1,31 +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/ship_it_anyway/robotfindskitten-2.8284271.702.tar.gz" - sha256 "020172e4f4630f7c4f62c03b6ffe2eeeba5637b60374d3e6952ae5816a9f99af" - license "GPL-2.0" - revision 1 - head "https://github.com/robotfindskitten/robotfindskitten.git", :branch => "main" - - bottle do - sha256 "fa1f963cf39fb320c4b8e0867a05c9e96944d59d6c18222a9d6b33acb4384622" => :catalina - sha256 "8b25c148f43ad7c70d43810639b7c812cbd612b347386be3f7e913b4d0cc14b5" => :mojave - sha256 "9c6b045c69a6ff5e74f4f184ec109d3bfd293c7dab223e87ba80e7bb150e8dae" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - system "autoreconf", "-ivf" - 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 b77b7caee490c..0000000000000 --- a/Formula/rocksdb.rb +++ /dev/null @@ -1,85 +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/v6.7.3.tar.gz" - sha256 "c4d1397b58e4801b5fd7c3dd9175e6ae84541119cbebb739fe17d998f1829e81" - - bottle do - cellar :any - sha256 "d0bf91474177980de65bf72f41fbdfe60d5e5c934cfbb56011a0636e9dee1717" => :catalina - sha256 "3fc961b8a51c6e5e2a85e43d1dc5fad0c59db80315784bb75e82345bc240b9c3" => :mojave - sha256 "9c1a3a6ee74fda67c2af84f25f41bd9c9769513b6d48bc222db1baceeb527ba8" => :high_sierra - end - - depends_on "gflags" - depends_on "lz4" - depends_on "snappy" - depends_on "zstd" - - uses_from_macos "bzip2" - uses_from_macos "zlib" - - def install - ENV.cxx11 - ENV["PORTABLE"] = "1" - ENV["DEBUG_LEVEL"] = "0" - ENV["USE_RTTI"] = "1" - ENV["ROCKSDB_DISABLE_ALIGNED_NEW"] = "1" if MacOS.version <= :sierra - 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", - "-L#{Formula["zstd"].opt_lib}", "-lzstd" - 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 6a73d71d2fef8..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" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "250c65163e46fc9eaaab11b27562c70775f2481cfe9f649ab151f8da3616ff08" => :catalina - sha256 "6f220b4a193928a97dc8442cadf6d161224a1ddac098d496c8cf9a20fb7cd02a" => :mojave - sha256 "74277c4f4cc2c60534cda38627450176f356da5bb7120334fd667eaa261fea7b" => :high_sierra - end - - depends_on "cmake" => :build - 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 33812960a0c09..0000000000000 --- a/Formula/rogue.rb +++ /dev/null @@ -1,39 +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" - sha256 "7d37a61fc098bda0e6fac30799da347294067e8e079e4b40d6c781468e08e8a1" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d1837a65589cfc24e6ff05f585e4cb9991e06cecbccf119688cc95fd60dd1dc9" => :catalina - sha256 "fe9135c4e75abf4298cc231e0372ff8088fa57450fbd8c718e8a0fb8ac3ed723" => :mojave - sha256 "a65be75ef53988084ebe86a523e5fbda23205a2e5843b9015bfda312ade8e6f2" => :high_sierra - 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 9c3ff4d144499..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.5.0/roll-2.5.0.tar.gz" - sha256 "a06b9782225442c71347eaf745e47684a9227d55575e865f503266c06454586c" - - bottle do - cellar :any_skip_relocation - sha256 "8cda95b1da0131870732c0baf08750b50d492c42918ae14adaf7c1b4553a8419" => :catalina - sha256 "c1c2251d5ac3b6a03065877f6c211f326909c7710f85441adf0d9987815b6c35" => :mojave - sha256 "0fe1da205f9d37a29489ac8b437cefcd915041c47ddf95cae577369b46d8d7ea" => :high_sierra - sha256 "f9c7a833dad6d95fe4ee83fccf0890f49dee962e9965a624cf5d483d86c72eab" => :sierra - 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 78e0a0a37dc48..0000000000000 --- a/Formula/rolldice.rb +++ /dev/null @@ -1,27 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a3fec25c1ccaf264a80a81f276aabf54cea670f3e88a48a40c7ffa9c7942bad4" => :catalina - 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 22818b9ab9a58..0000000000000 --- a/Formula/rom-tools.rb +++ /dev/null @@ -1,61 +0,0 @@ -class RomTools < Formula - desc "Tools for Multiple Arcade Machine Emulator" - homepage "https://mamedev.org/" - url "https://github.com/mamedev/mame/archive/mame0222.tar.gz" - version "0.222" - sha256 "3380b86d1bc5bc09f5bb4099f3833b6fba924a8bd189aac4dab149afba799ce7" - head "https://github.com/mamedev/mame.git" - - bottle do - cellar :any - sha256 "e0c8c80f0844a58de81334a8ce0d65bb92134d9941a21a07137c99dfcc348236" => :catalina - sha256 "180c4629cee72f5ff6ecd6dbf03c96d161129e74b348f0ccb99300a786f17226" => :mojave - sha256 "0965eb18c1272ae4ebbbe7113c184d18243f899b22b9b986ea9091c7eec99b44" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "flac" - # Need C++ compiler and standard library support C++14. - # Build failure on Sierra, see: - # https://github.com/Homebrew/homebrew-core/pull/39388 - depends_on :macos => :high_sierra - depends_on "sdl2" - depends_on "utf8proc" - - def install - inreplace "scripts/src/osd/sdl.lua", "--static", "" - system "make", "TOOLS=1", - "USE_LIBSDL=1", - "USE_SYSTEM_LIB_EXPAT=1", - "USE_SYSTEM_LIB_ZLIB=1", - "USE_SYSTEM_LIB_ASIO=0", - "USE_SYSTEM_LIB_FLAC=1", - "USE_SYSTEM_LIB_UTF8PROC=1" - bin.install %w[ - aueffectutil castool chdman floptool imgtool jedutil ldresample ldverify - nltool nlwav pngcmp regrep romcmp srcclean testkeys 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" - 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 e8533a7c2c825..0000000000000 --- a/Formula/root.rb +++ /dev/null @@ -1,159 +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.22.00.source.tar.gz" - version "6.22.00" - sha256 "efd961211c0f9cd76cf4a486e4f89badbcf1d08e7535bba556862b3c1a80beed" - revision 1 - head "https://github.com/root-project/root.git" - - bottle do - sha256 "22f63d109ebc3d2a831df49744a404a8794aa8f55c55f2f2ecfe63f8f081b1c0" => :catalina - sha256 "572b4654f5514d888c97609c36c4409f5c0a82ad9a9d8046b99abd05759b04da" => :mojave - sha256 "e77cccf4df06bb140b3b7ec38832b0edd6097a6f8fd24cd025b5b7178f077d1a" => :high_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 "cfitsio" - depends_on "davix" - depends_on "fftw" - depends_on "gcc" # for gfortran - depends_on "gl2ps" - 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 "numpy" # for tmva - depends_on "openssl@1.1" - depends_on "pcre" - depends_on "python@3.8" - depends_on "tbb" - depends_on "xrootd" - depends_on "xz" # for LZMA - depends_on "zstd" - - conflicts_with "glew", :because => "root ships its own copy of glew" - - skip_clean "bin" - - 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/" - - args = std_cmake_args + %W[ - -DCLING_CXX_PATH=clang++ - -DCMAKE_INSTALL_ELISPDIR=#{elisp} - -DPYTHON_EXECUTABLE=#{Formula["python@3.8"].opt_bin}/python3 - -Dbuiltin_cfitsio=OFF - -Dbuiltin_freetype=ON - -Dbuiltin_glew=ON - -Ddavix=ON - -Dfftw3=ON - -Dfitsio=ON - -Dfortran=ON - -Dgdml=ON - -Dgnuinstall=ON - -Dimt=ON - -Dmathmore=ON - -Dminuit2=ON - -Dmysql=OFF - -Dpgsql=OFF - -Dpyroot=ON - -Droofit=ON - -Dssl=ON - -Dtmva=ON - -Dxrootd=ON - ] - - cxx_version = (MacOS.version < :mojave) ? 14 : 17 - args << "-DCMAKE_CXX_STANDARD=#{cxx_version}" - - # Workaround the shim directory being embedded into the output - inreplace "build/unix/compiledata.sh", "`type -path $CXX`", ENV.cxx - - mkdir "builddir" do - system "cmake", "..", *args - - system "make", "install" - - chmod 0755, Dir[bin/"*.*sh"] - - version = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - pth_contents = "import site; site.addsitedir('#{lib}/root')\n" - (prefix/"lib/python#{version}/site-packages/homebrew-root.pth").write pth_contents - end - end - - def caveats - <<~EOS - 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 - EOS - end - - test do - (testpath/"test.C").write <<~EOS - #include - void test() { - std::cout << "Hello, world!" << std::endl; - } - EOS - - # 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("root -l -b -n -q test.C") - - # Test linking - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - std::cout << TString("Hello, world!") << std::endl; - return 0; - } - EOS - (testpath/"test_compile.bash").write <<~EOS - $(root-config --cxx) $(root-config --cflags) $(root-config --libs) $(root-config --ldflags) test.cpp - ./a.out - EOS - assert_equal "Hello, world!\n", - shell_output("/bin/bash test_compile.bash") - - # Test Python module - system Formula["python@3.8"].opt_bin/"python3", "-c", "import ROOT; ROOT.gSystem.LoadAllLibraries()" - end -end diff --git a/Formula/roswell.rb b/Formula/roswell.rb deleted file mode 100644 index d911245d345f1..0000000000000 --- a/Formula/roswell.rb +++ /dev/null @@ -1,33 +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/v20.06.14.107.tar.gz" - sha256 "fc3fd46c55a50e2b76aba60ebbfeab393f345cdca7f2a87a6772c8b4fce3c2e4" - license "MIT" - head "https://github.com/roswell/roswell.git" - - bottle do - sha256 "dcd9cf15c21d13724f36fd736529faba40dc0c2af2008c970b94049796d6d171" => :catalina - sha256 "2d28ef4f1a1cbf94fba0132f7e1f05abb87854af6ce65f70c71877c7152d5622" => :mojave - sha256 "a6d5d3ddafc4afefbb84d077b2157a1e7101c5c057bc7fe25714c19b83659017" => :high_sierra - 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_predicate testpath/"config", :exist? - end -end diff --git a/Formula/roundup.rb b/Formula/roundup.rb deleted file mode 100644 index d1d68d9c3a3ce..0000000000000 --- a/Formula/roundup.rb +++ /dev/null @@ -1,32 +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 "ce6d6747b6a2fc94f05de03ddd4dd1c7a77764253a6f61163a24be1626f8b7be" => :catalina - 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 a629bebc650f3..0000000000000 --- a/Formula/rp.rb +++ /dev/null @@ -1,52 +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" - license "GPL-3.0" - head "https://github.com/0vercl0k/rp.git" - - bottle do - cellar :any_skip_relocation - sha256 "f173bd7e78a13f9fe20fbe70e3bda26e91a5aec77bd094a4d0b447afee0ff1b9" => :catalina - 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 - - # In order to have the same binary name in 32 and 64 bits. - patch :DATA - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - 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 f2146c61ef9ab..0000000000000 --- a/Formula/rpcgen.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Rpcgen < Formula - desc "Protocol Compiler" - homepage "https://opensource.apple.com/" - url "https://opensource.apple.com/tarballs/developer_cmds/developer_cmds-66.tar.gz" - sha256 "99d6c4ef4f32593df937a42d50400c17054247e875ab8cfb3bf0f2de19a90860" - - bottle do - cellar :any_skip_relocation - sha256 "4d9702a8541f7db461c81f761bd446167473d0b7ad9590370fbbd9cb775442d4" => :catalina - sha256 "6bc4a8c391b448681db323c894b07a57a22a8e4d67015f0b9be7f1cff876d23a" => :mojave - sha256 "2a4a7cf95e773ee5a2721cc90832031c6d5bb6dffefd575233acccca0d446631" => :high_sierra - end - - keg_only :provided_by_macos - - depends_on :xcode => ["7.3", :build] - - 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 diff --git a/Formula/rpg.rb b/Formula/rpg.rb deleted file mode 100644 index 32461e70b6e3d..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 "826bacff2dddeeeb41cdf328b7702fa415d049b9d1d55b2f93e7f1084ebcb3e0" => :catalina - sha256 "995850411f4a47126309c849e2da32c76abaddf40317515d7af5b8d2e2d6d680" => :mojave - sha256 "27b65a242fd862d805460bc06c91d7f164935dd14f8ded5cfa62924a1b973a42" => :high_sierra - sha256 "ddb4f887b798101d95300f0b0c22a0760d06158c09796e9bfb65869f28b69434" => :sierra - sha256 "be6550c915e361dcc0e020048f9a5f4ea37f1c5890a526282a3d70c610594981" => :el_capitan - sha256 "5c1af29955697dcd46ff58fd70f9aca986b977f3cc17f638822c81289f180df2" => :yosemite - sha256 "2ebf1a744c3c072c107883f565c04154b3e530c93868bb438bb90a1be35a4cb7" => :mavericks - 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 161a776f74fda..0000000000000 --- a/Formula/rpl.rb +++ /dev/null @@ -1,33 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "edbab26552da9547f8d356ba50bb2d02ce6c10549da2c2c4d5f65a3bc4039b81" => :catalina - sha256 "79ed79d50ceaed30cc0fedaeeead5742208c72b04858863ceaf7951c7cbf8e00" => :mojave - sha256 "70b23d5ce18f2dfe58e8c782a00e4ab56d88c1e43b135c9e9ba0c8c387bef470" => :high_sierra - sha256 "2c9e55b51762d835db949c20f9eba36e83213082db82c69602658e2f28003b80" => :sierra - sha256 "175e1f127c8c707b0d90c3c7e4399cc5c1e18410bf8b7f6ec9340dbca4c16e4b" => :el_capitan - sha256 "d718355e56dd13c690f1d5a0541b5f051518f65b953aade9c525853a19266a61" => :yosemite - sha256 "b0c4dbf06500053703ee4a8c8e751d43c435f0e3b0e25d2d328d310dcf490c23" => :mavericks - 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 c1bd6d8c09ca1..0000000000000 --- a/Formula/rpm.rb +++ /dev/null @@ -1,118 +0,0 @@ -class Rpm < Formula - desc "Standard unix software packaging tool" - homepage "https://rpm.org/" - url "http://ftp.rpm.org/releases/rpm-4.15.x/rpm-4.15.1.tar.bz2" - sha256 "ddef45f9601cd12042edfc9b6e37efcca32814e1e0f4bb8682d08144a3e2d230" - revision 1 - version_scheme 1 - - bottle do - sha256 "e5d398daca37da278add441d2cb0825c019fed8bcfb33bd4abb01dad3dce42e0" => :catalina - sha256 "0b5556d33614062b0b9d39cc8d3f4046d562cbaa9b03498cf4b11c57debb38fe" => :mojave - sha256 "a59870c437fe72ce7438726f79a44111d8352dbe50b7f6cf9d147210034a764b" => :high_sierra - end - - depends_on "berkeley-db" - depends_on "gettext" - depends_on "libarchive" - depends_on "libmagic" - depends_on "libomp" - depends_on "lua" - depends_on "openssl@1.1" - depends_on "pkg-config" - depends_on "popt" - depends_on "xz" - depends_on "zstd" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["lua"].opt_libexec/"lib/pkgconfig" - ENV.append "CPPFLAGS", "-I#{Formula["lua"].opt_include}/lua" - ENV.append "LDFLAGS", "-lomp" - - # 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", - # Don't allow superenv shims to be saved into lib/rpm/macros - "__MAKE=/usr/bin/make", - "__SED=/usr/bin/sed", - "__GIT=/usr/bin/git", - "__LD=/usr/bin/ld" - 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 2e35385f7e067..0000000000000 --- a/Formula/rpm2cpio.rb +++ /dev/null @@ -1,21 +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=408590&view=co" - version "1.4" - sha256 "2841bacdadde2a9225ca387c52259d6007762815468f621253ebb537d6636a00" - - bottle do - cellar :any_skip_relocation - sha256 "8655ba73b79595a55d289c2c969e027f2034c0af88263f9fa8c5cb8a1184a823" => :catalina - sha256 "081902485154a2061d890e6421a55d15bfe5072c05109c79e0ef50f2a11b96e5" => :mojave - sha256 "804dccff2726a9ac18a1002cd8adb06aacd07ce1fff93b995c042d4e78775176" => :high_sierra - sha256 "05f2a6011c554efb2c2196fdf08bfc6f7c6fd6d4e32530399888aabcc73ca339" => :sierra - end - - depends_on "xz" - - def install - bin.install "rpm2cpio?revision=408590&view=co" => "rpm2cpio" - end -end diff --git a/Formula/rqlite.rb b/Formula/rqlite.rb deleted file mode 100644 index 4b605d326a877..0000000000000 --- a/Formula/rqlite.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Rqlite < Formula - desc "Lightweight, distributed relational database built on SQLite" - homepage "http://www.rqlite.com/" - url "https://github.com/rqlite/rqlite/archive/v5.4.0.tar.gz" - sha256 "ec7ddfacc134a64acb7b412708dc2f1f5ccc9a1ea7f371ed97aedc59f385b2be" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "ef6d87d517b96f0bd49eed83e52372cc1c96c57b1b9bf4c607cc489fc0af925d" => :catalina - sha256 "515eee131820fd1e4b3a9e7f5ec54b0b3d8e764fb9e9d7f86bd348cc726945da" => :mojave - sha256 "a5cdf690a35b5e1858285a4bf796d49367b3fc46dbecbd8cfa4cf1e9cc8bcb13" => :high_sierra - end - - depends_on "go" => :build - - def install - ["rqbench", "rqlite", "rqlited"].each do |cmd| - system "go", "build", *std_go_args, "-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 <<~EOS - CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name TEXT) - .schema - quit - EOS - 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 - end -end diff --git a/Formula/rrdtool.rb b/Formula/rrdtool.rb deleted file mode 100644 index c27fc9603c080..0000000000000 --- a/Formula/rrdtool.rb +++ /dev/null @@ -1,52 +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.2/rrdtool-1.7.2.tar.gz" - sha256 "a199faeb7eff7cafc46fac253e682d833d08932f3db93a550a4a5af180ca58db" - revision 1 - - bottle do - sha256 "ce57cda576f452e7790e091d645887231d4aa5b691e2c33b4ea93b3dd92d7757" => :catalina - sha256 "fae6691230b527c93670d1d00b266e43497744fc09df06c9977265e578b529fc" => :mojave - sha256 "858013744cfc3d31a47b7e3629198922d1994f20d0d44c11f6c921ce6f2b9942" => :high_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" - - 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 - ] - - inreplace "configure", /^sleep 1$/, "#sleep 1" - - system "./bootstrap" if build.head? - system "./configure", *args - - system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}", "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/rsnapshot.rb b/Formula/rsnapshot.rb deleted file mode 100644 index 8a4970bf925a4..0000000000000 --- a/Formula/rsnapshot.rb +++ /dev/null @@ -1,24 +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.3/rsnapshot-1.4.3.tar.gz" - sha256 "2b0c7aad3e14e0260513331425a605d73c3bdd7936d66d418d7714a76bc55bd1" - license "GPL-2.0" - head "https://github.com/rsnapshot/rsnapshot.git" - - bottle do - cellar :any_skip_relocation - sha256 "e195b17e2c28a787e6bc183c3f57397256fba91c8d5c490f3c24576033d39a74" => :catalina - sha256 "e195b17e2c28a787e6bc183c3f57397256fba91c8d5c490f3c24576033d39a74" => :mojave - sha256 "e195b17e2c28a787e6bc183c3f57397256fba91c8d5c490f3c24576033d39a74" => :high_sierra - 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 dbe49a798e97c..0000000000000 --- a/Formula/rssh.rb +++ /dev/null @@ -1,39 +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 "320bd3daa0a9cf214c46eaacc16b9a69d3854d8dbac7ed432db91d8afd241790" => :catalina - 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 8742906f99bc1..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 - rebuild 1 - sha256 "253a99c8187e0dc6fb29049273f08dd4b199c0de1e9171c4a0829f21aaf5c90f" => :catalina - sha256 "b6f2a222c1bc903a5d0179331398ced65980798d694d186bd52e0b54239d9dfd" => :mojave - sha256 "29b1cd5b6cbfbd66d250586450e2e24e5706da80b03aa1b54834bd0c01e73202" => :high_sierra - 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 5ec3b3f9bad54..0000000000000 --- a/Formula/rst-lint.rb +++ /dev/null @@ -1,44 +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.3.1.tar.gz" - sha256 "469fcc0dae4f511da5a28f5d0f9b5d0f477dabca4a44cd8c84e20b8a99791b89" - license "Unlicense" - - bottle do - cellar :any_skip_relocation - sha256 "45b5248c1e791f738f6cf2b645cec9d94d9992caa3a7d00594ad9ed2b12a11e6" => :catalina - sha256 "e77f597dd712f47fe96b8b83130f9a85b51a1ce9113622443d36077b020bcd01" => :mojave - sha256 "18c09b7c8bad5976c12dd900e827f2a036929a853707b2dd139c258278ccf548" => :high_sierra - end - - depends_on "python@3.8" - - resource "docutils" do - url "https://files.pythonhosted.org/packages/2f/e0/3d435b34abd2d62e8206171892f174b180cd37b09d57b924ca5c2ef2219d/docutils-0.16.tar.gz" - sha256 "c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc" - 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 1f401350264e2..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/releases/download/v5.2.2/rswift-v5.2.2-source.tar.gz" - sha256 "b27c51e9c69adcc61ed2f8a476fa5f2d97be5996d4f1e59a0e1b754a58980e26" - license "MIT" - head "https://github.com/mac-cain13/R.swift.git" - - bottle do - cellar :any_skip_relocation - sha256 "1da952f52f531fcc1cb86888ce59c97547636855a4e2d23d147591ed9de0ec49" => :catalina - sha256 "a344a394d9edece2c4737eec24ed2ed087719e0b95dfd269aae80b6b90040b44" => :mojave - end - - depends_on :xcode => "10.2" - - 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") - assert_match "[R.swift] Failed to write out", shell_output("#{bin}/rswift generate #{testpath} 2>1&") - end -end diff --git a/Formula/rsync-time-backup.rb b/Formula/rsync-time-backup.rb deleted file mode 100644 index 4ed3b64916491..0000000000000 --- a/Formula/rsync-time-backup.rb +++ /dev/null @@ -1,18 +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" - head "https://github.com/laurent22/rsync-time-backup.git" - - 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 e632236559ea5..0000000000000 --- a/Formula/rsync.rb +++ /dev/null @@ -1,67 +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.2.2.tar.gz" - mirror "https://mirrors.kernel.org/gentoo/distfiles/rsync-3.2.2.tar.gz" - mirror "https://www.mirrorservice.org/sites/rsync.samba.org/rsync-3.2.2.tar.gz" - sha256 "644bd3841779507665211fd7db8359c8a10670c57e305b4aab61b4e40037afa8" - - bottle do - cellar :any - sha256 "59d1aa1da62690c00e1aef7d608fcbecc814e875692c8ed0196f43aa58317510" => :catalina - sha256 "5d06d2f36dfee165d1f5487a6bfb1bc0522214cb36b05c1f5fe79570b03973fc" => :mojave - sha256 "daf1a3c8d3ecf743f605f1c0a4066b6e71910493b161504260b1d0841c00adfb" => :high_sierra - end - - depends_on "lz4" - depends_on "openssl@1.1" - 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.2 - patch do - url "https://download.samba.org/pub/rsync/src/rsync-patches-3.2.2.tar.gz" - mirror "https://www.mirrorservice.org/sites/rsync.samba.org/rsync-patches-3.2.2.tar.gz" - sha256 "eeccf4c7f178c936e451b679e64b670f707b989b7a40e2d22286407f8987ae9a" - apply "patches/fileflags.diff", - "patches/crtimes.diff" - end - - def install - args = %W[ - --disable-debug - --prefix=#{prefix} - --with-rsyncd-conf=#{etc}/rsyncd.conf - --with-included-popt=no - --with-included-zlib=no - --enable-ipv6 - ] - - # SIMD code throws ICE or is outright unsupported due to lack of support for - # function multiversioning on older verions of macOS - args << "--disable-simd" if MacOS.version < :catalina - - system "./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/rsyslog.rb b/Formula/rsyslog.rb deleted file mode 100644 index 3ad41faf50af1..0000000000000 --- a/Formula/rsyslog.rb +++ /dev/null @@ -1,83 +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.2006.0.tar.gz" - sha256 "d9589e64866f2fdc5636af4cae9d60ebf1e3257bb84b81ee953ede6a05878e97" - license "GPL-3.0" - - bottle do - sha256 "6e2da2c80153db338ae7acb282ee690fa888e11e3f2bc0c5d7cd86640e1d5264" => :catalina - sha256 "a6292acf708905547dbaea460f92c59e5d1924506293afc751a349f8734a787b" => :mojave - sha256 "fd426af7ddbe1611be30da51a5850f05d3496713b80c8f313e6763e9a245a2dd" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libestr" - - uses_from_macos "curl" - uses_from_macos "zlib" - - resource "libfastjson" do - url "https://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 - - def post_install - mkdir_p var/"run" - 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 ba209347f8dcc..0000000000000 --- a/Formula/rt-audio.rb +++ /dev/null @@ -1,31 +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.1.0.tar.gz" - sha256 "ff138b2b6ed2b700b04b406be718df213052d4c952190280cf4e2fab4b61fe09" - head "https://github.com/thestk/rtaudio.git" - - bottle do - cellar :any - sha256 "3bd5402da0ae1e25e31f77ca84c15ea33b5ef038d82831d25702b5a481c884d2" => :catalina - sha256 "4db658b2cf66faf2c51ae7176ba7b755c6deb9b65c73051495e11ba0801ef1e8" => :mojave - sha256 "d6e1587636446e2e54fb58faf871a71b82e62c8873ba15ec3edf3dc180483738" => :high_sierra - sha256 "05b1394b494ab9b9bdf49add3935835503e9ac487993dd13d6c22a8ccb911133" => :sierra - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - doc.install Dir["doc/*"] - pkgshare.install "tests" - end - - test do - system ENV.cxx, "-I#{include}/rtaudio", "-L#{lib}", "-lrtaudio", - pkgshare/"tests/testall.cpp", "-o", "test" - system "./test" - end -end diff --git a/Formula/rtags.rb b/Formula/rtags.rb deleted file mode 100644 index 9308b8319161c..0000000000000 --- a/Formula/rtags.rb +++ /dev/null @@ -1,102 +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.38", - :revision => "9687ccdb9e539981e7934e768ea5c84464a61139" - license "GPL-3.0" - head "https://github.com/Andersbakken/rtags.git" - - bottle do - cellar :any - sha256 "332ba278034061d8789e8bcfc2d06120c122f0912de030524ee44d73089bdda6" => :catalina - sha256 "a9b3b3f280643e151a9d98438ae1bef2bf77eda3a3412d07c1781d60b6e13a25" => :mojave - sha256 "b1f34a462f2473d7059b8db4d78ff85f3bc18e5df25e2d597ce95052d15da132" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "emacs" - depends_on "llvm" - depends_on "openssl@1.1" - - 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.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 af89c2ec459fd..0000000000000 --- a/Formula/rtf2latex2e.rb +++ /dev/null @@ -1,36 +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 "c7c3d46cf3f0b3a18dcb01aa9e1f2be4573f236e52f466d78eda4d659084e5bf" => :catalina - 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 205cd7a339675..0000000000000 --- a/Formula/rtmidi.rb +++ /dev/null @@ -1,40 +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://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz" - sha256 "370cfe710f43fbeba8d2b8c8bc310f314338c519c2cf2865e2d2737b251526cd" - - bottle do - cellar :any - sha256 "527496c834c7c98aca105255a39cf80ddaa074c7073e24d3325eb66ab4b07754" => :catalina - sha256 "5cb51ca3774a1e22d2388f01ccb514d091519b9d8cbc5f4805437be1be7dba30" => :mojave - sha256 "8744fb2c8d9952b0e14e50f2fed7982e715843746506378645211a178a3163e0" => :high_sierra - sha256 "4eab0eb4ede3d1035d7918bd84e2aede8f648c2ebcf449ac6f9ce15c0c744988" => :sierra - 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 456cc0ca63279..0000000000000 --- a/Formula/rtmpdump.rb +++ /dev/null @@ -1,46 +0,0 @@ -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" - version "2.4+20151223" - sha256 "5c032f5c8cc2937eb55a81a94effdfed3b0a0304b6376147b86f951e225e3ab5" - revision 1 - head "https://git.ffmpeg.org/rtmpdump.git", :shallow => false - - bottle do - cellar :any - sha256 "f39d714005d28ed61728832877433a68dd256796bc225bac68b505b2c1d97ef4" => :catalina - sha256 "97cf25d61d474c2115f6448940f924324d630b60776396398662b1368b4544da" => :mojave - sha256 "7e95dc18fc03a6c1f19385e1507448f23e2e570c9b3ad60bd3fbc05c65295fb8" => :high_sierra - sha256 "2118d007922d98ae71169be417106f594636e6ff979611b9e51dd2cf09c002b7" => :sierra - end - - depends_on "openssl@1.1" - - 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/JudgeZarbi/RTMPDump-OpenSSL-1.1 - patch :p0 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/rtmpdump/openssl-1.1.diff" - sha256 "3c9167e642faa9a72c1789e7e0fb1ff66adb11d721da4bd92e648cb206c4a2bd" - end - - 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/rtorrent.rb b/Formula/rtorrent.rb deleted file mode 100644 index a5d12db9f6a71..0000000000000 --- a/Formula/rtorrent.rb +++ /dev/null @@ -1,45 +0,0 @@ -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.9.8/rtorrent-0.9.8.tar.gz" - sha256 "9edf0304bf142215d3bc85a0771446b6a72d0ad8218efbe184b41e4c9c7542af" - license "GPL-2.0" - revision 1 - - bottle do - cellar :any - sha256 "fb9d292ae3f773162316eac2516bcc12a5a63718d4638aa4ff08a7d57e8a853e" => :catalina - sha256 "7bdf998faac16a4411e0f52ef906e09dff47507cef2b1218ac59b82d9298ae72" => :mojave - sha256 "ac0c6f9edd1fc875266e08a9d7576251d8be88f86162e5a431b10a5c5bb5f0b0" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libtorrent-rakshasa" - depends_on "xmlrpc-c" - - uses_from_macos "curl" - uses_from_macos "ncurses" - - def install - args = ["--prefix=#{prefix}", "--with-xmlrpc-c", - "--disable-debug", "--disable-dependency-tracking"] - - system "sh", "autogen.sh" - system "./configure", *args - system "make" - system "make", "install" - end - - test do - pid = fork do - exec "#{bin}/rtorrent", "-n", "-s", testpath - end - sleep 3 - assert_predicate testpath/"rtorrent.lock", :exist? - ensure - Process.kill("HUP", pid) - end -end diff --git a/Formula/rtptools.rb b/Formula/rtptools.rb deleted file mode 100644 index b1532b6a5009f..0000000000000 --- a/Formula/rtptools.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Rtptools < Formula - desc "Set of tools for processing RTP data" - homepage "https://web.archive.org/web/20190924020700/www.cs.columbia.edu/irt/software/rtptools/" - url "https://web.archive.org/web/20190714051650/www.cs.columbia.edu/irt/software/rtptools/download/rtptools-1.22.tar.gz" - sha256 "2c76b2a423fb943820c91194372133a44cbdc456ebf69c51616ec50eeb068c28" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "62a46aec907b497ca92c8a07731cf56b3a2b986850acbcb203aa87e94e945abe" => :catalina - sha256 "51fe1b7831b60ee5ca438c11f72094149dbee5f96209a965997209fd6ac95742" => :mojave - sha256 "e96df17dfe878ecb9e87a938579a21d514e31dbf8e5e6b743264dac23e42501c" => :high_sierra - 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 6847203d72287..0000000000000 --- a/Formula/rtv.rb +++ /dev/null @@ -1,80 +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.27.0.tar.gz" - sha256 "c57a6cbb2525160b6aaa9180aec0293962b6969675f8ac0f2cfacff3cbd00d7c" - license "MIT" - revision 3 - head "https://github.com/michael-lazar/rtv.git" - - bottle do - cellar :any_skip_relocation - sha256 "c75871adcd642a2f80afc256b7718ee7b154acf165a5572d0b199ad57c92d947" => :catalina - sha256 "178b8009cae28e82ca661ca016a414576dc5a24284e11960c85b37fedf8c8e99" => :mojave - sha256 "2510e9e484f8eeff62d204b4ae4c21c1cacce11fba156eeb42d3450789b90452" => :high_sierra - end - - deprecate! :date => "2019-06-02" - - depends_on "python@3.8" - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/c6/62/8a2bef01214eeaa5a4489eca7104e152968729512ee33cb5fbbc37a896b7/beautifulsoup4-4.9.1.tar.gz" - sha256 "73cc4d115b96f79c7d77c1c7f7a0a8d4c57860d1041df407dd1aae7f07a77fd7" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b4/19/53433f37a31543364c8676f30b291d128cdf4cd5b31b755b7890f8e89ac8/certifi-2020.4.5.2.tar.gz" - sha256 "5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "kitchen" do - url "https://files.pythonhosted.org/packages/d9/ca/3365cb1160533be8c8b57dbfd6502f367d35e30935ee89a003c664740714/kitchen-1.2.6.tar.gz" - sha256 "b84cf582f1bd1556b60ebc7370b9d331eb9247b6b070ce89dfe959cba2c0b03c" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "soupsieve" do - url "https://files.pythonhosted.org/packages/3e/db/5ba900920642414333bdc3cb397075381d63eafc7e75c2373bbc560a9fa1/soupsieve-2.0.1.tar.gz" - sha256 "a59dc181727e95d25f781f0eb4fd1825ff45590ec8ff49eadfd7f1a537cc0232" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - end - - test do - system "#{bin}/rtv", "--version" - end -end diff --git a/Formula/rubberband.rb b/Formula/rubberband.rb deleted file mode 100644 index cde639c5a3e6a..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://hg.sr.ht/~breakfastquay/rubberband", :using => :hg - - bottle do - cellar :any - rebuild 1 - sha256 "dcfa2c05cc251d0c5e810040646fb5f9511fda2d1cad20ccadce96544a1ad7e3" => :catalina - sha256 "629837bd83bfcef1003bfb29759d15c29bb7c22740a70f6143bd4c16a5bd3362" => :mojave - sha256 "f592baa6b5e82c542a92df87789a51b6603e7e8070dfa7f910349a388135b6da" => :high_sierra - 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 95d24053f124c..0000000000000 --- a/Formula/ruby-build.rb +++ /dev/null @@ -1,36 +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/v20200520.tar.gz" - sha256 "52be6908a94fbd4a94f5064e8b19d4a3baa4b773269c3884165518d83bcc8922" - license "MIT" - head "https://github.com/rbenv/ruby-build.git" - - bottle :unneeded - - depends_on "autoconf" - depends_on "pkg-config" - depends_on "readline" - - def install - ENV["PREFIX"] = prefix - system "./install.sh" - end - - def caveats - <<~EOS - ruby-build installs a non-Homebrew OpenSSL for each Ruby version installed and these are never upgraded. - - To link Rubies to Homebrew's OpenSSL 1.1 (which is upgraded) add the following - to your #{shell_profile}: - export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)" - - Note: this may interfere with building old versions of Ruby (e.g <2.4) that use - OpenSSL <1.1. - EOS - 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 7d7435503f238..0000000000000 --- a/Formula/ruby-completion.rb +++ /dev/null @@ -1,20 +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" - license "MIT" - 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 32746a8cb4124..0000000000000 --- a/Formula/ruby-install.rb +++ /dev/null @@ -1,25 +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" - license "MIT" - head "https://github.com/postmodern/ruby-install.git" - - bottle do - cellar :any_skip_relocation - sha256 "8141c3baa93dedadbdeba6d02a0d00ad13493ba052d013807a40ac048617c6da" => :catalina - 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 c24e3ad96aab4..0000000000000 --- a/Formula/ruby.rb +++ /dev/null @@ -1,230 +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.7/ruby-2.7.1.tar.xz" - sha256 "b224f9844646cc92765df8288a46838511c1cec5b550d8874bd4686a904fcee7" - revision 2 - - bottle do - sha256 "c9ee36823a8dfe2686c6d7a3faf5061a032ed0b8e08d484f3ff2cda72d210a08" => :catalina - sha256 "d597bee751f9419ea7b40d8125e4f58b2c1eb675b929fe85d8463a6e008b2250" => :mojave - sha256 "345677b922e40e7324bbab0d68593a2bbef7aa3e8f636fd850295f3414758ed7" => :high_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@1.1" - depends_on "readline" - - 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.1.2.tgz" - sha256 "edd1a6bca6e780a3f65019bbcb0bbfe36c65a9809c0d43e7b52f23792591f140" - end - - def api_version - Utils.safe_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@1.1 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" unless MacOS::CLT.installed? - - # Correct MJIT_CC to not use superenv shim - args << "MJIT_CC=/usr/bin/clang" - - 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 and Bundler - rm_rf rg_in/"bundler" - 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 - alias :old_default_specifications_dir :default_specifications_dir - end - - def self.default_dir - path = [ - "#{HOMEBREW_PREFIX}", - "lib", - "ruby", - "gems", - "#{api_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 - return unless latest_version_installed? - - <<~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 bin/"bundle", "exec", "ls" # https://github.com/Homebrew/homebrew-core/issues/53247 - system bin/"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@2.4.rb b/Formula/ruby@2.4.rb deleted file mode 100644 index 4c449f65dc90d..0000000000000 --- a/Formula/ruby@2.4.rb +++ /dev/null @@ -1,162 +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.10.tar.xz" - sha256 "d5668ed11544db034f70aec37d11e157538d639ed0d0a968e2f587191fc530df" - - bottle do - sha256 "0af834c6be2b5b377eb53b27895d0eb5cfcf9298b7613197f4d3cc83bc3fdad5" => :catalina - sha256 "160204426fc18dfead0ceeb0be27eba371a68996792d6a8258b30bdfca8ef5f6" => :mojave - sha256 "c8f457842cfc697ead2e961539742995bf1a6782de9cecd0b293c9fe6107b9d3" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "zlib" - - 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@1.1 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" 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 - # 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 d2497a5becfaa..0000000000000 --- a/Formula/ruby@2.5.rb +++ /dev/null @@ -1,162 +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.8.tar.xz" - sha256 "0391b2ffad3133e274469f9953ebfd0c9f7c186238968cbdeeb0651aa02a4d6d" - - bottle do - sha256 "77c3f363f6d159824f6a6b1b80ac7e1d2bcb79528f79a0bf78ab3feaa837ad94" => :catalina - sha256 "bbd75b74d1694bfb1378de37a21d692ca4ecdf3e4c5f6ad7f381ab1ac4942119" => :mojave - sha256 "cb21f7f22afc2f304a9dc9ab7aba730563656a054b0407943ba0cb1f68b010a2" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "zlib" - - 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@1.1 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" 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 - # 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.6.rb b/Formula/ruby@2.6.rb deleted file mode 100644 index 7f71ae7aa2209..0000000000000 --- a/Formula/ruby@2.6.rb +++ /dev/null @@ -1,180 +0,0 @@ -class RubyAT26 < 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.6.tar.xz" - sha256 "5db187882b7ac34016cd48d7032e197f07e4968f406b0690e20193b9b424841f" - revision 1 - - bottle do - sha256 "b9618a3e2b84a8364e2a9db594c8def107996030155908d1d2f932c97720ef46" => :catalina - sha256 "e14b839ac8de2cbca1b7f67803a2cfd085159045102c2c073d8d90e7bbeaf81d" => :mojave - sha256 "6be9583785d94e62384bb4642a5dd514653dbaab7acf77a6873b4e654c355ce9" => :high_sierra - end - - keg_only :versioned_formula - - depends_on "pkg-config" => :build - depends_on "libyaml" - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "zlib" - - def api_version - "2.6.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@1.1 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" unless MacOS::CLT.installed? - - # Correct MJIT_CC to not use superenv shim - args << "MJIT_CC=/usr/bin/clang" - - 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 - # 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}" - ] - - @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 - class BasicSpecification - def self.default_specifications_dir - File.join(Gem.old_default_dir, "specifications", "default") - end - 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 bin/"bundle", "install", "--binstubs=#{testpath}/bin" - assert_predicate testpath/"bin/gemoji", :exist?, "gemoji is not installed in #{testpath}/bin" - end -end diff --git a/Formula/rubyfmt.rb b/Formula/rubyfmt.rb deleted file mode 100644 index db7b198b36e57..0000000000000 --- a/Formula/rubyfmt.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Rubyfmt < Formula - desc "Ruby autoformatter" - homepage "https://github.com/penelopezone/rubyfmt" - url "https://github.com/penelopezone/rubyfmt/archive/v0.2.0.tar.gz" - sha256 "68ebc0fd30933b1e27b609cc34c69a3bc886747d11c5b949e460ce01814adaeb" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "8d9ed80d496220e02b9df146c41870079116cf798ab90734212d3cdc6080bb8b" => :catalina - sha256 "8d9ed80d496220e02b9df146c41870079116cf798ab90734212d3cdc6080bb8b" => :mojave - sha256 "8d9ed80d496220e02b9df146c41870079116cf798ab90734212d3cdc6080bb8b" => :high_sierra - end - - uses_from_macos "ruby" - - def install - system "make" - bin.install "build/rubyfmt.rb" => "rubyfmt" - end - - test do - (testpath/"test.rb").write <<~EOS - def foo; 42; end - EOS - expected = <<~EOS - def foo - 42 - end - EOS - assert_equal expected, shell_output("#{bin}/rubyfmt #{testpath}/test.rb") - end -end diff --git a/Formula/run.rb b/Formula/run.rb deleted file mode 100644 index 2701b4b255cb0..0000000000000 --- a/Formula/run.rb +++ /dev/null @@ -1,30 +0,0 @@ -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/v0.7.2.tar.gz" - sha256 "c542b523c67e3cd2ca05a8e2f92cca607181a68518b2568a68b76ed9f700d6e0" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "4a2329ae36f59ed71c1b6364828c465a27f92506cd77e9a7c8217def3e2b7c9e" => :catalina - sha256 "4a2329ae36f59ed71c1b6364828c465a27f92506cd77e9a7c8217def3e2b7c9e" => :mojave - sha256 "4a2329ae36f59ed71c1b6364828c465a27f92506cd77e9a7c8217def3e2b7c9e" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-trimpath", "-ldflags", "-w -s", "-o", bin/name - 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/runcocoa.rb b/Formula/runcocoa.rb deleted file mode 100644 index d5d948512489b..0000000000000 --- a/Formula/runcocoa.rb +++ /dev/null @@ -1,27 +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 ce0bffec2688a..0000000000000 --- a/Formula/runit.rb +++ /dev/null @@ -1,95 +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 - cellar :any_skip_relocation - rebuild 1 - sha256 "c6e5b49ab3601824db1969967c5ba4a0d35fa65841cfa2ec1d50fcca968fcf05" => :catalina - sha256 "3c684c031305f98a2d24e904b6fc3301a71f0089e84e814028bad8ab05658cae" => :mojave - sha256 "a66fbfb0258db267c5a3a3d7790fe4b5224478e7ecc1377a9a877118d5e27be5" => :high_sierra - 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 - - plist_options :manual => "runit" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/runsvdir - -P - #{var}/service - - EnvironmentVariables - - PATH - /usr/bin:/bin:/usr/sbin:/sbin:#{opt_bin} - - KeepAlive - - Crashed - - SuccessfulExit - - - ProcessType - Background - StandardErrorPath - #{var}/log/runit.log - StandardOutPath - #{var}/log/runit.log - - - EOS - end - - test do - assert_match "usage: #{bin}/runsvdir [-P] dir", shell_output("#{bin}/runsvdir 2>&1", 1) - end -end diff --git a/Formula/rush.rb b/Formula/rush.rb deleted file mode 100644 index a71b21d56061a..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-2.1.tar.xz" - mirror "https://ftpmirror.gnu.org/rush/rush-2.1.tar.xz" - sha256 "c2ff487d44ce3d14854d0269eb0aa4c0f98bcca35390fad5ea52da75d9e4abdf" - license "GPL-3.0" - - bottle do - sha256 "a818df5c93d76a0a53c47108af3009a6d8265722d132204a636e29460693ac0d" => :catalina - sha256 "5cdc9e464c7086e99e26063787dfefafd4805d90b0ea5aa40044b81f23d10db1" => :mojave - sha256 "a76250fc5b34898050b9e18abd00dffbefd2c37dcd021b37d30bef75574abe49" => :high_sierra - sha256 "55acb177bf3b6c2d041341b9a625ac10c6aba1237974febd66e40f1a7ec23319" => :sierra - 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-analyzer.rb b/Formula/rust-analyzer.rb deleted file mode 100644 index 1e781943da0c3..0000000000000 --- a/Formula/rust-analyzer.rb +++ /dev/null @@ -1,70 +0,0 @@ -class RustAnalyzer < Formula - desc "Experimental Rust compiler front-end for IDEs" - homepage "https://rust-analyzer.github.io/" - url "https://github.com/rust-analyzer/rust-analyzer/archive/2020-07-06.tar.gz" - sha256 "f5c2febf5ad07b3c73ba96d4579fbc2511d5cf17c8aefbd5bbd7bb1378830d4e" - - bottle do - cellar :any_skip_relocation - sha256 "f2fd68c0cd998f6d9543b2fa606775a4e5c7d6bf4e5ddd9c6cc9e7ac1370c73e" => :catalina - sha256 "247acaf108accbbe071330a0da99f037d5a2a8e9d08f72f6831a3c02d3866aa5" => :mojave - sha256 "86667de9d066a8ae0a29c41f8818e27efd9b9902bc12ca3bc7f16df004e9754b" => :high_sierra - end - - depends_on "rust" => :build - - def install - cd "crates/rust-analyzer" do - system "cargo", "install", "--bin", "rust-analyzer", *std_cargo_args - end - end - - test do - def rpc(json) - "Content-Length: #{json.size}\r\n" \ - "\r\n" \ - "#{json}" - end - - input = rpc <<-EOF - { - "jsonrpc":"2.0", - "id":1, - "method":"initialize", - "params": { - "rootUri": "file:/dev/null", - "capabilities": {} - } - } - EOF - - input += rpc <<-EOF - { - "jsonrpc":"2.0", - "method":"initialized", - "params": {} - } - EOF - - input += rpc <<-EOF - { - "jsonrpc":"2.0", - "id": 1, - "method":"shutdown", - "params": null - } - EOF - - input += rpc <<-EOF - { - "jsonrpc":"2.0", - "method":"exit", - "params": {} - } - EOF - - output = /Content-Length: \d+\r\n\r\n/ - - assert_match output, pipe_output("#{bin}/rust-analyzer", input, 0) - end -end diff --git a/Formula/rust.rb b/Formula/rust.rb deleted file mode 100644 index ee72b719b2ab3..0000000000000 --- a/Formula/rust.rb +++ /dev/null @@ -1,116 +0,0 @@ -class Rust < Formula - desc "Safe, concurrent, practical language" - homepage "https://www.rust-lang.org/" - revision 1 - - stable do - url "https://static.rust-lang.org/dist/rustc-1.44.1-src.tar.gz" - sha256 "7e2e64cb298dd5d5aea52eafe943ba0458fa82f2987fdcda1ff6f537b6f88473" - - resource "cargo" do - url "https://github.com/rust-lang/cargo.git", - :tag => "0.45.0", - :revision => "05d080faa4f2bc1e389ea7c4fd8f30ed2b733a7f" - end - end - - bottle do - cellar :any - rebuild 1 - sha256 "5128f7d93695a04ba887284a8d6061202031524251053371b406f94d29738758" => :catalina - sha256 "4679c3c77c502d67097ec602860dae400c64ea90e6064a45cd4444f27971eabb" => :mojave - sha256 "0a2c02fe10827d361d888532adf4471de7df37edd509bd59c710358cb4e32494" => :high_sierra - end - - head do - url "https://github.com/rust-lang/rust.git" - - resource "cargo" do - url "https://github.com/rust-lang/cargo.git" - end - end - - depends_on "cmake" => :build - depends_on "python@3.8" => :build - depends_on "libssh2" - depends_on "openssl@1.1" - depends_on "pkg-config" - - uses_from_macos "curl" - uses_from_macos "zlib" - - resource "cargobootstrap" do - # From https://github.com/rust-lang/rust/blob/#{version}/src/stage0.txt - url "https://static.rust-lang.org/dist/2020-05-07/cargo-0.44.0-x86_64-apple-darwin.tar.gz" - sha256 "1071c520204a9e8fe4dd0de66a07a083f06abba16ac88f1df72231328a6395e6" - end - - def install - ENV.prepend_path "PATH", Formula["python@3.8"].opt_libexec/"bin" - - # 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@1.1"].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}"] - if build.head? - args << "--disable-rpath" - 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" - args = %W[--root #{prefix} --path . --features curl-sys/force-system-lib-on-osx] - system "cargo", "install", *args - man1.install Dir["src/etc/man/*.1"] - bash_completion.install "src/etc/cargo.bashcomp.sh" - zsh_completion.install "src/etc/_cargo" - end - - 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 3d6a64f5ddfc5..0000000000000 --- a/Formula/rustc-completion.rb +++ /dev/null @@ -1,28 +0,0 @@ -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" - - 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 813fe289d48f8..0000000000000 --- a/Formula/rustup-init.rb +++ /dev/null @@ -1,37 +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.22.1.tar.gz" - sha256 "ad46cc624f318a9493aa62fc9612a450564fe20ba93c689e0ad856bff3c64c5b" - - bottle do - cellar :any_skip_relocation - sha256 "12bef1ce5ee98d022eee88019044b30d1c9919fd6f4b14e9ef876f8944e39a96" => :catalina - sha256 "a4f477ccd1472f43321452297aa935347fd8e12f96d7bd839239e669dd361000" => :mojave - sha256 "6a4ba7267ffa430c98cc4cf58026473ce07a47a97dcc40acd4031d8d82c209a5" => :high_sierra - end - - depends_on "rust" => :build - - def install - cargo_home = buildpath/"cargo_home" - cargo_home.mkpath - ENV["CARGO_HOME"] = cargo_home - - system "cargo", "install", "--features", "no-self-update", *std_cargo_args - 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 a08079272065e..0000000000000 --- a/Formula/rxvt-unicode.rb +++ /dev/null @@ -1,49 +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 "d17b7410c97c5f95f1abbf7de7e49249995b23303696b8f7a2eed7c0924fe818" => :catalina - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/rxvt-unicode/9.22.patch" - sha256 "a266a5776b67420eb24c707674f866cf80a6146aaef6d309721b6ab1edb8c9bb" - end - - 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 diff --git a/Formula/ry.rb b/Formula/ry.rb deleted file mode 100644 index a50cbd3c7faf5..0000000000000 --- a/Formula/ry.rb +++ /dev/null @@ -1,42 +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 2 - sha256 "b82b9243f4e89e24608f21a9a46e55cad5708224749ee07da18841c3d50e38d2" => :catalina - sha256 "835c360df374f5ca94a753b1ce79ba61dfc9fc14e54a2bf064367b9094909677" => :mojave - sha256 "3e2e0b1e4104b9856ef6f5ad05caa4100ba209850c84c1db759f788eed042740" => :high_sierra - sha256 "3e2e0b1e4104b9856ef6f5ad05caa4100ba209850c84c1db759f788eed042740" => :sierra - 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_predicate testpath/"rubies", :exist? - end -end diff --git a/Formula/rzip.rb b/Formula/rzip.rb deleted file mode 100644 index 6ea86637b1f9d..0000000000000 --- a/Formula/rzip.rb +++ /dev/null @@ -1,43 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "0d08b087dcaf10a5604aba687c8b59c116d4374bb4a9ded7aec3108d3f005b1b" => :catalina - 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 aaf568246a960..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.2.tar.bz2" - mirror "https://src.fedoraproject.org/repo/pkgs/slang/slang-2.3.2.tar.bz2/sha512/35cdfe8af66dac62ee89cca60fa87ddbd02cae63b30d5c0e3786e77b1893c45697ace4ac7e82d9832b8a9ac342560bc35997674846c5022341481013e76f74b5/slang-2.3.2.tar.bz2" - sha256 "fc9e3b0fc4f67c3c1f6d43c90c16a5c42d117b8e28457c5b46831b8b5d3ae31a" - license "GPL-2.0" - - bottle do - sha256 "4753499f91b8d6ad4f17865ba850eb5f170aff6460441655c75838b759b2ff9d" => :catalina - sha256 "05a3437702d5793c9bcac94151e8614878ca36cb1074ab330708021e59845346" => :mojave - sha256 "52884a38833f21110f2ed22960f8f96ed5e3878fda45def8b67450e643ccfc97" => :high_sierra - sha256 "e317f0ed56871fe293943faedfa44e6c744afb5a0187b7c81e201ce6921b0634" => :sierra - 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 adb7472a1e8e9..0000000000000 --- a/Formula/s-nail.rb +++ /dev/null @@ -1,46 +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.19.tar.xz" - sha256 "84f249a233a4592cf0c0bda9644c5b2d12e63a4807c0e292c13ef5068d3ca2bd" - - bottle do - sha256 "8884e726df98985c8e48a64f7ba54396a15c28f4018b9a00c40c05e42eb706c9" => :catalina - sha256 "a49ee56f5b20d5d40a4c1575032402c51ef1fb111d138aeec0d046ba85600c0d" => :mojave - sha256 "130bbb9f47467f2b3d5def07ef845eee58a63a2308f13fab71c57ed7d76bb56a" => :high_sierra - end - - depends_on "awk" => :build - depends_on "libidn" - depends_on "openssl@1.1" - - def install - system "make", "CC=#{ENV.cc}", - "C_INCLUDE_PATH=#{Formula["openssl@1.1"].opt_include}", - "LDFLAGS=-L#{Formula["openssl@1.1"].opt_lib}", - "VAL_PREFIX=#{prefix}", - "OPT_DOTLOCK=no", - "config" - system "make", "build" - system "make", "install" - end - - test do - ENV["SOURCE_DATE_EPOCH"] = "844221007" - - date1 = shell_output("date -r 844221007 '+%a %b %e %T %Y'") - date2 = shell_output("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 81a076b3b09ef..0000000000000 --- a/Formula/s-search.rb +++ /dev/null @@ -1,40 +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.14.tar.gz" - sha256 "c32eedf6a4080cbe221c902cf7f63b1668b3927edfc448d963d69ed66c8ec2fb" - license "MIT" - head "https://github.com/zquestz/s.git" - - bottle do - cellar :any_skip_relocation - sha256 "cd7352e1c4092774fdd4cbff61bd107e6447ea00e96ec94431dcbc1be7bbade5" => :catalina - sha256 "04281fb66e28cf23c3ea1cd23ec6286432191fde31ac8c7b6c9c13bc6b365b0a" => :mojave - sha256 "4a0c5595943e8b7b4892ff3caf4d03b29533405a411268a77e0a51272a3d7823" => :high_sierra - sha256 "b9d547b1bcc45516396ed8398b624ac83a1c4ade7bf13f130b1b063b9aec1590" => :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..8e21141cc24ff --- /dev/null +++ b/Formula/s/s-lang.rb @@ -0,0 +1,48 @@ +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 + + bottle do + 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..bc2d60d13f18a --- /dev/null +++ b/Formula/s/s-nail.rb @@ -0,0 +1,67 @@ +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_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..ddd109b507baa --- /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.1.tar.gz" + sha256 "4bddf2ff574b6c1af36929290986b351484ba643725ec0918c3c0c10461e326d" + license "MIT" + head "https://github.com/zquestz/s.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "78b50016430687712f8b84e23faefdffbf06db097036ff1e2c34c9c7bdbd4bbb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef8e90f1d4e31ecea6da0d63de25cd3eb4cef6f6108a43f70fff4d298c70dafc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef8e90f1d4e31ecea6da0d63de25cd3eb4cef6f6108a43f70fff4d298c70dafc" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ef8e90f1d4e31ecea6da0d63de25cd3eb4cef6f6108a43f70fff4d298c70dafc" + sha256 cellar: :any_skip_relocation, sonoma: "b0c6b8d333b9c3cbb579bd1f0bee3e80f44e5120475aba3f03e04a38b6d032c9" + sha256 cellar: :any_skip_relocation, ventura: "b0c6b8d333b9c3cbb579bd1f0bee3e80f44e5120475aba3f03e04a38b6d032c9" + sha256 cellar: :any_skip_relocation, monterey: "b0c6b8d333b9c3cbb579bd1f0bee3e80f44e5120475aba3f03e04a38b6d032c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3aa30916a1b90e20f0c6e12d03afa20a7e6f1d639bc3c8134daf501f08916f5a" + 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..8b92a3af85e84 --- /dev/null +++ b/Formula/s/s2geometry.rb @@ -0,0 +1,93 @@ +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" + + livecheck do + url :homepage + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "42509d7410e496dac516d3860660972ee3891b85539a709f552250cb67413b85" + sha256 cellar: :any, arm64_sonoma: "497a78de8feeecc24682e19e09810b564706648ff28ee2b80eb5c27fbf1d6b1e" + sha256 cellar: :any, arm64_ventura: "13d05f9f88513c578e73b063b23f9f6a9df5174531f0217f7ae991677179ad38" + sha256 cellar: :any, sonoma: "c88b904bd6591a0f13524e1e591eb5f8983f852c753636e7d84a516b9a1549eb" + sha256 cellar: :any, ventura: "df84f8602037761b8285f3124a9e46648ba0d71bfa24b794ac3a6d740db0454d" + sha256 cellar: :any_skip_relocation, arm64_linux: "10b96872a76fef5f47caf8bf94d8f92536927ce44256d9c7d216a4593b1903d3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "669ca453ee0a13bf1d08e201a35633dd38bf95844069f46bf61d116640b3f25f" + end + + depends_on "cmake" => [:build, :test] + depends_on "abseil" + depends_on "glog" + depends_on "openssl@3" + + 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 diff --git a/Formula/s/s2n.rb b/Formula/s/s2n.rb new file mode 100644 index 0000000000000..49ff645ef3070 --- /dev/null +++ b/Formula/s/s2n.rb @@ -0,0 +1,50 @@ +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.5.18.tar.gz" + sha256 "e4a249843d05d239128772da32f875ad9730f8d0cb5a44e8c6802c5882014f79" + 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_sequoia: "a7ebd6cb7bdf1084e2eb48782072e0d5e7b7d0fe35b092e0e369b6ebbf6e3d49" + sha256 cellar: :any, arm64_sonoma: "48579757109d829850b8217a0a72e4a89ad75d761af3f9b3f78f37aaff05a7ea" + sha256 cellar: :any, arm64_ventura: "612a985dcbf2e456f86a1205f3dcc386226854cf90edb412a5d8cb0a62899c38" + sha256 cellar: :any, sonoma: "b1f217ddf95412f052afb98c97d531965c40f1b5b6f3e611ab0759ea0d1c86bf" + sha256 cellar: :any, ventura: "5a9ac5a3fee95ad9c6a02d1cebf202ae845456cdc3169f6e3e36bbd3f726136c" + sha256 cellar: :any_skip_relocation, arm64_linux: "b527db213b143f717dea1364e5367eb7f192662e40bec58d517ff2c9656a9e6d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1020b198ff56a1aa9293f472d6cda6bdd0533d5255e200174d93ec184ab86347" + 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..64702b78987c9 --- /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.4.tar.gz" + sha256 "0451471209cc872708e91b2784a4a1b9f3ca44c89a7bffb8f6145aed28c941e7" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "54509b12da98f4375896e2914a44162745f0d629163de99578080af5976bbf34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0e0cff205bf0b253dc8dfc5127acf9db4375fc92d1d076750261c547d6eefc2f" + end + + depends_on "pkgconf" => :build + depends_on "curl" + depends_on "expat" + depends_on "libfuse@2" + 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..5e777ce56abab --- /dev/null +++ b/Formula/s/s3cmd.rb @@ -0,0 +1,56 @@ +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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b14b322ca3b3b43c0f0ef051dee2908cf1c16482d4e7ba74a1865860c8956edd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b14b322ca3b3b43c0f0ef051dee2908cf1c16482d4e7ba74a1865860c8956edd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b14b322ca3b3b43c0f0ef051dee2908cf1c16482d4e7ba74a1865860c8956edd" + sha256 cellar: :any_skip_relocation, sonoma: "95771bafe9227af6ab7289809d0e989403d0a41f538db66afd963048fbc7a18a" + sha256 cellar: :any_skip_relocation, ventura: "95771bafe9227af6ab7289809d0e989403d0a41f538db66afd963048fbc7a18a" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9423264039751971eb13ebd7df19bbe138a14280e71f633cc0a396285e1dcd1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ff809e6935a4f1e5973d1e6d60ee4f04d9aecc4151f3a734df55d4ea3609b90" + end + + depends_on "libmagic" # for python-magic + depends_on "python@3.13" + + 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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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..776f801f30dea --- /dev/null +++ b/Formula/s/s3ql.rb @@ -0,0 +1,149 @@ +class S3ql < Formula + include Language::Python::Virtualenv + + desc "POSIX-compliant FUSE filesystem using object store as block storage" + homepage "https://github.com/s3ql/s3ql" + # TODO: Try to remove `cython` and corresponding build_cython in the next release. + # check if `python3 setup.py build_cython` is still needed in https://github.com/s3ql/s3ql/blob/master/.github/workflows/pr-ci.yml#L34 + url "https://github.com/s3ql/s3ql/releases/download/s3ql-5.2.3/s3ql-5.2.3.tar.gz" + sha256 "892acf8a479fc837256100d820408bc5e2c27c0ba9ee2b5f8aa114d593b5af87" + license "GPL-3.0-only" + revision 1 + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "96328863e3da5545903385b786971fc1b8bbd0be4151dbd5bd738c979f6a57b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff2f720afc9d4216f721454f97a5f4fe133ee503b0d3167d3f2012a33ae84a4d" + end + + depends_on "cython" => :build + depends_on "pkgconf" => :build + + depends_on "cryptography" + depends_on "libffi" + depends_on "libfuse" + depends_on :linux # on macOS, requires closed-source macFUSE + depends_on "openssl@3" + depends_on "python@3.13" + + resource "apsw" do + url "https://files.pythonhosted.org/packages/2e/9f/29be0326b2178cfe10d6d45de83163c70cd0b4985502f398fe32791943e2/apsw-3.46.1.0.tar.gz" + sha256 "96e3dfad1fd0cc77a778aa6b27468292041a8e9cb1f2dcf06bd773762c9b0c0c" + 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/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" + sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" + 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/a1/37/c854a8b1b1020cf042db3d67577c6f84cd1e8ff6515e4f5498ae9e444ea5/google_auth-2.35.0.tar.gz" + sha256 "f4c64ed4e01e8e8b646ef34c018f8bf3338df0c8e37d8b3bba40e7f574a3278a" + end + + resource "google-auth-oauthlib" do + url "https://files.pythonhosted.org/packages/cc/0f/1772edb8d75ecf6280f1c7f51cbcebe274e8b17878b382f63738fd96cee5/google_auth_oauthlib-1.2.1.tar.gz" + sha256 "afd0cad092a2eaa53cd8e8298557d6de1034c6cb4a740500b5357b648af97263" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/8d/e6/2fc95aec377988ff3ca882aa58d4f6ab35ff59a12b1611a9fe3075eb3019/setuptools-70.2.0.tar.gz" + sha256 "bd63e505105011b25c3c11f753f7e3b8465ea739efddaccef8f0efac2137bac1" + end + + resource "trio" do + url "https://files.pythonhosted.org/packages/9a/03/ab0e9509be0c6465e2773768ec25ee0cb8053c0b91471ab3854bbf2294b2/trio-0.26.2.tar.gz" + sha256 "0346c3852c15e5c7d40ea15972c4805689ef2cb8b5206f794c9c19450119f3a4" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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 + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + python3 = "python3.13" + venv = virtualenv_create(libexec, python3) + venv.pip_install resources + + # 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 "setup.py", /'(?:(mkfs|fsck|mount|umount)\.)s3ql =/, "'\\1_s3ql =" + + # Regenerate Cython files for Python 3.13 support. Try to remove in next release. + ENV.prepend_path "PYTHONPATH", Formula["cython"].opt_libexec/Language::Python.site_packages(python3) + system libexec/"bin/python3", "setup.py", "build_cython" + + system libexec/"bin/python3", "setup.py", "build_ext", "--inplace" + venv.pip_install_and_link buildpath + 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..2d09d069365b2 --- /dev/null +++ b/Formula/s/s3scanner.rb @@ -0,0 +1,35 @@ +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_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, 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..326d4a5b96911 --- /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 3 + head "https://github.com/bloomreach/s4cmd.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "43d2483c9cb4dcbe9c834c42ba1b972a1d1702e03078513d9dc9baa76655fc9b" + end + + depends_on "python@3.13" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/80/8b/31845869fb935b93d1f1a846d2a8e13dc91af4cf03ba701e2068c08b99af/boto3-1.35.37.tar.gz" + sha256 "470d981583885859fed2fd1c185eeb01cc03e60272d499bafe41b12625b158c8" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/57/a4/bc96ba621c869f723ce4cb4dadb53fdbb821d64ef1146f0749098ef342cf/botocore-1.35.37.tar.gz" + sha256 "b2b4d29bafd95b698344f2f0577bb67064adbf1735d8a0e3c7473daa59c23ba6" + 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/3a/31/3c70bf7603cc2dca0f19bdc53b4537a797747a58875b552c8c413d963a3f/pytz-2024.2.tar.gz" + sha256 "2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/a0/a8/e0a98fd7bd874914f0608ef7c90ffde17e116aefad765021de0f012690a2/s3transfer-0.10.3.tar.gz" + sha256 "4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..f5a05997eeb7a --- /dev/null +++ b/Formula/s/s5cmd.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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, 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.rb b/Formula/s/s6.rb new file mode 100644 index 0000000000000..f1c25e88951b9 --- /dev/null +++ b/Formula/s/s6.rb @@ -0,0 +1,87 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "67e7b84ebe8f1610f2edeba0bfafb362eb0c6f8fc9bd2e31bbc777ebf384840f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "81cb72f4806fb26f29f6537da49a1c5e7fcccdaa8a8a34d7d878ef3e19e7803c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c59164a75b08590c40b69598f6d846230fe8288de366c5d371f8f7e3d276446a" + sha256 cellar: :any_skip_relocation, sonoma: "f282796bae69dd7ccc641601060115edec8bdf4f95889492574725e07eb566c7" + sha256 cellar: :any_skip_relocation, ventura: "f985eafa60d7504a2efd641f591189a88467444ccf528a5ef9301ee369bec659" + sha256 cellar: :any_skip_relocation, arm64_linux: "ec4890a947f1e2aa3363969112a8f80ca3f3bdf647c9ede8fd74a39cb4ec213a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a50281696347be24e9cbfc2a0beb51ad926bdc10bf8efb86b55e57ee3d6afd4c" + end + + resource "skalibs" do + url "https://skarnet.org/software/skalibs/skalibs-2.14.4.0.tar.gz" + sha256 "0e626261848cc920738f92fd50a24c14b21e30306dfed97b8435369f4bae00a5" + end + + resource "execline" do + url "https://skarnet.org/software/execline/execline-2.9.7.0.tar.gz" + sha256 "73c9160efc994078d8ea5480f9161bfd1b3cf0b61f7faab704ab1898517d0207" + 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" + doc.install Dir["doc/*"] + 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/s/sacad.rb b/Formula/s/sacad.rb new file mode 100644 index 0000000000000..4e06860105716 --- /dev/null +++ b/Formula/s/sacad.rb @@ -0,0 +1,119 @@ +class Sacad < Formula + include Language::Python::Virtualenv + + desc "Automatic cover art downloader" + homepage "https://github.com/desbma/sacad" + url "https://github.com/desbma/sacad/archive/refs/tags/2.8.0.tar.gz" + sha256 "73333aabbab71a941ed393e9c497250bb9a8a06eb93a4da9afef46d2d6dd5f00" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "209abcc3e86b84f3b8fb42814f6ed486528f4a80eda90f39bc498ebfb1c0f851" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f186d3996c26173edf0f409a7ae1a6142085d2640250c115fb3e94510730301d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1db21b5d97acc6eda7c4228b2b2beaff2c72526151b823931db678a67f878f8b" + sha256 cellar: :any_skip_relocation, sonoma: "cc399147b8a49e0655641cd97b524543b24d16bd75b0bcc9f34bebad81cc3d07" + sha256 cellar: :any_skip_relocation, ventura: "d45c054900915a504c447c0c287202975039feb33cbe2169496bc64a4a3e915a" + sha256 cellar: :any_skip_relocation, arm64_linux: "d3c59d39a3064b7bbcd88b1027e78bd8eb1b1e327db3128d6c80ac84f0e3e4a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37b39ab05560f6440cdbb02e6cca68b5d0ee0f71ba5c3dba66c9fa6f4a923802" + end + + depends_on "pillow" + depends_on "python@3.13" + + uses_from_macos "libxml2" + uses_from_macos "libxslt" + + 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/f1/d9/1c4721d143e14af753f2bf5e3b681883e1f24b592c0482df6fa6e33597fa/aiohttp-3.11.16.tar.gz" + sha256 "16f8a2c9538c14a557b4d309ed4d0a7c60f0253e8ed7b6c9a2859a7582f8b1b8" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "bitarray" do + url "https://files.pythonhosted.org/packages/f1/6e/e3877eebb83e3e9d22b6089be7b8c098d3d09b2195a9570d6d9049e90d5b/bitarray-3.3.1.tar.gz" + sha256 "8c89219a672d0a15ab70f8a6f41bc8355296ec26becef89a127c1a32bb2e6345" + 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/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + 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/80/61/d3dc048cd6c7be6fe45b80cedcbdd4326ba4d550375f266d9f4246d0f4bc/lxml-5.3.2.tar.gz" + sha256 "773947d0ed809ddad824b7b14467e1a481b8976e87278ac4a730c2f7c7fcddc1" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + 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/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + 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/f7/89/19151076a006b9ac0dd37b1354e031f5297891ee507eb624755e58e10d3e/Unidecode-1.3.8.tar.gz" + sha256 "cfdb349d46ed3873ece4586b96aa75258726e2fa8ec21d6f00a591d98806c2f4" + 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/fc/4d/8a8f57caccce49573e567744926f88c6ab3ca0b47a257806d1cf88584c5f/yarl-1.19.0.tar.gz" + sha256 "01e02bb80ae0dbed44273c304095295106e1d9470460e773268a27d11e594892" + 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..fae441aa2672c --- /dev/null +++ b/Formula/s/sad.rb @@ -0,0 +1,35 @@ +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_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..86e0c1c1f69fa --- /dev/null +++ b/Formula/s/saf-cli.rb @@ -0,0 +1,31 @@ +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.4.21.tgz" + sha256 "624e2a44433e0babb26eebbc84b16beebed7167654682ad39260621a8e1330e8" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "60a9a7c46e657b0a4687995faba15adaa1e2eb11f6bbd5d4cfe285aa82df68f8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "60a9a7c46e657b0a4687995faba15adaa1e2eb11f6bbd5d4cfe285aa82df68f8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "60a9a7c46e657b0a4687995faba15adaa1e2eb11f6bbd5d4cfe285aa82df68f8" + sha256 cellar: :any_skip_relocation, sonoma: "469c74ffaacab103c9b351527fce01511dfd14844b85e3cff1cfd69058657b76" + sha256 cellar: :any_skip_relocation, ventura: "469c74ffaacab103c9b351527fce01511dfd14844b85e3cff1cfd69058657b76" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea18c573baec0ee385521edcd37677ca3f6bf3bdb1798aa2281760db00c49324" + sha256 cellar: :any_skip_relocation, x86_64_linux: "60a9a7c46e657b0a4687995faba15adaa1e2eb11f6bbd5d4cfe285aa82df68f8" + 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..530376e37a358 --- /dev/null +++ b/Formula/s/safe-rm.rb @@ -0,0 +1,48 @@ +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" + + bottle do + rebuild 1 + 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..937c8d082e5f6 --- /dev/null +++ b/Formula/s/safeint.rb @@ -0,0 +1,60 @@ +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 + + 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..b753f9f585bc7 --- /dev/null +++ b/Formula/s/safety.rb @@ -0,0 +1,223 @@ +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/2d/9c/df6ab5f077e22bb4a10aa9208691c6be5c0ad15193439435216ed536f7f3/safety-3.5.1.tar.gz" + sha256 "7fde2dbb497f2a167fe2dd864c8ab3296bbcd6e8a4f0490b047d5c84a60a653f" + license "MIT" + head "https://github.com/pyupio/safety.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "edac706c31f93a579208f86ab327fc0090cb5699af86f5e3a92a3664944ce0ed" + sha256 cellar: :any, arm64_sonoma: "4847fb07d411d4d404cd7dfae6a1872e4bc9a4a2cbab3dc49b6a5b311ed511a7" + sha256 cellar: :any, arm64_ventura: "67c6d5156fc4be4bcd514b8d5d963b950aaff52336361057d002f642f025d919" + sha256 cellar: :any, sonoma: "f895e0dc48273e95e8356bbdf36e2973d85eb4e4977037418542fe5eab089be6" + sha256 cellar: :any, ventura: "136fcbc770dfc0f1e6763c063cc61bb0b624a92a7a1fffcc986e1d8d129be990" + sha256 cellar: :any_skip_relocation, arm64_linux: "33d7d9e11710de28422e9cb741af333165dd0c6b0eef98307e853ac86add23b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1bed57859863321e621124a7e022a48007f1daa1400224b40e700a479e8cc519" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "authlib" do + url "https://files.pythonhosted.org/packages/2a/b3/5f5bc73c6558a21f951ffd267f41c6340d15f5fe0ff4b6bf37694f3558b8/authlib-1.5.2.tar.gz" + sha256 "fe85ec7e50c5f86f1e2603518bb3b4f632985eb4a355e52256530790e326c512" + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/9d/db/3ef5bb276dae18d6ec2124224403d1d67bccdbefc17af4cc8f553e341ab1/filelock-3.16.1.tar.gz" + sha256 "c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435" + 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 "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/30/08/8bd4a0250247861420a040b33ccf42f43c426ac91d99405374ef117e5872/joblib-1.5.0.tar.gz" + sha256 "d8757f955389a3dd7a23152e43bc297c2e0c2d3060056dad0feefc88a06939b5" + 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 "marshmallow" do + url "https://files.pythonhosted.org/packages/1e/ff/26df5a9f5ac57ccf693a5854916ab47243039d2aa9e0fe5f5a0331e7b74b/marshmallow-4.0.0.tar.gz" + sha256 "3b6e80aac299a7935cfb97ed01d1854fb90b5079430969af92118ea1b12a8d55" + 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/3c/87/db8be88ad32c2d042420b6fd9ffd4a149f9a0d7f0e86b3f543be2eeeedd2/nltk-3.9.1.tar.gz" + sha256 "87d127bd3de4bd89a4f81265e5fa59cb1b199b27440175370f7417d2bc7ae868" + 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/1f/5a/07871137bb752428aa4b659f910b399ba6f291156bdea939be3e96cae7cb/psutil-6.1.1.tar.gz" + sha256 "cf8496728c18f2d0b45198f06895be52f36611711746b7f30c464b422b50e2f5" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/a9/b7/d9e3f12af310e1120c21603644a1cd86f59060e040ec5c3a80b8f05fae30/pydantic-2.9.2.tar.gz" + sha256 "d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/e2/aa/6b6a9b9f8537b872f552ddd46dd3da230367754b6f707b8e1e963f515ea3/pydantic_core-2.23.4.tar.gz" + sha256 "2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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 "safety-schemas" do + url "https://files.pythonhosted.org/packages/04/40/e5107b3e456ca4b78d1c0d5bd07be3377e673cc54949b18e5f3aed345067/safety_schemas-0.0.14.tar.gz" + sha256 "49953f7a59e919572be25595a8946f9cbbcd2066fe3e160c9467d9d1d6d7af6a" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/95/32/0cc40fe41fd2adb80a2f388987f4f8db3c866c69e33e0b4c8b093fdf700e/setuptools-80.4.0.tar.gz" + sha256 "5a78f61820bc088c8e4add52932ae6b8cf423da2aff268c23f813cfbb13b4006" + 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/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + 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/98/1a/5f36851f439884bcfe8539f6a20ff7516e7b60f319bbaf69a90dc35cc2eb/typer-0.15.3.tar.gz" + sha256 "818873625d0569653438316567861899f7e9972f2e6e0c16dab608345ced713c" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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..370d9808fbb3f --- /dev/null +++ b/Formula/s/sagittarius-scheme.rb @@ -0,0 +1,42 @@ +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.12.tar.gz" + sha256 "c3a690902effbca3bc7b1bc3a6c4ac2f22d7ae6e0548a87c5d818982c784208d" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e376a30fdc05b7ca8951ab2e40faf83187dd63022ecd6a6530097b3a65e10ae9" + sha256 cellar: :any, arm64_sonoma: "7c07c019c9d52cd1d90fa68930ab2e430dfa58105a44a834b6c3a919cee1436a" + sha256 cellar: :any, arm64_ventura: "397c59a96c5bc10879d42a480c3df89e829d4ff17649edf43e186b1ab10d3e80" + sha256 cellar: :any, arm64_monterey: "3e7bbd920bb306791edfebd38a67635d77e1c7cd28de1b01399b72a8a7edab01" + sha256 cellar: :any, sonoma: "62ba73625484cf31ad62454ec7a22a2cbf54af63f691ba9c189f40946d25f4e1" + sha256 cellar: :any, ventura: "4d4dd3362acca07325ecafd6cca5322df228a1f17d07405552a0406aead1612f" + sha256 cellar: :any, monterey: "fa85cf9521b177a44be8122f0749aa6f00cf1ed73294f7b164a68c95a47d930b" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d6aab93d98662a4d9cfb3b0ef95601821444fa1726902b62cff2a2a4749d236" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0a45f44a21b16794aff703c0dc82af965f70c3009ce3159165cd6f7d04302d40" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "bdw-gc" + depends_on "openssl@3" + depends_on "unixodbc" + + uses_from_macos "libffi", since: :catalina + 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..53a986d94e71e --- /dev/null +++ b/Formula/s/sail.rb @@ -0,0 +1,148 @@ +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" + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sequoia: "64c4f621752f55d5c49fce2d2e7226f2ed76d6a66b7ad2c3b8dbd780a2d0262a" + sha256 cellar: :any, arm64_sonoma: "cd7d6008737eb0e6f98147b14a5bd0cecf5d680af2342bf5b635e0c35ddb8d01" + sha256 cellar: :any, arm64_ventura: "c1bb8bf3cf10182d318d4fc986da4430fef370bee7e857ad1fd4716103f8b2bf" + sha256 cellar: :any, sonoma: "88510b600c23437d54ee747f9a92a1492c7f2372c7e3350f95d488c415e43c98" + sha256 cellar: :any, ventura: "32acc34eb90ddb5277fa4740588825c9ef0d01925a6398556870229494caf7aa" + sha256 cellar: :any_skip_relocation, arm64_linux: "99c9b5dda4a0dd6e921babdb0ddcd35cbb163ee9d2fe9ded023a96bb0c88cc93" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9905f463b19c8c4f7885e8871fbb808785279e0c14e32b881f90723cb09b46f5" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "libsodium" # for pynacl + depends_on "libyaml" + depends_on "python@3.13" + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/e4/7e/d95e7d96d4828e965891af92e43b52a4cd3395dc1c1ef4ee62748d0471d0/bcrypt-4.2.0.tar.gz" + sha256 "cf69eaf5185fd58f268f805b505ce31f9b9fc2d64b376642164e9244540c1221" + 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 "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/92/14/1e41f504a246fc224d2ac264c227975427a85caf37c3979979edb9b1b232/Deprecated-1.2.14.tar.gz" + sha256 "e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3" + 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/9d/db/3ef5bb276dae18d6ec2124224403d1d67bccdbefc17af4cc8f553e341ab1/filelock-3.16.1.tar.gz" + sha256 "c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435" + 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/7b/c3/7b43eb963bfb3fa95385e677bb9d027c56d65d395d9f4bd52833affd1a4f/jsonpickle-3.3.0.tar.gz" + sha256 "ab467e601e5b1a1cd76f1819d014795165da071744ef30bf3786e9bc549de25a" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b4/d2/38ff920762f2247c3af5cbbbbc40756f575d9692d381d7c520f45deb9b8f/markupsafe-3.0.1.tar.gz" + sha256 "3e683ee4f5d0fa2dde4db77ed8dd8a876686e3fc417655c2ece9a90576905344" + 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/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + 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/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-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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/95/4c/063a912e20bcef7124e0df97282a8af3ff3e4b603ce84c481d6d7346be0a/wrapt-1.16.0.tar.gz" + sha256 "5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"sail", shells: [:fish, :zsh], 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..cb32814fd1c34 --- /dev/null +++ b/Formula/s/saldl.rb @@ -0,0 +1,62 @@ +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" + + bottle do + rebuild 1 + 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}" unless build.head? + + 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/salt-lint.rb b/Formula/s/salt-lint.rb new file mode 100644 index 0000000000000..c01731a283ac4 --- /dev/null +++ b/Formula/s/salt-lint.rb @@ -0,0 +1,47 @@ +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 4 + sha256 cellar: :any, arm64_sequoia: "fbb1958185be4aad5fea5c651fd3e8da21fca696c5d213693e4a81936a1feb2b" + sha256 cellar: :any, arm64_sonoma: "96d91986ed175ad3f73c892694470d516dd30faea4e1598cbacef169edb6fbd2" + sha256 cellar: :any, arm64_ventura: "d00a3fb68390018c7e193fdb099fe1f0a72e8648d516fe94b59090a8c5e390ae" + sha256 cellar: :any, sonoma: "a31bcc4981feaa7a540453588c749780977bc6174b7ba19379718f7dc2382300" + sha256 cellar: :any, ventura: "c1e8dada94ff1d4651ca11b4683df66be17bd39e20a92d3b0bc262350202dadb" + sha256 cellar: :any_skip_relocation, arm64_linux: "c03c55be989567573dc4ef049c3b8b97c740979f398c568b8e1ea018d42f42a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0debb92e71999b2e340eff50cf7ccd2712b4bf86289f6af1c77b0f574a84842d" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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..96b323fe75202 --- /dev/null +++ b/Formula/s/samba.rb @@ -0,0 +1,184 @@ +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.22.1.tar.gz" + sha256 "6a1f89f1ab25916e255f1c2c3a4a88235a854af2eca40bb9d9bba7545b684a0a" + 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_sequoia: "6a50855da503fa3c549fcab426036621a05f9466b4c11c5ead379b31e4601cdc" + sha256 arm64_sonoma: "8928a60e525aa1da34b279cba632191096d5f10aad8d100adb2b702283e0d4ea" + sha256 arm64_ventura: "385dfe476b11f57a631bb02276c453a8f6284a918d3105f6ac77e7e957d64196" + sha256 sonoma: "bb808e23b5d932cb9968d13d6597c230d387ceb8cfac61d028ac7c139dfee18e" + sha256 ventura: "4c3248d19b3d4ff0d5372424bceef92ec7045ce64449cfc4921d0322f491c152" + sha256 arm64_linux: "7a33830f7c142f5074fe2169c45c0df9dffd8417f4faaf86daeb70651a932ed9" + sha256 x86_64_linux: "3778f1720cf1ebf04f5373e0c3aab993054c6fd0c4fe7a2e163317220a9c3b29" + 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? + system "./configure", + "--bundled-libraries=NONE", + "--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..399a102187e03 --- /dev/null +++ b/Formula/s/sambamba.rb @@ -0,0 +1,61 @@ +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" + + bottle do + 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 + + 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..e4668b1ee1487 --- /dev/null +++ b/Formula/s/saml2aws.rb @@ -0,0 +1,34 @@ +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_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..5d09c3ab5a8a6 --- /dev/null +++ b/Formula/s/sampler.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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, mojave: "b50240b4f199da6d55d4645dfd3d2b0fc3406d20a504ba9af4d3b545196438b1" + sha256 cellar: :any_skip_relocation, high_sierra: "163b575ff369f264605bdc69c0fc838e44e706f8b6c527bb343cbfb18a9b1fdc" + 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/samtools.rb b/Formula/s/samtools.rb new file mode 100644 index 0000000000000..bca4fb5c848c4 --- /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.21/samtools-1.21.tar.bz2" + sha256 "05724b083a6b6f0305fcae5243a056cc36cf826309c3cb9347a6b89ee3fc5ada" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0fd24379c43d47525d722a4220c1564bb59fe969eb2161e62aba519e73523c30" + sha256 cellar: :any, arm64_sonoma: "c7625984593989f64b6872232c65487466ca5f8f8429d64d858316c93ad50381" + sha256 cellar: :any, arm64_ventura: "b3f4e88d641907504ccb2378c69b6386fd37ae5c82b2344af678e386ca360266" + sha256 cellar: :any, arm64_monterey: "87a313d7110756bd669a18a3090750f9b03269404b9a61a1cf143575defd5dcc" + sha256 cellar: :any, sonoma: "9b9864f309544aa5aee0e8b6ed0eaae5c0e7c2a3920607aad6afdb7bbc2b6da9" + sha256 cellar: :any, ventura: "2dd72265adf5a7e652d0f60f4f07bc041f6bfaad7403abe615330807a7168ed7" + sha256 cellar: :any, monterey: "4c375467980995250fb1a8a9e4b67ac57607a546c478e28363feafe29d009510" + sha256 cellar: :any_skip_relocation, arm64_linux: "a448cbc74643212066c8109db596300d2b7f64e22404b9ed7e3453c3b0b12c7e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b81f8cbedc6b82d62a3fe9ab64e91b5e437e1492927a5ea7172d1f9341ec627" + end + + depends_on "htslib" + + uses_from_macos "ncurses" + + 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..be8bffe18ea11 --- /dev/null +++ b/Formula/s/samurai.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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, mojave: "ef652224d51e64d4e83f921a3870cd9cb4d7dbc315156cb68dd01d30d2d34414" + 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..5b7b906267a84 --- /dev/null +++ b/Formula/s/sane-backends.rb @@ -0,0 +1,75 @@ +class SaneBackends < Formula + desc "Backends for scanner access" + homepage "http://www.sane-project.org/" + url "https://gitlab.com/sane-project/backends/uploads/83bdbb6c9a115184c2d48f1fdc6847db/sane-backends-1.3.1.tar.gz" + sha256 "aa82f76f409b88f8ea9793d4771fce01254d9b6549ec84d6295b8f59a3879a0c" + license "GPL-2.0-or-later" + + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "73d9e6f08781212504191af29da392c4f0896ba8b7f8192276af15b97db1d32d" + sha256 arm64_sonoma: "0719713dac96d44d1f64d0e427c8c210e55796d93819693e796f8712759e1f70" + sha256 arm64_ventura: "2c26a72e1a02d2989c5f961635c40e28da1ca235d9fec0c89f6647e326761d08" + sha256 arm64_monterey: "aac23e69bcfcdcdaf83b2ac5cc0dca17f324621a2a034bdcacffffd4138ec99b" + sha256 sonoma: "43895d634e21a8c8d4cb472cef60d106f72c15507483d055d30fb0a553908fa4" + sha256 ventura: "8379299b3089d0f27f9ae1c419338909509302a08c3108b92d7d25d6b04ad61c" + sha256 monterey: "6ac5e0c8740a6353dd927f01a7324a88f2deacdbebad1a0de9594d40e09eadfe" + sha256 arm64_linux: "5379d8676467d8b52148730986ab9397dcc39cc8b66477e8536181ecfb7cf6c5" + sha256 x86_64_linux: "2ffeeb34668acc8fe57e84f36ffe4c9cae0d00261c7e19558f62e1ec3eb02b11" + 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 + + # Fix compilation failure with clang 16, remove in next version + # https://gitlab.com/sane-project/backends/-/issues/774 + patch do + url "https://gitlab.com/sane-project/backends/-/commit/e45ba84b665e3ac339e27e594d8651ee1577d638.diff" + sha256 "4cdb099c77cf94aad013f8b8c4e064c5d009629a84da5b67947ce2c7b0829c3d" + 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..679788bae12e8 --- /dev/null +++ b/Formula/s/sapling.rb @@ -0,0 +1,132 @@ +class Sapling < Formula + desc "Source control client" + homepage "https://sapling-scm.com/" + url "https://github.com/facebook/sapling/archive/refs/tags/0.2.20241203-120811+a2174689.tar.gz" + version "0.2.20241203-120811-a2174689" + sha256 "f05c5b08b914d2b2ab4788a55d2fd42f395b50d05fb284f4d120042122d77802" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "c85beb75f8c584a907f8564ec4cc651d67e1fe8f859348118e23c6f952cab840" + sha256 cellar: :any, arm64_sonoma: "67074d5d1dbff2de963e0fdd8b02863431558f8aaeba7f0ff7ada0cd2e414560" + sha256 cellar: :any, arm64_ventura: "06c392c74241dc27a9878b42e43604c701a1c18d0573551e68a0f3a493a9ddbd" + sha256 cellar: :any, sonoma: "360d7f1088745bcbe01ae8c5a6b8034eff0bc2c52666b7b522b69573a80591e9" + sha256 cellar: :any, ventura: "10cc240abb0c6873e0e0c82b82d74e810e9fdf1d98d1992f55f0087225b20cfe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5baf29ada18855e2d722435f404f7bfe98b4549cbb492b38867bcfbfd499566" + 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 "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/sassc.rb b/Formula/s/sassc.rb new file mode 100644 index 0000000000000..45690141e0c27 --- /dev/null +++ b/Formula/s/sassc.rb @@ -0,0 +1,50 @@ +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" + + bottle do + 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, mojave: "6aa4de7c6d9b1b64beda27f0c06a6d8c9224616b74ae48ea8e706f166b374ce9" + 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..5880a245a880b --- /dev/null +++ b/Formula/s/savana.rb @@ -0,0 +1,32 @@ +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" + + 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..d5f49a12452a4 --- /dev/null +++ b/Formula/s/saxon.rb @@ -0,0 +1,55 @@ +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-6/SaxonHE12-6J.zip" + version "12.6" + sha256 "cbb6657da061c155476ad9e43a3564a4cc928d4951ebeed2eafe5a0aa74e2aee" + 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 + + bottle do + sha256 cellar: :any_skip_relocation, all: "802be17c233434cf832899449e0d4a6528605c706eafae82b1eca53e176231d6" + 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" + 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 + end +end diff --git a/Formula/s/sbcl.rb b/Formula/s/sbcl.rb new file mode 100644 index 0000000000000..d94dae4f01797 --- /dev/null +++ b/Formula/s/sbcl.rb @@ -0,0 +1,70 @@ +class Sbcl < Formula + desc "Steel Bank Common Lisp system" + homepage "https://www.sbcl.org/" + url "https://downloads.sourceforge.net/project/sbcl/sbcl/2.5.4/sbcl-2.5.4-source.tar.bz2" + sha256 "5f14b4ed92942a9e387594fac000b96db7467e9ce5613067ffc0923df3ec2072" + 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_sequoia: "0ebd2441645846597297eb73683a060b671c8332ac921bda4cda7b1bdb30fab3" + sha256 cellar: :any, arm64_sonoma: "d282c46450690cc09484b421299590c253f39f7cdf9c7363b2cbc7164dc5f5e1" + sha256 cellar: :any, arm64_ventura: "d25bd49c59fd5fbb6353f050da3d20b28fbaf6cd91acc419577788e2b350f833" + sha256 cellar: :any, sonoma: "194e8ad52afaee56eb6d279608b48f2f72a739583b708d4ed06c5c388dc69560" + sha256 cellar: :any, ventura: "ac18fb7ffda092860b7d5462d4afed66a5f6f3c82ba863d8ec6913b1daf9bbf7" + sha256 cellar: :any_skip_relocation, arm64_linux: "78b7be6f50234b6e224b86bb0f1019b2707393e3bb37cbe2e7166764cfc009d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3a895b133040ca1c6ac064bd9a0bf4214fda25414154c80c9fbe7bac4bdb9990" + 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..4f6e1bb19282f --- /dev/null +++ b/Formula/s/sbjson.rb @@ -0,0 +1,56 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "8b145bcfef84733c00d94e57cbe0eac56a7981654cda6068ff219264353b25bd" + sha256 cellar: :any_skip_relocation, high_sierra: "649463e051c03596a72400a04b95f993222f5ba6d42a879241291660fef8605c" + 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..b0e1af8e8b1b5 --- /dev/null +++ b/Formula/s/sblim-sfcc.rb @@ -0,0 +1,71 @@ +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 + + bottle do + rebuild 1 + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..2012d873ea30c --- /dev/null +++ b/Formula/s/sbom-tool.rb @@ -0,0 +1,68 @@ +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.0.2.tar.gz" + sha256 "d43efd0ff2444c98102cde9c584bef96db3e740c31e5c5b2b5af68a65940d6b7" + 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_sequoia: "0b43e167fd92bd6766467dd211e96af259d8c219ed962e6ed456cb8125753d78" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1c4d060153e9ebcad5034a6b6c1bfd4c8451701e4d932751b7106edafd1308b4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a09960d083006bb438f5b273520851574e24220ffd1d40a23389527a7b109d96" + sha256 cellar: :any_skip_relocation, ventura: "9c8584d1da9e547b774c93d3e3bd11bbf910f0a719dc4766d8c35326a90249da" + sha256 cellar: :any_skip_relocation, arm64_linux: "3128fd9edae1d2d05749daa2bbe4ace7b1530adc31f4f80a6bf5b3414d3dff13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ce597bc495dcb19eb349445dd17d584708e7eb198771adc65738972918408de" + 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..c02707e6736dc --- /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.10.11/sbt-1.10.11.tgz" + mirror "https://sbt-downloads.cdnedge.bluemix.net/releases/v1.10.11/sbt-1.10.11.tgz" + sha256 "5034a64841b8a9cfb52a341e45b01df2b8c2ffaa87d8d2b0fe33c4cdcabd8f0c" + 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: "9014d3c3ad008eacd617051f94d174eae5f18a66c8552798e5446bea63990ce3" + 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..f6c866e9145fb --- /dev/null +++ b/Formula/s/sbtenv.rb @@ -0,0 +1,38 @@ +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" + + 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..af90f8a285465 --- /dev/null +++ b/Formula/s/sbuild.rb @@ -0,0 +1,52 @@ +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 + + 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..603de63b9648a --- /dev/null +++ b/Formula/s/sby.rb @@ -0,0 +1,68 @@ +class Sby < Formula + 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.53.tar.gz" + sha256 "b62ad03264a73e02e5ffb3b73bfa3b420f47a00d6f82f203c15e2f19f8a60b13" + license "ISC" + head "https://github.com/YosysHQ/sby.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5d3c4339e64fa6e25c1918d86817ac60e9dc2be7a5e0406b7f08567551672dba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5d3c4339e64fa6e25c1918d86817ac60e9dc2be7a5e0406b7f08567551672dba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5d3c4339e64fa6e25c1918d86817ac60e9dc2be7a5e0406b7f08567551672dba" + sha256 cellar: :any_skip_relocation, sonoma: "5d3c4339e64fa6e25c1918d86817ac60e9dc2be7a5e0406b7f08567551672dba" + sha256 cellar: :any_skip_relocation, ventura: "5d3c4339e64fa6e25c1918d86817ac60e9dc2be7a5e0406b7f08567551672dba" + sha256 cellar: :any_skip_relocation, arm64_linux: "3795e2284954d8980acb800d5ee3831a17fa93893a0ce4ba985fa77323d29f2b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3795e2284954d8980acb800d5ee3831a17fa93893a0ce4ba985fa77323d29f2b" + end + + depends_on "yices2" => :test + depends_on "python@3.13" + depends_on "yosys" + + def install + system "python3.13", "-m", "pip", "install", *std_pip_args(build_isolation: true), "click" + system "make", "install", "PREFIX=#{prefix}" + rewrite_shebang detected_python_shebang, bin/"sby" + 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..ba73b9307cae6 --- /dev/null +++ b/Formula/s/sc-im.rb @@ -0,0 +1,64 @@ +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.4.tar.gz" + sha256 "ebb1f10006fe49f964a356494f96d86a4f06eb018659e3b9bde63b25c03abdf0" + license "BSD-4-Clause" + revision 2 + head "https://github.com/andmarti1424/sc-im.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "585f98cda2324655c14dcd9d64acc8d07e1fd72aaf2680a6f770f59a4246f281" + sha256 arm64_sonoma: "279bd5d4f6667722e3375d8538f84b54a131b2cb477477e95ac6b3d360df7ebb" + sha256 arm64_ventura: "81d1a05ef52307578a974ef1c729b03524b97ae9125d386918c737a48f8bd0a6" + sha256 sonoma: "43dffed01d4f245375aad615bfc05593b62f2f54fe5b32b81e5181f1c9736b80" + sha256 ventura: "5ceaed8adb32424c8484f4b8a24c87e90a269f3f3a3f1177934a88bfe7e4712c" + sha256 arm64_linux: "4457a50b8a4ced2c0a2c66c4806c2f6bba4394ccc180fcab326e5dd8f042cce5" + sha256 x86_64_linux: "c3927fa72b5ba98e83d749bfe3a31fab8bb45ca6c929019249e317638323a6a0" + 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..eeacf050f5918 --- /dev/null +++ b/Formula/s/sc68.rb @@ -0,0 +1,69 @@ +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 + + bottle do + 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 mojave: "45e1df25bd1394d7e1985b5fdd96a1090ff82d245f3b26bdc5055ec6c80807dd" + sha256 high_sierra: "b3e4809754847ca52468463ed60293032efeecf42f24acd3026bb03d369a91d9" + sha256 sierra: "0b5a0931d6f72700ca691436ed69d467cc043aea9b3454d628050886ccd12141" + sha256 el_capitan: "d5ac5c810d4f3505230f2cdb9bc3f9f8c14394e1663f30f8d601fe4a559f99c8" + 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..1a0043b485060 --- /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.0/scala3-3.7.0.tar.gz" + sha256 "4f6cc6aafd974a3740dedd05689be575cb61829811acc4f2891ce796040e9811" + 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: "0dbf4cdbed9be74c8ff5b292d99dbb940017c6a5cdda1f274d18dd647a16cc84" + 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..8c4bed381712d --- /dev/null +++ b/Formula/s/scala@2.13.rb @@ -0,0 +1,60 @@ +class ScalaAT213 < Formula + desc "JVM-based programming language" + homepage "https://www.scala-lang.org/" + url "https://downloads.lightbend.com/scala/2.13.16/scala-2.13.16.tgz" + mirror "https://www.scala-lang.org/files/archive/scala-2.13.16.tgz" + mirror "https://downloads.typesafe.com/scala/2.13.16/scala-2.13.16.tgz" + sha256 "937f743be315302caad15be99ab1ca425ff7e63f15ef5790db6c81bb49543256" + license "Apache-2.0" + + livecheck do + url "https://www.scala-lang.org/files/archive/" + regex(/href=.*?scala[._-]v?(2\.13(?:\.\d+)+)(?:[._-]final)?\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "7095101fa3ff5a8bef712c14a3fde138274e2765afb17b33d447a0e4eb33c966" + end + + keg_only :versioned_formula + + depends_on "openjdk" + + def install + # Replace `/usr/local` references for uniform bottles + inreplace Dir["man/man1/scala{,c}.1"], "/usr/local", HOMEBREW_PREFIX + 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..76dd9a03fc88f --- /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/lampepfl/dotty/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..2c80d9e0f569c --- /dev/null +++ b/Formula/s/scalaenv.rb @@ -0,0 +1,38 @@ +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" + + 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..699a7259671ea --- /dev/null +++ b/Formula/s/scalapack.rb @@ -0,0 +1,48 @@ +class Scalapack < Formula + desc "High-performance linear algebra for distributed memory machines" + homepage "https://netlib.org/scalapack/" + url "https://github.com/Reference-ScaLAPACK/scalapack/archive/refs/tags/v2.2.2.tar.gz" + sha256 "a2f0c9180a210bf7ffe126c9cb81099cf337da1a7120ddb4cbe4894eb7b7d022" + license "BSD-3-Clause" + head "https://github.com/Reference-ScaLAPACK/scalapack.git", branch: "master" + + bottle do + 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..081a5cc9410f7 --- /dev/null +++ b/Formula/s/scalariform.rb @@ -0,0 +1,53 @@ +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 + + 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..8d03c5c8c49e5 --- /dev/null +++ b/Formula/s/scalastyle.rb @@ -0,0 +1,43 @@ +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 + + 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..7868a4bb9a8fc --- /dev/null +++ b/Formula/s/scale2x.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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, mojave: "da91fa8382839f9cf1b9d58b1e38b1d2f6d3cc1fef3cd0dce1481774397ebe35" + sha256 cellar: :any, high_sierra: "2a3519bdbba8ff6caa1ca9b48d461866b8121dfd224a2c25da106087bb3cfd61" + sha256 cellar: :any, sierra: "771e1b1ea660234e8bea89e774d0d802f7f1cb12c08e100cbb5b83d0a02a61ea" + sha256 cellar: :any, el_capitan: "033e1adf0430ced99eef1b746842e9ca876b542f6fbd8f050e8f7c7e1b59f692" + 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..fc5ec8f112d90 --- /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.34.0.tar.gz" + sha256 "76120c14d13065df48ddfb628aab0b59d9f32be43516607c1ecf3d258bc692f9" + license "BSD-4-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1ccfca4d80c75ff9ae1d09c5ccd1282ed7b7d085887bc20fef18534f65c12b84" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1ccfca4d80c75ff9ae1d09c5ccd1282ed7b7d085887bc20fef18534f65c12b84" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1ccfca4d80c75ff9ae1d09c5ccd1282ed7b7d085887bc20fef18534f65c12b84" + sha256 cellar: :any_skip_relocation, sonoma: "512bf0121d3fb2c40ed08117c635a5aa221323bbdb90bdca786e29fc2774ba35" + sha256 cellar: :any_skip_relocation, ventura: "512bf0121d3fb2c40ed08117c635a5aa221323bbdb90bdca786e29fc2774ba35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e3638077a67aaeaa879eca09ed286a8e64ab5cc2f5fdf7b5aa82360d3486834b" + 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..b208ec0968e1f --- /dev/null +++ b/Formula/s/scamper.rb @@ -0,0 +1,43 @@ +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-20250505.tar.gz" + sha256 "f0a8b976dded0cd033e959c3bd2d80635b06248c5a41a15e888fb382748903a9" + 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_sequoia: "0895427b6ba06b5298fc19160c3148d7543eeddc7461a26abd14c82d6652bc4a" + sha256 cellar: :any, arm64_sonoma: "d11fb11be4154ff4f1c33a7d5cc5b89118974f2dc8d49bedca895168ffc0f752" + sha256 cellar: :any, arm64_ventura: "0216748b7a449370af6aee51e7a90c6a3f6edd33c754d3dd9fb33b880d11c166" + sha256 cellar: :any, sonoma: "4111104fde099407576ca3af02a75ec7ed15d25a04b4c8c4a93e0181f7f6e6af" + sha256 cellar: :any, ventura: "0fce24676d40c9efa407be397be9df7b482e3b44a3bd9b150c2694a63a43bbd6" + sha256 cellar: :any_skip_relocation, arm64_linux: "e83e1779f6eb9cfc720f163ce5f2bd6444648dae27257505f63413eaca051915" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4910b3790fd4fca3ec622d3eb9d26c4494c5c7be78ed7886fceaccb8fd758a0c" + 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..e3e240773de7c --- /dev/null +++ b/Formula/s/scarb.rb @@ -0,0 +1,53 @@ +class Scarb < Formula + desc "Cairo package manager" + homepage "https://docs.swmansion.com/scarb/" + url "https://github.com/software-mansion/scarb/archive/refs/tags/v2.11.4.tar.gz" + sha256 "c41fc5dbbd3fcceeecb3db87df061f11a8ba589f13076d6d37c462f8432f79a2" + 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_sequoia: "97786a6c53900d30334538ade0131e6ec85d77a61d08f96699f335abe0d1cd74" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fdb3a105e364d8d1806acd5821df6099b582f56a4eaf1c0dde98cc68c29968cf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "39492a366596b79683d17868b06087e50ee4a11caa426cb66882b7189fc0c005" + sha256 cellar: :any_skip_relocation, sonoma: "98707b1c6ee96d44662ae9fd20aea8fe3f0f47cf8cf3e6e56b562d9bcbcc451c" + sha256 cellar: :any_skip_relocation, ventura: "4cc0c81feecbc49526d66c4aa8f9399164108a01d410c8a2b6fedbb436440fe6" + sha256 cellar: :any_skip_relocation, arm64_linux: "06ce42e23f57989f0c7aa17c7ed632656bf0143a53f899cc83175bd9b6bbe0da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e6db4246706b53f09624c0c3fd25396703454d1c84627180e0bf96cb86c1acd6" + end + + depends_on "rust" => :build + uses_from_macos "zlib" + + def install + %w[ + scarb + extensions/scarb-cairo-language-server + extensions/scarb-cairo-run + 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"] = "cairo-test" + + 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-run --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..a3795edc77b84 --- /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.5.0.tar.gz" + sha256 "161f5d9bb359c6440114b7d2e0f98d588c02aa66fbe474d7660b244687fefb70" + license any_of: ["MIT", "Unlicense"] + + livecheck do + url :homepage + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cc5d63f13bfd23c3d3bf87ca06bc7672b30ef4a7a1bae4de2da433c9237e10ca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cc5d63f13bfd23c3d3bf87ca06bc7672b30ef4a7a1bae4de2da433c9237e10ca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cc5d63f13bfd23c3d3bf87ca06bc7672b30ef4a7a1bae4de2da433c9237e10ca" + sha256 cellar: :any_skip_relocation, sonoma: "2a0cb9eb296f0cfbcf651530d8ab7140e71c75d839c79ce58617a0ca1f19eed3" + sha256 cellar: :any_skip_relocation, ventura: "2a0cb9eb296f0cfbcf651530d8ab7140e71c75d839c79ce58617a0ca1f19eed3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2db851bce3a3f786f412d9cfbc7665d4ab8a80d778f5490700601187a81a0b4c" + 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..af772b0eb3678 --- /dev/null +++ b/Formula/s/sccache.rb @@ -0,0 +1,46 @@ +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.10.0.tar.gz" + sha256 "2c9f82c43ce6a1b1d9b34f029ce6862bedc2f01deff45cde5dffc079deeba801" + 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_sequoia: "76044f2cbf1b86123d1ade30aea038d3d336e6c3163c0e9aa3c3b9dae6f2bf33" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d7899f07009ac8943df04166f75d6f66d7a527ae94dc22d85ed754f293850dbf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1095ee95cd648fe084d020f7924ecff7939aef844fd27386130d6136cef69049" + sha256 cellar: :any_skip_relocation, sonoma: "21582a47c1d845b38d1b86062dde48a1dd422eec2d4021a37e5c943f0ef587e7" + sha256 cellar: :any_skip_relocation, ventura: "859ecb045382d2b2078ad25b63d975bfa949b10bf476cdd81586435a3d3e5d92" + sha256 cellar: :any_skip_relocation, arm64_linux: "43569e48d75f62d92dc6d3500ac738390da87f0e03d9bacd8b2e44a6bc2d373f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b53ed3e9f8745cbfa1e5a6b018225f7e30326af3fecd6701887acc580f1254c6" + 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/scdoc.rb b/Formula/s/scdoc.rb new file mode 100644 index 0000000000000..c3a07c1b5c7d1 --- /dev/null +++ b/Formula/s/scdoc.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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=", "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, shell_output("#{bin}/scdoc :build # for rpds-py + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + conflicts_with "st", because: "both install `st` binaries" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + 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/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 "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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 "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/c4/16/7574029da84834349b60ed71614d66ca3afe46e9bf9c7b9562102acb7d4f/graphql_core-3.2.6.tar.gz" + sha256 "c08eec22f9e40f0bd61d805907e3b3b1b9a320bc606e23dc145eebca07c8fbab" + 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/6d/0f/fc074af5572e3faeadce77c9bc82d7bd3bacd522ffae8f76599ecf1af8e3/harfile-0.3.0.tar.gz" + sha256 "23be8037e1296bb4787a15543a37835ed91f408c8296988f9ba022a44accad9e" + 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/10/ff/217417d065aa8a4e6815ddc39acee1222f1b67bd0e4803b85de86a837873/hypothesis-6.131.9.tar.gz" + sha256 "ee9b0e1403e1121c91921dbdc79d7f509fdb96d457a0389222d2a68d6c8a8f8e" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz" + sha256 "3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7" + 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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + 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 "junit-xml" do + url "https://files.pythonhosted.org/packages/98/af/bc988c914dd1ea2bc7540ecc6a0265c2b6faccc6d9cdb82f20e2094a8229/junit-xml-1.9.tar.gz" + sha256 "de16a051990d4e25a3982b2dd9e89d671067548718866416faec14d9de56db9f" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "multidict" do + url "https://files.pythonhosted.org/packages/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + 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/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + end + + resource "pyrate-limiter" do + url "https://files.pythonhosted.org/packages/3e/b6/a812da6cbcb3861c4389fc42114a77d3628d2a9948fbc5f308c35fecaed0/pyrate_limiter-3.7.0.tar.gz" + sha256 "dc1e6d2c80b559f3333cb44bd822bd558f5a47946dc50cce4263a9c1c5fd8067" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/ae/3c/c9d525a414d506893f0cd8a8d0de7706446213181570cdbd766691164e40/pytest-8.3.5.tar.gz" + sha256 "f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" + end + + resource "pytest-subtests" do + url "https://files.pythonhosted.org/packages/c0/4c/ba9eab21a2250c2d46c06c0e3cd316850fde9a90da0ac8d0202f074c6817/pytest_subtests-0.14.1.tar.gz" + sha256 "350c00adc36c3aff676a66135c81aed9e2182e15f6c3ec8721366918bbbf7580" + 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 "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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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 "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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/ce/20/08dfcd9c983f6a6f4a1000d934b9e6d626cff8d2eeb77a89a68eef20a2b7/starlette-0.46.2.tar.gz" + sha256 "7f7361f34eed179294600af672f565727419830b54b7b084efe44bb82d2fccd5" + 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 "tomli" do + url "https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz" + sha256 "cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff" + 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 "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/a9/60/47d92293d9bc521cd2301e423a358abfac0ad409b3a1606d8fbae1321961/types_python_dateutil-2.9.0.20241206.tar.gz" + sha256 "18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "webcolors" do + url "https://files.pythonhosted.org/packages/7b/29/061ec845fb58521848f3739e466efd8250b4b7b98c1b6c5bf4d40b419b7e/webcolors-24.11.1.tar.gz" + sha256 "ecb3d768f32202af770477b8b65f318fa4f566c22948673a977b00d589dd80f6" + end + + resource "werkzeug" do + url "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz" + sha256 "60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/62/51/c0edba5219027f6eab262e139f73e2417b0f4efffa23bf562f6e18f76ca5/yarl-1.20.0.tar.gz" + sha256 "686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"st", shells: [:fish, :zsh], shell_parameter_format: :click) + end + + test do + (testpath/"example.json").write <<~JSON + { + "openapi": "3.0.3", + "paths": {} + } + JSON + output = shell_output("#{bin}/st run ./example.json --dry-run") + assert_match "Schemathesis test session starts", output + assert_match "Specification version: Open API 3.0.3", output + assert_match "No checks were performed.", output + end +end diff --git a/Formula/s/scheme48.rb b/Formula/s/scheme48.rb new file mode 100644 index 0000000000000..ec162a04b13ff --- /dev/null +++ b/Formula/s/scheme48.rb @@ -0,0 +1,69 @@ +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_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..dbffa7d797525 --- /dev/null +++ b/Formula/s/schroedinger.rb @@ -0,0 +1,58 @@ +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"] + + bottle do + rebuild 1 + 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, mojave: "ab901d9879b3bc110eeb7eadd5ab815af7d7fc446b2f5577795737c410c3bf4e" + sha256 cellar: :any, high_sierra: "1e9953cbef67e87a7ca9ebecfcc4af5f0eb2261d17f3a1195386b7512b9312be" + sha256 cellar: :any, sierra: "7d2d6d343f571e21f27ce5c13645ebe7039e4d45d2b96dba550f6383185c18f6" + sha256 cellar: :any, el_capitan: "1b990c49b7d72f3030bcee52bf70094a6cf16111867565cdb7541f670636cf05" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f2674c5ae2910ea63da7347b73cbb12f45f1531babac60af4ef50d82a1f79cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "32c7db0617f2a2d01b89d446860529fc3520f377e601a460fadc5e3ce2bc0baa" + end + + head do + url "lp:schroedinger", using: :bzr + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + 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 "autoreconf", "--force", "--install", "--verbose" if build.head? + 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..4f5be8ece8914 --- /dev/null +++ b/Formula/s/scikit-image.rb @@ -0,0 +1,77 @@ +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" + head "https://github.com/scikit-image/scikit-image.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7f92c634789c248e5faa16af8c885c76a797561f9caa90ad3ba6771ee8adc65a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dfcc775c8fdda7398e80b2684303c3c68310221e1fb0e83bcd69df31f4d25971" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5aabdc0e3471dda66884980b61a1c2f6f762a26016e724bcbde3f7659c2d1412" + sha256 cellar: :any_skip_relocation, sonoma: "dad009c5f2e033d67da433674f7e4900f84a47ae676050d58adf14808fc2c565" + sha256 cellar: :any_skip_relocation, ventura: "06de5f36d41949dd79b01e05bd6e10f27f8a1d808b7cb096b607484eb6af6632" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3e3dc643fb1f17f0632ee7db9208753ced229c1fb14bf1412508f06813fde4f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0426a7009a7096077fc58841681b3606ce906feb7abb54d15dcea8fa6cdaeb1c" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "numpy" + depends_on "pillow" + depends_on "python@3.13" + depends_on "scipy" + + on_linux do + depends_on "patchelf" => :build + end + + 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/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz" + sha256 "307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "tifffile" do + url "https://files.pythonhosted.org/packages/d5/fc/697d8dac6936a81eda88e7d4653d567fcb0d504efad3fd28f5272f96fcf9/tifffile-2025.1.10.tar.gz" + sha256 "baaf0a3b87bf7ec375fa1537503353f70497eabe1bdde590f2e41cc0346e612f" + 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..2c2faac9cca13 --- /dev/null +++ b/Formula/s/scilla.rb @@ -0,0 +1,34 @@ +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_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, 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..6f212e1b0da62 --- /dev/null +++ b/Formula/s/scip.rb @@ -0,0 +1,53 @@ +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.2.tgz" + sha256 "07c237f2f694c8f24ec9a1b22bcd7cef530b74446f46cfb13905b1a2c3759e5e" + 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_sequoia: "4dde6d4b7e2f2087494f51e6100efb2b8520e62b3eaf53099c3bc9b80fc2caa8" + sha256 cellar: :any, arm64_sonoma: "7d0c7bf8d404aaacc91084650b9ddd668e386ca03ff1336aa151b149499763a6" + sha256 cellar: :any, arm64_ventura: "0fdd982ee31e651a635eeadbb7901d1f199e8b39831f43b523fd8a4dd666eab3" + sha256 cellar: :any, sonoma: "29d1ded0c685a822db19a4330cf90dc7414aa28bca40cdab7301334c58a311e5" + sha256 cellar: :any, ventura: "7446a9c4cf648c4116c12c69f18722fab89508579623abdadc88f0568356be2c" + sha256 cellar: :any_skip_relocation, arm64_linux: "80ec7086e74c4b1c13c7a1e21c283e253579dd51fde2c4821a68d03abaae956c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a4f2f8dda7010132726058e4111dbcf41d4d1d4e8c328abf7b709068716da4a" + 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..d6908f02c57db --- /dev/null +++ b/Formula/s/scipy.rb @@ -0,0 +1,60 @@ +class Scipy < Formula + desc "Software for mathematics, science, and engineering" + homepage "https://www.scipy.org/" + url "https://files.pythonhosted.org/packages/0f/37/6964b830433e654ec7485e45a00fc9a27cf868d622838f6b6d9c5ec0d532/scipy-1.15.3.tar.gz" + sha256 "eae3cf522bc7df64b42cad3925c876e1b0b6c35c1337c93e12c0f366f55b0eaf" + license "BSD-3-Clause" + head "https://github.com/scipy/scipy.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "40cea0dc46f7aa2d88fc5a140f1fe386b55455de1cd09cefca45b8b45776a614" + sha256 cellar: :any, arm64_sonoma: "f7c9fe1a35de9df3a6d1a92511d2d4d8e5f7c1896c1110a7c54c79276bd2c55a" + sha256 cellar: :any, arm64_ventura: "961e2fa1986097233fdc3103e7acd39816be4a22ca5cd4fd326abf47827dd7f5" + sha256 cellar: :any, sonoma: "61704bc83e517fe3032a787f08cab4beb81fe4e48ad5aa9aa774183ba885f519" + sha256 cellar: :any, ventura: "4e20878042bf0982ce80c571507b33c3c654092c5679d24564c954e6cf943741" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff04634fffe1e28ed408efbd1a9902c9eb74d279ce6e1202b87637763d439313" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3897bebc7e283cee35014239d82102cb0ddc96fe987c3ecf98e9ccc08c5c6a9f" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "python@3.12" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + depends_on "gcc" # for gfortran + depends_on "numpy" + depends_on "openblas" + depends_on "xsimd" + + on_linux do + depends_on "patchelf" => :build + end + + cxxstdlib_check :skip + + 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..1f16c3329df4d --- /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.8.0/unix-3.8.0.tar.gz" + sha256 "35b73129262e925d8aef1a1760dbd7194dccc84aebd87e86cece2d6d88d38d78" + 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: "5c5982afe31c0761f8b54317374d0fd6606dc9491933f86733a5c51a45eaac9f" + 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..1fdb22c492364 --- /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.5.0.tar.gz" + sha256 "e07634c7207dc51479d39895e546dd0107a50566faf5c2067f61a3b92c824fbf" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "151580cd03c9b01f87b20dfe4b52cd1fd9a03306463bcca646291418fc37f952" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "228b81ed5e3cb6117d1c3f2d9ece048b52d0b3be7294a50818c78a3e818761c2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b5220f190ab21c65e308ccee28de4ed4811fdacde23a98654cbb39433c8fd34" + sha256 cellar: :any_skip_relocation, arm64_monterey: "37bdb546a920a6c1c1fd70d047a37e872de2058469f4782cda61d349a28e00e7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "33983dedea1c7f4cec6bdc8b3a8814f58ac8da892a7bc415c98b1e441ecbe4f2" + sha256 cellar: :any_skip_relocation, sonoma: "ac5e3c65aa71f008e434f83e8da2721c6c5577bf00fcc2ff7648563375da955e" + sha256 cellar: :any_skip_relocation, ventura: "877e3024dcde145092ea3bd714766c3604fe17778df066af2081e9592da6a984" + sha256 cellar: :any_skip_relocation, monterey: "acd7800600cbf0326f2f792d647a119b7174c508d846ad694f7ea98decf48525" + sha256 cellar: :any_skip_relocation, big_sur: "41d08601121e1ebb24cedcc58596b4a89c5cfd66663848640b83f838eccdab84" + sha256 cellar: :any_skip_relocation, catalina: "fe527b88da1db127392fa45238013ec0b7152848ab17ee082d1e7bf03d2440c5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96edc62c0602395ade99c3772fd371d7eb833c6e467c99236902f45014108dae" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.VERSION=#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + 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..7e4fff78bf776 --- /dev/null +++ b/Formula/s/scnlib.rb @@ -0,0 +1,56 @@ +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_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..ad01f2bb3503d --- /dev/null +++ b/Formula/s/scons.rb @@ -0,0 +1,39 @@ +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/c8/c1/30176c76c1ef723fab62e5cdb15d3c972427a146cb6f868748613d7b25af/scons-4.9.1.tar.gz" + sha256 "bacac880ba2e86d6a156c116e2f8f2bfa82b257046f3ac2666c85c53c615c338" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0a81c5d96f6ac781416672b44e49febc790de4cf60a239485efb95b3d6cadce" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e0a81c5d96f6ac781416672b44e49febc790de4cf60a239485efb95b3d6cadce" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e0a81c5d96f6ac781416672b44e49febc790de4cf60a239485efb95b3d6cadce" + sha256 cellar: :any_skip_relocation, sonoma: "6da09c0f0c4cec9bad1951ce49c3b37c51b3596639fa4c90b60745bcc81b8c55" + sha256 cellar: :any_skip_relocation, ventura: "6da09c0f0c4cec9bad1951ce49c3b37c51b3596639fa4c90b60745bcc81b8c55" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0a81c5d96f6ac781416672b44e49febc790de4cf60a239485efb95b3d6cadce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e0a81c5d96f6ac781416672b44e49febc790de4cf60a239485efb95b3d6cadce" + end + + depends_on "python@3.13" + + 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..23e6bb6a2cc8b --- /dev/null +++ b/Formula/s/scooter.rb @@ -0,0 +1,28 @@ +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.5.0.tar.gz" + sha256 "9f2a6ebfef3339cfb13895e9233c1fef684c7d6c23d8b190b4435d369962283a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a5ba20ec308eef2776b870a67c7b9813873ea42cc32d215baa8b1095f905c415" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6e864afd07c9c80686178d2922b56ef82c1ad95e9c64082a4d2f011f38006e52" + sha256 cellar: :any_skip_relocation, arm64_ventura: "25e8fa0e7e55b2d7217f58e09f7354e411e568b054975f25e60f0699d9b2570b" + sha256 cellar: :any_skip_relocation, sonoma: "c32af36768fb79760b6470c7ace69bc8d70d8b06be0f4b28bd68b91e7d292e36" + sha256 cellar: :any_skip_relocation, ventura: "b8385fbe6278e4a9488a3531cc5ef4866206d057abbd4144227d2627855e2a93" + sha256 cellar: :any_skip_relocation, arm64_linux: "eead88f88ea430110aed85847a748c83e27f4406d62086f1394cccde34339213" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f91050c73e974920a68d7639f7c9aae4aff48c7c8761e03c16559a2bdf92c357" + 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..fa9afc338cab5 --- /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.1.1", + revision: "cd152cb6742c5b8f2f3d2b5193b41d9c50905198" + 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_sequoia: "ce30de52c69e14aebfafa7b3e444f535d23086698c7957bc2d485fe8574af53b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ce30de52c69e14aebfafa7b3e444f535d23086698c7957bc2d485fe8574af53b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ce30de52c69e14aebfafa7b3e444f535d23086698c7957bc2d485fe8574af53b" + sha256 cellar: :any_skip_relocation, sonoma: "01c5ef2f4c26bfa9871482b527bc3b76bbeee8168abf3938065d7a8f1f9d999c" + sha256 cellar: :any_skip_relocation, ventura: "01c5ef2f4c26bfa9871482b527bc3b76bbeee8168abf3938065d7a8f1f9d999c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3bd114bbac21e5885bccbdf061621b332879b1fd478b88c8e04d98c55691cc1d" + 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..3111475f2bd40 --- /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.7/scotch-v7.0.7.tar.bz2" + sha256 "d88a9005dd05a9b3b86e6d1d7925740a789c975e5a92718ca0070e16b6567893" + 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 + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "39084ae881ffe4dccdb9d22b73055f179fc30b7e60ae5428036996c7055bb56c" + sha256 cellar: :any, arm64_sonoma: "c55478e91e7451e694d3ab1c809d4c56718cc95c3c4977704d234e9a7214b637" + sha256 cellar: :any, arm64_ventura: "1d0b2f7d0f7aa088a2f9b197995dcfbcd1d76c6f86e39639a894ac12d076d74f" + sha256 cellar: :any, sonoma: "80a9d176f4bfe11816faa6b4297383557f5a9d8c65ea50e0e2842981c51ef522" + sha256 cellar: :any, ventura: "f3393fa769311f954f65d3453bae2a3853eb3b3eb5ab08437b2d323d457e8c86" + sha256 cellar: :any_skip_relocation, arm64_linux: "82d32fd19a12847c9ae008fc199e30f692068503f6a92e0395ce194e6acf16fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "855bafd1f9712cfe84d3dfb9bc11f17856b95304d65449a450672ef996dae625" + 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 + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_SHARED_LIBS=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DENABLE_TESTS=OFF", + "-DINSTALL_METIS_HEADERS=OFF", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + + pkgshare.install "src/check/test_strat_seq.c" + pkgshare.install "src/check/test_strat_par.c" + + # 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 + system ENV.cc, "test.c", "-L#{lib}", "-lscotch", "-lscotcherr", + "-pthread", "-L#{Formula["zlib"].opt_lib}", "-lz", "-lm" + assert_match version.to_s, shell_output("./a.out") + + system ENV.cc, pkgshare/"test_strat_seq.c", "-o", "test_strat_seq", + "-I#{include}", "-L#{lib}", "-lscotch", "-lscotcherr", "-lm", "-pthread", + "-L#{Formula["zlib"].opt_lib}", "-lz" + assert_match "Sequential mapping strategy, SCOTCH_STRATDEFAULT", shell_output("./test_strat_seq") + + system "mpicc", pkgshare/"test_strat_par.c", "-o", "test_strat_par", + "-I#{include}", "-L#{lib}", "-lptscotch", "-lscotch", "-lptscotcherr", "-lm", "-pthread", + "-L#{Formula["zlib"].opt_lib}", "-lz", "-Wl,-rpath,#{lib}" + 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..947d8c262c2a9 --- /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 6 + sha256 cellar: :any_skip_relocation, all: "4c7cfe80210581f2cfa70a91583596326dfe0cd395679ab589d2af4f5e749f94" + end + + depends_on "python@3.13" + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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..9443e3c365ef6 --- /dev/null +++ b/Formula/s/scoutsuite.rb @@ -0,0 +1,611 @@ +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 1 + head "https://github.com/nccgroup/ScoutSuite.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "03546218dcb8138d7ab4a7558c7044c7ba27b0f0cfdf5137338199e9068ed21a" + sha256 cellar: :any, arm64_sonoma: "86a488ff58318d45988433461b8121726f01f716805a13ff6ae31319ca4161ff" + sha256 cellar: :any, arm64_ventura: "209cd4d19be4b8c0dcbc1c992aa2535e817927a422169b52c0b0e6f3de64760a" + sha256 cellar: :any, sonoma: "f8467d66d4c3797366d0a7e301ad9003e83dbc130096ad07dd4d4381085877d9" + sha256 cellar: :any, ventura: "e5318927183e470cd64c455221aeecbccf8907d3db4651ee63171304c5e61345" + sha256 cellar: :any_skip_relocation, arm64_linux: "32414d9b5e0c7a212afd6f948a7a3e5e252c52563b09175795ca349667b4693c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e27dd6a5f92be0c162aca7b40e5e24103d85ddb17f85f8c30cc348e96e85b46a" + end + + depends_on "rust" => :build # for pydantic-core + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + 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/22/f6/ecc9bbf05a8cb2d763795892184f6578adc6d580461a6859313fc1a6c2ad/aliyun-python-sdk-ecs-4.24.75.tar.gz" + sha256 "0596e4ffdba62b25e6cf67b1052947a3bb9705283d981793a7f75b3412a07a4d" + 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/28/89/382d69161f458879ff6066db61c511de8fa642e1ce1782994a095a51d365/aliyun-python-sdk-ram-3.3.0.tar.gz" + sha256 "0809c078d1af2ee47736d1f2af161e1ba96b998a5d484e7b3ed71addec55cb43" + end + + resource "aliyun-python-sdk-rds" do + url "https://files.pythonhosted.org/packages/b5/f5/e16d80fe1ae7cc3e96a2cc8d5b8560a57febdf1299b46f27a43d3571ffdd/aliyun-python-sdk-rds-2.7.49.tar.gz" + sha256 "13e049e377d2c0ae3b6ce6bdd233b8c41476d5cc4556a8d8571773cb6a01fed5" + end + + resource "aliyun-python-sdk-sts" do + url "https://files.pythonhosted.org/packages/1a/6a/05667dac3aba64cb1807c1c459b77eeae65006c3a9bc5813e8efacdc59a3/aliyun-python-sdk-sts-3.1.2.tar.gz" + sha256 "18bce27805f48ff68429e2a3dfb3ed050272ddcdb35a0cb59e8eff957898494d" + end + + resource "aliyun-python-sdk-vpc" do + url "https://files.pythonhosted.org/packages/6a/7c/a0da9607bc8a230b53db074b58b62b1f2ca441ee2a60aaa00e9ba65c0f8d/aliyun-python-sdk-vpc-3.0.45.tar.gz" + sha256 "e26b9905be31755727e0b61d3f70090a12ecb0f6a0bfeaa7be369a78d04ebeb1" + 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" + + # Fix compatibility issue with setuptools 69 + patch do + url "https://github.com/Lucretiel/autocommand/commit/cf98b8bc024f536565a67369a9f9a506fe67b942.patch?full_index=1" + sha256 "c705aa78d4fcd5fb960243d06332cef6c1a48a2c648c903dc2ac07da77ea83e7" + end + 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/03/7a/f79ad135a276a37e61168495697c14ba1721a52c3eab4dae2941929c79f8/azure_core-1.31.0.tar.gz" + sha256 "656a0dd61e1869b1506b7c6a3b31d62f15984b1a573d6326f6aa2f3e4123284b" + 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/14/95/2b2085e40f4b9de88ad256428a669583066d8ab348fc19110c7d04c3189b/azure-mgmt-core-1.4.0.zip" + sha256 "d195208340094f98e5a6661b781cde6f6a051e79ce317caabd8ff97030a9b3ae" + 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/b8/29/10988ceaa300ddc628cb899875d85d9998e3da4803226398e002d95b2741/boto3-1.35.39.tar.gz" + sha256 "670f811c65e3c5fe4ed8c8d69be0b44b1d649e992c0fc16de43816d1188f88f1" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/f7/28/d83dbd69d7015892b53ada4fded79a5bc1b7d77259361eb8302f88c2da81/botocore-1.35.39.tar.gz" + sha256 "cb7f851933b5ccc2fba4f0a8b846252410aa0efac5bfbe93b82d10801f5f8e90" + end + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/c3/38/a0f315319737ecf45b4319a8cd1f3a908e29d9277b46942263292115eee7/cachetools-5.5.0.tar.gz" + sha256 "2cc24fb4cbe39633fb7badd9db9ca6295d766d9c2995f245725a46715d050f2a" + 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 "cheroot" do + url "https://files.pythonhosted.org/packages/63/e2/f85981a51281bd30525bf664309332faa7c81782bb49e331af603421dbd1/cheroot-10.0.1.tar.gz" + sha256 "e0b82f797658d26b8613ec8eb563c3b08e6bd6a7921e9d5089bd1175ad1b1740" + 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/23/57/3bc8f0885c6914336d0b2fe36bf740476f0c827b3fb991993d67c1a9d3f3/circuitbreaker-2.0.0.tar.gz" + sha256 "28110761ca81a2accbd6b33186bc8c433e69b0933d85e89f280028dbb8c1dd14" + 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 "deprecated" do + url "https://files.pythonhosted.org/packages/92/14/1e41f504a246fc224d2ac264c227975427a85caf37c3979979edb9b1b232/Deprecated-1.2.14.tar.gz" + sha256 "e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3" + end + + resource "durationpy" do + url "https://files.pythonhosted.org/packages/31/e9/f49c4e7fccb77fa5c43c2480e09a857a78b41e7331a75e128ed5df45c56b/durationpy-0.9.tar.gz" + sha256 "fd3feb0a69a0057d582ef643c355c40d2fa1c942191f914d12203b1a01ac722a" + 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/ff/36/a587319840f32c8a28b6700805ad18a70690f985538ea49e87e210118884/google_api_python_client-2.149.0.tar.gz" + sha256 "b9d68c6b14ec72580d66001bd33c5816b78e2134b93ccc5cf8f624516b561750" + 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 "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/c9/e7/8439212aae2af478c40ea535affe5f1a6132e52b49cec0700e35a8b39813/google_cloud_appengine_logging-1.4.5.tar.gz" + sha256 "de7d766e5d67b19fc5833974b505b32d2a5bbdfb283fd941e320e7cfdae4cb83" + end + + resource "google-cloud-audit-log" do + url "https://files.pythonhosted.org/packages/eb/81/c345efe9261a4b0bd0c5957f1685d2b4cc4522ec4fc7b0861f691d4476e7/google_cloud_audit_log-0.3.0.tar.gz" + sha256 "901428b257020d8c1d1133e0fa004164a555e5a395c7ca3cdbb8486513df3a65" + end + + resource "google-cloud-container" do + url "https://files.pythonhosted.org/packages/11/ee/49c8148f9ae8a0b63e394ef76409154dcd848cdec24fb1570dff7b58833e/google_cloud_container-2.52.0.tar.gz" + sha256 "7a2fac7680a6a5bb2776b494a1fd1e2e64e4935643b2a01fb93bb8d1bb73b0ef" + end + + resource "google-cloud-core" do + url "https://files.pythonhosted.org/packages/b8/1f/9d1e0ba6919668608570418a9a51e47070ac15aeff64261fb092d8be94c0/google-cloud-core-2.4.1.tar.gz" + sha256 "9b7749272a812bde58fff28868d0c5e2f585b82f37e09a1f6ed2d4d10f134073" + end + + resource "google-cloud-iam" do + url "https://files.pythonhosted.org/packages/36/3a/312612a3d81080783f374298ee2774fff73e894f248f6822749fd80a71ef/google_cloud_iam-2.15.2.tar.gz" + sha256 "09b135d96ba2cf6f80a7ed8011436e89d2588e8bb23cd6145c476302f4871a82" + 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/de/7c/2f52b84ad069637d8ef21850f0e3081181f91b4c52503fe2569bbc0749fb/google_cloud_logging-3.11.2.tar.gz" + sha256 "4897441c2b74f6eda9181c23a8817223b6145943314a821d64b729d30766cb2b" + 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/62/32/14d345dee1f290a26bd639da8edbca30958865b7cc7207961e10d2f32282/google_cloud_resource_manager-1.12.5.tar.gz" + sha256 "b7af4254401ed4efa3aba3a929cb3ddb803fa6baf91a78485e45583597de5891" + 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/67/72/c3298da1a3773102359c5a78f20dae8925f5ea876e37354415f68594a6fb/google_crc32c-1.6.0.tar.gz" + sha256 "6eceb6ad197656a1ff49ebfbbfa870678c75be4344feb35ac1edf694309413dc" + 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/53/3b/1599ceafa875ffb951480c8c74f4b77646a6b80e80970698f2aa93c216ce/googleapis_common_protos-1.65.0.tar.gz" + sha256 "334a29d07cddc3aa01dee4988f9afd9b2916ee2ff49d6b757155dc0d197852c0" + 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/71/d1/49a96df4eb1d805cf546247df40636515416d2d5c66665e5129c8b4162a8/grpcio-1.66.2.tar.gz" + sha256 "563588c587b75c34b928bc428548e5b00ea38c46972181a4d8b75ba7e3f24231" + end + + resource "grpcio-status" do + url "https://files.pythonhosted.org/packages/22/62/a86443ec8f7bf635fe0b48abe56cd699816bdc0b29d24e0bcb5cada42d4a/grpcio-status-1.48.2.tar.gz" + sha256 "53695f45da07437b7c344ee4ef60d370fd2850179f5a28bb26d8e2aa1102ec11" + 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/3d/ad/2371116b22d616c194aa25ec410c9c6c37f23599dcd590502b74db197584/httplib2-0.22.0.tar.gz" + sha256 "d7a10bc5ef5ab08322488bde8c726eeee5c8618723fdb399597ec58f3d82df81" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/c0/bd/fa8ce65b0a7d4b6d143ec23b0f5fd3f7ab80121078c465bc02baeaab22dc/importlib_metadata-8.4.0.tar.gz" + sha256 "9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5" + 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/8c/ed/3f0ef2bcf765b5a3d58ecad8d825874a3af1e792fa89f89ad79f090a4ccc/jaraco_collections-5.1.0.tar.gz" + sha256 "0e4829409d39ad18a40aa6754fee2767f4d9730c4ba66dc9df89f1d2756994c2" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + 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/7e/bd/ffcd3104155b467347cd9b3a64eb24182e459579845196b3a200569c8912/kubernetes-31.0.0.tar.gz" + sha256 "28945de906c8c259c1ebe62703b56a03b714049372196f854105afe4e6d014c0" + end + + resource "more-itertools" do + url "https://files.pythonhosted.org/packages/51/78/65922308c4248e0eb08ebcbe67c95d48615cc6f27854b6f2e57143e9178f/more-itertools-10.5.0.tar.gz" + sha256 "5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6" + end + + resource "msal" do + url "https://files.pythonhosted.org/packages/59/04/8d7aa5c671a26ca5612257fd419f97380ba89cdd231b2eb67df58483796d/msal-1.31.0.tar.gz" + sha256 "2c4f189cf9cc8f00c80045f66d39b7c0f3ed45873fd3d1f2af9f22db2e12ff4b" + 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/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + end + + resource "oci" do + url "https://files.pythonhosted.org/packages/68/56/b828096e323c140edce4656b2ad073d5b662c9602c89658d4a33a9573d09/oci-2.135.2.tar.gz" + sha256 "520f78983c5246eae80dd5ecfd05e3a565c8b98d02ef0c1b11ba1f61bcccb61d" + end + + resource "opentelemetry-api" do + url "https://files.pythonhosted.org/packages/c9/83/93114b6de85a98963aec218a51509a52ed3f8de918fe91eb0f7299805c3f/opentelemetry_api-1.27.0.tar.gz" + sha256 "ed673583eaa5f81b5ce5e86ef7cdaf622f88ef65f0b9aab40b843dcae5bef342" + end + + resource "oss2" do + url "https://files.pythonhosted.org/packages/e2/ec/31baa9e9fa4a71aab9603e184db495b7cb4d1034af6bec0f11ba7cca034f/oss2-2.19.0.tar.gz" + sha256 "9ca54a7921f32f32651a36f2a527bf45e03bb02f3a744877e30f1e842b0f2a0b" + 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/8f/fc/bcfc768996b438d6e4bde7a6c8cfd62089847b0f5381a0e0ec2d8ee6b202/portend-3.2.0.tar.gz" + sha256 "5250a352c19c959d767cac878b829d93e5dc7625a5143399a2a00dc6628ffb72" + end + + resource "proto-plus" do + url "https://files.pythonhosted.org/packages/3e/fc/e9a65cd52c1330d8d23af6013651a0bc50b6d76bcbdf91fae7cd19c68f29/proto-plus-1.24.0.tar.gz" + sha256 "30b72a5ecafe4406b0d339db35b56c4059064e69227b8c3bda7462397f966445" + 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/1d/67/6afbf0d507f73c32d21084a79946bfcfca5fbc62a72057e9c23797a737c9/pyasn1_modules-0.4.1.tar.gz" + sha256 "c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/13/52/13b9db4a913eee948152a079fe58d035bd3d1a519584155da8e786f767e6/pycryptodome-3.21.0.tar.gz" + sha256 "f7787e0d469bdae763b876174cf2e6c0f7be79808af26b1da96f1a64bcf47297" + end + + resource "pydo" do + url "https://files.pythonhosted.org/packages/f8/8c/1969c3c944ac9a2dbf8cc38430f20e7c09cb91546c1ec531717c54dbe5c8/pydo-0.5.0.tar.gz" + sha256 "81db8c99bfe0a3cad13d2e406bc27d243bbc759a891105821b822318b4617914" + end + + resource "pyjwt" do + url "https://files.pythonhosted.org/packages/fb/68/ce067f09fca4abeca8771fe667d89cc347d1e99da3e093112ac329c6020e/pyjwt-2.9.0.tar.gz" + sha256 "7e1e5b56cc735432a7369cbfa0efe50fa113ebecdc04ae6922deba8b84582d0c" + 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/8c/d5/e5aeee5387091148a19e1145f63606619cb5f20b83fccb63efae6474e7b2/pyparsing-3.2.0.tar.gz" + sha256 "cbf74e27246d595d9a74b186b810f6fbb86726dbf3b9532efb343f6d7294fe9c" + 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/3a/31/3c70bf7603cc2dca0f19bdc53b4537a797747a58875b552c8c413d963a3f/pytz-2024.2.tar.gz" + sha256 "2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a" + 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-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/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 "setuptools" do + url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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/5d/52/b4ff0ca21695a4f8ac0f158d884587b5eba08b0e95356b0ea210e00446ac/tempora-5.7.0.tar.gz" + sha256 "888190a2dbe3255ff26dfa9fcecb25f4d38434c0f1943cd61de98bb41c410c50" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "uritemplate" do + url "https://files.pythonhosted.org/packages/d2/5a/4742fdba39cd02a56226815abfa72fe0aa81c33bed16ed045647d6000eba/uritemplate-4.1.1.tar.gz" + sha256 "4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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 "zc-lockfile" do + url "https://files.pythonhosted.org/packages/5b/83/a5432aa08312fc834ea594473385c005525e6a80d768a2ad246e78877afd/zc.lockfile-3.0.post1.tar.gz" + sha256 "adb2ee6d9e6a2333c91178dcb2c9b96a5744c78edb7712dc784a7d75648e81ec" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/54/bf/5c0000c44ebc80123ecbdddba1f5dcd94a5ada602a9c225d84b5aaa55e86/zipp-3.20.2.tar.gz" + sha256 "bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29" + 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..d1a9942ba8b33 --- /dev/null +++ b/Formula/s/scrapy.rb @@ -0,0 +1,201 @@ +class Scrapy < Formula + include Language::Python::Virtualenv + + desc "Web crawling & scraping framework" + homepage "https://scrapy.org/" + url "https://files.pythonhosted.org/packages/8a/db/6acda5c8c407dbb1a210a7a9732f86ed7eacb22bd500b589a13716e634cb/scrapy-2.13.0.tar.gz" + sha256 "9661629805ff0e43054cc1306d9b13236c6bb9565d8d8e303a332c8da045d90f" + license "BSD-3-Clause" + head "https://github.com/scrapy/scrapy.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "25defebb119a5871425b507cb20c177de0a71a10b5fe71f1aab2586eb926c880" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fb183278491aa21d398ed826047c7e017b114f071aca33b85ac4121cdddd6c56" + sha256 cellar: :any_skip_relocation, arm64_ventura: "132bef755d1cecd7337bdfc08768cb5ef47f0b8d71709a3e1faff98c9b9bcb8a" + sha256 cellar: :any_skip_relocation, sonoma: "526526f3d4432db8f598c0c28d7ef90457d7bf76e60a65742a4d09dd7ba88f3c" + sha256 cellar: :any_skip_relocation, ventura: "71f308ec9fc68eb4edd8f2a5d12a3a9c8865befce7f99ec3ef7f3d0afdfaa359" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb7c6c7f2b42c5007376ee87ee08f6e02c6f8a673d597ee6565b64acf7c38e35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4acb935a8569e94f71e6cc3e6079e45001c4e7154742c7f3b2d27b03b1def370" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + 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 "charset-normalizer" do + url "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + 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/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + 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/3d/4a/3fac3054be284c160b142460d7337c56e89d7be094c7895b113b2b01c256/itemadapter-0.11.0.tar.gz" + sha256 "3b0f27f4c5e2e8ae415d83e3d60d33adb7ba09b98c30638bc606fb1dff2ecdd2" + 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/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + 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/4e/6b/84e878d0567dfc11538bad6ce2595cee7ae0c47cf6bf7293683c9ec78ef8/protego-0.4.0.tar.gz" + sha256 "93a5e662b61399a0e1f208a324f2c6ea95b23ee39e6cbf2c96246da4a656c2f6" + 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/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + 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/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 "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/70/dc/3976b322de9d2e87ed0007cf04cc7553969b6c7b3f48a565d0333748fbcd/setuptools-80.3.1.tar.gz" + sha256 "31e2c58dbb67c99c289f51c16d899afedae292b978f8051efaf6262d8212f927" + 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/77/1c/e07af0df31229250ab58a943077e4adbd5e227d9f2ac826920416b3e5fa2/twisted-24.11.0.tar.gz" + sha256 "695d0556d5ec579dcc464d2856b634880ed1319f45b10d19043f2b57eb0115b5" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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/30/93/9210e7606be57a2dfc6277ac97dcc864fd8d39f142ca194fdc186d596fda/zope.interface-7.2.tar.gz" + sha256 "8b49f1a3d1ee4cdaf5b32d2e738362c7f5e40ac8b46dd7d1a65e82a4872728fe" + 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..c07162face3d2 --- /dev/null +++ b/Formula/s/scrcpy.rb @@ -0,0 +1,102 @@ +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.2.tar.gz" + sha256 "9902a3afd75f9a5da64898ac06ffaf77065dd713a58f47a408630b98f03ba9ce" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "5bc8d3e9b80d38d837b1d910724c96324337401350a499f7bce66599c1774b58" + sha256 arm64_sonoma: "45c991850ec0a38e724ce5f9ec6aeddb33686b76389bf179906ccdfc5329963a" + sha256 arm64_ventura: "dcd0c0336f03804bb4f8c77f99bf1a87b596573bfd71a9e56df4df3e38945cf4" + sha256 sonoma: "92646abdda536014901033936af533f221835b2766f45e4b95dba6d08ac57780" + sha256 ventura: "441f55d3f5deae929fd9834dd6256535a81463170ce2488d8a5d6657ba01615b" + sha256 arm64_linux: "46ce2ef60d17e534c3fdcb5a7021ad2a3908007b664b19f65bd1758c881b3bf2" + sha256 x86_64_linux: "91e75e3978f2630997ea0af0b836f1d8175ddfd5abd9385963e7b1d46622de86" + 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.2/scrcpy-server-v3.2" + sha256 "b920e0ea01936bf2482f4ba2fa985c22c13c621999e3d33b45baa5acfc1ea3d0" + + 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..d33de0c657022 --- /dev/null +++ b/Formula/s/screen.rb @@ -0,0 +1,50 @@ +class Screen < Formula + desc "Terminal multiplexer with VT100/ANSI terminal emulation" + homepage "https://www.gnu.org/software/screen/" + url "https://ftp.gnu.org/gnu/screen/screen-5.0.0.tar.gz" + mirror "https://ftpmirror.gnu.org/screen/screen-5.0.0.tar.gz" + sha256 "f04a39d00a0e5c7c86a55338808903082ad5df4d73df1a2fd3425976aed94971" + license "GPL-3.0-or-later" + head "https://git.savannah.gnu.org/git/screen.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "a3bc5d7cdcceeccd9b72dbe6a91be12d2fa1198afbd8c412c1b64248468924f6" + sha256 arm64_sonoma: "799fb23e0d4fa3080d3c0d1fa7313232e187a08339ebc120dbe774e4d7283fb8" + sha256 arm64_ventura: "ae03adaaab11ea47b40168ca31316b9910027864836d9c11780f910b8d003152" + sha256 arm64_monterey: "bb3591af4348104c63bfb58afab5b22f2b6df98e36963c9c08be6ca1e01b8a27" + sha256 sonoma: "adc56240e8ecaf23de62dfe67017b64eeda8538554c29ba5b4411f5fd8ec0e64" + sha256 ventura: "5caa5be6136e3844d66ac11b609caef27f59553e4f596998bc5bf4817b830337" + sha256 monterey: "8c8d9322b5d5230f3a245668c1ff8117b0128077ae79adfe8a657cd70cc2434d" + sha256 arm64_linux: "2b28261f29fdc1901d612342952719f70ce868a5b77cdcfd3a8eafaab7f37487" + sha256 x86_64_linux: "cf41a2d3353e0653d07a095b56d554a55fc72ac6c74fc4a34bc056f3d95463f5" + 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..271626ec3784a --- /dev/null +++ b/Formula/s/screenfetch.rb @@ -0,0 +1,31 @@ +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_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..881e365914f4f --- /dev/null +++ b/Formula/s/screenpipe.rb @@ -0,0 +1,51 @@ +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" + + 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 + + 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..f72648ae05111 --- /dev/null +++ b/Formula/s/screenresolution.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "15d61e87178dbe8ef88c9cb75251f472efc42830b1a2c5be25e4a5bd074e0c66" + sha256 cellar: :any_skip_relocation, high_sierra: "b2f7b0933c734d5ecd8bfafae8d384f20821c45ca38fc81308035d3ca79f3535" + sha256 cellar: :any_skip_relocation, sierra: "ef630f5af67d6bcdde3fd580917ad05d871274f0d62b2a76705ab2b9683f334f" + sha256 cellar: :any_skip_relocation, el_capitan: "63cfb53fe13d5f5b2c72e8a644b312f8a144b12e2b3f284de5adfc5010e1570d" + 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..1c055ded86302 --- /dev/null +++ b/Formula/s/scriptisto.rb @@ -0,0 +1,45 @@ +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_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..6e47c1bfc584c --- /dev/null +++ b/Formula/s/scrub.rb @@ -0,0 +1,57 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "9343d2cc328739d3315f319eeb6704cbd8e98e8105065ff194fcb51456114c4e" + sha256 cellar: :any_skip_relocation, high_sierra: "c9e96dce0a6f2d7c3b32d481aae3a3aa2c0f42cd3c53b10e2fd60c6479ebf128" + sha256 cellar: :any_skip_relocation, sierra: "703ee9b222437bf008ceaa25ab802ace51f207bcba8503f88037896aee2fde40" + sha256 cellar: :any_skip_relocation, el_capitan: "82343d8c3b64b876f8afb208059c3a916590b45fe7998ee412d91d3df161fc92" + 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..91aa9b19595af --- /dev/null +++ b/Formula/s/scryer-prolog.rb @@ -0,0 +1,38 @@ +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.9.4.tar.gz" + sha256 "ccf533c5c34ee7efbf9c702dbffea21ba1c837144c3592a9e97c515abd4d6904" + license "BSD-3-Clause" + head "https://github.com/mthom/scryer-prolog.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4d9e835b97c19a21a9e951a9cb4f3e63b2df085d146a45e1a83fcd6f7c2e2e03" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6a56ddd4c07ac2d2b7efaa3d425e8372164d177ae2051716004fe690c4581788" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a0384d324b743441527508b58a077149303dd2dd96a5503c369408f9719cc5cd" + sha256 cellar: :any_skip_relocation, sonoma: "d3e024f19ee8e58837198cd389c3b7c480ba7c5e387d0857f4922661a79e7c18" + sha256 cellar: :any_skip_relocation, ventura: "ca1a6421cda477896165eb0565e298dee3d6a8cbda834b96319d8ecfae1d3b93" + sha256 cellar: :any_skip_relocation, arm64_linux: "f3568e4dbd9505bd8bb67952b815e18631d464d1608295e9d699b91669533fd6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "440649067671da13802d98cdcd24d605c6eec246d55b3be4b8cb90c612ee7854" + 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..fda5eeae15fa8 --- /dev/null +++ b/Formula/s/scrypt.rb @@ -0,0 +1,50 @@ +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_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..6517cf08f58e7 --- /dev/null +++ b/Formula/s/scs.rb @@ -0,0 +1,54 @@ +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.7.tar.gz" + sha256 "bc8211cfd213f3117676ceb7842f4ed8a3bc7ed9625c4238cc7d83f666e22cc9" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6c51a4ad4ca92b9a9dc0484ea9c4f9b6322ce88e6ad236881a2b14dbf0423e7b" + sha256 cellar: :any, arm64_sonoma: "01c9ae089993b4415924308e126012b86327100bdaa9146c0aee08a9865a8c42" + sha256 cellar: :any, arm64_ventura: "d598a72de7867bfa376e0ebff3dd2c3bbb0f6e027e1c7cdc7450655e5d0e3fd9" + sha256 cellar: :any, arm64_monterey: "ede06b46c1681c4fd1b78a73609c93b2447d715a9c10a2dad288a13fd251c2b6" + sha256 cellar: :any, sonoma: "61eca2394f08be31933544ad01b9dc62d2ed9f8a7a1eb4aae413b0ecbc1e038d" + sha256 cellar: :any, ventura: "305266e59644b836bfc848d6feafc1b5889d67eb751e662bf1a2be8a2b4e55cb" + sha256 cellar: :any, monterey: "102c6c90dd8a1ef3b66cbcf326e71226f06a2853791448747a636896a9662dd5" + sha256 cellar: :any_skip_relocation, arm64_linux: "b52b621aa59fa13789329aba8c51102188a148e9b15165d2d9698b9d9e3423b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c4351ced8c3f4b299d6e7f91d599f545cffc321f49c306ba45727b61e244ae42" + 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..6c342af35a7d2 --- /dev/null +++ b/Formula/s/scummvm-tools.rb @@ -0,0 +1,62 @@ +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 3 + 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_sequoia: "46759130016955bb830b13ac208690894f44c60bb2785e6565602641eb68002f" + sha256 cellar: :any, arm64_sonoma: "491fb7be5cb1560ccb97582995a9ea1cadeb486c0b4d9696d123ad991cb0f3fe" + sha256 cellar: :any, arm64_ventura: "4bd75f5794891f0583f3f6673adfdd4bdf169448bde8dca3a94afddc11b271bc" + sha256 cellar: :any, sonoma: "c9b8494958a9632d4a672f66ea776eea90bad594b68f4710c9848294b25f2e78" + sha256 cellar: :any, ventura: "9c7148d9c1ce60a3ba44633d758d3c4153bf7660f79f24ebdaeed4ed1a84b902" + sha256 cellar: :any_skip_relocation, arm64_linux: "cecc8be45d810f918b1d299bc729d1c15ec2a35537f215068165e5a846e81671" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2f8366f66c75484d67f6d626d123945f13e89bac0c5e3087c77d89caacbaed6" + 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..af6798813e4fe --- /dev/null +++ b/Formula/s/scummvm.rb @@ -0,0 +1,67 @@ +class Scummvm < Formula + desc "Graphic adventure game interpreter" + homepage "https://www.scummvm.org/" + url "https://downloads.scummvm.org/frs/scummvm/2.9.0/scummvm-2.9.0.tar.xz" + sha256 "d5b33532bd70d247f09127719c670b4b935810f53ebb6b7b6eafacaa5da99452" + license "GPL-3.0-or-later" + revision 2 + 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_sequoia: "54f576a9480d41e61bbd263c37fd85bc17b5f825ae791b348aa56d1bccbf969a" + sha256 arm64_sonoma: "05b1d1b9f7ba3af7b6449d5048087bbf8bc06ef1ffa57c1c04c3bced3470fe2c" + sha256 arm64_ventura: "bf8c4d0ca4e73be6ce65a23c0d7681f4215ad4c4893fd14eb34a36546928cf0f" + sha256 sonoma: "84b4384af63a7d9e3b8cd0e3744d761ddad5b992a5aa47328c9e89474a41f6c6" + sha256 ventura: "3ed0ded5307ab17e2c3c80ba2033212b714dbe90133d8d17d7229d650507841b" + sha256 arm64_linux: "5cdbdf040836910a46c4a4ef8291ac2b7acc32e8c0c9a8c3cc5d57cf40bd0d8a" + sha256 x86_64_linux: "da251351daf387dc719882bd00afe956ebf475590f6cbc198df1a4a03d0c079d" + 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..428129b7b375c --- /dev/null +++ b/Formula/s/scw.rb @@ -0,0 +1,31 @@ +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.39.0.tar.gz" + sha256 "5d17781f701059946f876e87f6e92a53e0315dc8e70ca7462cf08d581a0e8eb8" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c8177c1d7b1642185aa240d58b90a3dc5a01391ce840efbf2b21472e944ff912" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c8177c1d7b1642185aa240d58b90a3dc5a01391ce840efbf2b21472e944ff912" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c8177c1d7b1642185aa240d58b90a3dc5a01391ce840efbf2b21472e944ff912" + sha256 cellar: :any_skip_relocation, sonoma: "aed013b6831b2fb0c9624ad01606151010d90349337079d24fcf7e02e1bb3122" + sha256 cellar: :any_skip_relocation, ventura: "aed013b6831b2fb0c9624ad01606151010d90349337079d24fcf7e02e1bb3122" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6f109b3c2f4e87e934850038e2dc20cdf4533befe75deb96b07ca2e14ee80910" + 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..f9766f1a1ecdf --- /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" + + bottle do + 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, mojave: "feb648d3c6c98b2e693086371dae419f88b56b6d58e5ede76ffa882a6f9be4b6" + sha256 cellar: :any, high_sierra: "94977ce56fa0c3c9d2fb21fe52067b49be65247b41d723893ac8c91f0e2dbbf3" + sha256 cellar: :any, sierra: "81e6665fd65aae5e35c3e0b3f9f80bdaaf8ac787dfe6fe9e8454a8cb5cbcba02" + 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..3f0a46b93cfcc --- /dev/null +++ b/Formula/s/sd.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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..72ce22136fb8e --- /dev/null +++ b/Formula/s/sdb.rb @@ -0,0 +1,37 @@ +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.1.0.tar.gz" + sha256 "877f1540f8890ee32ddfe5a03c3455d7d9bf344bc55a6ac42bdcc7ba241e8ab9" + license "MIT" + head "https://github.com/radareorg/sdb.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fe7fce5a05792a0d970268a111172ff4a92abd948f98499b7b48304e7c17fba0" + sha256 cellar: :any, arm64_sonoma: "460a6293a18f7925c2794221c34781a085e279e7d73b1ed54b531e35771456f4" + sha256 cellar: :any, arm64_ventura: "a32fdde7aebe6d674e9427d2de15766a28f30c741b96e14dd2c3b0cc241ce8cb" + sha256 cellar: :any, sonoma: "6c66504eaf55a72603ed5b724b06927f1aac64a9a5b3bd1e80205c8ae8a20c38" + sha256 cellar: :any, ventura: "85295727af6d4942c6a2c1f9611d5c22437da0d9a72155b4803a68e3d49433ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "733389a09b477680c399818f04dace96ab23fdfeade9296e3f4f8a96eabf4d48" + sha256 cellar: :any_skip_relocation, x86_64_linux: "224892c60361f6e6bfecca83ae56e73648bd7f3a439880e9403e2b3dbbc3750d" + 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..6aab933f8322c --- /dev/null +++ b/Formula/s/sdcc.rb @@ -0,0 +1,57 @@ +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_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..a7e9a4ecf769b --- /dev/null +++ b/Formula/s/sdcv.rb @@ -0,0 +1,54 @@ +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" + + bottle do + 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..529f855b79c3f --- /dev/null +++ b/Formula/s/sdedit.rb @@ -0,0 +1,35 @@ +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 + + 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..8496b1a3d2751 --- /dev/null +++ b/Formula/s/sdl12-compat.rb @@ -0,0 +1,66 @@ +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.68.tar.gz" + sha256 "63c6e4dcc1154299e6f363c872900be7f3dcb3e42b9f8f57e05442ec3d89d02d" + 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_sequoia: "7629feebea88788075d1b222b1096b9f7c1a412fa7dfd5874cfc9ecedeb3cee3" + sha256 cellar: :any, arm64_sonoma: "4948b9d4e38766595d0c173458b97c00121834dd6b4161496a09fec4fc094950" + sha256 cellar: :any, arm64_ventura: "d8d666b4c119e5dadd9d338d12c59723adad83565e18612afaf934fcf58e2872" + sha256 cellar: :any, arm64_monterey: "f5a78c668498f0507ffecfce91a2f690b46fc0adc91ed1c3bf207466c1d08f4d" + sha256 cellar: :any, sonoma: "e5a972e8c3bd9012f6dca3512f1953c4f7f9b1f1580b7066b930fa9fabc54150" + sha256 cellar: :any, ventura: "f355c15e6d99d002a44af8689e835ab14765f0abea078b40c1301283cbd28535" + sha256 cellar: :any, monterey: "30cbfb49ab9560fcce09b372ad986a74caa3007704012454f76cc4416dfa0e93" + sha256 cellar: :any_skip_relocation, arm64_linux: "80c3aba4d8108403066285fc7841895247ae5bfbf9e75c188cb5667cd14cee7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac00966975256217cace0e9acf45e8659d5d668e16972a072eb6c298ff630fa2" + 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..500b26fb8ff4d --- /dev/null +++ b/Formula/s/sdl2.rb @@ -0,0 +1,81 @@ +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.6/SDL2-2.32.6.tar.gz" + sha256 "6a7a40d6c2e00016791815e1a9f4042809210bdf10cc78d2c75b45c4f52f93ad" + license "Zlib" + + livecheck do + url :stable + regex(/^(?:release[._-])?v?(2(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e32ec4c5b136da53cec56da4320c1710fc52b500cc2c27acd721df2286f94a56" + sha256 cellar: :any, arm64_sonoma: "d9542355a7bd42eb3f8da6f83ff8f0336c14b0e0f1509d3c1dc2890bfedf2ba3" + sha256 cellar: :any, arm64_ventura: "65911923d130d508cceebff37ecb9393b6bf801c1985953a35227a3e4d2a73ea" + sha256 cellar: :any, sonoma: "ea5ede3e7d79451dcf2f51a5a07eb9befc588f3b294e16539cb0dc58fc86c24f" + sha256 cellar: :any, ventura: "72d4b22feb2ee57194e5068d9bf4197885046d64fee1513fea3595d578472e3b" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd42e7d40cf6c4a0dcb708dabcf998d109dd9aa6c6223ee3587e5cf3770d6c30" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c28b3ab63f8a98a99c230cc86bdfb8bd79c45e02470f18ea2d1b629dfbbc4796" + 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..b8ce46ab68bd4 --- /dev/null +++ b/Formula/s/sdl2_gfx.rb @@ -0,0 +1,59 @@ +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 + + bottle do + 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, mojave: "0854ac56a8c0e0b3b5f7fe380fb0bde03dfb2da984920bcbc61ba6e4738f9ca6" + sha256 cellar: :any, high_sierra: "6563ae4bda51a996e537cfe88509da94402b52469e11b92211b5bca58800ab24" + sha256 cellar: :any, sierra: "fba875841d99a80ba39af65733a0df33adf220d29fbd5e313dfcc695b61bc8e4" + sha256 cellar: :any, el_capitan: "aaec64e6b0020e3a0b2faf6ca37e5bc4b27d7327125a58831b0cd34803935cc7" + 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..2666f5aeb3c83 --- /dev/null +++ b/Formula/s/sdl2_image.rb @@ -0,0 +1,68 @@ +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_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..670b185404069 --- /dev/null +++ b/Formula/s/sdl2_mixer.rb @@ -0,0 +1,103 @@ +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_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..70007dc451bd4 --- /dev/null +++ b/Formula/s/sdl2_net.rb @@ -0,0 +1,63 @@ +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 + + bottle do + 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..4a071166d4911 --- /dev/null +++ b/Formula/s/sdl2_sound.rb @@ -0,0 +1,169 @@ +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_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..360f4faf945e8 --- /dev/null +++ b/Formula/s/sdl2_ttf.rb @@ -0,0 +1,64 @@ +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_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..3cb8e5d6b0be4 --- /dev/null +++ b/Formula/s/sdl3.rb @@ -0,0 +1,71 @@ +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.14/SDL3-3.2.14.tar.gz" + sha256 "b7e7dc05011b88c69170fe18935487b2559276955e49113f8c1b6b72c9b79c1f" + 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_sequoia: "9fc5ea606986464d0e28043548aa6f28a49f2bebdfb3d8a5dcf51f16d5c8b89a" + sha256 cellar: :any, arm64_sonoma: "7fa6a3be9641557760354c61aab88b57990d6d2425d39522c0cb9514f01d3ba7" + sha256 cellar: :any, arm64_ventura: "f276c456f68b1eb04d4dbfee90bbfcee71097abbdf73fc5dc7505e5a606eceab" + sha256 cellar: :any, sonoma: "218d0ee409437c58d02b2c5c30b04efbaaeddcdd2d10106c7ebd69924deb74e1" + sha256 cellar: :any, ventura: "88746e302f321a9990eb2e6a928857bbed7590d41ab21b2e61ce6d3130650c34" + sha256 cellar: :any_skip_relocation, arm64_linux: "0323ce9d745c83a5e4575063997bf1a1a09b2a8ddd1099675b5f3ac5b3e5766f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48199501eca060fdd07ecaa14aa8036dcdbd0c476a3267426404f14da86e7659" + end + + depends_on "cmake" => :build + + on_linux do + depends_on "pkgconf" => :build + 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..e902d4c4d3479 --- /dev/null +++ b/Formula/s/sdl3_image.rb @@ -0,0 +1,59 @@ +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_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..c3bdf3f0b6aea --- /dev/null +++ b/Formula/s/sdl3_ttf.rb @@ -0,0 +1,51 @@ +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_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..a0cefd9cb5384 --- /dev/null +++ b/Formula/s/sdl_gfx.rb @@ -0,0 +1,37 @@ +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 + + bottle do + 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..b18fca375e1f4 --- /dev/null +++ b/Formula/s/sdlpop.rb @@ -0,0 +1,57 @@ +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_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..68b6a6348420a --- /dev/null +++ b/Formula/s/sdns.rb @@ -0,0 +1,42 @@ +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.4.0.tar.gz" + sha256 "0ab9d6a7ad3ae13688a10bae0b0738ca0089c81c1c7af9febcb3335f9d0aeadc" + license "MIT" + head "https://github.com/semihalev/sdns.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8879f8051f9fcda4339f0858b235382cfb0a65b494da5ce24e12eaa56fa8d6f1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b5a9fa5686de687d6204a8b30f0657a3cb141b5335c4d6c79c2dea41a439aaa3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0e704009281c8d500596e10e6210a3f440ed667315c5e62169bb84aa022a8b87" + sha256 cellar: :any_skip_relocation, sonoma: "838b9c51f9b668d478df8b3361509d5aae4313f5966a571ef35aa40448d5029f" + sha256 cellar: :any_skip_relocation, ventura: "4f679204866d04a4ea2e2ea11b15c36529495b750ac7036ca9bcc23006331508" + sha256 cellar: :any_skip_relocation, arm64_linux: "78f1646258a3c18aa81544897254a79994824fce14fbf8bdcc1061c36ba8278c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8124cce9441d54dc25ef3783f90e047e346e5799e44ff0222acf73061a99df18" + 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 + fork do + exec bin/"sdns", "-config", testpath/"sdns.conf" + end + 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..34f753dc8631f --- /dev/null +++ b/Formula/s/seal.rb @@ -0,0 +1,110 @@ +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_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/intel/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 + ] + 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? && MacOS.version > :mojave) ? "ON" : "OFF"} + -DSEAL_USE_INTEL_HEXL=#{Hardware::CPU.intel? ? "ON" : "OFF"} + -DHEXL_DIR=#{lib}/cmake + -DCMAKE_CXX_FLAGS=-I#{include} + ] + + 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..7744f6414ac4c --- /dev/null +++ b/Formula/s/seam.rb @@ -0,0 +1,30 @@ +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.60.tgz" + sha256 "e25f9c24234222813d3cbaa152180b61949ef0800f617daba469d297fee5eee8" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4cf7355dabc33a7060c8fd32929e6be4067f2925f1808a9affe9d8a59402c56a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4cf7355dabc33a7060c8fd32929e6be4067f2925f1808a9affe9d8a59402c56a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4cf7355dabc33a7060c8fd32929e6be4067f2925f1808a9affe9d8a59402c56a" + sha256 cellar: :any_skip_relocation, sonoma: "e4b91883ce4c7fc181c743f76a719cedb7d2ecaa111007e98b8ea30d0e8ae16f" + sha256 cellar: :any_skip_relocation, ventura: "e4b91883ce4c7fc181c743f76a719cedb7d2ecaa111007e98b8ea30d0e8ae16f" + sha256 cellar: :any_skip_relocation, arm64_linux: "2ae827f3b1c8531b3c84874292e877970ed0111c2ff0b6ca861673180879a32d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4cf7355dabc33a7060c8fd32929e6be4067f2925f1808a9affe9d8a59402c56a" + end + + depends_on "node" + + def install + system "npm", "install", *std_npm_args + bin.install_symlink Dir["#{libexec}/bin/*"] + 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..f6d760295dbb3 --- /dev/null +++ b/Formula/s/search-that-hash.rb @@ -0,0 +1,136 @@ +class SearchThatHash < Formula + include Language::Python::Virtualenv + + desc "Searches Hash APIs to crack your hash quickly" + homepage "https://github.com/HashPals/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 9 + head "https://github.com/HashPals/Search-That-Hash.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5b3e204dce24083c6713bca5a0dde2d0f0e627f787758e6b8e01803891c54b7b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5b3e204dce24083c6713bca5a0dde2d0f0e627f787758e6b8e01803891c54b7b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5b3e204dce24083c6713bca5a0dde2d0f0e627f787758e6b8e01803891c54b7b" + sha256 cellar: :any_skip_relocation, sonoma: "c9af91650d9b60953e3f937017b8ed2384827bee26fe9800c13bca2bc6ea4124" + sha256 cellar: :any_skip_relocation, ventura: "c9af91650d9b60953e3f937017b8ed2384827bee26fe9800c13bca2bc6ea4124" + sha256 cellar: :any_skip_relocation, arm64_linux: "573f281f23fe17f75d9a6411b8f66dd64491a598ff1060a7b1f71dc1f461f64b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b3e204dce24083c6713bca5a0dde2d0f0e627f787758e6b8e01803891c54b7b" + end + + depends_on "certifi" + depends_on "python@3.13" + + 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/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + 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/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/8c/d5/e5aeee5387091148a19e1145f63606619cb5f20b83fccb63efae6474e7b2/pyparsing-3.2.0.tar.gz" + sha256 "cbf74e27246d595d9a74b186b810f6fbb86726dbf3b9532efb343f6d7294fe9c" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + # Switch build-system to poetry-core to avoid rust dependency on Linux. + # Remove when merged/released: https://github.com/HashPals/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..d3f9c3b635881 --- /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: "3.87", + revision: "e4e85052082e31c94cd133270afc9e8365641c8c" + 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_sequoia: "6a625ca1ba63fbe03c7ef49a55b25247c7cc6c68aed68e00e579a0995ce06e69" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c0771c73268e21108a17d87321c95f9507c8fc0d23026e788d266d270034cb1f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "46d492c11b85255145656e7dbbb566bdaa941750e79bfdec3f481657ff5e1eee" + sha256 cellar: :any_skip_relocation, sonoma: "1ef2670f09ed733f3aca7af05fc928d09ae520febda7aa7cb69e0f4566f57c4c" + sha256 cellar: :any_skip_relocation, ventura: "585625f581b7c7e478b28f76156f36d446677264d18cf6070e284b325b965015" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6720978820100991f4b2e630287a2014dffe462c737120f5df4305086c6b389a" + 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..72617463873db --- /dev/null +++ b/Formula/s/sec.rb @@ -0,0 +1,26 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9ec44819d99d5718791528a93a25d3f834f13a47782840eaa2ea33d1e4355fc2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9ec44819d99d5718791528a93a25d3f834f13a47782840eaa2ea33d1e4355fc2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9ec44819d99d5718791528a93a25d3f834f13a47782840eaa2ea33d1e4355fc2" + sha256 cellar: :any_skip_relocation, sonoma: "7b4de41cdc038ec4c8740b1193440763a29956ab84d698f1710a1d20c6f10d06" + sha256 cellar: :any_skip_relocation, ventura: "7b4de41cdc038ec4c8740b1193440763a29956ab84d698f1710a1d20c6f10d06" + sha256 cellar: :any_skip_relocation, arm64_linux: "8a177a1143fb753c0e6657473880f30f8d31cccff86b15ac6fac8274375f9d6c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ec44819d99d5718791528a93a25d3f834f13a47782840eaa2ea33d1e4355fc2" + 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..80f73749cbf2d --- /dev/null +++ b/Formula/s/secp256k1.rb @@ -0,0 +1,50 @@ +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.6.0.tar.gz" + sha256 "785bb98e7d6705c51c8dfa8ac3af6aa2ccfa3774714d51c0b9e28fac1146e9f1" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "df425b521f46c58e13a1bb877d7a59fdeaf405ec020c530c6052bcab8108b007" + sha256 cellar: :any, arm64_sonoma: "f1e59f7f9158c265009d9e68474320514d4275e3fc4ddd9c90b97e690fbb51c1" + sha256 cellar: :any, arm64_ventura: "7d62c4478e434647dd715759c7c1e5d6d891823b835e102c01458ae41cf278c6" + sha256 cellar: :any, sonoma: "11d1cfee8f09a6a398cb05161e3b132634385f9ea17f3f1be9816777fa5fc693" + sha256 cellar: :any, ventura: "29a61d5ddeb1e6b5a9d6ced52e059530e8cc1cd0d734a8258d6b48847506dcc6" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e524ded9708762e9b13a77b719d2ef7dbf44e4192444c113e7e8dd75b544122" + sha256 cellar: :any_skip_relocation, x86_64_linux: "021cdad1de96cc81c67a779074717150bd1aa5eff164ecc10d91226871a805dd" + 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/securefs.rb b/Formula/s/securefs.rb new file mode 100644 index 0000000000000..ae36e8e6a720e --- /dev/null +++ b/Formula/s/securefs.rb @@ -0,0 +1,48 @@ +class Securefs < Formula + desc "Filesystem with transparent authenticated encryption" + homepage "https://github.com/netheril96/securefs" + url "https://github.com/netheril96/securefs/archive/refs/tags/v1.1.0.tar.gz" + sha256 "3b1d75c8716abafebd45466ddde33dba0ba93371d75ff2b8594e7822d29bd1f9" + license "MIT" + head "https://github.com/netheril96/securefs.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "3b879094da4e2b3d921914a75da6bae7658b043368aad430da4124a335f036d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f099926ebca39fe7b996b3ebcfb7a7b075e969a6ca579c8b5de87318331bc812" + 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..3667fe508fb1e --- /dev/null +++ b/Formula/s/seexpr.rb @@ -0,0 +1,92 @@ +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 + + bottle do + rebuild 2 + 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..1662685b2ccd6 --- /dev/null +++ b/Formula/s/selecta.rb @@ -0,0 +1,22 @@ +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" + + 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..291656662ff8f --- /dev/null +++ b/Formula/s/selene.rb @@ -0,0 +1,36 @@ +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.28.0.tar.gz" + sha256 "c51acf52e7c3136cd0b67b9a39a4a447c8f0257371b2b2acc7e77587260a377b" + license "MPL-2.0" + head "https://github.com/Kampfkarren/selene.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e8160e3e3b1589956eb8c952c94dbdb6e9417972007bd3740026dc5caf0eb195" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0e2f4d3b17a7b036592845a4586d4d82e491574c374cb1c4f23fed3ff78589a3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6c76305c6d5730c2e20096085a8af6d6b436415600c2d12e4b25363ee0b6474" + sha256 cellar: :any_skip_relocation, sonoma: "512897fa1880a3afab978ee53662c2bc06f1118e9fa8c684d28db5bfbd6e9162" + sha256 cellar: :any_skip_relocation, ventura: "98d5b6b93545d9d50608f6cc832ad8af6a9a35dfca94804b8c15b67fc6ce87c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "95bd12bda47d2fcb53978952250d17e8413fee634ed0142bf51a27833ee03ba4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bc9d1abd031c82dcc47fdd530daaf4ca6555da8b7faf4e8bedfe3f45473ec05c" + end + + depends_on "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + end + + 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..3798435a40a58 --- /dev/null +++ b/Formula/s/selenium-server.rb @@ -0,0 +1,57 @@ +class SeleniumServer < Formula + desc "Browser automation for testing purposes" + homepage "https://www.selenium.dev/" + url "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.29.0/selenium-server-4.29.0.jar" + sha256 "a20dd194f6d153b323e45f90275714de495b5d22f1587e1970d8e0a611c190c5" + 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: "8a2eb77534e0d560659f5a97fa2ff8382b1a0e0f116d8c86f5a009a556dd2be0" + end + + depends_on "openjdk" + + 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..893e5229c49d7 --- /dev/null +++ b/Formula/s/semgrep.rb @@ -0,0 +1,368 @@ +class Semgrep < Formula + include Language::Python::Virtualenv + + desc "Easily detect and prevent bugs and anti-patterns in your codebase" + homepage "https://semgrep.dev/" + url "https://github.com/semgrep/semgrep.git", + tag: "v1.119.0", + revision: "8c27ef4fb5fdd1c08c238e9d834e3e95201b76a2" + 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 + sha256 cellar: :any, arm64_sequoia: "0f4791d9a079aaf46a42f2744c8ba8538418445a23c2037d991d3b4705e0df6a" + sha256 cellar: :any, arm64_sonoma: "2c0008ffc89d56b5b2e9e968980520f1f3ca2012fb07ad2af3b7e21b86992e97" + sha256 cellar: :any, arm64_ventura: "b37921dd53af30a3118b218ef2205a1a89a8bac0b92f37b04c5b4a80ffe315d6" + sha256 cellar: :any, sonoma: "215351554349c74e7c5996dec6badd7ee9409ed73990be5979c6bd69613eb8f5" + sha256 cellar: :any, ventura: "8f08ece336852b066d4845983a782fe58af13e08c397182afb0afe8e1e5ee542" + sha256 cellar: :any_skip_relocation, arm64_linux: "1376e4b35acd83275e28cd01be00adabfc2ac42af4058994d7e4d648ccb26341" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6234c9437a2c0e1a6102f32e7eb9b8e79224311c1ae066f40c85aee60615db5" + 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 "rust" => :build + depends_on "certifi" + depends_on "gmp" + depends_on "libev" + depends_on "pcre" + depends_on "pcre2" + depends_on "python@3.13" + depends_on "sqlite" + depends_on "tree-sitter" + depends_on "zstd" + + uses_from_macos "rsync" => :build + uses_from_macos "curl" + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + 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/d6/6c/57418c4404cd22fe6275b8301ca2b46a8cdaa8157938017a9ae0b3edf363/bracex-2.5.post1.tar.gz" + sha256 "12c50952415bfa773d2d9ccb8e79651b8cdb1f31a42f6091b804f6ba2b4a66b6" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/b9/9f/1f917934da4e07ae7715a982347e3c2179556d8a58d1108c5da3e8f09c76/click_option_group-0.5.7.tar.gz" + sha256 "8dc780be038712fc12c9fecb3db4fe49e0d0723f9c171d7cda85c20369be693c" + end + + resource "colorama" do + url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" + sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + end + + resource "defusedxml" do + url "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" + sha256 "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + 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/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/39/24/33db22342cf4a2ea27c9955e6713140fedd51e8b141b5ce5260897020f1a/googleapis_common_protos-1.70.0.tar.gz" + sha256 "0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257" + 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/a0/fc/c4e6078d21fc4fa56300a241b87eae76766aa380a23fc450fc85bb7bf547/importlib_metadata-7.1.0.tar.gz" + sha256 "b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2" + 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/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + 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 "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/df/0d/10357006dc10fc65f7c7b46c18232e466e355f9e606ac461cfc7193b4cbe/opentelemetry_api-1.25.0.tar.gz" + sha256 "77c4985f62f2614e42ce77ee4c9da5fa5f0bc1e1821085e9a47533a9323ae869" + end + + resource "opentelemetry-exporter-otlp-proto-common" do + url "https://files.pythonhosted.org/packages/37/a7/85ffaaacd712e4634fa1c56cbf79a02cf90b8a178fe1eee2cabfb0b7f44d/opentelemetry_exporter_otlp_proto_common-1.25.0.tar.gz" + sha256 "c93f4e30da4eee02bacd1e004eb82ce4da143a2f8e15b987a9f603e0a85407d3" + end + + resource "opentelemetry-exporter-otlp-proto-http" do + url "https://files.pythonhosted.org/packages/72/d9/1c3c518853c27d323a46813d3e99d601959ca2c6963d5217fe2110f0d579/opentelemetry_exporter_otlp_proto_http-1.25.0.tar.gz" + sha256 "9f8723859e37c75183ea7afa73a3542f01d0fd274a5b97487ea24cb683d7d684" + end + + resource "opentelemetry-instrumentation" do + url "https://files.pythonhosted.org/packages/0f/20/0a5d980843e048e9516443a91c63a559b40e5d50a730e73e72a5bde727fd/opentelemetry_instrumentation-0.46b0.tar.gz" + sha256 "974e0888fb2a1e01c38fbacc9483d024bb1132aad92d6d24e2e5543887a7adda" + end + + resource "opentelemetry-instrumentation-requests" do + url "https://files.pythonhosted.org/packages/f6/28/5b5e9fb74639e47f026a3fd6550bba965ca18b316a8178907540e711855c/opentelemetry_instrumentation_requests-0.46b0.tar.gz" + sha256 "ef0ad63bfd0d52631daaf7d687e763dbd89b465f5cb052f12a4e67e5e3d181e4" + end + + resource "opentelemetry-proto" do + url "https://files.pythonhosted.org/packages/c9/3c/28c9ce40eb8ab287471af81659089ca98ef4f7ce289669e23b19c29f24a8/opentelemetry_proto-1.25.0.tar.gz" + sha256 "35b6ef9dc4a9f7853ecc5006738ad40443701e52c26099e197895cbda8b815a3" + end + + resource "opentelemetry-sdk" do + url "https://files.pythonhosted.org/packages/05/3c/77076b77f1d73141adc119f62370ec9456ef314ba0b4e7072e3775c36ef7/opentelemetry_sdk-1.25.0.tar.gz" + sha256 "ce7fc319c57707ef5bf8b74fb9f8ebdb8bfafbe11898410e0d2a761d08a98ec7" + end + + resource "opentelemetry-semantic-conventions" do + url "https://files.pythonhosted.org/packages/4e/ea/a4a5277247b3d2ed2e23a58b0d509c2eafa4ebb56038ba5b23c0f9ea6242/opentelemetry_semantic_conventions-0.46b0.tar.gz" + sha256 "fbc982ecbb6a6e90869b15c1673be90bd18c8a56ff1cffc0864e38e2edffaefa" + end + + resource "opentelemetry-util-http" do + url "https://files.pythonhosted.org/packages/f0/91/45bf243850463b2c83000ca129442255eaef7c446bd0f59a2ab54b15abff/opentelemetry_util_http-0.46b0.tar.gz" + sha256 "03b6e222642f9c7eae58d9132343e045b50aca9761fcb53709bd2b663571fdf6" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "peewee" do + url "https://files.pythonhosted.org/packages/57/09/4393bd378e70b7fc3163ee83353cc27bb520010a5c2b3c924121e7e7e068/peewee-3.17.9.tar.gz" + sha256 "fe15cd001758e324c8e3ca8c8ed900e7397c2907291789e1efc383e66b9bc7a8" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/48/d5/cccc7e82bbda9909ced3e7a441a24205ea07fea4ce23a772743c0c7611fa/protobuf-4.25.6.tar.gz" + sha256 "f8cfbae7c5afd0d0eaccbe73267339bff605a2315860bb1ba08eb66670a9a91f" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/1d/d6/9773d48804d085962c4f522db96f6a9ea9bd2e0480b3959a929176d92f01/rich-13.5.3.tar.gz" + sha256 "87b43e0543149efa1253f485cd845bb7ee54df16c9617b8a893650ab84b4acb6" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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 "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + end + + resource "tomli" do + url "https://files.pythonhosted.org/packages/35/b9/de2a5c0144d7d75a57ff355c0c24054f965b2dc3036456ae03a51ea6264b/tomli-2.0.2.tar.gz" + sha256 "d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + 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"), + ) + 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.13") + 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", + shells: [:fish, :zsh], + 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..a943b4bc9ca8a --- /dev/null +++ b/Formula/s/semtag.rb @@ -0,0 +1,26 @@ +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.1.1.tar.gz" + sha256 "c7becf71c7c14cdef26d3980c3116cce8dad6cd9eb61abcc4d2ff04e2c0f8645" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "933179267efd127dbeca0f0b337bdb6eb1150ef3c8706759195b00a0a30bb16b" + end + + 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..d6f9821b13bc9 --- /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.2.tar.gz" + sha256 "2af254b6b168e7ae77e2cef8d278ca7c0e613c78e8808a4465387ce0cd7a48a2" + license "ISC" + + bottle do + sha256 cellar: :any_skip_relocation, all: "f31f20e5ff4a1429f55c12c0faa8b1a3fb0b9f9ad9d7d6d73f023d8bd8868af3" + 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..e54f9f4b0faa9 --- /dev/null +++ b/Formula/s/sendemail.rb @@ -0,0 +1,36 @@ +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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "113001c5e97ed667b4f8401c335b3a337a7354b1562ca8b40b6499e6cdb68278" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "113001c5e97ed667b4f8401c335b3a337a7354b1562ca8b40b6499e6cdb68278" + sha256 cellar: :any_skip_relocation, arm64_ventura: "113001c5e97ed667b4f8401c335b3a337a7354b1562ca8b40b6499e6cdb68278" + sha256 cellar: :any_skip_relocation, sonoma: "73385dfdd56d55f9236a3f3b438ca09ad283ef1f1e81b24e191b12bba3840ceb" + sha256 cellar: :any_skip_relocation, ventura: "73385dfdd56d55f9236a3f3b438ca09ad283ef1f1e81b24e191b12bba3840ceb" + sha256 cellar: :any_skip_relocation, arm64_linux: "113001c5e97ed667b4f8401c335b3a337a7354b1562ca8b40b6499e6cdb68278" + sha256 cellar: :any_skip_relocation, x86_64_linux: "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..25d9b3ade5501 --- /dev/null +++ b/Formula/s/sendme.rb @@ -0,0 +1,39 @@ +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.26.0.tar.gz" + sha256 "d41bd166e08b611d993e4bdf01c66610406fe93338783fe9a310eaf726fc337f" + license "MIT" + head "https://github.com/n0-computer/sendme.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b8e9e14ec2f39f461b899a8d6c0dedfaee493b49674c40ef11d3a1f5f42f58de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9670e36e17de672428e0894f4545f1974db38c17615e533c3e508d56f6f4d43c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "70fbf950de08c9d17d5499da8fafb68208523331bc988b84112f2fa3ce8309ac" + sha256 cellar: :any_skip_relocation, sonoma: "b7bd3d3efda5aae5d52b9985325dd8892611349f9258a773e058bd661b75e58f" + sha256 cellar: :any_skip_relocation, ventura: "036983cc3a388d0aed8096a078b42f39f98e3199309fac245057e554dfbc1405" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb83096740b4615fb2a41d62536a6625d342db45bf85e1df35a3ae7a8de320ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c26cea22df1f133fda1526b2807ba8c08df227f85de2f5597d237977b176fc7b" + 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 2 + 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..1dc3cd9ae5594 --- /dev/null +++ b/Formula/s/senpai.rb @@ -0,0 +1,33 @@ +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_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..dda2df3aa758a --- /dev/null +++ b/Formula/s/sentencepiece.rb @@ -0,0 +1,40 @@ +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.0.tar.gz" + sha256 "9970f0a0afee1648890293321665e5b2efa04eaec9f1671fcf8048f456f5bb86" + license "Apache-2.0" + head "https://github.com/google/sentencepiece.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "5865d6a86cf12fb46ad1c78801df76607ff5f06e85688f5a2f50eb62ab229065" + sha256 cellar: :any, arm64_sonoma: "be81111eedcf3e3052c9a5732545334e05e639266e65da1de411b4f9ae2ec087" + sha256 cellar: :any, arm64_ventura: "c01378960b8a4033dd3d46e91cd4d539efc0338a13e275c4c1e0e2a93cc5259d" + sha256 cellar: :any, arm64_monterey: "05052dcf7866538c81635dc87207357c0e76a01da049495877c876b6daa21851" + sha256 cellar: :any, sonoma: "5d089f589a58149a63856bda2f1f02374126c5790b07bc7af3eaa90ab70010f1" + sha256 cellar: :any, ventura: "79142fc5301e99ad6b9d21fc58a7a16b2b7761a97671e702695a2d284b65d6d9" + sha256 cellar: :any, monterey: "d1a724c96a74d152a278293a5d3b1d16c0b0f509fa439911c6388400897fb89d" + sha256 cellar: :any_skip_relocation, arm64_linux: "45545363eedf59b691c49c49aa92c425ba726908a9e6739c4a852d750f589868" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b4a0c0c1c6be1bdc0df16dc56facca66fe989d5ede7a5728ea05577387beb368" + 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..cdfa6599b2dce --- /dev/null +++ b/Formula/s/sentry-cli.rb @@ -0,0 +1,42 @@ +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.45.0.tar.gz" + sha256 "c83b42079e38d1a1fc9696adac278d36bc604c41d5fd5c2c1f7692729022ca51" + license "BSD-3-Clause" + head "https://github.com/getsentry/sentry-cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d0531da10742174f8fe4f361683388014af1cb3f385143cccceffed404c0624e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "386f184952454934a6632022dc2be024b3421a6574ed8d1243441e2d5de884df" + sha256 cellar: :any_skip_relocation, arm64_ventura: "03192423b4aaf5243a965a85be32ddb7620bd94a04d4495296a10742a2aa6c77" + sha256 cellar: :any_skip_relocation, sonoma: "6e64b1cb0e39a166935fb012a15837a509894a3b493b518a84c320faab982437" + sha256 cellar: :any_skip_relocation, ventura: "def424a22fb4be0212fab93ae3f5e326b3277b4c1c6a51a5603bfcce7c083f0d" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce2ab090c71ad89c209e98e5b997e1e43080219dec97aaa98322f445bc411813" + sha256 cellar: :any_skip_relocation, x86_64_linux: "16fe9a34b877aed1d123e4f750711312314019b61520da134ec4ef0e32a4efe8" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + uses_from_macos "bzip2" + uses_from_macos "zlib" + + on_linux do + depends_on "openssl@3" + end + + def install + 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..834df2c8f5ddd --- /dev/null +++ b/Formula/s/sentry-native.rb @@ -0,0 +1,68 @@ +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.8.5.tar.gz" + sha256 "3fb8f15ae1e8e6dbe831711dbdbb4245a7936f25be1b416acfb6d0581875461e" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c3efa2cd40cef7ba25c2f1b24e24986d17725442f16b596cc901913279133f44" + sha256 cellar: :any, arm64_sonoma: "3a3ae596edf78d565a9a12f0cf90fc6b1d11ce9e68f515e9b61e2873b818c0c4" + sha256 cellar: :any, arm64_ventura: "390cb9399ab622c44c735996fca5f1b053a4b562691916e0c56079037901b785" + sha256 cellar: :any, sonoma: "28c7116f6c096c15321e0143f4e4cf26b6c361572ae028feab1071aa29b32db1" + sha256 cellar: :any, ventura: "16ca56b23013df1a8b93eca50d4590ab080b8f15b490ddadd1b79c7504122376" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab1ea85123a656a304851e797ad6e2f3737ee2e67549c5989cd2b016ee580fe9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73a1db60efd90fb8457414f61ad8ce67a9aadcbd44190778ad191478291b4d4d" + 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: "ecff426597666af4231da8505a85a61169c5ab04" + end + + # No recent tagged releases, use the latest commit + resource "crashpad" do + url "https://github.com/getsentry/crashpad.git", + revision: "a17b30d42ec667c92a99285429e4edf2f7196698" + 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/seqkit.rb b/Formula/s/seqkit.rb new file mode 100644 index 0000000000000..c95b7f369239f --- /dev/null +++ b/Formula/s/seqkit.rb @@ -0,0 +1,47 @@ +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.0.tar.gz" + sha256 "5ebb8bd72b52a0b17064c7afda54a784bd71940fa28ca03114334af550734437" + license "MIT" + head "https://github.com/shenwei356/seqkit.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "918a0fa59ec75b0f5f76918d70fa147f929ca8959573b83ec116a3123184a406" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "918a0fa59ec75b0f5f76918d70fa147f929ca8959573b83ec116a3123184a406" + sha256 cellar: :any_skip_relocation, arm64_ventura: "918a0fa59ec75b0f5f76918d70fa147f929ca8959573b83ec116a3123184a406" + sha256 cellar: :any_skip_relocation, sonoma: "22f30917da5615b3f64ac7c0d29874c9b8006f208d3b63b91b4ea749449243a6" + sha256 cellar: :any_skip_relocation, ventura: "22f30917da5615b3f64ac7c0d29874c9b8006f208d3b63b91b4ea749449243a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e293d78a5891feca493016befebfe691d91b142bc96af153cccceb13b246bc6e" + 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..33d4991a36903 --- /dev/null +++ b/Formula/s/seqtk.rb @@ -0,0 +1,37 @@ +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.4.tar.gz" + sha256 "d124604ec24f29ed14ce127426ab90e0f3a2c0280c80d1a3ff8b1c09feede19c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f144c4cd7e4b7fa0e8cb87924587294a4dc0e04464584894455bc3221b9c2c2d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cd2129e3b101791a70e29bfed5e63800779881c4d6cbefc06a53e9008cf9e919" + sha256 cellar: :any_skip_relocation, arm64_ventura: "10eca0327229b13765451786c03c7def8fd277d014f5a74e709915fc50a8fdbd" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fb2ec54def8fadafa1c673e851180f0883e651582a78397394706602786d3559" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "325cb00b4694492303da6d2b776bf7ecfc31f9ac6259a9d3d0a1b9ada86d29cc" + sha256 cellar: :any_skip_relocation, sonoma: "ed20188611155d148d1198516c9ddbdf0e79f518e436421a0a9599a2d5c6329e" + sha256 cellar: :any_skip_relocation, ventura: "a22a8a2d9b1568d03efe732ccd3a4fa461f0b8adab78587a8b6fdbfbb8db292a" + sha256 cellar: :any_skip_relocation, monterey: "fed18e5929988555d1623c2a023821de35cd3f200adb40bbb56ecd56b48b5646" + sha256 cellar: :any_skip_relocation, big_sur: "ac4bce32281d7b1c988285d0341691bacfaeba03a6d9d82113ff0ead8125accb" + sha256 cellar: :any_skip_relocation, arm64_linux: "8076cb2126be0503a7610d3d66a473be435350275fb40fb62d5d67bd84182f57" + sha256 cellar: :any_skip_relocation, x86_64_linux: "afd0ca56a9c7ed70b7958688d5d38c85b48c18eba76a52f303abad25f7b41eb0" + 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..63459e280052b --- /dev/null +++ b/Formula/s/sequin.rb @@ -0,0 +1,29 @@ +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_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, 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..cb16c1d9dadc2 --- /dev/null +++ b/Formula/s/sequoia-chameleon-gnupg.rb @@ -0,0 +1,50 @@ +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" + + bottle do + 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..95741820656cf --- /dev/null +++ b/Formula/s/sequoia-sq.rb @@ -0,0 +1,49 @@ +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_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..3d4a6179215f8 --- /dev/null +++ b/Formula/s/sequoia-sqv.rb @@ -0,0 +1,50 @@ +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_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..e8a1d9b4c42d4 --- /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.4.tar.gz" + sha256 "75864434c4f002fa3570daaffeb6f794354fca6d8b5814b8386977a3b1416be9" + license "GPL-2.0-only" + + livecheck do + url :stable + regex(%r{url=.*?/ser2net[._-]v?(\d+(?:\.\d+)+)\.t}i) + end + + bottle do + sha256 arm64_sequoia: "58992ed17c1674ed4c3966d81e1707066b0eeb6060b00ad2f9a806bac648fae2" + sha256 arm64_sonoma: "62fe17948edcd3bcc45390cc376187f226499febb39da2325de79b4f61b853cc" + sha256 arm64_ventura: "9b44815a69d50a6b90ba151efd9d249c84fe72e79af313c45cbc7024a9d17c69" + sha256 sonoma: "b2768bd79fee75dfa6c90e867c0cd310aca45d783dc3670e29c8c6fc44b685ef" + sha256 ventura: "29cab0a79d777129131d2deb84463f5d0ef4ed5e8a5d6e713c1ab3ef18e12141" + sha256 arm64_linux: "25a61d3a99c2c5886eef9ff5e2d21a60d6901083858215fa22e66fb3e07adf1e" + sha256 x86_64_linux: "548cc6d37793cd0028a9e57b86958ef53b0b7283284051adb0dd9448d81e5faf" + 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..3c19346e7df6c --- /dev/null +++ b/Formula/s/serd.rb @@ -0,0 +1,37 @@ +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_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..f734b048b1c24 --- /dev/null +++ b/Formula/s/serf.rb @@ -0,0 +1,42 @@ +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_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, 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..63e21b2201e97 --- /dev/null +++ b/Formula/s/serialosc.rb @@ -0,0 +1,49 @@ +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.5", + revision: "79ac58b0737bc8a6617d90ab41fb00b791a5a746" + license "ISC" + head "https://github.com/monome/serialosc.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b1ba9d4682993c2b91b290ae127d7d3b4f9bf824096990f70680651a79390459" + sha256 cellar: :any, arm64_sonoma: "84e6065faa98dbfb31e366907c0ad337472165ccffb3c8299cf2649811d19d6b" + sha256 cellar: :any, arm64_ventura: "f52aa361a0b6fcd4636a6e98d7b14d720ada9da0f2a78389f94296a54532d294" + sha256 cellar: :any, sonoma: "594dd66c1a55996360013bad6a3f6fe042a5ee853b855b19e8703e0b501ac5cd" + sha256 cellar: :any, ventura: "20f48d409724d37c319fd7595e47cc051be3e4343771168dfecbb9cd83e420d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b01477de4be9295d6c2997b07611a4d52428a819bd5662b34f04d55e110c8b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b66b2d89de42e40b3f3659dbb4f461698d0ff515047af8fd58ca543efe2757c" + 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..069c1a4dc6c7e --- /dev/null +++ b/Formula/s/serie.rb @@ -0,0 +1,44 @@ +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.4.6.tar.gz" + sha256 "a5d95b283c83f5efdf7d6a7faa66e9bfeec771924349edd7df80a1f0c631256b" + license "MIT" + head "https://github.com/lusingander/serie.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b3313fbf0747b7dd4f69f35c45159e818b6afae30f6eb0e9ab9f18dd4ecc0a8a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cc7e38f3baca1f1d2b8bbda77c5324415d361064f4bda6de76745e546a8898cb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "65d8c5fc783a314a94ac9210561d6b2489a8185011b9ae71cc8d337aa0b2b1fd" + sha256 cellar: :any_skip_relocation, sonoma: "66d637beacf49d78fe68dcddcf39c015e7e96b2f4d899385a4cc994fd8a5dfec" + sha256 cellar: :any_skip_relocation, ventura: "dc4470a6e21904043a64e752d11cc17fb4682dc27a1ad64b81b37411fbad4c44" + sha256 cellar: :any_skip_relocation, arm64_linux: "e43f9e97f1233da11a4a72582f8e06f63aa5998985fee083e1544942a99b290a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "acca19320688d5560814dc0698332409dacc70e9a4d6a8456659bee6837c6f10" + 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..50bf4331b9f45 --- /dev/null +++ b/Formula/s/serpl.rb @@ -0,0 +1,33 @@ +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.3.tar.gz" + sha256 "5a40724e7eb2a20db279cbc87f971ae67a9af5ea04fd2aa0126d3c6c31c9e09a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "762a7fd24b98277e00d3430a120351d86928f72704ffbb0a71e0b917e200cd45" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b5aee13a897c5aaa63bfc9c508c7b8dddfe6cbd01eaaf25a65b5f0b085b6b2df" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b81f37c90efe52189da9d9372724f80c4d1da38e531caf21b99fd63bf6191aec" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c117322f51dfffb4c572dde0230840705b164a4cd054f6ef083ee73bc00f207a" + sha256 cellar: :any_skip_relocation, sonoma: "c7ea2af806cddf5889508721f42c245c732dde861279a397ac54f71d91787b3f" + sha256 cellar: :any_skip_relocation, ventura: "10272c254cdb40831f439534d5e98eaf572735b595b9845121d51f3ec0134eef" + sha256 cellar: :any_skip_relocation, monterey: "da2ec5b9d85afaa959b92983f417b084a6ffcf0150c98a9acf07420e0ce79aad" + sha256 cellar: :any_skip_relocation, arm64_linux: "f9b2a1b87e84792376dced0646e5ea696b75c095abc122276a84933b13562473" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b3254ac904f83e9ec62f1bd9ae09a01133b0e2089e5cf872480fac35833971f" + 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..be7c2b44c9377 --- /dev/null +++ b/Formula/s/sersniff.rb @@ -0,0 +1,43 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "89c553505287f0cbd3ef2d46c6b04eb328d0748db6e60511b25d24cefcab83ce" + sha256 cellar: :any_skip_relocation, high_sierra: "eb3cf737a135049c3f7b8bacf4d71670dfc755a1b266f41f0865fb8983a53d55" + sha256 cellar: :any_skip_relocation, sierra: "077112b0300e14f956fbe45ff650cf973e04c355707a3add63b8efc7fc047737" + sha256 cellar: :any_skip_relocation, el_capitan: "abde8af644fecfa883abf597486fd269b379001ae29161fbd21777d0506edc86" + 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..2ea19b93b7cd6 --- /dev/null +++ b/Formula/s/serve.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, 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..52a36a390fc15 --- /dev/null +++ b/Formula/s/serveit.rb @@ -0,0 +1,58 @@ +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" + + bottle do + rebuild 1 + 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..37b43c84f5740 --- /dev/null +++ b/Formula/s/serverless.rb @@ -0,0 +1,51 @@ +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_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..f317152cd8eaf --- /dev/null +++ b/Formula/s/service-weaver.rb @@ -0,0 +1,66 @@ +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_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, 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 + + depends_on "go" => :build + + conflicts_with "weaver", because: "both install a `weaver` binary" + + def install + 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..3b34df8e45305 --- /dev/null +++ b/Formula/s/servus.rb @@ -0,0 +1,139 @@ +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" + + bottle do + 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, mojave: "65921c797c3a2bf7953cf692dee5852de3fd6c2b2466268221a9dfcb7eab960e" + sha256 cellar: :any, high_sierra: "763042d70e605154698d686554d26f6bab46f30200df8a8c3af9c40faeffca64" + sha256 cellar: :any, sierra: "bcfa24ee0545c044c32391ac72d54a5151de64170c777409163c0688cd9bf671" + 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 + system "cmake", "-S", ".", "-B", "build", *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..1ebbccabe90a7 --- /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.13.0.tar.gz" + sha256 "14d69448c689ba5116a55260518ca8b6a4f659c2e41833dc1341801b0dc5ad2d" + license "MIT" + head "https://github.com/joshmedeski/sesh.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "68da55e239a522e3c8b4311407184a2bd958b83bfe7f1d64048884badf38ffd4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68da55e239a522e3c8b4311407184a2bd958b83bfe7f1d64048884badf38ffd4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "68da55e239a522e3c8b4311407184a2bd958b83bfe7f1d64048884badf38ffd4" + sha256 cellar: :any_skip_relocation, sonoma: "13f517c70687613ace023e9ad13b4dcb800f7bd3092d42e460381a6e2370685a" + sha256 cellar: :any_skip_relocation, ventura: "13f517c70687613ace023e9ad13b4dcb800f7bd3092d42e460381a6e2370685a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13efb4aa7dbf4b5839b25ecd7000d64a5413c5bc4348c2536e837cbb70ca8b5d" + 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..00773bd2bd871 --- /dev/null +++ b/Formula/s/setconf.rb @@ -0,0 +1,27 @@ +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" + + 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..49d13d5263935 --- /dev/null +++ b/Formula/s/setweblocthumb.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "95ec7fa6fc12d232f0ce75089ec987d91a922752578447a68e9170de743d5552" + sha256 cellar: :any_skip_relocation, high_sierra: "8d7536c3ba30dc46c4e3a0f2e4be411d3e8b06be939a5130c67d2094da0cef4e" + sha256 cellar: :any_skip_relocation, sierra: "563620905a209f198f30bbffc9177294b224cee3098719af6da8cfca74092157" + sha256 cellar: :any_skip_relocation, el_capitan: "2a9c327d5d594d00d7d283d6627a5eeef160731616aec9d62bab017b52d71f1a" + 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..ea22db1cbfca8 --- /dev/null +++ b/Formula/s/seven-kingdoms.rb @@ -0,0 +1,68 @@ +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.6/7kaa-2.15.6.tar.gz" + sha256 "2c79b98dc04d79e87df7f78bcb69c1668ce72b22df0384f84b87bc550a654095" + 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_sequoia: "b2d889d8c50a32132e8a843b6e11fb74f2201d8b8a5518b0e05494c425c3d38b" + sha256 arm64_sonoma: "e041776b87a11f71a2b25a732df463a85965a7a9730a6fdc86ead47b88269250" + sha256 arm64_ventura: "5cfe334ad3d1727e92bc7c5cd43da8bd89f64b33212ee903bd3bb88946ae6b6b" + sha256 sonoma: "190571e9d1291c690b91c25523469fb56448e458d9271b5927b5f6298a3901be" + sha256 ventura: "0e4c24744884c459603a2fef964656acd72f417d20eb66582c58ad2c73b87cd7" + sha256 arm64_linux: "fb3a76000690803f166042bc610804309c8cef5873a8e45005c4c84a529343c9" + sha256 x86_64_linux: "2309306fa67efdf1de1e05fd01bb50448f9f1ca9b6688ed9ede4cd826fca877f" + 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..1e998a2e70a87 --- /dev/null +++ b/Formula/s/sevenzip.rb @@ -0,0 +1,49 @@ +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/7z2409-src.tar.xz" + version "24.09" + sha256 "49c05169f49572c1128453579af1632a952409ced028259381dac30726b6133a" + 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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8af70077a765a3b8932830f8ac0bffe756ab09a01e9c4f1cceaf4b6ff67b73b6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f43517abad06c408e8e4d3b9d49d7984223f3181d44e9c9582ffd1be047fb191" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f2a07519bf07398a2b7a2837561bc672240b7718df55cf94c4d788039942add6" + sha256 cellar: :any_skip_relocation, sonoma: "eae8b36ca70c587255c68afcdb34ebebd616c7be3efd7b40facea0bff43ff826" + sha256 cellar: :any_skip_relocation, ventura: "604cd24f7bd8da0e64d6c35cf4b747544af1e720f30946967da1697b3599c915" + sha256 cellar: :any_skip_relocation, arm64_linux: "0edea6848b6dc589e06bb0397389e202c36c83665c624b1b21169ce3271273da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0cdef8851bfaa08e67e779e854b4c063cbc619e2b4c844baf04e12594545957" + end + + def install + cd "CPP/7zip/Bundles/Alone2" do + 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 + + 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 + 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 + end +end diff --git a/Formula/s/sexpect.rb b/Formula/s/sexpect.rb new file mode 100644 index 0000000000000..15c14485327f0 --- /dev/null +++ b/Formula/s/sexpect.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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..fc6c34b1a6cb3 --- /dev/null +++ b/Formula/s/sextractor.rb @@ -0,0 +1,44 @@ +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_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"] + system "./autogen.sh" + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--enable-openblas", + "--with-openblas-libdir=#{openblas.lib}", + "--with-openblas-incdir=#{openblas.include}" + 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..2edf6192c0897 --- /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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "50e87a417ac3d9b5be7318c7e2983db1a1f90759fab02a898f9cd257b15ac6e2" + sha256 cellar: :any_skip_relocation, high_sierra: "2ebd137c58bd8d20a50251e159b6074e65009a265aa351cf6eb0afd39d59edc1" + sha256 cellar: :any_skip_relocation, sierra: "01cf1ff26d304c0cbb0072130ba2476ddeebd8933040092b937ced1ede06c2a2" + 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..aa23151212e43 --- /dev/null +++ b/Formula/s/sf.rb @@ -0,0 +1,40 @@ +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.88.6.tgz" + sha256 "60f10dc8fd8823e2f87cde0384b82ede058e4a3285a6fe33ac4fa2467fbe01a6" + 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, arm64_sequoia: "957d50e94a809016896d8052d10f504332814aa5ea62724bb88de5bf2fc742dc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "957d50e94a809016896d8052d10f504332814aa5ea62724bb88de5bf2fc742dc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "957d50e94a809016896d8052d10f504332814aa5ea62724bb88de5bf2fc742dc" + sha256 cellar: :any_skip_relocation, sonoma: "c25ff335ff540a95622f09df39f0925a0c06287970c23e2782f8b51183ef3fd8" + sha256 cellar: :any_skip_relocation, ventura: "c25ff335ff540a95622f09df39f0925a0c06287970c23e2782f8b51183ef3fd8" + sha256 cellar: :any_skip_relocation, arm64_linux: "957d50e94a809016896d8052d10f504332814aa5ea62724bb88de5bf2fc742dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "957d50e94a809016896d8052d10f504332814aa5ea62724bb88de5bf2fc742dc" + 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..c60f979272ca1 --- /dev/null +++ b/Formula/s/sfcgal.rb @@ -0,0 +1,32 @@ +class Sfcgal < Formula + desc "C++ wrapper library around CGAL" + homepage "https://sfcgal.gitlab.io/SFCGAL/" + url "https://gitlab.com/sfcgal/SFCGAL/-/archive/v2.1.0/SFCGAL-v2.1.0.tar.gz" + sha256 "cb73a0496c61a5c7bf0ccc68c42e4378bfc441b242e9dee894067e24d2e21d0f" + license "LGPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a7b0727c269876eec4f2d4220b0f982d7c226eb88abacf424673f7d16a659a4e" + sha256 cellar: :any, arm64_sonoma: "f6e6c487463be6bef875dc78e278a276446d5f3c8c511d89b88364280a6130c2" + sha256 cellar: :any, arm64_ventura: "a3e42c1c990f00fae52418a0239789d03358bde48902a98e30b9ba28470df6f0" + sha256 cellar: :any, sonoma: "d7c5ded8a7de47e7533b4f84978ae9897f155d966e9730ad989880422285bb6a" + sha256 cellar: :any, ventura: "93486bc9c6599461e48bc2e3afde3d9923b986a44e0405a1dd1af9f2793be4ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bddf5bf890c2df8cf195fb80b7bab394c939f637d204d845716fb80563639617" + end + + depends_on "cmake" => :build + depends_on "boost" + depends_on "cgal" + depends_on "gmp" + depends_on "mpfr" + + def install + 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..b135c69f60ade --- /dev/null +++ b/Formula/s/sfk.rb @@ -0,0 +1,33 @@ +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_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..ab513fc39ab0f --- /dev/null +++ b/Formula/s/sfml.rb @@ -0,0 +1,84 @@ +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.1.tar.gz" + sha256 "f99f71bb2f2608835b1a37e078512b75dd39d52b89e13e12246603a950da3c1f" + 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_sequoia: "219438b2d39684b110414e0c199ef9c303bb14ea442d5de6aed2805564c2525e" + sha256 cellar: :any, arm64_sonoma: "41e3ddc554afb5b505cb036672539652b5981591fb62d02797c16fac39217f69" + sha256 cellar: :any, arm64_ventura: "6f124cf63ea4944b4f395a06848b6b6d8e47f2e029dc029814271d4e8a38215a" + sha256 cellar: :any, sonoma: "f56186107e571de0d38538cb941ae6598636513c575672e24ef4641e9038ac1f" + sha256 cellar: :any, ventura: "3351ec1251bbc1c8b5dbac9c20807e70e32df6581e69b3ea1f821224eb3933e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "af868781ca4dabd34f9ee0a16a25dd414184fd2e4373c9f01bd6bbc65b7bcc34" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fee6dff9705e907632542b1279f71c880f676cf235a5a3aba457a235c23fd709" + 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 + # Fix "fatal error: 'os/availability.h' file not found" on 10.11 and + # "error: expected function body after function declarator" on 10.12 + # Requires the CLT to be the active developer directory if Xcode is installed + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? && MacOS.version <= :high_sierra + + # 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..341cc6256f54a --- /dev/null +++ b/Formula/s/sfml@2.rb @@ -0,0 +1,74 @@ +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 + + bottle do + 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 + # Fix "fatal error: 'os/availability.h' file not found" on 10.11 and + # "error: expected function body after function declarator" on 10.12 + # Requires the CLT to be the active developer directory if Xcode is installed + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? && MacOS.version <= :high_sierra + + # 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..638158de0a3b1 --- /dev/null +++ b/Formula/s/sfsexp.rb @@ -0,0 +1,62 @@ +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" + + bottle do + 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..a0eb6136db42e --- /dev/null +++ b/Formula/s/sfst.rb @@ -0,0 +1,61 @@ +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-only" + + livecheck do + url :homepage + regex(%r{href=.*?data/SFST[._-]v?(\d+(?:\.\d+)+[a-z]*)\.[tz]}i) + end + + bottle do + 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..f6ea9e967a3a2 --- /dev/null +++ b/Formula/s/sftpgo.rb @@ -0,0 +1,88 @@ +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.6.6/sftpgo_v2.6.6_src_with_deps.tar.xz" + sha256 "02d36a540e79ee877585c145cbe294bd48b03db98d2b577273cad4c8b6cf482c" + license "AGPL-3.0-only" + + bottle do + sha256 arm64_sequoia: "618de2bf3a3e61caeb84a818715060a7793e35dea8309b529c42715e10382778" + sha256 arm64_sonoma: "cf13ba2d5b0ef2cf8cc20ef3c6e7ba8719fcca93e88b545924ac0976dbc0d9bb" + sha256 arm64_ventura: "f5b1195ebb945df9faa935aff174de9305be4e66deb7d015271255c23df2293c" + sha256 sonoma: "b0e1b0c942ab7489cae8fd45b1f8586ecccf2c9f95e08d3c21b762690e4af66e" + sha256 ventura: "b8be7324b8fc6d0ba8c3d833043f042cf0a161d4c31242686ef0915773aad7cd" + sha256 arm64_linux: "03ccf1abb305691c6d1c169fceaa36057810a6e2888baac8977ccb1ebfb6a90e" + sha256 x86_64_linux: "e1b0617a0ea156c8d4a002fbfdeb8d3b1fa448e8bb8167dd9c5f5f0934af1efc" + end + + depends_on "go" => :build + + def install + 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..c37ff466d2647 --- /dev/null +++ b/Formula/s/sgn.rb @@ -0,0 +1,31 @@ +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" + + bottle do + rebuild 1 + 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..2da237dd1a8cc --- /dev/null +++ b/Formula/s/sgr.rb @@ -0,0 +1,229 @@ +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 12 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "e24e8e23188a71cf3c9fc2cdc882e8df121d6c57a5b7d1b497325f036d90abcb" + sha256 cellar: :any, arm64_sonoma: "7011df43f337e962f6096289d2977f647abaaaac574a9cdfaecafffa98686776" + sha256 cellar: :any, arm64_ventura: "73a811fd6b38dad68a34a4d10cbac9eab2eac2d33ec2a83fe7f65964d60ac66c" + sha256 cellar: :any, sonoma: "4bd60cdcc4352090c6bddbe71b1aa59ecc165aed2589e04b100529c86e706960" + sha256 cellar: :any, ventura: "41a3d7953cf04002d66e9000949ed920d7e0a7a58a63b536141fb368518efb61" + sha256 cellar: :any_skip_relocation, arm64_linux: "9a385d849ae4408eac7b94ebbb160a9c6437f41b278a041586472a29bf372fa6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a98218b3ca5c8416ebfcabe5f1aaa3cc6a6a57aa6e94b7e3e8df0ab596ca4e2" + end + + depends_on "cython" => :build # TODO: remove with newer `pglast` (4.4+) + depends_on "rust" => :build # for pydantic + depends_on "certifi" + depends_on "cryptography" + depends_on "libpq" # for psycopg2-binary + depends_on "openssl@3" + depends_on "python@3.13" + + # Manually update `pglast` from ==3.4 to support python 3.11 + # https://github.com/splitgraph/sgr/pull/814 + + 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/31/fa/57ec2c6d16ecd2ba0cf15f3c7d1c3c2e7b5fcb83555ff56d7ab10888ec8f/argon2_cffi-23.1.0.tar.gz" + sha256 "879c3e79a2729ce768ebb7d36d4609e3a78a4ca2ec3a9f12286ca057e3d0db08" + 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/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" + sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" + 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/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/64/33/60135848598c076ce4b231e1b1895170f45fbcaeaa2c9d5e38b04db70c35/joblib-1.4.2.tar.gz" + sha256 "2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e" + 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/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" + sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" + end + + resource "minio" do + url "https://files.pythonhosted.org/packages/92/76/f05b7398835c17cc7f03817ebe5dd3421323664c6e2477dd8c33638ddd3e/minio-7.2.9.tar.gz" + sha256 "a83c2fcd981944602a8dc11e8e07543ed9cda0a9462264e3f46a13171c56bccb" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + 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/dc/1f/35e26fb6ac645f16c99d720624b69aee94bd284e15e6878b9f759bbf08b0/pglast-3.18.tar.gz" + sha256 "1703d5bde8f21f9d54e1bc20ff61aa0d64b490b3d27a2a8dce34940dc39a703c" + end + + resource "psycopg2-binary" do + url "https://files.pythonhosted.org/packages/cb/0e/bdc8274dc0585090b4e3432267d7be4dfbfd8971c0fa59167c711105a6bf/psycopg2-binary-2.9.10.tar.gz" + sha256 "4b3df0e6990aa98acda57d983942eff13d824135fe2250e6522edaa782a06de2" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/13/52/13b9db4a913eee948152a079fe58d035bd3d1a519584155da8e786f767e6/pycryptodome-3.21.0.tar.gz" + sha256 "f7787e0d469bdae763b876174cf2e6c0f7be79808af26b1da96f1a64bcf47297" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/a9/b7/d9e3f12af310e1120c21603644a1cd86f59060e040ec5c3a80b8f05fae30/pydantic-2.9.2.tar.gz" + sha256 "d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/e2/aa/6b6a9b9f8537b872f552ddd46dd3da230367754b6f707b8e1e963f515ea3/pydantic_core-2.23.4.tar.gz" + sha256 "2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863" + end + + resource "referencing" do + url "https://files.pythonhosted.org/packages/99/5b/73ca1f8e72fff6fa52119dbd185f73a907b1989428917b24cff660129b6d/referencing-0.35.1.tar.gz" + sha256 "25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/55/64/b693f262791b818880d17268f3f8181ef799b0d187f6f731b1772e05a29a/rpds_py-0.20.0.tar.gz" + sha256 "d72a210824facfdaf8768cf2d7ca25a042c30320b3020de2fa04640920d4e121" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/d1/d6/eb2833ccba5ea36f8f4de4bcfa0d1a91eb618f832d430b70e3086821f251/ruamel.yaml-0.17.40.tar.gz" + sha256 "6024b986f06765d482b5b07e086cc4b4cd05dd22ddcbc758fa23d54873cf313d" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/07/37/b31be7e4b9f13b59cde9dcaeff112d401d49e0dc5b37ed4a9fc8fb12f409/setuptools-75.2.0.tar.gz" + sha256 "753bb6ebf1f465a1912e19ed1d41f403a79173a9acf66a42e7e6aec45c3c16ec" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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/58/83/6ba9844a41128c62e810fddddd72473201f3eacde02046066142a2d96cc5/tqdm-4.66.5.tar.gz" + sha256 "e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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 + # TODO: remove with newer `pglast` (4.4+) + ENV.append_path "PYTHONPATH", Formula["cython"].opt_libexec/Language::Python.site_packages("python3.13") + + virtualenv_install_with_resources start_with: "setuptools" + + generate_completions_from_executable(bin/"sgr", shells: [:fish, :zsh], 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/sgrep.rb b/Formula/s/sgrep.rb new file mode 100644 index 0000000000000..c37cb6e595aed --- /dev/null +++ b/Formula/s/sgrep.rb @@ -0,0 +1,68 @@ +class Sgrep < Formula + desc "Search SGML, XML, and HTML" + homepage "https://www.cs.helsinki.fi/u/jjaakkol/sgrep.html" + url "https://deb.debian.org/debian/pool/main/s/sgrep/sgrep_1.94a.orig.tar.gz" + mirror "https://fossies.org/linux/misc/old/sgrep-1.94a.tar.gz" + sha256 "d5b16478e3ab44735e24283d2d895d2c9c80139c95228df3bdb2ac446395faf9" + + # The directory listing page where the tarballs were found now gives a 404 + # (Not Found) response (the FTP referenced on the download page is also + # unresponsive). The homepage and download page list 1.92a as the newest + # version (from 1998-12-23) instead of 1.94a (from 2004-11-19), as the + # website was last updated on 1998-12-22. + livecheck do + skip "No up-to-date sources to check for versions" + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "836a9d21daa61fa592a52541e2927175f2689e67569562961ea4c22278fe65a0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6492d756d61b8cacca30d42da39a0d039a3d9e90ae03a7ed7fa5461970dc4af4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "213de82d5aff5377df50fbe7cedcaa3e099feb2ccee33c7f9dbc35ff4bfb8c7f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "775257fda7135fce998eafe41e1c39f32da44a2c5440dd205ff0a7801e6ef9f9" + sha256 cellar: :any_skip_relocation, sonoma: "da55a160f395a28966803b2e1b124e5ed1c7489f53d6d038f228c8ae9c4d78bc" + sha256 cellar: :any_skip_relocation, ventura: "a6aac3155b62fd7feed928b2c57f9b417ee102688352b573c9e39122e19c463a" + sha256 cellar: :any_skip_relocation, monterey: "192436239783803b977e5804d989dc67f7760d87ed7831bb3c30dae5146204cf" + sha256 cellar: :any_skip_relocation, big_sur: "fedcff86ec032617015882c5729298bbe1f1fcbda14cdde6167b00ae2af586b8" + sha256 cellar: :any_skip_relocation, catalina: "29e528a52ae36131ded52bb08d9cf9b12b1455fbc715f7b7bbd3b97f637862e5" + sha256 cellar: :any_skip_relocation, mojave: "bfb1f484dd474727fec463b1b90ffe7250f5c82e0e65bec96903e38f6e0a8e48" + sha256 cellar: :any_skip_relocation, high_sierra: "a243589e79a4cde4f7bba21ec618e3c323c049589707bde6e2c20c4bf1014464" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b9d7e430b35750659c93cfd9308b5cf32211eb19b79a8ee3bf0c0b62ef2712b" + end + + # The README and source code mention `sgrep` is under a GPL license detailed + # in COPYING, but the COPYING file is blank. Previous release 1.92a did include + # GPL 2.0 license and had code in common.c that printed copyright notice + # that specified GPL-2.0-or-later. Due to unknown reason for removal of this + # information, the formula has been disabled. + disable! date: "2024-08-13", because: "has a blank COPYING and is missing details on which GPL license" + + uses_from_macos "m4" + + on_arm do + # Added automake as a build dependency to update config files for ARM support. + depends_on "automake" => :build + end + + def install + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + 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 + + 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/s/sh4d0wup.rb b/Formula/s/sh4d0wup.rb new file mode 100644 index 0000000000000..2debb2fb6d5e3 --- /dev/null +++ b/Formula/s/sh4d0wup.rb @@ -0,0 +1,65 @@ +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_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 + # Work around an Xcode 15 linker issue which causes linkage against LLVM's + # libunwind due to it being present in a library search path. + ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib if DevelopmentTools.clang_build_version >= 15 + + # 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..b2f71d00f8f31 --- /dev/null +++ b/Formula/s/sha1dc.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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, mojave: "1c12564c84282e1ddbac545864bd695527dca9026411725e4a4604eaed81ec8b" + sha256 cellar: :any, high_sierra: "a489f11b91a88486274717eace83368f6b072b134ddc62001157b1fae9873dab" + sha256 cellar: :any, sierra: "9eba4b19247672b715376e2086689e7418235d850a158636d2ba3deb46851933" + sha256 cellar: :any, el_capitan: "32d59c039a26d232b35f3c1877ca8c78ba0a303866adefee002c017359b03267" + 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..c87a69ea51127 --- /dev/null +++ b/Formula/s/sha2.rb @@ -0,0 +1,43 @@ +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 + + bottle do + rebuild 4 + 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, mojave: "cc85a50ddee16d85b3e1412ad8ce420bddc4fb70af97152f3328e208030823a5" + 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..32b71d8d31f86 --- /dev/null +++ b/Formula/s/sha3sum.rb @@ -0,0 +1,35 @@ +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" + + bottle do + rebuild 1 + 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..08ebbaeb18c1f --- /dev/null +++ b/Formula/s/shaderc.rb @@ -0,0 +1,109 @@ +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.2.tar.gz" + sha256 "3fddc13bbb87411c6f7b8f447e87c1637933450087e70fc21da650041f4e0132" + + resource "glslang" do + # https://github.com/google/shaderc/blob/known-good/known_good.json + url "https://github.com/KhronosGroup/glslang.git", + revision: "8b822ee8ac2c3e52926820f46ad858532a895951" + end + + resource "spirv-headers" do + # https://github.com/google/shaderc/blob/known-good/known_good.json + url "https://github.com/KhronosGroup/SPIRV-Headers.git", + revision: "54a521dd130ae1b2f38fef79b09515702d135bdd" + end + + resource "spirv-tools" do + # https://github.com/google/shaderc/blob/known-good/known_good.json + url "https://github.com/KhronosGroup/SPIRV-Tools.git", + revision: "f289d047f49fb60488301ec62bafab85573668cc" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "d754215b97ff59175e5b49ac7583837e004d6f0fff59fedd9b42fe5dc779bd9c" + sha256 cellar: :any, arm64_sonoma: "8fb423c7f2631260378576f9f90fa830aa78e1a6f1e059da9371ad73c3570da1" + sha256 cellar: :any, arm64_ventura: "ffc37dd4facbae80c0c6fd4a85621220898facaf2c2e66346d490e65302c86d8" + sha256 cellar: :any, sonoma: "cce9f7b41fbfc64373bb63c6e8b6884f635a56b531ce858bc14534c700677e40" + sha256 cellar: :any, ventura: "9c5bd57e3a5822fef1f0d42c187d9f77dd740068f8bd40d08cdb03710c29d7c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "7bb01f0bdd6d5f06d4a0bdaa78707d30763b4f0fb3ca7815ce9790318472e10f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f7be1ea16a85ac988a3e25142dde846feec4477b6b6584730f8d1b3f55b5a8f3" + 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..8923201ed825f --- /dev/null +++ b/Formula/s/shadowenv.rb @@ -0,0 +1,58 @@ +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.0.3.tar.gz" + sha256 "ad04e1d5ae88e358f0ee6ec987bd88b7f8c489409fafc6286690aeacb074ddea" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93a3aa92e6d4f3d71f2096def300b3d503b06af579212990958fb29a5cf53dac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "926abc552d85283e6507cd2668bdf5af33ce5d2b0a3515fc14ab3a9250d8c6d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "801c925456a0220534c28009729ddb366a5925a61857c3ea053d39d6b44982b9" + sha256 cellar: :any_skip_relocation, sonoma: "a584d3fa65f210eb2ea6dffd8d50b59b6cab767f11b7e97cf9bb2dde03fa2f2e" + sha256 cellar: :any_skip_relocation, ventura: "50f747135333edf3cc9f6252e6e4abc86ee20523c285af87a0d6411b843ae0d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "304f0b91b0e1699a4dbca9fffe327975fd4f86aa7d0a2a393233619c97d189b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4209ba91154dc46bc9254f7117cc25f46a7bc9ee0ce160321cc91d3a1bc81380" + 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_command = "#{bin}/shadowenv hook '\"'\"'#{hash}:#{data.to_json}'\"'\"' 2> /dev/null" + 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_command})\"; #{print_vars}'") + end +end diff --git a/Formula/s/shadowsocks-libev.rb b/Formula/s/shadowsocks-libev.rb new file mode 100644 index 0000000000000..21df723042641 --- /dev/null +++ b/Formula/s/shadowsocks-libev.rb @@ -0,0 +1,99 @@ +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_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..c7defd3011249 --- /dev/null +++ b/Formula/s/shadowsocks-rust.rb @@ -0,0 +1,55 @@ +class ShadowsocksRust < Formula + desc "Rust port of Shadowsocks" + homepage "https://shadowsocks.org/" + url "https://github.com/shadowsocks/shadowsocks-rust/archive/refs/tags/v1.23.4.tar.gz" + sha256 "8a91836256989e3a56409d0e83da6549ecf727e2d6642cd4e707993d9c8a23d3" + license "MIT" + head "https://github.com/shadowsocks/shadowsocks-rust.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e7a77f9c0bb65cf58a9a2defd0289914a42854cd9a974980dec468ce7e969fc1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6296984cb50d7fd3aef88a8809a9911db92436d4bc98caf976d8fbeaf1479b0e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f9ce67ab52ae96cd5ccf89f8bbb64e1263633164e567fe96e4195a8f444b2133" + sha256 cellar: :any_skip_relocation, sonoma: "1191af72e64a9cd095770119b49bd53d345df0d5d41d9123a7ac2f371c534289" + sha256 cellar: :any_skip_relocation, ventura: "3a0f44423481492b31ede2596fe1eed81fe05a278fbccda0de86d5796f26006b" + sha256 cellar: :any_skip_relocation, arm64_linux: "5ddebf7cee1ecae6152b9f601e58fdd4d25386b33cb9ad196e25408993109a1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48241830a76c4e367fc36ddf225cf083c84d61baa32a2ecb4bf42cb542abaa94" + 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..bc077bdf89da2 --- /dev/null +++ b/Formula/s/shairport-sync.rb @@ -0,0 +1,76 @@ +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" + head "https://github.com/mikebrady/shairport-sync.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "c25646009fe8cddab1b71c91b10a39f911e97b3b3eecb86eb89abf5b06314e09" + sha256 arm64_sonoma: "35734a8d4528fa4adfda8389a9928ccdc0537fe2cc85c7d84a8fca56f2ad8f04" + sha256 arm64_ventura: "8cf7de53d4ddb584a9c867487d12b63398c12a70828854856b356b89744bc5f5" + sha256 sonoma: "c354b7d9cbb4d7ae6f6c0eb45e90673033ed3a9f00fcc365aadb0126c03485e9" + sha256 ventura: "b926bdadaad35052db8c2b52c0d3c2f3a70b5029084e1f0f390525588e2a17bf" + sha256 arm64_linux: "371e002a675cc3343cbf7e9632b4d6b36cfe6c32465c3970fb22fecaa2f3dc2b" + sha256 x86_64_linux: "a11b5f33ab1cdf35b511fc944c61c192e9c070d58b09bcfb0b108388108208eb" + 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..478777f27836b --- /dev/null +++ b/Formula/s/shallow-backup.rb @@ -0,0 +1,109 @@ +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: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "22c6b568aadef08c73903fa4e63af2f185767d01cc49d934357e1e948370440e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "22c6b568aadef08c73903fa4e63af2f185767d01cc49d934357e1e948370440e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "22c6b568aadef08c73903fa4e63af2f185767d01cc49d934357e1e948370440e" + sha256 cellar: :any_skip_relocation, sonoma: "faeb8b9d1a0e93fea36e1e93aa473374e598abe938716db7329c80a6be0f2a34" + sha256 cellar: :any_skip_relocation, ventura: "faeb8b9d1a0e93fea36e1e93aa473374e598abe938716db7329c80a6be0f2a34" + sha256 cellar: :any_skip_relocation, arm64_linux: "ef099a4f31fbc2d802d7d076c9d809d4368b86bcfc8052a6e277b14c1ff71a6f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22c6b568aadef08c73903fa4e63af2f185767d01cc49d934357e1e948370440e" + end + + depends_on "python@3.13" + + resource "blessed" do + url "https://files.pythonhosted.org/packages/25/ae/92e9968ad23205389ec6bd82e2d4fca3817f1cdef34e10aa8d529ef8b1d7/blessed-1.20.0.tar.gz" + sha256 "2cdd67f8746e048f00df47a2880f4d6acbcdb399031b604e34ba8f71d5787680" + 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 "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/19/0d/bbb5b5ee188dec84647a4664f3e11b06ade2bde568dbd489d9d64adef8ed/gitdb-4.0.11.tar.gz" + sha256 "bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/b6/a1/106fd9fa2dd989b6fb36e5893961f82992cf676381707253e0bf93eb1662/GitPython-3.1.43.tar.gz" + sha256 "35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c" + end + + resource "inquirer" do + url "https://files.pythonhosted.org/packages/f3/06/ef91eb8f3feafb736aa33dcb278fc9555d17861aa571b684715d095db24d/inquirer-3.4.0.tar.gz" + sha256 "8edc99c076386ee2d2204e5e3653c2488244e82cb197b2d498b3c1b5ffb25d0b" + end + + resource "readchar" do + url "https://files.pythonhosted.org/packages/18/31/2934981710c63afa9c58947d2e676093ce4bb6c7ce60aac2fcc4be7d98d0/readchar-4.2.0.tar.gz" + sha256 "44807cbbe377b72079fea6cba8aa91c809982d7d727b2f0dbb2d1a8084914faa" + end + + resource "runs" do + url "https://files.pythonhosted.org/packages/26/6d/b9aace390f62db5d7d2c77eafce3d42774f27f1829d24fa9b6f598b3ef71/runs-1.2.2.tar.gz" + sha256 "9dc1815e2895cfb3a48317b173b9f1eac9ba5549b36a847b5cc60c3bf82ecef1" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/88/04/b5bf6d21dc4041000ccba7eb17dd3055feb237e7ffc2c20d3fae3af62baa/smmap-5.0.1.tar.gz" + sha256 "dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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", + shells: [:fish, :zsh], + 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/shapelib.rb b/Formula/s/shapelib.rb new file mode 100644 index 0000000000000..fd2eb0af61a81 --- /dev/null +++ b/Formula/s/shapelib.rb @@ -0,0 +1,38 @@ +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.1.tar.gz" + sha256 "5da90a60e25440f108f4e8e95732bfa83ede13c8e0c2bcf80ae41006cc8ebc20" + 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_sequoia: "fb49cfcd0596b179c7b2a0e8b455b846db356aa2166919cf811507768d7065cf" + sha256 cellar: :any, arm64_sonoma: "3b896b17d9691d399ea9f0d7350eef3c43b4c03b0616e2dc5bb4f17060e51b3a" + sha256 cellar: :any, arm64_ventura: "b3cc3ed80a625c61930c2ae5f8629556fe9b34a2b36568c6c887b3e0de3a561f" + sha256 cellar: :any, arm64_monterey: "cefd09ed4bc3d75842d93c83d30a3746a145e80c19f0ff736f52fae534b8d6ac" + sha256 cellar: :any, sonoma: "fcd168887712a91344618537d20c0579ff2907b9d887017b07aca2b921526306" + sha256 cellar: :any, ventura: "87e9ad2a1b66cb3c589db6f95f83ba7605363e8441a1f64b7453d99f8511fe2c" + sha256 cellar: :any, monterey: "f4ccafad07023f98b85e7477224151f098a792404c52e84d2c5150998cd1e020" + sha256 cellar: :any_skip_relocation, arm64_linux: "bee18dded9f0073ab270085d33dacda57c4d0cd713e806502fe0b3e34b28c3aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10c1872d151e320089896c49d5234ba25355d660d0e4b440a1e1ea989f99c8f3" + 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..b23f0c98d774f --- /dev/null +++ b/Formula/s/shared-mime-info.rb @@ -0,0 +1,71 @@ +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 + + bottle do + rebuild 2 + 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..08c3e3e1edb11 --- /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" + + bottle do + 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, mojave: "ff3c55ef1d10c16066e97a20143dbd1e7781ceb9a2c5c8b46d140f6711bc79fa" + sha256 cellar: :any_skip_relocation, high_sierra: "c19f4586119be579006eace517045998138d83a17e2b5c8ec00ad73ea007b68c" + sha256 cellar: :any_skip_relocation, sierra: "6e1834ac7b4cc64ba972a59189512bb9ff9e0ec307df78f9e0fc1fee42378f6d" + 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..c26807a616185 --- /dev/null +++ b/Formula/s/sheldon.rb @@ -0,0 +1,63 @@ +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.1.tar.gz" + sha256 "fa0aade40a2e2f397f5f8734a0bc28391147ed6ad75c087f8ab7db7ce1e49b88" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/rossmacarthur/sheldon.git", branch: "trunk" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3c88c02b826a8a2fdff6b9bcc20e583f89f6e36231c66a3ca273534b0901a29e" + sha256 cellar: :any, arm64_sonoma: "5fd35591c4061b133af6d60a72c9a14cb1fd15905aa02bdaae75afef04629c1f" + sha256 cellar: :any, arm64_ventura: "0b6b02c0826dd2a73cd001523b14ebae3e62dd3eb0f0df3bf496e2c0f0472784" + sha256 cellar: :any, sonoma: "14425f9fa0b53c2fb461f2b0a494c29d03f39eafb1ea810868715ca5e32237ce" + sha256 cellar: :any, ventura: "616ba594572cc595a5351ce762788298c3b3683c6a69272791c57f9dec2eca80" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c020679742a17b08cc1ec647d094e23bcead066b083dcb382fea997b61311df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd569988b6307ed86b2da07ccd34c07a8fab3f50a8a0fb596949c32232ca6230" + 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..525f53bc05984 --- /dev/null +++ b/Formula/s/shell2http.rb @@ -0,0 +1,44 @@ +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_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, 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..18e697a72a0ab --- /dev/null +++ b/Formula/s/shellcheck.rb @@ -0,0 +1,54 @@ +class Shellcheck < Formula + desc "Static analysis and lint tool, for (ba)sh scripts" + homepage "https://www.shellcheck.net/" + license "GPL-3.0-or-later" + head "https://github.com/koalaman/shellcheck.git", branch: "master" + + stable do + url "https://github.com/koalaman/shellcheck/archive/refs/tags/v0.10.0.tar.gz" + sha256 "149ef8f90c0ccb8a5a9e64d2b8cdd079ac29f7d2f5a263ba64087093e9135050" + + # Backport upper bound increase for filepath, needed for GHC 9.12 + patch do + url "https://github.com/koalaman/shellcheck/commit/0ee46a0f33ebafde128e2c93dd45f2757de4d4ec.patch?full_index=1" + sha256 "c73663bee3577068700b580140d468834cd42f88f7753f950f501e8781656ff5" + end + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5045be1e530288251353848343322f5a423617d061830b7ea7465fe550787364" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef742b6992cfcdcd7289718ac64b27174e421d29ce3ad9b81e1856349059b117" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6e60ee03edb09ac5bc852b8eb813849fa654400e21ffb4c746989678172f5a26" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d5e8407806dbf757e71930ce2cb9b0d23bae286f0c058d9ff246d851dd7aa871" + sha256 cellar: :any_skip_relocation, sonoma: "b53cf1e5464406ee49743fc2db84850b6d34d3a2098cf729e629b23f9d6dd6e0" + sha256 cellar: :any_skip_relocation, ventura: "15ba88c48a5ae3b08e085791e3c5e514d9d78ce88414c96bd21ed33f29fb4aca" + sha256 cellar: :any_skip_relocation, monterey: "b3d14cb62e325d0f7221cd24a7fb4533936feae4ed4dce00e8983ec6e55123f8" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e5ceec4e238594c795e31266086f0dd6d511d858ca21a4f9783f0e6b3dd7e2d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d0867f144686a5caa025cb15ecac49286654b78e7b89979a54eedc9a0cc9b6b" + 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..3869bf79286c8 --- /dev/null +++ b/Formula/s/shellharden.rb @@ -0,0 +1,34 @@ +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_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..67de854a542e6 --- /dev/null +++ b/Formula/s/shellinabox.rb @@ -0,0 +1,61 @@ +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.20.tar.gz" + sha256 "27a5ec6c3439f87aee238c47cc56e7357a6249e5ca9ed0f044f0057ef389d81e" + license "GPL-2.0-only" + revision 1 + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b3bc61dfd3c0f3764b43daadc5f1538a1108f349b60cf26903487c1e7bb0a909" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d213c9fb7b6d4654f23daa401acf2ca7d7bae0049c18cd9e845275610d06a24f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d00dfd6b119c7d8555081e4ad821d67ecf0da641c5630435e67c3c9eadedd1a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "9b29df2258a90e8cfef9e54cf0569c1e556f07911d0dbb934e6760487416a3f4" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "ceb68ab288df2b997e3c7361cd6e8c0fb389ee9fa187503f14e2bd5f00393f03" + sha256 cellar: :any_skip_relocation, sonoma: "292a074e3985e260888cca30d4bedc59bbd879b8235259c9afd8bad112d72e0b" + sha256 cellar: :any_skip_relocation, ventura: "d303f6e2a79b3022f4659934635aa4c7fb4abeb18384bfafb1c012064a03018c" + sha256 cellar: :any_skip_relocation, monterey: "17b6552900a2b8eb5297e6db21d07479821a95cbcc3d34d0c553e47ebd2595ed" + sha256 cellar: :any_skip_relocation, big_sur: "920301191fb40b3f036e5d08175f829e512f9e6df63760cdc389a12a7c01429f" + sha256 cellar: :any_skip_relocation, catalina: "a0d28e1679ea480a87fa8deeae9f3378f18322d6f3062d4a0f0dd71dbe5c6469" + sha256 cellar: :any_skip_relocation, arm64_linux: "902b4bafa9a15233ccd8f67815f447bb38700e85b5883bf310a37b6419d4dbbb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "402a852e03ce83de0813d1775222f02e1fd4a52e13ce6757bd16a3adda0688fa" + 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/formula-patches/219cf2f/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 + + # Force use of native ptsname_r(), to work around a weird XCode issue on 10.13 + ENV.append_to_cflags "-DHAVE_PTSNAME_R=1" if OS.mac? && MacOS.version == :high_sierra + 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..bca0b9e7cefa8 --- /dev/null +++ b/Formula/s/shellshare.rb @@ -0,0 +1,25 @@ +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" + + 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..d33c130aded7a --- /dev/null +++ b/Formula/s/shellspec.rb @@ -0,0 +1,44 @@ +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" + + 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..7c12cf4c095e7 --- /dev/null +++ b/Formula/s/shelltestrunner.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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..9c90b559e011e --- /dev/null +++ b/Formula/s/shellz.rb @@ -0,0 +1,34 @@ +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_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, mojave: "d5a64a93fe05d1560dacb91290a5f77321d01872a8b4eb413823eadb92c74044" + 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..616658a866ecf --- /dev/null +++ b/Formula/s/shepherd.rb @@ -0,0 +1,67 @@ +class Shepherd < Formula + desc "Service manager that looks after the herd of system services" + homepage "https://www.gnu.org/software/shepherd/" + url "https://ftp.gnu.org/gnu/shepherd/shepherd-1.0.4.tar.gz" + mirror "https://ftpmirror.gnu.org/shepherd/shepherd-1.0.4.tar.gz" + sha256 "13306a6b56dfe252464e84a23c23a7234338cc752c565e1b865f7cbf8a03f0cf" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "0e77cd94045e538a8377a54f6bbbe67c0a34cc5e81cd8d673c77fd2230761c1a" + sha256 arm64_sonoma: "0e77cd94045e538a8377a54f6bbbe67c0a34cc5e81cd8d673c77fd2230761c1a" + sha256 arm64_ventura: "0e77cd94045e538a8377a54f6bbbe67c0a34cc5e81cd8d673c77fd2230761c1a" + sha256 sonoma: "c5e9efa74d96feaec6b21cb3e0d02ec4ecd81aabca71dc98f38e5533d905a040" + sha256 ventura: "c5e9efa74d96feaec6b21cb3e0d02ec4ecd81aabca71dc98f38e5533d905a040" + sha256 arm64_linux: "7e7957d6d4b3077679f4ed9ed819ed41459658e8fc20cda9198ee6435ef32eb4" + sha256 x86_64_linux: "e420d97cd462631adf4e0088251a3ea3efc1804b24cd16ebc2d012fcdc40d993" + 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/sherlock.rb b/Formula/s/sherlock.rb new file mode 100644 index 0000000000000..63cb1fd0b3c48 --- /dev/null +++ b/Formula/s/sherlock.rb @@ -0,0 +1,115 @@ +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/0a/95/b4f7a399c43d1d57a703ddf08513411bbb0bfc6bbaabab7ad4e2c534bba7/sherlock_project-0.15.0.tar.gz" + sha256 "1ae2ef98a0d482039ff00743e702f28ddf4a0d6260b0fbc2579d680469874910" + license "MIT" + head "https://github.com/sherlock-project/sherlock.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d0a2c6ae47e5d3391640067caee4469d69392912f6b9530b4dcfb214931739bf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0bd9c312722b023cef80727d0d04fdc93ea873fe6e1f1be5f227043b9fc0a993" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bee52eaddd8ff1343a2492973124ebd446d97c244c0dc5fdf918622bd46a0654" + sha256 cellar: :any_skip_relocation, sonoma: "e099213deecf92bc33dacab6de0116557f0de88040e28b8a267ced36d145c976" + sha256 cellar: :any_skip_relocation, ventura: "fe46918102a66ef86fc84fbe0552392f4539726260cce77470892d3927050f6e" + sha256 cellar: :any_skip_relocation, arm64_linux: "d2e30faf82ba4007adfdeddb7fe05abd640a14178eab599c28f8c525685f9b0f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d7b9490e6049387495279cb2ca034791f732844af46231a352ff0c5973d08306" + end + + depends_on "cmake" => :build + depends_on "certifi" + depends_on "numpy" + depends_on "python@3.13" + + on_linux do + depends_on "patchelf" => :build + 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 "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/3d/5d/0413a31d184a20c763ad741cc7852a659bf15094c24840c5bdd1754765cd/et_xmlfile-1.1.0.tar.gz" + sha256 "8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c" + 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/9c/d6/9f8431bacc2e19dca897724cd097b1bb224a6ad5433784a44b587c7c13af/pandas-2.2.3.tar.gz" + sha256 "4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667" + 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/3a/31/3c70bf7603cc2dca0f19bdc53b4537a797747a58875b552c8c413d963a3f/pytz-2024.2.tar.gz" + sha256 "2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "requests-futures" do + url "https://files.pythonhosted.org/packages/f3/07/9140eb28a74f5ee0f256b8c99981f6d21f9f60af5721ca694176fd080687/requests-futures-1.0.1.tar.gz" + sha256 "f55a4ef80070e2858e7d1e73123d2bfaeaf25b93fd34384d8ddf148e2b676373" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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/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 + + def install + 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..7c4f4f93b6a0e --- /dev/null +++ b/Formula/s/shfmt.rb @@ -0,0 +1,40 @@ +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.11.0.tar.gz" + sha256 "69aebb0dd4bf5e62842c186ad38b76f6ec2e781188cd71cea33cb4e729086e94" + license "BSD-3-Clause" + head "https://github.com/mvdan/sh.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86443c9bdac7eb362c1f37111b65c5571ac9c1ff3af9cc400fa21339638df3d7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "86443c9bdac7eb362c1f37111b65c5571ac9c1ff3af9cc400fa21339638df3d7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "86443c9bdac7eb362c1f37111b65c5571ac9c1ff3af9cc400fa21339638df3d7" + sha256 cellar: :any_skip_relocation, sonoma: "30ebd6b438e9bb454607def57433c30bfecff1e409f9715e8c568393b4804001" + sha256 cellar: :any_skip_relocation, ventura: "30ebd6b438e9bb454607def57433c30bfecff1e409f9715e8c568393b4804001" + sha256 cellar: :any_skip_relocation, arm64_linux: "8b809496358ce36789fc7bceed6f207228fae5a60e65c14d0bfb742ce50a52e0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3cf55cb5df6f5ba0b8bdbb9a734dbae95f110080b87909b2698f0ffa6d0d7912" + 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..b84e468cca923 --- /dev/null +++ b/Formula/s/shibboleth-sp.rb @@ -0,0 +1,72 @@ +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 + + bottle do + 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/shivavg.rb b/Formula/s/shivavg.rb new file mode 100644 index 0000000000000..efcb81bb84e2e --- /dev/null +++ b/Formula/s/shivavg.rb @@ -0,0 +1,53 @@ +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" + + bottle do + 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, mojave: "6ddd7a34be8f7650a001df8b4ad627d574ac2c14e71d239a5a263d1848b12149" + sha256 cellar: :any, high_sierra: "bea07d86639a8d24f90324552ed1880fd6a162141a394338e0ad2a81a3abeb5f" + sha256 cellar: :any, sierra: "f92bdb7b86632d7bf59d25259e26eece00e502759dd52adaac7495424290da4a" + sha256 cellar: :any, el_capitan: "3e9de2887110c90051ad5b89080f62cd5990ae39f8fdef02a4c50ba11e413ca8" + 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..884717641e542 --- /dev/null +++ b/Formula/s/shmcat.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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, mojave: "e052a4f6b21407c032c1ee5a79fe9b1c08e78b7980c1cd3d6bfbfa8ffe639a58" + sha256 cellar: :any_skip_relocation, high_sierra: "ff73e6df8b663b4f382098ce75a9ec4634d4658c5378b3ad122de135e30d44ab" + sha256 cellar: :any_skip_relocation, sierra: "5ee7bcafe69d653421e29b56cf2e48a55874dc1e092e817a83cb446cda4acf01" + sha256 cellar: :any_skip_relocation, el_capitan: "1b6ddaf528253df2e2d5b93e97b6f4ade717ff8f3f6bcf829ed7cf9d9e682539" + 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..7a510b360f6a7 --- /dev/null +++ b/Formula/s/shml.rb @@ -0,0 +1,25 @@ +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" + + 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..b6daac30dcac0 --- /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" + + bottle do + 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, mojave: "e433bd14622d3f77a35042649d0d73e888b164ab4f04431864fb68c9ec64b62c" + sha256 cellar: :any_skip_relocation, high_sierra: "bc38ad3a6feddd116edd9d3ab00ac18bc6663d08b9d111414975bdd1543d1b79" + sha256 cellar: :any_skip_relocation, sierra: "13f8831248e646784dd3cefd82707c45966ea05528e0c836156dea98b9c8c870" + 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..b7888e8853594 --- /dev/null +++ b/Formula/s/shntool.rb @@ -0,0 +1,43 @@ +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 + + bottle do + rebuild 2 + 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, mojave: "8f318573fa965da7dc5fcff667f2f9ee3295e2034a6c877a9d182459f08308f8" + 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..832533526c915 --- /dev/null +++ b/Formula/s/shodan.rb @@ -0,0 +1,94 @@ +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 3 + head "https://github.com/achillean/shodan-python.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "d39256af014bfbe3904bfc6bc4874fc6e86c978f0825350bc366516e3b5f9882" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/5f/1d/45434f64ed749540af821fd7e42b8e4d23ac04b1eda7c26613288d6cd8a8/click-plugins-1.1.1.tar.gz" + sha256 "46ab999744a9d831159c3411bb0c79346d94a444df9a3a3742e9ed63645f264b" + 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/9d/db/3ef5bb276dae18d6ec2124224403d1d67bccdbefc17af4cc8f553e341ab1/filelock-3.16.1.tar.gz" + sha256 "c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435" + 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/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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "xlsxwriter" do + url "https://files.pythonhosted.org/packages/a6/c3/b36fa44a0610a0f65d2e65ba6a262cbe2554b819f1449731971f7c16ea3c/XlsxWriter-3.2.0.tar.gz" + sha256 "9977d0c661a72866a61f9f7a809e25ebbb0fb7036baa3b9fe74afcfca6b3cb8c" + 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", shells: [:fish, :zsh], 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/showcert.rb b/Formula/s/showcert.rb new file mode 100644 index 0000000000000..8a8f75e1df890 --- /dev/null +++ b/Formula/s/showcert.rb @@ -0,0 +1,50 @@ +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/73/3b/c12cf95dee088c8edfa5ae6ccff5866f2e8e179b5c7bb482282a3da967a7/showcert-0.3.3.tar.gz" + sha256 "bad2e4dacccc3cc448989249b433fd8e7072a31a53b07d0ea052fea8082bf483" + license "MIT" + head "https://github.com/yaroslaff/showcert.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d61e6c0796b64151868481aa13a1b4842df867a3c48df2ae7a25b77355bc7afa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d61e6c0796b64151868481aa13a1b4842df867a3c48df2ae7a25b77355bc7afa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d61e6c0796b64151868481aa13a1b4842df867a3c48df2ae7a25b77355bc7afa" + sha256 cellar: :any_skip_relocation, sonoma: "d679947d8db84b21361a246b5cc297cb12d6be781b10a6fdd2b240dd576a7689" + sha256 cellar: :any_skip_relocation, ventura: "d679947d8db84b21361a246b5cc297cb12d6be781b10a6fdd2b240dd576a7689" + sha256 cellar: :any_skip_relocation, arm64_linux: "d74b7b5d28fc85eab96106abcd9b4c163bda93abec72f2a6d0a3b6c0714015a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d61e6c0796b64151868481aa13a1b4842df867a3c48df2ae7a25b77355bc7afa" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + 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/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + 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..6b3a102cbd79d --- /dev/null +++ b/Formula/s/showkey.rb @@ -0,0 +1,53 @@ +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" + + livecheck do + url :homepage + regex(/showkey[._-]v?(\d+(?:\.\d+)+)/i) + end + + bottle do + 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..723cbcb54339c --- /dev/null +++ b/Formula/s/shpotify.rb @@ -0,0 +1,21 @@ +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: "master" + + 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..96d3629945c90 --- /dev/null +++ b/Formula/s/shtool.rb @@ -0,0 +1,36 @@ +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" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9a07b590184786375b1faecf0b3cc9cdd24c17b88eae56888a5aa115ce3242a4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dca989d435af4e89422e5d3290d90075732d2ec3daf671c95a30eba9a91aa653" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6f5de9d85e4a603a10f6a5807bfe6a917d7f18360206524091d5abadbdf45e3b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "6f5de9d85e4a603a10f6a5807bfe6a917d7f18360206524091d5abadbdf45e3b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7d8d8aad608219d2b3339f2b629140a52526992ca1d68e0a2a31f3764adc1237" + sha256 cellar: :any_skip_relocation, sonoma: "9e4781441bddb75b099fe9b56b8b04222a18bcdd495a64828c576af7a5f865b3" + sha256 cellar: :any_skip_relocation, ventura: "39f3d1b2dc2807881f83ea84746b5fe4bc8c08469998d8c731da0137eb0a9461" + sha256 cellar: :any_skip_relocation, monterey: "39f3d1b2dc2807881f83ea84746b5fe4bc8c08469998d8c731da0137eb0a9461" + sha256 cellar: :any_skip_relocation, big_sur: "3b414c1d021d5c209412a8162722017490d3566176272e00340a249ba06adf4e" + sha256 cellar: :any_skip_relocation, catalina: "e2f7c7a3b0b39b0b9d161e503310b09443cc8e4dc5283dce371afa0b4d87094a" + sha256 cellar: :any_skip_relocation, mojave: "7d9087a21cd6724aa82694ceca768d3044d5ab854c5ba95ae04146b3b83c2bf5" + sha256 cellar: :any_skip_relocation, high_sierra: "fc22505f6424dece01dcdee55907eebcb490a299763f2f217511fa14c5927711" + sha256 cellar: :any_skip_relocation, sierra: "172a4e2c133efcc6235aa3901bbc89ea11c48cfa70833fe67801240236d1757d" + sha256 cellar: :any_skip_relocation, el_capitan: "17dcf1289dd178b75b670d8061d54e4b2004feeb7de0d9e1ea43ffb46220e4fd" + sha256 cellar: :any_skip_relocation, arm64_linux: "b28df54f6be434a134aea29f860a21ee228603c047e091efed4a90a87b83ff13" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08f697c85512b71c0e002ce1db265280f5ddf766de012e80f82701e1e0272879" + 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..a0ef693e6e84f --- /dev/null +++ b/Formula/s/shtools.rb @@ -0,0 +1,52 @@ +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_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..66fcfc93f008e --- /dev/null +++ b/Formula/s/shub.rb @@ -0,0 +1,109 @@ +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 3 + head "https://github.com/scrapinghub/shub.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "0cea595fe66d39bcb4b5f126ed56346c61f61ebfaaa7a7cbd7017066c243b235" + sha256 cellar: :any, arm64_sonoma: "5cc4b333e1a171c8c3a31aa49261d428d1738fb093c330770bdc10a95fc402fc" + sha256 cellar: :any, arm64_ventura: "308840cf7ab276f6909bec7249c00f4dc9cd5f06710f74bddb05bfe7ed4fd686" + sha256 cellar: :any, sonoma: "0d35a8f176940d2c2dcd0b2c8018df67f95f79da64fd4e394f744634c9c6f104" + sha256 cellar: :any, ventura: "0c535ce0c135f082d48f8b1d2e64c4d21367ad3c1254d860bcc760eb75b385cd" + sha256 cellar: :any_skip_relocation, arm64_linux: "c52edef3670e58b0b7e3919a2fcadb35d6c9b519c878692455a4773b106f9d83" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96a0e55e1423acf2a5fa66a83f2d8e15b28e4140804097e1bfd22b42dcd43320" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + 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 "retrying" do + url "https://files.pythonhosted.org/packages/ce/70/15ce8551d65b324e18c5aa6ef6998880f21ead51ebe5ed743c0950d7d9dd/retrying-1.3.4.tar.gz" + sha256 "345da8c5765bd982b1d1915deb9102fd3d1f7ad16bd84a9700b85f64d24e8f3e" + end + + resource "scrapinghub" do + url "https://files.pythonhosted.org/packages/a4/5e/83f599af82e467a804da77824e2301ff253c6251c31ac56d0f70bac9e9ce/scrapinghub-2.4.0.tar.gz" + sha256 "58b90ba44ee01b80576ecce45645e19ca4e6f1176f4da26fcfcbb71bf26f6814" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"shub", shells: [:fish, :zsh], 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..0c59200b915cb --- /dev/null +++ b/Formula/s/shuffledns.rb @@ -0,0 +1,30 @@ +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_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, 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..3992267725712 --- /dev/null +++ b/Formula/s/shunit2.rb @@ -0,0 +1,20 @@ +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" + + 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..a1a8c335c67fd --- /dev/null +++ b/Formula/s/shush.rb @@ -0,0 +1,31 @@ +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_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, 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.rb b/Formula/s/shuttle.rb new file mode 100644 index 0000000000000..826bc7580b65d --- /dev/null +++ b/Formula/s/shuttle.rb @@ -0,0 +1,51 @@ +class Shuttle < 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_sequoia: "414eba11f78301d309539025b2a9bee382861c85a6ffb60a8d6088eccf49f309" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "414eba11f78301d309539025b2a9bee382861c85a6ffb60a8d6088eccf49f309" + sha256 cellar: :any_skip_relocation, arm64_ventura: "414eba11f78301d309539025b2a9bee382861c85a6ffb60a8d6088eccf49f309" + sha256 cellar: :any_skip_relocation, sonoma: "bc4f871490cdf6db9bf94893d38fec42bcf43c112551bd5be81a0a0881208467" + sha256 cellar: :any_skip_relocation, ventura: "bc4f871490cdf6db9bf94893d38fec42bcf43c112551bd5be81a0a0881208467" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c99e855c6690a5fbe1c25e42989b914ecd974f185c6229d83796dae55ad870f7" + 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(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..a6db3c2ab2bfe --- /dev/null +++ b/Formula/s/shyaml.rb @@ -0,0 +1,49 @@ +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 5 + sha256 cellar: :any, arm64_sequoia: "74bc7e9c8716937a88a39c1ad327023297d5f1f55521507be77a43b712ef3d9d" + sha256 cellar: :any, arm64_sonoma: "e4b9e31f5026c754f694089a0059eb993905c85d0bbce454b7a0e7f552888dd8" + sha256 cellar: :any, arm64_ventura: "4f7b53eccdb86bdc42971decbb322d3a969b2528f2e298953310d2f8ca230252" + sha256 cellar: :any, sonoma: "e3fe6328da696bafa084bba416ad7ca30b5f311ec4730a55d5a1fd22c65bad2d" + sha256 cellar: :any, ventura: "f2877c8235ebc0aeec10fc8b0ccd10d8578688b2b04737f8266a403c9985da46" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee58b3aa018ac1608838d0622c45f4c19440b1eadbc7c037c292f995efc272ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1a82e1b77d8ad4f34f75ee3f1876aeff1e1dfc6d90bb4602627f5d6c6b0d7107" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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..4f1215a513a55 --- /dev/null +++ b/Formula/s/sic.rb @@ -0,0 +1,32 @@ +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", branch: "master", using: :git + + livecheck do + url "https://dl.suckless.org/tools/" + regex(/href=.*?sic[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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..03a830a3b36f5 --- /dev/null +++ b/Formula/s/sickchill.rb @@ -0,0 +1,393 @@ +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" + + bottle do + rebuild 3 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "28d478603886e055efbf6c8ed3fc3a3621d8cb22dd492f820c7c7c82ff8ed453" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ef3380b5469750c0d285f5a51ef0097521fa94453e009972a6549681e7336d0b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a61a55aabc508e7f92b6630078aea3a7591d788059284021de11f159af38800a" + sha256 cellar: :any_skip_relocation, sonoma: "38266689c4df94bf786c7f877e4b373864ac8a8ec3c1cfcb4e40765ed5c251f4" + sha256 cellar: :any_skip_relocation, ventura: "4ea543a600a09a8de84d1c9639026432a5a7d6af09228eead70e18fee2337d00" + sha256 cellar: :any_skip_relocation, arm64_linux: "fad7fb5d4b006ef8faefff1947c28aada5aa634a6ae16a4bb120e25dcc100ed4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9eeff62df6480a7f4e7e495b3fe623bdae3d6d409d20c25f0098c8a77446b653" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + 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/4b/d3/6f4047d1de55b7a290ef8d4b4ebf59dcc24742920ebbed0909f823424205/beautifulsoup4-4.13.0.tar.gz" + sha256 "b6e5afb3a2b1472c8db751a92eabf7834e5c7099f990c5e4b35f1f16b60bae64" + 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/b7/a4/3390ac4dfa1773f661c8780368018230e8207ec4fd3800d2c0c3adee4456/cachecontrol-0.14.2.tar.gz" + sha256 "7d47d19f866409b98ff6025b6a0fca8e4c791fb31abbd95f622093894ce903a2" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "cinemagoer" do + url "https://files.pythonhosted.org/packages/06/de/3aa6eb738b5c5e39f1909bc080a392842841f9af866edb960de2f22af53c/cinemagoer-2023.5.1.tar.gz" + sha256 "5ce1d77ae6546701618f11e5b1556a19d18edecad1b6d7d96973ec34941b18f2" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/66/0c/8d907af351aa16b42caae42f9d6aa37b900c67308052d10fdce809f8d952/decorator-5.1.1.tar.gz" + sha256 "637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330" + 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/cb/b7/2fa37f52b4f38bc8eb6d4923163dd822ca6f9e2f817378478a5de73b239e/dogpile_cache-1.3.4.tar.gz" + sha256 "4f0295575f5fdd3f7e13c84ba8e36656971d1869a2081b4737ec99ede378a8c0" + 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/2f/ff/df5fede753cc10f6a5be0931204ea30c35fa2f2ea7a35b25bdaf4fe40e46/greenlet-3.1.1.tar.gz" + sha256 "4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467" + 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 "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/0a/46/0002b0291e18cb5aa37a31ed5566f7a880f05198f60fda83d699b65e3a70/jsonrpclib-pelix-0.4.3.3.tar.gz" + sha256 "c494fe7100b1139b1311469c28bc32d1cb92e4ff1f4511fb71d6807205dc3773" + 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/e7/6b/20c3a4b24751377aaa6307eb230b66701024012c29dd374999cc92983269/lxml-5.3.0.tar.gz" + sha256 "4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f" + end + + resource "mako" do + url "https://files.pythonhosted.org/packages/5f/d9/8518279534ed7dace1795d5a47e49d5299dd0994eed1053996402a8902f9/mako-1.3.8.tar.gz" + sha256 "577b97e414580d3e088d47c2dbbe9594aa7a5146ed2875d4dfa9075af2dd3cc8" + end + + resource "markdown2" do + url "https://files.pythonhosted.org/packages/44/52/d7dcc6284d59edb8301b8400435fbb4926a9b0f13a12b5cbaf3a4a54bb7b/markdown2-2.5.3.tar.gz" + sha256 "4d502953a4633408b0ab3ec503c5d6984d1b14307e32b325ec7d16ea57524895" + 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 "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/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz" + sha256 "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/b2/35/80cf8f6a4f34017a7fe28242dc45161a1baa55c41563c354d8147e8358b2/pbr-6.1.0.tar.gz" + sha256 "788183e382e3d1d7707db08978239965e8b9e4e5ed42669bf4758186734d5f24" + 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/7a/63/af072aadbb7fb643588e41dd8b434ee47238fcb15f04976101fae38b1b12/putio.py-8.7.0.tar.gz" + sha256 "ecfbedeada74a2c7540a665c4d5b9bb147b32fbdb90c40149e65b3786f0e7300" + 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/5f/57/df1c9157c8d5a05117e455d66fd7cf6dbc46974f832b1058ed4856785d8a/pytz-2025.1.tar.gz" + sha256 "c2db42be2a2518b28e65f9207c4d05e6ff547d1efa4086469ef855e4ab70178e" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/92/ec/089608b791d210aec4e7f97488e67ab0d33add3efccb83a056cbafe3a2a6/setuptools-75.8.0.tar.gz" + sha256 "c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6" + 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 "sqlalchemy" do + url "https://files.pythonhosted.org/packages/3b/20/93ea2518df4d7a14ebe9ace9ab8bb92aaf7df0072b9007644de74172b06c/sqlalchemy-2.0.37.tar.gz" + sha256 "12b28d99a9c14eaf4055810df1001557176716de0167b91026e648e65229bffb" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/4a/e9/4eedccff8332cc40cc60ddd3b28d4c3e255ee7e9c65679fa4533ab98f598/stevedore-5.4.0.tar.gz" + sha256 "79e92235ecb828fe952b6b8b0c6c87863248631922c8e8e0fa5b17b232c4514d" + 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/59/45/a0daf161f7d6f36c3ea5fc0c2de619746cc3dd4c76402e9db545bd920f63/tornado-6.4.2.tar.gz" + sha256 "92bad5b4746e9879fd7bf1eb21dce4e3fc5128d71601f80005afa39237ad620b" + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + 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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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/50/05/51dcca9a9bf5e1bce52582683ce50980bcadbc4fa5143b9f2b19ab99958f/xmltodict-0.14.2.tar.gz" + sha256 "201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553" + 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 + begin + port = free_port.to_s + + pid = fork do + exec bin/"sickchill", "--port", port, "--datadir", testpath, "--nolaunch" + end + sleep 30 + ensure + Process.kill("TERM", pid) + Process.wait(pid) + end + assert_path_exists testpath/"config.ini" + assert_path_exists testpath/"sickchill.db" + end +end diff --git a/Formula/s/sickle.rb b/Formula/s/sickle.rb new file mode 100644 index 0000000000000..7495ee2fe88e6 --- /dev/null +++ b/Formula/s/sickle.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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, mojave: "dc6b4eea0f8da0b1611e12197157c9985c931567d466e3a47f89250a8180b879" + sha256 cellar: :any_skip_relocation, high_sierra: "3aeaaa4393148876cc55cc9defbe82ae0fe0dabea18e418413b2aa8cff23dd0b" + sha256 cellar: :any_skip_relocation, sierra: "844b063d1496d2a7c7f8a12b2239ae32766a538557d44f712c584a30b9775fae" + sha256 cellar: :any_skip_relocation, el_capitan: "138b38a20aefc55ec4005ee4c4622ec332cbb13ff4ebc39ff45d91a2c12afde8" + 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..6d91757651d4d --- /dev/null +++ b/Formula/s/sidekick.rb @@ -0,0 +1,31 @@ +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" + + bottle do + 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, 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..cc54ea8fc990c --- /dev/null +++ b/Formula/s/siege.rb @@ -0,0 +1,69 @@ +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_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..3de0eeff6f484 --- /dev/null +++ b/Formula/s/sigi.rb @@ -0,0 +1,32 @@ +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_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..995f573dca545 --- /dev/null +++ b/Formula/s/sigma-cli.rb @@ -0,0 +1,127 @@ +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" + head "https://github.com/SigmaHQ/sigma-cli.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c6d78dd65c011cb02aad6b5140ead7eb5124ab4fbea369a5dce122d712f0b0b8" + sha256 cellar: :any, arm64_sonoma: "85115656c19613d735ae5de03c79f29a6694557fc75345cf7837e0bb9b1eb370" + sha256 cellar: :any, arm64_ventura: "f557b8b18a5a768b8487c95dba2cd7485da195e066799dd1e264abdf6852e2ea" + sha256 cellar: :any, sonoma: "efa50f65d990ffcefab35f0d6737005e68c0f1af2c7665c1d561787636461cc1" + sha256 cellar: :any, ventura: "6cfc1bcc24a6cde2db104e34851a74a8a0ba94f59da2467b04cbca3c743314e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "c23d4b7585b43e08f540e29cc3a85517df5d3e265ad51e62f3f2dad811ce0989" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1bcc12dc6e12bb856e8986ce5e4dd4d1cb6e062dc0b807fd8889a3b530843bde" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + conflicts_with "open-simh", because: "both install `sigma` binaries" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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 "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 "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/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + end + + resource "pysigma" do + url "https://files.pythonhosted.org/packages/a4/41/1c37926a1aa6ab4d59fb85bad22940ae02db60239bb549c72cef17151e0c/pysigma-0.11.21.tar.gz" + sha256 "41f25ab8f5dcdcc51cdbae4b0ca4f5ffa36b9d1f8bcb9166f6b6a4fecbb24ee2" + 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/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 "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"sigma", shells: [:fish, :zsh], 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..615059bb1410d --- /dev/null +++ b/Formula/s/signal-cli.rb @@ -0,0 +1,83 @@ +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.14.tar.gz" + sha256 "7d44e71a8c4f2087057e8ce401d416d963a62b9819a75884f3c426b28af8a947" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "091f552478e2e504bfc6424991d0e2b7cdeb4021581723c0634fab9ad81641ea" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed2d7e7033a16a0a07279d3c9a8b43650767f085b3750a1c96a6bcead71b2730" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a9048424260dbe7a5cf827f3deb4258ab44bc7cdbcba664ca0a873e6fcea2d76" + sha256 cellar: :any_skip_relocation, sonoma: "231ec9f4c31b0752179c5c1337acf1175e8eb23023040f1ebe5f487aa889c8a8" + sha256 cellar: :any_skip_relocation, ventura: "48088e637526d484e84dfc1df6a23a68abd8109d840d3bbb4574c5ce282fa1c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a8fbaa6d6f83eb4af4ad97e7bff6a9dc777879dc651b0a8c4c4d28e84b485c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63887767ad751ca9f2a16e3f0eb64f1d44eca4a3db4f458205a3881c90d127df" + 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 + + # 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.68.1.tar.gz" + sha256 "bc5b78d6c4cd5e2c47d24ea9c41b1047cdead0d315c6a48a1daece03eb449eb5" + 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 + + # rm originally-embedded libsignal_jni lib + system "zip", "-d", libsignal_client_jar, "libsignal_jni_*.so", "libsignal_jni_*.dylib", "signal_jni_*.dll" + + # build & embed library for current platform + 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 + # test 1: checks class loading is working and version is correct + output = shell_output("#{bin}/signal-cli --version") + assert_match "signal-cli #{version}", output + + # test 2: ensure crypto is working + 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..eef0995bc4c42 --- /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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "842a6fb535ce56db38ca545fd229f184850e34211c7817879f707f71fe6b31d0" + sha256 cellar: :any_skip_relocation, high_sierra: "cdb1896e5e480edfb6ad7f179d9a2b217cda774039fcf5922bc3eba9b6d3d1bb" + sha256 cellar: :any_skip_relocation, sierra: "fdac23b07368d6c8ebad06c2b8451f0c8228f71f5c65b48d672cfd581b222509" + 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..e11daa42f0179 --- /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.8.tar.gz" + sha256 "3d08c9b0fbe6c6bcd8240ff0a65121ace0413f30abdd40068930509abc84e4ba" + license "MIT" + head "https://github.com/signmykeyio/signmykey.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "13f42dcc050c7a1c8f4284603c2b9cf51fc0fdfeec5a59a9c6cc7973fe4a4b4c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "13f42dcc050c7a1c8f4284603c2b9cf51fc0fdfeec5a59a9c6cc7973fe4a4b4c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "13f42dcc050c7a1c8f4284603c2b9cf51fc0fdfeec5a59a9c6cc7973fe4a4b4c" + sha256 cellar: :any_skip_relocation, sonoma: "a7f9f2972ad442c06ad29a0102bc6a40ba0f9321d90c8cc2f02ea3665d4e71fd" + sha256 cellar: :any_skip_relocation, ventura: "a7f9f2972ad442c06ad29a0102bc6a40ba0f9321d90c8cc2f02ea3665d4e71fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6d80a2c91ff6d9fa7e8d95b5a05c7e072380c8fc10e167ee0fd6dc68faeb4aaa" + 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..88faa6c3de204 --- /dev/null +++ b/Formula/s/sigrok-cli.rb @@ -0,0 +1,57 @@ +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 + + bottle do + 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..0540c833f5472 --- /dev/null +++ b/Formula/s/sigstore.rb @@ -0,0 +1,225 @@ +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/0f/5e/0bc0a8d1a64dd24a794f29a45fe1af8fe5b86636dc919db19e87c733e95c/sigstore-3.6.2.tar.gz" + sha256 "ed3a9bd12fecbb9d1028baddc257abbc87548275755457a063f310e5c758baf6" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4037164c4c33a4580bdba50629feeae202bbf20df2fe543ad24c3fac537dfe32" + sha256 cellar: :any, arm64_sonoma: "9e115df358a9ef2bc82105f7c577b2f60abb4e78dda83d38e9d97c851513bb69" + sha256 cellar: :any, arm64_ventura: "25bdd22f5a892346947ce45b4e2dfc7f0a95f4a8c5f36529fb66f0861793a6dc" + sha256 cellar: :any, sonoma: "7efb6c0480b176617a728e1283181e96d5a76e2d5e95533853fd420d0852b968" + sha256 cellar: :any, ventura: "3968345be7cb9d1b21c60ee8bef6a5484a034ad88964da383247cfa594d90400" + sha256 cellar: :any_skip_relocation, arm64_linux: "6d3072c808ac3c4e47fff426ba98c6b2d3078134074550438dfc0f1fd337e100" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88db14f640001a6051ca40b09cc3a7101db24e5f7c85dd205700c141303e1869" + end + + depends_on "maturin" => :build # for rfc3161-client + depends_on "pkgconf" => :build # for rfc3161-client + depends_on "rust" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "openssl@3" # for rfc3161-client + depends_on "python@3.13" + + resource "annotated-types" do + url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz" + sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" + end + + resource "betterproto" do + url "https://files.pythonhosted.org/packages/45/43/4c44efd75f2ef48a16b458c2fe2cff7aa74bab8fcadf2653bb5110a87f97/betterproto-2.0.0b6.tar.gz" + sha256 "720ae92697000f6fcf049c69267d957f0871654c8b0d7458906607685daee784" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + 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 "grpclib" do + url "https://files.pythonhosted.org/packages/79/b9/55936e462a5925190d7427e880b3033601d1effd13809b483d13a926061a/grpclib-0.4.7.tar.gz" + sha256 "2988ef57c02b22b7a2e8e961792c41ccf97efc2ace91ae7a5b0de03c363823c3" + end + + resource "h2" do + url "https://files.pythonhosted.org/packages/1b/38/d7f80fd13e6582fb8e0df8c9a653dcc02b03ca34f4d72f34869298c5baf8/h2-4.2.0.tar.gz" + sha256 "c8a52129695e88b1a0578d8d2cc6842bbd79128ac685463b887ee278126ad01f" + 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 "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 "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 "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/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + 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 "pyopenssl" do + url "https://files.pythonhosted.org/packages/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rfc3161-client" do + url "https://files.pythonhosted.org/packages/6f/5b/8f37ccfd166d63ae5a45686984c59df2bf2ff720d1b27e2a14b1b5c0d2b0/rfc3161_client-1.0.1.tar.gz" + sha256 "1c951f3912b90c6d3f3505e644b74ee08543387253647b86459addbffb16f63f" + 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/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + end + + resource "securesystemslib" do + url "https://files.pythonhosted.org/packages/57/44/cc300cbd7f636534559d0e2a2ce6cae12f199dca7ba8dc1dec0018ed5fd3/securesystemslib-1.2.0.tar.gz" + sha256 "34fa63e3296a0540b122a13bf51722ecd015be00c1d2ed45b23442e718920e76" + end + + resource "sigstore-protobuf-specs" do + url "https://files.pythonhosted.org/packages/c0/31/f73764f96787b53dd14641b2cc02dc7f4a0586de35c020ab1ff9bb12e833/sigstore_protobuf_specs-0.3.2.tar.gz" + sha256 "cae041b40502600b8a633f43c257695d0222a94efa1e5110a7ec7ada78c39d99" + 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 "six" do + url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" + sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + end + + resource "tuf" do + url "https://files.pythonhosted.org/packages/25/b5/377a566dfa8286b2ca27ddbc792ab1645de0b6c65dd5bf03027b3bf8cc8f/tuf-6.0.0.tar.gz" + sha256 "9eed0f7888c5fff45dc62164ff243a05d47fb8a3208035eb268974287e0aee8d" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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..d2521422c09f6 --- /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.11.2/sigsum-go-v0.11.2.tar.bz2" + sha256 "70f448a4f4957fa2e5ceccbc3218f0fa59d00b9ea39f1541291f7d6bab3929df" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ab6ab52d604a1c0b8f27e0bad63db7c0793a4c3aa6dbec75e44cf3c378cc1fd2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ab6ab52d604a1c0b8f27e0bad63db7c0793a4c3aa6dbec75e44cf3c378cc1fd2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ab6ab52d604a1c0b8f27e0bad63db7c0793a4c3aa6dbec75e44cf3c378cc1fd2" + sha256 cellar: :any_skip_relocation, sonoma: "8cb45ba2074a1aeef473f1f9cb2dc05442eedcf79f5138fdcae5d7c0510ebb7b" + sha256 cellar: :any_skip_relocation, ventura: "8cb45ba2074a1aeef473f1f9cb2dc05442eedcf79f5138fdcae5d7c0510ebb7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e1b33b5897a959403b4fe1d9c4e4c9076ba45bda9eb59ffbe25284082a3fefa1" + 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..148bcfc3b1e7c --- /dev/null +++ b/Formula/s/sile.rb @@ -0,0 +1,222 @@ +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.12/sile-0.15.12.tar.zst" + sha256 "a3234111d56bb22f0cba2608954ec88df260eb4772f054ed29770912003ec8a0" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "eca1e70dd844c9facaedb981b388afb6a238fba2f953b60dcf82a9dc00daf0fb" + sha256 cellar: :any, arm64_sonoma: "336bc3d0f83537822e1b9613d0271246cb6f61a7e80b911f5aec23509662813c" + sha256 cellar: :any, arm64_ventura: "9776105f8da8dbefa26535ca9dd15ac771476b5a7a1d7320f038ddde52d79962" + sha256 cellar: :any, sonoma: "89d04ca5e3ec6e92e79959f9a16a329ad6b47db644932f75c2024f2d3d0396dc" + sha256 cellar: :any, ventura: "44367b55c868bd3659d507654a101812a2b4ea4876b9ff76bcef05aa8d27528d" + sha256 cellar: :any_skip_relocation, arm64_linux: "706444ee18db2eb49fe44044c9fbc170dd91180b3a80c5ab533658dcd03731b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "570ca957d702a09bb5901515a9216c72b2a770da6064bf8d5d276c1558fb3ad5" + 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.3-1.rockspec" + sha256 "16218188112c20e9afa9e9057f753d29d7affb10fe3fb2ac74cab17c6de9a030" + 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-1.src.rock" + sha256 "6637fcf4d3ddef7be490a2f0155bd2dcd053272d1bb78c015498709ef9fa75dd" + 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.2-2.rockspec" + sha256 "adc3e279ce67fb477ce7bf88cfb87607491d1c50d9c785b1567066c353f192f9" + 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-2.src.rock" + sha256 "f36affa14fb43e208a59f2e96d214f774b957bcd05d9c07ec52b39eac7f4a05d" + 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..8bbc844304cba --- /dev/null +++ b/Formula/s/silicon.rb @@ -0,0 +1,52 @@ +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_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 "rust" => :build + depends_on "fontconfig" + depends_on "freetype" + depends_on "harfbuzz" + + on_linux do + depends_on "pkgconf" => :build + 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..be0465bb595b2 --- /dev/null +++ b/Formula/s/silk.rb @@ -0,0 +1,61 @@ +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.23.5.tar.gz" + sha256 "58701cd3b7ceb951fb5cda9c241b171608036daab4bad4893f6882f4a29b1680" + 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_sequoia: "95e2f74ac394bb9327e6e54a9b60fa4a4f320f1b974c640898fea6689b42bac4" + sha256 arm64_sonoma: "861f979e9ca355c2bfcbfa383f1b052eaf98bf8550c8b8eccea603a7ca83db1c" + sha256 arm64_ventura: "ad2454feb3a3a60d32b8e889ad387fdc0408c84522dfe9af6c34cb32710d8c2b" + sha256 sonoma: "155ccf0867d12599b416cb34c00f1e082894cd43462b206a09a6ee8e0cab363d" + sha256 ventura: "f730eb216f5b4bf435000d1dfe1197a87c2f2ac4d25c3ff45e7f9d433b6760d4" + sha256 arm64_linux: "f13652d2d255490d21f8b4cac9f5da8f8e3aaf2c1d50032d6d3c000d53eaacfd" + sha256 x86_64_linux: "1b93547929821cca240e813162e1d6ff3066c4dd6df50060c027b59f33b6f6bb" + 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..47bfa013b66fd --- /dev/null +++ b/Formula/s/simdjson.rb @@ -0,0 +1,46 @@ +class Simdjson < Formula + desc "SIMD-accelerated C++ JSON parser" + homepage "https://simdjson.org/" + url "https://github.com/simdjson/simdjson/archive/refs/tags/v3.12.3.tar.gz" + sha256 "d0af071f2f4187d8b26b556e83ef832b634bd5feb4e2f537b9dabbd334d4e334" + license "Apache-2.0" + head "https://github.com/simdjson/simdjson.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3eb49356f9c6ccce46cdf627e8ebef557bdd1817776f8bdd3653bd4c92b8802d" + sha256 cellar: :any, arm64_sonoma: "7ec78445ccd839b7e8a11f6994561760d107464f157e82cfc049095438bfd5bd" + sha256 cellar: :any, arm64_ventura: "a9ca3f54731c3af437e7de669542e08bc41ad9898963e464a245a151368766aa" + sha256 cellar: :any, sonoma: "3f4509080df7f6a9bb9f6d1b67c766d3172765e0204fc4b694300e35371b1c73" + sha256 cellar: :any, ventura: "09043e27cafd7a7802e2220954f18f9a158e9991376d2fe2c0997546861a2b1a" + sha256 cellar: :any_skip_relocation, arm64_linux: "e15d466abaa6b3ebe4c2271aad04730811e432d1f1b9ef0adc6dd716bf1c4028" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2564b875d68a2b94647cdcc5c611a1ba8d75269313c673174119442fed5e6ea6" + 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..5fd19afec4856 --- /dev/null +++ b/Formula/s/simdutf.rb @@ -0,0 +1,55 @@ +class Simdutf < Formula + desc "Unicode conversion routines, fast" + homepage "https://simdutf.github.io/simdutf/" + url "https://github.com/simdutf/simdutf/archive/refs/tags/v7.0.0.tar.gz" + sha256 "5a166016ffb8af4cfda9e9d1efcd5613311a4f9e7aabd1f2e11043bcdf727bec" + 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_sequoia: "b3b261bc8e27e6197d6b24a8ed49a9eda13d7a87fb638b7a4e330e04d44352a5" + sha256 cellar: :any, arm64_sonoma: "d7d1eaf9fd5a8778e75d0c4e5197839e54d924261d07439d3214f1ea9d424828" + sha256 cellar: :any, arm64_ventura: "bb01579574ac56a5b14b3c964051d50e7b2b3a9b571d067b01ffb6af4ff04e84" + sha256 cellar: :any, sonoma: "95af84ead1e1c2ce43f96a745ba015d24b227e98a055d5ff24564de6549e175d" + sha256 cellar: :any, ventura: "9b18ed226c81c8829b1743ab67e6fd0ec7296dc2f66bfc1e4e14739c84a6953e" + sha256 cellar: :any_skip_relocation, arm64_linux: "22612118e95f41c2654abeca3b956fae8c63f0333924c46b500c746644ec939f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ff4f0b41a0e0d7e685b7be927ae8f6b18a24b90dd53446df6b8ad21cba89ff94" + end + + depends_on "cmake" => :build + depends_on "icu4c@77" + + uses_from_macos "python" => :build + + # VERSION=#{version} && curl -s https://raw.githubusercontent.com/simdutf/simdutf/v$VERSION/benchmarks/base64/CMakeLists.txt | grep -C 1 'VERSION' + resource "base64" do + url "https://github.com/aklomp/base64/archive/refs/tags/v0.5.2.tar.gz" + sha256 "723a0f9f4cf44cf79e97bcc315ec8f85e52eb104c8882942c3f2fba95acc080d" + 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..bb90cbd2a3350 --- /dev/null +++ b/Formula/s/simg2img.rb @@ -0,0 +1,37 @@ +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_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..3da519f323629 --- /dev/null +++ b/Formula/s/simgrid.rb @@ -0,0 +1,69 @@ +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 1 + + livecheck do + url :homepage + regex(/href=.*?simgrid[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "7729746a85f9411766323b3e08f526ac0b2a320dc1b43f2f1a047affd33b1834" + sha256 arm64_sonoma: "e774550064c55be057b8a02be6c97fb4755bcc96ed518f48e86a2a06f110de6a" + sha256 arm64_ventura: "c1106a2364c23a426f092e8dba68de4ed5c49ffa9f79221098d6daf5131f167d" + sha256 sonoma: "6113c9ce3f7b955d6fb7768a0fdd6550787547bd18cf625bdb70515229193b0a" + sha256 ventura: "fd493ba61db4d913bed0de8db44da341e6744ae78f20d3458c2d27094971940a" + sha256 arm64_linux: "759f64a8dbd6286b41e49af154aba2c9f4acd1b9ebff34dfddcf34e022b2356f" + sha256 x86_64_linux: "ae6cc2a41a6adf416328e3208b6f15f41ff4f3b50e8cf5cd282abe4336604305" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "boost" + depends_on "graphviz" + + uses_from_macos "python", since: :catalina + + 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/simh.rb b/Formula/s/simh.rb new file mode 100644 index 0000000000000..acc564ee5ea26 --- /dev/null +++ b/Formula/s/simh.rb @@ -0,0 +1,51 @@ +class Simh < Formula + desc "Portable, multi-system simulator" + homepage "http://simh.trailing-edge.com/" + url "https://github.com/simh/simh/archive/refs/tags/v3.12-2.tar.gz" + version "3.12.2" + sha256 "bd8b01c24e62d9ba930f41a7ae7c87bf0c1e5794e27ff689c1b058ed75ebc3e8" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1c035c21f19ee6b0418c5437901ae58c92f295db48755c0b17fed3e57359be4b" + sha256 cellar: :any, arm64_sonoma: "6a2f006ba70c8319a1eb4d8ece33be4a0a24e0f064d655bdf6f3d39209b586b8" + sha256 cellar: :any, arm64_ventura: "cc698568672a1c839e4bc5fe3005ab92d9369de3cf25f81be62c90084b2093a7" + sha256 cellar: :any, arm64_monterey: "4bbbfacf19e812a3f551b11c3dc6222b30cba2ff789d10b7a0d3431c1c7816f8" + sha256 cellar: :any, arm64_big_sur: "226b979de0b16040ceac8d43169acad561cc02de69fedbc3ce7608e08a8dcf99" + sha256 cellar: :any, sonoma: "21302618aa06d10ca20b67d0470892dc8951bcdcf6b29f7bfd65d00ef049d901" + sha256 cellar: :any, ventura: "8f872bb0008a36d6941b551827ecfae6563ddbaaa2853b390569599a991746d1" + sha256 cellar: :any, monterey: "a58a7539db5ac84a45dac55d1718b539435b4364b154922b1a12ea689f4f8a0e" + sha256 cellar: :any, big_sur: "009a1fd5617b4964e7548754c9047688b3ffbc86a6c5e3acf816ce8462a3489e" + sha256 cellar: :any, catalina: "260d5b0236efa26ea9846b5a64807afeb6dda6c0c308f84a4cd0f891a1fa76e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ff6b20047316c5efd516276d7029475379b026f43b446e1707e488cff52be10" + end + + # https://github.com/simh/simh/issues/1163 + # Use open-simh instead + disable! date: "2024-10-11", because: "changed to a non-free license in master branch", + replacement_formula: "open-simh" + + depends_on "libpng" + uses_from_macos "zlib" + + def install + ENV.deparallelize unless build.head? + ENV.append_to_cflags "-Os -fcommon" + 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/*"] + 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/s/simple-amqp-client.rb b/Formula/s/simple-amqp-client.rb new file mode 100644 index 0000000000000..f37fc82c6bcbb --- /dev/null +++ b/Formula/s/simple-amqp-client.rb @@ -0,0 +1,54 @@ +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 11 + head "https://github.com/alanxz/SimpleAmqpClient.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "87ae8527d44ded5a0dd914f42d21527a951a01b9e99861413d73bc5113dbe74f" + sha256 cellar: :any, arm64_sonoma: "842d4ae9462815803fc55eb6ab9bd046edd63814df21bdd450e570e61fa14dcd" + sha256 cellar: :any, arm64_ventura: "766942e45c1c85f8d93727b399a7caced4796226d67ee085b6bcf0c37a9a86b0" + sha256 cellar: :any, sonoma: "3692e9563b2f7eb144aa01de033003dacdfaefd9ae88a0bd5719c5519c430093" + sha256 cellar: :any, ventura: "386c44669e5e91bf2e33b954fe7d5abaf05e65c4f9329a36e1e5445f3d2bf106" + sha256 cellar: :any_skip_relocation, arm64_linux: "724aaaf2f46fb7bbcf4d949fc115328e0e9108ee895048b1baef8f8453f4877a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d7f97c240551cdd21573e0a00f66fd23b6275b21247e718a93c05ff4185e56ad" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "boost" + depends_on "rabbitmq-c" + + 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..11107d96775ca --- /dev/null +++ b/Formula/s/simple-mtpfs.rb @@ -0,0 +1,33 @@ +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" + + 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..ca139c40a9902 --- /dev/null +++ b/Formula/s/simple-obfs.rb @@ -0,0 +1,49 @@ +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 + + bottle do + 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, mojave: "7d00695065a2e780f6a93d98d3d2a96ebe4c02fe48e52e30cea4fefe353100e8" + sha256 cellar: :any, high_sierra: "08024887dc9fba3f56425181dd34dba1ecf185dad688b85d20a7b70ec07afbae" + sha256 cellar: :any, sierra: "831de4a180d61c801397ead63a0130d8d2eb102afb526ef81bcecb2f9d1d029b" + sha256 cellar: :any, el_capitan: "eccfcd8d4016297999d730fd185624b42e903f7dfac43bd6227c337c2b3aafea" + 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..8431bbfa7727b --- /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/46/simple-scan-46.0.tar.xz" + sha256 "c16e6590142fe563be5143122b3bbb53f6b00a7da9d952f61c47fa26f7b4f0a9" + license "GPL-3.0-or-later" + + bottle do + rebuild 1 + sha256 arm64_sequoia: "d9ee5af3be73580ad426781dfa25a40519e2c47bfe3587ea66d052e5e616fde8" + sha256 arm64_sonoma: "8ee479bab008f04c79439fff0b4983ee0332a803fcea3210084670a016d33440" + sha256 arm64_ventura: "12bcf57abadcc279db5ec1ee6d5e4200bd923b99441e9606d4d5f4956d313b9d" + sha256 sonoma: "c71ba4f70d2d512ee6195ae3164ef00994034581e3f370dead655ee418b87a3d" + sha256 ventura: "f47bad169d41838ee33e0a2e00dd791c1ff1cd48f8de2395ffafc3e0793f15d2" + sha256 arm64_linux: "4b07b69954306f03d6f77c41d58e078e185b0e35c13ad81f61c74f62ffcbf0ab" + sha256 x86_64_linux: "2cf9490d0d33b08c68a7c73a69fc78fb160a00f9c8a1bb593d084d53047ce12b" + 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..22b55f69c1174 --- /dev/null +++ b/Formula/s/simple-tiles.rb @@ -0,0 +1,67 @@ +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" + + bottle do + 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..1e05bba630c39 --- /dev/null +++ b/Formula/s/simutrans.rb @@ -0,0 +1,77 @@ +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" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "3b9fd4e6ba4309127af63b8b2235cc85692074421bd8439f58504c0da54bb6fa" + sha256 cellar: :any, arm64_sonoma: "fd96b3fea3664838f1904736407321b836c391f510fa0eec90799922466d66da" + sha256 cellar: :any, arm64_ventura: "3c284b3aee6632a0a09ad8589a8e25c96739f54c75b6c009ef59f6a105a8d2da" + sha256 cellar: :any, sonoma: "c685e4ac7e5896302331543c0d68d239d83f100be0d26e3ff5fffbb620d1a464" + sha256 cellar: :any, ventura: "0caad2fbd63d5f858309a3c33e422ab3b820a19de07abfad3582fddef20e2854" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe34f7c07cd37deb98e04284d86c493b6c4960ec34dccde334647113fbb2f86b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e46e0b9b4cfd60ddf8ba9f07ac9f80050712f7ecc416b607d63f8517cf248a94" + 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..e8fc4f8009f87 --- /dev/null +++ b/Formula/s/since.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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, mojave: "6c0290f3500966bb4155352bf277ae127eb341796729dfcc2b9ca968df20b9c4" + sha256 cellar: :any_skip_relocation, high_sierra: "a5b4f42858c41ad5d60850a3a01b8658fb4e58d2473fe2d36938f4ab66eb05c6" + sha256 cellar: :any_skip_relocation, sierra: "ff4ba4b7cad5fa4211bff04d5868521bc21b60995cf40f15bd507abb7c4cbaab" + sha256 cellar: :any_skip_relocation, el_capitan: "ec4898462899cb632329f71dc0b4dd9a13a051aafd6da7dfd22e940e9d1ce01a" + 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..00d906073e77d --- /dev/null +++ b/Formula/s/sing-box.rb @@ -0,0 +1,84 @@ +class SingBox < Formula + desc "Universal proxy platform" + homepage "https://sing-box.sagernet.org/" + url "https://github.com/SagerNet/sing-box/archive/refs/tags/v1.11.10.tar.gz" + sha256 "b79281cbe1a9585bf53855ebc9513ccf2fe772983c4926554389ba0f5598da3e" + 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_sequoia: "b8be95135471213f4a1bdb618db32fcedbe9669a5d41bc1e8fab464663b0f011" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "af884d2ad8bb086d6380da158c6bcf84d20b156c92a8bcdf4c8cc41ccb7e8e6c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "60a66098bb4dcec863a39e6b97a53a7f5c34f657cf39fa80f539f9fe47d5187e" + sha256 cellar: :any_skip_relocation, sonoma: "3bc9658aa88c69f23655ff71e301c7077d0ec0e6461be8d294e99969a811a85a" + sha256 cellar: :any_skip_relocation, ventura: "c2fd3190c0b56e9ff177cbc6a7fec65ec3871514728efcf1bc9509c5d6728aa7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9a64106086c79c5d1b7adbcc44ec3a7a9c5ead4c20642adf2e65c171abb5c9b1" + end + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/sagernet/sing-box/constant.Version=#{version} -buildid=" + tags = "with_gvisor,with_quic,with_wireguard,with_utls,with_reality_server,with_clash_api" + system "go", "build", *std_go_args(ldflags:, tags:), "./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..83690d0d3ce55 --- /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.1.tar.gz" + sha256 "6a4fbaaed05b89c35bff3b1c5e124344a088097f81affe129c9ae619b282b49b" + 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_sequoia: "896fbb9eef9f94af1eaf50f0b9aa74349fa09c4af793afb5750191528d8abd2a" + sha256 arm64_sonoma: "f5af6764654d8eb0bc0d37ad92eb4604d89d0d6948b567207305a97b06131a9a" + sha256 arm64_ventura: "25dbec84237a3a91179bb8821cc467380db5e9a6afb0c527c1892df8e7cc953b" + sha256 sonoma: "fa44347fa78090b4159d95f152c2c1b44e139543366733e8999a7b7550a0993d" + sha256 ventura: "45495c62336592f855eb8ce7a6bfe65317d3ebb09ef283e7a44a7b514e43d2bc" + sha256 arm64_linux: "1c40c1d54986a5fe26d7b9be4c6ad059b910afb0289c145e4373c895526d74c4" + sha256 x86_64_linux: "6648ecbf457333344ef6c772f27c9dc60e54deff011f4c211ddb5b3a1fa9dcfd" + 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.13" + depends_on "readline" + + def install + system "./autogen.sh" if build.head? + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--with-python=#{which("python3.13")}", + "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/s/sip.rb b/Formula/s/sip.rb new file mode 100644 index 0000000000000..722ff7fcee9e5 --- /dev/null +++ b/Formula/s/sip.rb @@ -0,0 +1,86 @@ +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/62/9a/78122735697dbfc6c1db363627309eb0da7e44d8c05ba017b08666530586/sip-6.10.0.tar.gz" + sha256 "fa0515697d4c98dbe04d9e898d816de1427e5b9ae5d0e152169109fd21f5d29c" + license "BSD-2-Clause" + head "https://github.com/Python-SIP/sip.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f2ee78b3a93a1f0ae7469573129b6fc6cf2c940fdff3167fdccb8a5ec4c52e45" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f2ee78b3a93a1f0ae7469573129b6fc6cf2c940fdff3167fdccb8a5ec4c52e45" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f2ee78b3a93a1f0ae7469573129b6fc6cf2c940fdff3167fdccb8a5ec4c52e45" + sha256 cellar: :any_skip_relocation, sonoma: "66616e4055c5d84151c5f985b4fe76e6df1b73745199b904e7ac31fab60b2617" + sha256 cellar: :any_skip_relocation, ventura: "66616e4055c5d84151c5f985b4fe76e6df1b73745199b904e7ac31fab60b2617" + sha256 cellar: :any_skip_relocation, arm64_linux: "b5023f74a18936d667bd5899310ef260882732dfccfbcb477f2a791e34b4f06d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12654418be62fe1ac65a57450710c5f9b5166056859601786c458d0d4ad62424" + end + + depends_on "python@3.13" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/92/ec/089608b791d210aec4e7f97488e67ab0d33add3efccb83a056cbafe3a2a6/setuptools-75.8.0.tar.gz" + sha256 "c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6" + end + + def python3 + "python3.13" + 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..0a5f623404fa2 --- /dev/null +++ b/Formula/s/sipcalc.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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, mojave: "50bc96758ca5ecdb86fb29ca39bf07f6c4e44192310481436afccc191c6f2cd2" + sha256 cellar: :any_skip_relocation, high_sierra: "9cff165f5e2b98d0c7d4729d4d6309b679cae7d161996242c666053d37134640" + sha256 cellar: :any_skip_relocation, sierra: "1ccdaec0a816dde9f7caa0f7a77cd984ece78a61a5886032c4c8821915753482" + sha256 cellar: :any_skip_relocation, el_capitan: "56aa686252ac703ed3dbe91f5737ec4d4b95d52516f4ab52947df15b77d1c58f" + 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..a8fd0abbcc596 --- /dev/null +++ b/Formula/s/sipp.rb @@ -0,0 +1,41 @@ +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.3", + revision: "11b51748b274d24ac156ac40216600aca0f352a7" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b67239ee8180fef3d4128c100680e6cde65be5198a34386da091ffb4bc95d1ec" + sha256 cellar: :any, arm64_sonoma: "72ed9a5bc30b1850ff9fe02173c0a5fe08627845cfd2f2844b141ded1b8d221c" + sha256 cellar: :any, arm64_ventura: "10ce3f796a877984b4b8f2e369651d22d087eafa7ba40a230bbbbfb03166250b" + sha256 cellar: :any, arm64_monterey: "42c2c7aa062edb4ba49d21081f2c04e5d551c8ade5970285adabe06079cfc750" + sha256 cellar: :any, sonoma: "1ee37d5b7a3da4e71b78de85a7600272e786b867c93414f491e1164e364563e1" + sha256 cellar: :any, ventura: "8f2b4813adbacb46dab909c6fc047d158eac9769985c6926901de402d7f6ed12" + sha256 cellar: :any, monterey: "58075c4d4cb033ac64e42ff81ab27d930c8d6f2df58ce8b8aa739754480d2e63" + sha256 cellar: :any_skip_relocation, arm64_linux: "9cd4c23adec1ccc19420fe994db704d7e1135759e35c72150aa2409006731098" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fd398497f2002b1872b3dbe1ccb347797b37cb737a3b14e399f52b16d6a47f61" + 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..57c9051a55662 --- /dev/null +++ b/Formula/s/sipsak.rb @@ -0,0 +1,38 @@ +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" + + bottle do + rebuild 1 + 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..eab9dcda73761 --- /dev/null +++ b/Formula/s/siril.rb @@ -0,0 +1,74 @@ +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" + 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_sonoma: "171ce749ea3bc8d30136add12ec9b2fe77e07f86b7fb30f969c4bcbecfa760a1" + sha256 arm64_ventura: "ee29ef38b0f7f8049c8b2b1e8cdb1e0c428ab08a80286aeffaa4046c3007f878" + sha256 sonoma: "77568a6872f7d120b4100e9bfde547849cead2603b1e2e16c6a23abc172a84bb" + sha256 ventura: "1983446eda684e05754ba5c5dcd755fd8331b6ed2cefb49cdc2811e53ff4cffc" + sha256 x86_64_linux: "54e06821414c9982faec304f5b95db7192f4408de5762cb407ace96e5d363c43" + 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 "libconfig" + depends_on "libheif" + depends_on "libpng" + depends_on "libraw" + depends_on "librsvg" + depends_on "libtiff" + depends_on "netpbm" + depends_on "opencv" + depends_on "openjpeg" + 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..4eddfc73e4879 --- /dev/null +++ b/Formula/s/sisc-scheme.rb @@ -0,0 +1,32 @@ +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"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7e9295240559052f8c4e4b075ed560b0809c92c8d6d48c4b020707c5dcb20b01" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e01048572a3944b67dd73804391d0cad34e81ecdb5ec39455f5eddad3175c3c8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f65d81b8af3efb3351510362fdde92e8b9fc5a32eaba361a438abed4fb265991" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f65d81b8af3efb3351510362fdde92e8b9fc5a32eaba361a438abed4fb265991" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f65d81b8af3efb3351510362fdde92e8b9fc5a32eaba361a438abed4fb265991" + sha256 cellar: :any_skip_relocation, sonoma: "45b8e7de8b9d09fb4680118c7aec9d81be8e6535e595754d1722be7a863daac6" + sha256 cellar: :any_skip_relocation, ventura: "e76fa3836cfb1020d76de3ccda011d84223260860c78372930dbe99eeef6f46b" + sha256 cellar: :any_skip_relocation, monterey: "e76fa3836cfb1020d76de3ccda011d84223260860c78372930dbe99eeef6f46b" + sha256 cellar: :any_skip_relocation, big_sur: "e76fa3836cfb1020d76de3ccda011d84223260860c78372930dbe99eeef6f46b" + sha256 cellar: :any_skip_relocation, catalina: "e76fa3836cfb1020d76de3ccda011d84223260860c78372930dbe99eeef6f46b" + sha256 cellar: :any_skip_relocation, mojave: "e76fa3836cfb1020d76de3ccda011d84223260860c78372930dbe99eeef6f46b" + sha256 cellar: :any_skip_relocation, arm64_linux: "db23a0b7783336e1e6b22340648072737987d8b08562be5ef6acd8afcff22184" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f65d81b8af3efb3351510362fdde92e8b9fc5a32eaba361a438abed4fb265991" + 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..8cc175fb8d482 --- /dev/null +++ b/Formula/s/sispmctl.rb @@ -0,0 +1,31 @@ +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_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..4bd95878b5a42 --- /dev/null +++ b/Formula/s/six.rb @@ -0,0 +1,46 @@ +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 + + 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..8299ee6181524 --- /dev/null +++ b/Formula/s/sixtunnel.rb @@ -0,0 +1,55 @@ +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.13/6tunnel-0.13.tar.gz" + sha256 "8bc00d8dcd086d13328d868a78e204d8988b214e0c0f7fbdd0794ffe23207fe5" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0d847ef0fc6b81caed85f280cc141d608d76549981701549464e23a3f5db3157" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ce493b1a9309acdd209d74c96eed32d4b579f2500208a9f926ac513fb01080c1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1a6e10e77b34c4f10e17f389b38fb3c58690c7988e8274bbe2078fdff571d34f" + sha256 cellar: :any_skip_relocation, sonoma: "bf1635b9e636c6a40a57db5d56a3e4df68218b23b01be3e5568d573776eb6ad9" + sha256 cellar: :any_skip_relocation, ventura: "a0666f067478b4b5141260896b60dccf2a2eaeed3892e229eb267d44a045e0a9" + sha256 cellar: :any_skip_relocation, arm64_linux: "3fa9b18d88f1816365473ae8b9ccc98bfdeb030dd6a0c6d5c3b6f2dc360c639b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f38f0ad3d208f1f83ba4d6bc75ddd2e5e02ab5579858ebdfe413da6da7bd3bac" + 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..8c839c2441558 --- /dev/null +++ b/Formula/s/sk.rb @@ -0,0 +1,37 @@ +class Sk < Formula + desc "Fuzzy Finder in rust!" + homepage "https://github.com/lotabout/skim" + url "https://github.com/lotabout/skim/archive/refs/tags/v0.17.2.tar.gz" + sha256 "afdef2f53dcc0f51cc5a4b28c3a21b02cf82436970535a01d3fffaa6499b23a2" + license "MIT" + head "https://github.com/lotabout/skim.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e3e1617c509f40f3555699dd883c286ee6ffc3e2dbec510df003416f9bb39a56" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5e449f611bb43553b080e5418765318f5606e22170b23a8d9ba7834d0e46f432" + sha256 cellar: :any_skip_relocation, arm64_ventura: "571967a7e1e2e782d6cb659ac71bdb2fce766ed105b5c730f3cc9a0ed98f8ce4" + sha256 cellar: :any_skip_relocation, sonoma: "de06dc1cc1f0cfd55b6ebe9010cb57ca6ce3098e22db527bf9ce3454ca6de838" + sha256 cellar: :any_skip_relocation, ventura: "e1d6fa718d27894a32f0aa9fe72deb8d276656bfdc3c39ad4f30d5b3c9c9dc54" + sha256 cellar: :any_skip_relocation, arm64_linux: "8ed3cbd1fe21d64ba203aa40c48c461bed4b6a6571105aaa20fe2a68a0c7544a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "25972a1c9da970967b3a8f30aae24bd584ed3af8a2db2f23b8ab9ee5b27af521" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "skim") + + pkgshare.install "install" + bash_completion.install "shell/key-bindings.bash" + bash_completion.install "shell/completion.bash" + fish_completion.install "shell/key-bindings.fish" => "skim.fish" + zsh_completion.install "shell/key-bindings.zsh" + zsh_completion.install "shell/completion.zsh" + man1.install "man/man1/sk.1", "man/man1/sk-tmux.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..0db0875649bf7 --- /dev/null +++ b/Formula/s/skaffold.rb @@ -0,0 +1,33 @@ +class Skaffold < Formula + desc "Easy and Repeatable Kubernetes Development" + homepage "https://skaffold.dev/" + url "https://github.com/GoogleContainerTools/skaffold.git", + tag: "v2.16.0", + revision: "7912f7ef4381533e3a9f98d7966211af1dd0f940" + license "Apache-2.0" + head "https://github.com/GoogleContainerTools/skaffold.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "16e73e45fca368c8214236995d0c35b192764306d468799d3a9e77ffa2591efd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc974754e526c5067077d344f1b66f88848a9e8f933789a0324a36cca8010561" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3c6e4771736a4cd5d8b1d904493a894d70fdec4827b2a8c6d44296ebd0b65db5" + sha256 cellar: :any_skip_relocation, sonoma: "16bfdeb146f0ab00f055f1116304d95806ba5508c6993f115124bd30aaa13416" + sha256 cellar: :any_skip_relocation, ventura: "4bd83e35ad8540593fa916ea5a871dec0fb288cf2c278ce91f46f0a7b749b069" + sha256 cellar: :any_skip_relocation, arm64_linux: "4ac1717855e4f17f892888c29b9203be1fc61ec4d36bb9349b3c8e54915dfb52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17f9e9b54277a851a4e01adf13b2cb6386452f6fe5a32c10139d7f1601121237" + 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/skate.rb b/Formula/s/skate.rb new file mode 100644 index 0000000000000..0d2e12729915a --- /dev/null +++ b/Formula/s/skate.rb @@ -0,0 +1,38 @@ +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_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, 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..7a800510eeee4 --- /dev/null +++ b/Formula/s/skeema.rb @@ -0,0 +1,33 @@ +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.12.3.tar.gz" + sha256 "a29c42436967b61e6a5b1475b0166e38583c7f0f6381412409d76eaba9cced7b" + license "Apache-2.0" + head "https://github.com/skeema/skeema.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cbcc88c91395e39c504ee1ea7fe2e9ba1a2ff731d17281209b2131df8cf8b247" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cbcc88c91395e39c504ee1ea7fe2e9ba1a2ff731d17281209b2131df8cf8b247" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cbcc88c91395e39c504ee1ea7fe2e9ba1a2ff731d17281209b2131df8cf8b247" + sha256 cellar: :any_skip_relocation, sonoma: "02a449d113eadd1c3cc6fc6bb48460b0d01b13166c929f01720c5837d7b99794" + sha256 cellar: :any_skip_relocation, ventura: "02a449d113eadd1c3cc6fc6bb48460b0d01b13166c929f01720c5837d7b99794" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a148cf88c9e449ce572fb8db7441c42a6205968be27f170ed1ed431fe5c1cb36" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + 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..e21068b338ace --- /dev/null +++ b/Formula/s/ski.rb @@ -0,0 +1,37 @@ +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" + + 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 + if OS.mac? && MacOS.version <= :mojave + rw_info = python_shebang_rewrite_info("/usr/bin/env python") + rewrite_shebang rw_info, "ski" + 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..f22e3607705ec --- /dev/null +++ b/Formula/s/skinny.rb @@ -0,0 +1,28 @@ +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" + + 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..fbf840ddd8280 --- /dev/null +++ b/Formula/s/skktools.rb @@ -0,0 +1,105 @@ +class Skktools < Formula + desc "SKK dictionary maintenance tools" + homepage "https://github.com/skk-dev/skktools" + url "https://deb.debian.org/debian/pool/main/s/skktools/skktools_1.3.4.orig.tar.gz" + sha256 "84cc5d3344362372e0dfe93a84790a193d93730178401a96248961ef161f2168" + license "GPL-2.0-or-later" + revision 2 + + bottle do + 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..b6a76ff5cab09 --- /dev/null +++ b/Formula/s/skopeo.rb @@ -0,0 +1,66 @@ +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.18.0.tar.gz" + sha256 "8a711db2bba3a357bebbbaf607ec731df6ea24c2d3cd9e0fef5e8fe9cefb154b" + license "Apache-2.0" + + bottle do + sha256 arm64_sequoia: "195bf2056940f30706d741fe96e90ca3ece2341b495362fc612add616dd6d59a" + sha256 arm64_sonoma: "1a007f92b40a5ad1ef3f1ff95540048206eaed2ab074e9abd469752e92f14aaa" + sha256 arm64_ventura: "450b43b987dfeb5db843d9b51a49bc886dd13278b14da80b62dc68d7250781b2" + sha256 sonoma: "dc6f7ef86d7798c357873cf304fe5737425cafc37ba6e60996873155ccee98f2" + sha256 ventura: "26cea0fc22ddac9a843bce5d05873a278556b0b5111438394e69d9f49fb3075b" + sha256 x86_64_linux: "afdc1cc58b037b58f0e275ba196ad8b5bad1ccaff8a9aa4c7cf96e5fa402a144" + 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_tag.sh").chomp, + 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 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..38e2dce023743 --- /dev/null +++ b/Formula/s/skylighting.rb @@ -0,0 +1,125 @@ +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_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..4bb513ac4fd0f --- /dev/null +++ b/Formula/s/skymaker.rb @@ -0,0 +1,50 @@ +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, mojave: "ef2182885eb6952289057ce2756ac56ec9a88397e746b694529a937eaa28b943" + sha256 cellar: :any, high_sierra: "6e7aa4c817624d5631293d0421b25eec132e41bfe3d75f9044a85dd02f73de4a" + 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 + + 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..d8dcb59374156 --- /dev/null +++ b/Formula/s/sl.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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, mojave: "e489648bcc7eff8f065855dcc891eb55f3793a5ff464d96726e313a1bc74d00f" + sha256 cellar: :any_skip_relocation, high_sierra: "627b0b5f8027f876466d03038da7dd0d75804cccc3bbcf45f0fe9c91199be3c3" + sha256 cellar: :any_skip_relocation, sierra: "afd30cb3a99d238a8ac52810834244d5f47fc2ff597db9ad61012bd2014395b9" + sha256 cellar: :any_skip_relocation, el_capitan: "f186cb86f4d48929aa671434dbd6be0a861069608098a30dc952697bcca85972" + 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/slackcat.rb b/Formula/s/slackcat.rb new file mode 100644 index 0000000000000..3c175aed37fce --- /dev/null +++ b/Formula/s/slackcat.rb @@ -0,0 +1,32 @@ +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_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, mojave: "0aa9e136f18f6937cf156f00b850c37361a2f4616ea52783e471ded9de82ee7f" + 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..baf3201192935 --- /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.1.tar.gz" + sha256 "327e4672d5d7dc9b97acd9c7d1c2741de6bb11556a9311888a6aa48a7516fbb9" + license "GPL-3.0-only" + head "https://github.com/rusq/slackdump.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cc9911c3f4f63fd250b6a6b61bfc84d1e2e48b66b2bf4c35be5fb0b032142654" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cc9911c3f4f63fd250b6a6b61bfc84d1e2e48b66b2bf4c35be5fb0b032142654" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cc9911c3f4f63fd250b6a6b61bfc84d1e2e48b66b2bf4c35be5fb0b032142654" + sha256 cellar: :any_skip_relocation, sonoma: "a6eaa5881b31233ff61fca2b3e93a34823aa11be799487925cd74ed1301a8f2b" + sha256 cellar: :any_skip_relocation, ventura: "a6eaa5881b31233ff61fca2b3e93a34823aa11be799487925cd74ed1301a8f2b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eacf5be4152076345fa85137a65c7487b82c42b7e9249d1dbf1760ba1c4a254d" + 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..4bc6ed97b9be8 --- /dev/null +++ b/Formula/s/slacknimate.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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, mojave: "28f1871e38987c5b06e0666f172d0eefb9e6895ea8207a0ad171d467a2df7f7a" + sha256 cellar: :any_skip_relocation, high_sierra: "6849d5acbe802d8fb69007f144bba62a9c259a9093ccc920fb9a200edc9368fa" + 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..aa45399da0105 --- /dev/null +++ b/Formula/s/slashem.rb @@ -0,0 +1,105 @@ +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 + + bottle do + 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, mojave: "7a764f6117556d92fad752ec06dc28626c0e250632eac85cfa8d841f7c770819" + sha256 cellar: :any_skip_relocation, high_sierra: "5bac56b4e76ea1db5b5e211ac88c4f10c2fa8b179ada29512f41868af1669b3d" + sha256 cellar: :any_skip_relocation, sierra: "80a4df38057ec2bef889b92b4edfc80158add542a1bd9f1ca50ed8d39eb21e2c" + sha256 cellar: :any_skip_relocation, el_capitan: "3b0ec09db5b1e2abccc22d2cc9282de211d9a15e4d2d66c404f898af2768d1b3" + 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..a13587176783f --- /dev/null +++ b/Formula/s/sleef.rb @@ -0,0 +1,46 @@ +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_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..48d3bc39de400 --- /dev/null +++ b/Formula/s/sleek.rb @@ -0,0 +1,32 @@ +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.3.0.tar.gz" + sha256 "503e9535ebd7640a4c98c7fd1df2eb98eebed27f9862b4b46e38adbd4a9cf08f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91a9ef96d0eb6c5a90745fc5d0bd73b426be96d18b4293c48fccd3a9de933bc5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8c8a08f1994cd26924faec694399aeeeb94b8b82a1b8f5b7e67773c763d4b618" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5cfcc553c15db6aa1eee7fb3c1c9f57d36728f2325aa3f679910ed79f8ca6396" + sha256 cellar: :any_skip_relocation, sonoma: "7fbd67bbb52e8072bffe8b656161e894f35156daafa3a53496aae7e8b3e50deb" + sha256 cellar: :any_skip_relocation, ventura: "0c26c3a372199175fe36833996cac1f619b5415442414cf3652af72eeb01f3c9" + sha256 cellar: :any_skip_relocation, arm64_linux: "de48a122749e442e4d2fe472b7b1c5b7f3cb17b7fde3a82efe99313954c5b244" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3f2f948129d7eb704889e0ca9f8132b2632e525ca1f239089c4aeb22f3810d3" + 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..197327d928c83 --- /dev/null +++ b/Formula/s/sleepwatcher.rb @@ -0,0 +1,65 @@ +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 + + bottle do + rebuild 1 + 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" + sha256 cellar: :any_skip_relocation, mojave: "651f17a7622a05db38a14b133c15e20f441028c2f540af104421f204a766238d" + 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..5e0244c05e808 --- /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.23.1.tar.gz" + sha256 "c2fde066521bbccfbc80aa15182bca69ffaf00a7de648459fd04b81589896238" + license "BSD-2-Clause" + + livecheck do + formula "slepc" + end + + bottle do + sha256 arm64_sequoia: "9830090d1780c1211954b2b7fd709606554114b9b89f7c8bf8081bbcc514d2cd" + sha256 arm64_sonoma: "857fdfdfe8f7ee48fd6f9c99d162981589c710595c7bcd1b4986054bea57d074" + sha256 arm64_ventura: "2773785a5ba69b69818487f395fc074a487a74544bb5e5d82a1909ed5b9c48c8" + sha256 sonoma: "b7de7219d613a3c02be04991a02c7c8721cdecec71a56162955278bcfdc7309e" + sha256 ventura: "b0403a30a90ece73c53f93c120560138a084a61891a9d54f6330f8a250220adb" + sha256 arm64_linux: "1fb5c956465ecfdd394283ca0bd7b05a9cd632e863ed69e69b78cb84c3d06997" + sha256 x86_64_linux: "38de5eacb565a6fb14dd007e5b1c52d5d53048cf2f33f9fde83c89c19a66863e" + 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..31ba737e466f9 --- /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.23.1.tar.gz" + sha256 "c2fde066521bbccfbc80aa15182bca69ffaf00a7de648459fd04b81589896238" + license "BSD-2-Clause" + + livecheck do + url "https://slepc.upv.es/download/distrib/" + regex(/href=.*?slepc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "f85955c046f0968313562108a8fd6aa37928c3e26559eca7f352d01b730d6ae8" + sha256 arm64_sonoma: "f1c54fbc2661b9d01fb6325be8ee246b41e11671b06254d59c35181196092f87" + sha256 arm64_ventura: "085717ceafb7c6d9db2c70d126ee94a9be50ff389760d2a925421e093084e08e" + sha256 sonoma: "9a8b14ecab42a75016f04933d51f17859f3cb3d1eb3165ed7e1568741a7883c1" + sha256 ventura: "75a1e30f69b215aedc43ae79864fd38893ad7141e7a8a2b4130444e8ac606393" + sha256 arm64_linux: "d1c3609f9fc9e5f64aa84c68bafccee996b26b2374f91005b97f8d352625fd88" + sha256 x86_64_linux: "82e8f7056e01c96ff02f541d714960b08be64bd60a328ab24b1c978d3bb4a3d0" + 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..4cf756b752690 --- /dev/null +++ b/Formula/s/sleuthkit.rb @@ -0,0 +1,51 @@ +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_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..ce3e4038f1e0c --- /dev/null +++ b/Formula/s/slides.rb @@ -0,0 +1,51 @@ +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_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, 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..0a2bb5bf2140a --- /dev/null +++ b/Formula/s/slimerjs.rb @@ -0,0 +1,46 @@ +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" + + bottle do + rebuild 1 + 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..bd97d02bc6efa --- /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.2.tar.gz" + sha256 "c98ef2679c7b8c96eed95409138a22904a0550494d191385637e953534d15c75" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "89e60e3e27c13237d8445d2751035fc45a39e61190b9a1d9ebe3616ce9e1ccb8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aae20af004ad6c78e0474256666c18b342668c8f7b54d8800968833fbce4861b" + 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..05bb62baf1a79 --- /dev/null +++ b/Formula/s/slither-analyzer.rb @@ -0,0 +1,262 @@ +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" + head "https://github.com/crytic/slither.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0afe1fd5ed9b06cdae9ef4d95862b6352f9aeb989b7af4da6e7bc21c462d74fc" + sha256 cellar: :any, arm64_sonoma: "3abb429be05a04b5088233cc8453d8f99141194c82d127eed626bd92a4daabb3" + sha256 cellar: :any, arm64_ventura: "14dcb64ecc28000eda093d1ee3422bc00cc3c5bfc46e2247d21b7134b05d91d8" + sha256 cellar: :any, sonoma: "7dc1a1078ff8bd0712b9eeb1202a97ada12925021654f18efd106656910e1f65" + sha256 cellar: :any, ventura: "8d2b4e62cc8c11bcc82c66ee747d5ea6ae5e18340116c3c4f324eeee54802222" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9fb40a44171d73c0eb7be48afef96cc905a5da01f1767ca74b1cd48e6584aa7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08e87de14d19dc594a7f1600840d7f46d4b3bef7543efa59774c6da07debe7eb" + end + + depends_on "rust" => :build # for rpds-py + depends_on "certifi" + depends_on "python@3.13" + + 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/f1/d9/1c4721d143e14af753f2bf5e3b681883e1f24b592c0482df6fa6e33597fa/aiohttp-3.11.16.tar.gz" + sha256 "16f8a2c9538c14a557b4d309ed4d0a7c60f0253e8ed7b6c9a2859a7582f8b1b8" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "bitarray" do + url "https://files.pythonhosted.org/packages/f1/6e/e3877eebb83e3e9d22b6089be7b8c098d3d09b2195a9570d6d9049e90d5b/bitarray-3.3.1.tar.gz" + sha256 "8c89219a672d0a15ab70f8a6f41bc8355296ec26becef89a127c1a32bb2e6345" + end + + resource "cbor2" do + url "https://files.pythonhosted.org/packages/e4/aa/ba55b47d51d27911981a18743b4d3cebfabccbb0598c09801b734cec4184/cbor2-5.6.5.tar.gz" + sha256 "b682820677ee1dbba45f7da11898d2720f92e06be36acec290867d5ebf3d7e09" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "ckzg" do + url "https://files.pythonhosted.org/packages/55/df/f6db8e83bd4594c1ea685cd37fb81d5399e55765aae16d1a8a9502598f4e/ckzg-2.1.1.tar.gz" + sha256 "d6b306b7ec93a24e4346aa53d07f7f75053bc0afc7398e35fa649e5f9d48fcc4" + end + + resource "crytic-compile" do + url "https://files.pythonhosted.org/packages/47/fb/e185388d15dc114a4b271fa3fca87dad8764382b52d328ed02040ac24f88/crytic_compile-0.3.9.tar.gz" + sha256 "04b9877477098875bec03f8444111fe6a48d330aaa63da35f6320ab40e31d9e0" + end + + resource "cytoolz" do + url "https://files.pythonhosted.org/packages/a7/f9/3243eed3a6545c2a33a21f74f655e3fcb5d2192613cd3db81a93369eb339/cytoolz-1.0.1.tar.gz" + sha256 "89cc3161b89e1bb3ed7636f74ed2e55984fd35516904fc878cae216e42b2c7d6" + 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/5f/7c/d6746caf985a32dce946dca7a22aacc979a0796be9897ec870ab42856a81/eth_account-0.13.6.tar.gz" + sha256 "e496cc4c50fe4e22972f720fda4c13e126e5636d0274163888eb27f08530ac61" + 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/0d/49/bee95f16d2ef068097afeeffbd6c67738107001ee57ad7bcdd4fc4d3c6a7/eth_utils-5.3.0.tar.gz" + sha256 "1f096867ac6be895f456fa3acb26e9573ae66e753abad9208f316d24d6178156" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/ee/f4/d744cba2da59b5c1d88823cf9e8a6c74e4659e2b27604ed973be2a0bf5ab/frozenlist-1.6.0.tar.gz" + sha256 "b99655c32c1c8e06d111e7f41c06c29a5318cb1835df23a45518e02a47c63b68" + end + + resource "hexbytes" do + url "https://files.pythonhosted.org/packages/83/71/1a3f2439cf138b555c182fffeffbf67c090837e4570370af85ee8e57013f/hexbytes-1.3.0.tar.gz" + sha256 "4a61840c24b0909a6534350e2d28ee50159ca1c9e89ce275fd31c110312cf684" + 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/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/44/e6/099310419df5ada522ff34ffc2f1a48a11b37fc6a76f51a6854c182dbd3e/pycryptodome-3.22.0.tar.gz" + sha256 "fd7ab568b3ad7b77c908d7c3f7e167ec5a8f035c64ff74f10d47a4edd043d723" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + end + + resource "pyunormalize" do + url "https://files.pythonhosted.org/packages/b3/08/568036c725dac746ecb267bb749ef930fb7907454fe69fce83c8557287fb/pyunormalize-16.0.0.tar.gz" + sha256 "2e1dfbb4a118154ae26f70710426a52a364b926c9191f764601f5a8cb12761f7" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/60/a0/2a2bfbbab1d9bd4e1a24e3604c30b5d6f84219238f3c98f06191faf5d019/solc-select-1.0.4.tar.gz" + sha256 "db7b9de009af6de3a5416b80bbe5b6d636bf314703c016319b8c1231e248a6c7" + end + + resource "toolz" do + url "https://files.pythonhosted.org/packages/8a/0b/d80dfa675bf592f636d1ea0b835eab4ec8df6e9415d8cfd766df54456123/toolz-1.0.0.tar.gz" + sha256 "2c86e3d9a04798ac556793bced838816296a2f085017664e4995cb40a1047a02" + end + + resource "types-requests" do + url "https://files.pythonhosted.org/packages/00/7d/eb174f74e3f5634eaacb38031bbe467dfe2e545bc255e5c90096ec46bc46/types_requests-2.32.0.20250328.tar.gz" + sha256 "c9e67228ea103bd811c96984fac36ed2ae8da87a36a633964a21f199d60baf32" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "web3" do + url "https://files.pythonhosted.org/packages/6d/19/c1e213dd87ead2ace55ff1dd179df6050bcf5d9006440c9153969c7d6863/web3-7.10.0.tar.gz" + sha256 "0cace05ea14f800a4497649ecd99332ca4e85c8a90ea577e05ae909cb08902b9" + 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/62/51/c0edba5219027f6eab262e139f73e2417b0f4efffa23bf562f6e18f76ca5/yarl-1.20.0.tar.gz" + sha256 "686d51e51ee5dfe62dec86e4866ee0e9ed66df700d55c828a615640adc885307" + 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..6f5132226240b --- /dev/null +++ b/Formula/s/sloccount.rb @@ -0,0 +1,62 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "b9a52de5de2a1be5fd606412ab8db8a55279da49d79f9812d59294a587aaa7c4" + sha256 cellar: :any_skip_relocation, high_sierra: "04a4c12a83cb655a8f2f69178905af19e2786927ef7a4e9d0020e870ce35fcbd" + 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.rb b/Formula/s/sloth.rb new file mode 100644 index 0000000000000..4414966616a04 --- /dev/null +++ b/Formula/s/sloth.rb @@ -0,0 +1,44 @@ +class Sloth < Formula + desc "Prometheus SLO generator" + homepage "https://sloth.dev/" + url "https://github.com/slok/sloth/archive/refs/tags/v0.12.0.tar.gz" + sha256 "783689544f1829cb139ab3bbdd5e53cc835469a92c4a187384ff51f08eceb284" + 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_sequoia: "76a59c6254842dd76f9020868f4ec38388e645039ef51077192d1f5f0fe573d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6e37e3ca543f2167c514db79724840c8174179f8c465b114a94e8a717d7ff56e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b93c679c5217405d26f967617e4de9b35fd5ae0c57814a4fc00302481023bd0b" + sha256 cellar: :any_skip_relocation, sonoma: "95fd259914b02afb9489548a2420594eaeafc2afeebbe8d8772e37a5b3101036" + sha256 cellar: :any_skip_relocation, ventura: "1b9c32ba8aa94c9f087fee074c651c7540bd66b11b0d1966d66b79e6fafccc87" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ee5d6b1c4cb80ee6b90d2f6081a2adc59d952ef3515599b00e8f0a4aa7bb047" + 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(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 "SLO alert rules generated", output + assert_match "Code generated by Sloth", 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..b58e0bd08afe2 --- /dev/null +++ b/Formula/s/slowhttptest.rb @@ -0,0 +1,38 @@ +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" + + bottle do + rebuild 1 + 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..542c3b2503957 --- /dev/null +++ b/Formula/s/slrn.rb @@ -0,0 +1,54 @@ +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 + + bottle do + rebuild 2 + 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..581c67578df9d --- /dev/null +++ b/Formula/s/slsa-verifier.rb @@ -0,0 +1,50 @@ +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.0.tar.gz" + sha256 "156190a6c96ef20747a88d28b69ee7fe60dc4d0fce3f9037da86778dcfdd2af8" + 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_sequoia: "2aa2a807e3b7f681fe3a2202b0dbf80310dd26ec55275698354094db272d970b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2aa2a807e3b7f681fe3a2202b0dbf80310dd26ec55275698354094db272d970b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2aa2a807e3b7f681fe3a2202b0dbf80310dd26ec55275698354094db272d970b" + sha256 cellar: :any_skip_relocation, sonoma: "106517b350402f5df5b7593cc10b501f878e1f244dd34a3db73f019846592e49" + sha256 cellar: :any_skip_relocation, ventura: "07fb4459305a82d44c6c128b1255f5a0a996d241f9c07432fd76f6e6ee4c74df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8794fbe8d5196f2e41227ec58833f905557f107199a2735f0ff6b4df7938dcb8" + 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..489b03b6bb62d --- /dev/null +++ b/Formula/s/slugify.rb @@ -0,0 +1,22 @@ +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" + + 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..913cac921367d --- /dev/null +++ b/Formula/s/slumber.rb @@ -0,0 +1,44 @@ +class Slumber < Formula + desc "Terminal-based HTTP/REST client" + homepage "https://slumber.lucaspickering.me/" + url "https://github.com/LucasPickering/slumber/archive/refs/tags/v3.1.1.tar.gz" + sha256 "9d3a7ef79c04175ce6b69cfe5b4b5aac761aee41e0d9fd5cbbad5a038f059092" + license "MIT" + head "https://github.com/LucasPickering/slumber.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4acf5df08883a77829743182e5993f3a20a1b5505158f7f15424a8697b335494" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ebd1dde7678cd9b91a58eb84a3f5dd64d152599f98aa480f9df08966472336ca" + sha256 cellar: :any_skip_relocation, arm64_ventura: "489a5a74c72d3d8c0f35cbc343a5820a7c1962c4cdd4235b9c3b782ffe2cf92c" + sha256 cellar: :any_skip_relocation, sonoma: "78fd4463d86642b1a382048983b272a2d4f699bb881631b70e27d294d75db0e6" + sha256 cellar: :any_skip_relocation, ventura: "90cbc3f21ec6f05b7c03a2af4ad7f965abc5ac4fea5eb71b4d73204d069322ca" + sha256 cellar: :any_skip_relocation, arm64_linux: "50072a67d65a4c07716263c000de4d066ae0db8b3b117840ce5c9b7bcf364e38" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00d4dedeca58b7d0d97eb518513ac5fc98d73dd916ed5f14e696eef01c1ac6e2" + 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 + # For basic usage info, see: + # https://slumber.lucaspickering.me/book/getting_started.html + # For all collection options, see: + # https://slumber.lucaspickering.me/book/api/request_collection/index.html + + # Profiles are groups of data you can easily switch between. A common usage is + # to define profiles for various environments of a REST service + profiles: + example: + name: Example Profile + data: + host: https://httpbin.org + YAML + end +end diff --git a/Formula/s/slurm.rb b/Formula/s/slurm.rb new file mode 100644 index 0000000000000..c7c653f059746 --- /dev/null +++ b/Formula/s/slurm.rb @@ -0,0 +1,45 @@ +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_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..7edbc11b0713a --- /dev/null +++ b/Formula/s/smake.rb @@ -0,0 +1,45 @@ +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_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/smali.rb b/Formula/s/smali.rb new file mode 100644 index 0000000000000..5aff2d0d49b64 --- /dev/null +++ b/Formula/s/smali.rb @@ -0,0 +1,58 @@ +class Smali < Formula + desc "Assembler/disassembler for Android's Java VM implementation" + homepage "https://github.com/JesusFreke/smali" + url "https://github.com/JesusFreke/smali/archive/refs/tags/v2.5.2.tar.gz" + sha256 "2c42f0b1768a5ca0f9e7fe2241962e6ab54940964d60e2560c67b0029dac7bf1" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "909b027559fa670c4e04e24e5d8f0c16ca7c0791826c709a9e1923d3c8a7d7c6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a156600b701a8ec390c3cc6f8348c5fdc87a4f4168ca1b9fa85729437d1a7c6a" + sha256 cellar: :any_skip_relocation, arm64_monterey: "0ae90cfbf519caf36fa5c2ee2c9059a41d9f39ab1652c5d883e9267552bbe699" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "fa384e0623d92232575207c1d393204e05254206e9309b9160be038f698bcb11" + sha256 cellar: :any_skip_relocation, sonoma: "e8b11c842896662bb8fcd75c2bd5b9eddb7d57f123de420b5467d297ed7a638a" + sha256 cellar: :any_skip_relocation, ventura: "10511aa8c74d96534e7deae36557349840023576c5c1800085de856a46597fbc" + sha256 cellar: :any_skip_relocation, monterey: "1de39f5a3d88ebb0cfc415c165f2c431c6c64ae9075eeecd8c1616cf7e63ee2c" + sha256 cellar: :any_skip_relocation, big_sur: "508115afcebb6b4fe2b6491652cc386633144cb48669fd4624eb60542fa43fd8" + sha256 cellar: :any_skip_relocation, catalina: "95c45f88283b8e8e7a4563440bb9e3ed10f93dfe43eac5e927ae1ebae65dac0b" + sha256 cellar: :any_skip_relocation, mojave: "44fc500be24c9cc38b5c7031cf600019083c5385e18bd067eeacb1424061d0c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a674a05a86c284a8f15d82c01e73af0e1802b755659c6417d79157ff2108f82f" + end + + disable! date: "2024-09-05", because: "uses deprecated `gradle@6` to build" + + depends_on "gradle@6" => :build + depends_on "openjdk" + + def install + system "gradle", "build", "--no-daemon" + + %w[smali baksmali].each do |name| + jarfile = "#{name}-#{version}-dev-fat.jar" + + libexec.install "#{name}/build/libs/#{jarfile}" + bin.write_jar_script libexec/jarfile, name + 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/s/smap.rb b/Formula/s/smap.rb new file mode 100644 index 0000000000000..6b576f1e41fbb --- /dev/null +++ b/Formula/s/smap.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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, 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..402127c59692e --- /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.10.0.tar.gz" + sha256 "1c358f8794ade8df976a259128372c665be81cfe04fe3256d42306da30d4b60a" + license "GPL-3.0-only" + head "https://github.com/mokeyish/smartdns-rs.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9392399a1d6d1fb453185577bd1abfe493b6f975494846f4caab139e8600b11b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5c6fe42ee9905ad65a38a41e5a9825ecbe4a386bb5263c96410b30a5a5fc16d9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "15b234a11c28e36903bc3243eba29615c21b1adbc00cbbb016cfc270a347afb4" + sha256 cellar: :any_skip_relocation, sonoma: "a142498d587b0691a48a4b8e7b884b9d71dfce67077e79304d56dcba6d22f857" + sha256 cellar: :any_skip_relocation, ventura: "d61d2640c4a06106386b45981b7a50e605f2cd033633a6149c8a4fbbe85a538a" + sha256 cellar: :any_skip_relocation, arm64_linux: "68041e96b161dff8b6321afbe2d5d0d6cb732fb680f2feeb9d87b087d1f7979a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "61db013d4f6fedaae7c0473af966eccb9f7be9e7c4610bd75ace8acf20bdaeeb" + end + + depends_on "just" => :build + 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 "just", "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..0538c685d5541 --- /dev/null +++ b/Formula/s/smartmontools.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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..981c9b701da8a --- /dev/null +++ b/Formula/s/smartypants.rb @@ -0,0 +1,27 @@ +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 + + 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..06e1a4a143f53 --- /dev/null +++ b/Formula/s/smenu.rb @@ -0,0 +1,38 @@ +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.4.0/smenu-1.4.0.tar.bz2" + sha256 "9b4e0d8864746175c1b20d75f5411fa013abdaf24af6801f1c5549b6698e195b" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0db2b3c8020378b8c8a1391a13ddb5be2a628c4c4972e7cad5aa4e000afc25f6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6850bd70569c2cd871520c8eb5738a5d3d4f4be1d1a0358bdde55c79e7372c39" + sha256 cellar: :any_skip_relocation, arm64_ventura: "884d6e69189dced3348d6dbb74c7c5cc133744bd2515afa983b8247831055ef2" + sha256 cellar: :any_skip_relocation, sonoma: "c7d24ecc393322fe0071e5a3ae8d8955193d48b0087708e6c7644fa818ae9349" + sha256 cellar: :any_skip_relocation, ventura: "af00f9aa936f24a34a6b244c215f817e35d983c2be1f506905aa97ed3f021528" + sha256 cellar: :any_skip_relocation, arm64_linux: "d3db6f36d33d8abe889bd624b2ce8fbad7e91a4f110fb1ed929849dcb198a759" + sha256 cellar: :any_skip_relocation, x86_64_linux: "149396da00c29749fd20745146885f0f4ff7833934f76160507aa171b7fef16c" + 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..7cd4c7c4b10e7 --- /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_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" + sha256 cellar: :any_skip_relocation, mojave: "146db9c5113009eb23612bdf240d47a8f539619be6e7d87025c43c5cde8eca82" + 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..581bb1a2cd20e --- /dev/null +++ b/Formula/s/smlfmt.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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..d42598e5c4079 --- /dev/null +++ b/Formula/s/smlpkg.rb @@ -0,0 +1,40 @@ +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" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, sonoma: "e32a3bb66ffda047e591f59df909bc287720f6ee371ccb4d0e4b0871977c8947" + sha256 cellar: :any_skip_relocation, ventura: "a353c05fc5d0d1abe548aae6a333d6afd9831478324b483a2acfa078ad4b4a39" + sha256 cellar: :any_skip_relocation, monterey: "59f20ca9b49cf17bcb6931a23477ae7e62ab547520509a66c1a6385713f925b8" + sha256 cellar: :any_skip_relocation, big_sur: "dedbec064bc7c579cac83e901849fddf01fd75ff93fb61f547fea21f166995ea" + sha256 cellar: :any_skip_relocation, catalina: "081ba1bc8f93af1f393505ad20d46084498a3a268a9a2f5fcbe0bc274964ba95" + sha256 cellar: :any_skip_relocation, mojave: "0f714a205b9b960956fdd6fde1a3185adcd6cb26a28e30b30adb4f49c53ab344" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c34eb8d99928a9143212f3273c3a51ec4d2eab32f11f70f626aec59855f1a6a9" + end + + depends_on "mlkit" => :build + depends_on arch: :x86_64 # https://github.com/melsman/mlkit/issues/115 + + def install + 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..6cae17fb68ee7 --- /dev/null +++ b/Formula/s/smpeg.rb @@ -0,0 +1,103 @@ +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 + + bottle do + rebuild 1 + 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..b0dd2eea0e1a3 --- /dev/null +++ b/Formula/s/smpeg2.rb @@ -0,0 +1,121 @@ +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 + + bottle do + rebuild 1 + 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..15938397f3321 --- /dev/null +++ b/Formula/s/smu.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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, mojave: "081239f69508758aceb226f12d06548fe555cb36c3e36258e92566ed21b08195" + 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..2a8ac35c3253d --- /dev/null +++ b/Formula/s/smug.rb @@ -0,0 +1,47 @@ +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.6.tar.gz" + sha256 "0664661250ca675f4bc709787817b53759d7b20ecc87e6b01b5f13002d653797" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5f45667e3e7a430656241eb38b85cd3d25a8d13159a806b3477148e75cd9c32" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b5f45667e3e7a430656241eb38b85cd3d25a8d13159a806b3477148e75cd9c32" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b5f45667e3e7a430656241eb38b85cd3d25a8d13159a806b3477148e75cd9c32" + sha256 cellar: :any_skip_relocation, sonoma: "da2615272e49b0c311b196b597bbf9681283b2120931d29292ee38f58cd053e6" + sha256 cellar: :any_skip_relocation, ventura: "da2615272e49b0c311b196b597bbf9681283b2120931d29292ee38f58cd053e6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "262cd8d04d0628dcf493599c3301cf7eafd462a65f030683da7867a1ed7dc208" + 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..4f5cddc23eb5e --- /dev/null +++ b/Formula/s/sn0int.rb @@ -0,0 +1,50 @@ +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_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..39518fc4eb2a8 --- /dev/null +++ b/Formula/s/snag.rb @@ -0,0 +1,60 @@ +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, mojave: "3821de3f4b916afd116f9f55c549f1bdec7b2c448994e784baf23eef96d65520" + sha256 cellar: :any_skip_relocation, high_sierra: "ae031acea4e10639f15a1598bf99e45eb8bed08222e31db9e1152a4a1de0dc14" + sha256 cellar: :any_skip_relocation, sierra: "692ce892c40f38cb39e77b464efa531b27004a9bbaf0096fb5876b570086cf82" + sha256 cellar: :any_skip_relocation, el_capitan: "18a6d589a0b416ee502a8dacd6f919959d25cc08d9bbaad152fdade4c72634dc" + 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..2c10397a5d0fd --- /dev/null +++ b/Formula/s/snakefmt.rb @@ -0,0 +1,82 @@ +class Snakefmt < Formula + include Language::Python::Virtualenv + + desc "Snakemake code formatter" + homepage "https://github.com/snakemake/snakefmt/" + url "https://files.pythonhosted.org/packages/66/da/0411e11ff46a9706539b1215ecf4afa3e5bc2da60e4caa8cc23177044e6a/snakefmt-0.11.0.tar.gz" + sha256 "afc3b92e103cfda80fff7e77f357f6cc1dab742272ee76342ba342f30e721f30" + license "MIT" + head "https://github.com/snakemake/snakefmt.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c6f3b238883159ea5e23d01cb0892963b4bd953d24c1698012b53bc5f26a9c4c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c6f3b238883159ea5e23d01cb0892963b4bd953d24c1698012b53bc5f26a9c4c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c6f3b238883159ea5e23d01cb0892963b4bd953d24c1698012b53bc5f26a9c4c" + sha256 cellar: :any_skip_relocation, sonoma: "7b5c55a0907942d9ce338e1a2edab23febf8e9fd3d6411c6310ace4c1e2784bb" + sha256 cellar: :any_skip_relocation, ventura: "7b5c55a0907942d9ce338e1a2edab23febf8e9fd3d6411c6310ace4c1e2784bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "f1630f33ef1dea71add311265206881e08a08e00ce2f9fb866a5c97d1eb1fd09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1630f33ef1dea71add311265206881e08a08e00ce2f9fb866a5c97d1eb1fd09" + end + + depends_on "python@3.13" + + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "mypy-extensions" do + url "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz" + sha256 "75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "toml" do + url "https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz" + sha256 "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + ENV["SOURCE_DATE_EPOCH"] = "1451574000" + + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"snakefmt", shells: [:fish, :zsh], 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..3f6a4ad15d9a6 --- /dev/null +++ b/Formula/s/snakemake.rb @@ -0,0 +1,264 @@ +class Snakemake < Formula + include Language::Python::Virtualenv + + desc "Pythonic workflow system" + homepage "https://snakemake.readthedocs.io/" + url "https://files.pythonhosted.org/packages/24/8e/f6981f33faf4a9132eeeadd0ada5bc22bca17e830e07cbf846713699d842/snakemake-9.4.0.tar.gz" + sha256 "e0bdc5a2c79720fc24d2b546bf433a508e0e34252b8afaeb93c82c26abddb56f" + license "MIT" + head "https://github.com/snakemake/snakemake.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7515f05b23db030ac4b5c1ac45967921f8398d231124f440e7b2fd91082c88a4" + sha256 cellar: :any, arm64_sonoma: "9f578a793896c64011d52e715c7eec1ca5941ac917a9045ca370fe97b2a6e6e9" + sha256 cellar: :any, arm64_ventura: "0b02ab039c06825cca57407eadacbb3816a25d68f2ba803cc3ba3233219372a7" + sha256 cellar: :any, sonoma: "4d31d1192fa40e3dedc3178cda30bc23533195cef4c49337f365df540095113e" + sha256 cellar: :any, ventura: "9e31fb841d7fa71a0fcbec8df48c6a06ebd4543ba5f61e40d4b9f1909016a836" + sha256 cellar: :any_skip_relocation, arm64_linux: "966055afc3d058370fa8328c08726a9c7f673bf7701ebeac868b1346199d0a21" + sha256 cellar: :any_skip_relocation, x86_64_linux: "798d45983db393bf7540c2636a6df10ecf2da34853ed5400a2868f6612773caf" + end + + depends_on "rust" => :build + depends_on "cbc" + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + 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 "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/70/8a/73f1008adfad01cb923255b924b1528727b8270e67cb4ef41eabdc7d783e/ConfigArgParse-1.7.tar.gz" + sha256 "e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1" + 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/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + 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/8b/50/4b769ce1ac4071a1ef6d86b1a3fb56cdc3a37615e8c5519e1af96cdac366/fastjsonschema-2.21.1.tar.gz" + sha256 "794d4f0a58f848961ba16af7b9c85a3e88cd360df008c59aac6fc5ae9323b5d4" + 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 "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 "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/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" + sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" + 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 "jupyter-core" do + url "https://files.pythonhosted.org/packages/00/11/b56381fa6c3f4cc5d2cf54a7dbf98ad9aa0b339ef7a601d6053538b079a7/jupyter_core-5.7.2.tar.gz" + sha256 "aa5f8d32bbf6b431ac830496da7392035d6f61b4f54872f15c4bd2a9c3f536d9" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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 "plac" do + url "https://files.pythonhosted.org/packages/23/09/26ef2d614cabdcc52a7f383d0dc7967bf46be3c9700898c594e37b710c3d/plac-1.4.5.tar.gz" + sha256 "5f05bf85235c017fcd76c73c8101d4ff8e96beb3dc58b9a37de49cac7de82d14" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + resource "pulp" do + url "https://files.pythonhosted.org/packages/fb/92/bf4b947ec8aac629b835b588e70664c1d0150a8369f798b6c5adb32e39ba/pulp-3.1.1.tar.gz" + sha256 "300a330e917c9ca9ac7fda6f5849bbf30d489c368117f197a3e3fd0bc1966d95" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "reretry" do + url "https://files.pythonhosted.org/packages/40/1d/25d562a62b7471616bccd7c15a7533062eb383927e68667bf331db990415/reretry-0.11.8.tar.gz" + sha256 "f2791fcebe512ea2f1d153a2874778523a8064860b591cd90afc21a8bed432e3" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/96/d2/7bed8453e53f6c9dea7ff4c19ee980fd87be607b2caf023d62c6579e6c30/rpds_py-0.25.0.tar.gz" + sha256 "4d97661bf5848dd9e5eb7ded480deccf9d32ce2cd500b88a26acbf7bd2864985" + end + + resource "smart-open" do + url "https://files.pythonhosted.org/packages/21/30/1f41c3d3b8cec82024b4b277bfd4e5b18b765ae7279eb9871fa25c503778/smart_open-7.1.0.tar.gz" + sha256 "a4f09f84f0f6d3637c6543aca7b5487438877a21360e7368ccf1f704789752ba" + 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/ab/b8/80d90564ca618d7af43b409c90881bac3ecf566ba41239bfb08582f5011c/snakemake_interface_common-1.18.0.tar.gz" + sha256 "2810abb68c1d2e5da69f271c9a0fc819dd9e62249c01db63793504011c7ad39a" + end + + resource "snakemake-interface-executor-plugins" do + url "https://files.pythonhosted.org/packages/61/9d/ca71ec355208cb3f4b2dfb590a09f5081b17e6272cdb904c97de5ee93996/snakemake_interface_executor_plugins-9.3.5.tar.gz" + sha256 "483b4c6b70f92170c4d87cfe213fad4ecab58abfeaee1ec428d3403026745265" + end + + resource "snakemake-interface-logger-plugins" do + url "https://files.pythonhosted.org/packages/b2/30/96e98e0d3feedcaf40820f7604cc86dfb9a0174408e7f70a7fd876a9b8c8/snakemake_interface_logger_plugins-1.2.3.tar.gz" + sha256 "9228cc01f2cc0b35e9144c02d10f71cc9874296272896aeb86f9fac7db5e2c69" + end + + resource "snakemake-interface-report-plugins" do + url "https://files.pythonhosted.org/packages/5e/ae/ee9a6c9475e380bb55020dc161ab08698fe85da9e866477bfb333b15a0ed/snakemake_interface_report_plugins-1.1.0.tar.gz" + sha256 "b1ee444b2fca51225cf8a102f8e56633791d01433cd00cf07a1d9713a12313a5" + end + + resource "snakemake-interface-storage-plugins" do + url "https://files.pythonhosted.org/packages/25/82/29b9212ece305f2a8db47c1b8fabb14174aa7fdde8005a4912c011c3bb54/snakemake_interface_storage_plugins-4.2.1.tar.gz" + sha256 "41f23c1940942d45fe6afa6578b50a7181b2d4d32013421ef2fc1ea0e4bbe137" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + end + + resource "yte" do + url "https://files.pythonhosted.org/packages/79/2d/e397aba1d413e6141ee52e495600d613d77e7d3d89270eda9c60818139bc/yte-1.7.0.tar.gz" + sha256 "d9cadcb597128490356a8260842fd71bf3145fa4ee633ecc4023f53a6b3f646d" + 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..0e5fcb0eea3f7 --- /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 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "75ce7210b6e64830a317d2dce83ad07010f11970c4d6bccf63cba9c53796113f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6cacabdb1e48108acd4738b7b030d1b240e433783a0a1b6d0e8fc20735e58b8d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4fc7432f7e622374f7aedc59312d820952cd8cd14d9f265b88ae206c58c83d2" + sha256 cellar: :any_skip_relocation, sonoma: "cc5b7cd5bd74907bac04e6a0316954e197274e18215fd0b66cddc34093818b4c" + sha256 cellar: :any_skip_relocation, ventura: "01cc2b2bae5b4b5f362626d37756efdccf87089f705a55a98841856f7845f485" + sha256 cellar: :any_skip_relocation, arm64_linux: "e4c653f9541943f6a11e86db50444b7cf42dc74577332c5a2ab17a9a8f903db9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2db01dca11b6887cf9428b9d29de8f1637bf380446ec19b1603bcb60773cbb06" + end + + depends_on "python@3.13" + + resource "tornado" do + url "https://files.pythonhosted.org/packages/59/45/a0daf161f7d6f36c3ea5fc0c2de619746cc3dd4c76402e9db545bd920f63/tornado-6.4.2.tar.gz" + sha256 "92bad5b4746e9879fd7bf1eb21dce4e3fc5128d71601f80005afa39237ad620b" + end + + def install + virtualenv_install_with_resources + end + + test do + require "cgi" + system bin/"snakeviz", "--version" + system "python3.13", "-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..23e61554a09b6 --- /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/snapcore/snapd/releases/download/2.68.4/snapd_2.68.4.vendor.tar.xz" + version "2.68.4" + sha256 "8c6ad7ee2c2a4cb5b59f836a74843cf8337e692dddd33b85c17418e7a6837e80" + license "GPL-3.0-only" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d00577e7b065d60a904fd3d2440d0f828f71383328d58c753d79b126b26be6a2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d00577e7b065d60a904fd3d2440d0f828f71383328d58c753d79b126b26be6a2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d00577e7b065d60a904fd3d2440d0f828f71383328d58c753d79b126b26be6a2" + sha256 cellar: :any_skip_relocation, sonoma: "ed7559f5fa50c1d060831bbf90aad89d8fcfec654a05270c5b4579940d11fca6" + sha256 cellar: :any_skip_relocation, ventura: "ed7559f5fa50c1d060831bbf90aad89d8fcfec654a05270c5b4579940d11fca6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4642c82c0bd41d83f84178722d542686ed5ceea89ceb3f10d38acbce9433a6d8" + end + + depends_on "go" => :build + depends_on "squashfs" + + def install + system "./mkversion.sh", version.to_s + tags = OS.mac? ? ["-tags=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..842b8aa601b23 --- /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 + + bottle do + rebuild 1 + 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, mojave: "71aff7cbb3e78369d6b9a93887820dd7def1afe382ed82211be313942e1bb81d" + sha256 cellar: :any, high_sierra: "b0d670ce6a2d780d13cfaa3346c6aa701f280a85be010dc42c802d6ebd028694" + sha256 cellar: :any, sierra: "e04dea88411f3b444dcab340d3f11bd739fb853de65701e727546a9481981924" + 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..fb72e18f55faa --- /dev/null +++ b/Formula/s/snapcast.rb @@ -0,0 +1,67 @@ +class Snapcast < Formula + desc "Synchronous multiroom audio player" + homepage "https://github.com/badaix/snapcast" + url "https://github.com/badaix/snapcast/archive/refs/tags/v0.31.0.tar.gz" + sha256 "d38d576f85bfa936412413b6860875ba3b462a8e67405f3984a0485778f2fdac" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "503bcd02e9c1cee66a0fe1c31b4fb92c456e0403dbeff251ab37a89d097800ba" + sha256 cellar: :any, arm64_sonoma: "5148be65fd513313ab9eae89eada1ab878e311c5bf7bae260adc8d9742005213" + sha256 cellar: :any, arm64_ventura: "0dbfc1421b25651a69006ac4f2dc5995c79ad832f582b57877b53deed618b47e" + sha256 cellar: :any, sonoma: "e7a695a5486603ca20361ee1ea25680f77cbfefe31b073b2f881c1f4dd7e7302" + sha256 cellar: :any, ventura: "7c12245e729a102ec2b284ce3cc5ff11532269effd442175acc8890c440a1b7f" + sha256 cellar: :any_skip_relocation, arm64_linux: "f75f295d76b5e75bdebb3131c00c38d134d74ec6268951a27e14fcfb7d1486ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f5f9f7d0a5ee35ffa91c5d4e115ce9ba9a16d4cd3511ce01bc882f37b1f3f1f2" + 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("Connected to", 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..ac95bddbaff68 --- /dev/null +++ b/Formula/s/snapcraft.rb @@ -0,0 +1,467 @@ +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.9.1", + revision: "a434a624a5f905b5a2b7c03f352d5b6230d48a53" + license "GPL-3.0-only" + head "https://github.com/canonical/snapcraft.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "d4af1b551f044d338799c5a3c00c74e57e28bcf8c27667f957afe9dc577e426d" + sha256 cellar: :any, arm64_sonoma: "030a3a605f2a4811a3498bb0f316579d6e1b00ca03f8b34bce76625d8b5d97af" + sha256 cellar: :any, arm64_ventura: "121cc78cac09991f79a84bd7db68da674751a37e4e17f9eb5bc8ee89d152cedb" + sha256 cellar: :any, sonoma: "dda2737f0b583b0385491073fee7fe249ed549c5710b97033506e348e58acfb4" + sha256 cellar: :any, ventura: "e828c346984b224b9bec260fe3704e95a3ad8006636070cfd108e980d0b1efa5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a544ba8e4fb9a5a31be7102df3185dac8e96803d54e442c35326a51e2dc258d4" + end + + depends_on "rust" => :build # for pydantic_core + depends_on "certifi" + depends_on "libsodium" + depends_on "libyaml" + depends_on "lxc" + depends_on "pygit2" + depends_on "python@3.13" + 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 + + # 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + 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 "catkin-pkg" do + url "https://files.pythonhosted.org/packages/2e/a2/88f8ba42a0119833887b8afe159f6e3ae96e2700720baf461eeabcc6acd8/catkin_pkg-1.0.0.tar.gz" + sha256 "476e9f52917282f464739241b4bcaf5ebbfba9a7a68d9af8f875225feac0e1b5" + 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/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "craft-application" do + url "https://files.pythonhosted.org/packages/0a/f5/b2f41e857a9e0999a1a279c2464afcdfb8b1af3671b3b3fa18c04c158a74/craft_application-5.2.0.tar.gz" + sha256 "9c21b61c9231be56037bdd497f1ea20942de492caaf04958ae852238372a2681" + end + + resource "craft-archives" do + url "https://files.pythonhosted.org/packages/a0/b2/40c6f0fc84c87be9fe93aafbc0e98d0d5529aad351e9261fbab9ed1955fa/craft_archives-2.1.0.tar.gz" + sha256 "1796ddbdd841443884b4820a9d95ea96639ae8d776c4f0c4a287346e2ccc8e94" + end + + resource "craft-cli" do + url "https://files.pythonhosted.org/packages/96/64/86c6310c29a2b58470ee2ddef188a03250bdb2cffa07229e55776b63ac8c/craft_cli-3.0.0.tar.gz" + sha256 "9dd847d62648fd312284e63237386ff99fc4d24f1adfa0100fe08b003abfe6d9" + end + + resource "craft-grammar" do + url "https://files.pythonhosted.org/packages/4f/75/f4851b02aacbf77ff581c4e09f338920ed0786cf4846c16ae3a65534b9fd/craft_grammar-2.0.3.tar.gz" + sha256 "90bb9a8a2bf97df866798e634ec6d365c3bee01183c2e1a16394282b411b96a7" + end + + resource "craft-parts" do + url "https://files.pythonhosted.org/packages/38/e2/e447994c1436b0ae3a8c4987f96fa8d45b62330f363a6d77cf7e4f5bae16/craft_parts-2.10.0.tar.gz" + sha256 "62a0dbca7248769dc43ce1f8755aff65af1b2d1df1627ac27251325b4b9e5bce" + end + + resource "craft-platforms" do + url "https://files.pythonhosted.org/packages/e7/3b/96f9c7aaf9eca6f677b880029e7c1c160b927d3409f8dc1954d4ccd2a22b/craft_platforms-0.8.0.tar.gz" + sha256 "0c18f39aef7caadc7b101aa5123e76b4e32396d3217af7bad1184a5014f29369" + end + + resource "craft-providers" do + url "https://files.pythonhosted.org/packages/69/d9/5c9195dbd410c978ef8f7172ddef7ab86d10f501560ee49dcdae1497e8f4/craft_providers-2.3.0.tar.gz" + sha256 "8b9f60d587d118e35e6cf0c28ffffafe5c8e40e3e6c49da3b171a3d18a070ffa" + end + + resource "craft-store" do + url "https://files.pythonhosted.org/packages/78/80/edc3cf128f1e3302f0c591539a278b4bd6a09ad23e959f620494ce8cb285/craft_store-3.2.1.tar.gz" + sha256 "0c8ae8870362e6e670c0766026849683f6f4563d108a7acca800d4db024a3a21" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + 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/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 "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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + 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/0d/c816f5ea5adaf1293a1d81d32e4cdfdaf8496973aa5049786d7fdb14e7e7/jsonschema-2.5.1.tar.gz" + sha256 "36673ac378feed3daa5956276a829699056523d7961027911f064b52255ead41" + 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/74/6f/8709031ea6e0573e6075d24ea34507b0eb32f83f10e1420f2e34606bf0da/license_expression-30.4.1.tar.gz" + sha256 "9f02105f9e0fcecba6a85dfbbed7d94ea1c3a70cf23ddbfb5adf3438a6f6fce0" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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 "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/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + 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/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + 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/c8/8c/cf2ac658216eebe49eaedf1e06bc06cbf6a143469236294a1171a51357c3/protobuf-6.30.2.tar.gz" + sha256 "35c859ae076d8c56054c25b59e5e59638d86545ed6e2b6efac6be0b6ea3ba048" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz" + sha256 "7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "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/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/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + 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/ce/8d/2ebc549adf1f623d4044b108b30ff5cdac5756b0384cd9dddac63fe53eae/python-debian-0.1.49.tar.gz" + sha256 "8cf677a30dbcb4be7a99536c17e11308a827a4d22028dc59a67f6c6dd3f0f58c" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/e3/7b/8f398d91382a2bbae06530389f74d6296a4da04827144a3015f34b7d82c4/requests_unixsocket2-1.0.0.tar.gz" + sha256 "8c6cad0326369658db931b4c36f03cd1cccb7668e081e7fb3972b500a93bb563" + 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/95/32/0cc40fe41fd2adb80a2f388987f4f8db3c866c69e33e0b4c8b093fdf700e/setuptools-80.4.0.tar.gz" + sha256 "5a78f61820bc088c8e4add52932ae6b8cf423da2aff268c23f813cfbb13b4006" + end + + resource "simplejson" do + url "https://files.pythonhosted.org/packages/af/92/51b417685abd96b31308b61b9acce7ec50d8e1de8fbc39a7fd4962c60689/simplejson-3.20.1.tar.gz" + sha256 "e64139b4ec4f1f24c142ff7dcafe55a22b811a74d86d66560c8815687143037d" + 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-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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[jeepney secretstorage pylxd ws4py] if OS.mac? + virtualenv_install_with_resources(without:) + 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..b44674293c4d1 --- /dev/null +++ b/Formula/s/snappy.rb @@ -0,0 +1,104 @@ +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.1.tar.gz" + sha256 "736aeb64d86566d2236ddffa2865ee5d7a82d26c9016b36218fcc27ea4f09f86" + license "BSD-3-Clause" + head "https://github.com/google/snappy.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "45275e26a466be03a8a2b81ef27afc862038b220cdf7d8cd63f6ff9f47f18e56" + sha256 cellar: :any, arm64_sonoma: "2b905dfed7d6c0b44de9c89a79a6aa69824758c2727dcffe95bc6ebef465cf3f" + sha256 cellar: :any, arm64_ventura: "ca5b33ef7fd245020808bcb339f5b7799a4d4441b50c430c9bdd4eeca6a7d785" + sha256 cellar: :any, arm64_monterey: "a3ad18bfdb378542375074f5f3423bb4972147595ee7b3ec38acd04469bff5db" + sha256 cellar: :any, sonoma: "4a39b310e4c5a726de262265e14cb0ee219f89c0da0afd19328007d965dba7f8" + sha256 cellar: :any, ventura: "80fa828013ffa932262d110a351fc4f28f44524cc783d23c15b61328182170ac" + sha256 cellar: :any, monterey: "e31f618776a2346ae18b6aa8bc035e0edc3c1dbf421498ef13f8b5a1e75fd1be" + sha256 cellar: :any_skip_relocation, arm64_linux: "039293445a70911dc94d20f009811e1ae86a0364c2df18f6ff5934586129b4e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c33db20cdc5d828f5f90eb3996f6729a02ebf697bf0a67d28f59feeb24bed42" + 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 + + # Fix to cmake 4 compatibility + # PR ref: https://github.com/google/snappy/pull/200 + patch do + url "https://github.com/google/snappy/commit/a688be4b77b954c403db805c8351ff62770f1044.patch?full_index=1" + sha256 "d7ce00be23a95bc438ec00a287de1c52a2b7d9c261a365a4a2b458e29b486fd8" + end + + 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 672561e..2f97b73 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -76,10 +76,6 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "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(CMAKE_CXX_COMPILER_ID STREQUAL "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..a1f6bb1a76fed --- /dev/null +++ b/Formula/s/snappystream.rb @@ -0,0 +1,63 @@ +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" + + bottle do + 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 + ] + + 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..60bf8f2b0251f --- /dev/null +++ b/Formula/s/snapraid.rb @@ -0,0 +1,34 @@ +class Snapraid < Formula + desc "Backup program for disk arrays" + homepage "https://www.snapraid.it/" + url "https://github.com/amadvance/snapraid/releases/download/v12.4/snapraid-12.4.tar.gz" + sha256 "bc15ad9c42ddf9bd70033562a10e9b9fec43afed54c48fe22da4b6835657ec1b" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "be651a06a787a34c2a61ec630533c9f797466f39e08263b20001f9847716410f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3584f9baf7c68d40594c5cd6e55f2673673c89e9cee864761189841ae1618d0b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4fdcfb27a1c6b992091984301b37490227c5d76e4c29b0c185f013b056589ae8" + sha256 cellar: :any_skip_relocation, sonoma: "3db986583cb40047356a50b2f930e584cfecb08acbbf1fece8eefa126613dcd9" + sha256 cellar: :any_skip_relocation, ventura: "525798bd506d2e33f10e5732f919aca3886106df15d02b42338600ad717a4756" + sha256 cellar: :any_skip_relocation, arm64_linux: "e06bbc388fc22c7502f614c6489c5f6ec7e626000054dcb870cbd4b9be557467" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2e1a40ce144a059183f2fa5e2e070bd27e41340d4329feae564eb2aefefe5cd3" + 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..5a7aef53e15ef --- /dev/null +++ b/Formula/s/sng.rb @@ -0,0 +1,35 @@ +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 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..1daa19df2ce00 --- /dev/null +++ b/Formula/s/sngrep.rb @@ -0,0 +1,41 @@ +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/refs/tags/v1.8.2.tar.gz" + sha256 "1cd05bddd531b353e3069c5243e7076b60a3ee907dbbc3c9c2834676ed8c4bac" + license "GPL-3.0-or-later" => { with: "openvpn-openssl-exception" } + + bottle do + sha256 cellar: :any, arm64_sequoia: "0bfc56c0e4f1b9ffdea333a9fe372928b81b6bc0b931e3629b1c822bb062272f" + sha256 cellar: :any, arm64_sonoma: "af78fe4604a4b205135a31f113a35907d121d08bd7352f5747f82afbfbf7b964" + sha256 cellar: :any, arm64_ventura: "024eb3f86b15664e9cdae3dec40226b91432a2abe44bd3e6c72fbcff0f9c6167" + sha256 cellar: :any, arm64_monterey: "2ce85bce10e93345e1991e4d23d92f46df955cf90c20bf47a0abe4eea4d9c0f7" + sha256 sonoma: "57d93a31a23337e083f75ff3df8c40731fbd68d857678599184027f9240947c0" + sha256 ventura: "9fdeee12cf3751750380301d66b61d0862e568b3f789e9bc21bd676b0495168f" + sha256 monterey: "230ba56b3c53cd525f4dbed3495ec75c63cba1306c5d4cc5356573e22a2cf464" + sha256 cellar: :any_skip_relocation, arm64_linux: "638308e2f58d25eecb2023dfb5e4c44bf344b664f428cd6af59b5a117b5a2827" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a6c9d43d767e6ae8f902fc0e74c4dff3ca255e94178cc0aa108e1241b797ea67" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "ncurses" if DevelopmentTools.clang_build_version >= 1000 + depends_on "openssl@3" + + uses_from_macos "libpcap" + uses_from_macos "ncurses" + + def install + ENV.append_to_cflags "-I#{Formula["ncurses"].opt_include}/ncursesw" if OS.linux? + + system "./bootstrap.sh" + system "./configure", *std_configure_args, + "--disable-silent-rules", + "--with-openssl" + 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..3246c6c0968c3 --- /dev/null +++ b/Formula/s/sniffer.rb @@ -0,0 +1,31 @@ +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.2.tar.gz" + sha256 "8da1a20155518da7c195fd370ab2811d02eddcfc11f423f75335f7b8024d42f0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1e4896b43b3ea3b7a8065fd9de52737c9e56adef3b5aa8cbe7e05b29fafbb725" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f5aac7f08562aeaef83c298a129f8749a3c94f37ed31a771c0fb098fb9926c1a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "426df2385cf9a2725bb85856e9e825177c7ebfba07baf662f7e15c03cb934d18" + sha256 cellar: :any_skip_relocation, arm64_monterey: "14357cfb10b5c6a0dfd256265b0a15381696714e841bb88bceb59b0c1d8f0ed8" + sha256 cellar: :any_skip_relocation, sonoma: "0039e5ac0e23ec4990badeae4d3adc5d244de339060b7c92991716751b1d1239" + sha256 cellar: :any_skip_relocation, ventura: "257d8ea96ca570d8040cb01613c103836f6620cd0e07759e93cf7df891a40f6f" + sha256 cellar: :any_skip_relocation, monterey: "721dde5fd616c6255cafbf6fb65d27459579829b92dc7d59c3b2638e6e9394d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "9380e8bab28258abc9fba37619c04a54c2a9e6b91d847d2ab5a643a1a47e2f2a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b01bfd9aa799259150ec8dd50050d4787b6410377ba2c62b93b0dc157c182f5b" + 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..ebe1fd11193bb --- /dev/null +++ b/Formula/s/sniffglue.rb @@ -0,0 +1,47 @@ +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_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..5c189010e1ef2 --- /dev/null +++ b/Formula/s/sniffnet.rb @@ -0,0 +1,42 @@ +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.3.2.tar.gz" + sha256 "92ad92196245f36df9380091623beceb7ba4dc1d3b7f0844791c0dff302a3a46" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/GyulyVGC/sniffnet.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f2609e62911aebd894cd36891beb8e0ac93e3ea6f7cca899bf4b6af97564ad65" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d3404a406a6c48f5f35d97d9a2e3e383bd56214d928643456994b025d91e89d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "848d8a0dcb279614da33dd84b0a996622718b943f73747d06041b09e976e74c0" + sha256 cellar: :any_skip_relocation, sonoma: "e9d4a0118cecb9c689a67777d8f9f755610bb9220ccdace535ef76c3c21938cd" + sha256 cellar: :any_skip_relocation, ventura: "5275d58ab13e3f747829436216a8e8906847a6f38152c7e0e07078355b8ace4c" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b5cd32a6492908157ac2f21540cfa986b0462c510ff6c291ea20e4fd65a0fd7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c9c54e12d99526592752f2afab1de70b7fbbbe51712b3228b67d1a7ca6ad2623" + end + + depends_on "rust" => :build + depends_on "openssl@3" + + uses_from_macos "libpcap" + + on_linux do + depends_on "pkgconf" => :build + 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..ac242f7b6207e --- /dev/null +++ b/Formula/s/snobol4.rb @@ -0,0 +1,85 @@ +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.2.tar.gz" + sha256 "41e301e9dd180d70117d64f3694f9dd54f9ed909a36a32587c8bed85ab68ac15" + 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_sequoia: "a3ff59d306972bd935fdb85d54681c8ab597f3179b83b1b8ee216ef40582d732" + sha256 arm64_sonoma: "7baa9cfb9bdbb89ec8f1817fccc3f4a3531e56822617a3bab083459029a6457a" + sha256 arm64_ventura: "bab2633cd719743f5648b6a5fa32dae630ad6b7bc4400417747f834226c860e6" + sha256 arm64_monterey: "90e3d3102cb1b10ad1578aad8f4fcaec31c2960a4ad54e54983f4778b5646a97" + sha256 sonoma: "c4576d539a10c904408404d64fde008b7939d8fbcddf2e739738b38c9fe613bd" + sha256 ventura: "c8c5b13e46532544bdc4fa93d3670fa5b648d5a9aa9593758a9e83bd9d72f897" + sha256 monterey: "e4d3d40f4b8bd51e49b1c99de9590e79f00876fadb28c13cf98070525106a5ea" + sha256 arm64_linux: "81955f54464190c8e608a813fde680eddb620d40785884971e33f50845ec486a" + sha256 x86_64_linux: "c555c7e31212c27a251d42ebf6b166ee1ac59c6d306c60327a8e1e429d1a7f7a" + 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/snort.rb b/Formula/s/snort.rb new file mode 100644 index 0000000000000..14356c0b03a13 --- /dev/null +++ b/Formula/s/snort.rb @@ -0,0 +1,79 @@ +class Snort < Formula + desc "Flexible Network Intrusion Detection System" + homepage "https://www.snort.org/" + url "https://github.com/snort3/snort3/archive/refs/tags/3.7.2.0.tar.gz" + mirror "https://fossies.org/linux/misc/snort3-3.7.2.0.tar.gz" + sha256 "5dc9beb0e115b6c33ce3cc8bd4a38decfb82c199761233e9ee21401a047e0f27" + 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_sequoia: "3fc868494ea43c963cff5158c9e8def60e6751fb669dfb7fb79278af8067adf0" + sha256 cellar: :any, arm64_sonoma: "734d12bcc90257a6ddf0fbf1a352f5e9acee3d58d7221692858292a0b3e73574" + sha256 cellar: :any, arm64_ventura: "61a203e3765d87b6c7b5a7fcd22a94f0895f8c85d51edb3bf49cc34dc5c0382a" + sha256 cellar: :any, sonoma: "1eadafaaa6d02c510b5e66b54c679cbd8a13a74950b57bbd0d08006d36c439cf" + sha256 cellar: :any, ventura: "2f49306b9f6c26fe8d3c4d2912158776d98ae9244c96bfe7202e5572a633cdff" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7e01bb1207df411a15fdd77b278c4bbc177e38185259cf5424e793043a8eb70" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a61434570b7329bdc4d33351d6a0a373f41eeabe0d7edec03c606719d338ba8" + 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 + + # support cmake 4.0, upstream pr ref, https://github.com/snort3/snort3/pull/409 + patch do + url "https://github.com/snort3/snort3/commit/565f3ee1fc9c62a8943a82f0f52a7973530f9a18.patch?full_index=1" + sha256 "bcd3ce2d90e98c55e57aba85be879a290976c232e9ab2ee9d45b295eb61178af" + 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..eac82a2174ff9 --- /dev/null +++ b/Formula/s/snow.rb @@ -0,0 +1,49 @@ +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 + + bottle do + rebuild 2 + 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..c0f0d381e9c6f --- /dev/null +++ b/Formula/s/snowball.rb @@ -0,0 +1,32 @@ +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" + + bottle do + 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..68d3f17339351 --- /dev/null +++ b/Formula/s/snowflake-cli.rb @@ -0,0 +1,282 @@ +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/1f/d7/fcf7c60667191f4bf9e9bcb84b318c92a92936b5a4634110c14d86b1271b/snowflake_cli-3.7.2.tar.gz" + sha256 "06eb21d87a6ae6f5a65c496153f2c4af74dade5d24acceb718188432be56f6ca" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "488bbf6c2939456d60196a3dbeb3425d12376795d0cedbd627538d3ba993f7d2" + sha256 cellar: :any, arm64_sonoma: "48f64424ceb5ac91327dbe3d0c2f96b593f463f9e21fcc4f5571fbd0bb0ca575" + sha256 cellar: :any, arm64_ventura: "a14bb336727b876b036f9da281a9f8a09c8c29040343cb362c638cc635497050" + sha256 cellar: :any, sonoma: "eaedf509e556463eaee2fc4bb60cd0408096107f61fb38e2a2aa4f0539934c14" + sha256 cellar: :any, ventura: "cb1baf1ed6406154f30a52cd7732cffe81a5c3e04d316cffa55d9b2c190568a7" + sha256 cellar: :any_skip_relocation, arm64_linux: "fa506406f1eb3d518180366d14629efdcec3cad5357687e0eead7c975c6fc2be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ae0efc4066295bbe24da917a9c08bcbe3ef052b8745d283bd265c510be71e97" + end + + depends_on "rust" => :build # for pydantic-core + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + conflicts_with "snow", because: "both install `snow` binaries" + + 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/c7/89/a47f62b3f81a2e3484d2a2b8dd4906c5b6e57da0af0bd59d36f99ba20baf/boto3-1.38.13.tar.gz" + sha256 "6633bce2b73284acce1453ca85834c7c5a59e0dbcce1170be461cc079bdcdfcf" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/de/36/5b0faba074684744244e1e030e73fd5612bc2c38f557eec0a7f1a3d7ddd2/botocore-1.38.13.tar.gz" + sha256 "22feee15753cd3f9f7179d041604078a1024701497d27b22be7c6707e8d13ccb" + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + 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 "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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + 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 "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/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 "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/ce/a0/834b0cebabbfc7e311f30b46c8188790a37f89fc8d756660346fe5abfd09/more_itertools-10.7.0.tar.gz" + sha256 "9fddd5403be01a94b204faadcff459ec3568cf110265d3c54323e1e866ad29d3" + 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/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/b0/41/832125a41fe098b58d1fdd04ae819b4dc6b34d6b09ed78304fd93d4bc051/pydantic-2.11.2.tar.gz" + sha256 "2138628e050bd7a1e70b91d4bf4a91167f4ad76fdb83209b107c8d84b854917e" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + 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 "pyopenssl" do + url "https://files.pythonhosted.org/packages/9f/26/e25b4a374b4639e0c235527bbe31c0524f26eda701d79456a7e1877f4cc5/pyopenssl-25.0.0.tar.gz" + sha256 "cd2cef799efa3936bb08e8ccb9433a575722b9dd986023f1cabc4ae64e9dac16" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "requirements-parser" do + url "https://files.pythonhosted.org/packages/05/70/80ed53ebd21853855aad552d4ed6c4934df62cd32fe9a3669fcdef59429c/requirements_parser-0.11.0.tar.gz" + sha256 "35f36dc969d14830bf459803da84f314dc3d17c802592e9e970f63d0359e5920" + 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/fc/9e/73b14aed38ee1f62cd30ab93cd0072dec7fb01f3033d116875ae3e7b8b44/s3transfer-0.12.0.tar.gz" + sha256 "8ac58bc1989a3fdb7c7f3ee0918a66b160d038a147c7b5db1500930a607e9a1c" + 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/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + 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/99/ff/7c1b2cbb5a43b21abebfa58c83926266e9f5ea05123e795753da6ce84f96/snowflake_connector_python-3.15.0.tar.gz" + sha256 "1ef52e2fb3ecc295139737d3d759f85d962ef7278c6990c3bd9c17fcb82508d6" + 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/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + resource "typer" do + url "https://files.pythonhosted.org/packages/8b/6f/3991f0f1c7fcb2df31aef28e0594d8d54b05393a0e4e34c65e475c2a5d41/typer-0.15.2.tar.gz" + sha256 "ab2fab47533a813c49fe1f16b1a370fd5819099c00b119e0633df65f22144ba5" + end + + resource "types-setuptools" do + url "https://files.pythonhosted.org/packages/87/f5/27854a6912bb6a13e42ab342409fadc5613bf9d36ac9a69e8211771c5e6a/types_setuptools-80.4.0.20250511.tar.gz" + sha256 "faa4159c9384e45b3b04218ca43ee3829efb6acc303e0ee561e47b3404423d32" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + virtualenv_install_with_resources + 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..2a53dbf533acc --- /dev/null +++ b/Formula/s/snowflake.rb @@ -0,0 +1,36 @@ +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_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, 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..05bd77ee3751b --- /dev/null +++ b/Formula/s/snownews.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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..3d4d4237154c1 --- /dev/null +++ b/Formula/s/sntop.rb @@ -0,0 +1,61 @@ +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 + + bottle do + rebuild 1 + 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 mojave: "d010bc2fa761320d0d0f4948d5f95392d892e7bd7815418e9881ec90049d4036" + sha256 high_sierra: "c22d769ddb8599acf3f03db2ef85eef5ee28e41f9ec3011e9b23f6168ceb0a76" + sha256 sierra: "f15c15a4e2251e86e55c3bd2c75f660448e38efe9b0b57edd6d3e9301377929c" + sha256 el_capitan: "c3f19036cf2d42ce9fa07ed6db6264b3e52ba475827903972877a8131eae60e9" + 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..f8315f8f0eabe --- /dev/null +++ b/Formula/s/snyk-cli.rb @@ -0,0 +1,35 @@ +class SnykCli < Formula + desc "Scans and monitors projects for security vulnerabilities" + homepage "https://snyk.io/" + url "https://registry.npmjs.org/snyk/-/snyk-1.1297.0.tgz" + sha256 "37fea0a588399299c837c5da374771e87196cf54f909cae748aacc0623ad754d" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "44eb6c987660c1c15e54b565b9fc0e67d9f1883bf52ef00419457419c93a0156" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "44eb6c987660c1c15e54b565b9fc0e67d9f1883bf52ef00419457419c93a0156" + sha256 cellar: :any_skip_relocation, arm64_ventura: "44eb6c987660c1c15e54b565b9fc0e67d9f1883bf52ef00419457419c93a0156" + sha256 cellar: :any_skip_relocation, sonoma: "02acc799ce455f3cf9b2c5a4818204c0349d62c1aa33e0b380b271b6b956b824" + sha256 cellar: :any_skip_relocation, ventura: "02acc799ce455f3cf9b2c5a4818204c0349d62c1aa33e0b380b271b6b956b824" + sha256 cellar: :any_skip_relocation, arm64_linux: "edbc440ab245588118c5d9c090811f92a3b31edaea95bfd0d94ed5ab5d2b7731" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00a81ba4f815c1265d44cb83e33faeb25417f1c19fdee43af41e82f4bfa7808a" + 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..e22e34dd9c0b6 --- /dev/null +++ b/Formula/s/snzip.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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..8bd15d3dcaf1b --- /dev/null +++ b/Formula/s/so.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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 "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + 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..8cc7eade3552e --- /dev/null +++ b/Formula/s/soapyhackrf.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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 + system "cmake", "-S", ".", "-B", "build", *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..88071179b9179 --- /dev/null +++ b/Formula/s/soapyremote.rb @@ -0,0 +1,33 @@ +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_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 + system "cmake", "-S", ".", "-B", "build", *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..d69da1a14ce95 --- /dev/null +++ b/Formula/s/soapyrtlsdr.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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 + system "cmake", "-S", ".", "-B", "build", *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..1334dff3cabf4 --- /dev/null +++ b/Formula/s/soapysdr.rb @@ -0,0 +1,107 @@ +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 + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_sequoia: "2cd1b0106c59df55ee3022f0e426718979343f8c0791a1cbf189a0230b582967" + sha256 cellar: :any, arm64_sonoma: "037c6ec56ece7b022d890f8c42f9e8b7e012ec9a641901d4d73a961a8f7f069d" + sha256 cellar: :any, arm64_ventura: "d091d29209ae4319ddb8db5f2bc8c3f828953db36b619f2288df08c6cb2f2db1" + sha256 cellar: :any, sonoma: "e90833db385d8e3ce0c8eb4f138834d1da1db6879ca46be2f5f52a4f68957e44" + sha256 cellar: :any, ventura: "dbbc7e560136986fb5604d2c752890d5ee299725768fa61dc5ddd2bfd2e73be0" + sha256 arm64_linux: "20de753561fae444f356d230eff4d1d67dee481e6db1bed339dd419d710eaf64" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d1227202d6306ddbc0d33b3f94904cc51b6ebfd61802fd411fb51fdd306e2f4a" + end + + depends_on "cmake" => :build + depends_on "swig" => :build + depends_on "python@3.13" + + def python3 + "python3.13" + end + + def install + args = %W[ + -DPYTHON_EXECUTABLE=#{which(python3)} + -DSOAPY_SDR_ROOT=#{HOMEBREW_PREFIX} + -DCMAKE_INSTALL_RPATH=#{rpath} + ] + args << "-DSOAPY_SDR_EXTVER=release" unless build.head? + + 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..e4a0620ec82f8 --- /dev/null +++ b/Formula/s/socat.rb @@ -0,0 +1,35 @@ +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 + sha256 cellar: :any, arm64_sequoia: "2aaa10446c3d48a4abae274444c3ab9de518616dec42dde68146220d1cc58cf9" + sha256 cellar: :any, arm64_sonoma: "137815efa3654ce88233eadb28d740d3fee351d89f2d65a31ae30d1fa32e77ed" + sha256 cellar: :any, arm64_ventura: "ed40e4fd40e2cf47cc732fbe1b188922e7b41d13df5917509fab2335f24f7398" + sha256 cellar: :any, sonoma: "c418f4b948cc59f250fa1467eed47b1cf088d6a17ea8c94f6525348693af2339" + sha256 cellar: :any, ventura: "5986bf1538a59cb4ee5d285f54d17f3ee893d993d174ee9ce2cedb2a2c567779" + sha256 cellar: :any_skip_relocation, arm64_linux: "56e85c0167c53a685bb332c47a18e40fa0f6133783c70acc3db6a43189c8f98b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "90337fcfe325651b99280dcb87e3e9bdfc4ad25dfaf7a9fbb7227fac4ff68cad" + end + + depends_on "openssl@3" + depends_on "readline" + + def install + system "./configure", *std_configure_args, "--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/s/soci.rb b/Formula/s/soci.rb new file mode 100644 index 0000000000000..bfbc9f6dd8597 --- /dev/null +++ b/Formula/s/soci.rb @@ -0,0 +1,62 @@ +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.1/soci-4.1.1.zip" + sha256 "b59bc01ec20fd9776cdb071f600acbe66b5a3f3350561abb97f5707649921d9c" + license "BSL-1.0" + + livecheck do + url :stable + regex(%r{url=.*?/soci[._-]v?(\d+(?:\.\d+)+)\.zip}i) + end + + bottle do + sha256 arm64_sequoia: "52ef9b3f00b41eb6ce74b96700fa573ba5b7e310be4c35138484efb322669556" + sha256 arm64_sonoma: "7b09d3822744eb4ab4360a6ec309fe8faaf7258f6f15ee6dbad0de4b9354d76d" + sha256 arm64_ventura: "db67c0d06a017cfdce97066f2d6fb69e2d59c7daa2c7677f68900a8e95390649" + sha256 sonoma: "4d7b3fdf3c82a65f37fcb50cd3937c180abc7980c68adc6f2216519a4926c099" + sha256 ventura: "84d2bb89ce70ba3a26f302a69b06b4a72057dfc99412595f8a56106d565f53d6" + sha256 arm64_linux: "29a9b223156659e2533f0164962f043c80c10ee1537dea870341057059ac9311" + sha256 x86_64_linux: "a4df53be23c078dc937baa5e1aef8c86c4cc432e9cd39e63d59a8d18a039778c" + 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..6cbcb5ea5f57e --- /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_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 "Homebrew's bin directory is often writable by a non-admin user" + + depends_on :macos + depends_on macos: :catalina + + 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..daaa900b7d917 --- /dev/null +++ b/Formula/s/sofia-sip.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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..bc6a0df8fa6bb --- /dev/null +++ b/Formula/s/soft-serve.rb @@ -0,0 +1,34 @@ +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.8.5.tar.gz" + sha256 "e8a432e8d1a891d7ca6f8b16fa4455db57b3484b7728fdb1ae9a77d4fa0d7045" + license "MIT" + head "https://github.com/charmbracelet/soft-serve.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "559974917d8f906fd451f58a24b16f5d50bb3806785b7bc9f003e628e2e34d59" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "299e9067d96c78b4cea98c8b29c5429cee8ed376937523057cc348571e536439" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ae92b211b6025dcba653a8752cf2615ba3d92110f8b9363b3d8cb39246cd07aa" + sha256 cellar: :any_skip_relocation, sonoma: "21e1fca746da038795826c4b64a0ee3d9696a7e941127665a0b90cf2889c1b23" + sha256 cellar: :any_skip_relocation, ventura: "7d7bed45e73c6c2bff333d9b684e75c95460322099314c8319f1916cb22f33fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "38dfd97a35a041d749cf6adef5060c6f35b4b9bf876e0c7ea4aefa972c92c966" + 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..5361142ecd4ae --- /dev/null +++ b/Formula/s/softhsm.rb @@ -0,0 +1,67 @@ +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.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 + + bottle do + rebuild 2 + 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..087b3a2d9253e --- /dev/null +++ b/Formula/s/solana.rb @@ -0,0 +1,62 @@ +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: :repo_archived + + 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..d556fdf6db4ae --- /dev/null +++ b/Formula/s/solargraph.rb @@ -0,0 +1,53 @@ +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.54.4", + revision: "8b25f44b49e19094fbbff8acccfd8b21f9916155" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "78d04761186a1d0d097265bc3ab8aeae9701c0a7ca30dfbcc605cc23639d2727" + sha256 cellar: :any, arm64_sonoma: "e49d2ac03caededa752e5b701a89c9edcfb2a00c90d70aae834cda04d716aa69" + sha256 cellar: :any, arm64_ventura: "4765f90a84ace3b14806fb0a5638b9f43b96900100df7f3a7a9abf624b689965" + sha256 cellar: :any, sonoma: "8eeaa3b07a9f90f4bea290067503d39f45b44515a500505d25aa0608dee34b83" + sha256 cellar: :any, ventura: "f82d4aa24d5fce711dcba65f9e5bb10d1f8823df1be318d0f5eb3d16c8c05e76" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9d20233dd51f8fb116f4456f157fcb2f96a195517fc69491b47eb7d4d8218e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17e292945506e57f999d6b6f0a93a20d89bad4fdf3a6d4db16edfc48c82c788d" + 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..2a261207d8882 --- /dev/null +++ b/Formula/s/solarus.rb @@ -0,0 +1,60 @@ +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_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..eeb50850ad172 --- /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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ea3957a265f7ca3d516f7c3faefc58c9bce7d53644395922223d2210836c5a3d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "36ea54913d7a7f3d7c1085ffd19833e8be6a40228326afb5a73983557df19c63" + sha256 cellar: :any_skip_relocation, arm64_ventura: "742ba15309a69e1de2019f7d96a5eff594086049cb29e676111296ac5d85cab7" + sha256 cellar: :any_skip_relocation, sonoma: "8be48b55beeaf881ebcf778dc87ba5f3041337c6c39745a5498eeab6a1ab9dc2" + sha256 cellar: :any_skip_relocation, ventura: "25521bbb2e161e5e4dda3528b8db73492ff8c452b9af2210b94e41ec8eb77a7f" + sha256 cellar: :any_skip_relocation, arm64_linux: "a5dfff3b8b387a2dfdff1752ec12ea03850b75284052b59ba0ec008c48c45acb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84e29ee66be49ea56f3c7c901b16cbde55f6505572b57a933e92083d3443d986" + end + + depends_on "python@3.13" + + conflicts_with "solidity", because: "both install `solc` binaries" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/44/e6/099310419df5ada522ff34ffc2f1a48a11b37fc6a76f51a6854c182dbd3e/pycryptodome-3.22.0.tar.gz" + sha256 "fd7ab568b3ad7b77c908d7c3f7e167ec5a8f035c64ff74f10d47a4edd043d723" + 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..ec60269856951 --- /dev/null +++ b/Formula/s/solhint.rb @@ -0,0 +1,45 @@ +class Solhint < Formula + desc "Linter for Solidity code" + homepage "https://protofire.github.io/solhint/" + url "https://registry.npmjs.org/solhint/-/solhint-5.1.0.tgz" + sha256 "a81a2bdbefa6f9b4918b5211a955ba37219db06474345dbfa2bb0a8fc47b43c0" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8838c345b0300720adcae400fd4c0cffb0e6845de7fa615230901e86131e9f6c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8838c345b0300720adcae400fd4c0cffb0e6845de7fa615230901e86131e9f6c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8838c345b0300720adcae400fd4c0cffb0e6845de7fa615230901e86131e9f6c" + sha256 cellar: :any_skip_relocation, sonoma: "1008a9f0bf0241dc5077bfb864f543f348e530bd15f92fe80f52a42442190c63" + sha256 cellar: :any_skip_relocation, ventura: "1008a9f0bf0241dc5077bfb864f543f348e530bd15f92fe80f52a42442190c63" + sha256 cellar: :any_skip_relocation, arm64_linux: "8838c345b0300720adcae400fd4c0cffb0e6845de7fa615230901e86131e9f6c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8838c345b0300720adcae400fd4c0cffb0e6845de7fa615230901e86131e9f6c" + 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..4e99c37ebf8b9 --- /dev/null +++ b/Formula/s/solid.rb @@ -0,0 +1,62 @@ +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"] + + bottle do + 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..d06431510411f --- /dev/null +++ b/Formula/s/solidity.rb @@ -0,0 +1,60 @@ +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"] + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "473fa776a7d59bcddcd39fcae1decae308a7fcf76b955ad737788edb788dd1b1" + sha256 cellar: :any, arm64_sonoma: "1fff4b5d4ee6fdfe9f580cb4a0f9102a335c01c3e9cb9b43907b2904e1d9830d" + sha256 cellar: :any, arm64_ventura: "3056f30a88cf1eb1283ca37ee98d52a3b799f49cc4da481161ff4f5bf6f717e6" + sha256 cellar: :any, sonoma: "5c54b89ae94ff561cb13ae3f1a5614a9a0996a1101602aa68fd6d911b8cb05c6" + sha256 cellar: :any, ventura: "754784a2bf9a57e6fe88d57c43465af5a721667250faf7767e817421438c4a13" + sha256 cellar: :any_skip_relocation, arm64_linux: "e9d10fb6a132c5d5f5b36ef1c9296ad9f4c25a2236822e054150ac057f72154a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e88792a9be5d50f8732d8679c3fba67b84c9ecc839e9af1bcd114c4fcb543111" + 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" + + 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..3d9c271a6331d --- /dev/null +++ b/Formula/s/sollya.rb @@ -0,0 +1,63 @@ +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_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..1793fdd119f94 --- /dev/null +++ b/Formula/s/solo2-cli.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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 "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + 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..f32fb682781a8 --- /dev/null +++ b/Formula/s/solr.rb @@ -0,0 +1,60 @@ +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.8.1/solr-9.8.1.tgz" + mirror "https://archive.apache.org/dist/solr/solr/9.8.1/solr-9.8.1.tgz" + sha256 "a789110131bc8cb71b0233d528e4fa5ffa566bab05bc72f280a8cc9275bd9e3e" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "1b1b9d9f35f77d275fa2686314998b9a97036b69ecd18fa2e562da1c317150d7" + 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..b39845499d67f --- /dev/null +++ b/Formula/s/somagic-tools.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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, mojave: "70fc5f4c86296e08ca0ba835a37fb1bbdd9149892777dd6b39d83d367f2dec1b" + sha256 cellar: :any, high_sierra: "121e3b6667ee8dcd81cf2331342d27b6221b1ebf955f83e00311176fa5fe11ca" + sha256 cellar: :any, sierra: "b0fa394d0211f43fe5c9da6e7f36b8e3b6ed5086b8a447b06df42e21bf0e30cd" + sha256 cellar: :any, el_capitan: "b73262d08d3ec9e10645290555b5fb0c5fd95492c9d5db2ab451285ccb69eac6" + 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..57fc9d53e3095 --- /dev/null +++ b/Formula/s/somagic.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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, mojave: "c2a69924be6f0d397b244955cfa841567ecd3171dc2674a4ac9748f49f58a44b" + sha256 cellar: :any, high_sierra: "b6c11695d2c25a49a4a2c5795764a83615a214630bc25914e65fc691662617fc" + sha256 cellar: :any, sierra: "377ecbdc01ebaab2acf1101aa00bbf5554e7d56b1b630baa28ef70d9deb10811" + sha256 cellar: :any, el_capitan: "ed8a82423daaabaca0a7ab203edc68b3c0a1a1d617eb24d46486dfa974e9eb4f" + 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/sonar-completion.rb b/Formula/s/sonar-completion.rb new file mode 100644 index 0000000000000..e998411178be1 --- /dev/null +++ b/Formula/s/sonar-completion.rb @@ -0,0 +1,22 @@ +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" + + 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..e6afce3727567 --- /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.1.0.4889.zip" + sha256 "491ff8c3502742cf67e5566b0f7c4329f375c31e836cdd7e0b202551bbc3f27b" + 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: "9a1a6aadf31d5a50d94bbfbba6988fcd308564774b6a5142bbc392feca0c8c85" + 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..e21b6eeca7b03 --- /dev/null +++ b/Formula/s/sonic.rb @@ -0,0 +1,60 @@ +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_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..4cece496ef71d --- /dev/null +++ b/Formula/s/sonobuoy.rb @@ -0,0 +1,34 @@ +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_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, 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..c77bd455c95df --- /dev/null +++ b/Formula/s/sophus.rb @@ -0,0 +1,46 @@ +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" + version_scheme 1 + head "https://github.com/strasdat/Sophus.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "04f59dd02e4845866fc1513e4292e87432b29310adc0ebbc3c39f5ba4a1588ea" + end + + depends_on "cmake" => [:build, :test] + depends_on "ceres-solver" + depends_on "eigen" + depends_on "fmt" + + 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..044f036c47cc7 --- /dev/null +++ b/Formula/s/soplex.rb @@ -0,0 +1,57 @@ +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.4.0.tgz" + sha256 "cd8d98aa1f70e828761aaaad490731c95fe29d7f4d045d80ba84f6b42e5fd13b" + 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_sequoia: "3dfb2a5450d7294b68d96cf56aa9bcbcc7f9a8c6c8be97c206ebef211f6656c8" + sha256 cellar: :any, arm64_sonoma: "1ca9a48145d8b796813cedfd98fa50d4790bc9df451fb1f9ce8157f53c9602ba" + sha256 cellar: :any, arm64_ventura: "08c6f3e7df6484a475a46ae20e6b3e69eb9912db1548d56faf72646cbdd98b9a" + sha256 cellar: :any, sonoma: "3e97490be640331925d970d69efec15f7bc16848a30be716570ef64d9592949d" + sha256 cellar: :any, ventura: "3affb0ea07f6ddf23aabf151e309ad9ebff8b44479b9039a57d76d1a06fcdb1b" + sha256 cellar: :any_skip_relocation, arm64_linux: "2461743019db4e58c22fd21b14106246fd7daa3884526b217dd6af6d5c71a28f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c24dc2aa0400865ff4bb6b2172b33416aa4bde18b3477e07bce938c8f7d33ef" + 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..93ef7f7481a7e --- /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.10.2.tar.gz" + sha256 "2f7cfa67f23ccc553538450a1c3e3f7666ec934d94034457b3890dbcd49b0469" + license "MPL-2.0" + head "https://github.com/getsops/sops.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "94f96e22f7a5e0aa190cd3ad84bd1c69c8a301c82c40c4aa915a7bfd47d3e59b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "94f96e22f7a5e0aa190cd3ad84bd1c69c8a301c82c40c4aa915a7bfd47d3e59b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "94f96e22f7a5e0aa190cd3ad84bd1c69c8a301c82c40c4aa915a7bfd47d3e59b" + sha256 cellar: :any_skip_relocation, sonoma: "5103c9c60d2e5117114d429e3f488560127788b9bda5463fb4dff972417bd220" + sha256 cellar: :any_skip_relocation, ventura: "5103c9c60d2e5117114d429e3f488560127788b9bda5463fb4dff972417bd220" + sha256 cellar: :any_skip_relocation, x86_64_linux: "86539d39f3aef614e81590fb805a61ffd4112dfd5abca1d35e553da388f3d4dd" + 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..4b90442d2b548 --- /dev/null +++ b/Formula/s/sord.rb @@ -0,0 +1,46 @@ +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_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..24c9c5514421a --- /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_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 + depends_on macos: :catalina + 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..33411b6f5659d --- /dev/null +++ b/Formula/s/sound-touch.rb @@ -0,0 +1,39 @@ +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_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..2749ab65b9e13 --- /dev/null +++ b/Formula/s/source-highlight.rb @@ -0,0 +1,46 @@ +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.9.tar.gz" + mirror "https://ftpmirror.gnu.org/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 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..ab0a6f1a31158 --- /dev/null +++ b/Formula/s/source-to-image.rb @@ -0,0 +1,34 @@ +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.0", + revision: "aa5e5680081ed2ba20ad91cf3e0c3bcd242bdcd5" + license "Apache-2.0" + head "https://github.com/openshift/source-to-image.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "712a7210cbd6d3a5b3cf2f9c9353a4852a175d8ba8260036d249ac56e33fbaef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "24a4064c4f68963cb9b49f8856a6f5919645fe887a6a637d5de4e453e4be7f67" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aa538c25c7eae3ad9bab46fbdb0b30bcbbc605dae5b71d99910f712f6afbe4e2" + sha256 cellar: :any_skip_relocation, sonoma: "ce38585c88d6e803123974ab374dd585f2241638dc14bd79d8c599cc4f3bf2e1" + sha256 cellar: :any_skip_relocation, ventura: "d01daccfdd4542b6149624f6ed92520d1772ef42b1123286e4a79e4989afd65a" + sha256 cellar: :any_skip_relocation, arm64_linux: "492c132b45630ec2b851a5e764dc34f5306647ec137f31f246386689abf6df7c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92044d0bc7833e792f5843fa634889fdf843ce0132f1791fd282af63060a0521" + 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..e1f680a36bc30 --- /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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4914567b0171f3dfcab46315e33232e5c925077268af59ce0ff5955c948dcb6e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5461899a0c97729c247703f45eb98a0cf26fc9939ce50eb6fa9543e9f70c6c62" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fbe4a3e5c3485101486be0639b81cc4799c2dd7e0edf5f528d32a3c0ca6122fa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b8757a91d73d96999da362afbc5a5c42c7be949f562cf5569b2bf24853af6ef9" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1254fb0f47a037f929e579b4a68dd375b0e587d9adb3e876865b6de031d39f46" + sha256 cellar: :any_skip_relocation, sonoma: "9378990038e4d444ca11820d4e41eee737522dc75b7818d7577f4a612ab18bf1" + sha256 cellar: :any_skip_relocation, ventura: "5cf36d5bfe2a9a2770454f21169e5e9c8a5a6b50525ec0a9418c88180706d40c" + sha256 cellar: :any_skip_relocation, monterey: "974904c0b5b4d0d54fe8392c84fe06b3aa23e47fb76f95579f09e5fc94704d2d" + sha256 cellar: :any_skip_relocation, big_sur: "292dbf6713d17716e685ac74c0e9fdbe07038b95bca36f234a94bfe2fffe5aab" + sha256 cellar: :any_skip_relocation, catalina: "56cad5d1e01271614fd93c5ec93b4b7fc7cabb64bef767581bc5ad179ee20a63" + sha256 arm64_linux: "a5ede432a4cc147f30658c33f26b704e039b102f0c10d6e522296818dbb2bfdd" + sha256 x86_64_linux: "ebd23518f4371e70e885900d73fdf0ea71a4d30a0695a1dff8fa4d762abfa5e1" + 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" + 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..2c432023547a1 --- /dev/null +++ b/Formula/s/sourcekitten.rb @@ -0,0 +1,36 @@ +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.0", + revision: "eb6656ed26bdef967ad8d07c27e2eab34dc582f2" + license "MIT" + head "https://github.com/jpsim/SourceKitten.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2055c55992adc5704bba47a724cdd7bf91792cd5b9a290edb20fae3f5bfe1040" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "45e2029ed37a1151357f877689e017031ec02b3e4a7f3481dee354136a0ef57b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a537fa252a93e87370e05294e70355ef17922b476ce83c924c7a8df11f78e29c" + sha256 cellar: :any_skip_relocation, sonoma: "67c2adcc597c9c81363a31462f77438e9b72df5eeb389860b15c874d2e730fa2" + sha256 cellar: :any_skip_relocation, ventura: "63a0c69b8c07d8d68fc01e1aed95782021417753f6fb3f606e35f214560f7b30" + sha256 arm64_linux: "ed0d6d4dc2112b6ae320927620de3d216549a1ec2dad90cbfd964d827aaa0994" + sha256 x86_64_linux: "b2cff74b0c1717829db601f9a6032096c29b52f2c417c699826d21d8b954ce49" + 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" + 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..cf1ee118ab929 --- /dev/null +++ b/Formula/s/sourcery.rb @@ -0,0 +1,44 @@ +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.2.7.tar.gz" + sha256 "e543ba8c3f05d9c8ce6b9dc0460d2084893f345d4f5984aabe31a40849a5c0e0" + license "MIT" + version_scheme 1 + head "https://github.com/krzysztofzablocki/Sourcery.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "492ed39e90b1fa57dfd06fe1232473e57d9b5b7f110453d04387db5a76f19192" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4cef0fe60955af53805a58f3da3d80e6b0849835a8892d7cd31e885ff98afc3f" + sha256 cellar: :any, arm64_ventura: "7bad173e863423cf66b082d6f1f9e7f34a73fe121aabb3ca29a81be10ed7e707" + sha256 cellar: :any_skip_relocation, sonoma: "8d82c40e46e20b5e60908144e8d58e440798c802a545a2b3d3fbd2db70b87b74" + sha256 cellar: :any, ventura: "e621c3cc046ef8c5336b796ad72c36ee2d608b518b5bc746f78d04170c46d2aa" + sha256 arm64_linux: "5bafe848b77836b034a0c8f0c3c411267feac36e5ee758f184ce7c38197d446d" + sha256 x86_64_linux: "f0818110b2abe047e9055f761a77c7321f69e5e6563187213461bea738fa46fd" + 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..0ae3c24179639 --- /dev/null +++ b/Formula/s/sox.rb @@ -0,0 +1,67 @@ +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 + + bottle do + 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 + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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/spaceinvaders-go.rb b/Formula/s/spaceinvaders-go.rb new file mode 100644 index 0000000000000..87d2d226ea370 --- /dev/null +++ b/Formula/s/spaceinvaders-go.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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, mojave: "596f084c8dad9588158ea9419e8a7ce4e33e8193d18b18e4095a6443b5e2fbbd" + 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..35c044283fb46 --- /dev/null +++ b/Formula/s/spaceman-diff.rb @@ -0,0 +1,26 @@ +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" + + 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..6d5d1d9567182 --- /dev/null +++ b/Formula/s/spacer.rb @@ -0,0 +1,36 @@ +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.3.8.tar.gz" + sha256 "56e10af707cb060d6974559d3464e2ba0cb60db70d4e9d81e961ba88058b2925" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef7c78d2acc3602cdb46a27796ac03606fc237761f6390866a8d47eb2973dff1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7e1b47b321f4163d43c930df2f0a8826f627a6976296e90097d6cc7d66168f23" + sha256 cellar: :any_skip_relocation, arm64_ventura: "47cfb84321dbf61d82f44bd6a184861380297d3f692950f7224d9689386d103e" + sha256 cellar: :any_skip_relocation, sonoma: "bf34987b91b26af106233a25fbaaebf94a872e62794f686d227a1e6979659307" + sha256 cellar: :any_skip_relocation, ventura: "5c9f8b395088c5c2635f9f39d2efa4b517365e1469e823c9e75c23d77ada6802" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f3d35829b4c3ce86cb06c462b193d5c153d27408151578435abcc53b7c5d0ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce5f27c262e2a2d6dd9c9bb69d59244b02088303de9080d275db287741c24182" + 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..cfa64a54078a0 --- /dev/null +++ b/Formula/s/spaceship.rb @@ -0,0 +1,39 @@ +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.18.0.tar.gz" + sha256 "61d1745ca966430342cc397c168979a7b3605228837cde63e73891c1e4567311" + license "MIT" + head "https://github.com/spaceship-prompt/spaceship-prompt.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f19f97eaa9c8a1e6023c70d60caef2c68a30c835c9e86ebec8e523df0cf68f55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "39af573470a2ccbe82580979ac02176c605739a28b00b54b423add82340f1551" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3bccca808d0e02634751dfda4f73c2b7f9e7a4c2d178780db7116266e663c285" + sha256 cellar: :any_skip_relocation, sonoma: "29cb24daf6005013d04686775eb6179387d002aea7fba66c737396a71765c2d5" + sha256 cellar: :any_skip_relocation, ventura: "74d1cd64f2e89c1749dc9e1070f3ce1e9f3255680c47cf6be6b9fce214db3023" + sha256 cellar: :any_skip_relocation, arm64_linux: "c9fbe1ccc3718a6fe03aafbc047b0d087676dadafe47f46cc79679d66caa574a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da2eaba4f3e4ee2ed2a19165ca43246332f0c4bb70453e0a8063da10210c1feb" + 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..b630fb6942ed4 --- /dev/null +++ b/Formula/s/spack.rb @@ -0,0 +1,43 @@ +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/v0.23.1.tar.gz" + sha256 "32ca622c49448a3b4e398eb1397d8ff9a6aa987a248de621261e24e65f287593" + 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, arm64_sequoia: "2684e22465a5d1dc2b6914046b3888ad551ba5e124854e3e67974330377e2bf1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2684e22465a5d1dc2b6914046b3888ad551ba5e124854e3e67974330377e2bf1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2684e22465a5d1dc2b6914046b3888ad551ba5e124854e3e67974330377e2bf1" + sha256 cellar: :any_skip_relocation, sonoma: "7624a31a3821c80a4c33f0e54e36fff5aa8f4c93e7d20b7a063205017cf50008" + sha256 cellar: :any_skip_relocation, ventura: "7624a31a3821c80a4c33f0e54e36fff5aa8f4c93e7d20b7a063205017cf50008" + sha256 cellar: :any_skip_relocation, arm64_linux: "94d27af942c129148f0f6638e22a029dc7090833fd4df88a13268e0c6303b21b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e86a9198a69c530a065637ceba3eb6d5133833879c406967deac53743659692b" + end + + uses_from_macos "python" + + def install + rm Dir["bin/*.bat", "bin/*.ps1", "bin/haspywin.py"] # Remove Windows files. + rm "var/spack/repos/builtin/packages/patchelf/test/hello" # Remove pre-built test ELF + prefix.install Dir["*"] + end + + def post_install + mkdir_p prefix/"var/spack/junit-report" unless (prefix/"var/spack/junit-report").exist? + end + + test do + 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..cdeb8b1514f1f --- /dev/null +++ b/Formula/s/spades.rb @@ -0,0 +1,57 @@ +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: "next" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "b503ed91438f312640cda43473783ba4f5499ff5c88574c58dbb0e0c07a139bf" + sha256 cellar: :any, arm64_sonoma: "fe494b9af479c627902b8e2508244b3cca845e9254ae7e2e64451c07ee606dc7" + sha256 cellar: :any, arm64_ventura: "9b267ce7d7d6819ea3b8cfc0b62035581ebfa11db19ae9746c00e701a3abce47" + sha256 cellar: :any, sonoma: "f3964e9dc6ec67e93577a58034d5e3d6f819cf0914bc941e4dc7b6ad7df71b15" + sha256 cellar: :any, ventura: "7ead159556e176882ea0fcb620761bff7cf44e244789089d9840bea9d09703a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "14b6d3fa8eb079fafd05061476f678027bf6bc3729f48e94b9698bb79ba8d6f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a82de520429fc5c7db797cecfbc7f2fa5aba56026d43036d35bb0ff5bc0d2cb5" + end + + depends_on "cmake" => :build + depends_on "python@3.13" + + uses_from_macos "bzip2" + uses_from_macos "ncurses" + uses_from_macos "zlib" + + on_macos do + depends_on "libomp" + end + + on_linux do + depends_on "jemalloc" + depends_on "readline" + end + + def install + system "cmake", "-S", "src", "-B", "build", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", *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..ecd39510f76b5 --- /dev/null +++ b/Formula/s/spago.rb @@ -0,0 +1,75 @@ +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" + + 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..623580e6f09e0 --- /dev/null +++ b/Formula/s/span-lite.rb @@ -0,0 +1,46 @@ +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" + + 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..7ba0982d15360 --- /dev/null +++ b/Formula/s/spandsp.rb @@ -0,0 +1,62 @@ +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 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..14bd99001198e --- /dev/null +++ b/Formula/s/spark.rb @@ -0,0 +1,20 @@ +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" + + 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..0ef92e68550d0 --- /dev/null +++ b/Formula/s/sparkey.rb @@ -0,0 +1,45 @@ +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 + + bottle do + 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, mojave: "438c323c343b7aade2da46316d24bcc4d5c7a95910a43914d70125af14a17636" + sha256 cellar: :any, high_sierra: "4acbb473ce3be942b808af45789ccb7ede8199c728f7c381cd0dda1a105c8a9e" + 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..27b21410c7a97 --- /dev/null +++ b/Formula/s/sparse.rb @@ -0,0 +1,53 @@ +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 + + bottle do + 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, mojave: "a42c1376dca39a3708d3c070958e85b1dc50ddbf133b5a26055d4f314319f69c" + sha256 cellar: :any_skip_relocation, arm64_linux: "0c108dfd45b36b234fc6962ccf1b3f027185e34a904abcc162575d4e7e480b41" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c282a77e53c828abe22a69af0b1dd9cb124b333344f9be1b0f0f3d0a55a3fb0" + end + + on_macos do + depends_on "gcc" if DevelopmentTools.clang_build_version < 1100 + end + + fails_with :clang do + build 1099 + cause "error: use of unknown builtin '__builtin_clrsb'" + 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..7b00b15c56ac2 --- /dev/null +++ b/Formula/s/spatialindex.rb @@ -0,0 +1,86 @@ +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_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..0e24281aecd4c --- /dev/null +++ b/Formula/s/spatialite-gui.rb @@ -0,0 +1,63 @@ +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 10 + + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "30502014afdc300e446646426c552f717e6b061039acd2d89cdaa823f3d3db3e" + sha256 cellar: :any, arm64_sonoma: "04e36b8d075f92617df76d1efabc5ac7a2222e79c78a6addbeff9080a49559d5" + sha256 cellar: :any, arm64_ventura: "8c591e7ae73e96ebf063357071c82640eae117ac114bf71b0ade35edb426d127" + sha256 cellar: :any, sonoma: "1bb323bba375c2ef9b27d5d2ca15ab337b909e3d289be422b9ef034cf29438ec" + sha256 cellar: :any, ventura: "fb9d6957302df3eec020646651f4584fca87b138b9f53a370d0360e35cdfb02d" + sha256 cellar: :any_skip_relocation, arm64_linux: "578c2016eafd653ba4cc028c6e5541895c9767ffdf8686ed8e8a55bbfa3d1110" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e9e1b4b42a76a2d1324cc6ed9f8fca77c953898b7338c2e1ecda9e5324ca97c" + 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" + 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}" + + args = ["--with-wxconfig=#{Formula["wxwidgets"].opt_bin}/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..3f7cce3198a2d --- /dev/null +++ b/Formula/s/spatialite-tools.rb @@ -0,0 +1,60 @@ +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 + + bottle do + 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..c123bf8a8e211 --- /dev/null +++ b/Formula/s/spawn-fcgi.rb @@ -0,0 +1,39 @@ +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_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..eb3f69b52eae4 --- /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.15.3.tar.gz" + sha256 "15a04e69c222eb6c01094b5c7ff8a249b36bb22788d72519646fb85feb267e67" + license "MIT" + head "https://github.com/gabime/spdlog.git", branch: "v1.x" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b885d77ddec4626dd6f31bc9a94fae28b4bd3ac4e5e91c36624891d262d6d3de" + sha256 cellar: :any, arm64_sonoma: "222a1f363fe1b82e9e830c7a42f98d73c7b9673e7256502cdc66093193e2fee3" + sha256 cellar: :any, arm64_ventura: "78d3b81c70195115a7d762b9b39efaef6d45652488654a1104c237138a5f3898" + sha256 cellar: :any, sonoma: "6407f99157debc92ed12594a56cc98b9513e6d3617c5bf0ccad7127c8e0340a1" + sha256 cellar: :any, ventura: "f62555b2fb8dcc64a581c3f2efca87e50b49aecbc62d3492b4fb910c97442cb3" + sha256 cellar: :any_skip_relocation, arm64_linux: "774a3ccba115e20c6b0c594bb4c6b554de3c65f1454666d86a4aa0028d8591ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "334f9f05e98a52ecea6bbdbaebbfb597936d4169c935018eff7cd2f1789dcebd" + 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..793577baf877c --- /dev/null +++ b/Formula/s/spdx-sbom-generator.rb @@ -0,0 +1,46 @@ +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_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, x86_64_linux: "fd798a009fd918ecc7ebc002b181fc87aa382722f07d6ffdc5b2ab0481ea3951" + end + + deprecate! date: "2025-02-13", because: :repo_archived + + depends_on "go" => [:build, :test] + + def install + target = if Hardware::CPU.arm? + "build-mac-arm64" + elsif OS.mac? + "build-mac" + else + "build" + 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/spectra.rb b/Formula/s/spectra.rb new file mode 100644 index 0000000000000..5672b3fa044f2 --- /dev/null +++ b/Formula/s/spectra.rb @@ -0,0 +1,52 @@ +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.1.0.tar.gz" + sha256 "d29671e3d1b8036728933cadfddb05668a3cd6133331e91fc4535a9b85bedc79" + license "MPL-2.0" + head "https://github.com/yixuan/spectra.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "b26fea1bc180dee4039c2a00f91b87788428bc63cba2652c52855df8b7abc55a" + 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++11", + "-I#{Formula["eigen"].opt_include/"eigen3"}", "-I#{include}", "-o", "test" + + macos_expected = <<~EOS + 5 Eigenvalues found: + 1000.01 + 999.017 + 997.962 + 996.978 + 996.017 + EOS + + linux_expected = <<~EOS + 5 Eigenvalues found: + 999.969 + 998.965 + 997.995 + 996.999 + 995.962 + 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..ae2de8f9e3cb2 --- /dev/null +++ b/Formula/s/spectral-cli.rb @@ -0,0 +1,49 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0386c9607a723c93d0811eb9876eb84466667f7ad7b2c93ac1c48f2909a5b26c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0386c9607a723c93d0811eb9876eb84466667f7ad7b2c93ac1c48f2909a5b26c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0386c9607a723c93d0811eb9876eb84466667f7ad7b2c93ac1c48f2909a5b26c" + sha256 cellar: :any_skip_relocation, sonoma: "6a980039a70ffc224d6285ffe72f96a8253f68c8cb625f79199f6d3c49979946" + sha256 cellar: :any_skip_relocation, ventura: "6a980039a70ffc224d6285ffe72f96a8253f68c8cb625f79199f6d3c49979946" + sha256 cellar: :any_skip_relocation, arm64_linux: "0386c9607a723c93d0811eb9876eb84466667f7ad7b2c93ac1c48f2909a5b26c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0386c9607a723c93d0811eb9876eb84466667f7ad7b2c93ac1c48f2909a5b26c" + 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..93750f5d26b5a --- /dev/null +++ b/Formula/s/speech-tools.rb @@ -0,0 +1,105 @@ +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 + + bottle do + 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..dd224f08795e4 --- /dev/null +++ b/Formula/s/speedbump.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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, 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..1800d5cbdc3f6 --- /dev/null +++ b/Formula/s/speedread.rb @@ -0,0 +1,31 @@ +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 + + 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..751246e9ca7b1 --- /dev/null +++ b/Formula/s/speedtest-cli.rb @@ -0,0 +1,38 @@ +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 1 + head "https://github.com/sivel/speedtest-cli.git", branch: "master" + + bottle do + rebuild 4 + sha256 cellar: :any_skip_relocation, all: "6add96ed8b9a4a517bbbe21659fb0068c4d6b11da84d858524d221eee60d8448" + end + + depends_on "python@3.13" + + # 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 + + 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..4423f81c1b608 --- /dev/null +++ b/Formula/s/speex.rb @@ -0,0 +1,67 @@ +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 + + bottle do + 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..907c367ddef6e --- /dev/null +++ b/Formula/s/speexdsp.rb @@ -0,0 +1,63 @@ +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 + + bottle do + 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..a4fe7761757cb --- /dev/null +++ b/Formula/s/spek.rb @@ -0,0 +1,38 @@ +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 3 + + bottle do + sha256 cellar: :any, arm64_sequoia: "9a5cf8f9e155491cc75e877decfa35c8c7cd860ed879247333a5c8384660359e" + sha256 cellar: :any, arm64_sonoma: "76309f0f2438be4e22807912c1a081674e2d3edee7f976b8eca234cba52bf52d" + sha256 cellar: :any, arm64_ventura: "c04a1cdad577b8f573c6aa433ec6c2905cc56a51991293453c271aa059dcf09d" + sha256 cellar: :any, sonoma: "e1d327c7239a6fdfefaef78aaf1e778975db93898cead17a976f779e48ccf0d9" + sha256 cellar: :any, ventura: "3542b9595fabcd839fb1038d1819e2cd47cf429f8cab84ee60bc21daf8285773" + sha256 cellar: :any_skip_relocation, arm64_linux: "536cc269ec43894509ba9a294d2c5444648a802d299dececcfe977b0098801fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "451a222b2d0b0b7cc2296e017cc3cdedcbc346bea401802df9031693a44df61b" + end + + depends_on "pkgconf" => :build + depends_on "ffmpeg" + 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..80dbe18396f42 --- /dev/null +++ b/Formula/s/spglib.rb @@ -0,0 +1,72 @@ +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_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] + depends_on "gcc" # for gfortran + + 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", + *common_args, "-DSPGLIB_SHARED_LIBS=ON", *std_cmake_args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + + system "cmake", "-S", ".", "-B", "build_static", + *common_args, "-DSPGLIB_SHARED_LIBS=OFF", *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.6) + 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.6) + project(test_spglib LANGUAGES C Fortran) + 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..51e9ae67e2a56 --- /dev/null +++ b/Formula/s/sphinx-doc.rb @@ -0,0 +1,143 @@ +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 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "691cd69cca4a6d522bd06cf691cd7b450d27a0dc235112728739dc016c2b44c0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f3a734c24c10a65149d9f89105cb1bdbb4711069b7efa64fc68f7c8e7dca08d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2fad580adc896cde5f8105f9d3924ee0ca04561598dff4f391ee22ae33da5b8c" + sha256 cellar: :any_skip_relocation, sonoma: "09d1c77c4f771137e6e41ac634ecfaccd1c36a0a55a6e07656cc7e414c73b2ce" + sha256 cellar: :any_skip_relocation, ventura: "eabce5bedad52520c84e39d39322d0ad97e574c68c665e1eabe6e122aadaa48c" + sha256 cellar: :any_skip_relocation, arm64_linux: "160e4ef2c3d8c2fd927314880937480263ae1a79f66f76f98ebec81b8dd28541" + sha256 cellar: :any_skip_relocation, x86_64_linux: "014b492b36572f23a4c95795f9a7cfccdf54da714c2841e35064443a32b58e85" + end + + depends_on "certifi" + depends_on "python@3.13" + + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "numpydoc" do + url "https://files.pythonhosted.org/packages/ee/59/5d1d1afb0b9598e21e7cda477935188e39ef845bcf59cb65ac20845bfd45/numpydoc-1.8.0.tar.gz" + sha256 "022390ab7464a44f8737f79f8b31ce1d3cfa4b4af79ccaa1aac5e8368db587fb" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/44/7b/af302bebf22c749c56c9c3e8ae13190b5b5db37a33d9068652e8f73b7089/snowballstemmer-2.2.0.tar.gz" + sha256 "09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1" + 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 "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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..3d3b116955d78 --- /dev/null +++ b/Formula/s/spice-gtk.rb @@ -0,0 +1,127 @@ +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 + + bottle do + rebuild 1 + sha256 arm64_sequoia: "9b710c6b06c09f3b4c64937c7499df490e00294ab41e330657dd7025f0040abf" + sha256 arm64_sonoma: "9882ec3f69fc197c1ac475ad3422950df499d9b80a7c9bc624817d95506a0fe2" + sha256 arm64_ventura: "42600de9d33cc9d1c2e32eccf80cfa14f771457c3c39080d97ff3b611899dff8" + sha256 arm64_monterey: "82ab9fac4205428b48ea403708e85e19a9a42fd6c64a114a949e773e94367bf2" + sha256 sonoma: "5899efc0635b8e80ed5d8500bbfb654aaaf241a457d7a817d51c066f991d73ed" + sha256 ventura: "25c6fdcf7449f65c449d4ef7379d80b607c6d6aabc2a5823b4bd0241394e73cf" + sha256 monterey: "a553e9a2c8c13b84545376374a8a1418c35bb9aa10baeeb6c536c09c106b7a5b" + sha256 arm64_linux: "0c23d1d447cdcb8881dcccdd7e5ebdd2d2fd58b8bf8aa486568dfa2c1e835ef3" + sha256 x86_64_linux: "7ffdfb8565e07edaa4aaaed8ec4926679bfbe5242b32343e9c97dfe6ff02f69a" + 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.13" => :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/46/3a/31fd28064d016a2182584d579e033ec95b809d8e220e74c4af6f0f2e8842/pyparsing-3.1.2.tar.gz" + sha256 "a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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.13") + 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..ba0965c01a1da --- /dev/null +++ b/Formula/s/spice-protocol.rb @@ -0,0 +1,37 @@ +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 + + 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/spicetify-cli.rb b/Formula/s/spicetify-cli.rb new file mode 100644 index 0000000000000..0b4c14d1d16d1 --- /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.40.7/v2.40.7.tar.gz" + sha256 "1d80637127ba66577e53014cf794d069346cf8051377d4085ce8d90a4ed44f71" + license "LGPL-2.1-only" + head "https://github.com/spicetify/cli.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "384628f34a946747e55d9de2dbf23153d090db9b368444d0b43bfbf83ba34eb0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "384628f34a946747e55d9de2dbf23153d090db9b368444d0b43bfbf83ba34eb0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "384628f34a946747e55d9de2dbf23153d090db9b368444d0b43bfbf83ba34eb0" + sha256 cellar: :any_skip_relocation, sonoma: "12fe28b9fa3d83a3a7d3b0a383d931085dc355b88345330e35b99f94f9f44d46" + sha256 cellar: :any_skip_relocation, ventura: "12fe28b9fa3d83a3a7d3b0a383d931085dc355b88345330e35b99f94f9f44d46" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1dd17c77a278506beaf1da3a0d167fd711d2f2f19cb3c3dcbe83182d39eda6f0" + 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..5b23c98165b31 --- /dev/null +++ b/Formula/s/spidermonkey.rb @@ -0,0 +1,144 @@ +class Spidermonkey < Formula + desc "JavaScript-C Engine" + homepage "https://spidermonkey.dev/" + url "https://archive.mozilla.org/pub/firefox/releases/128.10.0esr/source/firefox-128.10.0esr.source.tar.xz" + version "128.10.0" + sha256 "2ed83e26e41a8b3e2c7c0d13448a84dbb9b7ed65ed46bc162d629b0c6b071caf" + 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_sequoia: "569c7777027b310d823bc5896f5d532e094a86d593b3ffc09314a5d22e9248a5" + sha256 cellar: :any, arm64_sonoma: "665877581d3fa3427ea32155d064953973f4a2b09ab33388fbcb1ddc39c1a560" + sha256 cellar: :any, arm64_ventura: "2a2327b2632c6983d31d24aa0b3c459e76ee013e592899439f404fe518f04531" + sha256 cellar: :any, sonoma: "f5189cd635d68aab759c592857a2943c2ce267424a773b76c4adca4804ccfd93" + sha256 cellar: :any, ventura: "a840fa0921a3982e6e841fff50e1005d258f5629aaa019e769f23ca90d5bf2b5" + sha256 arm64_linux: "56b07590e3d88ed4d294611fdfb4750116786054892ede06b0707425a664085e" + sha256 x86_64_linux: "12aede2307a06ac46be308115ed889af04ce6d124472e13f7ef02008cbce7c52" + end + + depends_on "cbindgen" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :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 + + # Fix to find linker on macos-15, abusing LD_PRINT_OPTIONS is not working + # Issue ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1964280 + patch :DATA + + 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"' + + 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 + 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 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 + +__END__ +diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure +index 264027e..2e073a3 100644 +--- a/build/moz.configure/toolchain.configure ++++ b/build/moz.configure/toolchain.configure +@@ -1906,7 +1906,16 @@ def select_linker_tmpl(host_or_target): + kind = "ld64" + + elif retcode != 0: +- return None ++ # macOS 15 fallback: try `-Wl,-v` if --version failed ++ if target.kernel == "Darwin": ++ fallback_cmd = cmd_base + linker_flag + ["-Wl,-v"] ++ retcode2, stdout2, stderr2 = get_cmd_output(*fallback_cmd, env=env) ++ if retcode2 == 0 and "@(#)PROGRAM:ld" in stderr2: ++ kind = "ld64" ++ else: ++ return None ++ else: ++ return None + + elif "mold" in stdout: + kind = "mold" 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/spidermonkey@91.rb b/Formula/s/spidermonkey@91.rb new file mode 100644 index 0000000000000..7d241feadbcc7 --- /dev/null +++ b/Formula/s/spidermonkey@91.rb @@ -0,0 +1,89 @@ +class SpidermonkeyAT91 < Formula + desc "JavaScript-C Engine" + homepage "https://spidermonkey.dev/" + url "https://archive.mozilla.org/pub/firefox/releases/91.13.0esr/source/firefox-91.13.0esr.source.tar.xz" + version "91.13.0" + sha256 "53be2bcde0b5ee3ec106bd8ba06b8ae95e7d489c484e881dfbe5360e4c920762" + license "MPL-2.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "2ecaf8e4212260b4f579a7fc466f78615adfae5c7a0e99d1976a39568fc24e6b" + sha256 cellar: :any, arm64_sonoma: "67ab8a1a5b3c43e1b0c8b28e261ac6f584ae03a18d19a0279cea2ca7cfb054d0" + sha256 cellar: :any, arm64_ventura: "a4b5607569f9d86bb90f204337c362a1e63a5333669ca3ecd2b90a945ca3d15c" + sha256 cellar: :any, arm64_monterey: "6b646df4501dc6a8ac9e0ea5dd7fb604ef28177f0f67e06422fdf30176fd8fc4" + sha256 cellar: :any, sonoma: "1f73995d267a3d0dbee5a05e64c6a227006e3491c9ccd0d7b4927cf50b21e170" + sha256 cellar: :any, ventura: "bdafb8a4478924f90059fbe30c727e8127cb6c220f08a5c2290b68a1d4e8808a" + sha256 cellar: :any, monterey: "0e82c03130747ffd00d9142350d60b6f8e532854666c6fe1164b34452b275992" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae8f67dc53fa55e1d06ee912bd04ee344c6d742210c401bc1dfae9410d198eaf" + end + + # Has been EOL since 2022-09-20 + disable! date: "2024-09-09", because: :unsupported + + depends_on "autoconf@2.13" => :build + depends_on "pkgconf" => :build + depends_on "python@3.9" => :build + depends_on "rust" => :build + # Can uncomment after https://github.com/Homebrew/homebrew-core/pull/192986 + # as existing bottles are linked to ICU4C 74 like + # #{HOMEBREW_PREFIX}/opt/icu4c/lib/libicudata.74.dylib + # TODO: depends_on "icu4c@74" + depends_on "nspr" + depends_on "readline" + + uses_from_macos "llvm" => :build # for llvm-objdump + uses_from_macos "m4" => :build + uses_from_macos "zlib" + + def install + # Help the build script detect ld64 as it expects logs from LD_PRINT_OPTIONS=1 with -Wl,-version + if DevelopmentTools.clang_build_version >= 1500 + inreplace "build/moz.configure/toolchain.configure", '"-Wl,--version"', '"-Wl,-ld_classic,--version"' + end + + # Avoid installing into HOMEBREW_PREFIX. + # https://github.com/Homebrew/homebrew-core/pull/98809 + ENV["SETUPTOOLS_USE_DISTUTILS"] = "stdlib" + + # Remove the broken *(for anyone but FF) install_name + # _LOADER_PATH := @executable_path + inreplace "config/rules.mk", + "-install_name $(_LOADER_PATH)/$(SHARED_LIBRARY) ", + "-install_name #{lib}/$(SHARED_LIBRARY) " + + inreplace "old-configure", "-Wl,-executable_path,${DIST}/bin", "" + + cd "js/src" + system "autoconf213" + mkdir "brew-build" do + system "../configure", "--prefix=#{prefix}", + "--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 "make" + system "make", "install" + end + + (lib/"libjs_static.ajs").unlink + + # 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..bbac12655126d --- /dev/null +++ b/Formula/s/spigot.rb @@ -0,0 +1,72 @@ +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 + + bottle do + 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..b3a4fbe3165a6 --- /dev/null +++ b/Formula/s/spim.rb @@ -0,0 +1,39 @@ +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/" + + bottle do + rebuild 1 + 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..7e8df230e1dd2 --- /dev/null +++ b/Formula/s/spin.rb @@ -0,0 +1,55 @@ +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" + + bottle do + 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, mojave: "eae932021ba8a15f713dd60ca2a29267f5df53a832895c5ab1a342d2568c6f45" + sha256 cellar: :any_skip_relocation, high_sierra: "3ffbbe34633fa0e177bd25343b3bbd35d706988ab04c4a617fff530cf3dc542a" + 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..d56332726fb9c --- /dev/null +++ b/Formula/s/spiped.rb @@ -0,0 +1,38 @@ +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_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" + + on_macos do + depends_on "bsdmake" => :build + end + + def install + man1.mkpath + make = OS.mac? ? "bsdmake" : "make" + 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..4fe2730f2d590 --- /dev/null +++ b/Formula/s/spirv-cross.rb @@ -0,0 +1,73 @@ +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.313.0.tar.gz" + sha256 "7d1de24918bea9897753f7561d4d154f68ec89c36bb70c13598222b8039d4212" + 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_sequoia: "add1df549154c9c2f278ea006343076345302e60d48f68f957485add62bcae77" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "03588b24c1f09fbfebcd499622d0c54265a423f29888d51d94cf822f7d759cc4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "14cfd824228b3ff9f17eb8bb339a598c47f1657fb70c4eb63ee2be34c41e4225" + sha256 cellar: :any_skip_relocation, sonoma: "8eedcf62ee9cefc2b3883105d8f45b8d8359c38928b9f3faa2a6ad5ebf091acc" + sha256 cellar: :any_skip_relocation, ventura: "732db42607529e74b09252d53255c0f709675a32f62c3dcd465bc9018e182b4e" + sha256 cellar: :any_skip_relocation, arm64_linux: "9dff26ca56b06820999339bd65162f3aa4db10f93b279e48b224cbb1e7697248" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf778372b13669b84c656c92a2539dd3539032b44d7d065f9c9b793434467992" + 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..e13b6fe7d86df --- /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.313.0.tar.gz" + sha256 "f68be549d74afb61600a1e3a7d1da1e6b7437758c8e77d664909f88f302c5ac1" + 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: "2d07850b674da53b8fc098287bea1455cb9c2ec4adab305dea040980d8072676" + 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..b1a6ec49ce17b --- /dev/null +++ b/Formula/s/spirv-llvm-translator.rb @@ -0,0 +1,52 @@ +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/v20.1.2.tar.gz" + sha256 "d1b4a55dc457edbd9cc50d23583d4bedda9479176efcd34b3e20166bc7a4a562" + license "Apache-2.0" => { with: "LLVM-exception" } + + bottle do + sha256 cellar: :any, arm64_sequoia: "0d2d662b60a4779b1d54609ac46961178069b78d3b5e29dc392d83f0bb2f77be" + sha256 cellar: :any, arm64_sonoma: "030ff2cf482f2e4e047be915ba875027ed903e2a1c076efac8b73f623c37a13e" + sha256 cellar: :any, arm64_ventura: "c249699bf1e4f4302d1785848ed3a6c14b82b42c4384cc08154ed39634c106ff" + sha256 cellar: :any, sonoma: "b101621e10e8111828626a444a70081d5a4d7dbcc5eb530248a8f7eb8d3c285d" + sha256 cellar: :any, ventura: "ad4ccd7cdeb3b8acf6833f025b52932eef992dab584010aa975429737d5aff33" + sha256 cellar: :any_skip_relocation, arm64_linux: "71bfa085d672dd0050427be679576f5870d51402952033c05d07f65c205e94e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "26e105772ab373a0810b545b4d6a3829845d67e8656456fc292e9bf9823aa371" + 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..75d28742103c7 --- /dev/null +++ b/Formula/s/spirv-tools.rb @@ -0,0 +1,64 @@ +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.313.0.tar.gz" + sha256 "6b60f723345ceed5291cceebbcfacf7fea9361a69332261fa08ae57e2a562005" + 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_sequoia: "526f0b2be7bbd832d10573e1504944562ca8bd0ab19ac5c6fc5fcfdf0192ed65" + sha256 cellar: :any, arm64_sonoma: "0d90a066a6f63a137cac4c38c8fe51f76a00f9ef2dfc00b92c06fc2aa11c1fa1" + sha256 cellar: :any, arm64_ventura: "1d294b9fc1c423c9ad997ae94e25c7190a4e82a465cd3031ae282973619284b1" + sha256 cellar: :any, sonoma: "9794747ef0fd5434ba74f445d5af1198fec7b8214c7a793a904c414ead9862ab" + sha256 cellar: :any, ventura: "4617fd500944d9e90b85ddc05344e9ba8b74122b0a4b8eb73005de8f79ee6824" + sha256 cellar: :any_skip_relocation, arm64_linux: "a04290d072ea9b93fd08f71a982aac88449c20b6ab226d574c6a4a33bd5e4a18" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3536edf22844dc6dfe7da464204f439302842544a8e5375497abd2a256c89d3" + end + + depends_on "cmake" => :build + + uses_from_macos "python" => :build, since: :catalina + + resource "spirv-headers" do + # revision number could be found as `spirv_headers_revision` in `./DEPS` + url "https://github.com/KhronosGroup/SPIRV-Headers.git", + revision: "aa6cef192b8e693916eb713e7a9ccadf06062ceb" + end + + def install + (buildpath/"external/spirv-headers").install resource("spirv-headers") + + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + "-DBUILD_SHARED_LIBS=ON", + "-DPython3_EXECUTABLE=#{which("python3")}", + "-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..35f0c0a12ed18 --- /dev/null +++ b/Formula/s/splint.rb @@ -0,0 +1,88 @@ +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 + + bottle do + rebuild 1 + 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 cellar: :any_skip_relocation, mojave: "abe5a5d75a01fa272839dbc219a5fde2c76c7c7593e7dd365c152e4cb02a2c59" + sha256 cellar: :any_skip_relocation, high_sierra: "b95c7e4981cb11c23b686dbb01dcc01c1317909371b5d21ba0aa155e47569eec" + 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..de9a725b1ec96 --- /dev/null +++ b/Formula/s/sponge.rb @@ -0,0 +1,36 @@ +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_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..d3fd41c3f9597 --- /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 1 + sha256 cellar: :any_skip_relocation, all: "48c3a037c2b55a1f7849998fbdfa575f4e04726c284eb2190e72e0dcd93b0305" + end + + depends_on "python@3.13" + + 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..8894f0bd2e367 --- /dev/null +++ b/Formula/s/spoofdpi.rb @@ -0,0 +1,54 @@ +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_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, 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..9640b631f80f5 --- /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.13.tar.gz" + sha256 "0d0fe673cf1bc8933727bc8e0be7ba36901445211e2945ac73fb09835c81f4eb" + 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 + sha256 cellar: :any, arm64_sequoia: "13d7c8ac11db34a7a8b764a21ec432aee23e82f6c203993d82b5205ea3d24ad8" + sha256 cellar: :any, arm64_sonoma: "d68082eb2748cdd6319776cbd969f22d0c706a3fe6ffe03d43c61926f6495074" + sha256 cellar: :any, arm64_ventura: "3479c7f105845b206b887e043302f428da3e0324050321461988db1a3a9a5a5e" + sha256 cellar: :any, sonoma: "b50160f4850825a805e49fb599804c358dd9622d4c2ad65b6d25a52c8912de2b" + sha256 cellar: :any, ventura: "2926815fb5ec93988f881c5958711fa8474947d948dc3071c3043c377da5786f" + sha256 cellar: :any_skip_relocation, arm64_linux: "79356cfd8b16223222424cff25e76f93b43c4038feadf3dc3933fcdccbe08675" + sha256 cellar: :any_skip_relocation, x86_64_linux: "790b0da5e46c005e3848272613832fd3d28563b09df8f4747cc93eabacfeda91" + end + + depends_on "python@3.13" => :build + + def install + system "./configure", *std_configure_args, "--disable-silent-rules" + 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..1aedada43af07 --- /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.3/spotbugs-4.9.3.tgz" + sha256 "d464d56050cf1dbda032e9482e1188f7cd7b7646eaff79c2e6cbe4d6822f4d9f" + 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: "04bc55a24780bb678bad33c70d61444aa1884a76b2f6ea79ee6140c9ecd92c8f" + 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..bfdd12f01b854 --- /dev/null +++ b/Formula/s/spotify_player.rb @@ -0,0 +1,43 @@ +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.20.5.tar.gz" + sha256 "06a409144461fa965916d7d92817fda4be3801402eff8278a3fc7a38448d54e1" + license "MIT" + head "https://github.com/aome510/spotify-player.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "586d9cd1b5f25763d9707b1bbdf3d0db8ff9a907f1d9366d54f0e6d0057357fe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a71e28d1925528ea43fe781886b60685f639c3c9b4dac8ae643d55dae84b06db" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b4c4842939847c22541616bd9e3e942c3e5a0c0aec3d78bc8332df8f652010e2" + sha256 cellar: :any_skip_relocation, sonoma: "fe4ce0b9f2eac32fc47b3f79c52ddf87f407e16c1e7cf2f1380043c7c7155a8b" + sha256 cellar: :any_skip_relocation, ventura: "bafdf2dad5b6648769ddb426204422a5228c9e8695fa56d39fc5abce66543915" + sha256 cellar: :any_skip_relocation, arm64_linux: "4335402911998567074f316703ecba218463d5e3bd647541919861c9edbdfa3c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d892b242d6d3ee55e3cccbc5026492f7876d14969c2556b7ef44d3e1decd5e40" + end + + depends_on "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + 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..a5eb3e85e11df --- /dev/null +++ b/Formula/s/spotifyd.rb @@ -0,0 +1,59 @@ +class Spotifyd < Formula + desc "Spotify daemon" + homepage "https://spotifyd.rs/" + license "GPL-3.0-only" + head "https://github.com/Spotifyd/spotifyd.git", branch: "master" + + stable do + url "https://github.com/Spotifyd/spotifyd/archive/refs/tags/v0.3.5.tar.gz" + sha256 "59103f7097aa4e2ed960f1cc307ac8f4bdb2f0067aad664af32344aa8a972df7" + + # rust 1.80 build patch, upstream pr ref, https://github.com/Spotifyd/spotifyd/pull/1297 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/7cb21d6370a1eae320f06a4f9150111db0bbf952/spotifyd/rust-1.80.patch" + sha256 "0bfc8c4805cc99c249d1411aff29a0d9107c3ce69f1fabbdc3ab41701ca4f2f6" + end + end + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "dd6598774377cc653a1e34568c6afff11509e3fac350dc0084532ad1eaad97ec" + sha256 cellar: :any, arm64_sonoma: "a2305bcd95c814f04cf6bef9d9c01a2cd1b6ab1c3f0c9e2dc1cb6ee85f468556" + sha256 cellar: :any, arm64_ventura: "3237a0154b6fddbf87eaea3b4460c8a992b72217899637d479a31f2bcd7ba53e" + sha256 cellar: :any, arm64_monterey: "25689c32e31f1b2990ffb54fe34ba61856951b8c81d09bea1a4cc4d02d8c6fd9" + sha256 cellar: :any, sonoma: "7f9e21a27e9b6af17a131d62c23758ba6e7649c9a8ef38bd51b63d7e76dbcbff" + sha256 cellar: :any, ventura: "af948d2987f9c1f31f7217981ab42a62356b51c6793dc4091005795a917845fb" + sha256 cellar: :any, monterey: "00d7a5bfb6a4b4cb59e52b6d154e7268b576ed255df3ac199eceed6e7f84ff26" + sha256 cellar: :any_skip_relocation, arm64_linux: "09f476e955bcf684bc49ff03e92a67d8b49b59ce54f5a38869dd54af83292492" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4baab23fe6181c526b89960d0fb9db63bafea067a4ac9c6f5ac6af658267eea9" + 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", "dbus_keyring,portaudio_backend", + *std_cargo_args + end + + service do + run [opt_bin/"spotifyd", "--no-daemon", "--backend", "portaudio"] + keep_alive true + end + + test do + cmd = "#{bin}/spotifyd --username homebrew_fake_user_for_testing \ + --password homebrew --no-daemon --backend portaudio" + assert_match "Bad credentials", shell_output(cmd) + end +end diff --git a/Formula/s/spr.rb b/Formula/s/spr.rb new file mode 100644 index 0000000000000..c161c5034ecb9 --- /dev/null +++ b/Formula/s/spr.rb @@ -0,0 +1,71 @@ +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.6.tar.gz" + sha256 "a9ee0f3e1c90176841a42f2177a31c83a93a8cfb83bc1507fcb544ff8d997de7" + license "MIT" + head "https://github.com/spacedentist/spr.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a8989faccafce9c9bf1eee5eeb1046a18729f9acf67fee5ae16b0110f647a722" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e7a6c8485777c09071c197c7d6c31c4c98b57f4bd361e0f4831eab09329a13f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "77f4725d61aa4e91a3ec60cd66e00e8c2eb9409060d21c83d0eea338616ddb0f" + sha256 cellar: :any_skip_relocation, sonoma: "253cba645ac75e32a4fbb89e7f11ef64184bc188ef15a003bec6a3ad00bb4444" + sha256 cellar: :any_skip_relocation, ventura: "0979ef1eca05662b37d9e6b7d4c6ee19dabe01a55108afce776691679077cdb9" + sha256 cellar: :any_skip_relocation, arm64_linux: "91992bcf82d184425bf81988ec78085ec78000e08f70370ed58f2c62ca3f3691" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2be9247cdde1ac0abb84ce96ba8536f6d22cda94df4b66636e5a9c4ee7a1625" + 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(path: "spr") + 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..963f4fb0ab469 --- /dev/null +++ b/Formula/s/spring-completion.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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, mojave: "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..43daf288f263e --- /dev/null +++ b/Formula/s/spring-loaded.rb @@ -0,0 +1,23 @@ +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" + + 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/sproxy.rb b/Formula/s/sproxy.rb new file mode 100644 index 0000000000000..fc800d3900c9f --- /dev/null +++ b/Formula/s/sproxy.rb @@ -0,0 +1,146 @@ +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 + + bottle do + 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..abae53ac4077d --- /dev/null +++ b/Formula/s/spytrap-adb.rb @@ -0,0 +1,38 @@ +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.4/spytrap-adb-0.3.4.tar.gz" + sha256 "8553beb5c403f3cbcf7b5e7ded052e4b31efe8e798ec81e2bcc16aba315f5429" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "767ab98c11d10e8e8511f5ae28fe2d4f8c0b22b33f25c2cedc7d4930f4a49fe7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1da4d2335d1376e64a7c7ff85e35a720b024ba221e961143d413af1770d17901" + sha256 cellar: :any_skip_relocation, arm64_ventura: "608c7bfa4cfb114233756f3e22752012de20440a87497135e1a47fdfb7524205" + sha256 cellar: :any_skip_relocation, sonoma: "26072c153a6aa612ea399f0d047edf7221c7074e2bfb4d398f0b6311d01cd47f" + sha256 cellar: :any_skip_relocation, ventura: "e3e6bf1cb665f4ede66a844472452a8301daf939039a969deb3fad2c5d4feb4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "6ec460a61e435a13444af946629525bf1df71431da02c37ee3b18dac5fd07ed8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "669e16b037b182eab249fcd9f60678995c16ce97cabb25b8b8daf820eeb6c384" + 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..fe03b8b5f25a6 --- /dev/null +++ b/Formula/s/sq.rb @@ -0,0 +1,52 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f881ab58b02e1df585ada412ca80396084379ac06466d7652f1b7dbbe9e62d95" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "009e32cfa7b1bdfed2642c8b75e677ccd5811f3be6abcf5335d73a48920e738c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5e352f3207dda7031075cf6e4031a7274ba697139aaae5d51c3fb31b57515268" + sha256 cellar: :any_skip_relocation, sonoma: "e33bcf953cb6bbf0e7f89f7a77d127842aecb0a51da794ce70bfebcb1cd75d0a" + sha256 cellar: :any_skip_relocation, ventura: "53b3b4140bc973c5165e5e14f0314691c24dc1f1e2be90e9f44b86d408426917" + sha256 cellar: :any_skip_relocation, arm64_linux: "28c043142fcd8006a7f83674be8c19ae724188da40c169597033525c23c1d74e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17617b679286e017c0fc9fb0e487caf28d5692a1e86ae502c619611a0931b4eb" + end + + depends_on "go" => :build + + uses_from_macos "sqlite" => :test + + conflicts_with "squirrel", 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..627a740551295 --- /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.1.tgz" + sha256 "2e288660bca4b9cc48d3e0b01079344f9d42bf4c2f09bcbf669840d8e3754a07" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "3ca74f595acbaa87a693cdf94cf96cba740e205579b18e016b91c3896c89e8ce" + 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..7970c07a6b656 --- /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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd5d2aa5e74f6c90fab27c5fb63afb21c59cae849a65ed257848c689bd5f043e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9aa6c820accaa95b19c29fc1512ee089f49c630a0b8a11ca84562870a332d4a2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c0178437b507dcbd66fcee1dcd2d74ee18978674c727dd0b6df3aa20d700fda7" + sha256 cellar: :any_skip_relocation, sonoma: "6940e85bf990b6acdea29bf09b494353029c21b4d61643ec8c38020ffac079b2" + sha256 cellar: :any_skip_relocation, ventura: "f04f8e8ff0fd5e33596507b7ff9a6d0c27e66c35252c98fd5ec7df0fea6c798d" + sha256 cellar: :any_skip_relocation, arm64_linux: "076f6542dcfd9cffe3a41f7d5a104e93b1e7740cfc43c494ec812d777a15e875" + sha256 cellar: :any_skip_relocation, x86_64_linux: "87f49e5d71d234798903200f21b2801ca3eb962b86ac3cf193fed8a444cb3beb" + 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..1a5c95476ca5f --- /dev/null +++ b/Formula/s/sql-lint.rb @@ -0,0 +1,39 @@ +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.0.tgz" + sha256 "0ee3b71d812af3cc809829b663d9cd747996ec76e2b3e49fd3b7a5969398190e" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4b460da40ab03af6d48fa557a567c21d06d3e5cc3718392d7daafd9d89e922a6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2365c7675f29386b8de28968310fc9dbf242c59f260ed552bc249854b41396a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2365c7675f29386b8de28968310fc9dbf242c59f260ed552bc249854b41396a5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2365c7675f29386b8de28968310fc9dbf242c59f260ed552bc249854b41396a5" + sha256 cellar: :any_skip_relocation, sonoma: "73b4fe6c09ec7143938b2c938dfebc764c86063ed2eaa593c028c69003ce7b84" + sha256 cellar: :any_skip_relocation, ventura: "73b4fe6c09ec7143938b2c938dfebc764c86063ed2eaa593c028c69003ce7b84" + sha256 cellar: :any_skip_relocation, monterey: "73b4fe6c09ec7143938b2c938dfebc764c86063ed2eaa593c028c69003ce7b84" + sha256 cellar: :any_skip_relocation, arm64_linux: "64adacdf846ce16c5cca8c70774584882c78ce16625a685eda7802f56b415cc1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a8391c3cdbf4c3876e3c7a88978c03ae3fa8ef53fde71ce9e04faa59511af14" + 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..251ad023b4db7 --- /dev/null +++ b/Formula/s/sql-migrate.rb @@ -0,0 +1,53 @@ +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_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..7522f52f51dba --- /dev/null +++ b/Formula/s/sql-translator.rb @@ -0,0 +1,120 @@ +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 + + bottle do + 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..a376bca79f9a2 --- /dev/null +++ b/Formula/s/sqlancer.rb @@ -0,0 +1,56 @@ +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_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..6e29f4cf453a3 --- /dev/null +++ b/Formula/s/sqlbench.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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, mojave: "382ff90c210126e6803b47d1b267761d592b1d9898f6804730beb26df80af917" + 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..f180a3b671549 --- /dev/null +++ b/Formula/s/sqlboiler.rb @@ -0,0 +1,35 @@ +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.0.tar.gz" + sha256 "39f106e8846f818a71f81e7863e38ff154f351e758c15e25312882fcfdad2ca8" + license "BSD-3-Clause" + head "https://github.com/volatiletech/sqlboiler.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91baa67ed1eb0f569395fd5731006bc1401516a13f5261fca90037df3cc01b48" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91baa67ed1eb0f569395fd5731006bc1401516a13f5261fca90037df3cc01b48" + sha256 cellar: :any_skip_relocation, arm64_ventura: "91baa67ed1eb0f569395fd5731006bc1401516a13f5261fca90037df3cc01b48" + sha256 cellar: :any_skip_relocation, sonoma: "2074aa55cde9dbc8c0387148750788a968da5266009eb141fbfc428555285ecb" + sha256 cellar: :any_skip_relocation, ventura: "2074aa55cde9dbc8c0387148750788a968da5266009eb141fbfc428555285ecb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "be93948ff6fabbc25d0545c21bf276d0b1189838be7ecf7d750839af9f71dfaf" + 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..c72e64c532bae --- /dev/null +++ b/Formula/s/sqlc.rb @@ -0,0 +1,55 @@ +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.29.0.tar.gz" + sha256 "7f26a9539d25df18d3cd2f02785b5a08e30adf568a08b50c5504556f16c1fb5d" + license "MIT" + head "https://github.com/sqlc-dev/sqlc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5b2cb8abc13302602bacb210046b3363ea5ffa62cec7f6450eb36db5d30329e1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5e5bbd8ba0116438e96980d549854ba347dc8e2964ec993dfa071ba0f0c10867" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1da3bcf4cc4bea4e1161f379d638b8e39d5daabe1d39bf006627286731aceeb6" + sha256 cellar: :any_skip_relocation, sonoma: "20699ef3244bbeb467fb5f04aefd76d5da9962d2f60d8ef949d68591d0e34698" + sha256 cellar: :any_skip_relocation, ventura: "9dd512414f694c9c0ce86230c24877d6d9a0d80f3967a8241e5cfdcec4556359" + sha256 cellar: :any_skip_relocation, arm64_linux: "1673b21b686ec9fba8afe6c78343255389b33ddaa218f3e93f16c9422bf8174f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f7b484597cfb48ac5eafbb2b5e04b8c02027719162aeb0b15eb6833c8781da4" + 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..971df9c9a7f76 --- /dev/null +++ b/Formula/s/sqlcipher.rb @@ -0,0 +1,68 @@ +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_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..738a333077d3c --- /dev/null +++ b/Formula/s/sqlcmd.rb @@ -0,0 +1,37 @@ +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_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, 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..7ae480753b6a7 --- /dev/null +++ b/Formula/s/sqldiff.rb @@ -0,0 +1,43 @@ +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-3490200.zip" + version "3.49.2" + sha256 "c3101978244669a43bc09f44fa21e47a4e25cdf440f1829e9eff176b9a477862" + license "blessing" + + livecheck do + formula "sqlite" + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_sequoia: "0ef62a84468fd2e58d2c5fd5ebdadb2171c3be8c29f893fb1275ba4d9204fc08" + sha256 cellar: :any, arm64_sonoma: "2fb3577dd9cce4cf52a5fb1c77b988b87b0f7cccf9fa2e41fa5eb45806760efa" + sha256 cellar: :any, arm64_ventura: "76813bf4ff104932e7abfcb8d77fe89cbb87f0effa2fef532830b19472428617" + sha256 cellar: :any, sequoia: "20eac7abca9782511b6173d380bc76b631340c0e2e4f42496f56191c85f433ce" + sha256 cellar: :any, sonoma: "23c11e3e7e84c7b809698ac48ca4a6ea1f24515328234bfffdd55860bec5eddd" + sha256 cellar: :any, ventura: "8bef608a453820084aa38325ce635802e9c97634045d9edfa1f76934915660ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "2f605a3572f0f0da27a0b3e1834394af63e243360c4123e022547b36dca47d73" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d0cb48d7e011b83a067cfb5880ee3f9cc949996084ddcd7fd03b46893c3d68b" + 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..3eb9c85c804ae --- /dev/null +++ b/Formula/s/sqlfluff.rb @@ -0,0 +1,121 @@ +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/37/9f/501f119821c8e1eaccf079a0f82428e84a3411bd6a2f7a418620689c769d/sqlfluff-3.4.0.tar.gz" + sha256 "6e1ea2d39b20cc791a1a009c234afaf043b448c7f2eb1c11551316fb41f36f47" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "79d0609bac30eaa8a836c9febe29633cbd0c16d40f6fb12e35d8747679a164e0" + sha256 cellar: :any, arm64_sonoma: "97d7c3b44b47ee1abf5cc1ec560aad49d6a032c7c938cf9899f39943c1d2f0d4" + sha256 cellar: :any, arm64_ventura: "3c8d747c5683b9cb3316b13202243b66c5def9481b08e6654f861582ae4c87a6" + sha256 cellar: :any, sonoma: "1d2a6d961e7f4c9743fd1422ac36afdd2e402462f78e6d86d9a3856e0b5adc74" + sha256 cellar: :any, ventura: "69263ff81e0237e9eb30a93ba84b512e4cbc4b8ffc16e6582c82587a7146d8a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "0d2ab03455b21b4860fa6195e974c82bd7c66e7ce8972ae7c5807cc574e1b381" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68ba4d86da76ea257c187d85f36ab0a4030ac5a72aff82fbb8337779bcd57f5b" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/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 "diff-cover" do + url "https://files.pythonhosted.org/packages/3f/a8/20e11859ee291893ef9711ca868d277b66cdf886278e73abdb72b172cc5f/diff_cover-9.2.4.tar.gz" + sha256 "6ea44711f09199a1b8bcaa2eae002e1f337dd22f2d798fcfd62a6a1554bb2a86" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz" + sha256 "3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7" + 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 "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/ae/3c/c9d525a414d506893f0cd8a8d0de7706446213181570cdbd766691164e40/pytest-8.3.5.tar.gz" + sha256 "f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + 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", shells: [:fish, :zsh], 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..3e9dcf6b2dc93 --- /dev/null +++ b/Formula/s/sqlfmt.rb @@ -0,0 +1,41 @@ +class Sqlfmt < Formula + desc "SQL formatter with width-aware output" + homepage "https://sqlfum.pt/" + url "https://github.com/mjibson/sqlfmt/archive/refs/tags/v0.5.0.tar.gz" + sha256 "0776e9505048fd88220c0ee9b481ca258b6abe7e7bb27204a4873f11e1d7c95b" + license "Apache-2.0" + head "https://github.com/mjibson/sqlfmt.git", branch: "master" + + bottle do + 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..533dfa48f11df --- /dev/null +++ b/Formula/s/sqlite-analyzer.rb @@ -0,0 +1,55 @@ +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-3490200.zip" + version "3.49.2" + sha256 "c3101978244669a43bc09f44fa21e47a4e25cdf440f1829e9eff176b9a477862" + license "blessing" + + livecheck do + formula "sqlite" + end + + no_autobump! because: :incompatible_version_format + + bottle do + sha256 cellar: :any, arm64_sequoia: "67cc3291707ff03543cd7dbf0b715f0f5401974dc0c922e0d98b01516028e20e" + sha256 cellar: :any, arm64_sonoma: "a454574109e0650c6a97eaaa1ccf74c0d97999fe4f7ef2a4f9323a6d4fe80cd8" + sha256 cellar: :any, arm64_ventura: "6f141f8745b047a8a0c9c1242e649b6ff4a10cf3e74306ec8849d82b62df16ea" + sha256 cellar: :any, sequoia: "6596e7af88be2d70ad921d0438ae32f48775af94c79ac73b8f57f41198846ab0" + sha256 cellar: :any, sonoma: "472ef3a7bca1791cd68980a792fb08218a77b149de4441d375cedfb6aee2cb15" + sha256 cellar: :any, ventura: "43d649c1b152794475d0a69aaf8db30b82db957d471fc7642fe35305b1d9684b" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e5c92aaf3c647f76266750f705a223b9b5826c081c00f3c2495871070916361" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f3371b2d5811117f606857e3f0ddb826affa2c2c140e8738e86037257eff2286" + end + + uses_from_macos "sqlite" => :test + uses_from_macos "tcl-tk" + + 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_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-utils.rb b/Formula/s/sqlite-utils.rb new file mode 100644 index 0000000000000..151b8666b9adf --- /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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2ba7d7894a17d995f13bbc6e028709736092ffda97c57e226446635ac463fe23" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2ba7d7894a17d995f13bbc6e028709736092ffda97c57e226446635ac463fe23" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2ba7d7894a17d995f13bbc6e028709736092ffda97c57e226446635ac463fe23" + sha256 cellar: :any_skip_relocation, sonoma: "33df8c15199c62afd1e5892a815caa0f5450f6e9f3678f50fa23469ee1a48d9c" + sha256 cellar: :any_skip_relocation, ventura: "33df8c15199c62afd1e5892a815caa0f5450f6e9f3678f50fa23469ee1a48d9c" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ec6f3fbb01080aeb3da17bd54bc940089e0d2fca223d83be9b4f76ff46f6866" + sha256 cellar: :any_skip_relocation, x86_64_linux: "801f58dacffee3dd06633556ec40db111693a2031e0f6011748bf9e0681cdd11" + end + + depends_on "python@3.13" + + 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 "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + 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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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", shells: [:fish, :zsh], 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..5c20866730973 --- /dev/null +++ b/Formula/s/sqlite.rb @@ -0,0 +1,83 @@ +class Sqlite < Formula + desc "Command-line interface for SQLite" + homepage "https://sqlite.org/index.html" + url "https://www.sqlite.org/2025/sqlite-autoconf-3490200.tar.gz" + version "3.49.2" + sha256 "5c6d8697e8a32a1512a9be5ad2b2e7a891241c334f56f8b0fb4fc6051e1652e8" + 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 + sha256 cellar: :any, arm64_sequoia: "efe9021681f4fc983b282f40ea62713f9cde2fae38436b4ee884737f76f56500" + sha256 cellar: :any, arm64_sonoma: "80fbe2514bdfccd2306a829b994e7b5d631345a11cfe62e26d56ca980bf6a49d" + sha256 cellar: :any, arm64_ventura: "c57fe253970bba86619d0ee62a5344074801de8260fcd7210d779973780d30d5" + sha256 cellar: :any, sequoia: "4ce1095909a4a45d39d691c537ec5d526531a64ea0effa27a2374a4de1f8c580" + sha256 cellar: :any, sonoma: "fbf7a928baca989555ec91e9469a3d96682865d53e0072da19aae63a1066f0a2" + sha256 cellar: :any, ventura: "67eb3623e2d69ad3896fee39f4c7a38e7121c1738af7f57baab47a72b17e2b7d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9b3f3bf1656a66e99837807d73422ae8f3c51277907bd928d6cccb68e9853e3d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "347e2e03572231f7045186c692844fe05fb33856c578af85eab861790385065c" + 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_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", + ] + + 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..bbb9666f9cbe6 --- /dev/null +++ b/Formula/s/sqlitecpp.rb @@ -0,0 +1,37 @@ +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.2.tar.gz" + sha256 "5aa8eda130d0689bd5ed9b2074714c2dbc610f710483c61ba6cf944cebfe03af" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "70f5947567993c6f843def81f53c30dd6c97938351f46b4c6945829121f2a000" + sha256 cellar: :any, arm64_sonoma: "e7629104d854a8022d3c63211d816df17fb8f304f2abe7aada7b9a32d5c5faae" + sha256 cellar: :any, arm64_ventura: "4f8f06f0ba6e6b70b51d86efc287439368bf2d7b4a7ba237dd5f1a5ff1cc814d" + sha256 cellar: :any, sonoma: "27240818ce5455b810ab145dc21d99b7d0b5e0cf6f69d019dc6e9849df3271b0" + sha256 cellar: :any, ventura: "e62d913c9d07e34f2567329f3ced74edd8390cc10e55e27d905cdc3cf581f1f3" + sha256 arm64_linux: "6475b9433747a98e6453958795885c04d614c4f863b4f873992f24ed2b05c58c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "45157c0c0356c374f4ea81150008d9070fe570abeed9c20e0742ebaea08c08a9" + 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..c2af56667b1e5 --- /dev/null +++ b/Formula/s/sqliteodbc.rb @@ -0,0 +1,65 @@ +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 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..aebb923dbda98 --- /dev/null +++ b/Formula/s/sqlmap.rb @@ -0,0 +1,55 @@ +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.5.tar.gz" + sha256 "4ce5f6e908fd16ce20aa36b7c3eda66e417ba0b1545e3dda9cb4b836c651a865" + license "GPL-2.0-or-later" + head "https://github.com/sqlmapproject/sqlmap.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9c73164a4b124bc3af513eb3f6ccada62cf0b9d05e916bdf997701740a0f4fd6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c73164a4b124bc3af513eb3f6ccada62cf0b9d05e916bdf997701740a0f4fd6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9c73164a4b124bc3af513eb3f6ccada62cf0b9d05e916bdf997701740a0f4fd6" + sha256 cellar: :any_skip_relocation, sonoma: "7fbeeda0b7ecb17eaf1af4bdaad6f2f66693ce8eeebe4fe7464962b07fc676d1" + sha256 cellar: :any_skip_relocation, ventura: "7fbeeda0b7ecb17eaf1af4bdaad6f2f66693ce8eeebe4fe7464962b07fc676d1" + sha256 cellar: :any_skip_relocation, arm64_linux: "97d27f7a70dbef5771f432b6968ea8f5a9bd0690fae334d46eaa3b53d05e86c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97d27f7a70dbef5771f432b6968ea8f5a9bd0690fae334d46eaa3b53d05e86c9" + end + + depends_on "python@3.13" + + uses_from_macos "sqlite" => :test + + def install + libexec.install Dir["*"] + + files = [ + libexec/"lib/core/dicts.py", + libexec/"lib/core/settings.py", + libexec/"lib/request/basic.py", + libexec/"thirdparty/magic/magic.py", + ] + inreplace files, "/usr/local", HOMEBREW_PREFIX + + %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 + 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..5f6860919cb9d --- /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.34.0.tar.gz" + sha256 "17d3936c7d8cbb9498bba268964125d51a354801808181c4a58ef8c893a37ec4" + license "MIT" + head "https://github.com/sqlpage/SQLpage.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b23eb0fe85ba746cef41cd07afd5b83c4d9179445401cf325b980dc5557c980e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "56a7222f69f960a0eb041f2d7e9854b07d29711aa8c2c832f9a55923269a8674" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d7d32f966d91a96447dddac267c06bfcdc951aaf38f14bd25c93d8f93c5247d9" + sha256 cellar: :any_skip_relocation, sonoma: "7ca59cc67ece1bea9cf0b47d2e189326096d43c10d9fba367e7818bae8b3f081" + sha256 cellar: :any_skip_relocation, ventura: "98146922e9dc9e245650ac40e7ab79cb044f0d367112eba6d3ab4da13905a7a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "3f7b8a6d5d86032d044cd934743952fb34c0d15211362addc73e09f4d059fceb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e48893380a9c0eadc0076a73020fdaafd84bed9c1315d48bc3438d5889e61095" + end + + depends_on "rust" => :build + + 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..997f6a8a0c226 --- /dev/null +++ b/Formula/s/sqlparse.rb @@ -0,0 +1,29 @@ +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 + sha256 cellar: :any_skip_relocation, all: "27c0cee7eb47fbe549b5cc018c08d715e4124b723cfb5a472f2099ea54f28e08" + end + + depends_on "python@3.13" + + 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..b3b0fd6fcab3c --- /dev/null +++ b/Formula/s/sqlsmith.rb @@ -0,0 +1,63 @@ +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 + + bottle do + 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..a398b56245e82 --- /dev/null +++ b/Formula/s/sqlx-cli.rb @@ -0,0 +1,38 @@ +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.5.tar.gz" + sha256 "c6a32bb7d733fd598ba7473da9f82e9971557302e180ca3da0b1e29028dc9027" + license any_of: ["Apache-2.0", "MIT"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "17c46172b54aa2fb1e0e4cefb06ab0736bd223fcccac60f061bdd55e66aaf2a7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d9673914ecf85ede3a6076d57bad9caf28df9a39e95af7263da8559f4dbc4df6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a0f358c1c19ad0dec41e48292a9971ff844905c9f82abbf809316f8a4b4d5478" + sha256 cellar: :any_skip_relocation, sonoma: "aabafa16b518a697e5169c2e4d1f00a789fb396ab6b4dcd8828f3e95eaa833a5" + sha256 cellar: :any_skip_relocation, ventura: "309ed400ad81629058d2128697ce70ee80ae9b411fe16e899a2a9f4807260beb" + sha256 cellar: :any_skip_relocation, arm64_linux: "3464997e93de30ce3b413adb8115b8917b9b538450aa0cad7cefeb2734ca32ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3934e22542a2706089c12fe6fca9c41c6ac49ea881a4b60a780f4f29516916dd" + end + + depends_on "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + 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/sqsmover.rb b/Formula/s/sqsmover.rb new file mode 100644 index 0000000000000..a3db249f31e88 --- /dev/null +++ b/Formula/s/sqsmover.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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, mojave: "0874e450ddbdfa8b1a4d364ed7467a50d7f79d90ae33e0a147c3f291b055d20e" + 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..4bdc60798a0b8 --- /dev/null +++ b/Formula/s/sqtop.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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, mojave: "27786a7ca63d00ecb47e9f1e3e844a077d38048871cec3c03308831716338dc1" + sha256 cellar: :any_skip_relocation, high_sierra: "fe9a704fdf7f24dadba6b4f7cc20f8f07d93c19450701e01b408ea2f7574ec63" + sha256 cellar: :any_skip_relocation, sierra: "30f51d2886adf914eef22af21dfac92f544c59c88b6e7961972eb6702e48d0c0" + sha256 cellar: :any_skip_relocation, el_capitan: "6d838378cae0971561da60dff1e887bf03b60d1a0ff198a5d468654ef790d9e9" + 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..ff905c9c3b018 --- /dev/null +++ b/Formula/s/squashfs.rb @@ -0,0 +1,103 @@ +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.6.1.tar.gz" + sha256 "94201754b36121a9f022a190c75f718441df15402df32c2b520ca331a107511c" + 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_sequoia: "e18983058459bb34a878aa55400fdb33fffe5dd01d7ed52601f8228cb1e3d8f2" + sha256 cellar: :any, arm64_sonoma: "21f37d4cd4db720d9c1f15ce0cad88397a816b7801f30d715cf2f28fc91df08d" + sha256 cellar: :any, arm64_ventura: "2d8bf130f1b58fa03252b6cccbab2f0d4ffa600b33996a40e61d91d73f7fd55f" + sha256 cellar: :any, arm64_monterey: "6cef6a569617ae5135c3eb170ee09f7fea7736da13b953f2efb44d024e947a4e" + sha256 cellar: :any, arm64_big_sur: "fd3ad11d7192e0faad3906f5556aca470d2b8404ce07f6cded1514af2c286689" + sha256 cellar: :any, sonoma: "7c2ba3c8a22abeba1f4f2e5d4118d62b169124cd61f0c3fbdeecd16ccd158927" + sha256 cellar: :any, ventura: "f77526a0a06e07ffba3e86a57c09391f3e962f221543ba424276beea2de6be29" + sha256 cellar: :any, monterey: "0f4721b581fa57db435d884bc4af98ce7c58e3ba92262e2277676b1e44e4cb1f" + sha256 cellar: :any, big_sur: "821ae58379b5a2465979686d50f3f54d26b7707e5aaa8180eea6d6da5559b07d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d2f6ea709f9ab4cdc4ebd038804296a1bb0b040c0d5bfbbe5a84e744f1a02372" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48347e06cf3d3bd099d441f38de0d32296340334bebefa048550d8b8afcb426d" + 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=gnu89 + 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 "generate-manpages" do + commands.each do |command| + system "./#{command}-manpage.sh", bin, man1/"#{command}.1" + end + end + + doc.install %W[ + README-#{version} + USAGE-#{version.major_minor} + USAGE-MKSQUASHFS-#{version.major_minor} + USAGE-SQFSCAT-#{version.major_minor} + USAGE-SQFSTAR-#{version.major_minor} + USAGE-UNSQUASHFS-#{version.major_minor} + COPYING + ] + 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..ea636dc86bb4a --- /dev/null +++ b/Formula/s/squealer.rb @@ -0,0 +1,33 @@ +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_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, 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..cf7273c35abc9 --- /dev/null +++ b/Formula/s/squid.rb @@ -0,0 +1,91 @@ +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_6_13/squid-6.13.tar.xz" + sha256 "232e0567946ccc0115653c3c18f01e83f2d9cc49c43d9dead8b319af0b35ad52" + 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 + + bottle do + sha256 arm64_sequoia: "d2cd4e77ccc3da42ec7ded1f1f1a4a2e754734e17bf369b0dd99d542642ac4bd" + sha256 arm64_sonoma: "be53c543fec807a6841cc164cb9edb1433d26b8b4730bb0accacfdcebed45c63" + sha256 arm64_ventura: "e7ef982e31124eb3b920cdc13351547b3bce8d574c8dddf18de73474dab7ae09" + sha256 sonoma: "472c374fa36f3e97a90d192d1fa4fcecfdd9cd45d5069e8c93ebd080ba581094" + sha256 ventura: "81747c30da12ba7291b8353836cea7708983d2e0775672462764076e5f1d4cdf" + sha256 arm64_linux: "11c4cde52a0d19d8768095309eeb87d9525d6f25992f51551ea40b87e56c1f02" + sha256 x86_64_linux: "86929f4464c2dd41698c7c68936bab3b9a716635cd57e5ab125086fcb23abca4" + end + + head do + url "https://github.com/squid-cache/squid.git", branch: "v6" + + 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[ + --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-gnutls=no + --with-nettle=no + --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 + + 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..b23a258a92856 --- /dev/null +++ b/Formula/s/squiid.rb @@ -0,0 +1,28 @@ +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_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.rb b/Formula/s/squirrel.rb new file mode 100644 index 0000000000000..d1db3e85b2e38 --- /dev/null +++ b/Formula/s/squirrel.rb @@ -0,0 +1,77 @@ +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.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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c208328e416371ac27e3ae7a78bfd4e319b972848e47647526d282ff36539eb1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "55b91fac014d0478c05c654b6a4d45edc116a7c4853933a7a8d1ee27643a61b5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "631ffa6eed034f912c1a23b1f52cca805632e175caa1a1dc22a4a7718fc61fe1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4a1b1eaad58270a2b924e75720f9c3a1ce63ca408868ce31637e26fd27d66062" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0b4a46f4bce39d747dcf5e7ec4ee43afc76646ae6f4e8c0e7ae1601d147061f5" + sha256 cellar: :any_skip_relocation, sonoma: "ba1ea042885244cbc99365b811ec4da8636e538c3ee6eaf5c7b6db2f4557d3bc" + sha256 cellar: :any_skip_relocation, ventura: "9bd02555a226495fcb30c9f539359be571890111c920318f430ecca760c46cc0" + sha256 cellar: :any_skip_relocation, monterey: "c8822588938ec4e83897e6f883ccfad6f39ae6fff7279ea35e988a39c2da4c10" + sha256 cellar: :any_skip_relocation, big_sur: "bb230ed7a9aa535e40bbe4f127cd6d4325fed6be46b4a4dae58c39d01b169666" + sha256 cellar: :any_skip_relocation, catalina: "749bb90e798990994fa79d8846661f95fa7e150d3606b889c0351697c82add62" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b1ea68a161e998f86c3b3e8a4111eea54037fed0a62a08afe6b413de78ebf79" + sha256 cellar: :any_skip_relocation, x86_64_linux: "747575d9f05e9496d0eecf8ea4d6db59711396eac5feca1ae2f61794a53a6a64" + 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..541d8f44e5e62 --- /dev/null +++ b/Formula/s/sratom.rb @@ -0,0 +1,50 @@ +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_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..8efbe37c0db9e --- /dev/null +++ b/Formula/s/sratoolkit.rb @@ -0,0 +1,83 @@ +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_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" + depends_on macos: :catalina + + 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") + + # 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..75f2d53f85403 --- /dev/null +++ b/Formula/s/src.rb @@ -0,0 +1,45 @@ +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" + + livecheck do + url :homepage + regex(/href=.*?src[._-]v?(\d+(?:\.\d+)+)\.t/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", since: :catalina + + 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..b6b723a858827 --- /dev/null +++ b/Formula/s/srecord.rb @@ -0,0 +1,76 @@ +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"] + + bottle do + 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..efed669d4edd1 --- /dev/null +++ b/Formula/s/srgn.rb @@ -0,0 +1,35 @@ +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.13.6.tar.gz" + sha256 "7786ef149d990cd70c5df541e066aeb79aff7d7fa60e4c59e92ccebf8e606b5b" + license "MIT" + head "https://github.com/alexpovel/srgn.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "aee23758b050640fcd4a4aaf2497f46e3bd8810bac75c6045f07eec8c3ba242e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6ecb27613159d40d6e53ae40dd2d6a3ac1cfd9df1d1da21c799af35802246b81" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9a5ab99bcbea2c4a1aaa3bc35653938fb62815f7cb2ac4a269c7a19531819e41" + sha256 cellar: :any_skip_relocation, sonoma: "6372bbaab4b1b8f8456c2fb23c217a57ca16ab40f8f45a0bcff64c4ec9c68391" + sha256 cellar: :any_skip_relocation, ventura: "66199b4bf91c3c3b690595ade9d5917cf5fc7e739520a812fbe950538d9c98d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "d569e847346a9666f183b143d24cb9724eb8aeb6bed381fc0b12c188971c86e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17c815e9b6270bbfb47dfe758a644eb66784898cacb0074441295421914cf1e6" + 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..c84720c051d4d --- /dev/null +++ b/Formula/s/srt.rb @@ -0,0 +1,50 @@ +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_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..95641cf3b5aa3 --- /dev/null +++ b/Formula/s/srtp.rb @@ -0,0 +1,38 @@ +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: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + 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..73df9dc3b3074 --- /dev/null +++ b/Formula/s/ssdb.rb @@ -0,0 +1,84 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "a10edecc28880cd37e02e75fdc318392ba6bda016f624181a9f4ff10982b211f" + 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..1d228ea3074ca --- /dev/null +++ b/Formula/s/ssdeep.rb @@ -0,0 +1,33 @@ +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" + + bottle do + rebuild 1 + 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..6c0c6e07db545 --- /dev/null +++ b/Formula/s/ssed.rb @@ -0,0 +1,45 @@ +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" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?sed[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 3 + 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..310af49454847 --- /dev/null +++ b/Formula/s/ssh-audit.rb @@ -0,0 +1,27 @@ +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 + sha256 cellar: :any_skip_relocation, all: "a2e7fb5fb4eb20ac00402d3920f4a37a624da249adf432d38ecc9f9158274872" + end + + depends_on "python@3.13" + + 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..c81ca7acad29a --- /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-9.9p2.tar.gz" + mirror "https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.9p2.tar.gz" + version "9.9p2" + sha256 "91aadb603e08cc285eddf965e1199d02585fa94d994d6cae5b41e1721e215673" + 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: "38fb758068e8bbbfb6ed35f280b124280544fdbfbd247ed7db798ca3710c5427" + 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..cced9bb9612c2 --- /dev/null +++ b/Formula/s/ssh-mitm.rb @@ -0,0 +1,135 @@ +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" + head "https://github.com/ssh-mitm/ssh-mitm.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a55f5b4396464f2e0381ae81d6d8d979840c0cb44c2f7ccd1a497cb03098fc8f" + sha256 cellar: :any, arm64_sonoma: "a446014221ba0da416901d29855310739ce926dc307b0786780a8a6f79d0c758" + sha256 cellar: :any, arm64_ventura: "4b8683db03fe15cc9ea0c26d3cd4a1f84c17653cc318538f58bdd60c9ef4bca2" + sha256 cellar: :any, sonoma: "2ac9ca03de245736c9aa765420d8d902287427b33a5f98c503d71afdaaac6d03" + sha256 cellar: :any, ventura: "d64f6ecb3406e0cdbab184d33372a4ff98cf995c09f436eff8b51c06b62ebe3d" + sha256 cellar: :any_skip_relocation, arm64_linux: "dd732d8076ea43939e12aeada39406c0045639cb04d2865b4e711937cd152b91" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1837df8e3c1b90cd075c5e6b33757f004211048f4c188b9384d5ff523c2ba166" + end + + depends_on "rust" => :build # for bcrypt + depends_on "cryptography" + depends_on "libsodium" # for pynacl + depends_on "libyaml" + depends_on "python@3.13" + + 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/0c/be/6c23d80cb966fb8f83fb1ebfb988351ae6b0554d0c3a613ee4531c026597/argcomplete-3.5.3.tar.gz" + sha256 "c12bf50eded8aebb298c7b7da7a5ff3ee24dffd9f5281867dfe1424b58c55392" + end + + resource "bcrypt" do + url "https://files.pythonhosted.org/packages/56/8c/dd696962612e4cd83c40a9e6b3db77bfe65a830f4b9af44098708584686c/bcrypt-4.2.1.tar.gz" + sha256 "6765386e3ab87f569b276988742039baab087b2cdb01e809d74e74503c2faafe" + end + + resource "colored" do + url "https://files.pythonhosted.org/packages/2f/98/4d4546307039955eec131cf9538732fb7a28d2db2090cd1d4e4a135829e1/colored-2.2.4.tar.gz" + sha256 "595e1dd7f3b472ea5f12af21d2fec8a2ea2cf8f9d93e67180197330b26df9b61" + end + + resource "ecdsa" do + url "https://files.pythonhosted.org/packages/5e/d0/ec8ac1de7accdcf18cfe468653ef00afd2f609faf67c423efbd02491051b/ecdsa-0.19.0.tar.gz" + sha256 "60eaad1199659900dd0af521ed462b793bbdf867432b3948e87416ae4caf6bf8" + 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 "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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "python-json-logger" do + url "https://files.pythonhosted.org/packages/e3/c4/358cd13daa1d912ef795010897a483ab2f0b41c9ea1b35235a8b2f7d15a7/python_json_logger-3.2.1.tar.gz" + sha256 "8eb0554ea17cb75b05d2848bc14fb02fbdbd9d6972120781b974380bfa162008" + end + + resource "pytz" do + url "https://files.pythonhosted.org/packages/3a/31/3c70bf7603cc2dca0f19bdc53b4537a797747a58875b552c8c413d963a3f/pytz-2024.2.tar.gz" + sha256 "2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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 "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/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + 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-permit-a38.rb b/Formula/s/ssh-permit-a38.rb new file mode 100644 index 0000000000000..e6366f2d4a352 --- /dev/null +++ b/Formula/s/ssh-permit-a38.rb @@ -0,0 +1,47 @@ +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/refs/tags/v0.2.0.tar.gz" + sha256 "cb8d94954c0e68eb86e3009d6f067b92464f9c095b6a7754459cfce329576bd9" + license "MIT" + revision 1 + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sonoma: "0c9ed9e40aee04a34d31a3ee2f84978b2298302533b45eacf0dbe306f21457d4" + sha256 cellar: :any, arm64_ventura: "96e3d6e8f730a4e618df2dcdbb9e34d0d984279493ff7f0fd9584d45e0eb5a77" + sha256 cellar: :any, arm64_monterey: "7e4ba428801c4fc9ec23517e01dad136586e61052bd4d9205bfb75a652ac2136" + sha256 cellar: :any, arm64_big_sur: "ddc1b8ed3b76e9acbce18af5b81a4cf16942821a3e328843ab99c954b80c69d3" + sha256 cellar: :any, sonoma: "c57921695d62d0afea5a9879326892f495d5969dd7e3820fa3450473fdcf593a" + sha256 cellar: :any, ventura: "3010fccaf8e110218ce7db40be84d70613fc52dbfa51559aba086ac3503501f4" + sha256 cellar: :any, monterey: "f45f37f3fdbd00b71083b3039cc95e38c77e3f49ea7d8c6d69713bc6833738fc" + sha256 cellar: :any, big_sur: "be4350f56a90a669e3406b1fc47569970d7282b2d17fa3b72b0655a7a05afd82" + sha256 cellar: :any, catalina: "7c6141113cbb8821cfc7c5b88c5b29a5290585f923898eb3ac04fcbc3b060ed4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef88b670035ed8bc6bcba5290a1bf297237a7abcaeb243c1d686f0e45683cbd7" + end + + # Match deprecation date of `openssl@1.1`. openssl-sys==0.9.27 doesn't support `openssl@3` + # Last release on 2018-08-18 + disable! date: "2024-08-01", because: :unmaintained + + depends_on "cmake" => :build + depends_on "rust" => :build + depends_on "openssl@1.1" + + uses_from_macos "zlib" + + def install + # Ensure that the `openssl` crate picks up the intended library. + # https://crates.io/crates/openssl#manual-configuration + ENV["OPENSSL_DIR"] = Formula["openssl@1.1"].opt_prefix + + system "cargo", "install", *std_cargo_args + end + + test do + system bin/"ssh-permit-a38 host 1.example.com add" + + assert File.readlines("ssh-permit.json").grep(/1.example.com/).size == 1, + "Test host not found in ssh-permit.json" + end +end diff --git a/Formula/s/ssh-vault.rb b/Formula/s/ssh-vault.rb new file mode 100644 index 0000000000000..c885a27465bbc --- /dev/null +++ b/Formula/s/ssh-vault.rb @@ -0,0 +1,52 @@ +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.0.tar.gz" + sha256 "3bde1ad4d1f8f0eb7ade501e4b12a89e83b6508675d46286462af1eccbda646c" + license "BSD-3-Clause" + head "https://github.com/ssh-vault/ssh-vault.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c27ff2adc2e2a950011fb85982e3475dd00f95696354090bd0d498448a65aa76" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b55c4f946385ceff1df3a4f742f53a895d1582faff4b3ed155b2c8947a2d5e8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dd1ab07e07ca2ab36d424d8840d7926aecf18d4b223d5289adf982c219c60112" + sha256 cellar: :any_skip_relocation, sonoma: "f21314b53412c0c49618b3384a885eeed3e58784e797d067f12d89dffb57241f" + sha256 cellar: :any_skip_relocation, ventura: "cee7b74f65d8e5d79dac9fc296a4fadfd02939790a94208c167f3aec805d0f30" + sha256 cellar: :any_skip_relocation, arm64_linux: "d73c8e8b90a8ffdb58c8eb42810e8c1db67330ed559bee688f9a5fdf0c1946ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e813a71072ece7cdca7723f9fe65f7d79709de88ee0240f9fdfe8febac4929a" + end + + depends_on "rust" => :build + + on_linux do + depends_on "pkgconf" => :build + 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..6ada59e29ff0e --- /dev/null +++ b/Formula/s/ssh3.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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..900bd3c16a861 --- /dev/null +++ b/Formula/s/sshfs.rb @@ -0,0 +1,30 @@ +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 + + 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..19c69cc5c5ad8 --- /dev/null +++ b/Formula/s/sshguard.rb @@ -0,0 +1,72 @@ +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 + + bottle do + 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" + + 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? && MacOS.version >= :sierra + 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..5d0c9122c7f91 --- /dev/null +++ b/Formula/s/sshpass.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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..5e991654fc26f --- /dev/null +++ b/Formula/s/sshportal.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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..8e55fdd37fcb5 --- /dev/null +++ b/Formula/s/sshs.rb @@ -0,0 +1,57 @@ +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_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..a150113ce4af3 --- /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 + + bottle do + 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, mojave: "a54f2c867dd6539824cc69888975d3cd2041b4b922183262d29fcdf655391cfa" + sha256 cellar: :any, high_sierra: "dd567f106a7fe8a7a6f9e2474b284109e1dbcb14ed847163d1f65f4d69467f93" + sha256 cellar: :any, sierra: "dafb3bc8c14e729cbbfbf8dc6a9ce789e01732a644aa84b243af24f2bd92ce19" + 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..6c4ef52bc4f14 --- /dev/null +++ b/Formula/s/sshuttle.rb @@ -0,0 +1,27 @@ +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/0d/98/2e91205e87b2c27849a923cf3ba6602cf13d8ddabe2d8d7726b6593d4709/sshuttle-1.3.1.tar.gz" + sha256 "04c2b16164b4b2b5945ff17c4556a8a2f0d63fb1ea2ca032748f047852ff2fcb" + license "LGPL-2.1-or-later" + head "https://github.com/sshuttle/sshuttle.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1d18d85477c5d6d21b3cd3402f34a358ea9fb4d219712f71949e3935971ff3bf" + end + + depends_on "python@3.13" + + 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..70b641f2d2188 --- /dev/null +++ b/Formula/s/sshx.rb @@ -0,0 +1,37 @@ +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_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..1168b8ecf3220 --- /dev/null +++ b/Formula/s/ssldump.rb @@ -0,0 +1,33 @@ +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_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..e86e8586106c2 --- /dev/null +++ b/Formula/s/sslh.rb @@ -0,0 +1,48 @@ +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.2.3.tar.gz" + sha256 "dd7e51c90308ad24654b047bfc29b82578c8e96b872232029ce31517e90b7af7" + 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_sequoia: "168f4ae813ddb1e87be0f3295d84558054d32ad26e5715d34cc064696a12bf2d" + sha256 cellar: :any, arm64_sonoma: "20c820808087929316aeed64fe61933e8ca79a32c4c87c8fb58793772ddc31a2" + sha256 cellar: :any, arm64_ventura: "bd3b7d52ffde55ec61d705f0d535418f8cdd64f04a963a037defa39a889866d0" + sha256 cellar: :any, sonoma: "9b1c5a9a7f6e195c18e158eb5e5429caa1622c2d2e477a8084d3756241f7c38e" + sha256 cellar: :any, ventura: "9cbf3fa74b59722fc2b864d18647384e71cb03e30144ffc25a9c0dfbf53a2f72" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc046dfb08091e6764ace8825d837d78d28156c7ee8c03e165068f858e7c48af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6cc8c9b01bb5d707802f3029229ffa0aa90d44b39f76d8ce6e3b38a5ae0959e6" + 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..bb1c56d2b0477 --- /dev/null +++ b/Formula/s/ssllabs-scan.rb @@ -0,0 +1,43 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "eb44e540aba0e6a209ab3820a168184f39ddd470673093c7a3dc87a0e70eab42" + 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..f4c4884ecf614 --- /dev/null +++ b/Formula/s/sslmate.rb @@ -0,0 +1,64 @@ +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 + + bottle do + 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..c695df2c9474c --- /dev/null +++ b/Formula/s/sslscan.rb @@ -0,0 +1,30 @@ +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.1.6.tar.gz" + sha256 "5995b32c065715e8da2fd83ad99c07de4938ff55d46c6665bdc71b74814236a8" + 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_sequoia: "7787dbbe3ee2f19c82c423b36a43d9871134701db11c2c49d89ace89517c7be3" + sha256 cellar: :any, arm64_sonoma: "bdcab632ce9203b0a16ead448b461777f31dab4c1b7a4ce9a106408f71aef9f1" + sha256 cellar: :any, arm64_ventura: "5547ffb215b63be6fcaa65226681e0b5f97102520806a7e0707a26d951f6187d" + sha256 cellar: :any, sonoma: "70125dacd4720370f91e417a92fe9395b960d3931e8c7f105d1bc7888413cc3c" + sha256 cellar: :any, ventura: "a400d238dc421733cbec9f3105c81c845386d840df433235ead7b99298c24277" + sha256 cellar: :any_skip_relocation, arm64_linux: "a692bc15c933bd05d510729df7951e980204d83278b149a44a4ea11a495da4ea" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ad080bb9772d351c5afb1ad2eb145b1385db081277fb31bc7782f8f0f67742e" + 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..c874d1ff337ac --- /dev/null +++ b/Formula/s/sslsplit.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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..c7bfa5edde5cb --- /dev/null +++ b/Formula/s/ssocr.rb @@ -0,0 +1,40 @@ +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.0.tar.bz2" + sha256 "75caf81b4ddce2ecbd5142db3bb1c26178889e37010074b8ec4fe0b5009c676a" + 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_sequoia: "fd18440ae84caaafcb2f5d788c6c23ae95c0240dfc9f6b5166f35eaca59d33b5" + sha256 cellar: :any, arm64_sonoma: "1ec94528ade23b5dae8efcd5d564d3bace361e8f2cb2187634f48f493954d9f0" + sha256 cellar: :any, arm64_ventura: "7769d47981f3e86469509853748242c33416ea8ba2e95447f6480ba358f8e13e" + sha256 cellar: :any, sonoma: "c23687177f248921365de29f53ce885e3bdb2a62d72c1a3be95da8927f89d612" + sha256 cellar: :any, ventura: "6f3f9eb54854f922fbd2aa3403fa6a9af7741ecd3ae259aefe9fb341d7b0b6c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "11ef4081db6d12e9ccc3683102223b2c4415712b0b54d1d66eb3083bcb3e2c4e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "72a782a7a689c2127b876983da317908aca53f0699f0eae1dd7f7d60985aeda0" + end + + depends_on "pkgconf" => :build + depends_on "imlib2" + + resource "homebrew-test-image" do + url "https://www.unix-ag.uni-kl.de/~auerswal/ssocr/six_digits.png" + sha256 "72b416cca7e98f97be56221e7d1a1129fc08d8ab15ec95884a5db6f00b2184f5" + end + + def install + system "make", "install", "PREFIX=#{prefix}" + end + + test do + 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..eb9535b064315 --- /dev/null +++ b/Formula/s/ssss.rb @@ -0,0 +1,49 @@ +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 + + bottle do + 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, mojave: "96db005b3a278b26b7756c3dde1f94975cd09d901191029cf35649dfc1ac1178" + sha256 cellar: :any, high_sierra: "af51b1deda77dc64304532dbe4131a02520a8e619f5aea178eeef9d30f87f2c9" + sha256 cellar: :any, sierra: "d6c84cc81a0e079f55b32bf3bc35be3a70016226f5cb0e6d1862c9dca22aaa56" + sha256 cellar: :any, el_capitan: "ffc9b4c320b50f3d093000f9cde8fff3e4f2869ff4111a7da25b0cf17a2bc065" + 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..bef55d0cb4c0b --- /dev/null +++ b/Formula/s/sstp-client.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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..2d5f5cc765abf --- /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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a3d3897d2bddfdd53f91432d4c120f008714cca367ffd2d2eae56fa9fb323873" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d70d18294a3082b4989f85232bbef32f80369c3cb93465fba6773efa17d3d8e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f20438559cde61b3e7c973fa7aaa300782095b1134853eb8b1c6a61f0222723d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f20438559cde61b3e7c973fa7aaa300782095b1134853eb8b1c6a61f0222723d" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b20ec315e5d16adc7acdfbcdcfffd91859a39bcfc5e76e9a152da3dac178c4d3" + sha256 cellar: :any_skip_relocation, sonoma: "1d70d18294a3082b4989f85232bbef32f80369c3cb93465fba6773efa17d3d8e" + sha256 cellar: :any_skip_relocation, ventura: "f20438559cde61b3e7c973fa7aaa300782095b1134853eb8b1c6a61f0222723d" + sha256 cellar: :any_skip_relocation, monterey: "f20438559cde61b3e7c973fa7aaa300782095b1134853eb8b1c6a61f0222723d" + sha256 cellar: :any_skip_relocation, big_sur: "b852dedd2a66d7f03314cf510cf9d94e55c3437a7d23ac0bf7b1742b2d635dda" + sha256 cellar: :any_skip_relocation, catalina: "47e88ee3a995fb7f0dc9a5900a378c254c5be13ebfeee44474be9649992d4a5f" + sha256 cellar: :any_skip_relocation, mojave: "a405a6128674652c728e7af64d751388b6ecea693d780efc2ebcfa62ec8e0f6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2e6eacf34e2dd3920a2cf6ebf4cb4a117b6029f3bd506a1b11268ad4173dc7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9bd7167b97a64e85a91f23a1b3597d7c65e4819d8c23993bd78a071c16376ca6" + end + + conflicts_with "schemathesis", because: "both install `st` binaries" + + def install + ENV.prepend_create_path "PERL5LIB", lib/"perl5/" + + system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}", "INSTALLSITEMAN1DIR=#{man1}", "INSTALLSITEMAN3DIR=#{man3}" + system "make", "install" + + bin.env_script_all_files libexec/"bin", PERL5LIB: ENV["PERL5LIB"] + 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..393f265014ed1 --- /dev/null +++ b/Formula/s/stackql.rb @@ -0,0 +1,48 @@ +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.8.141.tar.gz" + sha256 "2768bcba103d3888cd945e832f9ea3e643083ce6ef431b1476c36c8bd93638a4" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2f20d3499018714af92dcb06817f966c272e6d7549ed18d7ce21b9d81df6058d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "16da6a7457903e6d3384182393efc640f81a9cb9c8fb525de465dc7ef236093f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cff72633cf85c45c3298a0c46e9aa056018f25e87b0ae5c41a1004917385f0c3" + sha256 cellar: :any_skip_relocation, sonoma: "99a874879a5d3dd75f14b9d03c6ad41c81ab57ba8d3bcc16116e16feb37b5b69" + sha256 cellar: :any_skip_relocation, ventura: "250aa91e941ab78b9bef5a0f1935b6cf9f69da920b62845da4dd1c2f88dec3b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "82724933879f0382a7df9dc17a6eff3a7adc246b97b854a745ee326a91ae6f7b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0bfaa915ff87e5d3f337f7394136398e706eb7b14c019dc99357546f3ccf633" + end + + depends_on "go" => :build + + def install + 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..9a700dd5a1529 --- /dev/null +++ b/Formula/s/stanc3.rb @@ -0,0 +1,51 @@ +class Stanc3 < Formula + desc "Stan transpiler" + homepage "https://github.com/stan-dev/stanc3" + url "https://github.com/stan-dev/stanc3.git", + tag: "v2.36.0", + revision: "0366507dd98f96bf6acd5d2753bd0910f2eb0ecb" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1a4e28729eb9e4790ba984d02f9752a9e3092c556892673e97d4324c67783cd1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6ba590eb17a914c2ce3c93c775a2d8dc1c9dc58ddc4cfecc20a92686d96508d2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "16ccaddc885752a02296d260bbff43e1a618183c5feb29f54dc966d282f58a7b" + sha256 cellar: :any_skip_relocation, sonoma: "d95e9716a7f9bfbed4a9161030ec37001051de2ddb7b18f4386b599b11692ca6" + sha256 cellar: :any_skip_relocation, ventura: "d000fd196bc37829af7985f3cfd15a95cae50676acef2250d54cbe088cd207ba" + sha256 arm64_linux: "0c35526796f504d5ea421e2bd2ea9bbb1e5d5889d150563fab318f5fa6a1ff82" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92fe8afc06fb2059c4ffd178c2a67eba0b305a60a566ebb80f4fbbce090504ca" + end + + depends_on "ocaml" => :build + depends_on "opam" => :build + + uses_from_macos "unzip" => :build + + def install + Dir.mktmpdir("opamroot") do |opamroot| + ENV["OPAMROOT"] = opamroot + ENV["OPAMYES"] = "1" + ENV["OPAMVERBOSE"] = "1" + + system "opam", "init", "--no-setup", "--disable-sandboxing" + 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 + 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..a6ec863a937a7 --- /dev/null +++ b/Formula/s/standard.rb @@ -0,0 +1,38 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d20e97c6540bd3307d244952e9a90986e43b5c11821d88941238a06592dfb422" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d20e97c6540bd3307d244952e9a90986e43b5c11821d88941238a06592dfb422" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d20e97c6540bd3307d244952e9a90986e43b5c11821d88941238a06592dfb422" + sha256 cellar: :any_skip_relocation, sonoma: "447f86d74cec0c6c6b1896bff34def4b3bdc8cb0172ef6f9cf2b4013074a1736" + sha256 cellar: :any_skip_relocation, ventura: "447f86d74cec0c6c6b1896bff34def4b3bdc8cb0172ef6f9cf2b4013074a1736" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc27ee83ddedebfc261f69d3872312efc1dfa00dbc7fca038bbe1cca6ae613d1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d20e97c6540bd3307d244952e9a90986e43b5c11821d88941238a06592dfb422" + 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/standardese.rb b/Formula/s/standardese.rb new file mode 100644 index 0000000000000..526302f2a2b33 --- /dev/null +++ b/Formula/s/standardese.rb @@ -0,0 +1,106 @@ +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 21 + 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 + end + + bottle do + sha256 arm64_sequoia: "0c085a6553e072c5de272972f6ac567de96866d7f1f9e1bce5fbca086c0dc41f" + sha256 arm64_sonoma: "3f8eecb4c36f352b2e85f937e39a1ffd10191e4947f97db531d441520cb59963" + sha256 arm64_ventura: "2877cca2dec0e5d25a13b0f871f124e6b6f151c820290a3f629b18a6a2fc35e3" + sha256 sonoma: "d7337d180cbf90b86e5def03d8031d26bea1fa8b9a68e09676f47ba2ddf6663f" + sha256 ventura: "d0da799b3b0175478642e0fcc104a11d40757f3da3d0c48f694b7372a4de9ee3" + sha256 arm64_linux: "35dbdc939daa2cc20d576caaa16f4e3a3b60c883f0f641e9c56e953abd6221ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84e681ed07036aeb3b06e8be4d6bd6acecbb6b90840ab72c17e5a2a7eabbd2a5" + 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" + end + + # Fix build with `boost` 1.85.0 using open PR. + # 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 + + 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..567ad5ad0bf07 --- /dev/null +++ b/Formula/s/stanford-ner.rb @@ -0,0 +1,29 @@ +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 + + 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..224f710c4b989 --- /dev/null +++ b/Formula/s/stanford-parser.rb @@ -0,0 +1,29 @@ +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 + + 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..71707092c36d6 --- /dev/null +++ b/Formula/s/staq.rb @@ -0,0 +1,52 @@ +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" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "4a78fb5391ce391ef6df17138cd12b2cdb940b6826ad87f31ae4c28e879d1f87" + sha256 cellar: :any, arm64_sonoma: "ab344e9a41f34a721802904a1f216f9e386c7b4b90036f5058a1d62d5c969ced" + sha256 cellar: :any, arm64_ventura: "64702f48420ef83e1d3d6286b332a785db0cc0860ae9d1ba553171155df563bf" + sha256 cellar: :any, sonoma: "0e2d26ec6e834188613c7c9005c871922ecc6b5e9c92c9da7195b3121f663df3" + sha256 cellar: :any, ventura: "ba4e7fab6b78e93d8fe4bec9dac21bff7cb88f33101d6d69cf17f8671677a42f" + sha256 cellar: :any_skip_relocation, arm64_linux: "e08f0668b5db8f44564286e09223ec36f40dce62d3182e09833a0237ed865885" + sha256 cellar: :any_skip_relocation, x86_64_linux: "78b7917bca6fd1e92003d7fd4fd308eae7d764f65eecb6cd8a8c41e0a1bfe9f7" + end + + depends_on "cmake" => :build + depends_on "gmp" + + 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..b1518b0702d05 --- /dev/null +++ b/Formula/s/star.rb @@ -0,0 +1,43 @@ +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_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..e47ac4b879730 --- /dev/null +++ b/Formula/s/starlark-rust.rb @@ -0,0 +1,37 @@ +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_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..43859e5497c3e --- /dev/null +++ b/Formula/s/starship.rb @@ -0,0 +1,39 @@ +class Starship < Formula + desc "Cross-shell prompt for astronauts" + homepage "https://starship.rs/" + url "https://github.com/starship/starship/archive/refs/tags/v1.23.0.tar.gz" + sha256 "be3ba025a64bd808899dce256e1511145b55cc5eefc5fca82bf5537cd8e09c72" + license "ISC" + head "https://github.com/starship/starship.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0f085c4ec44508be2fda1fd8d89ef9d7cc2207026e7db1da5a9d922d7046498" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c8a074bbded5edb346475e4bf3c6faecc13b15486cd75ffd7dc102c65369adad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "75d22389bb70b46e23553898ce23d583a4cfb5a3b6de712952da815f980c5511" + sha256 cellar: :any_skip_relocation, sonoma: "f0df06b16b67cb040c0f139dddd7df3df7985ccd8be93ac31a17e9dbb8a354b2" + sha256 cellar: :any_skip_relocation, ventura: "18594cec9c012f3bc91272d79a5d0edf6143a64122f8c1f99b6b253c12b8483b" + sha256 cellar: :any_skip_relocation, arm64_linux: "2eaa4272f26775db67f3ed107e97a4392d96adcfcbdf5141e5ba696987e23051" + sha256 cellar: :any_skip_relocation, x86_64_linux: "80cfca3624de24391aa69ce0c357a669e793384410cbc3b9facd982c0f1b437d" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + 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..f5c5197101f08 --- /dev/null +++ b/Formula/s/startup-notification.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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, mojave: "c4fcbad957b22a8999a0bc87a3c2b0b2b6b94654b3f6213f5903025574ae4c76" + sha256 cellar: :any, high_sierra: "60f0a0ce0a2954f53fa9f4b5dfc3aeb99aa5607801f340b506ea172bb1e381f3" + 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..09201b1981da5 --- /dev/null +++ b/Formula/s/statesmith.rb @@ -0,0 +1,57 @@ +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.18.2.tar.gz" + sha256 "f6823b7734b431bd567a59258549b3a77662d1b561dc33093ea503f904be25ce" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "86f698f5d2d76c8eb1f778e499ea4e557a6279992bdb974311b1231853fef6de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7542a876bf8a924ce082cc0de8a1f7fe5e6b3c9660340a6cf7cd0d446371bdeb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eff01365f5cca9d476f49b3833ff71be77bbcd16e7b57795a3410f806af8be26" + sha256 cellar: :any_skip_relocation, ventura: "e18105ffcabae10501200f28a10b641afca02bb924b75ea22d1e44faf2474cca" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f0d47885851de435d1ec58e52e5c7493ab5fcc1158bc973ebdb9119c68f17aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43fb000e7287ae4ae3b6fe53a88024f7d81ec1d35955975fb7ce01997f241ca7" + 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..4c818476e3a3c --- /dev/null +++ b/Formula/s/static-web-server.rb @@ -0,0 +1,53 @@ +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.36.1.tar.gz" + sha256 "e242e21b3e4b46395bda21b351438df6b5c54b1319a41a86b52eb49ed5567a40" + 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_sequoia: "961892661d638d43440d72d12cf9d95d29e8eb9c16d3e017c9497c12ddf37641" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "aa3f2cdbd8fcee585015b12043d2413993e322fc234a5370fad67dcde63d607d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4c188eefa1d2ef79045abdb878232b8ccaf7c922bec2ea1053ecfc97d802f61c" + sha256 cellar: :any_skip_relocation, sonoma: "2a56085747d95bbe1361d9084eaac5c1cad770f136149b72b0355f15f03b701f" + sha256 cellar: :any_skip_relocation, ventura: "bb19099fc589fd07295b4dd3b5dbc9202f4b22216c1861396376d2ff3f5e7ac6" + sha256 cellar: :any_skip_relocation, arm64_linux: "d412e72dc12299e27b90c30919801f7daa38cfa935b18a9155bc76a64bcefabf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "58a94eee1b902bc277127a9280424a47f6868a67ac51349c72df40dd0356c512" + 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..299afd9c11f8b --- /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 2 + head "https://github.com/dominikh/go-tools.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa358b34210b2a62d257ebe2e788f197cd55656c18acf72c8f783208ef7353aa" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa358b34210b2a62d257ebe2e788f197cd55656c18acf72c8f783208ef7353aa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa358b34210b2a62d257ebe2e788f197cd55656c18acf72c8f783208ef7353aa" + sha256 cellar: :any_skip_relocation, sonoma: "c22f781e614f17c4836a4a3df8a2744fb764a2bc49efa3530e01d8f46ba87453" + sha256 cellar: :any_skip_relocation, ventura: "c22f781e614f17c4836a4a3df8a2744fb764a2bc49efa3530e01d8f46ba87453" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fcd84b6cdd36306e9403869f94850b25b5a05561fe2740dbba895115ad06974a" + 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..91e7306bc109d --- /dev/null +++ b/Formula/s/statix.rb @@ -0,0 +1,40 @@ +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_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..bc25a0d3cb8c7 --- /dev/null +++ b/Formula/s/steamguard-cli.rb @@ -0,0 +1,35 @@ +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.0.tar.gz" + sha256 "668e9548643ea6c4f3bf77e7472dafd54386563c6d8589dbb4f72d0f0d1e88f0" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "855a2e48950e5057d91ededdd00f5e74e08e7930774e23b87136b1826135c6cb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "84e905a24e271a35a4f4586e98cc38170337f95a25f718b60fbb17d0bc58a35a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0acf0f73cbb7bd2f2818e002fd5b1d0d86546763acc12850ffd28b82ecde0055" + sha256 cellar: :any_skip_relocation, sonoma: "6ad918ca8a8564f06e32a4bf5d512e57b71ee5a98379e70409e11b13f1dfaae3" + sha256 cellar: :any_skip_relocation, ventura: "3a82a4159fb2a3008736f08ac53690854e129759c3cc5602dcae721445c925f3" + sha256 cellar: :any_skip_relocation, arm64_linux: "068720f5cc23421cc1d40c5c195c67e3aafedc1ee41b956e6fddd7de1d3ed38e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b77f1ef0e642fac743166d97d27108f9dc9173c56f2210f28a725c441229296" + 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..0daf49c5f4e05 --- /dev/null +++ b/Formula/s/steampipe.rb @@ -0,0 +1,41 @@ +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/v1.1.3.tar.gz" + sha256 "082810c9083f6224e7bff850b366c8889be8aac434cec255504fbad3f3dae5cd" + license "AGPL-3.0-only" + head "https://github.com/turbot/steampipe.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b2b32954ce511047081e519ca811cb038e1484f2c493b4ace2775b35501c548a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a40cab4ce04ee834fc8f1bf7ed89061fe8aa256ca64adee5ab6c063184b078c5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1cf35a25f625f3b0b1e61f0c8e536ee4cb98107b350f2dfdd41e6b8fc452fb96" + sha256 cellar: :any_skip_relocation, sonoma: "102ecd50a9676fae20173e7cbfa980e1dd0401a896a011d165e61bb1cb95b931" + sha256 cellar: :any_skip_relocation, ventura: "a984e904530c54c171a62a0866750def5fe647162351b20fbe90e78274256bfd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e98f015a2014748b10e7aed291ace764aef7494e3492498d606a60d3f8ffb13c" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w") + + generate_completions_from_executable(bin/"steampipe", "completion") + end + + test do + if OS.mac? + output = shell_output(bin/"steampipe service status 2>&1", 255) + assert_match "Error: could not create logs directory", output + else # Linux + output = shell_output(bin/"steampipe service status 2>&1") + assert_match "Steampipe service is not installed", output + end + 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..ef0d211c1b23d --- /dev/null +++ b/Formula/s/stella.rb @@ -0,0 +1,70 @@ +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 "1b40955f24f3f1f00dff0f4cb46bc1cab4c5e1b9017521b525c5e304be554e3a" + license "GPL-2.0-or-later" + head "https://github.com/stella-emu/stella.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "01b8c2228d4e79fe4353b9a84ce3a25fb60dfe8a7616feec7909d0f6f9fa0aa2" + sha256 cellar: :any, arm64_sonoma: "1c4bd3b235c0bc7eed68982e3d7aadf17d7d0b576850043d14622ccda12f9a01" + sha256 cellar: :any, arm64_ventura: "9006d2d1c2a917ffb68711f4dea71afb2eafe4c3d0ebc4ad719d2523cdfabc4b" + sha256 cellar: :any, sonoma: "a6538fcd6efcdd248764b6608f05f02a5589c820196d752af28501a873177959" + sha256 cellar: :any, ventura: "fe04bbcb3564ebd30f3a507a1c488f4ef8ffb57c8da468f32ac73175e59dc5a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c87bac821cbd8b547480bd72554baa71fd960b5e60d662760f34c3c1e31a2bb9" + 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/formula-patches/932732469b2d4ace873187b55973cce3e1627b34/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..a7760bb50a774 --- /dev/null +++ b/Formula/s/stellar-cli.rb @@ -0,0 +1,36 @@ +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/v22.8.0.tar.gz" + sha256 "08b634e25e4c7870936a83c2bf8fed451a4a4bcbdd06b5dc0b7b87818c0ce41b" + license "Apache-2.0" + head "https://github.com/stellar/stellar-cli.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "53d792d9bf9b480a746afa78a8f6a8a339855204583361303607a3e941acc37a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e9aeb570b1afc8cb6fc053883da2fb7645e7c8f7959af65d7d1cf8116e168951" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f62fa20e0ea352c56359c76ff1614567dbedd24e953401efb751860d4c149b3f" + sha256 cellar: :any_skip_relocation, sonoma: "7082f6f130da5443172a1df8e59641fd92e7e7f007f0fed19aa22f39e23425eb" + sha256 cellar: :any_skip_relocation, ventura: "2d31abb1759b2fee92a0f1c036bcc8efb6dfbf4ffa8f4112d7c267a953fdafd7" + sha256 cellar: :any_skip_relocation, arm64_linux: "bf90b960bde76e8a59b8acef5f3a074eba7d717ee23d992155934a14b7bf99fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e863c8a28c6a812ee3632a273c1bf6fe8bf8adcc82e2d8cb8e91c26e602f0f0d" + 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", "--features=opt", *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..7120887589906 --- /dev/null +++ b/Formula/s/stellar-core.rb @@ -0,0 +1,77 @@ +class StellarCore < Formula + desc "Backbone of the Stellar (XLM) network" + homepage "https://www.stellar.org/" + url "https://github.com/stellar/stellar-core.git", + tag: "v22.2.0", + revision: "e6c1f3bfcf9ef7b07b718b4984283c1c0bb91acd" + 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_sequoia: "226fc71cead41d70628e8c7a54e0c27b0e51601259d276d4300a7b2edee85c53" + sha256 cellar: :any, arm64_sonoma: "69dabc43e9c9cfefcb7d2acfb4cd34a9c3f748d7ddd2c275d652aa1234e650ee" + sha256 cellar: :any, arm64_ventura: "925f3a5acdcb3238b5b33b1809d3b46f52cf7488dea06fbb912f9b397ed0ec94" + sha256 cellar: :any, sonoma: "c26b081ddccec3cb08251aeec08c9fcdcffeae48065ab62b8c7e884852970811" + sha256 cellar: :any, ventura: "1ad8bf4a3cb97b6f649d2ab07a7b50457a2307fc4b31174b6f339965d333926b" + sha256 cellar: :any_skip_relocation, arm64_linux: "e0a79074e8bc2d29fc3b2ac078e1e3463d1a6aac4e50fe51be9f274878bc6176" + sha256 cellar: :any_skip_relocation, x86_64_linux: "03a5c12e89785725ea1baa9c5ac05ed422b4609e78f897d6506187d77fbd7569" + 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" + depends_on macos: :catalina # Requires C++17 filesystem + + 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..60f92b1b23f73 --- /dev/null +++ b/Formula/s/stencil.rb @@ -0,0 +1,36 @@ +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.4.0.tar.gz" + sha256 "653d9c5faea41365ba18006467378cdde05e6e63c77a7aaa076168fc0889ec87" + license "Apache-2.0" + head "https://github.com/rgst-io/stencil.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "edb89866ce1167db591f573c1eaa2ef5c984c3663b9b78aaeff907722775f8f6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "27503282809deef960658a972008065c5621600b8c4c8d65d97fc0e89c0f33f4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fc568999c7229d16a61068f3c53fcc65629c0f01ce1a457c3af8e80ce8f87ad2" + sha256 cellar: :any_skip_relocation, sonoma: "6e5dc73c1fd34f532e204fe44a6b536a9434567b4465fe04f6c6537baccf9270" + sha256 cellar: :any_skip_relocation, ventura: "c035a024d7a6763391538073ba5439fb647ce7954583d94c0bbad59b4267c0ae" + sha256 cellar: :any_skip_relocation, arm64_linux: "bdfc06395a1dee7ad16261b1478cd43e141715533791e45504c616bd15226de0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8e19f32107a89c9b8da0872cb527bccf43c138ae761f6960771a2c4219fd92b" + 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..d474b61d622e6 --- /dev/null +++ b/Formula/s/step.rb @@ -0,0 +1,123 @@ +class Step < Formula + desc "Crypto and x509 Swiss-Army-Knife" + homepage "https://smallstep.com/" + url "https://github.com/smallstep/cli/releases/download/v0.28.6/step_0.28.6.tar.gz" + sha256 "1ab8ba1472e5dca30d863703c1b874541e5a1b5382ba9f2c26a00f652a75a2f1" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa444b239b3f7fbfd974fea34286d6e4f5721a8fe182fbf59a00dbdc378f55da" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "044242cb1f678a5a2b1a9f8117f14fd27de2aa25da1b07c3ad76959c8b05ffb4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "266aa8b378b9da8f379ac59b0839e2de1f1cdf0ca313115f1a781ebfb1282454" + sha256 cellar: :any_skip_relocation, sonoma: "bffab46cffe650a4df16627e862ed30f1f763c4c3edfe06a299501916bb14ecd" + sha256 cellar: :any_skip_relocation, ventura: "d70b34f83c66b289b062d2637a9a03ae116d76274d3bc1d8f6a9b477d0c1d353" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8571a590547b33f37b8df1392608f2c55ba7fc2be0b6cb86d7508b14af044447" + 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["VERSION"] = version.to_s + ENV["CGO_OVERRIDE"] = "CGO_ENABLED=1" + system "make", "build" + bin.install "bin/step" => "step" + generate_completions_from_executable(bin/"step", "completion") + + resource("certificates").stage do |r| + ENV["VERSION"] = r.version.to_s + ENV["CGO_OVERRIDE"] = "CGO_ENABLED=1" + system "make", "build" + bin.install "bin/step-ca" => "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..05e897196cfda --- /dev/null +++ b/Formula/s/stepci.rb @@ -0,0 +1,56 @@ +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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5734ebe30193bf703e1e8abf64b3c3085dfbbc3be250494fbae9607b81a42ca5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b51a4218cbf325447634057a0362fa99de98611348196764ba954f53baeb2eba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b51a4218cbf325447634057a0362fa99de98611348196764ba954f53baeb2eba" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b51a4218cbf325447634057a0362fa99de98611348196764ba954f53baeb2eba" + sha256 cellar: :any_skip_relocation, sonoma: "c59c4b4fa04b0d69872f8bbe4a27a0b1313afcc689b4ac00104963f540fcfad7" + sha256 cellar: :any_skip_relocation, ventura: "c59c4b4fa04b0d69872f8bbe4a27a0b1313afcc689b4ac00104963f540fcfad7" + sha256 cellar: :any_skip_relocation, monterey: "c59c4b4fa04b0d69872f8bbe4a27a0b1313afcc689b4ac00104963f540fcfad7" + sha256 cellar: :any_skip_relocation, arm64_linux: "85b84fadcf625233e1794dcc32f0affbcd515bf224efee8287b24f42a341d313" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f06503b493bdddd590715fc784086f1c9a4241c67450af3f07cd4077099d581a" + 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..c7f8ab1081d4b --- /dev/null +++ b/Formula/s/stern.rb @@ -0,0 +1,31 @@ +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.32.0.tar.gz" + sha256 "a597449d4a4443a45206eb5054676545f74a5cc279a6c48e298e01429e471017" + license "Apache-2.0" + head "https://github.com/stern/stern.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c65bf6ff2ee1634f392e630a76b6953f4674c750b125a9df9dbe0a06637d6e5c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a95b680314ece8f2fbf490c0ec5826b792f538e74df05c7edb00527e2de75408" + sha256 cellar: :any_skip_relocation, arm64_ventura: "311436853aa51947a75c24127f2c8d8b9e6847d456f64ef18814036d8d333258" + sha256 cellar: :any_skip_relocation, sonoma: "39134cc30a1bdbdc6661c0b5012b43de07f80b04ed6692c4900c9c199fc95268" + sha256 cellar: :any_skip_relocation, ventura: "bc54ef4005c453f23962ff4cfe6fe2b6c2d29c025e9b822430a163b06465b80c" + sha256 cellar: :any_skip_relocation, arm64_linux: "2bf9c76970393d3879ab8327c4ab393da590a132b3d0a85df18235d8e5948d58" + sha256 cellar: :any_skip_relocation, x86_64_linux: "408cdc2e2ad3c0cf59f6f4c10c49a299e2cf387c15f025817ce615b45172f269" + 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..42a01b1a1b26c --- /dev/null +++ b/Formula/s/stgit.rb @@ -0,0 +1,50 @@ +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.3/stgit-2.5.3.tar.gz" + sha256 "637d9a5d435115a69f2dc5a0273b0c6564fdda7b9483268968fae531343c087f" + license "GPL-2.0-only" + head "https://github.com/stacked-git/stgit.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d4e745cfee06e0fc05f4fe6e3d74e932d309adffc9113d1fb66d7fe308982529" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1fbea2bf33eccc3922aa17a1e8902eaa34a04760d3a9637ad24fe581ac2024c1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "de35d6a19a69bc1786c0d6490661805c5cd98701c6b96aa0b583f32143239d60" + sha256 cellar: :any_skip_relocation, sonoma: "ad41f116204667b9bc1192da442908f1d7ce9196d144394a12a9f865fceb9138" + sha256 cellar: :any_skip_relocation, ventura: "f28ac3b86b43402de27875ee7f30d9e1af3f0837572e61719aa57a4da15849ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fa691fa71e1ea4758fafc0d3ea0c85eafbf09487d7a63da08d3b495aca56e55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4be75f0fc9a7c398897966b5b6d1b128a61251b9c555091e770b67ba3fa9e5e7" + 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..1e16cac29a0c6 --- /dev/null +++ b/Formula/s/stk.rb @@ -0,0 +1,60 @@ +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 + + bottle do + 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..df09dc1137b3b --- /dev/null +++ b/Formula/s/stlink.rb @@ -0,0 +1,55 @@ +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" + + bottle do + 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..1a2eb25a892ae --- /dev/null +++ b/Formula/s/stm32flash.rb @@ -0,0 +1,36 @@ +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 + + bottle do + 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..0fc5c38b7ce5c --- /dev/null +++ b/Formula/s/stockfish.rb @@ -0,0 +1,44 @@ +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_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..6bf79f4864b52 --- /dev/null +++ b/Formula/s/stoken.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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..b28b42d674e62 --- /dev/null +++ b/Formula/s/stolon.rb @@ -0,0 +1,61 @@ +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 + + bottle do + 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, 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..b0e07c4de2848 --- /dev/null +++ b/Formula/s/stone.rb @@ -0,0 +1,38 @@ +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 + + bottle do + 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, mojave: "13be210aea90ed4b9067afcf0dcad8e54494c0f262aa94fb51f926f7a46b8e27" + 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..5348d12b20f53 --- /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.128.4.tar.gz" + sha256 "2588fe6f3722bf36738234eaf0afc2236a32a44acc88e45f703238861a667678" + 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_sequoia: "7b66c38089e860f51a496138d80d2196b569a70329e6efaf47d5ab24a82b6366" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b66c38089e860f51a496138d80d2196b569a70329e6efaf47d5ab24a82b6366" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b66c38089e860f51a496138d80d2196b569a70329e6efaf47d5ab24a82b6366" + sha256 cellar: :any_skip_relocation, sonoma: "bfe18af1fc4b61aed0dea015134e9f32a40558252d460014c8195e8f726fb279" + sha256 cellar: :any_skip_relocation, ventura: "bfe18af1fc4b61aed0dea015134e9f32a40558252d460014c8195e8f726fb279" + sha256 cellar: :any_skip_relocation, x86_64_linux: "69f6001c3ba0b424081fdb6cea84f3e71b89374cb78a048bd46f43cba80c8b45" + 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..86fc652028f4f --- /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.0/apache-storm-2.8.0.tar.gz" + sha256 "069449d707eb0f44ccdb9a6556f48fd8357b76d089dcc15ad38b778f365c5e7a" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "97e7ce069f5257783d3c493ceede57ae04929a1cc6ecfdf7f564b61f48ba8e3a" + 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..f0148a80a2306 --- /dev/null +++ b/Formula/s/stormlib.rb @@ -0,0 +1,64 @@ +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_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/stow.rb b/Formula/s/stow.rb new file mode 100644 index 0000000000000..ff87ff53300f3 --- /dev/null +++ b/Formula/s/stow.rb @@ -0,0 +1,32 @@ +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.4.1.tar.gz" + mirror "https://ftpmirror.gnu.org/stow/stow-2.4.1.tar.gz" + sha256 "2a671e75fc207303bfe86a9a7223169c7669df0a8108ebdf1a7fe8cd2b88780b" + license "GPL-3.0-or-later" + + bottle do + 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..363ba4b45defc --- /dev/null +++ b/Formula/s/stp.rb @@ -0,0 +1,117 @@ +class Stp < Formula + desc "Simple Theorem Prover, an efficient SMT solver for bitvectors" + homepage "https://stp.github.io/" + license "MIT" + revision 4 + 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_sequoia: "14273492604bc38924086ea460c7aae0ec9d9443124f253d41ab69649ae348e8" + sha256 cellar: :any, arm64_sonoma: "3a9ce2263d91eed3e8f6205e69b327f613dd767065ebed03c329ac26de7fc9be" + sha256 cellar: :any, arm64_ventura: "1627b2244a8c9510b46b0fdcfcaffdb5f55c21a528046a1988df5c2e4a10a33c" + sha256 cellar: :any, sonoma: "5160e4ed8537ddd8646866b7f0ddf4722f0be010b898e1708d6f22c974c9a866" + sha256 cellar: :any, ventura: "a3c9c4d00398271ec389ae631372e280d806dbdd6146e28d73417f71e7cd2bfe" + sha256 cellar: :any_skip_relocation, arm64_linux: "b3c927ba2276333d15e41be785894b0a65d1513f8e1932839564efc164fc6292" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9347d3517513e8d028b7fc993db150bc9d4751e1e450e97035339c007c4e0bd8" + 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.13" + + 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.13" + 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.13 test.py") + end +end diff --git a/Formula/s/strace.rb b/Formula/s/strace.rb new file mode 100644 index 0000000000000..e3b9a953fe3a0 --- /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.14/strace-6.14.tar.xz" + sha256 "244f3b5c20a32854ca9b7ca7a3ee091dd3d4bd20933a171ecee8db486c77d3c9" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_linux: "418663fec63512fa8d45f4a0f6612cf8feca14d5a9796b2815c119b0d6ff790b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "335c9c43ed7b79bf4c441ddabeaa802224dc3f03af94cb760d172937a3e2eda9" + 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..d5835e6362274 --- /dev/null +++ b/Formula/s/streamlink.rb @@ -0,0 +1,141 @@ +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/0e/ba/cd25043ddaa6253cdbac234e00702eb6fcaec41c317284ed74f53fbde1b6/streamlink-7.3.0.tar.gz" + sha256 "1e20d624451f26156a38b9dae5bdfcc6640a8bdf27922370edec8abe237abb08" + license "BSD-2-Clause" + head "https://github.com/streamlink/streamlink.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bceec769879be305a93d147035177e399c8703e4a7b41de06eb1d151e1a680cc" + sha256 cellar: :any, arm64_sonoma: "e6ba97af997b319305d7a8cae4e5f4cf68dffc660347e98e669d44ea23e9065a" + sha256 cellar: :any, arm64_ventura: "33b57190b12e969954493c9056978c140810f1b4af08bcfdf20ff4889ce9d8c1" + sha256 cellar: :any, sonoma: "df4c8b93662b3465db6f9b82ad3fa29b2b3e523054362d4ea3a14343aa69e70c" + sha256 cellar: :any, ventura: "0d47a67d092480202ad8bfe28aeec98b03213d2a76df49b46d5dcaeadf8129f1" + sha256 cellar: :any_skip_relocation, arm64_linux: "5062e42a027139a58e40588a246f7ec95e3ccecf5ae976fe04f8ce021eedf327" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a2fcb9c5b7d2a2d636748dbe5d043f38103c844e9d5ab2e1320b33d7f26e851d" + end + + depends_on "certifi" + depends_on "libxml2" # https://github.com/Homebrew/homebrew-core/issues/98468 + depends_on "python@3.13" + + uses_from_macos "libffi" + uses_from_macos "libxslt" + + on_linux do + depends_on "pkgconf" => :build + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + 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/44/e6/099310419df5ada522ff34ffc2f1a48a11b37fc6a76f51a6854c182dbd3e/pycryptodome-3.22.0.tar.gz" + sha256 "fd7ab568b3ad7b77c908d7c3f7e167ec5a8f035c64ff74f10d47a4edd043d723" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/01/c1/68d582b4d3a1c1f8118e18042464bb12a7c1b75d64d75111b297687041e3/trio-0.30.0.tar.gz" + sha256 "0781c857c0c81f8f51e0089929a26b5bb63d57f927728a5586f7e36171f064df" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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 "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") + + url = OS.mac? ? "https://ok.ru/video/1643385658936" : "https://www.youtube.com/watch?v=pOtd1cbOP7k" + if OS.mac? + output = shell_output("#{bin}/streamlink --ffmpeg-no-validation -l debug '#{url}'") + assert_match "Available streams:", output + refute_match "error", output + refute_match "Could not find metadata", output + else + output = shell_output("#{bin}/streamlink --ffmpeg-no-validation -l debug '#{url}'", 1) + assert_match(/Could not get video info - LOGIN_REQUIRED|plugin does not support VOD content/, output) + end + end +end diff --git a/Formula/s/streamrip.rb b/Formula/s/streamrip.rb new file mode 100644 index 0000000000000..65edaa9ba4f46 --- /dev/null +++ b/Formula/s/streamrip.rb @@ -0,0 +1,232 @@ +class Streamrip < Formula + include Language::Python::Virtualenv + + desc "Scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer" + homepage "https://github.com/nathom/streamrip" + url "https://files.pythonhosted.org/packages/b8/c9/6997772e0217f3081e4e692c7b8b104aaa564c008f2593341e81bbbd2396/streamrip-2.1.0.tar.gz" + sha256 "e59b4b406f9ac77eb59c927a1a082644e0902152ffeb6212b6b24af7fbef5540" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b89f47880d731ba9be311bc15dc854f4d22fb4e07dc70d5013d64a9147e42690" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dfe0bcd9118f58d6b377d2eea6fa87ccfbd5c450322305e8815e8dbb23c54979" + sha256 cellar: :any_skip_relocation, arm64_ventura: "65cdb9c66cf1cba0f43d803c6528b23820c5a6f84579f84bbf0d63677dca7729" + sha256 cellar: :any_skip_relocation, sonoma: "c21cb2ddf71eeeb687a0654b95a84c39408115364acf288f087ba4a5dcff6545" + sha256 cellar: :any_skip_relocation, ventura: "6b8eec41a964e5205609053b4beac6b0b97e49d98fc849a3e279e7b6d1ef4d98" + sha256 cellar: :any_skip_relocation, arm64_linux: "e67abb035e652d4c37a2069bef79d607a71ee18d3b1abd344762500ec80f16ca" + sha256 cellar: :any_skip_relocation, x86_64_linux: "249bcfb1dafa43ba6f3c753c43a2209653583c997b48e48ee8214f60692f80f0" + end + + depends_on "certifi" + depends_on "ffmpeg" + depends_on "pillow" + depends_on "python@3.13" + + uses_from_macos "libffi" + + resource "aiodns" do + url "https://files.pythonhosted.org/packages/e7/84/41a6a2765abc124563f5380e76b9b24118977729e25a84112f8dfb2b33dc/aiodns-3.2.0.tar.gz" + sha256 "62869b23409349c21b072883ec8998316b234c9a9e36675756e8e317e8768f72" + 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/b3/3f/c4a667d184c69667b8f16e0704127efc5f1e60577df429382b4d95fd381e/aiohttp-3.11.13.tar.gz" + sha256 "8ce789231404ca8fff7f693cdce398abf6d90fd5dae2b1847477196c243b1fbb" + 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/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + 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/69/82/3c4e1d44f3cbaa2a578127d641fe385ba3bff6c38b789447ae11a21fa413/attrs-25.2.0.tar.gz" + sha256 "18a06db706db43ac232cce80443fcd9f2500702059ecf53489e3c5a3f417acaf" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz" + sha256 "2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3" + 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/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz" + sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" + 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/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + end + + resource "mutagen" do + url "https://files.pythonhosted.org/packages/81/e6/64bc71b74eef4b68e61eb921dcf72dabd9e4ec4af1e11891bbd312ccbb77/mutagen-1.47.0.tar.gz" + sha256 "719fadef0a978c31b4cf3c956261b3c58b6948b32023078a2117b1de09f0fc99" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pathvalidate" do + url "https://files.pythonhosted.org/packages/60/f7/ff244fdd8ed98e98d4f9acecfe74a890e5e3245ce55253ef88db51e94652/pathvalidate-2.5.2.tar.gz" + sha256 "5ff57d0fabe5ecb7a4f1e4957bfeb5ad8ab5ab4c0fa71f79c6bbc24bd9b7d14d" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/92/76/f941e63d55c0293ff7829dd21e7cf1147e90a526756869a9070f287a68c9/propcache-0.3.0.tar.gz" + sha256 "a8fd93de4e1d278046345f49e2238cdb298589325849b2645d4a94c53faeffc5" + end + + resource "pycares" do + url "https://files.pythonhosted.org/packages/d7/b1/94daaa50b6d2fa14c6b4981ca24fa4e7aa33a7519962c76170072ffb06ee/pycares-4.5.0.tar.gz" + sha256 "025b6c2ffea4e9fb8f9a097381c2fecb24aff23fbd6906e70da22ec9ba60e19d" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/11/dc/e66551683ade663b5f07d7b3bc46434bf703491dbd22ee12d1f979ca828f/pycryptodomex-3.21.0.tar.gz" + sha256 "222d0bd05381dd25c32dd6065c071ebf084212ab79bab4599ba9e6a3e0009e6c" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/ae/3c/c9d525a414d506893f0cd8a8d0de7706446213181570cdbd766691164e40/pytest-8.3.5.tar.gz" + sha256 "f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" + end + + resource "pytest-asyncio" do + url "https://files.pythonhosted.org/packages/ae/53/57663d99acaac2fcdafdc697e52a9b1b7d6fcf36616281ff9768a44e7ff3/pytest_asyncio-0.21.2.tar.gz" + sha256 "d67738fc232b94b326b9d060750beb16e0074210b98dd8b58a5239fa2a154f45" + end + + resource "pytest-mock" do + url "https://files.pythonhosted.org/packages/c6/90/a955c3ab35ccd41ad4de556596fa86685bf4fc5ffcc62d22d856cfd4e29a/pytest-mock-3.14.0.tar.gz" + sha256 "2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/b7/9d/4b94a8e6d2b51b599516a5cb88e5bc99b4d8d4583e468057eaa29d5f0918/yarl-1.18.3.tar.gz" + sha256 "ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + 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..a2026100e57c1 --- /dev/null +++ b/Formula/s/streamripper.rb @@ -0,0 +1,58 @@ +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 + + bottle do + rebuild 1 + 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..b85d44ede2d49 --- /dev/null +++ b/Formula/s/streamvbyte.rb @@ -0,0 +1,32 @@ +class Streamvbyte < Formula + desc "Fast integer compression in C" + homepage "https://github.com/lemire/streamvbyte" + url "https://github.com/lemire/streamvbyte/archive/refs/tags/v2.0.0.tar.gz" + sha256 "51ca1c3b02648ea4b965d65b0e586891981f2e8184b056520e38ad70bcc43dd8" + license "Apache-2.0" + head "https://github.com/lemire/streamvbyte.git", branch: "master" + + bottle do + 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 + system "cmake", "-S", ".", "-B", "build", *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..6314141bade98 --- /dev/null +++ b/Formula/s/stress-ng.rb @@ -0,0 +1,42 @@ +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.00.tar.gz" + sha256 "7d0be69dcdad655145026f499863de01d317e87ff87acd48c3343d451540d172" + license "GPL-2.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eeb8f86c69138a119955ea02ac4a2131d7d16d59acc60fcbfa26cb482c8371b9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bd9cf1d8710274244d3dc5af617accb34e4162a06ffa0b67e43f3a2ebc8ebce3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "657756acc268fe67b12c1999d661c1e49242f65ae5062259b7629678becaddf8" + sha256 cellar: :any_skip_relocation, sonoma: "121959f0b53a85e290bc05de7e130b376c2dde01fd91a679ee665b40d5e982e1" + sha256 cellar: :any_skip_relocation, ventura: "9b0f23172e59e060bd111021ee40e49fd426d755098af6cd510683b669f1e8d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "ae0fd0afc25f28b2b3c9abca775fd33132cc03a95521dc624d5e819cd417396a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eee18f9cafd0e41741c807356cca58f786edd561f4c9a851862cec4e158da3a5" + end + + depends_on macos: :sierra + + 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..df25fd7155ca3 --- /dev/null +++ b/Formula/s/stress.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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/strip-nondeterminism.rb b/Formula/s/strip-nondeterminism.rb new file mode 100644 index 0000000000000..b21dc6a5710e2 --- /dev/null +++ b/Formula/s/strip-nondeterminism.rb @@ -0,0 +1,72 @@ +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.14.1/strip-nondeterminism-1.14.1.tar.bz2" + sha256 "149e5e7585cd1d8e777564d5772fb1afa5ed7be4a049c52ffc3a31de2bc04b93" + 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_sequoia: "7917ac787a7dc6cf8d86c1b6b0fe44de78036523fec7a9c81c00c0b6dffbbac6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7917ac787a7dc6cf8d86c1b6b0fe44de78036523fec7a9c81c00c0b6dffbbac6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b09a9787d5eca23d947ca3fcf5744202051290337ee041f88af17fb70fc41c6b" + sha256 cellar: :any_skip_relocation, sonoma: "5a853e47eb7bd6b1f321040f2debd817ab1e1291ef5df6b8381c888594d67727" + sha256 cellar: :any_skip_relocation, ventura: "75901bb6038f31a4afe830eee9de9c020c514d9eb6c7333ad5ed545f4bbdbe61" + sha256 cellar: :any_skip_relocation, arm64_linux: "56debe860510e4194923c1398ccfc9b56250c2539503cb9bb1b95951a56df1d0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f49f58ba6bd0bff56bbf6d0a1344f3aa46c8e2f7faf44c2b0d57b454d75488e0" + 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..28f7c15de58d5 --- /dev/null +++ b/Formula/s/stripe-cli.rb @@ -0,0 +1,42 @@ +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.27.0.tar.gz" + sha256 "217f1462003fb7dd6e8ca14507211301ef128107ded2fb03cc19cdf608a9fec4" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7da1b9fa0419c5e31d804191ac6ab9a6147e4a9e5e0baebdc905ef031fedb02f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e0f7ced54283e77628ba5db93ae35e37aa6f71c3ece339f147c74b7fe4350170" + sha256 cellar: :any_skip_relocation, arm64_ventura: "26a1d8cbabe334c407ddbb61386004dc3d445c3009ae800d2b9d436abdba0319" + sha256 cellar: :any_skip_relocation, sonoma: "8fc7c85bbb01ab2276896cc208ea7cb29615147b47bae10f5cbfdfb1f55adb1c" + sha256 cellar: :any_skip_relocation, ventura: "2586abf0092dd9080ff993e4ef7a837aaa8620f260228d7490d778d1bbfa736d" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8996ac34581849c34f7d86c5332e550e0185e789c5826e5da3d16603adfb442" + sha256 cellar: :any_skip_relocation, x86_64_linux: "54e05811de441326503f42f3f29f724f894fb975bc5e9c56f3dfbd487aedb14f" + 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..99a09013a1d24 --- /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.194.0.tar.gz" + sha256 "8e6357d75ef58badc91995c3a4f6bad6825384461ec3ccdf2c780e3798951733" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "83a4f61d0c6e07b281dbeb8ef2dfba7d6bdddc5586b21cfc504f94e0aa0a58c5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "83a4f61d0c6e07b281dbeb8ef2dfba7d6bdddc5586b21cfc504f94e0aa0a58c5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "83a4f61d0c6e07b281dbeb8ef2dfba7d6bdddc5586b21cfc504f94e0aa0a58c5" + sha256 cellar: :any_skip_relocation, sonoma: "779a14948e1bd5c4504b56fb2b615251e68676419285b1f360bf579681cc3d06" + sha256 cellar: :any_skip_relocation, ventura: "779a14948e1bd5c4504b56fb2b615251e68676419285b1f360bf579681cc3d06" + sha256 cellar: :any_skip_relocation, x86_64_linux: "766d65a5aec06f7df1da89b06ec455321d4b78194cf47b3c6a5692ebb2b0c778" + 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..983cd9093655c --- /dev/null +++ b/Formula/s/strongswan.rb @@ -0,0 +1,97 @@ +class Strongswan < Formula + desc "VPN based on IPsec" + homepage "https://www.strongswan.org/" + url "https://download.strongswan.org/strongswan-6.0.1.tar.bz2" + sha256 "212368cbc674fed31f3292210303fff06da8b90acad2d1387375ed855e6879c4" + 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_sequoia: "1d400a27f9827ddc6cf1558f1745ec2de5b726b5846fc0ccb940ce1ae4816c46" + sha256 arm64_sonoma: "a53259dbcb6295c222daf978857a3bbc5b9227d008c77a211f92ad7341ab72ca" + sha256 arm64_ventura: "fa99e2acc5b7dad59ba0c34729ac9962265b3a44471b76ea2ccb3449b091a6d0" + sha256 sonoma: "324b1831262b1913c26de58b0062943a9d453fac4ed1b1ebc8448b47457e207f" + sha256 ventura: "328816ca28f4d263fc8389a4384b481c86f46a2e1d43f152ba7a1ab6ca10b656" + sha256 arm64_linux: "5933ebc1945502e575568a71fd8f230164aafad1228b0fc41e895c848a25113a" + sha256 x86_64_linux: "5639fc4928b7bf717c6c4eb52db38c58205b332c9a3694f8197195555e24a165" + 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-ikev1 + --enable-ikev2 + --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..c9f6c785b0612 --- /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.03.28/structurizr-cli.zip" + sha256 "9bb9073c7387bc4f9c50f33075d87d151ca35aa1bf1b97187fcc19d70dc55dbe" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "a935baf2df03116938057297d49ea51ac342968a59f8ef750afb13dc96449952" + 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..d8b9aa36144df --- /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.25.tar.gz" + sha256 "0369a28a944f3f2f3c5bde527572acafbeeeee1a5cf158c1dc8dd5e9f068e059" + license "MIT" + head "https://github.com/abhimanyu003/sttr.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f2564fe8ff7366d62ae106fa1f722bcb723af6c3e71fad0c3a85ba4c0af05eb3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f2564fe8ff7366d62ae106fa1f722bcb723af6c3e71fad0c3a85ba4c0af05eb3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f2564fe8ff7366d62ae106fa1f722bcb723af6c3e71fad0c3a85ba4c0af05eb3" + sha256 cellar: :any_skip_relocation, sonoma: "2104985e0cde1ff6d0ff529729ead445c8770157f88741a362b86c5fba59a3fa" + sha256 cellar: :any_skip_relocation, ventura: "2104985e0cde1ff6d0ff529729ead445c8770157f88741a362b86c5fba59a3fa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c2b1afb58f0441c4537b18771b73a534ca7a3ce1c3bccc5e647987faa6ff25e" + 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/stubby.rb b/Formula/s/stubby.rb new file mode 100644 index 0000000000000..456cd9061a554 --- /dev/null +++ b/Formula/s/stubby.rb @@ -0,0 +1,81 @@ +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" + + bottle do + 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..c3672ee5c8ae9 --- /dev/null +++ b/Formula/s/stuffbin.rb @@ -0,0 +1,60 @@ +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" + + bottle do + 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, 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..06961350f2689 --- /dev/null +++ b/Formula/s/stunnel.rb @@ -0,0 +1,98 @@ +class Stunnel < Formula + desc "SSL tunneling program" + homepage "https://www.stunnel.org/" + url "https://www.stunnel.org/downloads/stunnel-5.74.tar.gz" + sha256 "9bef235ab5d24a2a8dff6485dfd782ed235f4407e9bc8716deb383fc80cd6230" + 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_sequoia: "3397dd9c588929b1c27eab79dfc68ac549154cc5723743860f3132a9eaa9b3e7" + sha256 cellar: :any, arm64_sonoma: "ed81eddd6dba1c5b0c530be48d7acc46e3a0a8312f9d5ae3d9118c0cd797533e" + sha256 cellar: :any, arm64_ventura: "ac7f0bbfd5e4e7c5810d181b2ad929d5081d9d40714bb1638dc36149cb0574f4" + sha256 cellar: :any, sonoma: "82aa69de9ed3e96f6cf2b40a82ea5d725dc515f47a891649f9d49cb1371d0df4" + sha256 cellar: :any, ventura: "448441d68babf46d4b6c5f3feade07c6b24bacd6e6d3923c1b056fd1e6b118a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "75643aec1f5929b9db2bb9a36b6a31ddd4fb205b67a97537c2bfe8eae4398806" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4c5735f96b3a3d61de2648205e462d3eded527d8480dc0dd026829aa3a9bbb03" + 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..48e0671f3f2a3 --- /dev/null +++ b/Formula/s/stuntman.rb @@ -0,0 +1,47 @@ +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 + + bottle do + rebuild 1 + 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/stylelint.rb b/Formula/s/stylelint.rb new file mode 100644 index 0000000000000..2242085f30642 --- /dev/null +++ b/Formula/s/stylelint.rb @@ -0,0 +1,44 @@ +class Stylelint < Formula + desc "Modern CSS linter" + homepage "https://stylelint.io/" + url "https://registry.npmjs.org/stylelint/-/stylelint-16.19.1.tgz" + sha256 "a429c9e8d5a3d5fc396066199aa7126769e1d4ffd3a9da2c0e49d4bafa3b38f3" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "143c27ed3713827f92cab5f4650a71a4040fd30c5bb4c13fcfa71ee266ebd917" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "143c27ed3713827f92cab5f4650a71a4040fd30c5bb4c13fcfa71ee266ebd917" + sha256 cellar: :any_skip_relocation, arm64_ventura: "143c27ed3713827f92cab5f4650a71a4040fd30c5bb4c13fcfa71ee266ebd917" + sha256 cellar: :any_skip_relocation, sonoma: "9df24b3985bcb44da8180aa8e2e9cbea80be97246349032d76fa1247db85f5af" + sha256 cellar: :any_skip_relocation, ventura: "9df24b3985bcb44da8180aa8e2e9cbea80be97246349032d76fa1247db85f5af" + sha256 cellar: :any_skip_relocation, arm64_linux: "143c27ed3713827f92cab5f4650a71a4040fd30c5bb4c13fcfa71ee266ebd917" + sha256 cellar: :any_skip_relocation, x86_64_linux: "143c27ed3713827f92cab5f4650a71a4040fd30c5bb4c13fcfa71ee266ebd917" + 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..35eab85906ba4 --- /dev/null +++ b/Formula/s/stylish-haskell.rb @@ -0,0 +1,57 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8617c445f903d5a7e91963f407d839ea01e4ed7e33d48f96696ec2a0dd4a568c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3546de3bd2ec97bd2ce3cef71c838d682991cf156b01b5d9fecb97be186ead46" + sha256 cellar: :any_skip_relocation, arm64_ventura: "caa3a5292125407b6489eb7f121d45b2f10a41759362d552a54edef87c176fb1" + sha256 cellar: :any_skip_relocation, sonoma: "05d8ff7fa92c64e886dd67007d151292701f7558106143dcd821d1469a2ce74a" + sha256 cellar: :any_skip_relocation, ventura: "af74b98d36e9806edf65cc30fb9dacbaa76cbadabb2ecbd5aa75039e9a1d5760" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce716b2eec6706796822c8c638969d9156534747a57f68a90e4d929692774bac" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e9386aab06b8ff3f6fa0d670681e2d7176f6250f5546281f4003265d365b9224" + end + + depends_on "cabal-install" => :build + depends_on "ghc@9.10" => :build + + 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..4a72f1a898cfa --- /dev/null +++ b/Formula/s/stylua.rb @@ -0,0 +1,29 @@ +class Stylua < Formula + desc "Opinionated Lua code formatter" + homepage "https://github.com/JohnnyMorganz/StyLua" + url "https://github.com/JohnnyMorganz/StyLua/archive/refs/tags/v2.1.0.tar.gz" + sha256 "eeca8de825f7cd550a846bb2b0c409f112e8f16fe007863996cc49ca4b9641f9" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5cac08145d9bf7e5041b51bdb178656cc4f15b5c1d555057bf02554a014cae98" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "79bbf43376aa36eb8f798fde745a2e011efde94157ed9b8c957f61a22692e406" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ec0963645a2459ed16b34550edfc97ad830b88ee90b7d5840ad761fa1cbb947e" + sha256 cellar: :any_skip_relocation, sonoma: "1cd2e9825ff467a29740088973d4be7b2221ddeabc58fc6a1ed13cc5048e9ea0" + sha256 cellar: :any_skip_relocation, ventura: "e5e563eb5db649aaa7682149254131d1bc80f52c400ebed3fd29ecdee60b9b7a" + sha256 cellar: :any_skip_relocation, arm64_linux: "9de2f4882cb9315a3cac3184f0909e341666863718eb4951850de5c9fba07329" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed74a1be8b98454ae54fac27dfdbba2437dd8ef89ccb55ce2b88eb54d36dd792" + 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..2e65d9ebbab03 --- /dev/null +++ b/Formula/s/sub2srt.rb @@ -0,0 +1,40 @@ +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" + + 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..f197274701ae3 --- /dev/null +++ b/Formula/s/subfinder.rb @@ -0,0 +1,40 @@ +class Subfinder < Formula + desc "Subdomain discovery tool" + homepage "https://github.com/projectdiscovery/subfinder" + url "https://github.com/projectdiscovery/subfinder/archive/refs/tags/v2.7.1.tar.gz" + sha256 "11ddc1113ba6bfc6db1aeb8bdd97908ceed230e3e4911e9a6905c35f0795b2e2" + license "MIT" + head "https://github.com/projectdiscovery/subfinder.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4012761b996c13be98b253acf2c97d9a0f56e6f090878c236b50d24334de427" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4f1e29abdec31a55472ee3e056a4b1d2234a50006ebf4078f8699ad8ea6ad781" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b35928fb4541fd5e914ca969111b451289e8354c66addfd4d84301736baa1b2f" + sha256 cellar: :any_skip_relocation, sonoma: "2e0b98643729a615d017bf3bbd687dec08f2ff7d0baa890f5595f096fb888ff3" + sha256 cellar: :any_skip_relocation, ventura: "b05b08f4b8b6a8ba8c5739c5140db0140fc7fa582f70678d91aef4b458fd72b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "63927484b1657c52e52e9ac6d035d3461832ce40b0b959e9125c7b599c991ef5" + end + + depends_on "go" => :build + + def install + cd "v2" do + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/subfinder" + end + 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..1d39c9d334744 --- /dev/null +++ b/Formula/s/subliminal.rb @@ -0,0 +1,157 @@ +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/e3/24/36cdb82e90afc602e2ed36c34e022ca545d35f5be9aa7ef9ddb0af7967b2/subliminal-2.2.1.tar.gz" + sha256 "2ed6024a07bbb3c68fe3db76374244ad91adfca9d93fc24d3ddb9ef61825756e" + license "MIT" + head "https://github.com/Diaoul/subliminal.git", branch: "main" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c9e1b2f241f29a65635801c65d6e1cdd47e0cbb278b4ac0accce0b77c2e7728a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c9e1b2f241f29a65635801c65d6e1cdd47e0cbb278b4ac0accce0b77c2e7728a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c9e1b2f241f29a65635801c65d6e1cdd47e0cbb278b4ac0accce0b77c2e7728a" + sha256 cellar: :any_skip_relocation, sonoma: "b0fec59f14211b0908653606b83556d2748004e24ef8d26e6805548e2ba7f890" + sha256 cellar: :any_skip_relocation, ventura: "b0fec59f14211b0908653606b83556d2748004e24ef8d26e6805548e2ba7f890" + sha256 cellar: :any_skip_relocation, arm64_linux: "0557391bbba2b9099f2d96aae520aabe2e2bff3749822efd1809e16d564c7d40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f8043bb5ef6755529fe1ab7f3a387d13f4b39017e6d8f6b3f28783d68f20058b" + end + + depends_on "certifi" + depends_on "python@3.13" + + 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/b3/ca/824b1195773ce6166d388573fc106ce56d4a805bd7427b624e063596ec58/beautifulsoup4-4.12.3.tar.gz" + sha256 "74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051" + 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/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "click-option-group" do + url "https://files.pythonhosted.org/packages/e7/b8/91054601a2e05fd9060cb1baf56be5b24145817b059e078669e1099529c7/click-option-group-0.5.6.tar.gz" + sha256 "97d06703873518cc5038509443742b25069a3c7562d1ea72ff08bfadde1ce777" + end + + resource "decorator" do + url "https://files.pythonhosted.org/packages/66/0c/8d907af351aa16b42caae42f9d6aa37b900c67308052d10fdce809f8d952/decorator-5.1.1.tar.gz" + sha256 "637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330" + 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 "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 "pbr" do + url "https://files.pythonhosted.org/packages/b2/35/80cf8f6a4f34017a7fe28242dc45161a1baa55c41563c354d8147e8358b2/pbr-6.1.0.tar.gz" + sha256 "788183e382e3d1d7707db08978239965e8b9e4e5ed42669bf4758186734d5f24" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + end + + resource "pysubs2" do + url "https://files.pythonhosted.org/packages/27/f0/c496409796d038e65161b8cddc6925d4c2c53489fb6f690eb28027ecc58a/pysubs2-1.7.3.tar.gz" + sha256 "b0130f373390736754531be4e68a0fa521e825fa15cc8ff506e4f8ca2c17459a" + 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 "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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "soupsieve" do + url "https://files.pythonhosted.org/packages/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + 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/c4/59/f8aefa21020054f553bf7e3b405caec7f8d1f432d9cb47e34aaa244d8d03/stevedore-5.3.0.tar.gz" + sha256 "9a64265f4060312828151c204efbe9b7a9852a0d9228756344dbc7e4023e375a" + end + + resource "tomli" do + url "https://files.pythonhosted.org/packages/35/b9/de2a5c0144d7d75a57ff355c0c24054f965b2dc3036456ae03a51ea6264b/tomli-2.0.2.tar.gz" + sha256 "d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"subliminal", shells: [:fish, :zsh], 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..41ff026d45fb2 --- /dev/null +++ b/Formula/s/subnetcalc.rb @@ -0,0 +1,52 @@ +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.4.tar.gz" + sha256 "0730855c8b619e4a6237882e0bd12c2220285a12b7b869e1193b0f92e189a262" + license "GPL-3.0-or-later" + head "https://github.com/dreibh/subnetcalc.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fabdbeae955ea728d9eae0de44710cbee5e16cf43ba6cae647d4dad0b0450f08" + sha256 cellar: :any, arm64_sonoma: "1790982a2d3245a83958803257775f56fb37b0f3b11110a861c851221570ee8c" + sha256 cellar: :any, arm64_ventura: "5dcaf2b58612c6fe992e7d601330d019df0d96db3a30763c6d81e7d33079158c" + sha256 cellar: :any, sonoma: "832a61d27689832f65aee4517107e046a182aff53037dba7c2e205dfb4031d37" + sha256 cellar: :any, ventura: "52413178955b01a026648bac5e4af714666911cdab595f669b380392255369e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b7cc635edd10a32dcc9922495890a2381735eb4662e04e8437b31dd9bf9b8ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7790fc9a8581bd12c61062ad16595fded5b17506bc4faf1777a033b50391f806" + 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..2ea0c63264c61 --- /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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + bottle do + sha256 arm64_sequoia: "dfd28a5fbb1065e271418d833393b6506c38517b8e1035271291cf32c0fbb09d" + sha256 arm64_sonoma: "868351aba4efe60c49f906c85d312d845796566347983b65dd99c8181f84a77f" + sha256 arm64_ventura: "21091b526648e54c2925f039e602bde901534dec8bdba8492b7d7ba249b7d664" + sha256 sonoma: "ab78f975d20697547a90ece32b942d1cc6f293409e03f9697125475fcd8f3369" + sha256 ventura: "1769f8d068953dc7565a6258e35c1a8d04473dcb76a3d47e3ad5c9016cf13968" + sha256 arm64_linux: "b72fd0fe9d755c3af711869c33ed08674c0d8c93716156cbd68c345107aab22f" + sha256 x86_64_linux: "ae18ae190c2e2331dfad6c352068449cf677587692a9580ba3b9f7afa6469545" + 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.13" => [: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.13" + 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..5238d6e536f1a --- /dev/null +++ b/Formula/s/sugarjar.rb @@ -0,0 +1,45 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dd160e6f1f1274ca6ccd308d7a7b3561797957d2fdddaa97ed06d02b275b195d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dd160e6f1f1274ca6ccd308d7a7b3561797957d2fdddaa97ed06d02b275b195d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dd160e6f1f1274ca6ccd308d7a7b3561797957d2fdddaa97ed06d02b275b195d" + sha256 cellar: :any_skip_relocation, sonoma: "1692b320ec4f62d0e176ac95bd437d706cb8e84720c5aa90a190cb36644e517f" + sha256 cellar: :any_skip_relocation, ventura: "1692b320ec4f62d0e176ac95bd437d706cb8e84720c5aa90a190cb36644e517f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b9738a3c6fb7a4096ecd215c6557f9bcf2ce2c8216f51066d6ba1a5e4e8a15c1" + end + + depends_on "gh" + depends_on "ruby" + + uses_from_macos "libffi" + + 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/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..edca492ced06d --- /dev/null +++ b/Formula/s/sui.rb @@ -0,0 +1,47 @@ +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.48.1.tar.gz" + sha256 "d2b67fddea8205389efb8bbeae22b0aab982d372d9b3e912501bcc19b509919a" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^testnet[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e5caf392a0d700c55a36dc8534dbc5b9c14e6fadb433b240963dfff4d7e5d562" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "619a9010bde5eaa02c19e2f4f529881d50e9a70fe0d25b01bea2c656594ee25d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ad37b1d600245c42953343bb7a20e9fba6d42682f409184dda90e206582f9580" + sha256 cellar: :any_skip_relocation, sonoma: "68d7e2d195663ee65f048406a2f178940ff2e354f9d5a411d3dfcb5b6ae5bf71" + sha256 cellar: :any_skip_relocation, ventura: "fd2652aab665b40e46250a92e49dad9eb5844dd8fce098ddfeb7962d6c46ee5e" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab2d45fad24a581014274dfde1ee2a98b377f7c1cbf666df602c5eefeba4edd6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18cf24c9bcb085cce2f015f16c61615fadebabf56c29efddb1880714e760884b" + 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..9c4c3fe47a295 --- /dev/null +++ b/Formula/s/suil.rb @@ -0,0 +1,54 @@ +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: "master" + + livecheck do + url "https://download.drobilla.net/" + regex(/href=.*?suil[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "b27db9a3ce79f632d05b548af8aa895cc763f16b501a9c9bdc8034e4859dea86" + sha256 arm64_sonoma: "529c47a29c76d87980ea9834dd2a01e2590d0adb8dc9a2a47fb82eb5a705d984" + sha256 arm64_ventura: "bd054ff192b6136795fc419d57c5424d32e10ff8549d63429999e6fc6e85ecb4" + sha256 sonoma: "f22ed2c24dfd9fdd0e046c4373717a5bcd9b5934d816357814b461cc3eba1e72" + sha256 ventura: "28cba60e06927ded4633dedf3b1c9541e5ff8fe692df7e9d6ad0d52055f2abd4" + sha256 x86_64_linux: "c82fc9ca3e304f4ddab55a00cddc288ba608f5114103e22a1afb7e85d413d87c" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "libx11" + depends_on "lv2" + depends_on "qt@5" + + on_linux do + depends_on "glib" + depends_on "gtk+3" + 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..f660cd488c98b --- /dev/null +++ b/Formula/s/suite-sparse.rb @@ -0,0 +1,66 @@ +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.10.3.tar.gz" + sha256 "09e7bcc8e5de0a5b55d2ae9fd6378d5f4dc1b85a933593339a0872b24e2cc102" + 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_sequoia: "17e3905105eccbe9cc090941b651eda66ee6a72f6eba341b730e69cf96337de1" + sha256 arm64_sonoma: "66689c5de3bf52ab8a7c01bc1018e775748325c29c889d71f3582a8194dfcc63" + sha256 arm64_ventura: "b754dbf20365a1baf955844246308101f312ae5e8ad08cd90b4a146b0a17dc71" + sha256 sonoma: "4facf2d177821397d2b04f54cec3d4a0d14ce20963ae3b23cc82c342d511685e" + sha256 ventura: "c335cdbd49c6fceeb0d2438c7ff1637d94d06b63647d9222b35598257cf92d8e" + sha256 cellar: :any_skip_relocation, arm64_linux: "0a8dc094c74c995bf7cc887b6cc270c123be9fd501b6657779c8a975b9a138df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b484a7475a7c907b153f18a88c187aba0a946f4088ba635c18d207b93fc75fcc" + end + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + depends_on "gmp" + depends_on "metis" + depends_on "mpfr" + + uses_from_macos "m4" + + 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..d85a7a11f24b9 --- /dev/null +++ b/Formula/s/sundials.rb @@ -0,0 +1,73 @@ +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.3.0/sundials-7.3.0.tar.gz" + sha256 "fd970a9023f8ea37b81c5065c067bf1726f656b39f5907b48169a6f98d306ba7" + 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_sequoia: "4ecec4e8bf4e1b6e572703cf17f0bfcb9285455dee39c16e35faa27f99f0fdaf" + sha256 cellar: :any, arm64_sonoma: "82594d8cbaef0cbe0900eec063fdba9efc1e4cf03d60e2bac49ae88f098ecd40" + sha256 cellar: :any, arm64_ventura: "3b657e3cddd3e81ecdf080e08803e88b9f9d8c1266e168f3434f85e85c991910" + sha256 cellar: :any, sonoma: "86a6f5675566ea55e2e41371e2d1b6273629bfb0bf9cf2d973a596e4f7965f63" + sha256 cellar: :any, ventura: "ad6239a7fc87965e8c83e5c7215c8c952995cd45259d3b88d5dbbe53c5b2f32b" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7075989ebd108d0bc53b137af6239174fbd6ccb8aa7e1af0b009be26e3c6aef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bd6c4d6a5f8ff05623f58a8739b5aebb6db1aa2e723df0fb0c420174205cec87" + end + + depends_on "cmake" => :build + depends_on "gcc" # for gfortran + depends_on "open-mpi" + depends_on "openblas" + depends_on "suite-sparse" + + uses_from_macos "libpcap" + + def install + blas = "-L#{Formula["openblas"].opt_lib} -lopenblas" + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DKLU_ENABLE=ON + -DKLU_LIBRARY_DIR=#{Formula["suite-sparse"].opt_lib} + -DKLU_INCLUDE_DIR=#{Formula["suite-sparse"].opt_include}/suitesparse + -DLAPACK_ENABLE=ON + -DLAPACK_LIBRARIES=#{blas};#{blas} + -DMPI_ENABLE=ON + ] + + 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/superfile.rb b/Formula/s/superfile.rb new file mode 100644 index 0000000000000..e9a82d5d547ca --- /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.2.1.tar.gz" + sha256 "371235eda1b4bf31e5ed23b4dd2e60de40cb09a86a061ba44dea9eff9d13c608" + 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_sequoia: "0dd6f0410cbc113a1f22829e443114edd372b274f5f616a984dcb2fb83c05dd1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "39cab3c002f3b63407911c092dd7b2457462637dbab763b1e69a976469f43f16" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a84abedc3781dac1eb357d040eb55b8971c8e603bafff50d32bc9bb14caa3e30" + sha256 cellar: :any_skip_relocation, sonoma: "fd2eafafbdbb70a43e3aacc4f330e2c42d78aa6b3e6ae1a47efcb951fa1be016" + sha256 cellar: :any_skip_relocation, ventura: "e5e8f019844c46f35952bd5d9a282f2f19b7ee25a923e64e5fc501b2c10984a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b4b7c00ec4f53bc75ec0f14fa2c7182edac3a1388aaa0ee6edf2abfd6126eec" + 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..b5f9d52754df7 --- /dev/null +++ b/Formula/s/superhtml.rb @@ -0,0 +1,77 @@ +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.5.3.tar.gz" + sha256 "e1e514995b7a834880fe777f0ede4bd158a2b4a9e41f3a6fd8ede852f327fe8f" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fee37c33e1945e1b65754df3584ac9f9460e612c1465cb7a8c99a7fd4320545d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "03ab9a454ac7aaca7371a477f80d49f0fe0f7029747e4041332b13a3d00cf534" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0d23e940a93d67b167a7f581c1558eb2c8576c94c3d9e0acfa0772fde7f36a01" + sha256 cellar: :any_skip_relocation, sonoma: "2eff6f7d3a54c0286b29a347c69d4aedf8d685eb28e48eb8dbf1c4aa82db437b" + sha256 cellar: :any_skip_relocation, ventura: "59b688fbedae2f2e86cad38aff7ced5f84757c8986151abb42c7bbfd86fe78b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "56e298e19fd4b396615ccfd7939ab11dba25d2668533b4e9a3324f0207b027ec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ffcd873d33cbb738fda0172a485473d7d2f5bf7c0b642b7c7ae93e840daa98f" + end + + depends_on "zig" => :build + + # Backport dependency updates to cleanly apply Zig 0.14 commits + patch do + url "https://github.com/kristoff-it/superhtml/commit/0c65d59dad108eaa7869e70b67a1783d4c7f5ba4.patch?full_index=1" + sha256 "9312c6bae69ebbef9b2430fb36a3623d907ed3ea59649c93b592e1f6969e0e35" + end + patch do + url "https://github.com/kristoff-it/superhtml/commit/1d4fbe06aa056a5858d3fdcf33e5ec001f44f6ea.patch?full_index=1" + sha256 "78531ca8fc22e1f9936e6f0017073c4f143591d70fefffcdb335cbcb346ff5b9" + end + patch do + url "https://github.com/kristoff-it/superhtml/commit/9266b3131bbcc0705b3b752bcb7478871a143740.patch?full_index=1" + sha256 "efec7fa00e2094fdd69e6ec7d49ec6e26a355ad45f9f8079f16aae1a9eb84ca3" + end + + # Backport commits to build with Zig 0.14 + patch do + url "https://github.com/kristoff-it/superhtml/commit/44abb10a4b28b8b66710e8d4a56aa897b52c11a5.patch?full_index=1" + sha256 "8e98cd7d14a281e9269517d710e02cd2a0c074c56b7d64469148b49b686f1a92" + end + patch do + url "https://github.com/kristoff-it/superhtml/commit/848947947a3312dfe9b88a1976f8a6bc4804d316.patch?full_index=1" + sha256 "1ec6acde9d78d58ca36d61a5fb5ff8490f2ed56db8008755860aaab128e182ac" + end + + 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 = %W[ + -Dforce-version=#{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..e0c9e40ff0447 --- /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_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 "gcc" + 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..b66504d258d44 --- /dev/null +++ b/Formula/s/supermodel.rb @@ -0,0 +1,92 @@ +class Supermodel < Formula + desc "Sega Model 3 arcade emulator" + homepage "https://www.supermodel3.com/" + license "GPL-3.0-or-later" + revision 1 + + stable do + url "https://www.supermodel3.com/Files/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 + + bottle do + rebuild 1 + 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? + # 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 + s.gsub!(/^COMPILER_FLAGS = /, "\\0 -Wno-implicit-function-declaration ") + 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..b85210064c189 --- /dev/null +++ b/Formula/s/supertux.rb @@ -0,0 +1,70 @@ +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.6.3/SuperTux-v0.6.3-Source.tar.gz" + sha256 "f7940e6009c40226eb34ebab8ffb0e3a894892d891a07b35d0e5762dd41c79f6" + license "GPL-3.0-or-later" + revision 11 + head "https://github.com/SuperTux/supertux.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "3f63bbb4a3eca63586e1bcb23482fdcdd91936e6b6bd181ca5b6d3f4b57c463e" + sha256 cellar: :any, arm64_sonoma: "f44ec03e212e95daaa1cc85363c084e5dc545ac9be24812aa64f6d3a43046791" + sha256 cellar: :any, arm64_ventura: "06b04d4dd7d3d6b93267084773b6eef6bddf762a7ff8b6c648ed8d356341f959" + sha256 cellar: :any, sonoma: "557c18f4f4c2dd4d3b1c987059690602188eda7e1418b7b8c01ccae52386d6d6" + sha256 cellar: :any, ventura: "e73a70f1403a6bd2f577c98e400ede1038132bc060b2dbdb748bee766db53967" + sha256 cellar: :any_skip_relocation, arm64_linux: "6f8daa7588e6d322264e298f32571ef9bce8fe2eb3c967440956cbed60c14668" + sha256 cellar: :any_skip_relocation, x86_64_linux: "22bdb84ff6294cb2c5bf52ca70ee7b98b5c463b33be62b8e5ef373f859df5729" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "boost" + 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 + 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}", + ] + + 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 diff --git a/Formula/s/supervisor.rb b/Formula/s/supervisor.rb new file mode 100644 index 0000000000000..8d6a05c859968 --- /dev/null +++ b/Formula/s/supervisor.rb @@ -0,0 +1,85 @@ +class Supervisor < Formula + include Language::Python::Virtualenv + + desc "Process Control System" + homepage "http://supervisord.org/" + url "https://files.pythonhosted.org/packages/ce/37/517989b05849dd6eaa76c148f24517544704895830a50289cbbf53c7efb9/supervisor-4.2.5.tar.gz" + sha256 "34761bae1a23c58192281a5115fb07fbf22c9b0133c08166beffc70fed3ebc12" + license "BSD-3-Clause-Modification" + revision 1 + head "https://github.com/Supervisor/supervisor.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "45cc3b60f2777d22cdac9c5c3d02c6d81ab4ad54e469e404889e685cb3ee6782" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "45cc3b60f2777d22cdac9c5c3d02c6d81ab4ad54e469e404889e685cb3ee6782" + sha256 cellar: :any_skip_relocation, arm64_ventura: "45cc3b60f2777d22cdac9c5c3d02c6d81ab4ad54e469e404889e685cb3ee6782" + sha256 cellar: :any_skip_relocation, sonoma: "dd5d653ec9ae1a0db2ddca2a58d549ea9c48d4c15be4a11eb71b3aa9e555e872" + sha256 cellar: :any_skip_relocation, ventura: "dd5d653ec9ae1a0db2ddca2a58d549ea9c48d4c15be4a11eb71b3aa9e555e872" + sha256 cellar: :any_skip_relocation, arm64_linux: "d75da1e237c2fd2c1bf889e8556e482b4f79f4cfa724a42f86467e2278805300" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f432821d07fd084494beb62d4f237950f1c9b640dabb6cb85a0d2fd8f6e0598" + end + + depends_on "python@3.13" + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + 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.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 = 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/s/surelog.rb b/Formula/s/surelog.rb new file mode 100644 index 0000000000000..3c821278d3689 --- /dev/null +++ b/Formula/s/surelog.rb @@ -0,0 +1,114 @@ +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.84.tar.gz" + sha256 "ddcbc0d943ee52f2487b7a064c57a8239d525efd9a45b1f3e3e4a96a56cb3377" + license "Apache-2.0" + revision 1 + head "https://github.com/chipsalliance/Surelog.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9ee2c25ec18fd1d9dd4f7793b6ba916671a576d1e79ea3f59b0c0ecd6f405def" + sha256 cellar: :any, arm64_sonoma: "8ec82893f6dae9ba5959bc4c7d7910afe640343ebd7ec40f66eae243c30815c2" + sha256 cellar: :any, arm64_ventura: "3e75f97f1b262e924733ef2a7a26a416e90f3b0cedb67341e0a0eadfcbdbd992" + sha256 cellar: :any, sonoma: "e7bec2531c7d241da26665a6baa89d6e7731a4e64066def102328cdd6ff6a75a" + sha256 cellar: :any, ventura: "284118733c63ad3344c973917b2b52ee91468f3d442851729995e27c5622736c" + sha256 cellar: :any_skip_relocation, arm64_linux: "d3e2bb045f895d6572ff5a3b23d28c304d4501587510cbb373b3200abd909a5a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "72570d5f28cac62d5bb5c5e72674a1e95b25cbb43b47fe57bbeb16d353cfe95b" + end + + depends_on "antlr" => :build + depends_on "cmake" => :build + depends_on "nlohmann-json" => :build + depends_on "openjdk" => :build + depends_on "python@3.13" => :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.13")}", + "-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..ea38ff3fe6d23 --- /dev/null +++ b/Formula/s/surfer.rb @@ -0,0 +1,65 @@ +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_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..3351b17a13279 --- /dev/null +++ b/Formula/s/surfraw.rb @@ -0,0 +1,45 @@ +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 + + bottle do + rebuild 1 + 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..84a6218a36964 --- /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-7.0.10.tar.gz" + sha256 "197f925ea701bdcb4a15aca024b06546b002674cd958b58958f29a5bb214d759" + license "GPL-2.0-only" + + livecheck do + url "https://suricata.io/download/" + regex(/href=.*?suricata[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "5e50075c07a38113f0905b09949d8edaf7b69f43348a9f90bbf906628b176ca7" + sha256 arm64_sonoma: "d38da4f84e736c682dcc662bf774a9552680f51a4d0a8b2f28c185a9634d1a10" + sha256 arm64_ventura: "36156e9cff89c5efd7a27fa77527cb5e5a5ab61e85efa951cf8b5c6d1745a5d6" + sha256 sonoma: "efd4d6e8ecf31f3f712b42803954c96c1cf04cd2b24ed383982d99bffda93b9c" + sha256 ventura: "a14897dd0012afe2d61cee29e8cc672b93955151a727e8110fe21a90700c5d2f" + sha256 arm64_linux: "6d14fa596b9c558e0b1234f3d17bbd4412d1390d7259f9802a50ff58a83e0719" + sha256 x86_64_linux: "1bd7152a8f5ca94dbbc625a9417dd3c56c2370a13843e3050d58b561d705016b" + 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.13" + + uses_from_macos "libpcap" + uses_from_macos "zlib" + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + def python3 + "python3.13" + 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..cf34a738fd4d3 --- /dev/null +++ b/Formula/s/sv2v.rb @@ -0,0 +1,44 @@ +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_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..ad7836f284998 --- /dev/null +++ b/Formula/s/svg2pdf.rb @@ -0,0 +1,61 @@ +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 + + bottle do + 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, 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..e98da39be9d60 --- /dev/null +++ b/Formula/s/svg2png.rb @@ -0,0 +1,58 @@ +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 + + bottle do + 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, 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..7c3d5b7174522 --- /dev/null +++ b/Formula/s/svgbob.rb @@ -0,0 +1,42 @@ +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_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..240f886c5b48e --- /dev/null +++ b/Formula/s/svgo.rb @@ -0,0 +1,25 @@ +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/v3.3.2.tar.gz" + sha256 "bf79f18acd85764bd12ed7335f2d8fdc7d11760e7c4ed8bd0dc39f1272825671" + license "MIT" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "2833c2c786650c7a04428c9abfefea67dafb328090d109142ae2a659543be4cb" + 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..3760510d138df --- /dev/null +++ b/Formula/s/svls.rb @@ -0,0 +1,31 @@ +class Svls < Formula + desc "SystemVerilog language server" + homepage "https://github.com/dalance/svls" + url "https://github.com/dalance/svls/archive/refs/tags/v0.2.12.tar.gz" + sha256 "ef6fde93d2434835e33fc75dd5234e993e75bdd446570f2da6d6524d61f19777" + license "MIT" + head "https://github.com/dalance/svls.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f895be059680ba26c92d2ead708631180806928f737394b0c966b37f53b4cdac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9486530d01573d02d3a0c730556a555dfd58168cbeb922d6d5d26c7248e04f9c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1eb55479ec5c77a6628b8fda650f1c08e855cfc05b5003e33d69a5f2adc8ae44" + sha256 cellar: :any_skip_relocation, arm64_monterey: "efb890636d4b031626e3ece652ab77e67b9adbd2c5220da0eef8309d252e504a" + sha256 cellar: :any_skip_relocation, sonoma: "b9d8f8ca0dc2994b77cd0de932de40bf08dabd92d24d6a41b434324c3062b6c1" + sha256 cellar: :any_skip_relocation, ventura: "cb38783001b57658f16661f741fb920877e8918840ab839b50d89e3445028ca2" + sha256 cellar: :any_skip_relocation, monterey: "1e5033c5b0abd2964ab4aab08a6203a9011fb3b66d45961ac2a05c337718bb5f" + sha256 cellar: :any_skip_relocation, arm64_linux: "1f2b504bccc3357cc1e234eb114c5941dd6c7c63850087d041726c534f7129b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "dbc706c7513b400b717bed634717f4fafd47a2d94bafde4574c59dabce57c10a" + 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..4a0da2a960414 --- /dev/null +++ b/Formula/s/svt-av1.rb @@ -0,0 +1,72 @@ +class SvtAv1 < Formula + desc "AV1 encoder" + homepage "https://gitlab.com/AOMediaCodec/SVT-AV1" + url "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v3.0.2/SVT-AV1-v3.0.2.tar.bz2" + sha256 "7548a380cd58a46998ab4f1a02901ef72c37a7c6317c930cde5df2e6349e437b" + license "BSD-3-Clause" + head "https://gitlab.com/AOMediaCodec/SVT-AV1.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e93837b76e46e9cfff5d2826fdeb6312842353b899d3e851c81d943e3cb87b57" + sha256 cellar: :any, arm64_sonoma: "21b309a7920d93b2f017114dfb76c770406bd5238e8fdd74b68717f50f4b9b59" + sha256 cellar: :any, arm64_ventura: "3c65e6a356f2f09e9c8c7f1e9ca6ed44668646c70e4385a7319c2f4a0a58b181" + sha256 cellar: :any, sonoma: "075d6d284e3c9ec2c83b0295e8a7de3a98f5e80cd20a8829ab5a8c05e72acd3b" + sha256 cellar: :any, ventura: "4e251d72c313bde400f5a8cacda21b165c28177ea7c3a16f0a56fbfb115f677b" + sha256 cellar: :any_skip_relocation, arm64_linux: "8cdfe2836145ff6d33e546172d80acb58ae823f12bd43dd11163f285c885d7b5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e47620efee4766014dbfe212857f627f5b04c0cd30c99f57e53c145dd553820" + end + + depends_on "cmake" => :build + depends_on "nasm" => :build + + # Match the version of cpuinfo specified in https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/cmake/cpuinfo.cmake + resource "cpuinfo" do + url "https://github.com/1480c1/cpuinfo/archive/e649baaa95efeb61517c06cc783287d4942ffe0e.tar.gz" + sha256 "f89abf172b93d75a79a5456fa778a401ab2fc4ef84d538f5c4df7c6938591c6f" + end + + 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 + + (buildpath/"cpuinfo").install resource("cpuinfo") + + cd "cpuinfo" do + args = %W[ + -DCPUINFO_BUILD_TOOLS=OFF + -DCPUINFO_BUILD_UNIT_TESTS=OFF + -DCPUINFO_BUILD_MOCK_TESTS=OFF + -DCPUINFO_BUILD_BENCHMARKS=OFF + -DCMAKE_INSTALL_PREFIX=#{buildpath}/cpuinfo-install + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + ] + std_cmake_args.reject { |arg| arg.start_with? "-DCMAKE_INSTALL_PREFIX=" } + + system "cmake", "-S", ".", "-B", "cpuinfo-build", *args + system "cmake", "--build", "cpuinfo-build" + system "cmake", "--install", "cpuinfo-build" + end + + args = %W[ + -DCMAKE_INSTALL_RPATH=#{rpath} + -DUSE_CPUINFO=SYSTEM + -Dcpuinfo_DIR=#{buildpath/"cpuinfo-install/share/cpuinfo"} + ] + + system "cmake", "-S", ".", "-B", "build", *args, *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..ef906a395fc2a --- /dev/null +++ b/Formula/s/svtplay-dl.rb @@ -0,0 +1,71 @@ +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/71/9b/ce51dda73da3ee3f0c1897d5df46bbd0bcd9377d9002c02631306d92f363/svtplay_dl-4.109.tar.gz" + sha256 "8b6ed75c58be420616a9616d6cdbfd7039a448be55905fe1331ca13bea23176e" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bbb80b6b9e0df5b530608f77a4cc74253f688af74f63991191f1a377b64fd904" + sha256 cellar: :any, arm64_sonoma: "4d0090fb6a8bb1d898729d7a0a0882a5c228bd53b8f2d0be350c4ba140d94474" + sha256 cellar: :any, arm64_ventura: "d0bcb676130406bf89004d3e90f3f271d9dbc799b1d49a386cb976725deed6e2" + sha256 cellar: :any, sonoma: "bee93180ee5152a8ddbe82f88dfab50ba019dcf96529a5befef44dfb8edc5e63" + sha256 cellar: :any, ventura: "3af66a892a5eefb1028992ed82888567339c3d7442146d285689e10a2c81a099" + sha256 cellar: :any_skip_relocation, arm64_linux: "d62635752da56e37c174e647770fe9d1feddd2d3555ff83ef0cff6e9f7253e1d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9164e1686f4d3f0f6ebc7012ea01dd123bee0907af9671f028cc4c0dd4acbdfb" + end + + depends_on "certifi" + depends_on "cryptography" + depends_on "libyaml" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/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 "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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/swagger-codegen.rb b/Formula/s/swagger-codegen.rb new file mode 100644 index 0000000000000..9615668a56e1b --- /dev/null +++ b/Formula/s/swagger-codegen.rb @@ -0,0 +1,49 @@ +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.68.tar.gz" + sha256 "05edb52130fe8c7d619338b23693aa284138fac2e73867ce5ab718e21b34ea45" + license "Apache-2.0" + head "https://github.com/swagger-api/swagger-codegen.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "067dc9c02195e7137aa7b73981469c4eb620f5007cf4038dad747a3365597e9b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7f6c0cece86d7e6b21d0992eb386c2cfdf60f87e02f94d927ebecb447a59a3a9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "59b7ec0c1577ebfebe2592c68e3cc171e5fd22ece000dff9ef13361a6497a30c" + sha256 cellar: :any_skip_relocation, sonoma: "4b067becfaa888349fa23ebe558c5da2069a5f0a55f2700c28f7705b2c8a722f" + sha256 cellar: :any_skip_relocation, ventura: "3f6c17cc526619ad01b8aee9e62c450c78976a7209da69a52a02fab00bd51b84" + sha256 cellar: :any_skip_relocation, arm64_linux: "e01b9efe675d920ba0cc1adbc59aa0356efbd26cb1f6fde3c12ae3d5147fa0bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73da380fb2738d1209a443ba96b4d81d5a2c90f7a93940907c2e06d91b11e907" + 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..524b13db8df90 --- /dev/null +++ b/Formula/s/swagger-codegen@2.rb @@ -0,0 +1,57 @@ +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.44.tar.gz" + sha256 "2a3856e1f22dd01198e2ff50f7f85f61c2ffdd754923ff7b4eb2636ac34e5c57" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(2(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9957ad6a72c5b0d33cca934d61fa39df3140deaa1901e1a578068356cb2f8c80" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "110e581cb812f4ecc7c493c3fa82d0fd27b6a30945f4af1330245943a9e400e9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7c868d84b9873fb1e66c3033d4c898bfee02e9b9e6f03312a68ebe50eff510fd" + sha256 cellar: :any_skip_relocation, sonoma: "58eae21ef53d08a199c16bcb221decd751987360141bc0a6b28213e1c86e6f1a" + sha256 cellar: :any_skip_relocation, ventura: "06d0d89da4abbdea0267da07c2922731d116de55c00466ae178c5570a38d4475" + sha256 cellar: :any_skip_relocation, arm64_linux: "b0f8a738d4322a863da3b8fb8f6939e04e7ddc66afb44943633676b96139637e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "88015a18565d8eca250566fd82768c20d7e0e4bcd4a27339ddb34cc313d848dd" + 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..83034d969d72e --- /dev/null +++ b/Formula/s/swaks.rb @@ -0,0 +1,25 @@ +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 + + 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..a88edfb117c6d --- /dev/null +++ b/Formula/s/swc.rb @@ -0,0 +1,44 @@ +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.11.24.tar.gz" + sha256 "115386a63aa890df8ecee6dc3daaeced5baabc0b1e7620b591836ed7586b9cf0" + 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_sequoia: "8c9d865dc01a5e39977ba398eb872ee5d13745f9c1f880cc72bd88840242c493" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8b7e4bd74754cbdee2361cffcd506b320dc7320ee54f8022563816177e28b5df" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7d19c4c3437a45752f9faa279e8abb533f4455e57da47239b3408ed0e71d0f28" + sha256 cellar: :any_skip_relocation, sonoma: "8d49f0175024e7ce7a6e080a99259e1ec28315bd8887bb276c2dc726dabce56d" + sha256 cellar: :any_skip_relocation, ventura: "1a545816ed53c64cf03a0a69d045714db9acf9b275d4be01b4da76b60065e7b9" + sha256 cellar: :any_skip_relocation, arm64_linux: "ed36f1ecc1d548e48229f0fb7bb45f2a35c837fe0d3cb3268ed3c05e6341abf4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4e300f564a9d808e054c0070abfec5da9ecc2034412bcc201b7b94bd060fb7b2" + 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..470ecba3db8f1 --- /dev/null +++ b/Formula/s/swctl.rb @@ -0,0 +1,43 @@ +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_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, 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..4644b677272d6 --- /dev/null +++ b/Formula/s/swfmill.rb @@ -0,0 +1,42 @@ +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_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, mojave: "4eb93babe47a07ccb946b87a7e5515eef651b376c590231920a5acdcc6023aea" + sha256 cellar: :any, high_sierra: "2516e0ca300458f626e1311673643e1cad03131fb77717fb4f6d10e5f7c6e522" + sha256 cellar: :any, sierra: "f8f7530eb3697993d145bd67fcb44122319f3dadbd5a15535ae23ce33c1991fc" + sha256 cellar: :any, el_capitan: "10165ef551225423c4d0b98b734aa112854bb836b6dcca675a0d2dd2adcee75a" + 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..a0b80ae9d78a3 --- /dev/null +++ b/Formula/s/swftools.rb @@ -0,0 +1,89 @@ +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" + license "GPL-2.0-or-later" + revision 1 + + livecheck do + url "http://www.swftools.org/download.html" + regex(/href=.*?swftools[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + 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 mojave: "bf18bfc66b1f6d6ed247acd0a4208a09b4acf6a4668e8f7eba2e40ad33ffe9f6" + sha256 high_sierra: "d0e441ed7eef07c3536965d5269f648744ceb62d41fbcfe9a12248b8154c4f62" + 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..6ae9673bb2aac --- /dev/null +++ b/Formula/s/swi-prolog.rb @@ -0,0 +1,71 @@ +class SwiProlog < Formula + desc "ISO/Edinburgh-style Prolog interpreter" + homepage "https://www.swi-prolog.org/" + url "https://www.swi-prolog.org/download/stable/src/swipl-9.2.9.tar.gz" + sha256 "53f428e2d9bbdf30e53b06c9c42def9a13ff82fc36a111d410fc8b0bc889ee2d" + license "BSD-2-Clause" + head "https://github.com/SWI-Prolog/swipl-devel.git", branch: "master" + + 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..96796d354aa66 --- /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: "601.0.0", + revision: "ffbb3225ffda37b62c7283c70e87e8bc7e8e202a" + 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_sequoia: "dd4509cdd27b42bab34ffa4dd8af88c5f851e4996c71f511aa69e21595308f51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c67cc2e1b479b85ea8cd42c79c3251fe0f06bfeefc8fda2e1df72ed745dc243" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cad872e59a50e0461915c4412c23949ab4104e566ef387149dd246b377816881" + sha256 cellar: :any_skip_relocation, sonoma: "6e46febcf28e10a46cb5dce2ebcbec18230f661221493d1bdfb9dc74e4e91987" + sha256 cellar: :any_skip_relocation, ventura: "9a080668eb1f1d87354c99cdfb31a65c76b3f51a797484a81ccee7a9a1386ff5" + sha256 cellar: :any_skip_relocation, arm64_linux: "09f0c3b6f509becd131c30ea8446a9fdb4332d08a1ecd6b370dd6e2b492decec" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6370e3eca7bfcc407ebdc14481cb809206c71abc40caeab02d11533f1c228254" + 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" + 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..49ec1bdc49008 --- /dev/null +++ b/Formula/s/swift-outdated.rb @@ -0,0 +1,38 @@ +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.9.0.tar.gz" + sha256 "b6ee31edc45711c6425d047fe1b4f177da2498201dab5d94dbe86d8bd483419c" + license "MIT" + revision 1 + head "https://github.com/kiliankoe/swift-outdated.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "56a726e5f73cfc65075dfb810e92cd9b75721bacc4a5c4ac824b7725345baf56" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cba510240616bdc16f3c756002a8bbb5368753b2a58d1edfb86b95876d5ac0e3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "02ed4a34e55f8078b31d691593855fae0e42b8e3605050c6ff0e3ee2ffd21f73" + sha256 cellar: :any_skip_relocation, sonoma: "632eac750a169e76150a4f5c304cb2a0fbb71ffd29780fcfa9eb397766af775f" + sha256 cellar: :any_skip_relocation, ventura: "c7831671b39aee111e79ac7c31f40f68c58c5d02286ff4d52e9ab5112a4d2f02" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd55e79daf1746c15dd34741f33021135c77138d0a72cb58ce10338ee1a10d43" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c59bab3634d884340765c698e24977dbe5edc9f405dbcbcb97c017014ba05db0" + end + + depends_on xcode: ["13.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" + bin.install ".build/release/swift-outdated" + 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..0552adc64b50b --- /dev/null +++ b/Formula/s/swift-protobuf.rb @@ -0,0 +1,50 @@ +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/refs/tags/1.29.0.tar.gz" + sha256 "0a37b1f0aab5aca1e47d0729b878004a4e3c1d5a79ad9aedc51b62d19d36f67d" + license "Apache-2.0" + head "https://github.com/apple/swift-protobuf.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d11f47bfbbbdf427ae5af21ccc1165e77d2cfc851db714b01ab2dbac764c1520" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d013a8dca6f3acace6deb1a55bc9e170429cdbb6bc1765e7bd8abe6051d14498" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2600bb6e8d77d8ad51b7d00bbb05c2648f1cde0a67076ec1735fbbf6b13b90dc" + sha256 cellar: :any_skip_relocation, sonoma: "876fb05e81951bc16d828cd4b6fc6eec24132ca96900b35f4310f617180a4275" + sha256 cellar: :any_skip_relocation, ventura: "2a684814cc304f25e1ea59d3079dd6835b6701d84946919db538f76caf1d87c4" + sha256 cellar: :any_skip_relocation, arm64_linux: "4150b8bbb82cb4ea9f4cc3a346ae22a5cf11fdc144003931dce837dba50e4a35" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d6dc45f84a76c05d6fc9060801d94394a46b8e3bb541161d6aeef4f160f29b2b" + end + + depends_on xcode: ["14.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" + 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-sh.rb b/Formula/s/swift-sh.rb new file mode 100644 index 0000000000000..b76b67b6b0b01 --- /dev/null +++ b/Formula/s/swift-sh.rb @@ -0,0 +1,40 @@ +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_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..3d280cfe9c4e8 --- /dev/null +++ b/Formula/s/swift.rb @@ -0,0 +1,560 @@ +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.0.3-RELEASE.tar.gz" + sha256 "eef9f312d00540cfabc35cb1da9221dd15d3aaca546497a14f29a641ee6484e3" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "f68e82e8fea45c4a8f65146eb98ec1e0f1418b6230c73888b9f478a38387672d" + sha256 cellar: :any, arm64_sonoma: "26de451fb88025fb13b1b92d9f50a7949a36b1401f526696321c73a2b7668f06" + sha256 cellar: :any, arm64_ventura: "a1d9ce8a6b96748adab517f9b9f76daed8a713d3f2050b5854525b3f611c6748" + sha256 cellar: :any, sonoma: "45509e26cf31a30de0e5cf6e31c73d1031a402b2446bd645b0ed192e9b0ad1b7" + sha256 cellar: :any, ventura: "a440a437121c2e9aaba92681137e3b954cd45d5a03d23cf94d226a78fa937050" + sha256 arm64_linux: "f91ffa53d6aed66eba8a29f5c082b88f5a0bd54653b123fdd5f80e6fb4044522" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b990b642f94de06a0e7eed8fa0b36909d582f80ff2f2f93e140836b4d5c9dfcf" + 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.13" + + # HACK: this should not be a test dependency but is due to a limitation with fails_with + uses_from_macos "llvm" => [:build, :test] + 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 "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_intel do + url "https://download.swift.org/swift-5.10.1-release/ubuntu2204/swift-5.10.1-RELEASE/swift-5.10.1-RELEASE-ubuntu22.04.tar.gz" + sha256 "cab1bfffd33b79ebd49f4b7475bef6c7eb2d60cf3948cbc693d61afabd23c282" + end + + on_arm do + url "https://download.swift.org/swift-5.10.1-release/ubuntu2204-aarch64/swift-5.10.1-RELEASE/swift-5.10.1-RELEASE-ubuntu22.04-aarch64.tar.gz" + sha256 "871b00f0a7f96e0d28da53b232181c900a7540cb4be37fe4916c15ab411f83c9" + end + end + + resource "swift-corelibs-foundation" do + url "https://github.com/apple/swift-corelibs-foundation/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "62c276a18fa3b3b92e95f5349dc125d03f09cea3c477b3af1428ccdbab29e139" + end + + resource "swift-foundation" do + url "https://github.com/apple/swift-foundation/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "31ee3ea95a015049d3f6a5cfe8bd3a460071fa0086c1d112efaf0580611d162c" + end + + resource "swift-foundation-icu" do + url "https://github.com/apple/swift-foundation-icu/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "c4332b4e6cc008a5a7045ad7f368df7deb518f286ecd5a78839066dcc07a853a" + end + + resource "swift-corelibs-libdispatch" do + url "https://github.com/apple/swift-corelibs-libdispatch/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "444c0de5fe18e148548a3f3b60b3bac3d4d586285c21064346c7ca17ed1d4fac" + end + + resource "swift-corelibs-xctest" do + url "https://github.com/apple/swift-corelibs-xctest/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "eb131d1cfde18548c5fc782ba56bc871b13057b5e7b6992ddae4d4349360571d" + end + end + + # Currently requires Clang to build successfully. + fails_with :gcc + + resource "llvm-project" do + url "https://github.com/swiftlang/llvm-project/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "d93ca164615938e5026a2d1af76b2ef7514eae98b38a716f3278bc1a6dfc8f92" + + # Support Python 3.13. + # Remove with Swift 6.1. + patch do + url "https://github.com/swiftlang/llvm-project/commit/b202bacbaf2be144dfd51d083eb2e4fe687a3803.patch?full_index=1" + sha256 "a7368e3b91a3dc4ebfd78f61e865a621eee37c176ac88bea68f1327151e695cc" + end + end + + resource "cmark" do + url "https://github.com/swiftlang/swift-cmark/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "ab1064350ecedd5b3c0f2a6fbe3acefbc45d7accf1e4ca1591ce04d0c6787e40" + end + + resource "llbuild" do + url "https://github.com/swiftlang/swift-llbuild/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "68d71bf7e0882153c6ad91fbe0626ab761d8bc46d2d93ce32cbfa392d256a30e" + + # Workaround Homebrew sqlite3 not being found. + # Needs paired inreplace for @@HOMEBREW_PREFIX@@. + # https://github.com/swiftlang/swift-llbuild/issues/901 + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/0080c7317c51d16b17671640c5db665516402d2f/swift/llbuild-sqlite3.patch" + sha256 "97329a525dabf4a7a13d3e3237965e66ae456887776e0101e82b6ca125a97591" + end + end + + resource "swiftpm" do + url "https://github.com/swiftlang/swift-package-manager/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "03c5b8dfd8628de42ca1c171faeeddea977ecdad8675d3826a2c165ad8f972ba" + end + + resource "indexstore-db" do + url "https://github.com/swiftlang/indexstore-db/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "fdaceb80a819e5b86d1599e7357c79e518a3ff0bb96dcd82245fc50e3d6bbc0d" + + # Fix compile with Clang 19. + # Remove with Swift 6.1. + patch do + url "https://github.com/swiftlang/indexstore-db/commit/6120b53b1e8774ef4e2ad83438d4d94961331e72.patch?full_index=1" + sha256 "1726948896ff5def5e3eb925cddd4ee24e488568ad6815023b43aa49f34874d6" + end + end + + resource "sourcekit-lsp" do + url "https://github.com/swiftlang/sourcekit-lsp/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "928db64bc179a250afd305b5729217180e2de1cdcd3d353d0fa20b38c5def8ec" + end + + resource "swift-driver" do + url "https://github.com/swiftlang/swift-driver/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "9ee38eda1a0adc24dd995b345dff4a5a25d42ae8d063fcc04b170469f2f53d43" + end + + resource "swift-tools-support-core" do + url "https://github.com/swiftlang/swift-tools-support-core/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "fc83e9922d4c7df0f0d94b8840f292989eb148d5e451b182a9e390a9ea4dd94e" + + # 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.0.3-RELEASE.tar.gz" + sha256 "00d8e95a7fdae71c7313389ced0fd4d63185782f8d2fa6d4683672f700478195" + end + + resource "swift-lmdb" do + url "https://github.com/swiftlang/swift-lmdb/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "1876f37050f42044ce9e614530f8001ce0fce6f44fff8a5ece7186591115f4b6" + end + + resource "swift-docc-render-artifact" do + url "https://github.com/swiftlang/swift-docc-render-artifact/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "d791c82bff3ed8e8a35a76c1fab9bc3a20ed7bd96aa91b40d50e822f11874863" + end + + resource "swift-docc-symbolkit" do + url "https://github.com/swiftlang/swift-docc-symbolkit/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "1bdcb65209d0487fa50d5ed41e108528c56259771f25b06a0bec911ccb224237" + end + + resource "swift-markdown" do + url "https://github.com/swiftlang/swift-markdown/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "6c2cc30a8c0f8b6f1f4fa0f21af784722267bb9b6c38336718ae959cea5584e5" + end + + resource "swift-experimental-string-processing" do + url "https://github.com/swiftlang/swift-experimental-string-processing/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "6c34cfdf934eb781169866a66505e11541861ba638b05fd4ed87f8c34a6fa55e" + end + + resource "swift-syntax" do + url "https://github.com/swiftlang/swift-syntax/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "30788e115f37b7d3f8fc1f5d436b80996f4945fc13287ed7e4391b358479fafd" + end + + resource "swift-testing" do + url "https://github.com/swiftlang/swift-testing/archive/refs/tags/swift-6.0.3-RELEASE.tar.gz" + sha256 "c69bafdaaa849cae7265804bd1a8807ebadffbc51c005c343e4d1ce42a1e7b62" + 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.2.3.tar.gz" + sha256 "4a10bbef290a2167c5cc340b39f1f7ff6a8cf4e1b5433b68548bf5f1e542e908" + 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.2.tar.gz" + sha256 "cd30d2f93c72424df48d182006417abdeebe74d250cb99d1cda78daf40aca569" + 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.3.0.tar.gz" + sha256 "02e13a7f77887c387f5aa1de05f4d4b8b158c35145450e1d9557d6c42b06cd1f" + end + + # As above: refer to update-checkout-config.json + resource "yams" do + url "https://github.com/jpsim/Yams/archive/refs/tags/5.0.6.tar.gz" + sha256 "a81c6b93f5d26bae1b619b7f8babbfe7c8abacf95b85916961d488888df886fb" + end + + # As above: refer to update-checkout-config.json + resource "swift-nio" do + url "https://github.com/apple/swift-nio/archive/refs/tags/2.31.2.tar.gz" + sha256 "8818b8e991d36e886b207ae1023fa43c5eada7d6a1951a52ad70f7f71f57d9fe" + end + + # As above: refer to update-checkout-config.json + resource "swift-nio-ssl" do + url "https://github.com/apple/swift-nio-ssl/archive/refs/tags/2.15.0.tar.gz" + sha256 "9ab1f0e347fad651ed5ccadc13d54c4306e6f5cd21908a4ba7d1334278a4cd55" + end + + # Fix build with Xcode 16. + # Remove with Swift 6.1 (or earlier if it gets cherry-picked). + patch do + url "https://github.com/swiftlang/swift/commit/c8d7e94fdd2c8ceb276a6dc363861872f13104ba.patch?full_index=1" + sha256 "aa012b9522ddbe92da9ab6a491dd43097b723e7807e813c57edd458f4baf3b12" + 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/formula-patches/5e4d9bb4d04c7c9004e95fecba362a843dc00bdd/swift/homebrew-resource-dir.diff" + sha256 "5210ca0fd95b960d596c058f5ac76412a6987d2badf5394856bb9e31d3c68833" + end + + 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 = [", "\\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/Sources/FoundationNetworking/CMakeLists.txt", + workspace/"swift-corelibs-foundation/Sources/FoundationXML/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-xpc-service swift-remote-mirror + swift-remote-mirror-headers stdlib + static-mirror-lib + ] + llvm_components = %w[ + llvm-ar llvm-ranlib llvm-cov llvm-profdata IndexStore + clang clang-resource-headers compiler-rt + clangd clang-features-file lld + ] + + if OS.mac? + swift_components << "back-deployment" + llvm_components << "dsymutil" + end + if OS.linux? + swift_components += %w[ + sdk-overlay + sourcekit-inproc + ] + end + + 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.13")} + --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" + 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 + 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/main.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 diff --git a/Formula/s/swiftdraw.rb b/Formula/s/swiftdraw.rb new file mode 100644 index 0000000000000..5df509920b0a7 --- /dev/null +++ b/Formula/s/swiftdraw.rb @@ -0,0 +1,44 @@ +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.21.0.tar.gz" + sha256 "83a08fc68cbae050b9c484b18ffb2909fbd774281625c5509fd0ec8127f8c813" + license "Zlib" + head "https://github.com/swhitty/SwiftDraw.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1a872ae45c421eafb9a62cc714b330f375ced3d4737bd863d5e5ad645a9f354e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "21c321c6f4c37bb855ec175f09001312abcb0fcd1749be70e7653a181769e9eb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dda0c33168a03d5dccfada5f8fb669c697133623d83a7cdaa63737c858e6e76d" + sha256 cellar: :any_skip_relocation, sonoma: "6a4c303d2b68b336eb314a5f7a9248c4e611c5d2f2aa131c0e8930dcd17e419e" + sha256 cellar: :any_skip_relocation, ventura: "ab3896fc065157dc90733ae61ae943634bc9b4b5752c57b14e448310cf947712" + sha256 cellar: :any_skip_relocation, arm64_linux: "dc101a3672ff884df44e0f7b5df98c8d49cd60e20c8fada2bb44dbcfc853bd17" + sha256 cellar: :any_skip_relocation, x86_64_linux: "013026aa86eac3c83513a342fa7208c08a4831915e6c954de0e441ee47dc907c" + end + + depends_on xcode: ["14.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..32b90ad78e085 --- /dev/null +++ b/Formula/s/swiftformat.rb @@ -0,0 +1,41 @@ +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.56.1.tar.gz" + sha256 "58ddb99c2c70268872aed1da1d7018de51cbba9e5be7a2f9b7285d43ec3d4092" + license "MIT" + head "https://github.com/nicklockwood/SwiftFormat.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c9cea5a4fce1b1590ca3f892a14cee5ca8ae34ede64a5862758b35da4f784bc0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9863dd7cce8f792175a54bc3003c70cb50f26bb2ba0c7b905f5ad87d60f4ef77" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7a8359097090bb54457e59a05aba5e37a13398261dec600f380ff908262972f1" + sha256 cellar: :any_skip_relocation, sonoma: "48c73ecf2870d636fc83a7671448f6b9e2b5a3716c83b5fa95d6d4bfab8fafc4" + sha256 cellar: :any_skip_relocation, ventura: "cf9a53b0afa4ea86287d303fb24e257e6b969d20a96c09f6fc17f7d18bb816bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "75e8193c06f09fed008c40e26ef3cb31f0b010b41bbea023569dbb1f553158da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "216aa98711011b57b2261ad311a1737f78757df8d8b79bd3e3759aaa47875df5" + 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..2a851fd433fb9 --- /dev/null +++ b/Formula/s/swiftgen.rb @@ -0,0 +1,75 @@ +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" + + bottle do + 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, since: :high_sierra + + 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..a4bbba8ed1b85 --- /dev/null +++ b/Formula/s/swiftlint.rb @@ -0,0 +1,46 @@ +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.59.1", + revision: "625792423014cc49b0a1e5a1a5c0d6b8b3de10f9" + license "MIT" + head "https://github.com/realm/SwiftLint.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c3f41f4287ee4a4a74a2f38628f30774e6857405c48f0e3832aaa630d13d4cb7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cf36eacfa4a47f013495f2152ccdfb6dde871d17d618414e3cfc559ddf023ffc" + sha256 cellar: :any, arm64_ventura: "4ccd5a613a7dd6310e088e55b9cc315f455bd81f7d104ec8072ddd00dbe69bef" + sha256 cellar: :any_skip_relocation, sonoma: "8b0c46a09427e091de69f7b267efca4779ed47d43b894d87e903c09e89b7a47e" + sha256 cellar: :any, ventura: "5c31fd0bf839aa606624fdd6238fa9a36fb4fea6f34b90da3a22c41856c2d136" + sha256 cellar: :any_skip_relocation, arm64_linux: "fed88471e745a4b402389f8005388ac603efaa0f4b8d5baa2dfd00fd7e575bd1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "64bfd1f18fd38050c83d117ef116cdeb69b2100da650ed589173854d67790704" + 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 + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + 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..32e3ff16ad3c6 --- /dev/null +++ b/Formula/s/swiftly.rb @@ -0,0 +1,55 @@ +class Swiftly < Formula + desc "Swift toolchain installer and manager" + homepage "https://github.com/swiftlang/swiftly" + url "https://github.com/swiftlang/swiftly.git", + tag: "1.0.0", + revision: "a9eecca341e6d5047c744a165bfe5bbf239987f5" + license "Apache-2.0" + head "https://github.com/swiftlang/swiftly.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b75aea1e89e30fd9a79bb0b85e40a495a000a701cd6c886e6d521fc6f04dc3a1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8e5b1fc6281e6008f944cac681007dd86280c49789299a0cb822efb64185d73e" + sha256 cellar: :any, arm64_ventura: "2e68af78a8cdaaa0f30e692374e2f8f12d70d8badb54ba751661d30ebdff07e7" + sha256 cellar: :any_skip_relocation, sonoma: "c29010ed4b5be4cecdead4a32071a73efe827101eb3f1261194557fa290c4df4" + sha256 cellar: :any, ventura: "cfb17a9c3409df62c02b0422efddf79a568db0deab23034e2a4b6c38fe9cd8c6" + end + + # On Linux, SPM can't find zlib installed by brew. + # TODO: someone who cares: submit a PR to fix this! + depends_on :macos + + depends_on macos: :ventura + depends_on xcode: "8.0" + + uses_from_macos "swift" => :build, since: :sonoma # swift 5.10+ + uses_from_macos "zlib" + + on_linux do + depends_on "libarchive" + end + + def install + system "swift", "build", "--configuration", "release", "--product", "swiftly", "--disable-sandbox" + bin.install ".build/release/swiftly" + end + + test do + swiftly_bin = testpath/"swiftly"/"bin" + mkdir_p swiftly_bin + ENV["SWIFTLY_HOME_DIR"] = testpath/"swiftly" + ENV["SWIFTLY_BIN_DIR"] = swiftly_bin + system bin/"swiftly", "init", "--assume-yes", "--no-modify-profile" + system bin/"swiftly", "install", "latest", "--use" + (testpath/"main.swift").write <<~EOS + @main + struct HelloSwiftly { + static func main() { + print("Hello Swiftly!") + } + } + EOS + system swiftly_bin/"swiftc", "main.swift", "-parse-as-library" + assert_match "Hello Swiftly!", shell_output("./main").chomp + end +end diff --git a/Formula/s/swiftplantuml.rb b/Formula/s/swiftplantuml.rb new file mode 100644 index 0000000000000..938d7e029a0f3 --- /dev/null +++ b/Formula/s/swiftplantuml.rb @@ -0,0 +1,75 @@ +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_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..078930669b8d2 --- /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.3.1/swig-4.3.1.tar.gz" + sha256 "44fc829f70f1e17d635a2b4d69acab38896699ecc24aa023e516e0eabbec61b8" + 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_sequoia: "1a45fd47424edbf0a25a81c818695b2669f9a8a842fcdc89bd4ba75f84359ad3" + sha256 arm64_sonoma: "05db31cb7bde7343e73091a2e3d8c91ee55041f023967cc0430a48a661085ce1" + sha256 arm64_ventura: "a875754e52f8ceea57710f4fded57d1ff208f54707a4f7c0f4ebfe7f807b3df7" + sha256 sonoma: "707733605cd77b4c73261e45e434ca33a2b9cb3d499904d17fbd3fa570124951" + sha256 ventura: "b870cddb5b2fff93b65d2f051db91dc5eefc049b972333af7159bee73aa77c09" + sha256 arm64_linux: "8460b88cba0cdbe9a30cb1f243a314c1f789b0ceb3a1fe7aadf93ce644e5e9ff" + sha256 x86_64_linux: "cef3ffee024b315520f39c088de7108d586b1d295f4764bdf5ec283d2e5a33da" + 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..f5d4deb7a60ae --- /dev/null +++ b/Formula/s/switch-lan-play.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, mojave: "62da027220b8d01270c8459cec638744ed06eac2ec046ccff56729b7f126eacf" + sha256 cellar: :any_skip_relocation, high_sierra: "41a10e6d0ce45410763c4774afa4286a8c633ac60348c0d0963e33cbef855c1d" + 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 + 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}/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..8be17378f658d --- /dev/null +++ b/Formula/s/switchaudio-osx.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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..28e012090549e --- /dev/null +++ b/Formula/s/sword.rb @@ -0,0 +1,60 @@ +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 + + bottle do + rebuild 1 + 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 mojave: "84420513bcd1215cfcee1737022551b86d80059a0dfb1de6fc82dcec050280a2" + sha256 high_sierra: "42b2dfd8162cd7b96efeba4da340df7dafae5f581be6c6bbb47f37a07bd9f66a" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..62b7693447418 --- /dev/null +++ b/Formula/s/swtpm.rb @@ -0,0 +1,57 @@ +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_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..dbe69740dda14 --- /dev/null +++ b/Formula/s/syft.rb @@ -0,0 +1,46 @@ +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.24.0.tar.gz" + sha256 "c8b8f66f33c90ce9a8112bf005e66971a82b84448d78bd6958b834ebdc5b13ef" + license "Apache-2.0" + head "https://github.com/anchore/syft.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0aab4d692b5c4d0ef590467a33f7dae080277a711876455a1801f1e00c3cee1c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "291e6873bf5f4d0d4f0f07fe076346cc44097a4b2c185c18ef3be7e3d6b4b249" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f3687bbfb0aff62ba41d6092cbdf40fba2fb547a251179b8dba3c339c261dbbd" + sha256 cellar: :any_skip_relocation, sonoma: "36bada90de9bd2b4543188c80268ef2dcaf68b2d35ca9c2477dd1e412818474a" + sha256 cellar: :any_skip_relocation, ventura: "deeb44e4736fd5b83e53c94b57b41b0da386c64ff0940590605a3234b2f020e3" + sha256 cellar: :any_skip_relocation, arm64_linux: "23ebc51f92505dd7fc84ce20bd2d40a54d4d57f59b0cdba24b872a7ca2918589" + sha256 cellar: :any_skip_relocation, x86_64_linux: "437b5f80a03cde4cf9e21c152ca4f1a93f88208841790fa65d85b40c2fc39172" + 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/sylpheed.rb b/Formula/s/sylpheed.rb new file mode 100644 index 0000000000000..45c14767b6c8f --- /dev/null +++ b/Formula/s/sylpheed.rb @@ -0,0 +1,57 @@ +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 7 + + livecheck do + url "https://sylpheed.sraoss.jp/en/download.html" + regex(%r{stable.*?href=.*?/sylpheed[._-]v?(\d+(?:\.\d+)+)\.t}im) + end + + bottle do + sha256 arm64_sonoma: "b495ed0f57f6d69fb00f2295e90114d2f84383bea9265b7745a5879d93c8b28f" + sha256 arm64_ventura: "ae1224cc9e932e455ce0beabf837e2e461ebc3c94e12dfe0049a27b2ab5fbbaf" + sha256 arm64_monterey: "8a61d3c007130922a3401fa21126224af1150e42c0505a71b001025a339104e9" + sha256 sonoma: "318cdef672289eef299f997f611bdb0b04289a2df140f11f486750d1e9caee2f" + sha256 ventura: "90d177673ba7c5cbcc5379ff58d6fe0dfc53bfaf5d56dd83b9c5b63e897793df" + sha256 monterey: "5fc319eacb46d715a6d65afd9415037d51201bdd9990e8551ea2565acfec591d" + sha256 arm64_linux: "445fac115ea59195e3d6f635295b6f872d6eb48d62bfd82e93fab79d912b9291" + sha256 x86_64_linux: "2acbda751260830e9e9388a9745bc6df4668b2c3799b200335d0c19d2018882c" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..1db4404e15417 --- /dev/null +++ b/Formula/s/symengine.rb @@ -0,0 +1,74 @@ +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 2 + + bottle do + sha256 cellar: :any, arm64_sequoia: "df79e834fa3f34d24c03f89e336595fca313ac465697889dfaf8ed5d91d16dbf" + sha256 cellar: :any, arm64_sonoma: "e0662a8972639a72264fd3cc2d199e0b59a26f1b20675cb11082dd1b12ecf7ef" + sha256 cellar: :any, arm64_ventura: "d380c1be286bcbfd0fe734a4b010d7235fe222cecaa925f55d08375844eb9e34" + sha256 cellar: :any, sonoma: "4e828156687bd21078763f13285a5198c6218ec4e0a8c9191d1ef93a32e5aca6" + sha256 cellar: :any, ventura: "ca02e12f3aa8b4a5a5dd312bd5d6270e690266c428f5b437ffbd657cb6b36f76" + sha256 cellar: :any_skip_relocation, arm64_linux: "1834d391bd9a7c56eeae26907398710c6b86ef8dd319dd3996ee0d66939185c4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e2542390b8ccd99af6c5957c75fd75e26908af774efcf59fe671b3bd7c1aa947" + 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..8ee642b757227 --- /dev/null +++ b/Formula/s/symfony-cli.rb @@ -0,0 +1,28 @@ +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.11.0.tar.gz" + sha256 "29996a4f7f2032fe1e3b1d8df734843f84ee7e2ac9db10e1e690ffc37df88713" + license "AGPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b6fa2019639aee82e0f242d54e9d3985c69c027a931018f7ee294d9fe5d758da" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9e5af6706031cf92b8caaf523ab1e76de0ea2889134046b97cf5595fca7a6286" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6a11438c2930e139d16705ddaed7a9987e737a62b3ba4dfc1bc8403e23d6c4fa" + sha256 cellar: :any_skip_relocation, sonoma: "1ee4ab7ee1692dcfd6f5c173820ab31d57a23af4d60bcebe83aa1481c6338835" + sha256 cellar: :any_skip_relocation, ventura: "546f4c2e45674008eb121eb7b42b041015f0914788bf9e3002185a31edaf55e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e18d41965637af7bc93b1ba06b7de11cca3a3e122d2579cbb672eef0d76f5807" + end + + depends_on "go" => :build + depends_on "composer" => :test + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}", output: bin/"symfony") + end + + test do + system bin/"symfony", "new", "--no-git", testpath/"my_project" + assert_path_exists testpath/"my_project/symfony.lock" + end +end diff --git a/Formula/s/symlinks.rb b/Formula/s/symlinks.rb new file mode 100644 index 0000000000000..2f48aef84fbd1 --- /dev/null +++ b/Formula/s/symlinks.rb @@ -0,0 +1,31 @@ +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" + + bottle do + 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..66f4a6c87dab0 --- /dev/null +++ b/Formula/s/syncthing.rb @@ -0,0 +1,47 @@ +class Syncthing < Formula + desc "Open source continuous file synchronization application" + homepage "https://syncthing.net/" + url "https://github.com/syncthing/syncthing/archive/refs/tags/v1.29.6.tar.gz" + sha256 "9731b302f3abcf08a29b0f404a46b26d1f3b89bec0e2bc40313471173da8358d" + 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_sequoia: "30ebeebb7a79c75bab5773c8bd59f07e2907d0f8a8748d86dfb72e68aae7cf95" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "40d533e9300eff8b4d72598eb4a3f716754f1bca314443e3b4787b9eba6d08f0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b9c30a65769c2e1d29690bb3ba0b5563e5dabb0f70cf905f35894d5af60d6c31" + sha256 cellar: :any_skip_relocation, sonoma: "462b004baeb5698e3fe28e279e51e1191f86144ffe7a3a7ceac190b673c48c9c" + sha256 cellar: :any_skip_relocation, ventura: "54d0eec94de14bb75213985ce2de98d9e5f002e39a25320294310e7e2e17e064" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b04b48f1b0f190cba1dbfc37bf415c426213024481748851381f9378cd7af54" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fdb8aff18045b523bb414b22066e4dd187a3e4d4b096037bd36ef9bb3faa7ebc" + 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..75b4637f3e26e --- /dev/null +++ b/Formula/s/synergy-core.rb @@ -0,0 +1,159 @@ +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/1.15.1+r1.tar.gz" + version "1.15.1" + sha256 "42fbf26c634d2947c7efc45da8c9a153387bcdcb19c1102a4f7c4e95aad5c708" + + # The synergy-core/LICENSE file contains the following preamble: + # This program is released under the GPL with the additional exemption + # that compiling, linking, and/or using OpenSSL is allowed. + # This preamble is followed by the text of the GPL-2.0. + # + # The synergy-core license is a free software license but it cannot be + # represented with the brew `license` statement. + # + # The GitHub Licenses API incorrectly says that this project is licensed + # strictly under GPLv2 (rather than GPLv2 plus a special exception). + # This requires synergy-core to appear as an exception in: + # audit_exceptions/permitted_formula_license_mismatches.json + # That exception can be removed if the nonfree GitHub Licenses API is fixed. + license :cannot_represent + 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 + sha256 arm64_sonoma: "b51e183a0c07609d4b5f81e194251ce29c93fc220b8989d50e7a7ee58ac49021" + sha256 arm64_ventura: "2a7b87a5e398dd460a081cb8899bd611175c9b8ed473bc908ed8bc116ca10964" + sha256 arm64_monterey: "23696daf5fc973a4b5869f68639ac971d4a2fb52da6e8b5a8636983550966ef9" + sha256 sonoma: "fe27a0f9abaf634c569222904e193b2c22eb06ec0cc607c0862663e0e60904bd" + sha256 ventura: "45f5169584dd7de08374dd0acae169f01afdebe6131f83c25d750415053b87be" + sha256 monterey: "0651ae4f922212f79badd7ce975259a6209abee9d59a0b8b7f61bbc8685936f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ad6a8e07bbe44eb008c620449cfeaac3e2fdfbc97b48965171ce6c114a7e10c" + end + + depends_on "cmake" => :build + depends_on "openssl@3" + depends_on "pugixml" + depends_on "qt" + + 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 + + def install + 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\\")"' + elsif OS.linux? + # Get rid of hardcoded installation path. + inreplace "cmake/Packaging.cmake", "set(CMAKE_INSTALL_PREFIX /usr)", "" + end + + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, + "-DBUILD_TESTS:BOOL=OFF", "-DCMAKE_INSTALL_DO_STRIP=1", + "-DSYSTEM_PUGIXML:BOOL=ON" + + 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/synergys" # server + bin.install_symlink prefix/"bundle/Synergy.app/Contents/MacOS/synergyc" # 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 + assert_match(/synergys: no configuration available\n$/, + shell_output("#{opt_bin}/synergys 2>&1", 4)) + assert_match(/synergyc: a server address or name is required$/, + shell_output("#{opt_bin}/synergyc 2>&1", 3).split("\n")[0]) + + version_string = Regexp.quote(version.major_minor_patch) + assert_match(/synergys v#{version_string}[-.0-9a-z]*, protocol v/, + shell_output("#{opt_bin}/synergys --version").lines.first) + assert_match(/synergyc v#{version_string}[-.0-9a-z]*, protocol v/, + shell_output("#{opt_bin}/synergyc --version").lines.first) + end +end diff --git a/Formula/s/synfig.rb b/Formula/s/synfig.rb new file mode 100644 index 0000000000000..944c47571bc47 --- /dev/null +++ b/Formula/s/synfig.rb @@ -0,0 +1,92 @@ +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" + head "https://github.com/synfig/synfig.git", branch: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sonoma: "a34f714cd0675cdaf0770cf662de92fab119890831b8e806584594e07a36abbe" + sha256 arm64_ventura: "6d5e945bb683d8a2a053950136bf5b6a45831a9239e8b513c334ef6be3ad3115" + sha256 sonoma: "d912728bb8c9e5c0f0b2b7c85a38aec545d342c217c518ed8d424ba05c7998f4" + sha256 ventura: "6949dc5c8e91eb8726237619c4e45272ac0a8fc99a0baa77260081bc46fdd772" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b865dde889776e10d50939b7243452c5ecd9981412a0101e6c82e40e2bd45c35" + 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 + + # 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..c6a8c3d44c65a --- /dev/null +++ b/Formula/s/synscan.rb @@ -0,0 +1,49 @@ +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 + + bottle do + 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, mojave: "aba139d4f46b1248a796f26dccb6399fd6f6eadd94b7777f5218d3a0599f0bad" + sha256 cellar: :any, high_sierra: "4364e517dd2b231cd711be4ccebdfe802e1ef6f7cacfaff46e987790c90c21f8" + 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..16bde2938343a --- /dev/null +++ b/Formula/s/syntaxerl.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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, mojave: "b2b5d4afd0e7f5e4feb748dc7cc738f65612cb06e4f09a59f7b8f3fdcbb4c424" + sha256 cellar: :any_skip_relocation, high_sierra: "81bba7402fee8403b05bef71b2552e65303b0a4399c7465d5c653fdab659fb9a" + 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..499d2b349aed2 --- /dev/null +++ b/Formula/s/sysaidmin.rb @@ -0,0 +1,187 @@ +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 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "ab1447a16293a706addd85001c911b1543833b531d55feed4c45e74af35042a5" + sha256 cellar: :any, arm64_sonoma: "243fedb5e15dc31b137ec7ee259d2a994b186c5df8f0951fcca3556959898a5d" + sha256 cellar: :any, arm64_ventura: "ccc927ca39e55adfc4915457466ce57a1f2f672efda5df4ca7aa5ddcc5afa6a9" + sha256 cellar: :any, sonoma: "5f877f08a4c4dd09c344453f3247641a6ec70249c478b8dd0b4db599e4aadb43" + sha256 cellar: :any, ventura: "da9a68d50f541d77d345a3fd83a7d7fcfe5cc76df46f8328b0bf7c7b539dbee9" + sha256 cellar: :any_skip_relocation, arm64_linux: "e9427ceb6af716340329bf39701baef5406c4307fd01fb95397c2510bb5678e4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "271c17ea3ddb5d63096b9c1978a840c40f7f29cf2326883f158064943da36ec7" + end + + depends_on "rust" => :build # for pydantic_core + depends_on "certifi" + depends_on "python@3.13" + + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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 "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/a9/3e/5aa9a61f7c3c47b0b52a1d930302992229d191bf4bc76447b324b731510a/griffe-1.7.3.tar.gz" + sha256 "52ee893c6a3a968b639ace8015bec9d36594961e156e23315c8e8e51401fa50b" + 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/4c/60/8f4281fa9bbf3c8034fd54c0e7412e66edbab6bc74c4996bd616f8d0406e/httpx-sse-0.4.0.tar.gz" + sha256 "1e81a3a3070ce322add1d3529ed42eb5f70817f45ed6ec915ab753f961139721" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "jiter" do + url "https://files.pythonhosted.org/packages/1e/c2/e4562507f52f0af7036da125bb699602ead37a2332af0788f8e0a3417f36/jiter-0.9.0.tar.gz" + sha256 "aadba0964deb424daa24492abc3d229c60c4a31bfee205aedbf1acc7639d7893" + end + + resource "mcp" do + url "https://files.pythonhosted.org/packages/95/d2/f587cb965a56e992634bebc8611c5b579af912b74e04eb9164bd49527d21/mcp-1.6.0.tar.gz" + sha256 "d9324876de2c5637369f43161cd71eebfd803df5a95e46225cab8d280e366723" + end + + resource "openai" do + url "https://files.pythonhosted.org/packages/84/51/817969ec969b73d8ddad085670ecd8a45ef1af1811d8c3b8a177ca4d1309/openai-1.76.0.tar.gz" + sha256 "fd2bfaf4608f48102d6b74f9e11c5ecaa058b60dad9c36e409c12477dfd91fb2" + end + + resource "openai-agents" do + url "https://files.pythonhosted.org/packages/83/6e/3e14abef846b9aaaa454d0c2e3353e0c5b4c72806633bf193024319806f3/openai_agents-0.0.13.tar.gz" + sha256 "6b80315e75c06b5302c5f2adba2f9ea3845f94615daed4706bfb871740f561a5" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + 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 "python-dotenv" do + url "https://files.pythonhosted.org/packages/88/2c/7bb1416c5620485aa793f2de31d3df393d3686aa8a8506d11e10e13c5baf/python_dotenv-1.1.0.tar.gz" + sha256 "41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/86/35/7d8d94eb0474352d55f60f80ebc30f7e59441a29e18886a6425f0bccd0d3/sse_starlette-2.3.3.tar.gz" + sha256 "fdd47c254aad42907cfd5c5b83e2282be15be6c51197bf1a9b70b8e990522072" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/ce/20/08dfcd9c983f6a6f4a1000d934b9e6d626cff8d2eeb77a89a68eef20a2b7/starlette-0.46.2.tar.gz" + sha256 "7f7361f34eed179294600af672f565727419830b54b7b084efe44bb82d2fccd5" + 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/00/7d/eb174f74e3f5634eaacb38031bbe467dfe2e545bc255e5c90096ec46bc46/types_requests-2.32.0.20250328.tar.gz" + sha256 "c9e67228ea103bd811c96984fac36ed2ae8da87a36a633964a21f199d60baf32" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/a6/ae/9bbb19b9e1c450cf9ecaef06463e40234d98d95bf572fab11b4f19ae5ded/uvicorn-0.34.2.tar.gz" + sha256 "0e929828f6186353a80b58ea719861d2629d766293b6d19baf086ba31d4f3328" + 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..67ba6ce8a8c3d --- /dev/null +++ b/Formula/s/sysbench.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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..d026ad440c58c --- /dev/null +++ b/Formula/s/sysdig.rb @@ -0,0 +1,69 @@ +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_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..1b51b7e37ae89 --- /dev/null +++ b/Formula/s/syslog-ng.rb @@ -0,0 +1,82 @@ +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.8.1/syslog-ng-4.8.1.tar.gz" + sha256 "e8b8b98c60a5b68b25e3462c4104c35d05b975e6778d38d8a81b8ff7c0e64c5b" + license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"] + revision 12 + head "https://github.com/syslog-ng/syslog-ng.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "bb698ed0b7dcf3e503c7a955d94b70e1efc80ee89dcecd2ed7be418d9a9c18dd" + sha256 arm64_sonoma: "d3a9688396c9be181b83dfd04f09dad7c745a13d312ce5a9c6127987b627f4ff" + sha256 arm64_ventura: "bb1641bd45a0b536e48b83f9e02a5a0a35a1baf6bc74d5cfd14cb0f08efbdc11" + sha256 sonoma: "a0ec3a498c3df9563fa91b6809f9b44eaf5acce4f1c41e0d51b0476b679cb57c" + sha256 ventura: "bf10a02dd697ae556a4dc5efd58b4a50d8285f84cff2c9693af7c9a6c2c96d14" + sha256 arm64_linux: "2f83b1817ac7a1d0c5380ed6fc10f9cd367ffcbb51747e71300a4617a3882cbd" + sha256 x86_64_linux: "c7cff8e38c75625c4953d27367ba7341f015e282a3d7608c9d72140a360fef9a" + 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.12" + depends_on "rabbitmq-c" + depends_on "riemann-client" + + uses_from_macos "curl" + + on_macos do + depends_on "gettext" + end + + def install + ENV["VERSION"] = version + + python3 = "python3.12" + 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" + + system "./configure", *std_configure_args, + "CXXFLAGS=-std=c++17", + "--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" + 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..1ace34a39396c --- /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/48/sysprof-48.0.tar.xz" + sha256 "1b0f0380f2f30708ba87829321a06fee1db36dfa87797bbf07f0a7acf4498d18" + # 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: "8d71d0c5219e39bfe151306a090bbd812721936eca47e9e7c1bc9b008e8c7a08" + sha256 x86_64_linux: "c3fa712ba388dd4a86358320e6c3055b56690979f9142f65f3c5c31e989a7182" + 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..24f1ceedc7f59 --- /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.7.tar.gz" + sha256 "9d8af674c99de2ecb3b3418886795fd65159aabc5da2e82d5dfa938560e3006d" + license "GPL-2.0-or-later" + head "https://github.com/sysstat/sysstat.git", branch: "master" + + bottle do + sha256 arm64_linux: "2e0adedc7b2589ccd60c3746a1c332d065b5f6ec918aaabfefad447dae8942ac" + sha256 x86_64_linux: "9a16492c63de99d15d0122c052d8e659b5df18dcc35c07d5d6ddc10cb88bd42a" + 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..64003efc4ae59 --- /dev/null +++ b/Formula/s/systemc.rb @@ -0,0 +1,42 @@ +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.1.tar.gz" + sha256 "d07765d0d2ffd6c01767880d0c6aaf53cd9487975f898c593ffffd713258fcbb" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "441b9e5eeeb6d385c2cfcf2c6500d24c42b67d3bd4ed37b3d8eff2499b71f061" + sha256 cellar: :any, arm64_sonoma: "3a0cde321c4507f2167a85f007b41f746428892da203926ec36349bd3772b32e" + sha256 cellar: :any, arm64_ventura: "0318c7fe56225d68c28f70aced8caf7e29481bd54b143abd2e8c1979e6046a9c" + sha256 cellar: :any, sonoma: "cce974365677a77f35b9e9210c458fc3983c24bd2f71607cac18acd43d718491" + sha256 cellar: :any, ventura: "dba48d318338030082a310813e68f3708029a7fb9a69a323bc18355db12b5cbf" + sha256 cellar: :any_skip_relocation, arm64_linux: "d204f75195a30aad451d44efc64b1ff98e5d9713876cff4458865be3acd073bb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6db51dd6f15d86564a1d9a5758497d514b1328222c0635fa9b20ccc86b0a9716" + 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 "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..8a622529aae14 --- /dev/null +++ b/Formula/s/systemd.rb @@ -0,0 +1,116 @@ +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/v257.5.tar.gz" + sha256 "4d65f9482608cf9f7823df42a6d7796f0e0dfcfb94301df75effff86d40da33e" + 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: "6f8f6f3017a35c59abfb80c6fb609d2ba1a2ebad8c851ca0b5526f27945e1203" + sha256 x86_64_linux: "c7609af448f6ac3e55428f908769e4cec7382c0ad306674c7346cd46e3608ed3" + 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.13" => :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" + + 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/ef/f6/c15ca8e5646e937c148e147244817672cf920b56ac0bf2cc1512ae674be8/lxml-5.3.1.tar.gz" + sha256 "106b7b5d2977b339f1e97efe2778e2ab20e99994cbb0ec5e55771ed0795920c8" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + def install + venv = virtualenv_create(buildpath/"venv", "python3.13") + 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 "temporary: /tmp", shell_output(bin/"systemd-path") + end +end diff --git a/Formula/s2geometry.rb b/Formula/s2geometry.rb deleted file mode 100644 index ef4f4a8369601..0000000000000 --- a/Formula/s2geometry.rb +++ /dev/null @@ -1,93 +0,0 @@ -class S2geometry < Formula - desc "Computational geometry and spatial indexing on the sphere" - homepage "https://github.com/google/s2geometry.git" - url "https://github.com/google/s2geometry/archive/v0.9.0.tar.gz" - sha256 "54c09b653f68929e8929bffa60ea568e26f3b4a51e1b1734f5c3c037f1d89062" - license "Apache-2.0" - revision 1 - - bottle do - cellar :any - sha256 "69e0912c7a35acdcd926fa997e0c7e37ee1b8908f113b0d5a6ccc80c1bbe020c" => :catalina - sha256 "5ecc3866aa3ad158fbb42b3d1b545d5c69a1ad5f1d5a574ae902de320d28d073" => :mojave - sha256 "cfdbc5dd02ab2ddd7561342f6c225c8de8c86b5dcbf321265e33d3296a8b66f1" => :high_sierra - sha256 "870466f63d2da435da772eff61412ea7a474bd72234f9e14e61deb850223791b" => :sierra - end - - depends_on "cmake" => :build - depends_on "glog" => :build - depends_on "openssl@1.1" - - resource "gtest" do - url "https://github.com/google/googletest/archive/release-1.8.1.tar.gz" - sha256 "9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c" - end - - def install - ENV["OPENSSL_ROOT_DIR"] = Formula["openssl@1.1"].opt_prefix - - (buildpath/"gtest").install resource "gtest" - (buildpath/"gtest/googletest").cd do - system "cmake", "." - system "make" - end - ENV["CXXFLAGS"] = "-I../gtest/googletest/include" - - args = std_cmake_args + %w[ - -DWITH_GLOG=1 - .. - ] - - mkdir "build-shared" do - system "cmake", *args - system "make", "s2" - lib.install "libs2.dylib" - end - mkdir "build" do - system "cmake", *args, "-DBUILD_SHARED_LIBS=OFF", - "-DOPENSSL_USE_STATIC_LIBS=TRUE" - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include "s2/base/commandlineflags.h" - #include "s2/s2earth.h" - #include "s2/s1chord_angle.h" - #include "s2/s2closest_point_query.h" - #include "s2/s2point_index.h" - #include "s2/s2testing.h" - - DEFINE_int32(num_index_points, 10000, "Number of points to index"); - DEFINE_int32(num_queries, 10000, "Number of queries"); - DEFINE_double(query_radius_km, 100, "Query radius in kilometers"); - - int main(int argc, char **argv) { - S2PointIndex index; - for (int i = 0; i < FLAGS_num_index_points; ++i) { - index.Add(S2Testing::RandomPoint(), i); - } - - S2ClosestPointQuery query(&index); - query.mutable_options()->set_max_distance( - S1Angle::Radians(S2Earth::KmToRadians(FLAGS_query_radius_km))); - - int64_t num_found = 0; - for (int i = 0; i < FLAGS_num_queries; ++i) { - S2ClosestPointQuery::PointTarget target(S2Testing::RandomPoint()); - num_found += query.FindClosestPoints(&target).size(); - } - - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-std=c++11", "-L#{lib}", - "-ls2", "-ls2testing", - "-o", "test" - system "./test" - end -end diff --git a/Formula/s2n.rb b/Formula/s2n.rb deleted file mode 100644 index a114e1b662976..0000000000000 --- a/Formula/s2n.rb +++ /dev/null @@ -1,37 +0,0 @@ -class S2n < Formula - desc "Implementation of the TLS/SSL protocols" - homepage "https://github.com/awslabs/s2n" - url "https://github.com/awslabs/s2n/archive/v0.10.0.tar.gz" - sha256 "ace34f0546f50551ee2124d25f8de3b7b435ddb1b4fbf640ea0dcb0f1c677451" - - bottle do - cellar :any - sha256 "563c56399c77a3d3a6a7fa265a854c11671e671ad679316e0f5eb3fadfe1d3ea" => :catalina - sha256 "5dfe9d90d210cf4df21c785d866efb35a4e2a2c23fc79e8de2c77d732ae666c7" => :mojave - sha256 "fa1f38966a646891d5fda5573743d5212f462a3d816e7879c92e27ef243858e8" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON" - system "make" - system "make", "install" - end - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main() { - assert(s2n_init() == 0); - return 0; - } - EOS - system ENV.cc, "test.c", "-L#{lib}", "-ls2n", "-o", "test" - system "./test" - end -end diff --git a/Formula/s3-backer.rb b/Formula/s3-backer.rb deleted file mode 100644 index 73976ff885d59..0000000000000 --- a/Formula/s3-backer.rb +++ /dev/null @@ -1,27 +0,0 @@ -class S3Backer < Formula - desc "FUSE-based single file backing store via Amazon S3" - homepage "https://github.com/archiecobbs/s3backer" - url "https://archie-public.s3.amazonaws.com/s3backer/s3backer-1.5.4.tar.gz" - sha256 "7e73bb8378a4ccf7b1904a078fbc4731b07138951cbe1c20ce7aa0eb3e8da0d0" - - bottle do - cellar :any - sha256 "81a2723bf9153259c910e49858bb49bd1aa26ef8a23e05a0ed7a8b01c6e8a032" => :catalina - sha256 "56ce3b86f53c7712f6e60f5059e920ef5237f335a19443ff81fe1a2a3a40b583" => :mojave - sha256 "f1544f1d212b7bf4fe34cea698a3f8a3a0fef49f9590777ab81d1eb56b71d40f" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - 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 97ec3be34955d..0000000000000 --- a/Formula/s3cmd.rb +++ /dev/null @@ -1,43 +0,0 @@ -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/c7/eb/5143fe1884af2303cb7b23f453e5c9f337af46c2281581fc40ab5322dee4/s3cmd-2.1.0.tar.gz" - sha256 "966b0a494a916fc3b4324de38f089c86c70ee90e8e1cae6d59102103a4c0cc03" - license "GPL-2.0" - head "https://github.com/s3tools/s3cmd.git" - - bottle do - cellar :any_skip_relocation - sha256 "ea18ab2445955c20de54537447b5930de60cf8e927fe291f662760d50c0df8db" => :catalina - sha256 "737880ee8c7e9d73848eec50d87b1b7da7762a8b8d6172fd1f4be173888e18fe" => :mojave - sha256 "4d2c498462eba573c43413ec16f4681a8e604b67ff6739351900e500e2be5923" => :high_sierra - end - - depends_on "python@3.8" - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - 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/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - end - - def install - ENV["S3CMD_INSTPATH_MAN"] = man - virtualenv_install_with_resources - end - - test do - system bin/"s3cmd", "--help" - end -end diff --git a/Formula/s3fs.rb b/Formula/s3fs.rb deleted file mode 100644 index 7e302cf13ba5a..0000000000000 --- a/Formula/s3fs.rb +++ /dev/null @@ -1,35 +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.86.tar.gz" - sha256 "9cf7ffc8f48cedd70e3fd4fd97e8d6d049d8d370867df10ceb7630b5bc1a9662" - license "GPL-2.0" - revision 1 - head "https://github.com/s3fs-fuse/s3fs-fuse.git" - - bottle do - cellar :any - sha256 "7bc2ba3372d2e56dcd55ac551ce2e437590b7ce4abd88258a5140decf873ce06" => :catalina - sha256 "76341907f7148b478881c1784a9a9d5d02327877155d8c8f93d66eb963d4e4d3" => :mojave - sha256 "c26a27153d6fc99f4ea7c7a4c8fc51bd1e9e7109a151b8500e10bc7a129d74bc" => :high_sierra - 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 - - test do - system "#{bin}/s3fs", "--version" - end -end diff --git a/Formula/s3ql.rb b/Formula/s3ql.rb deleted file mode 100644 index 40afb86ad01d9..0000000000000 --- a/Formula/s3ql.rb +++ /dev/null @@ -1,155 +0,0 @@ -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/release-3.3.2/s3ql-3.3.2.tar.bz2" - sha256 "72b310052752e281a17468a8bbe9006db7fa1f0184b83b38c5667239dfd59e73" - license "GPL-3.0" - revision 1 - - bottle do - cellar :any - sha256 "f97a6f3d0931473821d13cc6dd974f90d34c00cf5ab9c7372c60cddb6bf13948" => :catalina - sha256 "70874e572a344a22c239657d1bb9008c896582800f2740fc5a6684b66fb08faa" => :mojave - sha256 "4d5df651fa2f880a5341b3945ca29190fe798cfddc0f80973b4c6bd0ea31753f" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - depends_on :osxfuse - depends_on "python@3.8" - - uses_from_macos "libffi" - - resource "apsw" do - url "https://files.pythonhosted.org/packages/b5/a1/3de5a2d35fc34939672f4e1bd7d68cca359a31b76926f00d95f434c63aaa/apsw-3.9.2-r1.tar.gz" - sha256 "dab96fd164dde9e59f7f27228291498217fa0e74048e2c08c7059d7e39589270" - end - - resource "cachetools" do - url "https://files.pythonhosted.org/packages/30/62/88fda08df9053141647b6941141b71b4c2a23d0fabab485feb917428ab46/cachetools-4.1.0.tar.gz" - sha256 "1d057645db16ca7fe1f3bd953558897603d6f0b9c51ed9d11eb4d071ec4e2aab" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "defusedxml" do - url "https://files.pythonhosted.org/packages/a4/5f/f8aa58ca0cf01cbcee728abc9d88bfeb74e95e6cb4334cfd5bed5673ea77/defusedxml-0.6.0.tar.gz" - sha256 "f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5" - end - - resource "dugong" do - url "https://files.pythonhosted.org/packages/db/68/74767cc13b9e7cfa9705fc9cf3b272e55350de8cd4a73c98508a95d9a52c/dugong-3.7.5.tar.bz2" - sha256 "d0d07606282230fd9832f2de647e4cb46882c227883e6a12a8ff811ac46d7283" - end - - resource "google-auth" do - url "https://files.pythonhosted.org/packages/d8/47/0b6f9d832fe0699c8daf8b645408752e995f5afbb466cfa76d9954fcf8e1/google-auth-1.14.1.tar.gz" - sha256 "e63b2210e03c4ed829063b72c4af0c4b867c2788efb3210b6b9439b488bd3afd" - end - - resource "google-auth-oauthlib" do - url "https://files.pythonhosted.org/packages/cd/5a/2b5a4c1294a4e8903bdba122083bd505dc51688a95d4670cde89dc45e6ed/google-auth-oauthlib-0.4.1.tar.gz" - sha256 "88d2cd115e3391eb85e1243ac6902e76e77c5fe438b7276b297fbe68015458dd" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "llfuse" do - url "https://files.pythonhosted.org/packages/75/b4/5248459ec0e7e1608814915479cb13e5baf89034b572e3d74d5c9219dd31/llfuse-1.3.6.tar.bz2" - sha256 "31a267f7ec542b0cd62e0f1268e1880fdabf3f418ec9447def99acfa6eff2ec9" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/fc/c7/829c73c64d3749da7811c06319458e47f3461944da9d98bb4df1cb1598c2/oauthlib-3.1.0.tar.gz" - sha256 "bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889" - 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/88/87/72eb9ccf8a58021c542de2588a867dbefc7556e14b2866d1e40e9e2b587e/pyasn1-modules-0.2.8.tar.gz" - sha256 "905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "requests-oauthlib" do - url "https://files.pythonhosted.org/packages/23/eb/68fc8fa86e0f5789832f275c8289257d8dc44dbe93fce7ff819112b9df8f/requests-oauthlib-1.3.0.tar.gz" - sha256 "b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a" - end - - resource "rsa" do - url "https://files.pythonhosted.org/packages/cb/d0/8f99b91432a60ca4b1cd478fd0bdf28c1901c58e3a9f14f4ba3dba86b57f/rsa-4.0.tar.gz" - sha256 "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - venv = virtualenv_create(libexec, "python3") - resources.each do |r| - venv.pip_install r - end - - # 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 "setup.py", /'(?:(mkfs|fsck|mount|umount)\.)s3ql =/, "'\\1_s3ql =" - - system libexec/"bin/python3", "setup.py", "build_ext", "--inplace" - venv.pip_install_and_link buildpath - end - - test do - assert_match "S3QL ", shell_output(bin/"mount_s3ql --version") - - # create a local filesystem, and run an fsck on it - assert_equal "Library\n", shell_output("ls") - assert_match "Creating metadata", shell_output(bin/"mkfs_s3ql --plain local://#{testpath} 2>&1") - assert_match "s3ql_metadata", shell_output("ls s3ql_metadata") - system bin/"fsck_s3ql", "local://#{testpath}" - end -end diff --git a/Formula/s6.rb b/Formula/s6.rb deleted file mode 100644 index 69baf00ae84a8..0000000000000 --- a/Formula/s6.rb +++ /dev/null @@ -1,77 +0,0 @@ -class S6 < Formula - desc "Small & secure supervision software suite" - homepage "https://skarnet.org/software/s6/" - url "https://skarnet.org/software/s6/s6-2.9.2.0.tar.gz" - sha256 "363db72af8fffba764b775c872b0749d052805b893b07888168f59a841e9dddd" - license "ISC" - - bottle do - sha256 "94906378d458e78a0909dc89bd5672ca8d33645b1b070be4974ac7ebe0f3aa15" => :catalina - sha256 "e4024234358147987f7f6f599b73ddfd9bbe5e5fd414efcbc53577045a1dbb78" => :mojave - sha256 "d6be4dd0697c711c1e35fe25e4f1365bcb1c198ab8fc8c3f3d7169b29ccb4372" => :high_sierra - end - - resource "skalibs" do - url "https://skarnet.org/software/skalibs/skalibs-2.9.2.1.tar.gz" - sha256 "250b99b53dd413172db944b31c1b930aa145ac79fe6c5d7e6869ef804228c539" - end - - resource "execline" do - url "https://skarnet.org/software/execline/execline-2.6.1.0.tar.gz" - sha256 "a24c76f097ff44fe50b63b89bcde5d6ba9a481aecddbe88ee01b0e5a7b314556" - 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/sagittarius-scheme.rb b/Formula/sagittarius-scheme.rb deleted file mode 100644 index d7c881f5324e9..0000000000000 --- a/Formula/sagittarius-scheme.rb +++ /dev/null @@ -1,29 +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.6.tar.gz" - sha256 "b946b168fca70f84d922bcfa2125e2e64ad5fb8cf67e4204deb43dd2dcdedb0e" - revision 1 - - bottle do - cellar :any - sha256 "83845fdb59150a6c1bdd0e7f4fae012cf61179d66bb4187ab02cf8916230adbb" => :catalina - sha256 "c49cdba71567af4f9ba0a65abd81cd60f7913afc614d5f2495fb5f10961c8a53" => :mojave - sha256 "5c49ae9b83d175b6d65dab8ce262b4fd3a99d6bc6b8306da963054ade9f5ff3e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "bdw-gc" - depends_on "libffi" - depends_on "openssl@1.1" - depends_on "unixodbc" - - def install - system "cmake", ".", *std_cmake_args, "-DODBC_LIBRARIES=odbc" - 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 dd685991f6df3..0000000000000 --- a/Formula/saldl.rb +++ /dev/null @@ -1,44 +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" - license "AGPL-3.0" - revision 1 - head "https://github.com/saldl/saldl.git", :shallow => false - - bottle do - cellar :any - sha256 "2b377713f93e2cd853b9ef6a31a881215cffe3a35416309af31a13648cbf6f7d" => :catalina - sha256 "7fd875e38f9506d4ca5cca0e14815cea29ba40bf61385f53f93c8a587d5b50d3" => :mojave - sha256 "1c2f3b014669b8a19a1f3be6f654d8c438e62d5ed64e2c72b4f54a33e0f67b88" => :high_sierra - sha256 "7fbb71dbced4c48d0586f5f58fd4d64b87b39f4e3f78ad1188f11edb7c4af9a5" => :sierra - 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 450e4a06ed1cc..0000000000000 --- a/Formula/salt.rb +++ /dev/null @@ -1,88 +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/cc/03/a66a65209aa867c6f8414e5f99a52428400ecc93ab1657102284914a5d52/salt-3001.tar.gz" - sha256 "5ca60d1b2cc8e63db50995bd8b117914eeaf57c48ce2b3a3731ee57163adf154" - license "Apache-2.0" - head "https://github.com/saltstack/salt.git", :branch => "develop", :shallow => false - - bottle do - sha256 "138cea32de23b64acb9467ab2fe8d9783d47d4a1a947ff83c30effa8aca9aa0b" => :catalina - sha256 "048bd03fcb35fe5c027c8698bb3f303adc134ba72b529252f12a372ac05940ad" => :mojave - sha256 "a05afcb8b6a34f2c6e35edc547cacd928bdba93e2843278882f85cd805308c65" => :high_sierra - end - - depends_on "swig" => :build - depends_on "libgit2" - depends_on "libyaml" - depends_on "openssl@1.1" - depends_on "python@3.8" - depends_on "zeromq" - - on_linux do - depends_on "pkg-config" => :build - end - - # Homebrew installs optional dependencies: M2Crypto, pygit2 - - resource "cached-property" do - url "https://files.pythonhosted.org/packages/57/8e/0698e10350a57d46b3bcfe8eff1d4181642fd1724073336079cb13c5cf7f/cached-property-1.5.1.tar.gz" - sha256 "9217a59f14a5682da7c4b8829deadbfc194ac22e9908ccf7c8820234e80a1504" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "M2Crypto" do - url "https://files.pythonhosted.org/packages/74/18/3beedd4ac48b52d1a4d12f2a8c5cf0ae342ce974859fba838cbbc1580249/M2Crypto-0.35.2.tar.gz" - sha256 "4c6ad45ffb88670c590233683074f2440d96aaccb05b831371869fc387cbd127" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "pygit2" do - url "https://files.pythonhosted.org/packages/d0/c6/33e2df5722e3adf49adc6a2d3c2cdb5a5247236fd8f2063a0c4d058116a1/pygit2-1.2.1.tar.gz" - sha256 "de9421118a99c79cbba1e512d60e5caed1d63273ce30a0e8d4edef4a2e500387" - end - - def install - ENV["SWIG_FEATURES"]="-I#{Formula["openssl@1.1"].opt_include}" - - # Fix building of M2Crypto on High Sierra https://github.com/Homebrew/homebrew-core/pull/45895 - ENV.delete("HOMEBREW_SDKROOT") if MacOS.version == :high_sierra - - # Do not install PyObjC since it causes broken linkage - # https://github.com/Homebrew/homebrew-core/pull/52835#issuecomment-617502578 - File.write(buildpath/"pkg/osx/req_pyobjc.txt", "") - - venv = virtualenv_create(libexec, Formula["python@3.8"].bin/"python3.8") - venv.pip_install resources - - system libexec/"bin/pip", "install", "-v", "--ignore-installed", buildpath - system libexec/"bin/pip", "uninstall", "-y", "salt" - venv.pip_install_and_link buildpath - - 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. - - Homebrew's installation does not include PyObjC. - EOS - end - - test do - assert_match version.to_s, shell_output("#{bin}/salt --version") - end -end diff --git a/Formula/saltwater.rb b/Formula/saltwater.rb deleted file mode 100644 index fb5951f2602eb..0000000000000 --- a/Formula/saltwater.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Saltwater < Formula - desc "C compiler written in Rust, with a focus on good error messages" - homepage "https://github.com/jyn514/saltwater" - url "https://github.com/jyn514/saltwater/archive/0.10.0.tar.gz" - sha256 "1aac48c8ff787022238806a6c33dab4cc82553285a247581c10051e966544031" - head "https://github.com/jyn514/saltwater.git" - - bottle do - cellar :any_skip_relocation - sha256 "22f162aeaeadee5578237142dc6c1c0c6b59f01c254f43e92c8ef819fbee1482" => :catalina - sha256 "f7682593dd59142ee70839a3ea6646761e9cd138e2677e916bb0c5ac80fd9c53" => :mojave - sha256 "0c0c79c00b92bf9b9bd1bde3ddd0c3681183122fbe39cf31e2cb4e4a971f2d64" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - (testpath/"hello.c").write <<-EOS - int printf(const char *, ...); - int main() { - printf("Hello, world!\\n"); - } - EOS - system bin/"swcc", "-o", "test", "hello.c" - assert_match "Hello, world!", shell_output("./test") - end -end diff --git a/Formula/sampler.rb b/Formula/sampler.rb deleted file mode 100644 index 4010fc133e3cb..0000000000000 --- a/Formula/sampler.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Sampler < Formula - desc "Tool for shell commands execution, visualization and alerting" - homepage "https://sampler.dev/" - url "https://github.com/sqshq/sampler/archive/v1.1.0.tar.gz" - sha256 "8b60bc5c0f94ddd4291abc2b89c1792da424fa590733932871f7b5e07e7587f9" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "1b4a4c841691d8a6ca9ea4649092684511bff1f60d7d80e364db13115f2e6399" => :catalina - sha256 "b50240b4f199da6d55d4645dfd3d2b0fc3406d20a504ba9af4d3b545196438b1" => :mojave - sha256 "163b575ff369f264605bdc69c0fc838e44e706f8b6c527bb343cbfb18a9b1fdc" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"sampler" - end - - test do - assert_includes "specify config file", shell_output("#{bin}/sampler") - end -end diff --git a/Formula/samtools.rb b/Formula/samtools.rb deleted file mode 100644 index ba4d77b8bdae3..0000000000000 --- a/Formula/samtools.rb +++ /dev/null @@ -1,32 +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.10/samtools-1.10.tar.bz2" - sha256 "7b9ec5f05d61ec17bd9a82927e45d8ef37f813f79eb03fe06c88377f1bd03585" - - bottle do - cellar :any - sha256 "53c31e536e1f0a98e2dba30eddb61a782bf14b45ebf12e56973788f3427c1bac" => :catalina - sha256 "18abf7b1a130579066fa055116589cfc7ca4d20842408d7038470ebd612e8a85" => :mojave - sha256 "b9be0c12847087c47e0a1d9776d77795d35f98ed3373963564453de15c40437a" => :high_sierra - end - - depends_on "htslib" - - uses_from_macos "ncurses" - - 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/samurai.rb b/Formula/samurai.rb deleted file mode 100644 index a7948233b8f3c..0000000000000 --- a/Formula/samurai.rb +++ /dev/null @@ -1,35 +0,0 @@ -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.1/samurai-1.1.tar.gz" - sha256 "cb3ce624f26eb6f0ec0118a02b8f5f7953c3b644e229f50043698fc458f2c98e" - head "https://github.com/michaelforney/samurai.git" - - bottle do - cellar :any_skip_relocation - sha256 "ef3f56caffb50416e4d708cea0910b1658811464b94697b850760bf6acc70e4a" => :catalina - sha256 "90d42648667443f8bc1e9de25e221b2c16d8c973bac6cda33bfb1f611893144a" => :mojave - sha256 "e9c857e0bf7f2713d90d21040ab28431c03fe0e560a17d8dab6a3b4d6c463111" => :high_sierra - 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 <<~EOS - #include - int main() { - puts("Hello, world!"); - return 0; - } - EOS - system bin/"samu" - assert_match "Hello, world!", shell_output("./hello") - end -end diff --git a/Formula/sane-backends.rb b/Formula/sane-backends.rb deleted file mode 100644 index 60fd192c0d955..0000000000000 --- a/Formula/sane-backends.rb +++ /dev/null @@ -1,59 +0,0 @@ -class SaneBackends < Formula - desc "Backends for scanner access" - homepage "http://www.sane-project.org/" - head "https://gitlab.com/sane-project/backends.git" - - stable do - url "https://gitlab.com/sane-project/backends/uploads/c3dd60c9e054b5dee1e7b01a7edc98b0/sane-backends-1.0.30.tar.gz" - sha256 "3f5d96a9c47f6124a46bb577c776bbc4896dd17b9203d8bfbc7fe8cbbcf279a3" - - # Fixes build error "error: use of undeclared identifier 'HOST_NAME_MAX'" - # Commit is already included upstream in versions > 1.0.30 - patch do - url "https://gitlab.com/sane-project/backends/-/commit/011d0f9bacab126fb2ae09d29abdd6eb88f1333d.diff" - sha256 "2fb2366d8e53397237f4beda1f51000b0ae5beb2683387fb2a779d3a43ef1c9d" - end - end - - bottle do - sha256 "4d9b0e82a282fc75379e56de828da1601a63bdc49afe7be8a0e685a1ec5f2f6a" => :catalina - sha256 "52405560cb01a2b2cc6afdcc813d2ef57386b09790f36df3126a0764ece0005b" => :mojave - sha256 "9911d3ac5aebaa5c7313d2076ddb355b4f9d4475fb94b774373445ef97313297" => :high_sierra - 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@1.1" - - if build.head? - depends_on "autoconf" => :build - depends_on "autoconf-archive" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - depends_on "libtool" => :build - end - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--localstatedir=#{var}", - "--without-gphoto2", - "--enable-local-backends", - "--with-usb=yes" - 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 76343fa95718a..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.6.1", - :revision => "46748216ba0b60545e814c07846ca10c9fefc5b6" - head "https://github.com/sass/sassc.git" - - bottle do - cellar :any - sha256 "b3e76afb48cf7789113e29f01389bdc5d7f13faf3e9b7f28f4bf9ef352363b0f" => :catalina - sha256 "34e0739d4967b537d4836780cefcb47910ce8c5b8201e9f864d10c3d34801237" => :mojave - sha256 "4461eb8cf88f6fbbfe0d15b0efd0449cc95e3e46873af0f972769594786c32ea" => :high_sierra - sha256 "e54c8d0ddc93a8212c9c39f9e8c853a6b19ae1fc2ba3bee650785215441aa60e" => :sierra - 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 2bfd598484aee..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-1-7J.zip" - version "9.9.1.7" - sha256 "5d33c9e7f7326064da528e158c02e72ffe4b5ff78da2645a2dd0ebbefbc9d211" - - 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 17a9ba9b380f7..0000000000000 --- a/Formula/sbcl.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Sbcl < Formula - desc "Steel Bank Common Lisp system" - homepage "http://www.sbcl.org/" - url "https://downloads.sourceforge.net/project/sbcl/sbcl/2.0.6/sbcl-2.0.6-source.tar.bz2" - sha256 "fd92d64c1d97cc4f42fe3dcad2b183bcb225d01cdba4461634926f2f70adddae" - - bottle do - cellar :any_skip_relocation - sha256 "a1a0712251e374d34d8b6a8c456ed45f24f94b1b7d5f90d237e4a54ea92f350b" => :catalina - sha256 "2dfda3f01b4c7adb5c0ea65af79bbf164d8008bae56345242fee1be2b65c7556" => :mojave - sha256 "e487ad7b1a86d025dd11bda24f780768c448012bae30199978ddd2ed2f2535e3" => :high_sierra - end - - uses_from_macos "zlib" - - # 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/c5ffdb1118ce0c125c42ab396fa244a7aa01f863/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) - resource("bootstrap64").unpack tmpdir - - 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", - :SBCL_HOME => lib/"sbcl" - 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 24d430ef2dab8..0000000000000 --- a/Formula/sbjson.rb +++ /dev/null @@ -1,45 +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.3.tar.gz" - sha256 "9a03f6643b42a82300f4aefcfb6baf46cc2c519f1bb7db3028f338d6d1c56f1b" - head "https://github.com/stig/json-framework.git" - - bottle do - cellar :any_skip_relocation - sha256 "e703b87ff205bfec1cfc09e9c200ebca6be643df15ec99b85c590110a4885fb2" => :catalina - sha256 "8b145bcfef84733c00d94e57cbe0eac56a7981654cda6068ff219264353b25bd" => :mojave - sha256 "649463e051c03596a72400a04b95f993222f5ba6d42a879241291660fef8605c" => :high_sierra - 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 2e7ca06fd996a..0000000000000 --- a/Formula/sblim-sfcc.rb +++ /dev/null @@ -1,37 +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" - revision 1 - - bottle do - cellar :any - sha256 "d20839c77aaa1c968981ca9af0e92bf1c7f600392ea5674971f532040dae518a" => :catalina - sha256 "ff61a006626a9a36dafb474f352d798805b1a44adba341d8422bd0820eaae1ab" => :mojave - sha256 "0ee558ce892d6e04acfe7ca2408a96e2837c7c858e71f6047b3a57a15b75ece0" => :high_sierra - sha256 "2e1eea4bbad906293b2c48a27a09fd76d665ab0c9259ef49fcd81f4783fbb67c" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "openssl@1.1" - - 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 4a891f88257c4..0000000000000 --- a/Formula/sbt.rb +++ /dev/null @@ -1,46 +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.3.12/sbt-1.3.12.tgz" - mirror "https://sbt-downloads.cdnedge.bluemix.net/releases/v1.3.12/sbt-1.3.12.tgz" - sha256 "b4e72bb95f5be8f6a83451ef254c2bff008204456cadfcdd6d1ca4b981c58d57" - license "Apache-2.0" - - bottle :unneeded - - 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", "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 - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - 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" - system "#{bin}/sbt", "about" - 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 20a3af97a2e99..0000000000000 --- a/Formula/sbt@0.13.rb +++ /dev/null @@ -1,49 +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" - license "Apache-2.0" - - 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 b84e6d2a252ca..0000000000000 --- a/Formula/sbtenv.rb +++ /dev/null @@ -1,35 +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" - license "MIT" - 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 2ee012338d5fa..0000000000000 --- a/Formula/sbuild.rb +++ /dev/null @@ -1,39 +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" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["*"] - chmod 0755, libexec/"bin/sbuild" - (bin/"sbuild").write_env_script libexec/"bin/sbuild", - :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - 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 3668f7aa40a9b..0000000000000 --- a/Formula/sc-im.rb +++ /dev/null @@ -1,35 +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 "24cb0ad706b03a9933cdb24dba862b38a3fcb59f96f9942227d8f9f79ff93ea5" => :catalina - 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 0620964546519..0000000000000 --- a/Formula/sc68.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - - bottle do - sha256 "1d06595617862cdb67d49f8bc8389e7e6cb4bd6f6ac81adf20969c68bbe80434" => :catalina - 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 23bae8cfe8d23..0000000000000 --- a/Formula/scala.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Scala < Formula - desc "JVM-based programming language" - homepage "https://www.scala-lang.org/" - url "https://downloads.lightbend.com/scala/2.13.3/scala-2.13.3.tgz" - mirror "https://www.scala-lang.org/files/archive/scala-2.13.3.tgz" - mirror "https://downloads.typesafe.com/scala/2.13.3/scala-2.13.3.tgz" - sha256 "c9f3731bccf26cf39ac5413172fb41646cb19f63b8a2bb75f38e89675ce2697f" - - bottle :unneeded - - depends_on "openjdk" - - 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", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - - # 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]): Unit = { - println(s"${2 + 2}") - } - } - EOS - - out = shell_output("#{bin}/scala #{file}").strip - - 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 1017b37c4313f..0000000000000 --- a/Formula/scala@2.11.rb +++ /dev/null @@ -1,43 +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 -nc #{file}").strip - - assert_equal "4", out - end -end diff --git a/Formula/scala@2.12.rb b/Formula/scala@2.12.rb deleted file mode 100644 index 9c00648fdc554..0000000000000 --- a/Formula/scala@2.12.rb +++ /dev/null @@ -1,50 +0,0 @@ -class ScalaAT212 < Formula - desc "JVM-based programming language" - homepage "https://www.scala-lang.org/" - url "https://downloads.lightbend.com/scala/2.12.11/scala-2.12.11.tgz" - mirror "https://www.scala-lang.org/files/archive/scala-2.12.11.tgz" - mirror "https://downloads.typesafe.com/scala/2.12.11/scala-2.12.11.tgz" - sha256 "25afefb0f1a8c2cdc2a35eb7166de2276a4a1f95986d9bfbe18c60183ab36b85" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on "openjdk" - - 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", :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - - # 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/scalaenv.rb b/Formula/scalaenv.rb deleted file mode 100644 index d6e47b28b8ae3..0000000000000 --- a/Formula/scalaenv.rb +++ /dev/null @@ -1,35 +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.4.tar.gz" - sha256 "b791aaf1e0be7e26f455b4d659fba272b5017bc702d5bb5b3a1dc7d039cd456c" - license "MIT" - 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 0b5eff46d6c58..0000000000000 --- a/Formula/scalapack.rb +++ /dev/null @@ -1,51 +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.1.0.tgz" - sha256 "61d9216cf81d246944720cfce96255878a3f85dec13b9351f1fa0fd6768220a6" - revision 2 - - bottle do - cellar :any - sha256 "281e3d5317f1616e8d5a6a3b9c37fbe6ee29a03b2abe14055854902a6c009a87" => :catalina - sha256 "b222f27ffed17605ffca2d1b0b4804f4c66ec916c9d2b5f2dd085ad2427fa791" => :mojave - sha256 "ea92d3247883a9e0de28483a34d1ca064d395d28c8a622fbac571f4cd6d0e64d" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "gcc" # for gfortran - depends_on "open-mpi" - depends_on "openblas" - - # Patch for compatibility with GCC 10 - patch do - url "https://github.com/Reference-ScaLAPACK/scalapack/pull/23.diff?full_index=1" - sha256 "6e97008a0dd8624a63718a0882aa870f31883ec00d7bfac49e9e901979359039" - end - - 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 f7a7566d69379..0000000000000 --- a/Formula/scalariform.rb +++ /dev/null @@ -1,43 +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.10/scalariform.jar" - sha256 "59d7c26f26c13bdbc27e3011da244f01001d55741058062f49e4626862b7991e" - license "MIT" - - 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 0f2274c82e4a2..0000000000000 --- a/Formula/scalastyle.rb +++ /dev/null @@ -1,30 +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" - 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 b249be932a2aa..0000000000000 --- a/Formula/scale2x.rb +++ /dev/null @@ -1,23 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "83ab737ffb44b1b2913244a82c63d754057e79034bcf455d75b9150b630f85c7" => :catalina - 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 925b7609ae03b..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-20191102b.tar.gz" - sha256 "bb9199476a94c922bac8d5337ac35abd559027152a7147e7a07bd5022fc59dba" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "ce4b06740377720808c70eedad0c3da7e99a5686ec34f68cb578b4644a78b14b" => :catalina - sha256 "54d78388a155989fbb95dce2301f5ff72bb7bbc53ad3e067382c06600d63fc0b" => :mojave - sha256 "0133b481958220fe1db704531da243d22a50b2ddb01a30513410037bc44cf613" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make", "install" - end -end diff --git a/Formula/scc.rb b/Formula/scc.rb deleted file mode 100644 index ee6c52356161b..0000000000000 --- a/Formula/scc.rb +++ /dev/null @@ -1,32 +0,0 @@ -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/v2.12.0.tar.gz" - sha256 "48baba45e76ef02bb23ded3d1d904fed7e19297066a47b7e6b46baadc50c1eb1" - - bottle do - cellar :any_skip_relocation - sha256 "108e239ccf083324267fa3e0afa28c0fa48314b48d1cb419ce6c188d3177de4c" => :catalina - sha256 "f314664bcaff93ec70bc6bb3e63f1e51a1d4007ad9cf509de823efccdf57e536" => :mojave - sha256 "7c246db3f85a08e99c6fe3c51224bd95f49dc4a737394c1c4ff002c050c9af24" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/boyter/scc/").install Dir["*"] - system "go", "build", "-o", "#{bin}/scc", "-v", "github.com/boyter/scc/" - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main(void) { - return 0; - } - EOS - - assert_match "C,test.c,test.c,4,4,0,0,0\n", shell_output("#{bin}/scc -fcsv test.c") - end -end diff --git a/Formula/sccache.rb b/Formula/sccache.rb deleted file mode 100644 index 8ca4907c9878a..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.13.tar.gz" - sha256 "81c973cf9a89e77f02a6b5710298531ba2e50d2555e8a931e505fbf570522e2a" - license "Apache-2.0" - head "https://github.com/mozilla/sccache.git" - - bottle do - cellar :any_skip_relocation - sha256 "a4e38444e682b90e9cea144347e5f1fc32ab309ba448d495b025bb9bb19906d4" => :catalina - sha256 "80f2b3cfa57125f7fd927b8b312483ca91c146dd76702d1a2e0cefdac5ae25f5" => :mojave - sha256 "071e45205799343d3f2be7c3779292cbcf32d1bfa1861f70af55e9cca50fe891" => :high_sierra - end - - depends_on "rust" => :build - depends_on "openssl@1.1" - - def install - # Ensure that the `openssl` crate picks up the intended library. - # https://crates.io/crates/openssl#manual-configuration - ENV["OPENSSL_DIR"] = Formula["openssl@1.1"].opt_prefix - - system "cargo", "install", "--features", "all", *std_cargo_args - 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/scdoc.rb b/Formula/scdoc.rb deleted file mode 100644 index b113515fc1234..0000000000000 --- a/Formula/scdoc.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Scdoc < Formula - desc "Small man page generator" - homepage "https://git.sr.ht/~sircmpwn/scdoc/" - url "https://git.sr.ht/~sircmpwn/scdoc/archive/1.11.0.tar.gz" - sha256 "8ac3e7e08fdfab0d75a312b1abcb6eafbd9114a5deaafbaba0fe5ec7e880929d" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "cd14869a1ee30fb2cbb096f9a9f73438448fad68fbd048a4eed46394695f62ca" => :catalina - sha256 "12f800d4af4950f91eceba248a2576dfc2eb6100d35e400ffcd043d0c6885a82" => :mojave - sha256 "d6913f7e41d5e6f000a7b0e83d86d9d6975cd0d98769e73e88c0248be3b48685" => :high_sierra - end - - def install - # scdoc sets by default LDFLAGS=-static which doesn't work on macos(x) - system "make", "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, shell_output("#{bin}/scdoc :catalina - sha256 "3e22726f0e63bd9425e65ddf4a46a727f8cc63311c048de564e3131ce48e54b2" => :mojave - sha256 "1878a124ddbc98577fe7be58ec80c46ed114142abe3082d44a4a59720cf3672a" => :high_sierra - end - - depends_on "python@3.8" - - resource "boto3" do - url "https://files.pythonhosted.org/packages/a1/1e/1f7b6e68e40a715a8f5288c8712c67162f00dcbb82232400875a58b2e611/boto3-1.12.18.tar.gz" - sha256 "95d2fb21e3f0575f8b599706100c42a5a7ae576671f6f4beea6e42ab0f57166b" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/09/15/152c0bdca0834e67c3368701de74db5cfba086c736e11c3a9a8b1cf8422c/botocore-1.15.18.tar.gz" - sha256 "2f1a54e19531bdf2d953c2db5f76b49c6936565366b2503a528b04cbbf55671a" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/4e/ab/5d6bc3b697154018ef196f5b17d958fac3854e2efbc39ea07a284d4a6a9b/click-7.1.1.tar.gz" - sha256 "8a18b4ea89d8820c5d0c7da8a64b2c324b4dabb695804dbfea19b9be9d88c0cc" - end - - # pinned at 0.3.9 version - 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/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - # docutils<0.16,>=0.10 - resource "docutils" do - url "https://files.pythonhosted.org/packages/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/d8/03/e491f423379ea14bb3a02a5238507f7d446de639b623187bccc111fbecdf/Jinja2-2.11.1.tar.gz" - sha256 "93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/5c/40/3bed01fc17e2bb1b02633efc29878dfa25da479ad19a69cfb11d2b88ea8e/jmespath-0.9.5.tar.gz" - sha256 "cca55c8d153173e21baa59983015ad0daf603f9cb799904ff057bfb8ff8dc2d9" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - # pinned at 2.1 version - resource "networkx" do - url "https://files.pythonhosted.org/packages/11/42/f951cc6838a4dff6ce57211c4d7f8444809ccbe2134179950301e5c4c83c/networkx-2.1.zip" - sha256 "64272ca418972b70a196cb15d9c85a5a6041f09a2f32e0d30c0255f25d458bb1" - end - - # pinned at 16.8 version - 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/a2/56/0404c03c83cfcca229071d3c921d7d79ed385060bbe969fde3fd8f774ebd/pyparsing-2.4.6.tar.gz" - sha256 "4c830582a84fb022400b85429791bc551f1f4871c33f23e44f353119e92f969f" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/3d/d9/ea9816aea31beeadccd03f1f8b625ecf8f645bd66744484d162d84803ce5/PyYAML-5.3.tar.gz" - sha256 "e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/50/de/2b688c062107942486c81a739383b1432a72717d9a85a6a1a692f003c70c/s3transfer-0.3.3.tar.gz" - sha256 "921a37e2aefc64145e7b73d50c71bb4f26f46e4c9f414dc648c6245ff92cf7db" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "typing" do - url "https://files.pythonhosted.org/packages/67/b0/b2ea2bd67bfb80ea5d12a5baa1d12bda002cab3b6c9b48f7708cd40c34bf/typing-3.7.4.1.tar.gz" - sha256 "91dfe6f3f706ee8cc32d38edbbf304e9b7583fb37108fef38229617f8b3eba23" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - 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 1f5671993c2ed..0000000000000 --- a/Formula/schema-evolution-manager.rb +++ /dev/null @@ -1,21 +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.43.tar.gz" - sha256 "69a3b2b9ef23f2af97b34742c7c33f2f3889a1e7d471cf9e19138b20d8cfe944" - license "Apache-2.0" - - 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 b84f6d3a866cf..0000000000000 --- a/Formula/scheme48.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Scheme48 < Formula - desc "Scheme byte-code interpreter" - homepage "https://www.s48.org/" - url "https://s48.org/1.9.2/scheme48-1.9.2.tgz" - sha256 "9c4921a90e95daee067cd2e9cc0ffe09e118f4da01c0c0198e577c4f47759df4" - - bottle do - rebuild 1 - sha256 "50398406b73f7b6b5ce3c0f220694673e42b83bd63f11149a855498e4caf3c94" => :catalina - 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/schroedinger.rb b/Formula/schroedinger.rb deleted file mode 100644 index e8a16b0fb9864..0000000000000 --- a/Formula/schroedinger.rb +++ /dev/null @@ -1,46 +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://deb.debian.org/debian/pool/main/s/schroedinger/schroedinger_1.0.11.orig.tar.gz" - sha256 "1e572a0735b92aca5746c4528f9bebd35aa0ccf8619b22fa2756137a8cc9f912" - - bottle do - cellar :any - rebuild 1 - sha256 "904f8940085832802e511565d1bcea91262a0ca871612509c1e521db37da4227" => :catalina - 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 a1d79c5e7e035..0000000000000 --- a/Formula/scipy.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Scipy < Formula - desc "Software for mathematics, science, and engineering" - homepage "https://www.scipy.org/" - url "https://files.pythonhosted.org/packages/8a/6c/7777c60626cf620ce24d6349af69f3d2a4f298729d688cc4cd9528ae3c61/scipy-1.5.1.tar.gz" - sha256 "039572f0ca9578a466683558c5bf1e65d442860ec6e13307d528749cfe6d07b8" - license "BSD-3-Clause" - head "https://github.com/scipy/scipy.git" - - bottle do - cellar :any - sha256 "1fbab4eeef561f870085c01f8bfd5dc49e106d40937589582fc64c721711c92e" => :catalina - sha256 "c7082559111698830a7592e7a0d8d8c23cef28f34c878cf3fddcfa1f40e5485e" => :mojave - sha256 "03276027fe92d926e3654c4fb6f232819c080055d659a46f1cfdf0b6f6495a4a" => :high_sierra - end - - depends_on "swig" => :build - depends_on "gcc" # for gfortran - depends_on "numpy" - depends_on "openblas" - depends_on "pybind11" - depends_on "python@3.8" - - cxxstdlib_check :skip - - 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 - - version = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV["PYTHONPATH"] = Formula["numpy"].opt_lib/"python#{version}/site-packages" - ENV.prepend_create_path "PYTHONPATH", lib/"python#{version}/site-packages" - system Formula["python@3.8"].opt_bin/"python3", "setup.py", "build", "--fcompiler=gnu95" - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(prefix) - 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 - - test do - system Formula["python@3.8"].opt_bin/"python3", "-c", "import scipy" - end -end diff --git a/Formula/scm-manager.rb b/Formula/scm-manager.rb deleted file mode 100644 index 283a699b391d9..0000000000000 --- a/Formula/scm-manager.rb +++ /dev/null @@ -1,74 +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 "521d84a5445594de2d018af2a9f0291ab0a8495e8fe878b56913ee92173a2241" => :catalina - 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 7e931afb64886..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.3.0.tar.gz" - sha256 "239cd269a476f5159a15ef462686878934617b11317fdc786ca304059c0b6a0b" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "3e191a0aa602fb00cd35bc729261b2b377472b7f8add3d56263680d11ac7183b" => :catalina - sha256 "304cb27623cc21878468793b8b8375a8a89f4f050cda665d301ecc025690e712" => :mojave - sha256 "604d1805e793cbf6e0b07e030389a0275ccc98db832ff7564522496302e04985" => :high_sierra - sha256 "15a2fd8febc6ac36cb3429979fd5c8f88f230ae6276c073a0eedc5ac7e7abf69" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache" - (buildpath/"src/github.com/mroth/scmpuff").install buildpath.children - cd "src/github.com/mroth/scmpuff" do - system "go", "build", "-ldflags", "-X main.VERSION=#{version}", - "-o", bin/"scmpuff" - prefix.install_metafiles - end - 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 d6ef7be90403a..0000000000000 --- a/Formula/scons.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Scons < Formula - include Language::Python::Shebang - - desc "Substitute for classic 'make' tool with autoconf/automake functionality" - homepage "https://www.scons.org/" - url "https://downloads.sourceforge.net/project/scons/scons/3.1.2/scons-3.1.2.tar.gz" - sha256 "7801f3f62f654528e272df780be10c0e9337e897650b62ddcee9f39fde13f8fb" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "55f68a02463998b22e267af3089f00adfc3964b49d4c5f24dece2d1b08a92d99" => :catalina - sha256 "55f68a02463998b22e267af3089f00adfc3964b49d4c5f24dece2d1b08a92d99" => :mojave - sha256 "55f68a02463998b22e267af3089f00adfc3964b49d4c5f24dece2d1b08a92d99" => :high_sierra - end - - depends_on "python@3.8" - - def install - man1.install gzip("scons-time.1", "scons.1", "sconsign.1") - system Formula["python@3.8"].opt_bin/"python3", "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" - - bin.find { |f| rewrite_shebang detected_python_shebang, f } - # 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 4b1f30321cf83..0000000000000 --- a/Formula/scour.rb +++ /dev/null @@ -1,34 +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" - license "Apache-2.0" - revision 3 - head "https://github.com/scour-project/scour.git" - - bottle do - cellar :any_skip_relocation - sha256 "03bac92a88319ff21d807b0d7438284b299262003b592987b38dda5a49389e48" => :catalina - sha256 "927a6beeb623f29806e592eed6e2e3ee99861bc946bc24d5fd711dab50c29d15" => :mojave - sha256 "4c5956feecd0b017e5165a4602d3d42ef4403141f35280fd1e4a0bc2369b69ea" => :high_sierra - end - - depends_on "python@3.8" - - 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 18ff8383bdaf1..0000000000000 --- a/Formula/scrcpy.rb +++ /dev/null @@ -1,85 +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.14.tar.gz" - sha256 "45353b6e6cf1efbc8aadf2a51103242460562f6a55c6772037f492716b3fca07" - license "Apache-2.0" - revision 1 - - bottle do - sha256 "cd68e22dbb71217ef2b2cfcb36c1805ee9c5e9502e0b8ec9401d12b620b5237f" => :catalina - sha256 "e238570d316bf7b7cd644020320bd0cb548fd312a8a551567009ac870e7c8cb2" => :mojave - sha256 "f89663e0942ec853ce720aaa3408a973aa5f14c4e858a869b9395728998bd0b7" => :high_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.14/scrcpy-server-v1.14" - sha256 "1d1b18a2b80e956771fd63b99b414d2d028713a8f12ddfa5a369709ad4295620" - end - - def install - r = resource("prebuilt-server") - r.fetch - cp r.cached_download, buildpath/"prebuilt-server.jar" - - mkdir "build" do - system "meson", *std_meson_args, - "--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 3aad88c3315e5..0000000000000 --- a/Formula/screen.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Screen < Formula - desc "Terminal multiplexer with VT100/ANSI terminal emulation" - homepage "https://www.gnu.org/software/screen" - license "GPL-3.0" - - stable do - url "https://ftp.gnu.org/gnu/screen/screen-4.8.0.tar.gz" - mirror "https://ftpmirror.gnu.org/screen/screen-4.8.0.tar.gz" - sha256 "6e11b13d8489925fde25dfb0935bf6ed71f9eb47eff233a181e078fde5655aa1" - - # 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 "f3787a0e1c889106ab14d89c4f1bed001716ce1eb79e44e56b20e71b7448e172" => :catalina - sha256 "30dfe7b1bc6c74d64be57224852e50ebd5d4c6d4939872eaceac5f06d9935208" => :mojave - sha256 "1e63b4fd4ae798111980a7d9ed47c3fcb867cbad2c4253164b55722efc65d53e" => :high_sierra - end - - head do - url "https://git.savannah.gnu.org/git/screen.git" - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - uses_from_macos "ncurses" - - 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 056ea0fa83f44..0000000000000 --- a/Formula/screenfetch.rb +++ /dev/null @@ -1,19 +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.9.1.tar.gz" - sha256 "aa97dcd2a8576ae18de6c16c19744aae1573a3da7541af4b98a91930a30a3178" - license "GPL-3.0" - head "https://github.com/KittyKatt/screenFetch.git", :shallow => false - - bottle :unneeded - - 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 9738ccf015cfa..0000000000000 --- a/Formula/screenresolution.rb +++ /dev/null @@ -1,27 +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 "53636977689925be4ef97933dc0f1b411f0cd82f71a268cfe7c6f90d5a294f97" => :catalina - 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 3239b269a1c1d..0000000000000 --- a/Formula/scriptcs.rb +++ /dev/null @@ -1,36 +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 "c14c80f7b24ac5f2c14119ec2f371416ae07b9fba8bd9b0eb90d57ef5104f765" => :catalina - 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 b1de60d7d288d..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 2 - - bottle do - sha256 "9bd348638b9e3492db3549c7ac0756975ca2c57303ec58685bb3e6694fff1dd1" => :catalina - sha256 "0d7cbee6e25a46848d7c387ba07c4ee110ae2256953d2e5addd26f68e21c645d" => :mojave - sha256 "efa4637b9d1b3942192dca6fb4602ef72ec6b285ba424c087d290c8feb5e2c5b" => :high_sierra - end - - depends_on "docbook" - depends_on "gettext" - - uses_from_macos "libxslt" - uses_from_macos "perl" - - 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 05c638977d58d..0000000000000 --- a/Formula/scrub.rb +++ /dev/null @@ -1,43 +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://deb.debian.org/debian/pool/main/s/scrub/scrub_2.6.1.orig.tar.gz" - sha256 "43d98d3795bc2de7920efe81ef2c5de4e9ed1f903c35c939a7d65adc416d6cb8" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "01146146976c9be7bf2b74b018e7b98a158407f7318ffe604bee4603270e6f4f" => :catalina - 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 5256744889cd4..0000000000000 --- a/Formula/scrypt.rb +++ /dev/null @@ -1,48 +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.3.0.tgz" - sha256 "263034edd4d1e117d4051d9a9260c74dedb0efaf4491c5152b738978b3f32748" - - bottle do - cellar :any - sha256 "a683e2b6a8432d2489594a4f18dfb61704fdba3dc33fb8ae54ca169cee6124ee" => :catalina - sha256 "3d8a2f79a7d04355d6c646e3b70def1159dbef4974b5783a67af6afea2d3d2e6" => :mojave - sha256 "9a39b3a69169a7e199ee174d7b643eb07e0a7da152508ef49606d59e13cc9f3d" => :high_sierra - sha256 "61c6a47372b1da0735a45af1e93abe8530e22b8f469ef5c4dbed836194e6b228" => :sierra - end - - head do - url "https://github.com/Tarsnap/scrypt.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "openssl@1.1" - - 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/scs.rb b/Formula/scs.rb deleted file mode 100644 index 38fea9b0adbdf..0000000000000 --- a/Formula/scs.rb +++ /dev/null @@ -1,44 +0,0 @@ -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/2.1.1.tar.gz" - sha256 "0e20b91e8caf744b84aa985ba4e98cc7235ee33612b2bad2bf31ea5ad4e07d93" - license "MIT" - - bottle do - cellar :any - sha256 "75459dcf470d2685ee0d27ce63e4bf39367a6e8ab12478379cf77cf0455dcab7" => :catalina - sha256 "790a8b317c31bed14703a624c2c10ac21d6b5a79e49a9602cf17d4fcfda0206a" => :mojave - sha256 "972212da980f70df69900f0af8115022cf12eb1dbad0c74a2c65b83b9c22daba" => :high_sierra - sha256 "9c4f346e1a76e4951c6eb12324e40f08a3b52671872401091d01e456d715455f" => :sierra - end - - def install - system "make", "install", "PREFIX=#{prefix}" - pkgshare.install "test/data/small_random_socp" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - int main() { - ScsData *data; ScsCone *cone; - const int status = scs_read_data("#{pkgshare}/small_random_socp", - &data, &cone); - ScsSolution *solution = scs_calloc(1, sizeof(ScsSolution)); - ScsInfo info; - const int result = scs(data, cone, solution, &info); - scs_free_data(data, cone); scs_free_sol(solution); - return result - SCS_SOLVED; - } - EOS - 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/scummvm-tools.rb b/Formula/scummvm-tools.rb deleted file mode 100644 index 1bd2e6daf7d0e..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.1.0/scummvm-tools-2.1.0.tar.xz" - sha256 "cfc62d285d0e304061db72691cdfb8ce4ead868cffb2658b1f1c81934f404665" - head "https://github.com/scummvm/scummvm-tools.git" - - bottle do - cellar :any - sha256 "821010b2b6e9756d7207a5dd61cdac53c82b780ca9a17a8ae313f82501cfa5fb" => :catalina - sha256 "47718a761f38f31677a6a02851be2b42e16fb891bdb02df704f32d8b84e93796" => :mojave - sha256 "9f5a6820cf016444c995abd59119e7446b5b9342298b97b9767efbd8938a2579" => :high_sierra - 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 5a1982f592a42..0000000000000 --- a/Formula/scummvm.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Scummvm < Formula - desc "Graphic adventure game interpreter" - homepage "https://www.scummvm.org/" - url "https://www.scummvm.org/frs/scummvm/2.1.2/scummvm-2.1.2.tar.xz" - sha256 "c4c16c9b8650c3d512b7254551bbab0d47cd3ef4eac6983ab6d882e76cf88eb0" - head "https://github.com/scummvm/scummvm.git" - - bottle do - rebuild 1 - sha256 "2d1de2f1efde7505ec7b06a2dfd90e287d6d816d5082f7a89ae2f44c6c25b9d8" => :catalina - sha256 "5b28e8e3d52ce3b1d9a0a172483090a8926c4f9244915b6af5a38b3c02c1eca8" => :mojave - sha256 "a31b470f92fa3f75ce56c01c45c4c6c09960b001e6b96e90149e58932e3c4bee" => :high_sierra - end - - depends_on "a52dec" - depends_on "faad2" - depends_on "flac" - depends_on "fluid-synth" - depends_on "freetype" - depends_on "jpeg-turbo" - depends_on "libmpeg2" - depends_on "libpng" - depends_on "libvorbis" - depends_on "mad" - depends_on "sdl2" - depends_on "theora" - - # Support fluid-synth 2.1 - patch do - url "https://sources.debian.org/data/main/s/scummvm/2.1.2+dfsg1-1/debian/patches/git_fluidsynth_update.patch" - sha256 "4e03d4b685bf38c2367bb669867175bd4b84039a678613bf6e32a34591b382c6" - end - - def install - system "./configure", "--prefix=#{prefix}", - "--enable-release", - "--with-sdl-prefix=#{Formula["sdl2"].opt_prefix}" - 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 38d2dd8ca4be5..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.20.tar.gz" - sha256 "4c50725be7bebdab17b8ef77acd230525e773631fef4051979f8ff91c86bebf8" - head "https://github.com/scaleway/scaleway-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "1534981c7a030117408095b219d79614333acbb4ead6ecf4b11625acf7b186c7" => :catalina - sha256 "1c7a69355bafd8c035bb2878f6c9c7a9a013dacc8cdbdc1997b66bc49f7fd7f0" => :mojave - sha256 "87a2f754ab3e1c5434a2b24b855de6e5da39990bf9cf558416fc2e259d66d0ab" => :high_sierra - sha256 "b5727720c3f4173012c81b8dfee1a942262d430ae6951c0f39a9c28aefc21b83" => :sierra - 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/scws.rb b/Formula/scws.rb deleted file mode 100644 index d14d97b7d810c..0000000000000 --- a/Formula/scws.rb +++ /dev/null @@ -1,27 +0,0 @@ -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" - - bottle do - cellar :any - sha256 "4dedb954c6d17b1cc42d41a978e41a897110e042bbd6099f82bdbd0ff86b7aad" => :catalina - sha256 "feb648d3c6c98b2e693086371dae419f88b56b6d58e5ede76ffa882a6f9be4b6" => :mojave - sha256 "94977ce56fa0c3c9d2fb21fe52067b49be65247b41d723893ac8c91f0e2dbbf3" => :high_sierra - sha256 "81e6665fd65aae5e35c3e0b3f9f80bdaaf8ac787dfe6fe9e8454a8cb5cbcba02" => :sierra - 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/sd.rb b/Formula/sd.rb deleted file mode 100644 index d702dfb572ca7..0000000000000 --- a/Formula/sd.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Sd < Formula - desc "Intuitive find & replace CLI" - homepage "https://github.com/chmln/sd" - url "https://github.com/chmln/sd/archive/v0.7.5.tar.gz" - sha256 "f4731fd6bd992eed06ed9326cdef22093605ff97df1dd856e31c5015f0720c66" - license "MIT" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "cc2d08fca64a765bc5df67fc69b23f4afa3350c0851fabd06d4e3b218c456bb2" => :catalina - sha256 "6496955ab15f26f18111214c0b97c24143f752aa4b222b6c54b15e24c5ee1462" => :mojave - sha256 "0cdf79c329703411f1e67a4ff85fd58f10bd6de5293c1a5b7983c56b3defd7a4" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - - # 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/sd-*/out"].first - man1.install "#{out_dir}/sd.1" - bash_completion.install "#{out_dir}/sd.bash" - zsh_completion.install "#{out_dir}/_sd" - end - - test do - assert_equal "after", pipe_output("#{bin}/sd before after", "before") - end -end diff --git a/Formula/sdb.rb b/Formula/sdb.rb deleted file mode 100644 index 0e3894b6c349e..0000000000000 --- a/Formula/sdb.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Sdb < Formula - desc "Ondisk/memory hashtable based on CDB" - homepage "https://github.com/radare/sdb" - url "https://github.com/radareorg/sdb/archive/1.5.0.tar.gz" - sha256 "af15354b9bc4ded881513f0f95009cc659f5d1dc4e4fa883f407729075a512ce" - license "MIT" - head "https://github.com/radare/sdb.git" - - bottle do - cellar :any - sha256 "04aa601e84f7f4d95e17ca2675564d4d3027e9736e57d4db85461c7a843ea025" => :catalina - sha256 "8b110c8f73ccbae52f0e600fb3b67bef8088c541710fbe690b0548e4c2f09703" => :mojave - sha256 "baa2ae3e71b94ba5241956188b631ece503344129f41a407268bafd82a9b009d" => :high_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 ba051b029b6ce..0000000000000 --- a/Formula/sdcc.rb +++ /dev/null @@ -1,30 +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/4.0.0/sdcc-src-4.0.0.tar.bz2" - sha256 "489180806fc20a3911ba4cf5ccaf1875b68910d7aed3f401bbd0695b0bef4e10" - license "GPL-2.0" - head "https://svn.code.sf.net/p/sdcc/code/trunk/sdcc" - - bottle do - sha256 "876e548b2a8c31c2d45d753b59e528c82101d193398d8c158270849fe9703ece" => :catalina - sha256 "214547215aa0b7598ecfd80cd291bbc64bd8b2d95c867fca9653e5d0aef042d6" => :mojave - sha256 "1f2423cb4c4f66c34b8a68f9c7a967c4256ca438646260dbf50e7f4c0b5f8f59" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - 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 8661d0a7e0087..0000000000000 --- a/Formula/sdcv.rb +++ /dev/null @@ -1,35 +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" - license "GPL-2.0" - revision 2 - version_scheme 1 - head "https://github.com/Dushistov/sdcv.git" - - bottle do - sha256 "88e35b34c8965ea668da4aeb0e96e90c6e1c8a400e8c119936ebb5180c0afce3" => :catalina - sha256 "d40dc4d63326ca5268f5b1d75a8a64ecc0081fe6e35d6279ee937774b39cfb33" => :mojave - sha256 "322ec61f8ae7914f8a8f5da7fac01ef0ee69aa9f9844e1c876168f9fdf54887a" => :high_sierra - sha256 "e0aa6779b49ae274e5a9da62a12caceaf2149b587d96ce051bd5c7d735c81fa4" => :sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "readline" - - 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 4dbf8bb17f923..0000000000000 --- a/Formula/sdedit.rb +++ /dev/null @@ -1,27 +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.2/sdedit-4.2.1.jar" - sha256 "270af857e6d2823ce0c18dee47e1e78ef7bc90c7e8afeda36114d364e0f4441c" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "sdedit-#{version}.jar" - (bin/"sdedit").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/sdedit-#{version}.jar" "$@" - EOS - 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" - end -end diff --git a/Formula/sdf.rb b/Formula/sdf.rb deleted file mode 100644 index cbb25c9e75376..0000000000000 --- a/Formula/sdf.rb +++ /dev/null @@ -1,212 +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 2 - sha256 "fe35832ac1cd23d4a30259ed3e2745543ee7641cf3cb774c092916acb135558f" => :catalina - sha256 "bb23a4a58c726d8e86346151dd3f59bfd9185585dcaffcebfa73882abc6bd3ca" => :mojave - sha256 "e4229bab3c8cfda42089e5371aef014a0fea214be9b7c8a99537077268fec106" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "aterm" - - 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 7f134fe9635e6..0000000000000 --- a/Formula/sdhash.rb +++ /dev/null @@ -1,34 +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 2 - - bottle do - cellar :any - sha256 "2b9a824cc177fe984f61eb756447e77f947b993317c6c5909fc5e56f52d7ab5f" => :catalina - sha256 "ff3ebba92126bd9ac537d4c6b7b0e818ca1318eb41fe410d9cbbbf7efde68ac2" => :mojave - sha256 "81064cc409fb71b361a4be539ccf8d014dc5adf0186d666d00025d2109ff5168" => :high_sierra - sha256 "3d019e14266847dcfa7fa27f69ffa4aea25cc78a2ff62c1883a2a8c74fa02116" => :sierra - end - - depends_on "openssl@1.1" - - 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 c4c9c693ee920..0000000000000 --- a/Formula/sdl.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Sdl < Formula - desc "Low-level access to audio, keyboard, mouse, joystick and graphics" - homepage "https://www.libsdl.org/" - revision 1 - - stable do - url "https://www.libsdl.org/release/SDL-1.2.15.tar.gz" - sha256 "d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00" - # 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 - - # Fix mouse cursor transparency on 10.13, https://bugzilla.libsdl.org/show_bug.cgi?id=4076 - if MacOS.version == :high_sierra - patch do - url "https://bugzilla-attachments.libsdl.org/attachment.cgi?id=3721" - sha256 "954875a277d9246bcc444b4e067e75c29b7d3f3d2ace5318a6aab7d7a502f740" - end - end - end - - bottle do - cellar :any - rebuild 1 - sha256 "98b91b216ee0a29425796e5ece1062b4d57535dd83c68d8ffd23dafd9ca102d3" => :catalina - sha256 "b19b93f980a305d7e18b3f3d59b0679e4f91c11dd51334725cc9244a74a2e177" => :mojave - sha256 "2580e605dc4d53ea5d321c8cf8451a16630199a01bdcb7c7e0b8f39bfd6ed068" => :high_sierra - 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 - - 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] - 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 d5888071044c1..0000000000000 --- a/Formula/sdl2.rb +++ /dev/null @@ -1,50 +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.12.tar.gz" - sha256 "349268f695c02efbc9b9148a70b85e58cefbbf704abd3e91be654db7f1e2c863" - revision 1 - - bottle do - cellar :any - sha256 "4dcd635465d16372ca7a7bb2b94221aa21de02f681a22e9239d095b66fb00c63" => :catalina - sha256 "8733b127dd4ba6179e6ad9e6336418df9dbad8eb13f05597c05e6916f2ff0543" => :mojave - sha256 "b71346aebd499ed30f6de2f58a333c50575bc3bf73fbba6dcaef5a04c58282c5" => :high_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 - - on_linux do - depends_on "pkg-config" => :build - end - - # Fix library extension in CMake config file. - # https://bugzilla.libsdl.org/show_bug.cgi?id=5039 - patch do - url "https://bugzilla.libsdl.org/attachment.cgi?id=4263" - sha256 "07ea066e805f82d85e6472e767ba75d265cb262053901ac9a9e22c5f8ff187a5" - 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? - - args = %W[--prefix=#{prefix} --without-x] - 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 a441112625187..0000000000000 --- a/Formula/sdl2_gfx.rb +++ /dev/null @@ -1,38 +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 "9db41c0f2fd4897456594769a4a549b5261c3027dde8fc6da7160faf7db0a539" => :catalina - 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 8faa1f93521d5..0000000000000 --- a/Formula/sdl2_image.rb +++ /dev/null @@ -1,49 +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.5.tar.gz" - sha256 "bdd5f6e026682f7d7e1be0b6051b209da2f402a2dd8bd1c4bd9c25ad263108d0" - - bottle do - cellar :any - sha256 "691d5407fef2bc374ac3b7c2fafbe46a6bc0f9ed609f98812b24fec33ab9bd27" => :catalina - sha256 "1b3a464579d9ef25b3bdd9276119efffd0134fda5c5dc27051a35f1b21c00cfd" => :mojave - sha256 "55c1f996fb523c2727d2b103f0a5ecfd7a073f55ff9a7230bb609d22bbf5a576" => :high_sierra - sha256 "e3c9cf45d97099e818c667d23af8352e6d1bba0e3b609cdddee654f2a9da80cf" => :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 f31e7db274405..0000000000000 --- a/Formula/sdl2_mixer.rb +++ /dev/null @@ -1,60 +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 "419d988dc795842301df16d2e57f7759417708b0d61466fea7ec1685db77bf1d" => :catalina - 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 3502bee205bfe..0000000000000 --- a/Formula/sdl2_net.rb +++ /dev/null @@ -1,44 +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 "920e892ba80cba3a99d4a15473351be5dc23f0d9445c28480c5dae904e8a8271" => :catalina - 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 c8b41eaa3e8fc..0000000000000 --- a/Formula/sdl2_ttf.rb +++ /dev/null @@ -1,42 +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.15.tar.gz" - sha256 "a9eceb1ad88c1f1545cd7bd28e7cbc0b2c14191d40238f531a15b01b1b22cd33" - head "https://hg.libsdl.org/SDL_ttf", :using => :hg - - bottle do - cellar :any - rebuild 1 - sha256 "413959be382ea92bd59af9a29e5909d40db69c571447e2f0dec821cbff612d80" => :catalina - sha256 "74582129be8cfea5e556efa95411f9fc2eebf111c7b4f9affc80a7e05fa19cd9" => :mojave - sha256 "1867ff73485eaa12fc00def01be8e388443ac6c226065218bb435558fdb8bb22" => :high_sierra - 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 45a34cc66bd68..0000000000000 --- a/Formula/sdl_gfx.rb +++ /dev/null @@ -1,24 +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 "f06bf72be3f614ed944157f9e3fc0a13395ca4136eed4e1400762d791c576ad2" => :catalina - 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 835e91775b4bf..0000000000000 --- a/Formula/sdl_image.rb +++ /dev/null @@ -1,46 +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 "af782fa2905042005df213106578123c7fd1d6d3111af8bd16e1ec63e273bb8d" => :catalina - 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 4c395567e7a47..0000000000000 --- a/Formula/sdl_mixer.rb +++ /dev/null @@ -1,55 +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 "a2555ba3d81dd01637f6407db77cd7cc5ed363fd887627d786d3475e79e960a0" => :catalina - 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" - Utils.safe_popen_read({ "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 bc929558e1ed3..0000000000000 --- a/Formula/sdl_net.rb +++ /dev/null @@ -1,26 +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 "4c4cf23a69b5bc903e23e919a87ab1c02ed2e65580b8071ea7fe4d40fdb6de55" => :catalina - 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 348880ff3cc5a..0000000000000 --- a/Formula/sdl_rtf.rb +++ /dev/null @@ -1,25 +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 "ee09de7e32f0992acce56ab546fb0201d7b3903a51243548b590378cccc7e6f5" => :catalina - 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 7518ba3c5605c..0000000000000 --- a/Formula/sdl_sound.rb +++ /dev/null @@ -1,45 +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://deb.debian.org/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 "b8ac8b382c94d4a92032a8bc9c93d777fac1367851bd3df382089f747c347f05" => :catalina - 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 65040905e2e4c..0000000000000 --- a/Formula/sdl_ttf.rb +++ /dev/null @@ -1,38 +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 "66d8be19ddde69b3b260b50e23a4a9f63d22c3343f3d2be530a062b6e00bf690" => :catalina - 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 3013babe06709..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.20.tar.gz" - sha256 "dbb75398dee2224bcee648602ad23e469b936a2b7ea962a8a01b091b989f25b6" - - bottle do - cellar :any - sha256 "54fd6bcb8f351a98cd38017bb3c2a6df7a607dbd13b32cbd2162ab168a2a7759" => :catalina - sha256 "136ad2e3a3dfb37fa6e998ebcada2b35f1a41b8b31b4ac404038388bd2d6902b" => :mojave - sha256 "40e3329a4043ea4da4e71ccfbea3c9f710e9fed5d61e1d91a5390f7505f6c5f5" => :high_sierra - 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/seal.rb b/Formula/seal.rb deleted file mode 100644 index 6aa1ec3f2c88b..0000000000000 --- a/Formula/seal.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Seal < Formula - desc "Easy-to-use homomorphic encryption library" - homepage "https://github.com/microsoft/SEAL" - url "https://github.com/microsoft/SEAL/archive/v3.5.5.tar.gz" - sha256 "ae987c9df02a0a887eeb96032f307781b945183d3433e54a0a6d59207f4b8143" - license "MIT" - - bottle do - cellar :any - sha256 "12adc544597410eae07005a732a62674239d8e077c5b008a25236f88f51e19ff" => :catalina - sha256 "b08f8c23b71294bab6e3fd5ee47287e206fd9fd40a9f118c7a4841a3d05091c3" => :mojave - sha256 "209febb2b7bab29322a3945f660a1b6f4689fc28e3f09aa0db3e3f43b2f24ba3" => :high_sierra - end - - depends_on "cmake" => [:build, :test] - - def install - system "cmake", "-DBUILD_SHARED_LIBS=ON", ".", *std_cmake_args - system "make" - system "make", "install" - 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 <<~EOS - 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_ckks_basics.cpp - 5_rotation.cpp - 6_serialization.cpp - 7_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) - EOS - - system "cmake", "examples" - system "make" - # test examples 1-5 and exit - input = "1\n2\n3\n4\n5\n0\n" - assert_match "Correct", pipe_output("bin/sealexamples", input) - end -end diff --git a/Formula/sec.rb b/Formula/sec.rb deleted file mode 100644 index a10fa830adf19..0000000000000 --- a/Formula/sec.rb +++ /dev/null @@ -1,18 +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.3/sec-2.8.3.tar.gz" - sha256 "b376b64ed5be19b28101d974ac4d60c06a1f52cc3d8ba63829a18a6f903dfd29" - license "GPL-2.0" - - 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 5b8bb28b3332d..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.git", - :tag => "0.11.1", - :revision => "dfeebf8406871d020848edde668234715356158c" - head "https://github.com/netheril96/securefs.git" - - bottle do - cellar :any - sha256 "8a8c7dd74f9b3082b2b128cc058714a27206d910273e4148959a25b7d30c51b5" => :catalina - sha256 "9bee23af87518f68df56b862ad0ef88f842ebe65f8feff02e90bf5ab8e91522e" => :mojave - sha256 "632496d8e9ed9fe91d18e9a2c9fef49c920dc091e10108246f8ab2056f75ea38" => :high_sierra - 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 b35f45faa9f9e..0000000000000 --- a/Formula/seexpr.rb +++ /dev/null @@ -1,60 +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/v3.0.1.tar.gz" - sha256 "1e4cd35e6d63bd3443e1bffe723dbae91334c2c94a84cc590ea8f1886f96f84e" - - bottle do - cellar :any - sha256 "2a55400ad86255b300843f7cde1dbed4130d0ba26ffc4c8725fec83b50e7f9e3" => :catalina - sha256 "e5ba2fcca24837fc43d11524fdeff04d9f4429f6c66421dec6c1925b60893f82" => :mojave - sha256 "b5a3d64c08f692d25d3eb12dd9409c414939303b0b9f19396c95a13d07b46fa9" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "libpng" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DUSE_PYTHON=FALSE" - system "make", "doc" - system "make", "install" - end - end - - test do - assert_equal shell_output("#{bin}/asciigraph2"), <<~EOS - | - | - | - | - ### - # |# - ## |## - # | # - ## | ## - # | # - ## | ## - # | # - # | ## - #### # | # #### - #######-----##--###-----#-----|----##-----##--###-----###### - ###### ## # | # # ###### - ## ## | ## ## - ### | ### - | - | - | - | - | - | - | - | - | - | - | - | - EOS - end -end diff --git a/Formula/selecta.rb b/Formula/selecta.rb deleted file mode 100644 index ecc54d35e7343..0000000000000 --- a/Formula/selecta.rb +++ /dev/null @@ -1,17 +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" - license "MIT" - - bottle :unneeded - - 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 37f71dddd0039..0000000000000 --- a/Formula/selenium-server-standalone.rb +++ /dev/null @@ -1,64 +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" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "selenium-server-standalone-#{version}.jar" - (bin/"selenium-server").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/selenium-server-standalone-#{version}.jar" "$@" - EOS - 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 - port = free_port - fork { exec "#{bin}/selenium-server -port #{port}" } - sleep 3 - output = shell_output("curl --silent localhost:#{port}/wd/hub/status") - output = JSON.parse(output) - - assert_equal 0, output["status"] - assert_true output["value"]["ready"] - assert_equal version, output["value"]["build"]["version"] - end -end diff --git a/Formula/semgrep.rb b/Formula/semgrep.rb deleted file mode 100644 index 562151a2f0275..0000000000000 --- a/Formula/semgrep.rb +++ /dev/null @@ -1,130 +0,0 @@ -class Semgrep < Formula - include Language::Python::Virtualenv - - desc "Easily detect and prevent bugs and anti-patterns in your codebase" - homepage "https://semgrep.live/" - url "https://github.com/returntocorp/semgrep.git", - :tag => "v0.14.0", - :revision => "49b51d93666fcd481e52f79b1e6ea3921ea6775b" - license "LGPL-2.1" - head "https://github.com/returntocorp/semgrep.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "7fc9bcc5879162094e4f5aed0054ef9133bd16cb2fa8491d0af2135b5c26c6ae" => :catalina - sha256 "b2fb16a77b736cb6f8b011aabc8403d1a16002c9a6c70f7e80b326558b4af514" => :mojave - sha256 "f6b0ed8596f5f1a0699b19141500304e13501675524a5210fef52f947260a4c7" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "coreutils"=> :build - depends_on "ocaml" => :build - depends_on "opam" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/3d/d9/ea9816aea31beeadccd03f1f8b625ecf8f645bd66744484d162d84803ce5/PyYAML-5.3.tar.gz" - sha256 "e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz" - sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/16/8b/54a26c1031595e5edd0e616028b922d78d8ffba8bc775f0a4faeada846cc/ruamel.yaml-0.16.10.tar.gz" - sha256 "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954" - end - - resource "ruamel.yaml.clib" do - url "https://files.pythonhosted.org/packages/92/28/612085de3fae9f82d62d80255d9f4cf05b1b341db1e180adcf28c1bf748d/ruamel.yaml.clib-0.2.0.tar.gz" - sha256 "b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c" - end - - resource "tqdm" do - url "https://files.pythonhosted.org/packages/a9/03/df1d77e852dd697c0ff7b7b1b9888739517e5f97dfbd2cf7ebd13234084c/tqdm-4.46.1.tar.gz" - sha256 "cd140979c2bebd2311dfb14781d8f19bd5a9debb92dcab9f6ef899c987fcf71f" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/55/fd/fc1aca9cf51ed2f2c11748fa797370027babd82f87829c7a8e6dbe720145/packaging-20.4.tar.gz" - sha256 "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/a2/56/0404c03c83cfcca229071d3c921d7d79ed385060bbe969fde3fd8f774ebd/pyparsing-2.4.6.tar.gz" - sha256 "4c830582a84fb022400b85429791bc551f1f4871c33f23e44f353119e92f969f" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - def install - ENV.deparallelize - Dir.mktmpdir("opamroot") do |opamroot| - ENV["OPAMROOT"] = opamroot - ENV["OPAMYES"] = "1" - system "opam", "init", "--no-setup", "--disable-sandboxing" - ENV.deparallelize { system "opam", "switch", "create", "ocaml-base-compiler.4.10.0" } - system "opam", "install", "./pfff" - cd "semgrep-core" do - system "opam", "install", "--deps-only", "-y", "." - system "opam", "exec", "--", "make", "all" - system "opam", "exec", "--", "make", "install" - bin.install "_build/default/bin/Main.exe" => "semgrep-core" - end - end - - python_path = "semgrep" - cd python_path do - venv = virtualenv_create(libexec, Formula["python@3.8"].bin/"python3.8") - venv.pip_install resources - venv.pip_install_and_link buildpath/python_path - end - end - - test do - system "#{bin}/semgrep", "--help" - (testpath/"script.py").write <<~EOS - def silly_eq(a, b): - return a + b == a + b - EOS - - output = shell_output("#{bin}/semgrep script.py -l python -e '$X == $X'") - assert_match "a + b == a + b", output - end -end diff --git a/Formula/semtag.rb b/Formula/semtag.rb deleted file mode 100644 index 1982ae14c5784..0000000000000 --- a/Formula/semtag.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Semtag < Formula - desc "Semantic tagging script for git" - homepage "https://github.com/pnikosis/semtag" - url "https://github.com/pnikosis/semtag/archive/v0.1.0.tar.gz" - sha256 "9e16a418b795363a9283318e5dc02da8a67ec96adaac0ae8eb23f1b21b06666f" - - bottle :unneeded - - 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/sendemail.rb b/Formula/sendemail.rb deleted file mode 100644 index f73a6270d9b7b..0000000000000 --- a/Formula/sendemail.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Sendemail < Formula - desc "Email program for sending SMTP mail" - # Alternate: https://freshmeat.sourceforge.io/projects/sendemail/ - homepage "https://web.archive.org/web/20191013154932/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: 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-#{Regexp.escape(version)}/, `#{bin}/sendemail`.strip - end -end diff --git a/Formula/sentencepiece.rb b/Formula/sentencepiece.rb deleted file mode 100644 index 2e65c25846186..0000000000000 --- a/Formula/sentencepiece.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Sentencepiece < Formula - desc "Unsupervised text tokenizer and detokenizer" - homepage "https://github.com/google/sentencepiece" - url "https://github.com/google/sentencepiece/archive/v0.1.92.tar.gz" - sha256 "6e9863851e6277862083518cc9f96211f334215d596fc8c65e074d564baeef0c" - license "Apache-2.0" - head "https://github.com/google/sentencepiece.git" - - bottle do - sha256 "c169b40d2a856514440b4fdfa7f461b9f1b2bc8c7d5e6603c3e42e8e62f90c0f" => :catalina - sha256 "c144cb6375e447c1aee9616ab22250830892aa7bfdf230b3edc0c0a41a0bfa96" => :mojave - sha256 "eb919fd4dc87993b2f4b6f8a58683831a7c2fb0f3abbcdf4a320f8bf761cdb8e" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "make", "install" - end - 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/seqtk.rb b/Formula/seqtk.rb deleted file mode 100644 index d8ff4e2b594c3..0000000000000 --- a/Formula/seqtk.rb +++ /dev/null @@ -1,32 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "5abbf374f3dab69b198b98a3126f521b64baf01ac5ed69b99be91ffd97f891f8" => :catalina - sha256 "b695a43103700d7d0d4a07d50d8effec280f7d7a781ff518a42dec2bef44801e" => :mojave - sha256 "4f377caf93e5d334e739375a5dcf06782f1d85516988a26df3f8f53d172b1e6f" => :high_sierra - sha256 "fd3ecced5ba8f5a9eab13f8f2184f6a69d08b58c1ef53ad6e74bb45cab9324f4" => :sierra - sha256 "55541e7e9249ef15bd4423ad9a45903918c2b4b54f632bc0472fb24aee683701" => :el_capitan - 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/ser2net.rb b/Formula/ser2net.rb deleted file mode 100644 index 3641c062f217c..0000000000000 --- a/Formula/ser2net.rb +++ /dev/null @@ -1,86 +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-4.2.0.tar.gz" - sha256 "1d895f005896e8c5bcff4fe573e2fec3611bf4feee1247857e476b74323d916c" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "1f7cee8eefe4625bd2c75f48f3b1386dd61379b6b81b21b57c1792b0a246a8f1" => :catalina - sha256 "f8a9cc43919eeae9ebbbfc91a5b463f2f95fe0f312724cc1555038a4ef423f93" => :mojave - sha256 "32df43b370d1da50357d2890c65f57c228a9352272b2ca462728183801db917f" => :high_sierra - end - - depends_on "libyaml" - depends_on :macos => :sierra # needs clock_gettime - - resource "gensio" do - url "https://downloads.sourceforge.net/project/ser2net/ser2net/gensio-2.1.1.tar.gz" - sha256 "e81df2c55d8830ac4f3c28eda54c3f690c4b62e186ea3879815b101a4902a703" - - # Pull request submitted upstream as https://github.com/cminyard/gensio/pull/19 - patch do - url "https://github.com/cminyard/gensio/pull/19.patch?full_index=1" - sha256 "2513ebcaf0395e59d846834eb59a5f0bacc077a0070bf9d1239ad223f16e6735" - end - end - - def install - resource("gensio").stage do - system "./configure", "--with-python=no", - "--disable-dependency-tracking", - "--prefix=#{libexec}/gensio" - system "make", "install" - end - - ENV.append_path "PKG_CONFIG_PATH", "#{libexec}/gensio/lib/pkgconfig" - ENV.append_path "CFLAGS", "-I#{libexec}/gensio/include" - ENV.append_path "LDFLAGS", "-L#{libexec}/gensio/lib" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" - - 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 - - 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 f5002035b2eac..0000000000000 --- a/Formula/serd.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Serd < Formula - desc "C library for RDF syntax" - homepage "https://drobilla.net/software/serd/" - url "https://download.drobilla.net/serd-0.30.4.tar.bz2" - sha256 "0c95616a6587bee5e728e026190f4acd5ab6e2400e8890d5c2a93031eab01999" - license "ISC" - - bottle do - cellar :any - sha256 "3361f452fbde6a02d8dfe77fdd53c6c5ff99e0bcb9df4504526674641cc4b24e" => :catalina - sha256 "e511ee4c7bb634cef312c139535c537aaafd70bbf2c62900a2b2950901f9eebf" => :mojave - sha256 "6d5a775d35f00fca2fb98c9177616322e3a868204c2c3f93614102e5ece3237f" => :high_sierra - end - - depends_on "pkg-config" => :build - - def install - system "./waf", "configure", "--prefix=#{prefix}" - system "./waf" - system "./waf", "install" - end - - test do - pipe_output("serdi -", "() a .", 0) - end -end diff --git a/Formula/serf.rb b/Formula/serf.rb deleted file mode 100644 index ecb2dedf7ad4e..0000000000000 --- a/Formula/serf.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Serf < Formula - desc "Service orchestration and management tool" - homepage "https://serfdom.io/" - url "https://github.com/hashicorp/serf.git", - :tag => "v0.9.2", - :revision => "5642cc7572cebea332176ca3024bec4b3474a11a" - license "MPL-2.0" - head "https://github.com/hashicorp/serf.git" - - bottle do - cellar :any_skip_relocation - sha256 "3bd356983857810d36a2ea7c3ae785a93068a502c3c371ccbf9b5db5b43c7a77" => :catalina - sha256 "8fc8a0b90605b7f45e55bbd3334aeedf02feec63f1b1e6d0de0ce473ad575be2" => :mojave - sha256 "1b0dbf9abeb34aae2e0b1634f274d46b7bd95a166dfff360fe54599de68415c6" => :high_sierra - 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 - ENV["XC_ARCH"] = "amd64" - 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 - 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 diff --git a/Formula/serialosc.rb b/Formula/serialosc.rb deleted file mode 100644 index b33db19f52334..0000000000000 --- a/Formula/serialosc.rb +++ /dev/null @@ -1,30 +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 "694f87c372351b614a376a40f816018030241114063aab1a7a051958016dd435" => :catalina - 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 dae79d2194ff4..0000000000000 --- a/Formula/sersniff.rb +++ /dev/null @@ -1,31 +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" - license "GPL-2.0" - head "https://the.earth.li/git/sersniff.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "96f5d56b1d6c9acb8b465a1912fbd03f6837e0ffabf643200b40528ec7984358" => :catalina - 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/serve.rb b/Formula/serve.rb deleted file mode 100644 index 2ecb0d1a40838..0000000000000 --- a/Formula/serve.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Serve < Formula - desc "Static http server anywhere you need one" - homepage "https://github.com/syntaqx/serve" - url "https://github.com/syntaqx/serve/archive/v0.5.0.tar.gz" - sha256 "fab576aa29b14dcfc45ba6e0e7e6b5284a83e873b75992399b3f5ef8d415d6ae" - license "MIT" - head "https://github.com/syntaqx/serve.git" - - bottle do - cellar :any_skip_relocation - sha256 "b6358efb493acb673bf7513a252f9f48e9ebb2c6a7824208d89ae631cfad9439" => :catalina - sha256 "9521fba08dd7bcfd843464b3c12a4f841007f28052104072768e052c194de6aa" => :mojave - sha256 "0735a5f8002970bc5d1cb1ca68681713de9dfcffc7eeb30bcdcb7fc33bc58551" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-X main.version=#{version}", *std_go_args, "./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/serveit.rb b/Formula/serveit.rb deleted file mode 100644 index 195755d986320..0000000000000 --- a/Formula/serveit.rb +++ /dev/null @@ -1,25 +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.3.tar.gz" - sha256 "5bbefdca878aab4a8c8a0c874c02a0a033cf4321121c9e006cb333d9bd7b6d52" - license "MIT" - revision 1 - head "https://github.com/garybernhardt/serveit.git" - - bottle :unneeded - - def install - bin.install "serveit" - 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/serverless.rb b/Formula/serverless.rb deleted file mode 100644 index d8179557c52e5..0000000000000 --- a/Formula/serverless.rb +++ /dev/null @@ -1,39 +0,0 @@ -require "language/node" - -class Serverless < Formula - desc "Build applications with serverless architectures" - homepage "https://serverless.com/" - url "https://github.com/serverless/serverless/archive/v1.74.1.tar.gz" - sha256 "823a5c163c74fc8b4953a44110e9b2591f64d53cb56b69470db9e132811dd477" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "a913b1376246320ab7cf17dc15e0c6de5534e1baedf78345a5b6cb26e5b33d43" => :catalina - sha256 "28fbe12a792588c47479e897500011b60a2ec04b1b2fcc1f2860641968e6ed6a" => :mojave - sha256 "c47587d66949e0a511441c0d388ec9dc4a1804f7fea4963c22752e653644d641" => :high_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 - - system("#{bin}/serverless", "config", "credentials", "--provider", "aws", "--key", "aa", "--secret", "xx") - 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 2b093c738844b..0000000000000 --- a/Formula/servus.rb +++ /dev/null @@ -1,122 +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.2", - :revision => "170bd93dbdd6c0dd80cf4dfc5926590cc5cef5ab" - - bottle do - cellar :any - sha256 "e0629cca8bee46595c540c2240ed1cc599c5f676527a21f951bfc89a0335c54e" => :catalina - sha256 "65921c797c3a2bf7953cf692dee5852de3fd6c2b2466268221a9dfcb7eab960e" => :mojave - sha256 "763042d70e605154698d686554d26f6bab46f30200df8a8c3af9c40faeffca64" => :high_sierra - sha256 "bcfa24ee0545c044c32391ac72d54a5151de64170c777409163c0688cd9bf671" => :sierra - 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 72fc35b46fe98..0000000000000 --- a/Formula/setweblocthumb.rb +++ /dev/null @@ -1,27 +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 "6849eb0b22ee09260daa9432881f66dbb97ef44b26e1d469ca11d316658ee4f2" => :catalina - 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 73afc9bcf2d25..0000000000000 --- a/Formula/sf-pwgen.rb +++ /dev/null @@ -1,24 +0,0 @@ -class SfPwgen < Formula - desc "Generate passwords using SecurityFoundation framework" - homepage "https://github.com/anders/pwgen/" - url "https://github.com/anders/pwgen/archive/1.5.tar.gz" - sha256 "e1f1d575638f216c82c2d1e9b52181d1d43fd05e7169db1d6f9f5d8a2247b475" - head "https://github.com/anders/pwgen.git" - - bottle do - cellar :any_skip_relocation - sha256 "0fc934513e71330c48333b6e0698b39013d1b2aee57f93124c0c1bff2236475e" => :catalina - sha256 "50e87a417ac3d9b5be7318c7e2983db1a1f90759fab02a898f9cd257b15ac6e2" => :mojave - sha256 "2ebd137c58bd8d20a50251e159b6074e65009a265aa351cf6eb0afd39d59edc1" => :high_sierra - sha256 "01cf1ff26d304c0cbb0072130ba2476ddeebd8933040092b937ced1ede06c2a2" => :sierra - end - - 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 5f21cc2c06702..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.8.tar.gz" - sha256 "5154bfc67a5e99d95cb653d70d2b9d9293d3deb3c8f18b938a33d68fec488a6d" - - bottle do - sha256 "f78f5ccb5b6feb0e7530770d3411149e4335ead8a2bcd08e275cbe7748b3c396" => :catalina - sha256 "39a00ba2c7681850a601053adcfd8f920e2037aee5ebe9abf0f9a1b89ac674a1" => :mojave - sha256 "86c543cb703b1d7885045354917e7da1a1fa3e52ca6749359f64ea736af74aa0" => :high_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 80306443a48ef..0000000000000 --- a/Formula/sfk.rb +++ /dev/null @@ -1,24 +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.7.0/sfk-1.9.7.tar.gz" - version "1.9.7.0" - sha256 "67009fd73d53c800302de58067dee2ceb64c5a43c10d32de30ab886efdd59399" - - bottle do - cellar :any_skip_relocation - sha256 "008d880b4b2a3d06e60fb28bc9950d2774de8e1430c99922779ea3f81b8b3fd9" => :catalina - sha256 "b4e4dfaf137db0eb4f759e707be3be8e2f8cf3bba2c98452e53d16006a3de5ee" => :mojave - sha256 "708df4b05628a36d80a818ad487cce07b2ff6de924b7106df7dd31877a7354f1" => :high_sierra - 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/sflowtool.rb b/Formula/sflowtool.rb deleted file mode 100644 index cf156081c097f..0000000000000 --- a/Formula/sflowtool.rb +++ /dev/null @@ -1,31 +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/v5.05/sflowtool-5.05.tar.gz" - sha256 "048c52ead856a23e927fb826ac7663aeaac98795e678792fd6f74c588f90825d" - - bottle do - cellar :any_skip_relocation - sha256 "f3e55e3b91333c14463670cfc709aa6333a2e6170c668b130e54a4f6b34d1557" => :catalina - sha256 "59dac285649c6046b8e24a1308e9c56037cbb98e1223b5b37890b935b51edc91" => :mojave - sha256 "1df8d53ae9d3978eec0655b09c1988c77db62b1c619731e2997ae9d770246158" => :high_sierra - 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 1e61b20c5c4de..0000000000000 --- a/Formula/sfml.rb +++ /dev/null @@ -1,55 +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.5.1-sources.zip" - sha256 "bf1e0643acb92369b24572b703473af60bac82caf5af61e77c063b779471bb7f" - head "https://github.com/SFML/SFML.git" - - bottle do - cellar :any - sha256 "b94077b2fc05c84af837de5bdf0681c1538c07b320b40155dd7f81cff809d37c" => :catalina - sha256 "3f4dd43eb91902d4c4f7558d965b372ace9b1227185c55db5172a7f599593caa" => :mojave - sha256 "72544adffb4dea8194163d44f16588c2c85ab795ba02eb7b93a9d687f2958383" => :high_sierra - sha256 "ab58d3643f256258efe63d74689bfb4eae7dd012665552e61eb6bb749af08f77" => :sierra - 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 - - def install - # error: expected function body after function declarator - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra - - # 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_MISC_INSTALL_PREFIX=#{share}/SFML", - "-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 38f70006213d4..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 "https://www.cis.uni-muenchen.de/~schmid/tools/SFST/" - url "https://www.cis.uni-muenchen.de/~schmid/tools/SFST/data/SFST-1.4.7e.tar.gz" - sha256 "9e1bda84db1575ffb3bea56f3d49898661ad663280c5b813467cd17a7d6b76ac" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "84cf35e5f7804382eac45103635c4f1584e3c2dbdb675ee1ad432cc47dd5a2a0" => :catalina - sha256 "a956b48189601556994daa06e47f9b287419de7aecd893912309e05aca32fec0" => :mojave - sha256 "1036f8a78616f1c3ade380ac0c240dd68598f976cb4d937ef06b88c607a14be3" => :high_sierra - 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 64d77f0c31dcf..0000000000000 --- a/Formula/sgrep.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Sgrep < Formula - desc "Search SGML, XML, and HTML" - homepage "https://www.cs.helsinki.fi/u/jjaakkol/sgrep.html" - url "https://www.cs.helsinki.fi/pub/Software/Local/Sgrep/sgrep-1.94a.tar.gz" - mirror "https://fossies.org/linux/misc/old/sgrep-1.94a.tar.gz" - sha256 "d5b16478e3ab44735e24283d2d895d2c9c80139c95228df3bdb2ac446395faf9" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "29e528a52ae36131ded52bb08d9cf9b12b1455fbc715f7b7bbd3b97f637862e5" => :catalina - sha256 "bfb1f484dd474727fec463b1b90ffe7250f5c82e0e65bec96903e38f6e0a8e48" => :mojave - sha256 "a243589e79a4cde4f7bba21ec618e3c323c049589707bde6e2c20c4bf1014464" => :high_sierra - end - - uses_from_macos "m4" - - 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 056f38fca56c6..0000000000000 --- a/Formula/sha1dc.rb +++ /dev/null @@ -1,34 +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 "ed78939b30e385c3adeac725b9f2865d60b8c0e15e1ec75d1b6c90855dc14206" => :catalina - 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 cc0726eed53d4..0000000000000 --- a/Formula/sha2.rb +++ /dev/null @@ -1,30 +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 "e57b7c4a197f313d7bcca145529b408ce259b2cfbde55826d61b0596c7203da2" => :catalina - 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/sha3sum.rb b/Formula/sha3sum.rb deleted file mode 100644 index fc2931329f723..0000000000000 --- a/Formula/sha3sum.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Sha3sum < Formula - desc "Keccak, SHA-3, SHAKE, and RawSHAKE checksum utilities" - homepage "https://github.com/maandree/sha3sum" - url "https://github.com/maandree/sha3sum/archive/1.1.5.tar.gz" - sha256 "1a4eef5b09b7f70af1f6970840475d4735a14b4fab21937b9fd104b8606654ce" - license "ISC" - - bottle do - cellar :any - sha256 "2a2d98b9289a0a98536d1d73e840fb88bd9ab430f44e914d00cf29a0879a3c72" => :catalina - sha256 "261621253f9915637cb0e49ce33764bc7c7fa80ac54481ba897b9cfffcb82965" => :mojave - sha256 "4042da1f6559af01943de4bca3c86b9b4b5729cae9a0cb5009b849870fb086b2" => :high_sierra - sha256 "99c160dd3fab4dd776d940ec369b9d11e5948376755f12f8c0248a3f5ab8b223" => :sierra - end - - depends_on "libkeccak" - - def install - system "make", "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/shadowenv.rb b/Formula/shadowenv.rb deleted file mode 100644 index 2dc3ffd3a9c81..0000000000000 --- a/Formula/shadowenv.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Shadowenv < Formula - desc "Reversible directory-local environment variable manipulations" - homepage "https://shopify.github.io/shadowenv/" - url "https://github.com/Shopify/shadowenv/archive/2.0.3.tar.gz" - sha256 "9d86db156b84e8df9cdc3c6084af4e538a5928fb6817567778464b10fe12a095" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "a8e73028069e37003f2e019230e48947913b164ebb9cdb50ea088b6398fc352c" => :catalina - sha256 "5022c65cf81ba99f8be31fdd879201e566f203f357e5ca88d14daaa0d9a83325" => :mojave - sha256 "fe0a543dc0a0ce7adba2eebc9f8f224aa55a4f63b49a4474d576d6467d604065" => :high_sierra - 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_command = "#{bin}/shadowenv hook '\"'\"'#{hash}:#{data.to_json}'\"'\"' 2> /dev/null" - 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_command})\"; #{print_vars}'") - end -end diff --git a/Formula/shadowsocks-libev.rb b/Formula/shadowsocks-libev.rb deleted file mode 100644 index 06dfa1c3d258e..0000000000000 --- a/Formula/shadowsocks-libev.rb +++ /dev/null @@ -1,106 +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.3.4/shadowsocks-libev-3.3.4.tar.gz" - sha256 "fce47a956fad0c30def9c71821bcec450a40d3f881548e31e66cedf262b89eb1" - - bottle do - cellar :any - rebuild 1 - sha256 "db9d4bd66d39b269b41325581a94bcbe8507d806af3fbf99f793a8e02963b090" => :catalina - sha256 "02469b1937cf8739d142ffa8c7d56d5ba3e1e9d64505fe48c8c81edfb51be088" => :mojave - sha256 "ac2d53fb71b30a8cf8da51487b48806d8897f9cdc0ab0d1e8a75b7514ff804df" => :high_sierra - end - - head do - url "https://github.com/shadowsocks/shadowsocks-libev.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "asciidoc" => :build - depends_on "xmlto" => :build - depends_on "c-ares" - depends_on "libev" - depends_on "libsodium" - depends_on :macos # Due to Python 2 - depends_on "mbedtls" - 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 <<~EOS - { - "server":"localhost", - "server_port":8388, - "local_port":1080, - "password":"barfoo!", - "timeout":600, - "method":null - } - EOS - etc.install "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" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/ss-local - -c - #{etc}/shadowsocks-libev.json - - RunAtLoad - - KeepAlive - - - - EOS - end - - test do - server_port = free_port - local_port = free_port - - (testpath/"shadowsocks-libev.json").write <<~EOS - { - "server":"127.0.0.1", - "server_port":#{server_port}, - "local":"127.0.0.1", - "local_port":#{local_port}, - "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:#{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/shairport-sync.rb b/Formula/shairport-sync.rb deleted file mode 100644 index 4cf9c2a2f8e5d..0000000000000 --- a/Formula/shairport-sync.rb +++ /dev/null @@ -1,54 +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.3.6.tar.gz" - sha256 "a8382affd25c473fa38ead5690148c6c3902098f359f9c881eefe139e1f49f49" - head "https://github.com/mikebrady/shairport-sync.git", :branch => "development" - - bottle do - sha256 "3c2a973fbbe200704e35737226fd4e7ed6edad9f389253602fe5d14c50bb171e" => :catalina - sha256 "afe30af9e783c581888b525d7e3aab13e09e9812e9f717ad258c9cbb996da8a4" => :mojave - sha256 "d08952f97ce3a3f7e10a602322d0fdb23d8553586b4a7ad6b01af927f9969e1f" => :high_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@1.1" - depends_on "popt" - depends_on "pulseaudio" - - def install - system "autoreconf", "-fvi" - args = %W[ - --with-os=darwin - --with-libdaemon - --with-ssl=openssl - --with-dns_sd - --with-ao - --with-stdout - --with-pa - --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") - assert_match "libdaemon-OpenSSL-dns_sd-ao-pa-stdout-pipe-soxr-metadata", output - end -end diff --git a/Formula/shairport.rb b/Formula/shairport.rb deleted file mode 100644 index e9f49e8b93b8d..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" - revision 1 - head "https://github.com/abrasive/shairport.git" - - bottle do - cellar :any - sha256 "d385bd0045902de8acba7c41f7f1a1adfed5d9f13ea307af583de1b026ea0af0" => :catalina - sha256 "af28167bdd30a30511476472429673db781b9234cd4c8225a2ed3f10b869588c" => :mojave - sha256 "c819c407c218e35129dde1d00a0bb78e5cc85cf69cc0920f87f5a3f690e2cab5" => :high_sierra - sha256 "f3449bbbd695f608673ecf618c55f5d41ac8edad59772888a128185b23395b7b" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - 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 689c385a9f182..0000000000000 --- a/Formula/shakespeare.rb +++ /dev/null @@ -1,26 +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 "189fbdefeea765fcb5b9b33cc1bde987fe57376b3aff1a0eada8faaec27a84aa" => :catalina - sha256 "657bf548e23dd5564a32e1b86f983f1899e24966728e8e94dfdb981d35e60a45" => :mojave - sha256 "7320be8a139934d9a80543a8017de6500f02971374a36038592ad122d76f85cf" => :high_sierra - sha256 "6a8e746959adcbd5629bd6ec74fcc3854fa7355d098c14a640a6df23358ce335" => :sierra - sha256 "86547f1b0967f8399f00b7120a251a126e66dfe9c52a4fb9b3d17331e2381895" => :el_capitan - sha256 "1e35a35e7ca7eef401a76360320389fe23e2cea6db8bf9f2d266732c742ad8d5" => :yosemite - end - - depends_on "flex" - - 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 591347b8bdfc1..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.5.0.tar.gz" - sha256 "1fc0a480982caef9e7b9423070b47750ba34cd0ba82668f2e638fab1d07adae1" - - bottle do - cellar :any - sha256 "9800e87eaeeca3eca0d59c3bca555c0211df96f021735251964981ac2b16bd90" => :catalina - sha256 "90f9b9b0ccadf93be027e515be356d0b92f4dfb33979f11df9fc7570c3249d0e" => :mojave - sha256 "f1242aaf566b272f69331d16441171b12d0b4cef8396b56e0a8246fe7618ca68" => :high_sierra - sha256 "0add799fff38395de6300f1b18102270bd269b5dc37714e7cac1873849b2ced7" => :sierra - 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 b6c09d3845c5d..0000000000000 --- a/Formula/shared-mime-info.rb +++ /dev/null @@ -1,67 +0,0 @@ -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/uploads/0440063a2e6823a4b1a6fb2f2af8350f/shared-mime-info-2.0.tar.xz" - sha256 "23c1cb7919f31cf97aeb5225548f75705f706aa5cc7d1c4c503364bcc8681e06" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "5aefdc7964e569188cb67a49f4a428c64130f7c048ffd55106c656eb0c6caa25" => :catalina - sha256 "26629464888f464e3aacfec50d6b5c28ecd91c9c56ae74a418eac49b07abc3a3" => :mojave - sha256 "c548f5a23851ce6d807fd9e152c57e65ad99c3d0cf2cd40a473b55346935ec61" => :high_sierra - end - - head do - url "https://gitlab.freedesktop.org/xdg/shared-mime-info.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "intltool" => :build - end - - depends_on "intltool" => :build - depends_on "itstool" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "xmlto" - - uses_from_macos "libxml2" - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - # Disable the post-install update-mimedb due to crash - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja" - system "ninja", "install" - pkgshare.install share/"mime/packages" - rmdir share/"mime" - end - end - - def post_install - global_mime = HOMEBREW_PREFIX/"share/mime" - cellar_mime = share/"mime" - - # Remove bad links created by old libheif postinstall - rm_rf global_mime if global_mime.symlink? - - if !cellar_mime.exist? || !cellar_mime.symlink? - rm_rf cellar_mime - ln_sf global_mime, cellar_mime - end - - (global_mime/"packages").mkpath - cp (pkgshare/"packages").children, global_mime/"packages" - - system bin/"update-mime-database", global_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 fbe9cb0f6c84a..0000000000000 --- a/Formula/shc.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Shc < Formula - desc "Shell Script Compiler" - homepage "https://neurobin.github.io/shc" - url "https://github.com/neurobin/shc/archive/4.0.3.tar.gz" - sha256 "7d7fa6a9f5f53d607ab851d739ae3d3b99ca86e2cb1425a6cab9299f673aee16" - license "GPL-3.0" - head "https://github.com/neurobin/shc.git" - - bottle do - cellar :any_skip_relocation - sha256 "cdfc62c7d9bd39ed7e956066f8d55a189c58b185b6abf7e45b5d8c63a6abe2d5" => :catalina - sha256 "ff3c55ef1d10c16066e97a20143dbd1e7781ceb9a2c5c8b46d140f6711bc79fa" => :mojave - sha256 "c19f4586119be579006eace517045998138d83a17e2b5c8ec00ad73ea007b68c" => :high_sierra - sha256 "6e1834ac7b4cc64ba972a59189512bb9ff9e0ec307df78f9e0fc1fee42378f6d" => :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 b8c53fc6f114e..0000000000000 --- a/Formula/shellcheck.rb +++ /dev/null @@ -1,39 +0,0 @@ -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/v0.7.1.tar.gz" - sha256 "50a219bde5c16fc0a40e2e3725b6c192ff589bc8a2569c32b62dcaece0495896" - license "GPL-3.0" - head "https://github.com/koalaman/shellcheck.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "0cd635d2172d5e6617be8cdfb2723b6aa6feb2aa22e36cb3172d8b6fa012f4a0" => :catalina - sha256 "37201a49c0d7a5be49c5d97d4f6f8f5fcfef7d700b4694f74648a1addcd6783d" => :mojave - sha256 "1b20aeaba4d5e2e3df5cbe27636d655b6f877ee05a41d25fe1e0b3f9d00afa81" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.8" => :build - depends_on "pandoc" => :build - - def install - system "cabal", "v2-update" - system "cabal", "v2-install", *std_cabal_v2_args - 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 81d7a1dc01050..0000000000000 --- a/Formula/shellharden.rb +++ /dev/null @@ -1,29 +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.2.tar.gz" - sha256 "8e5f623f9d58e08460d3ecabb28c53f1969bed09c2526f01b5e00362a8b08e7f" - license "MPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "85dd6255ff5f3410eafff6f5689bbcb7feac3f3f5d291139fc60597e2f46e5a5" => :catalina - sha256 "fbe947b5d0596fb32bcbadddd904bf0b0d30c64053e00c13a41cc6ecf89d1e20" => :mojave - sha256 "214a9dca5d9d013ada81c97e204c96815fd3376399c960d73973ffe4c7d653cf" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - 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 aaafd8f4f4577..0000000000000 --- a/Formula/shellinabox.rb +++ /dev/null @@ -1,35 +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" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "bbed6a113c24f9780c55d18e9fe4e487a004acbcfd4ed39dc52245164c6921bb" => :catalina - sha256 "be4a272fb621880a3357ec3661eb9e455c965200bcaa338a07a1610a651c9f3a" => :mojave - sha256 "941b62ffa692c9b233ed65803a4572d0012cd925971abd1e529d256566dcc05a" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "openssl@1.1" - - # Upstream (Debian) patch for OpenSSL 1.1 compatibility - patch do - url "https://github.com/shellinabox/shellinabox/pull/467.diff?full_index=1" - sha256 "3962166490c5769e450e46d40f577bf4042ac593440944f701fd64ee50d607d8" - end - - 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 9a2c6c0ae984a..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.4.tar.gz" - sha256 "55bfb1521f312b9b9b3e7bc10c9ab8e0c198278e6372187556a8d310ee6b602a" - license "Apache-2.0" - - 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 075528f544691..0000000000000 --- a/Formula/shelltestrunner.rb +++ /dev/null @@ -1,32 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "330c8aeff49dc1901a460586c90ce7540ad33451a4fa94ec4917ad2959780adc" => :catalina - sha256 "f1f921cc6c8fd64b1b99f483e47f1f06c4b8a39f74a823ac96df22cef9d5cf34" => :mojave - sha256 "f494b35cab29e3a942562230b461c44a8274f7564e8863400fdf68176f3b292d" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.8" => :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 731faa429c34a..0000000000000 --- a/Formula/shellz.rb +++ /dev/null @@ -1,36 +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.5.0.tar.gz" - sha256 "870bcc2d6e4fd20913556f95325bc3e1876f3243ef67295c33e2bcc990126e97" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "1c1eabfee3228f25f75b4838f3d0a8a49e84c87eb2926e78cdf05dff094aa0e8" => :catalina - sha256 "aa5043471c26fba80ba9db128f5ff3e8b60051bd76a8d26c3ad114b59b24c8b3" => :mojave - sha256 "83b7e5e52243efe75e302853574243667a8e9cf9899d480c12c27886e77a9788" => :high_sierra - sha256 "b659a90bd79e516d71679e68d36a35038937f23ee9d1de1dfee313fd11b0169e" => :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 a7ed3cb1036ca..0000000000000 --- a/Formula/shfmt.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Shfmt < Formula - desc "Autoformat shell script source code" - homepage "https://github.com/mvdan/sh" - url "https://github.com/mvdan/sh/archive/v3.1.2.tar.gz" - sha256 "133fcdb4645ee0c2893319b1ce5b83c88b8576c1e3936b1fa14b967df1501ee5" - license "BSD-3-Clause" - head "https://github.com/mvdan/sh.git" - - bottle do - cellar :any_skip_relocation - sha256 "42bd98e64ae352448f09fdc2b56a71e36e3659e382338447e94d20f4d7befcff" => :catalina - sha256 "d58c28c678be4be515c4a22e99338f7b1120a9f9d2eb004b6d7863a284ad5295" => :mojave - sha256 "127c0adf737c2de8d0a23850249b7cbc22fe5f864434c331ed521d4f00f3f3f7" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["CGO_ENABLED"] = "0" - (buildpath/"src/mvdan.cc").mkpath - ln_sf buildpath, buildpath/"src/mvdan.cc/sh" - system "go", "build", "-a", "-tags", "production brew", "-ldflags", - "-w -s -extldflags '-static' -X main.version=#{version}", - "-o", "#{bin}/shfmt", "./cmd/shfmt" - 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/shibboleth-sp.rb b/Formula/shibboleth-sp.rb deleted file mode 100644 index f0ea5f7bfce2d..0000000000000 --- a/Formula/shibboleth-sp.rb +++ /dev/null @@ -1,82 +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.1.0/shibboleth-sp-3.1.0.tar.bz2" - sha256 "40dfedbb0f8e604ed4b6d606143de7980b4f8c13fc4682375ace94f8ac194654" - - bottle do - sha256 "0e9ce54b4624d94327ad5d0c67ebcb6dc01d4a47f9bef359424c050b332ffe82" => :catalina - sha256 "d6f41e0976912dd5bf59bada50f91c4254a42eb45b9371a84f9ba8e4177706f3" => :mojave - sha256 "25841e4f4a66c574dd42f94ad9d2ef18e793b64ff94c7d193740fb5067d8f6bf" => :high_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 "opensaml" - depends_on "openssl@1.1" - depends_on "unixodbc" - depends_on "xerces-c" - depends_on "xml-security-c" - depends_on "xml-tooling-c" - - def install - 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} - ] - - args << "--with-apxs24=#{Formula["httpd"].opt_bin}/apxs" if MacOS.version >= :high_sierra - - system "./configure", *args - system "make", "install" - end - - def post_install - (var/"run/shibboleth/").mkpath - (var/"cache/shibboleth").mkpath - 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 6802d63b2be98..0000000000000 --- a/Formula/ship.rb +++ /dev/null @@ -1,36 +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.53.0.tar.gz" - sha256 "da1b0bba9e7431c27ae08774be906c17e278ef4703c288767bbaaedf0cc8d2c5" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b8faedd04cbb5f93cb2ec5f7b405b90e781f186c482c3b7465150f9a4325d56d" => :catalina - sha256 "d5a840b60911e80e0c656023fc3b5500c86a5828865c156a24329d0d9780b6ff" => :mojave - sha256 "04085e4e57112651eec2f1bb757f0802af344a04f7b2fdbdb47499ab5a14d874" => :high_sierra - end - - depends_on "go" => :build - depends_on "node" => :build - depends_on "yarn" => :build - - def install - # Needed for `go-bindata-assetfs`, it is downloaded at build time via `go get` - ENV["GOBIN"] = buildpath/"bin" - ENV.prepend_path "PATH", ENV["GOBIN"] - - system "make", "VERSION=#{version}", "build-minimal" - bin.install "bin/ship" - 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 e9babd580d228..0000000000000 --- a/Formula/shivavg.rb +++ /dev/null @@ -1,30 +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" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "b7c8f247b6db49cd1cabd2efd39d034c25d727f27bce09a329d9cc3c8e36a621" => :catalina - 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 3329afd5ca8d8..0000000000000 --- a/Formula/shmcat.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "f86090c36d839092913667dcfc924f76c71d318a03434a1e608b3960b1df7807" => :catalina - 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 9ab7bfcd143d2..0000000000000 --- a/Formula/shmux.rb +++ /dev/null @@ -1,26 +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.3.tar.gz" - sha256 "c9f8863e2550e23e633cf5fc7a9c4c52d287059f424ef78aba6ecd98390fb9ab" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "6781e9876911d4d44080b069dd3295c86520699ae24b3385980d51a53bc4d2f3" => :catalina - sha256 "e433bd14622d3f77a35042649d0d73e888b164ab4f04431864fb68c9ec64b62c" => :mojave - sha256 "bc38ad3a6feddd116edd9d3ab00ac18bc6663d08b9d111414975bdd1543d1b79" => :high_sierra - sha256 "13f8831248e646784dd3cefd82707c45966ea05528e0c836156dea98b9c8c870" => :sierra - 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/shntool.rb b/Formula/shntool.rb deleted file mode 100644 index f31d0dfbdfd4e..0000000000000 --- a/Formula/shntool.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "9454d69f59139dd015c7c414fd387016ed192fde5c9772470d3110be98fc8229" => :catalina - sha256 "3406dd2a363de42f9dab6d2e32e13b16357c6906ad552adb866c272f8dd1f5f2" => :mojave - sha256 "54203e7c0cf7a257ecc3cec107b55afd14b98edc9b8713082fbf6282eb863e38" => :high_sierra - sha256 "5548c0401df42faa7ade30e9c98656828864c3677836f72100aa80f4a92ff249" => :sierra - sha256 "910da256436f55ebf40c487ebd0e74da2979f01bf0adac83272b353c66ba99a8" => :el_capitan - sha256 "46d99776bb02d9721f30a6cb9b2c44293d3fbc6b4e3f522df869a7106b09a448" => :yosemite - sha256 "fa745e31b3c2aadb20d5c87f7175f00b3c5a39b6664ea0a9aa9d88d5767781c5" => :mavericks - 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/shogun.rb b/Formula/shogun.rb deleted file mode 100644 index 5bbc3572457f0..0000000000000 --- a/Formula/shogun.rb +++ /dev/null @@ -1,113 +0,0 @@ -class Shogun < Formula - desc "Large scale machine learning toolbox" - homepage "https://www.shogun-toolbox.org/" - url "https://github.com/shogun-toolbox/shogun.git", - :tag => "shogun_6.1.4", - :revision => "ab274e7ab6bf24dd598c1daf1e626cb686d6e1cc" - sha256 "57169dc8c05b216771c567b2ee2988f14488dd13f7d191ebc9d0703bead4c9e6" - license "BSD-3-Clause" - revision 7 - - bottle do - sha256 "8c607b82b6ae66098c5bbdfb899cd9016e29396cff31bfd4c08e74729915e425" => :catalina - sha256 "faf548b5905695701a0b326c617563454b7d507ac94741457bf17f3f3bfc8337" => :mojave - sha256 "fa5a267302c7a17cef53ac419fddda4df941abd0537e259b831af0ec16abc68a" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "arpack" - depends_on "eigen" - depends_on "glpk" - depends_on "hdf5" - depends_on "json-c" - depends_on "lzo" - depends_on "nlopt" - depends_on "openblas" - depends_on "protobuf" - depends_on "snappy" - depends_on "xz" - - # 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 - - def install - ENV.cxx11 - - args = std_cmake_args + %w[ - -DBLA_VENDOR=OpenBLAS - -DBUILD_EXAMPLES=OFF - -DBUILD_META_EXAMPLES=OFF - -DBUNDLE_JSON=OFF - -DBUNDLE_NLOPT=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_ARPREC=ON - -DCMAKE_DISABLE_FIND_PACKAGE_CCache=ON - -DCMAKE_DISABLE_FIND_PACKAGE_ColPack=ON - -DCMAKE_DISABLE_FIND_PACKAGE_CPLEX=ON - -DCMAKE_DISABLE_FIND_PACKAGE_Ctags=ON - -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON - -DCMAKE_DISABLE_FIND_PACKAGE_GDB=ON - -DCMAKE_DISABLE_FIND_PACKAGE_LpSolve=ON - -DCMAKE_DISABLE_FIND_PACKAGE_Mosek=ON - -DCMAKE_DISABLE_FIND_PACKAGE_OpenMP=ON - -DCMAKE_DISABLE_FIND_PACKAGE_Pandoc=ON - -DCMAKE_DISABLE_FIND_PACKAGE_rxcpp=ON - -DCMAKE_DISABLE_FIND_PACKAGE_Sphinx=ON - -DCMAKE_DISABLE_FIND_PACKAGE_TFLogger=ON - -DCMAKE_DISABLE_FIND_PACKAGE_ViennaCL=ON - -DENABLE_COVERAGE=OFF - -DENABLE_LTO=ON - -DENABLE_TESTING=OFF - -DINTERFACE_CSHARP=OFF - -DINTERFACE_JAVA=OFF - -DINTERFACE_LUA=OFF - -DINTERFACE_OCTAVE=OFF - -DINTERFACE_PERL=OFF - -DINTERFACE_PYTHON=OFF - -DINTERFACE_R=OFF - -DINTERFACE_RUBY=OFF - -DINTERFACE_SCALA=OFF - ] - - mkdir "build" do - system "cmake", *args, ".." - system "make" - system "make", "install" - end - - inreplace lib/"cmake/shogun/ShogunTargets.cmake", - Formula["hdf5"].prefix.realpath, - Formula["hdf5"].opt_prefix - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - #include - #include - int main() { - shogun::init_shogun_with_defaults(); - assert(std::strcmp(MAINVERSION, "#{version}") == 0); - shogun::exit_shogun(); - return 0; - } - 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 f2f064cd41dd4..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 "4316e27eb009a503852bd285d9bb733df4d09bd3eb7845ed250ae787be02f896" => :catalina - sha256 "ed0a7482bebdc53827e6932bdc70d8897d00b4ce87ac2cf84bee7b0cec2229a5" => :mojave - sha256 "2247094c6f41ad5ce941c84335a45aaaabe0bef43ffeb89a544793957c157ba9" => :high_sierra - sha256 "a54b8263dfbd2aab185df1888193dc0ceb602d9df82758cf5ef31b3df52ae697" => :sierra - sha256 "66cf7cabae065035e9c3c4a8c139439384fb9f26ea0ee433e336c18ba2f8383e" => :el_capitan - sha256 "5f48b61ce709915830f433dd381fe531c1354b56619bbdb441dc19f985df7467" => :yosemite - sha256 "a802da618fffa3eb292705140c882fcedbffae09017f0efdf69085004952a148" => :mavericks - 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 524dd5a4b1ab9..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.1.tar.gz" - sha256 "b41d8798687be250d0306ac0c5a79420fa46619c5954286711a5d63c86a6c071" - 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 7814107a46469..0000000000000 --- a/Formula/shtool.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e2f7c7a3b0b39b0b9d161e503310b09443cc8e4dc5283dce371afa0b4d87094a" => :catalina - sha256 "7d9087a21cd6724aa82694ceca768d3044d5ab854c5ba95ae04146b3b83c2bf5" => :mojave - sha256 "fc22505f6424dece01dcdee55907eebcb490a299763f2f217511fa14c5927711" => :high_sierra - sha256 "172a4e2c133efcc6235aa3901bbc89ea11c48cfa70833fe67801240236d1757d" => :sierra - sha256 "17dcf1289dd178b75b670d8061d54e4b2004feeb7de0d9e1ea43ffb46220e4fd" => :el_capitan - sha256 "de69e23a1e88799c78891298045bd8f79ef67ee48b7609fa065c7acdc1ddbde4" => :yosemite - sha256 "14b7ea00fce6bf6df8e684f1f4db589ad4f6bc7051a4a29f34d51fb6d287d0a9" => :mavericks - 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 dd2eca41e8646..0000000000000 --- a/Formula/shunit2.rb +++ /dev/null @@ -1,17 +0,0 @@ -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/v2.1.8.tar.gz" - sha256 "b2fed28ba7282e4878640395284e43f08a029a6c27632df73267c8043c71b60c" - license "Apache-2.0" - - 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 044541648baa5..0000000000000 --- a/Formula/shyaml.rb +++ /dev/null @@ -1,42 +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/bc/ca/d8c47fad7a6ce01ddd2b7093673433dbfae414015f971ea7ffda56da125f/shyaml-0.6.1.tar.gz" - sha256 "3a57e380f66043c661d417106a0f101f8068c80caa2afef57c90447b88526c3d" - license "BSD-2-Clause" - revision 1 - head "https://github.com/0k/shyaml.git" - - bottle do - cellar :any - sha256 "510026ded6fc62625ee9bd2cab4d94d03155e94270ae0aa38947b894282c2808" => :catalina - sha256 "c850436b06215814c879e02db80331c3b94e63ccfa03df8bd25915ef4dfac668" => :mojave - sha256 "d52705a99a5f376d41d2ead578d73f5eb309b0efa595215364ea42cb4191eed6" => :high_sierra - end - - depends_on "libyaml" - depends_on "python@3.8" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - 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 a4662b28184b8..0000000000000 --- a/Formula/sic.rb +++ /dev/null @@ -1,23 +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" - license "MIT" - head "https://git.suckless.org/sic", :using => :git - - bottle do - cellar :any_skip_relocation - sha256 "e8f0a94363bdaebc692584e6a0d2782f88238a9cb4b7920ec6393dcf87d171d8" => :catalina - 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 2c4e3ba725e5d..0000000000000 --- a/Formula/sickle.rb +++ /dev/null @@ -1,34 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "f33fa7f23d66b928b117a8c3ccfd54a30dc5a798ed6444350be47ced2bebc49e" => :catalina - sha256 "dc6b4eea0f8da0b1611e12197157c9985c931567d466e3a47f89250a8180b879" => :mojave - sha256 "3aeaaa4393148876cc55cc9defbe82ae0fe0dabea18e418413b2aa8cff23dd0b" => :high_sierra - sha256 "844b063d1496d2a7c7f8a12b2239ae32766a538557d44f712c584a30b9775fae" => :sierra - sha256 "138b38a20aefc55ec4005ee4c4622ec332cbb13ff4ebc39ff45d91a2c12afde8" => :el_capitan - 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/siege.rb b/Formula/siege.rb deleted file mode 100644 index ae869f070f28e..0000000000000 --- a/Formula/siege.rb +++ /dev/null @@ -1,49 +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.5.tar.gz" - sha256 "3b4b7001afa4d80f3f4939066a4932e198e9f949dcc0e3affecbedd922800231" - license "GPL-3.0" - - bottle do - sha256 "6a1df0da2bd5bdbdc6264fa49c4b0ddb44a2a3eb9f6dd275773e45529981ef46" => :catalina - sha256 "eb50a8806bb8113d7d59c56da107687cece5289cc69ceebc020601e760a35946" => :mojave - sha256 "8597b370f2997d538cdeefe66f6020b39aaccb2d689f8499fc4070c5a0aaf5df" => :high_sierra - end - - depends_on "openssl@1.1" - - 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@1.1"].opt_prefix}", - "--with-zlib=#{MacOS.sdk_path_if_needed}/usr" - 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 2f076d34ce0aa..0000000000000 --- a/Formula/sift.rb +++ /dev/null @@ -1,51 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "d2c0f8e64a32bcbaa45976a350d302dd13e3b68595162d69005dae7599d9be40" => :catalina - 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/signal-cli.rb b/Formula/signal-cli.rb deleted file mode 100644 index 4459cefe530d0..0000000000000 --- a/Formula/signal-cli.rb +++ /dev/null @@ -1,32 +0,0 @@ -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/releases/download/v0.6.8/signal-cli-0.6.8.tar.gz" - sha256 "6db702aa940cc9ddaa5952ef24f6c18acdc12b704b59f77fb1df947032929e3d" - license "GPL-3.0" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install Dir["lib", "bin"] - (bin/"signal-cli").write_env_script libexec/"bin/signal-cli", :JAVA_HOME => Formula["openjdk"].opt_prefix - end - - test do - # test 1: checks class loading is working and version is correct - output = shell_output("#{bin}/signal-cli --version") - assert_match "signal-cli #{version}", output - - # test 2: ensure crypto is working - begin - io = IO.popen("#{bin}/signal-cli link", :err => [:child, :out]) - sleep 8 - ensure - Process.kill("SIGINT", io.pid) - Process.wait(io.pid) - end - assert_match "tsdevice:/?uuid=", io.read - end -end diff --git a/Formula/signify-osx.rb b/Formula/signify-osx.rb deleted file mode 100644 index 4504158b473f0..0000000000000 --- a/Formula/signify-osx.rb +++ /dev/null @@ -1,26 +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" - license "ISC" - head "https://github.com/jpouellet/signify-osx.git" - - bottle do - cellar :any_skip_relocation - sha256 "74a8c2fa3d258ad59a5ab7302411a194903ea5295fbf5ecd95a43c2ac28677f4" => :catalina - 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 dc45557028686..0000000000000 --- a/Formula/sile.rb +++ /dev/null @@ -1,155 +0,0 @@ -class Sile < Formula - desc "Modern typesetting system inspired by TeX" - homepage "https://www.sile-typesetter.org/" - url "https://github.com/sile-typesetter/sile/releases/download/v0.10.5/sile-0.10.5.tar.bz2" - sha256 "a14fe23af242ba723aed699048b10abf60d1809390ac543140b80e057c4b4b9b" - license "MIT" - revision 2 - - head "https://github.com/sile-typesetter/sile.git", :shallow => false - - bottle do - rebuild 1 - sha256 "0d486fd0b0bc8bdd8d12381e4dab4e338ba12c3b041368d9ee2e0bcf1b2a9f87" => :catalina - sha256 "2d93b3ea930594a147757cce80b480e5f4634f04dc555753f9804d53e863d4ca" => :mojave - sha256 "959e69924cd380b97e251305ea07d809ed2ac1e6252ddfbe0d3ddf56b6f472b8" => :high_sierra - end - - if build.head? - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "luarocks" => :build - depends_on "pkg-config" => :build - depends_on "expat" - depends_on "fontconfig" - depends_on "harfbuzz" - depends_on "icu4c" - depends_on "libpng" - depends_on "lua" - depends_on "openssl@1.1" - depends_on "zlib" - - resource "cassowary" do - url "https://github.com/sile-typesetter/cassowary.lua/archive/v2.2.tar.gz" - sha256 "e2f7774b6883581491b8f2c9d1655b2136bc24d837a9e43f515590a766ec4afd" - end - - resource "cosmo" do - url "https://github.com/mascarenhas/cosmo/archive/v16.06.04.tar.gz" - sha256 "86d17aea5080a90671d965cffeb9b104c19e0e1ea55c08687c0924c4512b52b1" - end - - resource "linenoise" do - url "https://github.com/hoelzro/lua-linenoise/archive/0.9.tar.gz" - sha256 "cc1cdb4047edd056a10dcdeec853dbaf5088e2202941d579e4592584d733f09c" - end - - resource "lpeg" do - url "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.2.tar.gz" - sha256 "48d66576051b6c78388faad09b70493093264588fcd0f258ddaab1cdd4a15ffe" - end - - resource "lua_cliargs" do - url "https://github.com/amireh/lua_cliargs/archive/v2.3-3.tar.gz" - sha256 "288eea7c12b2e37bb40241c59e592472f835c526cd807ffc3e2fe21def772481" - 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://github.com/tomasguisasola/luaexpat/archive/v1.3.3.tar.gz" - sha256 "a17a0e6ffa6977406b072d67a13ca0e125fad63e1229cec4efcd8d83f1c3eed9" - end - - resource "luaepnf" do - url "https://github.com/siffiejoe/lua-luaepnf/archive/v0.3.tar.gz" - sha256 "57c0ad1917e45c5677bfed0f6122da2baff98117aba05a5e987a0238600f85f9" - end - - resource "luafilesystem" do - url "https://github.com/keplerproject/luafilesystem/archive/v1_7_0_2.tar.gz" - sha256 "23b4883aeb4fb90b2d0f338659f33a631f9df7a7e67c54115775a77d4ac3cc59" - end - - resource "luarepl" do - url "https://github.com/hoelzro/lua-repl/archive/0.9.tar.gz" - sha256 "3c88a3b102a4a4897c46fadb2cd12ee6760438e41e39ffc6cf353582d651b313" - end - - resource "luasocket" do - url "https://github.com/diegonehab/luasocket/archive/v3.0-rc1.tar.gz" - sha256 "8b67d9b5b545e1b694753dab7bd6cdbc24c290f2b21ba1e14c77b32817ea1249" - end - - resource "luasec" do - url "https://github.com/brunoos/luasec/archive/luasec-0.8.1.tar.gz" - sha256 "cc9fc92df3be56add5c9687319951f457c31f5d12ac19cfc09d53056dc24f04e" - end - - resource "penlight" do - url "https://github.com/Tieske/Penlight/archive/1.7.0.tar.gz" - sha256 "5b793fc93fa7227190e191e5b24a8f0ce9dd5958ccebe7a53842a58b5d46057f" - end - - resource "vstruct" do - url "https://github.com/ToxicFrog/vstruct/archive/v2.0.1.tar.gz" - sha256 "4529ab32691b5f6e3c798ddfac36013d24d7581715dc7a50a77f17bb2d575c13" - end - - resource "stdlib" do - url "https://github.com/lua-stdlib/lua-stdlib/archive/release-v41.2.2.tar.gz" - sha256 "42ca25ddcde59f608694a3335d24919a4df4cf6f14ea46c75249561a16c84711" - end - - def install - luapath = libexec/"vendor" - ENV["LUA_PATH"] = - "#{luapath}/share/lua/5.3/?.lua;#{luapath}/share/lua/5.3/?/init.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}", - "ZLIB_DIR=#{Formula["zlib"].opt_prefix}" - elsif r.name == "luaexpat" - system "luarocks", "build", r.name, "--tree=#{luapath}", "EXPAT_DIR=#{Formula["expat"].opt_prefix}" - elsif r.name == "luasec" - system "luarocks", "build", r.name, "--tree=#{luapath}", "OPENSSL_DIR=#{Formula["openssl@1.1"].opt_prefix}" - else - system "luarocks", "build", r.name, "--tree=#{luapath}" - end - end - end - - system "./bootstrap.sh" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--with-system-luarocks", - "--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 ab2c011f892ed..0000000000000 --- a/Formula/silk.rb +++ /dev/null @@ -1,41 +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.19.1.tar.gz" - sha256 "b287de07502c53d51e9ccdcc17a46d8a4d7a59db9e5ae7add7b82458a9da45a7" - - bottle do - sha256 "4a88b111ce742a948b91b9441f2bbc7e821ffd3691673086ff46e8e27fbda31e" => :catalina - sha256 "923bc8b774f207d23073195b49befba72e378e79846b6809066f55f3df87c329" => :mojave - sha256 "663d2a858210750b8650e4f0e516dd6530fb5d08a7c501f8daa937572d8a81ee" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "libfixbuf" - depends_on "yaf" - - uses_from_macos "libpcap" - - 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 aca06d72ae82e..0000000000000 --- a/Formula/simg2img.rb +++ /dev/null @@ -1,31 +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.4.tar.gz" - sha256 "cbd32490c1e29d9025601b81089b5aec1707cb62020dfcecd8747af4fde6fecd" - head "https://github.com/anestisb/android-simg2img.git" - - bottle do - cellar :any_skip_relocation - sha256 "a79238cc3b241a3c9f2635b2ce230107f4372db3df7678dcc0857f8c7ef40581" => :catalina - sha256 "eb4046906b4bc9b2508ed5a7bbd0c9cfd2bab387c9891dbbf396c64374fdef6d" => :mojave - sha256 "677aa2ecb11b6c0df59eb44cd75b7bc66d7f99607a4a5e0b5f9137d42428efc5" => :high_sierra - 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 649988e42f961..0000000000000 --- a/Formula/simgrid.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Simgrid < Formula - include Language::Python::Shebang - - desc "Studies behavior of large-scale distributed systems" - homepage "https://simgrid.org/" - url "https://framagit.org/simgrid/simgrid/uploads/0365f13697fb26eae8c20fc234c5af0e/SimGrid-3.25.tar.gz" - sha256 "0b5dcdde64f1246f3daa7673eb1b5bd87663c0a37a2c5dcd43f976885c6d0b46" - revision 1 - - bottle do - sha256 "5f6acdf27e6f658a180026c72c52b36de25ee08d9eac609f762358277613ae0b" => :catalina - sha256 "66357d6bbddedef44f1f35db0870592b1d4a1786d4f7ff87417ce0a88e1f0486" => :mojave - sha256 "9fab4d4bb4eadbb23a20295d29c0fe2bd2823a85790c0287b315d80615eed649" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "boost" - depends_on "graphviz" - depends_on "pcre" - depends_on "python@3.8" - - def install - # Avoid superenv shim references - inreplace "src/smpi/smpicc.in", "@CMAKE_C_COMPILER@", "/usr/bin/clang" - inreplace "src/smpi/smpicxx.in", "@CMAKE_CXX_COMPILER@", "/usr/bin/clang++" - - system "cmake", ".", - "-Denable_debug=on", - "-Denable_compile_optimizations=off", - "-Denable_fortran=off", - *std_cmake_args - system "make", "install" - - bin.find { |f| rewrite_shebang detected_python_shebang, f } - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - #include - - int main(int argc, char* argv[]) { - printf("%f", simgrid_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 dc438b958509e..0000000000000 --- a/Formula/simh.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Simh < Formula - desc "Portable, multi-system simulator" - homepage "http://simh.trailing-edge.com/" - url "https://github.com/simh/simh/archive/v3.11-1.tar.gz" - version "3.11.1" - sha256 "c8a2fc62bfa9369f75935950512a4cac204fd813ce6a9a222b2c6a76503befdb" - head "https://github.com/simh/simh.git" - - bottle do - cellar :any_skip_relocation - sha256 "790feb234cf193ae6de2c076ad10024e5d9bd6d301020392a79cffc7ff6ccb15" => :catalina - sha256 "76246ba12f6771a031a092ccbc67f0f6fbe8dacda0e5c1e41bbaa8d4a7918680" => :mojave - sha256 "77ac8e9ea8a1589d4caa38f2cc9f21de2f4e66a836d316117926378080d09124" => :high_sierra - 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 4a71434da3db4..0000000000000 --- a/Formula/simple-amqp-client.rb +++ /dev/null @@ -1,43 +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" - license "MIT" - 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 5f2d89721d316..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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "0898a8c722d19687e944b9fde21f85b4f5399ae755c92af08c2e5a8e30f881f8" => :catalina - 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 - - 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 080259579b1ea..0000000000000 --- a/Formula/simple-obfs.rb +++ /dev/null @@ -1,38 +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 "64ac7bb71b3dd0a0d087d7f981c53516abfb294f709d84cb969b192456310c51" => :catalina - 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-scan.rb b/Formula/simple-scan.rb deleted file mode 100644 index e49b78f9599bf..0000000000000 --- a/Formula/simple-scan.rb +++ /dev/null @@ -1,43 +0,0 @@ -class SimpleScan < Formula - desc "GNOME document scanning application" - homepage "https://gitlab.gnome.org/GNOME/simple-scan" - url "https://download.gnome.org/sources/simple-scan/3.36/simple-scan-3.36.3.tar.xz" - sha256 "7083beab8cb8640225938cda76190abca91093d6960d555505b23930b13c5f3f" - license "GPL-3.0" - revision 2 - - bottle do - sha256 "aeef2e94520f6d1cc563a1d5f74792ad85ddacfce1888f9441a0c020ef6b99b2" => :catalina - sha256 "273399430d9cec668be18c74b27204483c3135b740b56923dc1b26ebee889038" => :mojave - sha256 "7fb0684ace98012471a2bb86afeb176723f0fc505c0b30bc3dc39feff0cd5356" => :high_sierra - end - - depends_on "itstool" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - depends_on "glib" - depends_on "gtk+3" - depends_on "libgusb" - depends_on "sane-backends" - depends_on "webp" - - def install - ENV["DESTDIR"] = "/" - mkdir "build" do - system "meson", *std_meson_args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - 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 - system "#{bin}/simple-scan", "-v" - end -end diff --git a/Formula/simple-tiles.rb b/Formula/simple-tiles.rb deleted file mode 100644 index 37a01ed489cf9..0000000000000 --- a/Formula/simple-tiles.rb +++ /dev/null @@ -1,47 +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" - license "MIT" - revision 8 - head "https://github.com/propublica/simple-tiles.git" - - bottle do - cellar :any - sha256 "4189c71a64c384fe516f1db1f20f9cd275e435f7b88995c21ce412ba272620f5" => :catalina - sha256 "80cf79f642357f6c408d0081020eca4638e13def659b2eb5f8a84cb3bf4e6392" => :mojave - sha256 "f737a155c3021b2c33655ce3f70f8d11d178197e8ce2d5669e73fede374c0d1b" => :high_sierra - 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["harfbuzz"].opt_include}/harfbuzz", - "-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 704b42dd4e102..0000000000000 --- a/Formula/simutrans.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Simutrans < Formula - desc "Transport simulator" - homepage "https://www.simutrans.com/" - url "https://downloads.sourceforge.net/project/simutrans/simutrans/121-0/simutrans-src-121-0.zip" - version "121.0" - sha256 "69fd95989761a013729106b48135f772f59126398cd93ada072f963c4d1e86b8" - head "https://github.com/aburch/simutrans.git" - - bottle do - cellar :any - sha256 "c2c9d281769baf57a160d47af3a8e0575912f8823f11e305e0f42c380759c7d6" => :catalina - sha256 "227e7f7ac0becc49570846825ed6fb3a484c85741a2289216842066e225dd8c0" => :mojave - sha256 "25efa70edc3b5b9270e4f6cc1bc40010ed5a427e081ed6810dc69151b47d9dac" => :high_sierra - end - - depends_on "libpng" - depends_on "sdl2" - - resource "pak64" do - url "https://downloads.sourceforge.net/project/simutrans/pak64/121-0/simupak64-121-0.zip" - sha256 "acd44278650944cd197ef8d5da7106f3d26c5fd3c3f2586c83a1c286e02c63cc" - end - - resource "text" do - url "https://simutrans-germany.com/translator/data/tab/language_pack-Base+texts.zip" - sha256 "4592e14f0e32b044c613d2a51f7783a242ed751be67fdb65c46e136116d76d96" - end - - def install - args = %w[ - BACKEND=sdl2 - COLOUR_DEPTH=16 - MULTI_THREAD=1 - 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 ac14d39f25c31..0000000000000 --- a/Formula/since.rb +++ /dev/null @@ -1,33 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "20b3f4888282ed47021562eb24efe9c37ef3a652ad64164460a5f368260e75d8" => :catalina - sha256 "6c0290f3500966bb4155352bf277ae127eb341796729dfcc2b9ca968df20b9c4" => :mojave - sha256 "a5b4f42858c41ad5d60850a3a01b8658fb4e58d2473fe2d36938f4ab66eb05c6" => :high_sierra - sha256 "ff4ba4b7cad5fa4211bff04d5868521bc21b60995cf40f15bd507abb7c4cbaab" => :sierra - sha256 "ec4898462899cb632329f71dc0b4dd9a13a051aafd6da7dfd22e940e9d1ce01a" => :el_capitan - sha256 "e92218f17ac1926f4651b3e70d3fe42d43b7024e1f10d0ab6f1c7c9dd6bad606" => :yosemite - sha256 "bfd7889688facdf732cf0bf2bb8c7a917df71e80615a5f367468708437c0519e" => :mavericks - 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 7bfd4d08c271f..0000000000000 --- a/Formula/singular.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Singular < Formula - desc "Computer algebra system for polynomial computations" - homepage "https://www.singular.uni-kl.de/" - url "ftp://jim.mathematik.uni-kl.de/pub/Math/Singular/SOURCES/4-1-3/singular-4.1.3p2.tar.gz" - version "4.1.3p2" - sha256 "ee7ac6076d7f8622a1f24d37e9b632bae0700c6e314f56728400be136df64494" - revision 1 - - bottle do - sha256 "ec4a73d624d17771e510be59ee936fdb6575a6651292a95797f3f92f167042c3" => :catalina - sha256 "b1f33f87b56645ba798dddc2ed4492d50dacb02aa8142e6052802e6b6197a711" => :mojave - sha256 "ffc36b5ecccb30537bf16f92e1321d51eaaa9d5faabca727eb4ba2a2f3d555c3" => :high_sierra - end - - head do - url "https://github.com/Singular/Sources.git", :branch => "spielwiese" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "gmp" - depends_on "mpfr" - depends_on "ntl" - depends_on "python@3.8" - - def install - system "./autogen.sh" if build.head? - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-python=#{Formula["python@3.8"].opt_bin}/python3", - "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 a57a6f9df72e1..0000000000000 --- a/Formula/sip.rb +++ /dev/null @@ -1,79 +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://www.riverbankcomputing.com/static/Downloads/sip/4.19.23/sip-4.19.23.tar.gz" - sha256 "22ca9bcec5388114e40d4aafd7ccd0c4fe072297b628d0c5cdfa2f010c0bc7e7" - head "https://www.riverbankcomputing.com/hg/sip", :using => :hg - - bottle do - cellar :any_skip_relocation - sha256 "b2dcfcc119e157da7aa3865e90f4f7a083129b2a4e4a30523570aa54ca3db47f" => :catalina - sha256 "6a092e82f96e2898713e83aca3ee9d9782fc2a9baa1d6a4ac665cb784fdef5a1" => :mojave - sha256 "85cfd373309794850293defa3921a23d010b2ef011bb4a93851fd45349bf2a27" => :high_sierra - end - - depends_on "python@3.8" - - def install - ENV.prepend_path "PATH", Formula["python@3.8"].opt_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 - - version = Language::Python.major_minor_version "python3" - system "python3", "configure.py", - "--deployment-target=#{MacOS.version}", - "--destdir=#{lib}/python#{version}/site-packages", - "--bindir=#{bin}", - "--incdir=#{include}", - "--sipdir=#{HOMEBREW_PREFIX}/share/sip", - "--sip-module", "PyQt5.sip" - system "make" - system "make", "install" - end - - def post_install - (HOMEBREW_PREFIX/"share/sip").mkpath - 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 - - system ENV.cxx, "-shared", "-Wl,-install_name,#{testpath}/libtest.dylib", - "-o", "libtest.dylib", "test.cpp" - system bin/"sip", "-b", "test.build", "-c", ".", "test.sip" - end -end diff --git a/Formula/sipcalc.rb b/Formula/sipcalc.rb deleted file mode 100644 index 832545daec7d6..0000000000000 --- a/Formula/sipcalc.rb +++ /dev/null @@ -1,28 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "4b211b4978bd165adb71435e19f19f146ee84f905555c3bce2d4652375067d3d" => :catalina - sha256 "50bc96758ca5ecdb86fb29ca39bf07f6c4e44192310481436afccc191c6f2cd2" => :mojave - sha256 "9cff165f5e2b98d0c7d4729d4d6309b679cae7d161996242c666053d37134640" => :high_sierra - sha256 "1ccdaec0a816dde9f7caa0f7a77cd984ece78a61a5886032c4c8821915753482" => :sierra - sha256 "56aa686252ac703ed3dbe91f5737ec4d4b95d52516f4ab52947df15b77d1c58f" => :el_capitan - sha256 "6b2fc300755693d382fd5ea971c272a7c8c7bff49614dd88d8db4270aa496012" => :yosemite - sha256 "7ddf7b200984de97143828faf6385314a2ff3f4436432d810e5aaf7dfe44e78c" => :mavericks - 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 c2fe71a3dbdcc..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.6.0/sipp-3.6.0.tar.gz" - sha256 "e47e7b11fec0769cf76b30623a66390333bdb20323c66043ca535460858fa1bb" - - bottle do - cellar :any_skip_relocation - sha256 "6e475cbb06a46ae80606b12897928b601b8280fc16e1467c395687a2a93317b1" => :catalina - sha256 "23616329b56c55eb022b055d31dadfdc79fafe5fc224cd342106a1a59afa46dd" => :mojave - sha256 "822893f07f76031fcd3c0410e2d682dc743c9ac1a9b438361dd1a6a9b6a767b8" => :high_sierra - sha256 "79f72467ed25cb8c6db260a9fa3e8f130058424b980d9daa07f79fce77159296" => :sierra - 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 5f8e81b7aa8d7..0000000000000 --- a/Formula/sipsak.rb +++ /dev/null @@ -1,31 +0,0 @@ -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.7/sipsak-0.9.7.tar.gz" - sha256 "e07f32e692381d9db404d75868218b553e0aba414d35efc96d13024533a53f0f" - license "GPL-2.0" - revision 1 - - bottle do - cellar :any - sha256 "84d9694858c95f7ce07829e602be3d9727b00602ea69bf8e191f79f399f53597" => :catalina - sha256 "5da0bb6fc866723e423714b275cbc6c64ac1e57f171cfe112bda6f9779385ae3" => :mojave - sha256 "6cc0007fe520e225bc0a6b9b646817468acbc1383cb6a4382ae8bf1243ae3e5b" => :high_sierra - sha256 "0d074a6356f127485211b79741fd7f45e7ed9435e4d708e539088a9e9154daea" => :sierra - end - - depends_on "openssl@1.1" - - 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 6a187dc861dec..0000000000000 --- a/Formula/siril.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Siril < Formula - desc "Astronomical image processing tool" - homepage "https://www.siril.org/" - url "https://free-astro.org/download/siril-0.9.12.tar.bz2" - sha256 "9fb7f8a10630ea028137e8f213727519ae9916ea1d88cd8d0cc87f336d8d53b1" - revision 7 - head "https://gitlab.com/free-astro/siril.git" - - bottle do - sha256 "6aa884b1d94327224a2d4569e9c8623d165bb776ef37787fef7daa9ee293ccd5" => :catalina - sha256 "2121781b046151f92c76411a1c95a1a6732c2a970aaacd7a9c86a0dfb0db153f" => :mojave - sha256 "4b7bfcfa644b596ec6dd9348269fbd2f268c445554f51c8812509294f09cd591" => :high_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 "libomp" - depends_on "libraw" - depends_on "librsvg" - depends_on "libsvg" - depends_on "netpbm" - depends_on "opencv" - depends_on "openjpeg" - - def install - # 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 -Xpreprocessor -fopenmp -lomp" - - 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 da3322e940a4f..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.7/sispmctl-4.7.tar.gz" - sha256 "e7d2f32f590984b6f44d758946e57776d68146e47f6cdc41d21c9218f2d2317b" - license "GPL-2.0" - - bottle do - sha256 "81744e45749770c78d2faf4dbbca0acafcfafbcddd13490aa34bc4b0f85376f5" => :catalina - sha256 "99772ae9b4243338477c550297e5c21bddab9ceaee225c92ed4ea0d5a5877eca" => :mojave - sha256 "4acb337efca6d3efb2e6b18457ba8e957ae493869f96f230d1555fcb2db354b8" => :high_sierra - 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 76ae95d49c875..0000000000000 --- a/Formula/sjk.rb +++ /dev/null @@ -1,23 +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.16/sjk-plus-0.16.jar" - sha256 "306c40fbf76b9cb9a09b394116b8a2614b0d9acb3725e845d2a754686a6d3d49" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "sjk-plus-#{version}.jar" - (bin/"sjk").write <<~EOS - #!/bin/bash - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - exec "${JAVA_HOME}/bin/java" -jar "#{libexec}/sjk-plus-#{version}.jar" "$@" - EOS - end - - test do - system bin/"sjk", "jps" - end -end diff --git a/Formula/sk.rb b/Formula/sk.rb deleted file mode 100644 index 50e7c6567831c..0000000000000 --- a/Formula/sk.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Sk < Formula - desc "Fuzzy Finder in rust!" - homepage "https://github.com/lotabout/skim" - url "https://github.com/lotabout/skim/archive/v0.8.2.tar.gz" - sha256 "04af8e9facd8a9f10e9d18f02b78e6d80e987cd58937df960c9b48ae5f42b761" - license "MIT" - head "https://github.com/lotabout/skim.git" - - bottle do - cellar :any_skip_relocation - sha256 "5292b952619fdff305f8124e8ff7342487c2b8904582d21d7d36ee70552e55cb" => :catalina - sha256 "88cd830c34f998238c0bc89e435fa114fd89081bada5e6c04baed79d5f97f2c9" => :mojave - sha256 "cdf01b18bb6d20bbe3063246520e09caf0591490212e1ced07e996027a87dc32" => :high_sierra - end - - depends_on "rust" => :build - - def install - (buildpath/"src/github.com/lotabout").mkpath - ln_s buildpath, buildpath/"src/github.com/lotabout/skim" - system "cargo", "install", *std_cargo_args - - pkgshare.install "install" - bash_completion.install "shell/key-bindings.bash" - bash_completion.install "shell/completion.bash" - fish_completion.install "shell/key-bindings.fish" => "skim.fish" - zsh_completion.install "shell/key-bindings.zsh" - zsh_completion.install "shell/completion.zsh" - man1.install "man/man1/sk.1", "man/man1/sk-tmux.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/skaffold.rb b/Formula/skaffold.rb deleted file mode 100644 index 7e3b812865d5a..0000000000000 --- a/Formula/skaffold.rb +++ /dev/null @@ -1,42 +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 => "v1.12.0", - :revision => "e680a831292e1c7efc54e0c6d40544ae141e6354" - license "Apache-2.0" - head "https://github.com/GoogleContainerTools/skaffold.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "a65ba65d09aca5b697659f58f82bc8bd7d34ae7872da49f016b7070cbb618579" => :catalina - sha256 "974c2373082bffc216eee09d615d4092c8a6c88ead8ecb335c6b6fa7c33d072f" => :mojave - sha256 "f2e08dfbfb815b67a93e88c6640ed44041b5bbd92025e5077af9c7f581cc51dc" => :high_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" - - output = Utils.safe_popen_read("#{bin}/skaffold", "completion", "bash") - (bash_completion/"skaffold").write output - - output = Utils.safe_popen_read("#{bin}/skaffold", "completion", "zsh") - (zsh_completion/"_skaffold").write output - - 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 60cf549983ae9..0000000000000 --- a/Formula/skafos.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Skafos < Formula - desc "CLI for the Metis Machine A.I. and machine learning deployment platform" - homepage "https://skafos.ai/" - url "https://github.com/MetisMachine/skafos/archive/1.7.7.tar.gz" - sha256 "42eecd6094126f1e4febf94541c4b640f2b4ed39829af2686cd83a60fafcd994" - license "Apache-2.0" - revision 2 - - bottle do - cellar :any - sha256 "2f1a06251a8e92a986afbefbfc380dd50c237bf0a59546ebcb89ee4f31b73e3a" => :catalina - sha256 "c487b351e95ab98ef03e4184020bda27b1cdc8353cfb505a54e75036731cfe0e" => :mojave - sha256 "57dc00bd0e8bfc96998c690cbd77a7c4c6486d50655603bfdf65771e340ee6b6" => :high_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 "Please enter email", shell_output("expect -f test.exp") - end -end diff --git a/Formula/ski.rb b/Formula/ski.rb deleted file mode 100644 index 2d9b9a1672523..0000000000000 --- a/Formula/ski.rb +++ /dev/null @@ -1,31 +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.13.tar.gz" - sha256 "34e95547ecfe7b3791df0a81fef9af422ececf49b1aa1e93bbb1ba067ccdc955" - - bottle do - cellar :any_skip_relocation - sha256 "b647b2162475b1dccee3afe7d6d878108fc3ac97826756c355b0c8b748143253" => :catalina - sha256 "b647b2162475b1dccee3afe7d6d878108fc3ac97826756c355b0c8b748143253" => :mojave - sha256 "b647b2162475b1dccee3afe7d6d878108fc3ac97826756c355b0c8b748143253" => :high_sierra - end - - head do - url "https://gitlab.com/esr/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 3d23b385fd2c6..0000000000000 --- a/Formula/skinny.rb +++ /dev/null @@ -1,24 +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.1.0/skinny-3.1.0.tar.gz" - sha256 "4c5661f73bda7d5ccb5a8966efe801951e2a343cf152ac6e9a06d287c5c8712d" - license "MIT" - - bottle :unneeded - depends_on "openjdk" - - def install - libexec.install Dir["*"] - (bin/"skinny").write <<~EOS - #!/bin/bash - export PATH=#{bin}:$PATH - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - PREFIX="#{libexec}" exec "#{libexec}/skinny" "$@" - EOS - end - - test do - system bin/"skinny", "new", "myapp" - end -end diff --git a/Formula/skktools.rb b/Formula/skktools.rb deleted file mode 100644 index 4351214830a7a..0000000000000 --- a/Formula/skktools.rb +++ /dev/null @@ -1,85 +0,0 @@ -class Skktools < Formula - desc "SKK dictionary maintenance tools" - homepage "https://github.com/skk-dev/skktools" - url "https://deb.debian.org/debian/pool/main/s/skktools/skktools_1.3.4.orig.tar.gz" - sha256 "84cc5d3344362372e0dfe93a84790a193d93730178401a96248961ef161f2168" - revision 1 - - bottle do - cellar :any - sha256 "c10f7baf6bc379ed47fc82b5bf1dd2ae8cbc53c358f5c838e87d8440ae8c5ebd" => :catalina - sha256 "e3e3033a8f0d05939c9ebe2ab73cff7377351a36b8276337c920026c27d0a127" => :mojave - sha256 "65826868e8d1ca3d310ebc14e2aadc281b09751220e3310643b4e2aa4ab9ee68" => :high_sierra - sha256 "b190a2b730f1604ac76725e99c5fd9927ed5a7cbba905291f017b77fee1e3c85" => :sierra - 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 381a5c8ae822d..0000000000000 --- a/Formula/skopeo.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Skopeo < Formula - desc "Work with remote images registries" - homepage "https://github.com/containers/skopeo" - url "https://github.com/containers/skopeo/archive/v1.1.0.tar.gz" - sha256 "3bd3acc614514fc2261b89dc0ea85ac7a4dba64fb7dcef8676ae61849e8faeb4" - license "Apache-2.0" - - bottle do - rebuild 1 - sha256 "753326edd62a8eef7b5e6fe41828d65f7515b9234865e050f76aca73520f1cd6" => :catalina - sha256 "c0573c720ad51ded6e76420d1e9939b6ed04fc2f2f2eaaed726285c7c0230db3" => :mojave - sha256 "76e3c0cb6daec487ffbbe50755faa297805bd287108eb7e3b9cd184842206b7b" => :high_sierra - end - - depends_on "go" => :build - depends_on "gpgme" - - on_linux do - depends_on "pkg-config" => :build - end - - def install - ENV["CGO_ENABLED"] = "1" - ENV.append "CGO_FLAGS", ENV.cppflags - ENV.append "CGO_FLAGS", Utils.safe_popen_read("#{Formula["gpgme"].bin}/gpgme-config", "--cflags") - - buildtags = [ - "containers_image_ostree_stub", - Utils.safe_popen_read("hack/btrfs_tag.sh").chomp, - Utils.safe_popen_read("hack/btrfs_installed_tag.sh").chomp, - Utils.safe_popen_read("hack/libdm_tag.sh").chomp, - ].uniq.join(" ") - - ldflags = [ - "-X main.gitCommit=", - "-X github.com/containers/image/v5/docker.systemRegistriesDirPath=#{etc/"containers/registries.d"}", - "-X github.com/containers/image/v5/internal/tmpdir.unixTempDirForBigFiles=/var/tmp", - "-X github.com/containers/image/v5/signature.systemDefaultPolicyPath=#{etc/"containers/policy.json"}", - "-X github.com/containers/image/v5/pkg/sysregistriesv2.systemRegistriesConfPath=" \ - "#{etc/"containers/registries.conf"}", - ].join(" ") - - system "go", "build", "-tags", buildtags, "-ldflags", ldflags, *std_go_args, "./cmd/skopeo" - - (etc/"containers").install "default-policy.json" => "policy.json" - (etc/"containers/registries.d").install "default.yaml" - - bash_completion.install "completions/bash/skopeo" - end - - test do - cmd = "#{bin}/skopeo --override-os linux inspect 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/skylighting.rb b/Formula/skylighting.rb deleted file mode 100644 index 9d56eb37889ea..0000000000000 --- a/Formula/skylighting.rb +++ /dev/null @@ -1,117 +0,0 @@ -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/0.8.5.tar.gz" - sha256 "c77298809f7301b23bf2e8d479fde6be493bec42c36efce87ef37ac3bc27f112" - head "https://github.com/jgm/skylighting.git" - - bottle do - cellar :any_skip_relocation - sha256 "ad47fed610330a0acdb8c452bae67188e7d6fe7c480bf77d009134767cdda8d2" => :catalina - sha256 "5e42120c8f8a483d79f874f34d75173b94589bf202d694551af4ab3579f31524" => :mojave - sha256 "d2d99c49b0aaea3c3d4cbfc672bb2ea9de65336b6eb696f59e6edc03cb962184" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.8" => :build - - 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", "-fexecutable", *std_cabal_v2_args - mv buildpath/"skylighting.cabal.temp-loc", buildpath/"skylighting/skylighting.cabal" - - cd "skylighting" do - system bin/"skylighting-extract", *Dir[buildpath/"skylighting-core/xml/*.xml"] - end - system "cabal", "v2-install", buildpath/"skylighting", "-fexecutable", *std_cabal_v2_args - end - - test do - (testpath/"Test.java").write <<~EOF - 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(); - } - } - } - EOF - expected_out = <<~EOF - \\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{#{testpath/"Test.java"}} - - \\begin{document} - \\maketitle - \\begin{Shaded} - \\begin{Highlighting}[] - \\KeywordTok{import}\\ImportTok{ java.util.*;} - - \\KeywordTok{public} \\KeywordTok{class}\\NormalTok{ Test \\{} - \\KeywordTok{public} \\DataTypeTok{static} \\DataTypeTok{void} \\FunctionTok{main}\\NormalTok{(}\\BuiltInTok{String}\\NormalTok{[] args) }\\KeywordTok{throws} \\BuiltInTok{Exception}\\NormalTok{ \\{} - \\DataTypeTok{final} \\BuiltInTok{ArrayDeque}\\NormalTok{\\textless{}}\\BuiltInTok{String}\\NormalTok{\\textgreater{} argDeque = }\\KeywordTok{new} \\BuiltInTok{ArrayDeque}\\NormalTok{\\textless{}\\textgreater{}(}\\BuiltInTok{Arrays}\\NormalTok{.}\\FunctionTok{asList}\\NormalTok{(args));} - \\KeywordTok{for}\\NormalTok{ (arg in argDeque) \\{} - \\BuiltInTok{System}\\NormalTok{.}\\FunctionTok{out}\\NormalTok{.}\\FunctionTok{println}\\NormalTok{(arg);} - \\KeywordTok{if}\\NormalTok{ (arg.}\\FunctionTok{equals}\\NormalTok{(}\\StringTok{\"foo\"}\\NormalTok{))} - \\KeywordTok{throw} \\KeywordTok{new} \\BuiltInTok{NoSuchElementException}\\NormalTok{();} - \\NormalTok{ \\}} - \\NormalTok{ \\}} - \\NormalTok{\\}} - \\end{Highlighting} - \\end{Shaded} - - \\end{document} - EOF - actual_out = shell_output("#{bin/"skylighting"} -f latex #{testpath/"Test.java"}") - assert_equal actual_out.strip, expected_out.strip - end -end diff --git a/Formula/skymaker.rb b/Formula/skymaker.rb deleted file mode 100644 index 78f850a2d7a68..0000000000000 --- a/Formula/skymaker.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Skymaker < Formula - desc "Generates fake astronomical images" - homepage "https://www.astromatic.net/software/skymaker" - url "https://www.astromatic.net/download/skymaker/skymaker-3.10.5.tar.gz" - sha256 "a16f9c2bd653763b5e1629e538d49f63882c46291b479b4a4997de84d8e9fb0f" - - bottle do - cellar :any - sha256 "af78e7af9c84517e8f7db071ef3718a34eafc39d6eac3357d77ee183d4fe2cdf" => :catalina - sha256 "ef2182885eb6952289057ce2756ac56ec9a88397e746b694529a937eaa28b943" => :mojave - sha256 "6e7aa4c817624d5631293d0421b25eec132e41bfe3d75f9044a85dd02f73de4a" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "fftw" - - def install - system "autoconf" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make" - system "make", "install" - end - - test do - assert_match "added", shell_output("#{bin}/sky 2>&1") - end -end diff --git a/Formula/sl.rb b/Formula/sl.rb deleted file mode 100644 index ab79ad81a1ddb..0000000000000 --- a/Formula/sl.rb +++ /dev/null @@ -1,30 +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 "31b8e67d984635b74aec3a5b47b6145789ed9c09d065751cac862eec1386502d" => :catalina - sha256 "e489648bcc7eff8f065855dcc891eb55f3793a5ff464d96726e313a1bc74d00f" => :mojave - sha256 "627b0b5f8027f876466d03038da7dd0d75804cccc3bbcf45f0fe9c91199be3c3" => :high_sierra - sha256 "afd30cb3a99d238a8ac52810834244d5f47fc2ff597db9ad61012bd2014395b9" => :sierra - sha256 "f186cb86f4d48929aa671434dbd6be0a861069608098a30dc952697bcca85972" => :el_capitan - sha256 "696104243a18e08279d461e66e6a696791e6c36b67df43e361ad6f6de1200440" => :yosemite - sha256 "c7d4432bfc169f7338eeb0c8300a975495b229d6e85bfff4fdd6bbd11eb8da17" => :mavericks - end - - uses_from_macos "ncurses" - - 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 0ba613e78f254..0000000000000 --- a/Formula/slackcat.rb +++ /dev/null @@ -1,31 +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.6.tar.gz" - sha256 "e5c8f98f3048cccc3f8e49c0449435a839a18c7f12426643ac80731b63b829a9" - - bottle do - cellar :any_skip_relocation - sha256 "31ab32e1c07a54dd6e06900a990f2e4b82295273155f25332596c17671d33b9f" => :catalina - sha256 "b8fb7acbcb922af01da7e97b7c3ef303dcda92762996d2ad9a12ffec1bfea608" => :mojave - sha256 "4a5566659aedb0453c68c468c65521b53d0602113a940b50afab759488b4997c" => :high_sierra - sha256 "80ed662db0f0e057a2346e25244b52fd3019fdb6f1af1e809b03392a82d0dcd9" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - src = buildpath/"src/github.com/vektorlab/slackcat" - src.install buildpath.children - src.cd do - 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 a1cb66226a769..0000000000000 --- a/Formula/slacknimate.rb +++ /dev/null @@ -1,37 +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" - license "MPL-2.0" - head "https://github.com/mroth/slacknimate.git" - - bottle do - cellar :any_skip_relocation - sha256 "b21fd67e3132848ed429cc51ae5b620083351855384f9e1ff8a4d8612204fc65" => :catalina - 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 8fc11240322e6..0000000000000 --- a/Formula/slashem.rb +++ /dev/null @@ -1,61 +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 "96fc5b1abd0e8deff9573c43656e7f3caa25b51d28eb8f426cec7c28131ab4b0" => :catalina - 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 1440203e4a7ae..0000000000000 --- a/Formula/sleepwatcher.rb +++ /dev/null @@ -1,61 +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.1.tgz" - sha256 "4bf1656702167871141fbc119a844d1363d89994e1a67027f0e773023ae9643e" - - bottle do - cellar :any_skip_relocation - sha256 "45c9c42ac76f9e9f85b0dbc2cb2251fe74448322196ac0ba10b93c416121db2a" => :catalina - sha256 "eb160c23f9d92aed8d4bdfa24607a5bb343ad65dd487cb7a8570ac479bd05dd7" => :mojave - sha256 "2c050aa5845cdf24b06f17bc1b4191941e4cf57cf1092f17fe35fe0e7f28159a" => :high_sierra - sha256 "0cecea617ee9334f717a2e2e0424b944dedcc7cd403776c1cf6ff67352b96f4c" => :sierra - 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_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 - - # 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 4d55703b204ae..0000000000000 --- a/Formula/sleuthkit.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Sleuthkit < Formula - desc "Forensic toolkit" - homepage "https://www.sleuthkit.org/" - url "https://github.com/sleuthkit/sleuthkit/releases/download/sleuthkit-4.9.0/sleuthkit-4.9.0.tar.gz" - sha256 "7bc5ee9130b1ed8d645e446e0f63bd34ad018a93c1275688fa38cfda28bde9d0" - - bottle do - cellar :any - sha256 "e3bb514d3df5d19a066b27a455f04066dbaefbf0bfd80f3a10d5cbf73f7549f5" => :catalina - sha256 "9f912c67f95edfa547d9fcc03d63920d3b47964aeb5e8f548d2df5e2635ef0ed" => :mojave - sha256 "1234854d9ae4a77d083d94d9a1d0f21891d479bf80a87191f6df68076506de2d" => :high_sierra - end - - depends_on "ant" => :build - depends_on "afflib" - depends_on "libewf" - depends_on "libpq" - depends_on "openjdk" - - uses_from_macos "sqlite" - - conflicts_with "ffind", - :because => "both install a `ffind` executable" - - def install - ENV["JAVA_HOME"] = Formula["openjdk"].opt_libexec/"openjdk.jdk/Contents/Home" - ENV["ANT_FOUND"]=Formula["ant"].opt_bin/"ant" - ENV["SED"]="/usr/bin/sed" - ENV.append_to_cflags "-DNDEBUG" - - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - 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 ac5022dec0d07..0000000000000 --- a/Formula/slimerjs.rb +++ /dev/null @@ -1,30 +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 76a6cc7089803..0000000000000 --- a/Formula/sloc.rb +++ /dev/null @@ -1,40 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "91254bb1e206f528b6b7d7a9afbdeec8390cfc54ad13d0850cc202d6242e08d0" => :catalina - 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 fcc354b7e6098..0000000000000 --- a/Formula/sloccount.rb +++ /dev/null @@ -1,47 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "11a3ecc7f2a5bbc0f2bb4836e03c799049b3bada8438220dcd827ca37fd2a200" => :catalina - sha256 "b9a52de5de2a1be5fd606412ab8db8a55279da49d79f9812d59294a587aaa7c4" => :mojave - sha256 "04a4c12a83cb655a8f2f69178905af19e2786927ef7a4e9d0020e870ce35fcbd" => :high_sierra - 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/slowhttptest.rb b/Formula/slowhttptest.rb deleted file mode 100644 index 28c7fb07378bd..0000000000000 --- a/Formula/slowhttptest.rb +++ /dev/null @@ -1,27 +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.8.1.tar.gz" - sha256 "95f43a18efbdfaa088acf0e2d6ce0fc4f4fc33a7486cd536d327a6ba71de30e7" - license "Apache-2.0" - head "https://github.com/shekyan/slowhttptest.git" - - bottle do - cellar :any - sha256 "579f26294a1ed9ddf40957b71df0c5663951229264e38d040d705aafdc202cee" => :catalina - sha256 "8049b768fa761db677a06931d0ed19676be4783afa67950e498fa2136a175990" => :mojave - sha256 "52b9a275cc949a58917c33aa839dbeb7f0c4b932e5b432ac1b3e05ed445141af" => :high_sierra - end - - depends_on "openssl@1.1" - - 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 e9c0400e835e2..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" - revision 1 - head "git://git.jedsoft.org/git/slrn.git" - - bottle do - sha256 "de190a3f3793acd7d8e50dc82231e7ad94535621bc4c37a34efcc1907c295296" => :catalina - sha256 "9dcfea5ecabef7b65a480fec81ab5b1dcc7a67d45bb8fab0d35821684ab56d0e" => :mojave - sha256 "417197dcbd30a8330f2a3a1e5171b2f3c2ed7869cca8d2fb302108ae391f4072" => :high_sierra - sha256 "dac0b018eb8f1d53b69ae27ca121510806f0eb9bbdcdbdd119295bd022a8faaf" => :sierra - end - - depends_on "openssl@1.1" - 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@1.1"].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 13a69798fa5ee..0000000000000 --- a/Formula/slugify.rb +++ /dev/null @@ -1,19 +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" - license "MIT" - 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 66f290d80254b..0000000000000 --- a/Formula/slurm.rb +++ /dev/null @@ -1,28 +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 "7c177b599a6612e1b6e7f68dfe44dc7f23b71788548eab184b33d03d5a5d8da8" => :catalina - 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 a582b35a54fb0..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 "c09f4bc9cdcaa26dddc33ec021083885ed7d9236b2af2c87713446ad1a0cb538" => :catalina - sha256 "6dd776264c5583a982b9a8270956c84274387719aeae7b057d7c581ebc438c70" => :mojave - sha256 "5b1860ab709b7a27201f781f31a34ccf6db6da600ef60741fd918a95c3beedb7" => :high_sierra - sha256 "b1afe84c5a7b535738d2b2ee3f2abf879c908cf4f3b9c5a6f9f9cdd3fc403536" => :sierra - sha256 "a5cb6ea4fab2d0ce67342f482fd0efb4dcc20483722e56ae120880d2a97ebab0" => :el_capitan - sha256 "c1420a59ceba43481eac2b2046a7d3c4aac967a12ff52bccb3b4697eca8d5c8f" => :yosemite - sha256 "4e8157c27f8ab0d5ad2c9673a86357f38acfabea1ac4eef80c54e8141dfdb336" => :mavericks - 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 a0f3d295664dc..0000000000000 --- a/Formula/smali.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Smali < Formula - desc "Assembler/disassembler for Android's Java VM implementation" - homepage "https://github.com/JesusFreke/smali" - url "https://github.com/JesusFreke/smali/archive/v2.4.0.tar.gz" - sha256 "6a9014ecffd7d374f1b9e3c236b11d18a8d8f9c33dbb8ca171c79cc243a0f902" - - bottle do - cellar :any_skip_relocation - sha256 "efa9c4eae8301de352ce02cb8180a8e21c4df6e6aaf080e9dfd7ec493a1467ba" => :catalina - sha256 "cd91042aa24ff1f209ce3b4461114f9c2cfb773df77258a029449873e2eab9ed" => :mojave - sha256 "3c6001a0005d2b80c5e646a0823cc48cd752f9ad37e9badc50d3d100a0a88885" => :high_sierra - end - - depends_on "gradle" => :build - depends_on "openjdk" - - def install - system "gradle", "build", "--no-daemon" - - %w[smali baksmali].each do |name| - jarfile = "#{name}-#{version}-dev-fat.jar" - - libexec.install "#{name}/build/libs/#{jarfile}" - - (bin/name).write <<~EOS - #!/bin/bash - export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - exec "${JAVA_HOME}/bin/java" -jar "#{libexec}/#{jarfile}" "$@" - EOS - 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 a8bec1f1d76d2..0000000000000 --- a/Formula/smartmontools.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Smartmontools < Formula - desc "SMART hard drive monitoring" - homepage "https://www.smartmontools.org/" - url "https://downloads.sourceforge.net/project/smartmontools/smartmontools/7.1/smartmontools-7.1.tar.gz" - sha256 "3f734d2c99deb1e4af62b25d944c6252de70ca64d766c4c7294545a2e659b846" - license "GPL-2.0" - - bottle do - sha256 "cc34524c76ff39abb4afc6794fe404e257cf04816c1d2c33f8edd158e5677239" => :catalina - sha256 "cce7b82f81c999afcd180dd7fb1ef471bfb24d9934dc3ad326d86db7ea478f2c" => :mojave - sha256 "77b4722b7ffc997a2b5482518f291640fcabc45468ae5fca12520943869263be" => :high_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 a0b8feb4801a1..0000000000000 --- a/Formula/smimesign.rb +++ /dev/null @@ -1,35 +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/v0.0.13.tar.gz" - sha256 "baf3e1c0a64ca1d49be8a4e99640679ba2b2870e907e88be1e9c7f1566d0f206" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "7c0b7b8a34d0b16789c28fb6381623b25d6f3d1e81b4b07f1c1defe930373230" => :catalina - sha256 "c9eb62971a802249e91849385dd3ec535f163dfe0be0ce5de52d56dae08789b5" => :mojave - sha256 "468d431ade8f15633d1ae6a9bc6b108122d8ea6ad7e99a956eff52c09ad29ba9" => :high_sierra - sha256 "5e08213a38d69edfc45b1ffc8c2ba97ba13226f267b601648b3ed77e5b3ff12d" => :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/smlpkg.rb b/Formula/smlpkg.rb deleted file mode 100644 index 0380334351d4e..0000000000000 --- a/Formula/smlpkg.rb +++ /dev/null @@ -1,35 +0,0 @@ -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/v0.1.3.tar.gz" - sha256 "cfa7eeff951e04df428694fda38917ee2aaaf0532e2d1dbea7ab4c150f4fe2f0" - license "MIT" - head "https://github.com/diku-dk/smlpkg.git" - - bottle do - cellar :any_skip_relocation - sha256 "a586b7393075b749b525aee9aedb42b42e8f961997764000b34cb95b1b3da4e9" => :catalina - sha256 "e2641ae3cb473051e55ae1163b72018028415195b4971a1254fe7cd1f57efb26" => :mojave - sha256 "27f4bec44d28a9903d720632f1a2ac71c0091a564a0e26c0e896fac4f2becf22" => :high_sierra - end - - depends_on "mlkit" - - def install - 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/smpeg.rb b/Formula/smpeg.rb deleted file mode 100644 index c907305149c08..0000000000000 --- a/Formula/smpeg.rb +++ /dev/null @@ -1,48 +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 "929cb2fe89f7525acbf38a269bde8aaf07f7b2d406007ee9df2d21051a0ccba6" => :catalina - 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 0ed139d426d85..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 "97d4ca204752184752822f6c4bbbff2e044d110917f6a0ce30c3c472d6cb622c" => :catalina - sha256 "4ecef89d7ee22d5d23703a5ac29fb6b4fc0cd025e249219a194ca325d79dfa85" => :mojave - sha256 "927cb1d5dd58481afd16e893868a0794b42d56588e7fe9d51b881812e2f26eb6" => :high_sierra - sha256 "05ea6a84c6ff07c3c88e89f0ecd153c5cd92866d3edb8cc4b4dfd06f445971b7" => :sierra - sha256 "52aba7403eee04f66c9184a741354b747dfcd0994fa3bd7de9058b65a30fcf19" => :el_capitan - sha256 "6031bf704fd0508bb90322dbe77f62580708e3fe77362e3dea6b0691360b686b" => :yosemite - sha256 "fa5760a0f8ff18f596b0044a0da7562a361904f2520a7406c3681ace8a705950" => :mavericks - 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/sn0int.rb b/Formula/sn0int.rb deleted file mode 100644 index 8e1eb3ee0f0fe..0000000000000 --- a/Formula/sn0int.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Sn0int < Formula - desc "Semi-automatic OSINT framework and package manager" - homepage "https://github.com/kpcyrd/sn0int" - url "https://github.com/kpcyrd/sn0int/archive/v0.19.1.tar.gz" - sha256 "4720736805bec49102f0622ba6b68cc63da0a023a029687140d5b4d2a4d637dc" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "618417dd910df3bb10c461c4e5b41f202c23ce24bf39043e5b88e544bc56df0a" => :catalina - sha256 "cff5e42d3b5e9e44b92f437601ef1764f93df0f5bb259ec0d683cd4d2be59e83" => :mojave - sha256 "66382b358f95db51620653c1120e903dd009a8a2e4be25c759593a01956df48d" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "sphinx-doc" => :build - depends_on "libsodium" - - uses_from_macos "sqlite" - - def install - system "cargo", "install", *std_cargo_args - - system "#{bin}/sn0int completions bash > sn0int.bash" - system "#{bin}/sn0int completions fish > sn0int.fish" - system "#{bin}/sn0int completions zsh > _sn0int" - - bash_completion.install "sn0int.bash" - fish_completion.install "sn0int.fish" - zsh_completion.install "_sn0int" - - system "make", "-C", "docs", "man" - man1.install "docs/_build/man/sn0int.1" - end - - test do - (testpath/"true.lua").write <<~EOS - -- Description: basic selftest - -- Version: 0.1.0 - -- License: GPL-3.0 - - function run() - -- nothing to do here - end - EOS - system "#{bin}/sn0int", "run", "-vvxf", testpath/"true.lua" - end -end diff --git a/Formula/snag.rb b/Formula/snag.rb deleted file mode 100644 index b419b26e65ee4..0000000000000 --- a/Formula/snag.rb +++ /dev/null @@ -1,48 +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" - license "MIT" - head "https://github.com/Tonkpils/snag.git" - - bottle do - cellar :any_skip_relocation - sha256 "008cc64d1a65693bf1773affb86ed185d5c91382f80f252877a5a6334986527a" => :catalina - 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 fe2970d1a8e23..0000000000000 --- a/Formula/snakemake.rb +++ /dev/null @@ -1,166 +0,0 @@ -class Snakemake < Formula - include Language::Python::Virtualenv - - desc "Pythonic workflow system" - homepage "https://snakemake.readthedocs.io/" - url "https://files.pythonhosted.org/packages/35/12/cbfa658606844ba73417aefc6fa40bb3e55e13b5a6727c79fa3fc0d494ca/snakemake-5.20.0.tar.gz" - sha256 "f04b3985d16319b74972367a306eea2712015460a4bf50d5750e4dbfa0f46678" - license "MIT" - head "https://github.com/snakemake/snakemake.git" - - bottle do - cellar :any_skip_relocation - sha256 "4d5e4dbd8fdf1ce17e9c5f2f3eee462786ab468aa105eac22ff93f0a2070fa8d" => :catalina - sha256 "2e90e7ab4c185b6b92b5c9076de050efc2c7246f301c3d8a8193bbd1bd4d5735" => :mojave - sha256 "f15b2c56a8574629f49c503a63bc7cecaca504eaee2353bd957521f3bf15cfd1" => :high_sierra - end - - depends_on "python@3.8" - - 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/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - 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/bb/79/3045743bb26ca2e44a1d317c37395462bfed82dbbd38e69a3280b63696ce/ConfigArgParse-1.2.3.tar.gz" - sha256 "edd17be986d5c1ba2e307150b8e5f5107aba125f3574dddd02c85d5cdcfd37dc" - end - - resource "datrie" do - url "https://files.pythonhosted.org/packages/9d/fe/db74bd405d515f06657f11ad529878fd389576dca4812bea6f98d9b31574/datrie-0.8.2.tar.gz" - sha256 "525b08f638d5cf6115df6ccd818e5a01298cd230b2dac91c8ff2e6499d18765d" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/2f/e0/3d435b34abd2d62e8206171892f174b180cd37b09d57b924ca5c2ef2219d/docutils-0.16.tar.gz" - sha256 "c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc" - end - - resource "gitdb" do - url "https://files.pythonhosted.org/packages/d1/05/eaf2ac564344030d8b3ce870b116d7bb559020163e80d9aa4a3d75f3e820/gitdb-4.0.5.tar.gz" - sha256 "c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9" - end - - resource "GitPython" do - url "https://files.pythonhosted.org/packages/5b/ef/96dd6b06400821bbad3f7e275f4a4f88af324124c5c04958e2f2c14ce2c8/GitPython-3.1.3.tar.gz" - sha256 "e107af4d873daed64648b4f4beb89f89f0cfbe3ef558fc7821ed2331c2f8da1a" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz" - sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6" - end - - resource "ipython_genutils" do - url "https://files.pythonhosted.org/packages/e8/69/fbeffffc05236398ebfcfb512b6d2511c622871dca1746361006da310399/ipython_genutils-0.2.0.tar.gz" - sha256 "eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" - sha256 "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" - end - - resource "jupyter-core" do - url "https://files.pythonhosted.org/packages/28/64/8bdde111be57a2a3d54376db29b5f25ab9c68ffd3d6554989db24d5c1b7a/jupyter_core-4.6.3.tar.gz" - sha256 "394fd5dd787e7c8861741880bdf8a00ce39f95de5d18e579c74b882522219e7e" - end - - resource "nbformat" do - url "https://files.pythonhosted.org/packages/95/8e/8ffd07ed059a6277fe2f72d1fa411b49a8e512ad62f2ed20b9c2438192dd/nbformat-5.0.7.tar.gz" - sha256 "54d4d6354835a936bad7e8182dcd003ca3dc0cedfee5a306090e04854343b340" - end - - resource "psutil" do - url "https://files.pythonhosted.org/packages/c4/b8/3512f0e93e0db23a71d82485ba256071ebef99b227351f0f5540f744af41/psutil-5.7.0.tar.gz" - sha256 "685ec16ca14d079455892f25bd124df26ff9137664af445563c1bd36629b5e0e" - end - - resource "pyrsistent" do - url "https://files.pythonhosted.org/packages/9f/0d/cbca4d0bbc5671822a59f270e4ce3f2195f8a899c97d0d5abb81b191efb5/pyrsistent-0.16.0.tar.gz" - sha256 "28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - 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/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "smmap" do - url "https://files.pythonhosted.org/packages/75/fb/2f594e5364f9c986b2c89eb662fc6067292cb3df2b88ae31c939b9138bb9/smmap-3.0.4.tar.gz" - sha256 "9c98bbd1f9786d22f14b3d4126894d56befb835ec90cef151af566c7e19b5d24" - end - - resource "toposort" do - url "https://files.pythonhosted.org/packages/e5/d8/9bc1598ddf74410beba243ffeaee8d0b3ca7e9ac5cefe77367da497433e1/toposort-1.5.tar.gz" - sha256 "dba5ae845296e3bf37b042c640870ffebcdeb8cd4df45adaa01d8c5476c557dd" - end - - resource "traitlets" do - url "https://files.pythonhosted.org/packages/75/b0/43deb021bc943f18f07cbe3dac1d681626a48997b7ffa1e7fb14ef922b21/traitlets-4.3.3.tar.gz" - sha256 "d023ee369ddd2763310e4c3eae1ff649689440d4ae59d7485eb4cfbbe3e359f7" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "wrapt" do - url "https://files.pythonhosted.org/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz" - sha256 "b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" - end - - def install - virtualenv_install_with_resources - 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_predicate testpath/"test.out", :exist? - assert_match "Building DAG of jobs...", test_output - end -end diff --git a/Formula/snap-telemetry.rb b/Formula/snap-telemetry.rb deleted file mode 100644 index 0620cfce1ec81..0000000000000 --- a/Formula/snap-telemetry.rb +++ /dev/null @@ -1,59 +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" - license "Apache-2.0" - head "https://github.com/intelsdi-x/snap.git" - - bottle do - cellar :any_skip_relocation - sha256 "6f52483af1ce2785dc7e9bf0fdc202430c61b804ef3a67e2487d669bf27edcb1" => :catalina - 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 b556c626b1d5c..0000000000000 --- a/Formula/snap7.rb +++ /dev/null @@ -1,28 +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 "015a23b1cb6728a86716811511e51fba427c69febabd1af5507af31d77523802" => :catalina - sha256 "71aff7cbb3e78369d6b9a93887820dd7def1afe382ed82211be313942e1bb81d" => :mojave - sha256 "b0d670ce6a2d780d13cfaa3346c6aa701f280a85be010dc42c802d6ebd028694" => :high_sierra - sha256 "e04dea88411f3b444dcab340d3f11bd739fb853de65701e727546a9481981924" => :sierra - end - - def install - lib.mkpath - system "make", "-C", "build/osx", - "-f", "x86_64_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 02f996640b1d9..0000000000000 --- a/Formula/snapcraft.rb +++ /dev/null @@ -1,266 +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://github.com/snapcore/snapcraft.git", - :tag => "4.0.7", - :revision => "7d1f7fb24e7f832ad2ccb82d6178dc4a69b6502e" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "83a8e4d83308c7dbad54322b45a6a6cf688e72739add603442a981730aa6d6bb" => :catalina - sha256 "c4b12018c1077c2c1dbc999f5acd6eb54e896576ab6539cb4806401605b90ac3" => :mojave - sha256 "5a8d564262da1d6538e205b7ec53a6fe2cf6f174a3163c7164e3f9052465b4b7" => :high_sierra - end - - depends_on "libsodium" - depends_on "libyaml" - depends_on "lxc" - depends_on "python@3.8" - depends_on "squashfs" - depends_on "xdelta" - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" - sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" - 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 "configobj" do - url "https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz" - sha256 "a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902" - end - - resource "configparser" do - url "https://files.pythonhosted.org/packages/e5/7c/d4ccbcde76b4eea8cbd73b67b88c72578e8b4944d1270021596e80b13deb/configparser-5.0.0.tar.gz" - sha256 "2ca44140ee259b5e3d8aaf47c79c36a7ab0d5e94d70bd4105c03ede7a20ea5a1" - end - - resource "cookies" do - url "https://files.pythonhosted.org/packages/f3/95/b66a0ca09c5ec9509d8729e0510e4b078d2451c5e33f47bd6fc33c01517c/cookies-2.2.1.tar.gz" - sha256 "d6b698788cae4cfa4e62ef8643a9ca332b79bd96cb314294b864ae8d7eb3ee8e" - end - - resource "httplib2" do - url "https://files.pythonhosted.org/packages/98/3f/0769a851fbb0ecc458260055da67d550d3015ebe6b8b861c79ad00147bb9/httplib2-0.18.1.tar.gz" - sha256 "8af66c1c52c7ffe1aa5dc4bcd7c769885254b0756e6e69f953c7f0ab49a70ba3" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz" - sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6" - end - - resource "importlib_metadata" do - url "https://files.pythonhosted.org/packages/e2/ae/0b037584024c1557e537d25482c306cf6327b5a09b6c4b893579292c1c38/importlib_metadata-1.7.0.tar.gz" - sha256 "90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83" - end - - resource "jsonschema" do - url "https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" - sha256 "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" - end - - resource "launchpadlib" do - url "https://files.pythonhosted.org/packages/af/23/d97442ef2e13db4648608a9e1a5822b9ff5e25e7f05013b8a57343120e85/launchpadlib-1.10.13.tar.gz" - sha256 "5804d68ec93247194449d17d187e949086da0a4d044f12155fad269ef8515435" - end - - resource "lazr.restfulclient" do - url "https://files.pythonhosted.org/packages/4a/2f/14812d3b0808c594c1e090505229d5ae31d55eb93c23417d91b3a1f57853/lazr.restfulclient-0.14.3.tar.gz" - sha256 "9f28bbb7c00374159376bd4ce36b4dacde7c6b86a0af625aa5e3ae214651a690" - end - - resource "lazr.uri" do - url "https://files.pythonhosted.org/packages/8e/c5/92c55bb9b3a513e149638de695baec243dbfabb0823bcf6185263028eb84/lazr.uri-1.0.5.tar.gz" - sha256 "f36e7e40d5f8f2cf20ff2c81784a14a546e6c19c216d40a6617ebe0c96c92c49" - end - - resource "libnacl" do - url "https://files.pythonhosted.org/packages/08/9b/16725e8cbb278569db379ea6e4eb24b2e8c574be1ec7617ac2dff8f91b2b/libnacl-1.7.1.tar.gz" - sha256 "33f31c4686541aee24876706b46a846f93c60e62d6b4211bc16bd08ba71d8fb8" - end - - resource "more_itertools" do - url "https://files.pythonhosted.org/packages/67/4a/16cb3acf64709eb0164e49ba463a42dc45366995848c4f0cf770f57b8120/more-itertools-8.4.0.tar.gz" - sha256 "68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5" - end - - resource "mypy_extensions" do - url "https://files.pythonhosted.org/packages/63/60/0582ce2eaced55f65a4406fc97beba256de4b7a95a0034c6576458c6519f/mypy_extensions-0.4.3.tar.gz" - sha256 "2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/fc/c7/829c73c64d3749da7811c06319458e47f3461944da9d98bb4df1cb1598c2/oauthlib-3.1.0.tar.gz" - sha256 "bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/8a/a8/bb34d7997eb360bc3e98d201a20b5ef44e54098bb2b8e978ae620d933002/pbr-5.4.5.tar.gz" - sha256 "07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c" - end - - resource "petname" do - url "https://files.pythonhosted.org/packages/8e/a5/348c90b3fb09d7bd76f7dacf1b92e251d75bfbe715006cb9b84eb23be1b1/petname-2.6.tar.gz" - sha256 "981c31ef772356a373640d1bb7c67c102e0159eda14578c67a1c99d5b34c9e4c" - end - - resource "pylxd" do - url "https://files.pythonhosted.org/packages/e4/18/bcff99f4cfb4109309c5f1f4662f95477171c552c578a4957d9f194cb1e9/pylxd-2.2.11.tar.gz" - sha256 "c021458cc52649734216f75dcea841261c2a6535cd7b4ff889d7fee1f4696052" - 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/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "pyelftools" do - url "https://files.pythonhosted.org/packages/9e/0f/82583ae6638a23e416cb3f15e3e3c07af51725fe51a4eaf91ede265f4af9/pyelftools-0.26.tar.gz" - sha256 "86ac6cee19f6c945e8dedf78c6ee74f1112bd14da5a658d8c9d4103aed5756a2" - 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/cf/5a/25aeb636baeceab15c8e57e66b8aa930c011ec1c035f284170cacb05025e/PyNaCl-1.4.0.tar.gz" - sha256 "54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505" - end - - resource "pyrsistent" do - url "https://files.pythonhosted.org/packages/9f/0d/cbca4d0bbc5671822a59f270e4ce3f2195f8a899c97d0d5abb81b191efb5/pyrsistent-0.16.0.tar.gz" - sha256 "28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" - 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/e3/75/e16dd9222bd894e32a23564aa248d144930858fe7ab2d386f2c20d02415f/python-debian-0.1.37.tar.gz" - sha256 "ab04f535155810c46c8abf3f7d46364b67b034c49ff8690cdb510092eee56750" - 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/47/6e/311d5f22e2b76381719b5d0c6e9dc39cd33999adae67db71d7279a6d70f4/pyxdg-0.26.tar.gz" - sha256 "fe2928d3f532ed32b39c32a482b54136fe766d19936afc96c8f00645f9da1a06" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - 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/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "requests-toolbelt" do - url "https://files.pythonhosted.org/packages/28/30/7bf7e5071081f761766d46820e52f4b16c8a08fef02d2eb4682ca7534310/requests-toolbelt-0.9.1.tar.gz" - sha256 "968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0" - end - - resource "requests-unixsocket" do - url "https://files.pythonhosted.org/packages/4d/ce/78b651fe0adbd4227578fa432d1bde03b4f4945a70c81e252a2b6a2d895f/requests-unixsocket-0.2.0.tar.gz" - sha256 "9e5c1a20afc3cf786197ae59c79bcdb0e7565f218f27df5f891307ee8817c1ea" - end - - resource "responses" do - url "https://files.pythonhosted.org/packages/6d/2a/abfa111b0184662ca473507fb24a1ff7e1cf395f774cc6acbd05f3b4dc3f/responses-0.10.15.tar.gz" - sha256 "7bb697a5fedeb41d81e8b87f152d453d5cab42dcd1691b6a7d6097e94d33f373" - end - - resource "simplejson" do - url "https://files.pythonhosted.org/packages/98/87/a7b98aa9256c8843f92878966dc3d8d914c14aad97e2c5ce4798d5743e07/simplejson-3.17.0.tar.gz" - sha256 "2b4b2b738b3b99819a17feaf118265d0753d5536049ea570b3c43b51c4701e81" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/57/6f/213d075ad03c84991d44e63b6516dd7d185091df5e1d02a660874f8f7e1e/tabulate-0.8.7.tar.gz" - sha256 "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007" - end - - resource "typing_extensions" do - url "https://files.pythonhosted.org/packages/e7/dd/f1713bc6638cc3a6a23735eff6ee09393b44b96176d3296693ada272a80b/typing_extensions-3.7.4.1.tar.gz" - sha256 "091ecc894d5e908ac75209f10d5b4f118fbdb2eb1ede6a63544054bb1edb41f2" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "wadllib" do - url "https://files.pythonhosted.org/packages/07/d5/2a77dcbb4185d4df41c61a3abccd6e570b652b11973437430cefd65d91ab/wadllib-1.3.4.tar.gz" - sha256 "e995691713d3c795d2b36278de8e212241870f46bec6ecba91794ea3cc5bd67d" - end - - resource "zipp" do - url "https://files.pythonhosted.org/packages/ce/8c/2c5f7dc1b418f659d36c04dec9446612fc7b45c8095cc7369dd772513055/zipp-3.1.0.tar.gz" - sha256 "c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96" - 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 878aae10431d8..0000000000000 --- a/Formula/snappy.rb +++ /dev/null @@ -1,48 +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.8.tar.gz" - sha256 "16b677f07832a612b0836178db7f374e414f94657c138e6993cbfc5dcc58651f" - head "https://github.com/google/snappy.git" - - bottle do - cellar :any - sha256 "b15a258346dc93bd5c6900a405ccb2e9e02ebfeb5b16607b340cc6a5a021eba3" => :catalina - sha256 "e996c3b0dfac02c8cdd06d849db47e853800389ff7d18fa66526d7d51d305589" => :mojave - sha256 "77276307037cc20bf44c86fef60b1745c1d8f84d6f963332535b34868f5fc2b4" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - - 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, "-std=c++11", "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 0e8f5cfc7dab7..0000000000000 --- a/Formula/snappystream.rb +++ /dev/null @@ -1,51 +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 "a17c5546b26c7de0636bcbf8effce43c7c1735ccd0b4612684505c39421b350d" => :catalina - 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 55eef39e3d756..0000000000000 --- a/Formula/snapraid.rb +++ /dev/null @@ -1,31 +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.5/snapraid-11.5.tar.gz" - sha256 "1f5267261bdbcf4d48b9359ce67184df11905590739140f740327fb73bcecafa" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "d92da7dbdf737efbbeee7025c7d1ed0bc01c1f3cbaf29f0b8ded4b264ff627e8" => :catalina - sha256 "8ccbba9450a1f49a2d1b9d0424d9dee7ffaac4348f0cf4edf0bfb2b8858f5885" => :mojave - sha256 "db38538cd61796483d63bb4cf8aa687f8801796abb4074e2a5a69e8cefcaae96" => :high_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 939df73d6a25e..0000000000000 --- a/Formula/sng.rb +++ /dev/null @@ -1,28 +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 "b37aa0aca0f3ab6b87ebaba92312fe008233a7f03cc015bcd6dd6e29e5291110" => :catalina - 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 21f2cd46de2cf..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.7.tar.gz" - sha256 "3c96aadd8b8c6b7adb5552d6fb4234f2000f15109b0f6c5feb632c81306cc49b" - - bottle do - sha256 "28a9d6bf75bdc1a95d3878b0f081abf44d743d916b6d15a9ed4dba2a872b6cdf" => :catalina - sha256 "5e75eef195f7bae03c030391f4f21f5ab5f1eb36e444a90d70833eb40e8cc4fb" => :mojave - sha256 "03b884145f781a12ad892765a61f743093fc2477f51faff426c7226d6617ed2e" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "ncurses" if DevelopmentTools.clang_build_version >= 1000 - depends_on "openssl@1.1" - - def install - system "./bootstrap.sh" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-openssl=#{Formula["openssl@1.1"].opt_prefix}" - system "make", "install" - end - - test do - system bin/"sngrep", "-NI", test_fixtures("test.pcap") - end -end diff --git a/Formula/sniffglue.rb b/Formula/sniffglue.rb deleted file mode 100644 index 9515b18f7bf18..0000000000000 --- a/Formula/sniffglue.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Sniffglue < Formula - desc "Secure multithreaded packet sniffer" - homepage "https://github.com/kpcyrd/sniffglue" - url "https://github.com/kpcyrd/sniffglue/archive/v0.11.1.tar.gz" - sha256 "f3d4a42ee12113ef82a8033bb0d64359af5425c821407a7469e99c7a5af3186d" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "9eb84327d14362e98f5c28bc8de59d85fb975348206d7d17d2e9ca601743a4b2" => :catalina - sha256 "7cf69e349503bc79fd6143df0ade8e5e2afb7bbe08b25374da4507216fd90a3f" => :mojave - sha256 "765e71bbc155e4aca03eba31e3827564413114e7812d33769e8b91c3bfc9f761" => :high_sierra - end - - depends_on "rust" => :build - - uses_from_macos "libpcap" - - resource "testdata" do - url "https://github.com/kpcyrd/sniffglue/raw/163ca299bab711fb0082de216d07d7089c176de6/pcaps/SkypeIRC.pcap" - sha256 "bac79a9c3413637f871193589d848697af895b7f2700d949022224d59aa6830f" - end - - def install - system "cargo", "install", *std_cargo_args - - etc.install "sniffglue.conf" - man1.install "docs/sniffglue.1" - end - - test do - testpath.install resource("testdata") - system "#{bin}/sniffglue", "-r", "SkypeIRC.pcap" - end -end diff --git a/Formula/snobol4.rb b/Formula/snobol4.rb deleted file mode 100644 index 5cc85da33fa6b..0000000000000 --- a/Formula/snobol4.rb +++ /dev/null @@ -1,23 +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" - license "BSD-2-Clause" - - bottle do - sha256 "d1902c73b221c4ed0e97c6a9da03d154dbaf81e18b8420ff2e4bbd320c349644" => :catalina - 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 0f8464f92c6f7..0000000000000 --- a/Formula/snort.rb +++ /dev/null @@ -1,74 +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.16.tar.gz" - mirror "https://fossies.org/linux/misc/snort-2.9.16.tar.gz" - sha256 "9688d8edf1da09dec6574000fb3c0e62f99c56428587616e17c60103c0bcbad7" - - bottle do - cellar :any - sha256 "41f8545fadaf23b86aaa02fe5d3e3e6904eae8055f7ca9b766fc377dfa4f1678" => :catalina - sha256 "bd3fce63dafd1dc91b9fcffb184f6e3a5719998dd003860915db92aa810490c0" => :mojave - sha256 "fbf46b9ec8c98e6b1cab4828f392168ca51086e63ccc5d67bbe41b108854cdd0" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "daq" - depends_on "libdnet" - depends_on "libpcap" - depends_on "luajit" - depends_on "nghttp2" - depends_on "openssl@1.1" - depends_on "pcre" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - - def install - openssl = Formula["openssl@1.1"] - libpcap = Formula["libpcap"] - - 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} - --with-libpcap-includes=#{libpcap.opt_include} - --with-libpcap-libraries=#{libpcap.opt_lib} - ] - - system "./configure", *args - system "make", "install" - - # Currently configuration files in etc have strange permissions which causes postinstall to fail - # Reported to upstream: https://lists.snort.org/pipermail/snort-devel/2020-April/011466.html - (buildpath/"etc").children.each { |f| chmod 0644, f } - rm Dir[buildpath/"etc/Makefile*"] - (etc/"snort").install (buildpath/"etc").children - 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 2f85f17c246b3..0000000000000 --- a/Formula/snow.rb +++ /dev/null @@ -1,36 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "9c662e59ae80a814b726baa86faa4e37e85f504e368579ede9e88254af4b8bde" => :catalina - 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 756bba6b23703..0000000000000 --- a/Formula/snownews.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Snownews < Formula - desc "Text mode RSS newsreader" - homepage "https://github.com/kouya/snownews" - url "https://github.com/kouya/snownews/archive/1.6.10.tar.gz" - sha256 "8c78067aef75e283df4b3cca1c966587b6654e9e84a3e6e5eb8bdd5829799242" - license "GPL-3.0" - - bottle do - sha256 "6829a661dc7dbd01b149a05aff6b81b4ecc22b99f3f06345f029b183bf952c64" => :catalina - sha256 "db1d20c1468867a2eeb77b521fdfac4e167393797506afd6bbd603fb40c435bf" => :mojave - sha256 "0e1eed435b2c94a95e35ee89c3b68be6cfa9867d75dc9fbb46b19a66ff6da915" => :high_sierra - sha256 "6437a67fb63f92f3c4d57b69505cb5146e2d7325da0d6fd73b57ac0f1461c807" => :sierra - end - - depends_on "coreutils" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "ncurses" - - uses_from_macos "libxml2" - - 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 - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra || MacOS.version == :el_capitan - - 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@1.1"].opt_lib} -lz", - "CC=#{ENV.cc}", "INSTALL=ginstall" - end - - test do - system bin/"snownews -V" - end -end diff --git a/Formula/sntop.rb b/Formula/sntop.rb deleted file mode 100644 index d70096362e5c6..0000000000000 --- a/Formula/sntop.rb +++ /dev/null @@ -1,41 +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" - license "GPL-2.0" - - bottle do - rebuild 1 - sha256 "886a981f2c95a8a17d4bfb44c27d99cde66faeb4f2942d1c43757e8d702509c6" => :catalina - 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 6e9d07e555091..0000000000000 --- a/Formula/snzip.rb +++ /dev/null @@ -1,30 +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 "1516b8b8808b7a76ace5a04d0d1b11edab13bd7cdb87d44f1831ca8dc203550c" => :catalina - 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/so.rb b/Formula/so.rb deleted file mode 100644 index 34b7ef74f02eb..0000000000000 --- a/Formula/so.rb +++ /dev/null @@ -1,46 +0,0 @@ -class So < Formula - desc "Terminal interface for StackOverflow" - homepage "https://github.com/samtay/so" - url "https://github.com/samtay/so/archive/v0.3.6.tar.gz" - sha256 "6d2f541bb00dceb9163faf4cc44ff1bd39e07b46c35d6532e24b47d7ad6d47da" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "b2f6017640c81a6cb40364b8ef4e11ca3b688d69413f08652fa44989e3fbf73d" => :catalina - sha256 "6f4aa633f76cf93b7e69a7ebc10583a3849452a5d647ee3cd58c2f410cdb38ab" => :mojave - sha256 "6b021d14682f24f76b815d7730c52fa334ed7beedfcd1491ae29474891d29adb" => :high_sierra - end - - depends_on "rust" => :build - - on_linux do - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - 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/socat.rb b/Formula/socat.rb deleted file mode 100644 index de1ade4be5b77..0000000000000 --- a/Formula/socat.rb +++ /dev/null @@ -1,27 +0,0 @@ -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.7.3.4.tar.gz" - sha256 "d9ed2075abed7b3ec9730ed729b4c8e287c502181c806d4487020418a6e2fc36" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "78e28a89b73b096849654b737ea66b730738cb24f8217c25acd71ba3cb75a70c" => :catalina - sha256 "5f057eb82e1700ae32da92d5c114fabd6238cba21503f5eaf7190b56aaa35ded" => :mojave - sha256 "90ee610e6e72158e5e2322ae198f48025f80b351b89029621fdf4b9861391ddb" => :high_sierra - end - - depends_on "openssl@1.1" - 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 56ab5016b85db..0000000000000 --- a/Formula/soci.rb +++ /dev/null @@ -1,50 +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-4.0.0/soci-4.0.0.zip" - sha256 "c7fffa74867182d9559e20c6e8d291936c3bd8cfa8c7d0c13bb2eeb09e0f318b" - - bottle do - sha256 "b25ecdd8f098dc48dc20195cd8852533e47e12fe6cbac8bccb31db99854d9c5b" => :catalina - sha256 "0dc4c5223dcefeefbdbc647dc7827adf7fc01fe52a23f3bd325d6cf32624e532" => :mojave - sha256 "76d7380ed18a0cac1d883d6d38aea9f7a43b587584f4dceab1c32f56596341cf" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "sqlite" - - def install - args = std_cmake_args + %w[ - -DWITH_SQLITE3:BOOL=ON - -DWITH_BOOST:BOOL=OFF - -DWITH_MYSQL:BOOL=OFF - -DWITH_ODBC:BOOL=OFF - -DWITH_ORACLE:BOOL=OFF - -DWITH_POSTGRESQL:BOOL=OFF - ] - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end - - test do - (testpath/"test.cxx").write <<~EOS - #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); - } - EOS - system ENV.cxx, "-o", "test", "test.cxx", "-std=c++11", "-L#{lib}", "-lsoci_core", "-lsoci_empty" - system "./test" - end -end diff --git a/Formula/sofia-sip.rb b/Formula/sofia-sip.rb deleted file mode 100644 index b090c40683b82..0000000000000 --- a/Formula/sofia-sip.rb +++ /dev/null @@ -1,31 +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 4 - - bottle do - cellar :any - sha256 "2f00e1e117d44b4cea76f7d6434e80e77884b3cee8f31f1fd3e8c203911d1497" => :catalina - sha256 "a7d98db04406b64b6c84fbee215cccb8f44b3342318d22c8adef65865096df22" => :mojave - sha256 "52d32ecd60bcc55d2e4569be650e9b11fd1c75e1b14d44145773717bb6693a6c" => :high_sierra - sha256 "95a892ab2ae71eb09d5aa22c6e30a2336376d34321c54032b6d03106a96dc631" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "openssl@1.1" - - 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 0c0f9e88ac494..0000000000000 --- a/Formula/softhsm.rb +++ /dev/null @@ -1,39 +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.6.1.tar.gz" - sha256 "61249473054bcd1811519ef9a989a880a7bdcc36d317c9c25457fc614df475f2" - - bottle do - sha256 "69963f95aad110c6dcadab15613ee928f1358b714d71f4e7252da9b885eac7cd" => :catalina - sha256 "4a17c51934b0adc317cfc49069d52b3fa2fcb9a852808a7b0dfe2de28cf4b3b3" => :mojave - sha256 "cd17fa2e8538ca99b5963d60074578c91839740e7f87cc292b9b8f4f67dd99d8" => :high_sierra - end - - depends_on "openssl@1.1" - - 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@1.1"].opt_prefix}", - "--disable-gost" - 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 af2f5a65b88f7..0000000000000 --- a/Formula/solarus.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Solarus < Formula - desc "Action-RPG game engine" - homepage "https://www.solarus-games.org/" - url "https://gitlab.com/solarus-games/solarus.git", - :tag => "v1.6.4", - :revision => "6d2a11ddd1d07d21695ab7304c3ddd462fd37c26" - sha256 "d800fdf388f860732f2d40c8dd635c34fd1c452857f75bf9b3a421e3ef5ee751" - - bottle do - cellar :any - sha256 "23c646e9a69c966e0f2930ac225661dab3d8b97fbb9e34c12cb49cdfe1e56d67" => :catalina - sha256 "6d02a298994633961ed83feb34471cf743059aa9daf90d9b5153f2613337e8d2" => :mojave - sha256 "dedfe91badd887dfdcf0e0d55b662fde86890c1f8e287dddd224b29b0339f4b9" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "glm" - 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 - ENV.append_to_cflags "-I#{Formula["glm"].opt_include}" - ENV.append_to_cflags "-I#{Formula["physfs"].opt_include}" - system "cmake", "..", - "-DSOLARUS_GUI=OFF", - "-DVORBISFILE_INCLUDE_DIR=#{Formula["libvorbis"].opt_include}", - "-DOGG_INCLUDE_DIR=#{Formula["libogg"].opt_include}", - *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 0990fd3792775..0000000000000 --- a/Formula/solid.rb +++ /dev/null @@ -1,59 +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 "f5b7baa17975ec35c118f8744fa852d51c07d03b96d707de8ee3e65c19755e9a" => :catalina - 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/sollya.rb b/Formula/sollya.rb deleted file mode 100644 index eb2288dc4ec62..0000000000000 --- a/Formula/sollya.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Sollya < Formula - desc "Library for safe floating-point code development" - homepage "https://sollya.gforge.inria.fr/" - url "https://gforge.inria.fr/frs/download.php/file/37749/sollya-7.0.tar.gz" - sha256 "30487b8242fb40ba0f4bc2ef23a8ef216477e57b1db277712fde1f53ceebb92a" - - bottle do - cellar :any - sha256 "ff549e2fff8c593449a7bf92d2d2d7ff423c6a40885838d5be4d7852308a4b28" => :catalina - sha256 "5a3569111ea2936599668fc075a146ebfd01f471613b7c695a6a3d031ea6a309" => :mojave - sha256 "5b5b3762879216a04a4fbcea2fa5407dddb331510a9e01f768d684ebdcd99c66" => :high_sierra - end - - depends_on "automake" => :build - depends_on "pkg-config" => :test - depends_on "fplll" - depends_on "gmp" - depends_on "mpfi" - depends_on "mpfr" - - uses_from_macos "libxml2" - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - 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", File.read(testpath/"two.txt") - end - - test do - (testpath/"test.c").write(<<~EOF) - #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; - } - EOF - pkg_config_flags = `pkg-config --cflags --libs gmp mpfr fplll`.chomp.split - system ENV.cc, "test.c", *pkg_config_flags, "-I#{include}", "-L#{lib}", "-lsollya", "-o", "test" - assert_equal "pi", `./test` - end -end diff --git a/Formula/solr.rb b/Formula/solr.rb deleted file mode 100644 index b8586326f76dc..0000000000000 --- a/Formula/solr.rb +++ /dev/null @@ -1,76 +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.lua?path=lucene/solr/8.5.2/solr-8.5.2.tgz" - mirror "https://archive.apache.org/dist/lucene/solr/8.5.2/solr-8.5.2.tgz" - sha256 "c457d6c7243241cad141e1df34c6f669d58a6c60e537f4217d032616dd066dcf" - - bottle :unneeded - - 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 %w[contrib dist server] - libexec.install "bin" - bin.install [libexec/"bin/solr", libexec/"bin/post", libexec/"bin/oom_solr.sh"] - bin.env_script_all_files libexec, - :JAVA_HOME => Formula["openjdk"].opt_prefix, - :SOLR_HOME => var/"lib/solr", - :SOLR_LOGS_DIR => var/"log/solr", - :SOLR_PID_DIR => var/"run/solr" - (libexec/"bin").rmtree - end - - def post_install - (var/"run/solr").mkpath - (var/"log/solr").mkpath - end - - plist_options :manual => "solr start" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/solr - start - -f - -s - /usr/local/var/lib/solr - - ServiceDescription - #{name} - WorkingDirectory - #{HOMEBREW_PREFIX} - RunAtLoad - - - - EOS - end - - test do - port = free_port - - # Info detects no Solr node => exit code 3 - shell_output(bin/"solr -i", 3) - # Start a Solr node => exit code 0 - shell_output(bin/"solr start -p #{port} -Djava.io.tmpdir=/tmp") - # Info detects a Solr node => exit code 0 - shell_output(bin/"solr -i") - # 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 - shell_output(bin/"solr stop -p #{port}") - # No Solr node left to stop => exit code 1 - shell_output(bin/"solr stop -p #{port}", 1) - end -end diff --git a/Formula/solr@7.7.rb b/Formula/solr@7.7.rb deleted file mode 100644 index e812155235d05..0000000000000 --- a/Formula/solr@7.7.rb +++ /dev/null @@ -1,76 +0,0 @@ -class SolrAT77 < Formula - desc "Enterprise search platform from the Apache Lucene project" - homepage "https://lucene.apache.org/solr/" - url "https://www.apache.org/dyn/closer.lua?path=lucene/solr/7.7.3/solr-7.7.3.tgz" - mirror "https://archive.apache.org/dist/lucene/solr/7.7.3/solr-7.7.3.tgz" - sha256 "3ec67fa430afa5b5eb43bb1cd4a659e56ee9f8541e0116d6080c0d783870baee" - - bottle :unneeded - - 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 %w[contrib dist server] - libexec.install "bin" - bin.install [libexec/"bin/solr", libexec/"bin/post", libexec/"bin/oom_solr.sh"] - bin.env_script_all_files libexec, - :JAVA_HOME => Formula["openjdk"].opt_prefix, - :SOLR_HOME => var/"lib/solr", - :SOLR_LOGS_DIR => var/"log/solr", - :SOLR_PID_DIR => var/"run/solr" - (libexec/"bin").rmtree - end - - def post_install - (var/"run/solr").mkpath - (var/"log/solr").mkpath - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/solr@7.7/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 - port = free_port - - # Info detects no Solr node => exit code 3 - shell_output(bin/"solr -i", 3) - # Start a Solr node => exit code 0 - shell_output(bin/"solr start -p #{port} -Djava.io.tmpdir=/tmp") - # Info detects a Solr node => exit code 0 - shell_output(bin/"solr -i") - # 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 - shell_output(bin/"solr stop -p #{port}") - # No Solr node left to stop => exit code 1 - shell_output(bin/"solr stop -p #{port}", 1) - end -end diff --git a/Formula/somagic-tools.rb b/Formula/somagic-tools.rb deleted file mode 100644 index 17af947038496..0000000000000 --- a/Formula/somagic-tools.rb +++ /dev/null @@ -1,25 +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 "59d88127409e26497afa4bb7d3afa04820dd1ccb56542096e01c85c733e53045" => :catalina - 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 8ec7d4d247a9b..0000000000000 --- a/Formula/somagic.rb +++ /dev/null @@ -1,33 +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 "41d2479b3d2a267bbcd8c5db4ea7a8fe04c120d260d2ac9f087bd386012a3971" => :catalina - 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 f1613e6f13877..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-4.4.0.2170.zip" - sha256 "b24c19e948f152a4ea8dc43d037253234add639503d42194f6175869693ff058" - 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 031bfcd0bbd71..0000000000000 --- a/Formula/sonarqube-lts.rb +++ /dev/null @@ -1,48 +0,0 @@ -class SonarqubeLts < Formula - desc "Manage code quality" - homepage "https://www.sonarqube.org/" - url "https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.9.3.zip" - sha256 "151ca73046bd788b68fbaefe362af2862565fdb0cdfae715a669539a725808fd" - - bottle :unneeded - - depends_on "openjdk" - - 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/"sonar").write_env_script libexec/"bin/macosx-universal-64/sonar.sh", - :JAVA_HOME => Formula["openjdk"].opt_prefix - 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 e819e3b0ef3b0..0000000000000 --- a/Formula/sonarqube.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Sonarqube < Formula - desc "Manage code quality" - homepage "https://www.sonarqube.org/" - url "https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-8.4.0.35506.zip" - sha256 "3a70d99b8db4d32d3ef6ea8a054003f2370c02f2e4e50de88ad3f23a8155b101" - - bottle :unneeded - - depends_on "openjdk" - - 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/"sonar").write_env_script libexec/"bin/macosx-universal-64/sonar.sh", - :JAVA_HOME => Formula["openjdk"].opt_prefix - 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/sonic.rb b/Formula/sonic.rb deleted file mode 100644 index 304123ed72cd9..0000000000000 --- a/Formula/sonic.rb +++ /dev/null @@ -1,67 +0,0 @@ -class Sonic < Formula - desc "Fast, lightweight & schema-less search backend" - homepage "https://github.com/valeriansaliou/sonic" - url "https://github.com/valeriansaliou/sonic/archive/v1.3.0.tar.gz" - sha256 "6f8c1a8779f71bb57978f0baaf65ca65493f4d8a030895b74f579ce2b4e1fa5e" - - bottle do - cellar :any_skip_relocation - sha256 "d22157b31f471d3b5a74018cef0fbcb5c5b6cf4f2a59df7b3cfe315090d3d3b4" => :catalina - sha256 "5e68bc4761ff25830382fe068ef89a38c71762f98958cf1b7f3dc1db8dc7cc26" => :mojave - sha256 "184bf1ac4972c580d1a648f48a4aa6f01fecdc1aeefb2cd0bb6789232fc2ba22" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - inreplace "config.cfg", "./", var/"sonic/" - etc.install "config.cfg" => "sonic.cfg" - end - - plist_options :manual => "sonic -c #{HOMEBREW_PREFIX}/etc/sonic.cfg" - - def plist - <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/sonic - -c - #{etc}/sonic.cfg - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/sonic.log - StandardOutPath - #{var}/log/sonic.log - - - EOS - end - - test do - port = free_port - - cp etc/"sonic.cfg", testpath/"config.cfg" - inreplace "config.cfg", ":1491", ":#{port}" - inreplace "config.cfg", "#{var}/sonic", "." - - fork { exec bin/"sonic" } - sleep 2 - system "nc", "-z", "localhost", port - end -end diff --git a/Formula/sonobuoy.rb b/Formula/sonobuoy.rb deleted file mode 100644 index c6a64eea4ecb4..0000000000000 --- a/Formula/sonobuoy.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Sonobuoy < Formula - desc "Kubernetes component that generates reports on cluster conformance" - homepage "https://github.com/vmware-tanzu/sonobuoy" - url "https://github.com/vmware-tanzu/sonobuoy/archive/v0.18.3.tar.gz" - sha256 "7560e2e8b9b8ebcc4fcfc7737f6b039d061e153f7d9145095c3f051bf3d6e4a1" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "bdc8f8081c9551b7173923f9276f7903a1ade71d3f19858a183ad18fecee3cc0" => :catalina - sha256 "29a498c03d5d0b9d0d1040fe000664167834498e041350203fcbcfc81ef03141" => :mojave - sha256 "ecb8e73c10ccb15afbd6d5338ff3f900b30a1a192023ebffe9df6797ac51eae7" => :high_sierra - end - - depends_on "go" => :build - - resource "sonobuoyresults" do - url "https://raw.githubusercontent.com/vmware-tanzu/sonobuoy/master/pkg/client/results/testdata/results-0.10.tar.gz" - sha256 "a945ba4d475e33820310a6138e3744f301a442ba01977d38f2b635d2e6f24684" - end - - def install - system "go", "build", "-ldflags", - "-s -w -X github.com/vmware-tanzu/sonobuoy/pkg/buildinfo.Version=v#{version}", - *std_go_args - prefix.install_metafiles - end - - test do - resources.each { |r| r.verify_download_integrity(r.fetch) } - assert_match "Sonobuoy is an introspective 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 --kube-conformance-image-version=v1.14 2>&1") - assert_match "all tests", - shell_output("#{bin}/sonobuoy e2e --show=all " + resource("sonobuoyresults").cached_download + " 2>&1") - end -end diff --git a/Formula/sops.rb b/Formula/sops.rb deleted file mode 100644 index a9bb92e050c7e..0000000000000 --- a/Formula/sops.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Sops < Formula - desc "Editor of encrypted files" - homepage "https://github.com/mozilla/sops" - url "https://github.com/mozilla/sops/archive/v3.5.0.tar.gz" - sha256 "a9c257dc5ddaab736dce08b8c5b1f00e6ca1e3171909b6d7385689044ebe759b" - license "MPL-2.0" - revision 1 - head "https://github.com/mozilla/sops.git" - - bottle do - cellar :any_skip_relocation - sha256 "55e5624ed3a1c5ccd2113d663483e8c6fabbb45dede9b691f8921d698549e39e" => :catalina - sha256 "7df3685379929174b605e1767b13a19af0db45c4d7f27bbf6d3b6ac905235258" => :mojave - sha256 "67541150ddec0ae37ad7b7f4df4ecca8eb8814bf49708abe8cf1e94099f398bb" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"sops", "go.mozilla.org/sops/v3/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/sord.rb b/Formula/sord.rb deleted file mode 100644 index 5224238f41efd..0000000000000 --- a/Formula/sord.rb +++ /dev/null @@ -1,35 +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.4.tar.bz2" - sha256 "b15998f4e7ad958201346009477d6696e90ee5d3e9aff25e7e9be074372690d7" - license "ISC" - - bottle do - cellar :any - sha256 "8c1546cb6310b54955a6c0e4aa8a7a64a989ee4917bd299da9abf7bb8837461b" => :catalina - sha256 "3e7948f1de2a394508f2c8c8a251eb5aacc72ff81d3c226e0a6ef886989baa0e" => :mojave - sha256 "05c4c8862795925b5135e57a6bb2e3a532b1a462a1832273eab15dc09459698e" => :high_sierra - 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 - - 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/sound-touch.rb b/Formula/sound-touch.rb deleted file mode 100644 index 4a6a5367f7aca..0000000000000 --- a/Formula/sound-touch.rb +++ /dev/null @@ -1,35 +0,0 @@ -class SoundTouch < Formula - desc "Audio processing library" - homepage "https://www.surina.net/soundtouch/" - url "https://gitlab.com/soundtouch/soundtouch/-/archive/2.1.2/soundtouch-2.1.2.tar.gz" - sha256 "2826049e2f34efbc4c8a47d00c93649822b0c14e1f29f5569835704814590732" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "89d1037259a1c68865339b7dbdc837f22f397a33772d45c1296d9137ebc28a58" => :catalina - sha256 "39081044f19ddcb8982560fb86e8c9b621c94e8bfc2de6eb4e398ba0fb2a2b9e" => :mojave - sha256 "6d6651a6a7cc88c83279a49d2d676f8baf7731316f41dff3b0c77ac2d2fe7fb6" => :high_sierra - sha256 "4b55c5ffffbba6f1c16f9a82860d3a0316b1d2bc478a6f7ac59e4cb36d70342a" => :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 599864ba496a9..0000000000000 --- a/Formula/soundpipe.rb +++ /dev/null @@ -1,30 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "775700eaea684293798d3a52192c3b2a24eb2b4bfe9c95c639ff41f1d819bf93" => :catalina - sha256 "b47b5666b487eafcbd58637c541fccdd671abc89036fe3401aafd79ea4f04493" => :mojave - sha256 "e10ee9a2f4f97fc9c0ee91f9da5b5965ca04a147119e10237efb2eea1e162dc5" => :high_sierra - sha256 "3975e1208784b80d78d9ad19b83836d1efe7b33d7e0e08d36c630863ee7a1a19" => :sierra - 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#{Formula["libsndfile"].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 ab47d3df82c10..0000000000000 --- a/Formula/source-highlight.rb +++ /dev/null @@ -1,29 +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.9.tar.gz" - mirror "https://ftpmirror.gnu.org/src-highlite/source-highlight-3.1.9.tar.gz" - sha256 "3a7fd28378cb5416f8de2c9e77196ec915145d44e30ff4e0ee8beb3fe6211c91" - revision 1 - - bottle do - sha256 "fac19971a1a63d2b16842157b4941e61d73a46318633ce185b2ed71df9a5db09" => :catalina - sha256 "4459bbef81e9a9d8872bd4ef9ebf5d70620f2723956ae028ce5542288793f753" => :mojave - sha256 "0ea7ec70be5c0e02a211f7079afd181568f2085c0982b1d4bf7a27ceac8f2347" => :high_sierra - end - - depends_on "boost" - - 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 7e4bee46d35d3..0000000000000 --- a/Formula/source-to-image.rb +++ /dev/null @@ -1,29 +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.3.0", - :revision => "eed2850f2187435ef5d83487e05bf3dc18622ceb" - license "Apache-2.0" - revision 1 - head "https://github.com/openshift/source-to-image.git" - - bottle do - cellar :any_skip_relocation - sha256 "1082f391a8b448d93865d97431856b29ca5c2d845686f04c5ae4425dc0ead5c5" => :catalina - sha256 "db15e9cff473ac13375703f67b00907016001d2888b4a89c6ec065b2dc460d76" => :mojave - sha256 "3c107497236774e24628577c13c67372d9814967c9a6f97651d8c05935bd8aa0" => :high_sierra - end - - depends_on "go" => :build - - def install - 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 2799749f90287..0000000000000 --- a/Formula/sourcedocs.rb +++ /dev/null @@ -1,39 +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/1.2.0.tar.gz" - sha256 "edfbe37a267be4d5ddd795c74522dcbb72b6fd42e11a0922c3ad87f4bac0e55f" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "32bc59646532b362651b126946cbf051a90b2b1da5d07a614d50fc0b0bc1efd1" => :catalina - sha256 "3bfe25d253eecef289c822012efddc14d9bd331eba0f3f54fe88e7d0cf2aa924" => :mojave - end - - depends_on :xcode => ["10.3", :build, :test] - - def install - system "swift", "build", "--disable-sandbox", "-c", "release" - 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 325646d995214..0000000000000 --- a/Formula/sourcekitten.rb +++ /dev/null @@ -1,28 +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.29.0", - :revision => "77a4dbbb477a8110eb8765e3c44c70fb4929098f" - license "MIT" - head "https://github.com/jpsim/SourceKitten.git" - - bottle do - cellar :any_skip_relocation - sha256 "d08bed584c9f176c09f460aa77ec0dcbed338b557b3aa35d9913a778b28ceac5" => :catalina - sha256 "2afc89c640799f55759d6b72b1e2ba694711ff434a7e883a052263b9e83d7692" => :mojave - end - - depends_on :xcode => ["10.2", :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 2224e1930b18e..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.18.0.tar.gz" - sha256 "2315128a948d9c9c6f8f959afd7b4bc15bda88ff8d940f36c73c90a232aa7e3a" - license "MIT" - head "https://github.com/krzysztofzablocki/Sourcery.git" - - bottle do - cellar :any_skip_relocation - sha256 "a44eadcab33192fe80d9a3c487e82448197c43b1d70af1516d425b05e25a5892" => :catalina - sha256 "debaf5a493f59bb3860806ffc3c9a9fb7e52805f1fc9c84d2c4b42e447670473" => :mojave - end - - depends_on :xcode => "10.2" - - def install - system "swift", "build", "--disable-sandbox", "-c", "release", "-Xswiftc", - "-target", "-Xswiftc", "x86_64-apple-macosx10.11" - 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 5e98c11f92237..0000000000000 --- a/Formula/sox.rb +++ /dev/null @@ -1,39 +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 3 - - bottle do - cellar :any - sha256 "fc412be07e577c2161763dfb509f4fb43f4fe3bca206a1b0b370687df0a264fa" => :catalina - sha256 "4906207f83bd0f4ea1a67d040891711e9a9e8830216e451072f2957ca566b83d" => :mojave - sha256 "c0bb4ba7ec922d9a8c71c2ba84e28c66c67e4fdeae970011ea45e937f43c18bd" => :high_sierra - sha256 "dc8c294bb96c0b7ebc3ade73476c6031664bb8e81a32ece87ce84f815deeced5" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "lame" - depends_on "libpng" - depends_on "libsndfile" - 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 3de91517c1d90..0000000000000 --- a/Formula/spaceinvaders-go.rb +++ /dev/null @@ -1,57 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "221c4d6f495ed8b4c1db5c737b4ff08be55a65b2bd15fc1c3e43ae96e29726ba" => :catalina - 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 270bbc7bbe38c..0000000000000 --- a/Formula/spaceman-diff.rb +++ /dev/null @@ -1,25 +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" - license "MIT" - 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 797a1fc74c513..0000000000000 --- a/Formula/spades.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Spades < Formula - include Language::Python::Shebang - - desc "De novo genome sequence assembly" - homepage "http://cab.spbu.ru/software/spades/" - url "https://github.com/ablab/spades/releases/download/v3.14.1/SPAdes-3.14.1.tar.gz" - mirror "http://cab.spbu.ru/files/release3.14.1/SPAdes-3.14.1.tar.gz" - sha256 "d629b78f7e74c82534ac20f5b3c2eb367f245e6840a67b9ef6a76f6fac5323ca" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "a6f57aca314cbe6d46554308a1b6a54c6c76bab341ac0813e9d0e68187428023" => :catalina - sha256 "0f536b922fba137fca8f2ba6634a90fc09e71b683342a0d331ac2bd1676d5fac" => :mojave - sha256 "c2bc400de41d30e04ad78cdc1894a5c9af1a15a237ae6aa71d73d2807b93e029" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libomp" - depends_on "python@3.8" - - uses_from_macos "bzip2" - uses_from_macos "ncurses" - uses_from_macos "zlib" - - def install - mkdir "src/build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - bin.find { |f| rewrite_shebang detected_python_shebang, f } - 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 78cdb6cf6f07b..0000000000000 --- a/Formula/spandsp.rb +++ /dev/null @@ -1,45 +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 "8a34a25e8108c8a5343d00a031d52c1003422a5ad84186ded83fbed819a834e5" => :catalina - 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 e048d8f7c390c..0000000000000 --- a/Formula/spark.rb +++ /dev/null @@ -1,17 +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" - license "MIT" - - 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 15ef3b17726f6..0000000000000 --- a/Formula/sparkey.rb +++ /dev/null @@ -1,37 +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" - license "Apache-2.0" - revision 1 - - bottle do - cellar :any - sha256 "b7e64101995d257df010edb67bafcd60745f09c7b0ebb9650c817eb7343f1899" => :catalina - sha256 "438c323c343b7aade2da46316d24bcc4d5c7a95910a43914d70125af14a17636" => :mojave - sha256 "4acbb473ce3be942b808af45789ccb7ede8199c728f7c381cd0dda1a105c8a9e" => :high_sierra - 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" - mv bin/"bench", bin/"sparkey_bench" - 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 cbd83016ac8ab..0000000000000 --- a/Formula/sparse.rb +++ /dev/null @@ -1,34 +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.6.2.tar.xz" - sha256 "519ca0de92c1c5dbb76494176c7e567ce4cc8f64a2ecd27b2fae32ce156421fc" - revision 1 - head "https://git.kernel.org/pub/scm/devel/sparse/sparse.git" - - bottle do - sha256 "7b68cfced4d0ab9aa951900794eae5610ff9f6641b57a3fc6cd8a6d61b69f3f7" => :catalina - sha256 "6f9eb074c79700342aa36a6359079e8d853e5a6b9d6203459b62118b747e1210" => :mojave - sha256 "b74ccd0fe82e07b7d0552954634e1e7a8395ceaae09b8405d8460ce3b828e75d" => :high_sierra - end - - depends_on "gcc" if DevelopmentTools.clang_build_version < 1100 - - # error: use of unknown builtin '__builtin_clrsb' - fails_with :clang if DevelopmentTools.clang_build_version < 1100 - - 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/spatialindex.rb b/Formula/spatialindex.rb deleted file mode 100644 index a48ebeca7a1cf..0000000000000 --- a/Formula/spatialindex.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Spatialindex < Formula - desc "General framework for developing spatial indices" - homepage "https://libspatialindex.org/" - url "https://github.com/libspatialindex/libspatialindex/releases/download/1.9.3/spatialindex-src-1.9.3.tar.bz2" - sha256 "4a529431cfa80443ab4dcd45a4b25aebbabe1c0ce2fa1665039c80e999dcc50a" - - bottle do - cellar :any - sha256 "fbcbfaf6510137f3168a0dc57cbac8c8b1435094b1ede9d35a30fa6ccaea28f4" => :catalina - sha256 "a5cbdfb3acddb053e596fc56e7653559581923e48ed6815503fffc47c7a16660" => :mojave - sha256 "cace27981cc1e5143a48e8b700d6823dff9d8049140683e0e536c476894ede91" => :high_sierra - end - - depends_on "cmake" => :build - - def install - ENV.cxx11 - - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - 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, "-std=c++11", "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 1f2ed8dc3be49..0000000000000 --- a/Formula/spatialite-gui.rb +++ /dev/null @@ -1,47 +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 6 - - bottle do - cellar :any - sha256 "fd3dd58b7818d298d1ee682270e124d25fd92bb7017a05d53dcf45ebf53f1e23" => :catalina - sha256 "13c864fd247e27bc67c69047d7b175b1e6913cadff426ddf2267754ea1dee278" => :mojave - sha256 "dc96081a458992e1fbefc8cb9c93d285596d1ad2844367fd84c0679bd4e175d3" => :high_sierra - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/spatialite-gui/1.7.1.patch" - sha256 "37f71f3cb2b0b9649eb85a51296187b0adf2972c5a1d3ee0daf3082e2c35025e" - end - - 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}" - - # Use Proj 6.0.0 compatibility headers - # https://www.gaia-gis.it/fossil/spatialite_gui/tktview?name=8349866db6 - ENV.append_to_cflags "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" - - # 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 diff --git a/Formula/spatialite-tools.rb b/Formula/spatialite-tools.rb deleted file mode 100644 index 729c70e2cc4a6..0000000000000 --- a/Formula/spatialite-tools.rb +++ /dev/null @@ -1,35 +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 5 - - bottle do - cellar :any - sha256 "bb05699d8ad329cd1bea91041220944d034d30fad259334e6aec463b586a5f20" => :catalina - sha256 "b2513d23a40d4793d048e98e7ae4ced1f6c7fb3abf2e51718d8043440434caa7" => :mojave - sha256 "fde1c73dc20ab4e18c28a61946c9083edee504d5c3d52f65155d22f5ce5c2dac" => :high_sierra - 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 595ebdbcdfbed..0000000000000 --- a/Formula/spawn-fcgi.rb +++ /dev/null @@ -1,29 +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" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "a0665cd25e441b8f798073125e2f4151588aed54408b17f894e62a353ca73d47" => :catalina - 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 45e27f358e474..0000000000000 --- a/Formula/spdlog.rb +++ /dev/null @@ -1,52 +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.6.1.tar.gz" - sha256 "378a040d91f787aec96d269b0c39189f58a6b852e4cbf9150ccfacbe85ebbbfc" - head "https://github.com/gabime/spdlog.git", :branch => "v1.x" - - bottle do - cellar :any_skip_relocation - sha256 "63dec5d3109417affd92cad8ed695c389e20da60531bc0b22f13826833ccf9f9" => :catalina - sha256 "19f5bc7e791fd794467a305039157acafa4d8a209a87ea8c137ce0a2909ee20c" => :mojave - sha256 "d47ec48d568261f83d2c7b67439b463346fd0ed3038c19392974b6efd9cbfa99" => :high_sierra - end - - depends_on "cmake" => :build - - def install - ENV.cxx11 - - mkdir "spdlog-build" do - args = std_cmake_args - args << "-Dpkg_config_libdir=#{lib}" << "-DSPDLOG_BUILD_BENCH=OFF" << "-DSPDLOG_BUILD_TESTS=OFF" << ".." - 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 244e510d47096..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" - license "MIT" - revision 3 - - bottle do - cellar :any - sha256 "5607031eb5776de5b4a68e8c50f312771cae89e8b2266df60718b2e07e35d070" => :catalina - sha256 "9906d0abfcd17c86df23c18b1ed112de0266ccbc7a50c24f741f78bffa552540" => :mojave - sha256 "c89edde9d9229dbe524d28b661265349af72a2dac0b85f066751d4716effe1ab" => :high_sierra - sha256 "2f24051eb854a2345e88a1e023aa76fa6c2cb7522ec0fd7644af15694b456f27" => :sierra - end - - # The SPDY protocol itself is deprecated and most websites no longer support it - deprecate! - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - ENV["ac_cv_search_clock_gettime"] = "no" if MacOS.version == "10.11" && MacOS::Xcode.version >= "8.0" - - Formula["libxml2"].stable.stage { (buildpath/"m4").install "libxml.m4" } - - 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.academia.edu/" - end -end diff --git a/Formula/speech-tools.rb b/Formula/speech-tools.rb deleted file mode 100644 index 69954522b1dd4..0000000000000 --- a/Formula/speech-tools.rb +++ /dev/null @@ -1,63 +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 "88ed5cfcaf1234243702c543cff1d41471292dcf40a00ac6c5d4bd269c02de26" => :catalina - 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) do |i| - (scale * Math.sin(frequency_hz * 2 * Math::PI * i / rate_hz)).to_i - end - 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 509fdb8fb97b9..0000000000000 --- a/Formula/speedread.rb +++ /dev/null @@ -1,18 +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" - license "MIT" - 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 f7348b20a013d..0000000000000 --- a/Formula/speedtest-cli.rb +++ /dev/null @@ -1,20 +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.1.2.tar.gz" - sha256 "a877142eec0ee8dda86519c36fe789480ed6fa603b016b620affd77fbf79b0d9" - license "Apache-2.0" - 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 fff9b59f6705d..0000000000000 --- a/Formula/speex.rb +++ /dev/null @@ -1,49 +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 "0f83411cb7338f92a588672d127c902e0b45d1f7276befa2206bc870208d5bb0" => :catalina - 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 2f2a81ad017b5..0000000000000 --- a/Formula/speexdsp.rb +++ /dev/null @@ -1,28 +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.2.0.tar.gz" - sha256 "d7032f607e8913c019b190c2bccc36ea73fc36718ee38b5cdfc4e4c0a04ce9a4" - - bottle do - cellar :any - sha256 "84c7225a9ee78c41bd858d8b52d01a12db6ba358826e45bdc30e42d9e802425c" => :catalina - sha256 "0d61efd09b255e0856833e51bdbdaabcaaa325824a71ec326da61ffd8e200675" => :mojave - sha256 "7473fce6835c55f0547e60ff32b9ee1d16c2d3a490f618310dd276e34126bd1f" => :high_sierra - sha256 "b96155ea177b81d37a86a9b57dc38643680bbf6b22a6a2b826734f3cb2b5aa93" => :sierra - 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 054c9de572e71..0000000000000 --- a/Formula/sphinx-doc.rb +++ /dev/null @@ -1,158 +0,0 @@ -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/4b/2b/84e00ab4c6103ebe38b3c1f0d574d46a7b8fb1dccb4d41a6ec0b9d15aacd/Sphinx-3.1.2.tar.gz" - sha256 "b9daeb9b39aa1ffefc2809b43604109825300300b987a24f45976c001ba1a8fd" - - bottle do - cellar :any_skip_relocation - sha256 "a2b5f9994308f78ae09989606b9cd6698f194bc6a719391510c07ac11d8010bd" => :catalina - sha256 "1aa04284b61b942151e2ef5b7759e73efbc71b770cef68f8c8856358032910c3" => :mojave - sha256 "e60be14ce1eb3ee7ef70ec3f4462db816137090d30152bdf4667e0bbe7323408" => :high_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@3.8" - - # generated from sphinx, numpydoc and python-docs-theme - 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/34/18/8706cfa5b2c73f5a549fdc0ef2e24db71812a2685959cff31cbdfc010136/Babel-2.8.0.tar.gz" - sha256 "1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - 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/2f/e0/3d435b34abd2d62e8206171892f174b180cd37b09d57b924ca5c2ef2219d/docutils-0.16.tar.gz" - sha256 "c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz" - sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6" - end - - resource "imagesize" do - url "https://files.pythonhosted.org/packages/e4/9f/0452b459c8ba97e07c3cd2bd243783936a992006cf4cd1353c314a927028/imagesize-1.2.0.tar.gz" - sha256 "b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz" - sha256 "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "numpydoc" do - url "https://files.pythonhosted.org/packages/3d/fb/a70f636102045fc646656f2221c7fcdf92f7a9d71ba7c9875a949a58b3e8/numpydoc-1.1.0.tar.gz" - sha256 "c36fd6cb7ffdc9b4e165a43f67bf6271a7b024d0bb6b00ac468c9e2bfc76448e" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/55/fd/fc1aca9cf51ed2f2c11748fa797370027babd82f87829c7a8e6dbe720145/packaging-20.4.tar.gz" - sha256 "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "python-docs-theme" do - url "https://files.pythonhosted.org/packages/fa/63/759ff01d90ad08fbec19954c71f474c0c0e613850a6419b4b6a4ea79f5e9/python-docs-theme-2020.1.tar.gz" - sha256 "29c33ba393bdb9377910116a0c1cc329573a4e040227c58a3293d27928d8262a" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "snowballstemmer" do - url "https://files.pythonhosted.org/packages/21/1b/6b8bbee253195c61aeaa61181bb41d646363bdaa691d0b94b304d4901193/snowballstemmer-2.0.0.tar.gz" - sha256 "df3bac3df4c2c01363f3dd2cfa78cce2840a79b9f1c2d2de9ce8d31683992f52" - end - - resource "sphinxcontrib-applehelp" do - url "https://files.pythonhosted.org/packages/9f/01/ad9d4ebbceddbed9979ab4a89ddb78c9760e74e6757b1880f1b2760e8295/sphinxcontrib-applehelp-1.0.2.tar.gz" - sha256 "a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58" - end - - resource "sphinxcontrib-devhelp" do - url "https://files.pythonhosted.org/packages/98/33/dc28393f16385f722c893cb55539c641c9aaec8d1bc1c15b69ce0ac2dbb3/sphinxcontrib-devhelp-1.0.2.tar.gz" - sha256 "ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4" - end - - resource "sphinxcontrib-htmlhelp" do - url "https://files.pythonhosted.org/packages/c9/2e/a7a5fef38327b7f643ed13646321d19903a2f54b0a05868e4bc34d729e1f/sphinxcontrib-htmlhelp-1.0.3.tar.gz" - sha256 "e8f5bb7e31b2dbb25b9cc435c8ab7a79787ebf7f906155729338f3156d93659b" - 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/b1/8e/c4846e59f38a5f2b4a0e3b27af38f2fcf904d4bfd82095bf92de0b114ebd/sphinxcontrib-qthelp-1.0.3.tar.gz" - sha256 "4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72" - end - - resource "sphinxcontrib-serializinghtml" do - url "https://files.pythonhosted.org/packages/ac/86/021876a9dd4eac9dae0b1d454d848acbd56d5574d350d0f835043b5ac2cd/sphinxcontrib-serializinghtml-1.1.4.tar.gz" - sha256 "eaa0eccc86e982a9b939b2b82d12cc5d013385ba5eadcc7e4fed23f4405f77bc" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - 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? - end -end diff --git a/Formula/sphinx.rb b/Formula/sphinx.rb deleted file mode 100644 index 592f1fdaee45f..0000000000000 --- a/Formula/sphinx.rb +++ /dev/null @@ -1,51 +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" - license "GPL-2.0" - revision 3 - head "https://github.com/sphinxsearch/sphinx.git" - - bottle do - rebuild 2 - sha256 "f3d89ffcd2926373af5a35bb7ae6f16e59074699eeacfb4d358a0dc5742729cc" => :catalina - sha256 "61f1ae14e253c8c84f0e8a9f3a26833ca4a1da887d97c0df8ecebb6096222546" => :mojave - sha256 "3daf6e565c7c12803c13b6439a872e61335b3b27c06719ca6f8cec93dcd2176e" => :high_sierra - end - - depends_on "mysql@5.7" - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - conflicts_with "manticoresearch", :because => "manticoresearch is a fork of sphinx" - - 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 - --with-mysql - --without-pgsql - ] - - system "./configure", *args - system "make", "install" - end - - test do - system bin/"searchd", "--help" - end -end diff --git a/Formula/spice-gtk.rb b/Formula/spice-gtk.rb deleted file mode 100644 index 4bc922ca4f8ba..0000000000000 --- a/Formula/spice-gtk.rb +++ /dev/null @@ -1,97 +0,0 @@ -class SpiceGtk < Formula - desc "GTK client/libraries for SPICE" - homepage "https://www.spice-space.org/" - url "https://www.spice-space.org/download/gtk/spice-gtk-0.37.tar.bz2" - sha256 "1f28b706472ad391cda79a93fd7b4c7a03e84b88fc46ddb35dddbe323c923bb7" - revision 4 - - bottle do - sha256 "0e79a73e33dd941c0011d5dab31fd330bd7fe7833d4a16f3d66ebf0fa431a2c3" => :catalina - sha256 "429a96412033c4c47ce892cbac6a43b7e9ad8523438f6d0ad532d8c8d3ee53ce" => :mojave - sha256 "32a55dcaa4902143f4fda24ca035ee3f1be41267d862e46bc3f7ba7a7181d026" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "autogen" => :build - depends_on "automake" => :build - depends_on "gobject-introspection" => :build - depends_on "intltool" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "vala" => :build - - depends_on "atk" - depends_on "cairo" - depends_on "gdk-pixbuf" - depends_on "gettext" - depends_on "glib" - depends_on "gst-libav" - depends_on "gst-plugins-bad" - depends_on "gst-plugins-base" - depends_on "gst-plugins-good" - depends_on "gst-plugins-ugly" - depends_on "gstreamer" - depends_on "gtk+3" - depends_on "jpeg" - depends_on "json-glib" - depends_on "libusb" - depends_on "lz4" - depends_on "openssl@1.1" - depends_on "opus" - depends_on "pango" - depends_on "pixman" - depends_on "spice-protocol" - depends_on "usbredir" - - # Upstream patch: https://gitlab.freedesktop.org/spice/spice-gtk/issues/88 - patch do - url "https://gitlab.freedesktop.org/spice/spice-gtk/commit/3c9b37bfc7c88969dfe16b8bfd874745e0fceb8a.diff" - sha256 "c2bb9c6dc0d07f333d10077987386680818296f1deb3b796ea7e35453aba7d91" - end - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --enable-introspection - --enable-gstvideo - --enable-gstaudio - --enable-gstreamer=1.0 - --enable-vala - --with-coroutine=gthread - --with-gtk=3.0 - --with-lz4 - --prefix=#{prefix} - ] - system "autoreconf" - system "./configure", *args - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - #include - int main() { - return spice_session_new() ? 0 : 1; - } - EOS - system ENV.cc, "test.cpp", - "-I#{Formula["atk"].include}/atk-1.0", - "-I#{Formula["cairo"].include}/cairo", - "-I#{Formula["gdk-pixbuf"].include}/gdk-pixbuf-2.0", - "-I#{Formula["glib"].include}/glib-2.0", - "-I#{Formula["glib"].lib}/glib-2.0/include", - "-I#{Formula["gtk+3"].include}/gtk-3.0", - "-I#{Formula["harfbuzz"].opt_include}/harfbuzz", - "-I#{Formula["pango"].include}/pango-1.0", - "-I#{Formula["spice-protocol"].include}/spice-1", - "-I#{include}/spice-client-glib-2.0", - "-I#{include}/spice-client-gtk-3.0", - "-L#{lib}", - "-lspice-client-glib-2.0", - "-lspice-client-gtk-3.0", - "-o", "test" - system "./test" - end -end diff --git a/Formula/spice-protocol.rb b/Formula/spice-protocol.rb deleted file mode 100644 index 0d876d736971e..0000000000000 --- a/Formula/spice-protocol.rb +++ /dev/null @@ -1,38 +0,0 @@ -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.2.tar.xz" - sha256 "8f3a63c8b68300dffe36f2e75eac57afa1e76d5d80af760fd138a0b3f44cf1e9" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "e1ade135b57cc78000d754e20b86ac2ce39f3a6bb466095995cc1dd1b57f7e96" => :catalina - sha256 "e1ade135b57cc78000d754e20b86ac2ce39f3a6bb466095995cc1dd1b57f7e96" => :mojave - sha256 "e1ade135b57cc78000d754e20b86ac2ce39f3a6bb466095995cc1dd1b57f7e96" => :high_sierra - end - - depends_on "meson" => :build - depends_on "ninja" => :build - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Dwith-docs=false", ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - return (SPICE_LINK_ERR_OK == 0) ? 0 : 1; - } - EOS - system ENV.cc, "test.cpp", - "-I#{include}/spice-1", - "-o", "test" - system "./test" - end -end diff --git a/Formula/spidermonkey.rb b/Formula/spidermonkey.rb deleted file mode 100644 index cc497a2a321c1..0000000000000 --- a/Formula/spidermonkey.rb +++ /dev/null @@ -1,54 +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 3 - head "https://hg.mozilla.org/mozilla-central", :using => :hg - - bottle do - cellar :any - sha256 "747d9e19e27fbe0455e462c5cb1943d1120e02f05df6f964cf502b09db5975df" => :catalina - sha256 "739fbe8aad9a04de987cdb95e2cabf30229a799f6de4c00a5cf6ce175e2e1390" => :mojave - sha256 "6970c515131a108d7e4ce50e49e2623ca88def0fbe11ddec4a641ef7de7d1787" => :high_sierra - sha256 "dbd3bdb0970f940628aacdb2e4db2984d3c4fdd1d6829a0b648db5a9b9229738" => :sierra - 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 9b4681a0cd1cf..0000000000000 --- a/Formula/spigot.rb +++ /dev/null @@ -1,54 +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-20200101.b1b0b20.tar.gz" - version "20200101" - sha256 "3a1870d5afd5a947241905561bff506893f8ea9ca3745cfcb326002bba81c931" - - bottle do - cellar :any_skip_relocation - sha256 "9a299a2e71a741633af321e38fc7067a7d71fa8f6e8ce6d7a5ec2cf255dc97d9" => :catalina - sha256 "95d2316186eea757662e9a9ec8f2f45107ef64ce28b2a6bc2a669c6d05e15bea" => :mojave - sha256 "043c9efcd99db4dbac2c10573e573f326b13ca1b411d1e2492411fa327741972" => :high_sierra - 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 f231ad853339b..0000000000000 --- a/Formula/spim.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Spim < Formula - desc "MIPS32 simulator" - homepage "https://spimsimulator.sourceforge.io/" - # No source code tarball exists - url "https://svn.code.sf.net/p/spimsimulator/code", :revision => 732 - version "9.1.22" - head "https://svn.code.sf.net/p/spimsimulator/code/" - - bottle do - sha256 "553aee29312b5b491d20c139652f87d8bd1547abd078285c5c80a13e02a868ff" => :catalina - sha256 "429ed6272e9255d16227b58bbc405c58d19ecb360540d2d228a91029b62506ab" => :mojave - sha256 "dfb4e24f378665fee30af8a3c362b1bc13e83b33196b66b4102c400fcee99b2e" => :high_sierra - end - - def install - bin.mkpath - cd "spim" do - system "make", "EXCEPTION_DIR=#{share}" - 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 794e289546cc9..0000000000000 --- a/Formula/spin.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Spin < Formula - desc "The efficient verification tool of multi-threaded software" - homepage "https://spinroot.com/spin/whatispin.html" - url "https://github.com/nimble-code/Spin/archive/version-6.5.2.tar.gz" - sha256 "e46a3bd308c4cd213cc466a8aaecfd5cedc02241190f3cb9a1d1b87e5f37080a" - - bottle do - cellar :any_skip_relocation - sha256 "6432ab186b64f64851fa0f60dae53c13b6c9bfbc6195c41abc08f1ddfd824bf6" => :catalina - sha256 "eae932021ba8a15f713dd60ca2a29267f5df53a832895c5ab1a342d2568c6f45" => :mojave - sha256 "3ffbbe34633fa0e177bd25343b3bbd35d706988ab04c4a617fff530cf3dc542a" => :high_sierra - 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/spiped.rb b/Formula/spiped.rb deleted file mode 100644 index 840e561ebfed8..0000000000000 --- a/Formula/spiped.rb +++ /dev/null @@ -1,25 +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.1.tgz" - sha256 "8d7089979db79a531a0ecc507b113ac6f2cf5f19305571eff1d3413e0ab33713" - - bottle do - cellar :any - sha256 "efe2a93770708c9a8c1474651b7b0b221d263b7fbb7dc75e014ff21caf084510" => :catalina - sha256 "44c1509c5faf96f0be69fd905525e2070cf25445afddfaf45584bd9c4a1d702c" => :mojave - sha256 "b5615b6afbc743c7b8b2776c3537ec42a4f1519f1f2f3e12bd06ae4e96ce5f14" => :high_sierra - end - - depends_on "bsdmake" => :build - depends_on "openssl@1.1" - - 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/spirv-cross.rb b/Formula/spirv-cross.rb deleted file mode 100644 index 8c23579a824cc..0000000000000 --- a/Formula/spirv-cross.rb +++ /dev/null @@ -1,37 +0,0 @@ -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/2020-06-29.tar.gz" - version "2020-06-29" - sha256 "29523168867fcfa55b03a65970a8572be67e37accb08ce1051b2d3ae19011452" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e23ad5f26f55793c665977deecea85f7d1ac92a9f80bef9c86eaf8195709007a" => :catalina - sha256 "33675bde9b1f2e5861d6c5b37f027ac9be2f9a1783d2efdc84f7756c483b085e" => :mojave - sha256 "51295b9f28b4bff7807d938c741c7a0c5a807d22808dd84df97457bbcde9f621" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "glm" => :test - depends_on "glslang" => :test - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - # 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", "spirv-cross" - - system "make" - end -end diff --git a/Formula/spirv-tools.rb b/Formula/spirv-tools.rb deleted file mode 100644 index 9d3240d235684..0000000000000 --- a/Formula/spirv-tools.rb +++ /dev/null @@ -1,57 +0,0 @@ -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/v2020.3.tar.gz" - sha256 "8b538a1cb2a4275ef9617abcb047d54e8292f975ac1d93323d5dd1e19c85280b" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "eb2e8acb244d040f0bbc586c037650a13672c32b5894fbe54be1531eb649ee35" => :catalina - sha256 "5874ff4a3b024d83c6b203e75087717951b571352bf1a25a59aeb4e58e5194fc" => :mojave - sha256 "f9f5ffdf2de7a2650b251aad002e94b27d16818172f2a168ca51cda8b80bf74a" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "python@3.8" => :build - - resource "re2" do - # revision number could be found in ./DEPS - url "https://github.com/google/re2.git", - :revision => "5bd613749fd530b576b890283bfb6bc6ea6246cb" - end - - resource "effcee" do - # revision number could be found in ./DEPS - url "https://github.com/google/effcee.git", - :revision => "cd25ec17e9382f99a895b9ef53ff3c277464d07d" - end - - resource "spirv-headers" do - # revision number could be found in ./DEPS - url "https://github.com/KhronosGroup/SPIRV-Headers.git", - :revision => "f8bf11a0253a32375c32cad92c841237b96696c0" - end - - def install - (buildpath/"external/re2").install resource("re2") - (buildpath/"external/effcee").install resource("effcee") - (buildpath/"external/SPIRV-Headers").install resource("spirv-headers") - - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DSPIRV_SKIP_TESTS=ON", - "-DEFFCEE_BUILD_TESTING=OFF" - system "make", "install" - end - - (libexec/"examples").install "examples/cpp-interface/main.cpp" - end - - test do - cp libexec/"examples"/"main.cpp", "test.cpp" - system ENV.cc, "-o", "test", "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", - "-lSPIRV-Tools", "-lSPIRV-Tools-link", "-lSPIRV-Tools-opt", "-lc++" - system "./test" - end -end diff --git a/Formula/splint.rb b/Formula/splint.rb deleted file mode 100644 index 1a50303f4ac2a..0000000000000 --- a/Formula/splint.rb +++ /dev/null @@ -1,62 +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 - cellar :any_skip_relocation - rebuild 1 - sha256 "98cc2bfccef60b21ec014ff35e71cc91a85e77435b4e429090e2767d0696bef8" => :catalina - sha256 "abe5a5d75a01fa272839dbc219a5fde2c76c7c7593e7dd365c152e4cb02a2c59" => :mojave - sha256 "b95c7e4981cb11c23b686dbb01dcc01c1317909371b5d21ba0aa155e47569eec" => :high_sierra - end - - uses_from_macos "flex" - - # 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 6c4b8262ee9ef..0000000000000 --- a/Formula/spoof-mac.rb +++ /dev/null @@ -1,74 +0,0 @@ -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" - revision 2 - head "https://github.com/feross/SpoofMAC.git" - - bottle do - cellar :any_skip_relocation - sha256 "2b2a5048aef69d8e5535d78f619297d7290e34c209100ebe748ac040e1a9f130" => :catalina - sha256 "f5b08954f87cd1625179a4f608e221462eb39cbf05099b82590835e0aa2e6774" => :mojave - sha256 "96a6e3e0ea4b2eb07521dc4dfa887dd9fd9b4d1583da8ea3cddf503ca6113322" => :high_sierra - end - - depends_on "python@3.8" - - resource "docopt" do - url "https://files.pythonhosted.org/packages/source/d/docopt/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 - - 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 944a4beba454c..0000000000000 --- a/Formula/spotbugs.rb +++ /dev/null @@ -1,49 +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/4.0.6/spotbugs-4.0.6.tgz" - sha256 "9fa5d77421a34c44a647bf1e03f75e9767c69aea35d626f41330ead7f84bd45e" - license "LGPL-2.1" - - head do - url "https://github.com/spotbugs/spotbugs.git" - - depends_on "gradle" => :build - end - - bottle :unneeded - - depends_on "openjdk" - - 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", - :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - 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 "#{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/spotify-tui.rb b/Formula/spotify-tui.rb deleted file mode 100644 index 376d7c99140f3..0000000000000 --- a/Formula/spotify-tui.rb +++ /dev/null @@ -1,28 +0,0 @@ -class SpotifyTui < Formula - desc "Terminal-based client for Spotify" - homepage "https://github.com/Rigellute/spotify-tui" - url "https://github.com/Rigellute/spotify-tui/archive/v0.20.0.tar.gz" - sha256 "ead7014a383625d133937d20184a0bf015bfb50d9ddde8779fad3841baba426b" - license "MIT" - head "https://github.com/Rigellute/spotify-tui.git" - - bottle do - cellar :any_skip_relocation - sha256 "d66b24cf5897b25d8c8b5efc5d3dd9c7f292e7432c37639653fef1f59dca5cdb" => :catalina - sha256 "06780fac000e4ead2a80b7a4df5196fbbc254f092dc8ccbac5d711fc8c0d33e9" => :mojave - sha256 "faf0fbfa572f3e8458414c21fddc1bd36156f2330969b4860f044bfc320be665" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - pid = fork { exec "#{bin}/spt -c #{testpath/"client.yml"} 2>&1 > output" } - sleep 2 - Process.kill "TERM", pid - assert_match /Enter your Client ID/, File.read("output") - end -end diff --git a/Formula/spotifyd.rb b/Formula/spotifyd.rb deleted file mode 100644 index d555e5ede1f8d..0000000000000 --- a/Formula/spotifyd.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Spotifyd < Formula - desc "Spotify daemon" - homepage "https://github.com/Spotifyd/spotifyd" - url "https://github.com/Spotifyd/spotifyd/archive/v0.2.24.tar.gz" - sha256 "d3763f4647217a8f98ee938b50e141d67a5f3d33e9378894fde2a92c9845ef80" - license "GPL-3.0" - head "https://github.com/Spotifyd/spotifyd.git" - - bottle do - cellar :any_skip_relocation - sha256 "3f51d6a45bdb965dcc88e34411949006b21050b7dfde5482e46cc6d74de41fa8" => :catalina - sha256 "c8ab59ca503c0cc84a1d684950be2e40db6bffc9f4392a686852fe10f0e3137c" => :mojave - sha256 "10b06d3fd2aaab659a75eb67170cd0e54f81830b3ebd4b7a65d1bcf7dce17570" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "dbus" - - def install - system "cargo", "install", "--no-default-features", - "--features=dbus_keyring,rodio_backend", - *std_cargo_args - end - - def caveats - <<~EOS - Configure spotifyd using these instructions: - https://github.com/Spotifyd/spotifyd#configuration-file - EOS - end - - plist_options :manual => "spotifyd --no-daemon" - - def plist - <<~EOS - - - - - Label - #{plist_name} - KeepAlive - - ThrottleInterval - 30 - ProgramArguments - - #{opt_bin}/spotifyd - --no-daemon - - - - EOS - end - - test do - cmd = "#{bin}/spotifyd --username homebrew_fake_user_for_testing --password homebrew --no-daemon --backend rodio" - assert_match /Authentication failed/, shell_output(cmd, 101) - end -end diff --git a/Formula/spring-completion.rb b/Formula/spring-completion.rb deleted file mode 100644 index 5ac4cb3ec0109..0000000000000 --- a/Formula/spring-completion.rb +++ /dev/null @@ -1,19 +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" - license "Unlicense" - 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 14799d721a20a..0000000000000 --- a/Formula/sproxy.rb +++ /dev/null @@ -1,46 +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 "ee0bff8062b0d007a9b762d35af1879e8abcf7203dae265d1a70ade53047af90" => :catalina - 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 78f4baa449be5..0000000000000 --- a/Formula/sql-translator.rb +++ /dev/null @@ -1,72 +0,0 @@ -require "language/perl" - -class SqlTranslator < Formula - include Language::Perl::Shebang - - desc "Manipulate structured data definitions (SQL and more)" - homepage "https://github.com/dbsrgits/sql-translator/" - url "https://cpan.metacpan.org/authors/id/M/MS/MSTROUT/SQL-Translator-1.61.tar.gz" - sha256 "840e3c77cd48b47e1343c79ae8ef4fca46d036356d143d33528900740416dfe8" - - bottle do - cellar :any_skip_relocation - sha256 "cf06c23d417650d888cf49edd10ae3697e92cb7c0dc33ef07c530d33493155aa" => :catalina - sha256 "d581943f0e91e5623b1ab053e212b6351513c81e04a77bc32b9626929f4e4667" => :mojave - sha256 "185ef1f4c9feb68f4b8f65a9cda078cdc8a9600163ba67caf60f91d3dc62ce76" => :high_sierra - end - - uses_from_macos "perl" - - 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" - - # Disable dynamic selection of perl which may cause segfault when an - # incompatible perl is picked up. - # https://github.com/Homebrew/homebrew-core/issues/4936 - bin.find { |f| rewrite_shebang detected_perl_shebang, f } - - 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 6b02a26819cbd..0000000000000 --- a/Formula/sqlcipher.rb +++ /dev/null @@ -1,48 +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.4.0.tar.gz" - sha256 "0924b2ae1079717954498bda78a30de20ce2a6083076b16214a711567821d148" - head "https://github.com/sqlcipher/sqlcipher.git" - - bottle do - cellar :any - sha256 "9e860b50ec668ef30f61377f39954241c4eeda4c4a664fbe1340e289229336bf" => :catalina - sha256 "1760574e8d3fc8ec3104f8ea51ea8c3ca4a28f69d985d5065b626cb59d5e3318" => :mojave - sha256 "9683b2a1b9a3ceac3e6caa3cdffbea0da9edd0efb786113a92e8eb505a4c015f" => :high_sierra - end - - depends_on "openssl@1.1" - - def install - args = %W[ - --prefix=#{prefix} - --enable-tempstore=yes - --with-crypto-lib=#{Formula["openssl@1.1"].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 -DSQLITE_ENABLE_COLUMN_METADATA" - - 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 79a6c07310f84..0000000000000 --- a/Formula/sqldiff.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Sqldiff < Formula - desc "Displays the differences between SQLite databases" - homepage "https://www.sqlite.org/sqldiff.html" - url "https://sqlite.org/2020/sqlite-src-3320300.zip" - version "3.32.3" - sha256 "9312f0865d3692384d466048f746d18f88e7ffd1758b77d4f07904e03ed5f5b9" - - bottle do - cellar :any_skip_relocation - sha256 "505cf291b499c91daa6613435ed54e1d19f6d84fa3bd7a664c8b60d2040125d0" => :catalina - sha256 "430b27651e0dcdff06eae788c238b42a7ec4b2779eb3aaa7987287b6269e686f" => :mojave - sha256 "29e1767b313f6983f2481077710ffbff2ebc71e48f31b855df12376df9b4bf6a" => :high_sierra - 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 "/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 6a33e2ce5f92f..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/2020/sqlite-src-3320300.zip" - version "3.32.3" - sha256 "9312f0865d3692384d466048f746d18f88e7ffd1758b77d4f07904e03ed5f5b9" - - bottle do - cellar :any_skip_relocation - sha256 "be0fcfd67c24d3535357a3296999260b2c59b44d30d9a83c3a24cbe66788d0e7" => :catalina - sha256 "c6a7f51142667d93c76f3a7526c2e01ecdbe3bc247aa023ebdbe1b84a7cf8132" => :mojave - sha256 "ff7a59898e5cd9a077038e410f3e6c947c1583b67543ba9139962a716ecbc4e4" => :high_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 e15ca9342cc48..0000000000000 --- a/Formula/sqlite.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Sqlite < Formula - desc "Command-line interface for SQLite" - homepage "https://sqlite.org/" - url "https://sqlite.org/2020/sqlite-autoconf-3320300.tar.gz" - version "3.32.3" - sha256 "a31507123c1c2e3a210afec19525fd7b5bb1e19a6a34ae5b998fbd7302568b66" - - bottle do - cellar :any - sha256 "98f798c4a62c9db46cc6ac82c499a0a1b8016dfebdfaa54eb4bf5c95a90117b0" => :catalina - sha256 "b89dc46dace451b2adc7f7e1c7456788cb3b74b3250d6183b0b7396bc00d7ccb" => :mojave - sha256 "9e117bfa603411bd552142da715ed9db8bd951e524e3d4ee7987cfeffcdf7b9d" => :high_sierra - end - - keg_only :provided_by_macos - - depends_on "readline" - - uses_from_macos "zlib" - - 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" - ENV.append "CPPFLAGS", "-DSQLITE_ENABLE_JSON1=1" - - args = %W[ - --prefix=#{prefix} - --disable-dependency-tracking - --enable-dynamic-extensions - --enable-readline - --disable-editline - --enable-session - ] - - system "./configure", *args - 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', 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 6439248b290ad..0000000000000 --- a/Formula/sqliteodbc.rb +++ /dev/null @@ -1,37 +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.9998.tar.gz" - mirror "https://dl.bintray.com/homebrew/mirror/sqliteodbc-0.9998.tar.gz" - sha256 "fabcbec73f98d1a34911636c02c29fc64147d27516b142e8e132c68c05a6065b" - - bottle do - cellar :any - sha256 "d0105cc73d44561e636923adb520710cdd7e0db835c6b31f151fe8a66a1b4fcc" => :catalina - sha256 "6499af774d13212bf19dfdbd14c18feadf516a5d6afbd2ebe7718d99db1723eb" => :mojave - sha256 "6220e24f32b5b26c5c983c9f9fb1aaa6aba7c13cad44a7500ecb72c7d7723a80" => :high_sierra - end - - depends_on "sqlite" - depends_on "unixodbc" - - uses_from_macos "libxml2" - uses_from_macos "zlib" - - 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 a705579a253e3..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.4.7.tar.gz" - sha256 "67c3f2a5cde788be59d7cdb334c3835b32d082f88298530bcfe67525f3103bfc" - 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 8aa21d95fd79e..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/67/4b/253b6902c1526885af6d361ca8c6b1400292e649f0e9c95ee0d2e8ec8681/sqlparse-0.3.1.tar.gz" - sha256 "e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "a886da74810f4112ac16b08840eac4ebd3ccd3daf5b7219ba1ad84d2981b8478" => :catalina - sha256 "cbd26ba6872f20f79ccb9545f2329697e3f2611c124040502cd751fa4efd5432" => :mojave - sha256 "c3e7934f912db3b38d16bd6adb86a496568040bcbd66f646822679b233d3d193" => :high_sierra - end - - depends_on "python@3.8" - - 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 a654d687f61b4..0000000000000 --- a/Formula/sqoop.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Sqoop < Formula - desc "Transfer bulk data between Hadoop and structured datastores" - homepage "https://sqoop.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=sqoop/1.4.7/sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz" - mirror "https://archive.apache.org/dist/sqoop/1.4.7/sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz" - version "1.4.7" - sha256 "64111b136dbadcb873ce17e09201f723d4aea81e5e7c843e400eb817bb26f235" - - bottle :unneeded - - depends_on "coreutils" - depends_on "hadoop" - depends_on "hbase" - depends_on "hive" - depends_on "openjdk" - depends_on "zookeeper" - - 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", :JAVA_HOME => Formula["openjdk"].opt_prefix) - - # 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 4b3105b51977c..0000000000000 --- a/Formula/sqtop.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "653be227eb16e647b90f0f034543a490476e3ceaa0e9c165b1963b916b4a9703" => :catalina - sha256 "27786a7ca63d00ecb47e9f1e3e844a077d38048871cec3c03308831716338dc1" => :mojave - sha256 "fe9a704fdf7f24dadba6b4f7cc20f8f07d93c19450701e01b408ea2f7574ec63" => :high_sierra - sha256 "30f51d2886adf914eef22af21dfac92f544c59c88b6e7961972eb6702e48d0c0" => :sierra - sha256 "6d838378cae0971561da60dff1e887bf03b60d1a0ff198a5d468654ef790d9e9" => :el_capitan - sha256 "29291fedaa06b7b680e44e1b82f643f7ddffc67435312b7c2f3654df0728cb8b" => :yosemite - sha256 "f1ab5347b698d2e1221a5111fec52022159afc898e5ad7a5318becb23cd35543" => :mavericks - 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 4046bd287fb26..0000000000000 --- a/Formula/squashfs.rb +++ /dev/null @@ -1,79 +0,0 @@ -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/4.4.tar.gz" - sha256 "a7fa4845e9908523c38d4acf92f8a41fdfcd19def41bd5090d7ad767a6dc75c3" - license "GPL-2.0" - head "https://github.com/plougher/squashfs-tools", - :using => :git, - :commit => "52eb4c279cd283ed9802dd1ceb686560b22ffb67" - - bottle do - cellar :any - sha256 "e8657da9ab4faa089486fd3af04a3f0b63b13e609cdde57be57d92336592297a" => :catalina - sha256 "f3e200ecf28cf1fec5fb11e1cd210d8e935db314c39bda62095614e08d9e7477" => :mojave - sha256 "855306e06f9eeaa7b3cb8960f0c75fe097921a2b99efe8064a6cc97c8b2f579b" => :high_sierra - sha256 "e318da56d36a0edbf1095a795f4a797d4919f8f859116fc8dc2448088ea0dfe1" => :sierra - end - - depends_on "lz4" - depends_on "lzo" - depends_on "xz" - depends_on "zstd" - - uses_from_macos "zlib" - - # 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. - patch do - url "https://github.com/plougher/squashfs-tools/pull/69.patch?full_index=1" - sha256 "eb399705d259346473ebe5d43b886b278abc66d822ee4193b7c65b4a2ca903da" - end - - def install - args = %W[ - EXTRA_CFLAGS=-std=gnu89 - 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 - ] - - cd "squashfs-tools" do - system "make", *args - bin.install %w[mksquashfs unsquashfs] - end - - doc.install %w[README-4.4 RELEASE-READMEs USAGE COPYING] - 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_predicate testpath/"test.xz.sqsh", :exist? - 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_predicate testpath/"out/test1", :exist? - assert_predicate testpath/"out/test2", :exist? - assert_predicate testpath/"out/test3", :exist? - assert shell_output("diff -r in/ out/") - end -end diff --git a/Formula/squashfuse.rb b/Formula/squashfuse.rb deleted file mode 100644 index f0ff6ceb5486d..0000000000000 --- a/Formula/squashfuse.rb +++ /dev/null @@ -1,37 +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 "7e2e0499c0b9f98beb398319c949d2a1d45de6a3f0b546ef1d55214f68522312" => :catalina - 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 048d8bf03ac64..0000000000000 --- a/Formula/squid.rb +++ /dev/null @@ -1,95 +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/v4/squid-4.12.tar.xz" - sha256 "f42a03c8b3dc020722c88bf1a87da8cb0c087b2f66b41d8256c77ee1b527e317" - license "GPL-2.0" - - bottle do - sha256 "9910eea9598125a80e3282a09781dda3bb73b5edc9b3a155e2e41361b672c9b3" => :catalina - sha256 "afb188d816e0ca55a082d5dfc79cb48c0dbd879be1835bf8f774e4949cd71817" => :mojave - sha256 "65900a2c2ba2f9fcef8b294ec2dc26c76157e972796458fffd20b07c69e64150" => :high_sierra - end - - head do - url "lp:squid", :using => :bzr - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - depends_on "openssl@1.1" - - 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 - 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/squirrel.rb b/Formula/squirrel.rb deleted file mode 100644 index 232c1632f98a1..0000000000000 --- a/Formula/squirrel.rb +++ /dev/null @@ -1,60 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "036b6172b0a11dde45cc6e28613a0db3a2aa1a7a44f220d1bd963a1903533a56" => :catalina - 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 e192f5c42e45f..0000000000000 --- a/Formula/sratom.rb +++ /dev/null @@ -1,42 +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.4.tar.bz2" - sha256 "146c8f14b8902ac3c8fa8c2e0a014eb8a38fab60090c5adbfbff3e3b7c5c006e" - license "ISC" - - bottle do - cellar :any - sha256 "cec8ea9efb598554185a2195c3a5be91abf9b4b09e4d9400c9709155d2963c2c" => :catalina - sha256 "b25239c1f3dabe314ec5fa91879d2f691fc83d4b23ed176022310b8b10a37e2c" => :mojave - sha256 "c699c13f94f2fae5b4df4e68ccfe674c218e15f80302c1cf661038f75030a26a" => :high_sierra - 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 - - test do - (testpath/"test.c").write <<~EOS - #include - - int main() - { - return 0; - } - EOS - lv2 = Formula["lv2"].opt_include - serd = Formula["serd"].opt_include - sord = Formula["sord"].opt_include - system ENV.cc, "-I#{lv2}", "-I#{serd}/serd-0", "-I#{sord}/sord-0", "-I#{include}/sratom-0", - "-L#{lib}", "-lsratom-0", "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/sratoolkit.rb b/Formula/sratoolkit.rb deleted file mode 100644 index b657f212c70fe..0000000000000 --- a/Formula/sratoolkit.rb +++ /dev/null @@ -1,85 +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.10.8.tar.gz" - sha256 "4adb969a9a998f6a50020f99aa66f6ae27916f7dc83ddf6722fc0fea4a3a4d17" - head "https://github.com/ncbi/sra-tools.git" - - bottle do - cellar :any_skip_relocation - sha256 "2f5dba15de1efbf19142a6c89e8c3c1c8cb4e081ba3375d66536b1af3381645f" => :catalina - sha256 "49c589cf081c862f544b346b1e6878c5ab6d9a01b8a8582b054d61b153136199" => :mojave - sha256 "0e8fd8c3dca32ab66080dccc7050d1fefff0802809217b695cb888b79f5b2312" => :high_sierra - end - - depends_on "hdf5" - depends_on "libmagic" - - uses_from_macos "libxml2" - uses_from_macos "perl" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "ngs-sdk" do - url "https://github.com/ncbi/ngs/archive/2.10.8.tar.gz" - sha256 "f20fae21439b69b6a3573c864a175e0f9aa47ca6dd12bea15e429b7c5a9b81b5" - end - - resource "ncbi-vdb" do - url "https://github.com/ncbi/ncbi-vdb/archive/2.10.8.tar.gz" - sha256 "7a593aa22584db9443bb56ac01409707bca01b8f9601fe530dac81b73f1a44df" - 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 - # 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/src.rb b/Formula/src.rb deleted file mode 100644 index 7ebc57141f73e..0000000000000 --- a/Formula/src.rb +++ /dev/null @@ -1,34 +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.28.tar.gz" - sha256 "ee448f17e0de07eed749188bf2b977211fc609314b079ebe6c23485ac72f79ba" - - bottle do - cellar :any_skip_relocation - sha256 "312d165d1840e28a6c33df33248a7236dc2c524ee792b575b2774afe5597e446" => :catalina - sha256 "312d165d1840e28a6c33df33248a7236dc2c524ee792b575b2774afe5597e446" => :mojave - sha256 "312d165d1840e28a6c33df33248a7236dc2c524ee792b575b2774afe5597e446" => :high_sierra - end - - head do - url "https://gitlab.com/esr/src.git" - depends_on "asciidoc" => :build - end - - depends_on "rcs" - - 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| - assert_match /^=\s*test.txt/, r.read - end - end -end diff --git a/Formula/srecord.rb b/Formula/srecord.rb deleted file mode 100644 index d1ee7af86c89f..0000000000000 --- a/Formula/srecord.rb +++ /dev/null @@ -1,32 +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 "cc4e1e89835954876853f5f7bcccbfd172adbb5651c1f2790ea3da10e4347845" => :catalina - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/srecord/1.64.patch" - sha256 "140e032d0ffe921c94b19145e5904538233423ab7dc03a9c3c90bf434de4dd03" - end - - def install - system "./configure", "--prefix=#{prefix}", "LIBTOOL=glibtool" - system "make", "install" - end -end diff --git a/Formula/srmio.rb b/Formula/srmio.rb deleted file mode 100644 index 63f211812e253..0000000000000 --- a/Formula/srmio.rb +++ /dev/null @@ -1,41 +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" - license "MIT" - - bottle do - cellar :any - sha256 "f545c95e5fb1bbcdfc524ac0c6173ad3b95da632c68803cddb1423a0fa66d9be" => :catalina - 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 fb5ebbb736e75..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.4.1.tar.gz" - sha256 "e80ca1cd0711b9c70882c12ec365cda1ba852e1ce8acd43161a21a04de0cbf14" - license "MPL-2.0" - head "https://github.com/Haivision/srt.git" - - bottle do - cellar :any - sha256 "bbadac0b96337c84604feba7fc654cf1c1bb8040a616e0ee2603e580da5e5df5" => :catalina - sha256 "5a689897fa108ad3976d609fba6b9233e1cdab7eab5e90a45ec6b52e899718c0" => :mojave - sha256 "01039fd82d968be00949e93af2e1eb5ad16152099975e1e00d355641b7eacd01" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - def install - openssl = Formula["openssl@1.1"] - 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}/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/srtp.rb b/Formula/srtp.rb deleted file mode 100644 index 149e22b9b3201..0000000000000 --- a/Formula/srtp.rb +++ /dev/null @@ -1,28 +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.3.0.tar.gz" - sha256 "94093a5d04c5f4743e8d81182b76938374df6d393b45322f24960d250b0110e8" - head "https://github.com/cisco/libsrtp.git" - - bottle do - cellar :any - sha256 "b96d4c3bb159a6f43d5bdd9cc0be0d8deecb06c95df19f2d9cc1f517ffc64ad6" => :catalina - sha256 "4bbad999b46dd545aa32882e968d441f5d5e709dc8549ef79e3885dd49fcb964" => :mojave - sha256 "5c70c41484064bbe25c31a19fc2cffc5cbea3de27e837a039b17767aeb1b57b8" => :high_sierra - end - - depends_on "pkg-config" => :build - - def install - system "./configure", "--disable-debug", "--prefix=#{prefix}" - 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 2f5ebaa6e37fe..0000000000000 --- a/Formula/ssdb.rb +++ /dev/null @@ -1,92 +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.7.tar.gz" - sha256 "ef7c1c048c48671b039fee4c557bcd0150cbab8f3814fdfb782b7aeec9f071ec" - license "BSD-3-Clause" - head "https://github.com/ideawu/ssdb.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "648dad2645bc14dcc8aed45a6345d6a691a816d30aaf36848912807b3d2923e3" => :catalina - sha256 "b6d12c008d3b1b1b74dc149f78984039ffcdccdb30a4bf4b7d43960c02a121e0" => :mojave - sha256 "a09b9360d1cae859fdc035dab88b4f58e6c495fb428457e470fb37cecdaeee01" => :high_sierra - 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 e6999bb066f97..0000000000000 --- a/Formula/ssdeep.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "f497e16679d8c9a4e04bc3e2458b5d02f5d2899b1be522df2cfcac88fbd5a672" => :catalina - 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 7fc4f5f08c653..0000000000000 --- a/Formula/ssed.rb +++ /dev/null @@ -1,31 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "21b9139163cd1f1ddf11ad063e4e9c2409d7c73cba2473912d9117a1631205b8" => :catalina - sha256 "3684fa95549fe291253881be5f173e9cff43940be146842f3576a48c7052e234" => :mojave - sha256 "cc8945d2f1d9849181c61650958ba6f90a1ff4f4d7dfacf265b5d13921d0a91b" => :high_sierra - 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 b8f4a6890c45f..0000000000000 --- a/Formula/ssh-audit.rb +++ /dev/null @@ -1,25 +0,0 @@ -class SshAudit < Formula - include Language::Python::Shebang - - desc "SSH server & client auditing" - homepage "https://github.com/jtesta/ssh-audit" - url "https://github.com/jtesta/ssh-audit/releases/download/v2.2.0/ssh-audit-2.2.0.tar.gz" - sha256 "a8f4f01122234bd84c01440bfd3b7a6026c50c1a06f3044846a8503c94f94cfb" - license "MIT" - revision 1 - head "https://github.com/jtesta/ssh-audit.git" - - bottle :unneeded - - depends_on "python@3.8" - - def install - rewrite_shebang detected_python_shebang, "ssh-audit.py" - 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 92b8c19d93c96..0000000000000 --- a/Formula/ssh-copy-id.rb +++ /dev/null @@ -1,23 +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-8.3p1.tar.gz" - mirror "https://mirror.vdms.io/pub/OpenBSD/OpenSSH/portable/openssh-8.3p1.tar.gz" - version "8.3p1" - sha256 "f2befbe0472fe7eb75d23340eb17531cb6b3aac24075e2066b41f814e12387b2" - head "https://github.com/openssh/openssh-portable.git" - - bottle :unneeded - - 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/ssh-permit-a38.rb b/Formula/ssh-permit-a38.rb deleted file mode 100644 index a91c41811a5c8..0000000000000 --- a/Formula/ssh-permit-a38.rb +++ /dev/null @@ -1,37 +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" - license "MIT" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "3eefd64fbbe3e4d500a69352091da85ca685a435094facc30e6942d9d5e89a1d" => :catalina - sha256 "683ebbe9a6a845802f825f1775e6d861387be41fd520b648275f97a580e92398" => :mojave - sha256 "7d82d59932bb6d721a31726efc231d043d54d180995d0119d8f8bf9fc37f3e9b" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "rust" => :build - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - # Ensure that the `openssl` crate picks up the intended library. - # https://crates.io/crates/openssl#manual-configuration - ENV["OPENSSL_DIR"] = Formula["openssl@1.1"].opt_prefix - - system "cargo", "install", *std_cargo_args - 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 9954bb3328feb..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.6", - :revision => "7296095220586d5dc46554444b2e23aba164066c" - license "BSD-3-Clause" - head "https://github.com/ssh-vault/ssh-vault.git" - - bottle do - cellar :any_skip_relocation - sha256 "d12a7148614bb8fbc97e0e7f72fe04e18da0cd7fb54ee1e5b9308757a2377e83" => :catalina - sha256 "7b7874972e68f117d14f5027895b6259320abe8db5deda72da09875c507755b1" => :mojave - sha256 "c6cf671474c67600ddac7bbcae909797c8ba26e16692533b5e82faa153ea9d77" => :high_sierra - 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/key/#{fingerprint} view" - output = pipe_output(cmd, output, 0) - assert_equal "hi", output.chomp - end -end diff --git a/Formula/sshfs.rb b/Formula/sshfs.rb deleted file mode 100644 index 1d421e098abe2..0000000000000 --- a/Formula/sshfs.rb +++ /dev/null @@ -1,42 +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" - license "GPL-2.0" - revision 2 - - bottle do - cellar :any - sha256 "aceff3131dd0b098bdef8b5dda54d117b5dd5269ca146f7a5032ecde3c99b6d2" => :catalina - sha256 "5f69267c0f1f2489989e108919d66210e058423d0d1f1661812c0194b164619c" => :mojave - sha256 "58d222f37622b399352f16eaf823d3e564445d9e951629e965281ac31de5ef4a" => :high_sierra - sha256 "dc4a7f24c2cbebd7c35891200b043d737ba6586a28992708ef849ffedff7bb01" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on :osxfuse - - # Apply patch that clears one remaining roadblock that prevented setting - # a custom I/O buffer size on macOS. With this patch in place, it's - # recommended to use e.g. `-o iosize=1048576` (or other, reasonable value) - # when lauching `sshfs`, for improved performance. - # See also: https://github.com/libfuse/sshfs/issues/11 - patch do - url "https://github.com/libfuse/sshfs/commit/667cf34622e2e873db776791df275c7a582d6295.diff?full_index=1" - sha256 "6a121d58a94cf0efebbfa217d62aa4d9915a8e6573ae2c086170ff9d9fc09456" - end - - 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 819d78132a916..0000000000000 --- a/Formula/sshguard.rb +++ /dev/null @@ -1,87 +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.4.0/sshguard-2.4.0.tar.gz" - sha256 "065ca4091b3a96802714b560dbbc3d9f0e67574e99e2b6e8857aa1027d17d6c0" - version_scheme 1 - - bottle do - cellar :any_skip_relocation - sha256 "033c09dbb290b68e8b33ce6709fba3b8764342af4b1ddac8d91b4e63973caea0" => :catalina - sha256 "63af5b9fe223253a1798e8500475af1675c8a36d987628b9e195a5da33bad252" => :mojave - sha256 "54bb8831aaf7de0a2ba0ee3780e34a76dd67e90d3db8bcf5e3496ec78e4d5b56" => :high_sierra - sha256 "94c8ecf69111d23d51cc2e61ecfc0438dd9006236340e659ed094b8d7e3fd699" => :sierra - 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-pf\"" - if MacOS.version >= :sierra - 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 - - 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| - assert_equal "SSHGuard #{version}", r.read.strip - ensure - Process.wait pid - end - end -end diff --git a/Formula/sshtrix.rb b/Formula/sshtrix.rb deleted file mode 100644 index c31b6f7ac80f9..0000000000000 --- a/Formula/sshtrix.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Sshtrix < Formula - desc "SSH login cracker" - homepage "https://nullsecurity.net/tools/cracker.html" - url "https://github.com/nullsecuritynet/tools/raw/master/cracker/sshtrix/release/sshtrix-0.0.3.tar.gz" - sha256 "30d1d69c1cac92836e74b8f7d0dc9d839665b4994201306c72e9929bee32e2e0" - - bottle do - cellar :any - sha256 "e115c5a6f3378af5a0ab4297673bb7b659dd20054ab91d818b083ce13951e7da" => :catalina - sha256 "a54f2c867dd6539824cc69888975d3cd2041b4b922183262d29fcdf655391cfa" => :mojave - sha256 "dd567f106a7fe8a7a6f9e2474b284109e1dbcb14ed847163d1f65f4d69467f93" => :high_sierra - sha256 "dafb3bc8c14e729cbbfbf8dc6a9ce789e01732a644aa84b243af24f2bd92ce19" => :sierra - 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/sshuttle.rb b/Formula/sshuttle.rb deleted file mode 100644 index 8dcf233d9411f..0000000000000 --- a/Formula/sshuttle.rb +++ /dev/null @@ -1,30 +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 => "v1.0.2", - :revision => "8c91958ff3805dbdef9b659061a0de25ba4b34f8" - head "https://github.com/sshuttle/sshuttle.git" - - bottle do - cellar :any_skip_relocation - sha256 "4ed29a3e61c9b1faa65f336e9942f200a53b22dd8c0690da411c80c8817f02c9" => :catalina - sha256 "7d95976338b60398fa655967997e5ca3731d1af20f3f1fc7d41aef7143ccbca9" => :mojave - sha256 "6bb0dd8552477a173c6015ec75b2a05ccd3806500546bb490ea9d26e51a06d5e" => :high_sierra - end - - depends_on "python@3.8" - - 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 66b716539e0d6..0000000000000 --- a/Formula/ssldump.rb +++ /dev/null @@ -1,71 +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" - revision 2 - - bottle do - cellar :any - sha256 "4227a45957205b7e183b9f66f4ad2cd57abd7eda44db220d0feadf4de03b5778" => :catalina - sha256 "940b872d8dd649cc7ef309bb169a02a48425b7059c44c012831fafd5cbe8b61e" => :mojave - sha256 "096ee72c50d64cddefb9d90f2b9c904322eaf36eab4c76bb914a60387b75baf9" => :high_sierra - end - - depends_on "libpcap" - depends_on "openssl@1.1" - - # 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}", - "--with-pcap=#{Formula["libpcap"].opt_prefix}", - "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 3b79553517b12..0000000000000 --- a/Formula/sslh.rb +++ /dev/null @@ -1,28 +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.20.tar.gz" - sha256 "a7f49b0a1cfcb7bb9d97f5ffa932bff11c5f65d9a9bd8fe1812481dee5855116" - license "GPL-2.0" - head "https://github.com/yrutschle/sslh.git" - - bottle do - cellar :any - sha256 "be0c707c6a1216bc06da14003f0af6197ac450a2fe4b6b6ce12b3e614b54fbca" => :catalina - sha256 "cee0f6398a940312dd3198dda55d949955aa1374cd15fb5841c0446c67508e4d" => :mojave - sha256 "b1d1ea3c654defbd69cc850ecb9b5b97b09e3b8c991faf48cb22d4190e0791b6" => :high_sierra - sha256 "8a4b0d4715358a714c8f3ef86496e91416bcfe70067f3d71db30f97616b71080" => :sierra - 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 311a0dbf2c2cf..0000000000000 --- a/Formula/ssllabs-scan.rb +++ /dev/null @@ -1,36 +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.5.0.tar.gz" - sha256 "51c52e958d5da739910e9271a3abf4902892b91acb840ea74f5c052a71e3a008" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "6e5035b4bf3b2535da7964ea92672059f254df09f1dcaac94fa51e70a084861c" => :catalina - sha256 "eab95a02c320153e8bcc68bcbc960665fd7b755d9a339d4bdd6618d5d33714e6" => :mojave - sha256 "91041d74d4bd340c53f15bab9c43fb6d7757601e0da00d810cdc2733a6e6c9a5" => :high_sierra - sha256 "a2e66ec0c5e565428d2cc33906d8eecf38697e503cedb95f4817c8f186537f73" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - system "go", "build", "-o", bin/"ssllabs-scan", "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/sslmate.rb b/Formula/sslmate.rb deleted file mode 100644 index 4d8aa5e3239b2..0000000000000 --- a/Formula/sslmate.rb +++ /dev/null @@ -1,56 +0,0 @@ -require "language/perl" - -class Sslmate < Formula - include Language::Perl::Shebang - - desc "Buy SSL certs from the command-line" - homepage "https://sslmate.com/" - url "https://packages.sslmate.com/other/sslmate-1.7.1.tar.gz" - sha256 "454e19338910363189b349cfe3477351a20c34c6fda0f312ad143b1688faa6c4" - - bottle do - cellar :any_skip_relocation - sha256 "39df7966fbc2d8ddf054fca99456e3f5837b78c849bacc25fd40a0ae9e48bb60" => :catalina - sha256 "39df7966fbc2d8ddf054fca99456e3f5837b78c849bacc25fd40a0ae9e48bb60" => :mojave - sha256 "39df7966fbc2d8ddf054fca99456e3f5837b78c849bacc25fd40a0ae9e48bb60" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "perl" - - resource "boto" do - url "https://files.pythonhosted.org/packages/c8/af/54a920ff4255664f5d238b5aebd8eedf7a07c7a5e71e27afcfe840b82f51/boto-2.49.0.tar.gz" - sha256 "ea0d3b40a2d852767be77ca343b58a9e3a4b00d9db440efb8da74b4e58025e5a" - end - - def install - ENV.prepend_create_path "PERL5LIB", libexec/"vendor/lib/perl5" - - python3 = Formula["python@3.8"].opt_bin/"python3" - xy = Language::Python.major_minor_version python3 - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - - 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"] } - env[:PYTHONPATH] = ENV["PYTHONPATH"] - bin.env_script_all_files(libexec/"bin", env) - - rewrite_shebang detected_perl_shebang, libexec/"bin/sslmate" - 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 74e50f8fe5364..0000000000000 --- a/Formula/sslscan.rb +++ /dev/null @@ -1,40 +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.13-rbsec.tar.gz" - sha256 "8a09c4cd1400af2eeeec8436a2f645ed0aae5576f4de045a09ea9ff099f56f4a" - license "GPL-3.0" - head "https://github.com/rbsec/sslscan.git" - - bottle do - cellar :any_skip_relocation - sha256 "788f9752e795f4ff95e1251a243a5829a6f9b40facbdca40e4819de5f9d7dc4c" => :catalina - sha256 "8a8826da03dbbaa9ee89c8e6b95496c178f5a93d86468402fb6e432ebc7f2c68" => :mojave - sha256 "e0735e75b58b7cb0ef72cc79089df545e0140e52bc206c1791ab979192251d22" => :high_sierra - sha256 "4b00ee57ccf8dfbc890bbc7ca978dd4f310e7f73dfc022c78c33b69b9b3449dc" => :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 3d89566f06e69..0000000000000 --- a/Formula/sslsplit.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Sslsplit < Formula - desc "Man-in-the-middle attacks against SSL encrypted network connections" - homepage "https://www.roe.ch/SSLsplit" - url "https://github.com/droe/sslsplit/archive/0.5.5.tar.gz" - sha256 "3a6b9caa3552c9139ea5c9841d4bf24d47764f14b1b04b7aae7fa2697641080b" - revision 1 - head "https://github.com/droe/sslsplit.git", :branch => "develop" - - bottle do - cellar :any - sha256 "a533ccfc4c05e2affcfa4c697c38d995239abfd1fe4c383ffaa1a8ed42a933e6" => :catalina - sha256 "10534d989706ca1d29b7f1cbffc59ef07b02d0d755cb8aec5bdf9430c52769bb" => :mojave - sha256 "4f7a3cb7333641658889a55830a69d0ac64cf93dca8a6de32052d4080f477058" => :high_sierra - end - - depends_on "check" => :build - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "libnet" - depends_on "libpcap" - depends_on "openssl@1.1" - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - port = free_port - - cmd = "#{bin}/sslsplit -D http 0.0.0.0 #{port} www.roe.ch 80" - output = pipe_output("(#{cmd} & PID=$! && sleep 3 ; kill $PID) 2>&1") - assert_match "Starting main event loop", output - end -end diff --git a/Formula/sslyze.rb b/Formula/sslyze.rb deleted file mode 100644 index d3af7c3213f59..0000000000000 --- a/Formula/sslyze.rb +++ /dev/null @@ -1,89 +0,0 @@ -class Sslyze < Formula - include Language::Python::Virtualenv - - desc "SSL scanner" - homepage "https://github.com/nabla-c0d3/sslyze" - license "AGPL-3.0" - - stable do - url "https://github.com/nabla-c0d3/sslyze/archive/3.0.8.tar.gz" - sha256 "9a4d2354a0db53a70a4329e63af9ecc4639c74f9048811c2a3f03a41695c3cbe" - - resource "nassl" do - url "https://github.com/nabla-c0d3/nassl/archive/3.0.0.tar.gz" - sha256 "d340c176e497d8cf0a9233d36905195aec7d0ae9eabd9c837de8e0ad19019921" - end - end - - bottle do - cellar :any - sha256 "b5a0b1691a0f599ba5e43e54c690ebcdcb71460363e837a4c37bf7a92d8210e6" => :catalina - sha256 "2b13136ca39b259fe1cf169f2fa0032ea554f0973b228e710c10b4fe15340bcf" => :mojave - sha256 "60928584ee62129c4ec2ef9bd3387ed0f0d08ec7b41d10b211fe54b47b4ba8a4" => :high_sierra - 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 "pipenv" => :build - depends_on :arch => :x86_64 - depends_on "libffi" - depends_on "openssl@1.1" - depends_on "python@3.8" - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/9d/0a/d7060601834b1a0a84845d6ae2cd59be077aafa2133455062e47c9733024/cryptography-2.9.tar.gz" - sha256 "0cacd3ef5c604b8e5f59bf2582c076c98a37fe206b31430d0cd08138aff0986e" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "tls-parser" do - url "https://files.pythonhosted.org/packages/66/4e/da7f727a76bd9abee46f4035dbd7a4711cde408f286dae00c7a1f9dd9cbb/tls_parser-1.2.2.tar.gz" - sha256 "83e4cb15b88b00fad1a856ff54731cc095c7e4f1ff90d09eaa24a5f48854da93" - end - - def install - venv = virtualenv_create(libexec, "python3.8") - - res = resources.map(&:name).to_set - res -= %w[nassl] - - res.each do |r| - venv.pip_install resource(r) - end - - resource("nassl").stage do - nassl_path = Pathname.pwd - inreplace "Pipfile", 'python_version = "3.7"', 'python_version = "3.8"' - system "pipenv", "install", "--dev" - system "pipenv", "run", "invoke", "build.all" - venv.pip_install nassl_path - 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 5bf3c758d99a5..0000000000000 --- a/Formula/ssss.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "ba1cd924e9aa97d91ff125c082ff9d1b2eb7ce3bea642edc1ae9c4f94340d19d" => :catalina - 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 2c82ada8b03f4..0000000000000 --- a/Formula/sstp-client.rb +++ /dev/null @@ -1,42 +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.13.tar.gz" - sha256 "961258fca0795d8ad60b047942cf7cb53d025d353fd1e4ba08c2b75799f5321b" - license "GPL-2.0" - - bottle do - sha256 "07d9e21c21591a675d760f059838f26bbbe02a04b27518bce5d3a9b0d0069194" => :catalina - sha256 "0c32039442cbe0c26bc90660fd99e19940b71677637b60d03350a4c90b3ca35c" => :mojave - sha256 "cfc794cfd038b84da0b1f329bc7eb6f5c5165e1727ec53c259a5d93ab48d47b0" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "openssl@1.1" - - 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 6c10256c5024d..0000000000000 --- a/Formula/st.rb +++ /dev/null @@ -1,34 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b72351e73910d27847fb942bdc1413eeefefdf2b4abdb0a1c046743fcbfb16c8" => :catalina - 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/standardese.rb b/Formula/standardese.rb deleted file mode 100644 index 557c607f54fc1..0000000000000 --- a/Formula/standardese.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Standardese < Formula - desc "Next-gen documentation generator for C++" - homepage "https://standardese.github.io/" - url "https://github.com/standardese/standardese.git", - :tag => "v0.4.0", - :revision => "dc1e327df74c83ceb476ff3e74920cba021c7cc9" - license "MIT" - head "https://github.com/standardese/standardese.git" - - bottle do - sha256 "3a6177527aeb08bb005443637fae7c50628a2247b3d96341453651ca93de8604" => :catalina - sha256 "7e2747a2add19d88ac060dabe43e6aee9634aaed0c3508bb2c1ce1de1a255361" => :mojave - sha256 "4dabd9a1d6e5a106223975185dad5d9d56c87eea471d7b8db7661ed92fbaac67" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "llvm" # must be Homebrew LLVM, not system, because of `llvm-config` - - def install - mkdir "build" do - system "cmake", "../", *std_cmake_args - system "cmake", "--build", ".", "--target", "standardese_tool" - cd "tool" do - bin.install "standardese" - end - end - cd "include" do - include.install "standardese" - end - doc.install "README.md", "CHANGELOG.md", "LICENSE" - (lib/"cmake/standardese").install "standardese-config.cmake" - end - - test do - (testpath/"test.hpp").write <<~EOS - #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; - }; - EOS - system "standardese", - "--compilation.standard", "c++17", - "--output.format", "xml", - testpath/"test.hpp" - system "fgrep", "-q", "", testpath/"doc_test.xml" - end -end diff --git a/Formula/stanford-corenlp.rb b/Formula/stanford-corenlp.rb deleted file mode 100644 index 42d7ff9ef4f37..0000000000000 --- a/Formula/stanford-corenlp.rb +++ /dev/null @@ -1,24 +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-10-05.zip" - version "3.9.2" - sha256 "833f0f5413a33e7fbc98aeddcb80eb0a55b672f67417b8d956ed9c39abe8d26c" - revision 1 - - bottle :unneeded - - 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" - 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 4251336e0ce9c..0000000000000 --- a/Formula/stanford-ner.rb +++ /dev/null @@ -1,22 +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-10-16.zip" - version "3.9.2" - sha256 "fa737bc6d7ac01de6d13a4628b229b7eabae24c446bc616608b7aad04ed6c65a" - revision 1 - - bottle :unneeded - - 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/stanford-parser.rb b/Formula/stanford-parser.rb deleted file mode 100644 index 0163ae24a84c5..0000000000000 --- a/Formula/stanford-parser.rb +++ /dev/null @@ -1,22 +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-10-17.zip" - version "3.9.2" - sha256 "92d852af54c0727c2367b9ce267c53bf08f1551a08ec5dd92c357b8cc7b2bcd9" - revision 1 - - bottle :unneeded - - 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/testsent.txt" - end -end diff --git a/Formula/star.rb b/Formula/star.rb deleted file mode 100644 index 7363e5eae7dae..0000000000000 --- a/Formula/star.rb +++ /dev/null @@ -1,41 +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 "d97f6a6df5eaf3360e7b4c17a475e5417ce268815c01dfcbc94709377a47f6eb" => :catalina - 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/starship.rb b/Formula/starship.rb deleted file mode 100644 index 8aa7fd3f53a5a..0000000000000 --- a/Formula/starship.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Starship < Formula - desc "The cross-shell prompt for astronauts" - homepage "https://starship.rs/" - url "https://github.com/starship/starship/archive/v0.44.0.tar.gz" - sha256 "b002fa0e2b34ad59330a543461a51648751db4ae8d439d58065a3b9656772fe3" - license "ISC" - head "https://github.com/starship/starship.git" - - bottle do - cellar :any_skip_relocation - sha256 "b421825645ddabfdb25559d2db0293fff3823c00d42e56343fd80a103ece3879" => :catalina - sha256 "ca22a2ed29177cebaeae173fb783c4c66448582f1ab8becc847276c1c3b9eb6d" => :mojave - sha256 "76f716ed29e6fbb85a5342ff36e6d0af4d14d35a7fec513a72e2b8d57fe30465" => :high_sierra - end - - depends_on "rust" => :build - - uses_from_macos "zlib" - - def install - system "cargo", "install", *std_cargo_args - end - - test do - ENV["STARSHIP_CONFIG"] = "" - assert_equal "❯ ", shell_output("#{bin}/starship module character") - end -end diff --git a/Formula/startup-notification.rb b/Formula/startup-notification.rb deleted file mode 100644 index faef6cc9fa8ff..0000000000000 --- a/Formula/startup-notification.rb +++ /dev/null @@ -1,27 +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 "3febf31cc5b401f8023ef680288e684ffe12687c3b08eb14143704b081286c0a" => :catalina - 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 43f71961088d1..0000000000000 --- a/Formula/statik.rb +++ /dev/null @@ -1,241 +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.23.0.tar.gz" - sha256 "6159066f486811e5773da318d6e8d1b1dd4c99ac140f1a3c660ef1c1f5e7124f" - license "MIT" - revision 1 - head "https://github.com/thanethomson/statik.git" - - bottle do - cellar :any - sha256 "cab701f93b5c776a91b46f83140f92fd39885e0ce99d50374116c3b437b2fe8e" => :catalina - sha256 "9b83cfba38b5dec6a411291ec401908fa7e5017c22ebbfb269c78094edfd41a7" => :mojave - sha256 "87917f38bc4ef1f2121d82f8f697b451d5ef46e0e10df7b6538348f5b8a39d97" => :high_sierra - end - - depends_on "libpq" - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - conflicts_with "go-statik", :because => "both install `statik` binaries" - - resource "argh" do - url "https://files.pythonhosted.org/packages/e3/75/1183b5d1663a66aebb2c184e0398724b624cecd4f4b679cb6e25de97ed15/argh-0.26.2.tar.gz" - sha256 "e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz" - sha256 "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b4/19/53433f37a31543364c8676f30b291d128cdf4cd5b31b755b7890f8e89ac8/certifi-2020.4.5.2.tar.gz" - sha256 "5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "colorlog" do - url "https://files.pythonhosted.org/packages/fc/30/6ba1282b773e9f44d9cfaafa38b6cc180441307c5fe0edd8db13a8903e3f/colorlog-4.0.2.tar.gz" - sha256 "3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz" - sha256 "b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" - end - - resource "httpwatcher" do - url "https://files.pythonhosted.org/packages/4b/4f/5051625911fef4f15c10e2b8a58af94c1d117d68b03dc01981658b999a02/httpwatcher-0.5.2.tar.gz" - sha256 "01270464600fa22d420c615b7b90eedd8545bd084fd5c3f62f9a5243c68550e0" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "Jinja2" do - url "https://files.pythonhosted.org/packages/7b/db/1d037ccd626d05a7a47a1b81ea73775614af83c2b3e53d86a0bb41d8d799/Jinja2-2.10.3.tar.gz" - sha256 "9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de" - end - - resource "lipsum" do - url "https://files.pythonhosted.org/packages/59/97/00636d64bc77dc173d782995de1b56dde39c70bb97112964452709b4d9aa/lipsum-0.1.2.tar.gz" - sha256 "ba5f46cef19104c07f889b14486a3772845fc25afa1eb5e2eee1f2d9badcb8ab" - end - - resource "Markdown" do - url "https://files.pythonhosted.org/packages/ac/df/0ae25a9fd5bb528fe3c65af7143708160aa3b47970d5272003a1ad5c03c6/Markdown-3.1.1.tar.gz" - sha256 "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a" - end - - resource "MarkupSafe" do - url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "mlalchemy" do - url "https://files.pythonhosted.org/packages/a6/b5/01e08c666a644fdf057a5eea123bab5bc542d312dc53d26adf94f9959cb4/mlalchemy-0.2.2.tar.gz" - sha256 "f7a1777dbd684cc56e5eef2215ab9461522cab61bc5364e05641a965ff710a82" - end - - resource "mock" do - url "https://files.pythonhosted.org/packages/2e/ab/4fe657d78b270aa6a32f027849513b829b41b0f28d9d8d7f8c3d29ea559a/mock-3.0.5.tar.gz" - sha256 "83657d894c90d5681d62155c82bda9c1187827525880eda8ff5df4ec813437c3" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/54/68/dde7919279d4ecdd1607a7eb425a2874ccd49a73a5a71f8aa4f0102d3eb8/paramiko-2.6.0.tar.gz" - sha256 "f4b2edfa0d226b70bd4ca31ea7e389325990283da23465d572ed1f70a7583041" - end - - resource "pathtools" do - url "https://files.pythonhosted.org/packages/e7/7f/470d6fcdf23f9f3518f6b0b76be9df16dcc8630ad409947f8be2eb0ed13a/pathtools-0.1.2.tar.gz" - sha256 "7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0" - end - - resource "psycopg2-binary" do - url "https://files.pythonhosted.org/packages/80/91/91911be01869fa877135946f928ed0004e62044bdd876c1e0f12e1b5fb90/psycopg2-binary-2.8.3.tar.gz" - sha256 "cd37cc170678a4609becb26b53a2bc1edea65177be70c48dd7b39a1149cabd6e" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - end - - resource "PyNaCl" do - url "https://files.pythonhosted.org/packages/cf/5a/25aeb636baeceab15c8e57e66b8aa930c011ec1c035f284170cacb05025e/PyNaCl-1.4.0.tar.gz" - sha256 "54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505" - end - - resource "pystache" do - url "https://files.pythonhosted.org/packages/d6/fd/eb8c212053addd941cc90baac307c00ac246ac3fce7166b86434c6eae963/pystache-0.5.4.tar.gz" - sha256 "f7bbc265fb957b4d6c7c042b336563179444ab313fb93a719759111eabd3b85a" - 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 "python-slugify" do - url "https://files.pythonhosted.org/packages/f5/ef/c868a9ac657405f051a8a501ac5633e769c54228716b8db7f8d717977e57/python-slugify-3.0.4.tar.gz" - sha256 "575d03256a132fc1efb4c52966c6eb11c57a13b071618f0b26076057a23f6937" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "SQLAlchemy" do - url "https://files.pythonhosted.org/packages/89/4e/f10fc5063d1048b3813c0caf99f06ec2b73851ae1a939feb85315dacb3fc/SQLAlchemy-1.3.9.tar.gz" - sha256 "272a835758908412e75e87f75dd0179a51422715c125ce42109632910526b1fd" - end - - resource "text-unidecode" do - url "https://files.pythonhosted.org/packages/ab/e2/e9a00f0ccb71718418230718b3d900e71a5d16e701a3dae079a21e9cd8f8/text-unidecode-1.3.tar.gz" - sha256 "bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93" - end - - resource "tornado" do - url "https://files.pythonhosted.org/packages/e3/7b/e29ab3d51c8df66922fea216e2bddfcb6430fb29620e5165b16a216e0d3c/tornado-4.5.3.tar.gz" - sha256 "6d14e47eab0e15799cf3cdcc86b0b98279da68522caace2bd7ce644287685f0a" - end - - resource "Unidecode" do - url "https://files.pythonhosted.org/packages/b1/d6/7e2a98e98c43cf11406de6097e2656d31559f788e9210326ce6544bd7d40/Unidecode-1.1.1.tar.gz" - sha256 "2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "watchdog" do - url "https://files.pythonhosted.org/packages/bb/e3/5a55d48a29300160779f0a0d2776d17c1b762a2039b36de528b093b87d5b/watchdog-0.9.0.tar.gz" - sha256 "965f658d0732de3188211932aeb0bb457587f04f63ab4c1e33eab878e9de961d" - end - - resource "wheel" do - url "https://files.pythonhosted.org/packages/75/28/521c6dc7fef23a68368efefdcd682f5b3d1d58c2b90b06dc1d0b805b51ae/wheel-0.34.2.tar.gz" - sha256 "8788e9155fe14f54164c1b9eb0a319d98ef02c160725587ad60f14ddc57b6f96" - end - - def install - virtualenv_install_with_resources - 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 c3f3f9982c1fe..0000000000000 --- a/Formula/stdman.rb +++ /dev/null @@ -1,27 +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" - license "MIT" - version_scheme 1 - head "https://github.com/jeaye/stdman.git" - - bottle do - cellar :any_skip_relocation - sha256 "e6de42bfa765085aca6f89020a7c61142f37d87f84d3290d8d427416ec7ba83f" => :catalina - 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 bfdcc143b87be..0000000000000 --- a/Formula/stella.rb +++ /dev/null @@ -1,43 +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/6.2.1/stella-6.2.1-src.tar.xz" - sha256 "47b991af880b1699614c081d602c197942cfbdcbf52e3d738617923d5df23dc7" - head "https://github.com/stella-emu/stella.git" - - bottle do - cellar :any - sha256 "905c36cc2c68968ffcedb83867474bd757f9b6188a9d49f7fd94d22f0e479b0d" => :catalina - sha256 "482b97a5ebe760bb2793c95d0c51c3ac356417eb1c8479c4539086cc9ad203e9" => :mojave - sha256 "ff69cdd3d5a5def9e99557b0d327e16da16b3b37298f769ec66bed2c0ff18003" => :high_sierra - end - - depends_on :xcode => :build - depends_on "libpng" - depends_on "sdl2" - - uses_from_macos "zlib" - - def install - sdl2 = Formula["sdl2"] - libpng = Formula["libpng"] - cd "src/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 "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 674516c718884..0000000000000 --- a/Formula/stellar-core.rb +++ /dev/null @@ -1,44 +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 => "v13.2.0", - :revision => "e45018ea97695592bc9e7a61cfdbfb6b5411b84a" - head "https://github.com/stellar/stellar-core.git" - - bottle do - cellar :any - sha256 "36cbcda3bb3064cdbedf6a37925757227087d50d513b65ed6fd83e731b9496ab" => :catalina - sha256 "c789eb0cedc23e5878e702119b9a6c6f1ef853b512ac926d8a9ef13146231649" => :mojave - sha256 "76d0a3743be0948ccb584677a98a1994711ff8d74750f8c5149ff3f858bd6b33" => :high_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 "parallel" => :test - depends_on "libpq" - depends_on "libpqxx" - depends_on "libsodium" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - - 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/step.rb b/Formula/step.rb deleted file mode 100644 index c48f5bf306f36..0000000000000 --- a/Formula/step.rb +++ /dev/null @@ -1,123 +0,0 @@ -class Step < Formula - desc "Crypto and x509 Swiss-Army-Knife" - homepage "https://smallstep.com/" - url "https://github.com/smallstep/cli/releases/download/v0.14.6/step-cli_0.14.6.tar.gz" - sha256 "625c1439805130ff016b269bd116453429c5f15cc4c460ca3e8587b11c2515ab" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "118fe1ed9f3caa5d1f117d3764dcf7a08b7b4206f9387093fe275b7570bafeb6" => :catalina - sha256 "b9c97a385a6fc82f582c226b47d879a6940125cfb9423cd54c162db0db73b290" => :mojave - sha256 "41510d6c6a7193c84a338c0bb4852c57bc5e6901f95d49353716b9bc57938184" => :high_sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - resource "certificates" do - url "https://github.com/smallstep/certificates/releases/download/v0.14.6/step-certificates_0.14.6.tar.gz" - sha256 "54d116f5a32e8a3afb75d3791467789412a9d291e236130a226103e5fe4281d4" - end - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/smallstep/cli").install buildpath.children - cd "src/github.com/smallstep/cli" do - system "make", "build" - bin.install "bin/step" => "step" - bash_completion.install "autocomplete/bash_autocomplete" => "step" - zsh_completion.install "autocomplete/zsh_autocomplete" => "_step" - end - - resource("certificates").stage "#{buildpath}/src/github.com/smallstep/certificates" - cd "#{buildpath}/src/github.com/smallstep/certificates" do - system "make", "build" - bin.install "bin/step-ca" => "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_predicate testpath/"foo.pub", :exist? - assert_predicate testpath/"foo.priv", :exist? - - # 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_predicate testpath/"baz.crt", :exist? - assert_predicate testpath/"baz.key", :exist? - 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_predicate testpath/"zap.crt", :exist? - assert_predicate testpath/"zap.key", :exist? - 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" - Dir.mkdir(steppath) unless File.exist?(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 2 - 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_predicate testpath/"brew.crt", :exist? - assert_predicate testpath/"brew.key", :exist? - 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 "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/stern.rb b/Formula/stern.rb deleted file mode 100644 index a0efe236cf9e2..0000000000000 --- a/Formula/stern.rb +++ /dev/null @@ -1,40 +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.11.0.tar.gz" - sha256 "d6f47d3a6f47680d3e4afebc8b01a14f0affcd8fb625132af14bb77843f0333f" - license "Apache-2.0" - head "https://github.com/wercker/stern.git", - :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "886c99c34ee64ae8ea2292822b268324b573449fb3d621b874c0746d071a5082" => :catalina - sha256 "f862bab034a7d05b995e762e7feae5d840db9099faba8465e4e20daa548f02f7" => :mojave - sha256 "fd68b5ceb1ef3a1cbdb51653530f0ac0625e59adb55b02c1b7dad2268db7e4b3" => :high_sierra - sha256 "01a7f817326d1172201d36df18cbee1ceca864d83e9cc528e301018b1510872f" => :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 e8f27304bbf9e..0000000000000 --- a/Formula/stgit.rb +++ /dev/null @@ -1,45 +0,0 @@ -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/v0.23/stgit-0.23.tar.gz" - sha256 "17c2b2e02341468f4d5f8d4d79c36f7fdb7febe18177277ca472502f673c50fd" - license "GPL-2.0" - head "https://github.com/stacked-git/stgit.git" - - bottle do - cellar :any_skip_relocation - sha256 "a99d7f5ad5fbc099095f3579faa5f7356f180469aff11546c45caf37823afee9" => :catalina - sha256 "a99d7f5ad5fbc099095f3579faa5f7356f180469aff11546c45caf37823afee9" => :mojave - sha256 "a99d7f5ad5fbc099095f3579faa5f7356f180469aff11546c45caf37823afee9" => :high_sierra - end - - depends_on "asciidoc" => :build - depends_on "xmlto" => :build - depends_on "python@3.8" - - def install - ENV["PYTHON"] = Formula["python@3.8"].opt_bin/"python3" - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - system "make", "prefix=#{prefix}", "all" - system "make", "prefix=#{prefix}", "install" - system "make", "prefix=#{prefix}", "install-doc" - bash_completion.install "completion/stgit.bash" - fish_completion.install "completion/stg.fish" - zsh_completion.install "completion/stgit.zsh" => "_stgit" - 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" - end -end diff --git a/Formula/stk.rb b/Formula/stk.rb deleted file mode 100644 index 5ca0087a193f5..0000000000000 --- a/Formula/stk.rb +++ /dev/null @@ -1,45 +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.1.tar.gz" - sha256 "e77ba3c80cdd93ca02c34098b9b7f918df3d648c87f1ed5d94fe854debd6d101" - - bottle do - cellar :any_skip_relocation - sha256 "3cbeef8a18f26bf9c0d988e40f1aea3fae9695e99644cd7253dd13ef340c37a5" => :catalina - sha256 "44cd735483145a0f969ab412cd0540ed7936512afb1c902bd9b7258e530d60a4" => :mojave - sha256 "22823e8c4cf694fabeea049a0a0debf38b3be79de73f6ac62a65a9fe45bec93c" => :high_sierra - sha256 "fbf3f82768d3ea1a8f6b60dd593e838beb05c3529c3a89b4ecb743a53e26d7b6" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - - 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 fa8927ce5e82e..0000000000000 --- a/Formula/stlink.rb +++ /dev/null @@ -1,27 +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.6.1.tar.gz" - sha256 "ca9a640f84c3e2c9873bd51759594bc05c00cdf6e1f21b434ae2c0e7985433d8" - head "https://github.com/texane/stlink.git" - - bottle do - cellar :any - sha256 "e24c7913e29b627142d892c8dacfcbb077cea4a8abdb021d2b6624cd7ce61865" => :catalina - sha256 "85fa59905d566f85a1f7b4dc86a2f770181550ac7402907c326b050f09053272" => :mojave - sha256 "ca0da39790dc0a876555f19cbf227a05490c126a8f071e971118bdbbd2147787" => :high_sierra - 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 - assert_match "st-flash #{version}", shell_output("#{bin}/st-flash --debug reset 2>&1", 255) - end -end diff --git a/Formula/stlviewer.rb b/Formula/stlviewer.rb deleted file mode 100644 index aafe29fdeec8e..0000000000000 --- a/Formula/stlviewer.rb +++ /dev/null @@ -1,26 +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 "569d6f8f9b92abd1eb1fa15db1204b7aee1297f8e8cd078eea42da4d26a62db6" => :catalina - 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 cd6c3ecc7ce9b..0000000000000 --- a/Formula/stm32flash.rb +++ /dev/null @@ -1,24 +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 "ad0d22f81963099a648b32697bf1a14ca3ee51cd45f8e73f0f701d5836faecee" => :catalina - 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 7c72e21e56793..0000000000000 --- a/Formula/stockfish.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Stockfish < Formula - desc "Strong open-source chess engine" - homepage "https://stockfishchess.org/" - url "https://github.com/official-stockfish/Stockfish/archive/sf_11.tar.gz" - sha256 "802261cc601b67bed00c0ef7d21e2125959630f0852a06db9fc9bd74f440b199" - license "GPL-3.0" - head "https://github.com/official-stockfish/Stockfish.git" - - bottle do - cellar :any_skip_relocation - sha256 "f6bcd62e239cdd9779771367e32137045772d90b6ab3dae858a85bfbe104a95e" => :catalina - sha256 "f6bcd62e239cdd9779771367e32137045772d90b6ab3dae858a85bfbe104a95e" => :mojave - sha256 "5debb14a1764281072d0ad4c350a1ce4014904a9956dfa5046347965486573c2" => :high_sierra - end - - def install - arch = if MacOS.version.requires_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 7908aeec315df..0000000000000 --- a/Formula/stoken.rb +++ /dev/null @@ -1,36 +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" - revision 1 - - bottle do - cellar :any - sha256 "423dbce4e76710fe932fc4d86fa25b39ced8f138d781fcccbc3982ce83136216" => :catalina - sha256 "59ee230b63a707bf9c1fd966ec003c14ca16c7e61a331b765e31a1ba4b7db867" => :mojave - sha256 "6c6b704e5f9830e0192383c53717f64b0af48119d6f0d96d78de521820a6c84b" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "nettle" - - uses_from_macos "libxml2" - - 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/stolon.rb b/Formula/stolon.rb deleted file mode 100644 index 161652d33da10..0000000000000 --- a/Formula/stolon.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Stolon < Formula - desc "Cloud native PostgreSQL manager for high availability" - homepage "https://github.com/sorintlab/stolon" - url "https://github.com/sorintlab/stolon.git", - :tag => "v0.16.0", - :revision => "920fe4b83c158a6fe496dd6427a3715b84c0b4e2" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "8bbf533b32cba6f798e17aad03e6268c6fe66be84cac9801226217e40c9cc0a9" => :catalina - sha256 "fac96dde0102d1b0b7cd6e6dad8cb3bb3b7dfdee16f0fe98cbb439e4602a48e5" => :mojave - sha256 "3f82acb97ffd0f586b5c6c643237205f0df3c5d03ed2cbd01143aba404d0e1b7" => :high_sierra - end - - depends_on "go" => :build - depends_on "consul" => :test - depends_on "postgresql" - - def install - system "go", "build", "-ldflags", "-s -w -X github.com/sorintlab/stolon/cmd.Version=#{version}", - "-trimpath", "-o", bin/"stolonctl", "./cmd/stolonctl" - system "go", "build", "-ldflags", "-s -w -X github.com/sorintlab/stolon/cmd.Version=#{version}", - "-trimpath", "-o", bin/"stolon-keeper", "./cmd/keeper" - system "go", "build", "-ldflags", "-s -w -X github.com/sorintlab/stolon/cmd.Version=#{version}", - "-trimpath", "-o", bin/"stolon-sentinel", "./cmd/sentinel" - system "go", "build", "-ldflags", "-s -w -X github.com/sorintlab/stolon/cmd.Version=#{version}", - "-trimpath", "-o", bin/"stolon-proxy", "./cmd/proxy" - prefix.install_metafiles - end - - test do - pid = fork do - exec "consul", "agent", "-dev" - end - sleep 2 - - assert_match "stolonctl version #{version}", - shell_output("#{bin}/stolonctl version 2>&1") - assert_match "nil cluster data: ", - shell_output("#{bin}/stolonctl status --cluster-name test --store-backend consul 2>&1", 1) - 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") - - Process.kill("TERM", pid) - Process.wait(pid) - end -end diff --git a/Formula/stone-soup.rb b/Formula/stone-soup.rb deleted file mode 100644 index 004124a45027c..0000000000000 --- a/Formula/stone-soup.rb +++ /dev/null @@ -1,74 +0,0 @@ -class StoneSoup < Formula - desc "Dungeon Crawl Stone Soup: a roguelike game" - homepage "https://crawl.develz.org/" - url "https://github.com/crawl/crawl/archive/0.25.0.tar.gz" - sha256 "999438343bb1953508dc06535cf71907a118e1765b5c837ba56869859b6ed25c" - - bottle do - sha256 "7c668b8d8a862c7ca37be32002b2b10689c4b8ebd53cc75c9d2236eecb0185dc" => :catalina - sha256 "2a71971d6bdee93844c05089b6c4d0fe91b2c11792409550ff7629546104722a" => :mojave - sha256 "76db4783ef4ec3373e3f0fd074e6183526de42718fe9dec051d0afc9802ec22e" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "lua@5.1" - depends_on "pcre" - depends_on "sqlite" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - def install - ENV.cxx11 - ENV.prepend_path "PATH", Formula["python@3.8"].opt_libexec/"bin" - xy = Language::Python.major_minor_version "python3" - ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python#{xy}/site-packages" - - resource("PyYAML").stage do - system "python3", *Language::Python.setup_install_args(buildpath/"vendor") - end - - cd "crawl-ref/source" do - File.write("util/release_ver", version.to_s) - args = %W[ - prefix=#{prefix} - DATADIR=data - NO_PKGCONFIG= - BUILD_ZLIB= - BUILD_SQLITE= - BUILD_FREETYPE= - BUILD_LIBPNG= - BUILD_LUA= - 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 += "/" unless MacOS::Xcode.installed? - - system "make", "install", - "DEVELOPER_DIR=#{devdir}", "SDKROOT=#{MacOS.sdk_path}", - "SDK_VER=#{MacOS.version}", *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 0cfc9abe34196..0000000000000 --- a/Formula/stone.rb +++ /dev/null @@ -1,26 +0,0 @@ -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.3e.tar.gz" - sha256 "b2b664ee6771847672e078e7870e56b886be70d9ff3d7b20d0b3d26ee950c670" - - bottle do - cellar :any_skip_relocation - sha256 "8b37777addb031114cadd5d09ca216ffaff9df2316073077c79c072d9debc761" => :catalina - 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 ad6dbe5ea2d80..0000000000000 --- a/Formula/storm.rb +++ /dev/null @@ -1,20 +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.lua?path=storm/apache-storm-2.2.0/apache-storm-2.2.0.tar.gz" - mirror "https://archive.apache.org/dist/storm/apache-storm-2.2.0/apache-storm-2.2.0.tar.gz" - sha256 "f621163f349a8e85130bc3d2fbb34e3b08f9c039ccac5474f3724e47a3a38675" - - 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 517f731c384ca..0000000000000 --- a/Formula/stormlib.rb +++ /dev/null @@ -1,57 +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" - license "MIT" - head "https://github.com/ladislav-zezula/StormLib.git" - - bottle do - cellar :any - sha256 "27c5056c5f0001e3a0445b31de2361583b8f19b4fde60658f8075383a82bb7ff" => :catalina - 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/stormssh-completion.rb b/Formula/stormssh-completion.rb deleted file mode 100644 index 20083945dce55..0000000000000 --- a/Formula/stormssh-completion.rb +++ /dev/null @@ -1,18 +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" - license "MIT" - - 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 ba06e2ceb0c95..0000000000000 --- a/Formula/stormssh.rb +++ /dev/null @@ -1,150 +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" - license "MIT" - revision 3 - head "https://github.com/emre/storm.git" - - bottle do - cellar :any - sha256 "ea320fc79f2b33f81f123833bcd77212cca1a2fb93fd4094ddc4b175f31fdaed" => :catalina - sha256 "0517af91bef9ee09a89d36105786eae1068aa66e81988636bae1c2e279660156" => :mojave - sha256 "e69de64df1e5e1285fbd26ac1651d2ab1ad964237531151de7b3e05dbd23161e" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - conflicts_with "storm", :because => "both install 'storm' binary" - - resource "click" do - url "https://files.pythonhosted.org/packages/f8/5c/f60e9d8a1e77005f664b76ff8aeaee5bc05d0a91798afd7f53fc998dbc47/Click-7.0.tar.gz" - sha256 "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7" - 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/2e/80/3726a729de758513fd3dbc64e93098eb009c49305a97c6751de55b20b694/Flask-1.1.1.tar.gz" - sha256 "13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - 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/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz" - sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" - end - - resource "jinja2" do - url "https://files.pythonhosted.org/packages/7b/db/1d037ccd626d05a7a47a1b81ea73775614af83c2b3e53d86a0bb41d8d799/Jinja2-2.10.3.tar.gz" - sha256 "9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de" - end - - resource "werkzeug" do - url "https://files.pythonhosted.org/packages/5e/fd/eb19e4f6a806cd6ee34900a687f181001c7a0059ff914752091aba84681f/Werkzeug-0.16.0.tar.gz" - sha256 "7280924747b5733b246fe23972186c6b348f9ae29724135a6dfc1e53cea433e7" - end - - resource "itsdangerous" do - url "https://files.pythonhosted.org/packages/68/1a/f27de07a8a304ad5fa817bbe383d1238ac4396da447fa11ed937039fa04b/itsdangerous-1.1.0.tar.gz" - sha256 "321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19" - end - - resource "ecdsa" do - url "https://files.pythonhosted.org/packages/e3/7c/b508ade1feb47cd79222e06d85e477f5cfc4fb0455ad3c70eb6330fc49aa/ecdsa-0.15.tar.gz" - sha256 "8f12ac317f8a1318efa75757ef0a651abe12e51fc1af8838fb91079445227277" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/a4/db/fffec68299e6d7bad3d504147f9094830b704527a7fc098b721d38cc7fa7/pyasn1-0.4.8.tar.gz" - sha256 "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba" - 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/2d/bf/960e5a422db3ac1a5e612cb35ca436c3fc985ed4b7ed13a1b4879006f450/cffi-1.13.2.tar.gz" - sha256 "599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346" - 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/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz" - sha256 "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/9f/3d/8beae739ed8c1c8f00ceac0ab6b0e97299b42da869e24cf82851b27a9123/asn1crypto-1.3.0.tar.gz" - sha256 "5a215cb8dc12f892244e3a113fe05397ee23c5c4ca7a69cd6e69811755efc42d" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz" - sha256 "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/ac/15/4351003352e11300b9f44a13576bff52dcdc6e4a911129c07447bda0a358/paramiko-2.7.1.tar.gz" - sha256 "920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f" - 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 80ebb0aa5dabc..0000000000000 --- a/Formula/stout.rb +++ /dev/null @@ -1,35 +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.2.tar.gz" - sha256 "33aa533beda7181d5efdcfb9fadcc568f58c1f7e27a4902adf1a6807c4875c99" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "95406589caa2074808e99e54b755c2ea7b73fdd3ac8528c1a7f124895f3c1be5" => :catalina - sha256 "7d90dec0fbc23cfc58b56261957818a0fb1af5c77086b1979b77ea1196484a25" => :mojave - sha256 "cfff658fcb5319cd6a5053c645a9679d3db94e9dff4fbe91ae488ca31658a1fc" => :high_sierra - sha256 "26554af96b6044316abecb1a2142e81b1aab8315bff941cbdad9b39fe143b74e" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - # Compatibility with newer Go. - # Reported upstream, but the project is unmaintained. - mkdir_p buildpath/"vendor/github.com/sspencer" - ln_s buildpath/"vendor/github.com/zackbloom/go-ini", buildpath/"vendor/github.com/sspencer/go-ini" - - 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 a17989ee2c0b4..0000000000000 --- a/Formula/stow.rb +++ /dev/null @@ -1,26 +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.3.1.tar.gz" - mirror "https://ftpmirror.gnu.org/stow/stow-2.3.1.tar.gz" - sha256 "09d5d99671b78537fd9b2c0b39a5e9761a7a0e979f6fdb7eabfa58ee45f03d4b" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "c99a90dc5e3db8ebcb017df044723fb4e6cce7fb94aa24cf46c8d2c0665bf9a0" => :catalina - sha256 "409987564f7779d6a1db75f64e54c4713ecd9b9e006abac931f8e8d645bdac92" => :mojave - sha256 "409987564f7779d6a1db75f64e54c4713ecd9b9e006abac931f8e8d645bdac92" => :high_sierra - sha256 "cbc7a61940a343aff46fdb6190dc26a359d26c9c468c05b1dbde2484a066ceb6" => :sierra - 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 3bbb95e4faf52..0000000000000 --- a/Formula/streamlink.rb +++ /dev/null @@ -1,93 +0,0 @@ -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://github.com/streamlink/streamlink/releases/download/1.5.0/streamlink-1.5.0.tar.gz" - sha256 "203f3e2ac724b5964f8abffa9d1e769453702294e3d03b6877c6eb49f96fc11f" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "0f649d25527c7ea11086a4c2ad754e9f49109b83115c87505d434d1881d1c4f3" => :catalina - sha256 "887938363ce748a588264e58b470e95ef5495341ad650ffe1eab1c4447fa74de" => :mojave - sha256 "992eb0c7a3b256a3f34b2fe9a7b9a4d42ef84419a9b864df8b00dd47ec5479de" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - 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/5b/62/b0f573e5d9ea128084f2440924e95f4e54690ccee9d974b5bf345e5f8540/iso3166-1.0.1.tar.gz" - sha256 "b1e58dbcf50fbb2c9c418ec7a6057f0cdb30b8f822ac852f72e71ba769dae8c5" - end - - resource "isodate" do - url "https://files.pythonhosted.org/packages/b1/80/fb8c13a4cd38eb5021dc3741a9e588e4d1de88d895c1910c6fc8a08b7a70/isodate-0.6.0.tar.gz" - sha256 "2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8" - end - - resource "pycryptodome" do - url "https://files.pythonhosted.org/packages/69/2a/298b2689bee8e88c502c7e85ba1c9f07c7e182ea91c705c449f693056c9f/pycryptodome-3.9.7.tar.gz" - sha256 "f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2" - 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/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "websocket-client" do - url "https://files.pythonhosted.org/packages/8b/0f/52de51b9b450ed52694208ab952d5af6ebbcbce7f166a48784095d930d8c/websocket_client-0.57.0.tar.gz" - sha256 "d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010" - end - - def install - virtualenv_install_with_resources - end - - test do - system "#{bin}/streamlink", "https://vimeo.com/189776460", "360p", "-o", "video.mp4" - assert_match "video.mp4: ISO Media, MP4 v2", shell_output("file video.mp4") - end -end diff --git a/Formula/streamripper.rb b/Formula/streamripper.rb deleted file mode 100644 index d40c2662e9e96..0000000000000 --- a/Formula/streamripper.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Streamripper < Formula - desc "Separate tracks via Shoutcasts title-streaming" - homepage "https://streamripper.sourceforge.io/" - url "https://downloads.sourceforge.net/project/streamripper/streamripper%20%28current%29/1.64.6/streamripper-1.64.6.tar.gz" - sha256 "c1d75f2e9c7b38fd4695be66eff4533395248132f3cc61f375196403c4d8de42" - revision 1 - - bottle do - cellar :any - sha256 "bdc01265cc82de8fdd17a432458a22ea22420839daed5d29234efe5c9cf459a2" => :catalina - sha256 "559e6ce06f450c306178c1e361154f134c3478ad1bc35ca70d0d3f000938043d" => :mojave - sha256 "9df7827f89ef7f517ccfdb52be976b358ede1ceb2690f8617b4cc52da7c4cf41" => :high_sierra - sha256 "2ccd049ca0ce6720055a86b726bfb1388b4e3784b2cd597bc7b26fd1e593a60c" => :sierra - 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 f352eb0839bab..0000000000000 --- a/Formula/stress-ng.rb +++ /dev/null @@ -1,29 +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.11.14.tar.xz" - sha256 "b21436fdbd9dc482a3fd95ae27cccf0097d0f226361ea3785215f7a4ad50136b" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a770ad23d8ea44676d36920a511707fc8a2696d978a8911370e1ef04ffdd7c25" => :catalina - sha256 "880650bca21eefa4a8e903b9b1fc0ffc3454449ab5927e6993a430e950efafba" => :mojave - sha256 "77f19860f13cc93aef0bc28471a402bf491e745b89285d8949eebf07d3498e85" => :high_sierra - end - - depends_on :macos => :sierra - - uses_from_macos "zlib" - - 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 4a040fdb0fa96..0000000000000 --- a/Formula/stress.rb +++ /dev/null @@ -1,29 +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://deb.debian.org/debian/pool/main/s/stress/stress_1.0.4.orig.tar.gz" - sha256 "057e4fc2a7706411e1014bf172e4f94b63a12f18412378fca8684ca92408825b" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ca9674089210d1cac7af47b5f8402ce41bcbc8348892a72f226bb4d29587b349" => :catalina - sha256 "57923f0549beb3e528ad7683a09d615096d875512fb46b9ed7c54aa6382ca793" => :mojave - sha256 "3087af5469f5867b82ab85158c7268d0172b58da91baec06916659bb0fd2f930" => :high_sierra - sha256 "1a18d667f7804579758079e3a3f94683a64687120b5f4b77cf25a63f3f8cec39" => :sierra - sha256 "b4635c185bfba65271d74aaff155161d2df388be303d135315066260e9699c5e" => :el_capitan - sha256 "845f44585d0a3749c163300029f832125950d37af4a5b53c0b20fb143e6db014" => :yosemite - sha256 "6741dc72df4a43cfe2c947d9e50d08df1e35029025ff2436d5a20a01117f4fb6" => :mavericks - 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 df01e8f2b3224..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.8.4.tar.bz2" - sha256 "2d9a57e33813b62d58cba07531c4d5a35c6b823dfe9b8ff7c623b6571f02553c" - - bottle do - sha256 "872a24ee594d31b8f552783caebf852841e82899e1a3fcfc11c0a876f97b4837" => :catalina - sha256 "dd4b4cbd322acef8ce8dd4c5dcc215429e1b4b8afeeadd5a9f3fc2db53b5a604" => :mojave - sha256 "208931be0e84df951a97245f2cd548f95f76fb6f958050ce837eb090af4884bd" => :high_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@1.1" - - 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", "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 466a10f56dcb0..0000000000000 --- a/Formula/stubby.rb +++ /dev/null @@ -1,79 +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.3.0.tar.gz" - sha256 "b37a0e0ec2b7cfcdcb596066a6fd6109e91a2766b17a42c47d3703d9be41d000" - license "BSD-3-Clause" - head "https://github.com/getdnsapi/stubby.git", :branch => "develop" - - bottle do - rebuild 1 - sha256 "aaa2e665539768e5095b04cdbbf61b8b865334770e4608f144096f010631d47c" => :catalina - sha256 "be2d27bc1ceb52f5728c34b179ba4b57593ded2e66c87c4ab26fa6e89ac26ece" => :mojave - sha256 "437687f0eebd8218424dbefd61988a5ebb9c2a4487c779c36a329deaf2c2ad92" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libtool" => :build - depends_on "getdns" - depends_on "libyaml" - - def install - system "cmake", "-DCMAKE_INSTALL_RUNSTATEDIR=#{HOMEBREW_PREFIX}/var/run/", \ - "-DCMAKE_INSTALL_SYSCONFDIR=#{HOMEBREW_PREFIX}/etc", ".", *std_cmake_args - 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 - - - - 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 - - fork do - exec "#{bin}/stubby", "-C", testpath/"stubby_test.yml" - end - sleep 2 - - output = shell_output("dig @127.0.0.1 -p 5553 getdnsapi.net") - assert_match "status: NOERROR", output - end -end diff --git a/Formula/stunnel.rb b/Formula/stunnel.rb deleted file mode 100644 index 7b153a1310933..0000000000000 --- a/Formula/stunnel.rb +++ /dev/null @@ -1,96 +0,0 @@ -class Stunnel < Formula - desc "SSL tunneling program" - homepage "https://www.stunnel.org/" - url "https://www.stunnel.org/downloads/stunnel-5.56.tar.gz" - sha256 "7384bfb356b9a89ddfee70b5ca494d187605bb516b4fff597e167f97e2236b22" - - bottle do - cellar :any - sha256 "90d65b410dfcabbc5d4b586449ae92b23cbe3f9e087a7075ec66b81807c17b7b" => :catalina - sha256 "61d66e0c5c5d411becd8b7d1f9ba913c1a15b9d15ec70e1253ca2e7fbdb0e516" => :mojave - sha256 "22548c4f8f3a15ebe6cd79aa2162dc7af8abaacf3e94d32d7cc8afc8f2049318" => :high_sierra - end - - depends_on "openssl@1.1" - - 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@1.1"].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@1.1"].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. - - To use Stunnel with Homebrew services, make sure to set "foreground = yes" in - your Stunnel configuration. - EOS - end - - plist_options :manual => "stunnel" - - def plist - <<~EOS - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/stunnel - - RunAtLoad - - - - 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 4bcf919e845a0..0000000000000 --- a/Formula/stuntman.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Stuntman < Formula - desc "Implementation of the STUN protocol" - homepage "http://www.stunprotocol.org/" - url "http://www.stunprotocol.org/stunserver-1.2.15.tgz" - sha256 "321f796a7cd4e4e56a0d344a53a6a96d9731df5966816e9b46f3aa6dcc26210f" - license "Apache-2.0" - revision 1 - head "https://github.com/jselbie/stunserver.git" - - bottle do - cellar :any_skip_relocation - sha256 "52e9913b0a6208e305f6f5d0e64f6c2888be95f9c35674293d2a7bbde07dd5f1" => :catalina - sha256 "87375257e1d4c3964587b59ef34a1800e9e9b7e6028a506a22b8cd695f39bf42" => :mojave - sha256 "b5541fc2478ed4b97cdc5cf97ddbcbc4d76255b0ba9e834666c548612e9b758d" => :high_sierra - sha256 "51f40332e70148118ca22eb7f393c002188e73fb59c82a44c689430f86b2bf7f" => :sierra - end - - depends_on "boost" => :build - depends_on "openssl@1.1" - - 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 42024add71092..0000000000000 --- a/Formula/style-check.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "5f652a7db0691978cb42a5be5d0e293e671c2953364b64b75a0ba663b581051c" => :catalina - 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 35b5a664183f0..0000000000000 --- a/Formula/sub2srt.rb +++ /dev/null @@ -1,34 +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" - license "GPL-2.0" - 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 d644b7ea58d61..0000000000000 --- a/Formula/subliminal.rb +++ /dev/null @@ -1,152 +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/dd/3a/ac02011988ad013f24a11cb6123a7ff9e17a75369964c7edd9f64bfea80f/subliminal-2.1.0.tar.gz" - sha256 "c6439cc733a4f37f01f8c14c096d44fd28d75d1f6f6e2d1d1003b1b82c65628b" - license "MIT" - head "https://github.com/Diaoul/subliminal.git" - - bottle do - cellar :any_skip_relocation - sha256 "acb2c64ce2c6bebcedda7841217ad4e3d2c3f7c0818da57dd6d881236e97f573" => :catalina - sha256 "a3bb9afb7a47164726675b04a85b50263f2a771e9b53ae833eccf44c63ad1c02" => :mojave - sha256 "a3bb9afb7a47164726675b04a85b50263f2a771e9b53ae833eccf44c63ad1c02" => :high_sierra - end - - depends_on "python@3.8" - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5/appdirs-1.4.3.tar.gz" - sha256 "9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92" - 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/3b/e4/7cfc641f11e0eef60123912611a5c9ee7d4638da7325878b695b9ae4bb6f/beautifulsoup4-4.9.0.tar.gz" - sha256 "594ca51a10d2b3443cbac41214e12dbb2a1cd57e1a7344659849e2e20ba6a8d8" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" - sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "dogpile.cache" do - url "https://files.pythonhosted.org/packages/b5/02/9692c82808341747afc87a7c2b701c8eed76c05ec6bc98844c102a537de7/dogpile.cache-0.9.2.tar.gz" - sha256 "bc9dde1ffa5de0179efbcdc73773ef0553921130ad01955422f2932be35c059e" - end - - resource "enzyme" do - url "https://files.pythonhosted.org/packages/dd/99/e4eee822d9390ebf1f63a7a67e8351c09fb7cd75262e5bb1a5256898def9/enzyme-0.4.1.tar.gz" - sha256 "f2167fa97c24d1103a94d4bf4eb20f00ca76c38a37499821049253b2059c62bb" - end - - resource "guessit" do - url "https://files.pythonhosted.org/packages/09/a1/c37ccc25872d463f94dbde723430c7129dc6d7f790c5b0030a5690e2f58a/guessit-3.1.1.tar.gz" - sha256 "71c68c6d4e9d639eba6534a838468115ad20f4c5a688eae3079f0c08d605a3b0" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/8a/a8/bb34d7997eb360bc3e98d201a20b5ef44e54098bb2b8e978ae620d933002/pbr-5.4.5.tar.gz" - sha256 "07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c" - 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/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - - resource "rarfile" do - url "https://files.pythonhosted.org/packages/88/0b/107dde3f330d04668e126932a09002ac47348841453aa0391634381fa087/rarfile-3.1.tar.gz" - sha256 "dc1062176c529f417522af7da1291a35b85c8017464e665aabce048cfe2659b6" - end - - resource "rebulk" do - url "https://files.pythonhosted.org/packages/60/5c/e74c216b4e8e30d40226b6a9add2a596abe3af3ce63c4ffcdba6f33497f8/rebulk-2.0.1.tar.gz" - sha256 "320ded3cc456347d828f95e9aa5f8bab77ac01943cad024c06012069fe19690a" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "soupsieve" do - url "https://files.pythonhosted.org/packages/15/53/3692c565aea19f7d9dd696fee3d0062782e9ad5bf9535267180511a15967/soupsieve-2.0.tar.gz" - sha256 "e914534802d7ffd233242b785229d5ba0766a7f487385e3f714446a07bf540ae" - end - - resource "stevedore" do - url "https://files.pythonhosted.org/packages/be/19/83fd12828f879f53b85fe820925776aecda710944279e47a2dac53444adc/stevedore-1.32.0.tar.gz" - sha256 "18afaf1d623af5950cc0f7e75e70f917784c73b652a34a12d90b309451b5500b" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - 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/".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 d4d963d652217..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.16.tar.xz" - sha256 "37dae5da0b5d0423ee44d6b86cf811ca6fb78e0768ce9d77b95544634ce68390" - license "GPL-3.0" - head "https://github.com/dreibh/subnetcalc.git" - - bottle do - cellar :any_skip_relocation - sha256 "3292425456f8c87e8d3d468421de889ac20f859e4d00530646c973581ffc4543" => :catalina - sha256 "d8537fab1388a387ab985bfdd841b106bccd663fbc0d53062af8cbdcaa9c7d35" => :mojave - sha256 "367c6a6f8104ecee70216a06545e2b7e1eb81ffb887b6b4e335cd5acd1d56e67" => :high_sierra - 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 0450538d15af6..0000000000000 --- a/Formula/subversion.rb +++ /dev/null @@ -1,198 +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.lua?path=subversion/subversion-1.14.0.tar.bz2" - mirror "https://archive.apache.org/dist/subversion/subversion-1.14.0.tar.bz2" - sha256 "6ba8e218f9f97a83a799e58a3c6da1221d034b18d9d8cbbcb6ec52ab11722102" - license "Apache-2.0" - revision 2 - - bottle do - rebuild 1 - sha256 "84dfd162eaa16691be6605ae5b2aa30ede25483c2a3da54bf05ff0f6b5767864" => :catalina - sha256 "0f84bf07d4a1949129d1be29e3e2d991f4fbec4c38acfd4757918fe9eafbcf6c" => :mojave - sha256 "cc20920a8095c8ba91f722f6d3fc5dc392fa075afdcc2d5055df677e8260312a" => :high_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 - - depends_on "openjdk" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :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@1.1" # For Serf - depends_on "perl" - depends_on "sqlite" - depends_on "utf8proc" - - uses_from_macos "expat" - uses_from_macos "krb5" - uses_from_macos "ruby" - uses_from_macos "zlib" - - resource "py3c" do - url "https://github.com/encukou/py3c/archive/v1.1.tar.gz" - sha256 "c7ffc22bc92dded0ca859db53ef3a0b466f89a9f8aad29359c9fe4ff18ebdd20" - end - - resource "serf" do - url "https://www.apache.org/dyn/closer.lua?path=serf/serf-1.3.9.tar.bz2" - mirror "https://archive.apache.org/dist/serf/serf-1.3.9.tar.bz2" - sha256 "549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc" - end - - # Prevent "-arch ppc" from being pulled in from Perl's $Config{ccflags} - patch :DATA - - def install - py3c_prefix = buildpath/"py3c" - serf_prefix = libexec/"serf" - - resource("py3c").unpack py3c_prefix - resource("serf").stage do - inreplace "SConstruct" do |s| - s.gsub! "print 'Warning: Used unknown variables:', ', '.join(unknown.keys())", - "print('Warning: Used unknown variables:', ', '.join(unknown.keys()))" - s.gsub! "match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'", - "match = re.search(b'SERF_MAJOR_VERSION ([0-9]+).*'" - s.gsub! "'SERF_MINOR_VERSION ([0-9]+).*'", - "b'SERF_MINOR_VERSION ([0-9]+).*'" - s.gsub! "'SERF_PATCH_VERSION ([0-9]+)'", - "b'SERF_PATCH_VERSION ([0-9]+)'" - end - # 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@1.1"].opt_prefix} - APR=#{Formula["apr"].opt_prefix} - APU=#{Formula["apr-util"].opt_prefix} - ] - system "scons", *args - system "scons", "install" - 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-jdk=#{Formula["openjdk"].opt_prefix} - --with-ruby-sitedir=#{lib}/ruby - --with-py3c=#{py3c_prefix} - --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 - --enable-javahl - --without-jikes - PYTHON=#{Formula["python@3.8"].opt_bin}/python3 - RUBY=/usr/bin/ruby - ] - - 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/"python3.8/site-packages").install_symlink Dir["#{lib}/svn-python/*"] - - # Java and Perl support don't build correctly in parallel: - # https://github.com/Homebrew/homebrew/issues/20415 - ENV.deparallelize - system "make", "javahl" - system "make", "install-javahl" - - archlib = Utils.safe_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 x86_64 -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" - end - - def caveats - <<~EOS - svntools have been installed to: - #{opt_libexec} - - The perl bindings are located in various subdirectories of: - #{opt_lib}/perl5 - - 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 - - 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/Formula/subversion@1.8.rb b/Formula/subversion@1.8.rb deleted file mode 100644 index 841cd0f8dd77e..0000000000000 --- a/Formula/subversion@1.8.rb +++ /dev/null @@ -1,126 +0,0 @@ -class SubversionAT18 < Formula - desc "Version control system" - homepage "https://subversion.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=subversion/subversion-1.8.19.tar.bz2" - mirror "https://archive.apache.org/dist/subversion/subversion-1.8.19.tar.bz2" - sha256 "56e869b0db59519867f7077849c9c0962c599974f1412ea235eab7f98c20e6be" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "d471619f345885cff74ff22c7c1783ff31d2a979471f8b55dba9851fd7872fdc" => :catalina - sha256 "f1ddeb0830e05709298f49b05131297e079a20cdf115a57d84e8c336b2c97aca" => :mojave - sha256 "4f5837d367ff776070c2d0a1a20a17a14fb56ec5296a00969c5fd5914888da02" => :sierra - 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@1.1" # For Serf - depends_on "sqlite" # build against Homebrew version for consistency - - resource "serf" do - url "https://www.apache.org/dyn/closer.lua?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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/subversion@1.8/1.8.16.patch" - sha256 "3d8bb24db773c713a1301986f71e018b7d0ff95425738964b575562841f8dc64" - end - - 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@1.1"].opt_prefix}] - - if MacOS.version >= :sierra || !MacOS::CLT.installed? - args << "APR=#{Formula["apr"].opt_prefix}" - args << "APU=#{Formula["apr-util"].opt_prefix}" - end - - system "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 diff --git a/Formula/suil.rb b/Formula/suil.rb deleted file mode 100644 index f18f9effcd564..0000000000000 --- a/Formula/suil.rb +++ /dev/null @@ -1,36 +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.6.tar.bz2" - sha256 "06fc70abaa33bd7089dd1051af46f89d378e8465d170347a3190132e6f009b7c" - license "ISC" - - bottle do - sha256 "588d837f629e7850d05a28f561852bd990229623748baf8c13be9337dc5d8e2a" => :catalina - sha256 "1497f4ef4de7dc80b8f79913ecc46203ddd3dc1f0afa117fed6ba4c3f448a4d9" => :mojave - sha256 "811369571b4c28268a130c040b8019ebf77fa26b4410022891b45d7ad2c03eb3" => :high_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 c2c4b9a9239bb..0000000000000 --- a/Formula/suite-sparse.rb +++ /dev/null @@ -1,46 +0,0 @@ -class SuiteSparse < Formula - desc "Suite of Sparse Matrix Software" - homepage "http://faculty.cse.tamu.edu/davis/suitesparse.html" - url "https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/v5.8.0.tar.gz" - sha256 "94a9b7134eb4dd82b97f1a22a6b464feb81e73af2dcdf683c6f252285191df1d" - - bottle do - sha256 "071121481c6eca597812a7b41a4bdf11d334e5d5a3d400b30f685425fb3d3889" => :catalina - sha256 "28ab445631aec4a86e477a9664c1610e49146add9fc673cfb9528f0c4c1d11a3" => :mojave - sha256 "161c178cdb17f0ac05e8376756262d8c8e0bd4092b99bac0b45f15d187bd6cd7" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "metis" - depends_on "openblas" - depends_on "tbb" - - uses_from_macos "m4" - - 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=-L#{Formula["openblas"].opt_lib} -lopenblas", - "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" - assert_predicate testpath/"test", :exist? - assert_match "x [0] = 1", shell_output("./test") - end -end diff --git a/Formula/sundials.rb b/Formula/sundials.rb deleted file mode 100644 index 29765c682b5e8..0000000000000 --- a/Formula/sundials.rb +++ /dev/null @@ -1,55 +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-5.3.0.tar.gz" - sha256 "88dff7e11a366853d8afd5de05bf197a8129a804d9d4461fb64297f1ef89bca7" - revision 1 - - bottle do - cellar :any - sha256 "fff1df3841c80eb3c2a6471e53ad2e8f29f97eb1e8498f8e85dc919616c68d0f" => :catalina - sha256 "63e63e0f7f928cd656613dc6344aaaaf11acd25e8c3148d3ac9a5b86dfe6c3df" => :mojave - sha256 "04f549daeb21124cfa74aeddb7c7baf58f7f482faec96cd4f5bc96f206414896" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "gcc" # for gfortran - depends_on "open-mpi" - depends_on "openblas" - depends_on "suite-sparse" - - uses_from_macos "libpcap" - uses_from_macos "m4" - - def install - blas = "-L#{Formula["openblas"].opt_lib} -lopenblas" - args = std_cmake_args + %W[ - -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 - -DBLA_VENDOR=OpenBLAS - -DLAPACK_LIBRARIES=#{blas};#{blas} - -DMPI_ENABLE=ON - ] - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - - # Only keep one example for testing purposes - (pkgshare/"examples").install Dir[prefix/"examples/nvector/serial/*"] \ - - Dir[prefix/"examples/nvector/serial/{CMake*,Makefile}"] - rm_rf prefix/"examples" - end - - test do - cp Dir[pkgshare/"examples/*"], 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 84299c3ee4ba7..0000000000000 --- a/Formula/superlu.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Superlu < Formula - desc "Solve large, sparse nonsymmetric systems of equations" - homepage "https://portal.nersc.gov/project/sparse/superlu/" - url "https://portal.nersc.gov/project/sparse/superlu/superlu_5.2.1.tar.gz" - sha256 "28fb66d6107ee66248d5cf508c79de03d0621852a0ddeba7301801d3d859f463" - revision 4 - - bottle do - cellar :any_skip_relocation - sha256 "c8cf07d7ce9841af6f5ff93f3bab779c385e0c6f84ac1c5a49d6c16ac2275120" => :catalina - sha256 "d47a98b1d94b041aa93835c10e024f2e3bb4f6535f1dd5c142343e5cf395e785" => :mojave - sha256 "5e02b75c1053a83ae4d07e3450d1cff929b825e2296327cbae038ace4d077e3a" => :high_sierra - sha256 "f2038e0b4edb755631cc4f9b42dc362996d8161fa9aad306a412c7e8ff39d9f8" => :sierra - end - - depends_on "gcc" - depends_on "openblas" - - 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["openblas"].opt_lib} -lopenblas"] - - system "make", "lib", *args - cd "EXAMPLE" do - system "make", *args - end - 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["openblas"].opt_lib}", "-lopenblas" - 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 84a08ecc3468b..0000000000000 --- a/Formula/supermodel.rb +++ /dev/null @@ -1,53 +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 "https://svn.code.sf.net/p/model3emu/code/trunk" - - bottle do - rebuild 1 - sha256 "16ce3b8995d5c9036111032cdbbde5dfc2fefc18c6f841e722242c9b791c92ac" => :catalina - sha256 "85678e40606c4bff6ff454ec15bafd2ab317887b2fb48865433d8cb0cdae7a3a" => :mojave - sha256 "83c0dbca7a5c28564eba4e7a73894746004aab5025071b350c3c47271fc42625" => :high_sierra - sha256 "1203bb3d289e36e1ca15720dbcd4e63ffcf4fa4d09588cb4fb81092cb72399ec" => :sierra - sha256 "78cf8e9fb973e3cd136a212936bdc8003d9897a1bb8a6a1eba3cc7ff0fba3c88" => :el_capitan - end - - depends_on "sdl" - - def install - makefile_dir = build.head? ? "Makefiles/Makefile.OSX" : "Makefiles/Makefile.SDL.OSX.GCC" - inreplace makefile_dir 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", 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/supertux.rb b/Formula/supertux.rb deleted file mode 100644 index 39e20294e223e..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" - license "GPL-3.0" - revision 3 - head "https://github.com/SuperTux/supertux.git" - - bottle do - cellar :any - rebuild 1 - sha256 "a3d50acf760264c99f3f2bb9e02bca8dbbadc2d4f2c3a7e9b9995316a22cfa3d" => :catalina - 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 - - 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 a2b4c0964a988..0000000000000 --- a/Formula/supervisor.rb +++ /dev/null @@ -1,88 +0,0 @@ -class Supervisor < Formula - include Language::Python::Virtualenv - - desc "Process Control System" - homepage "http://supervisord.org/" - url "https://github.com/Supervisor/supervisor/archive/4.2.0.tar.gz" - sha256 "05031f36ad15cad47fb56f01d8e075f952ae39ba8ce492ea790ebb310e3f0368" - - bottle do - cellar :any_skip_relocation - sha256 "2e3d14abf6e8b63001bfe0b128da3853db20bec5e99073eeac7b5e6b63b8bd1e" => :catalina - sha256 "2d860cc6e534901d1c9c9d330955aa5b7e3c5e4bb9d460180eca222742545957" => :mojave - sha256 "cf5c9fe0c5d1af7d39000624b00b96d5b945da9a79b3273bc245237f477ac105" => :high_sierra - end - - depends_on "python@3.8" - - 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 a14a831229e55..0000000000000 --- a/Formula/surfraw.rb +++ /dev/null @@ -1,29 +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 "2a2267217bfdd25ea00b3a08f76c44518e33dac0192a8590e4b3bfa3b5d90073" => :catalina - 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 91698c245bb15..0000000000000 --- a/Formula/suricata.rb +++ /dev/null @@ -1,82 +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-5.0.3.tar.gz" - sha256 "34413ecdad2ff2452526dbcd22f1279afd0935151916c0ff9cface4b0b5665db" - license "GPL-2.0" - - bottle do - sha256 "ce6e9acf117b139febc73ae854aa279c1bab29981c107524ee3ff7c1b3c780a8" => :catalina - sha256 "033c282b979418b4356b4f208781bcea7fd9100c62e4981a8980b396424aefc9" => :mojave - sha256 "6943af9391e189cd28c441645aeec26f48782eaf1c7760c30bdd9ef2e5cf3c7d" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "rust" => :build - depends_on "jansson" - depends_on "libmagic" - depends_on "libnet" - depends_on "libyaml" - depends_on "lz4" - depends_on "nspr" - depends_on "nss" - depends_on "pcre" - depends_on "python@3.8" - - resource "argparse" do - url "https://files.pythonhosted.org/packages/18/dd/e617cfc3f6210ae183374cd9f6a26b20514bbb5a792af97949c5aacddf0f/argparse-1.4.0.tar.gz" - sha256 "62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "simplejson" do - url "https://files.pythonhosted.org/packages/98/87/a7b98aa9256c8843f92878966dc3d8d914c14aad97e2c5ce4798d5743e07/simplejson-3.17.0.tar.gz" - sha256 "2b4b2b738b3b99819a17feaf118265d0753d5536049ea570b3c43b51c4701e81" - end - - def install - python3 = Formula["python@3.8"].opt_bin/"python3" - 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"] - libmagic = Formula["libmagic"] - libnet = Formula["libnet"] - - 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-libraries=#{libnet.opt_lib} - --enable-ipfw - ] - - 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 f8fda903af48c..0000000000000 --- a/Formula/svdlibc.rb +++ /dev/null @@ -1,27 +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 "3c78491f3d89425e87fb7a1d5ec63845ddf86f5098f817e32f7c1aafd64aa3cf" => :catalina - 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 ca8f1f09b486a..0000000000000 --- a/Formula/svg2pdf.rb +++ /dev/null @@ -1,40 +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 "7dff42459bf1ab33b0938f062d42c1857cb8274d1935f356b4f7dec76aac865c" => :catalina - 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 58739c9106ebc..0000000000000 --- a/Formula/svg2png.rb +++ /dev/null @@ -1,33 +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 "9669d135c08480905ca33b97507af5cbca2315243358f022ffa3bbe5731bfca8" => :catalina - 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 92f44ca8208e9..0000000000000 --- a/Formula/svgcleaner.rb +++ /dev/null @@ -1,41 +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" - license "GPL-2.0" - head "https://github.com/RazrFalcon/svgcleaner.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "43533727baf2ed09cdce9fe64357c1bc1f70fed57d70f37cfd824b664ab1266f" => :catalina - sha256 "bf18c353316b7a46ed2cecad188a638e359ce77acdcf501f578e5f96149ed667" => :mojave - sha256 "7e6df86bb8f994b157ff6de9bb7f43605b813a6a476f6f2d3af4d3483c1b6483" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - 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 467cb0e55ed55..0000000000000 --- a/Formula/svgo.rb +++ /dev/null @@ -1,28 +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.3.2.tar.gz" - sha256 "b1e65808957d5eaa07173f1729a9fe04d985a3a50da01fa2cc85583f7b27df59" - - bottle do - cellar :any_skip_relocation - sha256 "48a66950681297bed8bf89dbcfeab2c34147784bccdd5ac92f5664b73f530457" => :catalina - sha256 "631a5e5bf726f9f3a2c53ddfc7fd5061953bf905208972091c77ea7a10e41599" => :mojave - sha256 "5fe6407fa998ce2431d435e24bd565332d939b680fb624ddbfd5ad2316799305" => :high_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 - cp test_fixtures("test.svg"), testpath - system bin/"svgo", "test.svg", "-o", "test.min.svg" - assert_match /^ :catalina - sha256 "2d9f0213ed6bdf558fb3da4beb03081c4b7bde285aee8a429cc4589a657f1148" => :mojave - sha256 "8674391ac83165aa74bcf27f6384c31de8f2dad9dccae36d5b5d4e3287612a80" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "python@3.8" - - resource "six" do - url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/2d/bf/960e5a422db3ac1a5e612cb35ca436c3fc985ed4b7ed13a1b4879006f450/cffi-1.13.2.tar.gz" - sha256 "599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346" - end - - resource "asn1crypto" do - url "https://files.pythonhosted.org/packages/9f/3d/8beae739ed8c1c8f00ceac0ab6b0e97299b42da869e24cf82851b27a9123/asn1crypto-1.3.0.tar.gz" - sha256 "5a215cb8dc12f892244e3a113fe05397ee23c5c4ca7a69cd6e69811755efc42d" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz" - sha256 "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/bf/9d214a5af07debc6acf7f3f257265618f1db242a3f8e49a9b516f24523a6/certifi-2019.11.28.tar.gz" - sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" - 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/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - 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/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz" - sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ad/fc/54d62fa4fc6e675678f9519e677dfc29b8964278d75333cf142892caf015/urllib3-1.25.7.tar.gz" - sha256 "f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745" - end - - resource "pyyaml" do - url "https://files.pythonhosted.org/packages/3d/d9/ea9816aea31beeadccd03f1f8b625ecf8f645bd66744484d162d84803ce5/PyYAML-5.3.tar.gz" - sha256 "e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - 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 af4c4f5b5fe5a..0000000000000 --- a/Formula/swagger-codegen.rb +++ /dev/null @@ -1,46 +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.20.tar.gz" - sha256 "82de5438e233631026b945d2f25bd0a30c36d496daf42b696de27aa40dcd5dc1" - license "Apache-2.0" - head "https://github.com/swagger-api/swagger-codegen.git" - - bottle do - cellar :any_skip_relocation - sha256 "6edc8aa014a0a91569b7895abd7c7196ae99b6b10ca1e27d0a327ef825f6d171" => :catalina - sha256 "265c496f1891d12cfc8071f000c0f07bdce03bde78df8c83c57050332ce8e509" => :mojave - sha256 "39d90b9fe87e3b6dcb7275e3b73ae8255a8a12e752ea35bc3a040ff0e7621516" => :high_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.safe_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 5faaef8832a60..0000000000000 --- a/Formula/swagger-codegen@2.rb +++ /dev/null @@ -1,47 +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.14.tar.gz" - sha256 "0042eb69d804fb80316c8aeccd52eb2b2a573e6e08883395de9168c55b14a2f5" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ae83be14ef662c56355dbcb6adfd3776e7cde0f093e2b006c994501da85decaa" => :catalina - sha256 "cf4b5ae78cd0fb2a8662751b83180948ff46126aa24832eb499229d74041693d" => :mojave - sha256 "8275c272491a58ed7a6e4207f2c3761d82fce0e07f0f37fc931383b5343b38e3" => :high_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.safe_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/swagger2markup-cli.rb b/Formula/swagger2markup-cli.rb deleted file mode 100644 index 282957beaf240..0000000000000 --- a/Formula/swagger2markup-cli.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Swagger2markupCli < Formula - desc "Swagger to AsciiDoc or Markdown converter" - homepage "https://github.com/Swagger2Markup/swagger2markup" - url "https://jcenter.bintray.com/io/github/swagger2markup/swagger2markup-cli/1.3.3/swagger2markup-cli-1.3.3.jar" - sha256 "93ff10990f8279eca35b7ac30099460e557b073d48b52d16046ab1aeab248a0a" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "swagger2markup-cli-#{version}.jar" - (bin/"swagger2markup").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/swagger2markup-cli-#{version}.jar" "$@" - EOS - end - - test do - (testpath/"test.yaml").write <<~EOS - 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 - EOS - 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/swaks.rb b/Formula/swaks.rb deleted file mode 100644 index d67183aa17ed2..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-20190914.0.tar.gz" - sha256 "5733a51a5c3f74f62274c17dc825f177c22ed52703c97c3b23a5354d7ec15c89" - - 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 c948413c3d7b7..0000000000000 --- a/Formula/swfmill.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Swfmill < Formula - desc "Processor of xml2swf and swf2xml" - homepage "https://swfmill.org/" - url "https://www.swfmill.org/releases/swfmill-0.3.6.tar.gz" - sha256 "db24f63963957faec02bb14b8b61cdaf7096774f8cfdeb9d3573e2e19231548e" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "be2f7f3666c78c37775bd41e2adb640f290bb3e73d8a0b4b04bae0f08e140fac" => :catalina - 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 a59fccb1710ca..0000000000000 --- a/Formula/swftools.rb +++ /dev/null @@ -1,43 +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 - rebuild 1 - sha256 "b0791e6725e6d07610847df7e4431e5839fcf72120cea34f1890b425f8e024c4" => :catalina - sha256 "bf18bfc66b1f6d6ed247acd0a4208a09b4acf6a4668e8f7eba2e40ad33ffe9f6" => :mojave - sha256 "d0e441ed7eef07c3536965d5269f648744ceb62d41fbcfe9a12248b8154c4f62" => :high_sierra - 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 - 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 c42bdda59c2ec..0000000000000 --- a/Formula/swi-prolog.rb +++ /dev/null @@ -1,47 +0,0 @@ -class SwiProlog < Formula - desc "ISO/Edinburgh-style Prolog interpreter" - homepage "https://www.swi-prolog.org/" - url "https://www.swi-prolog.org/download/stable/src/swipl-8.2.1.tar.gz" - sha256 "331bc5093d72af0c9f18fc9ed83b88ef9ddec0c8d379e6c49fa43739c8bda2fb" - head "https://github.com/SWI-Prolog/swipl-devel.git" - - bottle do - sha256 "ff0b739f559d250bd0452f5567fa4484f8152145de2fc6d4854f74851bbbcd40" => :catalina - sha256 "2f6c8c976324d9afea6fcf4683ed4a953eb4fb14b168de03c7f00399db9707d0" => :mojave - sha256 "cbe5f89a9a2a0c6802dd731498e6bac1b44277123aa2b326193552d6b6e25165" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "berkeley-db" - depends_on "gmp" - depends_on "jpeg" - depends_on "libarchive" - depends_on "libyaml" - depends_on "openssl@1.1" - depends_on "pcre" - depends_on "readline" - depends_on "unixodbc" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DSWIPL_PACKAGES_JAVA=OFF", - "-DSWIPL_PACKAGES_X=OFF", - "-DCMAKE_INSTALL_PREFIX=#{libexec}", - "-DCMAKE_C_COMPILER=/usr/bin/clang", - "-DCMAKE_CXX_COMPILER=/usr/bin/clang++" - 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-format.rb b/Formula/swift-format.rb deleted file mode 100644 index 5cbfee5f57c27..0000000000000 --- a/Formula/swift-format.rb +++ /dev/null @@ -1,28 +0,0 @@ -class SwiftFormat < Formula - desc "Formatting technology for Swift source code" - homepage "https://github.com/apple/swift-format" - url "https://github.com/apple/swift-format.git", - :tag => "0.50200.1", - :revision => "f22aade8a6ee061b4a7041601ededd8ad7bc2122" - license "Apache-2.0" - version_scheme 1 - head "https://github.com/apple/swift-format.git" - - bottle do - cellar :any_skip_relocation - sha256 "d8f72c33efc125e2904e1bec2c8942cca75d75cf81dcab7fcf08ba124af16170" => :catalina - end - - depends_on :xcode => ["11.4", :build] - - def install - system "swift", "build", "--disable-sandbox", "-c", "release" - bin.install ".build/release/swift-format" - doc.install "Documentation/Configuration.md" - 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/swift-protobuf.rb b/Formula/swift-protobuf.rb deleted file mode 100644 index fba7cd625c0b0..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.10.0.tar.gz" - sha256 "2314c624b42f2d6d4afc1c178d3151d462b6dfea96967bb3a31ea2a761c97d1d" - license "Apache-2.0" - head "https://github.com/apple/swift-protobuf.git" - - bottle do - cellar :any_skip_relocation - sha256 "44873aa3ab6e67604d301c0646b4d017b0c1a0ca9c8f4c6b62c04a77f8a47fb7" => :catalina - sha256 "c73606c1f38daa770b5a62ce5ebf3c205ca4df474f3e0943849a7cf1dd2c8041" => :mojave - sha256 "44f48d168540d3928208bbff73b55fbee3efa13f17e5b3a3e18eb21c40026433" => :high_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" - 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-sh.rb b/Formula/swift-sh.rb deleted file mode 100644 index 55d165109108d..0000000000000 --- a/Formula/swift-sh.rb +++ /dev/null @@ -1,29 +0,0 @@ -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/1.18.0.tar.gz" - sha256 "e65b43609d43cc9163ef11d4a2b46e9f5f9387a6fd1645ed6ede5aac24333066" - license "Unlicense" - head "https://github.com/mxcl/swift-sh.git" - - bottle do - cellar :any_skip_relocation - sha256 "1859dc05bf66a8849a6722b084d8f226de2db2fcc857f5022f0b03c7d02b8adf" => :catalina - sha256 "34feeb88ecf77cf68463609411745c465b2338f7d7d7e9f33a988a20f2dcf23e" => :mojave - sha256 "0339afad23f24918a45036a440dd833c91a0b6ce97d5b6641337d7a851d02c69" => :high_sierra - end - - depends_on :xcode => ["10.0", :build] - - def install - system "swift", "build", "--disable-sandbox", "-c", "release" - bin.install ".build/release/swift-sh" - bin.install ".build/release/swift-sh-edit" - end - - test do - (testpath/"test.swift").write "#!/usr/bin/env swift sh" - system "#{bin}/swift-sh", "eject", "test.swift" - assert_predicate testpath/"Test"/"Package.swift", :exist? - end -end diff --git a/Formula/swift.rb b/Formula/swift.rb deleted file mode 100644 index 055d2c458555f..0000000000000 --- a/Formula/swift.rb +++ /dev/null @@ -1,138 +0,0 @@ -class Swift < Formula - desc "High-performance system programming language" - homepage "https://swift.org/" - url "https://github.com/apple/swift/archive/swift-5.2.4-RELEASE.tar.gz" - sha256 "94c44101c3dd6774887029110269bbaf9aff68cce5ea0783588157cc08d82ed8" - license "Apache-2.0" - - bottle do - sha256 "3ab59265cd42fb656737cddfa4a31012d50762526623a7ccb6655846e9609398" => :catalina - sha256 "62f5bf3be8b993ce5647d768b232edfec4bb908cbc87d01002caeff14757d32d" => :mojave - end - - keg_only :provided_by_macos - - depends_on "cmake" => :build - depends_on "ninja" => :build - - # Has strict requirements on the minimum version of Xcode - # https://github.com/apple/swift#system-requirements - depends_on :xcode => ["11.2", :build] - - uses_from_macos "icu4c" - - resource "llvm-project" do - url "https://github.com/apple/llvm-project/archive/swift-5.2.4-RELEASE.tar.gz" - sha256 "e36edc6c19e013a81b9255e329e9d6ffe7dfd89e8f8f23e1d931464c5f717d3a" - end - - resource "cmark" do - url "https://github.com/apple/swift-cmark/archive/swift-5.2.4-RELEASE.tar.gz" - sha256 "d5f656777961390987ed04de2120e73e032713bbd7b616b5e43eb3ae6e209cb5" - end - - resource "llbuild" do - url "https://github.com/apple/swift-llbuild/archive/swift-5.2.4-RELEASE.tar.gz" - sha256 "66b5374a15998a80cd72e7c1312766a8cbfe427a850f7b97d39b5d0508306e6c" - end - - resource "swiftpm" do - url "https://github.com/apple/swift-package-manager/archive/swift-5.2.4-RELEASE.tar.gz" - sha256 "383bf75f6dea96c4d48b2242bd3116154365e0e032aa3dce968f2c434732446c" - end - - resource "indexstore-db" do - url "https://github.com/apple/indexstore-db/archive/swift-5.2.4-RELEASE.tar.gz" - sha256 "f1a96c7c9182e6c4f43b04db4a3236b0ff3306132de305fafbdcfd36f2081da2" - end - - resource "sourcekit-lsp" do - url "https://github.com/apple/sourcekit-lsp/archive/swift-5.2.4-RELEASE.tar.gz" - sha256 "6bbc728aa852a969fcab25a4ab0e1016823a0c7ec606ef3d61d0a442cfba02db" - 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 - swift_components = %w[ - compiler clang-resource-dir-symlink stdlib sdk-overlay - tools editor-integration toolchain-tools license - sourcekit-xpc-service swift-remote-mirror - swift-remote-mirror-headers parser-lib - ] - llvm_components = %w[ - llvm-cov llvm-profdata IndexStore clang - clang-resource-headers compiler-rt clangd - ] - - args = %W[ - --release --assertions - --no-swift-stdlib-assertions - --build-subdir=#{build} - --llbuild --swiftpm - --indexstore-db --sourcekit-lsp - --jobs=#{ENV.make_jobs} - --verbose-build - -- - --workspace=#{workspace} - --install-destdir=#{prefix} - --toolchain-prefix=#{toolchain_prefix} - --install-prefix=#{install_prefix} - --host-target=macosx-x86_64 - --stdlib-deployment-targets=macosx-x86_64 - --build-swift-dynamic-stdlib - --build-swift-dynamic-sdk-overlay - --build-swift-stdlib-unittest-extra - --install-swift - --swift-install-components=#{swift_components.join(";")} - --llvm-install-components=#{llvm_components.join(";")} - --install-llbuild - --install-swiftpm - --install-sourcekit-lsp - ] - - system "#{workspace}/swift/utils/build-script", *args - end - end - - def caveats - <<~EOS - The toolchain has been installed to: - #{opt_prefix}/Swift-#{version}.xctoolchain - - You can find the Swift binary at: - #{opt_prefix}/Swift-#{version}.xctoolchain/usr/bin/swift - - You can also symlink the toolchain for use within Xcode: - ln -s #{opt_prefix}/Swift-#{version}.xctoolchain ~/Library/Developer/Toolchains/Swift-#{version}.xctoolchain - EOS - 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 -v 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 3ade4f6f67074..0000000000000 --- a/Formula/swiftformat.rb +++ /dev/null @@ -1,35 +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.44.16.tar.gz" - sha256 "35cf41e636755c8e577b15429d36ee5f75a52ac4cfc3159dfa766621e438e38c" - license "MIT" - head "https://github.com/nicklockwood/SwiftFormat.git", :shallow => false - - bottle do - cellar :any_skip_relocation - sha256 "e03e40dbe228ee7136cc2dd57079b589a6c531f4f2a52fce8a0ad7aaa2e2a935" => :catalina - sha256 "9b866de2516e8f68b1ad764f996f38cba31b2d2fc345ba683bdd1867e6a44091" => :mojave - sha256 "eb111096afada9821c4cf1489706b5daf599670d8651719955998f763c6b9cdb" => :high_sierra - end - - depends_on :xcode => ["10.1", :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 631b01948a6bd..0000000000000 --- a/Formula/swiftgen.rb +++ /dev/null @@ -1,105 +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.2.1", - :revision => "74ec417bfb39ed3191b385d3cafecfbbcc0fad72" - license "MIT" - head "https://github.com/SwiftGen/SwiftGen.git", :branch => "develop" - - bottle do - cellar :any - sha256 "0fde7ff65be044c1685ab5aa84514e45c594cbc8bad028b5ac8f2f6218cfd626" => :catalina - end - - depends_on "ruby" => :build if MacOS.version <= :sierra - depends_on :xcode => ["11.4", :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/CoreData/Model.xcdatamodeld" => "Model.xcdatamodeld", - "Tests/Fixtures/Resources/Fonts" => "Fonts", - "Tests/Fixtures/Resources/JSON" => "JSON", - "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/swift5/defaults.swift" => "colors.swift", - "Tests/Fixtures/Generated/CoreData/swift5/defaults.swift" => "coredata.swift", - "Tests/Fixtures/Generated/Fonts/swift5/defaults.swift" => "fonts.swift", - "Tests/Fixtures/Generated/IB-iOS/scenes-swift5/all.swift" => "ib-scenes.swift", - "Tests/Fixtures/Generated/JSON/runtime-swift5/all.swift" => "json.swift", - "Tests/Fixtures/Generated/Plist/runtime-swift5/all.swift" => "plists.swift", - "Tests/Fixtures/Generated/Strings/structured-swift5/localizable.swift" => "strings.swift", - "Tests/Fixtures/Generated/XCAssets/swift5/all.swift" => "xcassets.swift", - "Tests/Fixtures/Generated/YAML/inline-swift5/all.swift" => "yaml.swift", - } - (pkgshare/"fixtures").install fixtures - end - - test do - system bin/"swiftgen", "--version" - - fixtures = pkgshare/"fixtures" - - assert_equal (fixtures/"colors.swift").read.strip, - shell_output("#{bin}/swiftgen run colors --templatePath " \ - "#{pkgshare/"templates/colors/swift5.stencil"} #{fixtures}/colors.xml").strip, - "swiftgen run colors failed" - - assert_equal (fixtures/"coredata.swift").read.strip, - shell_output("#{bin}/swiftgen run coredata --templatePath " \ - "#{pkgshare/"templates/coredata/swift5.stencil"} #{fixtures}/Model.xcdatamodeld").strip, - "swiftgen run coredata failed" - - assert_equal (fixtures/"fonts.swift").read.strip, - shell_output("#{bin}/swiftgen run fonts --templatePath " \ - "#{pkgshare/"templates/fonts/swift5.stencil"} #{fixtures}/Fonts").strip, - "swiftgen run fonts failed" - - assert_equal (fixtures/"ib-scenes.swift").read.strip, - shell_output("#{bin}/swiftgen run ib --templatePath " \ - "#{pkgshare/"templates/ib/scenes-swift5.stencil"} --param module=SwiftGen " \ - "#{fixtures}/IB-iOS").strip, - "swiftgen run ib failed" - - assert_equal (fixtures/"json.swift").read.strip, - shell_output("#{bin}/swiftgen run json --templatePath " \ - "#{pkgshare/"templates/json/runtime-swift5.stencil"} #{fixtures}/JSON").strip, - "swiftgen run json failed" - - assert_equal (fixtures/"plists.swift").read.strip, - shell_output("#{bin}/swiftgen run plist --templatePath " \ - "#{pkgshare/"templates/plist/runtime-swift5.stencil"} #{fixtures}/Plist").strip, - "swiftgen run plist failed" - - assert_equal (fixtures/"strings.swift").read.strip, - shell_output("#{bin}/swiftgen run strings --templatePath " \ - "#{pkgshare/"templates/strings/structured-swift5.stencil"} " \ - "#{fixtures}/Localizable.strings").strip, - "swiftgen run strings failed" - - assert_equal (fixtures/"xcassets.swift").read.strip, - shell_output("#{bin}/swiftgen run xcassets --templatePath " \ - "#{pkgshare/"templates/xcassets/swift5.stencil"} " \ - "#{fixtures}/XCAssets/*.xcassets").strip, - "swiftgen run xcassets failed" - - assert_equal (fixtures/"yaml.swift").read.strip, - shell_output("#{bin}/swiftgen run yaml --templatePath " \ - "#{pkgshare/"templates/yaml/inline-swift5.stencil"} #{fixtures}/YAML").strip, - "swiftgen run yaml failed" - end -end diff --git a/Formula/swiftlint.rb b/Formula/swiftlint.rb deleted file mode 100644 index d00961a246483..0000000000000 --- a/Formula/swiftlint.rb +++ /dev/null @@ -1,31 +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.39.2", - :revision => "b1c72069cafa6cdebfb9274806cd976c54d8dde5" - license "MIT" - head "https://github.com/realm/SwiftLint.git" - - bottle do - cellar :any_skip_relocation - sha256 "32f9e5e37190e81856eff49c2118c04d1995110b509f0a4997e211c9f939919e" => :catalina - sha256 "c4fc10277d46c406277491003e5d5bbdfe526890c39b30eb924749696ed56d40" => :mojave - end - - depends_on :xcode => ["10.2", :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 ac932e0756538..0000000000000 --- a/Formula/swiftplate.rb +++ /dev/null @@ -1,36 +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" - license "MIT" - 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 955b0fa4d1587..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-4.0.2/swig-4.0.2.tar.gz" - sha256 "d53be9730d8d58a16bf0cbd1f8ac0c0c3e1090573168bfa151b01eb47fa906fc" - - bottle do - sha256 "530e80b7e7dcd28469b52fc3b668683a97b72642ebf2b6d4e6708d14f05e7286" => :catalina - sha256 "50afb5930cb37af2e400f0369f6da15b1d4922c1f72f45d13e7e3f8bd9d6d27b" => :mojave - sha256 "8bab440005b048ce454a3dd50ba608e1f85391edd73e9e40510269e923cad238" => :high_sierra - end - - head do - url "https://github.com/swig/swig.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pcre" - - uses_from_macos "ruby" => :test - - 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#{MacOS.sdk_path}/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.rb b/Formula/swig@3.rb deleted file mode 100644 index 9c7edc6f8bc65..0000000000000 --- a/Formula/swig@3.rb +++ /dev/null @@ -1,50 +0,0 @@ -class SwigAT3 < 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 "f50becfc883397db62530bab927dcf4b5a4db5f0bcbb2839d5ac795fb924c586" => :catalina - sha256 "28e5c0a5e8aac0c0d5f58e4dd69c590f57d3a450d92aa35b18aee037ab7d8b60" => :mojave - sha256 "730bd728981cc1534664ef35d08d0b285e79756c286913d868af6afa43f60f4d" => :high_sierra - sha256 "23275971784bb9272a734f44c9689dafecd5e6c4be917cd3d621064858cd76db" => :sierra - end - - keg_only :versioned_formula - - depends_on "pcre" - - uses_from_macos "ruby" => :test - - 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#{MacOS.sdk_path}/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/swimat.rb b/Formula/swimat.rb deleted file mode 100644 index aad40c90a1399..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.2.tar.gz" - sha256 "1e6000dd16857a769070036fe710dd0b2aa6c4436a02ecc60590d829d6228e8b" - license "MIT" - head "https://github.com/Jintin/Swimat.git" - - bottle do - cellar :any_skip_relocation - sha256 "a94df9efa0aef16df8e593696a3dc3dd1fbe4f8fa59512af713d4915a103843c" => :catalina - sha256 "197ba3d1db2bfbee29a10e4735925b4fdac3035c486b7899bc564cea5f019839" => :mojave - end - - depends_on :xcode => ["10.2", :build] - - 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 44ae463a9346a..0000000000000 --- a/Formula/switch-lan-play.rb +++ /dev/null @@ -1,29 +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.git", - :tag => "v0.2.3", - :revision => "c0c663e3fdc95d6d6e8ab401caa2bfb5b5872e00" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "caa1992416c8eae4c281af3166238bb2bf8104c1d91d7dc37a2abd8715712ccc" => :catalina - sha256 "62da027220b8d01270c8459cec638744ed06eac2ec046ccff56729b7f126eacf" => :mojave - sha256 "41a10e6d0ce45410763c4774afa4286a8c633ac60348c0d0963e33cbef855c1d" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - 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 f933d74043e2d..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 "4a1ad0824d878dcabb3d7ffe4ad911f850383dbf2db28100e58f28cbc96657b7" => :catalina - sha256 "85d0fe91c72d1a61e331e475af4e6ded9d0ca3581612c1934835bc44653fe407" => :mojave - sha256 "26af506ea42b83ae8ccde71ed8b7666ccf3e3a349b2dd8958af7025854ffefd3" => :high_sierra - sha256 "89ed040cc50c7b7ad88a903da5351cfa0027a4daf22cf73f2713e0887847c5d1" => :sierra - sha256 "515b762164648d739ae36f8c5013d250d84af1264bf3ee366ed35adae2f44208" => :el_capitan - end - - depends_on :xcode => :build - - 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 d8931e13b9a93..0000000000000 --- a/Formula/sword.rb +++ /dev/null @@ -1,36 +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 "3c4fd6972c16470479e43a43ef097a053ed6543b6e3d2cdfb1c15ff7416dbae1" => :catalina - 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 8b83f1678253c..0000000000000 --- a/Formula/sxiv.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Sxiv < Formula - desc "Simple X Image Viewer" - homepage "https://github.com/muennich/sxiv" - url "https://github.com/muennich/sxiv/archive/v26.tar.gz" - sha256 "a382ad57734243818e828ba161fc0357b48d8f3a7f8c29cac183492b46b58949" - license "GPL-2.0" - head "https://github.com/muennich/sxiv.git" - - bottle do - cellar :any - sha256 "76166fe7a568a675abf485137b4df514f4f0c187edc0502f298d0f482aa7ac80" => :catalina - sha256 "1dc370bc45941faf5aeb36014160748df67446f4b51010c73a1ecc3851aed811" => :mojave - sha256 "544f9660a23d0370a6cd3b5fe6ff207bf21a12dcac6aaea5dc35735b09fc258c" => :high_sierra - end - - depends_on "giflib" - depends_on "imlib2" - depends_on "libexif" - depends_on :x11 - - def install - system "make", "PREFIX=#{prefix}", "AUTORELOAD=nop", - "CPPFLAGS=-I/opt/X11/include", "LDFLAGS=-L/opt/X11/lib", - "LDLIBS=-lpthread", "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 9105e937ca07e..0000000000000 --- a/Formula/syck.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Syck < Formula - desc "Extension for reading and writing YAML" - homepage "https://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 "cc1bf3857c3d847854b54f45a25c5b1696c811f369c811521a07e2f5a4431e81" => :catalina - 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 9ad80c01ecc1b..0000000000000 --- a/Formula/sylpheed.rb +++ /dev/null @@ -1,31 +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 3 - - bottle do - rebuild 1 - sha256 "44913001d85002b75a715b3b8d12ef0fcbc3a1de152546d8fe5297544af367d6" => :catalina - sha256 "744efdd95f6dc3152ab39da781d5cc9ef81a5caa7310097b00a903e1e595e188" => :mojave - sha256 "0ec10e9ba748c3ce1bbb2502b8f9736fcdd1c72d492fdf4c58e2e3c0f6442f4b" => :high_sierra - sha256 "df7c4f2ede961688c72b588cb4e08702603caf19ad08d2c00721e95c9a503716" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gpgme" - depends_on "gtk+" - depends_on "openssl@1.1" - - 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 7cc141c230e1d..0000000000000 --- a/Formula/sync_gateway.rb +++ /dev/null @@ -1,60 +0,0 @@ -class SyncGateway < Formula - desc "Make Couchbase Server a replication endpoint for Couchbase Lite" - homepage "https://docs.couchbase.com/sync-gateway/current/index.html" - url "https://github.com/couchbase/sync_gateway.git", - :tag => "2.7.3", - :revision => "33d352f97798e45360155b63c022e8a39485134e" - license "Apache-2.0" - head "https://github.com/couchbase/sync_gateway.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "b1ec1b07a62ae7e15e2d16be2a10ccc18a53ba1302a8aaef1760d90046500cc0" => :catalina - sha256 "db5e68b8cf1d359212a549ca79685f219854652421e88459c796bf27ccaf004b" => :mojave - sha256 "7efcb17eada7400912053e7fc0e4851d2f3346278238f6be3bc3a854af6ee339" => :high_sierra - end - - depends_on "gnupg" => :build - depends_on "go" => :build - depends_on "repo" => :build - depends_on "python@3.8" - - def install - # Cache the vendored Go dependencies gathered by depot_tools' `repo` command - repo_cache = buildpath/"repo_cache/#{name}/.repo" - repo_cache.mkpath - - (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.safe_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" - ENV["SG_EDITION"] = "CE" - system "sh", "build.sh", "-v" - mv "godeps/bin", prefix - end - end - - test do - interface_port = free_port - admin_port = free_port - fork do - exec "#{bin}/sync_gateway_ce -interface :#{interface_port} -adminInterface 127.0.0.1:#{admin_port}" - end - sleep 1 - - system "nc", "-z", "localhost", interface_port - system "nc", "-z", "localhost", admin_port - end -end diff --git a/Formula/syncthing.rb b/Formula/syncthing.rb deleted file mode 100644 index a8e2164fae9b8..0000000000000 --- a/Formula/syncthing.rb +++ /dev/null @@ -1,71 +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.6.1", - :revision => "d7c3d81dfb014e147bd96d4a4eeb52a185bf7dda" - license "MPL-2.0" - head "https://github.com/syncthing/syncthing.git" - - bottle do - cellar :any_skip_relocation - sha256 "7dfe7cead65065aec937e634e1719d8230bd95adeb27340e4562ee7bdfafb8a7" => :catalina - sha256 "bbafe13bf10ffe211df232bfcaec2ff25ac0a5ebeccdd7f039ce5270eb15b050" => :mojave - sha256 "1f0d2a288d4aabddbb9016afb28c5cc763d0247d83cadbfaa2b8b0435526284f" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - src = buildpath/"src/github.com/syncthing/syncthing" - src.install buildpath.children - src.cd 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 bea1747ba9971..0000000000000 --- a/Formula/synfig.rb +++ /dev/null @@ -1,118 +0,0 @@ -class Synfig < Formula - desc "Command-line renderer" - homepage "https://synfig.org/" - url "https://downloads.sourceforge.net/project/synfig/releases/1.2.2/source/synfig-1.2.2.tar.gz" - sha256 "5f5f7b33483041165f9a63fe4d95eb815971c7444569e574206f6964e83cc2ef" - revision 4 - head "https://svn.code.sf.net/p/synfig/code/" - - bottle do - sha256 "6d117163a9f6842aacaf99fcbb72ba7b4af4a69ee7d39dcd76837fb24f79319a" => :catalina - sha256 "b955e3352a86133f4175d8de262089638eb79bc59c6342c5addf5958fcf6fbc8" => :mojave - sha256 "1d95e144c64e8564497e2e2913d8644dcca7f0d50e90448a24ccae9a1cdafbbb" => :high_sierra - end - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "cairo" - depends_on "etl" - depends_on "fftw" - depends_on "freetype" - depends_on "gettext" - depends_on "libpng" - depends_on "libsigc++@2" - depends_on "libtool" - depends_on "libxml++" - depends_on "mlt" - depends_on "openexr" - depends_on "pango" - - 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++@2"] - 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 5c3bd6fa26aa6..0000000000000 --- a/Formula/synscan.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Synscan < Formula - desc "Asynchronous half-open TCP portscanner" - homepage "http://digit-labs.org/files/tools/synscan/" - url "http://digit-labs.org/files/tools/synscan/releases/synscan-5.02.tar.gz" - sha256 "c4e6bbcc6a7a9f1ea66f6d3540e605a79e38080530886a50186eaa848c26591e" - revision 1 - - bottle do - cellar :any - sha256 "0e99e8f964f270377bd7dc6c0ecfae64682f3b2831776d7723f200c159623ac6" => :catalina - sha256 "aba139d4f46b1248a796f26dccb6399fd6f6eadd94b7777f5218d3a0599f0bad" => :mojave - sha256 "4364e517dd2b231cd711be4ccebdfe802e1ef6f7cacfaff46e987790c90c21f8" => :high_sierra - 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" - 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 89add19f690bb..0000000000000 --- a/Formula/syntaxerl.rb +++ /dev/null @@ -1,34 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "7e37cdaf043add132428e29854d4d1cd0aa5dc039387671ba000b9ae26267d6a" => :catalina - 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 f6fe516ec7cca..0000000000000 --- a/Formula/sysbench.rb +++ /dev/null @@ -1,38 +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.20.tar.gz" - sha256 "e8ee79b1f399b2d167e6a90de52ccc90e52408f7ade1b9b7135727efe181347f" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "2ca0e854823e63ecf84b27d81d0ea722aeae784fed39b436fed738fcd4450489" => :catalina - sha256 "ec55acf85be8a3cfbd57a72f1d67aad2104e545ec32464010d673c205075c809" => :mojave - sha256 "84363a4b7267f936a6e168fb4ed30fa21970ff1483bb81a5fba2bbe25d611cfc" => :high_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@1.1" - - 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. - # https://github.com/LuaJIT/LuaJIT/issues/518: set to 10.14 to build on Catalina. - ENV["MACOSX_DEPLOYMENT_TARGET"] = (DevelopmentTools.clang_build_version >= 1100) ? "10.14" : 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 b4529196b89f6..0000000000000 --- a/Formula/sysdig.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Sysdig < Formula - desc "System-level exploration and troubleshooting tool" - homepage "https://sysdig.com/" - url "https://github.com/draios/sysdig/archive/0.26.7.tar.gz" - sha256 "c82aa4201e8ad37e22c780c27c28ac28359a8e677b4dc0ea295eb1452115d6c0" - license "Apache-2.0" - revision 1 - - bottle do - sha256 "c3b1b55e16c9e7d143138c0b824872f000e92a9323c43683877da83c0eeeeda0" => :catalina - sha256 "de3c1cedda2cdc14ba06892f556161c25f023975ff4a9b8a38ad47a13bcdc13d" => :mojave - sha256 "41b0016def49ba75c9d48dcc4d017fe684aedb79e2a35132952cee85ec1c0b33" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "jsoncpp" - depends_on "luajit" - depends_on "tbb" - - # 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 - mkdir "build" do - system "cmake", "..", "-DSYSDIG_VERSION=#{version}", - "-DUSE_BUNDLED_DEPS=OFF", - "-DCREATE_TEST_TARGETS=OFF", - *std_cmake_args - system "make" - 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 edba007ea8bdb..0000000000000 --- a/Formula/systemc.rb +++ /dev/null @@ -1,37 +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" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "514a49408461d311e27def414b559298e514df9be6461408e691aa2ba44ff0d5" => :catalina - 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 81edd9717036d..0000000000000 --- a/Formula/sz81.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - head "https://svn.code.sf.net/p/sz81/code/sz81" - - bottle do - sha256 "97f54508894d2dca7948b2798d0c76164a1ebea685a14f8be12e992883348455" => :catalina - 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 513e85b174ee6..0000000000000 --- a/Formula/szip.rb +++ /dev/null @@ -1,46 +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 "e27bbc3b0a5d55b33051cb6ca509836e617b6f96361a70a187a6c8d53f2b520b" => :catalina - 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 4d8446ced1ead..0000000000000 --- a/Formula/t-completion.rb +++ /dev/null @@ -1,20 +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" - license "MIT" - 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..9d54a3badb161 --- /dev/null +++ b/Formula/t/t-rec.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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..fac871d002d91 --- /dev/null +++ b/Formula/t/t1lib.rb @@ -0,0 +1,98 @@ +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 + + bottle do + rebuild 2 + 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 mojave: "2fc10925d1618b809de806ee87722c96d8c03655e3d586f0a37b3d049ee2e082" + sha256 high_sierra: "a36bc3913f6b51cb7772609a52049f90fc6241ffca3bf18c4295455ef5f4df4c" + sha256 sierra: "94789287c849a04f05a40c79940aee6efe3e03318c95db9c2be69ee4e6806d82" + sha256 el_capitan: "fa356a5405f5b0cf57c15ebd5b680c215e1e498189914e9b9663eb132655a8c1" + 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..9de9eec868957 --- /dev/null +++ b/Formula/t/ta-lib.rb @@ -0,0 +1,36 @@ +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_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..46dfe1d82c1e9 --- /dev/null +++ b/Formula/t/tabiew.rb @@ -0,0 +1,50 @@ +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.9.4.tar.gz" + sha256 "4b466e72a17e9dc9d8cf59a92398eba1fde361932bc644c2c1badc937fba0e44" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef11e7b97169d0843d91ea84cb2508720d5e14ea4244a273d1c8da823bd5b316" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6086e407d6e3e6f7fb00972c1e2b03d4b5c83e5eff56ca851d45f4c213bc981b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dbc553069a5738242f2d8d592b758d8219f7a01fe6b9680845015884930d6389" + sha256 cellar: :any_skip_relocation, sonoma: "eceae1ef2d389972a3ef414b3bc0dc8f565e7bb93aa8c91d7e953ac0718525ea" + sha256 cellar: :any_skip_relocation, ventura: "afd72e67da0dcf5fd93fc5260ef97fd7d4301269c7c0d54cff82767d3bcc1b38" + sha256 cellar: :any_skip_relocation, arm64_linux: "67ac5f2c7b85568c6c5ef28a79079e159c926c89908460ded52d7e007f932b29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd5507813514018a791c355965e06f1b0f2fe79abec74158bfc3eab5d3591562" + end + + depends_on "rust" => :build + + 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/tabulate.rb b/Formula/t/tabulate.rb new file mode 100644 index 0000000000000..2ace6ad0f0441 --- /dev/null +++ b/Formula/t/tabulate.rb @@ -0,0 +1,48 @@ +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 + ] + + 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..412d9dca5da1f --- /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 + sha256 cellar: :any, arm64_sequoia: "3db427a6caea76c846eebb8f2502c86a7171710e5aca628f989f48f129d615c1" + sha256 cellar: :any, arm64_sonoma: "8e47442497921fc872a084a677eed665d3f4c89c0ff48655d3957de71d59e72f" + sha256 cellar: :any, arm64_ventura: "734364a31ada8e5a32e67bc23c9c1b4f63bedcbdf51b0408c666a8f8ef771e67" + sha256 cellar: :any, sonoma: "5ab56efd8069aa51bc53d2685947c7cf9499b7514c82fc9aaa37676682833b71" + sha256 cellar: :any, ventura: "78b97642cb747a584f1db63c6def4e35b96e702b44e496c81e86c92558bbd269" + sha256 cellar: :any_skip_relocation, arm64_linux: "7fb188552bb18d4c3b8e5f9c74be9ccedfbf4532ef9e6c74b633d565a33d04a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d0192a66caa3854171fc723bfa00a586e82162896159e703c3beb5b7ae9ed2f9" + end + + depends_on "rust" => :build + depends_on "libyaml" + depends_on "python@3.13" + + 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 "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 "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/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz" + sha256 "307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1" + 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 "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/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyparsing" do + url "https://files.pythonhosted.org/packages/bb/22/f1129e69d94ffff626bdb5c835506b3a5b4f3d070f17ea295e12c2c6f60f/pyparsing-3.2.3.tar.gz" + sha256 "b9c13f1ab8b3b542f72e28f634bad4de758ab3ce4546e4301970ad6fa77c38be" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz" + sha256 "cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff" + 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/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..c613c4e6f3602 --- /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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "ee5dbe68476b6ae900b92486f3dc3c7a9755296c1fee54a75cd64c7d6af66763" + sha256 cellar: :any_skip_relocation, high_sierra: "5801c9fac7b1a4bad52f02fd8a09b64050ebc52515bd96115153c7049bd4619f" + sha256 cellar: :any_skip_relocation, sierra: "5711ce58bd5b224252f1869f84f937c6bca0775bf4c86a6a1168418c1218dc98" + 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..7fe0910f63553 --- /dev/null +++ b/Formula/t/taglib.rb @@ -0,0 +1,61 @@ +class Taglib < Formula + desc "Audio metadata library" + homepage "https://taglib.org/" + url "https://taglib.github.io/releases/taglib-2.0.2.tar.gz" + sha256 "0de288d7fe34ba133199fd8512f19cc1100196826eafcb67a33b224ec3a59737" + 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_sequoia: "bcee4f3d052cbe5989067daf7a174503c25b7192cf061776cdd907b466ff3058" + sha256 cellar: :any, arm64_sonoma: "4294daac491a5377c5600ffc009127c145ee9b57b326a2e0ddb36fbfa392a1cc" + sha256 cellar: :any, arm64_ventura: "74dbb8c6094f04e047bfd5fa118a979f477d071b9cf836418e3b0f937903e121" + sha256 cellar: :any, sonoma: "98bc5de27c719c40923a8a9b949cede60d16e5fe6fced83e77feed4add720251" + sha256 cellar: :any, ventura: "8841e4c1db0f37278adc2f3c62b0b115c55293bc277e1e2f99b8c545b8ba73e1" + sha256 cellar: :any_skip_relocation, arm64_linux: "bc4caad6f5f00412d88bd96a6e1f2e3a58cda1d7760af66439e3d1b46d195cc1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f43bb70deddf02f695e91b7f4c4153b4f690133e5e03a711a27790a0a4172c28" + 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..22ed2636a3acd --- /dev/null +++ b/Formula/t/tagref.rb @@ -0,0 +1,56 @@ +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" + + bottle do + 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..344de5612ca92 --- /dev/null +++ b/Formula/t/tailor.rb @@ -0,0 +1,26 @@ +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 + + 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..b92a7f99416e7 --- /dev/null +++ b/Formula/t/tailscale.rb @@ -0,0 +1,60 @@ +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.82.5", + revision: "e4d64c6faf827a308ec20b39651225178e6743c0" + license "BSD-3-Clause" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5cb9522e6fb472254456d3d3879db2cbb4fee351e5879b4558f2dfec05751003" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "534cbaab1cc979ff683f3931aaa8a201a0115e13e7e5809c8f03b145c6757119" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7940891b6c77ddd1ca3bc8ef3f53ebff37ae5f57b96a5eb8b76fdb903df6e93d" + sha256 cellar: :any_skip_relocation, sonoma: "cc467f4068ed000de01e618be1988ebcf46c5c7e085748791ebe72e3fac8d5ed" + sha256 cellar: :any_skip_relocation, ventura: "64841fc4262a93c285bd88960341173800327bf01f6a16be9fad7e65c51b82c9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0ef09a917c922fe6d10174957a2255fa77c34e01f2df81c572ca23133b3ec329" + end + + depends_on "go" => :build + + conflicts_with cask: "tailscale" + + 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..7e7cb933c507f --- /dev/null +++ b/Formula/t/tailspin.rb @@ -0,0 +1,36 @@ +class Tailspin < Formula + desc "Log file highlighter" + homepage "https://github.com/bensadeh/tailspin" + url "https://github.com/bensadeh/tailspin/archive/refs/tags/5.4.2.tar.gz" + sha256 "2226229e6c85859a094bbe4e672a467976d7563fb7ba0454e75135c2a6537ee7" + license "MIT" + head "https://github.com/bensadeh/tailspin.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e4856acada71f24fd48aff031e21ea3bd5888288326839a8d29d3aed474b0d6c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0ba0d34dc90e489fbd05de60b6544ef635999c80edae36ce95c259cf491a1bc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b72a972afdc4e9e8ceb5b2722f9f478ff91d7c92bb86b5d5c643fe69e1ba095d" + sha256 cellar: :any_skip_relocation, sonoma: "9569242f88d6318b8936c33f93bda3640318153a8e5d2661c1034e51d7cb4ef9" + sha256 cellar: :any_skip_relocation, ventura: "c111499b2b53ac56478bab4b45b721d7a77e4debba044510e915a3cac25ff86c" + sha256 cellar: :any_skip_relocation, arm64_linux: "e5fb2a7e972879ff7044d0c7bca1023be012e6eac59ad60e5b965cffd7e05ec4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6bd37dda4d3e11e6490b1567053711275ff7bd053fed8eaf24c270e013268ec4" + 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..bea712e69e70a --- /dev/null +++ b/Formula/t/tailwindcss-language-server.rb @@ -0,0 +1,57 @@ +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.17.tar.gz" + sha256 "861bc0b74370a9ad577edb05f170e57e197ae06bb16cf4abd8cc33c0f63a594c" + 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_sequoia: "f1c5a8abd892befae22f19ded8a3cf1407d084ebe36105404bfc83f9e0456e36" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f1c5a8abd892befae22f19ded8a3cf1407d084ebe36105404bfc83f9e0456e36" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f1c5a8abd892befae22f19ded8a3cf1407d084ebe36105404bfc83f9e0456e36" + sha256 cellar: :any_skip_relocation, sonoma: "f1c5a8abd892befae22f19ded8a3cf1407d084ebe36105404bfc83f9e0456e36" + sha256 cellar: :any_skip_relocation, ventura: "f1c5a8abd892befae22f19ded8a3cf1407d084ebe36105404bfc83f9e0456e36" + sha256 cellar: :any_skip_relocation, arm64_linux: "6a9d5da0f54a86b1c4d8e0adf416207eec2bfb807d83ab43ed46a62c714c0767" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a9d5da0f54a86b1c4d8e0adf416207eec2bfb807d83ab43ed46a62c714c0767" + end + + depends_on "pnpm@9" => :build + depends_on "node" + + def install + 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..8e2e323e001bb --- /dev/null +++ b/Formula/t/tailwindcss.rb @@ -0,0 +1,84 @@ +class Tailwindcss < Formula + desc "Utility-first CSS framework" + homepage "https://tailwindcss.com/" + url "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.1.7.tgz" + sha256 "830a7a9ca9c8c498cfeb7eba37207162f589618bb58f6b06149f0d3ad03bbb40" + license "MIT" + head "https://github.com/tailwindlabs/tailwindcss.git", branch: "next" + + # 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_sequoia: "1b54faa95dda02ebc686f1afc11e2c9223beaeea1f2db240e5ec9bee9afa0bdf" + sha256 arm64_sonoma: "5da8a6d8a3d787af8fb2e49a2baaae883d7c1ac95a8f2231370d284eb06bfe66" + sha256 arm64_ventura: "17318a7a5573998bd3f43944226bf782ca7ddffb0f80561265e5de82dbcc3284" + sha256 sonoma: "9676f0a008aed2e0c680205dad7c0e4736e42ba2be794db92aef784c0cc529d1" + sha256 ventura: "83b8d1b900f5317e7360d84de28b011f9f5bbcd87e1d65c12c725f9774756e5a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a7ffc53346bb9bd09b900c1d6e52485fce472832c7ee5758792ac83adaea0c3f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5df4328db71f164fe772b68519a861a18251d4a96c157651e604766ced455db0" + 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.16.tgz" + sha256 "41bb083cd966434072dd8a151c8989e1cfa574eb5ba580b719da013d32b6828e" + 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 "https://github.com/tailwindcss"; + @import "https://github.com/tailwindcss/theme" theme(reference); + @import "https://github.com/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..6d81f92ec9234 --- /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 + + bottle do + 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 mojave: "c45509b2d6828c514a0397f9c57284f7c4efcca766deddc762ef69cac715d3df" + sha256 high_sierra: "d90177e40185259de89cc259c5cfde419f65161c52571dfeccb18fe52ffeab8f" + sha256 sierra: "d0fd3808c9d7266cd16de123c0f8cc434d594b63b6e2d7d67425f155f1c9d582" + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..fc9564a040276 --- /dev/null +++ b/Formula/t/taktuk.rb @@ -0,0 +1,50 @@ +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.7.orig.tar.gz" + sha256 "56a62cca92670674c194e4b59903e379ad0b1367cec78244641aa194e9fe893e" + 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_sequoia: "0e5cd1f34fc2bc09417324bf325f1b3bfea7cc9e2b97ac622cd52fc1dceb6513" + sha256 cellar: :any, arm64_sonoma: "6516efccc7a1a557ba95ca0694659a17f1e9a2f38e4ff58ff918b34a3c80273d" + sha256 cellar: :any, arm64_ventura: "f2ee8a7c0e82af568fa8106af14fe3b9e0247cd7a6f87b4e76c3fa21880577e2" + sha256 cellar: :any, arm64_monterey: "ea5b8b832ba022f7545be2eea7ca316cd2d079263b87b0f93d669e26b06d6f3c" + sha256 cellar: :any, arm64_big_sur: "d9743ff8c715d03d4549f09850a2029c135e72859d0518d94b44b3aa51f7abf6" + sha256 cellar: :any, sonoma: "74d918b30b34330f5007dc4285b6017c0322d4a64ae15828140d80a471d9c160" + sha256 cellar: :any, ventura: "17dfde7ebadf43409f07cddc80ceaa7cb165646b9c9bfbb5137bb36b8cc28a1e" + sha256 cellar: :any, monterey: "36e40a6c21e87f656fce7ce72dbf0cc8f9aaade9986b630fa9306bd63f17544e" + sha256 cellar: :any, big_sur: "d33ad42f68016a53bbb84cfdf5704cae271041ada4b42c5b3892d30ff76e479e" + sha256 cellar: :any, catalina: "7ed3f1542b9acfc2ad2de0b9150ad4e7aa72246415be9046fe5eafaf794b478d" + sha256 cellar: :any, mojave: "6ff23461c51c77612a5c00fc4caf40d9c91aa3e7b2f409e9a86f57f27f305f01" + sha256 cellar: :any, high_sierra: "9cc466f8a75eea1974143fedecd42547eb14401d772e527776f387aec4832f77" + sha256 cellar: :any, sierra: "0ffc0bb09703bbf32afbcd302850803f94ecbb311eaa77353275e7dcb1549f62" + sha256 cellar: :any, el_capitan: "4a731d243e6915729240deb75dc99cfee513bb7d0f69169981623b14ce6601c1" + sha256 cellar: :any_skip_relocation, arm64_linux: "20bbcdc066c8754651d49a124fd7f922c782677c04a6ad6eff95caab8e25ab72" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f799a4468de4f14fdccde850591ac6c2a213725a0fb8b8e8c427d63eae27d703" + end + + uses_from_macos "perl" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + + def install + system "./configure", "--prefix=#{prefix}" + 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..f2ccff9327b4e --- /dev/null +++ b/Formula/t/tal.rb @@ -0,0 +1,55 @@ +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 + + bottle do + 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, mojave: "3e9ac201bb27300afd327dd1a24c093e602376c4a4e36af27f7d1047ffae9b5d" + sha256 cellar: :any_skip_relocation, high_sierra: "852023d9d33d893ca0852f36d795b044212e69911e2380cc4f0d22f99e22c1c2" + sha256 cellar: :any_skip_relocation, sierra: "9c2c4e5f9d6922f9a9d434485dea4ddf321744728c83adcda822c3c314f6a86e" + sha256 cellar: :any_skip_relocation, el_capitan: "bbdef6b2c92650352b7199cc2a9e3bc4698bf2a14fce46397eebcee72c1de419" + 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..da3d4b01e44b8 --- /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.24.tar.gz" + sha256 "39f34dd4a5d94188bacdea85362307217e56eceba92801dd9a534c19fed91fe8" + license "BSD-3-Clause" + head "https://github.com/budimanjojo/talhelper.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9b9cea08a4644d4b449ce379bc716285e94cd530e8ecbdda4a050ec302dd8de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e9b9cea08a4644d4b449ce379bc716285e94cd530e8ecbdda4a050ec302dd8de" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e9b9cea08a4644d4b449ce379bc716285e94cd530e8ecbdda4a050ec302dd8de" + sha256 cellar: :any_skip_relocation, sonoma: "56e5e8c9919e86dc80aabbe76b05d1e0f5eb37cd1803494b48d34ed2fc38e64c" + sha256 cellar: :any_skip_relocation, ventura: "56e5e8c9919e86dc80aabbe76b05d1e0f5eb37cd1803494b48d34ed2fc38e64c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c74f1ac69469b0474047c636ac317e314dd5ad4924bc55588622b0fad7f94cda" + 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..97791b3e4b29d --- /dev/null +++ b/Formula/t/talisman.rb @@ -0,0 +1,34 @@ +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: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + 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, 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..a863611f06deb --- /dev/null +++ b/Formula/t/talloc.rb @@ -0,0 +1,53 @@ +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_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..3526206cf9083 --- /dev/null +++ b/Formula/t/talosctl.rb @@ -0,0 +1,40 @@ +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.10.1.tar.gz" + sha256 "d7bcd4a43a01c8608468a48719cd1c2a3ea9b9e8456f637378aaa6fd79723dab" + license "MPL-2.0" + head "https://github.com/siderolabs/talos.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0fafaa85b25329bdd416b26a2b1663908eda26b2fb76b49564315223e1049421" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "586e1e8e8c4e2205c9a05705611c13712711d6c542be5ba55b871043932773eb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8c968b2a4dec4894b325aeb1c0778a1542d9f407268011a3449badff21be143f" + sha256 cellar: :any_skip_relocation, sonoma: "56266f4c294fcba15af2963f1ea7347ecf9e7273119cfa3cc101e750bde71507" + sha256 cellar: :any_skip_relocation, ventura: "611148d827fda896746b585baa2e8772232327e3f2e8b015bf2e462f8946f8d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "e1c97980d67bc558407c29f2f550c7fe2ceb22a2ea9104fcd0db678118d14817" + sha256 cellar: :any_skip_relocation, x86_64_linux: "275da0c1f4e7889211ac1257f1af77a2b64fdd6bc27baba36eecaa734dda04d6" + 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..9243a3f8eba19 --- /dev/null +++ b/Formula/t/tanka.rb @@ -0,0 +1,40 @@ +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.32.0.tar.gz" + sha256 "5d328d3a499787b1eb5d20ddbe20119048636e972db6cd75a3bb83c415f1cce3" + 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_sequoia: "68f328c212a17e0770693e85a98492e7c7bd5db2717f253addda414898213394" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "68f328c212a17e0770693e85a98492e7c7bd5db2717f253addda414898213394" + sha256 cellar: :any_skip_relocation, arm64_ventura: "68f328c212a17e0770693e85a98492e7c7bd5db2717f253addda414898213394" + sha256 cellar: :any_skip_relocation, sonoma: "699264d6515427f4c916a519a014946b2d6d8483f70a9f7c8d05a5e9b805a67b" + sha256 cellar: :any_skip_relocation, ventura: "699264d6515427f4c916a519a014946b2d6d8483f70a9f7c8d05a5e9b805a67b" + sha256 cellar: :any_skip_relocation, arm64_linux: "93a66c137ec158f06004a53ac11fc6472e637f7a31aeecf77dbee1982b1f4f4f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ab0a88919e82c9def686caac9958e5e902234cba479cc562e8fabf22397187da" + 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..b091e3ce29c8d --- /dev/null +++ b/Formula/t/taplo.rb @@ -0,0 +1,52 @@ +class Taplo < Formula + desc "TOML toolkit written in Rust" + homepage "https://taplo.tamasfe.dev/" + url "https://github.com/tamasfe/taplo/archive/refs/tags/0.9.3.tar.gz" + sha256 "65510664071252541e66f603dc9aa04016c38d62299061419c95d3bffaa73125" + 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_sequoia: "da36eb11dac5c0f350bb591c2b7ea79bdae70e404280a1264b416b68c49e9c16" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f866b21d8b368f7a9514e55c10ef5ab404a3a2ddd5acb0f49654637560cacdc4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "67ca79bc3aa55e7bf9e4b9e58ef6e60156765d9d8b02f0e289de1cf8496212ca" + sha256 cellar: :any_skip_relocation, arm64_monterey: "280ebeecf1512ff5d7fc178b4286fcf25425e63c9c43aad7504262444a897968" + sha256 cellar: :any_skip_relocation, sonoma: "9c17cc64bb627ac1c19defc9ccc611c4827b69722bd9a906373384ef66bf60ef" + sha256 cellar: :any_skip_relocation, ventura: "ccda266bc89ec48f95c5b13f03d93cd1ebd46ad9f19fbbb6a7aa997b6d217e84" + sha256 cellar: :any_skip_relocation, monterey: "ce4fb0fa18cc75c449de18061f8f1a43b89628e317e0a8df0474721b37805d0c" + sha256 cellar: :any_skip_relocation, arm64_linux: "c69561fc93613afbb76a177f8341b90cdcee125f837f4930e71e1c8f9261d3a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0be45406d8eace4a2e68edecbdc12343573bb1cc68da7caafe71c2218b38448e" + 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..1e93d9870a937 --- /dev/null +++ b/Formula/t/tarantool.rb @@ -0,0 +1,102 @@ +class Tarantool < Formula + desc "In-memory database and Lua application server" + homepage "https://tarantool.org/" + url "https://download.tarantool.org/tarantool/src/tarantool-3.4.0.tar.gz" + sha256 "3ff1e8de285943eedef6b2cd14caacb51e7998d9da2e4d75eb4d9a770b3173b4" + 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_sequoia: "73684e6d5d5a89273b6a87cf2557983a269b71e75ce60139fbb3b6a404fe88ad" + sha256 cellar: :any, arm64_sonoma: "102b5400e01ce56e4f576b7e533550d3baf17d9e338cf59658102491a925a9be" + sha256 cellar: :any, arm64_ventura: "0b87ea083232f4b91b1ea94258bb89bbb51c9b43c412a057e16d1aa915101725" + sha256 cellar: :any, sonoma: "8140e9c6b27304a62ebc8ef8abb3840c6cf7b95c50f58a7987a9debcf24d5b02" + sha256 cellar: :any, ventura: "5110a32a70c67ba1a9c50ce13bd87922bfe65c780fc92197e34b9294c39b1bf3" + sha256 cellar: :any_skip_relocation, arm64_linux: "f302f6f11b0a9ca7fee5ad2903d29e70ee806774adf0de1e4c519f9c45210bb6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2dc785b9f64d0ca6fd04c859a1235edabc33bed12e32b6940aec6b91c317312" + 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 + + # cmake 4 build patch, upstream pr ref, https://github.com/tarantool/tarantool/pull/11382 + patch do + url "https://github.com/tarantool/tarantool/commit/68d591d8eb43d0a5de35cf7492955f18598629f2.patch?full_index=1" + sha256 "7aeace515b991cf45a477e706a69b2ee5621d45a0394065bf75b92dcb1086534" + end + + def install + # cmake 4 build patch for third parties + ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + + # 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..e68bbaf782c0a --- /dev/null +++ b/Formula/t/tarlz.rb @@ -0,0 +1,50 @@ +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.27.1.tar.lz" + mirror "https://download-mirror.savannah.gnu.org/releases/lzip/tarlz/tarlz-0.27.1.tar.lz" + sha256 "7091968e8f9b5333730e7a558ebf5aa9089d9f0528e6aea994c6f24a9d46a03f" + 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_sequoia: "af4911dacbbfaebef7ee440b13fb73f79150ee27cc267ea58b73b5fe7e2ffd61" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "361d64c7b4444195ab44b2f8b3162a549eb40d69a960a5e7881d9282b0484e51" + sha256 cellar: :any_skip_relocation, arm64_ventura: "af36ca5f1dbfa2b8b625cb584ff30a8094735383c604b32c9afb3d4b074b75e3" + sha256 cellar: :any_skip_relocation, sonoma: "f707b108966d4e44a95c02fc0cf57627961bb6effa9e0f5c71c157cfdf96cc0c" + sha256 cellar: :any_skip_relocation, ventura: "c0facb62b58f1da43b275032ab7ead7e2ac2c6210590ea46185a00f14c977331" + sha256 cellar: :any_skip_relocation, arm64_linux: "adb3e6380916c128b56719a3edefa725ab0bca627b7df0db6312ce2ab2f4146e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bda3fb03bac16c1a239cf2c2dc9328d7b05035d494641305fb49ef8e8a31dd5a" + 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..eeef90dd411d4 --- /dev/null +++ b/Formula/t/tarsnap-gui.rb @@ -0,0 +1,64 @@ +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" + + bottle do + rebuild 1 + 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, x86_64_linux: "97b8a8c25cd8383218b698725c2a88cbdb55f161188de94df95406514573d34c" + end + + 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..492f04f035dac --- /dev/null +++ b/Formula/t/tarsnap.rb @@ -0,0 +1,56 @@ +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_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..91d03b7a1309f --- /dev/null +++ b/Formula/t/tarsnapper.rb @@ -0,0 +1,64 @@ +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 7 + sha256 cellar: :any, arm64_sequoia: "a3f3c24d9015ea8c6e555746211e7af56deb8ce020c047776cd06166f70c77d2" + sha256 cellar: :any, arm64_sonoma: "feef9a3a01ccc2d8f7e5c7ed0ae91a68c60e0d23e0a80c79a92cd52898e7cb33" + sha256 cellar: :any, arm64_ventura: "4e2dabbd85a18274fc49ff1fbb31c21c6f4e020d796d0630a67d3a404774a715" + sha256 cellar: :any, sonoma: "553bf81ba1e5331ec8dbc1c0d26bfcc023882d7c71e9815b513623ac330ffece" + sha256 cellar: :any, ventura: "cf90d02ba37a6bd37df704e14912f700cdd9d2e5c5c107979240bf2a46c8c791" + sha256 cellar: :any_skip_relocation, arm64_linux: "ddd8e4ed77a1a8d407b5f16e35f8701926d07cbe8d25e26333698ae15e536800" + sha256 cellar: :any_skip_relocation, x86_64_linux: "53e2d180f17f2f51cfd069e23eed736bd4ddbc71e930b83e66b2d6c1efb66456" + end + + depends_on "libyaml" + depends_on "python@3.13" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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..19ea439d30d05 --- /dev/null +++ b/Formula/t/tart.rb @@ -0,0 +1,49 @@ +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" + 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..480829e209a48 --- /dev/null +++ b/Formula/t/tartufo.rb @@ -0,0 +1,63 @@ +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 1 + sha256 cellar: :any_skip_relocation, all: "05cc94b2f9e74a5ac241b68a8ab028d5c66a4f7bd346e104ecc100e183cf04f7" + end + + depends_on "pygit2" + depends_on "python@3.13" + + uses_from_macos "libffi" + + 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/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/19/0d/bbb5b5ee188dec84647a4664f3e11b06ade2bde568dbd489d9d64adef8ed/gitdb-4.0.11.tar.gz" + sha256 "bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/b6/a1/106fd9fa2dd989b6fb36e5893961f82992cf676381707253e0bf93eb1662/GitPython-3.1.43.tar.gz" + sha256 "35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/88/04/b5bf6d21dc4041000ccba7eb17dd3055feb237e7ffc2c20d3fae3af62baa/smmap-5.0.1.tar.gz" + sha256 "dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62" + end + + resource "tomlkit" do + url "https://files.pythonhosted.org/packages/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"tartufo", shells: [:fish, :zsh], 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..056f2ab05b53e --- /dev/null +++ b/Formula/t/task-spooler.rb @@ -0,0 +1,34 @@ +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 + + bottle do + 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..67d502668753d --- /dev/null +++ b/Formula/t/task.rb @@ -0,0 +1,50 @@ +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.1/task-3.4.1.tar.gz" + sha256 "23eb60f73e42f16111cc3912b44ee12be6768860a2db2a9c6a47f8ac4786bac3" + 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_sequoia: "e9f5596f4410829165b5884d30c10c784ba5e096ca118ec9739119b678d6ec10" + sha256 arm64_sonoma: "0148f717868777b7ebc63d40e8800a38042a12a1717c8cfa22c8e74e47c6a9ef" + sha256 arm64_ventura: "a6c60113d44922bdba309d58bb265ad1cec5109d1b5ab3b4f43e69f952464397" + sha256 sonoma: "2f4aafa45935096b86b0e83ca5734fd0014583db767868dae81c436ddec82b0c" + sha256 ventura: "7a9f8b67f6ed92259cd1ba03dc22c1954bf96ec684bebbc76d2fd060392621bc" + sha256 arm64_linux: "960048db5e01d5af8b047ec4172614a7bbf410b02bca9f96874d540b88fbae90" + sha256 cellar: :any_skip_relocation, x86_64_linux: "03fbb2a6f7dc6876e237cd114f2fc6cbd854fdd238d194e932a6cc8f50e1c9e3" + end + + depends_on "cmake" => :build + depends_on "corrosion" => :build + depends_on "rust" => :build + + on_linux do + depends_on "linux-headers@5.15" => :build + depends_on "readline" + depends_on "util-linux" + end + + conflicts_with "go-task", because: "both install `task` binaries" + + 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" + 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..89c689bd6a64e --- /dev/null +++ b/Formula/t/task@2.rb @@ -0,0 +1,53 @@ +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" + + livecheck do + url :stable + regex(/^v?(2\.\d+\.\d+)$/i) + end + + 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..923d5d4c87568 --- /dev/null +++ b/Formula/t/taskd.rb @@ -0,0 +1,41 @@ +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 + + 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..36c72d2e48a6a --- /dev/null +++ b/Formula/t/taskell.rb @@ -0,0 +1,62 @@ +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, mojave: "df124ebb5b47ddd293c637ea656c27484c484d43984be3f3c940f50b6330b161" + 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..e3ad8697e8ff2 --- /dev/null +++ b/Formula/t/taskflow.rb @@ -0,0 +1,39 @@ +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" + + 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/taskopen.rb b/Formula/t/taskopen.rb new file mode 100644 index 0000000000000..860b503e8bbd5 --- /dev/null +++ b/Formula/t/taskopen.rb @@ -0,0 +1,39 @@ +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_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..3dd4d7423d141 --- /dev/null +++ b/Formula/t/tasksh.rb @@ -0,0 +1,51 @@ +class Tasksh < Formula + desc "Shell wrapper for Taskwarrior commands" + homepage "https://gothenburgbitfactory.org/projects/tasksh.html" + 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 + + bottle do + rebuild 1 + 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, mojave: "a2178acd290abac6dc8c024b48304c05660616639c7de1c7b35eb166ae8345dc" + 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 + system "cmake", "-S", ".", "-B", "build", *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..1d1f85f444d34 --- /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.3.tar.gz" + sha256 "76f053e2e3c9e71b8106e3fc3c18fd4400a98c09a8cde5972305e0eeaecc08d3" + license "MIT" + head "https://github.com/kdheepak/taskwarrior-tui.git", branch: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7008f3327bebcfdae93a957ccad18327bb0b54fa10071fe7132af4d024d1f5bc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2f2155bbc016b0505c664d7725748fc8b4edf6fc0512a8a1b4aae89b9b152519" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dc2f0b120a04e533106d02ed25211ab53f16fd341b69697e21b5b9b814c92ccd" + sha256 cellar: :any_skip_relocation, sonoma: "77e6f2f4aa47b69eaca19366e84b61cc3cdd19bcab973ecbab047f07bf023d09" + sha256 cellar: :any_skip_relocation, ventura: "2706cbc52b513a724f58161361486e606acfa7bc52ebb0e9ef1ca9d5b659fcaf" + sha256 cellar: :any_skip_relocation, arm64_linux: "67f7e7514a637880f4eca626c1187bc482f871ff107f7554e04198a6d7b2fbc4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eac66f9b80b3d5fe8ebfbe7ff240f393c4ed76a088cd9e4ec404749e4e1b1b2a" + 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..c2269e8052db2 --- /dev/null +++ b/Formula/t/tass64.rb @@ -0,0 +1,46 @@ +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"] + + bottle do + 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/tbb.rb b/Formula/t/tbb.rb new file mode 100644 index 0000000000000..20168da0da29b --- /dev/null +++ b/Formula/t/tbb.rb @@ -0,0 +1,112 @@ +class Tbb < Formula + desc "Rich and complete approach to parallelism in C++" + homepage "https://uxlfoundation.github.io/oneTBB/" + url "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2022.1.0.tar.gz" + sha256 "ed067603ece0dc832d2881ba5c516625ac2522c665d95f767ef6304e34f961b5" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "3a7c5bc69ec18b7030205d3d34840503236bf11304416921333f1693afcd2fb5" + sha256 cellar: :any, arm64_sonoma: "33633a5f41aa7b2055c93f81bddb2d9990373d6570070a417f4207df6ce8f90d" + sha256 cellar: :any, arm64_ventura: "d1af11b60a2384f5e639db112720e746328be29edc5352ea88af2a9a656a6375" + sha256 cellar: :any, sonoma: "b06470b378757cbd5cbd2dac644fa76530cc3ce8b3d654ebe4e3421af2f11b31" + sha256 cellar: :any, ventura: "ac4157a71051363b78bf8c4b2d74c6c2bef8d74bdba746cf65ca2d5d72014a6c" + sha256 cellar: :any_skip_relocation, arm64_linux: "86f0fca0478acf266d4e872e8398411d19fd188a812e983bdfed98a4e32fbead" + sha256 cellar: :any_skip_relocation, x86_64_linux: "15328519ddb636dbafd9d83cea34d44a8275847094c4627878c37315962cca15" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python-setuptools" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "swig" => :build + depends_on "hwloc" + + def python3 + "python3.13" + 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..cdb7868218e1e --- /dev/null +++ b/Formula/t/tbls.rb @@ -0,0 +1,37 @@ +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.85.2.tar.gz" + sha256 "74ad380e107f6c7999834ea041b2626030e5d482274816400d48ab5a489de709" + license "MIT" + head "https://github.com/k1LoW/tbls.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "821798f211971f15433e79224c7015179596bfb5415344f392c48138e6d0ea87" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2a8f3f910e96579129acd272c0cd562d14357c544edb3e71fb915d12487b38b9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9984c4049e0cd5416f31f5b940af9399e0d0bf1377ba976915e285ee91bcccf3" + sha256 cellar: :any_skip_relocation, sonoma: "eb3e3e2f34f30565dc02f1ec3e5631005d4a5ef48ea2e795cd84ddca103a91d7" + sha256 cellar: :any_skip_relocation, ventura: "09afac0e48f184ced4ea5beffe8944538803264f823871eb07d5e74cd60f30be" + sha256 cellar: :any_skip_relocation, arm64_linux: "ada59ae79d2b42d0d0e24612adfaaf5541b093b95406800c95401ccfbbb747f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5de3a57b627a9efb09c2afffb773d4de9dd19abf0aa4f0e02ed588e7da848627" + 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..dacf96ac93383 --- /dev/null +++ b/Formula/t/tbox.rb @@ -0,0 +1,43 @@ +class Tbox < Formula + desc "Glib-like multi-platform C library" + homepage "https://docs.tboox.org/" + url "https://github.com/tboox/tbox/archive/refs/tags/v1.7.6.tar.gz" + sha256 "2622de5473b8f2e94b800b86ff6ef4a535bc138c61c940c3ab84737bb94a126a" + license "Apache-2.0" + head "https://github.com/tboox/tbox.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c7947e45eec0391b3732ef28f7ef9fb0649eccee820613ed780cce5c80101a27" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6916f2df0cd8419ce91cabc711cdd273d2dde6efbc6ed3b9ca9e71c7d0eae20f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dcdc2a92ff3cb0f2c8e4a05285f959fda6398b1862f5ec53114428dd13582560" + sha256 cellar: :any_skip_relocation, sonoma: "70c1474ce62ec18b5a1b74e11a4ba24a4297231a6a142122880fcf30a331610e" + sha256 cellar: :any_skip_relocation, ventura: "c88d154bbacefc84abe1e820ef715776da57469d8fd4016c25ef3c71ec17a129" + sha256 cellar: :any_skip_relocation, arm64_linux: "06c79b38e83a3d7de103970975a89c6cc457180876338027035a55e2b599b598" + sha256 cellar: :any_skip_relocation, x86_64_linux: "42f219b5aba807212ce3b30463312c73d287031ce5f064e5f0b5f2006752cd2e" + 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..e3e5e7878e5b7 --- /dev/null +++ b/Formula/t/tcc.rb @@ -0,0 +1,68 @@ +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 + + bottle do + sha256 catalina: "68930891a8746b34b372ecfe43a6a042d0097414713c831353a095135d7b9569" + sha256 mojave: "ca8cd4827e72201cd5f368b5b74b9dead8554e0188b7ea63f81926d775d704e9" + sha256 high_sierra: "1ad7de1b974ca3e16668dec9cbef2accb29ecedb8f3f5819c06a2f77c8f3f2d1" + sha256 sierra: "c2949f3a99d1efb600137e4bb617ebd8a385697038f9cb8136c681033a7a636e" + sha256 x86_64_linux: "053f79a5752554e18ecba168184e48481bce8a2db418a3f9b0de094f9e6d0e4d" + end + + 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..4c2b0fa98a914 --- /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.0.tar.gz" + sha256 "2f5b27f689cfb7d4799cae7ea9a22a5b016f877130b6ac91d7bf2437fa908787" + 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: "014d61434aefe7283670caf2fa046c141eb8c49f9c867e5e6bc9c1677da475e0" + end + + depends_on :macos + depends_on "python@3.13" + + resource "packaging" do + url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + end + + def python3 + which("python3.13") + 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..244f7d9b90431 --- /dev/null +++ b/Formula/t/tcl-tk.rb @@ -0,0 +1,215 @@ +class TclTk < Formula + desc "Tool Command Language" + homepage "https://www.tcl-lang.org/" + url "https://downloads.sourceforge.net/project/tcl/Tcl/9.0.1/tcl9.0.1-src.tar.gz" + mirror "https://fossies.org/linux/misc/tcl9.0.1-src.tar.gz" + sha256 "a72b1607d7a399c75148c80fcdead88ed3371a29884181f200f2200cdee33bbc" + license "TCL" + + livecheck do + url :stable + regex(%r{url=.*?/(?:tcl|tk).?v?(\d+(?:\.\d+)+)[._-]src\.t}i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "27a8119fce7719c02f27d222be7f2e5adf63537e7e9bc3e618223ddb448853f1" + sha256 arm64_sonoma: "0eadc0b7ad6ab03af3a75dfc9ce03a405bbb9c3650aed4052b9bc63aeb216239" + sha256 arm64_ventura: "ea408af959f92adf2e3bc27441d98528607103a7036c82f56dbc4be7f513501d" + sha256 sonoma: "adee2c3cadbd8155d71df9aff8d58c092f5a79895a7452340096d700fc3b26b3" + sha256 ventura: "9a562a67f6b533ad35b267cc22b8299ecd869ab1089a2cd19d410e36f30a6c1f" + sha256 arm64_linux: "c976c0e88e55f285d4c2d809c90ef212c8c4bdba6577b474fd46bba6172f3777" + sha256 x86_64_linux: "f398e29b8ea4cf463eb0c4904e3ef59d70e848089fbd2c9af0c8e753456a307a" + 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 so using latest + # check-in at https://core.tcl-lang.org/tcltls/timeline + # 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://core.tcl-lang.org/tcltls/tarball/e03e54ee87/tcltls-e03e54ee87.tar.gz" + sha256 "db473afa98924c0a2b44ecacea35bb2609e6810de1df389ad55bb3688023f8d1" + end + + resource "tk" do + url "https://downloads.sourceforge.net/project/tcl/Tcl/9.0.1/tk9.0.1-src.tar.gz" + mirror "https://fossies.org/linux/misc/tk9.0.1-src.tar.gz" + sha256 "d6f01a4d598bfc6398be9584e1bab828c907b0758db4bbb351a1429106aec527" + + 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}", + "--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..a55d6cb850f32 --- /dev/null +++ b/Formula/t/tcl-tk@8.rb @@ -0,0 +1,193 @@ +class TclTkAT8 < Formula + desc "Tool Command Language" + homepage "https://www.tcl-lang.org/" + url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.16/tcl8.6.16-src.tar.gz" + sha256 "91cb8fa61771c63c262efb553059b7c7ad6757afa5857af6265e4b0bdc2a14a5" + license "TCL" + + livecheck do + url :stable + regex(%r{url=.*?/(?:tcl|tk).?v?(8(?:\.\d+)+)[._-]src\.t}i) + end + + bottle do + sha256 arm64_sequoia: "f2bc0545e0e48b4029c35281527224d2dd12deead360a6a982c77e82986c9bfd" + sha256 arm64_sonoma: "f3f32a9ace4e639678829daae9c7d8ced421144db16d944438ff5a2285d99e7f" + sha256 arm64_ventura: "72de6c290a2095906aea8dc034af2b81f88c5efc162adf642c90486c74ef0ab5" + sha256 sonoma: "2d568cf0322e7bd4151c7bc1fd714c017a8c037fb238ea0d2f9aed7ac8cb22dd" + sha256 ventura: "5cd357c52827c17fc0c648f7134f4cf0bb11f3621a65f2b2a58f2ddd86db2c62" + sha256 arm64_linux: "c7af04cbdb5930ea4c7cfdc132f007f1d50e321f11e755226ce72cda01e0cb71" + sha256 x86_64_linux: "1208ceb8fe4df5fde9596567c11a8f2e956dacec3af26f6148eee9f6a93d7294" + 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.16/tk8.6.16-src.tar.gz" + sha256 "be9f94d3575d4b3099d84bc3c10de8994df2d7aa405208173c709cc404a7e5fe" + + 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..193eb3bfaa43b --- /dev/null +++ b/Formula/t/tclap.rb @@ -0,0 +1,25 @@ +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 + + 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..c51a50dab6f87 --- /dev/null +++ b/Formula/t/tcpdump.rb @@ -0,0 +1,52 @@ +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_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..8c05246d8dcca --- /dev/null +++ b/Formula/t/tcpflow.rb @@ -0,0 +1,57 @@ +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://corp.digitalcorpora.org/downloads/tcpflow/" + regex(/href=.*?tcpflow[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 2 + 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..fc3a69619d96a --- /dev/null +++ b/Formula/t/tcping.rb @@ -0,0 +1,36 @@ +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 + + bottle do + 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..a96cb668d56d0 --- /dev/null +++ b/Formula/t/tcpkali.rb @@ -0,0 +1,47 @@ +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_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, mojave: "3e9bbcb12b289d1dff3c2355664208ee0a65cea032ebe1dc0d6d1346f67c1a2f" + sha256 cellar: :any_skip_relocation, high_sierra: "b82b2ea3a3d17d3fd464a5e887c9cce14dce8a82bbcb350df5f7bd321893bfdb" + sha256 cellar: :any_skip_relocation, sierra: "f73513ed96b6436085e0941865f0cc4fd2ce1009a1d8770c740e8e97d5173cf1" + sha256 cellar: :any_skip_relocation, el_capitan: "2d0075b2fca885fb694660a3914362030be255c8e3dfed407bb8ca96c996bbf7" + 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..f9a076ddaac77 --- /dev/null +++ b/Formula/t/tcpreplay.rb @@ -0,0 +1,53 @@ +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.1/tcpreplay-4.5.1.tar.gz" + sha256 "2de79bfd67ec92ca9ae2ffb50456dd1d53ff40f3fa71b422c65e8062013c9e85" + license all_of: ["BSD-2-Clause", "BSD-3-Clause", "BSD-4-Clause", "GPL-3.0-or-later", "ISC"] + + bottle do + sha256 cellar: :any, arm64_sequoia: "bcccd1cdd60de8e54a46850f8fb3404cdc94983c6b8239da2268fac5b2fe5516" + sha256 cellar: :any, arm64_sonoma: "53cefd654ed79a5dd9783f598d97877ddf748251ec6e10c96a15ac8c74cd2166" + sha256 cellar: :any, arm64_ventura: "6ba083d208f7da09c4b24635bad3fcbecae67f95ac016bdcd6d08880ad1b5c89" + sha256 cellar: :any, arm64_monterey: "9bcef2805cf1df5fb206f40e3f6094bb21766738c3f7c84338693b33e99fa64f" + sha256 cellar: :any, sonoma: "5d4306409a7a2ab05625d584a7ead36034ab5643cc07534abbda61c53277075e" + sha256 cellar: :any, ventura: "c5c5eb557b954ac8ba90b74c8be124e3dc8b8da5ce4b4e50958248663797ad04" + sha256 cellar: :any, monterey: "f1477033f2820e1cde521bf37693a2171ffd9466ad9daa99cb583e30ba3e6999" + sha256 cellar: :any_skip_relocation, arm64_linux: "c48be7412a372a52364ba3f23b8e714f1c5946e6c82b99d3e8370cc758bed039" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8f67650d054f423e98ef5804aa5e9401ca0895a84e8d0552d97b2e182372b8eb" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libdnet" + + uses_from_macos "libpcap" + + 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 diff --git a/Formula/t/tcpsplit.rb b/Formula/t/tcpsplit.rb new file mode 100644 index 0000000000000..71532aed9032c --- /dev/null +++ b/Formula/t/tcpsplit.rb @@ -0,0 +1,34 @@ +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_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..3df4cdec690be --- /dev/null +++ b/Formula/t/tcpstat.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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, mojave: "805b8444d7bcf36e2da7285474b20f5193f8e104fd990e9f87fa922bdb13801d" + sha256 cellar: :any_skip_relocation, high_sierra: "164e0b5ef61bb28432b7a3d5aa23ca78d291130aa9473b9019dce643ac93bc03" + sha256 cellar: :any_skip_relocation, sierra: "378e42522ee14d64c0f5bf9bceeb0100c9193210eea2ee2ff80433b2b3da0166" + sha256 cellar: :any_skip_relocation, el_capitan: "e483bf39d0e42a8124c3e2e50f117e66b285bada33df94c1b070460c6df622ea" + 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..737fee753baf6 --- /dev/null +++ b/Formula/t/tcptrace.rb @@ -0,0 +1,67 @@ +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, mojave: "b927868b2addc93b296fb8f31b08147014e9a81a356d4f18b0d4134db40081de" + sha256 cellar: :any_skip_relocation, high_sierra: "39916506fcd6385aee6375813128a126a84f947623594011f6c2c9df1b6dc8b2" + sha256 cellar: :any_skip_relocation, sierra: "7ccc5e6859be970a5a8a064630704111d37b03a7e3cf3a9874e16a60e4abe02b" + sha256 cellar: :any_skip_relocation, el_capitan: "e46775d7cc808b5b52a0a36a33142b824a9b2d8bce5b0557bc1041c2e55c5ffb" + 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..0f6202770ed0a --- /dev/null +++ b/Formula/t/tcptraceroute.rb @@ -0,0 +1,69 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "99c51ddf23c5a4c9ac6d853c39a03513b340e60aa2d57211a46ea58bbad7290d" + 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..b7792e68457b3 --- /dev/null +++ b/Formula/t/tcptunnel.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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, mojave: "4084370b62478a4a3bc1943035542dd9b4d452b606ae9bf738bbc4fa53e19fd5" + sha256 cellar: :any_skip_relocation, high_sierra: "b70d7f63371b5a638fa4d2f0e1cc3f27995f3f20ca1aa1712bb711bb6c9b928c" + sha256 cellar: :any_skip_relocation, sierra: "8243b6410ae3d61df3d9c400be33c24b8da0fd0807161a02f38440c18d984661" + sha256 cellar: :any_skip_relocation, el_capitan: "e387a861c4a9ceb3014883c851cdc43a56eddba635e1d313d976095ff78bb686" + 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..2a434e5dd34c1 --- /dev/null +++ b/Formula/t/tcsh.rb @@ -0,0 +1,43 @@ +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.15.tar.gz" + mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/tcsh/tcsh-6.24.15.tar.gz" + sha256 "d4d0b2a4df320f57a518e44c359ef36bbcf85d64f5146d0cb8ff34984e0d23fd" + 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_sequoia: "2cbe0bdd46defee1ad3ff4c5e8d3088e1d774d82d9f789f6d8e9f71541e1a325" + sha256 arm64_sonoma: "2bd1839f9539304030031297aea14002847bac05fbfdd6b40daba0e046da9011" + sha256 arm64_ventura: "c616a15a27d0a6405039006e645b602a146c5dfba372e8e586de3352e5668d36" + sha256 sonoma: "ddd888de4c89d208ab867ce6ccb3a190aa1ace13bfd678b93eeefe1858ab6206" + sha256 ventura: "f4434873a4a37fbe06aa64e90512021171b9a6728b1411cbe0f0b5f9e2f7d6bb" + sha256 arm64_linux: "260453a0e766152ddc609767d7d12328a6b76b9b25d5f54532b2140d70716535" + sha256 x86_64_linux: "3b1b397961ac020ec12a78df1b9c4401f1f8ca16cfcb59cc6d99c51c475c0c61" + 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..117bcddbae844 --- /dev/null +++ b/Formula/t/tctl.rb @@ -0,0 +1,39 @@ +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_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, 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..bd70115473f14 --- /dev/null +++ b/Formula/t/td.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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, mojave: "af978b05395618b4e095498b3a9a4aa66086f8bc793804fb59086177535c8565" + 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..d539d98c792c2 --- /dev/null +++ b/Formula/t/tdb.rb @@ -0,0 +1,44 @@ +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.13.tar.gz" + sha256 "5ee276e7644d713e19e4b6adc00b440afb5851ff21e65821ffaed89e15a5e167" + 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_sequoia: "1bd7cd583b2c42a4f0e634859622b0cac4a48f35410650bf0573b74afff49e20" + sha256 cellar: :any, arm64_sonoma: "fea78e4678ef0a6f84e3a6cd57713f150f01e73bf81609f54102ef0ada8467ae" + sha256 cellar: :any, arm64_ventura: "f77f95a5940ca7a4a40ef08d6611239c5885426311e4f0b3c321a6429d6891a7" + sha256 cellar: :any, sonoma: "4152b5bb64a94971afa35b8e7c17ea6d3dba0efafe2031617f53765cd158dc0f" + sha256 cellar: :any, ventura: "c9e83486f202b33c0dd32f8debba7b8562374766c2488b630d55d7da8df3dc07" + sha256 cellar: :any_skip_relocation, arm64_linux: "391ffd0d0824c218c0f175f53511aedd0520d5e5031c971a5a6d096efdf482fd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "62725a4b2245ffdeb4792e1032e09f2ec24824b70363c2ca50c6f024a3f4acf0" + 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/tdlib.rb b/Formula/t/tdlib.rb new file mode 100644 index 0000000000000..ed9410976ce6e --- /dev/null +++ b/Formula/t/tdlib.rb @@ -0,0 +1,53 @@ +class Tdlib < Formula + desc "Cross-platform library for building Telegram clients" + homepage "https://core.telegram.org/tdlib" + 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" + + bottle do + rebuild 1 + 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 + system "cmake", "-S", ".", "-B", "build", *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..7472d1714b859 --- /dev/null +++ b/Formula/t/tdom.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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..7a0f212d0383e --- /dev/null +++ b/Formula/t/tea.rb @@ -0,0 +1,46 @@ +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.9.2.tar.gz" + sha256 "b5a944de8db7d5af4aa87e9640261c925f094d2b6d26c4faf2701773acab219b" + license "MIT" + head "https://gitea.com/gitea/tea.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8c12a9d559cd244dbae08c5576befbeb130106654a28840949dec0ae5eb078a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3c846ba5d6f06a8023e00fb1660ab42fe5b5721bec548d4ad8d081f1f1162808" + sha256 cellar: :any_skip_relocation, arm64_ventura: "101a036947f27a6850e4356266d655f3a9eca0e4ddf945d03a0e87edd44c77b5" + sha256 cellar: :any_skip_relocation, arm64_monterey: "fa5154683b587810feeff9fb1610addacb6f767458615b16cdf7f2716b8f8bc7" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "836a04b635e7169f1f65c915e42be219955ad8f2ae9ee277d8d4aa385146c7e5" + sha256 cellar: :any_skip_relocation, sonoma: "56633d78a45649bd716f7f555c861d9bbe2778888d0cd8f97008036e127975f1" + sha256 cellar: :any_skip_relocation, ventura: "8cbab052ee3eb98001849dafd4a7e2eb61825e136fd329959d676dff58dc86b0" + sha256 cellar: :any_skip_relocation, monterey: "dcba430684c199e5c6a59598d575162b349a554fb228ef6b0f021ddfaf48b527" + sha256 cellar: :any_skip_relocation, big_sur: "5f5ff51cd8dc6135d4a19f48773e6787721ff23c8a659e4c6b9b3cc64f35b1f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bb9706843d0c5da833fd35d91ba80f3b706172947e7fc4c30274b9a48d77bd6f" + end + + depends_on "go" => :build + + def install + system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}") + bash_completion.install "contrib/autocomplete.sh" => "tea" + zsh_completion.install "contrib/autocomplete.zsh" => "_tea" + + system bin/"tea", "shellcompletion", "fish" + + if OS.mac? + fish_completion.install "#{Dir.home}/Library/Application Support/fish/conf.d/tea_completion.fish" => "tea.fish" + else + fish_completion.install "#{Dir.home}/.config/fish/conf.d/tea_completion.fish" => "tea.fish" + end + 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..0b460566ef1f2 --- /dev/null +++ b/Formula/t/tealdeer.rb @@ -0,0 +1,34 @@ +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.7.2.tar.gz" + sha256 "d0675b9aa48c00e78abafc318b9bfbcb7ea3cce63e58a42c1f9e2395abcfe0e8" + 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_sequoia: "762b6cf9ec14e22cdd155410a249c1d1c06132350e3574c9c372a88860249833" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2fa102755f201bb1a209fc9006b2106d0a31a09a83648772d78ce30e81060886" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c60761d865a1475a4b04d2881eaec1737c43caaa5498ce0769098071ddc44cd0" + sha256 cellar: :any_skip_relocation, sonoma: "0af151c2275b86b52ae1c2a38c5705e27524222f7bd23ae79b5092fe348d1100" + sha256 cellar: :any_skip_relocation, ventura: "858b2bb36dee9c444b211d2c74cb1b2c85d36362683c568d4e93591095ffaccc" + sha256 cellar: :any_skip_relocation, arm64_linux: "735bbc2c297439c49cd7331a4729cc93803fc62f20007d6365e73cba2e63e296" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c0a019576229e3bf8767b4f8fe4aeb32aa7e6f05f5d2ed303be22263e78481fc" + 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/technitium-dns.rb b/Formula/t/technitium-dns.rb new file mode 100644 index 0000000000000..216863ddabb97 --- /dev/null +++ b/Formula/t/technitium-dns.rb @@ -0,0 +1,79 @@ +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" + + bottle do + 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..ec55be91b732b --- /dev/null +++ b/Formula/t/technitium-library.rb @@ -0,0 +1,83 @@ +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" + + bottle do + 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..954ec33635173 --- /dev/null +++ b/Formula/t/tectonic.rb @@ -0,0 +1,82 @@ +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_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 + if OS.mac? + ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version.to_s # needed for CLT-only builds + ENV.delete("HOMEBREW_SDKROOT") if MacOS.version == :high_sierra + end + + # 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..3e73bd4a4ee2a --- /dev/null +++ b/Formula/t/teem.rb @@ -0,0 +1,50 @@ +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" + + bottle do + 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 mojave: "439d02dd7f54d7f307b5984d00448a4e77309660e8f1c52e998ef9ea40fdcaa1" + sha256 high_sierra: "4cb2692b42e79880161879605c3990cd5d0c4fbb171c7ccd003bb9d6bb0fee09" + sha256 sierra: "31d19cd9e0e4c064fb743c41a286736503e61b1d5e4b81f29140fcebf2cde2c8" + sha256 el_capitan: "5ade8dc18d0c66ac154d802df6c64e88222781b6fc427a841fb1f4047f8c4e49" + 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" + + 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", "-S", ".", "-B", "build", *std_cmake_args, + "-DBUILD_SHARED_LIBS:BOOL=ON", + "-DTeem_USE_LIB_INSTALL_SUBDIR:BOOL=ON" + 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 diff --git a/Formula/t/teensy_loader_cli.rb b/Formula/t/teensy_loader_cli.rb new file mode 100644 index 0000000000000..154309e682c8a --- /dev/null +++ b/Formula/t/teensy_loader_cli.rb @@ -0,0 +1,44 @@ +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_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..3d872bbc49df0 --- /dev/null +++ b/Formula/t/teip.rb @@ -0,0 +1,50 @@ +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_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..5ca059e788a1d --- /dev/null +++ b/Formula/t/tektoncd-cli.rb @@ -0,0 +1,36 @@ +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.40.0.tar.gz" + sha256 "682f56835596b0d55c72bf1e393ea5b9a16d338b40799a546a908b794615901f" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f007aff9cfb81337f1017cb9648a9bf494ce329a8e6240d32d424ac0c23fea55" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2916dedf40f334b4aeabc62c417167b4b6223e1df2cea55f31650b8684806f3b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d3c8a69268bb37ec5beb0716e7cee2a3c3dff358ef2583b2c35e0bd65c4a37df" + sha256 cellar: :any_skip_relocation, sonoma: "5d70361c241a222d0f109c16d1eb2a6c9815105a18811434971f3024f099e8c2" + sha256 cellar: :any_skip_relocation, ventura: "7bdd8d402587a5c373f7f59ef5a14384e3b58fa8fa875c810e4186464909c3a5" + sha256 cellar: :any_skip_relocation, arm64_linux: "b91cbfdce7d57cac87b37af5fdce93acba738a2c8a9d5ded7773500b7723868f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "794a9bf68544c01e3bf6d55b24146dd5751c739af235318de23408dc85c5e327" + 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..86037383c592a --- /dev/null +++ b/Formula/t/teku.rb @@ -0,0 +1,51 @@ +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.4.1", + revision: "5a695c7c86ea4458c2ab04354f8d549f3e6af0c1" + license "Apache-2.0" + head "https://github.com/ConsenSys/teku.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "869646b70a464b507916c4fed40bc255799a9df2e86312bce6917628edc5a33e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "869646b70a464b507916c4fed40bc255799a9df2e86312bce6917628edc5a33e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "869646b70a464b507916c4fed40bc255799a9df2e86312bce6917628edc5a33e" + sha256 cellar: :any_skip_relocation, sonoma: "d7062ff7204abf0335c86adb828a9788ecd8aa045d539bea5b3aef9f9ff507a6" + sha256 cellar: :any_skip_relocation, ventura: "d7062ff7204abf0335c86adb828a9788ecd8aa045d539bea5b3aef9f9ff507a6" + sha256 cellar: :any_skip_relocation, arm64_linux: "869646b70a464b507916c4fed40bc255799a9df2e86312bce6917628edc5a33e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "869646b70a464b507916c4fed40bc255799a9df2e86312bce6917628edc5a33e" + end + + depends_on "gradle" => :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..017b034e07527 --- /dev/null +++ b/Formula/t/telegraf.rb @@ -0,0 +1,50 @@ +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.34.3.tar.gz" + sha256 "0ba7a93a4c4a7b0b854c57edc342c5eae7791851af0f2c23fa2b0cde64016155" + 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_sequoia: "1f95e397e2f84dd4c2d4ce773f353b5867f67bdec747786186e87e94b7f2ed32" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ae9179f26f7e9103d6b76d0ea67fb7ff66c10365e87a7a93d2dcc446ee7855c7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b507f2d47b113d0c777274403c3d4d56ed10cf4079693268057611a7775babf3" + sha256 cellar: :any_skip_relocation, sonoma: "e7aab598e9afc2658031fde0c6ff7b23141753472a3e16825a84433b144a0115" + sha256 cellar: :any_skip_relocation, ventura: "28bafba30d69ee9319b099b59a5d6d99238ef25719f2ee0dc47590321d517dde" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a382800f5c04a6e286744c7dae3bb41514f9ee283103bbf6f4f21a3ec53be13b" + 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" + (etc/"telegraf.conf").write Utils.safe_popen_read(bin/"telegraf", "config") + end + + def post_install + # 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" + 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..3930bee74b873 --- /dev/null +++ b/Formula/t/telegram-downloader.rb @@ -0,0 +1,37 @@ +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.18.5.tar.gz" + sha256 "955f886ff980072d8ebe0a8c1d25bd67617cd9cacb0dfda84d28705132d2d72e" + license "AGPL-3.0-only" + head "https://github.com/iyear/tdl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "99d307605dc690de7501f0bafafc35731bb575a3c21b92e786fbd66aab3ebb2c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fbb286bc65050ea2f360cc19265521fb44282a47371b5522946b56eecdf99aa7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2c2a97506b4f0baf360dc45728ad61fb1cf2a51182a221d2b48d1aa1084a87a0" + sha256 cellar: :any_skip_relocation, sonoma: "2ee3c679c58716ba86d10ac5d45948c37c377add0e4a8afdffb48365ddba1d7e" + sha256 cellar: :any_skip_relocation, ventura: "72b0a5fa4b5561ec7012283ba4940d3984c022947499596c5126b664d2a13fd7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04b258450e657a0bfacf8e8bdc455650d1843881fd07d5445c6f787d34e849f3" + 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..22568ae6cc531 --- /dev/null +++ b/Formula/t/teleport.rb @@ -0,0 +1,105 @@ +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/v17.4.7.tar.gz" + sha256 "cafbac693c09bf5841e453fde60bbc80fdc0c90a752a588743594b4484c184f0" + 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_sequoia: "9c089849eaee0c85297d086939312112f411aa859f174148f2659408e9abc5f5" + sha256 cellar: :any, arm64_sonoma: "5ba740df9a19ba52e4d143424e7c7702e1b00f0da30a428cb0ab9eee4c31b9a6" + sha256 cellar: :any, arm64_ventura: "b282d3d73a21bfb1b085376ee6f1ed3590435ba29d02377f650e985d81b3a4c7" + sha256 cellar: :any, sonoma: "14b8264b59b28d1d60dffba202cdfb24816cc10d0b7a744c32f702b56b828a8f" + sha256 cellar: :any, ventura: "5479cbf00fbd681e95c42bba7f11f3d45fca8e2be4aa2561c5fcb892c14cd99a" + sha256 cellar: :any_skip_relocation, arm64_linux: "32d977084a876ae31ac36431db5ee9baa04e9c2ffec07d7b2e98b2520cba0ad1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7223022395cea05fb31f2279abd001bd73817346771cc300cabf6e65cf224fcb" + end + + depends_on "go" => :build + 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 "node" + 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" + 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..d95cd75025a25 --- /dev/null +++ b/Formula/t/television.rb @@ -0,0 +1,34 @@ +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.11.9.tar.gz" + sha256 "be58e6011ce1228afa1c6ba15f33023484b1bc8673c466f186ac2a130bb25bdb" + license "MIT" + head "https://github.com/alexpasmantier/television.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1428b66b3f3d2c99f53e4bec1e48c00af41e16e5fe664692a48cd70e4ceb73f5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a2f931202207d44d4d947e1545ff61939866dcfef6061e5e670590ab909b593b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "be40e9b300a7b77adaf9cee7d3197abb0559100450d0d0ffa42192284e8a9344" + sha256 cellar: :any_skip_relocation, sonoma: "594b7ffcdb2d1b95aecf396dee25fa74e9dea87b19aaddf558bb1c7a6b6e1116" + sha256 cellar: :any_skip_relocation, ventura: "6c377cac03136721c6df87656ecc300c5976785b7dbc185d6c0f967016ecdb21" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e4631ba3524b8524a0ec64c70a348ee2815d971b18aee3a6a821b478c7458b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3968192f05119be2ad9e33eb70d5b2edaa38e30453c88266f726e4dcd358c57a" + 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 list-channels") + assert_match "Builtin channels", output + end +end diff --git a/Formula/t/teller.rb b/Formula/t/teller.rb new file mode 100644 index 0000000000000..bcc0f8876ca51 --- /dev/null +++ b/Formula/t/teller.rb @@ -0,0 +1,55 @@ +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_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..7b1fbf76e8af9 --- /dev/null +++ b/Formula/t/telnet.rb @@ -0,0 +1,62 @@ +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_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..2c9cd4260a02f --- /dev/null +++ b/Formula/t/telnetd.rb @@ -0,0 +1,69 @@ +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_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..3ab7f08327eee --- /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.865.tar.gz" + sha256 "62c9d64aa11f1783db06a27e8f8f649c762486b14f0c64ce08d3eeb4a1a06ec1" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d24511ebc9f88569ef54178791d5f0ef2902c016cb5d0a0883c133518b4ee759" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d24511ebc9f88569ef54178791d5f0ef2902c016cb5d0a0883c133518b4ee759" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d24511ebc9f88569ef54178791d5f0ef2902c016cb5d0a0883c133518b4ee759" + sha256 cellar: :any_skip_relocation, sonoma: "d3520fab888a182436be7f25932399c40d9b4023bf148dc0393d120ab31e83f6" + sha256 cellar: :any_skip_relocation, ventura: "d3520fab888a182436be7f25932399c40d9b4023bf148dc0393d120ab31e83f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f33eeb717191fa6ce337b4ed5233b422343ee8b42c265523a3cbf3ad6e02b569" + 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..cc5445c5825d4 --- /dev/null +++ b/Formula/t/template-glib.rb @@ -0,0 +1,53 @@ +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.36/template-glib-3.36.3.tar.xz" + sha256 "d528b35b2cf90e07dae50e25e12fbadb0eb048f57fd5151cf9f6e98cce1df20e" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "57bcd419dd5b8203787927b3f80030cdd588dcdfb1b8d9f421d221d6ce8d620a" + sha256 cellar: :any, arm64_sonoma: "34f5aa6d72e339e7f00a1c3edf3e4ca888e3287361c72608bd9059c2e160237e" + sha256 cellar: :any, arm64_ventura: "cbab4dae5f31a1f03b008c1c2716a392d627342f4ef0725c8acec4bf75b3af57" + sha256 cellar: :any, sonoma: "d1caeed1a18c589d0254c2d5ed7f7ef3be5072ba29719dd89a80dd0e5775fc56" + sha256 cellar: :any, ventura: "3274fa074958fd821bc76a53a6a029d92f0a0f4f8726279e644f54e8ea824b4e" + sha256 arm64_linux: "692051e5aa9b5d37c5b7a95d633caefabb70ae250e98e9da0a18d69872a2a682" + sha256 x86_64_linux: "5c6b0220a451c784ae6a1d249fefc47d257b5e1a5bbc5aebf35fce80d01c4bc7" + 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..9447f729a74b8 --- /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.3.0.tar.gz" + sha256 "15be9f155cd5114367942568f884969f7ed2d3262ad39bb665cf359735f643b3" + 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_sequoia: "09c10245895b57422b1219614ec7be544e4df82a4b57bda331cf39acf45727bf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ea029f857617c9e48af3e5b0822f0a39db4c116e162e2efb7559cc997d1f2bf0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "57a33387e038bcd36cd04e49408da28021ba1c61a6b79548ffc519e7647fe209" + sha256 cellar: :any_skip_relocation, sonoma: "5a585e98279e6261a4075d3d8b738d81506cdc85bfa7dbf6bc75e095d38206d8" + sha256 cellar: :any_skip_relocation, ventura: "f371c0dd1374e2069f2d74fc11eb7009f9997bc885d5d364fa0ca99f3f108417" + sha256 cellar: :any_skip_relocation, x86_64_linux: "70673fc01d535b2e9d368ac711c32ccd62538c2d90f390f8c1c350b604571205" + 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..1f1daf26a98a6 --- /dev/null +++ b/Formula/t/temporal_tables.rb @@ -0,0 +1,64 @@ +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 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bcc21d71656c35c2fce9354192edb11f0751ef87d0fd7fae94563f7ef93ed4d7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f741ff41281dbdcdc41cfcbc1004c0bc3d8b5ef190e69d501cfa107ce1fb0674" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f081f8897511dfd9356f81771d9f3c718394168d1c084d6b9dfd6bf77281e7cd" + sha256 cellar: :any_skip_relocation, sonoma: "5e612eab3899197b94085261aba06aa6c7e7f7d367d23bf2afccbe834b95f644" + sha256 cellar: :any_skip_relocation, ventura: "813aafead423b3172a1b94c0289b9e48a40e6d0c83752657aac4018cce9ad8d3" + sha256 cellar: :any_skip_relocation, arm64_linux: "873358b516a1d0d4d702d5d67acc60ffc6e83f55b4962e717cecd331cd6da08a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3fc466f8f161e0a625d123f989a6aeb91b8ef1bb29dd489c4ae55a967a46582f" + end + + depends_on "postgresql@14" => [:build, :test] + depends_on "postgresql@17" => [:build, :test] + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + postgresqls.each do |postgresql| + system "make", "install", "PG_CONFIG=#{postgresql.opt_bin}/pg_config", + "pkglibdir=#{lib/postgresql.name}", + "datadir=#{share/postgresql.name}", + "docdir=#{doc}" + 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 = '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..34701baef423d --- /dev/null +++ b/Formula/t/tendermint.rb @@ -0,0 +1,49 @@ +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: "master" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + 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..48c40714eab96 --- /dev/null +++ b/Formula/t/tenere.rb @@ -0,0 +1,40 @@ +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.2.tar.gz" + sha256 "865c9b041faf935545dbb9753b33a8ff09bf4bfd8917d25ca93f5dc0c0cac114" + license "GPL-3.0-or-later" + revision 1 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "27ab0ab6d18b6c5e4d0e7edad7c2543d158804ec027a5604158419416b876a60" + sha256 cellar: :any, arm64_sonoma: "0960f90c6ae608d04793ddb91503109803974b8f3590006655b1d39c411eea59" + sha256 cellar: :any, arm64_ventura: "aa38fea42e6d5ff2a657d1abbea38712522561bb44a236f0bf2021e4538425fb" + sha256 cellar: :any, sonoma: "34cfde676da9db9d63b7d9e153ec5e8da89da08fc49ac53fc0ee99c6034fa9d4" + sha256 cellar: :any, ventura: "d928aa81de543a995db52ee06343ea3eeda83027e95e83b392caa9058d40e232" + sha256 cellar: :any_skip_relocation, arm64_linux: "90d3fdf2c27e17cb7d24eebc464b5ee2e909193feb891cfde67fce4bace506ad" + sha256 cellar: :any_skip_relocation, x86_64_linux: "670e6af5f665d27ba5c502aa245ee64175d561c63af071fa7988129c10d25e2f" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "oniguruma" + + uses_from_macos "zlib" + + def install + # TODO: ENV["LIBGIT2_NO_VENDOR"] = "1" + libgit2_version = File.read("Cargo.lock")[/name = "libgit2-sys"\nversion = "(.+)\+(.+)"/, 2] + odie "Unbundled libgit2 as now using #{libgit2_version}!" if Version.new(libgit2_version) >= "1.8" + + 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..f9962907d7a7e --- /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/v2.17.0.tar.gz" + sha256 "9402666c9c6f70b21e16c6e75983282ae127a47c854fc7aee9fd8ad3ffb1c550" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91af3b8967466b0287c2cafa9b4ba0450929c3689132301461b38fb8322be785" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91af3b8967466b0287c2cafa9b4ba0450929c3689132301461b38fb8322be785" + sha256 cellar: :any_skip_relocation, arm64_ventura: "91af3b8967466b0287c2cafa9b4ba0450929c3689132301461b38fb8322be785" + sha256 cellar: :any_skip_relocation, sonoma: "7e07ec75a2de6988bae8ff7333beaed72cbc48c0422b65ba709a3f292ee3598e" + sha256 cellar: :any_skip_relocation, ventura: "7e07ec75a2de6988bae8ff7333beaed72cbc48c0422b65ba709a3f292ee3598e" + sha256 cellar: :any_skip_relocation, arm64_linux: "94aaef6daa7d56e4096ca3a88bda5cc573559443fa9ef8e8b96ae997837bd79a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdac2cc3ac55ebd2ffe8e2298e75a17866d05dc7f093b1393378b2b963eaaaa8" + 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..03fc35ee90084 --- /dev/null +++ b/Formula/t/tenv.rb @@ -0,0 +1,46 @@ +class Tenv < Formula + desc "OpenTofu / Terraform / Terragrunt / Atmos version manager" + homepage "https://tofuutils.github.io/tenv/" + url "https://github.com/tofuutils/tenv/archive/refs/tags/v4.6.2.tar.gz" + sha256 "f3ebd348301163509d23c0cb6963c6f69bc9b942c54188c09605cd63f08475a0" + 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_sequoia: "3e6ce7e9bad09e8bd50992c95b5f8d35ac5b28e8700fee5ac514fa3d779ee9b5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3e6ce7e9bad09e8bd50992c95b5f8d35ac5b28e8700fee5ac514fa3d779ee9b5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3e6ce7e9bad09e8bd50992c95b5f8d35ac5b28e8700fee5ac514fa3d779ee9b5" + sha256 cellar: :any_skip_relocation, sonoma: "5b1b9b245f934dffae30508c0379a5c2bd32af1178a490b1dedd3dcd1c3920a3" + sha256 cellar: :any_skip_relocation, ventura: "5b1b9b245f934dffae30508c0379a5c2bd32af1178a490b1dedd3dcd1c3920a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "9bb14dcad2a77055f27f37602e94053a2778063390e7343321543059c08c936b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24a700c655d9d5e746c6b3aa2a7f6919e1125a35a937ed091d77e0ce82f3d487" + end + + depends_on "go" => :build + + conflicts_with "opentofu", "tofuenv", because: "both install tofu binary" + conflicts_with "terraform", because: "both install terraform binary" + conflicts_with "terragrunt", because: "both install terragrunt 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 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..092be05b55cd1 --- /dev/null +++ b/Formula/t/tenyr.rb @@ -0,0 +1,60 @@ +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" + + bottle do + rebuild 1 + 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..f70b711e3720f --- /dev/null +++ b/Formula/t/tere.rb @@ -0,0 +1,38 @@ +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_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/term.rb b/Formula/t/term.rb new file mode 100644 index 0000000000000..d7524083edca0 --- /dev/null +++ b/Formula/t/term.rb @@ -0,0 +1,32 @@ +class Term < Formula + desc "Open terminal in specified directory (and optionally run command)" + homepage "https://github.com/liyanage/macosx-shell-scripts/blob/HEAD/term" + url "https://raw.githubusercontent.com/liyanage/macosx-shell-scripts/e29f7eaa1eb13d78056dec85dc517626ab1d93e3/term" + version "2.1" + sha256 "a0a430f024ff330c6225fe52e3ed9278fccf8a9cd2be9023282481dacfdffb3c" + + livecheck do + skip "Cannot reliably check for new releases upstream" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9d96e3974bb4da6fa39f80ef74835a9c3be1e9b39679293e30552bdeeef1b15b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6dd9dd17ed477530310c64097beb15b38091a3b63c90c76289908ac550bb83d1" + sha256 cellar: :any_skip_relocation, arm64_monterey: "52285aea926cdf84f92702472ba404054f0297444f88a99a1f9b3916cbadf485" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f243e5462a56dc1847cea21bc43517688daa6f82bffac8aafd8c68258cfafa7f" + sha256 cellar: :any_skip_relocation, sonoma: "8c4edd4f7f906da8f72f95fa54f4d5f66ec22d9e389d9d88e37de2b0863b421e" + sha256 cellar: :any_skip_relocation, ventura: "1167465716e88902f005f60826fa6fa4453c869fdbfa23572e68e2447d9b6844" + sha256 cellar: :any_skip_relocation, monterey: "010a8465dd589036df16f10d9847f543b0a7c42a67b1dd25bbd55a07f0bd6001" + sha256 cellar: :any_skip_relocation, big_sur: "98c1bad8f19eab761b3917c8b065830d296f2d700670ffcdf0fee0fa322fa1f1" + sha256 cellar: :any_skip_relocation, catalina: "06049c5857c19cb0ca6e794c44ca0f10974dbba5f1da561e6af0fb3fe1b019e7" + sha256 cellar: :any_skip_relocation, mojave: "bd69041cc6a4321552e29381fbdb0d5cbb09d84e89be8344a3ed90611ba7d51a" + end + + disable! date: "2024-08-12", because: :no_license + + depends_on :macos + + def install + bin.install "term" + end +end diff --git a/Formula/t/termbg.rb b/Formula/t/termbg.rb new file mode 100644 index 0000000000000..b6add81b21bee --- /dev/null +++ b/Formula/t/termbg.rb @@ -0,0 +1,28 @@ +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_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..45a93637f9e35 --- /dev/null +++ b/Formula/t/termbox.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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..9635ce3b44b30 --- /dev/null +++ b/Formula/t/termcolor.rb @@ -0,0 +1,36 @@ +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" + + 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..35c3f23960cb9 --- /dev/null +++ b/Formula/t/terminal-notifier.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "9671c602326357b7397248bfb0cf062bc47f19add15b615e512f58545c387c31" + sha256 cellar: :any_skip_relocation, high_sierra: "f112656234f4100d23cc1a41b96f92a09974360a822c2ec0fb6f9970862c1a22" + sha256 cellar: :any_skip_relocation, sierra: "210cd525fad70bbaef40f092bc3478b1519f68f73c034990230d8b1cc61a8a7c" + sha256 cellar: :any_skip_relocation, el_capitan: "75ce68fd95fb502e20ccb25be72f7db12112ac1a4bdf5a70c140cd174ecbacf5" + 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..4724e243d8a0a --- /dev/null +++ b/Formula/t/terminalimageviewer.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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" + depends_on macos: :catalina + + 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..0f2d1385fff21 --- /dev/null +++ b/Formula/t/terminator.rb @@ -0,0 +1,66 @@ +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.4.tar.gz" + sha256 "b6a544426a19829f9e9bb41441a2f4789edc04f1867c84a436822d1af6a36d06" + license "GPL-2.0-only" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d823e29f9a03f186e2ff84443aca3348821632cab7a085068146bd0403383fe3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "241380e6ab7728c4cb1b46bf8a569a0a8527a4b4e97fbfab7fcd78a658c5bbe5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5440ad3063e68abe0e0bf3796021dfbbd4bae5f07c1c013f0265c47e0dcdcace" + sha256 cellar: :any_skip_relocation, sonoma: "a18e427816b26610cec97cd87bf1915ee7aec6a86c2af90295a3bf0a5130ddd7" + sha256 cellar: :any_skip_relocation, ventura: "60f289ff7f318d749a0523fbcb094c694ec1db2700ad6ee6899774d61dfe3fd4" + sha256 cellar: :any_skip_relocation, arm64_linux: "f308e8367d3813ca6b6ec3d46852877fb293163656b8b5b725ee042602b1480f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73119f14b2225e8557fb354ac8d53d1f58579893bbb69e1e74ddbfca62eede9e" + end + + depends_on "pygobject3" + depends_on "python@3.13" + depends_on "vte3" + + on_linux do + depends_on "gettext" => :build + end + + resource "configobj" do + url "https://files.pythonhosted.org/packages/cb/87/17d4c6d634c044ab08b11c0cd2a8a136d103713d438f8792d7be2c5148fb/configobj-5.0.8.tar.gz" + sha256 "6f704434a07dc4f4dc7c9a745172c1cad449feb548febd9f7fe362629c627a97" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/90/c7/6dc0a455d111f68ee43f27793971cf03fe29b6ef972042549db29eec39a2/psutil-5.9.8.tar.gz" + sha256 "6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/c8/1f/e026746e5885a83e1af99002ae63650b7c577af5c424d4c27edcf729ab44/setuptools-69.1.1.tar.gz" + sha256 "5c0806c7d9af348e6dd3777b4f4dbb42c7ad85b190104837488eab9a7c945cf8" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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..cfc7612479fff --- /dev/null +++ b/Formula/t/termrec.rb @@ -0,0 +1,45 @@ +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 + + bottle do + rebuild 1 + 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..25b36b97af0c1 --- /dev/null +++ b/Formula/t/termscp.rb @@ -0,0 +1,45 @@ +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.17.0.tar.gz" + sha256 "ada7bbf513104272687c703217f2cc45f834af979fa6bde1b7ab4ee059d67669" + license "MIT" + head "https://github.com/veeso/termscp.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f1f6a863d2464e7be10654d7eff0d2922f24a101edeeadb52c9d1e016b1ac222" + sha256 cellar: :any, arm64_sonoma: "1fe7c2905c834353f25532a2712d4101c56d94de88550607410ce158e42b9e41" + sha256 cellar: :any, arm64_ventura: "80643a20f1a6e4220a1a34c10bbc8ad9097c85d4ea26a43c0950aa8574ce03dc" + sha256 cellar: :any, sonoma: "bb8a6aa8bc2c40059fddd9d0bf432d859c3be784ae7b1ba60126b342c56477c1" + sha256 cellar: :any, ventura: "e3b7f899953f98ef98f4e1408ccb25e4d00770d6e21b82b89c00c98835250b51" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a3def80676f3340189e3b2a41072bd4e43c3ce9144ef4b53a5f3b9a7cb6f1a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b97ee5fc207ce372552809e310c18e8aad4b8c0fa15c76ca900681a372ae7aa" + 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..77005e5d4c85e --- /dev/null +++ b/Formula/t/termshark.rb @@ -0,0 +1,102 @@ +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_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, 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/tern.rb b/Formula/t/tern.rb new file mode 100644 index 0000000000000..a549e858b7004 --- /dev/null +++ b/Formula/t/tern.rb @@ -0,0 +1,172 @@ +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" + + bottle do + rebuild 5 + sha256 cellar: :any, arm64_sequoia: "9594d3b770425800447abf9fc76b1b63de4e5223e7e3723baa5d5b166d03d31b" + sha256 cellar: :any, arm64_sonoma: "c2a837d667d346d33b55d02a9906b4595f56a7e0b2560562f2d7fe23e5ce22a2" + sha256 cellar: :any, arm64_ventura: "1c7069dee7010a442e0758aee5b3753dba899c08a0c6c39208a777698545a9d6" + sha256 cellar: :any, sonoma: "01949eeb68831139ad1010fb02478532973687a33b0517d6cd4250117a261e55" + sha256 cellar: :any, ventura: "d6c69c21614592472c67581b01a3d62b4ab16e56180c561918cb17c261371031" + sha256 cellar: :any_skip_relocation, arm64_linux: "f28d712e68036e7665dfeb4b01f8dc8cdab88195af399e995c0a418b79f05e45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "540089053f102287f5b3484efecc2170365b28d992a0dcf24ca2b77058c8c9ad" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + on_linux do + depends_on "attr" # for `getfattr` + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/97/90/81f95d5f705be17872843536b1868f351805acf6971251ff07c1b8334dbb/attrs-23.1.0.tar.gz" + sha256 "6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015" + end + + resource "boolean-py" do + url "https://files.pythonhosted.org/packages/a2/d9/b6e56a303d221fc0bdff2c775e4eef7fedd58194aa5a96fa89fb71634cc9/boolean.py-4.0.tar.gz" + sha256 "17b9a181630e43dde1851d42bef546d616d5d9b4480357514597e78b203d06e4" + end + + resource "chardet" do + url "https://files.pythonhosted.org/packages/41/32/cdc91dcf83849c7385bf8e2a5693d87376536ed000807fa07f5eab33430d/chardet-5.1.0.tar.gz" + sha256 "0d62712b956bc154f85fb0a266e2a3c5913c2967e00348701b32411d6def31e5" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/2a/53/cf0a48de1bdcf6ff6e1c9a023f5f523dfe303e4024f216feac64b6eb7f67/charset-normalizer-3.2.0.tar.gz" + sha256 "3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace" + 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/f0/73/f7c9a14e88e769f38cb7fb45aa88dfd795faa8e18aea11bababf6e068d5e/docker-6.1.3.tar.gz" + sha256 "aa6d17830045ba5ef0168d5eaa34d37beeb113948c413affe1d5991fc11f9a20" + end + + resource "dockerfile-parse" do + url "https://files.pythonhosted.org/packages/0f/c4/8c4fc1da93a67878b15eaac0d47f467c87be7a12406544b1b33e261a0454/dockerfile-parse-2.0.0.tar.gz" + sha256 "21fe7d510642f2b61a999d45c3d9745f950e11fe6ba2497555b8f63782b78e45" + end + + resource "gitdb" do + url "https://files.pythonhosted.org/packages/4b/47/dc98f3d5d48aa815770e31490893b92c5f1cd6c6cf28dd3a8ae0efffac14/gitdb-4.0.10.tar.gz" + sha256 "6eb990b69df4e15bad899ea868dc46572c3f75339735663b81de79b06f17eb9a" + end + + resource "gitpython" do + url "https://files.pythonhosted.org/packages/87/56/6dcdfde2f3a747988d1693100224fb88fc1d3bbcb3f18377b2a3ef53a70a/GitPython-3.1.32.tar.gz" + sha256 "8d9b8cb1e80b9735e8717c9362079d3ce4c6e5ddeebedd0361b228c3a67a62f6" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/8b/e1/43beb3d38dba6cb420cefa297822eac205a277ab43e5ba5d5c46faf96438/idna-3.4.tar.gz" + sha256 "814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4" + end + + resource "license-expression" do + url "https://files.pythonhosted.org/packages/90/93/0fc8c72a5c9b65c2fd56154ef9e08c0c7a7fd0596ae69c65ce714ea5cd84/license-expression-30.1.1.tar.gz" + sha256 "42375df653ad85e6f5b4b0385138b2dbea1f5d66360783d8625c3e4f97f11f0c" + end + + resource "packageurl-python" do + url "https://files.pythonhosted.org/packages/91/c7/47a411700a121acc05fe78642b019afe320592078e58c182537c7c65006f/packageurl-python-0.11.1.tar.gz" + sha256 "bbcc53d2cb5920c815c1626c75992f319bfc450b73893fa7bd8aac5869aa49fe" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz" + sha256 "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/02/d8/acee75603f31e27c51134a858e0dea28d321770c5eedb9d1d673eb7d3817/pbr-5.11.1.tar.gz" + sha256 "aefc51675b0b533d56bb5fd1c8c6c0522fe31896679882e1c4c63d5e4a0fccb3" + end + + resource "prettytable" do + url "https://files.pythonhosted.org/packages/18/fa/82e719efc465238383f099c08b5284b974f5002dbe12050bcbbc912366eb/prettytable-3.8.0.tar.gz" + sha256 "031eae6a9102017e8c7c7906460d150b7ed78b20fd1d8c8be4edaf88556c07ce" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "regex" do + url "https://files.pythonhosted.org/packages/18/df/401fd39ffd50062ff1e0344f95f8e2c141de4fd1eca1677d2f29609e5389/regex-2023.6.3.tar.gz" + sha256 "72d1a25bf36d2050ceb35b517afe13864865268dfb45910e2e17a84be6cbfeb0" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/9d/be/10918a2eac4ae9f02f6cfe6414b7a155ccd8f7f9d4380d62fd5b955065c3/requests-2.31.0.tar.gz" + sha256 "942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/c8/1f/e026746e5885a83e1af99002ae63650b7c577af5c424d4c27edcf729ab44/setuptools-69.1.1.tar.gz" + sha256 "5c0806c7d9af348e6dd3777b4f4dbb42c7ad85b190104837488eab9a7c945cf8" + end + + resource "smmap" do + url "https://files.pythonhosted.org/packages/21/2d/39c6c57032f786f1965022563eec60623bb3e1409ade6ad834ff703724f3/smmap-5.0.0.tar.gz" + sha256 "c840e62059cd3be204b0c9c9f74be2c09d5648eddd4580d9314c3ecde0b30936" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/ac/d6/77387d3fc81f07bc8877e6f29507bd7943569093583b0a07b28cfa286780/stevedore-5.1.0.tar.gz" + sha256 "a54534acf9b89bc7ed264807013b505bf07f74dbe4bcfa37d32bd063870b087c" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/d6/af/3b4cfedd46b3addab52e84a71ab26518272c23c77116de3c61ead54af903/urllib3-2.0.3.tar.gz" + sha256 "bee28b5e56addb8226c96f7f13ac28cb4c301dd5ea8a6ca179c0b9835e032825" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/5e/5f/1e4bd82a9cc1f17b2c2361a2d876d4c38973a997003ba5eb400e8a932b6c/wcwidth-0.2.6.tar.gz" + sha256 "a5220780a404dbe3353789870978e472cfe477761f06ee55077256e509b156d0" + end + + resource "websocket-client" do + url "https://files.pythonhosted.org/packages/b1/34/3a5cae1e07d9566ad073fa6d169bf22c03a3ba7b31b3c3422ec88d039108/websocket-client-1.6.1.tar.gz" + sha256 "c951af98631d24f8df89ab1019fc365f2227c0892f12fd150e935607c79dd0dd" + 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..d819b08b5707e --- /dev/null +++ b/Formula/t/terracognita.rb @@ -0,0 +1,35 @@ +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_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, 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..9afd11834a812 --- /dev/null +++ b/Formula/t/terraform-cleaner.rb @@ -0,0 +1,62 @@ +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_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, 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..02bc4ab62463d --- /dev/null +++ b/Formula/t/terraform-docs.rb @@ -0,0 +1,69 @@ +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" + + bottle do + 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..a288b767cbe0c --- /dev/null +++ b/Formula/t/terraform-graph-beautifier.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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, 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..a582f4799246e --- /dev/null +++ b/Formula/t/terraform-iam-policy-validator.rb @@ -0,0 +1,100 @@ +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/13/7b/4fba4bbee1931df373f456a34994a1f089059ac13bac5ade29e1ae143956/tf_policy_validator-0.0.8.tar.gz" + sha256 "f43359ee0478f10e7b27a3fb7282c284304615cc6f06fd5aa3aa631edbe4811a" + license "MIT-0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "579fbf421d2560b9ad43d93f3549e559c099f3811ff09fc62b2ea1637855a0b6" + sha256 cellar: :any, arm64_sonoma: "947eca6f3676c6544d596b46c713ba5316c510a2f6b325fdd7d9d0b0bc1b8e13" + sha256 cellar: :any, arm64_ventura: "b89e2714f23a60a4ddf0fe2719c93a31264a8ecb528549418a978b44a658c8ff" + sha256 cellar: :any, sonoma: "4d1256d5c37bf22b127cefc065b33a6a5fbfd46da050044f04ce17b9e23d8b4d" + sha256 cellar: :any, ventura: "a3653d4fd8972af3496ebecf50946dca9a12e5e09b208254a4968e4b612565c6" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e3eee71e3cd93033925ca8532fd942cb1f3da394e08013d6feb1618319a4b7c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f630df08d4441513159d5853e5a8eda4d964b436cd5cc3a636ebd64baae400b" + end + + depends_on "libyaml" + depends_on "python@3.13" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/d6/50/1183ffa4782408907891af344a8e91d7bc5d7a9bae12e43fca8874da567e/boto3-1.37.13.tar.gz" + sha256 "295648f887464ab74c5c301a44982df76f9ba39ebfc16be5b8f071ad1a81fe95" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/18/53/3593b438ab1f9b6837cc90a8582dfa71c71c639e9359a01fd4d110f0566e/botocore-1.37.13.tar.gz" + sha256 "60dfb831c54eb466db9b91891a6c8a0c223626caa049969d5d42858ad1e7f8c7" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/0f/ec/aa1a215e5c126fe5decbee2e107468f51d9ce190b9763cb649f76bb45938/s3transfer-0.11.4.tar.gz" + sha256 "559f161658e1cf0a911f45940552c696735f5c74e64362e515f333ebed87d679" + 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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + 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..db21c4813a8fc --- /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_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, mojave: "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..bcc18ef50c91b --- /dev/null +++ b/Formula/t/terraform-local.rb @@ -0,0 +1,80 @@ +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/05/3b/1ca36cfa83eb630422cc1343f211f93b1f86c7496ac040ce7ae85c430049/terraform_local-0.21.0.tar.gz" + sha256 "5bd4388d609aa14629b159558ed3dab0e7f7fcb62396d143824ab57360f1cbdb" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "fa674b0894bfd4d8db2645936e3be768e3a618515238ecf447559cf777d6e874" + end + + depends_on "localstack" + depends_on "python@3.13" + + resource "boto3" do + url "https://files.pythonhosted.org/packages/b7/f5/dd50ed0a20019fa38c22797718c80d38e8b75b5e97c971a908c638e819aa/boto3-1.37.28.tar.gz" + sha256 "09ee85ba70a88286bba0d1bf5f0460a4b3bde52d162216accfe637b8bfac351b" + end + + resource "botocore" do + url "https://files.pythonhosted.org/packages/92/90/557082a8379ece106b37eb00766efc7a32cbfcdaa0d1d78f38f99eefd218/botocore-1.37.28.tar.gz" + sha256 "69ea327f70f0607d174c4c2b1dcc87327b9c48e413c9d322179172b614b28e03" + 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/af/60/bc7622aefb2aee1c0b4ba23c1446d3e30225c8770b38d7aedbfb65ca9d5a/lark-1.2.2.tar.gz" + sha256 "ca807d0162cd16cef15a8feecb862d7319e7a09bdb13aef927968e45040fed80" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/db/de/5002d443ebba9964ab39f2408c8eb36ffa5e88f11fce68ede9d4416ae53e/python_hcl2-7.0.1.tar.gz" + sha256 "41fbae6d154d593d9f8adcbd85e76fbbb86a188561e1d22d293beddc4153d3b6" + end + + resource "s3transfer" do + url "https://files.pythonhosted.org/packages/0f/ec/aa1a215e5c126fe5decbee2e107468f51d9ce190b9763cb649f76bb45938/s3transfer-0.11.4.tar.gz" + sha256 "559f161658e1cf0a911f45940552c696735f5c74e64362e515f333ebed87d679" + 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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..571e02f3d8189 --- /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.36.4.tar.gz" + sha256 "c52a38fe5e4a5e16660e24a23d090b85e37a543efa0aaa6cb82238c0bc22e144" + 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_sequoia: "ffde394a1ef4f2ce01db0a2accb3e1655688f071ecb04944d32749e4817ee5c1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ffde394a1ef4f2ce01db0a2accb3e1655688f071ecb04944d32749e4817ee5c1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ffde394a1ef4f2ce01db0a2accb3e1655688f071ecb04944d32749e4817ee5c1" + sha256 cellar: :any_skip_relocation, sonoma: "94612fd0823787c84621378278a1b5d1c353eda810b9aaad08794a4031076b46" + sha256 cellar: :any_skip_relocation, ventura: "94612fd0823787c84621378278a1b5d1c353eda810b9aaad08794a4031076b46" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cded371eab11241e1e47160461535c2809893a0d56b905aeb3a5e91dab248a82" + 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..7406a3317a097 --- /dev/null +++ b/Formula/t/terraform-lsp.rb @@ -0,0 +1,60 @@ +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" + + bottle do + 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, 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-module-versions.rb b/Formula/t/terraform-module-versions.rb new file mode 100644 index 0000000000000..1b9b2d273bc10 --- /dev/null +++ b/Formula/t/terraform-module-versions.rb @@ -0,0 +1,30 @@ +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.10.tar.gz" + sha256 "c84e947c26741e4c95d9c0e0a5e7d01d41ebcdf7bbb85b0106f1013b08e20b05" + license "MIT" + head "https://github.com/keilerkonzept/terraform-module-versions.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2d813ca4e8bc2426d3b3ba8f1c373fc915752ff4553b9d46034a6be95942d1cd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2d813ca4e8bc2426d3b3ba8f1c373fc915752ff4553b9d46034a6be95942d1cd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2d813ca4e8bc2426d3b3ba8f1c373fc915752ff4553b9d46034a6be95942d1cd" + sha256 cellar: :any_skip_relocation, sonoma: "e6f0f314bddecfd6dc337353bda79132f8b2de124ecb4b45ffe67dfc94601570" + sha256 cellar: :any_skip_relocation, ventura: "e6f0f314bddecfd6dc337353bda79132f8b2de124ecb4b45ffe67dfc94601570" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7ba49288a639cab0d6c07ccea353c5b67caf6d31de44f9d242813427e67e711f" + 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..ef0571eead473 --- /dev/null +++ b/Formula/t/terraform-provider-libvirt.rb @@ -0,0 +1,29 @@ +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_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, 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..ee2dbea45ad04 --- /dev/null +++ b/Formula/t/terraform.rb @@ -0,0 +1,79 @@ +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 + + conflicts_with "tenv", because: "both install terraform binary" + conflicts_with "tfenv", because: "tfenv symlinks terraform binaries" + + 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..3978653ce6e6c --- /dev/null +++ b/Formula/t/terraform_landscape.rb @@ -0,0 +1,68 @@ +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" + + 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..85eb1d0d14b4a --- /dev/null +++ b/Formula/t/terraformer.rb @@ -0,0 +1,39 @@ +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_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..1e1879c3d9603 --- /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.20.0.tar.gz" + sha256 "b21ee84341cd94ba369c6f0b3124f6d260ed9141129e345c6c64d76b2f54ce91" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "36a77276086d50d1a244decd8348f84ed0cf9782f78e3c15ad81ee1a931ae4fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "36a77276086d50d1a244decd8348f84ed0cf9782f78e3c15ad81ee1a931ae4fc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "36a77276086d50d1a244decd8348f84ed0cf9782f78e3c15ad81ee1a931ae4fc" + sha256 cellar: :any_skip_relocation, sonoma: "a52d65d271801ec108c1f61d041c0cc098840064035908b7f91c238b044838f3" + sha256 cellar: :any_skip_relocation, ventura: "a52d65d271801ec108c1f61d041c0cc098840064035908b7f91c238b044838f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e172a88a31a81fca1a9efac6efea8e6bd509ea68d809ceed5354fc5fd5d17f0f" + 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..fc1ffb3a93768 --- /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.78.4.tar.gz" + sha256 "e86148898fe22326bc55a96b0d9c546e7278139afa6bda99cfad4a316bb52866" + 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_sequoia: "2495a6ade32bf8bf3f7a27ec1acde3456c51c6410072009eeaf30344f0e789c4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2495a6ade32bf8bf3f7a27ec1acde3456c51c6410072009eeaf30344f0e789c4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2495a6ade32bf8bf3f7a27ec1acde3456c51c6410072009eeaf30344f0e789c4" + sha256 cellar: :any_skip_relocation, sonoma: "e5492a59dff9ca9c35f0d8384a460f5286df789434d2ef05ee5e5a840b5a7d81" + sha256 cellar: :any_skip_relocation, ventura: "e5492a59dff9ca9c35f0d8384a460f5286df789434d2ef05ee5e5a840b5a7d81" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5abbe48647b41b8626ce62da33bcad33ab568e128ac2999c4b8cffb790f729ac" + 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..35979331335fd --- /dev/null +++ b/Formula/t/terrahash.rb @@ -0,0 +1,50 @@ +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_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, 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..f791b12e2c283 --- /dev/null +++ b/Formula/t/terrahelp.rb @@ -0,0 +1,58 @@ +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" + + bottle do + 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, mojave: "10cfea117c1dd3d1e1f5c7b609b3c299c4544b46c87d996836971d1185e77004" + 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..dde8516bbd566 --- /dev/null +++ b/Formula/t/terrahub.rb @@ -0,0 +1,45 @@ +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_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..e13942820ce6c --- /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.2.0.tar.gz" + sha256 "75c6d87aac78397ff3c7b54bd963b1624a3d24d9507c3377fe127ee5a3862d5c" + license "Apache-2.0" + head "https://github.com/RoseSecurity/Terramaid.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "12a551cff811a599349a4106d29bd467cece4098bdcd96a38b7563e1c2851269" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "12a551cff811a599349a4106d29bd467cece4098bdcd96a38b7563e1c2851269" + sha256 cellar: :any_skip_relocation, arm64_ventura: "12a551cff811a599349a4106d29bd467cece4098bdcd96a38b7563e1c2851269" + sha256 cellar: :any_skip_relocation, sonoma: "cc20dc9f7135d34b801269d2d252013787c3b847b1385db7ae33e797077df6a0" + sha256 cellar: :any_skip_relocation, ventura: "cc20dc9f7135d34b801269d2d252013787c3b847b1385db7ae33e797077df6a0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0b20d4ec0bdd2a037d6c16920ef2c7cbe005492fd1871dbc5a8234f9406aa49" + 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..a05b9d5d94d77 --- /dev/null +++ b/Formula/t/terramate.rb @@ -0,0 +1,29 @@ +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.13.1.tar.gz" + sha256 "fb9dfeb7395e10e2000ed67ab9a6e40edea6d31efcc9f5a84a95f274cb9ec8b9" + license "MPL-2.0" + head "https://github.com/terramate-io/terramate.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "311186c426b93f86c20e4db5ea99a1c8ee5eceef67f30246543b619eea7bc30b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "311186c426b93f86c20e4db5ea99a1c8ee5eceef67f30246543b619eea7bc30b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "311186c426b93f86c20e4db5ea99a1c8ee5eceef67f30246543b619eea7bc30b" + sha256 cellar: :any_skip_relocation, sonoma: "4873d7e9e964e06ef313ec71d9a686bf8790f9b5d7a552dfc730382dd5aeaadf" + sha256 cellar: :any_skip_relocation, ventura: "4873d7e9e964e06ef313ec71d9a686bf8790f9b5d7a552dfc730382dd5aeaadf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc0efccf3289fe0b2996d9917dcf487588168e97fa7ca0501a8bd5daf91eda6d" + end + + depends_on "go" => :build + + 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..faedd95473ca3 --- /dev/null +++ b/Formula/t/terrapin-scanner.rb @@ -0,0 +1,32 @@ +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" + + bottle do + 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, 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..061a0d053b4ff --- /dev/null +++ b/Formula/t/terrascan.rb @@ -0,0 +1,55 @@ +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_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/tesseract-lang.rb b/Formula/t/tesseract-lang.rb new file mode 100644 index 0000000000000..84b252297a903 --- /dev/null +++ b/Formula/t/tesseract-lang.rb @@ -0,0 +1,32 @@ +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" + + 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..f384bf73d6a5b --- /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.0.tar.gz" + sha256 "f2fb34ca035b6d087a42875a35a7a5c4155fa9979c6132365b1e5a28ebc3fc11" + license "Apache-2.0" + revision 1 + head "https://github.com/tesseract-ocr/tesseract.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "a38cf90d587ff998ce2df8fa9f5092700603f3a11828b964948911b93af532a1" + sha256 arm64_sonoma: "a8a2450fbbbce956f492f02aba1bf2d3a7866263d428a823df6fa122cf3c1139" + sha256 arm64_ventura: "45c101cb9aa70fd7276bce49946043f14cb63210428cbdfc3bc6080f8c467f6f" + sha256 cellar: :any, sonoma: "95b9ae7365584cdf4baaec48419138c8d35ccf207693b9eb1c3e026abc399d8e" + sha256 cellar: :any, ventura: "ed5ba31f7c1f7b4f6645cf37cb7a18a37a543eb60c3c0199cb50a69d85507fe2" + sha256 arm64_linux: "b5edabda5572cce8b05cebb28ec4f3b33d5f4aa3e712156fa8e5f4ac74396bc6" + sha256 x86_64_linux: "3b17fc1d99ecf8ba3d829c90561c9198b36c78f9d8277cb0e95e41351cf90e40" + 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..e11fadfe7a9bc --- /dev/null +++ b/Formula/t/testdisk.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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..0fdc49fec1555 --- /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.1.151.tar.gz" + sha256 "c2add33e2972afa180b1a659ff8bf6c6169f5a2c6133eeea8a4e8ac8a99d72e8" + 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_sequoia: "a7f455954e3dbc4b5f456cb1a3e962b3fb50b48658018c85116d1726d5768503" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a7f455954e3dbc4b5f456cb1a3e962b3fb50b48658018c85116d1726d5768503" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a7f455954e3dbc4b5f456cb1a3e962b3fb50b48658018c85116d1726d5768503" + sha256 cellar: :any_skip_relocation, sonoma: "cc88a59812508dfec41ce02a690d432213df463bab12446be0ce1c64cc61e4da" + sha256 cellar: :any_skip_relocation, ventura: "cc88a59812508dfec41ce02a690d432213df463bab12446be0ce1c64cc61e4da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d65d1eb0931dce8b62f62e03528a0f4e224761052a9af47d9fc9e77a699fea0e" + 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..87935c7f90828 --- /dev/null +++ b/Formula/t/testscript.rb @@ -0,0 +1,28 @@ +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_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, 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..819dbb839225d --- /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/drwetter/testssl.sh/archive/refs/tags/v3.2.0.tar.gz" + sha256 "f3969c152c0fe99a2a90e8c8675ab677d77608ac77c957a95497387c36363c32" + license "GPL-2.0-only" + head "https://github.com/drwetter/testssl.sh.git", branch: "3.2" + + bottle do + sha256 cellar: :any_skip_relocation, all: "19b7c914535a968289f0dfc88162f78d78d9f8b793f0e58b5d4ca56fcc47a5a8" + 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..3d2c64b8ee970 --- /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.4.0.tar.gz" + sha256 "4b38bd34fe17be4abcd48a58e22f9811aef5d26847bc90d0f74b7eee70308e36" + license "Apache-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c2385a7748190637f01e9388d89d6ee3defc8b5d930415dfb73a9715433eca9d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c6cb95ae2683bdb64bd81a167830baffd884eeec6bb9b48ed16be6f80a8253d0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "29a696880f8fed793a57b83c12ef9f618f59e4bf19fa19eec6ddc5da8479f93f" + sha256 cellar: :any_skip_relocation, sonoma: "281b242f7adddaa7a673662d0585426f13d83cef996f0495af05696840f9d162" + sha256 cellar: :any_skip_relocation, ventura: "7942959321491d997715d7d35a9c4b6b5b67dbedfedf629b50fce99a8c9972cb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b381a6a35bcbed501ac9d9bed5474bc9b7afe17b7ee7b4b34674b3646b5ffc07" + 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..1bbddcc1fc669 --- /dev/null +++ b/Formula/t/tevent.rb @@ -0,0 +1,76 @@ +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.16.2.tar.gz" + sha256 "f0bbd29dfabbcbbce9f4718fc165410cdd4f7d8ee1f3dfc54618d4c03199cea3" + 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_sequoia: "4b1299df6043fe06db809e5a5a15d531eafa1e5cf342f49fee336a016522d6c0" + sha256 cellar: :any, arm64_sonoma: "669b3b3ce670629fca6c41ccd5f47b8dbde8f8dd4d4c7ebff9bf4e79bb3edcd9" + sha256 cellar: :any, arm64_ventura: "f31c16f2155d9ab99761f758df8c64464ade64525b3e0603261c6b2c68fdb58b" + sha256 cellar: :any, sonoma: "685425f7ed027ead68df7354672600841413b18f702484094ec2d3bf40bfdc35" + sha256 cellar: :any, ventura: "15bab6c124d0f8afc3d83ca9f8f20b79211fe1ce33ab06e60ce2552ad78c78e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "91b7e00fe6fab5edf5cd35f2abffd2f842c456d9c3f098edf007d79eabc397be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "36aa2419325a2300e1afcefaa32ef7982bbb44855a9ea104322c1c6e43f49a3c" + 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..b9b1657be1814 --- /dev/null +++ b/Formula/t/tex-fmt.rb @@ -0,0 +1,55 @@ +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.4.tar.gz" + sha256 "1a1bc787edb6b8f58feb6f0f5f33a6cac04ea583763f6807c6e319d6171b5d4b" + license "MIT" + head "https://github.com/WGUNDERWOOD/tex-fmt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8ba4991136e1b9c8cda2a7b6f32a0d4bd48e87b539b1d1cedefc5c48c7789b9f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7953296bbf44226be974cfa83a6c72be562890e0953fc2a778eb8a6cc32264e9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f54eebd133856d0df1a7c6a135d73c47bb4e26e80fa3d4290616fdd7f0a6fb1b" + sha256 cellar: :any_skip_relocation, sonoma: "3beceb95230080b3b4cdd2e333418c7924e86ba3ef01284f85b2c43ed86cd319" + sha256 cellar: :any_skip_relocation, ventura: "baf1ccee2323af100ca9f294fe532228fcf94d4f3f7ee4a36a37989f911e1829" + sha256 cellar: :any_skip_relocation, arm64_linux: "f09adcafa4191bfe2aacaaa2a3308cb366a13c4c191bf3a57e005a1eb050031a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1113e066dd4f7ea74133893d88f4534fa705e16f276ee197de414ac0e0e4cf8a" + 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..0a55f8e781396 --- /dev/null +++ b/Formula/t/texi2html.rb @@ -0,0 +1,53 @@ +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 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f1edd0597b8dbd1dd4150ebf2cdfd1e85f0b686e68216684cc38b10e19295a03" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d97147d3fb05920663a4113bcd9a82420c1cdb15593a46d36d5f0bf2e0f023bc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7114d60ab173de6a576098ba484cb226ad2a65c3f6ef2f668f8c5c2d0676fc2f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7114d60ab173de6a576098ba484cb226ad2a65c3f6ef2f668f8c5c2d0676fc2f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "03feaacb6b615ca2dda676bf5fe4f9551c488a851ccd1e89b12d257a5c7d932b" + sha256 cellar: :any_skip_relocation, sonoma: "620ae7ace83d9220659e8b81cc9706e812e67f737952dec8a81895d4a289dfaa" + sha256 cellar: :any_skip_relocation, ventura: "f1d5a70912d5b39d5da118a19474ec509a34a903cefb2c00ff403569325fe0ae" + sha256 cellar: :any_skip_relocation, monterey: "f1d5a70912d5b39d5da118a19474ec509a34a903cefb2c00ff403569325fe0ae" + sha256 cellar: :any_skip_relocation, big_sur: "4ad9c71802c3258a3c0c7ff8800ddd70cc230ddfecc095080d0144ba153bc2dc" + sha256 cellar: :any_skip_relocation, catalina: "10f6d76de400799fb21dc900a2344ef444d43658dd502f0c040ad7c0a4bf0fbb" + sha256 cellar: :any_skip_relocation, mojave: "10f6d76de400799fb21dc900a2344ef444d43658dd502f0c040ad7c0a4bf0fbb" + sha256 cellar: :any_skip_relocation, high_sierra: "10f6d76de400799fb21dc900a2344ef444d43658dd502f0c040ad7c0a4bf0fbb" + sha256 cellar: :any_skip_relocation, arm64_linux: "fc03b703a8cb858fbaf0fcba903ce5b59399cc83fad97e953eb15e4392ac11df" + sha256 cellar: :any_skip_relocation, x86_64_linux: "13d9124964d4e6a9c99ca57e763e34e40397871bf94b4064cddb5262bf501f47" + end + + depends_on "gettext" + + 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..bc5ca34799fbd --- /dev/null +++ b/Formula/t/texi2mdoc.rb @@ -0,0 +1,45 @@ +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" + + livecheck do + url "https://mandoc.bsd.lv/texi2mdoc/snapshots/" + regex(/href=.*?texi2mdoc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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..fe62f57cfabe6 --- /dev/null +++ b/Formula/t/texinfo.rb @@ -0,0 +1,56 @@ +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-7.2.tar.xz" + mirror "https://ftpmirror.gnu.org/texinfo/texinfo-7.2.tar.xz" + sha256 "0329d7788fbef113fa82cb80889ca197a344ce0df7646fe000974c5d714363a6" + license "GPL-3.0-or-later" + + bottle do + sha256 arm64_sequoia: "abfc842bb08fd512dd878e2233ea6d0d3682685dd9d5a03a86c6c8d170ca104e" + sha256 arm64_sonoma: "948d36004ea61e34f1b27d04d4b56c5b1e2cf7bc28861c89fa9cd7c3c87cbdb5" + sha256 arm64_ventura: "71ed6d2d1b181f10f9fabac5935ff3956d7b63f670e652465b601c2929a19cc2" + 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_system :linux, macos: :high_sierra_or_older 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..6964310963c97 --- /dev/null +++ b/Formula/t/texlab.rb @@ -0,0 +1,71 @@ +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.22.1.tar.gz" + sha256 "dd7602c069e8411c1a744d5b25f80686339ef18e6f12c1bc971f27912e3e9714" + license "GPL-3.0-only" + head "https://github.com/latex-lsp/texlab.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "97c1ad59a85a748439e78e998dfd0e4c914b996f78a4c0abbdd19c637e2ab910" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14e03019cc794440c1a9ed0ebe457904955e8421765d049bccd517968c7831d7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ecc36bb65ec7e202c625ec583c38baf5ffd0a874822c365edfa182334bf7a29e" + sha256 cellar: :any_skip_relocation, sonoma: "0950447d80806cb938eb1b813e0b48f82b73d11c0ee3c48eee762bd33cd21588" + sha256 cellar: :any_skip_relocation, ventura: "94388c7f4edb89aba3402755a85898a15fedc30b3eab93cee528ff80f194b1fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "7385f6dd598c2b21df44424dba081a5168785c65279c649f837834ede9eecadd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db5dc9f0178a252b4a12f5de7e12f6ce698d79f834734f8e9793fd077adee4a7" + 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..6b6593edeadd7 --- /dev/null +++ b/Formula/t/texlive.rb @@ -0,0 +1,595 @@ +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 + + bottle do + sha256 arm64_sequoia: "dbb0b1a2a0b1d06263f2fe4e1b386cc2f682c4ab3a5d399b65cbfb3ce33ce4eb" + sha256 arm64_sonoma: "e071d59282304b7664e026649c7b9d83df65202d5a558f0064cc58ee1415c03c" + sha256 arm64_ventura: "bf3f81f2101f658532f917b49cdb220c21e6b5465f27f0fcdefa4b361d0f119c" + sha256 sonoma: "e0353127249a2ac7229787cdd7f2a555f115c9b2ff466f4e339557117c59a664" + sha256 ventura: "b065a0aa04c54fdef596148f0fcae226fc38cd8bfca6632dd194bc04121ad0de" + sha256 arm64_linux: "5124fbe9981c8e14b7b505701a62a75671eff00c910b0af49acbc2cd8d0e56e8" + sha256 x86_64_linux: "6855a829bd2a7facbcaa400b2c3a5c342248abc606f479a538a03bbefdc6bacc" + 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.13" + + 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.13" + 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..fba6c71ae1567 --- /dev/null +++ b/Formula/t/texmath.rb @@ -0,0 +1,33 @@ +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.12.9/texmath-0.12.9.tar.gz" + sha256 "2e3454d672e69857c957d2b945b64de83a9f28b3c9f8d4beb6992fef3b908e17" + license "GPL-2.0-or-later" + head "https://github.com/jgm/texmath.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0e8ac8738583735b1ec82ff72b6f66f9cb8db5b5e092287b5d9cc2d987f30152" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f3a1807646b8a13d54cee2e8083d076399284177d3cfa5706fe050fd3d2765f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "19f1ff78f57aaefe59eb93c3791d95d066c41908655e3de0ac5194323ba20e24" + sha256 cellar: :any_skip_relocation, sonoma: "65c689a50943c33ce98d0923c1565a9f2669e3e8f842f8ee1a47639a58aed74e" + sha256 cellar: :any_skip_relocation, ventura: "d5573e3fae8d93d830f2e2fd29c2b430f7f32bc14b86a92c03fcee26340471a4" + sha256 cellar: :any_skip_relocation, arm64_linux: "22aa1fac81b32e222f13e81d6a753022493bb3c5e85762e8c4e58a4256e1a253" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1623d869fb7ae3b778353a8d2435e5ef979425d795e4bc0d11205e03d7860ae" + 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..8ce4f91c8bb48 --- /dev/null +++ b/Formula/t/text-embeddings-inference.rb @@ -0,0 +1,38 @@ +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.7.0.tar.gz" + sha256 "f8aa773a15e15bbbd4b793aa79fe65c16bc50c52e7aa710690a7a312c69d159c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b31c7b07243ae9eac43a5720ea5a0c943478130a6774b2ab37dd9433607878cb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ac1df833c4b595c2306fbd150c94d7471f3c462bd22937e8558834e11ff76a2b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3cfff674ba4adc56cb746ef985e6ccd173d0b84b1c0774ce313ad6971dcf84e3" + sha256 cellar: :any_skip_relocation, sonoma: "7d328ee1717b4c6b3779a2e372fa92385e1513154b97eb91741e4b5206f1bc25" + sha256 cellar: :any_skip_relocation, ventura: "d620ccac5d7b693d860e249e705d5e21dd044b45c42309f8cff5b31c2515a696" + sha256 cellar: :any_skip_relocation, arm64_linux: "c452f485510827673e684f809e9faad64298b823ec87860c0b5c9cbc6adc26d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe08f0101ab2c50c64e636f04546339bc95392522fe569676c7fa4b4ff5d80f6" + 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 + fork do + exec bin/"text-embeddings-router", "-p", port.to_s, "--model-id", "sentence-transformers/all-MiniLM-L6-v2" + end + + 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..74feb40cda0f7 --- /dev/null +++ b/Formula/t/textidote.rb @@ -0,0 +1,67 @@ +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 + + bottle do + rebuild 3 + 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..106b9408d72c2 --- /dev/null +++ b/Formula/t/textract.rb @@ -0,0 +1,163 @@ +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 + + 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..cfa3005db4477 --- /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/57/df/27a7fab4593b4f39f0664631af6fb14768014f04b033262409c8a2bf1fa7/texttest-4.4.3.1.tar.gz" + sha256 "9916452bcc1b8413547142b0966f8710c2feeb32822c553bc9b3265fe8f29314" + license "LGPL-2.1-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2aac453cc16155c4892c4cff979edc6562acc547955ee4c9240e3acdeedfac1e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "27ff1ad9f9c7ed257a2ef6e84bb1d498629ba64bab9f9938391a159203f662d8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c8d7b7a4826de374e7414534591609dfe3aa111dcdd7a97760451307900095d0" + sha256 cellar: :any_skip_relocation, sonoma: "e831db453a20deab3af02382342054bc1b5e4e80d2611d4e78b63169b2807b1d" + sha256 cellar: :any_skip_relocation, ventura: "935d18c9bedd751a7acb64eec6cb7571e8673a8d0c5e9fb7024b6aa1c263dc9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b4ffc29e1deb1313dbea1455f09307d7879bf51c198507654fdc118a7fccb3e9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0c202f3d700abfdb9f4246882e0ac47beb7d644bb9576521c255145cddd7a0c7" + end + + depends_on "adwaita-icon-theme" + depends_on "gtk+3" + depends_on "pygobject3" + depends_on "python@3.13" + + 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 + + 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..7a20fc5d6eee8 --- /dev/null +++ b/Formula/t/tf-profile.rb @@ -0,0 +1,39 @@ +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_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..aa9f0dec579db --- /dev/null +++ b/Formula/t/tf-summarize.rb @@ -0,0 +1,37 @@ +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_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..893356d099b8e --- /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.6.2.tar.gz" + sha256 "d89e19c03c7cd1ea1714d091cea751289936b2d52e790fae3a26b23bc445313d" + license "Apache-2.0" + head "https://github.com/busser/tfautomv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a9f6d13a8c6a71575153fa486dfcd6ed49eaf824d5d52fb1c3e3cfb8bbdcc22a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f2008e44b8a87c112dedaaaf588ae85d7924c6ae516b990930e3aaa496561681" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f7a44d21ae1093c71a98213fd7bc9ee7d3580ef3a892dd6ef4dab6661063c598" + sha256 cellar: :any_skip_relocation, arm64_monterey: "916ac0746672c339e18cce67240025c827502721985de1370e8b92210b6d8bf2" + sha256 cellar: :any_skip_relocation, sonoma: "3c05cf7c115225365f5581be0ea2b83ac903d178b371f2b5bf3c5e905f5b2afa" + sha256 cellar: :any_skip_relocation, ventura: "5dc891bcc1497098c3682f6bc4ecb40c872bb70eafb048118161feed0fa3846d" + sha256 cellar: :any_skip_relocation, monterey: "dc9001cde510f52eefd365d491f494f525b589680c3cc2a6b2fcd396cb6683b9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2413e0780e7e9601a1b62263d3fff816f1a10b2b0df145b5fdbb85c0641fa1a" + 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..0783866641e0d --- /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.7.tar.gz" + sha256 "a4c7407bded6d9d745872fa0813c6dee832bd28d6697a13416d5cf8cc6db4254" + license "MIT" + head "https://github.com/suzuki-shunsuke/tfcmt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fd38759529061faca9c17bd9bd4f698709ebc102fb494648490730e240f3be27" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fd38759529061faca9c17bd9bd4f698709ebc102fb494648490730e240f3be27" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fd38759529061faca9c17bd9bd4f698709ebc102fb494648490730e240f3be27" + sha256 cellar: :any_skip_relocation, sonoma: "7e030f07a67285696d0edd657d313d1aaf6227a58855903cdab41f341a35cb45" + sha256 cellar: :any_skip_relocation, ventura: "7e030f07a67285696d0edd657d313d1aaf6227a58855903cdab41f341a35cb45" + sha256 cellar: :any_skip_relocation, x86_64_linux: "52b2bc80de16b004369e2ab6000fee4e10ff873ea41f6234b2ba8d84e03fbf81" + 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..a94936607de29 --- /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" + head "https://github.com/thelfer/tfel.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "5a32fde49de7f2ecb7019ceb8893ae34ecca6347c71b1598bc056199594d2014" + sha256 arm64_sonoma: "36ec43fdca67231f63225ca920b6f62e0e5489510de6c2b8796bc7238e6b42a4" + sha256 arm64_ventura: "67632853027c9909241d22a4745db0c68ec235339713a51d0b626a443808578e" + sha256 sonoma: "ace78851845633b3f55a10cc49f7e365962b4acf5cee5c5a0e19ac35b5131226" + sha256 ventura: "b0a0492cfb359a04d65d9e7b0a4b41db3817ae492e002a5d58e712b682dce87c" + sha256 arm64_linux: "27e25c31a2fd4b106d35c072a359ccd78c478f42b52298d960d06a82ee877fc2" + sha256 x86_64_linux: "51420bbf165e34f3abdf34af61c445eadba23e9ca0ce8d1c092b0e0247a9cd16" + end + + depends_on "cmake" => :build + depends_on "gcc" => :build # for gfortran + depends_on "boost-python3" + depends_on "python@3.13" + + 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..fdb9a234e5a41 --- /dev/null +++ b/Formula/t/tfenv.rb @@ -0,0 +1,38 @@ +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 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "c66a9c7c90b14b63c471b56405ec064b081474cc85528b324bd1bcc1c1af248d" + end + + uses_from_macos "unzip" + + on_macos do + depends_on "grep" + end + + conflicts_with "tenv", because: "tfenv symlinks terraform binaries" + conflicts_with "terraform", because: "tfenv symlinks terraform binaries" + + def install + prefix.install %w[bin lib libexec share] + 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..bb1c0199e9e6a --- /dev/null +++ b/Formula/t/tfk8s.rb @@ -0,0 +1,58 @@ +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" + + bottle do + 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, 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..8a3732298d775 --- /dev/null +++ b/Formula/t/tflint.rb @@ -0,0 +1,46 @@ +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.57.0.tar.gz" + sha256 "d78da52920e51f82615ba98f7e731300501b88232d8dca76597e511fc30634a0" + license "MPL-2.0" + head "https://github.com/terraform-linters/tflint.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "52cb3d7d792db127a4f73da2a6f513c37b3342432da5c0ab250c74e6bd5cf7de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "52cb3d7d792db127a4f73da2a6f513c37b3342432da5c0ab250c74e6bd5cf7de" + sha256 cellar: :any_skip_relocation, arm64_ventura: "52cb3d7d792db127a4f73da2a6f513c37b3342432da5c0ab250c74e6bd5cf7de" + sha256 cellar: :any_skip_relocation, sonoma: "030eb91523bec952a790bce879bb2f34de47b1bf27e7cfa3797630778ffefa93" + sha256 cellar: :any_skip_relocation, ventura: "2bc1916b8892e7907e754320ac44e42b1bd4ef7e28f0fc31a86826410f43f360" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a1126deb219f3ae455b6a67f6afc80cb0c029e7c57d007acbc81be58e0391b1d" + 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/tfmigrate.rb b/Formula/t/tfmigrate.rb new file mode 100644 index 0000000000000..4d7bfb55be791 --- /dev/null +++ b/Formula/t/tfmigrate.rb @@ -0,0 +1,41 @@ +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.2.tar.gz" + sha256 "6ca61f363e8eb07f6d68df961e16647c7d98105aee2f7cbfdc1a9b741cb2e9e6" + license "MIT" + head "https://github.com/minamijoyo/tfmigrate.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e77933fa8645a86fb763d17bf0c4bc68f6cd28c3a692f917340b441c74700a7a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e77933fa8645a86fb763d17bf0c4bc68f6cd28c3a692f917340b441c74700a7a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e77933fa8645a86fb763d17bf0c4bc68f6cd28c3a692f917340b441c74700a7a" + sha256 cellar: :any_skip_relocation, sonoma: "0d9f17aa8f8f08178380b04dca0ea7810f84bf2cbb9e0058cffc9cadaebd1e49" + sha256 cellar: :any_skip_relocation, ventura: "0d9f17aa8f8f08178380b04dca0ea7810f84bf2cbb9e0058cffc9cadaebd1e49" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0f7173102b3ee87af7ae48301b773e9cd909b90bfe4184c8073082ec91f0f83" + 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..b3c4ca35ce05a --- /dev/null +++ b/Formula/t/tfmv.rb @@ -0,0 +1,40 @@ +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.6.tar.gz" + sha256 "67bb684c723d2abdfd0ecfbce030503e05940103305ee131c6b4da64f86c84b9" + license "MIT" + head "https://github.com/suzuki-shunsuke/tfmv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "17ed9dfd157233dfd46b51ab27d61dfe27ac116f5a69c1c1c1cfdcf4188b5c79" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "17ed9dfd157233dfd46b51ab27d61dfe27ac116f5a69c1c1c1cfdcf4188b5c79" + sha256 cellar: :any_skip_relocation, arm64_ventura: "17ed9dfd157233dfd46b51ab27d61dfe27ac116f5a69c1c1c1cfdcf4188b5c79" + sha256 cellar: :any_skip_relocation, sonoma: "8b9ce03dd144442551b098971829eef99e9baaf5248f4b2c5aa6a9bfa32199ff" + sha256 cellar: :any_skip_relocation, ventura: "8b9ce03dd144442551b098971829eef99e9baaf5248f4b2c5aa6a9bfa32199ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37da63bcd510112e2ccfbdf666bb12b1f741ef1de37afda965510bfedac63b7f" + 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..461762f312dfd --- /dev/null +++ b/Formula/t/tfocus.rb @@ -0,0 +1,31 @@ +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" + + bottle do + 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/tfprovidercheck.rb b/Formula/t/tfprovidercheck.rb new file mode 100644 index 0000000000000..202dbdc920147 --- /dev/null +++ b/Formula/t/tfprovidercheck.rb @@ -0,0 +1,58 @@ +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.4.tar.gz" + sha256 "999816d11c9b30a01af4725a118e2e974f6927875fe0d1045ae6e0ab49e95284" + license "MIT" + head "https://github.com/suzuki-shunsuke/tfprovidercheck.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "677d19930251eac409e75565e6325a56fc7e31014329b3719434de20212c085f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "677d19930251eac409e75565e6325a56fc7e31014329b3719434de20212c085f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "677d19930251eac409e75565e6325a56fc7e31014329b3719434de20212c085f" + sha256 cellar: :any_skip_relocation, sonoma: "0f6036c235d4088cbaac59cb2165bad5d2496a0d63ae31586c4396a59f073513" + sha256 cellar: :any_skip_relocation, ventura: "0f6036c235d4088cbaac59cb2165bad5d2496a0d63ae31586c4396a59f073513" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f889a0a70843517244b54a61a5de472e7d47313f7aee0fbc9b460d8994a34b5c" + 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..3e6c1bae66659 --- /dev/null +++ b/Formula/t/tfproviderlint.rb @@ -0,0 +1,44 @@ +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_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=#{build.head? ? "dev" : ""} + ] + + 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..de98333cff744 --- /dev/null +++ b/Formula/t/tfschema.rb @@ -0,0 +1,34 @@ +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_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, 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..eac3502b70d51 --- /dev/null +++ b/Formula/t/tfsec.rb @@ -0,0 +1,51 @@ +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_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..5aa3429b074fb --- /dev/null +++ b/Formula/t/tfsort.rb @@ -0,0 +1,36 @@ +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.4.0.tar.gz" + sha256 "b1efeee957a11314aa6dfe2cb9f6ae3e8ee8bed18351daaf7348b13bbd818d4c" + license "Apache-2.0" + head "https://github.com/AlexNabokikh/tfsort.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "59fe21c616a425dfa59d7a05b1cea91427d43b853641492804a8aba4d7ee202d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "59fe21c616a425dfa59d7a05b1cea91427d43b853641492804a8aba4d7ee202d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "59fe21c616a425dfa59d7a05b1cea91427d43b853641492804a8aba4d7ee202d" + sha256 cellar: :any_skip_relocation, sonoma: "c9e422de4603bda51a952451bd408bd01c2962be21e9a514ad10c5359946bcbd" + sha256 cellar: :any_skip_relocation, ventura: "c9e422de4603bda51a952451bd408bd01c2962be21e9a514ad10c5359946bcbd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3f719d148a0502350a980736ff85a2ad01fd2fb9fe07c79ad8e9f6a0a7101d8d" + 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/tfupdate.rb b/Formula/t/tfupdate.rb new file mode 100644 index 0000000000000..af15d94db4425 --- /dev/null +++ b/Formula/t/tfupdate.rb @@ -0,0 +1,36 @@ +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.1.tar.gz" + sha256 "0d9820f93f9f80c17e01da8bd3f4256642e93c86a1356b5d4418cb93797ec95d" + license "MIT" + head "https://github.com/minamijoyo/tfupdate.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "00d282c53811c76412b0e2b70e46ebed61000da5ad00626b685746c4c5c751bb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "00d282c53811c76412b0e2b70e46ebed61000da5ad00626b685746c4c5c751bb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "00d282c53811c76412b0e2b70e46ebed61000da5ad00626b685746c4c5c751bb" + sha256 cellar: :any_skip_relocation, sonoma: "e64ef15ad842060603995ea401b5c2076fecc986a847ce0561f37c786e956e09" + sha256 cellar: :any_skip_relocation, ventura: "e64ef15ad842060603995ea401b5c2076fecc986a847ce0561f37c786e956e09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "76812d8345297e0e89375753cff0dee7a3b1def82bd9b8e7c41caa9f15e2ae99" + 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..4861b45af88d9 --- /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: "master" + + 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..2f61cc553d013 --- /dev/null +++ b/Formula/t/tgif.rb @@ -0,0 +1,101 @@ +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 + + bottle do + 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 mojave: "3ab28b39b5a4b0c5cea21b096c0e8b2317725f8b6da6455ab365e8d13ac644a4" + sha256 high_sierra: "9c35ee5713a7efcdedb42d4602213dd94e84385bb8c5b0f9331706d6e897d08c" + 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..c06b87a5b41b3 --- /dev/null +++ b/Formula/t/tgpt.rb @@ -0,0 +1,30 @@ +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.10.0.tar.gz" + sha256 "0e312176908d581eeb7f0df8fcd0524a4aa4702029d50f553f0f75d6c15bc0d9" + license "GPL-3.0-only" + head "https://github.com/aandrew-me/tgpt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7ac29989e7df6f0eb1779469e3c07608422bcc9b9dd16a52f3d422f3b7522a33" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7ac29989e7df6f0eb1779469e3c07608422bcc9b9dd16a52f3d422f3b7522a33" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7ac29989e7df6f0eb1779469e3c07608422bcc9b9dd16a52f3d422f3b7522a33" + sha256 cellar: :any_skip_relocation, sonoma: "9cb050173265ba399c3884be9fd64fcaccf69931a729c66a550dbcfc47c41fce" + sha256 cellar: :any_skip_relocation, ventura: "9cb050173265ba399c3884be9fd64fcaccf69931a729c66a550dbcfc47c41fce" + sha256 cellar: :any_skip_relocation, x86_64_linux: "822a8e1a33f876b00a794681e74f6c687a2dabfcdbd811bc345c8ef684309383" + 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}/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..febf0c1fd2175 --- /dev/null +++ b/Formula/t/tgui.rb @@ -0,0 +1,69 @@ +class Tgui < Formula + desc "GUI library for use with sfml" + homepage "https://tgui.eu/" + url "https://github.com/texus/TGUI/archive/refs/tags/v1.9.0.tar.gz" + sha256 "7dcdb67353e9822fe7e79328ffe1ef3ca28e3a495c91f0536c8aeb250c8c0c4b" + license "Zlib" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "9de6a742a67b9060fe72d9fce6bbb5a0c7b9b36bb3b758d81b8654e9b632f96f" + sha256 cellar: :any, arm64_sonoma: "c59815ec11d8d68a337c19ec94ef57f31a26bb1abf3383cc32c5f4e30cb34a31" + sha256 cellar: :any, arm64_ventura: "6140cd223e0cdc575fe6753846f3f9373802bff1d1bc8316b27d732e11d735ec" + sha256 cellar: :any, sonoma: "42b27869e89eda046f0af2c9a47b8df667dc76cfa1bf945c09cc598836f17442" + sha256 cellar: :any, ventura: "4574c8f7dcb63e4b8635100ec2e92b2738b48bf586675aed1f381c7a3bd53c1c" + sha256 cellar: :any_skip_relocation, arm64_linux: "77683c26c5a9f470456e5a2ce74f360255d4cf4af3f996ca2afc6564d1a092dc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "834a0f6457dd8a66bd060b50c419da0d765fc292fab6679d250a14a404ffd894" + 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..894d85d90e6ee --- /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.38.0.tar.gz" + sha256 "2c9fef368e612c24d3270b57685e8025dfc0cdf6c3717cce801483e6ec499104" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3acd83c72283c5fb2993ae05d0aacadaa7776c1724b0e20ff8620b3187a4fbd6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "69b8eaaf4a0d6ef60c4827144d20b787db7a94854e3a20715187babffadbf92c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9b2549cbe1a0136d8e297f7a654007f05b206422de631be4453cf206b425863f" + sha256 cellar: :any_skip_relocation, sonoma: "93862084a575ebab8e795ec3f78ed4ab00cf2ba90087b09e537c696f89762cb1" + sha256 cellar: :any_skip_relocation, ventura: "1a058d173ff24cb2c8b384e5dd1c05bf35be149534003f89de6465ffe50a905a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "132fed8abc06556b1c3fd1d5927c4586ef2023c102814c2ba1963ecb6ae552e7" + 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..d632d69d363cb --- /dev/null +++ b/Formula/t/the-way.rb @@ -0,0 +1,35 @@ +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_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..10b5e26bdf200 --- /dev/null +++ b/Formula/t/the_platinum_searcher.rb @@ -0,0 +1,47 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "6b7fb2ff2ca2b5a0d264a7733a59eb0e1b68e211d15a261f6bbcab5664bb6ff7" + 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..79a09e5d5e323 --- /dev/null +++ b/Formula/t/the_silver_searcher.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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, mojave: "e57f89664f48c131dfb462dc4be2f5265867d827f82efb1c3841ba71d9156ed0" + sha256 cellar: :any, high_sierra: "0bf5394d8ab5f61b8fbb593249f556f13b358d16eb0d3c97215be3da0476e94b" + sha256 cellar: :any, sierra: "2365e24e5d0b1bef64b35c6a8f9e4f61d1f38eafe38c06d6e0acefc6a9a955db" + sha256 cellar: :any, el_capitan: "1f35dcee133d638a16462db711560b624020e9dd8f732ac5a6f13a09b694421a" + 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..753ee1b422dab --- /dev/null +++ b/Formula/t/thefuck.rb @@ -0,0 +1,137 @@ +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 5 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e9b85cc4f5627d8e8df33c99af43c0a9871b07ffc2eb9d1ff9b6d03e1cfcce52" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6b9bbe3ced4a99341cceb45f303392feb020df75b61c34be9cd9303d600c95bc" + sha256 cellar: :any_skip_relocation, arm64_ventura: "881e92e475fe094f95d2a8c29012383bb85366cb4dbcd5551557f8aef8702229" + sha256 cellar: :any_skip_relocation, sonoma: "90e149f15d0eb582f0a1eee2318cc26ee5872696b9739f784262f2c674ac3c74" + sha256 cellar: :any_skip_relocation, ventura: "a617ea4dee27842f3c8036b52a5f7e5c94ccd2a3bceb879daa310e53582e25a3" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d9e84aaaf57c182157cd816bae166c2cdecf3b85e9c281251f0132b6d331e56" + sha256 cellar: :any_skip_relocation, x86_64_linux: "db78af05631768ac7364dffaaf9782679d837b882d6dae9ae9dc8e020366b5cd" + end + + depends_on "python@3.13" + + 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/66/0c/8d907af351aa16b42caae42f9d6aa37b900c67308052d10fdce809f8d952/decorator-5.1.1.tar.gz" + sha256 "637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/18/c7/8c6872f7372eb6a6b2e4708b88419fb46b857f7a2e1892966b851cc79fc9/psutil-6.0.0.tar.gz" + sha256 "8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2" + 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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..bdeb2dcc62cb0 --- /dev/null +++ b/Formula/t/theharvester.rb @@ -0,0 +1,361 @@ +class Theharvester < Formula + include Language::Python::Virtualenv + + desc "Gather materials from public sources (for pen testers)" + homepage "https://www.edge-security.com/theharvester.php" + url "https://github.com/laramies/theHarvester/archive/refs/tags/4.7.1.tar.gz" + sha256 "de59067427427dfea9f446419069fa4f8ad77ce3261426fd812a0d9af28a518f" + license "GPL-2.0-only" + head "https://github.com/laramies/theHarvester.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4513319722fcb3694160214af327c3c97a46ffe26127c3fe195b53212f682895" + sha256 cellar: :any, arm64_sonoma: "e56e6a98f2d7990dcb4a48b2c3057672b22487e28a13640c356e7e0aaa51c865" + sha256 cellar: :any, arm64_ventura: "62cee95195b8e9cb88fec68bb640caceba5d2bec26d8a568ee7276851e95d264" + sha256 cellar: :any, sonoma: "af74973f684d186fcda85b563937bca4aea7202dfc93e0a484c7f854a2a18ced" + sha256 cellar: :any, ventura: "33a2fa53523e18189187e42cb907725410ccb452297f833018df0b9f3328dc93" + sha256 cellar: :any_skip_relocation, arm64_linux: "e69bf1c31eceffdf62b354916c4ca50217f6b528f92183198872dfa41d8eca69" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fb3002e14bc4976d213a1f15982669f657017a47dfb49571d94e5b3b32dd5e8" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libffi" + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "aiodns" do + url "https://files.pythonhosted.org/packages/e7/84/41a6a2765abc124563f5380e76b9b24118977729e25a84112f8dfb2b33dc/aiodns-3.2.0.tar.gz" + sha256 "62869b23409349c21b072883ec8998316b234c9a9e36675756e8e317e8768f72" + 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/f1/d9/1c4721d143e14af753f2bf5e3b681883e1f24b592c0482df6fa6e33597fa/aiohttp-3.11.16.tar.gz" + sha256 "16f8a2c9538c14a557b4d309ed4d0a7c60f0253e8ed7b6c9a2859a7582f8b1b8" + 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/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz" + sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54" + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + 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/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/f0/3c/adaf39ce1fb4afdd21b611e3d530b183bb7759c9b673d60db0e347fd4439/beautifulsoup4-4.13.3.tar.gz" + sha256 "1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b" + end + + resource "censys" do + url "https://files.pythonhosted.org/packages/08/69/76c19cff1cac71420eb731300f39bbba90308a23a8bca9bd6a6d5bafdeff/censys-2.2.16.tar.gz" + sha256 "c70680ee84630fba20c3d14f1ed0d9c2a5a2d54009d0821fbaa9fed8119c4ee3" + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/5f/1d/45434f64ed749540af821fd7e42b8e4d23ac04b1eda7c26613288d6cd8a8/click-plugins-1.1.1.tar.gz" + sha256 "46ab999744a9d831159c3411bb0c79346d94a444df9a3a3742e9ed63645f264b" + 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/f4/55/ae499352d82338331ca1e28c7f4a63bfd09479b16395dce38cf50a39e2c2/fastapi-0.115.12.tar.gz" + sha256 "1e2c2a2646905f9e83d32f04a3f86aff4a286669c6c950ca95b5fd68c2602681" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + end + + resource "greenlet" do + url "https://files.pythonhosted.org/packages/2f/ff/df5fede753cc10f6a5be0931204ea30c35fa2f2ea7a35b25bdaf4fe40e46/greenlet-3.1.1.tar.gz" + sha256 "4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467" + end + + resource "h11" do + url "https://files.pythonhosted.org/packages/f5/38/3af3d3633a34a3316095b39c8e8fb4853a28a536e55d347bd8d8e9a14b03/h11-0.14.0.tar.gz" + sha256 "8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "limits" do + url "https://files.pythonhosted.org/packages/d3/03/7adefba87708cdf195ef574b6170cf9f018fefc4e9744b27eaa666ee4a45/limits-4.7.3.tar.gz" + sha256 "993b9cda18c63e64760756f66190157e641b60919626a2690ca3133e1ed00644" + 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/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz" + sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" + 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/da/2c/e367dfb4c6538614a0c9453e510d75d66099edf1c4e69da1b5ce691a1931/multidict-6.4.3.tar.gz" + sha256 "3ada0b058c9f213c5f95ba301f922d402ac234f1111a7d8fd70f1b99f3c281ec" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "playwright" do + url "https://github.com/microsoft/playwright-python/archive/refs/tags/v1.51.0.tar.gz" + sha256 "9c082490a1769eaa1ccb93786e1b1b1ef2257991dd1ab56056f8f4b9601ef85e" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/07/c8/fdc6686a986feae3541ea23dcaa661bd93972d3940460646c6bb96e21c40/propcache-0.3.1.tar.gz" + sha256 "40d980c33765359098837527e18eddefc9a24cea5b45e078a7f3bb5b032c6ecf" + end + + resource "pycares" do + url "https://files.pythonhosted.org/packages/6c/ac/05e32fe0abecf98b58cb28646d59280ebad8d79b9785ad6771fa830a458b/pycares-4.6.0.tar.gz" + sha256 "b8a004b18a7465ac9400216bc3fad9d9966007af1ee32f4412d2b3a94e33456e" + 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/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + end + + resource "pyee" do + url "https://files.pythonhosted.org/packages/0a/37/8fb6e653597b2b67ef552ed49b438d5398ba3b85a9453f8ada0fd77d455c/pyee-12.1.1.tar.gz" + sha256 "bbc33c09e2ff827f74191e3e5bbc6be7da02f627b7ec30d86f5ce1a6fb2424a3" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/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 "retrying" do + url "https://files.pythonhosted.org/packages/ce/70/15ce8551d65b324e18c5aa6ef6998880f21ead51ebe5ed743c0950d7d9dd/retrying-1.3.4.tar.gz" + sha256 "345da8c5765bd982b1d1915deb9102fd3d1f7ad16bd84a9700b85f64d24e8f3e" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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/d7/ce/fbaeed4f9fb8b2daa961f90591662df6a86c1abf25c548329a86920aedfb/soupsieve-2.6.tar.gz" + sha256 "e2e68417777af359ec65daac1057404a3c8a5455bb8abc36f1a9866ab1a51abb" + end + + resource "starlette" do + url "https://files.pythonhosted.org/packages/ce/20/08dfcd9c983f6a6f4a1000d934b9e6d626cff8d2eeb77a89a68eef20a2b7/starlette-0.46.2.tar.gz" + sha256 "7f7361f34eed179294600af672f565727419830b54b7b084efe44bb82d2fccd5" + end + + resource "tldextract" do + url "https://files.pythonhosted.org/packages/20/7a/e469c4f71231a848492da31a7be6921a6cd04ecc8eed58e924bece0fb6de/tldextract-5.2.0.tar.gz" + sha256 "c3a8c4daf2c25a57f54d6ef6762aeac7eff5ac3da04cdb607130be757b8457ab" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "uvicorn" do + url "https://files.pythonhosted.org/packages/4b/4d/938bd85e5bf2edeec766267a5015ad969730bb91e31b44021dfe8b22df6c/uvicorn-0.34.0.tar.gz" + sha256 "404051050cd7e905de2c9a7e61790943440b3416f49cb409f965d9dcd0fa73e9" + end + + resource "uvloop" do + url "https://files.pythonhosted.org/packages/af/c0/854216d09d33c543f12a44b393c402e89a920b1a0a7dc634c42de91b9cf6/uvloop-0.21.0.tar.gz" + sha256 "3bf12b0fda68447806a7ad847bfa591613177275d35b6724b1ee573faa3704e3" + end + + resource "wrapt" do + url "https://files.pythonhosted.org/packages/c3/fc/e91cc220803d7bc4db93fb02facd8461c37364151b8494762cc88b0fbcef/wrapt-1.17.2.tar.gz" + sha256 "41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3" + end + + resource "xlsxwriter" do + url "https://files.pythonhosted.org/packages/a1/08/26f69d1e9264e8107253018de9fc6b96f9219817d01c5f021e927384a8d1/xlsxwriter-3.2.2.tar.gz" + sha256 "befc7f92578a85fed261639fb6cde1fd51b79c5e854040847dde59d4317077dc" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/fc/4d/8a8f57caccce49573e567744926f88c6ab3ca0b47a257806d1cf88584c5f/yarl-1.19.0.tar.gz" + sha256 "01e02bb80ae0dbed44273c304095295106e1d9470460e773268a27d11e594892" + 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..136b30d997b5c --- /dev/null +++ b/Formula/t/theora.rb @@ -0,0 +1,83 @@ +class Theora < Formula + desc "Open video compression format" + homepage "https://www.theora.org/" + license "BSD-3-Clause" + + stable do + url "https://ftp.osuosl.org/pub/xiph/releases/theora/libtheora-1.1.1.tar.bz2" + mirror "https://mirror.csclub.uwaterloo.ca/xiph/releases/theora/libtheora-1.1.1.tar.bz2" + sha256 "b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-pre-0.4.2.418-big_sur.diff" + sha256 "83af02f2aa2b746bb7225872cab29a253264be49db0ecebb12f841562d9a2923" + end + end + + 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 + rebuild 4 + sha256 cellar: :any, arm64_sequoia: "19801e6ceb5c12db4621afff8746a3ef77581226559ec728c6c07a49659b23d3" + sha256 cellar: :any, arm64_sonoma: "7f57dbcd0a12b47f7f886f9474d2ffa04df1ff62fc9c6a330c4f828386d94301" + sha256 cellar: :any, arm64_ventura: "b4b1fe0a53ce538d88ca098fce885c20cca62175c2d2141ad96454e7163674a6" + sha256 cellar: :any, arm64_monterey: "56008e9450fcf3f712f34ec79407b8e738953d5fc50feaf72a6434dd28fc1101" + sha256 cellar: :any, arm64_big_sur: "1e5271cb88e3dad8eb5f06460e7f3f2cec0129679c7f7fb4f84db1d09664b827" + sha256 cellar: :any, sonoma: "53cce2c2f66137baf358f0a625a5095fa1eab222cda32ecbe8fe202153375cf8" + sha256 cellar: :any, ventura: "cab83d4adc91a223bdc43ca9e26f3a15d37ffcda352be74de313ffe2c1160189" + sha256 cellar: :any, monterey: "0bdb8acd2fafffff1e172c94aa6f67ce20ea67760d5296ac108ca1ec7e9e4c22" + sha256 cellar: :any, big_sur: "7ba57255df2c2f4563767031c6b9ead9a93883217644e9e64b5523e26d7b1088" + sha256 cellar: :any, catalina: "1fcbd50039f580bd85554af2d831c28f83613b5d26969f577f7fe87b3c55db67" + sha256 cellar: :any, mojave: "6fdb09d75fc6e64b266a185e711c2964e803d8f10c0d40ccb8d572c536c24d3a" + sha256 cellar: :any_skip_relocation, arm64_linux: "8235b8c9b7f4f086e49a8d9845002f10eef213f0d51d8b7b580d87edb19c7bc3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4ac10b8e87b29874cd0e6d61de22b1123cbc7757f0eae7e5c195dd8c1ab70ef8" + end + + head do + url "https://gitlab.xiph.org/xiph/theora.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + end + + depends_on "libtool" => :build + depends_on "pkgconf" => :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-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..926d212998ec7 --- /dev/null +++ b/Formula/t/thors-mongo.rb @@ -0,0 +1,79 @@ +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 + + bottle do + 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" + + system "./brew/init" + + system "./configure", "--disable-vera", + "--prefix=#{prefix}", + "--disable-test-with-integration", + "--disable-test-with-mongo-query", + "--disable-Mongo-Service" + + 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..e6780f0e15469 --- /dev/null +++ b/Formula/t/thrax.rb @@ -0,0 +1,78 @@ +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.9.tar.gz" + sha256 "1e6ed84a747d337c28f2064348563121a439438f5cc0c4de4b587ddf779f1ae3" + license "Apache-2.0" + revision 1 + + 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_sequoia: "1eb8c3d01b8131ea4cc7040397c4eb266c02d517d9076722f322075c93521674" + sha256 cellar: :any, arm64_sonoma: "b3bfcb2f229d5709774df18f6bd4d4915a03218b430bc4cae498cfc98b387569" + sha256 cellar: :any, arm64_ventura: "87aea2fcc77a37ff7eb3118757a6e224c8e4704a26cae719a8a123bac9b8a3bb" + sha256 cellar: :any, sonoma: "63a97b5dfbe107ab19a9780f7fd346e421af9ecadc30a0faca9110707cafacec" + sha256 cellar: :any, ventura: "ea2651cc17ba7837e2e6f362124c9f6c9d06034521dfd86468d4e13220fc9893" + sha256 cellar: :any_skip_relocation, arm64_linux: "cd4e4db424d763840cb2bb05a46a5be7d817ce37e173b99dd3c9e9fe0b234826" + sha256 cellar: :any_skip_relocation, x86_64_linux: "da7eb89d693322a62b6409eaf8d21a502d307401726f5f8563695944350ab92d" + 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 "openfst" + uses_from_macos "python", since: :catalina + + # patch to build with openfst 1.8.4, notified upstream about this patch + patch :DATA + + 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 + +__END__ +diff --git a/src/include/thrax/algo/stringmap.h b/src/include/thrax/algo/stringmap.h +index f2ea7a7..6ee0a7c 100644 +--- a/src/include/thrax/algo/stringmap.h ++++ b/src/include/thrax/algo/stringmap.h +@@ -180,7 +180,7 @@ bool StringMapCompile(internal::ColumnStringFile *csf, MutableFst *fst, + const auto log_line_compilation_error = [&csf, &line]() { + LOG(ERROR) << "StringFileCompile: Ill-formed line " << csf->LineNumber() + << " in file " << csf->Filename() << ": `" +- << ::fst::StringJoin(line, "\t") << "`"; ++ << ::fst::StrJoin(line, "\t") << "`"; + }; + switch (line.size()) { + case 1: { +@@ -225,7 +225,7 @@ bool StringMapCompile(const std::vector> &lines, + for (const auto &line : lines) { + const auto log_line_compilation_error = [&line]() { + LOG(ERROR) << "StringMapCompile: Ill-formed line: `" +- << ::fst::StringJoin(line, "\t") << "`"; ++ << ::fst::StrJoin(line, "\t") << "`"; + }; + switch (line.size()) { + case 1: { diff --git a/Formula/t/threadweaver.rb b/Formula/t/threadweaver.rb new file mode 100644 index 0000000000000..b8b8ed7f732a1 --- /dev/null +++ b/Formula/t/threadweaver.rb @@ -0,0 +1,55 @@ +class Threadweaver < Formula + desc "Helper for multithreaded programming" + homepage "https://api.kde.org/frameworks/threadweaver/html/index.html" + url "https://download.kde.org/stable/frameworks/6.14/threadweaver-6.14.0.tar.xz" + sha256 "a8f71f7e69751e36dbc7fce9581f55b66844bc68df6af2e8a94c22c8fe9870ae" + 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_sonoma: "db99103e12c52aa1baa725a84329513887518c445cb9077bd2e351ad64ffbff0" + sha256 cellar: :any, arm64_ventura: "4329f62cbe8f7a8f10d206a07a72933e87f462891130454c7b8658ea41f6ac32" + sha256 cellar: :any, sonoma: "a9de67fc538a6c36e6df6161d80ed51046a4ba85be4f4a75c41872f930bebe62" + sha256 cellar: :any, ventura: "3eb5bbfe73a9e135e78d047d7f91d733d45f3ebd6399cfa821110888235d3376" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c179eda9421fe0b32826fe9499efead7588d0b273d69751b87f04fb2d00cf20d" + end + + depends_on "cmake" => [:build, :test] + depends_on "doxygen" => :build + depends_on "extra-cmake-modules" => [:build, :test] + depends_on "qt" + + 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..b3824a09ef686 --- /dev/null +++ b/Formula/t/threatcl.rb @@ -0,0 +1,36 @@ +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.2.tar.gz" + sha256 "de8d140cad1d5d00114712d2cb8325a1f3a8a8dac94f0e0d25c590bfb486639e" + license "MIT" + head "https://github.com/threatcl/threatcl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4e719ca2e07fe822fe369f7c29d1a9c24bb22db51f1a2117e415e7acd203ee3d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "677b1c7428e696e7fda2b42adc3b25c5324ff0260db256f0e45249407b4eaec0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a9ba82386458b23a469c2a44f63d0082f29a70e0b4fae6e2f1639d5ea70a4c0f" + sha256 cellar: :any_skip_relocation, sonoma: "46da682adf6735fdadae113fc41d653e5c9ea7a8166baea4f3cc1488454b430f" + sha256 cellar: :any_skip_relocation, ventura: "7a88eab63c27dffe542c17e399c31f3e66c4b094fe84d2e30c0aa9b642fee91b" + sha256 cellar: :any_skip_relocation, arm64_linux: "09cfa3f948a2085274aa67e048987c2696ecc609aabbf8092e13c304474ceaf2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fc4b42f55268b9805ae1f337db8491a91f7ac456cd27b07f3320ecd427355801" + end + + depends_on "go" => :build + + def install + 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..a78f3c3b0d36c --- /dev/null +++ b/Formula/t/three-body.rb @@ -0,0 +1,50 @@ +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" + + bottle do + 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..64684fb4e68a0 --- /dev/null +++ b/Formula/t/threemux.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, mojave: "d8ee02f2139e26800e6fa830e02a09b52df74164ec3cdf2306bf89c4ef6b92f9" + 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..1e8c457c95a20 --- /dev/null +++ b/Formula/t/thrift.rb @@ -0,0 +1,99 @@ +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.21.0/thrift-0.21.0.tar.gz" + mirror "https://archive.apache.org/dist/thrift/0.21.0/thrift-0.21.0.tar.gz" + sha256 "9a24f3eba9a4ca493602226c16d8c228037db3b9291c6fc4019bfe3bd39fc67c" + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "eeb71b60993855c21f047fea4ce798bc758e5e7131e2e0c5c34657ac0bcc4848" + sha256 cellar: :any, arm64_sonoma: "04d15c0e6be86946302dfd384f904a0849819a47f4940ef3e00f85a73e6d0b93" + sha256 cellar: :any, arm64_ventura: "93b2fe6a55f5ae205627808ffcdabb30bf33f6853af28fd13d83a218f26cac67" + sha256 cellar: :any, sonoma: "74376f8d45a9663628a53a5460b6c900a2e2c01b06a20203e0b3d008b74abac5" + sha256 cellar: :any, ventura: "cb800f4e59d0ebd83f4feda5b39400d651539707b7be074c939eb64282c044db" + sha256 cellar: :any_skip_relocation, arm64_linux: "b2811ce2e7531e40bdab091b972eefbd5c98198f3ccc63cdda280c11e1f08db8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "591acbcb3495f691cc81fdd51a6b4196c2a8a40dddbe654045209e157c667632" + 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..dbeff008227f2 --- /dev/null +++ b/Formula/t/thriftgo.rb @@ -0,0 +1,46 @@ +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.1.tar.gz" + sha256 "b6a1555e5fb0264075231ff72babe5c28ccfb1893aec4dd26baf9a0e8fc1908f" + license "Apache-2.0" + head "https://github.com/cloudwego/thriftgo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "53f3fbca6aa77b1b588d06197096cfea7ba232bb3b1e2cabb0b9b390e16e93a5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "53f3fbca6aa77b1b588d06197096cfea7ba232bb3b1e2cabb0b9b390e16e93a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "53f3fbca6aa77b1b588d06197096cfea7ba232bb3b1e2cabb0b9b390e16e93a5" + sha256 cellar: :any_skip_relocation, sonoma: "8837a082a7a66b5f89a4f707077cf73c278d84a41f6c4ec6d001059885b272ce" + sha256 cellar: :any_skip_relocation, ventura: "8837a082a7a66b5f89a4f707077cf73c278d84a41f6c4ec6d001059885b272ce" + sha256 cellar: :any_skip_relocation, arm64_linux: "6fbae7d271c1b3f8435066c5b35b9efb82ac79439ba7ebddb805953c8ff54ab4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "887cf03d5742f5eb02c9e8dabaeb50dcc22b44f4e580f6a61422d5223b276c00" + 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..ac4e68c099395 --- /dev/null +++ b/Formula/t/thrulay.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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, mojave: "8b15107dd47fcf14a6060c2dc1a740c4b6c5be66775486d396a90bd810e6c069" + sha256 cellar: :any, high_sierra: "e0d81a536ac3dce349b093394af8d7b89f531deb1854aa44a5b46068c1e02162" + sha256 cellar: :any, sierra: "00938642d65ba687a0ef83e85f682d6bdb1df02a7807fc3d337e3ca473af1cf9" + sha256 cellar: :any, el_capitan: "74f52b9eaa39092931b68630eef408db6b53e1b0c538ec52950b89d0a4ea5563" + 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..e267ea4abcc7e --- /dev/null +++ b/Formula/t/tidy-html5.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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, mojave: "4ae3afab500044dfd0fb4cf982ce9411859f50548149cc4f99f8720de1bbd754" + sha256 cellar: :any_skip_relocation, arm64_linux: "ff4664d175a951b8e595d017608fcf0981cb95cbba3c094fc8366ea1b1f9cd05" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f80a0abaed47dfa224213a413fbe6f23d1a538cf4bfeb633296f5e7e465fb2d" + end + + depends_on "cmake" => :build + + def install + 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..7123ab4d27baa --- /dev/null +++ b/Formula/t/tidy-viewer.rb @@ -0,0 +1,42 @@ +class TidyViewer < Formula + desc "CLI csv pretty printer" + homepage "https://github.com/alexhallam/tv" + url "https://github.com/alexhallam/tv/archive/refs/tags/1.5.2.tar.gz" + sha256 "3f950c1d05cc7fd5806a49a3f10a9437290e2b24ddf8402ec04d54c63d1a60d5" + 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_sequoia: "73a068ea1c90da7c42f7eb61e16429607c620c7519987417ba192aece9254d37" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a88cb1c9ee8fbcc0fbe1245b414bc396e331e1ee2722eca091b60ac204988a48" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a19cf14db14c07f2ade52a99614d994acaac312c05c3143c60a6a5345f3a2896" + sha256 cellar: :any_skip_relocation, arm64_monterey: "42a42abecc4680536319b6bbbfba8ace4fd18d725e6a1c3bd1edc669a8877b64" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8a17bbc8e7d2b76d5e4495ad8ee47176fb075a1353821a3be5a712c8213aff57" + sha256 cellar: :any_skip_relocation, sonoma: "6641bc5ab6124cea8e7591a4c1b9cd750fa99628f49324d374612bd0d1814399" + sha256 cellar: :any_skip_relocation, ventura: "d3ba5ca8471a577a7c54ce300de86d77887e3ee366022588a58f5f89ef9d98c5" + sha256 cellar: :any_skip_relocation, monterey: "9e7ce7d415590691f06bad36b0d5270fb1bbad9ddfc046fc1f4f8c0473b0a593" + sha256 cellar: :any_skip_relocation, big_sur: "99d8e002b427e3a2a160faeda4e526115538431244faf52dd4bf041118347630" + sha256 cellar: :any_skip_relocation, arm64_linux: "3e44fa91c0257cd46a249043bdf0594b447c8905d76e2d0646a538352f770e58" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b3058a55881b1a5874f31e848f613cee6f97f3891ff4091539323b4c189115fa" + end + + depends_on "rust" => :build + + conflicts_with "television", because: "both install `tv` binaries" + + def install + system "cargo", "install", *std_cargo_args + 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..b6a04916d9ac9 --- /dev/null +++ b/Formula/t/tiff2png.rb @@ -0,0 +1,35 @@ +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 + + bottle do + 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..644eb0e86e1ea --- /dev/null +++ b/Formula/t/tig.rb @@ -0,0 +1,58 @@ +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.5.12/tig-2.5.12.tar.gz" + sha256 "5dda8a098810bb499096e17fc9f69c0a5915a23f46be27209fc8195d7a792108" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ec253fa15a03de0700d9c0f9a14c3ae7b08f571699b3825998206ccabd71064d" + sha256 cellar: :any, arm64_sonoma: "edb0ab2037d0f64854b02b1a833112a5270a5dbe141b4e75308c738b6e27d020" + sha256 cellar: :any, arm64_ventura: "6b982e872791e8a01725f6e1db1c488d9c77e321a0b6769568c503284bb4df1b" + sha256 cellar: :any, sonoma: "f01d03e19a861f8bd0f0d98cfefed23d5c981ee985c7493c7db8c5d1cf2665b4" + sha256 cellar: :any, ventura: "b0a904409d4bd3b97ec6462c54764284783d2ddf93b66ada941b997215c7abd5" + sha256 cellar: :any_skip_relocation, arm64_linux: "6323819fb231932abc3ffddd85db0338395690e5b024c3a671af0996fd93671b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4a4b4183690c0a092452acce166b01db0e86c0fda649dae1b87ca8f5a2de206f" + 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..7097ace473032 --- /dev/null +++ b/Formula/t/tiger-vnc.rb @@ -0,0 +1,64 @@ +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_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" + 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..ef0c959cb331b --- /dev/null +++ b/Formula/t/tika.rb @@ -0,0 +1,52 @@ +class Tika < Formula + desc "Content analysis toolkit" + homepage "https://tika.apache.org/" + url "https://www.apache.org/dyn/closer.lua?path=tika/3.1.0/tika-app-3.1.0.jar" + mirror "https://archive.apache.org/dist/tika/3.1.0/tika-app-3.1.0.jar" + sha256 "73d6fec4f16d056a45dbd14c7748ee7c5946fc8826ea9ae517911e501e094855" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "6b8514dd76bbf0d80792b06d878ab6aacf44c2be4dad3149477ead5742fe0736" + end + + depends_on "openjdk" + + resource "server" do + url "https://www.apache.org/dyn/closer.lua?path=tika/3.1.0/tika-server-standard-3.1.0.jar" + mirror "https://archive.apache.org/dist/tika/3.1.0/tika-server-standard-3.1.0.jar" + sha256 "9e975f14abc005c5bec38494493b6abcfa5496d73b285fb78c3b3d6a4ae157a6" + 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-standard-#{version}.jar", "tika-rest-server" + end + + service do + run [opt_bin/"tika-rest-server"] + working_dir HOMEBREW_PREFIX + end + + test do + assert_match version.to_s, resource("server").version.to_s, "server resource out of sync with formula" + 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..ea523d102119d --- /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.34.4", + revision: "fbf767a62ce3222925ade0d1bacec05f684f792a" + license "MIT" + head "https://github.com/tidwall/tile38.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "961556ed4004e9f02e15aecc09e33deefb6b639e65f7b2231e11741cf98b3fb8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "961556ed4004e9f02e15aecc09e33deefb6b639e65f7b2231e11741cf98b3fb8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "961556ed4004e9f02e15aecc09e33deefb6b639e65f7b2231e11741cf98b3fb8" + sha256 cellar: :any_skip_relocation, sonoma: "846a788b22cb3535efb981f1c29512b46305697390fd4f471b1f80396d27aa33" + sha256 cellar: :any_skip_relocation, ventura: "846a788b22cb3535efb981f1c29512b46305697390fd4f471b1f80396d27aa33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1f58df25a9c8e1ebe2781ed94d098a34540810de08baee3eb9776b04fb9594bd" + 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/tilt.rb b/Formula/t/tilt.rb new file mode 100644 index 0000000000000..2a4cda5c5656b --- /dev/null +++ b/Formula/t/tilt.rb @@ -0,0 +1,47 @@ +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.34.2", + revision: "a2631c109837c74cdbb35121855b3bbcbe1ca53b" + license "Apache-2.0" + head "https://github.com/tilt-dev/tilt.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5e2e9d308918a42f9ef6c172264e0c0e205f9f65b176c5eb25c535e8a6ccb2d3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4613d9d883f6d60c1994e2a1b46ec8dfe0f80bc9220e6eefd38e6953b29916ff" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fdfad6a476ae2f2cc8995ce5f686df51ac9737e7e7c09b9cfad93c2c23ccb605" + sha256 cellar: :any_skip_relocation, sonoma: "9ea3b4f163d680b2bf1f1b83e7e0001b224f6fb11895c12b8726098ccfc0851c" + sha256 cellar: :any_skip_relocation, ventura: "9d26dfbb67d69fac313f53a1cb2847be8a8226b7acb417d1a96455b578191789" + sha256 cellar: :any_skip_relocation, arm64_linux: "d96f7f6761757756edb6acf12560177b9a52721d25ce5785a7977dd4bc1664e7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6049a15825f7ae05d8bd84741ddbf7f76e7b08cf9f1b907f3aa82383b7b25928" + 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..c3611c673877c --- /dev/null +++ b/Formula/t/timedog.rb @@ -0,0 +1,23 @@ +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" + + 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..2b18cc9040d11 --- /dev/null +++ b/Formula/t/timelimit.rb @@ -0,0 +1,47 @@ +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..a8c9a6d18ae80 --- /dev/null +++ b/Formula/t/timewarrior.rb @@ -0,0 +1,42 @@ +class Timewarrior < Formula + desc "Command-line time tracking application" + homepage "https://timewarrior.net/" + url "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v1.8.0/timew-1.8.0.tar.gz" + sha256 "1ea54302dcefa4aa658f89b6b825f0e8b49c04f15cf153a2e7d8bce5525920b4" + license "MIT" + head "https://github.com/GothenburgBitFactory/timewarrior.git", branch: "dev" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7edd9e0034a3bd39c258258841e95b440bc66ec2598daf7777350f84df0e196c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "40022ab9a10321ff7cfdb94aa6c7addc287b49502405ea252a2be3f5425ab7d4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c9e5fcb7c4d143cc6f76ab26bddf904983f62d15f14691189a1c71d0d4749a52" + sha256 cellar: :any_skip_relocation, sonoma: "f54d9143c188b384873fde1f7b6ecb520ffff93db922f9dbe334bb9b764b1ef9" + sha256 cellar: :any_skip_relocation, ventura: "1d62dadfee84d1d5df682c0ab60856a5a17cc4b2fe28c061eb4e41dfdce31b0e" + sha256 cellar: :any_skip_relocation, arm64_linux: "0b8a1aa42b0f42f513e76fe1708b327ea8fc23f7c99b181fa53f336f308c5f89" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cb7285a172a3f71d7c8798d673026f50948933ada3aa28205764ba520523c532" + 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..74ab95115875c --- /dev/null +++ b/Formula/t/timg.rb @@ -0,0 +1,53 @@ +class Timg < Formula + desc "Terminal image and video viewer" + homepage "https://timg.sh/" + url "https://github.com/hzeller/timg/archive/refs/tags/v1.6.2.tar.gz" + sha256 "a5fb4443f55552d15a8b22b9ca4cb5874eb1a988d3b98fe31d61d19b2c7b9e56" + license "GPL-2.0-only" + head "https://github.com/hzeller/timg.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5c8350f7fe1ed4dc4442b36edf9bed57cc7f91d8ed216a23e5b70fd5e094ca6b" + sha256 cellar: :any, arm64_sonoma: "68666166df0ec18cea0727596196fbde09525e366acbc96f280900dee189e1ab" + sha256 cellar: :any, arm64_ventura: "efa5d590ef38f66e6abc82b1d93d5b25b709d8a7ff300c339e82cb646c97cc42" + sha256 cellar: :any, sonoma: "2b7b02c5c71ea66fd8343fd1d2bd3a48921f5f141ab3475f3504daa7b1aca7f5" + sha256 cellar: :any, ventura: "6709b3b50e2e5b42fdc10979f0e54cbc8961f5cb4114689cdf2835738f4ebf72" + sha256 cellar: :any_skip_relocation, arm64_linux: "5382f40353ec7c2e43e38966dc4a859a5ef032f98a6858b76dd76e71cae8a1e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d7b3b2f667e0ce20d21fba8ada97bc1d4c41a4d00171bdc67a4d7b56e062f6dd" + 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..630695bd720d5 --- /dev/null +++ b/Formula/t/timidity.rb @@ -0,0 +1,66 @@ +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 + + bottle do + 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/tin.rb b/Formula/t/tin.rb new file mode 100644 index 0000000000000..4592ea5b52c8f --- /dev/null +++ b/Formula/t/tin.rb @@ -0,0 +1,50 @@ +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_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..2155bb9b12bef --- /dev/null +++ b/Formula/t/tinc.rb @@ -0,0 +1,128 @@ +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 + + bottle do + rebuild 1 + 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..aa75d33714803 --- /dev/null +++ b/Formula/t/tintin.rb @@ -0,0 +1,44 @@ +class Tintin < Formula + desc "MUD client" + homepage "https://tintin.mudhalla.net/" + url "https://github.com/scandum/tintin/releases/download/2.02.42/tintin-2.02.42.tar.gz" + sha256 "ae3396fe40a246dd09d8c31a232202db1827a11e6fbebfa9b1f413e7fd1807c4" + license "GPL-3.0-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "f7e297d0dccb6ab59b5d6fe3b6e0a80e288fef30ccae1d15afe2e148d0f13082" + sha256 cellar: :any, arm64_sonoma: "baf16649efa1cb54f57f398d1feaa25cc9e4fde3bdcb97ea14b1c6f695a3e0aa" + sha256 cellar: :any, arm64_ventura: "dcd49d734e84046e1517ff268c77660bbcd8ba8f7793a010f8f80b08c4ba19ba" + sha256 cellar: :any, sonoma: "698c40d0d6db51cdbe86646169120805cf53482072eede0ba54bdbd81780c700" + sha256 cellar: :any, ventura: "9c59d0ef2e18563f0d9e6b0d132a03b452ce67613c147d16753ac3f977f3fff3" + sha256 cellar: :any_skip_relocation, arm64_linux: "d8121a277dec9b7881db528e6752d1a2d23748fdcba1485a598a563ca1acd365" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73211f73ffa77b2e9f5795784ea9440754c3e4a130a164d44b8e1bd059435505" + 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.rb b/Formula/t/tiny.rb new file mode 100644 index 0000000000000..405f133f81c35 --- /dev/null +++ b/Formula/t/tiny.rb @@ -0,0 +1,44 @@ +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_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..46554b6795a0f --- /dev/null +++ b/Formula/t/tinycdb.rb @@ -0,0 +1,85 @@ +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 + + bottle do + 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..f620e04830bfe --- /dev/null +++ b/Formula/t/tinymist.rb @@ -0,0 +1,58 @@ +class Tinymist < Formula + desc "Language server for Typst" + homepage "https://myriad-dreamin.github.io/tinymist/" + url "https://github.com/Myriad-Dreamin/tinymist/archive/refs/tags/v0.13.12.tar.gz" + sha256 "f7cb81e9aac04a5aafeb8f19161204174d9072935b93df9202f1583bed826c51" + 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_sequoia: "335525bcc8838724822e6298b806edae38f6cda0ab301b97e485a8807188a33a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f30f0cdf15bf36c72045673f3f77b3a151a54b02b38d10e05585ff9d0d24a3a4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "22e6537840e41597fa49e7b4f356d70ed4c5bba8bc70582dc8e1651a1142634a" + sha256 cellar: :any_skip_relocation, sonoma: "cbd27529d898b7c0bc9eeeded47eebbe4dbe7657874df1796b5f21006e4c6e0b" + sha256 cellar: :any_skip_relocation, ventura: "8ca7479fdb608921995a6ee4915e2d5aeaa788e0c489074bda89e98974a20b19" + sha256 cellar: :any_skip_relocation, arm64_linux: "4791bd7361982b67e0a8eb2b369510fce7838fa29254bb35a0781b53565f2d95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "43f78aa50ad6ab929e1d005cd288907916d40e8df3a932bc627db21fc5d960aa" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "crates/tinymist") + 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 = IO.popen(bin/"tinymist", "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..a5cc33cd8df4a --- /dev/null +++ b/Formula/t/tinyproxy.rb @@ -0,0 +1,71 @@ +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_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..184c596aceb40 --- /dev/null +++ b/Formula/t/tinysearch.rb @@ -0,0 +1,42 @@ +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.8.2.tar.gz" + sha256 "103214d77f0624bbb7e396667136156fdb8c8c7abeb6860adb231bf2a00b256d" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/tinysearch/tinysearch.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "604da29b5763cbd83ee3851adf412ebc0683a39f82c4f6fb5db430c21e5804b8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "22ba810fa21cf5ed9b4b3da171f5c528812ee9a7347ed87f658dd9c6cb930b22" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d3112dab46ff4f6ebfcd130e186cca018d7e72cf503a6a74b8e632dfe30ff147" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e6419da17e1e7c0f7bc74eeefd60d9fec429f9a351bfa6732336207da27ba62e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "1a3f5895d2f977f0c32c7a80798922f56ea1f628bb6522de0243a74ef9ee6635" + sha256 cellar: :any_skip_relocation, sonoma: "0150d38ad3672b677894cb99071ad87464ee130a5aca00360197fb3cc488afab" + sha256 cellar: :any_skip_relocation, ventura: "149fcc1be09119c692b20381ed2646170c004909a1998ddab8b5e451d19e6c0c" + sha256 cellar: :any_skip_relocation, monterey: "bb5e206aff6a7ffbf2bf1da5dbb9907e6e72873ad507059f53699984080e6fe6" + sha256 cellar: :any_skip_relocation, big_sur: "0a256b304d49a871b20915721fde4aea47ef132afa5cd537c6bfba36b8ff24d9" + sha256 cellar: :any_skip_relocation, arm64_linux: "a3357914b084ecdc5935888629a57cea9b210b263ea6f6c9a53f749d220bf410" + sha256 cellar: :any_skip_relocation, x86_64_linux: "741bdce133c7ac5a2fecddb639fa17b3d7b11c3a2adda9f7998bf69e5b2376ce" + 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 bin/"tinysearch", pkgshare/"fixtures/index.json" + assert_path_exists testpath/"wasm_output/tinysearch_engine_bg.wasm" + assert_match "A tiny search engine for static websites", (testpath/"wasm_output/package.json").read + end +end diff --git a/Formula/t/tinysparql.rb b/Formula/t/tinysparql.rb new file mode 100644 index 0000000000000..8fa8cdb0d29fc --- /dev/null +++ b/Formula/t/tinysparql.rb @@ -0,0 +1,106 @@ +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.9/tinysparql-3.9.2.tar.xz" + sha256 "14ce039024135e181022bcce4b1aad2e00377dd9c7d812b98391ccfc756dad8e" + 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_linux: "ad70717895214c5cc08d5998cae06f2cd4f7701fff5f12aee9dbda5e094c11b2" + sha256 x86_64_linux: "c1ad67b48f79ec4f893d00e2232225a15f60d1ef7af281f7dbcb334c0797c79e" + 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 "libxml2" + depends_on :linux # macOS fatal error: 'gio/gdesktopappinfo.h' file not found + depends_on "sqlite" + + conflicts_with "tracker", because: "both install the same libraries" + + 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..1ac03f237fc22 --- /dev/null +++ b/Formula/t/tinysvm.rb @@ -0,0 +1,74 @@ +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 + + bottle do + 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, mojave: "56f1afa09c931eb7e8dfaf46f1a814c1df306e4c20269ef78fddfbdf85a7251a" + sha256 cellar: :any_skip_relocation, high_sierra: "62f0920fdf8f5b7f29cebacc1add1396daef668c67e3d10644d9d35d1b49afc5" + sha256 cellar: :any_skip_relocation, sierra: "a6ad14c984b337bee83372ac6a29ffe7c0491180a302cfcd8f53b1a3ee6816e1" + sha256 cellar: :any_skip_relocation, el_capitan: "2b84b75043ba1d97172e2756e3da870a8ec8e074167ab5402e7a4e1b4c923864" + 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/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__" + + # 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..33321cd6d6a81 --- /dev/null +++ b/Formula/t/tinyxml.rb @@ -0,0 +1,96 @@ +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, mojave: "c1fc1d7fa9e6934412294e921cde90bcfd107b68dbdddd9acf8cae4927190718" + sha256 cellar: :any, high_sierra: "ec0f83018a9ff93c11b6a8c92483056b2771359a14aedfb6dc46e1ab078ce9ac" + sha256 cellar: :any, sierra: "ef8c7bbbae6148e161b6f3369ede8bd3533a32847dc716000b46d26e6fb1c26c" + sha256 cellar: :any, el_capitan: "16e6052892b43e68c45f5122b6802e9bc32001dc9478dfcd89511a24544660e5" + 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..baac1ae603b8f --- /dev/null +++ b/Formula/t/tinyxml2.rb @@ -0,0 +1,38 @@ +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_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..7f81e1e905071 --- /dev/null +++ b/Formula/t/tio.rb @@ -0,0 +1,43 @@ +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_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..f02d9182de190 --- /dev/null +++ b/Formula/t/tippecanoe.rb @@ -0,0 +1,37 @@ +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.78.0.tar.gz" + sha256 "da628c5fa1aec3aba318f6096d2f60d8b4cc78043e1c25e18a4d0975c8262f00" + license "BSD-2-Clause" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bad7cb29c955e82161443cbb4ceaea5c2f363b916ac39caee6dc1858838c769b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f4c6159f9be5c5f8f51086368285c092477e56a9e806c0df5f277c57c4ecc0b6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "11b91e170f02af2ac3a06abe136ed801a63f992deb9a8a07a643af93175d20e6" + sha256 cellar: :any_skip_relocation, sonoma: "cbc643cdac3193b9aa7772a0673ab05d6cad35c06381d8e83d02c5e3dba17a36" + sha256 cellar: :any_skip_relocation, ventura: "fa88fbbf875ed9ea6320eef04a79c900fbf2a75a545582058d475acb2632e9dd" + sha256 cellar: :any_skip_relocation, arm64_linux: "ea7de77825580f3434355a2a15638bfdecbcfba0ea3deb7289d8ba44d291e517" + sha256 cellar: :any_skip_relocation, x86_64_linux: "92a3f5a0750911ebc42d9289149fb924db26add21d1e9080f0423f36e7c741f6" + 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..d7a7e3d09aec1 --- /dev/null +++ b/Formula/t/titan-server.rb @@ -0,0 +1,44 @@ +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, mojave: "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..dd01028d2fb36 --- /dev/null +++ b/Formula/t/tivodecode.rb @@ -0,0 +1,40 @@ +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 + + bottle do + 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, mojave: "efa83924ac8d8e07e539c6d9b3aa5d5d7440fd34bccc1da793ead1224eabdbbf" + sha256 cellar: :any_skip_relocation, high_sierra: "0016f711d79454b154708804c574633c48e472b9a81c257730e5cf4aa00dd220" + sha256 cellar: :any_skip_relocation, sierra: "5682668b2e721933054656cebc49ccb46c382428b77409d94251c6f1dfd3092d" + sha256 cellar: :any_skip_relocation, el_capitan: "d50450e62c6fcf71643ceaf5f33dcf4e904e389c89597ccbe148de3053839ccd" + 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..c6770b68ddfc9 --- /dev/null +++ b/Formula/t/tkdiff.rb @@ -0,0 +1,33 @@ +class Tkdiff < Formula + desc "Graphical side by side diff utility" + homepage "https://tkdiff.sourceforge.io/" + url "https://downloads.sourceforge.net/project/tkdiff/tkdiff/5.7/tkdiff-5-7.zip" + version "5.7" + sha256 "e2dec98e4c2f7c79a1e31290d3deaaa5915f53c8220c05728f282336bb2e405d" + license "GPL-2.0-only" + revision 1 + + livecheck do + url :stable + regex(%r{url=.*?/tkdiff/v?(\d+(?:\.\d+)+)/[^"]+?\.zip}i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "f9df1848b67170c556bedec9313ed342304d7170d544c98840847dd2a7517bcf" + end + + # upstream bug report about running with system tcl-tk, https://sourceforge.net/p/tkdiff/bugs/98/ + depends_on "tcl-tk@8" + + def install + bin.install "tkdiff" + bin.env_script_all_files libexec, PATH: "#{Formula["tcl-tk@8"].opt_bin}:${PATH}" + 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..deb81dfe70c35 --- /dev/null +++ b/Formula/t/tkey-ssh-agent.rb @@ -0,0 +1,79 @@ +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_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, 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/tl-expected.rb b/Formula/t/tl-expected.rb new file mode 100644 index 0000000000000..f98e57f8460cb --- /dev/null +++ b/Formula/t/tl-expected.rb @@ -0,0 +1,60 @@ +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.1.0.tar.gz" + sha256 "1db357f46dd2b24447156aaf970c4c40a793ef12a8a9c2ad9e096d9801368df6" + license "CC0-1.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "ddbe48577c50c3cde2fae8ec584ce33a9c58d9dbb43ea4854a53ee51b75d2c41" + 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..8dd8a3eef8d30 --- /dev/null +++ b/Formula/t/tldr.rb @@ -0,0 +1,42 @@ +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_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" + + 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/tllist.rb b/Formula/t/tllist.rb new file mode 100644 index 0000000000000..ab307f5b94fc9 --- /dev/null +++ b/Formula/t/tllist.rb @@ -0,0 +1,40 @@ +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" + + 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..b799ed96c231c --- /dev/null +++ b/Formula/t/tlrc.rb @@ -0,0 +1,37 @@ +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.11.1.tar.gz" + sha256 "02262b432dd188772577fd3a37f8a236d46d924291ec1d013e419c77f7256f4a" + license "MIT" + head "https://github.com/tldr-pages/tlrc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "80196e92b44c096505b91bf92bec2e8977fc0af0209b2fa1a3f7bb8a5418bbf4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7cc33f44d74c59ce048151d8a24dad087f194f1d3947125880d4d2f605291ffa" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0ce3cb5e0a62793a22eea427210e9c2bd3d9d11666f53e78a854bd275737c137" + sha256 cellar: :any_skip_relocation, sonoma: "78ebe413ffdcc20b39d57be1ecdacc4f724985479921d68bdf63b828497b6718" + sha256 cellar: :any_skip_relocation, ventura: "66f47cc38095e70784b629ca23a09788b51769a0aecad1bbf15031727146d3ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "40801ebf82cda26ff5426892650957b3ccce7af70e4492872f335f23c309a4d6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed920bb75de0ad493b221105e3eaad4528d6f17ab2d75c748fb48ffb46859fa6" + 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..86ecd4050a13b --- /dev/null +++ b/Formula/t/tlsx.rb @@ -0,0 +1,33 @@ +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.1.9.tar.gz" + sha256 "96280c609d8e82258ec2da99487702d1696d6430bdd179cbc64ff035be8f92c9" + 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_sequoia: "1a75b7caa8eb3620f06e521b5089a6f855fbc678a5b33f94d3f4aa7257cc7769" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5f86c2d8958e80ee7fc67d722fb365daf6464db063a9d2628e345ac57c4985b6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b9e4d8105f1b75e0dd35719a9abf3252c0d22c1da0fc85376172467eceb1973" + sha256 cellar: :any_skip_relocation, sonoma: "6ebb76c7c8f89a1865a76458f82b912d7d68b3a203822f88a43e40f4db151150" + sha256 cellar: :any_skip_relocation, ventura: "0c2a977abfdd73a2f4f4e215ec9988620b22ff539b355c42d67922079ef31a31" + sha256 cellar: :any_skip_relocation, x86_64_linux: "64a75bb051709028ee1165ac69fa0ec92189a8e4a0899cc283fd7fc3ecd630d4" + 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..9ef889480f10b --- /dev/null +++ b/Formula/t/tlx.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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 + 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() + { + 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..6a2c87d93a4e9 --- /dev/null +++ b/Formula/t/tmate.rb @@ -0,0 +1,57 @@ +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 + + bottle do + 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, mojave: "7e5158460b898422b4c6e84390d0e8446e2ad52789a30f9942288c5c32acc8a1" + sha256 cellar: :any, high_sierra: "0f4f06d0ab7715adc7f6d33cf7d3c08fd057e7f038a666b360ac4ad6a3449ad9" + 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..0ddfa4255247d --- /dev/null +++ b/Formula/t/tmex.rb @@ -0,0 +1,32 @@ +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.4.tar.gz" + sha256 "d1907435f607993b0dc2da90166ea6d2804b73f94cffdb52a7ca40e6bee63632" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3c6494934f2e31caf6457d71405d8f7fa13fcbed8489a20d1e66c2c910665ada" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3c6494934f2e31caf6457d71405d8f7fa13fcbed8489a20d1e66c2c910665ada" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3c6494934f2e31caf6457d71405d8f7fa13fcbed8489a20d1e66c2c910665ada" + sha256 cellar: :any_skip_relocation, sonoma: "1ffdcd4b358aa710a2bf465baf932722f1e1a4e0eccff83165cb52efcece2526" + sha256 cellar: :any_skip_relocation, ventura: "1ffdcd4b358aa710a2bf465baf932722f1e1a4e0eccff83165cb52efcece2526" + sha256 cellar: :any_skip_relocation, arm64_linux: "1ffdcd4b358aa710a2bf465baf932722f1e1a4e0eccff83165cb52efcece2526" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1ffdcd4b358aa710a2bf465baf932722f1e1a4e0eccff83165cb52efcece2526" + end + + depends_on "tmux" + + uses_from_macos "bash" + + def install + bin.install "tmex" + man1.install "man/tmex.1" + 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..495843106210e --- /dev/null +++ b/Formula/t/tml.rb @@ -0,0 +1,29 @@ +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_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..31c351abd56d8 --- /dev/null +++ b/Formula/t/tmpreaper.rb @@ -0,0 +1,44 @@ +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_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..2b08f5d48c76d --- /dev/null +++ b/Formula/t/tmpwatch.rb @@ -0,0 +1,49 @@ +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 + + bottle do + rebuild 2 + 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, mojave: "800714b1d0f11a8fc52b070046aa3a5aaf99883f9320d9a233ffabf801ae2996" + 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..747ba4b2e700a --- /dev/null +++ b/Formula/t/tmt.rb @@ -0,0 +1,178 @@ +class Tmt < Formula + include Language::Python::Virtualenv + + desc "Test Management Tool" + homepage "https://tmt.readthedocs.io/" + url "https://files.pythonhosted.org/packages/e3/80/81ff2de5c0e59ecedb5341345f9e2d92f52c8b4c67ec27264bf7462edc9e/tmt-1.48.0.tar.gz" + sha256 "5854a5260db1417844789b8cbf2a18e428661977f18e191cdfd246d75f6b0577" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c1048a33ce45bd72050e1fabb0569758d6c93541b295d8cd6a0900309f303396" + sha256 cellar: :any, arm64_sonoma: "503071ff86cdef1c3845631ce3f799b2d6cbfc9c502ad950c33154e2321e2332" + sha256 cellar: :any, arm64_ventura: "4287a14195fccf5c45c449db15f79c62da28368656951471117efdda176fe4c9" + sha256 cellar: :any, sonoma: "640aa2726533a4e637473e48c8a5fda05fd8f9b43ecc015c351e153b740fedb7" + sha256 cellar: :any, ventura: "53b0f06f114c346f9c2b9e279d536d849a7dee98397e4f98e24abcb896edf642" + sha256 cellar: :any_skip_relocation, arm64_linux: "a851352f3cfb1fa02a307812ca83ab3d0dfdab511d02e8afcc4c6cd2fef5caba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4d507980cb846c7a3f0c531eb396c820b56348489fed26ab7a8602d2d3396859" + end + + depends_on "rust" => :build # for rpds-py + depends_on "beakerlib" + depends_on "certifi" + depends_on "python@3.13" + + 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/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" + sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + end + + resource "filelock" do + url "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + 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/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 "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/bf/ce/46fbd9c8119cfc3581ee5643ea49464d168028cfb5caff5fc0596d0cf914/jsonschema_specifications-2025.4.1.tar.gz" + sha256 "630159c9f4dbea161a6a2205c3011cc4f18ff381b189fff48bb39b9bf26ae608" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + 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/20/bb/52b15ddf7b7706ed591134a895dbf6e41c8348171fb635e655e0a4bbb0ea/pint-0.24.4.tar.gz" + sha256 "35275439b574837a6cd3020a5a4a73645eb125ce4152a73a2f126bf164b91b80" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "rpds-py" do + url "https://files.pythonhosted.org/packages/0b/b3/52b213298a0ba7097c7ea96bee95e1947aa84cc816d48cebb539770cdf41/rpds_py-0.24.0.tar.gz" + sha256 "772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e" + 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 "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"tmt", shells: [:fish, :zsh], 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..bef149758efbd --- /dev/null +++ b/Formula/t/tmux-mem-cpu-load.rb @@ -0,0 +1,30 @@ +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_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..bb6216485efbf --- /dev/null +++ b/Formula/t/tmux-sessionizer.rb @@ -0,0 +1,55 @@ +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.4.5.tar.gz" + sha256 "37cceae77bad373452d08b990065e7d1e8ed7b038a0af126aa4403332364530e" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "94a0d5bafb7636d4012332b0e3e5159dd9bb16d487aef5e1382527a26958826b" + sha256 cellar: :any, arm64_sonoma: "e8486f6f4e77a8bf58c6213e1f8e68f21e7611ec70aa96934d203cd3cebf9955" + sha256 cellar: :any, arm64_ventura: "09d3a2e2a754b32137f1dbf0a329b3d49491806a31b8b031217a48444e7b9773" + sha256 cellar: :any, sonoma: "b3050eda58cd73739f53d11af0f6111fa1f5957757c7c5fe0cfa328788e9f1f5" + sha256 cellar: :any, ventura: "a5f2144f6d7464b5f8283dc94eef025a79a9c8eeb195efc12712a18ce80c3ce1" + sha256 cellar: :any_skip_relocation, arm64_linux: "4f1c67d572a5c83597dacf9f0a67e2ab8bd6c24298c024739c8a13041ed0412f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a588098f0d380b6fd1ca53a697760e9d4d56a9d828bcd1e7a21041d488c18ff3" + 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 + # Ensure that the `openssl` crate picks up the intended library. + ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix + ENV["OPENSSL_NO_VENDOR"] = "1" + + ENV["LIBGIT2_NO_VENDOR"] = "1" + ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1" + + system "cargo", "install", *std_cargo_args + + generate_completions_from_executable(bin/"tms", shell_parameter_format: :clap) + end + + test do + require "utils/linkage" + + assert_match "Configuration has been stored", shell_output("#{bin}/tms config -p /dev/null") + assert_match version.to_s, shell_output("#{bin}/tms --version") + + [ + 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/"tms", library), + "No linkage with #{library.basename}! Cargo is likely using a vendored version." + end + 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..c1a50f2a7ab98 --- /dev/null +++ b/Formula/t/tmux.rb @@ -0,0 +1,93 @@ +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 + + bottle do + 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" + + uses_from_macos "bison" => :build # for yacc + + # Old versions of macOS libc disagree with utf8proc character widths. + # https://github.com/tmux/tmux/issues/2223 + on_system :linux, macos: :sierra_or_newer do + depends_on "utf8proc" + end + + 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} + ] + + # 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 + args << "--enable-utf8proc" if OS.linux? || MacOS.version >= :high_sierra + + ENV.append "LDFLAGS", "-lresolv" + 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..4a9d1f381ee76 --- /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/v1.0.3.tar.gz" + sha256 "731bd76515d3ddef1d8c9582c5e35fb382c3137a97b72802c4ea8b1da859c97e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "55d4a8c91e2772bf0159ed9f63a255087d1e21dc3cf12ede72887b6e17adc04e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "55d4a8c91e2772bf0159ed9f63a255087d1e21dc3cf12ede72887b6e17adc04e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "55d4a8c91e2772bf0159ed9f63a255087d1e21dc3cf12ede72887b6e17adc04e" + sha256 cellar: :any_skip_relocation, sonoma: "fc419d5dcb50402bf071f00f9112b68da0c4ae2b4e4f5357e0ddbfc99268352e" + sha256 cellar: :any_skip_relocation, ventura: "fc419d5dcb50402bf071f00f9112b68da0c4ae2b4e4f5357e0ddbfc99268352e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "77e46a4397400f17067529630e7f0761fb13ed7a9cfce5f69e27e2317f2f84df" + 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..aa72b4eb1e565 --- /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.4.tar.gz" + sha256 "a923c48127e0d63d0b5397f6297842ed51cf5a5762c348e1db0efd59506c58bd" + license "MIT" + head "https://github.com/tmuxinator/tmuxinator.git", branch: "master" + + livecheck do + formula "tmuxinator" + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "cd3e5346ad32f84faf1cc026f91857cfd12f81e64cc62d015b32f004592480ca" + 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..1fe0c617b1b70 --- /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.4.tar.gz" + sha256 "a923c48127e0d63d0b5397f6297842ed51cf5a5762c348e1db0efd59506c58bd" + license "MIT" + head "https://github.com/tmuxinator/tmuxinator.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6d3d903bd93f7555c16d092f8bd85d972f4c726d2670340f53f8df3682b93934" + 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.3.2.gem" + sha256 "eef0293b9e24158ccad7ab383ae83534b7ad4ed99c09f96f1a6b036550abbeda" + 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 new edit open start + stop local debug copy delete implode + version doctor list + ] + + 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..6650b14ee0fbd --- /dev/null +++ b/Formula/t/tmuxp.rb @@ -0,0 +1,59 @@ +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/ca/6a/a3200410d5a1ad6b7dccb416fdba080bb5924e536f5764bde3642f6ca58e/tmuxp-1.55.0.tar.gz" + sha256 "ade0bad3d9d8d647664089c0a6101f9924d9410aa2b530fcf0406fff8994de1d" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "007147b2089ee3ecff6b52131c3fddd09482481589c4fc5fa3e94696cc1e6029" + sha256 cellar: :any, arm64_sonoma: "098592d2e112a37f51ced1279638016aec09abde2765c25833b0357cf06585eb" + sha256 cellar: :any, arm64_ventura: "2efad5216e5848d0589bd982eb817e13d15b35b1f8ffe2ef7aeff12102d91c10" + sha256 cellar: :any, sonoma: "f3d6b14bc8fa5a9474963273666960b9fa51b449571eb933d2912e506dfc2ac3" + sha256 cellar: :any, ventura: "38b95a0e04c4205b5f95ee4eeeb334df76b6d4266153adcf49aa11781150eae1" + sha256 cellar: :any_skip_relocation, arm64_linux: "f144d32f65534681b8ae2385d7eecbab29a491d9533a1056a91c0315a820ec2a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1650751946abbc08884a650d2761892329dfd1f90ec85b2a4b64a5f29ff805ad" + end + + depends_on "libyaml" + depends_on "python@3.13" + 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/f6/97/2c783d2217a954427d24743f9dc1768ec836fe84258405a964577ce75d36/libtmux-0.46.0.tar.gz" + sha256 "65202494054ab2f6a72520a9f3ff0da29e3294af0365a96c51bb4a58cb9856ac" + end + + 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 + 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..b79d27425c60e --- /dev/null +++ b/Formula/t/tmx.rb @@ -0,0 +1,63 @@ +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_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..70df2dbd5a938 --- /dev/null +++ b/Formula/t/tnef.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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, mojave: "2700f31ebcc1e2ba9219d6b6ac040846eba21ccc25baca4fea8b7d630b6673d2" + sha256 cellar: :any_skip_relocation, high_sierra: "842ba6bbe666302bd39c1cf7d29caa7d5180c20757b8dfe91b99d3fe1d3da841" + 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..842bdea344583 --- /dev/null +++ b/Formula/t/tnftp.rb @@ -0,0 +1,54 @@ +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 "BSD-4-Clause" + + livecheck do + url :homepage + regex(/href=.*?tnftp[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "14d89deb1cf265a42cfa512173e91ee2e2eef8bc7e2748eb744fcdb4548e85a3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "11e76e93e1069f6e77346bde84e5d637d1b1b45dbfe22b5da7373c6724ec37c7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d9e3947ab41a6dd004ec70c6126d4ba9c7c34816e8a8c984f67f0d80617852ac" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e744b3ad973c717d4d41d5b81629d3ee5239a8ac72a4ff7dafd5269da4ee574b" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "6cfed88dfedf303ba5559466fe67a0308d2a6793e9641ace8ce28d3876970bd7" + sha256 cellar: :any_skip_relocation, sonoma: "7e02df44dd5efbd1c3e893e01b64d3facaa3c10a7b342f08c049a057b9205864" + sha256 cellar: :any_skip_relocation, ventura: "d1870a97a281b50e44b59a8132f2876d938b9602151eba9b7930ffc03326e849" + sha256 cellar: :any_skip_relocation, monterey: "f0df715364120f87c986db305942d7cc09f5088a7fd9ca3180348456818a3148" + sha256 cellar: :any_skip_relocation, big_sur: "5eff3aa4503a383db733447beddd456f2a53fe3fa7cb09c72805a55bd1a5ad8f" + sha256 cellar: :any_skip_relocation, arm64_linux: "c13adca8de35cdb0b8f5c5537f7cc79ee972b27b2d90f7b47dcf384a733593f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "270f4da016155138c1d305eedd0d82a600396cf39f011ba42ef0456b898ca198" + end + + uses_from_macos "bison" => :build + uses_from_macos "ncurses" + + conflicts_with "inetutils", because: "both install `ftp' binaries" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "all" + + bin.install "src/tnftp" => "ftp" + man1.install "src/ftp.1" + end + + test do + # Errno::EIO: Input/output error @ io_fillbuf - fd:5 /dev/pts/0 + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + 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/t/tnftpd.rb b/Formula/t/tnftpd.rb new file mode 100644 index 0000000000000..cfd9674bea059 --- /dev/null +++ b/Formula/t/tnftpd.rb @@ -0,0 +1,62 @@ +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 + + bottle do + 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..a5467e047a881 --- /dev/null +++ b/Formula/t/toast.rb @@ -0,0 +1,38 @@ +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_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..4f537b2adfa20 --- /dev/null +++ b/Formula/t/todo-txt.rb @@ -0,0 +1,37 @@ +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 + + 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.rb b/Formula/t/todoist.rb new file mode 100644 index 0000000000000..68778640aa6b7 --- /dev/null +++ b/Formula/t/todoist.rb @@ -0,0 +1,38 @@ +class Todoist < 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_sequoia: "4a545ff334ff243fa80136cd50d3dd67d4dec54469e02550f359d60686dcbb3e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a545ff334ff243fa80136cd50d3dd67d4dec54469e02550f359d60686dcbb3e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4a545ff334ff243fa80136cd50d3dd67d4dec54469e02550f359d60686dcbb3e" + sha256 cellar: :any_skip_relocation, sonoma: "e226a4397f68b89ef40017e4c78cf9480eb4157c6525bbef69e66269bb3dacfc" + sha256 cellar: :any_skip_relocation, ventura: "e226a4397f68b89ef40017e4c78cf9480eb4157c6525bbef69e66269bb3dacfc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e390f5c218ded4bb493af4beff7bc48203cc3cac2d541225b685fe3929b3ce5b" + 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}/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..454d0646e5e87 --- /dev/null +++ b/Formula/t/todoman.rb @@ -0,0 +1,111 @@ +class Todoman < Formula + include Language::Python::Virtualenv + + desc "Simple CalDAV-based todo manager" + homepage "https://todoman.readthedocs.io/" + url "https://files.pythonhosted.org/packages/86/6f/6d765dbfe855b8d8f881672dc251a7f5fe558ce46c165367fe96aca5a95a/todoman-4.5.0.tar.gz" + sha256 "2e81dba7b34a2cba6fe74f381c579500ab525ebf3f82847e56127c69d382f121" + license "ISC" + head "https://github.com/pimutils/todoman.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3192caf6ebc642ffa76145ade0db63f852a69123317c012e73d5eed568616de5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3192caf6ebc642ffa76145ade0db63f852a69123317c012e73d5eed568616de5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3192caf6ebc642ffa76145ade0db63f852a69123317c012e73d5eed568616de5" + sha256 cellar: :any_skip_relocation, sonoma: "4f54a18bc2134dae96cf4104b9c19f755c9c5e4af2352f5929d720df5655d070" + sha256 cellar: :any_skip_relocation, ventura: "4f54a18bc2134dae96cf4104b9c19f755c9c5e4af2352f5929d720df5655d070" + sha256 cellar: :any_skip_relocation, arm64_linux: "bead3ac237dfb10916efa5d115596ec048de9bdc4b6783ad4325f84c53fbdd76" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3192caf6ebc642ffa76145ade0db63f852a69123317c012e73d5eed568616de5" + end + + depends_on "jq" # Needed for ZSH completions. + depends_on "python@3.13" + + conflicts_with "bash-snippets", because: "both install `todo` binaries" + + resource "atomicwrites" do + url "https://files.pythonhosted.org/packages/87/c6/53da25344e3e3a9c01095a89f16dbcda021c609ddb42dd6d7c0528236fb2/atomicwrites-1.4.1.tar.gz" + sha256 "81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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/6a/40/64a912b9330786df25e58127194d4a5a7441f818b400b155e748a270f924/humanize-4.11.0.tar.gz" + sha256 "e66f36020a2d5a974c504bd2555cf770621dbdbb6d82f94a6857c0b1ea2608be" + end + + resource "icalendar" do + url "https://files.pythonhosted.org/packages/af/ce/127d44302810184b1680ba5e0ab588325cf427d1a5e8c8479dd2cec80e97/icalendar-6.0.0.tar.gz" + sha256 "7ddf60d343f3c1f716de9b62f6e80ffd95d03cab62464894a0539feab7b5c76e" + 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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "tzdata" do + url "https://files.pythonhosted.org/packages/e1/34/943888654477a574a86a98e9896bae89c7aa15078ec29f490fef2f1e5384/tzdata-2024.2.tar.gz" + sha256 "7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc" + end + + resource "urwid" do + url "https://files.pythonhosted.org/packages/85/b7/516b0bbb7dd9fc313c6443b35d86b6f91b3baa83d2c4016e4d8e0df5a5e3/urwid-2.6.15.tar.gz" + sha256 "9ecc57330d88c8d9663ffd7092a681674c03ff794b6330ccfef479af7aa9671b" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..c092a858a0f7d --- /dev/null +++ b/Formula/t/tofrodos.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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/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..981eeb2841a9e --- /dev/null +++ b/Formula/t/toilet.rb @@ -0,0 +1,52 @@ +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 + + bottle do + 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 mojave: "27c9e1fe38ec012c5dd9199c8100d49c56e386c65c336a4fbcaaa25a9341cab2" + sha256 high_sierra: "dda87a313d7398dd3157ca74d752b3d364647fc56c3238fb5bd320fcc904ebd5" + sha256 sierra: "24008d251358aa73e7e597b203e360857fec5b88278e6ea6de08d4eef3865f80" + sha256 el_capitan: "93822fde3d2e69f46143dcb9d8551e7e4301c7a470ae53b3fda8ec6cb44584dd" + 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..c7a32f64654bb --- /dev/null +++ b/Formula/t/toipe.rb @@ -0,0 +1,37 @@ +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_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..c07de3b660ab4 --- /dev/null +++ b/Formula/t/tokei.rb @@ -0,0 +1,47 @@ +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"] + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + 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..50f1e1b9ec6d9 --- /dev/null +++ b/Formula/t/tokyo-cabinet.rb @@ -0,0 +1,42 @@ +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 + + bottle do + rebuild 1 + 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 mojave: "dd723c7394954fe354044bbd6bbea955e985c4652f0d2e7e9a7696da87d7a3aa" + sha256 high_sierra: "6470326d4c4d4d9a459407ec73a6ea6a2d6d2d459fb547467584dcf4e777aea8" + sha256 sierra: "9ace00b3ee94dbd63c427910c5aff77935f04bb884047061c792d6e90836a380" + sha256 el_capitan: "a209fa62fdb84a86784de5eb9699a9a6811c962afab2ebf418b2a712f51852d8" + 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..e5271544ba5fc --- /dev/null +++ b/Formula/t/tokyo-dystopia.rb @@ -0,0 +1,51 @@ +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 + + bottle do + 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, mojave: "056aa0bfed85351c6296b0749dfa15a2e9471ef554796f726708438e312b5790" + sha256 cellar: :any, high_sierra: "3f00b619720603bd0712b52d01a355124604637c44cab5a3132fda942f195e2c" + sha256 cellar: :any, sierra: "0a7da80cf5e8892112986d9a51e8cd3804da2a7436b8a03b472f561b06c35890" + sha256 cellar: :any, el_capitan: "2a9e21b6f57781adb9e3dc673f2e466b817d4a00860b45fa49ded534d4cb0ed4" + 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/tomcat-native.rb b/Formula/t/tomcat-native.rb new file mode 100644 index 0000000000000..bc85985d1e4f0 --- /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.8/source/tomcat-native-2.0.8-src.tar.gz" + mirror "https://archive.apache.org/dist/tomcat/tomcat-connectors/native/2.0.8/source/tomcat-native-2.0.8-src.tar.gz" + sha256 "c7c5382fcb5a647a5ce6fed0b96721e94198fa2f5725cf5124f5b6511b05dfef" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7caf42d03492c53d43083891f42f64647bc3fb5ac40317d1fe8c66400638ae02" + sha256 cellar: :any, arm64_sonoma: "6b3347d417585b401fbb9e1573eb3875c50d9b4b35ef2da335f8e4eafce14a31" + sha256 cellar: :any, arm64_ventura: "ec858f97d5549c229516c7e76309e7335b867458d837378054cacf6b0faa5fbe" + sha256 cellar: :any, arm64_monterey: "d7094e23b954b6193486ea5de1f30373a66108004dc66f2b983e71ad649cd5d0" + sha256 cellar: :any, sonoma: "6266f592dccf65035414e175135551b9a9eeb5dbe8051533ff53e09550f78f1c" + sha256 cellar: :any, ventura: "cf77f977158497e7924c40f37448e4c3f9ca09e5dac9adf702db4a1c660e59c8" + sha256 cellar: :any, monterey: "0032aae5e5ac4a08e503dc7ba1e95ccf6e88db975a50c898307fad8e7b86fb58" + sha256 cellar: :any_skip_relocation, arm64_linux: "aaae8c9cf5b7d5b87b305a98773c73bc4ed6070d589ab1b79c04a1d50e4fe2aa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b6871bc6de4e15f504981b8930ccd64e3b955ae2b73ec5642376f9dbf3d5efc" + 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 + 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..f7b525eea11a6 --- /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.7/bin/apache-tomcat-11.0.7.tar.gz" + mirror "https://archive.apache.org/dist/tomcat/tomcat-11/v11.0.7/bin/apache-tomcat-11.0.7.tar.gz" + sha256 "2fcece641c62ba1f28e1d7b257493151fc44f161fb391015ee6a95fa71632fb9" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2407524101991450c2c48e0ffe61ceb9b05f51ca08742fc3ac8775c5136cea1b" + 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..3f5ec87b33ccf --- /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.41/bin/apache-tomcat-10.1.41.tar.gz" + mirror "https://archive.apache.org/dist/tomcat/tomcat-10/v10.1.41/bin/apache-tomcat-10.1.41.tar.gz" + sha256 "1f7cc8cce2d5f4acd35491d0fa2abafa6ddd9bb0425b57b277310fde5ff2fcb3" + license "Apache-2.0" + + livecheck do + url :stable + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "e509d7be5ba27c453b2d74d0280fe07d0ce45d165525acaa96b74a05a233fd18" + 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..85f996b6a28f9 --- /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.105/bin/apache-tomcat-9.0.105.tar.gz" + mirror "https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.105/bin/apache-tomcat-9.0.105.tar.gz" + sha256 "ee86ee179493e610358b23a0f79ba70b9e76ade71157aada9ac7cdcdcdbe35f5" + license "Apache-2.0" + + livecheck do + url :stable + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "9d946949fe17b5028e7d1dbdb9823847c1414467451d8cd9a659b76f8ce9abcd" + 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..b0a6f5355ce01 --- /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.0.1/apache-tomee-10.0.1-plume.tar.gz" + mirror "https://archive.apache.org/dist/tomee/tomee-10.0.1/apache-tomee-10.0.1-plume.tar.gz" + sha256 "4162c99c5f4466d641b7aed2807fb691a565d43cbe44c1c65defdda216030e90" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "1d13c509f4300cb3d5a1c2ede28dacfa519bf5f53c0a71063b2d8cfdb936e782" + 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..8b6dcdbabaece --- /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.0.1/apache-tomee-10.0.1-plus.tar.gz" + mirror "https://archive.apache.org/dist/tomee/tomee-10.0.1/apache-tomee-10.0.1-plus.tar.gz" + sha256 "b4520899aa8d5971d5be49b09b8622daafedf697ff321c8b3573b68a845661cf" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "86778c7fb3c32585f2e9f3221d1bb7fffe9257553af38dbd9bfaacad36834fc0" + 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..00c53da7bfe71 --- /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.0.1/apache-tomee-10.0.1-webprofile.tar.gz" + mirror "https://archive.apache.org/dist/tomee/tomee-10.0.1/apache-tomee-10.0.1-webprofile.tar.gz" + sha256 "43edd2b6ea5c0aabd8a74725064d9caa6dbddd729db8888d06a1d209a5da4d1b" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "e258bd58ba77c24dd8f5f634c03be8cfaa32462baece64356c979377db184226" + 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-test.rb b/Formula/t/toml-test.rb new file mode 100644 index 0000000000000..dae40d99ebae4 --- /dev/null +++ b/Formula/t/toml-test.rb @@ -0,0 +1,37 @@ +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_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..5a06722274340 --- /dev/null +++ b/Formula/t/toml2json.rb @@ -0,0 +1,32 @@ +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.1.tar.gz" + sha256 "d32aceb8387553a25bec45747cdb45ce6a079935a03eb13d3477f68cc1fecaaa" + license "MIT" + head "https://github.com/woodruffw/toml2json.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c236bae5e89882b86de4a4432cd45c265e52b120cfb92f5df4668a7d5d5ae28e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e916b159e93d256b232b7e05b9c70fd8efed7fcf90ba0e54f8fa1d47660fdc96" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c41859623992135a393b49977c66b3defdcaf597c025ebcbb2e5ce2a1a59b220" + sha256 cellar: :any_skip_relocation, sonoma: "0b63f1c3d4f53869cd7178d1150d47e24af6c4f2075e0a128a2ee180e2696d38" + sha256 cellar: :any_skip_relocation, ventura: "263ada74ecbaadf923978f9018950a6d361fe16d16f08033dcdea6b86bd6718c" + sha256 cellar: :any_skip_relocation, arm64_linux: "1bad30571325d81e794e04241c1536a4cfc9f645e5b32a65752e379df35c5cf3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ef85b1667b92098289aa2bc8a6c2747188350d052a699b780909aeeae6455db" + 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("https://github.com/wow") + end +end diff --git a/Formula/t/tomlplusplus.rb b/Formula/t/tomlplusplus.rb new file mode 100644 index 0000000000000..f326c86390b8a --- /dev/null +++ b/Formula/t/tomlplusplus.rb @@ -0,0 +1,58 @@ +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" + + bottle do + 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..8ec8e8c8d892a --- /dev/null +++ b/Formula/t/toot.rb @@ -0,0 +1,102 @@ +class Toot < Formula + include Language::Python::Virtualenv + + desc "Mastodon CLI & TUI" + homepage "https://toot.bezdomni.net/" + url "https://files.pythonhosted.org/packages/e1/5a/8c8c1dfb8188e14f94cda467f03924b23e7f7e1194249bdd1240363873ac/toot-0.48.1.tar.gz" + sha256 "99629e24bc4ef3fb22162b7742f4053648279f5e7e34b5ad53224b5d3e05a66c" + license "GPL-3.0-only" + head "https://github.com/ihabunek/toot.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0a745bc4134a24b5fa437b823d6eabe4cbdb2781c2304865291c8df9d4e0f8f9" + end + + depends_on "certifi" + depends_on "pillow" + depends_on "python@3.13" + + resource "beautifulsoup4" do + url "https://files.pythonhosted.org/packages/f0/3c/adaf39ce1fb4afdd21b611e3d530b183bb7759c9b673d60db0e347fd4439/beautifulsoup4-4.13.3.tar.gz" + sha256 "1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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 "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/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz" + sha256 "fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + resource "urwid" do + url "https://files.pythonhosted.org/packages/98/21/ad23c9e961b2d36d57c63686a6f86768dd945d406323fb58c84f09478530/urwid-2.6.16.tar.gz" + sha256 "93ad239939e44c385e64aa00027878b9e5c486d59e855ec8ab5b1e1adcdb32a2" + end + + resource "urwidgets" do + url "https://files.pythonhosted.org/packages/91/cc/4e2469c469e72c68a45b1750854a496e15f21718ae8e3bc22cf7d89f7459/urwidgets-0.2.1.tar.gz" + sha256 "f9f2bcd2949da1105c287806dab773aa7bdf5852226cdb128aaf3004136f3eef" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..eeaff89388d8a --- /dev/null +++ b/Formula/t/topfew.rb @@ -0,0 +1,29 @@ +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_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..a74e5367780ea --- /dev/null +++ b/Formula/t/topgrade.rb @@ -0,0 +1,41 @@ +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.0.3.tar.gz" + sha256 "97df1c06f9489ce842756fd27c7a309db952bee16001a7a2e7a337d45904731c" + 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_sequoia: "c1fca0552ffc2ff4fb6ebabb2202a7c7ae4c3792011008600b020c4a666c52d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "16e84414710871b3c3155351f50fd2d9e06344897d49f2faca7713f736271f0b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4524024ae57ba17242373a89c913efe94a1fd640bfcd3d5a6f6abdb8c023d63d" + sha256 cellar: :any_skip_relocation, sonoma: "1205a2e8c71dbcfa47bb5b004a13e9bfd3b233fd503dd1005d1df1f4fdcd90c9" + sha256 cellar: :any_skip_relocation, ventura: "6bf8d9bfe59b9aa9559bf353e5d973244b41a4bf23a45757dbf7138cb4bde8e2" + sha256 cellar: :any_skip_relocation, arm64_linux: "d2dc8da7e5b1a567b556cc2f80b5fa5f6d2c76331bf9989a856b4d11f318b43b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cc04c619d22b13491dc2c90a0fc5fcb9c9894f6c8e2ed6121d7eab89f462c4e3" + 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..20c28778a51a9 --- /dev/null +++ b/Formula/t/topiary.rb @@ -0,0 +1,46 @@ +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.6.0.tar.gz" + sha256 "d0cc71693a1d889e6031eb9b0ad453f50bfde4a9bbe58a2294b9d2c88449a06c" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fcfc0bfe103d0d3e81e1696a08833af5923f210c6d2c7fa53b8ee6c1785e3ab8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3beca3775fe629b69aa19f013feec5fec4ef33b30d18f07860db0aaf0c52df50" + sha256 cellar: :any_skip_relocation, arm64_ventura: "079b20943df3e5b1249e5284b45b68428ff72395588f11752431971096733d4a" + sha256 cellar: :any_skip_relocation, sonoma: "456c3f5f7f5d89543b0031c66a03aefea0e92200153e6f35c1707da99d0fbbfc" + sha256 cellar: :any_skip_relocation, ventura: "f90b9b49e3bcb191a13a7875d74c162e0d2e9068d8951a8b9482a9201ee8dfdb" + sha256 cellar: :any_skip_relocation, arm64_linux: "464120b0a9d2820bc675d360474be410021f25dce2c9b385c397773f10f738a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2b83fc86ee8cd29d1109c005d7eb76e90a0807f404085b2d194e5131ff65880" + 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..a600715569372 --- /dev/null +++ b/Formula/t/tor.rb @@ -0,0 +1,65 @@ +class Tor < Formula + desc "Anonymizing overlay network for TCP" + homepage "https://www.torproject.org/" + url "https://www.torproject.org/dist/tor-0.4.8.16.tar.gz" + mirror "https://www.torservers.net/mirrors/torproject.org/dist/tor-0.4.8.16.tar.gz" + mirror "https://fossies.org/linux/misc/tor-0.4.8.16.tar.gz" + sha256 "6540dd377a120fb8e7d27530aa3b7ff72a0fa5b4f670fe1d64c987c1cfd390cb" + # 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_sequoia: "1f3a2c7456fac3016ed33c3078243a7c6fa27d94a8122fdb25f6d3a034414a43" + sha256 arm64_sonoma: "3a40fae449d8714a2834cf0bad2b2ccf7f7735807323f67d09623e892f414115" + sha256 arm64_ventura: "0958a6020aeb21f4f133df81c965b95a98ee87504e5d14d1c464010fcde8268e" + sha256 sonoma: "2c231639cf6c3eeb57a7b608f363865c0909dd5cc91784e539bc1e9529ffaa7b" + sha256 ventura: "639c1761f6c70f16a2a64b6cee766921b3227f9a210afa1e8da235fb9bd2b69a" + sha256 arm64_linux: "55af83536eefe0403425adfe9562dd34cadee956553c28514b1741abf23a149f" + sha256 x86_64_linux: "19a5400c30b6ba114000c1593b858cb33aad3effe743a42f2537756e0e200934" + 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..6c580a329ffbd --- /dev/null +++ b/Formula/t/torchvision.rb @@ -0,0 +1,107 @@ +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.20.1.tar.gz" + sha256 "7e08c7f56e2c89859310e53d898f72bccc4987cd83e08cfd6303513da15a9e71" + license "BSD-3-Clause" + revision 3 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "05ad6434595d32adb338a250c188b1c4bdbc9dd6cc002667775a940610d03aaa" + sha256 cellar: :any, arm64_sonoma: "bb50c0817c495dda4b4a5a2bf01c8cf01033ea76b24a9e7aa9e9e3bd589f8507" + sha256 cellar: :any, arm64_ventura: "aea7d5b0c1a146c2ecb2c65eceed96b382775b97a840a496e16c7a65cc050a47" + sha256 cellar: :any, sonoma: "e4e2d058603a89e0c8a20ebc53c795265ae785bf513e827091416070c13e4543" + sha256 cellar: :any, ventura: "bb1e8f8730e76a7ec674ead6d9140b8053726b7f705916da713426918a489680" + sha256 cellar: :any_skip_relocation, x86_64_linux: "33991a057cb3b39910bfe3e1edf1e28efe209c6088958aeeb30d3377a6ec01f8" + end + + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "python@3.13" => [:build, :test] + depends_on "jpeg-turbo" + depends_on "libpng" + depends_on "numpy" + depends_on "pillow" + depends_on "pytorch" + + 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.13" + 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(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..5b024926923fc --- /dev/null +++ b/Formula/t/torsocks.rb @@ -0,0 +1,41 @@ +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_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..1a158f96d3e2d --- /dev/null +++ b/Formula/t/totp-cli.rb @@ -0,0 +1,31 @@ +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_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, 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..1a59da1d102c4 --- /dev/null +++ b/Formula/t/touca.rb @@ -0,0 +1,63 @@ +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 3 + sha256 cellar: :any_skip_relocation, all: "28347dcea2a95cf714fad75fb909df2202c64a2ba9f9b83af3f99a7659e0bf17" + end + + depends_on "certifi" + depends_on "python@3.13" + + 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/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz" + sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199" + 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"' + virtualenv_install_with_resources + 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..ca334efa6cdbd --- /dev/null +++ b/Formula/t/tox.rb @@ -0,0 +1,103 @@ +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/fd/3c/dcec0c00321a107f7f697fd00754c5112572ea6dcacb40b16d8c3eea7c37/tox-4.26.0.tar.gz" + sha256 "a83b3b67b0159fa58e44e646505079e35a43317a62d2ae94725e0586266faeca" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "745eb097b1ceb6793571f913ae515498928ef5d3387dd842a9559012509c3fe0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "745eb097b1ceb6793571f913ae515498928ef5d3387dd842a9559012509c3fe0" + sha256 cellar: :any_skip_relocation, arm64_ventura: "745eb097b1ceb6793571f913ae515498928ef5d3387dd842a9559012509c3fe0" + sha256 cellar: :any_skip_relocation, sonoma: "2a23254ef16866567119d273b490606682e712724d45b8cca8f54c34507caee2" + sha256 cellar: :any_skip_relocation, ventura: "2a23254ef16866567119d273b490606682e712724d45b8cca8f54c34507caee2" + sha256 cellar: :any_skip_relocation, arm64_linux: "434e5a9bb91fa8bd2a5be477c014aed0c8bbcb805d7a4ae800a8eb1054ecec40" + sha256 cellar: :any_skip_relocation, x86_64_linux: "434e5a9bb91fa8bd2a5be477c014aed0c8bbcb805d7a4ae800a8eb1054ecec40" + end + + depends_on "python@3.13" + + resource "cachetools" do + url "https://files.pythonhosted.org/packages/6c/81/3747dad6b14fa2cf53fcf10548cf5aea6913e96fab41a3c198676f8948a5/cachetools-5.5.2.tar.gz" + sha256 "1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4" + 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/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 "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/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "pyproject-api" do + url "https://files.pythonhosted.org/packages/19/fd/437901c891f58a7b9096511750247535e891d2d5a5a6eefbc9386a2b41d5/pyproject_api-1.9.1.tar.gz" + sha256 "43c9918f49daab37e302038fc1aed54a8c7a91a9fa935d00b9a485f37e0f5335" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/56/2c/444f465fb2c65f40c3a104fd0c495184c4f2336d65baf398e3c75d72ea94/virtualenv-20.31.2.tar.gz" + sha256 "e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af" + 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.13"].opt_bin/"python3.13").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..8f00f5b0ba470 --- /dev/null +++ b/Formula/t/toxcore.rb @@ -0,0 +1,51 @@ +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 1 + head "https://github.com/TokTok/c-toxcore.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "4b51d03e981b5832b6a24558df53db302c4fe390f376101c9a149d2d5c7dd014" + sha256 cellar: :any, arm64_sonoma: "c79e553494531763dc31ebcf73b8e09422591649ade2bceaf256d2b104401627" + sha256 cellar: :any, arm64_ventura: "e91b248155d9c00607aec320b8e0eedbd967ea18c347f32524c1ff3ef81d7d9c" + sha256 cellar: :any, sonoma: "919e2e5465f99745a84360b99fa84c939344e9a36b2c0722740d0a7e8b569840" + sha256 cellar: :any, ventura: "5ec3104da70c2c0d2f8763e3dc0642579d7ba9ae1a26eb1e6a47e72002827418" + sha256 cellar: :any_skip_relocation, arm64_linux: "a4654aa4c40c30cebec0fd99f5d410f1b3d3388b860adca5d4d28414546748d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "48a8822a0ab64a660e5f19c9b480c53e43358b89a8982f149bb0aeed40d00728" + 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..57d7fdec96383 --- /dev/null +++ b/Formula/t/toxiproxy.rb @@ -0,0 +1,65 @@ +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_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, 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..87624dfea125c --- /dev/null +++ b/Formula/t/tpl.rb @@ -0,0 +1,92 @@ +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" + + bottle do + 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, mojave: "668ff54097397dbf1f934f6fc380611459c1ec0c36336d1058171d4eeb349ad7" + sha256 cellar: :any, high_sierra: "18b15a737709ac6d8ec47963fb02fba255b5e9f6c8968c126dc60bb3a0d7adee" + sha256 cellar: :any, sierra: "1d8a496506b276702c07d594e17b9c7be4f43c1a4651120b765b2015c18bbe54" + sha256 cellar: :any, el_capitan: "a887350815a2791312bdec2ecdf82795d6f54c67f9e76842236e8bb1f507108d" + 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..5f22957e19bc2 --- /dev/null +++ b/Formula/t/tpm.rb @@ -0,0 +1,30 @@ +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" + + 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..8998cc19b7566 --- /dev/null +++ b/Formula/t/tproxy.rb @@ -0,0 +1,34 @@ +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.0.tar.gz" + sha256 "ceed58273c2a5f542f378fe963f815c4b5b49a550409768985f072d5ed7b54dd" + license "MIT" + head "https://github.com/kevwan/tproxy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d8ec0fe223603e2b5f100a9aefd415c8e7c27c7db92aadade292812d0cd14d66" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d8ec0fe223603e2b5f100a9aefd415c8e7c27c7db92aadade292812d0cd14d66" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d8ec0fe223603e2b5f100a9aefd415c8e7c27c7db92aadade292812d0cd14d66" + sha256 cellar: :any_skip_relocation, sonoma: "6f8605f431b78c3cbf0792d2764aed057479af3c93428e872e7aa36249155331" + sha256 cellar: :any_skip_relocation, ventura: "6f8605f431b78c3cbf0792d2764aed057479af3c93428e872e7aa36249155331" + sha256 cellar: :any_skip_relocation, x86_64_linux: "123df9d7f9259ef84639a7ab4dd1c75e9f1844d1c3044848aad74fec24be5d27" + 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..b4c99e6bec4b4 --- /dev/null +++ b/Formula/t/tracebox.rb @@ -0,0 +1,66 @@ +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" + + bottle do + rebuild 2 + 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/tracker.rb b/Formula/t/tracker.rb new file mode 100644 index 0000000000000..946c77cac3049 --- /dev/null +++ b/Formula/t/tracker.rb @@ -0,0 +1,123 @@ +class Tracker < Formula + desc "Library and daemon that is an efficient search engine and triplestore" + homepage "https://gitlab.gnome.org/GNOME/tinysparql" + # pull from git tag to get submodules + url "https://gitlab.gnome.org/GNOME/tinysparql.git", + tag: "3.6.0", + revision: "624ef729966f2d9cf748321bd7bac822489fa8ed" + license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"] + revision 4 + + bottle do + sha256 arm64_sequoia: "34218a3697312858347f19f7b687ad25626b65dd8f78c10efd462df9327eb078" + sha256 arm64_sonoma: "cb0d4881cc33a9e7a2d68c2c02f1011840ed28a4a1c3333bad6d4a254861a3e7" + sha256 arm64_ventura: "3d7d3a10c25bbc2c3161945c5eee127b3b6a0adb40db702cd5a13bed35602ec4" + sha256 sonoma: "5d7a0c796901eb167fb888acabff2a609ecf161dba2e8bf8df1066e9a7360cf3" + sha256 ventura: "d2f1ea7776a2aeb58a5c9adafe33bfa75c405cbd47059c6c8b86700118006514" + sha256 arm64_linux: "cfb05bf573cc5509b0013ffb1360318797dda5aeb9bb978d5c56bdf092b3d3f0" + sha256 x86_64_linux: "11ce63277d3d02cf375c31b84744a10cccac59b65b8227c8c7f08c9dbe377528" + end + + depends_on "gobject-introspection" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "pygobject3" => :build + 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 "python" => :build, since: :catalina + uses_from_macos "libxml2" + + on_macos do + deprecate! date: "2025-01-18", because: "does not build on macOS for recent releases (3.7.0+)" + depends_on "gettext" + end + + on_linux do + deprecate! date: "2025-01-18", + because: "was renamed but we cannot formula rename due to macOS build failure", + replacement_formula: "tinysparql" + end + + conflicts_with "tinysparql", because: "both install the same libraries" + + def install + args = %w[ + -Dman=false + -Ddocs=false + -Dsystemd_user_services=false + -Dtests=false + -Dsoup=soup3 + --force-fallback-for=gvdb + ] + + ENV["DESTDIR"] = "/" + + system "meson", "setup", "build", *args, *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" + 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/tractorgen.rb b/Formula/t/tractorgen.rb new file mode 100644 index 0000000000000..ecec8563a2297 --- /dev/null +++ b/Formula/t/tractorgen.rb @@ -0,0 +1,49 @@ +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 + + bottle do + rebuild 1 + 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..3f307f35254d0 --- /dev/null +++ b/Formula/t/tracy.rb @@ -0,0 +1,67 @@ +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_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..40ef3c78b8c19 --- /dev/null +++ b/Formula/t/tradcpp.rb @@ -0,0 +1,48 @@ +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 + + bottle do + rebuild 1 + 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..9843def2671c0 --- /dev/null +++ b/Formula/t/trader.rb @@ -0,0 +1,43 @@ +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_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..2301b4b5e17ed --- /dev/null +++ b/Formula/t/traefik.rb @@ -0,0 +1,79 @@ +class Traefik < Formula + desc "Modern reverse proxy" + homepage "https://traefik.io/" + url "https://github.com/traefik/traefik/releases/download/v3.4.0/traefik-v3.4.0.src.tar.gz" + sha256 "da5dcdbf177c5008a157e4180b039a34a7ad10b710a9ce999545ac86d7c217e4" + license "MIT" + head "https://github.com/traefik/traefik.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cfdf40e94efae036cb18be53204ca44f834c3d913b7e3026e5b81f01bf7152d2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cfdf40e94efae036cb18be53204ca44f834c3d913b7e3026e5b81f01bf7152d2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cfdf40e94efae036cb18be53204ca44f834c3d913b7e3026e5b81f01bf7152d2" + sha256 cellar: :any_skip_relocation, sonoma: "92b3923141d6b69ecfe44145fd51cd522b1a182630c89f0a13be9a04c6a96435" + sha256 cellar: :any_skip_relocation, ventura: "92b3923141d6b69ecfe44145fd51cd522b1a182630c89f0a13be9a04c6a96435" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0db30024facc7dc7068a0518da9c95f2b86d19480d23bf30d81d627e750fbd8" + end + + depends_on "go" => :build + depends_on "node@22" => :build + depends_on "yarn" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/traefik/traefik/v#{version.major}/pkg/version.Version=#{version} + ] + cd "webui" do + system "yarn", "install", "--immutable" + system "yarn", "build" + end + 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", 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..535ae8e0c53a7 --- /dev/null +++ b/Formula/t/trafficserver.rb @@ -0,0 +1,74 @@ +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.0.5.tar.bz2" + mirror "https://archive.apache.org/dist/trafficserver/trafficserver-10.0.5.tar.bz2" + sha256 "79d4efc02a94b38cf75ad3bfc0652d84155b4cdd5cf2cdcdb53399aa6ab8e397" + license "Apache-2.0" + + bottle do + sha256 arm64_sequoia: "8036860308c3d5a166f8e67334892d79dd185b759a88f0bda448dc55e4d152d9" + sha256 arm64_sonoma: "e4b4b50ca4ccd123f27e6b140bc9db7faab0c793f71de15660336a1fc495ada2" + sha256 arm64_ventura: "947ce75f85a4f4e40da713ca19d9700ea6dff56340433f52dae608a81bb14c1a" + sha256 sonoma: "5f8f1e5de63f3a656df0c660d47b5394942ea922e1a47397ab62aff7bcf34bb5" + sha256 ventura: "f5d7187b184a23f594b870f252f494fcdad54ec0376244a174d608ac4eb68386" + sha256 arm64_linux: "d5686131b0ae392e9b63efd83df2fb98e8214ccb4db7d8d2b2ec899c0708b7f7" + sha256 x86_64_linux: "bba4bdd8d52ab6650c7957d16818fc22ad7db80032a6490635b9f2e4892efdc2" + 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..f1c9ba4ea84a1 --- /dev/null +++ b/Formula/t/trafilatura.rb @@ -0,0 +1,110 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "505f84b8d24a77ceb6d76724565c4aa15328b1387e0ddfde87a559fe9fe5f3d9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0b3baf89879238df5adad51d5760dffd6d8b2037e46b324b2f16de6d7638c6d3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b553c17f86bafe9f26435dfd8cf62553edcacf246f60f2e3534b06430a519c2f" + sha256 cellar: :any_skip_relocation, sonoma: "6afd99392568f511f979a48743edee48540be464fc5e6c08ffd502afdc5bda5e" + sha256 cellar: :any_skip_relocation, ventura: "e01ee817069b9bae6800880153c0c7a9ff25eb02555f9968aa6a9edfc1024ced" + sha256 cellar: :any_skip_relocation, arm64_linux: "04e141a2de86a1dddef82a4200fb9388a9357fe8e02290831476ba38a16665f5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6410979b76f70b9e8ca8786d708e7713212afb61d59231c497c2d9b97287a254" + end + + depends_on "certifi" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "babel" do + url "https://files.pythonhosted.org/packages/2a/74/f1bc80f23eeba13393b7222b11d95ca3af2c1e28edca18af487137eefed9/babel-2.16.0.tar.gz" + sha256 "d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316" + 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 "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/1a/b2/f6b29ab17d7959eb1a0a5c64f5011dc85051ad4e25e401cbddcc515db00f/dateparser-1.2.0.tar.gz" + sha256 "7975b43a4222283e0ae15be7b4999d08c9a70e2d378ac87385b1ccf2cffbbb30" + end + + resource "htmldate" do + url "https://files.pythonhosted.org/packages/7d/d9/2aa3b95ef02b60c5953031faba2e966155ef6c57aeac1a6d61d95acf9b4f/htmldate-1.9.2.tar.gz" + sha256 "89553fb6e0942a18951a623e28ce3ce4a2e8543b3908e951eea356ec0346cbe4" + end + + resource "justext" do + url "https://files.pythonhosted.org/packages/b1/59/93ce612fce25c274efc88ec4d65963ce80fce96b9048e9fc1e430d893a9e/justext-3.0.1.tar.gz" + sha256 "b6ed2fb6c5d21618e2e34b2295c4edfc0bcece3bd549ed5c8ef5a8d20f0b3451" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/e7/6b/20c3a4b24751377aaa6307eb230b66701024012c29dd374999cc92983269/lxml-5.3.0.tar.gz" + sha256 "4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f" + end + + resource "lxml-html-clean" do + url "https://files.pythonhosted.org/packages/81/f2/fe319e3c5cb505a361b95d1e0d0d793fe28d4dcc2fc39d3cae9324dc4233/lxml_html_clean-0.4.1.tar.gz" + sha256 "40c838bbcf1fc72ba4ce811fbb3135913017b27820d7c16e8bc412ae1d8bc00b" + 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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "tld" do + url "https://files.pythonhosted.org/packages/19/2b/678082222bc1d2823ea8384c6806085b85226ff73885c703fe0c7143ef64/tld-0.13.tar.gz" + sha256 "93dde5e1c04bdf1844976eae440706379d21f4ab235b73c05d7483e074fb5629" + end + + resource "tzlocal" do + url "https://files.pythonhosted.org/packages/04/d3/c19d65ae67636fe63953b20c2e4a8ced4497ea232c43ff8d01db16de8dc0/tzlocal-5.2.tar.gz" + sha256 "8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..55515421a0d19 --- /dev/null +++ b/Formula/t/traildb.rb @@ -0,0 +1,77 @@ +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 + + bottle do + rebuild 1 + 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..63e8a569c2b73 --- /dev/null +++ b/Formula/t/trailscraper.rb @@ -0,0 +1,111 @@ +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" + head "https://github.com/flosell/trailscraper.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7856f4ab33ac9b4787b6c56fc26e9ea9660e924e88481a1aa58ed608da4ace20" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c603d651c4ae97df0d9dabede01640cb88aca9cea648b458ff8c35e499608c5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a96687c220abe1b8a7429b242a64759b5098ccdc9a81f9552bdcf29cf939beea" + sha256 cellar: :any_skip_relocation, sonoma: "ad8e538ac5c4622711aecd3e77bc67c8e1f00abff7f98c82c55202759878af86" + sha256 cellar: :any_skip_relocation, ventura: "84d535f84b97e5b6908037dbb8b3b5c61cd96ab35fa4b43feaa5fe3c3ac8a246" + sha256 cellar: :any_skip_relocation, arm64_linux: "61346a612501f3764460b152f173b7aeab63320eaeb27db81d14fd75c73ba3ee" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ba61947f1c52939514cc495327bfbca9585dfde5804f8e91165a19301633e275" + end + + depends_on "python@3.13" + + 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/18/53/3593b438ab1f9b6837cc90a8582dfa71c71c639e9359a01fd4d110f0566e/botocore-1.37.13.tar.gz" + sha256 "60dfb831c54eb466db9b91891a6c8a0c223626caa049969d5d42858ad1e7f8c7" + 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/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz" + sha256 "7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519" + 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/0f/ec/aa1a215e5c126fe5decbee2e107468f51d9ce190b9763cb649f76bb45938/s3transfer-0.11.4.tar.gz" + sha256 "559f161658e1cf0a911f45940552c696735f5c74e64362e515f333ebed87d679" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/32/d2/7b171caf085ba0d40d8391f54e1c75a1cda9255f542becf84575cfd8a732/setuptools-76.0.0.tar.gz" + sha256 "43b4ee60e10b0d0ee98ad11918e114c70701bc6051662a9a675a0496c1a158f4" + 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/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"trailscraper", shells: [:fish, :zsh], 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..57ad101aa17c4 --- /dev/null +++ b/Formula/t/translate-shell.rb @@ -0,0 +1,42 @@ +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" + + 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..26c0c3bc1d4a2 --- /dev/null +++ b/Formula/t/translate-toolkit.rb @@ -0,0 +1,48 @@ +class TranslateToolkit < Formula + include Language::Python::Virtualenv + + desc "Toolkit for localization engineers" + homepage "https://toolkit.translatehouse.org/" + url "https://files.pythonhosted.org/packages/f2/35/7264ad40d8ef95db2cdceadd808b479c5c289068bc2809db0ed265cc6f3c/translate_toolkit-3.15.2.tar.gz" + sha256 "8b9cf1a6ffd3eb10757c77496c414bc6a6eb400bf88f10914257672431fe22ae" + license "GPL-2.0-or-later" + head "https://github.com/translate/translate.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "93e680e798291f70223c2cb28fc21a33495d11b3305c9ebde4951bb768ccf737" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e3e59f754e39baa1b08b7be9a40fa0c5ed6d3318399570b20f0dee66cb36adb4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "760dd04e4058d0ef441ce2694cb6a4bba2c5ebf4e46445009c53612ded9c4e4b" + sha256 cellar: :any_skip_relocation, sonoma: "d27e73ebfce34346dab06dd92ab55b9e2f14c450403f63e68fbb93985af67d3d" + sha256 cellar: :any_skip_relocation, ventura: "9a08b37359abd5147b52df44b390335f71820a2492906586ad668ad860e82ecf" + sha256 cellar: :any_skip_relocation, arm64_linux: "caeb90933eb921bb497ca9489cd429c59d41ee7acf53a371747a52e14b97fcd6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0bc8438508566659a1e37119762660ccd24b330794c26332dda4594695bf1160" + end + + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "cwcwidth" do + url "https://files.pythonhosted.org/packages/23/76/03fc9fb3441a13e9208bb6103ebb7200eba7647d040008b8303a1c03e152/cwcwidth-0.1.10.tar.gz" + sha256 "7468760f72c1f4107be1b2b2854bc000401ea36a69daed36fb966a1e19a7a124" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz" + sha256 "d12832e1dbea4be280b22fd0ea7c9b87f0d8fc51ba06e92dc62d52f804f78ebd" + 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..aad05ec85cc6a --- /dev/null +++ b/Formula/t/transmission-cli.rb @@ -0,0 +1,104 @@ +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 3 + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "b9e4113a3030e91fd27c5bbced1e21c7c67261050ff8f11c1a4e173a4f747a04" + sha256 arm64_sonoma: "ca4dbdf34346c6bc37192dc9ee53971b265cf9c3fbba6e38339f5766c11fbb15" + sha256 arm64_ventura: "8176400e94d9c4f5a33034b353021ccc35f55663f8d31f11bbf23ce78123527c" + sha256 sonoma: "0237d99f85751e50e87c31577c7903680c5f16051c1541a0b84865bb22e237ec" + sha256 ventura: "3268040e7f67f734934bdaa0e7c439bc120c4ba12ac06f345e74b2b633298ae1" + sha256 arm64_linux: "6c0d31567892d665e133f24ce529e7dde3fceeaeadcadb776c7d7a18cf77b971" + sha256 x86_64_linux: "ef83d1cad5d89e26eea96e4ed7fe42769c94947735ca013fe7b8a8bdc0e007e2" + 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 + 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..9eff341a80542 --- /dev/null +++ b/Formula/t/trash-cli.rb @@ -0,0 +1,46 @@ +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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3005369e1cfe7938d6c97d39614c2dd45bb87b06d2e7fb07e1616a201d8128b0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8ccc13a1742713858b3b63cc8feb9840596b901d2ffe5dc1fd9757ed2584d1ce" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c4ea7729d8301971fd3970a2c72b8ab6d4a08df8b82a79d9146ff95e2880db7e" + sha256 cellar: :any_skip_relocation, sonoma: "d81d30387db79999d4ce0eb0b656d97ac782c6de9531f6cd052b83311a145c02" + sha256 cellar: :any_skip_relocation, ventura: "31f699dac8d5ded90260901e92ccd1fd21c4319732b0efc258385bcd3c004411" + sha256 cellar: :any_skip_relocation, arm64_linux: "0aa53d7fd0525290529f1de305a1e5c701e8c9948874526fb281e201bd36f6ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4712d02377f336fb88f4de3ebc3c03dbfcf1a17d8e3d8aac297570a2938f5dd5" + end + + keg_only :shadowed_by_macos + + depends_on "python@3.13" + + resource "psutil" do + url "https://files.pythonhosted.org/packages/18/c7/8c6872f7372eb6a6b2e4708b88419fb46b857f7a2e1892966b851cc79fc9/psutil-6.0.0.tar.gz" + sha256 "8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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..4ccdf8a614cf6 --- /dev/null +++ b/Formula/t/trash.rb @@ -0,0 +1,42 @@ +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" + + bottle do + rebuild 1 + 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" + sha256 cellar: :any_skip_relocation, mojave: "d8ad5460b24a51a4a12b31ebf1a2887e9e86e029d061f6994c3c1caea7bf0551" + sha256 cellar: :any_skip_relocation, high_sierra: "0ef5ea924ba8d01398686657a839ad270796f3f10eee86d6522980d32038df9a" + end + + keg_only :shadowed_by_macos + + depends_on :macos + + 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..895b1bc8c9624 --- /dev/null +++ b/Formula/t/travis.rb @@ -0,0 +1,197 @@ +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_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 + # gem issue on Mojave + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? && MacOS.version == :mojave + + 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..470ffa0169ff7 --- /dev/null +++ b/Formula/t/trdsql.rb @@ -0,0 +1,38 @@ +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_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..c0d8febb9aa5f --- /dev/null +++ b/Formula/t/tre-command.rb @@ -0,0 +1,37 @@ +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" + + bottle do + rebuild 2 + 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..cf6bbc8039da7 --- /dev/null +++ b/Formula/t/tre.rb @@ -0,0 +1,28 @@ +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" + + bottle do + 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..56c41046779f3 --- /dev/null +++ b/Formula/t/trec_eval.rb @@ -0,0 +1,52 @@ +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 + + bottle do + 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, mojave: "cecbd8490c8b889b72922ff9d6f6fdd5bed740e211217b4ac5c37b742b4e1b41" + 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.rb b/Formula/t/tree-sitter.rb new file mode 100644 index 0000000000000..1027faa546a0c --- /dev/null +++ b/Formula/t/tree-sitter.rb @@ -0,0 +1,95 @@ +class TreeSitter < Formula + desc "Parser generator tool and incremental parsing library" + homepage "https://tree-sitter.github.io/" + url "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.25.4.tar.gz" + sha256 "87eadc505905c70a692917c821958a819903f808f8d244068b1d273a033dc728" + 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_sequoia: "d759e793e811053e350f19269066d86609efa06fc2e92ce7085b413dc3baab70" + sha256 cellar: :any, arm64_sonoma: "1a0a7a12a4021659fd237f7b35abb449f179dff95b059ce874997a2d65b0a042" + sha256 cellar: :any, arm64_ventura: "7605faf1b7a973d90c481477a400b2b4da5a18adfdcaabfb9868075a84eef99f" + sha256 cellar: :any, sonoma: "873e4f49b4c0419ff3f5ff2d7f44c63068a9de9d3100f3f811b04e6d01f05d17" + sha256 cellar: :any, ventura: "96ef7b42541f6cdc3eb3d06137a6cc077b981549c22d397bb7a9460b20073e29" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb5af21cb73a0a56b5980663f9640c3d897c020bf3c5457d11b471f6f5cd467f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "51edea22da451343dd7f18b7d92908158ed96c0f6c74e24e3a373baffaddc538" + end + + depends_on "rust" => :build + depends_on "node" => :test + + def install + system "make", "install", "AMALGAMATED=1", "PREFIX=#{prefix}" + system "cargo", "install", *std_cargo_args(path: "cli") + 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" + + (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..b78a6a99f6c2b --- /dev/null +++ b/Formula/t/tree.rb @@ -0,0 +1,34 @@ +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_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..e53c3e6d0d6a0 --- /dev/null +++ b/Formula/t/treecc.rb @@ -0,0 +1,45 @@ +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 + + bottle do + 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, mojave: "4e9b82d074d10eae24c0c7e95879435ec8896072669d826614f34213843bfe5e" + sha256 cellar: :any_skip_relocation, high_sierra: "c05c019775b00f92fe2ea47a02c999356105789b9aa5536c4356090ccbb9ba99" + sha256 cellar: :any_skip_relocation, sierra: "0b3e61d5a910222d170fcee80d094be0dcd2707b7bebc6d40667a8f25b4b2e5c" + sha256 cellar: :any_skip_relocation, el_capitan: "e74d23594113e594ad8021fe55b0f0f863fcd4b01140c3fd8b1a5f2bb6c8ad74" + 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..d1ae95d75ab7f --- /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.2.1.tar.gz" + sha256 "d4000dfcdbabc9caf356005b38e18a6de71f626327d02ba609beec5846931f24" + license "MIT" + head "https://github.com/numtide/treefmt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "902f91f69a81425e7607a13e28defc1c21bd42ced20cb8e410d203f89d69c900" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "902f91f69a81425e7607a13e28defc1c21bd42ced20cb8e410d203f89d69c900" + sha256 cellar: :any_skip_relocation, arm64_ventura: "902f91f69a81425e7607a13e28defc1c21bd42ced20cb8e410d203f89d69c900" + sha256 cellar: :any_skip_relocation, sonoma: "468311bb66fdcb624956b1eaccc7182c4f27de53e6b68598c034ef61143bde58" + sha256 cellar: :any_skip_relocation, ventura: "468311bb66fdcb624956b1eaccc7182c4f27de53e6b68598c034ef61143bde58" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d47ac8b63bd2700fec7f21e022e274c092e8b8017341e22fb89b750313145428" + 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..f53a549cb0a97 --- /dev/null +++ b/Formula/t/treefrog.rb @@ -0,0 +1,54 @@ +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.0.tar.gz" + sha256 "67cbd3d2ee9810007feb97694c6eb1f7ddf9040210e69ca3adc7995c96f63df9" + 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 + sha256 arm64_sonoma: "e42ddfe0fa827d1f960ad9ebf94515bdd1e6515c84fa3a466e309118870da58d" + sha256 arm64_ventura: "46ea6cafe756b381432a53c52cad8bd19f4066ad6ebb5af04ff6371cc0f7cfdf" + sha256 sonoma: "dd238ea3df08da065ff476dbe01bd9620dedc69da885c4554b7eda53b6a63ab1" + sha256 ventura: "4f29217b878dc7e40a20db0704a4273798dc429f72c86595baa882bd39eca03a" + sha256 x86_64_linux: "5d9f3deacba06b0fee54e42f69653d224caad91c4feb04100982237401f8f5fe" + end + + depends_on "pkgconf" => :build + depends_on "glog" + depends_on "lz4" + depends_on "mongo-c-driver" + depends_on "qt" + + 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["qt"].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..1b5f0f141d142 --- /dev/null +++ b/Formula/t/tremor-runtime.rb @@ -0,0 +1,134 @@ +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 + + 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..14ff4ea3a91b5 --- /dev/null +++ b/Formula/t/trezor-agent.rb @@ -0,0 +1,329 @@ +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 6 + + bottle do + rebuild 3 + sha256 cellar: :any, arm64_sequoia: "d30a423e7bb16cb85bd82c747656b8cf5f565f22322153f65e3f680c599b943b" + sha256 cellar: :any, arm64_sonoma: "0ac21208ac317825a5fdd587048a1391270b5cdc97df69607e2b381d0c5c9606" + sha256 cellar: :any, arm64_ventura: "ee85d4ac6e1a6951e37cfa77ec7ff46eac91fb9cb0c858feb51dc0c5dba69db5" + sha256 cellar: :any, sonoma: "7aaad0a948426ba6ae82128e18501ebed5f2279c9e3d1f0dfd00f0fa38e79fb6" + sha256 cellar: :any, ventura: "ff6bd171a518ccbd6aaa4d6f8f6c1e0b9b14f843cebf10268c556fededd98984" + sha256 cellar: :any_skip_relocation, arm64_linux: "700035e02dda5a8198db4d54383d8a2bbc2549df3273089fcd024c170d633a95" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ea07ce42c9c3de33f2c307f30522d41a43809ad90096078f3d48657be95b1942" + end + + depends_on "pkgconf" => :build # for hidapi resource + 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.13" + + 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 "bleak" do + url "https://files.pythonhosted.org/packages/fb/96/15750b50c0018338e2cce30de939130971ebfdf4f9d6d56c960f5657daad/bleak-0.22.3.tar.gz" + sha256 "3149c3c19657e457727aa53d9d6aeb89658495822cd240afd8aeca4dd09c045c" + 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 "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/70/8a/73f1008adfad01cb923255b924b1528727b8270e67cb4ef41eabdc7d783e/ConfigArgParse-1.7.tar.gz" + sha256 "e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1" + 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/83/d3/e42d3cc9eab95995d5349ec51f6d638028b9c21e7e8ac6bea056b36438b8/construct-classes-0.1.2.tar.gz" + sha256 "72ac1abbae5bddb4918688713f991f5a7fb6c9b593646a82f4bf3ac53de7eeb5" + end + + resource "dbus-fast" do + url "https://files.pythonhosted.org/packages/0a/37/a27e7f2dc6a18b5dcee70ffb08013a33770c2154a51fb5e2c04a7f4169fa/dbus_fast-2.24.3.tar.gz" + sha256 "9042a1b565ecac4f8e04df79376de1d1d31e4c82eddb6e71e8b8d82d0c94dd3d" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + end + + resource "ecdsa" do + url "https://files.pythonhosted.org/packages/5e/d0/ec8ac1de7accdcf18cfe468653ef00afd2f609faf67c423efbd02491051b/ecdsa-0.19.0.tar.gz" + sha256 "60eaad1199659900dd0af521ed462b793bbdf867432b3948e87416ae4caf6bf8" + 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/bf/6f/90c536b020a8e860f047a2839830a1ade3e1490e67336ecf489b4856eb7b/hidapi-0.14.0.post2.tar.gz" + sha256 "6c0e97ba6b059a309d51b495a8f0d5efbcea8756b640d98b6f6bb9fdef2458ac" + 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/70/68/ae1dc25309ae92ac87134e542389e30b6efcac924384baef9622ece0e4eb/ledgerblue-0.1.54.tar.gz" + sha256 "1e7f7d493e919c447a5c8ebeaea0373bdfda0bec216284cecdea07185fdf173e" + 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/af/19/53ecbfb96d6832f2272d13b84658c360802fcfff7c0c497ab8f6bf15ac40/libusb1-3.1.0.tar.gz" + sha256 "4ee9b0a55f8bd0b3ea7017ae919a6c1f439af742c4a4b04543c5fd7af89b828c" + 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/55/5b/e3d951e34f8356e5feecacd12a8e3b258a1da6d9a03ad1770f28925f29bc/protobuf-3.20.3.tar.gz" + sha256 "2e3427429c9cffebf259491be0af70189607f365c2f41c7c3764af6f337105f2" + end + + resource "pycryptodome" do + url "https://files.pythonhosted.org/packages/13/52/13b9db4a913eee948152a079fe58d035bd3d1a519584155da8e786f767e6/pycryptodome-3.21.0.tar.gz" + sha256 "f7787e0d469bdae763b876174cf2e6c0f7be79808af26b1da96f1a64bcf47297" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/11/dc/e66551683ade663b5f07d7b3bc46434bf703491dbd22ee12d1f979ca828f/pycryptodomex-3.21.0.tar.gz" + sha256 "222d0bd05381dd25c32dd6065c071ebf084212ab79bab4599ba9e6a3e0009e6c" + 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/88/56/0f2d69ed9a0060da009f672ddec8a71c041d098a66f6b1d80264bf6bbdc0/pyelftools-0.31.tar.gz" + sha256 "c774416b10310156879443b81187d182d8d9ee499660380e645918b50bc88f99" + end + + resource "pymsgbox" do + url "https://files.pythonhosted.org/packages/7d/ff/4c6f31a4f08979f12a663f2aeb6c8b765d3bd592e66eaaac445f547bb875/PyMsgBox-1.0.9.tar.gz" + sha256 "2194227de8bff7a3d6da541848705a155dcbb2a06ee120d9f280a1d7f51263ff" + end + + resource "pynacl" do + url "https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz" + sha256 "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba" + end + + resource "pyobjc-core" do + url "https://files.pythonhosted.org/packages/b7/40/a38d78627bd882d86c447db5a195ff307001ae02c1892962c656f2fd6b83/pyobjc_core-10.3.1.tar.gz" + sha256 "b204a80ccc070f9ab3f8af423a3a25a6fd787e228508d00c4c30f8ac538ba720" + end + + resource "pyobjc-framework-cocoa" do + url "https://files.pythonhosted.org/packages/a7/6c/b62e31e6e00f24e70b62f680e35a0d663ba14ff7601ae591b5d20e251161/pyobjc_framework_cocoa-10.3.1.tar.gz" + sha256 "1cf20714daaa986b488fb62d69713049f635c9d41a60c8da97d835710445281a" + + # Backport commit to avoid Xcode.app dependency. Remove in the next release + # https://github.com/ronaldoussoren/pyobjc/commit/864a21829c578f6479ac6401d191fb759215175e + patch :DATA + end + + resource "pyobjc-framework-corebluetooth" do + url "https://files.pythonhosted.org/packages/f7/69/89afd7747f42d2eb1e8f4b7f2ba2739d98ccf36f6b5c72474802962494de/pyobjc_framework_corebluetooth-10.3.1.tar.gz" + sha256 "dc5d326ab5541b8b68e7e920aa8363851e779cb8c33842f6cfeef4674cc62f94" + + # Backport commit to avoid Xcode.app dependency. Remove in the next release + # https://github.com/ronaldoussoren/pyobjc/commit/864a21829c578f6479ac6401d191fb759215175e + patch :DATA + end + + resource "pyobjc-framework-libdispatch" do + url "https://files.pythonhosted.org/packages/b7/37/1a7d9e5a04ab42aa8186f3493478c055601503ac7f8d58b8501d23db8b21/pyobjc_framework_libdispatch-10.3.1.tar.gz" + sha256 "f5c3475498cb32f54d75e21952670e4a32c8517fb2db2e90869f634edc942446" + + # Backport commit to avoid Xcode.app dependency. Remove in the next release + # https://github.com/ronaldoussoren/pyobjc/commit/864a21829c578f6479ac6401d191fb759215175e + patch :DATA + 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/54/cd/d62884732e5d6ff6906234169d06338d53e37243c60cf73679c8942f9e42/python_daemon-3.1.0.tar.gz" + sha256 "fdb621d7e5f46e74b4de1ad6b0fff6e69cd91b4f219de1476190ebdd0f4781df" + end + + resource "python-gnupg" do + url "https://files.pythonhosted.org/packages/85/61/2df3cd6f49dbb2d4a6a567cac1d803e3a50d86207e196d0f9e67a48664f7/python-gnupg-0.5.3.tar.gz" + sha256 "290d8ddb9cd63df96cfe9284b9b265f19fd6e145e5582dc58fd7271f026d0a47" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "semver" do + url "https://files.pythonhosted.org/packages/41/6c/a536cc008f38fd83b3c1b98ce19ead13b746b5588c9a0cb9dd9f6ea434bc/semver-3.0.2.tar.gz" + sha256 "6253adb39c70f6e51afed2fa7152bcd414c411286088fb4b9effb133885ab4cc" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/07/37/b31be7e4b9f13b59cde9dcaeff112d401d49e0dc5b37ed4a9fc8fb12f409/setuptools-75.2.0.tar.gz" + sha256 "753bb6ebf1f465a1912e19ed1d41f403a79173a9acf66a42e7e6aec45c3c16ec" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "trezor" do + url "https://files.pythonhosted.org/packages/10/11/b80ffb168b3e1c41c96c7278693eb6421cf567181afea9514c1ccd11c1ed/trezor-0.13.9.tar.gz" + sha256 "9450bd7bb9d23e5e33a3c9e58e18f058b44c9d9c34ca664b4981a795aa9fb1ef" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + 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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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 "wheel" do + url "https://files.pythonhosted.org/packages/b7/a0/95e9e962c5fd9da11c1e28aa4c0d8210ab277b1ada951d2aee336b505813/wheel-0.44.0.tar.gz" + sha256 "a29c3f2817e95ab89aa4660681ad547c0e9547f20e75b0562fe7723c9a2a9d49" + end + + def install + without = if OS.mac? + # 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 + +__END__ +--- a/pyobjc_setup.py ++++ b/pyobjc_setup.py +@@ -510,15 +510,6 @@ def Extension(*args, **kwds): + % (tuple(map(int, os_level.split(".")[:2]))) + ) + +- # XCode 15 has a bug w.r.t. weak linking for older macOS versions, +- # fall back to older linker when using that compiler. +- # XXX: This should be in _fixup_compiler but doesn't work there... +- lines = subprocess.check_output(["xcodebuild", "-version"], text=True).splitlines() +- if lines[0].startswith("Xcode"): +- xcode_vers = int(lines[0].split()[-1].split(".")[0]) +- if xcode_vers >= 15: +- ldflags.append("-Wl,-ld_classic") +- + if os_level == "10.4": + cflags.append("-DNO_OBJC2_RUNTIME") diff --git a/Formula/t/trezor-bridge.rb b/Formula/t/trezor-bridge.rb new file mode 100644 index 0000000000000..91ecd1312732e --- /dev/null +++ b/Formula/t/trezor-bridge.rb @@ -0,0 +1,61 @@ +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 + + bottle do + 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..19abd29d5b559 --- /dev/null +++ b/Formula/t/triangle.rb @@ -0,0 +1,32 @@ +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_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, 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/trino.rb b/Formula/t/trino.rb new file mode 100644 index 0000000000000..0a43817bb2004 --- /dev/null +++ b/Formula/t/trino.rb @@ -0,0 +1,154 @@ +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/475/trino-server-475.tar.gz" + sha256 "e0abe7af2599003a23302af13bd74e69db45d3ba701899fa809e4cf8edbc01d4" + 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_sequoia: "4777bf2d482a6f798f73a57996fac72bcef44a997db370890489fe2fdd2b53bb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4777bf2d482a6f798f73a57996fac72bcef44a997db370890489fe2fdd2b53bb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4777bf2d482a6f798f73a57996fac72bcef44a997db370890489fe2fdd2b53bb" + sha256 cellar: :any_skip_relocation, sonoma: "a1c0b06e9af2862057a946e1f5d803aade8d890d0cc059951d24504115ca8b24" + sha256 cellar: :any_skip_relocation, ventura: "a1c0b06e9af2862057a946e1f5d803aade8d890d0cc059951d24504115ca8b24" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3636961f1fcedc775a0575a989b439cd29f796b31cf171a0f7cb7b611c5607df" + end + + depends_on "go" => :build + depends_on "openjdk" + + resource "trino-src" do + url "https://github.com/trinodb/trino/archive/refs/tags/475.tar.gz" + sha256 "cc358932b557e0748f3109d0d79a92d6261034423013d8f77f2905d902880069" + + livecheck do + formula :parent + end + end + + resource "trino-cli" do + url "https://search.maven.org/remotecontent?filepath=io/trino/trino-cli/475/trino-cli-475-executable.jar" + sha256 "3467e8b834d2935339d6912441b0c2cc51827b78e965dffc158186c81cec02b2" + + 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/303.tar.gz" + sha256 "14e6ecbcbee3f0d24b9de1f7be6f3a220153ea17d3fc88d05bbb12292b3dd52c" + + 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..3f93e6ae91501 --- /dev/null +++ b/Formula/t/trippy.rb @@ -0,0 +1,35 @@ +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_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..b444dc4f18db6 --- /dev/null +++ b/Formula/t/triton.rb @@ -0,0 +1,33 @@ +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" + + bottle do + rebuild 1 + 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..00efd5b110568 --- /dev/null +++ b/Formula/t/trivy.rb @@ -0,0 +1,38 @@ +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.62.1.tar.gz" + sha256 "1b8000f08876dd02203021414581275daa69db00fab731351dbcf2a008ebe82a" + license "Apache-2.0" + head "https://github.com/aquasecurity/trivy.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4e742f9af9ff0d46d6d774403472783ec7975eead80449d0eebac8209595bcc3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8011b49c51ab423f588157e71a4b639929551d2d40f7806a56b674f340b58d14" + sha256 cellar: :any_skip_relocation, arm64_ventura: "93f7f3555004dc551ff906eafc17cb5bc8b66dfe556f7ca3505e72192e114bd7" + sha256 cellar: :any_skip_relocation, sonoma: "bd35dab2279487b64edeced48c62f82883092ce5adf933e9c569872fc400d0bb" + sha256 cellar: :any_skip_relocation, ventura: "89990ebb9a19a94b07bb357e43a9ccadf2585ad298bf3b1d561f61816ea5db6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "8204027f4128fde5ff14c5c0269c7b7803457a5b05e0a9b5d26ad4ef07d22c31" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96cde021dbb3e8ad0c1be8cbc9a249c04a41c5f5673c490a9fb6095d30a5af40" + end + + depends_on "go" => :build + + def install + 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..37f78f94e6354 --- /dev/null +++ b/Formula/t/trojan-go.rb @@ -0,0 +1,169 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f58e47fab9a183c8212343c7e2e7fb4096af8ccc3a3d6db82bcace4e2a0feaf0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f9872077ff3a1ef7d427cac872b6b1ff7d3cff029c241e35a884e4b4a090e163" + sha256 cellar: :any_skip_relocation, arm64_ventura: "76f3e955eee77490f3104b14685a116a56697e78a77cd681a2161ae1889fc251" + sha256 cellar: :any_skip_relocation, arm64_monterey: "ec98c6b4c3d8848c7f4f509b2dc0597ced55ca1345e6cb7df3db3cc61e8806ca" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9762f85a824ff74c47da792549bee3b227c3abdc0cdb0e240cbedd353aefdfc1" + sha256 cellar: :any_skip_relocation, sonoma: "6ad928d61bed0387e16832906b26d2f33cbb38bdc432f2fd9926c8dfb0803265" + sha256 cellar: :any_skip_relocation, ventura: "88774cb71364936de995b60f0814352b844a0803b6da516def65ad0a5faef2b4" + sha256 cellar: :any_skip_relocation, monterey: "0e62938f7a9e79f03a657c4fdaa0399bd7b619043bc479bdb593d27d52bd37c2" + sha256 cellar: :any_skip_relocation, big_sur: "dbd2c6728ed016b1edec17347f6afb7b2c963838785e9579c597a84c84760782" + sha256 cellar: :any_skip_relocation, catalina: "032789eb1b094143bb9e0ff9ff2e322b4bed0e14e5a475459637dea749771a2a" + sha256 cellar: :any_skip_relocation, mojave: "938d529de6c2e30510d85e21a15507d1dd25c2775e4f15a23f3ebfe341403d9b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1d97afc587b2f38bb0bd46c0ed9adaf6d76346ac92c42b7cee5b959f4a0f0b7b" + end + + depends_on "go" => :build + + resource "geoip" do + url "https://github.com/v2fly/geoip/releases/download/202109102251/geoip.dat" + sha256 "ca9de5837b4ac6ceeb2a3f50d0996318011c0c7f8b5e11cb1fca6a5381f30862" + end + + resource "geoip-only-cn-private" do + url "https://github.com/v2fly/geoip/releases/download/202109102251/geoip-only-cn-private.dat" + sha256 "5af05c2ba255e0388f9630fcd40e05314e1cf89b8228ce4d319c45b1de36bd7c" + end + + resource "geosite" do + url "https://github.com/v2fly/domain-list-community/releases/download/20210910080130/dlc.dat" + sha256 "96376220c7e78076bfde7254ee138b7c620902c7731c1e642a8ac15a74fecb34" + 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..192ea0d2163fd --- /dev/null +++ b/Formula/t/truecrack.rb @@ -0,0 +1,61 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "8eff51aec7a5413b11d35adcc1559e036687ae31aee11a477cc7d62f603fd1e1" + sha256 cellar: :any_skip_relocation, high_sierra: "fd148aa52883969c30029e25889c560443347575cb064fe9e93d48e9940afcb6" + sha256 cellar: :any_skip_relocation, sierra: "96ecdedf66599ec83da60c5a64de37dce4aa3411bf3a575bb5d5e1b6646fd5b3" + sha256 cellar: :any_skip_relocation, el_capitan: "2905997955799043b8f07c7cb28854d0a0acd3a84131b92b6c49780570dd198f" + 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..94e6376d76bbc --- /dev/null +++ b/Formula/t/truffle.rb @@ -0,0 +1,65 @@ +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" + + bottle do + rebuild 2 + 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..2edfb4b1d190d --- /dev/null +++ b/Formula/t/trufflehog.rb @@ -0,0 +1,35 @@ +class Trufflehog < Formula + desc "Find and verify credentials" + homepage "https://trufflesecurity.com/" + url "https://github.com/trufflesecurity/trufflehog/archive/refs/tags/v3.88.29.tar.gz" + sha256 "ffe9be634161bd72582f29f67357b608c290060f7f00a717fe5d5f2508758864" + # 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_sequoia: "0abf4926fa7ab1a656e7bdcf62d3a290c274fd75d7c5e9f6b6597dbfbad9417d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "552d4265b5719f067d9f392ab72220de9155fda24f92ed008e19c424b6432594" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ae9fbf41ef112f6521365356690f5a2a71d3c6d1c6d400a3016b2639fdbcd9f" + sha256 cellar: :any_skip_relocation, sonoma: "bc85f232374c6f7800d1ad1ca5855c753162829efa0978df043b14b0ac68b224" + sha256 cellar: :any_skip_relocation, ventura: "a532d62c12462a7833b42c571e7028d55b7a2ecdc22e5d1072816deceef2b2d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa11bd5a30f3a40d4e5bc40059b440c97151c74b30b36a244ad2249148627682" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fe46f53c30fc8ac379f541430d2715434bfd49080dbf8a2d9475ad59c95a6d50" + 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..fae2e62edc50e --- /dev/null +++ b/Formula/t/trunk.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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..18fd73f5af3b4 --- /dev/null +++ b/Formula/t/trurl.rb @@ -0,0 +1,31 @@ +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_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..623f165b18d08 --- /dev/null +++ b/Formula/t/trzsz-go.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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, 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..b7c94fc1210c6 --- /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.22.tar.gz" + sha256 "ccf5a113d68156b409d89fead784256b4fd6a6bbae6a2d70df1e4403d383a962" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e6b2a6b5b2c89403d127d93f50dc18f1e91472c94353530de7378330e7933dbc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5492415379fbd7159f38b5075842a3662cabd815e77e7abc77f4bc67d39a14c6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5492415379fbd7159f38b5075842a3662cabd815e77e7abc77f4bc67d39a14c6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5492415379fbd7159f38b5075842a3662cabd815e77e7abc77f4bc67d39a14c6" + sha256 cellar: :any_skip_relocation, sonoma: "f69d82fa4beb36e67df26a299536e170b980e8671e980c14cf532448055f4114" + sha256 cellar: :any_skip_relocation, ventura: "f69d82fa4beb36e67df26a299536e170b980e8671e980c14cf532448055f4114" + sha256 cellar: :any_skip_relocation, monterey: "f69d82fa4beb36e67df26a299536e170b980e8671e980c14cf532448055f4114" + sha256 cellar: :any_skip_relocation, x86_64_linux: "834702bbebecfa8ceb019bf703ac0d3c041e06f7ef78e10c0e3271fa53c07c8a" + 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..1a4f4f9f95a21 --- /dev/null +++ b/Formula/t/trzsz.rb @@ -0,0 +1,75 @@ +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" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "069b5e2e21ca4ee881b66892d88f678d5239cd0d17de98560b483bdc4e361e97" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "34b1462777caa9dad8e2b457f0ac821c3fd74dff173f32f6d6dca728b4123cdf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "327fbdc12feae3e8d94c081d2918e5ac31bbe85d9d894106ef59b43ffec19cdd" + sha256 cellar: :any_skip_relocation, sonoma: "cb036cbea4083fda7d9169854ba154c8aa7c09593cb46935c9a5d93190fe3af4" + sha256 cellar: :any_skip_relocation, ventura: "d23b42eed99c1ff1ff1ef5ee4bb9a5e093d60f3680ac2e6bf834559b8cc8309c" + sha256 cellar: :any_skip_relocation, arm64_linux: "9352e42e41666d7842af49aa3100bc328c44c384e3b4689c35e7391438c4a7b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4fb0a8bab1c0def85b2e0d11e37d9e96d1c397485b5231fe9d3f952a6e5f9fe4" + end + + depends_on "python@3.13" + + conflicts_with "trzsz-go", because: "both install `trz`, `tsz` binaries" + + resource "iterm2" do + url "https://files.pythonhosted.org/packages/87/a6/7c6e0836e83d67eafd2e92dc5449fc2b3fc715bc8cdd4391cd3178aaa937/iterm2-2.8.tar.gz" + sha256 "90d3e86d6af5d955c319993c8352cf3e93c7a0c919ed8b2ad551a742b87e889b" + end + + resource "protobuf" do + url "https://files.pythonhosted.org/packages/b1/a4/4579a61de526e19005ceeb93e478b61d77aa38c8a85ad958ff16a9906549/protobuf-5.28.2.tar.gz" + sha256 "59379674ff119717404f7454647913787034f03fe7049cbef1d74a97bb4593f0" + 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/e2/73/9223dbc7be3dcaf2a7bbf756c351ec8da04b1fa573edaf545b95f6b0c7fd/websockets-13.1.tar.gz" + sha256 "a3b3366087c1bc0a2795111edcadddb8b3b59509d5db5d7ea3fdd69f954a8878" + 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..40673cc0f1b9a --- /dev/null +++ b/Formula/t/tsduck.rb @@ -0,0 +1,73 @@ +class Tsduck < Formula + desc "MPEG Transport Stream Toolkit" + homepage "https://tsduck.io/" + url "https://github.com/tsduck/tsduck/archive/refs/tags/v3.40-4165.tar.gz" + sha256 "d499fd4571e3ebb6660de70b0ca3217423bf8d66b929e7bc0b92cfb6f01c9d04" + license "BSD-2-Clause" + head "https://github.com/tsduck/tsduck.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "8811f4d35772f8d2f33d296e83dbfa5e0a871d4b3199d4eaca70f51c371b1397" + sha256 cellar: :any, arm64_sonoma: "0c00dae84b5fed39ea58cd7026d0fab834e06c0fa7ec6a1e291edb1af22c7d9b" + sha256 cellar: :any, arm64_ventura: "51c022c41fea15c8aa592bc07a52134c3c06d0fd6363859cdd1b11586d8dba9d" + sha256 cellar: :any, sonoma: "86170581f6a47ae249719e20f1f6d6ae0c0790629e259645f19d0cd9969df73b" + sha256 cellar: :any, ventura: "b32c4b0d3949c9d4002c792ff62ef31a5e203437ddf06c42c3a196961ef38e93" + sha256 cellar: :any_skip_relocation, arm64_linux: "aec04b863d8bf4caffbfeec47188e4d3dc4dcb142c89046c534c0a11df5aee38" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ef0a792b04b22c32b7d6fbacf6fe97f0f36ce8e5306a772db4fa4d8986e7105" + 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/tssh.rb b/Formula/t/tssh.rb new file mode 100644 index 0000000000000..c912337e5221c --- /dev/null +++ b/Formula/t/tssh.rb @@ -0,0 +1,32 @@ +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" + + bottle do + rebuild 1 + 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, 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..5b8c632c58fe8 --- /dev/null +++ b/Formula/t/tsui.rb @@ -0,0 +1,52 @@ +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" + + bottle do + 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..8aba9dcaaa264 --- /dev/null +++ b/Formula/t/tsung.rb @@ -0,0 +1,33 @@ +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" + + bottle do + rebuild 1 + 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, 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..62d960883cf45 --- /dev/null +++ b/Formula/t/tt.rb @@ -0,0 +1,45 @@ +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.9.1/tt-2.9.1-complete.tar.gz" + sha256 "c2db35772470cdfba8b2e1cba06391d848cfec3c50163e635be305aedd23c04a" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6d04aa04e9bed0b14ad572a06872d32e48c2df523e38221943908806d0ef0140" + sha256 cellar: :any, arm64_sonoma: "b7bfef5b73cf784b28eea0ff9e2cadc4e4d66f3caa8518d85362f01de5d2a596" + sha256 cellar: :any, arm64_ventura: "17e36ad39cc6eff36ba4417a514e33b899b9d2cfac9beadb6256d21a9a827793" + sha256 sonoma: "eb3ed8f61cc6b844e6728ad12a202768352d1be5b46a0e4be684d54e8d145724" + sha256 ventura: "5f3bf271f86d10e3082cfaa3208e919ff1d60bd14966b9fb497d13c7c3007ebf" + sha256 cellar: :any_skip_relocation, arm64_linux: "49e0d720c0028f079bbdd709b9b2737bc821e768fb5144952c308cd997f56d89" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6e685ed345c8e6fe62a1d357fdade38e242354eab0842ac0152723baaf74168c" + 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", shells: [:bash, :zsh]) + 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..b798bd3b45172 --- /dev/null +++ b/Formula/t/tta.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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, mojave: "898e75423e5f2a1f872b7ce2e2258db686f09ea04edf56555b15c113f04e9141" + sha256 cellar: :any_skip_relocation, high_sierra: "10ec40111e20f5168d67b02c52b464065e72fa48060c37a5fd86907062e8a997" + sha256 cellar: :any_skip_relocation, sierra: "7a3c44b675bbaf81041c7eeacef622fab8fe3abbc83329a927a1ed0034231b1f" + sha256 cellar: :any_skip_relocation, el_capitan: "0543d1561fe44fc6137f90076d247f16e6ac28e72413a7ba3bac08d422bb4e9c" + 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..23d19a65f8b6d --- /dev/null +++ b/Formula/t/ttdl.rb @@ -0,0 +1,29 @@ +class Ttdl < Formula + desc "Terminal Todo List Manager" + homepage "https://github.com/VladimirMarkelov/ttdl" + url "https://github.com/VladimirMarkelov/ttdl/archive/refs/tags/v4.11.0.tar.gz" + sha256 "e5c3fd240b3c84b2baf78bcfab0f39a7fd668c391964f3c69f56906c5e28d2bc" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fa8f870fed0e5c1442cfbf87d47f6046cd3d9f180801e5ecfb4cfa0fcbe182e6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5a4c7b68ba518565d59ae669e7f326dc1e81e07958237d6ddc42b04732386707" + sha256 cellar: :any_skip_relocation, arm64_ventura: "38d376a72c92c7a722f2bc8ab2ca1ac5fc064e0d59e2b7f266b8b28fd2b5f277" + sha256 cellar: :any_skip_relocation, sonoma: "5bc2fc8d6260aca0ce0442a744081e996c23ce444fef222f5d2371afdfa9e02c" + sha256 cellar: :any_skip_relocation, ventura: "3332efeeaa1a6cf768d96a0db42cc1c4e5dc8448ced198ef5ec7cd1e3d7abccf" + sha256 cellar: :any_skip_relocation, arm64_linux: "07837a9f76c05dcff074b7e15ca9d3bd7cff4b78c0d979be149f2266cc45030e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f092a9cbf70b63ea2c0b337a0c8945e2bf95d07c7c53e15660824c7bf7200c9a" + 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..218d6a5b9f14d --- /dev/null +++ b/Formula/t/ttf2eot.rb @@ -0,0 +1,44 @@ +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"] + + bottle do + 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, mojave: "54d328636bcb7d9fe1e28bf46115f0b718fc9f4d8e18c48b39d5b2e87bb3930b" + sha256 cellar: :any_skip_relocation, high_sierra: "7b44ec925ee2bbeeaba775befc77c0c22f2f690ecd94edb72e471c631da80f43" + sha256 cellar: :any_skip_relocation, sierra: "26f40d7a58de2ee396fc04dd47c41e9b65640570fa1ca8b71134dd88e6e88c06" + sha256 cellar: :any_skip_relocation, el_capitan: "5fc89e642b7d51c0c7965d9a952d1b697f94b4ec16d7711ff37387979ce47f5d" + 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 = (MacOS.version >= :catalina) ? "Arial Unicode" : "Arial" + 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..e7359c28089cb --- /dev/null +++ b/Formula/t/ttf2pt1.rb @@ -0,0 +1,40 @@ +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 + + bottle do + 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, mojave: "6cdd6394dba88c5c8acc8199443a3dcb8f3eaf357c8497d58b84c5a4e475cc5f" + sha256 cellar: :any_skip_relocation, high_sierra: "180c25530da15c48af99ea59e20f40e18e7339e812a375c9d3760ad23429a085" + sha256 cellar: :any_skip_relocation, sierra: "e70efa3a1b28b212ea2366ac50b33fbf48e9b7922d03f1a6b86965af87244bee" + sha256 cellar: :any_skip_relocation, el_capitan: "0ef606dfb439ad46c5442b35458f009e864ee3270145c7be940581a5d272bc54" + 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..ccfb91aa26b32 --- /dev/null +++ b/Formula/t/ttfautohint.rb @@ -0,0 +1,63 @@ +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 + + bottle do + 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, mojave: "dc0fb9212fe1535397bb7c42468bd80902810895d05ebb70fb5da557a38b39f3" + 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" + 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 = (MacOS.version >= :catalina) ? "Arial Unicode.ttf" : "Arial.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..643e5011dcfca --- /dev/null +++ b/Formula/t/tth.rb @@ -0,0 +1,38 @@ +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 + + bottle do + rebuild 1 + 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..908295a63721a --- /dev/null +++ b/Formula/t/ttmath.rb @@ -0,0 +1,22 @@ +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" + + 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..04615cdb3da94 --- /dev/null +++ b/Formula/t/tty-clock.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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, mojave: "eab206747869e0190d82dfa71d7763df4a3f202c3035f7bccb5b32fc52580989" + sha256 cellar: :any_skip_relocation, high_sierra: "b3d2a19cdb38e0e156be552d6f9ca8926097300f17bbe6628b7443934d3e1cb1" + sha256 cellar: :any_skip_relocation, sierra: "9b0e056ec6d86d9ba9cbd2abc02236607a6ad5601e7a656d10cad20182564315" + sha256 cellar: :any_skip_relocation, el_capitan: "c0d981769811bf1c265e11702ea0d26bcf87102ac92896c04c14a91fbed1cc8c" + 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..c005e16d2af53 --- /dev/null +++ b/Formula/t/tty-share.rb @@ -0,0 +1,30 @@ +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_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, 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..82b3add1a4ec3 --- /dev/null +++ b/Formula/t/tty-solitaire.rb @@ -0,0 +1,28 @@ +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_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..d5f4da99b3436 --- /dev/null +++ b/Formula/t/ttyd.rb @@ -0,0 +1,48 @@ +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 2 + head "https://github.com/tsl0922/ttyd.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "33c65b152fb70d584888f5239b8003090d15c828b034ae4fae6bc36337ad030c" + sha256 arm64_sonoma: "6d3eb5c3f4c049f7bce60349dc0c7b31df9336feea2b88c6cd8fb58f0b1c6057" + sha256 arm64_ventura: "36a2735751c4de95d01299f4378f7cf000e560e80b0fc9101e35ff006bfb92e4" + sha256 sonoma: "6905f5957460561162dfd04a039cfa1d7792acc7de68154a432acf93e88d9358" + sha256 ventura: "6cbcd6bdda77c96268ac6e25c194037af3f054fd6a0b8a1b2614e6f6dd3675fa" + sha256 arm64_linux: "50912f458f5dd30ee4c08a9215285e84a736d0a4439cbbfcb590d17fc62561e2" + sha256 x86_64_linux: "7bddc259bdafc9182b5f33d160aca7d9b010782e0c9a69421ac873f1f0a6542c" + 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..0f44b64ba3e35 --- /dev/null +++ b/Formula/t/ttygif.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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..13d9269cf6a29 --- /dev/null +++ b/Formula/t/ttyplot.rb @@ -0,0 +1,35 @@ +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_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..dc3879ea48b37 --- /dev/null +++ b/Formula/t/ttyrec.rb @@ -0,0 +1,79 @@ +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 + + bottle do + 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, mojave: "fa4e19544555ebf7956beceaa656bb8aed894f26b82683a5db32b88501cc5a85" + sha256 cellar: :any_skip_relocation, high_sierra: "8121debd07c4ecdd24d86fc7dadb00a7807e028f512418b5ba0d85768619628d" + sha256 cellar: :any_skip_relocation, sierra: "0323b20a0905ad1c3a2f997714572d779bcf6db63d8798840c14f6a75fd70cd5" + sha256 cellar: :any_skip_relocation, el_capitan: "ec05f403a1aa20da2e1fbd6f4d912b3d31fa1fd100c9adba68c928146a50bbc0" + 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..8337a50b12c82 --- /dev/null +++ b/Formula/t/tuc.rb @@ -0,0 +1,31 @@ +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.2.0.tar.gz" + sha256 "bb6d16772ed0728f396d32066d391206420497a4f902071b0229790a8c844307" + license "GPL-3.0-or-later" + head "https://github.com/riquito/tuc.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0aa436898d307013552ed81f6b14b5ff3e11395f6a18f4335d0b1387e4e1b0e0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "02f43fcce93fe1020c8571578b9e8b2592712bbca3aa79becc067b9ffbafd359" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4b5f8b001cac3e971cd56939061222aeec9916ff57b71645c5d68fcd05a654b6" + sha256 cellar: :any_skip_relocation, arm64_monterey: "c2560679670ba581bc0eec3656150f6ac3577882eb549d7c33a6ac8ff1d1e2e9" + sha256 cellar: :any_skip_relocation, sonoma: "9e4175a87a9dcf622e05c47df7ab97a0b9f3eb459a4e83dcb3a314cab7b4d18b" + sha256 cellar: :any_skip_relocation, ventura: "8d8ff5696f93d0cfb8e07f90a484e1bce94847ecc7dd02a8de103a7dc0925188" + sha256 cellar: :any_skip_relocation, monterey: "ba015c8a9e89563116c24bdb064ae9af8459d3bdf07254969d66cd88f40c50b1" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8b5476d47a7fe43564f45d4a45a68362b0d899059f90267e41abb858671b991" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6871bbb0204d11a5fe0dcb85deebe1e97adc240b99491dd0a2df8ffa397b7da3" + 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..c046ea39e7066 --- /dev/null +++ b/Formula/t/tuisky.rb @@ -0,0 +1,48 @@ +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_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/tundra.rb b/Formula/t/tundra.rb new file mode 100644 index 0000000000000..86bea88b43c6a --- /dev/null +++ b/Formula/t/tundra.rb @@ -0,0 +1,75 @@ +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 + + bottle do + rebuild 1 + 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..3530dac7e253d --- /dev/null +++ b/Formula/t/tunnel.rb @@ -0,0 +1,35 @@ +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_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, 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..21c92bc8e4258 --- /dev/null +++ b/Formula/t/tuntox.rb @@ -0,0 +1,57 @@ +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" + + bottle do + 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/tut.rb b/Formula/t/tut.rb new file mode 100644 index 0000000000000..2b50a2b36e1a5 --- /dev/null +++ b/Formula/t/tut.rb @@ -0,0 +1,31 @@ +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" + + bottle do + 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, 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..51bee550cca7f --- /dev/null +++ b/Formula/t/tvnamer.rb @@ -0,0 +1,61 @@ +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 8 + head "https://github.com/dbr/tvnamer.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "6ba00502c3fbfb57becef9ce7c8e3c2778c1ad88034d70b327d52518a9ab189d" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..ca7cdd16bba76 --- /dev/null +++ b/Formula/t/twarc.rb @@ -0,0 +1,97 @@ +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/8a/ed/ac80b24ece6ee552f6deb39be34f01491cff4018cca8c5602c901dc08ecf/twarc-2.14.0.tar.gz" + sha256 "fa8ee3052d8b9678231bea95d1bdcbabb3968d35c56a8d1fcedc8982e8c66a66" + license "MIT" + revision 9 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "a47530dfbcb3c61845ce2a202587d5c931f166cdbd1a125b800d6aebb6c6e157" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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/5f/1d/45434f64ed749540af821fd7e42b8e4d23ac04b1eda7c26613288d6cd8a8/click-plugins-1.1.1.tar.gz" + sha256 "46ab999744a9d831159c3411bb0c79346d94a444df9a3a3742e9ed63645f264b" + 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/6a/40/64a912b9330786df25e58127194d4a5a7441f818b400b155e748a270f924/humanize-4.11.0.tar.gz" + sha256 "e66f36020a2d5a974c504bd2555cf770621dbdbb6d82f94a6857c0b1ea2608be" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "tqdm" do + url "https://files.pythonhosted.org/packages/58/83/6ba9844a41128c62e810fddddd72473201f3eacde02046066142a2d96cc5/tqdm-4.66.5.tar.gz" + sha256 "e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + 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..2db58bd01fd56 --- /dev/null +++ b/Formula/t/tweak.rb @@ -0,0 +1,41 @@ +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 + + bottle do + 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, mojave: "82ec40f5ceaee7630a9bba6652c350388176c38908681fe4389a37d2e9605009" + sha256 cellar: :any_skip_relocation, high_sierra: "e36456b9e78dafa97c7c972a9c26bc274cc30dff8f50c2a736d2aaca8068dfa8" + 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/twine.rb b/Formula/t/twine.rb new file mode 100644 index 0000000000000..3802b03b8ecc9 --- /dev/null +++ b/Formula/t/twine.rb @@ -0,0 +1,146 @@ +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/c8/a2/6df94fc5c8e2170d21d7134a565c3a8fb84f9797c1dd65a5976aaf714418/twine-6.1.0.tar.gz" + sha256 "be324f6272eff91d07ee93f251edf232fc647935dd585ac003539b42404a8dbd" + license "Apache-2.0" + head "https://github.com/pypa/twine.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ec3b23c0e332f1c03c3af3425858b2b9aee42d2c619e80b789e73b394e550760" + sha256 cellar: :any, arm64_sonoma: "4cafbbad3910a5132eaa302259c34bb87b5073cd1fca4d36ee6f234d4c647472" + sha256 cellar: :any, arm64_ventura: "1abc11c2a3efbf886021b93059f5e6664e5596b3aaf34857e23e5ab4d4a32129" + sha256 cellar: :any, sonoma: "daeb2faecb8c7df9d4f8553420f1f80526f1e07c284ef7627da940862fb502d0" + sha256 cellar: :any, ventura: "4abae8b2d936f4cbca561ba3d16fd9e6f72271e5141bda0de392131f43de9086" + sha256 cellar: :any_skip_relocation, arm64_linux: "70da8af2b49cd69b61f2ce969b345089b3cc22d9bd8239bd27dfb5b204ee2632" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2991356e47daefde97834092663ddac04b776d4761af3a817e7cb5ae18c70456" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "docutils" do + url "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz" + sha256 "3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + end + + resource "jeepney" do + url "https://files.pythonhosted.org/packages/d6/f4/154cf374c2daf2020e05c3c6a03c91348d59b23c5366e968feb198306fdf/jeepney-0.8.0.tar.gz" + sha256 "5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806" + 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/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz" + sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" + 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/88/3b/7fa1fe835e2e93fd6d7b52b2f95ae810cf5ba133e1845f726f5a992d62c2/more-itertools-10.6.0.tar.gz" + sha256 "2cd7fad1009c31cc9fb6a035108509e6547547a7a738374f10bd49a09eb3ee3b" + end + + resource "nh3" do + url "https://files.pythonhosted.org/packages/46/f2/eb781d94c7855e9129cbbdd3ab09a470441e4176a82a396ae1df270a7333/nh3-0.2.20.tar.gz" + sha256 "9705c42d7ff88a0bea546c82d7fe5e59135e3d3f057e485394f491248a1f8ed5" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz" + sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz" + sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..d9a4e9c4281ff --- /dev/null +++ b/Formula/t/twitch-cli.rb @@ -0,0 +1,30 @@ +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_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..f99f24eba8353 --- /dev/null +++ b/Formula/t/twm.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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..3545b0d510051 --- /dev/null +++ b/Formula/t/two-lame.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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, mojave: "77d5c37574ecdf0d857e09f47e9de5eda3049fe8cd1486942a6a62a4baae6f06" + sha256 cellar: :any, high_sierra: "153c7085434a1bce73b0ce704f37997179d6e53614a7014546b9b4d3f80dec97" + 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/twoping.rb b/Formula/t/twoping.rb new file mode 100644 index 0000000000000..6f57582a9e51d --- /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 5 + sha256 cellar: :any_skip_relocation, all: "5153c17a69826ba8fa3274c858acc3c608cf7b9208fa683043fcda9bed6311c1" + end + + depends_on "python@3.13" + + 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..ac27e57c4cdb6 --- /dev/null +++ b/Formula/t/twtxt.rb @@ -0,0 +1,112 @@ +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 5 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "edb8ea5c3391196da08836218420f89c6bd007decd33854e0c2e306789489076" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "47364ec472d99034f372dc075295ee98d3e7ebb38e29d9a692b353d7dc46eb4c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "682fab3d700db2019e0e40e049950be61c64fd995d2fe9d44cb451f07d03f877" + sha256 cellar: :any_skip_relocation, sonoma: "e07965ffd9743f2bb45dd95af5f3b1a45e090388116234aa52fee0da93a645fb" + sha256 cellar: :any_skip_relocation, ventura: "d1853863f6717ea82bbafa030651b0975700a319d6637aba0e7a619518e425d0" + sha256 cellar: :any_skip_relocation, arm64_linux: "fed11c702b5f8867cfe4fa33ac6df610ef77f0a6871db24b797c9f9e4f725a8a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8c5d0c9f7b62813e47e77c796d0ed351e038091ed3dbd91b1a6fd90187fd252f" + end + + depends_on "python@3.13" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/bc/69/2f6d5a019bd02e920a3417689a89887b39ad1e350b562f9955693d900c40/aiohappyeyeballs-2.4.3.tar.gz" + sha256 "75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/1d/cd/af0e573bdb77ae7df1148fe8e4ea854215a37db0b116aac6b5496335095e/aiohttp-3.11.4.tar.gz" + sha256 "9d95cce8bb010597b3f2217155befe4708e0538d3548aa08d640ebf54e3f57cb" + end + + resource "aiosignal" do + url "https://files.pythonhosted.org/packages/ae/67/0952ed97a9793b4958e5736f6d2b346b414a2cd63e82d05940032f45b32f/aiosignal-1.3.1.tar.gz" + sha256 "54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" + sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + end + + resource "frozenlist" do + url "https://files.pythonhosted.org/packages/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + end + + resource "humanize" do + url "https://files.pythonhosted.org/packages/6a/40/64a912b9330786df25e58127194d4a5a7441f818b400b155e748a270f924/humanize-4.11.0.tar.gz" + sha256 "e66f36020a2d5a974c504bd2555cf770621dbdbb6d82f94a6857c0b1ea2608be" + 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/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/a9/4d/5e5a60b78dbc1d464f8a7bbaeb30957257afdc8512cbb9dfd5659304f5cd/propcache-0.2.0.tar.gz" + sha256 "df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70" + 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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/4b/d5/0d0481857de42a44ba4911f8010d4b361dc26487f48d5503c66a797cff48/yarl-1.17.2.tar.gz" + sha256 "753eaaa0c7195244c84b5cc159dc8204b7fd99f716f11198f999f2332a86b178" + 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", shells: [:fish, :zsh], 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..79b892be61d8d --- /dev/null +++ b/Formula/t/txr.rb @@ -0,0 +1,50 @@ +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-299.tar.bz2" + sha256 "9da0e12f6b6db9c4262e92214863c90f89cd40e4fa8b5eac2b983bf65194112a" + license "BSD-2-Clause" + + livecheck do + url "https://www.kylheku.com/cgit/txr" + regex(/href=.*?txr[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f992cbed8d7a0036837f0ffd69a346a859d982810e5f01af1597dd8ae8160578" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "43f055721c56bd67fa9587f1d6215962fae46aa8613cbb5f6c8a4409a55ca06d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6de5f5a5bf6d757fba045f6c3c2a03f63662d5909ed6467b9bf4e07c2fe01e4c" + sha256 cellar: :any_skip_relocation, sonoma: "adc193c9171eb012618c4a990020428c5b8c8f481a7a91b415a1764d1d00d111" + sha256 cellar: :any_skip_relocation, ventura: "c071be5370824ec8c3225aaf1d7d8dc74919cf8669c48598184a8c2b0fa2d581" + sha256 cellar: :any_skip_relocation, x86_64_linux: "91ddc85af12c95ff8070bd5359ef3e2451930ec9788304264be9bb1f9c458589" + end + + depends_on "pkgconf" => :build + + uses_from_macos "bison" => :build + uses_from_macos "flex" => :build + uses_from_macos "libffi", since: :catalina + uses_from_macos "libxcrypt" + uses_from_macos "zlib" + + on_linux do + depends_on "gcc" => :build + end + + fails_with :gcc do + version "11" + cause "Segmentation faults running TXR" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make" + 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"] + 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..fe53d412d8084 --- /dev/null +++ b/Formula/t/txt2man.rb @@ -0,0 +1,46 @@ +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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a35a60cd90ffb17bd56c29b9a003eb5298a40f270670da3fd62238eea9337f40" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "02ec46f5c280b3f46b613be3394a713727e1765199f90d5240505803d75f4a19" + sha256 cellar: :any_skip_relocation, arm64_ventura: "665ae11624c51ed123faad382b4af7256b5e055c235d54f1d063e58589380909" + sha256 cellar: :any_skip_relocation, arm64_monterey: "665ae11624c51ed123faad382b4af7256b5e055c235d54f1d063e58589380909" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "665ae11624c51ed123faad382b4af7256b5e055c235d54f1d063e58589380909" + sha256 cellar: :any_skip_relocation, sonoma: "95c0f0a4e3fe25685955b8597d9937e10080a91c31a70ff8eb0fd877cc624f06" + sha256 cellar: :any_skip_relocation, ventura: "bf830d1619712538f9458fdd8c6e201d883297ee6e7210dd9e8d977318de216e" + sha256 cellar: :any_skip_relocation, monterey: "bf830d1619712538f9458fdd8c6e201d883297ee6e7210dd9e8d977318de216e" + sha256 cellar: :any_skip_relocation, big_sur: "bf830d1619712538f9458fdd8c6e201d883297ee6e7210dd9e8d977318de216e" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b425f34d6d190a2e69695893eb4e8d648efec39b345278ad90ca531cbc5f164" + sha256 cellar: :any_skip_relocation, x86_64_linux: "665ae11624c51ed123faad382b4af7256b5e055c235d54f1d063e58589380909" + 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..3faa04e9dc6bf --- /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 3 + sha256 cellar: :any_skip_relocation, all: "61a698b49ca220ecb3721f929db0e5965696a44facf0113e8114317da8ec6ec6" + end + + depends_on "python@3.13" + + 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..e975c3af31541 --- /dev/null +++ b/Formula/t/tygo.rb @@ -0,0 +1,54 @@ +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.18", + revision: "5974386bfc9a5d403e6d61de9c67e8762c01f590" + license "MIT" + head "https://github.com/gzuidhof/tygo.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "08e314c0945c7d47759b02934f9a1a3d3321de212bd62d4fae71c48a1effbd75" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "08e314c0945c7d47759b02934f9a1a3d3321de212bd62d4fae71c48a1effbd75" + sha256 cellar: :any_skip_relocation, arm64_ventura: "08e314c0945c7d47759b02934f9a1a3d3321de212bd62d4fae71c48a1effbd75" + sha256 cellar: :any_skip_relocation, sonoma: "58078f2a3fd657c1c18af1e15b6d8431de201df2cdffd66566f5d43e5897c7c0" + sha256 cellar: :any_skip_relocation, ventura: "58078f2a3fd657c1c18af1e15b6d8431de201df2cdffd66566f5d43e5897c7c0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2f75998b51e4061e7b4d2c366b58b77e6914105cd2d3afbbaabbb06147646e0b" + 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..a93fd455cfcd0 --- /dev/null +++ b/Formula/t/typedb.rb @@ -0,0 +1,28 @@ +class Typedb < Formula + desc "Strongly-typed database with a rich and logical type system" + homepage "https://typedb.com/" + url "https://github.com/vaticle/typedb/releases/download/2.23.0/typedb-all-mac-2.23.0.zip" + sha256 "93a5540c02e3e4f4b7783a2d14a8907dcfde3c2b051984ca6b2df79abc3830ce" + license "AGPL-3.0-or-later" + + 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..3b79b18df5322 --- /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-4.3.4.tgz" + sha256 "9a8aef1dd532f9b4b38087b002b949d9e761ab31fe1dc2f0bfe43ac223150385" + license all_of: ["MIT", "Apache-2.0"] + + bottle do + sha256 cellar: :any_skip_relocation, all: "2266c2f21fcd3c94c369759aee6b98550ae724129e32fbe1de82fd15b1b76297" + 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..dac6955b174da --- /dev/null +++ b/Formula/t/typescript.rb @@ -0,0 +1,34 @@ +class Typescript < Formula + desc "Language for application scale JavaScript development" + homepage "https://www.typescriptlang.org/" + url "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz" + sha256 "72e75dbeb92c2e6eb9a34cb59d74fab5c2ee6f32a0324a89405f6165d5a08374" + license "Apache-2.0" + head "https://github.com/Microsoft/TypeScript.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "af7b5de78b6badec07a3319bbfe295792ace24e06a50b7c8b66d6701d0af3521" + 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..d28de3bcbec8c --- /dev/null +++ b/Formula/t/typeshare.rb @@ -0,0 +1,44 @@ +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.2.tar.gz" + sha256 "7640e70720190576aa82df57561841f33720281e55dc65fedcc0cd89ccc411e2" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/1Password/typeshare.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d04400d66c5bcbcd1babe6a500563294a0f6e5b79100be34d0b0465db7e43bae" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8a6691da6e2e6761fb371fda9b4a50e68c8e362673c7fd5d2664f23d40ec88cd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "90457cbc2f02a61fea512d6e96668a7c8a877703f0ebc28db6d5a214fa6502cc" + sha256 cellar: :any_skip_relocation, sonoma: "20df350c85f38fc2831d1a281abeefc30c776558382ea7c988b818083cf5d320" + sha256 cellar: :any_skip_relocation, ventura: "e7e101d9845a1d5c1f1d2f0c7f0cf077e595d4842c6732c3b1d2b2d3407da682" + sha256 cellar: :any_skip_relocation, arm64_linux: "422313eeb267b2d53a60a403209086284de28ecb0dd1d9a248a7ea1f3f8fec42" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fefade27a0676ef950b1fb79c5a4b13929b637656a7c95c5b3eb70baa94bc080" + 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..358dde1257178 --- /dev/null +++ b/Formula/t/typespeed.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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 mojave: "49c54c15fa8204ca5ae373f0a1995c01b7b6e24de0ab0af7d8081e9f3b229258" + sha256 high_sierra: "70fe987eeaabcf8e94996d56a478c1aac14781f2475337476ff2dc87543bb602" + sha256 sierra: "8c4af1a3e4e8c32eab5da01fc3b30604eaad86bf84f4a96af7878599c92a4a36" + sha256 el_capitan: "82223614505b9fac677ba4ac4ad9f3b646597cddde604f8c981cc000b8ed7bf6" + 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..1f1c84d1b011a --- /dev/null +++ b/Formula/t/typical.rb @@ -0,0 +1,74 @@ +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_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..4c680655066a4 --- /dev/null +++ b/Formula/t/typioca.rb @@ -0,0 +1,38 @@ +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_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, 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..280fc230bd4e1 --- /dev/null +++ b/Formula/t/typos-cli.rb @@ -0,0 +1,33 @@ +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.32.0.tar.gz" + sha256 "11c1ac4f9427cd572ce728c20814ebd8b8769ed909b7d1309d805d9a37b81084" + 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_sequoia: "5818ae6863b77a8d76b454a6e5fc5ed217d09d24e75efd6cf571603ce024370b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f0348f9b24c890ec0dd4c4baa74045244390069a31639b2d4031fdf205944e5d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6822020575a3295db10e07084bbf7497bc5465191924403d8e9eac7a3add8a95" + sha256 cellar: :any_skip_relocation, sonoma: "200ed434852f914cf0bbc6a10e0a2a825195482518343172cfe0c790376bac19" + sha256 cellar: :any_skip_relocation, ventura: "87e9b1b9acee3714b46396eecdbb2b3e2c554a84a8fa6c5935fe5418ed918317" + sha256 cellar: :any_skip_relocation, arm64_linux: "7df8ddbaf34a1592d5cef190fa5c8c8417986fb80659b8404e1927844d691d2b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a0d411a87e8cc18d355bc1fb0224fd4965cbbcd8a00d756933b2b672862864ea" + 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..eddc1328c31db --- /dev/null +++ b/Formula/t/typos-lsp.rb @@ -0,0 +1,45 @@ +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.37.tar.gz" + sha256 "a1fc610814752811bccac1cc2a75b86a2475df7546a6051f4618c5625d286a1d" + license "MIT" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d8a096a4453e5b4f20d8ddb20e87abac2539c42230e2cf29daa0c5af58565c40" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4ffd1ecafd76a83b10cccf8858338686a90e9fc89e16da98fb9a5ff1a5b8fa5b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4ccdf0b65429819ad75c9a00fadec5fcacf05c0039f8a295973ae72b3e0e9a77" + sha256 cellar: :any_skip_relocation, sonoma: "9d1ff0a88502af0bc61d093bb9cc471c927b3584c06aed939ca1cbcd67be055c" + sha256 cellar: :any_skip_relocation, ventura: "f49f5d49dc645a6417045bbc7767d71eb12f9795f583123f4d7e3244d9c12ae6" + sha256 cellar: :any_skip_relocation, arm64_linux: "002ffc822da05839fded73487b51dcff18b10584789e7e5abfe876be4ca366a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0cd6f7c9324aaabefdfa19538c250772aadc76fc43cadecac10219afcefd6d0" + 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..6ab432b786423 --- /dev/null +++ b/Formula/t/typst.rb @@ -0,0 +1,50 @@ +class Typst < Formula + desc "Markup-based typesetting system" + homepage "https://typst.app/" + url "https://github.com/typst/typst/archive/refs/tags/v0.13.1.tar.gz" + sha256 "2ffd8443668bc0adb59e9893f7904fd9f64dce8799a1930569f56a91305e8b71" + 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_sequoia: "c187e0b7e86411fb7925307d34c2e63429103cee0da30bac01479d1abb7b0160" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "808d9896ed7680fbb788182c8de04914229f1fe36b4e8d48a826ce7f9a78d471" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9d7fded4d1f467a78524ec9aeb9cb81ed08f5c0da380f0e81f91b7dc28772ac1" + sha256 cellar: :any_skip_relocation, sonoma: "a4af1021420e590f933035c3f996e70ec27131c0d12e7404d3abc7a0f68320b6" + sha256 cellar: :any_skip_relocation, ventura: "39ce285d7af6080b660db41590acf877b3be5f51327e4e4914b7c324a65e5be0" + sha256 cellar: :any_skip_relocation, arm64_linux: "24d7ad7e8d31a809d124f49cd4d07c84c9b8e8b68f8b006d8092edd7b3e371b0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c411beb9f7379cbec800b101ded8249d3f02ea469a5a312b328c81806f7924db" + 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 Dir["crates/typst-cli/artifacts/*.1"] + bash_completion.install "crates/typst-cli/artifacts/typst.bash" => "typst" + fish_completion.install "crates/typst-cli/artifacts/typst.fish" + zsh_completion.install "crates/typst-cli/artifacts/_typst" + 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..a09524699a29a --- /dev/null +++ b/Formula/t/typstfmt.rb @@ -0,0 +1,35 @@ +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 + + 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..69f8c7cc93974 --- /dev/null +++ b/Formula/t/typstyle.rb @@ -0,0 +1,33 @@ +class Typstyle < Formula + desc "Beautiful and reliable typst code formatter" + homepage "https://enter-tainer.github.io/typstyle/" + url "https://github.com/Enter-tainer/typstyle/archive/refs/tags/v0.13.7.tar.gz" + sha256 "594e5f65d458250422b4eb05ad66dfbaaa377df97ed88a43f7bd0530c8de4ed2" + license "Apache-2.0" + head "https://github.com/Enter-tainer/typstyle.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ce1ddb6165b133b9a2e1bf113e11c70049edb36c91af495d56e3c6c2bcaa00c2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eb157bd3f354577395e7b0dd957900324733188d32692cdedd92fee15e715284" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ea440e2dffd14163eca4c6faa2426693d41f81a0d83ccc2c62123bc4c3dcea58" + sha256 cellar: :any_skip_relocation, sonoma: "5ea3226695f2f17b325940375a80d848607be00c5706c66d04325637c79fe428" + sha256 cellar: :any_skip_relocation, ventura: "34cf990088ad63d47abebf16a1b2dc840a1a744a2ccbd7b058bd257d40ff6d1d" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb7475e15b4763a62fcb35af844a36d37e4da08c26a533f9f97bca0e027bcb94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6ceca84d675c2ef5e9edbf94cb086d9f79781fa4d0fbd0e81177b1b2a73a71cc" + 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/tz.rb b/Formula/t/tz.rb new file mode 100644 index 0000000000000..cf9ad4e947861 --- /dev/null +++ b/Formula/t/tz.rb @@ -0,0 +1,30 @@ +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_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..d69ef8dea940c --- /dev/null +++ b/Formula/t/tzdb.rb @@ -0,0 +1,54 @@ +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_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 16f02acfef2b0..0000000000000 --- a/Formula/t1lib.rb +++ /dev/null @@ -1,26 +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" - license "GPL-2.0" - - bottle do - rebuild 2 - sha256 "9318f5f1fcb5b4f3b0b5ce67c0925964c95bf10b7f843c70e4f6ed2b5a734360" => :catalina - 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 cc31658ab3080..0000000000000 --- a/Formula/t1utils.rb +++ /dev/null @@ -1,35 +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 "12394b2c7273a3f1d4b7de7fea1a67e84cb2c0e3113c462108aa1491b22ccccd" => :catalina - 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 05aa535601e88..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 "da70ac36643d428f0e4742c5bed21a674a9a5585765c764cf11e6e53a9086041" => :catalina - sha256 "db4ba23b6c0a235b2478416040a2321e305fe2f57810e87d6b5400addc0c3eea" => :mojave - sha256 "5d53fe57d49e5c60b8ea81e633e502e73569e191f16fa36aabb39085ffe2581a" => :high_sierra - sha256 "0229a85f2bdaa14baabe840b12f50eed8eb88233d13bcdb0424c5ab6fc2a4a6c" => :sierra - sha256 "3b5927cdb5f69cdc57d8ecbdf5b6fc95a5b6aad7c626c79d1893f2d824030e65" => :el_capitan - sha256 "bb40b6d09be26ee497aae27abea5808730af29e6387fa347996eae49c32c448d" => :yosemite - sha256 "da1457eb5a09c71f90da185b954aff3d399e61a20ff78ad0bd9d177ad11ad1b7" => :mavericks - 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 c5960996a388f..0000000000000 --- a/Formula/tag.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Tag < Formula - desc "Manipulate and query tags on macOS files" - homepage "https://github.com/jdberry/tag/" - url "https://github.com/jdberry/tag/archive/v0.10.tar.gz" - sha256 "5ab057d3e3f0dbb5c3be3970ffd90f69af4cb6201c18c1cbaa23ef367e5b071e" - license "MIT" - revision 1 - head "https://github.com/jdberry/tag.git" - - bottle do - cellar :any_skip_relocation - sha256 "e1572ae47d558d60983f7c1cbe9ae42a5c7f2dcb950762ab6c721e81351f5657" => :catalina - sha256 "ee5dbe68476b6ae900b92486f3dc3c7a9755296c1fee54a75cd64c7d6af66763" => :mojave - sha256 "5801c9fac7b1a4bad52f02fd8a09b64050ebc52515bd96115153c7049bd4619f" => :high_sierra - sha256 "5711ce58bd5b224252f1869f84f937c6bca0775bf4c86a6a1168418c1218dc98" => :sierra - end - - 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/taglib.rb b/Formula/taglib.rb deleted file mode 100644 index 992c663659f83..0000000000000 --- a/Formula/taglib.rb +++ /dev/null @@ -1,29 +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 "678392b9ac6fbc17a70433b5a98630ccbfa0b71eb1475402d826e4052086f246" => :catalina - 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 ecfc5ef303777..0000000000000 --- a/Formula/tailor.rb +++ /dev/null @@ -1,23 +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" - license "MIT" - revision 1 - - bottle :unneeded - - 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/takt.rb b/Formula/takt.rb deleted file mode 100644 index efe7620e3cac1..0000000000000 --- a/Formula/takt.rb +++ /dev/null @@ -1,25 +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 2 - - bottle do - sha256 "b5f6d5891f4955b26be88358c37199d9f9b1ebd66eaaa519ccbcfddbfa615780" => :catalina - sha256 "c45509b2d6828c514a0397f9c57284f7c4efcca766deddc762ef69cac715d3df" => :mojave - sha256 "d90177e40185259de89cc259c5cfde419f65161c52571dfeccb18fe52ffeab8f" => :high_sierra - sha256 "d0fd3808c9d7266cd16de123c0f8cc434d594b63b6e2d7d67425f155f1c9d582" => :sierra - 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 9ddb72833c023..0000000000000 --- a/Formula/taktuk.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Taktuk < Formula - desc "Deploy commands to (a potentially large set of) remote nodes" - homepage "https://taktuk.gforge.inria.fr/" - url "https://gforge.inria.fr/frs/download.php/file/37055/taktuk-3.7.7.tar.gz" - sha256 "56a62cca92670674c194e4b59903e379ad0b1367cec78244641aa194e9fe893e" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "7ed3f1542b9acfc2ad2de0b9150ad4e7aa72246415be9046fe5eafaf794b478d" => :catalina - 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 82410be68e3b7..0000000000000 --- a/Formula/tal.rb +++ /dev/null @@ -1,29 +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 "1d2978734ee3f0c63efdd0acdff401014954c34ed709ed397348dc1f3f973b88" => :catalina - 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/talisman.rb b/Formula/talisman.rb deleted file mode 100644 index 9bed506247875..0000000000000 --- a/Formula/talisman.rb +++ /dev/null @@ -1,29 +0,0 @@ -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", - :using => :git, - :tag => "v1.3.0", - :revision => "01d957c30db6a1db844627b447a96887b53f4032" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "9eb4f610bb1a9df059215ff73b7824e41843d4533f7c7fb0c54a63955bacb36f" => :catalina - sha256 "226b694a1e3619ec361fd49be1f502e7608fa6cef23c0ffaa1eedeff93131173" => :mojave - sha256 "953b5dfcb93d7344444460d695dbaba06f928194307d7bd43b17ecbf2f53618c" => :high_sierra - end - - depends_on "go" => :build - depends_on "gox" => :build - - def install - system "./build" - bin.install "./talisman_darwin_amd64" => "talisman" - end - - test do - system "git", "init", "." - assert_match "talisman scan report", shell_output(bin/"talisman --scan") - end -end diff --git a/Formula/talloc.rb b/Formula/talloc.rb deleted file mode 100644 index 8f0d94442ab47..0000000000000 --- a/Formula/talloc.rb +++ /dev/null @@ -1,45 +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.3.1.tar.gz" - sha256 "ef4822d2fdafd2be8e0cabc3ec3c806ae29b8268e932c5e9a4cd5585f37f9f77" - revision 1 - - bottle do - cellar :any - sha256 "82822d910206a4ad8e90bfc61b04c0fb6c744bf76e9bf0aa06e35ecc08b34ae4" => :catalina - sha256 "8ee812d0bf59bb34fd25b0c294c642e921b1af65f8d94e649e1d824e7b5dbb03" => :mojave - sha256 "91ece067e0ac677d93fa1bdfa3e7db825e2950dd1feae0ee031d8e2522260155" => :high_sierra - end - - depends_on "python@3.8" => :build - - 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/tanka.rb b/Formula/tanka.rb deleted file mode 100644 index 563de99653e18..0000000000000 --- a/Formula/tanka.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Tanka < Formula - desc "Flexible, reusable and concise configuration for Kubernetes using Jsonnet" - homepage "https://tanka.dev/" - url "https://github.com/grafana/tanka.git", - :tag => "v0.11.0", - :revision => "823d15089253aa0e70805c65f077fd83de8f7ea0" - license "Apache-2.0" - head "https://github.com/grafana/tanka.git" - - bottle do - cellar :any_skip_relocation - sha256 "f6a510b8eedb26c43c2a9bf45883bf1d4b690861fe65c5949ab8f330a7269aa7" => :catalina - sha256 "4aed423fb5e06697f27df4b145498f5d477290845400e43e540faf809c9d82eb" => :mojave - sha256 "34e4ec5a9364f12701bdedb164eca8ffc11776cb915d738e572e6679937a868e" => :high_sierra - end - - depends_on "go" => :build - depends_on "kubernetes-cli" - - def install - system "make", "static" - bin.install "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/tarantool.rb b/Formula/tarantool.rb deleted file mode 100644 index afff9dbac52df..0000000000000 --- a/Formula/tarantool.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Tarantool < Formula - desc "In-memory database and Lua application server" - homepage "https://tarantool.org/" - url "https://hb.bizmrg.com/tarantool.2.3.src/tarantool-2.3.2.81.tar.gz" - sha256 "312ee4b68a0834e01a84df0fa1eb34dd7484a5590f68e1184599ed4dd5c575a4" - head "https://github.com/tarantool/tarantool.git", :branch => "2.3", :shallow => false - - bottle do - cellar :any - sha256 "e013978027f78ed680b09fd07ddc19045852ea6eb158a98af580826dd363cbb9" => :catalina - sha256 "8cd34bf1c2129621a127a59406037a18a2ebe2c3d11d08d8397766568d2057a4" => :mojave - sha256 "a66ae22addde4398e8d5300799c839ce404bae2925f2f94a0b95a0b40af7ac81" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "cmake" => :build - depends_on "libtool" => :build - depends_on "icu4c" - depends_on "openssl@1.1" - 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 - - # Avoid keeping references to Homebrew's clang/clang++ shims - inreplace "src/trivia/config.h.cmake", - "#define COMPILER_INFO \"@CMAKE_C_COMPILER@ @CMAKE_CXX_COMPILER@\"", - "#define COMPILER_INFO \"/usr/bin/clang /usr/bin/clang++\"" - - 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@1.1"].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 ff4dcbc206ca7..0000000000000 --- a/Formula/tarsnap-gui.rb +++ /dev/null @@ -1,30 +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" - license "BSD-2-Clause" - head "https://github.com/Tarsnap/tarsnap-gui.git" - - bottle do - cellar :any - rebuild 1 - sha256 "34d641a2f477699fdbace87e2366ad998c012915f7e64315c90be60db07b5ae0" => :catalina - sha256 "5423a7d16f7c629fb65a3f4a9240ce388cffbeee214f40b12599abd56fe39df9" => :mojave - sha256 "d3e5e2aeee094f0e5944d68765965f2b9261cce026bafe45482a2b1e9abb1273" => :high_sierra - 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 bcfd33699578f..0000000000000 --- a/Formula/tarsnap.rb +++ /dev/null @@ -1,51 +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" - revision 1 - - bottle do - cellar :any - sha256 "afa6ebfefbc93faf12ac6576f26edb0b68c6a47cc65b893d590ea1efd4301fb4" => :catalina - sha256 "c6c97cd8e16ba02f7997d1d269373dca82d4a3d188b89dc3532c8149e277bd02" => :mojave - sha256 "847aae76230beaedfa23ea0a0f375864a8af6063c8539634637ab218a425540d" => :high_sierra - sha256 "dbf1a477d46c723a3cebb6b1001771bf51956035ea3369b5e2451c091cad5930" => :sierra - end - - head do - url "https://github.com/Tarsnap/tarsnap.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "openssl@1.1" - - 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.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} - --without-lzma - --without-lzmadec - ] - - 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 605d1a1ff3561..0000000000000 --- a/Formula/tarsnapper.rb +++ /dev/null @@ -1,58 +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 2 - - bottle do - cellar :any - sha256 "1a349c8831f9538426254c7bd811c5144f481728ea259dd5ad8d0af629a1d406" => :catalina - sha256 "a153f159001c5be37fcf8ae16e89dc6aa99d752854620d3fb289e8745795a034" => :mojave - sha256 "a39196665b10717c42c69bc749e35cee06736e3509e992db950ccd6b248f2e23" => :high_sierra - end - - depends_on "libyaml" - depends_on "python@3.8" - 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/e5/9b/ff402e0e930e70467a7178abb7c128709a30dfb22d8777c043e501bc1b10/pexpect-4.8.0.tar.gz" - sha256 "fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" - end - - resource "ptyprocess" do - url "https://files.pythonhosted.org/packages/7d/2d/e4b8733cf79b7309d84c9081a4ab558c89d8c89da5961bf4ddb050ca1ce0/ptyprocess-0.6.0.tar.gz" - sha256 "923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - 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 d055d459a0472..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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "2a31687b430989e2a004ef2a3c69e20648707f6d60907031dcebd43b51924a38" => :catalina - sha256 "319c29e750b0ba183b14accb571c4d210723458d5fcd72302b5ec866e5a76ad4" => :mojave - sha256 "8045397e275ade52621a1ab3a21e3eddf277fafd1beea60db2d10bc15d11b8f2" => :high_sierra - sha256 "e0f7e33946d3f8c93782692b3bab5833cb2e882f1fb47a4473b69e39ce3e7378" => :sierra - sha256 "9403d0c240bad09d576288d6b5ed94057dad03ceb30a4893a935c13f9e58af7f" => :el_capitan - 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/task.rb b/Formula/task.rb deleted file mode 100644 index a21913e56ba3d..0000000000000 --- a/Formula/task.rb +++ /dev/null @@ -1,38 +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 "24c80011867aa34766864a4bbac071493fb45c93bd3e08b3e9979b3ba4780fa2" => :catalina - 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" - - on_linux do - depends_on "util-linux" - end - - 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 deb64b298a8b8..0000000000000 --- a/Formula/taskd.rb +++ /dev/null @@ -1,28 +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 - cellar :any - rebuild 1 - sha256 "88580976ecb71d4f74d814ff06c88c2082565fee61c7ff8e7f506bce19b460d4" => :catalina - sha256 "225bedd463f0344572ec985bbb49693dc0b6d5c095c87a5157bcfc437317c1d7" => :mojave - sha256 "f9737943f0b2877414bf8c0d957a88d79010334a145be6420fd93f64b9569cb3" => :high_sierra - 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 3f458699cda2e..0000000000000 --- a/Formula/taskell.rb +++ /dev/null @@ -1,46 +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.9.4.tar.gz" - sha256 "8027af294eacc4e483a7dd6d8d510e10ae377510cf45ae1caf286b4022c5edd0" - - bottle do - cellar :any_skip_relocation - sha256 "d5200196154ab64b1a13f30db9817404fb77f79711ff89baa9ce85847d445dcb" => :catalina - sha256 "70b0634eb2c510398866d27ff49256055a0ec68ba26945e53991ba460970b862" => :mojave - sha256 "ea408b6153f32196363a71c920c240b95d2fbc8d86de3c88e9d22afd645972e7" => :high_sierra - end - - depends_on "cabal-install" => :build - depends_on "ghc@8.8" => :build - depends_on "hpack" => :build - - uses_from_macos "ncurses" - uses_from_macos "zlib" - - def install - system "hpack" - install_cabal_package - 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 e4ad723c73cdc..0000000000000 --- a/Formula/tasksh.rb +++ /dev/null @@ -1,34 +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 "db065e61ef2e605a1987012eaf4c0f10b648a98da3d143b9a02e1c22d51216f7" => :catalina - sha256 "c766ebd317962a04a3d78a4fbcc202085a27e0d15f63debf095f84a9a97d6306" => :mojave - sha256 "17f99be8d0aea4c43877fbfb121b7989047f04650ccffa85e948859e8ee51e0b" => :high_sierra - sha256 "fd1b333c777401c53d5ddc8aaf52150a2a15fea4230a91d457d9d99ce2819ee7" => :sierra - sha256 "d695adcf10582123053612d98ed4bf988b22c50919598bf167bc2e62db142352" => :el_capitan - end - - depends_on "cmake" => :build - depends_on "task" - - on_linux do - depends_on "readline" - end - - 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 967306981c827..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.55.2200-src.zip" - sha256 "067d0a54cb3c473b26aa5d69ea3f1f956be7cccc9044f1117fc20cb84aa63880" - - bottle do - cellar :any_skip_relocation - sha256 "afefda676ae81f3340850d132e17fa408505d79da25fd50c42c3042ca3b4f7f2" => :catalina - sha256 "4a1a224e806b0f9827ffe1f4e5e8ce792e616e6b2e829c278fad5c8a5ee958af" => :mojave - sha256 "1aa51c3d25cf651f7d4725d89a022ab2510963684dc3b3ebe4845b488b3bb5d7" => :high_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 b629e206b6b88..0000000000000 --- a/Formula/tbb.rb +++ /dev/null @@ -1,59 +0,0 @@ -class Tbb < Formula - desc "Rich and complete approach to parallelism in C++" - homepage "https://www.threadingbuildingblocks.org/" - url "https://github.com/intel/tbb/archive/v2020.2.tar.gz" - version "2020_U2" - sha256 "4804320e1e6cbe3a5421997b52199e3c1a3829b2ecb6489641da4b8e32faf500" - - bottle do - cellar :any - rebuild 1 - sha256 "d601aa195a3baf397390550894de8d39e6602a082154fa5facdfcbe64e3abffc" => :catalina - sha256 "2e1004341c9ea81972212ce180a258bc162528b6eac46e67c8bc03538c3cfe40" => :mojave - sha256 "e1efb8aec2b87e2facdb824971718d6fa531caa5043b10e811dc86a6c5e1e797" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "swig" => :build - depends_on "python@3.8" - - 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 Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(prefix) - end - - system "cmake", *std_cmake_args, - "-DINSTALL_DIR=lib/cmake/TBB", - "-DSYSTEM_NAME=Darwin", - "-DTBB_VERSION_FILE=#{include}/tbb/tbb_stddef.h", - "-P", "cmake/tbb_config_installer.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 714bf72c709c4..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.5.tar.gz" - sha256 "076599f8699a21934f633f1732977d0df9181891ca982fd23ba172047d2cf4ab" - head "https://github.com/waruqi/tbox.git" - - bottle do - cellar :any_skip_relocation - sha256 "0be436a7df4a7b942f37e397b2cc0929e64e9475fad74cb9fb8dd70d7d5b42a7" => :catalina - sha256 "cf391788c014a7acac0d1e7ff4a4fea01e840dddeb4e901427fb5f40939f9157" => :mojave - sha256 "8eaecc2a931b034521a468cc1410b01991139f631e8f888ccce60092d825af0c" => :high_sierra - 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 <<~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 cca7df15df25a..0000000000000 --- a/Formula/tcc.rb +++ /dev/null @@ -1,40 +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 "68930891a8746b34b372ecfe43a6a042d0097414713c831353a095135d7b9569" => :catalina - 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 1a5d62ed5fe7e..0000000000000 --- a/Formula/tccutil.rb +++ /dev/null @@ -1,18 +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.7.tar.gz" - sha256 "4584962a059584ba0810cee7912f9333ba6259da22bea7e6b3206bcf934d5cf1" - license "GPL-2.0" - 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 469cff3d37c09..0000000000000 --- a/Formula/tcl-tk.rb +++ /dev/null @@ -1,151 +0,0 @@ -class TclTk < Formula - desc "Tool Command Language" - homepage "https://www.tcl-lang.org/" - url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.10/tcl8.6.10-src.tar.gz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/tcl/tcl8.6.10-src.tar.gz" - sha256 "5196dbf6638e3df8d5c87b5815c8c2b758496eb6f0e41446596c9a4e638d87ed" - - bottle do - rebuild 1 - sha256 "4740b30b97f0308ecc59c1308945c38ddca5d3da528d779f38199a2dad905fa1" => :catalina - sha256 "1851fee12a3ee44648845d8663a192712ce6827ef8fe167301d2638ac9ddb96c" => :mojave - sha256 "d1d689cc3e9cf08b2a42d487db3c4142e7ee4ff322bef22d6187fc67a5b776b7" => :high_sierra - end - - keg_only :provided_by_macos - - depends_on "openssl@1.1" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "critcl" do - url "https://github.com/andreas-kupries/critcl/archive/3.1.18.tar.gz" - sha256 "6fb0263cc8dfb787ab162ae130570c19f665a03229b8a046ec1c11809c2ff70e" - end - - resource "tcllib" do - url "https://downloads.sourceforge.net/project/tcllib/tcllib/1.20/tcllib-1.20.tar.xz" - sha256 "199e8ec7ee26220e8463bc84dd55c44965fc8ef4d4ac6e4684b2b1c03b1bd5b9" - end - - resource "tcltls" do - url "https://core.tcl-lang.org/tcltls/uv/tcltls-1.7.20.tar.gz" - sha256 "397a4e7cd4ea7a6dbf8a1a664e73945b91828c7c76d02474875261d22fb4e4ca" - end - - resource "tk" do - url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.10/tk8.6.10-src.tar.gz" - mirror "https://fossies.org/linux/misc/tk8.6.10-src.tar.gz" - sha256 "63df418a859d0a463347f95ded5cd88a3dd3aaa1ceecaeee362194bc30f3e386" - end - - resource "itk4" do - url "https://downloads.sourceforge.net/project/incrtcl/%5Bincr%20Tcl_Tk%5D-4-source/itk%204.1.0/itk4.1.0.tar.gz" - sha256 "da646199222efdc4d8c99593863c8d287442ea5a8687f95460d6e9e72431c9c7" - 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("critcl").stage do - system bin/"tclsh", "build.tcl", "install" - end - - resource("tcllib").stage do - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" - system "make", "install" - ENV["SDKROOT"] = MacOS.sdk_path - system "make", "critcl" - cp_r "modules/tcllibc", "#{lib}/" - ln_s "#{lib}/tcllibc/macosx-x86_64-clang", "#{lib}/tcllibc/macosx-x86_64" - end - - resource("tcltls").stage do - system "./configure", "--with-ssl=openssl", - "--with-openssl-dir=#{Formula["openssl@1.1"].opt_prefix}", - "--prefix=#{prefix}", - "--mandir=#{man}" - system "make", "install" - end - - resource("itk4").stage do - itcl_dir = Pathname.glob(lib/"itcl*").last - args = %W[ - --prefix=#{prefix} - --exec-prefix=#{prefix} - --with-tcl=#{lib} - --with-tk=#{lib} - --with-itcl=#{itcl_dir} - ] - system "./configure", *args - system "make" - system "make", "install" - end - end - - test do - assert_equal "honk", pipe_output("#{bin}/tclsh", "puts honk\n").chomp - - test_itk = <<~EOS - # 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 - EOS - assert_equal "OK\n", pipe_output("#{bin}/wish", test_itk), "Itk test failed" - end -end diff --git a/Formula/tclap.rb b/Formula/tclap.rb deleted file mode 100644 index f8fefcfdc7c8b..0000000000000 --- a/Formula/tclap.rb +++ /dev/null @@ -1,24 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "025227d952333920194194626d4e80eb02439a7de957a6722bd672a0cb2c7631" => :catalina - 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 f2b8a458893da..0000000000000 --- a/Formula/tcpdump.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Tcpdump < Formula - desc "Command-line packet analyzer" - homepage "https://www.tcpdump.org/" - url "https://www.tcpdump.org/release/tcpdump-4.9.3.tar.gz" - sha256 "2cd47cb3d460b6ff75f4a9940f594317ad456cfbf2bd2c8e5151e16559db6410" - head "https://github.com/the-tcpdump-group/tcpdump.git" - - bottle do - cellar :any - sha256 "d4a3781175e0ce1d1a1048a3e211b8775dcec91e362fb51b3384e7404be3b4b6" => :catalina - sha256 "6cd2cafe6229e2ccb97ba0b636e19a89c9e2f0ec85778910ed55498a30c03eb3" => :mojave - sha256 "22f03cae37a35d6369292efd2c661f781df8dc21184046e768e13c148dbb3f19" => :high_sierra - end - - depends_on "libpcap" - depends_on "openssl@1.1" - - 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 4dd8eefa9678a..0000000000000 --- a/Formula/tcpflow.rb +++ /dev/null @@ -1,34 +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" - license "GPL-3.0" - revision 1 - - bottle do - cellar :any - sha256 "ee9e12b090ff836bf8bd39024f7c8d075e03357bb7c4eca504838e118d06fd6d" => :catalina - sha256 "ae7eb58e5d805e61b4fc79165574796bf59d2172977579b8716c2ea95631aa42" => :mojave - sha256 "3b29b20c24395a16a17236a89a5b4ff1121ae2227af79717517b02825a4a7dd7" => :high_sierra - sha256 "881535a6ab635522f3a64aa9b568ee9fc67476f4636236f17d2828c02518b8bf" => :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@1.1" - - 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 6d911b59eff00..0000000000000 --- a/Formula/tcping.rb +++ /dev/null @@ -1,24 +0,0 @@ -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/1.3.6.tar.gz" - sha256 "a731f0e48ff931d7b2a0e896e4db40867043740fe901dd225780f2164fdbdcf3" - license "LGPL-3.0" - head "https://github.com/mkirchner/tcping.git" - - bottle do - cellar :any_skip_relocation - sha256 "2cf829fa6b3feab933a12f8fbc9fc1e8d585a304f31d918f26ba0d502f4772ab" => :catalina - sha256 "d769f344e5bdda11b8f0ce6c931e865e982166b3b504cdce33d58c9029786c60" => :mojave - sha256 "e0d7d617ac3f98158cd25a08728f9f44cce132101368cae250cced7dbb6a0f7a" => :high_sierra - 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 28916ecc908c1..0000000000000 --- a/Formula/tcpkali.rb +++ /dev/null @@ -1,26 +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 "01bd403a6b94827f4670877d1e36ee4c439f708d84d364584e5b1538837e72d0" => :catalina - 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 3b7af3b7fb1f4..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.3/tcpreplay-4.3.3.tar.gz" - sha256 "ed2402caa9434ff5c74b2e7b31178c73e7c7c5c4ea1e1d0e2e39a7dc46958fde" - - bottle do - cellar :any - sha256 "a4b41c27929bfd52016d1cc576089a9cb42dfd0e595c3078a40b26bd39fbd65f" => :catalina - sha256 "0ec1b2260c108d103d4d594a8fff9482656833e5308690b90c5ef0a05a155546" => :mojave - sha256 "439ed368cf28fb710cefec00f88de8d32e0d039abed0f8761f1a1ae4731dac53" => :high_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 ec893358332ea..0000000000000 --- a/Formula/tcpsplit.rb +++ /dev/null @@ -1,26 +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 "ab3131cd8829f943cc4142dc616adfa696ff9d0af5dc21f94408d114f59434cd" => :catalina - 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 45e259ed87113..0000000000000 --- a/Formula/tcpstat.rb +++ /dev/null @@ -1,35 +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 "86c1f5aad64e2d611dcb9d74b4eb0f51f24f79d1cdcaf636f62199099d625fa1" => :catalina - 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 faa2309638149..0000000000000 --- a/Formula/tcptrace.rb +++ /dev/null @@ -1,37 +0,0 @@ -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 "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" - - bottle do - cellar :any_skip_relocation - sha256 "a1a61bd690da912afedd38f62eac7d5a1724c1ce68c68e7bcd8576e3fb86d956" => :catalina - sha256 "b927868b2addc93b296fb8f31b08147014e9a81a356d4f18b0d4134db40081de" => :mojave - sha256 "39916506fcd6385aee6375813128a126a84f947623594011f6c2c9df1b6dc8b2" => :high_sierra - sha256 "7ccc5e6859be970a5a8a064630704111d37b03a7e3cf3a9874e16a60e4abe02b" => :sierra - sha256 "e46775d7cc808b5b52a0a36a33142b824a9b2d8bce5b0557bc1041c2e55c5ffb" => :el_capitan - sha256 "f9de7ef41a2b9dc8daee1fddef1035ddf6a08cf473b6edafcf4bb069ab5f0052" => :yosemite - sha256 "03ecc0ca3c3be27ccf8bcf88be26fb03addecbd14cc1283cab7947d39f9da6ae" => :mavericks - 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 0fe10bdcef303..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" - license "GPL-2.0" - revision 2 - 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 "26e71f154250d933387eb00a17f93c7fe500c9d6bc69ddec10b7bfe7f39c38eb" => :catalina - sha256 "c688457fecc03c5e881448e3f2bc941bc352bb29488383889f71de3f719dee29" => :mojave - sha256 "e71cda023bb22dc514fda3d22af13bf8f0db80c1937add70b67cf7447d40a67f" => :high_sierra - 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 8c81808c2001a..0000000000000 --- a/Formula/tcptunnel.rb +++ /dev/null @@ -1,29 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e82c25ab68b43d632739d345b3ac1c3a6d22a9c8a51d44f9cfc3967e64469794" => :catalina - 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 cd30c003cc037..0000000000000 --- a/Formula/tcsh.rb +++ /dev/null @@ -1,32 +0,0 @@ -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.22.02.tar.gz" - mirror "https://ftp.osuosl.org/pub/blfs/conglomeration/tcsh/tcsh-6.22.02.tar.gz" - sha256 "ed287158ca1b00ba477e8ea57bac53609838ebcfd05fcb05ca95021b7ebe885b" - - bottle do - rebuild 1 - sha256 "d885eaa1411e8fc46cb39e4a11254d37c8dc90aded6684631bfc312d7115c9fa" => :catalina - sha256 "a070c8c6b4f2ce38be5a84109d307078545911f2a731b0e5e140856a6711bce4" => :mojave - sha256 "2f81edc8ce902ce12e722003aec60d62d21ca7be7a944b3b2f571b9e9d7d1282" => :high_sierra - end - - uses_from_macos "ncurses" - - 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 85995c9e7e8e1..0000000000000 --- a/Formula/td.rb +++ /dev/null @@ -1,36 +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 "e2fdce36bbab98d388fcc14c448ba87cb4cb77e10a5e20f083128c8cfa2ad367" => :catalina - 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/tdkjs.rb b/Formula/tdkjs.rb deleted file mode 100644 index dbb38b9e53a61..0000000000000 --- a/Formula/tdkjs.rb +++ /dev/null @@ -1,28 +0,0 @@ -require "language/node" - -class Tdkjs < Formula - desc "The TDK lets Tixte Developers Write Fast, Clean, and Human Readable Code" - homepage "https://tdk.developer.tixte.com/" - url "https://registry.npmjs.org/tdkjs/-/tdkjs-3.2.0.tgz" - sha256 "6c0e28b22fdb50b8bfe8d113457d048364e8be7dbe09df84dbf4135a5a0c0665" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "d59d6292d1982f2bfb6fac6f3e25d638b131b2ad9c36598ef5ad5ee4f5eb76e3" => :catalina - sha256 "9edeabf99f8d427626ee1500981ed3bb3738be523abcfa600457588afca605c7" => :mojave - sha256 "09ace9b6ab20a91e582b8d95ba05abe45b046231cb457cf87c7d2704352778f8" => :high_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 "printf", "'''tdk.init()\ntdk.setColor(\'red\')\nfunction animate(){\ntdk.circle(0, 0, 20)\n}''' > test.js" - system "tdkjs", "test.js", "output.html" - end -end diff --git a/Formula/tdlib.rb b/Formula/tdlib.rb deleted file mode 100644 index c7512af8cd29a..0000000000000 --- a/Formula/tdlib.rb +++ /dev/null @@ -1,44 +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.6.0.tar.gz" - sha256 "9dce57a96f9d4bac8f99aab13ef5cbf6fed04b234a5d22dfa7ef7dce06ea43f8" - license "BSL-1.0" - - bottle do - cellar :any - sha256 "c1a28a0f9a80fb62b6ac8a30fffcaf413336e9df49f79f9f952ae38c8840becf" => :catalina - sha256 "08507a9bf3c9f93ff97666fe9478398768f135e7943145a82946e008acf543e7" => :mojave - sha256 "12ce0917663736dc4790482c5545a6bee2b82dd7b304ab401c4232ba5d14a3f3" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "gperf" - depends_on "openssl@1.1" - 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 2a303c4aa145d..0000000000000 --- a/Formula/tealdeer.rb +++ /dev/null @@ -1,34 +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.3.0.tar.gz" - sha256 "d384176263c1377b241f4e41f8efd564052e506af00e014240f3874419e187e0" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "9db1cd67e060652967a899a4266758bf0b460b1426bea40a822f217c4edf4d80" => :catalina - sha256 "379f9775e19bf959868350869913b83458b3f14b4aacdd4e5432c2a4cdcf8e9d" => :mojave - sha256 "fd5d4b07815554a32fc161accc1145d1a7ef761bd20f2f94bdb94eca57563e32" => :high_sierra - end - - depends_on "rust" => :build - - on_linux do - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - end - - conflicts_with "tldr", :because => "both install `tldr` binaries" - - def install - system "cargo", "install", *std_cargo_args - bash_completion.install "bash_tealdeer" => "tldr" - zsh_completion.install "zsh_tealdeer" => "_tldr" - fish_completion.install "fish_tealdeer" => "tldr.fish" - 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 a37dc48038a2c..0000000000000 --- a/Formula/teapot.rb +++ /dev/null @@ -1,48 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "590fcacca0a46973b2ce6dd07e30d360e600aa86950af7d3a25d5d3f12512cc4" => :catalina - 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 790dddac1efd6..0000000000000 --- a/Formula/tectonic.rb +++ /dev/null @@ -1,42 +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.12.tar.gz" - sha256 "30d2e0fe31145a10097368f11a00540ba201be43d28e7ad580699f47bfa70bf4" - revision 2 - - bottle do - cellar :any - sha256 "bd48e4e17779696ca1e647b1809ffbe65821e6387e1c787acf0ab1168bd6c059" => :catalina - sha256 "b01e0fad7b78afa074addd3e4e423211a4c66b327a6365639fb1f70b20af2f1e" => :mojave - sha256 "1a9f68211f8f9e8268652eb367d1cbafcab3bfcd5779a0be9d71ef456b326de9" => :high_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@1.1" - - def install - ENV.cxx11 - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version # needed for CLT-only builds - ENV.delete("HOMEBREW_SDKROOT") if MacOS.version == :high_sierra - - # Ensure that the `openssl` crate picks up the intended library. - # https://crates.io/crates/openssl#manual-configuration - ENV["OPENSSL_DIR"] = Formula["openssl@1.1"].opt_prefix - - system "cargo", "install", *std_cargo_args - end - - test do - (testpath/"test.tex").write 'Hello, World!\bye' - system bin/"tectonic", "-o", testpath, "--format", "plain", testpath/"test.tex" - assert_predicate testpath/"test.pdf", :exist?, "Failed to create test.pdf" - assert_match "PDF document", shell_output("file test.pdf") - end -end diff --git a/Formula/tee-clc.rb b/Formula/tee-clc.rb deleted file mode 100644 index 24664c0462ef7..0000000000000 --- a/Formula/tee-clc.rb +++ /dev/null @@ -1,40 +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" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - conflicts_with "tiny-fugue", :because => "both install a `tf` binary" - - def install - libexec.install "tf", "lib" - (libexec/"native").install "native/macosx" - (bin/"tf").write_env_script libexec/"tf", :JAVA_HOME => Formula["openjdk"].opt_prefix - - 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 362c22786b488..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 "https://svn.code.sf.net/p/teem/code/teem/trunk" - - bottle do - sha256 "105f54c1cb830584bcf694756ab18eab2a7d9a67e3226699272c4449cc2f816e" => :catalina - sha256 "439d02dd7f54d7f307b5984d00448a4e77309660e8f1c52e998ef9ea40fdcaa1" => :mojave - sha256 "4cb2692b42e79880161879605c3990cd5d0c4fbb171c7ccd003bb9d6bb0fee09" => :high_sierra - sha256 "31d19cd9e0e4c064fb743c41a286736503e61b1d5e4b81f29140fcebf2cde2c8" => :sierra - sha256 "5ade8dc18d0c66ac154d802df6c64e88222781b6fc427a841fb1f4047f8c4e49" => :el_capitan - sha256 "3974a9a565044cb4de798eb1bec2b8980eef03eb6bd7ec6c98cddd606f7c8a29" => :yosemite - sha256 "c340d18c157b81be663636ff72326ecb946313ea1dfc533a6ba95b9efdb6bf44" => :mavericks - 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 ff4d999eee8a4..0000000000000 --- a/Formula/teensy_loader_cli.rb +++ /dev/null @@ -1,30 +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 2 - head "https://github.com/PaulStoffregen/teensy_loader_cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "05c0f806839f8af46bcf6d95bf58247805a5293d4c704d38c2934799b6aa9f1f" => :catalina - sha256 "13a4a0fe8cf9b185003da32206bf330c215a9e0ee99bc4c7a901c474f553e7b1" => :mojave - sha256 "58f22f026085148841808fb0a9ec9f5f7558c1ef6fbf46a2ec2a0fea8b9f1c18" => :high_sierra - end - - def install - ENV["OS"] = "MACOSX" - ENV["SDK"] = MacOS.sdk_path || "/" - - inreplace "teensy_loader_cli.c", /ret != kIOReturnSuccess/, "0" - - 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/tektoncd-cli.rb b/Formula/tektoncd-cli.rb deleted file mode 100644 index 5ad733db296dc..0000000000000 --- a/Formula/tektoncd-cli.rb +++ /dev/null @@ -1,33 +0,0 @@ -class TektoncdCli < Formula - desc "CLI for interacting with TektonCD" - homepage "https://github.com/tektoncd/cli" - url "https://github.com/tektoncd/cli/archive/v0.10.0.tar.gz" - sha256 "d85663f160c2902789194502c036953a856f57d7c0481c23ab12e719a7a21d42" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "535ec002c95d1fd0c0ee84828d3844ea9845493e55e099941366d004bdfa6b55" => :catalina - sha256 "c56a08ee17e686bc22a17b9982d5879848660e9472464dfdae3bb7dd0d5b55f3" => :mojave - sha256 "f19731f06d92e88fe464b72b14457b85230c926e20e5a428e8fcf2500e357fd5" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "bin/tkn" - - bin.install "bin/tkn" => "tkn" - output = Utils.safe_popen_read({ "SHELL" => "bash" }, bin/"tkn", "completion", "bash") - (bash_completion/"tkn").write output - output = Utils.safe_popen_read({ "SHELL" => "zsh" }, bin/"tkn", "completion", "zsh") - (zsh_completion/"_tkn").write output - prefix.install_metafiles - end - - test do - cmd = "#{bin}/tkn pipelinerun describe homebrew-formula" - io = IO.popen(cmd, :err => [:child, :out]) - assert_match "Error: Couldn't get kubeConfiguration namespace", io.read - end -end diff --git a/Formula/teleconsole.rb b/Formula/teleconsole.rb deleted file mode 100644 index d191d6b333079..0000000000000 --- a/Formula/teleconsole.rb +++ /dev/null @@ -1,76 +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.4.0.tar.gz" - sha256 "ba0a231c5501995e2b948c387360eb84e3a44fe2af6540b6439fc58637b0efa4" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "fd114a850d3e9eb653e6ed08f53224bd81219c7bcfbd2459440b68a0e96711dc" => :catalina - sha256 "4a5a767d1097e9e8580e3d3ad77d01b8b840ef622092983d713333ed90d2db0d" => :mojave - sha256 "d53e81606f1e85b59bd3ee364e006989187f5cce884b33fb77b104b931a7e3c5" => :high_sierra - sha256 "c74fa8ac5e92c39a3f0d869b9e8bd44d32ab67ed0748b5548a0700287dfbe817" => :sierra - 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 => "2cb40abd8ea8fb2915304ea4888b5b9f3e5bc223" - 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 - - 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 "go", "build", "-o", 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 6b94c4480ab67..0000000000000 --- a/Formula/telegraf.rb +++ /dev/null @@ -1,69 +0,0 @@ -class Telegraf < Formula - desc "Server-level metric gathering agent for InfluxDB" - homepage "https://influxdata.com/" - url "https://github.com/influxdata/telegraf/archive/v1.14.5.tar.gz" - sha256 "66a02a8d9afe5621bb65297f74b9f2d62fbe28415771ac1dea0a13950642684c" - license "MIT" - head "https://github.com/influxdata/telegraf.git" - - bottle do - cellar :any_skip_relocation - sha256 "9931b7eb17c4ac0ba66474638a341aa12ac0c7370c96ac24a7bd63113ecfb844" => :catalina - sha256 "ac1edb9be60b7306c23a8d119bb217c0095304cfda4e85c9c655dcc08dae8d11" => :mojave - sha256 "1a8b3d364fb5f8b70f481f38834d791ceff57884d55d25f065e4da0a5b043494" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args, "-ldflags", "-X main.version=#{version}", "./cmd/telegraf" - etc.install "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 56fb199d7eacc..0000000000000 --- a/Formula/telegram-cli.rb +++ /dev/null @@ -1,58 +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 4 - head "https://github.com/vysheng/tg.git" - - bottle do - rebuild 1 - sha256 "4c1a9d233c3b46d75badb6e89e007ff9763e55071474ce11d0e109e7ee24aefe" => :catalina - sha256 "da9d09f1f4a317ed14c97e67fc2def18c4cd728a7023ab80424a8d548437ee74" => :mojave - sha256 "410b56cc04620c7a1f495b500b41fa61339cc68444c1c65939bb4fb0c4cc96ef" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "jansson" - depends_on "libconfig" - depends_on "libevent" - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "zlib" - - # 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 - - # Patch for OpenSSL 1.1 compatibility - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/129507e4ee3dc314156e179902ac375abd00c7fa/telegram-cli/openssl-1.1.diff" - sha256 "eb6243e1861c0b1595e8bdee705d1acdd2678e854f0919699d4b26c159e30b5e" - end - - def install - args = %W[ - --prefix=#{prefix} - CFLAGS=-I#{Formula["readline"].include} - CPPFLAGS=-I#{Formula["readline"].include} - LDFLAGS=-L#{Formula["readline"].lib} - --disable-liblua - ] - - 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 a25209dd17b7e..0000000000000 --- a/Formula/teleport.rb +++ /dev/null @@ -1,62 +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/v4.3.0.tar.gz" - sha256 "dbc2cd029efdd3df5cc12a8105cb80358202878baed21ca65442d678c0f28f61" - license "Apache-2.0" - head "https://github.com/gravitational/teleport.git" - - bottle do - cellar :any_skip_relocation - sha256 "5cc353435bf3c84f759cdf77bea38ca2510be51398b810b2381a3a27b44bac34" => :catalina - sha256 "64bae136e0cd999903a68af31f5bfb46eadfbeb826053a748818b171029c5b29" => :mojave - sha256 "6c701a0d953456385b454027bb69a1d974f2210ad9e209912abb931d6c27e055" => :high_sierra - end - - depends_on "go" => :build - - uses_from_macos "curl" => :test - uses_from_macos "zip" - - on_linux do - depends_on "netcat" => :test - end - - conflicts_with "etsh", :because => "both install `tsh` binaries" - - resource "webassets" do - url "https://github.com/gravitational/webassets/archive/72412062d6d55ec7faa9707abf500d703e7d09da.tar.gz" - sha256 "c84767bea0a723f406e3b6566a0a48892758b2e5f3a9e9b453d22171315fd29d" - end - - def install - ENV["GOPATH"] = buildpath - ENV["GOROOT"] = Formula["go"].opt_libexec - - (buildpath/"webassets").install resource("webassets") - (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/*"] - 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 2e5151a9d234d..0000000000000 --- a/Formula/telnet.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Telnet < Formula - desc "User interface to the TELNET protocol" - homepage "https://opensource.apple.com/" - url "https://opensource.apple.com/tarballs/remote_cmds/remote_cmds-63.tar.gz" - sha256 "13858ef1018f41b93026302840e832c2b65289242225c5a19ce5e26f84607f15" - - bottle do - cellar :any_skip_relocation - sha256 "7435a9fd2515158762a85197a4ad7141e430383e185e002da169dbbb638c952f" => :catalina - sha256 "d5009f496dc6cf0c13b936996f98b91b0f12733ea9462843b56a39fc53b20fe0" => :mojave - sha256 "af38f3c6dd4ff5eda2248671958e66595b39e74cdeecca52af4efb495bc659a7" => :high_sierra - 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 - - xcodebuild "SYMROOT=build", "-arch", Hardware::CPU.arch - - 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=#{Hardware::CPU.arch}", - "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 858151ab30f6e..0000000000000 --- a/Formula/telnetd.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Telnetd < Formula - desc "TELNET server" - homepage "https://opensource.apple.com/" - url "https://opensource.apple.com/tarballs/remote_cmds/remote_cmds-63.tar.gz" - sha256 "13858ef1018f41b93026302840e832c2b65289242225c5a19ce5e26f84607f15" - - bottle do - cellar :any_skip_relocation - sha256 "16f053b3bdfe04dcad271f63cd1f7e6ccc312ddb410081f4f729d12bc80eceb9" => :catalina - sha256 "cde731ff626ebda39ecadc5b6ed2014429cb2afb99521fd967a2176d127d94b7" => :mojave - sha256 "d31eb6a8f79b8f9eb2417dce87c6508b8837207d4f8df48bdd5fd1d833f1b757" => :high_sierra - 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 - xcodebuild "SYMROOT=build", "-arch", Hardware::CPU.arch - - 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=#{Hardware::CPU.arch}" - - 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 8ecb48e418a51..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.34/template-glib-3.34.0.tar.xz" - sha256 "216bef6ac3607666b8ca72b936467f7020ce6421c02755c301d079576c9c3dfd" - revision 2 - - bottle do - cellar :any - sha256 "9076cc6161b090edf56b7ffdb0dcb31f3590c5b359b3e74fb78c1c0119b2c256" => :catalina - sha256 "b5cbd61d31bcf899a1940b0e0c00b2a788a6dc1316d90847a0668973525a6048" => :mojave - sha256 "4e0560a1eb5ac91fdd4ea3dc89086f0b50cc65d68c32c3c8bb4fa49e0d05454d" => :high_sierra - end - - depends_on "bison" => :build # does not appear to work with system bison - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "glib" - depends_on "gobject-introspection" - - def install - mkdir "build" do - system "meson", *std_meson_args, "-Dwith_vapi=false", ".." - system "ninja", "-v" - system "ninja", "install", "-v" - 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 24f9b0724d0ec..0000000000000 --- a/Formula/temporal_tables.rb +++ /dev/null @@ -1,63 +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" - license "BSD-2-Clause" - revision 2 - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "6003cd60f9e85afa2dbb6a6a3e07dbfff6bba2a5df8fe9b6d3452907cd7d16f6" => :catalina - sha256 "2700d10e8b75bb9daec60112aeaaf52878de609d8e2b7e8efcc1b02db2144939" => :mojave - sha256 "86291d5a0cdee29beae607f70436c61db901c6483a6f9eaab63c1c4385a4112c" => :high_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 - - # Fix for postgresql 12 compatibility: - # https://github.com/arkhipov/temporal_tables/issues/47 - patch do - url "https://github.com/mlt/temporal_tables/commit/a6772d195946f3a14e73b7d3aff200ab872753f4.patch?full_index=1" - sha256 "c15d7fa8a4ad7a047304c430e039776f6214a40bcc71f9a9ae627cb5cf73647e" - 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 - return if ENV["CI"] - - 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/tengo.rb b/Formula/tengo.rb deleted file mode 100644 index 46457f811c27d..0000000000000 --- a/Formula/tengo.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Tengo < Formula - desc "Fast script language for Go" - homepage "https://tengolang.com/" - url "https://github.com/d5/tengo/archive/v2.6.0.tar.gz" - sha256 "3a1c4c53b9791da67b261929fd742d24cbd678832fdc896de382f0c4e97bc5c2" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "c2c5d13206abe7acff924d0b1d4a93b8c34ed4487e5e26d203579aa4326227b0" => :catalina - sha256 "c2c5d13206abe7acff924d0b1d4a93b8c34ed4487e5e26d203579aa4326227b0" => :mojave - sha256 "c2c5d13206abe7acff924d0b1d4a93b8c34ed4487e5e26d203579aa4326227b0" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args, "./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 shell_output("#{bin}/tengo #{testpath}/main.tengo"), "6\n123\n" - end -end diff --git a/Formula/tenyr.rb b/Formula/tenyr.rb deleted file mode 100644 index 96d64d30064c3..0000000000000 --- a/Formula/tenyr.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Tenyr < Formula - desc "32-bit computing environment (including simulated CPU)" - homepage "https://tenyr.info/" - url "https://github.com/kulp/tenyr/archive/v0.9.7.tar.gz" - sha256 "f28e031acb14a0e4ff924479a0fd0087d9a15948a440f03b2dcf002723ccfdfa" - license "MIT" - head "https://github.com/kulp/tenyr.git", :branch => "develop" - - bottle do - cellar :any - sha256 "e9b70722348ae97c9d4f08ac7b143fb4402be98feb48f9941f8ca1f4397a909d" => :catalina - sha256 "0386483bf004ccb772897cb304589089c41ba56c926ac751badc6744924178a5" => :mojave - sha256 "f04b6f86879c098dfd7e87a384a8fea3c0c30d1d6b50dfa1477295430bae1566" => :high_sierra - 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 2275a3e9f0e2c..0000000000000 --- a/Formula/tepl.rb +++ /dev/null @@ -1,107 +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.4/tepl-4.4.0.tar.xz" - sha256 "e6f6673a8a27e8f280725db8fbacec79b20676ae0558755239d15a9808faa256" - license "LGPL-2.1" - revision 1 - - bottle do - sha256 "a2d1a1d30b9016bc41d778bfd7aa01a71c63fbd2131c7c783a693c33c290260e" => :catalina - sha256 "4a8c3e0c79c27b2abb1043caf8984d452307cd9b4814b6996f040eaeec53ab75" => :mojave - sha256 "7a482ab7709b77c410a8d2a11d7caa32c965dbdbaed301d3de6eb3944edb1746" => :high_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 d7473346c100f..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/HEAD/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 3103c8a5882d6..0000000000000 --- a/Formula/termbox.rb +++ /dev/null @@ -1,37 +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" - license "MIT" - head "https://github.com/nsf/termbox.git" - - bottle do - cellar :any - sha256 "994e3fcbc3c4824c37de23df653950408aa32db24ef76e55986dc772aa01c048" => :catalina - 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/termcolor.rb b/Formula/termcolor.rb deleted file mode 100644 index 718814a1f9e51..0000000000000 --- a/Formula/termcolor.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Termcolor < Formula - desc "Header-only C++ library for printing colored messages" - homepage "https://termcolor.readthedocs.io/" - url "https://github.com/ikalnytskyi/termcolor/archive/v1.0.1.tar.gz" - sha256 "612f9ff785c74dcbe081bb82e8c915858572cf97dcf396ea7bd6a7d21cf6026a" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "bf8dbd74a3f8661b2dcc5968698dc6d0797d32ad4022744fca1c3c2ac1e7b863" => :catalina - sha256 "bf8dbd74a3f8661b2dcc5968698dc6d0797d32ad4022744fca1c3c2ac1e7b863" => :mojave - sha256 "bf8dbd74a3f8661b2dcc5968698dc6d0797d32ad4022744fca1c3c2ac1e7b863" => :high_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 - #include - int main(int /*argc*/, char** /*argv*/) - { - std::cout << termcolor::red << "Hello Colorful World"; - std::cout << std::endl; - return 0; - } - EOS - 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/terminal-notifier.rb b/Formula/terminal-notifier.rb deleted file mode 100644 index f6754f1da25e5..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 "78eff95b7436480521ee68a8581ff2df0c615adefccd279486f2491f1b1c0a4b" => :catalina - sha256 "9671c602326357b7397248bfb0cf062bc47f19add15b615e512f58545c387c31" => :mojave - sha256 "f112656234f4100d23cc1a41b96f92a09974360a822c2ec0fb6f9970862c1a22" => :high_sierra - sha256 "210cd525fad70bbaef40f092bc3478b1519f68f73c034990230d8b1cc61a8a7c" => :sierra - sha256 "75ce68fd95fb502e20ccb25be72f7db12112ac1a4bdf5a70c140cd174ecbacf5" => :el_capitan - end - - depends_on :xcode => :build - - 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/termius.rb b/Formula/termius.rb deleted file mode 100644 index 53f99ec30c1ae..0000000000000 --- a/Formula/termius.rb +++ /dev/null @@ -1,189 +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" - revision 2 - head "https://github.com/Crystalnix/termius-cli.git", :branch => "master" - - bottle do - cellar :any - sha256 "6cf57f123ac50976b3d4439a14046489c42173f606bc750de90c8ab7bd84bf4d" => :catalina - sha256 "82a302b40d54d5652fe16aad8e22ebc64d05b7f459fe304fe7da43cb4834de6a" => :mojave - sha256 "7f7fe23ce8e5f082efe10c406176a5393e16ca9ae711736713f00fe239fdf4ee" => :high_sierra - end - - depends_on "libyaml" - depends_on "openssl@1.1" - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "bcrypt" do - url "https://files.pythonhosted.org/packages/fa/aa/025a3ab62469b5167bc397837c9ffc486c42a97ef12ceaa6699d8f5a5416/bcrypt-3.1.7.tar.gz" - sha256 "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42" - end - - resource "blinker" do - url "https://files.pythonhosted.org/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz" - sha256 "471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6" - 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 "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" - sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" - 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/20/2f/33128bd8522c7cabe15da58f18384985b1627a48d56a22454e78eff16388/cliff-2.7.0.tar.gz" - sha256 "5006d8dbb95136f0cbf5e4f3e518767b3c71d6819de935646e012c3e6fca77a7" - end - - resource "cmd2" do - url "https://files.pythonhosted.org/packages/ba/b4/95e99237786d15572c9f80a279799964c5e910fc8c7d40c82dd5b4053108/cmd2-1.0.2.tar.gz" - sha256 "42ebf468bd457d99b8d2fd9573a8fba8519f625ca20d2d8185dbfbc416bd28b8" - end - - resource "colorama" do - url "https://files.pythonhosted.org/packages/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" - sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" - end - - resource "google-measurement-protocol" do - url "https://files.pythonhosted.org/packages/f5/f7/f9cf56ce6d72f50400d7dc4144ed2da222e0dd7357a35b0a890663020a99/google-measurement-protocol-0.1.6.tar.gz" - sha256 "4a52fc36b035a5bd78d664f18876c57405af572d43cc65280b60bc8f081c0a71" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "ndg-httpsclient" do - url "https://files.pythonhosted.org/packages/b9/f8/8f49278581cb848fb710a362bfc3028262a82044167684fb64ad068dbf92/ndg_httpsclient-0.5.1.tar.gz" - sha256 "d72faed0376ab039736c2ba12e30695e2788c4aa569c9c3e3d72131de2592210" - end - - resource "paramiko" do - url "https://files.pythonhosted.org/packages/ac/15/4351003352e11300b9f44a13576bff52dcdc6e4a911129c07447bda0a358/paramiko-2.7.1.tar.gz" - sha256 "920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f" - end - - resource "pathlib2" do - url "https://files.pythonhosted.org/packages/94/d8/65c86584e7e97ef824a1845c72bbe95d79f5b306364fa778a3c3e401b309/pathlib2-2.3.5.tar.gz" - sha256 "6cd9a47b597b37cc57de1c05e56fb1a1c9cc9fab04fe78c29acd090418529868" - end - - resource "pbr" do - url "https://files.pythonhosted.org/packages/8a/a8/bb34d7997eb360bc3e98d201a20b5ef44e54098bb2b8e978ae620d933002/pbr-5.4.5.tar.gz" - sha256 "07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c" - end - - resource "PrettyTable" do - url "https://files.pythonhosted.org/packages/ef/30/4b0746848746ed5941f052479e7c23d2b56d174b82f4fd34a25e389831f5/prettytable-0.7.2.tar.bz2" - sha256 "853c116513625c738dc3ce1aee148b5b5757a86727e67eff6502c7ca59d43c36" - end - - resource "pyasn1" do - url "https://files.pythonhosted.org/packages/a4/db/fffec68299e6d7bad3d504147f9094830b704527a7fc098b721d38cc7fa7/pyasn1-0.4.8.tar.gz" - sha256 "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba" - end - - resource "pycparser" do - url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" - sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" - 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/0d/1d/6cc4bd4e79f78be6640fab268555a11af48474fac9df187c3361a1d1d2f0/pyOpenSSL-19.1.0.tar.gz" - sha256 "9a24494b2602aaf402be5c9e30a0b82d4a5c67528fe8fb475e3f3bc00dd69507" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "pyperclip" do - url "https://files.pythonhosted.org/packages/f6/5b/55866e1cde0f86f5eec59dab5de8a66628cb0d53da74b8dbc15ad8dabda3/pyperclip-1.8.0.tar.gz" - sha256 "b75b975160428d84608c26edba2dec146e7799566aea42c1fe1b32e72b6028f2" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "stevedore" do - url "https://files.pythonhosted.org/packages/be/19/83fd12828f879f53b85fe820925776aecda710944279e47a2dac53444adc/stevedore-1.32.0.tar.gz" - sha256 "18afaf1d623af5950cc0f7e75e70f917784c73b652a34a12d90b309451b5500b" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" - sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" - end - - def install - virtualenv_install_with_resources - - 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 18752bb4333ee..0000000000000 --- a/Formula/termrec.rb +++ /dev/null @@ -1,33 +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.19.tar.gz" - sha256 "0550c12266ac524a8afb764890c420c917270b0a876013592f608ed786ca91dc" - license "LGPL-3.0" - head "https://github.com/kilobyte/termrec.git" - - bottle do - cellar :any - sha256 "1d93149ec34c0bf531da76b0137390ed1f05bf2e35e806f1fe875fe6648c4c2b" => :catalina - sha256 "e3f9f241763a05de367da2ee91727674e18a126a99480a750b901a21bdad0ffb" => :mojave - sha256 "d6cb43ed14ec0531824bd4eb55ddc625b5711c28b274ce78eb815501e5f3ebf2" => :high_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 4f21bab8e91d8..0000000000000 --- a/Formula/termshare.rb +++ /dev/null @@ -1,64 +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" - license "BSD-2-Clause" - revision 1 - head "https://github.com/progrium/termshare.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "4dd298c36b89e861cbcbc96746c8174c034ee8fbe1878973e8cee862659fa65a" => :catalina - 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/termshark.rb b/Formula/termshark.rb deleted file mode 100644 index 65be79e960efa..0000000000000 --- a/Formula/termshark.rb +++ /dev/null @@ -1,102 +0,0 @@ -class Termshark < Formula - desc "Terminal UI for tshark, inspired by Wireshark" - homepage "https://termshark.io/" - url "https://github.com/gcla/termshark/archive/v2.1.1.tar.gz" - sha256 "c02a21e0a61b791b1287b85acc33834ccd3bb4efb40be52e5a74d2b989d51416" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "04877a693f8f87f4120847862fa35642b5d862c7b93603b11d330015316efe03" => :catalina - sha256 "ec8e1526dd3ba7cb58bbcc510eee873c10fd11f428d12b54950d1dcfa5603a1a" => :mojave - sha256 "ef6bfc089550e3ba2afb02510ff7d5d3a8364079970a4f223a8b84801f1c0b93" => :high_sierra - end - - depends_on "go" => :build - depends_on "socat" => :test - depends_on "wireshark" - - def install - # Don't set GOPATH because we want to build using go modules to - # ensure our dependencies are the ones specified in go.mod. - mkdir_p buildpath - ln_sf buildpath, buildpath/"termshark" - - cd "termshark" do - system "go", "build", "-o", bin/"termshark", - "cmd/termshark/termshark.go" - end - 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.open("#{HOMEBREW_TEMP}/termshark-test.pcap", "w+") do |f| - f.write(packet.pack("C*")) - end - - # 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 5s ; 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/termtosvg.rb b/Formula/termtosvg.rb deleted file mode 100644 index 6d38d0f11fb9a..0000000000000 --- a/Formula/termtosvg.rb +++ /dev/null @@ -1,45 +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/1.1.0.tar.gz" - sha256 "53e9ad5976978684699d14b83cac37bf173d76c787f1b849859ad8aef55f22d2" - license "BSD-3-Clause" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "f882539d594efc11647207ad81eed3c1a2f365c6c9a3b7be1401dffbab6ea98d" => :catalina - sha256 "860ca46763f9cfeb387a806e380d6a680fc39f13d31795ebed68e7c2df087aaa" => :mojave - sha256 "6cb7b9688575469970762f3ecdee882a30051a4b6d42f41af0e6aed159d97b0b" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "libxml2" - uses_from_macos "libxslt" - - resource "lxml" do - url "https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" - sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" - end - - resource "pyte" do - url "https://files.pythonhosted.org/packages/66/37/6fed89b484c8012a0343117f085c92df8447a18af4966d25599861cd5aa0/pyte-0.8.0.tar.gz" - sha256 "7e71d03e972d6f262cbe8704ff70039855f05ee6f7ad9d7129df9c977b5a88c5" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" - sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" - end - - def install - virtualenv_install_with_resources - 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 24737fab849a4..0000000000000 --- a/Formula/terraform-docs.rb +++ /dev/null @@ -1,62 +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.9.1.tar.gz" - sha256 "2af0da7256dc73cb67787f81237bd44859ea959d63c9d974b572ed71755cb148" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "07e6bc6850459581f65fc59b0bc1152fbd917c7a760fc2e7203c55bc581bcbc7" => :catalina - sha256 "a91bb362006421c48eb1f6c251b5515bce6930f9611d116469fea0390966531d" => :mojave - sha256 "27b5477a3af7c8cdd53ba80fbf86309a65deeb8668dc010cd88cb0cb872272fb" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "build" - bin.install "bin/darwin-amd64/terraform-docs" - prefix.install_metafiles - 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 06f986794ea35..0000000000000 --- a/Formula/terraform-inventory.rb +++ /dev/null @@ -1,73 +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.9.tar.gz" - sha256 "e0f5876b2272ac3f9702e3599078aede1e448f617526beec147cd3fbbf0836bd" - license "MIT" - head "https://github.com/adammck/terraform-inventory.git" - - bottle do - cellar :any_skip_relocation - sha256 "a645460f72cd2fb823d603325439b39a7b8c493a2c3b833d87a484bbc0dfe7ba" => :catalina - sha256 "9f34bba5205c0fc87ddf7c95ce8532b85fc7cbb515dea9cc211f70fab2aeb643" => :mojave - sha256 "a9500dab587c5078fe62ae2ab5eff2376ecad8d29208a60fe195debfdeea5e78" => :high_sierra - sha256 "6b30bf29fe2e83c3bb75c16ce83731c7b212f5f48c3db787501cf1fbb8c37d19" => :sierra - end - - depends_on "go" => :build - - go_resource "github.com/adammck/venv" do - url "https://github.com/adammck/venv.git", - :revision => "8a9c907a37d36a8f34fa1c5b81aaf80c2554a306" - end - - go_resource "github.com/blang/vfs" do - url "https://github.com/blang/vfs.git", - :revision => "2c3e2278e174a74f31ff8bf6f47b43ecb358a870" - 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-ls.rb b/Formula/terraform-ls.rb deleted file mode 100644 index 97aa22ecf7ef2..0000000000000 --- a/Formula/terraform-ls.rb +++ /dev/null @@ -1,43 +0,0 @@ -class TerraformLs < Formula - desc "Terraform Language Server" - homepage "https://github.com/hashicorp/terraform-ls" - url "https://github.com/hashicorp/terraform-ls/archive/v0.4.1.tar.gz" - sha256 "0c7b586d1fa83abf9bff191744adcfebff61b788e266911852cc809d616c9912" - license "MPL-2.0" - head "https://github.com/hashicorp/terraform-ls.git" - - bottle do - cellar :any_skip_relocation - sha256 "ac5509eab0c8164a7ac5535694b5b4faccc873124ce58533e0df273736ad388e" => :catalina - sha256 "41475cfd0f4524cc2f04cf2adb78817961c91df80ae1f619c15ab9dcf4338222" => :mojave - sha256 "834a09ae4e5aa766b00a65451fa00bee7e93a84e9dfd424f9b2ad5a7cdbed503" => :high_sierra - 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}/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/terraform-provider-libvirt.rb b/Formula/terraform-provider-libvirt.rb deleted file mode 100644 index ebef73fb5faed..0000000000000 --- a/Formula/terraform-provider-libvirt.rb +++ /dev/null @@ -1,28 +0,0 @@ -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/v0.6.2.tar.gz" - sha256 "2bdb5e013b0f4ff576c4c023c02fb8936661bde766f42fd07221cd2c9210c633" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "a554630fc5120ecfd2c9d95cde9b5d86c245c56fda9a388664633d61ff20dd5b" => :catalina - sha256 "106d4cefd9b03629bb1b5576208b5f19b911a10a0e6ef50e29d498ef56461b59" => :mojave - sha256 "0c3d7bace6f2fc3c76bcbb3f4972402446e9fcb5a40d2d99d04f5eacedfb7943" => :high_sierra - end - - depends_on "go" => :build - depends_on "pkg-config" => :build - - depends_on "libvirt" - depends_on "terraform" - - def install - system "go", "build", "-mod=vendor", "-trimpath", "-ldflags", "-X main.version=#{version}", "-o", bin/name - 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/terraform-provisioner-ansible.rb b/Formula/terraform-provisioner-ansible.rb deleted file mode 100644 index bc876cd129ae4..0000000000000 --- a/Formula/terraform-provisioner-ansible.rb +++ /dev/null @@ -1,71 +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 "664cff934260d219317c5b875a34d7d9e223f7b0ad3d979943a9d33c7bc6928e" => :catalina - 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 b690a6d5651fa..0000000000000 --- a/Formula/terraform.rb +++ /dev/null @@ -1,61 +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.12.28.tar.gz" - sha256 "8381058d49ce3804efc72c2afdc4691194418e0da61b8a553fb1c0e81e0c2087" - license "MPL-2.0" - head "https://github.com/hashicorp/terraform.git" - - bottle do - cellar :any_skip_relocation - sha256 "33bccc922a2204ce317e553dcc6cfc2106cd8ff72c9e12ada102100741c5242d" => :catalina - sha256 "bc46af39ad947e0ae428ef8605f8cf38e55330860423440ae8dee147d363bdcc" => :mojave - sha256 "c1ea4d4491aded438793b5857a81fc1557de4d6d3117029b2fd7a9a0af7ca3d1" => :high_sierra - end - - depends_on "go@1.13" => :build - - conflicts_with "tfenv", :because => "tfenv symlinks terraform binaries" - - def install - # 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" - - ENV["CGO_ENABLED"] = "0" - system "go", "build", *std_go_args, "-ldflags", "-s -w", "-mod=vendor" - 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 = var.aws_amis[var.aws_region] - count = 4 - } - EOS - system "#{bin}/terraform", "init" - system "#{bin}/terraform", "graph" - end -end diff --git a/Formula/terraform@0.11.rb b/Formula/terraform@0.11.rb deleted file mode 100644 index d8accbbe68a7d..0000000000000 --- a/Formula/terraform@0.11.rb +++ /dev/null @@ -1,75 +0,0 @@ -class TerraformAT011 < Formula - desc "Tool to build, change, and version infrastructure" - homepage "https://www.terraform.io/" - url "https://github.com/hashicorp/terraform/archive/v0.11.14.tar.gz" - sha256 "50b75c94c4d3bfe44cfc12c740126747b6b34c014602777154356caa85a783f4" - license "MPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e6db9ebe826e856ff9bb10ffcb8885ce9bf1535ced8c3b477ae48d64c0c99de2" => :catalina - sha256 "4460e332118c477f7389093d533e63752469973487275f1d656a80974d723888" => :mojave - sha256 "a7b28af5ba3c9f06614eef3ca71653fbfacc3ff62abbaa75f4c187f996584af8" => :high_sierra - sha256 "eb5d3500ed06ce55c984e79a317050b4483b25774bf6a77147dfdb2c3746fa25" => :sierra - end - - keg_only :versioned_formula - - depends_on "go" => :build - depends_on "gox" => :build - - 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" - - ENV["XC_OS"] = "darwin" - ENV["XC_ARCH"] = "amd64" - system "go", "mod", "vendor" # Needed for Go 1.14+ - system "make", "tools", "bin" - - bin.install "pkg/darwin_amd64/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 12a0b64aa1204..0000000000000 --- a/Formula/terraform_landscape.rb +++ /dev/null @@ -1,70 +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.3.3.tar.gz" - sha256 "8594948ebfc0d4f311a2f0a2261a0397b190500f33492c5bf647b3e07b8b625d" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "e621a330795fc10591b1eccb2048f64b10d38564a2c5cb21823f195fed768239" => :catalina - sha256 "c364081610b7d9de7913c77ed10368f843b6c0dfa5c8a19ad069da9594007c7c" => :mojave - sha256 "ed113c64ee8bbcf265633ae8b6d5839e2a4b91d003247e42c71b8ff7b6c36cc2" => :high_sierra - 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.4.7.gem" - sha256 "8fc35d22ba7a386adecb728e68908e98b6a076340aaec6c654583a93ca9faadf" - end - - resource "diffy" do - url "https://rubygems.org/gems/diffy-3.3.0.gem" - sha256 "909af322005817dfd848afb85ba5a30c65c38299b288349ac8c1744607391d62" - end - - resource "highline" do - url "https://rubygems.org/gems/highline-2.0.1.gem" - sha256 "ec0bab47f397b32d09b599629cf32f4fc922470a09bef602ef5e492127bb263f" - 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.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/terraformer.rb b/Formula/terraformer.rb deleted file mode 100644 index 788eb81c0c2ac..0000000000000 --- a/Formula/terraformer.rb +++ /dev/null @@ -1,39 +0,0 @@ -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/0.8.8.tar.gz" - sha256 "a9cabe0889ebf823abb552f6e24276a8bf7667923918814623fe5129c34f47f0" - license "Apache-2.0" - head "https://github.com/GoogleCloudPlatform/terraformer.git" - - bottle do - cellar :any_skip_relocation - sha256 "e8df5d868473fa864a82e2c643257317565b4329472e1e3f1abd5d57c370eef6" => :catalina - sha256 "1f2329c2ab0200adadb0a83e1073ff6e38984cbbee74450f62649c61734cf618" => :mojave - sha256 "b9fbd65c0319b54db123e71062ab23d85c01c9200e0cf7d8b460302a78565660" => :high_sierra - end - - depends_on "go" => :build - - # fix version check, remove in next release - patch do - url "https://github.com/GoogleCloudPlatform/terraformer/pull/535.patch?full_index=1" - sha256 "477581bc9a3be36427e181d2ccdcefcbf13b9230b8ddf5e9eea64de9357a6274" - end - - def install - system "go", "build", *std_go_args - prefix.install_metafiles - 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/terraforming.rb b/Formula/terraforming.rb deleted file mode 100644 index fc2c7ead754d5..0000000000000 --- a/Formula/terraforming.rb +++ /dev/null @@ -1,126 +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.18.0", - :revision => "67cb9299f283bc16bd70c197f25edc419bee280f" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "5b1a20c820982585fdad1e588ab6ac171e8d3f963da62b50a598e3002635331b" => :catalina - sha256 "e4997ba46e6e796833c2f881f68b20cd52006510371ede211d422190a5223454" => :mojave - sha256 "59001edf7447dbab2dd760fcec4fc0a77d711ec43e7d95658aa9c663f7baf44d" => :high_sierra - sha256 "f1d900508e9b2a38a1e417ee9f0faa050c89332cf9eff1a3de83c96eebead164" => :sierra - end - - resource "aws-sdk-autoscaling" do - url "https://rubygems.org/gems/aws-sdk-autoscaling-1.20.0.gem" - sha256 "85525581b3084d1ce04d468961bdde2397ab340914579bf0515c45a706cd8815" - end - - resource "aws-sdk-cloudwatch" do - url "https://rubygems.org/gems/aws-sdk-cloudwatch-1.20.0.gem" - sha256 "d904807e172a5cf88b1f13f1944a4595fa51a842c10d1a0ac5065fdf874ac6af" - end - - resource "aws-sdk-dynamodb" do - url "https://rubygems.org/gems/aws-sdk-dynamodb-1.25.0.gem" - sha256 "529c3b1b46c997b5db79274747922669ff9f52caefcf3ee40454bf0c3e3424c8" - end - - resource "aws-sdk-ec2" do - url "https://rubygems.org/gems/aws-sdk-ec2-1.80.0.gem" - sha256 "bb73cefdf95ad413ae7b0fe6fcc2ead6e66f8980ed87bd96a1a7c43fb589551e" - end - - resource "aws-sdk-efs" do - url "https://rubygems.org/gems/aws-sdk-efs-1.13.0.gem" - sha256 "c322bd04fed83efa1d5a4b276cab788b39258c4ecab362a789cc16cc61be05e4" - end - - resource "aws-sdk-elasticache" do - url "https://rubygems.org/gems/aws-sdk-elasticache-1.14.0.gem" - sha256 "a78ae9d6c927f6b5c2b9af40c5bc03453b39d9693dcb05df2730293a52186844" - end - - resource "aws-sdk-elasticloadbalancing" do - url "https://rubygems.org/gems/aws-sdk-elasticloadbalancing-1.12.0.gem" - sha256 "39c04663c91b1a467dd5d9b541d4792be4e5b9e25ee2ffb52e473aeb97d44301" - end - - resource "aws-sdk-elasticloadbalancingv2" do - url "https://rubygems.org/gems/aws-sdk-elasticloadbalancingv2-1.26.0.gem" - sha256 "1dc95fc21b1b1ffeb15801084affc5d915d3c386f6f052f55c760a773424dd6d" - end - - resource "aws-sdk-iam" do - url "https://rubygems.org/gems/aws-sdk-iam-1.18.0.gem" - sha256 "0efba7b586c81d7b17cb3086bf5cb287e68db5487d344877a444c107ee3b2130" - end - - resource "aws-sdk-kms" do - url "https://rubygems.org/gems/aws-sdk-kms-1.17.0.gem" - sha256 "f6e6500300ede3e31edaf14aea9ad05a60aba4402c11946fe147f9d03abc584e" - end - - resource "aws-sdk-rds" do - url "https://rubygems.org/gems/aws-sdk-rds-1.50.0.gem" - sha256 "f62b6f0c87cf358a59b440a40ebbb79d6be6eeb5c2f4e5f159fc8ee3d1cf7a1b" - end - - resource "aws-sdk-redshift" do - url "https://rubygems.org/gems/aws-sdk-redshift-1.23.0.gem" - sha256 "99ecbd9f050e4dd80c80f1119a273c75abdb5a5abf02b37c61f39234ee762678" - end - - resource "aws-sdk-route53" do - url "https://rubygems.org/gems/aws-sdk-route53-1.22.0.gem" - sha256 "1b7aaabc67e4133a34c07c5fa979b00374866026d3f3bd130b992fa163f6b211" - end - - resource "aws-sdk-s3" do - url "https://rubygems.org/gems/aws-sdk-s3-1.36.1.gem" - sha256 "b5baf7c91119791354a14424ef7af8917b6806a2b33878bf80f22b256104d0bd" - end - - resource "aws-sdk-sns" do - url "https://rubygems.org/gems/aws-sdk-sns-1.12.0.gem" - sha256 "ac98e9dd72a8ecfe18f0e6482c02563050f0638f179725872bd414791a856138" - end - - resource "aws-sdk-sqs" do - url "https://rubygems.org/gems/aws-sdk-sqs-1.13.0.gem" - sha256 "a0bb59cefb6a3a152192303236d0e3a0c0dabd27b7ab6ac3c6993b69598df5b2" - 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.3.gem" - sha256 "49bc217fe28f6af34c6e60b003e3405c27595a55689077d82e9e61d4d3b519fa" - end - - def install - ENV["GEM_HOME"] = libexec - resources.each do |r| - 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 2a44442e7cb06..0000000000000 --- a/Formula/terragrunt.rb +++ /dev/null @@ -1,25 +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.23.31.tar.gz" - sha256 "7bb9859fd968220bcae1908079448834a789fca03d644d405a61441cd4a655a2" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "c74b848ce18f0e9213060a65ce821780253bb1b5243347ef54a0e1be5340c417" => :catalina - sha256 "07f2f7c28801f415bc2fa0eb4c12f822c4c54cb43bae78628fd8c8db372717d5" => :mojave - sha256 "96abd6473924b65e834d33412f2d3087f994f9a368367e79a75b47acec02475c" => :high_sierra - end - - depends_on "go" => :build - depends_on "terraform" - - def install - system "go", "build", "-ldflags", "-X main.VERSION=v#{version}", *std_go_args - end - - test do - assert_match version.to_s, shell_output("#{bin}/terragrunt --version") - end -end diff --git a/Formula/terrahelp.rb b/Formula/terrahelp.rb deleted file mode 100644 index 4158bdcff400c..0000000000000 --- a/Formula/terrahelp.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Terrahelp < Formula - desc "Tool providing extra functionality for Terraform" - homepage "https://github.com/opencredo/terrahelp" - url "https://github.com/opencredo/terrahelp/archive/v0.7.4.tar.gz" - sha256 "2d70b6471bfb4b9c8ff3bb12050ecedca8d39830fa221bf8c319a1b6144ee6e5" - license "Apache-2.0" - head "https://github.com/opencredo/terrahelp.git" - - bottle do - cellar :any_skip_relocation - sha256 "515040f845a9eb85328f110610d2bc31837771c79828c6979eeddb5c885aac8b" => :catalina - sha256 "f195506118d3fca9b4b0555e9aef67c4e831053a943fade0580793aa5e89139a" => :mojave - sha256 "df53d2e287ce9b9b31facff22d50b4181704045e9611ebfb363461025cf1eb8f" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - ENV.prepend_create_path "PATH", buildpath/"bin" - - dir = buildpath/"src/github.com/opencredo/terrahelp" - dir.install buildpath.children - - cd dir do - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = "amd64" - - system "go", "build", "-mod=vendor", "-o", "dist/darwin/amd64/terrahelp" - bin.install "dist/darwin/amd64/terrahelp" - end - 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 = shell_output("cat #{tf_output} \| #{bin}/terrahelp mask --tfvars #{tf_vars}").strip - - assert_match("vars.msg1: \"******\"", output, "expecting sensitive value to be masked") - assert_not_match(/sensitive-value-1-AK#%DJGHS\*G/, output, "not expecting sensitive value to be presentt") - end -end diff --git a/Formula/terrahub.rb b/Formula/terrahub.rb deleted file mode 100644 index 4be46293ee045..0000000000000 --- a/Formula/terrahub.rb +++ /dev/null @@ -1,39 +0,0 @@ -require "language/node" - -class Terrahub < Formula - desc "Terraform automation and orchestration tool" - homepage "https://docs.terrahub.io/" - url "https://registry.npmjs.org/terrahub/-/terrahub-0.4.28.tgz" - sha256 "81daeccf312d53c045a70a4d18178c1cf1eaf95a39d4bfddce1237a5b2f45573" - license "MPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a39fbab6315372412a7a26b02ee9e7365e2ed1f1c52359c943f94065ee236cd3" => :catalina - sha256 "16253bbcc02bd5c9566ca7fc17768bc5251eed1c921b5d42269464d24635ecb3" => :mojave - sha256 "88cd7c7ce98a571424ec39f1f4ccc53200d4be39beb4629d293ec99f57ca5f4d" => :high_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/".terrahub.yml").write <<~EOF - project: - name: terrahub-demo - code: abcd1234 - vpc_component: - name: vpc - root: ./vpc - subnet_component: - name: subnet - root: ./subnet - EOF - output = shell_output("#{bin}/terrahub graph") - assert_match "Project: terrahub-demo", output - end -end diff --git a/Formula/tesseract-lang.rb b/Formula/tesseract-lang.rb deleted file mode 100644 index a41452aa10aa4..0000000000000 --- a/Formula/tesseract-lang.rb +++ /dev/null @@ -1,35 +0,0 @@ -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/4.0.0.tar.gz" - sha256 "f1b71e97f27bafffb6a730ee66fd9dc021afc38f318fdc80a464a84a519227fe" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "5cfe25847d5eaa4983c7b5ae2b6973bd036ce7363b4332cc66e1ab1b8d41a0d5" => :catalina - sha256 "631211ef37fcafa9a3fac6a7cd6ca94aaeca83ae28543716a7aaa9cf1072d414" => :mojave - sha256 "631211ef37fcafa9a3fac6a7cd6ca94aaeca83ae28543716a7aaa9cf1072d414" => :high_sierra - sha256 "4c69eedd24721f0e47a645ae20a08bf8c8083f805615c7b46a73406a9f593cb1" => :sierra - 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/tesseract.rb b/Formula/tesseract.rb deleted file mode 100644 index de97eb58e63e3..0000000000000 --- a/Formula/tesseract.rb +++ /dev/null @@ -1,79 +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.1.1.tar.gz" - sha256 "2a66ff0d8595bff8f04032165e6c936389b1e5727c3ce5a27b3e059d218db1cb" - license "Apache-2.0" - head "https://github.com/tesseract-ocr/tesseract.git" - - bottle do - cellar :any - sha256 "81ff467946d9c85151c86819034cd183a983b4a3fa10374c7f039a5ec3ef0d82" => :catalina - sha256 "34eee505fccec07eaab30f14c46f9688db9f3aa578306d47bbcd31801b0b849d" => :mojave - sha256 "6b64585454bcca9b62945b284000723d76afad15b5e80109ca6cdc699ae50e25" => :high_sierra - end - - 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" - - 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 - - resource "testfile" do - url "https://raw.githubusercontent.com/tesseract-ocr/test/6dd816cdaf3e76153271daf773e562e24c928bf5/testing/eurotext.tif" - sha256 "7b9bd14aba7d5e30df686fbb6f71782a97f48f81b32dc201a1b75afe6de747d6" - 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", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--datarootdir=#{HOMEBREW_PREFIX}/share" - - system "make" - - # make install in the local share folder to avoid permission errors - system "make", "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("testfile").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/testdisk.rb b/Formula/testdisk.rb deleted file mode 100644 index 7cfd35385f271..0000000000000 --- a/Formula/testdisk.rb +++ /dev/null @@ -1,29 +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.1.tar.bz2" - sha256 "1413c47569e48c5b22653b943d48136cb228abcbd6f03da109c4df63382190fe" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "66c4088c77794a244fd5b38fa39216eb8d6a09b9e4efd5e68a249e9b5df65606" => :catalina - sha256 "1e77fbc276d986fcf378901b2ba0d5957f17b569e512980017ecd09926505a4a" => :mojave - sha256 "8cd43adea2ddf632e5c9305609cf377b47fcf5836805075d06dd3ccd2142ccc6" => :high_sierra - sha256 "752a686f8fa7717cbbdef064eefd80503eccdddfc587bd48fd24256e23332470" => :sierra - 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 0d489af6cc3c3..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/3.0.2.tar.gz" - sha256 "cfca31a0e5fd0e706002e7c1b044c11be5140091f0e22f0ae5b9aa644ef50da2" - license "GPL-2.0" - head "https://github.com/drwetter/testssl.sh.git", :branch => "3.1dev" - - bottle :unneeded - - depends_on "openssl@1.1" - - def install - bin.install "testssl.sh" - man1.install "doc/testssl.1" - prefix.install "etc" - env = { - :PATH => "#{Formula["openssl@1.1"].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 38dec92c58570..0000000000000 --- a/Formula/texapp.rb +++ /dev/null @@ -1,23 +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 "416f71ee320ac9efd58e5da5cb91cae807c61d542e90ad624bc778e4b060dfed" => :catalina - 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 a8c49011d53f9..0000000000000 --- a/Formula/texi2html.rb +++ /dev/null @@ -1,36 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "10f6d76de400799fb21dc900a2344ef444d43658dd502f0c040ad7c0a4bf0fbb" => :catalina - sha256 "10f6d76de400799fb21dc900a2344ef444d43658dd502f0c040ad7c0a4bf0fbb" => :mojave - sha256 "10f6d76de400799fb21dc900a2344ef444d43658dd502f0c040ad7c0a4bf0fbb" => :high_sierra - 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 afa98a811974c..0000000000000 --- a/Formula/texinfo.rb +++ /dev/null @@ -1,41 +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.7.tar.xz" - mirror "https://ftpmirror.gnu.org/texinfo/texinfo-6.7.tar.xz" - sha256 "988403c1542d15ad044600b909997ba3079b10e03224c61188117f3676b02caa" - license "GPL-3.0" - - bottle do - sha256 "0686381d97b0448c10d11eaba59722c029d17c8423c17ad524b76ec086790f44" => :catalina - sha256 "419fccc89f850de008e954984c65eea9b7f82940178f7ee439e42c2c892a2e52" => :mojave - sha256 "a634a1bd15d3d7735e4934fcf26bfa295ce17108912ae7451d2761c6d578de6a" => :high_sierra - end - - depends_on "gettext" if MacOS.version <= :high_sierra - - keg_only :provided_by_macos - - uses_from_macos "ncurses" - uses_from_macos "perl" - - 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/texlab.rb b/Formula/texlab.rb deleted file mode 100644 index 16ff0db7f65ac..0000000000000 --- a/Formula/texlab.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Texlab < Formula - desc "Implementation of the Language Server Protocol for LaTeX" - homepage "https://texlab.netlify.com/" - url "https://github.com/latex-lsp/texlab/archive/v2.2.0.tar.gz" - sha256 "313b7c230c71a0087a2a5aadbba1d8ba1a929e1e8f98b8b7553ca956fc567835" - license "GPL-3.0" - head "https://github.com/latex-lsp/texlab.git" - - bottle do - cellar :any_skip_relocation - sha256 "27c48990087cf5e0c83ed2f18e2312026214e25ff0948d1b440486029ead5433" => :catalina - sha256 "e0c354c84d065702a8683cce427f8311e1b264792f9295da496098db7182d350" => :mojave - sha256 "e94b88352e4e10f186f4b3f475b3af70674afb92d2bb78259a59d872bcbf218b" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - require "open3" - - begin - stdin, stdout, _, wait_thr = Open3.popen3("#{bin}/texlab") - pid = wait_thr.pid - stdin.write <<~EOF - Content-Length: 103 - - {"jsonrpc": "2.0", "id": 0, "method": "initialize", "params": { "rootUri": null, "capabilities": {}}} - - EOF - assert_match "Content-Length:", stdout.gets("\n") - ensure - Process.kill "SIGKILL", pid - end - end -end diff --git a/Formula/texmath.rb b/Formula/texmath.rb deleted file mode 100644 index e825ff4dadaae..0000000000000 --- a/Formula/texmath.rb +++ /dev/null @@ -1,31 +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.12.0.2/texmath-0.12.0.2.tar.gz" - sha256 "2fec285a2266e56bba17914c122045f31b38de3efcd202dcf32a4f8b830bd184" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "5d87a2122991899db8297059dad21aef07d3d74f21659ffb49387b4f8d5f7670" => :catalina - sha256 "76ee2dc264cb8697ceb21c7a52132af5fd2fa46c1340055e7e778a98047cf807" => :mojave - sha256 "c73f655501e17551219bf6bd028aedaa09b40464b3706db4d1a0d12b673c824e" => :high_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 26c2485ad330a..0000000000000 --- a/Formula/textql.rb +++ /dev/null @@ -1,39 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d33d111039e957631d3a77cd35413707b47e684638a2571e3719a17c0173b55d" => :catalina - 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 cdb62c6c9d09e..0000000000000 --- a/Formula/tfenv.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Tfenv < Formula - desc "Terraform version manager inspired by rbenv" - homepage "https://github.com/tfutils/tfenv" - url "https://github.com/tfutils/tfenv/archive/v2.0.0.tar.gz" - sha256 "de3dcf13768cb078e94d68ca85071b8d6e44104394336d952255ca558b854b0b" - license "MIT" - head "https://github.com/tfutils/tfenv.git" - - bottle :unneeded - - uses_from_macos "unzip" - - conflicts_with "terraform", :because => "tfenv symlinks terraform binaries" - - # fix bash 3.x compatibility - # removed in the next release - unless build.head? - patch do - url "https://github.com/tfutils/tfenv/pull/181.patch?full_index=1" - sha256 "b1365be51a8310a44b330f9b008dabcdfe2d16b0349f38988e7a24bcef6cae09" - end - end - - def install - prefix.install %w[bin lib libexec share] - end - - test do - system bin/"tfenv", "list-remote" - end -end diff --git a/Formula/tflint.rb b/Formula/tflint.rb deleted file mode 100644 index 19be375db623c..0000000000000 --- a/Formula/tflint.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Tflint < Formula - desc "Linter for Terraform files" - homepage "https://github.com/wata727/tflint" - url "https://github.com/terraform-linters/tflint/archive/v0.17.0.tar.gz" - sha256 "da288a8077a059fca95614e60bada65595edbde138dfa9ca2ff8974eb34acbb6" - license "MPL-2.0" - head "https://github.com/wata727/tflint.git" - - bottle do - cellar :any_skip_relocation - sha256 "e8418093a3b01343484b145321c0f88dcea704b4755433a16918b30c37036080" => :catalina - sha256 "81e76a5716c6a32316c45496cad502e20bdc7adc77fe7b175057ad0a3b87f2c5" => :mojave - sha256 "71703bb43d3a7b2f3e798a07a8494e30cc06b3cb533b41e01c8c6b36781338b2" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-s -w", "-o", bin/"tflint" - end - - test do - (testpath/"test.tf").write <<~EOS - provider "aws" { - region = var.aws_region - } - EOS - - # tflint returns exitstatus: 0 (no issues), 2 (errors occured), 3 (no errors but issues found) - assert_match "", shell_output("#{bin}/tflint test.tf") - assert_equal 0, $CHILD_STATUS.exitstatus - assert_match version.to_s, shell_output("#{bin}/tflint --version") - end -end diff --git a/Formula/tgif.rb b/Formula/tgif.rb deleted file mode 100644 index ade46c2c50f48..0000000000000 --- a/Formula/tgif.rb +++ /dev/null @@ -1,59 +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 "057f91cf9ac5c38a46b158878f82ca57a5a1caa6589448ff90021fa80c0c6d00" => :catalina - 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 aab928af882fa..0000000000000 --- a/Formula/tgui.rb +++ /dev/null @@ -1,40 +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.8.tar.gz" - sha256 "a00e34eea7dc584211b2ebbfabc026af7c261d7935c32ca77fd90ed7a6c85230" - license "Zlib" - - bottle do - cellar :any - sha256 "195afefa361330ca0a2ff5c582162bb1c7b4a55e32c3454bbece2d6053e52872" => :catalina - sha256 "2ee5a851b200d21f8c70bb82daaef342c9d0d2f8dee94c143855a55f6b6a29a9" => :mojave - sha256 "3272f8d3194ed5a1f55503ac524d67dd03cabb80f6ac7aa8aeee43f322a3db08" => :high_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/the_platinum_searcher.rb b/Formula/the_platinum_searcher.rb deleted file mode 100644 index 791f3d88d433b..0000000000000 --- a/Formula/the_platinum_searcher.rb +++ /dev/null @@ -1,39 +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" - license "MIT" - head "https://github.com/monochromegane/the_platinum_searcher.git" - - bottle do - cellar :any_skip_relocation - sha256 "fbaca6dca74533a513f9b483607a75fe1ae1b772e39bd3e051d3c859bf378f84" => :catalina - 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 937420d2c2cb6..0000000000000 --- a/Formula/the_silver_searcher.rb +++ /dev/null @@ -1,39 +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" - license "Apache-2.0" - head "https://github.com/ggreer/the_silver_searcher.git" - - bottle do - cellar :any - sha256 "6fd80fdd0896dae09c01d3c9785ddd658bb5f2f229e7d011d3fbdde887bc35d0" => :catalina - 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 435a31a2ac60d..0000000000000 --- a/Formula/thefuck.rb +++ /dev/null @@ -1,83 +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/46/ed/11176f81a85876f4016c18907d6e085862df464a76628b91b3e91f080c7e/thefuck-3.30.tar.gz" - sha256 "32b41db4360a810d8e761e80fe09868ce634476ee1829e26869d49484b7a95cc" - license "MIT" - head "https://github.com/nvbn/thefuck.git" - - bottle do - cellar :any_skip_relocation - sha256 "9101f88f96d66615970b00405f06430176fb827922363530abb33f3d22341ff3" => :catalina - sha256 "fde50d03f97cf18dbdf89d86469f7c7c2794d40e639ad3c2c926466b98e455ee" => :mojave - sha256 "272cc963d34074daf27ca24dcb16f7f2a47aaafe955ff0e259dd38191274d1d1" => :high_sierra - end - - depends_on "python@3.8" - - resource "colorama" do - url "https://files.pythonhosted.org/packages/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "decorator" do - url "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz" - sha256 "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7" - end - - resource "psutil" do - url "https://files.pythonhosted.org/packages/c4/b8/3512f0e93e0db23a71d82485ba256071ebef99b227351f0f5540f744af41/psutil-5.7.0.tar.gz" - sha256 "685ec16ca14d079455892f25bd124df26ff9137664af445563c1bd36629b5e0e" - 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/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/5e/33/92333eb80be0c96385dee338f30b53e24a8b415d5785e225d789b3f90feb/wcwidth-0.1.8.tar.gz" - sha256 "f28b3e8a6483e5d49e7f8949ac1a78314e740333ae305b4ba5defd3e74fb37a8" - 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 72d87d0f8737f..0000000000000 --- a/Formula/theharvester.rb +++ /dev/null @@ -1,150 +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/V3.1.tar.gz" - sha256 "5157f61bdd8fa2a7e5f4c055709e251a1664a86b0265450e5a68d2cdf8c55c13" - license "GPL-2.0" - revision 1 - head "https://github.com/laramies/theHarvester.git" - - bottle do - cellar :any - sha256 "46856f81e9b3e915c37f652886bd17f886fbc7d3c4fb25095a43a04b5b2a916c" => :catalina - sha256 "ef8331534e766d52d242fe874e331baa3e563e366a8f5a2bae777024b38310fb" => :mojave - sha256 "628cf264b4109d51f768dde76b59409a02d1d6167ce1843d30d9f0ef82016a65" => :high_sierra - end - - depends_on "libyaml" - depends_on "python@3.8" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz" - sha256 "01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4" - end - - resource "aiodns" do - url "https://files.pythonhosted.org/packages/30/2e/b86ce168485b68d40c6a810838669deacf0abf41845c383659c2b613e69f/aiodns-2.0.0.tar.gz" - sha256 "815fdef4607474295d68da46978a54481dd1e7be153c7d60f9e72773cd38d77d" - end - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/86/cd/495c68f0536dcd25f016e006731ba7be72e072280305ec52590012c1e6f2/beautifulsoup4-4.8.1.tar.gz" - sha256 "6135db2ba678168c07950f9a16c4031822c6f4aec75a65e0a97bc5ca09789931" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/62/85/7585750fd65599e88df0fed59c74f5075d4ea2fe611deceb95dd1c2fb25b/certifi-2019.9.11.tar.gz" - sha256 "e4f3620cfea4f83eedc95b24abd9cd56f3c4b146dd0177e83a21b4eb49e21e50" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/0d/aa/c5ac2f337d9a10ee95d160d47beb8d9400e1b2a46bb94990a0409fe6d133/cffi-1.13.1.tar.gz" - sha256 "558b3afef987cf4b17abd849e7bedf64ee12b28175d564d05b628a0f9355599b" - end - - resource "chardet" do - url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "dnspython" do - url "https://files.pythonhosted.org/packages/ec/c5/14bcd63cb6d06092a004793399ec395405edf97c2301dfdc146dfbd5beed/dnspython-1.16.0.zip" - sha256 "36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01" - end - - resource "gevent" do - url "https://files.pythonhosted.org/packages/ed/27/6c49b70808f569b66ec7fac2e78f076e9b204db9cf5768740cff3d5a07ae/gevent-1.4.0.tar.gz" - sha256 "1eb7fa3b9bd9174dfe9c3b59b7a09b768ecd496debfc4976a9530a3e15c990d1" - end - - resource "greenlet" do - url "https://files.pythonhosted.org/packages/f8/e8/b30ae23b45f69aa3f024b46064c0ac8e5fcb4f22ace0dca8d6f9c8bbe5e7/greenlet-0.4.15.tar.gz" - sha256 "9416443e219356e3c31f1f918a91badf2e37acf297e2fa13d24d1cc2380f8fbc" - end - - resource "grequests" do - url "https://files.pythonhosted.org/packages/7e/80/39540c164bc4a6fd5bdafe4ab448752605bce4812b77702f81fd54fbbcc3/grequests-0.4.0.tar.gz" - sha256 "8aeccc15e60ec65c7e67ee32e9c596ab2196979815497f85cf863465a1626490" - 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/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "netaddr" do - url "https://files.pythonhosted.org/packages/0c/13/7cbb180b52201c07c796243eeff4c256b053656da5cfe3916c3f5b57b3a0/netaddr-0.7.19.tar.gz" - sha256 "38aeec7cdd035081d3a4c306394b19d677623bf76fa0913f6695127c7753aefd" - end - - resource "plotly" do - url "https://files.pythonhosted.org/packages/51/6d/835092e91c265d28f4bb94beda715b0182080f8e0344a6480bf4dc9d8522/plotly-4.2.1.tar.gz" - sha256 "6650ddb4da3aa94dcaa32e0779e611c6b17f371b5250ffdbf5ece6d66ba4483b" - end - - resource "pycares" do - url "https://files.pythonhosted.org/packages/85/de/cd46a73e43e206a6ad1e9cf9cc893c3ed1b21caf57f1e0a8d9a119d290eb/pycares-3.0.0.tar.gz" - sha256 "b253f5dcaa0ac7076b79388a3ac80dd8f3bd979108f813baade40d3a9b8bf0bd" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz" - sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4" - end - - resource "retrying" do - url "https://files.pythonhosted.org/packages/44/ef/beae4b4ef80902f22e3af073397f079c96969c69b2c7d52a57ea9ae61c9d/retrying-1.3.3.tar.gz" - sha256 "08c039560a6da2fe4f2c426d0766e284d3b736e355f8dd24b37367b0bb41973b" - end - - resource "shodan" do - url "https://files.pythonhosted.org/packages/a5/8b/c62f16523a14ac8df38745b75b2d498566c6ad87d7339d25d489261320be/shodan-1.19.0.tar.gz" - sha256 "9d8bb822738d02a63dbe890b46f511f0df13fd33a60b754278c3bf5dd5cf9fc4" - 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/7f/4e/95a13527e18b6f1a15c93f1c634b86d5fa634c5619dce695f4e0cd68182f/soupsieve-1.9.4.tar.gz" - sha256 "605f89ad5fdbfefe30cdc293303665eff2d188865d4dbe4eb510bba1edfbfce3" - end - - resource "texttable" do - url "https://files.pythonhosted.org/packages/82/a8/60df592e3a100a1f83928795aca210414d72cebdc6e4e0c95a6d8ac632fe/texttable-1.6.2.tar.gz" - sha256 "eff3703781fbc7750125f50e10f001195174f13825a92a45e9403037d539b4f4" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/ff/44/29655168da441dff66de03952880c6e2d17b252836ff1aa4421fba556424/urllib3-1.25.6.tar.gz" - sha256 "9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86" - 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 google 2>&1") - assert_match "docs.brew.sh:", output - end -end diff --git a/Formula/theora.rb b/Formula/theora.rb deleted file mode 100644 index 21a072513a80c..0000000000000 --- a/Formula/theora.rb +++ /dev/null @@ -1,60 +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 3 - sha256 "69f9b7922ddae2c007ad5329d53067838e2208051f3a54926f8cb46a7753b1a3" => :catalina - sha256 "243d34cb232ae0f7b45d7e2973c247ae68a57d8a4c50a2ee9e2bc7aeeabe5c78" => :mojave - sha256 "4b5021649d047cbd556387ca6a8bd535cd8f9129be0a48f2d21bde8fb957a3b1" => :high_sierra - end - - head do - url "https://gitlab.xiph.org/xiph/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 cbd7a4d1c49c8..0000000000000 --- a/Formula/thors-serializer.rb +++ /dev/null @@ -1,64 +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.15.1", - :revision => "89ee7d6ae390547054c2c8603d8654dbfeff85e4" - - bottle do - cellar :any - sha256 "1b97ecce2308db268a651067bc2d307d88cc8480358bc1cc0386ecac4fbd32fb" => :catalina - sha256 "35a422d8c4751f89850c0043a7339220eb6684959c7183551f76d2a977946b5c" => :mojave - sha256 "df5bfe38925f7bf7abdd136a55079e024a641e79ebb6fdf76cf89dd40fd8445f" => :high_sierra - end - - depends_on "libyaml" - - def install - ENV["COV"] = "gcov" - - system "./configure", "--disable-binary", - "--disable-vera", - "--prefix=#{prefix}" - system "make" - 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 263505e7ce31f..0000000000000 --- a/Formula/thrift.rb +++ /dev/null @@ -1,77 +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.lua?path=thrift/0.13.0/thrift-0.13.0.tar.gz" - mirror "https://archive.apache.org/dist/thrift/0.13.0/thrift-0.13.0.tar.gz" - sha256 "7ad348b88033af46ce49148097afe354d513c1fca7c607b59c33ebb6064b5179" - license "Apache-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "9fff4084e59bf612da35f7e731c82f5a1d714aec8ba860a2521c0ca1d73731d4" => :catalina - sha256 "840fbc8db938bc1b8e50d16f733bcd22a8918efee276cbf969fc79f779380b5d" => :mojave - sha256 "bec0a20279bf36bcd960c71b9e417e41a53479e8a575034bef426994e7ecc546" => :high_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 - - depends_on "bison" => :build - depends_on "boost" => [:build, :test] - depends_on "openssl@1.1" - - def install - system "./bootstrap.sh" unless build.stable? - - args = %W[ - --disable-debug - --disable-tests - --prefix=#{prefix} - --libdir=#{lib} - --with-openssl=#{Formula["openssl@1.1"].opt_prefix} - --without-erlang - --without-haskell - --without-java - --without-perl - --without-php - --without-php_extension - --without-python - --without-ruby - --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 <<~'EOS' - service MultiplicationService { - i32 multiply(1:i32 x, 2:i32 y), - } - EOS - - 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/thrift@0.9.rb b/Formula/thrift@0.9.rb deleted file mode 100644 index a0444abc07e41..0000000000000 --- a/Formula/thrift@0.9.rb +++ /dev/null @@ -1,73 +0,0 @@ -class ThriftAT09 < Formula - desc "Framework for scalable cross-language services development" - homepage "https://thrift.apache.org/" - url "https://github.com/apache/thrift/archive/0.9.3.1.tar.gz" - sha256 "1f7ca02d88a603f2845b2c7abcab74f8107dd7285056284d65241eb7965e143c" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "bebef37eaa3671d2810eaaf9f06b7c6cf73ef56f83b8359de514643cd201b946" => :catalina - sha256 "9c4f0de40a613a30dce7b032425a66d0f5392680d6af39f9944e8982bd7d16d4" => :mojave - sha256 "a85aabc6f3c1d496f618c41e1ca367d2e8c730d9fd543f5b2a74af2760a1869a" => :high_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@1.1" - - # Fix CRYPTO_num_locks compile error - patch do - url "https://github.com/apache/thrift/commit/4bbfe6120e71b81df7f23dcc246990c29eb27859.patch?full_index=1" - sha256 "23b29d50cd606b88863153ec8ae1c7b3e1ef0fceca7ec59088b8135f40b99ce6" - end - - # Fix compile when SSLv3 is disabled (OpenSSL 1.1) - patch do - url "https://github.com/apache/thrift/commit/b819260c653f6fd9602419ee2541060ecb930c4c.patch?full_index=1" - sha256 "5934555674b67fb7a9fad04ffe0bd46fdbe3eca5e8f98dd072efa4bb342c9bfa" - end - - 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 ENV.compiler == :clang - - # Don't install extensions to /usr - ENV["JAVA_PREFIX"] = pkgshare/"java" - - # 0.9.3.1 shipped with a syntax error... - inreplace "configure.ac", "if test \"$have_cpp\" = \"yes\" ; then\nAC_TYPE_INT16_T", - "AC_TYPE_INT16_T" - - # We need to regenerate the configure script since it doesn't have all the changes. - system "./bootstrap.sh" - - 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 36482d9642ef9..0000000000000 --- a/Formula/thrulay.rb +++ /dev/null @@ -1,24 +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 "fa6da453412e97cf222c12f7c2aaa7ef3e2db5d58dc98538c364b377ece63c62" => :catalina - 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 59276892b3da6..0000000000000 --- a/Formula/tidy-html5.rb +++ /dev/null @@ -1,31 +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 "fb2134180fbdb92cc10f3fad33c769073adceb7796e465db7dbc3778f7d3547a" => :catalina - 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 3db2b15213b06..0000000000000 --- a/Formula/tidyp.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Tidyp < Formula - desc "Validate and modify HTML" - homepage "https://github.com/petdance/tidyp" - url "https://github.com/downloads/petdance/tidyp/tidyp-1.04.tar.gz" - sha256 "20b0fad32c63575bd4685ed09b8c5ca222bbc7b15284210d4b576d0223f0b338" - - bottle do - cellar :any - sha256 "ed67353f58e09c04387453c92536d7980c3408391bae0db77f3af421779cee57" => :catalina - sha256 "234868d17b7ca6e890d0adc4e339e2a35c81b3c72f0fd8487d1d3352b03fddc5" => :mojave - sha256 "52ef5e1d78ef5a3404e2345683fc03a61b0fad8084b74508473a042b1858b54c" => :high_sierra - sha256 "6b5b65c1476004cc973fff0992dfaf77887b5a5df583ac31fc22665d250b538a" => :sierra - sha256 "5274bb4cd33d9c15d8c73dbe4cfb54e686da29cd29093adba549024fe520b82c" => :el_capitan - sha256 "710962782d909bf11987f8b147d7e141ccba48643ab2db02c7f267d6cf871dd9" => :yosemite - sha256 "7501f78d5f8e549fec7f689cd24aafa716e2097744ec78359d8092183469e4c8" => :mavericks - end - - uses_from_macos "libxslt" => :build - - 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 f433f173d83f9..0000000000000 --- a/Formula/tiff2png.rb +++ /dev/null @@ -1,30 +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 "7589c830ef81bd43dd0bd3d1ba65483965701dfff8f7c4d8760951f0cf47c378" => :catalina - 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 e6d977f02bd56..0000000000000 --- a/Formula/tig.rb +++ /dev/null @@ -1,51 +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.5.1/tig-2.5.1.tar.gz" - sha256 "500d5d34524f6b856edd5cae01f1404d14f3b51a9a53fd7357f4cebb3d4c9e64" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "e3dd84d1883ca04013d72311c248f623a3e55fa8fa31456f5fe956ae19ccd4de" => :catalina - sha256 "0fbc0ae28aed58f73b1e798cbe75c8d131762c91371bd00e5a257c3a6fda7f85" => :mojave - sha256 "9f6983f67cbbe6d551c8ab39131ca1e91e9f3e57ffe1f1791e6c182fd017fbf8" => :high_sierra - 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 aec5d7a954057..0000000000000 --- a/Formula/tiger-vnc.rb +++ /dev/null @@ -1,36 +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.10.1.tar.gz" - sha256 "19fcc80d7d35dd58115262e53cac87d8903180261d94c2a6b0c19224f50b58c4" - license "GPL-2.0" - - bottle do - sha256 "c8dbfcd58649b918a6929d550d20237b8b19e32cbd27b8854e3780beb1eea22f" => :catalina - sha256 "adc432e2afc2a1896802ab884bf1a5c8c6d8a54123190a4e5448f5d6f3e220a4" => :mojave - sha256 "5601b259800423214cf921d139a1516fec0f25102a840013fdad3a794a62b5e2" => :high_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 50d80a31ea38a..0000000000000 --- a/Formula/tika.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Tika < Formula - desc "Content analysis toolkit" - homepage "https://tika.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=tika/tika-app-1.24.1.jar" - mirror "https://archive.apache.org/dist/tika/tika-app-1.24.1.jar" - sha256 "e56d2e38be4755c78b511f316bda2a55af5c3b3b36e7e5536d3584c71239b187" - - bottle :unneeded - - depends_on "openjdk" - - resource "server" do - url "https://www.apache.org/dyn/closer.lua?path=tika/tika-server-1.24.1.jar" - mirror "https://archive.apache.org/dist/tika/tika-server-1.24.1.jar" - sha256 "466ae64b3f6fa52fe08bfa2b0339671e69988e84fd8bb0a359d345ff0ae024a3" - end - - def install - libexec.install "tika-app-#{version}.jar" - (bin/"tika").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/tika-app-#{version}.jar" "$@" - EOS - - libexec.install resource("server") - (bin/"tika-rest-server").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/tika-server-#{version}.jar" "$@" - EOS - 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 7b738fd69664f..0000000000000 --- a/Formula/tile38.rb +++ /dev/null @@ -1,93 +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.git", - :tag => "1.21.1", - :revision => "c1ba2d86aa5c99532f08c368376077646ec742b0" - license "MIT" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d02b792146bd1954f8e3e55f4721e26b714fec93056e5f825867db8380318974" => :catalina - sha256 "09e8e25b464ff65e49b35dcb21b88de28396a47a22e416a814b6d05548c34580" => :mojave - sha256 "d63bb31ee2f614610d6164f50c9ff351959bb7dd25b33902dd76f97655a67203" => :high_sierra - end - - depends_on "go" => :build - - def datadir - var/"tile38/data" - end - - def install - commit = Utils.safe_popen_read("git", "rev-parse", "--short", "HEAD").chomp - - ldflags = %W[ - -s -w - -X github.com/tidwall/tile38/core.Version=#{version} - -X github.com/tidwall/tile38/core.GitSHA=#{commit} - ] - - system "go", "build", "-o", bin/"tile38-server", "-ldflags", ldflags.join(" "), "./cmd/tile38-server" - system "go", "build", "-o", bin/"tile38-cli", "-ldflags", ldflags.join(" "), "./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 - - 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 - pid = fork do - exec "#{bin}/tile38-server", "-q" - end - sleep 2 - # remove `$408` in the first line output - json_output = shell_output("#{bin}/tile38-cli server").lines[1] - tile38_server = JSON.parse(json_output) - assert_equal tile38_server["ok"], true - ensure - Process.kill("HUP", pid) - end -end diff --git a/Formula/timedog.rb b/Formula/timedog.rb deleted file mode 100644 index 36c853434a123..0000000000000 --- a/Formula/timedog.rb +++ /dev/null @@ -1,18 +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" - license "GPL-2.0" - 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 2804bb0661e3e..0000000000000 --- a/Formula/timelimit.rb +++ /dev/null @@ -1,34 +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 "5a4d896430260125864a8b8e22aabf172e36c8f8942faece7db8d502c568a690" => :catalina - 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 90cbd92f95169..0000000000000 --- a/Formula/timewarrior.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Timewarrior < Formula - desc "Command-line time tracking application" - homepage "https://timewarrior.net/" - url "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v1.3.0/timew-1.3.0.tar.gz" - sha256 "1f3b9166a96637d3c098a7cfcff74ca61c41f13e2ca21f6c7ad6dd54cc74ac70" - head "https://github.com/GothenburgBitFactory/timewarrior.git" - - bottle do - cellar :any_skip_relocation - sha256 "b31a1b3ffe25ae8e006e172a228a6c02b749fc0a121957b076a2ed0125ad434e" => :catalina - sha256 "b09c7933fd20dae4a309a6cf278b63ff6317944e2298a3dd290acbb62dc87fb6" => :mojave - sha256 "6a4ec380d1c382da7e67bed6072ebe20365a72a1f098e62e25d4840488e5718c" => :high_sierra - 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 a88e3cbf511ee..0000000000000 --- a/Formula/timidity.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Timidity < Formula - desc "Software synthesizer" - homepage "https://timidity.sourceforge.io/" - url "https://downloads.sourceforge.net/project/timidity/TiMidity++/TiMidity++-2.15.0/TiMidity++-2.15.0.tar.bz2" - sha256 "161fc0395af16b51f7117ad007c3e434c825a308fa29ad44b626ee8f9bb1c8f5" - revision 1 - - bottle do - sha256 "4ebc752f9ca4fcfa88ade5f6806037678d855d97470adb5507c1290527fe6260" => :catalina - sha256 "2cae56b69dc38af0de2d80816539ac5d6c78da535d20d63a2103dcf907ec9b80" => :mojave - sha256 "563d4ffe26aff2b7b4453d5cb159cc596bae4f804cc977978cb01856184ed9c7" => :high_sierra - 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-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 78e66c40cead9..0000000000000 --- a/Formula/tin.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Tin < Formula - desc "Threaded, NNTP-, and spool-based UseNet newsreader" - homepage "http://www.tin.org/" - url "https://www.nic.funet.fi/pub/unix/news/tin/v2.4/tin-2.4.4.tar.xz" - sha256 "9ff12cecf6005be4d150a26403cb736668bcedbc97fe7d6e6846559ea490ff02" - - bottle do - sha256 "78c9d679c6669f6e9579c1de58e1769f8d5fdf0de54664aaeba49888811d33a5" => :catalina - sha256 "2fb85a878a4930f0d48a35fd3628621d5d0f3009d8283066ddfdc17a950153b8" => :mojave - sha256 "89b38a18627bac3b16f2c947350ce3e438793603d04b30fc09bea916f85cbd49" => :high_sierra - end - - depends_on "gettext" - - 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 4228457c6946a..0000000000000 --- a/Formula/tinc.rb +++ /dev/null @@ -1,29 +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.36.tar.gz" - sha256 "40f73bb3facc480effe0e771442a706ff0488edea7a5f2505d4ccb2aa8163108" - - bottle do - cellar :any - sha256 "fcaaca6b5abf4f30a55149f41871a7c4ec99fe8a9dc87ddb68ea735c03569a66" => :catalina - sha256 "ba34dc41517f617c4d61d61e2f76cbafd9b75aa5edacc894e5b24e97cfb269f5" => :mojave - sha256 "a5ec2ae5f1e6252f80f33158bb0a1140e29764ed1f2e8754dcedf50e4fb49290" => :high_sierra - sha256 "923b15d1dcd7aafbb566f83edc9cced61b13379e857243bbe28b2755270b542d" => :sierra - end - - depends_on "lzo" - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}", - "--with-openssl=#{Formula["openssl@1.1"].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 29aa2489fa132..0000000000000 --- a/Formula/tintin.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Tintin < Formula - desc "MUD client" - homepage "https://tintin.mudhalla.net/" - url "https://github.com/scandum/tintin/releases/download/2.02.03/tintin-2.02.03.tar.gz" - sha256 "e44c88b1c97283525062ce15efdddebf5067e84ea37491903bcd8c8824f26f79" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "5655e2bfaf4fb9932f2b9317745f97b73162bd12d926a8fd9783002449d8ed3a" => :catalina - sha256 "b10d78dd09e94adac5f9a4aaeddc756b7ee578e9a77ef9f81f8c4f1941f90c3c" => :mojave - sha256 "9f4a88c8da68bde84fc56b34ef86b53e1691d33a59e340c54aa18b50c7c88f46" => :high_sierra - 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 - assert_match version.to_s, shell_output("#{bin}/tt++ -V", 1) - end -end diff --git a/Formula/tiny-fugue.rb b/Formula/tiny-fugue.rb deleted file mode 100644 index 850102d416764..0000000000000 --- a/Formula/tiny-fugue.rb +++ /dev/null @@ -1,35 +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" - revision 2 - - bottle do - sha256 "d10777dd98ae76a048caed1179f7a65f8ee59256dcb94cfcd89ac1da0e135209" => :catalina - sha256 "ea162f2b1644a44d95a2847ec34133661008fff66306e3eda790a25f253f2165" => :mojave - sha256 "b1ddefa5c2a52f3399f5a90c0586d65e5e7ccc9940715cbe682a1a30e8dc6e76" => :high_sierra - end - - depends_on "libnet" - depends_on "openssl@1.1" - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9dc80757ba32bf5d818d70fc26bb24b6f/tiny-fugue/5.0b8.patch" - sha256 "22f660dc0c0d0691ccaaacadf2f3c47afefbdc95639e46c6b4b77a0545b6a17c" - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-getaddrinfo", - "--enable-termcap=ncurses" - system "make", "install" - end -end diff --git a/Formula/tinycdb.rb b/Formula/tinycdb.rb deleted file mode 100644 index 8cee8bb2e5d52..0000000000000 --- a/Formula/tinycdb.rb +++ /dev/null @@ -1,49 +0,0 @@ -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.78.tar.gz" - sha256 "50678f432d8ada8d69f728ec11c3140e151813a7847cf30a62d86f3a720ed63c" - - bottle do - cellar :any_skip_relocation - sha256 "9493c656d7faf05c57439f251587db9ea5bb6371031f2d08ad04f22398c72a12" => :catalina - sha256 "6ccb5ea327e61b14af89692af32c9fe6fbd9c2d04447ef92970b6f7909fba26b" => :mojave - sha256 "7b3ca0152fa89592ce48a85cca3aad67b3c1f0ad35e153a52bbb8a772540dd3d" => :high_sierra - sha256 "a1b2de0589b4530d51f33060657d5c7f08a46d1e90b60f2c2a03f499ff944a4e" => :sierra - sha256 "4f4341c31d1ed6eddce4dfa57360e339f27f37a0db5b5b6df8df46f5ccda65c2" => :el_capitan - sha256 "d73abbd1439c1579c3ab925d2110fee60f287bb9b262850e030c74f7c356bcaa" => :yosemite - sha256 "b35dda3e5219c993140f7ed6244f483b0159cbd4458fb3ee4461e25daa368d41" => :mavericks - 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 b50d0de27b91e..0000000000000 --- a/Formula/tinyproxy.rb +++ /dev/null @@ -1,87 +0,0 @@ -class Tinyproxy < Formula - desc "HTTP/HTTPS proxy for POSIX systems" - homepage "https://tinyproxy.github.io/" - url "https://github.com/tinyproxy/tinyproxy/releases/download/1.10.0/tinyproxy-1.10.0.tar.xz" - sha256 "59be87689c415ba0d9c9bc6babbdd3df3b372d60b21e526b118d722dbc995682" - license "GPL-2.0" - revision 1 - - bottle do - sha256 "e5a6e416b7f80da4a8e3af8ebaaf4e4c30d5f375845e44e72878170eeabffac0" => :catalina - 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 - 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/tinysvm.rb b/Formula/tinysvm.rb deleted file mode 100644 index a3316dcd9db17..0000000000000 --- a/Formula/tinysvm.rb +++ /dev/null @@ -1,60 +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" - license "LGPL-2.1" - - bottle do - cellar :any_skip_relocation - sha256 "5bbed1c1f653d0fde6a8e82740a18f8f0e4c95f6d06c7c14dd8dbd4ed096c758" => :catalina - sha256 "56f1afa09c931eb7e8dfaf46f1a814c1df306e4c20269ef78fddfbdf85a7251a" => :mojave - sha256 "62f0920fdf8f5b7f29cebacc1add1396daef668c67e3d10644d9d35d1b49afc5" => :high_sierra - sha256 "a6ad14c984b337bee83372ac6a29ffe7c0491180a302cfcd8f53b1a3ee6816e1" => :sierra - sha256 "2b84b75043ba1d97172e2756e3da870a8ec8e074167ab5402e7a4e1b4c923864" => :el_capitan - sha256 "ea90446332244176d4ec3bc4ff0c6175810c3a39d942f225bb55c0fb6252858d" => :yosemite - sha256 "c3464518eb4a82d123939aca024c328d885c3f14e74df31b4deed9588bb495b1" => :mavericks - 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 5748929584ef2..0000000000000 --- a/Formula/tinyxml.rb +++ /dev/null @@ -1,80 +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 "7cc1ada5d273bec9f50a1809a9989306ec9601a037c06b362cee321fbdc5c0a7" => :catalina - sha256 "c1fc1d7fa9e6934412294e921cde90bcfd107b68dbdddd9acf8cae4927190718" => :mojave - sha256 "ec0f83018a9ff93c11b6a8c92483056b2771359a14aedfb6dc46e1ab078ce9ac" => :high_sierra - sha256 "ef8c7bbbae6148e161b6f3369ede8bd3533a32847dc716000b46d26e6fb1c26c" => :sierra - sha256 "16e6052892b43e68c45f5122b6802e9bc32001dc9478dfcd89511a24544660e5" => :el_capitan - sha256 "4b1df9cb229b04f9968621a52737d96e86fcd6c2ad8904ae8a5c324347845f50" => :yosemite - sha256 "75f79bb5d502e7be74de20e1cd3e3dcdd4702b37ef7de53d9d9a546a51776b50" => :mavericks - 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/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", ".", *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 6c145d08f291c..0000000000000 --- a/Formula/tinyxml2.rb +++ /dev/null @@ -1,34 +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/8.0.0.tar.gz" - sha256 "6ce574fbb46751842d23089485ae73d3db12c1b6639cda7721bf3a7ee862012c" - license "Zlib" - head "https://github.com/leethomason/tinyxml2.git" - - bottle do - cellar :any - sha256 "de43d8d170826747b593e29cff70f84fba2e35aef5c25bec5c02c406c29bbf84" => :catalina - sha256 "65527a3b8385c01fabbaeef1ff1dc3cc301dcf5f49e0875d210d80fc5181379d" => :mojave - sha256 "eaacca900292a86dc5d4e95e2a71042a6e2fe7e766341d0b5078cf99cd25c0da" => :high_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/tio.rb b/Formula/tio.rb deleted file mode 100644 index c86f39bbe35dc..0000000000000 --- a/Formula/tio.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Tio < Formula - desc "Simple TTY terminal I/O application" - homepage "https://tio.github.io/" - url "https://github.com/tio/tio/releases/download/v1.32/tio-1.32.tar.xz" - sha256 "a8f5ed6994cacb96780baa416b19e5a6d7d67e8c162a8ea4fd9eccd64984ae44" - - bottle do - cellar :any_skip_relocation - sha256 "a630b860983adbd4c2691538739850ef934aeafcfa33c5561a00e3db2b355e88" => :catalina - sha256 "f33b4bc0d653c0f2111f0c30865395d2cadfe524f33ab1c84c843e54ec432ed9" => :mojave - sha256 "1241b11c102b527fd43225a3283290fe5488889a9e0919e7b4b536ddcb4a4d83" => :high_sierra - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-bash-completion-dir=#{bash_completion}" - system "make", "install" - 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. - assert_match /Error: Not a tty device/, shell_output("script -q /dev/null #{bin}/tio /dev/null", 1).strip - end -end diff --git a/Formula/tippecanoe.rb b/Formula/tippecanoe.rb deleted file mode 100644 index 5c16f71c7065d..0000000000000 --- a/Formula/tippecanoe.rb +++ /dev/null @@ -1,30 +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.35.0.tar.gz" - sha256 "4a31ef5ba1288eb17f9d52a7d84fef9432f13756af9d2c243d46309d6ff09488" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "7e8caa72c197b02617da5b5867ba3c67c208e59d92aba074914958274eee57e5" => :catalina - sha256 "1432b2d4ad11132cdb97dde0b77ccb3c95de1556a2852d9911e7978222fa9555" => :mojave - sha256 "a1c78f268f0e54f6856f9e6be6dd9225d2f79ef0fc6905b60d69ef53fd542828" => :high_sierra - end - - uses_from_macos "sqlite" - uses_from_macos "zlib" - - 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 68d708b3f687c..0000000000000 --- a/Formula/tivodecode.rb +++ /dev/null @@ -1,23 +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 "153d8b8e152ccf3c87041ff40739a80952da5ad06c572d7febb9b222b16069e1" => :catalina - 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 4c7f520efd434..0000000000000 --- a/Formula/tj.rb +++ /dev/null @@ -1,31 +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 "ab9e94d37b842d4d96e8a1ce0e6a87b7d5f333467662bf311f4a23a6a05d3088" => :catalina - 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 d2e0e0b044f7b..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.5/tkdiff-4-3-5.zip" - version "4.3.5" - sha256 "29d7f0b815d06b0ab6653baa9b6b7c213801ce6a976724ae843bf9735cbbde7e" - - 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 c96f41c029a22..0000000000000 --- a/Formula/tldr.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Tldr < Formula - desc "Simplified and community-driven man pages" - homepage "https://tldr.sh/" - url "https://github.com/tldr-pages/tldr-c-client/archive/v1.3.0.tar.gz" - sha256 "7e7f67f4c3cf7d448847e837df2122069b0cc8f7ed6963431e914b7929655efe" - license "MIT" - revision 2 - head "https://github.com/tldr-pages/tldr-c-client.git" - - bottle do - cellar :any - rebuild 1 - sha256 "41a6db2e28eeae00ff6d1888948d8b7d0f01cd67b3f271341b856cded07ba6ca" => :catalina - sha256 "7f10022d0c6648741457c2562bc5e521d8dd88dfc4c4d68d1c886739ffd7eb45" => :mojave - sha256 "c932bd8516b6690c45dcbf90ced6ad94d4a0aa5a366de532fe90c4ab82b9a2ad" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libzip" - - uses_from_macos "curl" - - 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/tlx.rb b/Formula/tlx.rb deleted file mode 100644 index 9ee1567f30605..0000000000000 --- a/Formula/tlx.rb +++ /dev/null @@ -1,40 +0,0 @@ -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/v0.5.20191212.tar.gz" - sha256 "5e67d3042a390dbb831b6d46437e3c7fadf738bff362aa7376b210b10ecd532d" - license "BSL-1.0" - - bottle do - cellar :any_skip_relocation - sha256 "5feb247e39d672770af736845dcf642619eaef47816252f085a855e61479b258" => :catalina - sha256 "d9306942815fa8499df14ad4e5de524acd0fb85ce3055ae344be4bce10720dfb" => :mojave - sha256 "37a9d67e4cc9a36137d339bd7ebebcc2a351ff3bff631dd0d358db03cf8a6e2a" => :high_sierra - end - - depends_on "cmake" => :build - - def install - args = std_cmake_args + [".."] - mkdir "build" do - system "cmake", ".", *args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - tlx::Aggregate agg; - for (int i = 0; i < 30; ++i) { - agg.add(i); - } - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-L#{lib}", "-ltlx", "-o", "test", "-std=c++17" - system "./test" - end -end diff --git a/Formula/tmate.rb b/Formula/tmate.rb deleted file mode 100644 index c97551ac0b0bd..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.4.0.tar.gz" - sha256 "62b61eb12ab394012c861f6b48ba0bc04ac8765abca13bdde5a4d9105cb16138" - head "https://github.com/tmate-io/tmate.git" - - bottle do - cellar :any - sha256 "a278bcb401068bed2434ec48bfb059a86d793a6daa4877574ac0ed7168cb1ebc" => :catalina - sha256 "7e5158460b898422b4c6e84390d0e8446e2ad52789a30f9942288c5c32acc8a1" => :mojave - sha256 "0f4f06d0ab7715adc7f6d33cf7d3c08fd057e7f038a666b360ac4ad6a3449ad9" => :high_sierra - 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" - - uses_from_macos "ncurses" - - 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 d0489c7621598..0000000000000 --- a/Formula/tmpreaper.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Tmpreaper < Formula - desc "Clean up files in directories based on their age" - homepage "https://packages.debian.org/sid/tmpreaper" - url "https://deb.debian.org/debian/pool/main/t/tmpreaper/tmpreaper_1.6.14.tar.gz" - sha256 "4acb93745ceb8b8c5941313bbba78ceb2af0c3914f1afea0e0ae1f7950d6bdae" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ff2c0c053d3e9ac8c9d46750bfc6ba417b8ab2bbd9d10def4463ab4a14724b4c" => :catalina - sha256 "023f17c260582b8cfd5c1cfc7ad647c290e210cf63c393dfffe7413509ff39ff" => :mojave - sha256 "0c65319f2d3cf6a71e13a18fddfc1112f343db3877ad8f3d760bf1731a49cc50" => :high_sierra - sha256 "c91992d1bd2100c8519f08f169096b71547b41d476f229a76b6d002c9d9d046a" => :sierra - 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 666c1970051a7..0000000000000 --- a/Formula/tmpwatch.rb +++ /dev/null @@ -1,31 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d2e77af7339bd09c9b7352a1646c79e15db6b43c27537b4af59efbc51e23f114" => :catalina - sha256 "4f7b1e540daebe79e1ad64b2e4e4b7214074c05150dcd9de7a5ffe9c12e6b9bb" => :mojave - sha256 "24a734b4cf32ce5720e1c089060fa66dcc2d9dde437804a4dc147f81d9cd8512" => :high_sierra - 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-mem-cpu-load.rb b/Formula/tmux-mem-cpu-load.rb deleted file mode 100644 index c2c28ae5e95a5..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" - license "Apache-2.0" - head "https://github.com/thewtex/tmux-mem-cpu-load.git" - - bottle do - cellar :any_skip_relocation - sha256 "5006666230be68b50c097cdb4ce12e20c37ae565cb1de9163861918d42910834" => :catalina - 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 - - 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 18697903d052c..0000000000000 --- a/Formula/tmux-xpanes.rb +++ /dev/null @@ -1,23 +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/v4.1.2.tar.gz" - sha256 "390c6878d2a6e521f0ea323dca3c1ee175f246eda178214de3232a30881d32a5" - license "MIT" - - 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 1e858524960ae..0000000000000 --- a/Formula/tmux.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Tmux < Formula - desc "Terminal multiplexer" - homepage "https://tmux.github.io/" - url "https://github.com/tmux/tmux/releases/download/3.1b/tmux-3.1b.tar.gz" - sha256 "d93f351d50af05a75fe6681085670c786d9504a5da2608e481c47cf5e1486db9" - - bottle do - cellar :any - rebuild 1 - sha256 "785c1b2e2518478621eb5ac894b3f0ed06d8fdc4d223dd476451ab26974e3803" => :catalina - sha256 "a8fb2df02c2e094404b6c56e2b9d15a35abd012913771ad311e08cc3572f0e4b" => :mojave - sha256 "5d43e03fc71740ec38c98b309adb2b6d198a20fcb14f76bc163232fda61fac23" => :high_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 "ncurses" - - # Old versions of macOS libc disagree with utf8proc character widths. - # https://github.com/tmux/tmux/issues/2223 - depends_on "utf8proc" if MacOS.version >= :high_sierra - - 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 MacOS.version >= :high_sierra - - 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 7bbe33ee968da..0000000000000 --- a/Formula/tmuxinator-completion.rb +++ /dev/null @@ -1,23 +0,0 @@ -class TmuxinatorCompletion < Formula - desc "Shell completion for Tmuxinator" - homepage "https://github.com/tmuxinator/tmuxinator" - url "https://github.com/tmuxinator/tmuxinator/archive/v2.0.1.tar.gz" - sha256 "a2c8428d239a6e869da516cecee3ac64db47ba1f1932317eb397b1afd698ee09" - license "MIT" - head "https://github.com/tmuxinator/tmuxinator.git" - - bottle :unneeded - - conflicts_with "tmuxinator", :because => "the tmuxinator formula includes completion" - - 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/tmuxinator.rb b/Formula/tmuxinator.rb deleted file mode 100644 index 0bc0dfb9c7eeb..0000000000000 --- a/Formula/tmuxinator.rb +++ /dev/null @@ -1,78 +0,0 @@ -class Tmuxinator < Formula - desc "Manage complex tmux sessions easily" - homepage "https://github.com/tmuxinator/tmuxinator" - url "https://github.com/tmuxinator/tmuxinator/archive/v2.0.1.tar.gz" - sha256 "a2c8428d239a6e869da516cecee3ac64db47ba1f1932317eb397b1afd698ee09" - license "MIT" - head "https://github.com/tmuxinator/tmuxinator.git" - - bottle do - cellar :any_skip_relocation - sha256 "fcc792f9e1fabe3929f4d2a0b88122d29c429eab0d6434ec6ed0cddbceb14fdb" => :catalina - sha256 "d18e3a7480fa572c8945a6b029a0dd5015556c701c39cfcb1e697eeb6d89e364" => :mojave - sha256 "62fc87ed0bd20aac6a3d3867ba999358daf7e0a1316996187a9e1961a39c7a2a" => :high_sierra - end - - depends_on "ruby" - depends_on "tmux" - - conflicts_with "tmuxinator-completion", :because => "the tmuxinator formula includes completion" - - resource "erubis" do - url "https://rubygems.org/downloads/erubis-2.7.0.gem" - sha256 "63653f5174a7997f6f1d6f465fbe1494dcc4bdab1fb8e635f6216989fb1148ba" - end - - resource "thor" do - url "https://rubygems.org/downloads/thor-1.0.1.gem" - sha256 "7572061e3cbe6feee57828670e6a25a66dd397f05c1f8515d49f770a7d9d70f5" - end - - resource "xdg" do - url "https://rubygems.org/downloads/xdg-2.2.5.gem" - sha256 "f3a5f799363852695e457bb7379ac6c4e3e8cb3a51ce6b449ab47fbb1523b913" - 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"]) - - bash_completion.install "completion/tmuxinator.bash" => "tmuxinator" - zsh_completion.install "completion/tmuxinator.zsh" => "_tmuxinator" - fish_completion.install Dir["completion/*.fish"] - end - - test do - version_output = shell_output("#{bin}/tmuxinator version") - assert_match "tmuxinator #{version}", version_output - - completion = shell_output("source #{bash_completion}/tmuxinator && complete -p tmuxinator") - assert_match "-F _tmuxinator", completion - - commands = shell_output("#{bin}/tmuxinator commands") - commands_list = %w[ - commands completions new edit open start - stop local debug copy delete implode - version doctor list - ] - - 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/tmx.rb b/Formula/tmx.rb deleted file mode 100644 index 05e05e87112fe..0000000000000 --- a/Formula/tmx.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Tmx < Formula - desc "Portable C library to load tiled maps in your games" - homepage "https://github.com/baylej/tmx" - url "https://github.com/baylej/tmx/archive/tmx_1.1.0.tar.gz" - sha256 "79a9a72fea3c512969e8262a6abbb5886ad39eefe2762b3554f7538c59be6b74" - license "BSD-2-Clause" - - bottle do - cellar :any - sha256 "e751f5545befe34c2e3b531c6c1adb6b256539ed613c1cd4bd3c44be05d5a3a3" => :catalina - sha256 "20b8c3c1335eb81aace022bbf1086faaaff0aa5aa4e6d6f8858ec62a834e702a" => :mojave - sha256 "71310fb31b83e16bd21269c8a4c7f396f8e47eda535ede4fc01b61108867c9a6" => :high_sierra - end - - depends_on "cmake" => :build - - uses_from_macos "libxml2" - - def install - system "cmake", ".", "-DBUILD_SHARED_LIBS=on", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.tmx").write <<-EOS - - - - - - - - - - eJy9lN0OgCAIRjX/6v1fuLXZxr7BB9bq4twochioLaVUfqAB11qfyLisYK1nOFsnReztYr8bTsvP9vJ0Yfyq7yno6x/7iuF7mucQRH3WeZYL96y4TZmfVyeueTV4Pq8fXq+YM+Ibk0g9GIv1sX56OTTnGx/mqwTWd80X6T3+ffgPRubNfOjEv0DC3suKTzoHYfV+RtgJlkd7f7fTm4OWi6GdZXNn93H1rqLzBIoiCFE= - - - - - EOS - (testpath/"test.c").write <<-EOS - #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; - } - EOS - system ENV.cc, "test.c", "#{lib}/libtmx.dylib", "-lz", "-lxml2", "-o", "test" - system "./test" - end -end diff --git a/Formula/tnef.rb b/Formula/tnef.rb deleted file mode 100644 index c8e357241b565..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.18.tar.gz" - sha256 "fa56dd08649f51b173017911cae277dc4b2c98211721c2a60708bf1d28839922" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ff92eb820b2efae9e87e42491a590601f400160f27ea2804b176b02b1648be66" => :catalina - sha256 "2700f31ebcc1e2ba9219d6b6ac040846eba21ccc25baca4fea8b7d630b6673d2" => :mojave - sha256 "842ba6bbe666302bd39c1cf7d29caa7d5180c20757b8dfe91b99d3fe1d3da841" => :high_sierra - 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 23f6a54adbf14..0000000000000 --- a/Formula/tnftp.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Tnftp < Formula - desc "NetBSD's FTP client" - homepage "https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/" - url "https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/tnftp-20200705.tar.gz" - sha256 "ba4a92b693d04179664524eef0801c8eed4447941c9855f377f98f119f221c03" - - bottle do - cellar :any_skip_relocation - sha256 "1411f5fe465b0952891ff141431a5d09140c7d53bb3cf689054a2580bd1031fc" => :catalina - sha256 "ae4beaa65c5f258152fefeeaa196c9e2d70cf3bda2af4e387ddcf807476c7401" => :mojave - sha256 "900f2ece9b7a6a9edd0d96dc6c061ef6380c0fc99177119e73db65e5d8c012e0" => :high_sierra - end - - uses_from_macos "bison" => :build - uses_from_macos "ncurses" - - conflicts_with "inetutils", :because => "both install `ftp' binaries" - - def install - system "./configure", "--prefix=#{prefix}" - system "make", "all" - - bin.install "src/tnftp" => "ftp" - man1.install "src/ftp.1" - prefix.install_metafiles - 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 749b288d8eb1a..0000000000000 --- a/Formula/tnftpd.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Tnftpd < Formula - desc "NetBSD's FTP server" - homepage "https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/" - url "https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/tnftpd-20200704.tar.gz" - sha256 "92de915e1b4b7e4bd403daac5d89ce67fa73e49e8dda18e230fa86ee98e26ab7" - - bottle do - cellar :any_skip_relocation - sha256 "cbc7f23e857584e25c7d2d043a3971841febe99f12830d82cf28fe47a2e9e254" => :catalina - sha256 "3e8848729081c09a247e0326ede175db12111360905f69cc339dea3ba0213e62" => :mojave - sha256 "18a15c1572f7f5b33b7678d9a322de20efcd0c1b1c5c98d8cb00e13a80bfa518" => :high_sierra - end - - 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" - prefix.install_metafiles - 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/toast.rb b/Formula/toast.rb deleted file mode 100644 index fc767f402dc72..0000000000000 --- a/Formula/toast.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Toast < Formula - desc "Tool for running tasks in containers" - homepage "https://github.com/stepchowfun/toast" - url "https://github.com/stepchowfun/toast/archive/v0.31.0.tar.gz" - sha256 "03f766763314fd2930820a0bed8fdc3d4405a40408e9c7b74c320bf453a35a5e" - - bottle do - cellar :any_skip_relocation - sha256 "1a941a71fbbab8e21f41756a0d3b63e6e3ee859547cc4a99c3042cdc4485d6dd" => :catalina - sha256 "23905ffe680fe8babd9650b0cc306ddec5ec279adfc36a41add793d571e49d8a" => :mojave - sha256 "b02f8e3bd163f086ff3575917b9b775f61027b3ee5436de836d90f39a1f2f9c3" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - (testpath/"toast.yml").write <<~EOS - image: alpine - tasks: - homebrew_test: - command: echo hello - EOS - - assert_match "homebrew_test", shell_output("#{bin}/toast --list") - end -end diff --git a/Formula/todo-txt.rb b/Formula/todo-txt.rb deleted file mode 100644 index 6486b37b22144..0000000000000 --- a/Formula/todo-txt.rb +++ /dev/null @@ -1,30 +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" - license "GPL-3.0" - 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/todoman.rb b/Formula/todoman.rb deleted file mode 100644 index 213099287c487..0000000000000 --- a/Formula/todoman.rb +++ /dev/null @@ -1,103 +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/08/b2/eabf212b6279f4e9d3ea215b76f9475e94e777820655f98ca4ce0d036acc/todoman-3.8.0.tar.gz" - sha256 "8bdbefa8b190c19cc01a57396ce9d0264ee10ec8ce96703fb72d69b8867107ab" - license "ISC" - head "https://github.com/pimutils/todoman.git" - - bottle do - cellar :any_skip_relocation - sha256 "83d07e2585542b259ca6924cefa286dcee686ea03e4890ef3e5d834a1b7e7879" => :catalina - sha256 "1b136f162af604d40c4155bf060dadd8ec2ddd90b0b094f5241a325cd4cc6e5f" => :mojave - sha256 "e22d61bf9b21f362883d704c952fb54b4b1d37ecb12ba0227a6fb9bd17c120ed" => :high_sierra - end - - depends_on "python@3.8" - - conflicts_with "devtodo", :because => "both install a `todo` binary" - - resource "atomicwrites" do - url "https://files.pythonhosted.org/packages/55/8d/74a75635f2c3c914ab5b3850112fd4b0c8039975ecb320e4449aa363ba54/atomicwrites-1.4.0.tar.gz" - sha256 "ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a" - 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/22/44/3d73579b547f0790a2723728088c96189c8b52bd2ee3c3de8040efc3c1b8/click-log-0.3.2.tar.gz" - sha256 "16fd1ca3fc6b16c98cea63acf1ab474ea8e676849dc669d86afafb0ed7003124" - 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/ca/93575e1d884cc33d20843c62449ea55bbdb792fe7156fc53009758a5aa2b/humanize-2.4.0.tar.gz" - sha256 "42ae7d54b398c01bd100847f6cb0fc9e381c21be8ad3f8e2929135e48dbff026" - end - - resource "icalendar" do - url "https://files.pythonhosted.org/packages/e4/dd/67c363b99c4384c66bcf94c1abf9b749dd4e809a44bd6db575ec8e22be89/icalendar-4.0.6.tar.gz" - sha256 "7e6fe7232622abe32d8f54d0936ffcd5a9087198a4c2f1ec1803a7dd9fdd979f" - 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/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - 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/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "tabulate" do - url "https://files.pythonhosted.org/packages/57/6f/213d075ad03c84991d44e63b6516dd7d185091df5e1d02a660874f8f7e1e/tabulate-0.8.7.tar.gz" - sha256 "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/45/dd/d57924f77b0914f8a61c81222647888fbb583f89168a376ffeb5613b02a6/urwid-2.1.0.tar.gz" - sha256 "0896f36060beb6bf3801cb554303fef336a79661401797551ba106d23ab4cd86" - 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 05cbad5ffc932..0000000000000 --- a/Formula/tofrodos.rb +++ /dev/null @@ -1,27 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "da493ab6311aa1363533c8958c93ab919bee5ba26dbdcfa6f0a5978a6e512d9d" => :catalina - 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 cfcb90c6a77da..0000000000000 --- a/Formula/toilet.rb +++ /dev/null @@ -1,38 +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://deb.debian.org/debian/pool/main/t/toilet/toilet_0.3.orig.tar.gz" - sha256 "89d4b530c394313cc3f3a4e07a7394fa82a6091f44df44dfcd0ebcb3300a81de" - license "WTFPL" - bottle do - sha256 "816162aa8f967f14e6db8f9b48024ef5119c04955575299e02fe88b2b0158ac6" => :catalina - sha256 "27c9e1fe38ec012c5dd9199c8100d49c56e386c65c336a4fbcaaa25a9341cab2" => :mojave - sha256 "dda87a313d7398dd3157ca74d752b3d364647fc56c3238fb5bd320fcc904ebd5" => :high_sierra - sha256 "24008d251358aa73e7e597b203e360857fec5b88278e6ea6de08d4eef3865f80" => :sierra - sha256 "93822fde3d2e69f46143dcb9d8551e7e4301c7a470ae53b3fda8ec6cb44584dd" => :el_capitan - sha256 "7362333eea743740a9cdb064c5a74829e37b3f15645797622bb283b9cf3f3b1a" => :yosemite - sha256 "ef2c34f742b366f84d2aeeb6d83fb94d6bd443f210e56968fb8b2b5700eab759" => :mavericks - end - - head do - url "https://github.com/cacalabs/toilet.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - end - - depends_on "pkg-config" => :build - depends_on "libcaca" - - def install - system "./bootstrap" if build.head? - 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 a9abd5f5c3055..0000000000000 --- a/Formula/tokei.rb +++ /dev/null @@ -1,32 +0,0 @@ -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/v12.0.4.tar.gz" - sha256 "031dabbe1253af53fea8258e11eeb352371b6cf0c790db573ca7be33f761c733" - - bottle do - cellar :any_skip_relocation - sha256 "c5864a5bcefee2ab0819cd07449839ab9189d04aa8ac3302c0bab85536b6c508" => :catalina - sha256 "c40027988a8081bcd64f3fb5b4905d2efbba7d55231b0084d38578c268ea924a" => :mojave - sha256 "3c2cb79394bdc792fb1880842077dabfc7b038f1126e29e66d4acba5349b0253" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", "--features", "all", *std_cargo_args - 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 a9f1c57a08034..0000000000000 --- a/Formula/tokyo-cabinet.rb +++ /dev/null @@ -1,25 +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" - license "LGPL-2.1" - - bottle do - rebuild 1 - sha256 "23694919d46c474b8c12d69d2e980d08f96f6bface62a74be7b8554de532e871" => :catalina - 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 8988d7d573f3a..0000000000000 --- a/Formula/tokyo-dystopia.rb +++ /dev/null @@ -1,39 +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" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "eb04133c9d459ee1ab9a4fe00b3f6b31621d9df2672a252784779a44a5991b77" => :catalina - sha256 "056aa0bfed85351c6296b0749dfa15a2e9471ef554796f726708438e312b5790" => :mojave - sha256 "3f00b619720603bd0712b52d01a355124604637c44cab5a3132fda942f195e2c" => :high_sierra - sha256 "0a7da80cf5e8892112986d9a51e8cd3804da2a7436b8a03b472f561b06c35890" => :sierra - sha256 "2a9e21b6f57781adb9e3dc673f2e466b817d4a00860b45fa49ded534d4cb0ed4" => :el_capitan - sha256 "6fa4ed94aace1e4c3b2a9962f31055883325255f8175c63aa08f079a4974eb6e" => :yosemite - sha256 "231960b2f9d41cc1ee48a66812b1f0fa5977613e39ddd1a62c22a46e21b3feaf" => :mavericks - 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 6c470e9fbc454..0000000000000 --- a/Formula/tomcat-native.rb +++ /dev/null @@ -1,52 +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.lua?path=tomcat/tomcat-connectors/native/1.2.24/source/tomcat-native-1.2.24-src.tar.gz" - mirror "https://archive.apache.org/dist/tomcat/tomcat-connectors/native/1.2.24/source/tomcat-native-1.2.24-src.tar.gz--sha256=037f52f9a345e766a7dde8361c55b3b69045928f9a8068a406612b603819e76c" - sha256 "037f52f9a345e766a7dde8361c55b3b69045928f9a8068a406612b603819e76c" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "072a6a73319c167f14fbb3a91d2999fb050a537e8cbde3b878c7801fa46a308a" => :catalina - sha256 "dc6b29063e1c772773c24fd042146bfe650866a7da567780ce23571ce43570b0" => :mojave - sha256 "95b418f4edbb54b7054112976e231682b88fae6535c290089fcde11353edc309" => :high_sierra - end - - depends_on "libtool" => :build - depends_on "apr" - depends_on "openjdk" - depends_on "openssl@1.1" - depends_on "tomcat" - - def install - cd "native" do - system "./configure", "--prefix=#{prefix}", - "--with-apr=#{Formula["apr"].opt_prefix}", - "--with-java-home=#{Formula["openjdk"].opt_prefix}", - "--with-ssl=#{Formula["openssl@1.1"].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}" - 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 dd507b489aefc..0000000000000 --- a/Formula/tomcat.rb +++ /dev/null @@ -1,62 +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.lua?path=tomcat/tomcat-9/v9.0.37/bin/apache-tomcat-9.0.37.tar.gz" - mirror "https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.37/bin/apache-tomcat-9.0.37.tar.gz" - sha256 "8fb4cfa459a3f027b855334fbdc7197fa5378e504853a98009281d8e149b1bc7" - - bottle :unneeded - - depends_on "openjdk" - - 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/"catalina").write_env_script "#{libexec}/bin/catalina.sh", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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@7.rb b/Formula/tomcat@7.rb deleted file mode 100644 index 23417de2e57aa..0000000000000 --- a/Formula/tomcat@7.rb +++ /dev/null @@ -1,67 +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.lua?path=tomcat/tomcat-7/v7.0.105/bin/apache-tomcat-7.0.105.tar.gz" - mirror "https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.105/bin/apache-tomcat-7.0.105.tar.gz" - sha256 "1a36882b5e25fff4f5d8c10e4029f29e43b1db96e0df03bdbed1fa913038392f" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on "openjdk" - - # 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/"catalina").write_env_script "#{libexec}/bin/catalina.sh", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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@8.rb b/Formula/tomcat@8.rb deleted file mode 100644 index 111e66d807195..0000000000000 --- a/Formula/tomcat@8.rb +++ /dev/null @@ -1,64 +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.lua?path=tomcat/tomcat-8/v8.5.57/bin/apache-tomcat-8.5.57.tar.gz" - mirror "https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.57/bin/apache-tomcat-8.5.57.tar.gz" - sha256 "2615839daf1899cd705f9b82f2df6bd21adb29a93a05afdea0a6192ce54025c4" - - bottle :unneeded - - keg_only :versioned_formula - - depends_on "openjdk" - - 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/"catalina").write_env_script "#{libexec}/bin/catalina.sh", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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 c0a4e77ec840b..0000000000000 --- a/Formula/tomee-jax-rs.rb +++ /dev/null @@ -1,40 +0,0 @@ -class TomeeJaxRs < Formula - desc "TomeEE Web Profile plus JAX-RS" - homepage "https://tomee.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=tomee/tomee-1.7.5/apache-tomee-1.7.5-jaxrs.tar.gz" - mirror "https://archive.apache.org/dist/tomee/tomee-1.7.5/apache-tomee-1.7.5-jaxrs.tar.gz" - sha256 "5c9241ca683db85c13a23234b206fe98011d734a661383bbc9027deb756c09da" - - 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-jax-rs-startup" - env = Language::Java.java_home_env("1.8") - env[:JRE_HOME] = "$(#{Language::Java.java_home_cmd("1.8")})" - (bin/"tomee-jax-rs-startup").write_env_script libexec/"tomee-jax-rs-startup", env - (bin/"tomee-jax-rs-configtest").write_env_script libexec/"bin/configtest.sh", env - 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 "#{bin}/tomee-jax-rs-configtest" - end -end diff --git a/Formula/tomee-plume.rb b/Formula/tomee-plume.rb deleted file mode 100644 index 73d3304a81f25..0000000000000 --- a/Formula/tomee-plume.rb +++ /dev/null @@ -1,34 +0,0 @@ -class TomeePlume < Formula - desc "Apache TomEE Plume" - homepage "https://tomee.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=tomee/tomee-8.0.3/apache-tomee-8.0.3-plume.tar.gz" - mirror "https://archive.apache.org/dist/tomee/tomee-8.0.3/apache-tomee-8.0.3-plume.tar.gz" - sha256 "8d08324eed84e183f35911ef35020590668ee591e43678d34d2f8545c1a78883" - - 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 1431b2456359a..0000000000000 --- a/Formula/tomee-plus.rb +++ /dev/null @@ -1,34 +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.lua?path=tomee/tomee-8.0.3/apache-tomee-8.0.3-plus.tar.gz" - mirror "https://archive.apache.org/dist/tomee/tomee-8.0.3/apache-tomee-8.0.3-plus.tar.gz" - sha256 "7b5bad40ea64a67cfb59763fb628b6611a65aa4762a1022e2a335d8a7289ffdd" - - 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 5e9ed84ac0aac..0000000000000 --- a/Formula/tomee-webprofile.rb +++ /dev/null @@ -1,34 +0,0 @@ -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-8.0.3/apache-tomee-8.0.3-webprofile.tar.gz" - mirror "https://archive.apache.org/dist/tomee/tomee-8.0.3/apache-tomee-8.0.3-webprofile.tar.gz" - sha256 "ff9921913c0a6e24514a139703db066e90d2e51c37cfde948595c7d5d5e4168b" - - 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-webprofile-startup" - 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 "#{opt_libexec}/bin/configtest.sh" - end -end diff --git a/Formula/toot.rb b/Formula/toot.rb deleted file mode 100644 index b6c47354b5062..0000000000000 --- a/Formula/toot.rb +++ /dev/null @@ -1,71 +0,0 @@ -class Toot < Formula - include Language::Python::Virtualenv - desc "Mastodon CLI & TUI" - homepage "https://toot.readthedocs.io/en/latest/index.html" - url "https://github.com/ihabunek/toot/releases/download/0.27.0/toot-0.27.0.tar.gz" - sha256 "1dfdba9acc8555fa3b4db903cbf806a639bf43c7855d324233041c655fc5cbd5" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "96f4f491b9448368e35619e8910420eba8528a61857c8114c238ed279e6cffae" => :catalina - sha256 "72ff4aa79f3b3bd508a7c76a906d5dc0901f1206ae6eb417d50638a97a4bf9b2" => :mojave - sha256 "f8e4e2f82a44d0c9f054264d2cb9e0cd01f3f25cea91d7c861689bad7814add0" => :high_sierra - end - - depends_on "python@3.8" - - resource "beautifulsoup4" do - url "https://files.pythonhosted.org/packages/c6/62/8a2bef01214eeaa5a4489eca7104e152968729512ee33cb5fbbc37a896b7/beautifulsoup4-4.9.1.tar.gz" - sha256 "73cc4d115b96f79c7d77c1c7f7a0a8d4c57860d1041df407dd1aae7f07a77fd7" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b4/19/53433f37a31543364c8676f30b291d128cdf4cd5b31b755b7890f8e89ac8/certifi-2020.4.5.2.tar.gz" - sha256 "5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1" - 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/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "soupsieve" do - url "https://files.pythonhosted.org/packages/3e/db/5ba900920642414333bdc3cb397075381d63eafc7e75c2373bbc560a9fa1/soupsieve-2.0.1.tar.gz" - sha256 "a59dc181727e95d25f781f0eb4fd1825ff45590ec8ff49eadfd7f1a537cc0232" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/45/dd/d57924f77b0914f8a61c81222647888fbb583f89168a376ffeb5613b02a6/urwid-2.1.0.tar.gz" - sha256 "0896f36060beb6bf3801cb554303fef336a79661401797551ba106d23ab4cd86" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/2e/30/268d9d3ed18439b6983a8e630cd52d81fd7460a152d6e801d1b8394e51a1/wcwidth-0.2.4.tar.gz" - sha256 "8c6b5b6ee1360b842645f336d9e5d68c55817c26d3050f46b235ef2bc650e48f" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match version.to_s, shell_output("#{bin}/toot") - assert_match "You are not logged in to any accounts", shell_output("#{bin}/toot auth") - end -end diff --git a/Formula/topgit.rb b/Formula/topgit.rb deleted file mode 100644 index 9631d6d2898e5..0000000000000 --- a/Formula/topgit.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Topgit < Formula - desc "Git patch queue manager" - homepage "https://github.com/mackyle/topgit" - url "https://github.com/mackyle/topgit/archive/topgit-0.19.12.tar.gz" - sha256 "104eaf5b33bdc738a63603c4a661aab33fc59a5b8e3bb3bc58af7e4fc2d031da" - - bottle do - cellar :any_skip_relocation - sha256 "4d9aa5c198e91f80f0fbf137e456239a8c1d65e50e6bd851f9333cf4d32d7127" => :catalina - sha256 "30c348bcfbdcfc5fe3a91b0bb8889841a5e492f2fed7626577cda1523d815dc2" => :mojave - sha256 "30c348bcfbdcfc5fe3a91b0bb8889841a5e492f2fed7626577cda1523d815dc2" => :high_sierra - sha256 "ec7f9140e122265f34c03469803cf7eb932006d240ab158cb9ee5a27f53b3b38" => :sierra - 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 d11b6adbd4e70..0000000000000 --- a/Formula/topgrade.rb +++ /dev/null @@ -1,39 +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/v5.1.0.tar.gz" - sha256 "39c667e868715a79b1904326709856ea3b1724200f471fb4d4c09b67c959a998" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "ade698b319a84f0ed4a950d6e38be44aefaf25225ee65c08a76a2b36ead02552" => :catalina - sha256 "cc8d156f801bd11d386a658275a2ad78654cec7277327b60f30306ffc98c2e2f" => :mojave - sha256 "3deb97d3ac5cb81feaca77a201b0375810e44d85fcb04828f088197acc998c77" => :high_sierra - end - - depends_on "rust" => :build - depends_on :xcode => :build if MacOS::CLT.version >= "11.4" # libxml2 module bug - - def install - system "cargo", "install", *std_cargo_args - end - - test do - # Configuraton path details: https://github.com/r-darwish/topgrade/blob/HEAD/README.md#configuration-path - # Sample config file: https://github.com/r-darwish/topgrade/blob/HEAD/config.example.toml - (testpath/"Library/Preferences/topgrade.toml").write <<~EOS - # Additional git repositories to pull - #git_repos = [ - # "~/src/*/", - # "~/.config/something" - #] - EOS - - assert_match version.to_s, shell_output("#{bin}/topgrade --version") - - 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 159306fcbcba9..0000000000000 --- a/Formula/tor.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Tor < Formula - desc "Anonymizing overlay network for TCP" - homepage "https://www.torproject.org/" - url "https://www.torproject.org/dist/tor-0.4.3.5.tar.gz" - mirror "https://www.torservers.net/mirrors/torproject.org/dist/tor-0.4.3.5.tar.gz" - sha256 "616a0e4ae688d0e151d46e3e4258565da4d443d1ddbd316db0b90910e2d5d868" - - bottle do - sha256 "1a358ca1ea1c73cbc52b0a011314954da92fed0fa8e5bffd01b3ed1f97a6fc62" => :catalina - sha256 "0f21e143f0d968ab33014e2c5ac101addb3de0cb4299722e0674eb4d29972064" => :mojave - sha256 "96465afffe32f2dbb9284406e145297f583cb8c5fdfceec3c133371975f824b0" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "libscrypt" - depends_on "openssl@1.1" - - uses_from_macos "zlib" - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --sysconfdir=#{etc} - --localstatedir=#{var} - --with-openssl-dir=#{Formula["openssl@1.1"].opt_prefix} - ] - - 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 f904ddf0e0bea..0000000000000 --- a/Formula/torrentcheck.rb +++ /dev/null @@ -1,23 +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 "b8100aac4cf74924411b389b8e2c45656d621e8ef3281b21e761188859a36f2e" => :catalina - 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 fb029c30f3cb4..0000000000000 --- a/Formula/torsocks.rb +++ /dev/null @@ -1,36 +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.3.0", - :revision => "cec4a733c081e09fb34f0aa4224ffd7b687fb310" - head "https://git.torproject.org/torsocks.git" - - bottle do - sha256 "e29d0428907ea2d5aecfbeeb70de35998082a899cc5a86b312c5b264c6ed442c" => :catalina - sha256 "a69a7a23628c4a79c216b114ccdd0bbd20b76513f5f16eaea2eab8be17473323" => :mojave - sha256 "14a21746072ddb73f7fc3157dbe41bcce90e0bcb0a3761646faf421294e3ecff" => :high_sierra - sha256 "c2eb93f0ef7d44ca1c74ccc210d0a2a3fa2a45a7ef46c7ec68f68fb4162e5905" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - # https://trac.torproject.org/projects/tor/ticket/28538 - patch do - url "https://trac.torproject.org/projects/tor/raw-attachment/ticket/28538/0001-Fix-macros-for-accept4-2.patch" - sha256 "97881f0b59b3512acc4acb58a0d6dfc840d7633ead2f400fad70dda9b2ba30b0" - end - - def install - system "./autogen.sh" - system "./configure", "--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 bbc5c6c79eb70..0000000000000 --- a/Formula/tox.rb +++ /dev/null @@ -1,105 +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/89/9b/df7a0a4ea4fbe43cb82cb196b720c7934d3998e1963ca8ff340450c8958c/tox-3.16.1.tar.gz" - sha256 "9a746cda9cadb9e1e05c7ab99f98cfcea355140d2ecac5f97520be94657c3bc7" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "217687f11315be952a5a0f031b88803af0f28e67eb8303192f698e7859e1ba09" => :catalina - sha256 "bb71e4917969db2264120b14fae1a63492ceff0732ee6554f19021dc678488e1" => :mojave - sha256 "9c74568440738a148e9784ae4bf07472e445fe339f5e5136c395d0efaaed9424" => :high_sierra - end - - depends_on "python@3.8" - - resource "appdirs" do - url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" - sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" - end - - resource "distlib" do - url "https://files.pythonhosted.org/packages/2f/83/1eba07997b8ba58d92b3e51445d5bf36f9fba9cb8166bcae99b9c3464841/distlib-0.3.1.zip" - sha256 "edf6116872c863e1aa9d5bb7cb5e05a022c519a4594dc703843343a9ddd9bff1" - end - - resource "filelock" do - url "https://files.pythonhosted.org/packages/14/ec/6ee2168387ce0154632f856d5cc5592328e9cf93127c5c9aeca92c8c16cb/filelock-3.0.12.tar.gz" - sha256 "18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/55/fd/fc1aca9cf51ed2f2c11748fa797370027babd82f87829c7a8e6dbe720145/packaging-20.4.tar.gz" - sha256 "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8" - end - - resource "pluggy" do - url "https://files.pythonhosted.org/packages/f8/04/7a8542bed4b16a65c2714bf76cf5a0b026157da7f75e87cc88774aa10b14/pluggy-0.13.1.tar.gz" - sha256 "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0" - end - - resource "py" do - url "https://files.pythonhosted.org/packages/97/a6/ab9183fe08f69a53d06ac0ee8432bc0ffbb3989c575cc69b73a0229a9a99/py-1.9.0.tar.gz" - sha256 "9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "toml" do - url "https://files.pythonhosted.org/packages/da/24/84d5c108e818ca294efe7c1ce237b42118643ce58a14d2462b3b2e3800d5/toml-0.10.1.tar.gz" - sha256 "926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f" - end - - resource "virtualenv" do - url "https://files.pythonhosted.org/packages/d2/58/6afb5bd05c610e378eb8f1188896fd0a19dfe99d84613cdb60f2ca5cf0ef/virtualenv-20.0.25.tar.gz" - sha256 "f332ba0b2dfbac9f6b1da9f11224f0036b05cdb4df23b228527c2a2d5504aeed" - 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 - ENV["LC_ALL"] = "en_US.UTF-8" - pyver = Language::Python.major_minor_version("python3.8").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 60eb1cc8b4f22..0000000000000 --- a/Formula/tpl.rb +++ /dev/null @@ -1,31 +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 "25b8a5fa1deda50c6dd07d69e96dd41e647b78b0f57f2696e5ddd056e509c71b" => :catalina - 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 6bbcb261c13a4..0000000000000 --- a/Formula/tpp.rb +++ /dev/null @@ -1,52 +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 "e2875a7547a670ff0b23af7c9c96db096c365d4ac57f4ec706d1d9453cef9076" => :catalina - 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 67422e3f57dd8..0000000000000 --- a/Formula/trace2html.rb +++ /dev/null @@ -1,21 +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" - revision 1 - - bottle :unneeded - - 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 f3f30f6a9076e..0000000000000 --- a/Formula/tracebox.rb +++ /dev/null @@ -1,45 +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" - license "GPL-2.0" - revision 2 - head "https://github.com/tracebox/tracebox.git" - - bottle do - cellar :any - sha256 "427833bcd91fe0ab0b0e05b68bd2a34043020687a57509fc034dc29088942faf" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "json-c" - depends_on "lua" - - 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 fa82e47c9906d..0000000000000 --- a/Formula/tractorgen.rb +++ /dev/null @@ -1,35 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "b28ff1c764b92992d82e16d8ab283215101f3a3aeabcf9aa2d4a952451a779dc" => :catalina - sha256 "0416b04f09a509f3912de4cac964fb96e2a54246f8ffb9d170d4f2bb16b6f959" => :mojave - sha256 "936883746158534e9650a0b26f18e680eed527fb56f71ad51e5ec203d8f7f451" => :high_sierra - sha256 "646d87ca0cb1a5ec93a8aa1ddaa1f28233347ca0a1f56e49c323809ec8295432" => :sierra - sha256 "ccac503b4577fc81e69d3e778c27c31fad9a1c5fa8627e97f293d87ab1177f8d" => :el_capitan - sha256 "e50de2fd2d9015873282a62fc7a21f3ef419d527d07eeab3830ace52ec25c3c9" => :yosemite - sha256 "acbfbe90462924fbc6f2658ca0ee591a122639356ce6ff042b558199b477bf4a" => :mavericks - 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/trader.rb b/Formula/trader.rb deleted file mode 100644 index f4484ea966599..0000000000000 --- a/Formula/trader.rb +++ /dev/null @@ -1,35 +0,0 @@ -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.14.tar.xz" - sha256 "ac9b659496facbd8d062afb4149c870e2dfcb22ba219961b724e6aa460611ee9" - - bottle do - sha256 "661f7dc5534bda2b721f00c12b868343a762d4f4b2cd8f6c869c2681b7a9c091" => :catalina - sha256 "1e78bde8014188f21cc16fdf99e52128e3e135031d447c71f1c39fa8d1135b70" => :mojave - sha256 "8175870d189ac87e617dda58fd61d4cd56109876bc5bf7fe55718ac9db137a27" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "ncurses" # The system version does not work correctly - - def install - ENV.prepend_path "PKG_CONFIG_PATH", - Formula["ncurses"].opt_libexec/"lib/pkgconfig" - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --with-libintl-prefix=#{Formula["gettext"].opt_prefix} - ] - system "./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/traefik.rb b/Formula/traefik.rb deleted file mode 100644 index 52f63f7577813..0000000000000 --- a/Formula/traefik.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Traefik < Formula - desc "Modern reverse proxy" - homepage "https://traefik.io/" - url "https://github.com/containous/traefik/releases/download/v2.2.2/traefik-v2.2.2.src.tar.gz" - version "2.2.2" - sha256 "a4446b9463767f785bee73702e063c5218fd47d1d7f5a1d1ab46c30b6865e3b6" - license "MIT" - head "https://github.com/containous/traefik.git" - - bottle do - cellar :any_skip_relocation - sha256 "54487b0d4169cc19d65158ef26777f27a0078f11238d909cde6b50ff8cd617cd" => :catalina - sha256 "2f93e7ad5d2bd2eae99921792dce69abc3271f2540cbe4bff01e1df89a6c6bcc" => :mojave - sha256 "51316f2e85a5f7362e57ce7f56662deee2def2cddc73b7084bfba358c1ae8b56" => :high_sierra - end - - depends_on "go" => :build - depends_on "go-bindata" => :build - - def install - system "go", "generate" - system "go", "build", - "-ldflags", "-s -w -X github.com/containous/traefik/v2/pkg/version.Version=#{version}", - "-trimpath", "-o", bin/"traefik", "./cmd/traefik" - prefix.install_metafiles - end - - plist_options :manual => "traefik" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/traefik - --configfile=#{etc/"traefik/traefik.toml"} - - EnvironmentVariables - - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/traefik.log - StandardOutPath - #{var}/log/traefik.log - - - EOS - end - - test do - ui_port = free_port - http_port = free_port - - (testpath/"traefik.toml").write <<~EOS - [entryPoints] - [entryPoints.http] - address = ":#{http_port}" - [entryPoints.traefik] - address = ":#{ui_port}" - [api] - insecure = true - dashboard = true - EOS - - begin - pid = fork do - exec bin/"traefik", "--configfile=#{testpath}/traefik.toml" - end - sleep 5 - cmd_ui = "curl -sIm3 -XGET http://127.0.0.1:#{http_port}/" - assert_match /404 Not Found/m, shell_output(cmd_ui) - sleep 1 - cmd_ui = "curl -sIm3 -XGET http://127.0.0.1:#{ui_port}/dashboard/" - assert_match /200 OK/m, 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/traefik@1.rb b/Formula/traefik@1.rb deleted file mode 100644 index 11b6ab91fa50d..0000000000000 --- a/Formula/traefik@1.rb +++ /dev/null @@ -1,98 +0,0 @@ -class TraefikAT1 < Formula - desc "Modern reverse proxy (v1.7)" - homepage "https://traefik.io/" - url "https://github.com/containous/traefik/releases/download/v1.7.24/traefik-v1.7.24.src.tar.gz" - version "1.7.24" - sha256 "8f9e0ba3cbb6537e47c675c806d6e6de3267241a48ea7291b19673d524f78a88" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "f50589618ba4147731cadda2451d08f95a6d56ad79f823b657ab64db73f590ed" => :catalina - sha256 "993885ac94857dd2828fdf05188326a6ebd9e8da38d5deaafbcfa4094b4738d2" => :mojave - sha256 "2c00bae6b3c468a32cdaaa59f58d33cc3de61899723a355d99cf34f0bd93c773" => :high_sierra - end - - keg_only :versioned_formula - - 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 - - cd "src/github.com/containous/traefik" do - cd "webui" do - system "yarn", "upgrade" - system "yarn", "install" - system "yarn", "run", "build" - end - system "go", "generate" - system "go", "build", "-o", bin/"traefik", "./cmd/traefik" - prefix.install_metafiles - end - end - - plist_options :manual => "traefik" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/traefik - --configfile=#{etc/"traefik/traefik.toml"} - - EnvironmentVariables - - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/traefik.log - StandardOutPath - #{var}/log/traefik.log - - - EOS - end - - test do - web_port = free_port - http_port = free_port - - (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://127.0.0.1:#{http_port}/" - assert_match /404 Not Found/m, shell_output(cmd) - sleep 1 - cmd = "curl -sIm3 -XGET http://localhost:#{web_port}/dashboard/" - assert_match /200 OK/m, shell_output(cmd) - ensure - Process.kill(9, pid) - Process.wait(pid) - end - end -end diff --git a/Formula/trafficserver.rb b/Formula/trafficserver.rb deleted file mode 100644 index 1be6444929021..0000000000000 --- a/Formula/trafficserver.rb +++ /dev/null @@ -1,79 +0,0 @@ -class Trafficserver < Formula - desc "HTTP/1.1 compliant caching proxy server" - homepage "https://trafficserver.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=trafficserver/trafficserver-8.0.8.tar.bz2" - mirror "https://archive.apache.org/dist/trafficserver/trafficserver-8.0.8.tar.bz2" - sha256 "dfe88d21897ea667d14e0813df47af78c19d5d299a5f5ab029a02e63f724ceb0" - license "Apache-2.0" - - bottle do - sha256 "e2c32121b821376d98605fec5672a8cf73fc32dbcf0943e2fa9a69927db522dd" => :catalina - sha256 "3b1b5d2b654752a6eb8026efb5fe31d69fe8be31b0def51e5a3840defc074b66" => :mojave - sha256 "77ec9fe39ba93643af26b0299d8486956c2e351c8fe2b3cad63a387decc8c93e" => :high_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@1.1" - 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 - - args = %W[ - --prefix=#{prefix} - --mandir=#{man} - --localstatedir=#{var} - --sysconfdir=#{etc}/trafficserver - --with-openssl=#{Formula["openssl@1.1"].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 bc74dc6d2bd23..0000000000000 --- a/Formula/trafshow.rb +++ /dev/null @@ -1,59 +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 "f976f69242af3e7c14acd6cc99f0f6b14c31f15793a090a9fa1b562662efbf2d" => :catalina - 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 a126706842f6a..0000000000000 --- a/Formula/traildb.rb +++ /dev/null @@ -1,69 +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" - license "MIT" - - bottle do - cellar :any - sha256 "d838c36b8e7fd566e034374e1fe05e5a2db41940229f7324fec53a2e7387db48" => :catalina - 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/trailscraper.rb b/Formula/trailscraper.rb deleted file mode 100644 index 4b1c3b6b914a2..0000000000000 --- a/Formula/trailscraper.rb +++ /dev/null @@ -1,110 +0,0 @@ -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://github.com/flosell/trailscraper/archive/0.6.1.tar.gz" - sha256 "9ca2535d397282ffc09e5ca05af19bc36dd3da02235df963c3016b9f2dc4d151" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "9d91cab0673155227938faa11a4eb961bcd13c20ffc96b013ae7873c1a5a2435" => :catalina - sha256 "19e452793c27d450ae9b010ae44bab6221e993e86c824883908fcda6007e0d90" => :mojave - sha256 "df511d725019e58f9d3e6945fe4cac6c6b54a665028ca64c337fc461397720ff" => :high_sierra - end - - depends_on "python@3.8" - - resource "boto3" do - url "https://files.pythonhosted.org/packages/29/7f/5f76466f99177245e8fc405d6604b206ef85872817bed429a846d34d12d0/boto3-1.13.19.tar.gz" - sha256 "c774003dc13d6de74b5e19d2b84d625da4456e64bd97f44baa1fcf40d808d29a" - end - - resource "botocore" do - url "https://files.pythonhosted.org/packages/94/23/dddd1e62449b0c3669632079ecb8fd4d8c3c628480b6619b57234f4aabe1/botocore-1.16.22.tar.gz" - sha256 "eb077e2da1654558c9d97888a2e0710b92cc3162a6641959545451e1a21eea8a" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" - sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" - end - - resource "dateparser" do - url "https://files.pythonhosted.org/packages/e2/da/c58ecd3b4183849b7373e6bbe140fdc0e0cc4640b960a1ddb5f550c2b283/dateparser-0.7.4.tar.gz" - sha256 "fb5bfde4795fa4b179fe05c2c25b3981f785de26bec37e247dee1079c63d5689" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "jmespath" do - url "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz" - sha256 "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - - resource "regex" do - url "https://files.pythonhosted.org/packages/14/8d/d44863d358e9dba3bdfb06099bbbeddbac8fb360773ba73250a849af4b01/regex-2020.5.14.tar.gz" - sha256 "ce450ffbfec93821ab1fea94779a8440e10cf63819be6e176eb1973a6017aff5" - end - - resource "ruamel.yaml" do - url "https://files.pythonhosted.org/packages/16/8b/54a26c1031595e5edd0e616028b922d78d8ffba8bc775f0a4faeada846cc/ruamel.yaml-0.16.10.tar.gz" - sha256 "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954" - end - - resource "ruamel.yaml.clib" do - url "https://files.pythonhosted.org/packages/92/28/612085de3fae9f82d62d80255d9f4cf05b1b341db1e180adcf28c1bf748d/ruamel.yaml.clib-0.2.0.tar.gz" - sha256 "b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c" - end - - resource "s3transfer" do - url "https://files.pythonhosted.org/packages/50/de/2b688c062107942486c81a739383b1432a72717d9a85a6a1a692f003c70c/s3transfer-0.3.3.tar.gz" - sha256 "921a37e2aefc64145e7b73d50c71bb4f26f46e4c9f414dc648c6245ff92cf7db" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "toolz" do - url "https://files.pythonhosted.org/packages/22/8e/037b9ba5c6a5739ef0dcde60578c64d49f45f64c5e5e886531bfbc39157f/toolz-0.10.0.tar.gz" - sha256 "08fdd5ef7c96480ad11c12d472de21acd32359996f69a5259299b540feba4560" - end - - resource "tzlocal" do - url "https://files.pythonhosted.org/packages/ce/73/99e4cc30db6b21cba6c3b3b80cffc472cc5a0feaf79c290f01f1ac460710/tzlocal-2.1.tar.gz" - sha256 "643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match version.to_s, shell_output("#{bin}/trailscraper --version") - - test_input = '{"Records": []}' - output = shell_output("echo '#{test_input}' | trailscraper generate") - assert_match "Statement", output - end -end diff --git a/Formula/transcrypt.rb b/Formula/transcrypt.rb deleted file mode 100644 index 299e88b09dcf1..0000000000000 --- a/Formula/transcrypt.rb +++ /dev/null @@ -1,32 +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/v2.0.0.tar.gz" - sha256 "12b891bcee50c71f5ee00c3c3e992c591ad6146ece3d3c5efa065d966a010d65" - license "MIT" - 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, - "U2FsdGVkX198ELlOY60n2ekOK1DiMCLS1dRs53RGBeU=" - end -end diff --git a/Formula/translate-shell.rb b/Formula/translate-shell.rb deleted file mode 100644 index cd026e0664eff..0000000000000 --- a/Formula/translate-shell.rb +++ /dev/null @@ -1,43 +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.12.tar.gz" - sha256 "4c4843a8c66276190535b8435775ecb5d9c8286083a33cdbe2db608eba93ca97" - license "Unlicense" - head "https://github.com/soimort/translate-shell.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "858d52386202bbcb1313a72b642d9d5f4cbfe2ca35fd9556f6cf5275d7d2b9a1" => :catalina - sha256 "858d52386202bbcb1313a72b642d9d5f4cbfe2ca35fd9556f6cf5275d7d2b9a1" => :mojave - sha256 "858d52386202bbcb1313a72b642d9d5f4cbfe2ca35fd9556f6cf5275d7d2b9a1" => :high_sierra - 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 - 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 77fb5e3e806a8..0000000000000 --- a/Formula/translate-toolkit.rb +++ /dev/null @@ -1,47 +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/3.0.0.tar.gz" - sha256 "edbd6035ca20f2edffb434fb80378f77494fdf41698f006fc93e0c4ce2eea8f2" - license "GPL-2.0" - head "https://github.com/translate/translate.git" - - bottle do - cellar :any_skip_relocation - sha256 "ea2f48f2d845370599c79250cff84803ebcf726bd31692d1c97cd2596d1e0f22" => :catalina - sha256 "247a179be9f3125d7a87bf2c6cbace25cec702b39197c7f021f0eba2730b1dfb" => :mojave - sha256 "f24e86898ef8e33d9090c369a4c9fbb235fa18307f8fda529a63b965f005c9a8" => :high_sierra - end - - depends_on "python@3.8" - - 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/f0/2a/5ba07def0e9107d935aba62cf632afbd0f7c723a98af47ccbcab753d2452/diff-match-patch-20181111.tar.gz" - sha256 "a809a996d0f09b9bbd59e9bbd0b71eed8c807922512910e05cbd3f9480712ddb" - 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 "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - def install - virtualenv_install_with_resources - end - - test do - system bin/"pretranslate", "-h" - end -end diff --git a/Formula/transmission-cli.rb b/Formula/transmission-cli.rb deleted file mode 100644 index 00d93cefe23f9..0000000000000 --- a/Formula/transmission-cli.rb +++ /dev/null @@ -1,86 +0,0 @@ -class TransmissionCli < Formula - desc "Lightweight BitTorrent client" - homepage "https://www.transmissionbt.com/" - url "https://github.com/transmission/transmission-releases/raw/d5ccf14/transmission-3.00.tar.xz" - sha256 "9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2" - - bottle do - sha256 "576f0f5017a86da149292b6da4fde251ad7a77bd9a88e82639ed4fc586cb08e7" => :catalina - sha256 "d56c90e32e206cdcf5ec8591fcb79de80c9b41483946c354fac4b9f09020c236" => :mojave - sha256 "d8ded603c8aae8b4eaf59c1c078dfdfb44b97191d4ce42439f6b02984ccf16b3" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "libevent" - depends_on "openssl@1.1" - - uses_from_macos "curl" - uses_from_macos "zlib" - - 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 c03786c0c119e..0000000000000 --- a/Formula/trash-cli.rb +++ /dev/null @@ -1,35 +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" - license "GPL-2.0" - revision 3 - head "https://github.com/andreafrancia/trash-cli.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "abef6ba69850e6dfa74ed7ed5d5a21b9c93aa45822fa7561b298e70889a6ca7f" => :catalina - sha256 "3e1575beadbf5223f948d050b792671755874ad645c852c3ce2f5c3495a5cd21" => :mojave - sha256 "14a43467042890dd35c6ae2f832a5a91c5d8b4d7fa0b731c7f9eeb9dee2d8a15" => :high_sierra - end - - depends_on "python@3.8" - - conflicts_with "macos-trash", :because => "both install a `trash` binary" - 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 9c0fbac5c34d9..0000000000000 --- a/Formula/trash.rb +++ /dev/null @@ -1,29 +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 - rebuild 1 - sha256 "b452d67cdeeb52db0aaadd258bc3e214a5ea5ed37da698b45017b01457115ea6" => :catalina - sha256 "d8ad5460b24a51a4a12b31ebf1a2887e9e86e029d061f6994c3c1caea7bf0551" => :mojave - sha256 "0ef5ea924ba8d01398686657a839ad270796f3f10eee86d6522980d32038df9a" => :high_sierra - end - - conflicts_with "macos-trash", :because => "both install a `trash` binary" - 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 3fe02dffd7818..0000000000000 --- a/Formula/travis.rb +++ /dev/null @@ -1,171 +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.9.1.tar.gz" - sha256 "efe64321ba52e1ce62e46209a70c27d7909129bd0dd7c6166657e871b149a692" - license "MIT" - - bottle do - cellar :any - sha256 "e73ded3bc90d895c4210b55d99589fd5b440e0c9fe655b9aeb923b79c061af56" => :catalina - sha256 "322f16ef370e8130d009d09da3538a779fcc9c96e642b9baf5dc65970f61a95b" => :mojave - sha256 "201f7ddbd12e090edcabc22264b0029d3063cd423301d7b82a7aeceb0107ccd0" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "ruby" - - if MacOS.version < :catalina - depends_on "libffi" - else - uses_from_macos "libffi" - end - - resource "activesupport" do - url "https://rubygems.org/gems/activesupport-5.2.4.2.gem" - sha256 "8c3ae3df5b08b49b6b5d9c5028da1a1e582f1243b7362dbb9736f65ede492378" - end - - resource "concurrent-ruby" do - url "https://rubygems.org/gems/concurrent-ruby-1.1.6.gem" - sha256 "14da21d5cfe9ccb02e9359b01cb7291e0167ded0ec805d4f3a4b2b4ffa418324" - end - - resource "i18n" do - url "https://rubygems.org/gems/i18n-1.8.2.gem" - sha256 "95cf147081cc6f1dbfb32a8f29a03afe8b0f4da6a300d37d34e0f74a6868994b" - end - - resource "minitest" do - url "https://rubygems.org/gems/minitest-5.14.0.gem" - sha256 "dfe35170edd195c3f32b43c2326a776e687f9efb330f185e43f0ca0a8be9e33c" - end - - resource "tzinfo" do - url "https://rubygems.org/gems/tzinfo-1.2.7.gem" - sha256 "3945d8a57c62a59e691d527ae4daaf562d6e07a3c0d032876c6b066e108072c4" - end - - resource "addressable" do - url "https://rubygems.org/gems/addressable-2.7.0.gem" - sha256 "5e9b62fe1239091ea9b2893cd00ffe1bcbdd9371f4e1d35fac595c98c5856cbb" - end - - resource "public_suffix" do - url "https://rubygems.org/gems/public_suffix-4.0.4.gem" - sha256 "3ff2a10253583b2780b6fb0ea643a2e877ae3bf719bd987fe5f16b550ec733d0" - end - - resource "ethon" do - url "https://rubygems.org/gems/ethon-0.12.0.gem" - sha256 "e99d3095e89f82c5a7e63d9261ddf4a21f28ae5d12a9d3abaa6920cce6cbef3d" - end - - resource "faraday" do - url "https://rubygems.org/gems/faraday-1.0.1.gem" - sha256 "381aee04fcc9effbe5fa7cc703d8f5f20293722f987ded4f958f77514cd29373" - end - - resource "faraday_middleware" do - url "https://rubygems.org/gems/faraday_middleware-1.0.0.gem" - sha256 "19e808539681bbf2e65df30dfbe27bb402bde916a1dceb4c7496dbe8de14334a" - end - - # required by typhoeus - resource "ffi" do - url "https://rubygems.org/gems/ffi-1.12.2.gem" - sha256 "048ad01d5369f67075f943c16f1058f10663af2a66eedb87d921316ba1828e82" - end - - resource "gh" do - url "https://rubygems.org/gems/gh-0.17.0.gem" - sha256 "7219a131780f2f21b7495e60e94dd5170e5ab6dc9a219f4623ca4175456d42da" - end - - resource "highline" do - url "https://rubygems.org/gems/highline-2.0.3.gem" - sha256 "2ddd5c127d4692721486f91737307236fe005352d12a4202e26c48614f719479" - end - - resource "json" do - url "https://rubygems.org/gems/json-2.3.0.gem" - sha256 "b61691fd2087ac37141b75ff4287ce2c3f17251c713e97ef73b43b4bb2e0355b" - end - - # launchy v2.5.0 requires ruby > 2.4.0 - 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.1.1.gem" - sha256 "d2dd7aa957650e0d99e0513cd388401b069f09528441b87d884609c8e94ffcfd" - 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 "thread_safe" do - url "https://rubygems.org/gems/thread_safe-0.3.6.gem" - sha256 "9ed7072821b51c57e8d6b7011a8e282e25aeea3a4065eab326e43f66f063b05a" - 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 - # gem issue on Mojave - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :mojave - - 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" - bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) - end - - test do - (testpath/".travis.yml").write <<~EOS - language: ruby - - 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-command.rb b/Formula/tre-command.rb deleted file mode 100644 index f5e74918b8e74..0000000000000 --- a/Formula/tre-command.rb +++ /dev/null @@ -1,25 +0,0 @@ -class TreCommand < Formula - desc "Tree command, improved" - homepage "https://github.com/dduan/tre" - url "https://github.com/dduan/tre/archive/v0.3.1.tar.gz" - sha256 "3d7a7784ed85dd5301f350a3d05eca839f24846997eb0a44b749467f0f4dd032" - head "https://github.com/dduan/tre.git" - - bottle do - cellar :any_skip_relocation - sha256 "eea4f9721693b8a53653493a5f23ba5c479408f93af5b523c0b1c2a735e8221a" => :catalina - sha256 "5cc06505dea4282bf314af76b1e4b4fd0157c837c984ce579251cd65d53a0623" => :mojave - sha256 "b5732a5671204ef476c21bded3722d2f72227dcd9da6582185b316dee6fab97b" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - (testpath/"foo.txt").write("") - assert_match("── foo.txt", shell_output("#{bin}/tre")) - end -end diff --git a/Formula/tre.rb b/Formula/tre.rb deleted file mode 100644 index 6c6103b68beef..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 "26b187538786109c8a08f52cb868ea9cf70dfbc9681c014a4778ead61c90f389" => :catalina - sha256 "6135ceb88c62b006fb0fbcc772ffd4006da4ae03d05fd872155fa36d33216efc" => :mojave - sha256 "eaab931989b5bf5fc18949eaa234a1840531ef3aeb9deda65e4d66be40cae149" => :high_sierra - sha256 "e28b7ac6153b06c067538f555f9ac5973df49c14ac2693aa4239ae407982e2c9" => :sierra - sha256 "8a1762dbd40b98869e01a19c29cdb1cfa5a127543b3e132fb0fdff996e46f566" => :el_capitan - sha256 "6fada15a2fd1c5905f8ed45d3c966da5e14efeb10522f82c26d2a23a918abaad" => :yosemite - sha256 "c57f9bfa724cd20843a672f5e8bd384e05e65bac062dd7d7b676db9b1c11f998" => :mavericks - 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 0405e5319a65f..0000000000000 --- a/Formula/tree.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "18f7984bdbab22251e9fc3c7832dbace5c7f7a77e8d63717bb0078385e2bf255" => :catalina - 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 e2570d7b37917..0000000000000 --- a/Formula/treecc.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "3a46948ef72e0801cab4767e1f0075d01ab8b7a8eb4b07a9a7e81d021c43e2fc" => :catalina - 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 bb290d248305b..0000000000000 --- a/Formula/treefrog.rb +++ /dev/null @@ -1,45 +0,0 @@ -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/v1.29.0.tar.gz" - sha256 "e5c0dbd6e317d27289bd9f500fae3bd84c74c1e982b914ae193b279c35e1bc0f" - license "BSD-3-Clause" - head "https://github.com/treefrogframework/treefrog-framework.git" - - bottle do - sha256 "b60083bd0a5e7ae3d938d10fd44b22ec00a49efdf984294f02cfd88fd859af52" => :catalina - sha256 "e87f7b1ff88ed2cff824039ac6acbf1437e9adcc4599cd0dc6162194fc861733" => :mojave - sha256 "a690eac1c340e7695a25b2f561d86b33cb5d2c970f6b6961799257787af89a65" => :high_sierra - end - - depends_on :xcode => ["8.0", :build] - depends_on :macos => :el_capitan - depends_on "mongo-c-driver" - depends_on "qt" - - def install - system "./configure", "--prefix=#{prefix}", "--enable-shared-mongoc" - - 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 513b6a39fc943..0000000000000 --- a/Formula/trezor-agent.rb +++ /dev/null @@ -1,200 +0,0 @@ -class TrezorAgent < Formula - include Language::Python::Virtualenv - - desc "Hardware SSH/GPG agent for Trezor, Keepkey & Ledger" - homepage "https://github.com/romanz/trezor-agent" - url "https://files.pythonhosted.org/packages/f1/a7/8989377dfce48abf9115055baf6d2cfba55102929a7c5f3e5b9c8e8b5c18/trezor_agent-0.11.0.tar.gz" - sha256 "139d917d6495bf290bcc21da457f84ccd2e74c78b4d59a649e0cdde4288cd20c" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "9482a60c735039a2c62c221e2976680a726e2d5fd3fe703486881a73f4206e3a" => :catalina - sha256 "a6d1e6ba68f9e240d3a5577fcdcbf7df3b6e18fe5c2fa78cb587ad905c2a894e" => :mojave - sha256 "71454920f5460eb56b1a2c10bb3818967d117a080bab61e8bf8bb1f9eb8e4de2" => :high_sierra - end - - depends_on "libusb" - depends_on "python@3.8" - - # Gather dependencies for trezor-agent, ledger-agent & keepkey-agent - - 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 "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" - sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" - end - - resource "ConfigArgParse" do - url "https://files.pythonhosted.org/packages/bb/79/3045743bb26ca2e44a1d317c37395462bfed82dbbd38e69a3280b63696ce/ConfigArgParse-1.2.3.tar.gz" - sha256 "edd17be986d5c1ba2e307150b8e5f5107aba125f3574dddd02c85d5cdcfd37dc" - end - - resource "construct" do - url "https://files.pythonhosted.org/packages/00/e0/71e41b817220333c7c511c3f78d988d69f9b03b5cca2f251a898ad3567a3/construct-2.10.56.tar.gz" - sha256 "97ba13edcd98546f10f7555af41c8ce7ae9d8221525ec4062c03f9adbf940661" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/2f/e0/3d435b34abd2d62e8206171892f174b180cd37b09d57b924ca5c2ef2219d/docutils-0.16.tar.gz" - sha256 "c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc" - end - - resource "ecdsa" do - url "https://files.pythonhosted.org/packages/e3/7c/b508ade1feb47cd79222e06d85e477f5cfc4fb0455ad3c70eb6330fc49aa/ecdsa-0.15.tar.gz" - sha256 "8f12ac317f8a1318efa75757ef0a651abe12e51fc1af8838fb91079445227277" - end - - resource "ECPy" do - url "https://files.pythonhosted.org/packages/a3/5f/dfed65c95348a6553663257bce82dcf66a79f8e7dfdfd090b5b9e191a34d/ECPy-1.2.3.tar.gz" - sha256 "6dd09f8cda5a1d673228ff9ef41aea8f036ee5ef3183198de83c14957d68c3e0" - end - - resource "ed25519" do - url "https://files.pythonhosted.org/packages/58/38/72ec85c953b90552fb015f31248256ef19e89a164a40ff8fef680259a608/ed25519-1.5.tar.gz" - sha256 "02053ee019ceef0df97294be2d4d5a8fc120fc86e81e08bec1245fc0f9403358" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz" - sha256 "b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" - end - - resource "hidapi" do - url "https://files.pythonhosted.org/packages/7c/a0/d5ca6f191c8860a4769ba19448d2b2d6b3e2ca2c30aa61bb96a3f6bd25ba/hidapi-0.9.0.post2.tar.gz" - sha256 "a71dd3c153cb6bb2b73d2612b5ab262830d78c6428f33f0c06818749e64c9320" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "keepkey" do - url "https://files.pythonhosted.org/packages/30/38/558d9a2dd1fd74f50ff4587b4054496ffb69e21ab1138eb448f3e8e2f4a7/keepkey-6.3.1.tar.gz" - sha256 "cef1e862e195ece3e42640a0f57d15a63086fd1dedc8b5ddfcbc9c2657f0bb1e" - end - - resource "keepkey_agent" do - url "https://files.pythonhosted.org/packages/65/72/4bf47a7bc8dc93d2ac21672a0db4bc58a78ec5cee3c4bcebd0b4092a9110/keepkey_agent-0.9.0.tar.gz" - sha256 "47c85de0c2ffb53c5d7bd2f4d2230146a416e82511259fad05119c4ef74be70c" - 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/ba/7e/9a21deb5f803835addd5674326b219fe3493e54346ba3d7d1aa6071d4310/ledgerblue-0.1.31.tar.gz" - sha256 "f1fc7ab685780309a7220c6ee517d88072cc594a9615bcc18e68ed5f149fa432" - end - - resource "libagent" do - url "https://files.pythonhosted.org/packages/11/5e/c4715308ffe45c80af92ff0f45fe8e2964ee01f0a7b380c74cedf1e48da2/libagent-0.14.1.tar.gz" - sha256 "dc979a564cb68cf7c6fa235bf747eb4555deb84f3a8d716940a1709377f140e7" - end - - resource "libusb1" do - url "https://files.pythonhosted.org/packages/80/bb/4ee9d760dd29499d877ee384f1d2bc6bb9923defd4c69843aef5e729972d/libusb1-1.7.1.tar.gz" - sha256 "adf64a4f3f5c94643a1286f8153bcf4bc787c348b38934aacd7fe17fbeebc571" - 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/80/0d/63de5efd5585fd6eb79eb35d3feb91deee8003e60997d61e3759eaf1ea66/mnemonic-0.19.tar.gz" - sha256 "4e37eb02b2cbd56a0079cabe58a6da93e60e3e4d6e757a586d9f23d96abea931" - end - - resource "protobuf" do - url "https://files.pythonhosted.org/packages/c9/d5/e6e789e50e478463a84bd1cdb45aa408d49a2e1aaffc45da43d10722c007/protobuf-3.11.3.tar.gz" - sha256 "c77c974d1dadf246d789f6dad1c24426137c9091e930dbf50e0a29c1fcf00b1f" - end - - resource "pycryptodomex" do - url "https://files.pythonhosted.org/packages/7f/3c/80cfaec41c3a9d0f524fe29bca9ab22d02ac84b5bfd6e22ade97d405bdba/pycryptodomex-3.9.7.tar.gz" - sha256 "50163324834edd0c9ce3e4512ded3e221c969086e10fdd5d3fdcaadac5e24a78" - end - - resource "PyMsgBox" do - url "https://files.pythonhosted.org/packages/ac/e0/0ac1ac67178a71b92e46f46788ddd799bb40bff40acd60c47c50be170374/PyMsgBox-1.0.7.tar.gz" - sha256 "7df5ed66c8a80fd36b83b278ba164e7a1d135c8fb8bdf38b291e46bf31d28085" - end - - resource "python-daemon" do - url "https://files.pythonhosted.org/packages/05/97/210f94322675c838319ffa8e505032373ff1f6a6219af8d16427e00b1051/python-daemon-2.2.4.tar.gz" - sha256 "57c84f50a04d7825515e4dbf3a31c70cc44414394a71608dee6cfde469e81766" - 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/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "semver" do - url "https://files.pythonhosted.org/packages/7a/f6/caeed415475f817542307b09fd80ed2c5f2d167be86e692d3d7b52222a46/semver-2.9.1.tar.gz" - sha256 "723be40c74b6468861e0e3dbb80a41fc3b171a2a45bf956c245304773dc06055" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "trezor" do - url "https://files.pythonhosted.org/packages/d1/8d/f467c7a01f858a668940aadd160cee78505025a6ae73fa8bb3d685a45e2c/trezor-0.12.0.tar.gz" - sha256 "f6bc821bddec06e67a1abd0be1d9fbc61c59b08272c736522ae2f6b225bf9579" - end - - resource "typing-extensions" do - url "https://files.pythonhosted.org/packages/6a/28/d32852f2af6b5ead85d396249d5bdf450833f3a69896d76eb480d9c5e406/typing_extensions-3.7.4.2.tar.gz" - sha256 "79ee589a3caca649a9bfd2a8de4709837400dfa00b6cc81962a1e6a1815969ae" - end - - resource "Unidecode" do - url "https://files.pythonhosted.org/packages/b1/d6/7e2a98e98c43cf11406de6097e2656d31559f788e9210326ce6544bd7d40/Unidecode-1.1.1.tar.gz" - sha256 "2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "websocket_client" do - url "https://files.pythonhosted.org/packages/8b/0f/52de51b9b450ed52694208ab952d5af6ebbcbce7f166a48784095d930d8c/websocket_client-0.57.0.tar.gz" - sha256 "d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010" - 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/triangle.rb b/Formula/triangle.rb deleted file mode 100644 index 0a33dc2e28ddc..0000000000000 --- a/Formula/triangle.rb +++ /dev/null @@ -1,26 +0,0 @@ -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/v1.1.1.tar.gz" - sha256 "e62b05cf654ee9c61b8145aaea32f54ee39da872cca37084c96db5cda6587ad1" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "a90c331e51936a58d69e47b7ce4d9925072b6024ad6b1d1fe9d75b17f2becf15" => :catalina - sha256 "6dc2d0aba307e988e2d4205881be47aef561ab3cea7d7bc5c378e23414782ad9" => :mojave - sha256 "d8859fc5b05f1faac1db7cd3130e6e8c8359724fc2162e5d6dc97d3e5198651d" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-mod=vendor", "-o", "#{bin}/triangle", "./cmd/triangle" - prefix.install_metafiles - end - - test do - system "#{bin}/triangle", "-in", test_fixtures("test.png"), "-out", "out.png" - assert_predicate testpath/"out.png", :exist? - end -end diff --git a/Formula/trimage.rb b/Formula/trimage.rb deleted file mode 100644 index 6aa17f6afeb65..0000000000000 --- a/Formula/trimage.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Trimage < Formula - desc "Cross-platform tool for optimizing PNG and JPG files" - homepage "https://trimage.org/" - url "https://github.com/Kilian/Trimage/archive/1.0.6.tar.gz" - sha256 "60448b5a827691087a1bd016a68f84d8c457fc29179271f310fe5f9fa21415cf" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "34db72d3e2bbec742fd9d8286919e6dfda53ad2d552c80c1285240b9338ff384" => :catalina - sha256 "34db72d3e2bbec742fd9d8286919e6dfda53ad2d552c80c1285240b9338ff384" => :mojave - sha256 "34db72d3e2bbec742fd9d8286919e6dfda53ad2d552c80c1285240b9338ff384" => :high_sierra - end - - depends_on "advancecomp" - depends_on "jpegoptim" - depends_on "optipng" - depends_on "pngcrush" - depends_on "pyqt" - depends_on "python@3.8" - - def install - system "#{Formula["python@3.8"].opt_bin}/python3", "setup.py", "build" - system "#{Formula["python@3.8"].opt_bin}/python3", "setup.py", "install", "--prefix=#{prefix}" - end - - test do - cp test_fixtures("test.png"), testpath - cp test_fixtures("test.jpg"), testpath - assert_match "New Size", shell_output("#{bin}/trimage -f #{testpath}/test.png 2>1") - assert_match "New Size", shell_output("#{bin}/trimage -f #{testpath}/test.jpg 2>1") - end -end diff --git a/Formula/triton.rb b/Formula/triton.rb deleted file mode 100644 index 4a25d1bce1d29..0000000000000 --- a/Formula/triton.rb +++ /dev/null @@ -1,28 +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-7.10.0.tgz" - sha256 "bda624f459cce4e3d9b8557270a3de6a375fd181151acc3f0d0d0962b60fb307" - - bottle do - cellar :any_skip_relocation - sha256 "1fc3b2c8389ebdfa1cb9e3bebe5d1a2be854bbad7ea1a244c802a00dd2fa44bd" => :catalina - sha256 "126492ee85adc820c3d6b2fa1ab8a4b74d8446df287d7bb881472cf58909b3b6" => :mojave - sha256 "7470699caad1f183221b1fd5be532a43662bb2dbbd06639d576bc1ffeca58967" => :high_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/"triton").write `#{bin}/triton completion` - end - - test do - output = shell_output("#{bin}/triton profile ls") - assert_match /\ANAME CURR ACCOUNT USER URL$/, output - end -end diff --git a/Formula/truecrack.rb b/Formula/truecrack.rb deleted file mode 100644 index b302790f70795..0000000000000 --- a/Formula/truecrack.rb +++ /dev/null @@ -1,43 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "fb57614e52a889118b43b5ea47d5ae7174ac84525c7496908804d6aca51a8818" => :catalina - 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 70a9831d7fea2..0000000000000 --- a/Formula/truncate.rb +++ /dev/null @@ -1,32 +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" - license "AGPL-3.0" - head "https://github.com/flok99/truncate.git" - - bottle do - cellar :any_skip_relocation - sha256 "268e41b71c41a6d5297c7659061953053e2e833bde60d23ff80296950ff4f006" => :catalina - sha256 "99e774220ef9a0cdb89f4300c671ac9eb74840cf5ed2d0731f12d20e680ff939" => :mojave - sha256 "e1386eda3a93dddd528d1c3bf33b78c9c4da12039d7434b8db956e05eace9482" => :high_sierra - sha256 "c4c892f0afbdf3a401ccb0af2a7cf8c65b37ccfdfe2412dda5284faa94f562ff" => :sierra - sha256 "299b80454c20134c5d0916da25fb3d5f0b6843e620dac6babebe01a899253a69" => :el_capitan - sha256 "a9d1c87d6cfec42674f0e7db25b786ba100a04c8c0da318fd5f6299a7418843f" => :yosemite - sha256 "d8751674842b772bd3a5318c1234f262518d05d66a7fe3b06ce5f59b2176bba8" => :mavericks - end - - conflicts_with "coreutils", :because => "both install `truncate` binaries" - conflicts_with "uutils-coreutils", :because => "both install `truncate` binaries" - - 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 d36822c9414c1..0000000000000 --- a/Formula/tsung.rb +++ /dev/null @@ -1,32 +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" - license "GPL-2.0" - head "https://github.com/processone/tsung.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "5ba49316a6d401d171ddd27e366c9bfb1a73aaeced24b562a326dbe1bd1249ab" => :catalina - 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 09e1ba8d01cc6..0000000000000 --- a/Formula/tta.rb +++ /dev/null @@ -1,27 +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" - license "LGPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "af41c210ceddaa4957dc8bc4fec9dedb839157914c3d2d9fbb4bed63239cd9f1" => :catalina - 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 aa6589bd11cba..0000000000000 --- a/Formula/ttf2eot.rb +++ /dev/null @@ -1,27 +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 "05b1f397b4784a77f36a3d3138e812932db4419d8d03e0f0735e58591677e918" => :catalina - 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 - font_name = (MacOS.version >= :catalina) ? "Arial Unicode.ttf" : "Arial.ttf" - cp "/Library/Fonts/#{font_name}", testpath - system("#{bin}/ttf2eot < '#{font_name}' > 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 af22a507e1b1f..0000000000000 --- a/Formula/ttf2pt1.rb +++ /dev/null @@ -1,23 +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 "29a39e797de6107bfe0878e68eb0eabd67d7cbb9b10e76055f1d9d3618a1a842" => :catalina - 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 3d5790fe13544..0000000000000 --- a/Formula/ttfautohint.rb +++ /dev/null @@ -1,45 +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.3/ttfautohint-1.8.3.tar.gz" - sha256 "87bb4932571ad57536a7cc20b31fd15bc68cb5429977eb43d903fa61617cf87e" - - bottle do - cellar :any - sha256 "542ada8a8e7deaa7fc3f14f2fec704b2570bec6baa07396a37ac7b6d280cfab6" => :catalina - sha256 "04ca530843887602e80fde17d24f4ed8e19d1248bd71c81c925c161770dbdf56" => :mojave - sha256 "a6573ae816a7555d62308759c2d64f9fb955ba056d856d904a522996ba0a0c83" => :high_sierra - sha256 "d45d8d85d3ffa162326ea8e2f63778f4fe583c41bc316c15c5a63b3625beb0ff" => :sierra - 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 - font_name = (MacOS.version >= :catalina) ? "Arial Unicode.ttf" : "Arial.ttf" - cp "/Library/Fonts/#{font_name}", testpath - system "#{bin}/ttfautohint", font_name, "output.ttf" - assert_predicate testpath/"output.ttf", :exist? - end -end diff --git a/Formula/tth.rb b/Formula/tth.rb deleted file mode 100644 index f70282e037326..0000000000000 --- a/Formula/tth.rb +++ /dev/null @@ -1,23 +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.13.tgz" - sha256 "1fa2bb7200c85d7f018d0ac64cc4bc73df94e6668d545378a1990f2abac52ae6" - - bottle do - cellar :any_skip_relocation - sha256 "ee1d635ae810913a1a1651452f4d3f94249f2c757353ae3d34bdc17404dc81e5" => :catalina - sha256 "04da16c55583ce0eb533ec931475fb1e7af82cf028bdbb458515f0cf9984ff74" => :mojave - sha256 "76384c1ea48529e728ff50998b0d6bb4d9fbe920ed75cb4bfb9ee1da6309421b" => :high_sierra - 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 6d7519009fe1c..0000000000000 --- a/Formula/tty-clock.rb +++ /dev/null @@ -1,30 +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" - license "BSD-3-Clause" - head "https://github.com/xorg62/tty-clock.git" - - bottle do - cellar :any_skip_relocation - sha256 "dc5a60415f5cd5397d973b361db6bc0db2172621fe6eed037ee05c851097c27d" => :catalina - 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-share.rb b/Formula/tty-share.rb deleted file mode 100644 index 9e6846bccdb4c..0000000000000 --- a/Formula/tty-share.rb +++ /dev/null @@ -1,28 +0,0 @@ -class TtyShare < Formula - desc "Terminal sharing over the Internet" - homepage "https://tty-share.com/" - url "https://github.com/elisescu/tty-share/archive/v0.6.2.tar.gz" - sha256 "4ea8cdc96fa889da414885e8cdbd8fca71569a9146ca4d3caa7cf2411ac141aa" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "adfa3de302df681f3e236d28f69dcb7cd63143582d26b698a034adc5337fe18a" => :catalina - sha256 "b9b97a2733c85508451799419dfbc36326c8d9bfe30c26800bc22ddf2bd7b30f" => :mojave - sha256 "6820c38434e99f26e0cc247ae89831376c914a6eb1ee0d4b20056a2ca2e7c0e3" => :high_sierra - end - - depends_on "go" => :build - - def install - ldflags = "-s -w -X main.version=#{version}" - system "go", "build", "-mod=vendor", "-ldflags", ldflags, "-o", bin/"tty-share", "." - 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/tty-solitaire.rb b/Formula/tty-solitaire.rb deleted file mode 100644 index 5b447fa50a138..0000000000000 --- a/Formula/tty-solitaire.rb +++ /dev/null @@ -1,23 +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.3.0.tar.gz" - sha256 "a270ee639e911a89add6a3c765b0548c9d762e0388c323807708d2509cfa64a0" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "8a9b3d7d5b62d5a82b3e37920d76bdd02902c4705d81d2b158b8eb605232b91f" => :catalina - sha256 "ad68372ed5eb8f98d1175fd9b014fb0881a6615fe05e21811ed4327ded9aa066" => :mojave - sha256 "d35722d89335ba81284acdde82cdb5f370860441950f3acd7290a8e821382147" => :high_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 ca6d92d9fa39f..0000000000000 --- a/Formula/ttyd.rb +++ /dev/null @@ -1,36 +0,0 @@ -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/1.6.1.tar.gz" - sha256 "d72dcca3dec00cda87b80a0a25ae4fee2f8b9098c1cdb558508dcb14fbb6fafc" - license "MIT" - revision 1 - head "https://github.com/tsl0922/ttyd.git" - - bottle do - cellar :any - sha256 "97098f5b98c13ae80374fe41c1955ada4382449e3be7f08984b843c439be18b5" => :catalina - sha256 "34d7eceee16997bd2ffdbba37951b706c9e0a5cbc27761e832be71af7c0b18c9" => :mojave - sha256 "00276ef8a5190eb11920cacaa23d940f66032ab2267b19839531876097f38f64" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "json-c" - depends_on "libevent" - depends_on "libuv" - depends_on "libwebsockets" - depends_on "openssl@1.1" - - uses_from_macos "vim" - - def install - system "cmake", ".", - *std_cmake_args, - "-DOPENSSL_ROOT_DIR=#{Formula["openssl@1.1"].opt_prefix}" - 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 ba2cb78e5daf2..0000000000000 --- a/Formula/ttygif.rb +++ /dev/null @@ -1,26 +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.5.0.tar.gz" - sha256 "b5cc9108b1add88c6175e3e001ad4615a628f93f2fffcb7da9e85a9ec7f23ef6" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "61f7135b9f03465ac86f26e7b7cad7ca09ec35495841ee868b76f001faefd040" => :catalina - sha256 "34060f2f53d6388461ca29a81938490bb1768aa9f44303c7cce717c2f8ad6246" => :mojave - sha256 "ab8ee96836d9a9663e94f9dc9e2337a2968a8fe4523f8da166b4e865a1e81ada" => :high_sierra - end - - depends_on "imagemagick" - depends_on "ttyrec" - - def install - system "make", "install", "PREFIX=#{prefix}" - end - - test do - ENV["TERM_PROGRAM"] = "Something" - system "#{bin}/ttygif", "--version" - end -end diff --git a/Formula/ttyplot.rb b/Formula/ttyplot.rb deleted file mode 100644 index 76982efb1662d..0000000000000 --- a/Formula/ttyplot.rb +++ /dev/null @@ -1,28 +0,0 @@ -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/1.4.tar.gz" - sha256 "11974754981406d19cfa16865b59770faaf3ade8d909d9a0134dc56e00d29bd4" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "760b571d2cc940c6a1ad14655f2e2c0cac4aa64dea8e63d37454528cf969d8b2" => :catalina - sha256 "b31388536afde7ef669c334f520e73f95ceef82d0c9f73f5390a65d13d3235ef" => :mojave - sha256 "6d01769af5216ac128e8cb9a0a55397959594fa8f20fafcf65780db4b66ac090" => :high_sierra - end - - uses_from_macos "ncurses" - - def install - system "make" - bin.install "ttyplot" - end - - test do - system "#{bin}/ttyplot", "--help" - # ttyplot normally reads data over time: - # piping lines to it will just let it start and immediately exit successfully. - system "echo 1 2 3 | #{bin}/ttyplot" - end -end diff --git a/Formula/ttyrec.rb b/Formula/ttyrec.rb deleted file mode 100644 index 23f5e97f2350d..0000000000000 --- a/Formula/ttyrec.rb +++ /dev/null @@ -1,37 +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 "6d893647087afa85234f60103507a5a878360d018816c557534d469c4edf7bf9" => :catalina - 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 5457e29e7fcc8..0000000000000 --- a/Formula/tundra.rb +++ /dev/null @@ -1,55 +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.14.tar.gz" - sha256 "db3d4b13820373a038a08b8751376e3ecdf49355f329a7909cd2f836372dffe1" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "bafe878e5e83d8edb27eac2b645afd1898045c50d50d169a65398a31a7c23baf" => :catalina - sha256 "3f22d2d8ee09acdb42cb4c9c6b0a87496696999ee0ce95c26842d0200f26d356" => :mojave - sha256 "37c6abc51fbabc29bed3c7e7dbb7d7264d0113f98470ce8a82449227da172433" => :high_sierra - end - - resource "gtest" do - url "https://github.com/google/googletest/archive/release-1.10.0.tar.gz" - sha256 "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb" - 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 0d8410d8444ee..0000000000000 --- a/Formula/tunnel.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Tunnel < Formula - desc "Expose local servers to the internet securely" - homepage "https://tunnel.labstack.com/docs" - url "https://github.com/labstack/tunnel-client/archive/v0.5.15.tar.gz" - sha256 "7a57451416b76dbf220e69c7dd3e4c33dc84758a41cdb9337a464338565e3e6e" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "b13e5a208e756bc66a56f9e85ed2d5f1456b5a58055213b1c1579223da0c4ba3" => :catalina - sha256 "d4d2c6b802eb2f4fb03628481ec7251b52fb05e536ef161ae9e6eb96d4afb8b1" => :mojave - sha256 "8425650fbc2fad854ab561a0590e4a899e235882a72f40d95fae4bcb1115c094" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"tunnel", "./cmd/tunnel" - prefix.install_metafiles - end - - test do - system bin/"tunnel", "ping" - end -end diff --git a/Formula/tup.rb b/Formula/tup.rb deleted file mode 100644 index 4cc60fcf90919..0000000000000 --- a/Formula/tup.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Tup < Formula - desc "File-based build system" - homepage "http://gittup.org/tup/" - url "https://github.com/gittup/tup/archive/v0.7.9.tar.gz" - sha256 "9b0951afaa749186eb55d88860405b2f6b3d88632d1b5df1ec4a0bf973d8d326" - license "GPL-2.0" - head "https://github.com/gittup/tup.git" - - bottle do - cellar :any - sha256 "6a6730ccbf131493bfd3f35b4e38f50a60cbefb122794ab603b6ad2e7fba2f28" => :catalina - sha256 "d1d2207224fb78fd4f1dcdbfacf2b62b10538ebacccd33356c5e93fcedad030e" => :mojave - sha256 "9e45e8c40a8576611ba6fa53a55c9004b31f41af75c9130ba909012ec19fef45" => :high_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 313749f09b76c..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://files.pythonhosted.org/packages/8f/a5/c5cef0f433d92c5b6108d390f7dd3fdfba02b591e1dbfe9a3a2c5e8f2ca2/tvnamer-2.5.1.tar.gz" - sha256 "ba181a947dcfe20c860825b3580d2a6f1a896cf9b5fef093b8c3f00640581a1f" - license "Unlicense" - head "https://github.com/dbr/tvnamer.git" - - bottle do - cellar :any_skip_relocation - sha256 "b03c31d1d4d46357e64a1e579e7a64286ea92c05db2edcb13b25c370173e5984" => :catalina - sha256 "b03c31d1d4d46357e64a1e579e7a64286ea92c05db2edcb13b25c370173e5984" => :mojave - sha256 "b03c31d1d4d46357e64a1e579e7a64286ea92c05db2edcb13b25c370173e5984" => :high_sierra - end - - depends_on "python@3.8" - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - 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/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz" - sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - 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/ba/c5/abcff2dd75e63daae3466fffd05a28428e57828f8b878125571a8e8343a8/tvdb_api-2.0.tar.gz" - sha256 "b1de28a5100121d91b1f6a8ec7e86f2c4bdf48fb22fab3c6fe21e7fb7346bf8f" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - 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 48ca1b14a877b..0000000000000 --- a/Formula/twarc.rb +++ /dev/null @@ -1,111 +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/48/0f/b0491173d98d7c0093d3ad912b281f6fefccfcd59b268b2e67581ca08434/twarc-1.10.1.tar.gz" - sha256 "db8d6f5fc4d786d9af3f9ca622e4e83175a34e93bda756923e5d6c546bca6c3e" - - bottle do - cellar :any_skip_relocation - sha256 "74c4def26e79e513331d2a7aa2fd6c7edc115ca06124545707abd8f2d3031b98" => :catalina - sha256 "f219ea9b791a7700a3bbfdb4f57830af517f13942c004a5b1a962ebc80aecb69" => :mojave - sha256 "8a845fe5b8a179c99eca6df8ae3d14665ec7c705b3cd4b7dff8a9b8c61df54e8" => :high_sierra - end - - depends_on "python@3.8" - - resource "attrs" do - url "https://files.pythonhosted.org/packages/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - 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/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz" - sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6" - end - - resource "more-itertools" do - url "https://files.pythonhosted.org/packages/67/4a/16cb3acf64709eb0164e49ba463a42dc45366995848c4f0cf770f57b8120/more-itertools-8.4.0.tar.gz" - sha256 "68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5" - end - - resource "oauthlib" do - url "https://files.pythonhosted.org/packages/fc/c7/829c73c64d3749da7811c06319458e47f3461944da9d98bb4df1cb1598c2/oauthlib-3.1.0.tar.gz" - sha256 "bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/55/fd/fc1aca9cf51ed2f2c11748fa797370027babd82f87829c7a8e6dbe720145/packaging-20.4.tar.gz" - sha256 "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8" - end - - resource "pluggy" do - url "https://files.pythonhosted.org/packages/f8/04/7a8542bed4b16a65c2714bf76cf5a0b026157da7f75e87cc88774aa10b14/pluggy-0.13.1.tar.gz" - sha256 "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0" - end - - resource "py" do - url "https://files.pythonhosted.org/packages/97/a6/ab9183fe08f69a53d06ac0ee8432bc0ffbb3989c575cc69b73a0229a9a99/py-1.9.0.tar.gz" - sha256 "9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "pytest" do - url "https://files.pythonhosted.org/packages/8f/c4/e4a645f8a3d6c6993cb3934ee593e705947dfafad4ca5148b9a0fde7359c/pytest-5.4.3.tar.gz" - sha256 "7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "requests-oauthlib" do - url "https://files.pythonhosted.org/packages/23/eb/68fc8fa86e0f5789832f275c8289257d8dc44dbe93fce7ff819112b9df8f/requests-oauthlib-1.3.0.tar.gz" - sha256 "b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/89/38/459b727c381504f361832b9e5ace19966de1a235d73cdbdea91c771a1155/wcwidth-0.2.5.tar.gz" - sha256 "c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83" - end - - def install - 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/tweak.rb b/Formula/tweak.rb deleted file mode 100644 index b68a9bdf6354a..0000000000000 --- a/Formula/tweak.rb +++ /dev/null @@ -1,25 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "a38441e05b3953b324cee772161ebb1ccf12bf2262c476af921fee963fdee413" => :catalina - sha256 "82ec40f5ceaee7630a9bba6652c350388176c38908681fe4389a37d2e9605009" => :mojave - sha256 "e36456b9e78dafa97c7c972a9c26bc274cc30dff8f50c2a736d2aaca8068dfa8" => :high_sierra - 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/twemcache.rb b/Formula/twemcache.rb deleted file mode 100644 index 3e18277badefc..0000000000000 --- a/Formula/twemcache.rb +++ /dev/null @@ -1,32 +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" - license "BSD-3-Clause" - revision 1 - head "https://github.com/twitter/twemcache.git" - - bottle do - cellar :any - sha256 "64238f0d8c99fad48b6d3f780f2e42557caa316e807a3a411fbeab3a649fc0c3" => :catalina - sha256 "2c7fd2ce03cc16859264882f478137de35ece42a26ad9b10f23d668ddc1883d4" => :mojave - sha256 "9cc173642f9e53b723321a3013f2327b8a712c528c53ac5bd9fd2b9420244fcb" => :high_sierra - sha256 "ec7e5d41f887db3a41d89eadb64d16119a2d86427afd45de92e7a8ca55ce7ef2" => :sierra - 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 ca055870c725b..0000000000000 --- a/Formula/twine-pypi.rb +++ /dev/null @@ -1,125 +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/14/54/2fc5732362649f4b6f4c245c17dc5a526148b1fb2c3a89176a2ef950628a/twine-3.2.0.tar.gz" - sha256 "34352fd52ec3b9d29837e6072d5a2a7c6fe4290e97bba46bb8d478b5c598f7ab" - license "Apache-2.0" - head "https://github.com/pypa/twine.git" - - bottle do - cellar :any_skip_relocation - sha256 "6a39af0a3905556400c68636ea2cf39658ac8b3b85bfd1d4bd23d5bf29ce075d" => :catalina - sha256 "2c17e73674ae49ff7db1071784b7c523b8d3efb48e6f382a7084b6119bf73e2c" => :mojave - sha256 "2928900b6410e78fc1bca1e2f7a5eca6fa1fd705085aa0226a25cee70775ff15" => :high_sierra - end - - depends_on "python@3.8" - - resource "bleach" do - url "https://files.pythonhosted.org/packages/a9/ac/dc881fca3ac66d6f2c4c3ac46633af4e9c05ed5a0aa2e7e36dc096687dd7/bleach-3.1.5.tar.gz" - sha256 "3c4c520fdb9db59ef139915a5db79f8b51bc2a7257ea0389f30c846883430a4b" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - 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/82/75/f2a4c0c94c85e2693c229142eb448840fba0f9230111faa889d1f541d12d/colorama-0.4.3.tar.gz" - sha256 "e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1" - end - - resource "docutils" do - url "https://files.pythonhosted.org/packages/2f/e0/3d435b34abd2d62e8206171892f174b180cd37b09d57b924ca5c2ef2219d/docutils-0.16.tar.gz" - sha256 "c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "keyring" do - url "https://files.pythonhosted.org/packages/a6/52/eb8a0e13b54ec9240c7dd68fcd0951c52f62033d438af372831af770f7cc/keyring-21.2.1.tar.gz" - sha256 "c53e0e5ccde3ad34284a40ce7976b5b3a3d6de70344c3f8ee44364cc340976ec" - end - - resource "packaging" do - url "https://files.pythonhosted.org/packages/55/fd/fc1aca9cf51ed2f2c11748fa797370027babd82f87829c7a8e6dbe720145/packaging-20.4.tar.gz" - sha256 "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8" - end - - resource "pkginfo" do - url "https://files.pythonhosted.org/packages/6c/04/fd6683d24581894be8b25bc8c68ac7a0a73bf0c4d74b888ac5fe9a28e77f/pkginfo-1.5.0.1.tar.gz" - sha256 "7424f2c8511c186cd5424bbf31045b77435b37a8d604990b79d4e70d741148bb" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - end - - resource "pyparsing" do - url "https://files.pythonhosted.org/packages/c1/47/dfc9c342c9842bbe0036c7f763d2d6686bcf5eb1808ba3e170afdb282210/pyparsing-2.4.7.tar.gz" - sha256 "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1" - end - - resource "readme-renderer" do - url "https://files.pythonhosted.org/packages/13/d6/8e241e4e40404a1f83567d6a29798abee0b9b50b08c8efc815ce11c41df9/readme_renderer-26.0.tar.gz" - sha256 "cbe9db71defedd2428a1589cdc545f9bd98e59297449f69d721ef8f1cfced68d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "requests-toolbelt" do - url "https://files.pythonhosted.org/packages/28/30/7bf7e5071081f761766d46820e52f4b16c8a08fef02d2eb4682ca7534310/requests-toolbelt-0.9.1.tar.gz" - sha256 "968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0" - end - - resource "rfc3986" do - url "https://files.pythonhosted.org/packages/70/e2/1344681ad04a0971e8884b9a9856e5a13cc4824d15c047f8b0bbcc0b2029/rfc3986-1.4.0.tar.gz" - sha256 "112398da31a3344dc25dbf477d8df6cb34f9278a94fee2625d89e4514be8bb9d" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "tqdm" do - url "https://files.pythonhosted.org/packages/a9/03/df1d77e852dd697c0ff7b7b1b9888739517e5f97dfbd2cf7ebd13234084c/tqdm-4.46.1.tar.gz" - sha256 "cd140979c2bebd2311dfb14781d8f19bd5a9debb92dcab9f6ef899c987fcf71f" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - 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 f7c2f71bcd959..0000000000000 --- a/Formula/two-lame.rb +++ /dev/null @@ -1,25 +0,0 @@ -class TwoLame < Formula - desc "Optimized MPEG Audio Layer 2 (MP2) encoder" - homepage "https://www.twolame.org/" - url "https://downloads.sourceforge.net/twolame/0.4.0/twolame-0.4.0.tar.gz" - sha256 "cc35424f6019a88c6f52570b63e1baf50f62963a3eac52a03a800bb070d7c87d" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "9ba9f3afb14f2ac2fa911046a83ee50ed6a93d747f0c305788a61b4138e5fe5a" => :catalina - sha256 "77d5c37574ecdf0d857e09f47e9de5eda3049fe8cd1486942a6a62a4baae6f06" => :mojave - sha256 "153c7085434a1bce73b0ce704f37997179d6e53614a7014546b9b4d3f80dec97" => :high_sierra - 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/twoping.rb b/Formula/twoping.rb deleted file mode 100644 index c71135da00009..0000000000000 --- a/Formula/twoping.rb +++ /dev/null @@ -1,65 +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.5.tar.gz" - sha256 "867009928bf767d36279f90ff8f891855804c0004849f9554ac77fcd7f0fdb7b" - license "GPL-2.0" - head "https://github.com/rfinnie/2ping.git", :branch => "main" - - bottle do - cellar :any_skip_relocation - sha256 "2e76c2949b024e9d3bb26d2f2861b859a51d3f8b0508f5ba8f76d1b2e1d63f3e" => :catalina - sha256 "2e76c2949b024e9d3bb26d2f2861b859a51d3f8b0508f5ba8f76d1b2e1d63f3e" => :mojave - sha256 "2e76c2949b024e9d3bb26d2f2861b859a51d3f8b0508f5ba8f76d1b2e1d63f3e" => :high_sierra - end - - depends_on "python@3.8" - - 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 - 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/twtxt.rb b/Formula/twtxt.rb deleted file mode 100644 index 68adb922838fb..0000000000000 --- a/Formula/twtxt.rb +++ /dev/null @@ -1,106 +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" - license "MIT" - revision 4 - - bottle do - cellar :any_skip_relocation - sha256 "f02a3756e562ada9942eeac14cadb2113f22b67935b4d1e3a30a2890b3312855" => :catalina - sha256 "42f444d72bfcb08a0f105628d4883e03c5ff522b6eda4f390f9434b79bc1fdb6" => :mojave - sha256 "93e9cd335a6dd161246501db8e5fcbc9d38d5c4ab07136e47a3742359c043c59" => :high_sierra - end - - depends_on "python@3.8" - - resource "aiohttp" do - url "https://files.pythonhosted.org/packages/c0/b9/853b158f5cb5d218daaff0fb0dbc2bd7de45b2c6c5f563dff0ee530ec52a/aiohttp-2.3.10.tar.gz" - sha256 "8adda6583ba438a4c70693374e10b60168663ffa6564c5c75d3c7a9055290964" - end - - resource "async_timeout" do - url "https://files.pythonhosted.org/packages/a1/78/aae1545aba6e87e23ecab8d212b58bb70e72164b67eb090b81bb17ad38e3/async-timeout-3.0.1.tar.gz" - sha256 "0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f" - 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/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "idna_ssl" do - url "https://files.pythonhosted.org/packages/46/03/07c4894aae38b0de52b52586b24bf189bb83e4ddabfe2e2c8f2419eec6f4/idna-ssl-1.1.0.tar.gz" - sha256 "a933e3bb13da54383f9e8f35dc4f9cb9eb9b3b78c6b36f311254d6d0d92c6c7c" - end - - resource "multidict" do - url "https://files.pythonhosted.org/packages/84/96/5503ba866d8d216e49a6ce3bcb288df8a5fb3ac8a90b8fcff9ddcda32568/multidict-4.7.3.tar.gz" - sha256 "be813fb9e5ce41a5a99a29cdb857144a1bd6670883586f995b940a4878dc5238" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - end - - resource "yarl" do - url "https://files.pythonhosted.org/packages/d6/67/6e2507586eb1cfa6d55540845b0cd05b4b77c414f6bca8b00b45483b976e/yarl-1.4.2.tar.gz" - sha256 "58cd9c469eced558cd81aa3f484b2924e8897049e06889e8ff2510435b7ef74b" - 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/HEAD/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 diff --git a/Formula/txr.rb b/Formula/txr.rb deleted file mode 100644 index 9a75c4a8c6c46..0000000000000 --- a/Formula/txr.rb +++ /dev/null @@ -1,27 +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-236.tar.bz2" - sha256 "293c0f02b7553001392789cff5da727b1ca085f2a05fd5d3fda1f88b72a3b031" - head "http://www.kylheku.com/git/txr", :using => :git - - bottle do - cellar :any_skip_relocation - sha256 "2fb63dd53592222c6052cbf181e8fc76b0bd3b628b69d53b603240d265db320e" => :catalina - sha256 "1495de462a044f69966d14cb897fbd2e77089c70812e97986db536089c4376e5" => :mojave - sha256 "de2258c0669930f71c946e0875d4072fb9b5a50a17803f6c85671b5027db2717" => :high_sierra - end - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - - def install - 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 8ab27ff44b847..0000000000000 --- a/Formula/txt2tags.rb +++ /dev/null @@ -1,28 +0,0 @@ -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/0e/80/dc4215b549ddbe1d1251bc4cd47ad6f4a65e1f9803815997817ff297d22e/txt2tags-3.7.tar.gz" - sha256 "27969387206d12b4e4a0eb13d0d5dd957d71dbb932451b0dceeab5e3dbb6178a" - revision 1 - - bottle do - cellar :any_skip_relocation - sha256 "5417013a87fca45121b25df471e050f12d611fcab11594ee5b442543eff2c457" => :catalina - sha256 "894d7e9c49720ccf3a0c27f0d8c9e46297dd6cbb27f0efbddf41daf5dffbe230" => :mojave - sha256 "8aa1a28a1d6697d6b247e360afd13079635404805d31ff9b83afaab9bb23a0b3" => :high_sierra - end - - depends_on "python@3.8" - - 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/typescript.rb b/Formula/typescript.rb deleted file mode 100644 index 6436c0d67bd7a..0000000000000 --- a/Formula/typescript.rb +++ /dev/null @@ -1,39 +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.9.6.tgz" - sha256 "8ff4c1a65f9dd4f5293f47089b199a9f8a51600e1986ba86cf6b89a1092ff798" - license "Apache-2.0" - head "https://github.com/Microsoft/TypeScript.git" - - bottle do - cellar :any_skip_relocation - sha256 "2cb809424228689b0d288cb7519377381b5ab169ee255401c1e3be4772bc4c16" => :catalina - sha256 "c64b10b665a47a76183cbb5ad1ccafcc2abb21914bf01c28fe455583c431327d" => :mojave - sha256 "94ff7cae4425e5f751a20b744803b3294751cd70a7f15890eacb103f38619a34" => :high_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 26ba960e282be..0000000000000 --- a/Formula/typespeed.rb +++ /dev/null @@ -1,26 +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" - license "GPL-2.0" - - bottle do - sha256 "cff9da11f7441f1ff4db7cbfa57f0711ff0bbe08a80ee7067021c619bc01cb06" => :catalina - 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 be20682bbad7e..0000000000000 --- a/Formula/u-boot-tools.rb +++ /dev/null @@ -1,34 +0,0 @@ -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-2020.07.tar.bz2" - sha256 "c1f5bf9ee6bb6e648edbf19ce2ca9452f614b08a9f886f1a566aa42e8cf05f6a" - - bottle do - cellar :any - sha256 "9667b7cc022e686187b978537d79497c7b9b99057317feb5aa7ecd72a3de4db6" => :catalina - sha256 "38fc395c58c2d454cc442950069f27a3be7ae4708fb2d5eaf16ce4601067ac57" => :mojave - sha256 "7a788e225c09dd2f93dca34f10854c53ed36f8c8f5ec97ee1c72c59b2e3fc748" => :high_sierra - end - - depends_on "openssl@1.1" - - 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" - - system "make", "sandbox_defconfig" - system "make", "tools", "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/u-boot-tools.rb b/Formula/u/u-boot-tools.rb new file mode 100644 index 0000000000000..e89aa28755b09 --- /dev/null +++ b/Formula/u/u-boot-tools.rb @@ -0,0 +1,47 @@ +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.04.tar.bz2" + sha256 "439d3bef296effd54130be6a731c5b118be7fddd7fcc663ccbc5fb18294d8718" + 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_sequoia: "d637234bc774fd2bcd700a28b5d8ed78b49a38af55b2e47c33d6320a67f02937" + sha256 cellar: :any, arm64_sonoma: "da971cb9ddcd87fba57fc44c8c199653015ac8110339a4ff2bb63db6fa6082c5" + sha256 cellar: :any, arm64_ventura: "d668af19b960369ebf3e73293783c66d6877d814b23b4bb32f5c809782bd4b50" + sha256 cellar: :any, sonoma: "018b14fb4513bead191c26f6f4d73fccfca1f429aa1d8c2ef921dea5caf7f0fb" + sha256 cellar: :any, ventura: "b1a474154e348e0baf8e01ee305d49ae753e845343c2ad89813ab45380f4a559" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d49f5501359ff51c4a3e8cb3ddf805e4a5736a575c1f64337a97b88ef434e04" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75ce030253d231e96f336c363480733f6d917b883af0e1d2f7f67dd573fad0f2" + 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..6f81ade66ed28 --- /dev/null +++ b/Formula/u/uade.rb @@ -0,0 +1,83 @@ +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_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..c1fc9a992f159 --- /dev/null +++ b/Formula/u/ubertooth.rb @@ -0,0 +1,40 @@ +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" + + bottle do + rebuild 1 + 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 = ["-DENABLE_PYTHON=OFF"] + # 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..9b3931bacdbeb --- /dev/null +++ b/Formula/u/ubi.rb @@ -0,0 +1,36 @@ +class Ubi < Formula + desc "Universal Binary Installer" + homepage "https://github.com/houseabsolute/ubi" + url "https://github.com/houseabsolute/ubi/archive/refs/tags/v0.6.1.tar.gz" + sha256 "0aa1e759736514ae22720e81cd935695724a84d352a3c7407e627acc9e36e816" + license any_of: ["Apache-2.0", "MIT"] + head "https://github.com/houseabsolute/ubi.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "77044473c4211322ef1d39a83adc89ba2ab7ac866127b61bc940c651c5ff8898" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4208c9b4fe77b880765080624e02c75e2f7953e09f6b637dff3bb99b10fed100" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ed494e3cbe9bb19fa85c9f53a73fb0ce45e65900ba729cebbc969f1dfa9ce9ea" + sha256 cellar: :any_skip_relocation, sonoma: "66a4c764f03fad10385acfcaff25b9128cbd641d3384b14ed093ba417da57894" + sha256 cellar: :any_skip_relocation, ventura: "b7ea9d319f4122c83f32db52eda9f3c86da3f1f61e07bf02cc15392e95ee5f89" + sha256 cellar: :any_skip_relocation, arm64_linux: "1802de977e5ef152ed0457ffee5a9b761758a2d4c10827d078554c5f79193b7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5e8937cdfce9e480918089a701cda089cd4573b6fecd8ca9c46b5c54e1484629" + 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..524afdeb62f9e --- /dev/null +++ b/Formula/u/ucg.rb @@ -0,0 +1,76 @@ +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/formula-patches/00615b433f5d2e3eaaf0075fbf4c63d0d732f8c8/ucg/xcode9.patch" + sha256 "3005fda5923cfa3093ce53ad84435fd7a5974f960b2e222e0e59afa90414af90" + end + + # Backport fix for Linux + # Ref: https://github.com/gvansickle/ucg/commit/619be108a10b49cb22441c1cbf378ea630237a2d + patch :DATA + end + + 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, mojave: "2b073d5a0ee4cb2fe71822ce27c014b00974298cfc656f1fe0279f58bde398f9" + sha256 cellar: :any, high_sierra: "3642e741bc9ffd1cf1982bfc2c373e0ed54a417c08ac46f43e4cf8a09a0a1a8a" + sha256 cellar: :any, sierra: "dddf2d62a2e582a9356a4da6434ddb0432ce6d6b1d50a5dc6728f9b6254531a5" + sha256 cellar: :any, el_capitan: "e4699a681ae9d2e9d68ce7da85fc050907070bc9650fad0c4f76faf991f3a422" + 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 + 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..c22afa1aae93d --- /dev/null +++ b/Formula/u/uchardet.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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_NAME_DIR=#{lib}", *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..44e46001ab346 --- /dev/null +++ b/Formula/u/ucl.rb @@ -0,0 +1,86 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "89c37d38b41d5107f85c0880eb1599c885dafc2a7150a378c645b3fbe1f0e5ef" + 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..133ba9f1229d2 --- /dev/null +++ b/Formula/u/ucloud.rb @@ -0,0 +1,29 @@ +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_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, 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..91485b886668f --- /dev/null +++ b/Formula/u/ucommon.rb @@ -0,0 +1,79 @@ +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 + + bottle do + 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..efb1ad5e1da5b --- /dev/null +++ b/Formula/u/ucon64.rb @@ -0,0 +1,70 @@ +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 + + bottle do + 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" + + resource "homebrew-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\") \"#{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").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..1c34ce9732aa4 --- /dev/null +++ b/Formula/u/ucspi-tcp.rb @@ -0,0 +1,61 @@ +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 + + bottle do + 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, mojave: "f464584f762728957020fce03d331fb6e96c79a721cdd5911afb452d4b91da7b" + sha256 cellar: :any_skip_relocation, high_sierra: "b3f2714c61a157eb31ef53915901c29c24ad3dc5cf7d7c3403dcd501399e26b4" + sha256 cellar: :any_skip_relocation, sierra: "46d324e867e5a35cbb17e8a215ff33f693651d11645eed116e4e4a6c02085b34" + sha256 cellar: :any_skip_relocation, el_capitan: "a57368e57812063bc4e1450c0bef5cad8392c44e54abf3c8ca950ea51abe7ae9" + 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..411abf409235b --- /dev/null +++ b/Formula/u/udis86.rb @@ -0,0 +1,48 @@ +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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "552bcddb3008d7acd654983862ce26f6bf71969bc2e94cc2cd2d1b9e89998815" + sha256 cellar: :any, arm64_sonoma: "0a1f4f4ba4fd2a3187075c2390eab0ac8ea0e3aa49d74e6ca74752269cd383b6" + sha256 cellar: :any, arm64_ventura: "4b94655d1de023c07b206dc196d082d727fb4d912b712e4c43ace873236ec5ed" + sha256 cellar: :any, arm64_monterey: "d21c7de8ded29dbf2218802883f3a2e702e338722345b06aeab3a5146b81b29e" + sha256 cellar: :any, arm64_big_sur: "97a5c453ede751fa70387f5c66f3c618bdc421d29ed1da6ec6e002b0efd7705f" + sha256 cellar: :any, sonoma: "15f7586105f9b0b33dd462d435f94cc746461efa2a74be5f77461b6cf91171c6" + sha256 cellar: :any, ventura: "366578e443141baec010770da4ae054d44d271491c6a93263d2d82b28d4f0c8b" + sha256 cellar: :any, monterey: "d3b5ae26039dad3f35b3ead709fb8ee9be23ccaeb619d0b009830e7d94e151db" + sha256 cellar: :any, big_sur: "d34571cf019e170edc18b80d678db9d27d1cbbeab7e4c1ba9e667868a1d3dd43" + sha256 cellar: :any, catalina: "6e9b87a5a4d1de46246e92bc536113a6a56ec0c4565c2c0c0d122eb34ff4025b" + sha256 cellar: :any_skip_relocation, arm64_linux: "d1cd6298235b1d5564a160a769f28944c1325e34fb836546c1c0362c271baf7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a8a15d4f3b8bad23184fdace5ddc482e4d1b5d7f98030791ecf91983ec909d5a" + end + + depends_on "python@3.13" => :build + + # Fix -flat_namespace being used on Big Sur and later. + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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.13")}" + 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..3d478ab800414 --- /dev/null +++ b/Formula/u/udp2raw-multiplatform.rb @@ -0,0 +1,52 @@ +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" + + bottle do + 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..5754604163c5f --- /dev/null +++ b/Formula/u/udptunnel.rb @@ -0,0 +1,60 @@ +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 + + bottle do + rebuild 2 + 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..d5aae4bf943b3 --- /dev/null +++ b/Formula/u/udunits.rb @@ -0,0 +1,56 @@ +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 + + bottle do + 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 mojave: "c1c3d199cfc58d42469bfb423e269dd9b7771e155f710e0e46bfb6a33fdc19f4" + 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..b88ea1d92d622 --- /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 2 + sha256 cellar: :any_skip_relocation, all: "561e844026e50a7d961338d459851e9d62bca87f7449fc9404234b31a24e73d2" + end + + depends_on "python@3.13" + + resource "mslex" do + url "https://files.pythonhosted.org/packages/b7/ec/530f1098d88f2076038799ddfe29d9b6e4d982df938ef6288e67d18b3f68/mslex-1.2.0.tar.gz" + sha256 "79e2abc5a129dd71cdde58a22a2039abb7fa8afcbac498b723ba6e9b9fbacc14" + 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..4c6f6c56dd857 --- /dev/null +++ b/Formula/u/uffizzi.rb @@ -0,0 +1,205 @@ +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_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..7a6cffcb8ebe1 --- /dev/null +++ b/Formula/u/uftp.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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..3b92c4f66b78c --- /dev/null +++ b/Formula/u/uftrace.rb @@ -0,0 +1,51 @@ +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.17.tar.gz" + sha256 "04d560011c7587eddedcc674677cbef9ddc0ace449601d4b355e78589b16134f" + license "GPL-2.0-only" + head "https://github.com/namhyung/uftrace.git", branch: "master" + + bottle do + sha256 arm64_linux: "ec90ba5e7e1e22a853790ebaea9e4e227f71b5cc61785c44d213a7c11ce42458" + sha256 x86_64_linux: "1403c9e2ac729fcb07b71e4a376d3b2824df0d7017e4266cf8bbd147e58d9160" + 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.13" + + 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.13" + 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..7b2e8f1fccfdd --- /dev/null +++ b/Formula/u/uggconv.rb @@ -0,0 +1,55 @@ +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, mojave: "71b4a6ad5be4b5dbefe2c64dc17b6bcff00eedcf72070f4a22273ff1f0a392cd" + sha256 cellar: :any_skip_relocation, high_sierra: "ed41635e3235d763c9dcad68db2e390821af5a62ec6709fca8b9c5e9b5d0b995" + sha256 cellar: :any_skip_relocation, sierra: "a22594f94bf7baa1908bd1225f52f1db3dd01daa17f99038ecfbd60e22d12b5d" + sha256 cellar: :any_skip_relocation, el_capitan: "5ab8b271f2ccc17e5229921f01b92ff7b0c297908902c83d24612bb47592af3c" + 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 + + # 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..dafeccea4515f --- /dev/null +++ b/Formula/u/ugrep.rb @@ -0,0 +1,42 @@ +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.4.3.tar.gz" + sha256 "105b495f4d2773802b5a71e2375ba07bca4e67fd6837e5fc1d00be5cf4938f16" + license "BSD-3-Clause" + + bottle do + sha256 arm64_sequoia: "e451587ccdfcc0a15454bebfca1a7f2cd0fc12a78e3491e443f1dc58372566f5" + sha256 arm64_sonoma: "7d4b883ee11da8b25b2f61ec5d026dbe77674339782064d133c1d6f1eee1d6ee" + sha256 arm64_ventura: "1333f5203fad9861ad274d1889da6f49c962dfe321b9d6050ea10c8f32471a1a" + sha256 sonoma: "eee3d694c71c94412d2ca08f1feee134af9b47556cf6bf7a9d2bda93c7b7df26" + sha256 ventura: "d35a6c5b6af5957056b62c3a7a50e0bcdc9b95989bedbdbb36426829c85b7bdc" + sha256 arm64_linux: "d300b60a9392d49aefff176bc28bbbd9d40bdd98c932e52d20a59827c61d891c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ebea2ef0eec2b79f8a62cec80e50d32b27df9c461cb0222138943e58f200e70f" + 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..d5b93bde2fe6e --- /dev/null +++ b/Formula/u/uhd.rb @@ -0,0 +1,80 @@ +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.8.0.0.tar.gz" + sha256 "a2159491949477dca67f5a9b05f5a80d8c2b32e91b95dd7fac8ddd3893e36d09" + license all_of: ["GPL-3.0-or-later", "LGPL-3.0-or-later", "MIT", "BSD-3-Clause", "Apache-2.0"] + revision 1 + head "https://github.com/EttusResearch/uhd.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "ebaad7dcd0a6646f5bba5fb5d2ec4741caba9c9512a40ccc45876b91adda40f9" + sha256 arm64_sonoma: "b81edc91475c72d0a15f1043619819316f3f268476dd5c416220c5ec16b30c23" + sha256 arm64_ventura: "bc397dbb79d7c69e12b2df8988fc4d36ffb1dcc1199c33acf322a10d5ebb73a3" + sha256 sonoma: "88b4e190d80fc5342838f7aa22dfd2b8cb3a529455181cf0708e2af6cae83373" + sha256 ventura: "477921aa456e442999d455a94068c158878e11f3fe6bc662f82c2c4a03476acc" + sha256 arm64_linux: "23a80186cfe77cbba4fa2bbd2e088d0f4f7f2b28108e1966d3b76c35b53cd931" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c8e6f330239720cba66bd647287d85126b9f32cd0eac5d30aaff28539049ef7b" + end + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "libusb" + depends_on "python@3.13" + + on_linux do + depends_on "ncurses" + end + + resource "mako" do + url "https://files.pythonhosted.org/packages/5f/d9/8518279534ed7dace1795d5a47e49d5299dd0994eed1053996402a8902f9/mako-1.3.8.tar.gz" + sha256 "577b97e414580d3e088d47c2dbbe9594aa7a5146ed2875d4dfa9075af2dd3cc8" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + # Support building with CMake 4.0, pr ref: https://github.com/EttusResearch/uhd/pull/849 + patch do + url "https://github.com/EttusResearch/uhd/commit/8caa8e1d1adb6f73a30676f42c2c80041ccc4e9a.patch?full_index=1" + sha256 "818dd3e65c7c25040887850713fa9bf9a3f6cf3ef791b1f73f7b8de12921452f" + end + + # Support building with Boost 1.88.0, pr ref: https://github.com/EttusResearch/uhd/pull/850 + patch do + url "https://github.com/EttusResearch/uhd/commit/16dbcb37976ca1e959d275f20246924fb455176e.patch?full_index=1" + sha256 "0dc5cf491ca2037819e894fdb21b8b98230eb8ca2aee0d2312889e365da961e8" + end + + def python3 + "python3.13" + end + + def install + venv = virtualenv_create(buildpath/"venv", python3) + venv.pip_install resources + ENV.prepend_path "PYTHONPATH", venv.site_packages + + system "cmake", "-S", "host", "-B", "build", + "-DENABLE_TESTS=OFF", + "-DUHD_VERSION=#{version}", + *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..6cf63e1ca3820 --- /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.84.tar.gz" + sha256 "bb2acbdd294dd05660c78ba34704440032935b8bc77cae352c853533b5a7c583" + license "Apache-2.0" + revision 1 + head "https://github.com/chipsalliance/UHDM.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "670acc688d73fba8ac6565fca378f022b5d1f6f37699df288ee5e9dc38b8b656" + sha256 cellar: :any, arm64_sonoma: "255be8c70c052277b40458bbb152fd969c46ccf12ab9108e6f1dfad702d1ce37" + sha256 cellar: :any, arm64_ventura: "4b261cec78b1348d493ea3147509161746b1198fde4c6a5251fa346b0e3d13b5" + sha256 cellar: :any, sonoma: "73ea9f87f818f189e140a0871d93a130f038d5c082465209c025ee4eb65517b6" + sha256 cellar: :any, ventura: "5cbdabfcb3ea0e53e3b1682f544c1aff82613b71ce89d047fc393638ffd3a5d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "b9f3fc34c3cf05f8674c551793cdf1492f151f93496016eb7a2e6ee8fe76726d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "84b61a7b60b854c05302fcac7cf6a6fecdf54682a879f062ff31fc4bbdbad012" + end + + depends_on "cmake" => :build + depends_on "python@3.13" => :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/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + def python3 + which("python3.13") + end + + def install + venv = virtualenv_create(buildpath/"venv", python3) + venv.pip_install resources + + system "cmake", "-S", ".", "-B", "build_shared", + "-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", + *std_cmake_args + system "cmake", "--build", "build_shared" + system "cmake", "--install", "build_shared" + 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..99292efea76f2 --- /dev/null +++ b/Formula/u/uhubctl.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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..00994cfd47730 --- /dev/null +++ b/Formula/u/ulfius.rb @@ -0,0 +1,56 @@ +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" + + bottle do + 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..004440c2bcf20 --- /dev/null +++ b/Formula/u/ultralist.rb @@ -0,0 +1,36 @@ +class Ultralist < Formula + desc "Simple GTD-style task management for the command-line" + homepage "https://ultralist.io/" + url "https://github.com/ultralist/ultralist/archive/refs/tags/1.7.0.tar.gz" + sha256 "d4a524c94c1ea4a748711a1187246ed1fd00eaaafd5b8153ad23b42d36485f79" + license "MIT" + + bottle do + 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, mojave: "5bf8a9d39b953f0c24c8a1b978fab945f667a5f4e48c0d2729162f948f3b9118" + sha256 cellar: :any_skip_relocation, high_sierra: "eff4c2ac2bd4d1a4bfe6f0d2bcd92b4c572d17eaa047df909533d8f510f366a1" + 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..4704c1fa62a4c --- /dev/null +++ b/Formula/u/um.rb @@ -0,0 +1,57 @@ +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" + + bottle do + 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, mojave: "a4d8c9ddc2b46076eaccf3e3d4eaa43918f3d156e8abd16ad1415ea85f2da8f5" + sha256 cellar: :any_skip_relocation, high_sierra: "a479ed6f535f228d1bfa15a7292e58d06a4f07d1238c4fa83f1b99c80564a24e" + sha256 cellar: :any_skip_relocation, arm64_linux: "85c354a3514a26d514680306f030dfaa2a247f71ef772d1b3e1d5920b9c7fec6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c71496a39f88373f2f233b19384bb1ef43e631b280ca0ba51ffcd2838012904f" + end + + uses_from_macos "ruby", since: :high_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.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..baa901e0c600b --- /dev/null +++ b/Formula/u/umka-lang.rb @@ -0,0 +1,51 @@ +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.3.tar.gz" + sha256 "03b69332644c60979ba2d2e5956efd22aff3cfc2e910f14f49a8ec89ef8d5cb9" + license "BSD-2-Clause" + head "https://github.com/vtereshkov/umka-lang.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "619485bf5111fe84290708d9cb36087218f6c1c86f93a20e84572b08bf7a8147" + sha256 cellar: :any, arm64_sonoma: "8328857fea1931da5dfdc487a0b2ffd5d12e94401030502d2bfb968378da3eb5" + sha256 cellar: :any, arm64_ventura: "418314a8adc1c93e4c0e6400ea30672664038991510fbfdc0c11a3a71f507d0a" + sha256 cellar: :any, sonoma: "be7676e4e428a30af843522db044123aaa4b802e332c6cf0e9d23de034d7d013" + sha256 cellar: :any, ventura: "e49db55cf30c555f77ce8369c390a7cc3de87357e85de67d473193491bba43d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "ef1a81f5e6fe38ebeb15082fa96b485b0a5ba97a5924c1f26cd982d99864cacb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c2c27a893352932034b036222eaffa57f761c6f1595734480031cfad76e87049" + 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..75e0b51dcd360 --- /dev/null +++ b/Formula/u/umlet.rb @@ -0,0 +1,38 @@ +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 + + 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..98efdcd4dc86a --- /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.1/umockdev-0.19.1.tar.xz" + sha256 "2cece0e8e366b89b4070be74f3389c9f7fa21aca56d8a5357e96e30cd8d4f426" + license "LGPL-2.1-or-later" + head "https://github.com/martinpitt/umockdev.git", branch: "main" + + bottle do + sha256 arm64_linux: "ca0cdf39df6bd2a6520a838d7c72945674574019b48b7863f31df0e4e5d67234" + sha256 x86_64_linux: "7ad4f20e560ca3dbff215a5780424964b2773b4f8f10269cab867ffaa5dbb86d" + 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..c36c85b86bc08 --- /dev/null +++ b/Formula/u/umple.rb @@ -0,0 +1,34 @@ +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 + + 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..9f2fa2b955aac --- /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 + + bottle do + 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, mojave: "29753f2d4ea3f9a56f9a3d8fdca4c4fe47044ff1bc986d9ecc06d5f376197da6" + sha256 cellar: :any, high_sierra: "eade4a2fba6e5828dccd3779b5e6681ca2558dbde421639624f089be835c55e8" + sha256 cellar: :any, sierra: "b97f2799eafd917f8fe1cc47c39634bc91a19ca452ce11ec8fd5edf37ea1dba3" + sha256 cellar: :any, el_capitan: "6c9d63dde182a55e237e63cfa4ab625164ce275e343fd88003483227bd7439bc" + 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 + 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/u/unar.rb b/Formula/u/unar.rb new file mode 100644 index 0000000000000..946c030e5be24 --- /dev/null +++ b/Formula/u/unar.rb @@ -0,0 +1,88 @@ +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_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..6bbd3b81a806d --- /dev/null +++ b/Formula/u/unbound.rb @@ -0,0 +1,72 @@ +class Unbound < Formula + desc "Validating, recursive, caching DNS resolver" + homepage "https://www.unbound.net/" + url "https://nlnetlabs.nl/downloads/unbound/unbound-1.23.0.tar.gz" + sha256 "959bd5f3875316d7b3f67ee237a56de5565f5b35fc9b5fc3cea6cfe735a03bb8" + 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_sequoia: "33f3d8956a29f2c065fe890a4ef55970022945ede4721d6d530d9cc4e45e7c86" + sha256 arm64_sonoma: "b37bbbb0447036088b938705a283bd0f570eaf8562238d9162edb327a941c5fd" + sha256 arm64_ventura: "aa011b012f3a23a634bc354cb84a50cb239fcc7d2f4afc4a7454cc9c9072df0c" + sha256 sonoma: "56d85f9df58335d35be4e2b1aadc67ecb12a0b813da18840deb575e5c4f68cb8" + sha256 ventura: "420064bdae0bfbef806f53700dc73a884d0b207b3a1e0c8582c5026cc9bfac5a" + sha256 arm64_linux: "871c62df5926f27997b08b60fa23eddae72aac7ceff90167d417ef937f821819" + sha256 x86_64_linux: "39a3c566109924b4ae52fe0972c7794f03dcbcb0015feee396a9fe082701ace9" + 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..05cfa4003bc77 --- /dev/null +++ b/Formula/u/unciv.rb @@ -0,0 +1,28 @@ +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.16.9/Unciv.jar" + sha256 "49acdf96f5bd0333992a0c55d309a5a890d1f74ffd7bed3d7a979f9e80e43e23" + license "MPL-2.0" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+(?:[._-]?patch\d*)?)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "7f78a7d0b568cfae93571e9dec960abd6ffe6dae8315b3be222d5bd30022c3a0" + 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..348b8e5a72ef7 --- /dev/null +++ b/Formula/u/uncover.rb @@ -0,0 +1,28 @@ +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.0.10.tar.gz" + sha256 "289255ef356cadff97a8cf3726c851f6b62d3ee4ba31a9b0aedc2ea017f9bc52" + license "MIT" + head "https://github.com/projectdiscovery/uncover.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d03417b1d17d51e2d91369c9f0ab7e7a1499f0648f1dea1cc88f7a784c77a40b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c05b47cdc0686f5ad043080a7c26e910ab54e8240f494d0cd7ab247bb07fa363" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4f4ca83eb1da538ee2ed9b0cc93657dbf46eb2a2861b57857c445dd6a040ccc6" + sha256 cellar: :any_skip_relocation, sonoma: "201a8ba60d42fba4a063dc46107bf5ddb729ce55f4b0f888579f80a501a70f44" + sha256 cellar: :any_skip_relocation, ventura: "19c65572a1babe94a2c54c25d4e14a5511971272558ca7c18cb1221426184dd5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30c42150478545b48e3711a0f5f34ad0c620b9aa59987882c25b4d2f46ae10b5" + 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..ec3bc2c2cc744 --- /dev/null +++ b/Formula/u/uncrustify.rb @@ -0,0 +1,46 @@ +class Uncrustify < Formula + desc "Source code beautifier" + homepage "https://uncrustify.sourceforge.net/" + url "https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.80.1.tar.gz" + sha256 "0e2616ec2f78e12816388c513f7060072ff7942b42f1175eb28b24cb75aaec48" + license "GPL-2.0-or-later" + head "https://github.com/uncrustify/uncrustify.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8ca9b30a47c171cae16d7332361d1e4e7a3870df19257cf19459ebfd3044bc7f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "157a68626f5eede2f37c574b0dc920eb94a084f42de04e2419e6ad277aa6e221" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8dc2eb428f5d4cb4ca7f302074859c88e1c8b4ced9b61811ce89866c1bbb09ac" + sha256 cellar: :any_skip_relocation, sonoma: "a95b0762b9ae4860c58a0f776e54f6cbe7cc0a722b6501e8671debc6b131f53e" + sha256 cellar: :any_skip_relocation, ventura: "547a9696faaf9b80195e72ace9a0caf59d68ad0394e5aa2862cb43017c66023a" + sha256 cellar: :any_skip_relocation, arm64_linux: "9fd1e80df05f05e200787dadf2be03a4ce475f6166c505184f4364cf9a79f3d9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3ab2a6cd25ee6ef310d75e2052933f6779cbf482c2f52c01f32aba887a5901cd" + 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..3db1864200031 --- /dev/null +++ b/Formula/u/undercutf1.rb @@ -0,0 +1,55 @@ +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.1.85.tar.gz" + sha256 "a3f1f6e5653b7babb66b95e6a149fe8cf755b511e43922e031c066d6fa2b8f58" + license "GPL-3.0-only" + head "https://github.com/JustAman62/undercut-f1.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "825d3b2df028d04a8a40b52379f60c0091aadf4b6c2c9676463580733d5065fb" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5dd46cb5beadb80637ef57922e00b63dfc33263d648f84444961332e2faa2ffd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0e9aae1b9825d5f73325af75caa3667d88d9d2d769bca1d17d7c244701f8e6a4" + sha256 cellar: :any_skip_relocation, ventura: "23374e22ef467d6f6fefc001aad9444b9a976e5e26437f21cb229a98706dffcf" + sha256 cellar: :any_skip_relocation, arm64_linux: "610c45cd962355221acfc31cfacf924b5e3e829e108ad19df5e35237b09613f7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c98ab303a8414436a23178238933fa3e25a501632a1bf1ef84ebdd92073b95b3" + 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..40fa0e4554bdd --- /dev/null +++ b/Formula/u/ungit.rb @@ -0,0 +1,35 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bfd52fb0ffc9a61cd102d33728d26059f661b6a9b70e723cf5378e9bf5afd082" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "bfd52fb0ffc9a61cd102d33728d26059f661b6a9b70e723cf5378e9bf5afd082" + sha256 cellar: :any_skip_relocation, arm64_ventura: "bfd52fb0ffc9a61cd102d33728d26059f661b6a9b70e723cf5378e9bf5afd082" + sha256 cellar: :any_skip_relocation, sonoma: "ee759a9c1cea66c47c0b2be863683ae8b67d3f65f6627e850c478c3a5e032a1e" + sha256 cellar: :any_skip_relocation, ventura: "ee759a9c1cea66c47c0b2be863683ae8b67d3f65f6627e850c478c3a5e032a1e" + sha256 cellar: :any_skip_relocation, arm64_linux: "122896c7430c84b1086d09b9a762fab35eb8d589a0049429e8447cbcc8ae2923" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bfd52fb0ffc9a61cd102d33728d26059f661b6a9b70e723cf5378e9bf5afd082" + 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..a40e6cb61a92a --- /dev/null +++ b/Formula/u/uni-algo.rb @@ -0,0 +1,48 @@ +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_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..2d8b205da6bd7 --- /dev/null +++ b/Formula/u/uni.rb @@ -0,0 +1,29 @@ +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_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..f75ca10fa64bf --- /dev/null +++ b/Formula/u/uni2ascii.rb @@ -0,0 +1,56 @@ +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_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/formula-patches/bb92449ad6b3878b4d6f472237152df28080df86/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..512075e8ffa7f --- /dev/null +++ b/Formula/u/unibilium.rb @@ -0,0 +1,64 @@ +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_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..d86dc3df97079 --- /dev/null +++ b/Formula/u/unicorn.rb @@ -0,0 +1,78 @@ +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.3.tar.gz" + sha256 "5572eecd903fff0e66694310ca438531243b18782ce331a4262eeb6f6ad675bc" + 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 + sha256 cellar: :any, arm64_sequoia: "be54fd832159f1d3fda1b1c23e01f2f4a981df0b2832bf6dc3421fde20f8d2ba" + sha256 cellar: :any, arm64_sonoma: "ad018ba42442daad5e4dfd902d6dff8ad851c4540d18c268f513e6f2f70e8cd4" + sha256 cellar: :any, arm64_ventura: "2be056cfd6cfbd60ee30fefee65a8d6bfefd0fce7a15b2e9d7b14f7fa0fb26c8" + sha256 cellar: :any, sonoma: "dbe751ecc5f13bb438892e671ef7efa7a5d4fa4b82c25fb110ea587bc46ce74e" + sha256 cellar: :any, ventura: "79c598b769e4368bc5ec5f49468f4a00652703945d567b3fe5b193dc093fffb0" + sha256 cellar: :any_skip_relocation, arm64_linux: "7baa47e32d8535154a863fd96ca1692451cb0b5bffe63fcb6aeae783d69a9802" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30a61ebcf75b64b23cd9c1043d08e1ab680d6f1d752538b42d72a8b33bbc7c0e" + 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..5e899673f39f5 --- /dev/null +++ b/Formula/u/unifdef.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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, mojave: "ded3ae5ba762ee493fc5ed45d0e6ed5a8261b4bf9bc2de54880f4a373b1ba075" + sha256 cellar: :any_skip_relocation, high_sierra: "74ec90a8fc2467e8d613f2a6347d973dcd6387fdd9734bc66088a64ace7e0d4d" + 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..466f15ff3efd9 --- /dev/null +++ b/Formula/u/unison.rb @@ -0,0 +1,43 @@ +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_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" + + 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..760ff2804ec78 --- /dev/null +++ b/Formula/u/unisonlang.rb @@ -0,0 +1,117 @@ +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.40", + revision: "468e355113bbad2f72d18ce27788f4323b0784b3" + + resource "local-ui" do + url "https://github.com/unisonweb/unison-local-ui/archive/refs/tags/release/0.5.40.tar.gz" + sha256 "d7e929e0de9e45f56e9ed3bc1e95591aa60dbb28f0de35a19afaeb7ac29d9be3" + + 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_sequoia: "75c91467d276477fd34e624af8ac4e44fd16aff613e1596d55b7c14ff303556d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb94cd1e12115c8e58adde03f1d0cfc26ef36f6a1b7a60a251adeb425c424390" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8602c23752ec792b7171110c625c445fd1f60a08b0080006aeca7582c736e000" + sha256 cellar: :any_skip_relocation, sonoma: "2363ae68bd1e50902effe27beffba9de2cb441f6dc22e2e2e32aa454e319e655" + sha256 cellar: :any_skip_relocation, ventura: "07d831bcbf16c85dc0ac123645507310f615682f33f31db750512184c59c8f7f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d2f6729b7fe8b4e64813d56c94948d0f9c6465ddea444207261dead45923ddc2" + 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 "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" + + on_linux do + depends_on "ncurses" + end + + 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 + system "npm", "install", *std_npm_args(prefix: false) + # Replace pre-built x86_64 elm binary + elm = Pathname("node_modules/elm/bin/elm") + elm.unlink + elm.parent.install_symlink Formula["elm"].opt_bin/"elm" + # 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..75daed2368906 --- /dev/null +++ b/Formula/u/unittest-cpp.rb @@ -0,0 +1,52 @@ +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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + bottle do + 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, mojave: "9837dfbba5a3014097d3b406bd48e174a6a788d0c0b3107bd1fabeeb0ce6b89e" + sha256 cellar: :any, high_sierra: "206f44c35a82fac519b64b8c4ae6bc397e360d8404e8279a24b906d7729efed2" + sha256 cellar: :any, sierra: "91d028b464f32fcf6edda6b791be2b70d9b770934edd7af7d2b8ff24e9c5eb06" + sha256 cellar: :any, el_capitan: "6136d8cdc420681130c59d9f77327ddad6b46a35d29da5be760b522c7456e2a2" + 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..8b60a15829098 --- /dev/null +++ b/Formula/u/unittest.rb @@ -0,0 +1,42 @@ +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 + + bottle do + 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, mojave: "a1ab22f2b4904a5c03ea8642fa096166b9fcc131e535a1d15e07772e1fbcea8d" + sha256 cellar: :any_skip_relocation, high_sierra: "b34ab2aa983e33bf86eda07a58af410a769da7e969620e479c6f7e965de2c397" + sha256 cellar: :any_skip_relocation, sierra: "c997c9ce2d6984607af24a6dc7dc21ddefc0570a15d2fb61192b3a361120a83d" + sha256 cellar: :any_skip_relocation, el_capitan: "501b61d05de70cfb53116c66daf380cb35a1665eeecf34dfc6b27ab945458f43" + 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/uniutils.rb b/Formula/u/uniutils.rb new file mode 100644 index 0000000000000..81717fc3a4a24 --- /dev/null +++ b/Formula/u/uniutils.rb @@ -0,0 +1,80 @@ +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 + + bottle do + 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..b4bb05c947f10 --- /dev/null +++ b/Formula/u/universal-ctags.rb @@ -0,0 +1,64 @@ +class UniversalCtags < Formula + desc "Maintained ctags implementation" + homepage "https://ctags.io/" + url "https://github.com/universal-ctags/ctags/archive/refs/tags/p6.1.20250511.0.tar.gz" + version "p6.1.20250511.0" + sha256 "97573f69636766a3f5a3b485fbd3a79311964fa2e4b92a459051310090c0fbd2" + 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_sequoia: "5d39ede94ca382814fca5ed562ee3539563a122c755853e71e8c547df08c7164" + sha256 cellar: :any, arm64_sonoma: "ff793daa4f92117c1a174b61507a5a7a16047003477041b6ac71eb82af357ed5" + sha256 cellar: :any, arm64_ventura: "ec76e1a177549c123031fa767e81b8d328001a82922563bb522924c122f48957" + sha256 cellar: :any, sonoma: "3dd774fd951c7eb62cc4e3cd9c49a39a1703054d113b21a286738be3c4e4a90a" + sha256 cellar: :any, ventura: "f4f652013de6a5ac5e63e68b9010e53dfdab61e133b9e822aa69bdc52e5b4e81" + sha256 cellar: :any_skip_relocation, arm64_linux: "7c106cc7736c45aff08ec2e5e808376d491ce945da7d9966db4a3033662de2e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "11bc01139084b84733d37b82010f2387374e332189145a3dac61b6075c731d65" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "docutils" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :build + depends_on "jansson" + depends_on "libyaml" + depends_on "pcre2" + + uses_from_macos "libxml2" + + conflicts_with "ctags", because: "this formula installs the same executable as the ctags formula" + + 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..1be0bf57289c8 --- /dev/null +++ b/Formula/u/unixodbc.rb @@ -0,0 +1,50 @@ +class Unixodbc < Formula + desc "ODBC 3 connectivity for UNIX" + homepage "https://www.unixodbc.org/" + url "https://www.unixodbc.org/unixODBC-2.3.12.tar.gz" + mirror "https://fossies.org/linux/privat/unixODBC-2.3.12.tar.gz" + sha256 "f210501445ce21bf607ba51ef8c125e10e22dffdffec377646462df5f01915ec" + 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_sequoia: "d117e16a10d134bc961f57c345296a7279f40376ab626dfa41777bf4cb4e116a" + sha256 arm64_sonoma: "4984c5ec2cd0ddc6393cfd60e42bc5748e3dc173750b74b2113de9b17c864c9a" + sha256 arm64_ventura: "b2d0036483c00d1f3e12b90e288d18b1714ee1b6e95de4d443c0b1101657bfba" + sha256 arm64_monterey: "42752ba1f8be08b3aad93ab465731441911b0b2b6e3af687bd7cc5de0996de49" + sha256 arm64_big_sur: "82de868a1e06efd888aaef1a4b4867aa09f1e8ebb59de5ffe926f70c46f30399" + sha256 sonoma: "626e41606a2ff39516f08affe1c8e2f5396810a15adc7081b574a117e68a3bf1" + sha256 ventura: "362a801fa9dec4ee99daab0d9d6926fee4ca2ad7191677dbee1b564852964ddd" + sha256 monterey: "947aa88dde2ed452e05e9ef37aca672aea40165cd6d748cc8839609f9d7d4141" + sha256 big_sur: "704e008bba860d3baecd0ad178c82b8c59e0eb9b05161d908154723eabbd420d" + sha256 arm64_linux: "f79be5986def99810fdeda97b3422992b4b6134310165e79a43a5dfaa1e5bdb9" + sha256 x86_64_linux: "7f8a5881a0827b6381d3619d681849d72471bd8f9ad9e836793d3216bee77fe4" + 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..e8879b3b649cc --- /dev/null +++ b/Formula/u/unnethack.rb @@ -0,0 +1,91 @@ +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 + + bottle do + 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 mojave: "84267cd44f073a41058516e7a8937da6b8b0f16e3500b0fd10ab0fedad77a5ce" + sha256 high_sierra: "47228cb416afe4d7e9ab31a2b85914e6b27f77e88340f7ef174bb2d9dd3ea2bb" + 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..9fa0e71c0f09a --- /dev/null +++ b/Formula/u/unoconv.rb @@ -0,0 +1,46 @@ +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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4d56e2b15a6258fc3225c01543919e06a92458f16978ffa647b711952dd50a87" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d56e2b15a6258fc3225c01543919e06a92458f16978ffa647b711952dd50a87" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4d56e2b15a6258fc3225c01543919e06a92458f16978ffa647b711952dd50a87" + sha256 cellar: :any_skip_relocation, sonoma: "d8157297c8bd02ce4e450dae741d2c92170c2a895b15818ab29fc1baecbfc9d7" + sha256 cellar: :any_skip_relocation, ventura: "d8157297c8bd02ce4e450dae741d2c92170c2a895b15818ab29fc1baecbfc9d7" + sha256 cellar: :any_skip_relocation, arm64_linux: "7d215a366fb8b1b1592d7b6fff9df212a0f1798cb5a740b9db51028020354389" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98d229d5206a98c1b525a0fd707041b499c6dd9cf3a2c9ccbc92f3a18fb36e1b" + end + + deprecate! date: "2025-04-27", because: :repo_archived, replacement_formula: "unoserver" + + depends_on "python@3.13" + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + 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..2d34604d18029 --- /dev/null +++ b/Formula/u/unoserver.rb @@ -0,0 +1,23 @@ +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/18/3e/00ed93bc9784406515f821757008928a4c9d148229cf5c00c5c805edfdec/unoserver-3.2.tar.gz" + sha256 "331136b3f0eca52a36e723e2b99f2795f27c8b6d9d8c096ed4ef7ae33cbdf3d2" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "7b161b4609c4c19868eb82bf7fd428deb260633e2a70c2929df1584a401f1a0c" + end + + depends_on "python@3.13" + + 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..bfdca0892224d --- /dev/null +++ b/Formula/u/unp.rb @@ -0,0 +1,38 @@ +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 + + 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..00971870488a7 --- /dev/null +++ b/Formula/u/unpaper.rb @@ -0,0 +1,52 @@ +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 2 + head "https://github.com/unpaper/unpaper.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "698367ece512da282636d61bd2a514efacb0d014684cc2ae663d9f0121cf3d64" + sha256 cellar: :any, arm64_sonoma: "13a3d8a2709a9ff5af9d0cfe4149ecfed559ab159e89157d090363226a94149b" + sha256 cellar: :any, arm64_ventura: "bbce025f0f3d27f9980e1032a83434024d6dca13fb547c4360c481cda4c43d65" + sha256 cellar: :any, arm64_monterey: "10c463411cad146cee0c513868d177e9a5ec6d1fdea8f9cb2ad466f08715ac48" + sha256 cellar: :any, sonoma: "1de18988f8f9373530a98bcdc7390dc87817e828b109171a284f60ac70c524e7" + sha256 cellar: :any, ventura: "9f4cc2bc495825b3b08e4103dda38e194dded68c4a3f122182d408b43a5b0bda" + sha256 cellar: :any, monterey: "4ea845e807a1a65a35b1e7d56dab12ee3778d18446770b6afc6f708d858e8dad" + sha256 arm64_linux: "57a7bfae48a116ac2a5959780987ff778a03ebeadffeaad41a6da433b25ef3a6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ae26a1afe4806f2903bbfce2d359c7485b75bdf1bc04e25674fd0cf3b283605f" + 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..08fd0b8dcdd83 --- /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://ftp.gnu.org/gnu/unrtf/unrtf-0.21.10.tar.gz" + mirror "https://ftpmirror.gnu.org/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 + + bottle do + 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 mojave: "b038c53ba7341cc9365db6cf9d46c6f7c3feba843643168e24a12856a29a6dbb" + sha256 high_sierra: "9abc63bdeae500637c8e1d6d31c72be013d0f2cf8ad8e3f1cb6e3babe5b6d94a" + sha256 sierra: "4c9e869dad1a76bf4077d9e19cabf9d383ed914b5a1c348dadc1eb0961c23b0a" + 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..9545c660d571c --- /dev/null +++ b/Formula/u/unshield.rb @@ -0,0 +1,36 @@ +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: "master" + + bottle do + 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..c58638f20442a --- /dev/null +++ b/Formula/u/unum.rb @@ -0,0 +1,39 @@ +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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2bbbba3414c284badb1f16726092c9c2b0df15e584442b6f9a57a86b6136c7f5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "da2908ba84393f040c3fd859a4c1f44c9ead4a5ce06cee7dd38625065e0631bb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "da2908ba84393f040c3fd859a4c1f44c9ead4a5ce06cee7dd38625065e0631bb" + sha256 cellar: :any_skip_relocation, arm64_monterey: "da2908ba84393f040c3fd859a4c1f44c9ead4a5ce06cee7dd38625065e0631bb" + sha256 cellar: :any_skip_relocation, sonoma: "11d6646154273911dea7b648880e183aeab4a93bb6599a696c059f4dde13d98d" + sha256 cellar: :any_skip_relocation, ventura: "11d6646154273911dea7b648880e183aeab4a93bb6599a696c059f4dde13d98d" + sha256 cellar: :any_skip_relocation, monterey: "11d6646154273911dea7b648880e183aeab4a93bb6599a696c059f4dde13d98d" + sha256 cellar: :any_skip_relocation, arm64_linux: "24b0920ba95e6fd4bcb98186c548603f8a9e3347fcd176d8cfce6b0d70bca525" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb8caefc407d78aa4c1f58392ae2b227a54ab50ed17734440cf92b1f6aa81298" + 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..df27591e068f6 --- /dev/null +++ b/Formula/u/unxip.rb @@ -0,0 +1,51 @@ +class Unxip < Formula + desc "Fast Xcode unarchiver" + homepage "https://github.com/saagarjha/unxip" + url "https://github.com/saagarjha/unxip/archive/refs/tags/v3.1.tar.gz" + sha256 "d76cabf3c0c057d87fd910ab0de5d9a1108b037f7e7406802f40885d80d49295" + license "LGPL-3.0-only" + head "https://github.com/saagarjha/unxip.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "abf884e88603357d56ed83f95f8d1bc6f366e3542578d823beb6414c97240d58" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6b25d509ece5113ddc99bb39e0ce031b578be3a6d146ecce3105e208da6f214c" + sha256 cellar: :any_skip_relocation, sonoma: "e7f685faaad5e16412bce583d9420617136a7b3b04d2b399b6c25492afcddd54" + sha256 arm64_linux: "2307c9e9f92bd26c481d2754d2026470a8c9197af2ac0fba2b2da1081366a713" + sha256 x86_64_linux: "e8ce3607ab1d6aeb51833fc2862c38e28068d172d00b865a89cd2d305ebf69a3" + 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..1e800a92ba431 --- /dev/null +++ b/Formula/u/unyaffs.rb @@ -0,0 +1,38 @@ +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 + + bottle do + 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..1971683aaca63 --- /dev/null +++ b/Formula/u/unzip.rb @@ -0,0 +1,120 @@ +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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a5bd1f2a27a5353a3ce249bdd414b0976a91129be2afd8fe3c0a796b316f4ed2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "09f467768e0ed9226eebc40f40fd5628c7f9cfa5f314b483751bbf0bf4d05bab" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9f7f6a03fa3ada4a305f5c9b4016b4e8bbe11d66f559273849d8cacd26524e26" + sha256 cellar: :any_skip_relocation, arm64_monterey: "1df3fd1e9b3f5fd816f793355797818113e43378c81e6a0a6a8d1b3e52c0dd36" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "a6cdeb65d1d235eb609cb7ae5b5df19f0c9b20d572661bb3501658f1d5b2d5ef" + sha256 cellar: :any_skip_relocation, sonoma: "4d0a7fbb4f53486b0a9f25f00d0903f52eea8778fdbb0e497fb4ce5ba49c7510" + sha256 cellar: :any_skip_relocation, ventura: "5f332be4c6b05a05a90835e7bef6c93b6b57edcd0cba1571bcdedddb27300fb9" + sha256 cellar: :any_skip_relocation, monterey: "86fbf9a289406fbe3fff052c0818431d757b6123e5776418c3e13370ee2d4af9" + sha256 cellar: :any_skip_relocation, big_sur: "94f235026d1d96ebb52961dcfb6880701d11efdc9cd9869987f8e4712714f9a5" + sha256 cellar: :any_skip_relocation, catalina: "b6cb709857bee04881acb626d24ddb1dcccf50b4508c16a9599625667b4b7617" + sha256 cellar: :any_skip_relocation, arm64_linux: "11112a2c74f3a7faa6561406d9206412d7754b753fe680acee32a1d96df300b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "baf15e19852a0f9756e3302fa6f3866eaeccc06730c9907bffc19f32861d64bf" + 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 + ] + args = %W[ + CC=#{ENV.cc} + LOC=#{loc_macros.join(" ")} + D_USE_BZ2=-DUSE_BZIP2 + L_BZ2=-lbz2 + macosx + ] + args << "LFLAGS1=-liconv" if OS.mac? + system "make", "-f", "unix/Makefile", *args + system "make", "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..55770eedb91ae --- /dev/null +++ b/Formula/u/up.rb @@ -0,0 +1,35 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "e9a517e8c51a5da04f070628b327a24344b8a7d093bee13cb1efa8ed6a8a944f" + 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/upscaledb.rb b/Formula/u/upscaledb.rb new file mode 100644 index 0000000000000..963e5504b0da1 --- /dev/null +++ b/Formula/u/upscaledb.rb @@ -0,0 +1,79 @@ +class Upscaledb < Formula + desc "Database for embedded devices" + homepage "https://upscaledb.com/" + license "Apache-2.0" + revision 5 + head "https://github.com/cruppstahl/upscaledb.git", branch: "master" + + stable do + url "https://github.com/cruppstahl/upscaledb.git", + tag: "release-2.2.1", + revision: "60d39fc19888fbc5d8b713d30373095a41bf9ced" + + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/31fa2b66ae637e8f1dc2864af869baa34604f8fe/upscaledb/2.2.1.diff" + sha256 "fc99845f15e87c8ba30598cfdd15f0f010efa45421462548ee56c8ae26a12ee5" + end + + # Fix compilation on non-SIMD platforms. Remove in the next release. + patch do + url "https://github.com/cruppstahl/upscaledb/commit/80d01b843719d5ca4c6fdfcf474fa0d66cf877e6.patch?full_index=1" + sha256 "3ec96bfcc877368befdffab8ecf2ad2bd7157c135a1f67551b95788d25bee849" + end + + # Fix compilation on GCC 11. Remove in the next release. + patch do + url "https://github.com/cruppstahl/upscaledb/commit/b613bfcb86eaddaa04ec969716560949b63ebd98.patch?full_index=1" + sha256 "cc909bf92248f1eeff5ed414bcac8788ed1e479fdcfeec4effdd36b1092dd0bd" + end + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "f9e07f206aa8c7656e752da77826815d0bc704c2f71beaed6341817b60cb9ba5" + sha256 cellar: :any, arm64_ventura: "31263250b809be124c24d249704e8a84de26c46c12b1f9e4a7abea51dbd79c4f" + sha256 cellar: :any, arm64_monterey: "c6cbe6b8adad2e84227bc980e6c68c4ed4334a4bdfa95a19b2a396adb01b87a8" + sha256 cellar: :any, arm64_big_sur: "60ead2f03c0516d85867b3bf1d5070fcde864c30826e5143bc73bc82dceefe52" + sha256 cellar: :any, sonoma: "69a4883083e54f64c9e7f798eeebf7e449c18ca8a727896e5e77f06caf61ada7" + sha256 cellar: :any, ventura: "6310bae4f6d2a68eada0d688b15ccef4aaba1a1552549bc111dd47bd01ecdbec" + sha256 cellar: :any, monterey: "5972bc432022b76c16388c7accd2290506193e9d375a505f4a4bff3796982425" + sha256 cellar: :any, big_sur: "aaec25a0ebacba42a481712faf1051440c3c457d1a67d1672f495cda961ed93c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "98b54b8cb472d3c1810899301aecbe116c1c0dd5120d476ace114f12ee725d84" + end + + disable! date: "2024-10-19", because: :does_not_build + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "boost" + depends_on "gnutls" + depends_on "openjdk" + depends_on "openssl@3" + + def install + ENV.cxx11 + + # Avoid references to Homebrew shims + ENV["SED"] = "sed" + + system "./bootstrap.sh" + + simd_arg = Hardware::CPU.intel? ? [] : ["--disable-simd"] + system "./configure", *std_configure_args, + *simd_arg, + "--disable-remote", # upscaledb is not compatible with latest protobuf + "JDK=#{Formula["openjdk"].opt_prefix}" + system "make", "install" + + pkgshare.install "samples" + + # Fix shim reference on Linux + inreplace pkgshare/"samples/Makefile", Superenv.shims_path, "" unless OS.mac? + end + + test do + system ENV.cc, pkgshare/"samples/db1.c", "-I#{include}", + "-L#{lib}", "-lupscaledb", "-o", "test" + system "./test" + end +end diff --git a/Formula/u/uptimed.rb b/Formula/u/uptimed.rb new file mode 100644 index 0000000000000..663151d790859 --- /dev/null +++ b/Formula/u/uptimed.rb @@ -0,0 +1,46 @@ +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_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..2255b3728b55a --- /dev/null +++ b/Formula/u/uptoc.rb @@ -0,0 +1,36 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "bd9cc58bd67f536070d5c34cd10733ba9744cfffc8aa3ef74b2ab6d558c32c2c" + 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..1974c174493cd --- /dev/null +++ b/Formula/u/upx.rb @@ -0,0 +1,37 @@ +class Upx < Formula + desc "Compress/expand executable files" + homepage "https://upx.github.io/" + url "https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-src.tar.xz" + sha256 "5ed6561607d27fb4ef346fc19f08a93696fa8fa127081e7a7114068306b8e1c4" + license "GPL-2.0-or-later" + head "https://github.com/upx/upx.git", branch: "devel" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "784eb4d2d244872be35b8a8bd82900ce5789740950620b1a1119141361230b72" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "228b152ff34d6dbd0b7e8aef959013f47b7401cb210fca682c991198cbe2e6c2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0ae84e5f420df6e56821d79bcaf34297b279f73a1b7bbf05c0f6c854358f5b0c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "440dfc0b6936d53746398813a75c4f25d2dbe225692905e18f16d31484a263e5" + sha256 cellar: :any_skip_relocation, sonoma: "0c9a802a2baa5dd6dbc36af16408984436a03fcac927ca62961e4c0e524a2258" + sha256 cellar: :any_skip_relocation, ventura: "aff62cfdbe4bd2c8ddfa370517d6b2a985ff9854dfc7e2ca930cb3b23ca3f9a8" + sha256 cellar: :any_skip_relocation, monterey: "269bbeecc1ba01485fe0f3a591e1f156e2eef1b35bf72b06d9f7969d9213815f" + sha256 cellar: :any_skip_relocation, arm64_linux: "fb4bd2e0a3a11822bee4fd0cc883ac2bd36ddcc35dad53115d499f6a5ba19dbb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "68bbcadfda1328f3a1cd71707feb194434f0a79b8c4542f43cdab27fe2a2c1cc" + 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/hello") + 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..9c72865381960 --- /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/4.0.1.tar.gz" + sha256 "46b122c922f44ec32674a56e16fd4b5d068b53265898cbea2c3e1939ecccc62a" + license "BSD-3-Clause" + revision 2 + + # 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_sequoia: "3ed3dde9c2b78c7f927c4c540a3a90d16985fd6dfc7b94050ea2be6d74c61859" + sha256 cellar: :any, arm64_sonoma: "ca18c2992d4c3bcdd0a4e9f726adea18edcae94cccf6cc269ffd0330e80f15a6" + sha256 cellar: :any, arm64_ventura: "e32a669ed439235b13bb6203a6f3066eeab3d553e831a03b3fb93d0dcdb10687" + sha256 cellar: :any, sonoma: "ce64f9e5a7d6a4040adb4a1d312033c99d1209b348ecf5548578b92a0ceb02b0" + sha256 cellar: :any, ventura: "e8cae39e8878cc446dd0a6a09cf2b91345d1220bf5129465d91ae95f04e6d4d5" + sha256 cellar: :any_skip_relocation, arm64_linux: "c0700b581db89ca6381c9df8704e2cef2dc93652d2ae9d2a8a5354eb39491fbf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4790d12c1dc93c70540a0b434447b967580c10303ba8cfbbc7416d15a6f19562" + 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..3eb96ea2a0e21 --- /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/1.1.2.tar.gz" + sha256 "7602e37c6715fbf4cec3f0ded1e860157796423dc79da062a0e5ccb1226dc8e6" + 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: "99db8197b364ac4ed1adf8d48e245c2f08d714f205e033b8b5bf0987ede639ce" + 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..e693403bd335c --- /dev/null +++ b/Formula/u/urh.rb @@ -0,0 +1,77 @@ +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" + head "https://github.com/jopohl/urh.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7aab6a172466029fbb7ed528a5edd624866de3c0d5c3c6db9566d5bd7bdd3dc2" + sha256 cellar: :any, arm64_sonoma: "aa6362884ac8ca8a644f638728265e2bed585ac5525b43adcf55c891a2c94c37" + sha256 cellar: :any, arm64_ventura: "3458da9303a91f152666649e6afd3f796f0658152f547be7619927e2f1f6d99a" + sha256 cellar: :any, sonoma: "ce3ba9b6b56f7cf06fa761c9c16669a0f9a96f6f22d8950533df042d3e581abc" + sha256 cellar: :any, ventura: "46047fe3cc847a20a0d4337bbc5ad093d0447ddee1517f959391b091eb9e8994" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4f4790a0182353030f25e329a0647908722dda1dea6249b3544d64c3d790c30" + 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.13" + + 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.13") + 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..091a1f28e1626 --- /dev/null +++ b/Formula/u/uriparser.rb @@ -0,0 +1,45 @@ +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.8/uriparser-0.9.8.tar.bz2" + sha256 "72d1b559be3a1806f788a3d9be34a1b063d42aa238b29ba4ee633d6effcd33bd" + license "BSD-3-Clause" + head "https://github.com/uriparser/uriparser.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "7cee35b2ea5693567cabf7ef30e9a6c8f35423ccad4cba6fa4f9dff90727d79e" + sha256 cellar: :any, arm64_sonoma: "1afad33dd8c8d67dd454030f96ca7b71fd625b088ba4e7354f52eb789995d2af" + sha256 cellar: :any, arm64_ventura: "71f1d1f2919cd33409df57ff9464007a85aaf5ed23b496b1fc3311be22edb07e" + sha256 cellar: :any, arm64_monterey: "0f9231a7cc6bd6bf5578ec959b4951a9fa2bdf22a9f1ed571c5f3d9c2eccdc65" + sha256 cellar: :any, sonoma: "9f1884bfa5687f65eca6be5aec1e0c5618f5faa404290d0827bb3c390828fcee" + sha256 cellar: :any, ventura: "8df3c1c481bb8dca64b708dd35cc514e3743827b4d6b544aa5418d4ed90e868e" + sha256 cellar: :any, monterey: "942834f010ac0ac2d508277f6f4c8d00d229654bf02de7528df7d53d5ca72771" + sha256 cellar: :any_skip_relocation, arm64_linux: "93dc11e4bc86e1a410469220e448cbef25afb05dddc71ab5aed53ebcf818fcb4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "690d05924e1dcfe664e3e0891326fa6c19aa61c178d1cff63a361013cad4b001" + 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..b65708db12e57 --- /dev/null +++ b/Formula/u/urlfinder.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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, 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..75262dab3fccb --- /dev/null +++ b/Formula/u/urlscan.rb @@ -0,0 +1,41 @@ +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/f0/9d/dbb1b7b3bb226a8a796b870cf9325cae53edc36acdf619cf4c5eefe94880/urlscan-1.0.6.tar.gz" + sha256 "3bbf8900de23913c29aed27702eaba92a871b2fe95920e72c56a19fff7cb4581" + license "GPL-2.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, all: "be64bb1ca7c78bd13312b59f17f761051b64857476413d41952af71d0d5de7cd" + end + + depends_on "python@3.13" + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urwid" do + url "https://files.pythonhosted.org/packages/98/21/ad23c9e961b2d36d57c63686a6f86768dd945d406323fb58c84f09478530/urwid-2.6.16.tar.gz" + sha256 "93ad239939e44c385e64aa00027878b9e5c486d59e855ec8ab5b1e1adcdb32a2" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + def install + virtualenv_install_with_resources + + man1.install "urlscan.1" + 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..ca1d98cbe9a30 --- /dev/null +++ b/Formula/u/urlview.rb @@ -0,0 +1,80 @@ +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 + + bottle do + 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..1a43f28cf1dc5 --- /dev/null +++ b/Formula/u/urlwatch.rb @@ -0,0 +1,108 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "de60e6a087b935b6bac97bc69ec1ca1c107fdf05a838f015e0cadc2e048f3f9d" + sha256 cellar: :any, arm64_sonoma: "fbe02184a2cde0d42d534169e6a99e61a82245e5b479624e4a3fdf60763c5da5" + sha256 cellar: :any, arm64_ventura: "e347ee6bec4a7acc257dc0a33e44eb0d6b7157788de95d952d2bc92f86740a9f" + sha256 cellar: :any, sonoma: "a65ad820cba9da748602dd03ba112ccf49242972d5361ee90f9ffbb9d9f06ae4" + sha256 cellar: :any, ventura: "0fd7db4f82a22ee9a0b4a9a58dfe46c63a09c41d06cce7e0be940b60c682b788" + sha256 cellar: :any_skip_relocation, arm64_linux: "cb939b185391a35771255a41b0f3c855de8e2ad72ea4a26ad2140f0dfbb11765" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8d869ce99654e22a28d552abdf8dec3e5ed07ea0327ae787a97e7bf3c5f6471" + end + + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "cssselect" do + url "https://files.pythonhosted.org/packages/d1/91/d51202cc41fbfca7fa332f43a5adac4b253962588c7cc5a54824b019081c/cssselect-1.2.0.tar.gz" + sha256 "666b19839cfaddb9ce9d36bfe4c969132c647b92fc9088c4e23f786b30f1b3dc" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + end + + resource "keyring" do + url "https://files.pythonhosted.org/packages/f6/24/64447b13df6a0e2797b586dad715766d756c932ce8ace7f67bd384d76ae0/keyring-25.5.0.tar.gz" + sha256 "4c753b3ec91717fe713c4edd522d625889d8973a349b0e582622f49766de58e6" + end + + resource "lxml" do + url "https://files.pythonhosted.org/packages/e7/6b/20c3a4b24751377aaa6307eb230b66701024012c29dd374999cc92983269/lxml-5.3.0.tar.gz" + sha256 "4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f" + 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/51/78/65922308c4248e0eb08ebcbe67c95d48615cc6f27854b6f2e57143e9178f/more-itertools-10.5.0.tar.gz" + sha256 "5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + 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 "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..55776b654a242 --- /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" + + bottle do + 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, mojave: "25c90f23ff4d5225d439f8783d25d440ee2b7fc6e8afdc5772914deab0ae3184" + sha256 cellar: :any_skip_relocation, high_sierra: "d6da062bd8e0d7134a9d98285344064a82329b138bd7e0ed14fbc01a27530079" + sha256 cellar: :any_skip_relocation, sierra: "fb1b6ac6bd09955f072e9b65e92cc992b6da4a14640694d8a830aaacad944518" + 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..f2acaeddd7c02 --- /dev/null +++ b/Formula/u/urweb.rb @@ -0,0 +1,67 @@ +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 + + bottle do + 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/formula-patches/d7db3f02fe5dcd1f73c216efcb0bb79ac03a819f/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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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/usage.rb b/Formula/u/usage.rb new file mode 100644 index 0000000000000..3cd7ae3fcf8b7 --- /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.1.1.tar.gz" + sha256 "8a28fe01b2c3b1273e80b113d137197fc62c97a542f577dc2dd2414a236c78d0" + license "MIT" + head "https://github.com/jdx/usage.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "48749a36fe6f537c4fe3e123d21627fd4b25ff38609d4d24cc81f1fad83ea000" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3943027449c6376bdfe6a1ddc228d1b3a78cf003dd88c20126f6cabc04a6799b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "73feaf7c10b53a1aa1eeee36a906c122a66ba270020ab632172d94cf0e07f438" + sha256 cellar: :any_skip_relocation, sonoma: "f31104fa7604e9fea8b2f2c09b90bbc539f18d98e7a36d50bd549507e002c61b" + sha256 cellar: :any_skip_relocation, ventura: "470250bcd2129d522eae4da6f001dafc87b4e753d244928905824b4ed3ed25e7" + sha256 cellar: :any_skip_relocation, arm64_linux: "e31653c676b32d99ae9e5e7f7fb431ea3d11b90f08013ab7c482f97231012baf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "752b905bbfd6fa99f56ae3dc6d1c2cc0d430d6c0023dae8a84ef7eb4f5c05f07" + end + + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args(path: "cli") + 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..22de2c191dbc2 --- /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.04.01.orig.tar.xz" + sha256 "340e8ae2148c3673b2f7b90498604987f5eb8a039744cd14bd06e17d2d0f99e8" + 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: "9413cc0397707f9cd40b952779b877330609339c86bd2b66add7d8b536f3b4c6" + 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..088da7a1c5768 --- /dev/null +++ b/Formula/u/usbredir.rb @@ -0,0 +1,45 @@ +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_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..d7cc19f4d7b26 --- /dev/null +++ b/Formula/u/usbutils.rb @@ -0,0 +1,60 @@ +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-018.tar.gz" + sha256 "0048d2d8518fb0cc7c0516e16e52af023e52b55ddb3b2068a77041b5ef285768" + 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_sequoia: "19bc5627cb39ad4877754708f98e513f74d74d51a66a2c40e5fb904b44c97851" + sha256 cellar: :any, arm64_sonoma: "04127d6f7b7f69f9cf13d59e64c41f75628b9ac4cd4c72da70d9ee892eec1be5" + sha256 cellar: :any, arm64_ventura: "620a18e00aedf3f6216972e411044b3b212186daf06de35aaba4c01b0da88b75" + sha256 cellar: :any, sonoma: "5a46602f76dd8cc39b901f1ec384593ca95183ecb8c013dd5db6be6692129ef9" + sha256 cellar: :any, ventura: "4e352bf259ad82c3c2f794c009cb7adcc3fe29829373720529180c28a03902b5" + sha256 arm64_linux: "6e9597423b73e6ccdfb60f53e7af93d8e5d9eafd576b6477fc58bf23ad7d3e88" + sha256 x86_64_linux: "b6f4d16b0e4a42673c5725cbc31c25a8bfbe702ca82ecc1b58493248285f57c4" + 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/formula-patches/24a6945778381a62ecdcc1d78bcc16b9f86778c1/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..96ed3ca50d230 --- /dev/null +++ b/Formula/u/userspace-rcu.rb @@ -0,0 +1,32 @@ +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_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..6032b2c01d90e --- /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.6.tar.gz" + sha256 "6920a6a5d6a04b9a89b2a89af7132f8acefd46e0c2a7b190350539e9213816c0" + license "BSL-1.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "bd37e8f689dc81593f8c8be6e074b4c97f4cd0f0881ee9c9735cb6d75a2f603e" + 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..76afd6be43c8f --- /dev/null +++ b/Formula/u/utf8proc.rb @@ -0,0 +1,37 @@ +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.10.0.tar.gz" + sha256 "6f4f1b639daa6dca9f80bc5db1233e9cbaa31a67790887106160b33ef743f136" + license all_of: ["MIT", "Unicode-DFS-2015"] + head "https://github.com/JuliaStrings/utf8proc.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "81533530b545ad8ebf73b33a3bdca4bd7fd79c08b43b36065f01786e303474bb" + sha256 cellar: :any, arm64_sonoma: "077fcc508fb1911325da5deaea023cfaaf0ca58fdde2097d415779bca397c285" + sha256 cellar: :any, arm64_ventura: "be90c358d69294427f51905783aa6bb9fd9e10f3b5c2fa499f7629186fc61d6c" + sha256 cellar: :any, sonoma: "94a054d454bd5df62734457a4ac938ab20b3637ae8ee9d36e37fa72fb9adaf41" + sha256 cellar: :any, ventura: "7086a1eb8b0caa36a1abfad15c613a158ba78800bdfe3f8539d78ad8f10f8a1d" + sha256 cellar: :any_skip_relocation, arm64_linux: "f7fac4dfa22dc71bd6f850963bf2aa3833c18febd6eae8ee1285b60598b8c925" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b814bb33469856d652a662d92121da8b878a2fa3630dda62ba6646d943dae7e" + 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..a9f3ebb87a911 --- /dev/null +++ b/Formula/u/utftex.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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..35c5f205f84c1 --- /dev/null +++ b/Formula/u/uthash.rb @@ -0,0 +1,59 @@ +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" + + 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..2da7aa2c63217 --- /dev/null +++ b/Formula/u/util-linux.rb @@ -0,0 +1,139 @@ +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.40/util-linux-2.40.4.tar.xz" + sha256 "5c1daf733b04e9859afdc3bd87cc481180ee0f88b5c0946b16fdec931975fb79" + 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_sequoia: "f52b125dc397f644d8c39eaf445f0dba977daaf0c2c36a1cc8f8d5fda7fdc983" + sha256 arm64_sonoma: "a4a808c4f0d83572be37bb87f47c3caf0196e7dc6efda2292eb433f43a95cbde" + sha256 arm64_ventura: "5813684b14b36ef9eb21ae44778509a3b5317177d36424e5684f93e6d38dd2ed" + sha256 sonoma: "4e510ac6858c30bf51f48704554f479afa65651e9d70cecead695be3b27bab31" + sha256 ventura: "a3ffdf52748b08c8ac4a59685dad9d61c6bb97eec580b101e5e573412184ca41" + sha256 arm64_linux: "cedcefe892fdab71ae5330dae10d830b74f924758abff56320b2867f1c7a877c" + sha256 x86_64_linux: "5472eb4abe7ce0d30ff3548dda8da1edab2adc47b10acac6fc5f467171519616" + end + + keg_only :shadowed_by_macos, "macOS provides the uuid.h header" + + 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 + + # uuid_time function compatibility fix on macos + # upstream patch PR, https://github.com/util-linux/util-linux/pull/3013 + patch do + url "https://github.com/util-linux/util-linux/commit/9445f477cfcfb3615ffde8f93b1b98c809ee4eca.patch?full_index=1" + sha256 "7a7fe4d32806e59f90ca0eb33a9b4eb306e59c9c148493cd6a57f0dea3eafc64" + end + + def install + 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-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 + system "make", "install" + 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..f685206acf20e --- /dev/null +++ b/Formula/u/util-macros.rb @@ -0,0 +1,34 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "418d29093fca0889e64ecc830bd8d987269774aba25d302cf959338acc1363ac" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "418d29093fca0889e64ecc830bd8d987269774aba25d302cf959338acc1363ac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "418d29093fca0889e64ecc830bd8d987269774aba25d302cf959338acc1363ac" + sha256 cellar: :any_skip_relocation, sonoma: "61e34714606b0ade8be0c48e199d42bde8a7b0894af880d0abac628647438a85" + sha256 cellar: :any_skip_relocation, ventura: "61e34714606b0ade8be0c48e199d42bde8a7b0894af880d0abac628647438a85" + sha256 cellar: :any_skip_relocation, arm64_linux: "1667d87ebab1bae1e48e9ef068534059be1bc7398cea4a39de35cb850109bd79" + sha256 cellar: :any_skip_relocation, x86_64_linux: "418d29093fca0889e64ecc830bd8d987269774aba25d302cf959338acc1363ac" + 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..f7f850b052cf6 --- /dev/null +++ b/Formula/u/utimer.rb @@ -0,0 +1,59 @@ +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_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, mojave: "01a5bce5e1e818932e0870eaed8586a23f3a6ca24504011005fc03d86992f63e" + sha256 cellar: :any, high_sierra: "ef1faac8b5226cad7b83369c5139a370543316fd43102f7a8ccd15ab63f4fe6e" + sha256 cellar: :any, sierra: "a2bb9673b9b7909dcb080f52ea6480d2d89f3ae0fdff3c599e17587ebce406e1" + 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..28ba7fa302121 --- /dev/null +++ b/Formula/u/uudeview.rb @@ -0,0 +1,66 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "2869df0b09975172227dc83be6d667b3d0f8e4f2cf0f6d9ec0cd3fdca02727f4" + sha256 cellar: :any_skip_relocation, high_sierra: "7bb4c57755efed1b4208d234a0017d785757da04ca8f8e43c92980f3fe16b85c" + 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..f745aa48e1a74 --- /dev/null +++ b/Formula/u/uutils-coreutils.rb @@ -0,0 +1,99 @@ +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.0.30.tar.gz" + sha256 "732c0ac646be7cc59a51cdfdb2d0ff1a4d2501c28f900a2d447c77729fdfca22" + 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_skip_relocation, arm64_sequoia: "2411a79699ee2d457d9900f8f59c1ab0fa747dee24dfcf4f7d105aedce69fe66" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d3964a0c2549b404f6ec0439cf948b8505cf9e2839ee4ed64e881570a247ff3d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5455d414d3adc4fb4dc54571fe451487adab71d71ace76e6476c1f8f235a3210" + sha256 cellar: :any_skip_relocation, sonoma: "367bf4cac0c0c9042eef29604d1a19178b1a8ecddcb2d8a2f58069f06da99f03" + sha256 cellar: :any_skip_relocation, ventura: "0db44149c4963e57a301d574a0027c76b0668a935ed7a93003ee0c06b8212d67" + sha256 arm64_linux: "ceeb9ca9c70ab137505a4c6dc8e0ab69b5360cb76f4fba859d993de2298b46d1" + sha256 x86_64_linux: "e18edcc1973ef26762cbeefe8d494b01190d886fe8e31ae0cb5fd2b6adcee0a0" + 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 + + # Call `make` as `gmake` to use Homebrew `make`. + system "gmake", "install", + "PROG_PREFIX=u", + "PREFIX=#{prefix}", + "SPHINXBUILD=#{Formula["sphinx-doc"].opt_bin}/sphinx-build" + + # 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..1db2ff04bee8e --- /dev/null +++ b/Formula/u/uutils-diffutils.rb @@ -0,0 +1,45 @@ +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_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..d4b039ae88440 --- /dev/null +++ b/Formula/u/uutils-findutils.rb @@ -0,0 +1,76 @@ +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_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..7e53863e50724 --- /dev/null +++ b/Formula/u/uuu.rb @@ -0,0 +1,58 @@ +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_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..aae995fbb9090 --- /dev/null +++ b/Formula/u/uv.rb @@ -0,0 +1,45 @@ +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.7.4.tar.gz" + sha256 "5af1d1dd63e364e051dcc78de2169b3ca7b24ff2d4ff7cba11c8326c6620ee72" + 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_sequoia: "14ebc3b61afc7c2789421228c92cd533280dd31d65c325e5c394a943e3d48d2a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b8abed1db708fffe5899821338d758554e1e1de66a16c2edc2aaf085b7cbf4e4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f2b9da1557e4387a8135c5ef139e466245b3f32915e64d64a7be578d5c746e4a" + sha256 cellar: :any_skip_relocation, sonoma: "8c466f4926247995b66c0a2fbc33dd6d6d54aca3ed3876990f727982526e7405" + sha256 cellar: :any_skip_relocation, ventura: "7a3a978bd9196480b719ec769bb867dee997c744e3f9a773094391ca0b6aae20" + sha256 cellar: :any_skip_relocation, arm64_linux: "d60f522b5607de181ca866641b33d1d77f1f585dddd4f42302615b3a5274ce55" + sha256 cellar: :any_skip_relocation, x86_64_linux: "acec0e71e9c2f12ccbf51f5d4d4a79872ab9240009add84bc35f9779f2449912" + 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") + system "cargo", "install", "--no-default-features", *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..8ae6a4bb3f93e --- /dev/null +++ b/Formula/u/uvg266.rb @@ -0,0 +1,39 @@ +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_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..a481ff0fbbc15 --- /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/a6/ae/9bbb19b9e1c450cf9ecaef06463e40234d98d95bf572fab11b4f19ae5ded/uvicorn-0.34.2.tar.gz" + sha256 "0e929828f6186353a80b58ea719861d2629d766293b6d19baf086ba31d4f3328" + license "BSD-3-Clause" + revision 1 + head "https://github.com/encode/uvicorn.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "1bd7688b18d59c329f5b95e74e61b4e5a66e676e3665d086b8a3ab2e007ab35d" + sha256 cellar: :any, arm64_sonoma: "ae3f26dbe2ab02ed1f1e6bd8998e80e22a48b9a670fecc5e1a4d18745381bd7b" + sha256 cellar: :any, arm64_ventura: "a8a59f729e815343180887bdbaea2e8a0b0192ffdc708c688e35411bde0f9cf5" + sha256 cellar: :any, sonoma: "0934f4b22654c3a390eb114e9983f51829d6d345b0a3adda51bbb3f64ab05ae9" + sha256 cellar: :any, ventura: "95370d8dbcef211dacc7888dcf07d6693d535383a5b9fb01df6ab8b2437e4b2a" + sha256 cellar: :any_skip_relocation, arm64_linux: "23425e76ef828c39ae2921afe559aa13cedb77f5ec95dc87e5afd73f86fddf38" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b92b3949fc7b24c9485bdac2ba38dadc71e061646c428b47a3466539d5a4aa80" + end + + depends_on "rust" => :build + depends_on "libyaml" + depends_on "python@3.13" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/a7/9a/ce5e1f7e131522e6d3426e8e7a490b3a01f39a6696602e1c4f33f9e94277/httptools-0.6.4.tar.gz" + sha256 "4e93eee4add6493b59a5c514da98c939b244fce4a0d8879cd3f466562f4b7d5c" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/88/2c/7bb1416c5620485aa793f2de31d3df393d3686aa8a8506d11e10e13c5baf/python_dotenv-1.1.0.tar.gz" + sha256 "41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5" + end + + resource "pyyaml" do + url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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/af/c0/854216d09d33c543f12a44b393c402e89a920b1a0a7dc634c42de91b9cf6/uvloop-0.21.0.tar.gz" + sha256 "3bf12b0fda68447806a7ad847bfa591613177275d35b6724b1ee573faa3704e3" + end + + resource "watchfiles" do + url "https://files.pythonhosted.org/packages/03/e2/8ed598c42057de7aa5d97c472254af4906ff0a59a66699d426fc9ef795d7/watchfiles-1.0.5.tar.gz" + sha256 "b7529b5dcc114679d43827d8c35a07c493ad6f083633d573d81c660abc5979e9" + 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", shells: [:fish, :zsh], 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..8a5149ac7cbd1 --- /dev/null +++ b/Formula/u/uvw.rb @@ -0,0 +1,79 @@ +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 + + bottle do + 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/uwsgi.rb b/Formula/u/uwsgi.rb new file mode 100644 index 0000000000000..d87a2f7000245 --- /dev/null +++ b/Formula/u/uwsgi.rb @@ -0,0 +1,119 @@ +class Uwsgi < Formula + desc "Full stack for building hosting services" + homepage "https://uwsgi-docs.readthedocs.io/en/latest/" + url "https://files.pythonhosted.org/packages/af/74/34f5411f1c1dc55cbcba3d817d1723b920484d2aeede4663bbaa5be7ee22/uwsgi-2.0.29.tar.gz" + sha256 "6bd150ae60d0d9947429ea7dc8e5f868de027e5eb38355fb613b9413732c432f" + license "GPL-2.0-or-later" + head "https://github.com/unbit/uwsgi.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "d0de47a93650ac9a647ca1993d544e58594f13ecf44c74be30d82e6c21c6a3ee" + sha256 arm64_sonoma: "63e804aa021c578d63efee146a7de4c14da0c32112a5f9191f9206cdd97c8eea" + sha256 arm64_ventura: "d84676d2359811575925b6bdbdd1a27783426d8b5b852deb98377c8e9b51f7a2" + sha256 sonoma: "dc6829ecbb85e22d148e917a616932e6dad93a5be054acacad11e5ecdd806fe9" + sha256 ventura: "87f2ef9402ac05723ff24c4ea1b9594ad959f19f9895b11d8411e197d3df616d" + sha256 arm64_linux: "a5431eded1a13c7f3c02242c7aefa988053db24c02767b81847436f6c5da1137" + sha256 x86_64_linux: "38727ddcb072891b2929e8cc22c87afb78e044e9dc783b532b8353e452f53899" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + depends_on "pcre2" + depends_on "python@3.13" + 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.13" + 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 0cffe189c181d..0000000000000 --- a/Formula/uade.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Uade < Formula - desc "Play Amiga tunes through UAE emulation" - homepage "https://zakalwe.fi/uade/" - head "https://gitlab.com/uade-music-player/uade.git" - - stable do - url "https://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 "10471b0c0ebb1fc05ed2cec2268aac9727110312b5e2ab20202bdbf9ce98a198" => :catalina - 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/ubertooth.rb b/Formula/ubertooth.rb deleted file mode 100644 index d0fc1cde40c3f..0000000000000 --- a/Formula/ubertooth.rb +++ /dev/null @@ -1,34 +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" - license "GPL-2.0" - head "https://github.com/greatscottgadgets/ubertooth.git" - - bottle do - cellar :any - sha256 "e08b1229ff32e200e5f6e7d562d83ce26e5dff0e50b4373f1add2a411854ebdf" => :catalina - 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 80e9520683b86..0000000000000 --- a/Formula/ucg.rb +++ /dev/null @@ -1,47 +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" - license "GPL-3.0" - head "https://github.com/gvansickle/ucg.git" - - bottle do - cellar :any - rebuild 1 - sha256 "2e18cfd35ea53d5326a69f3d21cf32c2e850cd864735e3e45cd645d85e350ec7" => :catalina - 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/00615b433f5d2e3eaaf0075fbf4c63d0d732f8c8/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 cf14ea33459f4..0000000000000 --- a/Formula/uchardet.rb +++ /dev/null @@ -1,27 +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.7.tar.xz" - sha256 "3fc79408ae1d84b406922fa9319ce005631c95ca0f34b205fad867e8b30e45b1" - head "https://anongit.freedesktop.org/git/uchardet/uchardet.git" - - bottle do - cellar :any - sha256 "34bd4791834a762da961de136a3cad253800a98deea2d1dededf8efb465f215d" => :catalina - sha256 "a254139ee777de77d5907dfeb47d4306f2e5e5f0b3775edfedcbf1fcf217fdbe" => :mojave - sha256 "a89237dd88e4190826ce6fb4a8a625711636db7d6c4ba10d5ddd56d37347e868" => :high_sierra - 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 8e1a2ebb19c65..0000000000000 --- a/Formula/ucl.rb +++ /dev/null @@ -1,61 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "5de2305d5da25469e7bf27d2e776a6e22b20806940ad1dea16d18b39a1125f7e" => :catalina - sha256 "b676bbfb2ff44a3ff71e96a11bc8ae86ea2466029faea800427196d3ece8261e" => :mojave - sha256 "95bba447faa9e980720b780e1db69bf59e72f026a19a965bbb1b18f3de9230de" => :high_sierra - sha256 "b2019331517fea2505cb2d25eebbdf6ceb9a45378525d0e36a096ea3c45ad9a8" => :sierra - sha256 "d56b0d36a68a2bc558742eac0c6632612180797cc45520389b5d87f09c23b1bd" => :el_capitan - sha256 "32a54309c092854fc5a4a443a1e9d33fb677ff257d983ea7d5b0eb7bb90d3b2e" => :yosemite - sha256 "3c334012766dce80dac49d279be1be1ae4a1fc5df188cc19a25ba1bec84305a9" => :mavericks - 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/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; - } - 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 2197e93033121..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.32.tar.gz" - sha256 "7a461726e53edc141ebab94aa6e4957c64eb8edc44e1a6bc41d29b0e913dfcb8" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "64d956c8d49a0b66d8bd06b63c305c83ff3b8102c7071f3ab354ec9d00548b99" => :catalina - sha256 "5f450755e1e86a66268739cffb040cd028b57bdb8ad7602e761d3778c17292d1" => :mojave - sha256 "d8d2c7e981ae2900decacaf0623639a2cf221e969f084e6c7d37a0bd18608dfb" => :high_sierra - end - - depends_on "go" => :build - - def install - dir = buildpath/"src/github.com/ucloud/ucloud-cli" - dir.install buildpath.children - cd dir do - system "go", "build", "-mod=vendor", "-o", bin/"ucloud" - prefix.install_metafiles - end - end - - test do - system "#{bin}/ucloud", "config", "--project-id", "org-test", "--profile", "default" - 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 8ac4f02db5b37..0000000000000 --- a/Formula/ucommon.rb +++ /dev/null @@ -1,34 +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 "3040baab77d1ff69f36ff21ec9259c8512170f361119e66b446a48b86f157320" => :catalina - 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 ddc9a183086a5..0000000000000 --- a/Formula/ucon64.rb +++ /dev/null @@ -1,65 +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.2.0-src.tar.gz" - sha256 "5727e0be9ee878bba84d204135a7ca25662db6b56fee6895301e50c1bdda70af" - license "GPL-2.0" - head "https://svn.code.sf.net/p/ucon64/svn/trunk/ucon64" - - bottle do - sha256 "f0bf36d7828e138e2fe1068b4b5bf1b9e70f80cef564c186950a30ab2cb1df85" => :catalina - sha256 "893570e77b17c3400f391fc0a710958b3599d5ad0c5971897d84c7e4552e2ca6" => :mojave - sha256 "30d2d85dba7891d5eb5b43c69c5b6ac0ad0606d279c6a30e254f6ffd819356f8" => :high_sierra - end - - uses_from_macos "unzip" => [:build, :test] - uses_from_macos "zlib" - - resource "super_bat_puncher_demo" do - url "http://morphcat.de/superbatpuncher/Super%20Bat%20Puncher%20Demo.zip" - sha256 "d74cb3ba11a4ef5d0f8d224325958ca1203b0d8bb4a7a79867e412d987f0b846" - end - - # Fixes an upstream issue which incorrectly attempts to use a Linux-only - # function on macOS. Should be in the next release. - # https://sourceforge.net/p/ucon64/svn/2763/ - patch do - url "https://github.com/Homebrew/formula-patches/raw/23a80b586dd35fdde1bf575c57a1b468631e644e/ucon64/sched_setscheduler.diff" - sha256 "bb7bf52ec016092bf84b0a5eebb4295394288985993d4ab7a6b69a78c1c3ce77" - 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.dylib" => "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 7294d0cfd1422..0000000000000 --- a/Formula/ucspi-tcp.rb +++ /dev/null @@ -1,40 +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 "7daae5b06fc2d2d42c1fcfc02368bf84e565d0557de006c14c2a31cc91cd25ee" => :catalina - 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 c73bb246b0ba5..0000000000000 --- a/Formula/udis86.rb +++ /dev/null @@ -1,28 +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 "28f761b215237ed656359cce94fd4787be86a50057dc064589f6bbedbcf2fe06" => :catalina - 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 f13aa4b50f2c5..0000000000000 --- a/Formula/udns.rb +++ /dev/null @@ -1,37 +0,0 @@ -class Udns < Formula - desc "DNS resolver library" - homepage "https://www.corpit.ru/mjt/udns.html" - url "https://www.corpit.ru/mjt/udns/udns-0.4.tar.gz" - sha256 "115108dc791a2f9e99e150012bcb459d9095da2dd7d80699b584ac0ac3768710" - - bottle do - cellar :any - sha256 "18ac00a1a30fea027e398558edf149e464712c94fa68242740cc8e086e1ec036" => :catalina - 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: - # https://www.corpit.ru/pipermail/udns/2011q3/000154.html - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/udns/0.4.patch" - sha256 "4c3de5d04f93e7d7a9777b3baf3905707199fce9c08840712ccb2fb5fd6d90f9" - end - - 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 diff --git a/Formula/udptunnel.rb b/Formula/udptunnel.rb deleted file mode 100644 index b36a8278fed20..0000000000000 --- a/Formula/udptunnel.rb +++ /dev/null @@ -1,35 +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" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "c015b88af8ac3590aee162c50428bf931a8a15ab006589022bdace7bf665e32a" => :catalina - 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 29c6287b5d144..0000000000000 --- a/Formula/udpxy.rb +++ /dev/null @@ -1,49 +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 "48a44c1a8510793fe0e878da79ac3a94953b3c13ecfe2dd4f338cecc17d30406" => :catalina - 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 11f4492220707..0000000000000 --- a/Formula/udunits.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Udunits < Formula - desc "Unidata unit conversion library" - homepage "https://www.unidata.ucar.edu/software/udunits/" - url "https://github.com/Unidata/UDUNITS-2/archive/v2.2.27.6.tar.gz" - sha256 "74fd7fb3764ce2821870fa93e66671b7069a0c971513bf1904c6b053a4a55ed1" - - bottle do - sha256 "77dcfaf55565b5d34f1ca0da75bc7aed7cdbb9b66ba684147ada21421f35005b" => :catalina - sha256 "176548e1d698baf5187088bf16b273af3e3e585f5f765963c396187491ea5fe1" => :mojave - sha256 "3c12f59317ded4bdc6f89c24a0eec9260a499371c9c92b2d5e34c1b1a9f50a2c" => :high_sierra - sha256 "ad941124a4952ebc353f03601d3da5670155a1eb8271e290bc96b0a54ec87e9e" => :sierra - end - - depends_on "cmake" => :build - - uses_from_macos "expat" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - 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 54f7c3fcfd5d4..0000000000000 --- a/Formula/ufraw.rb +++ /dev/null @@ -1,54 +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 3 - - bottle do - rebuild 1 - sha256 "19a95667ecb2a9bab8a108e539ef229b945f727bca7e8651af80cca1d355a196" => :catalina - sha256 "d880967d58bbbefb118148da4c959e38a3409a67504f21ae9b53560884da192f" => :mojave - sha256 "e09fbf5a78f3b461637d21e13575330232de1c70dd3e63026ab0dcc5669905e3" => :high_sierra - 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" - - # jpeg 9 compatibility - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/b8ed064e0d2567a4ced511755ba0a8cc5ecc75f7/ufraw/jpeg9.patch" - sha256 "45de293a9b132eb675302ba8870f5b6216c51da8247cd096b24a5ab60ffbd7f9" - end - - # Fix compilation with Xcode 9 and later, - # see https://sourceforge.net/p/ufraw/bugs/419/ - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/d5bf686c740d9ee0fdf0384ef8dfb293c5483dd2/ufraw/high_sierra.patch" - sha256 "60c67978cc84b5a118855bcaa552d5c5c3772b407046f1b9db9b74076a938f6e" - end - - def install - # Work around Xcode 11 clang bug - # https://bitbucket.org/multicoreware/x265/issues/514/wrong-code-generated-on-macos-1015 - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - 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 63664b6645a5d..0000000000000 --- a/Formula/uftp.rb +++ /dev/null @@ -1,54 +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-5.0.tar.gz" - sha256 "562f71ea5a24b615eb491f5744bad01e9c2e58244c1d6252d5ae98d320d308e0" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "7df0c64b08cd3377837185003849b7d86d11021dc34546f78eedcac3e73a46c6" => :catalina - sha256 "618dc8e47d069f19c4aeb1c18cdc12317196ebcfbe6e7c9d1be8b30472e19c92" => :mojave - sha256 "35b999e28214d336f0e6224fd92dfa824874c1e08ab520b9643d3fbc75c33b4a" => :high_sierra - end - - depends_on "openssl@1.1" - - def install - system "make", "OPENSSL=#{Formula["openssl@1.1"].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 be4f485a7acba..0000000000000 --- a/Formula/uggconv.rb +++ /dev/null @@ -1,27 +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 "c1fc237ad27120a1804b37d765a47833d67bcd38cfa67be07aed808739021146" => :catalina - 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 8ca180a5b583c..0000000000000 --- a/Formula/uhd.rb +++ /dev/null @@ -1,50 +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.15.0.0.tar.gz" - sha256 "eed4a77d75faafff56be78985950039f8d9d1eb9fcbd58b8862e481dd49825cd" - revision 1 - head "https://github.com/EttusResearch/uhd.git" - - bottle do - sha256 "b0988b31234da20fde7aceb5656316fccc3def16516391e5fcb818bd9d9cb563" => :catalina - sha256 "eff5ec072e00e4ed6b7ccdceda1fdd68a672f8cea36a64046c4e4c348b361146" => :mojave - sha256 "ded2d939eea70a0ca8e6275552a64fe6a6f9d55cc5b56e6cbed6ceea0394f549" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "doxygen" => :build - depends_on "boost" - depends_on "libusb" - depends_on "python@3.8" - - resource "Mako" do - url "https://files.pythonhosted.org/packages/b0/3c/8dcd6883d009f7cae0f3157fb53e9afb05a0d3d33b3db1268ec2e6f4a56b/Mako-1.1.0.tar.gz" - sha256 "a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b" - end - - def install - # https://github.com/EttusResearch/uhd/issues/313 - inreplace "host/lib/transport/nirio/lvbitx/process-lvbitx.py", - "autogen_src_path = os.path.relpath(options.output_src_path)", - "autogen_src_path = os.path.realpath(options.output_src_path)" - - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - - resource("Mako").stage do - system Formula["python@3.8"].opt_bin/"python3", - *Language::Python.setup_install_args(libexec/"vendor") - end - - mkdir "host/build" do - system "cmake", "..", *std_cmake_args, "-DENABLE_STATIC_LIBS=ON", "-DENABLE_TESTS=OFF" - system "make" - 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/ultralist.rb b/Formula/ultralist.rb deleted file mode 100644 index 53167d3958688..0000000000000 --- a/Formula/ultralist.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Ultralist < Formula - desc "Simple GTD-style task management for the command-line" - homepage "https://ultralist.io/" - url "https://github.com/ultralist/ultralist/archive/0.9.7.tar.gz" - sha256 "cfc5740c717eca2410cfbd3c77c03ffd33f7e4f828ecef924c2f6c4b6e73dba9" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "8c1c484137baf1be16e5582285b8b66bc4e29b324609a577740af3c969b0a21e" => :catalina - sha256 "a31c67179fa04dbd69aa933012cc966963f8f70409af0f6c52526c092364ff58" => :mojave - sha256 "ce141acbf7f825124d9b129787f5add4e3653ac21119efb1188624b586fd17fe" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/ultralist/").mkpath - ln_s buildpath, buildpath/"src/github.com/ultralist/ultralist" - system "go", "build", "-o", bin/"ultralist", "./src/github.com/ultralist/ultralist" - end - - test do - system bin/"ultralist", "init" - assert_predicate testpath/".todos.json", :exist? - add_task = shell_output("#{bin}/ultralist add learn the Tango") - assert_match /Todo.* added/, add_task - end -end diff --git a/Formula/um.rb b/Formula/um.rb deleted file mode 100644 index f67bb764c1e39..0000000000000 --- a/Formula/um.rb +++ /dev/null @@ -1,47 +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.2.0.tar.gz" - sha256 "f8c3f4bc5933cb4ab9643dcef7b01b8e8edf2dcbcd8062ef3ef214d1673ae64e" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "266b397cd3e24060e7926f438279325aed89643070618add3db64175e348c04b" => :catalina - sha256 "a4d8c9ddc2b46076eaccf3e3d4eaa43918f3d156e8abd16ad1415ea85f2da8f5" => :mojave - sha256 "a479ed6f535f228d1bfa15a7292e58d06a4f07d1238c4fa83f1b99c80564a24e" => :high_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.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 d3412d42a5110..0000000000000 --- a/Formula/umlet.rb +++ /dev/null @@ -1,30 +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_3/umlet-standalone-14.3.0.zip" - sha256 "f4b064ed57ac0640daa31f5d59649a95596fc9290e503734ec4974a9bbecde49" - revision 1 - - bottle :unneeded - - 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/unac.rb b/Formula/unac.rb deleted file mode 100644 index 31ccd9fac00a8..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://deb.debian.org/debian/pool/main/u/unac/unac_1.8.0.orig.tar.gz" - sha256 "29d316e5b74615d49237556929e95e0d68c4b77a0a0cfc346dc61cf0684b90bf" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "c065103ee8b1c39a665dcca68787edadc6a60620e627912a721b3d5732ff0152" => :catalina - 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://deb.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 101e6e49fe3e4..0000000000000 --- a/Formula/unar.rb +++ /dev/null @@ -1,53 +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" - sha256 "40967014a505b7a27864c49dc3b5d30b98ae4e6d4873783b2ef9ef9215fd092b" - - bottle do - cellar :any - rebuild 1 - sha256 "5a9fc27b0ced42e4bd8fabc4e21b8a4b4237f18329e424d07d56e2281fec0efd" => :catalina - 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/*"], "." - - # Build XADMaster.framework, unar and lsar - %w[XADMaster unar lsar].each do |target| - xcodebuild "-target", target, "-project", "./XADMaster/XADMaster.xcodeproj", "SYMROOT=..", - "-configuration", "Release", "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" - end - - 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 9c78633af2fea..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 "ec9937cacc782782b33064f5a0ea90b95fed66cb9ba86fad405c8e5f0056c53e" => :catalina - sha256 "e7459bb6bae23b6b6b8a7bfcd2a869275903f243e755440709eb5b550783f88a" => :mojave - sha256 "3b7158daf585ed94c61106abb7cbfc956f1a918e4d185ffaa89c755b1c9deba6" => :high_sierra - sha256 "44c4722b1e3d30d987bcbd9fc9ccd7015c54d087bedb7da030e50cc84d0a52e6" => :sierra - sha256 "7bdcd771f852f59915623dae370c8f807cbf20f242dad60d62afa1dc683cdf4a" => :el_capitan - sha256 "95794638930505f1d4a23553571d62de07dd3f62da7687ef571c6f7e893bba42" => :yosemite - sha256 "d81c8d0e7799847d65e8059eee61bb29f9e33ea3ea501465dee0cc7c68f425ff" => :mavericks - 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 5ac1dff739938..0000000000000 --- a/Formula/unbound.rb +++ /dev/null @@ -1,83 +0,0 @@ -class Unbound < Formula - desc "Validating, recursive, caching DNS resolver" - homepage "https://www.unbound.net/" - url "https://nlnetlabs.nl/downloads/unbound/unbound-1.10.1.tar.gz" - sha256 "b73677c21a71cf92f15cc8cfe76a3d875e40f65b6150081c39620b286582d536" - license "BSD-3-Clause" - head "https://github.com/NLnetLabs/unbound.git" - - bottle do - sha256 "7f66893bc42c776fb8437ae87c27b744fa30ebbea4dc349cb43aa72114b79937" => :catalina - sha256 "04dfb0c9becb94b0e76ad11ba6b0ba70fae5bf5101533e57ac4ec2f9c8d31f5d" => :mojave - sha256 "ba37bc57cd6a16c16e10ecd79c159849ffd16ef90845d0d50253c45b958fb8b3" => :high_sierra - end - - depends_on "libevent" - depends_on "openssl@1.1" - - 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-ssl=#{Formula["openssl@1.1"].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", "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 8a268617abf1f..0000000000000 --- a/Formula/uncrustify.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Uncrustify < Formula - desc "Source code beautifier" - homepage "https://uncrustify.sourceforge.io/" - url "https://github.com/uncrustify/uncrustify/archive/uncrustify-0.71.0.tar.gz" - sha256 "403a0f34463c0d6b0fbf230d8a03b7af9f493faa235208417793350db062003c" - license "GPL-2.0" - head "https://github.com/uncrustify/uncrustify.git" - - bottle do - cellar :any_skip_relocation - sha256 "8071c9d74d2ed2fdd69c8b9f665dbbcf364cb961796d014adcee6ad71be37e67" => :catalina - sha256 "9ede4664a01943bc10c07e643a2c4af2de8c1d91a534a954c78d92780f235b35" => :mojave - sha256 "60ffa3330811d4499f928eb7124d6981c1afb24ec0c86a4325d2804c65189828" => :high_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/ungit.rb b/Formula/ungit.rb deleted file mode 100644 index 2c4cb8ceebad6..0000000000000 --- a/Formula/ungit.rb +++ /dev/null @@ -1,34 +0,0 @@ -require "language/node" - -class Ungit < Formula - desc "The easiest way to use git. On any platform. Anywhere" - homepage "https://github.com/FredrikNoren/ungit" - url "https://registry.npmjs.org/ungit/-/ungit-1.5.9.tgz" - sha256 "788102743a3766554d2a820d3aaf5cb7d88759199942e61e8ff7db6cb15e8dad" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "7dd44ea62872b6b74da4a37c831226621642dae6c6df9fe22023541807efe4ba" => :catalina - sha256 "de93814870e37281df7262938f7a7342d4af8fa587eec8e32dd154089d0bc418" => :mojave - sha256 "71672f7b2e885d612d4590dafb8cc11b84a47e77e0d89de85879974b77c4a649" => :high_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 - port = free_port - - fork do - exec bin/"ungit", "--no-launchBrowser", "--port=#{port}" - end - sleep 8 - - assert_includes shell_output("curl -s 127.0.0.1:#{port}/"), "ungit" - end -end diff --git a/Formula/uni.rb b/Formula/uni.rb deleted file mode 100644 index 8443db1faf94c..0000000000000 --- a/Formula/uni.rb +++ /dev/null @@ -1,24 +0,0 @@ -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/v1.1.1.tar.gz" - sha256 "d29fdd8f34f726e6752e87f554d8ea73e324b7729afaf4bd52fcae04c7638757" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "d6a995e94c8bc6f9b74a1eb370b5aa348a7377e9170453820400da83641cef66" => :catalina - sha256 "1a2f04a3dd21f6d2c2ea16d3683f936e1d8310dd4b2d503aa8a60d67b6f24367" => :mojave - sha256 "e4b8e98523d14eb9cba3991946deb0cea86c09acfb65d175c04d4233ec32eceb" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"uni" - end - - test do - assert_match "CLINKING BEER MUGS", shell_output("#{bin}/uni identify 🍻") - end -end diff --git a/Formula/uni2ascii.rb b/Formula/uni2ascii.rb deleted file mode 100644 index 4eed1b3ad4897..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://deb.debian.org/debian/pool/main/u/uni2ascii/uni2ascii_4.18.orig.tar.gz" - sha256 "9e24bb6eb2ced0a2945e2dabed5e20c419229a8bf9281c3127fa5993bfa5930e" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "58d99cd9438e838d70d1fe8299f44ddaaf6f9378cb5849c0d8e89a178a32fafe" => :catalina - sha256 "97c679d5f838e03832a99e83068eddcddfa5276971f8edcd19b53a33d0179305" => :mojave - sha256 "e95934b7cfcfc96467f1d9d36ec91e04e53fa0edd71f9c0b8aff6e357128de5a" => :high_sierra - sha256 "298ca15b89643dfa4946d485105fed7baa6934556c63d2bf97a3b7af0984c325" => :sierra - sha256 "3cc5e96fa9c49edb0b06d60af238f4a4803feefe22bbf5924698649e8c4db5fb" => :el_capitan - sha256 "0200efd85e37c8c6e2582f82ff8fbb050bba07d31a1bf3720837f5d30da6a54b" => :yosemite - sha256 "b58b9d744048c9e2cc81e75d46c94926d14b2c25a613a05cd0835882221ade7c" => :mavericks - 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 60318f32ff1f1..0000000000000 --- a/Formula/unibilium.rb +++ /dev/null @@ -1,39 +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 "fb0335f25d2848a8dc1eb0911292905c76bb97e98bf349fc6afefe7752164fd1" => :catalina - 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 ce29a39b05a23..0000000000000 --- a/Formula/unicorn.rb +++ /dev/null @@ -1,84 +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 "3804516889997cf2eceb92e6baf8667396ec83f7a66c1c362925e0a11f9004cc" => :catalina - sha256 "78a5143347e18c673a63dc4b171f610499eb728836f20626bd77bc886374b853" => :mojave - sha256 "c44cbb02b8073ca0e70f13cf16272964ab52a8b19a20da07dcfd76c6f15585dd" => :high_sierra - sha256 "8c134f4b88d63da3908d419dd29118d6ada4489091cd53e81cc9a72f28a9760b" => :sierra - end - - depends_on "pkg-config" => :build - depends_on :macos # Due to Python 2 (Might work with Python 3 with next release (1.0.2) - # See https://github.com/Homebrew/linuxbrew-core/pull/19728 - - 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 0604bfc0306cd..0000000000000 --- a/Formula/unifdef.rb +++ /dev/null @@ -1,24 +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.12.tar.gz" - sha256 "fba564a24db7b97ebe9329713ac970627b902e5e9e8b14e19e024eb6e278d10b" - head "https://github.com/fanf2/unifdef.git" - - bottle do - cellar :any_skip_relocation - sha256 "ae908aa0c1845ce059576df3922808db790fb0ea91109f89aa930c8da7a68904" => :catalina - sha256 "ded3ae5ba762ee493fc5ed45d0e6ed5a8261b4bf9bc2de54880f4a373b1ba075" => :mojave - sha256 "74ec90a8fc2467e8d613f2a6347d973dcd6387fdd9734bc66088a64ace7e0d4d" => :high_sierra - 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/unison.rb b/Formula/unison.rb deleted file mode 100644 index 084e067291ad2..0000000000000 --- a/Formula/unison.rb +++ /dev/null @@ -1,38 +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" - license "GPL-3.0" - head "https://github.com/bcpierce00/unison.git", :branch => "master" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "045499eab89d6b0d3faa898fe91c71bc7cba031c5a244c2f7367bc3825c958b5" => :catalina - sha256 "58e3ccf3e3f0ac6b331b786fdb7bbe9f0e22babec094279f2c715bef256daacb" => :mojave - sha256 "0cce7f269f0458a4ce1318fce5af58f9bcbfd29e314211fc8dedb6b4d8a7f1fb" => :high_sierra - end - - depends_on "ocaml" => :build - - # Upstream fix for compatibility with OCaml 4.08 and later - # https://github.com/bcpierce00/unison/pull/276 - patch do - url "https://github.com/bcpierce00/unison/commit/23fa1292.diff?full_index=1" - sha256 "ad6b28dc2fe1c6c99863079c7e96b12452aa05c05ed010b6c551e32244ce76f2" - end - - 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 2dfb05bb73a48..0000000000000 --- a/Formula/unittest-cpp.rb +++ /dev/null @@ -1,34 +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" - license "MIT" - - bottle do - cellar :any - sha256 "19a4cef9ba95b37528f2a88d280b0f4c77809d7553a8e5747cfd4e41363f2fce" => :catalina - 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 75f297bde9844..0000000000000 --- a/Formula/unittest.rb +++ /dev/null @@ -1,28 +0,0 @@ -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" - - bottle do - cellar :any_skip_relocation - sha256 "ef8f5c6e18c32b813cb825ce467a6997592dca4762833f8e03f156629ffa74f9" => :catalina - 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 72220e225d192..0000000000000 --- a/Formula/uniutils.rb +++ /dev/null @@ -1,52 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "c2991a6dc15937fd36591ef3a56134d9474b544a3d0f9407a9555adebf3a53e7" => :catalina - 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 77300b4d97e79..0000000000000 --- a/Formula/unixodbc.rb +++ /dev/null @@ -1,34 +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" - license "LGPL-2.1" - - bottle do - rebuild 1 - sha256 "03ba378d971af98d07652f978548ffacb4c155ba11dd36af9d46af36e2d5674b" => :catalina - sha256 "d9f30688c0639d73b9e3a4b4b94d3679b2762e2cf0bff6b2ad64fcd175cc30ca" => :mojave - sha256 "0b30b166c0e6bbd9df375a018d0f2a80b944617230b15531093d20eb015971e6" => :high_sierra - sha256 "44407c41dc2c5cc58fcd2c254fa54ede75e7782b82567f4f1ba421d357203105" => :sierra - end - - depends_on "libtool" - - conflicts_with "libiodbc", :because => "both install `odbcinst.h`" - 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 705510a182ffd..0000000000000 --- a/Formula/unnethack.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Unnethack < Formula - desc "Fork of Nethack" - homepage "https://unnethack.wordpress.com/" - url "https://github.com/UnNetHack/UnNetHack/archive/5.3.2.tar.gz" - sha256 "a32a2c0e758eb91842033d53d43f718f3bc719a346e993d9b23bac06f0ac9004" - head "https://github.com/UnNetHack/UnNetHack.git" - - bottle do - sha256 "5a1aea5f715d4c8892be4a5e76d60157da6637559a0055c41ea8024284807e91" => :catalina - sha256 "84267cd44f073a41058516e7a8937da6b8b0f16e3500b0fd10ab0fedad77a5ce" => :mojave - sha256 "47228cb416afe4d7e9ab31a2b85914e6b27f77e88340f7ef174bb2d9dd3ea2bb" => :high_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 c8260192e0482..0000000000000 --- a/Formula/unoconv.rb +++ /dev/null @@ -1,31 +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/ab/40/b4cab1140087f3f07b2f6d7cb9ca1c14b9bdbb525d2d83a3b29c924fe9ae/unoconv-0.9.0.tar.gz" - sha256 "308ebfd98e67d898834876348b27caf41470cd853fbe2681cc7dacd8fd5e6031" - revision 1 - head "https://github.com/dagwieers/unoconv.git" - - bottle do - cellar :any_skip_relocation - sha256 "b8926bf449026133df038d3f6fa221803173193765a1de2de70da7b1e9ea4c7a" => :catalina - sha256 "b8926bf449026133df038d3f6fa221803173193765a1de2de70da7b1e9ea4c7a" => :mojave - sha256 "b8926bf449026133df038d3f6fa221803173193765a1de2de70da7b1e9ea4c7a" => :high_sierra - end - - depends_on "python@3.8" - - 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 - - test do - assert_match /office installation/, pipe_output("#{bin}/unoconv 2>&1") - end -end diff --git a/Formula/unp.rb b/Formula/unp.rb deleted file mode 100644 index 1c842fc55ef9f..0000000000000 --- a/Formula/unp.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Unp < Formula - desc "Unpack everything with one command" - homepage "https://packages.debian.org/source/stable/unp" - url "https://deb.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 9564518ab95f6..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_236_src.tar.bz2" - version "2.36" - sha256 "55126d9cd6d3bb0d77aeba3c9bd5d9e16805b098c66de92b33f44814425c39e1" - - bottle do - cellar :any_skip_relocation - sha256 "2bcb692303d870dec60ae2e5c664ffca2ff8d6e46365700c0701ae0e7b19e23d" => :catalina - sha256 "966cbf5ee30ed72e472df6fa40c80adc623a18c3ab9764e22185cb0b48da4e46" => :mojave - sha256 "d84f3af986ace7e131687c719d399212ca7c8e5bb4fc5f7bc9d0910db4116132" => :high_sierra - sha256 "60f32f5261a3a7cf7f0b7058a53163267a026fb03886875403c7ebae12eb0b34" => :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 7fa575895c4e1..0000000000000 --- a/Formula/unpaper.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Unpaper < Formula - desc "Post-processing for scanned/photocopied books" - homepage "https://www.flameeyes.com/projects/unpaper" - url "https://www.flameeyes.com/files/unpaper-6.1.tar.xz" - sha256 "237c84f5da544b3f7709827f9f12c37c346cdf029b1128fb4633f9bafa5cb930" - revision 4 - - bottle do - cellar :any - sha256 "c72b06d6ed960566861cfdd9e01949fe3b532c21efb380606f2b0820d7592c47" => :catalina - sha256 "e391cb0121a88acbadb26933c12c6066c638e802578650655260507e0dea490f" => :mojave - sha256 "d347977d11838ca92f9f648eda8b35da43e2b0fc5973f025081b55c1a11b0d2b" => :high_sierra - 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" - - uses_from_macos "libxslt" - - on_linux do - 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 - (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 fd8f58ddd7182..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.9.4.tar.gz" - sha256 "3d010d14223e0c7a385ed740e8f046edcbe885e5c22c5ad5733d009596865300" - - bottle do - cellar :any - sha256 "90e0f209046471dda292a622ded80ed410e237cb7fc8e1d2653f0d57c470fc6b" => :catalina - sha256 "a45568c9d67db8866971aec111e9e6d9d606549099f60240f2cf7c7096680270" => :mojave - sha256 "ca9a590d0bce2de6e35ce02fdc7a6bb2d32265a945949e278fb7ae4c8d3c2dca" => :high_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" - bin.install "unrar" - - # 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" - lib.install "libunrar.dylib" - end - - test do - contentpath = "directory/file.txt" - rarpath = testpath/"archive.rar" - data = "UmFyIRoHAM+QcwAADQAAAAAAAACaCHQggDIACQAAAAkAAAADtPej1LZwZE" \ - "QUMBIApIEAAGRpcmVjdG9yeVxmaWxlLnR4dEhvbWVicmV3CsQ9ewBABwA=" - - rarpath.write data.unpack1("m") - 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/unrtf.rb b/Formula/unrtf.rb deleted file mode 100644 index 13f9cd4a00454..0000000000000 --- a/Formula/unrtf.rb +++ /dev/null @@ -1,44 +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.10.tar.gz" - mirror "https://ftpmirror.gnu.org/unrtf/unrtf-0.21.10.tar.gz" - sha256 "b49f20211fa69fff97d42d6e782a62d7e2da670b064951f14bbff968c93734ae" - license "GPL-3.0" - head "https://hg.savannah.gnu.org/hgweb/unrtf/", :using => :hg - - bottle do - sha256 "90361817069fa7149b201a0caf5e65abd872d10f8fdda154ff450511debf1d99" => :catalina - sha256 "b038c53ba7341cc9365db6cf9d46c6f7c3feba843643168e24a12856a29a6dbb" => :mojave - sha256 "9abc63bdeae500637c8e1d6d31c72be013d0f2cf8ad8e3f1cb6e3babe5b6d94a" => :high_sierra - sha256 "4c9e869dad1a76bf4077d9e19cabf9d383ed914b5a1c348dadc1eb0961c23b0a" => :sierra - 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 f795ef7fe3dc5..0000000000000 --- a/Formula/unshield.rb +++ /dev/null @@ -1,28 +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" - license "MIT" - revision 1 - head "https://github.com/twogood/unshield.git" - - bottle do - sha256 "d64e0c93743d7d50858bd5c46c76b8fa79183b5ee4643361202f53378a88cc05" => :catalina - sha256 "ec5db176e7f9557645cfdb63062802d37a8e516f39f1e53037e37ed398992b3b" => :mojave - sha256 "c68a5391b55e5101979c69d174160564d88edc7263afa140fd69ce289c6662ed" => :high_sierra - sha256 "96cc0aa68d191d1bc98d09a48abaa44b58b4e979bfcec3b2abc384c30d56684d" => :sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system bin/"unshield", "-V" - end -end diff --git a/Formula/unum.rb b/Formula/unum.rb deleted file mode 100644 index 4998a168b6661..0000000000000 --- a/Formula/unum.rb +++ /dev/null @@ -1,23 +0,0 @@ -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.2/unum.tar.gz" - sha256 "d290070f4be54addacac7318dfb2c0bfde71690bba51f99ecf64671b71801d2a" - - bottle do - cellar :any_skip_relocation - sha256 "e2ee19c28d058e0874fc5eb6008229305c471eac5a60c88ab99ef0917b907eb7" => :catalina - sha256 "e2ee19c28d058e0874fc5eb6008229305c471eac5a60c88ab99ef0917b907eb7" => :mojave - sha256 "270c0296d036b4be85368539d895d27f0630e3f6a4106cc8758747e5f2371471" => :high_sierra - end - - def install - system "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("unum x").strip - end -end diff --git a/Formula/unyaffs.rb b/Formula/unyaffs.rb deleted file mode 100644 index 95260281e79d1..0000000000000 --- a/Formula/unyaffs.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Unyaffs < Formula - desc "Extract files from a YAFFS2 filesystem image" - homepage "https://git.b-ehlers.de/ehlers/unyaffs/" - url "https://git.b-ehlers.de/ehlers/unyaffs/archive/0.9.7.tar.gz" - sha256 "17489fb07051d228ede6ed35c9138e25f81085492804104a8f52c51a1bd6750d" - head "https://git.b-ehlers.de/ehlers/unyaffs.git" - - bottle do - cellar :any_skip_relocation - rebuild 2 - sha256 "4bcff00c990f1376a4a14084a7e4c5c47a9abd1411140071a8f32820b24bc0c3" => :catalina - sha256 "9ffaad154e3119644c754d02544e386f9d5b6f7d06aceba76e972cb321608deb" => :mojave - sha256 "c215b5e405c842ca4a82dc120b8a3c9b9a1868303ab740d4d8973b1cd0160eb9" => :high_sierra - 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 ddfa086d71181..0000000000000 --- a/Formula/unzip.rb +++ /dev/null @@ -1,85 +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 6 - - bottle do - cellar :any_skip_relocation - sha256 "178cea56554b0e6b74856203340554c7615c6ed2e122059c78370e35c896f0ce" => :catalina - sha256 "f0b95f2d5c664f45686f3aa318384906014ed28939da28020d12138f025aaeb6" => :mojave - sha256 "6dd7d0862f5a8b954dd94b3c91378209e0086eec7c5be367af0d8c330bc099da" => :high_sierra - sha256 "f4d59c04a44f93a30a23ec403784c73f9c06db9b72f3277679f66b1870a94331" => :sierra - end - - keg_only :provided_by_macos - - uses_from_macos "bzip2" - - # Upstream is unmaintained so we use the Debian patchset: - # https://packages.debian.org/buster/unzip - patch do - url "https://deb.debian.org/debian/pool/main/u/unzip/unzip_6.0-25.debian.tar.xz" - sha256 "0783e4d11d755cb43904e3f59a60dbb92ee9c6b08ac54d86bc61f9848216f37b" - 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/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 - ] - 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 3828f60d5dc8d..0000000000000 --- a/Formula/up.rb +++ /dev/null @@ -1,34 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "83553c30a557b081201b4e28600f52b589bfd8fc640c8b57dc6086d3a450be15" => :catalina - 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 7d826dc86db2a..0000000000000 --- a/Formula/upscaledb.rb +++ /dev/null @@ -1,86 +0,0 @@ -class Upscaledb < Formula - desc "Database for embedded devices" - homepage "https://upscaledb.com/" - license "Apache-2.0" - revision 14 - - 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 "16803511bcf21348ddd6c71d76367fef5961188d2b0f467a3ec05b044db5b3f7" => :catalina - sha256 "b07269e80731ac5700a84b05f1725a49d59e40191bbab4661750b204f14ba9b3" => :mojave - sha256 "003ac2a786a136acf66f8de4a25a0d72950c21dbb4e4b70afad486bba01319d7" => :high_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 "openjdk" - depends_on "openssl@1.1" - depends_on "protobuf" - - resource "libuv" do - url "https://github.com/libuv/libuv/archive/v0.10.37.tar.gz" - sha256 "4c12bed4936dc16a20117adfc5bc18889fa73be8b6b083993862628469a1e931" - end - - # Patch for compatibility with OpenSSL 1.1 - # https://github.com/cruppstahl/upscaledb/issues/124 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/a7095c61/upscaledb/openssl-1.1.diff" - sha256 "c388613c88e856ee64be2b4a72b64a1b998f1f8b835122579e2049e9f01a0f58" - 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=#{Formula["openjdk"].opt_prefix}" - 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 7dd58e8627216..0000000000000 --- a/Formula/uptimed.rb +++ /dev/null @@ -1,66 +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.2.tar.gz" - sha256 "5f803eccc1247b4a22171de4670a896e05adb9a82f018facda1b2cc5b19dbc97" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "8a60913d8acaf592560c0b6f42b77cd83b69adf5fbeee77e0e095f7e4b413f65" => :catalina - sha256 "ed7ff6b62654f5514d2657f07ed2dc83d5046a2219eb651b6423609fac961f28" => :mojave - sha256 "128fb7d767fc12e12917cbc761a942158f0fd75a5a9e209508670287cb5d00ed" => :high_sierra - sha256 "195a89c67e7e09ba690f1cfc8fd91ce07d0623ca9b5da4f2fc70dc7f1f81c9a7" => :sierra - 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/uptoc.rb b/Formula/uptoc.rb deleted file mode 100644 index 037c912716001..0000000000000 --- a/Formula/uptoc.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Uptoc < Formula - desc "Convenient static file deployment tool that supports multiple platforms" - homepage "https://github.com/saltbo/uptoc" - url "https://github.com/saltbo/uptoc.git", - :tag => "v1.4.3", - :revision => "30266b490379c816fc08ca3670fd96808214b24c" - - bottle do - cellar :any_skip_relocation - sha256 "6133ca9ca353edec73753c155c22bfc2757eecf8ae735e178f604fdb6e06a313" => :catalina - sha256 "01ebd4051546e2834975cd9ca921695a5deed06407ef4009e3b6e0c59dffc5ea" => :mojave - sha256 "8067fc0ce3bc47e786ad0476c477c34cda3dfdf1a10228aae699ee5afd9f3d10" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", - "-s -w -X main.release=#{version} -X main.commit=#{stable.specs[:revision]} -X main.repo=#{stable.url}", - *std_go_args, - "./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/upx.rb b/Formula/upx.rb deleted file mode 100644 index f70b9385200b4..0000000000000 --- a/Formula/upx.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Upx < Formula - desc "Compress/expand executable files" - homepage "https://upx.github.io/" - url "https://github.com/upx/upx/releases/download/v3.96/upx-3.96-src.tar.xz" - sha256 "47774df5c958f2868ef550fb258b97c73272cb1f44fe776b798e393465993714" - head "https://github.com/upx/upx.git", :branch => "devel" - - bottle do - cellar :any_skip_relocation - sha256 "1089a067bec1387bfa8080565f95601493291933b83a510057ba6f1e7fd06d91" => :catalina - sha256 "20ab82b69b19ac0886bd202459b652d85f7bc5c288009dd7caf09017be940d37" => :mojave - sha256 "4773fc3b7ccb35aad163549a7c5b37813dea9e5c2f1cdfd67a00e7da36691b69" => :high_sierra - end - - depends_on "ucl" => :build - - uses_from_macos "zlib" - - def install - 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/urdfdom.rb b/Formula/urdfdom.rb deleted file mode 100644 index f5c7f8e3c9cfe..0000000000000 --- a/Formula/urdfdom.rb +++ /dev/null @@ -1,50 +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.4.tar.gz" - sha256 "8f3d56b0cbc4b84436d8baf4c8346cd2ee7ffb257bba5ddd9892c41bf516edc4" - revision 2 - - bottle do - cellar :any - sha256 "1a4cf15eac5ab20085f401c827511eddd6075f2d4511f9b4a72c7388d587a91b" => :catalina - sha256 "8f9f55abf13706344949050a7fb077e4394daef2556a09b03deef1481eef432f" => :mojave - sha256 "a80e9b0bb93db5384993499150c28c883cc1f839e4e9fa7e933bf85067be1818" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "console_bridge" - depends_on "tinyxml" - depends_on "urdfdom_headers" - - patch do - # Fix for finding console_bridge 1.0 - url "https://github.com/ros/urdfdom/commit/6faba176d41cf39114785a3e029013f941ed5a0e.diff?full_index=1" - sha256 "f914442c1a3197cd8ac926fd2f7ef1a61f81f54b701515b87f7ced7a59078eb4" - end - - 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 6d092e06f73a6..0000000000000 --- a/Formula/urdfdom_headers.rb +++ /dev/null @@ -1,35 +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.5.tar.gz" - sha256 "76a68657c38e54bb45bddc4bd7d823a3b04edcd08064a56d8e7d46b9912035ac" - - bottle do - cellar :any_skip_relocation - sha256 "c6840c3177042a718ae29bc8238e5ec20dbcde4f9269b3042f8eed1a2aa6292c" => :catalina - sha256 "c6840c3177042a718ae29bc8238e5ec20dbcde4f9269b3042f8eed1a2aa6292c" => :mojave - sha256 "c6840c3177042a718ae29bc8238e5ec20dbcde4f9269b3042f8eed1a2aa6292c" => :high_sierra - end - - depends_on "cmake" => :build - - 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 19c8681399ec7..0000000000000 --- a/Formula/urh.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Urh < Formula - desc "Universal Radio Hacker" - homepage "https://github.com/jopohl/urh" - url "https://files.pythonhosted.org/packages/ef/9c/b023e69e2de551fe2250d2e374a62e41719d6bb491f96c6bc9c689fb1d28/urh-2.8.8.tar.gz" - sha256 "8c05637f7090958a03b3c67cb824252fa8a3677622f0c9e60aac91f0d0af07ca" - license "GPL-3.0" - revision 1 - head "https://github.com/jopohl/urh.git" - - bottle do - cellar :any - sha256 "9bc7cf512fa5a3e231485ba92e3fa3c8d0d3c88fa2ab91c4c827735706ad0eeb" => :catalina - sha256 "554bb77fc027931e3142d4dd320a95cde02eb10c090bdd3bc55289e0ec019252" => :mojave - sha256 "6d41d34525d5e158ee0d837ce4981c147262dd03a5d24d8ad5cbd6065cd24843" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "cython" - depends_on "hackrf" - depends_on "numpy" - depends_on "pyqt" - depends_on "python@3.8" - - resource "psutil" do - url "https://files.pythonhosted.org/packages/c4/b8/3512f0e93e0db23a71d82485ba256071ebef99b227351f0f5540f744af41/psutil-5.7.0.tar.gz" - sha256 "685ec16ca14d079455892f25bd124df26ff9137664af445563c1bd36629b5e0e" - end - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resources.each do |r| - r.stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec/"vendor") - end - end - - ENV.prepend_create_path "PYTHONPATH", Formula["cython"].opt_libexec/"lib/python#{xy}/site-packages" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - - system Formula["python@3.8"].opt_bin/"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 Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - 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 Formula["python@3.8"].opt_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/uriparser.rb b/Formula/uriparser.rb deleted file mode 100644 index 2706fc1c0acbc..0000000000000 --- a/Formula/uriparser.rb +++ /dev/null @@ -1,35 +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.4/uriparser-0.9.4.tar.bz2" - sha256 "b7cdabe5611408fc2c3a10f8beecb881a0c7e93ff669c578cd9e3e6d64b8f87b" - head "https://github.com/uriparser/uriparser.git" - - bottle do - cellar :any - sha256 "0fac36c34a537dd29050a29003d5e4a1c34ce8d00d964c7e8ebdeaafa99f6268" => :catalina - sha256 "5440ffb9d3363007478193e0ed4653d8f5eaf27fd36b5c0968968b73d14af2f9" => :mojave - sha256 "b25005697a3acc8cd6921189f41e6f7fa1c6667a9e259a3d85f8f1dea6915460" => :high_sierra - end - - depends_on "cmake" => :build - - conflicts_with "libkml", :because => "both install `liburiparser.dylib`" - - def install - system "cmake", ".", "-DURIPARSER_BUILD_TESTS=OFF", "-DURIPARSER_BUILD_DOCS=OFF", *std_cmake_args - system "make" - 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 eeb837fa63f53..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://deb.debian.org/debian/pool/main/u/urlview/urlview_0.9.orig.tar.gz" - version "0.9-20" - sha256 "746ff540ccf601645f500ee7743f443caf987d6380e61e5249fc15f7a455ed42" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "362aa6e91200cf83cd7de1150d2081f03cd9cb2adb9fccdcd53a5308fc20016f" => :catalina - sha256 "82e4e63f3439db87bc1f1f4b51d9ff7298a69c610e726a56b5ede58463975b59" => :mojave - sha256 "ded9ca6285a2c87ecfe9af130e5bc231adfa501c2aae5602c13f40b998077f6a" => :high_sierra - sha256 "0f75c9a2a4018f9bac7262314a9f391c63353abd707f820b92a389b21bbf08b8" => :sierra - sha256 "f748da269d23717c525cc0272bf90a1c286a16aaa868d9433505f6a72d28bfed" => :el_capitan - end - - patch do - url "https://deb.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 2e737bdb3896e..0000000000000 --- a/Formula/uru.rb +++ /dev/null @@ -1,34 +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 "d566fe465acd16153f2b1da700bacb19bb3fd78bfe13b055f255cd3b68688233" => :catalina - 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 7f8d043ecf042..0000000000000 --- a/Formula/urweb.rb +++ /dev/null @@ -1,54 +0,0 @@ -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" - revision 2 - - bottle do - sha256 "ea2ccdf37715d601fb22b301e9646d8a56bd408b88c8f83e2feda08d3695712c" => :catalina - sha256 "edfad2dea9f27c87d7a68396f50cbbf6d345edf6059abf555ad6c7d2d0bc2177" => :mojave - sha256 "ccc6d329298c6d3f3f4ba7e67b8be51017b7f95dad00de35d63fe49c670f1ee2" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "mlton" => :build - depends_on "gmp" - depends_on "icu4c" - depends_on "openssl@1.1" - - def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --with-openssl=#{Formula["openssl@1.1"].opt_prefix} - --prefix=#{prefix} - SITELISP=$prefix/share/emacs/site-lisp/urweb - ICU_INCLUDES=-I#{Formula["icu4c"].opt_include} - ICU_LIBS=-L#{Formula["icu4c"].opt_lib} - ] - - 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/usbredir.rb b/Formula/usbredir.rb deleted file mode 100644 index 5b406ddc1409b..0000000000000 --- a/Formula/usbredir.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Usbredir < Formula - desc "USB traffic redirection library" - homepage "https://www.spice-space.org/" - url "https://www.spice-space.org/download/usbredir/usbredir-0.8.0.tar.bz2" - sha256 "87bc9c5a81c982517a1bec70dc8d22e15ae197847643d58f20c0ced3c38c5e00" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "c7182aed390cc4cf96e9a99a728129367714b954062b7f92471a6e3864aed244" => :catalina - sha256 "579f1db366d50c027cfd6ea92149878b358d86bb6a9d491320e5f7fd62dfd2e8" => :mojave - sha256 "0d83ca33451b2c382dcf4b70be515549db139b0960712dc7f213e993ba7973d7" => :high_sierra - sha256 "7feac9566048e308877ef3f3d1b93660433dc8f1611e3daf031eaa4dd90c7238" => :sierra - end - - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libusb" - - # Upstream patch, remove for next release - # https://gitlab.freedesktop.org/spice/usbredir/issues/9 - patch do - url "https://gitlab.freedesktop.org/spice/usbredir/commit/985e79d5f98d5586d87204317462549332c1dd46.diff" - sha256 "21c0da8f6be94764e1e3363f5ed76ed070b5087034420cb17a81da06e4b73f83" - end - - def install - system "./configure", "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() { - return usbredirparser_create() ? 0 : 1; - } - EOS - system ENV.cc, "test.cpp", - "-L#{lib}", - "-lusbredirparser", - "-o", "test" - system "./test" - end -end diff --git a/Formula/userspace-rcu.rb b/Formula/userspace-rcu.rb deleted file mode 100644 index 241a4b0b61a66..0000000000000 --- a/Formula/userspace-rcu.rb +++ /dev/null @@ -1,33 +0,0 @@ -class UserspaceRcu < Formula - desc "Library for userspace RCU (read-copy-update)" - homepage "https://liburcu.org/" - url "https://lttng.org/files/urcu/userspace-rcu-0.12.1.tar.bz2" - sha256 "bbfaead0345642b97e0de90f889dfbab4b2643a6a5e5c6bb59cd0d26fc0bcd0e" - - bottle do - cellar :any_skip_relocation - sha256 "ddb5e2f5e985cba860f36a5730d933d88b4b0e76b1a450a3e76b244a5a6f1935" => :catalina - sha256 "09cbfc5e663214ad2df4e95cb2cf022ea6c153c6bc49d6918ec5c2e69e28a97b" => :mojave - sha256 "501a8f37d104b1a8f5cb625d2e1a17615114caf57054b9df9fb52df62761f138" => :high_sierra - end - - def install - # Enforce --build to work around broken upstream detection - # https://bugs.lttng.org/issues/578#note-1 - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --build=x86_64 - ] - - 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 83cf56d70cf86..0000000000000 --- a/Formula/utf8proc.rb +++ /dev/null @@ -1,32 +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.5.0.tar.gz" - sha256 "d4e8dfc898cfd062493cb7f42d95d70ccdd3a4cd4d90bec0c71b47cca688f1be" - - bottle do - cellar :any - sha256 "f215acf62769b7036110950b65285742b6550c631b0606befa12b98f32c53130" => :catalina - sha256 "1bd0f29df929fff62b33895ca76162b9d376aefea09115c84a3841793fa7a9a3" => :mojave - sha256 "12b05c0477b8f6fd029f3723d74712f267960fb9d212a21520f9a557d3cd516c" => :high_sierra - 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 a4cabf98818f3..0000000000000 --- a/Formula/util-linux.rb +++ /dev/null @@ -1,59 +0,0 @@ -class UtilLinux < Formula - desc "Collection of Linux utilities" - homepage "https://github.com/karelzak/util-linux" - url "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.35/util-linux-2.35.2.tar.xz" - sha256 "21b7431e82f6bcd9441a01beeec3d57ed33ee948f8a5b41da577073c372eb58a" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "8f9f0592f1135621eb61133f986c9372e6fa718d4137dfdaa63f2c212d729564" => :catalina - sha256 "10530ca9de44cb341b50114f3c740b58b7daaf030568662ac2a174feb1c25e49" => :mojave - sha256 "458ece9b1190f761a6fc42bf66484eec1e67cafb5ef44d6ccd40ee9a0b05cc7c" => :high_sierra - end - - keg_only "macOS provides the uuid.h header" - - uses_from_macos "ncurses" - uses_from_macos "zlib" - - 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 - "--enable-libuuid" # conflicts with ossp-uuid - - 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| - bash_completion.install prog if (bin/prog.basename).exist? || (sbin/prog.basename).exist? - 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 & (2 ** index)).zero? ? "-" : 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/utimer.rb b/Formula/utimer.rb deleted file mode 100644 index 960660b0e3f0f..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" - revision 1 - - bottle do - cellar :any - sha256 "58144b80218183cb1cb0bdccd87baf86a4bddbab8b3107a2197227a15b6a4f27" => :catalina - sha256 "01a5bce5e1e818932e0870eaed8586a23f3a6ca24504011005fc03d86992f63e" => :mojave - sha256 "ef1faac8b5226cad7b83369c5139a370543316fd43102f7a8ccd15ab63f4fe6e" => :high_sierra - sha256 "a2bb9673b9b7909dcb080f52ea6480d2d89f3ae0fdff3c599e17587ebce406e1" => :sierra - 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 3f48614ff9480..0000000000000 --- a/Formula/uudeview.rb +++ /dev/null @@ -1,37 +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 - cellar :any_skip_relocation - rebuild 1 - sha256 "9b5990b5b763e90614bd2d074e670c20e834541d60082a4e78f90d67a65da5c3" => :catalina - sha256 "2869df0b09975172227dc83be6d667b3d0f8e4f2cf0f6d9ec0cd3fdca02727f4" => :mojave - sha256 "7bb4c57755efed1b4208d234a0017d785757da04ca8f8e43c92980f3fe16b85c" => :high_sierra - 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/uutils-coreutils.rb b/Formula/uutils-coreutils.rb deleted file mode 100644 index 0580d6ab149ca..0000000000000 --- a/Formula/uutils-coreutils.rb +++ /dev/null @@ -1,81 +0,0 @@ -class UutilsCoreutils < Formula - desc "Cross-platform Rust rewrite of the GNU coreutils" - homepage "https://github.com/uutils/coreutils" - url "https://github.com/uutils/coreutils/archive/0.0.1.tar.gz" - sha256 "67b3fafd21e204cef4ffe04b055e148799523bc021a8ae08a399a9c847ce8e7f" - license "MIT" - head "https://github.com/uutils/coreutils.git" - - bottle do - cellar :any_skip_relocation - sha256 "bd2d08c082e4249d9d73dcdc251f8a441d6dad6f949547110ecb96a023c7f84e" => :catalina - sha256 "421ae0f39ebdea7acf3bfd9f569f376ee9008b4e7bb72340c09628e5b50021d1" => :mojave - sha256 "b8eb6f2ff0292941b52d1b1ecafad239844b8447a0bce67792b7d4b61b7aece8" => :high_sierra - end - - depends_on "make" => :build - depends_on "rust" => :build - depends_on "sphinx-doc" => :build - - conflicts_with "coreutils", :because => "uutils-coreutils and coreutils install the same binaries" - conflicts_with "aardvark_shell_utils", :because => "both install `realpath` binaries" - conflicts_with "truncate", :because => "both install `truncate` binaries" - - def install - man1.mkpath - - ENV.prepend_path "PATH", Formula["make"].opt_libexec/"gnubin" - - system "make", "install", - "PROG_PREFIX=u", - "PREFIX=#{prefix}", - "SPHINXBUILD=#{Formula["sphinx-doc"].opt_bin}/sphinx-build" - - # 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.install_symlink "uuman" => "man" - - # Symlink non-conflicting binaries - %w[ - base32 dircolors factor hashsum hostid nproc numfmt pinky ptx realpath - shred shuf stdbuf tac timeout truncate - ].each do |cmd| - bin.install_symlink "u#{cmd}" => cmd - man1.install_symlink "u#{cmd}.1.gz" => "#{cmd}.1.gz" - 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 - - 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/uwsgi.rb b/Formula/uwsgi.rb deleted file mode 100644 index 875f5b98e0ef2..0000000000000 --- a/Formula/uwsgi.rb +++ /dev/null @@ -1,142 +0,0 @@ -class Uwsgi < Formula - desc "Full stack for building hosting services" - homepage "https://uwsgi-docs.readthedocs.org/en/latest/" - revision 4 - head "https://github.com/unbit/uwsgi.git" - - stable do - url "https://projects.unbit.it/downloads/uwsgi-2.0.18.tar.gz" - sha256 "4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583" - - # 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 - sha256 "6c82bba2d7564bd3409867d304c578c7823d7c1db019d8b4c8223ae569a5f247" => :catalina - sha256 "2a3b1c26400d68491409b8625f56c730a2f69bbb5acc2596c80ea4cba3435fad" => :mojave - sha256 "2c511739e0317173b7c82b15a87a0eade429ed88be667801b477c95dc2affd72" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - depends_on "pcre" - depends_on "python@3.8" - depends_on "yajl" - - uses_from_macos "curl" - uses_from_macos "libxml2" - uses_from_macos "openldap" - uses_from_macos "perl" - - 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 - ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra || MacOS.version == :el_capitan - - openssl = Formula["openssl@1.1"] - ENV.prepend "CFLAGS", "-I#{openssl.opt_include}" - ENV.prepend "LDFLAGS", "-L#{openssl.opt_lib}" - - (buildpath/"buildconf/brew.ini").write <<~EOS - [uwsgi] - ssl = true - json = yajl - xml = libxml2 - yaml = embedded - inherit = base - plugin_dir = #{libexec}/uwsgi - embedded_plugins = null - EOS - - system "python3", "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] - - (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 - - 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 - - port = free_port - - pid = fork do - exec "#{bin}/uwsgi --http-socket 127.0.0.1:#{port} --protocol=http --plugin python3 -w helloworld" - end - sleep 2 - - 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/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..9a0082de3e4dd --- /dev/null +++ b/Formula/v/v.rb @@ -0,0 +1,41 @@ +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 + + 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-plugin.rb b/Formula/v/v2ray-plugin.rb new file mode 100644 index 0000000000000..f2ba15daf7739 --- /dev/null +++ b/Formula/v/v2ray-plugin.rb @@ -0,0 +1,52 @@ +class V2rayPlugin < Formula + desc "SIP003 plugin based on v2ray for shadowsocks" + homepage "https://github.com/shadowsocks/v2ray-plugin" + url "https://github.com/shadowsocks/v2ray-plugin/archive/refs/tags/v1.3.1.tar.gz" + sha256 "86d37a8ecef82457b4750a1af9e8d093b25ae0d32ea7dcc2ad5c0068fe2d3d74" + license "MIT" + head "https://github.com/shadowsocks/v2ray-plugin.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "00532fce7d2293129d839b5d0fc33993f916f79c8f748c35be37c4724dab1819" + sha256 cellar: :any_skip_relocation, arm64_ventura: "451c0d3013468c460f7f829d45fd5f2f91ccc20da50156f5a7b09244eff82636" + sha256 cellar: :any_skip_relocation, arm64_monterey: "72e881a144403b3d336c0d652601342580a9f67724647e46e2eaaa36e8408c70" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "8ff4ac95fa05cc7d11429495c27eb499a6b2539fc6306eda02593a3dbd2c3b9a" + sha256 cellar: :any_skip_relocation, sonoma: "658c5ea98b7c2f54319cac024525d51433f380425f8f26e5638d9ebf62908567" + sha256 cellar: :any_skip_relocation, ventura: "8f0b131b6f8bf64ed0c8ad43730e4d73bbd6d6fee0bf835ce8ebf826454af7a3" + sha256 cellar: :any_skip_relocation, monterey: "73aac43594414ae1109fbf9715166544d0a6acb6d1f6a98d725eed932ed14840" + sha256 cellar: :any_skip_relocation, big_sur: "6a3064ead8cb35a8951619e5899f4ddbeff48a0e504bf156d8325079fe5c642a" + sha256 cellar: :any_skip_relocation, catalina: "891f541e150a393ff20caa78eb79ef12f60929fb9e5b35826e2e639c46a61dc2" + sha256 cellar: :any_skip_relocation, mojave: "cb8ff7b812aa561f9e23935461968ba1c26cbe393c599aab4e1753b37702748b" + sha256 cellar: :any_skip_relocation, high_sierra: "f11b330c3dc9c445b757188057c93ce94de89f03f4adfa1a8c6405f5ba66b400" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ad295c462b215b5a36d4b8087f03675ef1e0e1508d53dfb96c63bc0be688d8c" + end + + # v2ray-plugin does not even build with go1.19, + # upstream bug report https://github.com/shadowsocks/v2ray-plugin/issues/292 + disable! date: "2024-08-24", because: :unmaintained + + depends_on "go" => :build + + def install + ldflags = "-s -w -X main.VERSION=v#{version}" + system "go", "build", *std_go_args(ldflags:) + end + + test do + server = fork do + exec bin/"v2ray-plugin", "-localPort", "54000", "-remoteAddr", "github.com", "-remotePort", "80", "-server" + end + client = fork do + exec bin/"v2ray-plugin", "-localPort", "54001", "-remotePort", "54000" + end + sleep 2 + begin + system "curl", "localhost:54001" + ensure + Process.kill 9, server + Process.wait server + Process.kill 9, client + Process.wait client + end + end +end diff --git a/Formula/v/v2ray.rb b/Formula/v/v2ray.rb new file mode 100644 index 0000000000000..97c0277d96d32 --- /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.31.0.tar.gz" + sha256 "20895d4200d3b7906a3fba90690cc2e27239989acc9c31601f40f2f71827e2e5" + 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_sequoia: "67660339b4d20dd4a333037966952f2e49f17f92fc1b580946cbfd0b74d9fe2e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "67660339b4d20dd4a333037966952f2e49f17f92fc1b580946cbfd0b74d9fe2e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "67660339b4d20dd4a333037966952f2e49f17f92fc1b580946cbfd0b74d9fe2e" + sha256 cellar: :any_skip_relocation, sonoma: "64673c3b99a4ea98102d6dd7a8bd107b2fe307355168b58bb7a223f805166d29" + sha256 cellar: :any_skip_relocation, ventura: "64673c3b99a4ea98102d6dd7a8bd107b2fe307355168b58bb7a223f805166d29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9b116ec40362e1eff5c4b3f7e45b1e4e7daa6fa0fc5cc2b1e9070bd720ffac6e" + end + + depends_on "go" => :build + + resource "geoip" do + url "https://github.com/v2fly/geoip/releases/download/202504050136/geoip.dat" + sha256 "735786c00694313090c5d525516463836167422b132ce293873443613b496e92" + end + + resource "geoip-only-cn-private" do + url "https://github.com/v2fly/geoip/releases/download/202504050136/geoip-only-cn-private.dat" + sha256 "f1d4e75e3abb42767dda336719d0e63d7b1d80f4aa78958d122da862dce1e365" + end + + resource "geosite" do + url "https://github.com/v2fly/domain-list-community/releases/download/20250415151718/dlc.dat" + sha256 "fc4d21440f7f04e938374a0ab676a147dfb3fac67e59275c7ee3b4ee036638bf" + 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..0a17ac224c147 --- /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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "ee9f92d890ff6d646db3b11554be91ed50219923f5a7900d7f3e980a8d00f9e8" + sha256 cellar: :any, arm64_sonoma: "7c4952b33dd522e79610eabb3beb9bbfdddc3378f41c2153041503e9f8f0a878" + sha256 cellar: :any, arm64_ventura: "9d424966acb2e88b34d0b27bef9032dc0d789deff4b298cb6ad2d43321227de7" + sha256 cellar: :any, sonoma: "9e25c1646f1f395ec8f9466d96fd5bd2bf3ca6f770ebf69905a43fdbaa80169e" + sha256 cellar: :any, ventura: "c66e6c688dd73c1a6182461e765231385f2bebcafeabf64234b1c5f6d6d26576" + sha256 cellar: :any_skip_relocation, arm64_linux: "7ecb114d91a7473d870fa935b34b9c45588ef16313a34027208bf1098656a6d8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17f7942f13ff8b10fb467c44c6af7d33c0b0f1d26c6bb4522b9d8e2164cfe19f" + 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_macos do + depends_on "llvm" if DevelopmentTools.clang_build_version <= 1400 + end + + 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 + } + + # uses Homebrew clang instead of Google clang + gn_args[:clang_base_path] = "\"#{Formula["llvm"].opt_prefix}\"" + gn_args[:clang_version] = "\"#{Formula["llvm"].version.major}\"" + + if OS.linux? + ENV.llvm_clang + 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 + # Work around failure mixing newer `llvm` headers with older Xcode's libc++: + # Undefined symbols for architecture x86_64: + # "std::__1::__libcpp_verbose_abort(char const*, ...)", referenced from: + # std::__1::__throw_length_error[abi:nn180100](char const*) in stack_trace.o + if DevelopmentTools.clang_build_version <= 1400 + gn_args[:fatal_linker_warnings] = false + inreplace "build/config/mac/BUILD.gn", "[ \"-Wl,-ObjC\" ]", + "[ \"-Wl,-ObjC\", \"-L#{Formula["llvm"].opt_lib}/c++\" ]" + end + 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/vagrant-completion.rb b/Formula/v/vagrant-completion.rb new file mode 100644 index 0000000000000..27fbdf829da12 --- /dev/null +++ b/Formula/v/vagrant-completion.rb @@ -0,0 +1,38 @@ +class VagrantCompletion < Formula + desc "Bash completion for Vagrant" + homepage "https://github.com/hashicorp/vagrant" + # NOTE: Do not bump to new release as license changed to BUSL-1.1 + # https://github.com/hashicorp/vagrant/pull/13248 + url "https://github.com/hashicorp/vagrant/archive/refs/tags/v2.3.7.tar.gz" + sha256 "fa8a96319aa7b9ff5f4a991b77cbf37f549549d84737624bcebefa8f2004bf45" + license "MIT" + head "https://github.com/hashicorp/vagrant.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "b0d411d4cb2f9c85c5f2fb8443dd25bcf8b7624c49019abf613ebd8caa38314f" + end + + # https://www.hashicorp.com/blog/hashicorp-adopts-business-source-license + disable! date: "2024-09-27", because: "will change its license to BUSL on the next release" + + def install + bash_completion.install "contrib/bash/completion.sh" => "vagrant" + zsh_completion.install "contrib/zsh/_vagrant" + end + + def caveats + <<~EOS + We will not accept any new Vagrant releases in homebrew/core (with the BUSL license). + The next release will change 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 + assert_match "-F _vagrant", + shell_output("bash -c 'source #{bash_completion}/vagrant && complete -p vagrant'") + end +end diff --git a/Formula/v/vala-language-server.rb b/Formula/v/vala-language-server.rb new file mode 100644 index 0000000000000..0915e83dadc7c --- /dev/null +++ b/Formula/v/vala-language-server.rb @@ -0,0 +1,58 @@ +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" + + bottle do + 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..19ce924f23ebc --- /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" + + bottle do + sha256 arm64_sequoia: "716e22a94ebd062b913cf3af1e67cbd1f542f42ba8583cbea1e6a7d8e6f49ae4" + sha256 arm64_sonoma: "d713590db8dec7752db9aecf7fd62ae2e4137c4c31a2d9c22a342240d387d61b" + sha256 arm64_ventura: "d537db8f3606aa9e6547ae1641572422774805a486cdc7453f870229bb4430ac" + sha256 sonoma: "da6bca3d96f7e0e54f963f048fed63957643a2e10da24eb64967025342082e38" + sha256 ventura: "d2966461c680aeca329ca96118aba8b4ccf302b249f5bbe277ed3ca29ea310af" + sha256 arm64_linux: "bc87adbb68e280ff0e1b91243a733ef824ba19a1c2680de8370b99c2fb2a1266" + sha256 x86_64_linux: "f0f40e3f67e893ab86517cb9426c23584a756a7a35416b1b22dd105c7313d12d" + 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..362c779b099a3 --- /dev/null +++ b/Formula/v/valabind.rb @@ -0,0 +1,50 @@ +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_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..289dc97e35f3a --- /dev/null +++ b/Formula/v/vale.rb @@ -0,0 +1,46 @@ +class Vale < Formula + desc "Syntax-aware linter for prose" + homepage "https://vale.sh/" + url "https://github.com/errata-ai/vale/archive/refs/tags/v3.11.2.tar.gz" + sha256 "12795c72a5628ebc22d46a33b878519c5ba18e6d665271893bfa24cb1f864f73" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f6a8cc077ed0f5ad8be3719f3d750bbfb1dbf7b96fa54ac98a074143fabb0768" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b0e73d48b35eae871854648ac295bee93b7186c8d523928ffa6eb59086f2a475" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f698c1ab684c91ba6a242db3b54443907112853b6d32dfab25346f412f47b280" + sha256 cellar: :any_skip_relocation, sonoma: "3f87db0ff1f2b0eb1e974f90fb3f0c047912be6638b980c1b353128d5aa00a7e" + sha256 cellar: :any_skip_relocation, ventura: "1837469512fe4b948a9c023360f72d1855013cc36ac17f4755ffd4c4ec75634b" + sha256 cellar: :any_skip_relocation, arm64_linux: "541ef5a35a92c6951d87b2d521a8d67b6acaa5222bfaee5c0afabba320f1e97d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fa4df31797b5d35b2dce4cef399c2ba428e0d7095cdaa0737b4f948fd25280b5" + end + + depends_on "go" => :build + + def install + 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..b98213750f971 --- /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.25.0.tar.bz2" + sha256 "295f60291d6b64c0d90c1ce645634bdc5361d39b0c50ecf9de6385ee77586ecc" + 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: "d08a423b398c89bf918a3747c18dc94b7f579b5a17f345cfc99298201016d276" + sha256 x86_64_linux: "5a23319834b4a115c848abad3245db57f410881b51b00a007ef5c432f0dad48b" + end + + head do + url "https://sourceware.org/git/valgrind.git" + + 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..76c02544e43a4 --- /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.5.tar.gz" + sha256 "1ef7ea6f49f0eb59da131b9148fcb7ebb8f0d4d970bcd80d21c0ad77968eb619" + license "BSD-2-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2329d1b8631829957aeb9664d43b1528aad3bcedabd161d5776939f5494d4245" + 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..dc76dedce2f19 --- /dev/null +++ b/Formula/v/valkey.rb @@ -0,0 +1,57 @@ +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/8.1.1.tar.gz" + sha256 "3355fbd5458d853ab201d2c046ffca9f078000587ccbe9a6c585110f146ad2c5" + 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_sequoia: "22efc3dadf1f4b35e1b3daec995dd2a5e36e1e3a3868c7dfc081fada6606db35" + sha256 cellar: :any, arm64_sonoma: "0bc6af893af7e5e9a44353284f613259013cf6920dae414e5c4a1ebf555f4846" + sha256 cellar: :any, arm64_ventura: "e5fbb187d387982c398a4df98404ad9fe667051fcde89f7b17fa199e8c319abf" + sha256 cellar: :any, sonoma: "f529f685e9cf947746a869f530f15c708baa85f34df666bd88a192c9d44055e2" + sha256 cellar: :any, ventura: "14cd2ea4515f6280bfc396a7e56fa63ce3d5dc94a99278081303edb277391a1a" + sha256 cellar: :any_skip_relocation, arm64_linux: "5b1687378a42d5b0ebecc79b840278cb94f33fb4b4a655f0bbe71c600b097c1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6dffc41005fd89ac2fb57190c2e9e40617dcd075316526321e1c05ebd364017c" + 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..5ba4a1f2f7267 --- /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.41.0.tar.gz" + sha256 "aa1133fc97a3ee75de0c7e3ace19324f7ab1655296e017f53aac9cdde9f5c759" + license "Apache-2.0" + head "https://github.com/helmfile/vals.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cdc50d4ccfd6d18013c51304922faf4fda5b13ccedca9f5a798df5197539cd51" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cdc50d4ccfd6d18013c51304922faf4fda5b13ccedca9f5a798df5197539cd51" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cdc50d4ccfd6d18013c51304922faf4fda5b13ccedca9f5a798df5197539cd51" + sha256 cellar: :any_skip_relocation, sonoma: "0392f355fd063a7b2597c955c4af079d647d5627a67dc3d330812976e74c0c78" + sha256 cellar: :any_skip_relocation, ventura: "0392f355fd063a7b2597c955c4af079d647d5627a67dc3d330812976e74c0c78" + sha256 cellar: :any_skip_relocation, x86_64_linux: "417e63d659f080edf35a0bf1284653930aba9ce15b1db7c5c49c3a724123db34" + 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..bd2c3d4e4eaf5 --- /dev/null +++ b/Formula/v/vamp-plugin-sdk.rb @@ -0,0 +1,66 @@ +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 + + bottle do + 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..4a617370b00ec --- /dev/null +++ b/Formula/v/vapor.rb @@ -0,0 +1,35 @@ +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.1.1.tar.gz" + sha256 "59e51d3e1d046b85fe664da7fea28e65996e200b5bac906203788dc17d4301d6" + license "MIT" + head "https://github.com/vapor/toolbox.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "702d70ded6b2c22677204cedbfa5346421b2943753e5a28e625a1790f47cabcf" + sha256 cellar: :any, arm64_sonoma: "2c0259ab78e9880a59db090f0be164e248992722a370492f5fd7fc361e0c7069" + sha256 cellar: :any, arm64_ventura: "7912d37527169a5b38fc117eca3d478def1c3434e1963d8b99d841d61e4aef05" + sha256 cellar: :any, sonoma: "8fa0660d40e6a186204bb8d5075db073087043e198af164e6821c654fc6ed8a4" + sha256 cellar: :any, ventura: "824bc70bd9ba27f645a011ed37841ce2fa307dc2b126c5115f43a840fafdfd8b" + sha256 arm64_linux: "10e1b470daefac9fbe28cf49959c2a1e41f10bc294ced177a4fe327c913c10e3" + sha256 x86_64_linux: "ee157b7f048c6a876bfc94f242b56cdf6139f16ee30fe34fd8fc548f70dd58e3" + 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..0b6af9c867306 --- /dev/null +++ b/Formula/v/vapoursynth-imwri.rb @@ -0,0 +1,53 @@ +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" + + bottle do + 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..6cd508f8b0a7c --- /dev/null +++ b/Formula/v/vapoursynth-ocr.rb @@ -0,0 +1,46 @@ +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" + + bottle do + rebuild 1 + 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..71c8df0674cfd --- /dev/null +++ b/Formula/v/vapoursynth-sub.rb @@ -0,0 +1,49 @@ +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 1 + version_scheme 1 + head "https://github.com/vapoursynth/subtext.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2a7e9a3f6ddb1982320e4319a9cea989f64f0631c077192f707ee341c88c03e7" + sha256 cellar: :any, arm64_sonoma: "a790bb27c1854e657d72731ea03ee7afc25b1400223a8603812ef8afad7a0554" + sha256 cellar: :any, arm64_ventura: "4eb095f03ea992f8c3fdb1140044a1146ff1cdbe8c9ff0b5805336fa4e4a94e9" + sha256 cellar: :any, arm64_monterey: "a20a39d297e2fbee9881147990abcd0678e54e0aafa880126404fc67e5118bfe" + sha256 cellar: :any, sonoma: "395c38b3e3b818d6a80c0ea68b9045a13c9eddef5506176cb3586ce5d4859ffd" + sha256 cellar: :any, ventura: "ce5253289d282a21485141cf0e0fdf807121e83f340265e02e9e3631f18f679c" + sha256 cellar: :any, monterey: "a7445fbbfc200cc578a4d00ab7333989353fe0f2ccea4ed91f963ce97764828a" + sha256 arm64_linux: "5bf6134027bc5e0e8d33a20e39c3145b761fae00bdd2829217bedd63e8c7388e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ebc9c1460d973e9f99019e07866d5422349101796a7a4267c83bc945bffceec" + end + + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "ffmpeg" + depends_on "libass" + 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.sub" + end +end diff --git a/Formula/v/vapoursynth.rb b/Formula/v/vapoursynth.rb new file mode 100644 index 0000000000000..8acd876f4fe77 --- /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/R71.tar.gz" + sha256 "c56d6de16d0a24db7eee1bd5e633229b0bd8a746eafcfe41945a22f9d44f8bd6" + license "LGPL-2.1-or-later" + 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_sequoia: "c811e68a0a4c74b0f5dd95251de2e2a371bee226248464d812eb8fb4e286c369" + sha256 cellar: :any, arm64_sonoma: "ad4ec393ca8107f78d57aaf86443351b358eb241628409e245a85a3c9ecdc987" + sha256 cellar: :any, arm64_ventura: "e48bcb4e7917b3e94fd2e807033b74cde7442b8424f74ccb5a3be4d0cb07ad40" + sha256 cellar: :any, sonoma: "1cfae7c19a2e90651be720f5de5115bb53fcaf4cadd30f9c42345860250f6ab7" + sha256 cellar: :any, ventura: "cdebbe7fcdcde1d9b2b497f95d5f4a4a0c726ae169603d3ff1b0847eab96f6be" + sha256 cellar: :any_skip_relocation, arm64_linux: "a6d9ebf6663b9f7eabfc1099f4bc075d6a468db6f53f1214ed49637458bd81bc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "08b6eb19bb2166cc0c976f621ba133f357e3629b2a2bbc0f30031e3ec7473671" + 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.13" + 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.13"].opt_bin/"python3.13", "-c", "import vapoursynth" + system bin/"vspipe", "--version" + end +end diff --git a/Formula/v/varnish.rb b/Formula/v/varnish.rb new file mode 100644 index 0000000000000..270e28708dc11 --- /dev/null +++ b/Formula/v/varnish.rb @@ -0,0 +1,86 @@ +class Varnish < Formula + desc "High-performance HTTP accelerator" + homepage "https://www.varnish-cache.org/" + url "https://varnish-cache.org/_downloads/varnish-7.6.1.tgz" + mirror "https://fossies.org/linux/www/varnish-7.6.1.tgz" + sha256 "5a9bb5a149ff27867b54a66ce16d2a4b93edffa5473cb87c9c71f7699cf845ba" + 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_sequoia: "c27410d2620eb90cdd55fe2d2f2cb9263e50b7e38f1657ed829933b2ba42d7dd" + sha256 arm64_sonoma: "dca58a2dd40ff2cd995d8ca52be858a63656a37c2098dd676ede5d2fb8ef5fc1" + sha256 arm64_ventura: "63ce70bd5ed1b4c5c6fb069732f9619cdacc43d664fe20e6ff036e8a2ada733a" + sha256 sonoma: "bc34ed9be333dbdc5459f969058a42808385e76e3b2ae62bb2cee111b970ebe4" + sha256 ventura: "f67e4e5eb341516ad0229efe39a4012a55e840fe4f38befc9e153baabfae757e" + sha256 arm64_linux: "223fe086adcc8058bb06ea141b750201fb1460c235adca0969cf84f8f68e51c0" + sha256 x86_64_linux: "edb61c2b757d063387fcb8de36074a1dbfcec2cbe7e0637d0e9cf0966c988109" + 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", "0.0.0.0: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", + ] + tests = testpath.glob("[bmu]*.vtc") - timeout_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/vassh.rb b/Formula/v/vassh.rb new file mode 100644 index 0000000000000..6132669c450b0 --- /dev/null +++ b/Formula/v/vassh.rb @@ -0,0 +1,22 @@ +class Vassh < Formula + desc "Vagrant Host-Guest SSH Command Wrapper/Proxy/Forwarder" + homepage "https://github.com/xwp/vassh" + url "https://github.com/xwp/vassh/archive/refs/tags/0.2.tar.gz" + sha256 "dd9b3a231c2b0c43975ba3cc22e0c45ba55fbbe11a3e4be1bceae86561b35340" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "941d5973bdb5b38f8e8b38331f84a5401c8689d09130b5cd770645e5881ee11d" + end + + # upstream missing license report, https://github.com/xwp/vassh/issues/17 + disable! date: "2024-08-10", because: :no_license + + def install + bin.install "vassh.sh", "vasshin", "vassh" + end + + test do + system bin/"vassh", "-h" + end +end diff --git a/Formula/v/vault-cli.rb b/Formula/v/vault-cli.rb new file mode 100644 index 0000000000000..f494001d8f4c6 --- /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/3.8.2/vault-cli-3.8.2-bin.tar.gz" + sha256 "e8f5c6ec2fa931172e09f28a32d52b0b5dad0696069e26a8edd38031423af1d7" + 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: "90751fc49b7d55f9a7eecb24ff8f805bd97342b5093093ede600899fd29e7139" + 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/vault.rb b/Formula/v/vault.rb new file mode 100644 index 0000000000000..f186c0f64bc44 --- /dev/null +++ b/Formula/v/vault.rb @@ -0,0 +1,71 @@ +# 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/" + # NOTE: Do not bump to v1.15.0+ as license changed to BUSL-1.1 + # https://github.com/hashicorp/vault/pull/22290 + # https://github.com/hashicorp/vault/pull/22357 + url "https://github.com/hashicorp/vault.git", + tag: "v1.14.4", + revision: "ccdd48d1f7b95fc99fd11d67fc1c687576b338de" + license "MPL-2.0" + head "https://github.com/hashicorp/vault.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "26af537dd044826cf7569c9cb4385e53c3de560518f8a521397b18695e9daa2c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "18ee0a998f38e77c9e5a6bf406fc7326c69caca580efd84b277346344e1afef2" + sha256 cellar: :any_skip_relocation, arm64_monterey: "79afeebdd21423dd875a11eb314f3c2367da14cc489284836820b97cac63bfc0" + sha256 cellar: :any_skip_relocation, sonoma: "4a4eb54aca81ed892781260cba36dd75c0274c52562ed21e3e6720ebbea75ff5" + sha256 cellar: :any_skip_relocation, ventura: "d21db328b2e6cd298c7dd00a9515f676294862fa8a865b1c7c86ea93d8c8e678" + sha256 cellar: :any_skip_relocation, monterey: "5521823fa49b37426440fbe642e2013edabba13d841686d759d4d8f699a9c921" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f4518c13f4613bb7adf425c5eabcd4a4cff94fdfe7def03201ac193f10fa7cb8" + end + + # https://www.hashicorp.com/blog/hashicorp-adopts-business-source-license + disable! date: "2024-09-27", because: "will change its license to BUSL on the next release" + + depends_on "go" => :build + depends_on "node" => :build + depends_on "yarn" => :build + + uses_from_macos "curl" => :test + + def install + ENV.prepend_path "PATH", Formula["node"].opt_libexec/"bin" # for npm + system "make", "bootstrap", "static-dist", "dev-ui" + bin.install "bin/vault" + end + + service do + run [opt_bin/"vault", "server", "-dev"] + keep_alive true + working_dir var + log_path var/"log/vault.log" + error_log_path var/"log/vault.log" + end + + def caveats + <<~EOS + We will not accept any new Vault releases in homebrew/core (with the BUSL license). + The next release will change 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 + addr = "127.0.0.1:#{free_port}" + ENV["VAULT_DEV_LISTEN_ADDRESS"] = addr + ENV["VAULT_ADDR"] = "http://#{addr}" + + pid = fork { exec bin/"vault", "server", "-dev" } + sleep 5 + system bin/"vault", "status" + # Check the ui was properly embedded + assert_match "User-agent", shell_output("curl #{addr}/robots.txt") + Process.kill("TERM", pid) + end +end diff --git a/Formula/v/vaulted.rb b/Formula/v/vaulted.rb new file mode 100644 index 0000000000000..58c49f6ad5e88 --- /dev/null +++ b/Formula/v/vaulted.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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, mojave: "246a6e46d12ceb79f4406802a72860a4d4e381bf34b8228c10773898b33dbb3e" + sha256 cellar: :any_skip_relocation, high_sierra: "24f80eafb9d738391a99724915f07a546ebc822d5e3ab725fc90bfa690cc4ee7" + 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..44b0a29a76dbf --- /dev/null +++ b/Formula/v/vbindiff.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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, mojave: "907ff3fce1fcb1cba6e746ea624f84234fe55703caa380b7ee19c1f8bb6cd193" + sha256 cellar: :any_skip_relocation, high_sierra: "c5d1025c94e7fe141a9522ed1460bfba8047393d63d59f54b391dec063c05c68" + sha256 cellar: :any_skip_relocation, sierra: "d6474b9e6a00c71f2c207c07dbfb015aa428d8f32e193b69c7b4a1f534f128db" + sha256 cellar: :any_skip_relocation, el_capitan: "b2f557094c03f5870173b32cdf9e8ff8bd7fd74340adfea7f1db6b6eced367d9" + 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..bb40b73733aa0 --- /dev/null +++ b/Formula/v/vc.rb @@ -0,0 +1,49 @@ +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_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..7aedec58d41ac --- /dev/null +++ b/Formula/v/vc4asm.rb @@ -0,0 +1,55 @@ +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" + + bottle do + 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, mojave: "5d806a353310bda8308cc207ff165541253d7a7ea39189ce156d066e5d7b4514" + 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..ec37f1f8da22e --- /dev/null +++ b/Formula/v/vcdimager.rb @@ -0,0 +1,38 @@ +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" + license "GPL-2.0-or-later" + revision 2 + + bottle do + 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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/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..8918e417e263c --- /dev/null +++ b/Formula/v/vcftools.rb @@ -0,0 +1,48 @@ +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" + license "LGPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c7e2211951604cd7cb290190f4085fa8386da11ce4691be960966704664594b7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "789091f23f949c8bb834001543ac748948ea8f6005f32e0a889f574a6db58cc8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b7e5d8712d69c3b8635ee3a626d21c512483e3f87272a36e1629eaa0ede2c12d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e3a70236094425a28dcebf4a60b84cc793c2e55e4198d0f40f25005cb8c33f86" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "02952054dace13adf39f6621591af9c8c33598334dda6c43948fab1e43916239" + sha256 cellar: :any_skip_relocation, sonoma: "447b5bf17b277ae1508b7a9622c12c7b81b705a8d831edf6df56eeedb63a8898" + sha256 cellar: :any_skip_relocation, ventura: "2841d9ffad2417761e6c116d810512694112942d28f2c650b55ec91dc661e65a" + sha256 cellar: :any_skip_relocation, monterey: "8a571823e4f66cb7bd7bf3e8ad91129c5e3ed844f4d9d1f4f4eaca60eb19b23e" + sha256 cellar: :any_skip_relocation, big_sur: "fd610cf54b51ec2ec429edfab36b2cf1b3eb14787ab0ef5ff9d805def8c48cb0" + sha256 cellar: :any_skip_relocation, catalina: "96424c5e9810127b9f450a88fd314eb94662b35ac88aee4c7efbc8f5420dd989" + sha256 cellar: :any_skip_relocation, mojave: "5d52f2eafbf96fcffd2b8f9804c2d0ca9752af4242c27ed5fe15a6f8cb935498" + sha256 cellar: :any_skip_relocation, high_sierra: "2fc4ca7c7c23841a1eed8539910737b5986079be6d22d1ff8375f052266bf478" + sha256 cellar: :any_skip_relocation, sierra: "32c81874b5d34dee1e36f2dd628cb7eaba8ecef3d612985d7c02c61d6790c5b6" + sha256 cellar: :any_skip_relocation, el_capitan: "866bc9927660b97ae5bc34dc38db397212163ab289b3284db2d8c610b2aff3d4" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e3effa105ced26b27631bdbbe42a80359e6f01e8803fb9be2931db5f455c585" + sha256 cellar: :any_skip_relocation, x86_64_linux: "12d75148c3b77914e113d975b122966b5936d05870330f66dc7aa6dc81def2f0" + 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..577219bbf434d --- /dev/null +++ b/Formula/v/vcluster.rb @@ -0,0 +1,46 @@ +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.25.0", + revision: "f82ff4096581aeba8b00391479b8b44913d5a144" + 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_sequoia: "773563ba6343cc2ae2ecad81e2cfeea1ebf915244c361e1e603bdeecfd693b9d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5ae4bed34b9c6621e5a928bcb717860ab8476bfe88e01443d48b6b0011656738" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dc40b5364a1a2cc936ba2c62f54e8c5340ff65428fecc225bf542fc7d245e432" + sha256 cellar: :any_skip_relocation, sonoma: "12d7b8ed890cfde35f7c0f51932d5e80334d69e2e7749ade00aeb087132ed853" + sha256 cellar: :any_skip_relocation, ventura: "27f1813139246fd851522c83b3a1ed42e46e3d81e1f7f2959748a6d55cad63b4" + sha256 cellar: :any_skip_relocation, arm64_linux: "319eea31185760c2f3e0a62170ae44c89bca2c06ec618eb226588950eae4041e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "852a133f04f540d385f82ba050a6729f69eada3bb266a4c35f58d0fa944d4124" + 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..29591e99e2d53 --- /dev/null +++ b/Formula/v/vcpkg.rb @@ -0,0 +1,72 @@ +class Vcpkg < Formula + desc "C++ Library Manager" + homepage "https://github.com/microsoft/vcpkg" + url "https://github.com/microsoft/vcpkg-tool/archive/refs/tags/2025-04-16.tar.gz" + version "2025.04.16" + sha256 "d0a1fdee0af8172991c12a02e6f3ed1ee4c33760a7680eea93685165335dc8b8" + license "MIT" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "fb1a0a958b91a10932c48c579d9053c8efd3d4792b08ac7717c67e7a7ed7ff2b" + sha256 cellar: :any, arm64_sonoma: "6973e3538b663122e2c62dec6c71cff7f05110b86b172db55b076b238fe8948a" + sha256 cellar: :any, arm64_ventura: "8b56e2acff1ae7065436db37f1a3720d453fbe290752bd93a433c4ed83101ae0" + sha256 cellar: :any, sonoma: "88227dc54670fc05b95597d293fe5c1237d7c386ff352566b101a361014e6741" + sha256 cellar: :any, ventura: "3c8a5ff50903bac8c17ee145b883a3897cf22217e1ade4e5761766fb7b250f9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "b25b847e9c31cc70d3f8b907db5f3593707d83e1536b4c2fa709e45ee6ccb8fb" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a573ef669c548b7410cddf1cc27ce0811a198e8d937b0a80758e02cd1b3ae89e" + 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. + + 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", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", # FIXME: workaround for CMake 4+ + *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..94a53f7942f7b --- /dev/null +++ b/Formula/v/vcprompt.rb @@ -0,0 +1,33 @@ +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" + + bottle do + 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..5b52a8593f3aa --- /dev/null +++ b/Formula/v/vcs.rb @@ -0,0 +1,47 @@ +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_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..3ed3b728c8ff5 --- /dev/null +++ b/Formula/v/vde.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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..0914af53fa27d --- /dev/null +++ b/Formula/v/vdirsyncer.rb @@ -0,0 +1,163 @@ +class Vdirsyncer < Formula + include Language::Python::Virtualenv + + desc "Synchronize calendars and contacts" + homepage "https://github.com/pimutils/vdirsyncer" + url "https://files.pythonhosted.org/packages/ee/c2/50eb6b430f447c062ae3cd07d1a354d768bdb1443580bd4ae16ec8c8296d/vdirsyncer-0.19.3.tar.gz" + sha256 "e437851feb985dec3544654f8f9cf6dd109b0b03f7e19956086603092ffeb28f" + license "BSD-3-Clause" + revision 1 + head "https://github.com/pimutils/vdirsyncer.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8d5d8caff129d1bd04a3bc1053dea96b450abdb139ddf91c2e58f3eae1686455" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "044260626c367cb745a4bab4ac5c4713f974cd4bc9293e38ac80fe5676c35561" + sha256 cellar: :any_skip_relocation, arm64_ventura: "49769d8cac044ada8b15d1ed3db8c83cb2f00b154c46354c523673cfa70d745b" + sha256 cellar: :any_skip_relocation, sonoma: "e8d51e71ec7cbdb9e21995cab9ee7e7f169973e7998c3a86747a60726060d347" + sha256 cellar: :any_skip_relocation, ventura: "b1030cd302d1a1c11dd379a488bfcf0ac6a110e17e0b4eaa36afab08b186bfbf" + sha256 cellar: :any_skip_relocation, arm64_linux: "78371fdbfe06269074729f55fedda1344e2622485955ff811f45ab19d23568b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "52f1a9a9af3c8d86551fb7864e80af1b8fb9d26a8641e334d617430522363d3a" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "aiohappyeyeballs" do + url "https://files.pythonhosted.org/packages/bc/69/2f6d5a019bd02e920a3417689a89887b39ad1e350b562f9955693d900c40/aiohappyeyeballs-2.4.3.tar.gz" + sha256 "75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586" + end + + resource "aiohttp" do + url "https://files.pythonhosted.org/packages/1d/cd/af0e573bdb77ae7df1148fe8e4ea854215a37db0b116aac6b5496335095e/aiohttp-3.11.4.tar.gz" + sha256 "9d95cce8bb010597b3f2217155befe4708e0538d3548aa08d640ebf54e3f57cb" + 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/ae/67/0952ed97a9793b4958e5736f6d2b346b414a2cd63e82d05940032f45b32f/aiosignal-1.3.1.tar.gz" + sha256 "54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc" + end + + resource "aiostream" do + url "https://files.pythonhosted.org/packages/9f/92/e10c6232f2e2e21a24ae9e6534292bd2d808ae43b719298f5599a2a38e4b/aiostream-0.4.5.tar.gz" + sha256 "3ecbf87085230fbcd9605c32ca20c4fb41af02c71d076eab246ea22e35947d88" + end + + resource "atomicwrites" do + url "https://files.pythonhosted.org/packages/87/c6/53da25344e3e3a9c01095a89f16dbcda021c609ddb42dd6d7c0528236fb2/atomicwrites-1.4.1.tar.gz" + sha256 "81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11" + end + + resource "attrs" do + url "https://files.pythonhosted.org/packages/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" + sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" + 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 "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz" + sha256 "81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817" + 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/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz" + sha256 "22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a" + end + + resource "oauthlib" do + url "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz" + sha256 "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918" + end + + resource "propcache" do + url "https://files.pythonhosted.org/packages/a9/4d/5e5a60b78dbc1d464f8a7bbaeb30957257afdc8512cbb9dfd5659304f5cd/propcache-0.2.0.tar.gz" + sha256 "df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + resource "yarl" do + url "https://files.pythonhosted.org/packages/4b/d5/0d0481857de42a44ba4911f8010d4b361dc26487f48d5503c66a797cff48/yarl-1.17.2.tar.gz" + sha256 "753eaaa0c7195244c84b5cc159dc8204b7fd99f716f11198f999f2332a86b178" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"vdirsyncer", shells: [:fish, :zsh], 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..c5cbbe3cb1d3a --- /dev/null +++ b/Formula/v/veccore.rb @@ -0,0 +1,38 @@ +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" + + 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 + + # fix SQLite requirement check; included in next release + patch do + url "https://github.com/VectorCamp/vectorscan/commit/d9ebb20010b3f90a7a5c7bf4a5edff2eb58f2a4f.patch?full_index=1" + sha256 "e61de5f0321e9020871912883dadcdc1f49cd423dab37de67b6c1e8d07115162" + end + + def install + cmake_args = [ + "-DBUILD_STATIC_LIBS=ON", + "-DBUILD_SHARED_LIBS=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() + { + 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..9cc89ae5e6f35 --- /dev/null +++ b/Formula/v/vedic.rb @@ -0,0 +1,36 @@ +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_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..75c21fb7539aa --- /dev/null +++ b/Formula/v/vegeta.rb @@ -0,0 +1,37 @@ +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.12.0.tar.gz" + sha256 "d756cbe93ccedab4519e27234640a7bcfb90efa24c63b21676b025faa62ba66e" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f218f87374db19956afade887249429c7799b8cc379e06afd5c2d5db527229e1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9c119a2544ff7ab95aaa931f1e17d5748598eca95f929c720ec87094d8e3fbcf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "416e192e973c3090db2ff15f0671289baf9a5c1c22c1dce1bc0f595fc52e220d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b4f4c70fece8eecd588b5f99e1d1ae28143f71542d65396516a09d197dd5acc3" + sha256 cellar: :any_skip_relocation, sonoma: "eaea67ec73efa19c37adfe621075a3def71ca93cb48f71a5ca0d69723de28549" + sha256 cellar: :any_skip_relocation, ventura: "7094b429a7a5977b2b494ef2f3a927b80ff9646ca00a5793c9379b40b87ed679" + sha256 cellar: :any_skip_relocation, monterey: "53867eb75b76dabfc099c5106bf9553573aa174344412307d326dba9d750e411" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c7e09f0126fe57216b63aea61c05ab241b771aae8d309e5e045844f37d679a12" + 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..053ef8810f27b --- /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.6/veilid-v0.4.6.tar.bz2" + sha256 "bb1f7f2e0360860d37f5744c909b135890ae876862cd8c01db1b138debbbdd83" + license "MPL-2.0" + head "https://gitlab.com/veilid/veilid.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e209b9c1b7b0b07db54429e05d94412f439f75831fb3c229c442fd5979c4433a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6d80e22029053fd1dfaaf5c724ed22322a7a3b3cb38c7f0483418ac69246429e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cd12ce3289797749e329333463657b9bd3df67cb1bb7da30236378ceb21101b2" + sha256 cellar: :any_skip_relocation, sonoma: "b03dce08deab12500a080f1abf3c4d0e76dcba45b8e5eec255eb721fbf657b43" + sha256 cellar: :any_skip_relocation, ventura: "8461c72e64a1ccab0996a88cae5dc3b55a1dfbb920582c571e8e8f0e5ecc76c3" + sha256 cellar: :any_skip_relocation, arm64_linux: "4d01721bfe5eb57ffb8fc01447e737773d77dc6424ffad336ea65fa3b5e4edcd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "35d30c4cc18b0fef161b437c8c77019a23cebf901971204390a32533f4ac74e2" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + + def install + ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? + ENV["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..77fc0e06eb240 --- /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.16.0.tar.gz" + sha256 "28f60947c1eab5beff03d509b9d06550f3bc9bb3465a8a8a5ad7ae289637945e" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5937a18a9f77c7aed6e357bc2e0e414b9383566e71a597ef1a182a214347a463" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5937a18a9f77c7aed6e357bc2e0e414b9383566e71a597ef1a182a214347a463" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5937a18a9f77c7aed6e357bc2e0e414b9383566e71a597ef1a182a214347a463" + sha256 cellar: :any_skip_relocation, sonoma: "51c3fa715fdaa3768513661959be57da58a89b22469ca03563d64d9e2d7df502" + sha256 cellar: :any_skip_relocation, ventura: "51c3fa715fdaa3768513661959be57da58a89b22469ca03563d64d9e2d7df502" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3bbae02c1cd289cb6ab17c2ba8bbdbd2b81e61a4d6f604f2032b5ed121da15ca" + 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..027b2bee28321 --- /dev/null +++ b/Formula/v/vera++.rb @@ -0,0 +1,162 @@ +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, mojave: "41254f89a2510f8c3f39718a2068a9000658ca714ee104fd426a1cc4d7afd8e7" + sha256 cellar: :any_skip_relocation, high_sierra: "73b49e98703b820ffc65213f2e14d0932c5b08851165042811b3e3318bbc84f6" + sha256 cellar: :any_skip_relocation, sierra: "3a261328afd43c8c38f33802ced93557c58ae8903dab90e0ca4546004003447f" + sha256 cellar: :any_skip_relocation, el_capitan: "76dcb0b9340b8fc9413fc848dff27e8805d7b2a9c63d5128fc83ce5bd3bd1cd5" + 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 + + 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..ceac2d17a32dd --- /dev/null +++ b/Formula/v/verapdf.rb @@ -0,0 +1,44 @@ +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.1.tar.gz" + sha256 "893bb430b05a15cefdc31c8dec036142da94f9d2c5b7ab572a081f97205cfd24" + 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_sequoia: "9a956c37fd5e13d495ed1c9d16d81899b9aa605598a695259e1361c8ac7ed8f0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "446e11ce78770ea8ac46b3a9e2bbdab1398fcdb31a12f168661881a11f672039" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8cdc4d6507e0189dcd0e6c765d0eea68fc15ed80c36da9cd166c8816db48a086" + sha256 cellar: :any_skip_relocation, sonoma: "84114507be187d60832f31848975a383a527da4ae1490a39dd62e34c635693c1" + sha256 cellar: :any_skip_relocation, ventura: "39fe874dacfcb08d49e49e456e1180ecd705891489db4afc9045d8aaa9a179c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "24fe59400c8855a145cb62adf851dcd3a3508b1ba6006a8fe7f18977450ff3ab" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d45fa16ad1cd67a9819f16870e87e5ae5e228ea6f57210068584e20890fb0ccf" + 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..407944ef04f2e --- /dev/null +++ b/Formula/v/vercel-cli.rb @@ -0,0 +1,39 @@ +class VercelCli < Formula + desc "Command-line interface for Vercel" + homepage "https://vercel.com/home" + url "https://registry.npmjs.org/vercel/-/vercel-41.7.8.tgz" + sha256 "3ea4d3b681004586e35032928f85dd07afcfd8f966462cc1f1ed806964e1769d" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "18469db7a6c116a2fb9c1898e56e2616237af167fe3b3bd2751fca7bc5484c2f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "18469db7a6c116a2fb9c1898e56e2616237af167fe3b3bd2751fca7bc5484c2f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "18469db7a6c116a2fb9c1898e56e2616237af167fe3b3bd2751fca7bc5484c2f" + sha256 cellar: :any_skip_relocation, sonoma: "24a0bd8f0fe6770470503eb237827daf8910c77c500a0539126e4a32c0373e9d" + sha256 cellar: :any_skip_relocation, ventura: "24a0bd8f0fe6770470503eb237827daf8910c77c500a0539126e4a32c0373e9d" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5549f4c45155065aa34d89798d77cc85bb7c6ab64685af3b350d1e5f9b6a41d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e231549028ff35afc70f154a75c87e0cf21fa0b6c9499623d6f68815c28659c" + 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..3d8575a5cced1 --- /dev/null +++ b/Formula/v/verilator.rb @@ -0,0 +1,74 @@ +class Verilator < Formula + desc "Verilog simulator" + homepage "https://www.veripool.org/wiki/verilator" + url "https://github.com/verilator/verilator/archive/refs/tags/v5.036.tar.gz" + sha256 "4199964882d56cf6a19ce80c6a297ebe3b0c35ea81106cd4f722342594337c47" + license any_of: ["LGPL-3.0-only", "Artistic-2.0"] + head "https://github.com/verilator/verilator.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "51abe3f812ae2f799bdd1d179d6ad7aa7d717f858ca34e23627f0e2fd0374c2e" + sha256 arm64_sonoma: "ac507af48c3423d27487a9ed8b46afd4ce938bd6e1ed3f5a9d7c1e590b463f83" + sha256 arm64_ventura: "8c61f1dd2a56a82465ac568ea37e90571e06b3717b08ed703171412ce5e41f52" + sha256 sonoma: "7c8f743ef144def9eec8b33062c47f751f5532324d361a5300db710e620a9966" + sha256 ventura: "57c53cd9064b9c9f9a8fa59d6dbf4b136e22cfb5fa075ac5d387ae3ae8fa328e" + sha256 arm64_linux: "199e15ff7f4201db378b0a6fa71478e2106e7d998c45a6c9812a4ce9dacae153" + sha256 x86_64_linux: "7a1b016d70892e80ed64e24fa3148ce42edf59568bb779fb8e4e11c7db38324e" + 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", since: :catalina + + 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..d2b2ba9773e1e --- /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/3d/26/7b871396c33006c445c25ef7da605ecbd6cef830d577b496d2b73a554f9d/vermin-1.6.0.tar.gz" + sha256 "6266ca02f55d1c2aa189a610017c132eb2d1934f09e72a955b1eb3820ee6d4ef" + license "MIT" + head "https://github.com/netromdk/vermin.git", branch: "master" + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "e25e54e3725d3f470d93f8272ac428d145eb667beb966d31498d02fee48be0c3" + end + + depends_on "python@3.13" + + 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..ae2803601fcdb --- /dev/null +++ b/Formula/v/verovio.rb @@ -0,0 +1,39 @@ +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.2.0.tar.gz" + sha256 "e1de4e0af9d8a19daaad0ac530764a418fa2b15920c5cf00d9c8c8b6d46d0790" + license "LGPL-3.0-only" + head "https://github.com/rism-digital/verovio.git", branch: "develop" + + bottle do + sha256 arm64_sequoia: "296ef951a1958de9cce7f46b31abb4b7b579401a24bca0c6d85ab211814a9246" + sha256 arm64_sonoma: "787734091de62bfcc098d156b389a2665ee16d7c50518fb78ff8018280553f6f" + sha256 arm64_ventura: "12c070c7f0298fbcec73022fdf7b41066a4f4053f3fc47e23da286eca5836f77" + sha256 sonoma: "ab5785deaab76ee197493865bcbb5e9180f9d0786225b82caad98a61b23ea8c5" + sha256 ventura: "e12265bf1c0540bb659b25d26686a85db0a3996b95ef5058cbc8f66d4c16fc54" + sha256 arm64_linux: "0edb045b79a9ebf9f10e138564f5bd7a6b9a00278131cdf9b8d08c8ebc24189c" + sha256 x86_64_linux: "670d42e80e46cf1409d21b92e9af8bf07acec7720a3a1cdc9ce52225de4f6da2" + end + + depends_on "cmake" => :build + + resource "homebrew-testdata" do + url "https://www.verovio.org/examples/downloads/Ahle_Jesu_meines_Herzens_Freud.mei" + sha256 "79e6e062f7f0300e8f0f4364c4661835a0baffc3c1468504a555a5b3f9777cc9" + end + + def install + system "cmake", "-S", "./cmake", "-B", "tools", *std_cmake_args + system "cmake", "--build", "tools" + system "cmake", "--install", "tools" + end + + test do + 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..207f0dbdf47dd --- /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.13.tar.gz" + sha256 "a050b3293860f92b5c21fe9350b3bb662882347b304289a8dd6150395d7488a1" + license "Apache-2.0" + head "https://github.com/versity/versitygw.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "53ef750e7080a361ce0aa3d5c8ccdae5409a6b27af73d4bc46c5353ebc821d41" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "53ef750e7080a361ce0aa3d5c8ccdae5409a6b27af73d4bc46c5353ebc821d41" + sha256 cellar: :any_skip_relocation, arm64_ventura: "53ef750e7080a361ce0aa3d5c8ccdae5409a6b27af73d4bc46c5353ebc821d41" + sha256 cellar: :any_skip_relocation, sonoma: "aa4e5453ac4238acf2af7326816350d08d4d406fd0e1f756c62debe69f5c829d" + sha256 cellar: :any_skip_relocation, ventura: "aa4e5453ac4238acf2af7326816350d08d4d406fd0e1f756c62debe69f5c829d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2da806afca3116e4381f8b2bc092c8fc07b4c1eeae250c4c644f82c48430d59a" + 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..99e6989375224 --- /dev/null +++ b/Formula/v/veryfasttree.rb @@ -0,0 +1,113 @@ +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_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..4266562c87b54 --- /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.515.40.tar.gz" + sha256 "7ba9d44e2e2a190ec3926bcd40ffe4c9c34dbfe2853faa43772e748da3186b4b" + 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_sequoia: "42b8b7fecf2bab10bd5f6a1479fd82581883a9403ce4d844cda1bb18acd72fcc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ad8a28ae5cb76e1b1a2f420648bfa78f50b94385736443352b07a13c94ef6c39" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a5bf4e8207f9dcaf41b2ba123798b2d7fb8930d5a3298d53962b8e2582d3fd38" + sha256 cellar: :any_skip_relocation, sonoma: "d54a6d85d103f03dc4df5333fd9b87bde6263fab12233d5f7e9b7a0ea18f6fae" + sha256 cellar: :any_skip_relocation, ventura: "1da92e87b8450c9570faa81e434acbede8ce6d1e9b1bcaf6406a862fe0efd71f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f0809890f83d89a04a174176f87382f8bdd28bd220543c967abd18d7c3c28dbb" + 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..1d926381a9768 --- /dev/null +++ b/Formula/v/vet.rb @@ -0,0 +1,33 @@ +class Vet < Formula + desc "Policy driven vetting of open source dependencies" + homepage "https://github.com/safedep/vet" + url "https://github.com/safedep/vet/archive/refs/tags/v1.10.3.tar.gz" + sha256 "8e5ce0c7cde44c113704a7ddeee54f8d63cf518605db9c3bd07423783ad7c7e2" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "498f1476d53b45630fc071a988e68d282d310c0660f352fb7943f15f8952e883" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "691c421966dd4b0ff06cfd5e4c213784f5c17a9c7a03f87ddecabb3ef74d7b8a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "db81cabb9d118f7f2c829de033f9619d4a1dbd23c4c25b4a61020b16d4b88a14" + sha256 cellar: :any_skip_relocation, sonoma: "78b9dbb4d1e7a3cccfeb419bb363b35171612582084de75480f436802413eeb7" + sha256 cellar: :any_skip_relocation, ventura: "f96ee0c7e580d822fbacb007494523cdbbdd9a52ba23963158512e427e8844a8" + sha256 cellar: :any_skip_relocation, arm64_linux: "30ba0971f998e46e7af64e799c3ca6adb0b264616ff975315acb2b2bf80d631a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "952e05a1915b263a0529c94c580d489343d5f58a1341662f6a819556d4829e70" + end + + depends_on "go" + + def install + 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..29d6eab35aebe --- /dev/null +++ b/Formula/v/vexctl.rb @@ -0,0 +1,40 @@ +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.3.0.tar.gz" + sha256 "5a5904448ef1bf11bd8a165d737acc88afd9799618f6583c15cee5d99dd58e17" + license "Apache-2.0" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c8d3737e23f7d11f5fe749b5524f7f92a36654592f53caf22e81281ffe6614e4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c8d3737e23f7d11f5fe749b5524f7f92a36654592f53caf22e81281ffe6614e4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c8d3737e23f7d11f5fe749b5524f7f92a36654592f53caf22e81281ffe6614e4" + sha256 cellar: :any_skip_relocation, sonoma: "6b46198d549d57cb6d165dd4f4009308fd7ba5373e68ea3e6551ebbb7c3e5d1d" + sha256 cellar: :any_skip_relocation, ventura: "cdfd7239a7588664765926a8a5e45dfbc50271017c625701c07d79ab78e67c2a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9129dd69cff712abe1ada640119124ac040263e31cb8ba1365e6e2edd54b7e5a" + 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/vf.rb b/Formula/v/vf.rb new file mode 100644 index 0000000000000..3b2125e79bced --- /dev/null +++ b/Formula/v/vf.rb @@ -0,0 +1,34 @@ +class Vf < Formula + desc "Enhanced version of `cd` command" + homepage "https://github.com/glejeune/vf" + url "https://github.com/glejeune/vf/archive/refs/tags/0.0.1.tar.gz" + sha256 "6418d188b88d5f3885b7a8d24520ac47accadb5144ae24e836aafbea4bd41859" + head "https://github.com/glejeune/vf.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "e5e2d467c81269aec65859de0dd589b4493e9be0b77d047433ae1d2b98184bce" + end + + disable! date: "2024-08-07", because: :no_license + + uses_from_macos "ruby" + + 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/v/vfkit.rb b/Formula/v/vfkit.rb new file mode 100644 index 0000000000000..4a4a41e22c91c --- /dev/null +++ b/Formula/v/vfkit.rb @@ -0,0 +1,36 @@ +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_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..f46c14447bebe --- /dev/null +++ b/Formula/v/vfox.rb @@ -0,0 +1,40 @@ +class Vfox < Formula + desc "Version manager with support for Java, Node.js, Flutter, .NET & more" + # homepage site issue report, https://github.com/version-fox/vfox/issues/426 + homepage "https://github.com/version-fox/vfox" + url "https://github.com/version-fox/vfox/archive/refs/tags/v0.6.6.tar.gz" + sha256 "f70ea9d2d4bf209dab839da91b8ddbcc7113c1f3e161eb1c8418fb1b9b4d3338" + 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_sequoia: "13645325445b061c993edbf6bbd288bd3bbef97bc574fbb64a604a47a5cf187a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "79565f604f7c981e922efd426816085e22446ddde1e7484916d00858a19ec0d4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "84fc5c5014a86f6a5e4eb506abc5b505330c8f2571f549e689290ad9bfde841f" + sha256 cellar: :any_skip_relocation, sonoma: "104c34110a53b74546ebefa64801afacd75a96dd4f790e31a5a59328362787fa" + sha256 cellar: :any_skip_relocation, ventura: "b0b0b1af20779c411206d3c205799050fa6b7cf7352996d541044a605cec6c93" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b194da09f35b780dfea89a8e346a388e52e1e83c9f2a6d33fd4d4499bb09b18e" + 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/vfuse.rb b/Formula/v/vfuse.rb new file mode 100644 index 0000000000000..924ce1dca827a --- /dev/null +++ b/Formula/v/vfuse.rb @@ -0,0 +1,33 @@ +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/refs/tags/2.2.6.tar.gz" + sha256 "fbf5f8a1c664b03c7513a70aa05c3fc501a7ebdb53f128f1f05c24395871a314" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_monterey: "f8184d1fd9ed9a9053df739ad09fa721686131c8a6c2a13b294aec564016cf19" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "f8184d1fd9ed9a9053df739ad09fa721686131c8a6c2a13b294aec564016cf19" + sha256 cellar: :any_skip_relocation, monterey: "95be83b370683ec27d9052f897028bd939241568d81939a67d3bb985d89a06df" + sha256 cellar: :any_skip_relocation, big_sur: "95be83b370683ec27d9052f897028bd939241568d81939a67d3bb985d89a06df" + sha256 cellar: :any_skip_relocation, catalina: "95be83b370683ec27d9052f897028bd939241568d81939a67d3bb985d89a06df" + sha256 cellar: :any_skip_relocation, mojave: "95be83b370683ec27d9052f897028bd939241568d81939a67d3bb985d89a06df" + end + + disable! date: "2024-07-05", because: :deprecated_upstream + + depends_on :macos + + def install + # Fix upstream artifact packaging issue + # remove in the next release + inreplace "Makefile", "2.2.5", "2.2.6" + inreplace "pkgroot/usr/local/vfuse/bin/vfuse", "2.2.5", "2.2.6" + + 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/v/vgmstream.rb b/Formula/v/vgmstream.rb new file mode 100644 index 0000000000000..4fc49a9188c07 --- /dev/null +++ b/Formula/v/vgmstream.rb @@ -0,0 +1,60 @@ +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: "r2023", + revision: "f96812ead1560b43ef56d1d388a5f01ed92a8cc0" + version "r2023" + 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_sequoia: "9d603c60f7149d4391e2f9603f077b8a5dea45eb22517e1fcae98966b0bcc8ed" + sha256 cellar: :any, arm64_sonoma: "a9f8d5660a11587ceb4f74c36028595bd0f382dec602d5dae67e60394512f1c5" + sha256 cellar: :any, arm64_ventura: "1efac14baca5b829081b4798b3fdad731d667b0076615e0ac92dde5caa08c5e8" + sha256 cellar: :any, sonoma: "2644519b01f118d98935bb7ef5c6b2205711938d904f548829960cc65229ea5c" + sha256 cellar: :any, ventura: "77b35a83341fc2faedc0bfa5fe0f925da8e410e76a38e426c720fca917228f02" + sha256 cellar: :any_skip_relocation, arm64_linux: "56043db74438ba802de747ab9c277b5f2521ec4077cd5cd3d70242aa7da18a97" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d542cf27b207fe2a8fdd850d5520c00bc70498ea835221a74198e08701c61dd2" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cmake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + + depends_on "ffmpeg" + depends_on "jansson" + depends_on "libao" + depends_on "libvorbis" + depends_on "mpg123" + depends_on "speex" + + on_macos do + depends_on "libogg" + end + + def install + ENV["LIBRARY_PATH"] = HOMEBREW_PREFIX/"lib" + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_AUDACIOUS:BOOL=OFF", + "-DUSE_CELT=OFF", + *std_cmake_args, + "-DFETCHCONTENT_FULLY_DISCONNECTED=OFF" # FIXME: Find a way to build without this. + system "cmake", "--build", "build" + bin.install "build/cli/vgmstream-cli", "build/cli/vgmstream123" + lib.install "build/src/libvgmstream.a" + end + + test do + assert_match "decode", shell_output("#{bin}/vgmstream-cli 2>&1", 1) + end +end diff --git a/Formula/v/vgrep.rb b/Formula/v/vgrep.rb new file mode 100644 index 0000000000000..65fe4a805cbfe --- /dev/null +++ b/Formula/v/vgrep.rb @@ -0,0 +1,47 @@ +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_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..de2a419df64d1 --- /dev/null +++ b/Formula/v/vgt.rb @@ -0,0 +1,38 @@ +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_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, 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..fd5c017d9abf3 --- /dev/null +++ b/Formula/v/vhs.rb @@ -0,0 +1,42 @@ +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.9.0.tar.gz" + sha256 "e8538a9019ddfa633ef7e0a6eb417b87fed0555d51b67dc59cb53493e179e20b" + license "MIT" + head "https://github.com/charmbracelet/vhs.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f2a2174756cce0799fda2f31c004d1e8193b85e56ed799ecaaaceb841e3ef02b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f2a2174756cce0799fda2f31c004d1e8193b85e56ed799ecaaaceb841e3ef02b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f2a2174756cce0799fda2f31c004d1e8193b85e56ed799ecaaaceb841e3ef02b" + sha256 cellar: :any_skip_relocation, sonoma: "195b57240e893ad37f6fc86d13c78d5ea4d99ff34213ce3ada8e6d66f63a0cb8" + sha256 cellar: :any_skip_relocation, ventura: "195b57240e893ad37f6fc86d13c78d5ea4d99ff34213ce3ada8e6d66f63a0cb8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d203d016045b4a304efbe5a1b9f21dbfce2bcd0fb2fb3e91cd694ac7c37d863d" + 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/vice.rb b/Formula/v/vice.rb new file mode 100644 index 0000000000000..762d81d2f9bc1 --- /dev/null +++ b/Formula/v/vice.rb @@ -0,0 +1,89 @@ +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 + + bottle do + 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..5be7ff2a621dd --- /dev/null +++ b/Formula/v/victorialogs.rb @@ -0,0 +1,60 @@ +class Victorialogs < Formula + desc "Open source user-friendly database for logs from VictoriaMetrics" + homepage "https://docs.victoriametrics.com/victorialogs/" + url "https://github.com/VictoriaMetrics/VictoriaMetrics/archive/refs/tags/v1.22.2-victorialogs.tar.gz" + sha256 "a2e9abf336cb0a299d611ca9c7955212b4d6f316bf1ef37e2c098bbf4e47a998" + 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+)+)[._-]victorialogs$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9577f4a0a1df19c12e4bc9d0a34ce0e3dc97b0d7ead48c87cd5a411c7ac800f0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f7af0a79edbd056451caead83ad35c56c6e2a1ab67ea0e3e2078f0234880a4b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "57fce423daf59802ed2fa6227549083f676135a15d7d5eb2663f4069041b193a" + sha256 cellar: :any_skip_relocation, sonoma: "3060bf5487bda7b971a1d3ab2e648ce40155f7b80e140f9fa12f47a00042f607" + sha256 cellar: :any_skip_relocation, ventura: "90c3abc2b382a747f0f11b14d474f66e394b6ab3a6f5b9532afde1b0cf050ca7" + sha256 cellar: :any_skip_relocation, arm64_linux: "9954ca0b118c4da6fdbde2339e115381c81b00ce490b7e5815d902e63e52179d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f36b946055a52021122e11efd41494fbd2e9b6ceb77a85cbb3bfc09bc797cbc8" + 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..7f922d29af3a1 --- /dev/null +++ b/Formula/v/victoriametrics.rb @@ -0,0 +1,82 @@ +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.117.1.tar.gz" + sha256 "879584545c160c3196410ef9f2f0b25a0512b65b2c4fa2940a428ec6c1e21dcf" + 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_sequoia: "a09b1a01afc262b6d1fcec7ad6ca6a6c38a61b07e2472489ae17c31c2d19b6cf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "97cf4f8288f1787e934464a6900f9a1342c268ef8612bc0703b43c9821dd866d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8b95be290b3321027b0fdabda27803f7b22bf8d093252d4e3214126c71e0726c" + sha256 cellar: :any_skip_relocation, sonoma: "38f5ff11b3c3472bae798883b628ef5caa07297ed348705e105e13ea8ffc721d" + sha256 cellar: :any_skip_relocation, ventura: "631316ede9295286bde3cd3bb4235add6b5f83e22617c3bc189b0977a3c94cd8" + sha256 cellar: :any_skip_relocation, arm64_linux: "446a537497d162a0d6eb44d4ae157849b81891ffe06ecba5ab02c6cb051b5670" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8696a98a0612330ed2bb851174b28b5b1d257f82b83c36e17762d891651c686d" + 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..25d9d20677d32 --- /dev/null +++ b/Formula/v/viddy.rb @@ -0,0 +1,40 @@ +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_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..b2b7667d68e38 --- /dev/null +++ b/Formula/v/video-compare.rb @@ -0,0 +1,39 @@ +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/20250420.tar.gz" + sha256 "cfb1de9608fa141defa44b62c10ff7a56ea668c87d6c2c102409bddcaa98cd83" + license "GPL-2.0-only" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2c5125f72c106ad0de9b066a00ee77ed43751b807be6caad411530ccae8cf572" + sha256 cellar: :any, arm64_sonoma: "91c960962a8409b7841aa0b2a388d4ab1f2c6b5daf41c9472d44a959a3fb1c67" + sha256 cellar: :any, arm64_ventura: "c3a662d5fa05837480826ac2f95024af62e3a74fc30a907f2372fbaf98fb5128" + sha256 cellar: :any, sonoma: "2ad8afdfb80441451a6e2a123349192ee6baa8c23477b62852e516716ad4dac9" + sha256 cellar: :any, ventura: "cf796389a2bff83b437f3a7fe226b0316f6422d470a21e32815b8c8d4e54f7c0" + sha256 cellar: :any_skip_relocation, arm64_linux: "9d95f27e30d009906f937a6a65afe3d93fc8362b424780c61fa1664c65413adc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f666dd06227df40270d1e148a0b712f8545652baf0ab9332b4cfb0f70f41e363" + 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/viennacl.rb b/Formula/v/viennacl.rb new file mode 100644 index 0000000000000..b598b074d59cb --- /dev/null +++ b/Formula/v/viennacl.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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", *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..4c5e9faf1fa9a --- /dev/null +++ b/Formula/v/vifm.rb @@ -0,0 +1,39 @@ +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.2/vifm-0.14.2.tar.bz2" + sha256 "cd1b05d2543cdf6829d60b23bc225c6fde13d3ef7c1008f821b9209837f1e2b0" + license "GPL-2.0-or-later" + head "https://github.com/vifm/vifm.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "9276255fe9b32995b3eae789f1d36a8392aa8b8660687ccaf72254f3f38cbbc9" + sha256 arm64_sonoma: "8f9fb46f4484435937bef4a659c1fb3c2b9c76d5b0cd34ef982dd709aec0805e" + sha256 arm64_ventura: "2058d4a40e37ed15822c06e2f2c27fd299f15d992a177daaf88d419d27224c38" + sha256 sonoma: "2a7cde7ab932811531b08addaea260eaebe721053dd7c655cd67dab342755251" + sha256 ventura: "df22d2e5dae7db8ac5724c3fae19e9f8b8b15f8b75205b0f98360ce438a3c9b4" + sha256 arm64_linux: "8009c37ce7a2fce889c16ef9e6506e9916e5b33213ce8e22e09adad77206d8d7" + sha256 x86_64_linux: "3eb75803e9f5796343cee46031d84d69a5e245ad90ce3ebd875b5dffd9002f82" + 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..0daa1fa2de5e8 --- /dev/null +++ b/Formula/v/vile.rb @@ -0,0 +1,50 @@ +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_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..dc94b4e64e8a5 --- /dev/null +++ b/Formula/v/vilistextum.rb @@ -0,0 +1,51 @@ +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 + + bottle do + 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, mojave: "c36418e1556b9f5f9c0126811fddca3149137abfed6b36596ec4612c3806a3ec" + sha256 cellar: :any_skip_relocation, high_sierra: "6005ce3b4c593707dfe7ffbc10ea64f26ce6e441803a9133ab46ba0fbaee422f" + sha256 cellar: :any_skip_relocation, sierra: "b8fa6ddde71b9b86128e12bbc343935ca5ec58e15d28da2a1a9972a23df9becd" + sha256 cellar: :any_skip_relocation, el_capitan: "d46bae51c7e9a7193a735660af8583960c98e50f03aa33c8a9d81c22b2d9bf61" + 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..9c44e68149d0c --- /dev/null +++ b/Formula/v/vim.rb @@ -0,0 +1,108 @@ +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.1350.tar.gz" + sha256 "345a2aa99c1a6308e6decf77e9d4b53ffa870261a62170f44988d58b0a519ed8" + 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_sequoia: "aa2a459e2b4f6ec653a9ab5cb57c136650fa9c6a2b07fe856eec22e508999663" + sha256 arm64_sonoma: "8484376bd7f11cc44bc7a57c9a9ec6b2610e21413c38978d3ff9c69628332f38" + sha256 arm64_ventura: "b5c3afabcf892c78de42d09b9d4e306af27b9c938ea5469ef9cab16986f4c141" + sha256 sonoma: "7b76fe4a356f93ed673cbe19c9dcbf5f1a5b677154b39664119c1efa9b4af8bd" + sha256 ventura: "0c16b7fae80551b147eabc66f184b2e20ce354d1a37d3daea6a67959bb8d21c3" + sha256 arm64_linux: "1a6513096b6d9f9e62a65a77a3ff489f7e15d8b75d2dc3d1e6bffd4406e22437" + sha256 x86_64_linux: "07a0885927640a66dfe8038210e1990d76386e8305817ef5bfe57ad3e74a85fa" + end + + depends_on "gettext" + depends_on "libsodium" + depends_on "lua" + depends_on "ncurses" + depends_on "python@3.13" + 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.13"].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..4a4351f05175e --- /dev/null +++ b/Formula/v/vimpager.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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, mojave: "f4ec02de4d30af041e98f3ab4ce6344424f7a8f5bfeca6cf21dc179cbd6e576a" + sha256 cellar: :any_skip_relocation, high_sierra: "73aaa39c9876664b2f0b0a98dea30ea34e05504f28d607276873345d57b97834" + sha256 cellar: :any_skip_relocation, sierra: "308c68e761983beb317bbefcba285022dbc74a66486a3da7e2ac8bc929649a3a" + sha256 cellar: :any_skip_relocation, el_capitan: "eccfe695299ff91b489e0385b2024e6f383426f696dc4a5462fe2e0bc6f875b1" + 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..ff6488b6ee6dd --- /dev/null +++ b/Formula/v/vimpc.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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..5a1c4510dee78 --- /dev/null +++ b/Formula/v/vimtutor-sequel.rb @@ -0,0 +1,23 @@ +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" + + 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/vineyard.rb b/Formula/v/vineyard.rb new file mode 100644 index 0000000000000..f578d7992911f --- /dev/null +++ b/Formula/v/vineyard.rb @@ -0,0 +1,154 @@ +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.2/v6d-0.24.2.tar.gz" + sha256 "a3acf9a9332bf5cce99712f9fd00a271b4330add302a5a8bbfd388e696a795c8" + license "Apache-2.0" + revision 2 + + bottle do + sha256 arm64_sequoia: "e5fefb6b4cf166c97d1fbe080cc238b2eb3ca965be76f6da9f89ffcb68e09239" + sha256 arm64_sonoma: "c89b4be50ae6ebeaa028a1747ad0b41dd89a9dabf6e1aa818f720099ddcc895b" + sha256 arm64_ventura: "d5b9f9c75e05e2ad226205c8039ebb59bc422820be50f4af1b4bd9c4158b5a3e" + sha256 sonoma: "4dbc7c6a1185063c18dafe402cc953e97f465c3ca4d71c765122583fe9d961eb" + sha256 ventura: "34d272fa2442ea030f0063a9b196986190f3d6a7e4ed83621fbd09faa044c138" + sha256 cellar: :any_skip_relocation, arm64_linux: "0fdb9b27a792dcf2a0ba98dd1c02f20e1a48f897167c7758d0ee09a38da8093c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "872e8fa3f8756f576120bf817cc87bf4999fb788dc38626d99171ee97db99ad4" + 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.13" => :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_linux do + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + def install + # 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.13" + # 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" + + # prepare vineyardd + vineyardd_pid = spawn bin/"vineyardd", "--norpc", + "--meta=local", + "--socket=#{testpath}/vineyard.sock" + + # sleep to let vineyardd get its wits about it + sleep 10 + + assert_equal("vineyard instance is: 0\n", + shell_output("#{testpath}/build/vineyard-test #{testpath}/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..a7bca581df36a --- /dev/null +++ b/Formula/v/vint.rb @@ -0,0 +1,95 @@ +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 6 + sha256 cellar: :any, arm64_sequoia: "d2e44d7c8f741058e7053452b35c8c95997f96f60bfb3b2327194a5bed7d90de" + sha256 cellar: :any, arm64_sonoma: "4761ec8bf7182df8ae684701d235309968cc96197f6fa6faa876e4ac6b9af816" + sha256 cellar: :any, arm64_ventura: "e5bc6e57ded07e6f471eec105c4257f76939e2cb1f6efb4ec428bac68aac9e7b" + sha256 cellar: :any, sonoma: "b768c5d123e23695279516cc24c2bd6de3b2a31bf8d9c25e2f9b252a6ce045b4" + sha256 cellar: :any, ventura: "c3d75f055b30da8429d0506965e1770baa6dfa8eed9c6b371125e20bfc1296e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "16adbea12b2c4447bc977212aec4286b94b7a1b16afdadb780efcab233a862f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e353a7a8aef81e094ecdc67dece6c35786b9cf38c263b3f600a190166a07bebd" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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..6eb79a062777b --- /dev/null +++ b/Formula/v/vip.rb @@ -0,0 +1,53 @@ +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 + + 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/formula-patches/85fa66a9/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..ba4265924959c --- /dev/null +++ b/Formula/v/vips.rb @@ -0,0 +1,95 @@ +class Vips < Formula + desc "Image processing library" + homepage "https://github.com/libvips/libvips" + url "https://github.com/libvips/libvips/releases/download/v8.16.1/vips-8.16.1.tar.xz" + sha256 "d114d7c132ec5b45f116d654e17bb4af84561e3041183cd4bfd79abfb85cf724" + license "LGPL-2.1-or-later" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "a5c9ff3d50640de8bca6d78cb928d139c51999d484ea342cf864db3d86e27c97" + sha256 arm64_sonoma: "013d0aab231b653fa3e2ee4251bda92c1e0eea1ed1a4baafbf444b3273a60375" + sha256 arm64_ventura: "47dc847d95d38abea41706e81d7009d57d176fa02b0c231513a032dcd3a23e16" + sha256 sonoma: "362496337c54b8cce1b87f2835436ecbf328334ff7953417cf95b348123ac26f" + sha256 ventura: "bbb669b3daf640b0e18306f6df0cdc3d27beb7fd7c20821d35cf2f09ac8579da" + sha256 arm64_linux: "be574b0fe541e799244a7e34b1e5070c43d18f19ebc87f435eb4ca04ea772736" + sha256 x86_64_linux: "5baeeb91cc40682eec26c3f06ba91a09e7c529e03ea2ff2314450791beb9f9fe" + 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..72e4a1533d548 --- /dev/null +++ b/Formula/v/vipsdisp.rb @@ -0,0 +1,46 @@ +class Vipsdisp < Formula + desc "Viewer for large images" + homepage "https://github.com/jcupitt/vipsdisp" + url "https://github.com/jcupitt/vipsdisp/releases/download/v3.1.0/vipsdisp-3.1.0.tar.xz" + sha256 "5c40e71c9c60232dcbf2e1c389295a4a102a27603bce994dbb2e35ff4f1844db" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "c730d171fb0ff997048081609c182e91de7c462764255972070153d3f3957fcd" + sha256 cellar: :any, arm64_sonoma: "77e6eabacad3268d0fbbf4642b5a9860b7811d79b76223b4ea4a64b671d04191" + sha256 cellar: :any, arm64_ventura: "04dff97da157a1807ef04cf555d74c42fceea4f63fed8f569f1b5f41d7ce2146" + sha256 cellar: :any, sonoma: "ab4c0f5577e3e3d12fee9d18b7d4033b3930a7b861185eaa74891e6bc954e04a" + sha256 cellar: :any, ventura: "b53418e567653dd0da7087a0f48c21205eb9198871e18ccc51eff0f75ffc947a" + sha256 arm64_linux: "0337ec69ca9d8102849c8a000b075c1f6b09cb5841c703225b8678bcaa1b6ad8" + sha256 x86_64_linux: "59bba41fe00cac2d5012a4a3526233f1c3d77f8d926a0160d95b63c7c4c2360d" + 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 "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..bf5c9da24e9e6 --- /dev/null +++ b/Formula/v/virgil.rb @@ -0,0 +1,36 @@ +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, mojave: "d115016c280fbfe9381b56d0e08b9a69b4dc62042bb73424c243ea3f73280cd9" + sha256 cellar: :any_skip_relocation, high_sierra: "f7b6c179875ab30f849e3cbba53c8aeed7af4c569b69d4b112c2d749e5c38ea4" + 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..b9d3539a34e6f --- /dev/null +++ b/Formula/v/virt-manager.rb @@ -0,0 +1,99 @@ +class VirtManager < Formula + include Language::Python::Virtualenv + include Language::Python::Shebang + + desc "App for managing virtual machines" + homepage "https://virt-manager.org/" + url "https://releases.pagure.org/virt-manager/virt-manager-5.0.0.tar.xz" + sha256 "bc89ae46e0c997bd754ed62a419ca39c6aadec27e3d8b850cea5282f0083f84a" + license "GPL-2.0-or-later" + head "https://github.com/virt-manager/virt-manager.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "83397ecb04b719a262ba0d0b06a0a7561598de290647b16fce11ed3e64a7fa9c" + 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" + depends_on "cpio" + depends_on "gtk-vnc" + depends_on "gtksourceview4" + depends_on "libosinfo" + depends_on "libvirt-glib" + depends_on "libvirt-python" + depends_on "libxml2" # can't use from macos, since we need python3 bindings + depends_on :macos + depends_on "osinfo-db" + depends_on "py3cairo" + depends_on "pygobject3" + depends_on "python@3.13" + depends_on "spice-gtk" + depends_on "vte3" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + python3 = "python3.13" + 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 + + 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..dc5bd65b271fb --- /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.5.1.tar.gz" + sha256 "003b8aaf5d87f92f7a49bb51e3a1ee44a7fbe7aca10fd9b165bc8b79fe91f52e" + 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_sequoia: "dc4a56033d0adccf05a78db34b863fb7156c8f5024b585a31e8e8da93f3ceaba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc4a56033d0adccf05a78db34b863fb7156c8f5024b585a31e8e8da93f3ceaba" + sha256 cellar: :any_skip_relocation, arm64_ventura: "dc4a56033d0adccf05a78db34b863fb7156c8f5024b585a31e8e8da93f3ceaba" + sha256 cellar: :any_skip_relocation, sonoma: "a5eb0c28d110befc9a5f228390b5bafbe20f469c3df5968be98a8a89aa9894f0" + sha256 cellar: :any_skip_relocation, ventura: "a5eb0c28d110befc9a5f228390b5bafbe20f469c3df5968be98a8a89aa9894f0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5010b9ecdeea1508663b2b8e7c6e995785a56d6db2874960c444863965d7411c" + 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..8b11c0611920e --- /dev/null +++ b/Formula/v/virtualenv.rb @@ -0,0 +1,46 @@ +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/56/2c/444f465fb2c65f40c3a104fd0c495184c4f2336d65baf398e3c75d72ea94/virtualenv-20.31.2.tar.gz" + sha256 "e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af" + license "MIT" + head "https://github.com/pypa/virtualenv.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1d8d2567e3809e40e530c2fcf928bcc1e7e6affa708bb6fafa7a360038dae0f2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1d8d2567e3809e40e530c2fcf928bcc1e7e6affa708bb6fafa7a360038dae0f2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "1d8d2567e3809e40e530c2fcf928bcc1e7e6affa708bb6fafa7a360038dae0f2" + sha256 cellar: :any_skip_relocation, sonoma: "0d853a4d494f78b89bbf20ba800b47f53014c5aa66aad3b897e611ebbc2da388" + sha256 cellar: :any_skip_relocation, ventura: "0d853a4d494f78b89bbf20ba800b47f53014c5aa66aad3b897e611ebbc2da388" + sha256 cellar: :any_skip_relocation, arm64_linux: "062b68ff2df6b0a13e7186a81cb9d3e411d82f70d8c4ec0378d6acc0334285c2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "062b68ff2df6b0a13e7186a81cb9d3e411d82f70d8c4ec0378d6acc0334285c2" + end + + depends_on "python@3.13" + + 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 "platformdirs" do + url "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz" + sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc" + 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..1ba1e24736419 --- /dev/null +++ b/Formula/v/virtualenvwrapper.rb @@ -0,0 +1,82 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e51d9ccf87aee13767c929170db8e7012d2ada9085798e262868fda6388252b5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e51d9ccf87aee13767c929170db8e7012d2ada9085798e262868fda6388252b5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e51d9ccf87aee13767c929170db8e7012d2ada9085798e262868fda6388252b5" + sha256 cellar: :any_skip_relocation, sonoma: "8e47b3f80979e56edd1b3bec6e2513b941508a182773534c9c9f63a84c5f59ac" + sha256 cellar: :any_skip_relocation, ventura: "8e47b3f80979e56edd1b3bec6e2513b941508a182773534c9c9f63a84c5f59ac" + sha256 cellar: :any_skip_relocation, arm64_linux: "a71fc25071321758866cdbb5ef9d2a111d9d6279ca800c4814d5271c3f426001" + sha256 cellar: :any_skip_relocation, x86_64_linux: "41c4a7cb2fdb39da69b11eb2e7a89f0772b43df9d8f98100b986f1d6e480b998" + end + + depends_on "python@3.13" + + 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/9d/db/3ef5bb276dae18d6ec2124224403d1d67bccdbefc17af4cc8f553e341ab1/filelock-3.16.1.tar.gz" + sha256 "c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435" + end + + resource "pbr" do + url "https://files.pythonhosted.org/packages/b2/35/80cf8f6a4f34017a7fe28242dc45161a1baa55c41563c354d8147e8358b2/pbr-6.1.0.tar.gz" + sha256 "788183e382e3d1d7707db08978239965e8b9e4e5ed42669bf4758186734d5f24" + end + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + end + + resource "stevedore" do + url "https://files.pythonhosted.org/packages/c4/59/f8aefa21020054f553bf7e3b405caec7f8d1f432d9cb47e34aaa244d8d03/stevedore-5.3.0.tar.gz" + sha256 "9a64265f4060312828151c204efbe9b7a9852a0d9228756344dbc7e4023e375a" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/3f/40/abc5a766da6b0b2457f819feab8e9203cbeae29327bd241359f866a3da9d/virtualenv-20.26.6.tar.gz" + sha256 "280aede09a2a5c317e409a00102e7077c6432c5a38f0ef938e643805a7ad2c48" + 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..cba25bd712176 --- /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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e6cf1777dd0185e244f54df799d2f8c123fc94485edb9d851119a8b349b863ba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cf5cff6492eed180889df85b0bb7a7e54b0dbad81ee435d89f94170c5a5ea485" + sha256 cellar: :any_skip_relocation, arm64_ventura: "769c050176581f594b65834b43cb242d3433cf42fc79be0d23793deff75ea8eb" + sha256 cellar: :any_skip_relocation, sonoma: "629d169987b81c46b5f14176687eab3c137d871910ef51170c41ef55f6e9f73e" + sha256 cellar: :any_skip_relocation, ventura: "51c4076c4393b96bc98eef7421d1c6787a67df0cd3126e70cffffb6c33706bf9" + sha256 cellar: :any_skip_relocation, arm64_linux: "666161a1e19a488d4848793824ab567310ca4fb943ba107497f3ce9c4e7a44e1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "97d1cf122a7c4e7c0f5d7e5b2fc1518f88ced2d73cf303433f46b6a5367f3994" + end + + depends_on "fish" + depends_on "python@3.13" + + 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/9d/db/3ef5bb276dae18d6ec2124224403d1d67bccdbefc17af4cc8f553e341ab1/filelock-3.16.1.tar.gz" + sha256 "c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435" + end + + resource "packaging" do + url "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + 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/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/1f/5a/07871137bb752428aa4b659f910b399ba6f291156bdea939be3e96cae7cb/psutil-6.1.1.tar.gz" + sha256 "cf8496728c18f2d0b45198f06895be52f36611711746b7f30c464b422b50e2f5" + end + + resource "virtualenv" do + url "https://files.pythonhosted.org/packages/50/39/689abee4adc85aad2af8174bb195a819d0be064bf55fcc73b49d2b28ae77/virtualenv-20.28.1.tar.gz" + sha256 "5d34ab240fdb5d21549b76f9e8ff3af28252f5499fb6d6f031adac4e5a8c5329" + 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/virtualhost.sh.rb b/Formula/v/virtualhost.sh.rb new file mode 100644 index 0000000000000..58f40e3bf3989 --- /dev/null +++ b/Formula/v/virtualhost.sh.rb @@ -0,0 +1,19 @@ +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/refs/tags/1.35.tar.gz" + sha256 "75d34b807e71acd253876c6a99cdbc11ce31ffb159155373c83a99af862fffcc" + head "https://github.com/virtualhost/virtualhost.sh.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "caf611d27d2f3391098872acc83c015efe68d7a267e5912d423a0bfd2d3e64e3" + end + + # Can re-enable if v2 has a stable release + disable! date: "2024-08-13", because: :no_license + + def install + bin.install "virtualhost.sh" + end +end diff --git a/Formula/v/virtualpg.rb b/Formula/v/virtualpg.rb new file mode 100644 index 0000000000000..b21221f069fd9 --- /dev/null +++ b/Formula/v/virtualpg.rb @@ -0,0 +1,46 @@ +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 + + bottle do + rebuild 1 + 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..9a094cdf386cd --- /dev/null +++ b/Formula/v/virtuoso.rb @@ -0,0 +1,64 @@ +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.14/virtuoso-opensource-7.2.14.tar.gz" + sha256 "c80e1a9fd114479e0588fc61de149c6e5b142d517ed92a2d64b22d5a88458a74" + license "GPL-2.0-only" => { with: "openvpn-openssl-exception" } + + bottle do + sha256 cellar: :any, arm64_sequoia: "0e692694b4a2cff3fec3891040c0d7a6ca90d917267a5d8845d079d7e7a7993c" + sha256 cellar: :any, arm64_sonoma: "48d4b155bda7e3d1b76feed1dae6380a5ddf86828fe8d68c20c13a4e2c4cfe4a" + sha256 cellar: :any, arm64_ventura: "ec1ba9dcf65b8306a7cf1355b9fdca4a36a2e4bbce092cf23be53a534e6b95d9" + sha256 cellar: :any, sonoma: "12e6d1230335e4c77fc52c31c3657cd31cb3cb6a6ad7e519c7e903a0522170a8" + sha256 cellar: :any, ventura: "97bb2a181efc5991b247244da81b046f3c51991f20a3523ce3140ad2a1bbfcf7" + sha256 cellar: :any_skip_relocation, arm64_linux: "3b07c607f72b4b3954a9c13c97fa9d02ebebee1499d3a41fac32b79e5729bdfe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d3486ce694b17ad0decf53bb95f975885604623291f34076f7ea2922c3328d9b" + 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.0" + + 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 + + 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 diff --git a/Formula/v/virustotal-cli.rb b/Formula/v/virustotal-cli.rb new file mode 100644 index 0000000000000..b0b94813dc30a --- /dev/null +++ b/Formula/v/virustotal-cli.rb @@ -0,0 +1,38 @@ +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.0.1.tar.gz" + sha256 "6cb16e89cd1964c95217c347c1b5a19c930b9125c14976dbd92d46cc324e4aa6" + 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_skip_relocation, arm64_sequoia: "9cff33b330f8f8b9d5ba43c7175d4a7dcfe51857313fc309f837c46835d05c8a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9cff33b330f8f8b9d5ba43c7175d4a7dcfe51857313fc309f837c46835d05c8a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9cff33b330f8f8b9d5ba43c7175d4a7dcfe51857313fc309f837c46835d05c8a" + sha256 cellar: :any_skip_relocation, sonoma: "41d5547e243239fd11d62cd2b48822a44c0714ad931502e47e0547fdad278ca0" + sha256 cellar: :any_skip_relocation, ventura: "41d5547e243239fd11d62cd2b48822a44c0714ad931502e47e0547fdad278ca0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e8cf8a480932a940394db11fd41991d3f79b4402c907180e9007edcfe12e864e" + 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..788ec18bcb120 --- /dev/null +++ b/Formula/v/vis.rb @@ -0,0 +1,58 @@ +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 + sha256 arm64_sequoia: "6edc0624be797ed3bbee95686dd3af6f164c24e95d520b809004f12518d02553" + sha256 arm64_sonoma: "04a4e8d45b5442ffb3397012eccde1c747b249ae42e8468b24d557dd15ea6081" + sha256 arm64_ventura: "ce1c6d2521a9ab11b32316850690289887a739b2b88a9809b1678682b586fc26" + sha256 arm64_monterey: "aeb76e19c965bce4434207059279cae63e30be3e51e933bee8ff52f579b8035d" + sha256 sonoma: "77bfde98fc76bf93d057923482bd1e9b3d538ef8c3875f4b9b579a63cbb75d22" + sha256 ventura: "b27829afe0c6cbb2792f3340ac3605caa16c68677764a1c586879f5387064ca4" + sha256 monterey: "30d9272d1e6e00b8b87c61157e157df124a32c265d4f8befc52df8ac8e2545fb" + sha256 arm64_linux: "20a9cd517f37b2fb444de7e9b6df60a3b57e519a189d7c824501aae6b5251e78" + sha256 x86_64_linux: "6f7e0f61479a8c931556361f8c0dd42a913211ddff0a8b8dfb6b2240f6fb2c6b" + end + + depends_on "pkgconf" => :build + depends_on "libtermkey" + depends_on "lpeg" + depends_on "lua" + + 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..d842bf8fd66b4 --- /dev/null +++ b/Formula/v/visidata.rb @@ -0,0 +1,61 @@ +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/6c/41/b026336b7075a2c8461c1ba0dfffd456902f736722f4a016f21fee1e6d7c/visidata-3.1.1.tar.gz" + sha256 "8c4484158f0851e4887e595542bd65bdd991de9c20652b442b3fd9742ce8b031" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c59340511e66537da6a9d30fc32913ab638cde115e0f9ebcf39c3a60e9251734" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c59340511e66537da6a9d30fc32913ab638cde115e0f9ebcf39c3a60e9251734" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c59340511e66537da6a9d30fc32913ab638cde115e0f9ebcf39c3a60e9251734" + sha256 cellar: :any_skip_relocation, sonoma: "386ca2b4afbaf1f0e79ee848379fd2d11b023134dcb58e2dd95d259e62b02706" + sha256 cellar: :any_skip_relocation, ventura: "386ca2b4afbaf1f0e79ee848379fd2d11b023134dcb58e2dd95d259e62b02706" + sha256 cellar: :any_skip_relocation, arm64_linux: "d9c7de494b7a6b175f136c3b3bfc99a7eeb57b5cedd8be75f87f8df1c44004db" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c59340511e66537da6a9d30fc32913ab638cde115e0f9ebcf39c3a60e9251734" + end + + depends_on "python@3.13" + + resource "importlib-metadata" do + url "https://files.pythonhosted.org/packages/33/08/c1395a292bb23fd03bdf572a1357c5a733d3eecbab877641ceacab23db6e/importlib_metadata-8.6.1.tar.gz" + sha256 "310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580" + 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 "zipp" do + url "https://files.pythonhosted.org/packages/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + 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..4237f30f4ad58 --- /dev/null +++ b/Formula/v/visionmedia-watch.rb @@ -0,0 +1,31 @@ +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" + + bottle do + 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, mojave: "8cb94f6e2c5faca9161daf2f8332862c7130ef2ac82f7b8258f5d927f40f5b11" + 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..ad17959077f7e --- /dev/null +++ b/Formula/v/visp.rb @@ -0,0 +1,203 @@ +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 14 + + livecheck do + url "https://visp.inria.fr/download/" + regex(/href=.*?visp[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "aeeb52ede1480fea6884423f6d00f96dc66bef176ae9f48e6cb14284767a4dc3" + sha256 cellar: :any, arm64_ventura: "f0c9bb028e286ec5781bfb3905d6b42cfcc0f16f3eb2327c4e3cd05fdd314ac5" + sha256 cellar: :any, sonoma: "21dbc0cce5d30d7fc180f7c14b7da89d676707c08e490c724c3beed36d5fd98b" + sha256 cellar: :any, ventura: "ec0ec868a6802ded32fab187ffe18f1bedc78d7a182f950a3feddedad7639052" + sha256 cellar: :any_skip_relocation, x86_64_linux: "897659319f02e161dc3522c72e1dd445a021f3a2743ea4e2eb4381382e0e282c" + 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 "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 "qt" + 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", + "-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("https://github.com/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..9580b18331dfc --- /dev/null +++ b/Formula/v/vit.rb @@ -0,0 +1,54 @@ +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 + sha256 cellar: :any_skip_relocation, all: "3c0acf8ed36f00c0a7d6364ddaea072438edf56726342e457c6a1c2c58811f4f" + end + + depends_on "python@3.13" + 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 "typing-extensions" do + url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + end + + resource "urwid" do + url "https://files.pythonhosted.org/packages/98/21/ad23c9e961b2d36d57c63686a6f86768dd945d406323fb58c84f09478530/urwid-2.6.16.tar.gz" + sha256 "93ad239939e44c385e64aa00027878b9e5c486d59e855ec8ab5b1e1adcdb32a2" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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 + 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..b40153a3f92ba --- /dev/null +++ b/Formula/v/vite.rb @@ -0,0 +1,34 @@ +class Vite < Formula + desc "Next generation frontend tooling. It's fast!" + homepage "https://vitejs.dev/" + url "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz" + sha256 "083dfbda7d984ea8884c23fc4e9778a0ef647442ecffb599026109d578753c0e" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a11cb80ae2e244ddbde6bd6eb09781c99a7cd492953f23c8fac7461195d85044" + sha256 cellar: :any, arm64_sonoma: "a11cb80ae2e244ddbde6bd6eb09781c99a7cd492953f23c8fac7461195d85044" + sha256 cellar: :any, arm64_ventura: "a11cb80ae2e244ddbde6bd6eb09781c99a7cd492953f23c8fac7461195d85044" + sha256 cellar: :any, sonoma: "2c9de8123361b9f1d4ea9c50ec3c31224442194c0a7058c1eae2b6fe8cac41bb" + sha256 cellar: :any, ventura: "2c9de8123361b9f1d4ea9c50ec3c31224442194c0a7058c1eae2b6fe8cac41bb" + sha256 cellar: :any_skip_relocation, arm64_linux: "7dc665f1110f8b2ea6f79830374b943993974f64c5a8b4cf1cc35ae01a9563b4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ccc844708551ab9e69eb2a759c49624e1cf9f1435656b36f876a0d09e47e2feb" + 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..798453f1093d5 --- /dev/null +++ b/Formula/v/vitess.rb @@ -0,0 +1,79 @@ +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/v22.0.0.tar.gz" + sha256 "578203a3235ee9a316856b9bfa46c7029563776e38b120a12694fac80d8c789e" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a16a6abc713f036b56ce408a60f7133fdbe607e15aafd5ea17e4a0a613c9dd3f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "98eba4660c3560f37b844e64696150bd94340c78348934aed4a72d8cbec4aebf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "73ffb944b44b897c9dd208840f5d4f02dde196dcdd66b7db994ed8e41e097f28" + sha256 cellar: :any_skip_relocation, sonoma: "769c69de6a43a87539b779a114e3cf7d2f8e1fbab5e0f5da280df4f645d94fb9" + sha256 cellar: :any_skip_relocation, ventura: "0df7d6bfd7ce29c244988390eaa03bfd30eacc46fbd038d4192091fe115f6c00" + sha256 cellar: :any_skip_relocation, arm64_linux: "b44df86fd12e97c866c6f712e456c0ea4442053d3e572570b4b24feeac9b8a69" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6284282fca8d95b967a7b8ee7abdb11693168261121ae6c71bb395c34823d417" + 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"] = "2" + etcd_server = "localhost:#{free_port}" + cell = "testcell" + + fork do + exec Formula["etcd"].opt_bin/"etcd", "--enable-v2=true", + "--data-dir=#{testpath}/etcd", + "--listen-client-urls=http://#{etcd_server}", + "--advertise-client-urls=http://#{etcd_server}" + end + sleep 3 + + fork do + exec Formula["etcd"].opt_bin/"etcdctl", "--endpoints", "http://#{etcd_server}", + "mkdir", testpath/"global" + end + sleep 1 + + fork do + exec Formula["etcd"].opt_bin/"etcdctl", "--endpoints", "http://#{etcd_server}", + "mkdir", testpath/cell + end + sleep 1 + + 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..a4c0c99f68cdf --- /dev/null +++ b/Formula/v/vitetris.rb @@ -0,0 +1,41 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "4ff25a3259becb2c40b2f025f30de8fcd269123352764c9d313dfbd2ece6d04f" + 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..a17b17424018c --- /dev/null +++ b/Formula/v/viu.rb @@ -0,0 +1,30 @@ +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_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..7cfdedf6c0a0f --- /dev/null +++ b/Formula/v/vivid.rb @@ -0,0 +1,29 @@ +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_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..a9838e1e4d0dc --- /dev/null +++ b/Formula/v/vlang.rb @@ -0,0 +1,112 @@ +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.10.tar.gz" + sha256 "72541bab3a2f674dcc51f5147fead5a38b18c47a3705335d9c13aa75a0235849" + license "MIT" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 1 + sha256 arm64_sequoia: "61e324a5cb4f1e5fe36e22feece35f101900884c4ee2e184ed2b560861751a6c" + sha256 arm64_sonoma: "a781eaf96128ae65326af2541ff60e35ec8cd28d1ec6fdb2ed22484102af95d0" + sha256 arm64_ventura: "14224fb4505f57200c0bd125552913b83fcd1274ca3bfb435fc586036b9d77d3" + sha256 cellar: :any, sonoma: "ac31a04a8e221306fad1f9fd4e32bdb11f6788d7d6fbf1bdafc994ae4c79be91" + sha256 cellar: :any, ventura: "9d1829750ac5e28f8820dc46b9f9b025ef7a804613026e0b7848b0c153a89e4c" + sha256 cellar: :any_skip_relocation, arm64_linux: "9decc51a9efe05ef0c3b4026a191328afb77379ea318bdc3b2115c6738543c94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "57484b27ff2dde605916de66bb00e53badeec8f683aa49e81f976b0ceccfee1b" + 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/66ea39be2275ac723225b9ca99d51ec1212c640d.tar.gz" + sha256 "c3b57600ad8081a525045d9877e245db834655fefdc79d05dcbed385e0ed0a68" + + on_big_sur :or_older do + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/4a51a527e534534c3ddc6801c45d3a3a2c8fbd5a/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..8a9e3e042c075 --- /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_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, mojave: "d2b0cccd86ab053118aebc1885b362130b7c7e0f73f3b60c768e4907532254cb" + 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..cbb6984b14baa --- /dev/null +++ b/Formula/v/vmdktool.rb @@ -0,0 +1,71 @@ +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 + + bottle do + 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, mojave: "13ed1b70d5c6d7f7411df7736940bf9fcd220fa92b229b79558e648cbdc0a641" + sha256 cellar: :any_skip_relocation, high_sierra: "276a35d178515782c7a741a2ebd45c6b47aee0d7ecfd725c386f589e69336fdc" + sha256 cellar: :any_skip_relocation, sierra: "3fa294be9d6e9e6b56435526520262aaa86f5909cc10b9ccf9d9670ae3ac0e3c" + sha256 cellar: :any_skip_relocation, el_capitan: "8604a90f9ad0f3b04767c021a4d24dacdcabd788767df56a45e3913231d4336e" + 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..738d5da89003a --- /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" + + bottle do + 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, mojave: "020d4e624a448e4e1b9a6e26b8f506bd65ab789ae1c0f23f25beda78b09bc6dd" + sha256 cellar: :any_skip_relocation, high_sierra: "edb14ca1ff4cbd4ab535ca9099ea113a36e280ddaf2957a65bdef10f4a7a1b88" + sha256 cellar: :any_skip_relocation, sierra: "7359ed3256886940e6fb1883141c495d5b3e6ab28130ed16553e0f6ab57ac3db" + 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..b6372ddabf8c1 --- /dev/null +++ b/Formula/v/vncsnapshot.rb @@ -0,0 +1,73 @@ +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 + + bottle do + 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..3f4ba40ba9f32 --- /dev/null +++ b/Formula/v/vnstat.rb @@ -0,0 +1,80 @@ +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_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..6ad9431614a8b --- /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-24.10.17.tgz" + sha256 "4617d3e3234a40efce2eb42fa9c0fcc8abf85c33fffb8825bfd77563209d43b0" + license "MIT" + version_scheme 1 + + bottle do + sha256 cellar: :any_skip_relocation, all: "fd5e7e37becb6d7cee0a854a2081bf5fd7575f28a637b2c6329b9e2ff88556a2" + 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..7095112943198 --- /dev/null +++ b/Formula/v/vo-amrwbenc.rb @@ -0,0 +1,46 @@ +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 + + bottle do + 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/volk.rb b/Formula/v/volk.rb new file mode 100644 index 0000000000000..534def00ad85f --- /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 + sha256 cellar: :any, arm64_sequoia: "1f910c4f27cfbd4419f857c369337c1fcce0068b05d01391fa1f6b5d9db00055" + sha256 cellar: :any, arm64_sonoma: "7a2efd35a0db458e5afe369c40a303b561a34df77d1fae9c11378afc31d2fedf" + sha256 cellar: :any, arm64_ventura: "46b4a7e08f105a3348f4ac8007b8718c76715dbc35dd2f6da818031ffef214e8" + sha256 cellar: :any, sonoma: "791c5ee148b98b0707ebe2fa57f66d6310be6ef0eeb6b16925edea23c9b92f2d" + sha256 cellar: :any, ventura: "17265b6ad8a1b44a34f0ed8a9acb52abfdc6d3021adeb44b692022cc80376200" + sha256 cellar: :any_skip_relocation, arm64_linux: "20ff379409a40837f19708efd3b69898f858a7b158726db713457bcba18c4ba8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7a453a467d9e9fcd933395cb567e39e003e3ec7f294bd422757f209e7ba418eb" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "cpu_features" + depends_on "orc" + depends_on "python@3.13" + + resource "mako" do + url "https://files.pythonhosted.org/packages/5f/d9/8518279534ed7dace1795d5a47e49d5299dd0994eed1053996402a8902f9/mako-1.3.8.tar.gz" + sha256 "577b97e414580d3e088d47c2dbbe9594aa7a5146ed2875d4dfa9075af2dd3cc8" + 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.13" + 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..bbf3bf0f4bda2 --- /dev/null +++ b/Formula/v/volt.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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, mojave: "9db9e940c124e8e655cdd84b7d143f526535c588ebd6503acb3960143d08f905" + sha256 cellar: :any_skip_relocation, high_sierra: "7fd8887efcdc3a9816b2dea510c2e3ba218e0e719390841d3b0b416fde53378e" + sha256 cellar: :any_skip_relocation, sierra: "4edc3f1130757ddbf0a7b3c018825f68f2ecb24417f3afc3fd54b532e8c72c46" + 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..9451ac1154eb0 --- /dev/null +++ b/Formula/v/volta.rb @@ -0,0 +1,51 @@ +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_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..fe7926890ba1e --- /dev/null +++ b/Formula/v/vorbis-tools.rb @@ -0,0 +1,61 @@ +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_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..750a6c1335bd7 --- /dev/null +++ b/Formula/v/vorbisgain.rb @@ -0,0 +1,47 @@ +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 + + bottle do + 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, mojave: "75aa0134fbe5f63549d0e9328f6ae2d3513670e74d5f35ca7c633917a9383aee" + sha256 cellar: :any, high_sierra: "86d9a629d242005f13a1de8a591aee61455059b9072ab528afbebe63ecda9613" + sha256 cellar: :any, sierra: "3572efe1e0741ee5b1f3cc0499325ae59acec5f9ab44df5987bab22312d9e3af" + sha256 cellar: :any, el_capitan: "00f7047e5d884dbf22ed036154961b41d4ad6ae8295c55043929b008ae82a9f7" + 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..949bd468ea897 --- /dev/null +++ b/Formula/v/voro++.rb @@ -0,0 +1,47 @@ +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 + + bottle do + 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..04194fb693d07 --- /dev/null +++ b/Formula/v/votca.rb @@ -0,0 +1,60 @@ +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.tar.gz" + sha256 "ee2ac59c858ee41ef3ecf636b263464cac5895c0ee9c8f97b1aafca4b8b76350" + license "Apache-2.0" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "bd9cec0759bbce5f2a08aff4c75c3ee5179070cb057bb67509d73131c697f1b8" + sha256 cellar: :any, arm64_sonoma: "46d73d6adc639afbe0ccf046f0ee04565c0fa8ece4f255dbcc3fd084cebc8ab6" + sha256 cellar: :any, arm64_ventura: "b626d60138ec38944c06be71c8dc60502b629fb1d59b719ac06e86037387f9b4" + sha256 cellar: :any, sonoma: "376f6f16fbd2f983349e7f6f0261283cf003fce002bd7c8ab784d7267e7d544f" + sha256 cellar: :any, ventura: "8869b98889a9da5d6f8c6977f99c48bdbc4766097fc22e57a67e3b4f931bc7c2" + sha256 cellar: :any_skip_relocation, arm64_linux: "be3143dd3a32d31d35b23f21933ceb8fe084df5516a47bea702526baf4fd5322" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ac6c4ab8c106fd9ea90c590381a6c79d5fb0199569c9b442704782c534f42feb" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :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 + + 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", *std_cmake_args, *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..9627ac5186714 --- /dev/null +++ b/Formula/v/vowpal-wabbit.rb @@ -0,0 +1,265 @@ +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 1 + head "https://github.com/VowpalWabbit/vowpal_wabbit.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "bfef4211753bcf8837355692e4dcf46bee9de1961bd62e4b15f8f3143bf372ed" + sha256 cellar: :any, arm64_sonoma: "073c2e2a642481bde881c5af08b53ce124d29213ee4dab14758c06dc7860b998" + sha256 cellar: :any, arm64_ventura: "fe719b69d82bd1ca7000eea32ffa7c3a0123d4dbdba0e0e22289fb24f05e2250" + sha256 cellar: :any, arm64_monterey: "da19bcacdc1135ef3eb98109f473d22bd7753fc850d1e4e3da0eb95023b6b2ca" + sha256 cellar: :any, sonoma: "37bd232f15d467da97b3345a617a6dbc797bc6ad8ebf872551b27fb54c5a72cd" + sha256 cellar: :any, ventura: "3215db836a8d52db6278ffe3e3522295e16a2d55336770210f1c4eb8f9ceb1a9" + sha256 cellar: :any, monterey: "876c07dabe88389bf4524b3686b05f20a17c4982e1ff13918bc9221e2e3c8829" + sha256 cellar: :any_skip_relocation, arm64_linux: "6588a45ffb2630fde15f634aac9248eb1fa0467f227c6312c4a9a63910cbb970" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24bc424f2e333c4995e596f13ce7b4bda399467dc711098d4fb399fc954bf6bf" + 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 :DATA + + 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 + +__END__ +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/Formula/v/vpcs.rb b/Formula/v/vpcs.rb new file mode 100644 index 0000000000000..4d02538ef0803 --- /dev/null +++ b/Formula/v/vpcs.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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, mojave: "5728bc8e33f81a307c74fe625305c42363a493ff1dc612d604feec971374385d" + sha256 cellar: :any_skip_relocation, high_sierra: "ac52b231d875679e7bd4da3a09c6b5bc833e5b93fe5a77749dc834b1d82d21d5" + sha256 cellar: :any_skip_relocation, sierra: "78c7e415e9bcbdf28cfdda5d37fce9cc7d735b01d61400b41239e0cdee17ada5" + sha256 cellar: :any_skip_relocation, el_capitan: "0f1a65e672fd1d2dbc866279835231ec3737e64c514f38a08bf409807e910222" + 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..edc0ef614d950 --- /dev/null +++ b/Formula/v/vpn-slice.rb @@ -0,0 +1,52 @@ +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 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "030d0284ec3bee7237e6be61d77f11226daf5055d5f850274e2bce4c465948fc" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f53f8aebf613d157c42822443d6ec89e324fb5a6bc199ed958fb2a9398fcd20c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cc5792e45ec19a84b271d7a64c67b563c5d47de935573999fe393ce8d6b0e57b" + sha256 cellar: :any_skip_relocation, sonoma: "0ba7166b31584166d94509199258de76bed44198e7cf5ad9e81a2aaa12534dcc" + sha256 cellar: :any_skip_relocation, ventura: "be287f30e018f5ce7cefa4ed424b71ee9267d8ecc4436e17cc3a06935cd73b64" + sha256 cellar: :any_skip_relocation, arm64_linux: "00d745fe50d1635ac36c9ca32e320c5924537b4da2109385c452b349b5246b1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e85e74c3c382b4f67cc29d48cab021c3dd9a64a71fc06f9f9de5d9a22bfe1402" + end + + depends_on "python@3.13" + + resource "dnspython" do + url "https://files.pythonhosted.org/packages/b5/4a/263763cb2ba3816dd94b08ad3a33d5fdae34ecb856678773cc40a3605829/dnspython-2.7.0.tar.gz" + sha256 "ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1" + end + + resource "setproctitle" do + url "https://files.pythonhosted.org/packages/ff/e1/b16b16a1aa12174349d15b73fd4b87e641a8ae3fb1163e80938dbbf6ae98/setproctitle-1.3.3.tar.gz" + sha256 "c913e151e7ea01567837ff037a23ca8740192880198b7fbb90b16d181607caae" + 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 + ENV["PIP_USE_PEP517"] = "1" + 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..57b9a61a843cd --- /dev/null +++ b/Formula/v/vramsteg.rb @@ -0,0 +1,45 @@ +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: "1.1.1" + + livecheck do + url "https://gothenburgbitfactory.org/" + regex(/href=.*?vramsteg[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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, mojave: "a868fba582ce440a14ae18d4be193209e7d25fd3291b568bea7f123e61aa044d" + sha256 cellar: :any_skip_relocation, high_sierra: "0c9aff3582ad05a388cba8c43770ead295d921a8e419323a3c4115f09e609ba1" + sha256 cellar: :any_skip_relocation, sierra: "7f65668b7bb036fb19e69bdc9cbc2ec48728bc8c1936253f6d5e8d74a113a3fd" + sha256 cellar: :any_skip_relocation, el_capitan: "e4b3e2e66c2f772a38de529b884091a2ffa1f920af6604696129d21cc9e70b99" + sha256 cellar: :any_skip_relocation, arm64_linux: "c7d833b721091e38b120fb58944129769f20109b74d881735f7ab1dadf62b487" + sha256 cellar: :any_skip_relocation, x86_64_linux: "17541c74c89bdac3887fca1b40afe76b5a1778aef0ccb8dd092d04088ed3b281" + 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 + # 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..c34f59455769b --- /dev/null +++ b/Formula/v/vrc-get.rb @@ -0,0 +1,35 @@ +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.0.tar.gz" + sha256 "4d3821eb4047f7ee83a07a589e97a63608680a71200046d571f9db3320bf8d65" + 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_sequoia: "8fe8c69965afb8677e2976c2bd01969d83fb94cfc39ca6ebd2353621ed433bba" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c4187e7a323417acaa1d1c6da1b4493d1e56d2c3b4c1cf7a6e625420121c3c90" + sha256 cellar: :any_skip_relocation, arm64_ventura: "42fab214e3b40da97fe5368b838a1a03b5c534574d0ee1894869dd2819717ca6" + sha256 cellar: :any_skip_relocation, sonoma: "d611cd64afa6c1b8a76a0ecc52a2fdaf1ed514ca13b35d28950bbc7f45337b3d" + sha256 cellar: :any_skip_relocation, ventura: "6a8ac8b21c07dc4ef748b0365388463f481b765e60c9492a611e996f17aef78e" + sha256 cellar: :any_skip_relocation, arm64_linux: "6e636f793b45860c1fa3039f64272c62be84cbe35d10bb85650ca8b32b054222" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cf27fd9ca3c93fe01e9db091775dec6c2a6c48c03e79ee90b23ed8b8fc2f03da" + 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..2bfe5e30a2f39 --- /dev/null +++ b/Formula/v/vroom.rb @@ -0,0 +1,55 @@ +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" + + bottle do + rebuild 1 + 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 macos: :mojave # std::optional C++17 support + depends_on "openssl@3" + + 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 diff --git a/Formula/v/vrpn.rb b/Formula/v/vrpn.rb new file mode 100644 index 0000000000000..0df8fcb3062ab --- /dev/null +++ b/Formula/v/vrpn.rb @@ -0,0 +1,59 @@ +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.35/vrpn_07.35.zip" + sha256 "06b74a40b0fb215d4238148517705d0075235823c0941154d14dd660ba25af19" + license "BSL-1.0" + head "https://github.com/vrpn/vrpn.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "462a889a4d51338c58f99862c0812246a5277b9d2e234cfdf860d48c4be65220" + sha256 cellar: :any, arm64_sonoma: "91159cd014e31a07bb587ef84b34fc15356a33f9530395556e1c53698ff67b17" + sha256 cellar: :any, arm64_ventura: "0966014087dbd6557936ebcd2c06a7ad2d93f82b8bf692efabf8f374f2d3706e" + sha256 cellar: :any, sonoma: "4d230ea0614872eb9f765d5ad75cebfe4a940794b84306abf87bf77c48ce52b6" + sha256 cellar: :any, ventura: "0b00fe78bd9847767966b12aadb1f66789edb318baa67b5a78fe1485fc2d01fb" + sha256 cellar: :any_skip_relocation, arm64_linux: "829af47c8c79baddc6660ec6cf85b79b1eea6cfeef3cd4245dcafdccfd4b89ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e62daba2f3721ca392c8e47767987b5b865bd12d1100e63ca22baedcf037e73" + 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..cd8a5364e28f4 --- /dev/null +++ b/Formula/v/vsce.rb @@ -0,0 +1,45 @@ +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.4.0.tgz" + sha256 "c32c2df34a752388f3fec0fc02ab15a3db2b11a57b58af15556dd1f1288c52b0" + 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_sequoia: "5b509cc5b1e9ded5b6f522a25364c7a29c831d1279cabc1e2187de42c0cffe87" + sha256 arm64_sonoma: "203cd0b78833ee333823fa993ecf2cdff97f0ca59547d0393dcdc66b20a01033" + sha256 arm64_ventura: "0d488294cc71f75bd2b5e8e8ee50f67ec96de4869d0c24b924d2e0247ef29249" + sha256 sonoma: "9c94d1048cdf9c4ca43fd898debe8de160643375d7c1031341e1d0974842e96e" + sha256 ventura: "1a13b816877e2caf83211242af9e03e007e762eb647f3feb59f7679b43a5bc18" + sha256 cellar: :any_skip_relocation, arm64_linux: "2381d5bec341f81b55f44b2d33e1135a080e50c43564fb68466f7af5e16fa61d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "27e9631fe29147affdcacd0a03e2dd6f004685148b17402c01ecfe3d14f68231" + end + + depends_on "node" + + uses_from_macos "zlib" + + on_linux do + depends_on "pkgconf" => :build + 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..57f7724efde2d --- /dev/null +++ b/Formula/v/vscli.rb @@ -0,0 +1,31 @@ +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_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/vsearch.rb b/Formula/v/vsearch.rb new file mode 100644 index 0000000000000..998bddca14f5f --- /dev/null +++ b/Formula/v/vsearch.rb @@ -0,0 +1,38 @@ +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.0.tar.gz" + sha256 "6d11ce960206ab64cf6d7907e539348d192a5b3f32f82d37c9bfbc4d789b576c" + license any_of: ["BSD-2-Clause", "GPL-3.0-or-later"] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c5f7cc238606626fa0e7ef7934d1be830a1f6d3414948d96c64657a7c0e7261d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "95bf8675d1df686a387c61e8abe592dd295f6f20a6d8bde1dd5820cdeb3df895" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a10dde53f6f72b7c42c64149cef00a946903a6ca381666d7a4185de57816ba1e" + sha256 cellar: :any_skip_relocation, sonoma: "76c2bfbdcee1d144d998f55efb5b2f065307fe95c05d1ca9f4d8f66c65b4d035" + sha256 cellar: :any_skip_relocation, ventura: "1d00ca3077cc1516feb5b8b6b9d7aa1895c7d739c937763961c9f6d50921d164" + sha256 cellar: :any_skip_relocation, arm64_linux: "b8168ba9f58fa34485373f017f8f6b65ec5a8c1643828080cb8a0db8c1173fc5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "01ede91c3962acd2f7600a7d8b2c0bb33506507ecfa1ff07d272a06bab3816e6" + 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..a2522df5ca1f8 --- /dev/null +++ b/Formula/v/vsftpd.rb @@ -0,0 +1,81 @@ +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 + + bottle do + rebuild 2 + 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/formula-patches/5fbea7b01a521f840f51be6ffec29f612a37eed3/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/formula-patches/e4dd5d67152bb2541c5e38e8bb834ed5b165fcaa/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..45b8cf829e9e3 --- /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.13.0.tar.gz" + sha256 "466e90137244b13c44befef8fc534f158c4ebe601bc20a66f0e8eabd9fbf9b27" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bfb05cd63316f9a7785b2f0bec45c313c0db18f2b1c3f862ae6a3794c10c068a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1eddab680208703797754eac3642e5a2a37ae1f38f1ccaa508b19c1708c911c2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "223c2d94808d93148a39f0c878979d2356368d0f027a81481f6ecc278f1b07e4" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a1d07760031eaf0abf803b3c6fe8b9efe8e0fa7bdb42787654a4ba8de46ac099" + sha256 cellar: :any_skip_relocation, sonoma: "cdec21235359d1c5b1d8994b8419faf2419be227d386c2e3f047747ac43da588" + sha256 cellar: :any_skip_relocation, ventura: "b3fbdf3f8c844c4825a63389eb3d557919e2385c09bed4b7df28a0fda61e2179" + sha256 cellar: :any_skip_relocation, monterey: "9b7f2bbc2ed69620455f4f47ce1b4bee19ecf7786a740297aa978780633036b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c453531f19e7cdca825575fad38ae6c88c30adcca557becd656aa1e21e1a89a5" + 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..9a9a956732a6c --- /dev/null +++ b/Formula/v/vstr.rb @@ -0,0 +1,96 @@ +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 + + bottle do + 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, mojave: "8927c49aa4daba57ffab9a9ea332504346467cf22c137af3e1a16b859318a0f5" + sha256 cellar: :any, high_sierra: "af6d9cc097c4eb9c1719496b2e29593763b5b17b279ef4c234d681cfe4174b37" + sha256 cellar: :any, sierra: "07e2b05d9908a847c72950532d3ed12771c856365c8747c8c5917da9a5ea4413" + sha256 cellar: :any, el_capitan: "d2d5b14e9ac589c782307e058e06815ad2408bbcf418ac721d3fac3be8b832a7" + 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..e1d49931da1d5 --- /dev/null +++ b/Formula/v/vtable-dumper.rb @@ -0,0 +1,25 @@ +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" + + 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..8ee6cabdc8cd1 --- /dev/null +++ b/Formula/v/vtclock.rb @@ -0,0 +1,38 @@ +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_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/vte3.rb b/Formula/v/vte3.rb new file mode 100644 index 0000000000000..476468ce76555 --- /dev/null +++ b/Formula/v/vte3.rb @@ -0,0 +1,128 @@ +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.80/vte-0.80.1.tar.xz" + sha256 "0cdbd0e983afd9d22e065e323a743160072bf64b453e00b15edbe6f2dcdda46c" + license "LGPL-2.0-or-later" + + bottle do + sha256 arm64_sequoia: "77bb4c11fa3c277e58d3f667765747f2211098f0f9cef718a7160f39b614423c" + sha256 arm64_sonoma: "2779d27323324a949008bbce2f5c429ec6f0ea740390e0bca4d71221a07d9dfc" + sha256 arm64_ventura: "c62a8b3daae3aa6f51b88548e861d3b8ac67585eb736d8dc1873479d86217665" + sha256 sonoma: "7f785b33c8077e8cc54cc306b1f00bac3cda01c3685e8d3fa6514dee07364fcc" + sha256 ventura: "88592544b64af8806ba0823d05d5aafbd0c4caf99b6702da2530892ba50ef609" + sha256 arm64_linux: "b4b8bcc53969063ba4c3f04055b686c0a35b91b1c458bf345558106fb6ee9041" + sha256 x86_64_linux: "daa43c2168711669a6131fc93cee4e0da826a182853fdd43c24ecb1f0ca23efa" + 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 macos: :mojave + depends_on "pango" + depends_on "pcre2" + + 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 "linux-headers@5.15" => :build + depends_on "systemd" + end + + fails_with :gcc do + version "9" + cause "Requires C++20" + end + + # submitted upstream as https://gitlab.gnome.org/tschoonj/vte/merge_requests/1 + patch :DATA + + def install + ENV.llvm_clang if OS.mac? && MacOS.version <= :ventura + + 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 + +__END__ +diff --git a/meson.build b/meson.build +index e2200a75..df98872f 100644 +--- a/meson.build ++++ b/meson.build +@@ -78,6 +78,8 @@ lt_age = vte_minor_version * 100 + vte_micro_version - lt_revision + lt_current = vte_major_version + lt_age + + libvte_gtk3_soversion = '@0@.@1@.@2@'.format(libvte_soversion, lt_current, lt_revision) ++osx_version_current = lt_current + 1 ++libvte_gtk3_osxversions = [osx_version_current, '@0@.@1@.0'.format(osx_version_current, lt_revision)] + libvte_gtk4_soversion = libvte_soversion.to_string() + + # i18n +diff --git a/src/meson.build b/src/meson.build +index 79d4a702..0495dea8 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -224,6 +224,7 @@ if get_option('gtk3') + vte_gtk3_api_name, + sources: libvte_gtk3_sources, + version: libvte_gtk3_soversion, ++ darwin_versions: libvte_gtk3_osxversions, + include_directories: incs, + dependencies: libvte_gtk3_deps, + cpp_args: libvte_gtk3_cppflags, diff --git a/Formula/v/vtk.rb b/Formula/v/vtk.rb new file mode 100644 index 0000000000000..9fdca40061eb5 --- /dev/null +++ b/Formula/v/vtk.rb @@ -0,0 +1,163 @@ +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.4/VTK-9.4.2.tar.gz" + sha256 "36c98e0da96bb12a30fe53708097aa9492e7b66d5c3b366e1c8dc251e2856a02" + license "BSD-3-Clause" + revision 1 + head "https://gitlab.kitware.com/vtk/vtk.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sonoma: "f547aa7af3480adfce7f08562b689caf68869a462f6530b5af85221e0e8de0f2" + sha256 cellar: :any, arm64_ventura: "0543c0a79e791feef7599eba5fd0a727082bcaa0db9977ca3723e24235b4600c" + sha256 cellar: :any, sonoma: "675bfddf1e3315cad272bf3030d93401515b98912b36f392a08f6e162a6f93ed" + sha256 cellar: :any, ventura: "6e3117b893ef5db5c496d9596f286213639be45922f66eea779f8e236a457467" + sha256 x86_64_linux: "2f03d9da47d8aec34b5588e29fb5ed3805f965eeaf534256d06c7f737d5eac29" + end + + depends_on "cmake" => [:build, :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 "pyqt" + depends_on "python@3.13" + depends_on "qt" + depends_on "sqlite" + depends_on "theora" + depends_on "utf8cpp" + depends_on "xz" + + uses_from_macos "expat" + uses_from_macos "libxml2" + uses_from_macos "tcl-tk" + uses_from_macos "zlib" + + on_linux do + depends_on "gl2ps" + depends_on "libx11" + depends_on "libxcursor" + depends_on "mesa" + end + + # Apply Arch Linux patch to fix build with netcdf 4.9.3+ + # Issue ref: https://gitlab.kitware.com/vtk/vtk/-/issues/19616 + patch do + url "https://gitlab.archlinux.org/archlinux/packaging/packages/vtk/-/raw/b4d07bd7ee5917e2c32f7f056cf78472bcf1cec2/netcdf-4.9.3.patch" + sha256 "87535578bbb0023ede506fd64afae95cdf4fb698c543f9735e6267730634afbc" + 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.13" + 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.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" + end +end diff --git a/Formula/v/vttest.rb b/Formula/v/vttest.rb new file mode 100644 index 0000000000000..5c9d2261658da --- /dev/null +++ b/Formula/v/vttest.rb @@ -0,0 +1,32 @@ +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 + + bottle do + 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..0564733594739 --- /dev/null +++ b/Formula/v/vue-cli.rb @@ -0,0 +1,58 @@ +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_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..e0e1b4eea82df --- /dev/null +++ b/Formula/v/vue-language-server.rb @@ -0,0 +1,40 @@ +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-2.2.10.tgz" + sha256 "42f859ac51d185ddffba9d90b8d6b16cfd238190d87c584b90207326be3ec9bd" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "cf2f0af8b881d9da9b4289f277c01a230c6a20dc780859a9a466ce9307a41a61" + 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..09d07e36bd4c1 --- /dev/null +++ b/Formula/v/vulkan-extensionlayer.rb @@ -0,0 +1,75 @@ +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/v1.4.313.tar.gz" + sha256 "14fdaf5cbbc02ce7dbacbaadeb1e9d63dc49f07a32214c4995ea9909bb534dc1" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-ExtensionLayer.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "94de775374c14ed11217384b6254f6a5752dd7da4682146e6260dbfb67e647f5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ed2803c127bdf92346161d90b523eac3b9541ef0f1faa1731de91f1cdbd7084e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ef1bf5af371ed8e0b45490ca766fcc5e70423547a34506d8ec0db4211e46940d" + sha256 cellar: :any_skip_relocation, sonoma: "48802535b932b6faac60aed5f4c6512c969c16658f2bd5a143ef46b6a9532a97" + sha256 cellar: :any_skip_relocation, ventura: "c197d49fb984513cdc2a402aaf7483637c4b425b6c17297d9bca708734cea046" + sha256 cellar: :any_skip_relocation, arm64_linux: "22b969ae8151ff0867f34ab860a927694d6026427d02f49a2e36d97a75268be2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8869b5eb81a56ca9d8f22b854949acd1081af27cbeb671ca58622fbf65256782" + end + + depends_on "cmake" => :build + depends_on "python@3.13" => :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", + "-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}", + "-DCMAKE_INSTALL_RPATH=#{rpath(target: Formula["vulkan-loader"].opt_lib)}", + *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..7af68327b60bb --- /dev/null +++ b/Formula/v/vulkan-headers.rb @@ -0,0 +1,43 @@ +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/v1.4.315.tar.gz" + sha256 "77e3a78db853f8b9c5bc3ddef04e637bef9744e01d6a8c90ebe0ddcd916c0c50" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-Headers.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "139b1706725982bdf168904c597ee0549a1303d47e70acb0553d4e3ba8999c90" + end + + depends_on "cmake" => :build + + def install + # Ensure bottles are uniform. + inreplace "include/vulkan/vulkan.hpp" do |s| + s.gsub! "/usr/local", HOMEBREW_PREFIX + end + + 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..60752e013f1a7 --- /dev/null +++ b/Formula/v/vulkan-loader.rb @@ -0,0 +1,62 @@ +class VulkanLoader < Formula + desc "Vulkan ICD Loader" + homepage "https://github.com/KhronosGroup/Vulkan-Loader" + url "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/v1.4.315.tar.gz" + sha256 "2e7c3762ce0ef6ba35e319ca270f1714c06e02c0efca145a1c5fbcc4f79fe59f" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-Loader.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "0455210ef4e4353264dfb7ec09e976849d4c0c6972c06ad649c65df896e39f13" + sha256 arm64_sonoma: "07e31cbbd92ae92fe84d38fb61c2085ece8ad8a001e6ff0a34b56a9311135c65" + sha256 arm64_ventura: "770b9fd325f4662b432699822be2604f7bf2fae50f6f47c1dd7dcddb73b87f07" + sha256 sequoia: "d3ce67754d2675ecade1138641de023afb727035edabf6bbd23d9f9fddd4403e" + sha256 sonoma: "94c30eaec50d6a52782e59bbd88cbd5528d9f698ec697c92983d3a4f64ac83b2" + sha256 ventura: "ff43bc6b2dde9a5160c1c42c50e0c430410b84db1cd200ed393631321b41c5df" + sha256 arm64_linux: "8437afe28588115823f7fe2d072d7bcce3e378da62c64c83ba81750e7899697e" + sha256 x86_64_linux: "05c1ec291015aaee957f6ca7726a63b06b5219ca9c6518dbaf35111860ad8626" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :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}", + "-DFALLBACK_DATA_DIRS=#{HOMEBREW_PREFIX}/share:/usr/local/share:/usr/share", + "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", + "-DFALLBACK_CONFIG_DIRS=#{etc}/xdg:/etc/xdg", + *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..465fe7b85d713 --- /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/v1.4.315.tar.gz" + sha256 "ea2c45304206e23789ce57117d5155f1cc3c8ad8fa636e0fb32891e1c01ca4b8" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-Profiles.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "fc7933980f568e7439dd2e28cf344bbe547438a61938b2bf9c080f539e8c2931" + sha256 cellar: :any, arm64_sonoma: "60c9ec07733d9beb0116e1708308207fbafe17fa36633f2d1d2fee3dd3184bdd" + sha256 cellar: :any, arm64_ventura: "f8a3ce10f8a620eb00a2c9e2fb1ac4384f2cda09d237404dd41b729bd1be8111" + sha256 cellar: :any, sonoma: "bd81bcb6a3752de8f32bc16941594c7efaaa36350fde18f7e60e288e5e6976a2" + sha256 cellar: :any, ventura: "1d2fdf67c932e160440cf28880e2af6958beec47bcb69a2ce00bd889249a3bf8" + sha256 cellar: :any_skip_relocation, arm64_linux: "e4d31d9fe16d203f4fa8a612cc90c134ae4019c6ebc9e47e0db13cb48b037013" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e7879c75d098cad1c8a58b7fab1cf337cb3c5f541e17aab8a2edb6ab71ac6141" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :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" + + 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", + "-DVULKAN_HEADERS_INSTALL_DIR=#{Formula["vulkan-headers"].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}", + "-DVALIJSON_INSTALL_DIR=#{Formula["valijson"].prefix}", + "-DCMAKE_INSTALL_RPATH=#{rpath(target: Formula["vulkan-loader"].opt_lib)}", + *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..41f94c8a9bc2d --- /dev/null +++ b/Formula/v/vulkan-tools.rb @@ -0,0 +1,118 @@ +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/v1.4.315.tar.gz" + sha256 "2caefad09082941af790fda9a5dc5dd776f73124148b1d34ea0e2db1af67c0c0" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-Tools.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sequoia: "1c80a678fe1319054402e3e01b285c702129c74a41172c2460e99c5deaa18f10" + sha256 arm64_sonoma: "35f97c5df3a5765f02b723c15379d045aea6beee3f2805595d4f28732eafa290" + sha256 arm64_ventura: "5f839e25ffa15425202589961e1814958d5d2f7e50236539f82ae1aeb5799adc" + sha256 cellar: :any, sonoma: "115fb1ac792348c5f2862a81f73ee663b3eb5bdf81011dd676f3cb963b547c2e" + sha256 cellar: :any, ventura: "0911d06c18b7a4fe3ecda4d1fcc39e8b91046eec4a1ba497f5dce6d54de46557" + sha256 arm64_linux: "c6190caa8e621ed579b40ec456e4afbdf35284d03a6cabe6a955d1a6413bb126" + sha256 x86_64_linux: "68e3723283c7d52034b096c979bc5efd98ac6de33b85f876cfb136450a50d05d" + end + + depends_on "cmake" => :build + depends_on "python@3.13" => :build + depends_on "vulkan-volk" => :build + depends_on "glslang" + depends_on "vulkan-headers" + depends_on "vulkan-loader" + + on_macos do + depends_on "molten-vk" + end + + on_linux do + depends_on "pkgconf" => :build + 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", + "-DTOOLS_CODEGEN=ON", # custom codegen + "-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..60ad1978cddc0 --- /dev/null +++ b/Formula/v/vulkan-utility-libraries.rb @@ -0,0 +1,57 @@ +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/v1.4.315.tar.gz" + sha256 "c51e3f7faef76b86b74f86ccfc18a7bd93ea42ae9c8acba33b04e7db41ea5b55" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "430a6d084381bc40283d2ed0193edc06339953545970118fd835b50ad8a1c894" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b2507831b7fade01eff30b6c5adf75276596cd90fe146303fa6eef42e257dec6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6fa51bb86d75707fb1148e7b1577b0c1f33d94064cf8d651c47d1255072b402f" + sha256 cellar: :any_skip_relocation, sequoia: "22dee361200e0841a441e58d8cb75aaa317d7a7aeae890a305eb1e6ada470268" + sha256 cellar: :any_skip_relocation, sonoma: "59acc433977030d86da36a83b21110f5548ff27aaca4aafc0d313d31b1d7f9d6" + sha256 cellar: :any_skip_relocation, ventura: "aa5cc824b07ff98470dabcf86b5dabe77fcf6c4bc90c3b60fd82e47b71026eb3" + sha256 cellar: :any_skip_relocation, arm64_linux: "382e1027cbfa43cd178653756f5b86b6cb32fe82f26ae85fd5e1b50873a0c284" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f816283989e9175523cfc18ef793fb71c3a017231cfd6e2fdc096a892b7b6a18" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :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..613bf2bfd3621 --- /dev/null +++ b/Formula/v/vulkan-validationlayers.rb @@ -0,0 +1,112 @@ +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/v1.4.315.tar.gz" + sha256 "9e85fcd793fb1ee871ea8e293cb1f9736473614be23dd03a0dec8a5d1cee918c" + license "Apache-2.0" + head "https://github.com/KhronosGroup/Vulkan-ValidationLayers.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d2d159b2095f256bdf8abf33b8da808420110bcfcd30982be1f65104e6151397" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "21505dcd783e1a9bf26a5a96ec4376b8a133c1fa139be8aa7fcefe73603a320e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6c1c3555ff2dc0a9a6b531264d176c1fc10e75c2ae2f8ed147a7d2305be4e2d3" + sha256 cellar: :any_skip_relocation, sonoma: "b75e2602655516827e54a80cedf8d1e12e9980a661894f39043c613e64ac2649" + sha256 cellar: :any_skip_relocation, ventura: "484d2ac71d950a8d9d6297125e78fefacae4c5d81fe5b90d4bd335226b060fb2" + sha256 cellar: :any_skip_relocation, arm64_linux: "358eeea0487a878ba45763d639cd06e52c4f5c643b828b94d763059d021231cc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1b4cac1211a795a80b34e7e1a5702785bae48c187c2d4dadd334c9ad2f0f2afa" + end + + depends_on "cmake" => :build + depends_on "python@3.13" => :build + depends_on "vulkan-tools" => :test + depends_on "glslang" + 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 + + # https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/v#{version}/scripts/known_good.json#L32 + resource "SPIRV-Headers" do + url "https://github.com/KhronosGroup/SPIRV-Headers.git", + revision: "aa6cef192b8e693916eb713e7a9ccadf06062ceb" + end + + # https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/v#{version}/scripts/known_good.json#L46 + resource "SPIRV-Tools" do + url "https://github.com/KhronosGroup/SPIRV-Tools.git", + revision: "a62abcb402009b9ca5975e6167c09f237f630e0e" + end + + def install + resource("SPIRV-Headers").stage do + system "cmake", "-S", ".", "-B", "build", *std_cmake_args(install_prefix: buildpath/"third_party/SPIRV-Headers") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + resource("SPIRV-Tools").stage do + system "cmake", "-S", ".", "-B", "build", + "-DSPIRV-Headers_SOURCE_DIR=#{buildpath}/third_party/SPIRV-Headers", + "-DSPIRV_WERROR=OFF", + "-DSPIRV_SKIP_TESTS=ON", + "-DSPIRV_SKIP_EXECUTABLES=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath(target: Formula["vulkan-loader"].opt_lib)}", + *std_cmake_args(install_prefix: buildpath/"third_party/SPIRV-Tools") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + args = [ + "-DGLSLANG_INSTALL_DIR=#{Formula["glslang"].prefix}", + "-DSPIRV_HEADERS_INSTALL_DIR=#{buildpath}/third_party/SPIRV-Headers", + "-DSPIRV_TOOLS_INSTALL_DIR=#{buildpath}/third_party/SPIRV-Tools", + "-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_LAYERS=ON", + "-DBUILD_LAYER_SUPPORT_FILES=ON", + "-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..a8d32806cd691 --- /dev/null +++ b/Formula/v/vulkan-volk.rb @@ -0,0 +1,76 @@ +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.313.0.tar.gz" + sha256 "d86bcf1aff499f41a3e445b55df5e393a5ce49b1bda689eb7335b0a0a54a3c0b" + 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_sequoia: "57ad90313f5f630dbefea47e8d8561eaedc1dc659b7d8fd4209a62b10cdd2427" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "25b9a1acdc8aa212409bc39ab15ef2481ffd6b6a4ef70540065bfd4c529ef364" + sha256 cellar: :any_skip_relocation, arm64_ventura: "fa901f6202a93f4637cafdc5bf235785037ab47b9ecc3f9de2c6d913a0b036a0" + sha256 cellar: :any_skip_relocation, sonoma: "b82d2bec7f1739b3eefe9c0e94b2600c82b6cbf12282bbae193f34f7901aa5dc" + sha256 cellar: :any_skip_relocation, ventura: "25ca80bfd5f0821f0563cf49180ae461c1112c155d4384cae0d1d5edef54a926" + sha256 cellar: :any_skip_relocation, arm64_linux: "f05885083682f42c270745947ae747c5cf98d2aeacba8c0e54920571850f4d85" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75e37f363fe26c5c8eb7477529d0c857d5c0f1a31b0ffb7b047e0a05d759c42d" + 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..d130a79ed1696 --- /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.5.1.tar.gz" + sha256 "03e1155c8c989f1980c7392ed6c899bf74dee1bf577f0838521dda977466f9ca" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "df9dc1b779c37edd3d593f55245b103b98584ba75b87b4743bfc04c0f59067b2" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "df9dc1b779c37edd3d593f55245b103b98584ba75b87b4743bfc04c0f59067b2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "df9dc1b779c37edd3d593f55245b103b98584ba75b87b4743bfc04c0f59067b2" + sha256 cellar: :any_skip_relocation, sonoma: "8050dfd7bd5560060a221fbfa7b6be492087f345c23ee9274bdfec1271d3af9d" + sha256 cellar: :any_skip_relocation, ventura: "8050dfd7bd5560060a221fbfa7b6be492087f345c23ee9274bdfec1271d3af9d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a4a2ae9ca9d6b2d48bbe08312fe2e647319cf8881bc0393b017498f42acb8a20" + 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(output: bin/"gost", ldflags:) + + 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..5ef53951db7ac --- /dev/null +++ b/Formula/v/vultr.rb @@ -0,0 +1,31 @@ +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.4.0.tar.gz" + sha256 "966161efc0f65c6f836503dfba9a3e2240ad6e54c76d83817fc99532808cf049" + license "Apache-2.0" + head "https://github.com/vultr/vultr-cli.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0ced1820bc7116f287cf41eb8a76089470b5eec6f7b7ac4f8a857c824cf8b760" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0ced1820bc7116f287cf41eb8a76089470b5eec6f7b7ac4f8a857c824cf8b760" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0ced1820bc7116f287cf41eb8a76089470b5eec6f7b7ac4f8a857c824cf8b760" + sha256 cellar: :any_skip_relocation, sonoma: "77017761b8fcd63d811d483f5055adb292357a5ae83d1016620a700753f37935" + sha256 cellar: :any_skip_relocation, ventura: "77017761b8fcd63d811d483f5055adb292357a5ae83d1016620a700753f37935" + sha256 cellar: :any_skip_relocation, x86_64_linux: "061c93a10edaeb1e1237db4559091ea7cf3bc84b844aee2b27d23326b438fab8" + 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..0d314124b7d40 --- /dev/null +++ b/Formula/v/vulture.rb @@ -0,0 +1,29 @@ +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 + sha256 cellar: :any_skip_relocation, all: "70586ff6f8ff32b5c31dc40a5381bd2f3bef2364209a99b00587c2667272c301" + end + + depends_on "python@3.13" + + 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..f85d970994c04 --- /dev/null +++ b/Formula/v/vunnel.rb @@ -0,0 +1,235 @@ +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/b1/32/b73fce2db11dcbbd14b55b07d9af417671ceed1672c34fa33a68ad673e42/vunnel-0.32.0.tar.gz" + sha256 "46c45ad8bcb3be55cc74b2c2c3ed5fd733b88ba5b4a40bb529c71a29fe707664" + license "Apache-2.0" + head "https://github.com/anchore/vunnel.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "87fa0a101db2d9fcf823f738af97a61f00eb8b63694923ddfd4942645d6fd19f" + sha256 cellar: :any, arm64_sonoma: "bc55953b48f239f16858b93b17b0c23980bb4f33f043cc6cf1fca5f9a3d00108" + sha256 cellar: :any, arm64_ventura: "0b1cbd94443c0ba866065cc1956c2a87d46bb1f0bb6be64105a6111e89766932" + sha256 cellar: :any, sonoma: "eaf3b39a580a9edc8cbc7a9c8d7aba21b10539a0980c874e4beaebd364e01d10" + sha256 cellar: :any, ventura: "cd253fb9ac4e40888f13072b95183987c118bf6603645dcf46c78ea055b8dd0e" + sha256 cellar: :any_skip_relocation, arm64_linux: "4313a1ce84ede159ce7538fd4a4098ae5e6aab22926a826c8c911ea3e9133b94" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7175ecb66d5657fd2fb9e74723be7a39165edc03698c0ba6f5fc66e57d8b0162" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "libyaml" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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/d3/7a/359f4d5df2353f26172b3cc39ea32daa39af8de522205f512f458923e677/colorlog-6.9.0.tar.gz" + sha256 "bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2" + end + + resource "cvss" do + url "https://files.pythonhosted.org/packages/4d/cf/63414dab3f513a18a3d1183ac3131d0f731bdaeffc125edcd3c08c2f2104/cvss-3.4.tar.gz" + sha256 "632353244ba3c58b53355466677edc968b9d7143c317b66271f9fd7939951ee8" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/33/08/c1395a292bb23fd03bdf572a1357c5a733d3eecbab877641ceacab23db6e/importlib_metadata-8.6.1.tar.gz" + sha256 "310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580" + end + + resource "iniconfig" do + url "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz" + sha256 "3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7" + 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 "lxml" do + url "https://files.pythonhosted.org/packages/80/61/d3dc048cd6c7be6fe45b80cedcbdd4326ba4d550375f266d9f4246d0f4bc/lxml-5.3.2.tar.gz" + sha256 "773947d0ed809ddad824b7b14467e1a481b8976e87278ac4a730c2f7c7fcddc1" + end + + resource "markupsafe" do + url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz" + sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0" + end + + resource "mashumaro" do + url "https://files.pythonhosted.org/packages/f3/c1/7b687c8b993202e2eb49e559b25599d8e85f1b6d92ce676c8801226b8bdf/mashumaro-3.15.tar.gz" + sha256 "32a2a38a1e942a07f2cbf9c3061cb2a247714ee53e36a5958548b66bd116d0a9" + end + + resource "mergedeep" do + url "https://files.pythonhosted.org/packages/3a/41/580bb4006e3ed0361b8151a01d324fb03f420815446c7def45d02f74c270/mergedeep-1.3.4.tar.gz" + sha256 "0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8" + end + + resource "orjson" do + url "https://files.pythonhosted.org/packages/98/c7/03913cc4332174071950acf5b0735463e3f63760c80585ef369270c2b372/orjson-3.10.16.tar.gz" + sha256 "d2aaa5c495e11d17b9b93205f5fa196737ee3202f000aaebf028dc9a73750f10" + 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/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz" + sha256 "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + end + + resource "pluggy" do + url "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz" + sha256 "2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1" + end + + resource "pytest" do + url "https://files.pythonhosted.org/packages/ae/3c/c9d525a414d506893f0cd8a8d0de7706446213181570cdbd766691164e40/pytest-8.3.5.tar.gz" + sha256 "f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" + 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/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 "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/ce/af/20290b55d469e873cba9d41c0206ab5461ff49d759989b3fe65010f9d265/sqlalchemy-1.4.54.tar.gz" + sha256 "4470fbed088c35dc20b78a39aaf4ae54fe81790c783b3264872a0224f437c31a" + end + + resource "tomli" do + url "https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz" + sha256 "cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff" + 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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "untokenize" do + url "https://files.pythonhosted.org/packages/f7/46/e7cea8159199096e1df52da20a57a6665da80c37fb8aeb848a3e47442c32/untokenize-0.1.1.tar.gz" + sha256 "3865dbbbb8efb4bb5eaa72f1be7f3e0be00ea8b7f125c69cbd1f5fda926f37a2" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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/00/5e/d6e5258d69df8b4ed8c83b6664f2b47d30d2dec551a29ad72a6c69eafd31/xxhash-3.5.0.tar.gz" + sha256 "84f2caddf951c9cbf8dc2e22a89d4ccf5d86391ac6418fe81e3c67d0cf60b45f" + end + + resource "zipp" do + url "https://files.pythonhosted.org/packages/3f/50/bad581df71744867e9468ebd0bcd6505de3b275e06f202c2cb016e3ff56f/zipp-3.21.0.tar.gz" + sha256 "2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4" + end + + resource "zstandard" do + url "https://files.pythonhosted.org/packages/ed/f6/2ac0287b442160a89d726b17a9184a4c615bb5237db763791a7fd16d9df1/zstandard-0.23.0.tar.gz" + sha256 "b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09" + end + + def install + # The source doesn't have a valid SOURCE_DATE_EPOCH, so here we set default. + 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 + + # Fix python upper bound: https://github.com/anchore/vunnel/issues/809 + inreplace "pyproject.toml", "<=3.13,>=3.11", ">=3.11" + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"vunnel", shells: [:fish, :zsh], 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..579481fd012f7 --- /dev/null +++ b/Formula/v/vvdec.rb @@ -0,0 +1,40 @@ +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_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 + + resource("homebrew-test-video") do + url "https://archive.org/download/testvideo_20230410_202304/test.vvc" + sha256 "753261009b6472758cde0dee2c004ff712823b43e62ec3734f0f46380bec8e46" + end + + 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").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..b84f545e41ae9 --- /dev/null +++ b/Formula/v/vvenc.rb @@ -0,0 +1,46 @@ +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_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/v2ray-plugin.rb b/Formula/v2ray-plugin.rb deleted file mode 100644 index d0c61c91e3d1d..0000000000000 --- a/Formula/v2ray-plugin.rb +++ /dev/null @@ -1,39 +0,0 @@ -class V2rayPlugin < Formula - desc "SIP003 plugin based on v2ray for shadowsocks" - homepage "https://github.com/shadowsocks/v2ray-plugin" - url "https://github.com/shadowsocks/v2ray-plugin/archive/v1.3.1.tar.gz" - sha256 "86d37a8ecef82457b4750a1af9e8d093b25ae0d32ea7dcc2ad5c0068fe2d3d74" - license "MIT" - head "https://github.com/shadowsocks/v2ray-plugin.git" - - bottle do - cellar :any_skip_relocation - sha256 "891f541e150a393ff20caa78eb79ef12f60929fb9e5b35826e2e639c46a61dc2" => :catalina - sha256 "cb8ff7b812aa561f9e23935461968ba1c26cbe393c599aab4e1753b37702748b" => :mojave - sha256 "f11b330c3dc9c445b757188057c93ce94de89f03f4adfa1a8c6405f5ba66b400" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", "-X main.VERSION=v#{version}", "-o", bin/"v2ray-plugin" - end - - test do - server = fork do - exec bin/"v2ray-plugin", "-localPort", "54000", "-remoteAddr", "github.com", "-remotePort", "80", "-server" - end - client = fork do - exec bin/"v2ray-plugin", "-localPort", "54001", "-remotePort", "54000" - end - sleep 2 - begin - system "curl", "localhost:54001" - ensure - Process.kill 9, server - Process.wait server - Process.kill 9, client - Process.wait client - end - end -end diff --git a/Formula/v8.rb b/Formula/v8.rb deleted file mode 100644 index d400cb2d3dd73..0000000000000 --- a/Formula/v8.rb +++ /dev/null @@ -1,138 +0,0 @@ -class V8 < Formula - desc "Google's JavaScript engine" - homepage "https://github.com/v8/v8/wiki" - # Track V8 version from Chrome stable: https://omahaproxy.appspot.com - url "https://github.com/v8/v8/archive/8.3.110.13.tar.gz" - sha256 "5655eef3de81beba0346496edaa57993af651c5b6e2ea2fcb898f93c13c2bbd4" - - bottle do - cellar :any - sha256 "f5f3fb95eb0eb740baadd893ead09b3308e80882e44577f67ad0d3697df4eb0b" => :catalina - sha256 "648acfd7aacc480843107ac209acb689869e9aba105356f0bb8c77f42012a17c" => :mojave - sha256 "135f1489463e1bbb626effb562cca84118b437093f0d48abf80c9b98c39e872b" => :high_sierra - end - - depends_on "llvm" => :build - depends_on "ninja" => :build - - depends_on :xcode => ["10.0", :build] # required by v8 - - # Look up the correct resource revisions in the DEP file of the specific releases tag - # e.g. for CIPD dependency gn: https://github.com/v8/v8/blob/7.6.303.27/DEPS#L15 - resource "gn" do - url "https://gn.googlesource.com/gn.git", - :revision => "5ed3c9cc67b090d5e311e4bd2aba072173e82db9" - end - - # e.g.: https://github.com/v8/v8/blob/7.6.303.27/DEPS#L60 for the revision of build for v8 7.6.303.27 - resource "v8/build" do - url "https://chromium.googlesource.com/chromium/src/build.git", - :revision => "26e9d485d01d6e0eb9dadd21df767a63494c8fea" - - # revert usage of unsuported libtool option -D (fixes High Sierra support) - patch do - url "https://github.com/denoland/chromium_build/commit/56551e71dc0281cc1d9471caf6a02d02f18c830e.patch?full_index=1" - sha256 "46fea09483c8b5699f47ae5886d933b61bed11bb3cda88212a7467767db0be3c" - end - end - - resource "v8/third_party/icu" do - url "https://chromium.googlesource.com/chromium/deps/icu.git", - :revision => "d7aff76cf6bb0fbef3afa6c07718f78a80a70f8f" - end - - resource "v8/base/trace_event/common" do - url "https://chromium.googlesource.com/chromium/src/base/trace_event/common.git", - :revision => "dab187b372fc17e51f5b9fad8201813d0aed5129" - end - - resource "v8/third_party/googletest/src" do - url "https://chromium.googlesource.com/external/github.com/google/googletest.git", - :revision => "10b1902d893ea8cc43c69541d70868f91af3646b" - end - - resource "v8/third_party/jinja2" do - url "https://chromium.googlesource.com/chromium/src/third_party/jinja2.git", - :revision => "b41863e42637544c2941b574c7877d3e1f663e25" - end - - resource "v8/third_party/markupsafe" do - url "https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git", - :revision => "8f45f5cfa0009d2a70589bcda0349b8cb2b72783" - end - - resource "v8/third_party/zlib" do - url "https://chromium.googlesource.com/chromium/src/third_party/zlib.git", - :revision => "156be8c52f80cde343088b4a69a80579101b6e67" - end - - def install - (buildpath/"build").install resource("v8/build") - (buildpath/"third_party/jinja2").install resource("v8/third_party/jinja2") - (buildpath/"third_party/markupsafe").install resource("v8/third_party/markupsafe") - (buildpath/"third_party/googletest/src").install resource("v8/third_party/googletest/src") - (buildpath/"base/trace_event/common").install resource("v8/base/trace_event/common") - (buildpath/"third_party/icu").install resource("v8/third_party/icu") - (buildpath/"third_party/zlib").install resource("v8/third_party/zlib") - - # Build gn from source and add it to the PATH - (buildpath/"gn").install resource("gn") - cd "gn" do - system "python", "build/gen.py" - system "ninja", "-C", "out/", "gn" - end - ENV.prepend_path "PATH", buildpath/"gn/out" - - # Enter the v8 checkout - gn_args = { - :is_debug => false, - :is_component_build => true, - :v8_use_external_startup_data => false, - :v8_enable_i18n_support => true, # enables i18n support with icu - # uses homebrew llvm clang instead of Google's custom one - :clang_base_path => "\"#{Formula["llvm"].prefix}\"", - :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, - } - - # overwrite Chromium minimum sdk version of 10.15 - ENV["FORCE_MAC_SDK_MIN"] = "10.13" - # link against system libc++ instead of llvm provided libc++ - ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib - - # 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 all the things - (libexec/"include").install Dir["include/*"] - libexec.install Dir["out.gn/lib*.dylib", "out.gn/d8", "out.gn/icudtl.dat"] - bin.write_exec_script libexec/"d8" - 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 <<~'EOS' - #include - #include - int main(){ - static std::unique_ptr platform = v8::platform::NewDefaultPlatform(); - v8::V8::InitializePlatform(platform.get()); - v8::V8::Initialize(); - return 0; - } - EOS - - # link against installed libc++ - system ENV.cxx, "-std=c++11", "test.cpp", - "-I#{libexec}/include", - "-L#{libexec}", "-lv8", "-lv8_libplatform" - end -end diff --git a/Formula/v8@3.15.rb b/Formula/v8@3.15.rb deleted file mode 100644 index 4c991848975d6..0000000000000 --- a/Formula/v8@3.15.rb +++ /dev/null @@ -1,54 +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 "588e9a3b61c54705d918bc783e1aa2efa1fd31626ca20181c7fe3c38d0d50ca5" => :catalina - 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 ef3d8d97cfe45..0000000000000 --- a/Formula/vagrant-completion.rb +++ /dev/null @@ -1,19 +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.9.tar.gz" - sha256 "b8e541a00285b0aa8e79aab0832c664f2c53ee4af40e382f1b5c452ae5647139" - license "MIT" - 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 c59b80bc85c37..0000000000000 --- a/Formula/vala.rb +++ /dev/null @@ -1,54 +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.48/vala-0.48.7.tar.xz" - sha256 "28de33e28da24500cc1675c3a6ced1301c9a6a5e6dd06193569001f9ce9a5c53" - license "LGPL-2.1" - - bottle do - sha256 "1edbc682f36ded21abfb1019dba562e1f10511dd9aa85711e85c686c33199585" => :catalina - sha256 "f7da791d95349efeea8d5d91a2e32dfdfc13e4a352fdccb3761aef10c945b17a" => :mojave - sha256 "655823ba6fc369543776d44d80a5ce5176086fc7a2f801b7af1f301f0517ed24" => :high_sierra - end - - depends_on "gettext" - depends_on "glib" - depends_on "graphviz" - depends_on "pkg-config" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - - 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 - ENV.prepend_path "PKG_CONFIG_PATH", Formula["libffi"].opt_lib/"pkgconfig" - 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 6d051bf0d09e5..0000000000000 --- a/Formula/valabind.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Valabind < Formula - desc "Vala bindings for radare, reverse engineering framework" - homepage "https://github.com/radare/valabind" - url "https://github.com/radare/valabind/archive/1.7.1.tar.gz" - sha256 "b463b18419de656e218855a2f30a71051f03a9c4540254b4ceaea475fb79102e" - license "GPL-3.0" - revision 4 - head "https://github.com/radare/valabind.git" - - bottle do - cellar :any - sha256 "c5ad6fe97fa944521c3848f282a940aa3f37d22bc96a472d6f320715f679b38b" => :catalina - sha256 "e120768e4de31c6d5efcfd3e09eacf59c9b8d2388f3a402a296fc13a50c35263" => :mojave - sha256 "90ee3663f74b52b5efb182792bbb4bd76780929bc7444dd319dcf51d27888390" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "swig" - depends_on "vala" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - - # Vala 0.48 compatibility - patch do - url "https://github.com/radare/valabind/commit/9d4fb181e24346a8c5d570290fa9892ce10c8c3b.diff?full_index=1" - sha256 "db3f6afc2e4ff968d887c1f86ed8a666e2a2f8210e37a18297372265f24cd767" - end - - def install - system "make" - system "make", "install", "PREFIX=#{prefix}" - end - - test do - system bin/"valabind", "--help" - end -end diff --git a/Formula/vale.rb b/Formula/vale.rb deleted file mode 100644 index 415f52df85426..0000000000000 --- a/Formula/vale.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Vale < Formula - desc "Syntax-aware linter for prose" - homepage "https://errata-ai.github.io/vale/" - url "https://github.com/errata-ai/vale/archive/v2.2.2.tar.gz" - sha256 "bf90648b364c36eecbf2c7b510439507e27d8107016f23cf4f26b32550cf1674" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "9adcdb7c49fec71387a0cd4a4beb8c81e0bb5467eb2e16db27a02ab94c0d4b2f" => :catalina - sha256 "fcf77f5465bef0f72403fe09154e591cecc03637d85bd0bad767fd66c6ce9a3c" => :mojave - sha256 "2294ed7b45cfd56714e540a89f408345e925cba457b64f5dd177b64257a218fb" => :high_sierra - end - - depends_on "go" => :build - - def install - flags = "-X main.version=#{version} -s -w" - system "go", "build", "-ldflags=#{flags}", "-o", "#{bin}/#{name}" - end - - test do - mkdir_p "styles/demo" - (testpath/"styles/demo/HeadingStartsWithCapital.yml").write <<~EOS - extends: capitalization - message: "'%s' should be in title case" - level: warning - scope: heading.h1 - match: $title - EOS - - (testpath/"vale.ini").write <<~EOS - StylesPath = styles - [*.md] - BasedOnStyles = demo - EOS - - (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/valgrind.rb b/Formula/valgrind.rb deleted file mode 100644 index e995bf8fe698d..0000000000000 --- a/Formula/valgrind.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Valgrind < Formula - desc "Dynamic analysis tools (memory, debug, profiling)" - homepage "https://www.valgrind.org/" - license "GPL-2.0" - - stable do - url "https://sourceware.org/pub/valgrind/valgrind-3.16.1.tar.bz2" - sha256 "c91f3a2f7b02db0f3bc99479861656154d241d2fdb265614ba918cc6720a33ca" - - depends_on :maximum_macos => :high_sierra - end - - bottle do - sha256 "7170a66beb19ccfd79d1559fe57c67fb4a6a7b6369775621f5073af6fea07ea8" => :high_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? - - 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 b92ce942f046a..0000000000000 --- a/Formula/vamp-plugin-sdk.rb +++ /dev/null @@ -1,44 +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/2691/vamp-plugin-sdk-2.10.0.tar.gz" - sha256 "aeaf3762a44b148cebb10cde82f577317ffc9df2720e5445c3df85f3739ff75f" - head "https://code.soundsoftware.ac.uk/hg/vamp-plugin-sdk", :using => :hg - - bottle do - cellar :any - sha256 "b31926ceedbd7f79dc9783da8092b543c549d800705d9d8e8d8d0fd451d093de" => :catalina - sha256 "ee8d69d0b8c72e3e9ed1c79bfa7ca6650d10e36a2b110215b3d803f841ae2ec0" => :mojave - sha256 "834812edc745c782511f1397fb5e3e6995b9fd25b42426ec784cd5610dbc9eb4" => :high_sierra - 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/vapor.rb b/Formula/vapor.rb deleted file mode 100644 index 9450c585aea05..0000000000000 --- a/Formula/vapor.rb +++ /dev/null @@ -1,26 +0,0 @@ -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/18.0.0.tar.gz" - sha256 "1d1b72d92dfb4e417dbbfe8486149f64a92cbfcf86db5209686fdd926b43c74c" - head "https://github.com/vapor/toolbox.git" - - bottle do - cellar :any_skip_relocation - sha256 "d7762239037cff59e33be03863b68cccc19580db9414b1f4bdb012f16df0d2fb" => :catalina - end - - depends_on :xcode => "11.4" - - def install - system "swift", "build", "--disable-sandbox", "-c", "release", "-Xswiftc", \ - "-cross-module-optimization", "--enable-test-discovery" - mv ".build/release/vapor", "vapor" - bin.install "vapor" - end - - test do - system "vapor", "new", "hello-world", "-n" - assert_predicate testpath/"hello-world/Package.swift", :exist? - end -end diff --git a/Formula/vapoursynth-imwri.rb b/Formula/vapoursynth-imwri.rb deleted file mode 100644 index e7938a57f5c2c..0000000000000 --- a/Formula/vapoursynth-imwri.rb +++ /dev/null @@ -1,46 +0,0 @@ -class VapoursynthImwri < Formula - desc "VapourSynth filters - ImageMagick HDRI writer/reader" - homepage "http://www.vapoursynth.com/" - url "https://github.com/vapoursynth/vapoursynth/archive/R50.tar.gz" - sha256 "b9dc7ce904c6a3432df7491b7052bc4cf09ccf1e7a703053f8079a2267522f97" - license "LGPL-2.1" - head "https://github.com/vapoursynth/vapoursynth.git" - - bottle do - cellar :any - sha256 "2fc13589c05a71af92cd1bb8b522f88651bbfcf21b1756cbb0f7133eb4177111" => :catalina - sha256 "45e9e716004b4b55da0d49df18d47ac3ccea18c26450d5b9fc71f16b4eacaf79" => :mojave - sha256 "5600dda1f2e5bca8bdb4a580eb14dcd691f4f5d3f865d4bdf2c8a91595465ade" => :high_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 "imagemagick" - depends_on "vapoursynth" - - def install - system "./autogen.sh" - inreplace "Makefile.in", "pkglibdir = $(libdir)", "pkglibdir = $(exec_prefix)" - system "./configure", "--prefix=#{prefix}", - "--disable-core", - "--disable-vsscript", - "--disable-plugins", - "--enable-imwri" - system "make", "install" - rm prefix/"vapoursynth/libimwri.la" - end - - def post_install - (HOMEBREW_PREFIX/"lib/vapoursynth").mkpath - (HOMEBREW_PREFIX/"lib/vapoursynth").install_symlink prefix/"vapoursynth/libimwri.dylib" => "libimwri.dylib" - end - - test do - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_path "PYTHONPATH", lib/"python#{xy}/site-packages" - system Formula["python@3.8"].opt_bin/"python3", "-c", "from vapoursynth import core; core.imwri" - end -end diff --git a/Formula/vapoursynth-ocr.rb b/Formula/vapoursynth-ocr.rb deleted file mode 100644 index dc448eef1c5e7..0000000000000 --- a/Formula/vapoursynth-ocr.rb +++ /dev/null @@ -1,46 +0,0 @@ -class VapoursynthOcr < Formula - desc "VapourSynth filters - Tesseract OCR filter" - homepage "http://www.vapoursynth.com/" - url "https://github.com/vapoursynth/vapoursynth/archive/R50.tar.gz" - sha256 "b9dc7ce904c6a3432df7491b7052bc4cf09ccf1e7a703053f8079a2267522f97" - license "LGPL-2.1" - head "https://github.com/vapoursynth/vapoursynth.git" - - bottle do - cellar :any - sha256 "788f2be273d5eebd4b92f839da62daa727721a912bf5dda02158659df41604f6" => :catalina - sha256 "5e933208c9c906764c5c146f8e3e668a9d097bc5dc40232d20c1cffaae97e4d3" => :mojave - sha256 "15c82bd77f952eb03644697be031a97b45c4034ec21f71dc96312e51ec43d255" => :high_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 "tesseract" - depends_on "vapoursynth" - - def install - system "./autogen.sh" - inreplace "Makefile.in", "pkglibdir = $(libdir)", "pkglibdir = $(exec_prefix)" - system "./configure", "--prefix=#{prefix}", - "--disable-core", - "--disable-vsscript", - "--disable-plugins", - "--enable-ocr" - system "make", "install" - rm prefix/"vapoursynth/libocr.la" - end - - def post_install - (HOMEBREW_PREFIX/"lib/vapoursynth").mkpath - (HOMEBREW_PREFIX/"lib/vapoursynth").install_symlink prefix/"vapoursynth/libocr.dylib" => "libocr.dylib" - end - - test do - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_path "PYTHONPATH", lib/"python#{xy}/site-packages" - system Formula["python@3.8"].opt_bin/"python3", "-c", "from vapoursynth import core; core.ocr" - end -end diff --git a/Formula/vapoursynth-sub.rb b/Formula/vapoursynth-sub.rb deleted file mode 100644 index 5439a3fb7a8b5..0000000000000 --- a/Formula/vapoursynth-sub.rb +++ /dev/null @@ -1,48 +0,0 @@ -class VapoursynthSub < Formula - desc "VapourSynth filters - Subtitling filter" - homepage "http://www.vapoursynth.com/" - url "https://github.com/vapoursynth/vapoursynth/archive/R50.tar.gz" - sha256 "b9dc7ce904c6a3432df7491b7052bc4cf09ccf1e7a703053f8079a2267522f97" - license "LGPL-2.1" - revision 1 - head "https://github.com/vapoursynth/vapoursynth.git" - - bottle do - cellar :any - sha256 "61aa955a21de088cb8f53ef014a6ed0bbca3435ee70ac958f38bdec42540ca79" => :catalina - sha256 "deeea5620be2867e3fab4a89bbf93074bf9e8d10a3b01fba9e8161f333293bd3" => :mojave - sha256 "1f4e14c3572fcb8e1e65b59f41639bab5a7e28ff4509de6af42afc8e7f8931ff" => :high_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 "ffmpeg" - depends_on "libass" - depends_on "vapoursynth" - - def install - system "./autogen.sh" - inreplace "Makefile.in", "pkglibdir = $(libdir)", "pkglibdir = $(exec_prefix)" - system "./configure", "--prefix=#{prefix}", - "--disable-core", - "--disable-vsscript", - "--disable-plugins", - "--enable-subtext" - system "make", "install" - rm prefix/"vapoursynth/libsubtext.la" - end - - def post_install - (HOMEBREW_PREFIX/"lib/vapoursynth").mkpath - (HOMEBREW_PREFIX/"lib/vapoursynth").install_symlink prefix/"vapoursynth/libsubtext.dylib" => "libsubtext.dylib" - end - - test do - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_path "PYTHONPATH", lib/"python#{xy}/site-packages" - system Formula["python@3.8"].opt_bin/"python3", "-c", "from vapoursynth import core; core.sub" - end -end diff --git a/Formula/vapoursynth.rb b/Formula/vapoursynth.rb deleted file mode 100644 index bc49e3c4b1c35..0000000000000 --- a/Formula/vapoursynth.rb +++ /dev/null @@ -1,79 +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/R50.tar.gz" - sha256 "b9dc7ce904c6a3432df7491b7052bc4cf09ccf1e7a703053f8079a2267522f97" - license "LGPL-2.1" - revision 1 - head "https://github.com/vapoursynth/vapoursynth.git" - - bottle do - cellar :any - sha256 "4839ac1ac710a243b886789f560029e1e6e5f6b13eedb2a07f2666877fb17e54" => :catalina - sha256 "7264f344e3cf299a5e8ceaf9ef910db025ff403552af63a2cfd8e77cdf28c5d0" => :mojave - sha256 "5c190cc18c3b61b2425c01ef2d007a7fcf8c13866be3e73ce9fe48e558622117" => :high_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 :macos => :el_capitan # due to zimg dependency - depends_on "python@3.8" - depends_on "zimg" - - resource "Cython" do - url "https://files.pythonhosted.org/packages/99/36/a3dc962cc6d08749aa4b9d85af08b6e354d09c5468a3e0edc610f44c856b/Cython-0.29.17.tar.gz" - sha256 "6361588cb1d82875bcfbad83d7dd66c442099759f895cf547995f00601f9caf2" - end - - def install - venv = virtualenv_create(buildpath/"cython", Formula["python@3.8"].opt_bin/"python3") - venv.pip_install "Cython" - system "./autogen.sh" - inreplace "Makefile.in", "pkglibdir = $(libdir)", "pkglibdir = $(exec_prefix)" - system "./configure", "--prefix=#{prefix}", - "--with-cython=#{buildpath}/cython/bin/cython", - "--with-plugindir=#{HOMEBREW_PREFIX}/lib/vapoursynth" - system "make", 'LIBS="$(python3-config --ldflags --embed)"' - system "make", "install" - %w[eedi3 miscfilters morpho removegrain vinverse vivtc].each do |filter| - rm prefix/"vapoursynth/lib#{filter}.la" - end - end - - def post_install - (HOMEBREW_PREFIX/"lib/vapoursynth").mkpath - %w[eedi3 miscfilters morpho removegrain vinverse vivtc].each do |filter| - (HOMEBREW_PREFIX/"lib/vapoursynth").install_symlink \ - prefix/"vapoursynth/lib#{filter}.dylib" => "lib#{filter}.dylib" - end - end - - def caveats - <<~EOS - This formula does not contain optional filters that require extra dependencies. - To use \x1B[3m\x1B[1mvapoursynth.core.sub\x1B[0m, execute: - brew install vapoursynth-sub - To use \x1B[3m\x1B[1mvapoursynth.core.ocr\x1B[0m, execute: - brew install vapoursynth-ocr - To use \x1B[3m\x1B[1mvapoursynth.core.imwri\x1B[0m, execute: - brew install vapoursynth-imwri - To use \x1B[3m\x1B[1mvapoursynth.core.ffms2\x1B[0m, execute the following: - brew install ffms2 - ln -s "../libffms2.dylib" "#{HOMEBREW_PREFIX}/lib/vapoursynth/libffms2.dylib" - For more information regarding plugins, please visit: - \x1B[4mhttp://www.vapoursynth.com/doc/plugins.html\x1B[0m - EOS - end - - test do - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_path "PYTHONPATH", lib/"python#{xy}/site-packages" - system Formula["python@3.8"].opt_bin/"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 34fcbe9248be7..0000000000000 --- a/Formula/varnish.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Varnish < Formula - desc "High-performance HTTP accelerator" - homepage "https://www.varnish-cache.org/" - url "https://varnish-cache.org/_downloads/varnish-6.4.0.tgz" - sha256 "f636ba2d881b146f480fb52efefae468b36c2c3e6620d07460f9ccbe364a76c2" - - bottle do - rebuild 1 - sha256 "e603ccb2533b3580adad44c1e6899c8f057ee66ba27cee4d6d854b12e91f1dd8" => :catalina - sha256 "0c4a75a0195843add41833c4e74446f40e7caa3cd7a9f04f5f42c5000ab37ef2" => :mojave - sha256 "94bc1fde6d14d0b4966f81775b46f12b87c28f88f9324b9d5ae2ef679619a34d" => :high_sierra - end - - depends_on "docutils" => :build - depends_on "graphviz" => :build - depends_on "pkg-config" => :build - depends_on "python@3.8" => :build - depends_on "sphinx-doc" => :build - depends_on "pcre" - - def install - ENV["PYTHON"] = Formula["python@3.8"].opt_bin/"python3" - - 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/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 09c0b10977b51..0000000000000 --- a/Formula/vault-cli.rb +++ /dev/null @@ -1,26 +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.4.4/vault-cli-3.4.4-bin.tar.gz" - sha256 "562e8b331936faa9e1735f48fe0da65cadf58c17638174211339cdee075cdf1c" - license "Apache-2.0" - head "https://github.com/apache/jackrabbit-filevault.git" - - bottle :unneeded - - depends_on "openjdk" - - 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", :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/vault.rb b/Formula/vault.rb deleted file mode 100644 index f7feee86f28ec..0000000000000 --- a/Formula/vault.rb +++ /dev/null @@ -1,83 +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 => "v1.4.3", - :revision => "491533b63ec9c1343eac3a24d8a7558185a0acb7" - license "MPL-2.0" - head "https://github.com/hashicorp/vault.git" - - bottle do - cellar :any_skip_relocation - sha256 "f1da98de5119ba3ce6ffb11035b61363f352c609dd41c45180de4871a94d8a0d" => :catalina - sha256 "9356e04df17bcb53842b27282f6247e460ef1db55673c67c8678e3c0b36ed3b6" => :mojave - sha256 "d3d99896a98b9b1dd9826bd692ad136caa45d9a7e2d460cca722d8f164a0b4ab" => :high_sierra - end - - depends_on "go" => :build - depends_on "gox" => :build - depends_on "node@10" => :build - depends_on "yarn" => :build - - def install - ENV["GOPATH"] = buildpath - - contents = buildpath.children - [buildpath/".brew_home"] - (buildpath/"src/github.com/hashicorp/vault").install contents - - (buildpath/"bin").mkpath - - ENV.prepend_path "PATH", buildpath/"bin" - - cd "src/github.com/hashicorp/vault" do - system "make", "bootstrap", "static-dist", "dev-ui" - bin.install "bin/vault" - prefix.install_metafiles - end - end - - plist_options :manual => "vault server -dev" - - def plist - <<~EOS - - - - - KeepAlive - - SuccessfulExit - - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/vault - server - -dev - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/vault.log - StandardOutPath - #{var}/log/vault.log - - - EOS - 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 760a717edb803..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/v3.0.0.tar.gz" - sha256 "ea5183f285930ffa4014d54d4ed80ac8f7aa9afd1114e5fce6e65f2e9ed1af0c" - license "MIT" - head "https://github.com/miquella/vaulted.git" - - bottle do - cellar :any_skip_relocation - sha256 "6e28a27d6d1c24b2cd7d3ca0ff147a8309425dcd1d405861378bd40c191af5d2" => :catalina - sha256 "246a6e46d12ceb79f4406802a72860a4d4e381bf34b8228c10773898b33dbb3e" => :mojave - sha256 "24f80eafb9d738391a99724915f07a546ebc822d5e3ab725fc90bfa690cc4ee7" => :high_sierra - end - - depends_on "go" => :build - - def install - 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 7b555b8023b00..0000000000000 --- a/Formula/vavrdiasm.rb +++ /dev/null @@ -1,56 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "eada6923268ecfe690323de3bafddda5d177cac56ba0f30cf426d015b5b9e538" => :catalina - sha256 "5b0c0f8ae850c12118808020420ed94d9c7b221f1bb64ec81fe5553b089424e4" => :mojave - sha256 "14295cb0db6aa3259a2b1e2c8ba020fee253804135aea259695ac00bdd906764" => :high_sierra - sha256 "c04a9755b9f2e15fa512fdb08d28b95b8cf0304287f3a7930975b4ad75417fcf" => :sierra - sha256 "0671b1062a86e8d596a9f404fd843cb37d6d2d1bb28ebb2b8a8f6cbdd763c97c" => :el_capitan - sha256 "ce57062586ca9cb91290141376f1da1f5de3c6efb6fe4687585a3e64cc29c014" => :yosemite - sha256 "f881c5a6d94581c4fc9efb13118c84c40700f13d130302f6ee4cb16968d1f6b0" => :mavericks - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/vavrdiasm/3.1.patch" - sha256 "e10f261b26e610e3f522864217b53e7b38d270b5d218a67840a683e1cdc20893" - end - - 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 diff --git a/Formula/vbindiff.rb b/Formula/vbindiff.rb deleted file mode 100644 index c1806a9484754..0000000000000 --- a/Formula/vbindiff.rb +++ /dev/null @@ -1,26 +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 "c7e303922a1f33af5fe107d192a530cfb3d545a55d4b7e681cdb5603e24cdfb6" => :catalina - 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 9f62cb6901334..0000000000000 --- a/Formula/vc4asm.rb +++ /dev/null @@ -1,47 +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 "d8a425ef7d84c5a1ba477c07e3b04f5fddb0dce92e5cf67a963ecfbc12b3caec" => :catalina - 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 - - 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 eeb85f21cdb2d..0000000000000 --- a/Formula/vcdimager.rb +++ /dev/null @@ -1,31 +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" - revision 1 - - bottle do - cellar :any - sha256 "cc883a163479f28c7303fcd378eba5461fabeafa5970bbb55695fb097cc2f3e0" => :catalina - sha256 "cb45bd1a48e551a60e8b344668a79e24414012ebc76a141ee6c0677ec21ad594" => :mojave - sha256 "993b40efcd1af1844ed14064de2551cecbdacc3a1c4d39f9fe1d8b289b3b6eb9" => :high_sierra - sha256 "2e8567e154610bb1c3c29a50c6fc9f150ddf84c36d6c94fc35a1f8ab3a495f13" => :sierra - 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 1f02986634c17..0000000000000 --- a/Formula/vcftools.rb +++ /dev/null @@ -1,38 +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" - license "LGPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "96424c5e9810127b9f450a88fd314eb94662b35ac88aee4c7efbc8f5420dd989" => :catalina - 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/vcpkg.rb b/Formula/vcpkg.rb deleted file mode 100644 index de8e06ab8eb44..0000000000000 --- a/Formula/vcpkg.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Vcpkg < Formula - desc "C++ Library Manager" - homepage "https://github.com/microsoft/vcpkg" - url "https://github.com/microsoft/vcpkg/archive/2020.06.tar.gz" - sha256 "cfaecee6f18b6e2763f41c4257b6d6a1d2ef536a2018a6c7f579df0b6ad42e56" - - bottle do - cellar :any - sha256 "8a8aa4727a0b8e5c514c0c742c2a88b6fc7c38c9bf8f8ffdfaf3d6ce480cb047" => :catalina - sha256 "404677363b87dd1a94ea865082fd56c1798cd71d8234b311c4cea7cfdb3c1b48" => :mojave - sha256 "f984abc24e2316833210b1bb313b134baef6855e2b1734cb296b05a9b3237b5e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "ninja" => :build - - if MacOS.version <= :mojave - fails_with :clang do - cause "'file_status' is unavailable: introduced in macOS 10.15" - end - end - - def install - # fix for conflicting declaration of 'char* ctermid(char*)' on Mojave - # https://github.com/microsoft/vcpkg/issues/9029 - ENV.prepend "CXXFLAGS", "-D_CTERMID_H_" if MacOS.version == :mojave - - args = %w[-useSystemBinaries -disableMetrics] - args << "-allowAppleClang" if MacOS.version > :mojave - system "./bootstrap-vcpkg.sh", *args - - bin.install "vcpkg" - bin.env_script_all_files(libexec/"bin", :VCPKG_ROOT => libexec) - libexec.install Dir["*.txt", ".vcpkg-root", "{ports,scripts,triplets}"] - end - - def post_install - (var/"vcpkg/installed").mkpath - (var/"vcpkg/packages").mkpath - ln_s var/"vcpkg/installed", libexec/"installed" - ln_s var/"vcpkg/packages", libexec/"packages" - end - - test do - assert_match "sqlite3", shell_output("#{bin}/vcpkg search sqlite") - end -end diff --git a/Formula/vcprompt.rb b/Formula/vcprompt.rb deleted file mode 100644 index a7c3bb7c8d4ad..0000000000000 --- a/Formula/vcprompt.rb +++ /dev/null @@ -1,40 +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 "8ea1dcba5986f35a4bf282a0970be07e4767a4b98669c01989554db4d67f0b4a" => :catalina - 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 351242cc2a8e0..0000000000000 --- a/Formula/vcs.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Vcs < Formula - desc "Creates video contact sheets (previews) of videos" - homepage "https://p.outlyer.net/vcs/" - url "https://p.outlyer.net/files/vcs/vcs-1.13.4.tar.gz" - sha256 "dc1d6145e10eeed61d16c3591cfe3496a6ac392c9c2f7c2393cbdb0cf248544b" - - bottle do - cellar :any_skip_relocation - sha256 "d93ff1a5972e0f9e961bf66ee8bbd99e6037505de83d73f22e69f8683d0ad1b6" => :catalina - sha256 "d93ff1a5972e0f9e961bf66ee8bbd99e6037505de83d73f22e69f8683d0ad1b6" => :mojave - sha256 "0873f5c80cc698e7b2ce6d653a43bb51ef363c5e0325997565b30d540e87cb86" => :high_sierra - end - - depends_on "ffmpeg" - depends_on "ghostscript" - depends_on "gnu-getopt" - depends_on "imagemagick" - - 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 4f9a85b6880e3..0000000000000 --- a/Formula/vcsh.rb +++ /dev/null @@ -1,20 +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" - license "GPL-2.0" - - 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 616fb7da3cb2f..0000000000000 --- a/Formula/vde.rb +++ /dev/null @@ -1,25 +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" - license "GPL-2.0" - - bottle do - sha256 "141613f09143ec306b51817ff4b205462a95f5272099b3500486cc5b6926ab27" => :catalina - 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 cca47a2416221..0000000000000 --- a/Formula/vdirsyncer.rb +++ /dev/null @@ -1,72 +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.8", - :revision => "b5dd0929d009b7b07f72903dd6fb82815f45bdd8" - head "https://github.com/pimutils/vdirsyncer.git" - - bottle do - cellar :any_skip_relocation - sha256 "68a313f863d08adfb913b5530606ef32c85c2e9ce20dfac6d42185b0d18e4670" => :catalina - sha256 "ef27647042f45a65bf2f8ebb0170cea3b124f98ce4a9200d5a6f82b50a2a7de4" => :mojave - sha256 "d9f144fba5c2de241806ade0e5141a2ed13cd17aaa00233e2f2397315f65f47e" => :high_sierra - end - - depends_on "python@3.8" - - def install - venv = virtualenv_create(libexec, "python3.8") - 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 1f48e272d5309..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" - license "BSL-1.0" - revision 7 - head "https://github.com/mcg1969/vecLibFort.git" - - bottle do - cellar :any - sha256 "bacc73e19f66c5b9cbd1436cbac4a6256a638724961bc17a79a844a0c5635712" => :catalina - sha256 "a3d1f23a1ce7f3044b50ba81baf3c1ee058070baa33a7d2a8ea14827ac6d0650" => :mojave - sha256 "072c7d553e857a6b4c760f921b9eb6281e7d91c5911f5257915bf6de8bdee97e" => :high_sierra - 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 0010194ab537a..0000000000000 --- a/Formula/vecx.rb +++ /dev/null @@ -1,35 +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" - license "GPL-3.0" - head "https://github.com/jhawthorn/vecx.git" - - bottle do - cellar :any - sha256 "8213a8cfb2f96374046f9952241ab34b2be01c4f2dd2988f39aa0b07e948ff60" => :catalina - 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 17ee59b01d25a..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/archive/v12.8.3.tar.gz" - sha256 "2e6326b2fe0ef273ae784600e2181e32d307b62beb29cc84ffc8ddd0d5352df9" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "f93a70561ffc7d97fb58638e1555148058036f1b65ee3b0891352346a256c8d5" => :catalina - sha256 "f3496b02858387a32051d015677ca417c04251b2a98b6d36d8611836908dd23e" => :mojave - sha256 "d03417e5f8bf936b8fa726f6ec25607809db1e284a4ca98ebf884fea3825ec49" => :high_sierra - end - - depends_on "go" => :build - - def install - build_time = Utils.safe_popen_read("date -u +'%Y-%m-%dT%H:%M:%SZ' 2> /dev/null").chomp - - ldflags = %W[ - -s -w - -X main.Version=#{version} - -X main.Date=#{build_time} - ] - - system "go", "build", "-o", bin/"vegeta", "-ldflags", ldflags.join(" ") - 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/velero.rb b/Formula/velero.rb deleted file mode 100644 index f43246b210e85..0000000000000 --- a/Formula/velero.rb +++ /dev/null @@ -1,48 +0,0 @@ -class Velero < Formula - desc "Disaster recovery for Kubernetes resources and persistent volumes" - homepage "https://github.com/vmware-tanzu/velero" - url "https://github.com/vmware-tanzu/velero/archive/v1.4.0.tar.gz" - sha256 "0139071f6e69059a0a1d4897f4331b55cb53bda3d29202d099aea03268891c31" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "a2da65129f5938807fab21cee5022e931d3f6f2bc790d50409bf33d1b782e518" => :catalina - sha256 "54dec0c112160c3cec5373d962c9efd21daff7ccb8b77aa887f135c380d079f2" => :mojave - sha256 "ea9e954f562e89521ccc19e2adc53f028d86eb8f2257044cfed5967b85c24274" => :high_sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/vmware-tanzu/velero" - dir.install buildpath.children - [buildpath/".brew_home"] - - cd dir do - system "go", "build", "-o", bin/"velero", "-installsuffix", "static", - "-ldflags", - "-X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=v#{version}", - "./cmd/velero" - - # Install bash completion - output = Utils.safe_popen_read("#{bin}/velero", "completion", "bash") - (bash_completion/"velero").write output - - # Install zsh completion - output = Utils.safe_popen_read("#{bin}/velero", "completion", "zsh") - (zsh_completion/"_velero").write output - - prefix.install_metafiles - end - 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/vera++.rb b/Formula/vera++.rb deleted file mode 100644 index 9e1708297dfd3..0000000000000 --- a/Formula/vera++.rb +++ /dev/null @@ -1,93 +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 "985e75bcd4c9a559fd2e2841d10d0cb3d73fdc940a76aa3d3050514017d61560" => :catalina - 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 671d418a828ea..0000000000000 --- a/Formula/verilator.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Verilator < Formula - desc "Verilog simulator" - homepage "https://www.veripool.org/wiki/verilator" - url "https://www.veripool.org/ftp/verilator-4.036.tgz" - sha256 "307cf2657328b6e529af48c2d7d06b78b98d00d4f0148a484173cf81df15c0eb" - license "LGPL-3.0" - - bottle do - sha256 "b5cf626c764981beb0c7c2d687478c49aaec9def3a4c0c03def9a918630601e7" => :catalina - sha256 "fdade70c8b1511c9c1b54ceaa9b4a067ef01091605f57af2cdf045266c28f1c9" => :mojave - sha256 "e8adde44e999f92f597ae71e927b792071fe0b1a6dfb537f9390603da1417c0d" => :high_sierra - end - - head do - url "https://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 - - 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 c11751a8352ae..0000000000000 --- a/Formula/vert.rb +++ /dev/null @@ -1,34 +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 "fe4638da084954ff52f94c69318502808134ab73d84f1acac44bb62d3922af5c" => :catalina - 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 4fbac6315e9f8..0000000000000 --- a/Formula/vert.x.rb +++ /dev/null @@ -1,32 +0,0 @@ -class VertX < Formula - desc "Toolkit for building reactive applications on the JVM" - homepage "https://vertx.io/" - url "https://bintray.com/vertx/downloads/download_file?file_path=vert.x-3.9.1-full.tar.gz" - sha256 "f0671566e3dc505282deee0aca2141583e45bd577e4d55ac7e961ad041be6472" - - bottle :unneeded - - depends_on "openjdk" - - def install - rm_f Dir["bin/*.bat"] - libexec.install %w[bin conf lib] - (bin/"vertx").write_env_script "#{libexec}/bin/vertx", - :JAVA_HOME => "${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" - 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 e75abae978b06..0000000000000 --- a/Formula/vf.rb +++ /dev/null @@ -1,27 +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 2ba55925d90c3..0000000000000 --- a/Formula/vfuse.rb +++ /dev/null @@ -1,21 +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.2.6.tar.gz" - sha256 "fbf5f8a1c664b03c7513a70aa05c3fc501a7ebdb53f128f1f05c24395871a314" - - bottle :unneeded - - def install - # Fix upstream artifact packaging issue - # remove in the next release - inreplace "Makefile", "2.2.5", "2.2.6" - inreplace "pkgroot/usr/local/vfuse/bin/vfuse", "2.2.5", "2.2.6" - - 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 c4ab15f93fb1e..0000000000000 --- a/Formula/vgmstream.rb +++ /dev/null @@ -1,31 +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/losnoco/vgmstream/archive/r1050-2908-g14dc8566.tar.gz" - version "r1050-2908-g14dc8566" - sha256 "8d03ef4b3ff4c397c1a7b0a4132eb0813d50901c78436b09558cb2489ea6d904" - head "https://github.com/kode54/vgmstream.git" - - bottle do - cellar :any - sha256 "27cb2df8b0a88d31507695a9b8711bbeca66ac9a09f8e34de399a45b7f2c216a" => :catalina - sha256 "8a52d5fdc81f87c709c0f41c90b02cba2788f7429402a327fcf343d331346018" => :mojave - sha256 "513761e04c72ecf6300222bd06d662b7ab0ae74b56f37cc586dcd514e5f2ffc3" => :high_sierra - end - - depends_on "libao" - depends_on "libvorbis" - depends_on "mpg123" - - def install - system "make", "vgmstream_cli" - system "make", "vgmstream123" - bin.install "cli/vgmstream-cli" - bin.install "cli/vgmstream123" - lib.install "src/libvgmstream.a" - end - - test do - assert_match "decode", shell_output("#{bin}/vgmstream-cli 2>&1", 1) - end -end diff --git a/Formula/vgrep.rb b/Formula/vgrep.rb deleted file mode 100644 index 6953698ab0249..0000000000000 --- a/Formula/vgrep.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Vgrep < Formula - desc "User-friendly pager for grep" - homepage "https://github.com/vrothberg/vgrep" - url "https://github.com/vrothberg/vgrep/archive/v2.3.3.tar.gz" - sha256 "062145687d4c33f66b35be15633ff60cd24fd467bf2791f1a8c3ffb069935aa4" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "5006d83eb22993f4cedcfce32b20b59e74526431bc44ea129b11f112f181c9a9" => :catalina - sha256 "d9fe404e03ea5f5a7cd2709d0d064e4f41fae3f65d66263d242847af25040613" => :mojave - sha256 "ab0e2c15aa3814e4e6f24c7d86a901fda915e6aa9ccbc7bbaf9d79df73ef91a4" => :high_sierra - end - - depends_on "go" => :build - - def install - system "make", "release" - mkdir bin - system "make", "install", "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 \e[01;31m\e[KHomebrew\e[m\e[K!\n", output - end -end diff --git a/Formula/vice.rb b/Formula/vice.rb deleted file mode 100644 index 73096a7466a6d..0000000000000 --- a/Formula/vice.rb +++ /dev/null @@ -1,66 +0,0 @@ -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.4.tar.gz" - sha256 "4bd00c1c63d38cd1fe01b90032834b52f774bc29e4b67eeb1e525b14fee07aeb" - revision 1 - head "https://svn.code.sf.net/p/vice-emu/code/trunk/vice" - - bottle do - cellar :any - sha256 "b65fbef8066263ccd42679a2b9ed9f3d438ff75a5d8c097dcf04ffb5fa1b1e43" => :catalina - sha256 "65380e5bdb80143cfbd668fe45c385b7715faa6baa8f109707003be3fb410efb" => :mojave - sha256 "d2532e0ccc1a84a9896a611c9ac7eac15342f7ebbaedba7c0b29f36c178a0c27" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "texinfo" => :build - depends_on "xa" => :build - depends_on "yasm" => :build - depends_on "autoconf" - depends_on "automake" - depends_on "ffmpeg" - depends_on "flac" - depends_on "giflib" - depends_on "gtk+3" if build.head? - depends_on "jpeg" - depends_on "lame" - depends_on "libnet" - depends_on "libogg" - depends_on "libpng" - depends_on "libvorbis" - depends_on "mpg123" - depends_on "portaudio" - depends_on "sdl2" unless build.head? - depends_on "xz" - - def install - configure_flags = [ - "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--disable-arch", - "--enable-external-ffmpeg", - ] - - configure_flags << if build.head? - "--enable-native-gtk3ui" - else - "--enable-sdlui2" - end - - system "./autogen.sh" - system "./configure", *configure_flags - 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 d87615d80c926..0000000000000 --- a/Formula/viennacl.rb +++ /dev/null @@ -1,30 +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 "6fa1cf4450123da7e4af2910f6a9c41e7005d5591e05d035c06adddff44f25e0" => :catalina - 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 03a303ba17ab9..0000000000000 --- a/Formula/viewvc.rb +++ /dev/null @@ -1,43 +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.2.1/viewvc-1.2.1.tar.gz" - sha256 "afbc2d35fc0469df90f5cc2e855a9e99865ae8c22bf21328cbafcb9578a23e49" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "d56de2b10e8bd8f161071b9d39ae435ee1fc70e4be5056b39d48dec7e77f185e" => :catalina - sha256 "6cd2fbb98cdc1ff4f689aae5ebea8cf4bee6f078671f812c492758274f22a5d6" => :mojave - sha256 "19c07a79667814ccb1b14b6214a3d5fcca65ec31381e6e46a5db3ac3f72fc2d4" => :high_sierra - end - - depends_on :macos # Due to Python 2 (https://github.com/viewvc/viewvc/issues/138) - 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 - port = free_port - - begin - pid = fork do - exec "#{bin}/viewvc-standalone.py", "--port=#{port}" - end - sleep 2 - - output = shell_output("curl -s http://localhost:#{port}/viewvc") - assert_match "[ViewVC] Repository Listing", output - ensure - Process.kill "SIGTERM", pid - Process.wait pid - end - end -end diff --git a/Formula/vifm.rb b/Formula/vifm.rb deleted file mode 100644 index f1bbf4c3cfcf7..0000000000000 --- a/Formula/vifm.rb +++ /dev/null @@ -1,31 +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.10.1/vifm-0.10.1.tar.bz2" - sha256 "99006f56db05e1bdfb7983e8d5c31c9ac93bf2ac9e0409a577c8ca660fecd03b" - - bottle do - sha256 "0495acdf812f89f23c7fafcccef47589249477c5c38dd0e47049c3421edc712a" => :mojave - sha256 "8371dea589590796e0f1c6b7b5ce263e18b9a1619551d5967deefd5035e512e0" => :high_sierra - sha256 "ded145b46f48c79712b12e7f8d14ab8b219778fcd6d0b436d0c156dd0b15129d" => :sierra - end - - uses_from_macos "groff" => :build - uses_from_macos "ncurses" - - 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 a4e818f2d2668..0000000000000 --- a/Formula/vilistextum.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "cead55f6cb7e4d66d3f6ca2bf013f0cb653144a0fe79620fdd5735a1e57566a5" => :catalina - sha256 "c36418e1556b9f5f9c0126811fddca3149137abfed6b36596ec4612c3806a3ec" => :mojave - sha256 "6005ce3b4c593707dfe7ffbc10ea64f26ce6e441803a9133ab46ba0fbaee422f" => :high_sierra - sha256 "b8fa6ddde71b9b86128e12bbc343935ca5ec58e15d28da2a1a9972a23df9becd" => :sierra - sha256 "d46bae51c7e9a7193a735660af8583960c98e50f03aa33c8a9d81c22b2d9bf61" => :el_capitan - sha256 "77ab66b58db8649e9444584b5ee85e6c6c7badeb665425263c50282367eea003" => :yosemite - sha256 "be608cbb3892c81f92392253a86456f042e804b55c58e1331a01531781137f74" => :mavericks - 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 abc1a01c1b439..0000000000000 --- a/Formula/vim.rb +++ /dev/null @@ -1,78 +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.2.1150.tar.gz" - sha256 "072e9cb82b0165aa80ee09442b20f10a44fe6c471c749049c9a7b4222bfdc835" - head "https://github.com/vim/vim.git" - - bottle do - sha256 "71e1556f4c81bf61206543c4b256a1ddff16018fb2d2e7f0bd0c93fcc3569af5" => :catalina - sha256 "6a652c117a9d9d71ae876d5e7050c6d6740c569f6b0bb735541ad04bf0381ae7" => :mojave - sha256 "b34c34f41e31e6a9d7021de5e3e380ef183605bfb8908cdb3d9e2bcd1eebe4be" => :high_sierra - end - - depends_on "gettext" - depends_on "lua" - depends_on "perl" - depends_on "python@3.8" - depends_on "ruby" - - uses_from_macos "ncurses" - - 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.8"].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/vimpager.rb b/Formula/vimpager.rb deleted file mode 100644 index 013d54c9f2102..0000000000000 --- a/Formula/vimpager.rb +++ /dev/null @@ -1,39 +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 a7ecfde1e93d1..0000000000000 --- a/Formula/vimpc.rb +++ /dev/null @@ -1,34 +0,0 @@ -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/v0.09.2.tar.gz" - sha256 "caa772f984e35b1c2fbe0349bc9068fc00c17bcfcc0c596f818fa894cac035ce" - license "GPL-3.0" - head "https://github.com/boysetsfrog/vimpc.git" - - bottle do - sha256 "c8d1936d4ff7a8b85de154b64e7f7a276b6265c703029cca7c2e56ee4ca32abd" => :catalina - sha256 "83dd8968d8fc7830c2dc90db35441c01bd62c567b8d2749e00edba7ee7429487" => :mojave - sha256 "d457ed5a1b85e88f721d7617753aee99a3a8ed17806b5925b6458c9fb9477423" => :high_sierra - sha256 "af41091db0a875b5fa05d0b1cc969df649693f4ceb4e14b8cdd72a3b6527a741" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "libmpdclient" - depends_on "pcre" - depends_on "taglib" - - def install - system "./autogen.sh" - 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 e630c82da94b2..0000000000000 --- a/Formula/vip.rb +++ /dev/null @@ -1,36 +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 "d49d0ecf58de93d03369024f165aae99210c2b72cffe4aadff7a2299236d7420" => :catalina - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/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/vips.rb b/Formula/vips.rb deleted file mode 100644 index e4e212ef982e7..0000000000000 --- a/Formula/vips.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Vips < Formula - desc "Image processing library" - homepage "https://github.com/libvips/libvips" - url "https://github.com/libvips/libvips/releases/download/v8.9.2/vips-8.9.2.tar.gz" - sha256 "ae8491b1156cd2eb9cbbaa2fd6caa1dc9ed3ded0b70443d28cd7fea798ab2a27" - license "LGPL-2.1" - revision 4 - - bottle do - sha256 "fba4823c28b21144f537a968c707dbbf393e275bef1b34de83aa55d20c91f548" => :catalina - sha256 "fdcb83fc211709cd08bfa7ea54c2d107a57ec9341336aed06a744e9e2e279269" => :mojave - sha256 "42b42fbf263e5b4129ac608c39b87ecb61122c6ff584785953cd4988f4ea9f54" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "cfitsio" - depends_on "fftw" - depends_on "fontconfig" - depends_on "gettext" - depends_on "giflib" - depends_on "glib" - depends_on "imagemagick" - depends_on "libexif" - depends_on "libgsf" - depends_on "libheif" - depends_on "libimagequant" - depends_on "libmatio" - depends_on "libpng" - depends_on "librsvg" - depends_on "libtiff" - depends_on "little-cms2" - depends_on "mozjpeg" - depends_on "openexr" - depends_on "openslide" - depends_on "orc" - depends_on "pango" - depends_on "poppler" - depends_on "webp" - - uses_from_macos "zlib" - - on_linux do - depends_on "gobject-introspection" - end - - def install - # mozjpeg needs to appear before libjpeg, otherwise it's not used - ENV.prepend_path "PKG_CONFIG_PATH", Formula["mozjpeg"].opt_lib/"pkgconfig" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --with-magick - ] - - 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 - - # --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_equal "", 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_equal "", shell_output(cmd) - end -end diff --git a/Formula/virgil.rb b/Formula/virgil.rb deleted file mode 100644 index 51b032d5f2589..0000000000000 --- a/Formula/virgil.rb +++ /dev/null @@ -1,28 +0,0 @@ -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.4", - :revision => "46ad6eba489482a5eaff5ba89424f822525a6063" - license "BSD-3-Clause" - head "https://github.com/VirgilSecurity/virgil-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "bc2f75b6c78464e896f574abe240fc54dea029450ffcee2d2d087d0fc67c2091" => :catalina - sha256 "f9ca3b004661ab12821c133655c5b50dc06ef0f18d444a5b8dc1a58dbc003b52" => :mojave - sha256 "5398b66d72d5e25aaa3c10ef70818073a6cd3b38ecc688bdf0ee44979fcd5f1d" => :high_sierra - end - - depends_on "go" => :build - - 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/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 73c68dadad555..0000000000000 --- a/Formula/virtualpg.rb +++ /dev/null @@ -1,39 +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 "62178e004321740f4ce9ff06a9650085a8ff73f5b09594c11377c5a8b26f7b7b" => :catalina - 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 db289674bbf30..0000000000000 --- a/Formula/virtuoso.rb +++ /dev/null @@ -1,64 +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" - revision 1 - # HEAD is disabled as the below, required patches are not compatible. - - bottle do - cellar :any - sha256 "c4904ae739141d51638c3f33064c85498c20d32169053daa61203ff6706c1fa8" => :catalina - sha256 "3a2375ce75d34e6fa2568aeb4bc3ac0239a4052c811eb3afeb7536166b05e67b" => :mojave - sha256 "3abcc2f1444324d675af9014ac20555124c875d7e9a4ba9b021fd1ad7c570845" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - # If gawk isn't found, make fails deep into the process. - depends_on "gawk" => :build - depends_on "libtool" => :build - depends_on "openssl@1.1" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - - conflicts_with "unixodbc", :because => "both install `isql` binaries" - - skip_clean :la - - # Support OpenSSL 1.1 - patch do - url "https://sources.debian.org/data/main/v/virtuoso-opensource/7.2.5.1+dfsg-2/debian/patches/ssl1.1.patch" - sha256 "9fcaaff5394706fcc448e35e30f89c20fe83f5eb0fbe1411d4b2550d1ec37bf3" - end - - # TLS 1.3 compile error patch. - # This also updates the default TLS protocols to allow TLS 1.3. - patch do - url "https://github.com/openlink/virtuoso-opensource/commit/67e09939cf62dc753feca8381396346f6d3d4a06.patch?full_index=1" - sha256 "485f54e4c79d4e1e8b30c4900e5c10ae77bded3928f187e7e2e960d345ca5378" - end - - def install - # We patched configure.ac on stable so need to rerun the autogen. - system "./autogen.sh" - 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/virustotal-cli.rb b/Formula/virustotal-cli.rb deleted file mode 100644 index 58e11c9bf8f7d..0000000000000 --- a/Formula/virustotal-cli.rb +++ /dev/null @@ -1,34 +0,0 @@ -class VirustotalCli < Formula - desc "Command-line interface for VirusTotal" - homepage "https://github.com/VirusTotal/vt-cli" - url "https://github.com/VirusTotal/vt-cli/archive/0.8.0.tar.gz" - sha256 "48de52aaafa5790e36d6522086c49c73bac3aff9a814164aa1b0c5f6487f1669" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "072fd4acc2fd89c9cc86a6e6b6d00beb7516d827d71cdddb24e4cf1e5bca4af1" => :catalina - sha256 "ae56372cafffdfd83a1ac55c917e963882139ca586c069a4d0e7c1f0e303f0fa" => :mojave - sha256 "7fc169a764eb94967cd8e88b5420e5202415ae1715e0dde1c1a6a23951f7e23a" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-ldflags", - "-X cmd.Version=#{version}", - "-o", bin/"vt", "./vt/main.go" - - output = Utils.safe_popen_read("#{bin}/vt", "completion", "bash") - (bash_completion/"vt").write output - - output = Utils.safe_popen_read("#{bin}/vt", "completion", "zsh") - (zsh_completion/"_vt").write output - 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/vis.rb b/Formula/vis.rb deleted file mode 100644 index d0f68dd0d23d8..0000000000000 --- a/Formula/vis.rb +++ /dev/null @@ -1,53 +0,0 @@ -class Vis < Formula - desc "Vim-like text editor" - homepage "https://github.com/martanne/vis" - url "https://github.com/martanne/vis/archive/v0.6.tar.gz" - sha256 "9ab4a3f1c5953475130b3c286af272fe5cfdf7cbb7f9fbebd31e9ea4f34e487d" - head "https://github.com/martanne/vis.git" - - bottle do - sha256 "370791e6f8c70327d9afc8049fe8f8ff16a9e843835efe9f606dbdef6c2319f3" => :catalina - sha256 "3f39518139d63c87a5a499a3ae53829bde4ed1b1eecbc5344d1bfe883ea16b7c" => :mojave - sha256 "166b64aad19e64712cfbf1f3da60cebf1fb6351b3f32921aa10060081cbcef3a" => :high_sierra - 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 deabfcec39827..0000000000000 --- a/Formula/visionmedia-watch.rb +++ /dev/null @@ -1,26 +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 "2b74d2ac31359ec62371784e3136d9ba06e2fc29ba3dd1023cce286c865a5eef" => :catalina - 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 bffbc52d4788e..0000000000000 --- a/Formula/visitors.rb +++ /dev/null @@ -1,35 +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 "b5ccfb951446080490b3f9b4a4c3bf48222bfd6258df87f11bd50bcab41736d9" => :catalina - 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 0ff4d414cdc24..0000000000000 --- a/Formula/visp.rb +++ /dev/null @@ -1,98 +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.3.0.tar.gz" - sha256 "f2ed11f8fee52c89487e6e24ba6a31fa604b326e08fb0f561a22c877ebdb640d" - revision 6 - - bottle do - sha256 "29ba40f83638ecb4787d9ada356a75397511c7e4dd7c48b21bd0e52e082a244e" => :catalina - sha256 "9be8d5ee91606420f909967cb22143a03030f1f56e460c3a9c710c90e49d0d02" => :mojave - sha256 "e50ce7d7ebb651ef5c71336d4c18d87754088f0c0dbbd8c50c9fc30803b742c9" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "eigen" - depends_on "gsl" - depends_on "jpeg" - depends_on "libdc1394" - depends_on "libpng" - depends_on "opencv" - depends_on "pcl" - depends_on "zbar" - - def install - ENV.cxx11 - - sdk = MacOS::CLT.installed? ? "" : MacOS.sdk_path - - # 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: clang++\"" - s.sub! /C Compiler:"\s+\${CMAKE_C_COMPILER}/, - "C Compiler: clang\"" - 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}/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=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}/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", - *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 diff --git a/Formula/vit.rb b/Formula/vit.rb deleted file mode 100644 index 8e12799151735..0000000000000 --- a/Formula/vit.rb +++ /dev/null @@ -1,63 +0,0 @@ -class Vit < Formula - include Language::Python::Virtualenv - - desc "Full-screen terminal interface for Taskwarrior" - homepage "https://taskwarrior.org/news/news.20140406.html" - url "https://github.com/scottkosty/vit/archive/v2.0.0.tar.gz" - sha256 "0c8739c16b5922880e762bd38f887240923d16181b2f85bb88c4f9f6faf38d6d" - license "MIT" - revision 1 - head "https://github.com/scottkosty/vit.git", :branch => "2.x" - - bottle do - cellar :any_skip_relocation - sha256 "6d70b6f12fc488da934b045dd9acbd3e11c275e815330da15962834d7cf897f9" => :catalina - sha256 "c41b171a5b91015b5b291125081f135ef2c2fc3a7025e78dfaa42fed706d8ba2" => :mojave - sha256 "3498a07d7d7ebc8011585ca12a60657e97f28712f77b2d35ccd54bf6acc79a5c" => :high_sierra - end - - depends_on "python@3.8" - depends_on "task" - - resource "pytz" do - url "https://files.pythonhosted.org/packages/82/c3/534ddba230bd4fbbd3b7a3d35f3341d014cca213f369a9940925e7e5f691/pytz-2019.3.tar.gz" - sha256 "b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "tasklib" do - url "https://files.pythonhosted.org/packages/ae/23/3de1856314e8aa87330c57b5c6f8c8738c4fca72bc96fa10b54f7524c752/tasklib-1.3.0.tar.gz" - sha256 "5b478c53d5b531e072d1374bb4763249d137a094d93621e6ebe2f3f10c52d9a7" - end - - resource "tzlocal" do - url "https://files.pythonhosted.org/packages/c6/52/5ec375d4efcbe4e31805f3c4b301bdfcff9dcbdb3605d4b79e117a16b38d/tzlocal-2.0.0.tar.gz" - sha256 "949b9dd5ba4be17190a80c0268167d7e6c92c62b30026cf9764caf3e308e5590" - end - - resource "urwid" do - url "https://files.pythonhosted.org/packages/45/dd/d57924f77b0914f8a61c81222647888fbb583f89168a376ffeb5613b02a6/urwid-2.1.0.tar.gz" - sha256 "0896f36060beb6bf3801cb554303fef336a79661401797551ba106d23ab4cd86" - 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 - Process.kill "TERM", pid - end - assert_predicate testpath/".task", :exist? - end -end diff --git a/Formula/vitetris.rb b/Formula/vitetris.rb deleted file mode 100644 index 8972b7a7e777f..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://github.com/vicgeralds/vitetris/archive/v0.58.0.tar.gz" - sha256 "e7e7cb74bb814b9fec80fe4ede3c3f04134d8217d630e092a097238248d604f9" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "17c380c39ba763e9559876cef2a6c5189947994aef7c0e6f3613e383f8f9e646" => :catalina - sha256 "5cfebdcea81b5e7720d1941f3973b0b47c1fd510234b09f81e9098c1132c0b92" => :mojave - sha256 "175da9ed672d62d7c5409d94f299a67ab8499020283a4ea1ca21f6efc6470809" => :high_sierra - sha256 "6cb9f1f8d9492c7a652d32115ae488dd19282aa94261957115b50e97c74f06f4" => :sierra - 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/vlang.rb b/Formula/vlang.rb deleted file mode 100644 index e1136cb2aa147..0000000000000 --- a/Formula/vlang.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Vlang < Formula - desc "V programming language" - homepage "https://vlang.io/" - url "https://github.com/vlang/v/archive/0.1.28.1.tar.gz" - sha256 "cbaded862d56d943c119630bf13974ef4370bb7fff533d244c9f42f7f5c5f3ad" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "456016a58777fcd2be1889404913e41d9b72cc70db60d7b3034cb0b5f9c2c009" => :catalina - sha256 "6bf3c73e0254ed784347aae365715ce683d79076cd48025a8e50ddf0096b1246" => :mojave - sha256 "cf0602a48f187246fe9cd0546ba68f5a972b90186f8e4239162e863dac2ded68" => :high_sierra - end - - 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/197b42bd0e9268ec7c3c16526edc8530ad90a075.tar.gz" - sha256 "a8319bc8b9a7683d798825deee7b2fdae944f2c53ff19024f75dd3472eeccd93" - end - - def install - resource("vc").stage do - system ENV.cc, "-std=gnu11", "-w", "-o", buildpath/"v", "v.c", "-lm" - end - system "./v", "self" - 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 diff --git a/Formula/vlmcsd.rb b/Formula/vlmcsd.rb deleted file mode 100644 index fbdc8870eb328..0000000000000 --- a/Formula/vlmcsd.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Vlmcsd < Formula - desc "KMS Emulator in C" - homepage "https://github.com/Wind4/vlmcsd" - url "https://github.com/Wind4/vlmcsd/archive/svn1113.tar.gz" - version "svn1113" - sha256 "62f55c48f5de1249c2348ab6b96dabbe7e38899230954b0c8774efb01d9c42cc" - head "https://github.com/Wind4/vlmcsd.git" - - bottle do - cellar :any_skip_relocation - sha256 "3f3cc34de780b15b2c5eb32660f79a95bd28674c7cebb78452f9f8888d9d8b38" => :catalina - sha256 "512da18ff22fe4dbc539aa31020acad022fdf6b19c6b14d49a361e1615af58fb" => :mojave - sha256 "0cb2abe0a85b0ca14602d565b6ef3c69afa1f466123b37503936dfe064581b54" => :high_sierra - end - - depends_on "make" => :build - 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 #{plist_path} - launchctl load #{plist_path} - Or, if you don't want/need launchctl, you can just run: - brew services restart vlmcsd - EOS - end - - plist_options :manual => "vlmcsd" - - def plist - <<~EOS - - - - - Label - #{plist_name} - RunAtLoad - - KeepAlive - - ProgramArguments - - #{bin}/vlmcsd - -i - #{etc}/vlmcsd/vlmcsd.ini - -D - - - - EOS - 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/vmdktool.rb b/Formula/vmdktool.rb deleted file mode 100644 index dadf74a958911..0000000000000 --- a/Formula/vmdktool.rb +++ /dev/null @@ -1,47 +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 "2d4faffbb4ae8f2aba0822834278e532c08fad14e8b07ef534415e1535e3c369" => :catalina - 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 a6b427bc82b12..0000000000000 --- a/Formula/vmtouch.rb +++ /dev/null @@ -1,30 +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.1.tar.gz" - sha256 "d57b7b3ae1146c4516429ab7d6db6f2122401db814ddd9cdaad10980e9c8428c" - head "https://github.com/hoytech/vmtouch.git" - - bottle do - cellar :any_skip_relocation - sha256 "30c620a4dc06285c41c7194468de50cf0f12aab38c6441d8e1bbad6d4231ee1e" => :catalina - sha256 "020d4e624a448e4e1b9a6e26b8f506bd65ab789ae1c0f23f25beda78b09bc6dd" => :mojave - sha256 "edb14ca1ff4cbd4ab535ca9099ea113a36e280ddaf2957a65bdef10f4a7a1b88" => :high_sierra - sha256 "7359ed3256886940e6fb1883141c495d5b3e6ab28130ed16553e0f6ab57ac3db" => :sierra - 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/vncsnapshot.rb b/Formula/vncsnapshot.rb deleted file mode 100644 index fb303383c1e7b..0000000000000 --- a/Formula/vncsnapshot.rb +++ /dev/null @@ -1,50 +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 "ebdef361f11059c2b912c727a4a8fee601ebd0fc9b4e36e4ef2a70f655a48983" => :catalina - 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 96753ec164ddf..0000000000000 --- a/Formula/vnstat.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Vnstat < Formula - desc "Console-based network traffic monitor" - homepage "https://humdi.net/vnstat/" - url "https://humdi.net/vnstat/vnstat-2.6.tar.gz" - sha256 "89276e0a7281943edb554b874078278ad947dc312938a2451e03eb80679f7ff7" - license "GPL-2.0" - head "https://github.com/vergoh/vnstat.git" - - bottle do - sha256 "c4087b24e69aa3bbf9ccb7f58ca3d942bc3403bcfff47df7657cac00e8c9fc75" => :catalina - sha256 "795d67ae3e4d0f8683ee0812d29a4205aab38a2f453a09cd714adac7f00aaea8" => :mojave - sha256 "5e873fe1cb03aecfc02e0a5224f2fa222ef9e3f2a2e8a007a031cf4a1f9cf3ee" => :high_sierra - 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", 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 448f935f56005..0000000000000 --- a/Formula/vnu.rb +++ /dev/null @@ -1,34 +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/20.3.16/vnu.jar_20.3.16.zip" - sha256 "1d5b3f0ded0a1e6f9d26a0be5c051a9590a11c8aab2e12d208120a3063e7bdcd" - license "MIT" - version_scheme 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "vnu.jar" - (bin/"vnu").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/vnu.jar" "$@" - EOS - 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 6d9e6554954d0..0000000000000 --- a/Formula/volatility.rb +++ /dev/null @@ -1,194 +0,0 @@ -class Volatility < Formula - include Language::Python::Virtualenv - - desc "Advanced memory forensics framework" - homepage "https://github.com/volatilityfoundation/volatility" - url "https://github.com/volatilityfoundation/volatility/archive/2.6.1.tar.gz" - sha256 "a8dfdbdb2aaa0885387b709b821bb8250e698086fb32015bc2896ea55f359058" - license "GPL-2.0" - revision 2 - head "https://github.com/volatilityfoundation/volatility.git" - - bottle do - cellar :any - sha256 "f41ce1f3f70a5bb1eab7efac3d74ace7dad7bdf581bcb16b7a09d34e27e38d50" => :catalina - sha256 "5bcfa94349a26dc291af274bcf3427851ed2654e36781d05e3774018ee8f7781" => :mojave - sha256 "0d156b81c472080d117d567167d7a6d294376bab6d3c4751b4ca343a25fefa3d" => :high_sierra - end - - depends_on "freetype" - depends_on "jpeg" - depends_on :macos # Due to Python 2 (Python 3 support will come with volatility 3) - # https://github.com/volatilityfoundation/volatility3 - depends_on "yara" - - on_linux do - depends_on "gmp" - end - - resource "distorm3" do - url "https://files.pythonhosted.org/packages/2c/e3/84a3a99904c368daa1de5e85a6e9cc07189e7f66cb1338a9ebf93fa051bd/distorm3-3.4.1.tar.gz" - sha256 "0ed65741b31cc113f1c98641594fc3e24f0563b6977c5ea2a7d97983095caa0c" - end - - resource "yara-python" do - url "https://files.pythonhosted.org/packages/1d/93/688492dcedbd57a9c0b4074aa47d39ac5f5e7411a8ce69b23e57a801e638/yara-python-3.10.0.tar.gz" - sha256 "2da1d94850cbea1dd9db1cc7d54bb36a69cd6a33bbc0caf003497b6a323e3e10" - 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/51/fe/18125dc680720e4c3086dd3f5f95d80057c41ab98326877fc7d3ff6d0ee5/Pillow-6.1.0.tar.gz" - sha256 "0804f77cb1e9b6dbd37601cee11283bba39a8d44b9ddb053400c58e0c0d7d9de" - end - - resource "openpyxl" do - url "https://files.pythonhosted.org/packages/ba/06/b899c8867518df19e242d8cbc82d4ba210f5ffbeebb7704c695e687ab59c/openpyxl-2.6.2.tar.gz" - sha256 "1d2af392cef8c8227bd2ac3ebe3a28b25aba74fd4fa473ce106065f0b73bfe2e" - 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/7b/b0/fa20fce23e9c3b55b640e629cb5edf32a85e6af3cf7af599940eb0c753fe/jdcal-1.4.1.tar.gz" - sha256 "472872e096eb8df219c23f2689fc336668bdb43d194094b5cc1707e1640acfc8" - 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/df/d5/3e3ff673e8f3096921b3f1b79ce04b832e0100b4741573154b72b756a681/pytz-2019.1.tar.gz" - sha256 "d747dd3d23d77ef44c6a3526e274af6efeb0a6f1afd5a69ba4d5be4098c8e141" - end - - resource "ipython" do - url "https://files.pythonhosted.org/packages/41/a6/2d25314b1f9375639d8f8e0f8052e8cec5df511d3449f22c4f1c2d8cb3c6/ipython-5.8.0.tar.gz" - sha256 "4bac649857611baaaf76bc82c173aa542f7486446c335fe1a6c05d0d491c8906" - 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/ba/19/1119fe7b1e49b9c8a9f154c930060f37074ea2e8f9f6558efc2eeaa417a2/decorator-4.4.0.tar.gz" - sha256 "86156361c50488b84a3f148056ea716ca587df2f0de1d34750d35c21312725de" - 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/e8/69/fbeffffc05236398ebfcfb512b6d2511c622871dca1746361006da310399/ipython_genutils-0.2.0.tar.gz" - sha256 "eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8" - end - - resource "pathlib2" do - url "https://files.pythonhosted.org/packages/b5/f4/9c7cc726ece2498b6c8b62d3262aa43f59039b953fe23c9964ac5e18d40b/pathlib2-2.3.4.tar.gz" - sha256 "446014523bb9be5c28128c4d2a10ad6bb60769e78bd85658fe44a450674e0ef8" - end - - resource "pexpect" do - url "https://files.pythonhosted.org/packages/1c/b1/362a0d4235496cb42c33d1d8732b5e2c607b0129ad5fdd76f5a583b9fcb3/pexpect-4.7.0.tar.gz" - sha256 "9e2c1fd0e6ee3a49b28f95d4b33bc389c89b20af6a1255906e90ff1262ce62eb" - end - - resource "pickleshare" do - url "https://files.pythonhosted.org/packages/d8/b6/df3c1c9b616e9c0edbc4fbab6ddd09df9535849c64ba51fcb6531c32d4d8/pickleshare-0.7.5.tar.gz" - sha256 "87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca" - end - - resource "prompt_toolkit" do - url "https://files.pythonhosted.org/packages/94/a0/57dc47115621d9b3fcc589848cdbcbb6c4c130186e8fc4c4704766a7a699/prompt_toolkit-2.0.9.tar.gz" - sha256 "2519ad1d8038fd5fc8e770362237ad0364d16a7650fb5724af6997ed5515e3c1" - 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/7e/ae/26808275fc76bf2832deb10d3a3ed3107bc4de01b85dcccbe525f2cd6d1e/Pygments-2.4.2.tar.gz" - sha256 "881c4c157e45f30af185c1ffe8d549d48ac9127433f2c380c24b84572ad66297" - 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/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" - sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" - end - - resource "traitlets" do - url "https://files.pythonhosted.org/packages/a5/98/7f5ef2fe9e9e071813aaf9cb91d1a732e0a68b6c44a32b38cb8e14c3f069/traitlets-4.3.2.tar.gz" - sha256 "9c4bd2d267b7153df9152698efb1050a5d84982d3384a37b2c1f7723ba3e7835" - 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 24012522c344c..0000000000000 --- a/Formula/voldemort.rb +++ /dev/null @@ -1,36 +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" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "cf54d4426d88d2cff21c465a7df3bbe25b6079610be947eb0613fa0760c3372b" => :catalina - 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/volt.rb b/Formula/volt.rb deleted file mode 100644 index 34e09b9536a42..0000000000000 --- a/Formula/volt.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Volt < Formula - desc "Meta-level vim package manager" - homepage "https://github.com/vim-volt/volt" - url "https://github.com/vim-volt/volt.git", - :tag => "v0.3.7", - :revision => "e604467d8b440c89793b2e113cd241915e431bf9" - head "https://github.com/vim-volt/volt.git" - - bottle do - cellar :any_skip_relocation - sha256 "60210297f62f908ef4090a7f69631ad02cb4fe2ce8472e953f67ad91caa9461c" => :catalina - sha256 "9db9e940c124e8e655cdd84b7d143f526535c588ebd6503acb3960143d08f905" => :mojave - sha256 "7fd8887efcdc3a9816b2dea510c2e3ba218e0e719390841d3b0b416fde53378e" => :high_sierra - sha256 "4edc3f1130757ddbf0a7b3c018825f68f2ecb24417f3afc3fd54b532e8c72c46" => :sierra - end - - depends_on "go" => :build - - # 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", "-ldflags", "-s -w", "-trimpath", "-o", bin/"volt" - prefix.install_metafiles - - 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 - mkdir_p testpath/"volt/repos/localhost/foo/bar/plugin" - File.write(testpath/"volt/repos/localhost/foo/bar/plugin/baz.vim", "qux") - system bin/"volt", "get", "localhost/foo/bar" - assert_equal File.read(testpath/".vim/pack/volt/opt/localhost_foo_bar/plugin/baz.vim"), "qux" - end -end diff --git a/Formula/volta.rb b/Formula/volta.rb deleted file mode 100644 index 7d935e28cd84f..0000000000000 --- a/Formula/volta.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Volta < Formula - desc "JavaScript toolchain manager for reproducible environments" - homepage "https://volta.sh/" - url "https://github.com/volta-cli/volta.git", - :revision => "42caba1cc64b0e2946b9dc2db8b570fc55aef298", - :tag => "v0.8.3" - - bottle do - cellar :any_skip_relocation - sha256 "d027df0f390424da752160dc8587a2f873af9f60b19c785ed227584e21e079ea" => :catalina - sha256 "7ab21021eed69d9a95646425b6e95fe67b1d3e65b2a7f60525496a63f037a2f0" => :mojave - sha256 "238005d3d2d5164f237ae6c866afd76f4d5805d8f8bc813b3983745dbcf54e73" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - system "#{bin}/volta", "install", "node@12.16.1" - node = shell_output("#{bin}/volta which node").chomp - assert_match "12.16.1", shell_output("#{node} --version") - end -end diff --git a/Formula/vorbis-tools.rb b/Formula/vorbis-tools.rb deleted file mode 100644 index ccdc0645be475..0000000000000 --- a/Formula/vorbis-tools.rb +++ /dev/null @@ -1,46 +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 - cellar :any - rebuild 1 - sha256 "71a81bbeec2d79ddd7f39858cf66a450fac9d542824c30a064298229d6637594" => :catalina - sha256 "c3e402519ad170a0a37d80d394d8afbe905985784f8ea5d93fcc84a4486a9977" => :mojave - sha256 "e929c31331ffcb58d21cb086184ed747185dd8d0f4b7ee1b98134cabe44490bc" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "flac" - depends_on "libao" - depends_on "libogg" - depends_on "libvorbis" - - uses_from_macos "curl" - - 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 c6120594a4900..0000000000000 --- a/Formula/vorbisgain.rb +++ /dev/null @@ -1,30 +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" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "b49eb04725bc5ab78fa94e261bb23598b4b4cacf1e8508a9ea543b0069947894" => :catalina - 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 547f71e23102e..0000000000000 --- a/Formula/voro++.rb +++ /dev/null @@ -1,40 +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 "d3e73665fab068af530be8c745fbe03498a3d2060110264e99e17935f0980581" => :catalina - 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 14866ead1b6de..0000000000000 --- a/Formula/vowpal-wabbit.rb +++ /dev/null @@ -1,92 +0,0 @@ -class VowpalWabbit < Formula - desc "Online learning algorithm" - homepage "https://github.com/VowpalWabbit/vowpal_wabbit" - # pull from git tag to get submodules - url "https://github.com/VowpalWabbit/vowpal_wabbit.git", - :tag => "8.8.1", - :revision => "5ff219ec0ff28af5d35e452f5f18e6808993e08a" - revision 1 - head "https://github.com/VowpalWabbit/vowpal_wabbit.git" - - bottle do - cellar :any - sha256 "67b1a1ff72db3a4fb3a8feecf372999b09a9c0eb429d449fe3038aaf1c866a52" => :catalina - sha256 "420d53c0004628986811ad2c7e0b83fd20bad1db5bac9b8775e40daf788b0a9b" => :mojave - sha256 "ff5920ae1294c66d9b4752326818d4b9aa88f6ecfdffbd740691f13b99b4e6e7" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "rapidjson" => :build - depends_on "boost" - - # Support using brewed rapidjson - patch do - url "https://github.com/VowpalWabbit/vowpal_wabbit/commit/9aea63874e70eee477b9b281ef12515f70f5d1bd.patch?full_index=1" - sha256 "e69037901f0027dbcd21204822875efb98c676805d383818483fbe7badc3d6b4" - end - - def install - ENV.cxx11 - # 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. - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DBUILD_TESTS=OFF", - "-DRAPIDJSON_SYS_DEP=ON" - system "make", "install" - end - bin.install Dir["utl/*"] - rm bin/"active_interactor.py" - rm bin/"new_version" - rm bin/"vw-validate.html" - rm bin/"clang-format" - 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 41e0ed3bba5a8..0000000000000 --- a/Formula/vpcs.rb +++ /dev/null @@ -1,27 +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" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "180a02cc1bb06bb9e5f441688d6b1a51e5c531cd6dea68399aba55f3c5691dd9" => :catalina - 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/vpn-slice.rb b/Formula/vpn-slice.rb deleted file mode 100644 index cace1202d9274..0000000000000 --- a/Formula/vpn-slice.rb +++ /dev/null @@ -1,40 +0,0 @@ -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://github.com/dlenski/vpn-slice/archive/v0.14.2.tar.gz" - sha256 "cae69cfe2994fea487f563edb601f7ef8a59b5059baa104349121764da9d37a2" - license "GPL-3.0" - head "https://github.com/dlenski/vpn-slice.git" - - bottle do - cellar :any_skip_relocation - sha256 "350f4032091eaf9e5daeae9bc4232e7eb6f873dc0fd2cd838bdb5feed820ec1a" => :catalina - sha256 "b8057aa360ec68539ec028a0f30a883440bcf7cb2d72e62159594e5ec4146017" => :mojave - sha256 "7f6c4cb4440b65b6579bd3796591ee95a7caeda748f40c82aea386b089d2898b" => :high_sierra - end - - depends_on "python@3.8" - - resource "dnspython" do - url "https://files.pythonhosted.org/packages/ec/c5/14bcd63cb6d06092a004793399ec395405edf97c2301dfdc146dfbd5beed/dnspython-1.16.0.zip" - sha256 "36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01" - end - - resource "setproctitle" do - url "https://files.pythonhosted.org/packages/5a/0d/dc0d2234aacba6cf1a729964383e3452c52096dc695581248b548786f2b3/setproctitle-1.1.10.tar.gz" - sha256 "6283b7a58477dd8478fbb9e76defb37968ee4ba47b05ec1c053cb39638bd7398" - end - - def install - virtualenv_install_with_resources - end - - test do - # vpn-slice needs root/sudo credentials - output = `#{bin}/vpn-slice 192.168.0.0/24 2>&1` - assert_match "Cannot read\/write \/etc\/hosts", output - assert_equal 1, $CHILD_STATUS.exitstatus - end -end diff --git a/Formula/vramsteg.rb b/Formula/vramsteg.rb deleted file mode 100644 index f9d3bff5f9d72..0000000000000 --- a/Formula/vramsteg.rb +++ /dev/null @@ -1,30 +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 "a6f6f99e3b12dca8a56919d1144b10e43a9059e7691d56dfdf8aab330e6febe8" => :catalina - 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/vroom.rb b/Formula/vroom.rb deleted file mode 100644 index 3032f519de4c7..0000000000000 --- a/Formula/vroom.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Vroom < Formula - desc "Vehicle Routing Open-Source Optimization Machine" - homepage "http://vroom-project.org/" - url "https://github.com/VROOM-Project/vroom/archive/v1.6.0.tar.gz" - sha256 "6bd8736f68c121cd8867f16b654cd36924605ebffea65f1e20fe042e4292175b" - license "BSD-2-Clause" - - bottle do - cellar :any - sha256 "d456cedbd8a14b0bf4a522c1e982761487b8b93baa8db7198875c48ac84bca68" => :catalina - sha256 "678a00e9b7f1971bd55832bff3a73503e40d453a2c39e6c7499256ca7638937d" => :mojave - sha256 "aa74496ac296cf599254f6869e13ec0fc6ffb72d1d6e787f0ed302754bfcd44e" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "openssl@1.1" - - def install - chdir "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"] - assert_equal expected_routes, JSON.parse(output)["routes"] - end -end diff --git a/Formula/vrpn.rb b/Formula/vrpn.rb deleted file mode 100644 index 36e9a206f71ba..0000000000000 --- a/Formula/vrpn.rb +++ /dev/null @@ -1,29 +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 "cecacf7a6918983b48197ab850b20e00a775a607f28b53e51ba49e89f550b2a6" => :catalina - 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 - 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/vsearch.rb b/Formula/vsearch.rb deleted file mode 100644 index c6eb4baa8afed..0000000000000 --- a/Formula/vsearch.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Vsearch < Formula - desc "Versatile open-source tool for microbiome analysis" - homepage "https://github.com/torognes/vsearch" - url "https://github.com/torognes/vsearch/archive/v2.15.0.tar.gz" - sha256 "c5d6eca1e4bf0c6e28221356b806c1d2322b51c39f40888636ab094c4df2e231" - - bottle do - cellar :any_skip_relocation - sha256 "a184d6b0129488bd0bab5c9fac7c69fb8380abede5af74e47545563edced4a1a" => :catalina - sha256 "1012a84e305c19914cfc54a708434eadf9490890c08c11e0fa0fb16f30edb230" => :mojave - sha256 "c253a44e9a4eda0e486f96dbaa1fd4494e89572f768e7f09577f180899273fe6" => :high_sierra - 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_predicate testpath/"output.txt", :exist? - end -end diff --git a/Formula/vsftpd.rb b/Formula/vsftpd.rb deleted file mode 100644 index 69d25b8e772d8..0000000000000 --- a/Formula/vsftpd.rb +++ /dev/null @@ -1,74 +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 "43b17ac94b152a4922a915b7e2efc89c3da7ee53e00f860136c5c58489e2b782" => :catalina - sha256 "5605a908ab4b24008e48f2280107695a7afaae8a1a521964b8f2248d2baa960a" => :mojave - sha256 "dbfc9b28f5ea49dda09d31fb630d995b72fd63b83b358e04156329252c3ab25b" => :high_sierra - sha256 "22349437bd4d75b1ffd2fddfd90f92367e0a4f478f540b9086457541883f2c3b" => :sierra - sha256 "108243559f3fea06d140173a3e3cb497c2f22c47d45e85ae108c088c1a1370df" => :el_capitan - sha256 "25a9d2e92ca7e3efda6c9882a62ad5927c0c5e450eca4d62d7829c467dd086d9" => :yosemite - 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/formula-patches/85fa66a9/vsftpd/3.0.3.patch" - sha256 "7947d91f75cb02b834783382bcd2a2ef41565a76e31a5667a1ea0bd5bef48011" - end - - def install - 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 - <<~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 - - 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 diff --git a/Formula/vstr.rb b/Formula/vstr.rb deleted file mode 100644 index 7103104274b50..0000000000000 --- a/Formula/vstr.rb +++ /dev/null @@ -1,61 +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" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "adbf13e88473af357032472ac09af1230667c5010089089a3c223819ef74c7f6" => :catalina - sha256 "8927c49aa4daba57ffab9a9ea332504346467cf22c137af3e1a16b859318a0f5" => :mojave - sha256 "af6d9cc097c4eb9c1719496b2e29593763b5b17b279ef4c234d681cfe4174b37" => :high_sierra - sha256 "07e2b05d9908a847c72950532d3ed12771c856365c8747c8c5917da9a5ea4413" => :sierra - sha256 "d2d5b14e9ac589c782307e058e06815ad2408bbcf418ac721d3fac3be8b832a7" => :el_capitan - sha256 "0d4176307ea18472c9da9a765bcb033e6256ae361d2e32b758b205a56dd7e38a" => :yosemite - sha256 "5fc509c660fc38b3484a093ce0894ee2e9c3ea3cccc43222071c4d8139975d8d" => :mavericks - 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 d0185d2c25dcd..0000000000000 --- a/Formula/vsts-cli.rb +++ /dev/null @@ -1,222 +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" - revision 2 - - bottle do - cellar :any - sha256 "b37f51f73b543f2c9403e0a982aa1ae625f170b971a75b1ab07a23a62aa01949" => :catalina - sha256 "27a52ac2afc49b4392804ce47984f8ea1986dde0a221d599d2f3afa0e93ca6b3" => :mojave - sha256 "59d1ccaa24e3356771bd998de79c226803957811170765933d5ca03f3547f99a" => :high_sierra - end - - depends_on "python@3.8" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - end - - 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-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 16ee55d663c15..0000000000000 --- a/Formula/vtclock.rb +++ /dev/null @@ -1,27 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "a9d8600f4ab8ef25a88f5778d4625ad04c7600b8770e08300193f2841451c6d4" => :catalina - 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/vte3.rb b/Formula/vte3.rb deleted file mode 100644 index c128905b1fbb6..0000000000000 --- a/Formula/vte3.rb +++ /dev/null @@ -1,146 +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.60/vte-0.60.3.tar.xz" - sha256 "feb76e1181a357d86112d447a08d127e2081438df76ece83243b18609dd9822a" - revision 1 - - bottle do - sha256 "783483804a85b6616bea1754e8c9f7695938eb34ce5ea86723b23221e508fcf2" => :catalina - sha256 "69ecc587660a67fa8138063a7152af533fa6dd9841a8b84021f78099380f043f" => :mojave - sha256 "a06d9e99ed510244171aaee721971bb9b7a2ac33c4dcfa354ec0b68e56b7bd2e" => :high_sierra - end - - depends_on "gobject-introspection" => :build - depends_on "meson" => :build - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "gnutls" - depends_on "gtk+3" - depends_on "pcre2" - depends_on "vala" - - # submitted upstream as https://gitlab.gnome.org/tschoonj/vte/merge_requests/1 - patch :DATA - - def install - ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" - - args = std_meson_args + %w[ - -Dgir=true - -Dgtk3=true - -Dgnutls=true - -Dvapi=true - -D_b_symbolic_functions=false - ] - - mkdir "build" do - system "meson", *args, ".." - system "ninja", "-v" - system "ninja", "install", "-v" - end - 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"] - harfbuzz = Formula["harfbuzz"] - 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#{harfbuzz.opt_include}/harfbuzz - -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 - -__END__ -diff --git a/meson.build b/meson.build -index e2200a75..df98872f 100644 ---- a/meson.build -+++ b/meson.build -@@ -78,6 +78,8 @@ lt_age = vte_minor_version * 100 + vte_micro_version - lt_revision - lt_current = vte_major_version + lt_age - - libvte_gtk3_soversion = '@0@.@1@.@2@'.format(libvte_soversion, lt_current, lt_revision) -+osx_version_current = lt_current + 1 -+libvte_gtk3_osxversions = [osx_version_current, '@0@.@1@.0'.format(osx_version_current, lt_revision)] - libvte_gtk4_soversion = libvte_soversion.to_string() - - # i18n -diff --git a/src/meson.build b/src/meson.build -index 79d4a702..0495dea8 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -224,6 +224,7 @@ if get_option('gtk3') - vte_gtk3_api_name, - sources: libvte_gtk3_sources, - version: libvte_gtk3_soversion, -+ darwin_versions: libvte_gtk3_osxversions, - include_directories: incs, - dependencies: libvte_gtk3_deps, - cpp_args: libvte_gtk3_cppflags, diff --git a/Formula/vtk.rb b/Formula/vtk.rb deleted file mode 100644 index 2391cc98fdd37..0000000000000 --- a/Formula/vtk.rb +++ /dev/null @@ -1,102 +0,0 @@ -class Vtk < Formula - desc "Toolkit for 3D computer graphics, image processing, and visualization" - homepage "https://www.vtk.org/" - revision 10 - head "https://github.com/Kitware/VTK.git" - - stable do - url "https://www.vtk.org/files/release/8.2/VTK-8.2.0.tar.gz" - sha256 "34c3dc775261be5e45a8049155f7228b6bd668106c72a3c435d95730d17d57bb" - - # Fix compile issues on Mojave and later - patch do - url "https://gitlab.kitware.com/vtk/vtk/commit/ca3b5a50d945b6e65f0e764b3138cad17bd7eb8d.diff" - sha256 "b9f7a3ebf3c29f3cad4327eb15844ac0ee849755b148b60fef006314de8e822e" - end - - # Python 3.8 compatibility - patch do - url "https://gitlab.kitware.com/vtk/vtk/commit/257b9d7b18d5f3db3fe099dc18f230e23f7dfbab.diff" - sha256 "572c06a4ba279a133bfdcf0190fec2eff5f330fa85ad6a2a0b0f6dfdea01ca69" - end - end - - bottle do - sha256 "37a13865cbf0c68db548b85f9577242b95a14c148db1c81548d82aac578fbf25" => :catalina - sha256 "4dee6ecbb7543786a57b9624df0b7bbe3bfe9686746a33d24c9233bfd7463d72" => :mojave - sha256 "d238bb0dbe69516d187cd31295d86c070ade51f4efae7c9bc41bdbe6f2e4d99b" => :high_sierra - end - - 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 "pyqt" - depends_on "python@3.8" - depends_on "qt" - - def install - pyver = Language::Python.major_minor_version "python3" - 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 - -DVTK_WRAP_PYTHON=ON - -DVTK_PYTHON_VERSION=3 - -DPYTHON_EXECUTABLE=#{Formula["python@3.8"].opt_bin}/python3 - -DVTK_INSTALL_PYTHON_MODULE_DIR=#{lib}/python#{pyver}/site-packages - -DVTK_QT_VERSION:STRING=5 - -DVTK_Group_Qt=ON - -DVTK_WRAP_PYTHON_SIP=ON - -DSIP_PYQT_DIR='#{Formula["pyqt5"].opt_share}/sip' - ] - - mkdir "build" do - system "cmake", "..", *args - system "make" - system "make", "install" - end - - # Avoid hard-coding HDF5's Cellar path - inreplace Dir["#{lib}/cmake/**/vtkhdf5.cmake"].first, - Formula["hdf5"].prefix.realpath, - Formula["hdf5"].opt_prefix - 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 771cff6cda1b6..0000000000000 --- a/Formula/vttest.rb +++ /dev/null @@ -1,23 +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-20200610.tgz" - sha256 "8b52bc63b0e19feb15e3a044f0814a73e4f43306dd93362f9ad8bd94d2a40105" - - bottle do - cellar :any_skip_relocation - sha256 "4ed2226713142cbe3358b35cc20b1b5f566e8a337593db770d395c47ce807d08" => :catalina - sha256 "150b0841791012479c9afda2f44511595d38685e7c4720a4a29c9298409a72be" => :mojave - sha256 "5bcfa979eae920e1e2e87da085ebd6060ee449fee35f464db1bfb86d4528c486" => :high_sierra - 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/vulkan-headers.rb b/Formula/vulkan-headers.rb deleted file mode 100644 index ffc48177b17c6..0000000000000 --- a/Formula/vulkan-headers.rb +++ /dev/null @@ -1,35 +0,0 @@ -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/v1.2.146.tar.gz" - sha256 "2b068692cedf549274bb6a314499d14a2a84ff83560cb26983c21c7e2422c253" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "966886b67f7e069c87bf960dbc979e026df0ea6f54097faa4e3c803d4be303c6" => :catalina - sha256 "966886b67f7e069c87bf960dbc979e026df0ea6f54097faa4e3c803d4be303c6" => :mojave - sha256 "966886b67f7e069c87bf960dbc979e026df0ea6f54097faa4e3c803d4be303c6" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - - int main() { - printf("vulkan version %d", VK_VERSION_1_0); - return 0; - } - EOS - system ENV.cc, "test.c", "-o", "test" - system "./test" - end -end diff --git a/Formula/vultr.rb b/Formula/vultr.rb deleted file mode 100644 index 6114930a5afe8..0000000000000 --- a/Formula/vultr.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Vultr < Formula - desc "Command-line tool for Vultr" - homepage "https://jamesclonk.github.io/vultr" - url "https://github.com/JamesClonk/vultr/archive/v2.0.1.tar.gz" - sha256 "928f6c3caf8149f836a609ec43a3d031f0206a8cba095e026535c33c390c1157" - license "MIT" - head "https://github.com/JamesClonk/vultr.git" - - bottle do - cellar :any_skip_relocation - sha256 "11edd7b69bd41bf11ceab87cc0353305612887f53ed2429ffe7034c0179f4dd5" => :catalina - sha256 "af7d3754f0136c4ed3f0067920c0351931df48f487457ba6f12741e745e636e4" => :mojave - sha256 "9384a5df861603c74301e8500d70c170f806348fbfdf5117b1c6d91bed7d26d2" => :high_sierra - sha256 "a49908fc98bd2c2e2322e1d9511352ece67dbedc02879c71811d82b7c9bdaa3e" => :sierra - 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 970498dd88947..0000000000000 --- a/Formula/w-calc.rb +++ /dev/null @@ -1,29 +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 "dfde02c6213c6eeeecaeae55d7ecaa7620ab5c86f346f9242c82899802901b8b" => :catalina - 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..7bc03e2ef3b0d --- /dev/null +++ b/Formula/w/w-calc.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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, mojave: "955d80417eea9747844f52b13d91005f207a869e04f49a4a8f1e1db7e8acfa74" + sha256 cellar: :any, high_sierra: "be1800e5bb6cbf1e8087a0310ba648ec80f5013081d8db1145011c2c826b3c0c" + sha256 cellar: :any, sierra: "f934e56de20012d05890525117377efd717ee9d1f09feada9cb41068791065ba" + sha256 cellar: :any, el_capitan: "f9b1cd0799ffed7d47cb467d6a9ba606208ec93f263180eb094713ef0bec2bfc" + 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..92e35510f9329 --- /dev/null +++ b/Formula/w/w3m.rb @@ -0,0 +1,54 @@ +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 + + bottle do + 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..f86fba1849646 --- /dev/null +++ b/Formula/w/wabt.rb @@ -0,0 +1,50 @@ +class Wabt < Formula + desc "Web Assembly Binary Toolkit" + homepage "https://github.com/WebAssembly/wabt" + url "https://github.com/WebAssembly/wabt.git", + tag: "1.0.37", + revision: "5e81f6aeddf94fd7743c8c2049f5084c74ff6ab1" + license "Apache-2.0" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "6ffe898ee2dc9eb43b14e61f74eaf8510d899d47c9ee5e8ce76ee52cc298bfa8" + sha256 cellar: :any, arm64_sonoma: "1fc9959612c3241b4a801f890b3b6be565da13c49b3982f7cbb28ccf407ef7ea" + sha256 cellar: :any, arm64_ventura: "e1e1cba32b34354946cd8c9e7e2253e2a4307b025ace9e1f8c50c2ee3eb1e16a" + sha256 cellar: :any, sonoma: "ff46dc276f1f820803a8a57e4d17ce7ac8823b9b30458b2d3f0becfe24f4c17b" + sha256 cellar: :any, ventura: "09d6ad8f29884e7a4d4851cee0785a966d522b97ce781f74d37b4ae54c0ad8e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "2d0bbcaa4302807b8ea7497e153268045f02814266954f008d6248564f4de58b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a9362ed0da8bc2db2e3b2d5febbd66fc61fb81f017568fb2b13b5d305aeea689" + 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..8a506f2c58c90 --- /dev/null +++ b/Formula/w/waffle.rb @@ -0,0 +1,63 @@ +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_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..009f8deeef147 --- /dev/null +++ b/Formula/w/wagyu.rb @@ -0,0 +1,38 @@ +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 + + 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..1c8655cffdcf9 --- /dev/null +++ b/Formula/w/wails.rb @@ -0,0 +1,38 @@ +class Wails < Formula + desc "Create beautiful applications using Go" + homepage "https://wails.io/" + url "https://github.com/wailsapp/wails/archive/refs/tags/v2.10.1.tar.gz" + sha256 "b070be6f9ac1e74f748cf68acc4a774d4f392d4a0992ea4967c73d4990b8b43f" + license "MIT" + head "https://github.com/wailsapp/wails.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eedfb70909484e5c4da70504dbcaa205bfef6216b7375ad6331a117f64855d68" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eedfb70909484e5c4da70504dbcaa205bfef6216b7375ad6331a117f64855d68" + sha256 cellar: :any_skip_relocation, arm64_ventura: "eedfb70909484e5c4da70504dbcaa205bfef6216b7375ad6331a117f64855d68" + sha256 cellar: :any_skip_relocation, sonoma: "ef05dad5de93685291443e22e2660fb36e916b4386d84f1340a7db0bf8003e1f" + sha256 cellar: :any_skip_relocation, ventura: "ef05dad5de93685291443e22e2660fb36e916b4386d84f1340a7db0bf8003e1f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b449adccd4326fd0fba4faf293798d7a3e3ab0f258616cbfc22fcc528b5496d" + 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/wait_on.rb b/Formula/w/wait_on.rb new file mode 100644 index 0000000000000..30382fd9faf3e --- /dev/null +++ b/Formula/w/wait_on.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "500c8192d5cc65f906844fcca12f837d1e498d396ac60f368c195cf773bb6d4d" + sha256 cellar: :any_skip_relocation, high_sierra: "ca2dfaf2a1449ae1066826846cbdc9963efb837277f258c57304669f8615ad0f" + sha256 cellar: :any_skip_relocation, sierra: "31a21b915c4f8d901ed5d51d14f3f2f81993ed07891832fdbfb314b7cc8599e5" + sha256 cellar: :any_skip_relocation, el_capitan: "f362694f30021c32557e23b5add36ac4bdfbcabc6056996c5d23fc125527d85d" + end + + depends_on "bsdmake" => :build + depends_on :macos # needs BSD kqueue + + 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/w/wakatime-cli.rb b/Formula/w/wakatime-cli.rb new file mode 100644 index 0000000000000..88c0c1ecd9494 --- /dev/null +++ b/Formula/w/wakatime-cli.rb @@ -0,0 +1,38 @@ +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.115.2", + revision: "58d267621ce91a5d0e31917fcccec5ea4e3ca07b" + license "BSD-3-Clause" + version_scheme 1 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2bc3cf34de1acd8b5f9bacbebb4717211b6b7d582276b5b70b3c0461530504b8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2bc3cf34de1acd8b5f9bacbebb4717211b6b7d582276b5b70b3c0461530504b8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2bc3cf34de1acd8b5f9bacbebb4717211b6b7d582276b5b70b3c0461530504b8" + sha256 cellar: :any_skip_relocation, sonoma: "a6d247a59e0637d7e9b19c7c4a45e6be18160fde0a70b9481592faaa44ca824e" + sha256 cellar: :any_skip_relocation, ventura: "a6d247a59e0637d7e9b19c7c4a45e6be18160fde0a70b9481592faaa44ca824e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5ef66eb94a84724a9d2cca6953bbc4728a2ad84cb6050644f89783bfe5308ea7" + 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..f30f44f511868 --- /dev/null +++ b/Formula/w/wakeonlan.rb @@ -0,0 +1,27 @@ +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" + + 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/wal2json.rb b/Formula/w/wal2json.rb new file mode 100644 index 0000000000000..7341052148531 --- /dev/null +++ b/Formula/w/wal2json.rb @@ -0,0 +1,58 @@ +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 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ec43557186dc322d7e038dbc6a9d2062296a13f8830952bbdb0c72d154c8a70b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0d9b4650f924f544a650ba786967a754b29a4971868b3dbd5ba9f47abd44f6cb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "03a5c4a6e4048d088a5a23aed0251a4cf05f86d271eb23f8c681c139f6336672" + sha256 cellar: :any_skip_relocation, sonoma: "4e53de38eccaf3a9a23587ea164b8723f68648c84d3c3017d362823daaacd113" + sha256 cellar: :any_skip_relocation, ventura: "1ac11a6eb237df8ffab44e8a903925e0896628a3ba78b31b919ea6a61d1b54e6" + sha256 cellar: :any_skip_relocation, arm64_linux: "d86989d3fc89bd67beea43908aeff1306132d88234f93e24aa2a9a952dd9ba33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44d6b43deefc69fbd0cb1df19957d8f827d74f49693d43ddd2df058ebb3bfb1f" + end + + depends_on "postgresql@14" => [:build, :test] + depends_on "postgresql@17" => [:build, :test] + + def postgresqls + deps.map(&:to_formula).sort_by(&:version).filter { |f| f.name.start_with?("postgresql@") } + end + + def install + 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..cc9e4deeb018f --- /dev/null +++ b/Formula/w/walk.rb @@ -0,0 +1,38 @@ +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_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..e80bb8941dbb5 --- /dev/null +++ b/Formula/w/wallpaper.rb @@ -0,0 +1,24 @@ +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.2.tar.gz" + sha256 "9c65948c8d023436609ca06c86bc887e5327457136b8540ef97857efee7954c2" + license "MIT" + head "https://github.com/sindresorhus/macos-wallpaper.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1428fc5b443d6a4b0b99844cdf398eea32fb89c4f4f121c16f4cfc73bd2a59bb" + 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..01e0b5f82e020 --- /dev/null +++ b/Formula/w/wally.rb @@ -0,0 +1,50 @@ +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" + + bottle do + 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..a24f731c2dd5e --- /dev/null +++ b/Formula/w/wandio.rb @@ -0,0 +1,56 @@ +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 + + bottle do + 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..a2c155802aa02 --- /dev/null +++ b/Formula/w/wangle.rb @@ -0,0 +1,96 @@ +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.04.28.00.tar.gz" + sha256 "2cd2a8eb2865569fe220b3893f7e9660fa5490fbe01950e4636017ecd34052e1" + license "Apache-2.0" + head "https://github.com/facebook/wangle.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "2c728f3412eb04ae1f57b9f48a7999be38c2e5b5619af4a8e83f25442c52156a" + sha256 cellar: :any, arm64_sonoma: "a220031b9317e43899d3688c4d101fc011ccb49e99d6953de96bc7b509bdf968" + sha256 cellar: :any, arm64_ventura: "58e88f35d1aa62e3c4eaf06c431a7911e159e29de8b039540d8afcc428599cb4" + sha256 cellar: :any, sonoma: "234f810ec0e9b78f61a626f2bb9f0443e1fd163b3fc1ac746ac2cf58e112c11e" + sha256 cellar: :any, ventura: "7f5d7506dd4a2c944f489f9aa44499ddfb043b17a8e51b2b35b06780979162f5" + sha256 cellar: :any_skip_relocation, arm64_linux: "82de85a21b870e4453552fe434229f5afe024f9380253d8de6613da462ae77ba" + sha256 cellar: :any_skip_relocation, x86_64_linux: "74e438c3fc30fdd864840af49f1e534f2709f21dd82fab0a4e513be201c90b72" + 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 + # libsodium has no CMake file but fizz runs `find_dependency(Sodium)` so fetch a copy from mvfst + resource "FindSodium.cmake" do + url "https://raw.githubusercontent.com/facebook/mvfst/v2024.09.02.00/cmake/FindSodium.cmake" + sha256 "39710ab4525cf7538a66163232dd828af121672da820e1c4809ee704011f4224" + end + (testpath/"cmake").install resource("FindSodium.cmake") + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.5) + project(Echo LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 17) + + 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..1f6ce7f5ada2d --- /dev/null +++ b/Formula/w/waon.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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, mojave: "22b3f3cc1a0796db2bf6b808b7157a2e1cacf30b6437998a9f5bdc9482bbfbf8" + sha256 cellar: :any, high_sierra: "5c3c49f0740bfcf9d34fd9468af3d9caa8f19c53ee1d25f8d69442d63859c9ab" + sha256 cellar: :any, sierra: "d7fd9859544bf3ccb739942f0db00928469356f4d82ab7848cdba2ae5c5e99e9" + sha256 cellar: :any, el_capitan: "6f09559eaf287022f280991b44b5f4e86435fafda167c97a78239602183a3758" + 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..ac6e8539f8bd3 --- /dev/null +++ b/Formula/w/wartremover.rb @@ -0,0 +1,39 @@ +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.3.3.tar.gz" + sha256 "c067f5b30f49c91a639622dc7f10fb8f5bf8e988a665a185f27ea143beb303d7" + 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: "acec7256e71f6503a1de7b7c340eaf0e461dfd4c0037fbc8c1e42b45f74916b1" + end + + depends_on "sbt" => :build + depends_on "openjdk" + + 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" + 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..07dfb9fed6710 --- /dev/null +++ b/Formula/w/wasi-libc.rb @@ -0,0 +1,110 @@ +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 + # Check the commit hash of `src/wasi-libc` corresponding to the latest tag at: + # https://github.com/WebAssembly/wasi-sdk + url "https://github.com/WebAssembly/wasi-libc/archive/574b88da481569b65a237cb80daf9a2d5aeaf82d.tar.gz" + version "25" + sha256 "7d11a801570972e7f32639eed3f8f7d0e997f276b3c85b7aa03283e1265e4b8e" + + resource "WASI" do + # Check the commit hash of `tools/wasi-headers/WASI` from the commit hash above. + url "https://github.com/WebAssembly/WASI/archive/59cbe140561db52fc505555e859de884e0ee7f00.tar.gz" + sha256 "fc78b28c2c06b64e0233544a65736fc5c515c5520365d6cf821408eadedaf367" + end + end + + livecheck do + url "https://github.com/WebAssembly/wasi-sdk.git" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "89f102505760c8d6b154f1574e619e2755e2fd7ff878596ec6c49ea5b62e4da1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "89f102505760c8d6b154f1574e619e2755e2fd7ff878596ec6c49ea5b62e4da1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "89f102505760c8d6b154f1574e619e2755e2fd7ff878596ec6c49ea5b62e4da1" + sha256 cellar: :any_skip_relocation, sonoma: "89f102505760c8d6b154f1574e619e2755e2fd7ff878596ec6c49ea5b62e4da1" + sha256 cellar: :any_skip_relocation, ventura: "89f102505760c8d6b154f1574e619e2755e2fd7ff878596ec6c49ea5b62e4da1" + sha256 cellar: :any_skip_relocation, arm64_linux: "f5c41b46943d6e2ca2dd20a049b8c6b7eb1aa67eac40b135673cf6eb65dad9b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bbe27ea11d50c62ecfba2922e3a4ff27b16f215eeae08738413ef7f9b01d2a95" + end + + depends_on "llvm" => [:build, :test] + depends_on "lld" => :test + depends_on "wasmtime" => :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("wasmtime #{testpath}/test") + end +end diff --git a/Formula/w/wasi-runtimes.rb b/Formula/w/wasi-runtimes.rb new file mode 100644 index 0000000000000..011f4d3d96eab --- /dev/null +++ b/Formula/w/wasi-runtimes.rb @@ -0,0 +1,224 @@ +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-20.1.4/llvm-project-20.1.4.src.tar.xz" + sha256 "a95365b02536ed4aef29b325c205dd89c268cba41503ab2fc05f81418613ab63" + license "Apache-2.0" => { with: "LLVM-exception" } + head "https://github.com/llvm/llvm-project.git", branch: "main" + + livecheck do + formula "llvm" + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "391ae3eb79a769f9e513a3c6a57031dd25414cfeec9bafd51df86e4aea18f4ca" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "dc9fe8b45f777019d37052127d84992e99b38d5dff60261b8191f8417cbd7e9d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4d88865762b1e19ad0c1daa2102c1ff3ee9db2e3e987b75d0d249e7029f2b718" + sha256 cellar: :any_skip_relocation, sonoma: "1307e3f9f706b9191fc48c65cc29e1497a82c0de1e28c247f4a3efe0b3c10e71" + sha256 cellar: :any_skip_relocation, ventura: "7462f7df0b2066fe27cbb15a08b156fec402a2524af96b3c18a9ce4f5a637c1d" + sha256 cellar: :any_skip_relocation, arm64_linux: "efa0d6d2be7f59aa7ad4ce63ddfe8c56dc8c6d96580b368bfb55d5dd0c310faf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f4d64efc2b42fc46a63a994e1e3bd2dfa04916312f2693dbc29074c052ab04cc" + 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}" + # 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[:threads] = target.end_with?("-threads") ? "ON" : "OFF" + 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=#{configuration.fetch(:threads)} + -DLIBCXX_HAS_PTHREAD_API:BOOL=#{configuration.fetch(:threads)} + -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_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=#{configuration.fetch(:threads)} + -DLIBCXXABI_HAS_PTHREAD_API:BOOL=#{configuration.fetch(:threads)} + -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..d19badd073c18 --- /dev/null +++ b/Formula/w/wasm-component-ld.rb @@ -0,0 +1,56 @@ +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.13.tar.gz" + sha256 "bd1f826cd4d0d47dba5fa55396c72bbab8b61f80b23a51a32b4b29e50ec172f8" + license "Apache-2.0" + head "https://github.com/bytecodealliance/wasm-component-ld.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4625a98ad289db904f504b84a0a669be54038d0ec7cfaeced83059000880d1c9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "955adfe1877b6a0e2b2b3dfd80bdcf3e5c12febc3da4f6b6542f4556e2e3c7d1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ff3de87611752b9c709f0da0ac4016f9ec8f90f7388d80078dbce027e8de0bf7" + sha256 cellar: :any_skip_relocation, sonoma: "a658eb833d3206a390e57d6a6235112dadd6da832ae2af23605fec0fb9a70ac0" + sha256 cellar: :any_skip_relocation, ventura: "539305753eb9610cf57236d6d98072957eee03d7c238ae7b2825cf2e3228450f" + sha256 cellar: :any_skip_relocation, arm64_linux: "5787094a06258ada03c8bf49f464ae6a8e69bddba0b0d92c02f7c88def5ccc9a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "732c31ceef2b2d4cfd129622854dd170733f4c5b58ae937eb9039dcc5ad2ffdc" + 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..f1b228b119fcf --- /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.2.0.tar.gz" + sha256 "93b6ba03f681e061967106046b1908631ee705312b9a6410f3baee7af7c6aac9" + 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, arm64_sequoia: "8c09d15112bc9ac42ab86ccc8baf1881ec3653a0d589dfad8a7aa41ae5f4d411" + sha256 cellar: :any, arm64_sonoma: "9b5b5ea15d69f031cd2d314a8bcf70d804c210280b330be3fb0034726cf36f75" + sha256 cellar: :any, arm64_ventura: "2e6ac37ea867c542514480907f9b0710e477c67dd286c1208930444da16582f4" + sha256 cellar: :any, sonoma: "92ed7cdc11f95b3d4be42b9b2878e9c66aae6f0c537be17fcb0731ded92a7dd2" + sha256 cellar: :any, ventura: "f4ba8cddef3b9e781ead80432292f6996a9f259c68b3696d8d1b3589f7f4250e" + sha256 cellar: :any_skip_relocation, arm64_linux: "f6da5ec11f4d8ac7985ef99003c52b7e82a1c0393a4db179fc463942e7b89f01" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f1c67ba32fefde0efd67412efe9853e03b47fb0a8cfd845d03a795d231e130a6" + 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 + ] + 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..9f13c939ae38f --- /dev/null +++ b/Formula/w/wasm-pack.rb @@ -0,0 +1,47 @@ +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_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..b38a45b19b431 --- /dev/null +++ b/Formula/w/wasm-tools.rb @@ -0,0 +1,48 @@ +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.230.0.tar.gz" + sha256 "4b41dd6228ad9d1643abc07cddb34533f03d285907f2c5f27124804fc3fc715e" + 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_sequoia: "af0dac552c9c4c970a62457018d2ef91cfe540603e7e1f23696e46666201a4b0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fb198aa667c8e15ba78067938cf009ef8fb5a2cbbbe26f5ba8c0bfde81db7aac" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3e8d6341a63af98ed98539c4a07c3b838d1966a5d9371e73952e124df52f01ff" + sha256 cellar: :any_skip_relocation, sonoma: "c2a575d52b32243b187bea904832e843132770186bf5d05ed48ab0c0aac80cf0" + sha256 cellar: :any_skip_relocation, ventura: "12f984055fa27a8e386140d4012e3ba2f39195cf549dd081fb8b9b73be901526" + sha256 cellar: :any_skip_relocation, arm64_linux: "de840542eb3d0e01b1ffef30a66115c067747b924067cda19321f36ccaab83a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8107e1055aa6204377e89367652b1e90efc956c430a1fd0c31dfb0df2ddd6686" + 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..64cb881cddb80 --- /dev/null +++ b/Formula/w/wasm3.rb @@ -0,0 +1,43 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e1474dcff8363a2a7dcb417ad9283451a35d4093b04b6ab3733322fff4e7ccd8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "680ffd68e28697616852a52512fb9f5554be62d626bead5fd48f88c1467e7c15" + sha256 cellar: :any_skip_relocation, arm64_ventura: "4c9cf7f5b53013777afa1f71208a33be93101782cd587b1b4820e6e734849260" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cb3038ca004157e4e7275ecfb3bce34d430651fda20dfe6044658bdb3c2b3afe" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "71dd2cacce7a57fca4255f6aa59bea0b03449d13334a2c98ba817401dc41da95" + sha256 cellar: :any_skip_relocation, sonoma: "29c820f142977e9bfd84e4b9c7b27e6bc48424f5379028bea718db0cca0d4c27" + sha256 cellar: :any_skip_relocation, ventura: "4e11dd228c6d8bdbd476174e43104fb3be6666f4af45dd43bab75a85c0bd4a64" + sha256 cellar: :any_skip_relocation, monterey: "1cf28d959d6624a6e63b26178e45df73bca24ce18647ff034fbd7ab72c46aafd" + sha256 cellar: :any_skip_relocation, big_sur: "e282401723657985765d781b1fc6b23ff47ca669fe12d7aba5efe4d5a5f75bab" + sha256 cellar: :any_skip_relocation, catalina: "bd63b2e2268796e20ef1a3b12fa8460bea3e37c954fc7ca1abd8d756d39361ed" + sha256 cellar: :any_skip_relocation, mojave: "43e49af5bf99efa53964ccfddffd2e8061ce3b1aac3707ea389ee1f19dd80fd7" + sha256 cellar: :any_skip_relocation, arm64_linux: "0534057fc60e61e909228ec2fac40229ddae5269e33d88d56154eff9645b473a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a1e99649702a2d0db3cf07442af0b960d04a194c62e4062e6a72012f41b5f81d" + end + + depends_on "cmake" => :build + + def install + system "cmake", "-S", ".", "-B", "build", *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..38d98b76b5595 --- /dev/null +++ b/Formula/w/wasmedge.rb @@ -0,0 +1,54 @@ +class Wasmedge < Formula + desc "Lightweight, high-performance, and extensible WebAssembly runtime" + homepage "https://wasmedge.org/" + license "Apache-2.0" + revision 2 + head "https://github.com/WasmEdge/WasmEdge.git", branch: "master" + + stable do + url "https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-0.14.1-src.tar.gz" + sha256 "e5a944975fb949ecda73d6fe80a86507deb2d0a221b2274338807b63758350b4" + + # Backport fix for LLVM 20 + patch do + url "https://github.com/WasmEdge/WasmEdge/commit/b63e201d46452453ee7c2acf07967cd292d7e3da.patch?full_index=1" + sha256 "5c7f335ef8c126fc7791c289eb9c53527e1649388eb6e160e524c4d756122eb0" + end + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "67f798b7219084dfa14096a1c91974f1252b3aa90b774292a4b2b09c9d257da9" + sha256 cellar: :any, arm64_sonoma: "e40488c2a5a64616f0abdad4e86056e67b417d46dd253deee1f9e8072a8b1be5" + sha256 cellar: :any, arm64_ventura: "0cf792cb183a9c9089f4ba8166565eb30d034fa8ec80e533a1121bc16151ff2e" + sha256 cellar: :any, sonoma: "f6aef7a20301de5044988aed305a9514758f450919daa23b69d8d6eaf09038ff" + sha256 cellar: :any, ventura: "1583bcaef8c69487b45ec5a4e5c0b77161e54a8f8e50cd30ab157d8c155b0520" + sha256 cellar: :any_skip_relocation, arm64_linux: "549aa7b97ccf0598a95b28c22515de2eb75f27cd33bafb8d586ba929417becdd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "78bc000a274f42631d0fdedbfa43a93c06522a929bb15ee3008cb460310045ff" + end + + depends_on "cmake" => :build + depends_on "fmt" + depends_on "lld" + depends_on "llvm" + depends_on "spdlog" + + uses_from_macos "zlib" + + on_linux do + depends_on "zstd" + end + + def install + system "cmake", "-S", ".", "-B", "build", *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..3b85822a06360 --- /dev/null +++ b/Formula/w/wasmer.rb @@ -0,0 +1,41 @@ +class Wasmer < Formula + desc "Universal WebAssembly Runtime" + homepage "https://wasmer.io/" + url "https://github.com/wasmerio/wasmer/archive/refs/tags/v5.0.4.tar.gz" + sha256 "e6f0df11dd4647fa3d9177ed298a6e3afd2b5be6ea4494c00c2074c90681ad27" + license "MIT" + head "https://github.com/wasmerio/wasmer.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "125ceff044fe590c81adf25dd1cd04d472b5649e8e54cbe122bca65579e9bbee" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e7323f35dd94c282210b5ea295257a7b6c1fc318f0dafd6ae4dea582b2ed8f62" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6bf51106be2fdb78fd06b11268fd10269c3dfe1c7fc1c67c84f84b195e3f7ead" + sha256 cellar: :any_skip_relocation, sonoma: "502738bb88139da09da3a9065cd1a2077abc8d2a538a6a023f0072882a5fd0fb" + sha256 cellar: :any_skip_relocation, ventura: "59019f8fd8d6e571cf0b2db906d773ca12904213150222508767c2ac554c646d" + sha256 cellar: :any_skip_relocation, arm64_linux: "54117ff9c51b46fe47f105210ff3a372ea637c003fda56a9b2ea747f66f285fe" + sha256 cellar: :any_skip_relocation, x86_64_linux: "10eb158e7950f7de195258ec2a41abc6d2f8dce12c0bd1050917328adb34623e" + end + + depends_on "cmake" => :build + depends_on "rust" => :build + depends_on "wabt" => :build + + on_linux do + depends_on "pkgconf" => :build + 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..086d8ab5783cf --- /dev/null +++ b/Formula/w/wasmtime.rb @@ -0,0 +1,176 @@ +class Wasmtime < Formula + desc "Standalone JIT-style runtime for WebAssembly, using Cranelift" + homepage "https://wasmtime.dev/" + url "https://github.com/bytecodealliance/wasmtime.git", + tag: "v32.0.0", + revision: "d3054950c67c340491f4f48021e58c11002e7513" + 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_sequoia: "6c78dc9e56cecbdf5033cd7cc179201a33158681149da05a4708aada3cd5d53e" + sha256 cellar: :any, arm64_sonoma: "eb5b2c6651ff4ca823fe9c84bb17e57460030675be9b982b61b2e8335bd31f57" + sha256 cellar: :any, arm64_ventura: "8b85ef018436d91fd0e857a9d32e954e6bb476510c5be840020679723103a8b2" + sha256 cellar: :any, sonoma: "a72d3acf6244c283078aef4422b5ff967bb33cc11490c77b7b65aae9f809e08a" + sha256 cellar: :any, ventura: "d09e60c5c81acecd3f24304953ddfcf5a8af6a4907a15fa4a99010487811266e" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0422d49e23eb8014e61c64dfb58d82be088a9d8bba26ba7031cd5508fd1d717" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3000b57085586c1ac6eaed965e931c4ea5b4d3ebf921aa88903e093ef292e099" + 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/watch-sim.rb b/Formula/w/watch-sim.rb new file mode 100644 index 0000000000000..447bc06a0b9ae --- /dev/null +++ b/Formula/w/watch-sim.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "c4f22fd7f296de0c9ace463d4a6b292212178e45a5c483201ee247cc9d33be75" + sha256 cellar: :any_skip_relocation, high_sierra: "79348a2b95cd3ad0398977a30e46a379cff2b7319941061eebd394342f90d8b2" + sha256 cellar: :any_skip_relocation, sierra: "4c0b4b9cf453585d826f3950eba375d8dea80194c50c8d5ab3a014dec9a49c0d" + sha256 cellar: :any_skip_relocation, el_capitan: "1a7666cc09ecf2228350ea766d0f8e3bd32ab545ac44d9b17b7dc42107c6f15d" + 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..c905624bda475 --- /dev/null +++ b/Formula/w/watch.rb @@ -0,0 +1,58 @@ +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_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..f92d2e848a5d5 --- /dev/null +++ b/Formula/w/watcher.rb @@ -0,0 +1,60 @@ +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.5.tar.gz" + sha256 "3d5c3809e7be28f06eb6b8d077cfb3fab4fd05ac653d2540643b05c93273803a" + license "MIT" + head "https://github.com/e-dant/watcher.git", branch: "release" + + bottle do + sha256 cellar: :any, arm64_sequoia: "71d27cb20d333bddbe57770a8b59aefa5646ce23eaa943b4d25ac0ce3fb49102" + sha256 cellar: :any, arm64_sonoma: "d5ebbf8298ddbdcc5394cc263ba4aadb5580717683c95c30145b159760d4aed4" + sha256 cellar: :any, arm64_ventura: "53157a0f1edf216242266fd6a9f7d0c8932d0ce54effc46f545bf54658c9e792" + sha256 cellar: :any, sonoma: "c7f39e92be6da2d9f7146e06c379eea38819886c6a39da7df10e4dd766550725" + sha256 cellar: :any, ventura: "18a9f158c5b2bdb1bdfb8ca6e1222a0990826234590fd4badca6c7a424b02585" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f56147c3c007a937ba7b42ad907f7492df64edd3ce054d064bfb96a98afb7f8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b48edcac1609f95123e313cd24069ffcc0f5de6aa10d594892d4492ffd3e54e" + 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..1730d5a6c7531 --- /dev/null +++ b/Formula/w/watchexec.rb @@ -0,0 +1,45 @@ +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.1.tar.gz" + sha256 "b4d8199ad4f697a43122769b321ecd52a9020bfe21e5cb960a857ef2734ef86a" + 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_sequoia: "c360742a453bd67041b9232ef195da53a9434ca201f6123f4fb9290e5b112777" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b67b36bf2fea573750c416d4ade109acc00e8a5cf9a3b90dca0a94fd81c30cd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "41f9f551acc5bc9aa23f6d9edc5f79d05c00fad08f33b8c695beb1d0f891053f" + sha256 cellar: :any_skip_relocation, sonoma: "b7d3fa058f57d7ff136a951c742b47be4cdb469a26ccac1397e3b0f203c53582" + sha256 cellar: :any_skip_relocation, ventura: "c5e2574346a581b7cc5274979c3acc71f063aa9d5f0d43cbe87c87266eda51e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "9e110f3effb551fdab477f68f6eba3d35aafb99e0e7bb9dc10cc9ca197f37965" + sha256 cellar: :any_skip_relocation, x86_64_linux: "650e64ccd5814aec58ce2556fbf5fcde0e1da8672039a5530c5b1fc80948e464" + 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..82437c2801a0a --- /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.04.28.00.tar.gz" + sha256 "22058559e8b68d953399a10d437cbcfc91787732e2980dd7298e1d6fb4cd2add" + license "MIT" + head "https://github.com/facebook/watchman.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "0414669aec53dcc09e0023f10dca34591da8f1379af31b28fb527d32e9c572fc" + sha256 cellar: :any, arm64_sonoma: "a68e3b0a210ba8045f78aabf026d46ab3f1b5ef625696a61eaa2941d96c53478" + sha256 cellar: :any, arm64_ventura: "ec0e1f689a0b9316486d30849b106cf0c7304eeb115eba30fe4cb9013ad7e410" + sha256 cellar: :any, sonoma: "adcbfa6dbd420f2ec03b0488942269c8731e98b2787d5256b3a718f51e65c7af" + sha256 cellar: :any, ventura: "d0df95b5446b30acef063bd8fb8156feeedb2b168becdd9bcc15a640d379b94e" + sha256 cellar: :any_skip_relocation, arm64_linux: "216d7bdde71408c7610f637e7ba51d26b6d56d75fa533f441a63cc8f558730ed" + sha256 cellar: :any_skip_relocation, x86_64_linux: "03f3d31e87e74134452004ecc7ac0960140422123cfd832b10e73f47a783a94e" + 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.13" + + 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.13")} + -DWATCHMAN_VERSION_OVERRIDE=#{version} + -DWATCHMAN_BUILDINFO_OVERRIDE=#{tap&.user || "Homebrew"} + -DWATCHMAN_STATE_DIR= + ] + # 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..53c054c3b8b87 --- /dev/null +++ b/Formula/w/watson.rb @@ -0,0 +1,89 @@ +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 6 + head "https://github.com/jazzband/Watson.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "479ecc469da915b26139b32fed053e032430f9c0116f47caeb7091984f091f4b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c036a73c69622ce25a9d2146211fba738857e43d619f959adff7912e686016d1" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f7e35a6890a1a5578f1f4359e60f76c66af23c753a63270a7e1cd932114d7176" + sha256 cellar: :any_skip_relocation, sonoma: "887e4dbd5b24eb0f0f405a6bd0cdc032443cfe1a2ed4dea860283f1050e9165c" + sha256 cellar: :any_skip_relocation, ventura: "a4c97c4889759dcda9394c15f596b92a5678f9967f70ec3910dc75ccd1e8e5e8" + sha256 cellar: :any_skip_relocation, arm64_linux: "74abc5e4e2f86ff0cb80b8cafca9d78543595311048949bb66fafd97cf401c88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b5eb01d458e69203120a5050be8056035f7a2b9473c5b2a57725d084e75f77d4" + end + + depends_on "certifi" + depends_on "python@3.13" + + 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/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "types-python-dateutil" do + url "https://files.pythonhosted.org/packages/31/f8/f6ee4c803a7beccffee21bb29a71573b39f7037c224843eff53e5308c16e/types-python-dateutil-2.9.0.20241003.tar.gz" + sha256 "58cb85449b2a56d6684e41aeefb4c4280631246a0da1a719bdbe6f3fb0317446" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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/w/wavpack.rb b/Formula/w/wavpack.rb new file mode 100644 index 0000000000000..bb8a4d6bb8bf0 --- /dev/null +++ b/Formula/w/wavpack.rb @@ -0,0 +1,52 @@ +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_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/waybackpy.rb b/Formula/w/waybackpy.rb new file mode 100644 index 0000000000000..c495ee0e98eb2 --- /dev/null +++ b/Formula/w/waybackpy.rb @@ -0,0 +1,54 @@ +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 6 + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, all: "3c04c3dc485bc958c532a3d094ffd407b390b69dae8b4af96b5d6c82ecc1de0b" + end + + depends_on "certifi" + depends_on "python@3.13" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz" + sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz" + sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"waybackpy", shells: [:fish, :zsh], 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..1187dd7a4dbe0 --- /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.44/downloads/wayland-protocols-1.44.tar.xz" + sha256 "3df1107ecf8bfd6ee878aeca5d3b7afd81248a48031e14caf6ae01f14eebb50e" + 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: "23c83933c00824c2d6d25b4008c7b566dbf964fa4f9c3a2ec42c2ffa967f9a2c" + 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..fb1a1194cf94b --- /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.23.1/downloads/wayland-1.23.1.tar.xz" + sha256 "864fb2a8399e2d0ec39d56e9d9b753c093775beadc6022ce81f441929a81e5ed" + 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: "82fbcf11a962ee831af7822eb2dc00a7adbc8139b65d34ec7bad9c1641e29d88" + sha256 x86_64_linux: "fa8a51b1ec926a84aab9b92585613a17bb6c8bcd7e8c56941db5e4b3c3f62a25" + 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/waypoint.rb b/Formula/w/waypoint.rb new file mode 100644 index 0000000000000..d61c505d2b523 --- /dev/null +++ b/Formula/w/waypoint.rb @@ -0,0 +1,55 @@ +class Waypoint < Formula + desc "Tool to build, deploy, and release any application on any platform" + homepage "https://www.waypointproject.io/" + # NOTE: Do not bump to v0.12.0+ as license changed to BUSL-1.1 + # https://github.com/hashicorp/waypoint/pull/4878 + # https://github.com/hashicorp/waypoint/pull/4888 + url "https://github.com/hashicorp/waypoint/archive/refs/tags/v0.11.4.tar.gz" + sha256 "e2526a621880fdc92c285250242532d2e9c5053fd53d2df9ad4ca7efa6b951a3" + license "MPL-2.0" + head "https://github.com/hashicorp/waypoint.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d2e806498a739c6cb8d80559fb39dc50809ac44e8eabec1a6ddd3897d6179865" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "5cb2babffdd9b657b72c097f1806e99654797855aa12c0f3d51fd3f4fb318064" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a4367345e7868f66e6a09973b4f4b6ca3ac6a677eb206aeb5ad2b110aee837fa" + sha256 cellar: :any_skip_relocation, arm64_monterey: "d55315b0a0f124132b146eb42ad222556c60e97c26b28975f1ac500fab5b2b53" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "c5ef5a5a7a1960ddcadbd0be2493bd49e22be1d36c65a54e1f9adf32397a98bb" + sha256 cellar: :any_skip_relocation, sonoma: "dfe641ec0be4e75d03d07b7e7c193b5e188e9ef61b83f379e9b351a095605b90" + sha256 cellar: :any_skip_relocation, ventura: "8d2da5fd33fa22a0293659aa8cf8c000acd2d0d48a8a7fe386e670f12e6e0b2b" + sha256 cellar: :any_skip_relocation, monterey: "b3ef9113241c9a4e247f7d92148737d391a1edc41a51428247846b02cb9d82db" + sha256 cellar: :any_skip_relocation, big_sur: "cd00a901000ca5d1b12439624fb77e37c69dd7d58316c937a2317162d8a4c24f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e2386f08d39846c93368dd3e3352ec6391d2215231280a746bf605261c9df2d5" + end + + # https://www.hashicorp.com/blog/hashicorp-adopts-business-source-license + disable! date: "2024-09-27", because: "will change its license to BUSL on the next release" + + depends_on "go" => :build + depends_on "go-bindata" => :build + + def install + system "make", "bin" + bin.install "waypoint" + end + + def caveats + <<~EOS + We will not accept any new Waypoint releases in homebrew/core (with the BUSL license). + The next release will change 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 + output = shell_output("#{bin}/waypoint context list") + assert_match "No contexts. Create one with `waypoint context create`.", output + + assert_match "! failed to create client: no server connection configuration found", + shell_output("#{bin}/waypoint server bootstrap 2>&1", 1) + + assert_match version.to_s, shell_output("#{bin}/waypoint version") + end +end diff --git a/Formula/w/wazero.rb b/Formula/w/wazero.rb new file mode 100644 index 0000000000000..00d9e5cf9090a --- /dev/null +++ b/Formula/w/wazero.rb @@ -0,0 +1,83 @@ +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_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, 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..c4c1d14eb5e52 --- /dev/null +++ b/Formula/w/wb32-dfu-updater_cli.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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" + + 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..f1e57d1c7f420 --- /dev/null +++ b/Formula/w/wcslib.rb @@ -0,0 +1,40 @@ +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_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..f68b36cabaf5e --- /dev/null +++ b/Formula/w/wcstools.rb @@ -0,0 +1,40 @@ +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 + + bottle do + 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/wcurl.rb b/Formula/w/wcurl.rb new file mode 100644 index 0000000000000..62c93d5b8dff3 --- /dev/null +++ b/Formula/w/wcurl.rb @@ -0,0 +1,27 @@ +class Wcurl < Formula + desc "Wrapper around curl to easily download files" + homepage "https://github.com/curl/wcurl" + url "https://github.com/curl/wcurl/archive/refs/tags/v2025.04.20.tar.gz" + sha256 "c40ccf365febca9115611db271b2d6705728fc7efb297df3f2eba70d3a97fa03" + license "curl" + head "https://github.com/curl/wcurl.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "00a0a131620bd6dfe94fa8df1179ff0b982cab055d30546c37c0cd16e3d23913" + end + + depends_on "curl" + + def install + inreplace "wcurl", "CMD=\"curl \"", "CMD=\"#{Formula["curl"].opt_bin}/curl\"" + bin.install "wcurl" + man1.install "wcurl.1" + end + + test do + assert_match version.to_s, shell_output(bin/"wcurl --version") + + system bin/"wcurl", "https://github.com/curl/wcurl/blob/main/wcurl.md" + assert_path_exists testpath/"wcurl.md" + end +end diff --git a/Formula/w/wdc.rb b/Formula/w/wdc.rb new file mode 100644 index 0000000000000..5f94212ede2b2 --- /dev/null +++ b/Formula/w/wdc.rb @@ -0,0 +1,71 @@ +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 + + bottle do + rebuild 1 + 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", + "-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..fbead039246da --- /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://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" + license "GPL-3.0-or-later" + revision 2 + + bottle do + 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 mojave: "89e0de3859b91c4dcdc4a9ac2ae4569f72cd472658e6d3dfa82e6acc919c68a1" + sha256 high_sierra: "579a8972310d39ac2e660f3114fc6d1536df7ad9f7659a9b00619cc7c50a2191" + sha256 sierra: "fcfe6296c4b9879895a4977274f56474faa84ca74c792866ea3149a2f02df553" + 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..2018310c3e267 --- /dev/null +++ b/Formula/w/weasyprint.rb @@ -0,0 +1,96 @@ +class Weasyprint < Formula + include Language::Python::Virtualenv + + desc "Convert HTML to PDF" + homepage "https://www.courtbouillon.org/weasyprint" + url "https://files.pythonhosted.org/packages/38/76/7f865f0019120be20276813097b5729b8487b93dd4aff339aa77ed8c7ad2/weasyprint-65.1.tar.gz" + sha256 "120281bdbd42ffaa7d7e5cedbe3182a2cef36ea5ad97fe9f357e43be6a1e58ea" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cb19a24a4ae05930d0e9569829598c313b81abc3c30330a488b2cf18c8c50e5f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "46eacde53c64bd14ddab0737f962a8254ed322a7825b08bbd9e6ddfab28099bb" + sha256 cellar: :any_skip_relocation, arm64_ventura: "abc7ccfa638b28bbd7215c148252bfdb38d2344c36fbf417cc05b7114b169a55" + sha256 cellar: :any_skip_relocation, sonoma: "cc783f64a91be14e3ba8eb986f463c3a87204aff040ad2e438ff75f309afc94b" + sha256 cellar: :any_skip_relocation, ventura: "4a2dda03c424995de22317715d54ab20dee50c2e5c0705c3125ee58383805557" + sha256 cellar: :any_skip_relocation, arm64_linux: "a9c4b5c226d70448bc68b2d4ff559a880ae710993604fca91091343abed92983" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5cf3e1a1d6c6bff570b8cec3e029951f06976f0dd0e803e5318c386efad2a427" + end + + depends_on "pango" + depends_on "pillow" + depends_on "python@3.13" + + uses_from_macos "libffi" + + 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/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz" + sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" + 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/03/2d/a9a0b6e3a0cf6bd502e64fc16d894269011930cabfc89aee20d1635b1441/fonttools-4.57.0.tar.gz" + sha256 "727ece10e065be2f9dd239d15dd5d60a66e17eac11aea47d447f9f03fdbc42de" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + 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..5bf17ebc53f3f --- /dev/null +++ b/Formula/w/weaver.rb @@ -0,0 +1,33 @@ +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_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..3797601493948 --- /dev/null +++ b/Formula/w/weaviate-cli.rb @@ -0,0 +1,190 @@ +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/6d/55/51608eb9c5005b81c62dd6c37f50451d262018caa4001a9f4f9b82033823/weaviate_cli-3.2.0.tar.gz" + sha256 "2f6476e25e04c2080eee6415dd817dd08a28887a268a5a54dbacbd2684ce60d7" + license "BSD-3-Clause" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sequoia: "782e5a5bca55ee7aef6eae6166b5b4876a2e55aff8e43f92191c0aff03c09d17" + sha256 cellar: :any, arm64_sonoma: "5bc1675d563f1c3b10704fd6ff777d66b29344af92527ebd508ad89b06c6eb29" + sha256 cellar: :any, arm64_ventura: "ce1bc3d2637612166ec57d0591ca8208849800400905c5a4df6f9b0af773eac2" + sha256 cellar: :any, sonoma: "62d62a3f94647c907baa3d2e95259222d50f37c270c3950a63bf0ac6fde1d686" + sha256 cellar: :any, ventura: "87a12d6d319144012bbb68bb71f27fa8ce04066026c0841cada8ae0aed587f17" + sha256 cellar: :any_skip_relocation, arm64_linux: "0f6784344aebd9817d83d84b629bbcf1dff5759a2c4567c96380a683afd4c320" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29b1bae93bad9289ce198479bd713397f8b4c769fca61cdf76b1c08444a4bb50" + end + + depends_on "ninja" => :build + depends_on "pkgconf" => :build + depends_on "rust" => :build + depends_on "certifi" + depends_on "cryptography" + depends_on "openssl@3" + depends_on "python@3.13" + + uses_from_macos "libffi" + + on_linux do + depends_on "patchelf" => :build + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "authlib" do + url "https://files.pythonhosted.org/packages/09/47/df70ecd34fbf86d69833fe4e25bb9ecbaab995c8e49df726dd416f6bb822/authlib-1.3.1.tar.gz" + sha256 "7ae843f03c06c5c0debd63c9db91f9fda64fa62a42a77419fa15fbb7e7a58917" + 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/ba/a6/b77f42021308ec8b134502343da882c0905d725a4d661c7adeaf7acaf515/faker-37.1.0.tar.gz" + sha256 "ad9dc66a3b84888b837ca729e85299a96b58fdaef0323ed0baace93c9614af06" + end + + resource "grpcio" do + url "https://files.pythonhosted.org/packages/d1/33/bf7bf9188cfce1c626e4c5d55523fec7f2f1d905e003df5da025f532916e/grpcio-1.72.0rc1.tar.gz" + sha256 "221793dccd3332060f426975a041d319d6d57323d857d4afc25257ec4a5a67f3" + end + + resource "grpcio-health-checking" do + url "https://files.pythonhosted.org/packages/8b/0e/62743c098e80dde057afc50f9d681a5ef06cfbd4be377801d0d7e2a0737d/grpcio_health_checking-1.71.0.tar.gz" + sha256 "ff9bd55beb97ce3322fda2ae58781c9d6c6fcca6a35ca3b712975d9f75dd30af" + end + + resource "grpcio-tools" do + url "https://files.pythonhosted.org/packages/05/d2/c0866a48c355a6a4daa1f7e27e210c7fa561b1f3b7c0bce2671e89cfa31e/grpcio_tools-1.71.0.tar.gz" + sha256 "38dba8e0d5e0fb23a034e09644fdc6ed862be2371887eee54901999e8f6792a8" + 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 "importlib-resources" do + url "https://files.pythonhosted.org/packages/cf/8c/f834fbf984f691b4f7ff60f50b514cc3de5cc08abfc3295564dd89c5e2e7/importlib_resources-6.5.2.tar.gz" + sha256 "185f87adef5bcc288449d98fb4fba07cea78bc036455dd44c5fc4a2fe78fed2c" + end + + resource "numpy" do + url "https://files.pythonhosted.org/packages/dc/b2/ce4b867d8cd9c0ee84938ae1e6a6f7926ebf928c9090d036fc3c6a04f946/numpy-2.2.5.tar.gz" + sha256 "a9c0d994680cd991b1cb772e8b297340085466a6fe964bc9d4e80f5e2f43c291" + 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/17/7d/b9dca7365f0e2c4fa7c193ff795427cfa6290147e5185ab11ece280a18e7/protobuf-5.29.4.tar.gz" + sha256 "4f1dfcd7997b31ef8f53ec82781ff434a28bf71d9102ddde14d076adcfc78c99" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + 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/44/80/97e25f0f1e4067677806084b7382a6ff9979f3d15119375c475c288db9d7/setuptools-80.0.0.tar.gz" + sha256 "c40a5b3729d58dd749c0f08f1a07d134fb8a0a3d7f87dc33e7c5e1f762138650" + 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/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + 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/64/07/91582d69320f6f6daaf2d8072608a4ad8884683d4840e7e4f3a9dbdcc639/validators-0.34.0.tar.gz" + sha256 "647fe407b45af9a74d245b943b18e6a816acf4926974278f6dd617778e1e781f" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + end + + resource "weaviate-client" do + url "https://files.pythonhosted.org/packages/5d/a6/e0a1634efa8bf0e761a6a146d5e822d527e3bc810074d582b979284fcf80/weaviate_client-4.14.1.tar.gz" + sha256 "fbac4dc73cb65d811865ebb8d42c2c14207cc192f51008009cb54b571e181d1a" + end + + def install + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"weaviate-cli", shells: [:fish, :zsh], 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..6aacd61590412 --- /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.30.3.tar.gz" + sha256 "6680c87953376b72c3325fe2757790fad745ea14e4a6fc78208140edcb5c8462" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c9d3bbbda72fa3a140fcc398d59ed75e64fe0704ac42e2f0a8f62b6a13d6a277" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c9d3bbbda72fa3a140fcc398d59ed75e64fe0704ac42e2f0a8f62b6a13d6a277" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c9d3bbbda72fa3a140fcc398d59ed75e64fe0704ac42e2f0a8f62b6a13d6a277" + sha256 cellar: :any_skip_relocation, sonoma: "431b95ebdb73b7eeafbdec3ffba86ecb5d91e69fb3a41763d7e689b059fa734c" + sha256 cellar: :any_skip_relocation, ventura: "431b95ebdb73b7eeafbdec3ffba86ecb5d91e69fb3a41763d7e689b059fa734c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cd05d35f5a837a0060328885d02f56331bd2c928c799674f72c03b715b1b0c96" + 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..848e68131e77b --- /dev/null +++ b/Formula/w/web-ext.rb @@ -0,0 +1,61 @@ +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-8.6.0.tgz" + sha256 "9dd91f59688eaf393d9747dd400ab2237707852b86625e89b4a7dcf54998a69b" + license "MPL-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "16d39dcfde70dec4e7e2b7b6e6ba843ef737228dd7b0a3320dba59225d00d328" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "16d39dcfde70dec4e7e2b7b6e6ba843ef737228dd7b0a3320dba59225d00d328" + sha256 cellar: :any_skip_relocation, arm64_ventura: "16d39dcfde70dec4e7e2b7b6e6ba843ef737228dd7b0a3320dba59225d00d328" + sha256 cellar: :any_skip_relocation, sonoma: "70aa1809d22b9f0eca46c8333f36bc8c889812ff93ab2c7ab482d1a53c87863d" + sha256 cellar: :any_skip_relocation, ventura: "70aa1809d22b9f0eca46c8333f36bc8c889812ff93ab2c7ab482d1a53c87863d" + sha256 cellar: :any_skip_relocation, arm64_linux: "9fb8fb6d672ec59260ebc2659da6565ea928d16ea5e537cedc00e5bb99687c11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9fb8fb6d672ec59260ebc2659da6565ea928d16ea5e537cedc00e5bb99687c11" + 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_equal <<~EOF, shell_output("#{bin}/web-ext lint").gsub(/ +$/, "") + Validation Summary: + + errors 0 + notices 0 + warnings 0 + + 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..08eae12bbbfa4 --- /dev/null +++ b/Formula/w/webarchiver.rb @@ -0,0 +1,31 @@ +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_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/webdis.rb b/Formula/w/webdis.rb new file mode 100644 index 0000000000000..8e725a1741c68 --- /dev/null +++ b/Formula/w/webdis.rb @@ -0,0 +1,57 @@ +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_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..2455972e7bacd --- /dev/null +++ b/Formula/w/webfs.rb @@ -0,0 +1,54 @@ +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 + + bottle do + rebuild 2 + 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://github.com/Homebrew/formula-patches/raw/0518a6d1ed821aebf0de4de78e39b57d6e60e296/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..de156a40457b4 --- /dev/null +++ b/Formula/w/webhook.rb @@ -0,0 +1,47 @@ +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_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, 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..1191b6b279268 --- /dev/null +++ b/Formula/w/webify.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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, mojave: "8a58b27bcb9d6f9cd611b8f7dfb6192f617854cfcaf8638b388f6dd88ec40f70" + sha256 cellar: :any_skip_relocation, high_sierra: "9701f9952fb05880c48c5ca26d14807cf324c2210d4b45d0fb5408243d8d76cc" + 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..b4ab1f0dfc682 --- /dev/null +++ b/Formula/w/webkitgtk.rb @@ -0,0 +1,155 @@ +class Webkitgtk < Formula + desc "GTK interface to WebKit" + homepage "https://webkitgtk.org/" + url "https://webkitgtk.org/releases/webkitgtk-2.48.2.tar.xz" + sha256 "ec58f6dfc25d3b360388e192f865068d69aab09b4d7df021f90e314d2fa54f37" + 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: "258067cbfa8db81af7bd585946a4a6620bbb73ca2f4a046fe896248d30817d5d" + sha256 x86_64_linux: "6de1424ad7bc7f0daab58ab47cac1c8640433283a537e14d0b66ccda9414c439" + 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.13" => :build + depends_on "ruby" => :build + depends_on "unifdef" => :build + depends_on "at-spi2-core" + depends_on "cairo" + depends_on "enchant" + 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.13")} + ] + + 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..59d934eb65614 --- /dev/null +++ b/Formula/w/webp-pixbuf-loader.rb @@ -0,0 +1,81 @@ +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" + + bottle do + rebuild 1 + 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..a8911885860fc --- /dev/null +++ b/Formula/w/webp.rb @@ -0,0 +1,50 @@ +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.5.0.tar.gz" + sha256 "7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c" + 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_sequoia: "700e1f0c8a32f99de402e714237c786191c5ef782b8639b2f2b1c5794b025825" + sha256 cellar: :any, arm64_sonoma: "121c8d526d62724c65ca82ad99a2edfa56bf7aeb6a69a231399e0faab96cad1f" + sha256 cellar: :any, arm64_ventura: "a0ce31323770314c805a305cccb2e30f2a0f04d461842448de9d569f5baa6306" + sha256 cellar: :any, sonoma: "18e9cdc6a27311b71e215cfc392f4d2b032a8f9f43b80b65dc920ed1bccbbc34" + sha256 cellar: :any, ventura: "6df9e02a753aabd2aa0a1096ad30a2460ff87c86e8bb0b9dd0562cbd74c03bb2" + sha256 cellar: :any_skip_relocation, arm64_linux: "44e567d1e031c4de42c3a28df42a2a46a09bef581606b49c1ce19c6496b3d3d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04808907272edc079436cb1e6cec57021d17007d0df49842158865e2ff48f601" + 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..c6b3d927f98bc --- /dev/null +++ b/Formula/w/webpack.rb @@ -0,0 +1,62 @@ +require "json" + +class Webpack < Formula + desc "Bundler for JavaScript and friends" + homepage "https://webpack.js.org/" + url "https://registry.npmjs.org/webpack/-/webpack-5.99.8.tgz" + sha256 "0476665eee672dc56cffc7338ee02d99ccf3c973780f304a02ff40e0d4850ee3" + license "MIT" + head "https://github.com/webpack/webpack.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "9f4b4ce9af0d015e07555b475d2c8c9bc8577ad214a43a2634e6512f0619e660" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9f4b4ce9af0d015e07555b475d2c8c9bc8577ad214a43a2634e6512f0619e660" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9f4b4ce9af0d015e07555b475d2c8c9bc8577ad214a43a2634e6512f0619e660" + sha256 cellar: :any_skip_relocation, sonoma: "b002daa84eaf9b68095b78a0925b04c40c63ce68f95571c0869b9dfbef3dfdd8" + sha256 cellar: :any_skip_relocation, ventura: "b002daa84eaf9b68095b78a0925b04c40c63ce68f95571c0869b9dfbef3dfdd8" + sha256 cellar: :any_skip_relocation, arm64_linux: "9f4b4ce9af0d015e07555b475d2c8c9bc8577ad214a43a2634e6512f0619e660" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9f4b4ce9af0d015e07555b475d2c8c9bc8577ad214a43a2634e6512f0619e660" + 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..c7fc4f0981f1c --- /dev/null +++ b/Formula/w/webpod.rb @@ -0,0 +1,26 @@ +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" + + 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..373574b91e1f0 --- /dev/null +++ b/Formula/w/websocat.rb @@ -0,0 +1,37 @@ +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_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 + + 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..068d22e868aa6 --- /dev/null +++ b/Formula/w/websocketd.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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, mojave: "28f0108f697e146faec81782988e8fd8bd7162b11e7703578f752f7a51f2b6db" + 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..f2f5f9000a9f5 --- /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 1 + sha256 arm64_sequoia: "eb96a6e72f8c04344827b1d098938557cc110c58086e09e725bb6baa2c4f5439" + sha256 arm64_sonoma: "e0d8b93558e6684dd9b06357cdaec1bf680f34e825cda653e981674c6c31e796" + sha256 arm64_ventura: "abe70e531a96d75b7ce514492dd43605e27b9276d210601f31a32624fe72af8c" + sha256 sonoma: "fbe60e713aca44e2adc2ae4d50f2d93f6053047a90820c3ae620e142916180b0" + sha256 ventura: "3f1f6158f5f07a5fce88a6c6497596da89c17fe438a761332921e4346c227f15" + sha256 arm64_linux: "97429c5667c198d2fdad6ad7545e278cef826f3e160117e6a9c172ad73cce69f" + sha256 x86_64_linux: "c36c64165586a9af662fa923e602821e649bee2a5fda5563c5de109e6429a9c1" + end + + 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" + + # Delete files that references to the Homebrew shims directory + sb = nm/"node-datachannel/build" + rm [ + sb/"CMakeFiles/CMakeConfigureLog.yaml", + sb/"CMakeFiles/rules.ninja", + sb/"CMakeFiles/#{Formula["cmake"].version}/CMakeCXXCompiler.cmake", + sb/"CMakeFiles/#{Formula["cmake"].version}/CMakeCCompiler.cmake", + sb/"_deps/libdatachannel-subbuild/CMakeLists.txt", + sb/"_deps/libdatachannel-subbuild/libdatachannel-populate-prefix/tmp/libdatachannel-populate-gitclone.cmake", + sb/"_deps/libdatachannel-subbuild/libdatachannel-populate-prefix/tmp/libdatachannel-populate-gitupdate.cmake", + sb/"CMakeCache.txt", + ] + + # 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/announce", + "udp://tracker.archlinux.org:6969" + ], + "infoHash": "9eae210fe47a073f991c83561e75d439887be3f3", + "name": "archlinux-2017.02.01-x86_64.iso", + "announce": [ + "https://tracker.archlinux.org/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..e1e54c9a2ea3d --- /dev/null +++ b/Formula/w/weechat.rb @@ -0,0 +1,73 @@ +class Weechat < Formula + desc "Extensible IRC client" + homepage "https://weechat.org/" + url "https://weechat.org/files/src/weechat-4.6.3.tar.xz" + sha256 "5c0b5efa969b873c4be582019b18523ee403e7430b8223825bcdb44a89f5815d" + license "GPL-3.0-or-later" + head "https://github.com/weechat/weechat.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "b333b588588d4d5d7f7c14be493a09f0c541639add4e69f180fb74e9cb029fad" + sha256 arm64_sonoma: "34049148e5e982ce687c01fed23e89a6ae5eeccee8251f59e9fa3c787f42749c" + sha256 arm64_ventura: "650d7c6c78c2b7bb8310e5f8ef99e4e292bdc76e7a0059fa78b5c409f1c5f8d2" + sha256 sonoma: "14b00b6ab38361c24c665060103b64c7d9ecd5a3c6e01342d5cbfccd31f8cb22" + sha256 ventura: "1cac654fd2c809f30e6019a4b71b78592d587297c9e5e066dc34d8bafcaa6338" + sha256 arm64_linux: "3a38a63283d50f8d0eefc5fbc7bd0c65d8c8be35f5e00d0de3ca7c76c6700acb" + sha256 x86_64_linux: "39721b0a72bea7690cb0d0552ca338deb24f4336f64a0e3168a24cb19e340a45" + 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.13" + depends_on "ruby" + depends_on "zstd" + + uses_from_macos "curl" + uses_from_macos "tcl-tk" + uses_from_macos "zlib" + + on_macos do + depends_on "gettext" + depends_on "libgpg-error" + end + + def python3 + which("python3.13") + end + + def install + pyver = Language::Python.major_minor_version python3 + # Help pkgconf find python as we only provide `python3-embed` for aliased python formula + inreplace "cmake/FindPython.cmake", " python3-embed ", " python-#{pyver}-embed " + + args = %W[ + -DENABLE_MAN=ON + -DENABLE_GUILE=OFF + -DCA_FILE=#{Formula["gnutls"].pkgetc}/cert.pem + -DENABLE_JAVASCRIPT=OFF + -DENABLE_PHP=OFF + ] + + if OS.linux? + args << "-DTCL_INCLUDE_PATH=#{Formula["tcl-tk"].opt_include}/tcl-tk" + args << "-DTK_INCLUDE_PATH=#{Formula["tcl-tk"].opt_include}/tcl-tk" + end + + 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..b37073b9d7449 --- /dev/null +++ b/Formula/w/weggli.rb @@ -0,0 +1,35 @@ +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" + + bottle do + rebuild 1 + 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..ee773d8a11c61 --- /dev/null +++ b/Formula/w/wego.rb @@ -0,0 +1,30 @@ +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_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, 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..dea2fafc4fb47 --- /dev/null +++ b/Formula/w/weighttp.rb @@ -0,0 +1,34 @@ +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_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/wellington.rb b/Formula/w/wellington.rb new file mode 100644 index 0000000000000..c22106e14d518 --- /dev/null +++ b/Formula/w/wellington.rb @@ -0,0 +1,44 @@ +class Wellington < Formula + desc "Project-focused tool to manage Sass and spriting" + homepage "https://github.com/wellington/wellington" + url "https://github.com/wellington/wellington/archive/refs/tags/v1.0.5.tar.gz" + sha256 "e2379722849cdd8e5f094849290aacba4b789d4d65c733dec859565c728e7205" + license "Apache-2.0" + head "https://github.com/wellington/wellington.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e4f2c4f169fbf4616d15989a2bfa0bed5447e1cb86be630b546c757ac79713e3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7141518809cbba8d42a2ff794af1fab87c327748020ae47d148f78ef3fdad0ad" + sha256 cellar: :any_skip_relocation, arm64_monterey: "f247dbeda01b8853ec7c6bc57fe172ffc8f3c65be366623fe11c1583f75a725c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "27f36c238e415ad9209494e1760b9bcb64fddc52fd45c8b7a4cd218e603e6503" + sha256 cellar: :any_skip_relocation, sonoma: "be1e2e29af21bb7ee97405124bd88c3cd96addfd03029eb16b0e7795766c9817" + sha256 cellar: :any_skip_relocation, ventura: "fb33ee897dbb2534defdf1cd8e37b2cded9404c2c6e3c337cb292cbfec7f3fec" + sha256 cellar: :any_skip_relocation, monterey: "712fce49467b7fdaf6a2113bd61bd35b067dedaa3021914ce1b1654d7e8ea416" + sha256 cellar: :any_skip_relocation, big_sur: "1042d237d74c534c987e63bb1e4eef6ec4070a1c9b080e52283d65c5edd9e40a" + sha256 cellar: :any_skip_relocation, catalina: "9aaeb3a098cbee88efc4e60d1edbfec242d6b2271f821b4d096fe6acb3d16987" + sha256 cellar: :any_skip_relocation, mojave: "a49538429713f2f7b979ab533d4231de84140d9e4e63b5658941552c1c99117a" + sha256 cellar: :any_skip_relocation, high_sierra: "53a61eeebc1e787fa7870437ce089276c5f1daad26430078e988d1b6aa50c7b8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1efe7a942728970650560a933ba9344e79cf5a63e96c18553cef995ab77445ef" + end + + # upstream go1.20 support report, https://github.com/wellington/wellington/issues/223 + disable! date: "2024-08-24", because: :unmaintained + + # Bump to 1.20 on the next release, if possible. + depends_on "go@1.19" => :build + + def install + ldflags = "-X github.com/wellington/wellington/version.Version=#{version}" + system "go", "build", *std_go_args(output: bin/"wt", ldflags:), "wt/main.go" + 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/w/wemux.rb b/Formula/w/wemux.rb new file mode 100644 index 0000000000000..e1e71778bcacb --- /dev/null +++ b/Formula/w/wemux.rb @@ -0,0 +1,43 @@ +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" + + 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..5ca2dd4b7fa67 --- /dev/null +++ b/Formula/w/werf.rb @@ -0,0 +1,90 @@ +class Werf < Formula + desc "Consistent delivery tool for Kubernetes" + homepage "https://werf.io/" + url "https://github.com/werf/werf/archive/refs/tags/v2.35.10.tar.gz" + sha256 "c062f38515f2610735bac0b6a19fdd98d93eae858042d7bf8f8511a0fcd78298" + 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_sequoia: "17e5369be16a415a90e366d62647a4875cc516ca74ea93ddb4131376a230efb3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4f13ceaffd6153a50fe4c69b47f2fa086b309d4a533f86e483a781bf6b7786e8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9587f38cb1073aa9bf29cf1faf32845348133a2d23a5bc9afb0ae6a673f5cc35" + sha256 cellar: :any_skip_relocation, sonoma: "f909e043787643473be746cfdf873f313261e3243f7ec7714e0fc684966a869f" + sha256 cellar: :any_skip_relocation, ventura: "6e98baf03e039ae493002d390848c14de81824baeb87d42287002b5156f90358" + sha256 cellar: :any_skip_relocation, arm64_linux: "9dd36c4b3584fabbf31d3a173f05cbe018a531b0391a9de3c30cc0d04b39c3c1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "857d29db677dff2a35146c58ce4afe314aa47e384a119238ac0953de193ed771" + end + + depends_on "go" => :build + + on_linux do + depends_on "pkgconf" => :build + depends_on "btrfs-progs" + depends_on "device-mapper" + end + + def install + 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: vote + - image: result + - 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") + + 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..6ac3633515317 --- /dev/null +++ b/Formula/w/west.rb @@ -0,0 +1,85 @@ +class West < Formula + include Language::Python::Virtualenv + + desc "Zephyr meta-tool" + homepage "https://github.com/zephyrproject-rtos/west" + url "https://files.pythonhosted.org/packages/d1/aa/288fc09dee13631538ad040d1b8e09f78594cdf3b53ff869c283d245bf20/west-1.3.0.tar.gz" + sha256 "89320034be87099d16e75f4760ac0d1ed67e8978928e468ab993e3fba0cfe92f" + license "Apache-2.0" + head "https://github.com/zephyrproject-rtos/west.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "a7e90cf09480586a0c371b073e2b38891366736eecaeebe9f3e91759a7fb3fb8" + sha256 cellar: :any, arm64_sonoma: "7aadc8d72a06988cd62a46a31451342a85d6742f25a6cc67dc4a6206b39c85f9" + sha256 cellar: :any, arm64_ventura: "1b1959d3f049e5066f2d4684e2809737f6ab6fb3024721dfc119677ab77b5c13" + sha256 cellar: :any, sonoma: "34fb4e2475d78f26ff2e85963ed28f684ef08506c25ff9e9e77862b274f8aa22" + sha256 cellar: :any, ventura: "67d947b4729195aa8c691a0f95e98ac5c460a8e0f3e5784d45942431c56bcb3f" + sha256 cellar: :any_skip_relocation, arm64_linux: "fd813f30adf6ddca04a74b5d944c133558da0204df7e552b74e1faa37d11ddf9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "927b092bb4e31b4acf172eec7e236d4b99179575683d604eca51229fc92ed9af" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + end + + resource "ruamel-yaml" do + url "https://files.pythonhosted.org/packages/29/81/4dfc17eb6ebb1aac314a3eb863c1325b907863a1b8b1382cdffcb6ac0ed9/ruamel.yaml-0.18.6.tar.gz" + sha256 "8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/ed/22/a438e0caa4576f8c383fa4d35f1cc01655a46c75be358960d815bfbb12bd/setuptools-75.3.0.tar.gz" + sha256 "fba5dd4d766e97be1b1681d98712680ae8f2f26d7881245f2ce9e40714f1a686" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + 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..f2573ca2d59b4 --- /dev/null +++ b/Formula/w/wfa2-lib.rb @@ -0,0 +1,37 @@ +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_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..32ad3034652ed --- /dev/null +++ b/Formula/w/wgcf.rb @@ -0,0 +1,29 @@ +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.26.tar.gz" + sha256 "386e8ec5985d86ab25588070a737f761a6687127162dcc990370bf77eb108c1d" + license "MIT" + head "https://github.com/ViRb3/wgcf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a18a9be7728fa9991d8660ebbde60480eac1581745ccd2ef138fc3adec3e222d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a18a9be7728fa9991d8660ebbde60480eac1581745ccd2ef138fc3adec3e222d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a18a9be7728fa9991d8660ebbde60480eac1581745ccd2ef138fc3adec3e222d" + sha256 cellar: :any_skip_relocation, sonoma: "c69cf8f52b21d05a02018760e7e70a6ec447b65329597abf6f50134c9da90491" + sha256 cellar: :any_skip_relocation, ventura: "c69cf8f52b21d05a02018760e7e70a6ec447b65329597abf6f50134c9da90491" + sha256 cellar: :any_skip_relocation, x86_64_linux: "cff3bea8aef5fd2cc1e8b75d55e08e6c047bacd4c21e44c18ade6f0bc94e4565" + 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..403cccb72c928 --- /dev/null +++ b/Formula/w/wget.rb @@ -0,0 +1,57 @@ +class Wget < Formula + desc "Internet file retriever" + homepage "https://www.gnu.org/software/wget/" + url "https://ftp.gnu.org/gnu/wget/wget-1.25.0.tar.gz" + sha256 "766e48423e79359ea31e41db9e5c289675947a7fcf2efdcedb726ac9d0da3784" + license "GPL-3.0-or-later" + + bottle do + 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..63345ccf93575 --- /dev/null +++ b/Formula/w/wget2.rb @@ -0,0 +1,70 @@ +class Wget2 < Formula + desc "Successor of GNU Wget, a file and recursive website downloader" + homepage "https://gitlab.com/gnuwget/wget2" + url "https://ftp.gnu.org/gnu/wget/wget2-2.2.0.tar.gz" + sha256 "2b3b9c85b7fb26d33ca5f41f1f8daca71838d869a19b406063aa5c655294d357" + license "GPL-3.0-or-later" + + livecheck do + url :stable + regex(/href=.*?wget2[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "477e456159a939aa933ea526619577425aa08eefa1c4dd13b90b83f2701c905e" + sha256 arm64_sonoma: "5288526cde424fc1e81ae4add33585d7a70539a0e7dd0f3da0a0b38fd4cee47d" + sha256 arm64_ventura: "bc2c0f6366d82d759f2171f14fac1101e545e138f0008f30166b381d410c98ad" + sha256 sonoma: "e1cac6e4fe46311120be862c3aebe2ee0d452f5da01df5bc6cebeec8fb540af0" + sha256 ventura: "6f1f601644a2a7a7acdb1f4d0d7de04e26430f58c80ac9752506b200e3600fba" + sha256 arm64_linux: "d845a7c0972eda3799babc84d0a3bfbba8d593fd6bbc9ddea8f4d003e497f5cb" + sha256 x86_64_linux: "6a577c25a6df35a432534aef3a9f59e040792b1ce92055a952b1ba9e43aca1c7" + 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..1428a93ec0c0e --- /dev/null +++ b/Formula/w/wgetpaste.rb @@ -0,0 +1,22 @@ +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" + + 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..615845860a796 --- /dev/null +++ b/Formula/w/wgo.rb @@ -0,0 +1,28 @@ +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.5.11.tar.gz" + sha256 "43da88bf03296dc8c47d7309dc15d2121fac303e4d78a0db5882363748d4ad12" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "a078b99cb9070cef3a7ea6cb635fb0df507265703baf8796876862265d1e1143" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a078b99cb9070cef3a7ea6cb635fb0df507265703baf8796876862265d1e1143" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a078b99cb9070cef3a7ea6cb635fb0df507265703baf8796876862265d1e1143" + sha256 cellar: :any_skip_relocation, sonoma: "6f955a8850bb8e4f19f8acf3712dcb2c70a082854a9f10c0f229a351b630de16" + sha256 cellar: :any_skip_relocation, ventura: "6f955a8850bb8e4f19f8acf3712dcb2c70a082854a9f10c0f229a351b630de16" + sha256 cellar: :any_skip_relocation, arm64_linux: "be7b9766825d6a3f188eb24e23e076861a3131ccf80cb8653c3d4507a7200956" + sha256 cellar: :any_skip_relocation, x86_64_linux: "952cccc76bb62762cfda6e256a1baff764172cf33c61b200647ef18a70282049" + 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/whalebrew.rb b/Formula/w/whalebrew.rb new file mode 100644 index 0000000000000..6e5028037a772 --- /dev/null +++ b/Formula/w/whalebrew.rb @@ -0,0 +1,45 @@ +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_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, 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 + 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..602b1bfb37e10 --- /dev/null +++ b/Formula/w/whatmask.rb @@ -0,0 +1,51 @@ +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, mojave: "a3a5a8887d1c7d43f83bf99c2f81f8900af0d83091978f5aac28447d0f093785" + 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..7d454444c2dbf --- /dev/null +++ b/Formula/w/when.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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..8fab7ce6d69e7 --- /dev/null +++ b/Formula/w/whisper-cpp.rb @@ -0,0 +1,71 @@ +class WhisperCpp < Formula + desc "Port of OpenAI's Whisper model in C/C++" + homepage "https://github.com/ggerganov/whisper.cpp" + url "https://github.com/ggerganov/whisper.cpp/archive/refs/tags/v1.7.5.tar.gz" + sha256 "2fda42b57b7b8427d724551bd041616d85401fb9382e42b0349132a28920a34f" + license "MIT" + head "https://github.com/ggerganov/whisper.cpp.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "60f2a5715f633cdb5a86adb6ccf8e4dc553c5b5e97839019d4edfb3151993da9" + sha256 cellar: :any, arm64_sonoma: "1fa55cf16d944d91ddb145c592bb9327a262124ab9b93e9e32191e728a0d05c8" + sha256 cellar: :any, arm64_ventura: "6029b6487ab798002960ce9d37488a2dece0fa0706f87b773d30a8dc5fb61357" + sha256 cellar: :any, sonoma: "8f43095a43f99de996b6c5d45319022cc27b9ac75774dd3b201e0a7fb3602dbc" + sha256 cellar: :any, ventura: "3eedd879a4ae545461f70d1c2b7c4e318e5696fdaf7fde8d2dcfc56281d1fcf5" + sha256 cellar: :any_skip_relocation, arm64_linux: "806baa21a25b3ca1fe8b1a69e201bdf34fce95e9bfa0ddd6a118037099f31c30" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9e5f09c4f11f4b1507f4d726c208523b4a1f360d11e454ee3c273b427cad2fc7" + end + + depends_on "cmake" => :build + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath(target: prefix/"libinternal")} + -DGGML_METAL=#{(OS.mac? && !Hardware::CPU.intel?) ? "ON" : "OFF"} + -DGGML_METAL_EMBED_LIBRARY=#{OS.mac? ? "ON" : "OFF"} + -DGGML_NATIVE=#{build.bottle? ? "OFF" : "ON"} + -DWHISPER_BUILD_EXAMPLES=ON + -DWHISPER_BUILD_TESTS=OFF + -DWHISPER_BUILD_SERVER=OFF + ] + + # avoid installing libggml libraries to "lib" since they would conflict with llama.cpp + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args(install_libdir: "libinternal") + system "cmake", "--build", "build" + system "cmake", "--install", "build" + # avoid publishing header files since they will conflict with llama.cpp + rm_r include + + # for backward compatibility with existing installs + (bin/"whisper-cpp").write <<~SHELL + #!/bin/bash + here="${BASH_SOURCE[0]}" + echo "${BASH_SOURCE[0]}: warning: whisper-cpp is deprecated. Use whisper-cli instead." >&2 + exec "$(dirname "$here")/whisper-cli" "$@" + SHELL + + 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 + end +end diff --git a/Formula/w/whisperkit-cli.rb b/Formula/w/whisperkit-cli.rb new file mode 100644 index 0000000000000..07a13d2c40e29 --- /dev/null +++ b/Formula/w/whisperkit-cli.rb @@ -0,0 +1,35 @@ +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.12.0.tar.gz" + sha256 "4ca4da6ad191f8582477aaf361034196a14f21f1949ebfeb162ee55a4582fe6a" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2c7c43d484d7b2d286202c63cc6993d4b30798b0cad55297d69e48f6d03b69a8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4d7e9081292429e219e69b17565102de55dc344d2733bff941658ed5589b8761" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a57bdecfcb3544967fac49cde1cabe4726a8203dc26e6752b66610e256986497" + end + + depends_on xcode: ["15.0", :build] + depends_on arch: :arm64 + depends_on :macos + depends_on macos: :ventura + + uses_from_macos "swift" + + def install + system "swift", "build", "-c", "release", "--product", "whisperkit-cli", "--disable-sandbox" + bin.install ".build/release/whisperkit-cli" + 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..8c23fd31471d0 --- /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.98.tgz" + sha256 "eae840bd72e5a40c46f32669c1e67b30a959e614e015723a9343458ced6ce4fe" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "c0de5233a6fbbf508637af294b958271b8bb327e11afb966e767598bdf527fcc" + 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..2b45f16087d60 --- /dev/null +++ b/Formula/w/whois.rb @@ -0,0 +1,45 @@ +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.0.tar.gz" + sha256 "f871152e94f04de22e544e8627ff7a7ebc786fd1438e230cd5c28ea0a258a60c" + license "GPL-2.0-or-later" + head "https://github.com/rfc1036/whois.git", branch: "next" + + bottle do + sha256 cellar: :any, arm64_sequoia: "ad4b2b51903dd2be1687b2dee169ae88218d0d56b8ab9371db27520acbf51652" + sha256 cellar: :any, arm64_sonoma: "3f2450e5a45fdf656a98cfbeca9714752204ec1543febcb817838e714eeb4e51" + sha256 cellar: :any, arm64_ventura: "e2e91b1801ca6d24b26687ab6b6f739ffee9e6c6d0d9084d63ff1787781edc58" + sha256 cellar: :any, sonoma: "c9dc764ca90054c98107a3b882aaa0bcbb6a17af3cee408f33615d409e84b5ee" + sha256 cellar: :any, ventura: "b6656669d4a541e4922551b45e6228f401fe343fec89ea267ada8873e77f1a29" + sha256 cellar: :any_skip_relocation, arm64_linux: "2757c4eb3563c111d536170b80f4ba869ac6cbd744a716324d22b88a6af729d2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "322f74c12adbd3e75f39930159502aaeff07e1eea639380291742fa1300c12a4" + 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", "whois", have_iconv + bin.install "whois" + man1.install "whois.1" + man5.install "whois.conf.5" + 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..71207f4929309 --- /dev/null +++ b/Formula/w/widelands.rb @@ -0,0 +1,76 @@ +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_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 + + 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") || which("python")}", + *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..dbb1019887f3c --- /dev/null +++ b/Formula/w/wifi-password.rb @@ -0,0 +1,22 @@ +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" + + 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..6ea9d5506e109 --- /dev/null +++ b/Formula/w/wiggle.rb @@ -0,0 +1,32 @@ +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" + + bottle do + 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..e5417c1db4162 --- /dev/null +++ b/Formula/w/wiiuse.rb @@ -0,0 +1,53 @@ +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" + + bottle do + rebuild 1 + 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..3b33a6a13dcf7 --- /dev/null +++ b/Formula/w/wiki.rb @@ -0,0 +1,35 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f04d4a1f0e1ff026faa5c23ff76285373b149aee6ea15cac6e15675566f2c0d5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ff6fe02817f0844c04ab7f49950a4002ddb29aec162412c8dae098ee3d8a27af" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e8f38ae68a67e5c67b256d0081aa958367b37082454d56d0138a59168a47e20c" + sha256 cellar: :any_skip_relocation, arm64_monterey: "eb361e567c70bd6019dc7a16f16eaefbc5166fd158586360a70f1fbd445db572" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "102962e7b753737d622bbea4698f0282c64ea1b3b55c3f61e523c8c9378fcd35" + sha256 cellar: :any_skip_relocation, sonoma: "311f6423eb40e5ad10433ed343d9e9c656f27fb33daabffcc6f3da7d736247b7" + sha256 cellar: :any_skip_relocation, ventura: "c661a59421715b882fce53c1f789b22fa0673d2d5fd6b531f897ecfaa882681e" + sha256 cellar: :any_skip_relocation, monterey: "2e3682a73a087bcd527262f35e0dcbc9e40d292b360b36ebf2926ec722385713" + sha256 cellar: :any_skip_relocation, big_sur: "d7c353ca381bdfad07569b445ff29fe592979e6623354df939452528ecec76c0" + sha256 cellar: :any_skip_relocation, catalina: "ff424f6afbc0d2baab91cee289157d9c90623fa19b7d51574b75df455da76cd6" + sha256 cellar: :any_skip_relocation, mojave: "316687b381ca23ee0e81eb6e396d2c8c21a5eeaf05a9219ec56dd0024a8d9722" + sha256 cellar: :any_skip_relocation, high_sierra: "bd1b52730bbf5bc503d3fece003b069e248261616d9d02767ef019d87659bdd8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "382e8b0d2644f4eaf1fd5132262dbe66a9c89549b0f38e96254ad37969a2a709" + end + + depends_on "go" => :build + + 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 diff --git a/Formula/w/wikibase-cli.rb b/Formula/w/wikibase-cli.rb new file mode 100644 index 0000000000000..1f4def11ee546 --- /dev/null +++ b/Formula/w/wikibase-cli.rb @@ -0,0 +1,35 @@ +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-18.3.3.tgz" + sha256 "3bfd8433eaae7ff56b5ca76b0411183a7436e2710374135bf3879a3fc0ebf259" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "14997de71a2e553b377832162fc2f923d087c5a8425d82f4c7ad00a6adbdc2e5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14997de71a2e553b377832162fc2f923d087c5a8425d82f4c7ad00a6adbdc2e5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "14997de71a2e553b377832162fc2f923d087c5a8425d82f4c7ad00a6adbdc2e5" + sha256 cellar: :any_skip_relocation, sonoma: "b1ffc6a93fd0efd0f44a502d3ebafbaeac50224b89675966dc21da0076934930" + sha256 cellar: :any_skip_relocation, ventura: "b1ffc6a93fd0efd0f44a502d3ebafbaeac50224b89675966dc21da0076934930" + sha256 cellar: :any_skip_relocation, arm64_linux: "3411fce69763b1fa6c69aa74990f1de717ec0d06553896f44147eec581b9082f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "14997de71a2e553b377832162fc2f923d087c5a8425d82f4c7ad00a6adbdc2e5" + 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..c9d1c38087803 --- /dev/null +++ b/Formula/w/wildfly-as.rb @@ -0,0 +1,90 @@ +class WildflyAs < Formula + desc "Managed application runtime for building applications" + homepage "https://www.wildfly.org/" + url "https://github.com/wildfly/wildfly/releases/download/36.0.0.Final/wildfly-36.0.0.Final.tar.gz" + sha256 "348d17ead028b09a28b11aa271b99f27105e051db89b6fd2ecdaf2b2c736e009" + 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_sequoia: "6b0de09bed75c4cfb42363458a668fa9da62261ebea864ff9cca35ddee3cbb31" + sha256 cellar: :any, arm64_sonoma: "6b0de09bed75c4cfb42363458a668fa9da62261ebea864ff9cca35ddee3cbb31" + sha256 cellar: :any, arm64_ventura: "6b0de09bed75c4cfb42363458a668fa9da62261ebea864ff9cca35ddee3cbb31" + sha256 cellar: :any, sonoma: "ed17d4260fca48a1952267675ece1c6508e2f6547c29a24e243e000fb3e89d2f" + sha256 cellar: :any, ventura: "ed17d4260fca48a1952267675ece1c6508e2f6547c29a24e243e000fb3e89d2f" + 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) + buildpath.glob("**/win-x86_64").map(&:rmtree) + buildpath.glob("**/linux-i686").map(&:rmtree) + buildpath.glob("**/linux-s390x").map(&:rmtree) + buildpath.glob("**/linux-x86_64").map(&:rmtree) + buildpath.glob("**/netty-transport-native-epoll/**/native").map(&:rmtree) + if Hardware::CPU.intel? + buildpath.glob("**/*_aarch_64.jnilib").map(&:unlink) + else + buildpath.glob("**/macosx-x86_64").map(&:rmtree) + 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..05b291ea89215 --- /dev/null +++ b/Formula/w/wildmidi.rb @@ -0,0 +1,47 @@ +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_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..674beac4858ad --- /dev/null +++ b/Formula/w/willgit.rb @@ -0,0 +1,27 @@ +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" + + 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..45edb82ed9132 --- /dev/null +++ b/Formula/w/wimlib.rb @@ -0,0 +1,58 @@ +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 + sha256 cellar: :any, arm64_sequoia: "dc46d8e6c9dd8a394459c8735c03e02dd0ff8e4f887e3849e87793553492a0c6" + sha256 cellar: :any, arm64_sonoma: "8cbbeec3b621170d4577412d4c0a240e27a07a9471ffa6f28186ccb26c601592" + sha256 cellar: :any, arm64_ventura: "295512a48ab0166b7e217a83b106bc7e7e01cbf3a6f343eaedfa97a899eb4d92" + sha256 cellar: :any, arm64_monterey: "9f8f4f22847e831915fccdeedfc885108dc2d6f6d80e276d4932484015bba54a" + sha256 cellar: :any, sonoma: "9822e536911e162bb367cfd73ac94ff7ef30a9b0d604400d7702fb4bee072f0e" + sha256 cellar: :any, ventura: "77a2f91a0c2ca081a2f50ff5f4b9f3ea4f9e79a3c19705f71309c8c60d08e5d8" + sha256 cellar: :any, monterey: "0f92288eb4efd7316e705cf1a6d1729f8b6eee81beb7ea57daf15f968c0c53ff" + sha256 cellar: :any_skip_relocation, arm64_linux: "deebf01fb975cccf1659fe05d5ba8e6791df197a393ab8a1dbbbcc3e9b30ce1a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4710658e4473cd5744958616b25eb4c19bf61ffec09c42cd748ef4d0ce26c3b0" + end + + depends_on "pkgconf" => :build + depends_on "openssl@3" + + uses_from_macos "libxml2" + + def install + # fuse requires librt, unavailable on OSX + args = %w[ + --disable-silent-rules + --without-fuse + --without-ntfs-3g + ] + 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..98dc3f9656ff6 --- /dev/null +++ b/Formula/w/wiredtiger.rb @@ -0,0 +1,52 @@ +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_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 "ccache" => :build + 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[ + -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..64df5eb9150fd --- /dev/null +++ b/Formula/w/wireguard-go.rb @@ -0,0 +1,33 @@ +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.20250515.tar.xz" + sha256 "c2861e387555fe8b93a123dc34a2e150971b831dda26dbac65a8db006654c859" + 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_sequoia: "20c2f87b999037bd44a18393bbe55def385c0149d88aef6fb42b0fcd18ec52bf" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "20c2f87b999037bd44a18393bbe55def385c0149d88aef6fb42b0fcd18ec52bf" + sha256 cellar: :any_skip_relocation, arm64_ventura: "20c2f87b999037bd44a18393bbe55def385c0149d88aef6fb42b0fcd18ec52bf" + sha256 cellar: :any_skip_relocation, sonoma: "4c64d6ba51816e5412f0b16d861bafbd2c19e0df4e1f7ad8664d2602d432f78e" + sha256 cellar: :any_skip_relocation, ventura: "4c64d6ba51816e5412f0b16d861bafbd2c19e0df4e1f7ad8664d2602d432f78e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "49b377d62c441fa03196469d4c2fe3d8e88a056c2687ebc4c7fdb95fe9638ff8" + 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..14daf472cea88 --- /dev/null +++ b/Formula/w/wireguard-tools.rb @@ -0,0 +1,51 @@ +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.20210914.tar.xz" + sha256 "97ff31489217bb265b7ae850d3d0f335ab07d2652ba1feec88b734bc96bd05ac" + license "GPL-2.0-only" + revision 1 + head "https://git.zx2c4.com/wireguard-tools.git", branch: "master" + + livecheck do + url :head + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b3cc085b5898b8e1b5a12ca32495d641af5cbe2085d64348d669a3277c0edf7a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "afec9bdf1a24e98a53e4568fb82cce22ca05ac4607f48a84e67fb9e5ed6a9df4" + sha256 cellar: :any_skip_relocation, arm64_ventura: "00c5b2ed459e7beae63c31d85c5be506b43dc2936439c5139bb92482a5df9b37" + sha256 cellar: :any_skip_relocation, arm64_monterey: "25c8ed67136dcaa8d5292aae40793fd68fe6b803d57fc698a9bc7712bfc1c37f" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "b73274d92eb5cc895635e2f8baf8f3483dc373e6b6591cd101e2a3bc6ddbae8e" + sha256 cellar: :any_skip_relocation, sonoma: "369edbf097e3ac528853e5c696502fc41cb1fce55f4cb654ad5611ea4511edd7" + sha256 cellar: :any_skip_relocation, ventura: "ccfe3d35f1cdcb6df435e96fed4cff835274a9a34530c270e71660b65c667ff7" + sha256 cellar: :any_skip_relocation, monterey: "61ae65bc95ae1ff7497a7d3f6128054f21fc0daafc089553c3f44a8f7b5b34b0" + sha256 cellar: :any_skip_relocation, big_sur: "7998a72195a995ee53e1360a42532bcb6fa42fda1002f16674c695ef5cea101e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b742a6fbc6894b5da2865387e48a7481d894ba90bc37eb5fd38081b2f3af1817" + 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..7314334c10273 --- /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.0/wiremock-standalone-3.13.0.jar" + sha256 "dd0ab1aefeac7f50a1d89992a5a6a5d6ab5a260b660f95137315816e5380bf9c" + 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: "4ff3725a197ecf7f7122daebb64b82c69d5cc09c91768d1074ae4b1f10debea3" + 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..1704ffac0bea8 --- /dev/null +++ b/Formula/w/wireshark.rb @@ -0,0 +1,106 @@ +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.4.6.tar.xz" + mirror "https://1.eu.dl.wireshark.org/src/all-versions/wireshark-4.4.6.tar.xz" + sha256 "4fffcee3d18d1daac12f780c2e8da511824dffb3b0fd6446b53ab7516538edcd" + 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_sequoia: "ce24d43d2ed69bfd9d45f45f2a50457dea8edcc2e9fdafe178c777f6ecd5bff3" + sha256 arm64_sonoma: "01b3b8ba59c0b4f8551c6b7a07742ef87fd92154b719aca8b6f5d733295e2e15" + sha256 arm64_ventura: "540be115101d05c8eef0972e99809881809a2bdbb1ba2f1d52c015713e79cfc2" + sha256 sonoma: "16724ac98c2cda34b390a55891e7f97e156e999dd24450fc87f595375de9766d" + sha256 ventura: "9e8ddf7a57a7029fbe6b1c966ae4b2f8d706cbe77cf9c2cd7d3f2a95f002a5a8" + sha256 arm64_linux: "22ba53c9cd8c2e86c23954cf070196aad7ca5a28095e678d1dc8ae71b73595ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "89b145c71e72fb72e9467b0463f71fc041040ed89bdcf9f4f654f43ba68f65da" + 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" + + 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_NAME_DIR:STRING=#{lib} + ] + + 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 --cask wireshark + + 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..9cb756f372406 --- /dev/null +++ b/Formula/w/wirouter_keyrec.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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 mojave: "ca8371cae9a6a4ce5ce4541a811d17260d877695426b16777e4b89d0fb912332" + sha256 high_sierra: "60a9b2a5fffe6027b296ad5b320377dd98a28658b628d6b3acbe94126e54ff3e" + sha256 sierra: "2accae4664406559e45909d53eaf6a8a8569773c8e0d932e2d3a8090706f8f18" + sha256 el_capitan: "3982522d8e15ced547c4f1d3019fe3ca6ddaa88d33fad03d2c97a53c849ec217" + 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/with-readline.rb b/Formula/w/with-readline.rb new file mode 100644 index 0000000000000..1934b6e4aa467 --- /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 + + bottle do + 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, mojave: "3a6e8e8e2d6f35ecd215b969c3794e586b1209820a9b0e5d935ddc5363f58678" + sha256 cellar: :any, high_sierra: "72ea8c0cce2f94fae5c963a1113c9b2504f1d728234c3c511ad7e3d5dca0d74b" + sha256 cellar: :any, sierra: "808a3a96b1d247f16c0a3e21eb18ed287f7df474b36c4685725768a05c3c1c61" + 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..0fbe9fd86b9c8 --- /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.9.1.tar.gz" + sha256 "af28bd620a90d76933f529ed72655841b04a617cf9abb61ff52fe0edc1fc23d7" + 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_sequoia: "9b5936f021ba12991c70aa67d9e43bfcea3ceb818ef3fc54e2838ff813179710" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "4808c187ca99c721b7fcfcec59b7acb998af40b6f90ef0ed11e938a304c13568" + sha256 cellar: :any_skip_relocation, arm64_ventura: "122725c3b78c865e6e0f0bfa7a359f6cc86cf4338ff0f8b04ad50349ac5b2497" + sha256 cellar: :any_skip_relocation, sonoma: "ce469b91e24105696a60d9a6c66312077d4d90b54bd783957ab71e1775234d9d" + sha256 cellar: :any_skip_relocation, ventura: "c6e0727c4a7cea0f168017986e8cce46d778158a50dce55dcb28131396dbd6be" + sha256 cellar: :any_skip_relocation, x86_64_linux: "23f5d88458746d2566874da6db9ada7f7eefbb4927b210f160f0bbdee571d903" + 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..e620135fbafa3 --- /dev/null +++ b/Formula/w/wla-dx.rb @@ -0,0 +1,67 @@ +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 + + bottle do + 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 + + 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..8a66d68eff7cf --- /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 5 + sha256 cellar: :any_skip_relocation, all: "1f51172a70e011c1666255f2ace6d910d573681b83d50c31b551616dce265e6b" + end + + depends_on "llvm" => :test + depends_on "python@3.13" + + 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..9a3eccc2968aa --- /dev/null +++ b/Formula/w/wmctrl.rb @@ -0,0 +1,57 @@ +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 + + bottle do + 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, mojave: "49f4d10d0e8d8b4cfa2e5ba4240f5c623f01b66d4e466eace255c1496c627da5" + sha256 cellar: :any, high_sierra: "10200373a514341920fd453d769c07040eae2ba01a691c418d10b6a1d44ec70b" + 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/formula-patches/85fa66a9/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..b95af936377e1 --- /dev/null +++ b/Formula/w/woff2.rb @@ -0,0 +1,68 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "d3ccc0d5d910483c5fa385cf213bb352bfe886f1b824f8c182d050ae96e77fdd" + sha256 cellar: :any, high_sierra: "f0a9cba72030b62b02336c277f2688ad96bf45c1720e58205cfa597be9860296" + sha256 cellar: :any, sierra: "965310f79a417663d33d4917880b4dd2a9654ca85f5a9a243465e3e0e86a394d" + sha256 cellar: :any, el_capitan: "59d4f6c77ae933445a0fde4b1445208a094169fa5dac784889dd6c8d4947c997" + 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 + ] + + 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..9c0225f405727 --- /dev/null +++ b/Formula/w/wolfmqtt.rb @@ -0,0 +1,56 @@ +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" + head "https://github.com/wolfSSL/wolfMQTT.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d3d2b86e04932ea20a3603fec126e9f4bc534d6bd1489b6de71a5a84f3e631f0" + sha256 cellar: :any, arm64_sonoma: "fa65aa7f49bb183268bb1985c90174d7df5c4ba047cfdf3102506e88440f3000" + sha256 cellar: :any, arm64_ventura: "35d82d87dae115b8d91b80658d0e2b52c1eac6719d6be84413650dfb65d9aa5d" + sha256 cellar: :any, sonoma: "9b7a5bd35524cd73cc377e7ead2a7014cc07622a2c0f1150b560b5f68cd0fd96" + sha256 cellar: :any, ventura: "194de1f1645892c588d90bdb34ad87fa5fb77aa7d965847e720e394228dd433c" + sha256 cellar: :any_skip_relocation, arm64_linux: "f4e1f05cab22ad6fe447a5ad5328c8243f926c32d0c89e1f456ce44c6a747226" + sha256 cellar: :any_skip_relocation, x86_64_linux: "971a4a2540cb3166c46fdc030f256862c2ee8b66a476de654ad5ae781433609d" + 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..613993720b9e5 --- /dev/null +++ b/Formula/w/wolfssl.rb @@ -0,0 +1,67 @@ +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.0-stable", + revision: "b077c81eb635392e694ccedbab8b644297ec0285" + license "GPL-2.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_sequoia: "efc64785e620d8b1c5e208b99fe2a236b945cdbb777fe5af8284b43c08f48e84" + sha256 cellar: :any, arm64_sonoma: "4ee88f3a4c99780161ac2c928ebd0d01dc87207eaa0604425a1f3b474fe1619e" + sha256 cellar: :any, arm64_ventura: "8e651bbeb00f69694557d26ad4e59c5c83c6f17ec614fc18f6355e33213c5d5f" + sha256 cellar: :any, sonoma: "c4e4c1deb606b4eac0534ff557ea62e761a82b9cdc03b49d745155b5d3c206c6" + sha256 cellar: :any, ventura: "436ff4612e6a9c04aee827ca18e267313826b9977916e2e8a3355c3fdc4e61ef" + sha256 cellar: :any_skip_relocation, arm64_linux: "bac5f9b9f00adec84003757ac0c3cc39ea4afa512b889af0d6274d8a9774ba29" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b2eada4b8e21f9f2b033159dca61c0f0b00be104b8458c0cd6ccd4e270ee4e2e" + 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..57631de665ebb --- /dev/null +++ b/Formula/w/woob.rb @@ -0,0 +1,126 @@ +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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "544f50fd03f5c1f7c551bdced33e363da67253e7f16e4f258b2e33c8b7bb38d3" + sha256 cellar: :any, arm64_sonoma: "63f1ff18a0ae23684f16d99bec2c631a09288534396b4871e87ee4256600e54b" + sha256 cellar: :any, arm64_ventura: "5fa75ab650ca499865656bcd684aa113672df2b59bc41c79571f4902bc790583" + sha256 cellar: :any, sonoma: "1e2193ee7da151398d2eade58cf409a2f94732abdcd35f648d57ff9e62e880e8" + sha256 cellar: :any, ventura: "e049ae78a0a5a1af6800cf1ee86e8c26d81d7eb8dca7e72f178e68e140aea155" + sha256 cellar: :any_skip_relocation, arm64_linux: "e988b7ee848d0c7e0bcffb4bb18ef4c95701178544003ea8ebfc186e4cc00daa" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7e999afa8f7ee9c7963c8ac5887494976877351bd587db3b9b6e15b3abd0f07e" + end + + depends_on "certifi" + depends_on "gnupg" + depends_on "libyaml" + depends_on "pillow" + depends_on "python@3.13" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "babel" do + url "https://files.pythonhosted.org/packages/2a/74/f1bc80f23eeba13393b7222b11d95ca3af2c1e28edca18af487137eefed9/babel-2.16.0.tar.gz" + sha256 "d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316" + 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 "html2text" do + url "https://files.pythonhosted.org/packages/1a/43/e1d53588561e533212117750ee79ad0ba02a41f52a08c1df3396bd466c05/html2text-2024.2.26.tar.gz" + sha256 "05f8e367d15aaabc96415376776cdd11afd5127a77fce6e36afc60c563ca2c32" + 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/e7/6b/20c3a4b24751377aaa6307eb230b66701024012c29dd374999cc92983269/lxml-5.3.0.tar.gz" + sha256 "4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f" + 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 "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/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 "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/9d/be/10918a2eac4ae9f02f6cfe6414b7a155ccd8f7f9d4380d62fd5b955065c3/requests-2.31.0.tar.gz" + sha256 "942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/d9/e9/cf9ef5245d835065e6673781dbd4b8911d352fb770d56cf0879cf11b7ee1/rich-13.9.3.tar.gz" + sha256 "bc1e01b899537598cf02579d2b9f4a415104d3fc439313a7a2c165d76557a08e" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" + sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" + end + + resource "termcolor" do + url "https://files.pythonhosted.org/packages/37/72/88311445fd44c455c7d553e61f95412cf89054308a1aa2434ab835075fc5/termcolor-2.5.0.tar.gz" + sha256 "998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f" + 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/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz" + sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" + 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..9d21463fb4606 --- /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.6.0.tar.gz" + sha256 "77e6cf71266b0b11a045a71da17bef27a65631a32bf717ef4f85c539101418d9" + license "Apache-2.0" + head "https://github.com/woodpecker-ci/woodpecker.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3dc4d07dca613479ebeb0050593405c558aca54014b1250782aa3d95b2eb186f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3dc4d07dca613479ebeb0050593405c558aca54014b1250782aa3d95b2eb186f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3dc4d07dca613479ebeb0050593405c558aca54014b1250782aa3d95b2eb186f" + sha256 cellar: :any_skip_relocation, sonoma: "b2a640746e58da818f060a467d4ca9f284c752208813a764b251fd7f25192fc9" + sha256 cellar: :any_skip_relocation, ventura: "b2a640746e58da818f060a467d4ca9f284c752208813a764b251fd7f25192fc9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "04f8b898d1642b7387c6ef5e5eab9e57eb9a863076e75337db570109172eb7c4" + 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..1450a3ed31b9d --- /dev/null +++ b/Formula/w/woof-doom.rb @@ -0,0 +1,51 @@ +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_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..ee84d22783554 --- /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 1 + sha256 cellar: :any_skip_relocation, all: "cfc359d1f134edad9eb8e9f5fa9542486b3934dfc2c3f56e694c2557460a47b8" + end + + depends_on "python@3.13" + + 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, "woof" + bin.install "woof" + end + + test do + port = free_port + pid = spawn bin/"woof", "-s", "-p", port.to_s + sleep 5 + + 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..c7e65e3d6f289 --- /dev/null +++ b/Formula/w/wordgrinder.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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, mojave: "143c53429552e244089211458fc42bcdbb79171d5f98ae17db9c7175208c8ae4" + 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..4c3cf3f7495e8 --- /dev/null +++ b/Formula/w/wordle.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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..13764bf59e8c7 --- /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 + + # This matches WordNet tarball versions as well as database file versions, + # as these may differ. + livecheck do + url "https://wordnet.princeton.edu/download/current-version" + regex(/href=.*?(?:WordNet|wn)[._-]?v?(\d+(?:\.\d+)+)(?:[._-]dict)?\.t/i) + end + + bottle do + 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..74ce046654c7c --- /dev/null +++ b/Formula/w/wordplay.rb @@ -0,0 +1,62 @@ +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_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 mojave: "d98d89abff244c21cf2ad4eb651ed39afea5b3146bf0ec3277483b813c4e8d89" + sha256 high_sierra: "9056fb79657b3be7ba8a97f4a13b1777e72447b717bd9fd1b7830023bda964a6" + sha256 sierra: "5141a8f5456e5a685b65c5d9f3100029c6f42b3f0c80aa3d6a4736d3028a6a6b" + 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/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/w/wormhole-william.rb b/Formula/w/wormhole-william.rb new file mode 100644 index 0000000000000..6e66a16ba0430 --- /dev/null +++ b/Formula/w/wormhole-william.rb @@ -0,0 +1,41 @@ +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_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, 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..c5c6db3b1d281 --- /dev/null +++ b/Formula/w/wownero.rb @@ -0,0 +1,81 @@ +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" + + conflicts_with "monero", because: "both install a wallet2_api.h header" + + 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..f3d188978fbe8 --- /dev/null +++ b/Formula/w/wp-cli-completion.rb @@ -0,0 +1,21 @@ +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" + + 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..69b974a726353 --- /dev/null +++ b/Formula/w/wp-cli.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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..dd69ab2c8ad9a --- /dev/null +++ b/Formula/w/wput.rb @@ -0,0 +1,56 @@ +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" + + bottle do + 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 cellar: :any_skip_relocation, mojave: "563c5204880172786cbbfc75dafa818e670ac5d1a67fdbe8bea1dd2588587eab" + sha256 cellar: :any_skip_relocation, high_sierra: "e01d35805cd00e8f4d9ba1ab989104d66dc4150648a2288f5f49eea5c17b5025" + sha256 cellar: :any_skip_relocation, sierra: "0a8c4296a3e14d8b420f65464293b000dd1bd2e33a802c92e1812f0c267d3f0f" + sha256 cellar: :any_skip_relocation, el_capitan: "8e4eeb941d98dc0313b87682b7ae659bbceac59426cf0483c2ae2676cf5b924b" + 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/formula-patches/85fa66a9/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..5ee83a5534058 --- /dev/null +++ b/Formula/w/wren-cli.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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..9d560288d6b90 --- /dev/null +++ b/Formula/w/wren.rb @@ -0,0 +1,62 @@ +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 + + bottle do + 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, mojave: "f55d068b6db418338ba1f4622b75d5c36b2b3462e27f28c0844e32c980b6b881" + 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..10a6807c37e4a --- /dev/null +++ b/Formula/w/write-good.rb @@ -0,0 +1,24 @@ +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" + + 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..195246cead473 --- /dev/null +++ b/Formula/w/writerperfect.rb @@ -0,0 +1,45 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "5e8658459f44238800ff490331d50aa6a71b48115157893c78901a4441a34dd3" + sha256 cellar: :any, high_sierra: "12f30a1f15f5887da7675026656f59dd74b7fbffdf4129a2c1778578dbf4cc4a" + sha256 cellar: :any, sierra: "36981e968c146d8aeca47d96327b3f3e909a3f58ca15bed17202e93fef6e17db" + sha256 cellar: :any, el_capitan: "549f41525d1a5cf4cad493650ea0f8daae0208246f36984d6a56a4af533fc881" + sha256 cellar: :any_skip_relocation, arm64_linux: "1880e89aea024d9aeb907f7aca699b2e6f4f6913ad2aa7c5cd8757e06cb80ec4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8ba99fa8423726871a3437205306e9cec03cc3715ed8630f1e29acd7ae74be14" + end + + depends_on "boost" => :build + 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-trello.rb b/Formula/w/wrk-trello.rb new file mode 100644 index 0000000000000..2bfecaff8db1d --- /dev/null +++ b/Formula/w/wrk-trello.rb @@ -0,0 +1,40 @@ +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" + + livecheck do + skip "Not actively developed or maintained" + end + + bottle do + sha256 cellar: :any_skip_relocation, all: "255e64f8c821c3e05bf04b13424ff23883aa00291b5f30da474584a7b609d3a6" + end + + disable! date: "2024-08-10", because: :no_license + + 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/w/wrk.rb b/Formula/w/wrk.rb new file mode 100644 index 0000000000000..8a682ad332bdf --- /dev/null +++ b/Formula/w/wrk.rb @@ -0,0 +1,53 @@ +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" + + bottle do + rebuild 1 + 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" + + conflicts_with "wrk-trello", because: "both install `wrk` binaries" + + 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}" unless build.head? + 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..765ade5ad9cf2 --- /dev/null +++ b/Formula/w/wrkflw.rb @@ -0,0 +1,49 @@ +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.4.0.tar.gz" + sha256 "acb411e8e45332ab5808c7bea9d8ad55fe8d3a93245c4f3fd2f8b589bd55d9c5" + license "MIT" + head "https://github.com/bahdotsh/wrkflw.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bda57665e9111325cece0939ac667ce927f5945b3c3b59cb2ab039868c519d3b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "933c9f0399e670f8cf7d3d17fbc001e67b6754bb95d87503df0128f12858d1be" + sha256 cellar: :any_skip_relocation, arm64_ventura: "5548ae1763b6a8119af2961213f784ddf3a87a47fd43afac3c4fb9e585d8c1d3" + sha256 cellar: :any_skip_relocation, sonoma: "bb5a2a4ac0022921176d0a37478446fff19544a70eea1870821e278527edb62d" + sha256 cellar: :any_skip_relocation, ventura: "ab11aa86875ec9aeda886dfca876af5e9dda4f0058a392d9c9f4713ff9a5cd72" + sha256 cellar: :any_skip_relocation, arm64_linux: "7090a30aa5830fea160162552b116a4c57067fbf211cc94b48662437da4c2425" + sha256 cellar: :any_skip_relocation, x86_64_linux: "64c3faa2554741e20b286734c9fd29ee44f57b0eb6325c8f7d68bc1e7f6557f5" + 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}/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..7f9e0dae53db4 --- /dev/null +++ b/Formula/w/wsk.rb @@ -0,0 +1,39 @@ +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" + + bottle do + rebuild 1 + 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, 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..ca9273cd16bbf --- /dev/null +++ b/Formula/w/wskdeploy.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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, mojave: "375d6f828a4a45d398ba11dcee4c60e64651697ee374917db7f2137b4c98cb77" + 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..7b87965faa4d2 --- /dev/null +++ b/Formula/w/wslay.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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, mojave: "4ea82d98c0fd0cfcc1e842dde6e0fbd15355d538876f24fa0c2ca6f05ed17926" + sha256 cellar: :any, high_sierra: "6aade683b7db8a32c859e54134568bdb3983d57878783d86c89e5d28c5e8db77" + 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..aaaaac97a88ad --- /dev/null +++ b/Formula/w/wstunnel.rb @@ -0,0 +1,49 @@ +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.3.0.tar.gz" + sha256 "ede8dfb23fbab3ed5090a256ea79290c036b04e3312b8ad487d47bc5e71ff570" + 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_sequoia: "9a6cf8987b383e34be36f8edd410285113f335e45298dfe8793972ee9fd50c13" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a122452ab5d4b180d80d724942910802026d8319d1dd0a9eb06bd1e39d18244a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "58cc16dfd1eb40a0f4c5a131f1baf96098b76ffd9f2e9a0120a8aa9f4ad88b5b" + sha256 cellar: :any_skip_relocation, sonoma: "7fe8ae254394d5c4cbc8c8ee50b52b6753c1b560cdcc18b09e5c8276a345cbe1" + sha256 cellar: :any_skip_relocation, ventura: "3fc4bcb8ec223b9215c38062eb98870dafa6023db6198a6d7f196da17b0cb79d" + sha256 cellar: :any_skip_relocation, arm64_linux: "a94291e5ddd138b46255f4495ddc0b7fbf3e2b1b8a6082abb1706ce8d7170c75" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9c24dd1a9d46fb302d5397fb5707833bc4b6024e8a857f7f1fbea5d728a12700" + 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..4acfb8163dcc5 --- /dev/null +++ b/Formula/w/wtf.rb @@ -0,0 +1,29 @@ +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 + + 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..4f88f81895b6d --- /dev/null +++ b/Formula/w/wtfis.rb @@ -0,0 +1,142 @@ +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/16/55/748b21d2d2e765e319cff417447006fc5d714b56317918da0d70ed8d7ee5/wtfis-0.11.0.tar.gz" + sha256 "3a687d99d91c9bba15e45707acef68c3ebc9ffd571fb311c2d83423a62ee0e6f" + license "MIT" + head "https://github.com/pirxthepilot/wtfis.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "eaafe902a56a5a912c14a7644901bac6bc4e4c93dff8b3c87dad223a684099fd" + sha256 cellar: :any, arm64_sonoma: "19f0b9519fddfd0bc314161592839c0f5f2863dc169e34a054e11beef682273b" + sha256 cellar: :any, arm64_ventura: "c25e15272c1afbf6070efc936885961ec88dd31875b0e8529eb4e7f0b98460d0" + sha256 cellar: :any, sonoma: "b3f38c1166827cd8718f27062cd2ea4737bd92e74a98b6c42ae9584dd7c5aec9" + sha256 cellar: :any, ventura: "f64f4260d6d4433e6feaceea6c161332b91424ab37102e4454f22e7fd424ee3c" + sha256 cellar: :any_skip_relocation, arm64_linux: "52b7f972b0cef387855e206aa604474a21907b79e5adb285731b20be2286be7e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "bdd053e9e05fe28356e8d5fe5d4887eab877c41212c3f90a87ec6bb1e83a341f" + end + + depends_on "rust" => :build + depends_on "certifi" + depends_on "python@3.13" + + 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/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz" + sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz" + sha256 "f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d" + end + + resource "click-plugins" do + url "https://files.pythonhosted.org/packages/5f/1d/45434f64ed749540af821fd7e42b8e4d23ac04b1eda7c26613288d6cd8a8/click-plugins-1.1.1.tar.gz" + sha256 "46ab999744a9d831159c3411bb0c79346d94a444df9a3a3742e9ed63645f264b" + 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/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz" + sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2" + end + + resource "idna" do + url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz" + sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" + 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 "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/77/ab/5250d56ad03884ab5efd07f734203943c8a8ab40d551e208af81d0257bf2/pydantic-2.11.4.tar.gz" + sha256 "32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d" + 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 "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "python-dotenv" do + url "https://files.pythonhosted.org/packages/88/2c/7bb1416c5620485aa793f2de31d3df393d3686aa8a8506d11e10e13c5baf/python_dotenv-1.1.0.tar.gz" + sha256 "41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5" + 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 "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + end + + resource "xlsxwriter" do + url "https://files.pythonhosted.org/packages/a7/d1/e026d33dd5d552e5bf3a873dee54dad66b550230df8290d79394f09b2315/xlsxwriter-3.2.3.tar.gz" + sha256 "ad6fd41bdcf1b885876b1f6b7087560aecc9ae5a9cc2ba97dcac7ab2e210d3d5" + 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..207cf32eae755 --- /dev/null +++ b/Formula/w/wtfutil.rb @@ -0,0 +1,75 @@ +class Wtfutil < Formula + desc "Personal information dashboard for your terminal" + homepage "https://wtfutil.com/" + url "https://github.com/wtfutil/wtf/archive/refs/tags/v0.43.0.tar.gz" + sha256 "bb48e38e479b26e0b956b163e4804e99cd49545214090c2fdf99e54382b3d651" + license "MPL-2.0" + head "https://github.com/wtfutil/wtf.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "03d23e7f87fdcd1c568743ca4bf4261f2d90b8f83932325521f14aee6a683c1d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "56f84f075efbdd2db2a81171b4e1574cb0b9aac21f600ab3a41d9662ae12093c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3d811c8da851a06afb1aa0f1396755385a3eace99e2abdbf58719619efecdd3b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "2dde8a7584268f28be28e4ff1e98f8895314c2950d88d002830f7ed79ec51c52" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "efb3e2fd24e639a315cc5e50acd8a20dc4b454a6a8aff0dfb2c169c9eac6afd9" + sha256 cellar: :any_skip_relocation, sonoma: "d2fcc48bf60123933d4c0fe276df7de4a51c2df2b3e2ae4eca15440a741e0487" + sha256 cellar: :any_skip_relocation, ventura: "1c66eb6d6b8c4a9b3167163371c1d774b9df6f1dd36155b380ee83e82ac8e13d" + sha256 cellar: :any_skip_relocation, monterey: "4183402aa957eead2c29e62f9e1d6afb0940568d6b387e360ae4e0fdcc61be35" + sha256 cellar: :any_skip_relocation, big_sur: "717dcf43f6c5d8f55c3f0aefd8e255ef91aab685a02b668ed27ce375e1bc404a" + sha256 cellar: :any_skip_relocation, arm64_linux: "7a68f406904f9637ea7e5db339604f6365e536504e1d2c33beace9d9f5036551" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c46aabfdfe08b790df12e07d83d93d0b1d10c4c963315979445ec220e2463372" + 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..e73eff5809d12 --- /dev/null +++ b/Formula/w/wthrr.rb @@ -0,0 +1,43 @@ +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_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..70e7343775625 --- /dev/null +++ b/Formula/w/wumpus.rb @@ -0,0 +1,33 @@ +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" + + livecheck do + url :homepage + regex(/href=.*?wumpus[._-]v?(\d+(?:\.\d+)+)\.t/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 + + 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/wush.rb b/Formula/w/wush.rb new file mode 100644 index 0000000000000..93dc543635191 --- /dev/null +++ b/Formula/w/wush.rb @@ -0,0 +1,36 @@ +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_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, 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..324fe98205286 --- /dev/null +++ b/Formula/w/wv.rb @@ -0,0 +1,71 @@ +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_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..08aa6c883b2ee --- /dev/null +++ b/Formula/w/wv2.rb @@ -0,0 +1,117 @@ +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 + + bottle do + 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, mojave: "7bda8de476777410ab350ceca0e089e20169f17a3d9cb31d313653c906766a85" + sha256 cellar: :any, high_sierra: "35120de253c5dcfd6da711f7529bd8e4a0ffd45eed540057ef57d1a9d2ab0091" + sha256 cellar: :any, sierra: "cd0856f53f0a143f5b0ea7dd61a0d23613db6de84538fa222e2819217a3ed3af" + sha256 cellar: :any, el_capitan: "b3a07e873f69b90ed83d47ccedb6bc5fefcb5dc5c9ffd1ecfd38c03dd094afea" + 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 "libxml2" + 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 + + def install + ENV.append "LDFLAGS", "-lgobject-2.0" # work around broken detection + ENV.append "LDFLAGS", "-liconv" if OS.mac? + ENV.append "CXXFLAGS", "-I#{Formula["libxml2"].include}/libxml2" unless OS.mac? + system "cmake", "-S", ".", "-B", "build", *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 diff --git a/Formula/w/wwwoffle.rb b/Formula/w/wwwoffle.rb new file mode 100644 index 0000000000000..b60a3b0563414 --- /dev/null +++ b/Formula/w/wwwoffle.rb @@ -0,0 +1,47 @@ +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 + + bottle do + 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, mojave: "503407c9e3e1cdfe8382b25e8709d5f92675ac04f7d9b42bb4ab08b02a6f5818" + sha256 cellar: :any_skip_relocation, high_sierra: "090085b4a39e90929744310494ef3157dfc77f7c2910047dfbdc75c75fe7c8f7" + sha256 cellar: :any_skip_relocation, sierra: "9310fffe992916bf09700c8d6fd018943a14c73c27f28e3c61548f56b7f301d2" + sha256 cellar: :any_skip_relocation, el_capitan: "0877d44d105e2ec35e38e2d2e760f6c2973f53f98d784ccf16bed6d47e37db38" + 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..b02cf929e7864 --- /dev/null +++ b/Formula/w/wxlua.rb @@ -0,0 +1,70 @@ +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 1 + head "https://github.com/pkulchenko/wxlua.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "5ab53a21ffd382cb7d53a884b4eb09df5484c36d106c452f03c75f8841726d5c" + sha256 cellar: :any, arm64_sonoma: "c00c2ef44ed734d26861a29d800555455f86c7fd8d846f12ecc6b4f0d151bd37" + sha256 cellar: :any, arm64_ventura: "e4c38bdfbbd990e273116a570fe63200cc78fbd6fa1e1b051b45d5a699060168" + sha256 cellar: :any, sonoma: "3f5fd12035ae6a1f09efbefc9e5c7658898a48c228c5383a836d6d975833cced" + sha256 cellar: :any, ventura: "debb18bebc1fe2d3ef3fd6ca8810c141ecb94cd6d0d1666112366e604a396307" + sha256 cellar: :any_skip_relocation, arm64_linux: "2e29b1f1b1629fb2324d601f1e7d8054da3fbbc0050b841d9da48db9857bae5e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3e6c83b3e941528b906e9007ec23d4fec5506953aa6b77dc5877037ab2ec229e" + end + + depends_on "cmake" => :build + depends_on "lua" + depends_on "wxwidgets" + + on_linux do + depends_on "xorg-server" => :test + end + + def install + lua = Formula["lua"] + wxwidgets = Formula["wxwidgets"] + lua_version = lua.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=#{wxwidgets.opt_bin}/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..c7d1c3fb4860f --- /dev/null +++ b/Formula/w/wxmaxima.rb @@ -0,0 +1,81 @@ +class Wxmaxima < Formula + desc "Cross platform GUI for Maxima" + homepage "https://wxmaxima-developers.github.io/wxmaxima/" + url "https://github.com/wxMaxima-developers/wxmaxima/archive/refs/tags/Version-25.04.0.tar.gz" + sha256 "ec0b3005c3663f1bb86b0cc5028c2ba121e1563e3d5b671afcb9774895f4191b" + license "GPL-2.0-or-later" + head "https://github.com/wxMaxima-developers/wxmaxima.git", branch: "main" + + livecheck do + url :stable + regex(/^Version[._-]v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 arm64_sonoma: "651e94d18f6e8d0607f2a9c2704e27a5f8706154136b9e84291f4c56a38b5b4a" + sha256 arm64_ventura: "2cb41dd7ab37788045aabd96c2bc7872c4e018d17d8ad7fffc8e1324948c3583" + sha256 sonoma: "f37079c11ec5d8e79ef364cb0938fe45f7ef0982e41edb30c60101c24f8a78e6" + sha256 ventura: "46fe42c449be5e2b2be2f4b8309ccff0eb60583e49078b46da4130ce70838f31" + sha256 x86_64_linux: "22bc6ecaa698b1408fa9f659d44b4d7eabe1ef9cd2da11c4c8621a132a8a95c0" + 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..b92aeee3188d9 --- /dev/null +++ b/Formula/w/wxpython.rb @@ -0,0 +1,55 @@ +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" } + + bottle do + sha256 cellar: :any, arm64_sequoia: "3e47059dc4a8710a730dc27af12a6251244b4a82a0b42957c661c583b7212928" + sha256 cellar: :any, arm64_sonoma: "299ffa3f6406ce0dfe2a75b24c61d46cfdabd35bffc7d6effe4e6e634945f88e" + sha256 cellar: :any, arm64_ventura: "9cbc4877d65c9d55d2161d756a167884d330a69e12f6dbc970119cdf8bd17413" + sha256 cellar: :any, sonoma: "c3e8445d7fe4d231909c6462812c02818e2b27aa7079de9dab8b7540e2f36d7b" + sha256 cellar: :any, ventura: "27267b1cf5018724f9a91fa7e6aae443da2ce43d11828c7ddc5d302aff97b770" + sha256 arm64_linux: "fe385dac180bc47d7ac80b4757daa4a247899cf377677553769944a8cb890e7f" + sha256 x86_64_linux: "a0532b1d4ad738222a8e3e39909ce259c048b3977cfbd509f2d131f07a734ed8" + end + + depends_on "doxygen" => :build + depends_on "python-setuptools" => :build + depends_on "sip" => :build + depends_on "numpy" + depends_on "pillow" + depends_on "python@3.13" + depends_on "wxwidgets" + + on_linux do + depends_on "pkgconf" => :build + depends_on "gtk+3" + end + + def python + "python3.13" + end + + def install + # Avoid requests build dependency which is used to download pre-builts + inreplace "build.py", /^(import|from) requests/, "#\\0" + + 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..a5cb11ec5de53 --- /dev/null +++ b/Formula/w/wxwidgets.rb @@ -0,0 +1,106 @@ +class Wxwidgets < Formula + desc "Cross-platform C++ GUI toolkit" + homepage "https://www.wxwidgets.org/" + url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.8/wxWidgets-3.2.8.tar.bz2" + sha256 "c74784904109d7229e6894c85cfa068f1106a4a07c144afd78af41f373ee0fe6" + 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 + sha256 cellar: :any, arm64_sequoia: "5e0aa82886721db8bc109785272271aecbc86b2e44185bacb6c947fd19f6fcc2" + sha256 cellar: :any, arm64_sonoma: "c8e1a68822e6a854138ed7d17be706a07df64e4a38900b98a6e88a36f785c500" + sha256 cellar: :any, arm64_ventura: "5d9b32b6973e71173101c6b45d1a350f724442088681b5721caa613318805876" + sha256 cellar: :any, sonoma: "981feac70f9e659e8e45d1b7de4030fcab77ecda3dab2c0d43033e116d24122c" + sha256 cellar: :any, ventura: "ef48295f3fdc268a6e1ed3daef93017646105dff9bb962f67b567d66830c451c" + sha256 cellar: :any_skip_relocation, arm64_linux: "19d1970a8f32864712fa40f2932e943a097ac9752b04f78fdf912a86b3d6bb11" + sha256 cellar: :any_skip_relocation, x86_64_linux: "40a393ed11e8f3dee0153c52441eec44b185c197a2c2175a7d592105aa0df5b9" + 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) } + + 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" + + # Work around deprecated Carbon API, see + # https://github.com/wxWidgets/wxWidgets/issues/24724 + inreplace "src/osx/carbon/dcscreen.cpp", "#if !wxOSX_USE_IPHONE", "#if 0" if MacOS.version >= :sequoia + 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/wy60.rb b/Formula/w/wy60.rb new file mode 100644 index 0000000000000..a410aa957bfa2 --- /dev/null +++ b/Formula/w/wy60.rb @@ -0,0 +1,37 @@ +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" + + bottle do + 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 mojave: "04e34b5cc12f3c130454dec804ff989e999fe6fb043c66f44976fc710fdce62a" + sha256 high_sierra: "77fb48cc35956863e1f685b41c885337ca770185edffb250cbed8bd8c5a3070b" + sha256 sierra: "f03706d166cfcc0679e696493bd13df30ad0617a92b602b79e3494ba3b1f46fb" + sha256 el_capitan: "84d3bfa45582f2816808006f192c7580cedad24de3941a0786b5b36ce29e469c" + 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..e09d8a88bf5e6 --- /dev/null +++ b/Formula/w/wzprof.rb @@ -0,0 +1,46 @@ +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" + + bottle do + 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, 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 f07184445d07e..0000000000000 --- a/Formula/w3m.rb +++ /dev/null @@ -1,46 +0,0 @@ -class W3m < Formula - desc "Pager/text based browser" - homepage "https://w3m.sourceforge.io/" - revision 6 - 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://deb.debian.org/debian/pool/main/w/w3m/w3m_0.5.3-37.debian.tar.xz" - sha256 "625f5b0cb71bf29b67ad3bb9c316420922877473a6e94e6c7bcc337cb22ce1eb" - apply "patches/010_upstream.patch", - "patches/020_debian.patch" - end - end - - bottle do - rebuild 1 - sha256 "274f48d738d351b3c6a07ada24b866a485c49d400f36108d904a6d2a8835a660" => :catalina - sha256 "c2a4f7208e98f575eadaff6af3dc9a93305008b93d2f069c53d687ba61b85d64" => :mojave - sha256 "bc46bb9b70d7149058d2c757aa0b8ea68c7c6836faee26da0b697d81cca0927d" => :high_sierra - sha256 "809a34cb2c14b98827cfe9f18008b0ebc545e359c5f8c1279e71948ac336bdd1" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "bdw-gc" - depends_on "openssl@1.1" - - uses_from_macos "ncurses" - uses_from_macos "zlib" - - def install - system "./configure", "--prefix=#{prefix}", - "--disable-image", - "--with-ssl=#{Formula["openssl@1.1"].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 b3d8ab3caae59..0000000000000 --- a/Formula/wabt.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Wabt < Formula - desc "Web Assembly Binary Toolkit" - homepage "https://github.com/WebAssembly/wabt" - url "https://github.com/WebAssembly/wabt.git", - :tag => "1.0.17", - :revision => "1467a6113414e7ef24174f51398079c9f4eeae57" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "fdb227c18043e0bb2beb7c1ee8010e725172e8e3667725d73b263cea00442479" => :catalina - sha256 "b8084b828d5a15dea3c67b6a74420921a46ffeea7d8a7868384b0691d6e414e4" => :mojave - sha256 "3e252aab05b7623daffc44967874ba0efa1ca1785004b99912fe0eb0898e1563" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "python@3.8" => :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/wagyu.rb b/Formula/wagyu.rb deleted file mode 100644 index 219d508fd907b..0000000000000 --- a/Formula/wagyu.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Wagyu < Formula - desc "Rust library for generating cryptocurrency wallets" - homepage "https://github.com/ArgusHQ/wagyu" - url "https://github.com/ArgusHQ/wagyu/archive/v0.6.1.tar.gz" - sha256 "2458b3d49653acd5df5f3161205301646527eca9f6ee3d84c7871afa275bad9f" - head "https://github.com/ArgusHQ/wagyu.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "69e6539d7e3801aaea4cd14acd48684f703a4c1cac0f04790d3ada827daf77f9" => :catalina - sha256 "0b6fd9b45280ecac2586b191303e0e643ef14c85cad06b6aca73e51e7af6ae46" => :mojave - sha256 "c2175413a53a69da950ca7b879afc882f2181a34cb633e823bf2a3dc29675fc4" => :high_sierra - end - - 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/wait_on.rb b/Formula/wait_on.rb deleted file mode 100644 index d2053285ba7d4..0000000000000 --- a/Formula/wait_on.rb +++ /dev/null @@ -1,30 +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 "befef0facd28d26c22ed14197e74c1bff41c9cd2f787ae4bee59027cfb89b2c7" => :catalina - 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 c060dd2f4c5d0..0000000000000 --- a/Formula/wakatime-cli.rb +++ /dev/null @@ -1,31 +0,0 @@ -class WakatimeCli < Formula - desc "Command-line interface to the WakaTime api" - homepage "https://wakatime.com/" - url "https://files.pythonhosted.org/packages/0f/45/4d3bd56a3840d384ee0a24270658d139780ceb5a2f3e7aa3cb10d5e46360/wakatime-13.0.7.tar.gz" - sha256 "07a6d07e1227e3bd45242a2a4861d105bddc6220174a9b739c551bd2d45ce0fd" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "6415adc12bbcea7ae69fa5ca29848dac754e9f09cc0f21a2c246d4118e8aa90a" => :catalina - sha256 "6415adc12bbcea7ae69fa5ca29848dac754e9f09cc0f21a2c246d4118e8aa90a" => :mojave - sha256 "6415adc12bbcea7ae69fa5ca29848dac754e9f09cc0f21a2c246d4118e8aa90a" => :high_sierra - end - - depends_on "python@3.8" - - 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 - assert_match "Common interface for the WakaTime api.", shell_output("#{bin}/wakatime --help 2>&1") - - assert_match "error: Missing api key.", shell_output("#{bin}/wakatime --project test 2>&1", 104) - end -end diff --git a/Formula/wakeonlan.rb b/Formula/wakeonlan.rb deleted file mode 100644 index ab4ecb556e4f8..0000000000000 --- a/Formula/wakeonlan.rb +++ /dev/null @@ -1,28 +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 "017f70ad18520de448fa1e31d0e53d4b52ad548518da6923808b85d850bf3ee4" => :catalina - 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/wal2json.rb b/Formula/wal2json.rb deleted file mode 100644 index abc5ca4909aa3..0000000000000 --- a/Formula/wal2json.rb +++ /dev/null @@ -1,135 +0,0 @@ -class Wal2json < Formula - desc "Convert PostgreSQL changesets to JSON format" - homepage "https://github.com/eulerto/wal2json" - url "https://github.com/eulerto/wal2json/archive/wal2json_2_2.tar.gz" - sha256 "e2cb764ee1fccb86ba38dbc8a5e2acd2d272e96172203db67fd9c102be0ae3b5" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "f8d15f5d13d6e4942ccd4baa3ec633a39cd62337224eb1a165689cd2aebcbe51" => :catalina - sha256 "9f7218381271a905d4da6a943599cc1db3bbe92965dadc49ac2ae94a35350003" => :mojave - sha256 "18182f272c0ada8069adc54d65b3607c51c12e144b0cbe2620ee8fb3fb09c00f" => :high_sierra - end - - depends_on "postgresql" - - def install - mkdir "stage" - system "make", "install", "USE_PGXS=1", "DESTDIR=#{buildpath}/stage" - lib.install Dir["stage/#{HOMEBREW_PREFIX}/lib/*"] - end - - test do - return if ENV["CI"] - - system "initdb", testpath/"datadir" - mkdir testpath/"socket" - File.open(testpath/"datadir"/"postgresql.conf", "a") do |f| - f << "wal_level = logical\n" - f << "listen_addresses = ''\n" - f << "unix_socket_directories = '#{testpath}/socket'\n" - f << "dynamic_library_path = '$libdir:#{lib}/postgresql'\n" - end - pid = Process.fork { exec "postgres", "-D", testpath/"datadir" } - sleep 2 - begin - system "createdb", "-h", testpath/"socket", "test" - - input_sql = <<~EOS - CREATE TABLE table2_with_pk (a SERIAL, b VARCHAR(30), c TIMESTAMP NOT NULL, PRIMARY KEY(a, c)); - CREATE TABLE table2_without_pk (a SERIAL, b NUMERIC(5,2), c TEXT); - - SELECT 'init' FROM pg_create_logical_replication_slot('test_slot', 'wal2json'); - - BEGIN; - INSERT INTO table2_with_pk (b, c) VALUES('Backup and Restore', '2019-10-08 12:00:00'); - INSERT INTO table2_with_pk (b, c) VALUES('Tuning', '2019-10-08 12:00:00'); - INSERT INTO table2_with_pk (b, c) VALUES('Replication', '2019-10-08 12:00:00'); - DELETE FROM table2_with_pk WHERE a < 3; - - INSERT INTO table2_without_pk (b, c) VALUES(2.34, 'Tapir'); - -- it is not added to stream because there isn't a pk or a replica identity - UPDATE table2_without_pk SET c = 'Anta' WHERE c = 'Tapir'; - COMMIT; - - SELECT data FROM pg_logical_slot_get_changes('test_slot', NULL, NULL, 'pretty-print', '1'); - SELECT 'stop' FROM pg_drop_replication_slot('test_slot'); - EOS - - File.open(testpath/"input.sql", "w") do |f| - f.write(input_sql) - end - - system "psql", "-h", testpath/"socket", "-f", testpath/"input.sql", "-o", testpath/"output.txt", "-Atq", "test" - actual_output = File.read(testpath/"output.txt") - - expected_output = <<~EOS - init - { - "change": [ - { - "kind": "insert", - "schema": "public", - "table": "table2_with_pk", - "columnnames": ["a", "b", "c"], - "columntypes": ["integer", "character varying(30)", "timestamp without time zone"], - "columnvalues": [1, "Backup and Restore", "2019-10-08 12:00:00"] - } - ,{ - "kind": "insert", - "schema": "public", - "table": "table2_with_pk", - "columnnames": ["a", "b", "c"], - "columntypes": ["integer", "character varying(30)", "timestamp without time zone"], - "columnvalues": [2, "Tuning", "2019-10-08 12:00:00"] - } - ,{ - "kind": "insert", - "schema": "public", - "table": "table2_with_pk", - "columnnames": ["a", "b", "c"], - "columntypes": ["integer", "character varying(30)", "timestamp without time zone"], - "columnvalues": [3, "Replication", "2019-10-08 12:00:00"] - } - ,{ - "kind": "delete", - "schema": "public", - "table": "table2_with_pk", - "oldkeys": { - "keynames": ["a", "c"], - "keytypes": ["integer", "timestamp without time zone"], - "keyvalues": [1, "2019-10-08 12:00:00"] - } - } - ,{ - "kind": "delete", - "schema": "public", - "table": "table2_with_pk", - "oldkeys": { - "keynames": ["a", "c"], - "keytypes": ["integer", "timestamp without time zone"], - "keyvalues": [2, "2019-10-08 12:00:00"] - } - } - ,{ - "kind": "insert", - "schema": "public", - "table": "table2_without_pk", - "columnnames": ["a", "b", "c"], - "columntypes": ["integer", "numeric(5,2)", "text"], - "columnvalues": [1, 2.34, "Tapir"] - } - ] - } - stop - EOS - - assert_equal(expected_output.gsub(/\s+/, ""), actual_output.gsub(/\s+/, "")) - ensure - Process.kill 9, pid - Process.wait pid - end - end -end diff --git a/Formula/walkmod.rb b/Formula/walkmod.rb deleted file mode 100644 index 529a3f7634469..0000000000000 --- a/Formula/walkmod.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Walkmod < Formula - desc "Java-based open source tool to apply and share code conventions" - homepage "https://walkmod.com/" - url "https://bitbucket.org/rpau/walkmod/downloads/walkmod-3.0.0-installer.zip" - sha256 "7d83564b8b11ce02b5a0924e552a8f006524003a03749e5fe901c937cff3d544" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - # Remove windows files - rm_f Dir["bin/*.bat"] - libexec.install Dir["*"] - (bin/"walkmod").write_env_script libexec/"bin/walkmod", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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 84a755d283f1b..0000000000000 --- a/Formula/wallpaper.rb +++ /dev/null @@ -1,26 +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.1.0.tar.gz" - sha256 "4925247524535c0cc128dcc4d87f5538a5ce3b5d3a3c211127fd646ee00252b6" - license "MIT" - revision 1 - head "https://github.com/sindresorhus/macos-wallpaper.git" - - bottle do - cellar :any_skip_relocation - sha256 "2a2ca640dde6aed8dab04983c680d60532eefcadc11f3c0b379e7754d4d9a662" => :catalina - end - - depends_on :xcode => ["11.4", :build] - depends_on :macos => :sierra - - 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/wandio.rb b/Formula/wandio.rb deleted file mode 100644 index e3f88502d2620..0000000000000 --- a/Formula/wandio.rb +++ /dev/null @@ -1,28 +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.2.3.tar.gz" - sha256 "78c781ce2c3783b85d894e29005b7e98fc246b33f94616047de3bb4d11d4d823" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "028d07a97370b37fc28a2f2045bf3e4a9241d9c49f5eea2e635960ced7b6453c" => :catalina - sha256 "a16a370f4bd6d2acd415f305fb99b2bfba1b86f666c68877d01bd90ddcb7522b" => :mojave - sha256 "29602aec2851811108e97397e6310f091f5e5fe0844f9cfcd6657193d9c53ff4" => :high_sierra - end - - def install - system "./configure", "--with-http", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - 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_predicate testpath/"test.gz", :exist? - end -end diff --git a/Formula/waon.rb b/Formula/waon.rb deleted file mode 100644 index e2f243de4cbbc..0000000000000 --- a/Formula/waon.rb +++ /dev/null @@ -1,34 +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" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "47eaaeeea5b323dced48d444ffc21c2f16b86443271952bceac22abd788ebd8f" => :catalina - sha256 "22b3f3cc1a0796db2bf6b808b7157a2e1cacf30b6437998a9f5bdc9482bbfbf8" => :mojave - sha256 "5c3c49f0740bfcf9d34fd9468af3d9caa8f19c53ee1d25f8d69442d63859c9ab" => :high_sierra - sha256 "d7fd9859544bf3ccb739942f0db00928469356f4d82ab7848cdba2ae5c5e99e9" => :sierra - sha256 "6f09559eaf287022f280991b44b5f4e86435fafda167c97a78239602183a3758" => :el_capitan - sha256 "a16c4df918f59a71396d7c4a5806bafe4bda4a89d3aeb2a52d8dfd41ce6c0432" => :yosemite - sha256 "7469ec9aa8f549c1294ddb362f8ec2473466c5b027007f3c14fb49984353d813" => :mavericks - 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/wapm.rb b/Formula/wapm.rb deleted file mode 100644 index e71bbb7b8e60f..0000000000000 --- a/Formula/wapm.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Wapm < Formula - desc "WebAssembly Package Manager (CLI)" - homepage "https://wapm.io/" - url "https://github.com/wasmerio/wapm-cli/archive/v0.5.0.tar.gz" - sha256 "7731d476585105fbb0ac5766661b4b68f1680b7071635654042bdaeef3b66987" - license "MIT" - head "https://github.com/wasmerio/wapm-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "4f1c18ce08a6f4a483a50888ad9769898a203bd826b992f877010f38a80ca710" => :catalina - sha256 "db34bd4d679207ae7d903a4beada8e30e3568f16c55fd610a196931c440716ef" => :mojave - sha256 "70e4c8f038838547a2e70116567c1042f2f4cec53542e0750d4d061f80dc7b23" => :high_sierra - end - - depends_on "rust" => :build - depends_on "wasmer" => :test - - 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/wartremover.rb b/Formula/wartremover.rb deleted file mode 100644 index a04e0815395a9..0000000000000 --- a/Formula/wartremover.rb +++ /dev/null @@ -1,38 +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.4.9.tar.gz" - sha256 "98fc15dfa9cd1da06116a8ea22413c021f1542547ada5985dc92336bca42208e" - license "Apache-2.0" - head "https://github.com/wartremover/wartremover.git" - - bottle do - cellar :any_skip_relocation - sha256 "b035124c934d0df9387b761b5072207b1d1dc0b1191b4e5e56accfa3c70b3eaf" => :catalina - sha256 "b8625d2e85cbaa9dc94398f40d80d3ff864e7982e6dba4d1316c5299d229a484" => :mojave - sha256 "9e22985585006d2ed0cac559dd8c1af5b77072cfe5a3a98f97563c1aa6afe145" => :high_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/wasm-pack.rb b/Formula/wasm-pack.rb deleted file mode 100644 index 512eee3368578..0000000000000 --- a/Formula/wasm-pack.rb +++ /dev/null @@ -1,32 +0,0 @@ -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/v0.9.1.tar.gz" - sha256 "56930d1f15bbcc85771e9b8e5c1b7bb6734b2c410c353ecd11eae828e35d5fb0" - head "https://github.com/rustwasm/wasm-pack.git" - - bottle do - cellar :any_skip_relocation - sha256 "349d47601c15c1639f9a2c303544addd05b6178a0ae9c3dff15ce53f74d2dfc6" => :catalina - sha256 "3fa2dd4e71144a07b14323486a31ef12065d31b90e30c30394f2833b205781db" => :mojave - sha256 "f6bc091f507521b82e308a1f1aabdaa1e6afdae80e3beaa0c097bf5702e55c1e" => :high_sierra - end - - depends_on "rust" => :build - depends_on "rustup-init" - - def install - system "cargo", "install", *std_cargo_args - end - - test do - assert_match "wasm-pack #{version}", shell_output("#{bin}/wasm-pack --version") - - system "#{Formula["rustup-init"].bin}/rustup-init", "-y", "--no-modify-path" - ENV.prepend_path "PATH", HOMEBREW_CACHE/"cargo_cache/bin" - - system bin/"wasm-pack", "new", "hello-wasm" - system bin/"wasm-pack", "build", "hello-wasm" - assert_predicate testpath/"hello-wasm/pkg/hello_wasm_bg.wasm", :exist? - end -end diff --git a/Formula/wasm3.rb b/Formula/wasm3.rb deleted file mode 100644 index e47c93a9529f2..0000000000000 --- a/Formula/wasm3.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Wasm3 < Formula - desc "The fastest WebAssembly interpreter" - homepage "https://github.com/wasm3/wasm3" - url "https://github.com/wasm3/wasm3/archive/v0.4.7.tar.gz" - sha256 "11e863a643f605d62a5276e342abb01a65d33d138d01ea0070622a3f78fa1bd5" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "f2e961b5a0ab02691fe707568a0975fb1b77c75b1e949cff863117efc4eb23f8" => :catalina - sha256 "263421ab14ca11c25dce074033945db85a5f333fc2c7715a1245b3826beef72e" => :mojave - sha256 "4b36e31ed5c9c109cefad55fc126091f60e416c6c1a846a636ac8d789f8bc7dd" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "cmake", "--build", "." - bin.install "wasm3" - end - # fib32.wasm is used for testing - prefix.install "test/lang/fib32.wasm" - end - - test do - # Run function fib(24) and check the result is 46368 - assert_equal "Result: 46368", shell_output("#{bin}/wasm3 --func fib #{prefix}/fib32.wasm 24 2>&1").strip - end -end diff --git a/Formula/wasmer.rb b/Formula/wasmer.rb deleted file mode 100644 index 43c2d378f1292..0000000000000 --- a/Formula/wasmer.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Wasmer < Formula - desc "🚀 The Universal WebAssembly Runtime" - homepage "https://wasmer.io/" - url "https://github.com/wasmerio/wasmer/archive/0.16.2.tar.gz" - sha256 "c2a5aa609fae558d07a24f268489d748093ae8e7c6f42699d1f7316ac3b44968" - license "MIT" - head "https://github.com/wasmerio/wasmer.git" - - bottle do - cellar :any_skip_relocation - sha256 "751b4b059036dbca254eef935bc03240e1fd559465a376a0cff8f5a41dcd3980" => :catalina - sha256 "725d2b857e0954b1e2fd8a01021847e168d5daec33cd76c32f90a0ae12fdf422" => :mojave - sha256 "42ea898c1ebd9c0ac58bf21117c05df6a4726123590444c19173a01586c80c63" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "rust" => :build - depends_on "wabt" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - wasm = ["0061736d0100000001070160027f7f017f030201000707010373756d00000a09010700200020016a0b"].pack("H*") - (testpath/"sum.wasm").write(wasm) - assert_equal "sum([I32(1), I32(2)]) returned [I32(3)]\n", - shell_output("#{bin}/wasmer run #{testpath/"sum.wasm"} --invoke sum 1 2") - end -end diff --git a/Formula/watch-sim.rb b/Formula/watch-sim.rb deleted file mode 100644 index 114a701cfe627..0000000000000 --- a/Formula/watch-sim.rb +++ /dev/null @@ -1,31 +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" - license "MIT" - head "https://github.com/alloy/watch-sim.git" - - bottle do - cellar :any_skip_relocation - sha256 "bee9797e2c3a52b7dea9b6c5158bb78485b7ee10af530f84d81f31e20babf894" => :catalina - 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 8ee8d3a2c94d7..0000000000000 --- a/Formula/watch.rb +++ /dev/null @@ -1,41 +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.16", - :revision => "59c88e18f29000ceaf7e5f98181b07be443cf12f" - license "GPL-2.0" - head "https://gitlab.com/procps-ng/procps.git" - - bottle do - cellar :any - sha256 "011e48363fe62c7a4ba0dec746d5964ee25545bde7855a31db0cb411420df190" => :catalina - sha256 "d17aba6f80c530e6b91b30e088df60aab3dc84b2f57ca7499928322438b9f0d2" => :mojave - sha256 "13d63ebc419965182d98f10b25cc99961679e1ba5ce6118e66b7037eb4e78de8" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - depends_on "ncurses" - - conflicts_with "visionmedia-watch" - - def install - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--disable-nls", - "--enable-watch8bit" - 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 bf18f857fb2c8..0000000000000 --- a/Formula/watchexec.rb +++ /dev/null @@ -1,30 +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.14.0.tar.gz" - sha256 "605f58028adf7a9fac42e992633e6291503eefbbbef056607b4b90ed71931f2b" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "d9fde64c4686cb698694de2a08b007248859d7bd80b20ce539dfaf9d5d403acf" => :catalina - sha256 "e16c18b5a3f0b853b5e966aa29e274c6da83b528c76843fbff558dd216974b94" => :mojave - sha256 "69a4a23a68b64e2bc1b5796b4a30f8a6cd1abcff70209d87cf3165c99b7438bc" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - man1.install "doc/watchexec.1" - end - - test do - o = IO.popen("#{bin}/watchexec -1 --postpone -- echo 'saw file change'") - sleep 1 - touch "test" - sleep 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 ffb08c4b4b4ad..0000000000000 --- a/Formula/watchman.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Watchman < Formula - desc "Watch files and take action when they change" - homepage "https://github.com/facebook/watchman" - license "Apache-2.0" - revision 4 - 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 "7840f564c11d33425c9eb8985f9156e782e66ef2a3578329dba83ee15a9bf0be" => :catalina - sha256 "ba2338b0f23c8b8817fd7bfa92466b7a97ab416e93ec6c3a400041aef013de86" => :mojave - sha256 "150468653b5c5a8e4eb92a3ecf420f157ed0e4772513ee93425bb3f635964dad" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - depends_on "pcre" - depends_on "python@3.8" - - 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 - python3 = Formula["python@3.8"].opt_bin/"python3" - 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 41aadb2ba1218..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/d3/1c/b2e928b12a320ee098da477b50ee9dd1d5054b9501f63fae670767bee279/td-watson-1.10.0.tar.gz" - sha256 "f223bc0cd03a4baeb0b149032731edda9c6fc0c04ff61d819c6f542f01957369" - license "MIT" - head "https://github.com/TailorDev/Watson.git" - - bottle do - cellar :any_skip_relocation - sha256 "583a25260198299269ba64f89afa737eb99afbd7ab36796b714c893bae7975be" => :catalina - sha256 "483126d899edf48bd344dfa75c13a3b2a62df7e17e6a162a573ec39b5ee58220" => :mojave - sha256 "9ae4b875d9424a815e1594fa23a78f6c4ad26230b93c4234e99b7f8a3a6984a3" => :high_sierra - end - - depends_on "python@3.8" - - resource "arrow" do - url "https://files.pythonhosted.org/packages/3f/e5/ddd9d095abbd249c2a610e6676c806a5f156c943677b30c2904f4c18f1b9/arrow-0.15.7.tar.gz" - sha256 "3f1a92b25bbee5f80cc8f6bdecfeade9028219229137c559c37335b4f574a292" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - 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/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz" - sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a" - end - - resource "click-didyoumean" do - url "https://files.pythonhosted.org/packages/9f/79/d265d783dd022541b744d002745d9e55d84c04a41930e35d8795934f6526/click-didyoumean-0.0.3.tar.gz" - sha256 "112229485c9704ff51362fe34b2d4f0b12fc71cc20f6d2b3afabed4b8bfa6aeb" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz" - sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - 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 ac93b890e92fe..0000000000000 --- a/Formula/wavpack.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Wavpack < Formula - desc "Hybrid lossless audio compression" - homepage "http://www.wavpack.com/" - url "http://www.wavpack.com/wavpack-5.3.0.tar.bz2" - sha256 "b6f00b3a2185a1d2df6cf8d893ec60fd645d2eb90db7428a617fd27c9e8a6a01" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "299242c1b63c8c7fa4119fd2bf4308f8cb0b49ac04f4d5502f64555be2cf06e2" => :catalina - sha256 "6985e1becaf974e8686208a038ade4eb333b68f0166c26cecf3b69f4a84797f0" => :mojave - sha256 "e767c61eade23b1624dd4d78ee67817ee2175fd42600680aae731b58a4024d12" => :high_sierra - 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 7d0dc5ec9c629..0000000000000 --- a/Formula/wbox.rb +++ /dev/null @@ -1,26 +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 "512db23fe4356c552e240cf3457ff50225bb6d01fd786df356fb39e4b8f18288" => :catalina - 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 70cd6d31f938d..0000000000000 --- a/Formula/wcslib.rb +++ /dev/null @@ -1,32 +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-7.3.tar.bz2" - sha256 "4b01cf425382a26ca4f955ed6841a5f50c55952a2994367f8e067e4183992961" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "a0e15ea5ee23106c24960feed0c7dad6762d8e75cb9d42445c197fb38f079965" => :catalina - sha256 "d8b3561a7e87031d7d6f8042af1c75f21663874921da17d5061d3ffe558263f1" => :mojave - sha256 "941ce001ceb21e53dc6af78e8e09ebc52a24b57efcd51c009f8416789674f8ee" => :high_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" - 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 4d9d3f10025f0..0000000000000 --- a/Formula/wdc.rb +++ /dev/null @@ -1,60 +0,0 @@ -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/v1.1.5.tar.gz" - sha256 "3c45341521da9c68328c5fa8909d838915e8a768e7652ff1bcc2fbbd46ab9f64" - - bottle do - cellar :any_skip_relocation - sha256 "18365f76dafd05a312e9a7862f2fa747caa8c63e881469719a8ef45d07dce3c6" => :catalina - sha256 "fbcaccbaa2440ac38f9efa41a342eef4d883e522fa5df7d642aaa1563d38f28b" => :mojave - sha256 "92dcb68d02f64ff51446052bf5c41fa178cc48ade406a9533199461476f7c849" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "boost" - depends_on "openssl@1.1" - depends_on "pugixml" - - uses_from_macos "curl" - - def install - pugixml = Formula["pugixml"] - ENV.prepend "CXXFLAGS", "-I#{pugixml.opt_include.children.first}" - inreplace "CMakeLists.txt", "CURL CONFIG REQUIRED", "CURL REQUIRED" - system "cmake", ".", "-DPUGIXML_INCLUDE_DIR=#{pugixml.opt_include}", - "-DPUGIXML_LIBRARY=#{pugixml.opt_lib}", - "-DHUNTER_ENABLED=OFF", *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::unique_ptr client{ new WebDAV::Client{ options } }; - auto check_connection = client->check(); - assert(!check_connection); - } - EOS - pugixml = Formula["pugixml"] - openssl = Formula["openssl@1.1"] - system ENV.cxx, "test.cpp", "-o", "test", "-lcurl", "-std=c++11", - "-L#{lib}", "-lwdc", "-I#{include}", - "-L#{openssl.opt_lib}", "-lssl", "-lcrypto", - "-I#{openssl.opt_include}", - "-L#{pugixml.opt_lib}", "-lpugixml", - "-I#{pugixml.opt_include}" - system "./test" - end -end diff --git a/Formula/wdfs.rb b/Formula/wdfs.rb deleted file mode 100644 index 015d1d5ebbbe7..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" - revision 1 - - bottle do - cellar :any - sha256 "a00329ad59065dc12983272eb1da0e861aa73cbfa8b2edc69393a5a2eba4e49f" => :catalina - sha256 "edf41371511f947ef47c0ad7575cffb5831687c975f000f51e538133ec42563f" => :mojave - sha256 "f2f3ad809ea9104bb5fd49b4f903b0465707baf76be3329422ea34aeed8bacb4" => :high_sierra - sha256 "7aab5f9c3d807f73dfe9df437a15806b74bc5a76cd3cd13e961ea781c7fa32fb" => :sierra - 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 ee2bba1f064b7..0000000000000 --- a/Formula/wdiff.rb +++ /dev/null @@ -1,39 +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 2 - - bottle do - sha256 "cd316e673c68a54b9be013a7a0fb96beba13648bd0048f7f1fd8b7a8b07ab821" => :catalina - sha256 "89e0de3859b91c4dcdc4a9ac2ae4569f72cd472658e6d3dfa82e6acc919c68a1" => :mojave - sha256 "579a8972310d39ac2e660f3114fc6d1536df7ad9f7659a9b00619cc7c50a2191" => :high_sierra - sha256 "fcfe6296c4b9879895a4977274f56474faa84ca74c792866ea3149a2f02df553" => :sierra - end - - depends_on "gettext" - - uses_from_macos "ncurses" - - 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 087f710848875..0000000000000 --- a/Formula/weaver.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Weaver < Formula - desc "Command-line tool for Weaver" - homepage "https://github.com/scribd/Weaver" - url "https://github.com/scribd/Weaver/archive/1.0.7.tar.gz" - sha256 "600a49ea7dbe58f57bf40afb7be7a42fb382ce41d807549e427b23e8504d5e02" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "a0b1284a91a4647fa7b3c980fc237b0677e959c821d62ca31a5b3ea8a63abf40" => :catalina - sha256 "3db8730a06cb3ddd12a35097239afd85ea365c3e291a73422f37f23955230007" => :mojave - end - - depends_on :xcode => ["11.2", :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 6901098290e15..0000000000000 --- a/Formula/web100clt.rb +++ /dev/null @@ -1,44 +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 - cellar :any - rebuild 1 - sha256 "6674131c694ef7d4b8f0bc6fe8342ddc6e015b180efcf1f9452366cfb5eaf2d9" => :catalina - sha256 "d0657f34a029afff0189246744dd03d276ea9091e61b6dd208aea81b7e58cf36" => :mojave - sha256 "d6d8ecf4d6e7aa7da29fab7d2fe58db4c6da2da60b777be22d12854c15ea0887" => :high_sierra - sha256 "a6c81629d7e8171694cc14ebd5a1fc2280f23643be442f1103ac5a84403e344a" => :sierra - end - - depends_on "i2util" - depends_on "jansson" - depends_on "openssl@1.1" - - # fixes issue with new default secure strlcpy/strlcat functions in 10.9 - # https://github.com/ndt-project/ndt/issues/106 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/37aa64888341/web100clt/ndt-3.6.5.2-osx-10.9.patch" - sha256 "86d2399e3d139c02108ce2afb45193d8c1f5782996714743ec673c7921095e8e" - end - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}", - "--with-openssl=#{Formula["openssl@1.1"].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 51ea9fb0ff7f6..0000000000000 --- a/Formula/webalizer.rb +++ /dev/null @@ -1,36 +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://deb.debian.org/debian/pool/main/w/webalizer/webalizer_2.23.08.orig.tar.gz" - sha256 "edaddb5aa41cc4a081a1500e3fa96615d4b41bc12086bcedf9938018ce79ed8d" - revision 2 - - bottle do - sha256 "c7b023658cc745cb0e5d383953e23a2d5a07dcf08b8e4addee7b7a108ef3a725" => :catalina - 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 010b0f2afc9fd..0000000000000 --- a/Formula/webarchiver.rb +++ /dev/null @@ -1,28 +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.10.tar.gz" - sha256 "06705d361ebb1de6411e4d386a01a60314aa52d5c20f64603c1b9652a3eceae4" - head "https://github.com/newzealandpaul/webarchiver.git" - - bottle do - cellar :any_skip_relocation - sha256 "7413d45de93fbe6fcc3bc9af073a2bb063cdad7f3479d6bf890634d48761df22" => :catalina - sha256 "ffd1e97727c1551d6bfc63ba3980469ca7be4c99bbd89c1036671a1e3463e3e3" => :mojave - sha256 "fe85ee50f8a3da76dcbcd8bb24c1bea05bde33525055c4d471c8b07fccadfa65" => :high_sierra - 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 405e44ce03877..0000000000000 --- a/Formula/webdis.rb +++ /dev/null @@ -1,77 +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.11.tar.gz" - sha256 "76f90e42d82a97c319f19005a8729d257d870869d5f0085db7d9c84745833715" - license "BSD-2-Clause" - - bottle do - cellar :any - sha256 "d0f5052f9479bba534cdc8f5acfb047207d46b7e03aa3bea8bc9b17a07a27948" => :catalina - sha256 "e27da82c3099bbc9194c2a53dd3113580874e06ac8dc206f1523636cb678d3a2" => :mojave - sha256 "1947a8b3ffcb642053eefc5fa48aca88604148713fe8ae57eb4ab80a6991b097" => :high_sierra - 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 - port = free_port - cp "#{etc}/webdis.json", "#{testpath}/webdis.json" - inreplace "#{testpath}/webdis.json", "\"http_port\":\t7379,", "\"http_port\":\t#{port}," - - server = fork do - exec "#{bin}/webdis", "#{testpath}/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:#{port}/PING")) - ensure - Process.kill "TERM", server - Process.wait server - end -end diff --git a/Formula/webfs.rb b/Formula/webfs.rb deleted file mode 100644 index d6335ce75fb49..0000000000000 --- a/Formula/webfs.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Webfs < Formula - desc "HTTP server for purely static content" - homepage "http://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 - rebuild 1 - sha256 "192b771c2cf819773c9581bcdc83dacb9954c241ab41837ff844f736a53d5a1e" => :catalina - sha256 "f561f9dac64cd43165eefd01619d54042507a4f9a1d572c621e17229b63ec045" => :mojave - sha256 "52608c9f1bd5d7e7fceec24bff51ca67e0739b1c83ae2676c6ca161fdfaaa4d7" => :high_sierra - sha256 "9e678532e4546e4fabb9a96b9eb141769e00e330e15c9e5b453001141448c9fb" => :sierra - end - - depends_on "openssl@1.1" - - patch :p0 do - url "https://github.com/Homebrew/formula-patches/raw/0518a6d1ed821aebf0de4de78e39b57d6e60e296/webfs/patch-ls.c" - sha256 "8ddb6cb1a15f0020bbb14ef54a8ae5c6748a109564fa461219901e7e34826170" - end - - def install - ENV["prefix"]=prefix - system "make", "install", "mimefile=/etc/apache2/mime.types" - 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/webkit2png.rb b/Formula/webkit2png.rb deleted file mode 100644 index cf05616d9a6d3..0000000000000 --- a/Formula/webkit2png.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Webkit2png < Formula - desc "Create screenshots of webpages from the terminal" - homepage "https://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 63b6851c9a3d7..0000000000000 --- a/Formula/weboob.rb +++ /dev/null @@ -1,137 +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/7b91875f693b60e93c5976daa051034b/weboob-2.0.tar.gz" - mirror "https://files.pythonhosted.org/packages/88/c1/b3423348d8e2a557c7e0d53b5977cf1a382703c7b4d1397876836184b493/weboob-2.0.tar.gz" - sha256 "fc8be1f77ad3a53285cef8b20a8b747960c163fad729c56838043d8ddcdfc9b0" - revision 1 - - bottle do - cellar :any - sha256 "b0258a8a3e10541d81b2eb546f42e650437d0bccdf9625cdac309ec9e374aa2a" => :catalina - sha256 "0916a1cf462a4630ae2f4d3650ce9c8efc9f82c28bfcb3aea255ff2ae5fcce87" => :mojave - sha256 "7d5eb2b628f85938aa6a484f7c102bfeea3e6bfb3d27e0912dcff7f5a9300dab" => :high_sierra - end - - depends_on "freetype" - depends_on "gnupg" - depends_on "jpeg" - depends_on "libyaml" - depends_on "python@3.8" - - resource "Babel" do - url "https://files.pythonhosted.org/packages/34/18/8706cfa5b2c73f5a549fdc0ef2e24db71812a2685959cff31cbdfc010136/Babel-2.8.0.tar.gz" - sha256 "1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" - sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" - 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/70/54/37630f6eb2c214cdee2ae56b7287394c8aa2f3bafb8b4eb8c3791aae7a14/cssselect-1.1.0.tar.gz" - sha256 "f95f8dedd925fd8f54edb3d2dfb44c190d9d18512377d3c1e2388d16126879bc" - end - - resource "html2text" do - url "https://files.pythonhosted.org/packages/6c/f9/033a17d8ea8181aee41f20c74c3b20f1ccbefbbc3f7cd24e3692de99fb25/html2text-2020.1.16.tar.gz" - sha256 "e296318e16b059ddb97f7a8a1d6a5c1d7af4544049a01e261731d2d5cc277bbb" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz" - sha256 "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60" - end - - resource "Pillow" do - url "https://files.pythonhosted.org/packages/ce/ef/e793f6ffe245c960c42492d0bb50f8d14e2ba223f1922a5c3c81569cec44/Pillow-7.1.2.tar.gz" - sha256 "a0b49960110bc6ff5fead46013bcb8825d101026d466f3a4de3476defe0fb0dd" - end - - resource "python-dateutil" do - url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz" - sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c" - end - - resource "pytz" do - url "https://files.pythonhosted.org/packages/f4/f6/94fee50f4d54f58637d4b9987a1b862aeb6cd969e73623e02c5c00755577/pytz-2020.1.tar.gz" - sha256 "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "Unidecode" do - url "https://files.pythonhosted.org/packages/b1/d6/7e2a98e98c43cf11406de6097e2656d31559f788e9210326ce6544bd7d40/Unidecode-1.1.1.tar.gz" - sha256 "2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - def install - venv = virtualenv_create(libexec, "python3.8") - - 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! "xcb.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 - - 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 - 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", "modules" - end -end diff --git a/Formula/webp.rb b/Formula/webp.rb deleted file mode 100644 index 44f7cc3082877..0000000000000 --- a/Formula/webp.rb +++ /dev/null @@ -1,43 +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.1.0.tar.gz" - sha256 "98a052268cc4d5ece27f76572a7f50293f439c17a98e67c4ea0c7ed6f50ef043" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "27c76a7054277ff5a2e844c5996fc731d8644acbaaa505d35dba42c4a48a0c51" => :catalina - sha256 "819c76cbf75c1d1d51db88602b69a9d9cd24975cc65834a9eb5a804c4b96ee35" => :mojave - sha256 "069cac577750d53095cc43a05a3eab54310c35ea819ea05fa6bf425bcb0313d2" => :high_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" - depends_on "libtiff" - - 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 77c64e98359ab..0000000000000 --- a/Formula/webpack.rb +++ /dev/null @@ -1,55 +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.43.0.tgz" - sha256 "66d201133b2278182102c7ab65ebddf7e5015e5ee886a3e390802a958496e1ec" - license "MIT" - head "https://github.com/webpack/webpack.git" - - bottle do - sha256 "137a3c31a4207a5d89d0daa3623d2f43ea91df21cac555c3756318d10f9daeca" => :catalina - sha256 "e07262fae60d677ad1420e71ea613fe3b50588aaf00a352aaa0b0c54ffb83c4f" => :mojave - sha256 "dde296728283eb40c80175a6911c181223ae94c137f0b2eee1a2ca855d75a682" => :high_sierra - end - - depends_on "node" - - resource "webpack-cli" do - url "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.11.tgz" - sha256 "dace2e99dc7b819b4695c69c327a0da9f56f799f15d20346b22a6cc22c5fb794" - 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 7ad07c205e27e..0000000000000 --- a/Formula/websocat.rb +++ /dev/null @@ -1,29 +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.6.0.tar.gz" - sha256 "3f7e5e99d766b387292af56c8e4b39ce9a7f0da54ff558a6080ddc1024a33896" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "b9ec3480735006f0603df6a0f4ba123f3bf807f8b2c731070975263088b6cc8f" => :catalina - sha256 "cfb99f76c48c5ef48ee89118012a75a8b78c1f3602db084407e3fd4e7f0922eb" => :mojave - sha256 "c865fed700599d7619e91ecb815b2672b9a1d9da6b4289383cd5455d82d79743" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "rust" => :build - - on_linux do - depends_on "openssl@1.1" - 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/websocketd.rb b/Formula/websocketd.rb deleted file mode 100644 index f7bc6b7737fae..0000000000000 --- a/Formula/websocketd.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Websocketd < Formula - desc "WebSockets the Unix way" - homepage "http://websocketd.com/" - url "https://github.com/joewalnes/websocketd/archive/v0.3.1.tar.gz" - sha256 "323700908ca7fe7b69cb2cc492b4746c4cd3449e49fbab15a4b3a5eccf8757f4" - license "BSD-2-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "614c1bb4d3fdd65e452d7af66d5cac5e397ff452d2b023dbd1261e632ec346e9" => :catalina - sha256 "a0ad536184c0f12c3c65710be453e810eda0ffa3b0109a56f69b364c05439703" => :mojave - sha256 "a2b5e17e00e1c74b52cf0d44ba802bc6e0eb450e950530cedd7cef38e83437ca" => :high_sierra - sha256 "5200608539895835b8faa52b886fe9181c23e94c560c4ef9f2f6afe842de3626" => :sierra - end - - depends_on "go" => :build - - def install - ENV["GOPATH"] = buildpath - - src = buildpath/"src/github.com/joewalnes/websocketd" - src.install buildpath.children - src.cd do - system "go", "build", "-ldflags", "-X main.version=#{version}", "-o", bin/"websocketd" - man1.install "release/websocketd.man" => "websocketd.1" - prefix.install_metafiles - end - 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/webtorrent-cli.rb b/Formula/webtorrent-cli.rb deleted file mode 100644 index 19e159ee92f1c..0000000000000 --- a/Formula/webtorrent-cli.rb +++ /dev/null @@ -1,49 +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-3.0.6.tgz" - sha256 "0690fc5f02163edcb1f7175d30bc637a9252e210e02284e2162c7fb2b20044ec" - license "MIT" - - bottle do - sha256 "33106a951bca768ff80530e4aad0add3e0837ca780c6af83f08277bee1b14b87" => :catalina - sha256 "04d9b89601b80660e69b55e0fd0009652fae8f16bcace18e2f35dacb22bad1f8" => :mojave - sha256 "c3f9b2aa7330a8e28830967300468aba27f34a7382c93272fe66e37c0845e8bf" => :high_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 - 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/announce", - "udp://tracker.archlinux.org:6969" - ], - "infoHash": "9eae210fe47a073f991c83561e75d439887be3f3", - "name": "archlinux-2017.02.01-x86_64.iso", - "announce": [ - "https://tracker.archlinux.org/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 463f60d652b1e..0000000000000 --- a/Formula/weechat.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Weechat < Formula - desc "Extensible IRC client" - homepage "https://www.weechat.org/" - url "https://weechat.org/files/src/weechat-2.8.tar.xz" - sha256 "553ea295edad3b03cf88e6029c21e7bde32ff1cc026d35386ba9da3e56a6018c" - license "GPL-3.0" - revision 5 - head "https://github.com/weechat/weechat.git" - - bottle do - sha256 "7ed7a9b41fc85455fd858d42f92055d72df8a67fef28ffda7eb5a12bb6dea890" => :catalina - sha256 "b073952ee52a2bd0aea1fdc0520ca693be05e0e9aa031b254cd1fe95665b8787" => :mojave - sha256 "454c8b6cff73afd673fc4ad5626ea1bc740b4f4aefeb8c860ebe5c09028854b6" => :high_sierra - end - - depends_on "asciidoctor" => :build - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "aspell" - depends_on "gettext" - depends_on "gnutls" - depends_on "libgcrypt" - depends_on "libiconv" - depends_on "lua" - depends_on "ncurses" - depends_on "perl" - depends_on "python@3.8" - depends_on "ruby" - - uses_from_macos "curl" - uses_from_macos "tcl-tk" - - def install - args = std_cmake_args + %W[ - -DENABLE_MAN=ON - -DENABLE_GUILE=OFF - -DCA_FILE=#{Formula["gnutls"].pkgetc}/cert.pem - -DENABLE_JAVASCRIPT=OFF - -DENABLE_PHP=OFF - ] - - # Fix system gem on Mojave - ENV["SDKROOT"] = ENV["HOMEBREW_SDKROOT"] - - mkdir "build" do - system "cmake", "..", *args - system "make", "install", "VERBOSE=1" - end - 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 301ead57f0e4a..0000000000000 --- a/Formula/wego.rb +++ /dev/null @@ -1,51 +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" - license "ISC" - head "https://github.com/schachmat/wego.git" - - bottle do - cellar :any_skip_relocation - sha256 "5ac6a153a25c0d68564d000f52642d0891fc85de2183732b9d7b171b5e629146" => :catalina - 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 7b896e4fa7354..0000000000000 --- a/Formula/weighttp.rb +++ /dev/null @@ -1,32 +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" - license "MIT" - head "https://git.lighttpd.net/lighttpd/weighttp.git" - - bottle do - cellar :any - sha256 "b76ee9060b8cb86897af45c620b1f1fb3d757955a2a2f8e4c55ef6a153bfc547" => :catalina - 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 7389b4b230306..0000000000000 --- a/Formula/wellington.rb +++ /dev/null @@ -1,51 +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" - license "Apache-2.0" - 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 - - def install - 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 8be8ee65dc03e..0000000000000 --- a/Formula/wemux.rb +++ /dev/null @@ -1,44 +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" - license "MIT" - head "https://github.com/zolrath/wemux.git" - - bottle do - cellar :any_skip_relocation - rebuild 3 - sha256 "5fb4eaf177d1766716003032bfc632d02ebed302c57e00dc752ed3de4b9cf1f6" => :catalina - sha256 "5fb4eaf177d1766716003032bfc632d02ebed302c57e00dc752ed3de4b9cf1f6" => :mojave - sha256 "5fb4eaf177d1766716003032bfc632d02ebed302c57e00dc752ed3de4b9cf1f6" => :high_sierra - 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/wget.rb b/Formula/wget.rb deleted file mode 100644 index 1b31ada90e615..0000000000000 --- a/Formula/wget.rb +++ /dev/null @@ -1,49 +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.3.tar.gz" - sha256 "31cccfc6630528db1c8e3a06f6decf2a370060b982841cfab2b8677400a5092e" - revision 2 - - bottle do - sha256 "ef65c759c5097a36323fa9c77756468649e8d1980a3a4e05695c05e39568967c" => :catalina - sha256 "28f4090610946a4eb207df102d841de23ced0d06ba31cb79e040d883906dcd4f" => :mojave - sha256 "91dd0caca9bd3f38c439d5a7b6f68440c4274945615fae035ff0a369264b8a2f" => :high_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 "libidn2" - depends_on "openssl@1.1" - - 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@1.1"].opt_prefix}", - # Work around a gnulib issue with macOS Catalina - "gl_cv_func_ftello_works=yes", - "--disable-debug", - "--disable-pcre", - "--disable-pcre2", - "--without-libpsl" - 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 ca495f8c5d321..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.29.tar.bz2" - sha256 "42e42437f97376c9a2793839344205eff40c9f6b4a7d356e17fef83f72e7e0e6" - - 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/whalebrew.rb b/Formula/whalebrew.rb deleted file mode 100644 index 9adb3c3e96055..0000000000000 --- a/Formula/whalebrew.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Whalebrew < Formula - desc "Homebrew, but with Docker images" - homepage "https://github.com/whalebrew/whalebrew" - url "https://github.com/whalebrew/whalebrew.git", - :tag => "0.2.3", - :revision => "7b371f6e0fa414e61761359441268b61c8a741ff" - license "Apache-2.0" - head "https://github.com/whalebrew/whalebrew.git" - - bottle do - cellar :any_skip_relocation - sha256 "3243317cffe305c9c21a458793f4319b9784e979cf3225663df3e83b53e1736f" => :catalina - sha256 "9abfd2e5951f589dde2cc9847b44e77741785a8b9ff5208c958bd8233def74b8" => :mojave - sha256 "66e059ff26ef8e1a7d15416bf0b3a946716e03e60cf7f1281e572dcd78b1f4d8" => :high_sierra - sha256 "a6357b16b2285d65c523902fa90180f3b6e77b08196cf6edce3f32b38202ff54" => :sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"whalebrew", "." - end - - test do - output = shell_output("#{bin}/whalebrew install whalebrew/whalesay -y", 255) - assert_match "Cannot connect to the Docker daemon", output - end -end diff --git a/Formula/whatmask.rb b/Formula/whatmask.rb deleted file mode 100644 index 85a9d43bafb0a..0000000000000 --- a/Formula/whatmask.rb +++ /dev/null @@ -1,41 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "61c0c22cf55881e970a1e2cd239eb805b0e32733abbcba959f8540fc4fb6c1b5" => :catalina - sha256 "acfac14343f3a746de062b9cbe300bcfb6287df43fd2c4ec5395f7c49e51e7ad" => :mojave - sha256 "a46f984a59776d23efc00fbae9841026547f5c4f3884c31007c06acae51d4881" => :high_sierra - sha256 "7d9c8318c69271c9b7774a4f84cd315f28986bd7dacc1f1c9a5451880a415a8b" => :sierra - sha256 "acf751e4893268ccbee1e48e9f7a147cc38f64a9d178fc50c810d65c0466a648" => :el_capitan - sha256 "428a92b2ba5a3f6f39009a7d3a7fc503b4308fadaeddc287b39fd6b5bdddef74" => :yosemite - sha256 "c07eb39e586dbc2b78b4c8cf8173c701ac654e4db0fd5fe12b3c7f80ee3ef577" => :mavericks - 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 80699f4ac9cc1..0000000000000 --- a/Formula/whatmp3.rb +++ /dev/null @@ -1,36 +0,0 @@ -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/v3.8.tar.gz" - sha256 "0d8ba70a1c72835663a3fde9ba8df0ff7007268ec0a2efac76c896dea4fcf489" - license "MIT" - revision 3 - head "https://github.com/RecursiveForest/whatmp3.git" - - bottle do - cellar :any_skip_relocation - sha256 "04408ee4a9e3dc0fefe1430dd09a736d35c8a78dc2ccf600894f5f3600ad5ae5" => :catalina - sha256 "04408ee4a9e3dc0fefe1430dd09a736d35c8a78dc2ccf600894f5f3600ad5ae5" => :mojave - sha256 "04408ee4a9e3dc0fefe1430dd09a736d35c8a78dc2ccf600894f5f3600ad5ae5" => :high_sierra - end - - depends_on "flac" - depends_on "lame" - depends_on "mktorrent" - depends_on "python@3.8" - - def install - system "make", "PREFIX=#{prefix}", "install" - - rewrite_shebang detected_python_shebang, bin/"whatmp3" - 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 ec137401a6f43..0000000000000 --- a/Formula/when.rb +++ /dev/null @@ -1,27 +0,0 @@ -class When < Formula - desc "Tiny personal calendar" - homepage "http://www.lightandmatter.com/when/when.html" - url "https://github.com/bcrowell/when/archive/1.1.40.tar.gz" - sha256 "1363d48c32c4bb528514abf012ae0a61e7c686504a047ce870e72e791447c3d1" - head "https://github.com/bcrowell/when.git" - - bottle do - cellar :any_skip_relocation - sha256 "88a5d4653d7062e0ac6d9913d35390126c1739fe04f0f458624f0199046d0fcd" => :catalina - sha256 "18c0460162e7dcb98d499fb8622a471162897a91f4f844fe46f42a52182cc69e" => :mojave - sha256 "a0623fd31e458f82217956bd98e72964634f5d632025336386e824a27fe654ae" => :high_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/whistle.rb b/Formula/whistle.rb deleted file mode 100644 index 8753ea2c5813e..0000000000000 --- a/Formula/whistle.rb +++ /dev/null @@ -1,29 +0,0 @@ -require "language/node" - -class Whistle < Formula - desc "HTTP, HTTP2, HTTPS, Websocket debugging proxy" - homepage "https://github.com/avwo/whistle" - url "https://registry.npmjs.org/whistle/-/whistle-2.5.11.tgz" - sha256 "a974bfbe24496c4da84f9e307e97274d0944d9ee9505e74cebef1d21c0f7835f" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "70e80f17737196a2b6ec3d77dc0cf0a13e20be178ad0e4369bad6cf58861d930" => :catalina - sha256 "a406bfb1c14dd88d5ebe25e49173e910ad9e499bdc029320e84c5f43c317295e" => :mojave - sha256 "1ffc310d2341b9a2d04954abce3fbcc045b09967e59e620780a178f139e88122" => :high_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/"package.json").write('{"name": "test"}') - system bin/"whistle", "start" - system bin/"whistle", "stop" - end -end diff --git a/Formula/whitedb.rb b/Formula/whitedb.rb deleted file mode 100644 index 25460bf7b94f1..0000000000000 --- a/Formula/whitedb.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Whitedb < Formula - desc "Lightweight in-memory NoSQL database library" - homepage "https://www.whitedb.org/" - url "https://www.whitedb.org/whitedb-0.7.3.tar.gz" - sha256 "10c4ccd754ed2d53dbdef9ec16c88c732aa73d923fc0ee114e7e3a78a812849d" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "9ec140c350c8233dcbd67def0607eb1cdb764fd3f14ac57ac3901eeeda554e0f" => :catalina - sha256 "05673924ef2226616618002bcbcee6241db8f1ce34339ff38785fd4fe82cda43" => :mojave - sha256 "3dc724386650bbbf608c4742d954c338e1927427e4c4f1a9c0d6255cc8deee5d" => :high_sierra - sha256 "44639bc83668def2e81b68318dbdb5347f9262937ddb6cfdfd7303aae1ce05a6" => :sierra - sha256 "c0f4e666e9cc755bbff0711a1494c9705928a34a565701147bae31793f505163" => :el_capitan - sha256 "0fa38dca524c08f51fa724fb49df5a3ebdde46a3251b2a282d5343b36c4c249f" => :yosemite - sha256 "ba756975f0dbdfa4259a5a4271414765644b0abe8c771d0c091238909f0968d2" => :mavericks - 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 5bb939f47d062..0000000000000 --- a/Formula/whohas.rb +++ /dev/null @@ -1,52 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "683fcf11860d6f9920d171762d3bea882a6fb474e6157f62f1b4641fd4ccc188" => :catalina - 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 e8d2e5e9052e3..0000000000000 --- a/Formula/whois.rb +++ /dev/null @@ -1,38 +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.5.6.tar.xz" - sha256 "cba1e9000c60950f46a96ba23e8eea8aee240a2b8560e63a6bfb33f9034af14e" - license "GPL-2.0" - head "https://github.com/rfc1036/whois.git" - - bottle do - cellar :any - sha256 "3ec43301d8d08ee38261cdee9800c2763301022277ec71360a70c48001733d86" => :catalina - sha256 "7ec2c7361aef77544b3f5b86a0773710c22da824f0c198479bf68bae8681c0fe" => :mojave - sha256 "79bc883f7bbf41fe2e28eb1edb319fa6f62a2dde5ca1308d653f160f1ecc0e25" => :high_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 3349a047202a7..0000000000000 --- a/Formula/widelands.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Widelands < Formula - desc "Free real-time strategy game like Settlers II" - homepage "https://www.widelands.org/" - url "https://launchpad.net/widelands/build20/build20/+download/widelands-build20.tar.bz2" - sha256 "38594d98c74f357d4c31dd8ee2b056bfe921f42935935af915d11b792677bcb2" - revision 4 - - bottle do - sha256 "2cb0df8e7a793af4af1c1219e71a0391ce3151e5758a4692a2bdca4ef50e8f54" => :catalina - sha256 "f4ccff038d304f9b45e08c513e31f8334426db02afee8a316e069a0324f61314" => :mojave - sha256 "cc98eb5769c9c7c24cc742d821d6d54e643880a078ce736f606eccd1cceb2344" => :high_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_ttf" - - def install - 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 249d76d50a018..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.2.tar.gz" - sha256 "31375badb76a4a586f2113e49d13486dbc64844962ae80976a81c6542e901622" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ebf56026e29b37067218ad4ee2340de46df5b454b46848a0fe2ac117442cfce1" => :catalina - sha256 "6971993e24c3267d64110bf8ef472bb80db7268a0b85617d3846b66c5f5dbde1" => :mojave - sha256 "5fe1b56648deb49456c668a2e99d3f7bbb2edf3045d8d55f78382ea008f640d1" => :high_sierra - 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/wiiuse.rb b/Formula/wiiuse.rb deleted file mode 100644 index 74ec87e52f08d..0000000000000 --- a/Formula/wiiuse.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Wiiuse < Formula - desc "Connect Nintendo Wii Remotes" - homepage "https://github.com/wiiuse/wiiuse" - url "https://github.com/wiiuse/wiiuse/archive/0.15.5.tar.gz" - sha256 "d22b66eb13b92513c7736cc5e867fed40b25a0e398a70aa059711fc4f4769363" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "0a7689f0a9a9ad3fcfe44b35b3467f48c6065345ef8396c178fe0c3fcc22c7ff" => :catalina - sha256 "2cd562e7ccdfa82c47a464b4a501925398ce8381e3489db0d7e773e8e2040002" => :mojave - sha256 "40f7508add9a2974c76bd91d9e8fbe62bd2500ae4433de06af5711d340297b96" => :high_sierra - end - - depends_on "cmake" => :build - - def install - args = std_cmake_args + %w[ - -DBUILD_EXAMPLE=NO - -DBUILD_EXAMPLE_SDL=NO - ] - - mkdir "build" do - system "cmake", "..", *args - system "make", "install" - end - end - - test do - (testpath/"test.cpp").write <<~EOS - #include - int main() - { - int wiimoteCount = 1; - wiimote** wiimotes = wiiuse_init(wiimoteCount); - wiiuse_cleanup(wiimotes, wiimoteCount); - return 0; - } - EOS - system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-l", "wiiuse", "-o", "test" - system "./test" - end -end diff --git a/Formula/wiki.rb b/Formula/wiki.rb deleted file mode 100644 index bb5faea885835..0000000000000 --- a/Formula/wiki.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Wiki < Formula - desc "Fetch summaries from MediaWiki wikis, like Wikipedia" - homepage "https://github.com/walle/wiki" - url "https://github.com/walle/wiki/archive/v1.4.1.tar.gz" - sha256 "529c6a58b3b5c5eb3faab07f2bf752155868b912e4f753e432d14040ff4f4262" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "ff424f6afbc0d2baab91cee289157d9c90623fa19b7d51574b75df455da76cd6" => :catalina - sha256 "316687b381ca23ee0e81eb6e396d2c8c21a5eeaf05a9219ec56dd0024a8d9722" => :mojave - sha256 "bd1b52730bbf5bc503d3fece003b069e248261616d9d02767ef019d87659bdd8" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", "-o", bin/"wiki", "cmd/wiki/main.go" - 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 diff --git a/Formula/wildfly-as.rb b/Formula/wildfly-as.rb deleted file mode 100644 index 21224d925f317..0000000000000 --- a/Formula/wildfly-as.rb +++ /dev/null @@ -1,93 +0,0 @@ -class WildflyAs < Formula - desc "Managed application runtime for building applications" - homepage "https://wildfly.org/" - url "https://download.jboss.org/wildfly/20.0.1.Final/wildfly-20.0.1.Final.tar.gz" - sha256 "63ced690c05149f444e8d0418c1d76ab82941d1e3763ef4c49b0c43de5f95ae7" - - bottle :unneeded - - depends_on "openjdk" - - def install - rm_f Dir["bin/*.bat"] - rm_f Dir["bin/*.ps1"] - - 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 - - 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}" - - 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 - - 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/willgit.rb b/Formula/willgit.rb deleted file mode 100644 index 07a556a933357..0000000000000 --- a/Formula/willgit.rb +++ /dev/null @@ -1,26 +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" - license "MIT" - 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 c0fde27f7fb71..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.13.2.tar.gz" - sha256 "7295be7ef00d265aef4090c9d26af82097db651c5f8399db9d44c60f47f5a945" - - bottle do - cellar :any - sha256 "9b1f59782b773025346f9e466926467035c3e007f54acc77caa332b73a9308bf" => :catalina - sha256 "9c516e253677057ba243d2d0c30894df407c5d24a23d055d8b7152f6f3267991" => :mojave - sha256 "543e598241edae31ae469dd6da5ceaf10f1ef658ea051e1be0d5241393d167b6" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - - uses_from_macos "libxml2" - - 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/winetricks.rb b/Formula/winetricks.rb deleted file mode 100644 index 9bbe46f9944eb..0000000000000 --- a/Formula/winetricks.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Winetricks < Formula - desc "Automatic workarounds for problems in Wine" - homepage "https://github.com/Winetricks/winetricks" - url "https://github.com/Winetricks/winetricks/archive/20200412.tar.gz" - sha256 "4b0aa4f11dbc30d10a8edd2bb83fcc34f9b143ab58ccce7b99cd54ebff7ec260" - license "LGPL-2.1" - 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 - - test do - system "#{bin}/winetricks", "--version" - end -end diff --git a/Formula/winexe.rb b/Formula/winexe.rb deleted file mode 100644 index 6b5b1a68ef7a3..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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "4706b05f203ecaf3a56fc453d3c6588fd151d9ce4b8be0f6973725f70379dad3" => :catalina - 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 - 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 - - 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 d4921bcb1a3ff..0000000000000 --- a/Formula/wiredtiger.rb +++ /dev/null @@ -1,30 +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.2.0/wiredtiger-3.2.0.tar.bz2" - sha256 "c812d34ac542fdd2f5dc16e2f47ebc1eba09487f45e34fbae5a052a668931968" - - bottle do - cellar :any - sha256 "9b0799ed632b6b053c1f208a3a91c4eb97bfab817542267b32cc42ad0da11da0" => :catalina - sha256 "6346862c90443a6fc72cb214e2b657fcd69980dcd3d622b9017c150b955d4891" => :mojave - sha256 "c831e84a17cc41fbb4a4571aad5460fc989fd865c0e770b9bf65399bfeb46f4b" => :high_sierra - sha256 "27744de01928c6f529028861fb5b443885f8fc320deb0c61ac2a7bd754d44d7e" => :sierra - end - - depends_on "snappy" - - uses_from_macos "zlib" - - 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 f1f97a64d546a..0000000000000 --- a/Formula/wireguard-go.rb +++ /dev/null @@ -1,27 +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.20200320.tar.xz" - sha256 "c8262da949043976d092859843d3c0cdffe225ec6f1398ba119858b6c1b3552f" - license "MIT" - head "https://git.zx2c4.com/wireguard-go", :using => :git - - bottle do - cellar :any_skip_relocation - sha256 "783b1eeb0aba2c336e91fe59ef9e8d5d449e51ef3a5ed313f96666c7d055fb02" => :catalina - sha256 "baf1cc2e7f0795747bcaed6856ce3a4075083356cc557497adf06ceaf28e0514" => :mojave - sha256 "23d0d338dddebcecc58aa5f1e651fbde03494b0d49071937c4cff0b4d19961c2" => :high_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 cb8e6c2ab929d..0000000000000 --- a/Formula/wireguard-tools.rb +++ /dev/null @@ -1,28 +0,0 @@ -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.20200513.tar.xz" - sha256 "e73409a9fb8c90506db241d1e1a4e7372a60dbfa400e37f4ab2fd70a92ba495f" - license "GPL-2.0" - head "https://git.zx2c4.com/wireguard-tools", :using => :git - - bottle do - cellar :any_skip_relocation - sha256 "d8f18c2d3f4e08b616a8621367adfc30881d5bf5a5de19daca1b7828a59c5e96" => :catalina - sha256 "b00ca10dd4dc519a8dae57cff6df2cb224f52018334ed8464810329c28677520" => :mojave - sha256 "71ebb1ada0ede665499754dc5b2af1dc524714c0eb35e631e3dd7aca18a71d02" => :high_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", "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 50a18315527dd..0000000000000 --- a/Formula/wiremock-standalone.rb +++ /dev/null @@ -1,37 +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.27.1/wiremock-standalone-2.27.1.jar" - sha256 "e98c07e202eb3f8b470b7d0ae2703c880736ac0de870bba31b231df9b9db7833" - license "Apache-2.0" - head "https://github.com/tomakehurst/wiremock.git" - - bottle :unneeded - - depends_on "openjdk" - - def install - libexec.install "wiremock-standalone-#{version}.jar" - (bin/"wiremock").write <<~EOS - #!/bin/bash - exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec}/wiremock-standalone-#{version}.jar" "$@" - EOS - 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/wireshark.rb b/Formula/wireshark.rb deleted file mode 100644 index a687583465ab9..0000000000000 --- a/Formula/wireshark.rb +++ /dev/null @@ -1,85 +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-3.2.5.tar.xz" - mirror "https://1.eu.dl.wireshark.org/src/all-versions/wireshark-3.2.5.tar.xz" - sha256 "bd89052a5766cce08b1090df49628567e48cdd24bbaa47667c851bac6aaac940" - head "https://code.wireshark.org/review/wireshark", :using => :git - - bottle do - sha256 "27ac1313478b321ece59273e73ff0ef3dbfc8f3bb5e804f84d1647e9c3493f02" => :catalina - sha256 "6f7222fa6ba170a6f51cdde7b4167aa25fff8bd5f507b0741844f30225e0c959" => :mojave - sha256 "2201d32c491a0b8e0d1116e58120695826fb4b1782129ec62bcb8d67b222c6f5" => :high_sierra - end - - 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" - - uses_from_macos "bison" => :build - uses_from_macos "flex" => :build - - 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 - -DBUILD_wireshark=OFF - -DENABLE_APPLICATION_BUNDLE=OFF - -DENABLE_QT5=OFF - ] - - system "cmake", *args, "." - system "make", "install" - - # 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. - - Install Wireshark.app 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 9d2e44df6648c..0000000000000 --- a/Formula/wirouter_keyrec.rb +++ /dev/null @@ -1,36 +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" - license "GPL-3.0" - - bottle do - sha256 "907d4ed63f0f9c13217a9120749b12521ad773d310d554534a507ca9714d2dd7" => :catalina - sha256 "ca8371cae9a6a4ce5ce4541a811d17260d877695426b16777e4b89d0fb912332" => :mojave - sha256 "60a9b2a5fffe6027b296ad5b320377dd98a28658b628d6b3acbe94126e54ff3e" => :high_sierra - sha256 "2accae4664406559e45909d53eaf6a8a8569773c8e0d932e2d3a8090706f8f18" => :sierra - sha256 "3982522d8e15ced547c4f1d3019fe3ca6ddaa88d33fad03d2c97a53c849ec217" => :el_capitan - sha256 "65d21ba4cb167dd2cca395dd5b51edc1ddd0df06fc65843cd2d2eba9e307ea11" => :yosemite - sha256 "b5740e7929fc911881e007103921c712483971accb581bd5fdb86357f65b8312" => :mavericks - 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 8b703756d7657..0000000000000 --- a/Formula/with-readline.rb +++ /dev/null @@ -1,28 +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 2 - - bottle do - cellar :any - sha256 "b0ba2ed66eff2c432234e5885ebeca2a671bb556024ad038563883b3c14a64b4" => :catalina - sha256 "3a6e8e8e2d6f35ecd215b969c3794e586b1209820a9b0e5d935ddc5363f58678" => :mojave - sha256 "72ea8c0cce2f94fae5c963a1113c9b2504f1d728234c3c511ad7e3d5dca0d74b" => :high_sierra - sha256 "808a3a96b1d247f16c0a3e21eb18ed287f7df474b36c4685725768a05c3c1c61" => :sierra - 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 027111dcb4ca2..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.10.tar.gz" - sha256 "a04eb7b0bdc314ba7cefd5ed1f8529ecc1b18ef524e8f7446e1a2cbf76fdcc4f" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "4c5a8c948703a0ac4b10a50b01fba6b175b412512afa49b0ca06bd5470fe95ae" => :catalina - sha256 "bae03cdacfcbb537e7ee12fb419f87133d9554122994e297fe20daf4b54148bf" => :mojave - sha256 "5a317d40754e1387fffe605ed373d03d1acd43247e49cae4e6bc80e9e909c3b7" => :high_sierra - 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 9ab3ec7ecddc5..0000000000000 --- a/Formula/wmctrl.rb +++ /dev/null @@ -1,38 +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" - revision 1 - - bottle do - cellar :any - sha256 "7fffdc3399b2af15b638dfb642e44e0c148df088828f307c1f9440e38049cd5a" => :catalina - sha256 "2223922cda28d81580d85d01fa697284102d10226df76d57660bd92093fd46c5" => :mojave - sha256 "59b55236fd42a64f6ccc8587a5580a25afd330a137b62e7258568042e8b1b525" => :high_sierra - sha256 "cbdb379f9b1264847f74c0ea01e0a5412645b442d3c069708bfbe209b845b873" => :sierra - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/wmctrl/1.07.patch" - sha256 "8599f75e07cc45ed45384481117b0e0fa6932d1fce1cf2932bf7a7cf884979ee" - end - - 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 diff --git a/Formula/woboq_codebrowser.rb b/Formula/woboq_codebrowser.rb deleted file mode 100644 index 05031edc598f5..0000000000000 --- a/Formula/woboq_codebrowser.rb +++ /dev/null @@ -1,48 +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 "1785b502be3a5893629c65428066323ecec0d513917e7ce3f4c4e6245aa75340" => :catalina - 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 55517cee5b12a..0000000000000 --- a/Formula/woff2.rb +++ /dev/null @@ -1,57 +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" - license "MIT" - - bottle do - cellar :any - rebuild 1 - sha256 "7df9b4ada2d8a72546c5395fc92a7c5071f68be2fa12d336a194cee44adad5a5" => :catalina - 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/wolfmqtt.rb b/Formula/wolfmqtt.rb deleted file mode 100644 index 47e3582a8b9d4..0000000000000 --- a/Formula/wolfmqtt.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Wolfmqtt < Formula - desc "Small, fast, portable MQTT client C implementation" - homepage "https://github.com/wolfSSL/wolfMQTT" - url "https://github.com/wolfSSL/wolfMQTT/releases/download/v1.6/wolfmqtt-1.6.0.tar.gz" - sha256 "ddd61f977714ed56c7a1c8dbe061408a9f38e206e28162934d3f40bd07c18879" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "69cad59befccc596b031061ae8d43f06395e92b9a870f79d3c326abd63aab801" => :catalina - sha256 "d87c755ee5f7b7502f188abaf3f8ddcd88b394fe056f5912edfa9c98db3718e0" => :mojave - sha256 "7cd884e7105e3522b767bafce562730e8279c511be71a0ef223f16c2120b03b4" => :high_sierra - end - - head do - url "https://github.com/wolfSSL/wolfMQTT.git" - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end - - 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" if build.head? - system "./configure", *args - system "make" - system "make", "install" - end - - test do - (testpath/"test.cpp").write <<~EOT - #include - int main() { - MqttClient mqttClient; - return 0; - } - EOT - system ENV.cc, "test.cpp", "-L#{lib}", "-lwolfmqtt", "-o", "test" - system "./test" - end -end diff --git a/Formula/wolfssl.rb b/Formula/wolfssl.rb deleted file mode 100644 index ebc98a8f5c9af..0000000000000 --- a/Formula/wolfssl.rb +++ /dev/null @@ -1,91 +0,0 @@ -class Wolfssl < Formula - desc "Embedded SSL Library written in C" - homepage "https://www.wolfssl.com/" - url "https://github.com/wolfSSL/wolfssl.git", - :tag => "v4.4.0-stable", - :revision => "e116c89a58af750421d82ece13f80516d2bde02e" - license "GPL-2.0" - head "https://github.com/wolfSSL/wolfssl.git" - - bottle do - cellar :any - sha256 "0be0aa725d9cd9d9a127d574a3e63548ad7176d03613913e714175af1a91eae9" => :catalina - sha256 "44add33b67e8f1d4e48f5130e9f0c73cbeda7277f8c43aa5fddbd8e9dccba657" => :mojave - sha256 "e3220ea7176729c24f817900a45002a8502defeba7ef4a1001cff1b342b3c487" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - - def install - 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 - ] - - # 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" - - 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 7060d52f03919..0000000000000 --- a/Formula/woof.rb +++ /dev/null @@ -1,30 +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 - port = free_port - 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/wordgrinder.rb b/Formula/wordgrinder.rb deleted file mode 100644 index a8c67815748a2..0000000000000 --- a/Formula/wordgrinder.rb +++ /dev/null @@ -1,35 +0,0 @@ -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/0.7.2.tar.gz" - sha256 "4e1bc659403f98479fe8619655f901c8c03eb87743374548b4d20a41d31d1dff" - revision 1 - head "https://github.com/davidgiven/wordgrinder.git" - - bottle do - cellar :any - sha256 "79fa0f89e7e123f7746ab934514834eaaecd35fa228a64e243d620825e508f7d" => :catalina - sha256 "daa17cb7ea4b7ad382352a18b359deaa7f1a9cd8b2c7c8949b2f6dca41f0674c" => :mojave - sha256 "735f8f1c7d405d11e0fd464d937d3f943c192c939126ca610a388f145da1a7da" => :high_sierra - end - - depends_on "ninja" => :build - depends_on "pkg-config" => :build - depends_on "lua" - 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_predicate testpath/"converted.txt", :exist? - end -end diff --git a/Formula/wordnet.rb b/Formula/wordnet.rb deleted file mode 100644 index 05a590d205090..0000000000000 --- a/Formula/wordnet.rb +++ /dev/null @@ -1,45 +0,0 @@ -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" - - bottle do - sha256 "a815dc11f451a82c84ed37266010f81bc4f5993467c1e6063edb3fc3f0fd95c5" => :catalina - 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 "https://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 5f7327aa077df..0000000000000 --- a/Formula/wordplay.rb +++ /dev/null @@ -1,33 +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 "bf3847365e1920baf313fc0286116de59fee392ccde5182173ed7198b9883626" => :catalina - 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 01f9a76746dfe..0000000000000 --- a/Formula/wp-cli-completion.rb +++ /dev/null @@ -1,19 +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.4.1.tar.gz" - sha256 "95adcbe26908605104454d9eb1e35b48d2f3ccb530807e38dd970230a09d7254" - license "MIT" - 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 2626e33af11c8..0000000000000 --- a/Formula/wp-cli.rb +++ /dev/null @@ -1,18 +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.4.0/wp-cli-2.4.0.phar" - sha256 "139dcc86ed39ef751679efbdaf57a53528f1afda972c4e3622667cc27397b540" - license "MIT" - - 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 f226f22c4a1a4..0000000000000 --- a/Formula/wpscan.rb +++ /dev/null @@ -1,65 +0,0 @@ -class Wpscan < Formula - desc "Black box WordPress vulnerability scanner" - homepage "https://wpscan.org/" - url "https://github.com/wpscanteam/wpscan/archive/v3.8.2.tar.gz" - sha256 "5aac100b95745bdb45031b6383b74453b209b965486197d8026a83a662412c3c" - head "https://github.com/wpscanteam/wpscan.git" - - bottle do - cellar :any - sha256 "202f067c8019102a570f95ac29d60a5010498cedf047e3fb4cd7aab4636f0959" => :catalina - sha256 "d5cff4f5d3649adab8cd5195266f2e0634d2c8993714f7e59f9d8d8d0bc53dc2" => :mojave - sha256 "ce604ef3517c146a2922cb3d75ec18d5e740262e5c7b178565e25c07bb410f36" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "ruby" - - uses_from_macos "curl" - uses_from_macos "unzip" - uses_from_macos "xz" # for liblxma - uses_from_macos "zlib" - - if MacOS.version < :catalina - depends_on "libffi" - else - uses_from_macos "libffi" - end - - # Fixes the --no-update commandline option - # https://github.com/wpscanteam/wpscan/pull/1455 - patch do - url "https://github.com/mistydemeo/wpscan/commit/eed763944642416cb5245b4e0cd281cb161122b4.patch?full_index=1" - sha256 "0f532dfac5526e75b241e06c17127cd9b608f1450d685a696a2a122e5db545eb" - end - - def install - inreplace "lib/wpscan.rb", /DB_DIR.*=.*$/, "DB_DIR = Pathname.new('#{var}/wpscan/db')" - libexec.install Dir["*"] - 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", "--jobs=#{ENV.make_jobs}" - wpscan = Dir["#{libexec}/ruby/**/bin/wpscan"].last - - ruby_series = Formula["ruby"].version.to_s.split(".")[0..1].join(".") - (bin/"wpscan").write <<~EOS - #!/bin/bash - GEM_HOME="#{libexec}/ruby/#{ruby_series}.0" BUNDLE_GEMFILE="#{libexec}/Gemfile" \\ - exec "#{bundle}" exec "#{Formula["ruby"].opt_bin}/ruby" \\ - "#{wpscan}" "$@" - EOS - end - - def post_install - # Update database - system bin/"wpscan", "--update" - end - - test do - assert_match "URL: https://wordpress.org/", - pipe_output("#{bin}/wpscan --no-update --url https://wordpress.org/") - end -end diff --git a/Formula/wput.rb b/Formula/wput.rb deleted file mode 100644 index db62e5e33f837..0000000000000 --- a/Formula/wput.rb +++ /dev/null @@ -1,37 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "77703d5dfb1bde183ccc207ee5e3f14b1a677acc697806a2b16f00c56cc0595e" => :catalina - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/wput/0.6.2.patch" - sha256 "a3c47a12344b6f67a5120dd4f838172e2af04f4d97765cc35d22570bcf6ab727" - end - - 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 diff --git a/Formula/wrangler.rb b/Formula/wrangler.rb deleted file mode 100644 index 4a8c28d4b0179..0000000000000 --- a/Formula/wrangler.rb +++ /dev/null @@ -1,43 +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 3 - 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/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 - end - - bottle do - cellar :any_skip_relocation - sha256 "8d67285352be09f209dba8e1fe678bb9e88a77c74e5178687f890cf5ba19c8ca" => :catalina - sha256 "1f122b48da35f344074d239e3d23fcf3d66e309dd0425062547d080bd3285a12" => :mojave - sha256 "b3aa1c943b1de15308be2cf7ac540daa95b4a843788a662fcdf34ed30e2ec29d" => :high_sierra - end - - depends_on "erlang@22" - - 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/wren-cli.rb b/Formula/wren-cli.rb deleted file mode 100644 index ba988f9f171bd..0000000000000 --- a/Formula/wren-cli.rb +++ /dev/null @@ -1,24 +0,0 @@ -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/0.3.0.tar.gz" - sha256 "a498d2ccb9a723e7163b4530efbaec389cc13e6baaf935e16cbd052a739b7265" - - bottle do - cellar :any_skip_relocation - sha256 "c7f9b2cc6e9913517f802d8ef0142484fd86cb2b972ceb670f1b791b65144937" => :catalina - sha256 "9bf6170802498342b99b6fb167a6ff9254601e911b5c7c74605145985909e6ff" => :mojave - sha256 "074f4d9634a9e8e7fc33cd302778116121874851aa854830d41e3b73ba50500b" => :high_sierra - end - - def install - system "make", "-C", "projects/make.mac" - 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/wren.rb b/Formula/wren.rb deleted file mode 100644 index bc997a956ec1b..0000000000000 --- a/Formula/wren.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Wren < Formula - desc "Small, fast, class-based concurrent scripting language" - homepage "https://wren.io/" - url "https://github.com/wren-lang/wren/archive/0.3.0.tar.gz" - sha256 "c566422b52a18693f57b15ae4c9459604e426ea64eddb5fbf2844d8781aa4eb7" - - bottle do - cellar :any - rebuild 1 - sha256 "21bb30d077f3de93293d6e6f3c41e8f923e6de7d8d04df2f48c7378f76b3d16f" => :catalina - sha256 "d3837f28ed556d33753beb658f22b197f0afdb2aac3b30de26b2859397123d51" => :mojave - sha256 "529a384d6d1665dd269ef7b6e8ea61f1edccddd5478ce82ec30839346af3d3b5" => :high_sierra - end - - def install - system "make", "-C", "projects/make.mac" - lib.install Dir["lib/*"] - include.install Dir["src/include/*"] - pkgshare.install "example" - end - - test do - (testpath/"test.c").write <<~EOS - #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); - } - EOS - 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/write-good.rb b/Formula/write-good.rb deleted file mode 100644 index f6afac05b6151..0000000000000 --- a/Formula/write-good.rb +++ /dev/null @@ -1,28 +0,0 @@ -require "language/node" - -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.2.tgz" - sha256 "7a69215e1fcf1f5cb376086e6e56c3e5e6113b34ccb2747157b2d84e4a53b35e" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "e0a5d6df3a160e8c24ef47754fe05f88e369fc7140c45af5f6b1228beb52de0d" => :catalina - sha256 "35c6923bda9539fa5704c7f9255b6590029503dcdf7b4d29090dc62a38aa1452" => :mojave - sha256 "7b0bb14228cf6054bfad6d22a9df86e67b893bf49682a3706606e3fab1f7f40a" => :high_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 "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 78d921db2dc11..0000000000000 --- a/Formula/wrk-trello.rb +++ /dev/null @@ -1,32 +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 2a3b4b4fd0446..0000000000000 --- a/Formula/wrk.rb +++ /dev/null @@ -1,35 +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 2 - sha256 "65f16f71cfb120d12f0f993044db92b767c728274aa046917bee7ad4deacfd3e" => :mojave - sha256 "ccc1cc4303847b70f940b765a9229476e7018328fbf202c02a00d9a13c63919e" => :high_sierra - sha256 "82fd1323ac999e23107dcd1cdae9635ff047afd15532f42f8cb4e82dad0db257" => :sierra - end - - depends_on "openssl@1.1" - - on_linux do - depends_on "makedepend" => :build - depends_on "pkg-config" => :build - end - - 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 9ba544509423b..0000000000000 --- a/Formula/wsk.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Wsk < Formula - desc "OpenWhisk Command-Line Interface (CLI)" - homepage "https://openwhisk.apache.org/" - url "https://github.com/apache/openwhisk-cli/archive/1.0.0.tar.gz" - sha256 "31e6fceaa3ae51be7b93d308eb0b68c891277f904c17cf6496e51062f1655332" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "461c8bd630f1fb80859d16f1ef4ec57ba73990febdada45deb0411b66fca044e" => :catalina - sha256 "3082ab49e515fa5b534ee3e8f0de9e90a23d7130d9fbf5f469ea5ef3f40c8bd9" => :mojave - sha256 "9ea3a295b2eb7b4f622ec8d6065aa5a9cd50285d83df66453e41d2214de6135c" => :high_sierra - end - - depends_on "go" => :build - depends_on "go-bindata" => :build - depends_on "govendor" => :build - - def install - ENV["GOPATH"] = buildpath - dir = buildpath/"src/github.com/apache/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 0f70d9b337947..0000000000000 --- a/Formula/wskdeploy.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Wskdeploy < Formula - desc "Apache OpenWhisk project deployment utility" - homepage "https://openwhisk.apache.org/" - url "https://github.com/apache/openwhisk-wskdeploy/archive/1.0.0.tar.gz" - sha256 "74c02e8118a123cfad113dc75d5e7d256b18fb80ad9e27b2b95eb74b8677e483" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "3628415e19ddfa9aa4c701f10bdecc2b60a595b8a88beff1fada7174b38517ed" => :catalina - sha256 "fa27eb070527a3e4fff0ea62ed16e521b2c7f5482f4ca8c1bb934823e75c856b" => :mojave - sha256 "9690c45ee52ba2c4bee9de7075136fd6743f05dcfca445c57f44df940b1fb3e7" => :high_sierra - end - - depends_on "go" => :build - depends_on "godep" => :build - - def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/apache/openwhisk-wskdeploy").install buildpath.children - cd "src/github.com/apache/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 1f8fb434d635f..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.1/wslay-1.1.1.tar.xz" - sha256 "166cfa9e3971f868470057ed924ae1b53f428db061b361b9a17c0508719d2cb5" - license "MIT" - - bottle do - cellar :any - sha256 "b0c31393b4065ddad22d079252f4310ccafee1c26d5ea56a58c2bc3bfa728b46" => :catalina - sha256 "4ea82d98c0fd0cfcc1e842dde6e0fbd15355d538876f24fa0c2ca6f05ed17926" => :mojave - sha256 "6aade683b7db8a32c859e54134568bdb3983d57878783d86c89e5d28c5e8db77" => :high_sierra - 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 c2bc1a885c487..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-20200613.tar.gz" - sha256 "c6fbb8aa5dae1c413fa62b6482417ab02acc867f2cad2be12d96f0137537602d" - - 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/wtfutil.rb b/Formula/wtfutil.rb deleted file mode 100644 index 8200c0fc92c4b..0000000000000 --- a/Formula/wtfutil.rb +++ /dev/null @@ -1,72 +0,0 @@ -class Wtfutil < Formula - desc "The personal information dashboard for your terminal" - homepage "https://wtfutil.com/" - url "https://github.com/wtfutil/wtf.git", - :tag => "v0.30.0", - :revision => "13b421b08e550637b3d77fde0ff8894fd3a127d8" - license "MPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "0a3e0b78d2e9c8a8b26b0c9d3c735fa2663ce7f5f8ff64c26258f6bef8ba53d5" => :catalina - sha256 "581b230dc16070ba799fe1a706441015633033fb3f3bdc83a8e6fa149ba0c1fd" => :mojave - sha256 "3fa6f304088016d47cba5b2d96f1d1806483cdae23eb01ba7f9bee3dafe3da56" => :high_sierra - end - - depends_on "go" => :build - - def install - ldflags = %W[ - -s -w - -X main.version=#{version} - -X main.date=#{Time.now.iso8601} - ] - system "go", "build", "-trimpath", "-ldflags", ldflags.join(" "), "-o", bin/"wtfutil" - end - - test do - testconfig = testpath/"config.yml" - testconfig.write <<~EOS - 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" - EOS - - begin - pid = fork do - exec "#{bin}/wtfutil", "--config=#{testconfig}" - end - ensure - Process.kill("HUP", pid) - end - end -end diff --git a/Formula/wumpus.rb b/Formula/wumpus.rb deleted file mode 100644 index 3d91d22abf967..0000000000000 --- a/Formula/wumpus.rb +++ /dev/null @@ -1,23 +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.7.tar.gz" - sha256 "892678a66d6d1fe2a7ede517df2694682b882797a546ac5c0568cc60b659f702" - - bottle do - cellar :any_skip_relocation - sha256 "49bc794562f3b9a0ad5799b5fcd2d63a5f866b9b6dc7a4b0d80988c388ee3726" => :catalina - sha256 "e6881d8d217cebdd71e430c4ec8701d369d1ca03bb8724d30977b467d7422d83" => :mojave - sha256 "006271b20835150dcf3006041f7053adf26a3ec58f9549029d14c844a53570c4" => :high_sierra - 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 be1e106016e14..0000000000000 --- a/Formula/wv.rb +++ /dev/null @@ -1,40 +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" - revision 1 - - bottle do - sha256 "c617efb5a72bf2dbca4a3c85fdb59460ce6aaaf21b1f1db1e89f53ac3fc07224" => :catalina - sha256 "e3b62df7fad6fefbd233abc45ede4f9705b447df51433e0129a82d98dc321811" => :mojave - sha256 "470ecfe6b84e931d4c4363b8274a04d42b2e2c3b6c5f50bc12b55a7fda6f5acb" => :high_sierra - sha256 "7df867080d9b2edb57780c5f971a4a22d01c301aff70c1af7a6ce13385828908" => :sierra - 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 1049fa767f1af..0000000000000 --- a/Formula/wv2.rb +++ /dev/null @@ -1,28 +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 "944451190aa61c6ea3dd74fffbc9e92e999b8eeb559a46f4c4708d5f9b4f154f" => :catalina - 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 e86428a89cefd..0000000000000 --- a/Formula/wwwoffle.rb +++ /dev/null @@ -1,25 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "5e01196bd5b95300b944ac6c5bd7cf10999a3ec9cb24f2f2a09b97b0256b87f9" => :catalina - 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 5e6e26b74b5cf..0000000000000 --- a/Formula/wxmac.rb +++ /dev/null @@ -1,65 +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.5.1/wxWidgets-3.0.5.1.tar.bz2" - sha256 "440f6e73cf5afb2cbf9af10cec8da6cdd3d3998d527598a53db87099524ac807" - revision 1 - head "https://github.com/wxWidgets/wxWidgets.git" - - bottle do - cellar :any - sha256 "110aa0b2134d8bff1647de0cd8500f160133794b347f789bba3e1894b991b788" => :catalina - sha256 "5f703423fc3f1e36d647a2d8be2d271a92f5d60f49ceba8e3478391bbd4f5303" => :mojave - sha256 "1de8aa03e1c50af387888ffa51cfa4e0c99d158f25edb0acbf312e10c629a31d" => :high_sierra - end - - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - - on_linux do - depends_on "pkg-config" => :build - end - - 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", - "--enable-webview", - "--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}", - ] - - 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 3ab4c8d1cb637..0000000000000 --- a/Formula/wxmaxima.rb +++ /dev/null @@ -1,43 +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-20.06.6.tar.gz" - sha256 "a6c5e105fe406bd8716bbd2d37c14d3dd0f5411e6a96a22a291937fa1387928a" - head "https://github.com/wxMaxima-developers/wxmaxima.git" - - bottle do - sha256 "9e9bdb5eacc61fdad7945970db68f8d04bdf96172643301c918ad2cb028dfede" => :catalina - sha256 "db544d8b5bb33915a44bf93382c182d56935e2a88fab17ff4d631095630c9e0f" => :mojave - sha256 "0942521551716a682c363ad83f9bc0ce90cf53dd74864d31a1dfd7eab8dd680e" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "gettext" => :build - depends_on "maxima" - depends_on "wxmac" - - def install - system "cmake", ".", *std_cmake_args - system "make", "install" - prefix.install "src/wxMaxima.app" - bin.write_exec_script "#{prefix}/wxMaxima.app/Contents/MacOS/wxmaxima" - - bash_completion.install "data/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 - assert_match "algebra", shell_output("#{bin}/wxmaxima --help 2>&1") - end -end diff --git a/Formula/wxpython.rb b/Formula/wxpython.rb deleted file mode 100644 index 831be4c48a064..0000000000000 --- a/Formula/wxpython.rb +++ /dev/null @@ -1,93 +0,0 @@ -class Wxpython < Formula - include Language::Python::Virtualenv - - desc "Python bindings for wxWidgets" - homepage "https://www.wxwidgets.org/" - url "https://files.pythonhosted.org/packages/b9/8b/31267dd6d026a082faed35ec8d97522c0236f2e083bf15aff64d982215e1/wxPython-4.0.7.post2.tar.gz" - version "4.0.7.post2" - sha256 "5a229e695b64f9864d30a5315e0c1e4ff5e02effede0a07f16e8d856737a0c4e" - revision 1 - - bottle do - cellar :any - sha256 "7e3a70eb66502508bbcad970815aea6373012c0aa9ef632d12d20127cefba693" => :catalina - sha256 "77a519db391a01f82c11b6a887671d610c58f579eb676bfcbd013afd644cc6fc" => :mojave - sha256 "6b9ab4453cc2db1490b13c8449519fa9e067ffdeaed843603ad9dc9d87ff3db2" => :high_sierra - end - - depends_on "freetype" - depends_on "jpeg" - depends_on "libpng" - depends_on "libtiff" - depends_on "numpy" - depends_on "python@3.8" - - uses_from_macos "zlib" - - on_linux do - depends_on "pkg-config" => :build - depends_on "gtk+3" - end - - resource "Pillow" do - url "https://files.pythonhosted.org/packages/5b/bb/cdc8086db1f15d0664dd22a62c69613cdc00f1dd430b5b19df1bea83f2a3/Pillow-6.2.1.tar.gz" - sha256 "bf4e972a88f8841d8fdc6db1a75e0f8d763e66e3754b03006cbc3854d89f1cb1" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - end - - # Fix build for 10.15 SDK (WebKit errors). - # Fixed in 4.1.x. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/20da70f67040d40f8420bd7d543c875739261e24/wxpython/10.15-sdk.patch" - sha256 "c54f2bb97532f483219c63a3c9e463d4aeda759bee2fff1f07820f3c752f68f1" - end - - def install - # Fix build of included wxwidgets - # see https://github.com/wxWidgets/Phoenix/issues/1247 - inreplace "buildtools/build_wxwidgets.py", - /^( +)(wxpy_configure_opts.append\("--disable-qtkit"\))/, - "\\1\\2\n\\1wxpy_configure_opts.append(\"--disable-precomp-headers\")" - - venv = virtualenv_create(libexec, Formula["python@3.8"].opt_bin/"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 - 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 - 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 - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - - output = shell_output("#{Formula["python@3.8"].opt_bin}/python3 -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 576828ad5da63..0000000000000 --- a/Formula/wy60.rb +++ /dev/null @@ -1,25 +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 "29247a3617870bdb8364f9ce1b6d167b6029b016683dc5da39816b0a637bf5ef" => :catalina - 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..fea163820d03d --- /dev/null +++ b/Formula/x/x-cmd.rb @@ -0,0 +1,36 @@ +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.5.12.tar.gz" + sha256 "40f75142d4e10c1940f5a12e49414ad18034967898f2b7a5a702c0cc8271059e" + 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_sequoia: "998260e6eea2233ac15dd074200bf2b2d350df177218c0bad2cc2dd3ea4b0252" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "998260e6eea2233ac15dd074200bf2b2d350df177218c0bad2cc2dd3ea4b0252" + sha256 cellar: :any_skip_relocation, arm64_ventura: "998260e6eea2233ac15dd074200bf2b2d350df177218c0bad2cc2dd3ea4b0252" + sha256 cellar: :any_skip_relocation, sonoma: "a2b1cbd517f36d7293ead308103d8a1cb294430537a77cd7d2dd56836653cff3" + sha256 cellar: :any_skip_relocation, ventura: "a2b1cbd517f36d7293ead308103d8a1cb294430537a77cd7d2dd56836653cff3" + sha256 cellar: :any_skip_relocation, arm64_linux: "6cd68927d08517ab51d65cb94c81b0df08f966a21f5d925291df551ccfca6a33" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6cd68927d08517ab51d65cb94c81b0df08f966a21f5d925291df551ccfca6a33" + 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..c0ee7af16ad0e --- /dev/null +++ b/Formula/x/x11vnc.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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..f497b511b37ad --- /dev/null +++ b/Formula/x/x264.rb @@ -0,0 +1,100 @@ +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: "31e19f92f00c7003fa115047ce50978bc98c3a0d" + version "r3108" + license "GPL-2.0-only" + 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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "599b5307d2eed20dd72830c722dd30faeca5fa7f87b9a36c122ed575311d84fc" + sha256 cellar: :any, arm64_sonoma: "19910a7d287524c93e7c56e30eca711618e0b568c0a9a4462924b76761840fd5" + sha256 cellar: :any, arm64_ventura: "65babfc775b28b5d51d5acece8eb62ef377869964f088385cd09668848b63853" + sha256 cellar: :any, arm64_monterey: "629c423cef3f124d566e852d72a7d27b48370463c7501f3c99879f5eab68ae20" + sha256 cellar: :any, sonoma: "815879af6a928c8c92730a0fd92e6633b3c77e1c17a2156865769d5f03207c7d" + sha256 cellar: :any, ventura: "6477590c867a8e4f016cd5562eb55bd45dd51acbd8aac5476bcd95a810dc2c80" + sha256 cellar: :any, monterey: "3b19033d9ff3b40030f1fb721c68e6ec308bb978d0a16af6951ab2aff004a94f" + sha256 cellar: :any_skip_relocation, arm64_linux: "5a0349b5e1388cf5f6e2434bbefaeeec63a3d835290b701d115ecf1b6b007069" + sha256 cellar: :any_skip_relocation, x86_64_linux: "aeeb090700f4e1fdf948ed265f6b63353aea4980709d05b6a9314473fd1c802e" + end + + on_macos do + depends_on "gcc" if DevelopmentTools.clang_build_version <= 902 + end + + on_intel do + depends_on "nasm" => :build + end + + # https://code.videolan.org/videolan/x264/-/commit/b5bc5d69c580429ff716bafcd43655e855c31b02 + fails_with :clang do + build 902 + cause "Stack realignment requires newer Clang" + 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..c5ba70fd0a3dc --- /dev/null +++ b/Formula/x/x265.rb @@ -0,0 +1,104 @@ +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-only" + head "https://bitbucket.org/multicoreware/x265_git.git", branch: "master" + + bottle do + rebuild 1 + 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..9bfde60467b53 --- /dev/null +++ b/Formula/x/x3270.rb @@ -0,0 +1,54 @@ +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 + sha256 arm64_sequoia: "27aad9bf9750bcc9f3e22ca5150559af09105b01a684b2d7f91eba7757942485" + sha256 arm64_sonoma: "0f1fffff06aa9b8c0ead0cc40a740e7b68e3e3cf75d75b88bce4c5dcde44aa25" + sha256 arm64_ventura: "cde560236680e967de2c50994f50ff6191b7e050f8743cd527a6f813d5047314" + sha256 sonoma: "a681f80c3fc9d2fef71fbbad22372459c35c42f1e1903158bd3ed86568774f84" + sha256 ventura: "947c464bdb65d405a4a6394d257bc7443bdd741e0a0650c824e7a26ca0f76118" + sha256 arm64_linux: "11ae872d7b58bf4a98111deb5eb80174998e0e20a9707aca53ab9e91e98762e8" + sha256 x86_64_linux: "052c65259275d5f9e458f3b0d15182e820d0b204872d32eee8d6c898c0988050" + end + + depends_on "openssl@3" + depends_on "readline" + + uses_from_macos "python" => :build + uses_from_macos "ncurses" + + on_linux do + depends_on "tcl-tk@8" + end + + 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" if OS.linux? + + 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..183c0afffa8ed --- /dev/null +++ b/Formula/x/x86_64-elf-binutils.rb @@ -0,0 +1,61 @@ +class X8664ElfBinutils < Formula + desc "GNU Binutils for x86_64-elf cross development" + homepage "https://www.gnu.org/software/binutils/" + url "https://ftp.gnu.org/gnu/binutils/binutils-2.44.tar.bz2" + mirror "https://ftpmirror.gnu.org/binutils/binutils-2.44.tar.bz2" + sha256 "f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_sequoia: "2afacd61b85a74db24bf4d3f307e9c18ca5b7144c5d79d00db82c7f3e5d1add6" + sha256 arm64_sonoma: "4215b24625bf23b01a6e6a1d667f812794784f3a58b7045568f63807a1663f9c" + sha256 arm64_ventura: "d25d18b7765a1757c299d2a8745b15a7a0d8e9a57e28b602802b313d5be1ca5b" + sha256 sonoma: "66b1a985e3174d0ee92f25c4a4d16c08d973ce5d500057c3cafbac6c9d8d0b0e" + sha256 ventura: "66fd8173cc8e438f22e4921bf64cd570047eb8a19cff0ae3d99e95a59e79d7d1" + sha256 arm64_linux: "7eb1f372ca29b1075657e32b186f4bb0de3951e985c9b32a20ca3ed5f514c30d" + sha256 x86_64_linux: "a40dc5fe1fd0de0ce1877546c73423bbe4bd6cccdccf24dc8f34b695b74e5dc4" + 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..98f317c735f1b --- /dev/null +++ b/Formula/x/x86_64-elf-gcc.rb @@ -0,0 +1,68 @@ +class X8664ElfGcc < Formula + desc "GNU compiler collection for x86_64-elf" + homepage "https://gcc.gnu.org/" + url "https://ftp.gnu.org/gnu/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + mirror "https://ftpmirror.gnu.org/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz" + sha256 "e2b09ec21660f01fecffb715e0120265216943f038d0e48a9868713e54f06cea" + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + + livecheck do + formula "gcc" + end + + bottle do + sha256 arm64_sequoia: "a2ef38ca5207ee7eb12f815392169220a7a24fcf3848ea2fe1f592f315fbf188" + sha256 arm64_sonoma: "e1773647d8ed32fb82e6f042ec94b88d162d83e3bdf3330de46264ad6f2bc227" + sha256 arm64_ventura: "462617b5d54609ef51342a4185bbb657f9fb95e88d7659fdad9a38e4799952c2" + sha256 sonoma: "a3be452f8def32721bccd47aed6245510684fe9e0763a5e479900d98590151da" + sha256 ventura: "22560f07c1909a4b9a6726c4f3cdaa1a1714f779ca06b71071919daecaff800e" + sha256 arm64_linux: "664e2703de6f940cd66281726919d64eb2eb725c4437c0d4707dbcaf2318738d" + sha256 x86_64_linux: "819c5510630041d67f2b8f1c3c31a6e18ca4b664d6a834cb7078ea934d9c12cf" + 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..3fe3d270ebe03 --- /dev/null +++ b/Formula/x/x86_64-elf-gdb.rb @@ -0,0 +1,77 @@ +class X8664ElfGdb < Formula + desc "GNU debugger for x86_64-elf cross development" + homepage "https://www.gnu.org/software/gdb/" + url "https://ftp.gnu.org/gnu/gdb/gdb-16.3.tar.xz" + mirror "https://ftpmirror.gnu.org/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 + + bottle do + sha256 arm64_sequoia: "28f100b92ecb7457ced120b8d0522a178c1c7b41602ce928a135573196f0f118" + sha256 arm64_sonoma: "f3bfe8ae0d22a8a29df3487ab9a02183c03ebc40aee4dbb791f951152739d451" + sha256 arm64_ventura: "12f8ce79c5b517f25f323720050fb2f348e556f90cd510b4d58e3f5ae20fc3dc" + sha256 sonoma: "e4b1c236f1b4317c08f212b2ee18e12c511edf81adb3a376697da97e286b88c0" + sha256 ventura: "6a08a716548bb8e045f191db3854584be6d48619a64886e69d2f6617bf09c623" + sha256 arm64_linux: "8b54865a39c1be49422e670ffd3992d391159acba028d87a1b73affa796c86cd" + sha256 x86_64_linux: "38caa41e87bae9d85259c0497a9300af7c51f236e299476a8fc38da29f7d76ca" + end + + depends_on "x86_64-elf-gcc" => :test + + depends_on "gmp" + depends_on "mpfr" + depends_on "python@3.13" + depends_on "xz" # required for lzma support + + uses_from_macos "expat", since: :sequoia # minimum macOS due to python + uses_from_macos "ncurses" + 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} + --with-lzma + --with-python=#{which("python3.13")} + --with-system-zlib + --disable-binutils + ] + + 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..8eed1dbc56191 --- /dev/null +++ b/Formula/x/x86_64-elf-grub.rb @@ -0,0 +1,91 @@ +class X8664ElfGrub < Formula + desc "GNU GRUB bootloader for x86_64-elf" + homepage "https://savannah.gnu.org/projects/grub" + url "https://ftp.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" + + bottle do + 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://ftp.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..3890c5b458953 --- /dev/null +++ b/Formula/x/x86_64-linux-gnu-binutils.rb @@ -0,0 +1,90 @@ +class X8664LinuxGnuBinutils < Formula + desc "GNU Binutils for x86_64-linux-gnu cross development" + homepage "https://www.gnu.org/software/binutils/binutils.html" + url "https://ftp.gnu.org/gnu/binutils/binutils-2.44.tar.bz2" + mirror "https://ftpmirror.gnu.org/binutils/binutils-2.44.tar.bz2" + sha256 "f66390a661faa117d00fab2e79cf2dc9d097b42cc296bf3f8677d1e7b452dc3a" + license "GPL-3.0-or-later" + + livecheck do + formula "binutils" + end + + bottle do + sha256 arm64_sequoia: "2f25854d0670553fd5b5306d53e544929d3ae89595e5b04b3784e29fb6a0facd" + sha256 arm64_sonoma: "607de283c72bd6b0d7141fed0282051e244768fc907093ac5f6d4d951588dbde" + sha256 arm64_ventura: "3e90b1013bef3131b597fe612ea8ed2ab7617ddcb0c89dfaa632a1f9c0fecfcf" + sha256 sonoma: "0332609f6a0bb2aba6f6eccb6fbddb1afbb5c3242e9cef35358a36f0b4d370e2" + sha256 ventura: "675425789a28b7c3dee6165a593e22ada9bc39aad1b3f301df3cd28ab02c11d3" + sha256 arm64_linux: "647cb36d34c7ab5fa8df2d5d81b5ff999986d934ed7459c6186ba60572ddec12" + sha256 x86_64_linux: "7f98564cb604be445bf6d819ef1baea435e7f3d30e7db1fca6205cbe6cdb8b3a" + 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 + + on_linux do + keg_only "it conflicts with `binutils`" + 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") + return if OS.linux? + + (testpath/"sysroot").install resource("homebrew-sysroot") + (testpath/"hello.c").write <<~C + #include + int main() { printf("hello!\\n"); } + C + + ENV.remove_macosxsdk + 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" + assert_match "ELF", shell_output("file ./hello") + 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..e9a077abd8409 --- /dev/null +++ b/Formula/x/xa.rb @@ -0,0 +1,39 @@ +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_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..43749e39119fa --- /dev/null +++ b/Formula/x/xan.rb @@ -0,0 +1,30 @@ +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.50.0.tar.gz" + sha256 "9742e383649076b1348329e2430648267e22505b6ca35ce5006f614040f73d3c" + license any_of: ["MIT", "Unlicense"] + head "https://github.com/medialab/xan.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dda1e14e5a4191bee289018c33305f52af3e9c679aed92837b342002d3545430" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "efb0523f62429de464726a3fb3312a200c6c8265ec42675f01b70cd0a72c63d5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "f6114c83139e3c4f93ce42e654dbf2f1ed556c676a5ec595035e1eb1e5a831e1" + sha256 cellar: :any_skip_relocation, sonoma: "ee425dd63a9b7ab72e79ceb8cde3bda0fe4255ec855d57b570c5c15b5ccfe625" + sha256 cellar: :any_skip_relocation, ventura: "8a6d8dd8a04c012d4cb9bbba91b5d4a3db7c38c04a750743426d44251c698c6a" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab2f572d9c30f0dc4b110ca503b492672c941a65598f2fb065314782ebd219a3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce6fe0210b7f6f1af0df33f06da2224d434544c44f59b778c284767f8b36d7c8" + 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..f61c55e7225eb --- /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 + sha256 cellar: :any, arm64_sequoia: "1eae8800f5f28c7231afd2bee2818d2065e5fed8e7d307c2fe1d797c8d8fbf4e" + sha256 cellar: :any, arm64_sonoma: "95c8bb4a5a73ef642ab6e6d2ee6b59cf21217fa102333ced9696a14cff7f4da3" + sha256 cellar: :any, arm64_ventura: "d8b9b13a47f436a74438663123b567d95512cc7d91fe60c11eac10bca5555f55" + sha256 cellar: :any, sonoma: "a1b006c534ecc66fea932078de4221d0d385b3391d20aea13a3bace640fa047c" + sha256 cellar: :any, ventura: "19a9b99a6088ec521d2af29a14afc8f86b5674cd08330698e2d3a30caa1dfb19" + sha256 cellar: :any_skip_relocation, arm64_linux: "4e45335d6b4555bd6fd7a6a85bfe6a1a9b635a4418cc9b43e7de957301d3c1d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f87d97371ec436679abfd002d828ff14a00b4e4355faeef1e385f67a2c25412d" + end + + depends_on "python@3.13" => [: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.13" + 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..96720057845fc --- /dev/null +++ b/Formula/x/xaric.rb @@ -0,0 +1,64 @@ +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 + + bottle do + rebuild 1 + 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..1a2ca57cc18e9 --- /dev/null +++ b/Formula/x/xauth.rb @@ -0,0 +1,49 @@ +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_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..bb217384c29d3 --- /dev/null +++ b/Formula/x/xbee-comm.rb @@ -0,0 +1,44 @@ +# 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" + + bottle do + 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, mojave: "c5358f469073875537f489d59525c3c9022cebbd3fb77f418b4abba96cd24bf4" + sha256 cellar: :any_skip_relocation, high_sierra: "935948849935f3f11e6cf8992b1c6ad79e92716583c6b5685bf55cc6c4bd2d7a" + sha256 cellar: :any_skip_relocation, sierra: "9f6d626176e06f69934f3a3a3c56ddfa6a02be4f49d2e53dbce9d92b17f9eeb0" + sha256 cellar: :any_skip_relocation, el_capitan: "64b15ac79da143e2b092db702fd22c92ef064093be1c4c81cb60fd5b08f44075" + 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..a1723d4579dec --- /dev/null +++ b/Formula/x/xbitmaps.rb @@ -0,0 +1,39 @@ +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" + + 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..bef07d22ddea1 --- /dev/null +++ b/Formula/x/xboard.rb @@ -0,0 +1,64 @@ +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" + license "GPL-3.0-or-later" + revision 4 + + bottle do + 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..1ad2789b58898 --- /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.24.2.tar.gz" + sha256 "5afccb2961576cd42c3d1e5370cb566838ee80140d3d43bdec0e31dcbd6510a9" + 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: "9135936e87e25f24fdb946575f178d70d1195ded18fdb782461841fb091b522f" + 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..e31b190c14425 --- /dev/null +++ b/Formula/x/xc.rb @@ -0,0 +1,39 @@ +class Xc < Formula + desc "Markdown defined task runner" + homepage "https://xcfile.dev/" + url "https://github.com/joerdav/xc/archive/refs/tags/v0.8.5.tar.gz" + sha256 "374b3d4fe19355a1bc5ba63fd8bc346f027e6a1dbb04af631683ca45a24d806a" + license "MIT" + head "https://github.com/joerdav/xc.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "91d348a6a7d5cf6da756ee17c7e4711f010c16725b71fd01e10cd310e62a9b88" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "91d348a6a7d5cf6da756ee17c7e4711f010c16725b71fd01e10cd310e62a9b88" + sha256 cellar: :any_skip_relocation, arm64_ventura: "91d348a6a7d5cf6da756ee17c7e4711f010c16725b71fd01e10cd310e62a9b88" + sha256 cellar: :any_skip_relocation, sonoma: "3209aa028690d1b115b4c19d1b4cbe0d38289abbc3c57f68b97a6311afe34afd" + sha256 cellar: :any_skip_relocation, ventura: "3209aa028690d1b115b4c19d1b4cbe0d38289abbc3c57f68b97a6311afe34afd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d77bc7fbcefb48acfd459581bd5f354203efa3b41f96c2dae336b9c8c4953548" + 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..c4f2786a5d06f --- /dev/null +++ b/Formula/x/xcb-proto.rb @@ -0,0 +1,42 @@ +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" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "cf173904bebf1abd5722452d0869d51989d9621978008affbfc43e55d37f1451" + end + + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.13" => [:build, :test] + + def python3 + "python3.13" + 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..952f143420d69 --- /dev/null +++ b/Formula/x/xcb-util-cursor.rb @@ -0,0 +1,70 @@ +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_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" + 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..11d73012cc8a3 --- /dev/null +++ b/Formula/x/xcb-util-image.rb @@ -0,0 +1,48 @@ +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" + + bottle do + 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" + + 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..10c3e435da082 --- /dev/null +++ b/Formula/x/xcb-util-keysyms.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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" + + 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..31cfd4c327c4e --- /dev/null +++ b/Formula/x/xcb-util-renderutil.rb @@ -0,0 +1,47 @@ +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"] + + bottle do + 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..d087068a9a93f --- /dev/null +++ b/Formula/x/xcb-util-wm.rb @@ -0,0 +1,50 @@ +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" + + bottle do + 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" + + 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..ff1770a4598f9 --- /dev/null +++ b/Formula/x/xcb-util.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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..b0fc4721b14e8 --- /dev/null +++ b/Formula/x/xcbeautify.rb @@ -0,0 +1,42 @@ +class Xcbeautify < Formula + desc "Little beautifier tool for xcodebuild" + homepage "https://github.com/cpisciotta/xcbeautify" + url "https://github.com/cpisciotta/xcbeautify/archive/refs/tags/2.28.0.tar.gz" + sha256 "bf59b8c5fc41f4bb98d603b4915e1ac92e5c1c3ff6eab0369ab18c8819800cc6" + license "MIT" + head "https://github.com/cpisciotta/xcbeautify.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "f45c28a6ed416061a9863f6fb07dd5ad419213f5f53b5dc05e0235ba673e715d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0627e593edafa19d6a1bb9b0dcde0e8a004c14f2892e3849513881c52d7d4912" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3009d7334bc3f3837c415f0bc081c4022d6b96c3e8a546359172cf263be330ff" + sha256 cellar: :any_skip_relocation, sonoma: "39803ea35a27c9e4e875f944aae6e566e612c9068d11de2f6779f3ae97d793a9" + sha256 cellar: :any_skip_relocation, ventura: "462eb1a6aa2381674923e2bff1ad1fe024c0fc7f301fcf62a7adceb53f1b2f3e" + sha256 cellar: :any_skip_relocation, arm64_linux: "a9aa22b0109a2d29d0c01297cb6b26159d0743b4936fa8dce3a223b570ceb7b7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "47ecf3a32831abb77cb4dcbbced116bc211c13d7d27777c660e9f746886a025a" + end + + # needs Swift tools version 5.9.0 + depends_on xcode: ["15.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/xcbeautify" + 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..0e01f43a850ce --- /dev/null +++ b/Formula/x/xcdiff.rb @@ -0,0 +1,45 @@ +class Xcdiff < Formula + desc "Tool to diff xcodeproj files" + homepage "https://github.com/bloomberg/xcdiff" + url "https://github.com/bloomberg/xcdiff.git", + tag: "0.13.0", + revision: "99301ee4578224f0660a1312abc465c5a37176c5" + license "Apache-2.0" + head "https://github.com/bloomberg/xcdiff.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bd62e3b0b02971f946bea613e95a4ceeb8ab41ede5383518148c542b5908ef04" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "350423748bd984e66f473e60a4545125870b8589807b8d82b01745e0a45cad50" + sha256 cellar: :any, arm64_ventura: "2ba598baf440f1a76a105f07489776c4e81a1a1803d49c396209e88599e20410" + sha256 cellar: :any_skip_relocation, sonoma: "23083c0664be219b75633a64827762ea19a078b11d76558336df3c82928312e3" + sha256 cellar: :any, ventura: "fa904d1ebca63b4ba8e032e8406279535f91bc0f6e62a94edec04ce1f4123950" + 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" + 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..429832f75ae66 --- /dev/null +++ b/Formula/x/xcenv.rb @@ -0,0 +1,23 @@ +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" + + 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..27e8b2e3fe3a0 --- /dev/null +++ b/Formula/x/xcinfo.rb @@ -0,0 +1,35 @@ +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 + + 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..01ec123937039 --- /dev/null +++ b/Formula/x/xclip.rb @@ -0,0 +1,40 @@ +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 + + bottle do + 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, mojave: "7bacdf14b8a248a969952c6cba098e01b15d63b280b95a453164d2b0117400dc" + sha256 cellar: :any, high_sierra: "4ff44edecff889254b56f12f261127e90f20c8b0f8d10e0d7f6b41788be0b2e4" + 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..f955210502013 --- /dev/null +++ b/Formula/x/xclogparser.rb @@ -0,0 +1,94 @@ +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.41.tar.gz" + sha256 "03e0c257f202b50620b340f460504dfe3d5f6dfc725723618bf6ff98b167d9da" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0506dd7d0fd34cf648007ebaa19c22ee4a7950d621d0a81ecc0de1c4ab72e36f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f12a935ef504acb540d3e894cb29f4178b78e78cab47992801cc934edb22f82a" + sha256 cellar: :any_skip_relocation, arm64_ventura: "325dca4b969addb194bc8be42bdfdda4b61cc6549d186f1372cd7e781e03db96" + sha256 cellar: :any_skip_relocation, sonoma: "3ecb9ea804d75559570439b988c2f75310052ac31362d5c39e0e58f66ed0b177" + sha256 cellar: :any_skip_relocation, ventura: "ce099c27e0ee07214729ee9578472919bafc72056c80e5560293715fb45701ef" + sha256 arm64_linux: "5aa0b09e87329be677f7fa43e12e52e7bad79315697294d730dceeb8b06ce3c5" + sha256 x86_64_linux: "3a456db1fd20985ed03089f28e6256f7c0b4441cf70ad4d4c87f12cf021cc7db" + 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 + + # version patch, upstream pr ref, https://github.com/MobileNativeFoundation/XCLogParser/pull/223 + patch do + url "https://github.com/MobileNativeFoundation/XCLogParser/commit/78b330a67b4e3c916f5ad0c68e61ba4bb163cc2a.patch?full_index=1" + sha256 "61269c6a851c7880d88dbdd76dd41dc02505521015c415ea35b99ceea2791837" + 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" + 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..a263df8c6f3a5 --- /dev/null +++ b/Formula/x/xcode-build-server.rb @@ -0,0 +1,30 @@ +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" + + 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..f3c65dd0fb988 --- /dev/null +++ b/Formula/x/xcode-kotlin.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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..a68bc935f2660 --- /dev/null +++ b/Formula/x/xcodegen.rb @@ -0,0 +1,47 @@ +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.43.0.tar.gz" + sha256 "d79a89ea056ccc3cf84b736ee52c7b5184a560e54808e51f418f34d292869d66" + license "MIT" + head "https://github.com/yonaskolb/XcodeGen.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "1d08e16ea70ce5f323dd53197ed1204c6a78be04e629bb8e8cd11329b5d13c5d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b52935ffdb916dcfa90efef93419cbc050764f0d29e139ef951b8b994ee492c3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "db60cd9e7757912208a1ba128f1652f9dd49beac21d7b83bfd9d16d59bc6241f" + sha256 cellar: :any_skip_relocation, sonoma: "58ca67427dc960bc75413e651a476926eeed167e10dec790dfd16d560334fa70" + sha256 cellar: :any_skip_relocation, ventura: "6efa069b3f9ade5e77b7d0dd1fa76b3dae8d3914d45a3da5ff48a8e79e3a5f75" + end + + depends_on xcode: ["14.0", :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..57c0f5904e7da --- /dev/null +++ b/Formula/x/xcodes.rb @@ -0,0 +1,30 @@ +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.0.tar.gz" + sha256 "415c104c1aca42e68b4c6ede64e543d79a60d5a6fa99095f2aad179a74045047" + license "MIT" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c0bfcfc461c00b753ca481a0a3e1d7997c5eb940389de08895ee673c1a0e2612" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1913afb72f753a182a4d3d66f08b61f0abf2de924b93e3ad42f20bcf95260fa5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "07d06a3446dba98e8b62bf31da5bee4b49a7f3d5215baf269ef78f4334ce222b" + sha256 cellar: :any_skip_relocation, sonoma: "86ff1161c99af9f9fad6d8d38bd2a8cea1a53a8764cc4368770e83bf136ba22d" + sha256 cellar: :any_skip_relocation, ventura: "7c00b27bce8dd91695740061ec9d5d4cd54faec6d7d7e18016723e2619fabaff" + 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..a4d819bee347e --- /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.8.5.tar.gz" + sha256 "47011cd0bb3ad217780274555af50fe38f03d8e9deb4fe03ed7a3c1e782deb59" + license "MIT" + head "https://github.com/a7ex/xcresultparser.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5611ac80b73a2e3b80d2031a753f88c719a5aba3ed8971071fd72fa3d56ff520" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d08e43a313902ca8e9415c071afd632226f73f18ae975564a054b312724c4c80" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9b0efdb380802a632850cf3245c3eac499bece9f0217dcbd4ee38afc74f80e9f" + sha256 cellar: :any_skip_relocation, sonoma: "e2d94de14b2fc48ffbdeeedf8d4f9d818c1f49393e7f7bc7699672300ad33487" + sha256 cellar: :any_skip_relocation, ventura: "d451ea710acc90edca7d55bc1a0906c581f3f6d8721fa0280893b178ffe1e9e9" + 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" + 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..d70a759f87ae7 --- /dev/null +++ b/Formula/x/xctesthtmlreport.rb @@ -0,0 +1,37 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2f891210797be11eff596d4591cfd5a17040edad1f91ab4e82f05810605748ed" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6ba579e5455f7fcaa0dd5e9f5eebe5ef50d0f8c5e722ea8284cc93acf79d5d6d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6ced2a0b67495d2a88bb0c54884826c7803dab81f4a26e9b428be6e9403a7de2" + sha256 cellar: :any_skip_relocation, sonoma: "d6aa6f58167e54283fb1f2fc7f80cbf08024f577d087cae4f46fc764498ede33" + sha256 cellar: :any_skip_relocation, ventura: "110df7a8ab8a1254e30c69397bdca84ba148247d0a9009349a3c36c56c78b088" + 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" + 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..74456c6c1e939 --- /dev/null +++ b/Formula/x/xcv.rb @@ -0,0 +1,21 @@ +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" + + 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..33dc490548429 --- /dev/null +++ b/Formula/x/xdelta.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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, mojave: "29a63934406537a96b023609a87998574d41943ed2cfe816b3febc24b7cc7db1" + sha256 cellar: :any, high_sierra: "a65a726ce73eeebb9abfdf8069b08658dc4fad13527d4d162d1119cc32702b11" + sha256 cellar: :any, sierra: "7f51b76d06a6ac8aae36c10b41776a374d5fafa6b55c4908a885be7a88194676" + sha256 cellar: :any, el_capitan: "e07f928aadf6a9d8beb8a19fb72cb673cf0ae13c339ccd75c5df134cb3bc5c09" + 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..2b5b84cc55cbe --- /dev/null +++ b/Formula/x/xdg-ninja.rb @@ -0,0 +1,27 @@ +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 2 + sha256 cellar: :any_skip_relocation, all: "5d767e8e08cd29ca7a383288a46aa3ece6f66eefe8cdabeb103a3f882ededfb9" + 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: 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..23daca33d0050 --- /dev/null +++ b/Formula/x/xdot.rb @@ -0,0 +1,51 @@ +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: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8f3a6484db099186946f2e3fca16c51cd622e70030959554352b1128c1169d07" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8f3a6484db099186946f2e3fca16c51cd622e70030959554352b1128c1169d07" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8f3a6484db099186946f2e3fca16c51cd622e70030959554352b1128c1169d07" + sha256 cellar: :any_skip_relocation, sonoma: "8f3a6484db099186946f2e3fca16c51cd622e70030959554352b1128c1169d07" + sha256 cellar: :any_skip_relocation, ventura: "8f3a6484db099186946f2e3fca16c51cd622e70030959554352b1128c1169d07" + sha256 cellar: :any_skip_relocation, arm64_linux: "4b3962fef1f997c4e28a6ee0684728d9be91070c1ffee7e974dcabdf556839b1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9784e3d92d41e7cc137ec42897898b98428120f7107e168ec24b8b97ea0f8fb" + 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.13" + + 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/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + 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..d11c057dc243d --- /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" + + bottle do + sha256 cellar: :any, arm64_sequoia: "98a105e5266606cf09039b447d0e333c97f717a9549e78ac61880b30b94e83eb" + sha256 cellar: :any, arm64_sonoma: "721402fc77e843c3c937fa049b72489a6212bd23ad8e6d60596755ee9c5ad7be" + sha256 cellar: :any, arm64_ventura: "e97b772870557f47e08a218f6d5b799e4ed39ab167b5701c137f2219c1426275" + sha256 cellar: :any, arm64_monterey: "2e59d046b4cb7d97f989a022c0775cbf3ab9f5929cd05650d50a9eed62b162c2" + sha256 cellar: :any, arm64_big_sur: "cdf3234a474044e88dcf18b5cb5e8da2c2af6da4d85eb04e8be737802baeae16" + sha256 cellar: :any, sonoma: "2b5ff3fe92cfcd90ecdeb12e42e5ea65700b23a772f7349d12de97492d5d8590" + sha256 cellar: :any, ventura: "3990de3d762214cd1a8c4f6c0412b745728e8ca3509e6cd62040c111e38a3ec9" + sha256 cellar: :any, monterey: "ded3a6fc9f7ddc4e307a48744d2c25f2a60a752311628822c69d9f141d17ee34" + sha256 cellar: :any, big_sur: "f33aa5be05e49f700d166a13a36ecf5a1f8da3059e36f67e0cc9d7f26c3bf088" + sha256 cellar: :any, catalina: "21276c0386840d584e70f5425578b5184e56ef7649e6992f191a6c7a3cf8a30e" + sha256 cellar: :any_skip_relocation, arm64_linux: "94406f19595c7c9e65fa712f31eb82a8f27292978eec4e399d4accaa2a210428" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ffe41af3fe21135efdee19b3fabf9f459d850946dd592858a50b4cd46035f35e" + end + + depends_on "pkgconf" => :build + depends_on "libx11" + 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..a4a396d5ce319 --- /dev/null +++ b/Formula/x/xdpyinfo.rb @@ -0,0 +1,46 @@ +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.3.4.tar.xz" + sha256 "a8ada581dbd7266440d7c3794fa89edf6b99b8857fc2e8c31042684f3af4822b" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "6dbc9389db6707290660a6d54963d4a047e6243e94a24b61b265931bd6bfde8f" + sha256 cellar: :any, arm64_sonoma: "baf82ff9c8adc230c5a18e342b1fa449560d2f52940f568756a8fdc41fca3f15" + sha256 cellar: :any, arm64_ventura: "e4f808deface10045a57d8b83baee19ec7737b239af0e3638f5bb4fe879197f2" + sha256 cellar: :any, arm64_monterey: "ca1b56d68034d1414cec3f638b17a81fcaa5434505ac0c1beb38003599e2a78a" + sha256 cellar: :any, arm64_big_sur: "e2be6a8a5886c59f1e74311daf91b46a93f82a548c6db53e8bb9fd38562d9dd4" + sha256 cellar: :any, sonoma: "2f7afde3293852e250a3b9e44b942f1668b4173ee62f1da53733dfb0b43663f9" + sha256 cellar: :any, ventura: "9df6c27f362d5ad88cb70ec4f81c77e63eda93f8be5f47e4882b15275c469be2" + sha256 cellar: :any, monterey: "657234728dc1b95dd0a01297bb63c4c7a9dc8a0c9884a9ec4fe26f2f5e697571" + sha256 cellar: :any, big_sur: "715024678add793ed4a3649bec8b5d57fc8f0f17bbd1bff780662160068b6719" + sha256 cellar: :any_skip_relocation, arm64_linux: "eb4084730b91a26fc9ede2cf183a56eb74792d4b27ec1266d1618cbe1fe3a520" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f37e0dbf3c6c0741151f53befb6a5bc82b2fab008b3d28ce4cedf63e6a8bbbf" + 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..22a4c964e49db --- /dev/null +++ b/Formula/x/xe.rb @@ -0,0 +1,31 @@ +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" + + bottle do + 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..5cfb5a52d48ba --- /dev/null +++ b/Formula/x/xeol.rb @@ -0,0 +1,39 @@ +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_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 + 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 alpine:latest") + 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..98ea8b146571b --- /dev/null +++ b/Formula/x/xerces-c.rb @@ -0,0 +1,59 @@ +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_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..05094b43ddc89 --- /dev/null +++ b/Formula/x/xeyes.rb @@ -0,0 +1,36 @@ +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.0.tar.xz" + sha256 "0950c600bf33447e169a539ee6655ef9f36d6cebf2c1be67f7ab55dacb753023" + license "X11" + + bottle do + sha256 cellar: :any, arm64_sequoia: "819f815762f42fe4c83c16a8ab3b52374e86f5769012e7ad063b0f024348ebb0" + sha256 cellar: :any, arm64_sonoma: "e52653dc93b15317743e62242e8f034644dae383e6ceb60fa68fc6427e2e0ff1" + sha256 cellar: :any, arm64_ventura: "897825d1a62e7e083aecb0c147dac2105d09ee2ffe6ae8d1474f13bd1db6f7ca" + sha256 cellar: :any, sonoma: "d3c0b81ec0978277c09cd13284835f8043e2dd3b26828f8979bdfdbbbff9f4b3" + sha256 cellar: :any, ventura: "aa8c90253dbc533b4be0e796644d3064bc06a661f0f6ec690111692e9c21b86c" + sha256 cellar: :any_skip_relocation, arm64_linux: "5feb5ba49b6ad60ff5291b15fbbd9f89eb9dc9210e87c42c83ee4c0c6b943323" + sha256 cellar: :any_skip_relocation, x86_64_linux: "858c8dbe27ed47cc97b4a87877b97fa3268bcd138e2eeb7d509f8148404fcc85" + 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..049be46b2c1f8 --- /dev/null +++ b/Formula/x/xfig.rb @@ -0,0 +1,69 @@ +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_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..bde26297db576 --- /dev/null +++ b/Formula/x/xgboost.rb @@ -0,0 +1,99 @@ +class Xgboost < Formula + desc "Scalable, Portable and Distributed Gradient Boosting Library" + homepage "https://xgboost.ai/" + url "https://github.com/dmlc/xgboost/releases/download/v3.0.1/xgboost-src-3.0.1.tar.gz" + sha256 "46e6815fd24dec7e17ed6e9327cc062da098387ee36358e3e0a43fc43939a8b1" + license "Apache-2.0" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f54c01465fa7cd273fb4e3a16bbab055c42d4e17bd9fdbc63f22a0fc33378d7b" + sha256 cellar: :any, arm64_sonoma: "89e1e89aceac1097cdabe6c1e6dbff5c8e8f8b5507f1c7f76d5e7a1969ecb2af" + sha256 cellar: :any, arm64_ventura: "b2e320c5d39b13451d1f2b60507c8e39ce783cfa092ef29a8e40e029fc160edb" + sha256 cellar: :any, sonoma: "24c4a206e034d793a6a6f41d39f65714b9ae515b02c699ce571362db020ef064" + sha256 cellar: :any, ventura: "4e8fedb128abd3b2937123e82ad0794d564c3c5c605da9d4ba6d0fea7acee01e" + sha256 cellar: :any_skip_relocation, arm64_linux: "fcd0ba0ccfb88a2685ee3075b9e63172403158060cf08c9cd986f106796cde52" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4b57b046b244948706780f88732f47e06e813d74510785592edf29c3dd7dcd83" + 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/xh.rb b/Formula/x/xh.rb new file mode 100644 index 0000000000000..8e6df36bea490 --- /dev/null +++ b/Formula/x/xh.rb @@ -0,0 +1,35 @@ +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.24.1.tar.gz" + sha256 "c5902052c66e20fd2c0b49db14edb027f54500b502108327e17260c64a42edee" + license "MIT" + head "https://github.com/ducaale/xh.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "0f01773b794e7e494e39bde6660a2b3cd31512a80f9b777eac95b2418ba60f66" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0e60e82b1711213e1508bacdf28b5c94273b7f047e604f58b62412af0fe39bcd" + sha256 cellar: :any_skip_relocation, arm64_ventura: "00197223af3b41c2712638150c4c34ec51d0b4b84ae8e98d5b14c21a5c7d343e" + sha256 cellar: :any_skip_relocation, sonoma: "a3cc91b5e35aa965a440ff19d3ea5818883e0f3f8db433f89cdb52b7e7b23db1" + sha256 cellar: :any_skip_relocation, ventura: "4cc9bdf9d3b4a9c9c52dfcf24ec48d6c499e8a238dfcd809181b71d3291460ed" + sha256 cellar: :any_skip_relocation, arm64_linux: "ad81b5e4a15115c21808f2eb5cdf0d94f856c4c019e1b784366424731e034483" + sha256 cellar: :any_skip_relocation, x86_64_linux: "de4c56e04dc8446c3d4c6990fe1db6bbe1cd59d1999dcedae04c2288d3e7ac48" + 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..986921cdfb16d --- /dev/null +++ b/Formula/x/xidel.rb @@ -0,0 +1,56 @@ +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 + + bottle do + 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" unless build.head? + 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..1c730cb376e29 --- /dev/null +++ b/Formula/x/xinit.rb @@ -0,0 +1,123 @@ +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_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..dc59eeba01eab --- /dev/null +++ b/Formula/x/xinput.rb @@ -0,0 +1,47 @@ +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" + + bottle do + 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..5da198cd98ae0 --- /dev/null +++ b/Formula/x/xk6.rb @@ -0,0 +1,33 @@ +class Xk6 < Formula + desc "Build k6 with extensions" + homepage "https://k6.io/" + url "https://github.com/grafana/xk6/archive/refs/tags/v0.19.3.tar.gz" + sha256 "fccebf5dee0f6a74b8d1d1d2871085fc8c7c0287ca7d12941c8880f440c77bf7" + 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_sequoia: "0da126ae5c448fc6a25b3dbec8f9129fb6a4a406e911c5ea7fdb2b463c0c5357" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "0da126ae5c448fc6a25b3dbec8f9129fb6a4a406e911c5ea7fdb2b463c0c5357" + sha256 cellar: :any_skip_relocation, arm64_ventura: "0da126ae5c448fc6a25b3dbec8f9129fb6a4a406e911c5ea7fdb2b463c0c5357" + sha256 cellar: :any_skip_relocation, sonoma: "76a469f970cdcd8554fe478843337fc65bd1c229522b4dd5c08e9584a304074f" + sha256 cellar: :any_skip_relocation, ventura: "76a469f970cdcd8554fe478843337fc65bd1c229522b4dd5c08e9584a304074f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a308d515bcd1e4f59dd392f705e9cf36dbf8526bad6d3aec0b9e7af56867f46e" + end + + depends_on "go" + + def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/xk6" + end + + test do + str_build = shell_output("#{bin}/xk6 build") + assert_match "xk6 has now produced a new k6 binary", str_build + end +end diff --git a/Formula/x/xkbcomp.rb b/Formula/x/xkbcomp.rb new file mode 100644 index 0000000000000..d6e9ca1077f91 --- /dev/null +++ b/Formula/x/xkbcomp.rb @@ -0,0 +1,50 @@ +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_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..95a7a37ce0b3b --- /dev/null +++ b/Formula/x/xkcd.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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, 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..d5bf6a9eb3050 --- /dev/null +++ b/Formula/x/xkeyboard-config.rb @@ -0,0 +1,33 @@ +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.44.tar.xz" + sha256 "54d2c33eeebb031d48fa590c543e54c9bcbd0f00386ebc6489b2f47a0da4342a" + license "MIT" + head "https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "fe749c953e59bccd2a20d2d5576a20bf1b2a29ce3830ed81f9b9a9658838682e" + end + + depends_on "gettext" => :build + depends_on "meson" => :build + depends_on "ninja" => :build + depends_on "pkgconf" => [:build, :test] + depends_on "python@3.13" => :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..09ecaba94ae43 --- /dev/null +++ b/Formula/x/xlearn.rb @@ -0,0 +1,41 @@ +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" + + 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, mojave: "e5f597c563cf3ed1ca7e4ebdc733740b976710730f4388c3e4829552713b966d" + sha256 cellar: :any, high_sierra: "738b94f1c782c6bce8fe042bb80b48ade32b909297a0c55bc34004f60b449463" + 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 + + 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..aa5a1d2c916a8 --- /dev/null +++ b/Formula/x/xlispstat.rb @@ -0,0 +1,54 @@ +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 + + bottle do + 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, mojave: "2ad96a0eaeadb61b6eae731c7f8caf19ce6a202b4fab65d474e135c0731b8022" + sha256 cellar: :any, high_sierra: "66e03a45aad7571b1a51c5196236099f11884ee055e7b45fcbdb19d4ae682e90" + 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..e7e22d5833057 --- /dev/null +++ b/Formula/x/xlsclients.rb @@ -0,0 +1,30 @@ +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" + + bottle do + 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..f309e1dd5e190 --- /dev/null +++ b/Formula/x/xlslib.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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, mojave: "4cb1f1572aabd2918427724158ef6361390ee0f5268a3c14cb8ecf09a9f7c00d" + sha256 cellar: :any, high_sierra: "bb4b5aa643155d211af17a47b5337d65431b1ade0e233af9770d62dbb7ab1448" + sha256 cellar: :any, sierra: "bcdef576e03aa1cad74d341f6fcc72a1e7944a54542941f96cb8ef8063c2190e" + sha256 cellar: :any, el_capitan: "a4d5714e19c1d4e44d67bbe9cda064120dc01e9cf207771ae5ef208e76ed2cd9" + 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..ee494e08dd6e4 --- /dev/null +++ b/Formula/x/xlsxio.rb @@ -0,0 +1,49 @@ +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.35.tar.gz" + sha256 "03a4d1b1613953d46c8fc2ea048cd32007fbddcd376ab6d4156f72da2815adfa" + license "MIT" + head "https://github.com/brechtsanders/xlsxio.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f77f704e935976f1a6ef0afda3838ca144b7d9fa42d111edc3e636e0bc75c5f5" + sha256 cellar: :any, arm64_sonoma: "7795c447df632aa02bd9962ab025abf10904555e565763d75f811104dcf30421" + sha256 cellar: :any, arm64_ventura: "15613fb0399f4c22dc5e47013ee3aec14f1c7971d31d7ce24e4113185dd697ae" + sha256 cellar: :any, arm64_monterey: "62b72c1295c012e73f78ca57ae3bef61294e4f4b38cbfe1e97ae24fbaa291075" + sha256 cellar: :any, sonoma: "99c91608660f9ebc234b5c5c28a6d41e9b6aa832de812fa68e3ec243e5fbca20" + sha256 cellar: :any, ventura: "bd385c70fb296b74c0cb39017994f297a469c02d093c127d0ce7ef56bd961856" + sha256 cellar: :any, monterey: "6925d07058e4a7407049cab76bd1658a026a219ce9e4faf9b6d42b13c70e9410" + sha256 cellar: :any_skip_relocation, arm64_linux: "bb8fd94006a7ba840ba2c0759a7cdcada0c07e393609a03e488133e17ffb7a3c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f9438d1de48e33e92f6734366f4164281ce6aac33da36b330dd1898f98c14048" + 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..67973720a90cf --- /dev/null +++ b/Formula/x/xmake.rb @@ -0,0 +1,39 @@ +class Xmake < Formula + desc "Cross-platform build utility based on Lua" + homepage "https://xmake.io/" + url "https://github.com/xmake-io/xmake/releases/download/v2.9.9/xmake-v2.9.9.tar.gz" + sha256 "e92505b83bc9776286eae719d58bcea7ff2577afe12cb5ccb279c81e7dbc702d" + license "Apache-2.0" + head "https://github.com/xmake-io/xmake.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "229df9b130670e6cf6aac4eb40c7da7e7326a51590825ab7d3a88906f9d28641" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "46be66d19719757ac9be1671a03db504e7b9935839aa71eefa38fd920e206a1e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a604af6cb9d7fcd407984f926d784bdc37e4c7ee54353f309922ae81225f64cb" + sha256 cellar: :any_skip_relocation, sonoma: "1502c976b1f86c1ed83e4252d3b1968fa737f1fdded96b39bb99885cd933a460" + sha256 cellar: :any_skip_relocation, ventura: "434637aa25d9aab519ddb1921283b80c1e3f4e157d5daa9a3e2ad53d980e2049" + sha256 cellar: :any_skip_relocation, arm64_linux: "2736e9040b9d0e6a81c0254eb128315593146c8b5bdea8b0e55e571800a48ad0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0fb887965f9e42b267002ef34b6553cdadc105285a309be531e29f11feddd76d" + 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..ab99fcc53c1c8 --- /dev/null +++ b/Formula/x/xml-coreutils.rb @@ -0,0 +1,48 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "9be4dcb20fd773296a26df8495c5097b273a2a0d89f6abc1545a713ba94e1b07" + sha256 cellar: :any, high_sierra: "83023841339cb02ad53de64e30aa0c491e4acd4ae4602bd84847aca42ac02e00" + sha256 cellar: :any, sierra: "5f7519c9be40f731b0dca6238b3bedf4070f0663fc47ab8e4b0eff02d187718c" + sha256 cellar: :any, el_capitan: "19bdcacd49657e78f82fd7743a50266ff4945e644b069ac2c39a8787a57911a5" + 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..b16d77bb79949 --- /dev/null +++ b/Formula/x/xml-security-c.rb @@ -0,0 +1,41 @@ +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 + + bottle do + 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..8a458cc91c5df --- /dev/null +++ b/Formula/x/xml-tooling-c.rb @@ -0,0 +1,39 @@ +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 + + bottle do + sha256 cellar: :any, arm64_sequoia: "1b36b66bb9b46fd88ee081350f982c80b786f7badafdf75a741c900be3e1b911" + sha256 cellar: :any, arm64_sonoma: "64daef61885d864d71a90bdfaee06917c8c804f16047e57cd7f61e7ea010f2d0" + sha256 cellar: :any, arm64_ventura: "0e898674f0dff6301c67b43a6f6d2777e8b1f6699db05030c53ad941386e5c88" + sha256 cellar: :any, sonoma: "bbb79415f2f27bbecb0695af2c7547f3c08f3caa681564c4f5a10c1732d41f25" + sha256 cellar: :any, ventura: "c8d74d8e11b29f17443ceafce0ab9764a22e5cd8dd049929fbc93b11abcfbd7a" + sha256 cellar: :any_skip_relocation, arm64_linux: "482017f1ea455f4ecdbac8be24a55edb91ba4c852d288e1be5ae0c7034aa47a1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ed7b54bffbe67ec82fa423f304ee36a5877efd2bcc3d163d5bb71f23dc9a7dcd" + end + + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "log4shib" + depends_on "openssl@3" + depends_on "xerces-c" + depends_on "xml-security-c" + + uses_from_macos "curl" + uses_from_macos "zlib" + + def install + ENV.cxx11 + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + end +end diff --git a/Formula/x/xmlcatmgr.rb b/Formula/x/xmlcatmgr.rb new file mode 100644 index 0000000000000..8b0f11631b748 --- /dev/null +++ b/Formula/x/xmlcatmgr.rb @@ -0,0 +1,37 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "eb8b0acfdaed325cce3e6b7befb53a675f9f7f6dc8aa5d058b4ebecea2d50e53" + sha256 cellar: :any_skip_relocation, high_sierra: "bbb201365fe9f89dc036d97e7bcb05d5b299e32f2ad427266f1d73934fd03cb4" + 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..d44d36daeb3c4 --- /dev/null +++ b/Formula/x/xmlrpc-c.rb @@ -0,0 +1,41 @@ +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_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..979d5be8c4551 --- /dev/null +++ b/Formula/x/xmlstarlet.rb @@ -0,0 +1,43 @@ +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" + + bottle do + 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, mojave: "6e5d11ee1419a61a9f043663c1236d064ee692fd187ae15bf2114b42d8f0889e" + sha256 cellar: :any_skip_relocation, high_sierra: "56ce0e3190080e6e1111ebb31aa06aea53f16cde50359a356c24ff86a4df72b3" + sha256 cellar: :any_skip_relocation, sierra: "4958bf868beefb9a2b391c0fe05f5289b67a4cded708d71c4cc5fced130bac55" + sha256 cellar: :any_skip_relocation, el_capitan: "2d9a9b5f875b91c78378e7f3df12595528d8e4b9ec9e321131b7f9f78f30acd8" + 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..06e9ff880b357 --- /dev/null +++ b/Formula/x/xmlto.rb @@ -0,0 +1,59 @@ +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 + + bottle do + 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..8237befd6927c --- /dev/null +++ b/Formula/x/xmltoman.rb @@ -0,0 +1,62 @@ +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 + + bottle do + 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..e7caff6af6937 --- /dev/null +++ b/Formula/x/xmodmap.rb @@ -0,0 +1,42 @@ +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" + + bottle do + 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 + 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..dc3ad579450d2 --- /dev/null +++ b/Formula/x/xmount.rb @@ -0,0 +1,31 @@ +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.0/xmount-1.2.0.tar.bz2" + sha256 "07c261e54e1e4cbcd4f7eaaf4f62efcbbbc68c76797ddca704592d99ebed3d10" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 arm64_linux: "1de5d61365c208673d84f059724faff5d1930c9807579ac6b05627546717bc8f" + sha256 x86_64_linux: "1b6e3ef254b9fb27d176d6af4ecebda6c9b44f3b02244e543295a03d20831d97" + 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..17921d0c7ec7e --- /dev/null +++ b/Formula/x/xmp.rb @@ -0,0 +1,49 @@ +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" + + bottle do + 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..9c85445b3a9cc --- /dev/null +++ b/Formula/x/xmq.rb @@ -0,0 +1,48 @@ +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/3.3.2.tar.gz" + sha256 "076211d8595360eda4b29cb8423927fb4a7296a7bb39b14de087befa3a39e86a" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "f362ef2d0b2e3a7eedada9fcab2d8416f1b8a2823120a2331a87157613044a60" + sha256 cellar: :any, arm64_sonoma: "f0ccd4bed78aefb1dd7b361cf2d6acd4c7d77044c080a8f8fc92fee429debf0a" + sha256 cellar: :any, arm64_ventura: "278d2e835e0648f5a570c096b8ecc7c0d920fa2b079a4f1db46ca8d4bc1b677f" + sha256 cellar: :any, sonoma: "782915960236fdc44b975d8b5af0377f7cde3e86548d58b9fe9358b313c59f71" + sha256 cellar: :any, ventura: "84876ed3a249469215d2031185c6a7581ee128b55499a7f5adf616dc8927c932" + sha256 cellar: :any_skip_relocation, arm64_linux: "369e5c8e7f199d79d8669de762277ccca9a120c1494707ed0494c64d81a1b4b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8bbcedfde6940f09e482faeb078545c9f2b6c9cb1e2611632affb1cc23187b5c" + 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..a581efd9235fb --- /dev/null +++ b/Formula/x/xmrig.rb @@ -0,0 +1,77 @@ +class Xmrig < Formula + desc "Monero (XMR) CPU miner" + homepage "https://github.com/xmrig/xmrig" + url "https://github.com/xmrig/xmrig/archive/refs/tags/v6.22.2.tar.gz" + sha256 "34759ca9c1b2486ecb7b6bc267c76a6f365d401b2b6de6d667e0a13ae30882a2" + 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_sequoia: "b9a264f7ce1589c334422e779cb204da748a18420b2ab60e3e5c73185c9b158a" + sha256 cellar: :any, arm64_sonoma: "916d329c28225e91b58aed158b82fded68580cb78545e35615abfd5d59401cb2" + sha256 cellar: :any, arm64_ventura: "0060b2c5f152029d5a92d1fc3f87c664d36f008b54f3243f92aaeae97fb8ad83" + sha256 cellar: :any, sonoma: "244f472b2bc2b2d888ee23900ae772ad2f5405955dc7c0743c96d9e43c4ca94d" + sha256 cellar: :any, ventura: "294047c602acc9cba226a26c6295ff6654837d1cc74e0e88b5f5e244e451df4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "a24183e20464dd0eaaba0aac53cb8ebdf2c7301681aced582078425fe4fe43d5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "528d692d91a98a92d56097d23d3ecc3f71e60a45b27ec20ed8ef0d1405a2070c" + 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) + + if OS.mac? + assert_match "#{test_server} DNS error: \"unknown node or service\"", output + else + assert_match "#{test_server} 127.0.0.1 connect error: \"connection refused\"", output + end + end +end diff --git a/Formula/x/xnvme.rb b/Formula/x/xnvme.rb new file mode 100644 index 0000000000000..14c5c97f8de54 --- /dev/null +++ b/Formula/x/xnvme.rb @@ -0,0 +1,84 @@ +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_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..b12caec6e4c87 --- /dev/null +++ b/Formula/x/xonsh.rb @@ -0,0 +1,55 @@ +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/4a/5a/7d28dffedef266b3cbde5c0ba63f7f861bd5ff5c35bfa80df269f61000b4/xonsh-0.19.3.tar.gz" + sha256 "f3a58752b12f02bf2b17b91e88a83615115bb4883032cf8ef36e451964f29e90" + license "BSD-2-Clause-Views" + head "https://github.com/xonsh/xonsh.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "212e3ac1cbed6411752019fccb36661194d7035104ead4c2d56925221db2ecb9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "58caf5480641341a5a1b8f1ce4a121ee0e87efb86765001c661b306978eb47a5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "272c475da0888539e6eebb9c3162286c77f34755324fbd352d55a0ae91adc4ad" + sha256 cellar: :any_skip_relocation, sonoma: "687c31bc390db348e5f9641388e026404697ae0e213bddf8ad9fb51e2554c5c1" + sha256 cellar: :any_skip_relocation, ventura: "07e190aa8a62386e4bc929d041efdc75db0b710d4f1db5dedc1c94432f55463c" + sha256 cellar: :any_skip_relocation, arm64_linux: "b94e2ec721c85e7e699262400da8644f4624ae539c008782a3ebd6c122605900" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5600cd2ebd22f95e8257cc56b8081505e195cb58d2d523c507107c8223d62cbd" + end + + depends_on "python@3.13" + + resource "prompt-toolkit" do + url "https://files.pythonhosted.org/packages/a1/e1/bd15cb8ffdcfeeb2bdc215de3c3cffca11408d829e4b8416dcfe71ba8854/prompt_toolkit-3.0.50.tar.gz" + sha256 "544748f3860a2623ca5cd6d2795e7a14f3d0e1c3c9728359013f79877fc89bab" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "pyperclip" do + url "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz" + sha256 "b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310" + end + + resource "setproctitle" do + url "https://files.pythonhosted.org/packages/c4/4d/6a840c8d2baa07b57329490e7094f90aac177a1d5226bc919046f1106860/setproctitle-1.3.5.tar.gz" + sha256 "1e6eaeaf8a734d428a95d8c104643b39af7d247d604f40a7bebcf3960a853c5e" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..444e50f2f2ad2 --- /dev/null +++ b/Formula/x/xorg-server.rb @@ -0,0 +1,143 @@ +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.16.tar.xz" + sha256 "b14a116d2d805debc5b5b2aac505a279e69b217dae2fae2dfcb62400471a9970" + license all_of: ["MIT", "APSL-2.0"] + + bottle do + rebuild 1 + sha256 arm64_sequoia: "e9ff9b62d898703ddca09e82b036a67351e6aa14c1f08ebe4bf2772fadbd7055" + sha256 arm64_sonoma: "36fe7319a1317e7ea64b09a794a0c86d14f2066e887733dda516f23cdd05f773" + sha256 arm64_ventura: "725bff18ee85feaa9c758250a57fa14253cd087ab2e25805024a2758fc1c71cf" + sha256 sonoma: "07f8f3a4e8e88b19c022a54f3e5512a95ca5984529ed435a0831284867e5b581" + sha256 ventura: "a593137347c22716ea4098ecda532c2f9d8082c51d128de11059a78645a8e8cb" + sha256 arm64_linux: "dd9f4e8d0a87b0390cf5c76ab45fec1e543cf6f7d3132dbc9cfab558cd9110e4" + sha256 x86_64_linux: "ba290274fa63ac05cfb29e29e31944fe9e9f118ef5ef69b08e1b369c28f1add3" + 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" + + fork do + exec bin/"Xvfb", ":1" + end + ENV["DISPLAY"] = ":1" + sleep 10 + system "./test" + + system bin/"xvfb-run", "./test" if OS.linux? + end +end diff --git a/Formula/x/xorgproto.rb b/Formula/x/xorgproto.rb new file mode 100644 index 0000000000000..6397f2a51b409 --- /dev/null +++ b/Formula/x/xorgproto.rb @@ -0,0 +1,43 @@ +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_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..3a6964d49f5d1 --- /dev/null +++ b/Formula/x/xorgrgb.rb @@ -0,0 +1,41 @@ +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" + + bottle do + 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..050c3c7cd7b8b --- /dev/null +++ b/Formula/x/xorriso.rb @@ -0,0 +1,42 @@ +class Xorriso < Formula + desc "ISO9660+RR manipulation tool" + homepage "https://www.gnu.org/software/xorriso/" + url "https://ftp.gnu.org/gnu/xorriso/xorriso-1.5.6.pl02.tar.gz" + mirror "https://ftpmirror.gnu.org/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 + + bottle do + 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..6de50b609b69b --- /dev/null +++ b/Formula/x/xpdf.rb @@ -0,0 +1,44 @@ +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 + + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "498ac9ead73ba9677b494feb653335acbc7ba85c41ea6001c52fa47e2bc8d364" + sha256 cellar: :any, arm64_ventura: "60bdb7303f2f3c8b2018862b04f00dfbb169b08c5a91365298b1f0b6f5e2779c" + sha256 cellar: :any, sonoma: "0e6fb3a888aa52e6a8f98fd71a1e0408940624b9c32df49a976707fd3eeeeb04" + sha256 cellar: :any, ventura: "479115c082b9a0b15c166da94c0f782dda3216186dbf62874666efa2c13505cc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6a6a861f923c14a27ced94e1c2a8b82a520e60d130656dd6ab3769aea2770b7c" + end + + depends_on "cmake" => :build + + depends_on "fontconfig" + depends_on "freetype" + depends_on "libpng" + depends_on "qt" + + uses_from_macos "cups" + + conflicts_with "pdf2image", "pdftohtml", "poppler", + because: "poppler, pdftohtml, pdf2image, and xpdf install conflicting executables" + + def install + system "cmake", "-S", ".", "-B", "build", "-DSYSTEM_XPDFRC=#{etc}/xpdfrc", *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..5684740f7a443 --- /dev/null +++ b/Formula/x/xpipe.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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..0052eb2f4d864 --- /dev/null +++ b/Formula/x/xplanet.rb @@ -0,0 +1,94 @@ +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 + + bottle do + 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/formula-patches/f952f1d/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/formula-patches/6b8519a9391b96477c38e1b1c865892f7bf093ca/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 + + 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 diff --git a/Formula/x/xplr.rb b/Formula/x/xplr.rb new file mode 100644 index 0000000000000..8b460be2503df --- /dev/null +++ b/Formula/x/xplr.rb @@ -0,0 +1,46 @@ +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.0.tar.gz" + sha256 "72e9b53552b4fce61805c32c739d8d7db4723f80b4586c9eb5e9921e1ae32ce0" + license "MIT" + head "https://github.com/sayanarijit/xplr.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "d0e94ec68f4de399d20267cb847e859594ad550edceb378797fa005eda5fba5d" + sha256 cellar: :any, arm64_sonoma: "8d14184eb28e3c9e4aad281d8bd86bdaefc76f1ccc9153e97211b3cf71b3e604" + sha256 cellar: :any, arm64_ventura: "7629449d18d25d39455dcff74f2746c8531292f709116dad4701673627039a65" + sha256 cellar: :any, sonoma: "11b427f5313b5a86ae5007553903eb1702f3f73cecfd33f044a79c64a79a2fbc" + sha256 cellar: :any, ventura: "255db6ba076943720b3500a46d51e9985c1abe09095edb74d13e8a90c746fbe7" + sha256 cellar: :any_skip_relocation, arm64_linux: "f8b97ff3140ef328d4dc330c7082c1d0bffdb61555d04aaef779fac7552da2f3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5fb6dcaa884f339e2b63da4a7b1284f8619e778f32eb459c09f6bb56a761da57" + 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..31b6a3fcc6eb6 --- /dev/null +++ b/Formula/x/xprop.rb @@ -0,0 +1,30 @@ +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" + + bottle do + 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..42cedb4d40a72 --- /dev/null +++ b/Formula/x/xq.rb @@ -0,0 +1,43 @@ +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_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..a3af4fe274184 --- /dev/null +++ b/Formula/x/xqilla.rb @@ -0,0 +1,62 @@ +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 + + bottle do + 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" + + conflicts_with "zorba", because: "both supply `xqc.h`" + + 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..c3f22e1920e87 --- /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.4.30.tar.gz" + sha256 "4caff81848262684934022dca91cd00b3f28287c29c8229654e226a2ff7990c3" + 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_sequoia: "45471f4c01216822e408dbd29ad04d265f02e76b566ba38bf2332f797a116f4f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "45471f4c01216822e408dbd29ad04d265f02e76b566ba38bf2332f797a116f4f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "45471f4c01216822e408dbd29ad04d265f02e76b566ba38bf2332f797a116f4f" + sha256 cellar: :any_skip_relocation, sonoma: "76821c932e2d0ee213211a297ad3323a1e7e52a7a646f7880eac89585657b603" + sha256 cellar: :any_skip_relocation, ventura: "76821c932e2d0ee213211a297ad3323a1e7e52a7a646f7880eac89585657b603" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0acb25969b0bdea266341e74bd1350a15db2c371c12e382f64c8509c59fee537" + end + + depends_on "go" => :build + + resource "geoip" do + url "https://github.com/v2fly/geoip/releases/download/202503050126/geoip.dat" + sha256 "83337c712b04d8c16351cf5a5394eae5cb9cfa257fb4773485945dce65dcea76" + end + + resource "geosite" do + url "https://github.com/v2fly/domain-list-community/releases/download/20250305033558/dlc.dat" + sha256 "c4037839df21eadf36c88b9d56bec3853378a30f0e1a0ca8bc2e81971e5676a7" + end + + resource "example_config" do + # borrow v2ray example config + url "https://raw.githubusercontent.com/v2fly/v2ray-core/v5.26.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..91bee89986df2 --- /dev/null +++ b/Formula/x/xrdb.rb @@ -0,0 +1,39 @@ +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" + + bottle do + 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..1a7e97f03c08c --- /dev/null +++ b/Formula/x/xroar.rb @@ -0,0 +1,65 @@ +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_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..869a61cc3cec2 --- /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.8.2/xrootd-5.8.2.tar.gz" + mirror "https://xrootd.slac.stanford.edu/download/v5.8.2/xrootd-5.8.2.tar.gz" + sha256 "738111dabdf6c06094ae5d4ccac9471617a3d2a7b4c0dbe15c3717153c3a9564" + license "LGPL-3.0-or-later" + head "https://github.com/xrootd/xrootd.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "e54094b1df55be63dd93f862b02b08c48896d3f8de6ff02b8260f161c0a38c30" + sha256 cellar: :any, arm64_sonoma: "f5415634da71a8168e51d807f096bff10b4ce952760208ce750159c6bb9098ef" + sha256 cellar: :any, arm64_ventura: "83e1067519177995e01ec2a940f62a7159f4ef536185a3b67b31a69206bbcd07" + sha256 cellar: :any, sonoma: "acbc9d8b3dbf654f4b832adf98f5e92cb108140a4a9512340e37569498411e43" + sha256 cellar: :any, ventura: "e21dc1d127195ee77dd96299223d4bf17935b9726f3a31360d9372ac71f4d13a" + sha256 cellar: :any_skip_relocation, arm64_linux: "e92d7aa019e95964c7425471f7a0f1605f539f59c489425d456908db2ba7c5f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d788622ed26804020885123cbe99c815cf99982b16c2891c4dae7d9d80bc8aa4" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => [: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.13" + 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..61bdc15590942 --- /dev/null +++ b/Formula/x/xsane.rb @@ -0,0 +1,65 @@ +class Xsane < Formula + desc "Graphical scanning frontend" + homepage "https://gitlab.com/sane-project/frontend/xsane" + 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" + license "GPL-2.0-or-later" + revision 7 + + livecheck do + url "https://ftp.osuosl.org/pub/blfs/conglomeration/xsane/" + regex(/href=.*?xsane[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + 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 + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on "gtk+" # GTK3 issue: https://gitlab.com/sane-project/frontend/xsane/-/issues/34 + 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 + + # 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 + # Fix compile with newer Clang + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200 + + 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..06184323fcf99 --- /dev/null +++ b/Formula/x/xsd.rb @@ -0,0 +1,87 @@ +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 + + bottle do + 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..ac0d9648d63dc --- /dev/null +++ b/Formula/x/xsel.rb @@ -0,0 +1,40 @@ +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" + + bottle do + 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/xshogi.rb b/Formula/x/xshogi.rb new file mode 100644 index 0000000000000..0dcf96056f1d5 --- /dev/null +++ b/Formula/x/xshogi.rb @@ -0,0 +1,40 @@ +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" + license "GPL-3.0-or-later" + revision 1 + + bottle do + sha256 cellar: :any, arm64_sonoma: "efa3ef60e9dfadad1ec9f16f37ebf800c787fb8d0d605be1bb2dbb41143bb1ec" + sha256 cellar: :any, arm64_ventura: "656249206d9b9972cf307f04b4068f8a442e519c73e64536359d80bf64c117c1" + sha256 cellar: :any, arm64_monterey: "4f3219605fa0e580f072a4d33db039140e003f9490e92cfc9992e1f240d80bb0" + sha256 cellar: :any, arm64_big_sur: "fc650945fdedff5236f9cd3ca7e04732e67e3c46a7c3ca1e592be1dfe16c69c3" + sha256 cellar: :any, sonoma: "4877f092b750a7c4d79adda0befa46afc0566241ab08c37ecdab4fec2ef69359" + sha256 cellar: :any, ventura: "03064743768216efb16e5117394255cad1d96ea0b91d6e288bb067b449f65d7e" + sha256 cellar: :any, monterey: "eb6d154b030845b91a1df8c3a241da4b9268397869af45be410cfd883b9271d5" + sha256 cellar: :any, big_sur: "998ba1de10cc68bfa3c111576e0ea9bc09cab9a8cc308590e3d0914482b62178" + sha256 cellar: :any, catalina: "32cdfaceb15bbd7ebc4e2a8d26ca31c0008ce2ed1ef90f6f5309d7157ab722f6" + sha256 cellar: :any, mojave: "378503de599c2f121c06902aa2235a059b9e47963a80b1f29f7eb4b37b950479" + sha256 cellar: :any, high_sierra: "a52ad3a749214e18e02807f479b428f909d87c556cbeeb015dbf1b7b27d1fcb5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3c3a0fec7245f9e320b4565226493ed79e11e2e5a58a2ae9cbd569dc63fa5ffc" + end + + disable! date: "2024-09-05", because: :unmaintained + + depends_on "gnu-shogi" + depends_on "libx11" + depends_on "libxaw" + depends_on "libxext" + depends_on "libxmu" + depends_on "libxt" + + def install + ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403 + + system "./configure", "--disable-silent-rules", *std_configure_args + system "make", "install" + 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..b61beabbe42e6 --- /dev/null +++ b/Formula/x/xsv.rb @@ -0,0 +1,37 @@ +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_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..7c811b1790d12 --- /dev/null +++ b/Formula/x/xtensor.rb @@ -0,0 +1,57 @@ +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.26.0.tar.gz" + sha256 "f5f42267d850f781d71097b50567a480a82cd6875a5ec3e6238555e0ef987dc6" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "2348111bd2e2567d4f0a1d9958b625ec145dbfb6666989e164c99700bedbf12a" + end + + depends_on "cmake" => :build + + resource "xtl" do + url "https://github.com/xtensor-stack/xtl/archive/refs/tags/0.8.0.tar.gz" + sha256 "ee38153b7dd0ec84cee3361f5488a4e7e6ddd26392612ac8821cbc76e740273a" + end + + def install + resource("xtl").stage do + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + system "cmake", "-S", ".", "-B", "build", "-Dxtl_DIR=#{lib}/cmake/xtl", *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++17", "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..050548c6d8d24 --- /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-398.tgz" + mirror "https://deb.debian.org/debian/pool/main/x/xterm/xterm_398.orig.tar.gz" + sha256 "f679bd45f97063f10a880ecf7fc1611a9a03e8c8b98f063e99e0a079e87ee968" + license "X11" + + livecheck do + url "https://invisible-mirror.net/archives/xterm/" + regex(/href=.*?xterm[._-]v?(\d+(?:\.\d+)*)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "1fcfae23f3f5b7186bc395351a972b7b8315752f738a85421f089475e8888b40" + sha256 arm64_sonoma: "dae7aecd961a28b7b6f8ad957da4e7914d6b118f202330f25d7665d6ba682a3e" + sha256 arm64_ventura: "2c30e05f808cc7dbd697155e995e56e3145ba6c2d4635c889bb7b7c1e39d5b62" + sha256 sonoma: "f7929bbe56571f2a58abee25c613e29bc6af32bc7ebaf726ad485d9f643c7832" + sha256 ventura: "34e46dc4e1be70d6d479ce84073c5d9ab7ee4de5590e37453b31454005de3f13" + sha256 arm64_linux: "00b628a14150b51092402144b286c74d71e4dd86d95ec900db7d3a95e3478692" + sha256 x86_64_linux: "6ddecd312c2c27401881e90ced7bc8e1bf62db10ae6382d34d25111cb1e1dc0a" + end + + 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..d136892b246d7 --- /dev/null +++ b/Formula/x/xtermcontrol.rb @@ -0,0 +1,40 @@ +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 + + bottle do + 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..8b8dfa41681d1 --- /dev/null +++ b/Formula/x/xtitle.rb @@ -0,0 +1,27 @@ +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 + + 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..7f63353516bd4 --- /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.0.tar.gz" + sha256 "ee38153b7dd0ec84cee3361f5488a4e7e6ddd26392612ac8821cbc76e740273a" + license "BSD-3-Clause" + + bottle do + sha256 cellar: :any_skip_relocation, all: "695d77e88b992605995b4d8b4f0c90e4e3857248c57310b2b2fdce23fa44a86b" + 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..16def1d792f76 --- /dev/null +++ b/Formula/x/xurls.rb @@ -0,0 +1,31 @@ +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_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, 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..534b0a7e85787 --- /dev/null +++ b/Formula/x/xvid.rb @@ -0,0 +1,52 @@ +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 + + bottle do + 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, mojave: "4e119534a1351c85799944eb35f6f5675192e67e077fb3452f73f210a57eabe3" + sha256 cellar: :any, high_sierra: "79ea46af3061561427ab0af36b09d61e057084c76f655ec21074fba375a36b01" + 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..38e210a71ed44 --- /dev/null +++ b/Formula/x/xwin.rb @@ -0,0 +1,30 @@ +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.5.tar.gz" + sha256 "01fbb8c9b11d71388f0836cd112caf32a0b5c29e7307396594ec8391a815c19c" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "4037b8f7f0cc14cc0ceeef6bbcda2a8bc884eaf644c8a7fe28c5954a1bf1c526" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "024ef02449c4a8def7975e5a888029ad67057092f46bc3a834c986dc267d7d3d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "88a0344d220aa9b7efdf4eac804dc4f4d045a862658e73e5d4206006821acb8d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "b991244b55050f4b79a5e42245863ebdc624f8b42138ddd6741713a8f40d8e76" + sha256 cellar: :any_skip_relocation, sonoma: "8eb6be6eddc5bdaa98e9bedd06e15fe9dd98189ff5ee9f969093160eb91d0b3b" + sha256 cellar: :any_skip_relocation, ventura: "3b9c9cc7645f66e685ad98c7f9a450b45bfc36eddbcea151f25c857f132c28b9" + sha256 cellar: :any_skip_relocation, monterey: "ecee39a502597e5ce214487c8031c1b2679a835390b3385fbe0fafe7592d2ea2" + sha256 cellar: :any_skip_relocation, arm64_linux: "26d3fa39975e18376479c47984edfe5028031031ad9f8dd117a02a2cbe68232d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "244e179fcfcca8f1df7ca7d9490764602279f6dc45a678b5dfb2845ef5cb95ff" + 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..a3da113003195 --- /dev/null +++ b/Formula/x/xwininfo.rb @@ -0,0 +1,31 @@ +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" + + bottle do + 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..c8bd4938a63e4 --- /dev/null +++ b/Formula/x/xxh.rb @@ -0,0 +1,81 @@ +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 1 + sha256 cellar: :any, arm64_sequoia: "91c67ed304dd2ff1703b87750f81b35238e051b999837ad62b1fdef026b8681f" + sha256 cellar: :any, arm64_sonoma: "90fe8579c1a9494c3cd230237c8858e907f8d609dee2d467b04b7f3386a4d765" + sha256 cellar: :any, arm64_ventura: "58f728daf50085a2789ff3e60aaa79c9bdf8311d81a72229db17845339d27b23" + sha256 cellar: :any, sonoma: "e84bf6a6f1ec3a8c64808143699230cd051658b93e41392229f89b435dc935ba" + sha256 cellar: :any, ventura: "21ede13f1c2be72389b89d535d878bb67df550bad7ac5e738117fd0517b10802" + sha256 cellar: :any_skip_relocation, arm64_linux: "3040b653b3eeec14c4875be095568480975c537ea9bcbd8db3f2f9f3b2a2326d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2335bd805b3ec23dfbc6f32bef599e4da99420c48b0676d055050ca3d5f7de04" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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..dc0224c42c875 --- /dev/null +++ b/Formula/x/xxhash.rb @@ -0,0 +1,84 @@ +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_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..75639217a8ec0 --- /dev/null +++ b/Formula/x/xz.rb @@ -0,0 +1,58 @@ +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_sequoia: "dcd7823f2624cbcd08f55c232097a79300c7d76ab5969004db1a4785c6c0cd87" + sha256 cellar: :any, arm64_sonoma: "3bcdfeaa8b5bd910ac1cf1e7aec7e0fd82fd69f2f09c6ac682eca92725ad9e6c" + sha256 cellar: :any, arm64_ventura: "82fef9b66eea967b55cd0f26fd7356d60a0b926c5d9eaaf9c300a46f21391af5" + 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 d9752c94c05f9..0000000000000 --- a/Formula/x11vnc.rb +++ /dev/null @@ -1,39 +0,0 @@ -class X11vnc < Formula - desc "VNC server for real X displays" - homepage "https://github.com/LibVNC/x11vnc" - url "https://github.com/LibVNC/x11vnc/archive/0.9.16.tar.gz" - sha256 "885e5b5f5f25eec6f9e4a1e8be3d0ac71a686331ee1cfb442dba391111bd32bd" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "66ddb190e2e2a183ba662d4c7ac2de508b6ebe3c3c827078a5eec5b550477e5e" => :catalina - sha256 "cd3d5d0047a8fb2e7b66ac94baf08c2da16aa8e135b8180acacce2d1bf366e58" => :mojave - sha256 "2660aa48f9545eef71c5a42f9985720629d0391eaef37155264ec4c71cf13b29" => :high_sierra - sha256 "4e974a6cbc6bd9c03e90ed2f991a40c4589489ccbd01bd20552bf0a66773f924" => :sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "pkg-config" => :build - depends_on "libvncserver" - depends_on "openssl@1.1" - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["openssl@1.1"].opt_lib/"pkgconfig" - - args = %W[ - --disable-dependency-tracking - --prefix=#{prefix} - --mandir=#{man} - --without-x - ] - - system "./autogen.sh", *args - system "make", "install" - end - - test do - system bin/"x11vnc", "--version" - end -end diff --git a/Formula/x264.rb b/Formula/x264.rb deleted file mode 100644 index 50bc95a470244..0000000000000 --- a/Formula/x264.rb +++ /dev/null @@ -1,66 +0,0 @@ -class X264 < Formula - desc "H.264/AVC encoder" - homepage "https://www.videolan.org/developers/x264.html" - license "GPL-2.0" - head "https://code.videolan.org/videolan/x264.git" - - stable do - # the latest commit on the stable branch - url "https://code.videolan.org/videolan/x264.git", - :revision => "cde9a93319bea766a92e306d69059c76de970190" - version "r3011" - end - - bottle do - cellar :any - sha256 "0f3e8fbc5399231cc48770114071190d8fc7c598aedde207ee11eabce5e32b19" => :catalina - sha256 "5d1392936e7a8ca6008e918d876eb0851c0357d1b7f40b9417c147448dcb9fc2" => :mojave - sha256 "fa6457de45c2d97b1b258a11bfb5c1b2b36427ecc82ddb76c50db685b620adb3" => :high_sierra - end - - depends_on "nasm" => :build - - if MacOS.version <= :high_sierra - # Stack realignment requires newer Clang - # https://code.videolan.org/videolan/x264/-/commit/b5bc5d69c580429ff716bafcd43655e855c31b02 - depends_on "gcc" - fails_with :clang - end - - def install - # Work around Xcode 11 clang bug - # https://bitbucket.org/multicoreware/x265/issues/514/wrong-code-generated-on-macos-1015 - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - 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 - (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 57c2f4edea026..0000000000000 --- a/Formula/x265.rb +++ /dev/null @@ -1,66 +0,0 @@ -class X265 < Formula - desc "H.265/HEVC encoder" - homepage "https://bitbucket.org/multicoreware/x265" - url "https://bitbucket.org/multicoreware/x265/downloads/x265_3.4.tar.gz" - sha256 "c2047f23a6b729e5c70280d23223cb61b57bfe4ad4e8f1471eeee2a61d148672" - head "https://bitbucket.org/multicoreware/x265", :using => :hg - - bottle do - cellar :any - sha256 "51c759fb1ae6220caca443ef28171e94e387c5358ff5d8803716dc7d80d0b7d0" => :catalina - sha256 "f17d8ecd707aac0fd61354432adf63bc7e4a2513c4cf5d38af7813e4c59e628c" => :mojave - sha256 "68430356df947fbe78480d737180b3129c3a4b1e5fcec90762df19d14de30b1c" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "nasm" => :build - - def install - # Work around Xcode 11 clang bug - # https://bitbucket.org/multicoreware/x265/issues/514/wrong-code-generated-on-macos-1015 - ENV.append_to_cflags "-fno-stack-check" if DevelopmentTools.clang_build_version >= 1010 - - # 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 c0c1167105fca..0000000000000 --- a/Formula/x3270.rb +++ /dev/null @@ -1,32 +0,0 @@ -class X3270 < Formula - desc "IBM 3270 terminal emulator for the X Window System and Windows" - homepage "http://x3270.bgp.nu/" - url "http://x3270.bgp.nu/download/04.00/suite3270-4.0ga9-src.tgz" - sha256 "32dd89393bc9987e0b1fc397a48509ba99a372f19ba21f4d9444034a5f26a24e" - - bottle do - sha256 "0a97545f8a95a71631e033a52b15a99c36ba620d5e79a62fb8f4e947ed48b827" => :catalina - sha256 "1cb7acd49a6aadfbda744a7bd29a5002b0f521ebe989ee9b866c2e172051e964" => :mojave - sha256 "eadc86529406c0c5a2e5b5a3182037b1341eb4ef4326421722faa35edfbdf07a" => :high_sierra - end - - depends_on "readline" - - def install - args = %W[ - --prefix=#{prefix} - --enable-c3270 - --enable-pr3287 - --enable-s3270 - --enable-tcl3270 - ] - - system "./configure", *args - system "make", "install" - system "make", "install.man" - end - - test do - system bin/"c3270", "--version" - end -end diff --git a/Formula/x86_64-elf-binutils.rb b/Formula/x86_64-elf-binutils.rb deleted file mode 100644 index e50a133452229..0000000000000 --- a/Formula/x86_64-elf-binutils.rb +++ /dev/null @@ -1,38 +0,0 @@ -class X8664ElfBinutils < Formula - desc "GNU Binutils for x86_64-elf cross development" - homepage "https://www.gnu.org/software/binutils/" - url "https://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.gz" - mirror "https://ftpmirror.gnu.org/binutils/binutils-2.34.tar.gz" - sha256 "53537d334820be13eeb8acb326d01c7c81418772d626715c7ae927a7d401cab3" - revision 1 - - bottle do - sha256 "1d80291a30992f7d7cdbb8b057fa8dbf945425c89592b2b7ceeb02612269e3f0" => :catalina - sha256 "c09647bc99180ed5ee504e7282ba8cb453c85ed9473458d3a4ebcdfe84fd43f8" => :mojave - sha256 "68415da4e030aca55b4d077c134d23ca56820fd01b07c4eb9f67ed22decf1e41" => :high_sierra - end - - def install - system "./configure", "--target=x86_64-elf", - "--prefix=#{prefix}", - "--infodir=#{info}/x86_64-elf-binutils", - "--disable-nls" - system "make" - system "make", "install" - end - - test do - (testpath/"test-s.s").write <<~EOS - .section .data - .section .text - .globl _start - _start: - movl $1, %eax - movl $4, %ebx - int $0x80 - EOS - 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/x86_64-elf-gcc.rb b/Formula/x86_64-elf-gcc.rb deleted file mode 100644 index 64108ec44b798..0000000000000 --- a/Formula/x86_64-elf-gcc.rb +++ /dev/null @@ -1,54 +0,0 @@ -class X8664ElfGcc < Formula - desc "The GNU compiler collection for x86_64-elf" - homepage "https://gcc.gnu.org/" - url "https://ftp.gnu.org/gnu/gcc/gcc-10.1.0/gcc-10.1.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gcc/gcc-10.1.0/gcc-10.1.0.tar.xz" - sha256 "b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2" - - bottle do - sha256 "bb2b2a5e091f618b77a7900a8fdc6ea2d7a3591dc7245e417a53d15c9d102e73" => :catalina - sha256 "831ecfd46bd6537d894cfa9fc8aa3149e04c1fe9b8b0a7a60851cd87cf3608c2" => :mojave - sha256 "5eccdd282ba40dfc4089244dd576b56b5ddda35160021e542a49374487c34d18" => :high_sierra - end - - depends_on "gmp" - depends_on "libmpc" - depends_on "mpfr" - depends_on "x86_64-elf-binutils" - - def install - mkdir "x86_64-elf-gcc-build" do - system "../configure", "--target=x86_64-elf", - "--prefix=#{prefix}", - "--infodir=#{info}/x86_64-elf-gcc", - "--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", - "--enable-languages=c,c++", - "SED=/usr/bin/sed" - 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 - (share/"man/man7").rmtree - end - end - - test do - (testpath/"test-c.c").write <<~EOS - int main(void) - { - int i=0; - while(i<10) i++; - return i; - } - EOS - system "#{bin}/x86_64-elf-gcc", "-c", "-o", "test-c.o", "test-c.c" - assert_match "file format elf64-x86-64", - shell_output("#{Formula["x86_64-elf-binutils"].bin}/x86_64-elf-objdump -a test-c.o") - end -end diff --git a/Formula/xa.rb b/Formula/xa.rb deleted file mode 100644 index a14813498a5e7..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.11.tar.gz" - sha256 "32f2164c99e305218e992970856dd8e2309b5cb6ac4758d7b2afe3bfebc9012d" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "82ac5a005305bb5fd7ff181e2f9aae95ad5f865574ed4cb8f936948cce406a72" => :catalina - sha256 "6dfd866eea2c29d98aabbe4b9a0821ad9b808b0d2b7754b3400f5bb4f4cb4184" => :mojave - sha256 "40334865dd2af12409a5c52ed9a8d3a5bd6b781da28375509e2481bd885c87e4" => :high_sierra - 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 8b2d75dedd79a..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.lua?path=xalan/xalan-c/sources/xalan_c-1.11-src.tar.gz" - mirror "https://archive.apache.org/dist/xalan/xalan-c/sources/xalan_c-1.11-src.tar.gz" - sha256 "4f5e7f75733d72e30a2165f9fdb9371831cf6ff0d1997b1fb64cdd5dc2126a28" - revision 1 - - bottle do - cellar :any - sha256 "6a6ac96e65ef391d660c295f6c3a5c349f11cfa0604a6d5111bc88fd0a017304" => :catalina - 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/71f4b091e4c4939c3fa95981298580a827788e6f/xalan-c/xerces-char16.patch" - sha256 "ebd4ded1f6ee002351e082dee1dcd5887809b94c6263bbe4e8e5599f56774ebf" - end - - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/71f4b091e4c4939c3fa95981298580a827788e6f/xalan-c/locator-system-id.patch" - sha256 "7c317c6b99cb5fb44da700e954e6b3e8c5eda07bef667f74a42b0099d038d767" - end - - 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 bfb246c73db62..0000000000000 --- a/Formula/xapian.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Xapian < Formula - desc "C++ search engine library" - homepage "https://xapian.org/" - url "https://oligarchy.co.uk/xapian/1.4.16/xapian-core-1.4.16.tar.xz" - sha256 "4937f2f49ff27e39a42150e928c8b45877b0bf456510f0785f50159a5cb6bf70" - license "GPL-2.0" - version_scheme 1 - - bottle do - cellar :any - sha256 "d40ce12010e79a967378d80c2583400447c45b4a1ee48643b46a9775c5bc72ef" => :catalina - sha256 "aa6b6dfdc248b246bae4526a7c4bfb50a1b1e43a9ab9afb2ef37b3b335fd88cd" => :mojave - sha256 "927e056162df124b23a9a0e492368ca5047f25b6d1b0eb887fc84d723a71ba2d" => :high_sierra - end - - depends_on "sphinx-doc" => :build - depends_on "python@3.8" - - 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.16/xapian-bindings-1.4.16.tar.xz" - sha256 "8791ec6d15cdd2fa065e414033d0b1cd5cf61916fdb47ae5d36c3dfe69be621b" - end - - def install - python = Formula["python@3.8"].opt_bin/"python3" - ENV["PYTHON"] = python - - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - - resource("bindings").stage do - ENV["XAPIAN_CONFIG"] = bin/"xapian-config" - - xy = Language::Python.major_minor_version python - ENV.prepend_create_path "PYTHON3_LIB", lib/"python#{xy}/site-packages" - - ENV.append_path "PYTHONPATH", Formula["sphinx-doc"].opt_libexec/"lib/python#{xy}/site-packages" - ENV.append_path "PYTHONPATH", Formula["sphinx-doc"].opt_libexec/"vendor/lib/python#{xy}/site-packages" - - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-python3" - - system "make", "install" - end - end - - test do - system bin/"xapian-config", "--libs" - system Formula["python@3.8"].opt_bin/"python3", "-c", "import xapian" - end -end diff --git a/Formula/xaric.rb b/Formula/xaric.rb deleted file mode 100644 index 661809552076e..0000000000000 --- a/Formula/xaric.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - rebuild 2 - sha256 "b916b4f80429db2d487478f6bc9c53de07ea4bd23ada7f0deeb8f2a3fb7f1e1a" => :catalina - sha256 "31cc50542222e8ceae4b46887441fdd73be022bab481cfa205d2aae558c0d95b" => :mojave - sha256 "ba6e8b473868db28ea7d83417f1b4a5b4ccc6ed5b126653da6b1a3407d4b54fc" => :high_sierra - sha256 "7a4074ad4ca9ed3950fb4badb76ae4ec9a7c9228fd65a7a4d7d8b89296af8d3b" => :sierra - end - - depends_on "openssl@1.1" - - def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--with-openssl=#{Formula["openssl@1.1"].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 5fa68ce312819..0000000000000 --- a/Formula/xbee-comm.rb +++ /dev/null @@ -1,36 +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" - license "GPL-3.0" - head "https://github.com/guyzmo/xbee-comm.git" - - bottle do - cellar :any_skip_relocation - sha256 "4c4eb5e75f59ac2527ec72d41e5e11ae156243278b7c92186fdccec62435a783" => :catalina - 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 e3550511541bb..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 3 - - bottle do - sha256 "561953a63ec6296b6faeb38b999f83ede6ba7c91501cce88eeb560c282985ee7" => :catalina - sha256 "c94386e2985c9a4175aba3280658670810269c0a6fe8315676cc49198070bf14" => :mojave - sha256 "eecee1fb605e34564d8906a72f41d1516a210cb41af86c9dd51cdd05376d8b48" => :high_sierra - sha256 "5c9c512b8267d66e69842e9f11b9f63169ae2b953108df72f200122267724f9d" => :sierra - 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 aeed472c78a2a..0000000000000 --- a/Formula/xcenv.rb +++ /dev/null @@ -1,18 +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" - license "MIT" - 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 dc739ad59057c..0000000000000 --- a/Formula/xclip.rb +++ /dev/null @@ -1,30 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "c3b3e66635b85111a16a3a9ab1fedbe9872d2848d2dbba421fac8b8bf081a759" => :catalina - 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/xclogparser.rb b/Formula/xclogparser.rb deleted file mode 100644 index 2b4ccf6a91104..0000000000000 --- a/Formula/xclogparser.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Xclogparser < Formula - desc "Tool to parse the SLF serialization format used by Xcode" - homepage "https://github.com/spotify/XCLogParser" - url "https://github.com/spotify/XCLogParser/archive/v0.2.16.tar.gz" - sha256 "2431822f4fc28fb72555bdb2e3ac8e2097b34296ea9f4ec68ab886c448706afb" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "ff3a52de3458d323f7594c8c6cda5e37790f02b5cf41f030ebb0dc34b4e96ffe" => :catalina - sha256 "0384c8142d4f4b708a5738a04917caea51070f1b132cc90b7748790f4c507ed7" => :mojave - end - - depends_on :xcode => "11.0" - - resource "test_log" do - url "https://github.com/tinder-maxwellelliott/XCLogParser/releases/download/0.2.9/test.xcactivitylog" - sha256 "bfcad64404f86340b13524362c1b71ef8ac906ba230bdf074514b96475dd5dca" - end - - def install - system "swift", "build", "-c", "release", "--disable-sandbox" - bin.install ".build/release/xclogparser" - end - - test do - resource("test_log").stage(testpath) - shell_output = shell_output("#{bin}/xclogparser dump --file #{testpath}/test.xcactivitylog") - match_data = shell_output.match(/"title" : "(Run custom shell script 'Run Script')"/) - assert_equal "Run custom shell script 'Run Script'", match_data[1] - end -end diff --git a/Formula/xcodegen.rb b/Formula/xcodegen.rb deleted file mode 100644 index 36fd9e3760d43..0000000000000 --- a/Formula/xcodegen.rb +++ /dev/null @@ -1,40 +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.16.0.tar.gz" - sha256 "ae813fdbc3cc26a5af7de50fa1378292e23a0a719c20cb9b461d4bbd7099078a" - license "MIT" - head "https://github.com/yonaskolb/XcodeGen.git" - - bottle do - cellar :any_skip_relocation - sha256 "fc8f03f0f3968c6f913725629bdfa34a24a539a6868afdb1112b8f76cdbf5a55" => :catalina - sha256 "a8eea29cb064ef817a1aae173b102eb689a263fc4039987a4592e9f15c4b1d85" => :mojave - end - - depends_on :xcode => ["10.2", :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 e3fc9c8f60ae6..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 "46aa93499933dd1599eb4d38ba2e5b8587092c08f8acb691b29a1ccee6a80b17" => :catalina - sha256 "7efa30f2f581bbcc0962605710b1125965b6b8d13ca8e5fab8517adfe1c9334d" => :mojave - sha256 "d34b031444c1122392afb789036d3197a0d333ae11447c819509f1f31de30c9f" => :high_sierra - sha256 "f21fe7b203fbee383f502d66ac8471c7798d74dae7d4ad4491e933fcd1de22d5" => :sierra - sha256 "c7a6b18a500b28fbd9cba8939423b7a9c480be98e09883ef90e4b605023b451f" => :el_capitan - sha256 "8e20d277d1927c425544654cd8613765460f0b9bbbb8133b0ac04ebdff5d6f0e" => :yosemite - end - - 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 67b7d99bcf0fe..0000000000000 --- a/Formula/xctool.rb +++ /dev/null @@ -1,40 +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.7.tar.gz" - sha256 "608522865dc42959a6240010c8295ce01278f4b7a8276d838f21a8973938206d" - license "Apache-2.0" - head "https://github.com/facebook/xctool.git" - - bottle do - cellar :any - sha256 "0cf8c734d095ab97b2d5537b67d3f13e6ff8f38c46503ea02b9eba98ff35942c" => :catalina - sha256 "8b116346555e2616619e577d3ce3c69a24d66cb505ee048ba316ab2880736043" => :mojave - sha256 "055172ba606bf94416513e418007f849a08ff24a3b3484fb67c1b4f854123bb9" => :high_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 f09e5c7e3fa97..0000000000000 --- a/Formula/xdelta.rb +++ /dev/null @@ -1,36 +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 "5b5eae08cf9d1d5e37dc42f0d557670477bae10adf28278bbb4f88ec83a5a2c3" => :catalina - 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 02d7a8a07c548..0000000000000 --- a/Formula/xdot.rb +++ /dev/null @@ -1,45 +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/0f/1b/7ae17e0931ff011bba1c86000674666176021756d07ed29ce0b263b3fddf/xdot-1.1.tar.gz" - sha256 "e15c53d80dc8777402a7258eebe6cbf395d04085ff9699bbffae91df0ecc2433" - license "LGPL-3.0" - revision 1 - head "https://github.com/jrfonseca/xdot.py.git" - - bottle do - cellar :any_skip_relocation - sha256 "a92e47d64ecc06ba29af228325bb6ca78f063e410a26a5458e016660a600b3b4" => :catalina - sha256 "a92e47d64ecc06ba29af228325bb6ca78f063e410a26a5458e016660a600b3b4" => :mojave - sha256 "a92e47d64ecc06ba29af228325bb6ca78f063e410a26a5458e016660a600b3b4" => :high_sierra - end - - depends_on "adwaita-icon-theme" - depends_on "gtk+3" - depends_on "py3cairo" - depends_on "pygobject3" - depends_on "python@3.8" - - resource "graphviz" do - url "https://files.pythonhosted.org/packages/9a/00/481ad02701f952c59671a574a808d9d34d200103f0c7396db75f2e3df717/graphviz-0.11.1.zip" - sha256 "914b8b124942d82e3e1dcef499c9fe77c10acd3d18a1cfeeb2b9de05f6d24805" - end - - def install - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" - resource("graphviz").stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec/"vendor") - end - - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" - system Formula["python@3.8"].opt_bin/"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 38f97e65c6fbe..0000000000000 --- a/Formula/xdotool.rb +++ /dev/null @@ -1,40 +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" - revision 1 - - bottle do - sha256 "8dbfb2b1c32176c7cba00aaa2365f3cd438619dc0286e668e5d87412c3717d53" => :catalina - sha256 "860e5e7f2ca2ae88c86e8a979eba543f544960894bb4d8ec59d98cbba9805614" => :mojave - sha256 "9de15325d8ed42b629a94e34ff710672e96c1570dc51a6544aff0d0445de5e9c" => :high_sierra - 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` - ENV.delete("SDKROOT") if MacOS.version == :el_capitan && MacOS::Xcode.version >= "8.0" - - 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 4f2cac5da6a25..0000000000000 --- a/Formula/xerces-c.rb +++ /dev/null @@ -1,53 +0,0 @@ -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.2.3.tar.gz" - mirror "https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-3.2.3.tar.gz" - sha256 "fb96fc49b1fb892d1e64e53a6ada8accf6f0e6d30ce0937956ec68d39bd72c7e" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "8bcfddab9276b6f09c9af5bd8be60d500cd5107795c25495b53ef5e0734ae617" => :catalina - sha256 "502d34b51931ead6b1db27ca1a71eed465ecd4da5dbdeaa51c0ae77e77dc25ea" => :mojave - sha256 "8b30ad6819fc3628b706a18193d45b96c13749e7d1e27f5392cf91e48fe7d63b" => :high_sierra - end - - depends_on "cmake" => :build - - uses_from_macos "curl" - - def install - ENV.cxx11 - - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make" - system "ctest", "-V" - system "make", "install" - system "make", "clean" - system "cmake", "..", "-DBUILD_SHARED_LIBS=OFF", *std_cmake_args - system "make" - lib.install Dir["src/*.a"] - 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/xgboost.rb b/Formula/xgboost.rb deleted file mode 100644 index 7d476de0db5d2..0000000000000 --- a/Formula/xgboost.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Xgboost < Formula - desc "Scalable, Portable and Distributed Gradient Boosting Library" - homepage "https://xgboost.ai/" - url "https://github.com/dmlc/xgboost.git", - :tag => "v1.1.1", - :revision => "34408a7fdcebc0e32142ed2f52156ea65d813400" - license "Apache-2.0" - - bottle do - cellar :any - sha256 "a80dfdb4e53157f2a5e3ff325303be7448952c80fa5db3292d1031024a36eded" => :catalina - sha256 "7fbe70d2c3acff2901c3499ae7ce2582e44d4e944ffa1eab09ee79b7262413c3" => :mojave - sha256 "6f40ceaac9d8aed4cbc8e52081f9d0c63ab24f5c63b38e564334a7c2c0717118" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "libomp" - - def install - mkdir "build" do - system "cmake", *std_cmake_args, ".." - system "make" - system "make", "install" - end - pkgshare.install "demo" - end - - test do - cp_r (pkgshare/"demo"), testpath - cd "demo/data" do - cp "../binary_classification/mushroom.conf", "." - system "#{bin}/xgboost", "mushroom.conf" - end - end -end diff --git a/Formula/xhyve.rb b/Formula/xhyve.rb deleted file mode 100644 index 7624ed7d49236..0000000000000 --- a/Formula/xhyve.rb +++ /dev/null @@ -1,32 +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 "b81d7e54464f0870eabe1fead9d31627ad5342fd2e9aaff47535a7bcc738751f" => :catalina - sha256 "babcee304193c68f484434c551732e5657878095f00c4149fc88867317f9252e" => :mojave - sha256 "9643b72b869ec57653668f1ed2db0c3a2c7fad77d8000931933824622032d476" => :high_sierra - sha256 "edc2e17147d4ae9333033e7317590a48b752b418df689a6dae45bd29a12eaca8" => :sierra - sha256 "b0a94f72b09c71aa3bfbbf55669cd9e64ea309d6be8c838f6bc98aeaf8a6895c" => :el_capitan - sha256 "e61ee4b3d2d3b5bba47f4288af54980f5de7991cadf6aa83dc058cb36854c789" => :yosemite - end - - def install - args = [] - args << "GIT_VERSION=#{version}" if build.stable? - system "make", *args - bin.install "build/xhyve" - pkgshare.install "test/" - pkgshare.install Dir["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 7f24730758db0..0000000000000 --- a/Formula/xidel.rb +++ /dev/null @@ -1,30 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "885e1685c81a6abb9767a6e807894a98b5d296952e60fdad6341961ce4dc737e" => :mojave - sha256 "16eb3dc18004c0be8e384714ef543aa6dfe0b026e4ec0a7b6294dd499606bb12" => :high_sierra - sha256 "623ba6f72816f4d9cb2055539a023f36a620add9c77a61193fcaea88a08cedf5" => :sierra - end - - depends_on "fpc" - depends_on "openssl@1.1" - - 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/xlearn.rb b/Formula/xlearn.rb deleted file mode 100644 index 887673276da97..0000000000000 --- a/Formula/xlearn.rb +++ /dev/null @@ -1,38 +0,0 @@ -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/v0.4.4.tar.gz" - sha256 "7b0e9db901c0e6feda4dfb793748ec959b2b56188fc2a80de5983c37e2b9f7d2" - license "Apache-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "4edeafacfb2f12dabd7fa08bb60d62186912c6e000a496fd5bf31523ecaa3557" => :catalina - sha256 "e5f597c563cf3ed1ca7e4ebdc733740b976710730f4388c3e4829552713b966d" => :mojave - sha256 "738b94f1c782c6bce8fe042bb80b48ade32b909297a0c55bc34004f60b449463" => :high_sierra - end - - depends_on "cmake" => :build - - def install - inreplace "CMakeLists.txt", "set(CMAKE_INSTALL_PREFIX \"xLearn\")", "" - - mkdir "build" do - system "cmake", "..", "-DCMAKE_MACOSX_RPATH=TRUE", *std_cmake_args - system "make" - system "make", "install" - - bin.install "xlearn_train" - bin.install "xlearn_predict" - lib.install "lib/libxlearn_api.dylib" - end - - 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/xlispstat.rb b/Formula/xlispstat.rb deleted file mode 100644 index bf3d133469f0c..0000000000000 --- a/Formula/xlispstat.rb +++ /dev/null @@ -1,30 +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 "b75a56962e29ab9557eea7218de105ff6a989ce1e473642b29951baebeaa69ce" => :catalina - 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 dbf9f288b070b..0000000000000 --- a/Formula/xlslib.rb +++ /dev/null @@ -1,30 +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 "9db0f101930faf04be3a8c7cccfafefeb82efc3009e88ab7494296b371631bc3" => :catalina - 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 bd80101454a52..0000000000000 --- a/Formula/xmake.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Xmake < Formula - desc "Cross-platform build utility based on Lua" - homepage "https://xmake.io/" - url "https://github.com/xmake-io/xmake/releases/download/v2.3.5/xmake-v2.3.5.tar.gz" - sha256 "5be491fd023333225ab347dc209f18f453e61d52988ae84f485e1b2552a440d6" - license "Apache-2.0" - head "https://github.com/xmake-io/xmake.git" - - bottle do - cellar :any_skip_relocation - sha256 "ecfef90dabbaa9a507b4bd17eba62a2f622f2e4e53324251db699e4c4cc3fb85" => :catalina - sha256 "7009ae9ee758bc803ffa46267a1595f639fd350a819af79a237575d692bdb06d" => :mojave - sha256 "7cd0cb7c5727d885904809c64859515f5d83a7e20a82232377a56333af37d9aa" => :high_sierra - end - - on_linux do - depends_on "readline" - end - - def install - system "make", "build" - system "make", "install", "prefix=#{prefix}" - end - - test do - 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/xml-coreutils.rb b/Formula/xml-coreutils.rb deleted file mode 100644 index 81bd76fe9d126..0000000000000 --- a/Formula/xml-coreutils.rb +++ /dev/null @@ -1,34 +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" - license "GPL-3.0" - - bottle do - cellar :any - rebuild 1 - sha256 "e098f5b2d9af801bb12c65044668091b175dcca43cec7251acb0d3e1ccad4fed" => :catalina - 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 0f92993101284..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.lua?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" - revision 1 - - bottle do - cellar :any - sha256 "ce0f62697cff7004fa7498ebc0dcc917206be09847847fa2ec31285b81ed04ce" => :catalina - sha256 "eec2216263c3bb21b52418d18232034aacc69335d3e14624225627fe5364347c" => :mojave - sha256 "5ee66d19898cd50085e90392313d3a1f45204bd111f32019251af89ee84f1ca5" => :high_sierra - sha256 "bd1e4d4b5768f869d28850ad440e32d417f6db5d182c6049afc87575bb36ccc9" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "openssl@1.1" - depends_on "xerces-c" - - def install - ENV.cxx11 - - system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking", - "--with-openssl=#{Formula["openssl@1.1"].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 8230c4deb459d..0000000000000 --- a/Formula/xml-tooling-c.rb +++ /dev/null @@ -1,33 +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.1.0/xmltooling-3.1.0.tar.bz2" - sha256 "722723cc2731a25db23c6acc5bc67e25a1554224e7039edd4e9ea5816e525d0e" - - bottle do - cellar :any - sha256 "0608d8938278794d1101b96e70d7f408b3e12f270eccc9cb1a8595e2880ab934" => :catalina - sha256 "d04a629486e2478f98c1f729c474d18fee5fc4bb0b2f2bdab17c6e4b3131db9f" => :mojave - sha256 "6ee9b56942dcf7b05e830c11eb4249c14d07ae367433e40838454f8e6cd84858" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "boost" - depends_on "log4shib" - depends_on "openssl@1.1" - depends_on "xerces-c" - depends_on "xml-security-c" - - uses_from_macos "curl" - - def install - ENV.cxx11 - - ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["openssl@1.1"].opt_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 8bfeace1684d8..0000000000000 --- a/Formula/xml2.rb +++ /dev/null @@ -1,31 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "832aa209cf47c4f18ad512f7eca2acf76aa047522b3a417466722203203bd71e" => :catalina - sha256 "63b136beee1c47726c6756f3c57bf55fcff4e660cd280d090aa35640138465b6" => :mojave - sha256 "548421fe00487faa136c700e4d18f48b6bc349956044e2aa0f65667c3856883d" => :high_sierra - sha256 "d8d4bb9ceb9d97b648d3fd3cffb1e2fad2e4d82aa6aa3397c22f53fe5468ac56" => :sierra - sha256 "85e939873edbb3dd1b072437992a0c404534a5084cccd6f9f76d99b09ddda695" => :el_capitan - sha256 "3883d5997021b3a5bd57d8830906cb9b370da0f6e1927b6c7e9dcd6740e05c5c" => :yosemite - end - - depends_on "pkg-config" => :build - - uses_from_macos "libxml2" - - 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 68e650e98cd34..0000000000000 --- a/Formula/xmlcatmgr.rb +++ /dev/null @@ -1,26 +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 - cellar :any_skip_relocation - rebuild 1 - sha256 "ae788970290574145fa3ca20e389469f1a8582c8b604a50e3e506b7ffcb9faa4" => :catalina - sha256 "eb8b0acfdaed325cce3e6b7befb53a675f9f7f6dc8aa5d058b4ebecea2d50e53" => :mojave - sha256 "bbb201365fe9f89dc036d97e7bcb05d5b299e32f2ad427266f1d73934fd03cb4" => :high_sierra - 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 0ad5b81c54494..0000000000000 --- a/Formula/xmlrpc-c.rb +++ /dev/null @@ -1,28 +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.51.06/xmlrpc-c-1.51.06.tgz" - sha256 "06dcd87d9c88374559369ffbe83b3139cf41418c1a2d03f20e08808085f89fd0" - - bottle do - cellar :any - sha256 "f7d6a12c5e57d9ceb97b88dba518a6bae79e41e95343395a3f3c94bc168c92ab" => :catalina - sha256 "638d1d6484717f57228174db4b9e875798b3ee1558ac6bcab59c96d80fcdab56" => :mojave - sha256 "88a9ab0c2baea0aac627427628b00bce6828e5fc436533c0de8cfb0a99c21a24" => :high_sierra - 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 3fbf46565f5c3..0000000000000 --- a/Formula/xmlsectool.rb +++ /dev/null @@ -1,22 +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" - revision 1 - - bottle :unneeded - - depends_on "openjdk" - - def install - prefix.install "doc/LICENSE.txt" - rm_rf "doc" - libexec.install Dir["*"] - (bin/"xmlsectool").write_env_script "#{libexec}/xmlsectool.sh", :JAVA_HOME => Formula["openjdk"].opt_prefix - 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 3f2ab11303566..0000000000000 --- a/Formula/xmlstarlet.rb +++ /dev/null @@ -1,33 +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" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "2a679570811f553e345748516fa37c2d4b529a75533bdb73316077aaed5ab8f6" => :catalina - sha256 "6e5d11ee1419a61a9f043663c1236d064ee692fd187ae15bf2114b42d8f0889e" => :mojave - sha256 "56ce0e3190080e6e1111ebb31aa06aea53f16cde50359a356c24ff86a4df72b3" => :high_sierra - sha256 "4958bf868beefb9a2b391c0fe05f5289b67a4cded708d71c4cc5fced130bac55" => :sierra - sha256 "2d9a9b5f875b91c78378e7f3df12595528d8e4b9ec9e321131b7f9f78f30acd8" => :el_capitan - sha256 "525eafe6cab96cc6e04fef756e25316119b3c96cb61e5f7f51770cd062ad1bec" => :yosemite - sha256 "7004b98b4dd9195a35f736ba3f6282369a2c63397a710056c5d1ae71d149fa3a" => :mavericks - end - - uses_from_macos "libxslt" - - 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 f54c778fcc930..0000000000000 --- a/Formula/xmlto.rb +++ /dev/null @@ -1,64 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "0343fee2df7057a42c9b401757e5c192f1e90e7c4a8b2c14c5df155a7e4346c9" => :catalina - 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" - - uses_from_macos "libxslt" - - # 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 0995c79d9d022..0000000000000 --- a/Formula/xmltoman.rb +++ /dev/null @@ -1,28 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "547b65d2c4e637b2331382f907a1a9602864d7e1e579404ae96e765dc8a4f378" => :catalina - 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/xmount.rb b/Formula/xmount.rb deleted file mode 100644 index ca10adc487f8d..0000000000000 --- a/Formula/xmount.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Xmount < Formula - desc "Convert between multiple input & output disk image types" - homepage "https://www.pinguin.lu/xmount/" - url "https://files.pinguin.lu/xmount-0.7.6.tar.gz" - sha256 "76e544cd55edc2dae32c42a38a04e11336f4985e1d59cec9dd41e9f9af9b0008" - revision 2 - - bottle do - rebuild 1 - sha256 "55de429679b12e85dcfb854d4add045363a287c172b7b77765591d7d1d89324c" => :catalina - sha256 "ae937d5fdba6c278bef72a4f87d62a6dafc2f78ad642ee6995bc228743ed37cd" => :mojave - sha256 "a4436c7060d9b84abfa6450c7156cd994f42c130eebf1281e21319d6e5c00415" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "pkg-config" => :build - depends_on "afflib" - depends_on "libewf" - depends_on "openssl@1.1" - depends_on :osxfuse - - def install - ENV.prepend_path "PKG_CONFIG_PATH", Formula["openssl@1.1"].opt_lib/"pkgconfig" - - system "cmake", ".", *std_cmake_args - system "make", "install" - end - - test do - system bin/"xmount", "--version" - end -end diff --git a/Formula/xmp.rb b/Formula/xmp.rb deleted file mode 100644 index 1b3f903cc30bb..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" - license "GPL-2.0" - - bottle do - cellar :any - rebuild 1 - sha256 "dc4399be2df77f0534bf1151201fd52b61694df7285bd58d9c1fe16522f199f6" => :catalina - sha256 "197be59a2a0c3495aeed49eeeedea65b060534f4ff5ad234cdd35f6da19fb9e1" => :mojave - sha256 "c76b4335844295d6daaaaca97f462828d39a9ce511c859d0ebf66165b12a6354" => :high_sierra - 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 ddaa80de9f916..0000000000000 --- a/Formula/xmrig.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Xmrig < Formula - desc "Monero (XMR) CPU miner" - homepage "https://github.com/xmrig/xmrig" - url "https://github.com/xmrig/xmrig/archive/v5.11.3.tar.gz" - sha256 "7bfc1ec5c6e2ceea61ceb792b1e7bdd6c651097059ee0622306c19597ff7ff82" - license "GPL-3.0" - head "https://github.com/xmrig/xmrig.git" - - bottle do - sha256 "0855edef0e1b3a0f1cb59bc62f9cbfd75751d7283929ad667545643fd2726407" => :catalina - sha256 "ad7b625ec09681ff6488efe43fbb4a8d6c94098ab0fd71554721d11d3c26c9d0" => :mojave - sha256 "a325f57032ad09541daac1bc0f9541583d1eb6c850275b4a5fca0b215589e5b5" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "hwloc" - depends_on "libmicrohttpd" - depends_on "libuv" - depends_on "openssl@1.1" - - def install - mkdir "build" do - system "cmake", "..", "-DWITH_CN_GPU=OFF", *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") - 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 8cf4621e46a03..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.9.18.tar.gz" - sha256 "fbbcb62334a2f1fd94af79c6d4bcf183c0308aab16221a9aa752a3660cc73f09" - head "https://github.com/xonsh/xonsh.git" - - bottle do - cellar :any_skip_relocation - sha256 "4070263bdcb133592aa553a066e14508f9d80baad17dbb197ed1a66fa415642d" => :catalina - sha256 "27f235259b2deddbc6dd0177e341e652a519b516cf4131124d55b320210acf88" => :mojave - sha256 "e6160b47a159b7a1ed67dabb58a131ec8aea10d7f80a1a62404b72725ccd403d" => :high_sierra - end - - depends_on "python@3.8" - - # 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/61/c9/56131b4753ef14bffd06754846c63de78b3a868e995763f6410381a6fb98/prompt_toolkit-3.0.4.tar.gz" - sha256 "ebe6b1b08c888b84c50d7f93dee21a09af39860144ff6130aadbd61ae8d29783" - end - - resource "Pygments" do - url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz" - sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" - 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/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" - sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" - end - - resource "wcwidth" do - url "https://files.pythonhosted.org/packages/25/9d/0acbed6e4a4be4fc99148f275488580968f44ddb5e69b8ceb53fc9df55a0/wcwidth-0.1.9.tar.gz" - sha256 "ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" - 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 9a7af72952485..0000000000000 --- a/Formula/xorriso.rb +++ /dev/null @@ -1,32 +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.5.2.tar.gz" - mirror "https://ftpmirror.gnu.org/xorriso/xorriso-1.5.2.tar.gz" - sha256 "3b69f5c93ae7c40c5bbe4a847fa3963f5efc9c565551622f77121c5792fc17e7" - - bottle do - cellar :any_skip_relocation - sha256 "ba9353c38b3109630b543faf56f9f8431ec225db32e5f446495528879fcdc361" => :catalina - sha256 "e85cf1dfeb93797ef41680738cbde8fdf02aecb8040681742c2c89c82659c871" => :mojave - sha256 "341b85b60e1762c6ffca661940ce5e1958b1f2aab89f49da0865466ad1badc5a" => :high_sierra - end - - uses_from_macos "zlib" - - 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 8215b3b8ea47d..0000000000000 --- a/Formula/xpa.rb +++ /dev/null @@ -1,25 +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/2.1.20.tar.gz" - sha256 "854af367c0f4ffe7a65cb4da854a624e20af3c529f88187b50b22b68f024786a" - - bottle do - cellar :any_skip_relocation - sha256 "754e739f0bc2964210fa4b794ed69f46374cd77b9b0dde8e7afba7196f724ada" => :catalina - sha256 "660294618a8430fed54dad12001ee432ad057e7a9bd61615c356b3cd5359b1ac" => :mojave - sha256 "29a855b77adcb642355fd4ffc78787507e75fac460f1f53994f7ba8f2324c1ac" => :high_sierra - 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 3281d4d83519d..0000000000000 --- a/Formula/xpdf.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Xpdf < Formula - desc "PDF viewer" - homepage "https://www.xpdfreader.com/" - url "https://xpdfreader-dl.s3.amazonaws.com/xpdf-4.02.tar.gz" - sha256 "52d51dc943b9614b8da66e8662b3031a3c82dc25bfc792eac6b438aa36d549a4" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "ed4f85ea9e8246acb38d96b12013b66a8dfb21346a7de192fd7904c91c0a4898" => :catalina - sha256 "703b0341d6887119375ab0ba7c3d6accfbb25cfcc5e459009c6cb09977e2005d" => :mojave - sha256 "29808204a425d8896f855bb9f7e2e09a365a0fe577d6f522fed0a3e2f866695b" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "fontconfig" - depends_on "freetype" - depends_on "qt" - - conflicts_with "pdf2image", "pdftohtml", "poppler", - :because => "poppler, pdftohtml, pdf2image, and xpdf install conflicting executables" - - def install - 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 9e0c6feaf222c..0000000000000 --- a/Formula/xplanet.rb +++ /dev/null @@ -1,63 +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 4 - - bottle do - sha256 "c8e659713aaa70e8fc00d48e15cf997648759afa7b6ff8e0979212348fd6cc8f" => :catalina - sha256 "9912c643de81e812f69e639e1fe1ee3ee45900d85ce23409adb0a394305b970b" => :mojave - sha256 "aec227666c4e6216b061e979c5aabd1343c9c6433e8f85868f0f12eff3c01b62" => :high_sierra - 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/6b8519a9391b96477c38e1b1c865892f7bf093ca/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", - "--with-gif", - "--with-jpeg", - "--with-libtiff", - "--without-pango", - "--without-pnm", - "--without-x", - "--without-xscreensaver" - - 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 diff --git a/Formula/xqilla.rb b/Formula/xqilla.rb deleted file mode 100644 index 24bad9438bf8b..0000000000000 --- a/Formula/xqilla.rb +++ /dev/null @@ -1,53 +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 "3e01ca81220688c9680e3c23c0f7434f415e2b1e7b2e812f514a540eb51b50cd" => :catalina - 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`" - - 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 9aa9f54872e9b..0000000000000 --- a/Formula/xrick.rb +++ /dev/null @@ -1,29 +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 "8b155ebc162ed2990de96f1842fb3b880b4ae84fc187664d13696a3c7d1edfe8" => :catalina - 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 a6c42d102592e..0000000000000 --- a/Formula/xrootd.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Xrootd < Formula - desc "High performance, scalable, fault-tolerant access to data" - homepage "https://xrootd.slac.stanford.edu/" - url "https://xrootd.slac.stanford.edu/download/v4.12.3/xrootd-4.12.3.tar.gz" - sha256 "6f2ca1accc8d49d605706bb556777c753860bf46d845b1ee11393a5cb5987f15" - head "https://github.com/xrootd/xrootd.git" - - bottle do - cellar :any - sha256 "197ab8bf8564530157d3956408bc15a95ab3b7dc3616ee312292ce325cec655f" => :catalina - sha256 "fda59892c853f5dbd525c3495d4bbd3776a93e762681e56afb82263f77908d63" => :mojave - sha256 "d832213cdad3ef90e8c8bbf8f777b772ee00c0a10b2bb4005a2773d5383c808b" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "openssl@1.1" - depends_on "readline" - - uses_from_macos "libxml2" - uses_from_macos "zlib" - - on_linux do - depends_on "util-linux" - end - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DENABLE_PYTHON=OFF" - 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 9fed769af17cf..0000000000000 --- a/Formula/xsane.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Xsane < Formula - desc "Graphical scanning frontend" - homepage "https://wiki.ubuntuusers.de/XSane/" - 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 4 - - bottle do - sha256 "1b87500430dca49d717fa39d92214da59f08d4f7ec63ea477056bc5b2b920de4" => :catalina - sha256 "93064b6ec70657f6815a0aba5d52c8b7e54e9ef6f223c608351b790887c62b92" => :mojave - sha256 "4242d28d56f5ed634f7f8632d41e441e1cbeaf60a362628796a436ba2f8eac11" => :high_sierra - sha256 "f247067d49d44f8c0662cd64c99524f13c4b3a18ef7e49a19dd377bb449c859d" => :sierra - 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 2fb327e3fa701..0000000000000 --- a/Formula/xsd.rb +++ /dev/null @@ -1,79 +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 "8de0a3cfd410a3b2640a557e009b751f67c6f2416e38e42aa3a6634e73941847" => :catalina - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/xsd/4.0.0.patch" - sha256 "55a15b7a16404e659060cc2487f198a76d96da7ec74e2c0fac9e38f24b151fa7" - end - - 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 diff --git a/Formula/xshogi.rb b/Formula/xshogi.rb deleted file mode 100644 index 16101e1b0e75e..0000000000000 --- a/Formula/xshogi.rb +++ /dev/null @@ -1,27 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "09ccace2697472b65f34ca8ae2e770dd2cab177936541fbb7229ccbbcb5dfd04" => :catalina - 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 c6efa34c6f983..0000000000000 --- a/Formula/xsimd.rb +++ /dev/null @@ -1,53 +0,0 @@ -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/7.4.8.tar.gz" - sha256 "318676faae48d2082440df9f161a95303a3f29c3f0b03ff32ca24063b12f5699" - license "BSD-3-Clause" - - bottle do - cellar :any_skip_relocation - sha256 "a8c6a9f46585989372faf4b18029b2f69a1660e743ba8ee126a51686656dfc56" => :catalina - sha256 "a8c6a9f46585989372faf4b18029b2f69a1660e743ba8ee126a51686656dfc56" => :mojave - sha256 "a8c6a9f46585989372faf4b18029b2f69a1660e743ba8ee126a51686656dfc56" => :high_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 4bcbc7493fe6e..0000000000000 --- a/Formula/xspin.rb +++ /dev/null @@ -1,49 +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 "2128720e4a7cda7778a5f6e0f16ecadb1b37eb125d37db2958ba1c84d97c379c" => :catalina - 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 3dbb630f6bbd6..0000000000000 --- a/Formula/xsv.rb +++ /dev/null @@ -1,26 +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 - cellar :any_skip_relocation - rebuild 2 - sha256 "b077e2fd6f968d6a3fa5c22a145e134bcead5cbe50ff20c78495937cbee7ea1d" => :catalina - sha256 "ade2c436c1acf011ef7807b01a2783f6c31c0cacf066e51db904adefd99d4a14" => :mojave - sha256 "557ef267b773911347df0d1960040f2d28e20c3680637b8af5bd89edc77bcce2" => :high_sierra - 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}/xsv", "stats", "test.csv" - end -end diff --git a/Formula/xsw.rb b/Formula/xsw.rb deleted file mode 100644 index ad5d01295cf67..0000000000000 --- a/Formula/xsw.rb +++ /dev/null @@ -1,31 +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" - license "GPL-3.0" - - bottle do - sha256 "76084ad086c4635e308c84ed975d5249e8338207614b1b48f27c014611d913e6" => :catalina - 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 5d8cb14b13086..0000000000000 --- a/Formula/xtail.rb +++ /dev/null @@ -1,50 +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 "f9c18a9b545ed91e00d0f4d18200dc339cfe3f8c751a444480190f978c356e59" => :catalina - 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 6d4aafb5e7859..0000000000000 --- a/Formula/xtensor.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Xtensor < Formula - desc "Multi-dimensional arrays with broadcasting and lazy computing" - homepage "https://xtensor.readthedocs.io/en/latest/" - url "https://github.com/QuantStack/xtensor/archive/0.21.5.tar.gz" - sha256 "30cb896b6686683ddaefb12c98bf1109fdfe666136dd027aba1a1e9aa825c241" - - bottle do - cellar :any_skip_relocation - sha256 "885a150c2923a6b90f592284e406b39b2b7fc736ea3ba83ac1d2486f48ef440e" => :catalina - sha256 "885a150c2923a6b90f592284e406b39b2b7fc736ea3ba83ac1d2486f48ef440e" => :mojave - sha256 "885a150c2923a6b90f592284e406b39b2b7fc736ea3ba83ac1d2486f48ef440e" => :high_sierra - end - - depends_on "cmake" => :build - - resource "xtl" do - url "https://github.com/xtensor-stack/xtl/archive/0.6.13.tar.gz" - sha256 "12bd628dee4a7a55db79bff5a47fb7d96b1a4dba780fbd5c81c3a15becfdd99c" - end - - 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 8d8b45b9957f2..0000000000000 --- a/Formula/xu4.rb +++ /dev/null @@ -1,64 +0,0 @@ -class Xu4 < Formula - desc "Remake of Ultima IV" - homepage "https://xu4.sourceforge.io/" - url "https://svn.code.sf.net/p/xu4/code/trunk/u4", :revision => "3088" - version "1.0beta4+r3088" - license "GPL-2.0" - head "https://svn.code.sf.net/p/xu4/code/trunk/u4" - - bottle do - cellar :any - sha256 "e47edcace3c7b496b59d85f904b102a4fbc031c50671a02cc749149d194d11f6" => :catalina - 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 d0a929620cf92..0000000000000 --- a/Formula/xvid.rb +++ /dev/null @@ -1,36 +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.7.tar.bz2" - sha256 "aeeaae952d4db395249839a3bd03841d6844843f5a4f84c271ff88f7aa1acff7" - license "GPL-2.0" - - bottle do - cellar :any - sha256 "ace5fea6272f3594b5c8fca6f1fe03c41c50a14af8599751571c5e44a49a5a53" => :catalina - sha256 "4e119534a1351c85799944eb35f6f5675192e67e077fb3452f73f210a57eabe3" => :mojave - sha256 "79ea46af3061561427ab0af36b09d61e057084c76f655ec21074fba375a36b01" => :high_sierra - 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/xxh.rb b/Formula/xxh.rb deleted file mode 100644 index b0d4c0df5bcdb..0000000000000 --- a/Formula/xxh.rb +++ /dev/null @@ -1,75 +0,0 @@ -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/c6/fb/76429ae5970e334996276075338533043bfbef6f96d7e9340ef433662834/xxh-xxh-0.8.3.tar.gz" - sha256 "2ba8bbb5d75c77095580b3f2f5570b1700834a42f50e1caaf50a97de925d51bf" - - bottle do - cellar :any_skip_relocation - sha256 "34a321ac28c031fdb427f866d04a3e5d8aa074e2050afb330edc1718147fa3d9" => :catalina - sha256 "525eb4703597ec79fcc04f52058b0df50151ce375a72186e8b062fefc955e20f" => :mojave - sha256 "029ad00049f267959b390fda46ce1889a0fc7c3d3fdea68844ce477e2cb86e91" => :high_sierra - end - - depends_on "python@3.8" - - resource "pexpect" do - url "https://files.pythonhosted.org/packages/e5/9b/ff402e0e930e70467a7178abb7c128709a30dfb22d8777c043e501bc1b10/pexpect-4.8.0.tar.gz" - sha256 "fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" - end - - resource "ptyprocess" do - url "https://files.pythonhosted.org/packages/7d/2d/e4b8733cf79b7309d84c9081a4ab558c89d8c89da5961bf4ddb050ca1ce0/ptyprocess-0.6.0.tar.gz" - sha256 "923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0" - end - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - def install - virtualenv_install_with_resources - end - - test do - assert_match version.to_s, shell_output("#{bin}/xxh --version") - - (testpath/"config.xxhc").write <<~EOS - hosts: - test.localhost: - -o: HostName=127.0.0.1 - +s: xxh-shell-zsh - EOS - 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_include args, "xxh-shell-zsh" - - ssh_argv = stderr.lines.grep(/^ssh arguments:/).first.split(":").second - ssh_args = JSON.parse ssh_argv.tr("'", "\"") - assert_include ssh_args, "Port=#{port}" - assert_include ssh_args, "HostName=127.0.0.1" - assert_match "Connection closed by remote host", stderr - ensure - Process.kill("TERM", server_pid) - end - end -end diff --git a/Formula/xxhash.rb b/Formula/xxhash.rb deleted file mode 100644 index a52a7485b7222..0000000000000 --- a/Formula/xxhash.rb +++ /dev/null @@ -1,23 +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.7.4.tar.gz" - sha256 "4d9706c9da4fbdf901598f5e3b71db0eddd4ac962e827a73ebf75d66dfd820fe" - - bottle do - cellar :any - sha256 "4d4eddfac07b6120a21d489617ef7c365c116c94e29c51479d6ac4795b678063" => :catalina - sha256 "be9807ccd03b690c5dde0ed30fe5bfdc52dfebff05f9997b4a603a0c5173b3c9" => :mojave - sha256 "2a373f13868345da95bfa35078e0dc52942bf01bdb6b9d0a1cf84bb8ae001f77" => :high_sierra - 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 fc7987572c238..0000000000000 --- a/Formula/xz.rb +++ /dev/null @@ -1,39 +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.5.tar.gz" - mirror "https://tukaani.org/xz/xz-5.2.5.tar.gz" - sha256 "f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10" - - bottle do - cellar :any - sha256 "2dcc8e0121c934d1e34ffdb37fcd70f0f7b5c2f4755f2f7cbcf360e9e54cb43b" => :catalina - sha256 "44483961b5d2b535b0ece1936c9d40b4bc7d9c7281646cca0fb476291ab9d4dc" => :mojave - sha256 "1491b2b20c40c3cb0b990f520768d7e876e4ab4a7dc1da9994d0150da34ba5c6" => :high_sierra - 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..9bdc4ef4befcf --- /dev/null +++ b/Formula/y/yacas.rb @@ -0,0 +1,42 @@ +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" + + bottle do + rebuild 1 + 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..8ede9b8216683 --- /dev/null +++ b/Formula/y/yaegi.rb @@ -0,0 +1,28 @@ +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_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, 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..c74fd66482a5a --- /dev/null +++ b/Formula/y/yaf.rb @@ -0,0 +1,53 @@ +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.16.2.tar.gz" + sha256 "4155794364a1a705841718919a7ef64514a8cb3b13d44211d36dff7ba8c35546" + 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_sequoia: "4beb4eaf87c7a5b45b77c97efe277f2059d5b74cfefeefed34b80a9ca7188e58" + sha256 cellar: :any, arm64_sonoma: "8faecf15789d73010ca49458a33cd257f940d36a23d4d4f21486bbe7a034ba96" + sha256 cellar: :any, arm64_ventura: "a751d045582697fff1c862a3cfd3769d2b3a8bfe649dce507235666a5b9ecfce" + sha256 cellar: :any, sonoma: "d9467f85042105d34e511bab134a4891e601bbb05f9d87875078a790019b1bb1" + sha256 cellar: :any, ventura: "301f74f55f414a56226694796136df4ad3c2d20148bdd6ac5fdaa0e705820ce1" + sha256 cellar: :any_skip_relocation, arm64_linux: "6c76480d475c395589adc5a943682fd9b6a0c9ce05aac31c13c255c4e4df8e36" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5b1513aec6289640e5edcd930116b75aaf2906910cbdc5e3467ab47de0babfd6" + 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.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/y/yafc.rb b/Formula/y/yafc.rb new file mode 100644 index 0000000000000..a3584a48abd35 --- /dev/null +++ b/Formula/y/yafc.rb @@ -0,0 +1,50 @@ +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 + + bottle do + 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..bd4bbc5040dc6 --- /dev/null +++ b/Formula/y/yajl.rb @@ -0,0 +1,43 @@ +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" + + bottle do + rebuild 4 + 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, mojave: "ab562be70a8ff64861d52b170585f52af91a275e6b5974241eaabd0997b990f2" + sha256 cellar: :any, high_sierra: "3213f11462b3c60a33209c4f5d36c96caf1a9409103012ffb427dd51770ac120" + sha256 cellar: :any, sierra: "1f97e0bbc6680ad4735f0c7ecac20ec87531456c3ab1c93c480c5c5a93a33e1c" + sha256 cellar: :any, el_capitan: "5cfd83bfdbd7c92402f1cecc6b66788e6db0c195880a40263365d8130e47db2f" + sha256 cellar: :any_skip_relocation, arm64_linux: "8b1df8e59b01fee163b184e36bf7f607c8ff83be33f94361f9bdf67ce5b8e636" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c206281370fe7277f21d17ff50fe9511233aff74501238516918027006c9cbf3" + end + + depends_on "cmake" => :build + + 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..9c47ad82f3461 --- /dev/null +++ b/Formula/y/yalantinglibs.rb @@ -0,0 +1,53 @@ +class Yalantinglibs < Formula + desc "Collection of modern C++ libraries" + homepage "https://alibaba.github.io/yalantinglibs/en/" + url "https://github.com/alibaba/yalantinglibs/archive/refs/tags/lts1.1.1.tar.gz" + sha256 "0aca363801b004f4f679daea0122f76ace147299770d91f44c3a49d753664afa" + license "Apache-2.0" + head "https://github.com/alibaba/yalantinglibs.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, all: "6be6e3d108faa90a6b5812b445fd0488c63d3d3f2ab83e18e258d7cfb3f9382b" + 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..3998be02fe423 --- /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 + sha256 cellar: :any, arm64_sequoia: "e48267ff74adef8ba5d4d66834e837278195007081f1ba45e3b9142d17edcc1b" + sha256 cellar: :any, arm64_sonoma: "84c923dcb48dca1e6eed547ce3768edc50d1cf4a357cbbe777b76e0cf9d1df50" + sha256 cellar: :any, arm64_ventura: "7a25c95c119ca7c208907a8a8f96555ceacaeb99ca3e33742127a1024293461d" + sha256 cellar: :any, sonoma: "da45cebb15964ac288acd319dc2bf59553a4248ee2e0ec33959267b3fe684ac4" + sha256 cellar: :any, ventura: "5d79479b30e4a0b9060051b53726d56cc6b96cd7a5e107584b5ca4459d6ad259" + sha256 cellar: :any_skip_relocation, arm64_linux: "206664ef4991756e905b44123fac164c8f8d05baaf348d90064b22240acd3eff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eef4d6178db727a8de6d7749a1e03f2fafe21384e58b20f7e29d2bd1f35450ca" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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..01c2abea04b1e --- /dev/null +++ b/Formula/y/yamcha.rb @@ -0,0 +1,123 @@ +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 + + bottle do + rebuild 1 + 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, mojave: "37ce1ca98c2de4978de9d8877752570680fffae4c41026c5e560c83b5f4b3473" + sha256 cellar: :any, high_sierra: "003ba175b22691b3ced58178504a83bda7455cfd599685c0e002ccbf91efb88d" + sha256 cellar: :any, sierra: "b9f2e9521d25dafc70617857f32b1742b8bb29046b3ea930eafb3261a0727e36" + sha256 cellar: :any, el_capitan: "b65fade9c6ddcced1d3c3fc6700f18ed2ddd16b62437fc71f9a85a3568851520" + 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..17c24b9533b42 --- /dev/null +++ b/Formula/y/yamdi.rb @@ -0,0 +1,35 @@ +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_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, mojave: "228b23059d21ed0a540d3b19c87f3319bb8f99ff57465b8b313d2063660a8567" + sha256 cellar: :any_skip_relocation, high_sierra: "1c524b6c2d791792b27d15941ecd179b487fbdcd299640f06cbf17bd5f8cf434" + sha256 cellar: :any_skip_relocation, sierra: "546a4c5400ef75431ecd3a39dbabda5e5599d82ac3f65f6dafc5d3745a90d8e2" + sha256 cellar: :any_skip_relocation, el_capitan: "cfaf451a985b0a8cba24a0131c8e0e9a6102eb4b6c315e045ce258999cb19494" + 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..eef8fe41f1ea1 --- /dev/null +++ b/Formula/y/yaml-cpp.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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 + 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..84ccda594f8cd --- /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.18.0.tgz" + sha256 "079322c49fa5429f6c7c9edf893236dba70f6a11aaad841623f31c50fd0deaa4" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, all: "bafbbb95e8456cfb2c17f213f7a4589c70b869feb3b26c5b3a0840f45e6b189e" + 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/yamlfix.rb b/Formula/y/yamlfix.rb new file mode 100644 index 0000000000000..2074dd0631e29 --- /dev/null +++ b/Formula/y/yamlfix.rb @@ -0,0 +1,99 @@ +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/a9/04/e5061d4c353fad1240356458c999ddd452315a2485c3e8b00159767b3567/yamlfix-1.17.0.tar.gz" + sha256 "81d7220b62798d1dda580e1574b3d3d6926701ae8cd79588c4e0b33f2e345d85" + license "GPL-3.0-or-later" + + bottle do + sha256 cellar: :any, arm64_sequoia: "badcb1e0519bceb4de7cd7db81a69c4947230941656959a170cd0a98668a66b1" + sha256 cellar: :any, arm64_sonoma: "a9cf9fbed2979245068bd2e15cac71ffc87623f77bd35fac4a9ba68836c1fdb2" + sha256 cellar: :any, arm64_ventura: "d1e35c718ba628e672c8ae7b4d6970f4d6baa180425764b839c1e98be5d28166" + sha256 cellar: :any, sonoma: "a4fdb343c7e93340801caf53a1b4c7ef98f657d149d93985d7f480dade902c82" + sha256 cellar: :any, ventura: "54c2f7af91fa5db4af9520a588bfe788ff2aa5235adbd48e7940c07e89297091" + sha256 cellar: :any_skip_relocation, arm64_linux: "37cd912b1a80fb673bc4bbb83a370e840e392bcad4c29fec5dba54bec555f575" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e2329c6594e7413ce24f09fd3ad8d601204d5c985667ce8a6aa12f86566cfe2" + end + + depends_on "rust" => :build # for pydantic_core + depends_on "python@3.13" + + 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/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "distro" do + url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" + sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + end + + resource "maison" do + url "https://files.pythonhosted.org/packages/2e/c5/c0574d47920f30eb84938bbe5220b249bde9b648b4517e1726e50a4b0967/maison-2.0.0.tar.gz" + sha256 "f5dafbbf4ce57bdb7cae128e075f457434b2cc9573b4f4bb4535f16d2ebd1cc5" + end + + resource "pydantic" do + url "https://files.pythonhosted.org/packages/b7/ae/d5220c5c52b158b1de7ca89fc5edb72f304a70a4c540c84c8844bf4008de/pydantic-2.10.6.tar.gz" + sha256 "ca5daa827cce33de7a42be142548b0096bf05a7e7b365aebfa5f8eeec7128236" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/fc/01/f3e5ac5e7c25833db5eb555f7b7ab24cd6f8c322d3a3ad2d67a952dc0abc/pydantic_core-2.27.2.tar.gz" + sha256 "eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39" + 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/92/ec/089608b791d210aec4e7f97488e67ab0d33add3efccb83a056cbafe3a2a6/setuptools-75.8.0.tar.gz" + sha256 "c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6" + 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/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz" + sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + 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..8bdcfad862fee --- /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.16.0.tar.gz" + sha256 "989d9010e2498b4f97608b1c64798c700012840e739bc9001e42ddf3f25125a2" + license "Apache-2.0" + head "https://github.com/google/yamlfmt.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "432bc292d0feb0e9597bd786e628e01b0557a847d303cf1e5006c5b70111041f" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "432bc292d0feb0e9597bd786e628e01b0557a847d303cf1e5006c5b70111041f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "432bc292d0feb0e9597bd786e628e01b0557a847d303cf1e5006c5b70111041f" + sha256 cellar: :any_skip_relocation, sonoma: "899210545175b84e91bee5ae9337912ce1d6d755d462f9ec2620a2f8a722d0ff" + sha256 cellar: :any_skip_relocation, ventura: "899210545175b84e91bee5ae9337912ce1d6d755d462f9ec2620a2f8a722d0ff" + sha256 cellar: :any_skip_relocation, x86_64_linux: "818289e664422a8c73aea66665a680d7bfbd4e18d5b34b06e081a68cfb3478ad" + 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..cce0b0ee21962 --- /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 + sha256 cellar: :any, arm64_sequoia: "4241606602e0cab66eeec59f791c2a65fc6f46d9d83b903418c16892facba5be" + sha256 cellar: :any, arm64_sonoma: "f98d6db2e13c8ba481acd4d15df4bb6a2a861a7af3e3bb64facfa45863d5424c" + sha256 cellar: :any, arm64_ventura: "306d5cdfa177ef0e748beacbafb5aa19883978f18ef6fdf937a7f21aed35c8fc" + sha256 cellar: :any, sonoma: "f140abc3afa4e130c96fb66db179374b0c196ce62159e97aaf8321450f8a69cf" + sha256 cellar: :any, ventura: "0abcd51823ae770c1f1e02ae64c36eaa593d5b3b9a4b634c112e731161821b55" + sha256 cellar: :any_skip_relocation, arm64_linux: "bbb3caa7cb9e282692efaede364d93f2c725402252dd7f87c28baca3f7848c9a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce938787e6e7d11348544aad521f22cc82b22f332b6842e92003dd75d662e7c8" + end + + depends_on "libyaml" + depends_on "python@3.13" + + 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/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" + sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" + 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/yank.rb b/Formula/y/yank.rb new file mode 100644 index 0000000000000..d03807e4ae7ea --- /dev/null +++ b/Formula/y/yank.rb @@ -0,0 +1,39 @@ +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" + + bottle do + rebuild 1 + 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..1450bfe921359 --- /dev/null +++ b/Formula/y/yapf.rb @@ -0,0 +1,35 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cf15857b390cc7e51ca27c742c839b71035382d701e298354fcf521318da61b8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cf15857b390cc7e51ca27c742c839b71035382d701e298354fcf521318da61b8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cf15857b390cc7e51ca27c742c839b71035382d701e298354fcf521318da61b8" + sha256 cellar: :any_skip_relocation, sonoma: "6b02bec0b509d12c45e027c20377d2cc927156f932a156cb08e75cf3d0a16b0c" + sha256 cellar: :any_skip_relocation, ventura: "6b02bec0b509d12c45e027c20377d2cc927156f932a156cb08e75cf3d0a16b0c" + sha256 cellar: :any_skip_relocation, arm64_linux: "24a8928518e665fbbdc956986ec490c577990c536de1c0b233590557e0f0cb32" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e4bdbca92626b2c3c57566193c8fd2f66ff8ecc670d8ee8e9e495be42f33cf37" + end + + depends_on "python@3.13" + + resource "platformdirs" do + url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz" + sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907" + 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..91bd5616cd305 --- /dev/null +++ b/Formula/y/yara-x.rb @@ -0,0 +1,59 @@ +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/v0.14.0.tar.gz" + sha256 "1ae81cc3fb37966ea23d4a4088413cd19f209309bac38bf420a35ff1d5b3e46f" + 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_sequoia: "8e7ad1594f37f4454ddee1c8c277669cb3082b41c92c13fca7e31eef921374b3" + sha256 cellar: :any, arm64_sonoma: "4deefc5b457fcca063c2ec83992c6aebe29b7c5fb810445bc75fb4553aa26e48" + sha256 cellar: :any, arm64_ventura: "f42df28691473707a1376c86032baad7cc91b1537bbcead88db8ff60a16df87e" + sha256 cellar: :any, sonoma: "d0a88ae883781eccc3a684cdec06acc5ca7e77a6ea9eaa94ee0b9dafd826961f" + sha256 cellar: :any, ventura: "a796498e4ae57c4952b351904cdf23adc78efa0b41c06a5db5a5f7c04686222c" + sha256 cellar: :any_skip_relocation, arm64_linux: "c618b89515aac3a1417cd4f116cc6aa65bd5d966f7af94274b9bcfc28fb2181b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "985ce44a823642a30d8132ac67de6cec26beed4fc0d55e68f2894fe5e0d757bf" + 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..dbbeea9f89c87 --- /dev/null +++ b/Formula/y/yara.rb @@ -0,0 +1,70 @@ +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.2.tar.gz" + sha256 "1f87056fcb10ee361936ee7b0548444f7974612ebb0e681734d8de7df055d1ec" + 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_sequoia: "84235b67b3d1942ad369c7acb7d4277c495183b6b4d29dfca8d62382c3f33ebf" + sha256 cellar: :any, arm64_sonoma: "248c919c9b5c1cee57bfdf1880189b219b8973e235dca7b72241fcf53b3d2214" + sha256 cellar: :any, arm64_ventura: "8f98d50afba513f435ccfc80c01cfa1d79221a3fb8a5baf1fff506b5fc1f309a" + sha256 cellar: :any, arm64_monterey: "807edb5a4f3cfe879ea08fa9a8bfc2a8a9b3b702ad9ff38e05862aa7b66e5efc" + sha256 cellar: :any, sonoma: "08745850a5902430099341798ccf146d61db89764d85d32d559b9bfd608f5868" + sha256 cellar: :any, ventura: "36b82987bed553aeff295abd55ee25469db18714cff30d504e49fe15d01c4294" + sha256 cellar: :any, monterey: "b8a993c8e96054b76a06e3c0f0248ea9b628ae2588f22c70d75a2c0a824036c8" + sha256 cellar: :any_skip_relocation, arm64_linux: "05a66f4358b789e051898934b3986fe9915c39490860db7849133d52b0875d7a" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37f94439dd9022c68397c7b3dee8de603e58a052fc5170d9674bcf57e9a74dd7" + 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..881dd424b0e11 --- /dev/null +++ b/Formula/y/yarn-completion.rb @@ -0,0 +1,23 @@ +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" + + 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..45680f024341b --- /dev/null +++ b/Formula/y/yash.rb @@ -0,0 +1,41 @@ +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.59/yash-2.59.tar.xz" + sha256 "299a50ea70f23dcbb94cf278f3e99e788b20b613185a0426ed5fdd189b1711ee" + license "GPL-2.0-or-later" + + bottle do + sha256 arm64_sequoia: "41f426ba54fdffc5d4268b54bb785b4244af0448459a8c56c429552ff5a0c13c" + sha256 arm64_sonoma: "a07798ce2eb7e193860da5aa67f45d00520b102e122e1fcdb5659d013f40b711" + sha256 arm64_ventura: "341778e242efa6a5966d00e13a4eb09ddbe9a462557d8caf747f4c9fcc786383" + sha256 sonoma: "c40888effd879a9b14b1c7348bfebbf980a7899bc143360cfd55654fe9151bea" + sha256 ventura: "74c532d36d767b362e6852adaa511a97d535fd61f730e246869248401d73fe3c" + sha256 arm64_linux: "767918f66d255a55c2fe13abab8f8ca75924df9c989f5aa2487923be4ed3901a" + sha256 x86_64_linux: "c792d79a9395f94d8155878614249008f72798f58496bfff55522dcdcb85c038" + 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..8e73451b6aea4 --- /dev/null +++ b/Formula/y/yasm.rb @@ -0,0 +1,118 @@ +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://yasm.tortall.net/Download.html" + regex(/href=.*?yasm[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + rebuild 1 + 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, mojave: "0dc797b72ee3bad9c6a52276c871ac745207b5626722e805fa642d7a872847fc" + sha256 cellar: :any_skip_relocation, high_sierra: "7f31deeff91c5929f2cd52eca6b636669f9c8966f6d4777e89fa4b04e541ad85" + 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..e7d1ea8b3e277 --- /dev/null +++ b/Formula/y/yatas.rb @@ -0,0 +1,31 @@ +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" + + bottle do + 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, 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..1ef8307dc301f --- /dev/null +++ b/Formula/y/yaws.rb @@ -0,0 +1,108 @@ +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_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..59214e9c60066 --- /dev/null +++ b/Formula/y/yaz.rb @@ -0,0 +1,109 @@ +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.0.tar.gz" + sha256 "df8203c8afe852ee79a54f9e05afd111ba81ca85c1608181decdaf29a5ec536c" + 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_sequoia: "0e71589d066e4b3f99d9f88417a0f203cc05e5414ef5e3b6878e9cf89bc060d3" + sha256 cellar: :any, arm64_sonoma: "cc90db743cddb628a268e4133877d913ddf1ecdc0146bfb3c3f54f2f639456b1" + sha256 cellar: :any, arm64_ventura: "2bc3561b2d75041e55cb6d26048c43e2cc1738e19936e8fc7ae402c79114e8be" + sha256 cellar: :any, sonoma: "8b9fcaa90447736fbb6c4e45920eb515649b4129c4ac7cd31d6fee77a76bf94a" + sha256 cellar: :any, ventura: "c4917e7f098d5842a153c5bfb602084797eff57ea289722e802801cd6ed0a661" + sha256 cellar: :any_skip_relocation, arm64_linux: "1a456f36b6e32bf7d53eef00e8910fe9387b7ea727771c03706d674c5da6f4c8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "94fc92f14b999d7375cfe90e508c8d22704ef71f351f4c8b87a5cd398c9c7e51" + 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..df4134d08b15d --- /dev/null +++ b/Formula/y/yaze-ag.rb @@ -0,0 +1,48 @@ +class YazeAg < Formula + desc "Yet Another Z80 Emulator (by AG)" + homepage "https://www.mathematik.uni-ulm.de/users/ag/yaze-ag/" + url "https://www.mathematik.uni-ulm.de/users/ag/yaze-ag/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 + + bottle do + 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..45c90c68bdc65 --- /dev/null +++ b/Formula/y/yazi.rb @@ -0,0 +1,48 @@ +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.4.8.tar.gz" + sha256 "b001df58df5276587eecb89ed90e8ea7a2bf738819ccb1afc722355fa2c56eae" + 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_sequoia: "56def0a10a0e7f1b4c1941e11ed57a6549097236d7170f89b95af6c5a30f083b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ec4efda861b2dfd449f4fdc08c38c017fa5a2280f45139717099c4d6a73fe949" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2dca6fa933ce7c0fbc215f5c17d93956cf73a2f94241ae242b2ee1cf7ea876c2" + sha256 cellar: :any_skip_relocation, sonoma: "ba844ddfeb33fd687d1267bdae049c487fd819c5fb686fa86c6fdfe60e5c2840" + sha256 cellar: :any_skip_relocation, ventura: "7df441bfdc05d77e593f517aa855b979976904419f8a84120ba92d82eaaa0fb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "37803c653d1935f19ae80e29a15af58dcdbc584db6487d03b93c3621c373c6f6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "95a56eb8bb6c0e831dfca11df0f1da26f8d8fc4f4337f5c70cb36c46082c3654" + 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..9879361bc263c --- /dev/null +++ b/Formula/y/yazpp.rb @@ -0,0 +1,59 @@ +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 + + bottle do + 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..87df1537dac7f --- /dev/null +++ b/Formula/y/yconalyzer.rb @@ -0,0 +1,45 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "d5b2345a94b2590f9f533f30d3770cc2008ce294fd8c56015f025181ba951b35" + sha256 cellar: :any_skip_relocation, high_sierra: "4341ba620cc2724608dea783a2ddbd3bde93fd2017cc675e906f233941fb4ab3" + sha256 cellar: :any_skip_relocation, sierra: "3bf190ad069a4ee9423e79415907a684320e8e776916329f46d7620274a03434" + sha256 cellar: :any_skip_relocation, el_capitan: "918ca6d2bca328923ec3ff6e5612e9a0336aad666e993cfb0d1bc42a99758f1c" + 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/formula-patches/85fa66a9/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/ydcv.rb b/Formula/y/ydcv.rb new file mode 100644 index 0000000000000..1abbd43cf11de --- /dev/null +++ b/Formula/y/ydcv.rb @@ -0,0 +1,46 @@ +class Ydcv < Formula + include Language::Python::Virtualenv + + desc "YouDao Console Version" + homepage "https://github.com/felixonmars/ydcv" + url "https://files.pythonhosted.org/packages/1f/29/17124ebfdea8d810774977474a8652018c04c4a6db1ca413189f7e5b9d52/ydcv-0.7.tar.gz" + sha256 "53cd59501557496512470e7db5fb14e42ddcb411fe4fa45c00864d919393c1da" + license "GPL-3.0-only" + revision 4 + head "https://github.com/felixonmars/ydcv.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "061ae513e42baa453cad8f642aba997e3adeb2a56fcc15f9b0450f45e426b006" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cb6154d76b16bd58ccd709104fedad005bb7987624b81947dcb56e89e85f7c73" + sha256 cellar: :any_skip_relocation, arm64_monterey: "cb6154d76b16bd58ccd709104fedad005bb7987624b81947dcb56e89e85f7c73" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "cb6154d76b16bd58ccd709104fedad005bb7987624b81947dcb56e89e85f7c73" + sha256 cellar: :any_skip_relocation, sonoma: "669abec76b3900e94cac2fcd075a1c9f8f596a1837ca4ffc4065562f7941dfe6" + sha256 cellar: :any_skip_relocation, ventura: "1395cd029c7edc09b2d1d12707585e41f433dd14b54bdc92dcd53376cca76570" + sha256 cellar: :any_skip_relocation, monterey: "1395cd029c7edc09b2d1d12707585e41f433dd14b54bdc92dcd53376cca76570" + sha256 cellar: :any_skip_relocation, big_sur: "1395cd029c7edc09b2d1d12707585e41f433dd14b54bdc92dcd53376cca76570" + sha256 cellar: :any_skip_relocation, catalina: "1395cd029c7edc09b2d1d12707585e41f433dd14b54bdc92dcd53376cca76570" + sha256 cellar: :any_skip_relocation, x86_64_linux: "52f466e847bf7841d0108b5bdb3e034ea2412d9d8d354088d270c088e784482e" + end + + disable! date: "2024-07-05", because: :repo_archived + + depends_on "python@3.11" + + def install + ENV["SETUPTOOLS_SCM_PRETEND_VERSION"] = version + + zsh_completion.install "contrib/zsh_completion" => "_ydcv" + virtualenv_install_with_resources + end + + def caveats + <<~EOS + You need to add a config for API Key, read more at https://github.com/felixonmars/ydcv + EOS + end + + test do + system bin/"ydcv", "--help" + end +end diff --git a/Formula/y/yder.rb b/Formula/y/yder.rb new file mode 100644 index 0000000000000..4e213e05e5d6e --- /dev/null +++ b/Formula/y/yder.rb @@ -0,0 +1,59 @@ +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" + + bottle do + 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 "orcania" + + on_linux do + depends_on "pkgconf" => :build + 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..db591a3912717 --- /dev/null +++ b/Formula/y/ydiff.rb @@ -0,0 +1,25 @@ +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 + sha256 cellar: :any_skip_relocation, all: "967d56d8d5bcd64220c4c88665f5a58509e8c606ac95f761edaad3895eeda09f" + end + + depends_on "python@3.13" + + 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..f67b1c7b1704f --- /dev/null +++ b/Formula/y/yeet.rb @@ -0,0 +1,34 @@ +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.2.3.tar.gz" + sha256 "007121e2b511193f861284d3a156756639c8d9a80d7404ac97058f8054bb67c2" + license "MIT" + head "https://github.com/TecharoHQ/yeet.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c5c7b51cb1a6a0ecc7ceac5383389d43cc5efe3c3a0073c3595caebd521ec3b7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c5c7b51cb1a6a0ecc7ceac5383389d43cc5efe3c3a0073c3595caebd521ec3b7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c5c7b51cb1a6a0ecc7ceac5383389d43cc5efe3c3a0073c3595caebd521ec3b7" + sha256 cellar: :any_skip_relocation, sonoma: "9a998adc097bc329fd3bd943c45d4db704fa76e711bb6c756800949cf01d2d3b" + sha256 cellar: :any_skip_relocation, ventura: "9a998adc097bc329fd3bd943c45d4db704fa76e711bb6c756800949cf01d2d3b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ede85ca1fb1d6f56e81fe34062aa9ba732fb2b57dd4b8092bf4a10b13774729b" + 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/yelp-tools.rb b/Formula/y/yelp-tools.rb new file mode 100644 index 0000000000000..4c1804aa57d24 --- /dev/null +++ b/Formula/y/yelp-tools.rb @@ -0,0 +1,77 @@ +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" + + bottle do + rebuild 5 + sha256 cellar: :any, arm64_sequoia: "b7fdc8113c53b2269004863275eb727529213a7306fe048195c6d772d068f9a7" + sha256 cellar: :any, arm64_sonoma: "fecff16b031b801b36674d3ce40d9076a53d50a588874b6c1c003d2a53dd8c65" + sha256 cellar: :any, arm64_ventura: "552d5b45480d56d8c411142fdd7f7a425e63d84869d1f5bf67f1cc16fbea0ce7" + sha256 cellar: :any, sonoma: "eb9926b85d1ba6364f317753ef6bbff66e60935d6acebbe0dbf760a2773357ab" + sha256 cellar: :any, ventura: "9d91490539a030c77b1110b8c0a66a5a82ba7f904c958a3eff9b436e56f5f10c" + sha256 cellar: :any_skip_relocation, arm64_linux: "4aa4c8857c9df493063cd25472fa61289d177b1834471590f041b4cd93837cc9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f59435fcac44fa0fb975fe0f65fbc6a2d93649c97b004fff1decd049dbc43517" + 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.13" + + uses_from_macos "libxslt" + + resource "lxml" do + url "https://files.pythonhosted.org/packages/ef/f6/c15ca8e5646e937c148e147244817672cf920b56ac0bf2cc1512ae674be8/lxml-5.3.1.tar.gz" + sha256 "106b7b5d2977b339f1e97efe2778e2ab20e99994cbb0ec5e55771ed0795920c8" + 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.13") + 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..289ef325ccae9 --- /dev/null +++ b/Formula/y/yetris.rb @@ -0,0 +1,36 @@ +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" + + bottle do + 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, mojave: "ace31e89cefd33d38a65864d7343baad6dbda23aee0ba2a10f6b19480b9708e0" + sha256 cellar: :any_skip_relocation, high_sierra: "21537f5957c5ce90281195e6d962363920bda756a6c965ca107c329ec712f126" + sha256 cellar: :any_skip_relocation, sierra: "cf350d8daaf62f863b7466477aebea02145abf1f14e50ee56ad324c99dcee018" + sha256 cellar: :any_skip_relocation, el_capitan: "fd08bc62fc0c4687ed7e76fe604c345a647fb52a348c55cf446fcbf52c7af8dd" + 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..675cd0dac5080 --- /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 1 + head "https://github.com/mps-youtube/yewtube.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ecec9eb9f3b3ff69d2c7d51999298e0989402fe43feece16a25f05904ac4989d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ecec9eb9f3b3ff69d2c7d51999298e0989402fe43feece16a25f05904ac4989d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ecec9eb9f3b3ff69d2c7d51999298e0989402fe43feece16a25f05904ac4989d" + sha256 cellar: :any_skip_relocation, sonoma: "ecec9eb9f3b3ff69d2c7d51999298e0989402fe43feece16a25f05904ac4989d" + sha256 cellar: :any_skip_relocation, ventura: "ecec9eb9f3b3ff69d2c7d51999298e0989402fe43feece16a25f05904ac4989d" + sha256 cellar: :any_skip_relocation, arm64_linux: "5dfef9c8bed35a9cd280b2ee20f9c29b60ada0b95c536d7bdd6759bcc3c9e609" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5dfef9c8bed35a9cd280b2ee20f9c29b60ada0b95c536d7bdd6759bcc3c9e609" + end + + depends_on "certifi" + depends_on "ffmpeg" + depends_on "mplayer" + depends_on "python@3.13" + + resource "anyio" do + url "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + 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/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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/a2/11/333d16f88b1515d4c601e1dfbf1028e6798f0b2a8ff1dc5aaa7b797aa9e8/yt_dlp-2025.3.31.tar.gz" + sha256 "1bfe0e660d1a70a09e27b2d58f92e30b1e2e362cc487829f2f824346ae49fb91" + end + + def install + virtualenv_install_with_resources + 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..dfbb2012437e9 --- /dev/null +++ b/Formula/y/yh.rb @@ -0,0 +1,35 @@ +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" + + bottle do + 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, mojave: "69f1ab9c740906f04924c780cb512ea26fa0c51bdf66be85c71c4cbaa9dc6ca1" + sha256 cellar: :any_skip_relocation, high_sierra: "184eb9a41954f7a3d11f3065dfab42085a724c617ec635681e05784eeebe6329" + 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..4bffd0f25cf98 --- /dev/null +++ b/Formula/y/yices2.rb @@ -0,0 +1,52 @@ +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.6.5.tar.gz" + sha256 "46a93225c1e14ee105e573bb5aae69c8d75b5c65d71e4491fac98203cb0182f3" + 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_sequoia: "7aa9455d40cdd55ef92337c0216bbd59eb9a79436112ba5048371762c2ef6447" + sha256 cellar: :any, arm64_sonoma: "0ebe8f48d46ba45ce6f51e16731dc13419c44274b68909ed9635dcb13b6387cc" + sha256 cellar: :any, arm64_ventura: "e9f1e7539230db974013b318edcb79b903d4481f535412a15a011e8db1e848a7" + sha256 cellar: :any, sonoma: "df4295c2f41d0c4615eddc34ec1a6027ac42f1878ef5a480073b9173e6694966" + sha256 cellar: :any, ventura: "e6ef02af7980cac20b6421c387b7273c96526b00979764eed016201d08ae2f4b" + sha256 cellar: :any_skip_relocation, arm64_linux: "ab2b4ae5de11f2261d60972181d48b4174c90a9a0c1eaaba39a7ede75d16d4b3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1e262428f6fe4f84fb209b35479ed9210fa975ec908120e77dcea8f797fc6752" + 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 + assert_match "sat\n(= x 2)\n(= y (- 1))\n", shell_output("#{bin}/yices-smt2 #{testpath}/lra.smt2") + end +end diff --git a/Formula/y/yj.rb b/Formula/y/yj.rb new file mode 100644 index 0000000000000..19dfb72ecb0c9 --- /dev/null +++ b/Formula/y/yj.rb @@ -0,0 +1,34 @@ +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" + + bottle do + 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/ykclient.rb b/Formula/y/ykclient.rb new file mode 100644 index 0000000000000..5de55a0e8366b --- /dev/null +++ b/Formula/y/ykclient.rb @@ -0,0 +1,66 @@ +class Ykclient < Formula + desc "Library to validate YubiKey OTPs against YubiCloud" + homepage "https://developers.yubico.com/yubico-c-client/" + license "BSD-2-Clause" + revision 1 + + stable do + url "https://developers.yubico.com/yubico-c-client/Releases/ykclient-2.15.tar.gz" + sha256 "f461cdefe7955d58bbd09d0eb7a15b36cb3576b88adbd68008f40ea978ea5016" + + # Use HTTPS and disable old v1 API tests; without this patch "make check" fails + # to work against api.yubico.com + patch do + url "https://github.com/Yubico/yubico-c-client/commit/0d45452e7fbe47e77e78ff23b480c77fd9c06f2b.patch?full_index=1" + sha256 "1e4e85d9d009488cd81a87f54be0f67a5a4cee03d34e1f0afadbc92f5194e93a" + end + end + + bottle do + sha256 cellar: :any, arm64_sonoma: "d9a2809f4ceb7eaab4f2af89746007a4dab264c166d05a3dcdbbf6ea187d98c6" + sha256 cellar: :any, arm64_ventura: "23db2cdc9c298cc6ddcf0db595ba661ab352d3bc70dde9b9063a6a76666c76da" + sha256 cellar: :any, arm64_monterey: "00e116a04b11a1d3c6d15f608d5088de2a1ac864b154da2494d9c3e5f7fa328a" + sha256 cellar: :any, arm64_big_sur: "39c01c0420ae7a6f3af3a97f9e413b3137730f251d4784bb5ab7f878793c34c1" + sha256 cellar: :any, sonoma: "69ddc9a36a6bdad8ffe0004dff002f12ddc8f889c3e840e7c439d178ac16547b" + sha256 cellar: :any, ventura: "5bfb6a9e25a07c820e4900c7e683044c41d56926200556a6dcae16d792eed098" + sha256 cellar: :any, monterey: "985f62c5ed17437ef7670ff6b9bc8b1db77049015701f5ed6587bf51ebd1edbf" + sha256 cellar: :any, big_sur: "9763765c3a3eb3d2fac970755b9c0ed1c48c8d74d7dd767dd824c8b0b3cfffd7" + sha256 cellar: :any, catalina: "1a0d524e983bd1b22c012a00d60c4529b776640386e978fb3f6046b52e17eed7" + sha256 cellar: :any, mojave: "6e1365c8a6d412ae2a65c65b741ab666340bbb384b730989e2833fe96e0b8e92" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8e55e5726173eadd3061b52f6eb3d731076dc3c2056a5b43e55b0db7c816744e" + 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 + + # "This project is deprecated and is no longer being maintained. For more + # information and guidance on how to implement Yubico OTP support in + # applications, see + # https://status.yubico.com/2021/04/15/one-api-yubico-com-one-http-get/." + # + # Original deprecation date: 2021-05-24 + # New deprecation date set to 1 year after dependent issue: + # https://github.com/Yubico/yubico-pam/issues/242 + disable! date: "2024-08-03", because: :repo_archived + + depends_on "help2man" => :build + depends_on "pkgconf" => :build + + uses_from_macos "curl" + + def install + system "autoreconf", "--force", "--install", "--verbose" if build.head? + system "./configure", *std_configure_args + 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/y/ykdl.rb b/Formula/y/ykdl.rb new file mode 100644 index 0000000000000..5b9093eb30c35 --- /dev/null +++ b/Formula/y/ykdl.rb @@ -0,0 +1,47 @@ +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 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eb541b86eded5d4bcc6262795c769d284a9e3c37f42f70121d43864f4066dc1d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14fc581b3aa8b20eea38a546892b72a858dc746e66ac805339e80b30eea0ae03" + sha256 cellar: :any_skip_relocation, arm64_ventura: "97ab80854fd7a7802859506993abdacf466114339a6717a7b0a1010542c3f407" + sha256 cellar: :any_skip_relocation, sonoma: "724042f1d05d799c130ad4715877f1b30919f7c0b3e8571f3b9158ad12e1dac0" + sha256 cellar: :any_skip_relocation, ventura: "2b8f5f155f13edb4eafb86168bf7e4b3d68ad5a5a68538892458e92233f226fc" + sha256 cellar: :any_skip_relocation, arm64_linux: "a69f74467e2cf7ce089700c74580f702be503620dab68542b2df565c42b3f247" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eb541b86eded5d4bcc6262795c769d284a9e3c37f42f70121d43864f4066dc1d" + end + + depends_on "python@3.13" + + 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..246dc967bf048 --- /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/a5/27/f0ab65a7a0204714df832dc16d3ce79777f76985d7c7fc96657ec32e061f/yubikey_manager-5.6.1.tar.gz" + sha256 "730da1358504de6616f1868bf48ddb788ada4b39137fb3ada435efbf39070160" + license "BSD-2-Clause" + head "https://github.com/Yubico/yubikey-manager.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3b2ce9fdbf3963d63a13644a6b4484b835c2c876a3d4fb3652b007c11f3451fe" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa1d2c086005345f31fa769986fef1fcda57230c08451630f4f33f34f11c6c03" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3180632b196054ea207962870bfd7c4b9f0c22a24dbaa2b8b03ddd076605b69c" + sha256 cellar: :any_skip_relocation, sonoma: "e7292e772d7f16911bf8816ff4d8f3e24820a41dc0a13a77c38a12507e382d25" + sha256 cellar: :any_skip_relocation, ventura: "d87451e3d6083ba95278b2218bc470bc62f96432806d7fbae2e3bd964842efb1" + sha256 cellar: :any_skip_relocation, arm64_linux: "7453398ff01dedfeee92585cb71387aace6352f759e40ed5b8901448eff5b442" + sha256 cellar: :any_skip_relocation, x86_64_linux: "30fb8e931492d232d3e3e6307e7c1d549e9cb893eb99486d1aa42d1606a8368f" + end + + depends_on "swig" => :build + depends_on "cryptography" + depends_on "python@3.13" + + uses_from_macos "pcsc-lite" + + # pin pyscard to 2.0.8, upstream bug report, https://github.com/LudovicRousseau/pyscard/issues/169 + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + end + + resource "fido2" do + url "https://files.pythonhosted.org/packages/83/91/e31b08aa0045e86f0a59882528a07ae8e268cd50509abab1261bcdbc8b5f/fido2-2.0.0b1.tar.gz" + sha256 "5be55f9cb33b2b688c670b3f1c4099be2229b77db6736d52b2ff13342badc1c6" + 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/ab/23/9894b3df5d0a6eb44611c36aec777823fc2e07740dabbd0b810e19594013/jaraco_functools-4.1.0.tar.gz" + sha256 "70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d" + 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/88/3b/7fa1fe835e2e93fd6d7b52b2f95ae810cf5ba133e1845f726f5a992d62c2/more-itertools-10.6.0.tar.gz" + sha256 "2cd7fad1009c31cc9fb6a035108509e6547547a7a738374f10bd49a09eb3ee3b" + end + + resource "pyscard" do + url "https://files.pythonhosted.org/packages/fe/19/73e8fc37356a4232f9a86acf3794a0f6d8e014430f1f88153ae19fc21d88/pyscard-2.2.1.tar.gz" + sha256 "920e688a5108224cb19b915c3fd7ea7cf3d1aa379587ffd087973e84c13f8d94" + end + + resource "secretstorage" do + url "https://files.pythonhosted.org/packages/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz" + sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77" + 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" + + # Click doesn't support generating completions for Bash versions older than 4.4 + generate_completions_from_executable(bin/"ykman", shells: [:fish, :zsh], 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..527a1538ca55d --- /dev/null +++ b/Formula/y/ykpers.rb @@ -0,0 +1,71 @@ +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 + + bottle do + 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, mojave: "c2e6089348f9cc4f9c887eeb5975378749c42ea386ef12d7f84a3285b718dc45" + sha256 cellar: :any, high_sierra: "79c240a018183c2f62eae6e7c22f631598b167d321a715f0983ff4653c1c2eee" + 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..29d4862e1b2e5 --- /dev/null +++ b/Formula/y/yle-dl.rb @@ -0,0 +1,68 @@ +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/80/08/c464b63a954f1539cd42e7e8cd6bc61d9de15c37aba4b812e705b1351a94/yle_dl-20250316.tar.gz" + sha256 "7667a6365fe85140acd3d4378be142ce468e18c5b650d5ed04e3ff5dfd8e946f" + license "GPL-3.0-or-later" + head "https://github.com/aajanki/yle-dl.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "eea04e3bf7edbf2f143e8f00b77ad87a928af6c80f458a6a859a8e1f8a831a19" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8491d1eb4d6f99d4902f17035128a85196b98f5f9bfab010e65f4c01a939e062" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ee8721b778801bccd90e87272c0156c16b4790474488b89c8179c06c63afa9b3" + sha256 cellar: :any_skip_relocation, sonoma: "5fe6b29a8f8a909f1e20c562d10d12cadab9000abe85f7804ea7155e1136ef59" + sha256 cellar: :any_skip_relocation, ventura: "ea8d60211f01ada6ff57053ef31e0cd6c9a5be8e44b345345dd939a515bd74e9" + sha256 cellar: :any_skip_relocation, arm64_linux: "26f4e4ec543f127537dacd22d002ba0e3bbeb8da1e1b344c02ff584c6002b94e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "091cc5cf7736496e1335cf1ca8d8c4822c88c3c25e891c9d166083b5ea9ae751" + end + + depends_on "certifi" + depends_on "ffmpeg" + depends_on "python@3.13" + depends_on "rtmpdump" + + uses_from_macos "libxml2", since: :ventura + uses_from_macos "libxslt" + + resource "charset-normalizer" do + url "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + end + + resource "configargparse" do + url "https://files.pythonhosted.org/packages/70/8a/73f1008adfad01cb923255b924b1528727b8270e67cb4ef41eabdc7d783e/ConfigArgParse-1.7.tar.gz" + sha256 "e7067471884de5478c58a511e529f0f9bd1c66bfef1dea90935438d6c23306d1" + 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/ef/f6/c15ca8e5646e937c148e147244817672cf920b56ac0bf2cc1512ae674be8/lxml-5.3.1.tar.gz" + sha256 "106b7b5d2977b339f1e97efe2778e2ab20e99994cbb0ec5e55771ed0795920c8" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz" + sha256 "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" + 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..5e8a2ceae0ddd --- /dev/null +++ b/Formula/y/yo.rb @@ -0,0 +1,30 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "87fa6dcf1b186cf50436be4488b6bf312d55a967b0593137c1d99a8e95e5060c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "87fa6dcf1b186cf50436be4488b6bf312d55a967b0593137c1d99a8e95e5060c" + sha256 cellar: :any_skip_relocation, arm64_ventura: "87fa6dcf1b186cf50436be4488b6bf312d55a967b0593137c1d99a8e95e5060c" + sha256 cellar: :any_skip_relocation, sonoma: "94ccc92540b6f284e3c3456c61ad339722bf13dba744f25f41847930812e54f0" + sha256 cellar: :any_skip_relocation, ventura: "a642a8c54ab92195e9149ac1c73598a8557cf6f28c4fde6bcdbfccc6e236367d" + sha256 cellar: :any_skip_relocation, arm64_linux: "92925df2a2cd8a7c1063561119fbfd75a7df95e0dc766ee1fee0f0c3300b41ae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "82d627be31558a619bfff889f3fa6421c64178f62af9e8dedcda5b18940e90ed" + 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..9f933739be9e2 --- /dev/null +++ b/Formula/y/yoke.rb @@ -0,0 +1,32 @@ +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.12.7", + revision: "16303ef5ec0ef6f0b8757cfb5b730f95ba2f33b1" + license "MIT" + head "https://github.com/yokecd/yoke.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3afd21ea1cb4562da21d5119970b026d36312c1c1e48261d7f78249d368fba49" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "473182ec76837e592bcbb8ed32aea8bf5df4df79355e77626094ceec5933e804" + sha256 cellar: :any_skip_relocation, arm64_ventura: "290cf8e60f8707c230e6c00d81b4ffea7e71b8d69e7fb0f9e71b79031df18bb8" + sha256 cellar: :any_skip_relocation, sonoma: "c6cf62088b2fa5862e510f8414951eb985a7bc01b33849fe1550cd2f49d60d0b" + sha256 cellar: :any_skip_relocation, ventura: "b28b38152f5c7180bb72cf27b68ef93deda2753796f8cb732af92728a928fe03" + sha256 cellar: :any_skip_relocation, arm64_linux: "af09c6f6977f11733f687f068feac6aaf67a6c0b97b0ed847734ba58730a5a9d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "0de857cdd1495526c741dc316eb0ef26899b86d70db636bf60e2ae07b38e9c87" + 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..873f804b0a080 --- /dev/null +++ b/Formula/y/yor.rb @@ -0,0 +1,32 @@ +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_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..92603bc2c6fb8 --- /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.11.tar.gz" + sha256 "e8d5b40d69ad96323909fd5dd19142524a52f1916ede18907a14143393773700" + 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_sequoia: "360b82ba821a553ae22ba7265ada837695c9171f7fa66eaea69db07e056abad3" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "360b82ba821a553ae22ba7265ada837695c9171f7fa66eaea69db07e056abad3" + sha256 cellar: :any_skip_relocation, arm64_ventura: "360b82ba821a553ae22ba7265ada837695c9171f7fa66eaea69db07e056abad3" + sha256 cellar: :any_skip_relocation, sonoma: "70402f16235643d73d7c9b52f6ce45a6edba7e2d71e350b719eec60bcee0a772" + sha256 cellar: :any_skip_relocation, ventura: "70402f16235643d73d7c9b52f6ce45a6edba7e2d71e350b719eec60bcee0a772" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8545e0e00c4b9e9736865be06dc60698f6ecdae8719c353cf10a1449ecf87c9" + 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("https://github.com/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..bfcf33ec98c99 --- /dev/null +++ b/Formula/y/yosys.rb @@ -0,0 +1,41 @@ +class Yosys < Formula + desc "Framework for Verilog RTL synthesis" + homepage "https://yosyshq.net/yosys/" + url "https://github.com/YosysHQ/yosys/releases/download/v0.53/yosys.tar.gz" + sha256 "126e93d82ceca9ece1cf973b395b46a1cc8105651a8ecf3de9afbe786cdeea58" + license "ISC" + head "https://github.com/YosysHQ/yosys.git", branch: "main" + + bottle do + sha256 arm64_sequoia: "b73197d7f42cdcd1fbee367d6f7fd3a155c8ad5d04bce3943a94eeaea107eee1" + sha256 arm64_sonoma: "ce9e23d578942c0500492fce049d759d58b326cfe65e2459814d08189d77f781" + sha256 arm64_ventura: "0dad0c6a7aef5ad9ccc7f77e90d2de12bf5cb7e95602f36df4e1aa6191deff5c" + sha256 sonoma: "f5b6cc4c7f020672c173cb00a0ebd7ce630856d4545213da77f7872cdf37315f" + sha256 ventura: "fba2dfced224f204b7ca1adce942333c9bef7e293de1a93fa6f2917952a0eb53" + sha256 arm64_linux: "b12298d0378ed7a6864051582c095f3e0ae0113afe179cc483d364a034502b67" + sha256 x86_64_linux: "bb83f2fb27033d91a3140385090942b1894d2cdb3522dc638c928300cb6f6374" + end + + depends_on "bison" => :build + depends_on "pkgconf" => :build + depends_on "readline" + + uses_from_macos "flex" + uses_from_macos "libffi", since: :catalina + uses_from_macos "python" + uses_from_macos "tcl-tk" + uses_from_macos "zlib" + + on_linux do + depends_on "libtommath" + end + + 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..07754aaf8271f --- /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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "314517f0c46140c29745902c95fbf80a60afb055de554b4ffe5403d767d4d883" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "50cd9cd65f4ca5491d85a72c8c28c38af2d9c5fb5929b34ca60644c69e9709fe" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3aa9c9a1fd96d1206f118671ecb8c96b8099d5f8b41687bcebdf926471e274f8" + sha256 cellar: :any_skip_relocation, sonoma: "d6b37d0b79da427ea6c53fe8bdd7f1ec8ed1c4fee6f5a150ebd2ebfc753cadfd" + sha256 cellar: :any_skip_relocation, ventura: "1a424c4a6418d15823742c255050cd4920dddc672e356619245da96a0cd3be4a" + sha256 cellar: :any_skip_relocation, arm64_linux: "aa525d0b64ae9895f90d12944bb16af68c82ed78e160decacde3c749bea32637" + sha256 cellar: :any_skip_relocation, x86_64_linux: "3b0837e95bc4aab5d8797a4f11f9de319bc1e132115151f5f0e5fcbcbd272b49" + end + + depends_on "python@3.13" + 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..d8232cb82e5ac --- /dev/null +++ b/Formula/y/youplot.rb @@ -0,0 +1,69 @@ +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_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..39a3441141ace --- /dev/null +++ b/Formula/y/youtubedr.rb @@ -0,0 +1,38 @@ +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_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, 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..d38f8eaf05c2d --- /dev/null +++ b/Formula/y/youtubeuploader.rb @@ -0,0 +1,67 @@ +class Youtubeuploader < Formula + desc "Scripted uploads to Youtube" + homepage "https://github.com/porjo/youtubeuploader" + url "https://github.com/porjo/youtubeuploader/archive/refs/tags/v1.24.4.tar.gz" + sha256 "2409b0bb2f622eacba38794d24839318496e910ce33ddf2c8a139e17887b1087" + 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_sequoia: "306d23232c8eecb0705f0a5f0ad360a0149480f890059fb2d686b11e72b6f108" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "306d23232c8eecb0705f0a5f0ad360a0149480f890059fb2d686b11e72b6f108" + sha256 cellar: :any_skip_relocation, arm64_ventura: "306d23232c8eecb0705f0a5f0ad360a0149480f890059fb2d686b11e72b6f108" + sha256 cellar: :any_skip_relocation, sonoma: "f7cb2de9e8a4ba10fc55a271cd5c7de7e62913269c376427e050d5a0b2dc62a7" + sha256 cellar: :any_skip_relocation, ventura: "f7cb2de9e8a4ba10fc55a271cd5c7de7e62913269c376427e050d5a0b2dc62a7" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f48418f9540c2469c963192e3c15d914346900aad522cf144fe23f1a9e19b000" + 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..6336cbd08ee5b --- /dev/null +++ b/Formula/y/yozefu.rb @@ -0,0 +1,50 @@ +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.10.tar.gz" + sha256 "c3053428ad866de6afc930f77260f96023906d496ef6acb9f70bd1fe2a25b2ce" + license "Apache-2.0" + head "https://github.com/MAIF/yozefu.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "fc717462ccce575ec562056e16cca27fb817d6969615686f4fdaad40b719c3a4" + sha256 cellar: :any, arm64_sonoma: "210c643f2f0a543b400c0c9261fccf23a7a7942812ebba562bf1befee72dfbb5" + sha256 cellar: :any, arm64_ventura: "1145c163a5d6b89365e06512f96ac2dce1a496640023f5af88c15b4f9fbe1690" + sha256 cellar: :any, sonoma: "faff7f463cab86e79e8e2f657640165301a10f27c7524b1d715a8db515c8c2bc" + sha256 cellar: :any, ventura: "9d85b0066ccd4b3674b63d11825f3ef45e427b1d7d7722c5f44fe52d97845f0f" + sha256 cellar: :any_skip_relocation, arm64_linux: "caaafe270f4dc06ec01789c9961d5263c5d2315f20d4daa422c22ae0950657a8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "8841a48a34ebf180ed3bf63a799a38ab831e10aa39a93cc2ee077550a750259d" + 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..b927753452b99 --- /dev/null +++ b/Formula/y/yq.rb @@ -0,0 +1,44 @@ +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.45.4.tar.gz" + sha256 "e06b9b219ad885b08cf983a7ce5ff6d946587ab4ffc62de4538655bb50e39111" + 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_sequoia: "2e67a801ebd410bb0183ae6bd5ce47963b910da7cb3fc77b0b6b1ff59c67a2d7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2e67a801ebd410bb0183ae6bd5ce47963b910da7cb3fc77b0b6b1ff59c67a2d7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2e67a801ebd410bb0183ae6bd5ce47963b910da7cb3fc77b0b6b1ff59c67a2d7" + sha256 cellar: :any_skip_relocation, sonoma: "1338d9a2ce0b7c03895ff8df6c96e52d150e609c57e0cbc874f4aadfe118f8f1" + sha256 cellar: :any_skip_relocation, ventura: "1338d9a2ce0b7c03895ff8df6c96e52d150e609c57e0cbc874f4aadfe118f8f1" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5c64691dcf2f41bb3f474190c4b360918c90d0d652e2d6721f41b95df4779388" + end + + depends_on "go" => :build + depends_on "pandoc" => :build + + conflicts_with "python-yq", because: "both install `yq` executables" + + def install + 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..9526c1f203d2e --- /dev/null +++ b/Formula/y/yt-dlp.rb @@ -0,0 +1,91 @@ +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/75/ca/1d1a33dec2107463f59bc4b448fcf43718d86a36b6150e8a0cfd1a96a893/yt_dlp-2025.4.30.tar.gz" + sha256 "d01367d0c3ae94e35cb1e2eccb7a7c70e181c4ca448f4ee2374f26489d263603" + license "Unlicense" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ad6ad9f9a0c57ba1538b716e8ecba7dcdb9db371ce7f388651ea191495a20ca4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "9b09a0f18107094f7525c36a6505f513cecf43b9a03c67ff6d28a5d51eb2f96d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "35adcf1b9bc518301ba4f087fc2f16a22a28360053e585e23cc8383a3fc920f2" + sha256 cellar: :any_skip_relocation, sonoma: "2d86ec40a7f0a90727f2c9deaca8f31ea604584e8c5603b708c194f3bc5db5fa" + sha256 cellar: :any_skip_relocation, ventura: "719a96834e8195a8c4e87df1e06775a3a3ec099a9f0108b637b5618b7bc1fd21" + sha256 cellar: :any_skip_relocation, arm64_linux: "884c092388edb9c8aded445c1de35f04958e7ce089a84ade98142d68f5d7f33c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4dff59123e1563ad58c8f00e15a7e557473716597c4d4195563cd295cae99779" + 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.13" + + 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/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz" + sha256 "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3" + 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 "pycryptodomex" do + url "https://files.pythonhosted.org/packages/ba/d5/861a7daada160fcf6b0393fb741eeb0d0910b039ad7f0cd56c39afdd4a20/pycryptodomex-3.22.0.tar.gz" + sha256 "a1da61bacc22f93a91cbe690e3eb2022a03ab4123690ab16c46abb693a9df63d" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz" + sha256 "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz" + sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466" + 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 + man1.install_symlink libexec/"share/man/man1/yt-dlp.1" + 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" + + # YouTube tests fail bot detection + return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] + + system bin/"yt-dlp", "--simulate", "https://www.youtube.com/watch?v=pOtd1cbOP7k" + system bin/"yt-dlp", "--simulate", "--yes-playlist", "https://www.youtube.com/watch?v=pOtd1cbOP7k&list=PLMsZ739TZDoLj9u_nob8jBKSC-mZb0Nhj" + end +end diff --git a/Formula/y/ytt.rb b/Formula/y/ytt.rb new file mode 100644 index 0000000000000..fac9331a02b0a --- /dev/null +++ b/Formula/y/ytt.rb @@ -0,0 +1,61 @@ +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.0.tar.gz" + sha256 "130758548c465eb2707813890597e59209cb802a9c47b1196969cae0374a07ea" + license "Apache-2.0" + head "https://github.com/carvel-dev/ytt.git", branch: "develop" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8abbee75bbe9f764cf8ccc28080d10e22700966bc1533fbe268fcbd5e91eddb7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "8abbee75bbe9f764cf8ccc28080d10e22700966bc1533fbe268fcbd5e91eddb7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "8abbee75bbe9f764cf8ccc28080d10e22700966bc1533fbe268fcbd5e91eddb7" + sha256 cellar: :any_skip_relocation, sonoma: "162afff45fc8af482a35996c709f197e4c550d6d83fc6f30f834d94c6ad5378b" + sha256 cellar: :any_skip_relocation, ventura: "162afff45fc8af482a35996c709f197e4c550d6d83fc6f30f834d94c6ad5378b" + sha256 cellar: :any_skip_relocation, x86_64_linux: "810e7536d4c05e5f46519de42b9b5d18a242eed31de410158eda1f4ce8b146f5" + 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..3d6a9d5106157 --- /dev/null +++ b/Formula/y/yubico-piv-tool.rb @@ -0,0 +1,44 @@ +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.1.tar.gz" + sha256 "9813190a5c2560ef7fe8018c03614091e911e0596c5853ef25c82cd9283a444b" + 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_sequoia: "852e180ed2fe18fe28777716db26c09e754238744f889078b61d137d61fa6e80" + sha256 cellar: :any, arm64_sonoma: "c7a5dc4310d0f45106800d409de0933feda9ff5cedb14fae0b0c5d73df545ffe" + sha256 cellar: :any, arm64_ventura: "5270a529dab82aaf84696ae71fedf63786d36c20209bcd701debada9e08e6e5b" + sha256 cellar: :any, sonoma: "8f3beb1c9c8532e03fe3730b561c2d54aa98def4f5d4c9e26ba3682acba762b5" + sha256 cellar: :any, ventura: "c31f355c89499b1e03ca9655c03e0c9e7f279d6ce236238de851ccae68d1c2bd" + sha256 cellar: :any_skip_relocation, arm64_linux: "42bcc272539ce1f7047b105bd7cee46499f8dd95753553fe2b9f2d7f06a79fa0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e54ae29bc9056bc7763ee41cf8db4b6dbb744d43f1c7903e6d8d480d9b0014fd" + 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..e885918afb9f5 --- /dev/null +++ b/Formula/y/yubikey-agent.rb @@ -0,0 +1,61 @@ +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" + + bottle do + 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 + + uses_from_macos "pcsc-lite" + + on_linux do + depends_on "pkgconf" => :build + 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..6fb10c1dea929 --- /dev/null +++ b/Formula/y/yuicompressor.rb @@ -0,0 +1,44 @@ +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 + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8f29cb084549e077a7ba1a0aaa2ad5c78d4067de0d3a019ef8ec831f55a542f9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "39a0c85d86b163e85204877c02dc2028d458aaa93822a9744bd3ce6cf883163b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "39a0c85d86b163e85204877c02dc2028d458aaa93822a9744bd3ce6cf883163b" + sha256 cellar: :any_skip_relocation, arm64_monterey: "39a0c85d86b163e85204877c02dc2028d458aaa93822a9744bd3ce6cf883163b" + sha256 cellar: :any_skip_relocation, sonoma: "a777992c7ffb05c413bcc9d2f7e6abafffc51af453be8300eb14944393b73c20" + sha256 cellar: :any_skip_relocation, ventura: "a777992c7ffb05c413bcc9d2f7e6abafffc51af453be8300eb14944393b73c20" + sha256 cellar: :any_skip_relocation, monterey: "a777992c7ffb05c413bcc9d2f7e6abafffc51af453be8300eb14944393b73c20" + sha256 cellar: :any_skip_relocation, arm64_linux: "00fe50c269653c7a3766b3a2f71fa9c01da5464ffe226c4d1504288d3cbc1ad2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "9ecbde7c5fb11f028b5bca5b4174f007370df1827ea1e83a603c89c522823855" + 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/yutu.rb b/Formula/y/yutu.rb new file mode 100644 index 0000000000000..98b354bcb33a3 --- /dev/null +++ b/Formula/y/yutu.rb @@ -0,0 +1,38 @@ +class Yutu < Formula + desc "Fully functional CLI for YouTube" + homepage "https://github.com/eat-pray-ai/yutu" + url "https://github.com/eat-pray-ai/yutu.git", + tag: "v0.9.8", + revision: "9c6e73e0ab60f427587295b9360ce32e09451a4b" + license "MIT" + head "https://github.com/eat-pray-ai/yutu.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "769982f81b6613ca99435d73d739889dc2a28633240711b3de1470e41674b527" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "769982f81b6613ca99435d73d739889dc2a28633240711b3de1470e41674b527" + sha256 cellar: :any_skip_relocation, arm64_ventura: "769982f81b6613ca99435d73d739889dc2a28633240711b3de1470e41674b527" + sha256 cellar: :any_skip_relocation, sonoma: "5da87bf441efd6276fd9e6241be7a3855bd1717d337cc6326a59fc6882298625" + sha256 cellar: :any_skip_relocation, ventura: "5da87bf441efd6276fd9e6241be7a3855bd1717d337cc6326a59fc6882298625" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a48c7c00352680173f29011cab792b26524cffe064c57686a37e3a0919751059" + end + + depends_on "go" => :build + + def install + mod = "github.com/eat-pray-ai/yutu/cmd" + ldflags = %W[-w -s + -X #{mod}.Os=#{OS.mac? ? "darwin" : "linux"} + -X #{mod}.Arch=#{Hardware::CPU.arch} + -X #{mod}.Version=v#{version} + -X #{mod}.Commit=#{Utils.git_short_head(length: 7)} + -X #{mod}.CommitDate=#{time.iso8601}] + system "go", "build", *std_go_args(ldflags:), "." + end + + test do + version_output = shell_output("#{bin}/yutu version 2>&1") + assert_match "yutu🐰 version v#{version}", version_output + auth_output = shell_output("#{bin}/yutu auth 2>&1", 1) + assert_match "Please configure OAuth 2.0", auth_output + end +end diff --git a/Formula/y/yydecode.rb b/Formula/y/yydecode.rb new file mode 100644 index 0000000000000..a7d32c740fd90 --- /dev/null +++ b/Formula/y/yydecode.rb @@ -0,0 +1,41 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "18d815befe31bcdeaac8edff43cb878f53c34a608fa946c13a14143139bf887a" + sha256 cellar: :any_skip_relocation, high_sierra: "e2e7285f1f2b18b4b99800602d15932dba435f6480c5776e5b57b734727f652f" + sha256 cellar: :any_skip_relocation, sierra: "91dc4fe34931d45fcebaead39ce505116322c7866e786cf86a7065f9e57b42ac" + sha256 cellar: :any_skip_relocation, el_capitan: "07aa31cabc4f2533df3b5670beed1ba99e3e7dcc3ffb3cf55fff56866e7bf11e" + 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..8ec0df6aaa264 --- /dev/null +++ b/Formula/y/yyjson.rb @@ -0,0 +1,67 @@ +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.11.1.tar.gz" + sha256 "610a38a5e59192063f5f581ce0c3c1869971c458ea11b58dfe00d1c8269e255d" + license "MIT" + head "https://github.com/ibireme/yyjson.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "be33f4c52f3a3ca9e3bec1672536ba743a3b1635d42179ab9173b945b9d4a6c4" + sha256 cellar: :any, arm64_sonoma: "6ff845ea14ced22f1f3585c87f32dcbbfdcc43da79b047c2b7e03eb403edabb7" + sha256 cellar: :any, arm64_ventura: "a27c8654370e7639f4358137195d56e38bd8b99f32eaa9d3bbf530b449116b5c" + sha256 cellar: :any, sonoma: "d0c7ae8b75e9aaca959798ab7e39093f7afcd76584bcc46edb8c74425af4c255" + sha256 cellar: :any, ventura: "4f6b77f8784820f415fcc8ce870181dccae2a7c6b322d46e781d3ebdedda20e5" + sha256 cellar: :any_skip_relocation, arm64_linux: "91527b3761383f2f462b56111bff0add9a29daa372db3a81a69ca6e2102874e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7cc670a7221472e4bc8893a82e54b0d7c7a777486db590d1b068714b7e107570" + 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 61f35b432a4d3..0000000000000 --- a/Formula/yacas.rb +++ /dev/null @@ -1,35 +0,0 @@ -class Yacas < Formula - desc "General purpose computer algebra system" - homepage "https://www.yacas.org/" - url "https://github.com/grzegorzmazur/yacas/archive/v1.8.0.tar.gz" - sha256 "25ebdafaec032eb4f39a12d87afc6cf9bf63ab952479a4839a71df92da5a981b" - license "LGPL-2.1" - - bottle do - cellar :any_skip_relocation - sha256 "19ab04af9d66b53b2686d7e7f8776751eebcecfc384870bc1f9b64daf140ed9a" => :catalina - sha256 "7eddc6ecfe6269e3fe86f1187e091567029595f3cd217c31d4b27f13f40767a0" => :mojave - sha256 "09a00e2be0c76797919a7d1d4b621755b2594c7ba01ae974a47d654df43681f7" => :high_sierra - 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 - ln_s "../libyacas/Release", "cyacas/libyacas_mp/Release" - xcodebuild "-project", "yacas.xcodeproj", "-scheme", "ALL_BUILD", - "-configuration", "Release", "SYMROOT=build/cyacas/libyacas" - end - bin.install "build/cyacas/libyacas/Release/yacas" - lib.install "build/cyacas/libyacas/Release/libyacas.a", - "build/cyacas/libyacas/Release/libyacas_mp.a" - 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 bfd2510be2420..0000000000000 --- a/Formula/yadm.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Yadm < Formula - desc "Yet Another Dotfiles Manager" - homepage "https://yadm.io/" - url "https://github.com/TheLocehiliosan/yadm/archive/2.4.0.tar.gz" - sha256 "37efea63dc9c77951433c841bde34e0a042dc561e8c026e690d146e768701b0f" - license "GPL-3.0" - - bottle :unneeded - - def install - system "make", "install", "PREFIX=#{prefix}" - 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/".config/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/yaegi.rb b/Formula/yaegi.rb deleted file mode 100644 index 0f56d939cecb4..0000000000000 --- a/Formula/yaegi.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Yaegi < Formula - desc "Yet another elegant Go interpreter" - homepage "https://github.com/containous/yaegi" - url "https://github.com/containous/yaegi/archive/v0.8.11.tar.gz" - sha256 "33a33cad8ed06ca5846117d3a0be539998361f62e0588aeb0981b1abf4f2563e" - license "Apache-2.0" - head "https://github.com/containous/yaegi.git" - - bottle do - cellar :any_skip_relocation - sha256 "ed16046653b93e18b4d692493f8dc1757cf6f331a14e8ceb020a2818ac9ff412" => :catalina - sha256 "e69ca038967da39477d1bcb67c757216908a3a2f156ef1f21674fe6197276899" => :mojave - sha256 "738ef2f625c085e272b852e62f839ba3111c01fa52f8064ac8148208104fd91d" => :high_sierra - end - - depends_on "go" => :build - - def install - system "go", "build", *std_go_args, "cmd/yaegi/yaegi.go" - prefix.install_metafiles - end - - test do - assert_match "4", pipe_output("#{bin}/yaegi", "println(3 + 1)", 0) - end -end diff --git a/Formula/yaf.rb b/Formula/yaf.rb deleted file mode 100644 index 698d8ab8c53d3..0000000000000 --- a/Formula/yaf.rb +++ /dev/null @@ -1,41 +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.11.0.tar.gz" - sha256 "5e2523eeeaa5ac7e08f73b38c599f321ba93f239011efec9c39cfcbc30489dca" - revision 1 - - bottle do - cellar :any - rebuild 1 - sha256 "62355ef76633be429f5a281b1a357fa74d12e33ffaf5c2e38b0291442cb1f9fd" => :catalina - sha256 "7395026369a9b4b30f6614ab98baa1d810de2af29511b635b3ba2ad5a3d82289" => :mojave - sha256 "3e4ba45a90c4a47bcb4edc7dd9d9bf227d8b70af3989368bbf6cc4b006d2a9f7" => :high_sierra - sha256 "f9f45a164b81d2b4d4ef3b45664faa81d8317039cee93b69a1f4dc2d55786068" => :sierra - end - - depends_on "pkg-config" => :build - depends_on "gettext" - depends_on "glib" - depends_on "libfixbuf" - depends_on "libtool" - depends_on "pcre" - - uses_from_macos "libpcap" - - 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 c98c2fb600144..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://deb.debian.org/debian/pool/main/y/yafc/yafc_1.3.7.orig.tar.xz" - sha256 "4b3ebf62423f21bdaa2449b66d15e8d0bb04215472cb63a31d473c3c3912c1e0" - revision 4 - - bottle do - cellar :any - sha256 "07a19edcc11987e0de79538413a41b683c86de41d216eb2c120f747a3564bfd4" => :catalina - sha256 "f01687e9e00211d729d0d6bb191d6286b41693c52ecf2e6c5a26874c27589daa" => :mojave - sha256 "d2344380f7cee870732888ac9675303edd374400d5c1bbde02f822d09e93d186" => :high_sierra - 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 8b77bd0119717..0000000000000 --- a/Formula/yajl.rb +++ /dev/null @@ -1,35 +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" - license "ISC" - - bottle do - cellar :any - rebuild 4 - sha256 "65975afbeddbbd919282c04e53fccda191501eb4fa8992a2b4ab1b2be2e10151" => :catalina - sha256 "ab562be70a8ff64861d52b170585f52af91a275e6b5974241eaabd0997b990f2" => :mojave - sha256 "3213f11462b3c60a33209c4f5d36c96caf1a9409103012ffb427dd51770ac120" => :high_sierra - sha256 "1f97e0bbc6680ad4735f0c7ecac20ec87531456c3ab1c93c480c5c5a93a33e1c" => :sierra - sha256 "5cfd83bfdbd7c92402f1cecc6b66788e6db0c195880a40263365d8130e47db2f" => :el_capitan - sha256 "600fec6352ac23a66795cce22cb0a555df43eb464c87693299cb4fc2a1307833" => :yosemite - sha256 "d44363e381f2f353387374167520ed166f3c0c756887dab6e015961bd9ba5ff3" => :mavericks - 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 ca1eee4b24494..0000000000000 --- a/Formula/yamcha.rb +++ /dev/null @@ -1,65 +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" - license "LGPL-2.1" - - bottle do - cellar :any - rebuild 1 - sha256 "703da9d88502c3e8ede9d567a816f7b7856112175f07f8b4c720bc7b0f540e64" => :catalina - 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 c9f631dd596cd..0000000000000 --- a/Formula/yamdi.rb +++ /dev/null @@ -1,23 +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 "6a3483a957ef3a480f5391d9483b0d3cf8adfce2ec2f6b48289f16733ce29771" => :catalina - 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 34fa4d8000aa6..0000000000000 --- a/Formula/yaml-cpp.rb +++ /dev/null @@ -1,36 +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.3.tar.gz" - sha256 "77ea1b90b3718aa0c324207cb29418f5bced2354c2e483a9523d98c3460af1ed" - license "MIT" - revision 1 - - bottle do - cellar :any - sha256 "7cb356c020e5e1f2a32d5b2721516b9079cc4518556a0344fd498df6abe04731" => :catalina - sha256 "ab76f2d444f7948c73f102588d079e4a3a0c758974f42cec1bffa31e80ca7bff" => :mojave - sha256 "824351b703802346eeb47a3a0acdbf438327cc1cb77ef4a342493a938574c6d6" => :high_sierra - end - - depends_on "cmake" => :build - - def install - system "cmake", ".", *std_cmake_args, "-DYAML_BUILD_SHARED_LIBS=ON", - "-DYAML_CPP_BUILD_TESTS=OFF" - 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 65e40628348c5..0000000000000 --- a/Formula/yamllint.rb +++ /dev/null @@ -1,48 +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.23.0.tar.gz" - sha256 "48238b771f3910d2fa16a35430a956ff26e7b649134dd57b0a7f8b9b5ce6844c" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "ec582cd37f6370383f7f3830eada064ee5549890e3004ec4efbe320ec8136799" => :catalina - sha256 "a16d5e7e4086222c51793c0d032489174d6230599033484efacb20f50f43d5a3" => :mojave - sha256 "aa68d7ef0ab8ad535ab0993ca1363b672c600e2bc339d56d4a6253dde87c0d74" => :high_sierra - end - - depends_on "libyaml" - depends_on "python@3.8" - - resource "PyYAML" do - url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz" - sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d" - end - - resource "pathspec" do - url "https://files.pythonhosted.org/packages/93/9c/4bb0a33b0ec07d2076f0b3d7c6aae4dad0a99f9a7a14f7f7ff6f4ed7fa38/pathspec-0.8.0.tar.gz" - sha256 "da45173eb3a6f2a5a487efba21f050af2b41948be6ab52b6a1e3ff22bb8b7061" - 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 ecd1e1979c6cf..0000000000000 --- a/Formula/yank.rb +++ /dev/null @@ -1,35 +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.2.0.tar.gz" - sha256 "c4a2f854f9e49e1df61491d3fab29ea595c7e3307394acb15f32b6d415840bce" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "ef4da54ce9a56a1767b44dd88df6616c147730d74f390d5a661910dddf8785a7" => :catalina - sha256 "60431f02c576c640597975986ce62f9d157c49f160d7d6e23f917dc321ca8bac" => :mojave - sha256 "b87461e809f0bebd615d4da69c31509109de8f86d07d280dab07326293cc851f" => :high_sierra - sha256 "70a5de45249c1656653733fea8d7a92c2496b9ba8e7540eef86b3f805d0e933a" => :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/yapf.rb b/Formula/yapf.rb deleted file mode 100644 index cbabb3040c7c0..0000000000000 --- a/Formula/yapf.rb +++ /dev/null @@ -1,27 +0,0 @@ -class Yapf < Formula - include Language::Python::Virtualenv - - desc "Formatter for python code" - homepage "https://github.com/google/yapf" - url "https://files.pythonhosted.org/packages/65/44/c2aa8743cada222eaede6b9bd4b644e84f04eaa6dede2258ec7562b705d3/yapf-0.30.0.tar.gz" - sha256 "3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427" - license "Apache-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "d01c7c5f1bf9e9aa845dc219215902089bd4840058207b886699b6aaffa89e95" => :catalina - sha256 "2382d1e94fa1ee30967decf41c62bf83d9d72ac7be41ae6d267fee68b52297c7" => :mojave - sha256 "0827bfff5c9ea969e54f97302298d4fb2861d91b6baae4f8c4cf3f6e84f44cc2" => :high_sierra - end - - depends_on "python@3.8" - - def install - virtualenv_install_with_resources - end - - test do - output = shell_output("echo \"x='homebrew'\" | #{bin}/yapf") - assert_equal "x = 'homebrew'", output.strip - end -end diff --git a/Formula/yara.rb b/Formula/yara.rb deleted file mode 100644 index 086869fc2100c..0000000000000 --- a/Formula/yara.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Yara < Formula - desc "Malware identification and classification tool" - homepage "https://github.com/VirusTotal/yara/" - url "https://github.com/VirusTotal/yara/archive/v4.0.2.tar.gz" - sha256 "05ad88eac9a9f0232432fd14516bdaeda14349d6cf0cac802d76e369abcee001" - license "BSD-3-Clause" - head "https://github.com/VirusTotal/yara.git" - - bottle do - cellar :any - sha256 "e0a9565366bfa84e65ebc338c7862848aac15345570433c632311c5e0c1b7811" => :catalina - sha256 "9a376923b39660a19777e4d5ecad48251a8510309c69291dc877b75e97d91d66" => :mojave - sha256 "769d58809bcba97950e18d7f9c1e8e45e113abe8b7c21c7f0f56674e0ac2f7d1" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "jansson" - depends_on "libmagic" - depends_on "openssl@1.1" - depends_on "protobuf-c" - - def install - system "./bootstrap.sh" - system "./configure", "--disable-silent-rules", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-dotnet", - "--enable-cuckoo", - "--enable-magic", - "--enable-macho", - "--enable-dex", - "--with-crypto" - 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 e696377a44616..0000000000000 --- a/Formula/yarn-completion.rb +++ /dev/null @@ -1,18 +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" - license "MIT" - - 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 f9cc151492457..0000000000000 --- a/Formula/yarn.rb +++ /dev/null @@ -1,30 +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.22.4/yarn-v1.22.4.tar.gz" - sha256 "bc5316aa110b2f564a71a3d6e235be55b98714660870c5b6b2d2d3f12587fb58" - - bottle :unneeded - - depends_on "node" - - 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 811b222affac4..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/73097/yash-2.50.tar.xz" - sha256 "b6e0e2e607ab449947178da227fa739db4b13c8af9dfe8116b834964b980e24b" - license "GPL-2.0" - - bottle do - sha256 "7e92afc1391f9d80bcab553e29705fd0cb11c88ae10448a7d57d408284c8490f" => :catalina - sha256 "1ce52a85f6ed173af4e6e296a1051b08536a31d7e7c8704d0324bb4d2c751fad" => :mojave - sha256 "026106ab6ee3296619ad4cd762756d4676713feb7060172cabc39e92d8f222a0" => :high_sierra - 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 38636165ddcce..0000000000000 --- a/Formula/yasm.rb +++ /dev/null @@ -1,61 +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 "ff96362c2fe7e8a4608471d479ae5eefb44d81d318ddad204900118be444c65d" => :catalina - 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 814746b0b72ed..0000000000000 --- a/Formula/yaws.rb +++ /dev/null @@ -1,96 +0,0 @@ -class Yaws < Formula - desc "Webserver for dynamic content (written in Erlang)" - homepage "http://yaws.hyber.org/" - license "BSD-3-Clause" - revision 2 - head "https://github.com/erlyaws/yaws.git" - - stable do - url "https://github.com/erlyaws/yaws/archive/yaws-2.0.7.tar.gz" - sha256 "083b1b6be581fdfb66d77a151bbb2fc3897b1b0497352ff6c93c2256ef2b08f6" - - # Erlang 23 compatibility - # Remove with the next release. Also remove `WARNINGS_AS_ERRORS=` flag from `make install` call - patch do - url "https://github.com/erlyaws/yaws/compare/c0fd79f17d52628fcec527da7fa3e788c283c445..28eecfd1c65c369de5b4b99cea9407205bbe8f8e.patch?full_index=1" - sha256 "0dbcb92e961ae9dc9d6613436f5d39e0c1b675635cfbeef888e1d2b487add413" - end - end - - bottle do - cellar :any_skip_relocation - sha256 "09997293c21d6a547bd35e3c6384eae48376665729e02e9008d3fe59e2436c4d" => :catalina - sha256 "bb522ea70a11984cb30b10ad4a0fe6a8140d4a6b55916ded173fb44732d185e4" => :mojave - sha256 "627c282c11101b0f7b036e52ddff6e33db668540bb8c94a7ba9e45ab510f46f4" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "erlang" - - # 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" - system "./configure", "--prefix=#{prefix}", - # Ensure pam headers are found on Xcode-only installs - "--with-extrainclude=#{MacOS.sdk_path}/usr/include/security", - "SED=/usr/bin/sed" - 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 - 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 - fork do - exec bin/"yaws", "-c", testpath/"yaws.conf", "--erlarg", "-noshell" - end - sleep 3 - - 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/yaz.rb b/Formula/yaz.rb deleted file mode 100644 index 1f649d8896d11..0000000000000 --- a/Formula/yaz.rb +++ /dev/null @@ -1,72 +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.30.3.tar.gz" - sha256 "f0497fd8420574efab4e5738ea3b70787a6e8042f585156baa30bdc1911ba552" - license "BSD-3-Clause" - - bottle do - cellar :any - sha256 "3e99cfd562ae262f299752a7d92dbad3f9b67dd37726e90b1109684f0deac7d1" => :catalina - sha256 "0fb86a32e27613df4ef17bc76556364a85d220c9d044f6f2c515ca0bb2e94c6a" => :mojave - sha256 "a3dd5357b88bd5780a90dc1fb51c12943d3a8ba6ce69073fb262116c9b050b3e" => :high_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" - - uses_from_macos "libxml2" - - 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 8ed32c9c1a25b..0000000000000 --- a/Formula/yaze-ag.rb +++ /dev/null @@ -1,31 +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" - license "GPL-2.0" - - bottle do - sha256 "f250f5ad984f31c1f96c744b81195c96bdccce6f74dd7548ceed19ba1172c117" => :catalina - 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 281bb8f0c9a7a..0000000000000 --- a/Formula/yazpp.rb +++ /dev/null @@ -1,50 +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 "fc6c551c54b78b477836368f8f4c24f39bc8324ced4aaed418ed6ebde071c130" => :catalina - 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 - - test do - (testpath/"test.cpp").write <<~EOS - #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; - } - EOS - - system ENV.cxx, "-std=c++11", "-I#{include}/src", "-L#{lib}", - "-lzoompp", "test.cpp", "-o", "test" - output = shell_output("./test") - assert_match "Exception caught", output - end -end diff --git a/Formula/yconalyzer.rb b/Formula/yconalyzer.rb deleted file mode 100644 index a9fb926a316a8..0000000000000 --- a/Formula/yconalyzer.rb +++ /dev/null @@ -1,34 +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 "2e834b5134e7670fc97cb45131b732a7dc7a6f41598dacb20dd65b575713dc16" => :catalina - 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 do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/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/ydcv.rb b/Formula/ydcv.rb deleted file mode 100644 index 584f4a2c9436c..0000000000000 --- a/Formula/ydcv.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Ydcv < Formula - include Language::Python::Virtualenv - - desc "YouDao Console Version" - homepage "https://github.com/felixonmars/ydcv" - url "https://github.com/felixonmars/ydcv/archive/0.7.tar.gz" - sha256 "03dd5de36ea8fce3170e678e63fc3694e2718b22bc5e1526e3e07f5c36ec9aa0" - license "GPL-3.0" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "c58351df91ff5461873cb5cae4dcecc40d8f2c64d15152b95c279a1624fe01d0" => :catalina - sha256 "8ea0db97fbede09e11d8890652db0128197c8fb551796efdf795c73021c1d578" => :mojave - sha256 "906ce5ee60c5b2c8d4c90b42fbc8e08cafd67de0df9f9b63bd7f4a0f428073c7" => :high_sierra - end - - depends_on "python@3.8" - - def install - ENV["SETUPTOOLS_SCM_PRETEND_VERSION"] = version - - zsh_completion.install "contrib/zsh_completion" => "_ydcv" - virtualenv_install_with_resources - end - - def caveats - <<~EOS - You need to add a config for API Key, read more at https://github.com/felixonmars/ydcv - EOS - end - - test do - system "#{bin}/ydcv", "--help" - 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 368ed14017cde..0000000000000 --- a/Formula/yelp-tools.rb +++ /dev/null @@ -1,57 +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.32/yelp-tools-3.32.2.tar.xz" - sha256 "183856b5ed0b0bb2c05dd1204af023946ed436943e35e789afb0295e5e71e8f9" - revision 2 - - bottle do - cellar :any_skip_relocation - sha256 "fd04fbc43832ca6a6e75ffcd928794c866153c7cf04d4f366e79d15a14a317b6" => :catalina - sha256 "fd04fbc43832ca6a6e75ffcd928794c866153c7cf04d4f366e79d15a14a317b6" => :mojave - sha256 "fd04fbc43832ca6a6e75ffcd928794c866153c7cf04d4f366e79d15a14a317b6" => :high_sierra - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gettext" => :build - depends_on "intltool" => :build - depends_on "itstool" => :build - depends_on "libtool" => :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.34/yelp-xsl-3.34.2.tar.xz" - sha256 "0c3fe6146113df26fb1295901b1c7baed9f0fe67a87f4345e11543aefe7cb7ad" - end - - def install - resource("yelp-xsl").stage do - system "autoreconf", "-fi" - 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 "autoreconf", "-fi" - 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 41f41512ecbd8..0000000000000 --- a/Formula/yeti.rb +++ /dev/null @@ -1,31 +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 "5bb8d8a2c4ba29c5e4cab58c9c0ba9ad53ee19d48f1845885b49d8cf3f2e83f0" => :catalina - 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 a112a9bed5826..0000000000000 --- a/Formula/yetris.rb +++ /dev/null @@ -1,27 +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" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "a43b346adc20fc7d4f84ec1300e839bb4e615ab40ccf8e1a591f099092ad6078" => :catalina - sha256 "ace31e89cefd33d38a65864d7343baad6dbda23aee0ba2a10f6b19480b9708e0" => :mojave - sha256 "21537f5957c5ce90281195e6d962363920bda756a6c965ca107c329ec712f126" => :high_sierra - sha256 "cf350d8daaf62f863b7466477aebea02145abf1f14e50ee56ad324c99dcee018" => :sierra - sha256 "fd08bc62fc0c4687ed7e76fe604c345a647fb52a348c55cf446fcbf52c7af8dd" => :el_capitan - sha256 "a14c5327ab931d7394b3f617422916eafbc76a936ac77e81a959b38aa223dd5e" => :yosemite - 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/ykclient.rb b/Formula/ykclient.rb deleted file mode 100644 index 8fb2613996988..0000000000000 --- a/Formula/ykclient.rb +++ /dev/null @@ -1,37 +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" - license "BSD-2-Clause" - - 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 deb4f1f1a5620..0000000000000 --- a/Formula/ykman.rb +++ /dev/null @@ -1,84 +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-3.1.1.tar.gz" - sha256 "68ef41ac3cd2e891019e755a492427ecdd63d8816525d05f2f32c37b8c440cfa" - license "BSD-2-Clause" - revision 1 - head "https://github.com/Yubico/yubikey-manager.git" - - bottle do - cellar :any - sha256 "c06a8cb44d6cd76c638c88ef5812e4c2dcce922f30014f875eaf61bf63ae7404" => :catalina - sha256 "e1d502f836a9403fd191f8f7bab1cec7b09236de0f035d24385b0f55e82ea63a" => :mojave - sha256 "8c00a4aa2502ef29c8dc9c02f0ce0f6a04299aeeae00168536f55623c1c21b8a" => :high_sierra - end - - depends_on "swig" => :build - depends_on "libusb" - depends_on "openssl@1.1" - depends_on "python@3.8" - depends_on "ykpers" - - uses_from_macos "libffi" - - on_linux do - depends_on "pkg-config" => :build - depends_on "pcsc-lite" - end - - resource "cffi" do - url "https://files.pythonhosted.org/packages/2d/bf/960e5a422db3ac1a5e612cb35ca436c3fc985ed4b7ed13a1b4879006f450/cffi-1.13.2.tar.gz" - sha256 "599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346" - end - - resource "click" do - url "https://files.pythonhosted.org/packages/f8/5c/f60e9d8a1e77005f664b76ff8aeaee5bc05d0a91798afd7f53fc998dbc47/Click-7.0.tar.gz" - sha256 "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7" - end - - resource "cryptography" do - url "https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz" - sha256 "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651" - end - - resource "fido2" do - url "https://files.pythonhosted.org/packages/97/03/9ce85396423a4b9897cc3295a605b63dffd06940e65c1cccd51c2c016864/fido2-0.8.1.tar.gz" - sha256 "449068f6876f397c8bb96ebc6a75c81c2692f045126d3f13ece21d409acdf7c3" - 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/0d/1d/6cc4bd4e79f78be6640fab268555a11af48474fac9df187c3361a1d1d2f0/pyOpenSSL-19.1.0.tar.gz" - sha256 "9a24494b2602aaf402be5c9e30a0b82d4a5c67528fe8fb475e3f3bc00dd69507" - end - - resource "pyscard" do - url "https://files.pythonhosted.org/packages/ed/dd/c575bb75122c250cbed3f70440cb8e25582bf991855bb4eb27371fb8d962/pyscard-1.9.9.tar.gz" - sha256 "e6bde541990183858740793806b1c7f4e798670519ae4c96145f35d5d7944c20" - 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/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz" - sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" - 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 1680c591ec205..0000000000000 --- a/Formula/ykneomgr.rb +++ /dev/null @@ -1,42 +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" - license "LGPL-3.0" - revision 2 - - bottle do - cellar :any - sha256 "8eaee6c402117972a2b3ec4db714594b9e6ddce1bb23c795db3650b576deda38" => :catalina - 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 d31d3b4954506..0000000000000 --- a/Formula/ykpers.rb +++ /dev/null @@ -1,44 +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.20.0.tar.gz" - sha256 "0ec84d0ea862f45a7d85a1a3afe5e60b8da42df211bb7d27a50f486e31a79b93" - license "BSD-2-Clause" - revision 1 - - bottle do - cellar :any - sha256 "f5615ed1ad958e10d5908c16feb53bc706fd42f7721d0e8cfd3ea8dd4658a221" => :catalina - sha256 "1cd502d61459515ab043d2cd8d2d8df3d97f605578766934312fa53343a619ec" => :mojave - sha256 "215538176c67853276fe86e6894d6a19be95323d236175c5e4a84b4ce73b39d6" => :high_sierra - end - - depends_on "pkg-config" => :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 - - 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 da5807a3b8062..0000000000000 --- a/Formula/yle-dl.rb +++ /dev/null @@ -1,130 +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/20200628.tar.gz" - sha256 "4b8ef130b80b0bcfe953d56aef640f09227e6e64486104c53bc8f5af79615e9f" - license "GPL-3.0" - head "https://github.com/aajanki/yle-dl.git" - - bottle do - cellar :any_skip_relocation - sha256 "513097c2d1d174c14eec82353155dca6efcded472ee4fce426c9c01f28821010" => :catalina - sha256 "63de53da03bec566091483b0cb3b362fa41c1111cfb25c0cc55836e40e016dd4" => :mojave - sha256 "7ba726d1b94eb47170aa85b1f173c68a2e52514127692467fbd47068085b32d7" => :high_sierra - end - - depends_on "python@3.8" - depends_on "rtmpdump" - - uses_from_macos "libxslt" - - # `Cannot import name "Feature" from "setuptools" in version 46.0.0`, and lock setuptools to v45.0.0 - # https://github.com/pypa/setuptools/issues/2017#issuecomment-605354361 - resource "setuptools" do - url "https://files.pythonhosted.org/packages/fd/76/3c7f726ed5c582019937f178d7478ce62716b7e8263344f1684cbe11ab3e/setuptools-45.0.0.zip" - sha256 "c46d9c8f2289535457d36c676b541ca78f7dcb736b97d02f50d17f7f15b583cc" - end - - 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/98/c3/2c227e66b5e896e15ccdae2e00bbc69aa46e9a8ce8869cc5fa96310bf612/attrs-19.3.0.tar.gz" - sha256 "f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" - end - - resource "certifi" do - url "https://files.pythonhosted.org/packages/40/a7/ded59fa294b85ca206082306bba75469a38ea1c7d44ea7e1d64f5443d67a/certifi-2020.6.20.tar.gz" - sha256 "5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3" - 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/a4/5f/f8aa58ca0cf01cbcee728abc9d88bfeb74e95e6cb4334cfd5bed5673ea77/defusedxml-0.6.0.tar.gz" - sha256 "f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5" - end - - resource "future" do - url "https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz" - sha256 "b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" - end - - resource "idna" do - url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "lxml" do - url "https://files.pythonhosted.org/packages/03/a8/73d795778143be51d8b86750b371b3efcd7139987f71618ad9f4b8b65543/lxml-4.5.1.tar.gz" - sha256 "27ee0faf8077c7c1a589573b1450743011117f1aa1a91d5ae776bbc5ca6070f2" - 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/7f/3c/80cfaec41c3a9d0f524fe29bca9ab22d02ac84b5bfd6e22ade97d405bdba/pycryptodomex-3.9.7.tar.gz" - sha256 "50163324834edd0c9ce3e4512ded3e221c969086e10fdd5d3fdcaadac5e24a78" - 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/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz" - sha256 "b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b" - end - - resource "six" do - url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" - sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" - sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" - end - - resource "configargparse" do - url "https://files.pythonhosted.org/packages/bb/79/3045743bb26ca2e44a1d317c37395462bfed82dbbd38e69a3280b63696ce/ConfigArgParse-1.2.3.tar.gz" - sha256 "edd17be986d5c1ba2e307150b8e5f5107aba125f3574dddd02c85d5cdcfd37dc" - 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 2bc11362db823..0000000000000 --- a/Formula/yosys.rb +++ /dev/null @@ -1,29 +0,0 @@ -class Yosys < Formula - desc "Framework for Verilog RTL synthesis" - homepage "http://www.clifford.at/yosys/" - url "https://github.com/YosysHQ/yosys/archive/yosys-0.9.tar.gz" - sha256 "f2e31371f9cf1b36cb4f57b23fd6eb849adc7d935dcf49f3c905aa5136382c2f" - license "ISC" - revision 2 - head "https://github.com/YosysHQ/yosys.git" - - bottle do - sha256 "4fb59d68ecc03d90966b442d32d2107854403a772915f5d6543d3ceab008d7ec" => :catalina - sha256 "b20a335e6a787663fe6bc35a653f4330532047898dae9b9ddda67c40533143d6" => :mojave - sha256 "a45b22aa4a58d1aa5757d5b19de374c02a41e7a1ade80d7ce8053537fe8f0829" => :high_sierra - end - - depends_on "bison" => :build - depends_on "pkg-config" => :build - depends_on "libffi" - depends_on "python@3.8" - 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 96b70138b0996..0000000000000 --- a/Formula/you-get.rb +++ /dev/null @@ -1,36 +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.1432.tar.gz" - sha256 "c35ebe75a2904f0dfcf75222109ee02e59aa45ade1105bdc15879cc1a0ae9264" - head "https://github.com/soimort/you-get.git", :branch => "develop" - - bottle do - cellar :any_skip_relocation - sha256 "00978ff19ead4913f71581da459eedc79c51d51b3e3c2482db80cdba29e2bf3f" => :catalina - sha256 "2baed6bb0c7bdba492eab79e19f267dae5a9c00d40ccdafcb230b2fa1b471cda" => :mojave - sha256 "7e57020149ef1a994005275b9a09594d368f9ae59261fd4bb86a9386ba8e2ddd" => :high_sierra - end - - depends_on "python@3.8" - depends_on "rtmpdump" - - resource "PySocks" do - url "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz" - sha256 "3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" - end - - def install - virtualenv_install_with_resources - end - - def caveats - "To use post-processing options, run `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 71db545b407b1..0000000000000 --- a/Formula/youtube-dl.rb +++ /dev/null @@ -1,30 +0,0 @@ -class YoutubeDl < Formula - desc "Download YouTube videos from the command-line" - homepage "https://ytdl-org.github.io/youtube-dl/" - url "https://github.com/ytdl-org/youtube-dl/releases/download/2020.06.16.1/youtube-dl-2020.06.16.1.tar.gz" - sha256 "fd06c016ce2a8b82a3cee245acc397433ddb54a276bdf8d79bcaddbe194000e0" - license "Unlicense" - - head do - url "https://github.com/ytdl-org/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 - # 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/yq.rb b/Formula/yq.rb deleted file mode 100644 index 10f37b72d096d..0000000000000 --- a/Formula/yq.rb +++ /dev/null @@ -1,33 +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/3.3.2.tar.gz" - sha256 "28b34199aadafe0eef1e7becc6953675ad516383b31637a42080940e1c9318fb" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "1cd476d249fd7a11034e3e8581a099cc8dfff09cc1ff40c79b819a5562399137" => :catalina - sha256 "7b33668ea6670cc65b4ef92d640c0066d9fc0c54f7bea4136cd326d8b59d37e8" => :mojave - sha256 "d59fe8d26fa97d6fc26bfff73315d90d361e456bdecf1fdfc10084c3cadedd30" => :high_sierra - end - - depends_on "go" => :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 "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 390747810e2ac..0000000000000 --- a/Formula/yubico-piv-tool.rb +++ /dev/null @@ -1,34 +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-2.1.0.tar.gz" - sha256 "ae6a51cc20c5aa92c3ff2d18411edc49512564cb824ce28e533755cea16287f5" - license "BSD-2-Clause" - - bottle do - sha256 "11cdcfe2fe335c75e79d00b3b47e0e7970f491b5b6021dc1e53b99cb799359e9" => :catalina - sha256 "aec7c7f3cca7e869700ebc5b9a175b0ee48c76079e1f6d29c81431b4b2f9c17e" => :mojave - sha256 "87938ef20245216c4b5abef4142fc160e6ef52551406c39c01e533b6be07ca1d" => :high_sierra - end - - depends_on "check" => :build - depends_on "cmake" => :build - depends_on "gengetopt" => :build - depends_on "help2man" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - depends_on "check" - depends_on "openssl@1.1" - depends_on "pcsc-lite" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, "-DCMAKE_C_FLAGS=-I#{Formula["pcsc-lite"].opt_include}/PCSC" - system "make", "install" - end - 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 ea63620b42cbe..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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "206152a71458e053c332c7ca52f6db716b146e993c08384afb98e56a43c043b6" => :catalina - 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/ - inreplace "src/crc32.h", "typedef unsigned long int u_int32_t;", "" if DevelopmentTools.clang_build_version >= 900 - - 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 5256e9303c535..0000000000000 --- a/Formula/z.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Z < Formula - desc "Tracks most-used directories to make cd smarter" - homepage "https://github.com/rupa/z" - # Please don't update this formula to 1.11. - # https://github.com/rupa/z/issues/205 - url "https://github.com/rupa/z/archive/v1.9.tar.gz" - sha256 "e2860e4f65770e02297ca4ca08ec1ee623a658bd9cc1acddbbe5ad22e1de70a7" - version_scheme 1 - 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..b4168643d0d51 --- /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.21.tar.gz" + sha256 "cab613b1ef752c84a318863c1d8d4ac1aad1699646a5052f67620a44a4a38184" + license "MIT" + head "https://github.com/skywind3000/z.lua.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "ad5ff87665c7ba4d6447a720162b11aaceed7fcf8ae16a92b4c3fa071275eb1e" + 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..b5e967fbb9742 --- /dev/null +++ b/Formula/z/z.rb @@ -0,0 +1,44 @@ +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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5f891b4ed62bd2badf5baf02297e69fde253b3a7906679e3241845d3e45efab0" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "a753b2821b5ad33c549efc1a6f857b33e6b9db2ece6ef10f03a6811c8690544f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "a753b2821b5ad33c549efc1a6f857b33e6b9db2ece6ef10f03a6811c8690544f" + sha256 cellar: :any_skip_relocation, arm64_monterey: "a753b2821b5ad33c549efc1a6f857b33e6b9db2ece6ef10f03a6811c8690544f" + sha256 cellar: :any_skip_relocation, sonoma: "0b418e43748f1185408f2e948df304a58d662ee0ec41489ba5b603f56e24bbb6" + sha256 cellar: :any_skip_relocation, ventura: "0b418e43748f1185408f2e948df304a58d662ee0ec41489ba5b603f56e24bbb6" + sha256 cellar: :any_skip_relocation, monterey: "0b418e43748f1185408f2e948df304a58d662ee0ec41489ba5b603f56e24bbb6" + sha256 cellar: :any_skip_relocation, arm64_linux: "927e27050cdae5bb129b1165c56f8bbd1e4a630dc7dbd4c32d7b628a3d376be9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a753b2821b5ad33c549efc1a6f857b33e6b9db2ece6ef10f03a6811c8690544f" + 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..f1441efc7d330 --- /dev/null +++ b/Formula/z/z3.rb @@ -0,0 +1,74 @@ +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.0.tar.gz" + sha256 "16aa2c02ff34a902a38bddc29f6f720deb1fb6c6987c45ccb782430300f5ccc5" + 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_sequoia: "f3e3fbb6153448fc9fe3befc53a0170ad45369f07209b400d90305ce0d645a5b" + sha256 cellar: :any, arm64_sonoma: "3163b8e0e65799a4e7a96e7d7ceb4a959386d77fdba320dd7bb0f381c19c1b3c" + sha256 cellar: :any, arm64_ventura: "221c41e0d66f5a2baeb60146f40875e2d6ca496d062b06c76d3924a4d15748f9" + sha256 cellar: :any, sonoma: "f9274cd0950dd9c9314d19fb3cbc8baf7a4802ca3c4ef882bdb74df0c9fd2333" + sha256 cellar: :any, ventura: "c151a05ca6866e2e83fc1b7d00bed224c5116f6d68ba645b1c3f1101b8c7fac7" + sha256 cellar: :any_skip_relocation, arm64_linux: "37cbe0ad948d47bce9e6d6c4856c4f5d9cf36e871ae2d55f236388e7496094e3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "216b1f2393ca8c38e413daf5a5db5e572b7f769d3c4d2ce7963a8c9f559ac03f" + end + + depends_on "cmake" => :build + # Has Python bindings but are supplementary to the main library + # which does not need Python. + depends_on "python@3.13" => [:build, :test] + + fails_with :clang do + build 1000 + cause <<~EOS + Z3 uses modern C++17 features, which is not supported by Apple's clang until + later macOS (10.14). + EOS + end + + def python3 + which("python3.13") + 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..93b13b3266294 --- /dev/null +++ b/Formula/z/z80asm.rb @@ -0,0 +1,47 @@ +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 + + bottle do + 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, mojave: "564990d37a17d2fe91472212de5f0cff30990e47275a29e69f1061177c2b1fea" + sha256 cellar: :any_skip_relocation, high_sierra: "183abd9c47e5050aa9a3fb4f9ddbd8806f0154aedcc239e2d2b716e234e91ce5" + sha256 cellar: :any_skip_relocation, sierra: "2bf9a1b8ebae970b16ad7d4644a028ddcb21d8069f2f5d73d18d69881d7eca27" + sha256 cellar: :any_skip_relocation, el_capitan: "46446e7c3644dc58e1c5cc80b904863298f818d15c4aaad721e36cabae75207c" + 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..a17964494e4e9 --- /dev/null +++ b/Formula/z/z80dasm.rb @@ -0,0 +1,39 @@ +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 + + bottle do + 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..92ffabb1ee01f --- /dev/null +++ b/Formula/z/zabbix-cli.rb @@ -0,0 +1,183 @@ +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/d3/ca/edb71c4462cc5bef8e107bcbf38f48f29eb2154ebec08ab373eb9c439d79/zabbix_cli_uio-3.5.2.tar.gz" + sha256 "1a2eecfcb2e2164911f14aebfcbf40d73dda9f220e35072a44a7fd647e4d1508" + license "GPL-3.0-or-later" + revision 1 + head "https://github.com/unioslo/zabbix-cli.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "9e0fc2e2f2861e6449800f13410ea73a64f4131732c62c2565bdc7d271e964a7" + sha256 cellar: :any, arm64_sonoma: "8d083f79ed0f9238bd6f7604f113a5d60cf215f538622a1b209d727d6a581ce5" + sha256 cellar: :any, arm64_ventura: "0608a5ade788efda2b71909e399959b6aba375603bfb9d6afbdfd87b098e247e" + sha256 cellar: :any, sonoma: "429b323e456cb8bca0b608cbf1122a4e724155afe20151c7ec824411bf0a6bfa" + sha256 cellar: :any, ventura: "ce3f8384c349ccc4c37f5d7f960f5063942d11151a2f2c30c74ef62a0c0292a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "2dbb131e44b811cf1c2cbfd787f7f1eba87164207103ba664d27eab7215266c3" + sha256 cellar: :any_skip_relocation, x86_64_linux: "005db4a3bb49555f309dd9f9bf521b95adc9dd9e92b1b338901b84c33a661f43" + end + + depends_on "rust" => :build # for pydantic_core + depends_on "certifi" + depends_on "python@3.13" + + 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/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz" + sha256 "673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028" + end + + resource "click" do + url "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz" + sha256 "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a" + 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 "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 "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/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz" + sha256 "eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351" + 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/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz" + sha256 "7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3" + end + + resource "pydantic-core" do + url "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz" + sha256 "bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df" + end + + resource "pygments" do + url "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz" + sha256 "61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f" + end + + resource "rich" do + url "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz" + sha256 "82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725" + 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" + 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" do + url "https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz" + sha256 "cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff" + 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/8b/6f/3991f0f1c7fcb2df31aef28e0594d8d54b05393a0e4e34c65e475c2a5d41/typer-0.15.2.tar.gz" + sha256 "ab2fab47533a813c49fe1f16b1a370fd5819099c00b119e0633df65f22144ba5" + end + + resource "typing-extensions" do + url "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz" + sha256 "e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" + end + + resource "typing-inspection" do + url "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz" + sha256 "9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122" + end + + resource "wcwidth" do + url "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz" + sha256 "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + 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..7aff16eef18fe --- /dev/null +++ b/Formula/z/zabbix.rb @@ -0,0 +1,49 @@ +class Zabbix < Formula + desc "Availability and monitoring solution" + homepage "https://www.zabbix.com/" + url "https://cdn.zabbix.com/zabbix/sources/stable/7.2/zabbix-7.2.6.tar.gz" + sha256 "e8099cd909dc1bc1b3ec945f88686963877c3febcafc8a9ef54347fe563b9041" + 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_sequoia: "29b4039e173f2b5f97aeb9e5786143ffa1ea79b3e03c389c683f1946857fd38b" + sha256 arm64_sonoma: "c5b7eaee62bc0fc3ed734f420faf66acfe95b286ca9fe387add3c3566b83377c" + sha256 arm64_ventura: "6305ec1938e319698cd0ae71e1a7bac5b132c834a88a50f1ad7fc9ab08e07dfe" + sha256 sonoma: "95a4581f8551f9cf1e7209340838f78436af6976a95858150e25fc69a8d6af5c" + sha256 ventura: "7f6db18ff3cfe1d3dc7beddd6fbe9ad6c3ca92b456c04f63cdc13d5c433abd71" + sha256 arm64_linux: "ae83866143332e64f6dba01ba013cf4f2674f5fd6520c7993cc275e74068f05b" + sha256 x86_64_linux: "01c5449b5231042b445735ba1a63aa85b826c991173b0d146d16fc28192ef983" + 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..456c0997fbcdc --- /dev/null +++ b/Formula/z/zanata-client.rb @@ -0,0 +1,31 @@ +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 + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "4e9a444168ef8759f044a71501e69d0d5f5d8e22dd29038bc8f784751341aa8d" + end + + depends_on "openjdk@8" # https://github.com/Homebrew/homebrew-core/issues/33480 + + 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..04864be5d6dc6 --- /dev/null +++ b/Formula/z/zbar.rb @@ -0,0 +1,72 @@ +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 + + bottle do + 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..4a957c11030ba --- /dev/null +++ b/Formula/z/zbctl.rb @@ -0,0 +1,40 @@ +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_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..803a265c13b79 --- /dev/null +++ b/Formula/z/zboy.rb @@ -0,0 +1,44 @@ +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 + + bottle do + 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, mojave: "8e8a1a05aef5dbfde8ab113ef4e2da14bcf440a7bdb7a001a4913e60b90c23b0" + sha256 cellar: :any, high_sierra: "52b7fa6f933809f05ba692036e78233bb0da2947b5cfc8d1a85ab37037f0cac9" + 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..5147f8245cbac --- /dev/null +++ b/Formula/z/zchunk.rb @@ -0,0 +1,44 @@ +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.1.tar.gz" + sha256 "2c187055e2206e62cef4559845e7c2ec6ec5a07ce1e0a6044e4342e0c5d7771d" + license "BSD-2-Clause" + head "https://github.com/zchunk/zchunk.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "550f804db96f40d3d97fd722bfd9dae58e97d1edc056ada722dbb94a6a4b6f67" + sha256 cellar: :any, arm64_sonoma: "716e3b4a5e310ef2c2e28981287ad44c34ffb65d8017c266a94e2b2740158263" + sha256 cellar: :any, arm64_ventura: "02c1e7311098a207e3c5acdaf951c1f0f79d732190bd26697384de3d297c7a17" + sha256 cellar: :any, arm64_monterey: "54b3a061081d1d37df726b7453e24a6e68d7916afc752fa3ef251a2233aa96ea" + sha256 cellar: :any, sonoma: "07d03afa6c20b2f462ff04f2de17da192bd1be0970cee9606e40b6b735e11894" + sha256 cellar: :any, ventura: "9573ef44975ddcd9cd08a67183a3e244303386fad0af7111467dd00f46d5ca5b" + sha256 cellar: :any, monterey: "8cc7d00b71b7972981f2360d819c07e6e8da894c5995035ebd77073b911562c6" + sha256 arm64_linux: "a58ca812f8a760878e9a9e3ba00c3c20b562d8d8d94bb172364435fe82c3f432" + sha256 x86_64_linux: "65da8bdeab902d65867eda5a3fbda3b6a490827c111872589520e97349b810ee" + 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..4055e5ac70981 --- /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.7.tar.gz" + sha256 "b465ffeb060f507316e6cfc20ebd46022472076d0d4e96ef7dab63e798066420" + license "GPL-2.0-or-later" + revision 5 + + livecheck do + url "https://ftp.indexdata.com/pub/zebra/" + regex(/href=.*?idzebra[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "ebc4c8b98b8d0092a14b28a1fc1a3624d25efc739fac4c8c37a24b9cf748dff7" + sha256 arm64_sonoma: "c90a4df5cdf059fbc304eb29694295d15aff3c9e938c9f3043b21c0611e231f2" + sha256 arm64_ventura: "ba641b0bb5af1aeed71f7c74bdd2d23260bc56d5417a16b3c0d2a89545d33122" + sha256 sonoma: "89ec7a8767b4ec0897e424efc895c0044a7ec3b974842d5cbc3dc803106db4b5" + sha256 ventura: "a7c5848a84b7e0596504c0b234da47f7dfe9580c3bda227256b35698026207b5" + sha256 arm64_linux: "5334731b4f819cb37340c235ae68d1e1e5deecb367d16c9be82b7f0131fd7839" + sha256 x86_64_linux: "f327f534822726a13ab7d912a3873f915f71c24c701f54675b42077d24212d48" + 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..25936b3818b75 --- /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/v7.1.1/zeek-7.1.1.tar.gz" + sha256 "f7974900c44c322b8bee5f502d683b3dcc478687b5ac75b23e2f8a049457d683" + license "BSD-3-Clause" + head "https://github.com/zeek/zeek.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + sha256 arm64_sequoia: "4b2e266a93ebc3c7131d44d8724af6a74d6aba4b2b18a1e62cd1ed434f4a048f" + sha256 arm64_sonoma: "d19e2a76e79b428d9141b1caeac4a1e3ed732b2ac7e067b63a1db42223b3e5a6" + sha256 arm64_ventura: "64d0138e17fd90e5f51fb5934b97d3ae1258869daba8984fecd95fdd0ab52c3b" + sha256 sonoma: "797f81b1ca21b4802625f07bf95ddaf3c85f6ecad9c8fe1585923b705fe92906" + sha256 ventura: "e7971b49366270d6af883976d4317036a1589b92d77571e060cdbd3240f8d16c" + sha256 arm64_linux: "5de10769a5d91741ec62578c5434c5576f52e17480a1c03421dfd539088dfc26" + sha256 x86_64_linux: "6b0791439a441817d22c7dd617ac01e7fa76930d09591efd888496a3bea267bb" + 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 macos: :mojave + depends_on "openssl@3" + depends_on "python@3.13" + + 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.13")}", + "-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..81a79d70721b4 --- /dev/null +++ b/Formula/z/zelda-roth-se.rb @@ -0,0 +1,49 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "b0451d1eb512280f9dcb2c6057188cbe02e9b2c71fbf337ac463a4e284ba1987" + sha256 cellar: :any_skip_relocation, high_sierra: "dcf7800dd6c2e8798abb867733a79acda20e3ce7745b7d489eeac3050a7bf829" + 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..e0b3a657f0d09 --- /dev/null +++ b/Formula/z/zellij.rb @@ -0,0 +1,38 @@ +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.42.2.tar.gz" + sha256 "f1cd4b36775dd367b839e394b54e91042b0cd0f2b9e0901b1dec8517ff3929c0" + license "MIT" + head "https://github.com/zellij-org/zellij.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "d6d6723fdc5f786f2a6fc97ffff21e273cd939dee49830fc0e9f3bd644a68cd9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "19da49780d4ab34349ae6641178e229a7a6660f38fb240dc1d751e0ec6055b41" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cc749a1d8c484f18371c74a90d3825b1f53f9bca69e720cb8e06c403b236fda0" + sha256 cellar: :any_skip_relocation, sonoma: "28e648b3ca2243a6aacfd6ae0d02aec5f4f66dc0504005dc51f5af1a79f08ba6" + sha256 cellar: :any_skip_relocation, ventura: "54d007762dc1c2b9651aff9813639d8a11e92615b8a26be7dc40dc7433400bac" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee15261c12d5733822abb5517f2f647a71668312b700e1795327f7aa487d8aa2" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d652caa249158b93d8fb1120161808b537639f5a14733c72c4af68c6ac456115" + 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..e750eee5ac8da --- /dev/null +++ b/Formula/z/zenith.rb @@ -0,0 +1,51 @@ +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_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..dc508e0e20ed9 --- /dev/null +++ b/Formula/z/zenity.rb @@ -0,0 +1,52 @@ +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.0/zenity-4.0.5.tar.xz" + sha256 "8a3ffe7751bed497a758229ece07be9114ad4e46a066abae4e5f31d6da4c0e9e" + license "LGPL-2.1-or-later" + + bottle do + sha256 arm64_sequoia: "e3959aa7b0410e54ec42687ce2a267f325127e4df4d481443c8698c7b953597f" + sha256 arm64_sonoma: "06acbffe1ce25cdb54a3714c6070ffdd0ef0001ad7df3368a5b5a42a746ba676" + sha256 arm64_ventura: "11d64f18431ced3cfb4f78931fedc625e0466482232ef3f56694c01b8fdd1642" + sha256 sonoma: "33696f8b90ab2a67e2c60b8bc7d0b721898d83dff290435bc00f8ca6752a2b51" + sha256 ventura: "19762a7234eeed23c97d15ab8e6fdc9c87e1685f08140711b71208c1d4ccc113" + sha256 arm64_linux: "138458db0aa0ad29953535b8ca9d5695851002c335c70bca7e3694d9b7ee2db7" + sha256 x86_64_linux: "f9aa253c650051ee899f78c3bd4c616677e9e14945f893c408c73c5258b8f1b0" + 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..6caf8b5060b27 --- /dev/null +++ b/Formula/z/zero-install.rb @@ -0,0 +1,72 @@ +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 + + bottle do + 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", "--no-setup", "--disable-sandboxing" + system "opam", "exec", "--", "opam", "install", *packages, "--deps-only", "-y", "--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..65da0b88b8fac --- /dev/null +++ b/Formula/z/zeromq.rb @@ -0,0 +1,75 @@ +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 1 + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "8898ce6776591ad282627fd7215f02ade8f5c5ec3d4dd457ce25aba12c3c1c18" + sha256 cellar: :any, arm64_sonoma: "3bf8942ece99f0457125006cf729f24823e09a3f6bd2257e8be9873e5783a0a1" + sha256 cellar: :any, arm64_ventura: "0f670cd22b752c640a01f1f3353f8cdf7a6bf31beefad511c17baf315ad848f4" + sha256 cellar: :any, arm64_monterey: "3a8bc264cb466f765f65f73b0db3c202899656efa11b2df37bd961a224589e20" + sha256 cellar: :any, sonoma: "986910eab9519ca92f167b545cde5992124a963b56d1346f2f917368e9a7eb43" + sha256 cellar: :any, ventura: "25344444cf8c0583f65b1f36fdf11edc40ce2fe637fa04e34fe28c730573dadc" + sha256 cellar: :any, monterey: "c8c1cafdffdc020cf504bc59888d61a016df6cdfc12650d89a43a846edb77ef2" + sha256 cellar: :any_skip_relocation, arm64_linux: "1bec0b28dfb3b515f6095d00e4fdb0b4ec458e02b4fbecac8a53a0c18cf7ea01" + sha256 cellar: :any_skip_relocation, x86_64_linux: "904b3146ea9aab3b4fdb584c74be1fa762145d3435eef653becc38ce0600c1bc" + 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 + # Work around "error: no member named 'signbit' in the global namespace" + if OS.mac? && MacOS.version == :high_sierra + ENV.delete("HOMEBREW_SDKROOT") + ENV.delete("SDKROOT") + end + + 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", *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..692b81cc49fd7 --- /dev/null +++ b/Formula/z/zet.rb @@ -0,0 +1,34 @@ +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_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 + + 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..9a82572b62ecb --- /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.2.tar.gz" + sha256 "b8e41f942c7033536fd64f9edea467a7ff4f45d52885d585f0adafb7803ac0ed" + license "MIT" + head "https://github.com/natecraddock/zf.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ca18e30ed084337c77376f0af8b97d3f10bc3ccb20660f7d74c15644fbcae1e7" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7b45f360b6662b147c5adc50425ef87afac800c9aa2bdeab1f2f395614ab34b9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "63025c662d67807c0f75b4df08c26b5af01c2e602d5438e2a08289b7ce8bb350" + sha256 cellar: :any_skip_relocation, sonoma: "468b27e2ac00706f31f56fb7ca8fe5aebd31ffa282aae0b21eb8ec487a77561b" + sha256 cellar: :any_skip_relocation, ventura: "d9c75c28e02b4c7cede59bcb1137c62cfd34801b9a06d11855f96f0080829756" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a9bfaef19e583a5409511f21a9853c0c37d5ea0067782cce94a92ea791200c4b" + 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..96c7d3bd120f3 --- /dev/null +++ b/Formula/z/zfind.rb @@ -0,0 +1,31 @@ +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.6.tar.gz" + sha256 "cdd17b981e20eab9d8daa59883c37e4be22e95af0e72d273ab5f45ce683f106a" + license "MIT" + head "https://github.com/laktak/zfind.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "e1cf9f46226b201e7410a6ebc03f5441e71a8f229b684498afff2f7ad50a39b5" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "e1cf9f46226b201e7410a6ebc03f5441e71a8f229b684498afff2f7ad50a39b5" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e1cf9f46226b201e7410a6ebc03f5441e71a8f229b684498afff2f7ad50a39b5" + sha256 cellar: :any_skip_relocation, sonoma: "86b76cc1e99b774107a095bb1cdac248eea06407d6c2efc13fcab461678fb076" + sha256 cellar: :any_skip_relocation, ventura: "86b76cc1e99b774107a095bb1cdac248eea06407d6c2efc13fcab461678fb076" + sha256 cellar: :any_skip_relocation, x86_64_linux: "37ddf89957ee7412d9e7bc9a3b71d0403fc615d4a972b71332faa6e059fddce0" + 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..a46f1994ce702 --- /dev/null +++ b/Formula/z/zig.rb @@ -0,0 +1,160 @@ +class Zig < Formula + desc "Programming language designed for robustness, optimality, and clarity" + homepage "https://ziglang.org/" + url "https://ziglang.org/download/0.14.0/zig-0.14.0.tar.xz" + sha256 "c76638c03eb204c4432ae092f6fa07c208567e110fbd4d862d131a7332584046" + license "MIT" + revision 2 + + livecheck do + url "https://ziglang.org/download/" + regex(/href=.*?zig[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "1d93ca443ee4c104e52050f662d67cce83ef90359d3af0002aacfa5c6147cb6b" + sha256 cellar: :any, arm64_sonoma: "6c478a26658e289eb7bd6a8c258f8594c505c4fd4252d4e5ab714d3d784d23b7" + sha256 cellar: :any, arm64_ventura: "ddc4ff42466317700fe5f8dfef706360c74af312be9fdfa33d3f5f177aad3aa9" + sha256 cellar: :any, sonoma: "1098717b274fb85082e1321f27b2577695e4c1a244bea6adb7725dfe3d21729a" + sha256 cellar: :any, ventura: "b80b9097427d531a0e926bdb885beafff09a4a71132e5f0cda160660b2bd3e73" + sha256 cellar: :any_skip_relocation, arm64_linux: "d0527803175f3ffe9f5cf9eeba79e6e339f972c13704b4db6ebae12b01bdd7fc" + sha256 cellar: :any_skip_relocation, x86_64_linux: "73e30b0d64e6df8d6584b78d6e41110e06f05108988d5f2db49469dcb55614e3" + end + + depends_on "cmake" => :build + depends_on "lld@19" + depends_on "llvm@19" + 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 + + # 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 + 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 { + 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..729ed16f53883 --- /dev/null +++ b/Formula/z/zigmod.rb @@ -0,0 +1,72 @@ +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/r94.tar.gz" + sha256 "139e990afccff7ab33b864ea479dad1217c293355583c8ad864571f77764b7a2" + license "MIT" + + livecheck do + url :stable + regex(/^r(\d+)$/i) + end + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "b5bfae8b75eb13ff8c0d4e2b0595ecae4c6d32ad969d098612919f5dcfda257d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "22ecae4483dd909ac23fbb018e7c10da835f21c415627674e4999f3306c8452f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e84ecb51e81353a55855dcb6c8411572fa05730c8a70a7bb57411ffc9a33d5ec" + sha256 cellar: :any_skip_relocation, sonoma: "51afc652ad9869c5fa57c388cc9c9e970444db44c476992bf5e15b23e22a43ac" + sha256 cellar: :any_skip_relocation, ventura: "91066de4ef3b96479f7b19328b2ff76ffd3c8275a97d41c4e299a5983f1c1607" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4986c6e8b71077323fb1879e29c69245330811be31240a8b12bc4926f9b81a1b" + end + + depends_on "pkgconf" => :build + 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 Hardware.oldest_cpu + when :arm_vortex_tempest then "apple_m1" # See `zig targets`. + 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..d5e61d68957f9 --- /dev/null +++ b/Formula/z/zigup.rb @@ -0,0 +1,40 @@ +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_04_20.tar.gz" + sha256 "3fabc75f05c7a80a9a19f7d79f3529c208db6303ffd1b3b0328e070fc6703654" + license "MIT-0" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "8fbbb4b50999dc78dca0c38195270ccb205272e8d24a47aa342faadf4caa758a" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "fa86de4771e1e9b782f74c005c404d1b41eb423b894f52fb0317e67b05bf30e7" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b8f8dd7eefb7342b1def1656f3c6380abb91b8b4e1f469118a58a43a1b837aee" + sha256 cellar: :any_skip_relocation, sonoma: "8edbdf7b144575c359e1ba382cd17aa67427d370be0a62a56b6f993cec99dada" + sha256 cellar: :any_skip_relocation, ventura: "ce938b80961b25a3fd6833330bccebdf013ccd82986caae1542e13c6c2d3c79f" + sha256 cellar: :any_skip_relocation, x86_64_linux: "96cd73a58e60d4f12db26151a139a00c81fd10166905c0bf2f5e065211b8ae0b" + 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 Hardware.oldest_cpu + when :arm_vortex_tempest then "apple_m1" # See `zig targets`. + 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..a6aeeb6a35b3e --- /dev/null +++ b/Formula/z/zile.rb @@ -0,0 +1,47 @@ +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://ftp.gnu.org/gnu/zile/zile-2.6.4.tar.gz" + mirror "https://ftpmirror.gnu.org/zile/zile-2.6.4.tar.gz" + sha256 "d5d44b85cb490643d0707e1a2186f3a32998c2f6eabaa9481479b65caeee57c0" + license "GPL-3.0-or-later" + version_scheme 1 + + bottle do + 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..06ce21cd7d14b --- /dev/null +++ b/Formula/z/zim.rb @@ -0,0 +1,77 @@ +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: "master" + + bottle do + sha256 cellar: :any_skip_relocation, all: "250465206054db1296275f1bbc741d4e54c0dafa79745d9abc80468934529247" + end + + depends_on "pkgconf" => :build + depends_on "adwaita-icon-theme" + depends_on "graphviz" + depends_on "gtk+3" + depends_on "gtksourceview4" + depends_on "pygobject3" + depends_on "python@3.13" + + resource "pyxdg" do + url "https://files.pythonhosted.org/packages/b0/25/7998cd2dec731acbd438fbf91bc619603fc5188de0a9a17699a781840452/pyxdg-0.28.tar.gz" + sha256 "3267bb3074e934df202af2ee0868575484108581e6f3cb006af1da35395e88b4" + end + + resource "setuptools" do + url "https://files.pythonhosted.org/packages/a9/5a/0db4da3bc908df06e5efae42b44e75c81dd52716e10192ff36d0c1c8e379/setuptools-78.1.0.tar.gz" + sha256 "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" + end + + def python3 + "python3.13" + end + + def install + build_venv = virtualenv_create(buildpath/"venv", python3) + build_venv.pip_install resource("setuptools") + ENV.prepend_create_path "PYTHONPATH", build_venv.site_packages + + venv = virtualenv_create(libexec, python3) + venv.pip_install resources.reject { |r| r.name == "setuptools" } + venv.pip_install buildpath, build_isolation: false + (bin/"zim").write_env_script libexec/"bin/zim", + XDG_DATA_DIRS: [HOMEBREW_PREFIX/"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", HOMEBREW_PREFIX + 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..4b8b7ab734ff5 --- /dev/null +++ b/Formula/z/zimfw.rb @@ -0,0 +1,33 @@ +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" + + 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..6d177b5057377 --- /dev/null +++ b/Formula/z/zimg.rb @@ -0,0 +1,49 @@ +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.5.tar.gz" + sha256 "a9a0226bf85e0d83c41a8ebe4e3e690e1348682f6a2a7838f1b8cbff1b799bcf" + license "WTFPL" + head "https://github.com/sekrit-twc/zimg.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "16b38c35a093542456e5c026cb464df27ebe509eb857696cbfbb6146708e5cd1" + sha256 cellar: :any, arm64_sonoma: "1a08f06a0a7fc2a23266a03e8afd63759f99f3a0041d1503fafc5ce9410df8dc" + sha256 cellar: :any, arm64_ventura: "cc82dc203d39c81808f2afacf64b5b5048859de941fff9e8caea599b8db83a3f" + sha256 cellar: :any, arm64_monterey: "2bbd044c345af191083c75e1e67b48f31ded8bc4869e19de25d6bd19d3a214ed" + sha256 cellar: :any, arm64_big_sur: "10507ec0d32970c00e04b4e76714ea452d22f315fdd116af5d56c3d81a7e1f39" + sha256 cellar: :any, sonoma: "a52f302fda0d8447d6972db9649504ffafe1d06e5de4c23b1ca6315c4b6d17fd" + sha256 cellar: :any, ventura: "31d345c4d6927d6a5f5e1d04b8d78a53db597309c24d301bd0963afcc0702c35" + sha256 cellar: :any, monterey: "5a8049c1c8fa6e09f79dda6e18ec22909da4b4b567e7f52d4e6338f7ac6dfa64" + sha256 cellar: :any, big_sur: "5cabd4f2485ba7bb49feecac4584afaa7f05e097cb3935d7e9ea8a06336b4bcf" + sha256 cellar: :any_skip_relocation, arm64_linux: "04bb46c6db6937d885699986d894f4ac44fea72827b9a51199e0b05e700cd8e5" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a33e194d2d9132c9c35d9cb9affc078e77e26a6c8c11fd5b015c6f28914c52fe" + 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..d936efb886f65 --- /dev/null +++ b/Formula/z/zinit.rb @@ -0,0 +1,36 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "804a9d5dcb76db825078745d20af231ff45870f86f0d5564688067de7294c2a9" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "804a9d5dcb76db825078745d20af231ff45870f86f0d5564688067de7294c2a9" + sha256 cellar: :any_skip_relocation, arm64_ventura: "804a9d5dcb76db825078745d20af231ff45870f86f0d5564688067de7294c2a9" + sha256 cellar: :any_skip_relocation, sonoma: "df0bb7bf2ab57d6fb71f1e1f1732bc1854cb513b4e2052987d69e395975824d8" + sha256 cellar: :any_skip_relocation, ventura: "df0bb7bf2ab57d6fb71f1e1f1732bc1854cb513b4e2052987d69e395975824d8" + sha256 cellar: :any_skip_relocation, arm64_linux: "804a9d5dcb76db825078745d20af231ff45870f86f0d5564688067de7294c2a9" + sha256 cellar: :any_skip_relocation, x86_64_linux: "804a9d5dcb76db825078745d20af231ff45870f86f0d5564688067de7294c2a9" + 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..6b910563cba8d --- /dev/null +++ b/Formula/z/zint.rb @@ -0,0 +1,63 @@ +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_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..68bebc55396c8 --- /dev/null +++ b/Formula/z/zip.rb @@ -0,0 +1,82 @@ +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" + + livecheck do + url :stable + regex(%r{url=.*?/v?(\d+(?:\.\d+)+)/zip\d+\.(?:t|zip)}i) + end + + bottle do + rebuild 2 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "525f3c06d55dd30c2c67b44f28070a53c258328b669ce3a36b8d12fb5d533750" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "99265457598a09b6312520471980b7b8429ebfef5be40d3e00a0980544ff12c2" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7dcf7b9f3dd27efa70508ea258ccaa218e7c87fd9412b9ff15ac5814e3f3555d" + sha256 cellar: :any_skip_relocation, arm64_monterey: "eccd9c527ca597b460197f731bf726623475b239c9372267d8c667d8ac1b68e1" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9bed17ac27c80c0553f32c572561660637547075e0c566f95805e2088e5945fb" + sha256 cellar: :any_skip_relocation, sonoma: "db28293ae6aeac6f23a4d85f45358f3a618aa84c9934f1521e573a8461b8e52a" + sha256 cellar: :any_skip_relocation, ventura: "c35430007c35207c868add1c123dfa2833c31fcbdaff59c2af8b56ab0a284519" + sha256 cellar: :any_skip_relocation, monterey: "cf5690223dfcc1683280d1692d3f41339981d9b4eacf68f3dedf9cd2cbc68ec1" + sha256 cellar: :any_skip_relocation, big_sur: "fac1760831eeaab6595e56b31f38d2c768de2e7c214a6f646a61ef16429a4b91" + sha256 cellar: :any_skip_relocation, catalina: "36f8c3138ed2e1110de5dc4c9ffd3616572ee1e4ec1ea63a3925f6c45e889e0d" + sha256 cellar: :any_skip_relocation, mojave: "16f22ea28d2c69d40772820c3e94c0a8510e6f05da4221ffd30b99b47fea5d7c" + sha256 cellar: :any_skip_relocation, arm64_linux: "05abc07c9a205463418ad94534a9f36f1065555ef3dcf7494be5d77cb9bbd194" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce503e630831ea12bb87e28c2668a185cb12a94680f4f42b791b6e4a19af2e87" + 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 + patch do + url "https://deb.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 + + # Fix compile with newer Clang + # Otherwise configure thinks memset() and others are missing + patch do + url "https://raw.githubusercontent.com/Homebrew/formula-patches/d2b59930/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..562e58942b6d5 --- /dev/null +++ b/Formula/z/zita-convolver.rb @@ -0,0 +1,51 @@ +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 + + bottle do + 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, mojave: "e9bfda6d2d3119f93ea0d570b9b3516d44513c3eafc206543f8fb055707db8fd" + sha256 cellar: :any, high_sierra: "b8b3326ead45ef0e126488d9c96a181f15888a11b707278c61c2ceeee312b37d" + 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..5ea212e0adc89 --- /dev/null +++ b/Formula/z/zix.rb @@ -0,0 +1,81 @@ +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_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..6a1cf17d676b3 --- /dev/null +++ b/Formula/z/zizmor.rb @@ -0,0 +1,43 @@ +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.7.0.tar.gz" + sha256 "9564db26f6e134a8f23f6d92c48a25c7cf457fed5de5ac76643cd45abf098129" + license "MIT" + head "https://github.com/zizmorcore/zizmor.git", branch: "main" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "fe997f8811e7eed3e1435a75557269e5ae510b047dfc169a641555a699ad2dc6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "89921f02ba68bac05eaff29c8c1f7cb3a707f9b89710b25b51dfaa1b4755f86b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c43af3dd890eb1782e27aeeb772cf589f724529b4199c879d598360a7bbb5c44" + sha256 cellar: :any_skip_relocation, sonoma: "29dfae0331e97244575914cabd1858f30d7f5b17d18fa36524fbff4e0287a5a4" + sha256 cellar: :any_skip_relocation, ventura: "b8c53542d2d4c4c99c370c4e313013afec187bc3394cdf9e443858c52575325f" + sha256 cellar: :any_skip_relocation, arm64_linux: "bcce1f98efb0beaafd24de5f3aa74a6d2d5dd8d2d563d4589d5df0959194aebd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "f32ca3503f3465cad4d5fe6fab6905e10753b9c41b16887350b3d3cc69020821" + end + + depends_on "pkgconf" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + + 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..40f01ed7ff98f --- /dev/null +++ b/Formula/z/zk.rb @@ -0,0 +1,47 @@ +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: "main" + + livecheck do + url :stable + strategy :github_latest + end + + bottle do + 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..bde9c43b010b2 --- /dev/null +++ b/Formula/z/zlib-ng-compat.rb @@ -0,0 +1,52 @@ +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.4.tar.gz" + sha256 "a73343c3093e5cdc50d9377997c3815b878fd110bf6511c2c7759f2afb90f5a3" + license "Zlib" + head "https://github.com/zlib-ng/zlib-ng.git", branch: "develop" + + livecheck do + formula "zlib-ng" + end + + bottle do + sha256 cellar: :any, arm64_sequoia: "e2d7639b525b2b29a92177ba00e7f9dd20d7d686cb70bfeb7a4ed188b3c8facd" + sha256 cellar: :any, arm64_sonoma: "c5349d5f9559feff1607c65e71522907e1ce5f0c7c7409ff6b0ee02142f3de9f" + sha256 cellar: :any, arm64_ventura: "b83317e0a1ca1730f74a02edf766237627d3799fad25e17274b1bd3b944ab7be" + sha256 cellar: :any, sonoma: "e290f3ee57dfd952c5a901b12a1939d4acf3f49778ab975fbf884390be21ef81" + sha256 cellar: :any, ventura: "1951f082859a44e33e0ae0d86d60ff9e3800654945e3c75aec0ce67da58277d6" + sha256 cellar: :any_skip_relocation, arm64_linux: "28f720023d21a91e58098f474093e58aeb81cf8c7c643bd28f2eb2510c3427b6" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c3f0416dc6d54348eddc7a621f3ec918069915ff9ec503a8ab88c3b9c677695b" + end + + keg_only :shadowed_by_macos, "macOS provides zlib" + + on_linux do + keg_only "it conflicts with zlib" + end + + # https://zlib.net/zlib_how.html + resource "homebrew-test_artifact" do + url "https://zlib.net/zpipe.c" + version "20051211" + sha256 "68140a82582ede938159630bca0fb13a93b4bf1cb2e85b08943c26242cf8f3a6" + end + + def install + ENV.runtime_cpu_detection + # Disabling new strategies based on Fedora comment on keeping compatibility with zlib + # Ref: https://src.fedoraproject.org/rpms/zlib-ng/blob/rawhide/f/zlib-ng.spec#_120 + system "./configure", "--prefix=#{prefix}", "--without-new-strategies", "--zlib-compat" + system "make", "install" + end + + test do + 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..8c792f338fa3c --- /dev/null +++ b/Formula/z/zlib-ng.rb @@ -0,0 +1,57 @@ +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.4.tar.gz" + sha256 "a73343c3093e5cdc50d9377997c3815b878fd110bf6511c2c7759f2afb90f5a3" + 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 + sha256 cellar: :any, arm64_sequoia: "172d222f67bb93065376bb88e1d8beaa3ffd3eb9902f1884c552483b58a04a50" + sha256 cellar: :any, arm64_sonoma: "f2306b42db96fa4ccbcfca1fe91b17fc1a90fb238c6493b1a92fa3dbba8bd972" + sha256 cellar: :any, arm64_ventura: "209912594fd67b36271207675293682db9dec087434b3a1bd0856cec80718eea" + sha256 cellar: :any, sonoma: "fe0c7f653c0643174b97538d312383681a16c73ba02c01d20067277988b0015b" + sha256 cellar: :any, ventura: "ca3d91daa5ab604935fea3632a76db372128ebeebd93939a95af3982e066c29b" + sha256 cellar: :any_skip_relocation, arm64_linux: "3fce3abce4b3344c6d1c3d7385d64c0199b0b78a0e977972fcf7daea99d3405e" + sha256 cellar: :any_skip_relocation, x86_64_linux: "067fda36b99d5dac97f99524fc362b5980ec06022037f1945377709b43f3c1b8" + end + + # https://zlib.net/zlib_how.html + resource "homebrew-test_artifact" do + url "https://zlib.net/zpipe.c" + sha256 "68140a82582ede938159630bca0fb13a93b4bf1cb2e85b08943c26242cf8f3a6" + end + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + # 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..0eeda27930097 --- /dev/null +++ b/Formula/z/zlib-rs.rb @@ -0,0 +1,49 @@ +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.0.tar.gz" + sha256 "a5ef58c30220173b44c1304a9e367ec8fd6ac03c6c93ca41fc24b4837754ed1a" + license "Zlib" + head "https://github.com/trifectatechfoundation/zlib-rs.git", branch: "main" + + bottle do + sha256 cellar: :any, arm64_sequoia: "14055c1717edc6ed5c02400fb796ec92358e860e89769fbe3cffbe535370e9e2" + sha256 cellar: :any, arm64_sonoma: "e22c071ad8235312de8088a945cd8d4fd3e70d817e8a37b56f20446e1f2bd913" + sha256 cellar: :any, arm64_ventura: "26806a408c5db4382b74e235832d67df54cfbc196c295b4d3d3360e468ba3160" + sha256 cellar: :any, sonoma: "8e009873fd7b806d61ee3adbf21b28a9c4c6f8922b00a4f15011496061bac822" + sha256 cellar: :any, ventura: "845797bf7b2fc8f47cfc8fb6367b763145879706c17dbaf47bd1e8a682dfa3ec" + sha256 cellar: :any_skip_relocation, arm64_linux: "ce7248f219ceaf414ad7fa7510dccb82ed4e24d39a30beec24a15517db57a27c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "a3eaaf5a413bc07ac46e88f40551f0f8ff40a88461526e0fa04587541607319b" + 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 "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..12f5559161571 --- /dev/null +++ b/Formula/z/zlib.rb @@ -0,0 +1,55 @@ +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_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..12171b57c7a1c --- /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.6.tar.gz" + sha256 "ca1155915d68772566d8be4c4061129b15eb7055ea9aaa939cc92d3966ba10f6" + license "Apache-2.0" + head "https://github.com/zmap/zlint.git", branch: "master" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "3edaff6afb2185ddc9e3a25da2ae19e88e386f010a57ea13c8cbdd4976cb4ac8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3edaff6afb2185ddc9e3a25da2ae19e88e386f010a57ea13c8cbdd4976cb4ac8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "3edaff6afb2185ddc9e3a25da2ae19e88e386f010a57ea13c8cbdd4976cb4ac8" + sha256 cellar: :any_skip_relocation, sonoma: "812f893df4a2cce77a54df0cf2d536c7193bb88399379d3d5354415760bb6394" + sha256 cellar: :any_skip_relocation, ventura: "812f893df4a2cce77a54df0cf2d536c7193bb88399379d3d5354415760bb6394" + sha256 cellar: :any_skip_relocation, x86_64_linux: "558268e135da92e62fc493c7a2a46a7fb93f1c7d499d310c96939d2cd18d8d24" + 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..b6cf3549cfde3 --- /dev/null +++ b/Formula/z/zlog.rb @@ -0,0 +1,61 @@ +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_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..8aa0f7cce0f2d --- /dev/null +++ b/Formula/z/zls.rb @@ -0,0 +1,62 @@ +class Zls < Formula + desc "Language Server for Zig" + homepage "https://zigtools.org/zls/" + url "https://github.com/zigtools/zls/archive/refs/tags/0.14.0.tar.gz" + sha256 "44cae74073b2f75cf627755398afadafaa382cccf7555b5b66b147dcaa6cef0d" + license "MIT" + head "https://github.com/zigtools/zls.git", branch: "master" + + bottle do + sha256 arm64_sequoia: "7c368a129e8f7f77847510de90e109b6c01e35901f065327551bdda25c9bacc4" + sha256 arm64_sonoma: "660c0950e552712568b2a14230e6d866cd6f16c48cfc4fb4b9bbd8d4b4708979" + sha256 arm64_ventura: "8f9f6f64f69751589f4e9c746f1bd8c07d1364dc104bd68654f32cb5641b0856" + sha256 sonoma: "5fbe4882be0c8049da4fe626e6a0dd1adf6cda6d6f561c92765c0454d9967cfb" + sha256 ventura: "667924a98f0b4de9cbb5df7bf8f14da4b26cecd53c0dd4dcbf746a85274375e8" + sha256 arm64_linux: "5cfedf309286303cdb7070ea8693607a4fa12737dc1685721ff717a25e7a0df2" + sha256 x86_64_linux: "b99285236749312380349bc72d1c109a9108c439ecb4381c228a95b469608c07" + 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..0e4c0034136a0 --- /dev/null +++ b/Formula/z/zmap.rb @@ -0,0 +1,55 @@ +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_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..f3f3073fead36 --- /dev/null +++ b/Formula/z/zmqpp.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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, mojave: "dd783ca2b0f191c1a78c60f2c13489fef5d743c8720ed26d5cda6bd8bea32ce9" + sha256 cellar: :any, high_sierra: "02c8a7e0124d22e2c9fde2349179d9340e17203ad252ed9fd56fd6c9ea71a24c" + sha256 cellar: :any, sierra: "a1843b77cb53950bcf0b29589071025a48d86f0ecb4420280f7fcff7420f1905" + sha256 cellar: :any, el_capitan: "58f0301f03f30b314cb31dbbbc9a82163930b5b00a7285e3d279f49c0e1a25d1" + 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..0a27885ccad63 --- /dev/null +++ b/Formula/z/znapzend.rb @@ -0,0 +1,73 @@ +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 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2a9e6930ad18a76b4bf38a65dccf94f805adb88442ac6515980b936f5214836d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "894fb42d2fab9740dc12eb446afc08a6884aeff713dfedc7bb4f36758ecbc541" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d8381b64efa6aceba6574825aa1f3088fd32ffbccc0b2ebda001b6a30e8d1931" + sha256 cellar: :any_skip_relocation, arm64_monterey: "e827d72e828c64112d249b8e138b12ab69545d3125b4a548e0b850440054d543" + sha256 cellar: :any_skip_relocation, sonoma: "d1a7026501925fc170e5968391f773f994cf9b0698277e7ca7b3a9c1eedd9da5" + sha256 cellar: :any_skip_relocation, ventura: "39cbe0e4c321ffec7a04efca7b964ce7a5b3ed3565d5d1684cda645e321eea8e" + sha256 cellar: :any_skip_relocation, monterey: "2fc87dc230cf7f66d84062ed1d5ffa1abe5cdb463998834edc0a717825b55a7b" + sha256 cellar: :any_skip_relocation, arm64_linux: "fe929b8fdeac2ec5ca6feb97cc113dd160e5bd745e23ef62b8e40d0cacd4f6f4" + sha256 cellar: :any_skip_relocation, x86_64_linux: "51c313e2b172e1a50338a811d4d344ff9259cd9e973b9890d7819a4bd846f352" + end + + uses_from_macos "perl", since: :big_sur + + 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 + + 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..5eb7b1f82594e --- /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.9.1.tar.gz" + sha256 "e8a7cf80e19aad510b4e282eaf61b56bc30df88ea2e0f64fadcdd303c4894f3c" + license "Apache-2.0" + revision 5 + + livecheck do + url "https://znc.in/releases/" + regex(/href=.*?znc[._-]v?(\d+(?:\.\d+)+)\.t/i) + end + + bottle do + sha256 arm64_sequoia: "0861238c72cd5397e1568a741f8ac0339b00e573e3b799ffb223d665fb3b5e12" + sha256 arm64_sonoma: "2465789ae2561cf508f38ca0867f67188fce03bc5548ec5a01e4858de66d9884" + sha256 arm64_ventura: "65b535ea5a67a4861e94c69b0caad4c082a8798ba68684fe62b9565d762fef23" + sha256 sonoma: "a6d475310180f77f8ffcc744a0c37f3165c4b1fa995a1f40d1d24ad3a44acf73" + sha256 ventura: "33da8af5b2f1dfed9dcc1948da42671ed4ccd73c2fd5dfc717ce09d9e408f978" + sha256 arm64_linux: "f9b89d45801edeb21325f98eb1ec5c49363cd5649aaa8dbf0e27b55c061faea9" + sha256 x86_64_linux: "bdd3624bb4903a647648c3f9efa1f2c1d5e383d9f29024771fe3a6eb1395d4d5" + 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.13" + + uses_from_macos "zlib" + + def install + rm_r(["third_party/cctz", "third_party/googletest"]) + + python3 = "python3.13" + 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..c6ed38f33642e --- /dev/null +++ b/Formula/z/zns.rb @@ -0,0 +1,32 @@ +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.3.0.tar.gz" + sha256 "5e7b4cf641429fa153df24d2088744ed5d09ec9d77151c828611262f85feaa15" + license "MIT" + head "https://github.com/znscli/zns.git", branch: "main" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "6b44e23dcd5f00ee7363edded2f65a8cff2e348a89af0ed97c267278625e285d" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6b44e23dcd5f00ee7363edded2f65a8cff2e348a89af0ed97c267278625e285d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "6b44e23dcd5f00ee7363edded2f65a8cff2e348a89af0ed97c267278625e285d" + sha256 cellar: :any_skip_relocation, sonoma: "9fbfa115c982914deef04f605327e1c320967d436718a3d2c0389156713ece26" + sha256 cellar: :any_skip_relocation, ventura: "9fbfa115c982914deef04f605327e1c320967d436718a3d2c0389156713ece26" + sha256 cellar: :any_skip_relocation, x86_64_linux: "18f3eb0b09363071f64391d43668b0437106910ec44340a3afd00dc27116bd92" + 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..05a6cbb5557a1 --- /dev/null +++ b/Formula/z/zola.rb @@ -0,0 +1,52 @@ +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.20.0.tar.gz" + sha256 "ed0274b4139e5ebae1bfac045a635d952e50dc238fdc39cb730b032167f8bb4a" + license "MIT" + + bottle do + sha256 cellar: :any, arm64_sequoia: "b0602145729f6ad78e1f7a4be7eafda94f105af40fea8c199ca45f51d092b4a9" + sha256 cellar: :any, arm64_sonoma: "7397bf10428065a5040d42fe0d5b3939ea3f5cf129d682847b5e4bc3f789367f" + sha256 cellar: :any, arm64_ventura: "df9ccd75dc1889c7aed9f7ba990ab73478764d7b8e848762ceb109e212738f45" + sha256 cellar: :any, sonoma: "4026f1af866280ebdc03a0ff0d58875b66ceaa6c0983d01e9826b94af5b54586" + sha256 cellar: :any, ventura: "0e82e5262375333fd60e053a3765d89a2af8f2ff714b02aadd07e6121077fad3" + sha256 cellar: :any_skip_relocation, arm64_linux: "d1b22c7054e144b538a896eb7a93ee75c3b795741b8dff69e8162baac1c317bd" + sha256 cellar: :any_skip_relocation, x86_64_linux: "29df2af104972ca53f558d0a48405057165fced8fb4ad167a5b73378c439d271" + 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..06a9b23d611a6 --- /dev/null +++ b/Formula/z/zookeeper.rb @@ -0,0 +1,106 @@ +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.3/apache-zookeeper-3.9.3.tar.gz" + mirror "https://archive.apache.org/dist/zookeeper/zookeeper-3.9.3/apache-zookeeper-3.9.3.tar.gz" + sha256 "8bf0b9f872b3c0a6e64f8bc55ffb44cbff6e2712f6467ee5164ca6847466b31b" + license "Apache-2.0" + head "https://gitbox.apache.org/repos/asf/zookeeper.git", branch: "master" + + bottle do + sha256 cellar: :any, arm64_sequoia: "55cdbe85faf89339c7388d17582a1c611acf856dbc61b09386f53a4f94e2250d" + sha256 cellar: :any, arm64_sonoma: "877ea34a0512cef5350a11523bffa1ac380306a1bcdfc444a4b09417e56e4b96" + sha256 cellar: :any, arm64_ventura: "b32a242b6462efee1aeba8315f944328b89b0f027d345c4b19dbb42c7d8e3210" + sha256 cellar: :any, sonoma: "43493f6555c4c8028c1f46957092b5b9ee99a1a2beae025d23571bff79a6cf5a" + sha256 cellar: :any, ventura: "aca1f280391c77002a8822e6fc1c8434c5680144d7f536aeae5ff17efd52ff00" + sha256 cellar: :any_skip_relocation, arm64_linux: "ee962da0c8fe93454015f1365681d05d2bb19b2869ee12e9d1b473c988871976" + sha256 cellar: :any_skip_relocation, x86_64_linux: "44c4a13aefe7898e15aa63cb9dd001c673ad8e520128e6816599a6b50f97acb8" + 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" + + resource "default_logback_xml" do + url "https://raw.githubusercontent.com/apache/zookeeper/release-3.9.3/conf/logback.xml" + sha256 "2fae7f51e4f92e8e3536e5f9ac193cb0f4237d194b982bb00b5c8644389c901f" + end + + def default_zk_env + <<~EOS + [ -z "$ZOOCFGDIR" ] && export ZOOCFGDIR="#{etc}/zookeeper" + EOS + end + + def install + if build.stable? && version != resource("default_logback_xml").version + odie "default_logback_xml resource needs to be updated" + end + + 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/*"] + + 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 <<~EOS + #!/bin/bash + export JAVA_HOME="${JAVA_HOME:-#{Formula["openjdk"].opt_prefix}}" + . "#{etc}/zookeeper/defaults" + exec "#{libexec}/bin/#{script_name}" "$@" + EOS + end + + cp "conf/zoo_sample.cfg", "conf/zoo.cfg" + inreplace "conf/zoo.cfg", + /^dataDir=.*/, "dataDir=#{var}/run/zookeeper/data" + (etc/"zookeeper").install "conf/zoo.cfg" + + (pkgshare/"examples").install "conf/logback.xml", "conf/zoo_sample.cfg" + end + + def post_install + tmpdir = Pathname.new(Dir.mktmpdir) + tmpdir.install resource("default_logback_xml") + + defaults = etc/"zookeeper/defaults" + defaults.write(default_zk_env) unless defaults.exist? + + logback_xml = etc/"zookeeper/logback.xml" + logback_xml.write(tmpdir/"default_logback_xml") unless logback_xml.exist? + 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: #{etc}/zookeeper/zoo.cfg", output + end +end diff --git a/Formula/z/zopfli.rb b/Formula/z/zopfli.rb new file mode 100644 index 0000000000000..8f938fb2f7ce2 --- /dev/null +++ b/Formula/z/zopfli.rb @@ -0,0 +1,38 @@ +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" + + bottle do + 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 + + 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 + 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..bce2047b7e987 --- /dev/null +++ b/Formula/z/zorba.rb @@ -0,0 +1,53 @@ +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" + + conflicts_with "xqilla", because: "both supply `xqc.h`" + + # 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..c72e2754c684b --- /dev/null +++ b/Formula/z/zork.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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 mojave: "2c5a5b9e024a752e705b85c4420baf74aa27c5ed1088afbf043efadc7307aed3" + 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..171c2fca24704 --- /dev/null +++ b/Formula/z/zoro.rb @@ -0,0 +1,50 @@ +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_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, 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..14f2dfa50ef62 --- /dev/null +++ b/Formula/z/zoxide.rb @@ -0,0 +1,32 @@ +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.7.tar.gz" + sha256 "d93ab17a01de68529ef37b599524f882dc654835cc121a9097dd3f2952fd207e" + license "MIT" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "dbc879ca84d59e01915fa207e20e98d936441aeed8b9147bf2689119d187700e" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c654b9d6b2f165b320441a9d5f1b037706862bebda869d0e955ab2da7737358b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c34e507546f4c8de1d20a6cd324a02aa8596eb89b1ced7dfb308801b98f02f6f" + sha256 cellar: :any_skip_relocation, sonoma: "476964a629f3eaf86206fbb0c7019bb6d03da65fcded1a04872062470e567464" + sha256 cellar: :any_skip_relocation, ventura: "192e2ca56f343ab47ffa5a8375c8982fc4b617c22b8a5c141e258fc994c3d05b" + sha256 cellar: :any_skip_relocation, arm64_linux: "6b0e4294f535cdb98853835ba16a21d8d1faa2ecdf9c8393581c8fe0d515f669" + sha256 cellar: :any_skip_relocation, x86_64_linux: "b0f32731a4d1ff94848fd9b1f497381a515a44430af3e99ccf1e59ed11fe1619" + 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..a7215417d71f0 --- /dev/null +++ b/Formula/z/zpaq.rb @@ -0,0 +1,45 @@ +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" + + bottle do + 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, mojave: "6b9d7285117ab09ac91605b8d1b2b2d7b4c05874156968a398273a3d29254cc3" + 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..0dc95ca7d6ed8 --- /dev/null +++ b/Formula/z/zpaqfranz.rb @@ -0,0 +1,43 @@ +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/62.2.tar.gz" + sha256 "12cad71439987af886639be576d936d97c097f505caa4d5ebd5e454ff844610b" + 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_sequoia: "4cc7c2e2717ff9f2a9422ca3a6382fec60ad4f043aa27995f9ee175020868afd" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d9d0ec317388236b384f8e6deedb6962bcaf4f0c7008188189d22ea6d617d60d" + sha256 cellar: :any_skip_relocation, arm64_ventura: "e90d2132aeda6d6200a3d20ee50b1bf76ee92ec72b80b7d8d78010516181ef6d" + sha256 cellar: :any_skip_relocation, sonoma: "3719cbb4ddc90f8847a427391a1c81d219be3ba98d34246390196c0b2cc4a548" + sha256 cellar: :any_skip_relocation, ventura: "ebc35c7365a0e8c5099f378efc0ebad074f7ac3224018a017efe230e0266e6ad" + sha256 cellar: :any_skip_relocation, arm64_linux: "96b0ad86e6b4e4ace13d7ccd029bcab8c4d138c58b2ba1e69523ee203e387264" + sha256 cellar: :any_skip_relocation, x86_64_linux: "eaced67567513be07a50c5ba4d6b22fd336652991fd9b1e4134e295fff5f26f5" + 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..c19abf27abd1b --- /dev/null +++ b/Formula/z/zplug.rb @@ -0,0 +1,35 @@ +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" + + 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..770b5918c57ac --- /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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "467d9021d507942a4f74a1c64983a1a216e3215110b67ca591101a1350a93928" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb2b36b880afd2cf11fc4bbb7e2f544f40287e180bdd06c47da63be1c9bb2970" + sha256 cellar: :any_skip_relocation, arm64_ventura: "aedcf0ebb00175cef1e063bddb652c1d291c5c388a90878ec95719cd5ed93a04" + sha256 cellar: :any_skip_relocation, arm64_monterey: "3c301f823c74d52657a946000964f3b4a3089a0a914deb6cf68f69d150ee057c" + sha256 cellar: :any_skip_relocation, sonoma: "b96ec21a1745a2b7eac7265f8db9e342c6ec01ddc2c7e3a9b7d7c24f2cbe0687" + sha256 cellar: :any_skip_relocation, ventura: "d09931af39605cdf1215017138bda34463802609db9c72cf61a22d9918b323c4" + sha256 cellar: :any_skip_relocation, monterey: "80344778b7d3a7007e38e86e066541a53796b318673eba51d869095e49935a3c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "67d6e26dd731da07445fa18d19f25c41c5ca41e48d9c829f92e1f7f487143fd2" + 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}") + end + + def post_install + (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..b24e69c01977c --- /dev/null +++ b/Formula/z/zrok.rb @@ -0,0 +1,59 @@ +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.0.4/source-v1.0.4.tar.gz" + sha256 "995d5213b85683732360c9bb7633c8a467e80bc9e4b6b3265bbf4507525acbb9" + # 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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "facbea9b67d3253b62a0d26fbae4fd8b34b4bfe475629ae422e52171838047c1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "14e23d6ba9863c6e1b43a4112e82ef49df8add2011335ad6f114a7f7a0e7d745" + sha256 cellar: :any_skip_relocation, arm64_ventura: "250a931684772109107a0e0163758edd50c1fd59d41a9812ee3e3a0b4b896379" + sha256 cellar: :any_skip_relocation, sonoma: "ca927933798ac8dbf906990ea3a9bd5eeaf70f37c39bfa91fd6334527afc68a0" + sha256 cellar: :any_skip_relocation, ventura: "ab95e0bbb2198ba4b3b1d2fe46a96cee70dc9eb9cfe8e1db2f737780fdc982bf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ce187843ffa80bf491a5223bfe9d05fe5f73a3adfa735e85b14e68f745e80d93" + 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 + + 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..1a512bb252bc4 --- /dev/null +++ b/Formula/z/zsdx.rb @@ -0,0 +1,44 @@ +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" + + bottle do + 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, mojave: "332fd78f55b41f593403d76839cd51befb586f34036c89a43446c3f39a240d3b" + 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..7460ae18c3046 --- /dev/null +++ b/Formula/z/zsh-async.rb @@ -0,0 +1,51 @@ +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" + + 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..e9e60dd3b5ce3 --- /dev/null +++ b/Formula/z/zsh-autopair.rb @@ -0,0 +1,33 @@ +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" + + 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..918263f45f84e --- /dev/null +++ b/Formula/z/zsh-completions.rb @@ -0,0 +1,66 @@ +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" + + 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} $fpath) + autoload _ack + which _ack + SHELL + + assert_match(/^_ack/, 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..576d4edec02c4 --- /dev/null +++ b/Formula/z/zsh-f-sy-h.rb @@ -0,0 +1,36 @@ +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" + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "219d0141922740e742d765b4e55a3b6331cd0deaab671c07a19a085b04e2f7ef" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "219d0141922740e742d765b4e55a3b6331cd0deaab671c07a19a085b04e2f7ef" + sha256 cellar: :any_skip_relocation, arm64_ventura: "219d0141922740e742d765b4e55a3b6331cd0deaab671c07a19a085b04e2f7ef" + sha256 cellar: :any_skip_relocation, sonoma: "cd302983d8a9fc3a2764b8e1b1936c8b2d261193650ba5d3efa1bac506291a3b" + sha256 cellar: :any_skip_relocation, ventura: "cd302983d8a9fc3a2764b8e1b1936c8b2d261193650ba5d3efa1bac506291a3b" + sha256 cellar: :any_skip_relocation, arm64_linux: "219d0141922740e742d765b4e55a3b6331cd0deaab671c07a19a085b04e2f7ef" + sha256 cellar: :any_skip_relocation, x86_64_linux: "219d0141922740e742d765b4e55a3b6331cd0deaab671c07a19a085b04e2f7ef" + 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..336d0f3d355e4 --- /dev/null +++ b/Formula/z/zsh-fast-syntax-highlighting.rb @@ -0,0 +1,42 @@ +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.55.tar.gz" + sha256 "d06cea9c047ce46ad09ffd01a8489a849fc65b8b6310bd08f8bcec9d6f81a898" + license "BSD-3-Clause" + head "https://github.com/zdharma-continuum/fast-syntax-highlighting.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b63cd29b30d65b5f15e12a53ecf2b8f78b8eae1e0a32ac5761d88933cb00ad8" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "2b63cd29b30d65b5f15e12a53ecf2b8f78b8eae1e0a32ac5761d88933cb00ad8" + sha256 cellar: :any_skip_relocation, arm64_ventura: "2b63cd29b30d65b5f15e12a53ecf2b8f78b8eae1e0a32ac5761d88933cb00ad8" + sha256 cellar: :any_skip_relocation, sonoma: "5b0435113e89b05900636a678cb33a9e0d44382a005da60cc072ec944a613d2e" + sha256 cellar: :any_skip_relocation, ventura: "5b0435113e89b05900636a678cb33a9e0d44382a005da60cc072ec944a613d2e" + sha256 cellar: :any_skip_relocation, arm64_linux: "2b63cd29b30d65b5f15e12a53ecf2b8f78b8eae1e0a32ac5761d88933cb00ad8" + sha256 cellar: :any_skip_relocation, x86_64_linux: "2b63cd29b30d65b5f15e12a53ecf2b8f78b8eae1e0a32ac5761d88933cb00ad8" + end + + uses_from_macos "zsh" => [:build, :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 #{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/zsh-git-prompt.rb b/Formula/z/zsh-git-prompt.rb similarity index 81% rename from Formula/zsh-git-prompt.rb rename to Formula/z/zsh-git-prompt.rb index a805d5ff216cc..e999a393fc76c 100644 --- a/Formula/zsh-git-prompt.rb +++ b/Formula/z/zsh-git-prompt.rb @@ -1,11 +1,13 @@ 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" + url "https://github.com/olivierverdier/zsh-git-prompt/archive/refs/tags/v0.5.tar.gz" sha256 "87e5a908369f402e975426ffd61a8800f1c04c0a293f1d4015a6fb1f4408e77d" license "MIT" - bottle :unneeded + bottle do + sha256 cellar: :any_skip_relocation, all: "d4fa3836434d56704bd03f88f3e45557cac6e12cb6e17cc251635ecdcbc431eb" + end def install prefix.install Dir["*.{sh,py}"] diff --git a/Formula/z/zsh-history-substring-search.rb b/Formula/z/zsh-history-substring-search.rb new file mode 100644 index 0000000000000..016722b06089b --- /dev/null +++ b/Formula/z/zsh-history-substring-search.rb @@ -0,0 +1,34 @@ +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" + + 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..b4fa6f2996271 --- /dev/null +++ b/Formula/z/zsh-navigation-tools.rb @@ -0,0 +1,37 @@ +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"] + + 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..f97cf746fccf0 --- /dev/null +++ b/Formula/z/zsh-syntax-highlighting.rb @@ -0,0 +1,38 @@ +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" + + 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..c43122d77cc0d --- /dev/null +++ b/Formula/z/zsh-system-clipboard.rb @@ -0,0 +1,39 @@ +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" + + 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..e9aa3c00f2f3c --- /dev/null +++ b/Formula/z/zsh-vi-mode.rb @@ -0,0 +1,32 @@ +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.11.0.tar.gz" + sha256 "03e1b5f0eef89afa834416bd2751584093b929506e11867fbabf9a7f9e57452a" + license "MIT" + head "https://github.com/jeffreytse/zsh-vi-mode.git", branch: "master" + + bottle do + rebuild 1 + sha256 cellar: :any_skip_relocation, all: "cc8533232ab1bd33f01149924620063a71a744fa912c29b18241ab4211b57c8b" + 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..7e9c637ea6456 --- /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.9.0.tar.gz" + sha256 "6ca0128883ab73d3782f70a6b16c95ed033c2497c3e27d5db0a68c90d8fde4a2" + license "GPL-3.0-only" + + bottle do + sha256 cellar: :any_skip_relocation, all: "24301ab13546031f58afb2c005dc2cab1f17ebac641b3a11f90712037ef06bb9" + 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..c1d60fbd0a5ff --- /dev/null +++ b/Formula/z/zsh.rb @@ -0,0 +1,111 @@ +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 + + bottle do + rebuild 3 + 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..7c6a1cc05ec30 --- /dev/null +++ b/Formula/z/zssh.rb @@ -0,0 +1,59 @@ +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 + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ef79ef8cbe611003a77f4b5e4728dbce1e2916ea6aa1d34054d495d6b35d043c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b16fd704253185960f793a025ef7fe510186de420f653602946319d94893b302" + sha256 cellar: :any_skip_relocation, arm64_ventura: "c89cb5197c40525efecccb42fb351668392d9c425742450896e4ecdc46b59587" + sha256 cellar: :any_skip_relocation, arm64_monterey: "4450134a2610b41d037efaf910d6ccdf2cc6d836887b877337f91bf73d49f44c" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "9b567d08589f3ba595994ca4906bfde9fe2651ef246bbd872f332e9cc8993a60" + sha256 cellar: :any_skip_relocation, sonoma: "03cb8f6eea5ed39cc82de6d173e5eff34986fa1821a28e52db61d0c70abb1df1" + sha256 cellar: :any_skip_relocation, ventura: "3168f9fb757fefc2c5ab7a5382a6fac4e489963324f9d57da667596769882713" + sha256 cellar: :any_skip_relocation, monterey: "9387acd7dec913faa9917b3d27baaff250a412ecd509eba625543d188c6922a9" + sha256 cellar: :any_skip_relocation, big_sur: "54bb3ff51405eda0900361c829fad63f988c21e685645fe5c8076c456567bd0b" + sha256 cellar: :any_skip_relocation, catalina: "6b9bce24c13dd2e979cdae57892e1b595bfcbd1d342bb81419dda378b8439495" + sha256 cellar: :any_skip_relocation, mojave: "0b1567c1d4aef681ff463f058a884eead039fb0c50a1c03820a03c9f67786b52" + sha256 cellar: :any_skip_relocation, high_sierra: "9cb26f1bd359977406fae945abd311b2cdc5770570e6350f2ac278bfbe458f5b" + sha256 cellar: :any_skip_relocation, sierra: "49e01bb86097999f21f3d96b0f9cd63a975d4fd52f6e286d42ceee16ee996eb7" + sha256 cellar: :any_skip_relocation, el_capitan: "04212f19c1d9a6b97fd56ffe937606f1779849fdf04b93e3f285889599845c8f" + sha256 cellar: :any_skip_relocation, arm64_linux: "4cd6fe33f62e215d3a06ad134b2081f627d4be3ff13bb734484019fb948f59da" + sha256 cellar: :any_skip_relocation, x86_64_linux: "fb3265fd04dd6210c8706f04435d145e0941a50793aaccf7e1660b2956c1872c" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "lrzsz" + + on_linux do + depends_on "readline" + end + + 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" + + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *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..1e75d370a7061 --- /dev/null +++ b/Formula/z/zstd.rb @@ -0,0 +1,73 @@ +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 + sha256 cellar: :any, arm64_sequoia: "b039c851ef22617804576274872c33727ebb3a0b5e0db2ab62e0d8a97ec9605a" + sha256 cellar: :any, arm64_sonoma: "af7a39452f08144cb27f8f9c31feafd46beca7eb4dd3047c49925800e00c6e7a" + sha256 cellar: :any, arm64_ventura: "56faac95df2a57e866c23339db384c5b3fe7d58984314c1a0bba2823123e0972" + sha256 cellar: :any, sequoia: "bcfccd14315dedf3291f77682702f80711fb8829bd14a53431d60204eb99ec32" + sha256 cellar: :any, sonoma: "fa320bd56f0b839438336ae22fa6f404522e53f8297d72de04355f5483324499" + sha256 cellar: :any, ventura: "a109e4645ddd9a1f091f082b525b5ef5032d3568c016c3ec657f63068c068cc4" + sha256 cellar: :any_skip_relocation, arm64_linux: "c37f70b21f32017d893b751f9d3d1f7b10e7b742b35a1d7c7c1d357a35e14cb0" + sha256 cellar: :any_skip_relocation, x86_64_linux: "4748929efb3666f0fd60451479cb306991c75fc6a84253e81828354185f4a23b" + 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", + "-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/zsxd.rb b/Formula/z/zsxd.rb new file mode 100644 index 0000000000000..acc4bf639ff56 --- /dev/null +++ b/Formula/z/zsxd.rb @@ -0,0 +1,46 @@ +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" + + bottle do + rebuild 1 + 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, mojave: "8b6e336bd61f16c620ab8323ccd15dfc35cf1665c71799a838c4436fefd561b0" + sha256 cellar: :any_skip_relocation, high_sierra: "fa0726547d624647bd7453100b6e2221ce0ec9174e0cd43275844b09aefb6c0d" + 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..6ea14c06c09ba --- /dev/null +++ b/Formula/z/zsync.rb @@ -0,0 +1,53 @@ +class Zsync < Formula + desc "File transfer program" + # `zsync.moria.org.uk` is no longer accessible, use internet archive urls instead + homepage "https://web.archive.org/web/20241223233525/http://zsync.moria.org.uk/" + url "https://web.archive.org/web/20241223233525/http://zsync.moria.org.uk/download/zsync-0.6.2.tar.bz2" + sha256 "0b9d53433387aa4f04634a6c63a5efa8203070f2298af72a705f9be3dda65af2" + license all_of: [ + "Artistic-2.0", + "Zlib", # zlib/ + :public_domain, # librcksum/md4.c, libzsync/sha1.c, zlib/inflate.c + ] + + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "242e3632a7cacc43f4b909c69bea7ae3c850921189867c6f6980523fea4f0364" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "eae952647fec12661f80edba535420196912e3fce0c3e3272e8584993a53df39" + sha256 cellar: :any_skip_relocation, arm64_ventura: "9c26ab39f23b57f14fcb5407541cc6785209d09c4408d516069d8fe8694f5e01" + sha256 cellar: :any_skip_relocation, arm64_monterey: "5d9c561ebe0167e590847ed7993ff01e098eed20ba1ab158ffc3fc6a1295d220" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "0ee85fb722fa125e4323e14732d4de448f3751e9445e2ec6933fce0ee38d5a90" + sha256 cellar: :any_skip_relocation, sonoma: "bfc06781074730ece1a3b314758c91d798ea5cdfea550515df3d4588e58e8524" + sha256 cellar: :any_skip_relocation, ventura: "aa55a9ccdc3c06c605580b6820afd107819cf970a59f96beed53e7988f73e8fc" + sha256 cellar: :any_skip_relocation, monterey: "257f153c9f34b33cfcbcb08aeaab17a7bdf5c5a0538edf96c1a9a6f8074dd212" + sha256 cellar: :any_skip_relocation, big_sur: "1be9e390c02555dbce349a76e0beb63231bc327f4326580b18679ff0307db446" + sha256 cellar: :any_skip_relocation, catalina: "333d4b2be5c1b6621bf7e7ac87199da1c5ec24a3cdb408c97ed733b6fafb89a1" + sha256 cellar: :any_skip_relocation, mojave: "9fa9f958c45a87c1a4e9b2ccdc95e732bb8ab248843ec3f0554e5b412d7f1ae5" + sha256 cellar: :any_skip_relocation, high_sierra: "b766bfc58f753376213e234d8e0e4238af1be39f77f239370583464040758fd6" + sha256 cellar: :any_skip_relocation, sierra: "8d6e7eade289c62689e752151021e7bccac7900a5e7217e8885f2c38aec42c2c" + sha256 cellar: :any_skip_relocation, el_capitan: "9bbe0e102ca6a2b7ca57af6b2b29984f7da59ce97d15ce550bbbb206f1ad1815" + sha256 cellar: :any_skip_relocation, arm64_linux: "5f5cceeb3fb7c8ee118d8a79621144a9e39a3d4f9c804f5c2181f6c193966c44" + sha256 cellar: :any_skip_relocation, x86_64_linux: "1961843c2195ae143b2f2ece7e26f91aa4c5a0acc67721441c221b5ae3404150" + end + + # `zsync.moria.org.uk` is no longer accessible + deprecate! date: "2025-01-12", because: :repo_removed + + 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 + 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/zug.rb b/Formula/z/zug.rb new file mode 100644 index 0000000000000..432b440bcbc70 --- /dev/null +++ b/Formula/z/zug.rb @@ -0,0 +1,40 @@ +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" + + 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..0bd94fde88ac8 --- /dev/null +++ b/Formula/z/zurl.rb @@ -0,0 +1,139 @@ +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/ + ] + + bottle do + rebuild 2 + sha256 cellar: :any, arm64_sonoma: "caac867d6cd84464d1432597b7f87521ad5d971e12aded4455068d0e227c7d6b" + sha256 cellar: :any, arm64_ventura: "db24a1c2b45dacb21bc6d983c7cc243e3a4c66e405e92ea1e1b755c920adf647" + sha256 cellar: :any, sonoma: "3c269fb6fafc531fb6738e3e5b8f21085526b3278068bddd1f606342f5d14bb2" + sha256 cellar: :any, ventura: "e97837c8f2141e8ff0dfe985fca0b6924a894b9a0fcc023a4808491eb67b3503" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e03115779822a91ea2c4547dae103f6538beeab596a56251aad671519c1becd8" + 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.13" => :test + depends_on "qt" + depends_on "zeromq" + + uses_from_macos "curl" + + on_linux do + depends_on "openssl@3" + end + + def install + args = ["--qtselect=#{Formula["qt"].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/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" + sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" + 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/fd/05/bed626b9f7bb2322cdbbf7b4bd8f54b1b617b0d2ab2d3547d6e39428a48e/pyzmq-26.2.0.tar.gz" + sha256 "070672c258581c8e4f640b5159297580a9974b026043bd4ab0470be9ed324f1f" + 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/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz" + sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" + end + + python3 = "python3.13" + + 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..a0aec808c94ad --- /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.5.4.tgz" + sha256 "be31333e3a149071fa4d199f61dce64a66b40c40f6d11a5e183cab6cc4ca4900" + license "Apache-2.0" + + bottle do + sha256 cellar: :any_skip_relocation, all: "0108d87b11cedda3ec3ea5aef2e359fb4f40f717d109f195d61bf51475522bfb" + 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..90bb727da7d83 --- /dev/null +++ b/Formula/z/zxcc.rb @@ -0,0 +1,58 @@ +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 + + bottle do + 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 mojave: "3d0cb9741bb9f9ab8f8f6db1452c2c052814b5aa3b37971607e91c5ba40bd9ae" + sha256 high_sierra: "0b6a6d166b5b4822b46d8a53b0a2b850619882d9d13080ecdad8b0ae492a5cc0" + sha256 sierra: "79aa0631d52d2d69ae554319db0027ffd59f2baa3d1c35473925f72a5c1965e3" + sha256 el_capitan: "11bd1697b8a6b5a3a77ce417d35ad7e1da9e6df18a36ebccfa18a47ce470d3cb" + 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..5df48050dda66 --- /dev/null +++ b/Formula/z/zydis.rb @@ -0,0 +1,33 @@ +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_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..668ceb32cdff0 --- /dev/null +++ b/Formula/z/zyre.rb @@ -0,0 +1,71 @@ +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/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" + sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" + end + end + + bottle do + 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, mojave: "bea4248272a0c99db13a9f8c48cbbbdd1c9927b9b206689ad3b558eadef102b1" + 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..1f38f4a103b70 --- /dev/null +++ b/Formula/z/zzuf.rb @@ -0,0 +1,51 @@ +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" + + bottle do + 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 mojave: "43c9049f2ff8d13a585009b43923579c087e0797a8d0258fc891be14f3ce6ce9" + sha256 high_sierra: "f13b52915de3bf08ed663b02df0f8b4d8f78d3a623c523a4d5f3c085ae6bafcf" + sha256 sierra: "9f1b2bfb909739bc5dec2e56b520313e30df3384e8a249b575d3664ac6a636be" + sha256 el_capitan: "5f0c55658fba6bbf225b6001b5be75c38f7a375322bd4b23944f3c7239dae0c7" + 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..22674d72a8c23 --- /dev/null +++ b/Formula/z/zzz.rb @@ -0,0 +1,43 @@ +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 + + bottle do + 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" + sha256 cellar: :any_skip_relocation, mojave: "46716ef74ec052c11d497b5192b9829d1341ebbce783c04be344a85bb9dd5a96" + 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 bbe2b1665ecb5..0000000000000 --- a/Formula/z3.rb +++ /dev/null @@ -1,44 +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.8.tar.gz" - sha256 "6962facdcdea287c5eeb1583debe33ee23043144d0e5308344e6a8ee4503bcff" - head "https://github.com/Z3Prover/z3.git" - - bottle do - cellar :any - sha256 "06f1a289d9f846c31fd171ebcad05442eb03473b6aaf4bf1cbb1ca7c6e77d612" => :catalina - sha256 "3ac5deca9acb17a0a228766d6353048001747543ddcca607871cadaa6c736bbf" => :mojave - sha256 "e8c20ad5ef814ae9e8700f0e8f79590a11d46e8077be7204a9517a5a0af663a9" => :high_sierra - end - - # Has Python bindings but are supplementary to the main library - # which does not need Python. - depends_on "python@3.8" => :build - - def install - python3 = Formula["python@3.8"].opt_bin/"python3" - 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 - - system "make", "-C", "contrib/qprofdiff" - bin.install "contrib/qprofdiff/qprofdiff" - - 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 a261f6050c735..0000000000000 --- a/Formula/z80asm.rb +++ /dev/null @@ -1,33 +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 "0e7b29aa5927fcf70d1f704cdc4d0b73477c39d2f624fff4264ab08a6675959d" => :catalina - 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 ebc7194864ab8..0000000000000 --- a/Formula/z80dasm.rb +++ /dev/null @@ -1,27 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "f743b105a40263316f44b6d0437ea71c1ac35d8e2d5887090b9b1c4b8ca45e15" => :catalina - 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-cli.rb b/Formula/zabbix-cli.rb deleted file mode 100644 index 5465982db1512..0000000000000 --- a/Formula/zabbix-cli.rb +++ /dev/null @@ -1,67 +0,0 @@ -class ZabbixCli < Formula - include Language::Python::Virtualenv - - desc "CLI tool for interacting with Zabbix monitoring system" - homepage "https://github.com/unioslo/zabbix-cli/" - url "https://github.com/unioslo/zabbix-cli/archive/2.2.1.tar.gz" - sha256 "884ecd2a4a4c7f68a080bb7e0936dd208c813284ec3ed60b948ce90a1be7c828" - license "GPL-3.0" - head "https://github.com/unioslo/zabbix-cli.git" - - bottle do - cellar :any_skip_relocation - sha256 "3ce4d420b9ddaf208d8cdc5c1b22358ac39f1cd4e6473bb2765bbedb5eb82c9d" => :catalina - sha256 "b663824f576794bc31d1d55ebcce1d2352cc1c3675d0c75f957d7f410e8ca766" => :mojave - sha256 "6158e91d1699b5117714310bdf8850e185eb9b358c70d3a89a6d0fefd7856482" => :high_sierra - end - - depends_on "python@3.8" - - ## direct dependencies - - resource "docutils" do - url "https://files.pythonhosted.org/packages/93/22/953e071b589b0b1fee420ab06a0d15e5aa0c7470eb9966d60393ce58ad61/docutils-0.15.2.tar.gz" - sha256 "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" - end - - resource "requests" do - url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" - sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" - end - - ## indirect dependencies - - resource "certifi" do - url "https://files.pythonhosted.org/packages/41/bf/9d214a5af07debc6acf7f3f257265618f1db242a3f8e49a9b516f24523a6/certifi-2019.11.28.tar.gz" - sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" - 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/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" - sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" - end - - resource "urllib3" do - url "https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz" - sha256 "87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc" - end - - def install - # script tries to install config directly to /usr/local/bin - inreplace "setup.py", "/usr/local/bin", share - - virtualenv_install_with_resources - end - - test do - system bin/"zabbix-cli-init", "-z", "https://homebrew-test.example.com/" - config = testpath/".zabbix-cli/zabbix-cli.conf" - assert_predicate config, :exist? - assert_match "homebrew-test.example.com", File.read(config) - end -end diff --git a/Formula/zabbix.rb b/Formula/zabbix.rb deleted file mode 100644 index 94e719572ab68..0000000000000 --- a/Formula/zabbix.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Zabbix < Formula - desc "Availability and monitoring solution" - homepage "https://www.zabbix.com/" - url "https://cdn.zabbix.com/zabbix/sources/stable/5.0/zabbix-5.0.1.tar.gz" - sha256 "20a19e5cf2354ffcbbe24521b04becfc9875e57289c00da71999de60c4a853b6" - license "GPL-2.0" - - bottle do - sha256 "2ac9eaa79b953244dda80543660b22150d7c6e9ce444386e5448f63cf76df412" => :catalina - sha256 "0c52ff483bc2081662b76f0e0c5cfc10b933780a149bc14c29869ee3ea74f424" => :mojave - sha256 "b336bc2a9533f0d54e2c6277cd3cd9de3577596049aa44bfbb4ba2791d3bfa9c" => :high_sierra - end - - depends_on "openssl@1.1" - depends_on "pcre" - - 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@1.1"].opt_prefix} - ] - - if MacOS.version == :el_capitan && MacOS::Xcode.version >= "8.0" - inreplace "configure", "clock_gettime(CLOCK_REALTIME, &tp);", - "undefinedgibberish(CLOCK_REALTIME, &tp);" - end - - system "./configure", *args - system "make", "install" - 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 9f8ea224c0ac2..0000000000000 --- a/Formula/zbackup.rb +++ /dev/null @@ -1,59 +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 14 - - bottle do - cellar :any - sha256 "faad049e7738a4eeefd904de33d4fb430a6e743d1da3aa5ff5dcf0f1a901256e" => :catalina - sha256 "cfacb7cce0ef145c0cb0d4668a11bd745ee84bdff0e5fed181093401f785332f" => :mojave - sha256 "04983e28ea73a359a248e685e9fb8395ea89af5cd71ebfde3d5fd45963e45639" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "lzo" - depends_on "openssl@1.1" - 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 - - 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 62bf800352a18..0000000000000 --- a/Formula/zbar.rb +++ /dev/null @@ -1,95 +0,0 @@ -class Zbar < Formula - desc "Suite of barcodes-reading tools" - homepage "https://zbar.sourceforge.io/" - revision 10 - - 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 "c67f6e8064b2c29e707529c211d90499452391ab05739da4774d922f643dd1a3" => :catalina - sha256 "17da6d6bbc5072ee46a84b3fed3259afcdc96eabb50988363aa1c13d6437ec4d" => :mojave - sha256 "fdba8cdcefcf962f2da1d475bd6556d3bdc3b0f644e3684a0a46efb1dd778fe2" => :high_sierra - 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" - - 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 - --without-x - ] - - 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 d6c06eace7da3..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.71/zboy-0.71.tar.xz" - sha256 "d359b87e3149418fbe1599247c9ca71e870d213b64a912616ffc6e77d1dff506" - license "GPL-3.0" - head "https://svn.code.sf.net/p/zboy/code/trunk" - - bottle do - cellar :any - sha256 "9e143e9227bc22e48d66f7e9f3239374d4d22edc4d0867ffe50f8f60180d27db" => :catalina - sha256 "8e8a1a05aef5dbfde8ab113ef4e2da14bcf440a7bdb7a001a4913e60b90c23b0" => :mojave - sha256 "52b7fa6f933809f05ba692036e78233bb0da2947b5cfc8d1a85ab37037f0cac9" => :high_sierra - 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/zdelta.rb b/Formula/zdelta.rb deleted file mode 100644 index 73b42725bd6cb..0000000000000 --- a/Formula/zdelta.rb +++ /dev/null @@ -1,33 +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 "c7d235578c62851ad7639ced736eb94ce833e9afb172fe65a37869bac1a80da4" => :catalina - 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" - 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 a135f3e67b8dc..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 4 - - bottle do - sha256 "06034a1fa44ffa343907b961799909eb32556f300129109c05771ad9cc5ef82d" => :catalina - sha256 "33810ebcbd8ce8a0b3e972a98a9be0a000d064122fc41b58ce748479fb286275" => :mojave - sha256 "d8c190c482b012b20ad5b2f14fd7c5d59ac4a50aaa75b126871efff83b2999a1" => :high_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/zeek.rb b/Formula/zeek.rb deleted file mode 100644 index 665d255456b77..0000000000000 --- a/Formula/zeek.rb +++ /dev/null @@ -1,46 +0,0 @@ -class Zeek < Formula - desc "Network security monitor" - homepage "https://www.zeek.org/" - url "https://github.com/zeek/zeek.git", - :tag => "v3.1.4", - :revision => "6747d93745a00d24a376d4633280a47a60961e10" - head "https://github.com/zeek/zeek.git" - - bottle do - sha256 "8a3b5c9927ba7bf5ed5b092125dd171c89f53980bb7f95486fbcec47310bbc0d" => :catalina - sha256 "3010d37df0093d43d2c069ea88a36c874a21bb92bc280bdb771c49a9940701bf" => :mojave - sha256 "8c0a404464b81149411480bb3fd99127080545239c6a2a8758b822e244f2c0bc" => :high_sierra - end - - depends_on "bison" => :build - depends_on "cmake" => :build - depends_on "swig" => :build - depends_on "caf" - depends_on "geoip" - depends_on :macos # Due to Python 2 (https://github.com/zeek/zeek/issues/706) - depends_on "openssl@1.1" - - uses_from_macos "flex" - uses_from_macos "libpcap" - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DDISABLE_PYTHON_BINDINGS=on", - "-DBROKER_DISABLE_TESTS=on", - "-DBUILD_SHARED_LIBS=on", - "-DINSTALL_AUX_TOOLS=on", - "-DINSTALL_ZEEKCTL=on", - "-DCAF_ROOT_DIR=#{Formula["caf"].opt_prefix}", - "-DOPENSSL_ROOT_DIR=#{Formula["openssl@1.1"].opt_prefix}", - "-DZEEK_ETC_INSTALL_DIR=#{etc}", - "-DZEEK_LOCAL_STATE_DIR=#{var}" - system "make", "install" - end - end - - test do - assert_match "version #{version}", shell_output("#{bin}/zeek --version") - assert_match "ARP Parsing", shell_output("#{bin}/zeek --print-plugins") - end -end diff --git a/Formula/zelda-roth-se.rb b/Formula/zelda-roth-se.rb deleted file mode 100644 index e1579a9424ec8..0000000000000 --- a/Formula/zelda-roth-se.rb +++ /dev/null @@ -1,28 +0,0 @@ -class ZeldaRothSe < Formula - desc "Zelda Return of the Hylian SE" - homepage "https://www.solarus-games.org/en/games/the-legend-of-zelda-return-of-the-hylian-se" - url "https://gitlab.com/solarus-games/zelda-roth-se/-/archive/v1.2.1/zelda-roth-se-v1.2.1.tar.bz2" - sha256 "1cff44fe97eab1327a0c0d11107ca10ea983a652c4780487f00f2660a6ab23c0" - head "https://gitlab.com/solarus-games/zelda-roth-se.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "1531cd6fc89cca4cc08287e569cdd8b86e41a52bb8c66fb10f6a74bb5006bc24" => :catalina - sha256 "b0451d1eb512280f9dcb2c6057188cbe02e9b2c71fbf337ac463a4e284ba1987" => :mojave - sha256 "dcf7800dd6c2e8798abb867733a79acda20e3ce7745b7d489eeac3050a7bf829" => :high_sierra - 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/zenith.rb b/Formula/zenith.rb deleted file mode 100644 index f8d8041f6a60c..0000000000000 --- a/Formula/zenith.rb +++ /dev/null @@ -1,36 +0,0 @@ -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/0.10.0.tar.gz" - sha256 "a232951928b813447fa89562c97fdbb87ac57f97c7633e1e20d7ebc8fa126505" - license "MIT" - head "https://github.com/bvaisvil/zenith.git" - - bottle do - cellar :any_skip_relocation - sha256 "6bbe3db614e24831a888b82ebd52ab7f51f00320ee1d0372d8f19c042d8b0505" => :catalina - sha256 "764dc52d56fa24ff051e66f29a60f11be8e2e229592448662192f604e91f9d5e" => :mojave - sha256 "5850d5fe7b4ffebb904ea367a3f8d8361b48361e3e0dc9635304baddfebbe0db" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - require "pty" - - begin - (testpath/"zenith").mkdir - cmd = "#{bin}/zenith --db zenith" - output, input, pid = PTY.spawn "stty rows 80 cols 43 && #{cmd}" - sleep 1 - input.write "q" - assert_match /PID\s+USER\s+P\s+N\s+↓CPU%\s+MEM%/, output.read - ensure - Process.kill("TERM", pid) - end - end -end diff --git a/Formula/zenity.rb b/Formula/zenity.rb deleted file mode 100644 index cfcd4cabcfd14..0000000000000 --- a/Formula/zenity.rb +++ /dev/null @@ -1,28 +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.32/zenity-3.32.0.tar.xz" - sha256 "e786e733569c97372c3ef1776e71be7e7599ebe87e11e8ad67dcc2e63a82cd95" - revision 1 - - bottle do - sha256 "6bbf833a5a7d71346a5391fae436c2c46f530f0f5b9ac5d57330601b3456db49" => :catalina - sha256 "cef54fcd5601eb5dd3b563d1a09a6cd83654a2fa46e4a83a3d3c6e6a356fe29a" => :mojave - sha256 "36cf68d4838890e8d9122109464548a4630da0b06dcf6d4f0976ccf58b99dde2" => :high_sierra - sha256 "8b06d6cfec84ff39a95aeb4b466c1eb62584ff019ed90331334d243501cc8398" => :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 158d00d05709b..0000000000000 --- a/Formula/zero-install.rb +++ /dev/null @@ -1,76 +0,0 @@ -class ZeroInstall < Formula - desc "Zero Install is a decentralised software installation system" - homepage "https://0install.net/" - url "https://github.com/0install/0install.git", - :tag => "v2.17", - :revision => "4a837bd638d93905b96d073c28c644894f8d4a0b" - license "LGPL-2.1" - head "https://github.com/0install/0install.git" - - bottle do - cellar :any_skip_relocation - sha256 "4306ae5d0ca339a7f5ecd9c7ba6a3a192a1d176883d49dda9d31aad78bc390fd" => :catalina - sha256 "73b04cd9560f78c799599fc4f9fba0de2b072c56e2195ef0522bb23e6eeb376b" => :mojave - sha256 "4fb5867d432bd3e22525b95682521a12a3279dd4fb7f8b0df3cb6664a6959835" => :high_sierra - end - - depends_on "ocaml" => :build - depends_on "ocamlbuild" => :build - depends_on "opam" => :build - depends_on "pkg-config" => :build - depends_on "gnupg" - - def install - ENV.append_path "PATH", Formula["gnupg"].opt_bin - - # Use correct curl headers - ENV["HOMEBREW_SDKROOT"] = MacOS::CLT.sdk_path(MacOS.version) if MacOS.version >= :mojave && MacOS::CLT.installed? - - Dir.mktmpdir("opamroot") do |opamroot| - ENV["OPAMROOT"] = opamroot - ENV["OPAMYES"] = "1" - ENV["OPAMVERBOSE"] = "1" - system "opam", "init", "--no-setup", "--disable-sandboxing" - modules = %w[ - yojson - xmlm - ounit - lwt_react - ocurl - sha - dune - ] - 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 - 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 e81b1ee3ddec3..0000000000000 --- a/Formula/zeromq.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Zeromq < Formula - desc "High-performance, asynchronous messaging library" - homepage "https://zeromq.org/" - url "https://github.com/zeromq/libzmq/releases/download/v4.3.2/zeromq-4.3.2.tar.gz" - sha256 "ebd7b5c830d6428956b67a0454a7f8cbed1de74b3b01e5c33c5378e22740f763" - - bottle do - cellar :any - sha256 "c1b7ef404ebaf2a6dbfbe3912495d0120f952cfa12be44ed19581f4cbbc8e699" => :catalina - sha256 "f128049b3857d2b3be7fe355441b2dae455ccc5dae2d64e9d7e9d3abd5f014d5" => :mojave - sha256 "11b7d1bf3457a32c1c94716bef3f899106125e772939acb1ad6b0ae308dff863" => :high_sierra - sha256 "3de5d5f7d5d686855aadee66616516590fe8b73b5250d259144a1575a95802e8" => :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, :test] - 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" - - # 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", "--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" - system "pkg-config", "libzmq", "--cflags" - system "pkg-config", "libzmq", "--libs" - end -end diff --git a/Formula/zig.rb b/Formula/zig.rb deleted file mode 100644 index dea65224275d1..0000000000000 --- a/Formula/zig.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Zig < Formula - desc "Programming language designed for robustness, optimality, and clarity" - homepage "https://ziglang.org/" - url "https://ziglang.org/download/0.6.0/zig-0.6.0.tar.xz" - sha256 "5d167dc19354282dd35dd17b38e99e1763713b9be8a4ba9e9e69284e059e7204" - license "MIT" - revision 1 - head "https://github.com/ziglang/zig.git" - - bottle do - cellar :any - sha256 "56d061f373c70fe00ae0d38f1aace3d719123219d211ff50d613aa7d7d34c7f9" => :catalina - sha256 "dd0354fc2c222ca360577701e554fe2acc6c6a6884906ec721c6602b98e9d2bf" => :mojave - sha256 "10bca4e34e31a22c30ba447ecf999b32fd7b186e8083051458ee5694ffd493f8" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "llvm" - - # Fix linking issues - # https://github.com/Homebrew/homebrew-core/issues/53198 - patch :DATA - - 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: std.fs.File = 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 - -__END__ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -384,6 +384,9 @@ target_link_libraries(zig_cpp LINK_PUBLIC - ${CLANG_LIBRARIES} - ${LLD_LIBRARIES} - ${LLVM_LIBRARIES} -+ "-Wl,/usr/local/opt/llvm/lib/libPolly.a" -+ "-Wl,/usr/local/opt/llvm/lib/libPollyPPCG.a" -+ "-Wl,/usr/local/opt/llvm/lib/libPollyISL.a" - ) diff --git a/Formula/zile.rb b/Formula/zile.rb deleted file mode 100644 index ec51799ecddae..0000000000000 --- a/Formula/zile.rb +++ /dev/null @@ -1,31 +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 - cellar :any - rebuild 1 - sha256 "854315aad2cba51fa2b556ebce95ffb0d402a491420e900de898a22c95c082e3" => :catalina - sha256 "812e96a8ffe6c3baaece7400306b588bfd1eb1442f943a73f34b4066ab6b0f44" => :mojave - sha256 "d0cefa1b959efdf8344907a229bff4ea03cf9856b2d028a509e0b8e0a046a7f2" => :high_sierra - end - - depends_on "help2man" => :build - depends_on "pkg-config" => :build - depends_on "bdw-gc" - - uses_from_macos "ncurses" - - 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 671b96a6eb7be..0000000000000 --- a/Formula/zim.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Zim < Formula - desc "Graphical text editor used to maintain a collection of wiki pages" - homepage "https://zim-wiki.org/" - url "https://github.com/jaap-karssenberg/zim-desktop-wiki/archive/0.73.1.tar.gz" - sha256 "63ab38b3d4477ce29a66ec0094331eca1fc40def63a3fb256d613dc7fdb3a59e" - head "https://github.com/jaap-karssenberg/zim-desktop-wiki.git" - - bottle do - cellar :any_skip_relocation - sha256 "10b5ee2401d6771811831f96576b631ccdf62a147c9d1fd2538a5a44800653b5" => :catalina - sha256 "10b5ee2401d6771811831f96576b631ccdf62a147c9d1fd2538a5a44800653b5" => :mojave - sha256 "10b5ee2401d6771811831f96576b631ccdf62a147c9d1fd2538a5a44800653b5" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "adwaita-icon-theme" - depends_on "graphviz" - depends_on "gtk+3" - depends_on "gtksourceview3" - depends_on "pygobject3" - depends_on "python@3.8" - - resource "pyxdg" do - url "https://files.pythonhosted.org/packages/47/6e/311d5f22e2b76381719b5d0c6e9dc39cd33999adae67db71d7279a6d70f4/pyxdg-0.26.tar.gz" - sha256 "fe2928d3f532ed32b39c32a482b54136fe766d19936afc96c8f00645f9da1a06" - end - - def install - python_version = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{python_version}/site-packages" - resource("pyxdg").stage do - system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec/"vendor") - end - ENV["XDG_DATA_DIRS"] = libexec/"share" - ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{python_version}/site-packages" - system Formula["python@3.8"].opt_bin/"python3", "./setup.py", "install", "--prefix=#{libexec}" - bin.install Dir[libexec/"bin/*"] - bin.env_script_all_files libexec/"bin", - :PYTHONPATH => ENV["PYTHONPATH"], - :XDG_DATA_DIRS => ["#{HOMEBREW_PREFIX}/share", libexec/"share"].join(":") - pkgshare.install "zim" - end - - test do - ENV["LC_ALL"] = "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" - system "grep", '', "HTML/Homebrew/Homebrew.html" - end -end diff --git a/Formula/zimg.rb b/Formula/zimg.rb deleted file mode 100644 index 8dfedbd2f081e..0000000000000 --- a/Formula/zimg.rb +++ /dev/null @@ -1,45 +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.9.3.tar.gz" - sha256 "a15c0483fbe945ffe695a1a989bc43b3381c8bf33e2d1760464ec21d32cdf30b" - license "WTFPL" - head "https://github.com/sekrit-twc/zimg.git" - - bottle do - cellar :any - sha256 "65da1647208bb9d77aefcf9a2b4413adb1af57fc115f9689dcac02fbc6893fce" => :catalina - sha256 "efd508b816f4d22b379645878b2aa415bd51883a404145250b6694a951c4b524" => :mojave - sha256 "75a2ab770e1affcee1f185dd42699721bb9d03ca99cf66f417fff106521786a5" => :high_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 5581a3666e63e..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.8.0/zint-2.8.0.tar.gz" - sha256 "0abb92df28e61dd3efb2bcaf324588ff77e5037cac7bb7098b8da814e622639c" - license "GPL-3.0" - head "https://git.code.sf.net/p/zint/code.git" - - bottle do - cellar :any - sha256 "73fd531d68666227d575947fa5c5d4e1c32c1dc8f904ae4fd8bdfd622ca447d9" => :catalina - sha256 "1548af77a2e17959409fb6873f81fdbbe5ab7c8db3e99bb4c944849aa7656632" => :mojave - sha256 "fc47d148dcd11a920bbecbedd35fac8b58ac1fe95297b9cdc234a8d8cb2a9746" => :high_sierra - 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 ac6a05e0fe5e7..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 "0c942307306bb96e68bb0aba70d253b37ed1e519a882ba778c42d8ac9fd230f9" => :catalina - 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://deb.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 b41878acf3d09..0000000000000 --- a/Formula/zita-convolver.rb +++ /dev/null @@ -1,36 +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.3.tar.bz2" - sha256 "9aa11484fb30b4e6ef00c8a3281eebcfad9221e3937b1beb5fe21b748d89325f" - license "GPL-3.0" - - bottle do - cellar :any - sha256 "a616c118732c9f2c3775348e598a972abab7ae67b7cb0f283884cddaa55ce93d" => :catalina - sha256 "e9bfda6d2d3119f93ea0d570b9b3516d44513c3eafc206543f8fb055707db8fd" => :mojave - sha256 "b8b3326ead45ef0e126488d9c96a181f15888a11b707278c61c2ceeee312b37d" => :high_sierra - end - - depends_on "fftw" - - def install - cd "source" do - inreplace "Makefile", "-Wl,-soname,", "-Wl,-install_name," - 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 <<~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 0b357f1b636dd..0000000000000 --- a/Formula/zlib.rb +++ /dev/null @@ -1,41 +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 "8ec66cf6faa310712767efc3022fdd16568a79234439f64bf579acb628f893bc" => :catalina - 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 42c53ad27e9b7..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.15.tar.gz" - sha256 "00037ab8d52772a95d645f1dcfd2c292b7cea326b54e63e219a5b7fdcb7e6508" - license "LGPL-2.1" - - bottle do - cellar :any - sha256 "31352f21933854c635450c9cc5c00f1dc1370a62a331a691879bea2eaba45582" => :catalina - sha256 "170ffd446913b23c344d82160c19bfb1c8325c07dc31490a636e72345abe1c7b" => :mojave - sha256 "332ed23525b10970bd5bc81052bae67755aee5f2651fdaafed5dd036da470239" => :high_sierra - 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 b40f64529ec3a..0000000000000 --- a/Formula/zmap.rb +++ /dev/null @@ -1,54 +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" - license "Apache-2.0" - revision 2 - head "https://github.com/zmap/zmap.git" - - bottle do - sha256 "7f3dce955fb01597407317a81e6d1e0b60d66756e64358f11106adf5335b820a" => :catalina - sha256 "3014cc393e0d9b5e6705392a10da8588f26d668daa5660aebe252ed514bf176e" => :mojave - sha256 "99c0f7e06b2789fb57bd465a5a1fe35628b6d5e624ebba32d7f1199abc78d8bf" => :high_sierra - end - - 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" - - # fix json-c 0.14 compat - # ref PR, https://github.com/zmap/zmap/pull/609 - patch :DATA - - def install - inreplace ["conf/zmap.conf", "src/zmap.c", "src/zopt.ggo.in"], "/etc", etc - - system "cmake", ".", *std_cmake_args, "-DENABLE_DEVELOPMENT=OFF", - "-DRESPECT_INSTALL_PREFIX_CONFIG=ON" - system "make" - system "make", "install" - end - - test do - system "#{sbin}/zmap", "--version" - end -end - -__END__ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8bd825f..c70b651 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -71,7 +71,7 @@ if(WITH_JSON) - message(FATAL_ERROR "Did not find libjson") - endif() - -- add_definitions("-DJSON") -+ string(REPLACE ";" " " JSON_CFLAGS "${JSON_CFLAGS}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${JSON_CFLAGS}") - endif() diff --git a/Formula/zmqpp.rb b/Formula/zmqpp.rb deleted file mode 100644 index 5b19b6f0926a6..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" - license "MPL-2.0" - - bottle do - cellar :any - sha256 "6ff257636778c3cb51a42ec7fd41d701ebb311dcbdca7fb0e63772078b59123c" => :catalina - sha256 "dd783ca2b0f191c1a78c60f2c13489fef5d743c8720ed26d5cda6bd8bea32ce9" => :mojave - sha256 "02c8a7e0124d22e2c9fde2349179d9340e17203ad252ed9fd56fd6c9ea71a24c" => :high_sierra - sha256 "a1843b77cb53950bcf0b29589071025a48d86f0ecb4420280f7fcff7420f1905" => :sierra - sha256 "58f0301f03f30b314cb31dbbbc9a82163930b5b00a7285e3d279f49c0e1a25d1" => :el_capitan - 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 <<~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 76e207a5e8e7f..0000000000000 --- a/Formula/znapzend.rb +++ /dev/null @@ -1,84 +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.20.0/znapzend-0.20.0.tar.gz" - sha256 "c0a1ab9df5d6c4936560b5f8f08d393d4e99313da190fa404cd8ee5df420a7ca" - head "https://github.com/oetiker/znapzend.git" - - bottle do - cellar :any_skip_relocation - sha256 "37b73cba5b7ed887b1e72175d3c601c08e449ed3bbcaa87668641704477889d1" => :catalina - sha256 "9a508c6a3fb15609b3552ce38369b16664f08515f635bd8a3dc92ed79d17d381" => :mojave - sha256 "18e1269f3ab2964382c1cc7578fa8785ee7ba1412a1c247861d76accde2a6cc5" => :high_sierra - end - - 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 6a2404aef2d42..0000000000000 --- a/Formula/znc.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Znc < Formula - desc "Advanced IRC bouncer" - homepage "https://wiki.znc.in/ZNC" - url "https://znc.in/releases/archive/znc-1.8.1.tar.gz" - sha256 "3195f7614a800a843af12271593d39cd3eb40c15657cce56d9cf28754cd86141" - license "Apache-2.0" - - bottle do - sha256 "005cacad69c5a76df51fec1b909618bc3c6607e35c242ce3fb7a072691c27cc5" => :catalina - sha256 "acf1a6758351f662fba78bff2d08664000290c4e1f92bf2cfa7e160827110c91" => :mojave - sha256 "3f9ed65af25e3b5edeb3c07a78b24e96944a4d05acec6c13b1336d3ce06ae0c0" => :high_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@1.1" - depends_on "python@3.8" - - uses_from_macos "zlib" - - 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 935da410c2411..0000000000000 --- a/Formula/zola.rb +++ /dev/null @@ -1,49 +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.11.0.tar.gz" - sha256 "09840a55d13a81a7a04767d01e5e44cc3710e79c78f43f0ebde4a6a17e0728ca" - license "MIT" - - bottle do - cellar :any_skip_relocation - sha256 "099ec6c5af34a200dbfc30f9f9fc1d085bda28326edc06738c29db3272af3e71" => :catalina - sha256 "7ec8be7e3bbafd3fb41dae7ecee7f613cfe0c4b9120cddc9b9720603e74c282a" => :mojave - sha256 "6a5820422c3ac9776b45f6c7f210315c8ae87d294fdea3db093f3e89f11358f2" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "rust" => :build - - on_linux do - depends_on "openssl@1.1" - end - - def install - system "cargo", "install", *std_cargo_args - - 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 6e78df1818f8e..0000000000000 --- a/Formula/zookeeper.rb +++ /dev/null @@ -1,129 +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.lua?path=zookeeper/zookeeper-3.5.8/apache-zookeeper-3.5.8.tar.gz" - mirror "https://archive.apache.org/dist/zookeeper/zookeeper-3.5.8/apache-zookeeper-3.5.8.tar.gz" - sha256 "bafc0abe7da696a2020ba11b8ce7d06f6e28e9bf1e5504de09be25b8b589777d" - license "Apache-2.0" - head "https://gitbox.apache.org/repos/asf/zookeeper.git" - - bottle do - cellar :any - sha256 "e22e36c7f02c5c57703d90d8a594896d0335311fc016130db2716822c750373f" => :catalina - sha256 "8a108199968e633827d46cc43bebef94bce9fd0f81cf05b1d61c2ad6b41a8fc4" => :mojave - sha256 "272323746835859d1f1181e79893fc16b0f48ee8ea401b6412fa5266f6439f6d" => :high_sierra - end - - depends_on "ant" => :build - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on "pkg-config" => :build - - 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 - system "ant", "compile_jute" - - cd "zookeeper-client/zookeeper-client-c" do - system "autoreconf", "-fiv" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--without-cppunit" - system "make", "install" - end - - rm_f Dir["bin/*.cmd"] - - system "ant" - libexec.install "bin", "build/lib", "zookeeper-contrib" - libexec.install Dir["build/*.jar"] - - 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 6cc008578bd7d..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.3.tar.gz" - sha256 "e955a7739f71af37ef3349c4fa141c648e8775bceb2195be07e86f8e638814bd" - license "Apache-2.0" - head "https://github.com/google/zopfli.git" - - bottle do - cellar :any_skip_relocation - sha256 "aa44f1667254347800d442b6347d6df658e3ee24386d2284cce8e88a27e87d6d" => :catalina - sha256 "521a5185b6881c878be60af7df7c673f5845255f957b88d01307eb9220407a52" => :mojave - sha256 "fb474057725b73aa00261b10d000474cb05c020b7d951d085dcf9ed5b0973030" => :high_sierra - 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 79299f9c017a2..0000000000000 --- a/Formula/zorba.rb +++ /dev/null @@ -1,46 +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" - license "Apache-2.0" - revision 12 - - bottle do - sha256 "01bbd1e2348d5e758950374e10d629801e51ee2860ff1682f9e9e40610e60d33" => :catalina - sha256 "c7d863356378a2053794453b70602151cb190ddd3de322ff0b0b47818d77a68f" => :mojave - sha256 "ac62c2bdc67c3283f3ad442f5b707d439dab065d50b4b9ccb1044a3ca6a81249" => :high_sierra - end - - depends_on "cmake" => :build - depends_on "flex" - depends_on "icu4c" - depends_on "xerces-c" - - uses_from_macos "libxml2" - - conflicts_with "xqilla", :because => "both supply `xqc.h`" - - 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 - args << "-DZORBA_HAVE_CLOCKGETTIME=OFF" if MacOS.version == :el_capitan && MacOS::Xcode.version >= "8.0" - - 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 42feea2ce9aca..0000000000000 --- a/Formula/zork.rb +++ /dev/null @@ -1,36 +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 "e3beae53e804ba7ad871d84431b76e1e7ca958bb0db4b70506771107b3f25ca1" => :catalina - sha256 "0290ba47e707b2812ae354672fd59409acd354fe00b445c424e07c2f3ae8133c" => :mojave - sha256 "13e9074fc59bcaeb1dbb5fdeb536da90cd33ef23889109fe20e79429ead56444" => :high_sierra - sha256 "d2fe9ee55de4906a3a99d30070d81f73637f3972a6e0c44eb7ab2461c024c684" => :sierra - sha256 "8dc6fd49cf72dfa69f677eb1cfd7850f781271c35e4adbacdac00bf918ce6fec" => :el_capitan - sha256 "cb1076cd985679e6d9d093f4887c95bc7f0eb046c2799ec5000611703f428d47" => :yosemite - 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/zoxide.rb b/Formula/zoxide.rb deleted file mode 100644 index db59d220c2a66..0000000000000 --- a/Formula/zoxide.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Zoxide < Formula - desc "Shell extension to navigate your filesystem faster" - homepage "https://github.com/ajeetdsouza/zoxide" - url "https://github.com/ajeetdsouza/zoxide/archive/v0.4.3.tar.gz" - sha256 "cfcbbe7b73a2a149e2b38ac6dd4bd4a6c1bdd6cf6f2a2bab49f6aeec3c705357" - - bottle do - cellar :any_skip_relocation - sha256 "40e1d6f7e805a4627a0c9c8c2f743db1f86ff4d20ffe8ee8986d536d9d937728" => :catalina - sha256 "ed59dfdf07cd7c9581b0d5f57be454a99b480a5bd916b7b67254a7a3197efa34" => :mojave - sha256 "8a64fa405d29a1981c71994138fe00b2af2c344c15fd40ceabafa8cd996ff6f5" => :high_sierra - end - - depends_on "rust" => :build - - def install - system "cargo", "install", *std_cargo_args - end - - test do - assert_equal "", shell_output("#{bin}/zoxide add /").strip - assert_equal "/", shell_output("#{bin}/zoxide query").strip - end -end diff --git a/Formula/zpaq.rb b/Formula/zpaq.rb deleted file mode 100644 index b684e838cf812..0000000000000 --- a/Formula/zpaq.rb +++ /dev/null @@ -1,34 +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 "091d81c8f85afc293897a500209dcf1949cf14c7620c6fc3e1c6b226cba26f08" => :catalina - 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 c04ebb249fc6b..0000000000000 --- a/Formula/zplug.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Zplug < Formula - desc "The next-generation plugin manager for zsh" - homepage "https://github.com/zplug/zplug/" - url "https://github.com/zplug/zplug/archive/2.4.2.tar.gz" - sha256 "82a51e8c388844acbfb64196623bede07eee2384f1fc30966eac880373aa9030" - license "MIT" - head "https://github.com/zplug/zplug.git" - - bottle :unneeded - - 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/zrepl.rb b/Formula/zrepl.rb deleted file mode 100644 index d1a5da8fe8794..0000000000000 --- a/Formula/zrepl.rb +++ /dev/null @@ -1,95 +0,0 @@ -class Zrepl < Formula - desc "One-stop ZFS backup & replication solution" - homepage "https://zrepl.github.io/" - url "https://github.com/zrepl/zrepl/archive/v0.2.1.tar.gz" - sha256 "df474e70f5a51d84816ee8a06038ded167a7548e547e2d2822c313f088eeeafd" - license "MIT" - head "https://github.com/zrepl/zrepl.git" - - bottle do - cellar :any_skip_relocation - sha256 "089ca444325890a214face9ea6de0cfc7de1a931ce126e4253f0c390c814fd67" => :catalina - sha256 "0907d294ed2efe16891751914c03f869940b0c640e82ae11b882d50a60352dab" => :mojave - sha256 "d480d224d1cfd259622de17f60d7f619f439e9cf37337a0a136fba827daa36d2" => :high_sierra - end - - depends_on "dep" => :build - depends_on "go" => :build - - resource "sample_config" do - url "https://raw.githubusercontent.com/zrepl/zrepl/master/config/samples/local.yml" - sha256 "f27b21716e6efdc208481a8f7399f35fd041183783e00c57f62b3a5520470c05" - end - - def install - contents = Dir["{*,.git,.gitignore}"] - gopath = buildpath/"gopath" - (gopath/"src/github.com/zrepl/zrepl").install contents - - ENV["GOPATH"] = gopath - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = "amd64" - - ENV.prepend_create_path "PATH", gopath/"bin" - cd gopath/"src/github.com/zrepl/zrepl" do - system "go", "build", "-o", "'$GOPATH/bin/stringer'", "golang.org/x/tools/cmd/stringer" - system "go", "build", "-o", "'$GOPATH/bin/protoc-gen-go'", "github.com/golang/protobuf/protoc-gen-go" - system "go", "build", "-o", "'$GOPATH/bin/enumer'", "github.com/alvaroloes/enumer" - system "go", "build", "-o", "'$GOPATH/bin/goimports'", "golang.org/x/tools/cmd/goimports" - system "go", "build", "-o", "'$GOPATH/bin/golangci-lint'", "github.com/golangci/golangci-lint/cmd/golangci-lint" - system "make", "ZREPL_VERSION=#{version}" - bin.install "artifacts/zrepl-darwin-amd64" => "zrepl" - end - end - - def post_install - (var/"log/zrepl").mkpath - (var/"run/zrepl").mkpath - (etc/"zrepl").mkpath - end - - plist_options :startup => true, :manual => "sudo zrepl daemon" - - def plist - <<~EOS - - - - - EnvironmentVariables - - PATH - /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:#{HOMEBREW_PREFIX}/bin - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/zrepl - daemon - - RunAtLoad - - StandardErrorPath - #{var}/log/zrepl/zrepl.err.log - StandardOutPath - #{var}/log/zrepl/zrepl.out.log - ThrottleInterval - 30 - WorkingDirectory - #{var}/run/zrepl - - - EOS - end - - test do - resources.each do |r| - r.verify_download_integrity(r.fetch) - assert_equal "", shell_output("#{bin}/zrepl configcheck --config #{r.cached_download}") - end - end -end diff --git a/Formula/zsdx.rb b/Formula/zsdx.rb deleted file mode 100644 index 932ac61d0c174..0000000000000 --- a/Formula/zsdx.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Zsdx < Formula - desc "Zelda Mystery of Solarus DX" - homepage "https://www.solarus-games.org/en/games/the-legend-of-zelda-mystery-of-solarus-dx" - url "https://gitlab.com/solarus-games/zsdx/-/archive/v1.12.2/zsdx-v1.12.2.tar.bz2" - sha256 "a4d4cc9b41a4d52375e984f546cfe75736f604bc3ad194f6df1658ab6215c04f" - head "https://gitlab.com/solarus-games/zsdx.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "9b245c7970507d8687420773853a820a0631eefad011cb602159007d11ee4fc7" => :catalina - sha256 "dee683d31f1e6dd956c6e81351cf741e97ab0c1a4cdeb84fdc97b41e30bceeb8" => :mojave - sha256 "fe2df4c5e3c1d21dfd67acb0b98156167e2a9f79d06fae5da7527eba074a8b8c" => :high_sierra - 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 15205bffd24fa..0000000000000 --- a/Formula/zsh-autosuggestions.rb +++ /dev/null @@ -1,30 +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.6.4.tar.gz" - sha256 "0b6e251ced5fd7b5b78ea01f798ecc1b46169743a717567f0ec0a21198a372e8" - license "MIT" - - 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 c8eb2823bc7f5..0000000000000 --- a/Formula/zsh-completions.rb +++ /dev/null @@ -1,44 +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.32.0.tar.gz" - sha256 "d2d20836fb60d2e5de11b08f1a8373484dc01260d224e64c6de9eec44137fa63" - 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: - - 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 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-history-substring-search.rb b/Formula/zsh-history-substring-search.rb deleted file mode 100644 index f389223ae72e2..0000000000000 --- a/Formula/zsh-history-substring-search.rb +++ /dev/null @@ -1,30 +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.2.tar.gz" - sha256 "c1bb21490bd31273fb511b23000fb7caf49c258a79c4b8842f3e1f2ff76fd84c" - - 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 d7d5f6bca42a1..0000000000000 --- a/Formula/zsh-lovers.rb +++ /dev/null @@ -1,20 +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" - 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 dbcf51b40b765..0000000000000 --- a/Formula/zsh-navigation-tools.rb +++ /dev/null @@ -1,37 +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 "2ca507bf832d34b63b9bf4f60b76158ad0e8980622f78de8fd8e3f771d4df5d2" => :catalina - 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 65c69d18a1063..0000000000000 --- a/Formula/zsh-syntax-highlighting.rb +++ /dev/null @@ -1,38 +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.7.1", - :revision => "932e29a0c75411cb618f02995b66c0a4a25699bc" - license "BSD-3-Clause" - head "https://github.com/zsh-users/zsh-syntax-highlighting.git" - - bottle do - cellar :any_skip_relocation - sha256 "6b7d4cdc41b56c842a4b76f9901d922d1f39bd638e94249881078a873de8970b" => :catalina - sha256 "6b7d4cdc41b56c842a4b76f9901d922d1f39bd638e94249881078a873de8970b" => :mojave - sha256 "6b7d4cdc41b56c842a4b76f9901d922d1f39bd638e94249881078a873de8970b" => :high_sierra - end - - uses_from_macos "zsh" - - 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 7ea7b9a85e754..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.8/zsh-5.8.tar.xz" - mirror "https://www.zsh.org/pub/zsh-5.8.tar.xz" - sha256 "dcc4b54cc5565670a65581760261c163d720991f0d06486da61f8d839b52de27" - - bottle do - sha256 "209d04a4d62f6162f1b6cf824d2c50b00b52cb812c04c1967e5b376573b5aef0" => :catalina - sha256 "c5c35657637c97132efbaa0fd8e2add568aaa62adfe66e7d19f961f8e9506da9" => :mojave - sha256 "029b8c6922f01bfd832dd0f4f940f99328d2495714c37c1dc7ef326d6fb1459e" => :high_sierra - end - - head do - url "https://git.code.sf.net/p/zsh/code.git" - depends_on "autoconf" => :build - end - - depends_on "ncurses" - depends_on "pcre" - - resource "htmldoc" do - url "https://downloads.sourceforge.net/project/zsh/zsh-doc/5.8/zsh-5.8-doc.tar.xz" - mirror "https://www.zsh.org/pub/zsh-5.8-doc.tar.xz" - sha256 "9b4e939593cb5a76564d2be2e2bfbb6242509c0c56fd9ba52f5dba6cf06fdcc4" - 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-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'" - end -end diff --git a/Formula/zshdb.rb b/Formula/zshdb.rb deleted file mode 100644 index 74b18bb26a393..0000000000000 --- a/Formula/zshdb.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Zshdb < Formula - desc "Debugger for zsh" - homepage "https://github.com/rocky/zshdb" - url "https://downloads.sourceforge.net/project/bashdb/zshdb/1.1.2/zshdb-1.1.2.tar.gz" - sha256 "bf9cb36f60ce6833c5cd880c58d6741873b33f5d546079eebcfce258d609e9af" - license "GPL-3.0" - - bottle do - cellar :any_skip_relocation - sha256 "2bdc583e95b4d4bd92624d48ce804561e3a337792dbba74f451a2507eb939704" => :catalina - sha256 "2bdc583e95b4d4bd92624d48ce804561e3a337792dbba74f451a2507eb939704" => :mojave - sha256 "2bdc583e95b4d4bd92624d48ce804561e3a337792dbba74f451a2507eb939704" => :high_sierra - 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 ecc5485f1a51a..0000000000000 --- a/Formula/zssh.rb +++ /dev/null @@ -1,34 +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" - license "GPL-2.0" - - bottle do - cellar :any_skip_relocation - sha256 "6b9bce24c13dd2e979cdae57892e1b595bfcbd1d342bb81419dda378b8439495" => :catalina - sha256 "0b1567c1d4aef681ff463f058a884eead039fb0c50a1c03820a03c9f67786b52" => :mojave - sha256 "9cb26f1bd359977406fae945abd311b2cdc5770570e6350f2ac278bfbe458f5b" => :high_sierra - sha256 "49e01bb86097999f21f3d96b0f9cd63a975d4fd52f6e286d42ceee16ee996eb7" => :sierra - sha256 "04212f19c1d9a6b97fd56ffe937606f1779849fdf04b93e3f285889599845c8f" => :el_capitan - sha256 "94280569f9e1c1deb9d8c3be4256cd501399fd51758f8e2ea6d77fd9f1b6ef2e" => :yosemite - sha256 "94b16bb29616a839134527fd869ac40a8fb5fa88b0048d1a93a828e306c2a270" => :mavericks - end - - depends_on "lrzsz" - - on_linux do - depends_on "pkg-config" => :build - depends_on "readline" - end - - 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 378e1809a0d03..0000000000000 --- a/Formula/zstd.rb +++ /dev/null @@ -1,34 +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/archive/v1.4.5.tar.gz" - sha256 "734d1f565c42f691f8420c8d06783ad818060fc390dee43ae0a89f86d0a4f8c2" - - bottle do - cellar :any - sha256 "2375c206a934090c4ba53362d038e4e191d8dd09eec734e8e72106089aa24e9d" => :catalina - sha256 "86b04bfd318315486d772b29d30b361e734a74269ae48805eeb3eae1d562b984" => :mojave - sha256 "61de5a45183f4d029c66024d645ad44b0a625d58f9f583b47af42346a7c90fe5" => :high_sierra - end - - depends_on "cmake" => :build - - uses_from_macos "zlib" - - 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 8764bff487257..0000000000000 --- a/Formula/zsxd.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Zsxd < Formula - desc "Zelda Mystery of Solarus XD" - homepage "https://www.solarus-games.org/en/games/the-legend-of-zelda-mystery-of-solarus-xd" - url "https://gitlab.com/solarus-games/zsxd/-/archive/v1.12.2/zsxd-v1.12.2.tar.bz2" - sha256 "656ac2033db2aca7ad0cd5c7abb25d88509b312b155ab83546c90abbc8583df1" - head "https://gitlab.com/solarus-games/zsxd.git" - - bottle do - cellar :any_skip_relocation - rebuild 1 - sha256 "aabcc393aae8f00a45ffa24d959ff57a6023caace90a815f8107c579e113b87e" => :catalina - sha256 "8b6e336bd61f16c620ab8323ccd15dfc35cf1665c71799a838c4436fefd561b0" => :mojave - sha256 "fa0726547d624647bd7453100b6e2221ce0ec9174e0cd43275844b09aefb6c0d" => :high_sierra - 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 9ac86eb31c11c..0000000000000 --- a/Formula/zsync.rb +++ /dev/null @@ -1,30 +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 "333d4b2be5c1b6621bf7e7ac87199da1c5ec24a3cdb408c97ed733b6fafb89a1" => :catalina - 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 e4e3cf5a5e64d..0000000000000 --- a/Formula/zurl.rb +++ /dev/null @@ -1,106 +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.11.0.tar.bz2" - sha256 "18aa3b077aefdba47cc46c5bca513ca2e20f2564715be743f70e4efa4fdccd7a" - revision 1 - - bottle do - cellar :any - sha256 "34df5e2569529b11cfdb776fbb7693bd2be133f6f79ebf058a6ec9e40c14b3e7" => :catalina - sha256 "461956a45a61737a7ecd8c4e4a22f9511341f72a07bc5e05551771c94e264055" => :mojave - sha256 "b6c5d64251514191c0f987ef18481bce8f8a06f4de292c39c21112c939a3c9cf" => :high_sierra - end - - depends_on "pkg-config" => :build - depends_on "python@3.8" => :test - depends_on "qt" - depends_on "zeromq" - - uses_from_macos "curl" - - resource "pyzmq" do - url "https://files.pythonhosted.org/packages/86/08/e5fc492317cc9d65b32d161c6014d733e8ab20b5e78e73eca63f53b17004/pyzmq-19.0.1.tar.gz" - sha256 "13a5638ab24d628a6ade8f794195e1a1acd573496c3b85af2f1183603b7bf5e0" - end - - def install - system "./configure", "--prefix=#{prefix}", "--extraconf=QMAKE_MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" - system "make" - system "make", "install" - end - - test do - conffile = testpath/"zurl.conf" - ipcfile = testpath/"zurl-req" - runfile = testpath/"test.py" - - resource("pyzmq").stage do - system Formula["python@3.8"].opt_bin/"python3", - *Language::Python.setup_install_args(testpath/"vendor") - end - - conffile.write(<<~EOS, - [General] - in_req_spec=ipc://#{ipcfile} - defpolicy=allow - timeout=10 - EOS - ) - - port = free_port - runfile.write(<<~EOS, - 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') - EOS - ) - - pid = fork do - exec "#{bin}/zurl", "--config=#{conffile}" - end - - begin - xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3" - ENV["PYTHONPATH"] = testpath/"vendor/lib/python#{xy}/site-packages" - system Formula["python@3.8"].opt_bin/"python3", 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 161640f8ce793..0000000000000 --- a/Formula/zxcc.rb +++ /dev/null @@ -1,40 +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" - license "GPL-2.0" - - bottle do - sha256 "748648c861049366a5bab8f7a101274da7bd2d2378237ccc4acd4cbd5b60fde1" => :catalina - 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/zydis.rb b/Formula/zydis.rb deleted file mode 100644 index 734762c7bb719..0000000000000 --- a/Formula/zydis.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Zydis < Formula - desc "Fast and lightweight x86/x86_64 disassembler library" - homepage "https://zydis.re/" - url "https://github.com/zyantific/zydis.git", - :tag => "v3.1.0", - :revision => "bfee99f49274a0eec3ffea16ede3a5bda9cda88f", - :shallow => false - license "MIT" - head "https://github.com/zyantific/zydis.git" - - bottle do - cellar :any_skip_relocation - sha256 "ceffe3459006c374498e06809f8d75e9f512d5a43482d9b4d3973bbe4b2e3944" => :catalina - sha256 "a51c744f89ed204c66e0699a960a3c58625a5f46f16f3710e68a4746bbc0fb7e" => :mojave - sha256 "cefab7b097b79ae4c04616c235e572ffc5416296eba2a10bd7b07c6f18148313" => :high_sierra - end - - depends_on "cmake" => :build - - def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end - 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/zyre.rb b/Formula/zyre.rb deleted file mode 100644 index 98d9de6f86fd0..0000000000000 --- a/Formula/zyre.rb +++ /dev/null @@ -1,57 +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 "789b7e1d186e2f53371c84b412b18df37c00e0a3aaaad02737e1c61460e06861" => :catalina - 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 f0cb99093fb12..0000000000000 --- a/Formula/zzuf.rb +++ /dev/null @@ -1,38 +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" - license "WTFPL" - - bottle do - sha256 "809edd89cf9bd285a0f5496500627aca8b4b4cec071bfd747eb7ae3918526ae6" => :catalina - 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/README.md b/README.md index e0c045583a3e6..413de2521c7b9 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,7 @@ Core formulae for the Homebrew package manager. -Core formulae for the Linuxbrew package manager (Homebrew on Linux or Windows 10 Subsystem for Linux) are in [Homebrew/linuxbrew-core](https://github.com/Homebrew/linuxbrew-core). - -[![Join us on https://discourse.brew.sh](https://img.shields.io/badge/Discourse-forum-blue.svg)](https://discourse.brew.sh) + [Homebrew/discussions (forum)](https://github.com/orgs/Homebrew/discussions) ## How do I install these formulae? diff --git a/audit_exceptions/cert_error_allowlist.json b/audit_exceptions/cert_error_allowlist.json new file mode 100644 index 0000000000000..d1ea4deeb4197 --- /dev/null +++ b/audit_exceptions/cert_error_allowlist.json @@ -0,0 +1,12 @@ +{ + "fibjs": "https://fibjs.org/", + "gnuradio": "https://gnuradio.org/", + "hashcat": "https://hashcat.net/hashcat/", + "libbladerf": "https://nuand.com/", + "libogg": "https://www.xiph.org/ogg/", + "micropython": "https://www.micropython.org/", + "minio": "https://min.io/", + "monero": "https://www.getmonero.org/", + "opusfile": "https://www.opus-codec.org/", + "volk": "https://www.libvolk.org/" +} 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..20777e5810a56 --- /dev/null +++ b/audit_exceptions/gnome_devel_allowlist.json @@ -0,0 +1,13 @@ +{ + "gcr": "4.3", + "gtk-vnc": "1.5", + "libadwaita": "1.7", + "libart": "2.3", + "libepoxy": "1.5", + "librsvg": "2.59", + "libshumate": "1.3", + "libxml2": "2.13", + "libxslt": "1.1", + "pango": "1.55", + "tinysparql": "3.9" +} 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..2f32f25bd9279 --- /dev/null +++ b/audit_exceptions/head_non_default_branch_allowlist.json @@ -0,0 +1,4 @@ +{ + "botan@2": "release-2", + "squid": "v6" +} 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..e9669cbcd527c --- /dev/null +++ b/audit_exceptions/linux_only_gcc_dependency_allowlist.json @@ -0,0 +1,4 @@ +[ + "cabin", + "nghttp2" +] diff --git a/audit_exceptions/mismatched_binary_allowlist.json b/audit_exceptions/mismatched_binary_allowlist.json new file mode 100644 index 0000000000000..8e9605fe4a708 --- /dev/null +++ b/audit_exceptions/mismatched_binary_allowlist.json @@ -0,0 +1,12 @@ +{ + "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": "**/*", + "faust": "share/faust/android/app/lib/libsndfile/lib/*/libsndfile.so", + "i686-elf-grub": "lib/i686-elf/grub/i386-pc/*", + "lima": "share/lima/lima-guestagent.Linux-*", + "picotool": "share/picotool/xip_ram_perms.elf", + "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..c1d708fc21265 --- /dev/null +++ b/audit_exceptions/provided_by_macos_depends_on_allowlist.json @@ -0,0 +1,11 @@ +[ + "apr", + "apr-util", + "libarchive", + "libressl", + "llvm", + "openblas", + "openssl@1.1", + "openssl@3.0", + "openssl@3" +] diff --git a/audit_exceptions/universal_binary_allowlist.json b/audit_exceptions/universal_binary_allowlist.json new file mode 100644 index 0000000000000..a0d7ea99e263d --- /dev/null +++ b/audit_exceptions/universal_binary_allowlist.json @@ -0,0 +1,12 @@ +[ + "llvm", + "llvm@12", + "llvm@13", + "llvm@14", + "llvm@15", + "llvm@16", + "llvm@17", + "llvm@18", + "llvm@19", + "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..3164e330f5a33 --- /dev/null +++ b/audit_exceptions/versioned_dependencies_conflicts_allowlist.json @@ -0,0 +1,5 @@ +[ + "hive", + "mariadb@10.4", + "mysql@5.7" +] 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..635edb53b1562 --- /dev/null +++ b/audit_exceptions/versioned_keg_only_allowlist.json @@ -0,0 +1,43 @@ +[ + "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", + "glibmm@2.66", + "gnupg@1.4", + "icu4c@77", + "libpeas@1", + "libsigc++@2", + "libxml++@3", + "libxml++@4", + "libxml++@5", + "linux-headers@5.15", + "openssl@1.1", + "openssl@3.0", + "openssl@3", + "pangomm@2.46", + "postgresql@14", + "pyqt@5", + "python@3.8", + "python@3.9", + "python@3.10", + "python@3.11", + "python@3.12", + "python@3.13", + "python-gdbm@3.11", + "python-gdbm@3.12", + "python-gdbm@3.13", + "python-tk@3.9", + "python-tk@3.10", + "python-tk@3.11", + "python-tk@3.12", + "python-tk@3.13", + "spidermonkey@91", + "spidermonkey@115" +] diff --git a/cmd/aspell-dictionaries.rb b/cmd/aspell-dictionaries.rb index 27f3bbfe9dfbb..d3dea2bdb8dfc 100755 --- a/cmd/aspell-dictionaries.rb +++ b/cmd/aspell-dictionaries.rb @@ -1,61 +1,59 @@ -require "cli/parser" -require "open-uri" +# typed: strict +# frozen_string_literal: true + +require "abstract_command" require "resource" require "formula" module Homebrew - module_function - - def aspell_dictionaries_args - Homebrew::CLI::Parser.new do - usage_banner <<~EOS - `aspell-dictionaries` - - Generates the new dictionaries for the `aspell` formula. - EOS - end - end - - def aspell_dictionaries - aspell_dictionaries_args.parse + module Cmd + class AspellDictionariesCmd < AbstractCommand + cmd_args do + usage_banner <<~EOS + `aspell-dictionaries` + + Generates the new dictionaries for the `aspell` formula. + EOS + end - dict_url = "https://ftp.gnu.org/gnu/aspell/dict" - dict_mirror = "https://ftpmirror.gnu.org/aspell/dict" + sig { override.void } + def run + dictionary_url = "https://ftp.gnu.org/gnu/aspell/dict" + dictionary_mirror = "https://ftpmirror.gnu.org/aspell/dict" + languages = {} - languages = {} + index_output = Utils::Curl.curl_output("#{dictionary_url}/0index.html").stdout + index_output.split("").each do |line| + next unless line.start_with?("
    + + 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:master", + 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.count == 1 && tags.first.system == :all + # Build on all supported macOS versions and Linux. + 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("https://github.com/GITHUB_RUN_ID")}" + macos_runners = [{ runner: "#{macos_version}-x86_64#{ephemeral_suffix}" }] + macos_runners << { runner: "#{macos_version}-arm64#{ephemeral_suffix}" } + macos_runners + end + end << linux_runner_spec(:x86_64, timeout) + 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("https://github.com/GITHUB_RUN_ID")}" + + { 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("https://github.com/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/cmd/postgresql-upgrade-database.rb b/cmd/postgresql-upgrade-database.rb deleted file mode 100755 index 61e85e80945f4..0000000000000 --- a/cmd/postgresql-upgrade-database.rb +++ /dev/null @@ -1,163 +0,0 @@ -require "cli/parser" -require "open-uri" -require "resource" -require "formula" - -module Homebrew - module_function - - def postgresql_upgrade_database_args - Homebrew::CLI::Parser.new do - usage_banner <<~EOS - `postgresql-upgrade-database` - - Upgrades the database for the `postgresql` formula. - EOS - end - end - - def postgresql_upgrade_database - postgresql_upgrade_database_args.parse - - name = "postgresql" - pg = Formula[name] - bin = pg.bin - var = pg.var - version = pg.version - pg_version_file = var/"postgres/PG_VERSION" - - pg_version_installed = version.to_s[/^\d+/] - pg_version_data = pg_version_file.read.chomp - if pg_version_installed == pg_version_data - odie <<~EOS - #{name} data already upgraded! - EOS - end - - datadir = var/"postgres" - old_datadir = var/"postgres.old" - if old_datadir.exist? - odie <<~EOS - #{old_datadir} already exists! - Remove it if you want to upgrade data automatically. - EOS - end - - old_pg_name = "#{name}@#{pg_version_data}" - old_pg_glob = "#{HOMEBREW_PREFIX}/Cellar/#{old_pg_name}/#{pg_version_data}.*/bin" - old_bin = Pathname.glob(old_pg_glob).first - old_bin ||= begin - Formula[old_pg_name] - ohai "brew install #{old_pg_name}" - system "brew", "install", old_pg_name - Pathname.glob(old_pg_glob).first - rescue FormulaUnavailableError - nil - end - - odie "No #{name} #{pg_version_data}.* version installed!" unless old_bin - - server_stopped = false - moved_data = false - initdb_run = false - upgraded = false - - begin - # Following instructions from: - # https://www.postgresql.org/docs/10/static/pgupgrade.html - ohai "Upgrading #{name} data from #{pg_version_data} to #{pg_version_installed}..." - - if /#{name}\s+started/.match?(Utils.popen_read("brew", "services", "list")) - system "brew", "services", "stop", name - service_stopped = true - elsif quiet_system "#{bin}/pg_ctl", "-D", datadir, "status" - system "#{bin}/pg_ctl", "-D", datadir, "stop" - server_stopped = true - end - - # Shut down old server if it is up via brew services - if /#{old_pg_name}\s+started/.match?(Utils.popen_read("brew", "services", "list")) - system "brew", "services", "stop", old_pg_name - end - - # get 'lc_collate' from old DB" - unless quiet_system "#{old_bin}/pg_ctl", "-w", "-D", datadir, "status" - system "#{old_bin}/pg_ctl", "-w", "-D", datadir, "start" - end - - initdb_args = [] - locale_settings = %w[ - lc_collate - lc_ctype - lc_messages - lc_monetary - lc_numeric - lc_time - server_encoding - ] - locale_settings.each do |setting| - sql = "SELECT setting FROM pg_settings WHERE name LIKE '#{setting}';" - value = Utils.popen_read("#{old_bin}/psql", "postgres", "-qtAX", "-U", ENV["USER"], "-c", sql).strip - - next if value.empty? - - initdb_args += if setting == "server_encoding" - ["-E #{value}"] - else - ["--#{setting.tr!("_", "-")}=#{value}"] - end - end - - if quiet_system "#{old_bin}/pg_ctl", "-w", "-D", datadir, "status" - system "#{old_bin}/pg_ctl", "-w", "-D", datadir, "stop" - end - - ohai "Moving #{name} data from #{datadir} to #{old_datadir}..." - FileUtils.mv datadir, old_datadir - moved_data = true - - (var/"postgres").mkpath - ohai "Creating database..." - safe_system "#{bin}/initdb", *initdb_args, "#{var}/postgres" - initdb_run = true - - ohai "Migrating and upgrading data..." - (var/"log").cd do - safe_system "#{bin}/pg_upgrade", - "-r", - "-b", old_bin, - "-B", bin, - "-d", old_datadir, - "-D", datadir, - "-j", Hardware::CPU.cores.to_s - end - upgraded = true - - ohai "Upgraded #{name} data from #{pg_version_data} to #{pg_version_installed}!" - ohai "Your #{name} #{pg_version_data} data remains at #{old_datadir}" - ensure - if upgraded - if server_stopped - safe_system "#{bin}/pg_ctl", "-D", datadir, "start" - elsif service_stopped - safe_system "brew", "services", "start", name - end - else - onoe "Upgrading #{name} data from #{pg_version_data} to #{pg_version_installed} failed!" - if initdb_run - ohai "Removing empty #{name} initdb database..." - FileUtils.rm_r datadir - end - if moved_data - ohai "Moving #{name} data back from #{old_datadir} to #{datadir}..." - FileUtils.mv old_datadir, datadir - end - if server_stopped - system "#{bin}/pg_ctl", "-D", datadir, "start" - elsif service_stopped - system "brew", "services", "start", name - end - end - end - end -end diff --git a/formula_renames.json b/formula_renames.json index 0bd70022ee9cc..a941e78adfa05 100644 --- a/formula_renames.json +++ b/formula_renames.json @@ -1,58 +1,75 @@ { - "antlr2": "antlr@2", - "app-engine-java-sdk": "app-engine-java", + "amtk": "libgedit-amtk", + "annie": "lux", "ark": "velero", "arm": "nyx", - "artifactory-cli-go": "jfrog-cli-go", + "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", "beanstalk": "beanstalkd", "berkeley-db4": "berkeley-db@4", "bigdata": "blazegraph", "bison27": "bison@2.7", - "boost155": "boost@1.55", - "boost157": "boost@1.57", - "boost159": "boost@1.59", - "boost160": "boost@1.60", "boot2docker": "docker-machine", "bro": "zeek", - "camlistore": "perkeep", - "cassandra21": "cassandra@2.1", - "cassandra22": "cassandra@2.2", "cdiff": "ydiff", "cloog018": "cloog", + "cloudflare-wrangler2": "cloudflare-wrangler", "commonmark": "cmark", - "confluent-oss": "confluent-platform", + "corepack": "node", "cppformat": "fmt", "crystal-lang": "crystal", + "curl-openssl": "curl", "cv": "progress", "cyassl": "wolfssl", "d-bus": "dbus", - "elasticsearch24": "elasticsearch@2.4", + "docker-slim": "mintoolkit", "fbida": "exiftran", + "fcct": "butane", "ffmpeg28": "ffmpeg@2.8", - "fig": "docker-compose", "findbugs": "spotbugs", - "gcc49": "gcc@4.9", - "gcc5": "gcc@5", - "gcc6": "gcc@6", "geode": "apache-geode", "geth": "ethereum", "gitlab-ci-multi-runner": "gitlab-runner", "giflib@5": "giflib", + "glib-utils": "glib", + "glibmm@2.64": "glibmm@2.66", "glfw3": "glfw", "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", - "google-app-engine": "app-engine-python", + "gold": "binutils", "google-perftools": "gperftools", + "grakn": "typedb", + "grpc-swift": "protoc-gen-grpc-swift", "grunt": "grunt-cli", - "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", "hh": "hstr", + "hpp-fcl": "coal", + "ht-rust": "xh", "htop-osx": "htop", "httpd24": "httpd", "i386-elf-binutils": "x86_64-elf-binutils", @@ -62,62 +79,95 @@ "juju2": "juju", "juju@2.0": "juju", "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", + "ksh": "ksh93", "kubernetes-helm": "helm", - "latexila": "gnome-latex", - "ledger26": "ledger@2.6", + "ldb": "samba", "letsencrypt": "certbot", + "libbitcoin": "libbitcoin-system", "libcppa": "caf", + "libcython": "cython", "libmongoclient": "mongo-cxx-driver", - "lua51": "lua@5.1", - "lua@5.3": "lua", + "libpython-tabulate": "python-tabulate", + "libsasl2": "cyrus-sasl", + "libtorch": "pytorch", + "libxml++3": "libxml++@3", + "llama": "walk", "mat": "mat2", - "maven32": "maven@3.2", + "minizip2": "minizip-ng", + "mist": "mist-cli", "mkl-dnn": "onednn", "mobile-shell": "mosh", "mongo-c": "mongo-c-driver", + "minetest": "luanti", "mpich2": "mpich", + "mps-youtube": "yewtube", + "mr2": "zoro", "mysql-connector-c": "mysql-client", - "mysql56": "mysql@5.6", + "nanopb-generator": "nanopb", "newsbeuter": "newsboat", "nimrod": "nim", + "now-cli": "vercel-cli", "objective-caml": "ocaml", "offline-imap": "offlineimap", - "open-cobol": "gnu-cobol", + "open-cobol": "gnucobol", "opencv3": "opencv", "osh": "etsh", - "perl518": "perl@5.18", - "php72": "php@7.2", + "pangomm@2.42": "pangomm@2.46", + "parallelstl": "onedpl", + "pev": "readpe", + "poac": "cabin", "polarssl": "mbedtls", - "postgresql94": "postgresql@9.4", - "postgresql95": "postgresql@9.5", + "postgresql": "postgresql@14", + "prest": "prestd", "presto": "prestodb", - "pyqt5": "pyqt", - "python3": "python", - "qt5": "qt", + "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", "root6": "root", - "saltstack": "salt", - "scala211": "scala@2.11", + "rt-audio": "rtaudio", + "rtx": "mise", + "rustfmt": "rust", + "rustup-init": "rustup", "screenbrightness": "brightness", - "sonar": "sonarqube", + "sdl": "sdl12-compat", + "selenium-server-standalone": "selenium-server", + "server-go": "openiothub-server", + "singularity": "apptainer", "speedtest_cli": "speedtest-cli", "ssreflect": "math-comp", - "stash-cli": "atlassian-cli", - "subversion18": "subversion@1.8", "tachyon": "alluxio", - "team-explorer-everywhere": "tee-clc", "tensorflow": "libtensorflow", - "thrift@0.90": "thrift@0.9", + "tepl": "libgedit-tepl", + "thors-serializer": "thors-mongo", "todolist": "ultralist", - "tomcat7": "tomcat@7", + "tomee-jax-rs": "tomee-plus", "transfig": "fig2dev", "transmission": "transmission-cli", + "trust-dns": "hickory-dns", + "twine-pypi": "twine", "usbmuxd": "libusbmuxd", - "v8-315": "v8@3.15", + "weboob": "woob", "wires": "geckodriver", - "wpcli-completion": "wp-cli-completion" + "wpcli-completion": "wp-cli-completion", + "wxmac": "wxwidgets", + "xkeyboardconfig": "xkeyboard-config", + "xu4": "scummvm" } diff --git a/pypi_formula_mappings.json b/pypi_formula_mappings.json new file mode 100644 index 0000000000000..a0ba29ea5b08d --- /dev/null +++ b/pypi_formula_mappings.json @@ -0,0 +1,1006 @@ +{ + "acronym": { + "exclude_packages": ["numpy"] + }, + "aider": { + "exclude_packages": ["certifi", "cffi", "numpy", "pillow", "scipy"] + }, + "aiven-client": { + "exclude_packages": ["certifi"] + }, + "alot": { + "exclude_packages": ["notmuch2"], + "extra_packages": ["standard-mailcap"] + }, + "animdl": { + "exclude_packages": ["certifi"] + }, + "anime-downloader": { + "exclude_packages": ["certifi"] + }, + "ansible": { + "exclude_packages": ["certifi", "cryptography", "gnureadline"], + "extra_packages": [ + "ansible-pylibssh", "apache-libcloud", "boto3", "dnspython", "docker", + "junos-eznc", "jxmlease", "kerberos", "ntc-templates", "openshift", + "passlib", "pexpect", "proxmoxer", "pynetbox", "pysphere3", "python-consul", + "python-neutronclient", "pytz", "pywinrm", "requests-credssp", "shade", "zabbix-api" + ] + }, + "ansible-lint": { + "exclude_packages": ["cryptography"] + }, + "ansible@8": { + "extra_packages": [ + "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" + ] + }, + "ansible@9": { + "exclude_packages": ["certifi", "cryptography", "gnureadline"], + "extra_packages": [ + "ansible-pylibssh", "apache-libcloud", "boto3", "dnspython", "docker", + "junos-eznc", "jxmlease", "kerberos", "ntc-templates", "openshift", + "passlib", "pexpect", "proxmoxer", "pynetbox", "pysphere3", "python-consul", + "python-neutronclient", "pytz", "pywinrm", "requests-credssp", "shade", "zabbix-api" + ] + }, + "ansible@10": { + "exclude_packages": ["certifi", "cryptography", "gnureadline"], + "extra_packages": [ + "ansible-pylibssh", "apache-libcloud", "boto3", "dnspython", "docker", + "junos-eznc", "jxmlease", "kerberos", "ntc-templates", "openshift", + "passlib", "pexpect", "proxmoxer", "pynetbox", "pysphere3", "python-consul", + "python-neutronclient", "pytz", "pywinrm", "requests-credssp", "shade", "zabbix-api" + ] + }, + "apprise": { + "exclude_packages": ["certifi"] + }, + "arcade-learning-environment": { + "exclude_packages": ["numpy"], + "extra_packages": ["gymnasium"] + }, + "arjun": { + "exclude_packages": ["certifi"] + }, + "arxiv_latex_cleaner": { + "exclude_packages": ["pillow"] + }, + "astrometry-net": { + "exclude_packages": ["numpy"], + "extra_packages": ["fitsio"] + }, + "aws-elasticbeanstalk": { + "exclude_packages": ["certifi"] + }, + "aws-google-auth": { + "exclude_packages": ["certifi", "pillow"] + }, + "aws-sam-cli": { + "exclude_packages": ["certifi", "cryptography"] + }, + "aws-sso-util": { + "exclude_packages": ["certifi"] + }, + "awscli": { + "exclude_packages": ["cryptography"], + "extra_packages": ["flit-core"] + }, + "awscurl": { + "exclude_packages": ["certifi", "cryptography"] + }, + "b2-tools": { + "exclude_packages": ["certifi"] + }, + "badkeys": { + "exclude_packages": ["cryptography"] + }, + "bagels": { + "exclude_packages": ["numpy"] + }, + "bandcamp-dl": { + "exclude_packages": ["certifi"] + }, + "bazarr": { + "package_name": "", + "extra_packages": ["lxml", "setuptools", "webrtcvad-wheels"] + }, + "bbot": { + "exclude_packages": ["certifi", "cryptography"] + }, + "beancount": { + "exclude_packages": ["certifi"] + }, + "bilix": { + "exclude_packages": ["certifi"] + }, + "binwalk": { + "exclude_packages": ["numpy", "pillow"], + "extra_packages": ["capstone", "gnupg", "matplotlib", "pycryptodome"] + }, + "black": "black[d]", + "borgbackup": { + "package_name": "", + "extra_packages": ["msgpack", "packaging"] + }, + "borgmatic": { + "exclude_packages": ["certifi"] + }, + "bpython": { + "exclude_packages": ["certifi"] + }, + "buku": { + "package_name": "buku[server]", + "exclude_packages": ["certifi", "cryptography"] + }, + "bzt": { + "exclude_packages": ["certifi", "numpy"], + "extra_packages": ["setuptools"] + }, + "c7n": { + "package_name": "", + "extra_packages": [ + "argcomplete", "boto3", "docutils", "importlib-metadata", "jsonschema", + "python-dateutil", "pyyaml", "referencing", "tabulate", "urllib3" + ] + }, + "cassandra": { + "package_name": "", + "extra_packages": ["cassandra-driver", "wcwidth"] + }, + "cahute": { + "package_name": "", + "extra_packages": ["toml"] + }, + "ccm": { + "extra_packages": ["cassandra-driver", "setuptools"] + }, + "censys": { + "exclude_packages": ["certifi"] + }, + "certbot": { + "extra_packages": ["certbot-apache", "certbot-nginx"], + "exclude_packages": ["certifi", "cryptography"] + }, + "certsync": { + "extra_packages": ["pycryptodomex"], + "exclude_packages": ["certifi", "cryptography"] + }, + "cf2tf": { + "exclude_packages": ["certifi"] + }, + "cffi": { + "exclude_packages": ["pycparser"] + }, + "charm-tools": { + "exclude_packages": ["certifi", "cryptography"], + "extra_packages": ["pip==22.3.1"] + }, + "charmcraft": { + "extra_packages": ["jeepney", "secretstorage"], + "exclude_packages": ["certifi", "cryptography", "pygit2"] + }, + "chatblade": { + "exclude_packages": ["certifi"] + }, + "check-jsonschema": { + "exclude_packages": ["certifi"], + "extra_packages": [ + "fqdn", "isoduration", "jsonpointer", "rfc3339-validator", + "rfc3987", "uri-template", "webcolors" + ] + }, + "checkdmarc": { + "exclude_packages": ["certifi", "cryptography"] + }, + "checkov": { + "exclude_packages": ["certifi", "numpy"] + }, + "cloudformation-cli": { + "extra_packages": ["cloudformation-cli-go-plugin", "cloudformation-cli-java-plugin", "cloudformation-cli-python-plugin", "setuptools"], + "exclude_packages": ["certifi"] + }, + "cloudsplaining": { + "exclude_packages": ["certifi"] + }, + "cobo-cli": { + "exclude_packages": ["certifi"] + }, + "codelimit": { + "exclude_packages": ["certifi"] + }, + "conan": { + "exclude_packages": ["certifi"], + "extra_packages": ["distro"] + }, + "conan@1": { + "exclude_packages": ["certifi"], + "extra_packages": ["distro"] + }, + "conda-lock": { + "exclude_packages": ["certifi", "cryptography"], + "extra_packages": ["jeepney", "secretstorage"] + }, + "cookiecutter": { + "exclude_packages": ["certifi"] + }, + "core-lightning": { + "package_name": "", + "extra_packages": ["mako", "setuptools"] + }, + "credstash": { + "exclude_packages": ["cryptography"] + }, + "cruft": { + "exclude_packages": ["certifi"] + }, + "cryptography": { + "exclude_packages": ["cffi", "pycparser"] + }, + "cycode": { + "exclude_packages": ["certifi"] + }, + "datalad": { + "package_name": "datalad[misc]", + "extra_packages": ["jeepney", "secretstorage"], + "exclude_packages": ["certifi", "cryptography"] + }, + "datasette": { + "exclude_packages": ["certifi"] + }, + "detect-secrets": { + "exclude_packages": ["certifi"] + }, + "diffoscope": "diffoscope[cmdline]", + "dnsgen": { + "exclude_packages": ["certifi"] + }, + "dnsrobocert": { + "exclude_packages": ["certifi", "cryptography"] + }, + "dnstwist": { + "package_name": "dnstwist[full]", + "exclude_packages": ["certifi"] + }, + "dnsviz": { + "extra_packages": ["dnspython", "pygraphviz"] + }, + "docker-squash": { + "exclude_packages": ["certifi"] + }, + "dolphie": { + "exclude_packages": ["certifi", "cryptography"] + }, + "dotdrop": { + "exclude_packages": ["certifi"] + }, + "dstack": { + "package_name": "dstack[aws,azure,gcp,lambda]", + "exclude_packages": ["certifi", "cryptography"] + }, + "duplicity": { + "exclude_packages": ["certifi"], + "extra_packages": ["python-novaclient>18", "stone==3.2.1"] + }, + "dvc": { + "package_name": "dvc[all]", + "exclude_packages": ["certifi", "cryptography", "numpy", "pygit2"] + }, + "dvr-scan": { + "exclude_packages": ["numpy"] + }, + "dxpy": { + "exclude_packages": ["cryptography", "certifi"] + }, + "ecs-deploy": { + "exclude_packages": ["certifi"] + }, + "enex2notion": { + "exclude_packages": ["certifi", "pymupdf"] + }, + "eralchemy": { + "package_name": "eralchemy[pygraphviz]" + }, + "esphome": { + "exclude_packages": ["certifi", "cryptography", "pillow"] + }, + "esptool": { + "exclude_packages": ["cryptography"] + }, + "evernote-backup": { + "exclude_packages": ["certifi"] + }, + "fabric": { + "extra_packages": ["decorator"], + "exclude_packages": ["cryptography"] + }, + "fava": { + "exclude_packages": ["certifi"] + }, + "fastapi": { + "package_name": "fastapi[standard]", + "exclude_packages": ["certifi"] + }, + "fb-client": { + "package_name": "", + "extra_packages": ["pycurl", "pyxdg"] + }, + "fdroidserver": { + "package_name": "fdroidserver[optional]", + "exclude_packages": ["certifi", "cryptography", "numpy", "pillow", "puremagic"], + "extra_packages": ["androguard<4", "python-magic"] + }, + "fiona": { + "exclude_packages": ["certifi"] + }, + "flintrock": { + "exclude_packages": ["cryptography"] + }, + "flit": { + "exclude_packages": ["certifi"] + }, + "fonttools": "fonttools[woff]", + "forbidden": { + "exclude_packages": ["certifi", "cffi", "cryptography", "pycparser"] + }, + "fwupd": { + "package_name": "", + "extra_packages": ["jinja2", "markupsafe"] + }, + "gallery-dl": { + "exclude_packages": ["certifi"] + }, + "gamdl": { + "exclude_packages": ["certifi", "pillow"] + }, + "gcalcli": { + "exclude_packages": ["certifi"] + }, + "gdown": { + "exclude_packages": ["certifi"] + }, + "ggshield": { + "exclude_packages": ["certifi", "cryptography"] + }, + "gimmecert": { + "exclude_packages": ["certifi", "cryptography"] + }, + "gimme-aws-creds": { + "exclude_packages": ["certifi", "cryptography"], + "extra_packages": ["pyobjc-framework-localauthentication"] + }, + "git-review": { + "exclude_packages": ["certifi"] + }, + "glances": { + "package_name": "glances[all]", + "exclude_packages": ["certifi", "cffi", "cryptography", "pycparser", "six"] + }, + "gnuradio": { + "package_name": "", + "exclude_packages": ["rpds-py"], + "extra_packages": [ + "click", "jsonschema", "lxml", "mako", + "packaging", "pygccxml", "pyyaml", "setuptools" + ] + }, + "gobject-introspection": { + "package_name": "", + "extra_packages": ["mako", "markdown", "setuptools"] + }, + "goolabs": { + "exclude_packages": ["certifi"] + }, + "gorilla-cli": { + "exclude_packages": ["certifi"] + }, + "gptline": { + "exclude_packages": ["certifi", "pillow"] + }, + "gptme": { + "exclude_packages": ["certifi", "pillow"] + }, + "graph-tool": { + "package_name": "", + "exclude_packages": ["numpy", "pillow"], + "extra_packages": ["matplotlib", "setuptools", "zstandard"] + }, + "grayskull": { + "exclude_packages": ["certifi"] + }, + "grip": { + "exclude_packages": ["certifi"] + }, + "grokmirror": { + "exclude_packages": ["certifi"] + }, + "gsan": { + "exclude_packages": ["cryptography"] + }, + "gtk-doc": { + "package_name": "", + "extra_packages": ["lxml", "pygments"] + }, + "gyb": { + "package_name": "", + "exclude_packages": ["certifi"], + "extra_packages": [ + "google-api-python-client", "google-auth", "google-auth-httplib2", "google-auth-oauthlib", "httplib2" + ] + }, + "harlequin": { + "package_name": "harlequin[mysql,odbc,postgres]", + "exclude_packages": ["numpy", "psycopg-binary", "tree-sitter-languages"], + "extra_packages": ["psycopg-c"] + }, + "hatch": { + "exclude_packages": ["certifi", "cryptography", "uv"] + }, + "howdoi": { + "exclude_packages": ["certifi", "cryptography"] + }, + "http-prompt": { + "exclude_packages": ["certifi"] + }, + "httpie": { + "package_name": "httpie", + "exclude_packages": ["certifi"] + }, + "huggingface-cli": { + "package_name": "huggingface_hub[cli]", + "exclude_packages": ["certifi"] + }, + "icloudpd": { + "exclude_packages": ["certifi"] + }, + "iconsur": { + "package_name": "", + "extra_packages": ["pyobjc-core", "pyobjc-framework-cocoa"] + }, + "img2pdf": { + "exclude_packages": ["pillow"] + }, + "instaloader": { + "exclude_packages": ["certifi"] + }, + "instalooter": { + "exclude_packages": ["certifi"] + }, + "internetarchive": { + "exclude_packages": ["certifi"] + }, + "iocextract": { + "exclude_packages": ["certifi"], + "extra_packages": ["requests"] + }, + "jenkins-job-builder": { + "exclude_packages": ["certifi"] + }, + "jinja2-cli": "jinja2-cli[yaml,toml,xml]", + "jrnl": { + "exclude_packages": ["cryptography"] + }, + "juju-wait": { + "extra_packages": ["setuptools"] + }, + "jupyterlab": { + "extra_packages": ["appnope", "hatch-jupyter-builder", "hatch-nodejs-version", "jupyter-console", "notebook"], + "exclude_packages": ["certifi"] + }, + "kaskade": { + "exclude_packages": ["certifi", "cryptography"] + }, + "keeper-commander": { + "exclude_packages": ["certifi", "cryptography"] + }, + "keepkey-agent": { + "exclude_packages": ["cryptography"], + "extra_packages": ["protobuf==3.20.3"] + }, + "keyring": { + "package_name": "keyring[completion]", + "exclude_packages": ["cryptography"], + "extra_packages": ["jeepney", "secretstorage"] + }, + "ldeep": { + "exclude_packages": ["cryptography"] + }, + "lexicon": { + "package_name": "dns-lexicon[full]", + "exclude_packages": ["certifi", "cryptography"] + }, + "linode-cli": { + "exclude_packages": ["certifi"] + }, + "litecli": { + "exclude_packages": ["setuptools"] + }, + "literate-git": { + "exclude_packages": ["pygit2"] + }, + "liquidctl": { + "exclude_packages": ["pillow"] + }, + "llm": { + "exclude_packages": ["certifi"] + }, + "localstack": { + "exclude_packages": ["certifi", "cryptography"] + }, + "locust": { + "exclude_packages": ["certifi"] + }, + "magic-wormhole": { + "exclude_packages": ["cryptography"] + }, + "manim": { + "exclude_packages": ["pillow", "numpy", "scipy"] + }, + "mapproxy": { + "exclude_packages": ["certifi", "pillow"], + "extra_packages": ["pyproj"] + }, + "mat2": { + "exclude_packages": ["pygobject"] + }, + "mathlibtools": { + "exclude_packages": ["certifi", "cryptography"] + }, + "mdv": "mdv[yaml]", + "mentat": { + "exclude_packages": ["certifi", "numpy", "pillow"] + }, + "mesa": { + "package_name": "", + "extra_packages": ["mako", "packaging", "ply", "pyyaml"] + }, + "meta-package-manager": { + "exclude_packages": ["certifi"] + }, + "molecule": { + "extra_packages": ["docker-py", "molecule-vagrant", "python-vagrant"], + "exclude_packages": ["certifi", "cryptography"] + }, + "mongo-orchestration": { + "exclude_packages": ["certifi"] + }, + "moto": { + "package_name": "moto[all,server]", + "exclude_packages": ["certifi", "cryptography"] + }, + "mvt": { + "exclude_packages": ["certifi", "cryptography"] + }, + "mycli": { + "exclude_packages": ["cryptography"] + }, + "nanopb": { + "package_name": "nanopb", + "extra_packages": ["setuptools"] + }, + "nbdime": { + "exclude_packages": ["certifi", "jupyter-server", "nbconvert"] + }, + "nicotine-plus": { + "exclude_packages": ["pycairo", "pygobject"] + }, + "notifiers": { + "exclude_packages": ["certifi"] + }, + "nvchecker": "nvchecker[pypi]", + "oci-cli": { + "exclude_packages": ["certifi", "cryptography"] + }, + "ocrmypdf": { + "exclude_packages": ["cryptography", "pillow"] + }, + "offlineimap": { + "exclude_packages": ["certifi"] + }, + "okta-awscli": { + "exclude_packages": ["certifi"] + }, + "onionprobe": { + "exclude_packages": ["certifi", "cryptography"] + }, + "onlykey-agent": { + "exclude_packages": ["certifi", "cryptography"] + }, + "openai-whisper": { + "exclude_packages": ["certifi", "numpy", "torch"] + }, + "openstackclient": { + "extra_packages": [ + "keystoneauth-websso", "osc-placement", "python-barbicanclient", + "python-cloudkittyclient", "python-designateclient", + "python-glanceclient", "python-heatclient", "python-ironicclient", + "python-magnumclient", "python-manilaclient", "python-mistralclient", + "python-octaviaclient", "setuptools" + ], + "exclude_packages": ["certifi", "cryptography"] + }, + "organize-tool": { + "exclude_packages": ["cryptography"] + }, + "osc": { + "package_name": "", + "extra_packages": ["rpm", "ruamel-yaml", "urllib3"], + "exclude_packages": ["cryptography"] + }, + "osc-cli": { + "exclude_packages": ["certifi"] + }, + "otterdog": { + "exclude_packages": ["certifi", "cryptography"] + }, + "parliament": { + "extra_packages": ["setuptools"] + }, + "parsedmarc": { + "exclude_packages": ["certifi", "cryptography"] + }, + "pass-git-helper": { + "package_name": "", + "extra_packages": ["pyxdg"] + }, + "pass-import": { + "exclude_packages": ["certifi"] + }, + "pdfly": { + "exclude_packages": ["pillow"] + }, + "pdm": { + "exclude_packages": ["certifi"] + }, + "pferd": { + "exclude_packages": ["certifi", "cryptography"] + }, + "pip-audit": { + "exclude_packages": ["certifi"] + }, + "pipenv": { + "exclude_packages": ["certifi"] + }, + "platformio": { + "exclude_packages": ["certifi"] + }, + "pocsuite3": { + "package_name": "pocsuite3[complete]", + "exclude_packages": ["certifi", "cryptography"] + }, + "poetry": { + "exclude_packages": ["certifi", "cryptography"], + "extra_packages": ["cffi", "jeepney", "secretstorage", "xattr"] + }, + "policy_sentry": { + "exclude_packages": ["certifi"] + }, + "prowler": { + "exclude_packages": ["certifi", "cryptography", "numpy"] + }, + "pwntools": { + "exclude_packages": ["capstone", "certifi", "cryptography"] + }, + "pygit2": { + "exclude_packages": ["cffi", "pycparser"] + }, + "pyinstaller": { + "extra_packages": ["macholib"] + }, + "pypy3.9": { + "package_name": "", + "extra_packages": ["pip", "setuptools"] + }, + "pyqt": { + "exclude_packages": [ + "pyqt6-3d-qt6", "pyqt6-charts-qt6", "pyqt6-datavisualization-qt6", + "pyqt6-networkauth-qt6", "pyqt6-webengine-qt6", "pyqt6-qt6" + ], + "extra_packages": [ + "pyqt6-3d", "pyqt6-charts", "pyqt6-datavisualization", + "pyqt6-networkauth", "pyqt6-webengine" + ] + }, + "pyqt@5": { + "exclude_packages": [ + "pyqt5-qt5", "pyqt3d-qt5", "pyqtchart-qt5", "pyqtdatavisualization-qt5", + "pyqtnetworkauth-qt5", "pyqtpurchasing-qt5", "pyqtwebengine-qt5" + ], + "extra_packages": [ + "pyqt3d", "pyqtchart", "pyqtdatavisualization", + "pyqtnetworkauth", "pyqtpurchasing", "pyqtwebengine" + ] + }, + "python@3.8": { + "package_name": "", + "extra_packages": ["setuptools", "pip", "wheel"] + }, + "python@3.9": { + "package_name": "", + "extra_packages": ["flit-core", "setuptools", "pip", "wheel"] + }, + "python@3.10": { + "package_name": "", + "extra_packages": ["flit-core", "setuptools", "pip", "wheel"] + }, + "python@3.11": { + "package_name": "", + "extra_packages": ["flit-core", "setuptools", "pip", "wheel"] + }, + "python@3.12": { + "package_name": "", + "extra_packages": ["flit-core", "setuptools", "pip", "wheel"] + }, + "python@3.13": { + "package_name": "", + "extra_packages": ["flit-core", "setuptools", "pip", "wheel"] + }, + "python-freethreading": { + "package_name": "", + "extra_packages": ["flit-core", "setuptools", "pip", "wheel"] + }, + "python-lsp-server": { + "package_name": "python-lsp-server[websockets]", + "extra_packages": ["python-lsp-black", "pylsp-mypy", "python-lsp-ruff", "pylsp-rope"] + }, + "python-matplotlib": { + "exclude_packages": ["numpy", "pillow"] + }, + "pythran": { + "exclude_packages": ["numpy"] + }, + "pytorch": { + "package_name": "torch[opt-einsum]", + "extra_packages": ["pyyaml"], + "exclude_packages": ["numpy"] + }, + "rasterio": { + "exclude_packages": ["certifi", "numpy"] + }, + "raven": { + "exclude_packages": ["certifi"] + }, + "rawdog": { + "exclude_packages": ["certifi"] + }, + "rbtools": { + "exclude_packages": ["certifi"] + }, + "rdiff-backup": { + "extra_packages": ["pyxattr"] + }, + "recon-ng": { + "package_name": "", + "exclude_packages": ["certifi"], + "extra_packages": [ + "pyyaml", "dnspython", "lxml", "mechanize", "requests", + "flask", "flask-restful", "flasgger", "dicttoxml", "xlsxwriter", "unicodecsv", "rq" + ] + }, + "regipy": "regipy[cli]", + "rich-cli": { + "exclude_packages": ["certifi"] + }, + "robot-framework": { + "extra_packages": ["robotframework-archivelibrary", "robotframework-selenium2library", "robotframework-sshlibrary"], + "exclude_packages": ["certifi", "cryptography"] + }, + "rpds-py": { + "extra_packages": ["setuptools-rust"] + }, + "ruff-lsp": { + "exclude_packages": ["ruff"] + }, + "sacad": { + "exclude_packages": ["pillow"] + }, + "safety": { + "exclude_packages": ["certifi", "cryptography"] + }, + "sail": { + "exclude_packages": ["certifi", "cryptography"] + }, + "sceptre": { + "exclude_packages": ["certifi"] + }, + "schemathesis": { + "exclude_packages": ["certifi"] + }, + "scikit-image": { + "exclude_packages": ["numpy", "pillow", "scipy"] + }, + "scipy": { + "exclude_packages": ["numpy"] + }, + "scoutsuite": { + "exclude_packages": ["certifi", "cryptography"] + }, + "scrapy": { + "exclude_packages": ["certifi", "cryptography"] + }, + "search-that-hash": { + "exclude_packages": ["certifi"] + }, + "semgrep": { + "package_name": "semgrep", + "exclude_packages": ["certifi"] + }, + "sgr": { + "exclude_packages": ["certifi", "cryptography"] + }, + "sherlock": { + "exclude_packages": ["certifi", "numpy"] + }, + "shodan": { + "exclude_packages": ["certifi"] + }, + "showcert": { + "exclude_packages": ["certifi", "cryptography"] + }, + "shub": { + "exclude_packages": ["certifi"] + }, + "sickchill": { + "exclude_packages": ["certifi", "cryptography"], + "extra_packages": ["setuptools"] + }, + "sigma-cli": { + "exclude_packages": ["certifi"], + "extra_packages": ["pysigma-backend-sqlite"] + }, + "sigstore": { + "exclude_packages": ["certifi", "cryptography"] + }, + "slither-analyzer": { + "exclude_packages": ["certifi"] + }, + "snakemake": { + "exclude_packages": ["certifi"] + }, + "snowflake-cli": { + "exclude_packages": ["certifi", "cryptography"] + }, + "snapcraft": { + "exclude_packages": ["certifi", "cryptography", "pygit2"], + "extra_packages": ["catkin-pkg", "jeepney", "pylxd", "secretstorage"] + }, + "sphinx-doc": { + "exclude_packages": ["certifi"], + "extra_packages": ["numpydoc"] + }, + "ssh-mitm": { + "exclude_packages": ["cryptography"] + }, + "streamlink": { + "exclude_packages": ["certifi"] + }, + "streamrip": { + "exclude_packages": ["certifi", "pillow"] + }, + "subliminal": { + "exclude_packages": ["certifi"] + }, + "svtplay-dl": { + "exclude_packages": ["certifi", "cryptography"] + }, + "sysaidmin": { + "exclude_packages": ["certifi"] + }, + "systemd": { + "package_name": "", + "extra_packages": ["jinja2", "lxml"] + }, + "tartufo": { + "exclude_packages": ["pygit2"] + }, + "theharvester": { + "exclude_packages": ["certifi"] + }, + "tmt": { + "exclude_packages": ["certifi"] + }, + "toot": { + "package_name": "toot[images,richtext]", + "exclude_packages": ["certifi", "pillow"] + }, + "torchvision": { + "exclude_packages": ["certifi", "numpy", "pillow", "torch"] + }, + "touca": { + "exclude_packages": ["certifi"] + }, + "trafilatura": { + "exclude_packages": ["certifi"] + }, + "trailscraper": { + "extra_packages": ["setuptools"] + }, + "trezor-agent": { + "exclude_packages": ["certifi", "cryptography", "pillow"], + "extra_packages": [ + "dbus-fast", "ledger-agent", "pyobjc-core", "pyobjc-framework-CoreBluetooth", "pyobjc-framework-libdispatch" + ] + }, + "trzsz": { + "extra_packages": ["trzsz-iterm2"] + }, + "tvnamer": { + "exclude_packages": ["certifi"] + }, + "twarc": { + "exclude_packages": ["certifi"] + }, + "twine": { + "exclude_packages": ["certifi", "cryptography"] + }, + "unoconv":{ + "extra_packages": ["setuptools"] + }, + "urlwatch": { + "exclude_packages": ["certifi"] + }, + "uvicorn": "uvicorn[standard]", + "vdirsyncer": { + "package_name": "vdirsyncer[google]", + "exclude_packages": ["certifi"] + }, + "virt-manager": { + "package_name": "", + "exclude_packages": ["certifi"], + "extra_packages": ["requests"] + }, + "vunnel": { + "exclude_packages": ["certifi"] + }, + "watson": { + "exclude_packages": ["certifi"] + }, + "waybackpy": { + "exclude_packages": ["certifi"] + }, + "weasyprint": { + "exclude_packages": ["pillow"] + }, + "weaviate-cli": { + "exclude_packages": ["certifi", "cryptography"] + }, + "woob": { + "exclude_packages": ["certifi", "pillow"] + }, + "wtfis": { + "exclude_packages": ["certifi"] + }, + "wxpython": { + "exclude_packages": ["numpy", "pillow"] + }, + "xdot": { + "exclude_packages": ["numpy", "pygobject"], + "extra_packages": ["graphviz"] + }, + "xonsh": "xonsh[ptk,pygments,proctitle]", + "yewtube": { + "exclude_packages": ["certifi"] + }, + "ykman": { + "exclude_packages": ["cryptography"], + "extra_packages": ["jeepney", "secretstorage"] + }, + "yle-dl": { + "exclude_packages": ["certifi"] + }, + "yt-dlp": { + "package_name": "yt-dlp[default]", + "exclude_packages": ["certifi"] + }, + "zabbix-cli": { + "package_name": "zabbix_cli_uio", + "exclude_packages": ["certifi"] + }, + "zim": { + "package_name": "", + "extra_packages": ["pyxdg", "setuptools"] + } +} 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..dbc643aded769 --- /dev/null +++ b/style_exceptions/binary_bootstrap_formula_urls_allowlist.json @@ -0,0 +1,24 @@ +[ + "cabal-install", + "clozure-cl", + "crystal", + "fastbuild", + "fpc", + "ghc", + "ghc@8.10", + "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..523bc99847beb --- /dev/null +++ b/style_exceptions/make_check_allowlist.json @@ -0,0 +1,29 @@ +[ + "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@1.1", + "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..2a0d9bed0e883 --- /dev/null +++ b/style_exceptions/not_a_binary_url_prefix_allowlist.json @@ -0,0 +1,12 @@ +[ + "bittwist", + "cpm", + "cspice", + "flashrom", + "mlx", + "organize-tool", + "reattach-to-user-namespace", + "term", + "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..e80b155b962a8 --- /dev/null +++ b/style_exceptions/runtime_cpu_detection_allowlist.json @@ -0,0 +1,45 @@ +[ + "abseil", + "aom", + "aws-checksums", + "awscli", + "bitcoin", + "blis", + "botan", + "coreutils", + "cryfs", + "cryptopp", + "fftw", + "fio", + "groestlcoin", + "handbrake", + "highway", + "libpq", + "libvpx", + "mariadb", + "mariadb@10.11", + "mariadb@10.5", + "mariadb@10.6", + "mariadb@11.4", + "nsd", + "nss", + "onnxruntime", + "openblas", + "opencv", + "open-mpi", + "postgresql@12", + "postgresql@13", + "postgresql@14", + "postgresql@15", + "postgresql@16", + "postgresql@17", + "qt", + "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..9de6e546d25f6 --- /dev/null +++ b/synced_versions_formulae.json @@ -0,0 +1,73 @@ +[ + [ + "aarch64-elf-gcc", + "arm-none-eabi-gcc", + "i686-elf-gcc", + "m68k-elf-gcc", + "riscv64-elf-gcc", + "x86_64-elf-gcc" + ], + [ + "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"], + ["bcftools", "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"], + ["dmd", "dtools"], + ["docker", "docker-completion"], + ["easyrpg-player", "liblcf"], + ["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"], + ["llvm", "lld", "flang", "wasi-runtimes"], + ["qalculate-gtk", "qalculate-qt"], + ["mame", "rom-tools"], + ["mecab-unidic", "mecab-unidic-extended"], + ["moarvm", "nqp", "rakudo"], + ["moreutils", "sponge"], + ["mupdf", "mupdf-tools"], + ["mysql", "mysql-client"], + ["notmuch", "notmuch-mutt"], + ["openssh", "ssh-copy-id"], + ["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-freethreading"], + ["python-tk@3.9", "python@3.9"], + ["qt", "qt-libiodbc", "qt-mariadb", "qt-mysql", "qt-percona-server", "qt-postgresql", "qt-unixodbc"], + ["qwt", "qwt-qt5"], + ["surelog", "uhdm"], + ["technitium-dns", "technitium-library"], + ["tmuxinator", "tmuxinator-completion"], + ["vulkan-headers", "vulkan-loader", "vulkan-tools", "vulkan-utility-libraries"], + ["wp-cli", "wp-cli-completion"] +] diff --git a/tap_migrations.json b/tap_migrations.json index 9a4afe9d0f772..8170a6385d18b 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,9 +6,8 @@ "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", + "consul": "homebrew/cask", "corelocationcli": "homebrew/cask", "dwarf-fortress": "homebrew/cask", "geany": "homebrew/cask", @@ -20,14 +18,15 @@ "gtkwave": "homebrew/cask", "horndis": "homebrew/cask", "inkscape": "homebrew/cask", - "jsl": "homebrew/cask", + "joplin": "homebrew/cask", "keybase": "homebrew/cask", "meld": "homebrew/cask", + "mitmproxy": "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" }